././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0711257 pygame-2.6.1/0000755000175100001770000000000014676242436012425 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0721257 pygame-2.6.1/PKG-INFO0000644000175100001770000003111614676242436013524 0ustar00runnerdockerMetadata-Version: 2.1 Name: pygame Version: 2.6.1 Summary: Python Game Development Home-page: https://www.pygame.org Author: A community project. Author-email: pygame@pygame.org License: LGPL Project-URL: Documentation, https://pygame.org/docs Project-URL: Bug Tracker, https://github.com/pygame/pygame/issues Project-URL: Source, https://github.com/pygame/pygame Project-URL: Twitter, https://twitter.com/pygame_org Classifier: Development Status :: 6 - Mature Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Classifier: Programming Language :: Assembly Classifier: Programming Language :: C Classifier: Programming Language :: Cython Classifier: Programming Language :: Objective C Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Games/Entertainment Classifier: Topic :: Multimedia :: Sound/Audio Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI Classifier: Topic :: Multimedia :: Sound/Audio :: Players Classifier: Topic :: Multimedia :: Graphics Classifier: Topic :: Multimedia :: Graphics :: Capture :: Digital Camera Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion Classifier: Topic :: Multimedia :: Graphics :: Viewers Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: POSIX Classifier: Operating System :: Unix Classifier: Operating System :: MacOS Requires-Python: >=3.6 Description-Content-Type: text/x-rst .. image:: https://raw.githubusercontent.com/pygame/pygame/main/docs/reST/_static/pygame_logo.svg :alt: pygame :target: https://www.pygame.org/ |AppVeyorBuild| |PyPiVersion| |PyPiLicense| |Python3| |GithubCommits| |BlackFormatBadge| Pygame_ is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the `Simple DirectMedia Layer library`_ and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task. `We need your help`_ to make pygame the best it can be! New contributors are welcome. Installation ------------ Before installing pygame, you must check that Python is installed on your machine. To find out, open a command prompt (if you have Windows) or a terminal (if you have MacOS or Linux) and type this: :: python --version If a message such as "Python 3.8.10" appears, it means that Python is correctly installed. If an error message appears, it means that it is not installed yet. You must then go to the `official website `_ to download it. Once Python is installed, you have to perform a final check: you have to see if pip is installed. Generally, pip is pre-installed with Python but we are never sure. Same as for Python, type the following command: :: pip --version If a message such as "pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)" appears, you are ready to install pygame! To install it, enter this command: :: pip install pygame Once pygame is installed, quickly test your library by entering the following command, which opens one of the many example games that comes pre-installed: :: python3 -m pygame.examples.aliens If this doesn’t work, the `Getting Started `_ section of the official website has more information for platform specific issues, such as adding python to your machine’s PATH settings Help ---- If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the `docs page`_. You can also browse the documentation locally by running ``python -m pygame.docs`` in your terminal. If the docs aren't found locally, it'll launch the online website instead. The online documentation stays up to date with the development version of pygame on GitHub. This may be a bit newer than the version of pygame you are using. To upgrade to the latest full release, run ``pip install pygame --upgrade`` in your terminal. Best of all, the examples directory has many playable small programs which can get you started playing with the code right away. Features ---------- Pygame is a powerful library for game development, offering a wide range of features to simplify your coding journey. Let's delve into what pygame has to offer: Graphics - With pygame, creating dynamic and engaging graphics has never been easier. The library provides simple yet effective tools for 2D graphics and animation, including support for images, rectangles, and polygon shapes. Whether you're a seasoned game developer or just starting out, pygame has you covered. Sound - Pygame also includes support for playing and manipulating sound and music, making it easy to add sound effects and background music to your games. With support for WAV, MP3, and OGG file formats, you have plenty of options to choose from. Input - Pygame provides intuitive functions for handling keyboard, mouse, and joystick input, allowing you to quickly and easily implement player controls in your games. No more struggling with complex input code, pygame makes it simple. Game Development - Lastly, pygame provides a comprehensive suite of tools and features specifically designed for game development. From collision detection to sprite management, pygame has everything you need to create exciting and engaging games. Whether you're building a platformer, puzzle game, or anything in between, pygame has you covered. Building From Source -------------------- If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it. Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the ``setup.py`` script which will attempt to auto-configure, build, and install pygame. Much more information about installing and compiling is available on the `Compilation wiki page`_. Contribute ---------- * `Documentation Contributions `_ - Guidelines for contributing to the main documentations * `Writing your first unit test `_ - Step by step guide on how to write your first unit test in Python for Pygame. * `How to Hack Pygame `_ - Information on hacking, developing, and modifying Pygame * `Issue Tracker for beginners `_ - A way for beginners to contribute to the project * `Bugs & Patches `_ - Report bugs * `Communication tools `_ - More information and ways to get in touch with the Pygame team Credits ------- Thanks to everyone who has helped contribute to this library. Special thanks are also in order. * Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer * Lenard Lindstrom: the 1.8+ windows maintainer, many changes, and fixes * Brian Fisher for svn auto builder, bug tracker and many contributions * Rene Dudfield: many changes, and fixes, 1.7+ release manager/maintainer * Phil Hassey for his work on the pygame.org website * DR0ID for his work on the sprite module * Richard Goedeken for his smoothscale function * Ulf Ekström for his pixel perfect collision detection code * Pete Shinners: original author * David Clark for filling the right-hand-man position * Ed Boraas and Francis Irving: Debian packages * Maxim Sobolev: FreeBSD packaging * Bob Ippolito: MacOS and OS X porting (much work!) * Jan Ekhol, Ray Kelm, and Peter Nicolai: putting up with early design ideas * Nat Pryce for starting our unit tests * Dan Richter for documentation work * TheCorruptor for his incredible logos and graphics * Nicholas Dudfield: many test improvements * Alex Folkner for pygame-ctypes Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton. And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau There's many more folks out there who've submitted helpful ideas, kept this project going, and basically made our life easier. Thanks! Many thank you's for people making documentation comments, and adding to the pygame.org wiki. Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy. Lots of thanks to James Paige for hosting the pygame bugzilla. Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting. Dependencies ------------ Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions: +----------+------------------------+ | CPython | >= 3.6 (Or use PyPy3) | +----------+------------------------+ | SDL | >= 2.0.8 | +----------+------------------------+ | SDL_mixer| >= 2.0.0 | +----------+------------------------+ | SDL_image| >= 2.0.2 | +----------+------------------------+ | SDL_ttf | >= 2.0.11 | +----------+------------------------+ | SDL_gfx | (Optional, vendored in)| +----------+------------------------+ | NumPy | >= 1.6.2 (Optional) | +----------+------------------------+ License ------- This library is distributed under `GNU LGPL version 2.1`_, which can be found in the file ``docs/LGPL.txt``. We reserve the right to place future versions of this library under a different license. This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine. The programs in the ``examples`` subdirectory are in the public domain. See docs/licenses for licenses of dependencies. .. |AppVeyorBuild| image:: https://ci.appveyor.com/api/projects/status/x4074ybuobsh4myx?svg=true :target: https://ci.appveyor.com/project/pygame/pygame .. |PyPiVersion| image:: https://img.shields.io/pypi/v/pygame.svg?v=1 :target: https://pypi.python.org/pypi/pygame .. |PyPiLicense| image:: https://img.shields.io/pypi/l/pygame.svg?v=1 :target: https://pypi.python.org/pypi/pygame .. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1 .. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame/pygame/2.1.2.svg :target: https://github.com/pygame/pygame/compare/2.1.2...main .. |BlackFormatBadge| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black .. _pygame: https://www.pygame.org .. _Simple DirectMedia Layer library: https://www.libsdl.org .. _We need your help: https://www.pygame.org/contribute.html .. _Compilation wiki page: https://www.pygame.org/wiki/Compilation .. _docs page: https://www.pygame.org/docs/ .. _GNU LGPL version 2.1: https://www.gnu.org/copyleft/lesser.html ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/README.rst0000644000175100001770000002511214676242340014107 0ustar00runnerdocker.. image:: https://raw.githubusercontent.com/pygame/pygame/main/docs/reST/_static/pygame_logo.svg :alt: pygame :target: https://www.pygame.org/ |AppVeyorBuild| |PyPiVersion| |PyPiLicense| |Python3| |GithubCommits| |BlackFormatBadge| Pygame_ is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the `Simple DirectMedia Layer library`_ and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task. `We need your help`_ to make pygame the best it can be! New contributors are welcome. Installation ------------ Before installing pygame, you must check that Python is installed on your machine. To find out, open a command prompt (if you have Windows) or a terminal (if you have MacOS or Linux) and type this: :: python --version If a message such as "Python 3.8.10" appears, it means that Python is correctly installed. If an error message appears, it means that it is not installed yet. You must then go to the `official website `_ to download it. Once Python is installed, you have to perform a final check: you have to see if pip is installed. Generally, pip is pre-installed with Python but we are never sure. Same as for Python, type the following command: :: pip --version If a message such as "pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)" appears, you are ready to install pygame! To install it, enter this command: :: pip install pygame Once pygame is installed, quickly test your library by entering the following command, which opens one of the many example games that comes pre-installed: :: python3 -m pygame.examples.aliens If this doesn’t work, the `Getting Started `_ section of the official website has more information for platform specific issues, such as adding python to your machine’s PATH settings Help ---- If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the `docs page`_. You can also browse the documentation locally by running ``python -m pygame.docs`` in your terminal. If the docs aren't found locally, it'll launch the online website instead. The online documentation stays up to date with the development version of pygame on GitHub. This may be a bit newer than the version of pygame you are using. To upgrade to the latest full release, run ``pip install pygame --upgrade`` in your terminal. Best of all, the examples directory has many playable small programs which can get you started playing with the code right away. Features ---------- Pygame is a powerful library for game development, offering a wide range of features to simplify your coding journey. Let's delve into what pygame has to offer: Graphics - With pygame, creating dynamic and engaging graphics has never been easier. The library provides simple yet effective tools for 2D graphics and animation, including support for images, rectangles, and polygon shapes. Whether you're a seasoned game developer or just starting out, pygame has you covered. Sound - Pygame also includes support for playing and manipulating sound and music, making it easy to add sound effects and background music to your games. With support for WAV, MP3, and OGG file formats, you have plenty of options to choose from. Input - Pygame provides intuitive functions for handling keyboard, mouse, and joystick input, allowing you to quickly and easily implement player controls in your games. No more struggling with complex input code, pygame makes it simple. Game Development - Lastly, pygame provides a comprehensive suite of tools and features specifically designed for game development. From collision detection to sprite management, pygame has everything you need to create exciting and engaging games. Whether you're building a platformer, puzzle game, or anything in between, pygame has you covered. Building From Source -------------------- If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it. Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the ``setup.py`` script which will attempt to auto-configure, build, and install pygame. Much more information about installing and compiling is available on the `Compilation wiki page`_. Contribute ---------- * `Documentation Contributions `_ - Guidelines for contributing to the main documentations * `Writing your first unit test `_ - Step by step guide on how to write your first unit test in Python for Pygame. * `How to Hack Pygame `_ - Information on hacking, developing, and modifying Pygame * `Issue Tracker for beginners `_ - A way for beginners to contribute to the project * `Bugs & Patches `_ - Report bugs * `Communication tools `_ - More information and ways to get in touch with the Pygame team Credits ------- Thanks to everyone who has helped contribute to this library. Special thanks are also in order. * Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer * Lenard Lindstrom: the 1.8+ windows maintainer, many changes, and fixes * Brian Fisher for svn auto builder, bug tracker and many contributions * Rene Dudfield: many changes, and fixes, 1.7+ release manager/maintainer * Phil Hassey for his work on the pygame.org website * DR0ID for his work on the sprite module * Richard Goedeken for his smoothscale function * Ulf Ekström for his pixel perfect collision detection code * Pete Shinners: original author * David Clark for filling the right-hand-man position * Ed Boraas and Francis Irving: Debian packages * Maxim Sobolev: FreeBSD packaging * Bob Ippolito: MacOS and OS X porting (much work!) * Jan Ekhol, Ray Kelm, and Peter Nicolai: putting up with early design ideas * Nat Pryce for starting our unit tests * Dan Richter for documentation work * TheCorruptor for his incredible logos and graphics * Nicholas Dudfield: many test improvements * Alex Folkner for pygame-ctypes Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton. And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau There's many more folks out there who've submitted helpful ideas, kept this project going, and basically made our life easier. Thanks! Many thank you's for people making documentation comments, and adding to the pygame.org wiki. Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy. Lots of thanks to James Paige for hosting the pygame bugzilla. Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting. Dependencies ------------ Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions: +----------+------------------------+ | CPython | >= 3.6 (Or use PyPy3) | +----------+------------------------+ | SDL | >= 2.0.8 | +----------+------------------------+ | SDL_mixer| >= 2.0.0 | +----------+------------------------+ | SDL_image| >= 2.0.2 | +----------+------------------------+ | SDL_ttf | >= 2.0.11 | +----------+------------------------+ | SDL_gfx | (Optional, vendored in)| +----------+------------------------+ | NumPy | >= 1.6.2 (Optional) | +----------+------------------------+ License ------- This library is distributed under `GNU LGPL version 2.1`_, which can be found in the file ``docs/LGPL.txt``. We reserve the right to place future versions of this library under a different license. This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine. The programs in the ``examples`` subdirectory are in the public domain. See docs/licenses for licenses of dependencies. .. |AppVeyorBuild| image:: https://ci.appveyor.com/api/projects/status/x4074ybuobsh4myx?svg=true :target: https://ci.appveyor.com/project/pygame/pygame .. |PyPiVersion| image:: https://img.shields.io/pypi/v/pygame.svg?v=1 :target: https://pypi.python.org/pypi/pygame .. |PyPiLicense| image:: https://img.shields.io/pypi/l/pygame.svg?v=1 :target: https://pypi.python.org/pypi/pygame .. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1 .. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame/pygame/2.1.2.svg :target: https://github.com/pygame/pygame/compare/2.1.2...main .. |BlackFormatBadge| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black .. _pygame: https://www.pygame.org .. _Simple DirectMedia Layer library: https://www.libsdl.org .. _We need your help: https://www.pygame.org/contribute.html .. _Compilation wiki page: https://www.pygame.org/wiki/Compilation .. _docs page: https://www.pygame.org/docs/ .. _GNU LGPL version 2.1: https://www.gnu.org/copyleft/lesser.html ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9881258 pygame-2.6.1/buildconfig/0000755000175100001770000000000014676242436014712 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/MANIFEST.in0000644000175100001770000000050214676242340016437 0ustar00runnerdockerrecursive-include buildconfig * recursive-include docs * recursive-include src_py * recursive-include src_c * recursive-include examples * recursive-include test * recursive-exclude buildconfig/ci * recursive-exclude buildconfig/manylinux-build * include README.rst exclude buildconfig/appveyor.yml exclude .travis.yml ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Makefile0000644000175100001770000000115614676242340016347 0ustar00runnerdocker#fake Makefile for pygame, to support the common # ./configure;make;make install PYTHON = python build: Setup setup.py $(PYTHON) setup.py build install: Setup setup.py $(PYTHON) setup.py install Setup: $(PYTHON) configure.py check tests: $(PYTHON) run_tests.py test: build test src $(PYTHON) run_tests.py docs: $(PYTHON) makeref.py clean: rm -rf build dist rm -f lib/*~ src/*~ test/*~ rm -f lib/*.pyc src/*.pyc test/*.pyc test/test_utils/*.pyc rm -rf __pycache__ lib/__pycache__ test/__pycache__/ test/test_utils/__pycache__/ # Sphinx generated files: makeref.py. See .gitignore rm -rf docs/generated/ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup.Android.SDL2.in0000644000175100001770000000540214676242340020417 0ustar00runnerdocker# This works differently from the other templates SDL = {sdl_includes} -D_REENTRANT -DSDL2 -lSDL2 FONT = {sdl_ttf_includes} -lSDL2_ttf IMAGE = {sdl_image_includes} -lSDL2_image MIXER = {sdl_mixer_includes} -lSDL2_mixer JPEG = {jpeg_includes} -ljpeg SCRAP = PNG = {png_includes} -lpng16 FREETYPE = {freetype_includes} -lfreetype -lharfbuzz DEBUG = #the following modules are optional. you will want to compile #everything you can, but you can ignore ones you don't have #dependencies for, just comment them out imageext src_c/imageext.c $(SDL) $(IMAGE) $(PNG) $(JPEG) $(DEBUG) font src_c/font.c $(SDL) $(FONT) $(DEBUG) mixer src_c/mixer.c $(SDL) $(MIXER) $(DEBUG) mixer_music src_c/music.c $(SDL) $(MIXER) $(DEBUG) scrap src_c/scrap.c $(SDL) $(SCRAP) $(DEBUG) # pypm src_c/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) _sdl2.sdl2 src_c/_sdl2/sdl2.c $(SDL) $(DEBUG) -Isrc_c _sdl2.audio src_c/_sdl2/audio.c $(SDL) $(DEBUG) -Isrc_c _sdl2.video src_c/_sdl2/video.c src_c/pgcompat.c $(SDL) $(DEBUG) -Isrc_c _sdl2.mixer src_c/_sdl2/mixer.c $(SDL) $(MIXER) $(DEBUG) -Isrc_c _sdl2.touch src_c/_sdl2/touch.c $(SDL) $(DEBUG) -Isrc_c _sdl2.controller src_c/_sdl2/controller.c $(SDL) $(DEBUG) -Isrc_c GFX = src_c/SDL_gfx/SDL_gfxPrimitives.c #GFX = src_c/SDL_gfx/SDL_gfxBlitFunc.c src_c/SDL_gfx/SDL_gfxPrimitives.c gfxdraw src_c/gfxdraw.c $(SDL) $(GFX) $(DEBUG) #optional freetype module (do not break in multiple lines #or the configuration script will choke!) #_freetype src_c/freetype/ft_cache.c src_c/freetype/ft_wrap.c src_c/freetype/ft_render.c src_c/freetype/ft_render_cb.c src_c/freetype/ft_layout.c src_c/freetype/ft_unicode.c src_c/_freetype.c $(SDL) $(FREETYPE) $(DEBUG) _sprite src_c/_sprite.c $(SDL) $(DEBUG) #these modules are required for pygame to run. they only require #SDL as a dependency. these should not be altered base src_c/base.c $(SDL) $(DEBUG) color src_c/color.c $(SDL) $(DEBUG) constants src_c/constants.c $(SDL) $(DEBUG) display src_c/display.c $(SDL) $(DEBUG) event src_c/event.c $(SDL) $(DEBUG) key src_c/key.c $(SDL) $(DEBUG) mouse src_c/mouse.c $(SDL) $(DEBUG) rect src_c/rect.c $(SDL) $(DEBUG) rwobject src_c/rwobject.c $(SDL) $(DEBUG) surface src_c/surface.c src_c/alphablit.c src_c/surface_fill.c $(SDL) $(DEBUG) surflock src_c/surflock.c $(SDL) $(DEBUG) time src_c/time.c $(SDL) $(DEBUG) joystick src_c/joystick.c $(SDL) $(DEBUG) draw src_c/draw.c $(SDL) $(DEBUG) image src_c/image.c $(SDL) $(DEBUG) transform src_c/transform.c src_c/rotozoom.c src_c/scale2x.c src_c/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64 mask src_c/mask.c src_c/bitmask.c $(SDL) $(DEBUG) bufferproxy src_c/bufferproxy.c $(SDL) $(DEBUG) pixelarray src_c/pixelarray.c $(SDL) $(DEBUG) math src_c/math.c $(SDL) $(DEBUG) pixelcopy src_c/pixelcopy.c $(SDL) $(DEBUG) newbuffer src_c/newbuffer.c $(SDL) $(DEBUG) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup.Emscripten.SDL2.in0000644000175100001770000000346214676242340021154 0ustar00runnerdocker# This work differently from the other templates #SDL = -D_REENTRANT -DSDL2 -lSDL2 #FONT = -lSDL2_ttf #IMAGE = -lSDL2_image #MIXER = -lSDL2_mixer #JPEG = -ljpeg #SCRAP = #PNG = -lpng #FREETYPE = -lfreetype -lharfbuzz DEBUG = # these can build alone and object files merged with ar _sdl2.sdl2 src_c/_sdl2/sdl2.c $(SDL) $(DEBUG) -Isrc_c _sdl2.audio src_c/_sdl2/audio.c $(SDL) $(DEBUG) -Isrc_c pygame_sdl2_video src_c/_sdl2/video.c src_c/pgcompat.c $(SDL) $(DEBUG) -Isrc_c _sdl2.video = src_c/void.c _sdl2.mixer src_c/_sdl2/mixer.c $(SDL) $(MIXER) $(DEBUG) -Isrc_c constants src_c/constants.c $(SDL) $(DEBUG) mask src_c/bitmask.c _sprite src_c/_sprite.c $(SDL) $(DEBUG) math src_c/math.c $(SDL) $(DEBUG) #GFX = src_c/SDL_gfx/SDL_gfxBlitFunc.c src_c/SDL_gfx/SDL_gfxPrimitives.c GFX = src_c/SDL_gfx/SDL_gfxPrimitives.c static src_c/static.c $(SDL) $(FREETYPE) $(FONT) $(MIXER) $(IMAGE) $(PNG) $(JPEG) $(DEBUG) # these should not be altered they already are in static.c merging file above time src_c/void.c _freetype src_c/void.c imageext src_c/void.c image src_c/void.c base src_c/void.c bufferproxy src_c/void.c color src_c/void.c controller src_c/void.c display src_c/void.c draw src_c/void.c event src_c/void.c font src_c/void.c gfxdraw src_c/void.c joystick src_c/void.c key src_c/void.c newbuffer src_c/void.c mixer_music src_c/void.c mixer src_c/void.c mouse src_c/void.c pixelcopy src_c/void.c pixelarray src_c/void.c surface src_c/void.c surflock src_c/void.c rect src_c/void.c rwobject src_c/void.c #_sdl2.controller src_c/_sdl2/controller.c $(SDL) $(DEBUG) -Isrc_c _sdl2.controller src_c/void.c #_sdl2.touch src_c/_sdl2/touch.c $(SDL) $(DEBUG) -Isrc_c _sdl2.touch src_c/void.c #transform src_c/transform.c src_c/rotozoom.c src_c/scale2x.c src_c/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64 transform src_c/void.c ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup.SDL2.in0000644000175100001770000000611714676242340017044 0ustar00runnerdocker#This Setup file is used by the setup.py script to configure the #python extensions. You will likely use the "config.py" which will #build a correct Setup file for you based on your system settings. #If not, the format is simple enough to edit by hand. First change #the needed commandline flags for each dependency, then comment out #any unavailable optional modules in the first optional section. #--StartConfig SDL = -I/usr/include -D_REENTRANT -DSDL2 -lSDL2 FONT = -lSDL2_ttf IMAGE = -lSDL2_image MIXER = -lSDL2_mixer PNG = -lpng JPEG = -ljpeg SCRAP = -lX11 PORTMIDI = -lportmidi PORTTIME = -lporttime FREETYPE = -lfreetype #--EndConfig DEBUG = #the following modules are optional. you will want to compile #everything you can, but you can ignore ones you don't have #dependencies for, just comment them out imageext src_c/imageext.c $(SDL) $(IMAGE) $(PNG) $(JPEG) $(DEBUG) font src_c/font.c $(SDL) $(FONT) $(DEBUG) mixer src_c/mixer.c $(SDL) $(MIXER) $(DEBUG) mixer_music src_c/music.c $(SDL) $(MIXER) $(DEBUG) scrap src_c/scrap.c $(SDL) $(SCRAP) $(DEBUG) pypm src_c/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) _sdl2.sdl2 src_c/_sdl2/sdl2.c $(SDL) $(DEBUG) -Isrc_c _sdl2.audio src_c/_sdl2/audio.c $(SDL) $(DEBUG) -Isrc_c _sdl2.video src_c/_sdl2/video.c src_c/pgcompat.c $(SDL) $(DEBUG) -Isrc_c _sdl2.mixer src_c/_sdl2/mixer.c $(SDL) $(MIXER) $(DEBUG) -Isrc_c _sdl2.touch src_c/_sdl2/touch.c $(SDL) $(DEBUG) -Isrc_c _sdl2.controller src_c/_sdl2/controller.c $(SDL) $(DEBUG) -Isrc_c GFX = src_c/SDL_gfx/SDL_gfxPrimitives.c #GFX = src_c/SDL_gfx/SDL_gfxBlitFunc.c src_c/SDL_gfx/SDL_gfxPrimitives.c gfxdraw src_c/gfxdraw.c $(SDL) $(GFX) $(DEBUG) #optional freetype module (do not break in multiple lines #or the configuration script will choke!) _freetype src_c/freetype/ft_cache.c src_c/freetype/ft_wrap.c src_c/freetype/ft_render.c src_c/freetype/ft_render_cb.c src_c/freetype/ft_layout.c src_c/freetype/ft_unicode.c src_c/_freetype.c $(SDL) $(FREETYPE) $(DEBUG) _sprite src_c/_sprite.c $(SDL) $(DEBUG) #these modules are required for pygame to run. they only require #SDL as a dependency. these should not be altered base src_c/base.c $(SDL) $(DEBUG) color src_c/color.c $(SDL) $(DEBUG) constants src_c/constants.c $(SDL) $(DEBUG) display src_c/display.c $(SDL) $(DEBUG) event src_c/event.c $(SDL) $(DEBUG) key src_c/key.c $(SDL) $(DEBUG) mouse src_c/mouse.c $(SDL) $(DEBUG) rect src_c/rect.c $(SDL) $(DEBUG) rwobject src_c/rwobject.c $(SDL) $(DEBUG) surface src_c/simd_blitters_sse2.c src_c/simd_blitters_avx2.c src_c/surface.c src_c/alphablit.c src_c/surface_fill.c $(SDL) $(DEBUG) surflock src_c/surflock.c $(SDL) $(DEBUG) time src_c/time.c $(SDL) $(DEBUG) joystick src_c/joystick.c $(SDL) $(DEBUG) draw src_c/draw.c $(SDL) $(DEBUG) image src_c/image.c $(SDL) $(DEBUG) transform src_c/transform.c src_c/rotozoom.c src_c/scale2x.c src_c/scale_mmx.c $(SDL) $(DEBUG) mask src_c/mask.c src_c/bitmask.c $(SDL) $(DEBUG) bufferproxy src_c/bufferproxy.c $(SDL) $(DEBUG) pixelarray src_c/pixelarray.c $(SDL) $(DEBUG) math src_c/math.c $(SDL) $(DEBUG) pixelcopy src_c/pixelcopy.c $(SDL) $(DEBUG) newbuffer src_c/newbuffer.c $(SDL) $(DEBUG) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup_Darwin.in0000644000175100001770000000030714676242340017640 0ustar00runnerdocker#This file defines platform specific modules for mac os x SCRAP = scrap src_c/scrap.c $(SDL) $(SCRAP) $(DEBUG) sdlmain_osx src_c/sdlmain_osx.m $(SDL) $(DEBUG) _camera src_c/_camera.c $(SDL) $(DEBUG) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup_Unix.in0000644000175100001770000000016314676242340017337 0ustar00runnerdocker#This file defines platform specific modules for linux _camera src_c/_camera.c src_c/camera_v4l2.c $(SDL) $(DEBUG) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup_Win_Camera.in0000644000175100001770000000005014676242340020414 0ustar00runnerdocker_camera src_c/_camera.c $(SDL) $(DEBUG) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/Setup_Win_Common.in0000644000175100001770000000010614676242340020456 0ustar00runnerdocker# Windows specific flags for Pygame modules. SCRAP = -luser32 -lgdi32 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/__init__.py0000644000175100001770000000000014676242340017003 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/__main__.py0000644000175100001770000000004014676242340016770 0ustar00runnerdockerfrom .config import main main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9891257 pygame-2.6.1/buildconfig/__pycache__/0000755000175100001770000000000014676242436017122 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.3981264 pygame-2.6.1/buildconfig/__pycache__/__init__.cpython-310.pyc0000644000175100001770000000022414676242435023357 0ustar00runnerdockero Df@sdS)Nrrr7/home/runner/work/pygame/pygame/buildconfig/__init__.pys././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.4001265 pygame-2.6.1/buildconfig/__pycache__/config.cpython-310.pyc0000644000175100001770000001455214676242435023076 0ustar00runnerdockero Df @sdZzddlZWneyddlmZYnwddlZddlZddlZddlZddlZddl Z dZ ddZ ddZ dd Z d d Zd d ZdddZedkrTedSdS)aQuick tool to help setup the needed paths and flags in your Setup file. This will call the appropriate sub-config scripts automatically. each platform config file only needs a "main" routine that returns a list of instances. the instances must contain the following variables. name: name of the dependency, as references in Setup (SDL, FONT, etc) inc_dir: path to include lib_dir: library directory lib: name of library to be linked to found: true if the dep is available cflags: extra compile flags N.cOstj|i|dS)z(Similar to the Python 3.0 print functionN)msysioprint_)argskwdsr5/home/runner/work/pygame/pygame/buildconfig/config.pyrsrcCsdtjvo tdtjdS)z%Return true if this in an MSYS2 buildZMSYSTEMzMSYS|MINGW.*|CLANG.*|UCRT.*)osenvironrematchrrrris_msys2$s r cCsdS)zReturn true if this in an MinGW/MSYS build The user may prompted for confirmation so only call this function once. Frrrrr is_msys_mingw*srcs|jr|jd|_|jD] }|jd|7_q n|jd|_d|jd|_|js?|jdkr=d|_d|jd|_d|_d S|rCd nd |rId nd |rQt|ndg}|jrtt|jtri|jd g}n fdd|jD}g}|j rt|j tr|j d g}n fdd|j D}d}|jD]}|d|7}q|j dr|j|d ||_d S|jdd |d |d|j ||_d S)zadd some vars to a depz =z -lz = -I.$()ZSDLz5SDL = -I/NEED_INC_PATH_FIX -L/NEED_LIB_PATH_FIX -lSDLNz -I$(BASE)z -Iz -L$(BASE)z -Lrcg|] }|dqSNr.0dir)IPREFIXstartindrr Rzprepdep..crrrr)LPREFIXrrrrXrCOPYLIB_ ) libsnamelinevarnamefoundleninc_dir isinstancestrZlib_dir startswithjoincflags)depbasepathlibZincsZlidsrr)rrrrprepdep8s@          2r.c CsPtjtdd}t|}ttjtdd}d}|ddkr2|||}|ddks"|ddkrD|}|ddks9|rO|d |d |D] }||jd qQ| }g} |D]&} d } | } |D]} | }|r| r|d | d krd } qn| r| | qd| || }d d|D}| d|D]\}d }|ds|r|d dksttd|tj}||r|d|d }|r|D]}|j|vr|jsd }|d|nq|r| d| dd d|r||qWdn1swYWddSWddS1s!wYdS)z'create a modified copy of Setup.SDLx.in buildconfigz Setup.SDL2.inSetupwrz#--StartConfigz #--EndConfigzBASE =  rrcSsh|]}|jqSr)r")rdrrr sz!writesetupfile..z$(DEBUG)ZCOPYLIB#z \$\([\w]+\)r=rN)r pathr) BASE_PATHopenfindwritereadliner! readlinessplitappendextendaddr(setr findallI differencer"r#strip)depsr,Zadditional_linesZsdl_setup_filenameZ origsetupZnewsetupr!r4linesZ new_lineslZadditpartsZalZapartsZ legalVarsZuseitZlineDepsrrrwritesetupfilebsr         TrLFc Cs0g}dtjv}tjtd}tjtd}dtjvr tjddtjvr)tdi}|rGtdzddl }Wnt yFddl m }Ynwtj d krtj d krntrntd zddl}Wnt ymddlm}Ynuwtd zddl}Wnit yddlm}Yn[wtj d krtdzddl}WnJt yddlm}Ynisfilelogginginfoshutilcopyfile Exceptionerrormainr.rL) autoZadditional_platform_setupZconanZ setup_pathZ backup_pathrZCFGerHr,r4rrrrbs                         rb__main__)F)__doc__rrVZbuildconfig.msysiorRr r^r\rYr r9rr rr.rLrb__name__rrrrs&   * ;\ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.4041264 pygame-2.6.1/buildconfig/__pycache__/config_unix.cpython-310.pyc0000644000175100001770000001653714676242435024146 0ustar00runnerdockero Dfm'@sdZddlZddlmZddlZddlZddlmZejddZ e dZ ejdd r5ejd d Z ngZ ejd d rFe ejd e d Gd ddZGdddZGdddZdZdddZedkrqeddSdS)zConfig on UnixN)glob)get_path SDL_CONFIGz sdl-configz --version --cflags --libsZPYGAME_EXTRA_BASE:Z LOCALBASE)z/usrz /usr/localc@seZdZdddZddZdS)DependencyProg --versionc Cs||_tj||}d|_d|_g|_d|_zt|d| t|d t|d }|rtdddd gSd S) z returns the porttime Dependency. On some distributions, such as Fedora, porttime is compiled into portmidi. On others, such as Debian, it is a separate library. TZPORTMIDI_INC_PORTTIME)1TrueFz/etc/redhat-releaseZPORTTIMEz porttime.hlibportmidi.soportmidizlibporttime.soZporttimeN)rrrrAexistsr;r#)Zportmidi_as_porttimeZ inc_porttimedepr.r.r/get_porttime_deps   zmain..get_porttime_depcSs@tdddddgd}|jr|Stdddddgd }|jr|S|S) zW modern freetype uses pkg-config. However, some older systems don't have that. ZFREETYPEZFREETYPE_CONFIGzpkg-config freetype22.0Z freetype2z --modversionzfreetype-configfreetypez --ftversion)rr#)Z pkg_configZfreetype_configr.r.r/ find_freetypeszmain..find_freetyperrz sdl2-configrVZsdlZFONTz SDL_ttf.hzlibSDL2_ttf.soZSDL2_ttfZIMAGEz SDL_image.hzlibSDL2_image.soZ SDL2_imageZMIXERz SDL_mixer.hzlibSDL2_mixer.soZ SDL2_mixerZPNGzpng.hZlibpngZpngZJPEGz jpeglib.hZlibjpegZjpegZSCRAPZlibX11ZX11ZFreeBSDZGNUZPORTMIDIz portmidi.hrQrRrzWUnable to run "sdl-config". Please make sure a development version of SDL is installed.cg|]}|qSr.r..0dZ extrabaser.r/ zmain..crYr.r.rZr]r.r/r^r_r rrr z(Some pygame dependencies were not found.zSome pygame dependencies were not found. Pygame can still compile and install, but games that depend on those missing dependencies will not run. Use -auto to continue building without all dependencies. zMissing dependencies)Z origincdirsZ origlibdirsrr Exceptionreadr!closeappendrrr%rr;extendplatformsystemr# RuntimeError extrabasesrr5logginginfowarning SystemExit) auto_configcmdr,stdoutrUrXZDEPSZ is_freebsdZis_hurdZ porttime_depr3rEargr\r.r]r/mains         rq__main__z\This is the configuration subscript for Unix. Please run "config.py" for full configuration.)F)__doc__rrreri sysconfigrrrZ configcommandrrhrcrdrr;rGZ sdl_lib_namerqr7r%r.r.r.r/s.   2#  ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.4011264 pygame-2.6.1/buildconfig/__pycache__/msysio.cpython-310.pyc0000644000175100001770000000207014676242435023144 0ustar00runnerdockero Df@s0dZddlZddlZddgZddZddZdS)z?Provide helpful routines for interactive IO on the MSYS consoleNprint_is_msyscOsv|dtj}|dd}|dd}|r"||dd|D|r)||z|WdSty:YdSw) zcPrint arguments in an MSYS console friendly way Keyword arguments: file, sep, end filesep end cSsg|]}t|qS)str).0argr r 5/home/runner/work/pygame/pygame/buildconfig/msysio.py szprint_..N)getsysstdoutwritejoinflushAttributeError)argskwdsstreamrrr r r rs    cCs&ztjddkWStyYdSw)z0Return true if the execution environment is MSYSTERMcygwinF)osenvironKeyErrorr r r r r#s  )__doc__rr__all__rrr r r r s  ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.963112 pygame-2.6.1/buildconfig/bundle_docs.py0000644000175100001770000000412314676242340017537 0ustar00runnerdocker#! /usr/bin/env python """Tar-zip the pygame documents and examples. Run this script from the pygame source root directory. """ import os import tarfile import re def add_files(bundle, root, alias, file_names): """Add files to the bundle.""" for file_name in file_names: file_alias = os.path.join(alias, file_name) print(f" {file_name} --> {file_alias}") bundle.add(os.path.join(root, file_name), file_alias) def add_directory(bundle, root, alias): """Recursively add a directory, subdirectories, and files to the bundle.""" reject_dirs = re.compile(r'(.svn)$') # Since it is the file extension that is of interest the reversed # file name is checked. reject_files_reversed = re.compile(r'((~.*)|(cyp\..*))') for sub_root, directories, files in os.walk(root): directories[:] = [ d for d in directories if reject_dirs.match(d) is None] files[:] = [ f for f in files if reject_files_reversed.match(f[-1::-1]) is None] sub_alias = os.path.join(alias, sub_root[len(root)+1:]) add_files(bundle, sub_root, sub_alias, files) def main(): """Create a tar-zip file containing the pygame documents and examples.""" with open('setup.py') as setup: match = re.search(r'"version":[ \t]+"([0-9]+\.[0-9]+)\.[^"]+"', setup.read()) if match is None: print("*** Unable to find the pygame version data in setup.py") version = '' else: version = f'-{match.group(1)}' bundle_name = f'pygame{version}-docs-and-examples.tar.gz' print(f"Creating bundle {bundle_name}") with tarfile.open(bundle_name, 'w:gz') as bundle: root = os.path.abspath('.') alias = 'pygame' add_files(bundle, root, alias, ['README.rst']) add_directory(bundle, os.path.join(root, 'docs'), os.path.join(alias, 'docs')) add_directory(bundle, os.path.join(root, 'examples'), os.path.join(alias, 'examples')) print(f"\nFinished {bundle_name}") if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9891257 pygame-2.6.1/buildconfig/conanconf/0000755000175100001770000000000014676242436016656 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/conanconf/README.md0000644000175100001770000000505414676242340020133 0ustar00runnerdockerA config script which uses the cross platform "conan" package manager for managing dependencies. ## links - [conan](https://conan.io/) the C/C++ package manager. - [virtualrunenv generator docs](https://docs.conan.io/en/latest/mastering/virtualenv.html#virtualrunenv-generator) for adding library paths (libsdl.so etc) to your environment. - [json generator docs](https://docs.conan.io/en/latest/reference/generators/json.html) - [conanfile.txt docs](https://docs.conan.io/en/latest/reference/conanfile_txt.html) the dependency file is called `conanfile.txt` ## Files - `buildconfig/conanconf` - `buildconfig/conanconf/README.md` this file - `buildconfig/conanconf/conanfile.txt` dependencies - `buildconfig/config_conan.py` integrating conan with pygame build system. - `build/conan/` (temporary generated files) ## How to compile using conan. ```bash # install conan python3 -m pip install conan # add the bincrafters conan repository. conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan # add the pygame conan repository. conan remote add pygame-repo https://api.bintray.com/conan/pygame/pygame # install dependencies with conan, and write a `Setup` file for pygame to build with. python3 buildconfig/config.py -conan # add conan library paths to your environment using virtualrunenv source build/conan/activate_run.sh # Windows: activate_run.bat without the source # now install pygame either with setup install, or make a wheel. python3 setup.py install # OR create the wheel # python3 setup.py bdist_wheel # OSX only: bundle the libraries with the wheels using `delocate` # python3 -m pip install delocate --user # delocate-wheel -v dist/*.whl # or install install the pygame wheel file # python3 -m pip install dist/*.whl --user # test the build python3 -m pygame.example.aliens python3 -m pygame.tests ``` ## pygame conan repo on 'bintray'. Here's the pygame organization on "[bintray.com/pygame](https://bintray.com/pygame)". It's where some conan packages can be uploaded. Custom packages are useful to work around major bugs in released dependencies that may not have new releases with the fixes in them for several months. Another use case for a conan repo is uploading binaries. In order to make a custom package, I started by [setting up bintray](https://docs.conan.io/en/latest/uploading_packages/using_bintray.html) Then this one for [uploading packages to remotes](https://docs.conan.io/en/latest/uploading_packages/uploading_to_remotes.html) ## upload packages to bintray ``` conan upload portmidi/217 --all -r=pygame-repo ``` ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/conanconf/conanfile.txt0000644000175100001770000000060614676242340021351 0ustar00runnerdocker[requires] libpng/1.6.37 zlib/1.2.11 freetype/2.10.1 sdl2/2.0.14@pygame/testing sdl2_image/2.0.5@bincrafters/stable sdl2_mixer/2.0.4@bincrafters/stable sdl2_ttf/2.0.15@bincrafters/stable portmidi/217@demo/testing [generators] json virtualrunenv [options] sdl2:shared=True sdl2_image:shared=True sdl2_mixer:shared=True sdl2_ttf:shared=True [imports] bin, *.dll -> ./ lib, *.dylib* -> ./ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config.py0000644000175100001770000002025314676242340016525 0ustar00runnerdocker#!/usr/bin/env python """Quick tool to help setup the needed paths and flags in your Setup file. This will call the appropriate sub-config scripts automatically. each platform config file only needs a "main" routine that returns a list of instances. the instances must contain the following variables. name: name of the dependency, as references in Setup (SDL, FONT, etc) inc_dir: path to include lib_dir: library directory lib: name of library to be linked to found: true if the dep is available cflags: extra compile flags """ try: import msysio except ImportError: import buildconfig.msysio as msysio import sys, os, shutil, logging import sysconfig import re BASE_PATH = '.' def print_(*args, **kwds): """Similar to the Python 3.0 print function""" # This not only supports MSYS but is also a head start on the move to # Python 3.0. Also, this function can be overridden for testing. msysio.print_(*args, **kwds) def is_msys2(): """Return true if this in an MSYS2 build""" return ('MSYSTEM' in os.environ and re.match(r'MSYS|MINGW.*|CLANG.*|UCRT.*', os.environ['MSYSTEM'])) def is_msys_mingw(): """Return true if this in an MinGW/MSYS build The user may prompted for confirmation so only call this function once. """ return False # if msysio.is_msys(): # return 1 # if ('MINGW_ROOT_DIRECTORY' in os.environ or # os.path.isfile(mingwcfg.path)): # return confirm("Is this an mingw/msys build") # return 0 def prepdep(dep, basepath): """add some vars to a dep""" if dep.libs: dep.line = dep.name + ' =' for lib in dep.libs: dep.line += ' -l' + lib else: dep.line = dep.name + ' = -I.' dep.varname = '$('+dep.name+')' if not dep.found: if dep.name == 'SDL': #fudge if this is unfound SDL dep.line = 'SDL = -I/NEED_INC_PATH_FIX -L/NEED_LIB_PATH_FIX -lSDL' dep.varname = '$('+dep.name+')' dep.found = 1 return IPREFIX = ' -I$(BASE)' if basepath else ' -I' LPREFIX = ' -L$(BASE)' if basepath else ' -L' startind = len(basepath) if basepath else 0 incs = [] if dep.inc_dir: if isinstance(dep.inc_dir, str): incs = [IPREFIX+dep.inc_dir[startind:]] else: incs = [IPREFIX+dir[startind:] for dir in dep.inc_dir] lids = [] if dep.lib_dir: if isinstance(dep.lib_dir, str): lids = [LPREFIX+dep.lib_dir[startind:]] else: lids = [LPREFIX+dir[startind:]for dir in dep.lib_dir] libs = '' for lib in dep.libs: libs += ' -l' + lib if dep.name.startswith('COPYLIB_'): dep.line = dep.name + libs + ''.join(lids) else: dep.line = dep.name+' =' + ''.join(incs) + ''.join(lids) + ' ' + dep.cflags + libs def writesetupfile(deps, basepath, additional_lines): """create a modified copy of Setup.SDLx.in""" sdl_setup_filename = os.path.join(BASE_PATH, 'buildconfig', 'Setup.SDL2.in') with open(sdl_setup_filename) as origsetup, \ open(os.path.join(BASE_PATH, 'Setup'), 'w') as newsetup: line = '' while line.find('#--StartConfig') == -1: newsetup.write(line) line = origsetup.readline() while line.find('#--EndConfig') == -1: line = origsetup.readline() if basepath: newsetup.write('BASE = ' + basepath + '\n') for d in deps: newsetup.write(d.line + '\n') lines = origsetup.readlines() # overwrite lines which already exist with new ones. new_lines = [] for l in lines: addit = 1 parts = l.split() for al in additional_lines: aparts = al.split() if (aparts and parts) and (aparts[0] == parts[0]): #print('the same!' + repr(aparts) + repr(parts)) #the same, we should not add the old one. #It will be overwritten by the new one. addit = 0 if addit: new_lines.append(l) new_lines.extend(additional_lines) lines = new_lines legalVars = {d.varname for d in deps} legalVars.add('$(DEBUG)') for line in lines: useit = 1 if not line.startswith('COPYLIB') and not (line and line[0]=='#'): lineDeps = set(re.findall(r'\$\([\w]+\)', line, re.I)) if lineDeps.difference(legalVars): newsetup.write('#'+line) useit = 0 if useit: for d in deps: if d.varname in lineDeps and not d.found: useit = 0 newsetup.write('#'+line) break if useit: legalVars.add(f"$({line.split('=')[0].strip()})") if useit: newsetup.write(line) def main(auto=False): additional_platform_setup = [] conan = "-conan" in sys.argv setup_path = os.path.join(BASE_PATH, 'Setup') backup_path = os.path.join(BASE_PATH, 'Setup.bak') if '-sdl2' in sys.argv: sys.argv.remove('-sdl2') if '-sdl1' in sys.argv: raise SystemExit("""Building PyGame with SDL1.2 is no longer supported. Only SDL2 is supported now.""") kwds = {} if conan: print_('Using CONAN configuration...\n') try: import config_conan as CFG except ImportError: import buildconfig.config_conan as CFG elif sys.platform == 'win32': if sys.version_info >= (3, 8) and is_msys2(): print_('Using WINDOWS MSYS2 configuration...\n') try: import config_msys2 as CFG except ImportError: import buildconfig.config_msys2 as CFG else: print_('Using WINDOWS configuration...\n') try: import config_win as CFG except ImportError: import buildconfig.config_win as CFG elif sys.platform == 'darwin': print_('Using Darwin configuration...\n') try: import config_darwin as CFG except ImportError: import buildconfig.config_darwin as CFG elif sysconfig.get_config_var('MACHDEP') == 'emscripten': print_('Using Emscripten configuration...\n') try: import config_emsdk as CFG except ImportError: import buildconfig.config_emsdk as CFG else: print_('Using UNIX configuration...\n') try: import config_unix as CFG except ImportError: import buildconfig.config_unix as CFG if sys.platform == 'win32': additional_platform_setup = open( os.path.join(BASE_PATH, 'buildconfig', "Setup_Win_Camera.in")).readlines() if sys.platform == 'darwin': additional_platform_setup = open( os.path.join(BASE_PATH, 'buildconfig', "Setup_Darwin.in")).readlines() elif sysconfig.get_config_var('MACHDEP') == 'emscripten': additional_platform_setup = open( os.path.join(BASE_PATH, 'buildconfig', "Setup.Emscripten.SDL2.in")).readlines() else: additional_platform_setup = open( os.path.join(BASE_PATH, 'buildconfig', "Setup_Unix.in")).readlines() if os.path.isfile(setup_path) and auto: try: logging.info('Backing up existing "Setup" file into Setup.bak') shutil.copyfile(setup_path, backup_path) except Exception as e: logging.error(f"Failed to backup 'Setup' file: {e}") deps = CFG.main(**kwds, auto_config=auto) if '-conan' in sys.argv: sys.argv.remove('-conan') if deps: basepath = None for d in deps: prepdep(d, basepath) writesetupfile(deps, basepath, additional_platform_setup, **kwds) print_("""\nIf you get compiler errors during install, double-check the compiler flags in the "Setup" file.\n""") else: print_("""\nThere was an error creating the Setup file, check for errors or make a copy of "Setup.in" and edit by hand.""") if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config_conan.py0000644000175100001770000000530514676242340017704 0ustar00runnerdocker"""Config with conan package manager. """ import os import sys import subprocess import json class Dependency: def __init__(self, conanbuildinfo, name, conan_name, extra_libs=None): self.name = name self.inc_dir = None self.lib_dir = None self.libs = None self.found = 0 self.cflags = '' infos = [info for info in conanbuildinfo['dependencies'] if info['name'] == conan_name] if infos: info = infos[0] self.found = 1 self.lib_dir = info['lib_paths'][:] self.libs = info['libs'][:] self.inc_dir = info['include_paths'][:] if info["frameworks"]: for n in info["frameworks"]: # -Xlinker is a weird thing for distutils.extension.read_setup_file # so that it can pass things through to the linker from the Setup file. self.cflags += (f' -Xlinker "-framework" -Xlinker "{n}"') if extra_libs is not None: self.libs.extend(extra_libs) def conan_install(force_build=True): """ """ build_dir = os.path.join('build', 'conan') if not os.path.exists(build_dir): if not os.path.exists('build'): os.mkdir('build') os.mkdir(build_dir) os.chdir(build_dir) cmd = [ "conan", "install", os.path.join('..', '..', 'buildconfig', 'conanconf'), ] if force_build: cmd.append("--build") if '-conan' in sys.argv: other_args = sys.argv[sys.argv.index('-conan')+1:] cmd.extend(other_args) print(cmd) try: return subprocess.call(cmd) finally: os.chdir(os.path.join('..', '..')) def main(sdl2=True, auto_config=False): # conan_install(force_build=True) # Reuse the previous conan build with this setting: conan_install(force_build=False) conanbuildinfo_json = os.path.join('build', 'conan', 'conanbuildinfo.json') conanbuildinfo = json.load(open(conanbuildinfo_json)) DEPS = [ Dependency(conanbuildinfo, "SDL", "sdl2"), Dependency(conanbuildinfo, "FONT", "sdl2_ttf"), Dependency(conanbuildinfo, "IMAGE", "sdl2_image"), Dependency(conanbuildinfo, "MIXER", "sdl2_mixer"), Dependency(conanbuildinfo, "PNG", "libpng"), Dependency(conanbuildinfo, "JPEG", "libjpeg"), Dependency(conanbuildinfo, "FREETYPE", "freetype"), Dependency(conanbuildinfo, "PORTMIDI", "portmidi"), Dependency(conanbuildinfo, "PORTTIME", "portmidi"), ] return DEPS if __name__ == '__main__': print("""This is the configuration subscript for the Conan package manager. Please run "config.py" for full configuration.""") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config_darwin.py0000644000175100001770000001344414676242340020075 0ustar00runnerdocker"""Config on Darwin w/ frameworks""" import os from sysconfig import get_path try: from config_unix import DependencyProg except ImportError: from buildconfig.config_unix import DependencyProg class Dependency: libext = '.dylib' def __init__(self, name, checkhead, checklib, libs): self.name = name self.inc_dir = None self.lib_dir = None self.libs = libs self.found = 0 self.checklib = checklib if self.checklib: self.checklib += self.libext self.checkhead = checkhead self.cflags = '' def configure(self, incdirs, libdirs): incnames = self.checkhead libnames = self.checklib, self.name.lower() for dir in incdirs: if isinstance(incnames, str): incnames = [incnames] for incname in incnames: path = os.path.join(dir, incname) if os.path.isfile(path): self.inc_dir = os.path.dirname(path) break for dir in libdirs: for name in libnames: path = os.path.join(dir, name) if os.path.isfile(path): self.lib_dir = dir break if self.inc_dir and (self.lib_dir or not self.checklib): print(self.name + ' '[len(self.name):] + ': found') self.found = 1 else: print(self.name + ' '[len(self.name):] + ': not found') class FrameworkDependency(Dependency): def configure(self, incdirs, libdirs): BASE_DIRS = '/', os.path.expanduser('~/'), '/System/' for n in BASE_DIRS: n += 'Library/Frameworks/' fmwk = n + self.libs + '.framework/Versions/Current/' if os.path.isdir(fmwk): print('Framework ' + self.libs + ' found') self.found = 1 self.inc_dir = fmwk + 'Headers' self.cflags = ( f'-Xlinker "-framework" -Xlinker "{self.libs}"' + f' -Xlinker "-F{n}"') self.origlib = self.libs self.libs = '' return print('Framework ' + self.libs + ' not found') class DependencyPython: def __init__(self, name, module, header): self.name = name self.lib_dir = '' self.inc_dir = '' self.libs = [] self.cflags = '' self.found = 0 self.ver = '0' self.module = module self.header = header def configure(self, incdirs, libdirs): self.found = 1 if self.module: try: self.ver = __import__(self.module).__version__ except ImportError: self.found = 0 if self.found and self.header: fullpath = os.path.join(get_path('include'), self.header) if not os.path.isfile(fullpath): self.found = 0 else: self.inc_dir = os.path.split(fullpath)[0] if self.found: print(self.name + ' '[len(self.name):] + ': found', self.ver) else: print(self.name + ' '[len(self.name):] + ': not found') def find_freetype(): """ modern freetype uses pkg-config. However, some older systems don't have that. """ pkg_config = DependencyProg( 'FREETYPE', 'FREETYPE_CONFIG', 'pkg-config freetype2', '2.0', ['freetype2'], '--modversion' ) if pkg_config.found: return pkg_config #DependencyProg('FREETYPE', 'FREETYPE_CONFIG', '/usr/X11R6/bin/freetype-config', '2.0', freetype_config = DependencyProg( 'FREETYPE', 'FREETYPE_CONFIG', 'freetype-config', '2.0', ['freetype'], '--ftversion' ) if freetype_config.found: return freetype_config return pkg_config def main(auto_config=False): DEPS = [ [DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])], [Dependency('FONT', ['SDL_ttf.h', 'SDL2/SDL_ttf.h'], 'libSDL2_ttf', ['SDL2_ttf'])], [Dependency('IMAGE', ['SDL_image.h', 'SDL2/SDL_image.h'], 'libSDL2_image', ['SDL2_image'])], [Dependency('MIXER', ['SDL_mixer.h', 'SDL2/SDL_mixer.h'], 'libSDL2_mixer', ['SDL2_mixer'])], ] DEPS.extend([ Dependency('PNG', 'png.h', 'libpng', ['png']), Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']), Dependency('PORTMIDI', 'portmidi.h', 'libportmidi', ['portmidi']), Dependency('PORTTIME', 'porttime.h', '', []), find_freetype(), # Scrap is included in sdlmain_osx, there is nothing to look at. # Dependency('SCRAP', '','',[]), ]) print('Hunting dependencies...') incdirs = ['/usr/local/include', '/opt/homebrew/include'] incdirs.extend(['/usr/local/include/SDL2', '/opt/homebrew/include/SDL2', '/opt/local/include/SDL2']) incdirs.extend([ #'/usr/X11/include', '/opt/local/include', '/opt/local/include/freetype2/freetype'] ) #libdirs = ['/usr/local/lib', '/usr/X11/lib', '/opt/local/lib'] libdirs = ['/usr/local/lib', '/opt/local/lib', '/opt/homebrew/lib'] for d in DEPS: if isinstance(d, (list, tuple)): for deptype in d: deptype.configure(incdirs, libdirs) else: d.configure(incdirs, libdirs) for d in DEPS: if type(d)==list: found = False for deptype in d: if deptype.found: found = True DEPS[DEPS.index(d)] = deptype break if not found: DEPS[DEPS.index(d)] = d[0] DEPS[0].cflags = '-Ddarwin '+ DEPS[0].cflags return DEPS if __name__ == '__main__': print("""This is the configuration subscript for OSX Darwin. Please run "config.py" for full configuration.""") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config_msys2.py0000644000175100001770000004414514676242340017670 0ustar00runnerdocker"""Config on MSYS2""" # The search logic is adapted from config_win. # This assumes that the PyGame dependencies are resolved # by MSYS2 packages. try: from setup_win_common import get_definitions except ImportError: from buildconfig.setup_win_common import get_definitions import os import sys import re import logging import subprocess from glob import glob from sysconfig import get_path def get_ptr_size(): return 64 if sys.maxsize > 2**32 else 32 def as_machine_type(size): """Return pointer bit size as a Windows machine type""" if size == 32: return "x86" if size == 64: return "x64" raise ValueError("Unknown pointer size {}".format(size)) def get_machine_type(): return as_machine_type(get_ptr_size()) def get_absolute_win_path(msys2_path): output = subprocess.run(['cygpath', '-w', msys2_path], capture_output=True, text=True) if output.returncode != 0: raise Exception(f"Could not get absolute Windows path: {msys2_path}") else: return output.stdout.strip() class Dependency: huntpaths = ['..', '../..', '../*', '../../*'] inc_hunt = ['include'] lib_hunt = ['lib'] check_hunt_roots = True def __init__(self, name, wildcards, libs=None, required=0, find_header='', find_lib=''): if libs is None: libs = [] self.name = name self.wildcards = wildcards self.required = required self.paths = [] self.path = None self.inc_dir = None self.lib_dir = None self.find_header = find_header if not find_lib and libs: # Windows dllimport libs (.lib) are called .dll.a in MSYS2 self.find_lib = r"lib%s\.dll\.a" % re.escape(libs[0]) else: self.find_lib = find_lib self.libs = libs self.found = False self.cflags = '' self.prune_info = [] self.fallback_inc = None self.fallback_lib = None def hunt(self): parent = os.path.abspath('..') for p in self.huntpaths: # for w in self.wildcards: # found = glob(os.path.join(p, w)) found = glob(p) found.sort() or found.reverse() #reverse sort for f in found: if f[:5] == '..'+os.sep+'..' and \ os.path.abspath(f)[:len(parent)] == parent: continue if os.path.isdir(f): self.paths.append(f) def choosepath(self, print_result=True): if not self.paths: if self.fallback_inc and not self.inc_dir: self.inc_dir = self.fallback_inc[0] if self.fallback_lib and not self.lib_dir: self.lib_dir = self.fallback_lib[0] # MSYS2: lib.dll.a -> self.libs[0] = os.path.splitext(self.fallback_lib[2])[0].lstrip('lib').rstrip('.dll') if self.inc_dir and self.lib_dir: if print_result: print(f"Path for {self.name} found.") return True if print_result: print(f"Path for {self.name} not found.") for info in self.prune_info: print(info) if self.required: print('Too bad that is a requirement! Hand-fix the "Setup"') return False elif len(self.paths) == 1: self.path = self.paths[0] if print_result: print(f"Path for {self.name}: {self.path}") else: logging.warning("Multiple paths to choose from:%s", self.paths) self.path = self.paths[0] if print_result: print(f"Path for {self.name}: {self.path}") return True def matchfile(self, path, match): try: entries = os.listdir(path) except OSError: pass else: for e in entries: if match(e) and os.path.isfile(os.path.join(path, e)): return e def findhunt(self, base, paths, header_match=None, lib_match=None): for h in paths: hh = os.path.join(base, h) if header_match: header_file = self.matchfile(hh, header_match) if not header_file: continue else: header_file = None if lib_match: lib_file = self.matchfile(hh, lib_match) if not lib_file: continue else: lib_file = None if os.path.isdir(hh): return hh.replace('\\', '/'), header_file, lib_file def prunepaths(self): lib_match = re.compile(self.find_lib, re.I).match if self.find_lib else None header_match = re.compile(self.find_header, re.I).match if self.find_header else None prune = [] for path in self.paths: inc_info = self.findhunt(path, Dependency.inc_hunt, header_match=header_match) lib_info = self.findhunt(path, Dependency.lib_hunt, lib_match=lib_match) if not inc_info or not lib_info: if inc_info: self.prune_info.append('...Found include dir but no library dir in %s.' % ( path)) self.fallback_inc = inc_info if lib_info: self.prune_info.append('...Found library dir but no include dir in %s.' % ( path)) self.fallback_lib = lib_info prune.append(path) else: self.inc_dir = inc_info[0] self.lib_dir = lib_info[0] # MSYS2: lib.dll.a -> self.libs[0] = os.path.splitext(lib_info[2])[0].lstrip('lib').rstrip('.dll') self.paths = [p for p in self.paths if p not in prune] def configure(self): self.hunt() # In config MSYS2, huntpaths always includes a root # if self.check_hunt_roots: # self.paths.extend(self.huntpaths) self.prunepaths() self.choosepath() if self.path: lib_match = re.compile(self.find_lib, re.I).match if self.find_lib else None header_match = re.compile(self.find_header, re.I).match if self.find_header else None inc_info = self.findhunt(self.path, Dependency.inc_hunt, header_match=header_match) lib_info = self.findhunt(self.path, Dependency.lib_hunt, lib_match=lib_match) if inc_info: self.inc_dir = inc_info[0] if lib_info: self.lib_info = lib_info[0] if lib_info[2]: # MSYS2: lib.dll.a -> self.libs[0] = os.path.splitext(lib_info[2])[0].lstrip('lib').rstrip('.dll') if self.lib_dir and self.inc_dir: print(f"...Library directory for {self.name}: {self.lib_dir}") print(f"...Include directory for {self.name}: {self.inc_dir}") self.found = True class DependencyPython: def __init__(self, name, module, header): self.name = name self.lib_dir = '' self.inc_dir = '' self.libs = [] self.cflags = '' self.found = False self.ver = '0' self.module = module self.header = header def configure(self): self.found = True if self.module: try: self.ver = __import__(self.module).__version__ except ImportError: self.found = False if self.found and self.header: fullpath = os.path.join(get_path('include'), self.header) if not os.path.isfile(fullpath): self.found = False else: self.inc_dir = os.path.split(fullpath)[0] if self.found: print("%-8.8s: found %s" % (self.name, self.ver)) else: print("%-8.8s: not found" % self.name) class DependencyDLL(Dependency): def __init__(self, dll_regex, lib=None, wildcards=None, libs=None, link=None): if lib is None: lib = link.libs[0] Dependency.__init__(self, 'COPYLIB_' + lib, wildcards, libs) self.lib_name = lib self.test = re.compile(dll_regex, re.I).match self.lib_dir = '_' self.link = link def configure(self): if not self.path: if (self.link is None or not self.link.path) and self.wildcards: self.hunt() self.choosepath(print_result=False) else: self.path = self.link.path if self.path is not None: self.hunt_dll(self.lib_hunt, self.path) elif self.check_hunt_roots: self.check_roots() if self.lib_dir != '_': print(f"DLL for {self.lib_name}: {self.lib_dir}") self.found = True else: print(f"No DLL for {self.lib_name}: not found!") if self.required: print('Too bad that is a requirement! Hand-fix the "Setup"') def check_roots(self): for p in self.huntpaths: if self.hunt_dll(self.lib_hunt, p): return True return False def hunt_dll(self, search_paths, root): for dir in search_paths: path = os.path.join(root, dir) try: entries = os.listdir(path) except OSError: pass else: for e in entries: if self.test(e) and os.path.isfile(os.path.join(path, e)): # Found self.lib_dir = os.path.join(path, e).replace('\\', '/') return True return False class DependencyDummy: def __init__(self, name): self.name = name self.inc_dir = None self.lib_dir = None self.libs = [] self.found = True self.cflags = '' def configure(self): pass class DependencyWin: def __init__(self, name, cflags): self.name = name self.inc_dir = None self.lib_dir = None self.libs = [] self.found = True self.cflags = cflags def configure(self): pass class DependencyGroup: def __init__(self): self.dependencies =[] self.dlls = [] def add(self, name, lib, wildcards, dll_regex, libs=None, required=0, find_header='', find_lib=''): if libs is None: libs = [] if dll_regex: dep = Dependency(name, wildcards, [lib], required, find_header, find_lib) self.dependencies.append(dep) dll = DependencyDLL(dll_regex, link=dep, libs=libs) self.dlls.append(dll) dep.dll = dll else: dep = Dependency(name, wildcards, [lib] + libs, required, find_header, find_lib) self.dependencies.append(dep) return dep def add_win(self, name, cflags): self.dependencies.append(DependencyWin(name, cflags)) def add_dll(self, dll_regex, lib=None, wildcards=None, libs=None, link_lib=None): link = None if link_lib is not None: name = 'COPYLIB_' + link_lib for d in self.dlls: if d.name == name: link = d break else: raise KeyError(f"Link lib {link_lib} not found") dep = DependencyDLL(dll_regex, lib, wildcards, libs, link) self.dlls.append(dep) return dep def add_dummy(self, name): self.dependencies.append(DependencyDummy(name)) def find(self, name): for dep in self: if dep.name == name: return dep def configure(self): for d in self.dependencies: if not getattr(d, '_configured', False): d.configure() d._configured = True for d in self.dlls: if not getattr(d, '_configured', False): d.configure() d._configured = True # create a lib if d.found and d.link and not d.link.lib_dir: try: from . import vstools except ImportError: from buildconfig import vstools from os.path import splitext nonext_name = splitext(d.lib_dir)[0] def_file = f'{nonext_name}.def' basename = os.path.basename(nonext_name) print(f'Building lib from {os.path.basename(d.lib_dir)}: {basename}.lib...') vstools.dump_def(d.lib_dir, def_file=def_file) vstools.lib_from_def(def_file) d.link.lib_dir = os.path.dirname(d.lib_dir) d.link.libs[0] = basename d.link.configure() def __iter__(self): yield from self.dependencies yield from self.dlls def _add_sdl2_dll_deps(DEPS): # MIXER DEPS.add_dll(r'(libvorbis-0|vorbis)\.dll$', 'vorbis', ['libvorbis-[1-9].*'], ['ogg']) DEPS.add_dll(r'(libvorbisfile-3|vorbisfile)\.dll$', 'vorbisfile', link_lib='vorbis', libs=['vorbis']) DEPS.add_dll(r'(libogg-0|ogg)\.dll$', 'ogg', ['libogg-[1-9].*']) DEPS.add_dll(r'(lib)?FLAC[-0-9]*\.dll$', 'flac', ['*FLAC-[0-9]*']) DEPS.add_dll(r'(lib)?modplug[-0-9]*\.dll$', 'modplug', ['*modplug-[0-9]*']) DEPS.add_dll(r'(lib)?mpg123[-0-9]*\.dll$', 'mpg123', ['*mpg123-[0-9]*']) DEPS.add_dll(r'(lib)?opus[-0-9]*\.dll$', 'opus', ['*opus-[0-9]*']) DEPS.add_dll(r'(lib)?opusfile[-0-9]*\.dll$', 'opusfile', ['*opusfile-[0-9]*']) # IMAGE DEPS.add_dll(r'(lib){0,1}tiff[-0-9]*\.dll$', 'tiff', ['tiff-[0-9]*'], ['jpeg', 'z']) DEPS.add_dll(r'(z|zlib1)\.dll$', 'z', ['zlib-[1-9].*']) DEPS.add_dll(r'(lib)?webp[-0-9]*\.dll$', 'webp', ['*webp-[0-9]*']) def setup_prebuilt_sdl2(prebuilt_dir): Dependency.huntpaths[:] = [prebuilt_dir] Dependency.lib_hunt.extend([ '', # MSYS2 installs prebuilt .dll in /mingw*/bin 'bin', 'lib', ]) Dependency.inc_hunt.append('') DEPS = DependencyGroup() sdlDep = DEPS.add('SDL', 'SDL2', ['SDL2-[1-9].*'], r'(lib){0,1}SDL2\.dll$', find_header=r'SDL\.h', required=1) sdlDep.inc_dir = [ os.path.join(prebuilt_dir, 'include').replace('\\', '/') ] sdlDep.inc_dir.append(f'{sdlDep.inc_dir[0]}/SDL2') fontDep = DEPS.add('FONT', 'SDL2_ttf', ['SDL2_ttf-[2-9].*'], r'(lib){0,1}SDL2_ttf\.dll$', ['SDL', 'z', 'freetype']) imageDep = DEPS.add('IMAGE', 'SDL2_image', ['SDL2_image-[1-9].*'], r'(lib){0,1}SDL2_image\.dll$', ['SDL', 'jpeg', 'png', 'tiff'], 0) mixerDep = DEPS.add('MIXER', 'SDL2_mixer', ['SDL2_mixer-[1-9].*'], r'(lib){0,1}SDL2_mixer\.dll$', ['SDL', 'vorbisfile']) DEPS.add('PORTMIDI', 'portmidi', ['portmidi'], r'(lib){0,1}portmidi\.dll$', find_header=r'portmidi\.h') # #DEPS.add('PORTTIME', 'porttime', ['porttime'], r'porttime\.dll$') DEPS.add_dummy('PORTTIME') # force use of the correct freetype DLL ftDep = DEPS.add('FREETYPE', 'freetype', ['SDL2_ttf-[2-9].*', 'freetype-[1-9].*'], r'(lib)?freetype[-0-9]*\.dll$', find_header=r'ft2build\.h', find_lib=r'libfreetype[-0-9]*\.dll\.a') ftDep.path = fontDep.path ftDep.inc_dir = [ os.path.join(prebuilt_dir, 'include').replace('\\', '/') ] ftDep.inc_dir.append(f'{ftDep.inc_dir[0]}/freetype2') ftDep.found = True png = DEPS.add('PNG', 'png', ['SDL2_image-[2-9].*', 'libpng-[1-9].*'], r'(png|libpng)[-0-9]*\.dll$', ['z'], find_header=r'png\.h', find_lib=r'(lib)?png1[-0-9]*\.dll\.a') png.path = imageDep.path png.inc_dir = [os.path.join(prebuilt_dir, 'include').replace('\\', '/')] png.found = True jpeg = DEPS.add('JPEG', 'jpeg', ['SDL2_image-[2-9].*', 'jpeg(-8*)?'], r'(lib){0,1}jpeg-8\.dll$', find_header=r'jpeglib\.h', find_lib=r'(lib)?jpeg(-8)?\.dll\.a') jpeg.path = imageDep.path jpeg.inc_dir = [os.path.join(prebuilt_dir, 'include').replace('\\', '/')] jpeg.found = True dllPaths = { 'png': imageDep.path, 'jpeg': imageDep.path, 'tiff': imageDep.path, 'z': imageDep.path, 'webp': imageDep.path, 'vorbis': mixerDep.path, 'vorbisfile': mixerDep.path, 'ogg': mixerDep.path, 'flac': mixerDep.path, 'modplug': mixerDep.path, 'mpg123': mixerDep.path, 'opus': mixerDep.path, 'opusfile': mixerDep.path, 'freetype': fontDep.path, } _add_sdl2_dll_deps(DEPS) for dll in DEPS.dlls: if dllPaths.get(dll.lib_name): dll.path = dllPaths.get(dll.lib_name) for d in get_definitions(): DEPS.add_win(d.name, d.value) DEPS.configure() return list(DEPS) def main(auto_config=False): # config MSYS2 always requires prebuilt dependencies, in the # form of packages available in MSYS2. download_prebuilt = 'PYGAME_DOWNLOAD_PREBUILT' in os.environ if download_prebuilt: download_prebuilt = os.environ['PYGAME_DOWNLOAD_PREBUILT'] == '1' else: download_prebuilt = True try: from . import download_msys2_prebuilt except ImportError: import download_msys2_prebuilt if download_prebuilt: download_msys2_prebuilt.update() # MSYS2 config only supports setup with prebuilt dependencies # The prebuilt dir is the MinGW root from the MSYS2 # installation path. Since we're currently running in a native # binary, this Python has no notion of MSYS2 or MinGW paths, so # we convert the prebuilt dir to a Windows absolute path. # e.g. /mingw64 (MSYS2) -> C:/msys64/mingw64 (Windows) prebuilt_dir = get_absolute_win_path("/" + download_msys2_prebuilt.detect_arch()) return setup_prebuilt_sdl2(prebuilt_dir) if __name__ == '__main__': print("""This is the configuration subscript for MSYS2. Please run "config.py" for full configuration.""") if "--download" in sys.argv: try: from . import download_msys2_prebuilt except ImportError: import download_msys2_prebuilt download_msys2_prebuilt.update() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config_unix.py0000644000175100001770000002355514676242340017600 0ustar00runnerdocker"""Config on Unix""" import os from glob import glob import platform import logging from sysconfig import get_path configcommand = os.environ.get('SDL_CONFIG', 'sdl-config',) configcommand = configcommand + ' --version --cflags --libs' if os.environ.get('PYGAME_EXTRA_BASE', ''): extrabases = os.environ['PYGAME_EXTRA_BASE'].split(':') else: extrabases = [] if os.environ.get('LOCALBASE', ''): extrabases.append(os.environ['LOCALBASE']) extrabases.extend(("/usr", "/usr/local")) class DependencyProg: def __init__(self, name, envname, exename, minver, defaultlibs, version_flag="--version"): self.name = name command = os.environ.get(envname, exename) self.lib_dir = '' self.inc_dir = '' self.libs = [] self.cflags = '' try: # freetype-config for freetype2 version 2.3.7 on Debian lenny # does not recognize multiple command line options. So execute # 'command' separately for each option. config = (os.popen(command + ' ' + version_flag).readlines() + os.popen(command + ' --cflags').readlines() + os.popen(command + ' --libs').readlines()) if not config or len(config) < 3: raise ValueError(f'Unexpected output from "{command}"') flags = ' '.join(config[1:]).split() # remove this GNU_SOURCE if there... since python has it already, # it causes a warning. if '-D_GNU_SOURCE=1' in flags: flags.remove('-D_GNU_SOURCE=1') self.ver = config[0].strip() if minver and self.ver < minver: err= f'WARNING: requires {self.name} version {self.ver} ({minver} found)' raise ValueError(err) self.found = 1 self.cflags = '' for f in flags: if f[:2] in ('-l', '-D', '-I', '-L'): self.cflags += f + ' ' elif f[:3] == '-Wl': self.cflags += '-Xlinker ' + f + ' ' if self.name == 'SDL': inc = '-I' + '/usr/X11R6/include' self.cflags = inc + ' ' + self.cflags except (ValueError, TypeError): print(f'WARNING: "{command}" failed!') self.found = 0 self.ver = '0' self.libs = defaultlibs def configure(self, incdirs, libdir): if self.found: print(self.name + ' '[len(self.name):] + ': found ' + self.ver) self.found = 1 else: print(self.name + ' '[len(self.name):] + ': not found') class Dependency: def __init__(self, name, checkhead, checklib, libs): self.name = name self.inc_dir = None self.lib_dir = None self.libs = libs self.found = 0 self.checklib = checklib self.checkhead = checkhead self.cflags = '' def configure(self, incdirs, libdirs): incname = self.checkhead libnames = self.checklib, self.name.lower() if incname: for dir in incdirs: path = os.path.join(dir, incname) if os.path.isfile(path): self.inc_dir = dir for dir in libdirs: for name in libnames: path = os.path.join(dir, name) if any(map(os.path.isfile, glob(path+'*'))): self.lib_dir = dir if (incname and self.lib_dir and self.inc_dir) or (not incname and self.lib_dir): print(self.name + ' '[len(self.name):] + ': found') self.found = 1 else: print(self.name + ' '[len(self.name):] + ': not found') print(self.name, self.checkhead, self.checklib, incdirs, libdirs) class DependencyPython: def __init__(self, name, module, header): self.name = name self.lib_dir = '' self.inc_dir = '' self.libs = [] self.cflags = '' self.found = 0 self.ver = '0' self.module = module self.header = header def configure(self, incdirs, libdirs): self.found = 1 if self.module: try: self.ver = __import__(self.module).__version__ except ImportError: self.found = 0 if self.found and self.header: fullpath = os.path.join(get_path('include'), self.header) if not os.path.isfile(fullpath): self.found = 0 else: self.inc_dir = os.path.split(fullpath)[0] if self.found: print(self.name + ' '[len(self.name):] + ': found', self.ver) else: print(self.name + ' '[len(self.name):] + ': not found') sdl_lib_name = 'SDL' def main(auto_config=False): global origincdirs, origlibdirs #these get prefixes with '/usr' and '/usr/local' or the $LOCALBASE origincdirs = ['/include', '/include/SDL2'] origlibdirs = ['/lib', '/lib64', '/X11R6/lib'] # If we are on a debian based system, we also need to handle # /lib/ # We have a few commands to get the correct , we try those # one by one till we get something that works for cmd in ( "dpkg-architecture -qDEB_HOST_MULTIARCH", "gcc -print-multiarch", "gcc -dumpmachine", ): try: f = os.popen(cmd) except Exception: # We don't bother here, instead we try the next fallback continue try: stdout = f.read().strip() finally: if f.close() is not None: # The command didn't exist successfully, the stdout we got is # useless stdout = "" if stdout: # found what we were looking for origlibdirs.append(f"/lib/{stdout}") break if 'ORIGLIBDIRS' in os.environ and os.environ['ORIGLIBDIRS'] != "": origlibdirs = os.environ['ORIGLIBDIRS'].split(":") print('\nHunting dependencies...') def get_porttime_dep(): """ returns the porttime Dependency. On some distributions, such as Fedora, porttime is compiled into portmidi. On others, such as Debian, it is a separate library. """ portmidi_as_porttime = True if 'PORTMIDI_INC_PORTTIME' in os.environ: inc_porttime = os.environ.get('PORTMIDI_INC_PORTTIME') portmidi_as_porttime = True if inc_porttime in ['1', 'True'] else False else: if os.path.exists('/etc/redhat-release'): portmidi_as_porttime = True else: portmidi_as_porttime = False if portmidi_as_porttime: return Dependency('PORTTIME', 'porttime.h', 'libportmidi.so', ['portmidi']) else: dep = Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']) if not dep.found: return Dependency('PORTTIME', 'porttime.h', 'libportmidi.so', ['portmidi']) def find_freetype(): """ modern freetype uses pkg-config. However, some older systems don't have that. """ pkg_config = DependencyProg( 'FREETYPE', 'FREETYPE_CONFIG', 'pkg-config freetype2', '2.0', ['freetype2'], '--modversion' ) if pkg_config.found: return pkg_config freetype_config = DependencyProg( 'FREETYPE', 'FREETYPE_CONFIG', 'freetype-config', '2.0', ['freetype'], '--ftversion' ) if freetype_config.found: return freetype_config return pkg_config DEPS = [ DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']), Dependency('FONT', 'SDL_ttf.h', 'libSDL2_ttf.so', ['SDL2_ttf']), Dependency('IMAGE', 'SDL_image.h', 'libSDL2_image.so', ['SDL2_image']), Dependency('MIXER', 'SDL_mixer.h', 'libSDL2_mixer.so', ['SDL2_mixer']), #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL2_gfx.so', ['SDL2_gfx']), ] DEPS.extend([ Dependency('PNG', 'png.h', 'libpng', ['png']), Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']), Dependency('SCRAP', '', 'libX11', ['X11']), #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']), ]) is_freebsd = 'FreeBSD' in platform.system() is_hurd = platform.system() == 'GNU' if not is_freebsd and not is_hurd: porttime_dep = get_porttime_dep() DEPS.append( Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']) ) DEPS.append(porttime_dep) DEPS.append(find_freetype()) if not DEPS[0].found: raise RuntimeError('Unable to run "sdl-config". Please make sure a development version of SDL is installed.') incdirs = [] libdirs = [] for extrabase in extrabases: incdirs += [extrabase + d for d in origincdirs] libdirs += [extrabase + d for d in origlibdirs] for arg in DEPS[0].cflags.split(): if arg[:2] == '-I': incdirs.append(arg[2:]) elif arg[:2] == '-L': libdirs.append(arg[2:]) for d in DEPS: d.configure(incdirs, libdirs) for d in DEPS[1:]: if not d.found: if auto_config: logging.info( "Some pygame dependencies were not found.") else: logging.warning( "Some pygame dependencies were not found. " "Pygame can still compile and install, but games that " "depend on those missing dependencies will not run. " "Use -auto to continue building without all dependencies. " ) raise SystemExit("Missing dependencies") break return DEPS if __name__ == '__main__': print("""This is the configuration subscript for Unix. Please run "config.py" for full configuration.""") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/config_win.py0000644000175100001770000004443314676242340017410 0ustar00runnerdocker"""Config on Windows""" # **** The search part is broken. For instance, the png Visual Studio project # places to dll in a directory not checked by this module. try: from setup_win_common import get_definitions except ImportError: from buildconfig.setup_win_common import get_definitions import os, sys import re import logging from glob import glob from sysconfig import get_path def get_ptr_size(): return 64 if sys.maxsize > 2**32 else 32 def as_machine_type(size): """Return pointer bit size as a Windows machine type""" if size == 32: return "x86" if size == 64: return "x64" raise ValueError("Unknown pointer size {}".format(size)) def get_machine_type(): return as_machine_type(get_ptr_size()) class Dependency: huntpaths = ['..', '..\\..', '..\\*', '..\\..\\*'] inc_hunt = ['include'] lib_hunt = ['VisualC\\SDL\\Release', 'VisualC\\Release', 'Release', 'lib'] check_hunt_roots = True def __init__(self, name, wildcards, libs=None, required=0, find_header='', find_lib=''): if libs is None: libs = [] self.name = name self.wildcards = wildcards self.required = required self.paths = [] self.path = None self.inc_dir = None self.lib_dir = None self.find_header = find_header if not find_lib and libs: self.find_lib = r"%s\.(a|lib)" % re.escape(libs[0]) else: self.find_lib = find_lib self.libs = libs self.found = False self.cflags = '' self.prune_info = [] self.fallback_inc = None self.fallback_lib = None def hunt(self): parent = os.path.abspath('..') for p in self.huntpaths: for w in self.wildcards: found = glob(os.path.join(p, w)) found.sort() or found.reverse() #reverse sort for f in found: if f[:5] == '..'+os.sep+'..' and \ os.path.abspath(f)[:len(parent)] == parent: continue if os.path.isdir(f): self.paths.append(f) def choosepath(self, print_result=True): if not self.paths: if self.fallback_inc and not self.inc_dir: self.inc_dir = self.fallback_inc[0] if self.fallback_lib and not self.lib_dir: self.lib_dir = self.fallback_lib[0] self.libs[0] = os.path.splitext(self.fallback_lib[2])[0] if self.inc_dir and self.lib_dir: if print_result: print(f"Path for {self.name} found.") return True if print_result: print(f"Path for {self.name} not found.") for info in self.prune_info: print(info) if self.required: print('Too bad that is a requirement! Hand-fix the "Setup"') return False elif len(self.paths) == 1: self.path = self.paths[0] if print_result: print(f"Path for {self.name}: {self.path}") else: logging.warning("Multiple paths to choose from:%s", self.paths) self.path = self.paths[0] if print_result: print(f"Path for {self.name}: {self.path}") return True def matchfile(self, path, match): try: entries = os.listdir(path) except OSError: pass else: for e in entries: if match(e) and os.path.isfile(os.path.join(path, e)): return e def findhunt(self, base, paths, header_match=None, lib_match=None): for h in paths: hh = os.path.join(base, h) if header_match: header_file = self.matchfile(hh, header_match) if not header_file: continue else: header_file = None if lib_match: lib_file = self.matchfile(hh, lib_match) if not lib_file: continue else: lib_file = None if os.path.isdir(hh): return hh.replace('\\', '/'), header_file, lib_file def prunepaths(self): lib_match = re.compile(self.find_lib, re.I).match if self.find_lib else None header_match = re.compile(self.find_header, re.I).match if self.find_header else None prune = [] for path in self.paths: inc_info = self.findhunt(path, Dependency.inc_hunt, header_match=header_match) lib_info = self.findhunt(path, Dependency.lib_hunt, lib_match=lib_match) if not inc_info or not lib_info: if inc_info: self.prune_info.append('...Found include dir but no library dir in %s.' % ( path)) self.fallback_inc = inc_info if lib_info: self.prune_info.append('...Found library dir but no include dir in %s.' % ( path)) self.fallback_lib = lib_info prune.append(path) else: self.inc_dir = inc_info[0] self.lib_dir = lib_info[0] self.libs[0] = os.path.splitext(lib_info[2])[0] self.paths = [p for p in self.paths if p not in prune] def configure(self): self.hunt() if self.check_hunt_roots: self.paths.extend(self.huntpaths) self.prunepaths() self.choosepath() if self.path: lib_match = re.compile(self.find_lib, re.I).match if self.find_lib else None header_match = re.compile(self.find_header, re.I).match if self.find_header else None inc_info = self.findhunt(self.path, Dependency.inc_hunt, header_match=header_match) lib_info = self.findhunt(self.path, Dependency.lib_hunt, lib_match=lib_match) if inc_info: self.inc_dir = inc_info[0] if lib_info: self.lib_info = lib_info[0] if lib_info[2]: self.libs[0] = os.path.splitext(lib_info[2])[0] if self.lib_dir and self.inc_dir: print(f"...Library directory for {self.name}: {self.lib_dir}") print(f"...Include directory for {self.name}: {self.inc_dir}") self.found = True class DependencyPython: def __init__(self, name, module, header): self.name = name self.lib_dir = '' self.inc_dir = '' self.libs = [] self.cflags = '' self.found = False self.ver = '0' self.module = module self.header = header def configure(self): self.found = True if self.module: try: self.ver = __import__(self.module).__version__ except ImportError: self.found = False if self.found and self.header: fullpath = os.path.join(get_path('include'), self.header) if not os.path.isfile(fullpath): self.found = False else: self.inc_dir = os.path.split(fullpath)[0] if self.found: print("%-8.8s: found %s" % (self.name, self.ver)) else: print("%-8.8s: not found" % self.name) class DependencyDLL(Dependency): def __init__(self, dll_regex, lib=None, wildcards=None, libs=None, link=None): if lib is None: lib = link.libs[0] Dependency.__init__(self, 'COPYLIB_' + lib, wildcards, libs) self.lib_name = lib self.test = re.compile(dll_regex, re.I).match self.lib_dir = '_' self.link = link def configure(self): if not self.path: if (self.link is None or not self.link.path) and self.wildcards: self.hunt() self.choosepath(print_result=False) else: self.path = self.link.path if self.path is not None: self.hunt_dll(self.lib_hunt, self.path) elif self.check_hunt_roots: self.check_roots() if self.lib_dir != '_': print(f"DLL for {self.lib_name}: {self.lib_dir}") self.found = True else: print(f"No DLL for {self.lib_name}: not found!") if self.required: print('Too bad that is a requirement! Hand-fix the "Setup"') def check_roots(self): for p in self.huntpaths: if self.hunt_dll(self.lib_hunt, p): return True return False def hunt_dll(self, search_paths, root): for dir in search_paths: path = os.path.join(root, dir) try: entries = os.listdir(path) except OSError: pass else: for e in entries: if self.test(e) and os.path.isfile(os.path.join(path, e)): # Found self.lib_dir = os.path.join(path, e).replace('\\', '/') return True return False class DependencyDummy: def __init__(self, name): self.name = name self.inc_dir = None self.lib_dir = None self.libs = [] self.found = True self.cflags = '' def configure(self): pass class DependencyWin: def __init__(self, name, cflags): self.name = name self.inc_dir = None self.lib_dir = None self.libs = [] self.found = True self.cflags = cflags def configure(self): pass class DependencyGroup: def __init__(self): self.dependencies =[] self.dlls = [] def add(self, name, lib, wildcards, dll_regex, libs=None, required=0, find_header='', find_lib=''): if libs is None: libs = [] if dll_regex: dep = Dependency(name, wildcards, [lib], required, find_header, find_lib) self.dependencies.append(dep) dll = DependencyDLL(dll_regex, link=dep, libs=libs) self.dlls.append(dll) dep.dll = dll else: dep = Dependency(name, wildcards, [lib] + libs, required, find_header, find_lib) self.dependencies.append(dep) return dep def add_win(self, name, cflags): self.dependencies.append(DependencyWin(name, cflags)) def add_dll(self, dll_regex, lib=None, wildcards=None, libs=None, link_lib=None): link = None if link_lib is not None: name = 'COPYLIB_' + link_lib for d in self.dlls: if d.name == name: link = d break else: raise KeyError(f"Link lib {link_lib} not found") dep = DependencyDLL(dll_regex, lib, wildcards, libs, link) self.dlls.append(dep) return dep def add_dummy(self, name): self.dependencies.append(DependencyDummy(name)) def find(self, name): for dep in self: if dep.name == name: return dep def configure(self): for d in self.dependencies: if not getattr(d, '_configured', False): d.configure() d._configured = True for d in self.dlls: if not getattr(d, '_configured', False): d.configure() d._configured = True # create a lib if d.found and d.link and not d.link.lib_dir: try: from . import vstools except ImportError: from buildconfig import vstools from os.path import splitext nonext_name = splitext(d.lib_dir)[0] def_file = f'{nonext_name}.def' basename = os.path.basename(nonext_name) print('Building lib from {}: {}.lib...'.format( os.path.basename(d.lib_dir), basename )) vstools.dump_def(d.lib_dir, def_file=def_file) vstools.lib_from_def(def_file) d.link.lib_dir = os.path.dirname(d.lib_dir) d.link.libs[0] = basename d.link.configure() def __iter__(self): yield from self.dependencies yield from self.dlls def _add_sdl2_dll_deps(DEPS): # MIXER DEPS.add_dll(r'(libogg-0|ogg)\.dll$', 'ogg', ['libogg-[1-9].*']) DEPS.add_dll(r'(lib)?modplug[-0-9]*\.dll$', 'modplug', ['*modplug-[0-9]*']) DEPS.add_dll(r'(lib)?opus[-0-9]*\.dll$', 'opus', ['*opus-[0-9]*']) DEPS.add_dll(r'(lib)?opusfile[-0-9]*\.dll$', 'opusfile', ['*opusfile-[0-9]*']) # IMAGE DEPS.add_dll(r'(lib){0,1}tiff[-0-9]*\.dll$', 'tiff', ['tiff-[0-9]*'], ['jpeg', 'z']) DEPS.add_dll(r'(z|zlib1)\.dll$', 'z', ['zlib-[1-9].*']) DEPS.add_dll(r'(lib)?webp[-0-9]*\.dll$', 'webp', ['*webp-[0-9]*']) def setup(): DEPS = DependencyGroup() DEPS.add('SDL', 'SDL2', ['SDL2-[1-9].*'], r'(lib){0,1}SDL2\.dll$', required=1) DEPS.add('PORTMIDI', 'portmidi', ['portmidi'], r'portmidi\.dll$', find_header=r'portmidi\.h') #DEPS.add('PORTTIME', 'porttime', ['porttime'], r'porttime\.dll$') DEPS.add_dummy('PORTTIME') DEPS.add('MIXER', 'SDL2_mixer', ['SDL2_mixer-[1-9].*'], r'(lib){0,1}SDL2_mixer\.dll$', ['SDL']) DEPS.add('PNG', 'png', ['SDL2_image-[2-9].*', 'libpng-[1-9].*'], r'(png|libpng)[-0-9]*\.dll$', ['z'], find_header=r'png\.h', find_lib=r'(lib)?png1[-0-9]*\.lib') DEPS.add('JPEG', 'jpeg', ['SDL2_image-[2-9].*', 'jpeg-9*'], r'(lib){0,1}jpeg-9\.dll$', find_header=r'jpeglib\.h', find_lib=r'(lib)?jpeg-9\.lib') DEPS.add('IMAGE', 'SDL2_image', ['SDL2_image-[1-9].*'], r'(lib){0,1}SDL2_image\.dll$', ['SDL', 'jpeg', 'png', 'tiff'], 0) DEPS.add('FONT', 'SDL2_ttf', ['SDL2_ttf-[2-9].*'], r'(lib){0,1}SDL2_ttf\.dll$', ['SDL', 'z', 'freetype']) DEPS.add('FREETYPE', 'freetype', ['freetype'], r'freetype[-0-9]*\.dll$', find_header=r'ft2build\.h', find_lib=r'freetype[-0-9]*\.lib') DEPS.configure() _add_sdl2_dll_deps(DEPS) for d in get_definitions(): DEPS.add_win(d.name, d.value) DEPS.configure() return list(DEPS) def setup_prebuilt_sdl2(prebuilt_dir): Dependency.huntpaths[:] = [prebuilt_dir] Dependency.lib_hunt.extend([ '', 'lib', os.path.join('lib', get_machine_type()), # SDL also provides some optional DLLs sometimes, so we also look for # those os.path.join('lib', get_machine_type(), "optional"), ]) Dependency.inc_hunt.append('') DEPS = DependencyGroup() DEPS.add('SDL', 'SDL2', ['SDL2-[1-9].*'], r'(lib){0,1}SDL2\.dll$', required=1) fontDep = DEPS.add('FONT', 'SDL2_ttf', ['SDL2_ttf-[2-9].*'], r'(lib){0,1}SDL2_ttf\.dll$', ['SDL']) imageDep = DEPS.add('IMAGE', 'SDL2_image', ['SDL2_image-[1-9].*'], r'(lib){0,1}SDL2_image\.dll$', ['SDL', 'jpeg', 'png', 'tiff'], 0) mixerDep = DEPS.add('MIXER', 'SDL2_mixer', ['SDL2_mixer-[1-9].*'], r'(lib){0,1}SDL2_mixer\.dll$', ['SDL']) DEPS.add('PORTMIDI', 'portmidi', ['portmidi'], r'portmidi\.dll$', find_header=r'portmidi\.h') #DEPS.add('PORTTIME', 'porttime', ['porttime'], r'porttime\.dll$') DEPS.add_dummy('PORTTIME') DEPS.configure() DEPS.add('FREETYPE', 'freetype', ['freetype'], r'freetype[-0-9]*\.dll$', find_header=r'ft2build\.h', find_lib=r'freetype[-0-9]*\.lib') png = DEPS.add('PNG', 'png', ['SDL2_image-[2-9].*', 'libpng-[1-9].*'], r'(png|libpng)[-0-9]*\.dll$', ['z'], find_header=r'png\.h', find_lib=r'(lib)?png1[-0-9]*\.lib') png.path = imageDep.path png.inc_dir = [os.path.join(prebuilt_dir, 'include').replace('\\', '/')] png.found = True jpeg = DEPS.add('JPEG', 'jpeg', ['SDL2_image-[2-9].*', 'jpeg-9*'], r'(lib){0,1}jpeg-9\.dll$', find_header=r'jpeglib\.h', find_lib=r'(lib)?jpeg-9\.lib') jpeg.path = imageDep.path jpeg.inc_dir = [os.path.join(prebuilt_dir, 'include').replace('\\', '/')] jpeg.found = True dllPaths = { 'png': imageDep.path, 'jpeg': imageDep.path, 'tiff': imageDep.path, 'z': imageDep.path, 'webp': imageDep.path, 'ogg': mixerDep.path, 'modplug': mixerDep.path, 'opus': mixerDep.path, 'opusfile': mixerDep.path, } _add_sdl2_dll_deps(DEPS) for dll in DEPS.dlls: if dllPaths.get(dll.lib_name): dll.path = dllPaths.get(dll.lib_name) for d in get_definitions(): DEPS.add_win(d.name, d.value) DEPS.configure() return list(DEPS) def main(auto_config=False): machine_type = get_machine_type() prebuilt_dir = f'prebuilt-{machine_type}' use_prebuilt = '-prebuilt' in sys.argv auto_download = 'PYGAME_DOWNLOAD_PREBUILT' in os.environ if auto_download: auto_download = os.environ['PYGAME_DOWNLOAD_PREBUILT'] == '1' try: from . import download_win_prebuilt except ImportError: import download_win_prebuilt download_kwargs = { 'x86': False, 'x64': False, } download_kwargs[machine_type] = True if not auto_download: if (not download_win_prebuilt.cached(**download_kwargs) or\ not os.path.isdir(prebuilt_dir))\ and download_win_prebuilt.ask(**download_kwargs): use_prebuilt = True else: download_win_prebuilt.update(**download_kwargs) if os.path.isdir(prebuilt_dir): if not use_prebuilt: if 'PYGAME_USE_PREBUILT' in os.environ: use_prebuilt = os.environ['PYGAME_USE_PREBUILT'] == '1' else: logging.warning(f'Using the SDL libraries in "{prebuilt_dir}".') use_prebuilt = True if use_prebuilt: return setup_prebuilt_sdl2(prebuilt_dir) else: print(f"Note: cannot find directory \"{prebuilt_dir}\"; do not use prebuilts.") return setup() if __name__ == '__main__': print("""This is the configuration subscript for Windows. Please run "config.py" for full configuration.""") import sys if "--download" in sys.argv: try: from . import download_win_prebuilt except ImportError: import download_win_prebuilt download_win_prebuilt.ask() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/download_msys2_prebuilt.py0000644000175100001770000000723114676242340022133 0ustar00runnerdocker""" This script install prebuilt dependencies for MSYS2. It uses pacman to install the dependencies. See documentation about different environments here: https://www.msys2.org/docs/environments/ """ import logging import os import subprocess import sys def install_pacman_package(pkg_name): """This installs a package in the current MSYS2 environment Does not download again if the package is already installed and if the version is the latest available in MSYS2 """ output = subprocess.run( ["pacman", "-S", "--noconfirm", pkg_name], capture_output=True, text=True ) if output.returncode != 0: logging.error( "Error {} while downloading package {}: \n{}".format( output.returncode, pkg_name, output.stderr ) ) return output.returncode != 0 def get_packages(arch: str) -> list: """ Returns a list of package names formatted with the specific architecture prefix. :param arch: The architecture identifier string, e.g., "mingw64", "clang32", etc. It is used to select the appropriate prefix for package names. :return: A list of fully formatted package names based on the given architecture. Example: If the 'arch' parameter is "mingw32", the return value will be a list like: [ 'mingw-w64-i686-SDL2', 'mingw-w64-i686-SDL2_ttf', 'mingw-w64-i686-SDL2_image', ... ] """ deps = [ "{}-SDL2", "{}-SDL2_ttf", "{}-SDL2_image", "{}-SDL2_mixer", "{}-portmidi", "{}-libpng", "{}-libjpeg-turbo", "{}-libtiff", "{}-zlib", "{}-libwebp", "{}-libvorbis", "{}-libogg", "{}-flac", "{}-libmodplug", "{}-mpg123", "{}-opus", "{}-opusfile", "{}-freetype", "{}-python-build", "{}-python-installer", "{}-python-setuptools", "{}-python-wheel", "{}-python-pip", "{}-python-numpy", "{}-python-sphinx", "{}-cmake", "{}-cc", "{}-cython", ] full_arch_names = { "clang32": "mingw-w64-clang-i686", "clang64": "mingw-w64-clang-x86_64", "mingw32": "mingw-w64-i686", "mingw64": "mingw-w64-x86_64", "ucrt64": "mingw-w64-ucrt-x86_64", "clangarm64": "mingw-w64-clang-aarch64", } return [x.format(full_arch_names[arch]) for x in deps] def install_prebuilts(arch): """For installing prebuilt dependencies.""" errors = False print("Installing pre-built dependencies") for pkg in get_packages(arch): print(f"Installing {pkg}") error = install_pacman_package(pkg) errors = errors or error if errors: raise Exception("Some dependencies could not be installed") def detect_arch(): """Returns one of: "clang32", "clang64", "mingw32", "mingw64", "ucrt64", "clangarm64". Based on the MSYSTEM environment variable with a fallback. """ msystem = os.environ.get("MSYSTEM", "") if msystem.startswith("MINGW32"): return "mingw32" elif msystem.startswith("MINGW64"): return "mingw64" elif msystem.startswith("UCRT64"): return "ucrt64" elif msystem.startswith("CLANG32"): return "clang32" elif msystem.startswith("CLANGARM64"): return "clangarm64" elif msystem.startswith("CLANG64"): return "clang64" else: if sys.maxsize > 2**32: return "mingw64" else: return "mingw32" def update(arch=None): install_prebuilts(arch if arch else detect_arch()) if __name__ == "__main__": update() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/download_win_prebuilt.py0000644000175100001770000002052214676242340021651 0ustar00runnerdockerimport os import stat import logging download_dir = "prebuilt_downloads" def download_sha1_unzip(url, checksum, save_to_directory, unzip=True): """ This - downloads a url, - sha1 checksum check, - save_to_directory, - then unzips it. Does not download again if the file is there. Does not unzip again if the file is there. """ # requests does connection retrying, but people might not have it installed. use_requests = True try: import requests except ImportError: use_requests = False import urllib.request as urllib import hashlib import zipfile filename = os.path.split(url)[-1] save_to = os.path.join(save_to_directory, filename) # skip download? skip_download = os.path.exists(save_to) if skip_download: with open(save_to, 'rb') as the_file: data = the_file.read() cont_checksum = hashlib.sha1(data).hexdigest() if cont_checksum == checksum: print(f"Skipping download url:{url}: save_to:{save_to}:") else: print("Downloading...", url, checksum) if use_requests: response = requests.get(url) cont_checksum = hashlib.sha1(response.content).hexdigest() else: headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, ' 'like Gecko) Chrome/35.0.1916.47 Safari/537.36'} request = urllib.Request(url, headers=headers) response = urllib.urlopen(request).read() cont_checksum = hashlib.sha1(response).hexdigest() if checksum != cont_checksum: raise ValueError( f'url:{url} should have checksum:{checksum}: Has:{cont_checksum}: ' ) with open(save_to, 'wb') as f: if use_requests: f.write(response.content) else: f.write(response) if unzip and filename.endswith('.zip'): print(f"Unzipping :{save_to}:") with zipfile.ZipFile(save_to, 'r') as zip_ref: zip_dir = os.path.join( save_to_directory, filename.replace('.zip', '') ) if os.path.exists(zip_dir): print(f"Skipping unzip to zip_dir exists:{zip_dir}:") else: os.mkdir(zip_dir) zip_ref.extractall(zip_dir) def get_urls(x86=True, x64=True): url_sha1 = [] url_sha1.extend([ [ 'https://www.libsdl.org/release/SDL2-devel-2.28.4-VC.zip', '25ef9d201ce3fd5f976c37dddedac36bd173975c', ], [ 'https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip', '137f86474691f4e12e76e07d58d5920c8d844d5b', ], [ 'https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.1/SDL2_ttf-devel-2.20.1-VC.zip', '371606aceba450384428fd2852f73d2f6290b136' ], [ 'https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.2/SDL2_mixer-devel-2.6.2-VC.zip', '000e3ea8a50261d46dbd200fb450b93c59ed4482', ], ]) if x86: url_sha1.append([ 'https://github.com/pygame/pygame/releases/download/2.1.3.dev4/prebuilt-x86-pygame-2.1.4-20220319.zip', 'bff2e50d65ec35274d33203e9fcaf5d53b31a696' ]) if x64: url_sha1.append([ 'https://github.com/pygame/pygame/releases/download/2.1.3.dev4/prebuilt-x64-pygame-2.1.4-20220319.zip', '16b46596744ce9ef80e7e40fa72ddbafef1cf586' ]) return url_sha1 def download_prebuilts(temp_dir, x86=True, x64=True): """ For downloading prebuilt dependencies. """ if not os.path.exists(temp_dir): print(f"Making dir :{temp_dir}:") os.makedirs(temp_dir) for url, checksum in get_urls(x86=x86, x64=x64): download_sha1_unzip(url, checksum, temp_dir, 1) def create_ignore_target_fnc(x64=False, x86=False): if not x64 and not x86: return None strs = [] if x64: strs.append('x64') if x86: strs.append('x86') def ignore_func(dir, contents): for target in strs: if target in dir: return contents return [] return ignore_func import shutil def copytree(src, dst, symlinks=False, ignore=None): """like shutil.copytree() but ignores existing files https://stackoverflow.com/a/22331852/1239986 """ if not os.path.exists(dst): os.makedirs(dst) shutil.copystat(src, dst) lst = os.listdir(src) if ignore: excl = ignore(src, lst) lst = [x for x in lst if x not in excl] for item in lst: s = os.path.join(src, item) d = os.path.join(dst, item) if symlinks and os.path.islink(s): if os.path.lexists(d): os.remove(d) os.symlink(os.readlink(s), d) try: st = os.lstat(s) mode = stat.S_IMODE(st.st_mode) os.lchmod(d, mode) except OSError: pass # lchmod not available elif os.path.isdir(s): copytree(s, d, symlinks, ignore) else: shutil.copy2(s, d) def place_downloaded_prebuilts(temp_dir, move_to_dir, x86=True, x64=True): """ puts the downloaded prebuilt files into the right place. Leaves the files in temp_dir. copies to move_to_dir """ prebuilt_x64 = os.path.join( temp_dir, 'prebuilt-x64-pygame-2.1.4-20220319', 'prebuilt-x64' ) prebuilt_x86 = os.path.join( temp_dir, 'prebuilt-x86-pygame-2.1.4-20220319', 'prebuilt-x86' ) ignore = None def copy(src, dst): copytree(src, dst, ignore=ignore) if x64: copy(prebuilt_x64, os.path.join(move_to_dir, 'prebuilt-x64')) if x86: copy(prebuilt_x86, os.path.join(move_to_dir, 'prebuilt-x86')) ignore = create_ignore_target_fnc(x64=not x64, x86=not x86) prebuilt_dirs = [] if x86: prebuilt_dirs.append('prebuilt-x86') if x64: prebuilt_dirs.append('prebuilt-x64') for prebuilt_dir in prebuilt_dirs: path = os.path.join(move_to_dir, prebuilt_dir) print(f"copying into {path}") copy( os.path.join( temp_dir, 'SDL2_image-devel-2.0.5-VC/SDL2_image-2.0.5' ), os.path.join( move_to_dir, prebuilt_dir, 'SDL2_image-2.0.5' ) ) copy( os.path.join( temp_dir, 'SDL2_mixer-devel-2.6.2-VC/SDL2_mixer-2.6.2' ), os.path.join( move_to_dir, prebuilt_dir, 'SDL2_mixer-2.6.2' ) ) copy( os.path.join( temp_dir, 'SDL2_ttf-devel-2.20.1-VC/SDL2_ttf-2.20.1' ), os.path.join( move_to_dir, prebuilt_dir, 'SDL2_ttf-2.20.1' ) ) copy( os.path.join( temp_dir, 'SDL2-devel-2.28.4-VC/SDL2-2.28.4' ), os.path.join( move_to_dir, prebuilt_dir, 'SDL2-2.28.4' ) ) def update(x86=True, x64=True): move_to_dir = "." download_prebuilts(download_dir, x86=x86, x64=x64) place_downloaded_prebuilts(download_dir, move_to_dir, x86=x86, x64=x64) def ask(x86=True, x64=True): move_to_dir = "." if x64: dest_str = f"\"{move_to_dir}/prebuilt-x64\"" else: dest_str = "" if x86: if dest_str: dest_str = f"{dest_str} and " dest_str = f"{dest_str}\"{move_to_dir}/prebuilt-x86\"" logging.info('Downloading prebuilts to "%s" and copying to %s.', (download_dir, dest_str)) download_prebuilt = True if download_prebuilt: update(x86=x86, x64=x64) return download_prebuilt def cached(x86=True, x64=True): if not os.path.isdir(download_dir): return False for url, check in get_urls(x86=x86, x64=x64): filename = os.path.split(url)[-1] save_to = os.path.join(download_dir, filename) if not os.path.exists(save_to): return False return True if __name__ == '__main__': ask() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9891257 pygame-2.6.1/buildconfig/macdependencies/0000755000175100001770000000000014676242436020021 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.964112 pygame-2.6.1/buildconfig/macdependencies/README.rst0000644000175100001770000000214714676242340021506 0ustar00runnerdocker# Mac dependencies using manylinux build scripts This uses manylinux build scripts to build dependencies on MacOS. Designed to be run on a Virtual Machine that can be destroyed. It deletes some homebrew files, and messes with /usr/local/. Warning: *do not run on your own machine*. It tries to work as far back as Mac OSX 10.9, for x64 and arm64 (cross compiled) architectures. If there needs to be separate configure options between linux and mac then something like the following can be used. ```bash if [[ "$OSTYPE" == "linux-gnu"* ]]; then # linux export SDL_IMAGE_CONFIGURE= elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # --disable-imageio is so it doesn't use the built in mac image loading. # Since it is not as compatible with some jpg/png files. export SDL_IMAGE_CONFIGURE=--disable-imageio fi ``` ## Future work ### MacOS doesn't come with gnu compatible readlink It currently relies on GNU `readlink` to build, which is provided by the coreutils homebrew package. However, this could be fixed to be cross platform, since mac `readlink` does not support `-f`. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/macdependencies/build_mac_deps.sh0000644000175100001770000000554214676242340023307 0ustar00runnerdocker# This uses manylinux build scripts to build dependencies # on mac. # # Warning: this should probably not be run on your own mac. # Since it will install all these deps all over the place, # and they may conflict with existing installs you have. set -e -x export MACDEP_CACHE_PREFIX_PATH=${GITHUB_WORKSPACE}/pygame_mac_deps_${MAC_ARCH} bash ./clean_usr_local.sh mkdir $MACDEP_CACHE_PREFIX_PATH # to use the gnu readlink, needs `brew install coreutils` export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" # for great speed. export MAKEFLAGS="-j 4" # With this we # 1) Force install prefix to /usr/local # 2) use lib directory within /usr/local (and not lib64) # 3) make release binaries # 4) build shared libraries # 5) not have @rpath in the linked dylibs (needed on macs only) export PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/ \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=true \ -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib" if [[ "$MAC_ARCH" == "arm64" ]]; then # for scripts using ./configure to make arm64 binaries export CC="clang -target arm64-apple-macos11.0" export CXX="clang++ -target arm64-apple-macos11.0" # This does not do anything actually, but without this ./configure errors export ARCHS_CONFIG_FLAG="--host=aarch64-apple-darwin20.0.0" # configure cmake to cross-compile export PG_BASE_CMAKE_FLAGS="$PG_BASE_CMAKE_FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64" # we don't need mac 10.9 support while compiling for apple M1 macs export MACOSX_DEPLOYMENT_TARGET=11.0 else # install NASM to generate optimised x86_64 libjpegturbo builds brew install nasm export MACOSX_DEPLOYMENT_TARGET=10.9 fi cd ../manylinux-build/docker_base python -m pip install setuptools wheel meson packaging ninja # Now start installing dependencies # --------------------------------- sudo mkdir -p /usr/local/man/man1 # the install tries to put something in here sudo chmod 0777 /usr/local/man/man1 # so that install can put files here mkdir -p ${MACDEP_CACHE_PREFIX_PATH}/usr/local/man/man1 # sdl_image deps bash zlib-ng/build-zlib-ng.sh bash libpng/build-png.sh # depends on zlib bash libjpegturbo/build-jpeg-turbo.sh bash libtiff/build-tiff.sh bash libwebp/build-webp.sh # freetype (also sdl_ttf dep) bash brotli/build-brotli.sh bash bzip2/build-bzip2.sh bash freetype/build-freetype.sh # sdl_mixer deps bash libmodplug/build-libmodplug.sh bash ogg/build-ogg.sh bash flac/build-flac.sh bash mpg123/build-mpg123.sh bash opus/build-opus.sh # needs libogg (which is a container format) bash libsamplerate/build-samplerate.sh # fluidsynth (for sdl_mixer) bash gettext/build-gettext.sh bash glib/build-glib.sh # depends on gettext bash sndfile/build-sndfile.sh bash fluidsynth/build-fluidsynth.sh bash sdl_libs/build-sdl2-libs.sh # for pygame.midi bash portmidi/build-portmidi.sh ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/macdependencies/clean_usr_local.sh0000644000175100001770000000571214676242340023501 0ustar00runnerdocker# Cleans /usr/local for the install of mac deps, deleting things that are not # required, or things that will be replaced with something else # First clean up some homebrew stuff we don't want linked in # ---------------------------------------------------------- rm -rf /usr/local/bin/curl rm -rf /usr/local/opt/curl rm -rf /usr/local/bin/git rm -rf /usr/local/opt/git # Use the apple provided curl, and git. # The homebrew ones depend on libs we don't want to include. # ln -s /usr/bin/curl /usr/local/bin/curl ln -s /usr/bin/git /usr/local/bin/git rm -rf /usr/local/lib/libtiff* rm -rf /usr/local/lib/libzstd* rm -rf /usr/local/lib/libwebp* rm -rf /usr/local/lib/libsndfile* rm -rf /usr/local/lib/glib* rm -rf /usr/local/lib/libglib* rm -rf /usr/local/lib/libgthread* rm -rf /usr/local/lib/libintl* rm -rf /usr/local/lib/libbrotlidec* rm -rf /usr/local/lib/libopus* rm -rf /usr/local/lib/libomp* rm -rf /usr/local/lib/libmp3lame* rm -rf /usr/local/lib/libpcre* rm -rf /usr/local/opt/freetype rm -rf /usr/local/Cellar/libtiff rm -rf /usr/local/Cellar/libsndfile rm -rf /usr/local/Cellar/glib* rm -rf /usr/local/Cellar/brotli rm -rf /usr/local/Cellar/pcre rm -rf /usr/local/Cellar/pcre2 rm -rf /usr/local/Cellar/opusfile rm -rf /usr/local/Cellar/opus rm -rf /usr/local/Cellar/freetype rm -rf /usr/local/Cellar/libomp rm -rf /usr/local/Cellar/lame rm -rf /usr/local/share/doc/tiff-* rm -rf /usr/local/share/doc/libsndfile rm -rf /usr/local/share/doc/opusfile rm -rf /usr/local/share/gdb/auto-load # glib gunk rm -rf /usr/local/share/glib-2.0 rm -rf /usr/local/bin/pcre2* rm -rf /usr/local/lib/libgobject* rm -rf /usr/local/lib/libgmodule* rm -rf /usr/local/lib/libgio* rm -rf /usr/local/bin/gtester rm -rf /usr/local/bin/gobject-query rm -rf /usr/local/bin/gio* rm -rf /usr/local/bin/gresource rm -rf /usr/local/bin/glib* rm -rf /usr/local/bin/gsettings rm -rf /usr/local/bin/gdbus-codegen rm -rf /usr/local/bin/gi-decompile-typelib rm -rf /usr/local/bin/gi-inspect-typelib rm -rf /usr/local/bin/gtester-report rm -rf /usr/local/include/glib* rm -rf /usr/local/bin/gdbus rm -rf /usr/local/lib/libgirepository* rm -rf /usr/local/bin/gi-compile-repository rm -rf /usr/local/include/pcre* rm -rf /usr/local/lib/pkgconfig/libpcre2* rm -rf /usr/local/lib/pkgconfig/glib* rm -rf /usr/local/lib/pkgconfig/gobject* find /usr/local -type l | while read -r file; do link=$(readlink "${file}") if [[ "${link}" == *"Cellar"* && "${link}" == *"glib"* ]]; then echo "2. Removing symlink ${file}" rm -f "${file}" fi done # The installer fails when it tries to create this directory and it already # exists, so clean it before that rm -rf /usr/local/share/bash-completion rm -rf /usr/local/include/glib-2.0 rm -rf /usr/local/include/gio-unix-2.0 rm -rf /usr/local/include/brotli rm -rf /usr/local/include/lame # Remove all dangling symlinks find -L /usr/local/bin -type l -exec rm -i {} \; find -L /usr/local/lib -type l -exec rm -i {} \; find -L /usr/local/include -type l -exec rm -i {} \; ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/macdependencies/install_mac_deps.py0000644000175100001770000000305514676242340023671 0ustar00runnerdocker""" A python helper script to install built (cached) mac deps into /usr/local """ import shutil import sys from pathlib import Path def rmpath(path: Path, verbose: bool = False): """ Tries to remove a path of any kind """ if path.is_symlink(): if verbose: print(f"- Removing existing symlink at '{path}'") path.unlink() elif path.is_file(): if verbose: print(f"- Removing existing file at '{path}'") path.unlink() elif path.is_dir(): if verbose: print(f"- Removing existing directory at '{path}'") shutil.rmtree(path) def symtree(srcdir: Path, destdir: Path, verbose: bool = False): """ This function creates symlinks pointing to srcdir, from destdir, such that existing folders and files in the tree of destdir are retained """ if not destdir.is_dir(): # dest dir does not exist at all, create dir symlink rmpath(destdir, verbose) if verbose: print( f"- Creating directory symlink from '{destdir}' pointing to '{srcdir}'" ) destdir.symlink_to(srcdir) return for path in srcdir.glob("*"): destpath = destdir / path.name if path.is_dir(): symtree(path, destpath, verbose) else: rmpath(destpath, verbose) if verbose: print(f"- Creating file symlink from '{destpath}' pointing to '{path}'") destpath.symlink_to(path) symtree(Path(sys.argv[1]), Path("/"), verbose=True) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/macdependencies/install_mac_deps.sh0000755000175100001770000000024314676242340023652 0ustar00runnerdocker# A script to install mac deps in /usr/local set -e -x bash ./clean_usr_local.sh sudo python3 install_mac_deps.py ${GITHUB_WORKSPACE}/pygame_mac_deps_${MAC_ARCH} ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/macdependencies/macos-arm64.ini0000644000175100001770000000112614676242340022545 0ustar00runnerdocker[constants] extra_args = ['-arch', 'arm64', '-target', 'arm64-apple-macos11.0'] [host_machine] system = 'darwin' cpu = 'arm64' cpu_family = 'aarch64' endian = 'little' [binaries] c = 'clang' cpp = 'clang++' objc = 'clang' objcpp = 'clang++' ar = 'ar' ld = 'ld' strip = 'strip' lipo = 'lipo' ranlib = 'ranlib' pkgconfig = 'pkg-config' [built-in options] c_args = extra_args cpp_args = extra_args + ['-stdlib=libc++'] objc_args = extra_args objcpp_args = extra_args + ['-stdlib=libc++'] c_link_args = extra_args cpp_link_args = extra_args objc_link_args = extra_args objcpp_link_args = extra_args ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.965112 pygame-2.6.1/buildconfig/makeref.py0000755000175100001770000000362714676242340016703 0ustar00runnerdocker#!/usr/bin/env python import sys import os import subprocess # rst_dir = 'docs' # rst_source_dir = os.path.join(rst_dir, 'reST') # rst_build_dir = os.path.join('docs', 'generated') # rst_source_dir = os.path.join(rst_dir, 'es') # rst_build_dir = os.path.join('docs', 'generated', 'es') # rst_doctree_dir = os.path.join(rst_build_dir, 'doctrees') # c_header_dir = os.path.join('src_c', 'doc') def run(): global rst_dir, rst_source_dir, rst_build_dir, rst_doctree_dir, c_header_dir rst_dir = 'docs' rst_source_dir = os.path.join(rst_dir, 'reST') rst_build_dir = os.path.join('docs', 'generated') rst_doctree_dir = os.path.join(rst_build_dir, 'doctrees') c_header_dir = os.path.join('src_c', 'doc') print("Generating:", rst_source_dir, rst_build_dir) runit() rst_source_dir = os.path.join(rst_dir, 'es') rst_build_dir = os.path.join('docs', 'generated', 'es') rst_doctree_dir = os.path.join(rst_build_dir, 'doctrees') print("Generating:", rst_source_dir, rst_build_dir) runit() def runit(): full_generation_flag = False for argument in sys.argv[1:]: if argument == 'full_generation': full_generation_flag = True try: subprocess_args = [sys.executable, '-m', 'sphinx', '-b', 'html', '-d', rst_doctree_dir, '-D', f'headers_dest={c_header_dir}', '-D', 'headers_mkdirs=0', rst_source_dir, rst_build_dir, ] if full_generation_flag: subprocess_args.append('-E') print("Executing sphinx in subprocess with args:", subprocess_args) return subprocess.run(subprocess_args).returncode except Exception: print('---') print('Have you installed sphinx?') print('---') raise if __name__ == '__main__': sys.exit(run()) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/msysio.py0000644000175100001770000000167114676242340016606 0ustar00runnerdocker# module msysio.py # Requires Python 2.2 or better. """Provide helpful routines for interactive IO on the MSYS console""" # Output needs to be flushed to be seen. It is especially important # when prompting for user input. import sys import os __all__ = ['print_', 'is_msys'] def print_(*args, **kwds): """Print arguments in an MSYS console friendly way Keyword arguments: file, sep, end """ stream = kwds.get('file', sys.stdout) sep = kwds.get('sep', ' ') end = kwds.get('end', '\n') if args: stream.write(sep.join([str(arg) for arg in args])) if end: stream.write(end) try: stream.flush() except AttributeError: pass def is_msys(): """Return true if the execution environment is MSYS""" try: # Unfortunately there is no longer an MSYS specific identifier. return os.environ['TERM'] == 'cygwin' except KeyError: return False ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9701257 pygame-2.6.1/buildconfig/obj/0000755000175100001770000000000014676242436015464 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9891257 pygame-2.6.1/buildconfig/obj/win32/0000755000175100001770000000000014676242436016426 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/obj/win32/scale_mmx.obj0000644000175100001770000000743414676242340021074 0ustar00runnerdockerL .textP  `.data@.bssU8]EMu]uE)eE }} M)ËẺ]E@@} E@@ÉE@En}abMɋU@vn`ʁ@no]abn&`qoqoqoqoqooqoqg~M@JNu}M6w]u}]Í'U8]EMu]uE)eE }} M)ËẺ]E@@} E@@ÉE@En}oupMɋU@vn`ʁ@;nopn&`qog~M@Juu}Muw]u}]Í&UX]EMuU] EċEue)})‹EĉU܋} ME@@E@@ÉE@]ۉE$E\$1҉T$$Mn}abE@v&Uno`Ju@nɋUouabn&`o(oqoqoqoqoqoqoqg~'Jz}M@uMwE]uE}]]u}]fUX]EMuU] EċEue)})‹EĉU܋} ME@@E@@ÉE@]ۉE$E\$1ɉL$$Mn}pE@v#Uno`Ju@NnɋUoupn&`o(oqg~'Ju}M@uMxwE]uE}]]u}]Í&'UWVSEEMU E؋EuMЋM UԋUẺUȉME$E]$$EEU Шm1;]}tNu1}ĉEș}ĺMt)‹EUttEU ʉ؉TEU Љ߉DEC;]|EU9U|3U$<$MMĜ[^_]Ĝ[^_]Eu؍EԉMEĉMʋMEo}oo n$nl``qg~*MuwE]̋MME9E|U$<$MMĜ[^_]M $t<$MqE$at&UWVSEEMU E؋EuMЋM UԋUẺUȉME$E]$$EEU Шm1;]}tNu1}ĉEș}ĺMt)‹EUttEU ʉ؉TEU Љ߉DEC;]|EU9U|3U$<$MMĜ[^_]Ĝ[^_]Eu؍EԉMEĉMʋMEo}oo n$nl``qg~*MuwE]̋MME9E|U$<$MMĜ[^_]M $t<$MqE$at&UWVS} E9}EE1HEt&]ˉU܋EUe EܙE܋U܉E)ЉEUE ‹EnMnUababn#n)``qg~*HuwE]UU9}a[^_]É'UWVS} E9}EE1HEt&]ˉU܋EUe EܙE܋U܉E)ЉEUE ‹EnMnUppn#n)``qg~*HuwEEUU9}e[^_]ÐEbzNV 1=S~9 A a m  k&V .filegscale_mmx.c P .@ C X0 m`   p  .textC .data.bss_free _memset _malloc _filter_shrink_X_MMX_filter_shrink_X_SSE_filter_shrink_Y_MMX_filter_shrink_Y_SSE_filter_expand_X_MMX_filter_expand_X_SSE_filter_expand_Y_MMX_filter_expand_Y_SSE././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9891257 pygame-2.6.1/buildconfig/obj/win64/0000755000175100001770000000000014676242436016433 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/obj/win64/scale_mmx.obj0000644000175100001770000001037014676242340021072 0ustar00runnerdockerd.textp  P`.data@P.bssPUHSH8HMHUDE DM(U8)E(EU@)E0EE8}@EU@щEE@@E@@EHHEЋEHHEHUHEHn}abMɋU8@vnH`ʁ@no]abn#H`qoqoqoqoqooqoqg~MH@JH]HEM 0wH]HEH8[UHSH8HMHUDE DM(U8)E(EU@)E0EE8}@EU@щEE@@E@@EHHEЋEHHEHUHEHn}oupMɋU8@vnH`ʁ@=nopn#H`qog~MH@uH]HEM uwH]HEH8[UHVSHPHMHUDE DM(U )E(EU )E0EE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filter_shrink_X_SSEfilter_shrink_Y_MMXfilter_shrink_Y_SSEfilter_expand_X_MMXfilter_expand_X_SSEfilter_expand_Y_MMXfilter_expand_Y_SSE././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/pip_config.ini0000644000175100001770000000054314676242340017524 0ustar00runnerdocker# this file primarily exists for the benefit of CI # CI sets this file for 'PIP_CONFIG_FILE', which helps speed up CI builds # by making use of all cores on a machine [wheel] # preserve this multiline assignment to register these args as distinct # use -j3 to use 3 cores, most CI machines have either 2 or 3 cores global-option = build_ext -j3 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/setup_win_common.py0000644000175100001770000000170214676242340020643 0ustar00runnerdocker# module setup_win_common.py """A module for reading the information common to all Windows setups. Exports read and get_definitions. """ import os PATH = os.path.join('buildconfig', 'Setup_Win_Common.in') class Definition: def __init__(self, name, value): self.name = name self.value = value def read(): """Return the contents of the Windows Common Setup as a string""" with open(PATH) as setup_in: return setup_in.read() def get_definitions(): """Return a list of definitions in the Windows Common Setup Each macro definition object has a 'name' and 'value' attribute. """ import re deps = [] match = re.compile(r'([a-zA-Z0-9_]+) += +(.+)$').match with open(PATH) as setup_in: for line in setup_in: m = match(line) if m is not None: deps.append(Definition(m.group(1), m.group(2))) return deps __all__= ['read', 'get_definitions'] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9901257 pygame-2.6.1/buildconfig/stubs/0000755000175100001770000000000014676242436016052 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/gen_stubs.py0000644000175100001770000000765214676242340020421 0ustar00runnerdocker""" buildconfig/stubs/gen_stubs.py A script to auto-generate locals.pyi, constants.pyi and __init__.pyi typestubs """ import pathlib from typing import Any import pygame.constants import pygame.locals doc_as_comment = __doc__.replace("\n", "\n# ").strip() if __doc__ else "" info_header = f"{doc_as_comment} IMPORTANT NOTE: Do not edit this file by hand!\n\n" # pygame submodules that are auto-imported must be kept in this list # keep in mind that not all pygame modules are auto-imported, hence not all # pygame submodules make it to this list PG_AUTOIMPORT_SUBMODS = [ "display", "draw", "event", "font", "image", "key", "mixer", "mouse", "time", "cursors", "joystick", "math", "mask", "pixelcopy", "sndarray", "sprite", "surfarray", "transform", "fastevent", "scrap", "threads", "version", "base", "bufferproxy", "color", "colordict", "mixer_music", "pixelarray", "rect", "rwobject", "surface", "surflock", "sysfont", ] # pygame classes that are autoimported into main namespace are kept in this dict PG_AUTOIMPORT_CLASSES = { "rect": ["Rect"], "surface": ["Surface", "SurfaceType"], "color": ["Color"], "pixelarray": ["PixelArray"], "math": ["Vector2", "Vector3"], "cursors": ["Cursor"], "bufferproxy": ["BufferProxy"], "mask": ["Mask"], } # pygame modules from which __init__.py does the equivalent of # from submod import * # should be kept here PG_STAR_IMPORTS = ("base", "rwobject", "version", "constants") def get_all(mod: Any): """ Get the attributes that are imported from 'mod' when 'from mod import *' First try to use '__all__' if it is defined, else fallback to 'dir' """ if hasattr(mod, "__all__") and isinstance(mod.__all__, list): return sorted({str(i) for i in mod.__all__}) return [i for i in dir(mod) if not i.startswith("_")] # store all imports of __init__.pyi pygame_all_imports = {"pygame": PG_AUTOIMPORT_SUBMODS} for k, v in PG_AUTOIMPORT_CLASSES.items(): pygame_all_imports[f".{k}"] = v for k in PG_STAR_IMPORTS: pygame_all_imports[f".{k}"] = get_all(getattr(pygame, k)) # misc stubs that must be added to __init__.pyi misc_stubs = """ from typing import Tuple, NoReturn def Overlay(format: int, size: Tuple[int, int]) -> NoReturn: ... """ # write constants.pyi file constants_file = pathlib.Path(__file__).parent / "pygame" / "constants.pyi" with open(constants_file, "w") as f: # write the module docstring of this file in the generated file, so that # people know this file exists f.write(info_header) for element in pygame_all_imports[".constants"]: constant_type = getattr(pygame.constants, element).__class__.__name__ f.write(f"{element}: {constant_type}\n") # write __init__.pyi file init_file = pathlib.Path(__file__).parent / "pygame" / "__init__.pyi" with open(init_file, "w") as f: # write the module docstring of this file in the generated file, so that # people know this file exists f.write(info_header) f.write(misc_stubs) for mod, items in pygame_all_imports.items(): if len(items) <= 4: # try to write imports in a single line if it can fit the line limit import_items = (f"{string} as {string}" for string in items) import_line = f"\nfrom {mod} import {', '.join(import_items)}" if len(import_line) <= 88: f.write(import_line) continue f.write(f"\nfrom {mod} import (\n") for item in items: f.write(f" {item} as {item},\n") f.write(")\n") # write locals.pyi file locals_file = pathlib.Path(__file__).parent / "pygame" / "locals.pyi" with open(locals_file, "w") as f: f.write(info_header) for element in get_all(pygame.locals): constant_type = getattr(pygame.locals, element).__class__.__name__ f.write(f"{element}: {constant_type}\n") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/mypy_allow_list.txt0000644000175100001770000000164014676242340022035 0ustar00runnerdocker# This is an "allowlist" used by mypy stubtest. The modules/classes/functions # listed here are not checked by the mypy stubtest program # This allowlist supports regex # This is not a real typestub file, it is used only in the typestubs to export # a few utility typestub definitions pygame\._common # cython files have this top level dunder pygame\._sdl2\..*\.__test__ # cython classes have some special dunders for internal use, ignore that in # stubtest pygame\._sdl2\..*\.__pyx_.*__ pygame\._sdl2\..*\.__setstate_cython__ pygame\._sdl2\..*\.__reduce_cython__ # don't look for stubs for examples or for tests pygame\.examples.* pygame\.tests.* # don't look for stubs for pyinstaller hook pygame\.__pyinstaller.* # don't look for stubs for these private modules either pygame\.draw_py pygame\.ftfont pygame\.imageext pygame\.macosx pygame\.newbuffer pygame\.pkgdata pygame\.pypm pygame\._sdl2\.mixer pygame\.sysfont.* ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9921257 pygame-2.6.1/buildconfig/stubs/pygame/0000755000175100001770000000000014676242436017334 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/pygame/.flake80000644000175100001770000000126314676242340020503 0ustar00runnerdocker# Some PEP8 deviations are considered irrelevant to stub files: # (error counts as of 2017-05-22) # 17952 E704 multiple statements on one line (def) # 12197 E301 expected 1 blank line # 7155 E302 expected 2 blank lines # 1463 F401 imported but unused # 967 E701 multiple statements on one line (colon) # 457 F811 redefinition # 390 E305 expected 2 blank lines # 4 E741 ambiguous variable name # Nice-to-haves ignored for now # 2307 E501 line too long # Other ignored warnings # W504 line break after binary operator [flake8] ignore = B303, E301, E302, E305, E501, E701, E704, E741, F401, F403, F405, F811, W504 exclude = ./.*,@* max-line-length = 130 statistics = True ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/pygame/__init__.pyi0000644000175100001770000004766014676242340021625 0ustar00runnerdocker# buildconfig/stubs/gen_stubs.py # A script to auto-generate locals.pyi, constants.pyi and __init__.pyi typestubs # IMPORTANT NOTE: Do not edit this file by hand! from typing import Tuple, NoReturn def Overlay(format: int, size: Tuple[int, int]) -> NoReturn: ... from pygame import ( display as display, draw as draw, event as event, font as font, image as image, key as key, mixer as mixer, mouse as mouse, time as time, cursors as cursors, joystick as joystick, math as math, mask as mask, pixelcopy as pixelcopy, sndarray as sndarray, sprite as sprite, surfarray as surfarray, transform as transform, fastevent as fastevent, scrap as scrap, threads as threads, version as version, base as base, bufferproxy as bufferproxy, color as color, colordict as colordict, mixer_music as mixer_music, pixelarray as pixelarray, rect as rect, rwobject as rwobject, surface as surface, surflock as surflock, sysfont as sysfont, ) from .rect import Rect as Rect from .surface import Surface as Surface, SurfaceType as SurfaceType from .color import Color as Color from .pixelarray import PixelArray as PixelArray from .math import Vector2 as Vector2, Vector3 as Vector3 from .cursors import Cursor as Cursor from .bufferproxy import BufferProxy as BufferProxy from .mask import Mask as Mask from .base import ( BufferError as BufferError, HAVE_NEWBUF as HAVE_NEWBUF, error as error, get_array_interface as get_array_interface, get_error as get_error, get_init as get_init, get_sdl_byteorder as get_sdl_byteorder, get_sdl_version as get_sdl_version, init as init, quit as quit, register_quit as register_quit, set_error as set_error, ) from .rwobject import ( encode_file_path as encode_file_path, encode_string as encode_string, ) from .version import SDL as SDL, rev as rev, ver as ver, vernum as vernum, ver as __version__ from .constants import ( ACTIVEEVENT as ACTIVEEVENT, ANYFORMAT as ANYFORMAT, APPACTIVE as APPACTIVE, APPINPUTFOCUS as APPINPUTFOCUS, APPMOUSEFOCUS as APPMOUSEFOCUS, APP_DIDENTERBACKGROUND as APP_DIDENTERBACKGROUND, APP_DIDENTERFOREGROUND as APP_DIDENTERFOREGROUND, APP_LOWMEMORY as APP_LOWMEMORY, APP_TERMINATING as APP_TERMINATING, APP_WILLENTERBACKGROUND as APP_WILLENTERBACKGROUND, APP_WILLENTERFOREGROUND as APP_WILLENTERFOREGROUND, ASYNCBLIT as ASYNCBLIT, AUDIODEVICEADDED as AUDIODEVICEADDED, AUDIODEVICEREMOVED as AUDIODEVICEREMOVED, AUDIO_ALLOW_ANY_CHANGE as AUDIO_ALLOW_ANY_CHANGE, AUDIO_ALLOW_CHANNELS_CHANGE as AUDIO_ALLOW_CHANNELS_CHANGE, AUDIO_ALLOW_FORMAT_CHANGE as AUDIO_ALLOW_FORMAT_CHANGE, AUDIO_ALLOW_FREQUENCY_CHANGE as AUDIO_ALLOW_FREQUENCY_CHANGE, AUDIO_S16 as AUDIO_S16, AUDIO_S16LSB as AUDIO_S16LSB, AUDIO_S16MSB as AUDIO_S16MSB, AUDIO_S16SYS as AUDIO_S16SYS, AUDIO_S8 as AUDIO_S8, AUDIO_U16 as AUDIO_U16, AUDIO_U16LSB as AUDIO_U16LSB, AUDIO_U16MSB as AUDIO_U16MSB, AUDIO_U16SYS as AUDIO_U16SYS, AUDIO_U8 as AUDIO_U8, BIG_ENDIAN as BIG_ENDIAN, BLENDMODE_ADD as BLENDMODE_ADD, BLENDMODE_BLEND as BLENDMODE_BLEND, BLENDMODE_MOD as BLENDMODE_MOD, BLENDMODE_NONE as BLENDMODE_NONE, BLEND_ADD as BLEND_ADD, BLEND_ALPHA_SDL2 as BLEND_ALPHA_SDL2, BLEND_MAX as BLEND_MAX, BLEND_MIN as BLEND_MIN, BLEND_MULT as BLEND_MULT, BLEND_PREMULTIPLIED as BLEND_PREMULTIPLIED, BLEND_RGBA_ADD as BLEND_RGBA_ADD, BLEND_RGBA_MAX as BLEND_RGBA_MAX, BLEND_RGBA_MIN as BLEND_RGBA_MIN, BLEND_RGBA_MULT as BLEND_RGBA_MULT, BLEND_RGBA_SUB as BLEND_RGBA_SUB, BLEND_RGB_ADD as BLEND_RGB_ADD, BLEND_RGB_MAX as BLEND_RGB_MAX, BLEND_RGB_MIN as BLEND_RGB_MIN, BLEND_RGB_MULT as BLEND_RGB_MULT, BLEND_RGB_SUB as BLEND_RGB_SUB, BLEND_SUB as BLEND_SUB, BUTTON_LEFT as BUTTON_LEFT, BUTTON_MIDDLE as BUTTON_MIDDLE, BUTTON_RIGHT as BUTTON_RIGHT, BUTTON_WHEELDOWN as BUTTON_WHEELDOWN, BUTTON_WHEELUP as BUTTON_WHEELUP, BUTTON_X1 as BUTTON_X1, BUTTON_X2 as BUTTON_X2, CLIPBOARDUPDATE as CLIPBOARDUPDATE, CONTROLLERAXISMOTION as CONTROLLERAXISMOTION, CONTROLLERBUTTONDOWN as CONTROLLERBUTTONDOWN, CONTROLLERBUTTONUP as CONTROLLERBUTTONUP, CONTROLLERDEVICEADDED as CONTROLLERDEVICEADDED, CONTROLLERDEVICEREMAPPED as CONTROLLERDEVICEREMAPPED, CONTROLLERDEVICEREMOVED as CONTROLLERDEVICEREMOVED, CONTROLLERSENSORUPDATE as CONTROLLERSENSORUPDATE, CONTROLLERTOUCHPADDOWN as CONTROLLERTOUCHPADDOWN, CONTROLLERTOUCHPADMOTION as CONTROLLERTOUCHPADMOTION, CONTROLLERTOUCHPADUP as CONTROLLERTOUCHPADUP, CONTROLLER_AXIS_INVALID as CONTROLLER_AXIS_INVALID, CONTROLLER_AXIS_LEFTX as CONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY as CONTROLLER_AXIS_LEFTY, CONTROLLER_AXIS_MAX as CONTROLLER_AXIS_MAX, CONTROLLER_AXIS_RIGHTX as CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY as CONTROLLER_AXIS_RIGHTY, CONTROLLER_AXIS_TRIGGERLEFT as CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHT as CONTROLLER_AXIS_TRIGGERRIGHT, CONTROLLER_BUTTON_A as CONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B as CONTROLLER_BUTTON_B, CONTROLLER_BUTTON_BACK as CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_DPAD_DOWN as CONTROLLER_BUTTON_DPAD_DOWN, CONTROLLER_BUTTON_DPAD_LEFT as CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT as CONTROLLER_BUTTON_DPAD_RIGHT, CONTROLLER_BUTTON_DPAD_UP as CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_GUIDE as CONTROLLER_BUTTON_GUIDE, CONTROLLER_BUTTON_INVALID as CONTROLLER_BUTTON_INVALID, CONTROLLER_BUTTON_LEFTSHOULDER as CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_LEFTSTICK as CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_MAX as CONTROLLER_BUTTON_MAX, CONTROLLER_BUTTON_RIGHTSHOULDER as CONTROLLER_BUTTON_RIGHTSHOULDER, CONTROLLER_BUTTON_RIGHTSTICK as CONTROLLER_BUTTON_RIGHTSTICK, CONTROLLER_BUTTON_START as CONTROLLER_BUTTON_START, CONTROLLER_BUTTON_X as CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y as CONTROLLER_BUTTON_Y, DOUBLEBUF as DOUBLEBUF, DROPBEGIN as DROPBEGIN, DROPCOMPLETE as DROPCOMPLETE, DROPFILE as DROPFILE, DROPTEXT as DROPTEXT, FINGERDOWN as FINGERDOWN, FINGERMOTION as FINGERMOTION, FINGERUP as FINGERUP, FULLSCREEN as FULLSCREEN, GL_ACCELERATED_VISUAL as GL_ACCELERATED_VISUAL, GL_ACCUM_ALPHA_SIZE as GL_ACCUM_ALPHA_SIZE, GL_ACCUM_BLUE_SIZE as GL_ACCUM_BLUE_SIZE, GL_ACCUM_GREEN_SIZE as GL_ACCUM_GREEN_SIZE, GL_ACCUM_RED_SIZE as GL_ACCUM_RED_SIZE, GL_ALPHA_SIZE as GL_ALPHA_SIZE, GL_BLUE_SIZE as GL_BLUE_SIZE, GL_BUFFER_SIZE as GL_BUFFER_SIZE, GL_CONTEXT_DEBUG_FLAG as GL_CONTEXT_DEBUG_FLAG, GL_CONTEXT_FLAGS as GL_CONTEXT_FLAGS, GL_CONTEXT_FORWARD_COMPATIBLE_FLAG as GL_CONTEXT_FORWARD_COMPATIBLE_FLAG, GL_CONTEXT_MAJOR_VERSION as GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION as GL_CONTEXT_MINOR_VERSION, GL_CONTEXT_PROFILE_COMPATIBILITY as GL_CONTEXT_PROFILE_COMPATIBILITY, GL_CONTEXT_PROFILE_CORE as GL_CONTEXT_PROFILE_CORE, GL_CONTEXT_PROFILE_ES as GL_CONTEXT_PROFILE_ES, GL_CONTEXT_PROFILE_MASK as GL_CONTEXT_PROFILE_MASK, GL_CONTEXT_RELEASE_BEHAVIOR as GL_CONTEXT_RELEASE_BEHAVIOR, GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH as GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH, GL_CONTEXT_RELEASE_BEHAVIOR_NONE as GL_CONTEXT_RELEASE_BEHAVIOR_NONE, GL_CONTEXT_RESET_ISOLATION_FLAG as GL_CONTEXT_RESET_ISOLATION_FLAG, GL_CONTEXT_ROBUST_ACCESS_FLAG as GL_CONTEXT_ROBUST_ACCESS_FLAG, GL_DEPTH_SIZE as GL_DEPTH_SIZE, GL_DOUBLEBUFFER as GL_DOUBLEBUFFER, GL_FRAMEBUFFER_SRGB_CAPABLE as GL_FRAMEBUFFER_SRGB_CAPABLE, GL_GREEN_SIZE as GL_GREEN_SIZE, GL_MULTISAMPLEBUFFERS as GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES as GL_MULTISAMPLESAMPLES, GL_RED_SIZE as GL_RED_SIZE, GL_SHARE_WITH_CURRENT_CONTEXT as GL_SHARE_WITH_CURRENT_CONTEXT, GL_STENCIL_SIZE as GL_STENCIL_SIZE, GL_STEREO as GL_STEREO, GL_SWAP_CONTROL as GL_SWAP_CONTROL, HAT_CENTERED as HAT_CENTERED, HAT_DOWN as HAT_DOWN, HAT_LEFT as HAT_LEFT, HAT_LEFTDOWN as HAT_LEFTDOWN, HAT_LEFTUP as HAT_LEFTUP, HAT_RIGHT as HAT_RIGHT, HAT_RIGHTDOWN as HAT_RIGHTDOWN, HAT_RIGHTUP as HAT_RIGHTUP, HAT_UP as HAT_UP, HIDDEN as HIDDEN, HWACCEL as HWACCEL, HWPALETTE as HWPALETTE, HWSURFACE as HWSURFACE, JOYAXISMOTION as JOYAXISMOTION, JOYBALLMOTION as JOYBALLMOTION, JOYBUTTONDOWN as JOYBUTTONDOWN, JOYBUTTONUP as JOYBUTTONUP, JOYDEVICEADDED as JOYDEVICEADDED, JOYDEVICEREMOVED as JOYDEVICEREMOVED, JOYHATMOTION as JOYHATMOTION, KEYDOWN as KEYDOWN, KEYMAPCHANGED as KEYMAPCHANGED, KEYUP as KEYUP, KMOD_ALT as KMOD_ALT, KMOD_CAPS as KMOD_CAPS, KMOD_CTRL as KMOD_CTRL, KMOD_GUI as KMOD_GUI, KMOD_LALT as KMOD_LALT, KMOD_LCTRL as KMOD_LCTRL, KMOD_LGUI as KMOD_LGUI, KMOD_LMETA as KMOD_LMETA, KMOD_LSHIFT as KMOD_LSHIFT, KMOD_META as KMOD_META, KMOD_MODE as KMOD_MODE, KMOD_NONE as KMOD_NONE, KMOD_NUM as KMOD_NUM, KMOD_RALT as KMOD_RALT, KMOD_RCTRL as KMOD_RCTRL, KMOD_RGUI as KMOD_RGUI, KMOD_RMETA as KMOD_RMETA, KMOD_RSHIFT as KMOD_RSHIFT, KMOD_SHIFT as KMOD_SHIFT, KSCAN_0 as KSCAN_0, KSCAN_1 as KSCAN_1, KSCAN_2 as KSCAN_2, KSCAN_3 as KSCAN_3, KSCAN_4 as KSCAN_4, KSCAN_5 as KSCAN_5, KSCAN_6 as KSCAN_6, KSCAN_7 as KSCAN_7, KSCAN_8 as KSCAN_8, KSCAN_9 as KSCAN_9, KSCAN_A as KSCAN_A, KSCAN_AC_BACK as KSCAN_AC_BACK, KSCAN_APOSTROPHE as KSCAN_APOSTROPHE, KSCAN_B as KSCAN_B, KSCAN_BACKSLASH as KSCAN_BACKSLASH, KSCAN_BACKSPACE as KSCAN_BACKSPACE, KSCAN_BREAK as KSCAN_BREAK, KSCAN_C as KSCAN_C, KSCAN_CAPSLOCK as KSCAN_CAPSLOCK, KSCAN_CLEAR as KSCAN_CLEAR, KSCAN_COMMA as KSCAN_COMMA, KSCAN_CURRENCYSUBUNIT as KSCAN_CURRENCYSUBUNIT, KSCAN_CURRENCYUNIT as KSCAN_CURRENCYUNIT, KSCAN_D as KSCAN_D, KSCAN_DELETE as KSCAN_DELETE, KSCAN_DOWN as KSCAN_DOWN, KSCAN_E as KSCAN_E, KSCAN_END as KSCAN_END, KSCAN_EQUALS as KSCAN_EQUALS, KSCAN_ESCAPE as KSCAN_ESCAPE, KSCAN_EURO as KSCAN_EURO, KSCAN_F as KSCAN_F, KSCAN_F1 as KSCAN_F1, KSCAN_F10 as KSCAN_F10, KSCAN_F11 as KSCAN_F11, KSCAN_F12 as KSCAN_F12, KSCAN_F13 as KSCAN_F13, KSCAN_F14 as KSCAN_F14, KSCAN_F15 as KSCAN_F15, KSCAN_F2 as KSCAN_F2, KSCAN_F3 as KSCAN_F3, KSCAN_F4 as KSCAN_F4, KSCAN_F5 as KSCAN_F5, KSCAN_F6 as KSCAN_F6, KSCAN_F7 as KSCAN_F7, KSCAN_F8 as KSCAN_F8, KSCAN_F9 as KSCAN_F9, KSCAN_G as KSCAN_G, KSCAN_GRAVE as KSCAN_GRAVE, KSCAN_H as KSCAN_H, KSCAN_HELP as KSCAN_HELP, KSCAN_HOME as KSCAN_HOME, KSCAN_I as KSCAN_I, KSCAN_INSERT as KSCAN_INSERT, KSCAN_INTERNATIONAL1 as KSCAN_INTERNATIONAL1, KSCAN_INTERNATIONAL2 as KSCAN_INTERNATIONAL2, KSCAN_INTERNATIONAL3 as KSCAN_INTERNATIONAL3, KSCAN_INTERNATIONAL4 as KSCAN_INTERNATIONAL4, KSCAN_INTERNATIONAL5 as KSCAN_INTERNATIONAL5, KSCAN_INTERNATIONAL6 as KSCAN_INTERNATIONAL6, KSCAN_INTERNATIONAL7 as KSCAN_INTERNATIONAL7, KSCAN_INTERNATIONAL8 as KSCAN_INTERNATIONAL8, KSCAN_INTERNATIONAL9 as KSCAN_INTERNATIONAL9, KSCAN_J as KSCAN_J, KSCAN_K as KSCAN_K, KSCAN_KP0 as KSCAN_KP0, KSCAN_KP1 as KSCAN_KP1, KSCAN_KP2 as KSCAN_KP2, KSCAN_KP3 as KSCAN_KP3, KSCAN_KP4 as KSCAN_KP4, KSCAN_KP5 as KSCAN_KP5, KSCAN_KP6 as KSCAN_KP6, KSCAN_KP7 as KSCAN_KP7, KSCAN_KP8 as KSCAN_KP8, KSCAN_KP9 as KSCAN_KP9, KSCAN_KP_0 as KSCAN_KP_0, KSCAN_KP_1 as KSCAN_KP_1, KSCAN_KP_2 as KSCAN_KP_2, KSCAN_KP_3 as KSCAN_KP_3, KSCAN_KP_4 as KSCAN_KP_4, KSCAN_KP_5 as KSCAN_KP_5, KSCAN_KP_6 as KSCAN_KP_6, KSCAN_KP_7 as KSCAN_KP_7, KSCAN_KP_8 as KSCAN_KP_8, KSCAN_KP_9 as KSCAN_KP_9, KSCAN_KP_DIVIDE as KSCAN_KP_DIVIDE, KSCAN_KP_ENTER as KSCAN_KP_ENTER, KSCAN_KP_EQUALS as KSCAN_KP_EQUALS, KSCAN_KP_MINUS as KSCAN_KP_MINUS, KSCAN_KP_MULTIPLY as KSCAN_KP_MULTIPLY, KSCAN_KP_PERIOD as KSCAN_KP_PERIOD, KSCAN_KP_PLUS as KSCAN_KP_PLUS, KSCAN_L as KSCAN_L, KSCAN_LALT as KSCAN_LALT, KSCAN_LANG1 as KSCAN_LANG1, KSCAN_LANG2 as KSCAN_LANG2, KSCAN_LANG3 as KSCAN_LANG3, KSCAN_LANG4 as KSCAN_LANG4, KSCAN_LANG5 as KSCAN_LANG5, KSCAN_LANG6 as KSCAN_LANG6, KSCAN_LANG7 as KSCAN_LANG7, KSCAN_LANG8 as KSCAN_LANG8, KSCAN_LANG9 as KSCAN_LANG9, KSCAN_LCTRL as KSCAN_LCTRL, KSCAN_LEFT as KSCAN_LEFT, KSCAN_LEFTBRACKET as KSCAN_LEFTBRACKET, KSCAN_LGUI as KSCAN_LGUI, KSCAN_LMETA as KSCAN_LMETA, KSCAN_LSHIFT as KSCAN_LSHIFT, KSCAN_LSUPER as KSCAN_LSUPER, KSCAN_M as KSCAN_M, KSCAN_MENU as KSCAN_MENU, KSCAN_MINUS as KSCAN_MINUS, KSCAN_MODE as KSCAN_MODE, KSCAN_N as KSCAN_N, KSCAN_NONUSBACKSLASH as KSCAN_NONUSBACKSLASH, KSCAN_NONUSHASH as KSCAN_NONUSHASH, KSCAN_NUMLOCK as KSCAN_NUMLOCK, KSCAN_NUMLOCKCLEAR as KSCAN_NUMLOCKCLEAR, KSCAN_O as KSCAN_O, KSCAN_P as KSCAN_P, KSCAN_PAGEDOWN as KSCAN_PAGEDOWN, KSCAN_PAGEUP as KSCAN_PAGEUP, KSCAN_PAUSE as KSCAN_PAUSE, KSCAN_PERIOD as KSCAN_PERIOD, KSCAN_POWER as KSCAN_POWER, KSCAN_PRINT as KSCAN_PRINT, KSCAN_PRINTSCREEN as KSCAN_PRINTSCREEN, KSCAN_Q as KSCAN_Q, KSCAN_R as KSCAN_R, KSCAN_RALT as KSCAN_RALT, KSCAN_RCTRL as KSCAN_RCTRL, KSCAN_RETURN as KSCAN_RETURN, KSCAN_RGUI as KSCAN_RGUI, KSCAN_RIGHT as KSCAN_RIGHT, KSCAN_RIGHTBRACKET as KSCAN_RIGHTBRACKET, KSCAN_RMETA as KSCAN_RMETA, KSCAN_RSHIFT as KSCAN_RSHIFT, KSCAN_RSUPER as KSCAN_RSUPER, KSCAN_S as KSCAN_S, KSCAN_SCROLLLOCK as KSCAN_SCROLLLOCK, KSCAN_SCROLLOCK as KSCAN_SCROLLOCK, KSCAN_SEMICOLON as KSCAN_SEMICOLON, KSCAN_SLASH as KSCAN_SLASH, KSCAN_SPACE as KSCAN_SPACE, KSCAN_SYSREQ as KSCAN_SYSREQ, KSCAN_T as KSCAN_T, KSCAN_TAB as KSCAN_TAB, KSCAN_U as KSCAN_U, KSCAN_UNKNOWN as KSCAN_UNKNOWN, KSCAN_UP as KSCAN_UP, KSCAN_V as KSCAN_V, KSCAN_W as KSCAN_W, KSCAN_X as KSCAN_X, KSCAN_Y as KSCAN_Y, KSCAN_Z as KSCAN_Z, K_0 as K_0, K_1 as K_1, K_2 as K_2, K_3 as K_3, K_4 as K_4, K_5 as K_5, K_6 as K_6, K_7 as K_7, K_8 as K_8, K_9 as K_9, K_AC_BACK as K_AC_BACK, K_AMPERSAND as K_AMPERSAND, K_ASTERISK as K_ASTERISK, K_AT as K_AT, K_BACKQUOTE as K_BACKQUOTE, K_BACKSLASH as K_BACKSLASH, K_BACKSPACE as K_BACKSPACE, K_BREAK as K_BREAK, K_CAPSLOCK as K_CAPSLOCK, K_CARET as K_CARET, K_CLEAR as K_CLEAR, K_COLON as K_COLON, K_COMMA as K_COMMA, K_CURRENCYSUBUNIT as K_CURRENCYSUBUNIT, K_CURRENCYUNIT as K_CURRENCYUNIT, K_DELETE as K_DELETE, K_DOLLAR as K_DOLLAR, K_DOWN as K_DOWN, K_END as K_END, K_EQUALS as K_EQUALS, K_ESCAPE as K_ESCAPE, K_EURO as K_EURO, K_EXCLAIM as K_EXCLAIM, K_F1 as K_F1, K_F10 as K_F10, K_F11 as K_F11, K_F12 as K_F12, K_F13 as K_F13, K_F14 as K_F14, K_F15 as K_F15, K_F2 as K_F2, K_F3 as K_F3, K_F4 as K_F4, K_F5 as K_F5, K_F6 as K_F6, K_F7 as K_F7, K_F8 as K_F8, K_F9 as K_F9, K_GREATER as K_GREATER, K_HASH as K_HASH, K_HELP as K_HELP, K_HOME as K_HOME, K_INSERT as K_INSERT, K_KP0 as K_KP0, K_KP1 as K_KP1, K_KP2 as K_KP2, K_KP3 as K_KP3, K_KP4 as K_KP4, K_KP5 as K_KP5, K_KP6 as K_KP6, K_KP7 as K_KP7, K_KP8 as K_KP8, K_KP9 as K_KP9, K_KP_0 as K_KP_0, K_KP_1 as K_KP_1, K_KP_2 as K_KP_2, K_KP_3 as K_KP_3, K_KP_4 as K_KP_4, K_KP_5 as K_KP_5, K_KP_6 as K_KP_6, K_KP_7 as K_KP_7, K_KP_8 as K_KP_8, K_KP_9 as K_KP_9, K_KP_DIVIDE as K_KP_DIVIDE, K_KP_ENTER as K_KP_ENTER, K_KP_EQUALS as K_KP_EQUALS, K_KP_MINUS as K_KP_MINUS, K_KP_MULTIPLY as K_KP_MULTIPLY, K_KP_PERIOD as K_KP_PERIOD, K_KP_PLUS as K_KP_PLUS, K_LALT as K_LALT, K_LCTRL as K_LCTRL, K_LEFT as K_LEFT, K_LEFTBRACKET as K_LEFTBRACKET, K_LEFTPAREN as K_LEFTPAREN, K_LESS as K_LESS, K_LGUI as K_LGUI, K_LMETA as K_LMETA, K_LSHIFT as K_LSHIFT, K_LSUPER as K_LSUPER, K_MENU as K_MENU, K_MINUS as K_MINUS, K_MODE as K_MODE, K_NUMLOCK as K_NUMLOCK, K_NUMLOCKCLEAR as K_NUMLOCKCLEAR, K_PAGEDOWN as K_PAGEDOWN, K_PAGEUP as K_PAGEUP, K_PAUSE as K_PAUSE, K_PERCENT as K_PERCENT, K_PERIOD as K_PERIOD, K_PLUS as K_PLUS, K_POWER as K_POWER, K_PRINT as K_PRINT, K_PRINTSCREEN as K_PRINTSCREEN, K_QUESTION as K_QUESTION, K_QUOTE as K_QUOTE, K_QUOTEDBL as K_QUOTEDBL, K_RALT as K_RALT, K_RCTRL as K_RCTRL, K_RETURN as K_RETURN, K_RGUI as K_RGUI, K_RIGHT as K_RIGHT, K_RIGHTBRACKET as K_RIGHTBRACKET, K_RIGHTPAREN as K_RIGHTPAREN, K_RMETA as K_RMETA, K_RSHIFT as K_RSHIFT, K_RSUPER as K_RSUPER, K_SCROLLLOCK as K_SCROLLLOCK, K_SCROLLOCK as K_SCROLLOCK, K_SEMICOLON as K_SEMICOLON, K_SLASH as K_SLASH, K_SPACE as K_SPACE, K_SYSREQ as K_SYSREQ, K_TAB as K_TAB, K_UNDERSCORE as K_UNDERSCORE, K_UNKNOWN as K_UNKNOWN, K_UP as K_UP, K_a as K_a, K_b as K_b, K_c as K_c, K_d as K_d, K_e as K_e, K_f as K_f, K_g as K_g, K_h as K_h, K_i as K_i, K_j as K_j, K_k as K_k, K_l as K_l, K_m as K_m, K_n as K_n, K_o as K_o, K_p as K_p, K_q as K_q, K_r as K_r, K_s as K_s, K_t as K_t, K_u as K_u, K_v as K_v, K_w as K_w, K_x as K_x, K_y as K_y, K_z as K_z, LIL_ENDIAN as LIL_ENDIAN, LOCALECHANGED as LOCALECHANGED, MIDIIN as MIDIIN, MIDIOUT as MIDIOUT, MOUSEBUTTONDOWN as MOUSEBUTTONDOWN, MOUSEBUTTONUP as MOUSEBUTTONUP, MOUSEMOTION as MOUSEMOTION, MOUSEWHEEL as MOUSEWHEEL, MULTIGESTURE as MULTIGESTURE, NOEVENT as NOEVENT, NOFRAME as NOFRAME, NUMEVENTS as NUMEVENTS, OPENGL as OPENGL, OPENGLBLIT as OPENGLBLIT, PREALLOC as PREALLOC, QUIT as QUIT, RENDER_DEVICE_RESET as RENDER_DEVICE_RESET, RENDER_TARGETS_RESET as RENDER_TARGETS_RESET, RESIZABLE as RESIZABLE, RLEACCEL as RLEACCEL, RLEACCELOK as RLEACCELOK, SCALED as SCALED, SCRAP_BMP as SCRAP_BMP, SCRAP_CLIPBOARD as SCRAP_CLIPBOARD, SCRAP_PBM as SCRAP_PBM, SCRAP_PPM as SCRAP_PPM, SCRAP_SELECTION as SCRAP_SELECTION, SCRAP_TEXT as SCRAP_TEXT, SHOWN as SHOWN, SRCALPHA as SRCALPHA, SRCCOLORKEY as SRCCOLORKEY, SWSURFACE as SWSURFACE, SYSTEM_CURSOR_ARROW as SYSTEM_CURSOR_ARROW, SYSTEM_CURSOR_CROSSHAIR as SYSTEM_CURSOR_CROSSHAIR, SYSTEM_CURSOR_HAND as SYSTEM_CURSOR_HAND, SYSTEM_CURSOR_IBEAM as SYSTEM_CURSOR_IBEAM, SYSTEM_CURSOR_NO as SYSTEM_CURSOR_NO, SYSTEM_CURSOR_SIZEALL as SYSTEM_CURSOR_SIZEALL, SYSTEM_CURSOR_SIZENESW as SYSTEM_CURSOR_SIZENESW, SYSTEM_CURSOR_SIZENS as SYSTEM_CURSOR_SIZENS, SYSTEM_CURSOR_SIZENWSE as SYSTEM_CURSOR_SIZENWSE, SYSTEM_CURSOR_SIZEWE as SYSTEM_CURSOR_SIZEWE, SYSTEM_CURSOR_WAIT as SYSTEM_CURSOR_WAIT, SYSTEM_CURSOR_WAITARROW as SYSTEM_CURSOR_WAITARROW, SYSWMEVENT as SYSWMEVENT, TEXTEDITING as TEXTEDITING, TEXTINPUT as TEXTINPUT, TIMER_RESOLUTION as TIMER_RESOLUTION, USEREVENT as USEREVENT, USEREVENT_DROPFILE as USEREVENT_DROPFILE, VIDEOEXPOSE as VIDEOEXPOSE, VIDEORESIZE as VIDEORESIZE, WINDOWCLOSE as WINDOWCLOSE, WINDOWDISPLAYCHANGED as WINDOWDISPLAYCHANGED, WINDOWENTER as WINDOWENTER, WINDOWEXPOSED as WINDOWEXPOSED, WINDOWFOCUSGAINED as WINDOWFOCUSGAINED, WINDOWFOCUSLOST as WINDOWFOCUSLOST, WINDOWHIDDEN as WINDOWHIDDEN, WINDOWHITTEST as WINDOWHITTEST, WINDOWICCPROFCHANGED as WINDOWICCPROFCHANGED, WINDOWLEAVE as WINDOWLEAVE, WINDOWMAXIMIZED as WINDOWMAXIMIZED, WINDOWMINIMIZED as WINDOWMINIMIZED, WINDOWMOVED as WINDOWMOVED, WINDOWRESIZED as WINDOWRESIZED, WINDOWRESTORED as WINDOWRESTORED, WINDOWSHOWN as WINDOWSHOWN, WINDOWSIZECHANGED as WINDOWSIZECHANGED, WINDOWTAKEFOCUS as WINDOWTAKEFOCUS, ) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/pygame/_common.pyi0000644000175100001770000000250514676242340021502 0ustar00runnerdockerfrom os import PathLike from typing import IO, Callable, Sequence, Tuple, Union from typing_extensions import Literal as Literal from typing_extensions import Protocol from pygame.color import Color from pygame.math import Vector2 from pygame.rect import Rect # For functions that take a file name AnyPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # Most pygame functions that take a file argument should be able to handle # a FileArg type FileArg = Union[AnyPath, IO[bytes], IO[str]] Coordinate = Union[Tuple[float, float], Sequence[float], Vector2] # This typehint is used when a function would return an RGBA tuble RGBAOutput = Tuple[int, int, int, int] ColorValue = Union[Color, int, str, Tuple[int, int, int], RGBAOutput, Sequence[int]] from typing import Union def my_function(my_var: Union[int, float, complex]) -> None: print(my_var) _CanBeRect = Union[ Rect, Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int]], Tuple[Coordinate, Coordinate], Sequence[Union[float, int]], Sequence[Coordinate], ] class _HasRectAttribute(Protocol): # An object that has a rect attribute that is either a rect, or a function # that returns a rect confirms to the rect protocol rect: Union[RectValue, Callable[[], RectValue]] RectValue = Union[_CanBeRect, _HasRectAttribute] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9931257 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/0000755000175100001770000000000014676242436020337 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/__init__.pyi0000644000175100001770000000014214676242340022610 0ustar00runnerdockerfrom pygame._sdl2.audio import * from pygame._sdl2.sdl2 import * from pygame._sdl2.video import * ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.968112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/audio.pyi0000644000175100001770000000242414676242340022157 0ustar00runnerdockerfrom typing import Callable, List AUDIO_U8: int AUDIO_S8: int AUDIO_U16LSB: int AUDIO_S16LSB: int AUDIO_U16MSB: int AUDIO_S16MSB: int AUDIO_U16: int AUDIO_S16: int AUDIO_S32LSB: int AUDIO_S32MSB: int AUDIO_S32: int AUDIO_F32LSB: int AUDIO_F32MSB: int AUDIO_F32: int AUDIO_ALLOW_FREQUENCY_CHANGE: int AUDIO_ALLOW_FORMAT_CHANGE: int AUDIO_ALLOW_CHANNELS_CHANGE: int AUDIO_ALLOW_ANY_CHANGE: int def get_audio_device_names(iscapture: bool = False) -> List[str]: ... class AudioDevice: def __init__( self, devicename: str, iscapture: bool, frequency: int, audioformat: int, numchannels: int, chunksize: int, allowed_changes: int, callback: Callable[[AudioDevice, memoryview], None], ) -> None: ... @property def iscapture(self) -> bool: ... @property def deviceid(self) -> int: ... @property def devicename(self) -> str: ... @property def callback(self) -> Callable[[AudioDevice, memoryview], None]: ... @property def frequency(self) -> int: ... @property def audioformat(self) -> int: ... @property def numchannels(self) -> int: ... @property def chunksize(self) -> int: ... def pause(self, pause_on: int) -> None: ... def close(self) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/controller.pyi0000644000175100001770000000221514676242340023237 0ustar00runnerdockerfrom typing import Dict, Mapping, Optional from pygame.joystick import JoystickType def init() -> None: ... def get_init() -> bool: ... def quit() -> None: ... def set_eventstate(state: bool) -> None: ... def get_eventstate() -> bool: ... def update() -> None: ... def get_count() -> int: ... def is_controller(index: int) -> bool: ... def name_forindex(index: int) -> Optional[str]: ... class Controller: def __init__(self, index: int) -> None: ... @property def name(self) -> str: ... @property def id(self) -> int: ... def init(self) -> None: ... def get_init(self) -> bool: ... def quit(self) -> None: ... @staticmethod def from_joystick(joy: JoystickType) -> Controller: ... def attached(self) -> bool: ... def as_joystick(self) -> JoystickType: ... def get_axis(self, axis: int) -> int: ... def get_button(self, button: int) -> bool: ... def get_mapping(self) -> Dict[str, str]: ... def set_mapping(self, mapping: Mapping[str, str]) -> int: ... def rumble( self, low_frequency: float, high_frequency: float, duration: int ) -> bool: ... def stop_rumble(self) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/sdl2.pyi0000644000175100001770000000052214676242340021717 0ustar00runnerdockerfrom typing import Optional INIT_TIMER: int INIT_AUDIO: int INIT_VIDEO: int INIT_JOYSTICK: int INIT_HAPTIC: int INIT_GAMECONTROLLER: int INIT_EVENTS: int INIT_NOPARACHUTE: int INIT_EVERYTHING: int class error(RuntimeError): def __init__(self, message: Optional[str] = None) -> None: ... def init_subsystem(flags: int) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/touch.pyi0000644000175100001770000000034714676242340022202 0ustar00runnerdockerfrom typing import Dict, Union def get_num_devices() -> int: ... def get_device(index: int) -> int: ... def get_num_fingers(device_id: int) -> int: ... def get_finger(touchid: int, index: int) -> Dict[str, Union[int, float]]: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/_sdl2/video.pyi0000644000175100001770000001110514676242340022160 0ustar00runnerdockerfrom typing import Any, Generator, Iterable, Optional, Tuple, Union from pygame.rect import Rect from pygame.surface import Surface from .._common import RectValue, Literal, ColorValue WINDOWPOS_UNDEFINED: int WINDOWPOS_CENTERED: int MESSAGEBOX_ERROR: int MESSAGEBOX_WARNING: int MESSAGEBOX_INFORMATION: int class RendererDriverInfo: name: str flags: int num_texture_formats: int max_texture_width: int max_texture_height: int def get_drivers() -> Generator[RendererDriverInfo, None, None]: ... def get_grabbed_window() -> Optional[Window]: ... def messagebox( title: str, message: str, window: Optional[Window] = None, info: bool = False, warn: bool = False, error: bool = False, buttons: Tuple[str, ...] = ("OK",), return_button: int = 0, escape_button: int = 0, ) -> int: ... class Window: DEFAULT_SIZE: Tuple[Literal[640], Literal[480]] def __init__( self, title: str = "pygame", size: Iterable[int] = (640, 480), position: Optional[Iterable[int]] = None, fullscreen: bool = False, fullscreen_desktop: bool = False, **kwargs: bool ) -> None: ... @classmethod def from_display_module(cls) -> Window: ... @classmethod def from_window(cls, other: int) -> Window: ... grab: bool relative_mouse: bool def set_windowed(self) -> None: ... def set_fullscreen(self, desktop: bool = False) -> None: ... title: str def destroy(self) -> None: ... def hide(self) -> None: ... def show(self) -> None: ... def focus(self, input_only: bool = False) -> None: ... def restore(self) -> None: ... def maximize(self) -> None: ... def minimize(self) -> None: ... resizable: bool borderless: bool def set_icon(self, surface: Surface) -> None: ... id: int size: Iterable[int] position: Union[int, Iterable[int]] opacity: float display_index: int def set_modal_for(self, parent: Window) -> None: ... class Texture: def __init__( self, renderer: Renderer, size: Iterable[int], static: bool = False, streaming: bool = False, target: bool = False, ) -> None: ... @staticmethod def from_surface(renderer: Renderer, surface: Surface) -> Texture: ... renderer: Renderer width: int height: int alpha: int blend_mode: int color: ColorValue def get_rect(self, **kwargs: Any) -> Rect: ... def draw( self, srcrect: Optional[RectValue] = None, dstrect: Optional[RectValue] = None, angle: float = 0.0, origin: Optional[Iterable[int]] = None, flip_x: bool = False, flip_y: bool = False, ) -> None: ... def update(self, surface: Surface, area: Optional[RectValue] = None) -> None: ... class Image: def __init__( self, textureOrImage: Union[Texture, Image], srcrect: Optional[RectValue] = None, ) -> None: ... def get_rect(self, **kwargs: Any) -> Rect: ... def draw( self, srcrect: Optional[RectValue] = None, dstrect: Optional[RectValue] = None ) -> None: ... angle: float origin: Optional[Iterable[float]] flip_x: bool flip_y: bool color: ColorValue alpha: float blend_mode: int texture: Texture srcrect: Rect class Renderer: def __init__( self, window: Window, index: int = -1, accelerated: int = -1, vsync: bool = False, target_texture: bool = False, ) -> None: ... @classmethod def from_window(cls, window: Window) -> Renderer: ... draw_blend_mode: int draw_color: ColorValue def clear(self) -> None: ... def present(self) -> None: ... def get_viewport(self) -> Rect: ... def set_viewport(self, area: Optional[RectValue]) -> None: ... logical_size: Iterable[int] scale: Iterable[float] target: Optional[Texture] def blit( self, source: Union[Texture, Image], dest: Optional[RectValue] = None, area: Optional[RectValue] = None, special_flags: int = 0, ) -> Rect: ... def draw_line(self, p1: Iterable[int], p2: Iterable[int]) -> None: ... def draw_point(self, point: Iterable[int]) -> None: ... def draw_rect(self, rect: RectValue) -> None: ... def fill_rect(self, rect: RectValue) -> None: ... def to_surface( self, surface: Optional[Surface] = None, area: Optional[RectValue] = None ) -> Surface: ... @staticmethod def compose_custom_blend_mode( color_mode: Tuple[int, int, int], alpha_mode: Tuple[int, int, int] ) -> int: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/base.pyi0000644000175100001770000000111214676242340020756 0ustar00runnerdockerfrom typing import Any, Tuple, Callable class error(RuntimeError): ... class BufferError(Exception): ... # Always defined HAVE_NEWBUF: int = 1 def init() -> Tuple[int, int]: ... def quit() -> None: ... def get_init() -> bool: ... def get_error() -> str: ... def set_error(error_msg: str) -> None: ... def get_sdl_version(linked: bool = True) -> Tuple[int, int, int]: ... def get_sdl_byteorder() -> int: ... def register_quit(callable: Callable[[], Any]) -> None: ... # undocumented part of pygame API, kept here to make stubtest happy def get_array_interface(arg: Any) -> dict: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/bufferproxy.pyi0000644000175100001770000000071214676242340022424 0ustar00runnerdockerfrom typing import Any, Dict, overload class BufferProxy: parent: Any length: int raw: bytes # possibly going to be deprecated/removed soon, in which case these # typestubs must be removed too __array_interface__: Dict[str, Any] __array_struct__: Any @overload def __init__(self) -> None: ... @overload def __init__(self, parent: Any) -> None: ... def write(self, buffer: bytes, offset: int = 0) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/camera.pyi0000644000175100001770000000313014676242340021276 0ustar00runnerdockerfrom abc import ABC, abstractmethod from typing import List, Optional, Sequence, Tuple, Union from pygame.surface import Surface def get_backends() -> List[str]: ... def init(backend: Optional[str] = None) -> None: ... def quit() -> None: ... def list_cameras() -> List[str]: ... class AbstractCamera(ABC): @abstractmethod def __init__(self, *args, **kwargs) -> None: ... @abstractmethod def start(self) -> None: ... @abstractmethod def stop(self) -> None: ... @abstractmethod def get_size(self) -> Tuple[int, int]: ... @abstractmethod def query_image(self) -> bool: ... @abstractmethod def get_image(self, dest_surf: Optional[Surface] = None) -> Surface: ... @abstractmethod def get_raw(self) -> bytes: ... # set_controls and get_controls are not a part of the AbstractCamera ABC, # because implementations of the same can vary across different Camera # types class Camera(AbstractCamera): def __init__( self, device: Union[str, int] = 0, size: Union[Tuple[int, int], Sequence[int]] = (640, 480), format: str = "RGB", ) -> None: ... def start(self) -> None: ... def stop(self) -> None: ... def get_controls(self) -> Tuple[bool, bool, int]: ... def set_controls( self, hflip: bool = ..., vflip: bool = ..., brightness: int = ..., ) -> Tuple[bool, bool, int]: ... def get_size(self) -> Tuple[int, int]: ... def query_image(self) -> bool: ... def get_image(self, surface: Optional[Surface] = None) -> Surface: ... def get_raw(self) -> bytes: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/color.pyi0000644000175100001770000000400214676242340021163 0ustar00runnerdockerimport sys from typing import Any, Dict, Iterator, Tuple, overload from ._common import ColorValue if sys.version_info >= (3, 9): from collections.abc import Collection else: from typing import Collection THECOLORS: Dict[str, Tuple[int, int, int, int]] # Color confirms to the Collection ABC, since it also confirms to # Sized, Iterable and Container ABCs class Color(Collection[int]): r: int g: int b: int a: int cmy: Tuple[float, float, float] hsva: Tuple[float, float, float, float] hsla: Tuple[float, float, float, float] i1i2i3: Tuple[float, float, float] __hash__: None # type: ignore __array_struct__: Any @overload def __init__(self, r: int, g: int, b: int, a: int = 255) -> None: ... @overload def __init__(self, rgbvalue: ColorValue) -> None: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> Tuple[int]: ... def __setitem__(self, key: int, value: int) -> None: ... def __iter__(self) -> Iterator[int]: ... def __add__(self, other: Color) -> Color: ... def __sub__(self, other: Color) -> Color: ... def __mul__(self, other: Color) -> Color: ... def __floordiv__(self, other: Color) -> Color: ... def __mod__(self, other: Color) -> Color: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __len__(self) -> int: ... def __index__(self) -> int: ... def __invert__(self) -> Color: ... def __contains__(self, other: int) -> bool: ... # type: ignore[override] def normalize(self) -> Tuple[float, float, float, float]: ... def correct_gamma(self, gamma: float) -> Color: ... def set_length(self, length: int) -> None: ... def lerp(self, color: ColorValue, amount: float) -> Color: ... def premul_alpha(self) -> Color: ... @overload def update(self, r: int, g: int, b: int, a: int = 255) -> None: ... @overload def update(self, rgbvalue: ColorValue) -> None: ... def grayscale(self) -> Color: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/constants.pyi0000644000175100001770000002325614676242340022075 0ustar00runnerdocker# buildconfig/stubs/gen_stubs.py # A script to auto-generate locals.pyi, constants.pyi and __init__.pyi typestubs # IMPORTANT NOTE: Do not edit this file by hand! ACTIVEEVENT: int ANYFORMAT: int APPACTIVE: int APPINPUTFOCUS: int APPMOUSEFOCUS: int APP_DIDENTERBACKGROUND: int APP_DIDENTERFOREGROUND: int APP_LOWMEMORY: int APP_TERMINATING: int APP_WILLENTERBACKGROUND: int APP_WILLENTERFOREGROUND: int ASYNCBLIT: int AUDIODEVICEADDED: int AUDIODEVICEREMOVED: int AUDIO_ALLOW_ANY_CHANGE: int AUDIO_ALLOW_CHANNELS_CHANGE: int AUDIO_ALLOW_FORMAT_CHANGE: int AUDIO_ALLOW_FREQUENCY_CHANGE: int AUDIO_S16: int AUDIO_S16LSB: int AUDIO_S16MSB: int AUDIO_S16SYS: int AUDIO_S8: int AUDIO_U16: int AUDIO_U16LSB: int AUDIO_U16MSB: int AUDIO_U16SYS: int AUDIO_U8: int BIG_ENDIAN: int BLENDMODE_ADD: int BLENDMODE_BLEND: int BLENDMODE_MOD: int BLENDMODE_NONE: int BLEND_ADD: int BLEND_ALPHA_SDL2: int BLEND_MAX: int BLEND_MIN: int BLEND_MULT: int BLEND_PREMULTIPLIED: int BLEND_RGBA_ADD: int BLEND_RGBA_MAX: int BLEND_RGBA_MIN: int BLEND_RGBA_MULT: int BLEND_RGBA_SUB: int BLEND_RGB_ADD: int BLEND_RGB_MAX: int BLEND_RGB_MIN: int BLEND_RGB_MULT: int BLEND_RGB_SUB: int BLEND_SUB: int BUTTON_LEFT: int BUTTON_MIDDLE: int BUTTON_RIGHT: int BUTTON_WHEELDOWN: int BUTTON_WHEELUP: int BUTTON_X1: int BUTTON_X2: int CLIPBOARDUPDATE: int CONTROLLERAXISMOTION: int CONTROLLERBUTTONDOWN: int CONTROLLERBUTTONUP: int CONTROLLERDEVICEADDED: int CONTROLLERDEVICEREMAPPED: int CONTROLLERDEVICEREMOVED: int CONTROLLERSENSORUPDATE: int CONTROLLERTOUCHPADDOWN: int CONTROLLERTOUCHPADMOTION: int CONTROLLERTOUCHPADUP: int CONTROLLER_AXIS_INVALID: int CONTROLLER_AXIS_LEFTX: int CONTROLLER_AXIS_LEFTY: int CONTROLLER_AXIS_MAX: int CONTROLLER_AXIS_RIGHTX: int CONTROLLER_AXIS_RIGHTY: int CONTROLLER_AXIS_TRIGGERLEFT: int CONTROLLER_AXIS_TRIGGERRIGHT: int CONTROLLER_BUTTON_A: int CONTROLLER_BUTTON_B: int CONTROLLER_BUTTON_BACK: int CONTROLLER_BUTTON_DPAD_DOWN: int CONTROLLER_BUTTON_DPAD_LEFT: int CONTROLLER_BUTTON_DPAD_RIGHT: int CONTROLLER_BUTTON_DPAD_UP: int CONTROLLER_BUTTON_GUIDE: int CONTROLLER_BUTTON_INVALID: int CONTROLLER_BUTTON_LEFTSHOULDER: int CONTROLLER_BUTTON_LEFTSTICK: int CONTROLLER_BUTTON_MAX: int CONTROLLER_BUTTON_RIGHTSHOULDER: int CONTROLLER_BUTTON_RIGHTSTICK: int CONTROLLER_BUTTON_START: int CONTROLLER_BUTTON_X: int CONTROLLER_BUTTON_Y: int DOUBLEBUF: int DROPBEGIN: int DROPCOMPLETE: int DROPFILE: int DROPTEXT: int FINGERDOWN: int FINGERMOTION: int FINGERUP: int FULLSCREEN: int GL_ACCELERATED_VISUAL: int GL_ACCUM_ALPHA_SIZE: int GL_ACCUM_BLUE_SIZE: int GL_ACCUM_GREEN_SIZE: int GL_ACCUM_RED_SIZE: int GL_ALPHA_SIZE: int GL_BLUE_SIZE: int GL_BUFFER_SIZE: int GL_CONTEXT_DEBUG_FLAG: int GL_CONTEXT_FLAGS: int GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: int GL_CONTEXT_MAJOR_VERSION: int GL_CONTEXT_MINOR_VERSION: int GL_CONTEXT_PROFILE_COMPATIBILITY: int GL_CONTEXT_PROFILE_CORE: int GL_CONTEXT_PROFILE_ES: int GL_CONTEXT_PROFILE_MASK: int GL_CONTEXT_RELEASE_BEHAVIOR: int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH: int GL_CONTEXT_RELEASE_BEHAVIOR_NONE: int GL_CONTEXT_RESET_ISOLATION_FLAG: int GL_CONTEXT_ROBUST_ACCESS_FLAG: int GL_DEPTH_SIZE: int GL_DOUBLEBUFFER: int GL_FRAMEBUFFER_SRGB_CAPABLE: int GL_GREEN_SIZE: int GL_MULTISAMPLEBUFFERS: int GL_MULTISAMPLESAMPLES: int GL_RED_SIZE: int GL_SHARE_WITH_CURRENT_CONTEXT: int GL_STENCIL_SIZE: int GL_STEREO: int GL_SWAP_CONTROL: int HAT_CENTERED: int HAT_DOWN: int HAT_LEFT: int HAT_LEFTDOWN: int HAT_LEFTUP: int HAT_RIGHT: int HAT_RIGHTDOWN: int HAT_RIGHTUP: int HAT_UP: int HIDDEN: int HWACCEL: int HWPALETTE: int HWSURFACE: int JOYAXISMOTION: int JOYBALLMOTION: int JOYBUTTONDOWN: int JOYBUTTONUP: int JOYDEVICEADDED: int JOYDEVICEREMOVED: int JOYHATMOTION: int KEYDOWN: int KEYMAPCHANGED: int KEYUP: int KMOD_ALT: int KMOD_CAPS: int KMOD_CTRL: int KMOD_GUI: int KMOD_LALT: int KMOD_LCTRL: int KMOD_LGUI: int KMOD_LMETA: int KMOD_LSHIFT: int KMOD_META: int KMOD_MODE: int KMOD_NONE: int KMOD_NUM: int KMOD_RALT: int KMOD_RCTRL: int KMOD_RGUI: int KMOD_RMETA: int KMOD_RSHIFT: int KMOD_SHIFT: int KSCAN_0: int KSCAN_1: int KSCAN_2: int KSCAN_3: int KSCAN_4: int KSCAN_5: int KSCAN_6: int KSCAN_7: int KSCAN_8: int KSCAN_9: int KSCAN_A: int KSCAN_AC_BACK: int KSCAN_APOSTROPHE: int KSCAN_B: int KSCAN_BACKSLASH: int KSCAN_BACKSPACE: int KSCAN_BREAK: int KSCAN_C: int KSCAN_CAPSLOCK: int KSCAN_CLEAR: int KSCAN_COMMA: int KSCAN_CURRENCYSUBUNIT: int KSCAN_CURRENCYUNIT: int KSCAN_D: int KSCAN_DELETE: int KSCAN_DOWN: int KSCAN_E: int KSCAN_END: int KSCAN_EQUALS: int KSCAN_ESCAPE: int KSCAN_EURO: int KSCAN_F: int KSCAN_F1: int KSCAN_F10: int KSCAN_F11: int KSCAN_F12: int KSCAN_F13: int KSCAN_F14: int KSCAN_F15: int KSCAN_F2: int KSCAN_F3: int KSCAN_F4: int KSCAN_F5: int KSCAN_F6: int KSCAN_F7: int KSCAN_F8: int KSCAN_F9: int KSCAN_G: int KSCAN_GRAVE: int KSCAN_H: int KSCAN_HELP: int KSCAN_HOME: int KSCAN_I: int KSCAN_INSERT: int KSCAN_INTERNATIONAL1: int KSCAN_INTERNATIONAL2: int KSCAN_INTERNATIONAL3: int KSCAN_INTERNATIONAL4: int KSCAN_INTERNATIONAL5: int KSCAN_INTERNATIONAL6: int KSCAN_INTERNATIONAL7: int KSCAN_INTERNATIONAL8: int KSCAN_INTERNATIONAL9: int KSCAN_J: int KSCAN_K: int KSCAN_KP0: int KSCAN_KP1: int KSCAN_KP2: int KSCAN_KP3: int KSCAN_KP4: int KSCAN_KP5: int KSCAN_KP6: int KSCAN_KP7: int KSCAN_KP8: int KSCAN_KP9: int KSCAN_KP_0: int KSCAN_KP_1: int KSCAN_KP_2: int KSCAN_KP_3: int KSCAN_KP_4: int KSCAN_KP_5: int KSCAN_KP_6: int KSCAN_KP_7: int KSCAN_KP_8: int KSCAN_KP_9: int KSCAN_KP_DIVIDE: int KSCAN_KP_ENTER: int KSCAN_KP_EQUALS: int KSCAN_KP_MINUS: int KSCAN_KP_MULTIPLY: int KSCAN_KP_PERIOD: int KSCAN_KP_PLUS: int KSCAN_L: int KSCAN_LALT: int KSCAN_LANG1: int KSCAN_LANG2: int KSCAN_LANG3: int KSCAN_LANG4: int KSCAN_LANG5: int KSCAN_LANG6: int KSCAN_LANG7: int KSCAN_LANG8: int KSCAN_LANG9: int KSCAN_LCTRL: int KSCAN_LEFT: int KSCAN_LEFTBRACKET: int KSCAN_LGUI: int KSCAN_LMETA: int KSCAN_LSHIFT: int KSCAN_LSUPER: int KSCAN_M: int KSCAN_MENU: int KSCAN_MINUS: int KSCAN_MODE: int KSCAN_N: int KSCAN_NONUSBACKSLASH: int KSCAN_NONUSHASH: int KSCAN_NUMLOCK: int KSCAN_NUMLOCKCLEAR: int KSCAN_O: int KSCAN_P: int KSCAN_PAGEDOWN: int KSCAN_PAGEUP: int KSCAN_PAUSE: int KSCAN_PERIOD: int KSCAN_POWER: int KSCAN_PRINT: int KSCAN_PRINTSCREEN: int KSCAN_Q: int KSCAN_R: int KSCAN_RALT: int KSCAN_RCTRL: int KSCAN_RETURN: int KSCAN_RGUI: int KSCAN_RIGHT: int KSCAN_RIGHTBRACKET: int KSCAN_RMETA: int KSCAN_RSHIFT: int KSCAN_RSUPER: int KSCAN_S: int KSCAN_SCROLLLOCK: int KSCAN_SCROLLOCK: int KSCAN_SEMICOLON: int KSCAN_SLASH: int KSCAN_SPACE: int KSCAN_SYSREQ: int KSCAN_T: int KSCAN_TAB: int KSCAN_U: int KSCAN_UNKNOWN: int KSCAN_UP: int KSCAN_V: int KSCAN_W: int KSCAN_X: int KSCAN_Y: int KSCAN_Z: int K_0: int K_1: int K_2: int K_3: int K_4: int K_5: int K_6: int K_7: int K_8: int K_9: int K_AC_BACK: int K_AMPERSAND: int K_ASTERISK: int K_AT: int K_BACKQUOTE: int K_BACKSLASH: int K_BACKSPACE: int K_BREAK: int K_CAPSLOCK: int K_CARET: int K_CLEAR: int K_COLON: int K_COMMA: int K_CURRENCYSUBUNIT: int K_CURRENCYUNIT: int K_DELETE: int K_DOLLAR: int K_DOWN: int K_END: int K_EQUALS: int K_ESCAPE: int K_EURO: int K_EXCLAIM: int K_F1: int K_F10: int K_F11: int K_F12: int K_F13: int K_F14: int K_F15: int K_F2: int K_F3: int K_F4: int K_F5: int K_F6: int K_F7: int K_F8: int K_F9: int K_GREATER: int K_HASH: int K_HELP: int K_HOME: int K_INSERT: int K_KP0: int K_KP1: int K_KP2: int K_KP3: int K_KP4: int K_KP5: int K_KP6: int K_KP7: int K_KP8: int K_KP9: int K_KP_0: int K_KP_1: int K_KP_2: int K_KP_3: int K_KP_4: int K_KP_5: int K_KP_6: int K_KP_7: int K_KP_8: int K_KP_9: int K_KP_DIVIDE: int K_KP_ENTER: int K_KP_EQUALS: int K_KP_MINUS: int K_KP_MULTIPLY: int K_KP_PERIOD: int K_KP_PLUS: int K_LALT: int K_LCTRL: int K_LEFT: int K_LEFTBRACKET: int K_LEFTPAREN: int K_LESS: int K_LGUI: int K_LMETA: int K_LSHIFT: int K_LSUPER: int K_MENU: int K_MINUS: int K_MODE: int K_NUMLOCK: int K_NUMLOCKCLEAR: int K_PAGEDOWN: int K_PAGEUP: int K_PAUSE: int K_PERCENT: int K_PERIOD: int K_PLUS: int K_POWER: int K_PRINT: int K_PRINTSCREEN: int K_QUESTION: int K_QUOTE: int K_QUOTEDBL: int K_RALT: int K_RCTRL: int K_RETURN: int K_RGUI: int K_RIGHT: int K_RIGHTBRACKET: int K_RIGHTPAREN: int K_RMETA: int K_RSHIFT: int K_RSUPER: int K_SCROLLLOCK: int K_SCROLLOCK: int K_SEMICOLON: int K_SLASH: int K_SPACE: int K_SYSREQ: int K_TAB: int K_UNDERSCORE: int K_UNKNOWN: int K_UP: int K_a: int K_b: int K_c: int K_d: int K_e: int K_f: int K_g: int K_h: int K_i: int K_j: int K_k: int K_l: int K_m: int K_n: int K_o: int K_p: int K_q: int K_r: int K_s: int K_t: int K_u: int K_v: int K_w: int K_x: int K_y: int K_z: int LIL_ENDIAN: int LOCALECHANGED: int MIDIIN: int MIDIOUT: int MOUSEBUTTONDOWN: int MOUSEBUTTONUP: int MOUSEMOTION: int MOUSEWHEEL: int MULTIGESTURE: int NOEVENT: int NOFRAME: int NUMEVENTS: int OPENGL: int OPENGLBLIT: int PREALLOC: int QUIT: int RENDER_DEVICE_RESET: int RENDER_TARGETS_RESET: int RESIZABLE: int RLEACCEL: int RLEACCELOK: int SCALED: int SCRAP_BMP: str SCRAP_CLIPBOARD: int SCRAP_PBM: str SCRAP_PPM: str SCRAP_SELECTION: int SCRAP_TEXT: str SHOWN: int SRCALPHA: int SRCCOLORKEY: int SWSURFACE: int SYSTEM_CURSOR_ARROW: int SYSTEM_CURSOR_CROSSHAIR: int SYSTEM_CURSOR_HAND: int SYSTEM_CURSOR_IBEAM: int SYSTEM_CURSOR_NO: int SYSTEM_CURSOR_SIZEALL: int SYSTEM_CURSOR_SIZENESW: int SYSTEM_CURSOR_SIZENS: int SYSTEM_CURSOR_SIZENWSE: int SYSTEM_CURSOR_SIZEWE: int SYSTEM_CURSOR_WAIT: int SYSTEM_CURSOR_WAITARROW: int SYSWMEVENT: int TEXTEDITING: int TEXTINPUT: int TIMER_RESOLUTION: int USEREVENT: int USEREVENT_DROPFILE: int VIDEOEXPOSE: int VIDEORESIZE: int WINDOWCLOSE: int WINDOWDISPLAYCHANGED: int WINDOWENTER: int WINDOWEXPOSED: int WINDOWFOCUSGAINED: int WINDOWFOCUSLOST: int WINDOWHIDDEN: int WINDOWHITTEST: int WINDOWICCPROFCHANGED: int WINDOWLEAVE: int WINDOWMAXIMIZED: int WINDOWMINIMIZED: int WINDOWMOVED: int WINDOWRESIZED: int WINDOWRESTORED: int WINDOWSHOWN: int WINDOWSIZECHANGED: int WINDOWTAKEFOCUS: int ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/cursors.pyi0000644000175100001770000000405214676242340021552 0ustar00runnerdockerfrom typing import Any, Iterator, Sequence, Tuple, Union, overload from pygame.surface import Surface from ._common import FileArg, Literal _Small_string = Tuple[ str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str ] _Big_string = Tuple[ str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, ] arrow: Cursor diamond: Cursor broken_x: Cursor tri_left: Cursor tri_right: Cursor ball: Cursor thickarrow_strings: _Big_string sizer_x_strings: _Small_string sizer_y_strings: _Big_string sizer_xy_strings: _Small_string textmarker_strings: _Small_string def compile( strings: Sequence[str], black: str = "X", white: str = ".", xor: str = "o", ) -> Tuple[Tuple[int, ...], Tuple[int, ...]]: ... def load_xbm( curs: FileArg, mask: FileArg ) -> Tuple[Tuple[int, int], Tuple[int, int], Tuple[int, ...], Tuple[int, ...]]: ... class Cursor: @overload def __init__(self, constant: int = ...) -> None: ... @overload def __init__(self, cursor: Cursor) -> None: ... @overload def __init__( self, size: Union[Tuple[int, int], Sequence[int]], hotspot: Union[Tuple[int, int], Sequence[int]], xormasks: Sequence[int], andmasks: Sequence[int], ) -> None: ... @overload def __init__( self, hotspot: Union[Tuple[int, int], Sequence[int]], surface: Surface, ) -> None: ... def __iter__(self) -> Iterator[Any]: ... def __len__(self) -> int: ... def __copy__(self) -> Cursor: ... def __hash__(self) -> int: ... def __getitem__( self, index: int ) -> Union[int, Tuple[int, int], Sequence[int], Surface]: ... copy = __copy__ type: Literal["system", "color", "bitmap"] data: Union[ Tuple[int], Tuple[Tuple[int, int], Tuple[int, int], Tuple[int, ...], Tuple[int, ...]], Tuple[Union[Tuple[int, int], Sequence[int]], Surface], ] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/display.pyi0000644000175100001770000000434114676242340021520 0ustar00runnerdockerfrom typing import Union, Tuple, List, Optional, Dict, Sequence, overload from pygame.surface import Surface from pygame.constants import FULLSCREEN from ._common import Coordinate, RectValue, ColorValue, RGBAOutput class _VidInfo: hw: int wm: int video_mem: int bitsize: int bytesize: int masks: RGBAOutput shifts: RGBAOutput losses: RGBAOutput blit_hw: int blit_hw_CC: int blit_hw_A: int blit_sw: int blit_sw_CC: int blit_sw_A: int current_h: int current_w: int def init() -> None: ... def quit() -> None: ... def get_init() -> bool: ... def set_mode( size: Coordinate = (0, 0), flags: int = 0, depth: int = 0, display: int = 0, vsync: int = 0, ) -> Surface: ... def get_surface() -> Surface: ... def flip() -> None: ... @overload def update( rectangle: Optional[Union[RectValue, Sequence[Optional[RectValue]]]] = None ) -> None: ... @overload def update(x: int, y: int, w: int, h: int) -> None: ... @overload def update(xy: Coordinate, wh: Coordinate) -> None: ... def get_driver() -> str: ... def Info() -> _VidInfo: ... def get_wm_info() -> Dict[str, int]: ... def list_modes( depth: int = 0, flags: int = FULLSCREEN, display: int = 0, ) -> List[Tuple[int, int]]: ... def mode_ok( size: Union[Sequence[int], Tuple[int, int]], flags: int = 0, depth: int = 0, display: int = 0, ) -> int: ... def gl_get_attribute(flag: int) -> int: ... def gl_set_attribute(flag: int, value: int) -> None: ... def get_active() -> bool: ... def iconify() -> bool: ... def toggle_fullscreen() -> int: ... def set_gamma(red: float, green: float = ..., blue: float = ...) -> int: ... def set_gamma_ramp( red: Sequence[int], green: Sequence[int], blue: Sequence[int] ) -> int: ... def set_icon(surface: Surface) -> None: ... def set_caption(title: str, icontitle: Optional[str] = None) -> None: ... def get_caption() -> Tuple[str, str]: ... def set_palette(palette: Sequence[ColorValue]) -> None: ... def get_num_displays() -> int: ... def get_window_size() -> Tuple[int, int]: ... def get_allow_screensaver() -> bool: ... def set_allow_screensaver(value: bool = True) -> None: ... def get_desktop_sizes() -> List[Tuple[int, int]]: ... def is_fullscreen() -> bool: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/draw.pyi0000644000175100001770000000323614676242340021012 0ustar00runnerdockerfrom typing import Optional, Sequence from pygame.rect import Rect from pygame.surface import Surface from ._common import ColorValue, Coordinate, RectValue def rect( surface: Surface, color: ColorValue, rect: RectValue, width: int = 0, border_radius: int = -1, border_top_left_radius: int = -1, border_top_right_radius: int = -1, border_bottom_left_radius: int = -1, border_bottom_right_radius: int = -1, ) -> Rect: ... def polygon( surface: Surface, color: ColorValue, points: Sequence[Coordinate], width: int = 0, ) -> Rect: ... def circle( surface: Surface, color: ColorValue, center: Coordinate, radius: float, width: int = 0, draw_top_right: bool = False, draw_top_left: bool = False, draw_bottom_left: bool = False, draw_bottom_right: bool = False, ) -> Rect: ... def ellipse( surface: Surface, color: ColorValue, rect: RectValue, width: int = 0 ) -> Rect: ... def arc( surface: Surface, color: ColorValue, rect: RectValue, start_angle: float, stop_angle: float, width: int = 1, ) -> Rect: ... def line( surface: Surface, color: ColorValue, start_pos: Coordinate, end_pos: Coordinate, width: int = 1, ) -> Rect: ... def lines( surface: Surface, color: ColorValue, closed: bool, points: Sequence[Coordinate], width: int = 1, ) -> Rect: ... def aaline( surface: Surface, color: ColorValue, start_pos: Coordinate, end_pos: Coordinate, blend: int = 1, ) -> Rect: ... def aalines( surface: Surface, color: ColorValue, closed: bool, points: Sequence[Coordinate], blend: int = 1, ) -> Rect: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/event.pyi0000644000175100001770000000272014676242340021173 0ustar00runnerdockerfrom typing import ( Any, Dict, List, Optional, Sequence, SupportsInt, Tuple, Union, final, overload, ) @final class Event: type: int dict: Dict[str, Any] __dict__: Dict[str, Any] __hash__: None # type: ignore def __init__( self, type: int, dict: Dict[str, Any] = ..., **kwargs: Any ) -> None: ... def __getattribute__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __delattr__(self, name: str) -> None: ... def __bool__(self) -> bool: ... _EventTypes = Union[SupportsInt, Tuple[SupportsInt, ...], Sequence[SupportsInt]] def pump() -> None: ... def get( eventtype: Optional[_EventTypes] = None, pump: Any = True, exclude: Optional[_EventTypes] = None, ) -> List[Event]: ... def poll() -> Event: ... def wait(timeout: int = 0) -> Event: ... def peek(eventtype: Optional[_EventTypes] = None, pump: Any = True) -> bool: ... def clear(eventtype: Optional[_EventTypes] = None, pump: Any = True) -> None: ... def event_name(type: int) -> str: ... def set_blocked(type: Optional[_EventTypes]) -> None: ... def set_allowed(type: Optional[_EventTypes]) -> None: ... def get_blocked(type: _EventTypes) -> bool: ... def set_grab(grab: bool) -> None: ... def get_grab() -> bool: ... def set_keyboard_grab(grab: bool) -> None: ... def get_keyboard_grab() -> bool: ... def post(event: Event) -> bool: ... def custom_type() -> int: ... EventType = Event ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/fastevent.pyi0000644000175100001770000000037114676242340022051 0ustar00runnerdockerfrom typing import List from pygame.event import Event def init() -> None: ... def get_init() -> bool: ... def pump() -> None: ... def wait() -> Event: ... def poll() -> Event: ... def get() -> List[Event]: ... def post(event: Event) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/font.pyi0000644000175100001770000000403714676242340021023 0ustar00runnerdockerfrom typing import Callable, Hashable, Iterable, List, Optional, Tuple, Union from pygame.surface import Surface from ._common import ColorValue, FileArg, Literal # TODO: Figure out a way to type this attribute such that mypy knows it's not # always defined at runtime UCS4: Literal[1] def init() -> None: ... def quit() -> None: ... def get_init() -> bool: ... def get_sdl_ttf_version(linked: bool = True) -> Tuple[int, int, int]: ... def get_default_font() -> str: ... def get_fonts() -> List[str]: ... def match_font( name: Union[str, bytes, Iterable[Union[str, bytes]]], bold: Hashable = False, italic: Hashable = False, ) -> str: ... def SysFont( name: Union[str, bytes, Iterable[Union[str, bytes]], None], size: int, bold: Hashable = False, italic: Hashable = False, constructor: Optional[Callable[[Optional[str], int, bool, bool], Font]] = None, ) -> Font: ... class Font: bold: bool italic: bool underline: bool strikethrough: bool def __init__(self, name: Optional[FileArg], size: int) -> None: ... def render( self, text: Union[str, bytes, None], antialias: bool | Literal[0] | Literal[1], color: ColorValue, background: Optional[ColorValue] = None, ) -> Surface: ... def size(self, text: Union[str, bytes]) -> Tuple[int, int]: ... def set_underline(self, value: bool) -> None: ... def get_underline(self) -> bool: ... def set_strikethrough(self, value: bool) -> None: ... def get_strikethrough(self) -> bool: ... def set_bold(self, value: bool) -> None: ... def get_bold(self) -> bool: ... def set_italic(self, value: bool | Literal[0] | Literal[1]) -> None: ... def metrics( self, text: Union[str, bytes] ) -> List[Tuple[int, int, int, int, int]]: ... def get_italic(self) -> bool: ... def get_linesize(self) -> int: ... def get_height(self) -> int: ... def get_ascent(self) -> int: ... def get_descent(self) -> int: ... def set_script(self, script_code: str) -> None: ... FontType = Font ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/freetype.pyi0000644000175100001770000000667014676242340021705 0ustar00runnerdockerfrom typing import Any, Callable, Iterable, List, Optional, Tuple, Union from pygame.color import Color from pygame.rect import Rect from pygame.surface import Surface from ._common import ColorValue, FileArg, RectValue def get_error() -> str: ... def get_version(linked: bool = True) -> Tuple[int, int, int]: ... def init(cache_size: int = 64, resolution: int = 72) -> None: ... def quit() -> None: ... def get_init() -> bool: ... def was_init() -> bool: ... def get_cache_size() -> int: ... def get_default_resolution() -> int: ... def set_default_resolution(resolution: int) -> None: ... def SysFont( name: Union[str, bytes, Iterable[Union[str, bytes]], None], size: int, bold: int = False, italic: int = False, constructor: Optional[Callable[[Optional[str], int, bool, bool], Font]] = None, ) -> Font: ... def get_default_font() -> str: ... def get_fonts() -> List[str]: ... def match_font( name: Union[str, bytes, Iterable[Union[str, bytes]]], bold: Any = False, italic: Any = False, ) -> str: ... STYLE_NORMAL: int STYLE_UNDERLINE: int STYLE_OBLIQUE: int STYLE_STRONG: int STYLE_WIDE: int STYLE_DEFAULT: int class Font: name: str path: str size: Union[float, Tuple[float, float]] height: int ascender: int descender: int style: int underline: bool strong: bool oblique: bool wide: bool strength: float underline_adjustment: float fixed_width: bool fixed_sizes: int scalable: bool use_bitmap_strikes: bool antialiased: bool kerning: bool vertical: bool rotation: int fgcolor: Color bgcolor: Color origin: bool pad: bool ucs4: bool resolution: int def __init__( self, file: Optional[FileArg], size: float = 0, font_index: int = 0, resolution: int = 0, ucs4: int = False, ) -> None: ... def get_rect( self, text: str, style: int = STYLE_DEFAULT, rotation: int = 0, size: float = 0, ) -> Rect: ... def get_metrics( self, text: str, size: float = 0 ) -> List[Tuple[int, int, int, int, float, float]]: ... def get_sized_ascender(self, size: float) -> int: ... def get_sized_descender(self, size: float) -> int: ... def get_sized_height(self, size: float) -> int: ... def get_sized_glyph_height(self, size: float) -> int: ... def get_sizes(self) -> List[Tuple[int, int, int, float, float]]: ... def render( self, text: str, fgcolor: Optional[ColorValue] = None, bgcolor: Optional[ColorValue] = None, style: int = STYLE_DEFAULT, rotation: int = 0, size: float = 0, ) -> Tuple[Surface, Rect]: ... def render_to( self, surf: Surface, dest: RectValue, text: str, fgcolor: Optional[ColorValue] = None, bgcolor: Optional[ColorValue] = None, style: int = STYLE_DEFAULT, rotation: int = 0, size: float = 0, ) -> Rect: ... def render_raw( self, text: str, style: int = STYLE_DEFAULT, rotation: int = 0, size: float = 0, invert: bool = False, ) -> Tuple[bytes, Tuple[int, int]]: ... def render_raw_to( self, array: Any, text: str, dest: Optional[RectValue] = None, style: int = STYLE_DEFAULT, rotation: int = 0, size: float = 0, invert: bool = False, ) -> Rect: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/gfxdraw.pyi0000644000175100001770000000470414676242340021520 0ustar00runnerdockerfrom typing import Sequence from pygame.surface import Surface from ._common import ColorValue, Coordinate, RectValue def pixel(surface: Surface, x: int, y: int, color: ColorValue) -> None: ... def hline(surface: Surface, x1: int, x2: int, y: int, color: ColorValue) -> None: ... def vline(surface: Surface, x: int, y1: int, y2: int, color: ColorValue) -> None: ... def line( surface: Surface, x1: int, y1: int, x2: int, y2: int, color: ColorValue ) -> None: ... def rectangle(surface: Surface, rect: RectValue, color: ColorValue) -> None: ... def box(surface: Surface, rect: RectValue, color: ColorValue) -> None: ... def circle(surface: Surface, x: int, y: int, r: int, color: ColorValue) -> None: ... def aacircle(surface: Surface, x: int, y: int, r: int, color: ColorValue) -> None: ... def filled_circle( surface: Surface, x: int, y: int, r: int, color: ColorValue ) -> None: ... def ellipse( surface: Surface, x: int, y: int, rx: int, ry: int, color: ColorValue ) -> None: ... def aaellipse( surface: Surface, x: int, y: int, rx: int, ry: int, color: ColorValue ) -> None: ... def filled_ellipse( surface: Surface, x: int, y: int, rx: int, ry: int, color: ColorValue ) -> None: ... def arc( surface: Surface, x: int, y: int, r: int, start_angle: int, atp_angle: int, color: ColorValue, ) -> None: ... def pie( surface: Surface, x: int, y: int, r: int, start_angle: int, atp_angle: int, color: ColorValue, ) -> None: ... def trigon( surface: Surface, x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, color: ColorValue, ) -> None: ... def aatrigon( surface: Surface, x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, color: ColorValue, ) -> None: ... def filled_trigon( surface: Surface, x1: int, y1: int, x2: int, y2: int, x3: int, y3: int, color: ColorValue, ) -> None: ... def polygon( surface: Surface, points: Sequence[Coordinate], color: ColorValue ) -> None: ... def aapolygon( surface: Surface, points: Sequence[Coordinate], color: ColorValue ) -> None: ... def filled_polygon( surface: Surface, points: Sequence[Coordinate], color: ColorValue ) -> None: ... def textured_polygon( surface: Surface, points: Sequence[Coordinate], texture: Surface, tx: int, ty: int ) -> None: ... def bezier( surface: Surface, points: Sequence[Coordinate], steps: int, color: ColorValue ) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/image.pyi0000644000175100001770000000325114676242340021134 0ustar00runnerdockerfrom typing import Optional, Sequence, Tuple, Union from pygame.bufferproxy import BufferProxy from pygame.surface import Surface from ._common import FileArg, Literal _BufferStyle = Union[BufferProxy, bytes, bytearray, memoryview] _to_string_format = Literal[ "P", "RGB", "RGBX", "RGBA", "ARGB", "BGRA", "RGBA_PREMULT", "ARGB_PREMULT" ] _from_buffer_format = Literal["P", "RGB", "BGR", "BGRA", "RGBX", "RGBA", "ARGB"] _from_string_format = Literal["P", "RGB", "RGBX", "RGBA", "ARGB", "BGRA"] def load(filename: FileArg, namehint: str = "") -> Surface: ... def save(surface: Surface, filename: FileArg, namehint: str = "") -> None: ... def get_sdl_image_version(linked: bool = True) -> Optional[Tuple[int, int, int]]: ... def get_extended() -> bool: ... def tostring( surface: Surface, format: _to_string_format, flipped: bool = False ) -> bytes: ... def fromstring( bytes: bytes, size: Union[Sequence[int], Tuple[int, int]], format: _from_string_format, flipped: bool = False, ) -> Surface: ... # the use of tobytes/frombytes is preferred over tostring/fromstring def tobytes( surface: Surface, format: _to_string_format, flipped: bool = False ) -> bytes: ... def frombytes( bytes: bytes, size: Union[Sequence[int], Tuple[int, int]], format: _from_string_format, flipped: bool = False, ) -> Surface: ... def frombuffer( bytes: _BufferStyle, size: Union[Sequence[int], Tuple[int, int]], format: _from_buffer_format, ) -> Surface: ... def load_basic(filename: FileArg) -> Surface: ... def load_extended(filename: FileArg, namehint: str = "") -> Surface: ... def save_extended(surface: Surface, filename: FileArg, namehint: str = "") -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/joystick.pyi0000644000175100001770000000250414676242340021711 0ustar00runnerdockerfrom typing import Tuple, final def init() -> None: ... def quit() -> None: ... def get_init() -> bool: ... def get_count() -> int: ... @final class JoystickType: def __init__(self, id: int) -> None: ... def init(self) -> None: ... def quit(self) -> None: ... def get_init(self) -> bool: ... def get_id(self) -> int: ... def get_instance_id(self) -> int: ... def get_guid(self) -> str: ... def get_power_level(self) -> str: ... def get_name(self) -> str: ... def get_numaxes(self) -> int: ... def get_axis(self, axis_number: int) -> float: ... def get_numballs(self) -> int: ... def get_ball(self, ball_number: int) -> Tuple[float, float]: ... def get_numbuttons(self) -> int: ... def get_button(self, button: int) -> bool: ... def get_numhats(self) -> int: ... def get_hat(self, hat_number: int) -> Tuple[float, float]: ... def rumble( self, low_frequency: float, high_frequency: float, duration: int ) -> bool: ... def stop_rumble(self) -> None: ... # according to the current implementation, Joystick is a function that returns # a JoystickType instance. In the future, when the C implementation is fixed to # add __init__/__new__ to Joystick and it's exported directly, the typestubs # here must be updated too def Joystick(id: int) -> JoystickType: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/key.pyi0000644000175100001770000000106214676242340020640 0ustar00runnerdockerfrom typing import Tuple from ._common import RectValue class ScancodeWrapper(Tuple[bool, ...]): ... def get_focused() -> bool: ... def get_pressed() -> ScancodeWrapper: ... def get_mods() -> int: ... def set_mods(mods: int) -> None: ... def set_repeat(delay: int = 0, interval: int = 0) -> None: ... def get_repeat() -> Tuple[int, int]: ... def name(key: int, use_compat: bool = True) -> str: ... def key_code(name: str) -> int: ... def start_text_input() -> None: ... def stop_text_input() -> None: ... def set_text_input_rect(rect: RectValue) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/locals.pyi0000644000175100001770000002330514676242340021331 0ustar00runnerdocker# buildconfig/stubs/gen_stubs.py # A script to auto-generate locals.pyi, constants.pyi and __init__.pyi typestubs # IMPORTANT NOTE: Do not edit this file by hand! ACTIVEEVENT: int ANYFORMAT: int APPACTIVE: int APPINPUTFOCUS: int APPMOUSEFOCUS: int APP_DIDENTERBACKGROUND: int APP_DIDENTERFOREGROUND: int APP_LOWMEMORY: int APP_TERMINATING: int APP_WILLENTERBACKGROUND: int APP_WILLENTERFOREGROUND: int ASYNCBLIT: int AUDIODEVICEADDED: int AUDIODEVICEREMOVED: int AUDIO_ALLOW_ANY_CHANGE: int AUDIO_ALLOW_CHANNELS_CHANGE: int AUDIO_ALLOW_FORMAT_CHANGE: int AUDIO_ALLOW_FREQUENCY_CHANGE: int AUDIO_S16: int AUDIO_S16LSB: int AUDIO_S16MSB: int AUDIO_S16SYS: int AUDIO_S8: int AUDIO_U16: int AUDIO_U16LSB: int AUDIO_U16MSB: int AUDIO_U16SYS: int AUDIO_U8: int BIG_ENDIAN: int BLENDMODE_ADD: int BLENDMODE_BLEND: int BLENDMODE_MOD: int BLENDMODE_NONE: int BLEND_ADD: int BLEND_ALPHA_SDL2: int BLEND_MAX: int BLEND_MIN: int BLEND_MULT: int BLEND_PREMULTIPLIED: int BLEND_RGBA_ADD: int BLEND_RGBA_MAX: int BLEND_RGBA_MIN: int BLEND_RGBA_MULT: int BLEND_RGBA_SUB: int BLEND_RGB_ADD: int BLEND_RGB_MAX: int BLEND_RGB_MIN: int BLEND_RGB_MULT: int BLEND_RGB_SUB: int BLEND_SUB: int BUTTON_LEFT: int BUTTON_MIDDLE: int BUTTON_RIGHT: int BUTTON_WHEELDOWN: int BUTTON_WHEELUP: int BUTTON_X1: int BUTTON_X2: int CLIPBOARDUPDATE: int CONTROLLERAXISMOTION: int CONTROLLERBUTTONDOWN: int CONTROLLERBUTTONUP: int CONTROLLERDEVICEADDED: int CONTROLLERDEVICEREMAPPED: int CONTROLLERDEVICEREMOVED: int CONTROLLERSENSORUPDATE: int CONTROLLERTOUCHPADDOWN: int CONTROLLERTOUCHPADMOTION: int CONTROLLERTOUCHPADUP: int CONTROLLER_AXIS_INVALID: int CONTROLLER_AXIS_LEFTX: int CONTROLLER_AXIS_LEFTY: int CONTROLLER_AXIS_MAX: int CONTROLLER_AXIS_RIGHTX: int CONTROLLER_AXIS_RIGHTY: int CONTROLLER_AXIS_TRIGGERLEFT: int CONTROLLER_AXIS_TRIGGERRIGHT: int CONTROLLER_BUTTON_A: int CONTROLLER_BUTTON_B: int CONTROLLER_BUTTON_BACK: int CONTROLLER_BUTTON_DPAD_DOWN: int CONTROLLER_BUTTON_DPAD_LEFT: int CONTROLLER_BUTTON_DPAD_RIGHT: int CONTROLLER_BUTTON_DPAD_UP: int CONTROLLER_BUTTON_GUIDE: int CONTROLLER_BUTTON_INVALID: int CONTROLLER_BUTTON_LEFTSHOULDER: int CONTROLLER_BUTTON_LEFTSTICK: int CONTROLLER_BUTTON_MAX: int CONTROLLER_BUTTON_RIGHTSHOULDER: int CONTROLLER_BUTTON_RIGHTSTICK: int CONTROLLER_BUTTON_START: int CONTROLLER_BUTTON_X: int CONTROLLER_BUTTON_Y: int Color: type DOUBLEBUF: int DROPBEGIN: int DROPCOMPLETE: int DROPFILE: int DROPTEXT: int FINGERDOWN: int FINGERMOTION: int FINGERUP: int FULLSCREEN: int GL_ACCELERATED_VISUAL: int GL_ACCUM_ALPHA_SIZE: int GL_ACCUM_BLUE_SIZE: int GL_ACCUM_GREEN_SIZE: int GL_ACCUM_RED_SIZE: int GL_ALPHA_SIZE: int GL_BLUE_SIZE: int GL_BUFFER_SIZE: int GL_CONTEXT_DEBUG_FLAG: int GL_CONTEXT_FLAGS: int GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: int GL_CONTEXT_MAJOR_VERSION: int GL_CONTEXT_MINOR_VERSION: int GL_CONTEXT_PROFILE_COMPATIBILITY: int GL_CONTEXT_PROFILE_CORE: int GL_CONTEXT_PROFILE_ES: int GL_CONTEXT_PROFILE_MASK: int GL_CONTEXT_RELEASE_BEHAVIOR: int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH: int GL_CONTEXT_RELEASE_BEHAVIOR_NONE: int GL_CONTEXT_RESET_ISOLATION_FLAG: int GL_CONTEXT_ROBUST_ACCESS_FLAG: int GL_DEPTH_SIZE: int GL_DOUBLEBUFFER: int GL_FRAMEBUFFER_SRGB_CAPABLE: int GL_GREEN_SIZE: int GL_MULTISAMPLEBUFFERS: int GL_MULTISAMPLESAMPLES: int GL_RED_SIZE: int GL_SHARE_WITH_CURRENT_CONTEXT: int GL_STENCIL_SIZE: int GL_STEREO: int GL_SWAP_CONTROL: int HAT_CENTERED: int HAT_DOWN: int HAT_LEFT: int HAT_LEFTDOWN: int HAT_LEFTUP: int HAT_RIGHT: int HAT_RIGHTDOWN: int HAT_RIGHTUP: int HAT_UP: int HIDDEN: int HWACCEL: int HWPALETTE: int HWSURFACE: int JOYAXISMOTION: int JOYBALLMOTION: int JOYBUTTONDOWN: int JOYBUTTONUP: int JOYDEVICEADDED: int JOYDEVICEREMOVED: int JOYHATMOTION: int KEYDOWN: int KEYMAPCHANGED: int KEYUP: int KMOD_ALT: int KMOD_CAPS: int KMOD_CTRL: int KMOD_GUI: int KMOD_LALT: int KMOD_LCTRL: int KMOD_LGUI: int KMOD_LMETA: int KMOD_LSHIFT: int KMOD_META: int KMOD_MODE: int KMOD_NONE: int KMOD_NUM: int KMOD_RALT: int KMOD_RCTRL: int KMOD_RGUI: int KMOD_RMETA: int KMOD_RSHIFT: int KMOD_SHIFT: int KSCAN_0: int KSCAN_1: int KSCAN_2: int KSCAN_3: int KSCAN_4: int KSCAN_5: int KSCAN_6: int KSCAN_7: int KSCAN_8: int KSCAN_9: int KSCAN_A: int KSCAN_AC_BACK: int KSCAN_APOSTROPHE: int KSCAN_B: int KSCAN_BACKSLASH: int KSCAN_BACKSPACE: int KSCAN_BREAK: int KSCAN_C: int KSCAN_CAPSLOCK: int KSCAN_CLEAR: int KSCAN_COMMA: int KSCAN_CURRENCYSUBUNIT: int KSCAN_CURRENCYUNIT: int KSCAN_D: int KSCAN_DELETE: int KSCAN_DOWN: int KSCAN_E: int KSCAN_END: int KSCAN_EQUALS: int KSCAN_ESCAPE: int KSCAN_EURO: int KSCAN_F: int KSCAN_F1: int KSCAN_F10: int KSCAN_F11: int KSCAN_F12: int KSCAN_F13: int KSCAN_F14: int KSCAN_F15: int KSCAN_F2: int KSCAN_F3: int KSCAN_F4: int KSCAN_F5: int KSCAN_F6: int KSCAN_F7: int KSCAN_F8: int KSCAN_F9: int KSCAN_G: int KSCAN_GRAVE: int KSCAN_H: int KSCAN_HELP: int KSCAN_HOME: int KSCAN_I: int KSCAN_INSERT: int KSCAN_INTERNATIONAL1: int KSCAN_INTERNATIONAL2: int KSCAN_INTERNATIONAL3: int KSCAN_INTERNATIONAL4: int KSCAN_INTERNATIONAL5: int KSCAN_INTERNATIONAL6: int KSCAN_INTERNATIONAL7: int KSCAN_INTERNATIONAL8: int KSCAN_INTERNATIONAL9: int KSCAN_J: int KSCAN_K: int KSCAN_KP0: int KSCAN_KP1: int KSCAN_KP2: int KSCAN_KP3: int KSCAN_KP4: int KSCAN_KP5: int KSCAN_KP6: int KSCAN_KP7: int KSCAN_KP8: int KSCAN_KP9: int KSCAN_KP_0: int KSCAN_KP_1: int KSCAN_KP_2: int KSCAN_KP_3: int KSCAN_KP_4: int KSCAN_KP_5: int KSCAN_KP_6: int KSCAN_KP_7: int KSCAN_KP_8: int KSCAN_KP_9: int KSCAN_KP_DIVIDE: int KSCAN_KP_ENTER: int KSCAN_KP_EQUALS: int KSCAN_KP_MINUS: int KSCAN_KP_MULTIPLY: int KSCAN_KP_PERIOD: int KSCAN_KP_PLUS: int KSCAN_L: int KSCAN_LALT: int KSCAN_LANG1: int KSCAN_LANG2: int KSCAN_LANG3: int KSCAN_LANG4: int KSCAN_LANG5: int KSCAN_LANG6: int KSCAN_LANG7: int KSCAN_LANG8: int KSCAN_LANG9: int KSCAN_LCTRL: int KSCAN_LEFT: int KSCAN_LEFTBRACKET: int KSCAN_LGUI: int KSCAN_LMETA: int KSCAN_LSHIFT: int KSCAN_LSUPER: int KSCAN_M: int KSCAN_MENU: int KSCAN_MINUS: int KSCAN_MODE: int KSCAN_N: int KSCAN_NONUSBACKSLASH: int KSCAN_NONUSHASH: int KSCAN_NUMLOCK: int KSCAN_NUMLOCKCLEAR: int KSCAN_O: int KSCAN_P: int KSCAN_PAGEDOWN: int KSCAN_PAGEUP: int KSCAN_PAUSE: int KSCAN_PERIOD: int KSCAN_POWER: int KSCAN_PRINT: int KSCAN_PRINTSCREEN: int KSCAN_Q: int KSCAN_R: int KSCAN_RALT: int KSCAN_RCTRL: int KSCAN_RETURN: int KSCAN_RGUI: int KSCAN_RIGHT: int KSCAN_RIGHTBRACKET: int KSCAN_RMETA: int KSCAN_RSHIFT: int KSCAN_RSUPER: int KSCAN_S: int KSCAN_SCROLLLOCK: int KSCAN_SCROLLOCK: int KSCAN_SEMICOLON: int KSCAN_SLASH: int KSCAN_SPACE: int KSCAN_SYSREQ: int KSCAN_T: int KSCAN_TAB: int KSCAN_U: int KSCAN_UNKNOWN: int KSCAN_UP: int KSCAN_V: int KSCAN_W: int KSCAN_X: int KSCAN_Y: int KSCAN_Z: int K_0: int K_1: int K_2: int K_3: int K_4: int K_5: int K_6: int K_7: int K_8: int K_9: int K_AC_BACK: int K_AMPERSAND: int K_ASTERISK: int K_AT: int K_BACKQUOTE: int K_BACKSLASH: int K_BACKSPACE: int K_BREAK: int K_CAPSLOCK: int K_CARET: int K_CLEAR: int K_COLON: int K_COMMA: int K_CURRENCYSUBUNIT: int K_CURRENCYUNIT: int K_DELETE: int K_DOLLAR: int K_DOWN: int K_END: int K_EQUALS: int K_ESCAPE: int K_EURO: int K_EXCLAIM: int K_F1: int K_F10: int K_F11: int K_F12: int K_F13: int K_F14: int K_F15: int K_F2: int K_F3: int K_F4: int K_F5: int K_F6: int K_F7: int K_F8: int K_F9: int K_GREATER: int K_HASH: int K_HELP: int K_HOME: int K_INSERT: int K_KP0: int K_KP1: int K_KP2: int K_KP3: int K_KP4: int K_KP5: int K_KP6: int K_KP7: int K_KP8: int K_KP9: int K_KP_0: int K_KP_1: int K_KP_2: int K_KP_3: int K_KP_4: int K_KP_5: int K_KP_6: int K_KP_7: int K_KP_8: int K_KP_9: int K_KP_DIVIDE: int K_KP_ENTER: int K_KP_EQUALS: int K_KP_MINUS: int K_KP_MULTIPLY: int K_KP_PERIOD: int K_KP_PLUS: int K_LALT: int K_LCTRL: int K_LEFT: int K_LEFTBRACKET: int K_LEFTPAREN: int K_LESS: int K_LGUI: int K_LMETA: int K_LSHIFT: int K_LSUPER: int K_MENU: int K_MINUS: int K_MODE: int K_NUMLOCK: int K_NUMLOCKCLEAR: int K_PAGEDOWN: int K_PAGEUP: int K_PAUSE: int K_PERCENT: int K_PERIOD: int K_PLUS: int K_POWER: int K_PRINT: int K_PRINTSCREEN: int K_QUESTION: int K_QUOTE: int K_QUOTEDBL: int K_RALT: int K_RCTRL: int K_RETURN: int K_RGUI: int K_RIGHT: int K_RIGHTBRACKET: int K_RIGHTPAREN: int K_RMETA: int K_RSHIFT: int K_RSUPER: int K_SCROLLLOCK: int K_SCROLLOCK: int K_SEMICOLON: int K_SLASH: int K_SPACE: int K_SYSREQ: int K_TAB: int K_UNDERSCORE: int K_UNKNOWN: int K_UP: int K_a: int K_b: int K_c: int K_d: int K_e: int K_f: int K_g: int K_h: int K_i: int K_j: int K_k: int K_l: int K_m: int K_n: int K_o: int K_p: int K_q: int K_r: int K_s: int K_t: int K_u: int K_v: int K_w: int K_x: int K_y: int K_z: int LIL_ENDIAN: int LOCALECHANGED: int MIDIIN: int MIDIOUT: int MOUSEBUTTONDOWN: int MOUSEBUTTONUP: int MOUSEMOTION: int MOUSEWHEEL: int MULTIGESTURE: int NOEVENT: int NOFRAME: int NUMEVENTS: int OPENGL: int OPENGLBLIT: int PREALLOC: int QUIT: int RENDER_DEVICE_RESET: int RENDER_TARGETS_RESET: int RESIZABLE: int RLEACCEL: int RLEACCELOK: int Rect: type SCALED: int SCRAP_BMP: str SCRAP_CLIPBOARD: int SCRAP_PBM: str SCRAP_PPM: str SCRAP_SELECTION: int SCRAP_TEXT: str SHOWN: int SRCALPHA: int SRCCOLORKEY: int SWSURFACE: int SYSTEM_CURSOR_ARROW: int SYSTEM_CURSOR_CROSSHAIR: int SYSTEM_CURSOR_HAND: int SYSTEM_CURSOR_IBEAM: int SYSTEM_CURSOR_NO: int SYSTEM_CURSOR_SIZEALL: int SYSTEM_CURSOR_SIZENESW: int SYSTEM_CURSOR_SIZENS: int SYSTEM_CURSOR_SIZENWSE: int SYSTEM_CURSOR_SIZEWE: int SYSTEM_CURSOR_WAIT: int SYSTEM_CURSOR_WAITARROW: int SYSWMEVENT: int TEXTEDITING: int TEXTINPUT: int TIMER_RESOLUTION: int USEREVENT: int USEREVENT_DROPFILE: int VIDEOEXPOSE: int VIDEORESIZE: int WINDOWCLOSE: int WINDOWDISPLAYCHANGED: int WINDOWENTER: int WINDOWEXPOSED: int WINDOWFOCUSGAINED: int WINDOWFOCUSLOST: int WINDOWHIDDEN: int WINDOWHITTEST: int WINDOWICCPROFCHANGED: int WINDOWLEAVE: int WINDOWMAXIMIZED: int WINDOWMINIMIZED: int WINDOWMOVED: int WINDOWRESIZED: int WINDOWRESTORED: int WINDOWSHOWN: int WINDOWSIZECHANGED: int WINDOWTAKEFOCUS: int ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/mask.pyi0000644000175100001770000000440014676242340021002 0ustar00runnerdockerfrom typing import Any, List, Optional, Sequence, Tuple, Union from pygame.rect import Rect from pygame.surface import Surface from ._common import ColorValue, Coordinate, RectValue def from_surface(surface: Surface, threshold: int = 127) -> Mask: ... def from_threshold( surface: Surface, color: ColorValue, threshold: ColorValue = (0, 0, 0, 255), othersurface: Optional[Surface] = None, palette_colors: int = 1, ) -> Mask: ... class Mask: def __init__(self, size: Coordinate, fill: bool = False) -> None: ... def __copy__(self) -> Mask: ... copy = __copy__ def get_size(self) -> Tuple[int, int]: ... def get_rect(self, **kwargs: Any) -> Rect: ... # Dict type needs to be completed def get_at(self, pos: Coordinate) -> int: ... def set_at(self, pos: Coordinate, value: int = 1) -> None: ... def overlap(self, other: Mask, offset: Coordinate) -> Optional[Tuple[int, int]]: ... def overlap_area(self, other: Mask, offset: Coordinate) -> int: ... def overlap_mask(self, other: Mask, offset: Coordinate) -> Mask: ... def fill(self) -> None: ... def clear(self) -> None: ... def invert(self) -> None: ... def scale(self, scale: Coordinate) -> Mask: ... def draw(self, other: Mask, offset: Coordinate) -> None: ... def erase(self, other: Mask, offset: Coordinate) -> None: ... def count(self) -> int: ... def centroid(self) -> Tuple[int, int]: ... def angle(self) -> float: ... def outline(self, every: int = 1) -> List[Tuple[int, int]]: ... def convolve( self, other: Mask, output: Optional[Mask] = None, offset: Coordinate = (0, 0), ) -> Mask: ... def connected_component( self, pos: Union[Sequence[int], Tuple[int, int]] = ... ) -> Mask: ... def connected_components(self, minimum: int = 0) -> List[Mask]: ... def get_bounding_rects(self) -> Rect: ... def to_surface( self, surface: Optional[Surface] = None, setsurface: Optional[Surface] = None, unsetsurface: Optional[Surface] = None, setcolor: Optional[ColorValue] = (255, 255, 255, 255), unsetcolor: Optional[ColorValue] = (0, 0, 0, 255), dest: Union[RectValue, Coordinate] = (0, 0), ) -> Surface: ... MaskType = Mask ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/math.pyi0000644000175100001770000002664514676242340021017 0ustar00runnerdockerimport sys from typing import ( Any, Generic, Iterator, List, Literal, Sequence, Tuple, Type, TypeVar, Union, final, overload, Optional, ) from typing_extensions import Protocol if sys.version_info >= (3, 9): from collections.abc import Collection else: from typing import Collection def lerp(a: float, b: float, weight: float) -> float: ... def clamp(value: float, min: float, max: float) -> float: ... _TVec = TypeVar("_TVec", bound=_GenericVector) # not implemented in code, only implemented here for ease of implementing # typestubs. Contains attributes/methods common to Vector2 and Vector3 # Also used with _TVec generics class _GenericVector(Collection[float]): epsilon: float __hash__: None # type: ignore def __len__(self) -> int: ... @overload def __setitem__(self, key: int, value: float) -> None: ... @overload def __setitem__(self, key: slice, value: Union[Sequence[float], _TVec]) -> None: ... @overload def __getitem__(self, i: int) -> float: ... @overload def __getitem__(self, s: slice) -> List[float]: ... def __iter__(self) -> VectorIterator: ... def __add__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def __radd__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def __sub__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def __rsub__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... @overload def __mul__(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... @overload def __mul__(self: _TVec, other: float) -> _TVec: ... def __rmul__(self: _TVec, other: float) -> _TVec: ... def __truediv__(self: _TVec, other: float) -> _TVec: ... def __rtruediv__(self: _TVec, other: float) -> _TVec: ... def __floordiv__(self: _TVec, other: float) -> _TVec: ... def __neg__(self: _TVec) -> _TVec: ... def __pos__(self: _TVec) -> _TVec: ... def __bool__(self) -> bool: ... def __iadd__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def __isub__(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... @overload def __imul__(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... @overload def __imul__(self: _TVec, other: float) -> _TVec: ... def __copy__(self: _TVec) -> _TVec: ... copy = __copy__ def __safe_for_unpickling__(self) -> Literal[True]: ... def __contains__(self, other: float) -> bool: ... # type: ignore[override] def dot(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... def magnitude(self) -> float: ... def magnitude_squared(self) -> float: ... def length(self) -> float: ... def length_squared(self) -> float: ... def normalize(self: _TVec) -> _TVec: ... def normalize_ip(self) -> None: ... def is_normalized(self) -> bool: ... def scale_to_length(self, value: float) -> None: ... def reflect(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def reflect_ip(self: _TVec, other: Union[Sequence[float], _TVec]) -> None: ... def distance_to(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... def distance_squared_to( self: _TVec, other: Union[Sequence[float], _TVec] ) -> float: ... def lerp( self: _TVec, other: Union[Sequence[float], _TVec], value: float, ) -> _TVec: ... def slerp( self: _TVec, other: Union[Sequence[float], _TVec], value: float, ) -> _TVec: ... def elementwise(self: _TVec) -> VectorElementwiseProxy[_TVec]: ... def angle_to(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... def move_towards( self: _TVec, target: Union[Sequence[float], _TVec], max_distance: float, ) -> _TVec: ... def move_towards_ip( self: _TVec, target: Union[Sequence[float], _TVec], max_distance: float, ) -> None: ... @overload def clamp_magnitude(self: _TVec, max_length: float) -> _TVec: ... @overload def clamp_magnitude( self: _TVec, min_length: float, max_length: float ) -> _TVec: ... @overload def clamp_magnitude_ip(self, max_length: float) -> None: ... @overload def clamp_magnitude_ip(self, min_length: float, max_length: float) -> None: ... def project(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def __round__(self: _TVec, ndigits: Optional[int]) -> _TVec: ... # VectorElementwiseProxy is a generic, it can be an elementwiseproxy object for # Vector2, Vector3 and vector subclass objects @final class VectorElementwiseProxy(Generic[_TVec]): def __add__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __radd__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __sub__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __rsub__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __mul__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __rmul__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __truediv__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __rtruediv__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __floordiv__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __rfloordiv__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __mod__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __rmod__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> _TVec: ... def __pow__( self, power: Union[float, _TVec, VectorElementwiseProxy[_TVec]], mod: None = None, ) -> _TVec: ... def __rpow__( self, power: Union[float, _TVec, VectorElementwiseProxy[_TVec]], mod: None = None, ) -> _TVec: ... def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... def __gt__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> bool: ... def __lt__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> bool: ... def __ge__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> bool: ... def __le__( self, other: Union[float, _TVec, VectorElementwiseProxy[_TVec]], ) -> bool: ... def __abs__(self) -> _TVec: ... def __neg__(self) -> _TVec: ... def __pos__(self) -> _TVec: ... def __bool__(self) -> bool: ... @final class VectorIterator: def __length_hint__(self) -> int: ... def __iter__(self) -> Iterator[float]: ... def __next__(self) -> float: ... # Not defined in code, only for type checking from_polar ClassObjectMethod class _from_polar_protocol(Protocol): def __call__(self, value: Tuple[float, float]) -> Optional[_TVec]: ... class Vector2(_GenericVector): x: float y: float xx: Vector2 xy: Vector2 yx: Vector2 yy: Vector2 from_polar: _from_polar_protocol @overload def __init__( self: _TVec, x: Union[str, float, Sequence[float], _TVec] = 0, ) -> None: ... @overload def __init__(self, x: float, y: float) -> None: ... def __reduce__(self: _TVec) -> Tuple[Type[_TVec], Tuple[float, float]]: ... def rotate(self: _TVec, angle: float) -> _TVec: ... def rotate_rad(self: _TVec, angle: float) -> _TVec: ... def rotate_ip(self, angle: float) -> None: ... def rotate_rad_ip(self, angle: float) -> None: ... def rotate_ip_rad(self, angle: float) -> None: ... def cross(self: _TVec, other: Union[Sequence[float], _TVec]) -> float: ... def as_polar(self) -> Tuple[float, float]: ... @overload def update( self: _TVec, x: Union[str, float, Sequence[float], _TVec] = 0, ) -> None: ... @overload def update(self, x: float = 0, y: float = 0) -> None: ... # Not defined in code, only for type checking from_spherical ClassObjectMethod class _from_spherical_protocol(Protocol): def __call__(self, value: Tuple[float, float, float]) -> Optional[_TVec]: ... class Vector3(_GenericVector): x: float y: float z: float xx: Vector2 xy: Vector2 xz: Vector2 yx: Vector2 yy: Vector2 yz: Vector2 zx: Vector2 zy: Vector2 zz: Vector2 xxx: Vector3 xxy: Vector3 xxz: Vector3 xyx: Vector3 xyy: Vector3 xyz: Vector3 xzx: Vector3 xzy: Vector3 xzz: Vector3 yxx: Vector3 yxy: Vector3 yxz: Vector3 yyx: Vector3 yyy: Vector3 yyz: Vector3 yzx: Vector3 yzy: Vector3 yzz: Vector3 zxx: Vector3 zxy: Vector3 zxz: Vector3 zyx: Vector3 zyy: Vector3 zyz: Vector3 zzx: Vector3 zzy: Vector3 zzz: Vector3 from_spherical: _from_spherical_protocol @overload def __init__( self: _TVec, x: Union[str, float, Sequence[float], _TVec] = 0, ) -> None: ... @overload def __init__(self, x: float, y: float, z: float) -> None: ... def __reduce__(self: _TVec) -> Tuple[Type[_TVec], Tuple[float, float, float]]: ... def cross(self: _TVec, other: Union[Sequence[float], _TVec]) -> _TVec: ... def rotate( self: _TVec, angle: float, axis: Union[Sequence[float], _TVec] ) -> _TVec: ... def rotate_rad( self: _TVec, angle: float, axis: Union[Sequence[float], _TVec] ) -> _TVec: ... def rotate_ip( self: _TVec, angle: float, axis: Union[Sequence[float], _TVec] ) -> None: ... def rotate_rad_ip( self: _TVec, angle: float, axis: Union[Sequence[float], _TVec] ) -> None: ... def rotate_ip_rad( self: _TVec, angle: float, axis: Union[Sequence[float], _TVec] ) -> None: ... def rotate_x(self: _TVec, angle: float) -> _TVec: ... def rotate_x_rad(self: _TVec, angle: float) -> _TVec: ... def rotate_x_ip(self, angle: float) -> None: ... def rotate_x_rad_ip(self, angle: float) -> None: ... def rotate_x_ip_rad(self, angle: float) -> None: ... def rotate_y(self: _TVec, angle: float) -> _TVec: ... def rotate_y_rad(self: _TVec, angle: float) -> _TVec: ... def rotate_y_ip(self, angle: float) -> None: ... def rotate_y_rad_ip(self, angle: float) -> None: ... def rotate_y_ip_rad(self, angle: float) -> None: ... def rotate_z(self: _TVec, angle: float) -> _TVec: ... def rotate_z_rad(self: _TVec, angle: float) -> _TVec: ... def rotate_z_ip(self, angle: float) -> None: ... def rotate_z_rad_ip(self, angle: float) -> None: ... def rotate_z_ip_rad(self, angle: float) -> None: ... def as_spherical(self) -> Tuple[float, float, float]: ... @overload def update( self: _TVec, x: Union[str, float, Sequence[float], _TVec] = 0, ) -> None: ... @overload def update(self, x: int, y: int, z: int) -> None: ... # typehints for deprecated functions, to be removed in a future version def enable_swizzling() -> None: ... def disable_swizzling() -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/midi.pyi0000644000175100001770000000335614676242340021002 0ustar00runnerdockerfrom typing import List, Sequence, Tuple, Union from pygame.event import Event MIDIIN: int MIDIOUT: int class MidiException(Exception): def __init__(self, value: str) -> None: ... def init() -> None: ... def quit() -> None: ... def get_init() -> bool: ... def get_count() -> int: ... def get_default_input_id() -> int: ... def get_default_output_id() -> int: ... def get_device_info(an_id: int) -> Tuple[bytes, bytes, int, int, int]: ... def midis2events( midis: Sequence[Sequence[Union[Sequence[int], int]]], device_id: int ) -> List[Event]: ... def time() -> int: ... def frequency_to_midi(frequency: float) -> int: ... def midi_to_frequency(midi_note: int) -> float: ... def midi_to_ansi_note(midi_note: int) -> str: ... class Input: device_id: int def __init__(self, device_id: int, buffer_size: int = 4096) -> None: ... def close(self) -> None: ... def poll(self) -> bool: ... def read(self, num_events: int) -> List[List[Union[List[int], int]]]: ... class Output: device_id: int def __init__( self, device_id: int, latency: int = 0, buffer_size: int = 256, ) -> None: ... def abort(self) -> None: ... def close(self) -> None: ... def note_off(self, note: int, velocity: int = 0, channel: int = 0) -> None: ... def note_on(self, note: int, velocity: int, channel: int = 0) -> None: ... def set_instrument(self, instrument_id: int, channel: int = 0) -> None: ... def pitch_bend(self, value: int = 0, channel: int = 0) -> None: ... def write(self, data: List[List[Union[List[int], int]]]) -> None: ... def write_short(self, status: int, data1: int = 0, data2: int = 0) -> None: ... def write_sys_ex(self, when: int, msg: Union[List[int], str]) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/mixer.pyi0000644000175100001770000000545014676242340021201 0ustar00runnerdockerfrom typing import Any, Dict, Optional, Tuple, Union, final, overload import numpy from pygame.event import Event from . import mixer_music from ._common import FileArg # export mixer_music as mixer.music music = mixer_music def init( frequency: int = 44100, size: int = -16, channels: int = 2, buffer: int = 512, devicename: Optional[str] = None, allowedchanges: int = 5, ) -> None: ... def pre_init( frequency: int = 44100, size: int = -16, channels: int = 2, buffer: int = 512, devicename: Optional[str] = None, allowedchanges: int = 5, ) -> None: ... def quit() -> None: ... def get_init() -> Tuple[int, int, int]: ... def stop() -> None: ... def pause() -> None: ... def unpause() -> None: ... def fadeout(time: int) -> None: ... def set_num_channels(count: int) -> None: ... def get_num_channels() -> int: ... def set_reserved(count: int) -> int: ... def find_channel(force: bool = False) -> Channel: ... def get_busy() -> bool: ... def get_sdl_mixer_version(linked: bool = True) -> Tuple[int, int, int]: ... class Sound: @overload def __init__(self, file: FileArg) -> None: ... @overload def __init__( self, buffer: Any ) -> None: ... # Buffer protocol is still not implemented in typing @overload def __init__( self, array: numpy.ndarray ) -> None: ... # Buffer protocol is still not implemented in typing def play( self, loops: int = 0, maxtime: int = 0, fade_ms: int = 0, ) -> Channel: ... # possibly going to be deprecated/removed soon, in which case these # typestubs must be removed too __array_interface__: Dict[str, Any] __array_struct__: Any def stop(self) -> None: ... def fadeout(self, time: int) -> None: ... def set_volume(self, value: float) -> None: ... def get_volume(self) -> float: ... def get_num_channels(self) -> int: ... def get_length(self) -> float: ... def get_raw(self) -> bytes: ... @final class Channel: def __init__(self, id: int) -> None: ... def play( self, sound: Sound, loops: int = 0, maxtime: int = 0, fade_ms: int = 0, ) -> None: ... def stop(self) -> None: ... def pause(self) -> None: ... def unpause(self) -> None: ... def fadeout(self, time: int) -> None: ... def queue(self, sound: Sound) -> None: ... @overload def set_volume(self, value: float) -> None: ... @overload def set_volume(self, left: float, right: float) -> None: ... def get_volume(self) -> float: ... def get_busy(self) -> bool: ... def get_sound(self) -> Sound: ... def get_queue(self) -> Sound: ... def set_endevent(self, type: Union[int, Event] = 0) -> None: ... def get_endevent(self) -> int: ... SoundType = Sound ChannelType = Channel ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/mixer_music.pyi0000644000175100001770000000126314676242340022377 0ustar00runnerdockerfrom typing import Optional from ._common import FileArg def load(filename: FileArg, namehint: Optional[str] = "") -> None: ... def unload() -> None: ... def play(loops: int = 0, start: float = 0.0, fade_ms: int = 0) -> None: ... def rewind() -> None: ... def stop() -> None: ... def pause() -> None: ... def unpause() -> None: ... def fadeout(time: int) -> None: ... def set_volume(volume: float) -> None: ... def get_volume() -> float: ... def get_busy() -> bool: ... def set_pos(pos: float) -> None: ... def get_pos() -> int: ... def queue(filename: FileArg, namehint: str = "", loops: int = 0) -> None: ... def set_endevent(event_type: int) -> None: ... def get_endevent() -> int: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/mouse.pyi0000644000175100001770000000224014676242340021177 0ustar00runnerdockerfrom typing import Sequence, Tuple, Union, overload from typing_extensions import Literal from pygame.cursors import Cursor from pygame.surface import Surface @overload def get_pressed(num_buttons: Literal[3] = 3) -> Tuple[bool, bool, bool]: ... @overload def get_pressed(num_buttons: Literal[5]) -> Tuple[bool, bool, bool, bool, bool]: ... def get_pos() -> Tuple[int, int]: ... def get_rel() -> Tuple[int, int]: ... @overload def set_pos(pos: Union[Sequence[float], Tuple[float, float]]) -> None: ... @overload def set_pos(x: float, y: float) -> None: ... def set_visible(value: bool | Literal[0] | Literal[1]) -> int: ... def get_visible() -> bool: ... def get_focused() -> bool: ... @overload def set_cursor(cursor: Cursor) -> None: ... @overload def set_cursor(constant: int) -> None: ... @overload def set_cursor( size: Union[Tuple[int, int], Sequence[int]], hotspot: Union[Tuple[int, int], Sequence[int]], xormasks: Sequence[int], andmasks: Sequence[int], ) -> None: ... @overload def set_cursor( hotspot: Union[Tuple[int, int], Sequence[int]], surface: Surface ) -> None: ... def get_cursor() -> Cursor: ... def set_system_cursor(cursor: int) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.969112 pygame-2.6.1/buildconfig/stubs/pygame/pixelarray.pyi0000644000175100001770000000231214676242340022227 0ustar00runnerdockerfrom typing import Any, Dict, Sequence, Tuple from pygame.surface import Surface from ._common import ColorValue class PixelArray: surface: Surface itemsize: int ndim: int shape: Tuple[int, ...] strides: Tuple[int, ...] # possibly going to be deprecated/removed soon, in which case these # typestubs must be removed too __array_interface__: Dict[str, Any] __array_struct__: Any def __init__(self, surface: Surface) -> None: ... def __enter__(self) -> PixelArray: ... def __exit__(self, *args, **kwargs) -> None: ... def make_surface(self) -> Surface: ... def replace( self, color: ColorValue, repcolor: ColorValue, distance: float = 0, weights: Sequence[float] = (0.299, 0.587, 0.114), ) -> None: ... def extract( self, color: ColorValue, distance: float = 0, weights: Sequence[float] = (0.299, 0.587, 0.114), ) -> PixelArray: ... def compare( self, array: PixelArray, distance: float = 0, weights: Sequence[float] = (0.299, 0.587, 0.114), ) -> PixelArray: ... def transpose(self) -> PixelArray: ... def close(self) -> PixelArray: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/pixelcopy.pyi0000644000175100001770000000102614676242340022064 0ustar00runnerdockerimport numpy from pygame.surface import Surface from ._common import Literal _kind = Literal["P", "p", "R", "r", "G", "g", "B", "b", "A", "a", "C", "c"] def surface_to_array( array: numpy.ndarray, surface: Surface, kind: _kind = "P", opaque: int = 255, clear: int = 0, ) -> None: ... def array_to_surface(surface: Surface, array: numpy.ndarray) -> None: ... def map_array( array1: numpy.ndarray, array2: numpy.ndarray, surface: Surface ) -> None: ... def make_surface(array: numpy.ndarray) -> Surface: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/py.typed0000644000175100001770000000000014676242340021013 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/rect.pyi0000644000175100001770000001574214676242340021017 0ustar00runnerdockerimport sys from typing import ( Dict, Iterator, List, Sequence, Tuple, TypeVar, Union, overload, Callable, Any, Optional, ) from ._common import Coordinate, Literal, RectValue if sys.version_info >= (3, 9): from collections.abc import Collection else: from typing import Collection _K = TypeVar("_K") _V = TypeVar("_V") _T = TypeVar("_T") # Rect confirms to the Collection ABC, since it also confirms to # Sized, Iterable and Container ABCs class Rect(Collection[int]): x: int y: int top: int left: int bottom: int right: int topleft: Tuple[int, int] bottomleft: Tuple[int, int] topright: Tuple[int, int] bottomright: Tuple[int, int] midtop: Tuple[int, int] midleft: Tuple[int, int] midbottom: Tuple[int, int] midright: Tuple[int, int] center: Tuple[int, int] centerx: int centery: int size: Tuple[int, int] width: int height: int w: int h: int __hash__: None # type: ignore __safe_for_unpickling__: Literal[True] @overload def __init__( self, left: float, top: float, width: float, height: float ) -> None: ... @overload def __init__(self, left_top: Coordinate, width_height: Coordinate) -> None: ... @overload def __init__(self, single_arg: RectValue) -> None: ... def __len__(self) -> Literal[4]: ... def __iter__(self) -> Iterator[int]: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> List[int]: ... @overload def __setitem__(self, key: int, value: int) -> None: ... @overload def __setitem__(self, key: slice, value: Union[int, Rect]) -> None: ... def __copy__(self) -> Rect: ... copy = __copy__ @overload def move(self, x: float, y: float) -> Rect: ... @overload def move(self, move_by: Coordinate) -> Rect: ... @overload def move_ip(self, x: float, y: float) -> None: ... @overload def move_ip(self, move_by: Coordinate) -> None: ... @overload def inflate(self, x: float, y: float) -> Rect: ... @overload def inflate(self, inflate_by: Coordinate) -> Rect: ... @overload def inflate_ip(self, x: float, y: float) -> None: ... @overload def inflate_ip(self, inflate_by: Coordinate) -> None: ... @overload def scale_by(self, x: float, y: float) -> Rect: ... @overload def scale_by(self, scale_by: Coordinate) -> Rect: ... @overload def scale_by_ip(self, x: float, y: float) -> None: ... @overload def scale_by_ip(self, scale_by: Coordinate) -> None: ... @overload def update(self, left: float, top: float, width: float, height: float) -> None: ... @overload def update(self, left_top: Coordinate, width_height: Coordinate) -> None: ... @overload def update(self, single_arg: RectValue) -> None: ... @overload def clamp(self, rect: RectValue) -> Rect: ... @overload def clamp(self, left_top: Coordinate, width_height: Coordinate) -> Rect: ... @overload def clamp(self, left: float, top: float, width: float, height: float) -> Rect: ... @overload def clamp_ip(self, rect: RectValue) -> None: ... @overload def clamp_ip(self, left_top: Coordinate, width_height: Coordinate) -> None: ... @overload def clamp_ip( self, left: float, top: float, width: float, height: float ) -> None: ... @overload def clip(self, rect: RectValue) -> Rect: ... @overload def clip(self, left_top: Coordinate, width_height: Coordinate) -> Rect: ... @overload def clip(self, left: float, top: float, width: float, height: float) -> Rect: ... @overload def clipline( self, x1: float, x2: float, x3: float, x4: float ) -> Union[Tuple[Tuple[int, int], Tuple[int, int]], Tuple[()]]: ... @overload def clipline( self, first_coordinate: Coordinate, second_coordinate: Coordinate ) -> Union[Tuple[Tuple[int, int], Tuple[int, int]], Tuple[()]]: ... @overload def clipline( self, rect_arg: RectValue ) -> Union[Tuple[Tuple[int, int], Tuple[int, int]], Tuple[()]]: ... @overload def union(self, rect: RectValue) -> Rect: ... @overload def union(self, left_top: Coordinate, width_height: Coordinate) -> Rect: ... @overload def union(self, left: float, top: float, width: float, height: float) -> Rect: ... @overload def union_ip(self, rect: RectValue) -> None: ... @overload def union_ip(self, left_top: Coordinate, width_height: Coordinate) -> None: ... @overload def union_ip( self, left: float, top: float, width: float, height: float ) -> None: ... def unionall(self, rect: Sequence[RectValue]) -> Rect: ... def unionall_ip(self, rects: Sequence[RectValue]) -> None: ... @overload def fit(self, rect: RectValue) -> Rect: ... @overload def fit(self, left_top: Coordinate, width_height: Coordinate) -> Rect: ... @overload def fit(self, left: float, top: float, width: float, height: float) -> Rect: ... def normalize(self) -> None: ... def __contains__(self, rect: Union[RectValue, int]) -> bool: ... # type: ignore[override] @overload def contains(self, rect: RectValue) -> bool: ... @overload def contains(self, left_top: Coordinate, width_height: Coordinate) -> bool: ... @overload def contains( self, left: float, top: float, width: float, height: float ) -> bool: ... @overload def collidepoint(self, x: float, y: float) -> bool: ... @overload def collidepoint(self, x_y: Coordinate) -> bool: ... @overload def colliderect(self, rect: RectValue) -> bool: ... @overload def colliderect(self, left_top: Coordinate, width_height: Coordinate) -> bool: ... @overload def colliderect( self, left: float, top: float, width: float, height: float ) -> bool: ... def collidelist(self, rects: Sequence[RectValue]) -> int: ... def collidelistall(self, rects: Sequence[RectValue]) -> List[int]: ... def collideobjectsall( self, objects: Sequence[_T], key: Optional[Callable[[_T], RectValue]] = None ) -> List[_T]: ... def collideobjects( self, objects: Sequence[_T], key: Optional[Callable[[_T], RectValue]] = None ) -> Optional[_T]: ... # Also undocumented: the dict collision methods take a 'values' argument # that defaults to False. If it is False, the keys in rect_dict must be # Rect-like; otherwise, the values must be Rects. @overload def collidedict( self, rect_dict: Dict[RectValue, _V], values: bool = ... ) -> Tuple[RectValue, _V]: ... @overload def collidedict( self, rect_dict: Dict[_K, "Rect"], values: bool ) -> Tuple[_K, "Rect"]: ... @overload def collidedictall( self, rect_dict: Dict[RectValue, _V], values: bool = ... ) -> List[Tuple[RectValue, _V]]: ... @overload def collidedictall( self, rect_dict: Dict[_K, "Rect"], values: bool ) -> List[Tuple[_K, "Rect"]]: ... RectType = Rect ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/rwobject.pyi0000644000175100001770000000104014676242340021663 0ustar00runnerdockerfrom typing import Any, Optional, overload, Type from ._common import AnyPath def encode_string( obj: Optional[AnyPath], encoding: Optional[str] = "unicode_escape", errors: Optional[str] = "backslashreplace", etype: Optional[Type[Exception]] = UnicodeEncodeError, ) -> bytes: ... @overload def encode_file_path( obj: Optional[AnyPath], etype: Optional[Type[Exception]] = UnicodeEncodeError ) -> bytes: ... @overload def encode_file_path( obj: Any, etype: Optional[Type[Exception]] = UnicodeEncodeError ) -> bytes: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/scrap.pyi0000644000175100001770000000055614676242340021167 0ustar00runnerdockerfrom typing import List, Optional from collections.abc import ByteString def init() -> None: ... def get_init() -> bool: ... def get(data_type: str) -> Optional[bytes]: ... def get_types() -> List[str]: ... def put(data_type: str, data: ByteString) -> None: ... def contains(data_type: str) -> bool: ... def lost() -> bool: ... def set_mode(mode: int) -> None: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/sndarray.pyi0000644000175100001770000000052114676242340021672 0ustar00runnerdockerfrom typing import Tuple import numpy from pygame.mixer import Sound def array(sound: Sound) -> numpy.ndarray: ... def samples(sound: Sound) -> numpy.ndarray: ... def make_sound(array: numpy.ndarray) -> Sound: ... def use_arraytype(arraytype: str) -> Sound: ... def get_arraytype() -> str: ... def get_arraytypes() -> Tuple[str]: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/sprite.pyi0000644000175100001770000002302414676242340021360 0ustar00runnerdockerfrom typing import ( Any, Callable, Dict, Generic, Iterable, Iterator, List, Literal, Optional, SupportsFloat, Tuple, TypeVar, Union, ) # Protocol added in python 3.8 from typing_extensions import Protocol from pygame.rect import Rect from pygame.surface import Surface from pygame.mask import Mask from ._common import RectValue, Coordinate # non-generic Group, used in Sprite _Group = AbstractGroup[_SpriteSupportsGroup] # protocol helps with structural subtyping for typevars in sprite group generics class _SupportsSprite(Protocol): @property def layer(self) -> int: ... @layer.setter def layer(self, value: int) -> None: ... def __init__(self, *groups: _Group) -> None: ... def add_internal(self, group: _Group) -> None: ... def remove_internal(self, group: _Group) -> None: ... def update(self, *args: Any, **kwargs: Any) -> None: ... def add(self, *groups: _Group) -> None: ... def remove(self, *groups: _Group) -> None: ... def kill(self) -> None: ... def alive(self) -> bool: ... def groups(self) -> List[_Group]: ... # also a protocol class _SupportsDirtySprite(_SupportsSprite, Protocol): dirty: int blendmode: int source_rect: Rect visible: int _layer: int def _set_visible(self, val: int) -> None: ... def _get_visible(self) -> int: ... # concrete sprite implementation class class Sprite(_SupportsSprite): @property def layer(self) -> int: ... @layer.setter def layer(self, value: int) -> None: ... def __init__(self, *groups: _Group) -> None: ... def add_internal(self, group: _Group) -> None: ... def remove_internal(self, group: _Group) -> None: ... def update(self, *args: Any, **kwargs: Any) -> None: ... def add(self, *groups: _Group) -> None: ... def remove(self, *groups: _Group) -> None: ... def kill(self) -> None: ... def alive(self) -> bool: ... def groups(self) -> List[_Group]: ... class WeakSprite(Sprite): ... # concrete dirty sprite implementation class class DirtySprite(_SupportsDirtySprite): dirty: int blendmode: int source_rect: Rect visible: int _layer: int def _set_visible(self, val: int) -> None: ... def _get_visible(self) -> int: ... class WeakDirtySprite(WeakSprite, DirtySprite): ... # used as a workaround for typing.Self because it is added in python 3.11 _TGroup = TypeVar("_TGroup", bound=AbstractGroup) # define some useful protocols first, which sprite functions accept # sprite functions don't need all sprite attributes to be present in the # arguments passed, they only use a few which are marked in the below protocols class _HasRect(Protocol): rect: Rect # image in addition to rect class _HasImageAndRect(_HasRect, Protocol): image: Surface # mask in addition to rect class _HasMaskAndRect(_HasRect, Protocol): mask: Mask # radius in addition to rect class _HasRadiusAndRect(_HasRect, Protocol): radius: float class _SpriteSupportsGroup(_SupportsSprite, _HasImageAndRect, Protocol): ... class _DirtySpriteSupportsGroup(_SupportsDirtySprite, _HasImageAndRect, Protocol): ... # typevar bound to Sprite, _SpriteSupportsGroup Protocol ensures sprite # subclass passed to group has image and rect attributes _TSprite = TypeVar("_TSprite", bound=_SpriteSupportsGroup) _TSprite2 = TypeVar("_TSprite2", bound=_SpriteSupportsGroup) # almost the same as _TSprite but bound to DirtySprite _TDirtySprite = TypeVar("_TDirtySprite", bound=_DirtySpriteSupportsGroup) # Below code demonstrates the advantages of the _SpriteSupportsGroup protocol # typechecker should error, regular Sprite does not support Group.draw due to # missing image and rect attributes # a = Group(Sprite()) # typechecker should error, other Sprite attributes are also needed for Group # class MySprite: # image: Surface # rect: Rect # # b = Group(MySprite()) # typechecker should pass # class MySprite(Sprite): # image: Surface # rect: Rect # # b = Group(MySprite()) class AbstractGroup(Generic[_TSprite]): spritedict: Dict[_TSprite, Optional[Rect]] lostsprites: List[Rect] def __init__(self) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_TSprite]: ... def __bool__(self) -> bool: ... def __contains__(self, item: Any) -> bool: ... def add_internal(self, sprite: _TSprite, layer: None = None) -> None: ... def remove_internal(self, sprite: _TSprite) -> None: ... def has_internal(self, sprite: _TSprite) -> bool: ... def copy(self: _TGroup) -> _TGroup: ... # typing.Self is py3.11+ def sprites(self) -> List[_TSprite]: ... def add( self, *sprites: Union[_TSprite, AbstractGroup[_TSprite], Iterable[_TSprite]] ) -> None: ... def remove( self, *sprites: Union[_TSprite, AbstractGroup[_TSprite], Iterable[_TSprite]] ) -> None: ... def has( self, *sprites: Union[_TSprite, AbstractGroup[_TSprite], Iterable[_TSprite]] ) -> bool: ... def update(self, *args: Any, **kwargs: Any) -> None: ... def draw( self, surface: Surface, bgsurf: Optional[Surface] = None, special_flags: int = 0 ) -> List[Rect]: ... def clear( self, surface: Surface, bgd: Union[Surface, Callable[[Surface, Rect], Any]] ) -> None: ... def empty(self) -> None: ... class Group(AbstractGroup[_TSprite]): def __init__( self, *sprites: Union[_TSprite, AbstractGroup[_TSprite], Iterable[_TSprite]] ) -> None: ... # these are aliased in the code too RenderPlain = Group RenderClear = Group class RenderUpdates(Group[_TSprite]): ... class OrderedUpdates(RenderUpdates[_TSprite]): ... class LayeredUpdates(AbstractGroup[_TSprite]): def __init__( self, *sprites: Union[ _TSprite, AbstractGroup[_TSprite], Iterable[Union[_TSprite, AbstractGroup[_TSprite]]], ], **kwargs: Any ) -> None: ... def add( self, *sprites: Union[ _TSprite, AbstractGroup[_TSprite], Iterable[Union[_TSprite, AbstractGroup[_TSprite]]], ], **kwargs: Any ) -> None: ... def get_sprites_at(self, pos: Coordinate) -> List[_TSprite]: ... def get_sprite(self, idx: int) -> _TSprite: ... def remove_sprites_of_layer(self, layer_nr: int) -> List[_TSprite]: ... def layers(self) -> List[int]: ... def change_layer(self, sprite: _TSprite, new_layer: int) -> None: ... def get_layer_of_sprite(self, sprite: _TSprite) -> int: ... def get_top_layer(self) -> int: ... def get_bottom_layer(self) -> int: ... def move_to_front(self, sprite: _TSprite) -> None: ... def move_to_back(self, sprite: _TSprite) -> None: ... def get_top_sprite(self) -> _TSprite: ... def get_sprites_from_layer(self, layer: int) -> List[_TSprite]: ... def switch_layer(self, layer1_nr: int, layer2_nr: int) -> None: ... class LayeredDirty(LayeredUpdates[_TDirtySprite]): def __init__(self, *sprites: _TDirtySprite, **kwargs: Any) -> None: ... def draw( self, surface: Surface, bgsurf: Optional[Surface] = None, special_flags: Optional[int] = None ) -> List[Rect]: ... # clear breaks Liskov substitution principle in code def clear(self, surface: Surface, bgd: Surface) -> None: ... # type: ignore[override] def repaint_rect(self, screen_rect: RectValue) -> None: ... def set_clip(self, screen_rect: Optional[RectValue] = None) -> None: ... def get_clip(self) -> Rect: ... def set_timing_threshold( self, time_ms: SupportsFloat ) -> None: ... # This actually accept any value # deprecated alias set_timing_treshold = set_timing_threshold class GroupSingle(AbstractGroup[_TSprite]): sprite: _TSprite def __init__(self, sprite: Optional[_TSprite] = None) -> None: ... # argument to collide_rect must have rect attribute def collide_rect(left: _HasRect, right: _HasRect) -> bool: ... class collide_rect_ratio: ratio: float def __init__(self, ratio: float) -> None: ... def __call__(self, left: _HasRect, right: _HasRect) -> bool: ... # must have rect attribute, may optionally have radius attribute _SupportsCollideCircle = Union[_HasRect, _HasRadiusAndRect] def collide_circle( left: _SupportsCollideCircle, right: _SupportsCollideCircle ) -> bool: ... class collide_circle_ratio: ratio: float def __init__(self, ratio: float) -> None: ... def __call__( self, left: _SupportsCollideCircle, right: _SupportsCollideCircle ) -> bool: ... # argument to collide_mask must either have mask or have image attribute, in # addition to mandatorily having a rect attribute _SupportsCollideMask = Union[_HasImageAndRect, _HasMaskAndRect] def collide_mask( left: _SupportsCollideMask, right: _SupportsCollideMask ) -> Optional[Tuple[int, int]]: ... def spritecollide( sprite: _TSprite, group: AbstractGroup[_TSprite2], dokill: bool | Literal[1] | Literal[0], collided: Optional[ Callable[[_TSprite, _TSprite2], bool | Optional[Tuple[int, int]]] ] = None, ) -> List[_TSprite2]: ... def groupcollide( groupa: AbstractGroup[_TSprite], groupb: AbstractGroup[_TSprite2], dokilla: bool | Literal[1] | Literal[0], dokillb: bool | Literal[1] | Literal[0], collided: Optional[ Callable[[_TSprite, _TSprite2], bool | Optional[Tuple[int, int]]] ] = None, ) -> Dict[_TSprite, List[_TSprite2]]: ... def spritecollideany( sprite: _TSprite, group: AbstractGroup[_TSprite2], collided: Optional[ Callable[[_TSprite, _TSprite2], bool | Optional[Tuple[int, int]]] ] = None, ) -> Optional[_TSprite2]: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/surface.pyi0000644000175100001770000001116614676242340021506 0ustar00runnerdockerfrom typing import Any, List, Optional, Sequence, Tuple, Union, overload from pygame.bufferproxy import BufferProxy from pygame.color import Color from pygame.rect import Rect from ._common import ColorValue, Coordinate, Literal, RectValue, RGBAOutput _ViewKind = Literal[ "0", "1", "2", "3", b"0", b"1", b"2", b"3", "r", "g", "b", "a", "R", "G", "B", "A", b"r", b"g", b"b", b"a", b"R", b"G", b"B", b"A", ] class Surface: _pixels_address: int @overload def __init__( self, size: Coordinate, flags: int = 0, depth: int = 0, masks: Optional[ColorValue] = None, ) -> None: ... @overload def __init__( self, size: Coordinate, flags: int = 0, surface: Surface = ..., ) -> None: ... def __copy__(self) -> Surface: ... copy = __copy__ def blit( self, source: Surface, dest: Union[Coordinate, RectValue], area: Optional[RectValue] = None, special_flags: int = 0, ) -> Rect: ... def blits( self, blit_sequence: Sequence[ Union[ Tuple[Surface, Union[Coordinate, RectValue]], Tuple[Surface, Union[Coordinate, RectValue], Union[RectValue, int]], Tuple[Surface, Union[Coordinate, RectValue], RectValue, int], ] ], doreturn: Union[int, bool] = 1, ) -> Union[List[Rect], None]: ... @overload def convert(self, surface: Surface) -> Surface: ... @overload def convert(self, depth: int, flags: int = 0) -> Surface: ... @overload def convert(self, masks: ColorValue, flags: int = 0) -> Surface: ... @overload def convert(self) -> Surface: ... @overload def convert_alpha(self, surface: Surface) -> Surface: ... @overload def convert_alpha(self) -> Surface: ... def fill( self, color: ColorValue, rect: Optional[RectValue] = None, special_flags: int = 0, ) -> Rect: ... def scroll(self, dx: int = 0, dy: int = 0) -> None: ... @overload def set_colorkey(self, color: ColorValue, flags: int = 0) -> None: ... @overload def set_colorkey(self, color: None) -> None: ... def get_colorkey(self) -> Optional[RGBAOutput]: ... @overload def set_alpha(self, value: int, flags: int = 0) -> None: ... @overload def set_alpha(self, value: None) -> None: ... def get_alpha(self) -> Optional[int]: ... def lock(self) -> None: ... def unlock(self) -> None: ... def mustlock(self) -> bool: ... def get_locked(self) -> bool: ... def get_locks(self) -> Tuple[Any, ...]: ... def get_at(self, x_y: Sequence[int]) -> Color: ... def set_at(self, x_y: Sequence[int], color: ColorValue) -> None: ... def get_at_mapped(self, x_y: Sequence[int]) -> int: ... def get_palette(self) -> List[Color]: ... def get_palette_at(self, index: int) -> Color: ... def set_palette(self, palette: Sequence[ColorValue]) -> None: ... def set_palette_at(self, index: int, color: ColorValue) -> None: ... def map_rgb(self, color: ColorValue) -> int: ... def unmap_rgb(self, mapped_int: int) -> Color: ... def set_clip(self, rect: Optional[RectValue]) -> None: ... def get_clip(self) -> Rect: ... @overload def subsurface(self, rect: RectValue) -> Surface: ... @overload def subsurface(self, left_top: Coordinate, width_height: Coordinate) -> Surface: ... @overload def subsurface( self, left: float, top: float, width: float, height: float ) -> Surface: ... def get_parent(self) -> Surface: ... def get_abs_parent(self) -> Surface: ... def get_offset(self) -> Tuple[int, int]: ... def get_abs_offset(self) -> Tuple[int, int]: ... def get_size(self) -> Tuple[int, int]: ... def get_width(self) -> int: ... def get_height(self) -> int: ... def get_rect(self, **kwargs: Any) -> Rect: ... def get_bitsize(self) -> int: ... def get_bytesize(self) -> int: ... def get_flags(self) -> int: ... def get_pitch(self) -> int: ... def get_masks(self) -> RGBAOutput: ... def set_masks(self, color: ColorValue) -> None: ... def get_shifts(self) -> RGBAOutput: ... def set_shifts(self, color: ColorValue) -> None: ... def get_losses(self) -> RGBAOutput: ... def get_bounding_rect(self, min_alpha: int = 1) -> Rect: ... def get_view(self, kind: _ViewKind = "2") -> BufferProxy: ... def get_buffer(self) -> BufferProxy: ... def get_blendmode(self) -> int: ... def premul_alpha(self) -> Surface: ... SurfaceType = Surface ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/surfarray.pyi0000644000175100001770000000240714676242340022072 0ustar00runnerdockerfrom typing import Tuple import numpy from pygame.surface import Surface # importing this way exports the functions in the typestubs from pygame.pixelcopy import ( array_to_surface as array_to_surface, surface_to_array as surface_to_array, ) def array2d(surface: Surface) -> numpy.ndarray: ... def pixels2d(surface: Surface) -> numpy.ndarray: ... def array3d(surface: Surface) -> numpy.ndarray: ... def pixels3d(surface: Surface) -> numpy.ndarray: ... def array_alpha(surface: Surface) -> numpy.ndarray: ... def pixels_alpha(surface: Surface) -> numpy.ndarray: ... def array_red(surface: Surface) -> numpy.ndarray: ... def pixels_red(surface: Surface) -> numpy.ndarray: ... def array_green(surface: Surface) -> numpy.ndarray: ... def pixels_green(surface: Surface) -> numpy.ndarray: ... def array_blue(surface: Surface) -> numpy.ndarray: ... def pixels_blue(surface: Surface) -> numpy.ndarray: ... def array_colorkey(surface: Surface) -> numpy.ndarray: ... def make_surface(array: numpy.ndarray) -> Surface: ... def blit_array(surface: Surface, array: numpy.ndarray) -> None: ... def map_array(surface: Surface, array: numpy.ndarray) -> numpy.ndarray: ... def use_arraytype(arraytype: str) -> None: ... def get_arraytype() -> str: ... def get_arraytypes() -> Tuple[str]: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/surflock.pyi0000644000175100001770000000017214676242340021701 0ustar00runnerdocker# surflock is a private pygame module that does not export any public API # this file is kept here to make stubtest happy ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/time.pyi0000644000175100001770000000076514676242340021017 0ustar00runnerdockerfrom typing import Union, final from pygame.event import Event def get_ticks() -> int: ... def wait(milliseconds: int) -> int: ... def delay(milliseconds: int) -> int: ... def set_timer(event: Union[int, Event], millis: int, loops: int = 0) -> None: ... @final class Clock: def tick(self, framerate: float = 0) -> int: ... def tick_busy_loop(self, framerate: float = 0) -> int: ... def get_time(self) -> int: ... def get_rawtime(self) -> int: ... def get_fps(self) -> float: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/transform.pyi0000644000175100001770000000371714676242340022074 0ustar00runnerdockerfrom typing import Literal, Optional, Sequence, Union from pygame.color import Color from pygame.surface import Surface from ._common import ColorValue, Coordinate, RectValue def flip( surface: Surface, flip_x: bool | Literal[0] | Literal[1], flip_y: bool | Literal[0] | Literal[1], ) -> Surface: ... def scale( surface: Surface, size: Coordinate, dest_surface: Optional[Surface] = None, ) -> Surface: ... def scale_by( surface: Surface, factor: Union[float, Sequence[float]], dest_surface: Optional[Surface] = None, ) -> Surface: ... def rotate(surface: Surface, angle: float) -> Surface: ... def rotozoom(surface: Surface, angle: float, scale: float) -> Surface: ... def scale2x(surface: Surface, dest_surface: Optional[Surface] = None) -> Surface: ... def grayscale(surface: Surface, dest_surface: Optional[Surface] = None) -> Surface: ... def smoothscale( surface: Surface, size: Coordinate, dest_surface: Optional[Surface] = None, ) -> Surface: ... def smoothscale_by( surface: Surface, factor: Union[float, Sequence[float]], dest_surface: Optional[Surface] = None, ) -> Surface: ... def get_smoothscale_backend() -> str: ... def set_smoothscale_backend(backend: str) -> None: ... def chop(surface: Surface, rect: RectValue) -> Surface: ... def laplacian(surface: Surface, dest_surface: Optional[Surface] = None) -> Surface: ... def average_surfaces( surfaces: Sequence[Surface], dest_surface: Optional[Surface] = None, palette_colors: Union[bool, int] = 1, ) -> Surface: ... def average_color( surface: Surface, rect: Optional[RectValue] = None, consider_alpha: bool = False ) -> Color: ... def threshold( dest_surface: Optional[Surface], surface: Surface, search_color: Optional[ColorValue], threshold: ColorValue = (0, 0, 0, 0), set_color: Optional[ColorValue] = (0, 0, 0, 0), set_behavior: int = 1, search_surf: Optional[Surface] = None, inverse_set: bool = False, ) -> int: ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/stubs/pygame/version.pyi0000644000175100001770000000113014676242340021531 0ustar00runnerdockerfrom typing import Tuple from ._common import Literal class SoftwareVersion(Tuple[int, int, int]): def __new__(cls, major: int, minor: int, patch: int) -> SoftwareVersion: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... @property def major(self) -> int: ... @property def minor(self) -> int: ... @property def patch(self) -> int: ... fields: Tuple[Literal["major"], Literal["minor"], Literal["patch"]] class PygameVersion(SoftwareVersion): ... class SDLVersion(SoftwareVersion): ... SDL: SDLVersion ver: str vernum: PygameVersion rev: str ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/version.py.in0000644000175100001770000000436414676242340017357 0ustar00runnerdocker## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Pete Shinners ## pete@shinners.org """Simply the current installed pygame version. The version information is stored in the regular pygame module as 'pygame.ver'. Keeping the version information also available in a separate module allows you to test the pygame version without importing the main pygame module. The python version information should always compare greater than any previous releases. (hmm, until we get to versions > 10) """ from pygame.base import get_sdl_version ############### # This file is generated with version.py.in ## class SoftwareVersion(tuple): """ A class for storing data about software versions. """ __slots__ = () fields = "major", "minor", "patch" def __new__(cls, major, minor, patch): return tuple.__new__(cls, (major, minor, patch)) def __repr__(self): fields = (f"{fld}={val}" for fld, val in zip(self.fields, self)) return f"{str(self.__class__.__name__)}({', '.join(fields)})" def __str__(self): return f"{self.major}.{self.minor}.{self.patch}" major = property(lambda self: self[0]) minor = property(lambda self: self[1]) patch = property(lambda self: self[2]) class PygameVersion(SoftwareVersion): """ Pygame Version class. """ class SDLVersion(SoftwareVersion): """ SDL Version class. """ _sdl_tuple = get_sdl_version() SDL = SDLVersion(_sdl_tuple[0], _sdl_tuple[1], _sdl_tuple[2]) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/buildconfig/vstools.py0000644000175100001770000000366614676242340017002 0ustar00runnerdockerimport re try: from distutils.msvccompiler import MSVCCompiler, get_build_architecture except ImportError: from setuptools._distutils.msvccompiler import MSVCCompiler, get_build_architecture import subprocess import os compiler = MSVCCompiler() compiler.initialize() _fmt_header = ';\n; Definition file of %s\n; Generated by vstools\n;\n' class DumpbinError(Exception): pass class DumpbinParseError(DumpbinError): pass def find_symbols(dll): dumpbin_path = compiler.find_exe('dumpbin.exe') try: output = subprocess.check_output( [dumpbin_path, '/nologo', '/exports', dll], universal_newlines=True, ) except subprocess.CalledProcessError as e: raise DumpbinError(e.output) lines = output.split('\n') it = iter(lines) found = False for line in it: if 'name' in line: found = True break if not found: raise DumpbinParseError next(it) next(it) next(it) symbols = [] exp = re.compile(r'\w+') for line in it: if not line.strip(): break symbols.append(exp.findall(line)[3]) return symbols def dump_def(dll, def_file=None): if not def_file: def_file = f'{os.path.splitext(dll)[0]}.def' dll_base = os.path.basename(dll) with open(def_file, 'w') as f: f.write(_fmt_header % dll_base) f.write(f'LIBRARY "{dll_base}\"\n') f.write('EXPORTS\n') f.writelines(f"{line}\n" for line in find_symbols(dll)) def lib_from_def(def_file, arch=None): if not arch: arch = get_build_architecture() if arch == 'Intel': arch = 'x86' elif arch == 'Itanium': arch = 'IA64' else: arch = 'x64' lib_file = f'{os.path.splitext(def_file)[0]}.lib' compiler.spawn([compiler.lib, '/nologo', f'/MACHINE:{arch}', f'/DEF:{def_file}', f'/OUT:{lib_file}']) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9931257 pygame-2.6.1/docs/0000755000175100001770000000000014676242436013355 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/LGPL.txt0000644000175100001770000006347614676242340014666 0ustar00runnerdocker GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/README.md0000644000175100001770000000633314676242340014633 0ustar00runnerdocker## Pygame Documentation Overview ### Accessing Documentation Obviously you can visit pygame.org/docs to see the documentation, but the documentation can also be launched with `python -m pygame.docs` ### Generating the Documentation Steps: - Have Python 3.6 or higher - install Sphinx (`pip install Sphinx==4.5.0`) - fork the pygame repository, download and navigate to it in the terminal - run `python setup.py docs` This will create a new folder under the `docs` folder. In `docs/generated`, you will find a local copy of the pygame documentation. You can launch this by clicking on index.html or by running the command `python -m docs` from the pygame folder. (The same as manually running __main__.py in `docs/`). The docs launch command will direct you to the pygame website if there aren't any locally generated docs. There is also a `docs --fullgeneration` or `docs --f` command for regenerating everything regardless of whether Sphinx thinks it should be regenerated. This is useful when editing the theme CSS. ### Contributing If you see any grammatical mistakes or errors in the documentation, contributing to the docs is a great way to help out. For simple things, no issue is necessary -- but if you want to change something complex it would be best to open an issue first. Some background that may help with changes: pygame's documentation is written in rst files, which stands for "ReStructured Text." We use Sphinx ([Sphinx Documentation](https://www.sphinx-doc.org/en/master/)) to convert these rst files into html, which are then hosted on the pygame website. Sphinx has a good ReStructured Text primer to learn the basics: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html Contributing steps: - Have an idea to improve the docs, perhaps create an issue on GitHub - Find the file you want to edit: it will most likely be in `docs/reST/ref`. OR - Pygame docs pages have an "Edit on GitHub" button, which will show you the file - Download the pygame source from GitHub locally. ^ One way to do this is to fork and use a Git client to make that a local repository - Implement your idea. - Follow the steps in "Generating the Documentation" ^ This is important to test your changes work well - Commit your changes, create a pull request ## Documentation Style The pygame documentation files have developed the convention of a 79 character line limit, from PEP8. They also use a 3 space indent. ## Pygame Documentation Implementation Details This is meant to be a place for explanations of things that may confuse people in the future. ### Hidden modules Pygame still has documentation for the old cdrom and Overlay modules, which are discontinued in SDL2 based pygame (pygame 2). It just doesn't show them, because `docs/reST/themes/classic/elements.html` now has a list of "blacklisted" modules to not put into the top bar. It also uses this for the experimental sdl2_video docs. ### Styling / Themes CSS rules for the generated HTML come from `docs/reST/themes/classic/static/pygame.css_t`. This, in turn, inherits rules from Sphinx's basic.css, which is autogenerated when Sphinx builds. This is an example of a [Sphinx static template](https://www.sphinx-doc.org/en/master/development/theming.html#static-templates)././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/__main__.py0000644000175100001770000000174314676242340015446 0ustar00runnerdocker# python -m pygame.docs import os import webbrowser from urllib.parse import quote, urlunparse def _iterpath(path): path, last = os.path.split(path) if last: yield from _iterpath(path) yield last # for test suite to confirm pygame built with local docs def has_local_docs(): pkg_dir = os.path.dirname(os.path.abspath(__file__)) main_page = os.path.join(pkg_dir, "generated", "index.html") return os.path.exists(main_page) def open_docs(): pkg_dir = os.path.dirname(os.path.abspath(__file__)) main_page = os.path.join(pkg_dir, "generated", "index.html") if os.path.exists(main_page): url_path = quote("/".join(_iterpath(main_page))) drive, rest = os.path.splitdrive(__file__) if drive: url_path = f"{drive}/{url_path}" url = urlunparse(("file", "", url_path, "", "", "")) else: url = "https://www.pygame.org/docs/" webbrowser.open(url) if __name__ == "__main__": open_docs() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9931257 pygame-2.6.1/docs/es/0000755000175100001770000000000014676242436013764 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/es/README.md0000644000175100001770000000747014676242340015245 0ustar00runnerdocker## Descripción General de la Documentación de Pygame ### Acceso a la Documentación Obviamente podés visitar pygame.org/docs para ver la documentación, pero la documentación también está publicada con `python -m pygame.docs` ### Generación de Documentación Pasos: - Tener Python 3.6 or superior - Instalar Sphinx (`pip install Sphinx==4.5.0`) - Bifurcar (fork) el repositorio de pygame, descargar y navegar en la terminal - ejecutar `python setup.py docs` Esto va a crear una nueva carpeta dentro de la carpeta `docs` En `docs/generated`, vas a encontrar una copia de la documentación de pygame. Podés ejecutar esto haciendo click en index.html o ejecutando el comando `python -m docs` desde la carpeta de pygame. (Es lo mismo que ejecutar manualmente __main__.py en `docs/`). El comando de ejecución de la documentación te dirigirá a un sitio web de pygame si no hay documentación generada localmente. También hay un comando `docs --fullgeneration` o `docs --f` para regenerar todo sin importar si Sphinx considera que debería ser regenerado. Esto es útil cuando se edita el CSS del tema. ### Contribuir Sí ves errores gramaticales o errores en la documentación, contribuir en la documentación es una gran forma de ayudar. Para cosas simples, no es necesario un issue -- pero si querés cambiar algo complejo lo mejor sería abrir un issue primero. Algunos antecedentes que pueden ayudar con los cambios: la documentación de Pygame está escrita en archivo rst, que significa "ReStructured Text". Usamos Sphinx ([Sphinx Documentation](https://www.sphinx-doc.org/en/master/)) para convertir estos archivos rst en html, que luego se alojan en el sitio web de Pygame. Sphinx tiene un buen tutorial de ReStructure Text para aprender lo básico: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html Pasos para contribuir: - Tener una idea para mejorar el docs, quizá crear un issue en GitHub - Encontrar el archivo que querés editar: probablemente este en `docs/reST/ref`. OR - Las páginas de docs de Pygame tienen un botón "Edit on Github" (Editar en GitHub), que te mostrará el archivo - Descarga el código fuente de pygame desde GitHub localmente. ^ Una forma de hacer esto es bifurcando (fork) y usar el cliente de Git para hacer de eso un repositorio local - Implementa tu idea. - Seguí los pasos en "Generando la Documentación" ^ Esto es importante para probar que los cambios funcionen bien - Confirma (commit) tus cambios, crea una solicitud de incorporación de cambios (a pull request) ## Estilo de Documentación Los archivos de documentación de pygame han adoptado la conveción de límite de línea de 79 caracteres, proveniente de PEP8. También utilizan una indentación de 3 espacios. ## Detalles de la Implementación de la Documentación de Pygame Este es un lugar para proporcionar explicaciones sobre cosas que pueden confundir a la gente en un futuro. ### Módulos Ocultos Pygame todavía tiene documentación para los antiguos módulos 'cdrom' y 'Overlay', que han sido descontinuados en SDL2 que se basa en pygame (pygame 2). Sin embargo, estos módulos no se muestran porque `docs/reST/themes/classic/elements.html` tiene ahora una lista de los módulos "prohibidos" para que no se los incluya en la barra superior. También se utiliza para el la documentación experimental sdl2_video. ### Diseño visual / Temas Las reglas de CSS para el HTML generado provienen de `docs/reST/themes/classic/static/pygame.css_t`. A su vez, este hereda las reglas de basic.css de Sphinx, el cual se genera automáticamente cuando Sphinx construye la documentación. Este es un ejemplo de una [plantilla estática de Sphinx](https://www.sphinx-doc.org/en/master/development/theming.html#static-templates)././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/color_list.rst0000644000175100001770000027416314676242340016676 0ustar00runnerdocker.. include:: ../reST/common.txt Colores Nombrados ================= .. raw:: html :doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_). .. role:: aliceblue .. role:: antiquewhite .. role:: antiquewhite1 .. role:: antiquewhite2 .. role:: antiquewhite3 .. role:: antiquewhite4 .. role:: aqua .. role:: aquamarine .. role:: aquamarine1 .. role:: aquamarine2 .. role:: aquamarine3 .. role:: aquamarine4 .. role:: azure .. role:: azure1 .. role:: azure2 .. role:: azure3 .. role:: azure4 .. role:: beige .. role:: bisque .. role:: bisque1 .. role:: bisque2 .. role:: bisque3 .. role:: bisque4 .. role:: black .. role:: blanchedalmond .. role:: blue .. role:: blue1 .. role:: blue2 .. role:: blue3 .. role:: blue4 .. role:: blueviolet .. role:: brown .. role:: brown1 .. role:: brown2 .. role:: brown3 .. role:: brown4 .. role:: burlywood .. role:: burlywood1 .. role:: burlywood2 .. role:: burlywood3 .. role:: burlywood4 .. role:: cadetblue .. role:: cadetblue1 .. role:: cadetblue2 .. role:: cadetblue3 .. role:: cadetblue4 .. role:: chartreuse .. role:: chartreuse1 .. role:: chartreuse2 .. role:: chartreuse3 .. role:: chartreuse4 .. role:: chocolate .. role:: chocolate1 .. role:: chocolate2 .. role:: chocolate3 .. role:: chocolate4 .. role:: coral .. role:: coral1 .. role:: coral2 .. role:: coral3 .. role:: coral4 .. role:: cornflowerblue .. role:: cornsilk .. role:: cornsilk1 .. role:: cornsilk2 .. role:: cornsilk3 .. role:: cornsilk4 .. role:: crimson .. role:: cyan .. role:: cyan1 .. role:: cyan2 .. role:: cyan3 .. role:: cyan4 .. role:: darkblue .. role:: darkcyan .. role:: darkgoldenrod .. role:: darkgoldenrod1 .. role:: darkgoldenrod2 .. role:: darkgoldenrod3 .. role:: darkgoldenrod4 .. role:: darkgray .. role:: darkgreen .. role:: darkgrey .. role:: darkkhaki .. role:: darkmagenta .. role:: darkolivegreen .. role:: darkolivegreen1 .. role:: darkolivegreen2 .. role:: darkolivegreen3 .. role:: darkolivegreen4 .. role:: darkorange .. role:: darkorange1 .. role:: darkorange2 .. role:: darkorange3 .. role:: darkorange4 .. role:: darkorchid .. role:: darkorchid1 .. role:: darkorchid2 .. role:: darkorchid3 .. role:: darkorchid4 .. role:: darkred .. role:: darksalmon .. role:: darkseagreen .. role:: darkseagreen1 .. role:: darkseagreen2 .. role:: darkseagreen3 .. role:: darkseagreen4 .. role:: darkslateblue .. role:: darkslategray .. role:: darkslategray1 .. role:: darkslategray2 .. role:: darkslategray3 .. role:: darkslategray4 .. role:: darkslategrey .. role:: darkturquoise .. role:: darkviolet .. role:: deeppink .. role:: deeppink1 .. role:: deeppink2 .. role:: deeppink3 .. role:: deeppink4 .. role:: deepskyblue .. role:: deepskyblue1 .. role:: deepskyblue2 .. role:: deepskyblue3 .. role:: deepskyblue4 .. role:: dimgray .. role:: dimgrey .. role:: dodgerblue .. role:: dodgerblue1 .. role:: dodgerblue2 .. role:: dodgerblue3 .. role:: dodgerblue4 .. role:: firebrick .. role:: firebrick1 .. role:: firebrick2 .. role:: firebrick3 .. role:: firebrick4 .. role:: floralwhite .. role:: forestgreen .. role:: fuchsia .. role:: gainsboro .. role:: ghostwhite .. role:: gold .. role:: gold1 .. role:: gold2 .. role:: gold3 .. role:: gold4 .. role:: goldenrod .. role:: goldenrod1 .. role:: goldenrod2 .. role:: goldenrod3 .. role:: goldenrod4 .. role:: gray .. role:: gray0 .. role:: gray1 .. role:: gray2 .. role:: gray3 .. role:: gray4 .. role:: gray5 .. role:: gray6 .. role:: gray7 .. role:: gray8 .. role:: gray9 .. role:: gray10 .. role:: gray11 .. role:: gray12 .. role:: gray13 .. role:: gray14 .. role:: gray15 .. role:: gray16 .. role:: gray17 .. role:: gray18 .. role:: gray19 .. role:: gray20 .. role:: gray21 .. role:: gray22 .. role:: gray23 .. role:: gray24 .. role:: gray25 .. role:: gray26 .. role:: gray27 .. role:: gray28 .. role:: gray29 .. role:: gray30 .. role:: gray31 .. role:: gray32 .. role:: gray33 .. role:: gray34 .. role:: gray35 .. role:: gray36 .. role:: gray37 .. role:: gray38 .. role:: gray39 .. role:: gray40 .. role:: gray41 .. role:: gray42 .. role:: gray43 .. role:: gray44 .. role:: gray45 .. role:: gray46 .. role:: gray47 .. role:: gray48 .. role:: gray49 .. role:: gray50 .. role:: gray51 .. role:: gray52 .. role:: gray53 .. role:: gray54 .. role:: gray55 .. role:: gray56 .. role:: gray57 .. role:: gray58 .. role:: gray59 .. role:: gray60 .. role:: gray61 .. role:: gray62 .. role:: gray63 .. role:: gray64 .. role:: gray65 .. role:: gray66 .. role:: gray67 .. role:: gray68 .. role:: gray69 .. role:: gray70 .. role:: gray71 .. role:: gray72 .. role:: gray73 .. role:: gray74 .. role:: gray75 .. role:: gray76 .. role:: gray77 .. role:: gray78 .. role:: gray79 .. role:: gray80 .. role:: gray81 .. role:: gray82 .. role:: gray83 .. role:: gray84 .. role:: gray85 .. role:: gray86 .. role:: gray87 .. role:: gray88 .. role:: gray89 .. role:: gray90 .. role:: gray91 .. role:: gray92 .. role:: gray93 .. role:: gray94 .. role:: gray95 .. role:: gray96 .. role:: gray97 .. role:: gray98 .. role:: gray99 .. role:: gray100 .. role:: green .. role:: green1 .. role:: green2 .. role:: green3 .. role:: green4 .. role:: greenyellow .. role:: grey .. role:: grey0 .. role:: grey1 .. role:: grey2 .. role:: grey3 .. role:: grey4 .. role:: grey5 .. role:: grey6 .. role:: grey7 .. role:: grey8 .. role:: grey9 .. role:: grey10 .. role:: grey11 .. role:: grey12 .. role:: grey13 .. role:: grey14 .. role:: grey15 .. role:: grey16 .. role:: grey17 .. role:: grey18 .. role:: grey19 .. role:: grey20 .. role:: grey21 .. role:: grey22 .. role:: grey23 .. role:: grey24 .. role:: grey25 .. role:: grey26 .. role:: grey27 .. role:: grey28 .. role:: grey29 .. role:: grey30 .. role:: grey31 .. role:: grey32 .. role:: grey33 .. role:: grey34 .. role:: grey35 .. role:: grey36 .. role:: grey37 .. role:: grey38 .. role:: grey39 .. role:: grey40 .. role:: grey41 .. role:: grey42 .. role:: grey43 .. role:: grey44 .. role:: grey45 .. role:: grey46 .. role:: grey47 .. role:: grey48 .. role:: grey49 .. role:: grey50 .. role:: grey51 .. role:: grey52 .. role:: grey53 .. role:: grey54 .. role:: grey55 .. role:: grey56 .. role:: grey57 .. role:: grey58 .. role:: grey59 .. role:: grey60 .. role:: grey61 .. role:: grey62 .. role:: grey63 .. role:: grey64 .. role:: grey65 .. role:: grey66 .. role:: grey67 .. role:: grey68 .. role:: grey69 .. role:: grey70 .. role:: grey71 .. role:: grey72 .. role:: grey73 .. role:: grey74 .. role:: grey75 .. role:: grey76 .. role:: grey77 .. role:: grey78 .. role:: grey79 .. role:: grey80 .. role:: grey81 .. role:: grey82 .. role:: grey83 .. role:: grey84 .. role:: grey85 .. role:: grey86 .. role:: grey87 .. role:: grey88 .. role:: grey89 .. role:: grey90 .. role:: grey91 .. role:: grey92 .. role:: grey93 .. role:: grey94 .. role:: grey95 .. role:: grey96 .. role:: grey97 .. role:: grey98 .. role:: grey99 .. role:: grey100 .. role:: honeydew .. role:: honeydew1 .. role:: honeydew2 .. role:: honeydew3 .. role:: honeydew4 .. role:: hotpink .. role:: hotpink1 .. role:: hotpink2 .. role:: hotpink3 .. role:: hotpink4 .. role:: indianred .. role:: indianred1 .. role:: indianred2 .. role:: indianred3 .. role:: indianred4 .. role:: indigo .. role:: ivory .. role:: ivory1 .. role:: ivory2 .. role:: ivory3 .. role:: ivory4 .. role:: khaki .. role:: khaki1 .. role:: khaki2 .. role:: khaki3 .. role:: khaki4 .. role:: lavender .. role:: lavenderblush .. role:: lavenderblush1 .. role:: lavenderblush2 .. role:: lavenderblush3 .. role:: lavenderblush4 .. role:: lawngreen .. role:: lemonchiffon .. role:: lemonchiffon1 .. role:: lemonchiffon2 .. role:: lemonchiffon3 .. role:: lemonchiffon4 .. role:: lightblue .. role:: lightblue1 .. role:: lightblue2 .. role:: lightblue3 .. role:: lightblue4 .. role:: lightcoral .. role:: lightcyan .. role:: lightcyan1 .. role:: lightcyan2 .. role:: lightcyan3 .. role:: lightcyan4 .. role:: lightgoldenrod .. role:: lightgoldenrod1 .. role:: lightgoldenrod2 .. role:: lightgoldenrod3 .. role:: lightgoldenrod4 .. role:: lightgoldenrodyellow .. role:: lightgray .. role:: lightgreen .. role:: lightgrey .. role:: lightpink .. role:: lightpink1 .. role:: lightpink2 .. role:: lightpink3 .. role:: lightpink4 .. role:: lightsalmon .. role:: lightsalmon1 .. role:: lightsalmon2 .. role:: lightsalmon3 .. role:: lightsalmon4 .. role:: lightseagreen .. role:: lightskyblue .. role:: lightskyblue1 .. role:: lightskyblue2 .. role:: lightskyblue3 .. role:: lightskyblue4 .. role:: lightslateblue .. role:: lightslategray .. role:: lightslategrey .. role:: lightsteelblue .. role:: lightsteelblue1 .. role:: lightsteelblue2 .. role:: lightsteelblue3 .. role:: lightsteelblue4 .. role:: lightyellow .. role:: lightyellow1 .. role:: lightyellow2 .. role:: lightyellow3 .. role:: lightyellow4 .. role:: limegreen .. role:: lime .. role:: linen .. role:: magenta .. role:: magenta1 .. role:: magenta2 .. role:: magenta3 .. role:: magenta4 .. role:: maroon .. role:: maroon1 .. role:: maroon2 .. role:: maroon3 .. role:: maroon4 .. role:: mediumaquamarine .. role:: mediumblue .. role:: mediumorchid .. role:: mediumorchid1 .. role:: mediumorchid2 .. role:: mediumorchid3 .. role:: mediumorchid4 .. role:: mediumpurple .. role:: mediumpurple1 .. role:: mediumpurple2 .. role:: mediumpurple3 .. role:: mediumpurple4 .. role:: mediumseagreen .. role:: mediumslateblue .. role:: mediumspringgreen .. role:: mediumturquoise .. role:: mediumvioletred .. role:: midnightblue .. role:: mintcream .. role:: mistyrose .. role:: mistyrose1 .. role:: mistyrose2 .. role:: mistyrose3 .. role:: mistyrose4 .. role:: moccasin .. role:: navajowhite .. role:: navajowhite1 .. role:: navajowhite2 .. role:: navajowhite3 .. role:: navajowhite4 .. role:: navy .. role:: navyblue .. role:: oldlace .. role:: olive .. role:: olivedrab .. role:: olivedrab1 .. role:: olivedrab2 .. role:: olivedrab3 .. role:: olivedrab4 .. role:: orange .. role:: orange1 .. role:: orange2 .. role:: orange3 .. role:: orange4 .. role:: orangered .. role:: orangered1 .. role:: orangered2 .. role:: orangered3 .. role:: orangered4 .. role:: orchid .. role:: orchid1 .. role:: orchid2 .. role:: orchid3 .. role:: orchid4 .. role:: palegoldenrod .. role:: palegreen .. role:: palegreen1 .. role:: palegreen2 .. role:: palegreen3 .. role:: palegreen4 .. role:: paleturquoise .. role:: paleturquoise1 .. role:: paleturquoise2 .. role:: paleturquoise3 .. role:: paleturquoise4 .. role:: palevioletred .. role:: palevioletred1 .. role:: palevioletred2 .. role:: palevioletred3 .. role:: palevioletred4 .. role:: papayawhip .. role:: peachpuff .. role:: peachpuff1 .. role:: peachpuff2 .. role:: peachpuff3 .. role:: peachpuff4 .. role:: peru .. role:: pink .. role:: pink1 .. role:: pink2 .. role:: pink3 .. role:: pink4 .. role:: plum .. role:: plum1 .. role:: plum2 .. role:: plum3 .. role:: plum4 .. role:: powderblue .. role:: purple .. role:: purple1 .. role:: purple2 .. role:: purple3 .. role:: purple4 .. role:: red .. role:: red1 .. role:: red2 .. role:: red3 .. role:: red4 .. role:: rosybrown .. role:: rosybrown1 .. role:: rosybrown2 .. role:: rosybrown3 .. role:: rosybrown4 .. role:: royalblue .. role:: royalblue1 .. role:: royalblue2 .. role:: royalblue3 .. role:: royalblue4 .. role:: saddlebrown .. role:: salmon .. role:: salmon1 .. role:: salmon2 .. role:: salmon3 .. role:: salmon4 .. role:: sandybrown .. role:: seagreen .. role:: seagreen1 .. role:: seagreen2 .. role:: seagreen3 .. role:: seagreen4 .. role:: seashell .. role:: seashell1 .. role:: seashell2 .. role:: seashell3 .. role:: seashell4 .. role:: sienna .. role:: sienna1 .. role:: sienna2 .. role:: sienna3 .. role:: sienna4 .. role:: silver .. role:: skyblue .. role:: skyblue1 .. role:: skyblue2 .. role:: skyblue3 .. role:: skyblue4 .. role:: slateblue .. role:: slateblue1 .. role:: slateblue2 .. role:: slateblue3 .. role:: slateblue4 .. role:: slategray .. role:: slategray1 .. role:: slategray2 .. role:: slategray3 .. role:: slategray4 .. role:: slategrey .. role:: snow .. role:: snow1 .. role:: snow2 .. role:: snow3 .. role:: snow4 .. role:: springgreen .. role:: springgreen1 .. role:: springgreen2 .. role:: springgreen3 .. role:: springgreen4 .. role:: steelblue .. role:: steelblue1 .. role:: steelblue2 .. role:: steelblue3 .. role:: steelblue4 .. role:: tan .. role:: tan1 .. role:: tan2 .. role:: tan3 .. role:: tan4 .. role:: teal .. role:: thistle .. role:: thistle1 .. role:: thistle2 .. role:: thistle3 .. role:: thistle4 .. role:: tomato .. role:: tomato1 .. role:: tomato2 .. role:: tomato3 .. role:: tomato4 .. role:: turquoise .. role:: turquoise1 .. role:: turquoise2 .. role:: turquoise3 .. role:: turquoise4 .. role:: violet .. role:: violetred .. role:: violetred1 .. role:: violetred2 .. role:: violetred3 .. role:: violetred4 .. role:: wheat .. role:: wheat1 .. role:: wheat2 .. role:: wheat3 .. role:: wheat4 .. role:: white .. role:: whitesmoke .. role:: yellow .. role:: yellow1 .. role:: yellow2 .. role:: yellow3 .. role:: yellow4 .. role:: yellowgreen ========================== ====================================================================================================== Name Color ========================== ====================================================================================================== ``aliceblue`` :aliceblue:`████████` ``antiquewhite`` :antiquewhite:`████████` ``antiquewhite1`` :antiquewhite1:`████████` ``antiquewhite2`` :antiquewhite2:`████████` ``antiquewhite3`` :antiquewhite3:`████████` ``antiquewhite4`` :antiquewhite4:`████████` ``aqua`` :aqua:`████████` ``aquamarine`` :aquamarine:`████████` ``aquamarine1`` :aquamarine1:`████████` ``aquamarine2`` :aquamarine2:`████████` ``aquamarine3`` :aquamarine3:`████████` ``aquamarine4`` :aquamarine4:`████████` ``azure`` :azure:`████████` ``azure1`` :azure1:`████████` ``azure2`` :azure2:`████████` ``azure3`` :azure3:`████████` ``azure4`` :azure4:`████████` ``beige`` :beige:`████████` ``bisque`` :bisque:`████████` ``bisque1`` :bisque1:`████████` ``bisque2`` :bisque2:`████████` ``bisque3`` :bisque3:`████████` ``bisque4`` :bisque4:`████████` ``black`` :black:`████████` ``blanchedalmond`` :blanchedalmond:`████████` ``blue`` :blue:`████████` ``blue1`` :blue1:`████████` ``blue2`` :blue2:`████████` ``blue3`` :blue3:`████████` ``blue4`` :blue4:`████████` ``blueviolet`` :blueviolet:`████████` ``brown`` :brown:`████████` ``brown1`` :brown1:`████████` ``brown2`` :brown2:`████████` ``brown3`` :brown3:`████████` ``brown4`` :brown4:`████████` ``burlywood`` :burlywood:`████████` ``burlywood1`` :burlywood1:`████████` ``burlywood2`` :burlywood2:`████████` ``burlywood3`` :burlywood3:`████████` ``burlywood4`` :burlywood4:`████████` ``cadetblue`` :cadetblue:`████████` ``cadetblue1`` :cadetblue1:`████████` ``cadetblue2`` :cadetblue2:`████████` ``cadetblue3`` :cadetblue3:`████████` ``cadetblue4`` :cadetblue4:`████████` ``chartreuse`` :chartreuse:`████████` ``chartreuse1`` :chartreuse1:`████████` ``chartreuse2`` :chartreuse2:`████████` ``chartreuse3`` :chartreuse3:`████████` ``chartreuse4`` :chartreuse4:`████████` ``chocolate`` :chocolate:`████████` ``chocolate1`` :chocolate1:`████████` ``chocolate2`` :chocolate2:`████████` ``chocolate3`` :chocolate3:`████████` ``chocolate4`` :chocolate4:`████████` ``coral`` :coral:`████████` ``coral1`` :coral1:`████████` ``coral2`` :coral2:`████████` ``coral3`` :coral3:`████████` ``coral4`` :coral4:`████████` ``cornflowerblue`` :cornflowerblue:`████████` ``cornsilk`` :cornsilk:`████████` ``cornsilk1`` :cornsilk1:`████████` ``cornsilk2`` :cornsilk2:`████████` ``cornsilk3`` :cornsilk3:`████████` ``cornsilk4`` :cornsilk4:`████████` ``crimson`` :crimson:`████████` ``cyan`` :cyan:`████████` ``cyan1`` :cyan1:`████████` ``cyan2`` :cyan2:`████████` ``cyan3`` :cyan3:`████████` ``cyan4`` :cyan4:`████████` ``darkblue`` :darkblue:`████████` ``darkcyan`` :darkcyan:`████████` ``darkgoldenrod`` :darkgoldenrod:`████████` ``darkgoldenrod1`` :darkgoldenrod1:`████████` ``darkgoldenrod2`` :darkgoldenrod2:`████████` ``darkgoldenrod3`` :darkgoldenrod3:`████████` ``darkgoldenrod4`` :darkgoldenrod4:`████████` ``darkgray`` :darkgray:`████████` ``darkgreen`` :darkgreen:`████████` ``darkgrey`` :darkgrey:`████████` ``darkkhaki`` :darkkhaki:`████████` ``darkmagenta`` :darkmagenta:`████████` ``darkolivegreen`` :darkolivegreen:`████████` ``darkolivegreen1`` :darkolivegreen1:`████████` ``darkolivegreen2`` :darkolivegreen2:`████████` ``darkolivegreen3`` :darkolivegreen3:`████████` ``darkolivegreen4`` :darkolivegreen4:`████████` ``darkorange`` :darkorange:`████████` ``darkorange1`` :darkorange1:`████████` ``darkorange2`` :darkorange2:`████████` ``darkorange3`` :darkorange3:`████████` ``darkorange4`` :darkorange4:`████████` ``darkorchid`` :darkorchid:`████████` ``darkorchid1`` :darkorchid1:`████████` ``darkorchid2`` :darkorchid2:`████████` ``darkorchid3`` :darkorchid3:`████████` ``darkorchid4`` :darkorchid4:`████████` ``darkred`` :darkred:`████████` ``darksalmon`` :darksalmon:`████████` ``darkseagreen`` :darkseagreen:`████████` ``darkseagreen1`` :darkseagreen1:`████████` ``darkseagreen2`` :darkseagreen2:`████████` ``darkseagreen3`` :darkseagreen3:`████████` ``darkseagreen4`` :darkseagreen4:`████████` ``darkslateblue`` :darkslateblue:`████████` ``darkslategray`` :darkslategray:`████████` ``darkslategray1`` :darkslategray1:`████████` ``darkslategray2`` :darkslategray2:`████████` ``darkslategray3`` :darkslategray3:`████████` ``darkslategray4`` :darkslategray4:`████████` ``darkslategrey`` :darkslategrey:`████████` ``darkturquoise`` :darkturquoise:`████████` ``darkviolet`` :darkviolet:`████████` ``deeppink`` :deeppink:`████████` ``deeppink1`` :deeppink1:`████████` ``deeppink2`` :deeppink2:`████████` ``deeppink3`` :deeppink3:`████████` ``deeppink4`` :deeppink4:`████████` ``deepskyblue`` :deepskyblue:`████████` ``deepskyblue1`` :deepskyblue1:`████████` ``deepskyblue2`` :deepskyblue2:`████████` ``deepskyblue3`` :deepskyblue3:`████████` ``deepskyblue4`` :deepskyblue4:`████████` ``dimgray`` :dimgray:`████████` ``dimgrey`` :dimgrey:`████████` ``dodgerblue`` :dodgerblue:`████████` ``dodgerblue1`` :dodgerblue1:`████████` ``dodgerblue2`` :dodgerblue2:`████████` ``dodgerblue3`` :dodgerblue3:`████████` ``dodgerblue4`` :dodgerblue4:`████████` ``firebrick`` :firebrick:`████████` ``firebrick1`` :firebrick1:`████████` ``firebrick2`` :firebrick2:`████████` ``firebrick3`` :firebrick3:`████████` ``firebrick4`` :firebrick4:`████████` ``floralwhite`` :floralwhite:`████████` ``forestgreen`` :forestgreen:`████████` ``fuchsia`` :fuchsia:`████████` ``gainsboro`` :gainsboro:`████████` ``ghostwhite`` :ghostwhite:`████████` ``gold`` :gold:`████████` ``gold1`` :gold1:`████████` ``gold2`` :gold2:`████████` ``gold3`` :gold3:`████████` ``gold4`` :gold4:`████████` ``goldenrod`` :goldenrod:`████████` ``goldenrod1`` :goldenrod1:`████████` ``goldenrod2`` :goldenrod2:`████████` ``goldenrod3`` :goldenrod3:`████████` ``goldenrod4`` :goldenrod4:`████████` ``gray`` :gray:`████████` ``gray0`` :gray0:`████████` ``gray1`` :gray1:`████████` ``gray2`` :gray2:`████████` ``gray3`` :gray3:`████████` ``gray4`` :gray4:`████████` ``gray5`` :gray5:`████████` ``gray6`` :gray6:`████████` ``gray7`` :gray7:`████████` ``gray8`` :gray8:`████████` ``gray9`` :gray9:`████████` ``gray10`` :gray10:`████████` ``gray11`` :gray11:`████████` ``gray12`` :gray12:`████████` ``gray13`` :gray13:`████████` ``gray14`` :gray14:`████████` ``gray15`` :gray15:`████████` ``gray16`` :gray16:`████████` ``gray17`` :gray17:`████████` ``gray18`` :gray18:`████████` ``gray19`` :gray19:`████████` ``gray20`` :gray20:`████████` ``gray21`` :gray21:`████████` ``gray22`` :gray22:`████████` ``gray23`` :gray23:`████████` ``gray24`` :gray24:`████████` ``gray25`` :gray25:`████████` ``gray26`` :gray26:`████████` ``gray27`` :gray27:`████████` ``gray28`` :gray28:`████████` ``gray29`` :gray29:`████████` ``gray30`` :gray30:`████████` ``gray31`` :gray31:`████████` ``gray32`` :gray32:`████████` ``gray33`` :gray33:`████████` ``gray34`` :gray34:`████████` ``gray35`` :gray35:`████████` ``gray36`` :gray36:`████████` ``gray37`` :gray37:`████████` ``gray38`` :gray38:`████████` ``gray39`` :gray39:`████████` ``gray40`` :gray40:`████████` ``gray41`` :gray41:`████████` ``gray42`` :gray42:`████████` ``gray43`` :gray43:`████████` ``gray44`` :gray44:`████████` ``gray45`` :gray45:`████████` ``gray46`` :gray46:`████████` ``gray47`` :gray47:`████████` ``gray48`` :gray48:`████████` ``gray49`` :gray49:`████████` ``gray50`` :gray50:`████████` ``gray51`` :gray51:`████████` ``gray52`` :gray52:`████████` ``gray53`` :gray53:`████████` ``gray54`` :gray54:`████████` ``gray55`` :gray55:`████████` ``gray56`` :gray56:`████████` ``gray57`` :gray57:`████████` ``gray58`` :gray58:`████████` ``gray59`` :gray59:`████████` ``gray60`` :gray60:`████████` ``gray61`` :gray61:`████████` ``gray62`` :gray62:`████████` ``gray63`` :gray63:`████████` ``gray64`` :gray64:`████████` ``gray65`` :gray65:`████████` ``gray66`` :gray66:`████████` ``gray67`` :gray67:`████████` ``gray68`` :gray68:`████████` ``gray69`` :gray69:`████████` ``gray70`` :gray70:`████████` ``gray71`` :gray71:`████████` ``gray72`` :gray72:`████████` ``gray73`` :gray73:`████████` ``gray74`` :gray74:`████████` ``gray75`` :gray75:`████████` ``gray76`` :gray76:`████████` ``gray77`` :gray77:`████████` ``gray78`` :gray78:`████████` ``gray79`` :gray79:`████████` ``gray80`` :gray80:`████████` ``gray81`` :gray81:`████████` ``gray82`` :gray82:`████████` ``gray83`` :gray83:`████████` ``gray84`` :gray84:`████████` ``gray85`` :gray85:`████████` ``gray86`` :gray86:`████████` ``gray87`` :gray87:`████████` ``gray88`` :gray88:`████████` ``gray89`` :gray89:`████████` ``gray90`` :gray90:`████████` ``gray91`` :gray91:`████████` ``gray92`` :gray92:`████████` ``gray93`` :gray93:`████████` ``gray94`` :gray94:`████████` ``gray95`` :gray95:`████████` ``gray96`` :gray96:`████████` ``gray97`` :gray97:`████████` ``gray98`` :gray98:`████████` ``gray99`` :gray99:`████████` ``gray100`` :gray100:`████████` ``green`` :green:`████████` ``green1`` :green1:`████████` ``green2`` :green2:`████████` ``green3`` :green3:`████████` ``green4`` :green4:`████████` ``greenyellow`` :greenyellow:`████████` ``grey`` :grey:`████████` ``grey0`` :grey0:`████████` ``grey1`` :grey1:`████████` ``grey2`` :grey2:`████████` ``grey3`` :grey3:`████████` ``grey4`` :grey4:`████████` ``grey5`` :grey5:`████████` ``grey6`` :grey6:`████████` ``grey7`` :grey7:`████████` ``grey8`` :grey8:`████████` ``grey9`` :grey9:`████████` ``grey10`` :grey10:`████████` ``grey11`` :grey11:`████████` ``grey12`` :grey12:`████████` ``grey13`` :grey13:`████████` ``grey14`` :grey14:`████████` ``grey15`` :grey15:`████████` ``grey16`` :grey16:`████████` ``grey17`` :grey17:`████████` ``grey18`` :grey18:`████████` ``grey19`` :grey19:`████████` ``grey20`` :grey20:`████████` ``grey21`` :grey21:`████████` ``grey22`` :grey22:`████████` ``grey23`` :grey23:`████████` ``grey24`` :grey24:`████████` ``grey25`` :grey25:`████████` ``grey26`` :grey26:`████████` ``grey27`` :grey27:`████████` ``grey28`` :grey28:`████████` ``grey29`` :grey29:`████████` ``grey30`` :grey30:`████████` ``grey31`` :grey31:`████████` ``grey32`` :grey32:`████████` ``grey33`` :grey33:`████████` ``grey34`` :grey34:`████████` ``grey35`` :grey35:`████████` ``grey36`` :grey36:`████████` ``grey37`` :grey37:`████████` ``grey38`` :grey38:`████████` ``grey39`` :grey39:`████████` ``grey40`` :grey40:`████████` ``grey41`` :grey41:`████████` ``grey42`` :grey42:`████████` ``grey43`` :grey43:`████████` ``grey44`` :grey44:`████████` ``grey45`` :grey45:`████████` ``grey46`` :grey46:`████████` ``grey47`` :grey47:`████████` ``grey48`` :grey48:`████████` ``grey49`` :grey49:`████████` ``grey50`` :grey50:`████████` ``grey51`` :grey51:`████████` ``grey52`` :grey52:`████████` ``grey53`` :grey53:`████████` ``grey54`` :grey54:`████████` ``grey55`` :grey55:`████████` ``grey56`` :grey56:`████████` ``grey57`` :grey57:`████████` ``grey58`` :grey58:`████████` ``grey59`` :grey59:`████████` ``grey60`` :grey60:`████████` ``grey61`` :grey61:`████████` ``grey62`` :grey62:`████████` ``grey63`` :grey63:`████████` ``grey64`` :grey64:`████████` ``grey65`` :grey65:`████████` ``grey66`` :grey66:`████████` ``grey67`` :grey67:`████████` ``grey68`` :grey68:`████████` ``grey69`` :grey69:`████████` ``grey70`` :grey70:`████████` ``grey71`` :grey71:`████████` ``grey72`` :grey72:`████████` ``grey73`` :grey73:`████████` ``grey74`` :grey74:`████████` ``grey75`` :grey75:`████████` ``grey76`` :grey76:`████████` ``grey77`` :grey77:`████████` ``grey78`` :grey78:`████████` ``grey79`` :grey79:`████████` ``grey80`` :grey80:`████████` ``grey81`` :grey81:`████████` ``grey82`` :grey82:`████████` ``grey83`` :grey83:`████████` ``grey84`` :grey84:`████████` ``grey85`` :grey85:`████████` ``grey86`` :grey86:`████████` ``grey87`` :grey87:`████████` ``grey88`` :grey88:`████████` ``grey89`` :grey89:`████████` ``grey90`` :grey90:`████████` ``grey91`` :grey91:`████████` ``grey92`` :grey92:`████████` ``grey93`` :grey93:`████████` ``grey94`` :grey94:`████████` ``grey95`` :grey95:`████████` ``grey96`` :grey96:`████████` ``grey97`` :grey97:`████████` ``grey98`` :grey98:`████████` ``grey99`` :grey99:`████████` ``grey100`` :grey100:`████████` ``honeydew`` :honeydew:`████████` ``honeydew1`` :honeydew1:`████████` ``honeydew2`` :honeydew2:`████████` ``honeydew3`` :honeydew3:`████████` ``honeydew4`` :honeydew4:`████████` ``hotpink`` :hotpink:`████████` ``hotpink1`` :hotpink1:`████████` ``hotpink2`` :hotpink2:`████████` ``hotpink3`` :hotpink3:`████████` ``hotpink4`` :hotpink4:`████████` ``indianred`` :indianred:`████████` ``indianred1`` :indianred1:`████████` ``indianred2`` :indianred2:`████████` ``indianred3`` :indianred3:`████████` ``indianred4`` :indianred4:`████████` ``indigo`` :indigo:`████████` ``ivory`` :ivory:`████████` ``ivory1`` :ivory1:`████████` ``ivory2`` :ivory2:`████████` ``ivory3`` :ivory3:`████████` ``ivory4`` :ivory4:`████████` ``khaki`` :khaki:`████████` ``khaki1`` :khaki1:`████████` ``khaki2`` :khaki2:`████████` ``khaki3`` :khaki3:`████████` ``khaki4`` :khaki4:`████████` ``lavender`` :lavender:`████████` ``lavenderblush`` :lavenderblush:`████████` ``lavenderblush1`` :lavenderblush1:`████████` ``lavenderblush2`` :lavenderblush2:`████████` ``lavenderblush3`` :lavenderblush3:`████████` ``lavenderblush4`` :lavenderblush4:`████████` ``lawngreen`` :lawngreen:`████████` ``lemonchiffon`` :lemonchiffon:`████████` ``lemonchiffon1`` :lemonchiffon1:`████████` ``lemonchiffon2`` :lemonchiffon2:`████████` ``lemonchiffon3`` :lemonchiffon3:`████████` ``lemonchiffon4`` :lemonchiffon4:`████████` ``lightblue`` :lightblue:`████████` ``lightblue1`` :lightblue1:`████████` ``lightblue2`` :lightblue2:`████████` ``lightblue3`` :lightblue3:`████████` ``lightblue4`` :lightblue4:`████████` ``lightcoral`` :lightcoral:`████████` ``lightcyan`` :lightcyan:`████████` ``lightcyan1`` :lightcyan1:`████████` ``lightcyan2`` :lightcyan2:`████████` ``lightcyan3`` :lightcyan3:`████████` ``lightcyan4`` :lightcyan4:`████████` ``lightgoldenrod`` :lightgoldenrod:`████████` ``lightgoldenrod1`` :lightgoldenrod1:`████████` ``lightgoldenrod2`` :lightgoldenrod2:`████████` ``lightgoldenrod3`` :lightgoldenrod3:`████████` ``lightgoldenrod4`` :lightgoldenrod4:`████████` ``lightgoldenrodyellow`` :lightgoldenrodyellow:`████████` ``lightgray`` :lightgray:`████████` ``lightgreen`` :lightgreen:`████████` ``lightgrey`` :lightgrey:`████████` ``lightpink`` :lightpink:`████████` ``lightpink1`` :lightpink1:`████████` ``lightpink2`` :lightpink2:`████████` ``lightpink3`` :lightpink3:`████████` ``lightpink4`` :lightpink4:`████████` ``lightsalmon`` :lightsalmon:`████████` ``lightsalmon1`` :lightsalmon1:`████████` ``lightsalmon2`` :lightsalmon2:`████████` ``lightsalmon3`` :lightsalmon3:`████████` ``lightsalmon4`` :lightsalmon4:`████████` ``lightseagreen`` :lightseagreen:`████████` ``lightskyblue`` :lightskyblue:`████████` ``lightskyblue1`` :lightskyblue1:`████████` ``lightskyblue2`` :lightskyblue2:`████████` ``lightskyblue3`` :lightskyblue3:`████████` ``lightskyblue4`` :lightskyblue4:`████████` ``lightslateblue`` :lightslateblue:`████████` ``lightslategray`` :lightslategray:`████████` ``lightslategrey`` :lightslategrey:`████████` ``lightsteelblue`` :lightsteelblue:`████████` ``lightsteelblue1`` :lightsteelblue1:`████████` ``lightsteelblue2`` :lightsteelblue2:`████████` ``lightsteelblue3`` :lightsteelblue3:`████████` ``lightsteelblue4`` :lightsteelblue4:`████████` ``lightyellow`` :lightyellow:`████████` ``lightyellow1`` :lightyellow1:`████████` ``lightyellow2`` :lightyellow2:`████████` ``lightyellow3`` :lightyellow3:`████████` ``lightyellow4`` :lightyellow4:`████████` ``lime`` :lime:`████████` ``limegreen`` :limegreen:`████████` ``linen`` :linen:`████████` ``magenta`` :magenta:`████████` ``magenta1`` :magenta1:`████████` ``magenta2`` :magenta2:`████████` ``magenta3`` :magenta3:`████████` ``magenta4`` :magenta4:`████████` ``maroon`` :maroon:`████████` ``maroon1`` :maroon1:`████████` ``maroon2`` :maroon2:`████████` ``maroon3`` :maroon3:`████████` ``maroon4`` :maroon4:`████████` ``mediumaquamarine`` :mediumaquamarine:`████████` ``mediumblue`` :mediumblue:`████████` ``mediumorchid`` :mediumorchid:`████████` ``mediumorchid1`` :mediumorchid1:`████████` ``mediumorchid2`` :mediumorchid2:`████████` ``mediumorchid3`` :mediumorchid3:`████████` ``mediumorchid4`` :mediumorchid4:`████████` ``mediumpurple`` :mediumpurple:`████████` ``mediumpurple1`` :mediumpurple1:`████████` ``mediumpurple2`` :mediumpurple2:`████████` ``mediumpurple3`` :mediumpurple3:`████████` ``mediumpurple4`` :mediumpurple4:`████████` ``mediumseagreen`` :mediumseagreen:`████████` ``mediumslateblue`` :mediumslateblue:`████████` ``mediumspringgreen`` :mediumspringgreen:`████████` ``mediumturquoise`` :mediumturquoise:`████████` ``mediumvioletred`` :mediumvioletred:`████████` ``midnightblue`` :midnightblue:`████████` ``mintcream`` :mintcream:`████████` ``mistyrose`` :mistyrose:`████████` ``mistyrose1`` :mistyrose1:`████████` ``mistyrose2`` :mistyrose2:`████████` ``mistyrose3`` :mistyrose3:`████████` ``mistyrose4`` :mistyrose4:`████████` ``moccasin`` :moccasin:`████████` ``navajowhite`` :navajowhite:`████████` ``navajowhite1`` :navajowhite1:`████████` ``navajowhite2`` :navajowhite2:`████████` ``navajowhite3`` :navajowhite3:`████████` ``navajowhite4`` :navajowhite4:`████████` ``navy`` :navy:`████████` ``navyblue`` :navyblue:`████████` ``oldlace`` :oldlace:`████████` ``olive`` :olive:`████████` ``olivedrab`` :olivedrab:`████████` ``olivedrab1`` :olivedrab1:`████████` ``olivedrab2`` :olivedrab2:`████████` ``olivedrab3`` :olivedrab3:`████████` ``olivedrab4`` :olivedrab4:`████████` ``orange`` :orange:`████████` ``orange1`` :orange1:`████████` ``orange2`` :orange2:`████████` ``orange3`` :orange3:`████████` ``orange4`` :orange4:`████████` ``orangered`` :orangered:`████████` ``orangered1`` :orangered1:`████████` ``orangered2`` :orangered2:`████████` ``orangered3`` :orangered3:`████████` ``orangered4`` :orangered4:`████████` ``orchid`` :orchid:`████████` ``orchid1`` :orchid1:`████████` ``orchid2`` :orchid2:`████████` ``orchid3`` :orchid3:`████████` ``orchid4`` :orchid4:`████████` ``palegoldenrod`` :palegoldenrod:`████████` ``palegreen`` :palegreen:`████████` ``palegreen1`` :palegreen1:`████████` ``palegreen2`` :palegreen2:`████████` ``palegreen3`` :palegreen3:`████████` ``palegreen4`` :palegreen4:`████████` ``paleturquoise`` :paleturquoise:`████████` ``paleturquoise1`` :paleturquoise1:`████████` ``paleturquoise2`` :paleturquoise2:`████████` ``paleturquoise3`` :paleturquoise3:`████████` ``paleturquoise4`` :paleturquoise4:`████████` ``palevioletred`` :palevioletred:`████████` ``palevioletred1`` :palevioletred1:`████████` ``palevioletred2`` :palevioletred2:`████████` ``palevioletred3`` :palevioletred3:`████████` ``palevioletred4`` :palevioletred4:`████████` ``papayawhip`` :papayawhip:`████████` ``peachpuff`` :peachpuff:`████████` ``peachpuff1`` :peachpuff1:`████████` ``peachpuff2`` :peachpuff2:`████████` ``peachpuff3`` :peachpuff3:`████████` ``peachpuff4`` :peachpuff4:`████████` ``peru`` :peru:`████████` ``pink`` :pink:`████████` ``pink1`` :pink1:`████████` ``pink2`` :pink2:`████████` ``pink3`` :pink3:`████████` ``pink4`` :pink4:`████████` ``plum`` :plum:`████████` ``plum1`` :plum1:`████████` ``plum2`` :plum2:`████████` ``plum3`` :plum3:`████████` ``plum4`` :plum4:`████████` ``powderblue`` :powderblue:`████████` ``purple`` :purple:`████████` ``purple1`` :purple1:`████████` ``purple2`` :purple2:`████████` ``purple3`` :purple3:`████████` ``purple4`` :purple4:`████████` ``red`` :red:`████████` ``red1`` :red1:`████████` ``red2`` :red2:`████████` ``red3`` :red3:`████████` ``red4`` :red4:`████████` ``rosybrown`` :rosybrown:`████████` ``rosybrown1`` :rosybrown1:`████████` ``rosybrown2`` :rosybrown2:`████████` ``rosybrown3`` :rosybrown3:`████████` ``rosybrown4`` :rosybrown4:`████████` ``royalblue`` :royalblue:`████████` ``royalblue1`` :royalblue1:`████████` ``royalblue2`` :royalblue2:`████████` ``royalblue3`` :royalblue3:`████████` ``royalblue4`` :royalblue4:`████████` ``saddlebrown`` :saddlebrown:`████████` ``salmon`` :salmon:`████████` ``salmon1`` :salmon1:`████████` ``salmon2`` :salmon2:`████████` ``salmon3`` :salmon3:`████████` ``salmon4`` :salmon4:`████████` ``sandybrown`` :sandybrown:`████████` ``seagreen`` :seagreen:`████████` ``seagreen1`` :seagreen1:`████████` ``seagreen2`` :seagreen2:`████████` ``seagreen3`` :seagreen3:`████████` ``seagreen4`` :seagreen4:`████████` ``seashell`` :seashell:`████████` ``seashell1`` :seashell1:`████████` ``seashell2`` :seashell2:`████████` ``seashell3`` :seashell3:`████████` ``seashell4`` :seashell4:`████████` ``sienna`` :sienna:`████████` ``sienna1`` :sienna1:`████████` ``sienna2`` :sienna2:`████████` ``sienna3`` :sienna3:`████████` ``sienna4`` :sienna4:`████████` ``silver`` :silver:`████████` ``skyblue`` :skyblue:`████████` ``skyblue1`` :skyblue1:`████████` ``skyblue2`` :skyblue2:`████████` ``skyblue3`` :skyblue3:`████████` ``skyblue4`` :skyblue4:`████████` ``slateblue`` :slateblue:`████████` ``slateblue1`` :slateblue1:`████████` ``slateblue2`` :slateblue2:`████████` ``slateblue3`` :slateblue3:`████████` ``slateblue4`` :slateblue4:`████████` ``slategray`` :slategray:`████████` ``slategray1`` :slategray1:`████████` ``slategray2`` :slategray2:`████████` ``slategray3`` :slategray3:`████████` ``slategray4`` :slategray4:`████████` ``slategrey`` :slategrey:`████████` ``snow`` :snow:`████████` ``snow1`` :snow1:`████████` ``snow2`` :snow2:`████████` ``snow3`` :snow3:`████████` ``snow4`` :snow4:`████████` ``springgreen`` :springgreen:`████████` ``springgreen1`` :springgreen1:`████████` ``springgreen2`` :springgreen2:`████████` ``springgreen3`` :springgreen3:`████████` ``springgreen4`` :springgreen4:`████████` ``steelblue`` :steelblue:`████████` ``steelblue1`` :steelblue1:`████████` ``steelblue2`` :steelblue2:`████████` ``steelblue3`` :steelblue3:`████████` ``steelblue4`` :steelblue4:`████████` ``tan`` :tan:`████████` ``tan1`` :tan1:`████████` ``tan2`` :tan2:`████████` ``tan3`` :tan3:`████████` ``tan4`` :tan4:`████████` ``teal`` :teal:`████████` ``thistle`` :thistle:`████████` ``thistle1`` :thistle1:`████████` ``thistle2`` :thistle2:`████████` ``thistle3`` :thistle3:`████████` ``thistle4`` :thistle4:`████████` ``tomato`` :tomato:`████████` ``tomato1`` :tomato1:`████████` ``tomato2`` :tomato2:`████████` ``tomato3`` :tomato3:`████████` ``tomato4`` :tomato4:`████████` ``turquoise`` :turquoise:`████████` ``turquoise1`` :turquoise1:`████████` ``turquoise2`` :turquoise2:`████████` ``turquoise3`` :turquoise3:`████████` ``turquoise4`` :turquoise4:`████████` ``violet`` :violet:`████████` ``violetred`` :violetred:`████████` ``violetred1`` :violetred1:`████████` ``violetred2`` :violetred2:`████████` ``violetred3`` :violetred3:`████████` ``violetred4`` :violetred4:`████████` ``wheat`` :wheat:`████████` ``wheat1`` :wheat1:`████████` ``wheat2`` :wheat2:`████████` ``wheat3`` :wheat3:`████████` ``wheat4`` :wheat4:`████████` ``white`` :white:`████████` ``whitesmoke`` :whitesmoke:`████████` ``yellow`` :yellow:`████████` ``yellow1`` :yellow1:`████████` ``yellow2`` :yellow2:`████████` ``yellow3`` :yellow3:`████████` ``yellow4`` :yellow4:`████████` ``yellowgreen`` :yellowgreen:`████████` ========================== ====================================================================================================== ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/conf.py0000644000175100001770000001724314676242340015264 0ustar00runnerdocker# # Pygame documentation build configuration file, created by # sphinx-quickstart on Sat Mar 5 11:56:39 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.append(os.path.abspath(os.path.join('..', 'reST'))) # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', 'ext.headers', 'ext.boilerplate', 'ext.customversion', 'ext.edit_on_github'] # Add any paths that contain templates here, relative to this directory. templates_path = ['../reST/_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = 'pygame' copyright = '2000-2023, pygame developers' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '2.6.1' # The full version, including alpha/beta/rc tags. release = '2.6.1' # Format strings for the version directives versionadded_format = 'New in pygame %s' versionchanged_format = 'Changed in pygame %s' deprecated_format = 'Deprecated since pygame %s' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = 'es' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. unused_docs = [] # List of directories, relative to source directory, that shouldn't be searched # for source files. #exclude_trees = [] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['pygame'] # Documents which are to be left undecorated # (e.g. adding tooltips to known document links): boilerplate_skip_transform = ['index'] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. html_theme_options = {'home_uri': 'https://www.pygame.org/'} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = [os.path.join('..', 'reST', 'themes')] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". html_title = f"{project} v{version} documentation" # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. html_logo = '../reST/_static/pygame_tiny.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. html_favicon = '../reST/_static/pygame.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = [os.path.join('..', 'reST', '_static')] # Add any extra files that should be included in the build. html_extra_path = ['../LGPL.txt'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. html_use_modindex = False # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = False # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'Pygamedoc' # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Pygame.tex', 'Pygame Documentation', 'Pygame Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_use_modindex = True #-- Options for C header output ------------------------------------------------ # Target directory for header files (default: current working directory). headers_dest = './_headers' # Whether or not to create target directory tree if it does not exist # (default: no directory creation). headers_mkdirs = True # Suffix to add for header file names before the '.h' extension # (default: no suffix). headers_filename_sfx = '_doc' smartquotes = False edit_on_github_project = 'pygame/pygame' edit_on_github_branch = 'main' ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/index.rst0000644000175100001770000001450514676242340015624 0ustar00runnerdockerPágina Principal de Pygame ========================== .. toctree:: :maxdepth: 2 :glob: :hidden: referencias/* tutorials/* logos Documentos ---------- `Readme`_ Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo. `Install`_ Pasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema. `File Path Function Arguments`_ Cómo maneja Pygame las rutas del sistema de archivos. `Pygame Logos`_ Los logotipos de Pygame en diferentes resoluciones. `LGPL License`_ Esta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa. Tutoriales ---------- .. :doc:`Introducción a Pygame ` .. Una introducción a los conceptos básicos de Pygame. .. Esto está escrito por usuarios de Python y aparece en el volúmen dos de la revista Py. :doc:`Importación e Inicialización ` Los pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas. :doc:`¿Cómo muevo una imagen? ` Un tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados. :doc:`Tutorial del Chimpancé, Linea por Linea ` Los ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo. :doc:`Introducción al Módulo de Sprites ` Pygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente. :doc:`Introducción a Surfarray ` Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py. :doc:`Introducción al Módulo de Cámara ` Pygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos. :doc:`Guía Newbie ` Una lista de trece útiles tips para que las personas se sientas cómodas usando pygame. :doc:`Tutorial para Crear Juegos ` Un largo tutorial que cubre los grandes temas necesarios para crear un juego completo. :doc:`Modos de Visualización ` Obteniendo una superficie de visualización para la pantalla. Referencias ----------- :ref:`genindex` Una lista de todas las funciones, clases, y métodos en el paquete de pygame. :doc:`referencias/bufferproxy` Una vista del protocolo de arrays de píxeles de superficie. :doc:`referencias/color` Representación de color :doc:`referencias/cursors` Carga y compilación de imágenes de cursores. .. :doc:`referencias/display` .. Configuración de la visualización de surface (superficie). .. :doc:`referencias/draw` .. Dibujo de formas simples como líneas y elipses en la surface (superficie). .. :doc:`referencias/event` .. Administración de eventos entrantes de varios dispositivos de entrada y de la plataforma de ventanas. .. :doc:`referencias/examples` .. Varios programas demostrando la utilización de módulos individuales de pygame. .. :doc:`referencias/font` .. Carga y representación de fuentes (letras) TrueType. .. :doc:`referencias/freetype` .. Módulo de Pygame mejorado para cargar y representar tipos de letras. .. :doc:`referencias/gfxdraw` .. Funciones de dibujo con suavizado de bordes (anti-aliasing). .. :doc:`referencias/image` .. Carga, guardado y transferencia de superficies (surfaces). .. :doc:`referencias/joystick` .. Administración de dispositivos joystick. .. :doc:`referencias/key` .. Administración de dispositivos de teclado. .. :doc:`referencias/locals` .. Constantes de Pygame. .. :doc:`referencias/mixer` .. Carga y reproducción de sonidos. .. :doc:`referencias/mouse` .. Administración del dispositivo de mouse y visualización. .. :doc:`referencias/music` .. Reproducción de pistas de sonido. .. :doc:`referencias/pygame` .. Funciones de nivel superior para manejar pygame. .. :doc:`referencias/pixelarray` .. Manipulación de datos de píxeles de imagen. .. :doc:`referencias/rect` .. Contenedor flexible para un rectángulo. .. :doc:`referencias/scrap` .. Acceso nativo al portapapeles. .. :doc:`referencias/sndarray` .. Manipulación de datos de muestra de sonidos. .. :doc:`referencias/sprite` .. Objetos de nivel superior para representar imágenes de juegos. .. :doc:`referencias/surface` .. Objetos para imagenes y la pantalla. .. :doc:`referencias/surfarray` .. Manipulación de datos de píxeles de imágenes. .. :doc:`referencias/tests` .. Testeo de pygame. .. :doc:`referencias/time` .. Administración del tiempo y la frecuencia de cuadros (framerate). .. :doc:`referencias/transform` .. Redminesionar y mover imágenes. .. :doc:`pygame C API ` .. La API de C compartida entre los módulos de extensión de Pygame. :ref:`search` Búsqueda de documentos de Pygame por palabra clave. .. _Readme: ../../wiki/about .. _Install: ../../wiki/GettingStarted#Pygame%20Installation .. _File Path Function Arguments: ../filepaths.html .. _LGPL License: ../LGPL.txt .. _Pygame Logos: logos.html././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/logos.rst0000644000175100001770000000301014676242340015625 0ustar00runnerdocker************************************************* Página de Logotipos de Pygame ************************************************* Logotipos de Pygame =================== Estos logotipos están disponibles para su uso en tus propios proyectos. Por favor, colocarlos donde creas conveniente. El logotipo fue creado por TheCorruptor el 29 de julio de 2001 y fue ampliado por Mega_JC el 29 de Agosto de 2021. .. container:: fullwidth .. image:: ../reST/_static/pygame_logo.png | `pygame_logo.svg <../_static/pygame_logo.svg>`_ | `pygame_logo.png <../_static/pygame_logo.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_lofi.png | `pygame_lofi.svg <../_static/pygame_lofi.svg>`_ | `pygame_lofi.png <../_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_powered.png | `pygame_powered.svg <../_static/pygame_powered.svg>`_ | `pygame_powered.png <../_static/pygame_powered.png>`_ - 1617 x 640 .. image:: ../reST/_static/pygame_tiny.png | `pygame_tiny.png <../_static/pygame_tiny.png>`_ - 214 x 60 .. image:: ../reST/_static/pygame_powered_lowres.png | `pygame_powered_lowres.png <../_static/pygame_powered_lowres.png>`_ - 101 x 40 Existe una imagen de Photoshop con capas de mayor resolución dispnible `aquí `_. *(1.3 MB)* Logotipos legendarios --------------------- .. container:: fullwidth `legacy_logos.zip <../_static/legacy_logos.zip>`_ - 50.1 KB././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9941258 pygame-2.6.1/docs/es/referencias/0000755000175100001770000000000014676242436016252 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/.readme0000644000175100001770000000000014676242340017470 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/bufferproxy.rst0000644000175100001770000001262314676242340021355 0ustar00runnerdocker.. include:: ../../reST/common.txt .. default-domain:: py :class:`pygame.BufferProxy` =========================== .. currentmodule:: pygame .. class:: BufferProxy | :sl:`pygame object to export a surface buffer through an array protocol` | :sg:`BufferProxy() -> BufferProxy` :class:`BufferProxy` es un tipo de soporte de pygame, diseñado como el valor de retorno de los métodos :meth:`Surface.get_buffer` y :meth:`Surface.get_view`. Para todas las versiones de Python, un objeto :class:`BufferProxy` exporta una estructura C y un array de interface a nivel de Python en nombre del búfer del objeto principal. También se exporta una nueva interfaz de búfer. En pygame, :class:`BufferProxy` es clave para implementar el módulo :mod:`pygame.surfarray`. Las instancias :class:`BufferProxy` pueden ser creadas directamente desde el código de Python, ya sea para un buffer superior que exporta una interfaz o a partir de un ``dict`` de Python que describe el diseño del búfer de un objeto. Las entradas del dict se basan en el mapeo de la interfaz de matriz a nivel de Python. Se reconocen las siguientes claves: ``"shape"`` : tupla La longitud de cada elemento del array como una tupla de enteros. La longitud de la tupla es el número de dimensiones en el array. ``"typestr"`` : string El tipo de elemento del array como una cadena de longitud 3. El primer carácter indica el orden de bytes, '<' para para formato little-endian, ">" para formato big-endian, y '\|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, " Surface` | :sg:`parent -> ` La clase :class:`Surface` que devolvió el objeto de clase :class:`BufferProxy` o el objeto pasado a una llamada de :class:`BufferProxy`. .. attribute:: length | :sl:`The size, in bytes, of the exported buffer.` | :sg:`length -> int` El número de bytes validos de datos exportados. Para datos discotinuous, es decir, datos que no forman un solo bloque de memoria, los bytes dentro de los espacios vacios se excluyen del conteo. Esta propiedad es equivalente al campo "len" de la estructura C ``Py_buffer``. .. attribute:: raw | :sl:`A copy of the exported buffer as a single block of bytes.` | :sg:`raw -> bytes` Los datos del búfer como un objeto ``str``/``bytes``. Cualquier espacio vacío en los datos exportados se elimina. .. method:: write | :sl:`Write raw bytes to object buffer.` | :sg:`write(buffer, offset=0)` Sobreescribe bytes en el objeto superior (o antecesor). Los datos deben ser contiguos en C o F, de lo contrario se genera un ValueError. El argumento `buffer` es un objeto ``str``/``bytes``. Un desplazamiento opcional proporciona una posición de inicio, en bytes, dentro del búfer donde comienza la sobreescritura. Si el desplazamiento es negativo o mayor o igual que el valor :attr:`length` del proxy, se genera un excepción ``IndexException``. Si ``len(buffer) > proxy.length + offset``, se genera un ``ValueError``. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/camera.rst0000644000175100001770000002455614676242340020242 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.camera` ==================== .. module:: pygame.camera :synopsis: módulo de pygame para el uso de la cámara | :sl:`pygame module for camera use` Actualmente, Pygame soporta cámaras nativas de Linux (V4L2) y Windows (MSMF), con un soporte de plataforma más amplio disponible a través de un backend (controlador) integrado en OpenCV. .. versionadded:: 2.0.2 Windows native camera support .. versionadded:: 2.0.3 New OpenCV backends ¡EXPERIMENTAL!: Este API puede cambiar o desaparecer en lanzamientos posteriores de pygame. Si lo utilizas, es muy probable que tu código se rompa en la próxima versión de pygame. La función de Bayer a ``RGB`` se basa en: :: Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Nuevo en pygame 1.9.0. .. function:: init | :sl:`Module init` | :sg:`init(backend = None) -> None` Esta función inicia el módulo de la cámara, seleccionando el mejor controlador (backend) de la cámara web que pueda encontrar en tu sistema. No se garantiza que tenga éxito e incluso puede intentar importar módulos de teceros, como `OpenCV`. Si deseas anular la elección de controlador (backend), podés hacer un llamado para pasar el nombre del controlador que deseas a esta función. Podés obtener más información sobre los controladores (backends) en la función :func:`get_backends()`. .. versionchanged:: 2.0.3 Option to explicitly select backend .. ## pygame.camera.init ## .. function:: get_backends | :sl:`Get the backends supported on this system` | :sg:`get_backends() -> [str]` Este función devuelve cada controlador (backend) que considera que tienen posibilidad de funcionar en tu sistema, en orden de prioridad. pygame.camera Backends: :: Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future Hay dos diferencias princiales entre los controladores (backends). Los controladores (backends) _camera están integrados en el mismo pygame y no requieren importaciones de terceros. Todos los demás controlaores sí lo requieren. Para los controladores OpenCV y VideoCapture, esos módulos deben estar instalados en tu sistema. La otra gran diferencia es "enumeración de cámaras". Algunos constroladores no tienen una forma de enumerar los nombres de las cámaras o incluso la cantidad de cámaras en el sistema. En estos casos, la función :func:`list_cameras()` devolverá algo como ``[0]``. Si sabés que tenés varias cámaras en el sistema, estos puertos de controladores pasarán un "número de índice de cámara" si lo utilizas como el parámetro ``device``. .. versionadded:: 2.0.3 .. ## pygame.camera.get_backends ## .. function:: colorspace | :sl:`Surface colorspace conversion` | :sg:`colorspace(Surface, format, DestSurface = None) -> Surface` Permite la conversión "RGB" a un espacio de color destino de "HSV" o "YUV". Las surfaces (superficies) de origen y destino deben tener el mismo tamaño y profundidad de píxel. Esto es útil para la visión por computadora de dispositivos con capacidad de procesamiento limitada. Captura una imagen lo más pequeña posible, la redimensiona con ``transform.scale()`` haciendola aún más pequeña, y luego convierte el espacio de color a "YUV" o "HSV" antes de realizar cualquier procesamiento en ella. .. ## pygame.camera.colorspace ## .. function:: list_cameras | :sl:`returns a list of available cameras` | :sg:`list_cameras() -> [cameras]` Verifica la disponibilidad de cámaras y devuelve una lista de cadenas de nombres de cámaras, listas para ser utilizados por :class:`pygame.camera.Camera`. Si el controlador (backend) de la cámara no soporta la enuemración de webcams, esto devolverá algo como ``[0]``. Ver :func:`get_backends()` para obtener mucha más información. .. ## pygame.camera.list_cameras ## .. class:: Camera | :sl:`load a camera` | :sg:`Camera(device, (width, height), format) -> Camera` Carga una cámara. En Linux, el dispositivo suele ser algo como "/dev/video0". El ancho y alto predeterminados son 640x480. El formato es el espacio de color deseado para la salida. Esto es útil para fines de visión por computadora. El valor predeterminado es ``RGB``. Los siguientes formatos son compatibles: * ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value .. method:: start | :sl:`opens, initializes, and starts capturing` | :sg:`start() -> None` Abre el dispositivo de la cámara, intenta inicializarlo y comienza a grabar imágenes en un búfer. La cámara debe estar iniciada antes de que se puedan utilizar las siguientes funciones. .. ## Camera.start ## .. method:: stop | :sl:`stops, uninitializes, and closes the camera` | :sg:`stop() -> None` Detiene la grabación, desinicializa la cámara y la cierra. Una vez que la cámara se detiene, las funciones siguientes no se pueden utilizar hasta que se inicie nuevamente. .. ## Camera.stop ## .. method:: get_controls | :sl:`gets current values of user controls` | :sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)` Si la cámara lo admite, get_controls devolverá la configuración actual para el volteo horizontal y vertical de la imagen como booleanos y el brillo como un número entero. Si no es compatible, devolverá los valores predeterminados (0, 0, 0). Hay que tener en cuenta que los valores de retorno acá pueden ser diferentes a los devueltos por set_controls, aunque es más probable que sean correctos. .. ## Camera.get_controls ## .. method:: set_controls | :sl:`changes camera settings if supported by the camera` | :sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)` Te permite cambiar la configuración de la cámara si la cámara lo admite. Los valores devueltos serán los valores de la entrada si la cámara afirma que tuvo éxito, o si no, los valores previamente utilizados. Cada argumento es opcional y se puede elegir el deseado mediante el suministro de una palabra clave, como hflip. Hay que tener en cuenta que la configuración real siendo utilizada por la cámara puede no ser la misma que la devuelta por set_controls. En Windows :code:`hflip` y :code:`vflip` están implementados por pygame, no por la cámara, por lo que siempre deberían funcionar, pero el brillo :code:`brightness` no está soportado. .. ## Camera.set_controls ## .. method:: get_size | :sl:`returns the dimensions of the images being recorded` | :sg:`get_size() -> (width, height)` Devuelve las dimensiones actuales de las imágenes capturadas por la cámara. Esto devolverá el tamaño real, que puede ser diferente al especificado durante la inicialización si la cámara no admite ese tamaño. .. ## Camera.get_size ## .. method:: query_image | :sl:`checks if a frame is ready` | :sg:`query_image() -> bool` Si una imagen está lista, devuelve TRUE (verdadero). De lo contrario, devuelve FALSE (falso). Hay que tener en cuenta que algunas webcams siempre devolverán falso y solo pondrán en cola un cuadro cuando se les llame con una función de bloqueo como :func:`get_image()`. En Windows (MSMF), y en los backends de OpenCV, la función :func:`query_image()` debería ser confiable. Esto es útil para separar la frecuencia de cuadros del juego de la velocidad de la cámara sin tener que usar subprocesos. .. ## Camera.query_image ## .. method:: get_image | :sl:`captures an image as a Surface` | :sg:`get_image(Surface = None) -> Surface` Extrae una imagen del búfer como una superficie ``RGB``. Opcionalmente, se puede reutilizar una superficie existente para ahorrar tiempo. La profundidad de bits de la superficie es de 24 bits en Linux, 32 bits en Windows, o la misma que la superficie suministrada opcionalmente. .. ## Camera.get_image ## .. method:: get_raw | :sl:`returns an unmodified image as bytes` | :sg:`get_raw() -> bytes` Obtiene una imagen de la cámara como una cadena en el formato de píxel nativo de la cámara. Útil para la integración con las otras bibliotecas. Esto devuelve un objeto de bytes. .. ## Camera.get_raw ## .. ## pygame.camera.Camera ## .. ## pygame.camera ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/cdrom.rst0000644000175100001770000002340414676242340020105 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.cdrom` =================== .. module:: pygame.cdrom :synopsis: módulo de pygame para el control de CD de audio. | :sl:`pygame module for audio cdrom control` .. warning:: Este módulo no es funcional en pygame 2.0 y versiones superiores, a menos que hayas compilado manualmente pygame con SDL1. Este módulo no estará soportado en el futuro. Una alternativa para la funcionalidad de cdrom de Python es `pycdio `_. El módulo cdrom administra las unidades de ``CD`` y ``DVD`` en la computadora. También puede controlar la reproducción de CD de audio. Este módulo debe inicializarse antes de poder hacer algo. Cada objeto ``CD``que crees representa una unidad de cdrom y también debe inicializarse individualmente antes de poder realizar la mayoría de las acciones. .. function:: init | :sl:`initialize the cdrom module` | :sg:`init() -> None` Inicializa el módulo de cdrom. Esto escaneará el sistema en busca de todos los dispositivos ``CD``. El módulo debe inicializarse antes de que funcionen cualquier otra función. Esto ocurre automáticamente cuando llamas ``pygame.init()``. Es seguro llamar a este función más de una vez. .. ## pygame.cdrom.init ## .. function:: quit | :sl:`uninitialize the cdrom module` | :sg:`quit() -> None` Decinicializa el módulo cdrom. Después de llamar a esta función, cualquier objeto ``CD`` existente dejará de funcionar. Es seguro llamar a esta función más de una vez. .. ## pygame.cdrom.quit ## .. function:: get_init | :sl:`true if the cdrom module is initialized` | :sg:`get_init() -> bool` Comprueba si el módulo cdrom está inicializado o no. Esto es diferente de ``CD.init()`` ya que cada unidad también debe inicializarse individualmente. .. ## pygame.cdrom.get_init ## .. function:: get_count | :sl:`number of cd drives on the system` | :sg:`get_count() -> count` Devuelve el número de unidades de CD en el sistema. Cuando creas objetos ``CD``, debes pasar un ID entero que debe ser menor que este recuento. El recuento será 0 si no hay unidades en el sistema. .. ## pygame.cdrom.get_count ## .. class:: CD | :sl:`class to manage a cdrom drive` | :sg:`CD(id) -> CD` Podés crear un objeto ``CD`` para cada unidad de CD en el sistema. Usa ``pygame.cdrom.get_count()`` para determinar cuántas unidades existen realmente. El argumento 'id' es un número entero que representa la unidad, comenzando en cero. El objeto ``CD`` no está inicializado, solo podés llamar ``CD.get_id()` y ``CD.get_name()`` en una unidad no inicializada. Es seguro crear múltiples objetos ``CD``para la misma unidad, todos cooperarán normalmente. .. method:: init | :sl:`initialize a cdrom drive for use` | :sg:`init() -> None` Inicializa la unidad de CD para ser utilizada. El debe estar inicializada para que la mayoría de los métodos ``CD`` funcionen. Incluso si el resto de pygame está inicializado. Puede haber una breve pausa mientras la unidad se inicializa. Evitá utilizar ``CD.init()`` si el programa no debe detenerse durante uno o dos segundos. .. ## CD.init ## .. method:: quit | :sl:`uninitialize a cdrom drive for use` | :sg:`quit() -> None` Desinicializa una unidad para su uso. Hacé un llamado a esto cuando tu programa no vaya a acceder a la unidad durante un tiempo. .. ## CD.quit ## .. method:: get_init | :sl:`true if this cd device initialized` | :sg:`get_init() -> bool` Comprueba si este dispositivo ``CDROM`` está inicializado. Esto es diferente de ``pygame.cdrom.init()`` ya que cada unidad también debe inicializarse individualmente. .. ## CD.get_init ## .. method:: play | :sl:`start playing audio` | :sg:`play(track, start=None, end=None) -> None` Reproduce audio desde un CD de audio en la unidad. Además del argumento del número de pista, también podés introducir un tiempo de inicio y fin para la reproducción. El tiempo de inicio y fin está en segundos y puede limintar la selección de una pista de audio reproducida. Si introducir un tiempo de inicio pero no de fin, el audio se reproducirá hasta el final de la pista. Si introducis un tiempo de inicio y 'None' para el tiempo final, el audio se reproducirá hasta el final de todo el disco. Véase ``CD.get_numtracks()`` y ``CD.get_track_audio()`` para encontrar las pistas que se van a reproducir. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en 0. .. ## CD.play ## .. method:: stop | :sl:`stop audio playback` | :sg:`stop() -> None` Detiene la reproducción del audio desde el CD-ROM. También se perderá la posición actual de reproducción. Este método no hace nada si la unidad no está reproduciendo audio. .. ## CD.stop ## .. method:: pause | :sl:`temporarily stop audio playback` | :sg:`pause() -> None` Detiene temporalmente la reproducción del audio en el ``CD``. La reproducción puede reanudarse en el mismo punto con el método ``CD.resume()``. Si el ``CD`` no está reproduciendo, este método no hace nada. Nota: la pista 0 es la primera en el ``CD``. Los números de pista comienzan en cero. .. ## CD.pause ## .. method:: resume | :sl:`unpause audio playback` | :sg:`resume() -> None` Reanuda la reproducción de un ``CD``. Si el ``CD`` no está en pausa o ya se está reproduciendo, este método no hace nada. .. ## CD.resume ## .. method:: eject | :sl:`eject or open the cdrom drive` | :sg:`eject() -> None` Esto abrirá la unidad de CD y expulsará el CD-ROM. Si la unidad está reproduciendo o en pausa, se detendrá. .. ## CD.eject ## .. method:: get_id | :sl:`the index of the cdrom drive` | :sg:`get_id() -> id` Devuelve el ID entero que se utilizó para crear la instancia de ``CD``. Este método puede funcionar en un ``CD`` no inicializado. .. ## CD.get_id ## .. method:: get_name | :sl:`the system name of the cdrom drive` | :sg:`get_name() -> name` Devuelve el nombre de la unidad en forma de cadena. Este es el nombre de sitema utilizado para representar la unidad, a menudo es la letra de la unidad o el nombre del dispositivo. Este método puede funcionar en un ``CD`` no inicializado. .. ## CD.get_name ## .. method:: get_busy | :sl:`true if the drive is playing audio` | :sg:`get_busy() -> bool` Devuelve True (verdadero) si la unidad está ocupada reproduciendo audio. .. ## CD.get_busy ## .. method:: get_paused | :sl:`true if the drive is paused` | :sg:`get_paused() -> bool` Devuelve True (verdadero) si la unidad está actualmente en pausa. .. ## CD.get_paused ## .. method:: get_current | :sl:`the current audio playback position` | :sg:`get_current() -> track, seconds` Devuelve tanto la pista actual como el tiempo de esa pista. Este método funciona cuando la unidad está reproduciendo o en pausa. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pista comienzan en cero. .. ## CD.get_current ## .. method:: get_empty | :sl:`False if a cdrom is in the drive` | :sg:`get_empty() -> bool` Devuelve False (falso) si hay un CD-ROM en la unidad actualmente. Si la unidad está vacía devolverá True (verdadero). .. ## CD.get_empty ## .. method:: get_numtracks | :sl:`the number of tracks on the cdrom` | :sg:`get_numtracks() -> count` Devuelve el número de pistas en el CD-ROM de la unidad. Esto devolverá cero si la unidad está vacía o no tiene pistas. .. ## CD.get_numtracks ## .. method:: get_track_audio | :sl:`true if the cdrom track has audio data` | :sg:`get_track_audio(track) -> bool` Determina si una pista en un CD-ROM contiene datos de audio. También podés llamar a ``CD.num_tracks()`` y ``CD.get_all()`` para obtener más información sobre el CD-ROM. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en cero. .. ## CD.get_track_audio ## .. method:: get_all | :sl:`get all track information` | :sg:`get_all() -> [(audio, start, end, length), ...]` Devuelve una lista con información para cada pista en el CD-ROM. La información consiste en una tupla con cuatro valores. El valor "audio" es True (verdadero) si la pista contiene data de audio. Los valores de inicio, fin y longitud son números de puntos flotantes en segundos. "Start" (inicio) y "end" (fin) representan tiempos absolutos en todo el disco. .. ## CD.get_all ## .. method:: get_track_start | :sl:`start time of a cdrom track` | :sg:`get_track_start(track) -> seconds` Devuelve el tiempo absoluto en segundos al inicio de la pista del CD-ROM. Nota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero. .. ## CD.get_track_start ## .. method:: get_track_length | :sl:`length of a cdrom track` | :sg:`get_track_length(track) -> seconds` Devuelve un valor de punto flotante en segundos de la duración de la pista del CD-ROM. Nota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero. .. ## CD.get_track_length ## .. ## pygame.cdrom.CD ## .. ## pygame.cdrom ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/color.rst0000644000175100001770000002667514676242340020134 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.Color` =================== .. currentmodule:: pygame .. class:: Color | :sl:`pygame object for color representations` | :sg:`Color(r, g, b) -> Color` | :sg:`Color(r, g, b, a=255) -> Color` | :sg:`Color(color_value) -> Color` La clase ``Color`` representa valores de color ``RGBA`` utilizando un rango de valores de 0 a 255 inclusive. Permite realizar operaciones aritméticas básicas, como operaciones binarias ``+``, ``-``, ``*``, ``//``, ``%``, y unaria ``~`` para crear nuevos colores. Admite conversiones a otros espacios de colores como ``HSV`` o ``HSL``, y te permite ajustar canales individuales de color. El valor alfa se establece en 255 (completamente opaco) de forma predeterminada si no se proporciona. Las operaciones aritméticas y método ``correct_gamma()`` conservan las subclases. Para los operadores binarios, la clase de color devuelto es la del objeto de color de la parte izquierda del operador. Los objetos de color admiten comparación de igualdad con otros objetos de color y tuplas de 3 o 4 elementos de enteros. Hubo un error en pygame 1.8.1 donde el valor alfa predeterminado era 0, no 255 como antes. Los objetos de color exportan la interfaz de array a nivel C. La interfaz exporta un array de bytes no firmados unidimensional de solo lectura con la misma longitud asignada que el color. También se exporta la nueva interfaz del búfer, con la mismas características que la interfaz del array. Los operadores de división entera, ``//``, y módulo, ``%``, no generan una excepción por división por cero. En su lugar, si un canal de color, o alfa, en el color de la parte derecha es 0, entonces el resultado es 1. Por ejemplo: :: # Estas expresiones son True (verdaderas) Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0) Usa ``int(color)`` para obtener el valor entero inmutable del color, que se puede utilizar como clave en un diccionario. Este valor entero difiere de los valores de píxeles mapeados de los métodos :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` y :meth:`pygame.Surface.unmap_rgb`. Se puede pasar como argumento ``color_value`` a :class:`Color` (útil con conjuntos). Ver :doc:`color_list` para ejemplos de nombres de colores disponibles. :param int r: el valor rojo en el rango de 0 a 255 inclusive :param int g: el valor verde en el rango de 0 a 255 inclusive :param int b: el color azul en el rango de 0 a 255 inclusive :param int a: (opcional) valor alfa en el rango de 0 a 255 inclusive, predeterminado es 255 :param color_value: valor del color (ver nota abajo para los formatos admitidos) .. note:: Formatos de ``color_value`` admitidos: | - **Objeto Color:** clona el objeto de clase :class:`Color` | - **Nombre de color: str:** nombre del color a utilizar, por ejemplo ``'red'`` (todos los nombres admitidos se pueden encontrar en :doc:`color_list`, con muestras de ejemplo) | - **Formato de color HTML str:** ``'#rrggbbaa'`` o ``'#rrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona | - **Número hexadecimal str:** ``'0xrrggbbaa'`` o ``'0xrrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona. | - **int:** valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, ``0xrrggbbaa``, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado. | - **tupla/lista de valores enteros de color:** ``(R, G, B, A)`` o ``(R, G, B)``, donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona. :type color_value: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) :returns: a newly created :class:`Color` object :rtype: Color .. versionchanged:: 2.0.0 Soporte para tuplas, listas y objetos :class:`Color` al crear objetos :class:`Color`. .. versionchanged:: 1.9.2 Color objects export the C level array interface. .. versionchanged:: 1.9.0 Color objects support 4-element tuples of integers. .. versionchanged:: 1.8.1 New implementation of the class. .. attribute:: r | :sl:`Gets or sets the red value of the Color.` | :sg:`r -> int` El valor rojo del color. .. ## Color.r ## .. attribute:: g | :sl:`Gets or sets the green value of the Color.` | :sg:`g -> int` El valor verde del color. .. ## Color.g ## .. attribute:: b | :sl:`Gets or sets the blue value of the Color.` | :sg:`b -> int` El valor azul del color. .. ## Color.b ## .. attribute:: a | :sl:`Gets or sets the alpha value of the Color.` | :sg:`a -> int` El valor alfa del color. .. ## Color.a ## .. attribute:: cmy | :sl:`Gets or sets the CMY representation of the Color.` | :sg:`cmy -> tuple` La representación ``CMY`` del color. Los componentes ``CMY`` están en los rangos ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Tené en cuenta que estos no devolverá los valores ``CMY`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``CMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY`` difieran ligeramente de lo que podrías esperar. .. ## Color.cmy ## .. attribute:: hsva | :sl:`Gets or sets the HSVA representation of the Color.` | :sg:`hsva -> tuple` La representación ``HSVA`` del color. Los componentes ``HSVA`` están en los rangos ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Tené en cuenta que esto devolverá los valores ``HSV`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSV`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSV`` difieran ligeramente de lo que podrías esperar. .. ## Color.hsva ## .. attribute:: hsla | :sl:`Gets or sets the HSLA representation of the Color.` | :sg:`hsla -> tuple` La representación ``HSLA`` del color. Los componentes ``HSLA`` están en rangos ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Tené en cuenta que esto no devolverá los valores ``HSL`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSL`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSL`` difieran ligeramente de lo que podrías esperar. .. ## Color.hsla ## .. attribute:: i1i2i3 | :sl:`Gets or sets the I1I2I3 representation of the Color.` | :sg:`i1i2i3 -> tuple` La representación ``I1I2I3`` del color. Los componentes ``I1I2I3`` están en los rangos ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Tené en cuenta que esto no devolverá los valores ``I1I2I3`` exactos para los valores ``RGB`` establecidos en todos los cosas. Debido a la asignación de ``RGB`` de 0-255 y la asignación ``I1I2I3`` de 0-1, los errores de redondeo pueden hacer que los valores ``I1I2I3``difieran ligeramente de lo que podrías esperar. .. ## Color.i1i2i3 ## .. method:: normalize | :sl:`Returns the normalized RGBA values of the Color.` | :sg:`normalize() -> tuple` Devuelve los valores ``RGBA`` del color como valores de punto flotante. .. ## Color.normalize ## .. method:: correct_gamma | :sl:`Applies a certain gamma value to the Color.` | :sg:`correct_gamma (gamma) -> Color` Aplica un cierto valor de gamma al color y devuelve un nuevo color con los valores ``RGBA`` ajustados. .. ## Color.correct_gamma ## .. method:: set_length | :sl:`Set the number of elements in the Color to 1,2,3, or 4.` | :sg:`set_length(len) -> None` DEPRECATED: Puedes desempaquetar los valores que necesitas de la siguiente manera: ``r, g, b, _ = pygame.Color(100, 100, 100)`` si solo deseas r, g and b o ``r, g, *_ = pygame.Color(100, 100, 100)`` si solo deseas r y g La longitud predeterminada de un color es 4. Los colores pueden tener longitudes 1, 2, 3 o 4. Esto es útil si querés desempaquetar a r,g,b,a. Si querés obtener la longitud de un color, usa ``len(acolor)``. .. deprecated:: 2.1.3 .. versionadded:: 1.9.0 .. ## Color.set_length ## .. method:: grayscale | :sl:`returns the grayscale of a Color` | :sg:`grayscale() -> Color` Devuelve un color que representa la versión en escala de grises de sí mismo utilizando la fórmula de luminosidad que pondera el rojo, verde y azul según sus longitudes de onda. .. ## Color.grayscale ## .. method:: lerp | :sl:`returns a linear interpolation to the given Color.` | :sg:`lerp(Color, float) -> Color` Devuelve un color que es una interpolación entre sí mismo y el color dado en el espacio RGBA. El segundo parámetro determina qué tan lejos estará el resultado entre sí mismo y el otro color. Debe ser un valor entre 0 y 1, donde 0 significa que devolverá el color inicial, el de sí mismo, y 1 significa que devolverá otro color. .. versionadded:: 2.0.1 .. ## Color.lerp ## .. method:: premul_alpha | :sl:`returns a Color where the r,g,b components have been multiplied by the alpha.` | :sg:`premul_alpha() -> Color` Devuelve un nuevo color en el que cada uno de los canales de rojo, verde y azul ha sido multiplicado por el canal alfa del color original. El canal alfa permanece sin cambios. Esto es útil cuando se traba con la bandera de modo ``BLEND_PREMULTIPLIED`` de mezcla para :meth:`pygame.Surface.blit()`, que asume que todas las superficies que lo utilizan están utilizando colores con alfa pre-multiplicado. .. versionadded:: 2.0.0 .. ## Color.premul_alpha ## .. method:: update | :sl:`Sets the elements of the color` | :sg:`update(r, g, b) -> None` | :sg:`update(r, g, b, a=255) -> None` | :sg:`update(color_value) -> None` Establece los elementos del color. Consulta los parámetros de :meth:`pygame.Color` para los parámetros de esta función. Si el valor alfa no se estableció, no cambiará. .. versionadded:: 2.0.1 .. ## Color.update ## .. ## pygame.Color ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/referencias/cursors.rst0000644000175100001770000002477214676242340020512 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.cursors` ===================== .. module:: pygame.cursors :synopsis: módulo de pygame para recursos de cursor | :sl:`pygame module for cursor resources` Pygame ofrece control sobre el cursor del hardware del sistema. Pygame admite cursores en blanco y negro (cursores de mapa de bits), así como cursores variantes del sistema y cursores de color. Podés controlar el cursor utilizando funciones dentro del módulo :mod:`pygame.mouse`. Este módulo de cursores contiene funciones para cargar y decodificar varios formatos de cursores. Estas te permiten almacenar fácilmente tus cursores en archivos externos o directamente como cadenas de caracteres codificadas en Python. El módulo incluye varios cursores estándar. La función :func:`pygame.mouse.set_cursor()` toma varios argumentos. Todos estos argumentos se han almacenado en una única tupla que puedes llamar de la siguiente manera: :: >>> pygame.mouse.set_cursor(*pygame.cursors.arrow) Las siguientes variables pueden ser pasadas a ``pygame.mouse.set_cursor`` function: * ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` Este módulo también contiene algunos cursores como cadenas de caracters formateadas. Será necesario pasarlos a la función ``pygame.cursors.compile()`` antes de poder utilizarlos. El ejemplo de llamada se vería así: :: >>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor) Las siguientes cadenas de caracteres se pueden convertir en mapas de bits de cursor con ``pygame.cursors.compile()`` : * ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` .. function:: compile | :sl:`create binary cursor data from simple strings` | :sg:`compile(strings, black='X', white='.', xor='o') -> data, mask` Se puede utilizar una secuencia de cadenas para crear datos binarios de cursor para el cursor del sistema. Esto devuelve los datos binarios en forma de dos tuplas. Estas se pueden pasar como tercer y cuarto argumento, respectivamente, de la función :func:`pygame.mouse.set_cursor()`. Si estás creando tus propias cadenas de caracteres, podés usar cualquier valor para representar los píxeles blanco y negro. Algunos sistemas permiten establecer un color especial de alternancia para el color del sistema, también llamado color xor. Si el sistema no admite cursores xor, ese color será simplemente negro. La altura debe ser divisible por 8. el ancho de las cadenas debe ser igual y divisible por 8. Si estas dos condiciones no se cumplen, se generará un ``ValueError``. Un ejemplo de conjunto de cadenas de caracteres de cursor se ve así: :: thickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ") .. ## pygame.cursors.compile ## .. function:: load_xbm | :sl:`load cursor data from an XBM file` | :sg:`load_xbm(cursorfile) -> cursor_args` | :sg:`load_xbm(cursorfile, maskfile) -> cursor_args` Esto carga cursores para un subconjunto simple de archivos ``XBM`` . Los archivos ``XBM`` son tradicionalmente utilizados para almacenar cursores en sistemas UNIX, son un formato ASCII utilizado para representar imágenes simples. A veces, los valores de color blanco y negro se dividen en dos archivos ``XBM`` separados. Podés pasar un segundo argumento de archivo de máscara (maskfile) para cargar las dos imágenes en un solo cursor. Los argumentos 'cursorfile' y 'maskfile' pueden ser nombres de archivos u objetos similares a archivos con el método 'readlines' El valor de retorno 'cursor_args' puede ser pasado directamente a la función ``pygame.mouse.set_cursor()``. .. ## pygame.cursors.load_xbm ## .. class:: Cursor | :sl:`pygame object representing a cursor` | :sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor` | :sg:`Cursor(hotspot, surface) -> Cursor` | :sg:`Cursor(constant) -> Cursor` | :sg:`Cursor(Cursor) -> Cursor` | :sg:`Cursor() -> Cursor` En pygame 2, hay 3 tipos de cursores que podés crear para darle un poco de brillo adicional a tu juego. Existen cursores de tipo **bitmap**, que ya existían en Pygame 1.x, y se compilan a partir de una cadena de caracteres o se cargan desde un archivo xbm. Luego, están los cursores de tipo **system**, donde eliges un conjunto predefinido que transmitirá el mismo significado pero se verá nativo en diferentes sistemas operativos. Por último puedes crear un cursor de tipo **color**, que muestra una superficie de Pygame como el cursor. **Creando un cursor del sistema** Elegí una constante de esta lista, pasala a ``pygame.cursors.Cursor(constant)``, ¡y listo! Tené en cuenta que no todos los sistemas admiten todos los cursores del sistema y es posible que obtengas una sustitución en su lugar. Por ejemplo, en MacOS, WAIT/WAITARROW debería mostrarse como una flecha y SIZENWSE/SIZENESW/SIZEALL debería mostrarse como una mano cerrada. Y en Wayland, cada cursor SIZE debería aparecer como una mano. debería mostrarse como una mano cerrada. :: Pygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow (flecha) pygame.SYSTEM_CURSOR_IBEAM i-beam (viga en i, o viga de doble t) pygame.SYSTEM_CURSOR_WAIT wait (espera) pygame.SYSTEM_CURSOR_CROSSHAIR crosshair (cruz de mira) pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (pequeño cursor de espera) (or wait if not available) (o si no está disponible, espera) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing (doble flecha apuntando al noroeste y sudeste) northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing (doble flecha apuntando al noreste y sudoeste) northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing (doble flecha apuntando al oeste y al este) west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing (doble flecha apuntando al norte y sur) north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing (flecha de cuatro puntas apuntando al norte, sur, este y oeste) north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones (círculo tachado o calaveras cruzadas) pygame.SYSTEM_CURSOR_HAND hand (mano) **Creando un cursor sin pasar argumentos** Además de las constantes del cursor disponibles y descritas anteriormente, también podés llamar a ``pygame.cursors.Cursor()``, y tu cursor está listo (hacer esto es lo mismo que llamar a ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``) Haciendo una de estas llamadas lo que en realidad se crea es un cursor del sistema utilizando la imagen nativa predeterminada. **Creando un curosr de color** Para crear un cursor de color, hay que crear un objeto ``Cursor`` a partir de un ``hotspot`` y una ``surface``. Un ``hotspot`` es una coordenada (x,y) que determina donde en el cursor está el punto exacto. La posición debe estar dentro de los límites de la ``surface``. **Creando un cursor de mapa de bits (bitmap)** Cuando el cursor del mouse está visible, se mostrará como un mapa de bits en blanco y negro utilizando los arrays de máscaras (bitmask) dadas. El ``size`` (tamaño) es una secuencia que contiene el ancho y alto del cursor. El ``hotspot``es una secuencia que contiene la posición del hotspot del cursor. Un cursor tiene un ancho y alto, pero la posición del mouse está representada mediante un conjunto de coordenadas de punto. Por lo tanto, el valor pasado al ``hotspot`` del cursor ayuda a pygame a determinar exactamente en qué punto se encuentra el cursor. ``xormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks`` es una secuencia de bytes que contiene los datos de máscara de bits del cursor. Para crear estas variable podemos utilizar la función :func:`pygame.cursors.compile()`. Ancho y alto deben ser múltiplos de 8, y las arrays de máscara (mask arrays) deben tener el tamaño correcto para el ancho y el alto dados. De lo contrario, se generará una excepción. .. method:: copy | :sl:`copy the current cursor` | :sg:`copy() -> Cursor` Devuelve un nuevo objeto Cursor con los mismos datos y hotspots que el original. .. ## pygame.cursors.Cursor.copy ## .. attribute:: type | :sl:`Gets the cursor type` | :sg:`type -> string` El tipo será ``"system"``, ``"bitmap"``, o ``"color"``. .. ## pygame.cursors.Cursor.type ## .. attribute:: data | :sl:`Gets the cursor data` | :sg:`data -> tuple` Devuelve los datos que se utilizaron para crear este objeto de cursor, envuelto en una tupla. .. ## pygame.cursors.Cursor.data ## .. versionadded:: 2.0.1 .. ## pygame.cursors.Cursor ## .. ## pygame.cursors ## Código de ejemplo para crear y establecer cursores. (Click en el mouse para cambiar el cursor) .. literalinclude:: ../../reST/ref/code_examples/cursors_module_example.py ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9951258 pygame-2.6.1/docs/es/tutorials/0000755000175100001770000000000014676242436016012 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/es/tutorials/CamaraIntro.rst0000644000175100001770000002647614676242340020755 0ustar00runnerdocker.. TUTORIAL: Introducción al Módulo de Cámara .. include:: ../../reST/common.txt ****************************************************** Tutoriales Pygame - Introducción al Módulo de Cámara ****************************************************** Introducción al Módulo de Cámara ================================ .. rst-class:: docinfo :Autor: Nirav Patel :Contacto: nrp@eclecti.cc :Traducción al español: Estefanía Pivaral Serrano Pygame 1.9 viene con soporte para cámaras interconectadas, lo que nos permite capturar imagenes quietas, ver transmiciones en vivo y hacer visión computarizada. Este tutorial cubrirá todos estos casos de uso, proporcionando ejemplos de código que pueden usar para basar sus propias apps o juegos. Pueden consultar la documentación de referencia por una API completa: :mod:`reference documentation ` .. note:: A partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como **EXPERIMENTAL**, lo que significa que la API podría cambiar las versiones posteriores. Importación e Inicialización ---------------------------- :: import pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init() Dado que el módulo de cámara es opcional, necesita ser importado e inicializado manualmente como se muestra arriba. Captura de una sola imagen -------------------------- Ahora repasaremos el caso más simple en el que abrimos una cámara y capturamos un cuadro como Surface. En el siguiente ejemplo, asumimos que hay una cámara en /dev/video0 en la computadora, y la inicializamos con un tamaño de 640 por 480. La Surface llamada 'image' es lo que sea que la cámara estaba viendo cuando get_image() fue llamada. :: cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() Listado de Cámaras Conectadas ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Puede que se estén preguntando, ¿y si no sabemos la ruta exacta de la cámara? Podemos pedirle al módulo que nos proporcione la lista de cámaras conectadas a la computadora y que inicialice la primera cámara en la lista. :: camlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480)) Uso los Controles de la Cámara ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ La mayoría de las cámaras admiten controles como voltear la imagen y cambiar el brillo. set_controls() y get_controls() pueden ser usados en cualquier momento después de usar start(). :: cam.set_controls(hflip = True, vflip = False) print camera.get_controls() Captura de una Transmisión en Vivo ---------------------------------- El resto de este tutorial se basará en capturar un flujo en vivo de imagenes. Para ello usaremos la clase que se muestra a continuación. Como se describe, simplemente mostrará (blit) en la pantalla una corriente constante de cuadros a la pantalla, mostrando efecivamente un video en vivo. Básicamente es lo que se espera, hacer un bucle con get_image(), se aplica a la pantalla de Surface, y lo voltea. Por razones de rendimiento, suministraremos a la cámara la misma Surface para utilizar en cada ocasión. :: class Capture: def __init__(self): self.size = (640,480) # crear una visualización de surface. cosas estándar de pygame self.display = pygame.display.set_mode(self.size, 0) # esto es lo mismo que vimos antes self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no se detectaron cámaras.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # crear una surface para capturar, con fines de rendimiento # profundidad de bit es la misma que la de la Surface de visualización. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # si no querés vincular la velocidad de cuadros a la cámara, podés verificar # si la cámara tiene una imagen lista. Tené en cuenta que mientras esto funciona # en la mayoría de las cámaras, algunas nunca van a devolver un 'true'. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # pasalo (blit) a la Surface de visualización. ¡Simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # cerrar la cámara de forma segura self.cam.stop() going = False self.get_and_flip() Dado que get_image() es una llamada de bloqueo que podría tomar bastante tiempo en una cámara lenta, este ejemplo usa query_image() para ver si la cámara está lista. Esto permite separar la velocidad de fotogramas de tu juego de la de tu cámara. También es posible hacer que la cámara capture imágenes en un subproceso separado obteniendo aproximadamente la misma ganancia de rendimiento, si encontrás que tu cámara no es compatible con la función query_image(). Visión Básica por Computadora ----------------------------- Al usar los módulos de la cámara, transormación y máscara, pygame puede hacer algo de visión por computadora básica. Modelos de Color ^^^^^^^^^^^^^^^^^ When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial. :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB") .. image:: ../../reST/tut/camera_rgb.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV") .. image:: ../../reST/tut/camera_yuv.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV") .. image:: ../../reST/tut/camera_hsv.jpg :class: trailing Thresholding (Umbralización) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Usando la función threshold() del módulo de transformación, uno puede hacer simple efectos del estilo de pantalla verde o asilar objetos de colores especificos en una escena. En el siguiente ejemplo, usamos umbralización para separar el árbol verde y hacemos que el resto de la imagen sea negra. Consultá la documentación de referencia para más detalles de la función: :func:`threshold function `\ . :: self.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2) .. image:: ../../reST/tut/camera_thresholded.jpg :class: trailing Por supuesto, esto solo es útil si ya conocés el color exacto del objeto que estás buscando. Para evitar esto y hacer la umbralización utilizable en el mundo real, necesitamos agregar una etapa de calibración en la que identifiquemos el color de un objeto y usarlo para umbralizarlo. Nosotros usaremos la función average_color() del módulo de transformación para hacer esto. A continuación, se muestra un ejemplo de la función calibración que se podría repetir hasta que se produzca un evento como apretar una tecla y [obtener] una imagen de cómo se vería. El color adentro del cuadro será el que se use para la umbralización. Hay que tener en cuenta que estamos usando el modelo de color HSV en las imágenes a continuación. :: def calibrate(self): # capturar la imagen self.snapshot = self.cam.get_image(self.snapshot) # aplicarlo a la Surface de visualización self.display.blit(self.snapshot, (0,0)) # crear un rectángulo (rect) en el medio de la pantalla crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # obtener el color promedio del área dentro del rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # rellenar la esquina superior izquierda con ese color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip() .. image:: ../../reST/tut/camera_average.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2) .. image:: ../../reST/tut/camera_thresh.jpg :class: trailing Pueden usar la misma idea para hacer una simple pantalla verde/azul, al obtener primero una imagen del fondo y después umbralizar contrastando con ella. El ejemplo a continuación solo tiene la cámara apuntando a una pared blanca en modelo de color HSV. :: def calibrate(self): # captura un montón de imagenes de fondo. bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # promedia el color de las imágenes para llegar a uno solo y deshacerse de posibles perturbaciones pygame.transform.average_surfaces(bg,self.background) # aplicarlo a la Surface de visualización self.display.blit(self.background, (0,0)) pygame.display.flip() .. image:: ../../reST/tut/camera_background.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background) .. image:: ../../reST/tut/camera_green.jpg :class: trailing Uso del Módulo de Máscara ^^^^^^^^^^^^^^^^^^^^^^^^^ Lo anterior es genial si solo querés mostrar imágenes, pero con el módulo :mod:`mask module `, también podés usar la cámara como dispositivo de entrada para un juego. Por ejemplo, volviendo al ejemplo de la umbralización de un objeto específico, podemos encontrar la posición de ese objeto y usarlo para controlar un objeto en la pantalla. :: def get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # umbralizar contra el color que obtuvimos antes mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # mantener solo el manchón más grande de ese color connected = mask.connected_component() # asegurarse que el manchón sea lo suficientemente grande, que no sea solo perturbaciones if mask.count() > 100: # encontrar el centro del manchónfind the center of the blob coord = mask.centroid() # dibujar un círculo con un tamaño variable en el tamaño del manchón pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip() .. image:: ../../reST/tut/camera_mask.jpg :class: trailing Este es solo el ejemplo más básico. Podés rastrear múltiples manchas de diferentes colores, encontrar los contornos de los objetos, tener detección de colisiones entre objetos de la vida real y del juego, obtener el ángulo de un objetos para permitir su control, y más. ¡A divertirse! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/ChimpanceLineaporLinea.rst0000644000175100001770000006066414676242340023104 0ustar00runnerdocker.. TUTORIAL:Descripciones línea por línea del ejemplo del chimpancé .. include:: common.txt *************************************************************** Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea *************************************************************** Chimpancé, Línea Por Línea ========================== .. rst-class:: docinfo :Autor: Pete Shinners. Traducción al español: Estefania Pivaral Serrano :Contacto: pete@shinners.org .. toctree:: :hidden: chimpance.py Introducción ------------ Entre los ejemplos de *pygame* hay un ejemplo simple llamado "chimp" (chimpancé). Este ejemplo simula un mono golpeable que se mueve alrededor de la pantalla con promesas de riquezas y recomepensas. El ejemplo en sí es muy simple y acarrea poco código de comprobación de error. Como modelo de programa, Chimp demuestra muchas de las bondades de pygame, como por ejemplo crear una ventana, cargar imágenes y sonidos, representar texto, y manejo de eventos básicos y del mouse. El programa y las imagenes se pueden encontrar dentro de la fuente estándar de distribución de pygame. Se puede ejecutar al correr `python -m pygame.examples.chimp` en la terminal. Este tutorial atravesará el código bloque a bloque, explicando cómo funciona el mismo. Además, se hará mención de cómo se puede mejorar el código y qué errores de comprobación podrían ser de ayuda. Este tutorial es excelente para aquellas personas que están buscando una primera aproximación a códigos de *pygame*. Una vez que *pygame* esté completamente instalado, podrás encontrar y ejecutar la demostración del chimpancé para ti mismo en el directorio de ejemplos. .. container:: fullwidth leading trailing .. rst-class:: small-heading (no, este no es un anuncio, es una captura de pantalla) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source ` Importación de Módulos ---------------------- Este es el código que importa todos los módulos necesarios del programa. Este código también comprueba la disponibilidad de algunos de los módulos opcionales de pygame. :: # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") Primero, se importa el módulo estándar de python "os" (sistema operativo). Esto permite hacer cosas como crear rutas de archivos independientes de la platforma. En la sigueinte línea, se importa el paquete de pygame. En nuestro caso, importamos pygame como ``pg``, para que todas las funciones de pygame puedan ser referenciadas desde el espacio de nombres ``pg``. Algunos de los módulos de pygame son opcionales, y si no fueran encontrados, la evaluación será ``False``. Es por eso que decidimos mostrar (print) un agradable mensaje de advertencia si los módulos :mod:`font` o :mod:`mixer ` no están disponibles. (Aunque estos solo podrían no estar disponibles en situaciones poco comunes). Finalmente, se preparan dos rutas que serán usadas para el resto del código. Una de ellas es ``main_dir``, que usa el módulo `os.path` y la variable `__file__` asignada por Python para localizar el archivo de juegos de python, y extraer la carpeta desde esa ruta. Luego, ésta prepara la ruta ``data_dir`` para indicarle a las funciones de carga exactamente dónde buscar. Carga de Recursos ----------------- A continuación, se presentan dos funciones que se pueden usar para cargar imágenes y sonidos. En esta sección examinaremos cada función individualmente. :: def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() Esta función toma el nombre de la imagen a cargar. Opcionalmente, también toma un argumento que puede usar para definir la clave de color (colorkey) de la imagen, y un argumento para determinar la escala de la imagen. La clave de color se usa en la gráfica para representar un color en la imagen que es transparente. Lo que esta función hace en primera instancia es crearle al archivo un nombre de ruta completo. En este ejemplo, todos los recursos están en el subdirectorio "data". Al usar la función `os.path.join`, se creará el nombre de ruta para cualquier plataforma en que se ejecute el juego. El paso siguiente es cargar la imagen usando la función :func:`pygame.image.load`. Luego de que la imagen se cargue, llamamos a la función `convert()`. Al hacer esto se crea una nueva copia del Surface y convierte su formato de color y la profundidad, de tal forma que coincida con el mostrado. Esto significa que el dibujo (blitting) de la imagen a la pantalla sucederá lo más rápido posible. Luego, usando la función :func:`pygame.transform.scale` se definirá el tamaño de la imagen. Esta función toma una Surface y el tamaño al cual se debería adecuar. Para darle tamaño con números escalares, se puede tomar la medida y determinar las dimensiones *x* e *y* con número escalar. Finalmente, definimos la clave de color para la imagen. Si el usuario suministró un valor para el parametro de la clave de color, usamos ese valor como la clave de color de la imagen. Usualmente, éste sería un valor de color RGB (red-green-blue = rojo-verde-azul), como (255, 255, 255) para el color blanco. También es posible pasar el valor -1 como la clave de color. En este caso, la función buscará el color en el píxel de arriba a la izquierda de la imagen, y lo usará para la clave de color. :: def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound La anterior, es la función para cargar un archivo de sonido. Lo primero que hace esta función es verificar si el módulo :mod:`pygame.mixer` se importó correctamente. En caso de no ser así, la función va a devolver una instancia de reproducción de un sonido de error. Esto obrará como un objeto de Sonido normal para que el juego se ejecute sin ningún error de comprobación extra. Esta funcion es similar a la función de carga de imagen, pero maneja diferentes problemas. Primero, creamos una ruta completa al sonido de la imagen y cargamos el archivo de sonido. Luego, simplemente devolvemos el objeto de Sonido cargado. Clases de Objetos para Juegos ----------------------------- En este caso creamos dos clases (classes) que representan los objetos en nuestro juego. Casi toda la logica del juego se organiza en estas dos clases. A continuación las revisaremos de a una. :: class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False En este caso, creamos una clase (class) que representa el puño del jugador. Esta se deriva de la clase `Sprite` incluida en el módulo :mod:`pygame.sprite`. La función `__init__` es llamada cuando se crean nuevas instancias de este clase. Esto le permite a la función `__init__` del Sprite preparar nuestro objeto para ser usado como una imagen (sprite). Este juego usa uno de los dibujos de sprite de la clase de Grupo. Estas clases pueden dibujar sprites que tienen un atributo "imagen" y uno "rect". Al cambiar simplemente estos dos atributos, el compilador (renderer) dibujará la imagen actual en la posición actual. Todos los sprites tienen un método `update()`. Esta función es tipicamente llamada una vez por cuadro. Es en esta función donde se debería colocar el código que mueva y actualice las variables para el sprite. El método de `update()` para el movimiento del puño, mueve el puño al lugar donde se encuentre el puntero del mouse. Asímismo, compensa sutilmente la posición del puño sobre el objeto, si el puño está en condición de golpear. Las siguientes dos funciones `punch()` y `unpunch()` cambian la condición de golpeado del puño. El método `punch()` también devuelve un valor verdadero si el puño está chocando con el sprite objetivo. :: class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite intializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image Si bien la clase (class) `Chimp` está haciendo un poco más de trabajo que el puño, no resulta mucho más complejo. Esta clase moverá al chimpancé hacia adelante y hacia atrás, por la pantalla. Cuando el mono es golpeado, él girará con un efecto de emoción. Esta clase también es derivada de la base de clases :class:`Sprite ` y es iniciada de igual manera que el puño. Mientras se inicia, la clase también establece el atributo "area" para que sea del tamaño de la pantalla de visualización. La función `update` para el chimpancé simplemente se fija en el estado actual del mono. Esta puede ser "dizzy" (mareado), la cual sería verdadera si el mono está girando a causa del golpe. La función llama al método `_spin` o `_walk`. Estas funciones son prefijadas con un guión bajo, lo cual en el idioma estándar de python sugiere que estos métodos deberían ser solo usados por la clase `Chimp`. Podríamos incluso hasta escribirlas con un doble guión bajo, lo cual indicaría a python que realmente intente hacerlas un método privado, pero no necesitamos tal protección. :) El método `_walk` crea una nueva posición para el mono al mover el 'rect' actual al centro del puño. Si la nueva posición se cruza hacia afuera del área de visualización de la pantalla, el movimiento del puño da marcha atrás. También imita la imagen usando la función :func:`pygame.transform.flip`. Este es un efecto crudo que hace que el mono se vea como si estuviera cambiando de dirección. El método `_spin` es llamado cuando el mono está actualmente en estado "dizzy" (mareado). El atributo 'dizzy' es usado para guardar el monto de rotación. Cuando el mono ha rotado por completo en su eje (360 grados) se resetea la imagen a la versión original no rotada. Antes de llamar a la función :func:`pygame.transform.rotate`, verás que el código hace una referencia local a la función simplemente llamanda "rotate". No hay ncesidad de hacer eso en este ejemplo, aquí fue realizada para mantener la siguiente línea un poco más corta. Notese que al llamar a la función `rotate`, se está siempre rotando la imagen original del mono. Cuando rotamos, hay un pequeña pérdida de calidad. Rotar repetidamente la misma imagen genera que la calidad se deteriore cada vez más. Esto se debe a que las esquinas de la imagen van a haber sido rotadas de más, causando que la imagen se haga más grande. Nos aseguramos que la nueva imagen coincida con el centro de la vieja imagen, para que de esta forma se rote sin moverse. El último método es `punched()` el cual indica al sprite que entre en un estado de mareo. Esto causará que la imagen empice a girar. Además, también crea una copia de la actual imagen llamada "original". Inicializar Todo ---------------- Antes de poder hacer algo con pygame, necesitamos asegurarnos que los módulos estén inicializados. En este caso, vamos a abrir también una simple ventana de gráficos. Ahora estamos en la función `main()` del programa, la cual ejecuta todo. :: pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) La primera línea para inicializar *pygame* realiza algo de trabajo por nosotros. Verifica a través del módulo importado *pygame* e intenta inicializar cada uno de ellos. Es posible volver y verificar que los módulos que fallaron al iniciar, pero no vamos a molestarnos acá con eso. También es posible tomar mucho más control e inicializar cada módulo en especifico, uno a uno. Ese tipo de control no es necesario generalmente, pero está disponible en caso de ser deseado. Luego, se configura el modo de visualización de gráficos. Notse que el módulo :mod:`pygame.display` es usado para controlar todas las configuraciones de visualización. En este caso nosotros estamos buscando una ventana 1280x480, con ``SCALED``, que es la señal de visualización (display flag) Esto aumenta proporcionalmente la ventana de visualización (display) más grande que la ventana. (window) Por último, establecemos el título de la ventana y apagamos el cursor del mouse para nuestra ventana. Es una acción básica y ahora tenemos una pequeña ventana negra que está lista para nuestras instrucciones (bidding) u ofertas. Generalmente, el cursor se mantiene visible por default, asi que no hay mucha necesidad de realmente establecer este estado a menos que querramos esconderlo. Crear el Fondo -------------- Nuestro programa va a tener un mensaje de texto en el fondo. Sería bueno crear un único surface que represente el fondo y lo use repetidas veces. El primer paso es crear el Surface. :: background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) Esto crea el nuevo surface, que en nuestro caso, es del mismo tamaño que la ventana de visualización. Notese el llamado extra a `convert()` luego de crear la Surface. La función `convert()` sin argumentos es para asegurarnos que nuestro fondo sea del mismo formato que la ventana de visualización, lo cual nos va a brindar resultados más rápidos. Lo que nosotros hicimos también, fue rellenar el fondo con un color verduzco. La función `fill()` suele tomar como argumento tres instancias de colores RGB, pero soporta muchos formatos de entrada. Para ver todos los formatos de color veasé :mod:`pygame.Color`. Centrar Texto en el Fondo ------------------------- Ahora que tenemos el surface del fondo, vamos a representar el texto en él. Nosotros solo haremos esto si vemos que el módulo :mod:`pygame.font` se importó correctamente. De no ser así, hay que saltear esta sección. :: if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) Tal como pueden ver, hay un par de pasos para realizar esto. Primero, debemos crear la fuente del objeto y renderizarlo (representarlo) en una nueva Surface. Luego, buscamos el centro de esa nueva surface y lo pegamos (blit) al fondo. La fuente es creada con el constructor `Font()` del módulo `font`. Generalmente, uno va a poner el nombre de la fuente TrueType en esta función, pero también se puede poner `None`, como hicimos en este caso, y entonces se usará la fuente por predeterminada. El constructor `Font` también necesita la información del tamaño de la fuente que se quiere crear. Luego vamos a represetar (renderizar) la fuente en la nueva surface. La función `render` crea una nueva surface que es del tamaño apropiado para nuestro texto. En este caso, también le estamos pidiendo al render que cree un texto suavizado (para un lindo efecto de suavidad en la apariencia) y que use un color gris oscuro. Lo siguiente que necesitamos es encontrar la posición la posición central, para colocar el texto en el centro de la pantalla. Creamos un objeto "Rect" de las dimensiones del texto, lo cual nos permite asignarlo fácilmente al centro de la pantalla. Finalmente, blitteamos (pegamos o copiamos) el texto en la imagen de fondo. Mostrar el Fondo mientras Termina el Setup ------------------------------------------ Todavía tenemos una ventana negra en la pantalla. Mostremos el fondo mientras esperamos que se carguen los otros recursos. :: screen.blit(background, (0, 0)) pygame.display.flip() Esto va a blittear (pegar o copiar) nuestro fondo en la ventana de visualización. El blit se explica por sí mismo, pero ¿qué está haciendo esa rutina flip? En pygame, los cambios en la surface de visualización (display) no se hacen visibles inmediatamente. Normalmente, la pantalla debe ser actualizacada para que el usuario pueda ver los cambios realizados. En este caso la función `flip()` es perfecta para eso porque se encarga de toda el área de la pantalla. Preparar Objetos del Juego -------------------------- En este caso crearemos todos los objetos que el juego va a necesitar. :: whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() Primero cargamos dos efectos de sonido usando la función `load_sound`, que se encuentra definida en código arriba. Luego, creamos una instancia para cada uno de los sprites de la clase. Por último, creamos el sprite :class:`Group ` que va a contener todos nuestros sprites. En realidad, nosotros usamos un grupo especial de sprites llamado :class:`RenderPlain`. Este grupo de sprites puede dibujar en la pantalla todos los sprites que contiene. Es llamado `RenderPlain` porque en realidad hay grupos Render más avanzados, pero para nuestro juego nosotros solo necesitamos un dibujo simple. Nosotros creamos el grupo llamado "allsprites" al pasar una lista con todos los sprites que deberían pertenecer al grupo. Exise la posibilidad, si más adelante quisieramos, de agregar o sacar sprites de este grupo, pero para este juego no sería necesario. El objeto `clock` que creamos será usado para ayudar a controlar la frequencia de cuadros de nuestro juego. Vamos a usarlo en el bucle (loop) principal de nuestro juego para asegurarnos que no se ejecute demasiado rápido. Bucle principal (Main Loop) --------------------------- No hay mucho por acá, solo un loop infinito. :: going = True while going: clock.tick(60) Todos los juegos se ejecutan sobre una especie de loop. El orden usual de las cosas es verificar el estado de la computadora y la entrada de usuario, mover y actualizar el estado de todos los objetos, y luego dibujarlos en la pantalla. Verás que este ejemplo no es diferente. También haremos un llamado a nuestro objeto `clock`, que asegurará que nuestro juego no se ejecute pasando los 60 cuadros por segundo. Manejar los Eventos de Entrada ------------------------------ Este es un caso extremandamente simple para trabajar la cola de eventos. :: for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() Primero obtenemos todos los Eventos (events) disponibles en pygame y los recorremos en loop. Las primeras dos pruebas es para ver si el usuario dejó nuestro juego, o si presionó la tecla de escape. En estos casos, configuramos ``going`` en ``False``, permitiendonos salir del loop infinito. A continuación, verificamos si se presionó o si se soltó el botón del mouse. En el caso de que el botón se haya presionado, preguntamos al primer objeto si chocó con el mono. Se reproduce el sonido apropiado, y si el mono fue golpeado, le decimos que empiece a girar (al hacer un llamado a su método `punched()` ) Actualizar los Sprites ---------------------- :: allsprites.update() Los grupos de Sprite tienen un método `update()`, que simplemente llama al método de actualización para todos los sprites que contiene. Cada uno de los objetos se va a mover, dependiendo de cuál sea el estado en el que estén. Acá es donde el mono se va a mover de un lado a otro, o va a girar un poco más lejos si fue recientemente golpeado. Dibujar la Escena Completa -------------------------- Ahora que todos los objetos están en el lugar indicado, es el momento para dibujarlos. :: screen.blit(background, (0, 0)) allsprites.draw(screen) pygame.display.flip() La primera llamada de blit dibujará el fondo en toda la pantalla. Esto borra todo lo que vimos en el cuadro anterior (ligeramente ineficiente, pero suficientemnte bueno para este juego). A continuación, llamamos al método `draw()` del contenedor de sprites. Ya que este contenedor de sprites es en realidad una instancia del grupo de sprites "DrawPlain", sabe como dibujar nuestros sprites. Por último, usamos el método `flip()` para voltear los contenidos del software de pygame. Se realiza el flip a través del cargado de la imagen en segundo plano. Esto hace que todo lo que dibujamos luego se visibilice de una vez. Fin del Juego ------------- El usuario ha salido del juego, hora de limpiar (clean up) :: pg.quit() Hacer la limpieza, el cleanup, de la ejecución del juego en *pygame* es extremandamente simple. Ya que todas las variables son automáticamente destruidas, nosotros no tenemos que hacer realmnete nada, únicamente llamar a `pg.quit()` que explicitamente hace la limpieza de las partes internas del pygame.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/CrearJuegos.rst0000644000175100001770000001544114676242340020754 0ustar00runnerdocker.. TUTORIAL:Tom Chance's Making Games Tutorial .. include:: ../../reST/common.txt **************************** Crear Juegos con Pygame **************************** Crear Juegos con Pygame ======================== .. rst-class:: docinfo :Traducción al español: Estefanía Pivaral Serrano .. .. toctree:: .. :hidden: .. :glob: .. tom_games2 .. tom_games3 .. tom_games4 .. tom_games5 .. tom_games6 Tabla de Contenido ------------------- \1. :ref:`Introducción ` \1.1. :ref:`A note on coding styles ` .. \2. :ref:`Revisión: Fundamentos de Pygame ` .. \2.1. :ref:`El juego básico de pygame ` .. \2.2. :ref:`Objetos básicos de pygame ` .. \2.3. :ref:`Blitting ` .. \2.4. :ref:`El evento en loop (búcle de evento) ` .. \2.5. :ref:`Ta-ra! ` .. \3. :ref:`Dandole inicio ` .. \3.1. :ref:`Las primeras líneas y carga de módulos ` .. \3.2. :ref:`Funciones de manejo de recursos ` .. \4. :ref:`Clases de objeto de juego ` .. \4.1. :ref:`Una clase de pelota sencilla ` .. \4.1.1. :ref:`Desvío 1: Sprites ` .. \4.1.2. :ref:`Desvío 2: Física vectorial ` .. \5. :ref:`Objetos controlable por el usuario ` .. \5.1. :ref:`Una clase de bate sencillo ` .. \5.1.1. :ref:`Desvío 3: Eventos de Pygame ` .. \6. :ref:`Ensamblando los elementos ` .. \6.1. :ref:`Deja que la pelota golpée los lados ` .. \6.2. :ref:`Deja que la pelota golpée el bate ` .. \6.3. :ref:`El producto final ` .. _crearjuegos-1: 1. Introducción --------------- Antes que nada, asumo que han leído el tutorial :doc:`Chimpancé línea por línea `, que presenta lo básico de Python y pygame. Denle una leida antes de leer este tutorial, ya que no voy a repetir lo que ese tutorial dice (o al menos no en tanto detalle.) Este tutorial apunta a aquellos que entienden cómo hacer un "juego" ridiculamente simple, y a quien le gustaría hacer un juego relativamente sencillo como Pong. Les presenta algunos conceptos de diseño de juegos, algunas nociones matemáticas sencillas para trabajar con la física de la pelota, y algunas formas de mantener el juego fácil de mantener y expandir. Todo el código en este tutorial sirve para implementar `TomPong `_, un juego que yo he escrito. Hacia el fin del tutorial, no solo deberías tener una idea más firme de pygame, sino que también deberías poder entender como funciona TomPong y cómo hacer tu propia versión. Ahora, un breve resumen de los conceptos básicos de pygame. Un método común para organizar el código de un juego es dividirlo en las siguientes seis secciones: - **Carga de módulos** que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame. - **Funciones de manejo de recursos**; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener. - **Clases de objeto de juego**; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú. - **Cualquier otra función del juego**; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función. - **Inicializar el juego**, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar. - **El loop (búcle) principal**, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla. Cada juego que hagas tendrá alguna o todas estas secciones, posiblemente con más de las propias. Para los propósitos de este tutorial, voy a escribir sobre como TomPong está planteado y las ideas sobre las que escribo pueden transferirse a casi cualquier tipo de juego que puedas crear. También voy a asumir que deseas mantener todo el código en un único archivo, pero si estás creando un juego razonablemente grande, suele ser una buena idea incluir ciertas secciones en los archivos de módulos. Poner las clases de objeto en un archivo llamado ``objects.py``, por ejemplo, puede ayudarte a mantener la lógica del juego separada de los objetos del juego. Si tenés mucho código de manejo de recursos, también puede ser útil poner eso en ``resources.py`` Luego podés usar :code:`from objects,resources import *` para importar todas las clases y funciones. .. _crearjuegos-1-1: 1.1. Una nota sobre estilos de codificación ------------------------------------------- Lo primero a tener en cuenta cuando abordamos cualquier proyecto de programación es el decidir el estilo de codificación, y mantenerse consistente. Python resuelve mucho de los problemas debido a su estricta interpretación de los espacios en blanco y la sangría, pero aún así se puede elegir el tamaño de sus sangrías, si coloca cada importación de módulo en una nueva línea, cómo comentas el código, etc. Verás cómo hago todas estas cosas en los ejemplos del código; no es necesario que se use mi estilo, pero cualquiera sea el estilo que adoptes, usalo en todo el programa. Tratá también de documentar todas tus clases y comentá en cada fragmento de código que parezca oscuro, sin caer en comentar lo obvio. He visto mucho gente que hace lo siguiente: : player1.score += scoreup # Add scoreup to player1 score (Agrega scoreup al score de player 1) El peor código está mal diseñado, con cambios en el estilo que aparentan ser aleatorios y documentación deficiente. El código deficiente no solo es molesto para otras personas, pero también hace que sea difícil de mantener para uno mismo. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/GuiaNewbie.rst0000644000175100001770000006115614676242340020566 0ustar00runnerdocker.. TUTORIAL: David Clark's Newbie Guide To Pygame .. include:: ../../reST/common.txt *********************************** Guía de Pygame para Principiantes *********************************** .. title:: Guía de Pygame para Newbies .. rst-class:: docinfo :Traducción al español: Estefanía Pivaral Serrano Guía de Pygame para Principiantes ================================= o **Cosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso** o **Cómo aprendí a dejar de preocuparme y amar el blit.** Pygame_ es un contenedor de Python para SDL_, escrito por Pete Shinners. Lo cual significa que al usar pygame, podés escribir juegos u otras aplicaciones multimedia en Python que se ejecutarán sin alteraciones en cualquier plataforma compatible con SDL (Windows, Unix, Mac, BeOS y otras). Pygame puede ser fácil de aprender, pero el mundo de la programación de gráficos pueden ser bastante confusos para el recién llegado. Escribí esto para tratar de destilar el conocimiento práctico que obtuve durante el último año trabajando con pygame y su predecesor, PySDL. He tratado de clasificar las sugerencias en orden de importancia, pero cuán relevante es cada consejo dependerá de tu propio antecedente y los detalles de tu proyecto. Ponte cómodo trabajando con Python ---------------------------------- Lo más importante es sentirse confiado usando python. Aprender algo tan potencialmente complicado como programación de gráficos será un verdadero fastidio si tampoco se está familiarizado con el lenguaje que se está usando. Escrí una cantidad de programas considerables en Python -- analizá (parse) algunos archivos de texto, escribí un juego de adivinanzas o un programa de entradas de diario, o algo. Ponte cómodo con las secuencias de caracteres que representan textos (strings) y la manipulación de listas. Sepa cómo funciona ``import`` (importar) -- intenta escribir un programa que se extienda a varios archivos fuente. Escribe tus propias funciones, y practica manipular números y caracteres; sepa cómo convertir de una a otra. Llega al punto en que la sintaxis para usar listas y diccionarios es algo instintivo-- no querés tener que ejecutar la documentación cada vez que necesitas dividir una lista u ordernar un juego de llaves. Resiste la tentación de correr a una lista de emails, comp.lang.python, o IRC cuando te encuentres en un problema. En lugar de eso, enciende el interperte y juega con el problema por unas horas. Imprime el `Python 2.0 Quick Reference`_ y conservalo junto a la computadora. Esto puede sonar increiblemente aburrido, pero la confianza que vas a ganar al familiarizarte con python hará maravillas cuando se trate de escribir tu propio juego. El tiempo que dediques a escribir código python de forma instintiva no será nada en comparación con el tiempo que ahorrarás al escribir código real. Reconoce qué partes de pygame necesitás realmente. -------------------------------------------------- Ver el revoltijo de clases en la parte superior de la documentación del índice de documentación de pygame puede ser confuso. Lo más importante es darse cuenta de que se puede hacer mucho con tan solo un pequeño subconjunto de funciones. Existen muchas clases que probablemente nunca uses -- en un año, yo no he tocado las funciones ``Channel``, ``Joystick``, ``cursors``, ``Userrect``, ``surfarray`` o ``version``. Sepa qué es una Surface (superficie) ------------------------------------ La parte más importante de pygame es la Surface (superficie). La Surface puede pensarse como una hoja de papel en blanco. Se pueden hacer muchas cosas con la Surface -- se pueden dibujar líneas, colorear partes de ella con colores, copiar imágenes hacia y desde ella, y establecer o leer píxeles indivduales de colores en ella. Una Surface puede ser de cualquier tamaño (dentro de lo lógico) y puede haber tantas como quieras (de nuevo, dentro de lo razonable). Una Surface es especial -- la que vayas a crear con ``pygame.display.set_mode()``. Esta 'display surface' (surface de visualización) representa la pantalla; lo que sea que hagas en ella aparecerá en la pantalla del usuario. Solo puedes tener una de esas -- esa es una limitación de SDL, no de pygame. Entonces, ¿cómo crear Surfaces? Como mencioné arriba, la Surface especial se crea con ``pygame.display.set_mode()``. Se puede crear una surface que contenga una imagen usando ``image.load()``, o podés crear una surface que contenga texto con ``font.render()``. Incluso se puede crear una surface que no contenga nada en absoluto con ``Surface()``. La mayoría de las funciones de Surface no son críticas. Sólo es necesario aprender ``blit()``, ``fill()``, ``set_at()`` y ``get_at()``, y vas a estar bien. Usa surface.convert(). ---------------------- Cuando yo leí por primera vez la documentación para ``surface.convert()``, no pensé que fuera algo de lo que tuviera que preocuparme. 'Sólo voy a usar PNGs, por lo tanto todo o que haga será en ese formato. Entonces no necesito ``convert()``';. Resultó ser que estaba muy, muy equivocado. El 'format' (formato) al que ``convert()`` se refiere no es el formato del archivo (por ejemplo, PNG, JPEG, GIF), es lo que se llama el 'píxel format' (formato pixel). Esto se refiere a la forma particular en la que una Surface registra colores individuales en un píxel especifico. Si el formato de la Surface (Surface format) no es el mismo que el formato de visualización (display format), SDL tendrá que convertirlo sobre la marcha para cada blit -- un proceso que consume bastante tiempo. No te preocupes demasiado por la explicación; solo ten en cuenta que ``convert()`` es necesario si querés que haya velocidad en tus blits. ¿Cómo se usa convert? Sólo hay que hacer una call (llamada) creando la Surface con la función ``image.load()``. En vez de hacer únicamente:: surface = pygame.image.load('foo.png') Haz:: surface = pygame.image.load('foo.png').convert() Es así de fácil. Lo único que se necesita es hacer una de esas calls (llamadas) por Surface, cuando cargues una imagen del disco. It's that easy. You just need to call it once per surface, when you load an image off the disk. Estará satisfecho con los resultados; veo al rededor de un 6x aumento de la velocidad de blitting llamando (haciendo la call) ``convert()``. La única vez que no vas a querer usar ``convert()`` es cuando realmente necesitas tener el control absoluto sobre al formato interno de una imagen -- digamos que estás escribiendo un programa de conversión de imagen o algo así, y necesitás asegurarte que el archivo de salida tenga el mismo formato píxeles que el archivo de entrada. Si estás escribiendo un juego, necesitás velocidad. Usa ``convert()``. Animación rect "sucia". ----------------------- La causa más común de frecuencias de cuadros inadecuadas en los programas Pygame resulta de malinterpretar la función ``pygame.display.update()``. Con pygame, con simplemente dibujar algo en la Surface de visualización no hace que aparezca en la pantalla -- necesitas hacer un llamado a ``pygame.display.update()``. Hay tres formas de llamar a esta función: * ``pygame.display.update()`` -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa). * ``pygame.display.flip()`` -- Esto hace lo mismo, y también hará lo correcto si estás usando ``double-buffered`` aceleración de hardware, que no es así, entonces sigamos ... * ``pygame.display.update(a rectangle or some list of rectangles)`` -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques. La mayoría de la gente nueva en programación gráfica usa la primera opción -- ellos actualizan la pantalla completa en cada cuadro. El problema es que esto es inaceptablemente lento para la mayoría de la gente. Hacer una call a ``update()`` toma 35 milisegundos en mi máquina, lo cual no parece mucho, hasta que te das cuenta que 1000 / 35 = 28 cuadros por segundo *máximo*. Y eso es sin la lóagica del juego, sin blits, sin entrada (input) , sin IA, nada. Estoy aquí sentado actualizando la pantalla, y 28 fps (frames per second - cuadros por segundo) es mi máximo de cuadros por segundo. Ugh. La solucion es llamada 'dirty rect animation' o 'animación de rect sucia'. En vez de actualizar la pantalla completa en cada cuadro, solo se actualizan las partes que cambiaron desde el último cuadros. Yo hago esto al hacer un seeguimiento de esos rectángulos en una lista, luego llamando a ``update(the_dirty_rectangles)`` al final del cuadro. En detalle para un sprite en movimiento, yo: * Blit una parte del fondo sobre la ubicación actual del sprite, borrándolo. * Añado el rectángulo de la ubicación actual a la lista llamada dirty_rects. * Muevo el sprite. * Dibujo (Draw) el sprite en su nueva ubicación. * Agrego la nueva ubicación del sprite a mi lista de dirty_rects. * Llamo a ``display.update(dirty_rects)`` La diferenci aen velocidad es asombrosa. Tengan en consideración que SolarWolf_ tiene docenas de sprites en constante movimiento que se actualizan sin problemas, y aún así le queda suficiente tiempo para mostrar un campo estelar de paralaje en el fondo, y también actualizarlo. Hay dos casos en que esta técnica no funciona. El primero es cuando toda la ventana o la pantalla es siendo actualizada realmente en cada cuadro -- pensá en un motor de desplazamiento como un juego de estrategia en tiempo real o un desplazamiento lateral. Entonces, ¿qué hacés en ese caso? Bueno, la respuesta corta es -- no escribas este tipo de juegos en pygame. La respuesta larga es desplazarse en pasos de varios píxeles a la vez; no intentes hacer del desplazamiento algo perfectamente suave. El jugador apreciará un juego que se desplaza rápidamente y no notará demasiado el fondo saltando. Una nota final -- no todo juego requeire altas frecuencias de cuadros. Un juego de guerra estratégico podría funcionar fácilmente con solo unas pocas actualizaciones por segundo -- en este caso, la complejidad agregada de la animación de rect sucio (dirty rect animation) puede no ser necesaria. NO hay regla seis. ------------------ Los surfaces de hardware son más problemáticos de lo que valen. --------------------------------------------------------------- **Especialmente en pygame 2, porque HWSURFACE ahora no hace nada** Si estuviste mirando las distintas flags (banderas) que se pueden usar con ``pygame.display.set_mode()``, puede que hayas pensado lo siguiente: `Hey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!`. No es tu culpa; hemos sido entrenados por años en juegos 3D como para creer que la aceleración de hardware es buena, y el rendering (representación) del software es lento. Desafortunadamente, el rendering de hardware viene con una larga lista de inconvenientes: * Solo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar. * Solo funciona en pantalla completa. * Complica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta. * Pierdes el puntero del mouse. Si especificás ``HWSURFACE`` (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia! * Podría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos. El rendering (representación) de hardware tiene su lugar. Funciona de manera bastante confiable en Windows, por lo que si no estás interesado en el rendimiento de multiplataformas, puede proporcionarte un aumento sustancial de la velocidad. Sin embargo, tiene un costo -- mayor dolor de cabeza y complejidad. Es mejor apegarse al viejo y confiable ``SWSURFACE`` hasta que estés seguro de lo que estás haciendo. No te distraigas con problemas secundarios. ------------------------------------------- A veces, los nuevos programadores dedican mucho tiempo preocupandose sobre problemas que no son realmente críticos para el éxito de su juego. El deseo de arreglar los problemas secundarios es entendible, pero al principio en el proceso de creación de un juego, ni siquiera puedes saber cuáles son las preguntas importantes, mucho menos qué respuestas deberías elegir. El resultado puede ser un montón de prevariaciones innecesarias. Por ejemplo, consideren la pregunta de cómo organizar los archivos gráficos. ¿Debería cada cuadro tener su propio archivo gráfico, o cada sprite? ¿Quizás todos los gráficos se deberían comprimir en un archivo? Se ha perdido una gran cantidad de tiempo en muchos proyectos, preguntándose estas preguntas en lista de correo, debatiendo las respuestas, haciendo perfiles, etc, etc. Este es un tema secundario; cualquier cantidad de tiempo invertido en discutir eso, debería haber sido usado en escribir el código del juego real. El idea es que es mucho mejor tener una solución 'bastante buena' que haya sido implementada, que una solucion perfecta que nunca se haya llegado a escribir. Los rects son tus amigos. ------------------------- El envoltorio de Pete Shinners puede tener efectos alfa geniales y velocidades rápidas de blitting, pero tengo que admitir que mi parte favorita de pygame es la humilde clase ``Rect``. Un rect es simplemente un rectángulo -- definido solo por la posición de su esquina superior izquierda, su ancho y su altura. Muchas funciones de pygame toman rects como argumentos, y ellas solo hacen 'rectstyles', una secuencia que tiene los mismos valores que un rect. Entonces si necesito un rectángulo que defina el área entre 10, 20 y 40, 50, puedo hacer cualquier de las siguientes:: rect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30)) Sin embargo, si usas cualquiera de las primeras tres versiones, obtendrás accesso a las funciones de utilidad del rect. Estas incluyen funciones para mover, encoger e inflar los rects, encontrar la union de dos rects, y una variedad de funciones de detección de colisión. Por ejemplo, supongamos que yo quiero obtener una lista de todos los sprites que contiene un punto (x,y) -- quizás el jugador clickeó ahí, o quizás esa es la ubicación actual de una bala. Es simple si cada sprite tiene un miembro .rect -- solo hay que hacer: sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)] Los rects no tienen otra relación con los surfaces o con las funciones gráficas, aparte del hecho de que puedes usarlos como argumentos. También se pueden usar en lugares que no tienen nada que ver con gráficos, pero aún así deben ser definidos como rectángulos. En cada proyecto descrubro algunos lugares nuevos donde usar rects donde nunca pensé que los necesitaría. No te molestes con la detección de colisión de píxel perfecto. -------------------------------------------------------------- Así que, tenés tus sprites moviendose y necesitás saber si se están chocando entre sí. Es tentador escribir algo como lo siguiente:ite something like the following: * Checkear si los rects están en colisión. Si no lo están, ignorarlos. * Para cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión. Hay otras formas de hacer esto, con ???????? coordinando máscaras de sprite y así sucesivamente, pero de cualquier forma en que se haga en pygame, probablemente sea demasiado lento. Para la mayoría de los juego probablemente sea mejor hacer solo un "sub-rect de colisión" -- esto es, crear un rect por cada sprite que es un poco más pequeño que la imagen real, y usar eso para colisiones. Esto va a resultar más rápido y, en la mayoría de los casos, el jugador no va a notar la imprecisión. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision. Gestión del subsistema de eventos. ---------------------------------- El sistema de eventos de Pygame es un poco truculento. Hay en realidad dos formas diferntes de saber qué está haciendo un dispositivo de entrada (teclado, mouse, o joystick). La primera es directamente comprobar el estado del dispositivo. Esto se hace mediante la llamada, digamos, ``pygame.mouse.get_pos()`` o ``pygame.key.get_pressed()``. Esto te indicará el estado de tu dispositivo *en el momento en que llames a la función* El segundo método usa la cola de eventos de SDL. Esta cola es una lista de eventos -- eventos se agregan a la lista al ser detectados, y se eliminan de la cola mientras se leen. Hay ventajas y desventajas para cada sistema. Comprobación de estado (sistema 1) (state-checking) aporta precisión -- sabés exactamente cuándo se realizó la entrada -- si ``mouse.get_pressed([0])`` (mouse fue presionado) es 1, eso significa que el botón izquierdo del mpuse está abajo *justo en este momento*. La cola de eventos meramente reporta que el mouse estuvo abajo en algún momento del pasado; si revisas la cola con bastante frecuencia, eso puede estar bien, pero si te demorás en verificarlo con otro código, latencia de entrada puede incrementar. Otra ventaja del sistema de comprobación de estado es que detecta "acordes" fácilmente; es decir, varios estados al mismo tiempo. Si querés saber si las teclas ``t`` y la ``f`` están ambas presionadas al mismo tiempo, sólo hay que checkear:: if (key.get_pressed[K_t] and key.get_pressed[K_f]): print("Sip!") Sin embargo, en el sistema de colas, cada pulsación de tecla llega a la cola como un evento completamente separado, entonces será necesario recordar que la tecla ``t`` estuvo presionada y que aún no había sido soltada mientras la tecla ``f`` fue presionada. Un poco más complicado. Sin embargo, el sistema de estados tiene una gran desventaja. Solo informa el estado del dispositivo al momento en que es llamado; si el usuario clickea el botón del mouse y lo suelta justo antes del llamado a ``mouse.get_pressed()``, el botón del mouse va a devolver un 0 -- ``get_pressed()`` falló completamente en detectar la pulsación del botón del mouse. Dos events, ``MOUSEBUTTONDOWN`` y ``MOUSEBUTTONUP``, seguirán esperando en la cola de eventos a ser recuperados y procesados. La lección es la siguiente: elegí el sistema que cumpla con tus requisitos. Si no hay mucho sucediendo en tu loop -- supongamos, estás sentado en un bucle de ``while True``, esperando una entrada, usa ``get_pressed()`` u otra función de estado; la latencia será menor. Por otro lado, si cada pulsación de tecla es crucial, pero la latencia no es tan importante -- por ejemplo, el usuario está escribiendo algo en un cuadro de edición, usá la cola de eventos. Algunas pulsaciones de tecla pueden retrasarse un poco, pero al menos van a aparecer todas. Una nota sobre ``event.poll()`` vs. ``wait()`` -- ``poll()`` puede parecer mejor ya que no impide al programa de hacer otra cosa mientras está esperando la entrada -- ``wait()`` suspende el programa hasta que reciba el evento. Sin embargo, ``poll()`` consumirá el 100% del tiempo disponible del CPU mientras se esté ejecutando y llenará la cola de eventos con ``NOEVENTS``. Para seleccionar solo los tipo de eventos que resultan de interés usa ``set_blocked()``, la cola será mucho más manejable. Colorkey vs. Alpha. ------------------- Hay mucha confusión en torno a estas dos técnicas, y gran parte de esto proviene de la terminología usada. 'Colorkey blitting' (blitting de la clave de color) implica decirle a pygame que todos lso píxeles de cierto color de una determinada imagen son transparentes en vez del color que realmente sean. Estos píxeles transparentes no son blitteados cuando el resto de la imagen es blitteada y entonces no oscurecen el fondo. Así es como hacemos los sprites que no son de forma rectangular. Simplemente llamamos a ``surface.set_colorkey(color)``, donde el color es una tupla RGB, supongamos (0,0,0). Esto haría que cada píxel en la imagen de origen transparente en vez de negro. 'Alpha' es diferente, y como en dos sabores. 'Image alpha' (imagen alfa) que aplica a la imagen completa, y es probablemente lo que quieras. Propiamente conocido como 'translucidez', alpha causa que cada píxel en la imagen de origen sea solo *parcialmente* opaco. Por ejemplo, si configuras el alfa de una surface en 192 y después lo blitteas (convertis) en un fondo, 3/4 del color de cada píxel provendrá de la imagen de origan, y 1/4 del fondo. Alfa se mide de 255 a 0, donde 0 es completamente transparente, y 255 es completamente opaco. Nótese que el blitting con colorkey y alfa (colorkey and alfa blitting) pueden combinarse -- esto produce una imagen completamente transparete en algunos lugares y semi-transparente en otros. 'Per-pixel alpha' ('Alfa por pixel') es el otro tipo de alfa, y es más complicado Básicamente, cada píxel de la imagen de origen tiene su propio valor alfa, de 0 a 1. Cada píxel, por lo tanto, puede tener una opacidad diferente cuando se blittea (proyecta) sobre el fondo. Este tipo de alfa no se puede mezclar con la proyección (el blitting) de la clave de color, y anula el 'per-image' alfa. El alfa por píxel (per-pixel alfa) es raramente usado en juego, y para usarlo tenes que guardar la imagen de origen en un editor gráfico con un *canal alpha* especial. Es complicado -- no lo usen todavía. Haz cosas a la manera de pythony. --------------------------------- Una nota final (no es la menos importante, simplemente viene al final) Pygame es un envoltorio bastante liviano alrededor de SDL, que a su vez es un ligero envoltorio alrededor de las calls (llamadas) de gráficos del sistema operativo nativo. Las posibilidades son muy buenas de que si tu código sigue lento, habiendo seguido las indicaciones que mencioné arriba, entonces el problema yace en la forma en que estás direccionando tus datos en python. Algunos modismos simplemente van a ser lentos en python sin importar lo que hagas. Afortunadamente, python es un lenguaje muy claro -- si un fragmento del código se ve extraño o difícil de manejar, es probable que su velocidad también se pueda mejorar. Lée `Python Performance Tips`_ para obtener excelentes consejos sobre cómo puede mejorar la velocidad del código. Dicho esto, la optimización prematura es la razí de todos los males; si simplemente no es lo suficientemente rápido no tortures el código intentando hacerlo más rápido. Algunas cosas simplemente no están destinadas a ser. :) ¡Ya está! Ahora sabés prácticamente todo lo que yo sé sobre el uso de pygame. Ahora, ¡ve a escribir ese juego! ---- *David Clark es un ávido usuario de pygame y es editor de Pygame Code Repository, una vidriera del códigos de juegos en python suministrado por la comunidad. Él es también el autor de Twitch, un juego de arcade completamente promedio de pygame.* .. _Pygame: https://www.pygame.org/ .. _SDL: http://libsdl.org .. _Python 2.0 Quick Reference: http://www.brunningonline.net/simon/python/quick-ref2_0.html .. _SolarWolf: https://www.pygame.org/shredwheat/solarwolf/index.shtml .. _Python Performance Tips: http://www-rohan.sdsu.edu/~gawron/compling/course_core/python_intro/intro_lecture_files/fastpython.html ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/IniciarImportar.rst0000644000175100001770000000664414676242340021644 0ustar00runnerdocker.. TUTORIAL:Import and Initialize .. include:: ../../reST/common.txt *********************************************** Tutoriales de Pygame - Importar e Inicializar *********************************************** Importar e Inicializar ====================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Importar e inicializar pygame es un proceso muy simple. También es lo suficientemente flexible para que el usuario tenga el control sobre lo que está sucediendo. Pygame es una colección de diferentes módulos en un mismo paquete de python. Algunos de los módulos están escritos en C, y algunos otros están escritos en python. Algunos módulos también son opcionales y es posible que no estén presentes. Esto es solo una breve introducción sobre lo que sucede cuando se importa pygame. Para una explicación más clara, definitivamente recomiendo que vean los ejemplos de pygame. Importar -------- Primero debemos importar el paquete de pygame. Desde la versión 1.4 de pygame este ha sido actualizado para ser mucho más fácil. La mayoría de los juegos importarán todo pygame de esta manera.:: import pygame from pygame.locals import * La primera línea aquí es la única necesaria. Esta línea importa todos los módulos de pygame disponibles en el paquete de pygame. La segunda línea es opcional y plantea un conjunto de funciones limitadas en el 'espacio global de nombres' (global namespace) de la secuencia de comandos. Una cosa importante a tener en cuenta es que muchos de los módulos de pygame son opcionales. Por ejemplo, uno de estos es el módulo de fuentes. Cuando se importa pygame (import pygame), pygame comprobará si el módulo de fuentes está disponible. Si el módulo de fuentes está disponible se importará como "pygame.font". Si el módulo no está disponible, "pygame.font" se establecera como 'None' (ninguno). Esto hace que sea bastante fácil probar más adelante si el módulo de fuentes está disponible. Inicializar ----------- Antes de que pueda hacerse mucho con pygame, será necesario inicializarlo. La manera más común es hacerlo mediante una 'llamada' (call).:: pygame.init() Esto intentará inicializar todos los módulos de pygame automáticamente. No todos los módulos necesitan ser inicializados, pero esto inicializará automaticamente los que sí son necesarios. Se puede también inicializar fácilmente cada módulo de pygame de forma manual. Por ejemplo para inicializar únicamente el módulo de fuentes simplemente habría que hacer el siguiente 'llamado'. :: pygame.font.init() Tengan en cuenta que si hay un error cuando se inicialzia con "pygame.init()", fallará silenciosamente. Al inicializar manualmente módulos como éste, cualquier error generará una excepción. Cualquier módulo que deba ser inicializado también tiene una función "get_init()", que devolverá Verdadero (true) si el módulo ha sido inicializado. Es seguro llamar a la función init() para cualquier módulo más de una vez. Cerrar (Quit) ------------- Los módulos que son inicializados por lo general tienen una función quit() (abandonar) que dejará la configuración de los recursos como se encontraba antes. Las variables utilizadas son destruidas. No hay necesidad de hacer un llamado explicitamente, ya que *pygame* cerrará limpiamente todos los módulos inicializados, una vez que python finaliza. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/ModosVisualizacion.rst0000644000175100001770000002321014676242340022356 0ustar00runnerdocker.. TUTORIAL: Choosing and Configuring Display Modes .. include:: ../../reST/common.txt ******************************************************************** Tutoriales de Pygame - Configuración de los Modos de Visualización ******************************************************************** Configuración de los Modos de Visualización =========================================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Introducción ------------ Configurar el modo de visualización en *pygame* crea una imagen de *Surface* visible en el monitor. Esta *Surface* puede o cubrir la pantalla completa, o si se está usando una plataforma que soporta la gestión de ventanas, la imagen puede usarse en ventana. La *Surface* de visualización no es más que un objeto de *Surface* estándar de *pygame*. Hay funciones especiales necesarias en el módulo :mod:`pygame.display` para mantener los contenidos de la imagen de *Surface* actualizada en el monitor. Configurar el modo de visualización en *pygame* es una tarea más fácil que con la mayoría de las bibliotecas gráficas. La ventaja es que si el modo de visualización no está disponible, *pygame* va a emular el modo de visualización que fue pedido. *Pygame* seleccionará la resolución de la visualización y la profundidad del color de la visualización que mejor coincida con la configuración solicitada, luego permitirá tener acceso al formato de visualización requerido. En realidad, ya que el módulo :mod:`pygame.display` está enlazado con la librería SDL, es SDL quién realmente hace todo este trabajo. Esta forma de configurar el modo de visualización presenta ventajas y desventajas. La ventaja es que si tu juego requiere un modo de visualización específico, el juego va a poder ejecutarse aún en plataformas que no soporten los requerimientos. Esto también va a simplificarles la vida cuando estén comenzando con algo, ya que siempre es fácil volver luego y hacer la selección de modo un poco más específicos. La desventaja es que lo que soliciten no es siempre lo que van a obtener. Hay un castigo o multa en el rendimineto cuando el modo de visualización debe ser emulado. Este tutorial les ayudará a entender los métodos diferentes para consultar (querying) las capacidades de visualización de las plataformas, y configurar el modo de visualización para tu juego. Configuración básica -------------------- Lo primero a aprender es cómo configurar realmente el modo de visualización actual. El modo de visualización se puede establecer en cualquier momento luego de haber inicializado el módulo :mod:`pygame.display` Si ya estableciste previamente el modo de visualización, configurarlo nuevamente va a cambiar el actual modo. La configuración del modo de visualización se maneja con la función :func: `pygame.display.set_mode((width, height), flags, depth) `. El único argumento requerido en esta función es la secuencia que contiene el ancho (width) y el alto (height) del nuevo modo de visualización. La bandera de profundidad (depth flag) es los bits por píxel solicitados para la *Surface*. Si la profundidad dada es 8, *pygame* va a crear la asignación de colores de la *Surface*. En el caso que se le otorgue una mayor profundida de bits, *pygame* usará el modo de color empaquetado. Podrán encontrar mucha más información acerca de profundidades y modo de color en la documentación sobre los módulos de visualización y *Surface*. El valor por default para la profundidad es 0. Cuando a un argumento se le asigna 0, *pygame* va a seleccionar el mejor bit de profunidad para usar, generalmente es el mismo bit de profundidad que el sistema actual. El argumento de banderas permite controlar características extras para el modo de visualización. Nuevamente, en caso de querer más información acerca del tema, se puede encontrar en los documentos de referencia de *pygame*. Cómo decidir ------------ Entonces, ¿cómo seleccionar el modo de visualización que va a funcionar mejor con los recursos gráficos y en la plataforma en la que está corriendo el juego? Hay varios métodos diferentes para reunir la información sobre la visualización del dispositivo. Todos estos métodos deben ser 'llamados' (called) luego de que se haya inicializado el módulo de visualización, pero es probable que quieran llamarlos antes de configurar el modo de visualización. Primero, :func:`pygame.display.Info() ` va a devolver un tipo de objeto VidInfo especial, que les dirá mucho acerca de las capacidades del controlador gráfico. La función :func:`pygame.display.list_modes(depth, flags) ` puede ser usada para encontrar los modos gráficos respaldados por el sistema. :func: `pygame.display.mode_ok((width, height), flags, depth) ` toma el mismo argumento que :func:`set_mode() `, pero devuelve la coincidencia más próxima al bit de profundidad solicitado. Por último, :func:`pygame.display.get_driver() ` devuelve el nombre del controlador gráfico seleccionado por *pygame* Solo hay que recordar la regla de oro: *Pygame* va a trabajar con practicamente cualquier modo de visualización solicitado. A algunos modos de visualización va a ser necesario emularlos, lo cual va lentificar el juego, ya que *pygame* va a necesitar convertir cada actualziación que se haga, al modo de visualización "real". La mejor apuesta es siempre dejar que *pygame* elija la mejor profundidad de bit, y que convierta todos los recursos gráficos a ese formato cuando se carguen. Al 'llamar' (call) a la función :func:`set_mode() ` sin ningún argumento o con profundidad 0 dejamos que *pygame* elija por sí mismo la profundidad de bit. O sino se puede llamar a :func:`mode_ok() ` para encontrar la coincidencia más cercana a la profundidad de bit necesaria. Cuando el modo de visualización es en una ventana, lo que generalmente se debe hacer es hacer coincidir el bit de profundidad con el del escritorio. Cuando se está usando pantalla completa, algunas plataformas pueden cambiar a cualquier bit de profundidad que mejor se adecue a las necesidades del usuario. Pueden encontrar la profundidad del escritorio actual si obtienen un *objeto VidInfo* antes de configurar el modo de visualización. Luego de establecer el modo de visualización, pueden descubrir información acerca de su configuración al obtener el objeto VidInfo, o al llamar cualquiera de los métodos Surface.get* en la superficie de visualización. Funciones --------- Estas son las rutinas que se pueden usar para determinar el modo de visualización más apropiado. Pueden encontrar más información acerca de estas funciones en la documentación del modo de visualización. :func:`pygame.display.mode_ok(size, flags, depth) ` Esta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación. :func:`pygame.display.list_modes(depth, flags) ` Deveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es :any:`FULLSCREEN `\ . Si especifican sus propias banderas sin :any:`FULLSCREEN `\ , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor. :func:`pygame.display.Info() ` Esta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) Pueden probar todas estas banderas (flags) simplemente como miembros del objeto VidInfo. Ejemplos -------- Acá hay algunos ejemplos de diferentes métodos para iniciar la visualización gráfica. Estos deberían ayudar a dar una idea de cómo configurar su modo de visualizción :: >>> #dame la mejor profundidad con una visualización de ventana en 640 x 480 >>> pygame.display.set_mode((640, 480)) >>> #dame la mayor visualización disponible en 16-bit >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit no está soportado') ... else: ... print('Resolución encontrada:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> #es necesario una surface de 8-bit, nada más va a funcionar >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Solo puede funcionar con una visualización de 8-bit, lo lamento') ... else: ... pygame.display.set_mode((800, 600), 0, 8) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/MoverImagen.rst0000644000175100001770000005307714676242340020763 0ustar00runnerdocker.. TUTORIAL:¡Ayuda! ¿Cómo Muevo Una Imagen? .. include:: ../../reST/common.txt ********************************************************* Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen? ********************************************************* ¡Ayuda! ¿Cómo Muevo Una Imagen? =============================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Muchas personas nueva en programación y gráficos tienen dificultades para descubrir cómo hacer que una imagen se mueva por la pantalla. Sin entender todos los conceptos puede resultar muy confuso. No sos la primera persona atrapada ahí, haré todo lo posible para que vayamos paso por paso. Incluso, intentaremos terminar con métodos para mantener la eficiencia de tus animaciones. Tengan en cuenta que en este articulo no vamos a enseñar cómo programar en python, solo presentaremos algunos conceptos básicos de pygame. Solo Píxeles en la Pantalla --------------------------- Pygame tiene una Surface de visualización. Básicamente, esto es una imagen que está visible en la pantalla y la imagen está compuesta por píxeles. La forma principal de cambiar estos píxeles es llamando a la función blit(). Esto copia los píxeles de una imagen a otra. Esto es lo primero que hay que entender. Cuando proyectás (blit) una imagen en la pantalla, lo que estás haciendo es simplemente cambiar el color de los píxeles. Los píxeles no se agregan ni se mueven, simplemente cambiamos el color de los píxeles que ya se encuentran en la pantalla. Las imágenes que uno proyecta (blit) a la pantalla son también surfaces (superficies) en pygame pero no están conectadas de ninguna manera a la Surface de visualización. Cuando se proyectan en la pantalla, se copian en la visualización, pero aún mantenes una copia única del original. Luego de esta breve descripción, quizás ya puedas entender lo que se necesita para "mover" una imagen. En realidad, no movemos nada en absoluto. Lo que hacemos es simplemente proyectar (blit) la imagen en una nueva posición, pero antes de dibujar la imagen en la nueva posición, necesitamos "borrar" la anterior. De lo contrario, la imagen será visible en dos lugares de la pantalla. Al borrar rápidamente la imagen y volverla a dibujar en un nuevo lugar en la pantalla, logramos la "ilusión" de movimiento. A lo largo del tutorial, vamos a dividir este proceso en pasos más simples. Incluso explicaremos la mejor manera de tener múltiples imagenes moviendose por la pantalla. Probablemente ya tengas preguntas; por ejemplo, ¿cómo "borramos" la imagen antes de dibujarla en una nueva posición? Quizás todavía estás completamente perdido. Bueno, espero que el resto de este tutorial pueda aclarar las cosas. Damos Un Paso Hacia Atrás ------------------------- Es posible que el concepto de píxeles e imagenes sea aún un poco extraño. ¡Buenas noticias! En las próximas secciones vamos a usar código que hace todo lo que queremos, solo que no usa píxeles. Vamos a crear una pequeña lista de python de 6 números, y vamos a imaginar que representa unos gráficos fantásticos que podemos ver en la pantalla. Podría ser de hecho sorprendente lo cerca que esto representa lo que haremos después con gráficos reales. Entonces, comencemos creando nuestra lista de pantalla y completandola con un paisaje hermoso de 1s y 2s. :: >>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1] Ahora hemos creado nuestro fondo. No va a ser muy emocionante a menos que también dibujemos un jugador en la pantalla. Vamos a crear un héroe poderoso que se parezca al número 8. Vamos a ponerlo cerca de la mitad del mapa y veamos cómo se ve. :: >>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Puede que esto haya sido tan lejos como hayas llegado si saltaste a hacer algo de programación gráfica con pygame. Tenés algunas cosas bonitas en la pantalla, pero no pueden moverse a ningun lado. Quizás ahora que nuestra pantalla es una lista de números, es más fácil ver cómo moverlo. Hacer Mover al Héroe -------------------- Antes de empezar a mover el personaje, necesitamos hacer el seguimiento de algún tipo de posición para él. En la última sección, cuando lo dibujamos, simplemente elegimos una posición al arbitraria. Esta vez hagámoslo de forma más oficial. :: >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Ahora es bastante fácil moverlo en una nueva posición. Podemos simplemente cambiar el valor de playerpos (posición del player) y dibujarlo en la pantalla nuevamente. :: >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1] Whoops. Ahora podemos ver dos héroes. Uno en la vieja posición, y otro en la nueva posición. Esta es exactamente la razón por la que necesitamos "borrar" al héroe en la posición anterior antes de dibujarlo en la nueva posición. Para borrarlo, necesitamos cambiar ese valor en la lista de nuevo al valor que tenía antes de que el héroe lo reemplazara. Eso significa que debemos hacer un seguimiento de los valores en la pantalla antes que el héroe estuviera allí. Hay varias formas de hacerlo, pero la más fácil suele ser mantener una copia separada del fondo de la pantalla. Esto significa que tenemos que hacer cambios en nuestro pequeño juego. Crear un Mapa ------------- Lo que queremos hacer es crear una lista separada que llamaremos nuestro fondo (background). Vamos a crear el fondo para que se vea como lo hacía nuestra pantalla original, con 1s y 2s. Luego, vamos a copiar cada item del fondo a la pantalla. Después de eso, podemos finalmente dibujar nuestro héroe en la pantalla. :: >>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #una nueva pantalla en blanco >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Puede parecer mucho trabajo extra. No estamos muy lejos de donde estabamos la última vez que tratamos de hacer que se moviera. Pero esta vez tenemos la información extra que necesitamos para moverlo correctamente. Hacer Mover al Héroe (Toma 2) ----------------------------- Esta vez va a ser fácil mover al héroe. Primero borramos el héroe de su antigua posición. Esto lo podemos hacer copiando el valor correcto del fondo a la pantalla. Luego, dibujamos el personaje en la nueva posición en la pantalla. >>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1] Ahí está. El héroe se ha movido un lugar hacia la izquierda. Podemos usar este mismo código para moverlo una vez más hacia la izqueirda. :: >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1] Excelente! Esto no es exactamente lo que llamarías una animación fluida, pero con unos pequeños cambios, haremos que esto funcione directamente con gráficos en la pantalla. Definición: "blit" ------------------ En las próximas secciónes transformaremos nuestro programa, de usar listas pasará a usar gráficos reales en la pantalla. Al mostrar los gráficos vamos a usar el término **blit** frecuentemente. Si sos nuevo en el trabajo gráfico, probablemente no estés familiarizado con este término común. BLIT: Basicamente, blit significa copiar gráficos de una imagen a otra. Una definición más formal es copiar una matriz de datos a un mapa de bits. 'Blit' se puede pensar como *asignar* píxeles. Es similar a establecer valores en nuestra lista de pantalla más arriba, blitear asigna el color de los píxeles en nuestra imagen. Otras bibliotecas gráficas usarán la palabra *bitblt*, o solo *blt*, pero están hablando de lo mismo. Es básicamente copiar memoria de un lugar a otro. En realidad, es un poco más avanzado que simpleente copiar la memoria, ya que necesita manejar cosas como formatos de píxeles, recortes y separaciones de líneas de exploración. Los mezcladores (blitters) avanzados también pueden manejar cosas como la transparecia y otros efectos especiales. Pasar de la Lista a la Pantalla ------------------------------- Tomar el código que vemos en los ejemplos anteriores y hacerlo funcionar con pygame es muy sencillo. Simulemos que tenemos cargados algunos gráficos bonitos y los llamamos "terrain1", "terrain2" y "hero". Donde antes asignamos números a una lista, ahora mostramos (blit) gráficos en la pantalla. Otro gran cambio, en vez de usar posiciones como un solo índice (0 through 5), ahora necesitamos una coordenada bidimensional. Fingiremos que uno de los gráficos de nuestro juego tiene 10 píxeles de ancho. :: >>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0)) Hmm, ese código debería parecerte muy familiar, y con suerte, más importante; el código anterior debería tener un poco de sentido. Con suerte, mi ilustración de configurar valores simples en una lista muestra la similitud de establecer píxeles en la pantalla (con blit). La única parte que es realmente trabajo extra es convertir la posición del jugador en coordenadas en la pantalla. Por ahora, solo usamos un :code:`(playerpos*10, 0)` crudo, pero ciertamente podemos hacer algo mejor que eso. Ahora, movamos la imagen del jugador sobre un espacio. Este código no debería tener sorpresas. :: >>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0)) Ahí está. Con este código, hemos mostrado cómo visualizar un fondo simple con la imagen de un héroe. Luego, hemos movido correctamente a ese héroe un espacio hacia la izquierda. Entonces, ¿dónde vamos desde aquí? Bueno, para empezar, el código es todavía un poco extraño. Lo primero que queremos hacer es encontrar una forma más límpia de representar el fondo y la posición del jugador. Luego, quizás una animación un poco más real y fluida. Coordenadas de Pantalla ----------------------- Para posicionar un objeto en la pantalla, necesitamos decirle a la función blit () dónde poner la imagen. En pygame siempre pasamos las posiciones como una coordenada (X,Y). Esto reprenseta el número de píxeles a la derecha y el número de pixeles hacia abajo, para colocar la imagen. La esquina superior izquierda de la Surface es la coordenada (0,0). Moverse un poco hacia la derecha sería (10, 0), y luego moverse hacia abajo en la misma proporción sería (10,10). Al hacer blit, el argumento de posición representa dónde se debe colocar la esquina superior izquierda de la fuente en el destino. Pygame viene con un conveniente container para estas coordenadas, este es un Rect. El Rect básicamente representa un área rectangular en estas coordenadas. Tiene una esquina superior izquierda y un tamaño. El Rect viene con muchos métodos convenientes que ayudan a moverlo y posicionarlo. En nuestros próximos ejemplos representaremos las posiciones de nuestros objetos con Rects. También, hay que tener en cuenta que muchas funciones en pygame esperan argumentos Rect. Todas estas funciones pueden también aceptar una simple tupla de 4 elementos (izquierda, arriba, ancho, alto). No siempre es necesario usar estos objetos Rect, pero mayormente querrás hacerlo. Además la función blit () puede aceptar un Rect como su argumento de posición, simplemente usa la esquina superior izquierda del Rect como su posición real. Cambiando el Fondo ------------------ En todas nuestras secciones anteriores, hemos estado almacenando el fondo como una lista de diferentes tipos de terrenos. Esa es una buena forma de crear un juego basado en mosaicos, pero queremos un desplazamiento fluido. Para hacerlo un poco más fácil, vamos a cambiar el fondo a una imagen única que cubra toda la pantalla. De esta forma, cuando queremos "borrar" nuestros objetos (antes de volver a dibujarlos) solo necesitamos blitear la sección del fondo borrado en la pantalla. Al pasar a blit un tercer argumento Rect de manera opcional, le decimos que use esa subsección de la imagen de origen. Lo verás en uso a continuación mientras borramos la imagen del jugador. Nótese que ahora, cuando terminamos de dibujar en la pantalla, llamamos pygame.display.update() que mostrará todo lo que hemos dibujado en la pantalla. Movimiento Fluido ----------------- Para hacer que algo parezca moverse suavemente, vamos a querer moverlo únicamente un par de píxeles a la vez. Acá está el código para hacer que un objeto se mueva suavemente a través de la pantalla. Según lo que ya sabemos, esto debería parecer bastante simple. :: >>> screen = create_screen() >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #dibujar el fondo >>> position = player.get_rect() >>> screen.blit(player, position) #dibujar el jugador >>> pygame.display.update() #y mostrarlo todo >>> for x in range(100): #animar 100 cuadros ... screen.blit(background, position, position) #borrar ... position = position.move(2, 0) #mover el jugador ... screen.blit(player, position) #dibujar nuevo jugador ... pygame.display.update() #y mostrarlo todo ... pygame.time.delay(100) #detener el programa por 1/10 segundos Ahí está. Este es todo el código que es necesario para animar suavemente un objeto a través de la pantalla. Incluso podemos usar un bonito paisaje de fondo. Otro beneficio de hacer el fondo de esta manera es que la imagen para el jugador puede tener transaprencias o secciones recortadas y aún así se dibujará de correctamente sobre el fondo (un bonus gratis). También hicimos una llamada a pygame.time.delay() al final de nuestro bucle (loop) anterior. Esto ralentiza un poco nuestro programa; de lo contrario, podría ejecutarse tan rápido que sería posible no verlo. Entonces, ¿Qué Sigue? --------------------- Bueno, aquí lo tenemos. Esperemos que este artículo haya cumplido con lo prometido. Aún así, en este punto, el código no está realmente listo para ser el próximo juego más vendido. ¿Cómo hacer para tener múltiples objetos moviendose fácilmente? ¿Qué son exactamente esas misteriosas funciones como load_player_image()? También necesitamos una forma de obtener una entrada simple de usuario y un bucle de más de 100 cuadros. Tomaremos el ejemplo que tenemos acá, y lo convertiremos en una creación orientada a objetos que podría enorgullecería a mamá. Primero, Funciones Misteriosas ------------------------------ Se puede encontrar información completa de este tipo de funciones en otros tutoriales y referencia. El módulo pygame.image tiene una función load() que hará lo que queramos. Las líneas para cargar las imágenes deberían llegar a ser así. :: >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert() Podemos ver que es bastante simple, la función load() solo toma un nombre de archivo y devuelve una nueva Surface con la imagen cargada. Después de cargar, hacemos una llamada al método de Surface, conver(). 'Convert' nos devuelve una nueva Surface de la imagen, pero ahora convertida al mismo formato de píxel que nuestra pantalla. Dado que las imagenes serán del mismo formato que la pantalla, van a blittear muy rápidamente. Si no usaramos 'convert', la función blit() es más lenta, ya que tiene que convertir de un tipo de píxel a otro a medida que avanza. Es posible que hayas notado que ambas load() y convert() devuelven una nueva Surface. Esto significa que estamos realmente creando dos Surfaces en cada una de estas líneas. En otros lenguajes de programación, esto da como resultado una fuga de memoria (no es algo bueno). Afortunadamente, Python es lo suficientemente inteligente como manejar esto, y pygame limpiará adecuadamente la Surface que terminamos sin usar. La otra función misteriosa que vimos en el ejemplo anterior fue create_screen(). En pygame es simple de crear una nueva ventana para gráficos. El código para crear una surface de 640x480 está a continuación. Al no pasar otros argumentos, pygame solo eligirá la mejor profundidad de color y formato de píxel para nosotros. :: >>> screen = pygame.display.set_mode((640, 480)) Manejo de Algunas Entradas -------------------------- Necesitamos desesperadamente cambiar el bucle principal para que buscar cualquier entrada de usuario (como cuando el usuario cierra la ventana). Necesitamos agregar "manejo de eventos" a nuestro programa. Todos los programas gráficos usan este diseño basado en eventos. El programa obtiene eventos como "tecla presionada" o "mouse movido" de la computadora. Entonces el programa responde a los diferentes eventos. Así es como debería ser el código. En lugar de un bucle de 100 cuadros, seguiremos en el bucle hasta que el usuario nos pida que nos detengamos.:: >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... move_and_draw_all_game_objects() Lo que simplemente hace este código es, en primer lugar ejecuta el bucle para siempre, luego verifica si hay algún evento del usuario. Salimos del programa si el usuario presiona el teclado o el botón de cerrar en la ventana. Después de revisar todos los eventos, movemos y dibujamos nuestros objetos del juego. (También los borraremos antes de moverlos.) Mover Imágenes Múltiples ------------------------ Esta es la parte en que realmente vamos a cambiar las cosas. Digamos que queremos 10 imágenes diferentes moviéndose en la pantalla. Una buena forma de manejar esto es usando las CLASES de python. Crearemos una CLASE que represente nuestro objeto de juego. Este objeto tendrá una función para moverse solo y luego podemos crear tantos como queramos. Las funciones para dibujar y mover el objeto necesitan funcionar de una manera en que muevan solo un cuadro (o un paso) a la vez. Acá está el código de python para crear nuestra clase. :: >>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(0, self.speed) ... if self.pos.right > 600: ... self.pos.left = 0 Entonces, tenemos dos funciones en nuestra clase. La función init (inicializar) construye nuestro objeto, posiciona el objeto y establece su velocidad. El método move (mover) mueve el objeto un paso. Si se va demasiado lejos, mueve el objeto de nuevo hacia la izquierda. Ensamblando Todo ---------------- Ahora con nuestra nueva clase objeto, podemos montar el juego completo. Así es como se verá la función principal para nuestro programa. :: >>> screen = pygame.display.set_mode((640, 480)) >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #crear 10 objetos ... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... pygame.time.delay(100) Y ahí está. Este es el código que necesitamos para animar 10 objetos en la pantalla. El único punto que podría necesitar explicación son los dos bucles (loops) que usamos para borrar todos los objetos y dibujar todos los objetos. Para hacer las cosas correctamente, necestamos borrar todos los objetos antes de dibujar alguno de ellos. En nuestro ejemplo puede que no importe pero cuando los objetos se superponen, el uso de dos bucles (loops) como estos se vuelve muy importante. De Ahora En Más, Estás Por Tu Cuenta ------------------------------------ Entonces, ¿qué será lo siguiente en tu camino de aprendizaje? Bueno, primero jugar un poco con este ejemplo. La versión ejecutable completa de este ejemplo está disponible en los directorios de ejemplos de pygame. Está en el ejemplo llamado :func:`moveit.py ` . Dale una mirada al código y jugá con él, correlo, aprendelo. Algunas cosas en las que quizás quieras trabajar es en tener más de un tipo de objeto. Encontrar una manera de "eliminar" objetos limpiamente cuando ya no quieras mostrarlos. También, actualizar el llamado (call) display.update() para pasar una lista de las áreas en pantalla que han cambiado. En pygame hay otros tutoriales y ejemplos que cubren estos temas. Así que cuando estés listo para seguir aprendiendo, seguí leyendo. :-) Por último, podés unirte a la lista de correos de pygame o al chatroom con total libertad para consultar dudas al respecto. Siempre hay personas disponibles que están dispuestas a ayudar con estos temas. Finalmente, divertite, para eso son los juegos! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/SpriteIntro.rst0000644000175100001770000005752014676242340021031 0ustar00runnerdocker.. TUTORIAL: Sprite Module Introduction .. include:: ../../reST/common.txt ******************************************************** Tutoriales de Pygame - Introducción al Módulo de Sprites ******************************************************** Introducción al Módulo de Sprites ================================= .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Comentario: una forma simple de entender los Sprites, es pensarlos como elementos visuales utilizados para representar objetos y personajes en juegos, y se pueden crear y manipular utilizando la biblioteca de Pygame. Si bien se podría traducir el término "sprite" por "imagen en movimiento" o "personaje animado", en el contexto de programación se ha adoptado ampliamente y es comúnmente utilizado en español, sin traducción. La versión de pygame 1.3 viene con un nuevo módulo, ``pygame.sprite``. Este módulo está escrito en Python e incluye algunas clases de nivel superior para administrar los objetos del juego. Al usar este módulo en todo su potencial, se puede fácilmente administrar y dibujar los objetos del juego. Las clases de sprites están muy optimizadas, por lo que es probable que tu juego funcione más rápido con el módulo de sprites que sin él. El módulo de sprites también pretende ser genérico, resulta que lo podés usar con casi cualquier tipo de juego. Toda esta flexibilidad viene con una pequeña penalización, es necesario entenderlo para usarlo correctamente. El :mod:`reference documentation ` para el módulo de sprites puede mantenerte andando, pero probablemente necesites un poco más de explicaicón sobre cómo usar ``pygame.sprite`` en tu propio juego. Varios de los ejemplos de pygame (como "chimp" y "aliens") han sido actualizados para usar el módulo de sprites. Es posible que quieras verificarlos para ver de qué se trata este módulo de sprites. El módulo de chimp incluso tiene su propio tutorial línea por línea, que puede ayudar a comprender mejor la programación con python y pygame. Tengan en cuenta que esta introducción asumirá que tienen un poco de experiencia programando con python y que están familiarizados con diferentes partes de la creación de un simple juego. En este tutorial la palabra "referencia" es usada ocasionalmente. Esta representa una variable de python. Las variables en python son referencias, por lo que pueden haber varias variables apuntando al mismo objeto. Lección de Historia ------------------- El término "sprite" es un vestigio de las computadoras y máquinas de juego más antiguas. Estas cajas antiguas no eran capaces de dibujar y borrar gráficos normales lo suficientemente rápido como para que funcionara como juego. Estas máquinas tenían un hardware especial para manejar juegos como objetos que necesitaban animarse rápidamente. Estos objetos eran llamados "sprites" y tenían limitaciones especiales, pero podían dibujarse y actualizarse muy rápido. Por lo general, existían en buffers especiales superpuestos en el video. Hoy en día las computadores se han vuelto lo suficientemente rápidas para manejar objetos similares a sprites sin un hardware dedicado. El término sprite es todavía usado para representar casi cualquier cosa en un juego 2D animado. Las Clases ---------- El módulo de sprites viene con dos clases principales. La primera es :class:`Sprite `, que debe usarse como clse base para todos los objetos de tu juego. Esta clase realmente no hace nada por sí sola, sólo incluye varias funciones para ayudar a administrar el objeto del juego. El otro tipo de clase es :class:`Group `. La clase ``Group`` es un contenedor para diferentes objetos ``Sprite``. De hecho, hay varios tipos diferentes de clases de Group. Algunos de los ``Groups`` pueden dibujar todos los elementos que contienen, por ejemplo. Esto es todo lo que hay, realmente. Comenzaremos con una descriçión de lo que hace cada tipo de clase y luego discutiremos las formas adecuadas de usar las dos clases. La Clase Sprite --------------- Como se mencionó anteriormente, la clase Sprite está diseñada para ser una clase base para todos los objetos del juego. Realmente no podés usarla por sí sola, ya que sólo tiene varios métodos para ayudarlo a trabajar con diferentes clases ``Grupo``. El sprite realiza un seguimiento de a qué grupo pertenece. El constructor de clases (método ``__init__``) toma un argumento de un ``Grupo`` (o listas de ``Grupos``) al que debería pertencer la instancia ``Sprite``. También se puede cambiar la pertenencia del ``Sprite`` con los métodos :meth:`add() ` y :meth:`remove() `. Hay también un método :meth:`groups() `, que devuelve una lista de los grupos actuales que contiene el sprite. Cuando se usen las clases de Sprite, es mejor pensarlas como "válidas" o "vivas", cuando pertenecen a uno o más ``Grupos``. Cuando se eliminen las instancias de todos los grupos, pygame limpiará el objeto. (A menos que tengas tus propias referencias a la instancia en otro lugar.) El método :meth:`kill() ` elimina los sprites de todos los grupos a los que pertenece. Esto eliminará limpiamente el objeto sprite. Si ya has armado algún juego, sabés que a veces eliminar limpiamente un objeto del juego puede ser complicado. El sprite también viene con un método :meth:`alive() ` que devuelve "true" (verdadero) si todavía es miembro de algún grupo. La Clase Grupo -------------- La clase ``Group`` es solo un simple contenedor. Similar a un sprite, tiene un método :meth:`add() ` y otro método :meth:`remove()` que puede cambiar qué sprites pertenecen a el grupo. También podés pasar un sprite o una lista de sprites al constructor (``__init__()`` method) para crear una instancia ``Group`` que contiene algunos sprites iniciales. El ``Group`` tiene algunos otros métodos como :meth:`empty()` para eliminar todos los sprites de el grupo y :meth:`copy() ` que devolverá una copia del grupo con todos los mismos miembros. Además, el método :meth:`has() ` verificará rápidamente si el ``Group`` contiene un sprite o lista de sprites. La otra función que usarás frecuentemente es el método :meth:`sprites()`. Esto devuelve un objeto que se puede enlazar para acceder a todos los sprites que contiene el grupo. Actualmente, esta es solo una lista de sprites, pero en una versión posterior de python es probable que use iteradores para un mejor rendimiento. Como atajo, el ``Group`` también tiene un método :meth:`update()`, que llamará a un método ``update()`` para cada sprite en el grupo, pasando los argumentos a cada uno. Generalmente, en un juego se necesita alguna función que actualice el estado de los objetos del juego. Es muy fácil llamar a tu propio método usando el método ``Group.sprites()``, pero este es un atajo que se usa lo suficiente como para ser incluido. También, tengan en cuenta que la clase base ``Sprite`` tiene un método ficticio, tipo "dummy", ``update()`` que toma cualquier tipo de argumento y no hace nada. Por último, el Group tiene un par de otros métodos que permiten usarlo como funición interna ``len()``, obteniendo el número de sprites que contiene, y el operador "truth" (verdad), que te permite hacer "if mygroup:" para verificar si el grupo tiene sprites. Mezclándolos Juntos ------------------- A esta altura, las dos clases parecen bastante básicas. No hacen mucho más de lo que podés hacer con una simple lista y tu propia clase de objetos de juego. Pero hay algunas ventajas grandes al usar ``Sprite`` y ``Group`` juntos. Un sprite puede pertenecer a tantos grupos como quieras, recordá que tan pronto como pertenezca a ningún grupo, generalmente se borrará (a menos que tengas otra referencia "no-grupales" para ese objeto) Lo primero es una forma rápida y sencilla de categorizar sprites. Por ejemplo, digamos que tenemos un juego tipo Pacman. Podríamos hacer grupos separados por diferentes tipos de objetos en el juego. Fantasmas, Pac y Pellets (pastilla de poder). Cuando Pac come una pastilla de poder, podemos cambiar el estado de todos los objetos fantasma afectando a todo el grupo Fantasma. Esta manera es más rápida y sencilla que recorrer en loop la lista de todos los objetos del juego y comrpobar cuáles son fantasmas. Agregar y eliminar grupos y sprites entre sí es una operación muy rápida, más rápida que usar listas para almacenar todo. Por lo tanto, podés cambiar de manera muy eficiente la pertenencia de los grupos. Los grupos se pueden usar para funcionar como atributos simples para cada objeto del juego. En lugar de rastrear algún atributo como "close_to_player" para un montón de objetos enemigos, podrías agregarlos a un grupo separado. Luego, cuando necesites acceder a todos los enemigos que están cerca del jugador, ya tenés una lista de ellos, en vez de examinar una lista de todos los enemigos, buscando el indicador "close_to_player". Más adelante, tu juego podría agregar múltiples jugadores, y en lugar de agregar más atributos "close_to_player2", "close_to_player3", podés fácilmente agregarlos a diferentes grupos o a cada jugador. Otro beneficio importante de usar ``Sprites`` y ``Groups`` es que los grupos manejan limpiamente el borrado (o eliminación) de los objetos del juego. En un juego en el que muchos objetos hacen referencia a otros objetos, a veces eliminar un objeto puede ser la parte más difícil, ya que no puede desaparecer hasta que nadie haga referencia a él. Digamos que tenemos un objeto que está "persiguiendo" a otro objeto. El perseguidor puede mantener un Group simple que hace referencia al objeto (u objetos) que está persiguiendo. Si el objeto perseguido es destruido, no necesitamos preocuparnos por notificar al perseguidor que deje de perseguir. El perseguidor puede verlo por sí mismo que su grupo está ahora vacío y quizás encuentre un nuevo objetivo. Una vez más, lo que hay que recordar es que agregar y eliminar sprites de grupos es una operación muy barata/rápida. Puede que te vaya mejor agregando muchos grupos para contener y organizar los objetos de tu juego. Algunos podrían incluso estar vacíos durante gran parte del juego, no hay penalizaciones por administrar tu juego de esta manera. Los Muchos Tipos de Grupos -------------------------- Los ejemplos anteriores y las razones para usar ``Sprites`` y ``Groups`` son solo la punta del iceberg. Otra ventaja es que el módulo viene con varios tipos diferentes de ``Groups``. Todos estos grupos funcionan como un ``Group`` normal y corrientes, pero también tienen funcionalidades añadidas (o ligeramente diferentes). Acá hay una lista de las clases ``Group`` incluidas con el módulo de sprites. :class:`Group ` Este es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros ``Groups`` se derivan de este, pero no todos. :class:`GroupSingle ` Esto funciona exactamente como la clase regular ``Group``, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites. :class:`RenderPlain ` Este es un grupo estándar derivado de ``Group``. Tiene un método draw() que dibuja en la pantalla (o en cualquier ``Surface``) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear. :class:`RenderClear ` Esto se deriva del grupo ``RenderPlain`` y agrega además un método llamado ``clear()``. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método ``clear()``. :class:`RenderUpdates ` Este es el Cádilac de renderizado de ``Groups``. Es heredado de ``RenderClear``, pero cambia el método ``draw()`` para también devolver una lista de ``Rects`` de pygame, que representan todas las áreas de la pantalla que han sido modificadas. Esa es la lista de los diferentes grupos disponibles. Hablaremos más acerca de estos grupos de rendering en la próxima sección. No hay nada que te impida crear tus propias clases de grupos tampoco. Son solo código de python, asi que podés heredar de uno de estos y agregar/cambiar lo que quieras. En el futuro, espero que podamos agregar un par más de ``Groups`` a la lista. Un ``GroupMulti`` que es como el ``GroupSingle``, pero que puede contener hasta un número determinado de sprites (¿en algún tipo de búfer circular?). También un grupo súper renderizador que puede borrar la posición de los sprites sin necesitar una imagen de fondo para hacerlo (al tomar una copia de la pantalla antes de blittear). Quién sabe realmente, pero en el futuro podemos agregar más clases útiles a esta lista. Nota de traducción: "rendering" se puede entender como el proceso de producir una imagen o animación a partir de datos digitales utilizando software de gráficos. La traducción puede ser "renderizado" o "procesamiento de imágenes". Los Grupos de Renderizado ------------------------- De lo analizado anteriormente, podemos ver que hay tres grupos diferentes de renderizado. Con ``RenderUpdates`` podríamos salirnos con la nuestra, pero agrega una sobrecarga que no es realmente necesaria para algo como un juego de desplazamiento. Así que acá tenemos un par de herramientas, elegí la adecuada para cada trabajo. Para un juego del tipo de desplazamiento, donde el fondo cambia completamente en cada cuadro, obviamente necesitamos no necesitamos preocuparnos por los rectángulos de actualización de python en la llamada ``display.update()``. Definitvamente deberías ir con el grupo ``RenderPlain`` para administrar tu renderizado. Para juegos donde el fondo es más estático, definitivamente no vas a querer que Pygame actualice la pantalla completa (ya que no es necesario). Este tipo de juegos generalmente implica borrar la posición anterior de cada objeto y luego dibujarlo en el lugar nuevo de cada cuadro. De esta manera solo estamos cambiando lo necesario. La mayoría de las veces solo querrás usar la clase ``RenderUpdates`` acá. Dado que también querrás pasar la lista de cambios a la función ``display.update()``. La clase ``RenderUpdates`` también hace un buen trabajo al minimizar las áreas superpuestas en la lista de rectángulos actualizados. Si la posición anterior y la actual de un objeto se superponen, las fusionará en un solo rectángulo. Combinado con el hecho de que maneja los objetos eliminados, esta es una poderosa clase ``Group``. Si has escrito un juego que administra los rectángulos modificados para los objetos en el juego, sabés que ésta es la causa de la gran cantidad de código desordenado en el juego. Especialmente, una vez que empiezas a agregar objetos que puedan ser eliminados en cualquier momento. Todo este trabajo se reduce a los monstruosos métodos ``clear()`` y ``draw()``. Además, con la verificación de superposición, es probable que sea más rápido que cuando lo hacías manualmente. También hay que tener en cuenta que no hay nada que impida mezclar y combinar estos grupos de renderizado en tu juego. Definitivamente deberías usar múltiples grupos de renderizado cuando quieras hacer capas con tus sprites. Además, si la pantalla se divide en varias secciones, ¿quizás cada sección de la pantalla debería usar un grupo de representación adecuado? Detección de Colisiones ----------------------- El módulo de sprites también viene con dos funciones de detección de colisiones muy genéricas. Para juegos más complejos, estos realmente no funcionarán adecuadamente, pero fácilmente se puede obtener el código fuente y modificarlos según sea necesario. Acá hay un resumen de lo que son y lo que hacen. :func:`spritecollide(sprite, group, dokill) -> list ` Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método ``kill()`` para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) Esto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo ``Explosion`` donde estaba la bomba. (Tengan en cuenta que la clase ``Explosion`` acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.) :func:`groupcollide(group1, group2, dokill1, dokill2) -> dictionary ` Esto es similar a la función ``spritecollide``, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento ``dokill`` para los sprites en cada lista. Cuando ``dokill1`` es verdadero, los sprites que colisionan en ``group1`` serán ``kill()`` (matados). Cuando ``dokill2`` es verdaero, vamos a tener el mismo resultado para el ``group2``. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de ``group1`` que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor. :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los ``values()`` o ``items()`` si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos ``values()`` estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens. Estas son las funciones básicas de colisión que vienen con pygame. Debería ser fácil crear uno propio que quizás use algo diferente al atributo "rect". ¿O tal vez intentar ajustar un poco más tu código afectando directamente el objeto de colisión en lugar de construir una lista de colisiones? El código en las funciones de colisión de sprites está muy optimizado, pero podrías acelerarlo ligeramente eliminando algunas funcionalidaded que no necesitas. Problemas Comunes ----------------- Actualmente hay un problema principal que atrapa a los nuevos usuarios. Cuando derivas tus nueva clase de sprites con la base de Sprite, TENÉS que llamar al método ``Sprite._init_()`` desde el método ``_init_()`` de tu propia clase. Si te olvidás de llamar al método ``Sprite.__init__()``, vas a obtener un error críptico, como este :: AttributeError: 'mysprite' instance has no attribute '_Sprite__g' Extendiendo tus Propias Clases *(Avanzado)* ------------------------------------------- Debido a problemas de velocidad, las clases de ``Group`` actuales intentan solo hacer exactamente lo que necesitan, y no manejar muchas situaciones generales. Si decidís que necesitás funciones adicionales, es posible que desees crear tu propia clase ``Group``. Las clases ``Sprite`` y ``Gorup`` fueron diseñadas para ser extendidas, así que sentite libre de crear tus propias clases ``Group`` para hacer cosas especializadas. El mejor lugar para empezar es probablemente el código fuente real de python para el módulo de sprite. Mirar el actual grupo ``Sprite`` debería ser ejemplo suficiente de cómo crear el tuyo propio. Por ejemplo, aquí está el código fuente para un ``Group`` de renderización que llama a un método ``render()`` para cada sprite, en lugar de simplemente blittear una variable de "imagen" de él. Como queremos que también maneje áreas actualizadas, empezaremos con una copia del grupo ``RenderUpdates`` original, acá está el código :: class RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty A continuación hay más información acerca de cómo podés crear tus propios objetos ``Sprite`` y ``Group`` de cero. Los objetos ``Sprite`` solo "requieren" dos métodos: "add_internal()" y "remove_internal()". Estos son llamados por la clase ``Group`` cuando están eliminando un sprite de sí mismos. Los métodos ``add_internal()`` y ``remove_internal()`` tienen un único argumento que es un grupo. Tu ``Sprite`` necesitará alguna forma de realizar un seguimiento de los ``Groups`` a los que pertenece. Es probable que quieras intentar hacer coincidir los otros métodos y argumentos con la clase real de ``Sprites``, pero si no vas a usar esos métodos, seguro que no los necesitás. Son casi los mismos requerimientos para crear tu propio ``Group``. De hecho, si observas la fuente, verás que el ``GroupSingle`` no está derivado de la clase ``Group``, simplemente implementa los mismos métodos, por lo que realmente no se puede notar la diferencia. De nuevo, necesitás un método "add_internal()" y "remove_internal()" para que los sprites llamen cuando quieren pertenecer o eliminarse a sí mismos del grupo. Tanto ``add_internal()`` como ``remove_internal()`` tienen un único argumento que es un sprite. El único requisito adicional para las clases ``Group`` es que tengan un atributo ficticio llamado "_spritegroup". No importa cuál sea el valor, en tanto el atributo esté presente. Las clases Sprite pueden buscar este atributo para determinar la diferencia entre un "grupo" y cualquier contenedor ordinario de python. (Esto es importante porque varios métodos de sprites pueden tomar un argumento de un solo grupo o una secuencia de grupos. Dado que ambos se ven similares, esta es la forma más flexible de "ver" la diferencia.) Deberías pasar por el código para el módulo de sprite. Si bien el código está un poco "afinado", tiene suficientes comentarios para ayudarte a seguirlo. Hay incluso una sección de tareas para hacer en la fuente si tenés ganas de contribuir. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/SurfarrayIntro.rst0000644000175100001770000005761514676242340021546 0ustar00runnerdocker.. TUTORIAL:Introduction to the surfarray module .. include:: ../../reST/common.txt ************************************************* Tutoriales de Pygame - Introducción a Surfarray ************************************************* .. currentmodule:: surfarray Introducción a Surfarray ======================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Introducción ------------ Este tutorial intentará presentar tanto Numpy como el módulo de surfarray de pygame a los usuarios. Para principiantes, el código que utiliza surfarray puede ser bastante intimidante. Pero en realidad, hay sólo unos pocos conceptos que entender y estarás listo para empezar. Con el uso del módulo de surfarray es posible realizar operaciones a nivel de píxeles desde el código Python sencillo. El rendimiento puede llegar a ser bastante cercano al nivel de hacer el código en C. Puede que solo desees ir directamente a la sección *"Examples"* para tener una idea de lo que es posible con este módulo, y luego comenzar desde el principio aquí para ir avanzando. Ahora bien, no voy a engañarte para que pienses que todo va a ser muy sencillo. Lograr efectos avanzados modificando los valores de píxeles puede ser complicado. Solo dominar NumPy requiere aprendizaje. En este tutorial me centraré en lo básico y utilizaré muchos ejemplos en un intento de sembrar las semillas de la sabiduría. Después de haber terminado el tutorial, deberías tener una comprensión básica de cómo funciona el surfarray. NumPy ----- Si no tenés instalado el paquete NumPy de python, necesitarás hacerlo. Podés descargar el paquete dede la página de descargas de NumPy en `NumPy Downloads Page `_ Para asegurarte que Numpy esté funcionando correctamente, deberías obtener algo como esto desde prompt (inteprete) interactivo de Python.:: >>> from numpy import * #importar numeric >>> a = array((1,2,3,4,5)) #crear un array >>> a #mostrar array array([1, 2, 3, 4, 5]) >>> a[2] #index al array 3 >>> a*2 #nuevo array con valores dobles array([ 2, 4, 6, 8, 10]) Como se puede ver, el módulo NumPy nos proporciona un nuevo tipo de data, el *array*. Este objeto mantiene un array de tamaño fijo, y todos los valores que contiene en su interior son del mismo tipo. Los arrays (matrices) también pueden ser multidimensionales, que es como las usaremos con imágenes. Hay un poco más de información, pero es suficiente para empezar. Si mirás al último comando de arriba, verás que las operaciones matemáticas en los array de NumPy se aplican para todos los valores del array. Esto se llama "element-wise operations" (operaciones elemento a elemento). Estos arrays también pueden dividirse en listas normales. La sintaxis de la división es la misma que se usa en objetos Python estándar. *(así que estudia si es necesario)*. Aquí hay algunos ejemplos más de arrays que funcionan. :: >>> len(a) #obtener el tamaño del array 5 >>> a[2:] #elementos a partir del 2 array([3, 4, 5]) >>> a[:-2] #todos excepto los últimos 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #agregar el primero y último array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #agregar arrays de tamaños incorrectos Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,) Obtenemos un error con el último comando, porque intentamos sumar dos arrays que tienen tamaños diferentes. Para que dos arrays operen entre sí, incluyendo operaciones comparaciones y asignaciones, deben tener las mismas dismensiones. Es muy importante saber que los nuevos arrays creados a partir de cortar el original hacen referencia a los mismos valores. Por lo tanto, cambiar los valores en una porción de la división también cambia los valores originales. Es importante cómo se hace esto. :: >>> a #mostrar nuestro array inicial array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #dividir al medio 2 elementos >>> aa #mostrar la división array([2, 3]) >>> aa[1] = 13 #cambiar el valor en la división >>> a #mostrar cambio en el original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #copiar el array >>> aaa #mostrar copia array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #configurar los valores medios a 0 >>> aaa #mostrar copia array([1, 0, 0, 0, 5]) >>> a #mostrar nuevamente el original array([ 1, 2, 13, 4, 5]) Ahora vamos a ver pequeños arrays con dos dimensiones. No te preocupes demasiado, comenzar es lo mismo que tener una tupla de dos dimensiones *(una tupla dentro de otra tupla)*. Empecemos con los arrays de dos dimensiones. :: >>> row1 = (1,2,3) #crear una tupla de valores >>> row2 = (3,4,5) #otra tupla >>> (row1,row2) #mostrar como una tupla de dos dimensiones ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #crear un array en 2D >>> b #mostrar el array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #mostrar el nuevo array en 2D array([[1, 2], [3, 4], [5, 6]]) Ahora, con estos arrays bidimensionales *(de ahora en más "2D")* podemos indexar valores específicos y hacer cortes ambas dimensiones. Simplemente usando una coma para separar los índices, nos permite buscar/cortar en múltiple dimensiones. Simplemente usando "``:``" como un índex *(o no proporcionando suficiente índices)* nos devuelve todos los valores en esa dimensión. Veamos cómo funciona esto. :: >>> b #mostrar nuestro array desde arriba array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #indexar un único valor 2 >>> b[1,:] #dividir la segunda fila array([3, 4, 5]) >>> b[1] #dividir la segunda fila (igual que arriba) array([3, 4, 5]) >>> b[:,2] #dividir la última columna array([3, 5]) >>> b[:,:2] #dividir en un array de 2x2 array([[1, 2], [3, 4]]) De acuerdo, mantente conmigo acá, esto es lo más díficil que puede ponerse. Al usar NumPy hay una característica más para la división. La división de arrays también permite especificar un *incremento de divsión*. La sintaxis para una división con incremento es ``start_index : end_index : increment``. :: >>> c = arange(10) #como el rango, pero crea un array >>> c #muestra el array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #divide valores impares desde el 1 al 6 array([1, 3, 5]) >>> c[4::4] #divide cada 4to valor, empezando por el 4 array([4, 8]) >>> c[8:1:-1] #divide 1 al 8, de atrás para adelante /// invertido array([8, 7, 6, 5, 4, 3, 2]) Bien, eso es todo. Hay suficiente información acá para que puedas empezar a usar Numpy con el módulo surfarray. Ciertamente hay mucho más en NumPy, pero esto es solo una introducción. Además, ¿queremos pasar a cosas divertidas, no? Importar Surfarray ------------------ Para usar el módulo surfarray necesitamos importarlo. Dado que ambos, tanto surfarray y NumPy, son componentes opcionales para pygame es bueno asegurarse de que se importen correctamente antes de usarlos. En estos ejemplos voy a importar NumPy en una variable llamada *N*. Esto permitirá saber qué funciones estoy usando son del paquete de NumPy. *(y es mucho más corto que escribir NumPy antes de cada función)* :: probá: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required." Introducción a Surfarray ------------------------ Hay dos tipos principales de funciones en surfarray. Un conjunto de funciones para crear un array que es una copia de los datos de píxeles de la superficie (surface). Las otras funciones crean una copia referenciada de los datos de píxeles del array, de modo que los cambios en el array afectan directamente a la surface original. Hay otras funciones que permiten acceder a cualquier valor alfa por pixel, como arrays junto con algunas otras funciones útiles. Veremos estas otras funciones más adelante. Al trabajar con estos arrays de surface, existen dos formas de representar los valores de píxeles. En primar lugar, pueden representarse como enteros mapeados. Este tipo de array es un array simple en 2D con un solo entero que representa el valor de color mapeado de la superficie. Este tipo de array es últil para mover partes de una imagen al rededor de la pantalla. El otro tipo de array utiliza tres valores RGB para representar el color de cada píxel. Este tipo de array hace que sea extremadamente sencillo realizar efectos que cambian el color de cada píxel. Este tipo de array es también un poco más complicado de manejar, ya que es esencialmente un array numérico 3D. Aún así, una vez que ajustas tu mente en el modo adecuado, no es mucho más difícil que usar un array 2D normal. El módulo NumPy utiliza los tipos de números naturales de la máquina para representar los valores de los datos, por lo que un array de NumPy puede consistir de enteros de 8-bits, 16-bits y 32-bits. *(los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros)*. Debido a esta limitación de tamaños de los enteros, debes tener un poco más de cuidado para asegurarte de que el tipo de arrays que hacen referencia a los datos de píxeles se pueda mapear correctamente con un tipo adecuado de datos. Las funciones que crean estos arrays a partir de las superficies son: .. function:: pixels2d(surface) :noindex: Crea una matriz 2D *(valores de píxeles enteros)* que hace referencia a los datos originales de la superficie. Esto funcionará para todos los formatos de surface excepto el de 24-bit. .. function:: array2d(surface) :noindex: Crea un array 2D *(valores de píxeles enteros)* que es copiada desde cualquier tipo de superficie. .. function:: pixels3d(surface) :noindex: Crea un array 3D *(valores de píxeles RGB)* que hacen referencia a los datos originales de la superficie. Esto solo funcionará en superficies de 24-bit y 32-bit que tengan el formato RGB o BGR. .. function:: array3d(surface) :noindex: Crea un array 3D *(valores de píxeles RGB)* que se copia desde cualquier tipo de surface. Aquí hay una pequeña tabla que podría ilustrar mejor qué tipos de funciones se deben usar en cada surface. Como se puede observar, ambas funciones de array funcionarán con cualquier tipo de surface. .. csv-table:: :class: matrix :header: , "32-bit", "24-bit", "16-bit", "8-bit(c-map)" :widths: 15, 15, 15, 15, 15 :stub-columns: 1 "pixel2d", "yes", , "yes", "yes" "array2d", "yes", "yes", "yes", "yes" "pixel3d", "yes", "yes", , "array3d", "yes", "yes", "yes", "yes" Ejemplos -------- Con esta información, estamos preparados para comenzar a probar cosas con los arrays de surface. A continuación encontrarán pequeñas demostraciones que crean un array de NumPy y los muestran en pygame. Estas diferentes pruebas se encuentran en el ejemplo arraydemo.py. Hay una función simple llamada *surfdemo_show* que muestra un array en la pantalla. .. container:: examples .. container:: example .. image:: ../../reST/tut/surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Nuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función ``zeros``. Aquí creamos un array 2D de todos ceros y lo mostramos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Aquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface :meth:`mapped ` (raw). Usaremos esta imagen en el resto de los ejemplos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Aquí volteamos la imagen verticalmente. Todo lo que necesitamos para esto es tomar el array de la imagen original y cortarlo usando un incremento negativo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Basado en el último ejemplo, reducir una imagen escalar es bastante lógico. Simplemente cortamos todos los píxeles usando un incremento de 2 vertical y horizontalmente. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Aumentar la escala de la imagen requiere un poco más de trabajo, pero es similar al escalado previo hacia abajo, lo hacemos todo con cortes. Primero, creamos un array que tiene el doble del tamaño de nuestro original. Primero copiamos el array original en cada otro píxel del nuevo array. Luego lo hacemos de nuevo para cada otro píxel, haciendo las columnas impares. En este punto, tenemos la imagen escalada correctamente en sentido horizontal, pero las otras filas son negras, por lo que simplemente debemos copiar cada fila a la que está debajo. Entonces tenemos una imagen duplicada en tamaño. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Ahora estamos usando arrays 3D para cambiar los colores. Acá establecemos todos los valores en verde y azul en cero. Esto nos deja solo con el canal rojo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Aquí realizamos un filtro de convulción 3x3 que suavizará nuestra imagen. Parece que hay muchos pasos aquí, pero lo que estamos haciendo es desplazar la imagen 1 píxel en cada dirección y sumarlos todos juntos (con algunas multiplicaciones por ponderación). Luego se promedian todos los valores. No es Gaussiano, pero es rápido. Un punto con los arrays NumPy, la precisión de las operaciones aritméticas está determinada por el array con el tipo de datos más grande. Entonces, si el factor no se declarara como un array de 1 elemento de tipo numpy.int32, las multiplicaciones se realizarían utilizando numpy.int8, el entero de 8 bits de cada elemento rgbarray. Esto causará una truncación de valores. El array de suavizado también debe declararse con un tamaño de entero más grande que rgbarray para evitar la truncación. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Por último, estamos realizando una transición gradual entre la imagen original y una imagen de color azul sólido. No es emocionante, pero la imagen de destino podría ser cualquier cosa, y cambiar el multiplicador 0.50 permitirá elegir cualquier paso en una transición lineal entre dos imágenes. .. container:: break .. Con suerte, a estas alturas estás empezando a ver cómo surfarray puede ser utilizado para realizar efectos especiales y transformaciones que sólo son posibles a nivel de píxeles. Como mínimo, se puede utilizar surfarray para realizar muchas operaciones del tipo Surface.set_at() y Surface.set_at() rápidamente. Pero no creas que esto ha terminado, todavía queda mucho por aprender. Bloqueo de Superficie (Surface) ------------------------------- Al igual que el resto de pygame, surfarray bloqueará cualquier Surface que necesite para acceder a los datos de píxeles. Sin embargo, hay un elemento más a tener en cuenta; al crear los array de *pixeles*, la surface original quedará bloqueada durante la vida útil de ese array de píxeles. Es importante recordarlo. Asegurate de *"eliminar"* el array de píxeles o de dejarlo fuera del alcance *(es decir, cuando la funcion vuelve, etc.)*. También hay que tener en cuenta que realmente no querés hacer muchos *(si es que alguno)* accesos directos a píxeles en la surface del hardware *(HWSURFACE)*. Esto se debe a que los datos de la surface se encuentra en la tarjeta gráfica, y transferir cambios de píxeles a través del bus PCI/AGP no es rápido. Transparencia ------------- El módulo surfarray tiene varios métodos para acceder a los valores alpha/colorclave de una Surface. Ninguna de las funciones alpha se ve afectada por la transparencia general de una Surface, solo por los vaores de los píxeles. Aquí está la lista de esas funciones. .. function:: pixels_alpha(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que hace referencia a los datos alpha de la surface original. Esto solo funcionará en imágenes de 32-bit con un componente alfa de 8-bit. .. function:: array_alpha(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que se copia desde cualquier tipo de surface. Si la surface no tiene valores alfa, el array tendrá valores completamten opacos *(255)*. .. function:: array_colorkey(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que está establecida como transparente *(0)* donde el color de ese píxel coincide con el color clave de la Surface. Otras Funciones de Surfarray ---------------------------- Solo hay algunas otras funciones disponibles en surfarray. Podés obtener una lista mejor con mayor documentación en :mod:`surfarray reference page `. Sin embargo, hay una función muy útil. .. function:: surfarray.blit_array(surface, array) :noindex: Esto transferirá cualquier tipo de array de surface 2D o 3D a una Surface con las mismas dimensiones. Este blit de surfarray generalmente será más rápido que asignar un array a la de pixeles referenciado. Sin embargo, no debería ser tan rápido como el blitting normal de surface, ya que esos están muy optimizados. NumPy más Avanzado ------------------ Hay un par más de cosas que deberías saber sobre los arrays Numpy. Cuando se trata de arrays muy grandes, como los que son de 640x480, hay algunas cosas adicionales sobre las que debes tener cuidado. Principalmente, mientras que usar los operadores como + y * en los arrays los hace fáciles de usar, también es muy costoso en arrays grandes. Estos operadores deben hacer nuevas copias temporales del array, que luego generalmente se copian en otro array. Esto puede requerir mucho tiempo. Afortunadamente, todos los operadores de Numpy vienen con funciones especiales que pueden realizar la operación *"in place*" (en su lugar). Por ejemplo, en lugar de usar ``screen[:] = screen + brightmap`` podrías querer usar ``add(screen, brightmap, screen)`` que es más rápido. De todos modos, debes leer la documentación UFunc de Numpy para obtener más información sobre esto. Es importante cuando se trata de los arrays. Otra cosa a tener en cuenta al trabajar con arrays NumPy es el tipo de datos del array. Algunos de los arrays (especialmente el tipo de píxeles mapeado) a menudo devuelven arrays con un valor sin signo en 8-bits. Estos arrays se desbordarán fácilmente si no tienes cuidado. NumPy usará la misma coerción que se encuentra en los programas en C, por lo que mezclar una operación con números de 8 bits y 32 bits dará como resultado números de 32 bits. Puedes convertir el tipo de datos del array, pero definitivamente debes ser consciente de qué tipos de arrays tienes, si NumPy se encuentra en una situación en la que se arruinaría la precisión, lanzará una excepción. Por último, debes tenér en cuenta que al asignar valores en los arrays 3D, estos deben estar entre 0 y 255, de lo contrario se producirá alguna truncación indefinida. Graduación ---------- Bueno, ahí está. Mi breve introducción a NumPy y surfarray. Espero que ahora veas lo que es posible, y aunque nunca los uses por ti mismo, no tengas miedo cuando veas código que los use. Echale un vistazo al ejemplo vgrade para ver más sobre los arrays numéricos. También, hay algunos demos *"flame"* que usan surfarray para crear un efectp de fuego en tiempo real. Lo mejor que podés hacer es probar alguna cosas por tu cuenta. Ve despacio al principio y ve construyendo poco a poco, ya he visto algunas cosas geniales con surfarray, como gradientes radiales y más. Buena suerte. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/chimpance.py.rst0000644000175100001770000000026314676242340021115 0ustar00runnerdocker.. include:: common.txt **************************** pygame/examples/chimp.py **************************** .. literalinclude:: ../../../examples/chimp.py :language: python ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/chimpshot.gif0000644000175100001770000013167214676242340020503 0ustar00runnerdockerGIF89a(&p,(&Ɉ{V˩P+õOǴ+ćnƸ1#Ե˦­#fѽ+uwyjfffې::f::!ɾa/:::Y.ff:fffF۶ff::ې:ffې::w{vʴf::::ۧ||.˺0mkM:f::f:W\VJMFG}rZGfkjzVSHC::ff::f:f~_dcx_\:fnhX9{uWwĚLhSPmWlvy 2Z|cGaNbkPPP~svuflqdjr|}awYil}bgtw|z}žjKmRlmRd{rS|\{[Ǩ|hVsL~]\äЮtTZ;jI˫Ȭ]Bx^AeGͳm[HӷvX8|dF|bDlMmK1ֽlt\$s§sJ,^:!ιqNZ7R.˱c=Ƥ|ԲŲЫ}̱nza=^׼p?ѶuiT,myS.m{NeDb<^l>ZOѰz]^J!H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻx˷߿ LÈ+^̸ǐ#KL˘3Hk̹ϠCMӨS^ͺװc˞M۸sͻ Nȓ+_μУKNسkνËO|ӫ_Ͼ˟OϿ(h& 6F(VhRv ($h(,袋(4h8<@cDiH&L6- TViXf\v^)dih% 0gjix|&{ `@ ,@<碌6裐F*iAH0X L*ꨤjꩨrY)z`AdAlA뮼Kg jTЁ| +P0 ` i;P n~Ʈoη,+A R@(@n~WlG/ ˪-; d C l 7 'q5g1B `m{L4!OD2QjB>RXz71- "T-q˝o>쓟o ߱F+{U0P"` YЂH k\@$=Y\e ZWA T|0%_?*&x ClA׽΍dAH0LlS eQ}+H2Ia *TaUCH/ d "p/nkkb kCZ[d#GhJZ { @ ρMz І:D &JъZͨF7юz HGJҒ(MJWҖ0LgJӚ8ͩNwӞ@ PjQHMRԦ:PTJժZX*Vծz` XJֲhMZzRp\J׺x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;R1EGEEVc6X8궎6M7kIďIr A!TCJB]!-ܢ4'4ܴ`(vc22;HZ2E|2H(zTd4o!\&5@G6(NcTaUa!N#YtITR'&RmR % <12L22R&3RTF~j-GzALp HH V~rSV~5!fS.UY%2cYK;ͭAkXa^(cD3V2"P0-|n@ E@l#Pd l!N(84NQp"I'IKjUav?a_Y1C0$kCCP|e!5-Od>I'_#kAo>"ה.V>& +#e]6Yh)5b[8Tܴe0 + /pkfnvE֡JN]9N,Vn3 F#f({0lhP1I]rڔVpp3a NP!4%,QM=S`<*e-KZ!M?eDV5Gq9,VNV~c֨I*R WwwwpK\ެ$-F_L bE!<*0OX5Vջ""~E^E0~C'SAZJAA+w~wiN Bˍ&DD22 d-b3Ldң2F6rX(a Veĉ|{D8Y(`eHa!#d"a ~[؅ 7iw0҈0AluN<70Ԕ4*g6l0 M'Mi$iA=W-˼a%6zc#zD#k#^ֈk#l`~8xV*̇VJ:vJ> AYBEeaw2F2&z[_`R!&TZu#c1Xed6UDd(MY0wP+k|GPf^˘30B- *%!EFzO(oːm(@L7#n2E#F!=/kCFmSfa*Fl=Bd]UNקEH6Sc:љd/WlX{Xs=QwqLԈ #!wS$5)a=>7ga~xр4HE(\lE0Q|BFm&."铧Tsjr* %8 9z'\%}*ÌG44#XF3ffЂ: U< S\#xJ:[hs5i41#i Eq|b$T>JԢ᧗9KbEcL:,Bϐ~Apl CZSTEDBHG)hA rxuRTRPEBSA UG4q*P.0Il#stE:dZͬf7z hGKҚMjWֺlgKͭnw pKMr:ЍtKZͮvz xKMz|Kͯ~LN;'L [ΰ7T{ GL(NW0gL8αw@L"HN&;PL*[Xβ .{G;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/common.txt0000644000175100001770000000023014676242340020030 0ustar00runnerdocker.. Common definitions for tutorials .. include:: ../../../../reST/common.txt .. role:: codelineref .. role:: clr(codelineref) :class: codelineref ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/es/tutorials/tom_juegos2.rst0000644000175100001770000001614714676242340021004 0ustar00runnerdocker.. include:: ../../reST/common.txt ********************************* Revisión: Fundamentos de Pygame ********************************* .. role:: firstterm(emphasis) .. _hacerjuegos-2: 2. Revisión: Fundamentos de Pygame ================================== .. _hacerjuegos-2-1: 2.1. El juego básico de Pygame ------------------------------ Por el bien de la revisión, y para asegurarme de que estés familiarizado/a con la estrucutra de un programa básico de Pygame, voy a ejecutar brevemente un programa básico de Pygame, que mostrará no más que una ventana con un poco de texto en ella. Al final, debería verse algo así (aunque claro que la decoración de la ventana será probablemente diferente en tu sistema): .. image:: ../../reST/tut/tom_basic.png El código completo para este ejemplo se ve así:: #!/usr/bin/python import pygame from pygame.locals import * def main(): # Inicializar pantalla pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Mostrar texto font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blittear todo a la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Bucle de eventos (event loop) while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main() .. _hacerjuegos-2-2: 2.2. Objetos Pygame Básicos --------------------------- Como pueden ver, el código consiste de tres objetos proncipales: la pantalla, el fondo y el texto. Cada uno de estos objetos está creado primero llamando a una instancia de objeto integrado de Pygame, y luego modificándolo para adaptarse a nuestras necesidades. La pantalla es un caso levemente especial, porque todavía modificamos la pantalla a través de llamadas de Pygame, en lugar de llamar los métodos pertenecientes al objeto de pantalla. Pero para los demás objetos de Pygame, primero creamos el objeto como una copia de un objeto de Pygame, dándole algunos atributos, y construimos nuestro objeto a partir de ellos. Con el fondo, primero creamos un objeto Surface de Pygame y le damos el tamaño de la pantalla. Luego realizamos la operación convert() para convertir la Surface a un formato de un solo píxel. Esto es obviamente necesario cuando tenemos varias imágenes y superficies, todas con diferentes formatos de píxeles, lo cual hace que su renderización sea bastante lenta. Al convertir todas las superficies (surfaces), podemos acelerar drásticamente los tiempos de renderizado. Finalmente, llenamos la superficie de fondo con color blanco (255, 255, 255). Estos valores son :firstterm:`RGB` (Red Green Blue), y se pueden obtener desde cualquier buen programa de dibujo. Con el texto, requerimos más de un objeto. Primero, creamos un objeto de fuente (font object), que define qué fuente usar y qué tamaño va a tener. Luego, creamos un objeto texto (text object) usando el método ``render`` que pertenece a nuestro objeto de fuente, suministrando tres argumentos: el texto que se va a renderizar, si debe tener anti-aliasing (1=yes, 0=no), y el color para el texto (otra vez en formato RGB). A continuación, creamos un tercer objeto de texto, que obtiene un rectangulo para el texto. La forma más fácil de entender esto es imaginando dibujar un rectángulo que rodeará todo el texto; luego se puede usar este rectángulo para obtener/establecer la posición del texto en la pantalla. En este ejemplo, obtenemos el rectángulo y establecemos su atributo ``centerx`` para que sea el atributo ``centerx`` del fondo (así el centro del texto será el mismo que el centro del fondo, es decir el texto estará centrado en la pantalla en el eje x). También podríamos establecer la coordenada y, pero no es diferente, así que dejé el texto en la parte superior de la pantalla. Como la pantalla es pequeña de todas formas, no parecía necesario. .. _hacerjuegos-2-3: 2.3. Blitting ------------- Ahora que hemos creado nuestros objetos de juego, necesitamos renderizarlos. Si no lo hiciéramos, y ejecutáramos el programa, solo veríamos una pantalla en blanco y los objetos permanecerían invisibles. El término usado para renderizar objetos es :firstterm:`blitting`, que es donde se copian los píxeles pertenecientes a dicho objeto en el objeto de destino. Entonecs, para renderizar el objeto de fondo, lo blitteamos en la pantalla. En este ejemplo, para simplificar las cosas, blitteamos el texto en el fondo (para que el fondo tenga una copia del texto en él) y luego blitteamos el fondo en la pantalla. Blitting es uno de las operaciones más lentas de cualquier juego, por lo que debes tener cuidado de no blittear demasiado en la pantalla en cada cuadro. Si tienes una imagen de fondo y una pelota volando por la pantalla, podrías blittear el fondo y luego la pelota en cada cuadro, lo que cubriría la posición anterior de la pelota y renderizaría la nueva pelota, pero esto sería bastante lento. Una mejor solución es blittear el fondo en el área que la pelota ocupó previamente, lo que se puede encontrar en el rectángulo anterior de la pelota, y luego blittear la pelota, para que solo estés blitteando dos áreas pequeñas. .. _hacerjuegos-2-4: 2.4. Evento en Bucle -------------------- Una vez que ya hayas configurado el juego, necesitás ponerlo en un bucle para que se ejecute cotninuamente hasta que el usuario señale que quiere salir. Asi que comenzás un bucle abierto ``while``, y luego por cada iteración del bucle, que será cada cuadro del juego, actualizas el juego. Lo primero es verificar cualquier evento de Pygame, que será el usuario presionando el teclado, clickeando el botón del mouse, moviendo un joystick, redimensionando la ventana, o tratando de cerrarla. En este caso, simplemente queremos estar atentos a que el usuario intente salir del juego cerrando la ventana, en cuyo caso el juego debería ``return``, que terminará el bucle ``while``. Luego, simplemente necesitamos volver a dibujar (re-blit) el fondo, y actualizar la pantalla para que todo se dibuje. Okay, como nada se mueve o sucede, en este ejemplo, estrictamente hablando no necesitamos volver a dibujar el fondo en cada iteración, pero lo incluí porque cuando las cosas se mueven en la pantalla, necesitarás hacer todo tu dibujado (blitting) aquí. .. _hacerjuegos-2-5: 2.5. Ta-da! ----------- ¡Y eso es todo - tu más básico juego de Pygame! Todos los juegos tomarán una forma similar a esta, pero con mucho más código para las funciones del juego real en sí, que tienen más que ver con la programación y menos estructurados por el funcionamiento de Pygame. Esto es realmente de lo que trata este tutorial y seguiremos adelante con ello. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/es/tutorials/tom_juegos3.rst0000644000175100001770000001322214676242340020774 0ustar00runnerdocker.. include:: ../../reST/common.txt **************** Dando Inicio **************** .. role:: citetitle(emphasis) .. _hacerjuegos-3: 1. Dando Inicio ================ Las primeras secciones de código son relativamente simples y, una vez escritas, pueden usualmente ser pueden reutilizar en todos los juegos que posteriormente hagas. Realizarán todas las tareas aburridas y genéricas como cargar módulos, cargar imágenes, abrir conexiones de red, reproducir música y así sucesivamente. También incluirán una gestión de errores simple pero efectiva, y cualquier personalización que desees proporcionar además de las funciones proporcionadas por los módulos como ``sys`` y ``pygame``. .. _hacerjuegos-3-1: 3.1. Primeras líneas y carga de módulos --------------------------------------- En primer lugar, necesitás iniciar tu juego y cargar tus módulos. Siempre es una buena idea establecer algunas cosas al principio del archivo fuente principal, como el nombre del archivo, qué contiene, bajo qué licencia se encuentra, y cualquier otra información útil que desees proporcionar a quienes que lo van a estar viendo. Luego puedes cargar módulos, con algunas verificaciones de errores para que Python no imprima una traza desagradable que los no programadores no entenderán. El código es bastante simple, por lo que no me molestaré en explicarlo.:: #!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) .. _hacerjuegos-3-2: 3.2. Funciones de manejo de recursos ------------------------------------ En el ejemplo :doc:`Chimpancé, Línea Por Línea `, el primer código que se escribió fue para cargar imagenes y sonidos. Como estos eran totalmente independiente de cualquier lógica de juego u objetos del juego, se los escribió como funciones separadas y se escribieron primero para que el código posterior pudiera hacer uso de ellas. Generalmente, coloco todo mi código de esta naturaleza primero, en sus propias funciones sin clase; estas serán, en términos generales, funciones de manejo de recursos. Por supuesto, también podés crear clases para estas funciones, para que puedas agruparlas y tal vez tener un objeto con el que puedas controlar todos los recursos. Como con cualquier buen entorno de programación, depende de vos desarrollar tu propia práctica y estilo óptimo. Siempre es una buena idea escribir tus propias funciones de manejo de recursos, porque aunque Pygame tiene métodos para abrir imágenes y sonidos, y otros módulos tendrán sus métodos para abrir otros recursos, esos métodos pueden ocupar más de una línea, pueden requerir una modificación constante de tu parte y a menudo no proporcionan un manejo de errores satisfactorios. Escribir funciones de manejo de recursos te da código sofisticado y reutilizable, y te da mayor control sobre tus recursos. Tomá este ejemplo de una función de carga de imágenes:: def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() Acá creamos una función de carga de imagen más sofisticada que la proporcionada por :func:`pygame.image.load`. Observen que la primera línea de la función es una cadena de documentación describiendo qué hace cada función, y qué objeto(s) devuelve. La función asume que todas tus imágenes están en el directorio llamado "data", por lo que toma el nombre del archivo y crea la ruta completa, por ejemplo ``data/ball.png``, usando el módulo :citetitle:`os` para asegurar la compatibilidad entre plataformas. Luego intenta cargar la imagen y convertir cualquier región alfa para que puedas lograr la transparencia, y devuelve un mensaje de error más legible si hay algún problema. Finalmente, devuelve el objeto de imagen y su clase :class:`rect `. Podés crear funciones similares para cargar cualquier otro recurso, como cargar sonidos. También podés crear clases de manejo de recursos para darte más flexibilidad con recursos más complejos. Por ejemplo, podrías crear una clase de música, con una función ``__init__`` que carga la música (quizás tomando prestada de la función ``load_sound()``), una función para pausar la música y otra para reiniciarla. Otra clase útil de manejo de recursos es para conexiones de red. Funciones para abrir sockets, pasar datos con seguridad y verificación de errores adecuados, cerrar sockets, buscar direcciones, y otras tareas de red, pueden hacer que escribir un juego con capacidades de red sea relativamente indoloro. Recordá que la tarea principal de estas funciones/clases es asegurarse de que para cuando llegues a escribir las clases de objetos de juego y el bucle principal, casi no haya nada más que hacer. La herencia de clases puede hacer que estas clases básicas sean especialmente útiles. Pero no te excedas, las funciones que solo serán utilizadas por una clase deben ser escritas como parte de esa clase, no como una función global. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/es/tutorials/tom_juegos4.rst0000644000175100001770000001761614676242340021010 0ustar00runnerdocker.. include:: ../../reST/common.txt ************************** Clases de objetos de juego ************************** .. role:: firstterm(emphasis) .. _hacerjuegos-4: 4. Clases de objetos de juego ============================= Una vez que hayas cargado tus módulos y escrito tus funciones de manejo de recursos, querrás pasar a escribir algunos objetos de juego. La forma en que esto se realiza es bastante simple, sin embargo puede parecer complejo al principio. Escribirás una clase para cada tipo de objeto en el juego y después crearás una instancia de esas clases para los objetos. Luego podés usar los métodos de esas clases para manipular los objetos, dándoles algún tipo de movimiento y capacidades interactivas. Entonces tu juego, en pseudo-código, se verá así:: #!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update() Por supuesto, esto es un ejemplo muy simple, y tendrías que agregar todo el código en lugar de esos pequeños comentarios entre corchetes. Pero deberías entender la idea básica. Creás una clase, en la cual colocás todas las funciones de la pelota, incluyendo ``__init__``,que crearía todos los atributos de la pelota, y ``update``, que movería la pelota a su nueva posición antes de blittearla en la pantalla en esta posición. Luego podés crear más clases para todos tus otros objetos de juego, y luego crear instancias de los mismos para que puedas manejarlos fácilmente en la función ``main`` y en el bucle principal del programa. En contraste con iniciar la pelota en la función ``main``, y luego tener muchas funciones sin clase para manipular un objeto de pelota establecido, y espero que puedas ver por qué usar clases es una ventaja: te permite poner todo el código perteneciente a cada objeto en un único lugar; hace que sea más fácil usar objetos; hace que agregar nuevos objetos y manipularlos sea más flexible. En lugar de agregar más código para cada nuevo objeto de pelota, podés simplemente crear instancias de la clase ``Ball`` para cada nuevo objeto de pelota. ¡Mágia! .. _hacerjuegos-4-1: 4.1. Una clase simple de pelota ------------------------------- Aquí hay una clase simple con el código necesario para crear un objeto pelota que se moverá a través de la pantalla, si la función ``update`` esa llamada en el bucleo principal:: class Ball(pygame.sprite.Sprite): """A ball that will move across the screen (Una peleota se moverá a través de la pantalla) Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) Aquí tenemos la clase ``Ball`` con una función ``__init__`` que configura la pelota, una función ``update`` que cambia el rectángulo de la pelota para que esté en la nueva posición, y una función ``calcnewpos`` para calcular la nueva posición de la pelota basada en su posición actual, y el vector por el cual se está moviendo. Explicaré la física en un momento. Lo único más a destacar es la cadena de documentación, que es un poco más larga esta vez, y explica los conceptos básicos del la clase. Estas cadenas son útiles no solo para ti mismo y otros programadores que revisen el código, sino también para las herramientas que analicen y documenten tu código. No harán mucha diferencia en programas pequeños, pero en los grandes son invaluables, así que es una buena costumbre de adquirir. .. _hacerjuegos-4-1-1: 4.1.1. Digresión 1: Sprites ~~~~~~~~~~~~~~~~~~~~~~~~~~~ La otra razón por la cual crear una clase por cada objeto son los sprites. Cada imagen que se renderiza en tu juego será un objeto, por lo que en principio, la clase de cada objeto debería heredar la clase :class:`Sprite `. Esta es una característica muy útil de Python: la herencia de clases. Ahora, la clase ``Ball`` tiene todas las funciones que vienen con la clase ``Sprite``, y cualquier instancia del objeto de la clase ``Ball`` será registrada por Pygame como un sprite. Mientras que con el texto y el fondo, que no se mueven, está bien hacer un blit del objeto sobre el fondo, Pygame maneja los objetos sprites de manera diferente, lo cual verás cuando miremos el código completo del programa. Básicamente, creas tanto un objeto pelota y un objeto sprite para la pelota, y luego llamás a la función update de la pelota en el objeto de sprite, actualizando así el sprite. Los sprites también te dan formas sofisticadas de determinar si dos objetos han colisionado. Normalmente, podrías simplemente comprobar en el bucle principal para ver si sus rectángulos se superponen, pero eso implicaría mucho código, lo cual sería una pérdida de tiempo porque la clase ``Sprite`` proporciona dos funciones (``spritecollide`` y ``groupcollide``) para hacer esto por vos. .. _hacerjuegos-4-1-2: 4.1.2. Digresión 2: Física de vectores ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Aparte de la estructura de la clase ``Ball``, lo notable de este código es la física de vectores utilizada para calcular el movimiento de la pelota. En cualquier juego que involucre movimiento angular, no se llegará muy lejos a menos que se esté cómodo con la trigonometría, así que simplemente introduciré los conceptos básicos que necesitás saber para entender la función ``calcnewpos``. Para empezar, notarás que la pelota tiene un atributo llamado ``vector``, que está compuesto por ``angle`` y ``z``. El ángulo estpa medido en radianes y dará la dirección en la que la pelota se mueve. Z es la velocidad a la que se mueve la pelota. Entonces, usando este vector, podemos determinar la dirección y velocidad de la pelota, y por lo tanto, cuánto se moverá en los ejes x e y: .. image:: ../../reST/tut/tom_radians.png El diagrama anterior ilustra las matemáticas básicas detrás de los vectores. En el diagrama de la izquierda, se puede ver el movimiento proyectado de la pelota representado por una línea azul. La longitud de esa línea (z) representa su velocidad, y el ángulo es la dirección en la que se moverá. El ángulo para el movimiento de la pelota siempre se tomará desde el eje x a la derecha, y se mide en sentido horario desde esa línea, como se muestra en el diagrama. A partir del ángulo y la velocidad de la pelota, podemos lograr calcular cuánto se ha movido a lo largo de los ejes x e y. Necesitamos hacer esto porque Pygame en sí no admite vectores, y solo podemos mover la pelota moviendo su rectángulo a lo largo de los dos ejes. Por lo tanto, necesitamos :firstterm:`resolve` (resolver) el ángulo y la velocidad en su movimiento en el eje x (dx) y en el eje y (dy). Esto es un asunto sencillo de trigonometría y se puede hacer con las fórmulas que se muestran en el diagrama. Si has estudiado trigonometría elemental antes, nada de esto debería ser nuevo para vos. Pero en caso que seas olvidadizo, acá hay algunas fórmulas útiles para recordar, que te ayudarán a visualizar los ángulos (a mi me resulta más fácil visualizar los ángulos en grados que en radianes. .. image:: ../../reST/tut/tom_formulae.png ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/es/tutorials/tom_juegos5.rst0000644000175100001770000001622514676242340021004 0ustar00runnerdocker.. include:: ../../reST/common.txt ************************************* Objetos controlables por los usuarios ************************************* .. _hacerjuegos-5: 5. Objetos controlables por los usuarios ======================================== Hasta ahora puodés crear una ventana de Pygame y renderizar una pelota que volará por la pantalla. El siguiente paso es crear algunos bates que el usuario pueda controlar. Esto es potencialmente más simple que la pelota, porque no requiere física (a menos que el objeto controlado por el usuario se mueva de manera más compleja que hacia arriba y abajo, por ejemplo, un personaje de plataforma como Mario, en cuyo caso necesitarás más física) Los objetos controlados por el usuario son bastante fácil de crear, gracias al sistema de cola de Pygame, como ya verás. .. _hacerjuegos-5-1: 5.1. Una clase simple de bate ----------------------------- El principio detrás de la clase de bate es similar al de la clase de pelota. Necesitás una función ``__init__`` para inicializar el bate (para que puedas crear instancias de objeto para cada bat), una función ``update`` para realizar cambios por cuadro en el bate antes de que sea blitteado en la pantalla, y las funciones que definirán lo que esta clase realmente hará. Aquí tenés un ejemplo de código:: class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" Como puedes ver, esta clase es muy similar en estructura a la clase de la pelota, pero hay diferencias en lo que hace cada función. En primer lugar, hay una función "reinit", que es utilizada cuando una ronda finaliza y el bate debe volver a su lugar de inicio con cualquier atributo establecido de vuelta a sus valores necesarios. A continuación, la forma en que se mueve el bate es un poco más compleja que con la pelota, porque acá su movimiento es simple (arriba/abajo), pero depende de que el usuario le diga que se mueva, a diferencia de la pelota que simplemente sigue moviéndose en cada cuadro. Para entender cómo se mueve el bate, es útil mirar brevemente un diagrama para mostrar la secuencia de eventos:: .. image:: tom_event-flowchart.png Lo que sucede aquí es que la persona controlando el bate presional la tecla que mueve el bate hacia arriba. Para cada interación de el bucle principal del juego (para cada cuadro), si la tecla sigue presionada, entonces el atributo ``state`` de ese objeto de bate se establecerá en "moviendose" y se llamará a la función ``moveup``, lo que hará que la posición 'y' de la pelota se reduzca por el valor de atributo ``speed`` (en este ejemplo, 10). En otras palabras, mientras la tecla se mantenga presionada, el bate se moverá hacia arriba de la pantalla en 10 píxeles por cuadro. El atributo ``state`` no se utiliza aquí, pero es útil saberlo si estás tratando con giros o si deseas obtener alguna salida de depuración útil. Tan pronto como el jugador suelte la tecla, se invoca el segundo conjunto de cajas y el atributo ``state`` del objeto de bate se establecerá de nuevo en "still" y el atributo ``movepos`` volverá a establecerse en [0,0], lo que significa que cuando se llame a la función ``update``, ya no movera el bate. Así que cuando el jugador suelta la tecla, el bate se detiene. ¡Simple! .. _hacerjuegos-5-1-1: 5.1.1. Digresión 3: Eventos de Pygame ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Entonces, ¿cómo sabemos cuándo el jugador está presionando teclas y luego las suelta? ¡Con el sistema de cola de eventos de Pygame, tontuelo! Es un sistema realmente fácil de usar y entender, así que esto no debería llevar mucho tiempo :) Ya has visto la cola de eventos en acción en el programa básico de Pygame, donde se usó para verificar si el usuario estaba cerrando la aplicación. El código para mover el bate es tan simple como eso:: for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still" Aquí se asume que ya has creado una instancia de un bate y has llamado al objeto ``player``. Podés ver el familiar diseño de la estrictura ``for``, que itera a través de cada evento encontrado en la cola de eventos de Pygame, que se recupera con la función :mod:`event.get() `. A medida que el usuario presiona teclas, pulsa botones del ratón y mueve el joystick, esas acciones se bombean en la cola de eventos de Pygame, y se dejan allí hasta que se traten. Así que en cada iteración del bucle principal del juego, se pasa por estos eventos, comprobando si son los que se desean tratar, y luego tratándolos adecuadamente. La función :func:`event.pump() ` que estaba en la función ``Bat.update`` se llama entonces en cada iteración para eliminar los eventos antiguos y mantener la cola actual. Primero verificamos si el usuario está saliendo del programa, y lo cerramos si es así. Luego verificamos si se está presionando alguna tecla, y si lo están, verificamos si son las teclas designadas para mover la paleta hacia arriba y hacia abajo. Si lo son, llamamos a la función de movimiento correspondiente y establecemos el estado del jugador adecuadamente (aunque los estados moveup (moverarriba) y movedown (moverabajo) se cambian en las funciones ``moveup()`` y ``movedown()``, lo que hace que el código sea más ordenado y no rompe la *encapsulación*, lo que significa que se asignan atributos al objeto en sí, sin referirse al nombre de la instancia de ese objeto). Aquí notamos que tenemos tres estados: still (quieto), moveup (moverarriba), movedown (moverabajo). De nuevo, estos son útiles si se quiere depurar o calular giros, efectos de rotación. También verificamos si alguna tecla ha sido "soltada" (es decir, que ya no está siendo presionada), y nuevamente, si son las teclas correctas, detenemos el movimiento del bate. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/es/tutorials/tom_juegos6.rst0000644000175100001770000003466714676242340021017 0ustar00runnerdocker.. include:: ../../reST/common.txt ******************** Juntando Todo ******************** .. _hacerjuegos-6: 1. Juntando todo ================ Hasta ahora has aprendido todo lo básico necesario para construir un juego simple. Estás en condiciones de entender cómo crear objetos de Pygame, cómo Pygame muestra objetos, cómo maneja eventos y cómo pódes usar física para introducir algo de movimiento en tu juego. Ahora simplemente te mostraré cómo podés tomar todas esas partes de código y juntarlas en un juego funcional. Lo que necesitamos primero es permitir que la pelota golpee los lados de la pantalla, y que la paleta pueda golpear la pelota, de lo contrario no habrá mucho juego involucrado. Hacemos esto utilizando los métodos de colisión de Pygame: :meth:`collision `. .. _hacerjuegos-6-1: 6.1. Dejá que la pelota golpee los lados ---------------------------------------- El principio básico para hacer que rebote en los lados es fácil de comprender. Se obtienen las coordenadas de las cuatro esquinas de la pelota y se comprueba si corresponden con la coordenada x o y del borde de la pantalla. Por lo tanto, si la esquina superior derecha e izquierda tienen una coordenada 'y' de cero, sabés que la pelota está actualmente en el borde superior de la pantalla. Se hace todo esto en la función ``update``, despue´s de haber calculado la nueva posición de la pelota. :: if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z) Aquí comprobamos si el ``area`` contiene la nueva posición de la bola (lo que siempre debería ser así, por lo que no necesitamos una cláusula ``else``, aunque en otras circunstancias podríamos considerarla). Luego verificamos si las coordenadas de las cuatro esquinas están *colisionando* con los bordes del área, y creamos objetos para cada resultado. Si lo están, los objetos tendrán un valor de 1 o ``True``. Si no, el valor será ``None`` o ``False``. Luego verificamos si ha chocado con la parte superior o inferior, y si lo ha hecho, cambiamos la dirección de la pelota. Afortunadamente, usando radianes podemos hacer esto simplemente invirtiendo su valor positivo/negativo. También comprobamos si la bola se ha salido de los lados, y si lo ha hecho, llamamos a la función ``offcourt``. En mi juego, esto reinicia la bola, agrega 1 punto al puntaje del jugador especificado al llamar la función y muestra el nuevo puntaje. Finalmente, recompilamos el vector en función del nuevo ángulo. Y eso es todo. La pelota ahora rebotará felizmente en las paredes y saldrá de la cancha con gracia. .. _hacerjuegos-6-2: 6.2. Let the ball hit bats -------------------------- Hacer que la pelota golpee los bates es muy similar a hacer que golpee los lados de la pantalla. Todavía usamos el método de colisión. Todavía usamos el método de colisión, pero esta vez comprobamos si los rectángulos de la pelota y cualquiera de los bates colisionan. En este código también he agregado código adicional para evitar errores. Descubrirás que tendrás que poner todo tipo de código adicional para evitar errores y problemas, así que es bueno acostumbrarse a verlo. :: else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) Comenzamos esta sección con una declaración ``else``, porque esto continúa desde el fragmento de código anterior, para comprobar si la pelota golpea los lados. Tiene sentido que si no golpea los lados, podría golpear el bate, por lo que continuamos con la declaración condicional. El primer error a corregir es reducir el tamaño de los rectángulos de los jugadores en 3 píxeles en ambas dimensiones, para evitar que el bate atrape una pelota que pasa detrás de ellos (si imaginás que simplemente mueve el bate para que la pelota viaje detrás de él, los rectángulos se superponen, y normalmente la pelota habría sido "golepada" - esto lo evita) A continuación, comprobamos si los rectángulos colisionan, con una corrección adicional de errores. Observá que he comentado sobre estas partes extrañas del código: siempre es bueno explicar las partes del código que son anormales, tanto para otros que miran tu código, como para que lo entiendas cuando regreses a él. Sin la corrección, la pelota podría golpear una esquina del bate, cambiar la dirección, y un cuadro después, aún encontrarse dentro del bate. Luego, volvería a pensar que ha sido golpeada, y cambiaría su dirección. Esto puede suceder varias veces, haciendo que el movimiento de la pelota sea completamente irreal. Por lo tanto, tenemos una variable, ``self.hit``, que la establecemos en ``True`` cuando ha sido golpeada y ``False`` un cuadro después. Cuando comprobamos si los rectángulos han colisionado, también verificamos si ``self.hit`` es ``True``/``False``, para evitar rebotes internos. El código importante aquí es bastante fácil de entender. Todos los rectángulos tienen una función :meth:`colliderect `, en la que alimentas el rectángulo de otro objeto y devuelve ``True`` si los rectángulos se superpone, y ``False`` si no lo hacen. Si se superponen, podemos cambiar la dirección restando el ángulo actual de ``pi`` (de nuevo, un truco útil que podés hacer con radianes, que ajustará el ángulo en 90 grados y lo enviará en la dirección correcta; podrías encontrar en este punto que es necesario una comprensión detallada de radianes.) Solo para terminar la comprobación de errores, cambiamos ``self.hit`` de vuelta a ``False`` si es el cuadro por le cual fueron golpeados. También volvemos a compilar el vector. Por supuesto, querrás eliminar la misma línea en el fragmento de código anterior, para que solo lo hagas una vez después de la declaración condicional ``if-else``. ¡Y eso es todo! El código combinado ahora permitirá que la pelota golpee los lados y los bates. .. _hacerjuegos-6-3: 6.3. El producto final ---------------------- El producto final, con todos los fragmentos de código unidos, así como algunos otros fragmentos de código pegados juntos, se verá así:: # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initializar pantalla pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initializar jugadores global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initializar pelota speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initializar sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blittear todo en la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Initializar reloj clock = pygame.time.Clock() # Bucle de eventos while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main() Además de mostrar el producto final, señalaré de vuelta a TomPong, en el cual se basa todo esto. Descargalo, échale un vistazo al código fuente y verás una implementación de pong utilizando todo el código que has visto en este tutorial, así como también un montón de otros códigos que he agregado en varias versiones, como física adicional para girar y varias otras correcciones de errores y fallas. Ah, TomPong se encuentra en http://www.tomchance.uklinux.net/projects/pong.shtml. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9961257 pygame-2.6.1/docs/generated/0000755000175100001770000000000014676242436015313 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612182.1091366 pygame-2.6.1/docs/generated/.buildinfo0000644000175100001770000000034614676242426017271 0ustar00runnerdocker# Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. config: 5e1fe4f66e4d6170047d743ec7088e5e tags: 645f666f9bcd5a90fca523b33c5a78b7 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/generated/LGPL.txt0000644000175100001770000006347614676242340016624 0ustar00runnerdocker GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0011258 pygame-2.6.1/docs/generated/_images/0000755000175100001770000000000014676242436016717 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedInputOutput1.gif0000644000175100001770000001302114676242340023424 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihl뾰tmx|04Ȥrl:P\1JZجv5NxL.϶/*h|NǪʷ(w)Oz" G'  + ) "'% Ҿ 0 ѹ|  .ԡ ]޽ǰC0!&bEDHr+mT?GQ:j#HU/Q(x]sܹEnHdɣ#Kdr㚞l4 4-|ׯ`s6 8|zզiJwգW%dAװ >1VhA};Ԏ"J]\ CP*#ˑ\.fa</8jrͼuskK^^4/ޖ Ν;qM>1sNiGo={u0 D?lQVmatE|zeoE(a6>S E!U1etyxۈj"lY}LD$̘aFLHJ%k@XJFZΧ PFI=Ţ-J@PY\)W^ihRflk)tjWa݉`jA蒈6(XZFVjWv<0,駨^竮$ j+=$}Q:B!&Šl^Bl*gѢX"q-Ϻm=A(֫&ہXI*'L 7 G܋Wl_=qdd .(&r$뭬) \ɛJ"dni<:HC.3 {T]*\'5Ks٢œ$ݢx^FwܫUb}{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@ꙏs7R;yF"tZtE+2S-ڳ#WeHT}ed|ec(j&"bsU X=K5 rr|yWukS,Ҙ+# {X+V:|#iJ+R0M|3G3_5ZT. ߔ57]СRYΨԌq{MݒKѐMXN&ÎJNr(43Q2[]zml)^e5\"k.].zhhyyw͹4jh"%x}nigH8DUO]f&诪Kk]~s;[N4L פQFd\9<鲦үY4tie~&e2H tbD' u"bθ5;?4ݱ1nY/y$bUm &dLW~e _]㤷mF=wDD`@ A*ta l!ȁK"$Zt)aF+e|hbF+nD%Ž-KIjFnՊ3N^#zZV٭?fIԍê<$BR{vqfӈ:?JHS͛#s]v'k+ErY1Hw>M|FenJO-'Tvn]f E-p"џ$#q6>xu6߫kա%|4Q7--JӧOVx4x*ƾO:[;*(=FKBe5'cδ'*l4 D F"3jOqlS3NE̱RѶQG I=._ +j VߊMB8uPE gL7cZm U(k7>!{E}WĶ쫕Y8ly&Ha\@ T\ҠvÖ"9چ,ycjN;T5c:%7sվ v֢@NgtkZõJX3+UJU'ԚA+ϣk5? ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_images/AdvancedInputOutput21.gif0000644000175100001770000021505114676242340023515 0ustar00runnerdockerGIF89a}p! NETSCAPE2.0!,}{{{B:B{{)))))kccckRJJ!JZ{ZZ{{Z{ZΌZZZJΌZJkZkcRRBZB:ZZccZ)ZZZ))ZZ)ZZZZZZZJZJZBJBB{))sJcJsJέ{Z{1c)ZZΥތB)JZs)Z{ZsZ)sZZ楔ZJZZZsZZޥRBޔZZJ)ZZZR:1c1cZRJŜZZc:)JZֵkZkZcccZZZBBBZZ:):JZťZťńZ!!ZńZ:Zc:)){Ό))JΌ){ΌJΌ11cZ))))))))))))))):::εkŔB{1B1B{c{c{))c)JcZBck{ZŔccRRR{Z{Z{{{ŵބZ)BBZ{{:{{BJBH*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳG3W|IѣH*]j ]r13%RLj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=wDD`@ A*ta l!ȁK"$Zt)aF+e|hbF+nD%Ž-KIjFnՊ3N^#zZV٭?fIԍê<$BR{vqfӈ:?JHS͛#s]v'k+ErY1Hw>M|FenJO-'Tvn]f E-p"џ$#q6>xu6߫kա%|4Q7--JӧOVx4x*ƾO:[;*(=FKBe5'cδ'*l4 D F"3jOqlS3NE̱RѶQG I=._ +j VߊMB8uPE gL7cZm U(k7>!{E}WĶ쫕Y8ly&Ha\@ T\ҠvÖ"9چ,ycjN;T5c:%7sվ v֢@NgtkZõJX3+UJU'ԚA+ϣk5? ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedInputOutput3.gif0000644000175100001770000001422614676242340023436 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihlp,tmx|pH,Ȥrl:ШtJZجvzxL.zn|N~X NDi1 8V) 0T%ƾ(Rʢ"$Qҝ  﫷t= wԵB@"L` Ub8r MhF Ph HcUM/kNwSM*{yCU Tu2$% tjzF`K`s ʕה]4kQumKm^}sY u~wY} Voc~Ky ^7B?O,lTV}+O`$ZEfXl^YOsv5a Ԏ_p db}6e雇w6οU'3Cn;t^yf_fʥrIdXv-%TywHiP{ SU3tWܹd#q$.ȝwlT]G2%YѸX-rASJd`3[fy#`p聄a 2GfL ~tix|'% h&۟&ɂ&*i h0Bzؤ.^N]D;|C偼!tI3%Z Eq ,:Ҫl e[ոXJf̱34Kܳ=I6'."! v>8۹u!|ٮ+ rۣymYY0pW\+tWNۡb -n"7A{s @NUE$D]$`GvC ]Tj DgRZ;6pxha8:nю6DE}XdlmvJFVkdM3?z~&~%7JV{#*V@]D(ip`^1f:Ќ!\b*$֯rOQm2fAaT(TApA>9 dz;@Χ`xrkr,gȱaC 23~G=Cѭ3u'tO~u,&c Ϣb?AZD=Îֆd[6#f^$if)j툊T`*U Luj<$v[N'+ЎMV3cmfZujK1 vmpڶ]nN)TÌd+n߼>-]<ػ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ÃS8L`$1;%ˌ|k#f˜LyȏO`Cdj?BNۄIE,|NҎܗ>M"9mvL䞷̬?Mp gzv?1#3z)]Й2oL蘎]1,ZE>1?Эo=F܌}rKܾjd4H}OFծ+BM^EMHqRΗ [kԵ;ϣ9 kͻ`(difDg+ʰJ[<GȤr~'sJ:֨+Mb^w,}zn|N~z 6 QU:QAf*c7a<f!E(ӽ$3"Mɿ΅Yö2g(׳W' C FJԹ\*\+Ar*ưŋBCGc5]2+3ɗ0c1i eM{,<ѣHcm2h-ʒJ4.^`IׯmKٳhӪ]˶۷pʝK.b+Dݿq +H+iaz[LPÇM &lɲY7Ռ3iШS_L1}U˞=a$*M wgS7n)|k_^y<aN)W81DcN饩-y謵=KO'h& 6F(Vhfv ސ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_images/AdvancedInputOutput31.gif0000644000175100001770000001422614676242340023517 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihlp,tmx|pH,Ȥrl:ШtJZجvzxL.zn|N~X NDi1 8V) 0T%ƾ(Rʢ"$Qҝ  﫷t= wԵB@"L` Ub8r MhF Ph HcUM/kNwSM*{yCU Tu2$% tjzF`K`s ʕה]4kQumKm^}sY u~wY} Voc~Ky ^7B?O,lTV}+O`$ZEfXl^YOsv5a Ԏ_p db}6e雇w6οU'3Cn;t^yf_fʥrIdXv-%TywHiP{ SU3tWܹd#q$.ȝwlT]G2%YѸX-rASJd`3[fy#`p聄a 2GfL ~tix|'% h&۟&ɂ&*i h0Bzؤ.^N]D;|C偼!tI3%Z Eq ,:Ҫl e[ոXJf̱34Kܳ=I6'."! v>8۹u!|ٮ+ rۣymYY0pW\+tWNۡb -n"7A{s @NUE$D]$`GvC ]Tj DgRZ;6pxha8:nю6DE}XdlmvJFVkdM3?z~&~%7JV{#*V@]D(ip`^1f:Ќ!\b*$֯rOQm2fAaT(TApA>9 dz;@Χ`xrkr,gȱaC 23~G=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]{y\6̑XxSJagO ߨrxW`$㧪EX}4Q|ƍjsj&sH<6gb]5kȻ S;4i%o 2HpIOnI]Iǵn9LqUy\- A2v6#MIbQ7h~=Iwhx fO2$P/ѕhDHun;]>_Mܘ=LJ4"QkE)eXg, $X,B!N\ŇZ\("G!/6xQ!F ;NT)reKa2XR͘8sdAMiQNJ%2\iqkH^H&JborrZ8=Tuҭ^XxY"gz>{`?C+.<=k[޸+/,omB JWqq5Rrמr'-m[4! ,S@-xA f0P aM(BP)UؕYj q&ӁOzT NQHG&D 4ՌƮi(rSbR5ϋJd2B-2i<#<'ihF1{Tr, e;h#հ#iE U2TRC WH 1~h"/mFELN^TLlyK;.RHb6F+9vq[*WԱ'$ ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_images/AdvancedInputOutput41.gif0000644000175100001770000007100114676242340023512 0ustar00runnerdockerGIF89ayp! NETSCAPE2.0!,y{{{{ス::B:::ZZJZ:ZZZZc)c))Z))cބZccZcccΥZcZR:R1ބZZZZkZZ)ZZZcZZkZZ)΄ZZJZZcZZJZZ)c!Z)ZZ{c!)ZZ))))Z))ΔZRcZZZZkcRΥRZ!:sc:B:ccBBBBBZZ)cRcRRcZZZZZkc:{ZZZ)):Zc{)!{ZZJB:{ZZ:B{:J:JccBZZΥZZΥZZZZ΄Z΄ZB1c1Bc1Z:Bc:):))c):c:ŭ:{1)1s:k:k)c)1B))Υ΄Μ挥步)k))c))c)cΥΥ)J)ccŌŜJZkJZ!{Z{Z{{){{:H*\ȰÇ#JHŋ3jȱLJ2[@֒(S\ɲ˗0cӱa2%kϟ@ JLR 3t)PJJXʑA.4jاM6eJ1շpʝ0wH%2թӨNFs(|0@`">x 5K颣+@$& iS&$fX(ɱ 8gZ!У\-d$?\BSSEgTpaWP^ HfL+@6$ڔ^ODFm<%t6\rz?_OProPpt(mh.nUA3r@ <%(adu-NyKF4(A@)@q 3E7D $I(%r 0 '(蠄fu3>P@C<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ѡǩ4= 8Ҙ\Fl;e40'(qPUHn{ѦF?~1PG9\S;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedOutputAlpha1.gif0000644000175100001770000003510314676242340023357 0ustar00runnerdockerGIF89aa*p! NETSCAPE2.0!,a*w0I8ͻ`(dihlp,3lx|pH,ZjƤrl:ШtJ ؕ rx</ڧ^d 2A 1m {*uw`|0 \( &i%X&*Ճ0`5HgG^–A4z/ ӥo3jȤX=>g 82ɕ^.h*(aPf**0X]`REJtS/NN{}8Kv BӀ̔.MܻxMt;oN1!JQæ[Y-cƐY%X`-+˹g:k-8 ;ι`Ԫcm 5յ [6lYr螺s;aăУKwPi3ƭWڧN.^xx{:DU]h$}$M3)(K8q n(}PbNmx~Ar\i!n\$M_08΀ c}#vKad3ˇXf-JXf ]G6lIP)zG.iߜiؓ!R$$`%.j)蠜pyu]uRhdg]lj)`FbLr]uˇuVXk5)jAwwݺ.Q%Ᵽ'be+)eTb?WjQxdH%j>6_A(+4NkO< [հV!%JO&r,"\gׂ 0H7U&l /tq>$S(r+0K!gRQp83D DZ3LPtC/ާ~U׼ZwI?5HmL:8k 'HIPm*J-30h4*D&MJQJѽFkUz!4P:*Mv$: ` O0)lad "*{DyDy)-} T1sa8#.~CiRwkodHQL@7a*Sy:r!ӗXH&e2 e6YorWyav"Ҭ&pi6/pPr 8IMjgD9s5=AOW~}Tu*'19-6oNIPGCY=ݑY:W[thfʸ&tGPuSvpM΍Yӥ57{N4u^{UMok,#ftSLw Vx~?]5qP 7ҿ#AƳݓ3ڔ\>Q=m^O(\ VUB%6߬\2gi̤v+㦺1^߭#B(.v^]_v}gv*msRkTj_!˽헯*5K3G\>zэ?M^b$YޭR_*mi_eO{|rpo>f`o #97]^Ca~]o9Q}fci<#?,'y]`| fgfv hc&p"apcftzRgPcc8kbRfkac6ez`nwGZ, fn6VmGpsvrh%|&pVnhFmInLHRN<^TRH\.dP[cn^g+ej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ؘc>PHYNٞEd(n@Qi+**ª&({ 9b&Zjɦ/:꭬ '| Y U^y'믑i`:{n)B+NNv!ަU6sIrՃWoi %pWgD $_1Rp^,rV)`4^f|5l4rCl(@c. ΞGWYfӍN=\'fbVHD٭dڰZ)t3[ ]]^Lp6zTT.D! {<b2c~ywꃨ +q}oS'unm{ PYʭ؀|M-gʲ0opgEw /zouot%_K߳#$3%oJYL8{E=L\?!0hOh5 69)vx0o)aJJ L E2| )B1Lv#6Xa讀&J$B~.!iSdwDďȋ !ר0i*D#Xf}(/5Ekd,x5ntxkTƱ*$<lq‚0=2?%$͑sĤPiN#*?pSqgO٣=h#) 4DiDR(ԝ-Ǚ̇r4~%fvMF9WÔ2tK{S͔Y(E5"u 4O Z lVj&kJjT4`KE89dWxnGdgQ)Ue6U((ui{*ZyTi8B&_97͂'UjX xr>;h ~i [Fΰ-P {aV%>H-~x<5//>2j,"FN2f&߅NrY,*VLb7Fղ߼5fbNB9gjȌ_¾Yx}\ϤbtݰO F6:&VA?dUҠf۽S=:Cjz}ryYUGոZږfsW6H꽒4%K}g|]WmecՎе+hGǕۡuT{}Y?v0v.'Xmi7P^HP:N3!|[´h7A8'N S⏰8y1hNj򎏼(GW^axF,?IX!,M;\}e*s߷>zw:;nŶ-']K4xYlm5]?0գ9s:SmmGyJ7J Rhv {/?mi~Mn-dzРEƉvg GLz@^^x[u>IR5trE[ Y$A^X+P7w= gקׯGR>/_͌^5A_c?9U]5{|חE?b? g~SQ|hi xyD~7k57v,_.sWW|68~<(!];WDDBE5hJxK37zlFaDU&[c\h4|awWdXNp}v8Gdh%hVt!9.Ry6z;e yRW`4n7Z<ȆF%Zz`t燉~Z98F9U5{yywFWcYXPĈIh"]gٟ_' Jr4ʛ% D<Оd.HHX~I i:G_!:@z{VZ (xZY^]b:a:fezcjlڦ[;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/AdvancedOutputAlpha2.gif0000644000175100001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H3H4IUrgW tZ7W%zis$<]{T(|̪!>K:FtVe*X2G[M8D25ua u&qw7tt* eZ7BvGZCzAms@'߇p&`}M'p&&&ǵei#a(T< OY\"w>.,ΜX KFz%AEB#A}A$fW3DtYIurksErCHQaGuVSk۷k?!S}VOw|&= CaHNW'4CosHpnt.upv{+h~.#.N瀎3#%p<~$ڇh4( Ɂ9yp>akBVuꑁ;255o>=$7EebvQl@?5奶h1Q8tku)80t~WtE +kihQ5zx[M燘x;Y16V@~.zIGS7]~!!4JjE4x&ROK6<3ۧ4P74yгL5 ZM&C9 X0IJ/A ˞#:(#T䗫p)倌!Z\6%ԛąqs^O"G~+ 1Hc-tG] Lrc-S2E.jtGّ邛&1yBHv!SOSSۡ8Q!&qRsvC:,WLY{ L[U0JZ[τ*mz#i)K(,`|%&E ӭȉ:;u֩WkD`)6(eݩ*f i^z]X邚l98ӻ~_ \9iɌsaN͋Tͅ|͆,x \P6Ɔ"D9Q`+5U'ؿb !ZigV~mppb(-O@"ḁ!frސZ)[Ϣ|)- -2sPǮ0%Z>lb0DbP)"̈ľ3DTP@hk=5hl*4rV2ldO @$).꾑CH*%c(;.܎;K MK;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_images/AdvancedOutputAlpha21.gif0000644000175100001770000021421314676242340023442 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,{{{{111kkksRkkkcRkZkRZ:ZZ挌RR111skR1:!R:!!R:ZZ):){ZkZZsRZZ:RRZZc:ckRkZc1R:νZkR!)ZRsZRZZZ歭RZZZZ:ZRZZZZ歄)cR1R)cRRccRR1J)Z1ZscckZZR:R:s!RZZZZBsZJZ11:csR)c:)挌R)k){B:挌RkέέZZZZ{ΌZZZZ))ZΜΌZ)){)1Z)11{攭1Bk޽޽csB:)k)k)歭R)Z)Z)k)s)R)c:)Jk歭R)Z)Zk)s)R1)c:Jk浥֔sνsB1)sc:ŭ{s1{{s1!1{{s{H*\ȰÇ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] Lrc-S2E.jtGّ邛&1yBHv!SOSSۡ8Q!&qRsvC:,WLY{ L[U0JZ[τ*mz#i)K(,`|%&E ӭȉ:;u֩WkD`)6(eݩ*f i^z]X邚l98ӻ~_ \9iɌsaN͋Tͅ|͆,x \P6Ɔ"D9Q`+5U'ؿb !ZigV~mppb(-O@"ḁ!frސZ)[Ϣ|)- -2sPǮ0%Z>lb0DbP)"̈ľ3DTP@hk=5hl*4rV2ldO @$).꾑CH*%c(;.܎;K MK;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/AdvancedOutputAlpha3.gif0000644000175100001770000007325414676242340023372 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,{{{ŽB!{sc)1ZJcc)潄k1ZZZJJZJJJJB:BB:ckc)cJcZJcZZs!B)J1kk{RZ{R{{k1ccJJJJZk!sc޵1::{1{c{{c{νRkcJJJ1{{cJJJ{Rε޵kRR)k)ތk)kŜ)Ŝ޵{R1{1{޵JRJތJJŜŜνk1{1)JR)Jޜ)JZkތRRsZck))Zck){ZέZJJcRB)!1ŜRkZ)Z1kZ)Z1k)k)k)JJZZJZZJJJ)JkZ)ZkZ)Zk)k)kJJZZJZZJJJJ{B1cRR)Ŝ1R)޵RRBRJss{1JZBJJR1){s:s1ބ{k{H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cԸ`VY͛ɳϟ@ J(y…'B&3JիXjzR^Z|dw%Zvr]˶۷p㒌άy|x3 LA#f^D1 3k̹j=dk8RLʣIFPVQ= NCMyI@1QFz4~!7p@:vQt]~|4<9WH~8 Ωf`C^& 0E} %DoS},44 E08樣F5,Wr(A7N4 䑇#K*9vD跐<q9@AV~yFظlPs-8R (`8L@AnTчBh<T"(((@,.P~." }  ,^ 5 RhR DQ P@>afͲ:"g'7'O}(к5kPOP),OJ@V(.j5YNjG' ,pߨzegLt_J<ij أI8Ģ :P@rylНMl"3ģ _L`TƃZZ_ tKj< *F_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# n#K#v墢1ʠ[[ueU>Z"?YTq5*.A2D6C:B7"W7ՕרZ Y*.`dGZ=H>NVYɪ AuTݵ#n NHH"$PD QbV@Zi"eF&D0*ZR%XD$eEfZUE ]g-Oee[ D"#ar-9Pra"%[0f[Z\g IxAjWB^TV#fffHfU4zR&&prcphq^ J2bqVl6LF&g82'9fWjL'=h%>cJxV' [@zᴤg |nwK^w "wv&(SB>(g^I`|2 M&KhJ.(:~jF(hm$ng}ryAz h6}=)ƗNzU `XZ) !Mb : RaScᅆԙiqru~]ũN*<`iY))&!ZRRՎriʅPzaVDovDP ~6jiy⢪ŨRNxX-}a説Zª".j*+F>a~Ų^+!ev}+<~+ūV+bR%rR¨$.,9,>6,NNT6Be.{yFjA'VV\BMkm nQ$z@ :.m2UNHnW%9M鈦rnnB?9amYnbeVݨn]vMn. 5oJ/V[*":/+`NԬ^Zn/Y\9rMA2.(ںzY8mv0מK&fn.=NcCK+h,~06o1Y΢0=l, 7 [k0 0q0p nl=*~ 'xhz.1R$+'b*mZ傞~1c,1mΖq3V\.S^:pqn"ϭso;9pW!Gg2ovu#Or1@@bDog&(+1)3f[:dz+_,;Z2/b$Kr/F%/:Qn'?.r232VFJJf#Wݯ^3ݎ# "_639!K4w}ܳ3wl<&!Y&:q@1tAAcHC^ ?DDc EW4D;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess11.gif0000644000175100001770000003711714676242340024040 0ustar00runnerdockerGIF89a1p! NETSCAPE2.0!,1𙙙wI8ͻ`(dihlp,tm߶:G $ryl*̧4JZ*vf\7Lrn[x8 H*O@E\Hŋ3j4É҂@nIɓ(u|hMdʗ0cʜI3Jm.kɳO|7'XhрT4рLsZGCYo?Tv \˶hARx:ܻB+< ٬0aϞPXpo#KLC\z"m9f }N5x4dib b5iԦ+˞M塟ZY.ֱYs7pj%Xn_3wlcdSgDxG_Ͼ=x=tؤş_{yh[^v 7wU4H v([]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U9!!$m5'X$#P"SuŢ,6Kt"|U Pǔ[ejBq<0-%Sc2UL#KY 6.P.ۧ# n#K#v墢1ʠ[[ueU>Z"?YTq5*.A2D6C:B7"W7ՕרZ Y*.`dGZ=H>NVYɪ AuTݵ#n NHH"$PD QbV@Zi"eF&D0*ZR%XD$eEfZUE ]g-Oee[ D"#ar-9Pra"%[0f[Z\g IxAjWB^TV#fffHfU4zR&&prcphq^ J2bqVl6LF&g82'9fWjL'=h%>cJxV' [@zᴤg |nwK^w "wv&(SB>(g^I`|2 M&KhJ.(:~jF(hm$ng}ryAz h6}=)ƗNzU `XZ) !Mb : RaScᅆԙiqru~]ũN*<`iY))&!ZRRՎriʅPzaVDovDP ~6jiy⢪ŨRNxX-}a説Zª".j*+F>a~Ų^+!ev}+<~+ūV+bR%rR¨$.,9,>6,NNT6Be.{yFjA'VV\BMkm nQ$z@ :.m2UNHnW%9M鈦rnnB?9amYnbeVݨn]vMn. 5oJ/V[*":/+`NԬ^Zn/Y\9rMA2.(ںzY8mv0מK&fn.=NcCK+h,~06o1Y΢0=l, 7 [k0 0q0p nl=*~ 'xhz.1R$+'b*mZ傞~1c,1mΖq3V\.S^:pqn"ϭso;9pW!Gg2ovu#Or1@@bDog&(+1)3f[:dz+_,;Z2/b$Kr/F%/:Qn'?.r232VFJJf#Wݯ^3ݎ# "_639!K4w}ܳ3wl<&!Y&:q@1tAAcHC^ ?DDc EW4D;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess2.gif0000644000175100001770000000351414676242340023752 0ustar00runnerdockerGIF89aGp! NETSCAPE2.0!,GJJBkRBJJJRJRk{RkRRBJRJB{RRkRJRŵsJŔBRJBZRJ攌Zk)kRB攭)BkkRZZkBJZZ!!!BRBRJk)﵄έkkk)έ))εΌJJJΌRRsR:sRRssRs:ssRRsss{ﵜJk{kJ)J{JJkJk)JέJ)J)εJJJ{JJJJJJΌJJ!!{J{k{{{εפּkkk))){){εJJJ!B)RB)R)R)RkRZR)R)RsZsR)RŔs)潭{Jk{{)ޭŭB)J{JJ{{εεk潌JJεJJJJkkJk)JJ)J)c)Z{)k))){{{kތŌBJJJJJJJJc)J))BH*\ȰÇ#JHŋ3|Q@Ǐ CIɉCɗ0cʜIfA=%@+l͟@ ϟ>F dp"g(P01>n`*0Bb^,vгhF dp"g(P01>n`*0Bb^,vгhH 52/F +>J>hC J:c۷p&|/FAV2pk`^ Yh&9b#P>F1cmQL .t <01CH@_>H |&n `s7XG&^h@ 0djx 'ix0CqcϿCmPUI‚>@Vi)BX84@78>, Y`#Y'$6 (D+&`/h8<@)DiHL6PF)TViXf\v`)dihlp)tix|矀*蠄j衈&袌6裐F*餔Vj饘f馜v駠*ꨤjꩨꪬ꫰*무j뭸뮼^+k&6F+Vkfv+k覫+k,l'D 7G,Wlgw ,$l(,0,4l8<Ϗ@-DmH'L7PG-TWmXg\w`-dj %cs 4Op’&k KL*P7 ., 'SOaL?%@ C$jp݁o^ &_L ' $^椧.8a`8h{Ks<]z 4I =$N@ $@/s;'d?{_= HL:'H Z/7z GH(L W0 gH8̡w+@ H"HL&:PH*ZX̢.z` H2hL~;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess31.gif0000644000175100001770000000357014676242340024036 0ustar00runnerdockerGIF89aN p! NETSCAPE2.0!,N JsRBcRBkR{RkJcRRBJRJJBR{RRRJRJssJŔBJBZ挌RJ))ZkBBJB攭kBJZZkBJZZ!!!BRBRJ:R)kRRsέkkk)έ))΄ΌJJJΌRsRRssRssRRssssŵJεkkJ{){JJkJJk)JέJ)J)JJ{{JJJJJJJΌJJ{k!B!!΄{){Jפּkkk))){΄JJJ)RB)R:RsZRRR)R))RsR)R)ss)潭B){{){Jﵥ{ε{kŭkJJޭ{潌ŌJ{JJkkJJk)JJ)J)c)Z)k)))kJ{B{{ތJJJJJJJJJJc)J))BH*\ȰÇ#JHŋ36ܷFX4Iɓ(S(,2&I͛8s.\q\BѣH*XL>H 52/F +>J>hC J:c۷p&|/FAV2pk`^ Yh&9b#P>F1cmQL .t <01CH@_>H |&n `s7XG&^h@ 0djx 'ix0CqcϿCmPUI‚>@Vi)BX84@78>, Y`#Y'$6 (D+&`/h8<@)DiHL6PF)TViXf\v`)dihlp)tix|矀*蠄j衈&袌6裐F*餔Vj饘f馜v駠*ꨤjꩨꪬ꫰*무j뭸뮼^+k&6F+Vkfv+k覫+k,l'D 7G,Wlgw ,$l(,0,4l8<Ϗ@-DmH'L7PG-TWmXg\w`-dj %cs 4Op’&k KL*P7 ., 'SOaL?%@ C$jp݁o^ &_L ' $^椧.8a`8h{Ks<]z 4I =$N@ $@/s;'d?{_= HL:'H Z/7z GH(L W0 gH8̡w+@ H"HL&:PH*ZX̢.z` H2hL~;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess4.gif0000644000175100001770000003424414676242340023760 0ustar00runnerdockerGIF89a4(p! NETSCAPE2.0!,4(wI8ͻ`(dihlp,tm8.|pH,Ȥr91ШtJZ,֩zxL.znp*.~nwv~,!6$*<7#(5!-nHQEݴ3a+La qx۬ iȱcFI3U>1w=XԄѣ͛8v+'dIԂʗbvYfΧPI2ϑ N-AW0e*ٳ{:Ȭ[O.lը]r)+#ڿQUZZwkb֔,rл]A7n!y0CzCbEޭRӔ/M vtsvL޽ν~*ws y3V ˟O?3c\hw&FVhJP+uhbTa{0L.2樣NA؈I(؂$L6, "NVie"P0",NYږ$N4dG*H^c[$x))Ýz* |`)6"r& >j!J霕z*&JC%j`*M%J뭸akJƮ+k&l.:@+PkF4rmk䖋 ·k,[+{+*{)<(''\& 7$G,$W#g!w!xa ($O0 -,!+#20Ϭs(57B̏D8tE7 8"ͭ %mיHEtym m1O@vhsmst\ݛY 16l]uwO{ K-~^K+^yژ?yOg[>xS{ !y2"^1>{>>4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o\OVv>=O9+&i9ݳ_}JvU2?,>KOE;} WuK^_ ?}xu9V#Q >z|ѿB`b>I\lĺC5K򚌾ЃT;'MlF\pH%B)pfr(Af`) 50&d1PUFe*9$Sר#TSفcqגhS_/*j ABrmy ,$" !i^6Tأ>Vҁ!z1"d8Jr-?FD#6nQ> %J!Z$/Mu2h) ȱ]q6Y9ma,ێ+3k^Z:U$\PF63}h0Dv0YDAG@dBY^b0M3lS U)̑rSh;h>*%ftiD:Nu.$5wFJr[%>RX)Ť;`wRbl95K(F4[PN/V]Mt~*K?z!TDsQCMSIH:O-!bc\k2 -Ek)@PqlHAVoD)F)R}oFS~(ҪYD͈tboU۹ޏI6P+&[UiܮbeּvrUcI K[ږJ=uj^/'Sϯb-({Hu[Fck4w!/>ABs/DZsN~0#J0A s0&6 &vOHc,_41s9>y,! u<.2cZyN~2)Sʽh-#\2ì/f2Ϭ5/9l~3}8ӹ.gy~ AZv.4=C+ю#-i343mJҚ4-x:Ԧ>uFRծBC0Ysր+ Zֺ5_-aK ֗v@~cebɮ mZ ^@>wl\znt=nOߺNx 7x x.qxs unZfuSMeUfcm˼毦sm<σh &ѓg+ufӣfKeճekUdH&d9f.c˽+Nboa &?>+KHC`W| PtX<˜饐z#ph yyXX}Z >z^e{_ @}g;}~ݸI .7o?)q|O_8>" ,SP~[?Ua_ O(1Ӯ-_|^@.40=/@ Z ^\UE= x  _E`  i) W9Oܟ`Ba $_ !`78!`*`<!ڙxMhT !ǽ _1aF!#AZqHN0 "~"(^<"J1ޙ)a-av1av"- ܢ'"."/0#0c \!#3^u54ZVzM#6F3ZXe762V1~#3##9 QUӀU:ƣ#!rԁɣ>:zat|@Jt?V>BYA V1uBN4 H g:RTiR\ G$A~??Idx\*FdoULM䋡@i%P %QeP RR60:%T C;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess41.gif0000644000175100001770000003424414676242340024041 0ustar00runnerdockerGIF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x 7x x.qxs unZfuSMeUfcm˼毦sm<σh &ѓg+ufӣfKeճekUdH&d9f.c˽+Nboa &?>+KHC`W| PtX<˜饐z#ph yyXX}Z >z^e{_ @}g;}~ݸI .7o?)q|O_8>" ,SP~[?Ua_ O(1Ӯ-_|^@.40=/@ Z ^\UE= x  _E`  i) W9Oܟ`Ba $_ !`78!`*`<!ڙxMhT !ǽ _1aF!#AZqHN0 "~"(^<"J1ޙ)a-av1av"- ܢ'"."/0#0c \!#3^u54ZVzM#6F3ZXe762V1~#3##9 QUӀU:ƣ#!rԁɣ>:zat|@Jt?V>BYA V1uBN4 H g:RTiR\ G$A~??Idx\*FdoULM䋡@i%P %QeP RR60:%T C;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess5.gif0000644000175100001770000004100014676242340023745 0ustar00runnerdockerGIF89azp! NETSCAPE2.0!,z{{{Ž111::B::Z:Z1Z1kZZZZZRRJcRZZkZkZZZR1RZRZ)ޔZJZZkZZ)Z)RZZkZ)))RZZZZZJZZZZZJZRZZεJބތc)RZJJ)ZZޥ))έZ)ZZŜZZބތZތcRZJR1Z))JZZZ)ZBZZR:JZZZZZ)kZ)ZZνRZ΄ZkZZJJkZZΥZZ挌Z{kΥZZޭZ)1Z΄Z΄ZZ1歭Z{)1Ό1c挭1)1cZZ)1Z1Z{Z1Z1ZcZ)kkkk)!BcΌ))Όε)))k)))k))))k)))Z))Z歌)))J))J))))J))Z)Z1:Z:1{Z{Z{{!޽{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜIB"A0b@ JQtJt R-LGJJU# IIkH?KL 1AA${T`S#\H`߿0# GMzbH_9 !8B6 FhBx˞M"- #F@ DLR"$~my9rb ,yـͽwowa1  73Lt H 7`NCl@= ?vFd>A# veaK 0,E4F` E 0@$@ 'E$igX[kA a!j0@!`ubm[>E 1>jl'A7gґ@iPd@Jsgц,pI06ʄiQ9И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kq›At&ڮ9Y^Ҁ4n71!q[IO8w G0MoJ#ilwk^e2+js%΢*CtZb05)!''A75sʦhƳF4or<'juNK"G-ٍ͎oAqIߢ"0Gf5]rGϱ)סOnVs^Q+ [#hM_WmbK0\K#20>k'2-c'Herj|/JepokgXF[.~:cAb#d,i\[M5{g3aD45EWrD{$e #913cu aQ3#zߊa'tD8Fr6+3>fp0UE04,`yNUol-d~d oVq @Ȃ, yy4xxm#dh-wj6l*6Z2uӅ8&k @Knw55wiU:pE_f-\ ,G@ OwIeWD[x[nev*4n2)z iHC2.h[NxIPϣ*.6y:^% >p uvvw멣d[z%oF浏J/3GasO%:S2wqwK7 -j:z|SgZn't'kS9oMC#tJ-kIFjO&I60w0n蘳TMkk+Yt["ӎ콃E[6\˟|pk7B9ӅK#]u!f|ja4gƨRϰ5E.\-S#ū%+}. Y7=;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess51.gif0000644000175100001770000004100014676242340024026 0ustar00runnerdockerGIF89azp! NETSCAPE2.0!,z{{{Ž111::B::Z:Z1Z1kZZZZZRRJcRZZkZkZZZR1RZRZ)ޔZJZZkZZ)Z)RZZkZ)))RZZZZZJZZZZZJZRZZεJބތc)RZJJ)ZZޥ))έZ)ZZŜZZބތZތcRZJR1Z))JZZZ)ZBZZR:JZZZZZ)kZ)ZZνRZ΄ZkZZJJkZZΥZZ挌Z{kΥZZޭZ)1Z΄Z΄ZZ1歭Z{)1Ό1c挭1)1cZZ)1Z1Z{Z1Z1ZcZ)kkkk)!BcΌ))Όε)))k)))k))))k)))Z))Z歌)))J))J))))J))Z)Z1:Z:1{Z{Z{{!޽{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜIB"A0b@ JQtJt R-LGJJU# IIkH?KL 1AA${T`S#\H`߿0# GMzbH_9 !8B6 FhBx˞M"- #F@ DLR"$~my9rb ,yـͽwowa1  73Lt H 7`NCl@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&^EN .Zkg*]"0-n B&+j"Uj(v L)RhR>&K^21V"=؍F"3+g$$r6*ѦsjAni~0Gt`*z1W('2wUg4ޭIBq1_kq›At&ڮ9Y^Ҁ4n71!q[IO8w G0MoJ#ilwk^e2+js%΢*CtZb05)!''A75sʦhƳF4or<'juNK"G-ٍ͎oAqIߢ"0Gf5]rGϱ)סOnVs^Q+ [#hM_WmbK0\K#20>k'2-c'Herj|/JepokgXF[.~:cAb#d,i\[M5{g3aD45EWrD{$e #913cu aQ3#zߊa'tD8Fr6+3>fp0UE04,`yNUol-d~d oVq @Ȃ, yy4xxm#dh-wj6l*6Z2uӅ8&k @Knw55wiU:pE_f-\ ,G@ OwIeWD[x[nev*4n2)z iHC2.h[NxIPϣ*.6y:^% >p uvvw멣d[z%oF浏J/3GasO%:S2wqwK7 -j:z|SgZn't'kS9oMC#tJ-kIFjO&I60w0n蘳TMkk+Yt["ӎ콃E[6\˟|pk7B9ӅK#]u!f|ja4gƨRϰ5E.\-S#ū%+}. Y7=;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_images/AdvancedOutputProcess6.gif0000644000175100001770000010241214676242340023753 0ustar00runnerdockerGIF89aop! NETSCAPE2.0!,o{{{!!!{!1B:ZZk1!BcZccZZZZsZRc))BZZkZ)Z)ZZcZkZ)ZcZZJZZZcZJZޔޔέZZ)Z)))))Z)sŌsޭZZΌZZZsΌތZZckJBZkZZJZR)cB޵J)BZBBJZZZ!1sZZ)Z{cZZZkc:{ZZZZ)c:ZsZZc{c!{ZZZZZJB:{ZZB:ZB{B:޵JBZB:BZZcBΥZ)ZΥZޭZ΄Z΄έތZBc1cB:c:Bc:cBc!BB:BBBkBkk:{s):)B)JB)))s)ŌέŌΌsŌΌ)ck)c))c)))k))))cJ)c))c))J)Ŕ!{Z{Z{{!{)!{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(SS+\pZI͛8s % @DѣH*]4!.N.D`Xj〯`l`O7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'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$ѭ4O1k*!IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/Bagic-INPUT-resultscreen1.png0000644000175100001770000001352514676242340024124 0ustar00runnerdockerPNG  IHDRS9c IDATxw|+I6tep ȐQv Y"GGeVQ**@ZJ t9 "w~?4}Ǔp1|ygqt^PܧADU='8Yc<3iΆ#S_ڲ"*M}Z[66{9{GxSnoq&fw..~{\`v{k=[#[tfGHv}ZˇuĆ&=NАPأ۾>pۑ[?˯||__Rwjj͛&5++ގЧwWY~mZ?z>+1wz3\]Czdy%L!CB~IX:=:TٰVGnts>e ̺r"RFվ\JwhKEJZޞpg{Jٸ.]QC^Ȱ1'>_~ܤn~dž xyv]*lݲ7i^Zv8~k QkG .]t+ݷe6E5iqܫ6ek`PrwhQm[?-3X^OrrZqПI*UZlYtSMPm;99sĄW-̸ FCZY+Ǡ)y9zۖ#965hM~Z=^vب1G4hw[f;s4 Fn1;w}$QҧOW-&֕MUWOT@>NGʹkV_t:rꔲ%Ƨ;Zy].g *<YXIn>jSkZ م K֎R'&dZ|۝/]~ͺgl?p,~#]ss7〯}Mw?ܠ}5/~H4UOJJ͛f˯W^۶m#|y>F?`VSƞ9lz]8y6.91NÖ)qր?]F/M^WbOS{f3i{ILaŘ+71H1Yv_p iU`mnxԍS0 :?e-E<1{Ƴ6s5۞sPOܮ Řm.yĴͦ7wujh~| a:.jJu1'e:9&s-n,kdRU_3qB7O/wg}@..?wy=%5f5rҲr,^<[qA'y fё3xY++c2?s6{!rCӻD|"X>D<$?e?׿оτ8v|"qX>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bo>&0˳|7 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+D/Yܣ_o|FEWbt8\.\0ovID,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$ѭ4O1k*!IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/generated/_images/Bagic-INPUT-sourcecode.png0000644000175100001770000022640514676242340023463 0ustar00runnerdockerPNG  IHDRRIDATxu|9C;wwwYYYXVw/kBK ӛev{{) 9L&dw&=BAAA!#lU#!ի7j?BܹSfÇG] ,TШQJ(4ǏH"Y AG9 ܹs_|{={]v;w-}ѶmԩcuT;f8 oooWWK?<`ɒ.BȢƐSZju-v={,P Ul0aK.%w˖-cǎݷo}ѡ/[uԩ>mcgDZkʔy.fM "((,B5[?~C'O Xa+HٳgA]:ggmۮZ2СCSLA'Jʅ/_z޺fH 7n.R''??j*Fq_c˖u)B~>K$InݺU֭[?|SV|yhy\J#ryرŋnO>N8_LJdz,չsDXLG;^<.Y$K|?ĉH SIgp6o,]DWP%0c'F?T}vqժU} ܹ##ŋ(ϟ?n!CS+Wnܹ3fLB Ǥٲe]F:t(s1qҥKk!gϞ)2sE(QK5͛7.]\~}׮]F!Ďz+,Nf˖ fͪ3g[\Ǎy*?̕+ц SGPlOر'/_C+*ӧ?rرcE<` GP~g iIAO{ܹݻcgϖ7n1bD+TW̙J{\-ZnҴ+9AJ2d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:P(u3( $BfXIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_images/Bagic-INPUT-sourcecode1.png0000644000175100001770000022640514676242340023544 0ustar00runnerdockerPNG  IHDRRIDATxu|9C;wwwYYYXVw/kBK ӛev{{) 9L&dw&=BAAA!#lU#!ի7j?BܹSfÇG] ,TШQJ(4ǏH"Y AG9 ܹs_|{={]v;w-}ѶmԩcuT;f8 oooWWK?<`ɒ.BȢƐSZju-v={,P Ul0aK.%w˖-cǎݷo}ѡ/[uԩ>mcgDZkʔy.fM "((,B5[?~C'O Xa+HٳgA]:ggmۮZ2СCSLA'Jʅ/_z޺fH 7n.R''??j*Fq_c˖u)B~>K$InݺU֭[?|SV|yhy\J#ryرŋnO>N8_LJdz,չsDXLG;^<.Y$K|?ĉH SIgp6o,]DWP%0c'F?T}vqժU} ܹ##ŋ(ϟ?n!CS+Wnܹ3fLB Ǥٲe]F:t(s1qҥKk!gϞ)2sE(QK5͛7.]\~}׮]F!Ďz+,Nf˖ fͪ3g[\Ǎy*?̕+ц SGPlOر'/_C+*ӧ?rرcE<` GP~g iIAO{ܹݻcgϖ7n1bD+TW̙J{\-ZnҴ+9AJ2dݺu㎅ rڌ3ӧOO>I&z] ~%%xj[6kq|3=;_[)"oqdpŋԫW?~;cǎYǏ3e[ЩS'IXO-[nݺUVV>}BtUVѣG8 4_2s!C`-$x޲+RPqV͚5˕+WvlUn] n͛8nnnb޽8p ͻy&^^ʔ)iQ//\k X!pt$ lu֭J*s7|p ޲b߿5jJA! JF4lPHFˇ‚zPXUxWƌ\[*U J_O ?9PN=6YpQ|:w6EdNNqj[)"[3f }D!$[ ӛKbϟ?&8~eN>Mjc+aν|r-aΝ'XX YPjo.+@R+8n~]F*P BڴVJU9N4%[UZŋӧO%#C SLɓ'Opdiӈ% |MIJʐm۶͛7#FjժdFu Oc&7n\|@8  ?zHV4@7oބȹ@gΜ^@ΝlB_6{,^% dIcjn5:T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|&g'J08At-kj[ݺu =… 욆l)55D4iSWNLL R$'ȥC޽{MMMq  @fffm۶=}i ˌFb7L7o 1]m ͛˖-Bɓ^z5B`+u&d33SIS󋋟Wgfjo~Gs4ѣ^AyJ"7\6peB8dv<8Ц=A:͛QEV!vdq w^`]jr1D>ͭFn1ƍ!,ǎۼy2H %K b,p9(P[0=/11ݝ ./Z٤ Vˋ6py..j#Gv|3tu RSO?+kkjKr< T=}N24єP%I"#*b3IuQhNxdĈuaKJJ` cJFG'ӉQd}QQ#VO( % g"G4Y|>2JހC X-0hĩ!a6fVͭ]G G))@muuYYSȥ9HKKCN P^mSN )jXE("P[Q(U[ _|!ĉ***&Lu3)FAmՖyI loo?k,YBy5Vme˖x۷o *,,,..OCCyҒyBg,^^^ǏE`` ;`  gu{)W@mՖA&hmm}}Vtȿ6fgg{{{(o>}/^}Zz;wۋfX#2IDLLLbbb>v_mii9uTv(ԩSQQQVyFmڵk߽{7 ? OH| w̯h'OZ=۠rqqqttDXk׮ ĉQ]ll[ h+OOO !!!/^ܱc (rۊ"x**i@&==ѓAUZZZ:uuUUZv-z,3i l2uuul /^,iչg˖-TUVחjPEZZ"8SSSӷ4By% jǏgddP-]#""a[fϞM@ j+ ꠶P(j+ :P(u3( $BfXIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/generated/_images/Bagic-PROCESS-resultscreen.png0000644000175100001770000001234414676242340024260 0ustar00runnerdockerPNG  IHDRZai=IDATx xMg_I"}VLUKұԾMUڢEJUkڥJ5BDH"{7Ii ~?O>ޜ{BysnjrVgw3ߌiG 7xk 9`f\ X^cPg/v?|꛰Ssh<@9iÂ&Mq+WHgs}B|ܬyERRRFF=ήLQϧӹsemGrVn]".8r}c֮cS|W)wތ,spZ#XP8xVPđXk-y<,o)笸󗒫9~TXN_qlԡ}ؖ/ŦX_WӠj1x={-pWVl=̴ނʔ)Kuqv֜$搃.zwlZ9++r繳]゛z1bK۫[t[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L -HkzjTO4 \ bmoR|3soq3#xu7ԌL64QeѹjY;nWM&m!o5yV5l;w_cf9T3L%v+El2Ja55ׇ!~[mP:lvTęcu՚SaZ+"R0CǙ/T-ˬ)lSY [mwhpgw]WUS4MyB5MMGl5sX)4W]J}Ět^&vQtŶzfJZIZ]VfjaS9-l[S?ل`MW5̘`C+tݼ!&_CӴ~4,%nٯ͉ds4uܨ4T)zLFWǘC/\`#f?f-akbYU6UJfjN v KK.- *XS跣͹~'Ӵ)r+2S6[ͬ!Z0\*ӈf`M7}lm*R3C|O[5e.B$*<^: g.QJ2zfZ4#:=1Ǭ*6-ezmɁ5AO3nz1s b3ٱzđB`G JZ˶l|u]mB] :̖uaFMiK;͘`N~yzbGW5I{w5{izmY55mZSͧM)}fְxj@}r`);N3=3+b5M%4Ux7͵؉B@>x6jq?47e5\*Dcj9nW3'_&>s~v.1{%=o6Jfkix3^3cmw!FQYf?Q9i@9ub1a:5Fך}̮գ"WU9g>qxrtefv0jG`٥QM2uuN\;ߜrVK>NZpi? 7_(r,b`wka6Ɋˠ75|V?]X/Gne׿sm ǁSf߃XL6kVWx}Ձc_`N;GGD!#;sWQPð> {YU>Z@ j]B! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@~AeJON!IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9901118 pygame-2.6.1/docs/generated/_images/Bagic-ouput-result-screen1.png0000644000175100001770000001132314676242340024450 0ustar00runnerdockerPNG  IHDRXIDATx Te**bN:ifZY:YiNe62Ze֔[% ((j (EyEsοȝ9>s/]$mVCeJcEuBPϩa=䣅'3]]U\>LIWIcG#צ m|V 888pmM2)oGxS[ae ~~~eee"\K쎏x޽;''珼"VSeC3nvͱծ`IGmMm[7ɷIډ{J+-{ctJ_WwoW"V{ԺE?4EoyoMŢ2y2ow(h:4:_|>VHk66g>vfwZ.'7ΎImRX ˉΩ"؟e<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uuN\;ߜrVK>NZpi? 7_(r,b`wka6Ɋˠ75|V?]X/Gne׿sm ǁSf߃XL6kVWx}Ձc_`N;GGD!#;sWQPð> {YU>Z@ j]B! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@~AeJON!IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/generated/_images/Basic-ouput-sourcecode.png0000644000175100001770000016017214676242340023752 0ustar00runnerdockerPNG  IHDR*b)KAIDATxtG'.D$[K8- xpwwwwww'H?s#*vߓwvvfvwovĠјcB *>{V;G~ "^S'߆ʗtɴdIKK.yxccܹ?uTxdlⲸ]q丈E~Թ4}4d32 n=…UZ6hSB玔 m%rvo~ԹH?t..f8и`cǂ/?uUܑ[EpaWHsP$&wDQbl EzAs%>F ED<+qQy)^ |@ ꆸLċ_M^Rbbb>|ܹs ׮]P {֭sۙ3g.\p9lmm/]dffּysB޽{711#o޼ׯ_WÛ7o8M6Jg 6ʕ+8RXhQwTTTw_~7)ƃӶI"QQq޶VZq=lzC?uMPsGJl򚸷K9>2Rz/D*MC(AV~ER\Y*lr S_MdʧhkjȘC*/|+1(0*U˗y駟88q $I&'N(TPttqo΍ABBBڶm۳gOkkRJ=}vrJN6o >O<ر#!C0` }˖-#F011׮]ODDD+Vv)׻YQO>|hݩbV*T)">p ʘ[,N a " ^{|Bd+*"EYR\QUhN-cE_RLJPPА!C,X O̙sq//Ν;s_~ =z4a khтիW7665LYرwވ4o߾/Hm6??ݻt5kp68>|xV HgggiӦug``֭bl~={Mu#V#lEl۾T I}[yڵkɓ'#j;#d!PIi0֭[qSeh> ,Ytһve+8 3 ."# ;RdɂgJ%}U4ݍ7ƌҋ*`РG+T}6ڵBe+*ҍTZ5GLjb 5]\E`ahe3IU®.z#Sq{06%~xx^mDQ&Ԁxb( +g&Mrppd}]p!k֬mڴxbJ_ " " V\YzD~ܹz`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 8'#CbD/"a : p1-(C4#PlZpAx+Fς]---'iݻQeȑjH`Gƌ0[[2T>pDB$< ܅nAPiT'(!n߾}Q8#0I2$>^}&::8M6H*KKɧȺTJM bCeoT/Jy!-BbB25NظEVȺS .yVUzx7w #CB>TTT(((^]7:_IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9901118 pygame-2.6.1/docs/generated/_images/Basic-ouput-sourcecode1.png0000644000175100001770000016017214676242340024033 0ustar00runnerdockerPNG  IHDR*b)KAIDATxtG'.D$[K8- xpwwwwww'H?s#*vߓwvvfvwovĠјcB *>{V;G~ "^S'߆ʗtɴdIKK.yxccܹ?uTxdlⲸ]q丈E~Թ4}4d32 n=…UZ6hSB玔 m%rvo~ԹH?t..f8и`cǂ/?uUܑ[EpaWHsP$&wDQbl EzAs%>F ED<+qQy)^ |@ ꆸLċ_M^Rbbb>|ܹs ׮]P {֭sۙ3g.\p9lmm/]dffּysB޽{711#o޼ׯ_WÛ7o8M6Jg 6ʕ+8RXhQwTTTw_~7)ƃӶI"QQq޶VZq=lzC?uMPsGJl򚸷K9>2Rz/D*MC(AV~ER\Y*lr S_MdʧhkjȘC*/|+1(0*U˗y駟88q $I&'N(TPttqo΍ABBBڶm۳gOkkRJ=}vrJN6o >O<ر#!C0` }˖-#F011׮]ODDD+Vv)׻YQO>|hݩbV*T)">p ʘ[,N a " ^{|Bd+*"EYR\QUhN-cE_RLJPPА!C,X O̙sq//Ν;s_~ =z4a khтիW7665LYرwވ4o߾/Hm6??ݻt5kp68>|xV HgggiӦug``֭bl~={Mu#V#lEl۾T I}[yڵkɓ'#j;#d!PIi0֭[qSeh> ,Ytһve+8 3 ."# ;RdɂgJ%}U4ݍ7ƌҋ*`РG+T}6ڵBe+*ҍTZ5GLjb 5]\E`ahe3IU®.z#Sq{06%~xx^mDQ&Ԁxb( +g&Mrppd}]p!k֬mڴxbJ_ " " V\YzD~ܹz`Ivkkkk߾=Qi=q~35W" Et8_x:u6zQh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]---'iݻQeȑjH`Gƌ0[[2T>pDB$< ܅nAPiT'(!n߾}Q8#0I2$>^}&::8M6H*KKɧȺTJM bCeoT/Jy!-BbB25NظEVȺS .yVUzx7w #CB>TTT(((^]7:_IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_images/angle_to.png0000644000175100001770000006140514676242340021215 0ustar00runnerdockerPNG  IHDRCndsRGB IDATx^ y *! CڎsD%CIJ )) :B"Z2 >RD~jmkzz}ﵞ^y]T P*@ZrzvtnVgT P*y3u*@anGfA+*=_"- ('o\C/'Y 1wn,%ST P*P6 1,gTOls]ȝ.+_|WSjW_#GZQSB}[YSɄR*@TBa^ҷKhl'W'_9OqQ Y[n_iX}TtX~[Q-P96T P y)1'5@*Tش\IVΕoD4Xʗ(/_,ˮ }/ GT P*)a^/2}݉om.Ukkƍwo_%7;1br2e*@H JK嗕-dʕM7So(sbj]]ewM#o}eݺ5%IksvrD*@sR|IOyfʚ5k&mJIa}rʮM*ʊdU>[z1ٽỲcUz]5N-K;ȯJK܏5e΃ z|qdⴗd̸ qFwB;창E:ٸa|ŗrݣdժU.sTXQ^-}￷HzjҮrʉ-~mekސ{Fk7n;:TREZ80rһwxu+WNN9\<ٹNj*gr׈EySjUyr' !Yg&7>xCK~]ÆrmrʌW_G'k֬q?ʫ1osxe[HZ9s;G;5kT;_Mzh9u[nͥF˛o7nΑ+_| },X瞔n9origMrPXmO>|zzAr~ƛR>IalrIeʍ\٭I]H"kd URcaǤ_JJ宱3( P6 .2_oy迓嫯Ovٹ Xy'IwXer۰qF޵v}nQ>eY~}#} "{%}L"As/Lx󯣤OeނUݺ)anʐf2QkՒ&fɷ͓jp4In<@-U;|0o6{w;n$^t,]K_|y8YxTXAY_ o *U;5;\ƎH<9Cdࡲl2l}uK܄r2a믿}^WaGΝEc䆛8SWq=on}'bQ_k^֭['MvjwODM=yP [5㣬v"ГoJ +Kl\)'d]+I.T6"V5er强C?dZ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{}ssi)IQ־.(ioCJϬ2[T 2`+}>[29:=zcq;&$Y#4WhKqMO>#*5~;6b-ZFI=ϽMn((Sϧֺ/V$_0KC\*-Vh>!O޳0CҝhWU8K^ GSІ\H;|^|Wy6UeoB%svz{÷6s#4+==jψxJl@tte6_?ѧJxIMVEȍ<{jlzQc4GraS5%p؜V?YHTH*\=H2[n?[FYcJ$E<aY$( qX=y1:xZxy-Ocg&}vkh 'uP@Y1V;x=qD ۇL*JDn Nz,0v8}Y:R)4;zqJmd$t?\9%ҥb쯯Ja#՚r(9H Y8sa´^zޤhU{`TbA2A{M*]&:85'#R+ԩ_^m QC7QHI mߌU E+B*jEC)b"`r88=1jPWwԓL}+&{MrK=ƫ"Gf44zYmQjXvg:MN3W-f?EZir0gpl ۲toU@;OpRݞN'.;H z1WTvmcu":Vv~=Xoȋ'^wT+Uv EL]f^|:u37 epKҴ! i[$is>'0@o~Ʋ]ƿ;/#ͫs}*hv q~8-Fc sÁj1ϩo?dz5}_Ô$e:еw‚>ʳ.λd ;dUQ_]Ҧt(*ǔ#[6RYpbr@cǁuu)[y>ۭ:[ƽgq30 1?F 'ҳӫZcko穙5sGw{ɽ[~~X m+/÷i_jS~7dE^ T-(hVldZ,8vAPކ7g1'مDќ֜ D$Kz}9n6$o&[o+7fs润H#v})|/׊Z1,vHFlvxqv9G{FPH/=9>Rs۽hK fӮd>B[_n<{+Ǐk*8;F79u ~;dLy=ƶԮfot zzjlL21Hc+ji븎>4fYߥKZO`utq sJCAoZ|SFy*8+y6U+G["㷨XO4="?'?=jy屎Ծwd o<9.Wr XӜwU|?67ɟF㿷ҩK;n=bn&$^y51pouH-,R8sƇ䃐+,ݲ9>A%y#> aD,,-M+e* .Qe0jzq^ְ(Yqi0eTUΜg=U!9#nGBYGCc$gӽ!ve>H+HT././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_images/camera_background.jpg0000644000175100001770000001650514676242340023051 0ustar00runnerdock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1p>A€OG@&쑋~=3ʕS#֢;푊 z(~I)V5-q\ѵ.HSpr3 R8²o(qVoz@۷>nѱb? I1l7q7>NJH%Ay` 6TlEzq򢒾3`ݣ˻?J[,=: =ș#"WkǠ8 T F)ɍU$v 1s})Ĭ [" ]BAXI4vHk8lcrœn>Sʎ!ORE[{cY;aM OK֬6}:ZNJ858F<=#e"h././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_images/camera_green.jpg0000644000175100001770000002375314676242340022035 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?袊y?* > m n/d\y|ytӶ{EAEcf=ƙwI<ǯsN=Sm9IɹIݰ)(((((ΥiiwȖWHB@NRq<_%7p .U'xjj#ƨ4((|;W˦y6G?Dt8%R(88+F&i(՜] %7Vbcwyo6_H"ٌA0>^潧|+mԓvg續W"ŹPF+3N6Q|9/]~?qu"[U_&:w_D L_Nxj_[^jg2iT1w%j)Rݿ |>ۆX^YJ/$ZZQ^Q@Q@Q@Q@xTfzݴ FeOTWn.sV2qjQvhOӬO;!0$(d(mraERQEQEQEQEQEQEQEk}RMݤt #11.r3Sk k/5^EzT3~Ӥw$ &9laԑ9_uᤵ#p,M)%rHb t@sW\?%_nϧN-8ĥWtQ9..Š(>(}xz}̙ v$G'Wx Nbˆ%<W̬%1IR6;sl.]j躿Dyyigg-ߢ< c~mt؎i$G dv]A -qdW^W_i m{Xk7:6Lp OӬO;!0$(d-<$iDq%IqV70$c^ugc?OX!x{'۬kwc>9x[~qڳc+EURK&X0 $)򚱨^j7y]]ɍO!wlXpW25L64Kv\4Tu$QEvQEQEQEQEW[5wPcwxWw+ )l:xvSIl# BGIWHIme.=w1cO$K?ٰ4%/'eZW/ߢ+C𠢊((((((󏋟l<iy^(2o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Q_r:Iԛշ}QE$j?lϹ?|?/ۿ3q_ W??\MZF3xW|r+p*W%;8[;峜+'mWK_~ק}q(R%5Zomz_]>Ve <]߉]:+*FS$ r1>hnHCRbA|Hxh!$ qUE81^q= Vᰎۻ5WׯqwaGԾ)Y7+nIEWQ@wNc"g9 p zT~v涁ERQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQETw3%$)al@TOj ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( HG2\mwtF${=NMOE4ں]Fi=././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_images/camera_hsv.jpg0000644000175100001770000010750114676242340021527 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?S(sRI/tϳaDڦU[0yLw+k7+MA-31fH{WS4{[Eӵ(@ѲFY[oZuvϥa\ԯu~gU.ߺZ320Oy,a,7P?ޟiwZMKrq Qqc$OtV:^h[Rƅ+"F gYtfAkK"[.PiU8G㚄9vnOw՚pPF)7;{VRmR}[^,ZYip C6v6=3x5s4xid'_=]-R^Gۅ٧< ۛqؼQUtY\ՋWL.,x~Х ԩ6*Զ'4 .%1v웴'fvFIJ%cQ'5}BP!Ww8\d33.5$NH\g޻=zQ籾qaq0hp 0GVQUX$`w(^c:X,DU$i%o.$a*1rI%x4-r1r,|C&}YRO/##y+NEZ.{wai\M'&?w՘NH?W*T] nͻ 9v%e_AZb7U5DgF `8+)RiLΉӑw8[F?Э&o]ySӃ_IurW.{ѣ>it:d,Fe.5%$bUb9}׿z#GHln?]kCO+,J?v_ ?k7׫*+;76v9g5ksk}H>SE~#HmVF1X2t?Zƫ6eA#ץoFxؚ:Sm{k䌛o\Z\9P"\>[hvA CaQӷ~O[-p= _ɽux%y:UKSi.zV~U+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Zo(6yQR5WYrN4`aa?Dܤfl-v3F!!X+Dcg@ݥMRCY 9 Jwh=VGGy&aƹ(JF5(g$ q4>MHc2Ro{}aZM(Qv1 0 09iYPVHBOY]gaat2 @NRCv>JBiJ2_GgaaSR;KNt# Q*^NiʊrBpzNaaat?qIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/_images/pygame_logo.png0000644000175100001770000040174414676242340021733 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace {AIDATx^Ggn]-H bF݈}qwww}N=D Azpu?gp{]U/rbcUQaWQںn U4  DDDDDDDDDD}$Qq*Fp_"ph`򁈈 ! !;>Pq*dgQwQqUc!5ņ㰎 c7ʅÝpuWQ]@M ڏEK={ae岙Se*>W7TxTiL2.2o{Td6eg$cM~o-3Wq)0.W̄ztuN] k[QX*w$Q!͛R>Rv#qv Z p%[w.'_W/YJ@Ż*S )D DDDDDDDDDD*V=wpkmwHv'Fp[gUK168C<}D DDDDDDDDDD=Ki/Qq>Rlxl^%M;HHOd o^qkUT400@DDDDDDDDDsdkc*Gɛp`NABPYĆnx\wwn*rǫ@Qgn{~#ڙI؃ =H K̉yAĻmrD}`: 3ߛB&U*~;N"""""""""BVo'oۖ(z(,ОϿi [%GWq2&ԫ1@DDDDDDDDDԽTb[9p: D6@qp'gӽj8vr k(G0@DDDDDDDDD}$𖊝n{j06 6 w`d)`0k.іKyq*ZcTH !*S(UŶށI"""""""""!Ϩ8L7m"]H:+W߫g-C]}z G}ܦD.*&HT-јpY'*~Sv$QCc͋y{Bgw% >%?H|NpĹ61_u)"T\o{3ypvP=U Vdw*$ @E~d """""""""zN9\ux | r:À;),90k_kާUx*,\ܠ3 k{ne(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;=iٶJkgq:}6Ê]&m=+~j ]ôtB6iXOp%c;BRWiPѢ]3S,$^rh2Hn;J ؙ(a!R0C{hm!DP:&J;DBzi: ֥`=őB:3l6 {:H's62~dR<*Ѓ4V#cBt+ʅWbrggInׅ9E: w~V-.B3J|=h=:!ZQUtc7 !C7!<ߺ*LQP:a!T%9wiȱ(R=rMi0E1KrSr e^b-BdߩMFLi)ըFa(;4J\ӄdr!3;wt `.8ܑ:|?VM#m(L +@-ڭOB])0Ή ^h|ɹQ,dB3JFgQ;:%h^O]iNODzBJ q;Y ]SaOFhW7ȢBh|"vJ1UaRv8Ph?-)=㮨)V B\? J;C iDg,rR}(R%2DPԎngUB]ٙHBh^n/d%0@)?KphYT˄Er">k=4oORZTGjAez6ay0UߒDŽR0B[cm=bPmټ5R܎$:!4A`\u*E #B=c@Y[#;S#!"B꺸jr{t @72w1MȓBV4a\5=o ۅPMD*M544=doe -rD)gh/^)}T}v\ع c19f 1.T(6sQmn敜 .790 0 øYXPO:RCiLfgaǤ>)K#!B(5[Yl)D(#iAHq@q-Rym!6Z0tF(rXWzB*K難Y!BžBJ *SB(=_ aTȩMqd4)k9'pJkL/Ri{(laa7ƘL/)n7!4  J +'\eb$ChE $.iQ%dXd%)5VO,qda=):@BsRw L #q]Zo(6yQR5WYrN4`aa?Dܤfl-v3F!!X+Dcg@ݥMRCY 9 Jwh=VGGy&aƹ(JF5(g$ q4>MHc2Ro{}aZM(Qv1 0 09iYPVHBOY]gaat2 @NRCv>JBiJ2_GgaaSR;KNt# Q*^NiʊrBpzNaaat?qIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/_static/pygame_lofi.svg0000644000175100001770000016362114676242340021760 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/_static/pygame_logo.png0000644000175100001770000040174414676242340021755 0ustar00runnerdockerPNG  IHDRba{iCCP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ONdOIv.p g {oX:d0[ z#pb'. aG6tbIDAT*xƤ`¾q ?FƦrӯIxh~$B𚱂5Ka)#\FD쁛Er ;<4^um56vxtaw d96ÆHI2D"0Gr8g7<7^v6 xe%SG<hR_4; Gsa6m]b5׶VVch[T[UN2;Đ< H:9fr`y:mK3۳wbv,"$n\xw8B˼SeI  a k@~2&am%3.cR \e0I fk+)$F)I['BjQ9lHz9 ׹M&HqNCl$[/βa: u/$ܫk5Կ{$bu,$\eI86N"=¼v8~VEそ Ik+Kq'AAcetL p%cD܁I1V!lQ[|(6r}N6C;ա^A>gǵ:XX'؀ "H|~pk>s3\BթPo  BG"nRGptYxCiv K‡5nޑ0AlQ|nu8u@à5Bkg+G^ A ra|Jou$[eAAad R{]8,|>6ro;~?.Ӱjme5JD  {әu϶·b'D ^>m .  2d[$2gA*\i結  B{:sBpVUs&]njqn^eڊޞk#9AAAU&QvIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/_static/pygame_logo.svg0000644000175100001770000016357614676242340022000 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/_static/pygame_powered.png0000644000175100001770000053730714676242340022467 0ustar00runnerdockerPNG  IHDRQ ^{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace DIDATx^xoa6eL6effffefff& fٖ3 4V=3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""a=$y*Z1FE:VԴKXEPQ$ $N<*"QX"( xFE Y=ҝ!ɕ7Tb O}\"""""""""mWWHoF scHƌG7r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977112 pygame-2.6.1/docs/generated/_static/pygame_powered.svg0000644000175100001770000031064314676242340022472 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/_static/pygame_powered_lowres.png0000644000175100001770000053730714676242340024062 0ustar00runnerdockerPNG  IHDRe(4} pHYs.#.#x?vIIDATh[[h\EfIf5mMe[RPQЇ(X/Rԇo/mQJQTФ^bm^6p?;g̹593\& pαa~HW&v6}Kf󣌟o$Oa(py 1.WJc0qq+7 Zq_ÚB13!3f/'*4kƘr=q55*%ՇųYhXwI(.mԹnʵ}7ϗtb+\ۇٙ_1% U/a{0f.4mc/W>`<2ٍE޴C(Yzx3Q3yP2,,ٗM;sQydE[doqaC.@qV 8 d@N8]wu%n`8I9[1VYnˍgQλ|cטz «ǘKe;BMU~%2]xt>;4-=^L !#I(TGf7@Dud)1_B_O[0G.okO?gk%~Mag4Qv\EzDGkA=n,jh3!܌SǀwWCl?* %%4m P&k P"2Z eːu!ee |bhhJ)lQ١WԱ3P&M8GZXv;=$A\qy?3 89EpJ_ ebIP;/#>CGIY܄mh?!e}N-6?x[b]f &5AʾZm|kE^W<*)0^I|~|1-!H$2qKB/P\^lsȞ>8V>voO>%hji4=izFs^λ-uH骦Z=>6GD&]#%H2}>cc6 sCUxGTsCdUJfN6!NLŘ|`ݵQo.p)T(bi2y`@p;%/**;v9lNIxZu`@"ghʨa*щAqJ2+m /<¬Uve2+pdGʷVjT{TGT|q ?U {YAOSx3 qUl7t s{ܦ-7:n¯W3\g 8mT `+]/u iVRܔZe?p;>/:-үn'}O]sԲ_-~`Yob+ƹ\%Ҕ]ฦ>q@nLtʍ9åyp~G!T#r!*ӕe"X vg'v6l^N<,^o?^ϕ;**zW]GxS&wND(=5{(P!*ĕ(DDDDDDDDDD}~*^Voy^ clFđDO T]}RCN[ڀ*S?l*b*d^ٴ Ac*X]3=&QmT|!nN@T6fs].)?fۀ=Y=ڍ*.Wђ]cC<4B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pg@M$ G(p3>(zB@G&k$ 8EgeE Y>X!$eIY >^SAA  qL:MFcY8\9 庤FnpHAi@R=-cMbYd> YEPʲ (#F Kr$j"Vk55wˌyq?aIVJ^F,3*GAAPhCeY+2V(ib%oX>H4Ћ׎Հcz0"}eDsYiϠ$V3+﷊`FF3| EzdWdkOG  +V i,i Kþ-@Y}|ʋC4F@_$/YV/Y>hdBHRX@׮*g҃X"Z0OY@WjXz+\-g   ƒd  @ZX m@C$Іx.XF;ogv,:1S},dZ5PM|BD/ OJYVXA;X  pe#g,Apݠv踋F&)`ى#Ybh '3*HP&u Y VCg静62=3bG= =DeYpa }D eRNAAfƂc Ʊ3=Vc/ _(ݢwhcV%_u.fY5\+Xf~x3g208oF[S7e7u +wuˮa[,AAA*GMP.Rn8ǰd92e^Z@H ,T y8 pJYVzNðE2K @P8 6sP _a!M SYBB迃0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/_static/pygame_tiny.png0000644000175100001770000003571614676242340022002 0ustar00runnerdockerPNG  IHDR<BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs.!.![NiTXtXML:com.adobe.xmp Pygame Logo Trace {A4IDATx^|TU>ܹ{!@BRHQTPQDֲv׮ꢋETl(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-q -i}ǀ= hEBYQh:^mPA vvذ:l '@/fu73Zw%!(:DxRj3.@y i *Rjܮbr]/#ipI]v>' Eȏ3*~^ۙ\BnKQBy{)ԕuEzT#XCz;= 6 A:$E`ϳdQ?J惷ѭ e\Mm"Jje }U7+0|3A}r`0,TT"k12\?;o%&"}K(U Ψ!BG⩂ lU?8?x/TL0*Jj#.*=ڄP//J_>mZsAAyRgA(9ʂu@=:ֈQpb"yi3x7U?7<4-al{jf>;0%.F,X@U1DD+yw?/S.ݫ{P F|_ͯX &?{,ei8*EC=@yn(OL2a4=` Z~1P#rixj(~L>!/C@ɯDxɪo|S M -|B̹ZI57WԥGC!~# [_4u '?wO7'@Ļ#Ǽ4cqG/3.8*0oiHK>Iui".c}떸7syҗ'!ߚ'm/ (| GX+&_ս1?%ړ_,}}D!9vCϙR>_p?KLjަZy[ݼ { const [docname, title, anchor, descr, score, filename] = result return score }, */ // query matches the full name of an object objNameMatch: 11, // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object objPrio: { 0: 15, // used to be importantResults 1: 5, // used to be objectResults 2: -5, // used to be unimportantResults }, // Used when the priority is not in the mapping. objPrioDefault: 0, // query found in title title: 15, partialTitle: 7, // query found in terms term: 5, partialTerm: 2, }; } const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; /** * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping */ const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { // dirhtml builder let dirname = docName + "/"; if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; // highlight search terms in the description if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { if (data) listItem.appendChild( Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; const _finishSearch = (resultCount) => { Search.stopPulse(); Search.title.innerText = _("Search Results"); if (!resultCount) Search.status.innerText = Documentation.gettext( "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else Search.status.innerText = _( "Search finished, found ${resultCount} page(s) matching the search query." ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, resultCount, searchTerms, highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } // search finished, update title and status message else _finishSearch(resultCount); }; // Helper function used by query() to order search results. // Each input is an array of [docname, title, anchor, descr, score, filename]. // Order the results by score (in opposite order of appearance, since the // `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. const _orderResultsByScoreThenName = (a, b) => { const leftScore = a[4]; const rightScore = b[4]; if (leftScore === rightScore) { // same score: sort alphabetically const leftTitle = a[1].toLowerCase(); const rightTitle = b[1].toLowerCase(); if (leftTitle === rightTitle) return 0; return leftTitle > rightTitle ? -1 : 1; // inverted is intentional } return leftScore > rightScore ? 1 : -1; }; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a * custom function per language. * * The regular expression works by splitting the string on consecutive characters * that are not Unicode letters, numbers, underscores, or emoji characters. * This is the same as ``\W+`` in Python, preserving the surrogate pair area. */ if (typeof splitQuery === "undefined") { var splitQuery = (query) => query .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) .filter(term => term) // remove remaining empty strings } /** * Search Module */ const Search = { _index: null, _queued_query: null, _pulse_status: -1, htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); for (const removalQuery of [".headerlink", "script", "style"]) { htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); } if (anchor) { const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); if (anchorContent) return anchorContent.textContent; console.warn( `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` ); } // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); if (docContent) return docContent.textContent; console.warn( "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, init: () => { const query = new URLSearchParams(window.location.search).get("q"); document .querySelectorAll('input[name="q"]') .forEach((el) => (el.value = query)); if (query) Search.performSearch(query); }, loadIndex: (url) => (document.body.appendChild(document.createElement("script")).src = url), setIndex: (index) => { Search._index = index; if (Search._queued_query !== null) { const query = Search._queued_query; Search._queued_query = null; Search.query(query); } }, hasIndex: () => Search._index !== null, deferQuery: (query) => (Search._queued_query = query), stopPulse: () => (Search._pulse_status = -1), startPulse: () => { if (Search._pulse_status >= 0) return; const pulse = () => { Search._pulse_status = (Search._pulse_status + 1) % 4; Search.dots.innerText = ".".repeat(Search._pulse_status); if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); }; pulse(); }, /** * perform a search for something (or wait until index is loaded) */ performSearch: (query) => { // create the required interface elements const searchText = document.createElement("h2"); searchText.textContent = _("Searching"); const searchSummary = document.createElement("p"); searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); searchList.classList.add("search"); const out = document.getElementById("search-results"); Search.title = out.appendChild(searchText); Search.dots = Search.title.appendChild(document.createElement("span")); Search.status = out.appendChild(searchSummary); Search.output = out.appendChild(searchList); const searchProgress = document.getElementById("search-progress"); // Some themes don't use the search progress node if (searchProgress) { searchProgress.innerText = _("Preparing search..."); } Search.startPulse(); // index already loaded, the browser was quick! if (Search.hasIndex()) Search.query(query); else Search.deferQuery(query); }, _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); const excludedTerms = new Set(); const highlightTerms = new Set(); const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); splitQuery(query.trim()).forEach((queryTerm) => { const queryTermLower = queryTerm.toLowerCase(); // maybe skip this "word" // stopwords array is from language_data.js if ( stopwords.indexOf(queryTermLower) !== -1 || queryTerm.match(/^\d+$/) ) return; // stem the word let word = stemmer.stemWord(queryTermLower); // select the correct list if (word[0] === "-") excludedTerms.add(word.substr(1)); else { searchTerms.add(word); highlightTerms.add(queryTermLower); } }); if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) } // console.debug("SEARCH: searching for:"); // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; }, /** * execute search (requires search index to be loaded) */ _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { const filenames = Search._index.filenames; const docNames = Search._index.docnames; const titles = Search._index.titles; const allTitles = Search._index.alltitles; const indexEntries = Search._index.indexentries; // Collect multiple result groups to be sorted separately and then ordered. // Each is an array of [docname, title, anchor, descr, score, filename]. const normalResults = []; const nonMainIndexResults = []; _removeChildren(document.getElementById("search-progress")); const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { const score = Math.round(Scorer.title * queryLower.length / title.length); const boost = titles[file] === title ? 1 : 0; // add a boost for document titles normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, score + boost, filenames[file], ]); } } } // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { for (const [file, id, isMain] of foundEntries) { const score = Math.round(100 * queryLower.length / entry.length); const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], ]; if (isMain) { normalResults.push(result); } else { nonMainIndexResults.push(result); } } } } // lookup as object objectTerms.forEach((term) => normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function if (Scorer.score) { normalResults.forEach((item) => (item[4] = Scorer.score(item))); nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); } // Sort each group of results by score and then alphabetically by name. normalResults.sort(_orderResultsByScoreThenName); nonMainIndexResults.sort(_orderResultsByScoreThenName); // Combine the result groups in (reverse) order. // Non-main index entries are typically arbitrary cross-references, // so display them after other results. let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept let seen = new Set(); results = results.reverse().reduce((acc, result) => { let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); if (!seen.has(resultStr)) { acc.push(result); seen.add(resultStr); } return acc; }, []); return results.reverse(); }, query: (query) => { const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy // console.info("search results:", Search.lastresults); // print the results _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** * search for object names */ performObjectSearch: (object, objectTerms) => { const filenames = Search._index.filenames; const docNames = Search._index.docnames; const objects = Search._index.objects; const objNames = Search._index.objnames; const titles = Search._index.titles; const results = []; const objectSearchCallback = (prefix, match) => { const name = match[4] const fullname = (prefix ? prefix + "." : "") + name; const fullnameLower = fullname.toLowerCase(); if (fullnameLower.indexOf(object) < 0) return; let score = 0; const parts = fullnameLower.split("."); // check for different match types: exact matches of full name or // "last name" (i.e. last dotted part) if (fullnameLower === object || parts.slice(-1)[0] === object) score += Scorer.objNameMatch; else if (parts.slice(-1)[0].indexOf(object) > -1) score += Scorer.objPartialMatch; // matches in last name const objName = objNames[match[1]][2]; const title = titles[match[0]]; // If more than one term searched for, we require other words to be // found in the name/title/description const otherTerms = new Set(objectTerms); otherTerms.delete(object); if (otherTerms.size > 0) { const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); if ( [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) ) return; } let anchor = match[3]; if (anchor === "") anchor = fullname; else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; const descr = objName + _(", in ") + title; // add custom score for some objects according to scorer if (Scorer.objPrio.hasOwnProperty(match[2])) score += Scorer.objPrio[match[2]]; else score += Scorer.objPrioDefault; results.push([ docNames[match[0]], fullname, "#" + anchor, descr, score, filenames[match[0]], ]); }; Object.keys(objects).forEach((prefix) => objects[prefix].forEach((array) => objectSearchCallback(prefix, array) ) ); return results; }, /** * search for full-text terms in the index */ performTermsSearch: (searchTerms, excludedTerms) => { // prepare search const terms = Search._index.terms; const titleTerms = Search._index.titleterms; const filenames = Search._index.filenames; const docNames = Search._index.docnames; const titles = Search._index.titles; const scoreMap = new Map(); const fileMap = new Map(); // perform the search on the required terms searchTerms.forEach((word) => { const files = []; const arr = [ { files: terms[word], score: Scorer.term }, { files: titleTerms[word], score: Scorer.title }, ]; // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); if (!terms.hasOwnProperty(word)) { Object.keys(terms).forEach((term) => { if (term.match(escapedWord)) arr.push({ files: terms[term], score: Scorer.partialTerm }); }); } if (!titleTerms.hasOwnProperty(word)) { Object.keys(titleTerms).forEach((term) => { if (term.match(escapedWord)) arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); }); } } // no match but word was a required one if (arr.every((record) => record.files === undefined)) return; // found search word in contents arr.forEach((record) => { if (record.files === undefined) return; let recordFiles = record.files; if (recordFiles.length === undefined) recordFiles = [recordFiles]; files.push(...recordFiles); // set score for the word in each file recordFiles.forEach((file) => { if (!scoreMap.has(file)) scoreMap.set(file, {}); scoreMap.get(file)[word] = record.score; }); }); // create the mapping files.forEach((file) => { if (!fileMap.has(file)) fileMap.set(file, [word]); else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); // now check if the files don't contain excluded terms const results = []; for (const [file, wordList] of fileMap) { // check if all requirements are matched // as search terms with length < 3 are discarded const filteredTermCount = [...searchTerms].filter( (term) => term.length > 2 ).length; if ( wordList.length !== searchTerms.size && wordList.length !== filteredTermCount ) continue; // ensure that none of the excluded terms is in the search result if ( [...excludedTerms].some( (term) => terms[term] === file || titleTerms[term] === file || (terms[term] || []).includes(file) || (titleTerms[term] || []).includes(file) ) ) break; // select one (max) score for the file. const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); // add result to the result list results.push([ docNames[file], titles[file], "", null, score, filenames[file], ]); } return results; }, /** * helper function to return a node containing the * search summary for a given text. keywords is a list * of stemmed words. */ makeSearchSummary: (htmlText, keywords, anchor) => { const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); const actualStartPosition = [...keywords] .map((k) => textLower.indexOf(k.toLowerCase())) .filter((i) => i > -1) .slice(-1)[0]; const startWithContext = Math.max(actualStartPosition - 120, 0); const top = startWithContext === 0 ? "" : "..."; const tail = startWithContext + 240 < text.length ? "..." : ""; let summary = document.createElement("p"); summary.classList.add("context"); summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; return summary; }, }; _ready(Search.init); ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/_static/sphinx_highlight.js0000644000175100001770000001200314676242412022625 0ustar00runnerdocker/* Highlighting utilities for Sphinx HTML documentation. */ "use strict"; const SPHINX_HIGHLIGHT_ENABLED = true /** * highlight a given string on a node by wrapping it in * span elements with the given class name. */ const _highlight = (node, addItems, text, className) => { if (node.nodeType === Node.TEXT_NODE) { const val = node.nodeValue; const parent = node.parentNode; const pos = val.toLowerCase().indexOf(text); if ( pos >= 0 && !parent.classList.contains(className) && !parent.classList.contains("nohighlight") ) { let span; const closestNode = parent.closest("body, svg, foreignObject"); const isInSVG = closestNode && closestNode.matches("svg"); if (isInSVG) { span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); } else { span = document.createElement("span"); span.classList.add(className); } span.appendChild(document.createTextNode(val.substr(pos, text.length))); const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); /* There may be more occurrences of search term in this node. So call this * function recursively on the remaining fragment. */ _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( "http://www.w3.org/2000/svg", "rect" ); const bbox = parent.getBBox(); rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute("class", className); addItems.push({ parent: parent, target: rect }); } } } else if (node.matches && !node.matches("button, select, textarea")) { node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); } }; const _highlightText = (thisNode, text, className) => { let addItems = []; _highlight(thisNode, addItems, text, className); addItems.forEach((obj) => obj.parent.insertAdjacentElement("beforebegin", obj.target) ); }; /** * Small JavaScript module for the documentation. */ const SphinxHighlight = { /** * highlight the search words provided in localstorage in the text */ highlightSearchWords: () => { if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight // get and clear terms from localstorage const url = new URL(window.location); const highlight = localStorage.getItem("sphinx_highlight_terms") || url.searchParams.get("highlight") || ""; localStorage.removeItem("sphinx_highlight_terms") url.searchParams.delete("highlight"); window.history.replaceState({}, "", url); // get individual terms from highlight string const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); if (terms.length === 0) return; // nothing to do // There should never be more than one element matching "div.body" const divBody = document.querySelectorAll("div.body"); const body = divBody.length ? divBody[0] : document.querySelector("body"); window.setTimeout(() => { terms.forEach((term) => _highlightText(body, term, "highlighted")); }, 10); const searchBox = document.getElementById("searchbox"); if (searchBox === null) return; searchBox.appendChild( document .createRange() .createContextualFragment( '

" ) ); }, /** * helper function to hide the search marks again */ hideSearchWords: () => { document .querySelectorAll("#searchbox .highlight-link") .forEach((el) => el.remove()); document .querySelectorAll("span.highlighted") .forEach((el) => el.classList.remove("highlighted")); localStorage.removeItem("sphinx_highlight_terms") }, initEscapeListener: () => { // only install a listener if it is really needed if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; document.addEventListener("keydown", (event) => { // bail for input elements if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; // bail with special keys if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { SphinxHighlight.hideSearchWords(); event.preventDefault(); } }); }, }; _ready(() => { /* Do not call highlightSearchWords() when we are on the search page. * It will highlight words from the *previous* search query. */ if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); SphinxHighlight.initEscapeListener(); }); ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/_static/tooltip.css0000644000175100001770000000143614676242340021143 0ustar00runnerdocker/* Implement hyperlink tooltips * * Adapted from "Sexy Tooltips with Just CSS" * http://sixrevisions.com/css/css-only-tooltips/ */ .tooltip { cursor: help; text-decoration: none; position: relative; } .tooltip span.tooltip-content { margin-left: -999em; position: absolute; } .tooltip:hover span.tooltip-content { position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; } .tooltip:hover img { border: 0; margin: -10px 0 0 -55px; float: left; position: absolute; } .tooltip:hover em { font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; display: block; padding: 0.2em 0 0.6em 0; } .classic { padding: 0.8em 1em; } .custom { padding: 0.5em 0.8em 0.8em 2em; } * html a:hover { background: transparent; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0101256 pygame-2.6.1/docs/generated/c_api/0000755000175100001770000000000014676242436016366 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9021404 pygame-2.6.1/docs/generated/c_api/base.html0000644000175100001770000007624214676242422020174 0ustar00runnerdocker High level API exported by pygame.base — pygame v2.6.1 documentation

src_c/base.c

This extension module defines general purpose routines for starting and stopping SDL as well as various conversion routines uses elsewhere in pygame.

C header: src_c/include/pygame.h

PyObject *pgExc_SDLError

This is pygame.error, the exception type used to raise SDL errors.

int pg_mod_autoinit(const char *modname)

Inits a pygame module, which has the name modname Return 1 on success, 0 on error, with python error set.

void pg_mod_autoquit(const char *modname)

Quits a pygame module, which has the name modname

void pg_RegisterQuit(void (*f)(void))

Register function f as a callback on Pygame termination. Multiple functions can be registered. Functions are called in the reverse order they were registered.

int pg_IntFromObj(PyObject *obj, int *val)

Convert number like object obj to C int and place in argument val. Return 1 on success, else 0. No Python exceptions are raised.

int pg_IntFromObjIndex(PyObject *obj, int index, int *val)

Convert number like object at position i in sequence obj to C int and place in argument val. Return 1 on success, 0 on failure. No Python exceptions are raised.

int pg_TwoIntsFromObj(PyObject *obj, int *val1, int *v2)

Convert the two number like objects in length 2 sequence obj to C int and place in arguments val1 and val2 respectively. Return 1 on success, 0 on failure. No Python exceptions are raised.

int pg_FloatFromObj(PyObject *obj, float *val)

Convert number like object obj to C float and place in argument val. Returns 1 on success, 0 on failure. No Python exceptions are raised.

int pg_FloatFromObjIndex(PyObject *obj, int index, float *val)

Convert number like object at position i in sequence obj to C float and place in argument val. Return 1 on success, else 0. No Python exceptions are raised.

int pg_TwoFloatsFromObj(PyObject *obj, float *val1, float *val2)

Convert the two number like objects in length 2 sequence obj to C float and place in arguments val1 and val2 respectively. Return 1 on success, else 0. No Python exceptions are raised.

int pg_UintFromObj(PyObject *obj, Uint32 *val)

Convert number like object obj to unsigned 32 bit integer and place in argument val. Return 1 on success, else 0. No Python exceptions are raised.

int pg_UintFromObjIndex(PyObject *obj, int _index, Uint32 *val)

Convert number like object at position i in sequence obj to unsigned 32 bit integer and place in argument val. Return 1 on success, else 0. No Python exceptions are raised.

int pg_RGBAFromObj(PyObject *obj, Uint8 *RGBA)

Convert the color represented by object obj into a red, green, blue, alpha length 4 C array RGBA. The object must be a length 3 or 4 sequence of numbers having values between 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is assumed. Return 1 on success, 0 otherwise. No Python exceptions are raised.

type pg_buffer
Py_buffer view

A standard buffer description

PyObject *consumer

The object holding the buffer

pybuffer_releaseproc release_buffer

A buffer release callback.

PyObject *pgExc_BufferError

Python exception type raised for any pg_buffer related errors.

PyObject *pgBuffer_AsArrayInterface(Py_buffer *view_p)

Return a Python array interface object representation of buffer view_p. On failure raise a Python exception and return NULL.

PyObject *pgBuffer_AsArrayStruct(Py_buffer *view_p)

Return a Python array struct object representation of buffer view_p. On failure raise a Python exception and return NULL.

int pgObject_GetBuffer(PyObject *obj, pg_buffer *pg_view_p, int flags)

Request a buffer for object obj. Argument flags are PyBUF options. Return the buffer description in pg_view_p. An object may support the Python buffer interface, the NumPy array interface, or the NumPy array struct interface. Return 0 on success, raise a Python exception and return -1 on failure.

void pgBuffer_Release(Pg_buffer *pg_view_p)

Release the Pygame pg_view_p buffer.

int pgDict_AsBuffer(Pg_buffer *pg_view_p, PyObject *dict, int flags)

Write the array interface dictionary buffer description dict into a Pygame buffer description struct pg_view_p. The flags PyBUF options describe the view type requested. Return 0 on success, or raise a Python exception and return -1 on failure.

void import_pygame_base()

Import the pygame.base module C API into an extension module. On failure raise a Python exception.

SDL_Window *pg_GetDefaultWindow(void)

Return the Pygame default SDL window created by a pygame.display.set_mode() call, or NULL.

void pg_SetDefaultWindow(SDL_Window *win)

Replace the Pygame default window with win. The previous window, if any, is destroyed. Argument win may be NULL. This function is called by pygame.display.set_mode().

pgSurfaceObject *pg_GetDefaultWindowSurface(void)

Return a borrowed reference to the Pygame default window display surface, or NULL if no default window is open.

void pg_SetDefaultWindowSurface(pgSurfaceObject *screen)

Replace the Pygame default display surface with object screen. The previous surface object, if any, is invalidated. Argument screen may be NULL. This functions is called by pygame.display.set_mode().




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9171405 pygame-2.6.1/docs/generated/c_api/bufferproxy.html0000644000175100001770000002675214676242422021636 0ustar00runnerdocker Class BufferProxy API exported by pygame.bufferproxy — pygame v2.6.1 documentation

src_c/bufferproxy.c

This extension module defines Python type pygame.BufferProxypygame object to export a surface buffer through an array protocol.

Header file: src_c/include/pygame_bufferproxy.h

PyTypeObject *pgBufproxy_Type

The pygame buffer proxy object type pygame.BufferProxy.

int pgBufproxy_Check(PyObject *x)

Return true if Python object x is a pygame.BufferProxy instance, false otherwise. This will return false on pygame.BufferProxy subclass instances as well.

PyObject *pgBufproxy_New(PyObject *obj, getbufferproc get_buffer)

Return a new pygame.BufferProxy instance. Argument obj is the Python object that has its data exposed. It may be NULL. Argument get_buffer is the pg_buffer get callback. It must not be NULL. On failure raise a Python error and return NULL.

PyObject *pgBufproxy_GetParent(PyObject *obj)

Return the Python object wrapped by buffer proxy obj. Argument obj must not be NULL. On failure, raise a Python error and return NULL.

int pgBufproxy_Trip(PyObject *obj)

Cause the buffer proxy object obj to create a pg_buffer view of its parent. Argument obj must not be NULL. Return 0 on success, otherwise raise a Python error and return -1.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9301403 pygame-2.6.1/docs/generated/c_api/color.html0000644000175100001770000002375514676242422020401 0ustar00runnerdocker Class Color API exported by pygame.color — pygame v2.6.1 documentation

src_c/color.c

This extension module defines the Python type pygame.Colorpygame object for color representations.

Header file: src_c/include/pygame.h

PyTypeObject *pgColor_Type

The Pygame color object type pygame.Color.

int pgColor_Check(PyObject *obj)

Return true if obj is an instance of type pgColor_Type, but not a pgColor_Type subclass instance. This macro does not check if obj is not NULL or indeed a Python type.

PyObject *pgColor_New(Uint8 rgba[])

Return a new pygame.Color instance for the the four element array rgba. On failure, raise a Python exception and return NULL.

PyObject *pgColor_NewLength(Uint8 rgba[], Uint8 length)

Return a new pygame.Color instance having length elements, with element values taken from the first length elements of array rgba. Argument length must be between 1 and 4 inclusive. On failure, raise a Python exception and return NULL.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9441404 pygame-2.6.1/docs/generated/c_api/display.html0000644000175100001770000002470014676242422020717 0ustar00runnerdocker API exported by pygame.display — pygame v2.6.1 documentation

src_c/display.c

This is the pygame.displaypygame module to control the display window and screen extension module.

Header file: src_c/include/pygame.h

type pgVidInfoObject

A pygame object that wraps an SDL_VideoInfo struct. The object returned by pygame.display.Info().

PyTypeObject *pgVidInfo_Type

The pgVidInfoObject object Python type.

SDL_VideoInfo pgVidInfo_AsVidInfo(PyObject *obj)

Return the SDL_VideoInfo field of obj, a pgVidInfo_Type instance. This macro does not check that obj is not NULL or an actual pgVidInfoObject object.

PyObject *pgVidInfo_New(SDL_VideoInfo *i)

Return a new pgVidInfoObject object for the SDL_VideoInfo i. On failure, raise a Python exception and return NULL.

int pgVidInfo_Check(PyObject *x)

Return true if x is a pgVidInfo_Type instance

Will return false if x is a subclass of pgVidInfo_Type. This macro does not check that x is not NULL.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9591403 pygame-2.6.1/docs/generated/c_api/event.html0000644000175100001770000002657314676242422020405 0ustar00runnerdocker API exported by pygame.event — pygame v2.6.1 documentation

src_c/event.c

The extension module pygame.eventpygame module for interacting with events and queues.

Header file: src_c/include/pygame.h

type pgEventObject

The pygame.event.EventType object C struct.

int type

The event type code.

type pgEvent_Type

The pygame event object type pygame.event.EventType.

int pgEvent_Check(PyObject *x)

Return true if x is a pygame event instance

Will return false if x is a subclass of event. This is a macro. No check is made that x is not NULL.

PyObject *pgEvent_New(SDL_Event *event)

Return a new pygame event instance for the SDL event. If event is NULL then create an empty event object. On failure raise a Python exception and return NULL.

PyObject *pgEvent_New2(int type, PyObject *dict)

Return a new pygame event instance of SDL type and with attribute dictionary dict. If dict is NULL an empty attribute dictionary is created. On failure raise a Python exception and return NULL.

int pgEvent_FillUserEvent(pgEventObject *e, SDL_Event *event)

Fill SDL event event with information from pygame user event instance e. Return 0 on success, -1 otherwise.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9731402 pygame-2.6.1/docs/generated/c_api/freetype.html0000644000175100001770000002557314676242422021106 0ustar00runnerdocker API exported by pygame._freetype — pygame v2.6.1 documentation

src_c/_freetype.c

This extension module defines Python type pygame.freetype.FontCreate a new Font instance from a supported font file..

Header file: src_c/include/pygame_freetype.h

type pgFontObject

The pygame.freetype.Font instance C struct.

type pgFont_Type

The pygame.freetype.Font Python type.

PyObject *pgFont_New(const char *filename, long font_index)

Open the font file with path filename and return a new new pygame.freetype.Font instance for that font. Set font_index to 0 unless the file contains multiple, indexed, fonts. On error raise a Python exception and return NULL.

int pgFont_Check(PyObject *x)

Return true if x is a pygame.freetype.Font instance. Will return false for a subclass of Font. This is a macro. No check is made that x is not NULL.

int pgFont_IS_ALIVE(PyObject *o)

Return true if pygame.freetype.Font object o is an open font file. This is a macro. No check is made that o is not NULL or not a Font instance.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.9901404 pygame-2.6.1/docs/generated/c_api/mixer.html0000644000175100001770000003534514676242422020405 0ustar00runnerdocker API exported by pygame.mixer — pygame v2.6.1 documentation

src_c/mixer.c

Python types and module startup/shutdown functions defined in the pygame.mixerpygame module for loading and playing sounds extension module.

Header file: src_c/include/pygame_mixer.h

type pgSoundObject

The pygame.mixer.Sound instance C structure.

PyTypeObject *pgSound_Type

The pygame.mixer.Sound Python type.

PyObject *pgSound_New(Mix_Chunk *chunk)

Return a new pygame.mixer.Sound instance for the SDL mixer chunk chunk. On failure, raise a Python exception and return NULL.

int pgSound_Check(PyObject *obj)

Return true if obj is an instance of type pgSound_Type, but not a pgSound_Type subclass instance. A macro.

Mix_Chunk *pgSound_AsChunk(PyObject *x)

Return the SDL Mix_Chunk struct associated with the pgSound_Type instance x. A macro that does no NULL or Python type check on x.

type pgChannelObject

The pygame.mixer.Channel instance C structure.

PyTypeObject *pgChannel_Type

The pygame.mixer.Channel Python type.

PyObject *pgChannel_New(int channelnum)

Return a new pygame.mixer.Channel instance for the SDL mixer channel channelnum. On failure, raise a Python exception and return NULL.

int pgChannel_Check(PyObject *obj)

Return true if obj is an instance of type pgChannel_Type, but not a pgChannel_Type subclass instance. A macro.

int pgChannel_AsInt(PyObject *x)

Return the SDL mixer music channel number associated with pgChannel_Type instance x. A macro that does no NULL or Python type check on x.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0081403 pygame-2.6.1/docs/generated/c_api/rect.html0000644000175100001770000003241114676242422020205 0ustar00runnerdocker Class Rect API exported by pygame.rect — pygame v2.6.1 documentation

src_c/rect.c

This extension module defines Python type pygame.Rectpygame object for storing rectangular coordinates.

Header file: src_c/include/pygame.h

type pgRectObject
SDL_Rect r

The Pygame rectangle type instance.

PyTypeObject *pgRect_Type

The Pygame rectangle object type pygame.Rect.

SDL_Rect pgRect_AsRect(PyObject *obj)

A macro to access the SDL_Rect field of a pygame.Rect instance.

PyObject *pgRect_New(SDL_Rect *r)

Return a new pygame.Rect instance from the SDL_Rect r. On failure, raise a Python exception and return NULL.

PyObject *pgRect_New4(int x, int y, int w, int h)

Return a new pygame.Rect instance with position (x, y) and size (w, h). On failure raise a Python exception and return NULL.

SDL_Rect *pgRect_FromObject(PyObject *obj, SDL_Rect *temp)

Translate a Python rectangle representation as a Pygame SDL_Rect. A rectangle can be a length 4 sequence integers (x, y, w, h), or a length 2 sequence of position (x, y) and size (w, h), or a length 1 tuple containing a rectangle representation, or have a method rect that returns a rectangle. Pass a pointer to a locally declared SDL_Rect as temp. Do not rely on this being filled in; use the function's return value instead. On success, return a pointer to a SDL_Rect representation of the rectangle, else return NULL. No Python exceptions are raised.

void pgRect_Normalize(SDL_Rect *rect)

Normalize the given rect. A rect with a negative size (negative width and/or height) will be adjusted to have a positive size.

int pgRect_Check(PyObject *obj)

A macro to check if obj is a pygame.Rect instance.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0281403 pygame-2.6.1/docs/generated/c_api/rwobject.html0000644000175100001770000003525314676242422021076 0ustar00runnerdocker API exported by pygame.rwobject — pygame v2.6.1 documentation

src_c/rwobject.c

This extension module implements functions for wrapping a Python file like object in a SDL_RWops struct for SDL file access.

Header file: src_c/include/pygame.h

SDL_RWops *pgRWops_FromObject(PyObject *obj, char **extptr)

Return a SDL_RWops struct filled to access obj. If obj is a string then let SDL open the file it names. Otherwise, if obj is a Python file-like object then use its read, write, seek, tell, and close methods. If threads are available, the Python GIL is acquired before calling any of the obj methods. If you want to see the file extension, you can pass in a char double pointer that will be populated to a dynamically allocated string or NULL. Caller is responsible for freeing the extension string. It is safe to pass NULL if you don't care about the file extension. On error raise a Python exception and return NULL. If NULL is returned, the extptr will not be populated with dynamic memory, it is not necessary to free in that error handling.

SDL_RWops *pgRWops_FromFileObject(PyObject *obj)

Return a SDL_RWops struct filled to access the Python file-like object obj. Uses its read, write, seek, tell, and close methods. If threads are available, the Python GIL is acquired before calling any of the obj methods. On error raise a Python exception and return NULL.

int pgRWops_IsFileObject(SDL_RWops *rw)

Return true if rw is a Python file-like object wrapper returned by pgRWops_FromObject() or pgRWops_FromFileObject().

int pgRWops_ReleaseObject(SDL_RWops *context)

Free a SDL_RWops struct. If it is attached to a Python file-like object, decrement its refcount. Otherwise, close the file handle. Return 0 on success. On error, raise a Python exception and return a negative value.

PyObject *pg_EncodeFilePath(PyObject *obj, PyObject *eclass)

Return the file path obj as a byte string properly encoded for the OS. Null bytes are forbidden in the encoded file path. On error raise a Python exception and return NULL, using eclass as the exception type if it is not NULL. If obj is NULL assume an exception was already raised and pass it on.

PyObject *pg_EncodeString(PyObject *obj, const char *encoding, const char *errors, PyObject *eclass)

Return string obj as an encoded byte string. The C string arguments encoding and errors are the same as for PyUnicode_AsEncodedString(). On error raise a Python exception and return NULL, using eclass as the exception type if it is not NULL. If obj is NULL assume an exception was already raised and pass it on.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0381403 pygame-2.6.1/docs/generated/c_api/slots.html0000644000175100001770000001474414676242422020425 0ustar00runnerdocker Slots and c_api - Making functions and data available from other modules — pygame v2.6.1 documentation

One example is pg_RGBAFromObj where the implementation is defined in base.c, and also exported in base.c (and _pygame.h).

base.c has this exposing the pg_RGBAFromObj function to the c_api structure:

c_api[12] = pg_RGBAFromObj;

Then in src_c/include/_pygame.h there is an

#define pg_RGBAFromObj.

Also in _pygame.h, it needs to define the number of slots the base module uses. This is PYGAMEAPI_BASE_NUMSLOTS. So if you were adding another function, you need to increment this PYGAMEAPI_BASE_NUMSLOTS number.

Then to use the pg_RGBAFromObj in other files,

  1. include the "pygame.h" file,

  2. they have to make sure base is imported with:

    import_pygame_base();

Examples that use pg_RGBAFromObj are: _freetype.c, color.c, gfxdraw.c, and surface.c.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0561404 pygame-2.6.1/docs/generated/c_api/surface.html0000644000175100001770000003445114676242422020706 0ustar00runnerdocker Class Surface API exported by pygame.surface — pygame v2.6.1 documentation

src_c/surface.c

This extension module defines Python type pygame.Surfacepygame object for representing images.

Header file: src_c/include/pygame.h

type pgSurfaceObject

A pygame.Surface instance.

PyTypeObject *pgSurface_Type

The pygame.Surface Python type.

int pgSurface_Check(PyObject *x)

Return true if x is a pygame.Surface instance

Will return false if x is a subclass of Surface. This is a macro. No check is made that x is not NULL.

pgSurfaceObject *pgSurface_New(SDL_Surface *s)

Return a new new pygame surface instance for SDL surface s. Return NULL on error.

pgSurfaceObject *pgSurface_New2(SDL_Surface *s, int owner)

Return a new new pygame surface instance for SDL surface s. If owner is true, the surface will be freed when the python object is destroyed. Return NULL on error.

SDL_Surface *pgSurface_AsSurface(PyObject *x)

Return a pointer the SDL surface represented by the pygame Surface instance x.

This is a macro. Argument x is assumed to be a Surface, or subclass of Surface, instance.

int pgSurface_Blit(PyObject *dstobj, PyObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args)

Blit the srcrect portion of Surface srcobj onto Surface dstobj at srcobj

Argument the_args indicates the type of blit to perform: Normal blit (0), PYGAME_BLEND_ADD, PYGAME_BLEND_SUB, PYGAME_BLEND_SUB, PYGAME_BLEND_MULT, PYGAME_BLEND_MIN, PYGAME_BLEND_MAX, PYGAME_BLEND_RGBA_ADD, PYGAME_BLEND_RGBA_SUB, PYGAME_BLEND_RGBA_MULT, PYGAME_BLEND_RGBA_MIN, PYGAME_BLEND_RGBA_MAX, PYGAME_BLEND_ALPHA_SDL2 and PYGAME_BLEND_PREMULTIPLIED. Argument dstrect is updated to the actual area on dstobj affected by the blit.

The C version of the pygame.Surface.blit() method. Return 0 on success, -1 or -2` on an exception.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0761404 pygame-2.6.1/docs/generated/c_api/surflock.html0000644000175100001770000004014114676242422021077 0ustar00runnerdocker API exported by pygame.surflock — pygame v2.6.1 documentation

src_c/surflock.c

This extension module implements SDL surface locking for the pygame.Surfacepygame object for representing images type.

Header file: src_c/include/pygame.h

type pgLifetimeLockObject
PyObject *surface

An SDL locked pygame surface.

PyObject *lockobj

The Python object which owns the lock on the surface. This field does not own a reference to the object.

The lifetime lock type instance. A lifetime lock pairs a locked pygame surface with the Python object that locked the surface for modification. The lock is removed automatically when the lifetime lock instance is garbage collected.

PyTypeObject *pgLifetimeLock_Type

The pygame internal surflock lifetime lock object type.

int pgLifetimeLock_Check(PyObject *x)

Return true if Python object x is a pgLifetimeLock_Type instance, false otherwise. This will return false on pgLifetimeLock_Type subclass instances as well.

void pgSurface_Prep(pgSurfaceObject *surfobj)

If surfobj is a subsurface, then lock the parent surface with surfobj the owner of the lock.

void pgSurface_Unprep(pgSurfaceObject *surfobj)

If surfobj is a subsurface, then release its lock on the parent surface.

int pgSurface_Lock(pgSurfaceObject *surfobj)

Lock pygame surface surfobj, with surfobj owning its own lock.

int pgSurface_LockBy(pgSurfaceObject *surfobj, PyObject *lockobj)

Lock pygame surface surfobj with Python object lockobj the owning the lock.

The surface will keep a weak reference to object lockobj, and eventually remove the lock on itself if lockobj is garbage collected. However, it is best if lockobj also keep a reference to the locked surface and call to pgSurface_UnLockBy() when finished with the surface.

int pgSurface_UnLock(pgSurfaceObject *surfobj)

Remove the pygame surface surfobj object's lock on itself.

int pgSurface_UnLockBy(pgSurfaceObject *surfobj, PyObject *lockobj)

Remove the lock on pygame surface surfobj owned by Python object lockobj.

PyObject *pgSurface_LockLifetime(PyObject *surfobj, PyObject *lockobj)

Lock pygame surface surfobj for Python object lockobj and return a new pgLifetimeLock_Type instance for the lock.

This function is not called anywhere within pygame. It and pgLifetimeLock_Type are candidates for removal.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0851402 pygame-2.6.1/docs/generated/c_api/version.html0000644000175100001770000001746314676242422020747 0ustar00runnerdocker API exported by pygame.version — pygame v2.6.1 documentation

src_py/version.py

Header file: src_c/include/pygame.h

Version information can be retrieved at compile-time using these macros.

New in pygame 1.9.5.

PG_MAJOR_VERSION
PG_MINOR_VERSION
PG_PATCH_VERSION
PG_VERSIONNUM(MAJOR, MINOR, PATCH)

Returns an integer representing the given version.

PG_VERSION_ATLEAST(MAJOR, MINOR, PATCH)

Returns true if the current version is at least equal to the specified version.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.8641403 pygame-2.6.1/docs/generated/c_api.html0000644000175100001770000001622414676242422017254 0ustar00runnerdocker pygame C API — pygame v2.6.1 documentation ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0101256 pygame-2.6.1/docs/generated/doctrees/0000755000175100001770000000000014676242436017123 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0111258 pygame-2.6.1/docs/generated/doctrees/c_api/0000755000175100001770000000000014676242436020176 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.4041412 pygame-2.6.1/docs/generated/doctrees/c_api/base.doctree0000644000175100001770000022667514676242415022476 0ustar00runnerdocker&sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh highlightlang)}(hhh]h}(h]h]h]h]h!]langcforcelinenothresholduh%h*hhh&hh'8/home/runner/work/pygame/pygame/docs/reST/c_api/base.rsth)Kubh section)}(hhh](h title)}(h&High level API exported by pygame.baseh]h&High level API exported by pygame.base}hhAsbah}(h]h]h]h]h!]uh%h?hhint pg_FloatFromObjIndex(PyObject *obj, int index, float *val)h]h)}(h>int pg_FloatFromObjIndex(PyObject *obj, int index, float *val)h](j)}(hinth]hint}hj sbah}(h]h]jah]h]h!]uh%jhj h&hh'h9h)K@ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj h&hh'h9h)K@ubh)}(hpg_FloatFromObjIndexh]h)}(hpg_FloatFromObjIndexh]hpg_FloatFromObjIndex}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h](j j eh]h]h!]h#h$uh%hhj h&hh'h9h)K@ubj)}(h&(PyObject *obj, int index, float *val)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hj hщubc.pg_FloatFromObjIndexasbuh%hhj ubh)}(h h]h }hj0 sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hhh]h*}hj> sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hj4h]hobj}hjK sbah}(h]h]hah]h]h!]uh%hhj ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubj)}(h int indexh](j)}(hinth]hint}hjc sbah}(h]h]jah]h]h!]uh%jhj_ ubh)}(h h]h }hjq sbah}(h]h]hah]h]h!]uh%hhj_ ubh)}(hh~h]hindex}hj sbah}(h]h]hah]h]h!]uh%hhj_ ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubj)}(h float *valh](j)}(hfloath]hfloat}hj sbah}(h]h]jah]h]h!]uh%jhj ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hhh]h*}hj sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hjvh]hval}hj sbah}(h]h]hah]h]h!]uh%hhj ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubeh}(h]h]h]h]h!]h#h$j"uh%jhj h&hh'h9h)K@ubeh}(h]h]h]h]h!]h#h$juh%hjjhj h&hh'h9h)K@ubah}(h]j ah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)K@hj h&hubj')}(hhh]ha)}(hConvert number like object at position *i* in sequence *obj* to C float and place in argument *val*. Return ``1`` on success, else ``0``. No Python exceptions are raised.h](h'Convert number like object at position }hj sbjz)}(h*i*h]hi}hj sbah}(h]h]h]h]h!]uh%jyhj ubh in sequence }hj sbjz)}(h*obj*h]hobj}hj sbah}(h]h]h]h]h!]uh%jyhj ubh" to C float and place in argument }hj sbjz)}(h*val*h]hval}hj sbah}(h]h]h]h]h!]uh%jyhj ubh . Return }hj sbj8)}(h``1``h]h1}hj' sbah}(h]h]h]h]h!]uh%j7hj ubh on success, else }hj sbj8)}(h``0``h]h0}hj9 sbah}(h]h]h]h]h!]uh%j7hj ubh". No Python exceptions are raised.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)KBhj h&hubah}(h]h]h]h]h!]uh%j&hj h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjZ jsjZ jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h pg_TwoFloatsFromObj (C function)c.pg_TwoFloatsFromObjhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h@int pg_TwoFloatsFromObj(PyObject *obj, float *val1, float *val2)h]h)}(h@int pg_TwoFloatsFromObj(PyObject *obj, float *val1, float *val2)h](j)}(hinth]hint}hjw sbah}(h]h]jah]h]h!]uh%jhjs h&hh'h9h)KGubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhjs h&hh'h9h)KGubh)}(hpg_TwoFloatsFromObjh]h)}(hpg_TwoFloatsFromObjh]hpg_TwoFloatsFromObj}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h](j j eh]h]h!]h#h$uh%hhjs h&hh'h9h)KGubj)}(h)(PyObject *obj, float *val1, float *val2)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hj hщubc.pg_TwoFloatsFromObjasbuh%hhj ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hhh]h*}hj sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hj4h]hobj}hj sbah}(h]h]hah]h]h!]uh%hhj ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubj)}(h float *val1h](j)}(hfloath]hfloat}hj sbah}(h]h]jah]h]h!]uh%jhj ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hhh]h*}hj$ sbah}(h]h]hah]h]h!]uh%hhj ubh)}(hj{h]hval1}hj1 sbah}(h]h]hah]h]h!]uh%hhj ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubj)}(h float *val2h](j)}(hfloath]hfloat}hjI sbah}(h]h]jah]h]h!]uh%jhjE ubh)}(h h]h }hjW sbah}(h]h]hah]h]h!]uh%hhjE ubh)}(hhh]h*}hje sbah}(h]h]hah]h]h!]uh%hhjE ubh)}(hval2h]hval2}hjr sbah}(h]h]hah]h]h!]uh%hhjE ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubeh}(h]h]h]h]h!]h#h$j"uh%jhjs h&hh'h9h)KGubeh}(h]h]h]h]h!]h#h$juh%hjjhjo h&hh'h9h)KGubah}(h]jj ah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KGhjl h&hubj')}(hhh]ha)}(hConvert the two number like objects in length 2 sequence *obj* to C float and place in arguments *val1* and *val2* respectively. Return ``1`` on success, else ``0``. No Python exceptions are raised.h](h9Convert the two number like objects in length 2 sequence }hj sbjz)}(h*obj*h]hobj}hj sbah}(h]h]h]h]h!]uh%jyhj ubh# to C float and place in arguments }hj sbjz)}(h*val1*h]hval1}hj sbah}(h]h]h]h]h!]uh%jyhj ubh and }hj sbjz)}(h*val2*h]hval2}hj sbah}(h]h]h]h]h!]uh%jyhj ubh respectively. Return }hj sbj8)}(h``1``h]h1}hj sbah}(h]h]h]h]h!]uh%j7hj ubh on success, else }hj sbj8)}(h``0``h]h0}hj sbah}(h]h]h]h]h!]uh%j7hj ubh". No Python exceptions are raised.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)KIhj h&hubah}(h]h]h]h]h!]uh%j&hjl h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj jsj jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpg_UintFromObj (C function)c.pg_UintFromObjhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h.int pg_UintFromObj(PyObject *obj, Uint32 *val)h]h)}(h.int pg_UintFromObj(PyObject *obj, Uint32 *val)h](j)}(hinth]hint}hj*sbah}(h]h]jah]h]h!]uh%jhj&h&hh'h9h)KNubh)}(h h]h }hj8sbah}(h]h]hah]h]h!]uh%hhj&h&hh'h9h)KNubh)}(hpg_UintFromObjh]h)}(hpg_UintFromObjh]hpg_UintFromObj}hjJsbah}(h]h]hah]h]h!]uh%hhjFubah}(h]h](j j eh]h]h!]h#h$uh%hhj&h&hh'h9h)KNubj)}(h(PyObject *obj, Uint32 *val)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hjisbah}(h]h]hah]h]h!]uh%hhjfubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hjLhщubc.pg_UintFromObjasbuh%hhjbubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjbubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjbubh)}(hj4h]hobj}hjsbah}(h]h]hah]h]h!]uh%hhjbubeh}(h]h]h]h]h!]noemphh#h$uh%jhj^ubj)}(h Uint32 *valh](h)}(hhh]h)}(hUint32h]hUint32}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]jjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hjvh]hval}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhj^ubeh}(h]h]h]h]h!]h#h$j"uh%jhj&h&hh'h9h)KNubeh}(h]h]h]h]h!]h#h$juh%hjjhj"h&hh'h9h)KNubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KNhjh&hubj')}(hhh]ha)}(hConvert number like object *obj* to unsigned 32 bit integer and place in argument *val*. Return ``1`` on success, else ``0``. No Python exceptions are raised.h](hConvert number like object }hjsbjz)}(h*obj*h]hobj}hj'sbah}(h]h]h]h]h!]uh%jyhjubh2 to unsigned 32 bit integer and place in argument }hjsbjz)}(h*val*h]hval}hj9sbah}(h]h]h]h]h!]uh%jyhjubh . Return }hjsbj8)}(h``1``h]h1}hjKsbah}(h]h]h]h]h!]uh%j7hjubh on success, else }hjsbj8)}(h``0``h]h0}hj]sbah}(h]h]h]h]h!]uh%j7hjubh". No Python exceptions are raised.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)KPhjh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj~jsj~jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h pg_UintFromObjIndex (C function)c.pg_UintFromObjIndexhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h?int pg_UintFromObjIndex(PyObject *obj, int _index, Uint32 *val)h]h)}(h?int pg_UintFromObjIndex(PyObject *obj, int _index, Uint32 *val)h](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)KUubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)KUubh)}(hpg_UintFromObjIndexh]h)}(hpg_UintFromObjIndexh]hpg_UintFromObjIndex}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)KUubj)}(h((PyObject *obj, int _index, Uint32 *val)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hjhщubc.pg_UintFromObjIndexasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hj4h]hobj}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h int _indexh](j)}(hinth]hint}hj,sbah}(h]h]jah]h]h!]uh%jhj(ubh)}(h h]h }hj:sbah}(h]h]hah]h]h!]uh%hhj(ubh)}(h_indexh]h_index}hjHsbah}(h]h]hah]h]h!]uh%hhj(ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h Uint32 *valh](h)}(hhh]h)}(hjh]hUint32}hjdsbah}(h]h]hah]h]h!]uh%hhjaubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]jjasbuh%hhj]ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhj]ubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhj]ubh)}(hjvh]hval}hjsbah}(h]h]hah]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$j"uh%jhjh&hh'h9h)KUubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)KUubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KUhjh&hubj')}(hhh]ha)}(hConvert number like object at position *i* in sequence *obj* to unsigned 32 bit integer and place in argument *val*. Return ``1`` on success, else ``0``. No Python exceptions are raised.h](h'Convert number like object at position }hjsbjz)}(h*i*h]hi}hjsbah}(h]h]h]h]h!]uh%jyhjubh in sequence }hjsbjz)}(h*obj*h]hobj}hjsbah}(h]h]h]h]h!]uh%jyhjubh2 to unsigned 32 bit integer and place in argument }hjsbjz)}(h*val*h]hval}hjsbah}(h]h]h]h]h!]uh%jyhjubh . Return }hjsbj8)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%j7hjubh on success, else }hjsbj8)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%j7hjubh". No Python exceptions are raised.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)KWhjh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj5jsj5jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpg_RGBAFromObj (C function)c.pg_RGBAFromObjhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h.int pg_RGBAFromObj(PyObject *obj, Uint8 *RGBA)h]h)}(h.int pg_RGBAFromObj(PyObject *obj, Uint8 *RGBA)h](j)}(hinth]hint}hjRsbah}(h]h]jah]h]h!]uh%jhjNh&hh'h9h)K\ubh)}(h h]h }hj`sbah}(h]h]hah]h]h!]uh%hhjNh&hh'h9h)K\ubh)}(hpg_RGBAFromObjh]h)}(hpg_RGBAFromObjh]hpg_RGBAFromObj}hjrsbah}(h]h]hah]h]h!]uh%hhjnubah}(h]h](j j eh]h]h!]h#h$uh%hhjNh&hh'h9h)K\ubj)}(h(PyObject *obj, Uint8 *RGBA)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hjthщubc.pg_RGBAFromObjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hj4h]hobj}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h Uint8 *RGBAh](h)}(hhh]h)}(hUint8h]hUint8}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]jjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hRGBAh]hRGBA}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$j"uh%jhjNh&hh'h9h)K\ubeh}(h]h]h]h]h!]h#h$juh%hjjhjJh&hh'h9h)K\ubah}(h]jEah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)K\hjGh&hubj')}(hhh]ha)}(hXLConvert the color represented by object *obj* into a red, green, blue, alpha length 4 C array *RGBA*. The object must be a length 3 or 4 sequence of numbers having values between 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is assumed. Return ``1`` on success, ``0`` otherwise. No Python exceptions are raised.h](h(Convert the color represented by object }hjHsbjz)}(h*obj*h]hobj}hjPsbah}(h]h]h]h]h!]uh%jyhjHubh1 into a red, green, blue, alpha length 4 C array }hjHsbjz)}(h*RGBA*h]hRGBA}hjbsbah}(h]h]h]h]h!]uh%jyhjHubh. The object must be a length 3 or 4 sequence of numbers having values between 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is assumed. Return }hjHsbj8)}(h``1``h]h1}hjtsbah}(h]h]h]h]h!]uh%j7hjHubh on success, }hjHsbj8)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%j7hjHubh, otherwise. No Python exceptions are raised.}hjHsbeh}(h]h]h]h]h!]uh%h`h'h9h)K^hjEh&hubah}(h]h]h]h]h!]uh%j&hjGh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpg_buffer (C type) c.pg_bufferhNtauh%h~hhOh&hh'Nh)Nubh)}(hhh](h)}(h pg_bufferh]h)}(htype pg_bufferh](j)}(htypeh]htype}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)Kfubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kfubh)}(h pg_bufferh]h)}(hjh]h pg_buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Kfubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Kfubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Kfhjh&hubj')}(hhh](h)}(hhh]h}(h]h]h]h]h!]entries](hpg_buffer.view (C member)c.pg_buffer.viewhNtauh%h~hjh&hh'h9h)Nubh)}(hhh](h)}(hPy_buffer viewh]h)}(hPy_buffer viewh](h)}(hhh]h)}(h Py_bufferh]h Py_buffer}hj"sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetj$modnameN classnameNhh)}h](h)}(hjhщub c.pg_bufferh)}(hόviewhщubc.pg_buffer.viewesbuh%hhjh&hh'h9h)Khubh)}(h h]h }hjGsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Khubh)}(hviewh]h)}(hjDh]hview}hjYsbah}(h]h]hah]h]h!]uh%hhjUubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Khubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Khubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Khhjh&hubj')}(hhh]ha)}(hA standard buffer descriptionh]hA standard buffer description}hj{sbah}(h]h]h]h]h!]uh%h`h'h9h)Kjhjxh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6membereh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhjh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpg_buffer.consumer (C member)c.pg_buffer.consumerhNtauh%h~hjh&hh'h9h)Nubh)}(hhh](h)}(hPyObject* consumerh]h)}(hPyObject *consumerh](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h](j>j@h)}(hόconsumerhщubc.pg_buffer.consumeresbuh%hhjh&hh'h9h)Klubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Klubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Klubh)}(hconsumerh]h)}(hjh]hconsumer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Klubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Klubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Klhjh&hubj')}(hhh]ha)}(hThe object holding the bufferh]hThe object holding the buffer}hjsbah}(h]h]h]h]h!]uh%h`h'h9h)Knhjh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6membereh]h]h!]jqh6jrj+jsj+jtjujvjwjxjyjzuh%hh&hhjh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h#pg_buffer.release_buffer (C member)c.pg_buffer.release_bufferhNtauh%h~hjh&hh'h9h)Nubh)}(hhh](h)}(h#pybuffer_releaseproc release_bufferh]h)}(h#pybuffer_releaseproc release_bufferh](h)}(hhh]h)}(hpybuffer_releaseproch]hpybuffer_releaseproc}hjKsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjMmodnameN classnameNhh)}h](j>j@h)}(hόrelease_bufferhщubc.pg_buffer.release_bufferesbuh%hhjDh&hh'h9h)Kpubh)}(h h]h }hjmsbah}(h]h]hah]h]h!]uh%hhjDh&hh'h9h)Kpubh)}(hrelease_bufferh]h)}(hjjh]hrelease_buffer}hjsbah}(h]h]hah]h]h!]uh%hhj{ubah}(h]h](j j eh]h]h!]h#h$uh%hhjDh&hh'h9h)Kpubeh}(h]h]h]h]h!]h#h$juh%hjjhj@h&hh'h9h)Kpubah}(h]j;ah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Kphj=h&hubj')}(hhh]ha)}(hA buffer release callback.h]hA buffer release callback.}hjsbah}(h]h]h]h]h!]uh%h`h'h9h)Krhjh&hubah}(h]h]h]h]h!]uh%j&hj=h&hh'h9h)Nubeh}(h]h](h6membereh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhjh'h9h)Nubeh}(h]h]h]h]h!]uh%j&hjh&hh'Nh)Nubeh}(h]h](h6typeeh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhhOh'Nh)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgExc_BufferError (C var)c.pgExc_BufferErrorhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(hPyObject *pgExc_BufferErrorh]h)}(hPyObject *pgExc_BufferErrorh](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hόpgExc_BufferErrorhщubc.pgExc_BufferErrorasbuh%hhjh&hh'h9h)Ktubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Ktubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Ktubh)}(hpgExc_BufferErrorh]h)}(hjh]hpgExc_BufferError}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Ktubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Ktubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Kthjh&hubj')}(hhh]ha)}(h>Python exception type raised for any pg_buffer related errors.h]h>Python exception type raised for any pg_buffer related errors.}hjFsbah}(h]h]h]h]h!]uh%h`h'h9h)KvhjCh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6vareh]h]h!]jqh6jrj]jsj]jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h&pgBuffer_AsArrayInterface (C function)c.pgBuffer_AsArrayInterfacehNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h6PyObject* pgBuffer_AsArrayInterface(Py_buffer *view_p)h]h)}(h6PyObject *pgBuffer_AsArrayInterface(Py_buffer *view_p)h](h)}(hhh]h)}(hhh]hPyObject}hj}sbah}(h]h]hah]h]h!]uh%hhjzubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hόpgBuffer_AsArrayInterfacehщubc.pgBuffer_AsArrayInterfaceasbuh%hhjvh&hh'h9h)Kxubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjvh&hh'h9h)Kxubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjvh&hh'h9h)Kxubh)}(hpgBuffer_AsArrayInterfaceh]h)}(hjh]hpgBuffer_AsArrayInterface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjvh&hh'h9h)Kxubj)}(h(Py_buffer *view_p)h]j)}(hPy_buffer *view_ph](h)}(hhh]h)}(hj$h]h Py_buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetj$modnameN classnameNhh)}h]jjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hview_ph]hview_p}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhjvh&hh'h9h)Kxubeh}(h]h]h]h]h!]h#h$juh%hjjhjrh&hh'h9h)Kxubah}(h]jmah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Kxhjoh&hubj')}(hhh]ha)}(hReturn a Python array interface object representation of buffer *view_p*. On failure raise a Python exception and return *NULL*.h](h@Return a Python array interface object representation of buffer }hj;sbjz)}(h*view_p*h]hview_p}hjCsbah}(h]h]h]h]h!]uh%jyhj;ubh1. On failure raise a Python exception and return }hj;sbjz)}(h*NULL*h]hNULL}hjUsbah}(h]h]h]h]h!]uh%jyhj;ubh.}hj;sbeh}(h]h]h]h]h!]uh%h`h'h9h)Kzhj8h&hubah}(h]h]h]h]h!]uh%j&hjoh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjvjsjvjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h#pgBuffer_AsArrayStruct (C function)c.pgBuffer_AsArrayStructhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h3PyObject* pgBuffer_AsArrayStruct(Py_buffer *view_p)h]h)}(h3PyObject *pgBuffer_AsArrayStruct(Py_buffer *view_p)h](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hόpgBuffer_AsArrayStructhщubc.pgBuffer_AsArrayStructasbuh%hhjh&hh'h9h)K}ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K}ubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K}ubh)}(hpgBuffer_AsArrayStructh]h)}(hjh]hpgBuffer_AsArrayStruct}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)K}ubj)}(h(Py_buffer *view_p)h]j)}(hPy_buffer *view_ph](h)}(hhh]h)}(hj$h]h Py_buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetj$modnameN classnameNhh)}h]jjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hjh]hview_p}hj*sbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhjh&hh'h9h)K}ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K}ubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)K}hjh&hubj')}(hhh]ha)}(h}Return a Python array struct object representation of buffer *view_p*. On failure raise a Python exception and return *NULL*.h](h=Return a Python array struct object representation of buffer }hjSsbjz)}(h*view_p*h]hview_p}hj[sbah}(h]h]h]h]h!]uh%jyhjSubh1. On failure raise a Python exception and return }hjSsbjz)}(h*NULL*h]hNULL}hjmsbah}(h]h]h]h]h!]uh%jyhjSubh.}hjSsbeh}(h]h]h]h]h!]uh%h`h'h9h)KhjPh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgObject_GetBuffer (C function)c.pgObject_GetBufferhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(hFint pgObject_GetBuffer(PyObject *obj, pg_buffer *pg_view_p, int flags)h]h)}(hFint pgObject_GetBuffer(PyObject *obj, pg_buffer *pg_view_p, int flags)h](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)Kubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kubh)}(hpgObject_GetBufferh]h)}(hpgObject_GetBufferh]hpgObject_GetBuffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Kubj)}(h0(PyObject *obj, pg_buffer *pg_view_p, int flags)h](j)}(h PyObject *objh](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]h)}(hjhщubc.pgObject_GetBufferasbuh%hhjubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hj4h]hobj}hj$sbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hpg_buffer *pg_view_ph](h)}(hhh]h)}(hjh]h pg_buffer}hj?sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]jjasbuh%hhj8ubh)}(h h]h }hj[sbah}(h]h]hah]h]h!]uh%hhj8ubh)}(hhh]h*}hjisbah}(h]h]hah]h]h!]uh%hhj8ubh)}(h pg_view_ph]h pg_view_p}hjvsbah}(h]h]hah]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h int flagsh](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hflagsh]hflags}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$j"uh%jhjh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Kubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Khjh&hubj')}(hhh]ha)}(hX7Request a buffer for object *obj*. Argument *flags* are PyBUF options. Return the buffer description in *pg_view_p*. An object may support the Python buffer interface, the NumPy array interface, or the NumPy array struct interface. Return ``0`` on success, raise a Python exception and return ``-1`` on failure.h](hRequest a buffer for object }hjsbjz)}(h*obj*h]hobj}hjsbah}(h]h]h]h]h!]uh%jyhjubh . Argument }hjsbjz)}(h*flags*h]hflags}hjsbah}(h]h]h]h]h!]uh%jyhjubh5 are PyBUF options. Return the buffer description in }hjsbjz)}(h *pg_view_p*h]h pg_view_p}hjsbah}(h]h]h]h]h!]uh%jyhjubh|. An object may support the Python buffer interface, the NumPy array interface, or the NumPy array struct interface. Return }hjsbj8)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%j7hjubh1 on success, raise a Python exception and return }hjsbj8)}(h``-1``h]h-1}hj%sbah}(h]h]h]h]h!]uh%j7hjubh on failure.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjFjsjFjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgBuffer_Release (C function)c.pgBuffer_ReleasehNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h+void pgBuffer_Release(Pg_buffer *pg_view_p)h]h)}(h+void pgBuffer_Release(Pg_buffer *pg_view_p)h](j)}(hvoidh]hvoid}hjcsbah}(h]h]jah]h]h!]uh%jhj_h&hh'h9h)Kubh)}(h h]h }hjqsbah}(h]h]hah]h]h!]uh%hhj_h&hh'h9h)Kubh)}(hpgBuffer_Releaseh]h)}(hpgBuffer_Releaseh]hpgBuffer_Release}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhj_h&hh'h9h)Kubj)}(h(Pg_buffer *pg_view_p)h]j)}(hPg_buffer *pg_view_ph](h)}(hhh]h)}(h Pg_bufferh]h Pg_buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]h)}(hjhщubc.pgBuffer_Releaseasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hjxh]h pg_view_p}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhj_h&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhj[h&hh'h9h)Kubah}(h]jVah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KhjXh&hubj')}(hhh]ha)}(h&Release the Pygame *pg_view_p* buffer.h](hRelease the Pygame }hjsbjz)}(h *pg_view_p*h]h pg_view_p}hjsbah}(h]h]h]h]h!]uh%jyhjubh buffer.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j&hjXh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj/jsj/jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgDict_AsBuffer (C function)c.pgDict_AsBufferhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(hDint pgDict_AsBuffer(Pg_buffer *pg_view_p, PyObject *dict, int flags)h]h)}(hDint pgDict_AsBuffer(Pg_buffer *pg_view_p, PyObject *dict, int flags)h](j)}(hinth]hint}hjLsbah}(h]h]jah]h]h!]uh%jhjHh&hh'h9h)Kubh)}(h h]h }hjZsbah}(h]h]hah]h]h!]uh%hhjHh&hh'h9h)Kubh)}(hpgDict_AsBufferh]h)}(hpgDict_AsBufferh]hpgDict_AsBuffer}hjlsbah}(h]h]hah]h]h!]uh%hhjhubah}(h]h](j j eh]h]h!]h#h$uh%hhjHh&hh'h9h)Kubj)}(h1(Pg_buffer *pg_view_p, PyObject *dict, int flags)h](j)}(hPg_buffer *pg_view_ph](h)}(hhh]h)}(hjh]h Pg_buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]h)}(hjnhщubc.pgDict_AsBufferasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hjxh]h pg_view_p}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hPyObject *dicth](h)}(hhh]h)}(hhh]hPyObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethmodnameN classnameNhh)}h]jjasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hj sbah}(h]h]hah]h]h!]uh%hhjubh)}(hdicth]hdict}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h int flagsh](j)}(hinth]hint}hj0sbah}(h]h]jah]h]h!]uh%jhj,ubh)}(h h]h }hj>sbah}(h]h]hah]h]h!]uh%hhj,ubh)}(hjh]hflags}hjLsbah}(h]h]hah]h]h!]uh%hhj,ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$j"uh%jhjHh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjDh&hh'h9h)Kubah}(h]j?ah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KhjAh&hubj')}(hhh]ha)}(hXWrite the array interface dictionary buffer description *dict* into a Pygame buffer description struct *pg_view_p*. The *flags* PyBUF options describe the view type requested. Return ``0`` on success, or raise a Python exception and return ``-1`` on failure.h](h8Write the array interface dictionary buffer description }hjusbjz)}(h*dict*h]hdict}hj}sbah}(h]h]h]h]h!]uh%jyhjuubh) into a Pygame buffer description struct }hjusbjz)}(h *pg_view_p*h]h pg_view_p}hjsbah}(h]h]h]h]h!]uh%jyhjuubh. The }hjusbjz)}(h*flags*h]hflags}hjsbah}(h]h]h]h]h!]uh%jyhjuubh8 PyBUF options describe the view type requested. Return }hjusbj8)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%j7hjuubh4 on success, or raise a Python exception and return }hjusbj8)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%j7hjuubh on failure.}hjusbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjrh&hubah}(h]h]h]h]h!]uh%j&hjAh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](himport_pygame_base (C function)c.import_pygame_basehNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(hvoid import_pygame_base()h]h)}(hvoid import_pygame_base()h](j)}(hvoidh]hvoid}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)Kubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kubh)}(himport_pygame_baseh]h)}(himport_pygame_baseh]himport_pygame_base}hj#sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$j"uh%jhjh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Kubah}(h]jah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Khjh&hubj')}(hhh]ha)}(hbImport the pygame.base module C API into an extension module. On failure raise a Python exception.h]hbImport the pygame.base module C API into an extension module. On failure raise a Python exception.}hjPsbah}(h]h]h]h]h!]uh%h`h'h9h)KhjMh&hubah}(h]h]h]h]h!]uh%j&hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjgjsjgjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h pg_GetDefaultWindow (C function)c.pg_GetDefaultWindowhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h%SDL_Window* pg_GetDefaultWindow(void)h]h)}(h%SDL_Window *pg_GetDefaultWindow(void)-h](h)}(hhh]h)}(h SDL_Windowh]h SDL_Window}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]h)}(hόpg_GetDefaultWindowhщubc.pg_GetDefaultWindowasbuh%hhjh&hh'h9h)Kubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kubh)}(hpg_GetDefaultWindowh]h)}(hjh]hpg_GetDefaultWindow}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Kubj)}(h(void)h]j)}(hvoidh]j)}(hvoidh]hvoid}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhjh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhj|h&hh'h9h)Kubah}(h]jwah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Khjyh&hubj')}(hhh]ha)}(h\Return the Pygame default SDL window created by a pygame.display.set_mode() call, or *NULL*.h](hUReturn the Pygame default SDL window created by a pygame.display.set_mode() call, or }hj sbjz)}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%jyhj ubh.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)Khj h&hubah}(h]h]h]h]h!]uh%j&hjyh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj5jsj5jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h pg_SetDefaultWindow (C function)c.pg_SetDefaultWindowhNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h)void pg_SetDefaultWindow(SDL_Window *win)h]h)}(h)void pg_SetDefaultWindow(SDL_Window *win)h](j)}(hvoidh]hvoid}hjRsbah}(h]h]jah]h]h!]uh%jhjNh&hh'h9h)Kubh)}(h h]h }hj`sbah}(h]h]hah]h]h!]uh%hhjNh&hh'h9h)Kubh)}(hpg_SetDefaultWindowh]h)}(hpg_SetDefaultWindowh]hpg_SetDefaultWindow}hjrsbah}(h]h]hah]h]h!]uh%hhjnubah}(h]h](j j eh]h]h!]h#h$uh%hhjNh&hh'h9h)Kubj)}(h(SDL_Window *win)h]j)}(hSDL_Window *winh](h)}(hhh]h)}(hjh]h SDL_Window}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjmodnameN classnameNhh)}h]h)}(hjthщubc.pg_SetDefaultWindowasbuh%hhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hwinh]hwin}hjsbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhjNh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjJh&hh'h9h)Kubah}(h]jEah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KhjGh&hubj')}(hhh]ha)}(hReplace the Pygame default window with *win*. The previous window, if any, is destroyed. Argument *win* may be *NULL*. This function is called by pygame.display.set_mode().h](h'Replace the Pygame default window with }hjsbjz)}(h*win*h]hwin}hjsbah}(h]h]h]h]h!]uh%jyhjubh6. The previous window, if any, is destroyed. Argument }hjsbjz)}(h*win*h]hwin}hjsbah}(h]h]h]h]h!]uh%jyhjubh may be }hjsbjz)}(h*NULL*h]hNULL}hj!sbah}(h]h]h]h]h!]uh%jyhjubh7. This function is called by pygame.display.set_mode().}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j&hjGh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjBjsjBjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h'pg_GetDefaultWindowSurface (C function)c.pg_GetDefaultWindowSurfacehNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h1pgSurfaceObject* pg_GetDefaultWindowSurface(void)h]h)}(h1pgSurfaceObject *pg_GetDefaultWindowSurface(void)h](h)}(hhh]h)}(hpgSurfaceObjecth]hpgSurfaceObject}hjbsbah}(h]h]hah]h]h!]uh%hhj_ubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjdmodnameN classnameNhh)}h]h)}(hόpg_GetDefaultWindowSurfacehщubc.pg_GetDefaultWindowSurfaceasbuh%hhj[h&hh'h9h)Kubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhj[h&hh'h9h)Kubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhj[h&hh'h9h)Kubh)}(hpg_GetDefaultWindowSurfaceh]h)}(hjh]hpg_GetDefaultWindowSurface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhj[h&hh'h9h)Kubj)}(h(void)h]j)}(hvoidh]j)}(hvoidh]hvoid}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$j"uh%jhj[h&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjWh&hh'h9h)Kubah}(h]jRah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)KhjTh&hubj')}(hhh]ha)}(hqReturn a borrowed reference to the Pygame default window display surface, or *NULL* if no default window is open.h](hMReturn a borrowed reference to the Pygame default window display surface, or }hjsbjz)}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%jyhjubh if no default window is open.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j&hjTh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrjjsjjtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h'pg_SetDefaultWindowSurface (C function)c.pg_SetDefaultWindowSurfacehNtauh%h~hhOh&hh'h9h)Nubh)}(hhh](h)}(h8void pg_SetDefaultWindowSurface(pgSurfaceObject *screen)h]h)}(h8void pg_SetDefaultWindowSurface(pgSurfaceObject *screen)h](j)}(hvoidh]hvoid}hj-sbah}(h]h]jah]h]h!]uh%jhj)h&hh'h9h)Kubh)}(h h]h }hj;sbah}(h]h]hah]h]h!]uh%hhj)h&hh'h9h)Kubh)}(hpg_SetDefaultWindowSurfaceh]h)}(hpg_SetDefaultWindowSurfaceh]hpg_SetDefaultWindowSurface}hjMsbah}(h]h]hah]h]h!]uh%hhjIubah}(h]h](j j eh]h]h!]h#h$uh%hhj)h&hh'h9h)Kubj)}(h(pgSurfaceObject *screen)h]j)}(hpgSurfaceObject *screenh](h)}(hhh]h)}(hjdh]hpgSurfaceObject}hjlsbah}(h]h]hah]h]h!]uh%hhjiubah}(h]h]h]h]h!] refdomainh6reftypeh reftargetjdmodnameN classnameNhh)}h]h)}(hjOhщubc.pg_SetDefaultWindowSurfaceasbuh%hhjeubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjeubh)}(hhh]h*}hjsbah}(h]h]hah]h]h!]uh%hhjeubh)}(hscreenh]hscreen}hjsbah}(h]h]hah]h]h!]uh%hhjeubeh}(h]h]h]h]h!]noemphh#h$uh%jhjaubah}(h]h]h]h]h!]h#h$j"uh%jhj)h&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhj%h&hh'h9h)Kubah}(h]j ah](jjeh]h]h!]j"j#j$)j%huh%hh'h9h)Khj"h&hubj')}(hhh]ha)}(hReplace the Pygame default display surface with object *screen*. The previous surface object, if any, is invalidated. Argument *screen* may be *NULL*. This functions is called by pygame.display.set_mode().h](h7Replace the Pygame default display surface with object }hjsbjz)}(h*screen*h]hscreen}hjsbah}(h]h]h]h]h!]uh%jyhjubh@. The previous surface object, if any, is invalidated. Argument }hjsbjz)}(h*screen*h]hscreen}hjsbah}(h]h]h]h]h!]uh%jyhjubh may be }hjsbjz)}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%jyhjubh8. This functions is called by pygame.display.set_mode().}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j&hj"h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jqh6jrj jsj jtjujvjwjxjyjzuh%hh&hhhOh'h9h)Nubeh}(h] src-c-base-cah]h] src_c/base.cah]h!]uh%h:hhsbah}(h]h]jah]h]h!]uh%hhj;ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj@modnameN classnameNjj)}j]jjasbuh%hjhj7ubh)}(h h]h }hj[sbah}(h]h]hah]h]h!]uh%hhj7ubj)}(hjh]h*}hjisbah}(h]h]j$ah]h]h!]uh%jhj7ubh)}(heventh]hevent}hjvsbah}(h]h]jah]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj3ubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K$ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K$ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K$hjh&hubj#)}(hhh]ha)}(hReturn a new pygame event instance for the SDL *event*. If *event* is ``NULL`` then create an empty event object. On failure raise a Python exception and return ``NULL``.h](h/Return a new pygame event instance for the SDL }hjsbj[)}(h*event*h]hevent}hjsbah}(h]h]h]h]h!]uh%jZhjubh. If }hjsbj[)}(h*event*h]hevent}hjsbah}(h]h]h]h]h!]uh%jZhjubh is }hjsbhq)}(h``NULL``h]hNULL}hjsbah}(h]h]h]h]h!]uh%hphjubhS then create an empty event object. On failure raise a Python exception and return }hjsbhq)}(h``NULL``h]hNULL}hjsbah}(h]h]h]h]h!]uh%hphjubh.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K&hjh&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjjjjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgEvent_New2 (C function)c.pgEvent_New2hNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h0PyObject* pgEvent_New2(int type, PyObject *dict)h]h)}(h0PyObject *pgEvent_New2(int type, PyObject *dict)h](hk)}(hhh]h)}(hjh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]j)}(j pgEvent_New2jubc.pgEvent_New2asbuh%hjhjh&hh'h9h)K*ubh)}(h h]h }hj?sbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K*ubj)}(hjh]h*}hjMsbah}(h]h]j$ah]h]h!]uh%jhjh&hh'h9h)K*ubh)}(h pgEvent_New2h]h)}(hj<h]h pgEvent_New2}hj^sbah}(h]h]jah]h]h!]uh%hhjZubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K*ubj)}(h(int type, PyObject *dict)h](j)}(hint typeh](js)}(hinth]hint}hjysbah}(h]h]jah]h]h!]uh%jrhjuubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjuubh)}(hhh]htype}hjsbah}(h]h]jah]h]h!]uh%hhjuubeh}(h]h]h]h]h!]noemphh#h$uh%jhjqubj)}(hPyObject *dicth](hk)}(hhh]h)}(hjh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]j:j=asbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]j$ah]h]h!]uh%jhjubh)}(hdicth]hdict}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjqubeh}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K*ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K*ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K*hjh&hubj#)}(hhh]ha)}(hReturn a new pygame event instance of SDL *type* and with attribute dictionary *dict*. If `dict` is ``NULL`` an empty attribute dictionary is created. On failure raise a Python exception and return ``NULL``.h](h*Return a new pygame event instance of SDL }hjsbj[)}(h*type*h]htype}hjsbah}(h]h]h]h]h!]uh%jZhjubh and with attribute dictionary }hjsbj[)}(h*dict*h]hdict}hj+sbah}(h]h]h]h]h!]uh%jZhjubh. If }hjsbh title_reference)}(h`dict`h]hdict}hj?sbah}(h]h]h]h]h!]uh%j=hjubh is }hjsbhq)}(h``NULL``h]hNULL}hjQsbah}(h]h]h]h]h!]uh%hphjubhZ an empty attribute dictionary is created. On failure raise a Python exception and return }hjsbhq)}(h``NULL``h]hNULL}hjcsbah}(h]h]h]h]h!]uh%hphjubh.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K,hjh&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjjjjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h"pgEvent_FillUserEvent (C function)c.pgEvent_FillUserEventhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h=int pgEvent_FillUserEvent(pgEventObject *e, SDL_Event *event)h]h)}(h=int pgEvent_FillUserEvent(pgEventObject *e, SDL_Event *event)h](js)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jrhjh&hh'h9h)K1ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K1ubh)}(hpgEvent_FillUserEventh]h)}(hpgEvent_FillUserEventh]hpgEvent_FillUserEvent}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K1ubj)}(h$(pgEventObject *e, SDL_Event *event)h](j)}(hpgEventObject *eh](hk)}(hhh]h)}(hhh]h pgEventObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargethŌmodnameN classnameNjj)}j]j)}(jjjubc.pgEvent_FillUserEventasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hj sbah}(h]h]j$ah]h]h!]uh%jhjubh)}(heh]he}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hSDL_Event *eventh](hk)}(hhh]h)}(hj@h]h SDL_Event}hj6sbah}(h]h]jah]h]h!]uh%hhj3ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj@modnameN classnameNjj)}j]jjasbuh%hjhj/ubh)}(h h]h }hjRsbah}(h]h]hah]h]h!]uh%hhj/ubj)}(hjh]h*}hj`sbah}(h]h]j$ah]h]h!]uh%jhj/ubh)}(hjxh]hevent}hjmsbah}(h]h]jah]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K1ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K1ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K1hjh&hubj#)}(hhh]ha)}(hwFill SDL event *event* with information from pygame user event instance *e*. Return ``0`` on success, ``-1`` otherwise.h](hFill SDL event }hjsbj[)}(h*event*h]hevent}hjsbah}(h]h]h]h]h!]uh%jZhjubh2 with information from pygame user event instance }hjsbj[)}(h*e*h]he}hjsbah}(h]h]h]h]h!]uh%jZhjubh . Return }hjsbhq)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%hphjubh on success, }hjsbhq)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%hphjubh otherwise.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K3hjh&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjjjjjjjjjjuh%hh&hhhOh'h9h)Nubeh}(h] src-c-event-cah]h] src_c/event.cah]h!]uh%h:hh is an open font file. This is a macro. No check is made that }hjsbjC)}(h*o*h]ho}hjsbah}(h]h]h]h]h!]uh%jBhjubh is not }hjsbhq)}(h``NULL``h]hNULL}hj$sbah}(h]h]h]h]h!]uh%hphjubh or not a }hjsbhk)}(h:py:class:`Font`h]hq)}(hj8h]hFont}hj:sbah}(h]h](h|pypy-classeh]h]h!]uh%hphj6ubah}(h]h]h]h]h!]refdoch refdomainjDreftypeclass refexplicitrefwarnhNhNhFontuh%hjh'h9h)K(hjubh instance.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K(hjh&hubah}(h]h]h]h]h!]uh%j"hj&h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jfh6jgjijhjijijjjkjljmjnjouh%hh&hhhOh'h9h)Nubeh}(h]src-c-freetype-cah]h]src_c/_freetype.cah]h!]uh%h:hhh&hh'h9h)K+ubah}(h]j9ah](jjeh]h]h!]jjj )j!huh%hh'h9h)K+hj;h&hubj#)}(hhh]ha)}(h:The :py:class:`pygame.mixer.Channel` instance C structure.h](hThe }hjsbhk)}(h :py:class:`pygame.mixer.Channel`h]hq)}(hjh]hpygame.mixer.Channel}hjsbah}(h]h](h|pypy-classeh]h]h!]uh%hphjubah}(h]h]h]h]h!]refdoch refdomainjreftypeclass refexplicitrefwarnhNhNhpygame.mixer.Channeluh%hjh'h9h)K-hjubh instance C structure.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K-hjh&hubah}(h]h]h]h]h!]uh%j"hj;h&hh'h9h)Nubeh}(h]h](h6typeeh]h]h!]jfh6jgjjhjjijjjkjljmjnjouh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgChannel_Type (C var)c.pgChannel_TypehNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hPyTypeObject *pgChannel_Typeh]h)}(hPyTypeObject *pgChannel_Typeh](hk)}(hhh]h)}(hjh]h PyTypeObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]j)}(jpgChannel_Typejubc.pgChannel_Typeasbuh%hjhjh&hh'h9h)K/ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K/ubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K/ubh)}(hpgChannel_Typeh]h)}(hjh]hpgChannel_Type}hj!sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K/ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K/ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K/hjh&hubj#)}(hhh]ha)}(h1The :py:class:`pygame.mixer.Channel` Python type.h](hThe }hjCsbhk)}(h :py:class:`pygame.mixer.Channel`h]hq)}(hjMh]hpygame.mixer.Channel}hjOsbah}(h]h](h|pypy-classeh]h]h!]uh%hphjKubah}(h]h]h]h]h!]refdoch refdomainjYreftypeclass refexplicitrefwarnhNhNhpygame.mixer.Channeluh%hjh'h9h)K1hjCubh Python type.}hjCsbeh}(h]h]h]h]h!]uh%h`h'h9h)K1hj@h&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6vareh]h]h!]jfh6jgj~jhj~jijjjkjljmjnjouh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgChannel_New (C function)c.pgChannel_NewhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h'PyObject* pgChannel_New(int channelnum)h]h)}(h'PyObject *pgChannel_New(int channelnum)h](hk)}(hhh]h)}(hjZh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjZmodnameN classnameNjj)}j]j)}(j pgChannel_Newjubc.pgChannel_Newasbuh%hjhjh&hh'h9h)K3ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K3ubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K3ubh)}(h pgChannel_Newh]h)}(hjh]h pgChannel_New}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K3ubj)}(h(int channelnum)h]j)}(hint channelnumh](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(h channelnumh]h channelnum}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K3ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K3ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K3hjh&hubj#)}(hhh]ha)}(hReturn a new :py:class:`pygame.mixer.Channel` instance for the SDL mixer channel *channelnum*. On failure, raise a Python exception and return ``NULL``.h](h Return a new }hj>sbhk)}(h :py:class:`pygame.mixer.Channel`h]hq)}(hjHh]hpygame.mixer.Channel}hjJsbah}(h]h](h|pypy-classeh]h]h!]uh%hphjFubah}(h]h]h]h]h!]refdoch refdomainjTreftypeclass refexplicitrefwarnhNhNhpygame.mixer.Channeluh%hjh'h9h)K5hj>ubh$ instance for the SDL mixer channel }hj>sbjI)}(h *channelnum*h]h channelnum}hjjsbah}(h]h]h]h]h!]uh%jHhj>ubh2. On failure, raise a Python exception and return }hj>sbhq)}(h``NULL``h]hNULL}hj|sbah}(h]h]h]h]h!]uh%hphj>ubh.}hj>sbeh}(h]h]h]h]h!]uh%h`h'h9h)K5hj;h&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jfh6jgjjhjjijjjkjljmjnjouh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgChannel_Check (C function)c.pgChannel_CheckhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h"int pgChannel_Check(PyObject *obj)h]h)}(h"int pgChannel_Check(PyObject *obj)h](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K9ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K9ubh)}(hpgChannel_Checkh]h)}(hpgChannel_Checkh]hpgChannel_Check}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K9ubj)}(h(PyObject *obj)h]j)}(h PyObject *objh](hk)}(hhh]h)}(hjZh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjZmodnameN classnameNjj)}j]j)}(jjjubc.pgChannel_Checkasbuh%hjhjubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hj& sbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hobj}hj3 sbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K9ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K9ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K9hjh&hubj#)}(hhh]ha)}(hReturn true if *obj* is an instance of type :c:data:`pgChannel_Type`, but not a :c:data:`pgChannel_Type` subclass instance. A macro.h](hReturn true if }hj\ sbjI)}(h*obj*h]hobj}hjd sbah}(h]h]h]h]h!]uh%jHhj\ ubh is an instance of type }hj\ sbhk)}(h:c:data:`pgChannel_Type`h]hq)}(hjx h]hpgChannel_Type}hjz sbah}(h]h](h|h6c-dataeh]h]h!]uh%hphjv ubah}(h]h]h]h]h!]refdoch refdomainh6reftypedata refexplicitrefwarnjxj)}j]j j asbhpgChannel_Typeuh%hjh'h9h)K;hj\ ubh , but not a }hj\ sbhk)}(h:c:data:`pgChannel_Type`h]hq)}(hj h]hpgChannel_Type}hj sbah}(h]h](h|h6c-dataeh]h]h!]uh%hphj ubah}(h]h]h]h]h!]refdoch refdomainh6reftypedata refexplicitrefwarnjxj hpgChannel_Typeuh%hjh'h9h)K;hj\ ubh subclass instance. A macro.}hj\ sbeh}(h]h]h]h]h!]uh%h`h'h9h)K;hjY h&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jfh6jgj jhj jijjjkjljmjnjouh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgChannel_AsInt (C function)c.pgChannel_AsInthNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h int pgChannel_AsInt(PyObject *x)h]h)}(h int pgChannel_AsInt(PyObject *x)h](j)}(hinth]hint}hj sbah}(h]h]jah]h]h!]uh%jhj h&hh'h9h)K?ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj h&hh'h9h)K?ubh)}(hpgChannel_AsInth]h)}(hpgChannel_AsInth]hpgChannel_AsInt}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h](jj eh]h]h!]h#h$uh%hhj h&hh'h9h)K?ubj)}(h (PyObject *x)h]j)}(h PyObject *xh](hk)}(hhh]h)}(hjZh]hPyObject}hj+ sbah}(h]h]jah]h]h!]uh%hhj( ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjZmodnameN classnameNjj)}j]j)}(jj jubc.pgChannel_AsIntasbuh%hjhj$ ubh)}(h h]h }hjJ sbah}(h]h]hah]h]h!]uh%hhj$ ubj)}(hjh]h*}hjX sbah}(h]h]jah]h]h!]uh%jhj$ ubh)}(hjjh]hx}hje sbah}(h]h]jah]h]h!]uh%hhj$ ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubah}(h]h]h]h]h!]h#h$juh%jhj h&hh'h9h)K?ubeh}(h]h]h]h]h!]h#h$juh%hjjhj h&hh'h9h)K?ubah}(h]j ah](jjeh]h]h!]jjj )j!huh%hh'h9h)K?hj h&hubj#)}(hhh]ha)}(hReturn the SDL mixer music channel number associated with :c:type:`pgChannel_Type` instance *x*. A macro that does no ``NULL`` or Python type check on *x*.h](h:Return the SDL mixer music channel number associated with }hj sbhk)}(h:c:type:`pgChannel_Type`h]hq)}(hj h]hpgChannel_Type}hj sbah}(h]h](h|h6c-typeeh]h]h!]uh%hphj ubah}(h]h]h]h]h!]refdoch refdomainh6reftypetype refexplicitrefwarnjxj)}j]jF jH asbhpgChannel_Typeuh%hjh'h9h)KAhj ubh instance }hj sbjI)}(h*x*h]hx}hj sbah}(h]h]h]h]h!]uh%jHhj ubh. A macro that does no }hj sbhq)}(h``NULL``h]hNULL}hj sbah}(h]h]h]h]h!]uh%hphj ubh or Python type check on }hj sbjI)}(h*x*h]hx}hj sbah}(h]h]h]h]h!]uh%jHhj ubh.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)KAhj h&hubah}(h]h]h]h]h!]uh%j"hj h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jfh6jgj jhj jijjjkjljmjnjouh%hh&hhhOh'h9h)Nubeh}(h] src-c-mixer-cah]h] src_c/mixer.cah]h!]uh%h:hhjjjjjjj j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/c_api/mixer.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.5111413 pygame-2.6.1/docs/generated/doctrees/c_api/rect.doctree0000644000175100001770000006470314676242416022512 0ustar00runnerdockerisphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh highlightlang)}(hhh]h}(h]h]h]h]h!]langcforcelinenothresholduh%h*hhh&hh'8/home/runner/work/pygame/pygame/docs/reST/c_api/rect.rsth)Kubh section)}(hhh](h title)}(h&Class Rect API exported by pygame.recth]h&Class Rect API exported by pygame.rect}hhAsbah}(h]h]h]h]h!]uh%h?hhsbah}(h]h](h|h6c-typeeh]h]h!]uh%hphj:ubah}(h]h]h]h]h!]refdoch refdomainh6reftypetype refexplicitrefwarnjjhSDL_Rectuh%hjh'h9h)K+hjubh. representation of the rectangle, else return }hjsbj)}(h*NULL*h]hNULL}hj]sbah}(h]h]h]h]h!]uh%jhjubh". No Python exceptions are raised.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K+hjh&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jj~jj~jjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgRect_Normalize (C function)c.pgRect_NormalizehNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h%void pgRect_Normalize(SDL_Rect *rect)h]h)}(h%void pgRect_Normalize(SDL_Rect *rect)h](j<)}(hvoidh]hvoid}hjsbah}(h]h]jHah]h]h!]uh%j;hjh&hh'h9h)K6ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K6ubh)}(hpgRect_Normalizeh]h)}(hpgRect_Normalizeh]hpgRect_Normalize}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjh&hh'h9h)K6ubj)}(h(SDL_Rect *rect)h]j)}(hSDL_Rect *recth](hk)}(hhh]h)}(hjEh]hSDL_Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjEmodnameN classnameNj]j`)}jc]jg)}(jjjjkubc.pgRect_Normalizeasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj%)}(hj(h]h*}hj sbah}(h]h]j1ah]h]h!]uh%j$hjubh)}(hrecth]hrect}hj sbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K6ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K6ubah}(h]jah](jjeh]h]h!]jjj )j!huh%hh'h9h)K6hjh&hubj#)}(hhh]ha)}(h~Normalize the given rect. A rect with a negative size (negative width and/or height) will be adjusted to have a positive size.h]h~Normalize the given rect. A rect with a negative size (negative width and/or height) will be adjusted to have a positive size.}hj> sbah}(h]h]h]h]h!]uh%h`h'h9h)K8hj; h&hubah}(h]h]h]h]h!]uh%j"hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjU jjU jjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgRect_Check (C function)c.pgRect_CheckhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hint pgRect_Check(PyObject *obj)h]h)}(hint pgRect_Check(PyObject *obj)h](j<)}(hinth]hint}hjr sbah}(h]h]jHah]h]h!]uh%j;hjn h&hh'h9h)K;ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhjn h&hh'h9h)K;ubh)}(h pgRect_Checkh]h)}(h pgRect_Checkh]h pgRect_Check}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h](jj eh]h]h!]h#h$uh%hhjn h&hh'h9h)K;ubj)}(h(PyObject *obj)h]j)}(h PyObject *objh](hk)}(hhh]h)}(hjh]hPyObject}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjmodnameN classnameNj]j`)}jc]jg)}(jjj jkubc.pgRect_Checkasbuh%hjhj ubh)}(h h]h }hj sbah}(h]h]hah]h]h!]uh%hhj ubj%)}(hj(h]h*}hj sbah}(h]h]j1ah]h]h!]uh%j$hj ubh)}(hj h]hobj}hj sbah}(h]h]jah]h]h!]uh%hhj ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj ubah}(h]h]h]h]h!]h#h$juh%jhjn h&hh'h9h)K;ubeh}(h]h]h]h]h!]h#h$juh%hjjhjj h&hh'h9h)K;ubah}(h]je ah](jjeh]h]h!]jjj )j!huh%hh'h9h)K;hjg h&hubj#)}(hhh]ha)}(h@A macro to check if *obj* is a :py:class:`pygame.Rect` instance.h](hA macro to check if }hj sbj)}(h*obj*h]hobj}hj sbah}(h]h]h]h]h!]uh%jhj ubh is a }hj sbhk)}(h:py:class:`pygame.Rect`h]hq)}(hj0 h]h pygame.Rect}hj2 sbah}(h]h](h|pypy-classeh]h]h!]uh%hphj. ubah}(h]h]h]h]h!]refdoch refdomainj< reftypeclass refexplicitrefwarnhNhNh pygame.Rectuh%hjh'h9h)K=hj ubh instance.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)K=hj h&hubah}(h]h]h]h]h!]uh%j"hjg h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jja jja jjjjjjjuh%hh&hhhOh'h9h)Nubeh}(h] src-c-rect-cah]h] src_c/rect.cah]h!]uh%h:hhh]hpgRWops_FromObject()}hj@sbah}(h]h](h|h6c-funceh]h]h!]uh%hphj<ubah}(h]h]h]h]h!]refdoch refdomainh6reftypefunc refexplicitrefwarn c:parent_keyh)}h]jjasbhpgRWops_FromObjectuh%hjh'h9h)K)hj"ubh or }hj"sbhk)}(h :c:func:`pgRWops_FromFileObject`h]hq)}(hjfh]hpgRWops_FromFileObject()}hjhsbah}(h]h](h|h6c-funceh]h]h!]uh%hphjdubah}(h]h]h]h]h!]refdoch refdomainh6reftypefunc refexplicitrefwarnjZj[hpgRWops_FromFileObjectuh%hjh'h9h)K)hj"ubh.}hj"sbeh}(h]h]h]h]h!]uh%h`h'h9h)K)hjh&hubah}(h]h]h]h]h!]uh%jhjth&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjjjjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h"pgRWops_ReleaseObject (C function)c.pgRWops_ReleaseObjecthNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h-int pgRWops_ReleaseObject(SDL_RWops *context)h]h)}(h-int pgRWops_ReleaseObject(SDL_RWops *context)h](j)}(hinth]hint}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K,ubh)}(h h]h }hjsbah}(h]h]j ah]h]h!]uh%hhjh&hh'h9h)K,ubj)}(hpgRWops_ReleaseObjecth]h)}(hpgRWops_ReleaseObjecth]hpgRWops_ReleaseObject}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h](j4j5eh]h]h!]h#h$uh%jhjh&hh'h9h)K,ubj:)}(h(SDL_RWops *context)h]j@)}(hSDL_RWops *contexth](hk)}(hhh]h)}(hhh]h SDL_RWops}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypeh reftargethьmodnameN classnameNhh)}h]h)}(hjhubc.pgRWops_ReleaseObjectasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]j ah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%j hjubh)}(hcontexth]hcontext}hj,sbah}(h]h]hah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%j?hjubah}(h]h]h]h]h!]h#h$juh%j9hjh&hh'h9h)K,ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K,ubah}(h]jah](jjeh]h]h!]jjj)jhuh%hh'h9h)K,hjh&hubj)}(hhh]ha)}(hFree a SDL_RWops struct. If it is attached to a Python file-like object, decrement its refcount. Otherwise, close the file handle. Return 0 on success. On error, raise a Python exception and return a negative value.h]hFree a SDL_RWops struct. If it is attached to a Python file-like object, decrement its refcount. Otherwise, close the file handle. Return 0 on success. On error, raise a Python exception and return a negative value.}hjVsbah}(h]h]h]h]h!]uh%h`h'h9h)K.hjSh&hubah}(h]h]h]h]h!]uh%jhjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjmjjmjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpg_EncodeFilePath (C function)c.pg_EncodeFilePathhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hreftypeclass refexplicitrefwarnhNhNhpygame.Surfaceuh%hjh'h9h)Khj(ubh instance.}hj(sbeh}(h]h]h]h]h!]uh%h`h'h9h)Khj%h&hubah}(h]h]h]h]h!]uh%j#hhh&hh'h9h)Nubeh}(h]h](h6typeeh]h]h!]domainh6objtypejcdesctypejcno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_Type (C var)c.pgSurface_TypehNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hPyTypeObject *pgSurface_Typeh]h)}(hPyTypeObject *pgSurface_Typeh](hk)}(hhh]h)}(h PyTypeObjecth]h PyTypeObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c._symbol LookupKey)}data]sphinx.domains.c._ast ASTIdentifier)}(namepgSurface_Type is_anonymousubc.pgSurface_Typeasbuh%hjhjh&hh'h9h)Kubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)Kubhdesc_sig_punctuation)}(h*h]h*}hjsbah}(h]h]pah]h]h!]uh%jhjh&hh'h9h)Kubh)}(hpgSurface_Typeh]h)}(hjh]hpgSurface_Type}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)Kubah}(h]j}ah](jjeh]h]h!]jj j!)j"huh%hh'h9h)Khjh&hubj$)}(hhh]ha)}(h+The :py:class:`pygame.Surface` Python type.h](hThe }hjsbhk)}(h:py:class:`pygame.Surface`h]hq)}(hjh]hpygame.Surface}hj sbah}(h]h](h|pypy-classeh]h]h!]uh%hphjubah}(h]h]h]h]h!]refdoch refdomainjreftypeclass refexplicitrefwarnhNhNhpygame.Surfaceuh%hjh'h9h)Khjubh Python type.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubah}(h]h]h]h]h!]uh%j#hjh&hh'h9h)Nubeh}(h]h](h6vareh]h]h!]jgh6jhj9jij9jjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_Check (C function)c.pgSurface_CheckhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h int pgSurface_Check(PyObject *x)h]h)}(h int pgSurface_Check(PyObject *x)h](hdesc_sig_keyword_type)}(hinth]hint}hjXsbah}(h]h]ktah]h]h!]uh%jVhjRh&hh'h9h)Kubh)}(h h]h }hjgsbah}(h]h]hah]h]h!]uh%hhjRh&hh'h9h)Kubh)}(hpgSurface_Checkh]h)}(hpgSurface_Checkh]hpgSurface_Check}hjysbah}(h]h]jah]h]h!]uh%hhjuubah}(h]h](j j eh]h]h!]h#h$uh%hhjRh&hh'h9h)Kubhdesc_parameterlist)}(h (PyObject *x)h]hdesc_parameter)}(h PyObject *xh](hk)}(hhh]h)}(hPyObjecth]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]j)}(jj{jubc.pgSurface_Checkasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hxh]hx}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjRh&hh'h9h)Kubeh}(h]h]h]h]h!]h#h$juh%hjjhjNh&hh'h9h)Kubah}(h]jIah](jjeh]h]h!]jj j!)j"huh%hh'h9h)KhjKh&hubj$)}(hhh](ha)}(h;Return true if *x* is a :py:class:`pygame.Surface` instanceh](hReturn true if }hjsbh emphasis)}(h*x*h]hx}hj sbah}(h]h]h]h]h!]uh%j hjubh is a }hjsbhk)}(h:py:class:`pygame.Surface`h]hq)}(hjh]hpygame.Surface}hj!sbah}(h]h](h|pypy-classeh]h]h!]uh%hphjubah}(h]h]h]h]h!]refdoch refdomainj+reftypeclass refexplicitrefwarnhNhNhpygame.Surfaceuh%hjh'h9h)Khjubh instance}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubha)}(hnWill return false if *x* is a subclass of `Surface`. This is a macro. No check is made that *x* is not *NULL*.h](hWill return false if }hjGsbj )}(h*x*h]hx}hjOsbah}(h]h]h]h]h!]uh%j hjGubh is a subclass of }hjGsbh title_reference)}(h `Surface`h]hSurface}hjcsbah}(h]h]h]h]h!]uh%jahjGubh). This is a macro. No check is made that }hjGsbj )}(h*x*h]hx}hjusbah}(h]h]h]h]h!]uh%j hjGubh is not }hjGsbj )}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%j hjGubh.}hjGsbeh}(h]h]h]h]h!]uh%h`h'h9h)Khjh&hubeh}(h]h]h]h]h!]uh%j#hjKh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jgh6jhjjijjjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_New (C function)c.pgSurface_NewhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h.pgSurfaceObject* pgSurface_New(SDL_Surface *s)h]h)}(h.pgSurfaceObject *pgSurface_New(SDL_Surface *s)h](hk)}(hhh]h)}(hhh]hpgSurfaceObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargethmodnameN classnameNjj)}j]j)}(j pgSurface_Newjubc.pgSurface_Newasbuh%hjhjh&hh'h9h)K ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K ubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K ubh)}(h pgSurface_Newh]h)}(hjh]h pgSurface_New}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)K ubj)}(h(SDL_Surface *s)h]j)}(hSDL_Surface *sh](hk)}(hhh]h)}(h SDL_Surfaceh]h SDL_Surface}hj%sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj'modnameN classnameNjj)}j]jjasbuh%hjhjubh)}(h h]h }hjBsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjPsbah}(h]h]jah]h]h!]uh%jhjubh)}(hsh]hs}hj]sbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K ubah}(h]jah](jjeh]h]h!]jj j!)j"huh%hh'h9h)K hjh&hubj$)}(hhh]ha)}(hUReturn a new new pygame surface instance for SDL surface *s*. Return *NULL* on error.h](h9Return a new new pygame surface instance for SDL surface }hjsbj )}(h*s*h]hs}hjsbah}(h]h]h]h]h!]uh%j hjubh . Return }hjsbj )}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%j hjubh on error.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K"hjh&hubah}(h]h]h]h]h!]uh%j#hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jgh6jhjjijjjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_New2 (C function)c.pgSurface_New2hNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h:pgSurfaceObject* pgSurface_New2(SDL_Surface *s, int owner)h]h)}(h:pgSurfaceObject *pgSurface_New2(SDL_Surface *s, int owner)h](hk)}(hhh]h)}(hhh]hpgSurfaceObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargethmodnameN classnameNjj)}j]j)}(jpgSurface_New2jubc.pgSurface_New2asbuh%hjhjh&hh'h9h)K%ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjh&hh'h9h)K%ubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjh&hh'h9h)K%ubh)}(hpgSurface_New2h]h)}(hjh]hpgSurface_New2}hj!sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](j j eh]h]h!]h#h$uh%hhjh&hh'h9h)K%ubj)}(h(SDL_Surface *s, int owner)h](j)}(hSDL_Surface *sh](hk)}(hhh]h)}(hj'h]h SDL_Surface}hj?sbah}(h]h]jah]h]h!]uh%hhj<ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj'modnameN classnameNjj)}j]jjasbuh%hjhj8ubh)}(h h]h }hj[sbah}(h]h]hah]h]h!]uh%hhj8ubj)}(hjh]h*}hjisbah}(h]h]jah]h]h!]uh%jhj8ubh)}(hj_h]hs}hjvsbah}(h]h]jah]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]noemphh#h$uh%jhj4ubj)}(h int ownerh](jW)}(hinth]hint}hjsbah}(h]h]jcah]h]h!]uh%jVhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hownerh]howner}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhj4ubeh}(h]h]h]h]h!]h#h$juh%jhjh&hh'h9h)K%ubeh}(h]h]h]h]h!]h#h$juh%hjjhjh&hh'h9h)K%ubah}(h]jah](jjeh]h]h!]jj j!)j"huh%hh'h9h)K%hjh&hubj$)}(hhh]ha)}(hReturn a new new pygame surface instance for SDL surface *s*. If owner is true, the surface will be freed when the python object is destroyed. Return *NULL* on error.h](h9Return a new new pygame surface instance for SDL surface }hjsbj )}(h*s*h]hs}hjsbah}(h]h]h]h]h!]uh%j hjubhZ. If owner is true, the surface will be freed when the python object is destroyed. Return }hjsbj )}(h*NULL*h]hNULL}hjsbah}(h]h]h]h]h!]uh%j hjubh on error.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K'hjh&hubah}(h]h]h]h]h!]uh%j#hjh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jgh6jhjjijjjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h pgSurface_AsSurface (C function)c.pgSurface_AsSurfacehNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h-SDL_Surface* pgSurface_AsSurface(PyObject *x)h]h)}(h-SDL_Surface *pgSurface_AsSurface(PyObject *x)h](hk)}(hhh]h)}(hj'h]h SDL_Surface}hj/sbah}(h]h]jah]h]h!]uh%hhj,ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj'modnameN classnameNjj)}j]j)}(jpgSurface_AsSurfacejubc.pgSurface_AsSurfaceasbuh%hjhj(h&hh'h9h)K+ubh)}(h h]h }hjOsbah}(h]h]hah]h]h!]uh%hhj(h&hh'h9h)K+ubj)}(hjh]h*}hj]sbah}(h]h]jah]h]h!]uh%jhj(h&hh'h9h)K+ubh)}(hpgSurface_AsSurfaceh]h)}(hjLh]hpgSurface_AsSurface}hjnsbah}(h]h]jah]h]h!]uh%hhjjubah}(h]h](j j eh]h]h!]h#h$uh%hhj(h&hh'h9h)K+ubj)}(h (PyObject *x)h]j)}(h PyObject *xh](hk)}(hhh]h)}(hjh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]jJjMasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hx}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhj(h&hh'h9h)K+ubeh}(h]h]h]h]h!]h#h$juh%hjjhj$h&hh'h9h)K+ubah}(h]jah](jjeh]h]h!]jj j!)j"huh%hh'h9h)K+hj!h&hubj$)}(hhh](ha)}(hPReturn a pointer the SDL surface represented by the pygame Surface instance *x*.h](hLReturn a pointer the SDL surface represented by the pygame Surface instance }hjsbj )}(h*x*h]hx}hjsbah}(h]h]h]h]h!]uh%j hjubh.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K-hjh&hubha)}(h[This is a macro. Argument *x* is assumed to be a Surface, or subclass of Surface, instance.h](hThis is a macro. Argument }hj sbj )}(h*x*h]hx}hjsbah}(h]h]h]h]h!]uh%j hj ubh> is assumed to be a Surface, or subclass of Surface, instance.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)K0hjh&hubeh}(h]h]h]h]h!]uh%j#hj!h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jgh6jhj5jij5jjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_Blit (C function)c.pgSurface_BlithNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hjint pgSurface_Blit(PyObject *dstobj, PyObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args)h]h)}(hjint pgSurface_Blit(PyObject *dstobj, PyObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args)h](jW)}(hinth]hint}hjRsbah}(h]h]jcah]h]h!]uh%jVhjNh&hh'h9h)K3ubh)}(h h]h }hj`sbah}(h]h]hah]h]h!]uh%hhjNh&hh'h9h)K3ubh)}(hpgSurface_Blith]h)}(hpgSurface_Blith]hpgSurface_Blit}hjrsbah}(h]h]jah]h]h!]uh%hhjnubah}(h]h](j j eh]h]h!]h#h$uh%hhjNh&hh'h9h)K3ubj)}(hX(PyObject *dstobj, PyObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args)h](j)}(hPyObject *dstobjh](hk)}(hhh]h)}(hjh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]j)}(jjtjubc.pgSurface_Blitasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hdstobjh]hdstobj}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hPyObject *srcobjh](hk)}(hhh]h)}(hjh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetjmodnameN classnameNjj)}j]jjasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hsrcobjh]hsrcobj}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hSDL_Rect *dstrecth](hk)}(hhh]h)}(hSDL_Recth]hSDL_Rect}hj:sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj<modnameN classnameNjj)}j]jjasbuh%hjhj3ubh)}(h h]h }hjWsbah}(h]h]hah]h]h!]uh%hhj3ubj)}(hjh]h*}hjesbah}(h]h]jah]h]h!]uh%jhj3ubh)}(hdstrecth]hdstrect}hjrsbah}(h]h]jah]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hSDL_Rect *srcrecth](hk)}(hhh]h)}(hj<h]hSDL_Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypej reftargetj<modnameN classnameNjj)}j]jjasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hsrcrecth]hsrcrect}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(h int the_argsh](jW)}(hinth]hint}hjsbah}(h]h]jcah]h]h!]uh%jVhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubh)}(hthe_argsh]hthe_args}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$juh%jhjNh&hh'h9h)K3ubeh}(h]h]h]h]h!]h#h$juh%hjjhjJh&hh'h9h)K3ubah}(h]jEah](jjeh]h]h!]jj j!)j"huh%hh'h9h)K3hjGh&hubj$)}(hhh](ha)}(hPBlit the *srcrect* portion of Surface *srcobj* onto Surface *dstobj* at *srcobj*h](h Blit the }hj$ sbj )}(h *srcrect*h]hsrcrect}hj, sbah}(h]h]h]h]h!]uh%j hj$ ubh portion of Surface }hj$ sbj )}(h*srcobj*h]hsrcobj}hj> sbah}(h]h]h]h]h!]uh%j hj$ ubh onto Surface }hj$ sbj )}(h*dstobj*h]hdstobj}hjP sbah}(h]h]h]h]h!]uh%j hj$ ubh at }hj$ sbj )}(h*srcobj*h]hsrcobj}hjb sbah}(h]h]h]h]h!]uh%j hj$ ubeh}(h]h]h]h]h!]uh%h`h'h9h)K5hj! h&hubha)}(hXArgument *the_args* indicates the type of blit to perform: Normal blit (``0``), ``PYGAME_BLEND_ADD``, ``PYGAME_BLEND_SUB``, ``PYGAME_BLEND_SUB``, ``PYGAME_BLEND_MULT``, ``PYGAME_BLEND_MIN``, ``PYGAME_BLEND_MAX``, ``PYGAME_BLEND_RGBA_ADD``, ``PYGAME_BLEND_RGBA_SUB``, ``PYGAME_BLEND_RGBA_MULT``, ``PYGAME_BLEND_RGBA_MIN``, ``PYGAME_BLEND_RGBA_MAX``, ``PYGAME_BLEND_ALPHA_SDL2`` and ``PYGAME_BLEND_PREMULTIPLIED``. Argument *dstrect* is updated to the actual area on *dstobj* affected by the blit.h](h Argument }hjv sbj )}(h *the_args*h]hthe_args}hj~ sbah}(h]h]h]h]h!]uh%j hjv ubh5 indicates the type of blit to perform: Normal blit (}hjv sbhq)}(h``0``h]h0}hj sbah}(h]h]h]h]h!]uh%hphjv ubh), }hjv sbhq)}(h``PYGAME_BLEND_ADD``h]hPYGAME_BLEND_ADD}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_SUB``h]hPYGAME_BLEND_SUB}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_SUB``h]hPYGAME_BLEND_SUB}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_MULT``h]hPYGAME_BLEND_MULT}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_MIN``h]hPYGAME_BLEND_MIN}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_MAX``h]hPYGAME_BLEND_MAX}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_RGBA_ADD``h]hPYGAME_BLEND_RGBA_ADD}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_RGBA_SUB``h]hPYGAME_BLEND_RGBA_SUB}hj sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_RGBA_MULT``h]hPYGAME_BLEND_RGBA_MULT}hj2 sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_RGBA_MIN``h]hPYGAME_BLEND_RGBA_MIN}hjD sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_RGBA_MAX``h]hPYGAME_BLEND_RGBA_MAX}hjV sbah}(h]h]h]h]h!]uh%hphjv ubh, }hjv sbhq)}(h``PYGAME_BLEND_ALPHA_SDL2``h]hPYGAME_BLEND_ALPHA_SDL2}hjh sbah}(h]h]h]h]h!]uh%hphjv ubh and }hjv sbhq)}(h``PYGAME_BLEND_PREMULTIPLIED``h]hPYGAME_BLEND_PREMULTIPLIED}hjz sbah}(h]h]h]h]h!]uh%hphjv ubh . Argument }hjv sbj )}(h *dstrect*h]hdstrect}hj sbah}(h]h]h]h]h!]uh%j hjv ubh" is updated to the actual area on }hjv sbj )}(h*dstobj*h]hdstobj}hj sbah}(h]h]h]h]h!]uh%j hjv ubh affected by the blit.}hjv sbeh}(h]h]h]h]h!]uh%h`h'h9h)K7hj! h&hubha)}(hwThe C version of the :py:meth:`pygame.Surface.blit` method. Return ``0`` on success, ``-1`` or ``-2``` on an exception.h](hThe C version of the }hj sbhk)}(h:py:meth:`pygame.Surface.blit`h]hq)}(hj h]hpygame.Surface.blit()}hj sbah}(h]h](h|pypy-metheh]h]h!]uh%hphj ubah}(h]h]h]h]h!]refdoch refdomainj reftypemeth refexplicitrefwarnhNhNhpygame.Surface.blituh%hjh'h9h)K@hj ubh method. Return }hj sbhq)}(h``0``h]h0}hj sbah}(h]h]h]h]h!]uh%hphj ubh on success, }hj sbhq)}(h``-1``h]h-1}hj sbah}(h]h]h]h]h!]uh%hphj ubh or }hj sbhq)}(h``-2```h]h-2`}hj sbah}(h]h]h]h]h!]uh%hphj ubh on an exception.}hj sbeh}(h]h]h]h]h!]uh%h`h'h9h)K@hj! h&hubeh}(h]h]h]h]h!]uh%j#hjGh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jgh6jhj' jij' jjjkjljmjnjojpuh%hh&hhhOh'h9h)Nubeh}(h]src-c-surface-cah]h]src_c/surface.cah]h!]uh%h:hhsbah}(h]h]h]h]h!]uh%jhj$ubh the owner of the lock.}hj$sbeh}(h]h]h]h]h!]uh%h`h'h9h)K/hj!h&hubah}(h]h]h]h]h!]uh%j"hjuh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jj_jj_jjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_Unprep (C function)c.pgSurface_UnprephNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h/void pgSurface_Unprep(pgSurfaceObject *surfobj)h]h)}(h/void pgSurface_Unprep(pgSurfaceObject *surfobj)h](jD)}(hvoidh]hvoid}hj|sbah}(h]h]jPah]h]h!]uh%jChjxh&hh'h9h)K2ubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjxh&hh'h9h)K2ubh)}(hpgSurface_Unpreph]h)}(hpgSurface_Unpreph]hpgSurface_Unprep}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhjxh&hh'h9h)K2ubj{)}(h(pgSurfaceObject *surfobj)h]j)}(hpgSurfaceObject *surfobjh](hk)}(hhh]h)}(hjh]hpgSurfaceObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjmodnameN classnameNj]j`)}jc]jg)}(jjjjkubc.pgSurface_Unprepasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hsurfobj}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jzhjxh&hh'h9h)K2ubeh}(h]h]h]h]h!]h#h$juh%hjjhjth&hh'h9h)K2ubah}(h]joah](jjeh]h]h!]jjj )j!huh%hh'h9h)K2hjqh&hubj#)}(hhh]ha)}(hJIf *surfobj* is a subsurface, then release its lock on the parent surface.h](hIf }hjsbj)}(h *surfobj*h]hsurfobj}hj&sbah}(h]h]h]h]h!]uh%jhjubh> is a subsurface, then release its lock on the parent surface.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K4hjh&hubah}(h]h]h]h]h!]uh%j"hjqh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjGjjGjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_Lock (C function)c.pgSurface_LockhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(h,int pgSurface_Lock(pgSurfaceObject *surfobj)h]h)}(h,int pgSurface_Lock(pgSurfaceObject *surfobj)h](jD)}(hinth]hint}hjdsbah}(h]h]jPah]h]h!]uh%jChj`h&hh'h9h)K6ubh)}(h h]h }hjrsbah}(h]h]hah]h]h!]uh%hhj`h&hh'h9h)K6ubh)}(hpgSurface_Lockh]h)}(hpgSurface_Lockh]hpgSurface_Lock}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h](jj eh]h]h!]h#h$uh%hhj`h&hh'h9h)K6ubj{)}(h(pgSurfaceObject *surfobj)h]j)}(hpgSurfaceObject *surfobjh](hk)}(hhh]h)}(hjh]hpgSurfaceObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjmodnameN classnameNj]j`)}jc]jg)}(jjjjkubc.pgSurface_Lockasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hsurfobj}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jzhj`h&hh'h9h)K6ubeh}(h]h]h]h]h!]h#h$juh%hjjhj\h&hh'h9h)K6ubah}(h]jWah](jjeh]h]h!]jjj )j!huh%hh'h9h)K6hjYh&hubj#)}(hhh]ha)}(hBLock pygame surface *surfobj*, with *surfobj* owning its own lock.h](hLock pygame surface }hjsbj)}(h *surfobj*h]hsurfobj}hjsbah}(h]h]h]h]h!]uh%jhjubh, with }hjsbj)}(h *surfobj*h]hsurfobj}hj sbah}(h]h]h]h]h!]uh%jhjubh owning its own lock.}hjsbeh}(h]h]h]h]h!]uh%h`h'h9h)K8hjh&hubah}(h]h]h]h]h!]uh%j"hjYh&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jjAjjAjjjjjjjuh%hh&hhhOh'h9h)Nubh)}(hhh]h}(h]h]h]h]h!]entries](hpgSurface_LockBy (C function)c.pgSurface_LockByhNtauh%hhhOh&hh'h9h)Nubh)}(hhh](h)}(hAint pgSurface_LockBy(pgSurfaceObject *surfobj, PyObject *lockobj)h]h)}(hAint pgSurface_LockBy(pgSurfaceObject *surfobj, PyObject *lockobj)h](jD)}(hinth]hint}hj^sbah}(h]h]jPah]h]h!]uh%jChjZh&hh'h9h)K:ubh)}(h h]h }hjlsbah}(h]h]hah]h]h!]uh%hhjZh&hh'h9h)K:ubh)}(hpgSurface_LockByh]h)}(hpgSurface_LockByh]hpgSurface_LockBy}hj~sbah}(h]h]jah]h]h!]uh%hhjzubah}(h]h](jj eh]h]h!]h#h$uh%hhjZh&hh'h9h)K:ubj{)}(h-(pgSurfaceObject *surfobj, PyObject *lockobj)h](j)}(hpgSurfaceObject *surfobjh](hk)}(hhh]h)}(hjh]hpgSurfaceObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjmodnameN classnameNj]j`)}jc]jg)}(jjjjkubc.pgSurface_LockByasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hsurfobj}hjsbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubj)}(hPyObject *lockobjh](hk)}(hhh]h)}(hjEh]hPyObject}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!] refdomainh6reftypejY reftargetjEmodnameN classnameNj]j`)}jc]jjasbuh%hjhjubh)}(h h]h }hjsbah}(h]h]hah]h]h!]uh%hhjubj)}(hjh]h*}hjsbah}(h]h]jah]h]h!]uh%jhjubh)}(hjh]hlockobj}hj)sbah}(h]h]jah]h]h!]uh%hhjubeh}(h]h]h]h]h!]noemphh#h$uh%jhjubeh}(h]h]h]h]h!]h#h$juh%jzhjZh&hh'h9h)K:ubeh}(h]h]h]h]h!]h#h$juh%hjjhjVh&hh'h9h)K:ubah}(h]jQah](jjeh]h]h!]jjj )j!huh%hh'h9h)K:hjSh&hubj#)}(hhh](ha)}(hOLock pygame surface *surfobj* with Python object *lockobj* the owning the lock.h](hLock pygame surface }hjRsbj)}(h *surfobj*h]hsurfobj}hjZsbah}(h]h]h]h]h!]uh%jhjRubh with Python object }hjRsbj)}(h *lockobj*h]hlockobj}hjlsbah}(h]h]h]h]h!]uh%jhjRubh the owning the lock.}hjRsbeh}(h]h]h]h]h!]uh%h`h'h9h)K h&hubj#)}(hhh](ha)}(hLock pygame surface *surfobj* for Python object *lockobj* and return a new :c:data:`pgLifetimeLock_Type` instance for the lock.h](hLock pygame surface }hj[ sbj)}(h *surfobj*h]hsurfobj}hjc sbah}(h]h]h]h]h!]uh%jhj[ ubh for Python object }hj[ sbj)}(h *lockobj*h]hlockobj}hju sbah}(h]h]h]h]h!]uh%jhj[ ubh and return a new }hj[ sbhk)}(h:c:data:`pgLifetimeLock_Type`h]hq)}(hj h]hpgLifetimeLock_Type}hj sbah}(h]h](h|h6c-dataeh]h]h!]uh%hphj ubah}(h]h]h]h]h!]refdoch refdomainh6reftypedata refexplicitrefwarnj'j`)}jc]jg jj asbhpgLifetimeLock_Typeuh%hjh'h9h)KNhj[ ubh instance for the lock.}hj[ sbeh}(h]h]h]h]h!]uh%h`h'h9h)KNhjX h&hubha)}(hjThis function is not called anywhere within pygame. It and pgLifetimeLock_Type are candidates for removal.h]hjThis function is not called anywhere within pygame. It and pgLifetimeLock_Type are candidates for removal.}hj sbah}(h]h]h]h]h!]uh%h`h'h9h)KQhjX h&hubeh}(h]h]h]h]h!]uh%j"hj> h&hh'h9h)Nubeh}(h]h](h6functioneh]h]h!]jh6jj jj jjjjjjjuh%hh&hhhOh'h9h)Nubeh}(h]src-c-surflock-cah]h]src_c/surflock.cah]h!]uh%h:hhgettext_language_teamLANGUAGE latex_documents](hA Pygame.texPygame DocumentationPygame Developersmanualta latex_logoNlatex_appendices]latex_use_latex_multicolumnlatex_toplevel_sectioningNlatex_domain_indiceslatex_show_urlsnolatex_show_pagerefslatex_elements}latex_additional_files]latex_table_style](booktabs colorrowse latex_themej latex_theme_options}latex_theme_path]linkcheck_ignore]linkcheck_exclude_documents]linkcheck_allowed_redirects}linkcheck_auth]linkcheck_request_headers}linkcheck_retriesKlinkcheck_timeoutKlinkcheck_workersKlinkcheck_anchorslinkcheck_anchors_ignore]^!a linkcheck_anchors_ignore_for_url)linkcheck_rate_limit_timeoutG@rlinkcheck_allow_unauthorized#linkcheck_report_timeouts_as_broken man_show_urlsman_make_section_directorytexinfo_appendices]texinfo_elements}texinfo_domain_indicestexinfo_show_urlsfootnotetexinfo_no_detailmenutexinfo_cross_referencestext_sectionchars*=-~"+` text_newlinesunixtext_add_secnumberstext_secnumber_suffix. xml_prettyc_id_attributes]c_paren_attributes]c_extra_keywords](alignasalignofboolcomplex imaginarynoreturn static_assert thread_localec_maximum_signature_line_lengthNcpp_index_common_prefix]cpp_id_attributes]cpp_paren_attributes]!cpp_maximum_signature_line_lengthNcpp_debug_lookupcpp_debug_show_tree(javascript_maximum_signature_line_lengthNstrip_signature_backslash!python_use_unqualified_type_names$python_maximum_signature_line_lengthN"python_display_short_literal_typesapplehelp_bundle_idNapplehelp_dev_regionen-usapplehelp_bundle_version1applehelp_iconNapplehelp_kb_urlNapplehelp_remote_urlNapplehelp_index_anchorsapplehelp_min_term_lengthNapplehelp_indexer_path/usr/bin/hiutilapplehelp_codesign_path/usr/bin/codesign applehelp_disable_external_toolshtmlhelp_basename Pygamedochtmlhelp_file_suffixNhtmlhelp_link_suffixNqthelp_namespaceN qthelp_themenonavqthelp_theme_options}autoclass_contentclassautodoc_member_order alphabeticalautodoc_class_signaturemixedautodoc_default_options}autodoc_docstring_signatureautodoc_mock_imports]autodoc_typehints signature$autodoc_typehints_description_targetallautodoc_type_aliases}autodoc_typehints_formatshortautodoc_warningiserrorautodoc_inherit_docstringsautodoc_preserve_defaultsdoctest_show_successes doctest_path]doctest_test_doctest_blockshWdoctest_global_setuph:doctest_global_cleanuph:doctest_default_flagsK)coverage_modules)coverage_ignore_modules]coverage_ignore_functions]coverage_ignore_classes]coverage_ignore_pyobjects]coverage_c_path]coverage_c_regexes}coverage_ignore_c_items}coverage_write_headlinecoverage_statistics_to_reportcoverage_statistics_to_stdoutcoverage_skip_undoc_in_sourcecoverage_show_missing_items headers_dest src_c/docheaders_mkdirsheaders_filename_sfx_docheaders_templateheader.hboilerplate_skip_transform]hAaversionadded_formatNew in pygame %sversionchanged_formatChanged in pygame %sdeprecated_formatDeprecated since pygame %sversionextended_formatExtended in pygame %sedit_on_github_project pygame/pygameedit_on_github_branchmainepub_css_files]_options}(h0henvh1h2jh3h4htmlh5h4jh6h7jh8h7jh9h:jh;Njh(h)jh*h+jhgettexth?jhBhAjh@hAjhChDjh-h.jhGhHjhIhJjhLNjhMjhNjhOjhPhQjhRjhSjhThUjhVhWjhXhYjhZh[jh]Njh^jh_h`jhajhbhcjhdNjheNjhfjhghhjh/Nh:hihjh:hkNjhlh:hmhnh:hohph:hqjhrKjhshtjh}Njh~jhNjhjhhjhjhNjhNjhjhhjhhjhj epub_basenamehh:hG@hhhhhhh epub_titlehh epub_authorh2h epub_languageh)hepub_publisherh2hepub_copyrighth4hhhhhhhhhjh)jh)jhhjhhjjjhhhjhKjhjhhWjhjhKjhhhepub_use_indexhhhhhhhhhhhhjhhjhhjhhjhtml_short_titlehjhNjhhjhhjhhjhhjhhjhhjhNjhhjhhjhψjhЈjhhjhjhӉjhԈjhՈjhhjhh:jhNjhNjhۈjh܈jh݉jhhjhhjhjhhjhNjhhjhh:h:hjhh:jhhjhNjhjhhjhhjhhjhhjhNjmathjax2_configNjhNjhjhjhjhjjjjjjjjjj latex_enginepdflatexh:jjh:j Nh:jjh:jh:latex_use_xindyh:jNh:jh:jjh:jh:jjh:jjh:jjh:jj h:jj h:j!j"h:latex_docclass}h:j#j$h:j%j&h:j'j(h:j)j*h:j+j,h:j-Kh:j.Kh:j/Kh:j0h:j1j2h:j4)h:j5G@rh:j6h:j7h: man_pages](hApygame pygame 2.6.1]h2aKtah:j8h:j9h:singlehtml_sidebarshjtexinfo_documents](hApygamehh2jOne line description of project Miscellaneoustah:j:j;h:j<j=h:j>h:j?j@h:jAh:jBh:jCjDjjEjFjjGjjHjIjjJjjKjLjjMjNjjOjPjjYNjjZj[jj\j]jj^j_jj`Njjah:jbh:jcNjjdjjejjfNjjgjapplehelp_bundle_nameh applehelpjhNjjijjjjkjljjmNjapplehelp_kb_product pygame-2.6.1jjnNjjoNjjpjjqNjapplehelp_stopwordsh)japplehelp_localeh)japplehelp_title pygame Helpjapplehelp_codesign_identityNjapplehelp_codesign_flags]jjrjsjjtjujjvjdevhelp_basenamehdevhelpjwjxh:jyNjjzNjqthelp_basenamehjj{Njj|j}jj~jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjh:jjh:jhWh:jh:h:jh:h:jK)h:j)h:jjh:jjh:jjh:jjh:jjh:jjh:jjh:jh:jh:jh:jh:jh:jjjjh:jjjjjjjjh:jjjjjjjjjjjjjjjjjjuub config_statusKconfig_status_extrah:eventsNh0sphinx.projectProject)}(hh (h h h h hhhhtRhChE_first_source_suffixhEdocnames( ref/spritec_api/rwobjectref/font ref/joystickBtut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESStut/newbieguidetut/tom_games4 ref/pygame c_api/mixer ref/localsRtut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력tut/tom_games2#tut/en/Red_or_Black/8.Epilog/Epilogref/maskAtut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리tut/SurfarrayIntro ref/mixer?tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alphac_api/freetype c_api/rectref/math ref/scraptut/tom_games6 tut/MakeGames ref/display ref/sndarrayc_api ref/touch tut/chimp.py:tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT ref/testsref/drawNtut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력 ref/image filepathsref/sdl2_videoNtut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리 ref/mouseref/bufferproxyjtjImportInit.rstRj@jtj MakeGames.rstRj-jtj MoveIt.rstRjojtjPygameIntro.rstRjGjtjSpriteIntro.rstRjXjtjSurfarrayIntro.rstRj%jtj chimp.py.rstRj2jtjnewbieguide.rstRjjtjtom_games2.rstRj!jtjtom_games3.rstRjSjtjtom_games4.rstRjjtjtom_games5.rstRj\jtjtom_games6.rstRj,jt(jh) Red_or_Black1.Prologintroduction.rsttRjkjt(jh)jK 2.Print_textBasic TEMPLATE and OUTPUT.rsttRj3jt(jh)jK 3.Move_textBasic PROCESS.rsttRjcjt(jh)jK4.Control_textBasic INPUT.rsttRjljt(jh)jK5.HP_bar)Advanced OUTPUT with Advanced PROCESS.rsttRjjt(jh)jK 6.Buttons'Advanced INPUT with Advanced OUTPUT.rsttRjajt(jh)jK 7.Game_board"Advanced OUTPUT and plus alpha.rsttRj'jt(jh)jK8.Epilog Epilog.rsttRj"jt(jko빨간블록 검은블록 개요.rsttRjLjt(jjljm1.프롤로그 소개.rsttRjYjt(jjljm2.텍스트 출력기초 템플릿과 출력.rsttRj6jt(jjljm3.텍스트 이동기초 처리.rsttRj$jt(jjljm4.텍스트 조종기초 입력.rsttRjHjt(jjljm5.HP바)심화 출력 그리고 심화 처리.rsttRj:jt(jjljm 6.버튼들)심화 입력 그리고 심화 출력.rsttRj jt(jjljm 7.게임판&심화 출력 그리고 조금 더.rsttRj]jt(jjljm8.에필로그에필로그.rsttRj=u_docname_to_path}(j0jwj8jzjbj}jmjjDjjOjjVjjIjj_jj(jjjj)jjjjJjjAjjRjjTjj<jj?jjejjZjjFjjijj.jj5jjdjjnjjCjjjjWjjhjj7jjjj^jjjj#jj*jj`jj&jj;jjKjjMjjgjjNjjjjQjj+jjjjj9jj/jjjjPj j[j j4jjfjj1jjEjjBjjUj j>j#j@j&j-j)joj,jGj/jXj2j%j5j2j8jj;j!j>jSjAjjDj\jGj,jJjkjOj3jSjcjWjlj[jj_jajcj'jgj"jkjLjpjYjtj6jxj$j|jHjj:jj jj]jj=juubh6}(sphinx.domains.cKsphinx.domains.changesetKsphinx.domains.citationKsphinx.domains.cppK sphinx.domains.indexKsphinx.domains.javascriptKsphinx.domains.mathKsphinx.domains.pythonKsphinx.domains.rstKsphinx.domains.stdKhUK?uversioning_conditionversioning_comparedomains}settings}(auto_id_prefixid image_loadinglinkembed_stylesheetcloak_email_addresses pep_base_urlhttps://peps.python.org/pep_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/rfc_referencesNinput_encodingh.doctitle_xformsectsubtitle_xformsection_self_link halt_levelKfile_insertion_enabledsmartquotes_locales]jhhR language_codeh) smart_quotesuall_docs}(j0 A#jD A#jOT A#jV4 A#jIh A#j_ A#j(( A#j! A#j)l A#j A#jJ{- A#jA&y A#jRe A#jT A#j8A A#jb8 A#jmo A#j< A#j? A#jeq A#jZuF A#jFj A#jiZ A#j.4 A#j5 A#jd^K A#jn9 A#jC A#j A#jWC A#jhA#j7(A#jZA#j^2A#jDA#j#mA#j*~6 A#j`HA#j&]A#j;=@A#jKA#jM)A#jg,A#jN_A#jA#jQA#j+A#jjHA#j9sA#j//A#jA#jPA#j[g^A#j4MA#jfA#j1HA#jEjz A#jB A#jUN!A#j>Е!A#j@!A#j-z"A#joi"A#jG)"A#jXI#A#j%$A#j27$A#jkO$A#j3o$A#jc$A#jl$A#jk$A#jaW$A#j'^$A#j"$A#jY8 %A#j6&%A#j$=%A#jHT%A#j:t%A#j %A#j]I%A#j=%A#jL%A#j8(A#j!)A#jSV<)A#j6x)A#j\n)A#j,1)A#u dependencies collections defaultdictbuiltinssetR(jD( common.txtjO( common.txtjV( common.txtjI( common.txtj_( common.txtj(( common.txtj( common.txtj)( common.txtj( common.txtjJ( common.txtjA( common.txtjR( common.txtjT( common.txtjb((ref/code_examples/base_script_example.py ref/code_examples/base_script.pyjm(_static/pygame_lofi.png_static/pygame_logo.png_static/pygame_tiny.png!_static/pygame_powered_lowres.png_static/pygame_powered.pngj<( common.txtref/common.txtj?( common.txtref/common.txtje( common.txtref/common.txtjZ( common.txtref/common.txtjF( common.txtref/common.txtji(+ref/code_examples/cursors_module_example.py common.txtref/common.txtj.( common.txtref/common.txtj5(ref/common.txt)ref/code_examples/draw_module_example.png common.txt(ref/code_examples/draw_module_example.pyjd( common.txtref/common.txtjn( common.txtref/common.txtjC( common.txtref/common.txtj( common.txtref/common.txtjW( common.txtref/common.txtjh( common.txtref/common.txtj7( common.txtref/common.txtj($ref/code_examples/joystick_calls.png common.txt../../examples/joystick.pyref/common.txtj^( common.txtref/common.txtj( common.txtref/common.txtj#( common.txtref/common.txtj*(ref/code_examples/angle_to.png common.txtref/common.txtj`( common.txtref/common.txtj&( common.txtref/common.txtj;( common.txtref/common.txtjK( common.txtref/common.txtjM( common.txtref/common.txtjg( common.txtref/common.txtjN( common.txtref/common.txtj( common.txtref/common.txtjQ( common.txtref/common.txtj+( common.txtref/common.txtjj( common.txtref/common.txtj9( common.txtref/common.txtj/( common.txtref/common.txtj( common.txtref/common.txtjP( common.txtref/common.txtj[( common.txtref/common.txtj4( common.txtref/common.txtjf( common.txtref/common.txtj1( common.txtref/common.txtjE( common.txt../../test/transform_test.pyref/common.txtjB(tut/camera_yuv.jpgtut/camera_background.jpgtut/camera_rgb.jpgtut/camera_mask.jpg common.txttut/camera_thresh.jpgtut/camera_hsv.jpgtut/common.txttut/camera_green.jpgtut/camera_thresholded.jpgtut/camera_average.jpgjU( common.txttut/common.txttut/chimpshot.gifj>( common.txttut/common.txtj@( common.txttut/common.txtj-( common.txttut/common.txtjo( common.txttut/common.txtjG(tut/intro_ball.giftut/intro_freedom.jpg common.txttut/common.txttut/intro_blade.jpgjX( common.txttut/common.txtj%(tut/surfarray_rgbarray.pngtut/surfarray_xfade.pngtut/surfarray_striped.pngtut/surfarray_scaledown.pngtut/surfarray_soften.png common.txttut/surfarray_scaleup.pngtut/common.txttut/surfarray_flipped.pngtut/surfarray_allblack.pngtut/surfarray_redimg.pngj2( common.txttut/common.txt../../examples/chimp.pyjk(8tut/en/Red_or_Black/1.Prolog/introduction-Battleship.png6tut/en/Red_or_Black/1.Prolog/introduction-PuyoPuyo.png1tut/en/Red_or_Black/1.Prolog/introduction-TPS.pngj3(>tut/en/Red_or_Black/2.Print_text/Bagic-ouput-result-screen.png;tut/en/Red_or_Black/2.Print_text/Basic-ouput-sourcecode.pngjc(>tut/en/Red_or_Black/3.Move_text/Bagic-PROCESS-resultscreen.png sbaj:mod:`pygame.Overlay`jjj }(j]j](jpypy-modej]j]j]ujNjNj j; ubaj }(j]j]j]j]j]ujjubjgj)}(jh:j]j)}(j]jpygame.PixelArray}j jW sbaj:class:`pygame.PixelArray`jjj }(j]j](jpypy-classej]j]j]ujNjNj jT ubaj }(j]j]j]j]j]ujjubjNj)}(jh:j]j)}(j]jpygame.pixelcopy}j jp sbaj:mod:`pygame.pixelcopy`jjj }(j]j](jpypy-modej]j]j]ujNjNj jm ubaj }(j]j]j]j]j]ujjubjj)}(jh:j]j)}(j]jpygame}j j sbaj :mod:`pygame`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjQj)}(jh:j]j)}(j]j pygame.Rect}j j sbaj:mod:`pygame.Rect`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubj+j)}(jh:j]j)}(j]j pygame.scrap}j j sbaj:mod:`pygame.scrap`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjjj)}(jh:j]j)}(j]jpygame._sdl2.controller}j j sbaj:mod:`pygame._sdl2.controller`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubj9j)}(jh:j]j)}(j]jpygame.sdl2_video}j j sbaj:mod:`pygame.sdl2_video`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubj/j)}(jh:j]j)}(j]jpygame.sndarray}j j sbaj:mod:`pygame.sndarray`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjj)}(jh:j]j)}(j]j pygame.sprite}j j sbaj:mod:`pygame.sprite`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjPj)}(jh:j]j)}(j]jpygame.Surface}j j8 sbaj:mod:`pygame.Surface`jjj }(j]j](jpypy-modej]j]j]ujNjNj j5 ubaj }(j]j]j]j]j]ujjubj[j)}(jh:j]j)}(j]jpygame.surfarray}j jQ sbaj:mod:`pygame.surfarray`jjj }(j]j](jpypy-modej]j]j]ujNjNj jN ubaj }(j]j]j]j]j]ujjubj4j)}(jh:j]j)}(j]j pygame.tests}j jj sbaj:mod:`pygame.tests`jjj }(j]j](jpypy-modej]j]j]ujNjNj jg ubaj }(j]j]j]j]j]ujjubjfj)}(jh:j]j)}(j]j pygame.time}j j sbaj:mod:`pygame.time`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubj1j)}(jh:j]j)}(j]jpygame._sdl2.touch}j j sbaj:mod:`pygame._sdl2.touch`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjEj)}(jh:j]j)}(j]jpygame.transform}j j sbaj:mod:`pygame.transform`jjj }(j]j](jpypy-modej]j]j]ujNjNj j ubaj }(j]j]j]j]j]ujjubjBj)}(jh:j]j-Pygame Tutorials - Camera Module Introduction}j j sbaj }(j]j]j]j]j]ujjubjUj)}(jh:j]j-Pygame Tutorials - Line By Line Chimp Example}j j sbaj }(j]j]j]j]j]ujjubj>j)}(jh:j]j(Pygame Tutorials - Setting Display Modes}j j sbaj }(j]j]j]j]j]ujjubj@j)}(jh:j]j(Pygame Tutorials - Import and Initialize}j j sbaj }(j]j]j]j]j]ujjubj-j)}(jh:j]jMaking Games With Pygame}j j sbaj }(j]j]j]j]j]ujjubjoj)}(jh:j]j0Pygame Tutorials - Help! How Do I Move An Image?}j j sbaj }(j]j]j]j]j]ujjubjGj)}(jh:j]j Pygame Intro}j j sbaj }(j]j]j]j]j]ujjubjXj)}(jh:j]j-Pygame Tutorials - Sprite Module Introduction}j j& sbaj }(j]j]j]j]j]ujjubj%j)}(jh:j]j)Pygame Tutorials - Surfarray Introduction}j j3 sbaj }(j]j]j]j]j]ujjubj2j)}(jh:j]jpygame/examples/chimp.py}j j@ sbaj }(j]j]j]j]j]ujjubjkj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j jM sbaj }(j]j]j]j]j]ujjubj3j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j jZ sbaj }(j]j]j]j]j]ujjubjcj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j jg sbaj }(j]j]j]j]j]ujjubjlj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j jt sbaj }(j]j]j]j]j]ujjubjj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubjaj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj'j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj"j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubjYj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj6j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj$j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubjHj)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj:j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj]j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubj=j)}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]ujjubjLj)}(jh:j]j한국어 튜토리얼}j j sbaj }(j]j]j]j]j]ujjubjj)}(jh:j]jNewbie Guide to Pygame}j j* sbaj }(j]j]j]j]j]ujjubj!j)}(jh:j]jRevision: Pygame fundamentals}j j7 sbaj }(j]j]j]j]j]ujjubjSj)}(jh:j]jKicking things off}j jD sbaj }(j]j]j]j]j]ujjubjj)}(jh:j]jGame object classes}j jQ sbaj }(j]j]j]j]j]ujjubj\j)}(jh:j]jUser-controllable objects}j j^ sbaj }(j]j]j]j]j]ujjubj,j)}(jh:j]jPutting it all together}j jk sbaj }(j]j]j]j]j]ujjubu longtitles}(j0jjDjjOj'jVj4jIjAj_jNj(j[jjhj)jujjjJjjAjjRjjTjj8jjbjjmjj<jj?jjej!jZj:jFjSjij`j.jyj5jjdjjnjjCjjjjWjjhj(j7jAjjZj^jsjjj#jj*jj`jj&jj;j jKj" jMj; jgjT jNjm jj jQj j+j jjj j9j j/j jj jPj5 j[jN j4jg jfj j1j jEj jBj jUj j>j j@j j-j joj jGj jXj& j%j3 j2j@ jkjM j3jZ jcjg jljt jj jaj j'j j"j jYj j6j j$j jHj j:j j j j]j j=j jLj jj)}(jh:j]jA Newbie Guide to pygame}j jz sbaj }(j]j]j]j]j]ujjubj!j7 jSjD jjQ j\j^ j,jk utocs}(j0j bullet_list)}(jh:j]j list_item)}(jh:j](sphinx.addnodescompact_paragraph)}(jh:j]j reference)}(jh:j]j pygame C API}j j sbaj }(j]j]j]j]j]internalrefurij0 anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j toctree)}(j]jh:jj j }(j]j]j]j]j]j j0entries](N c_api/slotsN c_api/baseNc_api/bufferproxyN c_api/colorN c_api/displayN c_api/eventNc_api/freetypeN c_api/mixerN c_api/rectNc_api/rwobjectN c_api/surfaceNc_api/surflockN c_api/versione includefiles](j j j j j j j j j j j j j emaxdepthKcaptionNglobhidden includehiddennumberedK titlesonly rawentries]ujKj3/home/runner/work/pygame/pygame/docs/reST/c_api.rstj j ubaj }(j]j]j]j]j]ujj j j ubej }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj ubjDj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j&High level API exported by pygame.base}j j sbaj }(j]j]j]j]j]internalrefurijD anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j src_c/base.c}j j! sbaj }(j]j]j]j]j]internalrefurijD anchorname #src-c-base-cujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j j ubej }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj ubjOj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j4Class BufferProxy API exported by pygame.bufferproxy}j jY sbaj }(j]j]j]j]j]internalrefurijO anchornameh:ujj j jV ubaj }(j]j]j]j]j]ujj j jS ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/bufferproxy.c}j jx sbaj }(j]j]j]j]j]internalrefurijO anchorname#src-c-bufferproxy-cujj j ju ubaj }(j]j]j]j]j]ujj j jr ubaj }(j]j]j]j]j]ujj j jo ubaj }(j]j]j]j]j]ujj j jS ubej }(j]j]j]j]j]ujj j jP ubaj }(j]j]j]j]j]ujj ubjVj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j(Class Color API exported by pygame.color}j j sbaj }(j]j]j]j]j]internalrefurijV anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j src_c/color.c}j j sbaj }(j]j]j]j]j]internalrefurijV anchorname#src-c-color-cujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j j ubej }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj ubjIj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.display}j jsbaj }(j]j]j]j]j]internalrefurijI anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/display.c}j j&sbaj }(j]j]j]j]j]internalrefurijI anchorname#src-c-display-cujj j j#ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj ubj_j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.event}j j^sbaj }(j]j]j]j]j]internalrefurij_ anchornameh:ujj j j[ubaj }(j]j]j]j]j]ujj j jXubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j src_c/event.c}j j}sbaj }(j]j]j]j]j]internalrefurij_ anchorname#src-c-event-cujj j jzubaj }(j]j]j]j]j]ujj j jwubaj }(j]j]j]j]j]ujj j jtubaj }(j]j]j]j]j]ujj j jXubej }(j]j]j]j]j]ujj j jUubaj }(j]j]j]j]j]ujj ubj(j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j API exported by pygame._freetype}j jsbaj }(j]j]j]j]j]internalrefurij( anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/_freetype.c}j jsbaj }(j]j]j]j]j]internalrefurij( anchorname#src-c-freetype-cujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.mixer}j j sbaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j src_c/mixer.c}j j+sbaj }(j]j]j]j]j]internalrefurij anchorname#src-c-mixer-cujj j j(ubaj }(j]j]j]j]j]ujj j j%ubaj }(j]j]j]j]j]ujj j j"ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj)j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j&Class Rect API exported by pygame.rect}j jcsbaj }(j]j]j]j]j]internalrefurij) anchornameh:ujj j j`ubaj }(j]j]j]j]j]ujj j j]ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j src_c/rect.c}j jsbaj }(j]j]j]j]j]internalrefurij) anchorname #src-c-rect-cujj j jubaj }(j]j]j]j]j]ujj j j|ubaj }(j]j]j]j]j]ujj j jyubaj }(j]j]j]j]j]ujj j j]ubej }(j]j]j]j]j]ujj j jZubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.rwobject}j jsbaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/rwobject.c}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#src-c-rwobject-cujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjJj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jHSlots and c_api - Making functions and data available from other modules}j jsbaj }(j]j]j]j]j]internalrefurijJ anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjAj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j,Class Surface API exported by pygame.surface}j j<sbaj }(j]j]j]j]j]internalrefurijA anchornameh:ujj j j9ubaj }(j]j]j]j]j]ujj j j6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/surface.c}j j[sbaj }(j]j]j]j]j]internalrefurijA anchorname#src-c-surface-cujj j jXubaj }(j]j]j]j]j]ujj j jUubaj }(j]j]j]j]j]ujj j jRubaj }(j]j]j]j]j]ujj j j6ubej }(j]j]j]j]j]ujj j j3ubaj }(j]j]j]j]j]ujj ubjRj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.surflock}j jsbaj }(j]j]j]j]j]internalrefurijR anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_c/surflock.c}j jsbaj }(j]j]j]j]j]internalrefurijR anchorname#src-c-surflock-cujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjTj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jAPI exported by pygame.version}j jsbaj }(j]j]j]j]j]internalrefurijT anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jsrc_py/version.py}j j sbaj }(j]j]j]j]j]internalrefurijT anchorname#src-py-version-pyujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj8j )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jFile Path Function Arguments}j jAsbaj }(j]j]j]j]j]internalrefurij8 anchornameh:ujj j j>ubaj }(j]j]j]j]j]ujj j j;ubaj }(j]j]j]j]j]ujj j j8ubaj }(j]j]j]j]j]ujj ubjbj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jPygame Front Page}j jlsbaj }(j]j]j]j]j]internalrefurijb anchornameh:ujj j jiubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j](j )}(j]jh:jj j }(j]j]j]j]j]j jbj ](Nj<Nj?NjeNjZNjFNjiNj.Nj5NjdNjnNjCNjNjWNjhNj7NjNj^NjNj#Nj*Nj`Nj&Nj;NjKNjMNjgNjNNjNjQNj+NjjNj9Nj/NjNjPNj[Nj4NjfNj1NjENjBNjUNj>Nj@Nj-NjoNjGNjXNj%Nj2NjNj!NjSNjNj\Nj,NjkNj3NjcNjlNjNjaNj'Nj"NjYNj6Nj$NjHNj:Nj Nj]Nj=NjLNc_apiN filepathsNlogosej ](j<j?jejZjFjij.j5jdjnjCjjWjhj7jj^jj#j*j`j&j;jKjMjgjNjjQj+jjj9j/jjPj[j4jfj1jEjBjUj>j@j-jojGjXj%j2jj!jSjj\j,jkj3jcjljjaj'j"jYj6j$jHj:j j]j=jLjjjej Kj Nj j j j Kj j ]ujKj3/home/runner/work/pygame/pygame/docs/reST/index.rstj jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Quick start}j jsbaj }(j]j]j]j]j]internalrefurijb anchorname #quick-startujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Documents}j j sbaj }(j]j]j]j]j]internalrefurijb anchorname #documentsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Tutorials}j j-sbaj }(j]j]j]j]j]internalrefurijb anchorname #tutorialsujj j j*ubaj }(j]j]j]j]j]ujj j j'ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Reference}j jPsbaj }(j]j]j]j]j]internalrefurijb anchorname #referenceujj j jMubaj }(j]j]j]j]j]ujj j jJubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jfubej }(j]j]j]j]j]ujj j jcubaj }(j]j]j]j]j]ujj ubjmj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jPygame Logos Page}j jsbaj }(j]j]j]j]j]internalrefurijm anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j Pygame Logos}j jsbaj }(j]j]j]j]j]internalrefurijm anchorname #pygame-logosujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j Legacy logos}j jsbaj }(j]j]j]j]j]internalrefurijm anchorname #legacy-logosujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj<j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.BufferProxy}j jsbajjjjj }(j]j](jjjej]j]j]ujNjNj j ubaj }(j]j]j]j]j]internalrefurij< anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]j BufferProxy}j j6sbaj }(j]j]j]j]j]ujjj j3ubaj }(j]j]j]j]j]internalrefurij< anchorname#pygame.BufferProxyujj j j0ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jBufferProxy.parent}j j`sbaj }(j]j]j]j]j]ujjj j]ubaj }(j]j]j]j]j]internalrefurij< anchorname#pygame.BufferProxy.parentujj j jZubaj }(j]j]j]j]j]skip_section_numberujj j jWubaj }(j]j]j]j]j]ujj j jTubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jBufferProxy.length}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij< anchorname#pygame.BufferProxy.lengthujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jTubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jBufferProxy.raw}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij< anchorname#pygame.BufferProxy.rawujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jTubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jBufferProxy.write()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij< anchorname#pygame.BufferProxy.writeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jTubej }(j]j]j]j]j]ujj j j-ubej }(j]j]j]j]j]ujj j j*ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj?j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.camera}j j5sbajjjjj }(j]j](jjjej]j]j]ujNjNj j2ubaj }(j]j]j]j]j]internalrefurij? anchornameh:ujj j j/ubaj }(j]j]j]j]j]ujj j j,ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j j]sbaj }(j]j]j]j]j]ujjj jZubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.initujj j jWubaj }(j]j]j]j]j]skip_section_numberujj j jTubaj }(j]j]j]j]j]ujj j jQubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_backends()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.get_backendsujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jQubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j colorspace()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.colorspaceujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jQubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jlist_cameras()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.list_camerasujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jQubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Cameraujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.start()}j j;sbaj }(j]j]j]j]j]ujjj j8ubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Camera.startujj j j5ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Camera.stop()}j jhsbaj }(j]j]j]j]j]ujjj jeubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Camera.stopujj j jbubaj }(j]j]j]j]j]skip_section_numberujj j j_ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.get_controls()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname"#pygame.camera.Camera.get_controlsujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.set_controls()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname"#pygame.camera.Camera.set_controlsujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.get_size()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Camera.get_sizeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.query_image()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij? anchorname!#pygame.camera.Camera.query_imageujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.get_image()}j jIsbaj }(j]j]j]j]j]ujjj jFubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Camera.get_imageujj j jCubaj }(j]j]j]j]j]skip_section_numberujj j j@ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCamera.get_raw()}j jvsbaj }(j]j]j]j]j]ujjj jsubaj }(j]j]j]j]j]internalrefurij? anchorname#pygame.camera.Camera.get_rawujj j jpubaj }(j]j]j]j]j]skip_section_numberujj j jmubaj }(j]j]j]j]j]ujj j j/ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jQubej }(j]j]j]j]j]ujj j j,ubej }(j]j]j]j]j]ujj j j)ubaj }(j]j]j]j]j]ujj ubjej )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.cdrom}j jsbajj+jjj }(j]j](jj/j0ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurije anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.quitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j jFsbaj }(j]j]j]j]j]ujjj jCubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.get_initujj j j@ubaj }(j]j]j]j]j]skip_section_numberujj j j=ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_count()}j jssbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.get_countujj j jmubaj }(j]j]j]j]j]skip_section_numberujj j jjubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CDujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.init()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.quit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.quitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.get_init()}j j$sbaj }(j]j]j]j]j]ujjj j!ubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.play()}j jQsbaj }(j]j]j]j]j]ujjj jNubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.playujj j jKubaj }(j]j]j]j]j]skip_section_numberujj j jHubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.stop()}j j~sbaj }(j]j]j]j]j]ujjj j{ubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.stopujj j jxubaj }(j]j]j]j]j]skip_section_numberujj j juubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.pause()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.pauseujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.resume()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.resumeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.eject()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.ejectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.get_id()}j j2sbaj }(j]j]j]j]j]ujjj j/ubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_idujj j j,ubaj }(j]j]j]j]j]skip_section_numberujj j j)ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.get_name()}j j_sbaj }(j]j]j]j]j]ujjj j\ubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_nameujj j jYubaj }(j]j]j]j]j]skip_section_numberujj j jVubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.get_busy()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_busyujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_paused()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_pausedujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_current()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_currentujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_empty()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_emptyujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_numtracks()}j j@sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_numtracksujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_track_audio()}j jmsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurije anchorname #pygame.cdrom.CD.get_track_audioujj j jgubaj }(j]j]j]j]j]skip_section_numberujj j jdubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j CD.get_all()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname#pygame.cdrom.CD.get_allujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_track_start()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname #pygame.cdrom.CD.get_track_startujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jCD.get_track_length()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurije anchorname!#pygame.cdrom.CD.get_track_lengthujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjZj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.Color}j jBsbajjDjjj }(j]j](jjHjIej]j]j]ujNjNj j?ubaj }(j]j]j]j]j]internalrefurijZ anchornameh:ujj j j<ubaj }(j]j]j]j]j]ujj j j9ubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor}j jjsbaj }(j]j]j]j]j]ujjj jgubaj }(j]j]j]j]j]internalrefurijZ anchorname #pygame.Colorujj j jdubaj }(j]j]j]j]j]skip_section_numberujj j jaubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.r}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.rujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.g}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.gujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.b}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.bujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.a}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.aujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Color.cmy}j jHsbaj }(j]j]j]j]j]ujjj jEubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.cmyujj j jBubaj }(j]j]j]j]j]skip_section_numberujj j j?ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Color.hsva}j jusbaj }(j]j]j]j]j]ujjj jrubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.hsvaujj j joubaj }(j]j]j]j]j]skip_section_numberujj j jlubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Color.hsla}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.hslaujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Color.i1i2i3}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.i1i2i3ujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.normalize()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.normalizeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.correct_gamma()}j j)sbaj }(j]j]j]j]j]ujjj j&ubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.correct_gammaujj j j#ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.set_length()}j jVsbaj }(j]j]j]j]j]ujjj jSubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.set_lengthujj j jPubaj }(j]j]j]j]j]skip_section_numberujj j jMubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.grayscale()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.grayscaleujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j jzubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Color.lerp()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.lerpujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.premul_alpha()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.premul_alphaujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jColor.update()}j j sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijZ anchorname#pygame.Color.updateujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jaubej }(j]j]j]j]j]ujj j j^ubaj }(j]j]j]j]j]ujj j j9ubej }(j]j]j]j]j]ujj j j6ubaj }(j]j]j]j]j]ujj ubjFj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j Named Colors}j jUsbaj }(j]j]j]j]j]internalrefurijF anchornameh:ujj j jRubaj }(j]j]j]j]j]ujj j jOubaj }(j]j]j]j]j]ujj j jLubaj }(j]j]j]j]j]ujj ubjij )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.cursors}j jsbajjjjjj }(j]j](jjnjoej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefuriji anchornameh:ujj j j}ubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j compile()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.compileujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j load_xbm()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.load_xbmujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jCursor}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.Cursorujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Cursor.copy()}j j/sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.Cursor.copyujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j j#ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Cursor.type}j j\sbaj }(j]j]j]j]j]ujjj jYubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.Cursor.typeujj j jVubaj }(j]j]j]j]j]skip_section_numberujj j jSubaj }(j]j]j]j]j]ujj j j#ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Cursor.data}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefuriji anchorname#pygame.cursors.Cursor.dataujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j#ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jzubej }(j]j]j]j]j]ujj j jwubaj }(j]j]j]j]j]ujj ubj.j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.display}j jsbajjjjj }(j]j](jjjej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurij. anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j j, sbaj }(j]j]j]j]j]ujjj j) ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.quitujj j j& ubaj }(j]j]j]j]j]skip_section_numberujj j j# ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j jY sbaj }(j]j]j]j]j]ujjj jV ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_initujj j jS ubaj }(j]j]j]j]j]skip_section_numberujj j jP ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_mode()}j j sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_modeujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j} ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_surface()}j j sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_surfaceujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jflip()}j j sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.flipujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jupdate()}j j !sbaj }(j]j]j]j]j]ujjj j !ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.updateujj j j!ubaj }(j]j]j]j]j]skip_section_numberujj j j!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_driver()}j j:!sbaj }(j]j]j]j]j]ujjj j7!ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_driverujj j j4!ubaj }(j]j]j]j]j]skip_section_numberujj j j1!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jInfo()}j jg!sbaj }(j]j]j]j]j]ujjj jd!ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.Infoujj j ja!ubaj }(j]j]j]j]j]skip_section_numberujj j j^!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_wm_info()}j j!sbaj }(j]j]j]j]j]ujjj j!ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_wm_infoujj j j!ubaj }(j]j]j]j]j]skip_section_numberujj j j!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_desktop_sizes()}j j!sbaj }(j]j]j]j]j]ujjj j!ubaj }(j]j]j]j]j]internalrefurij. anchorname!#pygame.display.get_desktop_sizesujj j j!ubaj }(j]j]j]j]j]skip_section_numberujj j j!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j list_modes()}j j!sbaj }(j]j]j]j]j]ujjj j!ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.list_modesujj j j!ubaj }(j]j]j]j]j]skip_section_numberujj j j!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j mode_ok()}j j"sbaj }(j]j]j]j]j]ujjj j"ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.mode_okujj j j"ubaj }(j]j]j]j]j]skip_section_numberujj j j"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jgl_get_attribute()}j jH"sbaj }(j]j]j]j]j]ujjj jE"ubaj }(j]j]j]j]j]internalrefurij. anchorname #pygame.display.gl_get_attributeujj j jB"ubaj }(j]j]j]j]j]skip_section_numberujj j j?"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jgl_set_attribute()}j ju"sbaj }(j]j]j]j]j]ujjj jr"ubaj }(j]j]j]j]j]internalrefurij. anchorname #pygame.display.gl_set_attributeujj j jo"ubaj }(j]j]j]j]j]skip_section_numberujj j jl"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_active()}j j"sbaj }(j]j]j]j]j]ujjj j"ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_activeujj j j"ubaj }(j]j]j]j]j]skip_section_numberujj j j"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j iconify()}j j"sbaj }(j]j]j]j]j]ujjj j"ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.iconifyujj j j"ubaj }(j]j]j]j]j]skip_section_numberujj j j"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jtoggle_fullscreen()}j j"sbaj }(j]j]j]j]j]ujjj j"ubaj }(j]j]j]j]j]internalrefurij. anchorname!#pygame.display.toggle_fullscreenujj j j"ubaj }(j]j]j]j]j]skip_section_numberujj j j"ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_gamma()}j j)#sbaj }(j]j]j]j]j]ujjj j&#ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_gammaujj j j##ubaj }(j]j]j]j]j]skip_section_numberujj j j #ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_gamma_ramp()}j jV#sbaj }(j]j]j]j]j]ujjj jS#ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_gamma_rampujj j jP#ubaj }(j]j]j]j]j]skip_section_numberujj j jM#ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_icon()}j j#sbaj }(j]j]j]j]j]ujjj j#ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_iconujj j j}#ubaj }(j]j]j]j]j]skip_section_numberujj j jz#ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_caption()}j j#sbaj }(j]j]j]j]j]ujjj j#ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_captionujj j j#ubaj }(j]j]j]j]j]skip_section_numberujj j j#ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_caption()}j j#sbaj }(j]j]j]j]j]ujjj j#ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_captionujj j j#ubaj }(j]j]j]j]j]skip_section_numberujj j j#ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_palette()}j j $sbaj }(j]j]j]j]j]ujjj j$ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.set_paletteujj j j$ubaj }(j]j]j]j]j]skip_section_numberujj j j$ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_num_displays()}j j7$sbaj }(j]j]j]j]j]ujjj j4$ubaj }(j]j]j]j]j]internalrefurij. anchorname #pygame.display.get_num_displaysujj j j1$ubaj }(j]j]j]j]j]skip_section_numberujj j j.$ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_window_size()}j jd$sbaj }(j]j]j]j]j]ujjj ja$ubaj }(j]j]j]j]j]internalrefurij. anchorname#pygame.display.get_window_sizeujj j j^$ubaj }(j]j]j]j]j]skip_section_numberujj j j[$ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_allow_screensaver()}j j$sbaj }(j]j]j]j]j]ujjj j$ubaj }(j]j]j]j]j]internalrefurij. anchorname%#pygame.display.get_allow_screensaverujj j j$ubaj }(j]j]j]j]j]skip_section_numberujj j j$ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_allow_screensaver()}j j$sbaj }(j]j]j]j]j]ujjj j$ubaj }(j]j]j]j]j]internalrefurij. anchorname%#pygame.display.set_allow_screensaverujj j j$ubaj }(j]j]j]j]j]skip_section_numberujj j j$ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj5j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.draw}j j%sbajjjjj }(j]j](jjjej]j]j]ujNjNj j$ubaj }(j]j]j]j]j]internalrefurij5 anchornameh:ujj j j$ubaj }(j]j]j]j]j]ujj j j$ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jrect()}j j(%sbaj }(j]j]j]j]j]ujjj j%%ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.rectujj j j"%ubaj }(j]j]j]j]j]skip_section_numberujj j j%ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j polygon()}j jU%sbaj }(j]j]j]j]j]ujjj jR%ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.polygonujj j jO%ubaj }(j]j]j]j]j]skip_section_numberujj j jL%ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcircle()}j j%sbaj }(j]j]j]j]j]ujjj j%ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.circleujj j j|%ubaj }(j]j]j]j]j]skip_section_numberujj j jy%ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j ellipse()}j j%sbaj }(j]j]j]j]j]ujjj j%ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.ellipseujj j j%ubaj }(j]j]j]j]j]skip_section_numberujj j j%ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jarc()}j j%sbaj }(j]j]j]j]j]ujjj j%ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.arcujj j j%ubaj }(j]j]j]j]j]skip_section_numberujj j j%ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jline()}j j &sbaj }(j]j]j]j]j]ujjj j&ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.lineujj j j&ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jlines()}j j6&sbaj }(j]j]j]j]j]ujjj j3&ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.linesujj j j0&ubaj }(j]j]j]j]j]skip_section_numberujj j j-&ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jaaline()}j jc&sbaj }(j]j]j]j]j]ujjj j`&ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.aalineujj j j]&ubaj }(j]j]j]j]j]skip_section_numberujj j jZ&ubaj }(j]j]j]j]j]ujj j j%ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j aalines()}j j&sbaj }(j]j]j]j]j]ujjj j&ubaj }(j]j]j]j]j]internalrefurij5 anchorname#pygame.draw.aalinesujj j j&ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j j%ubej }(j]j]j]j]j]ujj j j$ubej }(j]j]j]j]j]ujj j j$ubaj }(j]j]j]j]j]ujj ubjdj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.event}j j&sbajjjjj }(j]j](jjjej]j]j]ujNjNj j&ubaj }(j]j]j]j]j]internalrefurijd anchornameh:ujj j j&ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpump()}j j&sbaj }(j]j]j]j]j]ujjj j&ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.pumpujj j j&ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget()}j j''sbaj }(j]j]j]j]j]ujjj j$'ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.getujj j j!'ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpoll()}j jT'sbaj }(j]j]j]j]j]ujjj jQ'ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.pollujj j jN'ubaj }(j]j]j]j]j]skip_section_numberujj j jK'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jwait()}j j'sbaj }(j]j]j]j]j]ujjj j~'ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.waitujj j j{'ubaj }(j]j]j]j]j]skip_section_numberujj j jx'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpeek()}j j'sbaj }(j]j]j]j]j]ujjj j'ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.peekujj j j'ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jclear()}j j'sbaj }(j]j]j]j]j]ujjj j'ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.clearujj j j'ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j event_name()}j j(sbaj }(j]j]j]j]j]ujjj j(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.event_nameujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_blocked()}j j5(sbaj }(j]j]j]j]j]ujjj j2(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.set_blockedujj j j/(ubaj }(j]j]j]j]j]skip_section_numberujj j j,(ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_allowed()}j jb(sbaj }(j]j]j]j]j]ujjj j_(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.set_allowedujj j j\(ubaj }(j]j]j]j]j]skip_section_numberujj j jY(ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_blocked()}j j(sbaj }(j]j]j]j]j]ujjj j(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.get_blockedujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j(ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_grab()}j j(sbaj }(j]j]j]j]j]ujjj j(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.set_grabujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j(ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_grab()}j j(sbaj }(j]j]j]j]j]ujjj j(ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.get_grabujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j(ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_keyboard_grab()}j j)sbaj }(j]j]j]j]j]ujjj j)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.set_keyboard_grabujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j )ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_keyboard_grab()}j jC)sbaj }(j]j]j]j]j]ujjj j@)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.get_keyboard_grabujj j j=)ubaj }(j]j]j]j]j]skip_section_numberujj j j:)ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpost()}j jp)sbaj }(j]j]j]j]j]ujjj jm)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.postujj j jj)ubaj }(j]j]j]j]j]skip_section_numberujj j jg)ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j custom_type()}j j)sbaj }(j]j]j]j]j]ujjj j)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.custom_typeujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j)ubaj }(j]j]j]j]j]ujj j j&ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jEvent}j j)sbaj }(j]j]j]j]j]ujjj j)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.Eventujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j)ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Event.type}j j)sbaj }(j]j]j]j]j]ujjj j)ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.Event.typeujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j)ubaj }(j]j]j]j]j]ujj j j)ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jEvent.__dict__}j j!*sbaj }(j]j]j]j]j]ujjj j*ubaj }(j]j]j]j]j]internalrefurijd anchorname#pygame.event.Event.__dict__ujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j*ubaj }(j]j]j]j]j]ujj j j)ubej }(j]j]j]j]j]ujj j j)ubej }(j]j]j]j]j]ujj j j&ubej }(j]j]j]j]j]ujj j j&ubej }(j]j]j]j]j]ujj j j&ubaj }(j]j]j]j]j]ujj ubjnj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.examples}j jo*sbajjjjj }(j]j](jjjej]j]j]ujNjNj jl*ubaj }(j]j]j]j]j]internalrefurijn anchornameh:ujj j ji*ubaj }(j]j]j]j]j]ujj j jf*ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j aliens.main()}j j*sbaj }(j]j]j]j]j]ujjj j*ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.aliens.mainujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j*ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j stars.main()}j j*sbaj }(j]j]j]j]j]ujjj j*ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.stars.mainujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j*ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j chimp.main()}j j*sbaj }(j]j]j]j]j]ujjj j*ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.chimp.mainujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j*ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j moveit.main()}j j+sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.moveit.mainujj j j+ubaj }(j]j]j]j]j]skip_section_numberujj j j+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j fonty.main()}j jK+sbaj }(j]j]j]j]j]ujjj jH+ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.fonty.mainujj j jE+ubaj }(j]j]j]j]j]skip_section_numberujj j jB+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jfreetype_misc.main()}j jx+sbaj }(j]j]j]j]j]ujjj ju+ubaj }(j]j]j]j]j]internalrefurijn anchorname##pygame.examples.freetype_misc.mainujj j jr+ubaj }(j]j]j]j]j]skip_section_numberujj j jo+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j vgrade.main()}j j+sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.vgrade.mainujj j j+ubaj }(j]j]j]j]j]skip_section_numberujj j j+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jeventlist.main()}j j+sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.eventlist.mainujj j j+ubaj }(j]j]j]j]j]skip_section_numberujj j j+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jarraydemo.main()}j j+sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.arraydemo.mainujj j j+ubaj }(j]j]j]j]j]skip_section_numberujj j j+ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j sound.main()}j j,,sbaj }(j]j]j]j]j]ujjj j),ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.sound.mainujj j j&,ubaj }(j]j]j]j]j]skip_section_numberujj j j#,ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jsound_array_demos.main()}j jY,sbaj }(j]j]j]j]j]ujjj jV,ubaj }(j]j]j]j]j]internalrefurijn anchorname'#pygame.examples.sound_array_demos.mainujj j jS,ubaj }(j]j]j]j]j]skip_section_numberujj j jP,ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j liquid.main()}j j,sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.liquid.mainujj j j,ubaj }(j]j]j]j]j]skip_section_numberujj j j},ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j glcube.main()}j j,sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.glcube.mainujj j j,ubaj }(j]j]j]j]j]skip_section_numberujj j j,ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jscrap_clipboard.main()}j j,sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurijn anchorname%#pygame.examples.scrap_clipboard.mainujj j j,ubaj }(j]j]j]j]j]skip_section_numberujj j j,ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j mask.main()}j j -sbaj }(j]j]j]j]j]ujjj j -ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.mask.mainujj j j-ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jtestsprite.main()}j j:-sbaj }(j]j]j]j]j]ujjj j7-ubaj }(j]j]j]j]j]internalrefurijn anchorname #pygame.examples.testsprite.mainujj j j4-ubaj }(j]j]j]j]j]skip_section_numberujj j j1-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j!headless_no_windows_needed.main()}j jg-sbaj }(j]j]j]j]j]ujjj jd-ubaj }(j]j]j]j]j]internalrefurijn anchorname0#pygame.examples.headless_no_windows_needed.mainujj j ja-ubaj }(j]j]j]j]j]skip_section_numberujj j j^-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jjoystick.main()}j j-sbaj }(j]j]j]j]j]ujjj j-ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.joystick.mainujj j j-ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jblend_fill.main()}j j-sbaj }(j]j]j]j]j]ujjj j-ubaj }(j]j]j]j]j]internalrefurijn anchorname #pygame.examples.blend_fill.mainujj j j-ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jblit_blends.main()}j j-sbaj }(j]j]j]j]j]ujjj j-ubaj }(j]j]j]j]j]internalrefurijn anchorname!#pygame.examples.blit_blends.mainujj j j-ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcursors.main()}j j.sbaj }(j]j]j]j]j]ujjj j.ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.cursors.mainujj j j.ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpixelarray.main()}j jH.sbaj }(j]j]j]j]j]ujjj jE.ubaj }(j]j]j]j]j]internalrefurijn anchorname #pygame.examples.pixelarray.mainujj j jB.ubaj }(j]j]j]j]j]skip_section_numberujj j j?.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jscaletest.main()}j ju.sbaj }(j]j]j]j]j]ujjj jr.ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.scaletest.mainujj j jo.ubaj }(j]j]j]j]j]skip_section_numberujj j jl.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j midi.main()}j j.sbaj }(j]j]j]j]j]ujjj j.ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.midi.mainujj j j.ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j scroll.main()}j j.sbaj }(j]j]j]j]j]ujjj j.ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.scroll.mainujj j j.ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j camera.main()}j j.sbaj }(j]j]j]j]j]ujjj j.ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.camera.mainujj j j.ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j j*ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jplaymus.main()}j j)/sbaj }(j]j]j]j]j]ujjj j&/ubaj }(j]j]j]j]j]internalrefurijn anchorname#pygame.examples.playmus.mainujj j j#/ubaj }(j]j]j]j]j]skip_section_numberujj j j /ubaj }(j]j]j]j]j]ujj j j*ubej }(j]j]j]j]j]ujj j jf*ubej }(j]j]j]j]j]ujj j jc*ubaj }(j]j]j]j]j]ujj ubjCj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.fastevent}j jk/sbajjjjj }(j]j](jjjej]j]j]ujNjNj jh/ubaj }(j]j]j]j]j]internalrefurijC anchornameh:ujj j je/ubaj }(j]j]j]j]j]ujj j jb/ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j j/sbaj }(j]j]j]j]j]ujjj j/ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.initujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j/ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j j/sbaj }(j]j]j]j]j]ujjj j/ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.get_initujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j/ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpump()}j j/sbaj }(j]j]j]j]j]ujjj j/ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.pumpujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j/ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jwait()}j j0sbaj }(j]j]j]j]j]ujjj j0ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.waitujj j j0ubaj }(j]j]j]j]j]skip_section_numberujj j j0ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpoll()}j jG0sbaj }(j]j]j]j]j]ujjj jD0ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.pollujj j jA0ubaj }(j]j]j]j]j]skip_section_numberujj j j>0ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget()}j jt0sbaj }(j]j]j]j]j]ujjj jq0ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.getujj j jn0ubaj }(j]j]j]j]j]skip_section_numberujj j jk0ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpost()}j j0sbaj }(j]j]j]j]j]ujjj j0ubaj }(j]j]j]j]j]internalrefurijC anchorname#pygame.fastevent.postujj j j0ubaj }(j]j]j]j]j]skip_section_numberujj j j0ubaj }(j]j]j]j]j]ujj j j/ubej }(j]j]j]j]j]ujj j jb/ubej }(j]j]j]j]j]ujj j j_/ubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.font}j j0sbajjjjj }(j]j](jjjej]j]j]ujNjNj j0ubaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j j0ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j j 1sbaj }(j]j]j]j]j]ujjj j1ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.initujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j j81sbaj }(j]j]j]j]j]ujjj j51ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.quitujj j j21ubaj }(j]j]j]j]j]skip_section_numberujj j j/1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j je1sbaj }(j]j]j]j]j]ujjj jb1ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.get_initujj j j_1ubaj }(j]j]j]j]j]skip_section_numberujj j j\1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_default_font()}j j1sbaj }(j]j]j]j]j]ujjj j1ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.get_default_fontujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_sdl_ttf_version()}j j1sbaj }(j]j]j]j]j]ujjj j1ubaj }(j]j]j]j]j]internalrefurij anchorname #pygame.font.get_sdl_ttf_versionujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_fonts()}j j1sbaj }(j]j]j]j]j]ujjj j1ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.get_fontsujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j match_font()}j j2sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.match_fontujj j j2ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j SysFont()}j jF2sbaj }(j]j]j]j]j]ujjj jC2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.SysFontujj j j@2ubaj }(j]j]j]j]j]skip_section_numberujj j j=2ubaj }(j]j]j]j]j]ujj j j0ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont}j js2sbaj }(j]j]j]j]j]ujjj jp2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Fontujj j jm2ubaj }(j]j]j]j]j]skip_section_numberujj j jj2ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.bold}j j2sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.boldujj j j2ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.italic}j j2sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.italicujj j j2ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.underline}j j2sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.underlineujj j j2ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.strikethrough}j j$3sbaj }(j]j]j]j]j]ujjj j!3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.strikethroughujj j j3ubaj }(j]j]j]j]j]skip_section_numberujj j j3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.render()}j jQ3sbaj }(j]j]j]j]j]ujjj jN3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.renderujj j jK3ubaj }(j]j]j]j]j]skip_section_numberujj j jH3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.size()}j j~3sbaj }(j]j]j]j]j]ujjj j{3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.sizeujj j jx3ubaj }(j]j]j]j]j]skip_section_numberujj j ju3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.set_underline()}j j3sbaj }(j]j]j]j]j]ujjj j3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.set_underlineujj j j3ubaj }(j]j]j]j]j]skip_section_numberujj j j3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_underline()}j j3sbaj }(j]j]j]j]j]ujjj j3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_underlineujj j j3ubaj }(j]j]j]j]j]skip_section_numberujj j j3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.set_strikethrough()}j j4sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij anchorname##pygame.font.Font.set_strikethroughujj j j3ubaj }(j]j]j]j]j]skip_section_numberujj j j3ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_strikethrough()}j j24sbaj }(j]j]j]j]j]ujjj j/4ubaj }(j]j]j]j]j]internalrefurij anchorname##pygame.font.Font.get_strikethroughujj j j,4ubaj }(j]j]j]j]j]skip_section_numberujj j j)4ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.set_bold()}j j_4sbaj }(j]j]j]j]j]ujjj j\4ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.set_boldujj j jY4ubaj }(j]j]j]j]j]skip_section_numberujj j jV4ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_bold()}j j4sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_boldujj j j4ubaj }(j]j]j]j]j]skip_section_numberujj j j4ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.set_italic()}j j4sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.set_italicujj j j4ubaj }(j]j]j]j]j]skip_section_numberujj j j4ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.metrics()}j j4sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.metricsujj j j4ubaj }(j]j]j]j]j]skip_section_numberujj j j4ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_italic()}j j5sbaj }(j]j]j]j]j]ujjj j5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_italicujj j j 5ubaj }(j]j]j]j]j]skip_section_numberujj j j 5ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_linesize()}j j@5sbaj }(j]j]j]j]j]ujjj j=5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_linesizeujj j j:5ubaj }(j]j]j]j]j]skip_section_numberujj j j75ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_height()}j jm5sbaj }(j]j]j]j]j]ujjj jj5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_heightujj j jg5ubaj }(j]j]j]j]j]skip_section_numberujj j jd5ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_ascent()}j j5sbaj }(j]j]j]j]j]ujjj j5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_ascentujj j j5ubaj }(j]j]j]j]j]skip_section_numberujj j j5ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_descent()}j j5sbaj }(j]j]j]j]j]ujjj j5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.get_descentujj j j5ubaj }(j]j]j]j]j]skip_section_numberujj j j5ubaj }(j]j]j]j]j]ujj j j2ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.set_script()}j j5sbaj }(j]j]j]j]j]ujjj j5ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.font.Font.set_scriptujj j j5ubaj }(j]j]j]j]j]skip_section_numberujj j j5ubaj }(j]j]j]j]j]ujj j j2ubej }(j]j]j]j]j]ujj j jj2ubej }(j]j]j]j]j]ujj j j0ubej }(j]j]j]j]j]ujj j j0ubej }(j]j]j]j]j]ujj j j0ubaj }(j]j]j]j]j]ujj ubjWj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.freetype}j jB6sbajjjjj }(j]j](jjjej]j]j]ujNjNj j?6ubaj }(j]j]j]j]j]internalrefurijW anchornameh:ujj j j<6ubaj }(j]j]j]j]j]ujj j j96ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_error()}j jj6sbaj }(j]j]j]j]j]ujjj jg6ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.get_errorujj j jd6ubaj }(j]j]j]j]j]skip_section_numberujj j ja6ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_version()}j j6sbaj }(j]j]j]j]j]ujjj j6ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.get_versionujj j j6ubaj }(j]j]j]j]j]skip_section_numberujj j j6ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j j6sbaj }(j]j]j]j]j]ujjj j6ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.initujj j j6ubaj }(j]j]j]j]j]skip_section_numberujj j j6ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j j6sbaj }(j]j]j]j]j]ujjj j6ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.quitujj j j6ubaj }(j]j]j]j]j]skip_section_numberujj j j6ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j j7sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.get_initujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j was_init()}j jK7sbaj }(j]j]j]j]j]ujjj jH7ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.was_initujj j jE7ubaj }(j]j]j]j]j]skip_section_numberujj j jB7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_cache_size()}j jx7sbaj }(j]j]j]j]j]ujjj ju7ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.get_cache_sizeujj j jr7ubaj }(j]j]j]j]j]skip_section_numberujj j jo7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_default_resolution()}j j7sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijW anchorname'#pygame.freetype.get_default_resolutionujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_default_resolution()}j j7sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijW anchorname'#pygame.freetype.set_default_resolutionujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j SysFont()}j j7sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.SysFontujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_default_font()}j j,8sbaj }(j]j]j]j]j]ujjj j)8ubaj }(j]j]j]j]j]internalrefurijW anchorname!#pygame.freetype.get_default_fontujj j j&8ubaj }(j]j]j]j]j]skip_section_numberujj j j#8ubaj }(j]j]j]j]j]ujj j j^6ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont}j jY8sbaj }(j]j]j]j]j]ujjj jV8ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Fontujj j jS8ubaj }(j]j]j]j]j]skip_section_numberujj j jP8ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.name}j j8sbaj }(j]j]j]j]j]ujjj j8ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.nameujj j j}8ubaj }(j]j]j]j]j]skip_section_numberujj j jz8ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.path}j j8sbaj }(j]j]j]j]j]ujjj j8ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.pathujj j j8ubaj }(j]j]j]j]j]skip_section_numberujj j j8ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.size}j j8sbaj }(j]j]j]j]j]ujjj j8ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.sizeujj j j8ubaj }(j]j]j]j]j]skip_section_numberujj j j8ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_rect()}j j 9sbaj }(j]j]j]j]j]ujjj j9ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.get_rectujj j j9ubaj }(j]j]j]j]j]skip_section_numberujj j j9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_metrics()}j j79sbaj }(j]j]j]j]j]ujjj j49ubaj }(j]j]j]j]j]internalrefurijW anchorname!#pygame.freetype.Font.get_metricsujj j j19ubaj }(j]j]j]j]j]skip_section_numberujj j j.9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.height}j jd9sbaj }(j]j]j]j]j]ujjj ja9ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.heightujj j j^9ubaj }(j]j]j]j]j]skip_section_numberujj j j[9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.ascender}j j9sbaj }(j]j]j]j]j]ujjj j9ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.ascenderujj j j9ubaj }(j]j]j]j]j]skip_section_numberujj j j9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.descender}j j9sbaj }(j]j]j]j]j]ujjj j9ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.descenderujj j j9ubaj }(j]j]j]j]j]skip_section_numberujj j j9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_sized_ascender()}j j9sbaj }(j]j]j]j]j]ujjj j9ubaj }(j]j]j]j]j]internalrefurijW anchorname(#pygame.freetype.Font.get_sized_ascenderujj j j9ubaj }(j]j]j]j]j]skip_section_numberujj j j9ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_sized_descender()}j j:sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurijW anchorname)#pygame.freetype.Font.get_sized_descenderujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_sized_height()}j jE:sbaj }(j]j]j]j]j]ujjj jB:ubaj }(j]j]j]j]j]internalrefurijW anchorname&#pygame.freetype.Font.get_sized_heightujj j j?:ubaj }(j]j]j]j]j]skip_section_numberujj j j<:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_sized_glyph_height()}j jr:sbaj }(j]j]j]j]j]ujjj jo:ubaj }(j]j]j]j]j]internalrefurijW anchorname,#pygame.freetype.Font.get_sized_glyph_heightujj j jl:ubaj }(j]j]j]j]j]skip_section_numberujj j ji:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.get_sizes()}j j:sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.get_sizesujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.render()}j j:sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.renderujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.render_to()}j j:sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.render_toujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j:ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.render_raw()}j j&;sbaj }(j]j]j]j]j]ujjj j#;ubaj }(j]j]j]j]j]internalrefurijW anchorname #pygame.freetype.Font.render_rawujj j j ;ubaj }(j]j]j]j]j]skip_section_numberujj j j;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.render_raw_to()}j jS;sbaj }(j]j]j]j]j]ujjj jP;ubaj }(j]j]j]j]j]internalrefurijW anchorname##pygame.freetype.Font.render_raw_toujj j jM;ubaj }(j]j]j]j]j]skip_section_numberujj j jJ;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.style}j j;sbaj }(j]j]j]j]j]ujjj j};ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.styleujj j jz;ubaj }(j]j]j]j]j]skip_section_numberujj j jw;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.underline}j j;sbaj }(j]j]j]j]j]ujjj j;ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.underlineujj j j;ubaj }(j]j]j]j]j]skip_section_numberujj j j;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.strong}j j;sbaj }(j]j]j]j]j]ujjj j;ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.strongujj j j;ubaj }(j]j]j]j]j]skip_section_numberujj j j;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.oblique}j j<sbaj }(j]j]j]j]j]ujjj j<ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.obliqueujj j j<ubaj }(j]j]j]j]j]skip_section_numberujj j j;ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.wide}j j4<sbaj }(j]j]j]j]j]ujjj j1<ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.wideujj j j.<ubaj }(j]j]j]j]j]skip_section_numberujj j j+<ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.strength}j ja<sbaj }(j]j]j]j]j]ujjj j^<ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.strengthujj j j[<ubaj }(j]j]j]j]j]skip_section_numberujj j jX<ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.underline_adjustment}j j<sbaj }(j]j]j]j]j]ujjj j<ubaj }(j]j]j]j]j]internalrefurijW anchorname*#pygame.freetype.Font.underline_adjustmentujj j j<ubaj }(j]j]j]j]j]skip_section_numberujj j j<ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.fixed_width}j j<sbaj }(j]j]j]j]j]ujjj j<ubaj }(j]j]j]j]j]internalrefurijW anchorname!#pygame.freetype.Font.fixed_widthujj j j<ubaj }(j]j]j]j]j]skip_section_numberujj j j<ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.fixed_sizes}j j<sbaj }(j]j]j]j]j]ujjj j<ubaj }(j]j]j]j]j]internalrefurijW anchorname!#pygame.freetype.Font.fixed_sizesujj j j<ubaj }(j]j]j]j]j]skip_section_numberujj j j<ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.scalable}j j=sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.scalableujj j j=ubaj }(j]j]j]j]j]skip_section_numberujj j j =ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.use_bitmap_strikes}j jB=sbaj }(j]j]j]j]j]ujjj j?=ubaj }(j]j]j]j]j]internalrefurijW anchorname(#pygame.freetype.Font.use_bitmap_strikesujj j j<=ubaj }(j]j]j]j]j]skip_section_numberujj j j9=ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.antialiased}j jo=sbaj }(j]j]j]j]j]ujjj jl=ubaj }(j]j]j]j]j]internalrefurijW anchorname!#pygame.freetype.Font.antialiasedujj j ji=ubaj }(j]j]j]j]j]skip_section_numberujj j jf=ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.kerning}j j=sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.kerningujj j j=ubaj }(j]j]j]j]j]skip_section_numberujj j j=ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.vertical}j j=sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.verticalujj j j=ubaj }(j]j]j]j]j]skip_section_numberujj j j=ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.rotation}j j=sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.rotationujj j j=ubaj }(j]j]j]j]j]skip_section_numberujj j j=ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.fgcolor}j j#>sbaj }(j]j]j]j]j]ujjj j >ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.fgcolorujj j j>ubaj }(j]j]j]j]j]skip_section_numberujj j j>ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.bgcolor}j jP>sbaj }(j]j]j]j]j]ujjj jM>ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.bgcolorujj j jJ>ubaj }(j]j]j]j]j]skip_section_numberujj j jG>ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.origin}j j}>sbaj }(j]j]j]j]j]ujjj jz>ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.originujj j jw>ubaj }(j]j]j]j]j]skip_section_numberujj j jt>ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.pad}j j>sbaj }(j]j]j]j]j]ujjj j>ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.padujj j j>ubaj }(j]j]j]j]j]skip_section_numberujj j j>ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Font.ucs4}j j>sbaj }(j]j]j]j]j]ujjj j>ubaj }(j]j]j]j]j]internalrefurijW anchorname#pygame.freetype.Font.ucs4ujj j j>ubaj }(j]j]j]j]j]skip_section_numberujj j j>ubaj }(j]j]j]j]j]ujj j jw8ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jFont.resolution}j j?sbaj }(j]j]j]j]j]ujjj j?ubaj }(j]j]j]j]j]internalrefurijW anchorname #pygame.freetype.Font.resolutionujj j j>ubaj }(j]j]j]j]j]skip_section_numberujj j j>ubaj }(j]j]j]j]j]ujj j jw8ubej }(j]j]j]j]j]ujj j jP8ubej }(j]j]j]j]j]ujj j j^6ubej }(j]j]j]j]j]ujj j j96ubej }(j]j]j]j]j]ujj j j66ubaj }(j]j]j]j]j]ujj ubjhj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.gfxdraw}j jR?sbajj2jjj }(j]j](jj6j7ej]j]j]ujNjNj jO?ubaj }(j]j]j]j]j]internalrefurijh anchornameh:ujj j jL?ubaj }(j]j]j]j]j]ujj j jI?ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpixel()}j jz?sbaj }(j]j]j]j]j]ujjj jw?ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.pixelujj j jt?ubaj }(j]j]j]j]j]skip_section_numberujj j jq?ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jhline()}j j?sbaj }(j]j]j]j]j]ujjj j?ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.hlineujj j j?ubaj }(j]j]j]j]j]skip_section_numberujj j j?ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jvline()}j j?sbaj }(j]j]j]j]j]ujjj j?ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.vlineujj j j?ubaj }(j]j]j]j]j]skip_section_numberujj j j?ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jline()}j j@sbaj }(j]j]j]j]j]ujjj j?ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.lineujj j j?ubaj }(j]j]j]j]j]skip_section_numberujj j j?ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j rectangle()}j j.@sbaj }(j]j]j]j]j]ujjj j+@ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.rectangleujj j j(@ubaj }(j]j]j]j]j]skip_section_numberujj j j%@ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jbox()}j j[@sbaj }(j]j]j]j]j]ujjj jX@ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.boxujj j jU@ubaj }(j]j]j]j]j]skip_section_numberujj j jR@ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcircle()}j j@sbaj }(j]j]j]j]j]ujjj j@ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.circleujj j j@ubaj }(j]j]j]j]j]skip_section_numberujj j j@ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j aacircle()}j j@sbaj }(j]j]j]j]j]ujjj j@ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.aacircleujj j j@ubaj }(j]j]j]j]j]skip_section_numberujj j j@ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jfilled_circle()}j j@sbaj }(j]j]j]j]j]ujjj j@ubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.filled_circleujj j j@ubaj }(j]j]j]j]j]skip_section_numberujj j j@ubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j ellipse()}j jAsbaj }(j]j]j]j]j]ujjj j Aubaj }(j]j]j]j]j]internalrefurijh anchorname#pygame.gfxdraw.ellipseujj j j Aubaj }(j]j]j]j]j]skip_section_numberujj j jAubaj }(j]j]j]j]j]ujj j jn?ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j aaellipse()}j jhubaj }(j]j]j]j]j]skip_section_numberujj j j;hubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_num_channels()}j jqhsbaj }(j]j]j]j]j]ujjj jnhubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.set_num_channelsujj j jkhubaj }(j]j]j]j]j]skip_section_numberujj j jhhubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_num_channels()}j jhsbaj }(j]j]j]j]j]ujjj jhubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.get_num_channelsujj j jhubaj }(j]j]j]j]j]skip_section_numberujj j jhubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_reserved()}j jhsbaj }(j]j]j]j]j]ujjj jhubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.set_reservedujj j jhubaj }(j]j]j]j]j]skip_section_numberujj j jhubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jfind_channel()}j jhsbaj }(j]j]j]j]j]ujjj jhubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.find_channelujj j jhubaj }(j]j]j]j]j]skip_section_numberujj j jhubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_busy()}j j%isbaj }(j]j]j]j]j]ujjj j"iubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.get_busyujj j jiubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_sdl_mixer_version()}j jRisbaj }(j]j]j]j]j]ujjj jOiubaj }(j]j]j]j]j]internalrefurij& anchorname##pygame.mixer.get_sdl_mixer_versionujj j jLiubaj }(j]j]j]j]j]skip_section_numberujj j jIiubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound}j jisbaj }(j]j]j]j]j]ujjj j|iubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Soundujj j jyiubaj }(j]j]j]j]j]skip_section_numberujj j jviubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Sound.play()}j jisbaj }(j]j]j]j]j]ujjj jiubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.playujj j jiubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Sound.stop()}j jisbaj }(j]j]j]j]j]ujjj jiubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.stopujj j jiubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.fadeout()}j jjsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.fadeoutujj j jiubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.set_volume()}j j0jsbaj }(j]j]j]j]j]ujjj j-jubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.set_volumeujj j j*jubaj }(j]j]j]j]j]skip_section_numberujj j j'jubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.get_volume()}j j]jsbaj }(j]j]j]j]j]ujjj jZjubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.get_volumeujj j jWjubaj }(j]j]j]j]j]skip_section_numberujj j jTjubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.get_num_channels()}j jjsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurij& anchorname$#pygame.mixer.Sound.get_num_channelsujj j jjubaj }(j]j]j]j]j]skip_section_numberujj j jjubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.get_length()}j jjsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.get_lengthujj j jjubaj }(j]j]j]j]j]skip_section_numberujj j jjubaj }(j]j]j]j]j]ujj j jiubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSound.get_raw()}j jjsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Sound.get_rawujj j jjubaj }(j]j]j]j]j]skip_section_numberujj j jjubaj }(j]j]j]j]j]ujj j jiubej }(j]j]j]j]j]ujj j jviubej }(j]j]j]j]j]ujj j jfubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel}j jksbaj }(j]j]j]j]j]ujjj jkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channelujj j jkubaj }(j]j]j]j]j]skip_section_numberujj j jkubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.play()}j jGksbaj }(j]j]j]j]j]ujjj jDkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.playujj j jAkubaj }(j]j]j]j]j]skip_section_numberujj j j>kubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.stop()}j jtksbaj }(j]j]j]j]j]ujjj jqkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.stopujj j jnkubaj }(j]j]j]j]j]skip_section_numberujj j jkkubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.pause()}j jksbaj }(j]j]j]j]j]ujjj jkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.pauseujj j jkubaj }(j]j]j]j]j]skip_section_numberujj j jkubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.unpause()}j jksbaj }(j]j]j]j]j]ujjj jkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.unpauseujj j jkubaj }(j]j]j]j]j]skip_section_numberujj j jkubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.fadeout()}j jksbaj }(j]j]j]j]j]ujjj jkubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.fadeoutujj j jkubaj }(j]j]j]j]j]skip_section_numberujj j jkubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.set_volume()}j j(lsbaj }(j]j]j]j]j]ujjj j%lubaj }(j]j]j]j]j]internalrefurij& anchorname #pygame.mixer.Channel.set_volumeujj j j"lubaj }(j]j]j]j]j]skip_section_numberujj j jlubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.get_volume()}j jUlsbaj }(j]j]j]j]j]ujjj jRlubaj }(j]j]j]j]j]internalrefurij& anchorname #pygame.mixer.Channel.get_volumeujj j jOlubaj }(j]j]j]j]j]skip_section_numberujj j jLlubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.get_busy()}j jlsbaj }(j]j]j]j]j]ujjj jlubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.get_busyujj j j|lubaj }(j]j]j]j]j]skip_section_numberujj j jylubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.get_sound()}j jlsbaj }(j]j]j]j]j]ujjj jlubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.get_soundujj j jlubaj }(j]j]j]j]j]skip_section_numberujj j jlubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.queue()}j jlsbaj }(j]j]j]j]j]ujjj jlubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.queueujj j jlubaj }(j]j]j]j]j]skip_section_numberujj j jlubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.get_queue()}j j msbaj }(j]j]j]j]j]ujjj jmubaj }(j]j]j]j]j]internalrefurij& anchorname#pygame.mixer.Channel.get_queueujj j jmubaj }(j]j]j]j]j]skip_section_numberujj j jmubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.set_endevent()}j j6msbaj }(j]j]j]j]j]ujjj j3mubaj }(j]j]j]j]j]internalrefurij& anchorname"#pygame.mixer.Channel.set_endeventujj j j0mubaj }(j]j]j]j]j]skip_section_numberujj j j-mubaj }(j]j]j]j]j]ujj j j;kubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jChannel.get_endevent()}j jcmsbaj }(j]j]j]j]j]ujjj j`mubaj }(j]j]j]j]j]internalrefurij& anchorname"#pygame.mixer.Channel.get_endeventujj j j]mubaj }(j]j]j]j]j]skip_section_numberujj j jZmubaj }(j]j]j]j]j]ujj j j;kubej }(j]j]j]j]j]ujj j jkubej }(j]j]j]j]j]ujj j jfubej }(j]j]j]j]j]ujj j jfubej }(j]j]j]j]j]ujj j jfubaj }(j]j]j]j]j]ujj ubj;j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.mouse}j jmsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jmubaj }(j]j]j]j]j]internalrefurij; anchornameh:ujj j jmubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_pressed()}j jmsbaj }(j]j]j]j]j]ujjj jmubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_pressedujj j jmubaj }(j]j]j]j]j]skip_section_numberujj j jmubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_pos()}j jnsbaj }(j]j]j]j]j]ujjj jnubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_posujj j jnubaj }(j]j]j]j]j]skip_section_numberujj j jmubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_rel()}j j3nsbaj }(j]j]j]j]j]ujjj j0nubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_relujj j j-nubaj }(j]j]j]j]j]skip_section_numberujj j j*nubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_pos()}j j`nsbaj }(j]j]j]j]j]ujjj j]nubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.set_posujj j jZnubaj }(j]j]j]j]j]skip_section_numberujj j jWnubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_visible()}j jnsbaj }(j]j]j]j]j]ujjj jnubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.set_visibleujj j jnubaj }(j]j]j]j]j]skip_section_numberujj j jnubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_visible()}j jnsbaj }(j]j]j]j]j]ujjj jnubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_visibleujj j jnubaj }(j]j]j]j]j]skip_section_numberujj j jnubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_focused()}j jnsbaj }(j]j]j]j]j]ujjj jnubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_focusedujj j jnubaj }(j]j]j]j]j]skip_section_numberujj j jnubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_cursor()}j josbaj }(j]j]j]j]j]ujjj joubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.set_cursorujj j joubaj }(j]j]j]j]j]skip_section_numberujj j j oubaj }(j]j]j]j]j]ujj j jmubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_cursor()}j jAosbaj }(j]j]j]j]j]ujjj j>oubaj }(j]j]j]j]j]internalrefurij; anchorname#pygame.mouse.get_cursorujj j j;oubaj }(j]j]j]j]j]skip_section_numberujj j j8oubaj }(j]j]j]j]j]ujj j jmubej }(j]j]j]j]j]ujj j jmubej }(j]j]j]j]j]ujj j jmubaj }(j]j]j]j]j]ujj ubjKj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.mixer.music}j josbajj, jjj }(j]j](jj0 j1 ej]j]j]ujNjNj joubaj }(j]j]j]j]j]internalrefurijK anchornameh:ujj j j}oubaj }(j]j]j]j]j]ujj j jzoubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jload()}j josbaj }(j]j]j]j]j]ujjj joubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.loadujj j joubaj }(j]j]j]j]j]skip_section_numberujj j joubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]junload()}j josbaj }(j]j]j]j]j]ujjj joubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.unloadujj j joubaj }(j]j]j]j]j]skip_section_numberujj j joubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jplay()}j jpsbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.playujj j joubaj }(j]j]j]j]j]skip_section_numberujj j joubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jrewind()}j j2psbaj }(j]j]j]j]j]ujjj j/pubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.rewindujj j j,pubaj }(j]j]j]j]j]skip_section_numberujj j j)pubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jstop()}j j_psbaj }(j]j]j]j]j]ujjj j\pubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.stopujj j jYpubaj }(j]j]j]j]j]skip_section_numberujj j jVpubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpause()}j jpsbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.pauseujj j jpubaj }(j]j]j]j]j]skip_section_numberujj j jpubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j unpause()}j jpsbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.unpauseujj j jpubaj }(j]j]j]j]j]skip_section_numberujj j jpubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j fadeout()}j jpsbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.fadeoutujj j jpubaj }(j]j]j]j]j]skip_section_numberujj j jpubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_volume()}j jqsbaj }(j]j]j]j]j]ujjj jqubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.set_volumeujj j j qubaj }(j]j]j]j]j]skip_section_numberujj j j qubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_volume()}j j@qsbaj }(j]j]j]j]j]ujjj j=qubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.get_volumeujj j j:qubaj }(j]j]j]j]j]skip_section_numberujj j j7qubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_busy()}j jmqsbaj }(j]j]j]j]j]ujjj jjqubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.get_busyujj j jgqubaj }(j]j]j]j]j]skip_section_numberujj j jdqubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_pos()}j jqsbaj }(j]j]j]j]j]ujjj jqubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.set_posujj j jqubaj }(j]j]j]j]j]skip_section_numberujj j jqubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_pos()}j jqsbaj }(j]j]j]j]j]ujjj jqubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.get_posujj j jqubaj }(j]j]j]j]j]skip_section_numberujj j jqubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jqueue()}j jqsbaj }(j]j]j]j]j]ujjj jqubaj }(j]j]j]j]j]internalrefurijK anchorname#pygame.mixer.music.queueujj j jqubaj }(j]j]j]j]j]skip_section_numberujj j jqubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_endevent()}j j!rsbaj }(j]j]j]j]j]ujjj jrubaj }(j]j]j]j]j]internalrefurijK anchorname #pygame.mixer.music.set_endeventujj j jrubaj }(j]j]j]j]j]skip_section_numberujj j jrubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_endevent()}j jNrsbaj }(j]j]j]j]j]ujjj jKrubaj }(j]j]j]j]j]internalrefurijK anchorname #pygame.mixer.music.get_endeventujj j jHrubaj }(j]j]j]j]j]skip_section_numberujj j jErubaj }(j]j]j]j]j]ujj j joubej }(j]j]j]j]j]ujj j jzoubej }(j]j]j]j]j]ujj j jwoubaj }(j]j]j]j]j]ujj ubjMj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.Overlay}j jrsbajjE jjj }(j]j](jjI jJ ej]j]j]ujNjNj jrubaj }(j]j]j]j]j]internalrefurijM anchornameh:ujj j jrubaj }(j]j]j]j]j]ujj j jrubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jOverlay}j jrsbaj }(j]j]j]j]j]ujjj jrubaj }(j]j]j]j]j]internalrefurijM anchorname#pygame.Overlayujj j jrubaj }(j]j]j]j]j]skip_section_numberujj j jrubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jOverlay.display()}j jrsbaj }(j]j]j]j]j]ujjj jrubaj }(j]j]j]j]j]internalrefurijM anchorname#pygame.Overlay.displayujj j jrubaj }(j]j]j]j]j]skip_section_numberujj j jrubaj }(j]j]j]j]j]ujj j jrubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jOverlay.set_location()}j jssbaj }(j]j]j]j]j]ujjj j subaj }(j]j]j]j]j]internalrefurijM anchorname#pygame.Overlay.set_locationujj j j subaj }(j]j]j]j]j]skip_section_numberujj j jsubaj }(j]j]j]j]j]ujj j jrubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jOverlay.get_hardware()}j juubaj }(j]j]j]j]j]skip_section_numberujj j j;uubaj }(j]j]j]j]j]ujj j jsubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jPixelArray.transpose()}j jqusbaj }(j]j]j]j]j]ujjj jnuubaj }(j]j]j]j]j]internalrefurijg anchorname#pygame.PixelArray.transposeujj j jkuubaj }(j]j]j]j]j]skip_section_numberujj j jhuubaj }(j]j]j]j]j]ujj j jsubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jPixelArray.close()}j jusbaj }(j]j]j]j]j]ujjj juubaj }(j]j]j]j]j]internalrefurijg anchorname#pygame.PixelArray.closeujj j juubaj }(j]j]j]j]j]skip_section_numberujj j juubaj }(j]j]j]j]j]ujj j jsubej }(j]j]j]j]j]ujj j jsubej }(j]j]j]j]j]ujj j jsubaj }(j]j]j]j]j]ujj j jsubej }(j]j]j]j]j]ujj j j~subaj }(j]j]j]j]j]ujj ubjNj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.pixelcopy}j jusbajjw jjj }(j]j](jj{ j| ej]j]j]ujNjNj juubaj }(j]j]j]j]j]internalrefurijN anchornameh:ujj j juubaj }(j]j]j]j]j]ujj j juubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jsurface_to_array()}j jvsbaj }(j]j]j]j]j]ujjj jvubaj }(j]j]j]j]j]internalrefurijN anchorname"#pygame.pixelcopy.surface_to_arrayujj j jvubaj }(j]j]j]j]j]skip_section_numberujj j j vubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jarray_to_surface()}j jAvsbaj }(j]j]j]j]j]ujjj j>vubaj }(j]j]j]j]j]internalrefurijN anchorname"#pygame.pixelcopy.array_to_surfaceujj j j;vubaj }(j]j]j]j]j]skip_section_numberujj j j8vubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j map_array()}j jnvsbaj }(j]j]j]j]j]ujjj jkvubaj }(j]j]j]j]j]internalrefurijN anchorname#pygame.pixelcopy.map_arrayujj j jhvubaj }(j]j]j]j]j]skip_section_numberujj j jevubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jmake_surface()}j jvsbaj }(j]j]j]j]j]ujjj jvubaj }(j]j]j]j]j]internalrefurijN anchorname#pygame.pixelcopy.make_surfaceujj j jvubaj }(j]j]j]j]j]skip_section_numberujj j jvubaj }(j]j]j]j]j]ujj j jvubej }(j]j]j]j]j]ujj j juubej }(j]j]j]j]j]ujj j juubaj }(j]j]j]j]j]ujj ubjj )}(jh:j](j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame}j jvsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jvubaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j jvubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j jwsbaj }(j]j]j]j]j]ujjj jwubaj }(j]j]j]j]j]internalrefurij anchorname #pygame.initujj j jvubaj }(j]j]j]j]j]skip_section_numberujj j jvubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j j2wsbaj }(j]j]j]j]j]ujjj j/wubaj }(j]j]j]j]j]internalrefurij anchorname #pygame.quitujj j j,wubaj }(j]j]j]j]j]skip_section_numberujj j j)wubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j j_wsbaj }(j]j]j]j]j]ujjj j\wubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.get_initujj j jYwubaj }(j]j]j]j]j]skip_section_numberujj j jVwubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jerror}j jwsbaj }(j]j]j]j]j]ujjj jwubaj }(j]j]j]j]j]internalrefurij anchorname #pygame.errorujj j jwubaj }(j]j]j]j]j]skip_section_numberujj j jwubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_error()}j jwsbaj }(j]j]j]j]j]ujjj jwubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.get_errorujj j jwubaj }(j]j]j]j]j]skip_section_numberujj j jwubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_error()}j jwsbaj }(j]j]j]j]j]ujjj jwubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.set_errorujj j jwubaj }(j]j]j]j]j]skip_section_numberujj j jwubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_sdl_version()}j jxsbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.get_sdl_versionujj j j xubaj }(j]j]j]j]j]skip_section_numberujj j j xubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_sdl_byteorder()}j j@xsbaj }(j]j]j]j]j]ujjj j=xubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.get_sdl_byteorderujj j j:xubaj }(j]j]j]j]j]skip_section_numberujj j j7xubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jregister_quit()}j jmxsbaj }(j]j]j]j]j]ujjj jjxubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.register_quitujj j jgxubaj }(j]j]j]j]j]skip_section_numberujj j jdxubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jencode_string()}j jxsbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.encode_stringujj j jxubaj }(j]j]j]j]j]skip_section_numberujj j jxubaj }(j]j]j]j]j]ujj j jvubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jencode_file_path()}j jxsbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.encode_file_pathujj j jxubaj }(j]j]j]j]j]skip_section_numberujj j jxubaj }(j]j]j]j]j]ujj j jvubej }(j]j]j]j]j]ujj j jvubej }(j]j]j]j]j]ujj j jvubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.version}j jysbaj:mod:`pygame.version`jjj }(j]j](jpypy-modej]j]j]ujNjNj jxubaj }(j]j]j]j]j]internalrefurij anchorname#module-pygame.versionujj j jxubaj }(j]j]j]j]j]ujj j jxubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jver}j j,ysbaj }(j]j]j]j]j]ujjj j)yubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.version.verujj j j&yubaj }(j]j]j]j]j]skip_section_numberujj j j#yubaj }(j]j]j]j]j]ujj j j yubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jvernum}j jYysbaj }(j]j]j]j]j]ujjj jVyubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.version.vernumujj j jSyubaj }(j]j]j]j]j]skip_section_numberujj j jPyubaj }(j]j]j]j]j]ujj j j yubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jrev}j jysbaj }(j]j]j]j]j]ujjj jyubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.version.revujj j jyubaj }(j]j]j]j]j]skip_section_numberujj j j}yubaj }(j]j]j]j]j]ujj j j yubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSDL}j jysbaj }(j]j]j]j]j]ujjj jyubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.version.SDLujj j jyubaj }(j]j]j]j]j]skip_section_numberujj j jyubaj }(j]j]j]j]j]ujj j j yubej }(j]j]j]j]j]ujj j jxubej }(j]j]j]j]j]ujj j jvubej }(j]j]j]j]j]ujj ubjQj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.Rect}j jysbajj jjj }(j]j](jj j ej]j]j]ujNjNj jyubaj }(j]j]j]j]j]internalrefurijQ anchornameh:ujj j jyubaj }(j]j]j]j]j]ujj j jyubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect}j jzsbaj }(j]j]j]j]j]ujjj jzubaj }(j]j]j]j]j]internalrefurijQ anchorname #pygame.Rectujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jzubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.copy()}j jGzsbaj }(j]j]j]j]j]ujjj jDzubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.copyujj j jAzubaj }(j]j]j]j]j]skip_section_numberujj j j>zubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.move()}j jtzsbaj }(j]j]j]j]j]ujjj jqzubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.moveujj j jnzubaj }(j]j]j]j]j]skip_section_numberujj j jkzubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.move_ip()}j jzsbaj }(j]j]j]j]j]ujjj jzubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.move_ipujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jzubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.inflate()}j jzsbaj }(j]j]j]j]j]ujjj jzubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.inflateujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jzubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.inflate_ip()}j jzsbaj }(j]j]j]j]j]ujjj jzubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.inflate_ipujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jzubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.scale_by()}j j({sbaj }(j]j]j]j]j]ujjj j%{ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.scale_byujj j j"{ubaj }(j]j]j]j]j]skip_section_numberujj j j{ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.scale_by_ip()}j jU{sbaj }(j]j]j]j]j]ujjj jR{ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.scale_by_ipujj j jO{ubaj }(j]j]j]j]j]skip_section_numberujj j jL{ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.update()}j j{sbaj }(j]j]j]j]j]ujjj j{ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.updateujj j j|{ubaj }(j]j]j]j]j]skip_section_numberujj j jy{ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.clamp()}j j{sbaj }(j]j]j]j]j]ujjj j{ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.clampujj j j{ubaj }(j]j]j]j]j]skip_section_numberujj j j{ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.clamp_ip()}j j{sbaj }(j]j]j]j]j]ujjj j{ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.clamp_ipujj j j{ubaj }(j]j]j]j]j]skip_section_numberujj j j{ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.clip()}j j |sbaj }(j]j]j]j]j]ujjj j|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.clipujj j j|ubaj }(j]j]j]j]j]skip_section_numberujj j j|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.clipline()}j j6|sbaj }(j]j]j]j]j]ujjj j3|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.cliplineujj j j0|ubaj }(j]j]j]j]j]skip_section_numberujj j j-|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.union()}j jc|sbaj }(j]j]j]j]j]ujjj j`|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.unionujj j j]|ubaj }(j]j]j]j]j]skip_section_numberujj j jZ|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.union_ip()}j j|sbaj }(j]j]j]j]j]ujjj j|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.union_ipujj j j|ubaj }(j]j]j]j]j]skip_section_numberujj j j|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.unionall()}j j|sbaj }(j]j]j]j]j]ujjj j|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.unionallujj j j|ubaj }(j]j]j]j]j]skip_section_numberujj j j|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.unionall_ip()}j j|sbaj }(j]j]j]j]j]ujjj j|ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.unionall_ipujj j j|ubaj }(j]j]j]j]j]skip_section_numberujj j j|ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Rect.fit()}j j}sbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.fitujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.normalize()}j jD}sbaj }(j]j]j]j]j]ujjj jA}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.normalizeujj j j>}ubaj }(j]j]j]j]j]skip_section_numberujj j j;}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.contains()}j jq}sbaj }(j]j]j]j]j]ujjj jn}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.containsujj j jk}ubaj }(j]j]j]j]j]skip_section_numberujj j jh}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collidepoint()}j j}sbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collidepointujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.colliderect()}j j}sbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.colliderectujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collidelist()}j j}sbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collidelistujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collidelistall()}j j%~sbaj }(j]j]j]j]j]ujjj j"~ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collidelistallujj j j~ubaj }(j]j]j]j]j]skip_section_numberujj j j~ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collideobjects()}j jR~sbaj }(j]j]j]j]j]ujjj jO~ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collideobjectsujj j jL~ubaj }(j]j]j]j]j]skip_section_numberujj j jI~ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collideobjectsall()}j j~sbaj }(j]j]j]j]j]ujjj j|~ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collideobjectsallujj j jy~ubaj }(j]j]j]j]j]skip_section_numberujj j jv~ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collidedict()}j j~sbaj }(j]j]j]j]j]ujjj j~ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collidedictujj j j~ubaj }(j]j]j]j]j]skip_section_numberujj j j~ubaj }(j]j]j]j]j]ujj j j;zubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRect.collidedictall()}j j~sbaj }(j]j]j]j]j]ujjj j~ubaj }(j]j]j]j]j]internalrefurijQ anchorname#pygame.Rect.collidedictallujj j j~ubaj }(j]j]j]j]j]skip_section_numberujj j j~ubaj }(j]j]j]j]j]ujj j j;zubej }(j]j]j]j]j]ujj j jzubej }(j]j]j]j]j]ujj j jzubaj }(j]j]j]j]j]ujj j jyubej }(j]j]j]j]j]ujj j jyubaj }(j]j]j]j]j]ujj ubj+j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.scrap}j j'sbajj jjj }(j]j](jj j ej]j]j]ujNjNj j$ubaj }(j]j]j]j]j]internalrefurij+ anchornameh:ujj j j!ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j jOsbaj }(j]j]j]j]j]ujjj jLubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.initujj j jIubaj }(j]j]j]j]j]skip_section_numberujj j jFubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j j|sbaj }(j]j]j]j]j]ujjj jyubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.get_initujj j jvubaj }(j]j]j]j]j]skip_section_numberujj j jsubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.getujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_types()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.get_typesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jput()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.putujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j contains()}j j0sbaj }(j]j]j]j]j]ujjj j-ubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.containsujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jlost()}j j]sbaj }(j]j]j]j]j]ujjj jZubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.lostujj j jWubaj }(j]j]j]j]j]skip_section_numberujj j jTubaj }(j]j]j]j]j]ujj j jCubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_mode()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij+ anchorname#pygame.scrap.set_modeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jCubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame._sdl2.controller}j j̀sbajj jjj }(j]j](jj j ej]j]j]ujNjNj jɀubaj }(j]j]j]j]j]internalrefurijj anchornameh:ujj j jƀubaj }(j]j]j]j]j]ujj j jÀubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jinit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname#pygame._sdl2.controller.initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jquit()}j j!sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname#pygame._sdl2.controller.quitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_init()}j jNsbaj }(j]j]j]j]j]ujjj jKubaj }(j]j]j]j]j]internalrefurijj anchorname!#pygame._sdl2.controller.get_initujj j jHubaj }(j]j]j]j]j]skip_section_numberujj j jEubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_eventstate()}j j{sbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurijj anchorname'#pygame._sdl2.controller.set_eventstateujj j juubaj }(j]j]j]j]j]skip_section_numberujj j jrubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_eventstate()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname'#pygame._sdl2.controller.get_eventstateujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_count()}j jՁsbaj }(j]j]j]j]j]ujjj jҁubaj }(j]j]j]j]j]internalrefurijj anchorname"#pygame._sdl2.controller.get_countujj j jρubaj }(j]j]j]j]j]skip_section_numberujj j j́ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jis_controller()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname&#pygame._sdl2.controller.is_controllerujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jname_forindex()}j j/sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurijj anchorname&#pygame._sdl2.controller.name_forindexujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]j Controller}j j\sbaj }(j]j]j]j]j]ujjj jYubaj }(j]j]j]j]j]internalrefurijj anchorname##pygame._sdl2.controller.Controllerujj j jVubaj }(j]j]j]j]j]skip_section_numberujj j jSubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.quit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname(#pygame._sdl2.controller.Controller.quitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.get_init()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname,#pygame._sdl2.controller.Controller.get_initujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.from_joystick()}j jsbaj }(j]j]j]j]j]ujjj j݂ubaj }(j]j]j]j]j]internalrefurijj anchorname1#pygame._sdl2.controller.Controller.from_joystickujj j jڂubaj }(j]j]j]j]j]skip_section_numberujj j jׂubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.attached()}j j sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurijj anchorname,#pygame._sdl2.controller.Controller.attachedujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.as_joystick()}j j:sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijj anchorname/#pygame._sdl2.controller.Controller.as_joystickujj j j4ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.get_axis()}j jgsbaj }(j]j]j]j]j]ujjj jdubaj }(j]j]j]j]j]internalrefurijj anchorname,#pygame._sdl2.controller.Controller.get_axisujj j jaubaj }(j]j]j]j]j]skip_section_numberujj j j^ubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.get_button()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname.#pygame._sdl2.controller.Controller.get_buttonujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.get_mapping()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname/#pygame._sdl2.controller.Controller.get_mappingujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.set_mapping()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname/#pygame._sdl2.controller.Controller.set_mappingujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.rumble()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijj anchorname*#pygame._sdl2.controller.Controller.rumbleujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jzubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jController.stop_rumble()}j jHsbaj }(j]j]j]j]j]ujjj jEubaj }(j]j]j]j]j]internalrefurijj anchorname/#pygame._sdl2.controller.Controller.stop_rumbleujj j jBubaj }(j]j]j]j]j]skip_section_numberujj j j?ubaj }(j]j]j]j]j]ujj j jzubej }(j]j]j]j]j]ujj j jSubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jÀubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj9j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.sdl2_video}j jsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurij9 anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Windowujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.from_display_module()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname.#pygame._sdl2.video.Window.from_display_moduleujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j߄ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.from_window()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname&#pygame._sdl2.video.Window.from_windowujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.grab}j jBsbaj }(j]j]j]j]j]ujjj j?ubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Window.grabujj j j<ubaj }(j]j]j]j]j]skip_section_numberujj j j9ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.relative_mouse}j josbaj }(j]j]j]j]j]ujjj jlubaj }(j]j]j]j]j]internalrefurij9 anchorname)#pygame._sdl2.video.Window.relative_mouseujj j jiubaj }(j]j]j]j]j]skip_section_numberujj j jfubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.set_windowed()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname'#pygame._sdl2.video.Window.set_windowedujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.set_fullscreen()}j jɅsbaj }(j]j]j]j]j]ujjj jƅubaj }(j]j]j]j]j]internalrefurij9 anchorname)#pygame._sdl2.video.Window.set_fullscreenujj j jÅubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.title}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Window.titleujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.destroy()}j j#sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Window.destroyujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.hide()}j jPsbaj }(j]j]j]j]j]ujjj jMubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Window.hideujj j jJubaj }(j]j]j]j]j]skip_section_numberujj j jGubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.show()}j j}sbaj }(j]j]j]j]j]ujjj jzubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Window.showujj j jwubaj }(j]j]j]j]j]skip_section_numberujj j jtubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.focus()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Window.focusujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.restore()}j j׆sbaj }(j]j]j]j]j]ujjj jԆubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Window.restoreujj j jцubaj }(j]j]j]j]j]skip_section_numberujj j jΆubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.maximize()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname##pygame._sdl2.video.Window.maximizeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.minimize()}j j1sbaj }(j]j]j]j]j]ujjj j.ubaj }(j]j]j]j]j]internalrefurij9 anchorname##pygame._sdl2.video.Window.minimizeujj j j+ubaj }(j]j]j]j]j]skip_section_numberujj j j(ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.resizable}j j^sbaj }(j]j]j]j]j]ujjj j[ubaj }(j]j]j]j]j]internalrefurij9 anchorname$#pygame._sdl2.video.Window.resizableujj j jXubaj }(j]j]j]j]j]skip_section_numberujj j jUubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.borderless}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname%#pygame._sdl2.video.Window.borderlessujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.set_icon()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname##pygame._sdl2.video.Window.set_iconujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.id}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Window.idujj j j߇ubaj }(j]j]j]j]j]skip_section_numberujj j j܇ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Window.size}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Window.sizeujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.position}j j?sbaj }(j]j]j]j]j]ujjj j<ubaj }(j]j]j]j]j]internalrefurij9 anchorname##pygame._sdl2.video.Window.positionujj j j9ubaj }(j]j]j]j]j]skip_section_numberujj j j6ubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.opacity}j jlsbaj }(j]j]j]j]j]ujjj jiubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Window.opacityujj j jfubaj }(j]j]j]j]j]skip_section_numberujj j jcubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.display_index}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname(#pygame._sdl2.video.Window.display_indexujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWindow.set_modal_for()}j jƈsbaj }(j]j]j]j]j]ujjj jÈubaj }(j]j]j]j]j]internalrefurij9 anchorname(#pygame._sdl2.video.Window.set_modal_forujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j܄ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Textureujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.from_surface()}j j)sbaj }(j]j]j]j]j]ujjj j&ubaj }(j]j]j]j]j]internalrefurij9 anchorname(#pygame._sdl2.video.Texture.from_surfaceujj j j#ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.renderer}j jVsbaj }(j]j]j]j]j]ujjj jSubaj }(j]j]j]j]j]internalrefurij9 anchorname$#pygame._sdl2.video.Texture.rendererujj j jPubaj }(j]j]j]j]j]skip_section_numberujj j jMubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Texture.width}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Texture.widthujj j j}ubaj }(j]j]j]j]j]skip_section_numberujj j jzubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.height}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Texture.heightujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Texture.alpha}j j݉sbaj }(j]j]j]j]j]ujjj jډubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Texture.alphaujj j j׉ubaj }(j]j]j]j]j]skip_section_numberujj j jԉubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.blend_mode}j j sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname&#pygame._sdl2.video.Texture.blend_modeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Texture.color}j j7sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Texture.colorujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.get_rect()}j jdsbaj }(j]j]j]j]j]ujjj jaubaj }(j]j]j]j]j]internalrefurij9 anchorname$#pygame._sdl2.video.Texture.get_rectujj j j^ubaj }(j]j]j]j]j]skip_section_numberujj j j[ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.draw()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Texture.drawujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jTexture.update()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Texture.updateujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jImage}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Imageujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jImage.get_rect()}j j!sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Image.get_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.draw()}j jNsbaj }(j]j]j]j]j]ujjj jKubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Image.drawujj j jHubaj }(j]j]j]j]j]skip_section_numberujj j jEubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.angle}j j{sbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Image.angleujj j juubaj }(j]j]j]j]j]skip_section_numberujj j jrubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.origin}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Image.originujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.flip_x}j jՋsbaj }(j]j]j]j]j]ujjj jҋubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Image.flip_xujj j jϋubaj }(j]j]j]j]j]skip_section_numberujj j j̋ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.flip_y}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname #pygame._sdl2.video.Image.flip_yujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.color}j j/sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Image.colorujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.alpha}j j\sbaj }(j]j]j]j]j]ujjj jYubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Image.alphaujj j jVubaj }(j]j]j]j]j]skip_section_numberujj j jSubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jImage.blend_mode}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname$#pygame._sdl2.video.Image.blend_modeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.texture}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Image.textureujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Image.srcrect}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Image.srcrectujj j j݌ubaj }(j]j]j]j]j]skip_section_numberujj j jڌubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname#pygame._sdl2.video.Rendererujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.from_window()}j jFsbaj }(j]j]j]j]j]ujjj jCubaj }(j]j]j]j]j]internalrefurij9 anchorname(#pygame._sdl2.video.Renderer.from_windowujj j j@ubaj }(j]j]j]j]j]skip_section_numberujj j j=ubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.draw_blend_mode}j jssbaj }(j]j]j]j]j]ujjj jpubaj }(j]j]j]j]j]internalrefurij9 anchorname,#pygame._sdl2.video.Renderer.draw_blend_modeujj j jmubaj }(j]j]j]j]j]skip_section_numberujj j jjubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.draw_color}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname'#pygame._sdl2.video.Renderer.draw_colorujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.clear()}j j͍sbaj }(j]j]j]j]j]ujjj jʍubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Renderer.clearujj j jǍubaj }(j]j]j]j]j]skip_section_numberujj j jčubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.present()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname$#pygame._sdl2.video.Renderer.presentujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.get_viewport()}j j'sbaj }(j]j]j]j]j]ujjj j$ubaj }(j]j]j]j]j]internalrefurij9 anchorname)#pygame._sdl2.video.Renderer.get_viewportujj j j!ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.set_viewport()}j jTsbaj }(j]j]j]j]j]ujjj jQubaj }(j]j]j]j]j]internalrefurij9 anchorname)#pygame._sdl2.video.Renderer.set_viewportujj j jNubaj }(j]j]j]j]j]skip_section_numberujj j jKubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.logical_size}j jsbaj }(j]j]j]j]j]ujjj j~ubaj }(j]j]j]j]j]internalrefurij9 anchorname)#pygame._sdl2.video.Renderer.logical_sizeujj j j{ubaj }(j]j]j]j]j]skip_section_numberujj j jxubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.scale}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname"#pygame._sdl2.video.Renderer.scaleujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.target}j jێsbaj }(j]j]j]j]j]ujjj j؎ubaj }(j]j]j]j]j]internalrefurij9 anchorname##pygame._sdl2.video.Renderer.targetujj j jՎubaj }(j]j]j]j]j]skip_section_numberujj j jҎubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.blit()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname!#pygame._sdl2.video.Renderer.blitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.draw_line()}j j5sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij9 anchorname&#pygame._sdl2.video.Renderer.draw_lineujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j,ubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.draw_point()}j jbsbaj }(j]j]j]j]j]ujjj j_ubaj }(j]j]j]j]j]internalrefurij9 anchorname'#pygame._sdl2.video.Renderer.draw_pointujj j j\ubaj }(j]j]j]j]j]skip_section_numberujj j jYubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.draw_rect()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname&#pygame._sdl2.video.Renderer.draw_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.fill_rect()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname&#pygame._sdl2.video.Renderer.fill_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderer.to_surface()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij9 anchorname'#pygame._sdl2.video.Renderer.to_surfaceujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j:ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj/j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.sndarray}j j7sbajj jjj }(j]j](jj j ej]j]j]ujNjNj j4ubaj }(j]j]j]j]j]internalrefurij/ anchornameh:ujj j j1ubaj }(j]j]j]j]j]ujj j j.ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jarray()}j j_sbaj }(j]j]j]j]j]ujjj j\ubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.arrayujj j jYubaj }(j]j]j]j]j]skip_section_numberujj j jVubaj }(j]j]j]j]j]ujj j jSubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j samples()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.samplesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jSubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j make_sound()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.make_soundujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jSubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]juse_arraytype()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.use_arraytypeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jݐubaj }(j]j]j]j]j]ujj j jSubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_arraytype()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.get_arraytypeujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jSubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_arraytypes()}j j@sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurij/ anchorname#pygame.sndarray.get_arraytypesujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j jSubej }(j]j]j]j]j]ujj j j.ubej }(j]j]j]j]j]ujj j j+ubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.sprite}j jsbajj& jjj }(j]j](jj* j+ ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j j|ubaj }(j]j]j]j]j]ujj j jyubj )}(jh:j](j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jSprite}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Spriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSprite.update()}j jԑsbaj }(j]j]j]j]j]ujjj jёubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.updateujj j jΑubaj }(j]j]j]j]j]skip_section_numberujj j jˑubaj }(j]j]j]j]j]ujj j jȑubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Sprite.add()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.addujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȑubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSprite.remove()}j j.sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.removeujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j%ubaj }(j]j]j]j]j]ujj j jȑubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Sprite.kill()}j j[sbaj }(j]j]j]j]j]ujjj jXubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.killujj j jUubaj }(j]j]j]j]j]skip_section_numberujj j jRubaj }(j]j]j]j]j]ujj j jȑubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSprite.alive()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.aliveujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȑubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSprite.groups()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Sprite.groupsujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȑubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j WeakSprite}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.WeakSpriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j DirtySprite}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.DirtySpriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jGroup}j jHsbaj }(j]j]j]j]j]ujjj jEubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Groupujj j jBubaj }(j]j]j]j]j]skip_section_numberujj j j?ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jGroup.sprites()}j jrsbaj }(j]j]j]j]j]ujjj joubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.spritesujj j jlubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.copy()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.copyujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.add()}j j̓sbaj }(j]j]j]j]j]ujjj jɓubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.addujj j jƓubaj }(j]j]j]j]j]skip_section_numberujj j jÓubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jGroup.remove()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.removeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.has()}j j&sbaj }(j]j]j]j]j]ujjj j#ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.hasujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jGroup.update()}j jSsbaj }(j]j]j]j]j]ujjj jPubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.updateujj j jMubaj }(j]j]j]j]j]skip_section_numberujj j jJubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.draw()}j jsbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.drawujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jwubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.clear()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.clearujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jfubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Group.empty()}j jڔsbaj }(j]j]j]j]j]ujjj jהubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.Group.emptyujj j jԔubaj }(j]j]j]j]j]skip_section_numberujj j jєubaj }(j]j]j]j]j]ujj j jfubej }(j]j]j]j]j]ujj j j?ubej }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jWeakDirtySprite}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.WeakDirtySpriteujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j RenderPlain}j j@sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.RenderPlainujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j RenderClear}j jmsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.RenderClearujj j jgubaj }(j]j]j]j]j]skip_section_numberujj j jdubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]j RenderUpdates}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.RenderUpdatesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jRenderUpdates.draw()}j jĕsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname!#pygame.sprite.RenderUpdates.drawujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jOrderedUpdates()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.OrderedUpdatesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates}j j*sbaj }(j]j]j]j]j]ujjj j'ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.LayeredUpdatesujj j j$ubaj }(j]j]j]j]j]skip_section_numberujj j j!ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.add()}j jTsbaj }(j]j]j]j]j]ujjj jQubaj }(j]j]j]j]j]internalrefurij anchorname!#pygame.sprite.LayeredUpdates.addujj j jNubaj }(j]j]j]j]j]skip_section_numberujj j jKubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.sprites()}j jsbaj }(j]j]j]j]j]ujjj j~ubaj }(j]j]j]j]j]internalrefurij anchorname%#pygame.sprite.LayeredUpdates.spritesujj j j{ubaj }(j]j]j]j]j]skip_section_numberujj j jxubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.draw()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname"#pygame.sprite.LayeredUpdates.drawujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.get_sprites_at()}j jۖsbaj }(j]j]j]j]j]ujjj jؖubaj }(j]j]j]j]j]internalrefurij anchorname,#pygame.sprite.LayeredUpdates.get_sprites_atujj j jՖubaj }(j]j]j]j]j]skip_section_numberujj j jҖubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.get_sprite()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname(#pygame.sprite.LayeredUpdates.get_spriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j(LayeredUpdates.remove_sprites_of_layer()}j j5sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurij anchorname5#pygame.sprite.LayeredUpdates.remove_sprites_of_layerujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j,ubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.layers()}j jbsbaj }(j]j]j]j]j]ujjj j_ubaj }(j]j]j]j]j]internalrefurij anchorname$#pygame.sprite.LayeredUpdates.layersujj j j\ubaj }(j]j]j]j]j]skip_section_numberujj j jYubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.change_layer()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname*#pygame.sprite.LayeredUpdates.change_layerujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j$LayeredUpdates.get_layer_of_sprite()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname1#pygame.sprite.LayeredUpdates.get_layer_of_spriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.get_top_layer()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname+#pygame.sprite.LayeredUpdates.get_top_layerujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j!LayeredUpdates.get_bottom_layer()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname.#pygame.sprite.LayeredUpdates.get_bottom_layerujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.move_to_front()}j jCsbaj }(j]j]j]j]j]ujjj j@ubaj }(j]j]j]j]j]internalrefurij anchorname+#pygame.sprite.LayeredUpdates.move_to_frontujj j j=ubaj }(j]j]j]j]j]skip_section_numberujj j j:ubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.move_to_back()}j jpsbaj }(j]j]j]j]j]ujjj jmubaj }(j]j]j]j]j]internalrefurij anchorname*#pygame.sprite.LayeredUpdates.move_to_backujj j jjubaj }(j]j]j]j]j]skip_section_numberujj j jgubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.get_top_sprite()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname,#pygame.sprite.LayeredUpdates.get_top_spriteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j'LayeredUpdates.get_sprites_from_layer()}j jʘsbaj }(j]j]j]j]j]ujjj jǘubaj }(j]j]j]j]j]internalrefurij anchorname4#pygame.sprite.LayeredUpdates.get_sprites_from_layerujj j jĘubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredUpdates.switch_layer()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname*#pygame.sprite.LayeredUpdates.switch_layerujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jHubej }(j]j]j]j]j]ujj j j!ubej }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]j LayeredDirty}j j0sbaj }(j]j]j]j]j]ujjj j-ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.LayeredDirtyujj j j*ubaj }(j]j]j]j]j]skip_section_numberujj j j'ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.draw()}j jZsbaj }(j]j]j]j]j]ujjj jWubaj }(j]j]j]j]j]internalrefurij anchorname #pygame.sprite.LayeredDirty.drawujj j jTubaj }(j]j]j]j]j]skip_section_numberujj j jQubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.clear()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname!#pygame.sprite.LayeredDirty.clearujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j~ubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.repaint_rect()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname(#pygame.sprite.LayeredDirty.repaint_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.set_clip()}j jsbaj }(j]j]j]j]j]ujjj jޙubaj }(j]j]j]j]j]internalrefurij anchorname$#pygame.sprite.LayeredDirty.set_clipujj j jۙubaj }(j]j]j]j]j]skip_section_numberujj j jؙubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.get_clip()}j jsbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij anchorname$#pygame.sprite.LayeredDirty.get_clipujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jLayeredDirty.change_layer()}j j;sbaj }(j]j]j]j]j]ujjj j8ubaj }(j]j]j]j]j]internalrefurij anchorname(#pygame.sprite.LayeredDirty.change_layerujj j j5ubaj }(j]j]j]j]j]skip_section_numberujj j j2ubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j"LayeredDirty.set_timing_treshold()}j jhsbaj }(j]j]j]j]j]ujjj jeubaj }(j]j]j]j]j]internalrefurij anchorname/#pygame.sprite.LayeredDirty.set_timing_tresholdujj j jbubaj }(j]j]j]j]j]skip_section_numberujj j j_ubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j#LayeredDirty.set_timing_threshold()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname0#pygame.sprite.LayeredDirty.set_timing_thresholdujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jNubej }(j]j]j]j]j]ujj j j'ubej }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j GroupSingle()}j jΚsbaj }(j]j]j]j]j]ujjj j˚ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.GroupSingleujj j jȚubaj }(j]j]j]j]j]skip_section_numberujj j jŚubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jspritecollide()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.spritecollideujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcollide_rect()}j j(sbaj }(j]j]j]j]j]ujjj j%ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.collide_rectujj j j"ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcollide_rect_ratio()}j jUsbaj }(j]j]j]j]j]ujjj jRubaj }(j]j]j]j]j]internalrefurij anchorname!#pygame.sprite.collide_rect_ratioujj j jOubaj }(j]j]j]j]j]skip_section_numberujj j jLubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcollide_circle()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.collide_circleujj j j|ubaj }(j]j]j]j]j]skip_section_numberujj j jyubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcollide_circle_ratio()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname##pygame.sprite.collide_circle_ratioujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jcollide_mask()}j jܛsbaj }(j]j]j]j]j]ujjj jٛubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.collide_maskujj j j֛ubaj }(j]j]j]j]j]skip_section_numberujj j jӛubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jgroupcollide()}j j sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.groupcollideujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jspritecollideany()}j j6sbaj }(j]j]j]j]j]ujjj j3ubaj }(j]j]j]j]j]internalrefurij anchorname#pygame.sprite.spritecollideanyujj j j0ubaj }(j]j]j]j]j]skip_section_numberujj j j-ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jyubej }(j]j]j]j]j]ujj j jvubaj }(j]j]j]j]j]ujj ubjPj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.Surface}j jxsbajj? jjj }(j]j](jjC jD ej]j]j]ujNjNj juubaj }(j]j]j]j]j]internalrefurijP anchornameh:ujj j jrubaj }(j]j]j]j]j]ujj j joubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surfaceujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.blit()}j jʜsbaj }(j]j]j]j]j]ujjj jǜubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.blitujj j jĜubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.blits()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.blitsujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.convert()}j j$sbaj }(j]j]j]j]j]ujjj j!ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.convertujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.convert_alpha()}j jQsbaj }(j]j]j]j]j]ujjj jNubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.convert_alphaujj j jKubaj }(j]j]j]j]j]skip_section_numberujj j jHubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.copy()}j j~sbaj }(j]j]j]j]j]ujjj j{ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.copyujj j jxubaj }(j]j]j]j]j]skip_section_numberujj j juubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.fill()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.fillujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.scroll()}j j؝sbaj }(j]j]j]j]j]ujjj j՝ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.scrollujj j jҝubaj }(j]j]j]j]j]skip_section_numberujj j jϝubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_colorkey()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_colorkeyujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_colorkey()}j j2sbaj }(j]j]j]j]j]ujjj j/ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_colorkeyujj j j,ubaj }(j]j]j]j]j]skip_section_numberujj j j)ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_alpha()}j j_sbaj }(j]j]j]j]j]ujjj j\ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_alphaujj j jYubaj }(j]j]j]j]j]skip_section_numberujj j jVubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_alpha()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_alphaujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.lock()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.lockujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.unlock()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.unlockujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jݞubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.mustlock()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.mustlockujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_locked()}j j@sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_lockedujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_locks()}j jmsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_locksujj j jgubaj }(j]j]j]j]j]skip_section_numberujj j jdubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_at()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_atujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_at()}j jǟsbaj }(j]j]j]j]j]ujjj jğubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_atujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_at_mapped()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_at_mappedujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_palette()}j j!sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_paletteujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_palette_at()}j jNsbaj }(j]j]j]j]j]ujjj jKubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_palette_atujj j jHubaj }(j]j]j]j]j]skip_section_numberujj j jEubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_palette()}j j{sbaj }(j]j]j]j]j]ujjj jxubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_paletteujj j juubaj }(j]j]j]j]j]skip_section_numberujj j jrubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_palette_at()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_palette_atujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.map_rgb()}j jՠsbaj }(j]j]j]j]j]ujjj jҠubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.map_rgbujj j jϠubaj }(j]j]j]j]j]skip_section_numberujj j j̠ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.unmap_rgb()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.unmap_rgbujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_clip()}j j/sbaj }(j]j]j]j]j]ujjj j,ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_clipujj j j)ubaj }(j]j]j]j]j]skip_section_numberujj j j&ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_clip()}j j\sbaj }(j]j]j]j]j]ujjj jYubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_clipujj j jVubaj }(j]j]j]j]j]skip_section_numberujj j jSubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.subsurface()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.subsurfaceujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_parent()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_parentujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_abs_parent()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_abs_parentujj j jݡubaj }(j]j]j]j]j]skip_section_numberujj j jڡubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_offset()}j jsbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_offsetujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_abs_offset()}j j=sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_abs_offsetujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j4ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_size()}j jjsbaj }(j]j]j]j]j]ujjj jgubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_sizeujj j jdubaj }(j]j]j]j]j]skip_section_numberujj j jaubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_width()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_widthujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_height()}j jĢsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_heightujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_rect()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_bitsize()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_bitsizeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_bytesize()}j jKsbaj }(j]j]j]j]j]ujjj jHubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_bytesizeujj j jEubaj }(j]j]j]j]j]skip_section_numberujj j jBubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_flags()}j jxsbaj }(j]j]j]j]j]ujjj juubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_flagsujj j jrubaj }(j]j]j]j]j]skip_section_numberujj j joubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_pitch()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_pitchujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_masks()}j jңsbaj }(j]j]j]j]j]ujjj jϣubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_masksujj j j̣ubaj }(j]j]j]j]j]skip_section_numberujj j jɣubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_masks()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_masksujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_shifts()}j j,sbaj }(j]j]j]j]j]ujjj j)ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_shiftsujj j j&ubaj }(j]j]j]j]j]skip_section_numberujj j j#ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.set_shifts()}j jYsbaj }(j]j]j]j]j]ujjj jVubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.set_shiftsujj j jSubaj }(j]j]j]j]j]skip_section_numberujj j jPubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_losses()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_lossesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j j}ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_bounding_rect()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijP anchorname!#pygame.Surface.get_bounding_rectujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_view()}j jsbaj }(j]j]j]j]j]ujjj jݤubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_viewujj j jڤubaj }(j]j]j]j]j]skip_section_numberujj j jפubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.get_buffer()}j j sbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.get_bufferujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface._pixels_address}j j:sbaj }(j]j]j]j]j]ujjj j7ubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface._pixels_addressujj j j4ubaj }(j]j]j]j]j]skip_section_numberujj j j1ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jSurface.premul_alpha()}j jgsbaj }(j]j]j]j]j]ujjj jdubaj }(j]j]j]j]j]internalrefurijP anchorname#pygame.Surface.premul_alphaujj j jaubaj }(j]j]j]j]j]skip_section_numberujj j j^ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j joubej }(j]j]j]j]j]ujj j jlubaj }(j]j]j]j]j]ujj ubj[j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.surfarray}j jsbajjX jjj }(j]j](jj\ j] ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurij[ anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array2d()}j jݥsbaj }(j]j]j]j]j]ujjj jڥubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array2dujj j jץubaj }(j]j]j]j]j]skip_section_numberujj j jԥubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j pixels2d()}j j sbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels2dujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array3d()}j j7sbaj }(j]j]j]j]j]ujjj j4ubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array3dujj j j1ubaj }(j]j]j]j]j]skip_section_numberujj j j.ubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j pixels3d()}j jdsbaj }(j]j]j]j]j]ujjj jaubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels3dujj j j^ubaj }(j]j]j]j]j]skip_section_numberujj j j[ubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array_alpha()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array_alphaujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpixels_alpha()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels_alphaujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array_red()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array_redujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j pixels_red()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels_redujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array_green()}j jEsbaj }(j]j]j]j]j]ujjj jBubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array_greenujj j j?ubaj }(j]j]j]j]j]skip_section_numberujj j j<ubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jpixels_green()}j jrsbaj }(j]j]j]j]j]ujjj joubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels_greenujj j jlubaj }(j]j]j]j]j]skip_section_numberujj j jiubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j array_blue()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.array_blueujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j pixels_blue()}j j̧sbaj }(j]j]j]j]j]ujjj jɧubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.pixels_blueujj j jƧubaj }(j]j]j]j]j]skip_section_numberujj j jçubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jarray_colorkey()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname #pygame.surfarray.array_colorkeyujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jmake_surface()}j j&sbaj }(j]j]j]j]j]ujjj j#ubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.make_surfaceujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j blit_array()}j jSsbaj }(j]j]j]j]j]ujjj jPubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.blit_arrayujj j jMubaj }(j]j]j]j]j]skip_section_numberujj j jJubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j map_array()}j jsbaj }(j]j]j]j]j]ujjj j}ubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.map_arrayujj j jzubaj }(j]j]j]j]j]skip_section_numberujj j jwubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]juse_arraytype()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.use_arraytypeujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_arraytype()}j jڨsbaj }(j]j]j]j]j]ujjj jרubaj }(j]j]j]j]j]internalrefurij[ anchorname#pygame.surfarray.get_arraytypeujj j jԨubaj }(j]j]j]j]j]skip_section_numberujj j jѨubaj }(j]j]j]j]j]ujj j jѥubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_arraytypes()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij[ anchorname #pygame.surfarray.get_arraytypesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jѥubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj4j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.tests}j jIsbajjq jjj }(j]j](jju jv ej]j]j]ujNjNj jFubaj }(j]j]j]j]j]internalrefurij4 anchornameh:ujj j jCubaj }(j]j]j]j]j]ujj j j@ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jrun()}j jqsbaj }(j]j]j]j]j]ujjj jnubaj }(j]j]j]j]j]internalrefurij4 anchorname#pygame.tests.runujj j jkubaj }(j]j]j]j]j]skip_section_numberujj j jhubaj }(j]j]j]j]j]ujj j jeubaj }(j]j]j]j]j]ujj j j@ubej }(j]j]j]j]j]ujj j j=ubaj }(j]j]j]j]j]ujj ubjfj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]j pygame.time}j jsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurijf anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_ticks()}j j۩sbaj }(j]j]j]j]j]ujjj jةubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.get_ticksujj j jթubaj }(j]j]j]j]j]skip_section_numberujj j jҩubaj }(j]j]j]j]j]ujj j jϩubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jwait()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.waitujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jϩubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jdelay()}j j5sbaj }(j]j]j]j]j]ujjj j2ubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.delayujj j j/ubaj }(j]j]j]j]j]skip_section_numberujj j j,ubaj }(j]j]j]j]j]ujj j jϩubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j set_timer()}j jbsbaj }(j]j]j]j]j]ujjj j_ubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.set_timerujj j j\ubaj }(j]j]j]j]j]skip_section_numberujj j jYubaj }(j]j]j]j]j]ujj j jϩubj )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(jh:j]jClock}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.Clockujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j Clock.tick()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.Clock.tickujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jClock.tick_busy_loop()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijf anchorname!#pygame.time.Clock.tick_busy_loopujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jݪubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jClock.get_time()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.Clock.get_timeujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jClock.get_rawtime()}j j@sbaj }(j]j]j]j]j]ujjj j=ubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.Clock.get_rawtimeujj j j:ubaj }(j]j]j]j]j]skip_section_numberujj j j7ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jClock.get_fps()}j jmsbaj }(j]j]j]j]j]ujjj jjubaj }(j]j]j]j]j]internalrefurijf anchorname#pygame.time.Clock.get_fpsujj j jgubaj }(j]j]j]j]j]skip_section_numberujj j jdubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jϩubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj1j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame._sdl2.touch}j jsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurij1 anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_num_devices()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurij1 anchorname##pygame._sdl2.touch.get_num_devicesujj j jݫubaj }(j]j]j]j]j]skip_section_numberujj j jګubaj }(j]j]j]j]j]ujj j j׫ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_device()}j jsbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurij1 anchorname#pygame._sdl2.touch.get_deviceujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j j׫ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_num_fingers()}j j=sbaj }(j]j]j]j]j]ujjj j:ubaj }(j]j]j]j]j]internalrefurij1 anchorname##pygame._sdl2.touch.get_num_fingersujj j j7ubaj }(j]j]j]j]j]skip_section_numberujj j j4ubaj }(j]j]j]j]j]ujj j j׫ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j get_finger()}j jjsbaj }(j]j]j]j]j]ujjj jgubaj }(j]j]j]j]j]internalrefurij1 anchorname#pygame._sdl2.touch.get_fingerujj j jdubaj }(j]j]j]j]j]skip_section_numberujj j jaubaj }(j]j]j]j]j]ujj j j׫ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjEj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)}(j]jpygame.transform}j jsbajj jjj }(j]j](jj j ej]j]j]ujNjNj jubaj }(j]j]j]j]j]internalrefurijE anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jflip()}j jԬsbaj }(j]j]j]j]j]ujjj jѬubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.flipujj j jάubaj }(j]j]j]j]j]skip_section_numberujj j jˬubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jscale()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.scaleujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j scale_by()}j j.sbaj }(j]j]j]j]j]ujjj j+ubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.scale_byujj j j(ubaj }(j]j]j]j]j]skip_section_numberujj j j%ubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jrotate()}j j[sbaj }(j]j]j]j]j]ujjj jXubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.rotateujj j jUubaj }(j]j]j]j]j]skip_section_numberujj j jRubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j rotozoom()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.rotozoomujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j scale2x()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.scale2xujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j smoothscale()}j jsbaj }(j]j]j]j]j]ujjj j߭ubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.smoothscaleujj j jܭubaj }(j]j]j]j]j]skip_section_numberujj j j٭ubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jsmoothscale_by()}j jsbaj }(j]j]j]j]j]ujjj j ubaj }(j]j]j]j]j]internalrefurijE anchorname #pygame.transform.smoothscale_byujj j j ubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jget_smoothscale_backend()}j j<sbaj }(j]j]j]j]j]ujjj j9ubaj }(j]j]j]j]j]internalrefurijE anchorname)#pygame.transform.get_smoothscale_backendujj j j6ubaj }(j]j]j]j]j]skip_section_numberujj j j3ubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jset_smoothscale_backend()}j jisbaj }(j]j]j]j]j]ujjj jfubaj }(j]j]j]j]j]internalrefurijE anchorname)#pygame.transform.set_smoothscale_backendujj j jcubaj }(j]j]j]j]j]skip_section_numberujj j j`ubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]jchop()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.chopujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j laplacian()}j jîsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.laplacianujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]javerage_surfaces()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname"#pygame.transform.average_surfacesujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]javerage_color()}j jsbaj }(j]j]j]j]j]ujjj jubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.average_colorujj j jubaj }(j]j]j]j]j]skip_section_numberujj j jubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j grayscale()}j jJsbaj }(j]j]j]j]j]ujjj jGubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.grayscaleujj j jDubaj }(j]j]j]j]j]skip_section_numberujj j jAubaj }(j]j]j]j]j]ujj j jȬubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)}(jh:j]j threshold()}j jwsbaj }(j]j]j]j]j]ujjj jtubaj }(j]j]j]j]j]internalrefurijE anchorname#pygame.transform.thresholdujj j jqubaj }(j]j]j]j]j]skip_section_numberujj j jnubaj }(j]j]j]j]j]ujj j jȬubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjBj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j-Pygame Tutorials - Camera Module Introduction}j jsbaj }(j]j]j]j]j]internalrefurijB anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jCamera Module Introduction}j jկsbaj }(j]j]j]j]j]internalrefurijB anchorname#camera-module-introductionujj j jүubaj }(j]j]j]j]j]ujj j jϯubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jImport and Init}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname#import-and-initujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]jCapturing a Single Image}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname#capturing-a-single-imageujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jListing Connected Cameras}j j8sbaj }(j]j]j]j]j]internalrefurijB anchorname#listing-connected-camerasujj j j5ubaj }(j]j]j]j]j]ujj j j2ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j]j )}(jh:j]jUsing Camera Controls}j j[sbaj }(j]j]j]j]j]internalrefurijB anchorname#using-camera-controlsujj j jXubaj }(j]j]j]j]j]ujj j jUubaj }(j]j]j]j]j]ujj j j/ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jCapturing a Live Stream}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname#capturing-a-live-streamujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]jBasic Computer Vision}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname#basic-computer-visionujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j Colorspaces}j jͰsbaj }(j]j]j]j]j]internalrefurijB anchorname #colorspacesujj j jʰubaj }(j]j]j]j]j]ujj j jǰubaj }(j]j]j]j]j]ujj j jİubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Thresholding}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname #thresholdingujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jİubj )}(jh:j]j )}(jh:j]j )}(jh:j]jUsing the Mask Module}j jsbaj }(j]j]j]j]j]internalrefurijB anchorname#using-the-mask-moduleujj j jubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jİubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jϯubej }(j]j]j]j]j]ujj j j̯ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjUj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j-Pygame Tutorials - Line By Line Chimp Example}j jcsbaj }(j]j]j]j]j]internalrefurijU anchornameh:ujj j j`ubaj }(j]j]j]j]j]ujj j j]ubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jLine By Line Chimp}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname#line-by-line-chimpujj j jubaj }(j]j]j]j]j]ujj j j|ubj )}(jh:j](j )}(j]jh:jj j }(j]j]j]j]j]j jUj ]N tut/chimp.pyaj ]jaj Jj Nj j j j Kj j ]ujKjA/home/runner/work/pygame/pygame/docs/reST/tut/ChimpLineByLine.rstj jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Introduction}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname #introductionujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jImport Modules}j jԱsbaj }(j]j]j]j]j]internalrefurijU anchorname#import-modulesujj j jѱubaj }(j]j]j]j]j]ujj j jαubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jLoading Resources}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname#loading-resourcesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jGame Object Classes}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname#game-object-classesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jInitialize Everything}j j=sbaj }(j]j]j]j]j]internalrefurijU anchorname#initialize-everythingujj j j:ubaj }(j]j]j]j]j]ujj j j7ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jCreate The Background}j j`sbaj }(j]j]j]j]j]internalrefurijU anchorname#create-the-backgroundujj j j]ubaj }(j]j]j]j]j]ujj j jZubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j$Put Text On The Background, Centered}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname$#put-text-on-the-background-centeredujj j jubaj }(j]j]j]j]j]ujj j j}ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j+Display The Background While Setup Finishes}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname,#display-the-background-while-setup-finishesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jPrepare Game Object}j jɲsbaj }(j]j]j]j]j]internalrefurijU anchorname#prepare-game-objectujj j jƲubaj }(j]j]j]j]j]ujj j jòubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Main Loop}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname #main-loopujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jHandle All Input Events}j jsbaj }(j]j]j]j]j]internalrefurijU anchorname#handle-all-input-eventsujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jUpdate the Sprites}j j2sbaj }(j]j]j]j]j]internalrefurijU anchorname#update-the-spritesujj j j/ubaj }(j]j]j]j]j]ujj j j,ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jDraw The Entire Scene}j jUsbaj }(j]j]j]j]j]internalrefurijU anchorname#draw-the-entire-sceneujj j jRubaj }(j]j]j]j]j]ujj j jOubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Game Over}j jxsbaj }(j]j]j]j]j]internalrefurijU anchorname #game-overujj j juubaj }(j]j]j]j]j]ujj j jrubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j j|ubej }(j]j]j]j]j]ujj j jyubaj }(j]j]j]j]j]ujj j j]ubej }(j]j]j]j]j]ujj j jZubaj }(j]j]j]j]j]ujj ubj>j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j(Pygame Tutorials - Setting Display Modes}j jsbaj }(j]j]j]j]j]internalrefurij> anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jSetting Display Modes}j j۳sbaj }(j]j]j]j]j]internalrefurij> anchorname#setting-display-modesujj j jسubaj }(j]j]j]j]j]ujj j jճubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j Introduction}j jsbaj }(j]j]j]j]j]internalrefurij> anchorname #introductionujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jSetting Basics}j jsbaj }(j]j]j]j]j]internalrefurij> anchorname#setting-basicsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j How to Decide}j jAsbaj }(j]j]j]j]j]internalrefurij> anchorname#how-to-decideujj j j>ubaj }(j]j]j]j]j]ujj j j;ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Functions}j jdsbaj }(j]j]j]j]j]internalrefurij> anchorname #functionsujj j jaubaj }(j]j]j]j]j]ujj j j^ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jExamples}j jsbaj }(j]j]j]j]j]internalrefurij> anchorname #examplesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jճubej }(j]j]j]j]j]ujj j jҳubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj@j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j(Pygame Tutorials - Import and Initialize}j j˴sbaj }(j]j]j]j]j]internalrefurij@ anchornameh:ujj j jȴubaj }(j]j]j]j]j]ujj j jŴubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jImport and Initialize}j jsbaj }(j]j]j]j]j]internalrefurij@ anchorname#import-and-initializeujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jImport}j j sbaj }(j]j]j]j]j]internalrefurij@ anchorname#importujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jInit}j j-sbaj }(j]j]j]j]j]internalrefurij@ anchorname#initujj j j*ubaj }(j]j]j]j]j]ujj j j'ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jQuit}j jPsbaj }(j]j]j]j]j]internalrefurij@ anchorname#quitujj j jMubaj }(j]j]j]j]j]ujj j jJubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jŴubej }(j]j]j]j]j]ujj j j´ubaj }(j]j]j]j]j]ujj ubj-j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jMaking Games With Pygame}j jsbaj }(j]j]j]j]j]internalrefurij- anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jMaking Games With Pygame}j jsbaj }(j]j]j]j]j]internalrefurij- anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(j]jh:jj j }(j]j]j]j]j]j j-j ](Ntut/tom_games2Ntut/tom_games3Ntut/tom_games4Ntut/tom_games5Ntut/tom_games6ej ](j׵jٵj۵jݵjߵej Jj Nj j j j Kj j ]ujK j;/home/runner/work/pygame/pygame/docs/reST/tut/MakeGames.rstj jʵubj )}(jh:j]j )}(jh:j]j )}(jh:j]jTable of Contents}j jsbaj }(j]j]j]j]j]internalrefurij- anchorname#table-of-contentsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jʵubj )}(jh:j]j )}(jh:j]j )}(jh:j]j1. Introduction}j j sbaj }(j]j]j]j]j]internalrefurij- anchorname #introductionujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jʵubj )}(jh:j]j )}(jh:j]j )}(jh:j]j1.1. A note on coding styles}j j0sbaj }(j]j]j]j]j]internalrefurij- anchorname#a-note-on-coding-stylesujj j j-ubaj }(j]j]j]j]j]ujj j j*ubaj }(j]j]j]j]j]ujj j jʵubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjoj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j0Pygame Tutorials - Help! How Do I Move An Image?}j jtsbaj }(j]j]j]j]j]internalrefurijo anchornameh:ujj j jqubaj }(j]j]j]j]j]ujj j jnubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jHelp! How Do I Move An Image?}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#help-how-do-i-move-an-imageujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jJust Pixels On The Screen}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#just-pixels-on-the-screenujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jLet's Go Back A Step}j jֶsbaj }(j]j]j]j]j]internalrefurijo anchorname#let-s-go-back-a-stepujj j jӶubaj }(j]j]j]j]j]ujj j jжubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jMaking The Hero Move}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#making-the-hero-moveujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jCreating A Map}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#creating-a-mapujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jMaking The Hero Move (Take 2)}j j?sbaj }(j]j]j]j]j]internalrefurijo anchorname#making-the-hero-move-take-2ujj j j<ubaj }(j]j]j]j]j]ujj j j9ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jDefinition: "blit"}j jbsbaj }(j]j]j]j]j]internalrefurijo anchorname#definition-blitujj j j_ubaj }(j]j]j]j]j]ujj j j\ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j!Going From The List To The Screen}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname"#going-from-the-list-to-the-screenujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jScreen Coordinates}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#screen-coordinatesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jChanging The Background}j j˷sbaj }(j]j]j]j]j]internalrefurijo anchorname#changing-the-backgroundujj j jȷubaj }(j]j]j]j]j]ujj j jŷubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jSmooth Movement}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#smooth-movementujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jSo, What Next?}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname #so-what-nextujj j jubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jFirst, The Mystery Functions}j j4sbaj }(j]j]j]j]j]internalrefurijo anchorname#first-the-mystery-functionsujj j j1ubaj }(j]j]j]j]j]ujj j j.ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jHandling Some Input}j jWsbaj }(j]j]j]j]j]internalrefurijo anchorname#handling-some-inputujj j jTubaj }(j]j]j]j]j]ujj j jQubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jMoving Multiple Images}j jzsbaj }(j]j]j]j]j]internalrefurijo anchorname#moving-multiple-imagesujj j jwubaj }(j]j]j]j]j]ujj j jtubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jPutting It All Together}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#putting-it-all-togetherujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j!Preparing for Improved User Input}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname"#preparing-for-improved-user-inputujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jAdding the User Input}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname#adding-the-user-inputujj j jubaj }(j]j]j]j]j]ujj j jݸubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j%Putting it all Together One More time}j jsbaj }(j]j]j]j]j]internalrefurijo anchorname&#putting-it-all-together-one-more-timeujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jYou Are On Your Own From Here}j j)sbaj }(j]j]j]j]j]internalrefurijo anchorname#you-are-on-your-own-from-hereujj j j&ubaj }(j]j]j]j]j]ujj j j#ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jnubej }(j]j]j]j]j]ujj j jkubaj }(j]j]j]j]j]ujj ubjGj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j Pygame Intro}j jmsbaj }(j]j]j]j]j]internalrefurijG anchornameh:ujj j jjubaj }(j]j]j]j]j]ujj j jgubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jPython Pygame Introduction}j jsbaj }(j]j]j]j]j]internalrefurijG anchorname#python-pygame-introductionujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jHISTORY}j jsbaj }(j]j]j]j]j]internalrefurijG anchorname#historyujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jTASTE}j jϹsbaj }(j]j]j]j]j]internalrefurijG anchorname#tasteujj j j̹ubaj }(j]j]j]j]j]ujj j jɹubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jPYTHON AND GAMING}j jsbaj }(j]j]j]j]j]internalrefurijG anchorname#python-and-gamingujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]jCLOSING}j jsbaj }(j]j]j]j]j]internalrefurijG anchorname#closingujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jPygame Modules Overview}j j5sbaj }(j]j]j]j]j]internalrefurijG anchorname#pygame-modules-overviewujj j j2ubaj }(j]j]j]j]j]ujj j j/ubaj }(j]j]j]j]j]ujj j j,ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jgubej }(j]j]j]j]j]ujj j jdubaj }(j]j]j]j]j]ujj ubjXj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j-Pygame Tutorials - Sprite Module Introduction}j jsbaj }(j]j]j]j]j]internalrefurijX anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jSprite Module Introduction}j jsbaj }(j]j]j]j]j]internalrefurijX anchorname#sprite-module-introductionujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jHistory Lesson}j jĺsbaj }(j]j]j]j]j]internalrefurijX anchorname#history-lessonujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j The Classes}j jsbaj }(j]j]j]j]j]internalrefurijX anchorname #the-classesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jThe Sprite Class}j j sbaj }(j]j]j]j]j]internalrefurijX anchorname#the-sprite-classujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jThe Group Class}j j-sbaj }(j]j]j]j]j]internalrefurijX anchorname#the-group-classujj j j*ubaj }(j]j]j]j]j]ujj j j'ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jMixing Them Together}j jPsbaj }(j]j]j]j]j]internalrefurijX anchorname#mixing-them-togetherujj j jMubaj }(j]j]j]j]j]ujj j jJubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jThe Many Group Types}j jssbaj }(j]j]j]j]j]internalrefurijX anchorname#the-many-group-typesujj j jpubaj }(j]j]j]j]j]ujj j jmubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jThe Rendering Groups}j jsbaj }(j]j]j]j]j]internalrefurijX anchorname#the-rendering-groupsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jCollision Detection}j jsbaj }(j]j]j]j]j]internalrefurijX anchorname#collision-detectionujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jCommon Problems}j jܻsbaj }(j]j]j]j]j]internalrefurijX anchorname#common-problemsujj j jٻubaj }(j]j]j]j]j]ujj j jֻubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](jExtending Your Own Classes }j jsbjemphasis)}(j]j (Advanced)}j jsbaj *(Advanced)*jjj }(j]j]j]j]j]ujNjNj jubej }(j]j]j]j]j]internalrefurijX anchorname$#extending-your-own-classes-advancedujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j j|ubaj }(j]j]j]j]j]ujj ubj%j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j)Pygame Tutorials - Surfarray Introduction}j jSsbaj }(j]j]j]j]j]internalrefurij% anchornameh:ujj j jPubaj }(j]j]j]j]j]ujj j jMubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jSurfarray Introduction}j jrsbaj }(j]j]j]j]j]internalrefurij% anchorname#surfarray-introductionujj j joubaj }(j]j]j]j]j]ujj j jlubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j Introduction}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname #introductionujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jNumPy}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname#numpyujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jImport Surfarray}j jؼsbaj }(j]j]j]j]j]internalrefurij% anchorname#import-surfarrayujj j jռubaj }(j]j]j]j]j]ujj j jҼubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jSurfarray Introduction}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jExamples}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname #examplesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jSurface Locking}j jAsbaj }(j]j]j]j]j]internalrefurij% anchorname#surface-lockingujj j j>ubaj }(j]j]j]j]j]ujj j j;ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Transparency}j jdsbaj }(j]j]j]j]j]internalrefurij% anchorname #transparencyujj j jaubaj }(j]j]j]j]j]ujj j j^ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jOther Surfarray Functions}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname#other-surfarray-functionsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jMore Advanced NumPy}j jsbaj }(j]j]j]j]j]internalrefurij% anchorname#more-advanced-numpyujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Graduation}j jͽsbaj }(j]j]j]j]j]internalrefurij% anchorname #graduationujj j jʽubaj }(j]j]j]j]j]ujj j jǽubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jlubej }(j]j]j]j]j]ujj j jiubaj }(j]j]j]j]j]ujj j jMubej }(j]j]j]j]j]ujj j jJubaj }(j]j]j]j]j]ujj ubj2j )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]jpygame/examples/chimp.py}j jsbaj }(j]j]j]j]j]internalrefurij2 anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjkj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j j<sbaj }(j]j]j]j]j]internalrefurijk anchornameh:ujj j j9ubaj }(j]j]j]j]j]ujj j j6ubaj }(j]j]j]j]j]ujj j j3ubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j j^sbjrumia0601@gmail.com}j j^sbej }(j]j]j]j]j]internalrefurijk anchorname#contact-rumia0601-gmail-comujj j j[ubaj }(j]j]j]j]j]ujj j jXubaj }(j]j]j]j]j]ujj j j3ubj )}(jh:j]j )}(jh:j]j )}(jh:j]jProlog? Why Pygame?}j jsbaj }(j]j]j]j]j]internalrefurijk anchorname#prolog-why-pygameujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j3ubej }(j]j]j]j]j]ujj ubj3j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurij3 anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jӾsbjrumia0601@gmail.com}j jӾsbej }(j]j]j]j]j]internalrefurij3 anchorname#contact-rumia0601-gmail-comujj j jоubaj }(j]j]j]j]j]ujj j j;ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jBasic TEMPLATE and OUTPUT}j jsbaj }(j]j]j]j]j]internalrefurij3 anchorname#basic-template-and-outputujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j–Into Event-driven and GUI}j jsbaj }(j]j]j]j]j]internalrefurij3 anchorname#into-event-driven-and-guiujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubjcj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jIsbaj }(j]j]j]j]j]internalrefurijc anchornameh:ujj j jFubaj }(j]j]j]j]j]ujj j jCubaj }(j]j]j]j]j]ujj j j@ubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jksbjrumia0601@gmail.com}j jksbej }(j]j]j]j]j]internalrefurijc anchorname#contact-rumia0601-gmail-comujj j jhubaj }(j]j]j]j]j]ujj j jeubaj }(j]j]j]j]j]ujj j j@ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Basic PROCESS}j jsbaj }(j]j]j]j]j]internalrefurijc anchorname#basic-processujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j@ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j-Setting for Animation}j jsbaj }(j]j]j]j]j]internalrefurijc anchorname#setting-for-animationujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j@ubej }(j]j]j]j]j]ujj ubjlj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurijl anchornameh:ujj j j޿ubaj }(j]j]j]j]j]ujj j jۿubaj }(j]j]j]j]j]ujj j jؿubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurijl anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jؿubj )}(jh:j]j )}(jh:j]j )}(jh:j]j Basic INPUT}j j*sbaj }(j]j]j]j]j]internalrefurijl anchorname #basic-inputujj j j'ubaj }(j]j]j]j]j]ujj j j$ubaj }(j]j]j]j]j]ujj j jؿubj )}(jh:j]j )}(jh:j]j )}(jh:j]j-New Input is new Event}j jMsbaj }(j]j]j]j]j]internalrefurijl anchorname#new-input-is-new-eventujj j jJubaj }(j]j]j]j]j]ujj j jGubaj }(j]j]j]j]j]ujj j jؿubej }(j]j]j]j]j]ujj ubjj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jysbaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j jvubaj }(j]j]j]j]j]ujj j jsubaj }(j]j]j]j]j]ujj j jpubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jpubj )}(jh:j]j )}(jh:j]j )}(jh:j]j)with Advanced PROCESS - Functionalization}j jsbaj }(j]j]j]j]j]internalrefurij anchorname(#with-advanced-process-functionalizationujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jpubej }(j]j]j]j]j]ujj ubjaj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurija anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurija anchorname#contact-rumia0601-gmail-comujj j j ubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j with Advanced OUTPUT – Buttons}j j7sbaj }(j]j]j]j]j]internalrefurija anchorname#with-advanced-output-buttonsujj j j4ubaj }(j]j]j]j]j]ujj j j1ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubj'j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jcsbaj }(j]j]j]j]j]internalrefurij' anchornameh:ujj j j`ubaj }(j]j]j]j]j]ujj j j]ubaj }(j]j]j]j]j]ujj j jZubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij' anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jZubj )}(jh:j]j )}(jh:j]j )}(jh:j]jand plus alpha}j jsbaj }(j]j]j]j]j]internalrefurij' anchorname#and-plus-alphaujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jZubej }(j]j]j]j]j]ujj ubj"j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurij" anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij" anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jEpilog}j j!sbaj }(j]j]j]j]j]internalrefurij" anchorname#epilogujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubjYj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jMsbaj }(j]j]j]j]j]internalrefurijY anchornameh:ujj j jJubaj }(j]j]j]j]j]ujj j jGubaj }(j]j]j]j]j]ujj j jDubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j josbjrumia0601@gmail.com}j josbej }(j]j]j]j]j]internalrefurijY anchorname#contact-rumia0601-gmail-comujj j jlubaj }(j]j]j]j]j]ujj j jiubaj }(j]j]j]j]j]ujj j jDubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 프롤로그}j jsbaj }(j]j]j]j]j]internalrefurijY anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jDubj )}(jh:j]j )}(jh:j]j )}(jh:j]j– 왜 하필 파이게임?}j jsbaj }(j]j]j]j]j]internalrefurijY anchorname#id2ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jDubej }(j]j]j]j]j]ujj ubj6j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurij6 anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij6 anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j기본 형식과 기초 출력}j j.sbaj }(j]j]j]j]j]internalrefurij6 anchorname#id1ujj j j+ubaj }(j]j]j]j]j]ujj j j(ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j1–이벤트 기반과 GUI 기반으로의 입문}j jQsbaj }(j]j]j]j]j]internalrefurij6 anchorname#guiujj j jNubaj }(j]j]j]j]j]ujj j jKubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubj$j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j j}sbaj }(j]j]j]j]j]internalrefurij$ anchornameh:ujj j jzubaj }(j]j]j]j]j]ujj j jwubaj }(j]j]j]j]j]ujj j jtubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij$ anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jtubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 기초 처리}j jsbaj }(j]j]j]j]j]internalrefurij$ anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jtubj )}(jh:j]j )}(jh:j]j )}(jh:j]j%-화면이 움직이기 위한 조건}j jsbaj }(j]j]j]j]j]internalrefurij$ anchorname#id2ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jtubej }(j]j]j]j]j]ujj ubjHj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurijH anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j j7sbjrumia0601@gmail.com}j j7sbej }(j]j]j]j]j]internalrefurijH anchorname#contact-rumia0601-gmail-comujj j j4ubaj }(j]j]j]j]j]ujj j j1ubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 기초 입력}j j^sbaj }(j]j]j]j]j]internalrefurijH anchorname#id1ujj j j[ubaj }(j]j]j]j]j]ujj j jXubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j(-새로운 입력은 새로운 이벤트}j jsbaj }(j]j]j]j]j]internalrefurijH anchorname#id2ujj j j~ubaj }(j]j]j]j]j]ujj j j{ubaj }(j]j]j]j]j]ujj j j ubej }(j]j]j]j]j]ujj ubj:j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurij: anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij: anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j#그리고 심화 처리 - 함수화}j jsbaj }(j]j]j]j]j]internalrefurij: anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubj j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j j"sbaj }(j]j]j]j]j]internalrefurij  anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jDsbjrumia0601@gmail.com}j jDsbej }(j]j]j]j]j]internalrefurij  anchorname#contact-rumia0601-gmail-comujj j jAubaj }(j]j]j]j]j]ujj j j>ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j"그리고 심화 출력 – 버튼}j jksbaj }(j]j]j]j]j]internalrefurij  anchorname#id1ujj j jhubaj }(j]j]j]j]j]ujj j jeubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubj]j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j jsbaj }(j]j]j]j]j]internalrefurij] anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j jsbjrumia0601@gmail.com}j jsbej }(j]j]j]j]j]internalrefurij] anchorname#contact-rumia0601-gmail-comujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j그리고 조금 더!}j jsbaj }(j]j]j]j]j]internalrefurij] anchorname#id1ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubj=j )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]jAuthor: Youngwook Kim (Korean)}j j sbaj }(j]j]j]j]j]internalrefurij= anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j](j Contact: }j j.sbjrumia0601@gmail.com}j j.sbej }(j]j]j]j]j]internalrefurij= anchorname#contact-rumia0601-gmail-comujj j j+ubaj }(j]j]j]j]j]ujj j j(ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 에필로그}j jUsbaj }(j]j]j]j]j]internalrefurij= anchorname#id1ujj j jRubaj }(j]j]j]j]j]ujj j jOubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj ubjLj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j한국어 튜토리얼}j jsbaj }(j]j]j]j]j]internalrefurijL anchornameh:ujj j j~ubaj }(j]j]j]j]j]ujj j j{ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j한국어 튜토리얼}j jsbaj }(j]j]j]j]j]internalrefurijL anchorname#id2ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j{ubej }(j]j]j]j]j]ujj j jxubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jNewbie Guide to Pygame}j jsbaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jA Newbie Guide to pygame}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#a-newbie-guide-to-pygameujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j"Get comfortable working in Python.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname"#get-comfortable-working-in-pythonujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j0Recognize which parts of pygame you really need.}j j:sbaj }(j]j]j]j]j]internalrefurij anchorname0#recognize-which-parts-of-pygame-you-really-needujj j j7ubaj }(j]j]j]j]j]ujj j j4ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jKnow what a surface is.}j j]sbaj }(j]j]j]j]j]internalrefurij anchorname#know-what-a-surface-isujj j jZubaj }(j]j]j]j]j]ujj j jWubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jUse Surface.convert().}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#use-surface-convertujj j j}ubaj }(j]j]j]j]j]ujj j jzubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j3Be wary of outdated, obsolete, and optional advice.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname1#be-wary-of-outdated-obsolete-and-optional-adviceujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jThere is NO rule six.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#there-is-no-rule-sixujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j$Don't get distracted by side issues.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname$#don-t-get-distracted-by-side-issuesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jRects are your friends.}j j sbaj }(j]j]j]j]j]internalrefurij anchorname#rects-are-your-friendsujj j j ubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j4Don't bother with pixel-perfect collision detection.}j j/sbaj }(j]j]j]j]j]internalrefurij anchorname4#don-t-bother-with-pixel-perfect-collision-detectionujj j j,ubaj }(j]j]j]j]j]ujj j j)ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jManaging the event subsystem.}j jRsbaj }(j]j]j]j]j]internalrefurij anchorname#managing-the-event-subsystemujj j jOubaj }(j]j]j]j]j]ujj j jLubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jColorkey vs. Alpha.}j jusbaj }(j]j]j]j]j]internalrefurij anchorname#colorkey-vs-alphaujj j jrubaj }(j]j]j]j]j]ujj j joubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j2Software architecture, design patterns, and games.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname0#software-architecture-design-patterns-and-gamesujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]jDo things the pythony way.}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#do-things-the-pythony-wayujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj!j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jRevision: Pygame fundamentals}j jsbaj }(j]j]j]j]j]internalrefurij! anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j 2. Revision: Pygame fundamentals}j jsbaj }(j]j]j]j]j]internalrefurij! anchorname #makegames-2ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j2.1. The basic Pygame game}j j>sbaj }(j]j]j]j]j]internalrefurij! anchorname#the-basic-pygame-gameujj j j;ubaj }(j]j]j]j]j]ujj j j8ubaj }(j]j]j]j]j]ujj j j5ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j2.2. Basic Pygame objects}j jasbaj }(j]j]j]j]j]internalrefurij! anchorname#basic-pygame-objectsujj j j^ubaj }(j]j]j]j]j]ujj j j[ubaj }(j]j]j]j]j]ujj j j5ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 2.3. Blitting}j jsbaj }(j]j]j]j]j]internalrefurij! anchorname #blittingujj j jubaj }(j]j]j]j]j]ujj j j~ubaj }(j]j]j]j]j]ujj j j5ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j2.4. The event loop}j jsbaj }(j]j]j]j]j]internalrefurij! anchorname#the-event-loopujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j5ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 2.5. Ta-da!}j jsbaj }(j]j]j]j]j]internalrefurij! anchorname#ta-daujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j j5ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjSj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jKicking things off}j jsbaj }(j]j]j]j]j]internalrefurijS anchornameh:ujj j j ubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j3. Kicking things off}j j-sbaj }(j]j]j]j]j]internalrefurijS anchorname #makegames-3ujj j j*ubaj }(j]j]j]j]j]ujj j j'ubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j)3.1. The first lines, and loading modules}j jMsbaj }(j]j]j]j]j]internalrefurijS anchorname$#the-first-lines-and-loading-modulesujj j jJubaj }(j]j]j]j]j]ujj j jGubaj }(j]j]j]j]j]ujj j jDubj )}(jh:j]j )}(jh:j]j )}(jh:j]j 3.2. Resource handling functions}j jpsbaj }(j]j]j]j]j]internalrefurijS anchorname#resource-handling-functionsujj j jmubaj }(j]j]j]j]j]ujj j jjubaj }(j]j]j]j]j]ujj j jDubej }(j]j]j]j]j]ujj j j'ubej }(j]j]j]j]j]ujj j j$ubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubjj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jGame object classes}j jsbaj }(j]j]j]j]j]internalrefurij anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j4. Game object classes}j jsbaj }(j]j]j]j]j]internalrefurij anchorname #makegames-4ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j4.1. A simple ball class}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#a-simple-ball-classujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j4.1.1. Diversion 1: Sprites}j jsbaj }(j]j]j]j]j]internalrefurij anchorname#diversion-1-spritesujj j jubaj }(j]j]j]j]j]ujj j j ubaj }(j]j]j]j]j]ujj j j ubj )}(jh:j]j )}(jh:j]j )}(jh:j]j"4.1.2. Diversion 2: Vector physics}j j6sbaj }(j]j]j]j]j]internalrefurij anchorname#diversion-2-vector-physicsujj j j3ubaj }(j]j]j]j]j]ujj j j0ubaj }(j]j]j]j]j]ujj j j ubej }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj ubj\j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jUser-controllable objects}j jsbaj }(j]j]j]j]j]internalrefurij\ anchornameh:ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j5. User-controllable objects}j jsbaj }(j]j]j]j]j]internalrefurij\ anchorname #makegames-5ujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j5.1. A simple bat class}j jsbaj }(j]j]j]j]j]internalrefurij\ anchorname#a-simple-bat-classujj j jubaj }(j]j]j]j]j]ujj j jubj )}(jh:j]j )}(jh:j]j )}(jh:j]j )}(jh:j]j!5.1.1. Diversion 3: Pygame events}j jsbaj }(j]j]j]j]j]internalrefurij\ anchorname#diversion-3-pygame-eventsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jubej }(j]j]j]j]j]ujj j j}ubaj }(j]j]j]j]j]ujj ubj,j )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]jPutting it all together}j j5sbaj }(j]j]j]j]j]internalrefurij, anchornameh:ujj j j2ubaj }(j]j]j]j]j]ujj j j/ubj )}(jh:j]j )}(jh:j](j )}(jh:j]j )}(jh:j]j6. Putting it all together}j jTsbaj }(j]j]j]j]j]internalrefurij, anchorname #makegames-6ujj j jQubaj }(j]j]j]j]j]ujj j jNubj )}(jh:j](j )}(jh:j]j )}(jh:j]j )}(jh:j]j6.1. Let the ball hit sides}j jtsbaj }(j]j]j]j]j]internalrefurij, anchorname#let-the-ball-hit-sidesujj j jqubaj }(j]j]j]j]j]ujj j jnubaj }(j]j]j]j]j]ujj j jkubj )}(jh:j]j )}(jh:j]j )}(jh:j]j6.2. Let the ball hit bats}j jsbaj }(j]j]j]j]j]internalrefurij, anchorname#let-the-ball-hit-batsujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jkubj )}(jh:j]j )}(jh:j]j )}(jh:j]j6.3. The Finished product}j jsbaj }(j]j]j]j]j]internalrefurij, anchorname#the-finished-productujj j jubaj }(j]j]j]j]j]ujj j jubaj }(j]j]j]j]j]ujj j jkubej }(j]j]j]j]j]ujj j jNubej }(j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rees(jbj-j0numbered_toctrees domaindata}(c}( root_symbolsphinx.domains.c._symbolSymbol)}(j N siblingAboveN siblingBelowNidentN declarationNdocnameNjNisRedeclaration_children_by_name}(pgExc_SDLErrorjg)}(j jhjjNjkNjlsphinx.domains.c._ast ASTIdentifier)}(namejr is_anonymousubjmjuASTDeclaration)}( objectTypemember directiveTypevarjmjuASTTypeWithInit)}(typejuASTType)}( declSpecsju ASTDeclSpecs)}(outerj leftSpecsjuASTDeclSpecsSimple)}(storageN threadLocalNhNrestrictvolatileconstattrssphinx.util.cfamilyASTAttributeList)}j]sbub rightSpecsj)}(jNjNhNjjjjj)}j]sbuballSpecsj)}(jNjNhNjjjjj)}j]sbubtrailingTypeSpecjuASTTrailingTypeSpecName)}(prefixN nestedNameju ASTNestedName)}(j]jw)}(jzPyObjectj{ubarootedubububdecljuASTDeclaratorPtr)}(nextjuASTDeclaratorNameParam)}(declIdj)}(j]jxajubarrayOps]paramNubjjjjj)}j]sbububinitNub semicolonsymboljsenumeratorScopedSymbolN_newest_id_cachec.pgExc_SDLErrorubjnjDjKjojp}_children_by_docname}_anon_childrenubpg_mod_autoinitjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jfunctionjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjjuASTTrailingTypeSpecFundamental)}j]intasbubjj)}(jj)}(j]jajubj]jju ASTParameters)}(args]juASTFunctionParameter)}(argj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(j]jw)}(jzmodnamej{ubajubj]jNubjjjjj)}j]sbububjNubellipsisubajj)}j]sbubububjjjjNjc.pg_mod_autoinitubjnjDjKjojp}j4jg)}(j jjjNjkNjlj2jmj})}(j functionParamjNjmjjjj?jNjNubjnjDjKjojp}j}jubsj}jD}j4j?ssjubpg_mod_autoquitjg)}(j jhjjNjkNjljw)}(jzjJj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jMajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(j]jw)}(jzj4j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjKjNjc.pg_mod_autoquitubjnjDjKjojp}j4jg)}(j jKjjNjkNjljjmj})}(jjCjNjmjrjjjjNjNubjnjDjKjojp}j}jubsj}jD}j4jssjubpg_RegisterQuitjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]voidasbubjjuASTDeclaratorParen)}(innerj)}(jj)}(jj)}(j]jw)}(jzfj{ubajubj]jNubjjjjj)}j]sbubjj)}(jNj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]voidasbubjj)}(jNj]jNububjNubj9ubajj)}j]sbububububjNubj9ubajj)}j]sbubububjjjjNjc.pg_RegisterQuitubjnjDjKjojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj+jNjNubjnjDjKjojp}j}jubsj}jD}jj+ssjub pg_IntFromObjjg)}(j jhjjNjkNjljw)}(jzj5j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]j8ajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzobjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(jj)}(j]jw)}(jzvalj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjj6jNjc.pg_IntFromObjubjnjDjK%jojp}(jjg)}(j j6jjNjkNjljjmj})}(jjCjNjmj]jjjjNjNubjnjDjK%jojp}j}jubjjg)}(j j6jjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjK%jojp}j}jubuj}jD}(jjjjusjubpg_IntFromObjIndexjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzhAj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_IntFromObjIndexubjnjDjK+jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjkjNjNubjnjDjK+jojp}j}jubhAjg)}(j jjjNjkNjlj;jmj})}(jjCjNjmjjjjrjNjNubjnjDjK+jojp}j}jubjjg)}(j jjjNjkNjlj`jmj})}(jjCjNjmj>jjjyjNjNubjnjDjK+jojp}j}jubuj}jD}(jjkhAjrjjyusjubpg_TwoIntsFromObjjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(jj)}(j]jw)}(jzval1j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(jj)}(j]jw)}(jzv2j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_TwoIntsFromObjubjnjDjK2jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj-jNjNubjnjDjK2jojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj4jNjNubjnjDjK2jojp}j}jubj#jg)}(j jjjNjkNjlj!jmj})}(jjCjNjmjjjj;jNjNubjnjDjK2jojp}j}jubuj}jD}(jj-jj4j#j;usjubpg_FloatFromObjjg)}(j jhjjNjkNjljw)}(jzjEj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jHajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]floatasbubjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjFjNjc.pg_FloatFromObjubjnjDjK9jojp}(jjg)}(j jFjjNjkNjljjmj})}(jjCjNjmjmjjjjNjNubjnjDjK9jojp}j}jubjjg)}(j jFjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjK9jojp}j}jubuj}jD}(jjjjusjubpg_FloatFromObjIndexjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzhAj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]floatasbubjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_FloatFromObjIndexubjnjDjK@jojp}(jjg)}(j jjjNjkNjlj#jmj})}(jjCjNjmjjjjyjNjNubjnjDjK@jojp}j}jubhAjg)}(j jjjNjkNjljIjmj})}(jjCjNjmj)jjjjNjNubjnjDjK@jojp}j}jubjjg)}(j jjjNjkNjljnjmj})}(jjCjNjmjLjjjjNjNubjnjDjK@jojp}j}jubuj}jD}(jjyhAjjjusjubpg_TwoFloatsFromObjjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]floatasbubjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]floatasbubjj)}(jj)}(jj)}(j]jw)}(jzval2j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_TwoFloatsFromObjubjnjDjKGjojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj:jNjNubjnjDjKGjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjAjNjNubjnjDjKGjojp}j}jubj0jg)}(j jjjNjkNjlj.jmj})}(jjCjNjmj jjjHjNjNubjnjDjKGjojp}j}jubuj}jD}(jj:jjAj0jHusjubpg_UintFromObjjg)}(j jhjjNjkNjljw)}(jzjRj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jUajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzUint32j{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjSjNjc.pg_UintFromObjubjnjDjKNjojp}(jjg)}(j jSjjNjkNjljjmj})}(jjCjNjmjzjjjjNjNubjnjDjKNjojp}j}jubjjg)}(j jSjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjKNjojp}j}jubuj}jD}(jjjjusjubpg_UintFromObjIndexjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jz_indexj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_UintFromObjIndexubjnjDjKUjojp}(jjg)}(j jjjNjkNjlj4jmj})}(jjCjNjmjjjjjNjNubjnjDjKUjojp}j}jubj\jg)}(j jjjNjkNjljZjmj})}(jjCjNjmj:jjjjNjNubjnjDjKUjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmj^jjjjNjNubjnjDjKUjojp}j}jubuj}jD}(jjj\jjjusjubpg_RGBAFromObjjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzUint8j{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzRGBAj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pg_RGBAFromObjubjnjDjK\jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj+jNjNubjnjDjK\jojp}j}jubj!jg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj2jNjNubjnjDjK\jojp}j}jubuj}jD}(jj+j!j2usjub pg_bufferjg)}(j jhjjNjkNjljw)}(jzj<j{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjHjNubjj)}(jj)}(j]j?ajubj]jNububjjj=jNj c.pg_bufferubjnjDjKfjojp}(viewjg)}(j j=jjNjkNjljw)}(jzjUj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz Py_bufferj{ubajubububjj)}(jj)}(j]jXajubj]jNububjNubjjjVjNjc.pg_buffer.viewubjnjDjKhjojp}j}jubconsumerjg)}(j j=jjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pg_buffer.consumerubjnjDjKljojp}j}jubrelease_bufferjg)}(j j=jjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzpybuffer_releaseprocj{ubajubububjj)}(jj)}(j]jajubj]jNububjNubjjjjNjc.pg_buffer.release_bufferubjnjDjKpjojp}j}jubuj}jD}(jUjVjjjjusjubpgExc_BufferErrorjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgExc_BufferErrorubjnjDjKtjojp}j}jubpgBuffer_AsArrayInterfacejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjyj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzview_pj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgBuffer_AsArrayInterfaceubjnjDjKxjojp}jpjg)}(j jjjNjkNjljnjmj})}(jjCjNjmjIjjj}jNjNubjnjDjKxjojp}j}jubsj}jD}jpj}ssjubpgBuffer_AsArrayStructjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjyj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjpj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgBuffer_AsArrayStructubjnjDjK}jojp}jpjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjK}jojp}j}jubsj}jD}jpjssjubpgObject_GetBufferjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzj<j{ubajubububjj)}(jj)}(jj)}(j]jw)}(jz pg_view_pj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzflagsj{ubajubj]jNububjNubj9ubejj)}j]sbubububjjjjNjc.pgObject_GetBufferubjnjDjKjojp}(jjg)}(j jjjNjkNjlj>jmj})}(jjCjNjmjjjjjNjNubjnjDjKjojp}j}jubjkjg)}(j jjjNjkNjljijmj})}(jjCjNjmjDjjjjNjNubjnjDjKjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjpjjjjNjNubjnjDjKjojp}j}jubuj}jD}(jjjkjjjusjubpgBuffer_Releasejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz Pg_bufferj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjkj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgBuffer_ReleaseubjnjDjKjojp}jkjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj jNjNubjnjDjKjojp}j}jubsj}jD}jkj ssjubpgDict_AsBufferjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjkj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzdictj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzjj{ubajubj]jNububjNubj9ubejj)}j]sbubububjjjjNjc.pgDict_AsBufferubjnjDjKjojp}(jkjg)}(j jjjNjkNjljajmj})}(jjCjNjmj<jjjjNjNubjnjDjKjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjgjjjjNjNubjnjDjKjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjKjojp}j}jubuj}jD}(jkjjjjjusjubimport_pygame_basejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jajubj]jj)}(j ]jj)}j]sbubububjjjjNjc.import_pygame_baseubjnjDjKjojp}j}jubpg_GetDefaultWindowjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz SDL_Windowj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]voidasbubjj)}(jNj]jNububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pg_GetDefaultWindowubjnjDjKjojp}j}jubpg_SetDefaultWindowjg)}(j jhjjNjkNjljw)}(jzjXj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]j[ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzj$j{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzwinj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjYjNjc.pg_SetDefaultWindowubjnjDjKjojp}jjg)}(j jYjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjDjKjojp}j}jubsj}jD}jjssjubpg_GetDefaultWindowSurfacejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzpgSurfaceObjectj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]voidasbubjj)}(jNj]jNububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pg_GetDefaultWindowSurfaceubjnjDjKjojp}j}jubpg_SetDefaultWindowSurfacejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzscreenj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pg_SetDefaultWindowSurfaceubjnjDjKjojp}j`jg)}(j jjjNjkNjlj^jmj})}(jjCjNjmj9jjjjjNjNubjnjDjKjojp}j}jubsj}jD}j`jjssjubpgBufproxy_Typejg)}(j jhjjNjkNjljw)}(jzjtj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz PyTypeObjectj{ubajubububjj)}(jj)}(jj)}(j]jwajubj]jNubjjjjj)}j]sbububjNubjjjujNjc.pgBufproxy_TypeubjnjOjKjojp}j}jubpgBufproxy_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzxj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgBufproxy_CheckubjnjOjKjojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjOjKjojp}j}jubsj}jO}jjssjubpgBufproxy_Newjg)}(j jhjjNjkNjljw)}(jzj j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz getbufferprocj{ubajubububjj)}(jj)}(j]jw)}(jz get_bufferj{ubajubj]jNububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjj jNjc.pgBufproxy_NewubjnjOjKjojp}(jjg)}(j j jjNjkNjlj]jmj})}(jjCjNjmj8jjjjNjNubjnjOjKjojp}j}jubjjg)}(j j jjNjkNjljjmj})}(jjCjNjmjcjjjjNjNubjnjOjKjojp}j}jubuj}jO}(jjjjusjubpgBufproxy_GetParentjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgBufproxy_GetParentubjnjOjK$jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjOjK$jojp}j}jubsj}jO}jjssjubpgBufproxy_Tripjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgBufproxy_TripubjnjOjK*jojp}jjg)}(j jjjNjkNjlj[jmj})}(jjCjNjmj6jjjfjNjNubjnjOjK*jojp}j}jubsj}jO}jjfssjub pgColor_Typejg)}(j jhjjNjkNjljw)}(jzjpj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jsajubj]jNubjjjjj)}j]sbububjNubjjjqjNjc.pgColor_TypeubjnjVjKjojp}j}jub pgColor_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgColor_CheckubjnjVjKjojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjVjKjojp}j}jubsj}jV}jjssjub pgColor_Newjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(j]jw)}(jzrgbaj{ubajubj]juASTArray)}(staticjjjvlasizeNubajNububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNj c.pgColor_NewubjnjVjKjojp}jWjg)}(j jjjNjkNjljUjmj})}(jjCjNjmj2jjjhjNjNubjnjVjKjojp}j}jubsj}jV}jWjhssjubpgColor_NewLengthjg)}(j jhjjNjkNjljw)}(jzjrj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]juajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(j]jw)}(jzjWj{ubajubj]jZ)}(j]jjjj^j_NubajNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(j]jw)}(jzlengthj{ubajubj]jNububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjsjNjc.pgColor_NewLengthubjnjVjK jojp}(jWjg)}(j jsjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjVjK jojp}j}jubjjg)}(j jsjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjVjK jojp}j}jubuj}jV}(jWjjjusjubpgVidInfoObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]j ajubj]jNububjjjjNjc.pgVidInfoObjectubjnjIjKjojp}j}jubpgVidInfo_Typejg)}(j jhjjNjkNjljw)}(jzj"j{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]j%ajubj]jNubjjjjj)}j]sbububjNubjjj#jNjc.pgVidInfo_TypeubjnjIjKjojp}j}jubpgVidInfo_AsVidInfojg)}(j jhjjNjkNjljw)}(jzjUj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz SDL_VideoInfoj{ubajubububjj)}(jj)}(j]jXajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjVjNjc.pgVidInfo_AsVidInfoubjnjIjKjojp}jjg)}(j jVjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjIjKjojp}j}jubsj}jI}jjssjub pgVidInfo_Newjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjwj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzij{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgVidInfo_NewubjnjIjKjojp}jjg)}(j jjjNjkNjlj jmj})}(jjCjNjmjjjjjNjNubjnjIjKjojp}j}jubsj}jI}jjssjubpgVidInfo_Checkjg)}(j jhjjNjkNjljw)}(jzj&j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]j)ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj'jNjc.pgVidInfo_CheckubjnjIjK$jojp}jjg)}(j j'jjNjkNjljsjmj})}(jjCjNjmjNjjj~jNjNubjnjIjK$jojp}j}jubsj}jI}jj~ssjub pgEventObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNjc.pgEventObjectubjnj_jKjojp}jjg)}(j jjjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jNububjNubjjjjNjc.pgEventObject.typeubjnj_jKjojp}j}jubsj}j_}jjssjub pgEvent_Typejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNjc.pgEvent_Typeubjnj_jKjojp}j}jub pgEvent_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgEvent_Checkubjnj_jKjojp}jjg)}(j jjjNjkNjlj6jmj})}(jjCjNjmjjjjAjNjNubjnj_jKjojp}j}jubsj}j_}jjAssjub pgEvent_Newjg)}(j jhjjNjkNjljw)}(jzjKj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jNajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz SDL_Eventj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzeventj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjLjNj c.pgEvent_Newubjnj_jK$jojp}jjg)}(j jLjjNjkNjljjmj})}(jjCjNjmjxjjjjNjNubjnj_jK$jojp}j}jubsj}j_}jjssjub pgEvent_New2jg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzjj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgEvent_New2ubjnj_jK*jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj:jNjNubjnj_jK*jojp}j}jubjjg)}(j jjjNjkNjlj,jmj})}(jjCjNjmjjjjAjNjNubjnj_jK*jojp}j}jubuj}j_}(jj:jjAusjubpgEvent_FillUserEventjg)}(j jhjjNjkNjljw)}(jzjKj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jNajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzej{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjLjNjc.pgEvent_FillUserEventubjnj_jK1jojp}(jjg)}(j jLjjNjkNjljjmj})}(jjCjNjmjsjjjjNjNubjnj_jK1jojp}j}jubjjg)}(j jLjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnj_jK1jojp}j}jubuj}j_}(jjjjusjub pgFontObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNjc.pgFontObjectubjnj(jKjojp}j}jub pgFont_Typejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNj c.pgFont_Typeubjnj(jKjojp}j}jub pgFont_Newjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(j]jw)}(jzfilenamej{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]longasbubjj)}(jj)}(j]jw)}(jz font_indexj{ubajubj]jNububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNj c.pgFont_Newubjnj(jKjojp}(jgjg)}(j jjjNjkNjljejmj})}(jjCjNjmjCjjjjNjNubjnj(jKjojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjljjjjNjNubjnj(jKjojp}j}jubuj}j(}(jgjjjusjub pgFont_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgFont_Checkubjnj(jK jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnj(jK jojp}j}jubsj}j(}jjssjubpgFont_IS_ALIVEjg)}(j jhjjNjkNjljw)}(jzj j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzoj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj jNjc.pgFont_IS_ALIVEubjnj(jK&jojp}jZjg)}(j j jjNjkNjljXjmj})}(jjCjNjmj3jjjdjNjNubjnj(jK&jojp}j}jubsj}j(}jZjdssjub pgSoundObjectjg)}(j jhjjNjkNjljw)}(jzjnj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjzjNubjj)}(jj)}(j]jqajubj]jNububjjjojNjc.pgSoundObjectubjnjjKjojp}j}jub pgSound_Typejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgSound_TypeubjnjjKjojp}j}jub pgSound_Newjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz Mix_Chunkj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzchunkj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNj c.pgSound_NewubjnjjKjojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjjKjojp}j}jubsj}j}jjssjub pgSound_Checkjg)}(j jhjjNjkNjljw)}(jzj(j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]j+ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj)jNjc.pgSound_CheckubjnjjKjojp}jjg)}(j j)jjNjkNjljujmj})}(jjCjNjmjPjjjjNjNubjnjjKjojp}j}jubsj}j}jjssjubpgSound_AsChunkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgSound_AsChunkubjnjjK%jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjjK%jojp}j}jubsj}j}jjssjubpgChannelObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNjc.pgChannelObjectubjnjjK+jojp}j}jubpgChannel_Typejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgChannel_TypeubjnjjK/jojp}j}jub pgChannel_Newjg)}(j jhjjNjkNjljw)}(jzjBj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jEajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jz channelnumj{ubajubj]jNububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjCjNjc.pgChannel_NewubjnjjK3jojp}jjg)}(j jCjjNjkNjljjmj})}(jjCjNjmjojjjjNjNubjnjjK3jojp}j}jubsj}j}jjssjubpgChannel_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgChannel_CheckubjnjjK9jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjjK9jojp}j}jubsj}j}jjssjubpgChannel_AsIntjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]j ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgChannel_AsIntubjnjjK?jojp}jjg)}(j jjjNjkNjljTjmj})}(jjCjNjmj/jjj_jNjNubjnjjK?jojp}j}jubsj}j}jj_ssjub pgRectObjectjg)}(j jhjjNjkNjljw)}(jzjij{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjujNubjj)}(jj)}(j]jlajubj]jNububjjjjjNjc.pgRectObjectubjnj)jKjojp}rjg)}(j jjjjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzSDL_Rectj{ubajubububjj)}(jj)}(j]jajubj]jNububjNubjjjjNjc.pgRectObject.rubjnj)jKjojp}j}jubsj}j)}jjssjub pgRect_Typejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNj c.pgRect_Typeubjnj)jKjojp}j}jub pgRect_AsRectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgRect_AsRectubjnj)jKjojp}jjg)}(j jjjNjkNjlj7jmj})}(jjCjNjmjjjjBjNjNubjnj)jKjojp}j}jubsj}j)}jjBssjub pgRect_Newjg)}(j jhjjNjkNjljw)}(jzjLj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jOajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjMjNj c.pgRect_Newubjnj)jKjojp}jjg)}(j jMjjNjkNjljjmj})}(jjCjNjmjyjjjjNjNubjnj)jKjojp}j}jubsj}j)}jjssjub pgRect_New4jg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzjj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzyj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzwj{ubajubj]jNububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzhj{ubajubj]jNububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNj c.pgRect_New4ubjnj)jK#jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjzjNjNubjnj)jK#jojp}j}jubj(jg)}(j jjjNjkNjlj&jmj})}(jjCjNjmjjjjjNjNubjnj)jK#jojp}j}jubjLjg)}(j jjjNjkNjljJjmj})}(jjCjNjmj*jjjjNjNubjnj)jK#jojp}j}jubjpjg)}(j jjjNjkNjljnjmj})}(jjCjNjmjNjjjjNjNubjnj)jK#jojp}j}jubuj}j)}(jjzj(jjLjjpjusjubpgRect_FromObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jztempj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgRect_FromObjectubjnj)jK)jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj%jNjNubjnj)jK)jojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj,jNjNubjnj)jK)jojp}j}jubuj}j)}(jj%jj,usjubpgRect_Normalizejg)}(j jhjjNjkNjljw)}(jzj6j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]j9ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzrectj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj7jNjc.pgRect_Normalizeubjnj)jK6jojp}jjg)}(j j7jjNjkNjljjmj})}(jjCjNjmj^jjjjNjNubjnj)jK6jojp}j}jubsj}j)}jjssjub pgRect_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgRect_Checkubjnj)jK;jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnj)jK;jojp}j}jubsj}j)}jjssjubpgRWops_FromObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz SDL_RWopsj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(jj)}(j]jw)}(jzextptrj{ubajubj]jNubjjjjj)}j]sbubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgRWops_FromObjectubjnjjKjojp}(jjg)}(j jjjNjkNjljNjmj})}(jjCjNjmj)jjjjNjNubjnjjKjojp}j}jubjzjg)}(j jjjNjkNjljxjmj})}(jjCjNjmjTjjjjNjNubjnjjKjojp}j}jubuj}j}(jjjzjusjubpgRWops_FromFileObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgRWops_FromFileObjectubjnjjK jojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjjK jojp}j}jubsj}j}jjssjubpgRWops_IsFileObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzrwj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgRWops_IsFileObjectubjnjjK'jojp}jTjg)}(j jjjNjkNjljRjmj})}(jjCjNjmj-jjj^jNjNubjnjjK'jojp}j}jubsj}j}jTj^ssjubpgRWops_ReleaseObjectjg)}(j jhjjNjkNjljw)}(jzjhj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jkajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzcontextj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjijNjc.pgRWops_ReleaseObjectubjnjjK,jojp}jjg)}(j jijjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjjK,jojp}j}jubsj}j}jjssjubpg_EncodeFilePathjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzeclassj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNjc.pg_EncodeFilePathubjnjjK2jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjWjNjNubjnjjK2jojp}j}jubjJjg)}(j jjjNjkNjljHjmj})}(jjCjNjmj#jjj^jNjNubjnjjK2jojp}j}jubuj}j}(jjWjJj^usjubpg_EncodeStringjg)}(j jhjjNjkNjljw)}(jzjhj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jkajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(j]jw)}(jzencodingj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]charasbubjj)}(jj)}(jj)}(j]jw)}(jzerrorsj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjJj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjijNjc.pg_EncodeStringubjnjjK:jojp}(jjg)}(j jijjNjkNjljjmj})}(jjCjNjmjjjjEjNjNubjnjjK:jojp}j}jubjjg)}(j jijjNjkNjljjmj})}(jjCjNjmjjjjLjNjNubjnjjK:jojp}j}jubj jg)}(j jijjNjkNjlj jmj})}(jjCjNjmjjjjSjNjNubjnjjK:jojp}j}jubjJjg)}(j jijjNjkNjlj7jmj})}(jjCjNjmjjjjZjNjNubjnjjK:jojp}j}jubuj}j}(jjEjjLj jSjJjZusjubjjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjojNubjj)}(jj)}(j]jfajubj]jNububjjjdjNjc.pgSurfaceObjectubjnjAjKjojp}j}jubpgSurface_Typejg)}(j jhjjNjkNjljw)}(jzj~j{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgSurface_TypeubjnjAjKjojp}j}jubpgSurface_Checkjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgSurface_CheckubjnjAjKjojp}jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj jNjNubjnjAjKjojp}j}jubsj}jA}jj ssjub pgSurface_Newjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jz SDL_Surfacej{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzsj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgSurface_NewubjnjAjK jojp}jhjg)}(j jjjNjkNjljfjmj})}(jjCjNjmj@jjjujNjNubjnjAjK jojp}j}jubsj}jA}jhjussjubpgSurface_New2jg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzj^j{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjhj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzownerj{ubajubj]jNububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgSurface_New2ubjnjAjK%jojp}(jhjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjAjK%jojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjj jNjNubjnjAjK%jojp}j}jubuj}jA}(jhjjj usjubpgSurface_AsSurfacejg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzj^j{ubajubububjj)}(jj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbububjjjjj)}j]sbububjjjjNjc.pgSurface_AsSurfaceubjnjAjK+jojp}jjg)}(j jjjNjkNjljfjmj})}(jjCjNjmjAjjjtjNjNubjnjAjK+jojp}j}jubsj}jA}jjtssjubpgSurface_Blitjg)}(j jhjjNjkNjljw)}(jzj~j{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzdstobjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzsrcobjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzdstrectj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzsrcrectj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jw)}(jzthe_argsj{ubajubj]jNububjNubj9ubejj)}j]sbubububjjjjNjc.pgSurface_BlitubjnjAjK3jojp}(jjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjAjK3jojp}j}jubjjg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjAjK3jojp}j}jubj%jg)}(j jjjNjkNjlj#jmj})}(jjCjNjmjjjjjNjNubjnjAjK3jojp}j}jubjQjg)}(j jjjNjkNjljOjmj})}(jjCjNjmj*jjjjNjNubjnjAjK3jojp}j}jubjxjg)}(j jjjNjkNjljvjmj})}(jjCjNjmjVjjjjNjNubjnjAjK3jojp}j}jubuj}jA}(jjjjj%jjQjjxjusjubpgLifetimeLockObjectjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjtypejmj)}(jj)}(jjjj)}(jNjNhNjNjNjNjj)}j]sbubjNjjjNubjj)}(jj)}(j]jajubj]jNububjjjjNjc.pgLifetimeLockObjectubjnjRjKjojp}(surfacejg)}(j jjjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgLifetimeLockObject.surfaceubjnjRjKjojp}j}jublockobjjg)}(j jjjNjkNjljw)}(jzjj{ubjmj})}(jjjmemberjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jajubj]jNubjjjjj)}j]sbububjNubjjjjNjc.pgLifetimeLockObject.lockobjubjnjRjKjojp}j}jubuj}jR}(jjjjusjubpgLifetimeLock_Typejg)}(j jhjjNjkNjljw)}(jzj'j{ubjmj})}(jjjvarjmj)}(jj)}(jj)}(jjjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]j*ajubj]jNubjjjjj)}j]sbububjNubjjj(jNjc.pgLifetimeLock_TypeubjnjRjK#jojp}j}jubpgLifetimeLock_Checkjg)}(j jhjjNjkNjljw)}(jzjZj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]j]ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj[jNjc.pgLifetimeLock_CheckubjnjRjK'jojp}jjg)}(j j[jjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjRjK'jojp}j}jubsj}jR}jjssjubpgSurface_Prepjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzsurfobjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgSurface_PrepubjnjRjK-jojp}j jg)}(j jjjNjkNjlj jmj})}(jjCjNjmjjjjjNjNubjnjRjK-jojp}j}jubsj}jR}j jssjubpgSurface_Unprepjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]voidasbubjj)}(jj)}(j]j"ajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjj jNjc.pgSurface_UnprepubjnjRjK2jojp}j jg)}(j j jjNjkNjljljmj})}(jjCjNjmjGjjjwjNjNubjnjRjK2jojp}j}jubsj}jR}j jwssjubpgSurface_Lockjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjjNjc.pgSurface_LockubjnjRjK6jojp}j jg)}(j jjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjRjK6jojp}j}jubsj}jR}j jssjubpgSurface_LockByjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pgSurface_LockByubjnjRjK:jojp}(j jg)}(j jjjNjkNjlj0jmj})}(jjCjNjmj jjjfjNjNubjnjRjK:jojp}j}jubjjg)}(j jjjNjkNjlj[jmj})}(jjCjNjmj6jjjmjNjNubjnjRjK:jojp}j}jubuj}jR}(j jfjjmusjubpgSurface_UnLockjg)}(j jhjjNjkNjljw)}(jzjwj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jzajubj]jj)}(j ]j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubajj)}j]sbubububjjjxjNjc.pgSurface_UnLockubjnjRjKDjojp}j jg)}(j jxjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjRjKDjojp}j}jubsj}jR}j jssjubpgSurface_UnLockByjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}j]intasbubjj)}(jj)}(j]jajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbubububjjjjNjc.pgSurface_UnLockByubjnjRjKHjojp}(j jg)}(j jjjNjkNjlj&jmj})}(jjCjNjmjjjj\jNjNubjnjRjKHjojp}j}jubjjg)}(j jjjNjkNjljQjmj})}(jjCjNjmj,jjjcjNjNubjnjRjKHjojp}j}jubuj}jR}(j j\jjcusjubpgSurface_LockLifetimejg)}(j jhjjNjkNjljw)}(jzjmj{ubjmj})}(jjjfunctionjmj)}(jj)}(jjjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjNhjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jpajubj]jj)}(j ](j)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzj j{ubajubj]jNubjjjjj)}j]sbububjNubj9ubj)}(jj)}(jj)}(jj)}(jNjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjNhNjjjjj)}j]sbubjj)}(jNjj)}(j]jw)}(jzjj{ubajubububjj)}(jj)}(jj)}(j]jw)}(jzjj{ubajubj]jNubjjjjj)}j]sbububjNubj9ubejj)}j]sbububjjjjj)}j]sbububjjjnjNjc.pgSurface_LockLifetimeubjnjRjKLjojp}(j jg)}(j jnjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjRjKLjojp}j}jubjjg)}(j jnjjNjkNjljjmj})}(jjCjNjmjjjjjNjNubjnjRjKLjojp}j}jubuj}jR}(j jjjusjubPG_MAJOR_VERSIONjg)}(j jhjjNjkNjljw)}(jzj j{ubjmj})}(jmacrojmacrojmjuASTMacro)}(jlj)}(j]j ajubj Nubjjj jNjc.PG_MAJOR_VERSIONubjnjTjKjojp}j}jubPG_MINOR_VERSIONjg)}(j jhjjNjkNjljw)}(jzjj{ubjmj})}(jjjmacrojmj)}(jlj)}(j]j ajubj NubjjjjNjc.PG_MINOR_VERSIONubjnjTjKjojp}j}jubPG_PATCH_VERSIONjg)}(j jhjjNjkNjljw)}(jzj.j{ubjmj})}(jjjmacrojmj)}(jlj)}(j]j1ajubj Nubjjj/jNjc.PG_PATCH_VERSIONubjnjTjKjojp}j}jub PG_VERSIONNUMjg)}(j jhjjNjkNjljw)}(jzj?j{ubjmj})}(jjjmacrojmj)}(jlj)}(j]jBajubj ](juASTMacroParameter)}(jj)}(j]jw)}(jzMAJORj{ubajubj9variadicubjN)}(jj)}(j]jw)}(jzMINORj{ubajubj9jWubjN)}(jj)}(j]jw)}(jzPATCHj{ubajubj9jWubeubjjj@jNjc.PG_VERSIONNUMubjnjTjKjojp}j}jubPG_VERSION_ATLEASTjg)}(j jhjjNjkNjljw)}(jzjlj{ubjmj})}(jjjmacrojmj)}(jlj)}(j]joajubj ](jN)}(jj)}(j]jw)}(jzjVj{ubajubj9jWubjN)}(jj)}(j]jw)}(jzj_j{ubajubj9jWubjN)}(jj)}(j]jw)}(jzjgj{ubajubj9jWubeubjjjmjNjc.PG_VERSION_ATLEASTubjnjTjKjojp}j}jubuj}(jD}(jrjsjjjJjKjjj5j6jjjjjEjFjjjjjRjSjjjjj<j=jjjjjjjjjjjjjjjjjXjYjjjjujO}(jtjujjj j jjjjujV}(jpjqjjjjjrjsujI}(jjj"j#jUjVjjj&j'uj_}(jjjjjjjKjLjjjKjLuj(}(jjjjjjjjj j uj}(jnjojjjjj(j)jjjjjjjBjCjjjjuj)}(jijjjjjjjLjMjjjjj6j7jjuj}(jjjjjjjhjijjjhjiujA}(jjdj~jjjjjjjjjj~jujR}(jjj'j(jZj[jjjj jjjjjwjxjjjmjnujT}(j j jjj.j/j?j@jljmuujubobjects}h6Ku changeset}(changes}(1.9.5](sphinx.domains.changeset ChangeSet( versionaddedjTKNNNew in pygame 1.9.5.tj(versionchangedj.KΌpygame.displayset_modeN/Changed in pygame 1.9.5: display argument addedtj(versionchangedj.M|j list_modesN/Changed in pygame 1.9.5: display argument addedtj(versionchangedj.Mjmode_okN/Changed in pygame 1.9.5: display argument addedtj( versionaddedj.Mjget_num_displaysNNew in pygame 1.9.5.tj( versionaddedjdK} pygame.eventNNew in pygame 1.9.5.tj(versionchangedjdM3jgetN,Changed in pygame 1.9.5: Added pump argumenttj(versionchangedjdMgjpeekN,Changed in pygame 1.9.5: Added pump argumenttj(versionchangedjdMwjclearN,Changed in pygame 1.9.5: Added pump argumenttj( versionaddedjWK~pygame.freetypeget_initNNew in pygame 1.9.5.tj(versionchangedj#K pygame.maskMaskN=Changed in pygame 1.9.5: Added support for keyword arguments.tj(versionchangedj#KjjCChanged in pygame 1.9.5: Added the optional keyword parameter fill.tj(versionchangedj#KjjSChanged in pygame 1.9.5: Added support for masks with a width and/or a height of 0.tj( versionaddedj*M pygame.mathVector2.updateNNew in pygame 1.9.5.tj( versionaddedj*MijVector3.updateNNew in pygame 1.9.5.tj( versionaddedj`KJ pygame.midiget_initNNew in pygame 1.9.5.tj( versionaddedj`Mjfrequency_to_midiNNew in pygame 1.9.5.tj( versionaddedj`Mjmidi_to_frequencyNNew in pygame 1.9.5.tj( versionaddedj`Mjmidi_to_ansi_noteNNew in pygame 1.9.5.tj( versionaddedjKDpygameget_initNNew in pygame 1.9.5.tj(versionchangedjM pygame.versionrevN;Changed in pygame 1.9.5: Always returns an empty string "".tj( versionaddedj+Ka pygame.scrapget_initNNew in pygame 1.9.5.te1.8.0](j( versionaddedj<KHpygame BufferProxyNNew in pygame 1.8.0.tj( versionaddedjMN pygame.sprite collide_maskNNew in pygame 1.8.0.te1.9.2](j(versionextendedj<KIj4j6Extended in pygame 1.9.2.tj(versionchangedjZK[pygameColorNJChanged in pygame 1.9.2: Color objects export the C level array interface.tj( versionaddedjdM1jN(New in pygame 1.9.2: Mutable attributes.tj( versionaddedjWK>jNNew in pygame 1.9.2: freetypetj( versionaddedj&M- pygame.mixerSoundNUNew in pygame 1.9.2: pygame.mixer.Sound keyword arguments and array interface supporttj( versionaddedj&MjW Sound.get_rawNNew in pygame 1.9.2.tj( versionaddedjKKΌpygame.mixer.musicset_posNNew in pygame 1.9.2.tj( versionaddedjgKmpygame PixelArrayNdNew in pygame 1.9.2: array struct interface transpose method broadcasting for a length 1 dimensiontj(versionchangedjgKsjkjmChanged in pygame 1.9.2: A 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array. For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.tj( versionaddedjgKjkPixelArray.itemsizeNNew in pygame 1.9.2.tj( versionaddedjgKjkPixelArray.ndimNNew in pygame 1.9.2.tj( versionaddedjgKjkPixelArray.shapeNNew in pygame 1.9.2.tj( versionaddedjgKjkPixelArray.stridesNNew in pygame 1.9.2.tj( versionaddedjgMjkPixelArray.transposeNNew in pygame 1.9.2.tj( versionaddedjKj encode_stringN6New in pygame 1.9.2: (primarily for use in unit tests)tj( versionaddedjKjencode_file_pathN6New in pygame 1.9.2: (primarily for use in unit tests)tj( versionaddedjQKNpygameRectNXKNew in pygame 1.9.2: The Rect class can be subclassed. Methods such as copy() and move() will recognize this and return instances of the subclass. However, the subclass's __init__() method is not called, and __new__() is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied.tj( versionaddedjPKrpygame Surface.blitN@New in pygame 1.9.2: Optional special_flags: BLEND_PREMULTIPLIEDtj( versionaddedjPMjSurface.get_at_mappedNNew in pygame 1.9.2.tj( versionaddedjPMpjSurface.get_viewNNew in pygame 1.9.2.tj( versionaddedjPMjSurface._pixels_addressNNew in pygame 1.9.2.te2.0.2](j( versionaddedj?K pygame.cameraN2New in pygame 2.0.2: Windows native camera supporttj(versionchangedjdKjNlChanged in pygame 2.0.2: Fixed amount horizontal scroll (x, positive to the right and negative to the left).tj(versionchangedjdKjNOChanged in pygame 2.0.2: The touch attribute was added to all the MOUSE events.tj(versionchangedjdM4jj/Changed in pygame 2.0.2: Added exclude argumenttj( versionaddedjnM6pygame.examples joystick.main joystick.New in pygame 2.0.2.tj( versionaddedjMTpygame.joystickJoystick.rumbleNNew in pygame 2.0.2.tj( versionaddedjM`jJoystick.stop_rumbleNNew in pygame 2.0.2.tj(versionchangedj#KjNFChanged in pygame 2.0.2: Mask functions now support keyword arguments.tj(versionchangedj#KjNqChanged in pygame 2.0.2: Mask functions that take positions or offsets now support pygame.math.Vector2 arguments.tj( versionaddedj*MjVector2.projectNNew in pygame 2.0.2.tj( versionaddedj*M%jVector3.projectNNew in pygame 2.0.2.tj(versionchangedjKK$jdloadN9Changed in pygame 2.0.2: Added optional namehint argumenttj(versionchangedjKKjdqueueN9Changed in pygame 2.0.2: Added optional namehint argumenttj( versionaddedjjKZpygame._sdl2.controllerget_eventstateNNew in pygame 2.0.2.tj( versionaddedjjMjController.rumbleNNew in pygame 2.0.2.tj( versionaddedjjMjController.stop_rumbleNNew in pygame 2.0.2.tj( versionaddedj[Kpygame.surfarray array_redNNew in pygame 2.0.2.tj( versionaddedj[Kj array_greenNNew in pygame 2.0.2.tj( versionaddedj[Kj array_blueNNew in pygame 2.0.2.tj(versionchangedjEKpygame.transformNKChanged in pygame 2.0.2: transform functions now support keyword arguments.te2.0.3](j( versionaddedj?KjN(New in pygame 2.0.3: New OpenCV backendstj(versionchangedj?K?jinitNChanged in pygame 2.0.0.dev8: Added support for border radius.tj(versionchangedj5Kj~jIChanged in pygame 2.0.0.dev8: Added support for drawing circle quadrants.te 2.0.0.dev13]j(versionchangedjdMTjwaitN5Changed in pygame 2.0.0.dev13: Added timeout argumentta 2.0.0.dev3](j( versionaddedjdMj custom_typeNNew in pygame 2.0.0.dev3.tj( versionaddedjfKNj8j:.New in pygame 2.0.0.dev3: once argument added.te2.0](j( versionaddedj7K1jN)New in pygame 2.0: Loading SVG, WebP, PNMtj(versionchangedjPM2jSurface.set_alphaNNChanged in pygame 2.0: per-surface alpha can be combined with per-pixel alpha.te1.8](j( versionaddedj7KAjN-New in pygame 1.8: Saving PNG and JPEG files.tj(versionchangedj7Kzjj1Changed in pygame 1.8: Saving PNG and JPEG files.tj( versionaddedj^MQj get_repeatNNew in pygame 1.8.tj( versionaddedj#KjNNew in pygame 1.8.tj(versionchangedj&K]jWjjHChanged in pygame 1.8: The default buffersize changed from 1024 to 3072.tj(versionchangedj&KsjWjHChanged in pygame 1.8: The default buffersize changed from 1024 to 3072.tj( versionaddedj&M,jWjY-New in pygame 1.8: pygame.mixer.Sound(buffer)tj( versionaddedjKjget_sdl_byteorderNNew in pygame 1.8.tj( versionaddedj+KAj+NNew in pygame 1.8.tj( versionaddedj/KLpygame.sndarray get_arraytypeNNew in pygame 1.8.tj( versionaddedj/K[jget_arraytypesNNew in pygame 1.8.tj( versionaddedjMj;LayeredUpdatesNNew in pygame 1.8.tj( versionaddedjMRj; LayeredDirtyNNew in pygame 1.8.tj( versionaddedjMj; collide_rectNNew in pygame 1.8.tj( versionaddedjPKhjjbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.tj( versionaddedjPKjjbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.tj( versionaddedjPM@jSurface.get_bounding_rectNNew in pygame 1.8.tj( versionaddedjPMjSurface.get_bufferNNew in pygame 1.8.tj( versionaddedj[M>j get_arraytypeNNew in pygame 1.8.tj( versionaddedj[MMjget_arraytypesNNew in pygame 1.8.tj( versionaddedjfKj8Clock.tick_busy_loopNNew in pygame 1.8.tj( versionaddedjEKj. smoothscaleNNew in pygame 1.8.tj( versionaddedjEKj. laplacianNNew in pygame 1.8.tj( versionaddedjEKj.average_surfacesNNew in pygame 1.8.tj( versionaddedjEM?j. thresholdNNew in pygame 1.8.te 2.0.0dev11](j( versionaddedjKjJoystick.get_instance_idNNew in pygame 2.0.0dev11.tj( versionaddedjKjJoystick.get_guidNNew in pygame 2.0.0dev11.tj( versionaddedjKjJoystick.get_power_levelNNew in pygame 2.0.0dev11.te1.9.2pre]j( versionaddedj*K.jNNew in pygame 1.9.2pre.ta1.9.4](j(versionchangedj*K/jN5Changed in pygame 1.9.4: Removed experimental notice.tj(versionchangedj*K0jN\Changed in pygame 1.9.4: Allow scalar construction like GLSL Vector2(2) == Vector2(2.0, 2.0)tj(versionchangedj*K1jNlChanged in pygame 1.9.4: pygame.math import not required. More convenient pygame.Vector2 and pygame.Vector3.tj( versionaddedj`KjOutput.pitch_bendNNew in pygame 1.9.4.tj( versionaddedjgKgjkjmNew in pygame 1.9.4: close() method was added. For explicitly cleaning up. being able to use PixelArray as a context manager for cleanup. both of these are useful for when working without reference counting (pypy).tj( versionaddedjgM"jkPixelArray.closeNNew in pygame 1.9.4.tj(versionchangedjEM@j.jYChanged in pygame 1.9.4: Fixed a lot of bugs and added keyword arguments. Test your code.te1.9.1](j(versionchangedj&K^jWjjJChanged in pygame 1.9.1: The default buffersize changed from 3072 to 4096.tj(versionchangedj&KtjWjJChanged in pygame 1.9.1: The default buffersize changed from 3072 to 4096.te1.7.0]j( versionaddedjKxjjNew in pygame 1.7.0.ta1.9.6](j( versionaddedjKj$vernumN8New in pygame 1.9.6: Attributes major, minor, and patch.tj(versionchangedjKj$j3iChanged in pygame 1.9.6: str(pygame.version.vernum) returns a string like "2.0.0" instead of "(2, 0, 0)".tj(versionchangedjKj$j3Changed in pygame 1.9.6: repr(pygame.version.vernum) returns a string like "PygameVersion(major=2, minor=0, patch=0)" instead of "(2, 0, 0)".te2](j( versionaddedjjK'jN+New in pygame 2: This module requires SDL2.tj( versionaddedj1K pygame._sdl2.touchN+New in pygame 2: This module requires SDL2.te2.0.2:](j(versionchangedjjKNjset_eventstateN>Changed in pygame 2.0.2:: Changed return type from int to Nonetj(versionchangedjjKjController.get_mappingN>Changed in pygame 2.0.2:: Return type changed from str to dicttj(versionchangedjjKjController.set_mappingNAChanged in pygame 2.0.2:: Renamed from add_mapping to set_mappingtj(versionchangedjjMjjZ@Changed in pygame 2.0.2:: Argument type changed from str to dictte1.9](j( versionaddedjPMjSurface.scrollNNew in pygame 1.9.tj( versionaddedjPMjSurface.get_atNNew in pygame 1.9: Returning a Color instead of tuple. Use tuple(surf.get_at((x,y))) if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict.tj( versionaddedjPMjSurface.get_paletteNNew in pygame 1.9.tj( versionaddedjPMjSurface.get_palette_atNNNew in pygame 1.9: Returning Color(with length 3) instance instead of a tuple.tj( versionaddedjEKj.j*New in pygame 1.9: palette_colors argumentte2.1.2]j( versionaddedjEKj. average_colorN,New in pygame 2.1.2: consider_alpha argumenttauh6Kucitation}(h6K citations} citation_refs}ucpp}(jdsphinx.domains.cpp._symboljf)}(j NjjNjkN identOrOpNtemplateParamsN templateArgsNjmNjnNjNjo _children] _anonChildren]ubj}h6KuhA}(h6Kj }(j0]jD]((singlepgExc_SDLError (C var)c.pgExc_SDLErrorh:Nt(jpg_mod_autoinit (C function)c.pg_mod_autoinith:Nt(jpg_mod_autoquit (C function)c.pg_mod_autoquith:Nt(jpg_RegisterQuit (C function)c.pg_RegisterQuith:Nt(jpg_IntFromObj (C function)c.pg_IntFromObjh:Nt(jpg_IntFromObjIndex (C function)c.pg_IntFromObjIndexh:Nt(jpg_TwoIntsFromObj (C function)c.pg_TwoIntsFromObjh:Nt(jpg_FloatFromObj (C function)c.pg_FloatFromObjh:Nt(j!pg_FloatFromObjIndex (C function)c.pg_FloatFromObjIndexh:Nt(j pg_TwoFloatsFromObj (C function)c.pg_TwoFloatsFromObjh:Nt(jpg_UintFromObj (C function)c.pg_UintFromObjh:Nt(j pg_UintFromObjIndex (C function)c.pg_UintFromObjIndexh:Nt(jpg_RGBAFromObj (C function)c.pg_RGBAFromObjh:Nt(jpg_buffer (C type) c.pg_bufferh:Nt(jpg_buffer.view (C member)c.pg_buffer.viewh:Nt(jpg_buffer.consumer (C member)c.pg_buffer.consumerh:Nt(j#pg_buffer.release_buffer (C member)c.pg_buffer.release_bufferh:Nt(jpgExc_BufferError (C var)c.pgExc_BufferErrorh:Nt(j&pgBuffer_AsArrayInterface (C function)c.pgBuffer_AsArrayInterfaceh:Nt(j#pgBuffer_AsArrayStruct (C function)c.pgBuffer_AsArrayStructh:Nt(jpgObject_GetBuffer (C function)c.pgObject_GetBufferh:Nt(jpgBuffer_Release (C function)c.pgBuffer_Releaseh:Nt(jpgDict_AsBuffer (C function)c.pgDict_AsBufferh:Nt(jimport_pygame_base (C function)c.import_pygame_baseh:Nt(j pg_GetDefaultWindow (C function)c.pg_GetDefaultWindowh:Nt(j pg_SetDefaultWindow (C function)c.pg_SetDefaultWindowh:Nt(j'pg_GetDefaultWindowSurface (C function)c.pg_GetDefaultWindowSurfaceh:Nt(j'pg_SetDefaultWindowSurface (C function)c.pg_SetDefaultWindowSurfaceh:NtejO]((jpgBufproxy_Type (C var)c.pgBufproxy_Typeh:Nt(jpgBufproxy_Check (C function)c.pgBufproxy_Checkh:Nt(jpgBufproxy_New (C function)c.pgBufproxy_Newh:Nt(j!pgBufproxy_GetParent (C function)c.pgBufproxy_GetParenth:Nt(jpgBufproxy_Trip (C function)c.pgBufproxy_Triph:NtejV]((jpgColor_Type (C var)c.pgColor_Typeh:Nt(jpgColor_Check (C function)c.pgColor_Checkh:Nt(jpgColor_New (C function) c.pgColor_Newh:Nt(jpgColor_NewLength (C function)c.pgColor_NewLengthh:NtejI]((jpgVidInfoObject (C type)c.pgVidInfoObjecth:Nt(jpgVidInfo_Type (C var)c.pgVidInfo_Typeh:Nt(j pgVidInfo_AsVidInfo (C function)c.pgVidInfo_AsVidInfoh:Nt(jpgVidInfo_New (C function)c.pgVidInfo_Newh:Nt(jpgVidInfo_Check (C function)c.pgVidInfo_Checkh:Ntej_]((jpgEventObject (C type)c.pgEventObjecth:Nt(jpgEventObject.type (C member)c.pgEventObject.typeh:Nt(jpgEvent_Type (C type)c.pgEvent_Typeh:Nt(jpgEvent_Check (C function)c.pgEvent_Checkh:Nt(jpgEvent_New (C function) c.pgEvent_Newh:Nt(jpgEvent_New2 (C function)c.pgEvent_New2h:Nt(j"pgEvent_FillUserEvent (C function)c.pgEvent_FillUserEventh:Ntej(]((jpgFontObject (C type)c.pgFontObjecth:Nt(jpgFont_Type (C type) c.pgFont_Typeh:Nt(jpgFont_New (C function) c.pgFont_Newh:Nt(jpgFont_Check (C function)c.pgFont_Checkh:Nt(jpgFont_IS_ALIVE (C function)c.pgFont_IS_ALIVEh:Ntej]((jpgSoundObject (C type)c.pgSoundObjecth:Nt(jpgSound_Type (C var)c.pgSound_Typeh:Nt(jpgSound_New (C function) c.pgSound_Newh:Nt(jpgSound_Check (C function)c.pgSound_Checkh:Nt(jpgSound_AsChunk (C function)c.pgSound_AsChunkh:Nt(jpgChannelObject (C type)c.pgChannelObjecth:Nt(jpgChannel_Type (C var)c.pgChannel_Typeh:Nt(jpgChannel_New (C function)c.pgChannel_Newh:Nt(jpgChannel_Check (C function)c.pgChannel_Checkh:Nt(jpgChannel_AsInt (C function)c.pgChannel_AsInth:Ntej)]((jpgRectObject (C type)c.pgRectObjecth:Nt(jpgRectObject.r (C member)c.pgRectObject.rh:Nt(jpgRect_Type (C var) c.pgRect_Typeh:Nt(jpgRect_AsRect (C function)c.pgRect_AsRecth:Nt(jpgRect_New (C function) c.pgRect_Newh:Nt(jpgRect_New4 (C function) c.pgRect_New4h:Nt(jpgRect_FromObject (C function)c.pgRect_FromObjecth:Nt(jpgRect_Normalize (C function)c.pgRect_Normalizeh:Nt(jpgRect_Check (C function)c.pgRect_Checkh:Ntej]((jpgRWops_FromObject (C function)c.pgRWops_FromObjecth:Nt(j#pgRWops_FromFileObject (C function)c.pgRWops_FromFileObjecth:Nt(j!pgRWops_IsFileObject (C function)c.pgRWops_IsFileObjecth:Nt(j"pgRWops_ReleaseObject (C function)c.pgRWops_ReleaseObjecth:Nt(jpg_EncodeFilePath (C function)c.pg_EncodeFilePathh:Nt(jpg_EncodeString (C function)c.pg_EncodeStringh:NtejJ]jA]((jpgSurfaceObject (C type)c.pgSurfaceObjecth:Nt(jpgSurface_Type (C var)c.pgSurface_Typeh:Nt(jpgSurface_Check (C function)c.pgSurface_Checkh:Nt(jpgSurface_New (C function)c.pgSurface_Newh:Nt(jpgSurface_New2 (C function)c.pgSurface_New2h:Nt(j pgSurface_AsSurface (C function)c.pgSurface_AsSurfaceh:Nt(jpgSurface_Blit (C function)c.pgSurface_Blith:NtejR]((jpgLifetimeLockObject (C type)c.pgLifetimeLockObjecth:Nt(j'pgLifetimeLockObject.surface (C member)c.pgLifetimeLockObject.surfaceh:Nt(j'pgLifetimeLockObject.lockobj (C member)c.pgLifetimeLockObject.lockobjh:Nt(jpgLifetimeLock_Type (C var)c.pgLifetimeLock_Typeh:Nt(j!pgLifetimeLock_Check (C function)c.pgLifetimeLock_Checkh:Nt(jpgSurface_Prep (C function)c.pgSurface_Preph:Nt(jpgSurface_Unprep (C function)c.pgSurface_Unpreph:Nt(jpgSurface_Lock (C function)c.pgSurface_Lockh:Nt(jpgSurface_LockBy (C function)c.pgSurface_LockByh:Nt(jpgSurface_UnLock (C function)c.pgSurface_UnLockh:Nt(jpgSurface_UnLockBy (C function)c.pgSurface_UnLockByh:Nt(j#pgSurface_LockLifetime (C function)c.pgSurface_LockLifetimeh:NtejT]((jPG_MAJOR_VERSION (C macro)c.PG_MAJOR_VERSIONh:Nt(jPG_MINOR_VERSION (C macro)c.PG_MINOR_VERSIONh:Nt(jPG_PATCH_VERSION (C macro)c.PG_PATCH_VERSIONh:Nt(jPG_VERSIONNUM (C macro)c.PG_VERSIONNUMh:Nt(jPG_VERSION_ATLEAST (C macro)c.PG_VERSION_ATLEASTh:Ntej8]jb]jm]j<]((jBufferProxy (class in pygame)pygame.BufferProxyh:Nt(j%parent (pygame.BufferProxy attribute)pygame.BufferProxy.parenth:Nt(j%length (pygame.BufferProxy attribute)pygame.BufferProxy.lengthh:Nt(j"raw (pygame.BufferProxy attribute)pygame.BufferProxy.rawh:Nt(j#write() (pygame.BufferProxy method)pygame.BufferProxy.writeh:Ntej?]((pairmodule; pygame.cameramodule-pygame.camerah:Nt(j init() (in module pygame.camera)pygame.camera.inith:Nt(j(get_backends() (in module pygame.camera)pygame.camera.get_backendsh:Nt(j&colorspace() (in module pygame.camera)pygame.camera.colorspaceh:Nt(j(list_cameras() (in module pygame.camera)pygame.camera.list_camerash:Nt(jCamera (class in pygame.camera)pygame.camera.Camerah:Nt(j%start() (pygame.camera.Camera method)pygame.camera.Camera.starth:Nt(j$stop() (pygame.camera.Camera method)pygame.camera.Camera.stoph:Nt(j,get_controls() (pygame.camera.Camera method)!pygame.camera.Camera.get_controlsh:Nt(j,set_controls() (pygame.camera.Camera method)!pygame.camera.Camera.set_controlsh:Nt(j(get_size() (pygame.camera.Camera method)pygame.camera.Camera.get_sizeh:Nt(j+query_image() (pygame.camera.Camera method) pygame.camera.Camera.query_imageh:Nt(j)get_image() (pygame.camera.Camera method)pygame.camera.Camera.get_imageh:Nt(j'get_raw() (pygame.camera.Camera method)pygame.camera.Camera.get_rawh:Nteje]((jmodule; pygame.cdrommodule-pygame.cdromh:Nt(jinit() (in module pygame.cdrom)pygame.cdrom.inith:Nt(jquit() (in module pygame.cdrom)pygame.cdrom.quith:Nt(j#get_init() (in module pygame.cdrom)pygame.cdrom.get_inith:Nt(j$get_count() (in module pygame.cdrom)pygame.cdrom.get_counth:Nt(jCD (class in pygame.cdrom)pygame.cdrom.CDh:Nt(jinit() (pygame.cdrom.CD method)pygame.cdrom.CD.inith:Nt(jquit() (pygame.cdrom.CD method)pygame.cdrom.CD.quith:Nt(j#get_init() (pygame.cdrom.CD method)pygame.cdrom.CD.get_inith:Nt(jplay() (pygame.cdrom.CD method)pygame.cdrom.CD.playh:Nt(jstop() (pygame.cdrom.CD method)pygame.cdrom.CD.stoph:Nt(j pause() (pygame.cdrom.CD method)pygame.cdrom.CD.pauseh:Nt(j!resume() (pygame.cdrom.CD method)pygame.cdrom.CD.resumeh:Nt(j eject() (pygame.cdrom.CD method)pygame.cdrom.CD.ejecth:Nt(j!get_id() (pygame.cdrom.CD method)pygame.cdrom.CD.get_idh:Nt(j#get_name() (pygame.cdrom.CD method)pygame.cdrom.CD.get_nameh:Nt(j#get_busy() (pygame.cdrom.CD method)pygame.cdrom.CD.get_busyh:Nt(j%get_paused() (pygame.cdrom.CD method)pygame.cdrom.CD.get_pausedh:Nt(j&get_current() (pygame.cdrom.CD method)pygame.cdrom.CD.get_currenth:Nt(j$get_empty() (pygame.cdrom.CD method)pygame.cdrom.CD.get_emptyh:Nt(j(get_numtracks() (pygame.cdrom.CD method)pygame.cdrom.CD.get_numtracksh:Nt(j*get_track_audio() (pygame.cdrom.CD method)pygame.cdrom.CD.get_track_audioh:Nt(j"get_all() (pygame.cdrom.CD method)pygame.cdrom.CD.get_allh:Nt(j*get_track_start() (pygame.cdrom.CD method)pygame.cdrom.CD.get_track_starth:Nt(j+get_track_length() (pygame.cdrom.CD method) pygame.cdrom.CD.get_track_lengthh:NtejZ]((jColor (class in pygame) pygame.Colorh:Nt(jr (pygame.Color attribute)pygame.Color.rh:Nt(jg (pygame.Color attribute)pygame.Color.gh:Nt(jb (pygame.Color attribute)pygame.Color.bh:Nt(ja (pygame.Color attribute)pygame.Color.ah:Nt(jcmy (pygame.Color attribute)pygame.Color.cmyh:Nt(jhsva (pygame.Color attribute)pygame.Color.hsvah:Nt(jhsla (pygame.Color attribute)pygame.Color.hslah:Nt(ji1i2i3 (pygame.Color attribute)pygame.Color.i1i2i3h:Nt(j!normalize() (pygame.Color method)pygame.Color.normalizeh:Nt(j%correct_gamma() (pygame.Color method)pygame.Color.correct_gammah:Nt(j"set_length() (pygame.Color method)pygame.Color.set_lengthh:Nt(j!grayscale() (pygame.Color method)pygame.Color.grayscaleh:Nt(jlerp() (pygame.Color method)pygame.Color.lerph:Nt(j$premul_alpha() (pygame.Color method)pygame.Color.premul_alphah:Nt(jupdate() (pygame.Color method)pygame.Color.updateh:NtejF]ji]((jmodule; pygame.cursorsmodule-pygame.cursorsh:Nt(j$compile() (in module pygame.cursors)pygame.cursors.compileh:Nt(j%load_xbm() (in module pygame.cursors)pygame.cursors.load_xbmh:Nt(j Cursor (class in pygame.cursors)pygame.cursors.Cursorh:Nt(j%copy() (pygame.cursors.Cursor method)pygame.cursors.Cursor.copyh:Nt(j&type (pygame.cursors.Cursor attribute)pygame.cursors.Cursor.typeh:Nt(j&data (pygame.cursors.Cursor attribute)pygame.cursors.Cursor.datah:Ntej.]((jmodule; pygame.displaymodule-pygame.displayh:Nt(j!init() (in module pygame.display)pygame.display.inith:Nt(j!quit() (in module pygame.display)pygame.display.quith:Nt(j%get_init() (in module pygame.display)pygame.display.get_inith:Nt(j%set_mode() (in module pygame.display)pygame.display.set_modeh:Nt(j(get_surface() (in module pygame.display)pygame.display.get_surfaceh:Nt(j!flip() (in module pygame.display)pygame.display.fliph:Nt(j#update() (in module pygame.display)pygame.display.updateh:Nt(j'get_driver() (in module pygame.display)pygame.display.get_driverh:Nt(j!Info() (in module pygame.display)pygame.display.Infoh:Nt(j(get_wm_info() (in module pygame.display)pygame.display.get_wm_infoh:Nt(j.get_desktop_sizes() (in module pygame.display) pygame.display.get_desktop_sizesh:Nt(j'list_modes() (in module pygame.display)pygame.display.list_modesh:Nt(j$mode_ok() (in module pygame.display)pygame.display.mode_okh:Nt(j-gl_get_attribute() (in module pygame.display)pygame.display.gl_get_attributeh:Nt(j-gl_set_attribute() (in module pygame.display)pygame.display.gl_set_attributeh:Nt(j'get_active() (in module pygame.display)pygame.display.get_activeh:Nt(j$iconify() (in module pygame.display)pygame.display.iconifyh:Nt(j.toggle_fullscreen() (in module pygame.display) pygame.display.toggle_fullscreenh:Nt(j&set_gamma() (in module pygame.display)pygame.display.set_gammah:Nt(j+set_gamma_ramp() (in module pygame.display)pygame.display.set_gamma_ramph:Nt(j%set_icon() (in module pygame.display)pygame.display.set_iconh:Nt(j(set_caption() (in module pygame.display)pygame.display.set_captionh:Nt(j(get_caption() (in module pygame.display)pygame.display.get_captionh:Nt(j(set_palette() (in module pygame.display)pygame.display.set_paletteh:Nt(j-get_num_displays() (in module pygame.display)pygame.display.get_num_displaysh:Nt(j,get_window_size() (in module pygame.display)pygame.display.get_window_sizeh:Nt(j2get_allow_screensaver() (in module pygame.display)$pygame.display.get_allow_screensaverh:Nt(j2set_allow_screensaver() (in module pygame.display)$pygame.display.set_allow_screensaverh:Ntej5]((jmodule; pygame.drawmodule-pygame.drawh:Nt(jrect() (in module pygame.draw)pygame.draw.recth:Nt(j!polygon() (in module pygame.draw)pygame.draw.polygonh:Nt(j circle() (in module pygame.draw)pygame.draw.circleh:Nt(j!ellipse() (in module pygame.draw)pygame.draw.ellipseh:Nt(jarc() (in module pygame.draw)pygame.draw.arch:Nt(jline() (in module pygame.draw)pygame.draw.lineh:Nt(jlines() (in module pygame.draw)pygame.draw.linesh:Nt(j aaline() (in module pygame.draw)pygame.draw.aalineh:Nt(j!aalines() (in module pygame.draw)pygame.draw.aalinesh:Ntejd]((jmodule; pygame.eventmodule-pygame.eventh:Nt(jpump() (in module pygame.event)pygame.event.pumph:Nt(jget() (in module pygame.event)pygame.event.geth:Nt(jpoll() (in module pygame.event)pygame.event.pollh:Nt(jwait() (in module pygame.event)pygame.event.waith:Nt(jpeek() (in module pygame.event)pygame.event.peekh:Nt(j clear() (in module pygame.event)pygame.event.clearh:Nt(j%event_name() (in module pygame.event)pygame.event.event_nameh:Nt(j&set_blocked() (in module pygame.event)pygame.event.set_blockedh:Nt(j&set_allowed() (in module pygame.event)pygame.event.set_allowedh:Nt(j&get_blocked() (in module pygame.event)pygame.event.get_blockedh:Nt(j#set_grab() (in module pygame.event)pygame.event.set_grabh:Nt(j#get_grab() (in module pygame.event)pygame.event.get_grabh:Nt(j,set_keyboard_grab() (in module pygame.event)pygame.event.set_keyboard_grabh:Nt(j,get_keyboard_grab() (in module pygame.event)pygame.event.get_keyboard_grabh:Nt(jpost() (in module pygame.event)pygame.event.posth:Nt(j&custom_type() (in module pygame.event)pygame.event.custom_typeh:Nt(jEvent (class in pygame.event)pygame.event.Eventh:Nt(j#type (pygame.event.Event attribute)pygame.event.Event.typeh:Nt(j'__dict__ (pygame.event.Event attribute)pygame.event.Event.__dict__h:Ntejn]((jmodule; pygame.examplesmodule-pygame.examplesh:Nt(j)aliens.main() (in module pygame.examples)pygame.examples.aliens.mainh:Nt(j(stars.main() (in module pygame.examples)pygame.examples.stars.mainh:Nt(j(chimp.main() (in module pygame.examples)pygame.examples.chimp.mainh:Nt(j)moveit.main() (in module pygame.examples)pygame.examples.moveit.mainh:Nt(j(fonty.main() (in module pygame.examples)pygame.examples.fonty.mainh:Nt(j0freetype_misc.main() (in module pygame.examples)"pygame.examples.freetype_misc.mainh:Nt(j)vgrade.main() (in module pygame.examples)pygame.examples.vgrade.mainh:Nt(j,eventlist.main() (in module pygame.examples)pygame.examples.eventlist.mainh:Nt(j,arraydemo.main() (in module pygame.examples)pygame.examples.arraydemo.mainh:Nt(j(sound.main() (in module pygame.examples)pygame.examples.sound.mainh:Nt(j4sound_array_demos.main() (in module pygame.examples)&pygame.examples.sound_array_demos.mainh:Nt(j)liquid.main() (in module pygame.examples)pygame.examples.liquid.mainh:Nt(j)glcube.main() (in module pygame.examples)pygame.examples.glcube.mainh:Nt(j2scrap_clipboard.main() (in module pygame.examples)$pygame.examples.scrap_clipboard.mainh:Nt(j'mask.main() (in module pygame.examples)pygame.examples.mask.mainh:Nt(j-testsprite.main() (in module pygame.examples)pygame.examples.testsprite.mainh:Nt(j=headless_no_windows_needed.main() (in module pygame.examples)/pygame.examples.headless_no_windows_needed.mainh:Nt(j+joystick.main() (in module pygame.examples)pygame.examples.joystick.mainh:Nt(j-blend_fill.main() (in module pygame.examples)pygame.examples.blend_fill.mainh:Nt(j.blit_blends.main() (in module pygame.examples) pygame.examples.blit_blends.mainh:Nt(j*cursors.main() (in module pygame.examples)pygame.examples.cursors.mainh:Nt(j-pixelarray.main() (in module pygame.examples)pygame.examples.pixelarray.mainh:Nt(j,scaletest.main() (in module pygame.examples)pygame.examples.scaletest.mainh:Nt(j'midi.main() (in module pygame.examples)pygame.examples.midi.mainh:Nt(j)scroll.main() (in module pygame.examples)pygame.examples.scroll.mainh:Nt(j)camera.main() (in module pygame.examples)pygame.examples.camera.mainh:Nt(j*playmus.main() (in module pygame.examples)pygame.examples.playmus.mainh:NtejC]((jmodule; pygame.fasteventmodule-pygame.fasteventh:Nt(j#init() (in module pygame.fastevent)pygame.fastevent.inith:Nt(j'get_init() (in module pygame.fastevent)pygame.fastevent.get_inith:Nt(j#pump() (in module pygame.fastevent)pygame.fastevent.pumph:Nt(j#wait() (in module pygame.fastevent)pygame.fastevent.waith:Nt(j#poll() (in module pygame.fastevent)pygame.fastevent.pollh:Nt(j"get() (in module pygame.fastevent)pygame.fastevent.geth:Nt(j#post() (in module pygame.fastevent)pygame.fastevent.posth:Ntej]((jmodule; pygame.fontmodule-pygame.fonth:Nt(jinit() (in module pygame.font)pygame.font.inith:Nt(jquit() (in module pygame.font)pygame.font.quith:Nt(j"get_init() (in module pygame.font)pygame.font.get_inith:Nt(j*get_default_font() (in module pygame.font)pygame.font.get_default_fonth:Nt(j-get_sdl_ttf_version() (in module pygame.font)pygame.font.get_sdl_ttf_versionh:Nt(j#get_fonts() (in module pygame.font)pygame.font.get_fontsh:Nt(j$match_font() (in module pygame.font)pygame.font.match_fonth:Nt(j!SysFont() (in module pygame.font)pygame.font.SysFonth:Nt(jFont (class in pygame.font)pygame.font.Fonth:Nt(j!bold (pygame.font.Font attribute)pygame.font.Font.boldh:Nt(j#italic (pygame.font.Font attribute)pygame.font.Font.italich:Nt(j&underline (pygame.font.Font attribute)pygame.font.Font.underlineh:Nt(j*strikethrough (pygame.font.Font attribute)pygame.font.Font.strikethroughh:Nt(j"render() (pygame.font.Font method)pygame.font.Font.renderh:Nt(j size() (pygame.font.Font method)pygame.font.Font.sizeh:Nt(j)set_underline() (pygame.font.Font method)pygame.font.Font.set_underlineh:Nt(j)get_underline() (pygame.font.Font method)pygame.font.Font.get_underlineh:Nt(j-set_strikethrough() (pygame.font.Font method)"pygame.font.Font.set_strikethroughh:Nt(j-get_strikethrough() (pygame.font.Font method)"pygame.font.Font.get_strikethroughh:Nt(j$set_bold() (pygame.font.Font method)pygame.font.Font.set_boldh:Nt(j$get_bold() (pygame.font.Font method)pygame.font.Font.get_boldh:Nt(j&set_italic() (pygame.font.Font method)pygame.font.Font.set_italich:Nt(j#metrics() (pygame.font.Font method)pygame.font.Font.metricsh:Nt(j&get_italic() (pygame.font.Font method)pygame.font.Font.get_italich:Nt(j(get_linesize() (pygame.font.Font method)pygame.font.Font.get_linesizeh:Nt(j&get_height() (pygame.font.Font method)pygame.font.Font.get_heighth:Nt(j&get_ascent() (pygame.font.Font method)pygame.font.Font.get_ascenth:Nt(j'get_descent() (pygame.font.Font method)pygame.font.Font.get_descenth:Nt(j&set_script() (pygame.font.Font method)pygame.font.Font.set_scripth:NtejW]((jmodule; pygame.freetypemodule-pygame.freetypeh:Nt(j'get_error() (in module pygame.freetype)pygame.freetype.get_errorh:Nt(j)get_version() (in module pygame.freetype)pygame.freetype.get_versionh:Nt(j"init() (in module pygame.freetype)pygame.freetype.inith:Nt(j"quit() (in module pygame.freetype)pygame.freetype.quith:Nt(j&get_init() (in module pygame.freetype)pygame.freetype.get_inith:Nt(j&was_init() (in module pygame.freetype)pygame.freetype.was_inith:Nt(j,get_cache_size() (in module pygame.freetype)pygame.freetype.get_cache_sizeh:Nt(j4get_default_resolution() (in module pygame.freetype)&pygame.freetype.get_default_resolutionh:Nt(j4set_default_resolution() (in module pygame.freetype)&pygame.freetype.set_default_resolutionh:Nt(j%SysFont() (in module pygame.freetype)pygame.freetype.SysFonth:Nt(j.get_default_font() (in module pygame.freetype) pygame.freetype.get_default_fonth:Nt(jFont (class in pygame.freetype)pygame.freetype.Fonth:Nt(j%name (pygame.freetype.Font attribute)pygame.freetype.Font.nameh:Nt(j%path (pygame.freetype.Font attribute)pygame.freetype.Font.pathh:Nt(j%size (pygame.freetype.Font attribute)pygame.freetype.Font.sizeh:Nt(j(get_rect() (pygame.freetype.Font method)pygame.freetype.Font.get_recth:Nt(j+get_metrics() (pygame.freetype.Font method) pygame.freetype.Font.get_metricsh:Nt(j'height (pygame.freetype.Font attribute)pygame.freetype.Font.heighth:Nt(j)ascender (pygame.freetype.Font attribute)pygame.freetype.Font.ascenderh:Nt(j*descender (pygame.freetype.Font attribute)pygame.freetype.Font.descenderh:Nt(j2get_sized_ascender() (pygame.freetype.Font method)'pygame.freetype.Font.get_sized_ascenderh:Nt(j3get_sized_descender() (pygame.freetype.Font method)(pygame.freetype.Font.get_sized_descenderh:Nt(j0get_sized_height() (pygame.freetype.Font method)%pygame.freetype.Font.get_sized_heighth:Nt(j6get_sized_glyph_height() (pygame.freetype.Font method)+pygame.freetype.Font.get_sized_glyph_heighth:Nt(j)get_sizes() (pygame.freetype.Font method)pygame.freetype.Font.get_sizesh:Nt(j&render() (pygame.freetype.Font method)pygame.freetype.Font.renderh:Nt(j)render_to() (pygame.freetype.Font method)pygame.freetype.Font.render_toh:Nt(j*render_raw() (pygame.freetype.Font method)pygame.freetype.Font.render_rawh:Nt(j-render_raw_to() (pygame.freetype.Font method)"pygame.freetype.Font.render_raw_toh:Nt(j&style (pygame.freetype.Font attribute)pygame.freetype.Font.styleh:Nt(j*underline (pygame.freetype.Font attribute)pygame.freetype.Font.underlineh:Nt(j'strong (pygame.freetype.Font attribute)pygame.freetype.Font.strongh:Nt(j(oblique (pygame.freetype.Font attribute)pygame.freetype.Font.obliqueh:Nt(j%wide (pygame.freetype.Font attribute)pygame.freetype.Font.wideh:Nt(j)strength (pygame.freetype.Font attribute)pygame.freetype.Font.strengthh:Nt(j5underline_adjustment (pygame.freetype.Font attribute))pygame.freetype.Font.underline_adjustmenth:Nt(j,fixed_width (pygame.freetype.Font attribute) pygame.freetype.Font.fixed_widthh:Nt(j,fixed_sizes (pygame.freetype.Font attribute) pygame.freetype.Font.fixed_sizesh:Nt(j)scalable (pygame.freetype.Font attribute)pygame.freetype.Font.scalableh:Nt(j3use_bitmap_strikes (pygame.freetype.Font attribute)'pygame.freetype.Font.use_bitmap_strikesh:Nt(j,antialiased (pygame.freetype.Font attribute) pygame.freetype.Font.antialiasedh:Nt(j(kerning (pygame.freetype.Font attribute)pygame.freetype.Font.kerningh:Nt(j)vertical (pygame.freetype.Font attribute)pygame.freetype.Font.verticalh:Nt(j)rotation (pygame.freetype.Font attribute)pygame.freetype.Font.rotationh:Nt(j(fgcolor (pygame.freetype.Font attribute)pygame.freetype.Font.fgcolorh:Nt(j(bgcolor (pygame.freetype.Font attribute)pygame.freetype.Font.bgcolorh:Nt(j'origin (pygame.freetype.Font attribute)pygame.freetype.Font.originh:Nt(j$pad (pygame.freetype.Font attribute)pygame.freetype.Font.padh:Nt(j%ucs4 (pygame.freetype.Font attribute)pygame.freetype.Font.ucs4h:Nt(j+resolution (pygame.freetype.Font attribute)pygame.freetype.Font.resolutionh:Ntejh]((jmodule; pygame.gfxdrawmodule-pygame.gfxdrawh:Nt(j"pixel() (in module pygame.gfxdraw)pygame.gfxdraw.pixelh:Nt(j"hline() (in module pygame.gfxdraw)pygame.gfxdraw.hlineh:Nt(j"vline() (in module pygame.gfxdraw)pygame.gfxdraw.vlineh:Nt(j!line() (in module pygame.gfxdraw)pygame.gfxdraw.lineh:Nt(j&rectangle() (in module pygame.gfxdraw)pygame.gfxdraw.rectangleh:Nt(j box() (in module pygame.gfxdraw)pygame.gfxdraw.boxh:Nt(j#circle() (in module pygame.gfxdraw)pygame.gfxdraw.circleh:Nt(j%aacircle() (in module pygame.gfxdraw)pygame.gfxdraw.aacircleh:Nt(j*filled_circle() (in module pygame.gfxdraw)pygame.gfxdraw.filled_circleh:Nt(j$ellipse() (in module pygame.gfxdraw)pygame.gfxdraw.ellipseh:Nt(j&aaellipse() (in module pygame.gfxdraw)pygame.gfxdraw.aaellipseh:Nt(j+filled_ellipse() (in module pygame.gfxdraw)pygame.gfxdraw.filled_ellipseh:Nt(j arc() (in module pygame.gfxdraw)pygame.gfxdraw.arch:Nt(j pie() (in module pygame.gfxdraw)pygame.gfxdraw.pieh:Nt(j#trigon() (in module pygame.gfxdraw)pygame.gfxdraw.trigonh:Nt(j%aatrigon() (in module pygame.gfxdraw)pygame.gfxdraw.aatrigonh:Nt(j*filled_trigon() (in module pygame.gfxdraw)pygame.gfxdraw.filled_trigonh:Nt(j$polygon() (in module pygame.gfxdraw)pygame.gfxdraw.polygonh:Nt(j&aapolygon() (in module pygame.gfxdraw)pygame.gfxdraw.aapolygonh:Nt(j+filled_polygon() (in module pygame.gfxdraw)pygame.gfxdraw.filled_polygonh:Nt(j-textured_polygon() (in module pygame.gfxdraw)pygame.gfxdraw.textured_polygonh:Nt(j#bezier() (in module pygame.gfxdraw)pygame.gfxdraw.bezierh:Ntej7]((jmodule; pygame.imagemodule-pygame.imageh:Nt(jload() (in module pygame.image)pygame.image.loadh:Nt(jsave() (in module pygame.image)pygame.image.saveh:Nt(j0get_sdl_image_version() (in module pygame.image)"pygame.image.get_sdl_image_versionh:Nt(j'get_extended() (in module pygame.image)pygame.image.get_extendedh:Nt(j#tostring() (in module pygame.image)pygame.image.tostringh:Nt(j"tobytes() (in module pygame.image)pygame.image.tobytesh:Nt(j%fromstring() (in module pygame.image)pygame.image.fromstringh:Nt(j$frombytes() (in module pygame.image)pygame.image.frombytesh:Nt(j%frombuffer() (in module pygame.image)pygame.image.frombufferh:Nt(j%load_basic() (in module pygame.image)pygame.image.load_basich:Nt(j(load_extended() (in module pygame.image)pygame.image.load_extendedh:Nt(j(save_extended() (in module pygame.image)pygame.image.save_extendedh:Ntej]((jmodule; pygame.joystickmodule-pygame.joystickh:Nt(j"init() (in module pygame.joystick)pygame.joystick.inith:Nt(j"quit() (in module pygame.joystick)pygame.joystick.quith:Nt(j&get_init() (in module pygame.joystick)pygame.joystick.get_inith:Nt(j'get_count() (in module pygame.joystick)pygame.joystick.get_counth:Nt(j#Joystick (class in pygame.joystick)pygame.joystick.Joystickh:Nt(j(init() (pygame.joystick.Joystick method)pygame.joystick.Joystick.inith:Nt(j(quit() (pygame.joystick.Joystick method)pygame.joystick.Joystick.quith:Nt(j,get_init() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_inith:Nt(j*get_id() (pygame.joystick.Joystick method)pygame.joystick.Joystick.get_idh:Nt(j3get_instance_id() (pygame.joystick.Joystick method)(pygame.joystick.Joystick.get_instance_idh:Nt(j,get_guid() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_guidh:Nt(j3get_power_level() (pygame.joystick.Joystick method)(pygame.joystick.Joystick.get_power_levelh:Nt(j,get_name() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_nameh:Nt(j/get_numaxes() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.get_numaxesh:Nt(j,get_axis() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_axish:Nt(j0get_numballs() (pygame.joystick.Joystick method)%pygame.joystick.Joystick.get_numballsh:Nt(j,get_ball() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_ballh:Nt(j2get_numbuttons() (pygame.joystick.Joystick method)'pygame.joystick.Joystick.get_numbuttonsh:Nt(j.get_button() (pygame.joystick.Joystick method)#pygame.joystick.Joystick.get_buttonh:Nt(j/get_numhats() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.get_numhatsh:Nt(j+get_hat() (pygame.joystick.Joystick method) pygame.joystick.Joystick.get_hath:Nt(j*rumble() (pygame.joystick.Joystick method)pygame.joystick.Joystick.rumbleh:Nt(j/stop_rumble() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.stop_rumbleh:Ntej^]((jmodule; pygame.keymodule-pygame.keyh:Nt(j$get_focused() (in module pygame.key)pygame.key.get_focusedh:Nt(j$get_pressed() (in module pygame.key)pygame.key.get_pressedh:Nt(j!get_mods() (in module pygame.key)pygame.key.get_modsh:Nt(j!set_mods() (in module pygame.key)pygame.key.set_modsh:Nt(j#set_repeat() (in module pygame.key)pygame.key.set_repeath:Nt(j#get_repeat() (in module pygame.key)pygame.key.get_repeath:Nt(jname() (in module pygame.key)pygame.key.nameh:Nt(j!key_code() (in module pygame.key)pygame.key.key_codeh:Nt(j)start_text_input() (in module pygame.key)pygame.key.start_text_inputh:Nt(j(stop_text_input() (in module pygame.key)pygame.key.stop_text_inputh:Nt(j,set_text_input_rect() (in module pygame.key)pygame.key.set_text_input_recth:Ntej](jmodule; pygame.localsmodule-pygame.localsh:Ntaj#]((jmodule; pygame.maskmodule-pygame.maskh:Nt(j&from_surface() (in module pygame.mask)pygame.mask.from_surfaceh:Nt(j(from_threshold() (in module pygame.mask)pygame.mask.from_thresholdh:Nt(jMask (class in pygame.mask)pygame.mask.Maskh:Nt(j copy() (pygame.mask.Mask method)pygame.mask.Mask.copyh:Nt(j$get_size() (pygame.mask.Mask method)pygame.mask.Mask.get_sizeh:Nt(j$get_rect() (pygame.mask.Mask method)pygame.mask.Mask.get_recth:Nt(j"get_at() (pygame.mask.Mask method)pygame.mask.Mask.get_ath:Nt(j"set_at() (pygame.mask.Mask method)pygame.mask.Mask.set_ath:Nt(j#overlap() (pygame.mask.Mask method)pygame.mask.Mask.overlaph:Nt(j(overlap_area() (pygame.mask.Mask method)pygame.mask.Mask.overlap_areah:Nt(j(overlap_mask() (pygame.mask.Mask method)pygame.mask.Mask.overlap_maskh:Nt(j fill() (pygame.mask.Mask method)pygame.mask.Mask.fillh:Nt(j!clear() (pygame.mask.Mask method)pygame.mask.Mask.clearh:Nt(j"invert() (pygame.mask.Mask method)pygame.mask.Mask.inverth:Nt(j!scale() (pygame.mask.Mask method)pygame.mask.Mask.scaleh:Nt(j draw() (pygame.mask.Mask method)pygame.mask.Mask.drawh:Nt(j!erase() (pygame.mask.Mask method)pygame.mask.Mask.eraseh:Nt(j!count() (pygame.mask.Mask method)pygame.mask.Mask.counth:Nt(j$centroid() (pygame.mask.Mask method)pygame.mask.Mask.centroidh:Nt(j!angle() (pygame.mask.Mask method)pygame.mask.Mask.angleh:Nt(j#outline() (pygame.mask.Mask method)pygame.mask.Mask.outlineh:Nt(j$convolve() (pygame.mask.Mask method)pygame.mask.Mask.convolveh:Nt(j/connected_component() (pygame.mask.Mask method)$pygame.mask.Mask.connected_componenth:Nt(j0connected_components() (pygame.mask.Mask method)%pygame.mask.Mask.connected_componentsh:Nt(j.get_bounding_rects() (pygame.mask.Mask method)#pygame.mask.Mask.get_bounding_rectsh:Nt(j&to_surface() (pygame.mask.Mask method)pygame.mask.Mask.to_surfaceh:Ntej*]((jmodule; pygame.mathmodule-pygame.mathh:Nt(jclamp() (in module pygame.math)pygame.math.clamph:Nt(jlerp() (in module pygame.math)pygame.math.lerph:Nt(jVector2 (class in pygame.math)pygame.math.Vector2h:Nt(j"dot() (pygame.math.Vector2 method)pygame.math.Vector2.doth:Nt(j$cross() (pygame.math.Vector2 method)pygame.math.Vector2.crossh:Nt(j(magnitude() (pygame.math.Vector2 method)pygame.math.Vector2.magnitudeh:Nt(j0magnitude_squared() (pygame.math.Vector2 method)%pygame.math.Vector2.magnitude_squaredh:Nt(j%length() (pygame.math.Vector2 method)pygame.math.Vector2.lengthh:Nt(j-length_squared() (pygame.math.Vector2 method)"pygame.math.Vector2.length_squaredh:Nt(j(normalize() (pygame.math.Vector2 method)pygame.math.Vector2.normalizeh:Nt(j+normalize_ip() (pygame.math.Vector2 method) pygame.math.Vector2.normalize_iph:Nt(j,is_normalized() (pygame.math.Vector2 method)!pygame.math.Vector2.is_normalizedh:Nt(j.scale_to_length() (pygame.math.Vector2 method)#pygame.math.Vector2.scale_to_lengthh:Nt(j&reflect() (pygame.math.Vector2 method)pygame.math.Vector2.reflecth:Nt(j)reflect_ip() (pygame.math.Vector2 method)pygame.math.Vector2.reflect_iph:Nt(j*distance_to() (pygame.math.Vector2 method)pygame.math.Vector2.distance_toh:Nt(j2distance_squared_to() (pygame.math.Vector2 method)'pygame.math.Vector2.distance_squared_toh:Nt(j+move_towards() (pygame.math.Vector2 method) pygame.math.Vector2.move_towardsh:Nt(j.move_towards_ip() (pygame.math.Vector2 method)#pygame.math.Vector2.move_towards_iph:Nt(j#lerp() (pygame.math.Vector2 method)pygame.math.Vector2.lerph:Nt(j$slerp() (pygame.math.Vector2 method)pygame.math.Vector2.slerph:Nt(j*elementwise() (pygame.math.Vector2 method)pygame.math.Vector2.elementwiseh:Nt(j%rotate() (pygame.math.Vector2 method)pygame.math.Vector2.rotateh:Nt(j)rotate_rad() (pygame.math.Vector2 method)pygame.math.Vector2.rotate_radh:Nt(j(rotate_ip() (pygame.math.Vector2 method)pygame.math.Vector2.rotate_iph:Nt(j,rotate_ip_rad() (pygame.math.Vector2 method)!pygame.math.Vector2.rotate_ip_radh:Nt(j,rotate_rad_ip() (pygame.math.Vector2 method)!pygame.math.Vector2.rotate_rad_iph:Nt(j'angle_to() (pygame.math.Vector2 method)pygame.math.Vector2.angle_toh:Nt(j'as_polar() (pygame.math.Vector2 method)pygame.math.Vector2.as_polarh:Nt(j)from_polar() (pygame.math.Vector2 method)pygame.math.Vector2.from_polarh:Nt(j&project() (pygame.math.Vector2 method)pygame.math.Vector2.projecth:Nt(j#copy() (pygame.math.Vector2 method)pygame.math.Vector2.copyh:Nt(j.clamp_magnitude() (pygame.math.Vector2 method)#pygame.math.Vector2.clamp_magnitudeh:Nt(j1clamp_magnitude_ip() (pygame.math.Vector2 method)&pygame.math.Vector2.clamp_magnitude_iph:Nt(j%update() (pygame.math.Vector2 method)pygame.math.Vector2.updateh:Nt(j'epsilon (pygame.math.Vector2 attribute)pygame.math.Vector2.epsilonh:Nt(jVector3 (class in pygame.math)pygame.math.Vector3h:Nt(j"dot() (pygame.math.Vector3 method)pygame.math.Vector3.doth:Nt(j$cross() (pygame.math.Vector3 method)pygame.math.Vector3.crossh:Nt(j(magnitude() (pygame.math.Vector3 method)pygame.math.Vector3.magnitudeh:Nt(j0magnitude_squared() (pygame.math.Vector3 method)%pygame.math.Vector3.magnitude_squaredh:Nt(j%length() (pygame.math.Vector3 method)pygame.math.Vector3.lengthh:Nt(j-length_squared() (pygame.math.Vector3 method)"pygame.math.Vector3.length_squaredh:Nt(j(normalize() (pygame.math.Vector3 method)pygame.math.Vector3.normalizeh:Nt(j+normalize_ip() (pygame.math.Vector3 method) pygame.math.Vector3.normalize_iph:Nt(j,is_normalized() (pygame.math.Vector3 method)!pygame.math.Vector3.is_normalizedh:Nt(j.scale_to_length() (pygame.math.Vector3 method)#pygame.math.Vector3.scale_to_lengthh:Nt(j&reflect() (pygame.math.Vector3 method)pygame.math.Vector3.reflecth:Nt(j)reflect_ip() (pygame.math.Vector3 method)pygame.math.Vector3.reflect_iph:Nt(j*distance_to() (pygame.math.Vector3 method)pygame.math.Vector3.distance_toh:Nt(j2distance_squared_to() (pygame.math.Vector3 method)'pygame.math.Vector3.distance_squared_toh:Nt(j+move_towards() (pygame.math.Vector3 method) pygame.math.Vector3.move_towardsh:Nt(j.move_towards_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.move_towards_iph:Nt(j#lerp() (pygame.math.Vector3 method)pygame.math.Vector3.lerph:Nt(j$slerp() (pygame.math.Vector3 method)pygame.math.Vector3.slerph:Nt(j*elementwise() (pygame.math.Vector3 method)pygame.math.Vector3.elementwiseh:Nt(j%rotate() (pygame.math.Vector3 method)pygame.math.Vector3.rotateh:Nt(j)rotate_rad() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_radh:Nt(j(rotate_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_iph:Nt(j,rotate_ip_rad() (pygame.math.Vector3 method)!pygame.math.Vector3.rotate_ip_radh:Nt(j,rotate_rad_ip() (pygame.math.Vector3 method)!pygame.math.Vector3.rotate_rad_iph:Nt(j'rotate_x() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_xh:Nt(j+rotate_x_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_x_radh:Nt(j*rotate_x_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_x_iph:Nt(j.rotate_x_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_x_ip_radh:Nt(j.rotate_x_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_x_rad_iph:Nt(j'rotate_y() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_yh:Nt(j+rotate_y_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_y_radh:Nt(j*rotate_y_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_y_iph:Nt(j.rotate_y_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_y_ip_radh:Nt(j.rotate_y_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_y_rad_iph:Nt(j'rotate_z() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_zh:Nt(j+rotate_z_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_z_radh:Nt(j*rotate_z_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_z_iph:Nt(j.rotate_z_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_z_ip_radh:Nt(j.rotate_z_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_z_rad_iph:Nt(j'angle_to() (pygame.math.Vector3 method)pygame.math.Vector3.angle_toh:Nt(j+as_spherical() (pygame.math.Vector3 method) pygame.math.Vector3.as_sphericalh:Nt(j-from_spherical() (pygame.math.Vector3 method)"pygame.math.Vector3.from_sphericalh:Nt(j&project() (pygame.math.Vector3 method)pygame.math.Vector3.projecth:Nt(j#copy() (pygame.math.Vector3 method)pygame.math.Vector3.copyh:Nt(j.clamp_magnitude() (pygame.math.Vector3 method)#pygame.math.Vector3.clamp_magnitudeh:Nt(j1clamp_magnitude_ip() (pygame.math.Vector3 method)&pygame.math.Vector3.clamp_magnitude_iph:Nt(j%update() (pygame.math.Vector3 method)pygame.math.Vector3.updateh:Nt(j'epsilon (pygame.math.Vector3 attribute)pygame.math.Vector3.epsilonh:Ntej`]((jmodule; pygame.midimodule-pygame.midih:Nt(jinit() (in module pygame.midi)pygame.midi.inith:Nt(jquit() (in module pygame.midi)pygame.midi.quith:Nt(j"get_init() (in module pygame.midi)pygame.midi.get_inith:Nt(jInput (class in pygame.midi)pygame.midi.Inputh:Nt(j"close() (pygame.midi.Input method)pygame.midi.Input.closeh:Nt(j!poll() (pygame.midi.Input method)pygame.midi.Input.pollh:Nt(j!read() (pygame.midi.Input method)pygame.midi.Input.readh:Nt(jOutput (class in pygame.midi)pygame.midi.Outputh:Nt(j#abort() (pygame.midi.Output method)pygame.midi.Output.aborth:Nt(j#close() (pygame.midi.Output method)pygame.midi.Output.closeh:Nt(j¬e_off() (pygame.midi.Output method)pygame.midi.Output.note_offh:Nt(j%note_on() (pygame.midi.Output method)pygame.midi.Output.note_onh:Nt(j,set_instrument() (pygame.midi.Output method)!pygame.midi.Output.set_instrumenth:Nt(j(pitch_bend() (pygame.midi.Output method)pygame.midi.Output.pitch_bendh:Nt(j#write() (pygame.midi.Output method)pygame.midi.Output.writeh:Nt(j)write_short() (pygame.midi.Output method)pygame.midi.Output.write_shorth:Nt(j*write_sys_ex() (pygame.midi.Output method)pygame.midi.Output.write_sys_exh:Nt(j#get_count() (in module pygame.midi)pygame.midi.get_counth:Nt(j.get_default_input_id() (in module pygame.midi) pygame.midi.get_default_input_idh:Nt(j/get_default_output_id() (in module pygame.midi)!pygame.midi.get_default_output_idh:Nt(j)get_device_info() (in module pygame.midi)pygame.midi.get_device_infoh:Nt(j&midis2events() (in module pygame.midi)pygame.midi.midis2eventsh:Nt(jtime() (in module pygame.midi)pygame.midi.timeh:Nt(j+frequency_to_midi() (in module pygame.midi)pygame.midi.frequency_to_midih:Nt(j+midi_to_frequency() (in module pygame.midi)pygame.midi.midi_to_frequencyh:Nt(j+midi_to_ansi_note() (in module pygame.midi)pygame.midi.midi_to_ansi_noteh:Nt(j MidiExceptionpygame.midi.MidiExceptionh:Ntej&]((jmodule; pygame.mixermodule-pygame.mixerh:Nt(jinit() (in module pygame.mixer)pygame.mixer.inith:Nt(j#pre_init() (in module pygame.mixer)pygame.mixer.pre_inith:Nt(jquit() (in module pygame.mixer)pygame.mixer.quith:Nt(j#get_init() (in module pygame.mixer)pygame.mixer.get_inith:Nt(jstop() (in module pygame.mixer)pygame.mixer.stoph:Nt(j pause() (in module pygame.mixer)pygame.mixer.pauseh:Nt(j"unpause() (in module pygame.mixer)pygame.mixer.unpauseh:Nt(j"fadeout() (in module pygame.mixer)pygame.mixer.fadeouth:Nt(j+set_num_channels() (in module pygame.mixer)pygame.mixer.set_num_channelsh:Nt(j+get_num_channels() (in module pygame.mixer)pygame.mixer.get_num_channelsh:Nt(j'set_reserved() (in module pygame.mixer)pygame.mixer.set_reservedh:Nt(j'find_channel() (in module pygame.mixer)pygame.mixer.find_channelh:Nt(j#get_busy() (in module pygame.mixer)pygame.mixer.get_busyh:Nt(j0get_sdl_mixer_version() (in module pygame.mixer)"pygame.mixer.get_sdl_mixer_versionh:Nt(jSound (class in pygame.mixer)pygame.mixer.Soundh:Nt(j"play() (pygame.mixer.Sound method)pygame.mixer.Sound.playh:Nt(j"stop() (pygame.mixer.Sound method)pygame.mixer.Sound.stoph:Nt(j%fadeout() (pygame.mixer.Sound method)pygame.mixer.Sound.fadeouth:Nt(j(set_volume() (pygame.mixer.Sound method)pygame.mixer.Sound.set_volumeh:Nt(j(get_volume() (pygame.mixer.Sound method)pygame.mixer.Sound.get_volumeh:Nt(j.get_num_channels() (pygame.mixer.Sound method)#pygame.mixer.Sound.get_num_channelsh:Nt(j(get_length() (pygame.mixer.Sound method)pygame.mixer.Sound.get_lengthh:Nt(j%get_raw() (pygame.mixer.Sound method)pygame.mixer.Sound.get_rawh:Nt(jChannel (class in pygame.mixer)pygame.mixer.Channelh:Nt(j$play() (pygame.mixer.Channel method)pygame.mixer.Channel.playh:Nt(j$stop() (pygame.mixer.Channel method)pygame.mixer.Channel.stoph:Nt(j%pause() (pygame.mixer.Channel method)pygame.mixer.Channel.pauseh:Nt(j'unpause() (pygame.mixer.Channel method)pygame.mixer.Channel.unpauseh:Nt(j'fadeout() (pygame.mixer.Channel method)pygame.mixer.Channel.fadeouth:Nt(j*set_volume() (pygame.mixer.Channel method)pygame.mixer.Channel.set_volumeh:Nt(j*get_volume() (pygame.mixer.Channel method)pygame.mixer.Channel.get_volumeh:Nt(j(get_busy() (pygame.mixer.Channel method)pygame.mixer.Channel.get_busyh:Nt(j)get_sound() (pygame.mixer.Channel method)pygame.mixer.Channel.get_soundh:Nt(j%queue() (pygame.mixer.Channel method)pygame.mixer.Channel.queueh:Nt(j)get_queue() (pygame.mixer.Channel method)pygame.mixer.Channel.get_queueh:Nt(j,set_endevent() (pygame.mixer.Channel method)!pygame.mixer.Channel.set_endeventh:Nt(j,get_endevent() (pygame.mixer.Channel method)!pygame.mixer.Channel.get_endeventh:Ntej;]((jmodule; pygame.mousemodule-pygame.mouseh:Nt(j&get_pressed() (in module pygame.mouse)pygame.mouse.get_pressedh:Nt(j"get_pos() (in module pygame.mouse)pygame.mouse.get_posh:Nt(j"get_rel() (in module pygame.mouse)pygame.mouse.get_relh:Nt(j"set_pos() (in module pygame.mouse)pygame.mouse.set_posh:Nt(j&set_visible() (in module pygame.mouse)pygame.mouse.set_visibleh:Nt(j&get_visible() (in module pygame.mouse)pygame.mouse.get_visibleh:Nt(j&get_focused() (in module pygame.mouse)pygame.mouse.get_focusedh:Nt(j%set_cursor() (in module pygame.mouse)pygame.mouse.set_cursorh:Nt(j%get_cursor() (in module pygame.mouse)pygame.mouse.get_cursorh:NtejK]((jmodule; pygame.mixer.musicmodule-pygame.mixer.musich:Nt(j%load() (in module pygame.mixer.music)pygame.mixer.music.loadh:Nt(j'unload() (in module pygame.mixer.music)pygame.mixer.music.unloadh:Nt(j%play() (in module pygame.mixer.music)pygame.mixer.music.playh:Nt(j'rewind() (in module pygame.mixer.music)pygame.mixer.music.rewindh:Nt(j%stop() (in module pygame.mixer.music)pygame.mixer.music.stoph:Nt(j&pause() (in module pygame.mixer.music)pygame.mixer.music.pauseh:Nt(j(unpause() (in module pygame.mixer.music)pygame.mixer.music.unpauseh:Nt(j(fadeout() (in module pygame.mixer.music)pygame.mixer.music.fadeouth:Nt(j+set_volume() (in module pygame.mixer.music)pygame.mixer.music.set_volumeh:Nt(j+get_volume() (in module pygame.mixer.music)pygame.mixer.music.get_volumeh:Nt(j)get_busy() (in module pygame.mixer.music)pygame.mixer.music.get_busyh:Nt(j(set_pos() (in module pygame.mixer.music)pygame.mixer.music.set_posh:Nt(j(get_pos() (in module pygame.mixer.music)pygame.mixer.music.get_posh:Nt(j&queue() (in module pygame.mixer.music)pygame.mixer.music.queueh:Nt(j-set_endevent() (in module pygame.mixer.music)pygame.mixer.music.set_endeventh:Nt(j-get_endevent() (in module pygame.mixer.music)pygame.mixer.music.get_endeventh:NtejM]((jOverlay (class in pygame)pygame.Overlayh:Nt(j!display() (pygame.Overlay method)pygame.Overlay.displayh:Nt(j&set_location() (pygame.Overlay method)pygame.Overlay.set_locationh:Nt(j&get_hardware() (pygame.Overlay method)pygame.Overlay.get_hardwareh:Ntejg]((jPixelArray (class in pygame)pygame.PixelArrayh:Nt(j%surface (pygame.PixelArray attribute)pygame.PixelArray.surfaceh:Nt(j&itemsize (pygame.PixelArray attribute)pygame.PixelArray.itemsizeh:Nt(j"ndim (pygame.PixelArray attribute)pygame.PixelArray.ndimh:Nt(j#shape (pygame.PixelArray attribute)pygame.PixelArray.shapeh:Nt(j%strides (pygame.PixelArray attribute)pygame.PixelArray.stridesh:Nt(j)make_surface() (pygame.PixelArray method)pygame.PixelArray.make_surfaceh:Nt(j$replace() (pygame.PixelArray method)pygame.PixelArray.replaceh:Nt(j$extract() (pygame.PixelArray method)pygame.PixelArray.extracth:Nt(j$compare() (pygame.PixelArray method)pygame.PixelArray.compareh:Nt(j&transpose() (pygame.PixelArray method)pygame.PixelArray.transposeh:Nt(j"close() (pygame.PixelArray method)pygame.PixelArray.closeh:NtejN]((jmodule; pygame.pixelcopymodule-pygame.pixelcopyh:Nt(j/surface_to_array() (in module pygame.pixelcopy)!pygame.pixelcopy.surface_to_arrayh:Nt(j/array_to_surface() (in module pygame.pixelcopy)!pygame.pixelcopy.array_to_surfaceh:Nt(j(map_array() (in module pygame.pixelcopy)pygame.pixelcopy.map_arrayh:Nt(j+make_surface() (in module pygame.pixelcopy)pygame.pixelcopy.make_surfaceh:Ntej]((jmodule; pygame module-pygameh:Nt(jinit() (in module pygame) pygame.inith:Nt(jquit() (in module pygame) pygame.quith:Nt(jget_init() (in module pygame)pygame.get_inith:Nt(jerror pygame.errorh:Nt(jget_error() (in module pygame)pygame.get_errorh:Nt(jset_error() (in module pygame)pygame.set_errorh:Nt(j$get_sdl_version() (in module pygame)pygame.get_sdl_versionh:Nt(j&get_sdl_byteorder() (in module pygame)pygame.get_sdl_byteorderh:Nt(j"register_quit() (in module pygame)pygame.register_quith:Nt(j"encode_string() (in module pygame)pygame.encode_stringh:Nt(j%encode_file_path() (in module pygame)pygame.encode_file_pathh:Nt(jmodule; pygame.versionmodule-pygame.versionh:Nt(jver (in module pygame.version)pygame.version.verh:Nt(j!vernum (in module pygame.version)pygame.version.vernumh:Nt(jrev (in module pygame.version)pygame.version.revh:Nt(jSDL (in module pygame.version)pygame.version.SDLh:NtejQ]((jRect (class in pygame) pygame.Recth:Nt(jcopy() (pygame.Rect method)pygame.Rect.copyh:Nt(jmove() (pygame.Rect method)pygame.Rect.moveh:Nt(jmove_ip() (pygame.Rect method)pygame.Rect.move_iph:Nt(jinflate() (pygame.Rect method)pygame.Rect.inflateh:Nt(j!inflate_ip() (pygame.Rect method)pygame.Rect.inflate_iph:Nt(jscale_by() (pygame.Rect method)pygame.Rect.scale_byh:Nt(j"scale_by_ip() (pygame.Rect method)pygame.Rect.scale_by_iph:Nt(jupdate() (pygame.Rect method)pygame.Rect.updateh:Nt(jclamp() (pygame.Rect method)pygame.Rect.clamph:Nt(jclamp_ip() (pygame.Rect method)pygame.Rect.clamp_iph:Nt(jclip() (pygame.Rect method)pygame.Rect.cliph:Nt(jclipline() (pygame.Rect method)pygame.Rect.cliplineh:Nt(junion() (pygame.Rect method)pygame.Rect.unionh:Nt(junion_ip() (pygame.Rect method)pygame.Rect.union_iph:Nt(junionall() (pygame.Rect method)pygame.Rect.unionallh:Nt(j"unionall_ip() (pygame.Rect method)pygame.Rect.unionall_iph:Nt(jfit() (pygame.Rect method)pygame.Rect.fith:Nt(j normalize() (pygame.Rect method)pygame.Rect.normalizeh:Nt(jcontains() (pygame.Rect method)pygame.Rect.containsh:Nt(j#collidepoint() (pygame.Rect method)pygame.Rect.collidepointh:Nt(j"colliderect() (pygame.Rect method)pygame.Rect.colliderecth:Nt(j"collidelist() (pygame.Rect method)pygame.Rect.collidelisth:Nt(j%collidelistall() (pygame.Rect method)pygame.Rect.collidelistallh:Nt(j%collideobjects() (pygame.Rect method)pygame.Rect.collideobjectsh:Nt(j(collideobjectsall() (pygame.Rect method)pygame.Rect.collideobjectsallh:Nt(j"collidedict() (pygame.Rect method)pygame.Rect.collidedicth:Nt(j%collidedictall() (pygame.Rect method)pygame.Rect.collidedictallh:Ntej+]((jmodule; pygame.scrapmodule-pygame.scraph:Nt(jinit() (in module pygame.scrap)pygame.scrap.inith:Nt(j#get_init() (in module pygame.scrap)pygame.scrap.get_inith:Nt(jget() (in module pygame.scrap)pygame.scrap.geth:Nt(j$get_types() (in module pygame.scrap)pygame.scrap.get_typesh:Nt(jput() (in module pygame.scrap)pygame.scrap.puth:Nt(j#contains() (in module pygame.scrap)pygame.scrap.containsh:Nt(jlost() (in module pygame.scrap)pygame.scrap.losth:Nt(j#set_mode() (in module pygame.scrap)pygame.scrap.set_modeh:Ntejj]((jmodule; pygame._sdl2.controllermodule-pygame._sdl2.controllerh:Nt(j*init() (in module pygame._sdl2.controller)pygame._sdl2.controller.inith:Nt(j*quit() (in module pygame._sdl2.controller)pygame._sdl2.controller.quith:Nt(j.get_init() (in module pygame._sdl2.controller) pygame._sdl2.controller.get_inith:Nt(j4set_eventstate() (in module pygame._sdl2.controller)&pygame._sdl2.controller.set_eventstateh:Nt(j4get_eventstate() (in module pygame._sdl2.controller)&pygame._sdl2.controller.get_eventstateh:Nt(j/get_count() (in module pygame._sdl2.controller)!pygame._sdl2.controller.get_counth:Nt(j3is_controller() (in module pygame._sdl2.controller)%pygame._sdl2.controller.is_controllerh:Nt(j3name_forindex() (in module pygame._sdl2.controller)%pygame._sdl2.controller.name_forindexh:Nt(j-Controller (class in pygame._sdl2.controller)"pygame._sdl2.controller.Controllerh:Nt(j2quit() (pygame._sdl2.controller.Controller method)'pygame._sdl2.controller.Controller.quith:Nt(j6get_init() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.get_inith:Nt(jBfrom_joystick() (pygame._sdl2.controller.Controller static method)0pygame._sdl2.controller.Controller.from_joystickh:Nt(j6attached() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.attachedh:Nt(j9as_joystick() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.as_joystickh:Nt(j6get_axis() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.get_axish:Nt(j8get_button() (pygame._sdl2.controller.Controller method)-pygame._sdl2.controller.Controller.get_buttonh:Nt(j9get_mapping() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.get_mappingh:Nt(j9set_mapping() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.set_mappingh:Nt(j4rumble() (pygame._sdl2.controller.Controller method))pygame._sdl2.controller.Controller.rumbleh:Nt(j9stop_rumble() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.stop_rumbleh:Ntej9]((jmodule; pygame._sdl2.videomodule-pygame._sdl2.videoh:Nt(j$Window (class in pygame._sdl2.video)pygame._sdl2.video.Windowh:Nt(j>from_display_module() (pygame._sdl2.video.Window class method)-pygame._sdl2.video.Window.from_display_moduleh:Nt(j6from_window() (pygame._sdl2.video.Window class method)%pygame._sdl2.video.Window.from_windowh:Nt(j*grab (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.grabh:Nt(j4relative_mouse (pygame._sdl2.video.Window attribute)(pygame._sdl2.video.Window.relative_mouseh:Nt(j1set_windowed() (pygame._sdl2.video.Window method)&pygame._sdl2.video.Window.set_windowedh:Nt(j3set_fullscreen() (pygame._sdl2.video.Window method)(pygame._sdl2.video.Window.set_fullscreenh:Nt(j+title (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.titleh:Nt(j,destroy() (pygame._sdl2.video.Window method)!pygame._sdl2.video.Window.destroyh:Nt(j)hide() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.hideh:Nt(j)show() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.showh:Nt(j*focus() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.focush:Nt(j,restore() (pygame._sdl2.video.Window method)!pygame._sdl2.video.Window.restoreh:Nt(j-maximize() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.maximizeh:Nt(j-minimize() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.minimizeh:Nt(j/resizable (pygame._sdl2.video.Window attribute)#pygame._sdl2.video.Window.resizableh:Nt(j0borderless (pygame._sdl2.video.Window attribute)$pygame._sdl2.video.Window.borderlessh:Nt(j-set_icon() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.set_iconh:Nt(j(id (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.idh:Nt(j*size (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.sizeh:Nt(j.position (pygame._sdl2.video.Window attribute)"pygame._sdl2.video.Window.positionh:Nt(j-opacity (pygame._sdl2.video.Window attribute)!pygame._sdl2.video.Window.opacityh:Nt(j3display_index (pygame._sdl2.video.Window attribute)'pygame._sdl2.video.Window.display_indexh:Nt(j2set_modal_for() (pygame._sdl2.video.Window method)'pygame._sdl2.video.Window.set_modal_forh:Nt(j%Texture (class in pygame._sdl2.video)pygame._sdl2.video.Textureh:Nt(j9from_surface() (pygame._sdl2.video.Texture static method)'pygame._sdl2.video.Texture.from_surfaceh:Nt(j/renderer (pygame._sdl2.video.Texture attribute)#pygame._sdl2.video.Texture.rendererh:Nt(j,width (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.widthh:Nt(j-height (pygame._sdl2.video.Texture attribute)!pygame._sdl2.video.Texture.heighth:Nt(j,alpha (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.alphah:Nt(j1blend_mode (pygame._sdl2.video.Texture attribute)%pygame._sdl2.video.Texture.blend_modeh:Nt(j,color (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.colorh:Nt(j.get_rect() (pygame._sdl2.video.Texture method)#pygame._sdl2.video.Texture.get_recth:Nt(j*draw() (pygame._sdl2.video.Texture method)pygame._sdl2.video.Texture.drawh:Nt(j,update() (pygame._sdl2.video.Texture method)!pygame._sdl2.video.Texture.updateh:Nt(j#Image (class in pygame._sdl2.video)pygame._sdl2.video.Imageh:Nt(j,get_rect() (pygame._sdl2.video.Image method)!pygame._sdl2.video.Image.get_recth:Nt(j(draw() (pygame._sdl2.video.Image method)pygame._sdl2.video.Image.drawh:Nt(j*angle (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.angleh:Nt(j+origin (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.originh:Nt(j+flip_x (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.flip_xh:Nt(j+flip_y (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.flip_yh:Nt(j*color (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.colorh:Nt(j*alpha (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.alphah:Nt(j/blend_mode (pygame._sdl2.video.Image attribute)#pygame._sdl2.video.Image.blend_modeh:Nt(j,texture (pygame._sdl2.video.Image attribute) pygame._sdl2.video.Image.textureh:Nt(j,srcrect (pygame._sdl2.video.Image attribute) pygame._sdl2.video.Image.srcrecth:Nt(j&Renderer (class in pygame._sdl2.video)pygame._sdl2.video.Rendererh:Nt(j8from_window() (pygame._sdl2.video.Renderer class method)'pygame._sdl2.video.Renderer.from_windowh:Nt(j7draw_blend_mode (pygame._sdl2.video.Renderer attribute)+pygame._sdl2.video.Renderer.draw_blend_modeh:Nt(j2draw_color (pygame._sdl2.video.Renderer attribute)&pygame._sdl2.video.Renderer.draw_colorh:Nt(j,clear() (pygame._sdl2.video.Renderer method)!pygame._sdl2.video.Renderer.clearh:Nt(j.present() (pygame._sdl2.video.Renderer method)#pygame._sdl2.video.Renderer.presenth:Nt(j3get_viewport() (pygame._sdl2.video.Renderer method)(pygame._sdl2.video.Renderer.get_viewporth:Nt(j3set_viewport() (pygame._sdl2.video.Renderer method)(pygame._sdl2.video.Renderer.set_viewporth:Nt(j4logical_size (pygame._sdl2.video.Renderer attribute)(pygame._sdl2.video.Renderer.logical_sizeh:Nt(j-scale (pygame._sdl2.video.Renderer attribute)!pygame._sdl2.video.Renderer.scaleh:Nt(j.target (pygame._sdl2.video.Renderer attribute)"pygame._sdl2.video.Renderer.targeth:Nt(j+blit() (pygame._sdl2.video.Renderer method) pygame._sdl2.video.Renderer.blith:Nt(j0draw_line() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.draw_lineh:Nt(j1draw_point() (pygame._sdl2.video.Renderer method)&pygame._sdl2.video.Renderer.draw_pointh:Nt(j0draw_rect() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.draw_recth:Nt(j0fill_rect() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.fill_recth:Nt(j1to_surface() (pygame._sdl2.video.Renderer method)&pygame._sdl2.video.Renderer.to_surfaceh:Ntej/]((jmodule; pygame.sndarraymodule-pygame.sndarrayh:Nt(j#array() (in module pygame.sndarray)pygame.sndarray.arrayh:Nt(j%samples() (in module pygame.sndarray)pygame.sndarray.samplesh:Nt(j(make_sound() (in module pygame.sndarray)pygame.sndarray.make_soundh:Nt(j+use_arraytype() (in module pygame.sndarray)pygame.sndarray.use_arraytypeh:Nt(j+get_arraytype() (in module pygame.sndarray)pygame.sndarray.get_arraytypeh:Nt(j,get_arraytypes() (in module pygame.sndarray)pygame.sndarray.get_arraytypesh:Ntej]((jmodule; pygame.spritemodule-pygame.spriteh:Nt(jSprite (class in pygame.sprite)pygame.sprite.Spriteh:Nt(j&update() (pygame.sprite.Sprite method)pygame.sprite.Sprite.updateh:Nt(j#add() (pygame.sprite.Sprite method)pygame.sprite.Sprite.addh:Nt(j&remove() (pygame.sprite.Sprite method)pygame.sprite.Sprite.removeh:Nt(j$kill() (pygame.sprite.Sprite method)pygame.sprite.Sprite.killh:Nt(j%alive() (pygame.sprite.Sprite method)pygame.sprite.Sprite.aliveh:Nt(j&groups() (pygame.sprite.Sprite method)pygame.sprite.Sprite.groupsh:Nt(j#WeakSprite (class in pygame.sprite)pygame.sprite.WeakSpriteh:Nt(j$DirtySprite (class in pygame.sprite)pygame.sprite.DirtySpriteh:Nt(jGroup (class in pygame.sprite)pygame.sprite.Grouph:Nt(j&sprites() (pygame.sprite.Group method)pygame.sprite.Group.spritesh:Nt(j#copy() (pygame.sprite.Group method)pygame.sprite.Group.copyh:Nt(j"add() (pygame.sprite.Group method)pygame.sprite.Group.addh:Nt(j%remove() (pygame.sprite.Group method)pygame.sprite.Group.removeh:Nt(j"has() (pygame.sprite.Group method)pygame.sprite.Group.hash:Nt(j%update() (pygame.sprite.Group method)pygame.sprite.Group.updateh:Nt(j#draw() (pygame.sprite.Group method)pygame.sprite.Group.drawh:Nt(j$clear() (pygame.sprite.Group method)pygame.sprite.Group.clearh:Nt(j$empty() (pygame.sprite.Group method)pygame.sprite.Group.emptyh:Nt(j(WeakDirtySprite (class in pygame.sprite)pygame.sprite.WeakDirtySpriteh:Nt(j$RenderPlain (class in pygame.sprite)pygame.sprite.RenderPlainh:Nt(j$RenderClear (class in pygame.sprite)pygame.sprite.RenderClearh:Nt(j&RenderUpdates (class in pygame.sprite)pygame.sprite.RenderUpdatesh:Nt(j+draw() (pygame.sprite.RenderUpdates method) pygame.sprite.RenderUpdates.drawh:Nt(j*OrderedUpdates() (in module pygame.sprite)pygame.sprite.OrderedUpdatesh:Nt(j'LayeredUpdates (class in pygame.sprite)pygame.sprite.LayeredUpdatesh:Nt(j+add() (pygame.sprite.LayeredUpdates method) pygame.sprite.LayeredUpdates.addh:Nt(j/sprites() (pygame.sprite.LayeredUpdates method)$pygame.sprite.LayeredUpdates.spritesh:Nt(j,draw() (pygame.sprite.LayeredUpdates method)!pygame.sprite.LayeredUpdates.drawh:Nt(j6get_sprites_at() (pygame.sprite.LayeredUpdates method)+pygame.sprite.LayeredUpdates.get_sprites_ath:Nt(j2get_sprite() (pygame.sprite.LayeredUpdates method)'pygame.sprite.LayeredUpdates.get_spriteh:Nt(j?remove_sprites_of_layer() (pygame.sprite.LayeredUpdates method)4pygame.sprite.LayeredUpdates.remove_sprites_of_layerh:Nt(j.layers() (pygame.sprite.LayeredUpdates method)#pygame.sprite.LayeredUpdates.layersh:Nt(j4change_layer() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.change_layerh:Nt(j;get_layer_of_sprite() (pygame.sprite.LayeredUpdates method)0pygame.sprite.LayeredUpdates.get_layer_of_spriteh:Nt(j5get_top_layer() (pygame.sprite.LayeredUpdates method)*pygame.sprite.LayeredUpdates.get_top_layerh:Nt(j8get_bottom_layer() (pygame.sprite.LayeredUpdates method)-pygame.sprite.LayeredUpdates.get_bottom_layerh:Nt(j5move_to_front() (pygame.sprite.LayeredUpdates method)*pygame.sprite.LayeredUpdates.move_to_fronth:Nt(j4move_to_back() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.move_to_backh:Nt(j6get_top_sprite() (pygame.sprite.LayeredUpdates method)+pygame.sprite.LayeredUpdates.get_top_spriteh:Nt(j>get_sprites_from_layer() (pygame.sprite.LayeredUpdates method)3pygame.sprite.LayeredUpdates.get_sprites_from_layerh:Nt(j4switch_layer() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.switch_layerh:Nt(j%LayeredDirty (class in pygame.sprite)pygame.sprite.LayeredDirtyh:Nt(j*draw() (pygame.sprite.LayeredDirty method)pygame.sprite.LayeredDirty.drawh:Nt(j+clear() (pygame.sprite.LayeredDirty method) pygame.sprite.LayeredDirty.clearh:Nt(j2repaint_rect() (pygame.sprite.LayeredDirty method)'pygame.sprite.LayeredDirty.repaint_recth:Nt(j.set_clip() (pygame.sprite.LayeredDirty method)#pygame.sprite.LayeredDirty.set_cliph:Nt(j.get_clip() (pygame.sprite.LayeredDirty method)#pygame.sprite.LayeredDirty.get_cliph:Nt(j2change_layer() (pygame.sprite.LayeredDirty method)'pygame.sprite.LayeredDirty.change_layerh:Nt(j9set_timing_treshold() (pygame.sprite.LayeredDirty method).pygame.sprite.LayeredDirty.set_timing_tresholdh:Nt(j:set_timing_threshold() (pygame.sprite.LayeredDirty method)/pygame.sprite.LayeredDirty.set_timing_thresholdh:Nt(j'GroupSingle() (in module pygame.sprite)pygame.sprite.GroupSingleh:Nt(j)spritecollide() (in module pygame.sprite)pygame.sprite.spritecollideh:Nt(j(collide_rect() (in module pygame.sprite)pygame.sprite.collide_recth:Nt(j.collide_rect_ratio() (in module pygame.sprite) pygame.sprite.collide_rect_ratioh:Nt(j*collide_circle() (in module pygame.sprite)pygame.sprite.collide_circleh:Nt(j0collide_circle_ratio() (in module pygame.sprite)"pygame.sprite.collide_circle_ratioh:Nt(j(collide_mask() (in module pygame.sprite)pygame.sprite.collide_maskh:Nt(j(groupcollide() (in module pygame.sprite)pygame.sprite.groupcollideh:Nt(j,spritecollideany() (in module pygame.sprite)pygame.sprite.spritecollideanyh:NtejP]((jSurface (class in pygame)pygame.Surfaceh:Nt(jblit() (pygame.Surface method)pygame.Surface.blith:Nt(jblits() (pygame.Surface method)pygame.Surface.blitsh:Nt(j!convert() (pygame.Surface method)pygame.Surface.converth:Nt(j'convert_alpha() (pygame.Surface method)pygame.Surface.convert_alphah:Nt(jcopy() (pygame.Surface method)pygame.Surface.copyh:Nt(jfill() (pygame.Surface method)pygame.Surface.fillh:Nt(j scroll() (pygame.Surface method)pygame.Surface.scrollh:Nt(j&set_colorkey() (pygame.Surface method)pygame.Surface.set_colorkeyh:Nt(j&get_colorkey() (pygame.Surface method)pygame.Surface.get_colorkeyh:Nt(j#set_alpha() (pygame.Surface method)pygame.Surface.set_alphah:Nt(j#get_alpha() (pygame.Surface method)pygame.Surface.get_alphah:Nt(jlock() (pygame.Surface method)pygame.Surface.lockh:Nt(j unlock() (pygame.Surface method)pygame.Surface.unlockh:Nt(j"mustlock() (pygame.Surface method)pygame.Surface.mustlockh:Nt(j$get_locked() (pygame.Surface method)pygame.Surface.get_lockedh:Nt(j#get_locks() (pygame.Surface method)pygame.Surface.get_locksh:Nt(j get_at() (pygame.Surface method)pygame.Surface.get_ath:Nt(j set_at() (pygame.Surface method)pygame.Surface.set_ath:Nt(j'get_at_mapped() (pygame.Surface method)pygame.Surface.get_at_mappedh:Nt(j%get_palette() (pygame.Surface method)pygame.Surface.get_paletteh:Nt(j(get_palette_at() (pygame.Surface method)pygame.Surface.get_palette_ath:Nt(j%set_palette() (pygame.Surface method)pygame.Surface.set_paletteh:Nt(j(set_palette_at() (pygame.Surface method)pygame.Surface.set_palette_ath:Nt(j!map_rgb() (pygame.Surface method)pygame.Surface.map_rgbh:Nt(j#unmap_rgb() (pygame.Surface method)pygame.Surface.unmap_rgbh:Nt(j"set_clip() (pygame.Surface method)pygame.Surface.set_cliph:Nt(j"get_clip() (pygame.Surface method)pygame.Surface.get_cliph:Nt(j$subsurface() (pygame.Surface method)pygame.Surface.subsurfaceh:Nt(j$get_parent() (pygame.Surface method)pygame.Surface.get_parenth:Nt(j(get_abs_parent() (pygame.Surface method)pygame.Surface.get_abs_parenth:Nt(j$get_offset() (pygame.Surface method)pygame.Surface.get_offseth:Nt(j(get_abs_offset() (pygame.Surface method)pygame.Surface.get_abs_offseth:Nt(j"get_size() (pygame.Surface method)pygame.Surface.get_sizeh:Nt(j#get_width() (pygame.Surface method)pygame.Surface.get_widthh:Nt(j$get_height() (pygame.Surface method)pygame.Surface.get_heighth:Nt(j"get_rect() (pygame.Surface method)pygame.Surface.get_recth:Nt(j%get_bitsize() (pygame.Surface method)pygame.Surface.get_bitsizeh:Nt(j&get_bytesize() (pygame.Surface method)pygame.Surface.get_bytesizeh:Nt(j#get_flags() (pygame.Surface method)pygame.Surface.get_flagsh:Nt(j#get_pitch() (pygame.Surface method)pygame.Surface.get_pitchh:Nt(j#get_masks() (pygame.Surface method)pygame.Surface.get_masksh:Nt(j#set_masks() (pygame.Surface method)pygame.Surface.set_masksh:Nt(j$get_shifts() (pygame.Surface method)pygame.Surface.get_shiftsh:Nt(j$set_shifts() (pygame.Surface method)pygame.Surface.set_shiftsh:Nt(j$get_losses() (pygame.Surface method)pygame.Surface.get_lossesh:Nt(j+get_bounding_rect() (pygame.Surface method) pygame.Surface.get_bounding_recth:Nt(j"get_view() (pygame.Surface method)pygame.Surface.get_viewh:Nt(j$get_buffer() (pygame.Surface method)pygame.Surface.get_bufferh:Nt(j*_pixels_address (pygame.Surface attribute)pygame.Surface._pixels_addressh:Nt(j&premul_alpha() (pygame.Surface method)pygame.Surface.premul_alphah:Ntej[]((jmodule; pygame.surfarraymodule-pygame.surfarrayh:Nt(j&array2d() (in module pygame.surfarray)pygame.surfarray.array2dh:Nt(j'pixels2d() (in module pygame.surfarray)pygame.surfarray.pixels2dh:Nt(j&array3d() (in module pygame.surfarray)pygame.surfarray.array3dh:Nt(j'pixels3d() (in module pygame.surfarray)pygame.surfarray.pixels3dh:Nt(j*array_alpha() (in module pygame.surfarray)pygame.surfarray.array_alphah:Nt(j+pixels_alpha() (in module pygame.surfarray)pygame.surfarray.pixels_alphah:Nt(j(array_red() (in module pygame.surfarray)pygame.surfarray.array_redh:Nt(j)pixels_red() (in module pygame.surfarray)pygame.surfarray.pixels_redh:Nt(j*array_green() (in module pygame.surfarray)pygame.surfarray.array_greenh:Nt(j+pixels_green() (in module pygame.surfarray)pygame.surfarray.pixels_greenh:Nt(j)array_blue() (in module pygame.surfarray)pygame.surfarray.array_blueh:Nt(j*pixels_blue() (in module pygame.surfarray)pygame.surfarray.pixels_blueh:Nt(j-array_colorkey() (in module pygame.surfarray)pygame.surfarray.array_colorkeyh:Nt(j+make_surface() (in module pygame.surfarray)pygame.surfarray.make_surfaceh:Nt(j)blit_array() (in module pygame.surfarray)pygame.surfarray.blit_arrayh:Nt(j(map_array() (in module pygame.surfarray)pygame.surfarray.map_arrayh:Nt(j,use_arraytype() (in module pygame.surfarray)pygame.surfarray.use_arraytypeh:Nt(j,get_arraytype() (in module pygame.surfarray)pygame.surfarray.get_arraytypeh:Nt(j-get_arraytypes() (in module pygame.surfarray)pygame.surfarray.get_arraytypesh:Ntej4]((jmodule; pygame.testsmodule-pygame.testsh:Nt(jrun() (in module pygame.tests)pygame.tests.runh:Ntejf]((jmodule; pygame.timemodule-pygame.timeh:Nt(j#get_ticks() (in module pygame.time)pygame.time.get_ticksh:Nt(jwait() (in module pygame.time)pygame.time.waith:Nt(jdelay() (in module pygame.time)pygame.time.delayh:Nt(j#set_timer() (in module pygame.time)pygame.time.set_timerh:Nt(jClock (class in pygame.time)pygame.time.Clockh:Nt(j!tick() (pygame.time.Clock method)pygame.time.Clock.tickh:Nt(j+tick_busy_loop() (pygame.time.Clock method) pygame.time.Clock.tick_busy_looph:Nt(j%get_time() (pygame.time.Clock method)pygame.time.Clock.get_timeh:Nt(j(get_rawtime() (pygame.time.Clock method)pygame.time.Clock.get_rawtimeh:Nt(j$get_fps() (pygame.time.Clock method)pygame.time.Clock.get_fpsh:Ntej1]((jmodule; pygame._sdl2.touchmodule-pygame._sdl2.touchh:Nt(j0get_num_devices() (in module pygame._sdl2.touch)"pygame._sdl2.touch.get_num_devicesh:Nt(j+get_device() (in module pygame._sdl2.touch)pygame._sdl2.touch.get_deviceh:Nt(j0get_num_fingers() (in module pygame._sdl2.touch)"pygame._sdl2.touch.get_num_fingersh:Nt(j+get_finger() (in module pygame._sdl2.touch)pygame._sdl2.touch.get_fingerh:NtejE]((jmodule; pygame.transformmodule-pygame.transformh:Nt(j#flip() (in module pygame.transform)pygame.transform.fliph:Nt(j$scale() (in module pygame.transform)pygame.transform.scaleh:Nt(j'scale_by() (in module pygame.transform)pygame.transform.scale_byh:Nt(j%rotate() (in module pygame.transform)pygame.transform.rotateh:Nt(j'rotozoom() (in module pygame.transform)pygame.transform.rotozoomh:Nt(j&scale2x() (in module pygame.transform)pygame.transform.scale2xh:Nt(j*smoothscale() (in module pygame.transform)pygame.transform.smoothscaleh:Nt(j-smoothscale_by() (in module pygame.transform)pygame.transform.smoothscale_byh:Nt(j6get_smoothscale_backend() (in module pygame.transform)(pygame.transform.get_smoothscale_backendh:Nt(j6set_smoothscale_backend() (in module pygame.transform)(pygame.transform.set_smoothscale_backendh:Nt(j#chop() (in module pygame.transform)pygame.transform.choph:Nt(j(laplacian() (in module pygame.transform)pygame.transform.laplacianh:Nt(j/average_surfaces() (in module pygame.transform)!pygame.transform.average_surfacesh:Nt(j,average_color() (in module pygame.transform)pygame.transform.average_colorh:Nt(j(grayscale() (in module pygame.transform)pygame.transform.grayscaleh:Nt(j(threshold() (in module pygame.transform)pygame.transform.thresholdh:NtejB]jU]j>]j@]j-]jo]jG]jX]j%]j2]jk]j3]jc]jl]j]ja]j']j"]jY]j6]j$]jH]j:]j ]j]]j=]jL]j]j!]jS]j]j\]j,]uujs}(j}modules}h6Kumath}(j} has_equations}(j0jDjOjVjIj_j(jj)jjJjAjRjTj8jbjmj<j?jejZjFjij.j5jdjnjCjjWjhj7jj^jj#j*j`j&j;jKjMjgjNjjQj+jjj9j/jjPj[j4jfj1jEjBjUj>j@j-jojGjXj%j2jkj3jcjljjaj'j"jYj6j$jHj:j j]j=jLjj!jSjj\j,uh6Kuhh}(j}(pygame.BufferProxysphinx.domains.python ObjectEntry(j<jclasstpygame.BufferProxy.parentjI(j<j attributetpygame.BufferProxy.lengthjI(j<j attributetpygame.BufferProxy.rawjI(j<j attributetpygame.BufferProxy.writejI(j<jmethodtjjI(j?jmoduletpygame.camera.initjI(j?jfunctiontpygame.camera.get_backendsjI(j?jfunctiontpygame.camera.colorspacejI(j?jfunctiontpygame.camera.list_camerasjI(j?jfunctiontpygame.camera.CamerajI(j?jclasstpygame.camera.Camera.startjI(j?j methodtpygame.camera.Camera.stopjI(j?j methodt!pygame.camera.Camera.get_controlsjI(j?jmethodt!pygame.camera.Camera.set_controlsjI(j?jmethodtpygame.camera.Camera.get_sizejI(j?jmethodt pygame.camera.Camera.query_imagejI(j?jmethodtpygame.camera.Camera.get_imagejI(j?jmethodtpygame.camera.Camera.get_rawjI(j?jmethodt pygame.cdromjI(jej#j]tpygame.cdrom.initjI(jej&functiontpygame.cdrom.quitjI(jej)functiontpygame.cdrom.get_initjI(jej,functiontpygame.cdrom.get_countjI(jej/functiontpygame.cdrom.CDjI(jej2classtpygame.cdrom.CD.initjI(jej5methodtpygame.cdrom.CD.quitjI(jej8methodtpygame.cdrom.CD.get_initjI(jej;methodtpygame.cdrom.CD.playjI(jej>methodtpygame.cdrom.CD.stopjI(jejAmethodtpygame.cdrom.CD.pausejI(jejDmethodtpygame.cdrom.CD.resumejI(jejGmethodtpygame.cdrom.CD.ejectjI(jejJmethodtpygame.cdrom.CD.get_idjI(jejMmethodtpygame.cdrom.CD.get_namejI(jejPmethodtpygame.cdrom.CD.get_busyjI(jejSmethodtpygame.cdrom.CD.get_pausedjI(jejVmethodtpygame.cdrom.CD.get_currentjI(jejYmethodtpygame.cdrom.CD.get_emptyjI(jej\methodtpygame.cdrom.CD.get_numtracksjI(jej_methodtpygame.cdrom.CD.get_track_audiojI(jejbmethodtpygame.cdrom.CD.get_alljI(jejemethodtpygame.cdrom.CD.get_track_startjI(jejhmethodt pygame.cdrom.CD.get_track_lengthjI(jejkmethodt pygame.ColorjI(jZjoclasstpygame.Color.rjI(jZjr attributetpygame.Color.gjI(jZju attributetpygame.Color.bjI(jZjx attributetpygame.Color.ajI(jZj{ attributetpygame.Color.cmyjI(jZj~ attributetpygame.Color.hsvajI(jZj attributetpygame.Color.hslajI(jZj attributetpygame.Color.i1i2i3jI(jZj attributetpygame.Color.normalizejI(jZjmethodtpygame.Color.correct_gammajI(jZjmethodtpygame.Color.set_lengthjI(jZjmethodtpygame.Color.grayscalejI(jZjmethodtpygame.Color.lerpjI(jZjmethodtpygame.Color.premul_alphajI(jZjmethodtpygame.Color.updatejI(jZjmethodtjjI(jijj]tpygame.cursors.compilejI(jijfunctiontpygame.cursors.load_xbmjI(jijfunctiontpygame.cursors.CursorjI(jijclasstpygame.cursors.Cursor.copyjI(jijmethodtpygame.cursors.Cursor.typejI(jij attributetpygame.cursors.Cursor.datajI(jij attributetjjI(j.jj]tpygame.display.initjI(j.jfunctiontpygame.display.quitjI(j.jfunctiontpygame.display.get_initjI(j.jfunctiontpygame.display.set_modejI(j.jfunctiontpygame.display.get_surfacejI(j.jfunctiontpygame.display.flipjI(j.jfunctiontpygame.display.updatejI(j.jfunctiontpygame.display.get_driverjI(j.jfunctiontpygame.display.InfojI(j.jfunctiontpygame.display.get_wm_infojI(j.jfunctiont pygame.display.get_desktop_sizesjI(j.jfunctiontpygame.display.list_modesjI(j.jfunctiontpygame.display.mode_okjI(j.jfunctiontpygame.display.gl_get_attributejI(j.jfunctiontpygame.display.gl_set_attributejI(j.jfunctiontpygame.display.get_activejI(j.jfunctiontpygame.display.iconifyjI(j.jfunctiont pygame.display.toggle_fullscreenjI(j.jfunctiontpygame.display.set_gammajI(j.jfunctiontpygame.display.set_gamma_rampjI(j.jfunctiontpygame.display.set_iconjI(j.jfunctiontpygame.display.set_captionjI(j.jfunctiontpygame.display.get_captionjI(j.jfunctiontpygame.display.set_palettejI(j.jfunctiontpygame.display.get_num_displaysjI(j.jfunctiontpygame.display.get_window_sizejI(j.jfunctiont$pygame.display.get_allow_screensaverjI(j.jfunctiont$pygame.display.set_allow_screensaverjI(j.j functiontj~jI(j5jj]tpygame.draw.rectjI(j5jfunctiontpygame.draw.polygonjI(j5jfunctiontpygame.draw.circlejI(j5jfunctiontpygame.draw.ellipsejI(j5jfunctiontpygame.draw.arcjI(j5jfunctiontpygame.draw.linejI(j5j!functiontpygame.draw.linesjI(j5j$functiontpygame.draw.aalinejI(j5j'functiontpygame.draw.aalinesjI(j5j*functiontjjI(jdj.j]tpygame.event.pumpjI(jdj1functiontpygame.event.getjI(jdj4functiontpygame.event.polljI(jdj7functiontpygame.event.waitjI(jdj:functiontpygame.event.peekjI(jdj=functiontpygame.event.clearjI(jdj@functiontpygame.event.event_namejI(jdjCfunctiontpygame.event.set_blockedjI(jdjFfunctiontpygame.event.set_allowedjI(jdjIfunctiontpygame.event.get_blockedjI(jdjLfunctiontpygame.event.set_grabjI(jdjOfunctiontpygame.event.get_grabjI(jdjRfunctiontpygame.event.set_keyboard_grabjI(jdjUfunctiontpygame.event.get_keyboard_grabjI(jdjXfunctiontpygame.event.postjI(jdj[functiontpygame.event.custom_typejI(jdj^functiontpygame.event.EventjI(jdjaclasstpygame.event.Event.typejI(jdjd attributetpygame.event.Event.__dict__jI(jdjg attributetjjI(jnjkj]tpygame.examples.aliens.mainjI(jnjnfunctiontpygame.examples.stars.mainjI(jnjqfunctiontpygame.examples.chimp.mainjI(jnjtfunctiontpygame.examples.moveit.mainjI(jnjwfunctiontpygame.examples.fonty.mainjI(jnjzfunctiont"pygame.examples.freetype_misc.mainjI(jnj}functiontpygame.examples.vgrade.mainjI(jnjfunctiontpygame.examples.eventlist.mainjI(jnjfunctiontpygame.examples.arraydemo.mainjI(jnjfunctiontpygame.examples.sound.mainjI(jnjfunctiont&pygame.examples.sound_array_demos.mainjI(jnjfunctiontpygame.examples.liquid.mainjI(jnjfunctiontpygame.examples.glcube.mainjI(jnjfunctiont$pygame.examples.scrap_clipboard.mainjI(jnjfunctiontpygame.examples.mask.mainjI(jnjfunctiontpygame.examples.testsprite.mainjI(jnjfunctiont/pygame.examples.headless_no_windows_needed.mainjI(jnjfunctiontpygame.examples.joystick.mainjI(jnjfunctiontpygame.examples.blend_fill.mainjI(jnjfunctiont pygame.examples.blit_blends.mainjI(jnjfunctiontpygame.examples.cursors.mainjI(jnjfunctiontpygame.examples.pixelarray.mainjI(jnjfunctiontpygame.examples.scaletest.mainjI(jnjfunctiontpygame.examples.midi.mainjI(jnjfunctiontpygame.examples.scroll.mainjI(jnjfunctiontpygame.examples.camera.mainjI(jnjfunctiontpygame.examples.playmus.mainjI(jnjfunctiontpygame.fasteventjI(jCjj]tpygame.fastevent.initjI(jCjfunctiontpygame.fastevent.get_initjI(jCjfunctiontpygame.fastevent.pumpjI(jCjfunctiontpygame.fastevent.waitjI(jCjfunctiontpygame.fastevent.polljI(jCjfunctiontpygame.fastevent.getjI(jCjfunctiontpygame.fastevent.postjI(jCjfunctiontjEjI(jjj]tpygame.font.initjI(jjfunctiontpygame.font.quitjI(jjfunctiontpygame.font.get_initjI(jjfunctiontpygame.font.get_default_fontjI(jjfunctiontpygame.font.get_sdl_ttf_versionjI(jjfunctiontpygame.font.get_fontsjI(jjfunctiontpygame.font.match_fontjI(jjfunctiontpygame.font.SysFontjI(jjfunctiontpygame.font.FontjI(jjclasstpygame.font.Font.boldjI(jj attributetpygame.font.Font.italicjI(jj attributetpygame.font.Font.underlinejI(jj attributetpygame.font.Font.strikethroughjI(jj attributetpygame.font.Font.renderjI(jjmethodtpygame.font.Font.sizejI(jjmethodtpygame.font.Font.set_underlinejI(jj methodtpygame.font.Font.get_underlinejI(jj methodt"pygame.font.Font.set_strikethroughjI(jjmethodt"pygame.font.Font.get_strikethroughjI(jjmethodtpygame.font.Font.set_boldjI(jjmethodtpygame.font.Font.get_boldjI(jjmethodtpygame.font.Font.set_italicjI(jjmethodtpygame.font.Font.metricsjI(jjmethodtpygame.font.Font.get_italicjI(jj!methodtpygame.font.Font.get_linesizejI(jj$methodtpygame.font.Font.get_heightjI(jj'methodtpygame.font.Font.get_ascentjI(jj*methodtpygame.font.Font.get_descentjI(jj-methodtpygame.font.Font.set_scriptjI(jj0methodtjjI(jWj4j]tpygame.freetype.get_errorjI(jWj7functiontpygame.freetype.get_versionjI(jWj:functiontpygame.freetype.initjI(jWj=functiontpygame.freetype.quitjI(jWj@functiontpygame.freetype.get_initjI(jWjCfunctiontpygame.freetype.was_initjI(jWjFfunctiontpygame.freetype.get_cache_sizejI(jWjIfunctiont&pygame.freetype.get_default_resolutionjI(jWjLfunctiont&pygame.freetype.set_default_resolutionjI(jWjOfunctiontpygame.freetype.SysFontjI(jWjRfunctiont pygame.freetype.get_default_fontjI(jWjUfunctiontpygame.freetype.FontjI(jWjXclasstpygame.freetype.Font.namejI(jWj[ attributetpygame.freetype.Font.pathjI(jWj^ attributetpygame.freetype.Font.sizejI(jWja attributetpygame.freetype.Font.get_rectjI(jWjdmethodt pygame.freetype.Font.get_metricsjI(jWjgmethodtpygame.freetype.Font.heightjI(jWjj attributetpygame.freetype.Font.ascenderjI(jWjm attributetpygame.freetype.Font.descenderjI(jWjp attributet'pygame.freetype.Font.get_sized_ascenderjI(jWjsmethodt(pygame.freetype.Font.get_sized_descenderjI(jWjvmethodt%pygame.freetype.Font.get_sized_heightjI(jWjymethodt+pygame.freetype.Font.get_sized_glyph_heightjI(jWj|methodtpygame.freetype.Font.get_sizesjI(jWjmethodtpygame.freetype.Font.renderjI(jWjmethodtpygame.freetype.Font.render_tojI(jWjmethodtpygame.freetype.Font.render_rawjI(jWjmethodt"pygame.freetype.Font.render_raw_tojI(jWjmethodtpygame.freetype.Font.stylejI(jWj attributetpygame.freetype.Font.underlinejI(jWj attributetpygame.freetype.Font.strongjI(jWj attributetpygame.freetype.Font.obliquejI(jWj attributetpygame.freetype.Font.widejI(jWj attributetpygame.freetype.Font.strengthjI(jWj attributet)pygame.freetype.Font.underline_adjustmentjI(jWj attributet pygame.freetype.Font.fixed_widthjI(jWj attributet pygame.freetype.Font.fixed_sizesjI(jWj attributetpygame.freetype.Font.scalablejI(jWj attributet'pygame.freetype.Font.use_bitmap_strikesjI(jWj attributet pygame.freetype.Font.antialiasedjI(jWj attributetpygame.freetype.Font.kerningjI(jWj attributetpygame.freetype.Font.verticaljI(jWj attributetpygame.freetype.Font.rotationjI(jWj attributetpygame.freetype.Font.fgcolorjI(jWj attributetpygame.freetype.Font.bgcolorjI(jWj attributetpygame.freetype.Font.originjI(jWj attributetpygame.freetype.Font.padjI(jWj attributetpygame.freetype.Font.ucs4jI(jWj attributetpygame.freetype.Font.resolutionjI(jWj attributetjjI(jhjj]tpygame.gfxdraw.pixeljI(jhjfunctiontpygame.gfxdraw.hlinejI(jhjfunctiontpygame.gfxdraw.vlinejI(jhjfunctiontpygame.gfxdraw.linejI(jhjfunctiontpygame.gfxdraw.rectanglejI(jhjfunctiontpygame.gfxdraw.boxjI(jhjfunctiontpygame.gfxdraw.circlejI(jhjfunctiontpygame.gfxdraw.aacirclejI(jhjfunctiontpygame.gfxdraw.filled_circlejI(jhjfunctiontpygame.gfxdraw.ellipsejI(jhjfunctiontpygame.gfxdraw.aaellipsejI(jhjfunctiontpygame.gfxdraw.filled_ellipsejI(jhjfunctiontpygame.gfxdraw.arcjI(jhjfunctiontpygame.gfxdraw.piejI(jhjfunctiontpygame.gfxdraw.trigonjI(jhjfunctiontpygame.gfxdraw.aatrigonjI(jhjfunctiontpygame.gfxdraw.filled_trigonjI(jhjfunctiontpygame.gfxdraw.polygonjI(jhjfunctiontpygame.gfxdraw.aapolygonjI(jhjfunctiontpygame.gfxdraw.filled_polygonjI(jhj functiontpygame.gfxdraw.textured_polygonjI(jhj functiontpygame.gfxdraw.bezierjI(jhjfunctiontjjI(j7jj]tpygame.image.loadjI(j7jfunctiontpygame.image.savejI(j7jfunctiont"pygame.image.get_sdl_image_versionjI(j7jfunctiontpygame.image.get_extendedjI(j7j functiontpygame.image.tostringjI(j7j#functiontpygame.image.tobytesjI(j7j&functiontpygame.image.fromstringjI(j7j)functiontpygame.image.frombytesjI(j7j,functiontpygame.image.frombufferjI(j7j/functiontpygame.image.load_basicjI(j7j2functiontpygame.image.load_extendedjI(j7j5functiontpygame.image.save_extendedjI(j7j8functiontjjI(jj<j]tpygame.joystick.initjI(jj?functiontpygame.joystick.quitjI(jjBfunctiontpygame.joystick.get_initjI(jjEfunctiontpygame.joystick.get_countjI(jjHfunctiontpygame.joystick.JoystickjI(jjKclasstpygame.joystick.Joystick.initjI(jjNmethodtpygame.joystick.Joystick.quitjI(jjQmethodt!pygame.joystick.Joystick.get_initjI(jjTmethodtpygame.joystick.Joystick.get_idjI(jjWmethodt(pygame.joystick.Joystick.get_instance_idjI(jjZmethodt!pygame.joystick.Joystick.get_guidjI(jj]methodt(pygame.joystick.Joystick.get_power_leveljI(jj`methodt!pygame.joystick.Joystick.get_namejI(jjcmethodt$pygame.joystick.Joystick.get_numaxesjI(jjfmethodt!pygame.joystick.Joystick.get_axisjI(jjimethodt%pygame.joystick.Joystick.get_numballsjI(jjlmethodt!pygame.joystick.Joystick.get_balljI(jjomethodt'pygame.joystick.Joystick.get_numbuttonsjI(jjrmethodt#pygame.joystick.Joystick.get_buttonjI(jjumethodt$pygame.joystick.Joystick.get_numhatsjI(jjxmethodt pygame.joystick.Joystick.get_hatjI(jj{methodtpygame.joystick.Joystick.rumblejI(jj~methodt$pygame.joystick.Joystick.stop_rumblejI(jjmethodtjjI(j^jj]tpygame.key.get_focusedjI(j^jfunctiontpygame.key.get_pressedjI(j^jfunctiontpygame.key.get_modsjI(j^jfunctiontpygame.key.set_modsjI(j^jfunctiontpygame.key.set_repeatjI(j^jfunctiontpygame.key.get_repeatjI(j^jfunctiontpygame.key.namejI(j^jfunctiontpygame.key.key_codejI(j^jfunctiontpygame.key.start_text_inputjI(j^jfunctiontpygame.key.stop_text_inputjI(j^jfunctiontpygame.key.set_text_input_rectjI(j^jfunctiont pygame.localsjI(jjj]tjjI(j#jj]tpygame.mask.from_surfacejI(j#jfunctiontpygame.mask.from_thresholdjI(j#jfunctiontpygame.mask.MaskjI(j#jclasstpygame.mask.Mask.copyjI(j#jmethodtpygame.mask.Mask.get_sizejI(j#jmethodtpygame.mask.Mask.get_rectjI(j#jmethodtpygame.mask.Mask.get_atjI(j#jmethodtpygame.mask.Mask.set_atjI(j#jmethodtpygame.mask.Mask.overlapjI(j#jmethodtpygame.mask.Mask.overlap_areajI(j#jmethodtpygame.mask.Mask.overlap_maskjI(j#jmethodtpygame.mask.Mask.filljI(j#jmethodtpygame.mask.Mask.clearjI(j#jmethodtpygame.mask.Mask.invertjI(j#jmethodtpygame.mask.Mask.scalejI(j#jmethodtpygame.mask.Mask.drawjI(j#jmethodtpygame.mask.Mask.erasejI(j#jmethodtpygame.mask.Mask.countjI(j#jmethodtpygame.mask.Mask.centroidjI(j#jmethodtpygame.mask.Mask.anglejI(j#jmethodtpygame.mask.Mask.outlinejI(j#jmethodtpygame.mask.Mask.convolvejI(j#jmethodt$pygame.mask.Mask.connected_componentjI(j#jmethodt%pygame.mask.Mask.connected_componentsjI(j#jmethodt#pygame.mask.Mask.get_bounding_rectsjI(j#jmethodtpygame.mask.Mask.to_surfacejI(j#jmethodtjjI(j*jj]tpygame.math.clampjI(j*jfunctiontpygame.math.lerpjI(j*jfunctiontpygame.math.Vector2jI(j*j classtpygame.math.Vector2.dotjI(j*j methodtpygame.math.Vector2.crossjI(j*jmethodtpygame.math.Vector2.magnitudejI(j*jmethodt%pygame.math.Vector2.magnitude_squaredjI(j*jmethodtpygame.math.Vector2.lengthjI(j*jmethodt"pygame.math.Vector2.length_squaredjI(j*jmethodtpygame.math.Vector2.normalizejI(j*jmethodt pygame.math.Vector2.normalize_ipjI(j*j!methodt!pygame.math.Vector2.is_normalizedjI(j*j$methodt#pygame.math.Vector2.scale_to_lengthjI(j*j'methodtpygame.math.Vector2.reflectjI(j*j*methodtpygame.math.Vector2.reflect_ipjI(j*j-methodtpygame.math.Vector2.distance_tojI(j*j0methodt'pygame.math.Vector2.distance_squared_tojI(j*j3methodt pygame.math.Vector2.move_towardsjI(j*j6methodt#pygame.math.Vector2.move_towards_ipjI(j*j9methodtpygame.math.Vector2.lerpjI(j*j<methodtpygame.math.Vector2.slerpjI(j*j?methodtpygame.math.Vector2.elementwisejI(j*jBmethodtpygame.math.Vector2.rotatejI(j*jEmethodtpygame.math.Vector2.rotate_radjI(j*jHmethodtpygame.math.Vector2.rotate_ipjI(j*jKmethodt!pygame.math.Vector2.rotate_ip_radjI(j*jNmethodt!pygame.math.Vector2.rotate_rad_ipjI(j*jQmethodtpygame.math.Vector2.angle_tojI(j*jTmethodtpygame.math.Vector2.as_polarjI(j*jWmethodtpygame.math.Vector2.from_polarjI(j*jZmethodtpygame.math.Vector2.projectjI(j*j]methodtpygame.math.Vector2.copyjI(j*j`methodt#pygame.math.Vector2.clamp_magnitudejI(j*jcmethodt&pygame.math.Vector2.clamp_magnitude_ipjI(j*jfmethodtpygame.math.Vector2.updatejI(j*jimethodtpygame.math.Vector2.epsilonjI(j*jl attributetpygame.math.Vector3jI(j*joclasstpygame.math.Vector3.dotjI(j*jrmethodtpygame.math.Vector3.crossjI(j*jumethodtpygame.math.Vector3.magnitudejI(j*jxmethodt%pygame.math.Vector3.magnitude_squaredjI(j*j{methodtpygame.math.Vector3.lengthjI(j*j~methodt"pygame.math.Vector3.length_squaredjI(j*jmethodtpygame.math.Vector3.normalizejI(j*jmethodt pygame.math.Vector3.normalize_ipjI(j*jmethodt!pygame.math.Vector3.is_normalizedjI(j*jmethodt#pygame.math.Vector3.scale_to_lengthjI(j*jmethodtpygame.math.Vector3.reflectjI(j*jmethodtpygame.math.Vector3.reflect_ipjI(j*jmethodtpygame.math.Vector3.distance_tojI(j*jmethodt'pygame.math.Vector3.distance_squared_tojI(j*jmethodt pygame.math.Vector3.move_towardsjI(j*jmethodt#pygame.math.Vector3.move_towards_ipjI(j*jmethodtpygame.math.Vector3.lerpjI(j*jmethodtpygame.math.Vector3.slerpjI(j*jmethodtpygame.math.Vector3.elementwisejI(j*jmethodtpygame.math.Vector3.rotatejI(j*jmethodtpygame.math.Vector3.rotate_radjI(j*jmethodtpygame.math.Vector3.rotate_ipjI(j*jmethodt!pygame.math.Vector3.rotate_ip_radjI(j*jmethodt!pygame.math.Vector3.rotate_rad_ipjI(j*jmethodtpygame.math.Vector3.rotate_xjI(j*jmethodt pygame.math.Vector3.rotate_x_radjI(j*jmethodtpygame.math.Vector3.rotate_x_ipjI(j*jmethodt#pygame.math.Vector3.rotate_x_ip_radjI(j*jmethodt#pygame.math.Vector3.rotate_x_rad_ipjI(j*jmethodtpygame.math.Vector3.rotate_yjI(j*jmethodt pygame.math.Vector3.rotate_y_radjI(j*jmethodtpygame.math.Vector3.rotate_y_ipjI(j*jmethodt#pygame.math.Vector3.rotate_y_ip_radjI(j*jmethodt#pygame.math.Vector3.rotate_y_rad_ipjI(j*jmethodtpygame.math.Vector3.rotate_zjI(j*jmethodt pygame.math.Vector3.rotate_z_radjI(j*jmethodtpygame.math.Vector3.rotate_z_ipjI(j*jmethodt#pygame.math.Vector3.rotate_z_ip_radjI(j*jmethodt#pygame.math.Vector3.rotate_z_rad_ipjI(j*jmethodtpygame.math.Vector3.angle_tojI(j*jmethodt pygame.math.Vector3.as_sphericaljI(j*jmethodt"pygame.math.Vector3.from_sphericaljI(j*jmethodtpygame.math.Vector3.projectjI(j*jmethodtpygame.math.Vector3.copyjI(j*jmethodt#pygame.math.Vector3.clamp_magnitudejI(j*jmethodt&pygame.math.Vector3.clamp_magnitude_ipjI(j*jmethodtpygame.math.Vector3.updatejI(j*jmethodtpygame.math.Vector3.epsilonjI(j*j attributetjjI(j`jj]tpygame.midi.initjI(j`jfunctiontpygame.midi.quitjI(j`j functiontpygame.midi.get_initjI(j`j functiontpygame.midi.InputjI(j`jclasstpygame.midi.Input.closejI(j`jmethodtpygame.midi.Input.polljI(j`jmethodtpygame.midi.Input.readjI(j`jmethodtpygame.midi.OutputjI(j`jclasstpygame.midi.Output.abortjI(j`jmethodtpygame.midi.Output.closejI(j`j!methodtpygame.midi.Output.note_offjI(j`j$methodtpygame.midi.Output.note_onjI(j`j'methodt!pygame.midi.Output.set_instrumentjI(j`j*methodtpygame.midi.Output.pitch_bendjI(j`j-methodtpygame.midi.Output.writejI(j`j0methodtpygame.midi.Output.write_shortjI(j`j3methodtpygame.midi.Output.write_sys_exjI(j`j6methodtpygame.midi.get_countjI(j`j9functiont pygame.midi.get_default_input_idjI(j`j<functiont!pygame.midi.get_default_output_idjI(j`j?functiontpygame.midi.get_device_infojI(j`jBfunctiontpygame.midi.midis2eventsjI(j`jEfunctiontpygame.midi.timejI(j`jHfunctiontpygame.midi.frequency_to_midijI(j`jKfunctiontpygame.midi.midi_to_frequencyjI(j`jNfunctiontpygame.midi.midi_to_ansi_notejI(j`jQfunctiontpygame.midi.MidiExceptionjI(j`jT exceptiontjWjI(j&jXj]tpygame.mixer.initjI(j&j[functiontpygame.mixer.pre_initjI(j&j^functiontpygame.mixer.quitjI(j&jafunctiontpygame.mixer.get_initjI(j&jdfunctiontpygame.mixer.stopjI(j&jgfunctiontpygame.mixer.pausejI(j&jjfunctiontpygame.mixer.unpausejI(j&jmfunctiontpygame.mixer.fadeoutjI(j&jpfunctiontpygame.mixer.set_num_channelsjI(j&jsfunctiontpygame.mixer.get_num_channelsjI(j&jvfunctiontpygame.mixer.set_reservedjI(j&jyfunctiontpygame.mixer.find_channeljI(j&j|functiontpygame.mixer.get_busyjI(j&jfunctiont"pygame.mixer.get_sdl_mixer_versionjI(j&jfunctiontpygame.mixer.SoundjI(j&jclasstpygame.mixer.Sound.playjI(j&jmethodtpygame.mixer.Sound.stopjI(j&jmethodtpygame.mixer.Sound.fadeoutjI(j&jmethodtpygame.mixer.Sound.set_volumejI(j&jmethodtpygame.mixer.Sound.get_volumejI(j&jmethodt#pygame.mixer.Sound.get_num_channelsjI(j&jmethodtpygame.mixer.Sound.get_lengthjI(j&jmethodtpygame.mixer.Sound.get_rawjI(j&jmethodtpygame.mixer.ChanneljI(j&jclasstpygame.mixer.Channel.playjI(j&jmethodtpygame.mixer.Channel.stopjI(j&jmethodtpygame.mixer.Channel.pausejI(j&jmethodtpygame.mixer.Channel.unpausejI(j&jmethodtpygame.mixer.Channel.fadeoutjI(j&jmethodtpygame.mixer.Channel.set_volumejI(j&jmethodtpygame.mixer.Channel.get_volumejI(j&jmethodtpygame.mixer.Channel.get_busyjI(j&jmethodtpygame.mixer.Channel.get_soundjI(j&jmethodtpygame.mixer.Channel.queuejI(j&jmethodtpygame.mixer.Channel.get_queuejI(j&jmethodt!pygame.mixer.Channel.set_endeventjI(j&jmethodt!pygame.mixer.Channel.get_endeventjI(j&jmethodtjjI(j;jj]tpygame.mouse.get_pressedjI(j;jfunctiontpygame.mouse.get_posjI(j;jfunctiontpygame.mouse.get_reljI(j;jfunctiontpygame.mouse.set_posjI(j;jfunctiontpygame.mouse.set_visiblejI(j;jfunctiontpygame.mouse.get_visiblejI(j;jfunctiontpygame.mouse.get_focusedjI(j;jfunctiontpygame.mouse.set_cursorjI(j;jfunctiontpygame.mouse.get_cursorjI(j;jfunctiontjdjI(jKjj]tpygame.mixer.music.loadjI(jKjfunctiontpygame.mixer.music.unloadjI(jKjfunctiontpygame.mixer.music.playjI(jKjfunctiontpygame.mixer.music.rewindjI(jKjfunctiontpygame.mixer.music.stopjI(jKjfunctiontpygame.mixer.music.pausejI(jKjfunctiontpygame.mixer.music.unpausejI(jKjfunctiontpygame.mixer.music.fadeoutjI(jKjfunctiontpygame.mixer.music.set_volumejI(jKjfunctiontpygame.mixer.music.get_volumejI(jKjfunctiontpygame.mixer.music.get_busyjI(jKj functiontpygame.mixer.music.set_posjI(jKjfunctiontpygame.mixer.music.get_posjI(jKjfunctiontpygame.mixer.music.queuejI(jKjfunctiontpygame.mixer.music.set_endeventjI(jKjfunctiontpygame.mixer.music.get_endeventjI(jKjfunctiontpygame.OverlayjI(jMjclasstpygame.Overlay.displayjI(jMj!methodtpygame.Overlay.set_locationjI(jMj$methodtpygame.Overlay.get_hardwarejI(jMj'methodtpygame.PixelArrayjI(jgj+classtpygame.PixelArray.surfacejI(jgj. attributetpygame.PixelArray.itemsizejI(jgj1 attributetpygame.PixelArray.ndimjI(jgj4 attributetpygame.PixelArray.shapejI(jgj7 attributetpygame.PixelArray.stridesjI(jgj: attributetpygame.PixelArray.make_surfacejI(jgj=methodtpygame.PixelArray.replacejI(jgj@methodtpygame.PixelArray.extractjI(jgjCmethodtpygame.PixelArray.comparejI(jgjFmethodtpygame.PixelArray.transposejI(jgjImethodtpygame.PixelArray.closejI(jgjLmethodtpygame.pixelcopyjI(jNjPj]t!pygame.pixelcopy.surface_to_arrayjI(jNjSfunctiont!pygame.pixelcopy.array_to_surfacejI(jNjVfunctiontpygame.pixelcopy.map_arrayjI(jNjYfunctiontpygame.pixelcopy.make_surfacejI(jNj\functiontjjI(jj`j]t pygame.initjI(jjcfunctiont pygame.quitjI(jjffunctiontpygame.get_initjI(jjifunctiont pygame.errorjI(jjl exceptiontpygame.get_errorjI(jjofunctiontpygame.set_errorjI(jjrfunctiontpygame.get_sdl_versionjI(jjufunctiontpygame.get_sdl_byteorderjI(jjxfunctiontpygame.register_quitjI(jj{functiontpygame.encode_stringjI(jj~functiontpygame.encode_file_pathjI(jjfunctiontj$jI(jjj]tpygame.version.verjI(jjdatatpygame.version.vernumjI(jjdatatpygame.version.revjI(jjdatatpygame.version.SDLjI(jjdatat pygame.RectjI(jQjclasstpygame.Rect.copyjI(jQjmethodtpygame.Rect.movejI(jQjmethodtpygame.Rect.move_ipjI(jQjmethodtpygame.Rect.inflatejI(jQjmethodtpygame.Rect.inflate_ipjI(jQjmethodtpygame.Rect.scale_byjI(jQjmethodtpygame.Rect.scale_by_ipjI(jQjmethodtpygame.Rect.updatejI(jQjmethodtpygame.Rect.clampjI(jQjmethodtpygame.Rect.clamp_ipjI(jQjmethodtpygame.Rect.clipjI(jQjmethodtpygame.Rect.cliplinejI(jQjmethodtpygame.Rect.unionjI(jQjmethodtpygame.Rect.union_ipjI(jQjmethodtpygame.Rect.unionalljI(jQjmethodtpygame.Rect.unionall_ipjI(jQjmethodtpygame.Rect.fitjI(jQjmethodtpygame.Rect.normalizejI(jQjmethodtpygame.Rect.containsjI(jQjmethodtpygame.Rect.collidepointjI(jQjmethodtpygame.Rect.colliderectjI(jQjmethodtpygame.Rect.collidelistjI(jQjmethodtpygame.Rect.collidelistalljI(jQjmethodtpygame.Rect.collideobjectsjI(jQjmethodtpygame.Rect.collideobjectsalljI(jQjmethodtpygame.Rect.collidedictjI(jQjmethodtpygame.Rect.collidedictalljI(jQjmethodtj+jI(j+jj]tpygame.scrap.initjI(j+jfunctiontpygame.scrap.get_initjI(j+jfunctiontpygame.scrap.getjI(j+jfunctiontpygame.scrap.get_typesjI(j+jfunctiontpygame.scrap.putjI(j+jfunctiontpygame.scrap.containsjI(j+jfunctiontpygame.scrap.lostjI(j+jfunctiontpygame.scrap.set_modejI(j+jfunctiontjjI(jjjj]tpygame._sdl2.controller.initjI(jjjfunctiontpygame._sdl2.controller.quitjI(jjj functiont pygame._sdl2.controller.get_initjI(jjjfunctiont&pygame._sdl2.controller.set_eventstatejI(jjjfunctiont&pygame._sdl2.controller.get_eventstatejI(jjjfunctiont!pygame._sdl2.controller.get_countjI(jjjfunctiont%pygame._sdl2.controller.is_controllerjI(jjjfunctiont%pygame._sdl2.controller.name_forindexjI(jjjfunctiont"pygame._sdl2.controller.ControllerjI(jjj classt'pygame._sdl2.controller.Controller.quitjI(jjj#methodt+pygame._sdl2.controller.Controller.get_initjI(jjj&methodt0pygame._sdl2.controller.Controller.from_joystickjI(jjj)methodt+pygame._sdl2.controller.Controller.attachedjI(jjj,methodt.pygame._sdl2.controller.Controller.as_joystickjI(jjj/methodt+pygame._sdl2.controller.Controller.get_axisjI(jjj2methodt-pygame._sdl2.controller.Controller.get_buttonjI(jjj5methodt.pygame._sdl2.controller.Controller.get_mappingjI(jjj8methodt.pygame._sdl2.controller.Controller.set_mappingjI(jjj;methodt)pygame._sdl2.controller.Controller.rumblejI(jjj>methodt.pygame._sdl2.controller.Controller.stop_rumblejI(jjjAmethodtpygame._sdl2.videojI(j9jEj]tpygame._sdl2.video.WindowjI(j9jHclasst-pygame._sdl2.video.Window.from_display_modulejI(j9jKmethodt%pygame._sdl2.video.Window.from_windowjI(j9jNmethodtpygame._sdl2.video.Window.grabjI(j9jQ attributet(pygame._sdl2.video.Window.relative_mousejI(j9jT attributet&pygame._sdl2.video.Window.set_windowedjI(j9jWmethodt(pygame._sdl2.video.Window.set_fullscreenjI(j9jZmethodtpygame._sdl2.video.Window.titlejI(j9j] attributet!pygame._sdl2.video.Window.destroyjI(j9j`methodtpygame._sdl2.video.Window.hidejI(j9jcmethodtpygame._sdl2.video.Window.showjI(j9jfmethodtpygame._sdl2.video.Window.focusjI(j9jimethodt!pygame._sdl2.video.Window.restorejI(j9jlmethodt"pygame._sdl2.video.Window.maximizejI(j9jomethodt"pygame._sdl2.video.Window.minimizejI(j9jrmethodt#pygame._sdl2.video.Window.resizablejI(j9ju attributet$pygame._sdl2.video.Window.borderlessjI(j9jx attributet"pygame._sdl2.video.Window.set_iconjI(j9j{methodtpygame._sdl2.video.Window.idjI(j9j~ attributetpygame._sdl2.video.Window.sizejI(j9j attributet"pygame._sdl2.video.Window.positionjI(j9j attributet!pygame._sdl2.video.Window.opacityjI(j9j attributet'pygame._sdl2.video.Window.display_indexjI(j9j attributet'pygame._sdl2.video.Window.set_modal_forjI(j9jmethodtpygame._sdl2.video.TexturejI(j9jclasst'pygame._sdl2.video.Texture.from_surfacejI(j9jmethodt#pygame._sdl2.video.Texture.rendererjI(j9j attributet pygame._sdl2.video.Texture.widthjI(j9j attributet!pygame._sdl2.video.Texture.heightjI(j9j attributet pygame._sdl2.video.Texture.alphajI(j9j attributet%pygame._sdl2.video.Texture.blend_modejI(j9j attributet pygame._sdl2.video.Texture.colorjI(j9j attributet#pygame._sdl2.video.Texture.get_rectjI(j9jmethodtpygame._sdl2.video.Texture.drawjI(j9jmethodt!pygame._sdl2.video.Texture.updatejI(j9jmethodtpygame._sdl2.video.ImagejI(j9jclasst!pygame._sdl2.video.Image.get_rectjI(j9jmethodtpygame._sdl2.video.Image.drawjI(j9jmethodtpygame._sdl2.video.Image.anglejI(j9j attributetpygame._sdl2.video.Image.originjI(j9j attributetpygame._sdl2.video.Image.flip_xjI(j9j attributetpygame._sdl2.video.Image.flip_yjI(j9j attributetpygame._sdl2.video.Image.colorjI(j9j attributetpygame._sdl2.video.Image.alphajI(j9j attributet#pygame._sdl2.video.Image.blend_modejI(j9j attributet pygame._sdl2.video.Image.texturejI(j9j attributet pygame._sdl2.video.Image.srcrectjI(j9j attributetpygame._sdl2.video.RendererjI(j9jclasst'pygame._sdl2.video.Renderer.from_windowjI(j9jmethodt+pygame._sdl2.video.Renderer.draw_blend_modejI(j9j attributet&pygame._sdl2.video.Renderer.draw_colorjI(j9j attributet!pygame._sdl2.video.Renderer.clearjI(j9jmethodt#pygame._sdl2.video.Renderer.presentjI(j9jmethodt(pygame._sdl2.video.Renderer.get_viewportjI(j9jmethodt(pygame._sdl2.video.Renderer.set_viewportjI(j9jmethodt(pygame._sdl2.video.Renderer.logical_sizejI(j9j attributet!pygame._sdl2.video.Renderer.scalejI(j9j attributet"pygame._sdl2.video.Renderer.targetjI(j9j attributet pygame._sdl2.video.Renderer.blitjI(j9jmethodt%pygame._sdl2.video.Renderer.draw_linejI(j9jmethodt&pygame._sdl2.video.Renderer.draw_pointjI(j9jmethodt%pygame._sdl2.video.Renderer.draw_rectjI(j9jmethodt%pygame._sdl2.video.Renderer.fill_rectjI(j9jmethodt&pygame._sdl2.video.Renderer.to_surfacejI(j9jmethodtjjI(j/j j]tpygame.sndarray.arrayjI(j/j functiontpygame.sndarray.samplesjI(j/jfunctiontpygame.sndarray.make_soundjI(j/jfunctiontpygame.sndarray.use_arraytypejI(j/jfunctiontpygame.sndarray.get_arraytypejI(j/jfunctiontpygame.sndarray.get_arraytypesjI(j/jfunctiontj;jI(jjj]tpygame.sprite.SpritejI(jj"classtpygame.sprite.Sprite.updatejI(jj%methodtpygame.sprite.Sprite.addjI(jj(methodtpygame.sprite.Sprite.removejI(jj+methodtpygame.sprite.Sprite.killjI(jj.methodtpygame.sprite.Sprite.alivejI(jj1methodtpygame.sprite.Sprite.groupsjI(jj4methodtpygame.sprite.WeakSpritejI(jj7classtpygame.sprite.DirtySpritejI(jj:classtpygame.sprite.GroupjI(jj=classtpygame.sprite.Group.spritesjI(jj@methodtpygame.sprite.Group.copyjI(jjCmethodtpygame.sprite.Group.addjI(jjFmethodtpygame.sprite.Group.removejI(jjImethodtpygame.sprite.Group.hasjI(jjLmethodtpygame.sprite.Group.updatejI(jjOmethodtpygame.sprite.Group.drawjI(jjRmethodtpygame.sprite.Group.clearjI(jjUmethodtpygame.sprite.Group.emptyjI(jjXmethodtpygame.sprite.WeakDirtySpritejI(jj[classtpygame.sprite.RenderPlainjI(jj^classtpygame.sprite.RenderClearjI(jjaclasstpygame.sprite.RenderUpdatesjI(jjdclasst pygame.sprite.RenderUpdates.drawjI(jjgmethodtpygame.sprite.OrderedUpdatesjI(jjjfunctiontpygame.sprite.LayeredUpdatesjI(jjmclasst pygame.sprite.LayeredUpdates.addjI(jjpmethodt$pygame.sprite.LayeredUpdates.spritesjI(jjsmethodt!pygame.sprite.LayeredUpdates.drawjI(jjvmethodt+pygame.sprite.LayeredUpdates.get_sprites_atjI(jjymethodt'pygame.sprite.LayeredUpdates.get_spritejI(jj|methodt4pygame.sprite.LayeredUpdates.remove_sprites_of_layerjI(jjmethodt#pygame.sprite.LayeredUpdates.layersjI(jjmethodt)pygame.sprite.LayeredUpdates.change_layerjI(jjmethodt0pygame.sprite.LayeredUpdates.get_layer_of_spritejI(jjmethodt*pygame.sprite.LayeredUpdates.get_top_layerjI(jjmethodt-pygame.sprite.LayeredUpdates.get_bottom_layerjI(jjmethodt*pygame.sprite.LayeredUpdates.move_to_frontjI(jjmethodt)pygame.sprite.LayeredUpdates.move_to_backjI(jjmethodt+pygame.sprite.LayeredUpdates.get_top_spritejI(jjmethodt3pygame.sprite.LayeredUpdates.get_sprites_from_layerjI(jjmethodt)pygame.sprite.LayeredUpdates.switch_layerjI(jjmethodtpygame.sprite.LayeredDirtyjI(jjclasstpygame.sprite.LayeredDirty.drawjI(jjmethodt pygame.sprite.LayeredDirty.clearjI(jjmethodt'pygame.sprite.LayeredDirty.repaint_rectjI(jjmethodt#pygame.sprite.LayeredDirty.set_clipjI(jjmethodt#pygame.sprite.LayeredDirty.get_clipjI(jjmethodt'pygame.sprite.LayeredDirty.change_layerjI(jjmethodt.pygame.sprite.LayeredDirty.set_timing_tresholdjI(jjmethodt/pygame.sprite.LayeredDirty.set_timing_thresholdjI(jjmethodtpygame.sprite.GroupSinglejI(jjfunctiontpygame.sprite.spritecollidejI(jjfunctiontpygame.sprite.collide_rectjI(jjfunctiont pygame.sprite.collide_rect_ratiojI(jjfunctiontpygame.sprite.collide_circlejI(jjfunctiont"pygame.sprite.collide_circle_ratiojI(jjfunctiontpygame.sprite.collide_maskjI(jjfunctiontpygame.sprite.groupcollidejI(jjfunctiontpygame.sprite.spritecollideanyjI(jjfunctiontpygame.SurfacejI(jPjclasstpygame.Surface.blitjI(jPjmethodtpygame.Surface.blitsjI(jPjmethodtpygame.Surface.convertjI(jPjmethodtpygame.Surface.convert_alphajI(jPjmethodtpygame.Surface.copyjI(jPjmethodtpygame.Surface.filljI(jPjmethodtpygame.Surface.scrolljI(jPjmethodtpygame.Surface.set_colorkeyjI(jPjmethodtpygame.Surface.get_colorkeyjI(jPjmethodtpygame.Surface.set_alphajI(jPjmethodtpygame.Surface.get_alphajI(jPjmethodtpygame.Surface.lockjI(jPjmethodtpygame.Surface.unlockjI(jPjmethodtpygame.Surface.mustlockjI(jPjmethodtpygame.Surface.get_lockedjI(jPjmethodtpygame.Surface.get_locksjI(jPjmethodtpygame.Surface.get_atjI(jPj methodtpygame.Surface.set_atjI(jPj methodtpygame.Surface.get_at_mappedjI(jPjmethodtpygame.Surface.get_palettejI(jPjmethodtpygame.Surface.get_palette_atjI(jPjmethodtpygame.Surface.set_palettejI(jPjmethodtpygame.Surface.set_palette_atjI(jPjmethodtpygame.Surface.map_rgbjI(jPjmethodtpygame.Surface.unmap_rgbjI(jPj"methodtpygame.Surface.set_clipjI(jPj%methodtpygame.Surface.get_clipjI(jPj(methodtpygame.Surface.subsurfacejI(jPj+methodtpygame.Surface.get_parentjI(jPj.methodtpygame.Surface.get_abs_parentjI(jPj1methodtpygame.Surface.get_offsetjI(jPj4methodtpygame.Surface.get_abs_offsetjI(jPj7methodtpygame.Surface.get_sizejI(jPj:methodtpygame.Surface.get_widthjI(jPj=methodtpygame.Surface.get_heightjI(jPj@methodtpygame.Surface.get_rectjI(jPjCmethodtpygame.Surface.get_bitsizejI(jPjFmethodtpygame.Surface.get_bytesizejI(jPjImethodtpygame.Surface.get_flagsjI(jPjLmethodtpygame.Surface.get_pitchjI(jPjOmethodtpygame.Surface.get_masksjI(jPjRmethodtpygame.Surface.set_masksjI(jPjUmethodtpygame.Surface.get_shiftsjI(jPjXmethodtpygame.Surface.set_shiftsjI(jPj[methodtpygame.Surface.get_lossesjI(jPj^methodt pygame.Surface.get_bounding_rectjI(jPjamethodtpygame.Surface.get_viewjI(jPjdmethodtpygame.Surface.get_bufferjI(jPjgmethodtpygame.Surface._pixels_addressjI(jPjj attributetpygame.Surface.premul_alphajI(jPjmmethodtjjI(j[jqj]tpygame.surfarray.array2djI(j[jtfunctiontpygame.surfarray.pixels2djI(j[jwfunctiontpygame.surfarray.array3djI(j[jzfunctiontpygame.surfarray.pixels3djI(j[j}functiontpygame.surfarray.array_alphajI(j[jfunctiontpygame.surfarray.pixels_alphajI(j[jfunctiontpygame.surfarray.array_redjI(j[jfunctiontpygame.surfarray.pixels_redjI(j[jfunctiontpygame.surfarray.array_greenjI(j[jfunctiontpygame.surfarray.pixels_greenjI(j[jfunctiontpygame.surfarray.array_bluejI(j[jfunctiontpygame.surfarray.pixels_bluejI(j[jfunctiontpygame.surfarray.array_colorkeyjI(j[jfunctiontpygame.surfarray.make_surfacejI(j[jfunctiontpygame.surfarray.blit_arrayjI(j[jfunctiontpygame.surfarray.map_arrayjI(j[jfunctiontpygame.surfarray.use_arraytypejI(j[jfunctiontpygame.surfarray.get_arraytypejI(j[jfunctiontpygame.surfarray.get_arraytypesjI(j[jfunctiont pygame.testsjI(j4jj]tpygame.tests.runjI(j4jfunctiontj8jI(jfjj]tpygame.time.get_ticksjI(jfjfunctiontpygame.time.waitjI(jfjfunctiontpygame.time.delayjI(jfjfunctiontpygame.time.set_timerjI(jfjfunctiontpygame.time.ClockjI(jfjclasstpygame.time.Clock.tickjI(jfjmethodt pygame.time.Clock.tick_busy_loopjI(jfjmethodtpygame.time.Clock.get_timejI(jfjmethodtpygame.time.Clock.get_rawtimejI(jfjmethodtpygame.time.Clock.get_fpsjI(jfjmethodtjFjI(j1jj]t"pygame._sdl2.touch.get_num_devicesjI(j1jfunctiontpygame._sdl2.touch.get_devicejI(j1jfunctiont"pygame._sdl2.touch.get_num_fingersjI(j1jfunctiontpygame._sdl2.touch.get_fingerjI(j1jfunctiontj.jI(jEjj]tpygame.transform.flipjI(jEjfunctiontpygame.transform.scalejI(jEjfunctiontpygame.transform.scale_byjI(jEjfunctiontpygame.transform.rotatejI(jEjfunctiontpygame.transform.rotozoomjI(jEjfunctiontpygame.transform.scale2xjI(jEjfunctiontpygame.transform.smoothscalejI(jEjfunctiontpygame.transform.smoothscale_byjI(jEjfunctiont(pygame.transform.get_smoothscale_backendjI(jEjfunctiont(pygame.transform.set_smoothscale_backendjI(jEjfunctiontpygame.transform.chopjI(jEjfunctiontpygame.transform.laplacianjI(jEj functiont!pygame.transform.average_surfacesjI(jEjfunctiontpygame.transform.average_colorjI(jEjfunctiontpygame.transform.grayscalejI(jEjfunctiontpygame.transform.thresholdjI(jEjfunctiontuj=}(jjG ModuleEntry(j?jpygame module for camera useh:tjjr(jej#%pygame module for audio cdrom controlh:tjjr(jij"pygame module for cursor resourcesh:tjjr(j.j6pygame module to control the display window and screenh:tj~jr(j5j pygame module for drawing shapesh:tjjr(jdj.4pygame module for interacting with events and queuesh:tjjr(jnjkmodule of example programsh:tj jr(jCjKpygame module for interacting with events and queues from multiple threads.h:tjEjr(jj-pygame module for loading and rendering fontsh:tjjr(jWj4?Enhanced pygame module for loading and rendering computer fontsh:tjjr(jhj pygame module for drawing shapesh:tjjr(j7j+pygame module for loading and saving imagesh:tjjr(jj<GPygame module for interacting with joysticks, gamepads, and trackballs.h:tjjr(j^j'pygame module to work with the keyboardh:tj jr(jjpygame constantsh:tjjr(j#jpygame module for image masks.h:tjjr(j*j pygame module for vector classesh:tjjr(j`j9pygame module for interacting with midi input and output.h:tjWjr(j&jX,pygame module for loading and playing soundsh:tjjr(j;j$pygame module to work with the mouseh:tjdjr(jKj,pygame module for controlling streamed audioh:tjjr(jNjP-pygame module for general pixel array copyingh:tjjr(jj`the top level pygame packageh:tj$jr(jj+small module containing version informationh:tj+jr(j+j$pygame module for clipboard support.h:tjjr(jjj&pygame module to work with controllersh:tjjr(j9jEjj?jBj\jCjFj\jGjJj\jKjNj,jOjRj,jSjVj,jWjZj,j[uh6Kterms}uuimages sphinx.utilFilenameUniqDict)(j(jmpygame_logo.pngj(jmpygame_lofi.pngj(jmpygame_powered.pngj(jmpygame_tiny.pngj(jmpygame_powered_lowres.pngj(j5draw_module_example.pngj(jjoystick_calls.pngj'(j* angle_to.pngjj(jBcamera_rgb.jpgjh(jBcamera_yuv.jpgjn(jBcamera_hsv.jpgjq(jBcamera_thresholded.jpgjr(jBcamera_average.jpgjm(jBcamera_thresh.jpgji(jBcamera_background.jpgjp(jBcamera_green.jpgjk(jBcamera_mask.jpgjv(jU chimpshot.gifj(jGintro_ball.gifj(jGintro_blade.jpgj(jGintro_freedom.jpgj(j%surfarray_allblack.pngj(j%surfarray_striped.pngj(j%surfarray_rgbarray.pngj(j%surfarray_flipped.pngj(j%surfarray_scaledown.pngj(j%surfarray_scaleup.pngj(j%surfarray_redimg.pngj(j%surfarray_soften.pngj(j%surfarray_xfade.pngj(jkintroduction-PuyoPuyo.pngj(jkintroduction-TPS.pngj(jkintroduction-Battleship.pngj(j3Basic-ouput-sourcecode.pngj(j3Bagic-ouput-result-screen.pngj(jcBagic-PROCESS-sourcecode.pngj(jcBagic-PROCESS-resultscreen.pngj(jlBagic-INPUT-sourcecode.pngj(jlBagic-INPUT-resultscreen.pngj(jAdvancedOutputProcess1.gifj(jAdvancedOutputProcess2.gifj(jAdvancedOutputProcess3.gifj(jAdvancedOutputProcess4.gifj(jAdvancedOutputProcess5.gifj(jAdvancedOutputProcess6.gifj(jaAdvancedInputOutput1.gifj(jaAdvancedInputOutput2.gifj(jaAdvancedInputOutput3.gifj(jaAdvancedInputOutput4.gifj(jaAdvancedInputOutput5.gifj(j'AdvancedOutputAlpha1.gifj(j'AdvancedOutputAlpha2.gifj(j'AdvancedOutputAlpha3.gifj(jYintroduction-PuyoPuyo1.pngj(jYintroduction-TPS1.pngj(jYintroduction-Battleship1.pngj(j6Basic-ouput-sourcecode1.pngj(j6Bagic-ouput-result-screen1.pngj(j$Bagic-PROCESS-sourcecode1.pngj(j$Bagic-PROCESS-resultscreen1.pngj(jHBagic-INPUT-sourcecode1.pngj(jHBagic-INPUT-resultscreen1.pngj(j:AdvancedOutputProcess11.gifj(j:AdvancedOutputProcess21.gifj(j:AdvancedOutputProcess31.gifj(j:AdvancedOutputProcess41.gifj(j:AdvancedOutputProcess51.gifj(j:AdvancedOutputProcess61.gifj(j AdvancedInputOutput11.gifj(j AdvancedInputOutput21.gifj(j AdvancedInputOutput31.gifj(j AdvancedInputOutput41.gifj(j AdvancedInputOutput51.gifj(j]AdvancedOutputAlpha11.gifj(j]AdvancedOutputAlpha21.gifj(j]AdvancedOutputAlpha31.gifj(j! tom_basic.pngj(jtom_radians.pngj(jtom_formulae.pngj(j\tom_event-flowchart.pngu(jj]jj'jjjEjjZjfjxjBj$jijjjjjTjljjjjcjjujjjNjj{j!jojjjj*jKjjjjjjj jWj3jHjj-jjjjjjjjj~j?jQj<jrjj0jjjjjjjj9j6jjjj`j jbdlfilesj DownloadFiles)original_image_uri} temp_data} ref_context}_search_index_titles}_search_index_filenames}_search_index_mapping}_search_index_title_mapping}_search_index_all_titles}_search_index_index_entries}_search_index_objtypes}_search_index_objnames} pyg_sections](}(jnj<fullnamejrefidju}(jnj?j pygame.camerajju}(jnjej pygame.cdromjj#u}(jnjZjjojjou}(jnjijpygame.cursorsjju}(jnj.jpygame.displayjju}(jnj5j pygame.drawjju}(jnjdj pygame.eventjj.u}(jnjnjpygame.examplesjjku}(jnjCjpygame.fasteventjju}(jnjj pygame.fontjju}(jnjWjpygame.freetypejj4u}(jnjhjpygame.gfxdrawjju}(jnj7j pygame.imagejju}(jnjjpygame.joystickjj<u}(jnj^j pygame.keyjju}(jnjj pygame.localsjju}(jnj#j pygame.maskjju}(jnj*j pygame.mathjju}(jnj`j pygame.midijju}(jnj&j pygame.mixerjjXu}(jnj;j pygame.mousejju}(jnjKjpygame.mixer.musicjju}(jnjMjjjju}(jnjgjj+jj+u}(jnjNjpygame.pixelcopyjjPu}(jnjjpygamejj`u}(jnjjpygame.versionjju}(jnjQjjjju}(jnj+j pygame.scrapjju}(jnjjjpygame._sdl2.controllerjju}(jnj9jpygame.sdl2_videojjEu}(jnj/jpygame.sndarrayjj u}(jnjj pygame.spritejju}(jnjPjjjju}(jnj[jpygame.surfarrayjjqu}(jnj4j pygame.testsjju}(jnjfj pygame.timejju}(jnj1jpygame._sdl2.touchjju}(jnjEjpygame.transformjjuepyg_descinfo_tbl}(j}(jjdesctypejNsummary Return wrapped exporting object. signatures](parent -> Surfaceparent -> ej]jjjnj<uj}(jjjjRj+The size, in bytes, of the exported buffer.j] length -> intaj]jjjnj<uj}(jjjjVj9A copy of the exported buffer as a single block of bytes.j] raw -> bytesaj]jjjnj<uj}(jjjjZj!Write raw bytes to object buffer.j]write(buffer, offset=0)aj]jjjnj<uj}(jjjjJjBpygame object to export a surface buffer through an array protocolj]$BufferProxy() -> BufferProxyaj](jjjjejjjnj<upygame-bufferproxyjj}(jjjjaj Module initj]init(backend = None) -> Noneaj]jjjnj?uj}(jjjjej)Get the backends supported on this systemj]get_backends() -> [str]aj]jjjnj?uj}(jjjjijSurface colorspace conversionj]:colorspace(Surface, format, DestSurface = None) -> Surfaceaj]jjjnj?uj}(jjjjmj#returns a list of available camerasj]list_cameras() -> [cameras]aj]jjjnj?uj }(jj jjuj(opens, initializes, and starts capturingj]start() -> Noneaj]jj jnj?uj }(jj jjyj+stops, uninitializes, and closes the cameraj]stop() -> Noneaj]jj jnj?uj}(jjjj}j$gets current values of user controlsj]:get_controls() -> (hflip = bool, vflip = bool, brightness)aj]jjjnj?uj}(jjjjj2changes camera settings if supported by the cameraj]`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)aj]jjjnj?uj}(jjjjj3returns the dimensions of the images being recordedj]get_size() -> (width, height)aj]jjjnj?uj}(jjjjjchecks if a frame is readyj]query_image() -> boolaj]jjjnj?uj}(jjjjjcaptures an image as a Surfacej]$get_image(Surface = None) -> Surfaceaj]jjjnj?uj}(jjjjj$returns an unmodified image as bytesj]get_raw() -> bytesaj]jjjnj?uj}(jjjjqj load a cameraj]1Camera(device, (width, height), format) -> Cameraaj](j j jjjjjjejjjnj?u pygame.camera}(jjjj]jpygame module for camera usej]j](jjjjjejjjnj?uj&}(jj&jjjinitialize the cdrom modulej]init() -> Noneaj]jj&jnjeuj)}(jj)jjjuninitialize the cdrom modulej]quit() -> Noneaj]jj)jnjeuj,}(jj,jjj'true if the cdrom module is initializedj]get_init() -> boolaj]jj,jnjeuj/}(jj/jjj!number of cd drives on the systemj]get_count() -> countaj]jj/jnjeuj5}(jj5jjj initialize a cdrom drive for usej]init() -> Noneaj]jj5jnjeuj8}(jj8jjj"uninitialize a cdrom drive for usej]quit() -> Noneaj]jj8jnjeuj;}(jj;jjj"true if this cd device initializedj]get_init() -> boolaj]jj;jnjeuj>}(jj>jjjstart playing audioj])play(track, start=None, end=None) -> Noneaj]jj>jnjeujA}(jjAjjjstop audio playbackj]stop() -> Noneaj]jjAjnjeujD}(jjDjjjtemporarily stop audio playbackj]pause() -> Noneaj]jjDjnjeujG}(jjGjjjunpause audio playbackj]resume() -> Noneaj]jjGjnjeujJ}(jjJjjjeject or open the cdrom drivej]eject() -> Noneaj]jjJjnjeujM}(jjMjjjthe index of the cdrom drivej]get_id() -> idaj]jjMjnjeujP}(jjPjjj"the system name of the cdrom drivej]get_name() -> nameaj]jjPjnjeujS}(jjSjjj"true if the drive is playing audioj]get_busy() -> boolaj]jjSjnjeujV}(jjVjjjtrue if the drive is pausedj]get_paused() -> boolaj]jjVjnjeujY}(jjYjjj#the current audio playback positionj]get_current() -> track, secondsaj]jjYjnjeuj\}(jj\jjj False if a cdrom is in the drivej]get_empty() -> boolaj]jj\jnjeuj_}(jj_jjj!the number of tracks on the cdromj]get_numtracks() -> countaj]jj_jnjeujb}(jjbjjj&true if the cdrom track has audio dataj]get_track_audio(track) -> boolaj]jjbjnjeuje}(jjejjjget all track informationj]/get_all() -> [(audio, start, end, length), ...]aj]jjejnjeujh}(jjhjjjstart time of a cdrom trackj]!get_track_start(track) -> secondsaj]jjhjnjeujk}(jjkjjjlength of a cdrom trackj]"get_track_length(track) -> secondsaj]jjkjnjeuj2}(jj2jjjclass to manage a cdrom drivej] CD(id) -> CDaj](j5j8j;j>jAjDjGjJjMjPjSjVjYj\j_jbjejhjkejj2jnjeu pygame.cdrom}(jjjj]j%pygame module for audio cdrom controlj]j](j&j)j,j/j2ejj#jnjeujr}(jjrjjj(Gets or sets the red value of the Color.j]r -> intaj]jjrjnjZuju}(jjujj j*Gets or sets the green value of the Color.j]g -> intaj]jjujnjZujx}(jjxjj j)Gets or sets the blue value of the Color.j]b -> intaj]jjxjnjZuj{}(jj{jj j*Gets or sets the alpha value of the Color.j]a -> intaj]jj{jnjZuj~}(jj~jj j1Gets or sets the CMY representation of the Color.j] cmy -> tupleaj]jj~jnjZuj}(jjjj j2Gets or sets the HSVA representation of the Color.j] hsva -> tupleaj]jjjnjZuj}(jjjj j2Gets or sets the HSLA representation of the Color.j] hsla -> tupleaj]jjjnjZuj}(jjjj j4Gets or sets the I1I2I3 representation of the Color.j]i1i2i3 -> tupleaj]jjjnjZuj}(jjjj j0Returns the normalized RGBA values of the Color.j]normalize() -> tupleaj]jjjnjZuj}(jjjj j+Applies a certain gamma value to the Color.j]correct_gamma (gamma) -> Coloraj]jjjnjZuj}(jjjj$ j7Set the number of elements in the Color to 1,2,3, or 4.j]set_length(len) -> Noneaj]jjjnjZuj}(jjjj( j returns the grayscale of a Colorj]grayscale() -> Coloraj]jjjnjZuj}(jjjj, j2returns a linear interpolation to the given Color.j]lerp(Color, float) -> Coloraj]jjjnjZuj}(jjjj0 jMreturns a Color where the r,g,b components have been multiplied by the alpha.j]premul_alpha() -> Coloraj]jjjnjZuj}(jjjj4 jSets the elements of the colorj](update(r, g, b) -> Noneupdate(r, g, b, a=255) -> Noneupdate(color_value) -> Noneej]jjjnjZujo}(jjojjj'pygame object for color representationsj](Color(r, g, b) -> ColorColor(r, g, b, a=255) -> ColorColor(color_value) -> Colorej](jrjujxj{j~jjjjjjjjjjejjojnjZu pygame-colorjj}(jjjj: j-create binary cursor data from simple stringsj]=compile(strings, black='X', white='.', xor='o') -> data, maskaj]jjjnjiuj}(jjjj> j!load cursor data from an XBM filej](#load_xbm(cursorfile) -> cursor_args-load_xbm(cursorfile, maskfile) -> cursor_argsej]jjjnjiuj}(jjjjF jcopy the current cursorj]copy() -> Cursoraj]jjjnjiuj}(jjjjJ jGets the cursor typej]type -> stringaj]jjjnjiuj}(jjjjN jGets the cursor dataj] data -> tupleaj]jjjnjiuj}(jjjjB j#pygame object representing a cursorj](3Cursor(size, hotspot, xormasks, andmasks) -> Cursor"Cursor(hotspot, surface) -> CursorCursor(constant) -> CursorCursor(Cursor) -> CursorCursor() -> Cursorej](jjjejjjnjiupygame.cursors}(jjjj]j"pygame module for cursor resourcesj]j](jjjejjjnjiuj}(jjjjT jInitialize the display modulej]init() -> Noneaj]jjjnj.uj}(jjjjX jUninitialize the display modulej]quit() -> Noneaj]jjjnj.uj}(jjjj\ j7Returns True if the display module has been initializedj]get_init() -> boolaj]jjjnj.uj}(jjjj` j)Initialize a window or screen for displayj]Fset_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surfaceaj]jjjnj.uj}(jjjjd j4Get a reference to the currently set display surfacej]get_surface() -> Surfaceaj]jjjnj.uj}(jjjjh j-Update the full display Surface to the screenj]flip() -> Noneaj]jjjnj.uj}(jjjjl j3Update portions of the screen for software displaysj](update(rectangle=None) -> Noneupdate(rectangle_list) -> Noneej]jjjnj.uj}(jjjjp j*Get the name of the pygame display backendj]get_driver() -> nameaj]jjjnj.uj}(jjjjt j)Create a video display information objectj]Info() -> VideoInfoaj]jjjnj.uj}(jjjjx j2Get information about the current windowing systemj]get_wm_info() -> dictaj]jjjnj.uj}(jjjj| jGet sizes of active desktopsj]get_desktop_sizes() -> listaj]jjjnj.uj}(jjjj j&Get list of available fullscreen modesj]?list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> listaj]jjjnj.uj}(jjjj j,Pick the best color depth for a display modej]3mode_ok(size, flags=0, depth=0, display=0) -> depthaj]jjjnj.uj}(jjjj j8Get the value for an OpenGL flag for the current displayj]gl_get_attribute(flag) -> valueaj]jjjnj.uj}(jjjj j8Request an OpenGL display attribute for the display modej]%gl_set_attribute(flag, value) -> Noneaj]jjjnj.uj}(jjjj j5Returns True when the display is active on the screenj]get_active() -> boolaj]jjjnj.uj}(jjjj jIconify the display surfacej]iconify() -> boolaj]jjjnj.uj}(jjjj j/Switch between fullscreen and windowed displaysj]toggle_fullscreen() -> intaj]jjjnj.uj}(jjjj jChange the hardware gamma rampsj]-set_gamma(red, green=None, blue=None) -> boolaj]jjjnj.uj}(jjjj j4Change the hardware gamma ramps with a custom lookupj](set_gamma_ramp(red, green, blue) -> boolaj]jjjnj.uj}(jjjj j.Change the system image for the display windowj]set_icon(Surface) -> Noneaj]jjjnj.uj}(jjjj jSet the current window captionj]*set_caption(title, icontitle=None) -> Noneaj]jjjnj.uj}(jjjj jGet the current window captionj]#get_caption() -> (title, icontitle)aj]jjjnj.uj}(jjjj j2Set the display color palette for indexed displaysj]!set_palette(palette=None) -> Noneaj]jjjnj.uj}(jjjj jReturn the number of displaysj]get_num_displays() -> intaj]jjjnj.uj}(jjjj j'Return the size of the window or screenj]get_window_size() -> tupleaj]jjjnj.uj}(jjjj j1Return whether the screensaver is allowed to run.j]get_allow_screensaver() -> boolaj]jjjnj.uj }(jj jj j#Set whether the screensaver may runj]#set_allow_screensaver(bool) -> Noneaj]jj jnj.upygame.display}(jjjj]j6pygame module to control the display window and screenj]j](jjjjjjjjjjjjjjjjjjjjjjjjjjjj ejjjnj.uj}(jjjj jdraw a rectanglej]("rect(surface, color, rect) -> Rectrect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rectej]jjjnj5uj}(jjjj jdraw a polygonj]('polygon(surface, color, points) -> Rect0polygon(surface, color, points, width=0) -> Rectej]jjjnj5uj}(jjjj j draw a circlej](.circle(surface, color, center, radius) -> Rectcircle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rectej]jjjnj5uj}(jjjj jdraw an ellipsej](%ellipse(surface, color, rect) -> Rect.ellipse(surface, color, rect, width=0) -> Rectej]jjjnj5uj}(jjjj jdraw an elliptical arcj](:arc(surface, color, rect, start_angle, stop_angle) -> RectCarc(surface, color, rect, start_angle, stop_angle, width=1) -> Rectej]jjjnj5uj!}(jj!jj jdraw a straight linej](0line(surface, color, start_pos, end_pos) -> Rect9line(surface, color, start_pos, end_pos, width=1) -> Rectej]jj!jnj5uj$}(jj$jj j/draw multiple contiguous straight line segmentsj](-lines(surface, color, closed, points) -> Rect6lines(surface, color, closed, points, width=1) -> Rectej]jj$jnj5uj'}(jj'jj j draw a straight antialiased linej](2aaline(surface, color, start_pos, end_pos) -> Rect;aaline(surface, color, start_pos, end_pos, blend=1) -> Rectej]jj'jnj5uj*}(jj*jj j;draw multiple contiguous straight antialiased line segmentsj](/aalines(surface, color, closed, points) -> Rect8aalines(surface, color, closed, points, blend=1) -> Rectej]jj*jnj5u pygame.draw}(jjjj]j pygame module for drawing shapesj]j](jjjjjj!j$j'j*ejjjnj5uj1}(jj1jj j(internally process pygame event handlersj]pump() -> Noneaj]jj1jnjduj4}(jj4jj jget events from the queuej]( get(eventtype=None) -> Eventlist+get(eventtype=None, pump=True) -> Eventlist9get(eventtype=None, pump=True, exclude=None) -> Eventlistej]jj4jnjduj7}(jj7jj j!get a single event from the queuej]poll() -> Event instanceaj]jj7jnjduj:}(jj:jj j&wait for a single event from the queuej](wait() -> Event instancewait(timeout) -> Event instanceej]jj:jnjduj=}(jj=jj j,test if event types are waiting on the queuej](peek(eventtype=None) -> bool'peek(eventtype=None, pump=True) -> boolej]jj=jnjduj@}(jj@jj j remove all events from the queuej](clear(eventtype=None) -> None(clear(eventtype=None, pump=True) -> Noneej]jj@jnjdujC}(jjCjj j$get the string name from an event idj]event_name(type) -> stringaj]jjCjnjdujF}(jjFjj j-control which events are allowed on the queuej](set_blocked(type) -> Noneset_blocked(typelist) -> Noneset_blocked(None) -> Noneej]jjFjnjdujI}(jjIjj j-control which events are allowed on the queuej](set_allowed(type) -> Noneset_allowed(typelist) -> Noneset_allowed(None) -> Noneej]jjIjnjdujL}(jjLjj j1test if a type of event is blocked from the queuej](get_blocked(type) -> boolget_blocked(typelist) -> boolej]jjLjnjdujO}(jjOjj j Noneaj]jjOjnjdujR}(jjRjj j,test if the program is sharing input devicesj]get_grab() -> boolaj]jjRjnjdujU}(jjUjj jUgrab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.j]set_keyboard_grab(bool) -> Noneaj]jjUjnjdujX}(jjXjj j#get the current keyboard grab statej]get_keyboard_grab() -> boolaj]jjXjnjduj[}(jj[jj$ jplace a new event on the queuej]post(Event) -> boolaj]jj[jnjduj^}(jj^jj( jmake custom user event typej]custom_type() -> intaj]jj^jnjdujd}(jjdjj0 jevent type identifier.j] type -> intaj]jjdjnjdujg}(jjgjj4 jevent attribute dictionaryj]__dict__ -> dictaj]jjgjnjduja}(jjajj, j%pygame object for representing eventsj](Event(type, dict) -> Event"Event(type, **attributes) -> Eventej](jdjgejjajnjdu pygame.event}(jjjj]j4pygame module for interacting with events and queuesj]j](j1j4j7j:j=j@jCjFjIjLjOjRjUjXj[j^jaejj.jnjdujn}(jjnjj: jplay the full aliens examplej]aliens.main() -> Noneaj]jjnjnjnujq}(jjqjj> jrun a simple starfield examplej]stars.main() -> Noneaj]jjqjnjnujt}(jjtjjB jhit the moving chimpj]chimp.main() -> Noneaj]jjtjnjnujw}(jjwjjF j&display animated objects on the screenj]moveit.main() -> Noneaj]jjwjnjnujz}(jjzjjJ jrun a font rendering examplej]fonty.main() -> Noneaj]jjzjnjnuj}}(jj}jjN j run a FreeType rendering examplej]freetype_misc.main() -> Noneaj]jj}jnjnuj}(jjjjR jdisplay a vertical gradientj]vgrade.main() -> Noneaj]jjjnjnuj}(jjjjV jdisplay pygame eventsj]eventlist.main() -> Noneaj]jjjnjnuj}(jjjjZ jshow various surfarray effectsj]&arraydemo.main(arraytype=None) -> Noneaj]jjjnjnuj}(jjjj^ jload and play a soundj]"sound.main(file_path=None) -> Noneaj]jjjnjnuj}(jjjjb jplay various sndarray effectsj].sound_array_demos.main(arraytype=None) -> Noneaj]jjjnjnuj}(jjjjf j!display an animated liquid effectj]liquid.main() -> Noneaj]jjjnjnuj}(jjjjj j(display an animated 3D cube using OpenGLj]glcube.main() -> Noneaj]jjjnjnuj}(jjjjn jaccess the clipboardj]scrap_clipboard.main() -> Noneaj]jjjnjnuj}(jjjjr jGdisplay multiple images bounce off each other using collision detectionj]mask.main(*args) -> Noneaj]jjjnjnuj}(jjjjv j"show lots of sprites moving aroundj]testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> Noneaj]jjjnjnuj}(jjjjz j>write an image file that is smoothscaled copy of an input filej]8headless_no_windows_needed.main(fin, fout, w, h) -> Noneaj]jjjnjnuj}(jjjj~ j"demonstrate joystick functionalityj]joystick.main() -> Noneaj]jjjnjnuj}(jjjj j9demonstrate the various surface.fill method blend optionsj]blend_fill.main() -> Noneaj]jjjnjnuj}(jjjj j6uses alternative additive fill to that of surface.fillj]blit_blends.main() -> Noneaj]jjjnjnuj}(jjjj j$display two different custom cursorsj]cursors.main() -> Noneaj]jjjnjnuj}(jjjj j,display various pixelarray generated effectsj]pixelarray.main() -> Noneaj]jjjnjnuj}(jjjj j.interactively scale an image using smoothscalej]Kscaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> Noneaj]jjjnjnuj}(jjjj jrun a midi examplej]0midi.main(mode='output', device_id=None) -> Noneaj]jjjnjnuj}(jjjj j9run a Surface.scroll example that shows a magnified imagej]$scroll.main(image_file=None) -> Noneaj]jjjnjnuj}(jjjj j3display video captured live from an attached cameraj]camera.main() -> Noneaj]jjjnjnuj}(jjjj jplay an audio filej]playmus.main(file_path) -> Noneaj]jjjnjnupygame.examples}(jjjj]jmodule of example programsj]j](jnjqjtjwjzj}jjjjjjjjjjjjjjjjjjjjjejjkjnjnuj}(jjjj jinitialize pygame.fasteventj]init() -> Noneaj]jjjnjCuj}(jjjj j=returns True if the fastevent module is currently initializedj]get_init() -> boolaj]jjjnjCuj}(jjjj j(internally process pygame event handlersj]pump() -> Noneaj]jjjnjCuj}(jjjj jwait for an eventj]wait() -> Eventaj]jjjnjCuj}(jjjj jget an available eventj]poll() -> Eventaj]jjjnjCuj}(jjjj jget all events from the queuej]get() -> list of Eventsaj]jjjnjCuj}(jjjj jplace an event on the queuej]post(Event) -> Noneaj]jjjnjCupygame.fastevent}(jjjj]j4pygame module for interacting with events and queuesj]j](jjjjjjjejjjnjCuj}(jjjj jinitialize the font modulej]init() -> Noneaj]jjjnjuj}(jjjj juninitialize the font modulej]quit() -> Noneaj]jjjnjuj}(jjjj j&true if the font module is initializedj]get_init() -> boolaj]jjjnjuj}(jjjj j$get the filename of the default fontj]get_default_font() -> stringaj]jjjnjuj}(jjjj jgets SDL_ttf versionj]9get_sdl_ttf_version(linked=True) -> (major, minor, patch)aj]jjjnjuj}(jjjj jget all available fontsj]get_fonts() -> list of stringsaj]jjjnjuj}(jjjj j"find a specific font on the systemj]2match_font(name, bold=False, italic=False) -> pathaj]jjjnjuj}(jjjj j*create a Font object from the system fontsj]5SysFont(name, size, bold=False, italic=False) -> Fontaj]jjjnjuj}(jjjj jAGets or sets whether the font should be rendered in (faked) bold.j] bold -> boolaj]jjjnjuj}(jjjj jDGets or sets whether the font should be rendered in (faked) italics.j]italic -> boolaj]jjjnjuj}(jjjj jCGets or sets whether the font should be rendered with an underline.j]underline -> boolaj]jjjnjuj}(jjjj jFGets or sets whether the font should be rendered with a strikethrough.j]strikethrough -> boolaj]jjjnjuj}(jjjj jdraw text on a new Surfacej]:render(text, antialias, color, background=None) -> Surfaceaj]jjjnjuj}(jjjj j3determine the amount of space needed to render textj]size(text) -> (width, height)aj]jjjnjuj }(jj jj j-control if text is rendered with an underlinej]set_underline(bool) -> Noneaj]jj jnjuj }(jj jj j0check if text will be rendered with an underlinej]get_underline() -> boolaj]jj jnjuj}(jjjj j0control if text is rendered with a strikethroughj]set_strikethrough(bool) -> Noneaj]jjjnjuj}(jjjj j3check if text will be rendered with a strikethroughj]get_strikethrough() -> boolaj]jjjnjuj}(jjjj j"enable fake rendering of bold textj]set_bold(bool) -> Noneaj]jjjnjuj}(jjjj j#check if text will be rendered boldj]get_bold() -> boolaj]jjjnjuj}(jjjj j$enable fake rendering of italic textj]set_italic(bool) -> Noneaj]jjjnjuj}(jjjj j8gets the metrics for each character in the passed stringj]metrics(text) -> listaj]jjjnjuj!}(jj!jj# j)check if the text will be rendered italicj]get_italic() -> boolaj]jj!jnjuj$}(jj$jj' j#get the line space of the font textj]get_linesize() -> intaj]jj$jnjuj'}(jj'jj+ jget the height of the fontj]get_height() -> intaj]jj'jnjuj*}(jj*jj/ jget the ascent of the fontj]get_ascent() -> intaj]jj*jnjuj-}(jj-jj3 jget the descent of the fontj]get_descent() -> intaj]jj-jnjuj0}(jj0jj7 j$set the script code for text shapingj]set_script(str) -> Noneaj]jj0jnjuj}(jjjj j$create a new Font object from a filej](%Font(file_path=None, size=12) -> FontFont(file_path, size) -> Font Font(pathlib.Path, size) -> FontFont(object, size) -> Fontej](jjjjjjj j jjjjjjj!j$j'j*j-j0ejjjnju pygame.font}(jjjj]j-pygame module for loading and rendering fontsj]j](jjjjjjjjjejjjnjuj7}(jj7jj= j Return the latest FreeType errorj](get_error() -> strget_error() -> Noneej]jj7jnjWuj:}(jj:jjA jReturn the FreeType versionj]+get_version(linked=True) -> (int, int, int)aj]jj:jnjWuj=}(jj=jjE j+Initialize the underlying FreeType library.j]*init(cache_size=64, resolution=72) -> Noneaj]jj=jnjWuj@}(jj@jjI j*Shut down the underlying FreeType library.j]quit() -> Noneaj]jj@jnjWujC}(jjCjjM j=Returns True if the FreeType module is currently initialized.j]get_init() -> boolaj]jjCjnjWujF}(jjFjjQ j#DEPRECATED: Use get_init() instead.j]was_init() -> boolaj]jjFjnjWujI}(jjIjjU jReturn the glyph case sizej]get_cache_size() -> longaj]jjIjnjWujL}(jjLjjY j.Return the default pixel size in dots per inchj] get_default_resolution() -> longaj]jjLjnjWujO}(jjOjj] j:Set the default pixel size in dots per inch for the modulej]$set_default_resolution([resolution])aj]jjOjnjWujR}(jjRjja j*create a Font object from the system fontsj]5SysFont(name, size, bold=False, italic=False) -> Fontaj]jjRjnjWujU}(jjUjje j$Get the filename of the default fontj]get_default_font() -> stringaj]jjUjnjWuj[}(jj[jjm jProper font name.j]name -> stringaj]jj[jnjWuj^}(jj^jjq jFont file pathj]path -> unicodeaj]jj^jnjWuja}(jjajju j(The default point size used in renderingj]( size -> floatsize -> (float, float)ej]jjajnjWujd}(jjdjjy j+Return the size and offset of rendered textj]?get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rectaj]jjdjnjWujg}(jjgjj} j+Return the glyph metrics for the given textj])get_metrics(text, size=0) -> [(...), ...]aj]jjgjnjWujj}(jjjjj j-The unscaled height of the font in font unitsj] height -> intaj]jjjjnjWujm}(jjmjj j-The unscaled ascent of the font in font unitsj]ascender -> intaj]jjmjnjWujp}(jjpjj j.The unscaled descent of the font in font unitsj]descender -> intaj]jjpjnjWujs}(jjsjj j'The scaled ascent of the font in pixelsj]#get_sized_ascender(=0) -> intaj]jjsjnjWujv}(jjvjj j(The scaled descent of the font in pixelsj]$get_sized_descender(=0) -> intaj]jjvjnjWujy}(jjyjj j'The scaled height of the font in pixelsj]!get_sized_height(=0) -> intaj]jjyjnjWuj|}(jj|jj j4The scaled bounding box height of the font in pixelsj]'get_sized_glyph_height(=0) -> intaj]jj|jnjWuj}(jjjj j.return the available sizes of embedded bitmapsj](3get_sizes() -> [(int, int, int, float, float), ...]get_sizes() -> []ej]jjjnjWuj}(jjjj j!Return rendered text as a surfacej]drender(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)aj]jjjnjWuj}(jjjj j$Render text onto an existing surfacej]hrender_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rectaj]jjjnjWuj}(jjjj j)Return rendered text as a string of bytesj]^render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))aj]jjjnjWuj}(jjjj j!Render text into an array of intsj]drender_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rectaj]jjjnjWuj}(jjjj jThe font's style flagsj] style -> intaj]jjjnjWuj}(jjjj j,The state of the font's underline style flagj]underline -> boolaj]jjjnjWuj}(jjjj j)The state of the font's strong style flagj]strong -> boolaj]jjjnjWuj}(jjjj j*The state of the font's oblique style flagj]oblique -> boolaj]jjjnjWuj}(jjjj j'The state of the font's wide style flagj] wide -> boolaj]jjjnjWuj}(jjjj j;The strength associated with the strong or wide font stylesj]strength -> floataj]jjjnjWuj}(jjjj j,Adjustment factor for the underline positionj]underline_adjustment -> floataj]jjjnjWuj}(jjjj j$Gets whether the font is fixed-widthj]fixed_width -> boolaj]jjjnjWuj}(jjjj j1the number of available bitmap sizes for the fontj]fixed_sizes -> intaj]jjjnjWuj}(jjjj j!Gets whether the font is scalablej]scalable -> boolaj]jjjnjWuj}(jjjj j9allow the use of embedded bitmaps in an outline font filej]use_bitmap_strikes -> boolaj]jjjnjWuj}(jjjj jFont anti-aliasing modej]antialiased -> boolaj]jjjnjWuj}(jjjj jCharacter kerning modej]kerning -> boolaj]jjjnjWuj}(jjjj jFont vertical modej]vertical -> boolaj]jjjnjWuj}(jjjj j)text rotation in degrees counterclockwisej]rotation -> intaj]jjjnjWuj}(jjjj jdefault foreground colorj]fgcolor -> Coloraj]jjjnjWuj}(jjjj jdefault background colorj]bgcolor -> Coloraj]jjjnjWuj}(jjjj jFont render to text origin modej]origin -> boolaj]jjjnjWuj}(jjjj jpadded boundary modej] pad -> boolaj]jjjnjWuj}(jjjj jEnable UCS-4 modej] ucs4 -> boolaj]jjjnjWuj}(jjjj j!Pixel resolution in dots per inchj]resolution -> intaj]jjjnjWujX}(jjXjji j6Create a new Font instance from a supported font file.j](BFont(file, size=0, font_index=0, resolution=0, ucs4=False) -> FontFont(pathlib.Path) -> Fontej](j[j^jajdjgjjjmjpjsjvjyj|jjjjjjjjjjjjjjjjjjjjjjjjjjejjXjnjWupygame.freetype}(jjjj]j?Enhanced pygame module for loading and rendering computer fontsj]j](j7j:j=j@jCjFjIjLjOjRjUjXejj4jnjWuj}(jjjj j draw a pixelj]#pixel(surface, x, y, color) -> Noneaj]jjjnjhuj}(jjjj jdraw a horizontal linej](hline(surface, x1, x2, y, color) -> Noneaj]jjjnjhuj}(jjjj jdraw a vertical linej](vline(surface, x, y1, y2, color) -> Noneaj]jjjnjhuj}(jjjj j draw a linej],line(surface, x1, y1, x2, y2, color) -> Noneaj]jjjnjhuj}(jjjj jdraw a rectanglej]'rectangle(surface, rect, color) -> Noneaj]jjjnjhuj}(jjjj jdraw a filled rectanglej]!box(surface, rect, color) -> Noneaj]jjjnjhuj}(jjjj j draw a circlej]'circle(surface, x, y, r, color) -> Noneaj]jjjnjhuj}(jjjj# jdraw an antialiased circlej])aacircle(surface, x, y, r, color) -> Noneaj]jjjnjhuj}(jjjj' jdraw a filled circlej].filled_circle(surface, x, y, r, color) -> Noneaj]jjjnjhuj}(jjjj+ jdraw an ellipsej]-ellipse(surface, x, y, rx, ry, color) -> Noneaj]jjjnjhuj}(jjjj/ jdraw an antialiased ellipsej]/aaellipse(surface, x, y, rx, ry, color) -> Noneaj]jjjnjhuj}(jjjj3 jdraw a filled ellipsej]4filled_ellipse(surface, x, y, rx, ry, color) -> Noneaj]jjjnjhuj}(jjjj7 j draw an arcj]=arc(surface, x, y, r, start_angle, stop_angle, color) -> Noneaj]jjjnjhuj}(jjjj; j draw a piej]=pie(surface, x, y, r, start_angle, stop_angle, color) -> Noneaj]jjjnjhuj}(jjjj? jdraw a trigon/trianglej]6trigon(surface, x1, y1, x2, y2, x3, y3, color) -> Noneaj]jjjnjhuj}(jjjjC j#draw an antialiased trigon/trianglej]8aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> Noneaj]jjjnjhuj}(jjjjG jdraw a filled trigon/trianglej]=filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> Noneaj]jjjnjhuj}(jjjjK jdraw a polygonj]'polygon(surface, points, color) -> Noneaj]jjjnjhuj}(jjjjO jdraw an antialiased polygonj])aapolygon(surface, points, color) -> Noneaj]jjjnjhuj }(jj jjS jdraw a filled polygonj].filled_polygon(surface, points, color) -> Noneaj]jj jnjhuj }(jj jjW jdraw a textured polygonj]:textured_polygon(surface, points, texture, tx, ty) -> Noneaj]jj jnjhuj}(jjjj[ jdraw a Bezier curvej]-bezier(surface, points, steps, color) -> Noneaj]jjjnjhupygame.gfxdraw}(jjjj]j pygame module for drawing shapesj]j](jjjjjjjjjjjjjjjjjjjj j jejjjnjhuj}(jjjja j0load new image from a file (or file-like object)j](load(filename) -> Surface%load(fileobj, namehint="") -> Surfaceej]jjjnj7uj}(jjjje j+save an image to file (or file-like object)j](save(Surface, filename) -> None+save(Surface, fileobj, namehint="") -> Noneej]jjjnj7uj}(jjjji j6get version number of the SDL_Image library being usedj](*get_sdl_image_version(linked=True) -> None;get_sdl_image_version(linked=True) -> (major, minor, patch)ej]jjjnj7uj }(jj jjm j,test if extended image formats can be loadedj]get_extended() -> boolaj]jj jnj7uj#}(jj#jjq jtransfer image to byte bufferj]1tostring(Surface, format, flipped=False) -> bytesaj]jj#jnj7uj&}(jj&jju jtransfer image to byte bufferj]0tobytes(Surface, format, flipped=False) -> bytesaj]jj&jnj7uj)}(jj)jjy j%create new Surface from a byte bufferj]9fromstring(bytes, size, format, flipped=False) -> Surfaceaj]jj)jnj7uj,}(jj,jj} j%create new Surface from a byte bufferj]8frombytes(bytes, size, format, flipped=False) -> Surfaceaj]jj,jnj7uj/}(jj/jj j;create a new Surface that shares data inside a bytes bufferj]+frombuffer(buffer, size, format) -> Surfaceaj]jj/jnj7uj2}(jj2jj j4load new BMP image from a file (or file-like object)j]load_basic(file) -> Surfaceaj]jj2jnj7uj5}(jj5jj j/load an image from a file (or file-like object)j]("load_extended(filename) -> Surface.load_extended(fileobj, namehint="") -> Surfaceej]jj5jnj7uj8}(jj8jj j2save a png/jpg image to file (or file-like object)j]((save_extended(Surface, filename) -> None4save_extended(Surface, fileobj, namehint="") -> Noneej]jj8jnj7u pygame.image}(jjjj]j pygame module for image transferj]j](jjjj j#j&j)j,j/j2j5j8ejjjnj7uj?}(jj?jj jInitialize the joystick module.j]init() -> Noneaj]jj?jnjujB}(jjBjj j!Uninitialize the joystick module.j]quit() -> Noneaj]jjBjnjujE}(jjEjj j3Returns True if the joystick module is initialized.j]get_init() -> boolaj]jjEjnjujH}(jjHjj j Returns the number of joysticks.j]get_count() -> countaj]jjHjnjujN}(jjNjj jinitialize the Joystickj]init() -> Noneaj]jjNjnjujQ}(jjQjj juninitialize the Joystickj]quit() -> Noneaj]jjQjnjujT}(jjTjj j$check if the Joystick is initializedj]get_init() -> boolaj]jjTjnjujW}(jjWjj j!get the device index (deprecated)j]get_id() -> intaj]jjWjnjujZ}(jjZjj jget the joystick instance idj]get_instance_id() -> intaj]jjZjnjuj]}(jj]jj jget the joystick GUIDj]get_guid() -> straj]jj]jnjuj`}(jj`jj j.get the approximate power status of the devicej]get_power_level() -> straj]jj`jnjujc}(jjcjj jget the Joystick system namej]get_name() -> stringaj]jjcjnjujf}(jjfjj j$get the number of axes on a Joystickj]get_numaxes() -> intaj]jjfjnjuji}(jjijj j#get the current position of an axisj]get_axis(axis_number) -> floataj]jjijnjujl}(jjljj j*get the number of trackballs on a Joystickj]get_numballs() -> intaj]jjljnjujo}(jjojj j(get the relative position of a trackballj]get_ball(ball_number) -> x, yaj]jjojnjujr}(jjrjj j'get the number of buttons on a Joystickj]get_numbuttons() -> intaj]jjrjnjuju}(jjujj jget the current button statej]get_button(button) -> boolaj]jjujnjujx}(jjxjj j,get the number of hat controls on a Joystickj]get_numhats() -> intaj]jjxjnjuj{}(jj{jj j"get the position of a joystick hatj]get_hat(hat_number) -> x, yaj]jj{jnjuj~}(jj~jj jStart a rumbling effectj]7rumble(low_frequency, high_frequency, duration) -> boolaj]jj~jnjuj}(jjjj jStop any rumble effect playingj]stop_rumble() -> Noneaj]jjjnjujK}(jjKjj jCreate a new Joystick object.j]Joystick(id) -> Joystickaj](jNjQjTjWjZj]j`jcjfjijljojrjujxj{j~jejjKjnjupygame.joystick}(jjjj]jGPygame module for interacting with joysticks, gamepads, and trackballs.j]j](j?jBjEjHjKejj<jnjuj}(jjjj j?true if the display is receiving keyboard input from the systemj]get_focused() -> boolaj]jjjnj^uj}(jjjj j%get the state of all keyboard buttonsj]get_pressed() -> boolsaj]jjjnj^uj}(jjjj j,determine which modifier keys are being heldj]get_mods() -> intaj]jjjnj^uj}(jjjj j/temporarily set which modifier keys are pressedj]set_mods(int) -> Noneaj]jjjnj^uj}(jjjj j"control how held keys are repeatedj](set_repeat() -> Noneset_repeat(delay) -> None#set_repeat(delay, interval) -> Noneej]jjjnj^uj}(jjjj jsee how held keys are repeatedj]!get_repeat() -> (delay, interval)aj]jjjnj^uj}(jjjj j get the name of a key identifierj]!name(key, use_compat=True) -> straj]jjjnj^uj}(jjjj j&get the key identifier from a key namej]key_code(name=string) -> intaj]jjjnj^uj}(jjjj j(start handling Unicode text input eventsj]start_text_input() -> Noneaj]jjjnj^uj}(jjjj j'stop handling Unicode text input eventsj]stop_text_input() -> Noneaj]jjjnj^uj}(jjjj j+controls the position of the candidate listj]!set_text_input_rect(Rect) -> Noneaj]jjjnj^u pygame.key}(jjjj]j'pygame module to work with the keyboardj]j](jjjjjjjjjjjejjjnj^u pygame.locals}(jjjj]jpygame constantsj]j]jjjnjuj}(jjjj" j%Creates a Mask from the given surfacej](from_surface(surface) -> Mask,from_surface(surface, threshold=127) -> Maskej]jjjnj#uj}(jjjj& j'Creates a mask by thresholding Surfacesj](&from_threshold(surface, color) -> Maskefrom_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Maskej]jjjnj#uj}(jjjj. jReturns a new copy of the maskj]copy() -> Maskaj]jjjnj#uj}(jjjj2 jReturns the size of the maskj]get_size() -> (width, height)aj]jjjnj#uj}(jjjj6 j,Returns a Rect based on the size of the maskj]get_rect(**kwargs) -> Rectaj]jjjnj#uj}(jjjj: j"Gets the bit at the given positionj]get_at(pos) -> intaj]jjjnj#uj}(jjjj> j"Sets the bit at the given positionj](set_at(pos) -> Noneset_at(pos, value=1) -> Noneej]jjjnj#uj}(jjjjB j!Returns the point of intersectionj]( overlap(other, offset) -> (x, y)overlap(other, offset) -> Noneej]jjjnj#uj}(jjjjF j*Returns the number of overlapping set bitsj]&overlap_area(other, offset) -> numbitsaj]jjjnj#uj}(jjjjJ j*Returns a mask of the overlapping set bitsj]#overlap_mask(other, offset) -> Maskaj]jjjnj#uj}(jjjjN jSets all bits to 1j]fill() -> Noneaj]jjjnj#uj}(jjjjR jSets all bits to 0j]clear() -> Noneaj]jjjnj#uj}(jjjjV jFlips all the bitsj]invert() -> Noneaj]jjjnj#uj}(jjjjZ jResizes a maskj]scale((width, height)) -> Maskaj]jjjnj#uj}(jjjj^ jDraws a mask onto anotherj]draw(other, offset) -> Noneaj]jjjnj#uj}(jjjjb jErases a mask from anotherj]erase(other, offset) -> Noneaj]jjjnj#uj}(jjjjf jReturns the number of set bitsj]count() -> bitsaj]jjjnj#uj}(jjjjj j$Returns the centroid of the set bitsj]centroid() -> (x, y)aj]jjjnj#uj}(jjjjn j'Returns the orientation of the set bitsj]angle() -> thetaaj]jjjnj#uj}(jjjjr j,Returns a list of points outlining an objectj](outline() -> [(x, y), ...]!outline(every=1) -> [(x, y), ...]ej]jjjnj#uj}(jjjjv j6Returns the convolution of this mask with another maskj](convolve(other) -> Mask3convolve(other, output=None, offset=(0, 0)) -> Maskej]jjjnj#uj}(jjjjz j/Returns a mask containing a connected componentj](connected_component() -> Mask connected_component(pos) -> Maskej]jjjnj#uj}(jjjj~ j/Returns a list of masks of connected componentsj](%connected_components() -> [Mask, ...].connected_components(minimum=0) -> [Mask, ...]ej]jjjnj#uj}(jjjj j8Returns a list of bounding rects of connected componentsj]#get_bounding_rects() -> [Rect, ...]aj]jjjnj#uj}(jjjj j+Returns a surface with the mask drawn on itj](to_surface() -> Surfaceto_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surfaceej]jjjnj#uj}(jjjj* j*pygame object for representing 2D bitmasksj]("Mask(size=(width, height)) -> Mask.Mask(size=(width, height), fill=False) -> Maskej](jjjjjjjjjjjjjjjjjjjjjjjejjjnj#u pygame.mask}(jjjj]jpygame module for image masks.j]j](jjjejjjnj#uj}(jjjj j%returns value clamped to min and max.j]clamp(value, min, max) -> floataj]jjjnj*uj}(jjjj j,interpolates between two values by a weight.j]lerp(a, b, weight) -> floataj]jjjnj*uj }(jj jj j;calculates the dot- or scalar-product with the other vectorj]dot(Vector2) -> floataj]jj jnj*uj}(jjjj j'calculates the cross- or vector-productj]cross(Vector2) -> floataj]jjjnj*uj}(jjjj j.returns the Euclidean magnitude of the vector.j]magnitude() -> floataj]jjjnj*uj}(jjjj j,returns the squared magnitude of the vector.j]magnitude_squared() -> floataj]jjjnj*uj}(jjjj j+returns the Euclidean length of the vector.j]length() -> floataj]jjjnj*uj}(jjjj j3returns the squared Euclidean length of the vector.j]length_squared() -> floataj]jjjnj*uj}(jjjj j6returns a vector with the same direction but length 1.j]normalize() -> Vector2aj]jjjnj*uj!}(jj!jj j7normalizes the vector in place so that its length is 1.j]normalize_ip() -> Noneaj]jj!jnj*uj$}(jj$jj j7tests if the vector is normalized i.e. has length == 1.j]is_normalized() -> Boolaj]jj$jnj*uj'}(jj'jj j$scales the vector to a given length.j]scale_to_length(float) -> Noneaj]jj'jnj*uj*}(jj*jj j-returns a vector reflected of a given normal.j]reflect(Vector2) -> Vector2aj]jj*jnj*uj-}(jj-jj j.reflect the vector of a given normal in place.j]reflect_ip(Vector2) -> Noneaj]jj-jnj*uj0}(jj0jj j4calculates the Euclidean distance to a given vector.j]distance_to(Vector2) -> floataj]jj0jnj*uj3}(jj3jj j floataj]jj3jnj*uj6}(jj6jj j=returns a vector moved toward the target by a given distance.j]'move_towards(Vector2, float) -> Vector2aj]jj6jnj*uj9}(jj9jj j7moves the vector toward its target at a given distance.j]'move_towards_ip(Vector2, float) -> Noneaj]jj9jnj*uj<}(jj<jj j3returns a linear interpolation to the given vector.j]lerp(Vector2, float) -> Vector2aj]jj<jnj*uj?}(jj?jj j6returns a spherical interpolation to the given vector.j] slerp(Vector2, float) -> Vector2aj]jj?jnj*ujB}(jjBjj j1The next operation will be performed elementwise.j]'elementwise() -> VectorElementwiseProxyaj]jjBjnj*ujE}(jjEjj j-rotates a vector by a given angle in degrees.j]rotate(angle) -> Vector2aj]jjEjnj*ujH}(jjHjj j-rotates a vector by a given angle in radians.j]rotate_rad(angle) -> Vector2aj]jjHjnj*ujK}(jjKjj j8rotates the vector by a given angle in degrees in place.j]rotate_ip(angle) -> Noneaj]jjKjnj*ujN}(jjNjj j8rotates the vector by a given angle in radians in place.j]rotate_ip_rad(angle) -> Noneaj]jjNjnj*ujQ}(jjQjj j8rotates the vector by a given angle in radians in place.j]rotate_rad_ip(angle) -> Noneaj]jjQjnj*ujT}(jjTjj j2calculates the angle to a given vector in degrees.j]angle_to(Vector2) -> floataj]jjTjnj*ujW}(jjWjj j9returns a tuple with radial distance and azimuthal angle.j]as_polar() -> (r, phi)aj]jjWjnj*ujZ}(jjZjjjGCreates a Vector2(x, y) or sets x and y from a polar coordinates tuple.j]('Vector2.from_polar((r, phi)) -> Vector2&Vector2().from_polar((r, phi)) -> Noneej]jjZjnj*uj]}(jj]jjjprojects a vector onto another.j]project(Vector2) -> Vector2aj]jj]jnj*uj`}(jj`jjjReturns a copy of itself.j]copy() -> Vector2aj]jj`jnj*ujc}(jjcjj jXReturns a copy of a vector with the magnitude clamped between max_length and min_length.j](&clamp_magnitude(max_length) -> Vector22clamp_magnitude(min_length, max_length) -> Vector2ej]jjcjnj*ujf}(jjfjjj?Clamps the vector's magnitude between max_length and min_lengthj](&clamp_magnitude_ip(max_length) -> None2clamp_magnitude_ip(min_length, max_length) -> Noneej]jjfjnj*uji}(jjijjj#Sets the coordinates of the vector.j](update() -> Noneupdate(int) -> Noneupdate(float) -> Noneupdate(Vector2) -> Noneupdate(x, y) -> Noneupdate((x, y)) -> Noneej]jjijnj*ujl}(jjljjj0Determines the tolerance of vector calculations.j]j]jjljnj*uj }(jj jj ja 2-Dimensional Vectorj](Vector2() -> Vector2(0, 0)Vector2(int) -> Vector2Vector2(float) -> Vector2Vector2(Vector2) -> Vector2Vector2(x, y) -> Vector2Vector2((x, y)) -> Vector2ej](j jjjjjjj!j$j'j*j-j0j3j6j9j<j?jBjEjHjKjNjQjTjWjZj]j`jcjfjijlejj jnj*ujr}(jjrjj j;calculates the dot- or scalar-product with the other vectorj]dot(Vector3) -> floataj]jjrjnj*uju}(jjujj$j'calculates the cross- or vector-productj]cross(Vector3) -> Vector3aj]jjujnj*ujx}(jjxjj(j.returns the Euclidean magnitude of the vector.j]magnitude() -> floataj]jjxjnj*uj{}(jj{jj,j6returns the squared Euclidean magnitude of the vector.j]magnitude_squared() -> floataj]jj{jnj*uj~}(jj~jj0j+returns the Euclidean length of the vector.j]length() -> floataj]jj~jnj*uj}(jjjj4j3returns the squared Euclidean length of the vector.j]length_squared() -> floataj]jjjnj*uj}(jjjj8j6returns a vector with the same direction but length 1.j]normalize() -> Vector3aj]jjjnj*uj}(jjjj<j7normalizes the vector in place so that its length is 1.j]normalize_ip() -> Noneaj]jjjnj*uj}(jjjj@j7tests if the vector is normalized i.e. has length == 1.j]is_normalized() -> Boolaj]jjjnj*uj}(jjjjDj$scales the vector to a given length.j]scale_to_length(float) -> Noneaj]jjjnj*uj}(jjjjHj-returns a vector reflected of a given normal.j]reflect(Vector3) -> Vector3aj]jjjnj*uj}(jjjjLj.reflect the vector of a given normal in place.j]reflect_ip(Vector3) -> Noneaj]jjjnj*uj}(jjjjPj4calculates the Euclidean distance to a given vector.j]distance_to(Vector3) -> floataj]jjjnj*uj}(jjjjTj floataj]jjjnj*uj}(jjjjXj=returns a vector moved toward the target by a given distance.j]'move_towards(Vector3, float) -> Vector3aj]jjjnj*uj}(jjjj\j7moves the vector toward its target at a given distance.j]'move_towards_ip(Vector3, float) -> Noneaj]jjjnj*uj}(jjjj`j3returns a linear interpolation to the given vector.j]lerp(Vector3, float) -> Vector3aj]jjjnj*uj}(jjjjdj6returns a spherical interpolation to the given vector.j] slerp(Vector3, float) -> Vector3aj]jjjnj*uj}(jjjjhj1The next operation will be performed elementwise.j]'elementwise() -> VectorElementwiseProxyaj]jjjnj*uj}(jjjjlj-rotates a vector by a given angle in degrees.j]!rotate(angle, Vector3) -> Vector3aj]jjjnj*uj}(jjjjpj-rotates a vector by a given angle in radians.j]%rotate_rad(angle, Vector3) -> Vector3aj]jjjnj*uj}(jjjjtj8rotates the vector by a given angle in degrees in place.j]!rotate_ip(angle, Vector3) -> Noneaj]jjjnj*uj}(jjjjxj8rotates the vector by a given angle in radians in place.j]%rotate_ip_rad(angle, Vector3) -> Noneaj]jjjnj*uj}(jjjj|j8rotates the vector by a given angle in radians in place.j]%rotate_rad_ip(angle, Vector3) -> Noneaj]jjjnj*uj}(jjjjj;rotates a vector around the x-axis by the angle in degrees.j]rotate_x(angle) -> Vector3aj]jjjnj*uj}(jjjjj;rotates a vector around the x-axis by the angle in radians.j]rotate_x_rad(angle) -> Vector3aj]jjjnj*uj}(jjjjjFrotates the vector around the x-axis by the angle in degrees in place.j]rotate_x_ip(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the x-axis by the angle in radians in place.j]rotate_x_ip_rad(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the x-axis by the angle in radians in place.j]rotate_x_rad_ip(angle) -> Noneaj]jjjnj*uj}(jjjjj;rotates a vector around the y-axis by the angle in degrees.j]rotate_y(angle) -> Vector3aj]jjjnj*uj}(jjjjj;rotates a vector around the y-axis by the angle in radians.j]rotate_y_rad(angle) -> Vector3aj]jjjnj*uj}(jjjjjFrotates the vector around the y-axis by the angle in degrees in place.j]rotate_y_ip(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the y-axis by the angle in radians in place.j]rotate_y_ip_rad(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the y-axis by the angle in radians in place.j]rotate_y_rad_ip(angle) -> Noneaj]jjjnj*uj}(jjjjj;rotates a vector around the z-axis by the angle in degrees.j]rotate_z(angle) -> Vector3aj]jjjnj*uj}(jjjjj;rotates a vector around the z-axis by the angle in radians.j]rotate_z_rad(angle) -> Vector3aj]jjjnj*uj}(jjjjjFrotates the vector around the z-axis by the angle in degrees in place.j]rotate_z_ip(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the z-axis by the angle in radians in place.j]rotate_z_ip_rad(angle) -> Noneaj]jjjnj*uj}(jjjjjFrotates the vector around the z-axis by the angle in radians in place.j]rotate_z_rad_ip(angle) -> Noneaj]jjjnj*uj}(jjjjj2calculates the angle to a given vector in degrees.j]angle_to(Vector3) -> floataj]jjjnj*uj}(jjjjjFreturns a tuple with radial distance, inclination and azimuthal angle.j]!as_spherical() -> (r, theta, phi)aj]jjjnj*uj}(jjjjjSCreates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.j](2Vector3.from_spherical((r, theta, phi)) -> Vector31Vector3().from_spherical((r, theta, phi)) -> Noneej]jjjnj*uj}(jjjjjprojects a vector onto another.j]project(Vector3) -> Vector3aj]jjjnj*uj}(jjjjjReturns a copy of itself.j]copy() -> Vector3aj]jjjnj*uj}(jjjjjXReturns a copy of a vector with the magnitude clamped between max_length and min_length.j](&clamp_magnitude(max_length) -> Vector32clamp_magnitude(min_length, max_length) -> Vector3ej]jjjnj*uj}(jjjjj?Clamps the vector's magnitude between max_length and min_lengthj](&clamp_magnitude_ip(max_length) -> None2clamp_magnitude_ip(min_length, max_length) -> Noneej]jjjnj*uj}(jjjjj#Sets the coordinates of the vector.j](update() -> Noneupdate(int) -> Noneupdate(float) -> Noneupdate(Vector3) -> Noneupdate(x, y, z) -> Noneupdate((x, y, z)) -> Noneej]jjjnj*uj}(jjjjj0Determines the tolerance of vector calculations.j]j]jjjnj*ujo}(jjojjja 3-Dimensional Vectorj](Vector3() -> Vector3(0, 0, 0)Vector3(int) -> Vector3Vector3(float) -> Vector3Vector3(Vector3) -> Vector3Vector3(x, y, z) -> Vector3Vector3((x, y, z)) -> Vector3ej](jrjujxj{j~jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjejjojnj*u pygame.math}(jjjj]j pygame module for vector classesj]j](jjj joejjjnj*uj}(jjjjjinitialize the midi modulej]init() -> Noneaj]jjjnj`uj }(jj jjjuninitialize the midi modulej]quit() -> Noneaj]jj jnj`uj }(jj jjj8returns True if the midi module is currently initializedj]get_init() -> boolaj]jj jnj`uj}(jjjjj3closes a midi stream, flushing any pending buffers.j]close() -> Noneaj]jjjnj`uj}(jjjjj.returns True if there's data, or False if not.j]poll() -> boolaj]jjjnj`uj}(jjjjj-reads num_events midi events from the buffer.j]#read(num_events) -> midi_event_listaj]jjjnj`uj}(jjjjj2Input is used to get midi input from midi devices.j](Input(device_id) -> None%Input(device_id, buffer_size) -> Noneej](jjjejjjnj`uj}(jjjjj(terminates outgoing messages immediatelyj]abort() -> Noneaj]jjjnj`uj!}(jj!jjj3closes a midi stream, flushing any pending buffers.j]close() -> Noneaj]jj!jnj`uj$}(jj$jj j'turns a midi note off (note must be on)j]0note_off(note, velocity=None, channel=0) -> Noneaj]jj$jnj`uj'}(jj'jjj'turns a midi note on (note must be off)j]/note_on(note, velocity=None, channel=0) -> Noneaj]jj'jnj`uj*}(jj*jjj4select an instrument, with a value between 0 and 127j]0set_instrument(instrument_id, channel=0) -> Noneaj]jj*jnj`uj-}(jj-jjjmodify the pitch of a channel.j]*set_instrument(value=0, channel=0) -> Noneaj]jj-jnj`uj0}(jj0jjj(writes a list of midi data to the Outputj]write(data) -> Noneaj]jj0jnj`uj3}(jj3jjj/writes up to 3 bytes of midi data to the Outputj](write_short(status) -> None-write_short(status, data1=0, data2=0) -> Noneej]jj3jnj`uj6}(jj6jj"j3writes a timestamped system-exclusive midi message.j]write_sys_ex(when, msg) -> Noneaj]jj6jnj`uj}(jjjjj/Output is used to send midi to an output devicej](Output(device_id) -> None$Output(device_id, latency=0) -> None*Output(device_id, buffer_size=256) -> None/Output(device_id, latency, buffer_size) -> Noneej](jj!j$j'j*j-j0j3j6ejjjnj`uj9}(jj9jj&jgets the number of devices.j]get_count() -> num_devicesaj]jj9jnj`uj<}(jj<jj*j gets default input device numberj]$get_default_input_id() -> default_idaj]jj<jnj`uj?}(jj?jj.j!gets default output device numberj]%get_default_output_id() -> default_idaj]jj?jnj`ujB}(jjBjj2j'returns information about a midi devicej](?get_device_info(an_id) -> (interf, name, input, output, opened)get_device_info(an_id) -> Noneej]jjBjnj`ujE}(jjEjj6j%converts midi events to pygame eventsj]4midis2events(midi_events, device_id) -> [Event, ...]aj]jjEjnj`ujH}(jjHjj:j4returns the current time in ms of the PortMidi timerj]time() -> timeaj]jjHjnj`ujK}(jjKjj>jGConverts a frequency into a MIDI note. Rounds to the closest midi note.j])frequency_to_midi(midi_note) -> midi_noteaj]jjKjnj`ujN}(jjNjjBj$Converts a midi note to a frequency.j])midi_to_frequency(midi_note) -> frequencyaj]jjNjnj`ujQ}(jjQjjFj-Returns the Ansi Note name for a midi number.j])midi_to_ansi_note(midi_note) -> ansi_noteaj]jjQjnj`ujT}(jjTjjJj:exception that pygame.midi functions and classes can raisej]MidiException(errno) -> Noneaj]jjTjnj`u pygame.midi}(jjjj]j9pygame module for interacting with midi input and output.j]j](jj j jjj9j<j?jBjEjHjKjNjQjTejjjnj`uj[}(jj[jjPjinitialize the mixer modulej]init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> Noneaj]jj[jnj&uj^}(jj^jjTjpreset the mixer init argumentsj]pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> Noneaj]jj^jnj&uja}(jjajjXjuninitialize the mixerj]quit() -> Noneaj]jjajnj&ujd}(jjdjj\j test if the mixer is initializedj]+get_init() -> (frequency, format, channels)aj]jjdjnj&ujg}(jjgjj`j#stop playback of all sound channelsj]stop() -> Noneaj]jjgjnj&ujj}(jjjjjdj/temporarily stop playback of all sound channelsj]pause() -> Noneaj]jjjjnj&ujm}(jjmjjhj(resume paused playback of sound channelsj]unpause() -> Noneaj]jjmjnj&ujp}(jjpjjlj1fade out the volume on all sounds before stoppingj]fadeout(time) -> Noneaj]jjpjnj&ujs}(jjsjjpj)set the total number of playback channelsj]set_num_channels(count) -> Noneaj]jjsjnj&ujv}(jjvjjtj)get the total number of playback channelsj]get_num_channels() -> countaj]jjvjnj&ujy}(jjyjjxj.reserve channels from being automatically usedj]set_reserved(count) -> countaj]jjyjnj&uj|}(jj|jj|jfind an unused channelj]$find_channel(force=False) -> Channelaj]jj|jnj&uj}(jjjjj test if any sound is being mixedj]get_busy() -> boolaj]jjjnj&uj}(jjjjjget the mixer's SDL versionj](0get_sdl_mixer_version() -> (major, minor, patch);get_sdl_mixer_version(linked=True) -> (major, minor, patch)ej]jjjnj&uj}(jjjjjbegin sound playbackj].play(loops=0, maxtime=0, fade_ms=0) -> Channelaj]jjjnj&uj}(jjjjjstop sound playbackj]stop() -> Noneaj]jjjnj&uj}(jjjjj$stop sound playback after fading outj]fadeout(time) -> Noneaj]jjjnj&uj}(jjjjj&set the playback volume for this Soundj]set_volume(value) -> Noneaj]jjjnj&uj}(jjjjjget the playback volumej]get_volume() -> valueaj]jjjnj&uj}(jjjjj*count how many times this Sound is playingj]get_num_channels() -> countaj]jjjnj&uj}(jjjjjget the length of the Soundj]get_length() -> secondsaj]jjjnj&uj}(jjjjj.return a bytestring copy of the Sound samples.j]get_raw() -> bytesaj]jjjnj&uj}(jjjjj6Create a new Sound object from a file or buffer objectj](Sound(filename) -> SoundSound(file=filename) -> Sound!Sound(file=pathlib_path) -> SoundSound(buffer) -> SoundSound(buffer=buffer) -> SoundSound(object) -> SoundSound(file=object) -> SoundSound(array=object) -> Soundej](jjjjjjjjejjjnj&uj}(jjjjj"play a Sound on a specific Channelj]2play(Sound, loops=0, maxtime=0, fade_ms=0) -> Noneaj]jjjnj&uj}(jjjjjstop playback on a Channelj]stop() -> Noneaj]jjjnj&uj}(jjjjj&temporarily stop playback of a channelj]pause() -> Noneaj]jjjnj&uj}(jjjjj"resume pause playback of a channelj]unpause() -> Noneaj]jjjnj&uj}(jjjjj&stop playback after fading channel outj]fadeout(time) -> Noneaj]jjjnj&uj}(jjjjj#set the volume of a playing channelj](set_volume(value) -> Noneset_volume(left, right) -> Noneej]jjjnj&uj}(jjjjj%get the volume of the playing channelj]get_volume() -> valueaj]jjjnj&uj}(jjjjjcheck if the channel is activej]get_busy() -> boolaj]jjjnj&uj}(jjjjjget the currently playing Soundj]get_sound() -> Soundaj]jjjnj&uj}(jjjjj*queue a Sound object to follow the currentj]queue(Sound) -> Noneaj]jjjnj&uj}(jjjjjreturn any Sound that is queuedj]get_queue() -> Soundaj]jjjnj&uj}(jjjjj2have the channel send an event when playback stopsj](set_endevent() -> Noneset_endevent(type) -> Noneej]jjjnj&uj}(jjjjj1get the event a channel sends when playback stopsj]get_endevent() -> typeaj]jjjnj&uj}(jjjjj0Create a Channel object for controlling playbackj]Channel(id) -> Channelaj](jjjjjjjjjjjjjejjjnj&u pygame.mixer}(jjjj]j,pygame module for loading and playing soundsj]j](j[j^jajdjgjjjmjpjsjvjyj|jjjjejjXjnj&uj}(jjjjj"get the state of the mouse buttonsj](9get_pressed(num_buttons=3) -> (button1, button2, button3)Kget_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)ej]jjjnj;uj}(jjjjjget the mouse cursor positionj]get_pos() -> (x, y)aj]jjjnj;uj}(jjjjj get the amount of mouse movementj]get_rel() -> (x, y)aj]jjjnj;uj}(jjjjjset the mouse cursor positionj]set_pos([x, y]) -> Noneaj]jjjnj;uj}(jjjjjhide or show the mouse cursorj]set_visible(bool) -> boolaj]jjjnj;uj}(jjjjj4get the current visibility state of the mouse cursorj]get_visible() -> boolaj]jjjnj;uj}(jjjjj-check if the display is receiving mouse inputj]get_focused() -> boolaj]jjjnj;uj}(jjjjj$set the mouse cursor to a new cursorj]()set_cursor(pygame.cursors.Cursor) -> None5set_cursor(size, hotspot, xormasks, andmasks) -> None$set_cursor(hotspot, surface) -> Noneset_cursor(constant) -> Noneej]jjjnj;uj}(jjjjjget the current mouse cursorj]%get_cursor() -> pygame.cursors.Cursoraj]jjjnj;u pygame.mouse}(jjjj]j$pygame module to work with the mousej]j](jjjjjjjjjejjjnj;uj}(jjjj jLoad a music file for playbackj](load(filename) -> None"load(fileobj, namehint="") -> Noneej]jjjnjKuj}(jjjjj6Unload the currently loaded music to free up resourcesj]unload() -> Noneaj]jjjnjKuj}(jjjjj&Start the playback of the music streamj]+play(loops=0, start=0.0, fade_ms=0) -> Noneaj]jjjnjKuj}(jjjjj restart musicj]rewind() -> Noneaj]jjjnjKuj}(jjjjjstop the music playbackj]stop() -> Noneaj]jjjnjKuj}(jjjj jtemporarily stop music playbackj]pause() -> Noneaj]jjjnjKuj}(jjjj$jresume paused musicj]unpause() -> Noneaj]jjjnjKuj}(jjjj(j$stop music playback after fading outj]fadeout(time) -> Noneaj]jjjnjKuj}(jjjj,jset the music volumej]set_volume(volume) -> Noneaj]jjjnjKuj}(jjjj0jget the music volumej]get_volume() -> valueaj]jjjnjKuj }(jj jj4j$check if the music stream is playingj]get_busy() -> boolaj]jj jnjKuj}(jjjj8jset position to play fromj]set_pos(pos) -> Noneaj]jjjnjKuj}(jjjj<jget the music play timej]get_pos() -> timeaj]jjjnjKuj}(jjjj@j(queue a sound file to follow the currentj](queue(filename) -> None,queue(fileobj, namehint="", loops=0) -> Noneej]jjjnjKuj}(jjjjDj0have the music send an event when playback stopsj](set_endevent() -> Noneset_endevent(type) -> Noneej]jjjnjKuj}(jjjjHj1get the event a channel sends when playback stopsj]get_endevent() -> typeaj]jjjnjKupygame.mixer.music}(jjjj]j,pygame module for controlling streamed audioj]j](jjjjjjjjjjj jjjjjejjjnjKuj!}(jj!jjPjset the overlay pixel dataj](display((y, u, v)) -> Nonedisplay() -> Noneej]jj!jnjMuj$}(jj$jjTj&control where the overlay is displayedj]set_location(rect) -> Noneaj]jj$jnjMuj'}(jj'jjXj+test if the Overlay is hardware acceleratedj]get_hardware(rect) -> intaj]jj'jnjMuj}(jjjjLj(pygame object for video overlay graphicsj]+Overlay(format, (width, height)) -> Overlayaj](j!j$j'ejjjnjMupygame-overlayj"j.}(jj.jj`j%Gets the Surface the PixelArray uses.j]surface -> Surfaceaj]jj.jnjguj1}(jj1jjdj+Returns the byte size of a pixel array itemj]itemsize -> intaj]jj1jnjguj4}(jj4jjhj!Returns the number of dimensions.j] ndim -> intaj]jj4jnjguj7}(jj7jjljReturns the array size.j]shape -> tuple of int'saj]jj7jnjguj:}(jj:jjpj.Returns byte offsets for each array dimension.j]strides -> tuple of int'saj]jj:jnjguj=}(jj=jjtj2Creates a new Surface from the current PixelArray.j]make_surface() -> Surfaceaj]jj=jnjguj@}(jj@jjxj=Replaces the passed color in the PixelArray with another one.j]Kreplace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> Noneaj]jj@jnjgujC}(jjCjj|j.Extracts the passed color from the PixelArray.j]Gextract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArrayaj]jjCjnjgujF}(jjFjjj)Compares the PixelArray with another one.j]Gcompare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArrayaj]jjFjnjgujI}(jjIjjjExchanges the x and y axis.j]transpose() -> PixelArrayaj]jjIjnjgujL}(jjLjjj1Closes the PixelArray, and releases Surface lock.j]close() -> PixelArrayaj]jjLjnjguj+}(jj+jj\j1pygame object for direct pixel access of surfacesj]!PixelArray(Surface) -> PixelArrayaj](j.j1j4j7j:j=j@jCjFjIjLejj+jnjgupygame-pixelarrayj"jS}(jjSjjj© surface pixels to an array objectj]Gsurface_to_array(array, surface, kind='P', opaque=255, clear=0) -> Noneaj]jjSjnjNujV}(jjVjjj!copy an array object to a surfacej],array_to_surface(, ) -> Noneaj]jjVjnjNujY}(jjYjjj4copy an array to another array, using surface formatj].map_array(, , ) -> Noneaj]jjYjnjNuj\}(jj\jjjCopy an array to a new surfacej]/pygame.pixelcopy.make_surface(array) -> Surfaceaj]jj\jnjNupygame.pixelcopy}(jjjj]j-pygame module for general pixel array copyingj]j](jSjVjYj\ejjPjnjNujc}(jjcjjj&initialize all imported pygame modulesj]init() -> (numpass, numfail)aj]jjcjnjujf}(jjfjjjuninitialize all pygame modulesj]quit() -> Noneaj]jjfjnjuji}(jjijjj/returns True if pygame is currently initializedj]get_init() -> boolaj]jjijnjujl}(jjljjjstandard pygame exceptionj]raise pygame.error(message)aj]jjljnjujo}(jjojjjget the current error messagej]get_error() -> errorstraj]jjojnjujr}(jjrjjjset the current error messagej]set_error(error_msg) -> Noneaj]jjrjnjuju}(jjujjjget the version number of SDLj]3get_sdl_version(linked=True) -> major, minor, patchaj]jjujnjujx}(jjxjjjget the byte order of SDLj]get_sdl_byteorder() -> intaj]jjxjnjuj{}(jj{jjj2register a function to be called when pygame quitsj]register_quit(callable) -> Noneaj]jj{jnjuj~}(jj~jjj Encode a Unicode or bytes objectj]Gencode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or Noneaj]jj~jnjuj}(jjjjj6Encode a Unicode or bytes object as a file system pathj]2encode_file_path([obj [, etype]]) -> bytes or Noneaj]jjjnjupygame}(jjjj]jthe top level pygame packagej]j](jcjfjijljojrjujxj{j~jejj`jnjuj}(jjjjjversion number as a stringj] ver = '1.2'aj]jjjnjuj}(jjjjjtupled integers of the versionj]vernum = (1, 5, 3)aj]jjjnjuj}(jjjjj repository revision of the buildj]rev = 'a6f89747b551+'aj]jjjnjuj}(jjjjj*tupled integers of the SDL library versionj]SDL = '(2, 0, 12)'aj]jjjnjupygame.version}(jjjj]j+small module containing version informationj]j](jjjjejjjnjuj}(jjjjjcopy the rectanglej]copy() -> Rectaj]jjjnjQuj}(jjjjjmoves the rectanglej]move(x, y) -> Rectaj]jjjnjQuj}(jjjjjmoves the rectangle, in placej]move_ip(x, y) -> Noneaj]jjjnjQuj}(jjjjj!grow or shrink the rectangle sizej]inflate(x, y) -> Rectaj]jjjnjQuj}(jjjjj+grow or shrink the rectangle size, in placej]inflate_ip(x, y) -> Noneaj]jjjnjQuj}(jjjjj)scale the rectangle by given a multiplierj](scale_by(scalar) -> Rect scale_by(scalex, scaley) -> Rectej]jjjnjQuj}(jjjjj+grow or shrink the rectangle size, in placej](scale_by_ip(scalar) -> None#scale_by_ip(scalex, scaley) -> Noneej]jjjnjQuj}(jjjjj+sets the position and size of the rectanglej]((update(left, top, width, height) -> None,update((left, top), (width, height)) -> Noneupdate(object) -> Noneej]jjjnjQuj}(jjjjj"moves the rectangle inside anotherj]clamp(Rect) -> Rectaj]jjjnjQuj}(jjjjj,moves the rectangle inside another, in placej]clamp_ip(Rect) -> Noneaj]jjjnjQuj}(jjjj j crops a rectangle inside anotherj]clip(Rect) -> Rectaj]jjjnjQuj}(jjjjjcrops a line inside a rectanglej](4clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))clipline(x1, y1, x2, y2) -> ()8clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))"clipline((x1, y1), (x2, y2)) -> ()6clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2)) clipline((x1, y1, x2, y2)) -> ():clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))$clipline(((x1, y1), (x2, y2))) -> ()ej]jjjnjQuj}(jjjjjjoins two rectangles into onej]union(Rect) -> Rectaj]jjjnjQuj}(jjjjj'joins two rectangles into one, in placej]union_ip(Rect) -> Noneaj]jjjnjQuj}(jjjjjthe union of many rectanglesj]unionall(Rect_sequence) -> Rectaj]jjjnjQuj}(jjjjj&the union of many rectangles, in placej]"unionall_ip(Rect_sequence) -> Noneaj]jjjnjQuj}(jjjj#j-resize and move a rectangle with aspect ratioj]fit(Rect) -> Rectaj]jjjnjQuj}(jjjj'jcorrect negative sizesj]normalize() -> Noneaj]jjjnjQuj}(jjjj+j'test if one rectangle is inside anotherj]contains(Rect) -> boolaj]jjjnjQuj}(jjjj/j%test if a point is inside a rectanglej](collidepoint(x, y) -> boolcollidepoint((x,y)) -> boolej]jjjnjQuj}(jjjj3jtest if two rectangles overlapj]colliderect(Rect) -> boolaj]jjjnjQuj}(jjjj7j*test if one rectangle in a list intersectsj]collidelist(list) -> indexaj]jjjnjQuj}(jjjj;j*test if all rectangles in a list intersectj]collidelistall(list) -> indicesaj]jjjnjQuj}(jjjj?j'test if any object in a list intersectsj](#collideobjects(rect_list) -> object,collideobjects(obj_list, key=func) -> objectej]jjjnjQuj}(jjjjCj'test if all objects in a list intersectj]('collideobjectsall(rect_list) -> objects0collideobjectsall(obj_list, key=func) -> objectsej]jjjnjQuj}(jjjjGj0test if one rectangle in a dictionary intersectsj](!collidedict(dict) -> (key, value)collidedict(dict) -> None/collidedict(dict, use_values=0) -> (key, value)'collidedict(dict, use_values=0) -> Noneej]jjjnjQuj}(jjjjKj0test if all rectangles in a dictionary intersectj](+collidedictall(dict) -> [(key, value), ...]9collidedictall(dict, use_values=0) -> [(key, value), ...]ej]jjjnjQuj}(jjjjj1pygame object for storing rectangular coordinatesj](&Rect(left, top, width, height) -> Rect*Rect((left, top), (width, height)) -> RectRect(object) -> Rectej](jjjjjjjjjjjjjjjjjjjjjjjjjjjejjjnjQu pygame-rectj#j}(jjjjQjInitializes the scrap module.j]init() -> Noneaj]jjjnj+uj}(jjjjUj:Returns True if the scrap module is currently initialized.j]get_init() -> boolaj]jjjnj+uj}(jjjjYj8Gets the data for the specified type from the clipboard.j]get(type) -> bytes | Noneaj]jjjnj+uj}(jjjj]j-Gets a list of the available clipboard types.j]get_types() -> listaj]jjjnj+uj}(jjjjajPlaces data into the clipboard.j]put(type, data) -> Noneaj]jjjnj+uj}(jjjjejCChecks whether data for a given type is available in the clipboard.j]contains(type) -> boolaj]jjjnj+uj}(jjjjijMIndicates if the clipboard ownership has been lost by the pygame application.j]lost() -> boolaj]jjjnj+uj}(jjjjmjSets the clipboard access mode.j]set_mode(mode) -> Noneaj]jjjnj+u pygame.scrap}(jjjj]j$pygame module for clipboard support.j]j](jjjjjjjjejjjnj+uj}(jjjjsj initialize the controller modulej]init() -> Noneaj]jjjnjjuj }(jj jjwj#Uninitialize the controller module.j]quit() -> Noneaj]jj jnjjuj}(jjjj{j5Returns True if the controller module is initialized.j]get_init() -> boolaj]jjjnjjuj}(jjjjj7Sets the current state of events related to controllersj]set_eventstate(state) -> Noneaj]jjjnjjuj}(jjjjj7Gets the current state of events related to controllersj]get_eventstate() -> boolaj]jjjnjjuj}(jjjjj%Get the number of joysticks connectedj]get_count() -> intaj]jjjnjjuj}(jjjjjICheck if the given joystick is supported by the game controller interfacej]is_controller(index) -> boolaj]jjjnjjuj}(jjjjjGet the name of the controllerj]$name_forindex(index) -> name or Noneaj]jjjnjjuj#}(jj#jjjuninitialize the Controllerj]quit() -> Noneaj]jj#jnjjuj&}(jj&jjj&check if the Controller is initializedj]get_init() -> boolaj]jj&jnjjuj)}(jj)jjj:Create a Controller from a pygame.joystick.Joystick objectj]%from_joystick(joystick) -> Controlleraj]jj)jnjjuj,}(jj,jjjCCheck if the Controller has been opened and is currently connected.j]attached() -> boolaj]jj,jnjjuj/}(jj/jjj+Returns a pygame.joystick.Joystick() objectj] as_joystick() -> Joystick objectaj]jj/jnjjuj2}(jj2jjj(Get the current state of a joystick axisj]get_axis(axis) -> intaj]jj2jnjjuj5}(jj5jjj!Get the current state of a buttonj]get_button(button) -> boolaj]jj5jnjjuj8}(jj8jjj*Get the mapping assigned to the controllerj]get_mapping() -> mappingaj]jj8jnjjuj;}(jj;jjj"Assign a mapping to the controllerj]set_mapping(mapping) -> intaj]jj;jnjjuj>}(jj>jjjStart a rumbling effectj]7rumble(low_frequency, high_frequency, duration) -> boolaj]jj>jnjjujA}(jjAjjjStop any rumble effect playingj]stop_rumble() -> Noneaj]jjAjnjjuj }(jj jjjCreate a new Controller object.j]Controller(index) -> Controlleraj](j#j&j)j,j/j2j5j8j;j>jAejj jnjjupygame._sdl2.controller}(jjjj]j'Pygame module to work with controllers.j]j](jj jjjjjjj ejjjnjjujK}(jjKjjjACreates window using window created by pygame.display.set_mode().j]from_display_module() -> Windowaj]jjKjnj9ujN}(jjNjjjDCreate Window from another window. Could be from another UI toolkit.j]from_window(other) -> Windowaj]jjNjnj9ujQ}(jjQjjj9Gets or sets whether the mouse is confined to the window.j] grab -> boolaj]jjQjnj9ujT}(jjTjjj6Gets or sets the window's relative mouse motion state.j]relative_mouse -> boolaj]jjTjnj9ujW}(jjWjjj'Enable windowed mode (exit fullscreen).j]set_windowed() -> Noneaj]jjWjnj9ujZ}(jjZjjjEnter fullscreen.j]%set_fullscreen(desktop=False) -> Noneaj]jjZjnj9uj]}(jj]jjj&Gets or sets whether the window title.j]title -> stringaj]jj]jnj9uj`}(jj`jjjDestroys the window.j]destroy() -> Noneaj]jj`jnj9ujc}(jjcjjjHide the window.j]hide() -> Noneaj]jjcjnj9ujf}(jjfjjjShow the window.j]show() -> Noneaj]jjfjnj9uji}(jjijjjqRaise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.j]focus(input_only=False) -> Noneaj]jjijnj9ujl}(jjljjjARestore the size and position of a minimized or maximized window.j]restore() -> Noneaj]jjljnj9ujo}(jjojjjMaximize the window.j]maximize() -> Noneaj]jjojnj9ujr}(jjrjjjMinimize the window.j]maximize() -> Noneaj]jjrjnj9uju}(jjujjj.Gets and sets whether the window is resizable.j]resizable -> boolaj]jjujnj9ujx}(jjxjjj)Add or remove the border from the window.j]borderless -> boolaj]jjxjnj9uj{}(jj{jj jSet the icon for the window.j]set_icon(surface) -> Noneaj]jj{jnj9uj~}(jj~jjj%Get the unique window ID. *Read-only*j] id -> intaj]jj~jnj9uj}(jjjjjGets and sets the window size.j]size -> (int, int)aj]jjjnj9uj}(jjjjj"Gets and sets the window position.j]Cposition -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINEDaj]jjjnj9uj}(jjjjjYGets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).j]opacity -> floataj]jjjnj9uj}(jjjjj>Get the index of the display that owns the window. *Read-only*j]display_index -> intaj]jjjnj9uj}(jjjj"jVSet the window as a modal for a parent window. This function is only supported on X11.j]set_modal_for(Window) -> Noneaj]jjjnj9ujH}(jjHjjj&pygame object that represents a windowj]vWindow(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Windowaj](jKjNjQjTjWjZj]j`jcjfjijljojrjujxj{j~jjjjjejjHjnj9uj}(jjjj*j*Create a texture from an existing surface.j]*from_surface(renderer, surface) -> Textureaj]jjjnj9uj}(jjjj.j:Gets the renderer associated with the Texture. *Read-only*j]renderer -> Rendereraj]jjjnj9uj}(jjjj2j*Gets the width of the Texture. *Read-only*j] width -> intaj]jjjnj9uj}(jjjj6j+Gets the height of the Texture. *Read-only*j] height -> intaj]jjjnj9uj}(jjjj:jOGets and sets an additional alpha value multiplied into render copy operations.j] alpha -> intaj]jjjnj9uj}(jjjj>j-Gets and sets the blend mode for the Texture.j]blend_mode -> intaj]jjjnj9uj}(jjjjBjOGets and sets an additional color value multiplied into render copy operations.j]color -> coloraj]jjjnj9uj}(jjjjFj(Get the rectangular area of the texture.j]get_rect(**kwargs) -> Rectaj]jjjnj9uj}(jjjjJj6Copy a portion of the texture to the rendering target.j]Zdraw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> Noneaj]jjjnj9uj}(jjjjNjJUpdate the texture with a Surface. WARNING: Slow operation, use sparingly.j]"update(surface, area=None) -> Noneaj]jjjnj9uj}(jjjj&j*pygame object that representing a Texture.j]XTexture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Textureaj](jjjjjjjjjjejjjnj9uj}(jjjjVj&Get the rectangular area of the Image.j]get_rect() -> Rectaj]jjjnj9uj}(jjjjZj4Copy a portion of the Image to the rendering target.j](draw(srcrect=None, dstrect=None) -> Noneaj]jjjnj9uj}(jjjj^j4Gets and sets the angle the Image draws itself with.j]angle -> floataj]jjjnj9uj}(jjjjbjXGets and sets the origin. Origin=None means the Image will be rotated around its center.j]!origin -> (float, float) or None.aj]jjjnj9uj}(jjjjfj9Gets and sets whether the Image is flipped on the x axis.j]flip_x -> boolaj]jjjnj9uj}(jjjjjj9Gets and sets whether the Image is flipped on the y axis.j]flip_y -> boolaj]jjjnj9uj}(jjjjnj'Gets and sets the Image color modifier.j]color -> Coloraj]jjjnj9uj}(jjjjrj'Gets and sets the Image alpha modifier.j]alpha -> floataj]jjjnj9uj}(jjjjvj+Gets and sets the blend mode for the Image.j]blend_mode -> intaj]jjjnj9uj}(jjjjzj0Gets and sets the Texture the Image is based on.j]texture -> Textureaj]jjjnj9uj}(jjjj~j-Gets and sets the Rect the Image is based on.j]srcrect -> Rectaj]jjjnj9uj}(jjjjRjSEasy way to use a portion of a Texture without worrying about srcrect all the time.j],Image(textureOrImage, srcrect=None) -> Imageaj](jjjjjjjjjjjejjjnj9uj}(jjjjjEasy way to create a Renderer.j]from_window(window) -> Rendereraj]jjjnj9uj}(jjjjj;Gets and sets the blend mode used by the drawing functions.j]draw_blend_mode -> intaj]jjjnj9uj}(jjjjj6Gets and sets the color used by the drawing functions.j]draw_color -> Coloraj]jjjnj9uj}(jjjjj:Clear the current rendering target with the drawing color.j]clear() -> Noneaj]jjjnj9uj}(jjjjj>Updates the screen with any new rendering since previous call.j]present() -> Noneaj]jjjnj9uj}(jjjjj'Returns the drawing area on the target.j]get_viewport() -> Rectaj]jjjnj9uj}(jjjjjTSet the drawing area on the target. If area is None, the entire target will be used.j]set_viewport(area) -> Noneaj]jjjnj9uj}(jjjjjGets and sets the logical size.j]'logical_size -> (int width, int height)aj]jjjnj9uj}(jjjjjGets and sets the scale.j]'scale -> (float x_scale, float y_scale)aj]jjjnj9uj}(jjjjjSGets and sets the render target. None represents the default target (the renderer).j]target -> Texture or Noneaj]jjjnj9uj}(jjjjjUFor compatibility purposes. Textures created by different Renderers cannot be shared!j]5blit(source, dest, area=None, special_flags=0)-> Rectaj]jjjnj9uj}(jjjjj Draws a line.j]draw_line(p1, p2) -> Noneaj]jjjnj9uj}(jjjjjDraws a point.j]draw_point(point) -> Noneaj]jjjnj9uj}(jjjjjDraws a rectangle.j]draw_rect(rect)-> Noneaj]jjjnj9uj}(jjjjjFills a rectangle.j]fill_rect(rect)-> Noneaj]jjjnj9uj}(jjjjjkRead pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.j]-to_surface(surface=None, area=None)-> Surfaceaj]jjjnj9uj}(jjjjj+Create a 2D rendering context for a window.j]YRenderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Rendereraj](jjjjjjjjjjjjjjjjejjjnj9upygame._sdl2.video}(jjjj]j arrayaj]jj jnj/uj}(jjjjj%reference Sound samples into an arrayj]samples(Sound) -> arrayaj]jjjnj/uj}(jjjjj$convert an array into a Sound objectj]make_sound(array) -> Soundaj]jjjnj/uj}(jjjjj1Sets the array system to be used for sound arraysj]!use_arraytype (arraytype) -> Noneaj]jjjnj/uj}(jjjjj%Gets the currently active array type.j]get_arraytype () -> straj]jjjnj/uj}(jjjjj0Gets the array system types currently supported.j]get_arraytypes () -> tupleaj]jjjnj/upygame.sndarray}(jjjj]j-pygame module for accessing sound sample dataj]j](j jjjjjejj jnj/uj%}(jj%jjj!method to control sprite behaviorj]update(*args, **kwargs) -> Noneaj]jj%jnjuj(}(jj(jjjadd the sprite to groupsj]add(*groups) -> Noneaj]jj(jnjuj+}(jj+jjjremove the sprite from groupsj]remove(*groups) -> Noneaj]jj+jnjuj.}(jj.jjj!remove the Sprite from all Groupsj]kill() -> Noneaj]jj.jnjuj1}(jj1jjj$does the sprite belong to any groupsj]alive() -> boolaj]jj1jnjuj4}(jj4jjj'list of Groups that contain this Spritej]groups() -> group_listaj]jj4jnjuj"}(jj"jjj+Simple base class for visible game objects.j]Sprite(*groups) -> Spriteaj](j%j(j+j.j1j4ejj"jnjuj7}(jj7jjjA subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.j]!WeakSprite(*groups) -> WeakSpriteaj]jj7jnjuj:}(jj:jjj7A subclass of Sprite with more attributes and features.j]#DirtySprite(*groups) -> DirtySpriteaj]jj:jnjuj@}(jj@jj j'list of the Sprites this Group containsj]sprites() -> sprite_listaj]jj@jnjujC}(jjCjjjduplicate the Groupj]copy() -> Groupaj]jjCjnjujF}(jjFjjjadd Sprites to this Groupj]add(*sprites) -> Noneaj]jjFjnjujI}(jjIjjjremove Sprites from the Groupj]remove(*sprites) -> Noneaj]jjIjnjujL}(jjLjjj test if a Group contains Spritesj]has(*sprites) -> boolaj]jjLjnjujO}(jjOjjj+call the update method on contained Spritesj]update(*args, **kwargs) -> Noneaj]jjOjnjujR}(jjRjj"jblit the Sprite imagesj]9draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]aj]jjRjnjujU}(jjUjj&j"draw a background over the Spritesj]'clear(Surface_dest, background) -> Noneaj]jjUjnjujX}(jjXjj*jremove all Spritesj]empty() -> Noneaj]jjXjnjuj=}(jj=jjj=A container class to hold and manage multiple Sprite objects.j]Group(*sprites) -> Groupaj](j@jCjFjIjLjOjRjUjXejj=jnjuj[}(jj[jj.jTA subclass of WeakSprite and DirtySprite that combines the benefits of both classes.j]+WeakDirtySprite(*groups) -> WeakDirtySpriteaj]jj[jnjuj^}(jj^jj2jSame as pygame.sprite.Groupj]j]jj^jnjuja}(jjajj6jSame as pygame.sprite.Groupj]j]jjajnjujg}(jjgjj>j.blit the Sprite images and track changed areasj]8draw(surface, bgsurf=None, special_flags=0) -> Rect_listaj]jjgjnjujd}(jjdjj:j*Group sub-class that tracks dirty updates.j](RenderUpdates(*sprites) -> RenderUpdatesaj]jgajjdjnjujj}(jjjjjBj@RenderUpdates sub-class that draws Sprites in order of addition.j]*OrderedUpdates(*sprites) -> OrderedUpdatesaj]jjjjnjujp}(jjpjjJj.add a sprite or sequence of sprites to a groupj]add(*sprites, **kwargs) -> Noneaj]jjpjnjujs}(jjsjjNj9returns a ordered list of sprites (first back, last top).j]sprites() -> spritesaj]jjsjnjujv}(jjvjjRj Rect_listaj]jjvjnjujy}(jjyjjVj1returns a list with all sprites at that position.j](get_sprites_at(pos) -> colliding_spritesaj]jjyjnjuj|}(jj|jjZj;returns the sprite at the index idx from the groups spritesj]get_sprite(idx) -> spriteaj]jj|jnjuj}(jjjj^j spritesaj]jjjnjuj}(jjjjbjAreturns a list of layers defined (unique), sorted from bottom up.j]layers() -> layersaj]jjjnjuj}(jjjjfjchanges the layer of the spritej]'change_layer(sprite, new_layer) -> Noneaj]jjjnjuj}(jjjjjj.returns the layer that sprite is currently in.j]$get_layer_of_sprite(sprite) -> layeraj]jjjnjuj}(jjjjnjreturns the top layerj]get_top_layer() -> layeraj]jjjnjuj}(jjjjrjreturns the bottom layerj]get_bottom_layer() -> layeraj]jjjnjuj}(jjjjvj brings the sprite to front layerj]move_to_front(sprite) -> Noneaj]jjjnjuj}(jjjjzj$moves the sprite to the bottom layerj]move_to_back(sprite) -> Noneaj]jjjnjuj}(jjjj~jreturns the topmost spritej]get_top_sprite() -> Spriteaj]jjjnjuj}(jjjjjAreturns all sprites from a layer, ordered by how they where addedj](get_sprites_from_layer(layer) -> spritesaj]jjjnjuj}(jjjjj*switches the sprites from layer1 to layer2j]*switch_layer(layer1_nr, layer2_nr) -> Noneaj]jjjnjujm}(jjmjjFjSLayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.j]4LayeredUpdates(*sprites, **kwargs) -> LayeredUpdatesaj](jpjsjvjyj|jjjjjjjjjjjejjmjnjuj}(jjjjj Rect_listaj]jjjnjuj}(jjjjjused to set backgroundj]clear(surface, bgd) -> Noneaj]jjjnjuj}(jjjjjrepaints the given areaj]!repaint_rect(screen_rect) -> Noneaj]jjjnjuj}(jjjjjGclip the area where to draw. Just pass None (default) to reset the clipj]"set_clip(screen_rect=None) -> Noneaj]jjjnjuj}(jjjjjGclip the area where to draw. Just pass None (default) to reset the clipj]get_clip() -> Rectaj]jjjnjuj}(jjjjjchanges the layer of the spritej]'change_layer(sprite, new_layer) -> Noneaj]jjjnjuj}(jjjjj"sets the threshold in millisecondsj]$set_timing_treshold(time_ms) -> Noneaj]jjjnjuj}(jjjjj"sets the threshold in millisecondsj]%set_timing_threshold(time_ms) -> Noneaj]jjjnjuj}(jjjjjJLayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.j]0LayeredDirty(*sprites, **kwargs) -> LayeredDirtyaj](jjjjjjjjejjjnjuj}(jjjjj+Group container that holds a single sprite.j]'GroupSingle(sprite=None) -> GroupSingleaj]jjjnjuj}(jjjjj6Find sprites in a group that intersect another sprite.j]Dspritecollide(sprite, group, dokill, collided = None) -> Sprite_listaj]jjjnjuj}(jjjjj5Collision detection between two sprites, using rects.j]!collide_rect(left, right) -> boolaj]jjjnjuj}(jjjjjGCollision detection between two sprites, using rects scaled to a ratio.j].collide_rect_ratio(ratio) -> collided_callableaj]jjjnjuj}(jjjjj7Collision detection between two sprites, using circles.j]#collide_circle(left, right) -> boolaj]jjjnjuj}(jjjjjICollision detection between two sprites, using circles scaled to a ratio.j]0collide_circle_ratio(ratio) -> collided_callableaj]jjjnjuj}(jjjjj5Collision detection between two sprites, using masks.j](,collide_mask(sprite1, sprite2) -> (int, int)&collide_mask(sprite1, sprite2) -> Noneej]jjjnjuj}(jjjjj1Find all sprites that collide between two groups.j]Ngroupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dictaj]jjjnjuj}(jjjjj7Simple test if a sprite intersects anything in a group.j](:spritecollideany(sprite, group, collided = None) -> Sprite8spritecollideany(sprite, group, collided = None) -> Noneej]jjjnju pygame.sprite}(jjjj]j,pygame module with basic game object classesj]j](j"j7j:j=j[j^jajdjjjmjjjjjjjjjjejjjnjuj}(jjjjjdraw one image onto anotherj]6blit(source, dest, area=None, special_flags=0) -> Rectaj]jjjnjPuj}(jjjjjdraw many images onto anotherj](Mblits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None1blits(((source, dest, area), ...)) -> [Rect, ...]@blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]ej]jjjnjPuj}(jjjjj#change the pixel format of an imagej]( convert(Surface=None) -> Surface"convert(depth, flags=0) -> Surface"convert(masks, flags=0) -> Surfaceej]jjjnjPuj}(jjjjj>change the pixel format of an image including per pixel alphasj](!convert_alpha(Surface) -> Surfaceconvert_alpha() -> Surfaceej]jjjnjPuj}(jjjjjcreate a new copy of a Surfacej]copy() -> Surfaceaj]jjjnjPuj}(jjjjjfill Surface with a solid colorj]/fill(color, rect=None, special_flags=0) -> Rectaj]jjjnjPuj}(jjjjj Shift the surface image in placej]scroll(dx=0, dy=0) -> Noneaj]jjjnjPuj}(jjjjjSet the transparent colorkeyj]($set_colorkey(Color, flags=0) -> Noneset_colorkey(None) -> Noneej]jjjnjPuj}(jjjjj$Get the current transparent colorkeyj]get_colorkey() -> RGB or Noneaj]jjjnjPuj}(jjjjj.set the alpha value for the full Surface imagej](!set_alpha(value, flags=0) -> Noneset_alpha(None) -> Noneej]jjjnjPuj}(jjjjj*get the current Surface transparency valuej]get_alpha() -> int_valueaj]jjjnjPuj}(jjjjj(lock the Surface memory for pixel accessj]lock() -> Noneaj]jjjnjPuj}(jjjjj+unlock the Surface memory from pixel accessj]unlock() -> Noneaj]jjjnjPuj}(jjjj j$test if the Surface requires lockingj]mustlock() -> boolaj]jjjnjPuj}(jjjjj%test if the Surface is current lockedj]get_locked() -> boolaj]jjjnjPuj}(jjjjjGets the locks for the Surfacej]get_locks() -> tupleaj]jjjnjPuj }(jj jjj%get the color value at a single pixelj]get_at((x, y)) -> Coloraj]jj jnjPuj }(jj jjj&set the color value for a single pixelj]set_at((x, y), Color) -> Noneaj]jj jnjPuj}(jjjjj,get the mapped color value at a single pixelj]get_at_mapped((x, y)) -> Coloraj]jjjnjPuj}(jjjj"j0get the color index palette for an 8-bit Surfacej]%get_palette() -> [RGB, RGB, RGB, ...]aj]jjjnjPuj}(jjjj&j-get the color for a single entry in a palettej]get_palette_at(index) -> RGBaj]jjjnjPuj}(jjjj*j*set the color palette for an 8-bit Surfacej])set_palette([RGB, RGB, RGB, ...]) -> Noneaj]jjjnjPuj}(jjjj.j Noneaj]jjjnjPuj}(jjjj2j)convert a color into a mapped color valuej]map_rgb(Color) -> mapped_intaj]jjjnjPuj"}(jj"jj6j1convert a mapped integer color value into a Colorj]unmap_rgb(mapped_int) -> Coloraj]jj"jnjPuj%}(jj%jj:j,set the current clipping area of the Surfacej](set_clip(rect) -> Noneset_clip(None) -> Noneej]jj%jnjPuj(}(jj(jj>j,get the current clipping area of the Surfacej]get_clip() -> Rectaj]jj(jnjPuj+}(jj+jjBj/create a new surface that references its parentj]subsurface(Rect) -> Surfaceaj]jj+jnjPuj.}(jj.jjFjfind the parent of a subsurfacej]get_parent() -> Surfaceaj]jj.jnjPuj1}(jj1jjJj)find the top level parent of a subsurfacej]get_abs_parent() -> Surfaceaj]jj1jnjPuj4}(jj4jjNj7find the position of a child subsurface inside a parentj]get_offset() -> (x, y)aj]jj4jnjPuj7}(jj7jjRjLfind the absolute position of a child subsurface inside its top level parentj]get_abs_offset() -> (x, y)aj]jj7jnjPuj:}(jj:jjVj!get the dimensions of the Surfacej]get_size() -> (width, height)aj]jj:jnjPuj=}(jj=jjZjget the width of the Surfacej]get_width() -> widthaj]jj=jnjPuj@}(jj@jj^jget the height of the Surfacej]get_height() -> heightaj]jj@jnjPujC}(jjCjjbj'get the rectangular area of the Surfacej]get_rect(**kwargs) -> Rectaj]jjCjnjPujF}(jjFjjfj-get the bit depth of the Surface pixel formatj]get_bitsize() -> intaj]jjFjnjPujI}(jjIjjjj$get the bytes used per Surface pixelj]get_bytesize() -> intaj]jjIjnjPujL}(jjLjjnj-get the additional flags used for the Surfacej]get_flags() -> intaj]jjLjnjPujO}(jjOjjrj,get the number of bytes used per Surface rowj]get_pitch() -> intaj]jjOjnjPujR}(jjRjjvjCthe bitmasks needed to convert between a color and a mapped integerj]get_masks() -> (R, G, B, A)aj]jjRjnjPujU}(jjUjjzjGset the bitmasks needed to convert between a color and a mapped integerj]set_masks((r,g,b,a)) -> Noneaj]jjUjnjPujX}(jjXjj~jEthe bit shifts needed to convert between a color and a mapped integerj]get_shifts() -> (R, G, B, A)aj]jjXjnjPuj[}(jj[jjjJsets the bit shifts needed to convert between a color and a mapped integerj]set_shifts((r,g,b,a)) -> Noneaj]jj[jnjPuj^}(jj^jjjIthe significant bits used to convert between a color and a mapped integerj]get_losses() -> (R, G, B, A)aj]jj^jnjPuja}(jjajjj&find the smallest rect containing dataj](get_bounding_rect(min_alpha = 1) -> Rectaj]jjajnjPujd}(jjdjjj-return a buffer view of the Surface's pixels.j]#get_view(='2') -> BufferProxyaj]jjdjnjPujg}(jjgjjj7acquires a buffer object for the pixels of the Surface.j]get_buffer() -> BufferProxyaj]jjgjnjPujj}(jjjjjjpixel buffer addressj]_pixels_address -> intaj]jjjjnjPujm}(jjmjjjXreturns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.j]premul_alpha() -> Surfaceaj]jjmjnjPuj}(jjjjj%pygame object for representing imagesj](ASurface((width, height), flags=0, depth=0, masks=None) -> Surface5Surface((width, height), flags=0, Surface) -> Surfaceej](jjjjjjjjjjjjjjjjj j jjjjjjj"j%j(j+j.j1j4j7j:j=j@jCjFjIjLjOjRjUjXj[j^jajdjgjjjmejjjnjPupygame-surfacej(jt}(jjtjjjCopy pixels into a 2d arrayj]array2d(Surface) -> arrayaj]jjtjnj[ujw}(jjwjjj Reference pixels into a 2d arrayj]pixels2d(Surface) -> arrayaj]jjwjnj[ujz}(jjzjjjCopy pixels into a 3d arrayj]array3d(Surface) -> arrayaj]jjzjnj[uj}}(jj}jjj Reference pixels into a 3d arrayj]pixels3d(Surface) -> arrayaj]jj}jnj[uj}(jjjjj!Copy pixel alphas into a 2d arrayj]array_alpha(Surface) -> arrayaj]jjjnj[uj}(jjjjj&Reference pixel alphas into a 2d arrayj]pixels_alpha(Surface) -> arrayaj]jjjnj[uj}(jjjjjCopy red pixels into a 2d arrayj]array_red(Surface) -> arrayaj]jjjnj[uj}(jjjjj$Reference pixel red into a 2d array.j]pixels_red (Surface) -> arrayaj]jjjnj[uj}(jjjjj!Copy green pixels into a 2d arrayj]array_green(Surface) -> arrayaj]jjjnj[uj}(jjjjj&Reference pixel green into a 2d array.j]pixels_green (Surface) -> arrayaj]jjjnj[uj}(jjjjj Copy blue pixels into a 2d arrayj]array_blue(Surface) -> arrayaj]jjjnj[uj}(jjjjj%Reference pixel blue into a 2d array.j]pixels_blue (Surface) -> arrayaj]jjjnj[uj}(jjjjj(Copy the colorkey values into a 2d arrayj] array_colorkey(Surface) -> arrayaj]jjjnj[uj}(jjjjjCopy an array to a new surfacej]make_surface(array) -> Surfaceaj]jjjnj[uj}(jjjjj!Blit directly from a array valuesj]"blit_array(Surface, array) -> Noneaj]jjjnj[uj}(jjjjjMap a 3d array into a 2d arrayj]&map_array(Surface, array3d) -> array2daj]jjjnj[uj}(jjjjj3Sets the array system to be used for surface arraysj]!use_arraytype (arraytype) -> Noneaj]jjjnj[uj}(jjjjj%Gets the currently active array type.j]get_arraytype () -> straj]jjjnj[uj}(jjjjj0Gets the array system types currently supported.j]get_arraytypes () -> tupleaj]jjjnj[upygame.surfarray}(jjjj]jEpygame module for accessing surface pixel data using array interfacesj]j](jtjwjzj}jjjjjjjjjjjjjjjejjqjnj[uj}(jjjjjRun the pygame unit test suitej]run(*args, **kwds) -> tupleaj]jjjnj4u pygame.tests}(jjjj]jPygame unit test suite packagej]j]jajjjnj4uj}(jjjjjget the time in millisecondsj]get_ticks() -> millisecondsaj]jjjnjfuj}(jjjjj'pause the program for an amount of timej]wait(milliseconds) -> timeaj]jjjnjfuj}(jjjjj'pause the program for an amount of timej]delay(milliseconds) -> timeaj]jjjnjfuj}(jjjjj-repeatedly create an event on the event queuej]( set_timer(event, millis) -> None)set_timer(event, millis, loops=0) -> Noneej]jjjnjfuj}(jjjj jupdate the clockj]!tick(framerate=0) -> millisecondsaj]jjjnjfuj}(jjjj jupdate the clockj]+tick_busy_loop(framerate=0) -> millisecondsaj]jjjnjfuj}(jjjjjtime used in the previous tickj]get_time() -> millisecondsaj]jjjnjfuj}(jjjjj%actual time used in the previous tickj]get_rawtime() -> millisecondsaj]jjjnjfuj}(jjjjjcompute the clock frameratej]get_fps() -> floataj]jjjnjfuj}(jjjjj#create an object to help track timej]Clock() -> Clockaj](jjjjjejjjnjfu pygame.time}(jjjj]j!pygame module for monitoring timej]j](jjjjjejjjnjfuj}(jjjjjget the number of touch devicesj]get_num_devices() -> intaj]jjjnj1uj}(jjjj#j+get the a touch device id for a given indexj]get_device(index) -> touchidaj]jjjnj1uj}(jjjj'j5the number of active fingers for a given touch devicej]get_num_fingers(touchid) -> intaj]jjjnj1uj}(jjjj+j&get information about an active fingerj]!get_finger(touchid, index) -> intaj]jjjnj1upygame._sdl2.touch}(jjjj]j&pygame module to work with touch inputj]j](jjjjejjjnj1uj}(jjjj1j flip vertically and horizontallyj](flip(surface, flip_x, flip_y) -> Surfaceaj]jjjnjEuj}(jjjj5jresize to new resolutionj]2scale(surface, size, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjj9j)resize to new resolution, using scalar(s)j]7scale_by(surface, factor, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjj=jrotate an imagej]!rotate(surface, angle) -> Surfaceaj]jjjnjEuj}(jjjjAjfiltered scale and rotationj]*rotozoom(surface, angle, scale) -> Surfaceaj]jjjnjEuj}(jjjjEjspecialized image doublerj].scale2x(surface, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjjIj-scale a surface to an arbitrary size smoothlyj]8smoothscale(surface, size, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjjMj)resize to new resolution, using scalar(s)j]=smoothscale_by(surface, factor, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjjQjDreturn smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'j]#get_smoothscale_backend() -> stringaj]jjjnjEuj}(jjjjUjDset smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'j](set_smoothscale_backend(backend) -> Noneaj]jjjnjEuj}(jjjjYj5gets a copy of an image with an interior area removedj]chop(surface, rect) -> Surfaceaj]jjjnjEuj }(jj jj]jfind edges in a surfacej]0laplacian(surface, dest_surface=None) -> Surfaceaj]jj jnjEuj}(jjjjaj,find the average surface from many surfaces.j]Javerage_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surfaceaj]jjjnjEuj}(jjjjej$finds the average color of a surfacej]@average_color(surface, rect=None, consider_alpha=False) -> Coloraj]jjjnjEuj}(jjjjijgrayscale a surfacej]0grayscale(surface, dest_surface=None) -> Surfaceaj]jjjnjEuj}(jjjjmjlfinds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.j]threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixelsaj]jjjnjEupygame.transform}(jjjj]j#pygame module to transform surfacesj]j](jjjjjjjjjjjj jjjjejjjnjEuuub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.6151412 pygame-2.6.1/docs/generated/doctrees/filepaths.doctree0000644000175100001770000001107514676242416022453 0ustar00runnerdocker2sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(hFile Path Function Argumentsh]h TextFile Path Function Arguments}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource7/home/runner/work/pygame/pygame/docs/reST/filepaths.rstlineKubh paragraph)}(hXA pygame function or method which takes a file path argument will accept either a Unicode or a byte (8-bit or ASCII character) string. Unicode strings are translated to Python's default filesystem encoding, as returned by sys.getfilesystemencoding(). A Unicode code point above U+FFFF (``\uFFFF``) can be coded directly with a 32-bit escape sequences (``\Uxxxxxxxx``), even for Python interpreters built with an UCS-2 (16-bit character) Unicode type. Byte strings are passed to the operating system unchanged.h](hXA pygame function or method which takes a file path argument will accept either a Unicode or a byte (8-bit or ASCII character) string. Unicode strings are translated to Python's default filesystem encoding, as returned by sys.getfilesystemencoding(). A Unicode code point above U+FFFF (}hh/sbh literal)}(h ``\uFFFF``h]h\uFFFF}hh9sbah}(h]h ]h"]h$]h&]uh(h7hh/ubh8) can be coded directly with a 32-bit escape sequences (}hh/sbh8)}(h``\Uxxxxxxxx``h]h \Uxxxxxxxx}hhKsbah}(h]h ]h"]h$]h&]uh(h7hh/ubh), even for Python interpreters built with an UCS-2 (16-bit character) Unicode type. Byte strings are passed to the operating system unchanged.}hh/sbeh}(h]h ]h"]h$]h&]uh(h-h*h+h,Khh h)hubh.)}(hXFNull characters (``\x00``) are not permitted in the path, raising an exception. An exception is also raised if an Unicode file path cannot be encoded. How UTF-16 surrogate codes are handled is Python-interpreter-dependent. Use UTF-32 code points and 32-bit escape sequences instead. The exception types are function-dependent.h](hNull characters (}hhcsbh8)}(h``\x00``h]h\x00}hhksbah}(h]h ]h"]h$]h&]uh(h7hhcubhX-) are not permitted in the path, raising an exception. An exception is also raised if an Unicode file path cannot be encoded. How UTF-16 surrogate codes are handled is Python-interpreter-dependent. Use UTF-32 code points and 32-bit escape sequences instead. The exception types are function-dependent.}hhcsbeh}(h]h ]h"]h$]h&]uh(h-h*h+h,K hh h)hubeh}(h]file-path-function-argumentsah ]h"]file path function argumentsah$]h&]uh(h hhh)hh*h+h,Kubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerherror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}hhs nametypes}hsh}hh s footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.7191412 pygame-2.6.1/docs/generated/doctrees/index.doctree0000644000175100001770000015106114676242416021603 0ustar00runnerdocker&sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(hPygame Front Pageh]h TextPygame Front Page}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource3/home/runner/work/pygame/pygame/docs/reST/index.rstlineKubh compound)}(hhh]htoctree)}(hhh]h}(h]h ]h"]h$]h&]hindexentries](Nref/bufferproxyN ref/cameraN ref/cdromN ref/colorNref/color_listN ref/cursorsN ref/displayNref/drawN ref/eventN ref/examplesN ref/fasteventNref/fontN ref/freetypeN ref/gfxdrawN ref/imageN ref/joystickNref/keyN ref/localsNref/maskNref/mathNref/midiN ref/mixerN ref/mouseN ref/musicN ref/overlayNref/pixelarrayN ref/pixelcopyN ref/pygameNref/rectN ref/scrapNref/sdl2_controllerNref/sdl2_videoN ref/sndarrayN ref/spriteN ref/surfaceN ref/surfarrayN ref/testsNref/timeN ref/touchN ref/transformNtut/CameraIntroNtut/ChimpLineByLineNtut/DisplayModesNtut/ImportInitN tut/MakeGamesN tut/MoveItNtut/PygameIntroNtut/SpriteIntroNtut/SurfarrayIntroN tut/chimp.pyNtut/newbieguideNtut/tom_games2Ntut/tom_games3Ntut/tom_games4Ntut/tom_games5Ntut/tom_games6N)tut/en/Red_or_Black/1.Prolog/introductionN:tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUTN-tut/en/Red_or_Black/3.Move_text/Basic PROCESSN.tut/en/Red_or_Black/4.Control_text/Basic INPUTNBtut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESSNAtut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUTN?tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alphaN#tut/en/Red_or_Black/8.Epilog/EpilogN6tut/ko/빨간블록 검은블록/1.프롤로그/소개NNtut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력NAtut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리NAtut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력NNtut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리NRtut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력NOtut/ko/빨간블록 검은블록/7.게임판/심화 출력 그리고 조금 더N`_), or reference the API documentation by module.h](h+For more in depth reference, check out the }hjysbh pending_xref)}(h :ref:`tutorials-reference-label`h]h inline)}(hjh]htutorials-reference-label}hjsbah}(h]h ](xrefstdstd-refeh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftyperef refexplicitrefwarn reftargettutorials-reference-labeluh(jh*h+h,K"hjyubh, section below, check out a video tutorial (}hjysbh reference)}(hF`I'm a fan of this one `_h]hI'm a fan of this one}(hjhI'm a fan of this oneubah}(h]h ]h"]h$]h&]nameI'm a fan of this onerefuri+https://www.youtube.com/watch?v=AY9MnQ4x3zkuh(jhjyubh target)}(h. h]h}(h]i-m-a-fan-of-this-oneah ]h"]i'm a fan of this oneah$]h&]refurijuh(j referencedKhjyubh0), or reference the API documentation by module.}hjysbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K"hhh)hubeh}(h] quick-startah ]h"] quick startah$]h&]uh(h hh h)hh*h+h,Kubh )}(hhh](h)}(h Documentsh]h Documents}hjsbah}(h]h ]h"]h$]h&]uh(hhjh)hh*h+h,K(ubh definition_list)}(hhh](h definition_list_item)}(h]`Readme`_ Basic information about pygame: what it is, who is involved, and where to find it. h](h term)}(h `Readme`_h]j)}(hjh]hReadme}(hjhReadmeubah}(h]h ]h"]h$]h&]namej j ../wiki/aboutuh(jhjresolvedKubah}(h]h ]h"]h$]h&]uh(jh*h+h,K*hjubh definition)}(hhh]h)}(hRBasic information about pygame: what it is, who is involved, and where to find it.h]hRBasic information about pygame: what it is, who is involved, and where to find it.}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K+hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K+hjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K*hjubj)}(h`Install`_ Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system. h](j)}(h `Install`_h]j)}(hj@h]hInstall}(hjBhInstallubah}(h]h ]h"]h$]h&]namejIj,../wiki/GettingStarted#Pygame%20Installationuh(jhj>jKubah}(h]h ]h"]h$]h&]uh(jh*h+h,K-hj:ubj)}(hhh]h)}(h{Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system.h]h{Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system.}hj[sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K.hjXubah}(h]h ]h"]h$]h&]uh(jh*h+h,K.hj:ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K-hjh)hubj)}(h7:doc:`filepaths` How pygame handles file system paths. h](j)}(h:doc:`filepaths`h]j)}(hj{h]j)}(hj{h]h filepaths}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj}ubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj filepathsuh(jh*h+h,K1hjyubah}(h]h ]h"]h$]h&]uh(jh*h+h,K1hjuubj)}(hhh]h)}(h%How pygame handles file system paths.h]h%How pygame handles file system paths.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K2hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K2hjuubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K1hjh)hubj)}(hK:doc:`Pygame Logos ` The logos of Pygame in different resolutions. h](j)}(h:doc:`Pygame Logos `h]j)}(hjh]j)}(hjh]h Pygame Logos}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjlogosuh(jh*h+h,K4hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K4hjubj)}(hhh]h)}(h-The logos of Pygame in different resolutions.h]h-The logos of Pygame in different resolutions.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K5hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K5hjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K4hjh)hubj)}(h`LGPL License`_ This is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program. h](j)}(h`LGPL License`_h]j)}(hjh]h LGPL License}(hjh LGPL Licenseubah}(h]h ]h"]h$]h&]name LGPL LicensejLGPL.txtuh(jhj jKubah}(h]h ]h"]h$]h&]uh(jh*h+h,K8hj ubj)}(hhh]h)}(hThis is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program.h]hThis is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program.}hj+sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K9hj(ubah}(h]h ]h"]h$]h&]uh(jh*h+h,K9hj ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K8hjh)hubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K*hjh)hubj)}(h.. _tutorials-reference-label:h]h}(h]h ]h"]h$]h&]refidtutorials-reference-labeluh(jh,K=hjh)hh*h+ubeh}(h] documentsah ]h"] documentsah$]h&]uh(h hh h)hh*h+h,K(ubh )}(hhh](h)}(h Tutorialsh]h Tutorials}hjbsbah}(h]h ]h"]h$]h&]uh(hhj_h)hh*h+h,K@ubj)}(hhh](j)}(h:doc:`Introduction to Pygame ` An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine. h](j)}(h/:doc:`Introduction to Pygame `h]j)}(hjyh]j)}(hjyh]hIntroduction to Pygame}hj~sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj{ubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjtut/PygameIntrouh(jh*h+h,KBhjwubah}(h]h ]h"]h$]h&]uh(jh*h+h,KBhjsubj)}(hhh]h)}(h{An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine.h]h{An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KChjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KChjsubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KBhjpubj)}(h:doc:`Import and Initialize ` The beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms. h](j)}(h-:doc:`Import and Initialize `h]j)}(hjh]j)}(hjh]hImport and Initialize}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjtut/ImportInituh(jh*h+h,KFhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KFhjubj)}(hhh]h)}(hThe beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms.h]hThe beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KGhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KGhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KFhjph)hubj)}(h:doc:`How do I move an Image? ` A basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated. h](j)}(h+:doc:`How do I move an Image? `h]j)}(hj h]j)}(hj h]hHow do I move an Image?}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj tut/MoveItuh(jh*h+h,KKhj ubah}(h]h ]h"]h$]h&]uh(jh*h+h,KKhjubj)}(hhh]h)}(hA basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated.h]hA basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated.}hj7sbah}(h]h ]h"]h$]h&]uh(hh*h+h,KLhj4ubah}(h]h ]h"]h$]h&]uh(jh*h+h,KLhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KKhjph)hubj)}(hX:doc:`Chimp Tutorial, Line by Line ` The pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example. h](j)}(h9:doc:`Chimp Tutorial, Line by Line `h]j)}(hjWh]j)}(hjWh]hChimp Tutorial, Line by Line}hj\sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjYubah}(h]h ]h"]h$]h&]refdoch= refdomainjfreftypedoc refexplicitrefwarnjtut/ChimpLineByLineuh(jh*h+h,KOhjUubah}(h]h ]h"]h$]h&]uh(jh*h+h,KOhjQubj)}(hhh]h)}(hThe pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example.h]hThe pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KPhj~ubah}(h]h ]h"]h$]h&]uh(jh*h+h,KPhjQubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KOhjph)hubj)}(hX[:doc:`Sprite Module Introduction ` Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used. h](j)}(h3:doc:`Sprite Module Introduction `h]j)}(hjh]j)}(hjh]hSprite Module Introduction}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjtut/SpriteIntrouh(jh*h+h,KThjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KThjubj)}(hhh]h)}(hX&Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used.h]hX&Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KUhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KUhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KThjph)hubj)}(hX4:doc:`Surfarray Introduction ` Pygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py. h](j)}(h2:doc:`Surfarray Introduction `h]j)}(hjh]j)}(hjh]hSurfarray Introduction}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjtut/SurfarrayIntrouh(jh*h+h,KZhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KZhjubj)}(hhh]h)}(hXPygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py.h]hXPygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K[hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K[hjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KZhjph)hubj)}(h:doc:`Camera Module Introduction ` Pygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases. h](j)}(h3:doc:`Camera Module Introduction `h]j)}(hj5h]j)}(hj5h]hCamera Module Introduction}hj:sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj7ubah}(h]h ]h"]h$]h&]refdoch= refdomainjDreftypedoc refexplicitrefwarnjtut/CameraIntrouh(jh*h+h,K_hj3ubah}(h]h ]h"]h$]h&]uh(jh*h+h,K_hj/ubj)}(hhh]h)}(hPygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases.h]hPygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases.}hj_sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K`hj\ubah}(h]h ]h"]h$]h&]uh(jh*h+h,K`hj/ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K_hjph)hubj)}(hr:doc:`Newbie Guide ` A list of thirteen helpful tips for people to get comfortable using pygame. h](j)}(h%:doc:`Newbie Guide `h]j)}(hjh]j)}(hjh]h Newbie Guide}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjtut/newbieguideuh(jh*h+h,Kdhj}ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kdhjyubj)}(hhh]h)}(hKA list of thirteen helpful tips for people to get comfortable using pygame.h]hKA list of thirteen helpful tips for people to get comfortable using pygame.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kehjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kehjyubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kdhjph)hubj)}(h}:doc:`Making Games Tutorial ` A large tutorial that covers the bigger topics needed to create an entire game. h](j)}(h,:doc:`Making Games Tutorial `h]j)}(hjh]j)}(hjh]hMaking Games Tutorial}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj tut/MakeGamesuh(jh*h+h,Kghjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kghjubj)}(hhh]h)}(hOA large tutorial that covers the bigger topics needed to create an entire game.h]hOA large tutorial that covers the bigger topics needed to create an entire game.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kghjph)hubj)}(hR:doc:`Display Modes ` Getting a display surface for the screen. h](j)}(h':doc:`Display Modes `h]j)}(hjh]j)}(hjh]h Display Modes}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainj"reftypedoc refexplicitrefwarnjtut/DisplayModesuh(jh*h+h,Kjhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kjhj ubj)}(hhh]h)}(h)Getting a display surface for the screen.h]h)Getting a display surface for the screen.}hj=sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kkhj:ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kkhj ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kjhjph)hubj)}(hu:doc:`한국어 튜토리얼 (Korean Tutorial) ` 빨간블록 검은블록 h](j)}(hY:doc:`한국어 튜토리얼 (Korean Tutorial) `h]j)}(hj]h]j)}(hj]h]h(한국어 튜토리얼 (Korean Tutorial)}hjbsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj_ubah}(h]h ]h"]h$]h&]refdoch= refdomainjlreftypedoc refexplicitrefwarnj'tut/ko/빨간블록 검은블록/개요uh(jh*h+h,Kmhj[ubah}(h]h ]h"]h$]h&]uh(jh*h+h,KmhjWubj)}(hhh]h)}(h빨간블록 검은블록h]h빨간블록 검은블록}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Knhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,KnhjWubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kmhjph)hubeh}(h]h ]h"]h$]h&]uh(jh*h+h,KBhj_h)hubeh}(h]( tutorialsjVeh ]h"]( tutorialstutorials-reference-labeleh$]h&]uh(h hh h)hh*h+h,K@expect_referenced_by_name}jjKsexpect_referenced_by_id}jVjKsubh )}(hhh](h)}(h Referenceh]h Reference}hjsbah}(h]h ]h"]h$]h&]uh(hhjh)hh*h+h,Krubj)}(hhh](j)}(hU:ref:`genindex` A list of all functions, classes, and methods in the pygame package. h](j)}(h:ref:`genindex`h]j)}(hjh]j)}(hjh]hgenindex}hjsbah}(h]h ](jstdstd-refeh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftyperef refexplicitrefwarnjgenindexuh(jh*h+h,Kthjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kthjubj)}(hhh]h)}(hDA list of all functions, classes, and methods in the pygame package.h]hDA list of all functions, classes, and methods in the pygame package.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kuhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kuhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kthjubj)}(h@:doc:`ref/bufferproxy` An array protocol view of surface pixels h](j)}(h:doc:`ref/bufferproxy`h]j)}(hjh]j)}(hjh]href/bufferproxy}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainj'reftypedoc refexplicitrefwarnjref/bufferproxyuh(jh*h+h,Kwhjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kwhjubj)}(hhh]h)}(h(An array protocol view of surface pixelsh]h(An array protocol view of surface pixels}hjBsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kxhj?ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kxhjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kwhjh)hubj)}(h':doc:`ref/color` Color representation. h](j)}(h:doc:`ref/color`h]j)}(hjbh]j)}(hjbh]h ref/color}hjgsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjdubah}(h]h ]h"]h$]h&]refdoch= refdomainjqreftypedoc refexplicitrefwarnj ref/coloruh(jh*h+h,Kzhj`ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Kzhj\ubj)}(hhh]h)}(hColor representation.h]hColor representation.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K{hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K{hj\ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kzhjh)hubj)}(h8:doc:`ref/cursors` Loading and compiling cursor images. h](j)}(h:doc:`ref/cursors`h]j)}(hjh]j)}(hjh]h ref/cursors}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj ref/cursorsuh(jh*h+h,K}hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K}hjubj)}(hhh]h)}(h$Loading and compiling cursor images.h]h$Loading and compiling cursor images.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K~hjubah}(h]h ]h"]h$]h&]uh(jh*h+h,K~hjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,K}hjh)hubj)}(h2:doc:`ref/display` Configure the display surface. h](j)}(h:doc:`ref/display`h]j)}(hjh]j)}(hjh]h ref/display}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj ref/displayuh(jh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubj)}(hhh]h)}(hConfigure the display surface.h]hConfigure the display surface.}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(hK:doc:`ref/draw` Drawing simple shapes like lines and ellipses to surfaces. h](j)}(h:doc:`ref/draw`h]j)}(hj@h]j)}(hj@h]href/draw}hjEsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjBubah}(h]h ]h"]h$]h&]refdoch= refdomainjOreftypedoc refexplicitrefwarnjref/drawuh(jh*h+h,Khj>ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj:ubj)}(hhh]h)}(h:Drawing simple shapes like lines and ellipses to surfaces.h]h:Drawing simple shapes like lines and ellipses to surfaces.}hjjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjgubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj:ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(hc:doc:`ref/event` Manage the incoming events from various input devices and the windowing platform. h](j)}(h:doc:`ref/event`h]j)}(hjh]j)}(hjh]h ref/event}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj ref/eventuh(jh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubj)}(hhh]h)}(hQManage the incoming events from various input devices and the windowing platform.h]hQManage the incoming events from various input devices and the windowing platform.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(hY:doc:`ref/examples` Various programs demonstrating the use of individual pygame modules. h](j)}(h:doc:`ref/examples`h]j)}(hjh]j)}(hjh]h ref/examples}hjsbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnj ref/examplesuh(jh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubj)}(hhh]h)}(hDVarious programs demonstrating the use of individual pygame modules.h]hDVarious programs demonstrating the use of individual pygame modules.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(h6:doc:`ref/font` Loading and rendering TrueType fonts. h](j)}(h:doc:`ref/font`h]j)}(hj h]j)}(hj h]href/font}hj# sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj ubah}(h]h ]h"]h$]h&]refdoch= refdomainj- reftypedoc refexplicitrefwarnjref/fontuh(jh*h+h,Khj ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj ubj)}(hhh]h)}(h%Loading and rendering TrueType fonts.h]h%Loading and rendering TrueType fonts.}hjH sbah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjE ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(hQ:doc:`ref/freetype` Enhanced pygame module for loading and rendering font faces. h](j)}(h:doc:`ref/freetype`h]j)}(hjh h]j)}(hjh h]h ref/freetype}hjm sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhjj ubah}(h]h ]h"]h$]h&]refdoch= refdomainjw reftypedoc refexplicitrefwarnj ref/freetypeuh(jh*h+h,Khjf ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjb ubj)}(hhh]h)}(h` The C api shared amongst pygame extension modules. h](j)}(h:doc:`pygame C API `h]j)}(hj0h]j)}(hj0h]h pygame C API}hj5sbah}(h]h ](jstdstd-doceh"]h$]h&]uh(jhj2ubah}(h]h ]h"]h$]h&]refdoch= refdomainj?reftypedoc refexplicitrefwarnjc_apiuh(jh*h+h,Khj.ubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj*ubj)}(hhh]h)}(h2The C api shared amongst pygame extension modules.h]h2The C api shared amongst pygame extension modules.}hjZsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjWubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khj*ubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubj)}(h2:ref:`search` Search pygame documents by keyword. h](j)}(h :ref:`search`h]j)}(hjzh]j)}(hjzh]hsearch}hjsbah}(h]h ](jstdstd-refeh"]h$]h&]uh(jhj|ubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftyperef refexplicitrefwarnjsearchuh(jh*h+h,Khjxubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjtubj)}(hhh]h)}(h#Search pygame documents by keyword.h]h#Search pygame documents by keyword.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(jh*h+h,Khjtubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Khjh)hubeh}(h]h ]h"]h$]h&]uh(jh*h+h,Kthjh)hubj)}(h.. _Readme: ../wiki/abouth]h}(h]readmeah ]h"]readmeah$]h&]jjuh(jh,Khjh)hh*h+jubj)}(h9.. _Install: ../wiki/GettingStarted#Pygame%20Installationh]h}(h]installah ]h"]installah$]h&]jjQuh(jh,Khjh)hh*h+jubj)}(h.. _LGPL License: LGPL.txth]h}(h] lgpl-licenseah ]h"] lgpl licenseah$]h&]jj!uh(jh,Khjh)hh*h+jubeh}(h] referenceah ]h"] referenceah$]h&]uh(h hh h)hh*h+h,Krubeh}(h]pygame-front-pageah ]h"]pygame front pageah$]h&]uh(h hhh)hh*h+h,Kubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj"error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(readme]jainstall]jBa lgpl license]jaurefids}jV]jKasnameids}(jjjjjjj\jYjjVjjjjjjjjjju nametypes}(jjjj\jjjjjjuh}(jh jhjjjYjjVj_jj_jjjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]h system_message)}(hhh]h)}(hhh]h?Hyperlink target "tutorials-reference-label" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh(hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourceh+lineK=uh(juba transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.7301412 pygame-2.6.1/docs/generated/doctrees/logos.doctree0000644000175100001770000002454014676242416021620 0ustar00runnerdockerU)sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(hPygame Logos Pageh]h TextPygame Logos Page}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource3/home/runner/work/pygame/pygame/docs/reST/logos.rstlineKubh )}(hhh](h)}(h Pygame Logosh]h Pygame Logos}hh0sbah}(h]h ]h"]h$]h&]uh(hhh-h)hh*h+h,Kubh paragraph)}(hThese logos are available for use in your own game projects. Please put them up wherever you see fit. The logo was created by TheCorruptor on July 29, 2001 and upscaled by Mega_JC on August 29, 2021.h]hThese logos are available for use in your own game projects. Please put them up wherever you see fit. The logo was created by TheCorruptor on July 29, 2001 and upscaled by Mega_JC on August 29, 2021.}hh@sbah}(h]h ]h"]h$]h&]uh(h>h*h+h,Khh-h)hubh container)}(hX.. image:: _static/pygame_logo.png | `pygame_logo.svg <_static/pygame_logo.svg>`_ | `pygame_logo.png <_static/pygame_logo.png>`_ - 1561 x 438 .. image:: _static/pygame_lofi.png | `pygame_lofi.svg <_static/pygame_lofi.svg>`_ | `pygame_lofi.png <_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: _static/pygame_powered.png | `pygame_powered.svg <_static/pygame_powered.svg>`_ | `pygame_powered.png <_static/pygame_powered.png>`_ - 1617 x 640 .. image:: _static/pygame_tiny.png | `pygame_tiny.png <_static/pygame_tiny.png>`_ - 214 x 60 .. image:: _static/pygame_powered_lowres.png | `pygame_powered_lowres.png <_static/pygame_powered_lowres.png>`_ - 101 x 40h](h image)}(h#.. image:: _static/pygame_logo.png h]h}(h]h ]h"]h$]h&]uri_static/pygame_logo.png candidates}*hasuh(hTh*h+h,KhhPubh line_block)}(hhh](h h,)}(h,`pygame_logo.svg <_static/pygame_logo.svg>`_h](h reference)}(hhmh]hpygame_logo.svg}(hhqhpygame_logo.svgubah}(h]h ]h"]h$]h&]namehxrefuri_static/pygame_logo.svguh(hohhkubh target)}(h <_static/pygame_logo.svg>h]h}(h]pygame-logo-svgah ]h"]pygame_logo.svgah$]h&]refurihuh(h referencedKhhkubeh}(h]h ]h"]h$]h&]uh(h,indentKhhgh*h+h,Kubhj)}(h9`pygame_logo.png <_static/pygame_logo.png>`_ - 1561 x 438h](hp)}(h,`pygame_logo.png <_static/pygame_logo.png>`_h]hpygame_logo.png}(hhhpygame_logo.pngubah}(h]h ]h"]h$]h&]namehh_static/pygame_logo.pnguh(hohhubh)}(h <_static/pygame_logo.png>h]h}(h]pygame-logo-pngah ]h"]pygame_logo.pngah$]h&]refurihuh(hhKhhubh - 1561 x 438}hhsbeh}(h]h ]h"]h$]h&]uh(h,hKhhgh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h#.. image:: _static/pygame_lofi.png h]h}(h]h ]h"]h$]h&]uri_static/pygame_lofi.pnghb}hdhsuh(hTh*h+h,KhhPubhf)}(hhh](hj)}(h,`pygame_lofi.svg <_static/pygame_lofi.svg>`_h](hp)}(hhh]hpygame_lofi.svg}(hhhpygame_lofi.svgubah}(h]h ]h"]h$]h&]namehh_static/pygame_lofi.svguh(hohhubh)}(h <_static/pygame_lofi.svg>h]h}(h]pygame-lofi-svgah ]h"]pygame_lofi.svgah$]h&]refurihuh(hhKhhubeh}(h]h ]h"]h$]h&]uh(h,hKhhh*h+h,Kubhj)}(h9`pygame_lofi.png <_static/pygame_lofi.png>`_ - 1561 x 438h](hp)}(h,`pygame_lofi.png <_static/pygame_lofi.png>`_h]hpygame_lofi.png}(hjhpygame_lofi.pngubah}(h]h ]h"]h$]h&]namejh_static/pygame_lofi.pnguh(hohjubh)}(h <_static/pygame_lofi.png>h]h}(h]pygame-lofi-pngah ]h"]pygame_lofi.pngah$]h&]refurijuh(hhKhjubh - 1561 x 438}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhhh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h&.. image:: _static/pygame_powered.png h]h}(h]h ]h"]h$]h&]uri_static/pygame_powered.pnghb}hdj?suh(hTh*h+h,KhhPubhf)}(hhh](hj)}(h2`pygame_powered.svg <_static/pygame_powered.svg>`_h](hp)}(hjFh]hpygame_powered.svg}(hjHhpygame_powered.svgubah}(h]h ]h"]h$]h&]namejOh_static/pygame_powered.svguh(hohjDubh)}(h <_static/pygame_powered.svg>h]h}(h]pygame-powered-svgah ]h"]pygame_powered.svgah$]h&]refurijWuh(hhKhjDubeh}(h]h ]h"]h$]h&]uh(h,hKhjAh*h+h,Kubhj)}(h?`pygame_powered.png <_static/pygame_powered.png>`_ - 1617 x 640h](hp)}(h2`pygame_powered.png <_static/pygame_powered.png>`_h]hpygame_powered.png}(hjohpygame_powered.pngubah}(h]h ]h"]h$]h&]namejwh_static/pygame_powered.pnguh(hohjkubh)}(h <_static/pygame_powered.png>h]h}(h]pygame-powered-pngah ]h"]pygame_powered.pngah$]h&]refurijuh(hhKhjkubh - 1617 x 640}hjksbeh}(h]h ]h"]h$]h&]uh(h,hKhjAh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h#.. image:: _static/pygame_tiny.png h]h}(h]h ]h"]h$]h&]uri_static/pygame_tiny.pnghb}hdjsuh(hTh*h+h,KhhPubhf)}(hhh]hj)}(h7`pygame_tiny.png <_static/pygame_tiny.png>`_ - 214 x 60h](hp)}(h,`pygame_tiny.png <_static/pygame_tiny.png>`_h]hpygame_tiny.png}(hjhpygame_tiny.pngubah}(h]h ]h"]h$]h&]namejh_static/pygame_tiny.pnguh(hohjubh)}(h <_static/pygame_tiny.png>h]h}(h]pygame-tiny-pngah ]h"]pygame_tiny.pngah$]h&]refurijuh(hhKhjubh - 214 x 60}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhjh*h+h,Kubah}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h-.. image:: _static/pygame_powered_lowres.png h]h}(h]h ]h"]h$]h&]uri!_static/pygame_powered_lowres.pnghb}hdjsuh(hTh*h+h,K"hhPubhf)}(hhh]hj)}(hK`pygame_powered_lowres.png <_static/pygame_powered_lowres.png>`_ - 101 x 40h](hp)}(h@`pygame_powered_lowres.png <_static/pygame_powered_lowres.png>`_h]hpygame_powered_lowres.png}(hjhpygame_powered_lowres.pngubah}(h]h ]h"]h$]h&]namejh!_static/pygame_powered_lowres.pnguh(hohjubh)}(h$ <_static/pygame_powered_lowres.png>h]h}(h]pygame-powered-lowres-pngah ]h"]pygame_powered_lowres.pngah$]h&]refurijuh(hhKhjubh - 101 x 40}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhjh*h+h,Kubah}(h]h ]h"]h$]h&]uh(hehhPubeh}(h]h ] fullwidthah"]h$]h&]uh(hNhh-h)hh*h+h,Nubh?)}(hThere is a higher resolution layered photoshop image available `here `_. *(1.3 MB)*h](h?There is a higher resolution layered photoshop image available }hj(sbhp)}(h4`here `_h]hhere}(hj0hhereubah}(h]h ]h"]h$]h&]namej8h*https://www.pygame.org/ftp/pygame_logo.psduh(hohj(ubh)}(h- h]h}(h]hereah ]h"]hereah$]h&]refurij@uh(hhKhj(ubh. }hj(sbh emphasis)}(h *(1.3 MB)*h]h(1.3 MB)}hjTsbah}(h]h ]h"]h$]h&]uh(jRhj(ubeh}(h]h ]h"]h$]h&]uh(h>h*h+h,K'hh-h)hubh )}(hhh](h)}(h Legacy logosh]h Legacy logos}hjksbah}(h]h ]h"]h$]h&]uh(hhjhh)hh*h+h,K+ubhO)}(h8`legacy_logos.zip <_static/legacy_logos.zip>`_ - 50.1 KBh]h?)}(hj{h](hp)}(h.`legacy_logos.zip <_static/legacy_logos.zip>`_h]hlegacy_logos.zip}(hjhlegacy_logos.zipubah}(h]h ]h"]h$]h&]namejh_static/legacy_logos.zipuh(hohj}ubh)}(h <_static/legacy_logos.zip>h]h}(h]legacy-logos-zipah ]h"]legacy_logos.zipah$]h&]refurijuh(hhKhj}ubh - 50.1 KB}hj}sbeh}(h]h ]h"]h$]h&]uh(h>h*h+h,K/hjyubah}(h]h ] fullwidthah"]h$]h&]uh(hNhjhh)hh*h+h,Nubeh}(h] legacy-logosah ]h"] legacy logosah$]h&]uh(h hh-h)hh*h+h,K+ubeh}(h] pygame-logosah ]h"] pygame logosah$]h&]uh(h hh h)hh*h+h,Kubeh}(h]pygame-logos-pageah ]h"]pygame logos pageah$]h&]uh(h hhh)hh*h+h,Kubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjhhhhhhj jjaj^jjjjj j jJjGjjjju nametypes}(jjhhhj jajjj jJjjuh}(jh jh-hhhhhhjjj^jXjjjjj jjGjAjjhjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0141258 pygame-2.6.1/docs/generated/doctrees/ref/0000755000175100001770000000000014676242436017677 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612173.751141 pygame-2.6.1/docs/generated/doctrees/ref/bufferproxy.doctree0000644000175100001770000007363014676242416023630 0ustar00runnerdockerwsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:class:`pygame.BufferProxy`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.BufferProxy}hh) -> BufferProxy`h]h)}(hhh]h$BufferProxy() -> BufferProxy}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hX:class:`BufferProxy` is a pygame support type, designed as the return value of the :meth:`Surface.get_buffer` and :meth:`Surface.get_view` methods. For all Python versions a :class:`BufferProxy` object exports a C struct and Python level array interface on behalf of its parent object's buffer. A new buffer interface is also exported. In pygame, :class:`BufferProxy` is key to implementing the :mod:`pygame.surfarray` module.h](h6)}(h:class:`BufferProxy`h]h;)}(hhh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hhubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khhubh? is a pygame support type, designed as the return value of the }hhsbh6)}(h:meth:`Surface.get_buffer`h]h;)}(hj"h]hSurface.get_buffer()}hj$sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj.reftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_bufferuh%h5h'h]h)Khhubh and }hhsbh6)}(h:meth:`Surface.get_view`h]h;)}(hjFh]hSurface.get_view()}hjHsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjDubah}(h]h]h]h]h!]refdochS refdomainjRreftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_viewuh%h5h'h]h)Khhubh$ methods. For all Python versions a }hhsbh6)}(h:class:`BufferProxy`h]h;)}(hjjh]h BufferProxy}hjlsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjhubah}(h]h]h]h]h!]refdochS refdomainjvreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khhubh object exports a C struct and Python level array interface on behalf of its parent object's buffer. A new buffer interface is also exported. In pygame, }hhsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khhubh is key to implementing the }hhsbh6)}(h:mod:`pygame.surfarray`h]h;)}(hjh]hpygame.surfarray}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZh~h[pygame.surfarrayuh%h5h'h]h)Khhubh module.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khhh&hubh)}(hX":class:`BufferProxy` instances can be created directly from Python code, either for a parent that exports an interface, or from a Python ``dict`` describing an object's buffer layout. The dict entries are based on the Python level array interface mapping. The following keys are recognized:h](h6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khjubhu instances can be created directly from Python code, either for a parent that exports an interface, or from a Python }hjsbh;)}(h``dict``h]hdict}hjsbah}(h]h]h]h]h!]uh%h:hjubh describing an object's buffer layout. The dict entries are based on the Python level array interface mapping. The following keys are recognized:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khhh&hubh block_quote)}(hX*``"shape"`` : tuple The length of each array dimension as a tuple of integers. The length of the tuple is the number of dimensions in the array. ``"typestr"`` : string The array element type as a length 3 string. The first character gives byteorder, '<' for little-endian, '>' for big-endian, and '\|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, "' for big-endian, and '\|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, "' for big-endian, and '\|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, "' for big-endian, and '|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, " Surface`h]h)}(hjh]hparent -> Surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KNubh)}(h:sg:`parent -> `h]h)}(hjh]hparent -> }hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KOubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KMubh)}(hxThe :class:`Surface` which returned the :class:`BufferProxy` object or the object passed to a :class:`BufferProxy` call.h](hThe }hjsbh6)}(h:class:`Surface`h]h;)}(hjh]hSurface}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Surfaceuh%h5h'h]h)KQhjubh which returned the }hjsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)KQhjubh" object or the object passed to a }hjsbh6)}(h:class:`BufferProxy`h]h;)}(hj4h]h BufferProxy}hj6sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)KQhjubh call.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KQhjh&hubeh}(h]h]h]h]h!]uh%hhjsh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]domainjeobjtypejfdesctypejfno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%length (pygame.BufferProxy attribute)pygame.BufferProxy.lengthhNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hlengthh]h)}(hjh]hlength}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)KTubah}(h]jah](hheh]h]h!]hhhh~hBufferProxy.lengthhh BufferProxylengthhjuh%hzh'h]h)KThjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`The size, in bytes, of the exported buffer.`h]h)}(hjh]h+The size, in bytes, of the exported buffer.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KVubh)}(h:sg:`length -> int`h]h)}(hjh]h length -> int}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KWubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KVubh)}(hThe number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the ``Py_buffer`` C struct ``len`` field.h](hThe number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the }hjsbh;)}(h ``Py_buffer``h]h Py_buffer}hjsbah}(h]h]h]h]h!]uh%h:hjubh C struct }hjsbh;)}(h``len``h]hlen}hjsbah}(h]h]h]h]h!]uh%h:hjubh field.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KYhjh&hubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jjjjkjjljjmjnjojpjqjrjsuh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"raw (pygame.BufferProxy attribute)pygame.BufferProxy.rawhNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hrawh]h)}(hj-h]hraw}hj/sbah}(h]h](hheh]h]h!]h#h$uh%hhj+h&hh'h]h)K^ubah}(h]j&ah](hheh]h]h!]hhhh~hBufferProxy.rawhh BufferProxyrawhjBuh%hzh'h]h)K^hj(h&hubh)}(hhh](h)}(hhh](h)}(h?:sl:`A copy of the exported buffer as a single block of bytes.`h]h)}(hjNh]h9A copy of the exported buffer as a single block of bytes.}hjPsbah}(h]h]hah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)K`ubh)}(h:sg:`raw -> bytes`h]h)}(hjeh]h raw -> bytes}hjgsbah}(h]h]hah]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)Kaubeh}(h]h]h]h]h!]uh%hhjFh&hh'h]h)K`ubh)}(hYThe buffer data as a ``str``/``bytes`` object. Any gaps in the exported data are removed.h](hThe buffer data as a }hjsbh;)}(h``str``h]hstr}hjsbah}(h]h]h]h]h!]uh%h:hjubh/}hjsbh;)}(h ``bytes``h]hbytes}hjsbah}(h]h]h]h]h!]uh%h:hjubh3 object. Any gaps in the exported data are removed.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KchjFh&hubeh}(h]h]h]h]h!]uh%hhj(h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jjjjkjjljjmjnjojpjqjrjsuh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#write() (pygame.BufferProxy method)pygame.BufferProxy.writehNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hwriteh](h)}(hjh]hwrite}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kfubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kfubeh}(h]jah](hheh]h]h!]hhhh~hBufferProxy.writehh BufferProxywritehBufferProxy.write()uh%hzh'h]h)Kfhjh&hubh)}(hhh](h)}(hhh](h)}(h':sl:`Write raw bytes to object buffer.`h]h)}(hjh]h!Write raw bytes to object buffer.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Khubh)}(h:sg:`write(buffer, offset=0)`h]h)}(hjh]hwrite(buffer, offset=0)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kiubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Khubh)}(hXOverwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument `buffer` is a ``str``/``bytes`` object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's :attr:`length` value, an ``IndexException`` is raised. If ``len(buffer) > proxy.length + offset``, a ``ValueError`` is raised.h](h|Overwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument }hj3sbh title_reference)}(h`buffer`h]hbuffer}hj=sbah}(h]h]h]h]h!]uh%j;hj3ubh is a }hj3sbh;)}(h``str``h]hstr}hjOsbah}(h]h]h]h]h!]uh%h:hj3ubh/}hj3sbh;)}(h ``bytes``h]hbytes}hjasbah}(h]h]h]h]h!]uh%h:hj3ubh object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's }hj3sbh6)}(h:attr:`length`h]h;)}(hjuh]hlength}hjwsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjsubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZh~h[lengthuh%h5h'h]h)Kkhj3ubh value, an }hj3sbh;)}(h``IndexException``h]hIndexException}hjsbah}(h]h]h]h]h!]uh%h:hj3ubh is raised. If }hj3sbh;)}(h'``len(buffer) > proxy.length + offset``h]h#len(buffer) > proxy.length + offset}hjsbah}(h]h]h]h]h!]uh%h:hj3ubh, a }hj3sbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hj3ubh is raised.}hj3sbeh}(h]h]h]h]h!]uh%hh'h]h)Kkhjh&hubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jjjjkjjljjmjnjojpjqjrjsuh%huh&hhhh'h]h)Nubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjkjjljjmjnjojpjqjrjsuh%huh&hhh,h'Nh)Nubeh}(h]pygame-bufferproxyah]h]pygame.bufferproxyah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj! error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh|jqjvjjj&j+jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/bufferproxy.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.7881413 pygame-2.6.1/docs/generated/doctrees/ref/camera.doctree0000644000175100001770000013162714676242416022506 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.camera`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.camera}hh Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.h]hX+Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}hjLsbah}(h]h]h]h]h!]h#h$uh%jJh'h]h)Khh,h&hubh)}(hNew in pygame 1.9.0.h]hNew in pygame 1.9.0.}hjZsbah}(h]h]h]h]h!]uh%hh'h]h)K1hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single init() (in module pygame.camera)pygame.camera.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhj~h&hh'h]h)K3ubh desc_name)}(hjh]hinit}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhj~h&hh'h]h)K3ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj~h&hh'h]h)K3ubeh}(h]juah](sig sig-objecteh]h]h!]module pygame.cameraclasshfullnamej _toc_partsjj _toc_nameinit()uh%j|h'h]h)K3hjyh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h:sl:`Module init`h]h)}(hjh]h Module init}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K5ubhz)}(h":sg:`init(backend = None) -> None`h]h)}(hjh]hinit(backend = None) -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K6ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K5ubh)}(hXpThis function starts up the camera module, choosing the best webcam backend it can find for your system. This is not guaranteed to succeed, and may even attempt to import third party modules, like `OpenCV`. If you want to override its backend choice, you can call pass the name of the backend you want into this function. More about backends in :func:`get_backends()`.h](hThis function starts up the camera module, choosing the best webcam backend it can find for your system. This is not guaranteed to succeed, and may even attempt to import third party modules, like }hjsbh title_reference)}(h`OpenCV`h]hOpenCV}hjsbah}(h]h]h]h]h!]uh%jhjubh. If you want to override its backend choice, you can call pass the name of the backend you want into this function. More about backends in }hjsbh6)}(h:func:`get_backends()`h]h;)}(hjh]hget_backends()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj(reftypefunc refexplicitrefwarnhYjhZNh[ get_backendsuh%h5h'h]h)K8hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K8hjh&hubh)}(h [str]`h]h)}(hjh]hget_backends() -> [str]}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KEubh)}(hpThis function returns every backend it thinks has a possibility of working on your system, in order of priority.h]hpThis function returns every backend it thinks has a possibility of working on your system, in order of priority.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KHhjh&hubh)}(hpygame.camera Backends: ::h]hpygame.camera Backends:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KKhjh&hubjK)}(hX Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the futureh]hX Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future}hj,sbah}(h]h]h]h]h!]h#h$uh%jJh'h]h)KNhjh&hubh)}(h.There are two main differences among backends.h]h.There are two main differences among backends.}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)KWhjh&hubh)}(hThe _camera backends are built in to pygame itself, and require no third party imports. All the other backends do. For the OpenCV and VideoCapture backends, those modules need to be installed on your system.h]hThe _camera backends are built in to pygame itself, and require no third party imports. All the other backends do. For the OpenCV and VideoCapture backends, those modules need to be installed on your system.}hjHsbah}(h]h]h]h]h!]uh%hh'h]h)KYhjh&hubh)}(hXThe other big difference is "camera enumeration." Some backends don't have a way to list out camera names, or even the number of cameras on the system. In these cases, :func:`list_cameras()` will return something like ``[0]``. If you know you have multiple cameras on the system, these backend ports will pass through a "camera index number" through if you use that as the ``device`` parameter.h](hThe other big difference is "camera enumeration." Some backends don't have a way to list out camera names, or even the number of cameras on the system. In these cases, }hjVsbh6)}(h:func:`list_cameras()`h]h;)}(hj`h]hlist_cameras()}hjbsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj^ubah}(h]h]h]h]h!]refdochS refdomainjlreftypefunc refexplicitrefwarnhYjhZNh[ list_camerasuh%h5h'h]h)K]hjVubh will return something like }hjVsbh;)}(h``[0]``h]h[0]}hjsbah}(h]h]h]h]h!]uh%h:hjVubh. If you know you have multiple cameras on the system, these backend ports will pass through a "camera index number" through if you use that as the }hjVsbh;)}(h ``device``h]hdevice}hjsbah}(h]h]h]h]h!]uh%h:hjVubh parameter.}hjVsbeh}(h]h]h]h]h!]uh%hh'h]h)K]hjh&hubh)}(hNew in pygame 2.0.3.h]h)}(hNew in pygame 2.0.3.h]h)}(hNew in pygame 2.0.3.h]hNew in pygame 2.0.3.}hjsbah}(h]h](hheh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Keubah}(h]h]h]h]h!]h versionaddedh2.0.3uh%hh&hh'h]h)Kdhjubh )}(h ## pygame.camera.get_backends ##h]h ## pygame.camera.get_backends ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js&colorspace() (in module pygame.camera)pygame.camera.colorspacehNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h colorspaceh](j)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Khubj)}(hjh]h colorspace}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Khubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Khubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj colorspace()uh%j|h'h]h)Khhjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`Surface colorspace conversion`h]h)}(hj7h]hSurface colorspace conversion}hj9sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Kjubhz)}(h@:sg:`colorspace(Surface, format, DestSurface = None) -> Surface`h]h)}(hjNh]h:colorspace(Surface, format, DestSurface = None) -> Surface}hjPsbah}(h]h]jah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)Kjubh)}(hXAllows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, ``transform.scale()`` it even smaller, and then convert the colorspace to ``YUV`` or ``HSV`` before doing any processing on it.h](hXAllows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, }hjisbh;)}(h``transform.scale()``h]htransform.scale()}hjqsbah}(h]h]h]h]h!]uh%h:hjiubh5 it even smaller, and then convert the colorspace to }hjisbh;)}(h``YUV``h]hYUV}hjsbah}(h]h]h]h]h!]uh%h:hjiubh or }hjisbh;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hjiubh# before doing any processing on it.}hjisbeh}(h]h]h]h]h!]uh%hh'h]h)Kmhj/h&hubh )}(h## pygame.camera.colorspace ##h]h## pygame.camera.colorspace ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj/h&hh'h]h)Ktubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(list_cameras() (in module pygame.camera)pygame.camera.list_camerashNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h list_camerash](j)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kvubj)}(hjh]h list_cameras}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kvubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kvubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjlist_cameras()uh%j|h'h]h)Kvhjh&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`returns a list of available cameras`h]h)}(hjh]h#returns a list of available cameras}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kxubhz)}(h!:sg:`list_cameras() -> [cameras]`h]h)}(hj*h]hlist_cameras() -> [cameras]}hj,sbah}(h]h]jah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kyubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kxubh)}(hChecks the computer for available cameras and returns a list of strings of camera names, ready to be fed into :class:`pygame.camera.Camera`.h](hnChecks the computer for available cameras and returns a list of strings of camera names, ready to be fed into }hjEsbh6)}(h:class:`pygame.camera.Camera`h]h;)}(hjOh]hpygame.camera.Camera}hjQsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjMubah}(h]h]h]h]h!]refdochS refdomainj[reftypeclass refexplicitrefwarnhYjhZNh[pygame.camera.Camerauh%h5h'h]h)K{hjEubh.}hjEsbeh}(h]h]h]h]h!]uh%hh'h]h)K{hj h&hubh)}(hIf the camera backend doesn't support webcam enumeration, this will return something like ``[0]``. See :func:`get_backends()` for much more information.h](hZIf the camera backend doesn't support webcam enumeration, this will return something like }hjwsbh;)}(h``[0]``h]h[0]}hjsbah}(h]h]h]h]h!]uh%h:hjwubh. See }hjwsbh6)}(h:func:`get_backends()`h]h;)}(hjh]hget_backends()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjhZNh[ get_backendsuh%h5h'h]h)K~hjwubh for much more information.}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)K~hj h&hubh )}(h ## pygame.camera.list_cameras ##h]h ## pygame.camera.list_cameras ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jsCamera (class in pygame.camera)pygame.camera.CamerahNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hCamerah](j)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hCamera}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`load a camera`h]h)}(hjh]h load a camera}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h7:sg:`Camera(device, (width, height), format) -> Camera`h]h)}(hj-h]h1Camera(device, (width, height), format) -> Camera}hj/sbah}(h]h]jah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX Loads a camera. On Linux, the device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is ``RGB``. The following are supported:h](hLoads a camera. On Linux, the device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is }hjHsbh;)}(h``RGB``h]hRGB}hjPsbah}(h]h]h]h]h!]uh%h:hjHubh. The following are supported:}hjHsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh block_quote)}(hv* ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value h]h bullet_list)}(hhh](h list_item)}(h``RGB`` - Red, Green, Blue h]h)}(h``RGB`` - Red, Green, Blueh](h;)}(h``RGB``h]hRGB}hj}sbah}(h]h]h]h]h!]uh%h:hjyubh - Red, Green, Blue}hjysbeh}(h]h]h]h]h!]uh%hh'h]h)Khjuubah}(h]h]h]h]h!]uh%jsh'h]h)Khjpubjt)}(h2``YUV`` - Luma, Blue Chrominance, Red Chrominance h]h)}(h1``YUV`` - Luma, Blue Chrominance, Red Chrominanceh](h;)}(h``YUV``h]hYUV}hjsbah}(h]h]h]h]h!]uh%h:hjubh* - Luma, Blue Chrominance, Red Chrominance}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jsh'h]h)Khjpubjt)}(h!``HSV`` - Hue, Saturation, Value h]h)}(h ``HSV`` - Hue, Saturation, Valueh](h;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hjubh - Hue, Saturation, Value}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jsh'h]h)Khjpubeh}(h]h]h]h]h!]bullet*uh%jnh'h]h)Khjjubah}(h]h]h]h]h!]uh%jhh'h]h)Khjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](js%start() (pygame.camera.Camera method)pygame.camera.Camera.starthNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(hstarth](j)}(hjh]hstart}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjj Camera.startjjCamerastartjCamera.start()uh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`opens, initializes, and starts capturing`h]h)}(hj4h]h(opens, initializes, and starts capturing}hj6sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Kubhz)}(h:sg:`start() -> None`h]h)}(hjKh]hstart() -> None}hjMsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj,h&hh'h]h)Kubh)}(hOpens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used.h]hOpens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used.}hjfsbah}(h]h]h]h]h!]uh%hh'h]h)Khj,h&hubh )}(h## Camera.start ##h]h## Camera.start ##}hjtsbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js$stop() (pygame.camera.Camera method)pygame.camera.Camera.stophNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(hstoph](j)}(hjh]hstop}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjj Camera.stopjjCamerastopj Camera.stop()uh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`stops, uninitializes, and closes the camera`h]h)}(hjh]h+stops, uninitializes, and closes the camera}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hStops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again.h]hStops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Camera.stop ##h]h## Camera.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj&jj'jj'jjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js,get_controls() (pygame.camera.Camera method)!pygame.camera.Camera.get_controlshNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(h get_controlsh](j)}(hj>h]h get_controls}hj@sbah}(h]h](jjeh]h]h!]h#h$uh%jhj<h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj<h&hh'h]h)Kubeh}(h]j7ah](jjeh]h]h!]jjjjjCamera.get_controlsjjCamera get_controlsjCamera.get_controls()uh%j|h'h]h)Khj9h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`gets current values of user controls`h]h)}(hjjh]h$gets current values of user controls}hjlsbah}(h]h]hah]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)Kubhz)}(h@:sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)`h]h)}(hjh]h:get_controls() -> (hflip = bool, vflip = bool, brightness)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjbh&hh'h]h)Kubh)}(hXUIf the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct.h]hXUIf the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjbh&hubh )}(h## Camera.get_controls ##h]h## Camera.get_controls ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjbh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj9h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js,set_controls() (pygame.camera.Camera method)!pygame.camera.Camera.set_controlshNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(h set_controlsh](j)}(hjh]h set_controls}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjCamera.set_controlsjjCamera set_controlsjCamera.set_controls()uh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`changes camera settings if supported by the camera`h]h)}(hj h]h2changes camera settings if supported by the camera}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(hf:sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)`h]h)}(hj h]h`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX"Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. On Windows, :code:`hflip` and :code:`vflip` are implemented by pygame, not by the Camera, so they should always work, but :code:`brightness` is unsupported.h](hXAllows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. On Windows, }hj7 sbh;)}(h :code:`hflip`h]hhflip}hj? sbah}(h]h]codeah]h]h!]languagehuh%h:hj7 ubh and }hj7 sbh;)}(h :code:`vflip`h]hvflip}hjS sbah}(h]h]jJ ah]h]h!]languagehuh%h:hj7 ubhO are implemented by pygame, not by the Camera, so they should always work, but }hj7 sbh;)}(h:code:`brightness`h]h brightness}hjf sbah}(h]h]jJ ah]h]h!]languagehuh%h:hj7 ubh is unsupported.}hj7 sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Camera.set_controls ##h]h## Camera.set_controls ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(get_size() (pygame.camera.Camera method)pygame.camera.Camera.get_sizehNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(hget_sizeh](j)}(hj h]hget_size}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjCamera.get_sizejjCameraget_sizejCamera.get_size()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns the dimensions of the images being recorded`h]h)}(hj h]h3returns the dimensions of the images being recorded}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h#:sg:`get_size() -> (width, height)`h]h)}(hj h]hget_size() -> (width, height)}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size.h]hReturns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Camera.get_size ##h]h## Camera.get_size ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj1 jj2 jj2 jjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js+query_image() (pygame.camera.Camera method) pygame.camera.Camera.query_imagehNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(h query_imageh](j)}(hjI h]h query_image}hjK sbah}(h]h](jjeh]h]h!]h#h$uh%jhjG h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjG h&hh'h]h)Kubeh}(h]jB ah](jjeh]h]h!]jjjjjCamera.query_imagejjCamera query_imagejCamera.query_image()uh%j|h'h]h)KhjD h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`checks if a frame is ready`h]h)}(hju h]hchecks if a frame is ready}hjw sbah}(h]h]hah]h]h!]uh%hhjs ubah}(h]h]h]h]h!]uh%h)hKhjp h&hh'h]h)Kubhz)}(h:sg:`query_image() -> bool`h]h)}(hj h]hquery_image() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjp h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjm h&hh'h]h)Kubh)}(hXIf an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like :func:`get_image()`. On Windows (MSMF), and the OpenCV backends, :func:`query_image()` should be reliable, though. This is useful to separate the framerate of the game from that of the camera without having to use threading.h](hIf an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like }hj sbh6)}(h:func:`get_image()`h]h;)}(hj h]h get_image()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjhZjh[ get_imageuh%h5h'h]h)Khj ubh/. On Windows (MSMF), and the OpenCV backends, }hj sbh6)}(h:func:`query_image()`h]h;)}(hj h]h query_image()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjhZjh[ query_imageuh%h5h'h]h)Khj ubh should be reliable, though. This is useful to separate the framerate of the game from that of the camera without having to use threading.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjm h&hubh )}(h## Camera.query_image ##h]h## Camera.query_image ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjm h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjD h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)get_image() (pygame.camera.Camera method)pygame.camera.Camera.get_imagehNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(h get_imageh](j)}(hj, h]h get_image}hj. sbah}(h]h](jjeh]h]h!]h#h$uh%jhj* h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj* h&hh'h]h)Kubeh}(h]j% ah](jjeh]h]h!]jjjjjCamera.get_imagejjCamera get_imagejCamera.get_image()uh%j|h'h]h)Khj' h&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`captures an image as a Surface`h]h)}(hjX h]hcaptures an image as a Surface}hjZ sbah}(h]h]hah]h]h!]uh%hhjV ubah}(h]h]h]h]h!]uh%h)hKhjS h&hh'h]h)Kubhz)}(h*:sg:`get_image(Surface = None) -> Surface`h]h)}(hjo h]h$get_image(Surface = None) -> Surface}hjq sbah}(h]h]jah]h]h!]uh%hhjm ubah}(h]h]h]h]h!]uh%h)hKhjS h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjP h&hh'h]h)Kubh)}(hPulls an image off of the buffer as an ``RGB`` Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is 24 bits on Linux, 32 bits on Windows, or the same as the optionally supplied Surface.h](h'Pulls an image off of the buffer as an }hj sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hj ubh Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is 24 bits on Linux, 32 bits on Windows, or the same as the optionally supplied Surface.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjP h&hubh )}(h## Camera.get_image ##h]h## Camera.get_image ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjP h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj' h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jwh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js'get_raw() (pygame.camera.Camera method)pygame.camera.Camera.get_rawhNtauh%hdhjh&hh'Nh)Nubjx)}(hhh](j})}(hget_rawh](j)}(hj h]hget_raw}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjCamera.get_rawjjCameraget_rawjCamera.get_raw()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`returns an unmodified image as bytes`h]h)}(hj h]h$returns an unmodified image as bytes}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_raw() -> bytes`h]h)}(hj h]hget_raw() -> bytes}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hGets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. This returns a bytes objecth]hGets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. This returns a bytes object}hj7 sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Camera.get_raw ##h]h## Camera.get_raw ##}hjE sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj\ jj] jj] jjjjjjjuh%jwh&hhjh'Nh)Nubh )}(h## pygame.camera.Camera ##h]h## pygame.camera.Camera ##}hja sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjx jjy jjy jjjjjjjuh%jwh&hhh,h'Nh)Nubh )}(h## pygame.camera ##h]h## pygame.camera ##}hj} sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kubeh}(h](hs pygame-cameraeh]h] pygame.cameraah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j h'h]h)Khh,h&hubjuj~jjjjjjjjjjjjj7j<jjj j jB jG j% j* j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]h system_message)}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj/ sbah}(h]h]h]h]h!]uh%hhj, ubah}(h]h]h]h]h!]levelKtypeINFOlineKLsourceh]uh%j* hjh&hh'h]h)KLubatransform_messages] transformerN include_log]docs/reST/ref/camera.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.8411412 pygame-2.6.1/docs/generated/doctrees/ref/cdrom.doctree0000644000175100001770000015611514676242416022361 0ustar00runnerdockerBsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.cdrom`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.cdrom}hh`_.h]h paragraph)}(hThis module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. One alternative for python cdrom functionality is `pycdio `_.h](hThis module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. One alternative for python cdrom functionality is }hhsbh reference)}(h,`pycdio `_h]hpycdio}(hhhpycdioubah}(h]h]h]h]h!]namehrefuri https://pypi.org/project/pycdio/uh%hhhubh target)}(h# h]h}(h]pycdioah]h]pycdioah]h!]refurihuh%h referencedKhhubh.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)K hhubah}(h]h]h]h]h!]uh%hh'h]h)K hh,h&hubh)}(hX2The cdrom module manages the ``CD`` and ``DVD`` drives on a computer. It can also control the playback of audio CDs. This module needs to be initialized before it can do anything. Each ``CD`` object you create represents a cdrom drive and must also be initialized individually before it can do most things.h](hThe cdrom module manages the }hhsbh;)}(h``CD``h]hCD}hhsbah}(h]h]h]h]h!]uh%h:hhubh and }hhsbh;)}(h``DVD``h]hDVD}hhsbah}(h]h]h]h]h!]uh%h:hhubh drives on a computer. It can also control the playback of audio CDs. This module needs to be initialized before it can do anything. Each }hhsbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hhubhs object you create represents a cdrom drive and must also be initialized individually before it can do most things.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](singleinit() (in module pygame.cdrom)pygame.cdrom.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(h pygame.cdrom.h]h pygame.cdrom.}hj@sbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%j>hj:h&hh'h]h)Kubh desc_name)}(hj<h]hinit}hjRsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jPhj:h&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj:h&hh'h]h)Kubeh}(h]j1ah](sig sig-objecteh]h]h!]module pygame.cdromclasshfullnamej< _toc_partsjvj< _toc_nameinit()uh%j8h'h]h)Khj5h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h!:sl:`initialize the cdrom module`h]h)}(hjh]hinitialize the cdrom module}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hInitialize the cdrom module. This will scan the system for all ``CD`` devices. The module must be initialized before any other functions will work. This automatically happens when you call ``pygame.init()``.h](h?Initialize the cdrom module. This will scan the system for all }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubhx devices. The module must be initialized before any other functions will work. This automatically happens when you call }hjsbh;)}(h``pygame.init()``h]h pygame.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.cdrom.init ##h]h## pygame.cdrom.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%j}hj5h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j3h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/quit() (in module pygame.cdrom)pygame.cdrom.quithNtauh%hdhh,h&hh'Nh)Nubj4)}(hhh](j9)}(hquith](j?)}(h pygame.cdrom.h]h pygame.cdrom.}hj5sbah}(h]h](jKjLeh]h]h!]h#h$uh%j>hj1h&hh'h]h)K"ubjQ)}(hj3h]hquit}hjCsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj1h&hh'h]h)K"ubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj1h&hh'h]h)K"ubeh}(h]j,ah](jpjqeh]h]h!]jujvjwhjxj3jyjvj3j{quit()uh%j8h'h]h)K"hj.h&hubj~)}(hhh](hv)}(hhh](hz)}(h#:sl:`uninitialize the cdrom module`h]h)}(hjjh]huninitialize the cdrom module}hjlsbah}(h]h]hah]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)K$ubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)K%ubeh}(h]h]h]h]h!]uh%huhjbh&hh'h]h)K$ubh)}(hcUninitialize the cdrom module. After you call this any existing ``CD`` objects will no longer work.h](h@Uninitialize the cdrom module. After you call this any existing }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh objects will no longer work.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K'hjbh&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K*hjbh&hubh )}(h## pygame.cdrom.quit ##h]h## pygame.cdrom.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjbh&hh'h]h)K,ubeh}(h]h]h]h]h!]uh%j}hj.h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j3h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/#get_init() (in module pygame.cdrom)pygame.cdrom.get_inithNtauh%hdhh,h&hh'Nh)Nubj4)}(hhh](j9)}(hget_inith](j?)}(h pygame.cdrom.h]h pygame.cdrom.}hjsbah}(h]h](jKjLeh]h]h!]h#h$uh%j>hjh&hh'h]h)K.ubjQ)}(hjh]hget_init}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)K.ubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)K.ubeh}(h]jah](jpjqeh]h]h!]jujvjwhjxjjyjvjj{ get_init()uh%j8h'h]h)K.hjh&hubj~)}(hhh](hv)}(hhh](hz)}(h-:sl:`true if the cdrom module is initialized`h]h)}(hj0h]h'true if the cdrom module is initialized}hj2sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)K0ubhz)}(h:sg:`get_init() -> bool`h]h)}(hjGh]hget_init() -> bool}hjIsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)K1ubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)K0ubh)}(hTest if the cdrom module is initialized or not. This is different than the ``CD.init()`` since each drive must also be initialized individually.h](hKTest if the cdrom module is initialized or not. This is different than the }hjbsbh;)}(h ``CD.init()``h]h CD.init()}hjjsbah}(h]h]h]h]h!]uh%h:hjbubh8 since each drive must also be initialized individually.}hjbsbeh}(h]h]h]h]h!]uh%hh'h]h)K3hj(h&hubh )}(h## pygame.cdrom.get_init ##h]h## pygame.cdrom.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)K6ubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j3h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/$get_count() (in module pygame.cdrom)pygame.cdrom.get_counthNtauh%hdhh,h&hh'Nh)Nubj4)}(hhh](j9)}(h get_counth](j?)}(h pygame.cdrom.h]h pygame.cdrom.}hjsbah}(h]h](jKjLeh]h]h!]h#h$uh%j>hjh&hh'h]h)K8ubjQ)}(hjh]h get_count}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)K8ubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)K8ubeh}(h]jah](jpjqeh]h]h!]jujvjwhjxjjyjvjj{ get_count()uh%j8h'h]h)K8hjh&hubj~)}(hhh](hv)}(hhh](hz)}(h':sl:`number of cd drives on the system`h]h)}(hjh]h!number of cd drives on the system}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K:ubhz)}(h:sg:`get_count() -> count`h]h)}(hjh]hget_count() -> count}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K;ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K:ubh)}(hReturn the number of cd drives on the system. When you create ``CD`` objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system.h](h>Return the number of cd drives on the system. When you create }hjsbh;)}(h``CD``h]hCD}hj"sbah}(h]h]h]h]h!]uh%h:hjubh objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K=hjh&hubh )}(h## pygame.cdrom.get_count ##h]h## pygame.cdrom.get_count ##}hj:sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KAubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjQjjRjjRjjjjjjjuh%j3h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/CD (class in pygame.cdrom)pygame.cdrom.CDhNtauh%hdhh,h&hh'Nh)Nubj4)}(hhh](j9)}(hCDh](j?)}(h pygame.cdrom.h]h pygame.cdrom.}hjksbah}(h]h](jKjLeh]h]h!]h#h$uh%j>hjgh&hh'h]h)KCubjQ)}(hjih]hCD}hjysbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjgh&hh'h]h)KCubeh}(h]jbah](jpjqeh]h]h!]jujvjwhjxjijyjvjij{jiuh%j8h'h]h)KChjdh&hubj~)}(hhh](hv)}(hhh](hz)}(h#:sl:`class to manage a cdrom drive`h]h)}(hjh]hclass to manage a cdrom drive}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KEubhz)}(h:sg:`CD(id) -> CD`h]h)}(hjh]h CD(id) -> CD}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KEubh)}(hYou can create a ``CD`` object for each cdrom on the system. Use ``pygame.cdrom.get_count()`` to determine how many drives actually exist. The id argument is an integer of the drive, starting at zero.h](hYou can create a }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh* object for each cdrom on the system. Use }hjsbh;)}(h``pygame.cdrom.get_count()``h]hpygame.cdrom.get_count()}hjsbah}(h]h]h]h]h!]uh%h:hjubhk to determine how many drives actually exist. The id argument is an integer of the drive, starting at zero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KHhjh&hubh)}(hxThe ``CD`` object is not initialized, you can only call ``CD.get_id()`` and ``CD.get_name()`` on an uninitialized drive.h](hThe }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh. object is not initialized, you can only call }hjsbh;)}(h``CD.get_id()``h]h CD.get_id()}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``CD.get_name()``h]h CD.get_name()}hj%sbah}(h]h]h]h]h!]uh%h:hjubh on an uninitialized drive.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KLhjh&hubh)}(hbIt is safe to create multiple ``CD`` objects for the same drive, they will all cooperate normally.h](hIt is safe to create multiple }hj=sbh;)}(h``CD``h]hCD}hjEsbah}(h]h]h]h]h!]uh%h:hj=ubh> objects for the same drive, they will all cooperate normally.}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j/init() (pygame.cdrom.CD method)pygame.cdrom.CD.inithNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hinith](jQ)}(hjph]hinit}hjrsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjnh&hh'h]h)KRubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjnh&hh'h]h)KRubeh}(h]jiah](jpjqeh]h]h!]jujvjwjijxCD.initjyjvCDinitj{ CD.init()uh%j8h'h]h)KRhjkh&hubj~)}(hhh](hv)}(hhh](hz)}(h&:sl:`initialize a cdrom drive for use`h]h)}(hjh]h initialize a cdrom drive for use}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KTubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KUubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KTubh)}(hInitialize the cdrom drive for use. The drive must be initialized for most ``CD`` methods to work. Even if the rest of pygame has been initialized.h](hKInitialize the cdrom drive for use. The drive must be initialized for most }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubhB methods to work. Even if the rest of pygame has been initialized.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KWhjh&hubh)}(hThere may be a brief pause while the drive is initialized. Avoid ``CD.init()`` if the program should not stop for a second or two.h](hAThere may be a brief pause while the drive is initialized. Avoid }hjsbh;)}(h ``CD.init()``h]h CD.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh4 if the program should not stop for a second or two.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K[hjh&hubh )}(h ## CD.init ##h]h ## CD.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%j}hjkh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj%jj&jj&jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/quit() (pygame.cdrom.CD method)pygame.cdrom.CD.quithNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hquith](jQ)}(hj=h]hquit}hj?sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj;h&hh'h]h)K`ubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj;h&hh'h]h)K`ubeh}(h]j6ah](jpjqeh]h]h!]jujvjwjijxCD.quitjyjvCDquitj{ CD.quit()uh%j8h'h]h)K`hj8h&hubj~)}(hhh](hv)}(hhh](hz)}(h(:sl:`uninitialize a cdrom drive for use`h]h)}(hjih]h"uninitialize a cdrom drive for use}hjksbah}(h]h]hah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)Kbubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%huhjah&hh'h]h)Kbubh)}(heUninitialize a drive for use. Call this when your program will not be accessing the drive for awhile.h]heUninitialize a drive for use. Call this when your program will not be accessing the drive for awhile.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kehjah&hubh )}(h ## CD.quit ##h]h ## CD.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjah&hh'h]h)Khubeh}(h]h]h]h]h!]uh%j}hj8h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/#get_init() (pygame.cdrom.CD method)pygame.cdrom.CD.get_inithNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_inith](jQ)}(hjh]hget_init}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Kjubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Kjubeh}(h]jah](jpjqeh]h]h!]jujvjwjijx CD.get_initjyjvCDget_initj{ CD.get_init()uh%j8h'h]h)Kjhjh&hubj~)}(hhh](hv)}(hhh](hz)}(h(:sl:`true if this cd device initialized`h]h)}(hjh]h"true if this cd device initialized}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Klubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Klubh)}(hTest if this ``CDROM`` device is initialized. This is different than the ``pygame.cdrom.init()`` since each drive must also be initialized individually.h](h Test if this }hj6sbh;)}(h ``CDROM``h]hCDROM}hj>sbah}(h]h]h]h]h!]uh%h:hj6ubh3 device is initialized. This is different than the }hj6sbh;)}(h``pygame.cdrom.init()``h]hpygame.cdrom.init()}hjPsbah}(h]h]h]h]h!]uh%h:hj6ubh8 since each drive must also be initialized individually.}hj6sbeh}(h]h]h]h]h!]uh%hh'h]h)Kohjh&hubh )}(h## CD.get_init ##h]h## CD.get_init ##}hjhsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Ksubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/play() (pygame.cdrom.CD method)pygame.cdrom.CD.playhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hplayh](jQ)}(hjh]hplay}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Kuubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Kuubeh}(h]jah](jpjqeh]h]h!]jujvjwjijxCD.playjyjvCDplayj{ CD.play()uh%j8h'h]h)Kuhjh&hubj~)}(hhh](hv)}(hhh](hz)}(h:sl:`start playing audio`h]h)}(hjh]hstart playing audio}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kwubhz)}(h/:sg:`play(track, start=None, end=None) -> None`h]h)}(hjh]h)play(track, start=None, end=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kwubh)}(hPlayback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played.h]hPlayback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kzhjh&hubh)}(hIf you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc.h]hIf you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hWSee the ``CD.get_numtracks()`` and ``CD.get_track_audio()`` to find tracks to playback.h](hSee the }hjsbh;)}(h``CD.get_numtracks()``h]hCD.get_numtracks()}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``CD.get_track_audio()``h]hCD.get_track_audio()}hj+sbah}(h]h]h]h]h!]uh%h:hjubh to find tracks to playback.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hjCsbh;)}(h``CD``h]hCD}hjKsbah}(h]h]h]h]h!]uh%h:hjCubh. Track numbers start at zero.}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## CD.play ##h]h ## CD.play ##}hjcsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjzjj{jj{jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/stop() (pygame.cdrom.CD method)pygame.cdrom.CD.stophNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hstoph](jQ)}(hjh]hstop}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Kubeh}(h]jah](jpjqeh]h]h!]jujvjwjijxCD.stopjyjvCDstopj{ CD.stop()uh%j8h'h]h)Khjh&hubj~)}(hhh](hv)}(hhh](hz)}(h:sl:`stop audio playback`h]h)}(hjh]hstop audio playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hStops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio.h]hStops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## CD.stop ##h]h ## CD.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/ pause() (pygame.cdrom.CD method)pygame.cdrom.CD.pausehNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hpauseh](jQ)}(hj- h]hpause}hj/ sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj+ h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj+ h&hh'h]h)Kubeh}(h]j& ah](jpjqeh]h]h!]jujvjwjijxCD.pausejyjvCDpausej{ CD.pause()uh%j8h'h]h)Khj( h&hubj~)}(hhh](hv)}(hhh](hz)}(h%:sl:`temporarily stop audio playback`h]h)}(hjY h]htemporarily stop audio playback}hj[ sbah}(h]h]hah]h]h!]uh%hhjW ubah}(h]h]h]h]h!]uh%h)hKhjT h&hh'h]h)Kubhz)}(h:sg:`pause() -> None`h]h)}(hjp h]hpause() -> None}hjr sbah}(h]h]jah]h]h!]uh%hhjn ubah}(h]h]h]h]h!]uh%h)hKhjT h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjQ h&hh'h]h)Kubh)}(hTemporarily stop audio playback on the ``CD``. The playback can be resumed at the same point with the ``CD.resume()`` method. If the ``CD`` is not playing this method does nothing.h](h'Temporarily stop audio playback on the }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh9. The playback can be resumed at the same point with the }hj sbh;)}(h``CD.resume()``h]h CD.resume()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh method. If the }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh) is not playing this method does nothing.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjQ h&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh. Track numbers start at zero.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjQ h&hubh )}(h## CD.pause ##h]h## CD.pause ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjQ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hj( h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/!resume() (pygame.cdrom.CD method)pygame.cdrom.CD.resumehNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hresumeh](jQ)}(hj h]hresume}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj h&hh'h]h)Kubeh}(h]j ah](jpjqeh]h]h!]jujvjwjijx CD.resumejyjvCDresumej{ CD.resume()uh%j8h'h]h)Khj h&hubj~)}(hhh](hv)}(hhh](hz)}(h:sl:`unpause audio playback`h]h)}(hjJ h]hunpause audio playback}hjL sbah}(h]h]hah]h]h!]uh%hhjH ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubhz)}(h:sg:`resume() -> None`h]h)}(hja h]hresume() -> None}hjc sbah}(h]h]jah]h]h!]uh%hhj_ ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjB h&hh'h]h)Kubh)}(hbUnpause a paused ``CD``. If the ``CD`` is not paused or already playing, this method does nothing.h](hUnpause a paused }hj| sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj| ubh . If the }hj| sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj| ubh< is not paused or already playing, this method does nothing.}hj| sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjB h&hubh )}(h## CD.resume ##h]h## CD.resume ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjB h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/ eject() (pygame.cdrom.CD method)pygame.cdrom.CD.ejecthNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hejecth](jQ)}(hj h]heject}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj h&hh'h]h)Kubeh}(h]j ah](jpjqeh]h]h!]jujvjwjijxCD.ejectjyjvCDejectj{ CD.eject()uh%j8h'h]h)Khj h&hubj~)}(hhh](hv)}(hhh](hz)}(h#:sl:`eject or open the cdrom drive`h]h)}(hj h]heject or open the cdrom drive}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`eject() -> None`h]h)}(hj h]heject() -> None}hj" sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hiThis will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped.h]hiThis will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped.}hj; sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.eject ##h]h## CD.eject ##}hjI sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj` jja jja jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/!get_id() (pygame.cdrom.CD method)pygame.cdrom.CD.get_idhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_idh](jQ)}(hjx h]hget_id}hjz sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjv h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjv h&hh'h]h)Kubeh}(h]jq ah](jpjqeh]h]h!]jujvjwjijx CD.get_idjyjvCDget_idj{ CD.get_id()uh%j8h'h]h)Khjs h&hubj~)}(hhh](hv)}(hhh](hz)}(h":sl:`the index of the cdrom drive`h]h)}(hj h]hthe index of the cdrom drive}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_id() -> id`h]h)}(hj h]hget_id() -> id}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(htReturns the integer id that was used to create the ``CD`` instance. This method can work on an uninitialized ``CD``.h](h3Returns the integer id that was used to create the }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh4 instance. This method can work on an uninitialized }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_id ##h]h## CD.get_id ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjs h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/#get_name() (pygame.cdrom.CD method)pygame.cdrom.CD.get_namehNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_nameh](jQ)}(hj7 h]hget_name}hj9 sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj5 h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj5 h&hh'h]h)Kubeh}(h]j0 ah](jpjqeh]h]h!]jujvjwjijx CD.get_namejyjvCDget_namej{ CD.get_name()uh%j8h'h]h)Khj2 h&hubj~)}(hhh](hv)}(hhh](hz)}(h(:sl:`the system name of the cdrom drive`h]h)}(hjc h]h"the system name of the cdrom drive}hje sbah}(h]h]hah]h]h!]uh%hhja ubah}(h]h]h]h]h!]uh%h)hKhj^ h&hh'h]h)Kubhz)}(h:sg:`get_name() -> name`h]h)}(hjz h]hget_name() -> name}hj| sbah}(h]h]jah]h]h!]uh%hhjx ubah}(h]h]h]h]h!]uh%h)hKhj^ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj[ h&hh'h]h)Kubh)}(hReturn the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized ``CD``.h](hReturn the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj[ h&hubh )}(h## CD.get_name ##h]h## CD.get_name ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj[ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hj2 h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/#get_busy() (pygame.cdrom.CD method)pygame.cdrom.CD.get_busyhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_busyh](jQ)}(hj h]hget_busy}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj h&hh'h]h)Kubeh}(h]j ah](jpjqeh]h]h!]jujvjwjijx CD.get_busyjyjvCDget_busyj{ CD.get_busy()uh%j8h'h]h)Khj h&hubj~)}(hhh](hv)}(hhh](hz)}(h(:sl:`true if the drive is playing audio`h]h)}(hj h]h"true if the drive is playing audio}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_busy() -> bool`h]h)}(hj' h]hget_busy() -> bool}hj) sbah}(h]h]jah]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h2Returns True if the drive busy playing back audio.h]h2Returns True if the drive busy playing back audio.}hjB sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_busy ##h]h## CD.get_busy ##}hjP sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjg jjh jjh jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/%get_paused() (pygame.cdrom.CD method)pygame.cdrom.CD.get_pausedhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(h get_pausedh](jQ)}(hj h]h get_paused}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj} h&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj} h&hh'h]h)Kubeh}(h]jx ah](jpjqeh]h]h!]jujvjwjijx CD.get_pausedjyjvCD get_pausedj{CD.get_paused()uh%j8h'h]h)Khjz h&hubj~)}(hhh](hv)}(hhh](hz)}(h!:sl:`true if the drive is paused`h]h)}(hj h]htrue if the drive is paused}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_paused() -> bool`h]h)}(hj h]hget_paused() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h.Returns True if the drive is currently paused.h]h.Returns True if the drive is currently paused.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_paused ##h]h## CD.get_paused ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjz h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/&get_current() (pygame.cdrom.CD method)pygame.cdrom.CD.get_currenthNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(h get_currenth](jQ)}(hjh]h get_current}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Kubeh}(h]jah](jpjqeh]h]h!]jujvjwjijxCD.get_currentjyjvCD get_currentj{CD.get_current()uh%j8h'h]h)Khjh&hubj~)}(hhh](hv)}(hhh](hz)}(h):sl:`the current audio playback position`h]h)}(hjFh]h#the current audio playback position}hjHsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Kubhz)}(h%:sg:`get_current() -> track, seconds`h]h)}(hj]h]hget_current() -> track, seconds}hj_sbah}(h]h]jah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj>h&hh'h]h)Kubh)}(htReturns both the current track and time of that track. This method works when the drive is either playing or paused.h]htReturns both the current track and time of that track. This method works when the drive is either playing or paused.}hjxsbah}(h]h]h]h]h!]uh%hh'h]h)Khj>h&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Track numbers start at zero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj>h&hubh )}(h## CD.get_current ##h]h## CD.get_current ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj>h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/$get_empty() (pygame.cdrom.CD method)pygame.cdrom.CD.get_emptyhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(h get_emptyh](jQ)}(hjh]h get_empty}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Kubeh}(h]jah](jpjqeh]h]h!]jujvjwjijx CD.get_emptyjyjvCD get_emptyj{CD.get_empty()uh%j8h'h]h)Khjh&hubj~)}(hhh](hv)}(hhh](hz)}(h&:sl:`False if a cdrom is in the drive`h]h)}(hjh]h False if a cdrom is in the drive}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_empty() -> bool`h]h)}(hjh]hget_empty() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(heReturn False if there is a cdrom currently in the drive. If the drive is empty this will return True.h]heReturn False if there is a cdrom currently in the drive. If the drive is empty this will return True.}hj3sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## CD.get_empty ##h]h## CD.get_empty ##}hjAsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjXjjYjjYjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/(get_numtracks() (pygame.cdrom.CD method)pygame.cdrom.CD.get_numtrackshNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(h get_numtracksh](jQ)}(hjph]h get_numtracks}hjrsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjnh&hh'h]h)Kubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjnh&hh'h]h)Kubeh}(h]jiah](jpjqeh]h]h!]jujvjwjijxCD.get_numtracksjyjvCD get_numtracksj{CD.get_numtracks()uh%j8h'h]h)Khjkh&hubj~)}(hhh](hv)}(hhh](hz)}(h':sl:`the number of tracks on the cdrom`h]h)}(hjh]h!the number of tracks on the cdrom}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_numtracks() -> count`h]h)}(hjh]hget_numtracks() -> count}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(htReturn the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks.h]htReturn the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## CD.get_numtracks ##h]h## CD.get_numtracks ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j}hjkh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/*get_track_audio() (pygame.cdrom.CD method)pygame.cdrom.CD.get_track_audiohNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_track_audioh](jQ)}(hj h]hget_track_audio}hj sbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj h&hh'h]h)Mubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj h&hh'h]h)Mubeh}(h]jah](jpjqeh]h]h!]jujvjwjijxCD.get_track_audiojyjvCDget_track_audioj{CD.get_track_audio()uh%j8h'h]h)Mhjh&hubj~)}(hhh](hv)}(hhh](hz)}(h,:sl:`true if the cdrom track has audio data`h]h)}(hj7h]h&true if the cdrom track has audio data}hj9sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Mubhz)}(h$:sg:`get_track_audio(track) -> bool`h]h)}(hjNh]hget_track_audio(track) -> bool}hjPsbah}(h]h]jah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)Mubh)}(hDetermine if a track on a cdrom contains audio data. You can also call ``CD.num_tracks()`` and ``CD.get_all()`` to determine more information about the cdrom.h](hGDetermine if a track on a cdrom contains audio data. You can also call }hjisbh;)}(h``CD.num_tracks()``h]hCD.num_tracks()}hjqsbah}(h]h]h]h]h!]uh%h:hjiubh and }hjisbh;)}(h``CD.get_all()``h]h CD.get_all()}hjsbah}(h]h]h]h]h!]uh%h:hjiubh/ to determine more information about the cdrom.}hjisbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj/h&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Track numbers start at zero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M hj/h&hubh )}(h## CD.get_track_audio ##h]h## CD.get_track_audio ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj/h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/"get_all() (pygame.cdrom.CD method)pygame.cdrom.CD.get_allhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_allh](jQ)}(hjh]hget_all}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Mubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Mubeh}(h]jah](jpjqeh]h]h!]jujvjwjijx CD.get_alljyjvCDget_allj{ CD.get_all()uh%j8h'h]h)Mhjh&hubj~)}(hhh](hv)}(hhh](hz)}(h:sl:`get all track information`h]h)}(hjh]hget all track information}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h5:sg:`get_all() -> [(audio, start, end, length), ...]`h]h)}(hj-h]h/get_all() -> [(audio, start, end, length), ...]}hj/sbah}(h]h]jah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hX0Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc.h]hX0Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc.}hjHsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## CD.get_all ##h]h## CD.get_all ##}hjVsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjmjjnjjnjjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/*get_track_start() (pygame.cdrom.CD method)pygame.cdrom.CD.get_track_starthNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_track_starth](jQ)}(hjh]hget_track_start}hjsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhjh&hh'h]h)Mubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahjh&hh'h]h)Mubeh}(h]j~ah](jpjqeh]h]h!]jujvjwjijxCD.get_track_startjyjvCDget_track_startj{CD.get_track_start()uh%j8h'h]h)Mhjh&hubj~)}(hhh](hv)}(hhh](hz)}(h!:sl:`start time of a cdrom track`h]h)}(hjh]hstart time of a cdrom track}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h':sg:`get_track_start(track) -> seconds`h]h)}(hjh]h!get_track_start(track) -> seconds}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hFReturn the absolute time in seconds where at start of the cdrom track.h]hFReturn the absolute time in seconds where at start of the cdrom track.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Track numbers start at zero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M"hjh&hubh )}(h## CD.get_track_start ##h]h## CD.get_track_start ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M%ubeh}(h]h]h]h]h!]uh%j}hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj(jj)jj)jjjjjjjuh%j3h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/+get_track_length() (pygame.cdrom.CD method) pygame.cdrom.CD.get_track_lengthhNtauh%hdhjh&hh'Nh)Nubj4)}(hhh](j9)}(hget_track_lengthh](jQ)}(hj@h]hget_track_length}hjBsbah}(h]h](j\j]eh]h]h!]h#h$uh%jPhj>h&hh'h]h)M'ubjb)}(h()h]h}(h]h]h]h]h!]h#h$uh%jahj>h&hh'h]h)M'ubeh}(h]j9ah](jpjqeh]h]h!]jujvjwjijxCD.get_track_lengthjyjvCDget_track_lengthj{CD.get_track_length()uh%j8h'h]h)M'hj;h&hubj~)}(hhh](hv)}(hhh](hz)}(h:sl:`length of a cdrom track`h]h)}(hjlh]hlength of a cdrom track}hjnsbah}(h]h]hah]h]h!]uh%hhjjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)M)ubhz)}(h(:sg:`get_track_length(track) -> seconds`h]h)}(hjh]h"get_track_length(track) -> seconds}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)M*ubeh}(h]h]h]h]h!]uh%huhjdh&hh'h]h)M)ubh)}(hJReturn a floating point value in seconds of the length of the cdrom track.h]hJReturn a floating point value in seconds of the length of the cdrom track.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M,hjdh&hubh)}(hLNote, track 0 is the first track on the ``CD``. Track numbers start at zero.h](h(Note, track 0 is the first track on the }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Track numbers start at zero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M/hjdh&hubh )}(h## CD.get_track_length ##h]h## CD.get_track_length ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjdh&hh'h]h)M2ubeh}(h]h]h]h]h!]uh%j}hj;h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%j3h&hhjh'Nh)Nubh )}(h## pygame.cdrom.CD ##h]h## pygame.cdrom.CD ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M4ubeh}(h]h]h]h]h!]uh%j}hjdh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%j3h&hhh,h'Nh)Nubh )}(h## pygame.cdrom ##h]h## pygame.cdrom ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M6ubeh}(h](hs pygame-cdromeh]h] pygame.cdromah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjDerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjhhu nametypes}(jhˈuh}(jh,hsh)}(hhh]h}(h]hsah]h]h]h!]ismoduh%hh'h]h)Khh,h&hubhhj1j:j,j1jjjjjbjgjijnj6j;jjjjjjj& j+ j j j j jq jv j0 j5 j j jx j} jjjjjijnjj jjj~jj9j>u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/cdrom.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612173.896141 pygame-2.6.1/docs/generated/doctrees/ref/color.doctree0000644000175100001770000020767514676242416022403 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.Color`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.Color}hh Color`h]h)}(hhh]hColor(r, g, b) -> Color}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h$:sg:`Color(r, g, b, a=255) -> Color`h]h)}(hhh]hColor(r, g, b, a=255) -> Color}hhsbah}(h]h]hah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h!:sg:`Color(color_value) -> Color`h]h)}(hj h]hColor(color_value) -> Color}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hX`The ``Color`` class represents ``RGBA`` color values using a value range of 0 to 255 inclusive. It allows basic arithmetic operations — binary operations ``+``, ``-``, ``*``, ``//``, ``%``, and unary operation ``~`` — to create new colors, supports conversions to other color spaces such as ``HSV`` or ``HSL`` and lets you adjust single color channels. Alpha defaults to 255 (fully opaque) when not given. The arithmetic operations and ``correct_gamma()`` method preserve subclasses. For the binary operators, the class of the returned color is that of the left hand color object of the operator.h](hThe }hj&sbh;)}(h ``Color``h]hColor}hj.sbah}(h]h]h]h]h!]uh%h:hj&ubh class represents }hj&sbh;)}(h``RGBA``h]hRGBA}hj@sbah}(h]h]h]h]h!]uh%h:hj&ubhy color values using a value range of 0 to 255 inclusive. It allows basic arithmetic operations — binary operations }hj&sbh;)}(h``+``h]h+}hjRsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``-``h]h-}hjdsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``*``h]h*}hjvsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``//``h]h//}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``%``h]h%}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh, and unary operation }hj&sbh;)}(h``~``h]h~}hjsbah}(h]h]h]h]h!]uh%h:hj&ubhR — to create new colors, supports conversions to other color spaces such as }hj&sbh;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh or }hj&sbh;)}(h``HSL``h]hHSL}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh and lets you adjust single color channels. Alpha defaults to 255 (fully opaque) when not given. The arithmetic operations and }hj&sbh;)}(h``correct_gamma()``h]hcorrect_gamma()}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh method preserve subclasses. For the binary operators, the class of the returned color is that of the left hand color object of the operator.}hj&sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hColor objects support equality comparison with other color objects and 3 or 4 element tuples of integers. There was a bug in pygame 1.8.1 where the default alpha was 0, not 255 like previously.h]hColor objects support equality comparison with other color objects and 3 or 4 element tuples of integers. There was a bug in pygame 1.8.1 where the default alpha was 0, not 255 like previously.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hXColor objects export the C level array interface. The interface exports a read-only one dimensional unsigned byte array of the same assigned length as the color. The new buffer interface is also exported, with the same characteristics as the array interface.h]hXColor objects export the C level array interface. The interface exports a read-only one dimensional unsigned byte array of the same assigned length as the color. The new buffer interface is also exported, with the same characteristics as the array interface.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hThe floor division, ``//``, and modulus, ``%``, operators do not raise an exception for division by zero. Instead, if a color, or alpha, channel in the right hand color is 0, then the result is 0. For example: ::h](hThe floor division, }hjsbh;)}(h``//``h]h//}hjsbah}(h]h]h]h]h!]uh%h:hjubh, and modulus, }hjsbh;)}(h``%``h]h%}hj0sbah}(h]h]h]h]h!]uh%h:hjubh, operators do not raise an exception for division by zero. Instead, if a color, or alpha, channel in the right hand color is 0, then the result is 0. For example:}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)K"hhh&hubh literal_block)}(h# These expressions are True Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)h]h# These expressions are True Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)}hjJsbah}(h]h]h]h]h!]h#h$uh%jHh'h]h)K&hhh&hubj%)}(hX[Use ``int(color)`` to return the immutable integer value of the color, usable as a ``dict`` key. This integer value differs from the mapped pixel values of :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` and :meth:`pygame.Surface.unmap_rgb`. It can be passed as a ``color_value`` argument to :class:`Color` (useful with sets).h](hUse }hjXsbh;)}(h``int(color)``h]h int(color)}hj`sbah}(h]h]h]h]h!]uh%h:hjXubhA to return the immutable integer value of the color, usable as a }hjXsbh;)}(h``dict``h]hdict}hjrsbah}(h]h]h]h]h!]uh%h:hjXubhA key. This integer value differs from the mapped pixel values of }hjXsbh6)}(h$:meth:`pygame.Surface.get_at_mapped`h]h;)}(hjh]hpygame.Surface.get_at_mapped()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.get_at_mappeduh%h5h'h]h)K*hjXubh, }hjXsbh6)}(h:meth:`pygame.Surface.map_rgb`h]h;)}(hjh]hpygame.Surface.map_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.map_rgbuh%h5h'h]h)K*hjXubh and }hjXsbh6)}(h :meth:`pygame.Surface.unmap_rgb`h]h;)}(hjh]hpygame.Surface.unmap_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.unmap_rgbuh%h5h'h]h)K*hjXubh. It can be passed as a }hjXsbh;)}(h``color_value``h]h color_value}hjsbah}(h]h]h]h]h!]uh%h:hjXubh argument to }hjXsbh6)}(h:class:`Color`h]h;)}(hjh]hColor}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K*hjXubh (useful with sets).}hjXsbeh}(h]h]h]h]h!]uh%j$h'h]h)K*hhh&hubj%)}(h@See :doc:`color_list` for samples of the available named colors.h](hSee }hj,sbh6)}(h:doc:`color_list`h]h)}(hj6h]h color_list}hj8sbah}(h]h](hFstdstd-doceh]h]h!]uh%hhj4ubah}(h]h]h]h]h!]refdochS refdomainjBreftypedoc refexplicitrefwarnh[ color_listuh%h5h'h]h)K1hj,ubh+ for samples of the available named colors.}hj,sbeh}(h]h]h]h]h!]uh%j$h'h]h)K1hhh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjjsbah}(h]h]h]h]h!]uh%jhhjeh'h]h)Kubh field_body)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]j%)}(h7r (int) -- red value in the range of 0 to 255 inclusiveh](hliteral_strong)}(hrh]hr}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]hliteral_emphasis)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypeh reftargetj refspecific py:modulehpy:classh~uh%h5hjubh)}hjsbh -- }hjsbh,red value in the range of 0 to 255 inclusive}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]j%)}(h9g (int) -- green value in the range of 0 to 255 inclusiveh](j)}(hgh]hg}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubh)}hjsbh -- }hjsbh.green value in the range of 0 to 255 inclusive}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]j%)}(h8b (int) -- blue value in the range of 0 to 255 inclusiveh](j)}(hbh]hb}hj+sbah}(h]h]h]h]h!]uh%jhj'ubh (}hj'sbh6)}(hhh]j)}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjBjjhjh~uh%h5hj'ubh)}hj'sbh -- }hj'sbh-blue value in the range of 0 to 255 inclusive}(hj'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hj$ubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]j%)}(hTa (int) -- (optional) alpha value in the range of 0 to 255 inclusive, default is 255h](j)}(hah]ha}hjwsbah}(h]h]h]h]h!]uh%jhjsubh (}hjssbh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjsubh)}hjssbh -- }hjssbhI(optional) alpha value in the range of 0 to 255 inclusive, default is 255}(hjsh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjpubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]j%)}(hXcolor_value (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int])) -- color value (see note below for the supported formats)Supported color_value formats: - Color object: clones the given Color object - Color name: str: name of the color to use, e.g. 'red' (all the supported name strings can be found in the color_list, with sample swatches) - HTML color format str: '#rrggbbaa' or '#rrggbb', where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided - hex number str: '0xrrggbbaa' or '0xrrggbb', where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided - int: int value of the color to use, using hex numbers can make this parameter more readable, e.g. 0xrrggbbaa, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided - tuple/list of int color values: (R, G, B, A) or (R, G, B), where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not providedh](j)}(h color_valueh]h color_value}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hstrh]hstr}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj*sbah}(h]h]h]h]h!]uh%jhj'ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj,jjhjh~uh%h5hjubj)}(h or h]h or }hjBsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(htupleh]htuple}hjSsbah}(h]h]h]h]h!]uh%jhjPubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjUjjhjh~uh%h5hjubj)}(h(h]h(}hjksbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj|sbah}(h]h]h]h]h!]uh%jhjyubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj~jjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h]h]h]}hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h) or h]h) or }hj+sbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hlisth]hlist}hj<sbah}(h]h]h]h]h!]uh%jhj9ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj>jjhjh~uh%h5hjubj)}(hjmh]h(}hjTsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjdsbah}(h]h]h]h]h!]uh%jhjaubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjfjjhjh~uh%h5hjubj)}(h, h]h, }hj|sbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubj)}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h)h]h)}hjsbah}(h]h]h]h]h!]uh%jhjubh)}hjsbh -- }hjsbj%)}(h6color value (see note below for the supported formats)h]h6color value (see note below for the supported formats)}hj'sbah}(h]h]h]h]h!]uh%j$h'h]h)K8hjh&hubh note)}(hXSupported ``color_value`` formats: | - **Color object:** clones the given :class:`Color` object | - **Color name: str:** name of the color to use, e.g. ``'red'`` (all the supported name strings can be found in the :doc:`color_list`, with sample swatches) | - **HTML color format str:** ``'#rrggbbaa'`` or ``'#rrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **hex number str:** ``'0xrrggbbaa'`` or ``'0xrrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **int:** int value of the color to use, using hex numbers can make this parameter more readable, e.g. ``0xrrggbbaa``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided | - **tuple/list of int color values:** ``(R, G, B, A)`` or ``(R, G, B)``, where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not providedh]h definition_list)}(hhh]h definition_list_item)}(hXSupported ``color_value`` formats: | - **Color object:** clones the given :class:`Color` object | - **Color name: str:** name of the color to use, e.g. ``'red'`` (all the supported name strings can be found in the :doc:`color_list`, with sample swatches) | - **HTML color format str:** ``'#rrggbbaa'`` or ``'#rrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **hex number str:** ``'0xrrggbbaa'`` or ``'0xrrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **int:** int value of the color to use, using hex numbers can make this parameter more readable, e.g. ``0xrrggbbaa``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided | - **tuple/list of int color values:** ``(R, G, B, A)`` or ``(R, G, B)``, where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not providedh](h term)}(h"Supported ``color_value`` formats:h](h Supported }hjHsbh;)}(h``color_value``h]h color_value}hjPsbah}(h]h]h]h]h!]uh%h:hjHubh formats:}hjHsbeh}(h]h]h]h]h!]uh%jFh'h]h)K;hjBubh definition)}(hhh]h)}(hhh](h)}(h:- **Color object:** clones the given :class:`Color` objecth](h- }hjpsbh strong)}(h**Color object:**h]h Color object:}hjzsbah}(h]h]h]h]h!]uh%jxhjpubh clones the given }hjpsbh6)}(h:class:`Color`h]h;)}(hjh]hColor}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K int`h]h)}(hj h]hr -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kaubj%)}(hThe red value of the Color.h]hThe red value of the Color.}hj/ sbah}(h]h]h]h]h!]uh%j$h'h]h)Kdhj h&hubh )}(h ## Color.r ##h]h ## Color.r ##}hj= sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]domainjT objtypejU desctypejU no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqg (pygame.Color attribute)pygame.Color.ghNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hjh]h)}(hjh]hg}hjw sbah}(h]h](hheh]h]h!]h#h$uh%hhjt h&hh'h]h)Khubah}(h]jo ah](hheh]h]h!]hhhh~hColor.ghhColorjhj uh%hzh'h]h)Khhjq h&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`Gets or sets the green value of the Color.`h]h)}(hj h]h*Gets or sets the green value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kjubh)}(h:sg:`g -> int`h]h)}(hj h]hg -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kjubj%)}(hThe green value of the Color.h]hThe green value of the Color.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Kmhj h&hubh )}(h ## Color.g ##h]h ## Color.g ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Koubeh}(h]h]h]h]h!]uh%hhjq h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY j jZ j j[ j j\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqb (pygame.Color attribute)pygame.Color.bhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hj-h]h)}(hj-h]hb}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kqubah}(h]j ah](hheh]h]h!]hhhh~hColor.bhhColorj-hj uh%hzh'h]h)Kqhj h&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`Gets or sets the blue value of the Color.`h]h)}(hj# h]h)Gets or sets the blue value of the Color.}hj% sbah}(h]h]hah]h]h!]uh%hhj! ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Ksubh)}(h:sg:`b -> int`h]h)}(hj: h]hb -> int}hj< sbah}(h]h]hah]h]h!]uh%hhj8 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Ktubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Ksubj%)}(hThe blue value of the Color.h]hThe blue value of the Color.}hjU sbah}(h]h]h]h]h!]uh%j$h'h]h)Kvhj h&hubh )}(h ## Color.b ##h]h ## Color.b ##}hjc sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY jz jZ j{ j[ j{ j\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqa (pygame.Color attribute)pygame.Color.ahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hjyh]h)}(hjyh]ha}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kzubah}(h]j ah](hheh]h]h!]hhhh~hColor.ahhColorjyhj uh%hzh'h]h)Kzhj h&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`Gets or sets the alpha value of the Color.`h]h)}(hj h]h*Gets or sets the alpha value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K|ubh)}(h:sg:`a -> int`h]h)}(hj h]ha -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K}ubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)K|ubj%)}(hThe alpha value of the Color.h]hThe alpha value of the Color.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj h&hubh )}(h ## Color.a ##h]h ## Color.a ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY j jZ j j[ j j\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqcmy (pygame.Color attribute)pygame.Color.cmyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcmyh]h)}(hj h]hcmy}hj" sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubah}(h]j ah](hheh]h]h!]hhhh~h Color.cmyhhColorcmyhj5 uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h7:sl:`Gets or sets the CMY representation of the Color.`h]h)}(hjA h]h1Gets or sets the CMY representation of the Color.}hjC sbah}(h]h]hah]h]h!]uh%hhj? ubah}(h]h]h]h]h!]uh%h)hKhj< h&hh'h]h)Kubh)}(h:sg:`cmy -> tuple`h]h)}(hjX h]h cmy -> tuple}hjZ sbah}(h]h]hah]h]h!]uh%hhjV ubah}(h]h]h]h]h!]uh%h)hKhj< h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj9 h&hh'h]h)Kubj%)}(hXThe ``CMY`` representation of the Color. The ``CMY`` components are in the ranges ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Note that this will not return the absolutely exact ``CMY`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``CMY`` mapping from 0-1 rounding errors may cause the ``CMY`` values to differ slightly from what you might expect.h](hThe }hjs sbh;)}(h``CMY``h]hCMY}hj{ sbah}(h]h]h]h]h!]uh%h:hjs ubh" representation of the Color. The }hjs sbh;)}(h``CMY``h]hCMY}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh components are in the ranges }hjs sbh;)}(h``C``h]hC}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh = [0, 1], }hjs sbh;)}(h``M``h]hM}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh = [0, 1], }hjs sbh;)}(h``Y``h]hY}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh? = [0, 1]. Note that this will not return the absolutely exact }hjs sbh;)}(h``CMY``h]hCMY}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh values for the set }hjs sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh! values in all cases. Due to the }hjs sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh mapping from 0-255 and the }hjs sbh;)}(h``CMY``h]hCMY}hj sbah}(h]h]h]h]h!]uh%h:hjs ubh0 mapping from 0-1 rounding errors may cause the }hjs sbh;)}(h``CMY``h]hCMY}hjsbah}(h]h]h]h]h!]uh%h:hjs ubh6 values to differ slightly from what you might expect.}hjs sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj9 h&hubh )}(h## Color.cmy ##h]h## Color.cmy ##}hj5sbah}(h]h]h]h]h!]h#h$uh%h hj9 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY jLjZ jMj[ jMj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqhsva (pygame.Color attribute)pygame.Color.hsvahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hhsvah]h)}(hjdh]hhsva}hjfsbah}(h]h](hheh]h]h!]h#h$uh%hhjbh&hh'h]h)Kubah}(h]j]ah](hheh]h]h!]hhhh~h Color.hsvahhColorhsvahjyuh%hzh'h]h)Khj_h&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`Gets or sets the HSVA representation of the Color.`h]h)}(hjh]h2Gets or sets the HSVA representation of the Color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`hsva -> tuple`h]h)}(hjh]h hsva -> tuple}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj}h&hh'h]h)Kubj%)}(hXThe ``HSVA`` representation of the Color. The ``HSVA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSV`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSV`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSV`` values to differ slightly from what you might expect.h](hThe }hjsbh;)}(h``HSVA``h]hHSVA}hjsbah}(h]h]h]h]h!]uh%h:hjubh" representation of the Color. The }hjsbh;)}(h``HSVA``h]hHSVA}hjsbah}(h]h]h]h]h!]uh%h:hjubh components are in the ranges }hjsbh;)}(h``H``h]hH}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 360], }hjsbh;)}(h``S``h]hS}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 100], }hjsbh;)}(h``V``h]hV}hjsbah}(h]h]h]h]h!]uh%h:hjubhO = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact }hjsbh;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hjubh values for the set }hjsbh;)}(h``RGB``h]hRGB}hj+sbah}(h]h]h]h]h!]uh%h:hjubh! values in all cases. Due to the }hjsbh;)}(h``RGB``h]hRGB}hj=sbah}(h]h]h]h]h!]uh%h:hjubh mapping from 0-255 and the }hjsbh;)}(h``HSV``h]hHSV}hjOsbah}(h]h]h]h]h!]uh%h:hjubh< mapping from 0-100 and 0-360 rounding errors may cause the }hjsbh;)}(h``HSV``h]hHSV}hjasbah}(h]h]h]h]h!]uh%h:hjubh6 values to differ slightly from what you might expect.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj}h&hubh )}(h## Color.hsva ##h]h## Color.hsva ##}hjysbah}(h]h]h]h]h!]h#h$uh%h hj}h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj_h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqhsla (pygame.Color attribute)pygame.Color.hslahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hhslah]h)}(hjh]hhsla}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~h Color.hslahhColorhslahjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`Gets or sets the HSLA representation of the Color.`h]h)}(hjh]h2Gets or sets the HSLA representation of the Color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`hsla -> tuple`h]h)}(hjh]h hsla -> tuple}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hXThe ``HSLA`` representation of the Color. The ``HSLA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSL`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSL`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSL`` values to differ slightly from what you might expect.h](hThe }hjsbh;)}(h``HSLA``h]hHSLA}hjsbah}(h]h]h]h]h!]uh%h:hjubh" representation of the Color. The }hjsbh;)}(h``HSLA``h]hHSLA}hjsbah}(h]h]h]h]h!]uh%h:hjubh components are in the ranges }hjsbh;)}(h``H``h]hH}hj'sbah}(h]h]h]h]h!]uh%h:hjubh = [0, 360], }hjsbh;)}(h``S``h]hS}hj9sbah}(h]h]h]h]h!]uh%h:hjubh = [0, 100], }hjsbh;)}(h``L``h]hL}hjKsbah}(h]h]h]h]h!]uh%h:hjubhO = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact }hjsbh;)}(h``HSL``h]hHSL}hj]sbah}(h]h]h]h]h!]uh%h:hjubh values for the set }hjsbh;)}(h``RGB``h]hRGB}hjosbah}(h]h]h]h]h!]uh%h:hjubh! values in all cases. Due to the }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh mapping from 0-255 and the }hjsbh;)}(h``HSL``h]hHSL}hjsbah}(h]h]h]h]h!]uh%h:hjubh< mapping from 0-100 and 0-360 rounding errors may cause the }hjsbh;)}(h``HSL``h]hHSL}hjsbah}(h]h]h]h]h!]uh%h:hjubh6 values to differ slightly from what you might expect.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.hsla ##h]h## Color.hsla ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqi1i2i3 (pygame.Color attribute)pygame.Color.i1i2i3hNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hi1i2i3h]h)}(hjh]hi1i2i3}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~h Color.i1i2i3hhColori1i2i3hjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h::sl:`Gets or sets the I1I2I3 representation of the Color.`h]h)}(hj h]h4Gets or sets the I1I2I3 representation of the Color.}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`i1i2i3 -> tuple`h]h)}(hj$h]hi1i2i3 -> tuple}hj&sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hXThe ``I1I2I3`` representation of the Color. The ``I1I2I3`` components are in the ranges ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Note that this will not return the absolutely exact ``I1I2I3`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``I1I2I3`` mapping from 0-1 rounding errors may cause the ``I1I2I3`` values to differ slightly from what you might expect.h](hThe }hj?sbh;)}(h ``I1I2I3``h]hI1I2I3}hjGsbah}(h]h]h]h]h!]uh%h:hj?ubh" representation of the Color. The }hj?sbh;)}(h ``I1I2I3``h]hI1I2I3}hjYsbah}(h]h]h]h]h!]uh%h:hj?ubh components are in the ranges }hj?sbh;)}(h``I1``h]hI1}hjksbah}(h]h]h]h]h!]uh%h:hj?ubh = [0, 1], }hj?sbh;)}(h``I2``h]hI2}hj}sbah}(h]h]h]h]h!]uh%h:hj?ubh = [-0.5, 0.5], }hj?sbh;)}(h``I3``h]hI3}hjsbah}(h]h]h]h]h!]uh%h:hj?ubhD = [-0.5, 0.5]. Note that this will not return the absolutely exact }hj?sbh;)}(h ``I1I2I3``h]hI1I2I3}hjsbah}(h]h]h]h]h!]uh%h:hj?ubh values for the set }hj?sbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hj?ubh! values in all cases. Due to the }hj?sbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hj?ubh mapping from 0-255 and the }hj?sbh;)}(h ``I1I2I3``h]hI1I2I3}hjsbah}(h]h]h]h]h!]uh%h:hj?ubh0 mapping from 0-1 rounding errors may cause the }hj?sbh;)}(h ``I1I2I3``h]hI1I2I3}hjsbah}(h]h]h]h]h!]uh%h:hj?ubh6 values to differ slightly from what you might expect.}hj?sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.i1i2i3 ##h]h## Color.i1i2i3 ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!normalize() (pygame.Color method)pygame.Color.normalizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h normalizeh](h)}(hj0h]h normalize}hj2sbah}(h]h](hheh]h]h!]h#h$uh%hhj.h&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hj.h&hh'h]h)Kubeh}(h]j)ah](hheh]h]h!]hhhh~hColor.normalizehhColor normalizehColor.normalize()uh%hzh'h]h)Khj+h&hubh)}(hhh](h)}(hhh](h)}(h6:sl:`Returns the normalized RGBA values of the Color.`h]h)}(hj^h]h0Returns the normalized RGBA values of the Color.}hj`sbah}(h]h]hah]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%h)hKhjYh&hh'h]h)Kubh)}(h:sg:`normalize() -> tuple`h]h)}(hjuh]hnormalize() -> tuple}hjwsbah}(h]h]hah]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%h)hKhjYh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjVh&hh'h]h)Kubj%)}(hMReturns the normalized ``RGBA`` values of the Color as floating point values.h](hReturns the normalized }hjsbh;)}(h``RGBA``h]hRGBA}hjsbah}(h]h]h]h]h!]uh%h:hjubh. values of the Color as floating point values.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)KhjVh&hubh )}(h## Color.normalize ##h]h## Color.normalize ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjVh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj+h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%correct_gamma() (pygame.Color method)pygame.Color.correct_gammahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h correct_gammah](h)}(hjh]h correct_gamma}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.correct_gammahhColor correct_gammahColor.correct_gamma()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`Applies a certain gamma value to the Color.`h]h)}(hj h]h+Applies a certain gamma value to the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h$:sg:`correct_gamma (gamma) -> Color`h]h)}(hj"h]hcorrect_gamma (gamma) -> Color}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(heApplies a certain gamma value to the Color and returns a new Color with the adjusted ``RGBA`` values.h](hUApplies a certain gamma value to the Color and returns a new Color with the adjusted }hj=sbh;)}(h``RGBA``h]hRGBA}hjEsbah}(h]h]h]h]h!]uh%h:hj=ubh values.}hj=sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.correct_gamma ##h]h## Color.correct_gamma ##}hj]sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jtjZ juj[ juj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"set_length() (pygame.Color method)pygame.Color.set_lengthhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_lengthh](h)}(hjh]h set_length}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.set_lengthhhColor set_lengthhColor.set_length()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h=:sl:`Set the number of elements in the Color to 1,2,3, or 4.`h]h)}(hjh]h7Set the number of elements in the Color to 1,2,3, or 4.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`set_length(len) -> None`h]h)}(hjh]hset_length(len) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hDEPRECATED: You may unpack the values you need like so, ``r, g, b, _ = pygame.Color(100, 100, 100)`` If you only want r, g and b Or ``r, g, *_ = pygame.Color(100, 100, 100)`` if you only want r and gh](h8DEPRECATED: You may unpack the values you need like so, }hjsbh;)}(h,``r, g, b, _ = pygame.Color(100, 100, 100)``h]h(r, g, b, _ = pygame.Color(100, 100, 100)}hjsbah}(h]h]h]h]h!]uh%h:hjubh If you only want r, g and b Or }hjsbh;)}(h*``r, g, *_ = pygame.Color(100, 100, 100)``h]h&r, g, *_ = pygame.Color(100, 100, 100)}hjsbah}(h]h]h]h]h!]uh%h:hjubh if you only want r and g}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubj%)}(hThe default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do ``len(acolor)``.h](hThe default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do }hjsbh;)}(h``len(acolor)``h]h len(acolor)}hj$sbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubj )}(hDeprecated since pygame 2.1.3.h]j%)}(hDeprecated since pygame 2.1.3.h]h)}(hDeprecated since pygame 2.1.3.h]hDeprecated since pygame 2.1.3.}hjDsbah}(h]h](j deprecatedeh]h]h!]uh%hhj@ubah}(h]h]h]h]h!] translatableuh%j$hj<h&hh'h]h)Kubah}(h]h]h]h]h!]jL deprecatedjN 2.1.3uh%j h&hh'h]h)Khjubj )}(hNew in pygame 1.9.0.h]j%)}(hNew in pygame 1.9.0.h]h)}(hNew in pygame 1.9.0.h]hNew in pygame 1.9.0.}hjjsbah}(h]h](j addedeh]h]h!]uh%hhjfubah}(h]h]h]h]h!] translatableuh%j$hjbh&hh'h]h)Kubah}(h]h]h]h]h!]jL versionaddedjN 1.9.0uh%j h&hh'h]h)Khjubh )}(h## Color.set_length ##h]h## Color.set_length ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!grayscale() (pygame.Color method)pygame.Color.grayscalehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h grayscaleh](h)}(hjh]h grayscale}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.grayscalehhColor grayscalehColor.grayscale()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h&:sl:`returns the grayscale of a Color`h]h)}(hjh]h returns the grayscale of a Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`grayscale() -> Color`h]h)}(hjh]hgrayscale() -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hReturns a Color which represents the grayscaled version of self using the luminosity formula which weights red, green and blue according to their wavelengths..h]hReturns a Color which represents the grayscaled version of self using the luminosity formula which weights red, green and blue according to their wavelengths..}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.grayscale ##h]h## Color.grayscale ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY j:jZ j;j[ j;j\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqlerp() (pygame.Color method)pygame.Color.lerphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hlerph](h)}(hjRh]hlerp}hjTsbah}(h]h](hheh]h]h!]h#h$uh%hhjPh&hh'h]h)Kubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjPh&hh'h]h)Kubeh}(h]jKah](hheh]h]h!]hhhh~h Color.lerphhColorlerph Color.lerp()uh%hzh'h]h)KhjMh&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`returns a linear interpolation to the given Color.`h]h)}(hj~h]h2returns a linear interpolation to the given Color.}hjsbah}(h]h]hah]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)Kubh)}(h!:sg:`lerp(Color, float) -> Color`h]h)}(hjh]hlerp(Color, float) -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjvh&hh'h]h)Kubj%)}(hXReturns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned.h]hXReturns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khjvh&hubj )}(hNew in pygame 2.0.1.h]j%)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjsbah}(h]h](j jueh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Kubah}(h]h]h]h]h!]jL versionaddedjN 2.0.1uh%j h&hh'h]h)Khjvubh )}(h## Color.lerp ##h]h## Color.lerp ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjvh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjMh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$premul_alpha() (pygame.Color method)pygame.Color.premul_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h premul_alphah](h)}(hjh]h premul_alpha}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjh&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~hColor.premul_alphahhColor premul_alphahColor.premul_alpha()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(hS:sl:`returns a Color where the r,g,b components have been multiplied by the alpha.`h]h)}(hj>h]hMreturns a Color where the r,g,b components have been multiplied by the alpha.}hj@sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Kubh)}(h:sg:`premul_alpha() -> Color`h]h)}(hjUh]hpremul_alpha() -> Color}hjWsbah}(h]h]hah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj6h&hh'h]h)Kubj%)}(hReturns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged.h]hReturns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged.}hjpsbah}(h]h]h]h]h!]uh%j$h'h]h)Mhj6h&hubj%)}(hThis is useful when working with the ``BLEND_PREMULTIPLIED`` blending mode flag for :meth:`pygame.Surface.blit()`, which assumes that all surfaces using it are using pre-multiplied alpha colors.h](h%This is useful when working with the }hj~sbh;)}(h``BLEND_PREMULTIPLIED``h]hBLEND_PREMULTIPLIED}hjsbah}(h]h]h]h]h!]uh%h:hj~ubh blending mode flag for }hj~sbh6)}(h:meth:`pygame.Surface.blit()`h]h;)}(hjh]hpygame.Surface.blit()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.blituh%h5h'h]h)Mhj~ubhQ, which assumes that all surfaces using it are using pre-multiplied alpha colors.}hj~sbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhj6h&hubj )}(hNew in pygame 2.0.0.h]j%)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](j jueh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)M ubah}(h]h]h]h]h!]jL versionaddedjN 2.0.0uh%j h&hh'h]h)M hj6ubh )}(h## Color.premul_alpha ##h]h## Color.premul_alpha ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj6h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqupdate() (pygame.Color method)pygame.Color.updatehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hupdateh](h)}(hjh]hupdate}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj@)}(h()h]h}(h]h]h]h]h!]h#h$uh%j?hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~h Color.updatehhColorupdatehColor.update()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h$:sl:`Sets the elements of the color`h]h)}(hjBh]hSets the elements of the color}hjDsbah}(h]h]hah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubh)}(h:sg:`update(r, g, b) -> None`h]h)}(hjYh]hupdate(r, g, b) -> None}hj[sbah}(h]h]hah]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubh)}(h$:sg:`update(r, g, b, a=255) -> None`h]h)}(hjph]hupdate(r, g, b, a=255) -> None}hjrsbah}(h]h]hah]h]h!]uh%hhjnubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubh)}(h!:sg:`update(color_value) -> None`h]h)}(hjh]hupdate(color_value) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj:h&hh'h]h)Mubj%)}(hSets the elements of the color. See parameters for :meth:`pygame.Color` for the parameters of this function. If the alpha value was not set it will not change.h](h3Sets the elements of the color. See parameters for }hjsbh6)}(h:meth:`pygame.Color`h]h;)}(hjh]hpygame.Color()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ pygame.Coloruh%h5h'h]h)MhjubhX for the parameters of this function. If the alpha value was not set it will not change.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhj:h&hubj )}(hNew in pygame 2.0.1.h]j%)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjsbah}(h]h](j jueh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Mubah}(h]h]h]h]h!]jL versionaddedjN 2.0.1uh%j h&hh'h]h)Mhj:ubh )}(h## Color.update ##h]h## Color.update ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jY jjZ jj[ jj\ j] j^ j_ j` ja jb uh%huh&hhhh'Nh)Nubh )}(h## pygame.Color ##h]h## pygame.Color ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](jclasseh]h]h!]jY jjZ j,j[ j,j\ j] j^ j_ j` ja jb uh%huh&hhh,h'Nh)Nubeh}(h] pygame-colorah]h] pygame.colorah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjberror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j5j2s nametypes}j5sh}(j2h,hsh|j j jo jt j j j j j j j]jbjjjjj)j.jjjjjjjKjPj jjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/color.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.241141 pygame-2.6.1/docs/generated/doctrees/ref/color_list.doctree0000644000175100001770000154634514676242416023437 0ustar00runnerdocker!sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h Named Colorsh]h Named Colors}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh' .aliceblue {background-color: #f0f8ff; color: #f0f8ff;} .antiquewhite {background-color: #faebd7; color: #faebd7;} .antiquewhite1 {background-color: #ffefdb; color: #ffefdb;} .antiquewhite2 {background-color: #eedfcc; color: #eedfcc;} .antiquewhite3 {background-color: #cdc0b0; color: #cdc0b0;} .antiquewhite4 {background-color: #8b8378; color: #8b8378;} .aqua {background-color: #00ffff; color: #00ffff;} .aquamarine {background-color: #7fffd4; color: #7fffd4;} .aquamarine1 {background-color: #7fffd4; color: #7fffd4;} .aquamarine2 {background-color: #76eec6; color: #76eec6;} .aquamarine3 {background-color: #66cdaa; color: #66cdaa;} .aquamarine4 {background-color: #458b74; color: #458b74;} .azure {background-color: #f0ffff; color: #f0ffff;} .azure1 {background-color: #f0ffff; color: #f0ffff;} .azure3 {background-color: #c1cdcd; color: #c1cdcd;} .azure2 {background-color: #e0eeee; color: #e0eeee;} .azure4 {background-color: #838b8b; color: #838b8b;} .beige {background-color: #f5f5dc; color: #f5f5dc;} .bisque {background-color: #ffe4c4; color: #ffe4c4;} .bisque1 {background-color: #ffe4c4; color: #ffe4c4;} .bisque2 {background-color: #eed5b7; color: #eed5b7;} .bisque3 {background-color: #cdb79e; color: #cdb79e;} .bisque4 {background-color: #8b7d6b; color: #8b7d6b;} .black {background-color: #000000; color: #000000;} .blanchedalmond {background-color: #ffebcd; color: #ffebcd;} .blue {background-color: #0000ff; color: #0000ff;} .blue1 {background-color: #0000ff; color: #0000ff;} .blue2 {background-color: #0000ee; color: #0000ee;} .blue3 {background-color: #0000cd; color: #0000cd;} .blue4 {background-color: #00008b; color: #00008b;} .blueviolet {background-color: #8a2be2; color: #8a2be2;} .brown {background-color: #a52a2a; color: #a52a2a;} .brown1 {background-color: #ff4040; color: #ff4040;} .brown2 {background-color: #ee3b3b; color: #ee3b3b;} .brown3 {background-color: #cd3333; color: #cd3333;} .brown4 {background-color: #8b2323; color: #8b2323;} .burlywood {background-color: #deb887; color: #deb887;} .burlywood1 {background-color: #ffd39b; color: #ffd39b;} .burlywood2 {background-color: #eec591; color: #eec591;} .burlywood3 {background-color: #cdaa7d; color: #cdaa7d;} .burlywood4 {background-color: #8b7355; color: #8b7355;} .cadetblue {background-color: #5f9ea0; color: #5f9ea0;} .cadetblue1 {background-color: #98f5ff; color: #98f5ff;} .cadetblue2 {background-color: #8ee5ee; color: #8ee5ee;} .cadetblue3 {background-color: #7ac5cd; color: #7ac5cd;} .cadetblue4 {background-color: #53868b; color: #53868b;} .chartreuse {background-color: #7fff00; color: #7fff00;} .chartreuse1 {background-color: #7fff00; color: #7fff00;} .chartreuse2 {background-color: #76ee00; color: #76ee00;} .chartreuse3 {background-color: #66cd00; color: #66cd00;} .chartreuse4 {background-color: #458b00; color: #458b00;} .chocolate {background-color: #d2691e; color: #d2691e;} .chocolate1 {background-color: #ff7f24; color: #ff7f24;} .chocolate2 {background-color: #ee7621; color: #ee7621;} .chocolate3 {background-color: #cd661d; color: #cd661d;} .chocolate4 {background-color: #8b4513; color: #8b4513;} .coral {background-color: #ff7f50; color: #ff7f50;} .coral1 {background-color: #ff7256; color: #ff7256;} .coral2 {background-color: #ee6a50; color: #ee6a50;} .coral3 {background-color: #cd5b45; color: #cd5b45;} .coral4 {background-color: #8b3e2f; color: #8b3e2f;} .cornflowerblue {background-color: #6495ed; color: #6495ed;} .cornsilk {background-color: #fff8dc; color: #fff8dc;} .cornsilk1 {background-color: #fff8dc; color: #fff8dc;} .cornsilk2 {background-color: #eee8cd; color: #eee8cd;} .cornsilk3 {background-color: #cdc8b1; color: #cdc8b1;} .cornsilk4 {background-color: #8b8878; color: #8b8878;} .crimson {background-color: #dc143c; color: #dc143c;} .cyan {background-color: #00ffff; color: #00ffff;} .cyan1 {background-color: #00ffff; color: #00ffff;} .cyan2 {background-color: #00eeee; color: #00eeee;} .cyan3 {background-color: #00cdcd; color: #00cdcd;} .cyan4 {background-color: #008b8b; color: #008b8b;} .darkblue {background-color: #00008b; color: #00008b;} .darkcyan {background-color: #008b8b; color: #008b8b;} .darkgoldenrod {background-color: #b8860b; color: #b8860b;} .darkgoldenrod1 {background-color: #ffb90f; color: #ffb90f;} .darkgoldenrod2 {background-color: #eead0e; color: #eead0e;} .darkgoldenrod3 {background-color: #cd950c; color: #cd950c;} .darkgoldenrod4 {background-color: #8b6508; color: #8b6508;} .darkgray {background-color: #a9a9a9; color: #a9a9a9;} .darkgreen {background-color: #006400; color: #006400;} .darkgrey {background-color: #a9a9a9; color: #a9a9a9;} .darkkhaki {background-color: #bdb76b; color: #bdb76b;} .darkmagenta {background-color: #8b008b; color: #8b008b;} .darkolivegreen {background-color: #556b2f; color: #556b2f;} .darkolivegreen1 {background-color: #caff70; color: #caff70;} .darkolivegreen2 {background-color: #bcee68; color: #bcee68;} .darkolivegreen3 {background-color: #a2cd5a; color: #a2cd5a;} .darkolivegreen4 {background-color: #6e8b3d; color: #6e8b3d;} .darkorange {background-color: #ff8c00; color: #ff8c00;} .darkorange1 {background-color: #ff7f00; color: #ff7f00;} .darkorange2 {background-color: #ee7600; color: #ee7600;} .darkorange3 {background-color: #cd6600; color: #cd6600;} .darkorange4 {background-color: #8b4500; color: #8b4500;} .darkorchid {background-color: #9932cc; color: #9932cc;} .darkorchid1 {background-color: #bf3eff; color: #bf3eff;} .darkorchid2 {background-color: #b23aee; color: #b23aee;} .darkorchid3 {background-color: #9a32cd; color: #9a32cd;} .darkorchid4 {background-color: #68228b; color: #68228b;} .darkred {background-color: #8b0000; color: #8b0000;} .darksalmon {background-color: #e9967a; color: #e9967a;} .darkseagreen {background-color: #8fbc8f; color: #8fbc8f;} .darkseagreen1 {background-color: #c1ffc1; color: #c1ffc1;} .darkseagreen2 {background-color: #b4eeb4; color: #b4eeb4;} .darkseagreen3 {background-color: #9bcd9b; color: #9bcd9b;} .darkseagreen4 {background-color: #698b69; color: #698b69;} .darkslateblue {background-color: #483d8b; color: #483d8b;} .darkslategray {background-color: #2f4f4f; color: #2f4f4f;} .darkslategray1 {background-color: #97ffff; color: #97ffff;} .darkslategray2 {background-color: #8deeee; color: #8deeee;} .darkslategray3 {background-color: #79cdcd; color: #79cdcd;} .darkslategray4 {background-color: #528b8b; color: #528b8b;} .darkslategrey {background-color: #2f4f4f; color: #2f4f4f;} .darkturquoise {background-color: #00ced1; color: #00ced1;} .darkviolet {background-color: #9400d3; color: #9400d3;} .deeppink {background-color: #ff1493; color: #ff1493;} .deeppink1 {background-color: #ff1493; color: #ff1493;} .deeppink2 {background-color: #ee1289; color: #ee1289;} .deeppink3 {background-color: #cd1076; color: #cd1076;} .deeppink4 {background-color: #8b0a50; color: #8b0a50;} .deepskyblue {background-color: #00bfff; color: #00bfff;} .deepskyblue1 {background-color: #00bfff; color: #00bfff;} .deepskyblue2 {background-color: #00b2ee; color: #00b2ee;} .deepskyblue3 {background-color: #009acd; color: #009acd;} .deepskyblue4 {background-color: #00688b; color: #00688b;} .dimgray {background-color: #696969; color: #696969;} .dimgrey {background-color: #696969; color: #696969;} .dodgerblue {background-color: #1e90ff; color: #1e90ff;} .dodgerblue1 {background-color: #1e90ff; color: #1e90ff;} .dodgerblue2 {background-color: #1c86ee; color: #1c86ee;} .dodgerblue3 {background-color: #1874cd; color: #1874cd;} .dodgerblue4 {background-color: #104e8b; color: #104e8b;} .firebrick {background-color: #b22222; color: #b22222;} .firebrick1 {background-color: #ff3030; color: #ff3030;} .firebrick2 {background-color: #ee2c2c; color: #ee2c2c;} .firebrick3 {background-color: #cd2626; color: #cd2626;} .firebrick4 {background-color: #8b1a1a; color: #8b1a1a;} .floralwhite {background-color: #fffaf0; color: #fffaf0;} .forestgreen {background-color: #228b22; color: #228b22;} .fuchsia {background-color: #ff00ff; color: #ff00ff;} .gainsboro {background-color: #dcdcdc; color: #dcdcdc;} .ghostwhite {background-color: #f8f8ff; color: #f8f8ff;} .gold {background-color: #ffd700; color: #ffd700;} .gold1 {background-color: #ffd700; color: #ffd700;} .gold2 {background-color: #eec900; color: #eec900;} .gold3 {background-color: #cdad00; color: #cdad00;} .gold4 {background-color: #8b7500; color: #8b7500;} .goldenrod {background-color: #daa520; color: #daa520;} .goldenrod1 {background-color: #ffc125; color: #ffc125;} .goldenrod2 {background-color: #eeb422; color: #eeb422;} .goldenrod3 {background-color: #cd9b1d; color: #cd9b1d;} .goldenrod4 {background-color: #8b6914; color: #8b6914;} .gray {background-color: #bebebe; color: #bebebe;} .gray0 {background-color: #000000; color: #000000;} .gray1 {background-color: #030303; color: #030303;} .gray2 {background-color: #050505; color: #050505;} .gray3 {background-color: #080808; color: #080808;} .gray4 {background-color: #0a0a0a; color: #0a0a0a;} .gray5 {background-color: #0d0d0d; color: #0d0d0d;} .gray6 {background-color: #0f0f0f; color: #0f0f0f;} .gray7 {background-color: #121212; color: #121212;} .gray8 {background-color: #141414; color: #141414;} .gray9 {background-color: #171717; color: #171717;} .gray10 {background-color: #1a1a1a; color: #1a1a1a;} .gray11 {background-color: #1c1c1c; color: #1c1c1c;} .gray12 {background-color: #1f1f1f; color: #1f1f1f;} .gray13 {background-color: #212121; color: #212121;} .gray14 {background-color: #242424; color: #242424;} .gray15 {background-color: #262626; color: #262626;} .gray16 {background-color: #292929; color: #292929;} .gray17 {background-color: #2b2b2b; color: #2b2b2b;} .gray18 {background-color: #2e2e2e; color: #2e2e2e;} .gray19 {background-color: #303030; color: #303030;} .gray20 {background-color: #333333; color: #333333;} .gray21 {background-color: #363636; color: #363636;} .gray22 {background-color: #383838; color: #383838;} .gray23 {background-color: #3b3b3b; color: #3b3b3b;} .gray24 {background-color: #3d3d3d; color: #3d3d3d;} .gray25 {background-color: #404040; color: #404040;} .gray26 {background-color: #424242; color: #424242;} .gray27 {background-color: #454545; color: #454545;} .gray28 {background-color: #474747; color: #474747;} .gray29 {background-color: #4a4a4a; color: #4a4a4a;} .gray30 {background-color: #4d4d4d; color: #4d4d4d;} .gray31 {background-color: #4f4f4f; color: #4f4f4f;} .gray32 {background-color: #525252; color: #525252;} .gray33 {background-color: #545454; color: #545454;} .gray34 {background-color: #575757; color: #575757;} .gray35 {background-color: #595959; color: #595959;} .gray36 {background-color: #5c5c5c; color: #5c5c5c;} .gray37 {background-color: #5e5e5e; color: #5e5e5e;} .gray38 {background-color: #616161; color: #616161;} .gray39 {background-color: #636363; color: #636363;} .gray40 {background-color: #666666; color: #666666;} .gray41 {background-color: #696969; color: #696969;} .gray42 {background-color: #6b6b6b; color: #6b6b6b;} .gray43 {background-color: #6e6e6e; color: #6e6e6e;} .gray44 {background-color: #707070; color: #707070;} .gray45 {background-color: #737373; color: #737373;} .gray46 {background-color: #757575; color: #757575;} .gray47 {background-color: #787878; color: #787878;} .gray48 {background-color: #7a7a7a; color: #7a7a7a;} .gray49 {background-color: #7d7d7d; color: #7d7d7d;} .gray50 {background-color: #7f7f7f; color: #7f7f7f;} .gray51 {background-color: #828282; color: #828282;} .gray52 {background-color: #858585; color: #858585;} .gray53 {background-color: #878787; color: #878787;} .gray54 {background-color: #8a8a8a; color: #8a8a8a;} .gray55 {background-color: #8c8c8c; color: #8c8c8c;} .gray56 {background-color: #8f8f8f; color: #8f8f8f;} .gray57 {background-color: #919191; color: #919191;} .gray58 {background-color: #949494; color: #949494;} .gray59 {background-color: #969696; color: #969696;} .gray60 {background-color: #999999; color: #999999;} .gray61 {background-color: #9c9c9c; color: #9c9c9c;} .gray62 {background-color: #9e9e9e; color: #9e9e9e;} .gray63 {background-color: #a1a1a1; color: #a1a1a1;} .gray64 {background-color: #a3a3a3; color: #a3a3a3;} .gray65 {background-color: #a6a6a6; color: #a6a6a6;} .gray66 {background-color: #a8a8a8; color: #a8a8a8;} .gray67 {background-color: #ababab; color: #ababab;} .gray68 {background-color: #adadad; color: #adadad;} .gray69 {background-color: #b0b0b0; color: #b0b0b0;} .gray70 {background-color: #b3b3b3; color: #b3b3b3;} .gray71 {background-color: #b5b5b5; color: #b5b5b5;} .gray72 {background-color: #b8b8b8; color: #b8b8b8;} .gray73 {background-color: #bababa; color: #bababa;} .gray74 {background-color: #bdbdbd; color: #bdbdbd;} .gray75 {background-color: #bfbfbf; color: #bfbfbf;} .gray76 {background-color: #c2c2c2; color: #c2c2c2;} .gray77 {background-color: #c4c4c4; color: #c4c4c4;} .gray78 {background-color: #c7c7c7; color: #c7c7c7;} .gray79 {background-color: #c9c9c9; color: #c9c9c9;} .gray80 {background-color: #cccccc; color: #cccccc;} .gray81 {background-color: #cfcfcf; color: #cfcfcf;} .gray82 {background-color: #d1d1d1; color: #d1d1d1;} .gray83 {background-color: #d4d4d4; color: #d4d4d4;} .gray84 {background-color: #d6d6d6; color: #d6d6d6;} .gray85 {background-color: #d9d9d9; color: #d9d9d9;} .gray86 {background-color: #dbdbdb; color: #dbdbdb;} .gray87 {background-color: #dedede; color: #dedede;} .gray88 {background-color: #e0e0e0; color: #e0e0e0;} .gray89 {background-color: #e3e3e3; color: #e3e3e3;} .gray90 {background-color: #e5e5e5; color: #e5e5e5;} .gray91 {background-color: #e8e8e8; color: #e8e8e8;} .gray92 {background-color: #ebebeb; color: #ebebeb;} .gray93 {background-color: #ededed; color: #ededed;} .gray94 {background-color: #f0f0f0; color: #f0f0f0;} .gray95 {background-color: #f2f2f2; color: #f2f2f2;} .gray96 {background-color: #f5f5f5; color: #f5f5f5;} .gray97 {background-color: #f7f7f7; color: #f7f7f7;} .gray98 {background-color: #fafafa; color: #fafafa;} .gray99 {background-color: #fcfcfc; color: #fcfcfc;} .gray100 {background-color: #ffffff; color: #ffffff;} .green {background-color: #00ff00; color: #00ff00;} .green1 {background-color: #00ff00; color: #00ff00;} .green2 {background-color: #00ee00; color: #00ee00;} .green3 {background-color: #00cd00; color: #00cd00;} .green4 {background-color: #008b00; color: #008b00;} .greenyellow {background-color: #adff2f; color: #adff2f;} .grey {background-color: #bebebe; color: #bebebe;} .grey0 {background-color: #000000; color: #000000;} .grey1 {background-color: #030303; color: #030303;} .grey2 {background-color: #050505; color: #050505;} .grey3 {background-color: #080808; color: #080808;} .grey4 {background-color: #0a0a0a; color: #0a0a0a;} .grey5 {background-color: #0d0d0d; color: #0d0d0d;} .grey6 {background-color: #0f0f0f; color: #0f0f0f;} .grey7 {background-color: #121212; color: #121212;} .grey8 {background-color: #141414; color: #141414;} .grey9 {background-color: #171717; color: #171717;} .grey10 {background-color: #1a1a1a; color: #1a1a1a;} .grey11 {background-color: #1c1c1c; color: #1c1c1c;} .grey12 {background-color: #1f1f1f; color: #1f1f1f;} .grey13 {background-color: #212121; color: #212121;} .grey14 {background-color: #242424; color: #242424;} .grey15 {background-color: #262626; color: #262626;} .grey16 {background-color: #292929; color: #292929;} .grey17 {background-color: #2b2b2b; color: #2b2b2b;} .grey18 {background-color: #2e2e2e; color: #2e2e2e;} .grey19 {background-color: #303030; color: #303030;} .grey20 {background-color: #333333; color: #333333;} .grey21 {background-color: #363636; color: #363636;} .grey22 {background-color: #383838; color: #383838;} .grey23 {background-color: #3b3b3b; color: #3b3b3b;} .grey24 {background-color: #3d3d3d; color: #3d3d3d;} .grey25 {background-color: #404040; color: #404040;} .grey26 {background-color: #424242; color: #424242;} .grey27 {background-color: #454545; color: #454545;} .grey28 {background-color: #474747; color: #474747;} .grey29 {background-color: #4a4a4a; color: #4a4a4a;} .grey30 {background-color: #4d4d4d; color: #4d4d4d;} .grey31 {background-color: #4f4f4f; color: #4f4f4f;} .grey32 {background-color: #525252; color: #525252;} .grey33 {background-color: #545454; color: #545454;} .grey34 {background-color: #575757; color: #575757;} .grey35 {background-color: #595959; color: #595959;} .grey36 {background-color: #5c5c5c; color: #5c5c5c;} .grey37 {background-color: #5e5e5e; color: #5e5e5e;} .grey38 {background-color: #616161; color: #616161;} .grey39 {background-color: #636363; color: #636363;} .grey40 {background-color: #666666; color: #666666;} .grey41 {background-color: #696969; color: #696969;} .grey42 {background-color: #6b6b6b; color: #6b6b6b;} .grey43 {background-color: #6e6e6e; color: #6e6e6e;} .grey44 {background-color: #707070; color: #707070;} .grey45 {background-color: #737373; color: #737373;} .grey46 {background-color: #757575; color: #757575;} .grey47 {background-color: #787878; color: #787878;} .grey48 {background-color: #7a7a7a; color: #7a7a7a;} .grey49 {background-color: #7d7d7d; color: #7d7d7d;} .grey50 {background-color: #7f7f7f; color: #7f7f7f;} .grey51 {background-color: #828282; color: #828282;} .grey52 {background-color: #858585; color: #858585;} .grey53 {background-color: #878787; color: #878787;} .grey54 {background-color: #8a8a8a; color: #8a8a8a;} .grey55 {background-color: #8c8c8c; color: #8c8c8c;} .grey56 {background-color: #8f8f8f; color: #8f8f8f;} .grey57 {background-color: #919191; color: #919191;} .grey58 {background-color: #949494; color: #949494;} .grey59 {background-color: #969696; color: #969696;} .grey60 {background-color: #999999; color: #999999;} .grey61 {background-color: #9c9c9c; color: #9c9c9c;} .grey62 {background-color: #9e9e9e; color: #9e9e9e;} .grey63 {background-color: #a1a1a1; color: #a1a1a1;} .grey64 {background-color: #a3a3a3; color: #a3a3a3;} .grey65 {background-color: #a6a6a6; color: #a6a6a6;} .grey66 {background-color: #a8a8a8; color: #a8a8a8;} .grey67 {background-color: #ababab; color: #ababab;} .grey68 {background-color: #adadad; color: #adadad;} .grey69 {background-color: #b0b0b0; color: #b0b0b0;} .grey70 {background-color: #b3b3b3; color: #b3b3b3;} .grey71 {background-color: #b5b5b5; color: #b5b5b5;} .grey72 {background-color: #b8b8b8; color: #b8b8b8;} .grey73 {background-color: #bababa; color: #bababa;} .grey74 {background-color: #bdbdbd; color: #bdbdbd;} .grey75 {background-color: #bfbfbf; color: #bfbfbf;} .grey76 {background-color: #c2c2c2; color: #c2c2c2;} .grey77 {background-color: #c4c4c4; color: #c4c4c4;} .grey78 {background-color: #c7c7c7; color: #c7c7c7;} .grey79 {background-color: #c9c9c9; color: #c9c9c9;} .grey80 {background-color: #cccccc; color: #cccccc;} .grey81 {background-color: #cfcfcf; color: #cfcfcf;} .grey82 {background-color: #d1d1d1; color: #d1d1d1;} .grey83 {background-color: #d4d4d4; color: #d4d4d4;} .grey84 {background-color: #d6d6d6; color: #d6d6d6;} .grey85 {background-color: #d9d9d9; color: #d9d9d9;} .grey86 {background-color: #dbdbdb; color: #dbdbdb;} .grey87 {background-color: #dedede; color: #dedede;} .grey88 {background-color: #e0e0e0; color: #e0e0e0;} .grey89 {background-color: #e3e3e3; color: #e3e3e3;} .grey90 {background-color: #e5e5e5; color: #e5e5e5;} .grey91 {background-color: #e8e8e8; color: #e8e8e8;} .grey92 {background-color: #ebebeb; color: #ebebeb;} .grey93 {background-color: #ededed; color: #ededed;} .grey94 {background-color: #f0f0f0; color: #f0f0f0;} .grey95 {background-color: #f2f2f2; color: #f2f2f2;} .grey96 {background-color: #f5f5f5; color: #f5f5f5;} .grey97 {background-color: #f7f7f7; color: #f7f7f7;} .grey98 {background-color: #fafafa; color: #fafafa;} .grey99 {background-color: #fcfcfc; color: #fcfcfc;} .grey100 {background-color: #ffffff; color: #ffffff;} .honeydew {background-color: #f0fff0; color: #f0fff0;} .honeydew1 {background-color: #f0fff0; color: #f0fff0;} .honeydew2 {background-color: #e0eee0; color: #e0eee0;} .honeydew3 {background-color: #c1cdc1; color: #c1cdc1;} .honeydew4 {background-color: #838b83; color: #838b83;} .hotpink {background-color: #ff69b4; color: #ff69b4;} .hotpink1 {background-color: #ff6eb4; color: #ff6eb4;} .hotpink2 {background-color: #ee6aa7; color: #ee6aa7;} .hotpink3 {background-color: #cd6090; color: #cd6090;} .hotpink4 {background-color: #8b3a62; color: #8b3a62;} .indianred {background-color: #cd5c5c; color: #cd5c5c;} .indianred1 {background-color: #ff6a6a; color: #ff6a6a;} .indianred2 {background-color: #ee6363; color: #ee6363;} .indianred3 {background-color: #cd5555; color: #cd5555;} .indianred4 {background-color: #8b3a3a; color: #8b3a3a;} .indigo {background-color: #4b0082; color: #4b0082;} .ivory {background-color: #fffff0; color: #fffff0;} .ivory1 {background-color: #fffff0; color: #fffff0;} .ivory2 {background-color: #eeeee0; color: #eeeee0;} .ivory3 {background-color: #cdcdc1; color: #cdcdc1;} .ivory4 {background-color: #8b8b83; color: #8b8b83;} .khaki {background-color: #f0e68c; color: #f0e68c;} .khaki1 {background-color: #fff68f; color: #fff68f;} .khaki2 {background-color: #eee685; color: #eee685;} .khaki3 {background-color: #cdc673; color: #cdc673;} .khaki4 {background-color: #8b864e; color: #8b864e;} .lavender {background-color: #e6e6fa; color: #e6e6fa;} .lavenderblush {background-color: #fff0f5; color: #fff0f5;} .lavenderblush1 {background-color: #fff0f5; color: #fff0f5;} .lavenderblush2 {background-color: #eee0e5; color: #eee0e5;} .lavenderblush3 {background-color: #cdc1c5; color: #cdc1c5;} .lavenderblush4 {background-color: #8b8386; color: #8b8386;} .lawngreen {background-color: #7cfc00; color: #7cfc00;} .lemonchiffon {background-color: #fffacd; color: #fffacd;} .lemonchiffon1 {background-color: #fffacd; color: #fffacd;} .lemonchiffon2 {background-color: #eee9bf; color: #eee9bf;} .lemonchiffon3 {background-color: #cdc9a5; color: #cdc9a5;} .lemonchiffon4 {background-color: #8b8970; color: #8b8970;} .lightblue {background-color: #add8e6; color: #add8e6;} .lightblue1 {background-color: #bfefff; color: #bfefff;} .lightblue2 {background-color: #b2dfee; color: #b2dfee;} .lightblue3 {background-color: #9ac0cd; color: #9ac0cd;} .lightblue4 {background-color: #68838b; color: #68838b;} .lightcoral {background-color: #f08080; color: #f08080;} .lightcyan {background-color: #e0ffff; color: #e0ffff;} .lightcyan1 {background-color: #e0ffff; color: #e0ffff;} .lightcyan2 {background-color: #d1eeee; color: #d1eeee;} .lightcyan3 {background-color: #b4cdcd; color: #b4cdcd;} .lightcyan4 {background-color: #7a8b8b; color: #7a8b8b;} .lightgoldenrod {background-color: #eedd82; color: #eedd82;} .lightgoldenrod1 {background-color: #ffec8b; color: #ffec8b;} .lightgoldenrod2 {background-color: #eedc82; color: #eedc82;} .lightgoldenrod3 {background-color: #cdbe70; color: #cdbe70;} .lightgoldenrod4 {background-color: #8b814c; color: #8b814c;} .lightgoldenrodyellow {background-color: #fafad2; color: #fafad2;} .lightgray {background-color: #d3d3d3; color: #d3d3d3;} .lightgreen {background-color: #90ee90; color: #90ee90;} .lightgrey {background-color: #d3d3d3; color: #d3d3d3;} .lightpink {background-color: #ffb6c1; color: #ffb6c1;} .lightpink1 {background-color: #ffaeb9; color: #ffaeb9;} .lightpink2 {background-color: #eea2ad; color: #eea2ad;} .lightpink3 {background-color: #cd8c95; color: #cd8c95;} .lightpink4 {background-color: #8b5f65; color: #8b5f65;} .lightsalmon {background-color: #ffa07a; color: #ffa07a;} .lightsalmon1 {background-color: #ffa07a; color: #ffa07a;} .lightsalmon2 {background-color: #ee9572; color: #ee9572;} .lightsalmon3 {background-color: #cd8162; color: #cd8162;} .lightsalmon4 {background-color: #8b5742; color: #8b5742;} .lightseagreen {background-color: #20b2aa; color: #20b2aa;} .lightskyblue {background-color: #87cefa; color: #87cefa;} .lightskyblue1 {background-color: #b0e2ff; color: #b0e2ff;} .lightskyblue2 {background-color: #a4d3ee; color: #a4d3ee;} .lightskyblue3 {background-color: #8db6cd; color: #8db6cd;} .lightskyblue4 {background-color: #607b8b; color: #607b8b;} .lightslateblue {background-color: #8470ff; color: #8470ff;} .lightslategray {background-color: #778899; color: #778899;} .lightslategrey {background-color: #778899; color: #778899;} .lightsteelblue {background-color: #b0c4de; color: #b0c4de;} .lightsteelblue1 {background-color: #cae1ff; color: #cae1ff;} .lightsteelblue2 {background-color: #bcd2ee; color: #bcd2ee;} .lightsteelblue3 {background-color: #a2b5cd; color: #a2b5cd;} .lightsteelblue4 {background-color: #6e7b8b; color: #6e7b8b;} .lightyellow {background-color: #ffffe0; color: #ffffe0;} .lightyellow1 {background-color: #ffffe0; color: #ffffe0;} .lightyellow2 {background-color: #eeeed1; color: #eeeed1;} .lightyellow3 {background-color: #cdcdb4; color: #cdcdb4;} .lightyellow4 {background-color: #8b8b7a; color: #8b8b7a;} .linen {background-color: #faf0e6; color: #faf0e6;} .limegreen {background-color: #32cd32; color: #32cd32;} .lime {background-color: #00ff00; color: #00ff00;} .magenta {background-color: #ff00ff; color: #ff00ff;} .magenta1 {background-color: #ff00ff; color: #ff00ff;} .magenta2 {background-color: #ee00ee; color: #ee00ee;} .magenta3 {background-color: #cd00cd; color: #cd00cd;} .magenta4 {background-color: #8b008b; color: #8b008b;} .maroon {background-color: #b03060; color: #b03060;} .maroon1 {background-color: #ff34b3; color: #ff34b3;} .maroon2 {background-color: #ee30a7; color: #ee30a7;} .maroon3 {background-color: #cd2990; color: #cd2990;} .maroon4 {background-color: #8b1c62; color: #8b1c62;} .mediumaquamarine {background-color: #66cdaa; color: #66cdaa;} .mediumblue {background-color: #0000cd; color: #0000cd;} .mediumorchid {background-color: #ba55d3; color: #ba55d3;} .mediumorchid1 {background-color: #e066ff; color: #e066ff;} .mediumorchid2 {background-color: #d15fee; color: #d15fee;} .mediumorchid3 {background-color: #b452cd; color: #b452cd;} .mediumorchid4 {background-color: #7a378b; color: #7a378b;} .mediumpurple {background-color: #9370db; color: #9370db;} .mediumpurple1 {background-color: #ab82ff; color: #ab82ff;} .mediumpurple2 {background-color: #9f79ee; color: #9f79ee;} .mediumpurple3 {background-color: #8968cd; color: #8968cd;} .mediumpurple4 {background-color: #5d478b; color: #5d478b;} .mediumseagreen {background-color: #3cb371; color: #3cb371;} .mediumslateblue {background-color: #7b68ee; color: #7b68ee;} .mediumspringgreen {background-color: #00fa9a; color: #00fa9a;} .mediumturquoise {background-color: #48d1cc; color: #48d1cc;} .mediumvioletred {background-color: #c71585; color: #c71585;} .midnightblue {background-color: #191970; color: #191970;} .mintcream {background-color: #f5fffa; color: #f5fffa;} .mistyrose {background-color: #ffe4e1; color: #ffe4e1;} .mistyrose1 {background-color: #ffe4e1; color: #ffe4e1;} .mistyrose2 {background-color: #eed5d2; color: #eed5d2;} .mistyrose3 {background-color: #cdb7b5; color: #cdb7b5;} .mistyrose4 {background-color: #8b7d7b; color: #8b7d7b;} .moccasin {background-color: #ffe4b5; color: #ffe4b5;} .navajowhite {background-color: #ffdead; color: #ffdead;} .navajowhite1 {background-color: #ffdead; color: #ffdead;} .navajowhite2 {background-color: #eecfa1; color: #eecfa1;} .navajowhite3 {background-color: #cdb38b; color: #cdb38b;} .navajowhite4 {background-color: #8b795e; color: #8b795e;} .navy {background-color: #000080; color: #000080;} .navyblue {background-color: #000080; color: #000080;} .oldlace {background-color: #fdf5e6; color: #fdf5e6;} .olive {background-color: #808000; color: #808000;} .olivedrab {background-color: #6b8e23; color: #6b8e23;} .olivedrab1 {background-color: #c0ff3e; color: #c0ff3e;} .olivedrab2 {background-color: #b3ee3a; color: #b3ee3a;} .olivedrab3 {background-color: #9acd32; color: #9acd32;} .olivedrab4 {background-color: #698b22; color: #698b22;} .orange {background-color: #ffa500; color: #ffa500;} .orange1 {background-color: #ffa500; color: #ffa500;} .orange2 {background-color: #ee9a00; color: #ee9a00;} .orange3 {background-color: #cd8500; color: #cd8500;} .orange4 {background-color: #8b5a00; color: #8b5a00;} .orangered {background-color: #ff4500; color: #ff4500;} .orangered1 {background-color: #ff4500; color: #ff4500;} .orangered2 {background-color: #ee4000; color: #ee4000;} .orangered3 {background-color: #cd3700; color: #cd3700;} .orangered4 {background-color: #8b2500; color: #8b2500;} .orchid {background-color: #da70d6; color: #da70d6;} .orchid1 {background-color: #ff83fa; color: #ff83fa;} .orchid2 {background-color: #ee7ae9; color: #ee7ae9;} .orchid3 {background-color: #cd69c9; color: #cd69c9;} .orchid4 {background-color: #8b4789; color: #8b4789;} .palegreen {background-color: #98fb98; color: #98fb98;} .palegreen1 {background-color: #9aff9a; color: #9aff9a;} .palegreen2 {background-color: #90ee90; color: #90ee90;} .palegreen3 {background-color: #7ccd7c; color: #7ccd7c;} .palegreen4 {background-color: #548b54; color: #548b54;} .palegoldenrod {background-color: #eee8aa; color: #eee8aa;} .paleturquoise {background-color: #afeeee; color: #afeeee;} .paleturquoise1 {background-color: #bbffff; color: #bbffff;} .paleturquoise2 {background-color: #aeeeee; color: #aeeeee;} .paleturquoise3 {background-color: #96cdcd; color: #96cdcd;} .paleturquoise4 {background-color: #668b8b; color: #668b8b;} .palevioletred {background-color: #db7093; color: #db7093;} .palevioletred1 {background-color: #ff82ab; color: #ff82ab;} .palevioletred2 {background-color: #ee799f; color: #ee799f;} .palevioletred3 {background-color: #cd6889; color: #cd6889;} .palevioletred4 {background-color: #8b475d; color: #8b475d;} .papayawhip {background-color: #ffefd5; color: #ffefd5;} .peachpuff {background-color: #ffdab9; color: #ffdab9;} .peachpuff1 {background-color: #ffdab9; color: #ffdab9;} .peachpuff2 {background-color: #eecbad; color: #eecbad;} .peachpuff3 {background-color: #cdaf95; color: #cdaf95;} .peachpuff4 {background-color: #8b7765; color: #8b7765;} .peru {background-color: #cd853f; color: #cd853f;} .pink {background-color: #ffc0cb; color: #ffc0cb;} .pink1 {background-color: #ffb5c5; color: #ffb5c5;} .pink2 {background-color: #eea9b8; color: #eea9b8;} .pink3 {background-color: #cd919e; color: #cd919e;} .pink4 {background-color: #8b636c; color: #8b636c;} .plum {background-color: #dda0dd; color: #dda0dd;} .plum1 {background-color: #ffbbff; color: #ffbbff;} .plum2 {background-color: #eeaeee; color: #eeaeee;} .plum3 {background-color: #cd96cd; color: #cd96cd;} .plum4 {background-color: #8b668b; color: #8b668b;} .powderblue {background-color: #b0e0e6; color: #b0e0e6;} .purple {background-color: #a020f0; color: #a020f0;} .purple1 {background-color: #9b30ff; color: #9b30ff;} .purple2 {background-color: #912cee; color: #912cee;} .purple3 {background-color: #7d26cd; color: #7d26cd;} .purple4 {background-color: #551a8b; color: #551a8b;} .red {background-color: #ff0000; color: #ff0000;} .red1 {background-color: #ff0000; color: #ff0000;} .red2 {background-color: #ee0000; color: #ee0000;} .red3 {background-color: #cd0000; color: #cd0000;} .red4 {background-color: #8b0000; color: #8b0000;} .rosybrown {background-color: #bc8f8f; color: #bc8f8f;} .rosybrown1 {background-color: #ffc1c1; color: #ffc1c1;} .rosybrown2 {background-color: #eeb4b4; color: #eeb4b4;} .rosybrown3 {background-color: #cd9b9b; color: #cd9b9b;} .rosybrown4 {background-color: #8b6969; color: #8b6969;} .royalblue {background-color: #4169e1; color: #4169e1;} .royalblue1 {background-color: #4876ff; color: #4876ff;} .royalblue2 {background-color: #436eee; color: #436eee;} .royalblue3 {background-color: #3a5fcd; color: #3a5fcd;} .royalblue4 {background-color: #27408b; color: #27408b;} .salmon {background-color: #fa8072; color: #fa8072;} .salmon1 {background-color: #ff8c69; color: #ff8c69;} .salmon2 {background-color: #ee8262; color: #ee8262;} .salmon3 {background-color: #cd7054; color: #cd7054;} .salmon4 {background-color: #8b4c39; color: #8b4c39;} .saddlebrown {background-color: #8b4513; color: #8b4513;} .sandybrown {background-color: #f4a460; color: #f4a460;} .seagreen {background-color: #2e8b57; color: #2e8b57;} .seagreen1 {background-color: #54ff9f; color: #54ff9f;} .seagreen2 {background-color: #4eee94; color: #4eee94;} .seagreen3 {background-color: #43cd80; color: #43cd80;} .seagreen4 {background-color: #2e8b57; color: #2e8b57;} .seashell {background-color: #fff5ee; color: #fff5ee;} .seashell1 {background-color: #fff5ee; color: #fff5ee;} .seashell2 {background-color: #eee5de; color: #eee5de;} .seashell3 {background-color: #cdc5bf; color: #cdc5bf;} .seashell4 {background-color: #8b8682; color: #8b8682;} .sienna {background-color: #a0522d; color: #a0522d;} .sienna1 {background-color: #ff8247; color: #ff8247;} .sienna2 {background-color: #ee7942; color: #ee7942;} .sienna3 {background-color: #cd6839; color: #cd6839;} .sienna4 {background-color: #8b4726; color: #8b4726;} .silver {background-color: #c0c0c0; color: #c0c0c0;} .skyblue {background-color: #87ceeb; color: #87ceeb;} .skyblue1 {background-color: #87ceff; color: #87ceff;} .skyblue2 {background-color: #7ec0ee; color: #7ec0ee;} .skyblue3 {background-color: #6ca6cd; color: #6ca6cd;} .skyblue4 {background-color: #4a708b; color: #4a708b;} .slateblue {background-color: #6a5acd; color: #6a5acd;} .slateblue1 {background-color: #836fff; color: #836fff;} .slateblue2 {background-color: #7a67ee; color: #7a67ee;} .slateblue3 {background-color: #6959cd; color: #6959cd;} .slateblue4 {background-color: #473c8b; color: #473c8b;} .slategray {background-color: #708090; color: #708090;} .slategray1 {background-color: #c6e2ff; color: #c6e2ff;} .slategray2 {background-color: #b9d3ee; color: #b9d3ee;} .slategray3 {background-color: #9fb6cd; color: #9fb6cd;} .slategray4 {background-color: #6c7b8b; color: #6c7b8b;} .slategrey {background-color: #708090; color: #708090;} .snow {background-color: #fffafa; color: #fffafa;} .snow1 {background-color: #fffafa; color: #fffafa;} .snow2 {background-color: #eee9e9; color: #eee9e9;} .snow3 {background-color: #cdc9c9; color: #cdc9c9;} .snow4 {background-color: #8b8989; color: #8b8989;} .springgreen {background-color: #00ff7f; color: #00ff7f;} .springgreen1 {background-color: #00ff7f; color: #00ff7f;} .springgreen2 {background-color: #00ee76; color: #00ee76;} .springgreen3 {background-color: #00cd66; color: #00cd66;} .springgreen4 {background-color: #008b45; color: #008b45;} .steelblue {background-color: #4682b4; color: #4682b4;} .steelblue1 {background-color: #63b8ff; color: #63b8ff;} .steelblue2 {background-color: #5cacee; color: #5cacee;} .steelblue3 {background-color: #4f94cd; color: #4f94cd;} .steelblue4 {background-color: #36648b; color: #36648b;} .tan {background-color: #d2b48c; color: #d2b48c;} .tan1 {background-color: #ffa54f; color: #ffa54f;} .tan2 {background-color: #ee9a49; color: #ee9a49;} .tan3 {background-color: #cd853f; color: #cd853f;} .tan4 {background-color: #8b5a2b; color: #8b5a2b;} .teal {background-color: #008080; color: #008080;} .thistle {background-color: #d8bfd8; color: #d8bfd8;} .thistle1 {background-color: #ffe1ff; color: #ffe1ff;} .thistle2 {background-color: #eed2ee; color: #eed2ee;} .thistle3 {background-color: #cdb5cd; color: #cdb5cd;} .thistle4 {background-color: #8b7b8b; color: #8b7b8b;} .tomato {background-color: #ff6347; color: #ff6347;} .tomato1 {background-color: #ff6347; color: #ff6347;} .tomato2 {background-color: #ee5c42; color: #ee5c42;} .tomato3 {background-color: #cd4f39; color: #cd4f39;} .tomato4 {background-color: #8b3626; color: #8b3626;} .turquoise {background-color: #40e0d0; color: #40e0d0;} .turquoise1 {background-color: #00f5ff; color: #00f5ff;} .turquoise2 {background-color: #00e5ee; color: #00e5ee;} .turquoise3 {background-color: #00c5cd; color: #00c5cd;} .turquoise4 {background-color: #00868b; color: #00868b;} .violet {background-color: #ee82ee; color: #ee82ee;} .violetred {background-color: #d02090; color: #d02090;} .violetred1 {background-color: #ff3e96; color: #ff3e96;} .violetred2 {background-color: #ee3a8c; color: #ee3a8c;} .violetred3 {background-color: #cd3278; color: #cd3278;} .violetred4 {background-color: #8b2252; color: #8b2252;} .wheat {background-color: #f5deb3; color: #f5deb3;} .wheat1 {background-color: #ffe7ba; color: #ffe7ba;} .wheat2 {background-color: #eed8ae; color: #eed8ae;} .wheat3 {background-color: #cdba96; color: #cdba96;} .wheat4 {background-color: #8b7e66; color: #8b7e66;} .white {background-color: #ffffff; color: #ffffff;} .whitesmoke {background-color: #f5f5f5; color: #f5f5f5;} .yellow {background-color: #ffff00; color: #ffff00;} .yellow1 {background-color: #ffff00; color: #ffff00;} .yellow2 {background-color: #eeee00; color: #eeee00;} .yellow3 {background-color: #cdcd00; color: #cdcd00;} .yellow4 {background-color: #8b8b00; color: #8b8b00;} .yellowgreen {background-color: #9acd32; color: #9acd32;} h]hX}hhBsbah}(h]h]h]h]h!]formathtmlh#h$uh%h@h'h?h)Khh,h&hubh paragraph)}(h:doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_).h](h pending_xref)}(h :doc:`color`h]h inline)}(hh\h]hcolor}hh`sbah}(h]h](xrefstdstd-doceh]h]h!]uh%h^hhZubah}(h]h]h]h]h!]refdocref/color_list refdomainhkreftypedoc refexplicitrefwarn reftargetcoloruh%hXh'h?h)MhhTubh@ lets you specify any of these named colors when creating a new }hhTsbh literal)}(h``pygame.Color``h]h pygame.Color}hhsbah}(h]h]h]h]h!]uh%hhhTubh (taken from the }hhTsbh reference)}(hT`colordict module `_h]hcolordict module}(hhhcolordict moduleubah}(h]h]h]h]h!]namecolordict modulerefuri>https://github.com/pygame/pygame/blob/main/src_py/colordict.pyuh%hhhTubh target)}(hA h]h}(h]colordict-moduleah]h]colordict moduleah]h!]refurihuh%h referencedKhhTubh).}hhTsbeh}(h]h]h]h]h!]uh%hRh'h?h)Mhh,h&hubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h}(h]h]h]h]h!]colwidthKuh%hhhubh)}(hhh]h}(h]h]h]h]h!]colwidthKfuh%hhhubh thead)}(hhh]h row)}(hhh](h entry)}(hhh]hS)}(hNameh]hName}hhsbah}(h]h]h]h]h!]uh%hRh'h?h)MChhubah}(h]h]h]h]h!]uh%hhhubh)}(hhh]hS)}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%hRh'h?h)MChj ubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%hhhubh tbody)}(hhh](h)}(hhh](h)}(hhh]hS)}(h ``aliceblue``h]h)}(hj9h]h aliceblue}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h%:aliceblue:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h] aliceblueah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite``h]h)}(hjh]h antiquewhite}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h(:antiquewhite:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhiteah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite1``h]h)}(hjh]h antiquewhite1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite2``h]h)}(hjh]h antiquewhite2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite2:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h] antiquewhite2ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite3``h]h)}(hjah]h antiquewhite3}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h):antiquewhite3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite4``h]h)}(hjh]h antiquewhite4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aqua``h]h)}(hjh]haqua}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :aqua:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]aquaah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine``h]h)}(hj?h]h aquamarine}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h&:aquamarine:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] aquamarineah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine1``h]h)}(hjh]h aquamarine1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine2``h]h)}(hjh]h aquamarine2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine3``h]h)}(hjh]h aquamarine3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine3:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] aquamarine3ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine4``h]h)}(hjgh]h aquamarine4}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h':aquamarine4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure``h]h)}(hjh]hazure}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:azure:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azureah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure1``h]h)}(hjh]hazure1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure2``h]h)}(hjEh]hazure2}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":azure2:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]azure2ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure3``h]h)}(hjh]hazure3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure4``h]h)}(hjh]hazure4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``beige``h]h)}(hj#h]hbeige}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:beige:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]beigeah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque``h]h)}(hjmh]hbisque}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h":bisque:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisqueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque1``h]h)}(hjh]hbisque1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisque1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque2``h]h)}(hjh]hbisque2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque2:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]bisque2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque3``h]h)}(hjKh]hbisque3}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h#:bisque3:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h]bisque3ah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque4``h]h)}(hjh]hbisque4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisque4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``black``h]h)}(hjh]hblack}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:black:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blackah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blanchedalmond``h]h)}(hj)h]hblanchedalmond}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h*:blanchedalmond:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h]blanchedalmondah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blue``h]h)}(hjsh]hblue}hjusbah}(h]h]h]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnubah}(h]h]h]h]h!]uh%hhjkubh)}(hhh]hS)}(h :blue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjubah}(h]h]h]h]h!]uh%hhjkubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue1``h]h)}(hjh]hblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:blue1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blue1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue2``h]h)}(hj h]hblue2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:blue2:`████████`h]h_)}(hj' h]h████████}hj) sbah}(h]h]blue2ah]h]h!]uh%h^hj% ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj" ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue3``h]h)}(hjQ h]hblue3}hjS sbah}(h]h]h]h]h!]uh%hhjO ubah}(h]h]h]h]h!]uh%hRh'h?h)MahjL ubah}(h]h]h]h]h!]uh%hhjI ubh)}(hhh]hS)}(h!:blue3:`████████`h]h_)}(hjq h]h████████}hjs sbah}(h]h]blue3ah]h]h!]uh%h^hjo ubah}(h]h]h]h]h!]uh%hRh'h?h)Mahjl ubah}(h]h]h]h]h!]uh%hhjI ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue4``h]h)}(hj h]hblue4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h!:blue4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]blue4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blueviolet``h]h)}(hj h]h blueviolet}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mchj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:blueviolet:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] bluevioletah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mchj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown``h]h)}(hj/ h]hbrown}hj1 sbah}(h]h]h]h]h!]uh%hhj- ubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj* ubah}(h]h]h]h]h!]uh%hhj' ubh)}(hhh]hS)}(h!:brown:`████████`h]h_)}(hjO h]h████████}hjQ sbah}(h]h]brownah]h]h!]uh%h^hjM ubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJ ubah}(h]h]h]h]h!]uh%hhj' ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown1``h]h)}(hjy h]hbrown1}hj{ sbah}(h]h]h]h]h!]uh%hhjw ubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjt ubah}(h]h]h]h]h!]uh%hhjq ubh)}(hhh]hS)}(h":brown1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]brown1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mehj ubah}(h]h]h]h]h!]uh%hhjq ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown2``h]h)}(hj h]hbrown2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":brown2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]brown2ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown3``h]h)}(hj h]hbrown3}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":brown3:`████████`h]h_)}(hj- h]h████████}hj/ sbah}(h]h]brown3ah]h]h!]uh%h^hj+ ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj( ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown4``h]h)}(hjW h]hbrown4}hjY sbah}(h]h]h]h]h!]uh%hhjU ubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjR ubah}(h]h]h]h]h!]uh%hhjO ubh)}(hhh]hS)}(h":brown4:`████████`h]h_)}(hjw h]h████████}hjy sbah}(h]h]brown4ah]h]h!]uh%h^hju ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhhjr ubah}(h]h]h]h]h!]uh%hhjO ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``burlywood``h]h)}(hj h]h burlywood}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mihj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h%:burlywood:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywoodah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mihj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood1``h]h)}(hj h]h burlywood1}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:burlywood1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood2``h]h)}(hj5 h]h burlywood2}hj7 sbah}(h]h]h]h]h!]uh%hhj3 ubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0 ubah}(h]h]h]h]h!]uh%hhj- ubh)}(hhh]hS)}(h&:burlywood2:`████████`h]h_)}(hjU h]h████████}hjW sbah}(h]h] burlywood2ah]h]h!]uh%h^hjS ubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjP ubah}(h]h]h]h]h!]uh%hhj- ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood3``h]h)}(hj h]h burlywood3}hj sbah}(h]h]h]h]h!]uh%hhj} ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjz ubah}(h]h]h]h]h!]uh%hhjw ubh)}(hhh]hS)}(h&:burlywood3:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood3ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhj ubah}(h]h]h]h]h!]uh%hhjw ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood4``h]h)}(hj h]h burlywood4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:burlywood4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cadetblue``h]h)}(hj h]h cadetblue}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h%:cadetblue:`████████`h]h_)}(hj3 h]h████████}hj5 sbah}(h]h] cadetblueah]h]h!]uh%h^hj1 ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj. ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue1``h]h)}(hj] h]h cadetblue1}hj_ sbah}(h]h]h]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%hRh'h?h)MohjX ubah}(h]h]h]h]h!]uh%hhjU ubh)}(hhh]hS)}(h&:cadetblue1:`████████`h]h_)}(hj} h]h████████}hj sbah}(h]h] cadetblue1ah]h]h!]uh%h^hj{ ubah}(h]h]h]h]h!]uh%hRh'h?h)Mohjx ubah}(h]h]h]h]h!]uh%hhjU ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue2``h]h)}(hj h]h cadetblue2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:cadetblue2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] cadetblue2ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue3``h]h)}(hj h]h cadetblue3}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:cadetblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cadetblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue4``h]h)}(hj;h]h cadetblue4}hj=sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h&:cadetblue4:`████████`h]h_)}(hj[h]h████████}hj]sbah}(h]h] cadetblue4ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse``h]h)}(hjh]h chartreuse}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h&:chartreuse:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse1``h]h)}(hjh]h chartreuse1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse2``h]h)}(hjh]h chartreuse2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Muhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse2:`████████`h]h_)}(hj9h]h████████}hj;sbah}(h]h] chartreuse2ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse3``h]h)}(hjch]h chartreuse3}hjesbah}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^ubah}(h]h]h]h]h!]uh%hhj[ubh)}(hhh]hS)}(h':chartreuse3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~ubah}(h]h]h]h]h!]uh%hhj[ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse4``h]h)}(hjh]h chartreuse4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``chocolate``h]h)}(hjh]h chocolate}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:chocolate:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolateah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate1``h]h)}(hjAh]h chocolate1}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h&:chocolate1:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] chocolate1ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate2``h]h)}(hjh]h chocolate2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolate2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate3``h]h)}(hjh]h chocolate3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolate3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate4``h]h)}(hjh]h chocolate4}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M|hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate4:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h] chocolate4ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)M|hj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral``h]h)}(hjih]hcoral}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h!:coral:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coralah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral1``h]h)}(hjh]hcoral1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral2``h]h)}(hjh]hcoral2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral3``h]h)}(hjGh]hcoral3}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":coral3:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h]coral3ah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral4``h]h)}(hjh]hcoral4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cornflowerblue``h]h)}(hjh]hcornflowerblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:cornflowerblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cornflowerblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk``h]h)}(hj%h]hcornsilk}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:cornsilk:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h]cornsilkah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk1``h]h)}(hjoh]h cornsilk1}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h%:cornsilk1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cornsilk1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk2``h]h)}(hjh]h cornsilk2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:cornsilk2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cornsilk2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk3``h]h)}(hjh]h cornsilk3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:cornsilk3:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] cornsilk3ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk4``h]h)}(hjMh]h cornsilk4}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h%:cornsilk4:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h] cornsilk4ah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``crimson``h]h)}(hjh]hcrimson}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:crimson:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]crimsonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cyan``h]h)}(hjh]hcyan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :cyan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan1``h]h)}(hj+h]hcyan1}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h!:cyan1:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h]cyan1ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan2``h]h)}(hjuh]hcyan2}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h!:cyan2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyan2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan3``h]h)}(hjh]hcyan3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:cyan3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyan3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan4``h]h)}(hj h]hcyan4}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:cyan4:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h]cyan4ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkblue``h]h)}(hjSh]hdarkblue}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h$:darkblue:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h]darkblueah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkcyan``h]h)}(hjh]hdarkcyan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:darkcyan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkcyanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod``h]h)}(hjh]h darkgoldenrod}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkgoldenrod:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h] darkgoldenrodah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod1``h]h)}(hj1h]hdarkgoldenrod1}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h*:darkgoldenrod1:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]darkgoldenrod1ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod2``h]h)}(hj{h]hdarkgoldenrod2}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h*:darkgoldenrod2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkgoldenrod2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod3``h]h)}(hjh]hdarkgoldenrod3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkgoldenrod3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkgoldenrod3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod4``h]h)}(hjh]hdarkgoldenrod4}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkgoldenrod4:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]darkgoldenrod4ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgray``h]h)}(hjYh]hdarkgray}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h$:darkgray:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h]darkgrayah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgreen``h]h)}(hjh]h darkgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:darkgreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkgreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgrey``h]h)}(hjh]hdarkgrey}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:darkgrey:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h]darkgreyah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkkhaki``h]h)}(hj7h]h darkkhaki}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h%:darkkhaki:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h] darkkhakiah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkmagenta``h]h)}(hjh]h darkmagenta}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h':darkmagenta:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkmagentaah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen``h]h)}(hjh]hdarkolivegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkolivegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen1``h]h)}(hjh]hdarkolivegreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h+:darkolivegreen1:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h]darkolivegreen1ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen2``h]h)}(hj_h]hdarkolivegreen2}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h+:darkolivegreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen2ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen3``h]h)}(hjh]hdarkolivegreen3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:darkolivegreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen4``h]h)}(hjh]hdarkolivegreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:darkolivegreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange``h]h)}(hj=h]h darkorange}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h&:darkorange:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] darkorangeah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange1``h]h)}(hjh]h darkorange1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange2``h]h)}(hjh]h darkorange2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange3``h]h)}(hjh]h darkorange3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange3:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h] darkorange3ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange4``h]h)}(hjeh]h darkorange4}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h':darkorange4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid``h]h)}(hjh]h darkorchid}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:darkorchid:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchidah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid1``h]h)}(hjh]h darkorchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid2``h]h)}(hjCh]h darkorchid2}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h':darkorchid2:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] darkorchid2ah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid3``h]h)}(hjh]h darkorchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid4``h]h)}(hjh]h darkorchid4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkred``h]h)}(hj!h]hdarkred}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:darkred:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h]darkredah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darksalmon``h]h)}(hjkh]h darksalmon}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h&:darksalmon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darksalmonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen``h]h)}(hjh]h darkseagreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:darkseagreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen1``h]h)}(hjh]h darkseagreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen1:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h] darkseagreen1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen2``h]h)}(hjIh]h darkseagreen2}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h):darkseagreen2:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] darkseagreen2ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen3``h]h)}(hjh]h darkseagreen3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen4``h]h)}(hjh]h darkseagreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslateblue``h]h)}(hj' h]h darkslateblue}hj) sbah}(h]h]h]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj" ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h):darkslateblue:`████████`h]h_)}(hjG h]h████████}hjI sbah}(h]h] darkslateblueah]h]h!]uh%h^hjE ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjB ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray``h]h)}(hjq h]h darkslategray}hjs sbah}(h]h]h]h]h!]uh%hhjo ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjl ubah}(h]h]h]h]h!]uh%hhji ubh)}(hhh]hS)}(h):darkslategray:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] darkslategrayah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhji ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray1``h]h)}(hj h]hdarkslategray1}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h*:darkslategray1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]darkslategray1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray2``h]h)}(hj!h]hdarkslategray2}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h*:darkslategray2:`████████`h]h_)}(hj%!h]h████████}hj'!sbah}(h]h]darkslategray2ah]h]h!]uh%h^hj#!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj !ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray3``h]h)}(hjO!h]hdarkslategray3}hjQ!sbah}(h]h]h]h]h!]uh%hhjM!ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJ!ubah}(h]h]h]h]h!]uh%hhjG!ubh)}(hhh]hS)}(h*:darkslategray3:`████████`h]h_)}(hjo!h]h████████}hjq!sbah}(h]h]darkslategray3ah]h]h!]uh%h^hjm!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjj!ubah}(h]h]h]h]h!]uh%hhjG!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray4``h]h)}(hj!h]hdarkslategray4}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h*:darkslategray4:`████████`h]h_)}(hj!h]h████████}hj!sbah}(h]h]darkslategray4ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategrey``h]h)}(hj!h]h darkslategrey}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h):darkslategrey:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h] darkslategreyah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkturquoise``h]h)}(hj-"h]h darkturquoise}hj/"sbah}(h]h]h]h]h!]uh%hhj+"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj("ubah}(h]h]h]h]h!]uh%hhj%"ubh)}(hhh]hS)}(h):darkturquoise:`████████`h]h_)}(hjM"h]h████████}hjO"sbah}(h]h] darkturquoiseah]h]h!]uh%h^hjK"ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjH"ubah}(h]h]h]h]h!]uh%hhj%"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkviolet``h]h)}(hjw"h]h darkviolet}hjy"sbah}(h]h]h]h]h!]uh%hhju"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjr"ubah}(h]h]h]h]h!]uh%hhjo"ubh)}(hhh]hS)}(h&:darkviolet:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h] darkvioletah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhjo"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink``h]h)}(hj"h]hdeeppink}hj"sbah}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhj"ubh)}(hhh]hS)}(h$:deeppink:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h]deeppinkah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhj"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink1``h]h)}(hj #h]h deeppink1}hj #sbah}(h]h]h]h]h!]uh%hhj #ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink1:`████████`h]h_)}(hj+#h]h████████}hj-#sbah}(h]h] deeppink1ah]h]h!]uh%h^hj)#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&#ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink2``h]h)}(hjU#h]h deeppink2}hjW#sbah}(h]h]h]h]h!]uh%hhjS#ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP#ubah}(h]h]h]h]h!]uh%hhjM#ubh)}(hhh]hS)}(h%:deeppink2:`████████`h]h_)}(hju#h]h████████}hjw#sbah}(h]h] deeppink2ah]h]h!]uh%h^hjs#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjp#ubah}(h]h]h]h]h!]uh%hhjM#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink3``h]h)}(hj#h]h deeppink3}hj#sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink3:`████████`h]h_)}(hj#h]h████████}hj#sbah}(h]h] deeppink3ah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink4``h]h)}(hj#h]h deeppink4}hj#sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink4:`████████`h]h_)}(hj $h]h████████}hj $sbah}(h]h] deeppink4ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue``h]h)}(hj3$h]h deepskyblue}hj5$sbah}(h]h]h]h]h!]uh%hhj1$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.$ubah}(h]h]h]h]h!]uh%hhj+$ubh)}(hhh]hS)}(h':deepskyblue:`████████`h]h_)}(hjS$h]h████████}hjU$sbah}(h]h] deepskyblueah]h]h!]uh%h^hjQ$ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjN$ubah}(h]h]h]h]h!]uh%hhj+$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue1``h]h)}(hj}$h]h deepskyblue1}hj$sbah}(h]h]h]h]h!]uh%hhj{$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx$ubah}(h]h]h]h]h!]uh%hhju$ubh)}(hhh]hS)}(h(:deepskyblue1:`████████`h]h_)}(hj$h]h████████}hj$sbah}(h]h] deepskyblue1ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhju$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue2``h]h)}(hj$h]h deepskyblue2}hj$sbah}(h]h]h]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj$ubh)}(hhh]hS)}(h(:deepskyblue2:`████████`h]h_)}(hj$h]h████████}hj$sbah}(h]h] deepskyblue2ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue3``h]h)}(hj%h]h deepskyblue3}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj %ubah}(h]h]h]h]h!]uh%hhj %ubh)}(hhh]hS)}(h(:deepskyblue3:`████████`h]h_)}(hj1%h]h████████}hj3%sbah}(h]h] deepskyblue3ah]h]h!]uh%h^hj/%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,%ubah}(h]h]h]h]h!]uh%hhj %ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue4``h]h)}(hj[%h]h deepskyblue4}hj]%sbah}(h]h]h]h]h!]uh%hhjY%ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV%ubah}(h]h]h]h]h!]uh%hhjS%ubh)}(hhh]hS)}(h(:deepskyblue4:`████████`h]h_)}(hj{%h]h████████}hj}%sbah}(h]h] deepskyblue4ah]h]h!]uh%h^hjy%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjv%ubah}(h]h]h]h]h!]uh%hhjS%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``dimgray``h]h)}(hj%h]hdimgray}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h#:dimgray:`████████`h]h_)}(hj%h]h████████}hj%sbah}(h]h]dimgrayah]h]h!]uh%h^hj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``dimgrey``h]h)}(hj%h]hdimgrey}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h#:dimgrey:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h]dimgreyah]h]h!]uh%h^hj &ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj &ubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue``h]h)}(hj9&h]h dodgerblue}hj;&sbah}(h]h]h]h]h!]uh%hhj7&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4&ubah}(h]h]h]h]h!]uh%hhj1&ubh)}(hhh]hS)}(h&:dodgerblue:`████████`h]h_)}(hjY&h]h████████}hj[&sbah}(h]h] dodgerblueah]h]h!]uh%h^hjW&ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjT&ubah}(h]h]h]h]h!]uh%hhj1&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue1``h]h)}(hj&h]h dodgerblue1}hj&sbah}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~&ubah}(h]h]h]h]h!]uh%hhj{&ubh)}(hhh]hS)}(h':dodgerblue1:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h] dodgerblue1ah]h]h!]uh%h^hj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj{&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue2``h]h)}(hj&h]h dodgerblue2}hj&sbah}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj&ubh)}(hhh]hS)}(h':dodgerblue2:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h] dodgerblue2ah]h]h!]uh%h^hj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue3``h]h)}(hj'h]h dodgerblue3}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h':dodgerblue3:`████████`h]h_)}(hj7'h]h████████}hj9'sbah}(h]h] dodgerblue3ah]h]h!]uh%h^hj5'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2'ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue4``h]h)}(hja'h]h dodgerblue4}hjc'sbah}(h]h]h]h]h!]uh%hhj_'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\'ubah}(h]h]h]h]h!]uh%hhjY'ubh)}(hhh]hS)}(h':dodgerblue4:`████████`h]h_)}(hj'h]h████████}hj'sbah}(h]h] dodgerblue4ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|'ubah}(h]h]h]h]h!]uh%hhjY'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``firebrick``h]h)}(hj'h]h firebrick}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h%:firebrick:`████████`h]h_)}(hj'h]h████████}hj'sbah}(h]h] firebrickah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick1``h]h)}(hj'h]h firebrick1}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h&:firebrick1:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick1ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick2``h]h)}(hj?(h]h firebrick2}hjA(sbah}(h]h]h]h]h!]uh%hhj=(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:(ubah}(h]h]h]h]h!]uh%hhj7(ubh)}(hhh]hS)}(h&:firebrick2:`████████`h]h_)}(hj_(h]h████████}hja(sbah}(h]h] firebrick2ah]h]h!]uh%h^hj](ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZ(ubah}(h]h]h]h]h!]uh%hhj7(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick3``h]h)}(hj(h]h firebrick3}hj(sbah}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubh)}(hhh]hS)}(h&:firebrick3:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick3ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick4``h]h)}(hj(h]h firebrick4}hj(sbah}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubh)}(hhh]hS)}(h&:firebrick4:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick4ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``floralwhite``h]h)}(hj)h]h floralwhite}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h':floralwhite:`████████`h]h_)}(hj=)h]h████████}hj?)sbah}(h]h] floralwhiteah]h]h!]uh%h^hj;)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8)ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``forestgreen``h]h)}(hjg)h]h forestgreen}hji)sbah}(h]h]h]h]h!]uh%hhje)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjb)ubah}(h]h]h]h]h!]uh%hhj_)ubh)}(hhh]hS)}(h':forestgreen:`████████`h]h_)}(hj)h]h████████}hj)sbah}(h]h] forestgreenah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj_)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``fuchsia``h]h)}(hj)h]hfuchsia}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h#:fuchsia:`████████`h]h_)}(hj)h]h████████}hj)sbah}(h]h]fuchsiaah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gainsboro``h]h)}(hj)h]h gainsboro}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h%:gainsboro:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h] gainsboroah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``ghostwhite``h]h)}(hjE*h]h ghostwhite}hjG*sbah}(h]h]h]h]h!]uh%hhjC*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@*ubah}(h]h]h]h]h!]uh%hhj=*ubh)}(hhh]hS)}(h&:ghostwhite:`████████`h]h_)}(hje*h]h████████}hjg*sbah}(h]h] ghostwhiteah]h]h!]uh%h^hjc*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`*ubah}(h]h]h]h]h!]uh%hhj=*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``gold``h]h)}(hj*h]hgold}hj*sbah}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubh)}(hhh]hS)}(h :gold:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h]goldah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold1``h]h)}(hj*h]hgold1}hj*sbah}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubh)}(hhh]hS)}(h!:gold1:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h]gold1ah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold2``h]h)}(hj#+h]hgold2}hj%+sbah}(h]h]h]h]h!]uh%hhj!+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h!:gold2:`████████`h]h_)}(hjC+h]h████████}hjE+sbah}(h]h]gold2ah]h]h!]uh%h^hjA+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>+ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold3``h]h)}(hjm+h]hgold3}hjo+sbah}(h]h]h]h]h!]uh%hhjk+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjh+ubah}(h]h]h]h]h!]uh%hhje+ubh)}(hhh]hS)}(h!:gold3:`████████`h]h_)}(hj+h]h████████}hj+sbah}(h]h]gold3ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhje+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold4``h]h)}(hj+h]hgold4}hj+sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h!:gold4:`████████`h]h_)}(hj+h]h████████}hj+sbah}(h]h]gold4ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``goldenrod``h]h)}(hj,h]h goldenrod}hj,sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h%:goldenrod:`████████`h]h_)}(hj!,h]h████████}hj#,sbah}(h]h] goldenrodah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod1``h]h)}(hjK,h]h goldenrod1}hjM,sbah}(h]h]h]h]h!]uh%hhjI,ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjF,ubah}(h]h]h]h]h!]uh%hhjC,ubh)}(hhh]hS)}(h&:goldenrod1:`████████`h]h_)}(hjk,h]h████████}hjm,sbah}(h]h] goldenrod1ah]h]h!]uh%h^hji,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjf,ubah}(h]h]h]h]h!]uh%hhjC,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod2``h]h)}(hj,h]h goldenrod2}hj,sbah}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubh)}(hhh]hS)}(h&:goldenrod2:`████████`h]h_)}(hj,h]h████████}hj,sbah}(h]h] goldenrod2ah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod3``h]h)}(hj,h]h goldenrod3}hj,sbah}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubh)}(hhh]hS)}(h&:goldenrod3:`████████`h]h_)}(hj,h]h████████}hj-sbah}(h]h] goldenrod3ah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod4``h]h)}(hj)-h]h goldenrod4}hj+-sbah}(h]h]h]h]h!]uh%hhj'-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$-ubah}(h]h]h]h]h!]uh%hhj!-ubh)}(hhh]hS)}(h&:goldenrod4:`████████`h]h_)}(hjI-h]h████████}hjK-sbah}(h]h] goldenrod4ah]h]h!]uh%h^hjG-ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjD-ubah}(h]h]h]h]h!]uh%hhj!-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``gray``h]h)}(hjs-h]hgray}hju-sbah}(h]h]h]h]h!]uh%hhjq-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjn-ubah}(h]h]h]h]h!]uh%hhjk-ubh)}(hhh]hS)}(h :gray:`████████`h]h_)}(hj-h]h████████}hj-sbah}(h]h]grayah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhjk-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray0``h]h)}(hj-h]hgray0}hj-sbah}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h!:gray0:`████████`h]h_)}(hj-h]h████████}hj-sbah}(h]h]gray0ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray1``h]h)}(hj.h]hgray1}hj .sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h!:gray1:`████████`h]h_)}(hj'.h]h████████}hj).sbah}(h]h]gray1ah]h]h!]uh%h^hj%.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj".ubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray2``h]h)}(hjQ.h]hgray2}hjS.sbah}(h]h]h]h]h!]uh%hhjO.ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjL.ubah}(h]h]h]h]h!]uh%hhjI.ubh)}(hhh]hS)}(h!:gray2:`████████`h]h_)}(hjq.h]h████████}hjs.sbah}(h]h]gray2ah]h]h!]uh%h^hjo.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjl.ubah}(h]h]h]h]h!]uh%hhjI.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray3``h]h)}(hj.h]hgray3}hj.sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubh)}(hhh]hS)}(h!:gray3:`████████`h]h_)}(hj.h]h████████}hj.sbah}(h]h]gray3ah]h]h!]uh%h^hj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray4``h]h)}(hj.h]hgray4}hj.sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubh)}(hhh]hS)}(h!:gray4:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray4ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray5``h]h)}(hj//h]hgray5}hj1/sbah}(h]h]h]h]h!]uh%hhj-/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*/ubah}(h]h]h]h]h!]uh%hhj'/ubh)}(hhh]hS)}(h!:gray5:`████████`h]h_)}(hjO/h]h████████}hjQ/sbah}(h]h]gray5ah]h]h!]uh%h^hjM/ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJ/ubah}(h]h]h]h]h!]uh%hhj'/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray6``h]h)}(hjy/h]hgray6}hj{/sbah}(h]h]h]h]h!]uh%hhjw/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjt/ubah}(h]h]h]h]h!]uh%hhjq/ubh)}(hhh]hS)}(h!:gray6:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray6ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhjq/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray7``h]h)}(hj/h]hgray7}hj/sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h!:gray7:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray7ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray8``h]h)}(hj 0h]hgray8}hj0sbah}(h]h]h]h]h!]uh%hhj 0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h!:gray8:`████████`h]h_)}(hj-0h]h████████}hj/0sbah}(h]h]gray8ah]h]h!]uh%h^hj+0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(0ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray9``h]h)}(hjW0h]hgray9}hjY0sbah}(h]h]h]h]h!]uh%hhjU0ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjR0ubah}(h]h]h]h]h!]uh%hhjO0ubh)}(hhh]hS)}(h!:gray9:`████████`h]h_)}(hjw0h]h████████}hjy0sbah}(h]h]gray9ah]h]h!]uh%h^hju0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjr0ubah}(h]h]h]h]h!]uh%hhjO0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray10``h]h)}(hj0h]hgray10}hj0sbah}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h":gray10:`████████`h]h_)}(hj0h]h████████}hj0sbah}(h]h]gray10ah]h]h!]uh%h^hj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray11``h]h)}(hj0h]hgray11}hj0sbah}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h":gray11:`████████`h]h_)}(hj 1h]h████████}hj 1sbah}(h]h]gray11ah]h]h!]uh%h^hj 1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray12``h]h)}(hj51h]hgray12}hj71sbah}(h]h]h]h]h!]uh%hhj31ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj01ubah}(h]h]h]h]h!]uh%hhj-1ubh)}(hhh]hS)}(h":gray12:`████████`h]h_)}(hjU1h]h████████}hjW1sbah}(h]h]gray12ah]h]h!]uh%h^hjS1ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP1ubah}(h]h]h]h]h!]uh%hhj-1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray13``h]h)}(hj1h]hgray13}hj1sbah}(h]h]h]h]h!]uh%hhj}1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz1ubah}(h]h]h]h]h!]uh%hhjw1ubh)}(hhh]hS)}(h":gray13:`████████`h]h_)}(hj1h]h████████}hj1sbah}(h]h]gray13ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhjw1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray14``h]h)}(hj1h]hgray14}hj1sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h":gray14:`████████`h]h_)}(hj1h]h████████}hj1sbah}(h]h]gray14ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray15``h]h)}(hj2h]hgray15}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj 2ubh)}(hhh]hS)}(h":gray15:`████████`h]h_)}(hj32h]h████████}hj52sbah}(h]h]gray15ah]h]h!]uh%h^hj12ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.2ubah}(h]h]h]h]h!]uh%hhj 2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray16``h]h)}(hj]2h]hgray16}hj_2sbah}(h]h]h]h]h!]uh%hhj[2ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX2ubah}(h]h]h]h]h!]uh%hhjU2ubh)}(hhh]hS)}(h":gray16:`████████`h]h_)}(hj}2h]h████████}hj2sbah}(h]h]gray16ah]h]h!]uh%h^hj{2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx2ubah}(h]h]h]h]h!]uh%hhjU2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray17``h]h)}(hj2h]hgray17}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubh)}(hhh]hS)}(h":gray17:`████████`h]h_)}(hj2h]h████████}hj2sbah}(h]h]gray17ah]h]h!]uh%h^hj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray18``h]h)}(hj2h]hgray18}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubh)}(hhh]hS)}(h":gray18:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray18ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj 3ubah}(h]h]h]h]h!]uh%hhj2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray19``h]h)}(hj;3h]hgray19}hj=3sbah}(h]h]h]h]h!]uh%hhj93ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj63ubah}(h]h]h]h]h!]uh%hhj33ubh)}(hhh]hS)}(h":gray19:`████████`h]h_)}(hj[3h]h████████}hj]3sbah}(h]h]gray19ah]h]h!]uh%h^hjY3ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV3ubah}(h]h]h]h]h!]uh%hhj33ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray20``h]h)}(hj3h]hgray20}hj3sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj}3ubh)}(hhh]hS)}(h":gray20:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray20ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj}3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray21``h]h)}(hj3h]hgray21}hj3sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h":gray21:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray21ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray22``h]h)}(hj4h]hgray22}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray22:`████████`h]h_)}(hj94h]h████████}hj;4sbah}(h]h]gray22ah]h]h!]uh%h^hj74ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj44ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray23``h]h)}(hjc4h]hgray23}hje4sbah}(h]h]h]h]h!]uh%hhja4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^4ubah}(h]h]h]h]h!]uh%hhj[4ubh)}(hhh]hS)}(h":gray23:`████████`h]h_)}(hj4h]h████████}hj4sbah}(h]h]gray23ah]h]h!]uh%h^hj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~4ubah}(h]h]h]h]h!]uh%hhj[4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray24``h]h)}(hj4h]hgray24}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray24:`████████`h]h_)}(hj4h]h████████}hj4sbah}(h]h]gray24ah]h]h!]uh%h^hj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray25``h]h)}(hj4h]hgray25}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray25:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray25ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray26``h]h)}(hjA5h]hgray26}hjC5sbah}(h]h]h]h]h!]uh%hhj?5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<5ubah}(h]h]h]h]h!]uh%hhj95ubh)}(hhh]hS)}(h":gray26:`████████`h]h_)}(hja5h]h████████}hjc5sbah}(h]h]gray26ah]h]h!]uh%h^hj_5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\5ubah}(h]h]h]h]h!]uh%hhj95ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray27``h]h)}(hj5h]hgray27}hj5sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h":gray27:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray27ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray28``h]h)}(hj5h]hgray28}hj5sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h":gray28:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray28ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray29``h]h)}(hj6h]hgray29}hj!6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray29:`████████`h]h_)}(hj?6h]h████████}hjA6sbah}(h]h]gray29ah]h]h!]uh%h^hj=6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:6ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray30``h]h)}(hji6h]hgray30}hjk6sbah}(h]h]h]h]h!]uh%hhjg6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjd6ubah}(h]h]h]h]h!]uh%hhja6ubh)}(hhh]hS)}(h":gray30:`████████`h]h_)}(hj6h]h████████}hj6sbah}(h]h]gray30ah]h]h!]uh%h^hj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhja6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray31``h]h)}(hj6h]hgray31}hj6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray31:`████████`h]h_)}(hj6h]h████████}hj6sbah}(h]h]gray31ah]h]h!]uh%h^hj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray32``h]h)}(hj6h]hgray32}hj6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray32:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray32ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray33``h]h)}(hjG7h]hgray33}hjI7sbah}(h]h]h]h]h!]uh%hhjE7ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjB7ubah}(h]h]h]h]h!]uh%hhj?7ubh)}(hhh]hS)}(h":gray33:`████████`h]h_)}(hjg7h]h████████}hji7sbah}(h]h]gray33ah]h]h!]uh%h^hje7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjb7ubah}(h]h]h]h]h!]uh%hhj?7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray34``h]h)}(hj7h]hgray34}hj7sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h":gray34:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray34ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray35``h]h)}(hj7h]hgray35}hj7sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h":gray35:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray35ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray36``h]h)}(hj%8h]hgray36}hj'8sbah}(h]h]h]h]h!]uh%hhj#8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj 8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray36:`████████`h]h_)}(hjE8h]h████████}hjG8sbah}(h]h]gray36ah]h]h!]uh%h^hjC8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@8ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray37``h]h)}(hjo8h]hgray37}hjq8sbah}(h]h]h]h]h!]uh%hhjm8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjj8ubah}(h]h]h]h]h!]uh%hhjg8ubh)}(hhh]hS)}(h":gray37:`████████`h]h_)}(hj8h]h████████}hj8sbah}(h]h]gray37ah]h]h!]uh%h^hj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhjg8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray38``h]h)}(hj8h]hgray38}hj8sbah}(h]h]h]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray38:`████████`h]h_)}(hj8h]h████████}hj8sbah}(h]h]gray38ah]h]h!]uh%h^hj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray39``h]h)}(hj9h]hgray39}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray39:`████████`h]h_)}(hj#9h]h████████}hj%9sbah}(h]h]gray39ah]h]h!]uh%h^hj!9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray40``h]h)}(hjM9h]hgray40}hjO9sbah}(h]h]h]h]h!]uh%hhjK9ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjH9ubah}(h]h]h]h]h!]uh%hhjE9ubh)}(hhh]hS)}(h":gray40:`████████`h]h_)}(hjm9h]h████████}hjo9sbah}(h]h]gray40ah]h]h!]uh%h^hjk9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjh9ubah}(h]h]h]h]h!]uh%hhjE9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray41``h]h)}(hj9h]hgray41}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h":gray41:`████████`h]h_)}(hj9h]h████████}hj9sbah}(h]h]gray41ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray42``h]h)}(hj9h]hgray42}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj9ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h":gray42:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray42ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj9ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray43``h]h)}(hj+:h]hgray43}hj-:sbah}(h]h]h]h]h!]uh%hhj):ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj&:ubah}(h]h]h]h]h!]uh%hhj#:ubh)}(hhh]hS)}(h":gray43:`████████`h]h_)}(hjK:h]h████████}hjM:sbah}(h]h]gray43ah]h]h!]uh%h^hjI:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjF:ubah}(h]h]h]h]h!]uh%hhj#:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray44``h]h)}(hju:h]hgray44}hjw:sbah}(h]h]h]h]h!]uh%hhjs:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjp:ubah}(h]h]h]h]h!]uh%hhjm:ubh)}(hhh]hS)}(h":gray44:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray44ah]h]h!]uh%h^hj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhjm:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray45``h]h)}(hj:h]hgray45}hj:sbah}(h]h]h]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhj:ubh)}(hhh]hS)}(h":gray45:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray45ah]h]h!]uh%h^hj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhj:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray46``h]h)}(hj ;h]hgray46}hj ;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray46:`████████`h]h_)}(hj);h]h████████}hj+;sbah}(h]h]gray46ah]h]h!]uh%h^hj';ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj$;ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray47``h]h)}(hjS;h]hgray47}hjU;sbah}(h]h]h]h]h!]uh%hhjQ;ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjN;ubah}(h]h]h]h]h!]uh%hhjK;ubh)}(hhh]hS)}(h":gray47:`████████`h]h_)}(hjs;h]h████████}hju;sbah}(h]h]gray47ah]h]h!]uh%h^hjq;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjn;ubah}(h]h]h]h]h!]uh%hhjK;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray48``h]h)}(hj;h]hgray48}hj;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray48:`████████`h]h_)}(hj;h]h████████}hj;sbah}(h]h]gray48ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray49``h]h)}(hj;h]hgray49}hj;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray49:`████████`h]h_)}(hj<h]h████████}hj <sbah}(h]h]gray49ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray50``h]h)}(hj1<h]hgray50}hj3<sbah}(h]h]h]h]h!]uh%hhj/<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,<ubah}(h]h]h]h]h!]uh%hhj)<ubh)}(hhh]hS)}(h":gray50:`████████`h]h_)}(hjQ<h]h████████}hjS<sbah}(h]h]gray50ah]h]h!]uh%h^hjO<ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjL<ubah}(h]h]h]h]h!]uh%hhj)<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray51``h]h)}(hj{<h]hgray51}hj}<sbah}(h]h]h]h]h!]uh%hhjy<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjv<ubah}(h]h]h]h]h!]uh%hhjs<ubh)}(hhh]hS)}(h":gray51:`████████`h]h_)}(hj<h]h████████}hj<sbah}(h]h]gray51ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjs<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray52``h]h)}(hj<h]hgray52}hj<sbah}(h]h]h]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj<ubh)}(hhh]hS)}(h":gray52:`████████`h]h_)}(hj<h]h████████}hj<sbah}(h]h]gray52ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray53``h]h)}(hj=h]hgray53}hj=sbah}(h]h]h]h]h!]uh%hhj =ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj =ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray53:`████████`h]h_)}(hj/=h]h████████}hj1=sbah}(h]h]gray53ah]h]h!]uh%h^hj-=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*=ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray54``h]h)}(hjY=h]hgray54}hj[=sbah}(h]h]h]h]h!]uh%hhjW=ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjT=ubah}(h]h]h]h]h!]uh%hhjQ=ubh)}(hhh]hS)}(h":gray54:`████████`h]h_)}(hjy=h]h████████}hj{=sbah}(h]h]gray54ah]h]h!]uh%h^hjw=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjt=ubah}(h]h]h]h]h!]uh%hhjQ=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray55``h]h)}(hj=h]hgray55}hj=sbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray55:`████████`h]h_)}(hj=h]h████████}hj=sbah}(h]h]gray55ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray56``h]h)}(hj=h]hgray56}hj=sbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray56:`████████`h]h_)}(hj >h]h████████}hj>sbah}(h]h]gray56ah]h]h!]uh%h^hj >ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray57``h]h)}(hj7>h]hgray57}hj9>sbah}(h]h]h]h]h!]uh%hhj5>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2>ubah}(h]h]h]h]h!]uh%hhj/>ubh)}(hhh]hS)}(h":gray57:`████████`h]h_)}(hjW>h]h████████}hjY>sbah}(h]h]gray57ah]h]h!]uh%h^hjU>ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjR>ubah}(h]h]h]h]h!]uh%hhj/>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray58``h]h)}(hj>h]hgray58}hj>sbah}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|>ubah}(h]h]h]h]h!]uh%hhjy>ubh)}(hhh]hS)}(h":gray58:`████████`h]h_)}(hj>h]h████████}hj>sbah}(h]h]gray58ah]h]h!]uh%h^hj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhjy>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray59``h]h)}(hj>h]hgray59}hj>sbah}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj>ubh)}(hhh]hS)}(h":gray59:`████████`h]h_)}(hj>h]h████████}hj>sbah}(h]h]gray59ah]h]h!]uh%h^hj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray60``h]h)}(hj?h]hgray60}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj ?ubh)}(hhh]hS)}(h":gray60:`████████`h]h_)}(hj5?h]h████████}hj7?sbah}(h]h]gray60ah]h]h!]uh%h^hj3?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0?ubah}(h]h]h]h]h!]uh%hhj ?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray61``h]h)}(hj_?h]hgray61}hja?sbah}(h]h]h]h]h!]uh%hhj]?ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZ?ubah}(h]h]h]h]h!]uh%hhjW?ubh)}(hhh]hS)}(h":gray61:`████████`h]h_)}(hj?h]h████████}hj?sbah}(h]h]gray61ah]h]h!]uh%h^hj}?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz?ubah}(h]h]h]h]h!]uh%hhjW?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray62``h]h)}(hj?h]hgray62}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":gray62:`████████`h]h_)}(hj?h]h████████}hj?sbah}(h]h]gray62ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray63``h]h)}(hj?h]hgray63}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":gray63:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray63ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray64``h]h)}(hj=@h]hgray64}hj?@sbah}(h]h]h]h]h!]uh%hhj;@ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8@ubah}(h]h]h]h]h!]uh%hhj5@ubh)}(hhh]hS)}(h":gray64:`████████`h]h_)}(hj]@h]h████████}hj_@sbah}(h]h]gray64ah]h]h!]uh%h^hj[@ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX@ubah}(h]h]h]h]h!]uh%hhj5@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray65``h]h)}(hj@h]hgray65}hj@sbah}(h]h]h]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj@ubah}(h]h]h]h]h!]uh%hhj@ubh)}(hhh]hS)}(h":gray65:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray65ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj@ubah}(h]h]h]h]h!]uh%hhj@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray66``h]h)}(hj@h]hgray66}hj@sbah}(h]h]h]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj@ubah}(h]h]h]h]h!]uh%hhj@ubh)}(hhh]hS)}(h":gray66:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray66ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj@ubah}(h]h]h]h]h!]uh%hhj@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray67``h]h)}(hjAh]hgray67}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M"hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray67:`████████`h]h_)}(hj;Ah]h████████}hj=Asbah}(h]h]gray67ah]h]h!]uh%h^hj9Aubah}(h]h]h]h]h!]uh%hRh'h?h)M"hj6Aubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray68``h]h)}(hjeAh]hgray68}hjgAsbah}(h]h]h]h]h!]uh%hhjcAubah}(h]h]h]h]h!]uh%hRh'h?h)M#hj`Aubah}(h]h]h]h]h!]uh%hhj]Aubh)}(hhh]hS)}(h":gray68:`████████`h]h_)}(hjAh]h████████}hjAsbah}(h]h]gray68ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)M#hjAubah}(h]h]h]h]h!]uh%hhj]Aubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray69``h]h)}(hjAh]hgray69}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray69:`████████`h]h_)}(hjAh]h████████}hjAsbah}(h]h]gray69ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjAubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray70``h]h)}(hjAh]hgray70}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray70:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray70ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjBubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray71``h]h)}(hjCBh]hgray71}hjEBsbah}(h]h]h]h]h!]uh%hhjABubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj>Bubah}(h]h]h]h]h!]uh%hhj;Bubh)}(hhh]hS)}(h":gray71:`████████`h]h_)}(hjcBh]h████████}hjeBsbah}(h]h]gray71ah]h]h!]uh%h^hjaBubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj^Bubah}(h]h]h]h]h!]uh%hhj;Bubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray72``h]h)}(hjBh]hgray72}hjBsbah}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjBubah}(h]h]h]h]h!]uh%hhjBubh)}(hhh]hS)}(h":gray72:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray72ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjBubah}(h]h]h]h]h!]uh%hhjBubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray73``h]h)}(hjBh]hgray73}hjBsbah}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjBubah}(h]h]h]h]h!]uh%hhjBubh)}(hhh]hS)}(h":gray73:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray73ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjBubah}(h]h]h]h]h!]uh%hhjBubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray74``h]h)}(hj!Ch]hgray74}hj#Csbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjCubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h":gray74:`████████`h]h_)}(hjACh]h████████}hjCCsbah}(h]h]gray74ah]h]h!]uh%h^hj?Cubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjhj.Iubah}(h]h]h]h]h!]uh%hhj+Iubh)}(hhh]hS)}(h":gray95:`████████`h]h_)}(hjSIh]h████████}hjUIsbah}(h]h]gray95ah]h]h!]uh%h^hjQIubah}(h]h]h]h]h!]uh%hRh'h?h)M>hjNIubah}(h]h]h]h]h!]uh%hhj+Iubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray96``h]h)}(hj}Ih]hgray96}hjIsbah}(h]h]h]h]h!]uh%hhj{Iubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjxIubah}(h]h]h]h]h!]uh%hhjuIubh)}(hhh]hS)}(h":gray96:`████████`h]h_)}(hjIh]h████████}hjIsbah}(h]h]gray96ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjIubah}(h]h]h]h]h!]uh%hhjuIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray97``h]h)}(hjIh]hgray97}hjIsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjIubah}(h]h]h]h]h!]uh%hhjIubh)}(hhh]hS)}(h":gray97:`████████`h]h_)}(hjIh]h████████}hjIsbah}(h]h]gray97ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjIubah}(h]h]h]h]h!]uh%hhjIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray98``h]h)}(hjJh]hgray98}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj Jubah}(h]h]h]h]h!]uh%hhj Jubh)}(hhh]hS)}(h":gray98:`████████`h]h_)}(hj1Jh]h████████}hj3Jsbah}(h]h]gray98ah]h]h!]uh%h^hj/Jubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj,Jubah}(h]h]h]h]h!]uh%hhj Jubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray99``h]h)}(hj[Jh]hgray99}hj]Jsbah}(h]h]h]h]h!]uh%hhjYJubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjVJubah}(h]h]h]h]h!]uh%hhjSJubh)}(hhh]hS)}(h":gray99:`████████`h]h_)}(hj{Jh]h████████}hj}Jsbah}(h]h]gray99ah]h]h!]uh%h^hjyJubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjvJubah}(h]h]h]h]h!]uh%hhjSJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray100``h]h)}(hjJh]hgray100}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MChjJubah}(h]h]h]h]h!]uh%hhjJubh)}(hhh]hS)}(h#:gray100:`████████`h]h_)}(hjJh]h████████}hjJsbah}(h]h]gray100ah]h]h!]uh%h^hjJubah}(h]h]h]h]h!]uh%hRh'h?h)MChjJubah}(h]h]h]h]h!]uh%hhjJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green``h]h)}(hjJh]hgreen}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MDhjJubah}(h]h]h]h]h!]uh%hhjJubh)}(hhh]hS)}(h!:green:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]greenah]h]h!]uh%h^hj Kubah}(h]h]h]h]h!]uh%hRh'h?h)MDhj Kubah}(h]h]h]h]h!]uh%hhjJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green1``h]h)}(hj9Kh]hgreen1}hj;Ksbah}(h]h]h]h]h!]uh%hhj7Kubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4Kubah}(h]h]h]h]h!]uh%hhj1Kubh)}(hhh]hS)}(h":green1:`████████`h]h_)}(hjYKh]h████████}hj[Ksbah}(h]h]green1ah]h]h!]uh%h^hjWKubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTKubah}(h]h]h]h]h!]uh%hhj1Kubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green2``h]h)}(hjKh]hgreen2}hjKsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~Kubah}(h]h]h]h]h!]uh%hhj{Kubh)}(hhh]hS)}(h":green2:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]green2ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjKubah}(h]h]h]h]h!]uh%hhj{Kubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green3``h]h)}(hjKh]hgreen3}hjKsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjKubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h":green3:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]green3ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjKubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green4``h]h)}(hjLh]hgreen4}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h":green4:`████████`h]h_)}(hj7Lh]h████████}hj9Lsbah}(h]h]green4ah]h]h!]uh%h^hj5Lubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2Lubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``greenyellow``h]h)}(hjaLh]h greenyellow}hjcLsbah}(h]h]h]h]h!]uh%hhj_Lubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\Lubah}(h]h]h]h]h!]uh%hhjYLubh)}(hhh]hS)}(h':greenyellow:`████████`h]h_)}(hjLh]h████████}hjLsbah}(h]h] greenyellowah]h]h!]uh%h^hjLubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|Lubah}(h]h]h]h]h!]uh%hhjYLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``grey``h]h)}(hjLh]hgrey}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h :grey:`████████`h]h_)}(hjLh]h████████}hjLsbah}(h]h]greyah]h]h!]uh%h^hjLubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjLubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey0``h]h)}(hjLh]hgrey0}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h!:grey0:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey0ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjMubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey1``h]h)}(hj?Mh]hgrey1}hjAMsbah}(h]h]h]h]h!]uh%hhj=Mubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:Mubah}(h]h]h]h]h!]uh%hhj7Mubh)}(hhh]hS)}(h!:grey1:`████████`h]h_)}(hj_Mh]h████████}hjaMsbah}(h]h]grey1ah]h]h!]uh%h^hj]Mubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZMubah}(h]h]h]h]h!]uh%hhj7Mubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey2``h]h)}(hjMh]hgrey2}hjMsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjMubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h!:grey2:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey2ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjMubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey3``h]h)}(hjMh]hgrey3}hjMsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjMubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h!:grey3:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey3ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjMubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey4``h]h)}(hjNh]hgrey4}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey4:`████████`h]h_)}(hj=Nh]h████████}hj?Nsbah}(h]h]grey4ah]h]h!]uh%h^hj;Nubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8Nubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey5``h]h)}(hjgNh]hgrey5}hjiNsbah}(h]h]h]h]h!]uh%hhjeNubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbNubah}(h]h]h]h]h!]uh%hhj_Nubh)}(hhh]hS)}(h!:grey5:`████████`h]h_)}(hjNh]h████████}hjNsbah}(h]h]grey5ah]h]h!]uh%h^hjNubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjNubah}(h]h]h]h]h!]uh%hhj_Nubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey6``h]h)}(hjNh]hgrey6}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey6:`████████`h]h_)}(hjNh]h████████}hjNsbah}(h]h]grey6ah]h]h!]uh%h^hjNubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjNubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey7``h]h)}(hjNh]hgrey7}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey7:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey7ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjOubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey8``h]h)}(hjEOh]hgrey8}hjGOsbah}(h]h]h]h]h!]uh%hhjCOubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@Oubah}(h]h]h]h]h!]uh%hhj=Oubh)}(hhh]hS)}(h!:grey8:`████████`h]h_)}(hjeOh]h████████}hjgOsbah}(h]h]grey8ah]h]h!]uh%h^hjcOubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`Oubah}(h]h]h]h]h!]uh%hhj=Oubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey9``h]h)}(hjOh]hgrey9}hjOsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MThjOubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h!:grey9:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey9ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MThjOubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey10``h]h)}(hjOh]hgrey10}hjOsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjOubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h":grey10:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey10ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjOubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey11``h]h)}(hj#Ph]hgrey11}hj%Psbah}(h]h]h]h]h!]uh%hhj!Pubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey11:`████████`h]h_)}(hjCPh]h████████}hjEPsbah}(h]h]grey11ah]h]h!]uh%h^hjAPubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>Pubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey12``h]h)}(hjmPh]hgrey12}hjoPsbah}(h]h]h]h]h!]uh%hhjkPubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhPubah}(h]h]h]h]h!]uh%hhjePubh)}(hhh]hS)}(h":grey12:`████████`h]h_)}(hjPh]h████████}hjPsbah}(h]h]grey12ah]h]h!]uh%h^hjPubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjPubah}(h]h]h]h]h!]uh%hhjePubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey13``h]h)}(hjPh]hgrey13}hjPsbah}(h]h]h]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey13:`████████`h]h_)}(hjPh]h████████}hjPsbah}(h]h]grey13ah]h]h!]uh%h^hjPubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjPubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey14``h]h)}(hjQh]hgrey14}hjQsbah}(h]h]h]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey14:`████████`h]h_)}(hj!Qh]h████████}hj#Qsbah}(h]h]grey14ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjQubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey15``h]h)}(hjKQh]hgrey15}hjMQsbah}(h]h]h]h]h!]uh%hhjIQubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFQubah}(h]h]h]h]h!]uh%hhjCQubh)}(hhh]hS)}(h":grey15:`████████`h]h_)}(hjkQh]h████████}hjmQsbah}(h]h]grey15ah]h]h!]uh%h^hjiQubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfQubah}(h]h]h]h]h!]uh%hhjCQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey16``h]h)}(hjQh]hgrey16}hjQsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjQubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h":grey16:`████████`h]h_)}(hjQh]h████████}hjQsbah}(h]h]grey16ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjQubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey17``h]h)}(hjQh]hgrey17}hjQsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjQubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h":grey17:`████████`h]h_)}(hjQh]h████████}hjRsbah}(h]h]grey17ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjQubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey18``h]h)}(hj)Rh]hgrey18}hj+Rsbah}(h]h]h]h]h!]uh%hhj'Rubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$Rubah}(h]h]h]h]h!]uh%hhj!Rubh)}(hhh]hS)}(h":grey18:`████████`h]h_)}(hjIRh]h████████}hjKRsbah}(h]h]grey18ah]h]h!]uh%h^hjGRubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDRubah}(h]h]h]h]h!]uh%hhj!Rubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey19``h]h)}(hjsRh]hgrey19}hjuRsbah}(h]h]h]h]h!]uh%hhjqRubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnRubah}(h]h]h]h]h!]uh%hhjkRubh)}(hhh]hS)}(h":grey19:`████████`h]h_)}(hjRh]h████████}hjRsbah}(h]h]grey19ah]h]h!]uh%h^hjRubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjRubah}(h]h]h]h]h!]uh%hhjkRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey20``h]h)}(hjRh]hgrey20}hjRsbah}(h]h]h]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjRubah}(h]h]h]h]h!]uh%hhjRubh)}(hhh]hS)}(h":grey20:`████████`h]h_)}(hjRh]h████████}hjRsbah}(h]h]grey20ah]h]h!]uh%h^hjRubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjRubah}(h]h]h]h]h!]uh%hhjRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey21``h]h)}(hjSh]hgrey21}hj Ssbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)M`hjSubah}(h]h]h]h]h!]uh%hhjRubh)}(hhh]hS)}(h":grey21:`████████`h]h_)}(hj'Sh]h████████}hj)Ssbah}(h]h]grey21ah]h]h!]uh%h^hj%Subah}(h]h]h]h]h!]uh%hRh'h?h)M`hj"Subah}(h]h]h]h]h!]uh%hhjRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey22``h]h)}(hjQSh]hgrey22}hjSSsbah}(h]h]h]h]h!]uh%hhjOSubah}(h]h]h]h]h!]uh%hRh'h?h)MahjLSubah}(h]h]h]h]h!]uh%hhjISubh)}(hhh]hS)}(h":grey22:`████████`h]h_)}(hjqSh]h████████}hjsSsbah}(h]h]grey22ah]h]h!]uh%h^hjoSubah}(h]h]h]h]h!]uh%hRh'h?h)MahjlSubah}(h]h]h]h]h!]uh%hhjISubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey23``h]h)}(hjSh]hgrey23}hjSsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MbhjSubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h":grey23:`████████`h]h_)}(hjSh]h████████}hjSsbah}(h]h]grey23ah]h]h!]uh%h^hjSubah}(h]h]h]h]h!]uh%hRh'h?h)MbhjSubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey24``h]h)}(hjSh]hgrey24}hjSsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MchjSubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h":grey24:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey24ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MchjTubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey25``h]h)}(hj/Th]hgrey25}hj1Tsbah}(h]h]h]h]h!]uh%hhj-Tubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj*Tubah}(h]h]h]h]h!]uh%hhj'Tubh)}(hhh]hS)}(h":grey25:`████████`h]h_)}(hjOTh]h████████}hjQTsbah}(h]h]grey25ah]h]h!]uh%h^hjMTubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJTubah}(h]h]h]h]h!]uh%hhj'Tubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey26``h]h)}(hjyTh]hgrey26}hj{Tsbah}(h]h]h]h]h!]uh%hhjwTubah}(h]h]h]h]h!]uh%hRh'h?h)MehjtTubah}(h]h]h]h]h!]uh%hhjqTubh)}(hhh]hS)}(h":grey26:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey26ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MehjTubah}(h]h]h]h]h!]uh%hhjqTubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey27``h]h)}(hjTh]hgrey27}hjTsbah}(h]h]h]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%hRh'h?h)MfhjTubah}(h]h]h]h]h!]uh%hhjTubh)}(hhh]hS)}(h":grey27:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey27ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MfhjTubah}(h]h]h]h]h!]uh%hhjTubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey28``h]h)}(hj Uh]hgrey28}hjUsbah}(h]h]h]h]h!]uh%hhj Uubah}(h]h]h]h]h!]uh%hRh'h?h)MghjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey28:`████████`h]h_)}(hj-Uh]h████████}hj/Usbah}(h]h]grey28ah]h]h!]uh%h^hj+Uubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj(Uubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey29``h]h)}(hjWUh]hgrey29}hjYUsbah}(h]h]h]h]h!]uh%hhjUUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjRUubah}(h]h]h]h]h!]uh%hhjOUubh)}(hhh]hS)}(h":grey29:`████████`h]h_)}(hjwUh]h████████}hjyUsbah}(h]h]grey29ah]h]h!]uh%h^hjuUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjrUubah}(h]h]h]h]h!]uh%hhjOUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey30``h]h)}(hjUh]hgrey30}hjUsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MihjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey30:`████████`h]h_)}(hjUh]h████████}hjUsbah}(h]h]grey30ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MihjUubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey31``h]h)}(hjUh]hgrey31}hjUsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MjhjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey31:`████████`h]h_)}(hj Vh]h████████}hj Vsbah}(h]h]grey31ah]h]h!]uh%h^hj Vubah}(h]h]h]h]h!]uh%hRh'h?h)MjhjVubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey32``h]h)}(hj5Vh]hgrey32}hj7Vsbah}(h]h]h]h]h!]uh%hhj3Vubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0Vubah}(h]h]h]h]h!]uh%hhj-Vubh)}(hhh]hS)}(h":grey32:`████████`h]h_)}(hjUVh]h████████}hjWVsbah}(h]h]grey32ah]h]h!]uh%h^hjSVubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjPVubah}(h]h]h]h]h!]uh%hhj-Vubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey33``h]h)}(hjVh]hgrey33}hjVsbah}(h]h]h]h]h!]uh%hhj}Vubah}(h]h]h]h]h!]uh%hRh'h?h)MlhjzVubah}(h]h]h]h]h!]uh%hhjwVubh)}(hhh]hS)}(h":grey33:`████████`h]h_)}(hjVh]h████████}hjVsbah}(h]h]grey33ah]h]h!]uh%h^hjVubah}(h]h]h]h]h!]uh%hRh'h?h)MlhjVubah}(h]h]h]h]h!]uh%hhjwVubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey34``h]h)}(hjVh]hgrey34}hjVsbah}(h]h]h]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjVubah}(h]h]h]h]h!]uh%hhjVubh)}(hhh]hS)}(h":grey34:`████████`h]h_)}(hjVh]h████████}hjVsbah}(h]h]grey34ah]h]h!]uh%h^hjVubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjVubah}(h]h]h]h]h!]uh%hhjVubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey35``h]h)}(hjWh]hgrey35}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MnhjWubah}(h]h]h]h]h!]uh%hhj Wubh)}(hhh]hS)}(h":grey35:`████████`h]h_)}(hj3Wh]h████████}hj5Wsbah}(h]h]grey35ah]h]h!]uh%h^hj1Wubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj.Wubah}(h]h]h]h]h!]uh%hhj Wubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey36``h]h)}(hj]Wh]hgrey36}hj_Wsbah}(h]h]h]h]h!]uh%hhj[Wubah}(h]h]h]h]h!]uh%hRh'h?h)MohjXWubah}(h]h]h]h]h!]uh%hhjUWubh)}(hhh]hS)}(h":grey36:`████████`h]h_)}(hj}Wh]h████████}hjWsbah}(h]h]grey36ah]h]h!]uh%h^hj{Wubah}(h]h]h]h]h!]uh%hRh'h?h)MohjxWubah}(h]h]h]h]h!]uh%hhjUWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey37``h]h)}(hjWh]hgrey37}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MphjWubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h":grey37:`████████`h]h_)}(hjWh]h████████}hjWsbah}(h]h]grey37ah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MphjWubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey38``h]h)}(hjWh]hgrey38}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MqhjWubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h":grey38:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey38ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj Xubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey39``h]h)}(hj;Xh]hgrey39}hj=Xsbah}(h]h]h]h]h!]uh%hhj9Xubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6Xubah}(h]h]h]h]h!]uh%hhj3Xubh)}(hhh]hS)}(h":grey39:`████████`h]h_)}(hj[Xh]h████████}hj]Xsbah}(h]h]grey39ah]h]h!]uh%h^hjYXubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVXubah}(h]h]h]h]h!]uh%hhj3Xubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey40``h]h)}(hjXh]hgrey40}hjXsbah}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%hRh'h?h)MshjXubah}(h]h]h]h]h!]uh%hhj}Xubh)}(hhh]hS)}(h":grey40:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey40ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)MshjXubah}(h]h]h]h]h!]uh%hhj}Xubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey41``h]h)}(hjXh]hgrey41}hjXsbah}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%hRh'h?h)MthjXubah}(h]h]h]h]h!]uh%hhjXubh)}(hhh]hS)}(h":grey41:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey41ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)MthjXubah}(h]h]h]h]h!]uh%hhjXubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey42``h]h)}(hjYh]hgrey42}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MuhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey42:`████████`h]h_)}(hj9Yh]h████████}hj;Ysbah}(h]h]grey42ah]h]h!]uh%h^hj7Yubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4Yubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey43``h]h)}(hjcYh]hgrey43}hjeYsbah}(h]h]h]h]h!]uh%hhjaYubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^Yubah}(h]h]h]h]h!]uh%hhj[Yubh)}(hhh]hS)}(h":grey43:`████████`h]h_)}(hjYh]h████████}hjYsbah}(h]h]grey43ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~Yubah}(h]h]h]h]h!]uh%hhj[Yubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey44``h]h)}(hjYh]hgrey44}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MwhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey44:`████████`h]h_)}(hjYh]h████████}hjYsbah}(h]h]grey44ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MwhjYubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey45``h]h)}(hjYh]hgrey45}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MxhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey45:`████████`h]h_)}(hjZh]h████████}hjZsbah}(h]h]grey45ah]h]h!]uh%h^hjZubah}(h]h]h]h]h!]uh%hRh'h?h)MxhjZubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey46``h]h)}(hjAZh]hgrey46}hjCZsbah}(h]h]h]h]h!]uh%hhj?Zubah}(h]h]h]h]h!]uh%hRh'h?h)Myhjgubah}(h]h]h]h]h!]uh%hhj;gubh)}(hhh]hS)}(h":grey91:`████████`h]h_)}(hjcgh]h████████}hjegsbah}(h]h]grey91ah]h]h!]uh%h^hjagubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^gubah}(h]h]h]h]h!]uh%hhj;gubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey92``h]h)}(hjgh]hgrey92}hjgsbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h":grey92:`████████`h]h_)}(hjgh]h████████}hjgsbah}(h]h]grey92ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey93``h]h)}(hjgh]hgrey93}hjgsbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h":grey93:`████████`h]h_)}(hjgh]h████████}hjgsbah}(h]h]grey93ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey94``h]h)}(hj!hh]hgrey94}hj#hsbah}(h]h]h]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjhubh)}(hhh]hS)}(h":grey94:`████████`h]h_)}(hjAhh]h████████}hjChsbah}(h]h]grey94ah]h]h!]uh%h^hj?hubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue1``h]h)}(hjmuh]h lightblue1}hjousbah}(h]h]h]h]h!]uh%hhjkuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhuubah}(h]h]h]h]h!]uh%hhjeuubh)}(hhh]hS)}(h&:lightblue1:`████████`h]h_)}(hjuh]h████████}hjusbah}(h]h] lightblue1ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjeuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue2``h]h)}(hjuh]h lightblue2}hjusbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h&:lightblue2:`████████`h]h_)}(hjuh]h████████}hjusbah}(h]h] lightblue2ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue3``h]h)}(hjvh]h lightblue3}hjvsbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h&:lightblue3:`████████`h]h_)}(hj!vh]h████████}hj#vsbah}(h]h] lightblue3ah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue4``h]h)}(hjKvh]h lightblue4}hjMvsbah}(h]h]h]h]h!]uh%hhjIvubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFvubah}(h]h]h]h]h!]uh%hhjCvubh)}(hhh]hS)}(h&:lightblue4:`████████`h]h_)}(hjkvh]h████████}hjmvsbah}(h]h] lightblue4ah]h]h!]uh%h^hjivubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfvubah}(h]h]h]h]h!]uh%hhjCvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcoral``h]h)}(hjvh]h lightcoral}hjvsbah}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubh)}(hhh]hS)}(h&:lightcoral:`████████`h]h_)}(hjvh]h████████}hjvsbah}(h]h] lightcoralah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightcyan``h]h)}(hjvh]h lightcyan}hjvsbah}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubh)}(hhh]hS)}(h%:lightcyan:`████████`h]h_)}(hjvh]h████████}hjwsbah}(h]h] lightcyanah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan1``h]h)}(hj)wh]h lightcyan1}hj+wsbah}(h]h]h]h]h!]uh%hhj'wubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$wubah}(h]h]h]h]h!]uh%hhj!wubh)}(hhh]hS)}(h&:lightcyan1:`████████`h]h_)}(hjIwh]h████████}hjKwsbah}(h]h] lightcyan1ah]h]h!]uh%h^hjGwubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDwubah}(h]h]h]h]h!]uh%hhj!wubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan2``h]h)}(hjswh]h lightcyan2}hjuwsbah}(h]h]h]h]h!]uh%hhjqwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnwubah}(h]h]h]h]h!]uh%hhjkwubh)}(hhh]hS)}(h&:lightcyan2:`████████`h]h_)}(hjwh]h████████}hjwsbah}(h]h] lightcyan2ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjkwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan3``h]h)}(hjwh]h lightcyan3}hjwsbah}(h]h]h]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h&:lightcyan3:`████████`h]h_)}(hjwh]h████████}hjwsbah}(h]h] lightcyan3ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan4``h]h)}(hjxh]h lightcyan4}hj xsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h&:lightcyan4:`████████`h]h_)}(hj'xh]h████████}hj)xsbah}(h]h] lightcyan4ah]h]h!]uh%h^hj%xubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"xubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod``h]h)}(hjQxh]hlightgoldenrod}hjSxsbah}(h]h]h]h]h!]uh%hhjOxubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLxubah}(h]h]h]h]h!]uh%hhjIxubh)}(hhh]hS)}(h*:lightgoldenrod:`████████`h]h_)}(hjqxh]h████████}hjsxsbah}(h]h]lightgoldenrodah]h]h!]uh%h^hjoxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjlxubah}(h]h]h]h]h!]uh%hhjIxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod1``h]h)}(hjxh]hlightgoldenrod1}hjxsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubh)}(hhh]hS)}(h+:lightgoldenrod1:`████████`h]h_)}(hjxh]h████████}hjxsbah}(h]h]lightgoldenrod1ah]h]h!]uh%h^hjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod2``h]h)}(hjxh]hlightgoldenrod2}hjxsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubh)}(hhh]hS)}(h+:lightgoldenrod2:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrod2ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod3``h]h)}(hj/yh]hlightgoldenrod3}hj1ysbah}(h]h]h]h]h!]uh%hhj-yubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*yubah}(h]h]h]h]h!]uh%hhj'yubh)}(hhh]hS)}(h+:lightgoldenrod3:`████████`h]h_)}(hjOyh]h████████}hjQysbah}(h]h]lightgoldenrod3ah]h]h!]uh%h^hjMyubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJyubah}(h]h]h]h]h!]uh%hhj'yubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod4``h]h)}(hjyyh]hlightgoldenrod4}hj{ysbah}(h]h]h]h]h!]uh%hhjwyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtyubah}(h]h]h]h]h!]uh%hhjqyubh)}(hhh]hS)}(h+:lightgoldenrod4:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrod4ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjqyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrodyellow``h]h)}(hjyh]hlightgoldenrodyellow}hjysbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h0:lightgoldenrodyellow:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrodyellowah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightgray``h]h)}(hj zh]h lightgray}hjzsbah}(h]h]h]h]h!]uh%hhj zubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightgray:`████████`h]h_)}(hj-zh]h████████}hj/zsbah}(h]h] lightgrayah]h]h!]uh%h^hj+zubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(zubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgreen``h]h)}(hjWzh]h lightgreen}hjYzsbah}(h]h]h]h]h!]uh%hhjUzubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRzubah}(h]h]h]h]h!]uh%hhjOzubh)}(hhh]hS)}(h&:lightgreen:`████████`h]h_)}(hjwzh]h████████}hjyzsbah}(h]h] lightgreenah]h]h!]uh%h^hjuzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjrzubah}(h]h]h]h]h!]uh%hhjOzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightgrey``h]h)}(hjzh]h lightgrey}hjzsbah}(h]h]h]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightgrey:`████████`h]h_)}(hjzh]h████████}hjzsbah}(h]h] lightgreyah]h]h!]uh%h^hjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightpink``h]h)}(hjzh]h lightpink}hjzsbah}(h]h]h]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightpink:`████████`h]h_)}(hj {h]h████████}hj {sbah}(h]h] lightpinkah]h]h!]uh%h^hj {ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink1``h]h)}(hj5{h]h lightpink1}hj7{sbah}(h]h]h]h]h!]uh%hhj3{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0{ubah}(h]h]h]h]h!]uh%hhj-{ubh)}(hhh]hS)}(h&:lightpink1:`████████`h]h_)}(hjU{h]h████████}hjW{sbah}(h]h] lightpink1ah]h]h!]uh%h^hjS{ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP{ubah}(h]h]h]h]h!]uh%hhj-{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink2``h]h)}(hj{h]h lightpink2}hj{sbah}(h]h]h]h]h!]uh%hhj}{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz{ubah}(h]h]h]h]h!]uh%hhjw{ubh)}(hhh]hS)}(h&:lightpink2:`████████`h]h_)}(hj{h]h████████}hj{sbah}(h]h] lightpink2ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhjw{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink3``h]h)}(hj{h]h lightpink3}hj{sbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h&:lightpink3:`████████`h]h_)}(hj{h]h████████}hj{sbah}(h]h] lightpink3ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink4``h]h)}(hj|h]h lightpink4}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj |ubh)}(hhh]hS)}(h&:lightpink4:`████████`h]h_)}(hj3|h]h████████}hj5|sbah}(h]h] lightpink4ah]h]h!]uh%h^hj1|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.|ubah}(h]h]h]h]h!]uh%hhj |ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon``h]h)}(hj]|h]h lightsalmon}hj_|sbah}(h]h]h]h]h!]uh%hhj[|ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX|ubah}(h]h]h]h]h!]uh%hhjU|ubh)}(hhh]hS)}(h':lightsalmon:`████████`h]h_)}(hj}|h]h████████}hj|sbah}(h]h] lightsalmonah]h]h!]uh%h^hj{|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx|ubah}(h]h]h]h]h!]uh%hhjU|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon1``h]h)}(hj|h]h lightsalmon1}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubh)}(hhh]hS)}(h(:lightsalmon1:`████████`h]h_)}(hj|h]h████████}hj|sbah}(h]h] lightsalmon1ah]h]h!]uh%h^hj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon2``h]h)}(hj|h]h lightsalmon2}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubh)}(hhh]hS)}(h(:lightsalmon2:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightsalmon2ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj }ubah}(h]h]h]h]h!]uh%hhj|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon3``h]h)}(hj;}h]h lightsalmon3}hj=}sbah}(h]h]h]h]h!]uh%hhj9}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6}ubah}(h]h]h]h]h!]uh%hhj3}ubh)}(hhh]hS)}(h(:lightsalmon3:`████████`h]h_)}(hj[}h]h████████}hj]}sbah}(h]h] lightsalmon3ah]h]h!]uh%h^hjY}ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV}ubah}(h]h]h]h]h!]uh%hhj3}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon4``h]h)}(hj}h]h lightsalmon4}hj}sbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}}ubh)}(hhh]hS)}(h(:lightsalmon4:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightsalmon4ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightseagreen``h]h)}(hj}h]h lightseagreen}hj}sbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h):lightseagreen:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightseagreenah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue``h]h)}(hj~h]h lightskyblue}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h(:lightskyblue:`████████`h]h_)}(hj9~h]h████████}hj;~sbah}(h]h] lightskyblueah]h]h!]uh%h^hj7~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4~ubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue1``h]h)}(hjc~h]h lightskyblue1}hje~sbah}(h]h]h]h]h!]uh%hhja~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^~ubah}(h]h]h]h]h!]uh%hhj[~ubh)}(hhh]hS)}(h):lightskyblue1:`████████`h]h_)}(hj~h]h████████}hj~sbah}(h]h] lightskyblue1ah]h]h!]uh%h^hj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~~ubah}(h]h]h]h]h!]uh%hhj[~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue2``h]h)}(hj~h]h lightskyblue2}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h):lightskyblue2:`████████`h]h_)}(hj~h]h████████}hj~sbah}(h]h] lightskyblue2ah]h]h!]uh%h^hj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue3``h]h)}(hj~h]h lightskyblue3}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h):lightskyblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightskyblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue4``h]h)}(hjAh]h lightskyblue4}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h):lightskyblue4:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] lightskyblue4ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslateblue``h]h)}(hjh]hlightslateblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightslateblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslategray``h]h)}(hjh]hlightslategray}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslategray:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightslategrayah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslategrey``h]h)}(hjh]hlightslategrey}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslategrey:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h]lightslategreyah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue``h]h)}(hjih]hlightsteelblue}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h*:lightsteelblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue1``h]h)}(hjh]hlightsteelblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue1:`████████`h]h_)}(hjӀh]h████████}hjՀsbah}(h]h]lightsteelblue1ah]h]h!]uh%h^hjрubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj΀ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue2``h]h)}(hjh]hlightsteelblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue3``h]h)}(hjGh]hlightsteelblue3}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h+:lightsteelblue3:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h]lightsteelblue3ah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue4``h]h)}(hjh]hlightsteelblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow``h]h)}(hjہh]h lightyellow}hj݁sbah}(h]h]h]h]h!]uh%hhjفubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjցubah}(h]h]h]h]h!]uh%hhjӁubh)}(hhh]hS)}(h':lightyellow:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightyellowah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjӁubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow1``h]h)}(hj%h]h lightyellow1}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow1:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h] lightyellow1ah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow2``h]h)}(hjoh]h lightyellow2}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h(:lightyellow2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightyellow2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow3``h]h)}(hjh]h lightyellow3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow3:`████████`h]h_)}(hjقh]h████████}hjۂsbah}(h]h] lightyellow3ah]h]h!]uh%h^hjׂubah}(h]h]h]h]h!]uh%hRh'h?h)MhjԂubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow4``h]h)}(hjh]h lightyellow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow4:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] lightyellow4ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lime``h]h)}(hjMh]hlime}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h :lime:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h]limeah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``limegreen``h]h)}(hjh]h limegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:limegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] limegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``linen``h]h)}(hjh]hlinen}hjsbah}(h]h]h]h]h!]uh%hhj߃ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj܃ubah}(h]h]h]h]h!]uh%hhjكubh)}(hhh]hS)}(h!:linen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]linenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjكubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta``h]h)}(hj+h]hmagenta}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h#:magenta:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h]magentaah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M hjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta1``h]h)}(hjuh]hmagenta1}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)M hjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h$:magenta1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]magenta1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta2``h]h)}(hjh]hmagenta2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:magenta2:`████████`h]h_)}(hj߄h]h████████}hjsbah}(h]h]magenta2ah]h]h!]uh%h^hj݄ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjڄubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta3``h]h)}(hj h]hmagenta3}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:magenta3:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h]magenta3ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta4``h]h)}(hjSh]hmagenta4}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h$:magenta4:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h]magenta4ah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon``h]h)}(hjh]hmaroon}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":maroon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon1``h]h)}(hjh]hmaroon1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj߅ubh)}(hhh]hS)}(h#:maroon1:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h]maroon1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj߅ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon2``h]h)}(hj1h]hmaroon2}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h#:maroon2:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]maroon2ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon3``h]h)}(hj{h]hmaroon3}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h#:maroon3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroon3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon4``h]h)}(hjņh]hmaroon4}hjdžsbah}(h]h]h]h]h!]uh%hhjÆubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:maroon4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroon4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumaquamarine``h]h)}(hjh]hmediumaquamarine}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h,:mediumaquamarine:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]mediumaquamarineah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumblue``h]h)}(hjYh]h mediumblue}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h&:mediumblue:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h] mediumblueah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid``h]h)}(hjh]h mediumorchid}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:mediumorchid:`████████`h]h_)}(hjÇh]h████████}hjŇsbah}(h]h] mediumorchidah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid1``h]h)}(hjh]h mediumorchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumorchid1:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h] mediumorchid1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid2``h]h)}(hj7h]h mediumorchid2}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h):mediumorchid2:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h] mediumorchid2ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid3``h]h)}(hjh]h mediumorchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h):mediumorchid3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumorchid3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid4``h]h)}(hjˈh]h mediumorchid4}hj͈sbah}(h]h]h]h]h!]uh%hhjɈubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƈubah}(h]h]h]h]h!]uh%hhjÈubh)}(hhh]hS)}(h):mediumorchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumorchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjÈubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple``h]h)}(hjh]h mediumpurple}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h(:mediumpurple:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h] mediumpurpleah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple1``h]h)}(hj_h]h mediumpurple1}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h):mediumpurple1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumpurple1ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple2``h]h)}(hjh]h mediumpurple2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumpurple2:`████████`h]h_)}(hjɉh]h████████}hjˉsbah}(h]h] mediumpurple2ah]h]h!]uh%h^hjljubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjĉubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple3``h]h)}(hjh]h mediumpurple3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumpurple3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumpurple3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple4``h]h)}(hj=h]h mediumpurple4}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h):mediumpurple4:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] mediumpurple4ah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumseagreen``h]h)}(hjh]hmediumseagreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:mediumseagreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumseagreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumslateblue``h]h)}(hjъh]hmediumslateblue}hjӊsbah}(h]h]h]h]h!]uh%hhjϊubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj̊ubah}(h]h]h]h]h!]uh%hhjɊubh)}(hhh]hS)}(h+:mediumslateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumslateblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M!hjubah}(h]h]h]h]h!]uh%hhjɊubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumspringgreen``h]h)}(hjh]hmediumspringgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M"hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h-:mediumspringgreen:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h]mediumspringgreenah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M"hj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumturquoise``h]h)}(hjeh]hmediumturquoise}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)M#hj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h+:mediumturquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumturquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M#hjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumvioletred``h]h)}(hjh]hmediumvioletred}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:mediumvioletred:`████████`h]h_)}(hjϋh]h████████}hjыsbah}(h]h]mediumvioletredah]h]h!]uh%h^hj͋ubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjʋubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``midnightblue``h]h)}(hjh]h midnightblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:midnightblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] midnightblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``mintcream``h]h)}(hjCh]h mintcream}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h%:mintcream:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] mintcreamah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``mistyrose``h]h)}(hjh]h mistyrose}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:mistyrose:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyroseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose1``h]h)}(hj׌h]h mistyrose1}hjٌsbah}(h]h]h]h]h!]uh%hhjՌubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjҌubah}(h]h]h]h]h!]uh%hhjόubh)}(hhh]hS)}(h&:mistyrose1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyrose1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjubah}(h]h]h]h]h!]uh%hhjόubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose2``h]h)}(hj!h]h mistyrose2}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:mistyrose2:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h] mistyrose2ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)M)hj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose3``h]h)}(hjkh]h mistyrose3}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)M*hjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h&:mistyrose3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyrose3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M*hjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose4``h]h)}(hjh]h mistyrose4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M+hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:mistyrose4:`████████`h]h_)}(hjՍh]h████████}hj׍sbah}(h]h] mistyrose4ah]h]h!]uh%h^hjӍubah}(h]h]h]h]h!]uh%hRh'h?h)M+hjЍubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``moccasin``h]h)}(hjh]hmoccasin}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M,hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:moccasin:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h]moccasinah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M,hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite``h]h)}(hjIh]h navajowhite}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)M-hjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h':navajowhite:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] navajowhiteah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)M-hjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite1``h]h)}(hjh]h navajowhite1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M.hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:navajowhite1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M.hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite2``h]h)}(hjݎh]h navajowhite2}hjߎsbah}(h]h]h]h]h!]uh%hhjێubah}(h]h]h]h]h!]uh%hRh'h?h)M/hj؎ubah}(h]h]h]h]h!]uh%hhjՎubh)}(hhh]hS)}(h(:navajowhite2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M/hjubah}(h]h]h]h]h!]uh%hhjՎubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite3``h]h)}(hj'h]h navajowhite3}hj)sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)M0hj"ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:navajowhite3:`████████`h]h_)}(hjGh]h████████}hjIsbah}(h]h] navajowhite3ah]h]h!]uh%h^hjEubah}(h]h]h]h]h!]uh%hRh'h?h)M0hjBubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite4``h]h)}(hjqh]h navajowhite4}hjssbah}(h]h]h]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%hRh'h?h)M1hjlubah}(h]h]h]h]h!]uh%hhjiubh)}(hhh]hS)}(h(:navajowhite4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M1hjubah}(h]h]h]h]h!]uh%hhjiubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navy``h]h)}(hjh]hnavy}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M2hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :navy:`████████`h]h_)}(hjۏh]h████████}hjݏsbah}(h]h]navyah]h]h!]uh%h^hjُubah}(h]h]h]h]h!]uh%hRh'h?h)M2hj֏ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``navyblue``h]h)}(hjh]hnavyblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M3hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:navyblue:`████████`h]h_)}(hj%h]h████████}hj'sbah}(h]h]navyblueah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)M3hj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``oldlace``h]h)}(hjOh]holdlace}hjQsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)M4hjJubah}(h]h]h]h]h!]uh%hhjGubh)}(hhh]hS)}(h#:oldlace:`████████`h]h_)}(hjoh]h████████}hjqsbah}(h]h]oldlaceah]h]h!]uh%h^hjmubah}(h]h]h]h]h!]uh%hRh'h?h)M4hjjubah}(h]h]h]h]h!]uh%hhjGubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``olive``h]h)}(hjh]holive}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M5hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:olive:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]oliveah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M5hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``olivedrab``h]h)}(hjh]h olivedrab}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M6hjސubah}(h]h]h]h]h!]uh%hhjېubh)}(hhh]hS)}(h%:olivedrab:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrabah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M6hjubah}(h]h]h]h]h!]uh%hhjېubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab1``h]h)}(hj-h]h olivedrab1}hj/sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)M7hj(ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h&:olivedrab1:`████████`h]h_)}(hjMh]h████████}hjOsbah}(h]h] olivedrab1ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)M7hjHubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab2``h]h)}(hjwh]h olivedrab2}hjysbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)M8hjrubah}(h]h]h]h]h!]uh%hhjoubh)}(hhh]hS)}(h&:olivedrab2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrab2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M8hjubah}(h]h]h]h]h!]uh%hhjoubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab3``h]h)}(hjh]h olivedrab3}hjÑsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M9hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:olivedrab3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrab3ah]h]h!]uh%h^hjߑubah}(h]h]h]h]h!]uh%hRh'h?h)M9hjܑubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab4``h]h)}(hj h]h olivedrab4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)M:hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:olivedrab4:`████████`h]h_)}(hj+h]h████████}hj-sbah}(h]h] olivedrab4ah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)M:hj&ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange``h]h)}(hjUh]horange}hjWsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)M;hjPubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h":orange:`████████`h]h_)}(hjuh]h████████}hjwsbah}(h]h]orangeah]h]h!]uh%h^hjsubah}(h]h]h]h]h!]uh%hRh'h?h)M;hjpubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange1``h]h)}(hjh]horange1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M<hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orange1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orange1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M<hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange2``h]h)}(hjh]horange2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M=hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orange2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]orange2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M=hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange3``h]h)}(hj3h]horange3}hj5sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)M>hj.ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h#:orange3:`████████`h]h_)}(hjSh]h████████}hjUsbah}(h]h]orange3ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M>hjNubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange4``h]h)}(hj}h]horange4}hjsbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjxubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h#:orange4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orange4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orangered``h]h)}(hjǓh]h orangered}hjɓsbah}(h]h]h]h]h!]uh%hhjœubah}(h]h]h]h]h!]uh%hRh'h?h)M@hj“ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:orangered:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] orangeredah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered1``h]h)}(hjh]h orangered1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:orangered1:`████████`h]h_)}(hj1h]h████████}hj3sbah}(h]h] orangered1ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj,ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered2``h]h)}(hj[h]h orangered2}hj]sbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjVubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h&:orangered2:`████████`h]h_)}(hj{h]h████████}hj}sbah}(h]h] orangered2ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjvubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered3``h]h)}(hjh]h orangered3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MChjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:orangered3:`████████`h]h_)}(hjŔh]h████████}hjǔsbah}(h]h] orangered3ah]h]h!]uh%h^hjÔubah}(h]h]h]h]h!]uh%hRh'h?h)MChjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered4``h]h)}(hjh]h orangered4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MDhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:orangered4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] orangered4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)MDhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid``h]h)}(hj9h]horchid}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h":orchid:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h]orchidah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid1``h]h)}(hjh]horchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h#:orchid1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid2``h]h)}(hj͕h]horchid2}hjϕsbah}(h]h]h]h]h!]uh%hhj˕ubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjȕubah}(h]h]h]h]h!]uh%hhjŕubh)}(hhh]hS)}(h#:orchid2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjŕubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid3``h]h)}(hjh]horchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orchid3:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h]orchid3ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid4``h]h)}(hjah]horchid4}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h#:orchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegoldenrod``h]h)}(hjh]h palegoldenrod}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):palegoldenrod:`████████`h]h_)}(hj˖h]h████████}hj͖sbah}(h]h] palegoldenrodah]h]h!]uh%h^hjɖubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjƖubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``palegreen``h]h)}(hjh]h palegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:palegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen1``h]h)}(hj?h]h palegreen1}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h&:palegreen1:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] palegreen1ah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen2``h]h)}(hjh]h palegreen2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:palegreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen3``h]h)}(hjӗh]h palegreen3}hj՗sbah}(h]h]h]h]h!]uh%hhjїubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjΗubah}(h]h]h]h]h!]uh%hhj˗ubh)}(hhh]hS)}(h&:palegreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhj˗ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen4``h]h)}(hjh]h palegreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:palegreen4:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] palegreen4ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise``h]h)}(hjgh]h paleturquoise}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h):paleturquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] paleturquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise1``h]h)}(hjh]hpaleturquoise1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise1:`████████`h]h_)}(hjјh]h████████}hjӘsbah}(h]h]paleturquoise1ah]h]h!]uh%h^hjϘubah}(h]h]h]h]h!]uh%hRh'h?h)MQhj̘ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise2``h]h)}(hjh]hpaleturquoise2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]paleturquoise2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise3``h]h)}(hjEh]hpaleturquoise3}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h*:paleturquoise3:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]paleturquoise3ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise4``h]h)}(hjh]hpaleturquoise4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]paleturquoise4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred``h]h)}(hjٙh]h palevioletred}hjۙsbah}(h]h]h]h]h!]uh%hhjיubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjԙubah}(h]h]h]h]h!]uh%hhjљubh)}(hhh]hS)}(h):palevioletred:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palevioletredah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjљubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred1``h]h)}(hj#h]hpalevioletred1}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred1:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]palevioletred1ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred2``h]h)}(hjmh]hpalevioletred2}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h*:palevioletred2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]palevioletred2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred3``h]h)}(hjh]hpalevioletred3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred3:`████████`h]h_)}(hjךh]h████████}hjٚsbah}(h]h]palevioletred3ah]h]h!]uh%h^hj՚ubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjҚubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred4``h]h)}(hjh]hpalevioletred4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred4:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]palevioletred4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``papayawhip``h]h)}(hjKh]h papayawhip}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h&:papayawhip:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h] papayawhipah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``peachpuff``h]h)}(hjh]h peachpuff}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:peachpuff:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuffah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff1``h]h)}(hjߛh]h peachpuff1}hjsbah}(h]h]h]h]h!]uh%hhjݛubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjڛubah}(h]h]h]h]h!]uh%hhjכubh)}(hhh]hS)}(h&:peachpuff1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuff1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjכubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff2``h]h)}(hj)h]h peachpuff2}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h&:peachpuff2:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h] peachpuff2ah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff3``h]h)}(hjsh]h peachpuff3}hjusbah}(h]h]h]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnubah}(h]h]h]h]h!]uh%hhjkubh)}(hhh]hS)}(h&:peachpuff3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuff3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjubah}(h]h]h]h]h!]uh%hhjkubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff4``h]h)}(hjh]h peachpuff4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:peachpuff4:`████████`h]h_)}(hjݜh]h████████}hjߜsbah}(h]h] peachpuff4ah]h]h!]uh%h^hjۜubah}(h]h]h]h]h!]uh%hRh'h?h)M_hj؜ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peru``h]h)}(hjh]hperu}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M`hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :peru:`████████`h]h_)}(hj'h]h████████}hj)sbah}(h]h]peruah]h]h!]uh%h^hj%ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj"ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``pink``h]h)}(hjQh]hpink}hjSsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MahjLubah}(h]h]h]h]h!]uh%hhjIubh)}(hhh]hS)}(h :pink:`████████`h]h_)}(hjqh]h████████}hjssbah}(h]h]pinkah]h]h!]uh%h^hjoubah}(h]h]h]h]h!]uh%hRh'h?h)Mahjlubah}(h]h]h]h]h!]uh%hhjIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink1``h]h)}(hjh]hpink1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:pink1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink2``h]h)}(hjh]hpink2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mchjubah}(h]h]h]h]h!]uh%hhjݝubh)}(hhh]hS)}(h!:pink2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mchjubah}(h]h]h]h]h!]uh%hhjݝubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink3``h]h)}(hj/h]hpink3}hj1sbah}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj*ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h!:pink3:`████████`h]h_)}(hjOh]h████████}hjQsbah}(h]h]pink3ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink4``h]h)}(hjyh]hpink4}hj{sbah}(h]h]h]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjtubah}(h]h]h]h]h!]uh%hhjqubh)}(hhh]hS)}(h!:pink4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjubah}(h]h]h]h]h!]uh%hhjqubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``plum``h]h)}(hjÞh]hplum}hjŞsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :plum:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]plumah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhjޞubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum1``h]h)}(hj h]hplum1}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum1:`████████`h]h_)}(hj-h]h████████}hj/sbah}(h]h]plum1ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj(ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum2``h]h)}(hjWh]hplum2}hjYsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjRubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h!:plum2:`████████`h]h_)}(hjwh]h████████}hjysbah}(h]h]plum2ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhhjrubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum3``h]h)}(hjh]hplum3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mihjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum3:`████████`h]h_)}(hjh]h████████}hjßsbah}(h]h]plum3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mihjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum4``h]h)}(hjh]hplum4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]plum4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``powderblue``h]h)}(hj5h]h powderblue}hj7sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h&:powderblue:`████████`h]h_)}(hjUh]h████████}hjWsbah}(h]h] powderblueah]h]h!]uh%h^hjSubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjPubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple``h]h)}(hjh]hpurple}hjsbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjzubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h":purple:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]purpleah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple1``h]h)}(hjɠh]hpurple1}hjˠsbah}(h]h]h]h]h!]uh%hhjǠubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjĠubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:purple1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]purple1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple2``h]h)}(hjh]hpurple2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h#:purple2:`████████`h]h_)}(hj3h]h████████}hj5sbah}(h]h]purple2ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj.ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple3``h]h)}(hj]h]hpurple3}hj_sbah}(h]h]h]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MohjXubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h#:purple3:`████████`h]h_)}(hj}h]h████████}hjsbah}(h]h]purple3ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mohjxubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple4``h]h)}(hjh]hpurple4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mphjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:purple4:`████████`h]h_)}(hjǡh]h████████}hjɡsbah}(h]h]purple4ah]h]h!]uh%h^hjšubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj¡ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red``h]h)}(hjh]hred}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h:red:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]redah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red1``h]h)}(hj;h]hred1}hj=sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h :red1:`████████`h]h_)}(hj[h]h████████}hj]sbah}(h]h]red1ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red2``h]h)}(hjh]hred2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h :red2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]red2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red3``h]h)}(hjϢh]hred3}hjѢsbah}(h]h]h]h]h!]uh%hhj͢ubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjʢubah}(h]h]h]h]h!]uh%hhjǢubh)}(hhh]hS)}(h :red3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]red3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjǢubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red4``h]h)}(hjh]hred4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Muhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :red4:`████████`h]h_)}(hj9h]h████████}hj;sbah}(h]h]red4ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``rosybrown``h]h)}(hjch]h rosybrown}hjesbah}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^ubah}(h]h]h]h]h!]uh%hhj[ubh)}(hhh]hS)}(h%:rosybrown:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrownah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~ubah}(h]h]h]h]h!]uh%hhj[ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown1``h]h)}(hjh]h rosybrown1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown1:`████████`h]h_)}(hjͣh]h████████}hjϣsbah}(h]h] rosybrown1ah]h]h!]uh%h^hjˣubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjȣubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown2``h]h)}(hjh]h rosybrown2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrown2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown3``h]h)}(hjAh]h rosybrown3}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h&:rosybrown3:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] rosybrown3ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown4``h]h)}(hjh]h rosybrown4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrown4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``royalblue``h]h)}(hjդh]h royalblue}hjפsbah}(h]h]h]h]h!]uh%hhjӤubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjФubah}(h]h]h]h]h!]uh%hhjͤubh)}(hhh]hS)}(h%:royalblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjͤubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue1``h]h)}(hjh]h royalblue1}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M|hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue1:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h] royalblue1ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)M|hj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue2``h]h)}(hjih]h royalblue2}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h&:royalblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue3``h]h)}(hjh]h royalblue3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue3:`████████`h]h_)}(hjӥh]h████████}hjեsbah}(h]h] royalblue3ah]h]h!]uh%h^hjѥubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjΥubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue4``h]h)}(hjh]h royalblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``saddlebrown``h]h)}(hjGh]h saddlebrown}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h':saddlebrown:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h] saddlebrownah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon``h]h)}(hjh]hsalmon}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":salmon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon1``h]h)}(hjۦh]hsalmon1}hjݦsbah}(h]h]h]h]h!]uh%hhj٦ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj֦ubah}(h]h]h]h]h!]uh%hhjӦubh)}(hhh]hS)}(h#:salmon1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmon1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjӦubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon2``h]h)}(hj%h]hsalmon2}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:salmon2:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h]salmon2ah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon3``h]h)}(hjoh]hsalmon3}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h#:salmon3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmon3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon4``h]h)}(hjh]hsalmon4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:salmon4:`████████`h]h_)}(hj٧h]h████████}hjۧsbah}(h]h]salmon4ah]h]h!]uh%h^hjקubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjԧubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``sandybrown``h]h)}(hjh]h sandybrown}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:sandybrown:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] sandybrownah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen``h]h)}(hjMh]hseagreen}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h$:seagreen:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h]seagreenah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen1``h]h)}(hjh]h seagreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seagreen1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen2``h]h)}(hjh]h seagreen2}hjsbah}(h]h]h]h]h!]uh%hhjߨubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjܨubah}(h]h]h]h]h!]uh%hhj٨ubh)}(hhh]hS)}(h%:seagreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj٨ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen3``h]h)}(hj+h]h seagreen3}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:seagreen3:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h] seagreen3ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen4``h]h)}(hjuh]h seagreen4}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h%:seagreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell``h]h)}(hjh]hseashell}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:seashell:`████████`h]h_)}(hjߩh]h████████}hjsbah}(h]h]seashellah]h]h!]uh%h^hjݩubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjکubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell1``h]h)}(hj h]h seashell1}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seashell1:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h] seashell1ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell2``h]h)}(hjSh]h seashell2}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h%:seashell2:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h] seashell2ah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell3``h]h)}(hjh]h seashell3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seashell3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seashell3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell4``h]h)}(hjh]h seashell4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjߪubh)}(hhh]hS)}(h%:seashell4:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h] seashell4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjߪubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna``h]h)}(hj1h]hsienna}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h":sienna:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]siennaah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna1``h]h)}(hj{h]hsienna1}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h#:sienna1:`████████`h]h_)}(hjh]h████████}hjsbaժh}(h]h]sienna1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna2``h]h)}(hjūh]hsienna2}hjǫsbah}(h]h]h]h]h!]uh%hhjëubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:sienna2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]sienna2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna3``h]h)}(hjh]hsienna3}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:sienna3:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]sienna3ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna4``h]h)}(hjYh]hsienna4}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h#:sienna4:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h]sienna4ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``silver``h]h)}(hjh]hsilver}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":silver:`████████`h]h_)}(hjìh]h████████}hjŬsbah}(h]h]silverah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue``h]h)}(hjh]hskyblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:skyblue:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h]skyblueah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue1``h]h)}(hj7h]hskyblue1}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h$:skyblue1:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h]skyblue1ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue2``h]h)}(hjh]hskyblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h$:skyblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]skyblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue3``h]h)}(hj˭h]hskyblue3}hjͭsbah}(h]h]h]h]h!]uh%hhjɭubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƭubah}(h]h]h]h]h!]uh%hhjíubh)}(hhh]hS)}(h$:skyblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]skyblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjíubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue4``h]h)}(hjh]hskyblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h$:skyblue4:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h]skyblue4ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slateblue``h]h)}(hj_h]h slateblue}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h%:slateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblueah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue1``h]h)}(hjh]h slateblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue1:`████████`h]h_)}(hjɮh]h████████}hjˮsbah}(h]h] slateblue1ah]h]h!]uh%h^hjǮubah}(h]h]h]h]h!]uh%hRh'h?h)MhjĮubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue2``h]h)}(hjh]h slateblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue3``h]h)}(hj=h]h slateblue3}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h&:slateblue3:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] slateblue3ah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue4``h]h)}(hjh]h slateblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slategray``h]h)}(hjѯh]h slategray}hjӯsbah}(h]h]h]h]h!]uh%hhjϯubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj̯ubah}(h]h]h]h]h!]uh%hhjɯubh)}(hhh]hS)}(h%:slategray:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategrayah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjɯubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray1``h]h)}(hjh]h slategray1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray1:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h] slategray1ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray2``h]h)}(hjeh]h slategray2}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h&:slategray2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategray2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray3``h]h)}(hjh]h slategray3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray3:`████████`h]h_)}(hjϰh]h████████}hjѰsbah}(h]h] slategray3ah]h]h!]uh%h^hjͰubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjʰubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray4``h]h)}(hjh]h slategray4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategray4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slategrey``h]h)}(hjCh]h slategrey}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h%:slategrey:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] slategreyah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``snow``h]h)}(hjh]hsnow}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :snow:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snowah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow1``h]h)}(hjױh]hsnow1}hjٱsbah}(h]h]h]h]h!]uh%hhjձubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjұubah}(h]h]h]h]h!]uh%hhjϱubh)}(hhh]hS)}(h!:snow1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snow1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjϱubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow2``h]h)}(hj!h]hsnow2}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:snow2:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h]snow2ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow3``h]h)}(hjkh]hsnow3}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h!:snow3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snow3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow4``h]h)}(hjh]hsnow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:snow4:`████████`h]h_)}(hjղh]h████████}hjײsbah}(h]h]snow4ah]h]h!]uh%h^hjӲubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjвubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen``h]h)}(hjh]h springgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':springgreen:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h] springgreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen1``h]h)}(hjIh]h springgreen1}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h(:springgreen1:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] springgreen1ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen2``h]h)}(hjh]h springgreen2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:springgreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] springgreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen3``h]h)}(hjݳh]h springgreen3}hj߳sbah}(h]h]h]h]h!]uh%hhj۳ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjسubah}(h]h]h]h]h!]uh%hhjճubh)}(hhh]hS)}(h(:springgreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] springgreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjճubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen4``h]h)}(hj'h]h springgreen4}hj)sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:springgreen4:`████████`h]h_)}(hjGh]h████████}hjIsbah}(h]h] springgreen4ah]h]h!]uh%h^hjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``steelblue``h]h)}(hjqh]h steelblue}hjssbah}(h]h]h]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjlubah}(h]h]h]h]h!]uh%hhjiubh)}(hhh]hS)}(h%:steelblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] steelblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjiubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue1``h]h)}(hjh]h steelblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue1:`████████`h]h_)}(hj۴h]h████████}hjݴsbah}(h]h] steelblue1ah]h]h!]uh%h^hjٴubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjִubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue2``h]h)}(hjh]h steelblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue2:`████████`h]h_)}(hj%h]h████████}hj'sbah}(h]h] steelblue2ah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue3``h]h)}(hjOh]h steelblue3}hjQsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJubah}(h]h]h]h]h!]uh%hhjGubh)}(hhh]hS)}(h&:steelblue3:`████████`h]h_)}(hjoh]h████████}hjqsbah}(h]h] steelblue3ah]h]h!]uh%h^hjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjGubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue4``h]h)}(hjh]h steelblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] steelblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan``h]h)}(hjh]htan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj޵ubah}(h]h]h]h]h!]uh%hhj۵ubh)}(hhh]hS)}(h:tan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj۵ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan1``h]h)}(hj-h]htan1}hj/sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h :tan1:`████████`h]h_)}(hjMh]h████████}hjOsbah}(h]h]tan1ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan2``h]h)}(hjwh]htan2}hjysbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjrubah}(h]h]h]h]h!]uh%hhjoubh)}(hhh]hS)}(h :tan2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tan2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjoubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan3``h]h)}(hjh]htan3}hjösbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :tan3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tan3ah]h]h!]uh%h^hj߶ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjܶubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan4``h]h)}(hj h]htan4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :tan4:`████████`h]h_)}(hj+h]h████████}hj-sbah}(h]h]tan4ah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``teal``h]h)}(hjUh]hteal}hjWsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MhjPubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h :teal:`████████`h]h_)}(hjuh]h████████}hjwsbah}(h]h]tealah]h]h!]uh%h^hjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle``h]h)}(hjh]hthistle}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:thistle:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistleah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle1``h]h)}(hjh]hthistle1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:thistle1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]thistle1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle2``h]h)}(hj3h]hthistle2}hj5sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h$:thistle2:`████████`h]h_)}(hjSh]h████████}hjUsbah}(h]h]thistle2ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle3``h]h)}(hj}h]hthistle3}hjsbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h$:thistle3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistle3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle4``h]h)}(hjǸh]hthistle4}hjɸsbah}(h]h]h]h]h!]uh%hhjŸubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj¸ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:thistle4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistle4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato``h]h)}(hjh]htomato}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":tomato:`████████`h]h_)}(hj1h]h████████}hj3sbah}(h]h]tomatoah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato1``h]h)}(hj[h]htomato1}hj]sbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MhjVubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h#:tomato1:`████████`h]h_)}(hj{h]h████████}hj}sbah}(h]h]tomato1ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato2``h]h)}(hjh]htomato2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:tomato2:`████████`h]h_)}(hjŹh]h████████}hjǹsbah}(h]h]tomato2ah]h]h!]uh%h^hjùubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato3``h]h)}(hjh]htomato3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:tomato3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tomato3ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato4``h]h)}(hj9h]htomato4}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h#:tomato4:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h]tomato4ah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``turquoise``h]h)}(hjh]h turquoise}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h%:turquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise1``h]h)}(hjͺh]h turquoise1}hjϺsbah}(h]h]h]h]h!]uh%hhj˺ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjȺubah}(h]h]h]h]h!]uh%hhjźubh)}(hhh]hS)}(h&:turquoise1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoise1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjźubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise2``h]h)}(hjh]h turquoise2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:turquoise2:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h] turquoise2ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise3``h]h)}(hjah]h turquoise3}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h&:turquoise3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoise3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise4``h]h)}(hjh]h turquoise4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:turquoise4:`████████`h]h_)}(hj˻h]h████████}hjͻsbah}(h]h] turquoise4ah]h]h!]uh%h^hjɻubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƻubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``violet``h]h)}(hjh]hviolet}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":violet:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]violetah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``violetred``h]h)}(hj?h]h violetred}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h%:violetred:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] violetredah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred1``h]h)}(hjh]h violetred1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:violetred1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred2``h]h)}(hjӼh]h violetred2}hjռsbah}(h]h]h]h]h!]uh%hhjѼubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjμubah}(h]h]h]h]h!]uh%hhj˼ubh)}(hhh]hS)}(h&:violetred2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj˼ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred3``h]h)}(hjh]h violetred3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:violetred3:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] violetred3ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred4``h]h)}(hjgh]h violetred4}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h&:violetred4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat``h]h)}(hjh]hwheat}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:wheat:`████████`h]h_)}(hjѽh]h████████}hjӽsbah}(h]h]wheatah]h]h!]uh%h^hjϽubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj̽ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat1``h]h)}(hjh]hwheat1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":wheat1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat2``h]h)}(hjEh]hwheat2}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":wheat2:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]wheat2ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat3``h]h)}(hjh]hwheat3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":wheat3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat4``h]h)}(hjپh]hwheat4}hj۾sbah}(h]h]h]h]h!]uh%hhj׾ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjԾubah}(h]h]h]h]h!]uh%hhjѾubh)}(hhh]hS)}(h":wheat4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjѾubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``white``h]h)}(hj#h]hwhite}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:white:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]whiteah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``whitesmoke``h]h)}(hjmh]h whitesmoke}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h&:whitesmoke:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] whitesmokeah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow``h]h)}(hjh]hyellow}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":yellow:`████████`h]h_)}(hj׿h]h████████}hjٿsbah}(h]h]yellowah]h]h!]uh%h^hjտubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjҿubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow1``h]h)}(hjh]hyellow1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow1:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]yellow1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow2``h]h)}(hjKh]hyellow2}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h#:yellow2:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h]yellow2ah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow3``h]h)}(hjh]hyellow3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]yellow3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow4``h]h)}(hjh]hyellow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]yellow4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``yellowgreen``h]h)}(hj)h]h yellowgreen}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h':yellowgreen:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h] yellowgreenah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%j,hhubeh}(h]h]h]h]h!]colsKuh%hhhubah}(h]h]h]h]h!]uh%hhh,h&hh'h?h)Nubeh}(h] named-colorsah]h] named colorsah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinkshfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjhhu nametypes}(jhuh}(jh,hhu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/color_list.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612174.2701411 pygame-2.6.1/docs/generated/doctrees/ref/cursors.doctree0000644000175100001770000012207714676242416022755 0ustar00runnerdocker4sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.cursors`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.cursors}hh>> pygame.mouse.set_cursor(*pygame.cursors.arrow)h]h2>>> pygame.mouse.set_cursor(*pygame.cursors.arrow)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khh,h&hubh)}(hNThe following variables can be passed to ``pygame.mouse.set_cursor`` function:h](h)The following variables can be passed to }hj!sbh;)}(h``pygame.mouse.set_cursor``h]hpygame.mouse.set_cursor}hj)sbah}(h]h]h]h]h!]uh%h:hj!ubh function:}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh block_quote)}(h* ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` h]h bullet_list)}(hhh](h list_item)}(h``pygame.cursors.arrow`` h]h)}(h``pygame.cursors.arrow``h]h;)}(hjTh]hpygame.cursors.arrow}hjVsbah}(h]h]h]h]h!]uh%h:hjRubah}(h]h]h]h]h!]uh%hh'h]h)KhjNubah}(h]h]h]h]h!]uh%jLh'h]h)KhjIubjM)}(h``pygame.cursors.diamond`` h]h)}(h``pygame.cursors.diamond``h]h;)}(hjuh]hpygame.cursors.diamond}hjwsbah}(h]h]h]h]h!]uh%h:hjsubah}(h]h]h]h]h!]uh%hh'h]h)Khjoubah}(h]h]h]h]h!]uh%jLh'h]h)KhjIubjM)}(h``pygame.cursors.broken_x`` h]h)}(h``pygame.cursors.broken_x``h]h;)}(hjh]hpygame.cursors.broken_x}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K!hjubah}(h]h]h]h]h!]uh%jLh'h]h)K!hjIubjM)}(h``pygame.cursors.tri_left`` h]h)}(h``pygame.cursors.tri_left``h]h;)}(hjh]hpygame.cursors.tri_left}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K#hjubah}(h]h]h]h]h!]uh%jLh'h]h)K#hjIubjM)}(h``pygame.cursors.tri_right`` h]h)}(h``pygame.cursors.tri_right``h]h;)}(hjh]hpygame.cursors.tri_right}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K%hjubah}(h]h]h]h]h!]uh%jLh'h]h)K%hjIubeh}(h]h]h]h]h!]bullet*uh%jGh'h]h)KhjCubah}(h]h]h]h]h!]uh%jAh'h]h)Khh,h&hubh)}(hThis module also contains a few cursors as formatted strings. You'll need to pass these to ``pygame.cursors.compile()`` function before you can use them. The example call would look like this:h](h[This module also contains a few cursors as formatted strings. You'll need to pass these to }hjsbh;)}(h``pygame.cursors.compile()``h]hpygame.cursors.compile()}hj sbah}(h]h]h]h]h!]uh%h:hjubhI function before you can use them. The example call would look like this:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K'hh,h&hubj)}(h|>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)h]h|>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)}hj!sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)K-hh,h&hubh)}(h^The following strings can be converted into cursor bitmaps with ``pygame.cursors.compile()`` :h](h@The following strings can be converted into cursor bitmaps with }hj/sbh;)}(h``pygame.cursors.compile()``h]hpygame.cursors.compile()}hj7sbah}(h]h]h]h]h!]uh%h:hj/ubh :}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)K0hh,h&hubjB)}(h* ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` h]jH)}(hhh](jM)}(h&``pygame.cursors.thickarrow_strings`` h]h)}(h%``pygame.cursors.thickarrow_strings``h]h;)}(hj\h]h!pygame.cursors.thickarrow_strings}hj^sbah}(h]h]h]h]h!]uh%h:hjZubah}(h]h]h]h]h!]uh%hh'h]h)K3hjVubah}(h]h]h]h]h!]uh%jLh'h]h)K3hjSubjM)}(h#``pygame.cursors.sizer_x_strings`` h]h)}(h"``pygame.cursors.sizer_x_strings``h]h;)}(hj}h]hpygame.cursors.sizer_x_strings}hjsbah}(h]h]h]h]h!]uh%h:hj{ubah}(h]h]h]h]h!]uh%hh'h]h)K5hjwubah}(h]h]h]h]h!]uh%jLh'h]h)K5hjSubjM)}(h#``pygame.cursors.sizer_y_strings`` h]h)}(h"``pygame.cursors.sizer_y_strings``h]h;)}(hjh]hpygame.cursors.sizer_y_strings}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K7hjubah}(h]h]h]h]h!]uh%jLh'h]h)K7hjSubjM)}(h$``pygame.cursors.sizer_xy_strings`` h]h)}(h#``pygame.cursors.sizer_xy_strings``h]h;)}(hjh]hpygame.cursors.sizer_xy_strings}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K9hjubah}(h]h]h]h]h!]uh%jLh'h]h)K9hjSubjM)}(h%``pygame.cursor.textmarker_strings`` h]h)}(h$``pygame.cursor.textmarker_strings``h]h;)}(hjh]h pygame.cursor.textmarker_strings}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K;hjubah}(h]h]h]h]h!]uh%jLh'h]h)K;hjSubeh}(h]h]h]h]h!]jjuh%jGh'h]h)K3hjOubah}(h]h]h]h]h!]uh%jAh'h]h)K3hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single$compile() (in module pygame.cursors)pygame.cursors.compilehNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hcompileh](h desc_addname)}(hpygame.cursors.h]hpygame.cursors.}hj#sbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%j!hjh&hh'h]h)K=ubh desc_name)}(hjh]hcompile}hj5sbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%j3hjh&hh'h]h)K=ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjh&hh'h]h)K=ubeh}(h]jah](sig sig-objecteh]h]h!]modulehŌclasshfullnamej _toc_partshj _toc_name compile()uh%jh'h]h)K=hjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h3:sl:`create binary cursor data from simple strings`h]h)}(hjih]h-create binary cursor data from simple strings}hjksbah}(h]h]hah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)K?ubhz)}(hC:sg:`compile(strings, black='X', white='.', xor='o') -> data, mask`h]h)}(hjh]h=compile(strings, black='X', white='.', xor='o') -> data, mask}hjsbah}(h]h] signatureah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%huhjah&hh'h]h)K?ubh)}(hXA sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the :func:`pygame.mouse.set_cursor()` function.h](hA sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the }hjsbh6)}(h!:func:`pygame.mouse.set_cursor()`h]h;)}(hjh]hpygame.mouse.set_cursor()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.mouse.set_cursoruh%h5h'h]h)KBhjubh function.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjah&hubh)}(hX"If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black.h]hX"If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KGhjah&hubh)}(hThe height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, ``ValueError`` is raised. An example set of cursor strings looks like thish](hThe height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, }hjsbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hjubh< is raised. An example set of cursor strings looks like this}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KLhjah&hubj)}(hXthickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ")h]hXthickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ")}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)KShjah&hubh )}(h## pygame.cursors.compile ##h]h## pygame.cursors.compile ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjah&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj!objtypej"desctypej"no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%load_xbm() (in module pygame.cursors)pygame.cursors.load_xbmhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hload_xbmh](j")}(hpygame.cursors.h]hpygame.cursors.}hjEsbah}(h]h](j.j/eh]h]h!]h#h$uh%j!hjAh&hh'h]h)Koubj4)}(hjCh]hload_xbm}hjSsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjAh&hh'h]h)KoubjE)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjAh&hh'h]h)Koubeh}(h]j<ah](jSjTeh]h]h!]jXhjYhjZjCj[hjCj] load_xbm()uh%jh'h]h)Kohj>h&hubj`)}(hhh](hv)}(hhh](hz)}(h':sl:`load cursor data from an XBM file`h]h)}(hjzh]h!load cursor data from an XBM file}hj|sbah}(h]h]hah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kqubhz)}(h):sg:`load_xbm(cursorfile) -> cursor_args`h]h)}(hjh]h#load_xbm(cursorfile) -> cursor_args}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Krubhz)}(h3:sg:`load_xbm(cursorfile, maskfile) -> cursor_args`h]h)}(hjh]h-load_xbm(cursorfile, maskfile) -> cursor_args}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Ksubeh}(h]h]h]h]h!]uh%huhjrh&hh'h]h)Kqubh)}(hThis loads cursors for a simple subset of ``XBM`` files. ``XBM`` files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images.h](h*This loads cursors for a simple subset of }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh files. }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubhy files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kuhjrh&hubh)}(hSometimes the black and white color values will be split into two separate ``XBM`` files. You can pass a second maskfile argument to load the two images into a single cursor.h](hKSometimes the black and white color values will be split into two separate }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh\ files. You can pass a second maskfile argument to load the two images into a single cursor.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kyhjrh&hubh)}(hlThe cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method.h]hlThe cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K}hjrh&hubh)}(hbThe return value cursor_args can be passed directly to the ``pygame.mouse.set_cursor()`` function.h](h;The return value cursor_args can be passed directly to the }hj#sbh;)}(h``pygame.mouse.set_cursor()``h]hpygame.mouse.set_cursor()}hj+sbah}(h]h]h]h]h!]uh%h:hj#ubh function.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjrh&hubh )}(h## pygame.cursors.load_xbm ##h]h## pygame.cursors.load_xbm ##}hjCsbah}(h]h]h]h]h!]h#h$uh%h hjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hj>h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j&jZj'j[j(j[j)j*j+j,j-j.j/uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j Cursor (class in pygame.cursors)pygame.cursors.CursorhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hCursorh](j")}(hpygame.cursors.h]hpygame.cursors.}hjtsbah}(h]h](j.j/eh]h]h!]h#h$uh%j!hjph&hh'h]h)Kubj4)}(hjrh]hCursor}hjsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjph&hh'h]h)Kubeh}(h]jkah](jSjTeh]h]h!]jXhjYhjZjrj[hjrj]jruh%jh'h]h)Khjmh&hubj`)}(hhh](hv)}(hhh](hz)}(h):sl:`pygame object representing a cursor`h]h)}(hjh]h#pygame object representing a cursor}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h9:sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor`h]h)}(hjh]h3Cursor(size, hotspot, xormasks, andmasks) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h(:sg:`Cursor(hotspot, surface) -> Cursor`h]h)}(hjh]h"Cursor(hotspot, surface) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`Cursor(constant) -> Cursor`h]h)}(hjh]hCursor(constant) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`Cursor(Cursor) -> Cursor`h]h)}(hjh]hCursor(Cursor) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`Cursor() -> Cursor`h]h)}(hjh]hCursor() -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hXIn pygame 2, there are 3 types of cursors you can create to give your game that little bit of extra polish. There's **bitmap** type cursors, which existed in pygame 1.x, and are compiled from a string or load from an xbm file. Then there are **system** type cursors, where you choose a preset that will convey the same meaning but look native across different operating systems. Finally you can create a **color** cursor, which displays a pygame surface as the cursor.h](htIn pygame 2, there are 3 types of cursors you can create to give your game that little bit of extra polish. There's }hj,sbh strong)}(h **bitmap**h]hbitmap}hj6sbah}(h]h]h]h]h!]uh%j4hj,ubht type cursors, which existed in pygame 1.x, and are compiled from a string or load from an xbm file. Then there are }hj,sbj5)}(h **system**h]hsystem}hjHsbah}(h]h]h]h]h!]uh%j4hj,ubh type cursors, where you choose a preset that will convey the same meaning but look native across different operating systems. Finally you can create a }hj,sbj5)}(h **color**h]hcolor}hjZsbah}(h]h]h]h]h!]uh%j4hj,ubh7 cursor, which displays a pygame surface as the cursor.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h**Creating a system cursor**h]j5)}(hjth]hCreating a system cursor}hjvsbah}(h]h]h]h]h!]uh%j4hjrubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXChoose a constant from this list, pass it into ``pygame.cursors.Cursor(constant)``, and you're good to go. Be advised that not all systems support every system cursor, and you may get a substitution instead. For example, on MacOS, WAIT/WAITARROW should show up as an arrow, and SIZENWSE/SIZENESW/SIZEALL should show up as a closed hand. And on Wayland, every SIZE cursor should show up as a hand.h](h/Choose a constant from this list, pass it into }hjsbh;)}(h#``pygame.cursors.Cursor(constant)``h]hpygame.cursors.Cursor(constant)}hjsbah}(h]h]h]h]h!]uh%h:hjubhX:, and you're good to go. Be advised that not all systems support every system cursor, and you may get a substitution instead. For example, on MacOS, WAIT/WAITARROW should show up as an arrow, and SIZENWSE/SIZENESW/SIZEALL should show up as a closed hand. And on Wayland, every SIZE cursor should show up as a hand.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hXPygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow pygame.SYSTEM_CURSOR_IBEAM i-beam pygame.SYSTEM_CURSOR_WAIT wait pygame.SYSTEM_CURSOR_CROSSHAIR crosshair pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (or wait if not available) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones pygame.SYSTEM_CURSOR_HAND handh]hXPygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow pygame.SYSTEM_CURSOR_IBEAM i-beam pygame.SYSTEM_CURSOR_WAIT wait pygame.SYSTEM_CURSOR_CROSSHAIR crosshair pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (or wait if not available) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones pygame.SYSTEM_CURSOR_HAND hand}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubh)}(h/**Creating a cursor without passing arguments**h]j5)}(hjh]h+Creating a cursor without passing arguments}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX>In addition to the cursor constants available and described above, you can also call ``pygame.cursors.Cursor()``, and your cursor is ready (doing that is the same as calling ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``. Doing one of those calls actually creates a system cursor using the default native image.h](hUIn addition to the cursor constants available and described above, you can also call }hjsbh;)}(h``pygame.cursors.Cursor()``h]hpygame.cursors.Cursor()}hjsbah}(h]h]h]h]h!]uh%h:hjubh>, and your cursor is ready (doing that is the same as calling }hjsbh;)}(h5``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``h]h1pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)}hjsbah}(h]h]h]h]h!]uh%h:hjubh[. Doing one of those calls actually creates a system cursor using the default native image.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h**Creating a color cursor**h]j5)}(hjh]hCreating a color cursor}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hTo create a color cursor, create a ``Cursor`` from a ``hotspot`` and a ``surface``. ``hotspot`` is an (x,y) coordinate that determines where in the cursor the exact point is. The hotspot position must be within the bounds of the ``surface``.h](h#To create a color cursor, create a }hjsbh;)}(h ``Cursor``h]hCursor}hjsbah}(h]h]h]h]h!]uh%h:hjubh from a }hjsbh;)}(h ``hotspot``h]hhotspot}hj1sbah}(h]h]h]h]h!]uh%h:hjubh and a }hjsbh;)}(h ``surface``h]hsurface}hjCsbah}(h]h]h]h]h!]uh%h:hjubh. }hjsbh;)}(h ``hotspot``h]hhotspot}hjUsbah}(h]h]h]h]h!]uh%h:hjubh is an (x,y) coordinate that determines where in the cursor the exact point is. The hotspot position must be within the bounds of the }hjsbh;)}(h ``surface``h]hsurface}hjgsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h**Creating a bitmap cursor**h]j5)}(hjh]hCreating a bitmap cursor}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hWhen the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The ``size`` is a sequence containing the cursor width and height. ``hotspot`` is a sequence containing the cursor hotspot position.h](hwWhen the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The }hjsbh;)}(h``size``h]hsize}hjsbah}(h]h]h]h]h!]uh%h:hjubh7 is a sequence containing the cursor width and height. }hjsbh;)}(h ``hotspot``h]hhotspot}hjsbah}(h]h]h]h]h!]uh%h:hjubh6 is a sequence containing the cursor hotspot position.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hA cursor has a width and height, but a mouse position is represented by a set of point coordinates. So the value passed into the cursor ``hotspot`` variable helps pygame to actually determine at what exact point the cursor is at.h](hA cursor has a width and height, but a mouse position is represented by a set of point coordinates. So the value passed into the cursor }hjsbh;)}(h ``hotspot``h]hhotspot}hjsbah}(h]h]h]h]h!]uh%h:hjubhR variable helps pygame to actually determine at what exact point the cursor is at.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h``xormasks`` is a sequence of bytes containing the cursor xor data masks. Lastly ``andmasks``, a sequence of bytes containing the cursor bitmask data. To create these variables, we can make use of the :func:`pygame.cursors.compile()` function.h](h;)}(h ``xormasks``h]hxormasks}hjsbah}(h]h]h]h]h!]uh%h:hjubhE is a sequence of bytes containing the cursor xor data masks. Lastly }hjsbh;)}(h ``andmasks``h]handmasks}hjsbah}(h]h]h]h]h!]uh%h:hjubhl, a sequence of bytes containing the cursor bitmask data. To create these variables, we can make use of the }hjsbh6)}(h :func:`pygame.cursors.compile()`h]h;)}(hjh]hpygame.cursors.compile()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZjrh[pygame.cursors.compileuh%h5h'h]h)Khjubh function.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hWidth and height must be a multiple of 8, and the mask arrays must be the correct size for the given width and height. Otherwise an exception is raised.h]hWidth and height must be a multiple of 8, and the mask arrays must be the correct size for the given width and height. Otherwise an exception is raised.}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j%copy() (pygame.cursors.Cursor method)pygame.cursors.Cursor.copyhNtauh%hdhjh&hh'h]h)Nubj)}(hhh](j)}(hcopyh](j4)}(hj[h]hcopy}hj]sbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjYh&hh'h]h)KubjE)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjYh&hh'h]h)Kubeh}(h]jTah](jSjTeh]h]h!]jXhjYjrjZ Cursor.copyj[hŌCursorcopyj] Cursor.copy()uh%jh'h]h)KhjVh&hubj`)}(hhh](hv)}(hhh](hz)}(h:sl:`copy the current cursor`h]h)}(hjh]hcopy the current cursor}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`copy() -> Cursor`h]h)}(hjh]hcopy() -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hKReturns a new Cursor object with the same data and hotspot as the original.h]hKReturns a new Cursor object with the same data and hotspot as the original.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubeh}(h]h]h]h]h!]uh%j_hjVh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]j&jj'jj(jj)j*j+j,j-j.j/uh%jh&hhjh'h]h)Nubh )}(h ## pygame.cursors.Cursor.copy ##h]h ## pygame.cursors.Cursor.copy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](j&type (pygame.cursors.Cursor attribute)pygame.cursors.Cursor.typehNtauh%hdhjh&hh'h]h)Nubj)}(hhh](j)}(htypeh]j4)}(hjh]htype}hjsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjh&hh'h]h)Kubah}(h]jah](jSjTeh]h]h!]jXhjYjrjZ Cursor.typej[hŌCursortypej]j uh%jh'h]h)Khjh&hubj`)}(hhh](hv)}(hhh](hz)}(h:sl:`Gets the cursor type`h]h)}(hj h]hGets the cursor type}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`type -> string`h]h)}(hj. h]htype -> string}hj0 sbah}(h]h]jah]h]h!]uh%hhj, ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h tuple`h]h)}(hj h]h data -> tuple}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hSReturns the data that was used to create this cursor object, wrapped up in a tuple.h]hSReturns the data that was used to create this cursor object, wrapped up in a tuple.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubeh}(h]h]h]h]h!]uh%j_hj h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]j&j& j'j' j(j' j)j*j+j,j-j.j/uh%jh&hhjh'h]h)Nubh )}(h ## pygame.cursors.Cursor.data ##h]h ## pygame.cursors.Cursor.data ##}hj+ sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubhversionmodified)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjC sbah}(h]h](j9 addedeh]h]h!]uh%hhj? ubah}(h]h]h]h]h!] translatableuh%hhj; h&hh'h]h)Kubah}(h]h]h]h]h!]type versionaddedversion2.0.1uh%j9 h&hh'h]h)Khjubh )}(h## pygame.cursors.Cursor ##h]h## pygame.cursors.Cursor ##}hjc sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hjmh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j&jz j'j{ j(j{ j)j*j+j,j-j.j/uh%jh&hhh,h'Nh)Nubh )}(h## pygame.cursors ##h]h## pygame.cursors ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kubh)}(hRExample code for creating and settings cursors. (Click the mouse to switch cursor)h]hRExample code for creating and settings cursors. (Click the mouse to switch cursor)}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hX# pygame setup import pygame as pg pg.init() screen = pg.display.set_mode([600, 400]) pg.display.set_caption("Example code for the cursors module") # create a system cursor system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO) # create bitmap cursors bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow) bitmap_2 = pg.cursors.Cursor( (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings) ) # create a color cursor surf = pg.Surface((40, 40)) # you could also load an image surf.fill((120, 50, 50)) # and use that as your surface color = pg.cursors.Cursor((20, 20), surf) cursors = [system, bitmap_1, bitmap_2, color] cursor_index = 0 pg.mouse.set_cursor(cursors[cursor_index]) clock = pg.time.Clock() going = True while going: clock.tick(60) screen.fill((0, 75, 30)) pg.display.flip() for event in pg.event.get(): if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE): going = False # if the mouse is clicked it will switch to a new cursor if event.type == pg.MOUSEBUTTONDOWN: cursor_index += 1 cursor_index %= len(cursors) pg.mouse.set_cursor(cursors[cursor_index]) pg.quit() h]hX# pygame setup import pygame as pg pg.init() screen = pg.display.set_mode([600, 400]) pg.display.set_caption("Example code for the cursors module") # create a system cursor system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO) # create bitmap cursors bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow) bitmap_2 = pg.cursors.Cursor( (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings) ) # create a color cursor surf = pg.Surface((40, 40)) # you could also load an image surf.fill((120, 50, 50)) # and use that as your surface color = pg.cursors.Cursor((20, 20), surf) cursors = [system, bitmap_1, bitmap_2, color] cursor_index = 0 pg.mouse.set_cursor(cursors[cursor_index]) clock = pg.time.Clock() going = True while going: clock.tick(60) screen.fill((0, 75, 30)) pg.display.flip() for event in pg.event.get(): if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE): going = False # if the mouse is clicked it will switch to a new cursor if event.type == pg.MOUSEBUTTONDOWN: cursor_index += 1 cursor_index %= len(cursors) pg.mouse.set_cursor(cursors[cursor_index]) pg.quit() }hj sbah}(h]h]h]h]h!]sourceU/home/runner/work/pygame/pygame/docs/reST/ref/code_examples/cursors_module_example.pyh#h$forcehighlight_args} linenostartKsuh%jh'h]h)Khh,h&hubeh}(h](hspygame-cursorseh]h]pygame.cursorsah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j' h'h]h)Khh,h&hubjjj<jAjkjpjTjYjjj j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/cursors.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.405141 pygame-2.6.1/docs/generated/doctrees/ref/display.doctree0000644000175100001770000037672414676242416022734 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.display`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.display}hh None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%huhjah&hh'h]h)K?ubh)}(hInitializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level ``pygame.init()``.h](hInitializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level }hjsbh;)}(h``pygame.init()``h]h pygame.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjah&hubh)}(hXiPygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable ``SDL_VIDEODRIVER`` can be set to control which backend is used. The systems with multiple choices are listed here.h](hPygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable }hjsbh;)}(h``SDL_VIDEODRIVER``h]hSDL_VIDEODRIVER}hjsbah}(h]h]h]h]h!]uh%h:hjubh` can be set to control which backend is used. The systems with multiple choices are listed here.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KFhjah&hubh literal_block)}(hWWindows : windib, directx Unix : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalibh]hWWindows : windib, directx Unix : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)KNhjah&hubh)}(hXuOn some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable ``SDL_WINDOWID`` must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display.h](hOn some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable }hjsbh;)}(h``SDL_WINDOWID``h]h SDL_WINDOWID}hjsbah}(h]h]h]h]h!]uh%h:hjubh must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KQhjah&hubh)}(hJIt is harmless to call this more than once, repeated calls have no effect.h]hJIt is harmless to call this more than once, repeated calls have no effect.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KWhjah&hubh )}(h## pygame.display.init ##h]h## pygame.display.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjah&hh'h]h)KYubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj1objtypej2desctypej2no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!quit() (in module pygame.display)pygame.display.quithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hquith](j!)}(hpygame.display.h]hpygame.display.}hjUsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjQh&hh'h]h)K[ubj3)}(hjSh]hquit}hjcsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjQh&hh'h]h)K[ubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjQh&hh'h]h)K[ubeh}(h]jLah](jRjSeh]h]h!]jWjXjYhjZjSj[jXjSj]quit()uh%jh'h]h)K[hjNh&hubj`)}(hhh](hv)}(hhh](hz)}(h%:sl:`Uninitialize the display module`h]h)}(hjh]hUninitialize the display module}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K]ubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K]ubh)}(hThis will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits.h]hThis will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K`hjh&hubh)}(hJIt is harmless to call this more than once, repeated calls have no effect.h]hJIt is harmless to call this more than once, repeated calls have no effect.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kdhjh&hubh )}(h## pygame.display.quit ##h]h## pygame.display.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%j_hjNh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%get_init() (in module pygame.display)pygame.display.get_inithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j!)}(hpygame.display.h]hpygame.display.}hj sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Khubj3)}(hjh]hget_init}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)KhubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Khubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] get_init()uh%jh'h]h)Khhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h=:sl:`Returns True if the display module has been initialized`h]h)}(hj>h]h7Returns True if the display module has been initialized}hj@sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Kjubhz)}(h:sg:`get_init() -> bool`h]h)}(hjUh]hget_init() -> bool}hjWsbah}(h]h]jah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%huhj6h&hh'h]h)Kjubh)}(hJReturns True if the :mod:`pygame.display` module is currently initialized.h](hReturns True if the }hjpsbh6)}(h:mod:`pygame.display`h]h;)}(hjzh]hpygame.display}hj|sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjxubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYjXhZNh[pygame.displayuh%h5h'h]h)Kmhjpubh! module is currently initialized.}hjpsbeh}(h]h]h]h]h!]uh%hh'h]h)Kmhj6h&hubh )}(h## pygame.display.get_init ##h]h## pygame.display.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj6h&hh'h]h)Koubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%set_mode() (in module pygame.display)pygame.display.set_modehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_modeh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Kqubj3)}(hjh]hset_mode}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)KqubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Kqubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] set_mode()uh%jh'h]h)Kqhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h/:sl:`Initialize a window or screen for display`h]h)}(hjh]h)Initialize a window or screen for display}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Ksubhz)}(hL:sg:`set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface`h]h)}(hjh]hFset_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface}hj!sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Ktubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Ksubh)}(hThis function will create a display Surface. The arguments passed in are requests for a display type. The actual created display will be the best possible match supported by the system.h]hThis function will create a display Surface. The arguments passed in are requests for a display type. The actual created display will be the best possible match supported by the system.}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)Kvhjh&hubh)}(hlNote that calling this function implicitly initializes ``pygame.display``, if it was not initialized before.h](h7Note that calling this function implicitly initializes }hjHsbh;)}(h``pygame.display``h]hpygame.display}hjPsbah}(h]h]h]h]h!]uh%h:hjHubh#, if it was not initialized before.}hjHsbeh}(h]h]h]h]h!]uh%hh'h]h)Kzhjh&hubh)}(hThe size argument is a pair of numbers representing the width and height. The flags argument is a collection of additional options. The depth argument represents the number of bits to use for color.h]hThe size argument is a pair of numbers representing the width and height. The flags argument is a collection of additional options. The depth argument represents the number of bits to use for color.}hjhsbah}(h]h]h]h]h!]uh%hh'h]h)K}hjh&hubh)}(hyThe Surface that gets returned can be drawn to like a regular Surface but changes will eventually be seen on the monitor.h]hyThe Surface that gets returned can be drawn to like a regular Surface but changes will eventually be seen on the monitor.}hjvsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXcIf no size is passed or is set to ``(0, 0)`` and pygame uses ``SDL`` version 1.2.10 or above, the created Surface will have the same size as the current screen resolution. If only the width or height are set to ``0``, the Surface will have the same width or height as the screen resolution. Using a ``SDL`` version prior to 1.2.10 will raise an exception.h](h"If no size is passed or is set to }hjsbh;)}(h ``(0, 0)``h]h(0, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjubh and pygame uses }hjsbh;)}(h``SDL``h]hSDL}hjsbah}(h]h]h]h]h!]uh%h:hjubh version 1.2.10 or above, the created Surface will have the same size as the current screen resolution. If only the width or height are set to }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubhS, the Surface will have the same width or height as the screen resolution. Using a }hjsbh;)}(h``SDL``h]hSDL}hjsbah}(h]h]h]h]h!]uh%h:hjubh1 version prior to 1.2.10 will raise an exception.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXIt is usually best to not pass the depth argument. It will default to the best and fastest color depth for the system. If your game requires a specific color format you can control the depth with this argument. Pygame will emulate an unavailable color depth which can be slow.h]hXIt is usually best to not pass the depth argument. It will default to the best and fastest color depth for the system. If your game requires a specific color format you can control the depth with this argument. Pygame will emulate an unavailable color depth which can be slow.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hWhen requesting fullscreen display modes, sometimes an exact match for the requested size cannot be made. In these situations pygame will select the closest compatible match. The returned surface will still always match the requested size.h]hWhen requesting fullscreen display modes, sometimes an exact match for the requested size cannot be made. In these situations pygame will select the closest compatible match. The returned surface will still always match the requested size.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX|On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Note that SCALED is considered an experimental API and may change in future releases.h]hX|On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Note that SCALED is considered an experimental API and may change in future releases.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThe flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). Here are the display flags you will want to choose from:h]hThe flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). Here are the display flags you will want to choose from:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hX,pygame.FULLSCREEN create a fullscreen display pygame.DOUBLEBUF only applicable with OPENGL pygame.HWSURFACE (obsolete in pygame 2) hardware accelerated, only in FULLSCREEN pygame.OPENGL create an OpenGL-renderable display pygame.RESIZABLE display window should be resizeable pygame.NOFRAME display window will have no border or controls pygame.SCALED resolution depends on desktop size and scale graphics pygame.SHOWN window is opened in visible mode (default) pygame.HIDDEN window is opened in hidden modeh]hX,pygame.FULLSCREEN create a fullscreen display pygame.DOUBLEBUF only applicable with OPENGL pygame.HWSURFACE (obsolete in pygame 2) hardware accelerated, only in FULLSCREEN pygame.OPENGL create an OpenGL-renderable display pygame.RESIZABLE display window should be resizeable pygame.NOFRAME display window will have no border or controls pygame.SCALED resolution depends on desktop size and scale graphics pygame.SHOWN window is opened in visible mode (default) pygame.HIDDEN window is opened in hidden mode}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubhversionmodified)}(h-New in pygame 2.0.0: SCALED, SHOWN and HIDDENh]h)}(h-New in pygame 2.0.0: SCALED, SHOWN and HIDDENh](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hj*sbah}(h]h](j addedeh]h]h!]uh%hhj&h&hh'h]h)Kubh;)}(h ``SCALED``h]hSCALED}hj9sbah}(h]h]h]h]h!]uh%h:hj&h&hh'Nh)Nubh, }(hj&h&hh'Nh)Nubh;)}(h ``SHOWN``h]hSHOWN}hjKsbah}(h]h]h]h]h!]uh%h:hj&h&hh'Nh)Nubh and }(hj&h&hh'Nh)Nubh;)}(h ``HIDDEN``h]hHIDDEN}hj]sbah}(h]h]h]h]h!]uh%h:hj&h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj"h&hh'h]h)Kubah}(h]h]h]h]h!]type versionaddedversion2.0.0uh%j h&hh'h]h)Khjubh)}(hXBy setting the ``vsync`` parameter to ``1``, it is possible to get a display with vertical sync, but you are not guaranteed to get one. The request only works at all for calls to ``set_mode()`` with the ``pygame.OPENGL`` or ``pygame.SCALED`` flags set, and is still not guaranteed even with one of those set. What you get depends on the hardware and driver configuration of the system pygame is running on. Here is an example usage of a call to ``set_mode()`` that may give you a display with vsync:h](hBy setting the }hj|sbh;)}(h ``vsync``h]hvsync}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh parameter to }hj|sbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh, it is possible to get a display with vertical sync, but you are not guaranteed to get one. The request only works at all for calls to }hj|sbh;)}(h``set_mode()``h]h set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh with the }hj|sbh;)}(h``pygame.OPENGL``h]h pygame.OPENGL}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh or }hj|sbh;)}(h``pygame.SCALED``h]h pygame.SCALED}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh flags set, and is still not guaranteed even with one of those set. What you get depends on the hardware and driver configuration of the system pygame is running on. Here is an example usage of a call to }hj|sbh;)}(h``set_mode()``h]h set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh( that may give you a display with vsync:}hj|sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hpflags = pygame.OPENGL | pygame.FULLSCREEN window_surface = pygame.display.set_mode((1920, 1080), flags, vsync=1)h]hpflags = pygame.OPENGL | pygame.FULLSCREEN window_surface = pygame.display.set_mode((1920, 1080), flags, vsync=1)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubh)}(hNVsync behaviour is considered experimental, and may change in future releases.h]hNVsync behaviour is considered experimental, and may change in future releases.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj!)}(hNew in pygame 2.0.0: vsynch]h)}(hNew in pygame 2.0.0: vsynch](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hjsbah}(h]h](j j5eh]h]h!]uh%hhjh&hh'h]h)Kubh;)}(h ``vsync``h]hvsync}hj(sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)Khjubh)}(hBasic example:h]hBasic example:}hjEsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(h~# Open a window on the screen screen_width=700 screen_height=400 screen=pygame.display.set_mode([screen_width, screen_height])h]h~# Open a window on the screen screen_width=700 screen_height=400 screen=pygame.display.set_mode([screen_width, screen_height])}hjSsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubh)}(hThe display index ``0`` means the default display is used. If no display index argument is provided, the default display can be overridden with an environment variable.h](hThe display index }hjasbh;)}(h``0``h]h0}hjisbah}(h]h]h]h]h!]uh%h:hjaubh means the default display is used. If no display index argument is provided, the default display can be overridden with an environment variable.}hjasbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj!)}(h/Changed in pygame 1.9.5: display argument addedh]h)}(h/Changed in pygame 1.9.5: display argument addedh](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](j changedeh]h]h!]uh%hhjh&hh'h]h)Kubh;)}(h ``display``h]hdisplay}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument added}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz1.9.5uh%j h&hh'h]h)Khjubj!)}(hChanged in pygame 2.1.3: pygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with.h]h)}(hChanged in pygame 2.1.3: pygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with.h](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)Kubhpygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz2.1.3uh%j h&hh'h]h)Khjubh )}(h## pygame.display.set_mode ##h]h## pygame.display.set_mode ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_surface() (in module pygame.display)pygame.display.get_surfacehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_surfaceh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Kubj3)}(hjh]h get_surface}hj!sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)KubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Kubeh}(h]j ah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] get_surface()uh%jh'h]h)Khj h&hubj`)}(hhh](hv)}(hhh](hz)}(h::sl:`Get a reference to the currently set display surface`h]h)}(hjHh]h4Get a reference to the currently set display surface}hjJsbah}(h]h]hah]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubhz)}(h:sg:`get_surface() -> Surface`h]h)}(hj_h]hget_surface() -> Surface}hjasbah}(h]h]jah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj@h&hh'h]h)Kubh)}(hoReturn a reference to the currently set display Surface. If no display mode has been set this will return None.h]hoReturn a reference to the currently set display Surface. If no display mode has been set this will return None.}hjzsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubh )}(h ## pygame.display.get_surface ##h]h ## pygame.display.get_surface ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj@h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!flip() (in module pygame.display)pygame.display.fliphNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hfliph](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Kubj3)}(hjh]hflip}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)KubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Kubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj]flip()uh%jh'h]h)Khjh&hubj`)}(hhh](hv)}(hhh](hz)}(h3:sl:`Update the full display Surface to the screen`h]h)}(hjh]h-Update the full display Surface to the screen}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`flip() -> None`h]h)}(hj h]hflip() -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hThis will update the contents of the entire display. If your display mode is using the flags ``pygame.HWSURFACE`` and ``pygame.DOUBLEBUF`` on pygame 1, this will wait for a vertical retrace and swap the surfaces.h](h]This will update the contents of the entire display. If your display mode is using the flags }hj sbh;)}(h``pygame.HWSURFACE``h]hpygame.HWSURFACE}hj( sbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``pygame.DOUBLEBUF``h]hpygame.DOUBLEBUF}hj: sbah}(h]h]h]h]h!]uh%h:hj ubhJ on pygame 1, this will wait for a vertical retrace and swap the surfaces.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hPWhen using an ``pygame.OPENGL`` display mode this will perform a gl buffer swap.h](hWhen using an }hjR sbh;)}(h``pygame.OPENGL``h]h pygame.OPENGL}hjZ sbah}(h]h]h]h]h!]uh%h:hjR ubh1 display mode this will perform a gl buffer swap.}hjR sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.display.flip ##h]h## pygame.display.flip ##}hjr sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j j7j j8j j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#update() (in module pygame.display)pygame.display.updatehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hupdateh](j!)}(hpygame.display.h]hpygame.display.}hj sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj3)}(hj h]hupdate}hj sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hj h&hh'h]h)KubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChj h&hh'h]h)Kubeh}(h]j ah](jRjSeh]h]h!]jWjXjYhjZj j[jXj j]update()uh%jh'h]h)Khj h&hubj`)}(hhh](hv)}(hhh](hz)}(h9:sl:`Update portions of the screen for software displays`h]h)}(hj h]h3Update portions of the screen for software displays}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h$:sg:`update(rectangle=None) -> None`h]h)}(hj h]hupdate(rectangle=None) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h$:sg:`update(rectangle_list) -> None`h]h)}(hj h]hupdate(rectangle_list) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hX This function is like an optimized version of ``pygame.display.flip()`` for software displays. It allows only a portion of the screen to be updated, instead of the entire area. If no argument is passed it updates the entire Surface area like ``pygame.display.flip()``.h](h.This function is like an optimized version of }hj! sbh;)}(h``pygame.display.flip()``h]hpygame.display.flip()}hj) sbah}(h]h]h]h]h!]uh%h:hj! ubh for software displays. It allows only a portion of the screen to be updated, instead of the entire area. If no argument is passed it updates the entire Surface area like }hj! sbh;)}(h``pygame.display.flip()``h]hpygame.display.flip()}hj; sbah}(h]h]h]h]h!]uh%h:hj! ubh.}hj! sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hNote that calling ``display.update(None)`` means no part of the window is updated. Whereas ``display.update()`` means the whole window is updated.h](hNote that calling }hjS sbh;)}(h``display.update(None)``h]hdisplay.update(None)}hj[ sbah}(h]h]h]h]h!]uh%h:hjS ubh1 means no part of the window is updated. Whereas }hjS sbh;)}(h``display.update()``h]hdisplay.update()}hjm sbah}(h]h]h]h]h!]uh%h:hjS ubh# means the whole window is updated.}hjS sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hX9You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped.h]hX9You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hVThis call cannot be used on ``pygame.OPENGL`` displays and will generate an exception.h](hThis call cannot be used on }hj sbh;)}(h``pygame.OPENGL``h]h pygame.OPENGL}hj sbah}(h]h]h]h]h!]uh%h:hj ubh) displays and will generate an exception.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h## pygame.display.update ##h]h## pygame.display.update ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j j7j j8j j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'get_driver() (in module pygame.display)pygame.display.get_driverhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_driverh](j!)}(hpygame.display.h]hpygame.display.}hj sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hj h&hh'h]h)Mubj3)}(hj h]h get_driver}hj sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hj h&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChj h&hh'h]h)Mubeh}(h]j ah](jRjSeh]h]h!]jWjXjYhjZj j[jXj j] get_driver()uh%jh'h]h)Mhj h&hubj`)}(hhh](hv)}(hhh](hz)}(h0:sl:`Get the name of the pygame display backend`h]h)}(hj h]h*Get the name of the pygame display backend}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M ubhz)}(h:sg:`get_driver() -> name`h]h)}(hj0 h]hget_driver() -> name}hj2 sbah}(h]h]jah]h]h!]uh%hhj. ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M ubh)}(hXVPygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the ``SDL_VIDEODRIVER`` flags in ``pygame.display.set_mode()`` to see some of the common options.h](hPygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the }hjK sbh;)}(h``SDL_VIDEODRIVER``h]hSDL_VIDEODRIVER}hjS sbah}(h]h]h]h]h!]uh%h:hjK ubh flags in }hjK sbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hje sbah}(h]h]h]h]h!]uh%h:hjK ubh# to see some of the common options.}hjK sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj h&hubh )}(h## pygame.display.get_driver ##h]h## pygame.display.get_driver ##}hj} sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j j7j j8j j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!Info() (in module pygame.display)pygame.display.InfohNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hInfoh](j!)}(hpygame.display.h]hpygame.display.}hj sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hj h&hh'h]h)Mubj3)}(hj h]hInfo}hj sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hj h&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChj h&hh'h]h)Mubeh}(h]j ah](jRjSeh]h]h!]jWjXjYhjZj j[jXj j]Info()uh%jh'h]h)Mhj h&hubj`)}(hhh](hv)}(hhh](hz)}(h/:sl:`Create a video display information object`h]h)}(hj h]h)Create a video display information object}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`Info() -> VideoInfo`h]h)}(hj h]hInfo() -> VideoInfo}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hXvCreates a simple object containing several attributes to describe the current graphics environment. If this is called before ``pygame.display.set_mode()`` some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes:h](h}Creates a simple object containing several attributes to describe the current graphics environment. If this is called before }hj sbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes:}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubj)}(hXhw: 1 if the display is hardware accelerated wm: 1 if windowed display modes can be used video_mem: The megabytes of video memory on the display. This is 0 if unknown bitsize: Number of bits used to store each pixel bytesize: Number of bytes used to store each pixel masks: Four values used to pack RGBA values into pixels shifts: Four values used to pack RGBA values into pixels losses: Four values used to pack RGBA values into pixels blit_hw: 1 if hardware Surface blitting is accelerated blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated blit_hw_A: 1 if hardware Surface pixel alpha blitting is accelerated blit_sw: 1 if software Surface blitting is accelerated blit_sw_CC: 1 if software Surface colorkey blitting is accelerated blit_sw_A: 1 if software Surface pixel alpha blitting is accelerated current_h, current_w: Height and width of the current video mode, or of the desktop mode if called before the display.set_mode is called. (current_h, current_w are available since SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if an old SDL is being used.h]hXhw: 1 if the display is hardware accelerated wm: 1 if windowed display modes can be used video_mem: The megabytes of video memory on the display. This is 0 if unknown bitsize: Number of bits used to store each pixel bytesize: Number of bytes used to store each pixel masks: Four values used to pack RGBA values into pixels shifts: Four values used to pack RGBA values into pixels losses: Four values used to pack RGBA values into pixels blit_hw: 1 if hardware Surface blitting is accelerated blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated blit_hw_A: 1 if hardware Surface pixel alpha blitting is accelerated blit_sw: 1 if software Surface blitting is accelerated blit_sw_CC: 1 if software Surface colorkey blitting is accelerated blit_sw_A: 1 if software Surface pixel alpha blitting is accelerated current_h, current_w: Height and width of the current video mode, or of the desktop mode if called before the display.set_mode is called. (current_h, current_w are available since SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if an old SDL is being used.}hj5 sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)M#hj h&hubh )}(h## pygame.display.Info ##h]h## pygame.display.Info ##}hjC sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%j_hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jZ j7j[ j8j[ j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_wm_info() (in module pygame.display)pygame.display.get_wm_infohNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_wm_infoh](j!)}(hpygame.display.h]hpygame.display.}hjt sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjp h&hh'h]h)M:ubj3)}(hjr h]h get_wm_info}hj sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjp h&hh'h]h)M:ubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjp h&hh'h]h)M:ubeh}(h]jk ah](jRjSeh]h]h!]jWjXjYhjZjr j[jXjr j] get_wm_info()uh%jh'h]h)M:hjm h&hubj`)}(hhh](hv)}(hhh](hz)}(h8:sl:`Get information about the current windowing system`h]h)}(hj h]h2Get information about the current windowing system}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M<ubhz)}(h:sg:`get_wm_info() -> dict`h]h)}(hj h]hget_wm_info() -> dict}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M<ubh)}(hX!Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display.h]hX!Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)M?hj h&hubj!)}(hNew in pygame 1.7.1.h]h)}(hNew in pygame 1.7.1.h]h)}(hNew in pygame 1.7.1.h]hNew in pygame 1.7.1.}hj sbah}(h]h](j j5eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)MEubah}(h]h]h]h]h!]jx versionaddedjz1.7.1uh%j h&hh'h]h)MDhj ubh )}(h ## pygame.display.get_wm_info ##h]h ## pygame.display.get_wm_info ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)MFubeh}(h]h]h]h]h!]uh%j_hjm h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j% j7j& j8j& j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_desktop_sizes() (in module pygame.display) pygame.display.get_desktop_sizeshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_desktop_sizesh](j!)}(hpygame.display.h]hpygame.display.}hj? sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hj; h&hh'h]h)MHubj3)}(hj= h]hget_desktop_sizes}hjM sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hj; h&hh'h]h)MHubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChj; h&hh'h]h)MHubeh}(h]j6 ah](jRjSeh]h]h!]jWjXjYhjZj= j[jXj= j]get_desktop_sizes()uh%jh'h]h)MHhj8 h&hubj`)}(hhh](hv)}(hhh](hz)}(h":sl:`Get sizes of active desktops`h]h)}(hjt h]hGet sizes of active desktops}hjv sbah}(h]h]hah]h]h!]uh%hhjr ubah}(h]h]h]h]h!]uh%h)hKhjo h&hh'h]h)MJubhz)}(h!:sg:`get_desktop_sizes() -> list`h]h)}(hj h]hget_desktop_sizes() -> list}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjo h&hh'h]h)MKubeh}(h]h]h]h]h!]uh%huhjl h&hh'h]h)MJubh)}(htThis function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers.h]htThis function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)MMhjl h&hubh)}(hXThe length of the list is not the same as the number of attached monitors, as a desktop can be mirrored across multiple monitors. The desktop sizes do not indicate the maximum monitor resolutions supported by the hardware, but the desktop size configured in the operating system.h]hXThe length of the list is not the same as the number of attached monitors, as a desktop can be mirrored across multiple monitors. The desktop sizes do not indicate the maximum monitor resolutions supported by the hardware, but the desktop size configured in the operating system.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)MPhjl h&hubh)}(hX In order to fit windows into the desktop as it is currently configured, and to respect the resolution configured by the operating system in fullscreen mode, this function *should* be used to replace many use cases of ``pygame.display.list_modes()`` whenever applicable.h](hIn order to fit windows into the desktop as it is currently configured, and to respect the resolution configured by the operating system in fullscreen mode, this function }hj sbh emphasis)}(h*should*h]hshould}hj sbah}(h]h]h]h]h!]uh%j hj ubh& be used to replace many use cases of }hj sbh;)}(h``pygame.display.list_modes()``h]hpygame.display.list_modes()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh whenever applicable.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)MUhjl h&hubj!)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj sbah}(h]h](j j5eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)MZubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)MZhjl ubeh}(h]h]h]h]h!]uh%j_hj8 h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j$j7j%j8j%j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'list_modes() (in module pygame.display)pygame.display.list_modeshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h list_modesh](j!)}(hpygame.display.h]hpygame.display.}hj>sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hj:h&hh'h]h)M\ubj3)}(hj<h]h list_modes}hjLsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hj:h&hh'h]h)M\ubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChj:h&hh'h]h)M\ubeh}(h]j5ah](jRjSeh]h]h!]jWjXjYhjZj<j[jXj<j] list_modes()uh%jh'h]h)M\hj7h&hubj`)}(hhh](hv)}(hhh](hz)}(h,:sl:`Get list of available fullscreen modes`h]h)}(hjsh]h&Get list of available fullscreen modes}hjusbah}(h]h]hah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)M^ubhz)}(hE:sg:`list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list`h]h)}(hjh]h?list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)M_ubeh}(h]h]h]h]h!]uh%huhjkh&hh'h]h)M^ubh)}(hXOThis function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of ``-1`` means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest.h](hThis function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of }hjsbh;)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%h:hjubh means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mahjkh&hubh)}(hIf depth is ``0``, the current/best color depth for the display is used. The flags defaults to ``pygame.FULLSCREEN``, but you may need to add additional flags for specific fullscreen modes.h](h If depth is }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubhN, the current/best color depth for the display is used. The flags defaults to }hjsbh;)}(h``pygame.FULLSCREEN``h]hpygame.FULLSCREEN}hjsbah}(h]h]h]h]h!]uh%h:hjubhI, but you may need to add additional flags for specific fullscreen modes.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mghjkh&hubh)}(h:The display index ``0`` means the default display is used.h](hThe display index }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh# means the default display is used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mkhjkh&hubh)}(h|Since pygame 2.0, ``pygame.display.get_desktop_sizes()`` has taken over some use cases from ``pygame.display.list_modes()``:h](hSince pygame 2.0, }hjsbh;)}(h&``pygame.display.get_desktop_sizes()``h]h"pygame.display.get_desktop_sizes()}hjsbah}(h]h]h]h]h!]uh%h:hjubh$ has taken over some use cases from }hjsbh;)}(h``pygame.display.list_modes()``h]hpygame.display.list_modes()}hj1sbah}(h]h]h]h]h!]uh%h:hjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mmhjkh&hubh)}(hXWTo find a suitable size for non-fullscreen windows, it is preferable to use ``pygame.display.get_desktop_sizes()`` to get the size of the *current* desktop, and to then choose a smaller window size. This way, the window is guaranteed to fit, even when the monitor is configured to a lower resolution than the maximum supported by the hardware.h](hLTo find a suitable size for non-fullscreen windows, it is preferable to use }hjIsbh;)}(h&``pygame.display.get_desktop_sizes()``h]h"pygame.display.get_desktop_sizes()}hjQsbah}(h]h]h]h]h!]uh%h:hjIubh to get the size of the }hjIsbj )}(h *current*h]hcurrent}hjcsbah}(h]h]h]h]h!]uh%j hjIubh desktop, and to then choose a smaller window size. This way, the window is guaranteed to fit, even when the monitor is configured to a lower resolution than the maximum supported by the hardware.}hjIsbeh}(h]h]h]h]h!]uh%hh'h]h)Mphjkh&hubh)}(hXYTo avoid changing the physical monitor resolution, it is also preferable to use ``pygame.display.get_desktop_sizes()`` to determine the fullscreen resolution. Developers are strongly advised to default to the current physical monitor resolution unless the user explicitly requests a different one (e.g. in an options menu or configuration file).h](hPTo avoid changing the physical monitor resolution, it is also preferable to use }hj{sbh;)}(h&``pygame.display.get_desktop_sizes()``h]h"pygame.display.get_desktop_sizes()}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh to determine the fullscreen resolution. Developers are strongly advised to default to the current physical monitor resolution unless the user explicitly requests a different one (e.g. in an options menu or configuration file).}hj{sbeh}(h]h]h]h]h!]uh%hh'h]h)Mvhjkh&hubj!)}(h/Changed in pygame 1.9.5: display argument addedh]h)}(h/Changed in pygame 1.9.5: display argument addedh](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)M}ubh;)}(h ``display``h]hdisplay}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument added}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M}ubah}(h]h]h]h]h!]jxversionchangedjz1.9.5uh%j h&hh'h]h)M|hjkubh )}(h## pygame.display.list_modes ##h]h## pygame.display.list_modes ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjkh&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%j_hj7h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$mode_ok() (in module pygame.display)pygame.display.mode_okhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hmode_okh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]hmode_ok}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] mode_ok()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h2:sl:`Pick the best color depth for a display mode`h]h)}(hj8h]h,Pick the best color depth for a display mode}hj:sbah}(h]h]hah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubhz)}(h9:sg:`mode_ok(size, flags=0, depth=0, display=0) -> depth`h]h)}(hjOh]h3mode_ok(size, flags=0, depth=0, display=0) -> depth}hjQsbah}(h]h]jah]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj0h&hh'h]h)Mubh)}(hXThis function uses the same arguments as ``pygame.display.set_mode()``. It is used to determine if a requested display mode is available. It will return ``0`` if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for.h](h)This function uses the same arguments as }hjjsbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjrsbah}(h]h]h]h]h!]uh%h:hjjubhS. It is used to determine if a requested display mode is available. It will return }hjjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjjubhs if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for.}hjjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj0h&hubh)}(hUsually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match.h]hUsually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj0h&hubh)}(hIThe function will return ``0`` if the passed display flags cannot be set.h](hThe function will return }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh+ if the passed display flags cannot be set.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj0h&hubh)}(h:The display index ``0`` means the default display is used.h](hThe display index }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh# means the default display is used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj0h&hubj!)}(h/Changed in pygame 1.9.5: display argument addedh]h)}(h/Changed in pygame 1.9.5: display argument addedh](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)Mubh;)}(h ``display``h]hdisplay}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument added}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz1.9.5uh%j h&hh'h]h)Mhj0ubh )}(h## pygame.display.mode_ok ##h]h## pygame.display.mode_ok ##}hj!sbah}(h]h]h]h]h!]h#h$uh%h hj0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j8j7j9j8j9j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-gl_get_attribute() (in module pygame.display)pygame.display.gl_get_attributehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hgl_get_attributeh](j!)}(hpygame.display.h]hpygame.display.}hjRsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjNh&hh'h]h)Mubj3)}(hjPh]hgl_get_attribute}hj`sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjNh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjNh&hh'h]h)Mubeh}(h]jIah](jRjSeh]h]h!]jWjXjYhjZjPj[jXjPj]gl_get_attribute()uh%jh'h]h)MhjKh&hubj`)}(hhh](hv)}(hhh](hz)}(h>:sl:`Get the value for an OpenGL flag for the current display`h]h)}(hjh]h8Get the value for an OpenGL flag for the current display}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h%:sg:`gl_get_attribute(flag) -> value`h]h)}(hjh]hgl_get_attribute(flag) -> value}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hAfter calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, it is a good idea to check the value of any requested OpenGL attributes. See ``pygame.display.gl_set_attribute()`` for a list of valid flags.h](hAfter calling }hjsbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hjubh with the }hjsbh;)}(h``pygame.OPENGL``h]h pygame.OPENGL}hjsbah}(h]h]h]h]h!]uh%h:hjubhT flag, it is a good idea to check the value of any requested OpenGL attributes. See }hjsbh;)}(h%``pygame.display.gl_set_attribute()``h]h!pygame.display.gl_set_attribute()}hjsbah}(h]h]h]h]h!]uh%h:hjubh for a list of valid flags.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj!)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)Mubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz2.5.0uh%j h&hh'h]h)Mhjubh )}(h%## pygame.display.gl_get_attribute ##h]h%## pygame.display.gl_get_attribute ##}hj&sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjKh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j=j7j>j8j>j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-gl_set_attribute() (in module pygame.display)pygame.display.gl_set_attributehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hgl_set_attributeh](j!)}(hpygame.display.h]hpygame.display.}hjWsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjSh&hh'h]h)Mubj3)}(hjUh]hgl_set_attribute}hjesbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjSh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjSh&hh'h]h)Mubeh}(h]jNah](jRjSeh]h]h!]jWjXjYhjZjUj[jXjUj]gl_set_attribute()uh%jh'h]h)MhjPh&hubj`)}(hhh](hv)}(hhh](hz)}(h>:sl:`Request an OpenGL display attribute for the display mode`h]h)}(hjh]h8Request an OpenGL display attribute for the display mode}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h+:sg:`gl_set_attribute(flag, value) -> None`h]h)}(hjh]h%gl_set_attribute(flag, value) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXhWhen calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before ``pygame.display.set_mode()``.h](h When calling }hjsbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hjubh with the }hjsbh;)}(h``pygame.OPENGL``h]h pygame.OPENGL}hjsbah}(h]h]h]h]h!]uh%h:hjubhX flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before }hjsbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hXMany settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested.h]hXMany settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThe ``OPENGL`` flags are:h](hThe }hjsbh;)}(h ``OPENGL``h]hOPENGL}hjsbah}(h]h]h]h]h!]uh%h:hjubh flags are:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hGL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREOh]hGL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO}hj0sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubh)}(h:const:`GL_MULTISAMPLEBUFFERS`h]h6)}(hj@h]h;)}(hj@h]hGL_MULTISAMPLEBUFFERS}hjEsbah}(h]h](hFpypy-consteh]h]h!]uh%h:hjBubah}(h]h]h]h]h!]refdochS refdomainjOreftypeconst refexplicitrefwarnhYjXhZNh[GL_MULTISAMPLEBUFFERSuh%h5h'h]h)Mhj>ubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh block_quote)}(hWhether to enable multisampling anti-aliasing. Defaults to 0 (disabled). Set ``GL_MULTISAMPLESAMPLES`` to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3. h](h)}(hHWhether to enable multisampling anti-aliasing. Defaults to 0 (disabled).h]hHWhether to enable multisampling anti-aliasing. Defaults to 0 (disabled).}hjmsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjiubh)}(hsSet ``GL_MULTISAMPLESAMPLES`` to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3.h](hSet }hj{sbh;)}(h``GL_MULTISAMPLESAMPLES``h]hGL_MULTISAMPLESAMPLES}hjsbah}(h]h]h]h]h!]uh%h:hj{ubhV to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3.}hj{sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjiubeh}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh)}(h:const:`GL_STENCIL_SIZE`h]h6)}(hjh]h;)}(hjh]hGL_STENCIL_SIZE}hjsbah}(h]h](hFpypy-consteh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeconst refexplicitrefwarnhYjXhZNh[GL_STENCIL_SIZEuh%h5h'h]h)Mhjubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(h7Minimum bit size of the stencil buffer. Defaults to 0. h]h)}(h6Minimum bit size of the stencil buffer. Defaults to 0.h]h6Minimum bit size of the stencil buffer. Defaults to 0.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh)}(h:const:`GL_DEPTH_SIZE`h]h6)}(hjh]h;)}(hjh]h GL_DEPTH_SIZE}hjsbah}(h]h](hFpypy-consteh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeconst refexplicitrefwarnhYjXhZNh[ GL_DEPTH_SIZEuh%h5h'h]h)Mhjubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(h6Minimum bit size of the depth buffer. Defaults to 16. h]h)}(h5Minimum bit size of the depth buffer. Defaults to 16.h]h5Minimum bit size of the depth buffer. Defaults to 16.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj ubah}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh)}(h:const:`GL_STEREO`h]h6)}(hj%h]h;)}(hj%h]h GL_STEREO}hj*sbah}(h]h](hFpypy-consteh]h]h!]uh%h:hj'ubah}(h]h]h]h]h!]refdochS refdomainj4reftypeconst refexplicitrefwarnhYjXhZNh[ GL_STEREOuh%h5h'h]h)Mhj#ubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(h$1 enables stereo 3D. Defaults to 0. h]h)}(h#1 enables stereo 3D. Defaults to 0.h]h#1 enables stereo 3D. Defaults to 0.}hjPsbah}(h]h]h]h]h!]uh%hh'h]h)MhjLubah}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh)}(h:const:`GL_BUFFER_SIZE`h]h6)}(hjfh]h;)}(hjfh]hGL_BUFFER_SIZE}hjksbah}(h]h](hFpypy-consteh]h]h!]uh%h:hjhubah}(h]h]h]h]h!]refdochS refdomainjureftypeconst refexplicitrefwarnhYjXhZNh[GL_BUFFER_SIZEuh%h5h'h]h)Mhjdubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(h5Minimum bit size of the frame buffer. Defaults to 0. h]h)}(h4Minimum bit size of the frame buffer. Defaults to 0.h]h4Minimum bit size of the frame buffer. Defaults to 0.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubj!)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)Mubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz2.5.0uh%j h&hh'h]h)Mhjubj!)}(h+New in pygame 2.0.0: Additional attributes:h]h)}(h+New in pygame 2.0.0: Additional attributes:h](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hjsbah}(h]h](j j5eh]h]h!]uh%hhjh&hh'h]h)MubhAdditional attributes:}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)Mhjubj)}(hGL_ACCELERATED_VISUAL, GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION, GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK, GL_SHARE_WITH_CURRENT_CONTEXT, GL_CONTEXT_RELEASE_BEHAVIOR, GL_FRAMEBUFFER_SRGB_CAPABLEh]hGL_ACCELERATED_VISUAL, GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION, GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK, GL_SHARE_WITH_CURRENT_CONTEXT, GL_CONTEXT_RELEASE_BEHAVIOR, GL_FRAMEBUFFER_SRGB_CAPABLE}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubh)}(h :const:`GL_CONTEXT_PROFILE_MASK`h]h6)}(hjh]h;)}(hjh]hGL_CONTEXT_PROFILE_MASK}hj sbah}(h]h](hFpypy-consteh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainjreftypeconst refexplicitrefwarnhYjXhZNh[GL_CONTEXT_PROFILE_MASKuh%h5h'h]h)Mhjubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(hX.Sets the OpenGL profile to one of these values: :: GL_CONTEXT_PROFILE_CORE disable deprecated features GL_CONTEXT_PROFILE_COMPATIBILITY allow deprecated features GL_CONTEXT_PROFILE_ES allow only the ES feature subset of OpenGL h](h)}(h/Sets the OpenGL profile to one of these values:h]h/Sets the OpenGL profile to one of these values:}hj2sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj.ubj)}(hGL_CONTEXT_PROFILE_CORE disable deprecated features GL_CONTEXT_PROFILE_COMPATIBILITY allow deprecated features GL_CONTEXT_PROFILE_ES allow only the ES feature subset of OpenGLh]hGL_CONTEXT_PROFILE_CORE disable deprecated features GL_CONTEXT_PROFILE_COMPATIBILITY allow deprecated features GL_CONTEXT_PROFILE_ES allow only the ES feature subset of OpenGL}hj@sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhj.ubeh}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh)}(h:const:`GL_ACCELERATED_VISUAL`h]h6)}(hjVh]h;)}(hjVh]hGL_ACCELERATED_VISUAL}hj[sbah}(h]h](hFpypy-consteh]h]h!]uh%h:hjXubah}(h]h]h]h]h!]refdochS refdomainjereftypeconst refexplicitrefwarnhYjXhZNh[GL_ACCELERATED_VISUALuh%h5h'h]h)MhjTubah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubjh)}(hhSet to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed. h]h)}(hgSet to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed.h]hgSet to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj}ubah}(h]h]h]h]h!]uh%jgh'h]h)Mhjh&hubh )}(h%## pygame.display.gl_set_attribute ##h]h%## pygame.display.gl_set_attribute ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjPh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'get_active() (in module pygame.display)pygame.display.get_activehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_activeh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]h get_active}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] get_active()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h;:sl:`Returns True when the display is active on the screen`h]h)}(hjh]h5Returns True when the display is active on the screen}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_active() -> bool`h]h)}(hjh]hget_active() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hX(Returns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after ``pygame.display.set_mode()``. This method may return True even if the application is fully hidden behind another application window.h](hReturns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after }hj-sbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hj5sbah}(h]h]h]h]h!]uh%h:hj-ubhh. This method may return True even if the application is fully hidden behind another application window.}hj-sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThis will return False if the display Surface has been iconified or minimized (either via ``pygame.display.iconify()`` or via an OS specific method such as the minimize-icon available on most desktops).h](hZThis will return False if the display Surface has been iconified or minimized (either via }hjMsbh;)}(h``pygame.display.iconify()``h]hpygame.display.iconify()}hjUsbah}(h]h]h]h]h!]uh%h:hjMubhT or via an OS specific method such as the minimize-icon available on most desktops).}hjMsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hXThe method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop.h]hXThe method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop.}hjmsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh note)}(hThis function returning True is unrelated to whether the application has input focus. Please see ``pygame.key.get_focused()`` and ``pygame.mouse.get_focused()`` for APIs related to input focus.h]h)}(hThis function returning True is unrelated to whether the application has input focus. Please see ``pygame.key.get_focused()`` and ``pygame.mouse.get_focused()`` for APIs related to input focus.h](hbThis function returning True is unrelated to whether the application has input focus. Please see }hjsbh;)}(h``pygame.key.get_focused()``h]hpygame.key.get_focused()}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``pygame.mouse.get_focused()``h]hpygame.mouse.get_focused()}hjsbah}(h]h]h]h]h!]uh%h:hjubh! for APIs related to input focus.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj}ubah}(h]h]h]h]h!]uh%j{h'h]h)Mhjh&hubh )}(h## pygame.display.get_active ##h]h## pygame.display.get_active ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$iconify() (in module pygame.display)pygame.display.iconifyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hiconifyh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]hiconify}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] iconify()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h!:sl:`Iconify the display surface`h]h)}(hjh]hIconify the display surface}hj!sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`iconify() -> bool`h]h)}(hj6h]hiconify() -> bool}hj8sbah}(h]h]jah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hRequest the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful.h]hRequest the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful.}hjQsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX.When the display is iconified ``pygame.display.get_active()`` will return ``False``. The event queue should receive an ``ACTIVEEVENT`` event when the window has been iconified. Additionally, the event queue also receives a ``WINDOWEVENT_MINIMIZED`` event when the window has been iconified on pygame 2.h](hWhen the display is iconified }hj_sbh;)}(h``pygame.display.get_active()``h]hpygame.display.get_active()}hjgsbah}(h]h]h]h]h!]uh%h:hj_ubh will return }hj_sbh;)}(h ``False``h]hFalse}hjysbah}(h]h]h]h]h!]uh%h:hj_ubh$. The event queue should receive an }hj_sbh;)}(h``ACTIVEEVENT``h]h ACTIVEEVENT}hjsbah}(h]h]h]h]h!]uh%h:hj_ubhY event when the window has been iconified. Additionally, the event queue also receives a }hj_sbh;)}(h``WINDOWEVENT_MINIMIZED``h]hWINDOWEVENT_MINIMIZED}hjsbah}(h]h]h]h]h!]uh%h:hj_ubh6 event when the window has been iconified on pygame 2.}hj_sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.display.iconify ##h]h## pygame.display.iconify ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.toggle_fullscreen() (in module pygame.display) pygame.display.toggle_fullscreenhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(htoggle_fullscreenh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]htoggle_fullscreen}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj]toggle_fullscreen()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h5:sl:`Switch between fullscreen and windowed displays`h]h)}(hjh]h/Switch between fullscreen and windowed displays}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M!ubhz)}(h :sg:`toggle_fullscreen() -> int`h]h)}(hj2h]htoggle_fullscreen() -> int}hj4sbah}(h]h]jah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M!ubh)}(hSwitches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen.h]hSwitches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen.}hjMsbah}(h]h]h]h]h!]uh%hh'h]h)M$hjh&hubh)}(h&Supported display drivers in pygame 1:h]h&Supported display drivers in pygame 1:}hj[sbah}(h]h]h]h]h!]uh%hh'h]h)M(hjh&hubjh)}(h** x11 (Linux/Unix) * wayland (Linux/Unix) h]h bullet_list)}(hhh](h list_item)}(hx11 (Linux/Unix)h]h)}(hjvh]hx11 (Linux/Unix)}hjxsbah}(h]h]h]h]h!]uh%hh'h]h)M*hjtubah}(h]h]h]h]h!]uh%jrh'h]h)M*hjoubjs)}(hwayland (Linux/Unix) h]h)}(hwayland (Linux/Unix)h]hwayland (Linux/Unix)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M+hjubah}(h]h]h]h]h!]uh%jrh'h]h)M+hjoubeh}(h]h]h]h]h!]bullet*uh%jmh'h]h)M*hjiubah}(h]h]h]h]h!]uh%jgh'h]h)M*hjh&hubh)}(h&Supported display drivers in pygame 2:h]h&Supported display drivers in pygame 2:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M-hjh&hubjh)}(hP* windows (Windows) * x11 (Linux/Unix) * wayland (Linux/Unix) * cocoa (OSX/Mac) h]jn)}(hhh](js)}(hwindows (Windows)h]h)}(hjh]hwindows (Windows)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M/hjubah}(h]h]h]h]h!]uh%jrh'h]h)M/hjubjs)}(hx11 (Linux/Unix)h]h)}(hjh]hx11 (Linux/Unix)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M0hjubah}(h]h]h]h]h!]uh%jrh'h]h)M0hjubjs)}(hwayland (Linux/Unix)h]h)}(hjh]hwayland (Linux/Unix)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M1hjubah}(h]h]h]h]h!]uh%jrh'h]h)M1hjubjs)}(hcocoa (OSX/Mac) h]h)}(hcocoa (OSX/Mac)h]hcocoa (OSX/Mac)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M2hj ubah}(h]h]h]h]h!]uh%jrh'h]h)M2hjubeh}(h]h]h]h]h!]jjuh%jmh'h]h)M/hjubah}(h]h]h]h]h!]uh%jgh'h]h)M/hjh&hubj|)}(h:func:`toggle_fullscreen` doesn't work on Windows unless the window size is in :func:`pygame.display.list_modes()` or the window is created with the flag ``pygame.SCALED``. See `issue #2380 `_.h]h)}(h:func:`toggle_fullscreen` doesn't work on Windows unless the window size is in :func:`pygame.display.list_modes()` or the window is created with the flag ``pygame.SCALED``. See `issue #2380 `_.h](h6)}(h:func:`toggle_fullscreen`h]h;)}(hj9h]htoggle_fullscreen()}hj;sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj7ubah}(h]h]h]h]h!]refdochS refdomainjEreftypefunc refexplicitrefwarnhYjXhZNh[toggle_fullscreenuh%h5h'h]h)M4hj3ubh6 doesn't work on Windows unless the window size is in }hj3sbh6)}(h#:func:`pygame.display.list_modes()`h]h;)}(hj]h]hpygame.display.list_modes()}hj_sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj[ubah}(h]h]h]h]h!]refdochS refdomainjireftypefunc refexplicitrefwarnhYjXhZNh[pygame.display.list_modesuh%h5h'h]h)M4hj3ubh( or the window is created with the flag }hj3sbh;)}(h``pygame.SCALED``h]h pygame.SCALED}hjsbah}(h]h]h]h]h!]uh%h:hj3ubh. See }hj3sbh reference)}(h=`issue #2380 `_h]h issue #2380}(hjh issue #2380ubah}(h]h]h]h]h!]name issue #2380refuri,https://github.com/pygame/pygame/issues/2380uh%jhj3ubh target)}(h/ h]h}(h] issue-2380ah]h] issue #2380ah]h!]refurijuh%j referencedKhj3ubh.}hj3sbeh}(h]h]h]h]h!]uh%hh'h]h)M4hj/ubah}(h]h]h]h]h!]uh%j{h'h]h)M4hjh&hubh )}(h&## pygame.display.toggle_fullscreen ##h]h&## pygame.display.toggle_fullscreen ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M9ubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&set_gamma() (in module pygame.display)pygame.display.set_gammahNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_gammah](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)M;ubj3)}(hjh]h set_gamma}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)M;ubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)M;ubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] set_gamma()uh%jh'h]h)M;hjh&hubj`)}(hhh](hv)}(hhh](hz)}(h%:sl:`Change the hardware gamma ramps`h]h)}(hj,h]hChange the hardware gamma ramps}hj.sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj'h&hh'h]h)M=ubhz)}(h3:sg:`set_gamma(red, green=None, blue=None) -> bool`h]h)}(hjCh]h-set_gamma(red, green=None, blue=None) -> bool}hjEsbah}(h]h]jah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhj'h&hh'h]h)M>ubeh}(h]h]h]h]h!]uh%huhj$h&hh'h]h)M=ubh)}(h4DEPRECATED: This functionality will go away in SDL3.h]h4DEPRECATED: This functionality will go away in SDL3.}hj^sbah}(h]h]h]h]h!]uh%hh'h]h)M@hj$h&hubh)}(hSet the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``.h](hSet the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return }hjlsbh;)}(h``True``h]hTrue}hjtsbah}(h]h]h]h]h!]uh%h:hjlubh.}hjlsbeh}(h]h]h]h]h!]uh%hh'h]h)MBhj$h&hubh)}(h|A gamma value of ``1.0`` creates a linear color table. Lower values will darken the display and higher values will brighten.h](hA gamma value of }hjsbh;)}(h``1.0``h]h1.0}hjsbah}(h]h]h]h]h!]uh%h:hjubhd creates a linear color table. Lower values will darken the display and higher values will brighten.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MGhj$h&hubj!)}(hDeprecated since pygame 2.2.0.h]h)}(hDeprecated since pygame 2.2.0.h]h)}(hDeprecated since pygame 2.2.0.h]hDeprecated since pygame 2.2.0.}hjsbah}(h]h](j  deprecatedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)MKubah}(h]h]h]h]h!]jx deprecatedjz2.2.0uh%j h&hh'h]h)MJhj$ubh )}(h## pygame.display.set_gamma ##h]h## pygame.display.set_gamma ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)MLubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+set_gamma_ramp() (in module pygame.display)pygame.display.set_gamma_ramphNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_gamma_ramph](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)MNubj3)}(hjh]hset_gamma_ramp}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MNubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)MNubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj]set_gamma_ramp()uh%jh'h]h)MNhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h::sl:`Change the hardware gamma ramps with a custom lookup`h]h)}(hj8h]h4Change the hardware gamma ramps with a custom lookup}hj:sbah}(h]h]hah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)MPubhz)}(h.:sg:`set_gamma_ramp(red, green, blue) -> bool`h]h)}(hjOh]h(set_gamma_ramp(red, green, blue) -> bool}hjQsbah}(h]h]jah]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)MQubeh}(h]h]h]h]h!]uh%huhj0h&hh'h]h)MPubh)}(h4DEPRECATED: This functionality will go away in SDL3.h]h4DEPRECATED: This functionality will go away in SDL3.}hjjsbah}(h]h]h]h]h!]uh%hh'h]h)MShj0h&hubh)}(hXSet the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between ``0`` and ``0xffff``. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``.h](hSet the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between }hjxsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjxubh and }hjxsbh;)}(h ``0xffff``h]h0xffff}hjsbah}(h]h]h]h]h!]uh%h:hjxubh\. Not all systems and hardware support gamma ramps, if the function succeeds it will return }hjxsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjxubh.}hjxsbeh}(h]h]h]h]h!]uh%hh'h]h)MUhj0h&hubj!)}(hDeprecated since pygame 2.2.0.h]h)}(hDeprecated since pygame 2.2.0.h]h)}(hDeprecated since pygame 2.2.0.h]hDeprecated since pygame 2.2.0.}hjsbah}(h]h](j jeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M[ubah}(h]h]h]h]h!]jx deprecatedjz2.2.0uh%j h&hh'h]h)MZhj0ubh )}(h### pygame.display.set_gamma_ramp ##h]h### pygame.display.set_gamma_ramp ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj0h&hh'h]h)M\ubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%set_icon() (in module pygame.display)pygame.display.set_iconhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_iconh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)M^ubj3)}(hjh]hset_icon}hj sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)M^ubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)M^ubeh}(h]j ah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] set_icon()uh%jh'h]h)M^hj h&hubj`)}(hhh](hv)}(hhh](hz)}(h4:sl:`Change the system image for the display window`h]h)}(hjGh]h.Change the system image for the display window}hjIsbah}(h]h]hah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)M`ubhz)}(h:sg:`set_icon(Surface) -> None`h]h)}(hj^h]hset_icon(Surface) -> None}hj`sbah}(h]h]jah]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Maubeh}(h]h]h]h]h!]uh%huhj?h&hh'h]h)M`ubh)}(hSets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon.h]hSets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon.}hjysbah}(h]h]h]h]h!]uh%hh'h]h)Mchj?h&hubh)}(hlNote that calling this function implicitly initializes ``pygame.display``, if it was not initialized before.h](h7Note that calling this function implicitly initializes }hjsbh;)}(h``pygame.display``h]hpygame.display}hjsbah}(h]h]h]h]h!]uh%h:hjubh#, if it was not initialized before.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mfhj?h&hubh)}(hYou can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system.h]hYou can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mihj?h&hubh)}(hSome systems do not allow the window icon to change after it has been shown. This function can be called before ``pygame.display.set_mode()`` to create the icon before the display mode is set.h](hpSome systems do not allow the window icon to change after it has been shown. This function can be called before }hjsbh;)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjsbah}(h]h]h]h]h!]uh%h:hjubh3 to create the icon before the display mode is set.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mmhj?h&hubh )}(h## pygame.display.set_icon ##h]h## pygame.display.set_icon ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj?h&hh'h]h)Mqubeh}(h]h]h]h]h!]uh%j_hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(set_caption() (in module pygame.display)pygame.display.set_captionhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_captionh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Msubj3)}(hjh]h set_caption}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MsubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Msubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] set_caption()uh%jh'h]h)Mshjh&hubj`)}(hhh](hv)}(hhh](hz)}(h$:sl:`Set the current window caption`h]h)}(hj;h]hSet the current window caption}hj=sbah}(h]h]hah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhj6h&hh'h]h)Muubhz)}(h0:sg:`set_caption(title, icontitle=None) -> None`h]h)}(hjRh]h*set_caption(title, icontitle=None) -> None}hjTsbah}(h]h]jah]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%h)hKhj6h&hh'h]h)Mvubeh}(h]h]h]h]h!]uh%huhj3h&hh'h]h)Muubh)}(hIf the display has a window title, this function will change the name on the window. In pygame 1.x, some systems supported an alternate shorter title to be used for minimized displays, but in pygame 2 ``icontitle`` does nothing.h](hIf the display has a window title, this function will change the name on the window. In pygame 1.x, some systems supported an alternate shorter title to be used for minimized displays, but in pygame 2 }hjmsbh;)}(h ``icontitle``h]h icontitle}hjusbah}(h]h]h]h]h!]uh%h:hjmubh does nothing.}hjmsbeh}(h]h]h]h]h!]uh%hh'h]h)Mxhj3h&hubj!)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)M}ubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M}ubah}(h]h]h]h]h!]jxversionchangedjz2.5.0uh%j h&hh'h]h)M|hj3ubh )}(h ## pygame.display.set_caption ##h]h ## pygame.display.set_caption ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj3h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jj7jj8jj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_caption() (in module pygame.display)pygame.display.get_captionhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_captionh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]h get_caption}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] get_caption()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h$:sl:`Get the current window caption`h]h)}(hjh]hGet the current window caption}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h):sg:`get_caption() -> (title, icontitle)`h]h)}(hj3h]h#get_caption() -> (title, icontitle)}hj5sbah}(h]h]jah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hjReturns the title and icontitle for the display window. In pygame 2.x these will always be the same value.h]hjReturns the title and icontitle for the display window. In pygame 2.x these will always be the same value.}hjNsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h ## pygame.display.get_caption ##h]h ## pygame.display.get_caption ##}hj\sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jsj7jtj8jtj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(set_palette() (in module pygame.display)pygame.display.set_palettehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_paletteh](j!)}(hpygame.display.h]hpygame.display.}hjsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj3)}(hjh]h set_palette}hjsbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjh&hh'h]h)Mubeh}(h]jah](jRjSeh]h]h!]jWjXjYhjZjj[jXjj] set_palette()uh%jh'h]h)Mhjh&hubj`)}(hhh](hv)}(hhh](hz)}(h8:sl:`Set the display color palette for indexed displays`h]h)}(hjh]h2Set the display color palette for indexed displays}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h':sg:`set_palette(palette=None) -> None`h]h)}(hjh]h!set_palette(palette=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hX9This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of ``RGB`` triplets.h](hX(This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh triplets.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj!)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](j jeh]h]h!]uh%hhjh&hh'h]h)Mubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz2.5.0uh%j h&hh'h]h)Mhjubh )}(h ## pygame.display.set_palette ##h]h ## pygame.display.set_palette ##}hj=sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jTj7jUj8jUj9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-get_num_displays() (in module pygame.display)pygame.display.get_num_displayshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_num_displaysh](j!)}(hpygame.display.h]hpygame.display.}hjnsbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjjh&hh'h]h)Mubj3)}(hjlh]hget_num_displays}hj|sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjjh&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjjh&hh'h]h)Mubeh}(h]jeah](jRjSeh]h]h!]jWjXjYhjZjlj[jXjlj]get_num_displays()uh%jh'h]h)Mhjgh&hubj`)}(hhh](hv)}(hhh](hz)}(h#:sl:`Return the number of displays`h]h)}(hjh]hReturn the number of displays}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_num_displays() -> int`h]h)}(hjh]hget_num_displays() -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturns the number of available displays. This is always 1 if :func:`pygame.get_sdl_version()` returns a major version number below 2.h](h>Returns the number of available displays. This is always 1 if }hjsbh6)}(h :func:`pygame.get_sdl_version()`h]h;)}(hjh]hpygame.get_sdl_version()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjXhZNh[pygame.get_sdl_versionuh%h5h'h]h)Mhjubh( returns a major version number below 2.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj!)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj sbah}(h]h](j j5eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Mubah}(h]h]h]h]h!]jx versionaddedjz1.9.5uh%j h&hh'h]h)Mhjubh )}(h%## pygame.display.get_num_displays ##h]h%## pygame.display.get_num_displays ##}hj, sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjgh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jC j7jD j8jD j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_window_size() (in module pygame.display)pygame.display.get_window_sizehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_window_sizeh](j!)}(hpygame.display.h]hpygame.display.}hj] sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjY h&hh'h]h)Mubj3)}(hj[ h]hget_window_size}hjk sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjY h&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjY h&hh'h]h)Mubeh}(h]jT ah](jRjSeh]h]h!]jWjXjYhjZj[ j[jXj[ j]get_window_size()uh%jh'h]h)MhjV h&hubj`)}(hhh](hv)}(hhh](hz)}(h-:sl:`Return the size of the window or screen`h]h)}(hj h]h'Return the size of the window or screen}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h :sg:`get_window_size() -> tuple`h]h)}(hj h]hget_window_size() -> tuple}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hReturns the size of the window initialized with :func:`pygame.display.set_mode()`. This may differ from the size of the display surface if ``SCALED`` is used.h](h0Returns the size of the window initialized with }hj sbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hj h]hpygame.display.set_mode()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjXhZNh[pygame.display.set_modeuh%h5h'h]h)Mhj ubh:. This may differ from the size of the display surface if }hj sbh;)}(h ``SCALED``h]hSCALED}hj sbah}(h]h]h]h]h!]uh%h:hj ubh is used.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubj!)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj!sbah}(h]h](j j5eh]h]h!]uh%hhj !ubah}(h]h]h]h]h!] translatableuh%hhj!h&hh'h]h)Mubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)Mhj ubh )}(h$## pygame.display.get_window_size ##h]h$## pygame.display.get_window_size ##}hj-!sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjV h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6jD!j7jE!j8jE!j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2get_allow_screensaver() (in module pygame.display)$pygame.display.get_allow_screensaverhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_allow_screensaverh](j!)}(hpygame.display.h]hpygame.display.}hj^!sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjZ!h&hh'h]h)Mubj3)}(hj\!h]hget_allow_screensaver}hjl!sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjZ!h&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjZ!h&hh'h]h)Mubeh}(h]jU!ah](jRjSeh]h]h!]jWjXjYhjZj\!j[jXj\!j]get_allow_screensaver()uh%jh'h]h)MhjW!h&hubj`)}(hhh](hv)}(hhh](hz)}(h7:sl:`Return whether the screensaver is allowed to run.`h]h)}(hj!h]h1Return whether the screensaver is allowed to run.}hj!sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h%:sg:`get_allow_screensaver() -> bool`h]h)}(hj!h]hget_allow_screensaver() -> bool}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj!h&hh'h]h)Mubh)}(hReturn whether screensaver is allowed to run whilst the app is running. Default is ``False``. By default pygame does not allow the screensaver during game play.h](hSReturn whether screensaver is allowed to run whilst the app is running. Default is }hj!sbh;)}(h ``False``h]hFalse}hj!sbah}(h]h]h]h]h!]uh%h:hj!ubhD. By default pygame does not allow the screensaver during game play.}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj!h&hubj|)}(hSome platforms do not have a screensaver or support disabling the screensaver. Please see :func:`pygame.display.set_allow_screensaver()` for caveats with screensaver support.h]h)}(hSome platforms do not have a screensaver or support disabling the screensaver. Please see :func:`pygame.display.set_allow_screensaver()` for caveats with screensaver support.h](h[Some platforms do not have a screensaver or support disabling the screensaver. Please see }hj!sbh6)}(h.:func:`pygame.display.set_allow_screensaver()`h]h;)}(hj!h]h&pygame.display.set_allow_screensaver()}hj!sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypefunc refexplicitrefwarnhYjXhZNh[$pygame.display.set_allow_screensaveruh%h5h'h]h)Mhj!ubh& for caveats with screensaver support.}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj!ubah}(h]h]h]h]h!]uh%j{h'h]h)Mhj!h&hubj!)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj)"sbah}(h]h](j j5eh]h]h!]uh%hhj%"ubah}(h]h]h]h]h!] translatableuh%hhj!"h&hh'h]h)Mubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)Mhj!ubh )}(h*## pygame.display.get_allow_screensaver ##h]h*## pygame.display.get_allow_screensaver ##}hjF"sbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjW!h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j]"j7j^"j8j^"j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2set_allow_screensaver() (in module pygame.display)$pygame.display.set_allow_screensaverhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_allow_screensaverh](j!)}(hpygame.display.h]hpygame.display.}hjw"sbah}(h]h](j-j.eh]h]h!]h#h$uh%j hjs"h&hh'h]h)Mubj3)}(hju"h]hset_allow_screensaver}hj"sbah}(h]h](j>j?eh]h]h!]h#h$uh%j2hjs"h&hh'h]h)MubjD)}(h()h]h}(h]h]h]h]h!]h#h$uh%jChjs"h&hh'h]h)Mubeh}(h]jn"ah](jRjSeh]h]h!]jWjXjYhjZju"j[jXju"j]set_allow_screensaver()uh%jh'h]h)Mhjp"h&hubj`)}(hhh](hv)}(hhh](hz)}(h):sl:`Set whether the screensaver may run`h]h)}(hj"h]h#Set whether the screensaver may run}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubhz)}(h):sg:`set_allow_screensaver(bool) -> None`h]h)}(hj"h]h#set_allow_screensaver(bool) -> None}hj"sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)Mubh)}(hChange whether screensavers should be allowed whilst the app is running. The default value of the argument to the function is True. By default pygame does not allow the screensaver during game play.h]hChange whether screensavers should be allowed whilst the app is running. The default value of the argument to the function is True. By default pygame does not allow the screensaver during game play.}hj"sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubh)}(hIf the screensaver has been disallowed due to this function, it will automatically be allowed to run when :func:`pygame.quit()` is called.h](hjIf the screensaver has been disallowed due to this function, it will automatically be allowed to run when }hj"sbh6)}(h:func:`pygame.quit()`h]h;)}(hj"h]h pygame.quit()}hj"sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj"ubah}(h]h]h]h]h!]refdochS refdomainj#reftypefunc refexplicitrefwarnhYjXhZNh[ pygame.quituh%h5h'h]h)Mhj"ubh is called.}hj"sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubh)}(hIt is possible to influence the default value via the environment variable ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER``, which can be set to either ``0`` (disable) or ``1`` (enable).h](hKIt is possible to influence the default value via the environment variable }hj#sbh;)}(h$``SDL_HINT_VIDEO_ALLOW_SCREENSAVER``h]h SDL_HINT_VIDEO_ALLOW_SCREENSAVER}hj&#sbah}(h]h]h]h]h!]uh%h:hj#ubh, which can be set to either }hj#sbh;)}(h``0``h]h0}hj8#sbah}(h]h]h]h]h!]uh%h:hj#ubh (disable) or }hj#sbh;)}(h``1``h]h1}hjJ#sbah}(h]h]h]h]h!]uh%h:hj#ubh (enable).}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubj|)}(hXDisabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER`` is available in SDL 2.0.2 or later. SDL1.2 does not implement this.h]h)}(hXDisabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER`` is available in SDL 2.0.2 or later. SDL1.2 does not implement this.h](hX=Disabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. }hjf#sbh;)}(h$``SDL_HINT_VIDEO_ALLOW_SCREENSAVER``h]h SDL_HINT_VIDEO_ALLOW_SCREENSAVER}hjn#sbah}(h]h]h]h]h!]uh%h:hjf#ubhD is available in SDL 2.0.2 or later. SDL1.2 does not implement this.}hjf#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjb#ubah}(h]h]h]h]h!]uh%j{h'h]h)Mhj"h&hubj!)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj#sbah}(h]h](j j5eh]h]h!]uh%hhj#ubah}(h]h]h]h]h!] translatableuh%hhj#h&hh'h]h)Mubah}(h]h]h]h]h!]jx versionaddedjz2.0.0uh%j h&hh'h]h)Mhj"ubh )}(h*## pygame.display.set_allow_screensaver ##h]h*## pygame.display.set_allow_screensaver ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjp"h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j6j#j7j#j8j#j9j:j;j<j=j>j?uh%jh&hhh,h'Nh)Nubh )}(h## pygame.display ##h]h## pygame.display ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hspygame-displayeh]h]pygame.displayah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj $error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j#j#jju nametypes}(j#juh}(j#h,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjjjLjQjjjjj jjjj j j j j j jk jp j6 j; j5j:jjjIjNjNjSjjjjjjjjjjjjj jjjjjjjjejjjT jY jU!jZ!jn"js"u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/display.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612174.5431411 pygame-2.6.1/docs/generated/doctrees/ref/draw.doctree0000644000175100001770000062755214676242417022223 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.draw`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.draw}hh Rect`h]h)}(hjh]h"rect(surface, color, rect) -> Rect}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K0ubhz)}(h:sg:`rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect`h]h)}(hjh]hrect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K1ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K/ubh)}(h'Draws a rectangle on the given surface.h]h'Draws a rectangle on the given surface.}hj,sbah}(h]h]h]h]h!]uh%hh'h]h)K3hjh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjFsbah}(h]h]h]h]h!]uh%jDhjAh'h]h)Kubh field_body)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](hliteral_strong)}(hsurfaceh]hsurface}hjesbah}(h]h]h]h]h!]uh%jchj_ubh (}hj_sbh6)}(hhh]hliteral_emphasis)}(hSurfaceh]hSurface}hj|sbah}(h]h]h]h]h!]uh%jzhjwubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj~ refspecific py:modulej py:classNuh%h5hj_ubh)}hj_sbh -- }hj_sbhsurface to draw on}(hj_h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hjubj{)}(h(h]h(}hj6sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjGsbah}(h]h]h]h]h!]uh%jzhjDubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjIjjj jNuh%h5hjubj{)}(h, h]h, }hj_sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjpsbah}(h]h]h]h]h!]uh%jzhjmubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjrjjj jNuh%h5hjubj{)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jzhjubj{)}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h]h]h]}hjsbah}(h]h]h]h]h!]uh%jzhjubj{)}(h)h]h)}hjsbah}(h]h]h]h]h!]uh%jzhjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(h9rect (Rect) -- rectangle to draw, position and dimensionsh](jd)}(hrecth]hrect}hj1sbah}(h]h]h]h]h!]uh%jchj-ubh (}hj-sbh6)}(hhh]j{)}(hRecth]hRect}hjFsbah}(h]h]h]h]h!]uh%jzhjCubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjHjjj jNuh%h5hj-ubh)}hj-sbh -- }hj-sbh*rectangle to draw, position and dimensions}(hj-h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hXwidth (int) -- (optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the rect parameter)if width == 0, (default) fill the rectangle if width > 0, used for line thickness if width < 0, nothing will be drawn Changed in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area.h](jd)}(hwidthh]hwidth}hj}sbah}(h]h]h]h]h!]uh%jchjyubh (}hjysbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjyubh)}hjysbh -- }hjysbh)}(h(optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the ``rect`` parameter)h](h(optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the }hjsbh;)}(h``rect``h]hrect}hjsbah}(h]h]h]h]h!]uh%h:hjubh parameter)}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K:hjyh&hubh)}(h| if ``width == 0``, (default) fill the rectangle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | h]hv)}(hhh](hz)}(h/if ``width == 0``, (default) fill the rectangleh](hif }hjsbh;)}(h``width == 0``h]h width == 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, (default) fill the rectangle}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h)if ``width > 0``, used for line thicknessh](hif }hjsbh;)}(h ``width > 0``h]h width > 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, used for line thickness}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h'if ``width < 0``, nothing will be drawnh](hif }hjsbh;)}(h ``width < 0``h]h width < 0}hj!sbah}(h]h]h]h]h!]uh%h:hjubh, nothing will be drawn}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hjhKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjubah}(h]h]h]h]h!]uh%hh'h]h)K>hjyh&hubhversionmodified)}(hChanged in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area.h]h)}(hChanged in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area.h](h)}(hChanged in pygame 2.1.1: h]hChanged in pygame 2.1.1: }hjXsbah}(h]h](jNchangedeh]h]h!]uh%hhjTh&hh'h]h)KGubhDrawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area.}(hjTh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjPh&hh'h]h)KGubah}(h]h]h]h]h!]typeversionchangedversion2.1.1uh%jNh&hh'h]h)KChjyubeh}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hborder_radius (int) -- (optional) used for drawing rectangle with rounded corners. The supported range is [0, min(height, width) / 2], with 0 representing a rectangle without rounded corners.h](jd)}(h border_radiush]h border_radius}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubh)}hjsbh -- }hjsbh(optional) used for drawing rectangle with rounded corners. The supported range is [0, min(height, width) / 2], with 0 representing a rectangle without rounded corners.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hborder_top_left_radius (int) -- (optional) used for setting the value of top left border. If you don't set this value, it will use the border_radius value.h](jd)}(hborder_top_left_radiush]hborder_top_left_radius}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubh)}hjsbh -- }hjsbh{(optional) used for setting the value of top left border. If you don't set this value, it will use the border_radius value.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hborder_top_right_radius (int) -- (optional) used for setting the value of top right border. If you don't set this value, it will use the border_radius value.h](jd)}(hborder_top_right_radiush]hborder_top_right_radius}hj'sbah}(h]h]h]h]h!]uh%jchj#ubh (}hj#sbh6)}(hhh]j{)}(hinth]hint}hj<sbah}(h]h]h]h]h!]uh%jzhj9ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj>jjj jNuh%h5hj#ubh)}hj#sbh -- }hj#sbh|(optional) used for setting the value of top right border. If you don't set this value, it will use the border_radius value.}(hj#h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hborder_bottom_left_radius (int) -- (optional) used for setting the value of bottom left border. If you don't set this value, it will use the border_radius value.h](jd)}(hborder_bottom_left_radiush]hborder_bottom_left_radius}hjssbah}(h]h]h]h]h!]uh%jchjoubh (}hjosbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjoubh)}hjosbh -- }hjosbh~(optional) used for setting the value of bottom left border. If you don't set this value, it will use the border_radius value.}(hjoh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjlubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]h)}(hXborder_bottom_right_radius (int) -- (optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value.if border_radius < 1 it will draw rectangle without rounded corners if any of border radii has the value < 0 it will use value of the border_radius If sum of radii on the same side of the rectangle is greater than the rect size the radii will get scaledh](jd)}(hborder_bottom_right_radiush]hborder_bottom_right_radius}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj jNuh%h5hjubh)}hjsbh -- }hjsbh)}(h(optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value.h]h(optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KQhjh&hubh)}(hX| if ``border_radius < 1`` it will draw rectangle without rounded corners | if any of border radii has the value ``< 0`` it will use value of the border_radius | If sum of radii on the same side of the rectangle is greater than the rect size the radii | will get scaled h]hv)}(hhh](hz)}(hGif ``border_radius < 1`` it will draw rectangle without rounded cornersh](hif }hj sbh;)}(h``border_radius < 1``h]hborder_radius < 1}hjsbah}(h]h]h]h]h!]uh%h:hj ubh/ it will draw rectangle without rounded corners}hj sbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(hSif any of border radii has the value ``< 0`` it will use value of the border_radiush](h%if any of border radii has the value }hj)sbh;)}(h``< 0``h]h< 0}hj1sbah}(h]h]h]h]h!]uh%h:hj)ubh' it will use value of the border_radius}hj)sbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(hYIf sum of radii on the same side of the rectangle is greater than the rect size the radiih]hYIf sum of radii on the same side of the rectangle is greater than the rect size the radii}hjIsbah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(hwill get scaledh]hwill get scaled}hjWsbah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjubah}(h]h]h]h]h!]uh%hh'h]h)KThjh&hubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%jThjAubeh}(h]h]h]h]h!]uh%j?hj<ubj@)}(hhh](jE)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0h](hwa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given }(hjh&hh'Nh)Nubh;)}(h``rect``h]hrect}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh- parameter and its width and height will be 0}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hj<ubj@)}(hhh](jE)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetRectjjj jNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hj<ubeh}(h]h]h]h]h!]uh%j:hjh&hh'Nh)NubjD)}(hThe :func:`pygame.Surface.fill()` method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms.h]h)}(hThe :func:`pygame.Surface.fill()` method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms.h](hThe }hj sbh6)}(h:func:`pygame.Surface.fill()`h]h;)}(hj h]hpygame.Surface.fill()}hj! sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj+ reftypefunc refexplicitrefwarnhYj hZNh[pygame.Surface.filluh%h5h'h]h)K_hj ubhk method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)K_hj ubah}(h]h]h]h]h!]uh%jCh'h]h)K^hjh&hubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjU sbah}(h]h](jNjceh]h]h!]uh%hhjQ h&hh'h]h)Kbubh$Added support for keyword arguments.}(hjQ h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjM h&hh'h]h)Kbubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)KbhjubjO)}(h>Changed in pygame 2.0.0.dev8: Added support for border radius.h]h)}(h>Changed in pygame 2.0.0.dev8: Added support for border radius.h](h)}(hChanged in pygame 2.0.0.dev8: h]hChanged in pygame 2.0.0.dev8: }hj~ sbah}(h]h](jNjceh]h]h!]uh%hhjz h&hh'h]h)Kdubh Added support for border radius.}(hjz h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjv h&hh'h]h)Kdubah}(h]h]h]h]h!]jxversionchangedjz 2.0.0.dev8uh%jNh&hh'h]h)Kchjubh )}(h## pygame.draw.rect ##h]h## pygame.draw.rect ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Keubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]domainjobjtypej desctypej no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!polygon() (in module pygame.draw)pygame.draw.polygonhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hpolygonh](j)}(h pygame.draw.h]h pygame.draw.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kgubj)}(hj h]hpolygon}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kgubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kgubeh}(h]j ah](jjeh]h]h!]jj jhjj jj j j polygon()uh%jh'h]h)Kghj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a polygon`h]h)}(hj h]hdraw a polygon}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kiubhz)}(h-:sg:`polygon(surface, color, points) -> Rect`h]h)}(hj% h]h'polygon(surface, color, points) -> Rect}hj' sbah}(h]h]jah]h]h!]uh%hhj# ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kjubhz)}(h6:sg:`polygon(surface, color, points, width=0) -> Rect`h]h)}(hj< h]h0polygon(surface, color, points, width=0) -> Rect}hj> sbah}(h]h]jah]h]h!]uh%hhj: ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kiubh)}(h%Draws a polygon on the given surface.h]h%Draws a polygon on the given surface.}hjW sbah}(h]h]h]h]h!]uh%hh'h]h)Kmhj h&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hjk sbah}(h]h]h]h]h!]uh%jDhjh h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hj sbah}(h]h]h]h]h!]uh%jchj ubh (}hj sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj jjj jNuh%h5hj ubh)}hj sbh -- }hj sbhsurface to draw on}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hhj| ubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hj sbah}(h]h]h]h]h!]uh%jchj ubh (}hj sbh6)}(hhh]j{)}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hj ubj{)}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hj ubj{)}(h or h]h or }hj) sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(htupleh]htuple}hj: sbah}(h]h]h]h]h!]uh%jzhj7 ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj< jjj jNuh%h5hj ubj{)}(hj8h]h(}hjR sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(hinth]hint}hjb sbah}(h]h]h]h]h!]uh%jzhj_ ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjd jjj jNuh%h5hj ubj{)}(h, h]h, }hjz sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hj ubj{)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hj ubj{)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jzhj ubj{)}(hjh]h[}hj sbah}(h]h]h]h]h!]uh%jzhj ubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hj ubj{)}(hjh]h]}hj sbah}(h]h]h]h]h!]uh%jzhj ubj{)}(hjh]h)}hj sbah}(h]h]h]h]h!]uh%jzhj ubh)}hj sbh -- }hj sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj( sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hhj| ubh)}(hhh]h)}(hXpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates that make up the vertices of the polygon, each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats, e.g. [(x1, y1), (x2, y2), (x3, y3)]h](jd)}(hpointsh]hpoints}hjI sbah}(h]h]h]h]h!]uh%jchjE ubh (}hjE sbh6)}(hhh]j{)}(htupleh]htuple}hj^ sbah}(h]h]h]h]h!]uh%jzhj[ ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj` jjj jNuh%h5hjE ubj{)}(hj8h]h(}hjv sbah}(h]h]h]h]h!]uh%jzhjE ubh6)}(hhh]j{)}(h coordinateh]h coordinate}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hjE ubj{)}(h) or h]h) or }hj sbah}(h]h]h]h]h!]uh%jzhjE ubh6)}(hhh]j{)}(hlisth]hlist}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hjE ubj{)}(hj8h]h(}hj sbah}(h]h]h]h]h!]uh%jzhjE ubh6)}(hhh]j{)}(h coordinateh]h coordinate}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jjj jNuh%h5hjE ubj{)}(hjh]h)}hj sbah}(h]h]h]h]h!]uh%jzhjE ubh)}hjE sbh -- }hjE sbhZa sequence of 3 or more (x, y) coordinates that make up the vertices of the polygon, each }(hjE h&hh'Nh)Nubh emphasis)}(h *coordinate*h]h coordinate}hj sbah}(h]h]h]h]h!]uh%j hjE h&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hjE h&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hj h]hpygame.math.Vector2}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj* reftypeclass refexplicitrefwarnhYj hZNh[pygame.math.Vector2uh%h5h'h]h)KshjE h&hubh of 2 ints/floats, e.g. }(hjE h&hh'Nh)Nubh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hj@ sbah}(h]h]h]h]h!]uh%h:hjE h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjB ubah}(h]h]h]h]h!]uh%hhj| ubh)}(hhh]h)}(hXwidth (int) -- (optional) used for line thickness or to indicate that the polygon is to be filledif width == 0, (default) fill the polygon if width > 0, used for line thickness if width < 0, nothing will be drawn When using width values > 1, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the width notes of the pygame.draw.line() function.h](jd)}(hwidthh]hwidth}hja sbah}(h]h]h]h]h!]uh%jchj] ubh (}hj] sbh6)}(hhh]j{)}(hinth]hint}hjv sbah}(h]h]h]h]h!]uh%jzhjs ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjx jjj jNuh%h5hj] ubh)}hj] sbh -- }hj] sbh)}(hR(optional) used for line thickness or to indicate that the polygon is to be filledh]hR(optional) used for line thickness or to indicate that the polygon is to be filled}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kxhj] h&hubh)}(hX| if width == 0, (default) fill the polygon | if width > 0, used for line thickness | if width < 0, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the ``width`` notes of the :func:`pygame.draw.line` function. h](hv)}(hhh](hz)}(h)if width == 0, (default) fill the polygonh]h)if width == 0, (default) fill the polygon}hj sbah}(h]h]h]h]h!]uh%h)hKhj h'h]h)Kubhz)}(h%if width > 0, used for line thicknessh]h%if width > 0, used for line thickness}hj sbah}(h]h]h]h]h!]uh%h)hKhj h'h]h)Kubhz)}(h#if width < 0, nothing will be drawnh]h#if width < 0, nothing will be drawn}hj sbah}(h]h]h]h]h!]uh%h)hKhj h'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj hKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj ubjD)}(hWhen using ``width`` values ``> 1``, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the ``width`` notes of the :func:`pygame.draw.line` function.h]h)}(hWhen using ``width`` values ``> 1``, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the ``width`` notes of the :func:`pygame.draw.line` function.h](h When using }hj sbh;)}(h ``width``h]hwidth}hj sbah}(h]h]h]h]h!]uh%h:hj ubh values }hj sbh;)}(h``> 1``h]h> 1}hjsbah}(h]h]h]h]h!]uh%h:hj ubh, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the }hj sbh;)}(h ``width``h]hwidth}hjsbah}(h]h]h]h]h!]uh%h:hj ubh notes of the }hj sbh6)}(h:func:`pygame.draw.line`h]h;)}(hj(h]hpygame.draw.line()}hj*sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj&ubah}(h]h]h]h]h!]refdochS refdomainj4reftypefunc refexplicitrefwarnhYj hZNh[pygame.draw.lineuh%h5h'h]h)Khj ubh function.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%jCh'h]h)Khj ubeh}(h]h]h]h]h!]uh%hh'h]h)K{hj] h&hubeh}(h]h]h]h]h!]uh%hhjZ ubah}(h]h]h]h]h!]uh%hhj| ubeh}(h]h]h]h]h!]uh%hhjy ubah}(h]h]h]h]h!]uh%jThjh ubeh}(h]h]h]h]h!]uh%j?hje ubj@)}(hhh](jE)}(hReturnsh]hReturns}hj}sbah}(h]h]h]h]h!]uh%jDhjzh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0h](ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the }(hjh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhN parameter (float values will be truncated) and its width and height will be 0}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjzubeh}(h]h]h]h]h!]uh%j?hje ubj@)}(hhh](jE)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetRectjjj jNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hje ubj@)}(hhh](jE)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h>ValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]jd)}(h ValueErrorh]h ValueError}hjsbah}(h]h]h]h]h!]uh%jchjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeexc reftargetjjjj jNuh%h5hjubh -- }hjsbhif }(hjh&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hj8sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh (must have at least 3 points)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]h)}(hPTypeError -- if points is not a sequence or points does not contain number pairsh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hj`sbah}(h]h]h]h]h!]uh%jchj]ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej. reftargetjbjjj jNuh%h5hjYubh -- }hjYsbhif }(hjYh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjsbah}(h]h]h]h]h!]uh%h:hjYh&hh'Nh)Nubh is not a sequence or }(hjYh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjsbah}(h]h]h]h]h!]uh%h:hjYh&hh'Nh)Nubh does not contain number pairs}(hjYh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hje ubeh}(h]h]h]h]h!]uh%j:hj h&hh'Nh)NubjD)}(h=For an aapolygon, use :func:`aalines()` with ``closed=True``.h]h)}(hjh](hFor an aapolygon, use }hjsbh6)}(h:func:`aalines()`h]h;)}(hjh]h aalines()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[aalinesuh%h5h'h]h)Khjubh with }hjsbh;)}(h``closed=True``h]h closed=True}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jCh'h]h)Khj h&hubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jNjceh]h]h!]uh%hhjh&hh'h]h)Kubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)Khj ubh )}(h## pygame.draw.polygon ##h]h## pygame.draw.polygon ##}hj>sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](j functioneh]h]h!]j j j jUj jUj j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j circle() (in module pygame.draw)pygame.draw.circlehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hcircleh](j)}(h pygame.draw.h]h pygame.draw.}hjnsbah}(h]h](jjeh]h]h!]h#h$uh%jhjjh&hh'h]h)Kubj)}(hjlh]hcircle}hj|sbah}(h]h](jjeh]h]h!]h#h$uh%jhjjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjjh&hh'h]h)Kubeh}(h]jeah](jjeh]h]h!]jj jhjjljj jljcircle()uh%jh'h]h)Khjgh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a circle`h]h)}(hjh]h draw a circle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h4:sg:`circle(surface, color, center, radius) -> Rect`h]h)}(hjh]h.circle(surface, color, center, radius) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`circle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect`h]h)}(hjh]hcircle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h$Draws a circle on the given surface.h]h$Draws a circle on the given surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj0sbah}(h]h]h]h]h!]uh%jzhj-ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj2jjj jNuh%h5hjubh)}hjsbh -- }hjsbhsurface to draw on}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hjhsbah}(h]h]h]h]h!]uh%jchjdubh (}hjdsbh6)}(hhh]j{)}(hColorh]hColor}hj}sbah}(h]h]h]h]h!]uh%jzhjzubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjdubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjdubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjdubj{)}(hj8h]h(}hjsbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjdubj{)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj"jjj jNuh%h5hjdubj{)}(h, h]h, }hj8sbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(hinth]hint}hjIsbah}(h]h]h]h]h!]uh%jzhjFubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjKjjj jNuh%h5hjdubj{)}(h, h]h, }hjasbah}(h]h]h]h]h!]uh%jzhjdubj{)}(hjh]h[}hjosbah}(h]h]h]h]h!]uh%jzhjdubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhj|ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjdubj{)}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%jzhjdubj{)}(hjh]h)}hjsbah}(h]h]h]h]h!]uh%jzhjdubh)}hjdsbh -- }hjdsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjdh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjsbah}(h]h]h]h]h!]uh%h:hjdh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hcenter (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- center point of the circle as a sequence of 2 ints/floats, e.g. (x, y)h](jd)}(hcenterh]hcenter}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(hj8h]h(}hj sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hj3sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hjDsbah}(h]h]h]h]h!]uh%jzhjAubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjFjjj jNuh%h5hjubj{)}(h, h]h, }hj\sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjmsbah}(h]h]h]h]h!]uh%jzhjjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjojjj jNuh%h5hjubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h) or h]h) or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hlisth]hlist}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(hj8h]h(}hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hjsbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h, h]h, }hj(sbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hj9sbah}(h]h]h]h]h!]uh%jzhj6ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj;jjj jNuh%h5hjubj{)}(h or h]h or }hjQsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hjbsbah}(h]h]h]h]h!]uh%jzhj_ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjdjjj jNuh%h5hjubj{)}(h) or h]h) or }hjzsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hVector2h]hVector2}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(hj8h]h(}hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjubh6)}(hhh]j{)}(hfloath]hfloat}hj.sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj0jjj jNuh%h5hjubj{)}(hjh]h)}hjFsbah}(h]h]h]h]h!]uh%jzhjubh)}hjsbh -- }hjsbh@center point of the circle as a sequence of 2 ints/floats, e.g. }(hjh&hh'Nh)Nubh;)}(h ``(x, y)``h]h(x, y)}hj_sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hradius (int or float) -- radius of the circle, measured from the center parameter, nothing will be drawn if the radius is less than 1h](jd)}(hradiush]hradius}hjsbah}(h]h]h]h]h!]uh%jchj|ubh (}hj|sbh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hj|ubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhj|ubh6)}(hhh]j{)}(hfloath]hfloat}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hj|ubh)}hj|sbh -- }hj|sbh(radius of the circle, measured from the }(hj|h&hh'Nh)Nubh;)}(h ``center``h]hcenter}hjsbah}(h]h]h]h]h!]uh%h:hj|h&hh'Nh)Nubh) parameter, nothing will be drawn if the }(hj|h&hh'Nh)Nubh;)}(h ``radius``h]hradius}hjsbah}(h]h]h]h]h!]uh%h:hj|h&hh'Nh)Nubh is less than 1}(hj|h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hXwidth (int) -- (optional) used for line thickness or to indicate that the circle is to be filledif width == 0, (default) fill the circle if width > 0, used for line thickness if width < 0, nothing will be drawn When using width values > 1, the edge lines will only grow inward.h](jd)}(hwidthh]hwidth}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hinth]hint}hj.sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj0jjj jNuh%h5hjubh)}hjsbh -- }hjsbh)}(hQ(optional) used for line thickness or to indicate that the circle is to be filledh]hQ(optional) used for line thickness or to indicate that the circle is to be filled}hjNsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h| if ``width == 0``, (default) fill the circle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward.h](hv)}(hhh](hz)}(h,if ``width == 0``, (default) fill the circleh](hif }hjcsbh;)}(h``width == 0``h]h width == 0}hjksbah}(h]h]h]h]h!]uh%h:hjcubh, (default) fill the circle}hjcsbeh}(h]h]h]h]h!]uh%h)hKhj`h'h]h)Kubhz)}(h)if ``width > 0``, used for line thicknessh](hif }hjsbh;)}(h ``width > 0``h]h width > 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, used for line thickness}hjsbeh}(h]h]h]h]h!]uh%h)hKhj`h'h]h)Kubhz)}(h'if ``width < 0``, nothing will be drawnh](hif }hjsbh;)}(h ``width < 0``h]h width < 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, nothing will be drawn}hjsbeh}(h]h]h]h]h!]uh%h)hKhj`h'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj`hKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj\ubjD)}(hJWhen using ``width`` values ``> 1``, the edge lines will only grow inward.h]h)}(hJWhen using ``width`` values ``> 1``, the edge lines will only grow inward.h](h When using }hjsbh;)}(h ``width``h]hwidth}hjsbah}(h]h]h]h]h!]uh%h:hjubh values }hjsbh;)}(h``> 1``h]h> 1}hjsbah}(h]h]h]h]h!]uh%h:hjubh', the edge lines will only grow inward.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jCh'h]h)Khj\ubeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hpdraw_top_right (bool) -- (optional) if this is set to True then the top right corner of the circle will be drawnh](jd)}(hdraw_top_righth]hdraw_top_right}hj'sbah}(h]h]h]h]h!]uh%jchj#ubh (}hj#sbh6)}(hhh]j{)}(hboolh]hbool}hj<sbah}(h]h]h]h]h!]uh%jzhj9ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj>jjj jNuh%h5hj#ubh)}hj#sbh -- }hj#sbhW(optional) if this is set to True then the top right corner of the circle will be drawn}(hj#h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hndraw_top_left (bool) -- (optional) if this is set to True then the top left corner of the circle will be drawnh](jd)}(h draw_top_lefth]h draw_top_left}hjssbah}(h]h]h]h]h!]uh%jchjoubh (}hjosbh6)}(hhh]j{)}(hboolh]hbool}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjoubh)}hjosbh -- }hjosbhV(optional) if this is set to True then the top left corner of the circle will be drawn}(hjoh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjlubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(htdraw_bottom_left (bool) -- (optional) if this is set to True then the bottom left corner of the circle will be drawnh](jd)}(hdraw_bottom_lefth]hdraw_bottom_left}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hboolh]hbool}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjjjj jNuh%h5hjubh)}hjsbh -- }hjsbhY(optional) if this is set to True then the bottom left corner of the circle will be drawn}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hXdraw_bottom_right (bool) -- (optional) if this is set to True then the bottom right corner of the circle will be drawnif any of the draw_circle_part is True then it will draw all circle parts that have the True value, otherwise it will draw the entire circle.h](jd)}(hdraw_bottom_righth]hdraw_bottom_right}hj sbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hboolh]hbool}hj sbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj"jjj jNuh%h5hjubh)}hjsbh -- }hjsbh)}(hZ(optional) if this is set to True then the bottom right corner of the circle will be drawnh]hZ(optional) if this is set to True then the bottom right corner of the circle will be drawn}hj@sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h| if any of the draw_circle_part is True then it will draw all circle parts that have the True | value, otherwise it will draw the entire circle. h]hv)}(hhh](hz)}(h\if any of the draw_circle_part is True then it will draw all circle parts that have the Trueh]h\if any of the draw_circle_part is True then it will draw all circle parts that have the True}hjUsbah}(h]h]h]h]h!]uh%h)hKhjRh'h]h)Kubhz)}(h0value, otherwise it will draw the entire circle.h]h0value, otherwise it will draw the entire circle.}hjcsbah}(h]h]h]h]h!]uh%h)hKhjRh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjNubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hjubj@)}(hhh](jE)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the center parameter value (float values will be truncated) and its width and height will be 0h](haa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the }(hjh&hh'Nh)Nubh;)}(h ``center``h]hcenter}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhT parameter value (float values will be truncated) and its width and height will be 0}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hjubj@)}(hhh](jE)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjsbah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetRectjjj jNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hjubj@)}(hhh](jE)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h7TypeError -- if center is not a sequence of two numbersh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hj8sbah}(h]h]h]h]h!]uh%jchj5ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej. reftargetj:jjj jNuh%h5hj1ubh -- }hj1sbhif }(hj1h&hh'Nh)Nubh;)}(h ``center``h]hcenter}hjXsbah}(h]h]h]h]h!]uh%h:hj1h&hh'Nh)Nubh! is not a sequence of two numbers}(hj1h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]h)}(h&TypeError -- if radius is not a numberh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hjsbah}(h]h]h]h]h!]uh%jchj}ubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej. reftargetjjjj jNuh%h5hjyubh -- }hjysbhif }(hjyh&hh'Nh)Nubh;)}(h ``radius``h]hradius}hjsbah}(h]h]h]h]h!]uh%h:hjyh&hh'Nh)Nubh is not a number}(hjyh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hjubeh}(h]h]h]h]h!]uh%j:hjh&hh'Nh)NubjO)}(hX)Changed in pygame 2.0.0: Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the center coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the center param. The drawing algorithm was improved to look more like a circle.h]h)}(hX)Changed in pygame 2.0.0: Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the center coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the center param. The drawing algorithm was improved to look more like a circle.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jNjceh]h]h!]uh%hhjh&hh'h]h)Kubh[Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the }(hjh&hh'Nh)Nubh;)}(h ``center``h]hcenter}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubhc coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the }(hjh&hh'Nh)Nubh;)}(h ``center``h]hcenter}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhF param. The drawing algorithm was improved to look more like a circle.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)KhjubjO)}(hIChanged in pygame 2.0.0.dev8: Added support for drawing circle quadrants.h]h)}(hIChanged in pygame 2.0.0.dev8: Added support for drawing circle quadrants.h](h)}(hChanged in pygame 2.0.0.dev8: h]hChanged in pygame 2.0.0.dev8: }hj+sbah}(h]h](jNjceh]h]h!]uh%hhj'h&hh'h]h)Kubh+Added support for drawing circle quadrants.}(hj'h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj#h&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz 2.0.0.dev8uh%jNh&hh'h]h)Khjubh )}(h## pygame.draw.circle ##h]h## pygame.draw.circle ##}hjLsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjgh&hh'Nh)Nubeh}(h]h](jEfunctioneh]h]h!]j jEj jcj jcj j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!ellipse() (in module pygame.draw)pygame.draw.ellipsehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hellipseh](j)}(h pygame.draw.h]h pygame.draw.}hj|sbah}(h]h](jjeh]h]h!]h#h$uh%jhjxh&hh'h]h)Kubj)}(hjzh]hellipse}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjxh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjxh&hh'h]h)Kubeh}(h]jsah](jjeh]h]h!]jj jhjjzjj jzj ellipse()uh%jh'h]h)Khjuh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw an ellipse`h]h)}(hjh]hdraw an ellipse}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h+:sg:`ellipse(surface, color, rect) -> Rect`h]h)}(hjh]h%ellipse(surface, color, rect) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h4:sg:`ellipse(surface, color, rect, width=0) -> Rect`h]h)}(hjh]h.ellipse(surface, color, rect, width=0) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h&Draws an ellipse on the given surface.h]h&Draws an ellipse on the given surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jDhj h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hj)sbah}(h]h]h]h]h!]uh%jchj%ubh (}hj%sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj>sbah}(h]h]h]h]h!]uh%jzhj;ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj@jjj jNuh%h5hj%ubh)}hj%sbh -- }hj%sbhsurface to draw on}(hj%h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hjvsbah}(h]h]h]h]h!]uh%jchjrubh (}hjrsbh6)}(hhh]j{)}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjrubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjrubj{)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjrubj{)}(hj8h]h(}hjsbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjrubj{)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(hinth]hint}hj.sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetj0jjj jNuh%h5hjrubj{)}(h, h]h, }hjFsbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(hinth]hint}hjWsbah}(h]h]h]h]h!]uh%jzhjTubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjYjjj jNuh%h5hjrubj{)}(h, h]h, }hjosbah}(h]h]h]h]h!]uh%jzhjrubj{)}(hjh]h[}hj}sbah}(h]h]h]h]h!]uh%jzhjrubh6)}(hhh]j{)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjrubj{)}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%jzhjrubj{)}(hjh]h)}hjsbah}(h]h]h]h]h!]uh%jzhjrubh)}hjrsbh -- }hjrsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjrh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjsbah}(h]h]h]h]h!]uh%h:hjrh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hrect (Rect) -- rectangle to indicate the position and dimensions of the ellipse, the ellipse will be centered inside the rectangle and bounded by ith](jd)}(hrecth]hrect}hjsbah}(h]h]h]h]h!]uh%jchjubh (}hjsbh6)}(hhh]j{)}(hRecth]hRect}hjsbah}(h]h]h]h]h!]uh%jzhjubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjjjj jNuh%h5hjubh)}hjsbh -- }hjsbhrectangle to indicate the position and dimensions of the ellipse, the ellipse will be centered inside the rectangle and bounded by it}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]h)}(hXwidth (int) -- (optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the rect parameter)if width == 0, (default) fill the ellipse if width > 0, used for line thickness if width < 0, nothing will be drawn When using width values > 1, the edge lines will only grow inward from the original boundary of the rect parameter.h](jd)}(hwidthh]hwidth}hj8sbah}(h]h]h]h]h!]uh%jchj4ubh (}hj4sbh6)}(hhh]j{)}(hinth]hint}hjMsbah}(h]h]h]h]h!]uh%jzhjJubah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetjOjjj jNuh%h5hj4ubh)}hj4sbh -- }hj4sbh)}(h(optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the ``rect`` parameter)h](h(optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the }hjmsbh;)}(h``rect``h]hrect}hjusbah}(h]h]h]h]h!]uh%h:hjmubh parameter)}hjmsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj4h&hubh)}(hX| if ``width == 0``, (default) fill the ellipse | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. h](hv)}(hhh](hz)}(h-if ``width == 0``, (default) fill the ellipseh](hif }hjsbh;)}(h``width == 0``h]h width == 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, (default) fill the ellipse}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h)if ``width > 0``, used for line thicknessh](hif }hjsbh;)}(h ``width > 0``h]h width > 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, used for line thickness}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h'if ``width < 0``, nothing will be drawnh](hif }hjsbh;)}(h ``width < 0``h]h width < 0}hjsbah}(h]h]h]h]h!]uh%h:hjubh, nothing will be drawn}hjsbeh}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hjhKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjubjD)}(hWhen using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter.h]h)}(hWhen using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter.h](h When using }hjsbh;)}(h ``width``h]hwidth}hjsbah}(h]h]h]h]h!]uh%h:hjubh values }hjsbh;)}(h``> 1``h]h> 1}hj!sbah}(h]h]h]h]h!]uh%h:hjubhI, the edge lines will only grow inward from the original boundary of the }hjsbh;)}(h``rect``h]hrect}hj3sbah}(h]h]h]h]h!]uh%h:hjubh parameter.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jCh'h]h)Khjubeh}(h]h]h]h]h!]uh%hh'h]h)Khj4h&hubeh}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThj ubeh}(h]h]h]h]h!]uh%j?hjubj@)}(hhh](jE)}(hReturnsh]hReturns}hjxsbah}(h]h]h]h]h!]uh%jDhjuh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0h](hwa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given }(hjh&hh'Nh)Nubh;)}(h``rect``h]hrect}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh- parameter and its width and height will be 0}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjuubeh}(h]h]h]h]h!]uh%j?hjubj@)}(hhh](jE)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jDhjh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjsbah}(h]h]h]h]h!] refdomainjS refexplicitreftypej reftargetRectjjj jNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jThjubeh}(h]h]h]h]h!]uh%j?hjubeh}(h]h]h]h]h!]uh%j:hjh&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jNjceh]h]h!]uh%hhjh&hh'h]h)Kubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)Khjubh )}(h## pygame.draw.ellipse ##h]h## pygame.draw.ellipse ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjuh&hh'Nh)Nubeh}(h]h](jSfunctioneh]h]h!]j jSj j7j j7j j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jarc() (in module pygame.draw)pygame.draw.archNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(harch](j)}(h pygame.draw.h]h pygame.draw.}hjPsbah}(h]h](jjeh]h]h!]h#h$uh%jhjLh&hh'h]h)Kubj)}(hjNh]harc}hj^sbah}(h]h](jjeh]h]h!]h#h$uh%jhjLh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjLh&hh'h]h)Kubeh}(h]jGah](jjeh]h]h!]jj jhjjNjj jNjarc()uh%jh'h]h)KhjIh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw an elliptical arc`h]h)}(hjh]hdraw an elliptical arc}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h@:sg:`arc(surface, color, rect, start_angle, stop_angle) -> Rect`h]h)}(hjh]h:arc(surface, color, rect, start_angle, stop_angle) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(hI:sg:`arc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect`h]h)}(hjh]hCarc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj}h&hh'h]h)Kubh)}(h-Draws an elliptical arc on the given surface.h]h-Draws an elliptical arc on the given surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj}h&hubh)}(hThe two angle arguments are given in radians and indicate the start and stop positions of the arc. The arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle``.h](hThe two angle arguments are given in radians and indicate the start and stop positions of the arc. The arc is drawn in a counterclockwise direction from the }hjsbh;)}(h``start_angle``h]h start_angle}hjsbah}(h]h]h]h]h!]uh%h:hjubh to the }hjsbh;)}(h``stop_angle``h]h stop_angle}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj}h&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hj sbah}(h]h]h]h]h!]uh%jDhj h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hj/ sbah}(h]h]h]h]h!]uh%jchj+ ubh (}hj+ sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hjD sbah}(h]h]h]h]h!]uh%jzhjA ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjF jjj jNuh%h5hj+ ubh)}hj+ sbh -- }hj+ sbhsurface to draw on}(hj+ h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj( ubah}(h]h]h]h]h!]uh%hhj% ubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hj| sbah}(h]h]h]h]h!]uh%jchjx ubh (}hjx sbh6)}(hhh]j{)}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj jjj jNuh%h5hjx ubj{)}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj jjj jNuh%h5hjx ubj{)}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(htupleh]htuple}hj sbah}(h]h]h]h]h!]uh%jzhj ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj jjj jNuh%h5hjx ubj{)}(hj8h]h(}hj sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(hinth]hint}hj !sbah}(h]h]h]h]h!]uh%jzhj!ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj !jjj jNuh%h5hjx ubj{)}(h, h]h, }hj#!sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(hinth]hint}hj4!sbah}(h]h]h]h]h!]uh%jzhj1!ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj6!jjj jNuh%h5hjx ubj{)}(h, h]h, }hjL!sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(hinth]hint}hj]!sbah}(h]h]h]h]h!]uh%jzhjZ!ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj_!jjj jNuh%h5hjx ubj{)}(h, h]h, }hju!sbah}(h]h]h]h]h!]uh%jzhjx ubj{)}(hjh]h[}hj!sbah}(h]h]h]h]h!]uh%jzhjx ubh6)}(hhh]j{)}(hinth]hint}hj!sbah}(h]h]h]h]h!]uh%jzhj!ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj!jjj jNuh%h5hjx ubj{)}(hjh]h]}hj!sbah}(h]h]h]h]h!]uh%jzhjx ubj{)}(hjh]h)}hj!sbah}(h]h]h]h]h!]uh%jzhjx ubh)}hjx sbh -- }hjx sbhAcolor to draw with, the alpha value is optional if using a tuple }(hjx h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj!sbah}(h]h]h]h]h!]uh%h:hjx h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhju ubah}(h]h]h]h]h!]uh%hhj% ubh)}(hhh]h)}(hrect (Rect) -- rectangle to indicate the position and dimensions of the ellipse which the arc will be based on, the ellipse will be centered inside the rectangleh](jd)}(hrecth]hrect}hj!sbah}(h]h]h]h]h!]uh%jchj!ubh (}hj!sbh6)}(hhh]j{)}(hRecth]hRect}hj"sbah}(h]h]h]h]h!]uh%jzhj"ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj "jjj jNuh%h5hj!ubh)}hj!sbh -- }hj!sbhrectangle to indicate the position and dimensions of the ellipse which the arc will be based on, the ellipse will be centered inside the rectangle}(hj!h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hhj% ubh)}(hhh]h)}(h8start_angle (float) -- start angle of the arc in radiansh](jd)}(h start_angleh]h start_angle}hj>"sbah}(h]h]h]h]h!]uh%jchj:"ubh (}hj:"sbh6)}(hhh]j{)}(hfloath]hfloat}hjS"sbah}(h]h]h]h]h!]uh%jzhjP"ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetjU"jjj jNuh%h5hj:"ubh)}hj:"sbh -- }hj:"sbh!start angle of the arc in radians}(hj:"h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj7"ubah}(h]h]h]h]h!]uh%hhj% ubh)}(hhh]h)}(hXstop_angle (float) -- stop angle of the arc in radiansif start_angle < stop_angle, the arc is drawn in a counterclockwise direction from the start_angle to the stop_angle if start_angle > stop_angle, tau (tau == 2 * pi) will be added to the stop_angle, if the resulting stop angle value is greater than the start_angle the above start_angle < stop_angle case applies, otherwise nothing will be drawn if start_angle == stop_angle, nothing will be drawn h](jd)}(h stop_angleh]h stop_angle}hj"sbah}(h]h]h]h]h!]uh%jchj"ubh (}hj"sbh6)}(hhh]j{)}(hfloath]hfloat}hj"sbah}(h]h]h]h]h!]uh%jzhj"ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj"jjj jNuh%h5hj"ubh)}hj"sbh -- }hj"sbh)}(h stop angle of the arc in radiansh]h stop angle of the arc in radians}hj"sbah}(h]h]h]h]h!]uh%hh'h]h)M hj"h&hubh)}(hX| if ``start_angle < stop_angle``, the arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle`` | if ``start_angle > stop_angle``, tau (tau == 2 * pi) will be added to the ``stop_angle``, if the resulting stop angle value is greater than the ``start_angle`` the above ``start_angle < stop_angle`` case applies, otherwise nothing will be drawn | if ``start_angle == stop_angle``, nothing will be drawn | h]hv)}(hhh](hz)}(hif ``start_angle < stop_angle``, the arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle``h](hif }hj"sbh;)}(h``start_angle < stop_angle``h]hstart_angle < stop_angle}hj"sbah}(h]h]h]h]h!]uh%h:hj"ubh<, the arc is drawn in a counterclockwise direction from the }hj"sbh;)}(h``start_angle``h]h start_angle}hj"sbah}(h]h]h]h]h!]uh%h:hj"ubh to the }hj"sbh;)}(h``stop_angle``h]h stop_angle}hj#sbah}(h]h]h]h]h!]uh%h:hj"ubeh}(h]h]h]h]h!]uh%h)hKhj"h'h]h)Kubhz)}(hif ``start_angle > stop_angle``, tau (tau == 2 * pi) will be added to the ``stop_angle``, if the resulting stop angle value is greater than the ``start_angle`` the above ``start_angle < stop_angle`` case applies, otherwise nothing will be drawnh](hif }hj#sbh;)}(h``start_angle > stop_angle``h]hstart_angle > stop_angle}hj#sbah}(h]h]h]h]h!]uh%h:hj#ubh+, tau (tau == 2 * pi) will be added to the }hj#sbh;)}(h``stop_angle``h]h stop_angle}hj.#sbah}(h]h]h]h]h!]uh%h:hj#ubh8, if the resulting stop angle value is greater than the }hj#sbh;)}(h``start_angle``h]h start_angle}hj@#sbah}(h]h]h]h]h!]uh%h:hj#ubh the above }hj#sbh;)}(h``start_angle < stop_angle``h]hstart_angle < stop_angle}hjR#sbah}(h]h]h]h]h!]uh%h:hj#ubh. case applies, otherwise nothing will be drawn}hj#sbeh}(h]h]h]h]h!]uh%h)hKhj"h'h]h)Kubhz)}(h7if ``start_angle == stop_angle``, nothing will be drawnh](hif }hjj#sbh;)}(h``start_angle == stop_angle``h]hstart_angle == stop_angle}hjr#sbah}(h]h]h]h]h!]uh%h:hjj#ubh, nothing will be drawn}hjj#sbeh}(h]h]h]h]h!]uh%h)hKhj"h'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj"hKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj"ubah}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubeh}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%hhj% ubh)}(hhh]h)}(hXbwidth (int) -- (optional) used for line thickness (not to be confused with the width value of the rect parameter)if width == 0, nothing will be drawn if width > 0, (default is 1) used for line thickness if width < 0, same as width == 0 When using width values > 1, the edge lines will only grow inward from the original boundary of the rect parameter.h](jd)}(hwidthh]hwidth}hj#sbah}(h]h]h]h]h!]uh%jchj#ubh (}hj#sbh6)}(hhh]j{)}(hinth]hint}hj#sbah}(h]h]h]h]h!]uh%jzhj#ubah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetj#jjj jNuh%h5hj#ubh)}hj#sbh -- }hj#sbh)}(hf(optional) used for line thickness (not to be confused with the width value of the ``rect`` parameter)h](hS(optional) used for line thickness (not to be confused with the width value of the }hj#sbh;)}(h``rect``h]hrect}hj#sbah}(h]h]h]h]h!]uh%h:hj#ubh parameter)}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj#h&hubh)}(hX"| if ``width == 0``, nothing will be drawn | if ``width > 0``, (default is 1) used for line thickness | if ``width < 0``, same as ``width == 0`` .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. h](hv)}(hhh](hz)}(h(if ``width == 0``, nothing will be drawnh](hif }hj$sbh;)}(h``width == 0``h]h width == 0}hj$sbah}(h]h]h]h]h!]uh%h:hj$ubh, nothing will be drawn}hj$sbeh}(h]h]h]h]h!]uh%h)hKhj $h'h]h)Kubhz)}(h8if ``width > 0``, (default is 1) used for line thicknessh](hif }hj.$sbh;)}(h ``width > 0``h]h width > 0}hj6$sbah}(h]h]h]h]h!]uh%h:hj.$ubh(, (default is 1) used for line thickness}hj.$sbeh}(h]h]h]h]h!]uh%h)hKhj $h'h]h)Kubhz)}(h(if ``width < 0``, same as ``width == 0``h](hif }hjN$sbh;)}(h ``width < 0``h]h width < 0}hjV$sbah}(h]h]h]h]h!]uh%h:hjN$ubh , same as }hjN$sbh;)}(h``width == 0``h]h width == 0}hjh$sbah}(h]h]h]h]h!]uh%h:hjN$ubeh}(h]h]h]h]h!]uh%h)hKhj $h'h]h)Kubeh}(h]h]h]h]h!]uh%huhj$ubjD)}(hWhen using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter.h]h)}(hWhen using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter.h](h When using }hj$sbh;)}(h ``width``h]hwidth}hj$sbah}(h]h]h]h]h!]uh%h:hj$ubh values }hj$sbh;)}(h``> 1``h]h> 1}hj$sbah}(h]h]h]h]h!]uh%h:hj$ubhI, the edge lines will only grow inward from the original boundary of the }hj$sbh;)}(h``rect``h]hrect}hj$sbah}(h]h]h]h]h!]uh%h:hj$ubh parameter.}hj$sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj$ubah}(h]h]h]h]h!]uh%jCh'h]h)Mhj$ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj#h&hubeh}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hhj% ubeh}(h]h]h]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%jThj ubeh}(h]h]h]h]h!]uh%j?hj ubj@)}(hhh](jE)}(hReturnsh]hReturns}hj$sbah}(h]h]h]h]h!]uh%jDhj$h'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0h](hwa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given }(hj%h&hh'Nh)Nubh;)}(h``rect``h]hrect}hj%sbah}(h]h]h]h]h!]uh%h:hj%h&hh'Nh)Nubh- parameter and its width and height will be 0}(hj%h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%jThj$ubeh}(h]h]h]h]h!]uh%j?hj ubj@)}(hhh](jE)}(h Return typeh]h Return type}hj7%sbah}(h]h]h]h]h!]uh%jDhj4%h'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjL%sbah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetRectjjj jNuh%h5hjH%ubah}(h]h]h]h]h!]uh%hhjE%ubah}(h]h]h]h]h!]uh%jThj4%ubeh}(h]h]h]h]h!]uh%j?hj ubeh}(h]h]h]h]h!]uh%j:hj}h&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hj~%sbah}(h]h](jNjceh]h]h!]uh%hhjz%h&hh'h]h)M)ubh$Added support for keyword arguments.}(hjz%h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjv%h&hh'h]h)M)ubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)M(hj}ubh )}(h## pygame.draw.arc ##h]h## pygame.draw.arc ##}hj%sbah}(h]h]h]h]h!]h#h$uh%h hj}h&hh'h]h)M*ubeh}(h]h]h]h]h!]uh%jhjIh&hh'Nh)Nubeh}(h]h](jY functioneh]h]h!]j jY j j%j j%j j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jline() (in module pygame.draw)pygame.draw.linehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hlineh](j)}(h pygame.draw.h]h pygame.draw.}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj%h&hh'h]h)M,ubj)}(hj%h]hline}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj%h&hh'h]h)M,ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj%h&hh'h]h)M,ubeh}(h]j%ah](jjeh]h]h!]jj jhjj%jj j%jline()uh%jh'h]h)M,hj%h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a straight line`h]h)}(hj&h]hdraw a straight line}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)M.ubhz)}(h6:sg:`line(surface, color, start_pos, end_pos) -> Rect`h]h)}(hj&h]h0line(surface, color, start_pos, end_pos) -> Rect}hj&sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)M/ubhz)}(h?:sg:`line(surface, color, start_pos, end_pos, width=1) -> Rect`h]h)}(hj2&h]h9line(surface, color, start_pos, end_pos, width=1) -> Rect}hj4&sbah}(h]h]jah]h]h!]uh%hhj0&ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%huhj%h&hh'h]h)M.ubh)}(hkDraws a straight line on the given surface. There are no endcaps. For thick lines the ends are squared off.h]hkDraws a straight line on the given surface. There are no endcaps. For thick lines the ends are squared off.}hjM&sbah}(h]h]h]h]h!]uh%hh'h]h)M2hj%h&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hja&sbah}(h]h]h]h]h!]uh%jDhj^&h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hj|&sbah}(h]h]h]h]h!]uh%jchjx&ubh (}hjx&sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj&sbah}(h]h]h]h]h!]uh%jzhj&ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj&jjj jNuh%h5hjx&ubh)}hjx&sbh -- }hjx&sbhsurface to draw on}(hjx&h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhju&ubah}(h]h]h]h]h!]uh%hhjr&ubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hj&sbah}(h]h]h]h]h!]uh%jchj&ubh (}hj&sbh6)}(hhh]j{)}(hColorh]hColor}hj&sbah}(h]h]h]h]h!]uh%jzhj&ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj&jjj jNuh%h5hj&ubj{)}(h or h]h or }hj&sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%jzhj'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj 'jjj jNuh%h5hj&ubj{)}(h or h]h or }hj'sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(htupleh]htuple}hj0'sbah}(h]h]h]h]h!]uh%jzhj-'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj2'jjj jNuh%h5hj&ubj{)}(hj8h]h(}hjH'sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(hinth]hint}hjX'sbah}(h]h]h]h]h!]uh%jzhjU'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjZ'jjj jNuh%h5hj&ubj{)}(h, h]h, }hjp'sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%jzhj~'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj'jjj jNuh%h5hj&ubj{)}(h, h]h, }hj'sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%jzhj'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj'jjj jNuh%h5hj&ubj{)}(h, h]h, }hj'sbah}(h]h]h]h]h!]uh%jzhj&ubj{)}(hjh]h[}hj'sbah}(h]h]h]h]h!]uh%jzhj&ubh6)}(hhh]j{)}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%jzhj'ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj'jjj jNuh%h5hj&ubj{)}(hjh]h]}hj'sbah}(h]h]h]h]h!]uh%jzhj&ubj{)}(hjh]h)}hj(sbah}(h]h]h]h]h!]uh%jzhj&ubh)}hj&sbh -- }hj&sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj&h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj(sbah}(h]h]h]h]h!]uh%h:hj&h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%hhjr&ubh)}(hhh]h)}(hstart_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- start position of the line, (x, y)h](jd)}(h start_posh]h start_pos}hj?(sbah}(h]h]h]h]h!]uh%jchj;(ubh (}hj;(sbh6)}(hhh]j{)}(htupleh]htuple}hjT(sbah}(h]h]h]h]h!]uh%jzhjQ(ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjV(jjj jNuh%h5hj;(ubj{)}(hj8h]h(}hjl(sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hj|(sbah}(h]h]h]h]h!]uh%jzhjy(ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj~(jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj(sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hj(sbah}(h]h]h]h]h!]uh%jzhj(ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj(jjj jNuh%h5hj;(ubj{)}(h, h]h, }hj(sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hj(sbah}(h]h]h]h]h!]uh%jzhj(ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj(jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj(sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hj(sbah}(h]h]h]h]h!]uh%jzhj(ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj(jjj jNuh%h5hj;(ubj{)}(h) or h]h) or }hj)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hlisth]hlist}hj )sbah}(h]h]h]h]h!]uh%jzhj)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj")jjj jNuh%h5hj;(ubj{)}(hj8h]h(}hj8)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hjH)sbah}(h]h]h]h]h!]uh%jzhjE)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjJ)jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj`)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hjq)sbah}(h]h]h]h]h!]uh%jzhjn)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjs)jjj jNuh%h5hj;(ubj{)}(h, h]h, }hj)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hj)sbah}(h]h]h]h]h!]uh%jzhj)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj)jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hj)sbah}(h]h]h]h]h!]uh%jzhj)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj)jjj jNuh%h5hj;(ubj{)}(h) or h]h) or }hj)sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hVector2h]hVector2}hj)sbah}(h]h]h]h]h!]uh%jzhj)ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj)jjj jNuh%h5hj;(ubj{)}(hj8h]h(}hj*sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hj*sbah}(h]h]h]h]h!]uh%jzhj*ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj*jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj,*sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hj=*sbah}(h]h]h]h]h!]uh%jzhj:*ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj?*jjj jNuh%h5hj;(ubj{)}(h, h]h, }hjU*sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hinth]hint}hjf*sbah}(h]h]h]h]h!]uh%jzhjc*ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjh*jjj jNuh%h5hj;(ubj{)}(h or h]h or }hj~*sbah}(h]h]h]h]h!]uh%jzhj;(ubh6)}(hhh]j{)}(hfloath]hfloat}hj*sbah}(h]h]h]h]h!]uh%jzhj*ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj*jjj jNuh%h5hj;(ubj{)}(hjh]h)}hj*sbah}(h]h]h]h]h!]uh%jzhj;(ubh)}hj;(sbh -- }hj;(sbh"start position of the line, (x, y)}(hj;(h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj8(ubah}(h]h]h]h]h!]uh%hhjr&ubh)}(hhh]h)}(hend_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- end position of the line, (x, y)h](jd)}(hend_posh]hend_pos}hj*sbah}(h]h]h]h]h!]uh%jchj*ubh (}hj*sbh6)}(hhh]j{)}(htupleh]htuple}hj*sbah}(h]h]h]h]h!]uh%jzhj*ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj*jjj jNuh%h5hj*ubj{)}(hj8h]h(}hj+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hj+sbah}(h]h]h]h]h!]uh%jzhj +ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj+jjj jNuh%h5hj*ubj{)}(h or h]h or }hj(+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hj9+sbah}(h]h]h]h]h!]uh%jzhj6+ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj;+jjj jNuh%h5hj*ubj{)}(h, h]h, }hjQ+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hjb+sbah}(h]h]h]h]h!]uh%jzhj_+ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjd+jjj jNuh%h5hj*ubj{)}(h or h]h or }hjz+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hj+sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj+jjj jNuh%h5hj*ubj{)}(h) or h]h) or }hj+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hlisth]hlist}hj+sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj+jjj jNuh%h5hj*ubj{)}(hj8h]h(}hj+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hj+sbah}(h]h]h]h]h!]uh%jzhj+ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj+jjj jNuh%h5hj*ubj{)}(h or h]h or }hj+sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hj,sbah}(h]h]h]h]h!]uh%jzhj,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj,jjj jNuh%h5hj*ubj{)}(h, h]h, }hj,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hj.,sbah}(h]h]h]h]h!]uh%jzhj+,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj0,jjj jNuh%h5hj*ubj{)}(h or h]h or }hjF,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hjW,sbah}(h]h]h]h]h!]uh%jzhjT,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetjY,jjj jNuh%h5hj*ubj{)}(h) or h]h) or }hjo,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hVector2h]hVector2}hj,sbah}(h]h]h]h]h!]uh%jzhj},ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj,jjj jNuh%h5hj*ubj{)}(hj8h]h(}hj,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hj,sbah}(h]h]h]h]h!]uh%jzhj,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj,jjj jNuh%h5hj*ubj{)}(h or h]h or }hj,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hj,sbah}(h]h]h]h]h!]uh%jzhj,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj,jjj jNuh%h5hj*ubj{)}(h, h]h, }hj,sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hinth]hint}hj,sbah}(h]h]h]h]h!]uh%jzhj,ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj,jjj jNuh%h5hj*ubj{)}(h or h]h or }hj-sbah}(h]h]h]h]h!]uh%jzhj*ubh6)}(hhh]j{)}(hfloath]hfloat}hj#-sbah}(h]h]h]h]h!]uh%jzhj -ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj%-jjj jNuh%h5hj*ubj{)}(hjh]h)}hj;-sbah}(h]h]h]h]h!]uh%jzhj*ubh)}hj*sbh -- }hj*sbh end position of the line, (x, y)}(hj*h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hhjr&ubh)}(hhh]h)}(hXwidth (int) -- (optional) used for line thicknessif width >= 1, used for line thickness (default is 1) if width < 1, nothing will be drawn When using width values > 1, lines will grow as follows. For odd width values, the thickness of each line grows with the original line being in the center. For even width values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction).h](jd)}(hwidthh]hwidth}hjg-sbah}(h]h]h]h]h!]uh%jchjc-ubh (}hjc-sbh6)}(hhh]j{)}(hinth]hint}hj|-sbah}(h]h]h]h]h!]uh%jzhjy-ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetj~-jjj jNuh%h5hjc-ubh)}hjc-sbh -- }hjc-sbh)}(h"(optional) used for line thicknessh]h"(optional) used for line thickness}hj-sbah}(h]h]h]h]h!]uh%hh'h]h)M?hjc-h&hubhv)}(hhh](hz)}(h5if width >= 1, used for line thickness (default is 1)h]h5if width >= 1, used for line thickness (default is 1)}hj-sbah}(h]h]h]h]h!]uh%h)hKhj-h'h]h)Kubhz)}(h#if width < 1, nothing will be drawnh]h#if width < 1, nothing will be drawn}hj-sbah}(h]h]h]h]h!]uh%h)hKhj-h'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj-hKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjc-h&hh'Nh)NubjD)}(hXMWhen using ``width`` values ``> 1``, lines will grow as follows. For odd ``width`` values, the thickness of each line grows with the original line being in the center. For even ``width`` values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction).h](h)}(h@When using ``width`` values ``> 1``, lines will grow as follows.h](h When using }hj-sbh;)}(h ``width``h]hwidth}hj-sbah}(h]h]h]h]h!]uh%h:hj-ubh values }hj-sbh;)}(h``> 1``h]h> 1}hj-sbah}(h]h]h]h]h!]uh%h:hj-ubh, lines will grow as follows.}hj-sbeh}(h]h]h]h]h!]uh%hh'h]h)MFhj-ubh)}(hfFor odd ``width`` values, the thickness of each line grows with the original line being in the center.h](hFor odd }hj.sbh;)}(h ``width``h]hwidth}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubhU values, the thickness of each line grows with the original line being in the center.}hj.sbeh}(h]h]h]h]h!]uh%hh'h]h)MHhj-ubh)}(hXFor even ``width`` values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction).h](h For even }hj..sbh;)}(h ``width``h]hwidth}hj6.sbah}(h]h]h]h]h!]uh%h:hj..ubhX values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction).}hj..sbeh}(h]h]h]h]h!]uh%hh'h]h)MKhj-ubeh}(h]h]h]h]h!]uh%jCh'h]h)MEhjc-h&hubeh}(h]h]h]h]h!]uh%hhj`-ubah}(h]h]h]h]h!]uh%hhjr&ubeh}(h]h]h]h]h!]uh%hhjo&ubah}(h]h]h]h]h!]uh%jThj^&ubeh}(h]h]h]h]h!]uh%j?hj[&ubj@)}(hhh](jE)}(hReturnsh]hReturns}hju.sbah}(h]h]h]h]h!]uh%jDhjr.h'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the start_pos parameter value (float values will be truncated) and its width and height will be 0h](haa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the }(hj.h&hh'Nh)Nubh;)}(h ``start_pos``h]h start_pos}hj.sbah}(h]h]h]h]h!]uh%h:hj.h&hh'Nh)NubhT parameter value (float values will be truncated) and its width and height will be 0}(hj.h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%jThjr.ubeh}(h]h]h]h]h!]uh%j?hj[&ubj@)}(hhh](jE)}(h Return typeh]h Return type}hj.sbah}(h]h]h]h]h!]uh%jDhj.h'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hj.sbah}(h]h]h]h]h!] refdomainj& refexplicitreftypej reftargetRectjjj jNuh%h5hj.ubah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%jThj.ubeh}(h]h]h]h]h!]uh%j?hj[&ubj@)}(hhh](jE)}(hRaisesh]hRaises}hj.sbah}(h]h]h]h]h!]uh%jDhj.h'h]h)KubjU)}(hhh]h)}(hETypeError -- if start_pos or end_pos is not a sequence of two numbersh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hj /sbah}(h]h]h]h]h!]uh%jchj/ubah}(h]h]h]h]h!] refdomainj& refexplicitreftypej. reftargetj /jjj jNuh%h5hj/ubh -- }hj/sbhif }(hj/h&hh'Nh)Nubh;)}(h ``start_pos``h]h start_pos}hj)/sbah}(h]h]h]h]h!]uh%h:hj/h&hh'Nh)Nubh or }(hj/h&hh'Nh)Nubh;)}(h ``end_pos``h]hend_pos}hj;/sbah}(h]h]h]h]h!]uh%h:hj/h&hh'Nh)Nubh! is not a sequence of two numbers}(hj/h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%jThj.ubeh}(h]h]h]h]h!]uh%j?hj[&ubeh}(h]h]h]h]h!]uh%j:hj%h&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjm/sbah}(h]h](jNjceh]h]h!]uh%hhji/h&hh'h]h)M\ubh$Added support for keyword arguments.}(hji/h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhje/h&hh'h]h)M\ubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)M[hj%ubh )}(h## pygame.draw.line ##h]h## pygame.draw.line ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hj%h&hh'h]h)M]ubeh}(h]h]h]h]h!]uh%jhj%h&hh'Nh)Nubeh}(h]h](j&functioneh]h]h!]j j&j j/j j/j j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jlines() (in module pygame.draw)pygame.draw.lineshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hlinesh](j)}(h pygame.draw.h]h pygame.draw.}hj/sbah}(h]h](jjeh]h]h!]h#h$uh%jhj/h&hh'h]h)M_ubj)}(hj/h]hlines}hj/sbah}(h]h](jjeh]h]h!]h#h$uh%jhj/h&hh'h]h)M_ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj/h&hh'h]h)M_ubeh}(h]j/ah](jjeh]h]h!]jj jhjj/jj j/jlines()uh%jh'h]h)M_hj/h&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`draw multiple contiguous straight line segments`h]h)}(hj/h]h/draw multiple contiguous straight line segments}hj/sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Maubhz)}(h3:sg:`lines(surface, color, closed, points) -> Rect`h]h)}(hj 0h]h-lines(surface, color, closed, points) -> Rect}hj 0sbah}(h]h]jah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mbubhz)}(h<:sg:`lines(surface, color, closed, points, width=1) -> Rect`h]h)}(hj!0h]h6lines(surface, color, closed, points, width=1) -> Rect}hj#0sbah}(h]h]jah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)Maubh)}(hDraws a sequence of contiguous straight lines on the given surface. There are no endcaps or miter joints. For thick lines the ends are squared off. Drawing thick lines with sharp corners can have undesired looking results.h]hDraws a sequence of contiguous straight lines on the given surface. There are no endcaps or miter joints. For thick lines the ends are squared off. Drawing thick lines with sharp corners can have undesired looking results.}hj<0sbah}(h]h]h]h]h!]uh%hh'h]h)Mehj/h&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hjP0sbah}(h]h]h]h]h!]uh%jDhjM0h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hjk0sbah}(h]h]h]h]h!]uh%jchjg0ubh (}hjg0sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj0sbah}(h]h]h]h]h!]uh%jzhj}0ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj0jjj jNuh%h5hjg0ubh)}hjg0sbh -- }hjg0sbhsurface to draw on}(hjg0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjd0ubah}(h]h]h]h]h!]uh%hhja0ubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hj0sbah}(h]h]h]h]h!]uh%jchj0ubh (}hj0sbh6)}(hhh]j{)}(hColorh]hColor}hj0sbah}(h]h]h]h]h!]uh%jzhj0ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj0jjj jNuh%h5hj0ubj{)}(h or h]h or }hj0sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(hinth]hint}hj0sbah}(h]h]h]h]h!]uh%jzhj0ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj0jjj jNuh%h5hj0ubj{)}(h or h]h or }hj1sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(htupleh]htuple}hj1sbah}(h]h]h]h]h!]uh%jzhj1ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj!1jjj jNuh%h5hj0ubj{)}(hj8h]h(}hj71sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(hinth]hint}hjG1sbah}(h]h]h]h]h!]uh%jzhjD1ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetjI1jjj jNuh%h5hj0ubj{)}(h, h]h, }hj_1sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(hinth]hint}hjp1sbah}(h]h]h]h]h!]uh%jzhjm1ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetjr1jjj jNuh%h5hj0ubj{)}(h, h]h, }hj1sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(hinth]hint}hj1sbah}(h]h]h]h]h!]uh%jzhj1ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj1jjj jNuh%h5hj0ubj{)}(h, h]h, }hj1sbah}(h]h]h]h]h!]uh%jzhj0ubj{)}(hjh]h[}hj1sbah}(h]h]h]h]h!]uh%jzhj0ubh6)}(hhh]j{)}(hinth]hint}hj1sbah}(h]h]h]h]h!]uh%jzhj1ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj1jjj jNuh%h5hj0ubj{)}(hjh]h]}hj1sbah}(h]h]h]h]h!]uh%jzhj0ubj{)}(hjh]h)}hj1sbah}(h]h]h]h]h!]uh%jzhj0ubh)}hj0sbh -- }hj0sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj0h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj 2sbah}(h]h]h]h]h!]uh%h:hj0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%hhja0ubh)}(hhh]h)}(huclosed (bool) -- if True an additional line segment is drawn between the first and last points in the points sequenceh](jd)}(hclosedh]hclosed}hj.2sbah}(h]h]h]h]h!]uh%jchj*2ubh (}hj*2sbh6)}(hhh]j{)}(hboolh]hbool}hjC2sbah}(h]h]h]h]h!]uh%jzhj@2ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetjE2jjj jNuh%h5hj*2ubh)}hj*2sbh -- }hj*2sbhif }(hj*2h&hh'Nh)Nubh;)}(h``True``h]hTrue}hjg2sbah}(h]h]h]h]h!]uh%h:hj*2h&hh'Nh)NubhN an additional line segment is drawn between the first and last points in the }(hj*2h&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjy2sbah}(h]h]h]h]h!]uh%h:hj*2h&hh'Nh)Nubh sequence}(hj*2h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj'2ubah}(h]h]h]h]h!]uh%hhja0ubh)}(hhh]h)}(hXpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 2 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2) and from (x2, y2) to (x3, y3), additionally if the closed parameter is True another line segment will be drawn from (x3, y3) to (x1, y1)h](jd)}(hpointsh]hpoints}hj2sbah}(h]h]h]h]h!]uh%jchj2ubh (}hj2sbh6)}(hhh]j{)}(htupleh]htuple}hj2sbah}(h]h]h]h]h!]uh%jzhj2ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj2jjj jNuh%h5hj2ubj{)}(hj8h]h(}hj2sbah}(h]h]h]h]h!]uh%jzhj2ubh6)}(hhh]j{)}(h coordinateh]h coordinate}hj2sbah}(h]h]h]h]h!]uh%jzhj2ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj2jjj jNuh%h5hj2ubj{)}(h) or h]h) or }hj2sbah}(h]h]h]h]h!]uh%jzhj2ubh6)}(hhh]j{)}(hlisth]hlist}hj3sbah}(h]h]h]h]h!]uh%jzhj3ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj3jjj jNuh%h5hj2ubj{)}(hj8h]h(}hj3sbah}(h]h]h]h]h!]uh%jzhj2ubh6)}(hhh]j{)}(h coordinateh]h coordinate}hj,3sbah}(h]h]h]h]h!]uh%jzhj)3ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj.3jjj jNuh%h5hj2ubj{)}(hjh]h)}hjD3sbah}(h]h]h]h]h!]uh%jzhj2ubh)}hj2sbh -- }hj2sbh7a sequence of 2 or more (x, y) coordinates, where each }(hj2h&hh'Nh)Nubj )}(h *coordinate*h]h coordinate}hj]3sbah}(h]h]h]h]h!]uh%j hj2h&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hj2h&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hjq3h]hpygame.math.Vector2}hjs3sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjo3ubah}(h]h]h]h]h!]refdochS refdomainj}3reftypeclass refexplicitrefwarnhYj hZNh[pygame.math.Vector2uh%h5h'h]h)Mohj2h&hubhd of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points }(hj2h&hh'Nh)Nubh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh# a line segment will be drawn from }(hj2h&hh'Nh)Nubh;)}(h ``(x1, y1)``h]h(x1, y1)}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh to }(hj2h&hh'Nh)Nubh;)}(h ``(x2, y2)``h]h(x2, y2)}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh and from }(hj2h&hh'Nh)Nubh;)}(h ``(x2, y2)``h]h(x2, y2)}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh to }(hj2h&hh'Nh)Nubh;)}(h ``(x3, y3)``h]h(x3, y3)}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh, additionally if the }(hj2h&hh'Nh)Nubh;)}(h ``closed``h]hclosed}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh parameter is }(hj2h&hh'Nh)Nubh;)}(h``True``h]hTrue}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh) another line segment will be drawn from }(hj2h&hh'Nh)Nubh;)}(h ``(x3, y3)``h]h(x3, y3)}hj4sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh to }(hj2h&hh'Nh)Nubh;)}(h ``(x1, y1)``h]h(x1, y1)}hj#4sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hhja0ubh)}(hhh]h)}(hwidth (int) -- (optional) used for line thicknessif width >= 1, used for line thickness (default is 1) if width < 1, nothing will be drawn When using width values > 1 refer to the width notes of line() for details on how thick lines grow.h](jd)}(hwidthh]hwidth}hjD4sbah}(h]h]h]h]h!]uh%jchj@4ubh (}hj@4sbh6)}(hhh]j{)}(hinth]hint}hjY4sbah}(h]h]h]h]h!]uh%jzhjV4ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetj[4jjj jNuh%h5hj@4ubh)}hj@4sbh -- }hj@4sbh)}(h"(optional) used for line thicknessh]h"(optional) used for line thickness}hjy4sbah}(h]h]h]h]h!]uh%hh'h]h)Mxhj@4h&hubhv)}(hhh](hz)}(h5if width >= 1, used for line thickness (default is 1)h]h5if width >= 1, used for line thickness (default is 1)}hj4sbah}(h]h]h]h]h!]uh%h)hKhj4h'h]h)Kubhz)}(h#if width < 1, nothing will be drawnh]h#if width < 1, nothing will be drawn}hj4sbah}(h]h]h]h]h!]uh%h)hKhj4h'h]h)Kubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj4hKh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj@4h&hh'Nh)NubjD)}(huWhen using ``width`` values ``> 1`` refer to the ``width`` notes of :func:`line` for details on how thick lines grow.h]h)}(huWhen using ``width`` values ``> 1`` refer to the ``width`` notes of :func:`line` for details on how thick lines grow.h](h When using }hj4sbh;)}(h ``width``h]hwidth}hj4sbah}(h]h]h]h]h!]uh%h:hj4ubh values }hj4sbh;)}(h``> 1``h]h> 1}hj4sbah}(h]h]h]h]h!]uh%h:hj4ubh refer to the }hj4sbh;)}(h ``width``h]hwidth}hj4sbah}(h]h]h]h]h!]uh%h:hj4ubh notes of }hj4sbh6)}(h :func:`line`h]h;)}(hj4h]hline()}hj4sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj4ubah}(h]h]h]h]h!]refdochS refdomainj5reftypefunc refexplicitrefwarnhYj hZNh[lineuh%h5h'h]h)Mhj4ubh% for details on how thick lines grow.}hj4sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj4ubah}(h]h]h]h]h!]uh%jCh'h]h)M~hj@4h&hubeh}(h]h]h]h]h!]uh%hhj=4ubah}(h]h]h]h]h!]uh%hhja0ubeh}(h]h]h]h]h!]uh%hhj^0ubah}(h]h]h]h]h!]uh%jThjM0ubeh}(h]h]h]h]h!]uh%j?hjJ0ubj@)}(hhh](jE)}(hReturnsh]hReturns}hjH5sbah}(h]h]h]h]h!]uh%jDhjE5h'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0h](ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the }(hjY5h&hh'Nh)Nubh;)}(h ``points``h]hpoints}hja5sbah}(h]h]h]h]h!]uh%h:hjY5h&hh'Nh)NubhN parameter (float values will be truncated) and its width and height will be 0}(hjY5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjV5ubah}(h]h]h]h]h!]uh%jThjE5ubeh}(h]h]h]h]h!]uh%j?hjJ0ubj@)}(hhh](jE)}(h Return typeh]h Return type}hj5sbah}(h]h]h]h]h!]uh%jDhj5h'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hj5sbah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej reftargetRectjjj jNuh%h5hj5ubah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%jThj5ubeh}(h]h]h]h]h!]uh%j?hjJ0ubj@)}(hhh](jE)}(hRaisesh]hRaises}hj5sbah}(h]h]h]h]h!]uh%jDhj5h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h>ValueError -- if len(points) < 2 (must have at least 2 points)h](h6)}(hhh]jd)}(h ValueErrorh]h ValueError}hj5sbah}(h]h]h]h]h!]uh%jchj5ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej. reftargetj5jjj jNuh%h5hj5ubh -- }hj5sbhif }(hj5h&hh'Nh)Nubh;)}(h``len(points) < 2``h]hlen(points) < 2}hj6sbah}(h]h]h]h]h!]uh%h:hj5h&hh'Nh)Nubh (must have at least 2 points)}(hj5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]h)}(hPTypeError -- if points is not a sequence or points does not contain number pairsh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hj*6sbah}(h]h]h]h]h!]uh%jchj'6ubah}(h]h]h]h]h!] refdomainj0 refexplicitreftypej. reftargetj,6jjj jNuh%h5hj#6ubh -- }hj#6sbhif }(hj#6h&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjJ6sbah}(h]h]h]h]h!]uh%h:hj#6h&hh'Nh)Nubh is not a sequence or }(hj#6h&hh'Nh)Nubh;)}(h ``points``h]hpoints}hj\6sbah}(h]h]h]h]h!]uh%h:hj#6h&hh'Nh)Nubh does not contain number pairs}(hj#6h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj 6ubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%jThj5ubeh}(h]h]h]h]h!]uh%j?hjJ0ubeh}(h]h]h]h]h!]uh%j:hj/h&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hj6sbah}(h]h](jNjceh]h]h!]uh%hhj6h&hh'h]h)Mubh$Added support for keyword arguments.}(hj6h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj6h&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)Mhj/ubh )}(h## pygame.draw.lines ##h]h## pygame.draw.lines ##}hj6sbah}(h]h]h]h]h!]h#h$uh%h hj/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj/h&hh'Nh)Nubeh}(h]h](j0functioneh]h]h!]j j0j j6j j6j j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j aaline() (in module pygame.draw)pygame.draw.aalinehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(haalineh](j)}(h pygame.draw.h]h pygame.draw.}hj6sbah}(h]h](jjeh]h]h!]h#h$uh%jhj6h&hh'h]h)Mubj)}(hj6h]haaline}hj6sbah}(h]h](jjeh]h]h!]h#h$uh%jhj6h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj6h&hh'h]h)Mubeh}(h]j6ah](jjeh]h]h!]jj jhjj6jj j6jaaline()uh%jh'h]h)Mhj6h&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`draw a straight antialiased line`h]h)}(hj 7h]h draw a straight antialiased line}hj"7sbah}(h]h]hah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)Mubhz)}(h8:sg:`aaline(surface, color, start_pos, end_pos) -> Rect`h]h)}(hj77h]h2aaline(surface, color, start_pos, end_pos) -> Rect}hj97sbah}(h]h]jah]h]h!]uh%hhj57ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)Mubhz)}(hA:sg:`aaline(surface, color, start_pos, end_pos, blend=1) -> Rect`h]h)}(hjN7h]h;aaline(surface, color, start_pos, end_pos, blend=1) -> Rect}hjP7sbah}(h]h]jah]h]h!]uh%hhjL7ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj7h&hh'h]h)Mubh)}(h7Draws a straight antialiased line on the given surface.h]h7Draws a straight antialiased line on the given surface.}hji7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7h&hubh)}(hbThe line has a thickness of one pixel and the endpoints have a height and width of one pixel each.h]hbThe line has a thickness of one pixel and the endpoints have a height and width of one pixel each.}hjw7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7h&hubh definition_list)}(hhh]h definition_list_item)}(hX The way a line and its endpoints are drawn: If both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer). Otherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis): For each endpoint: If ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them. Otherwise: Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right Then for each point between the endpoints, along the line, whose x-coordinate is a whole number: Find which pixels would be covered and how much by that point and draw them. *e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) Otherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using ``y`` instead of ``x``, top instead of left and bottom instead of right). h](h term)}(h+The way a line and its endpoints are drawn:h]h+The way a line and its endpoints are drawn:}hj7sbah}(h]h]h]h]h!]uh%j7h'h]h)Mhj7ubh definition)}(hhh](h)}(heIf both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer).h]heIf both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer).}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(huOtherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis):h]huOtherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis):}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(hXFor each endpoint: If ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them. Otherwise: Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right Then for each point between the endpoints, along the line, whose x-coordinate is a whole number: Find which pixels would be covered and how much by that point and draw them. *e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) h](h)}(hFor each endpoint:h]hFor each endpoint:}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(hX]If ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them. Otherwise: Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right h](h)}(hpIf ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them.h](hIf }hj7sbh;)}(h``x``h]hx}hj7sbah}(h]h]h]h]h!]uh%h:hj7ubhh, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them.}hj7sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(h Otherwise:h]h Otherwise:}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(hXCalculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right h](h)}(hCalculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint.h]hCalculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint.}hj 8sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj8ubh)}(h>Find which pixels would be covered and how much by that point.h]h>Find which pixels would be covered and how much by that point.}hj8sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj8ubh)}(hZIf the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``).h](hSIf the endpoint is the left one, multiply the coverage by (1 - the decimal part of }hj%8sbh;)}(h``x``h]hx}hj-8sbah}(h]h]h]h]h!]uh%h:hj%8ubh).}hj%8sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj8ubh)}(h=Otherwise multiply the coverage by the decimal part of ``x``.h](h7Otherwise multiply the coverage by the decimal part of }hjE8sbh;)}(h``x``h]hx}hjM8sbah}(h]h]h]h]h!]uh%h:hjE8ubh.}hjE8sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj8ubh)}(hThen draw those pixels.h]hThen draw those pixels.}hje8sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj8ubj7)}(hhh]j7)}(hX*e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right h](j7)}(h*e.g.:*h]j )}(hj|8h]he.g.:}hj~8sbah}(h]h]h]h]h!]uh%j hjz8ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhjv8ubj7)}(hhh]hv)}(hhh](hz)}(hThe left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``.h](hThe left endpoint of the line }hj8sbh;)}(h``((1, 1.3), (5, 3))``h]h((1, 1.3), (5, 3))}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh would cover 70% of the pixel }hj8sbh;)}(h ``(1, 1)``h]h(1, 1)}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh and 30% of the pixel }hj8sbh;)}(h ``(1, 2)``h]h(1, 2)}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh3 while the right one would cover 100% of the pixel }hj8sbh;)}(h ``(5, 3)``h]h(5, 3)}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh.}hj8sbeh}(h]h]h]h]h!]uh%h)hKhj8h'h]h)Kubhz)}(hX:The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the righth](hThe left endpoint of the line }hj8sbh;)}(h``((1.2, 1.4), (4.6, 3.1))``h]h((1.2, 1.4), (4.6, 3.1))}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh would cover 56% }hj8sbj )}(h*(i.e. 0.8 * 70%)*h]h(i.e. 0.8 * 70%)}hj9sbah}(h]h]h]h]h!]uh%j hj8ubh of the pixel }hj8sbh;)}(h ``(1, 1)``h]h(1, 1)}hj9sbah}(h]h]h]h]h!]uh%h:hj8ubh and 24% }hj8sbj )}(h*(i.e. 0.8 * 30%)*h]h(i.e. 0.8 * 30%)}hj+9sbah}(h]h]h]h]h!]uh%j hj8ubh of the pixel }hj8sbh;)}(h ``(1, 2)``h]h(1, 2)}hj=9sbah}(h]h]h]h]h!]uh%h:hj8ubh% while the right one would cover 42% }hj8sbj )}(h*(i.e. 0.6 * 70%)*h]h(i.e. 0.6 * 70%)}hjO9sbah}(h]h]h]h]h!]uh%j hj8ubh of the pixel }hj8sbh;)}(h ``(5, 3)``h]h(5, 3)}hja9sbah}(h]h]h]h]h!]uh%h:hj8ubh and 18% }hj8sbj )}(h*(i.e. 0.6 * 30%)*h]h(i.e. 0.6 * 30%)}hjs9sbah}(h]h]h]h]h!]uh%j hj8ubh of the pixel }hj8sbh;)}(h ``(5, 4)``h]h(5, 4)}hj9sbah}(h]h]h]h]h!]uh%h:hj8ubh while the right}hj8sbeh}(h]h]h]h]h!]uh%h)hKhj8h'h]h)Kubeh}(h]h]h]h]h!]uh%huhj8ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhjv8ubeh}(h]h]h]h]h!]uh%j7h'h]h)Mhjs8ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhj8ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(h`Then for each point between the endpoints, along the line, whose x-coordinate is a whole number:h]h`Then for each point between the endpoints, along the line, whose x-coordinate is a whole number:}hj9sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(hXFind which pixels would be covered and how much by that point and draw them. *e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) h](h)}(hLFind which pixels would be covered and how much by that point and draw them.h]hLFind which pixels would be covered and how much by that point and draw them.}hj9sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj9ubj7)}(hhh]j7)}(hX*e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) h](j7)}(h*e.g.:*h]j )}(hj9h]he.g.:}hj9sbah}(h]h]h]h]h!]uh%j hj9ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhj9ubj7)}(hhh]hv)}(hhh](hz)}(hThe points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``.h](hThe points along the line }hj:sbh;)}(h``((1, 1), (4, 2.5))``h]h((1, 1), (4, 2.5))}hj :sbah}(h]h]h]h]h!]uh%h:hj:ubh would be }hj:sbh;)}(h ``(2, 1.5)``h]h(2, 1.5)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh and }hj:sbh;)}(h ``(3, 2)``h]h(3, 2)}hj1:sbah}(h]h]h]h]h!]uh%h:hj:ubh" and would cover 50% of the pixel }hj:sbh;)}(h ``(2, 1)``h]h(2, 1)}hjC:sbah}(h]h]h]h]h!]uh%h:hj:ubh, 50% of the pixel }hj:sbh;)}(h ``(2, 2)``h]h(2, 2)}hjU:sbah}(h]h]h]h]h!]uh%h:hj:ubh and 100% of the pixel }hj:sbh;)}(h ``(3, 2)``h]h(3, 2)}hjg:sbah}(h]h]h]h]h!]uh%h:hj:ubh.}hj:sbeh}(h]h]h]h]h!]uh%h)hKhj:h'h]h)Kubhz)}(hX@The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``)h](hThe points along the line }hj:sbh;)}(h``((1.2, 1.4), (4.6, 3.1))``h]h((1.2, 1.4), (4.6, 3.1))}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh would be }hj:sbh;)}(h ``(2, 1.8)``h]h(2, 1.8)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh (covering 20% of the pixel }hj:sbh;)}(h ``(2, 1)``h]h(2, 1)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh and 80% of the pixel }hj:sbh;)}(h ``(2, 2)``h]h(2, 2)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh), }hj:sbh;)}(h ``(3, 2.3)``h]h(3, 2.3)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh (covering 70% of the pixel }hj:sbh;)}(h ``(3, 2)``h]h(3, 2)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh and 30% of the pixel }hj:sbh;)}(h ``(3, 3)``h]h(3, 3)}hj:sbah}(h]h]h]h]h!]uh%h:hj:ubh) and }hj:sbh;)}(h ``(4, 2.8)``h]h(4, 2.8)}hj;sbah}(h]h]h]h]h!]uh%h:hj:ubh (covering 20% of the pixel }hj:sbh;)}(h ``(2, 1)``h]h(2, 1)}hj;sbah}(h]h]h]h]h!]uh%h:hj:ubh and 80% of the pixel }hj:sbh;)}(h ``(2, 2)``h]h(2, 2)}hj);sbah}(h]h]h]h]h!]uh%h:hj:ubh)}hj:sbeh}(h]h]h]h]h!]uh%h)hKhj:h'h]h)Kubeh}(h]h]h]h]h!]uh%huhj9ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhj9ubeh}(h]h]h]h]h!]uh%j7h'h]h)Mhj9ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhj9ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubh)}(hOtherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using ``y`` instead of ``x``, top instead of left and bottom instead of right).h](hrOtherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using }hje;sbh;)}(h``y``h]hy}hjm;sbah}(h]h]h]h]h!]uh%h:hje;ubh instead of }hje;sbh;)}(h``x``h]hx}hj;sbah}(h]h]h]h]h!]uh%h:hje;ubh3, top instead of left and bottom instead of right).}hje;sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7ubeh}(h]h]h]h]h!]uh%j7h'h]h)Mhj7ubeh}(h]h]h]h]h!]uh%j7h'h]h)Mhj7ubah}(h]h]h]h]h!]uh%j7h'h]h)Mhj7h&hubjD)}(hXRegarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, *e.g.* the point ``(1.4, 2)`` covers 60% of the pixel ``(1, 2)`` and 40% of the pixel ``(2,2)``.h]h)}(hXRegarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, *e.g.* the point ``(1.4, 2)`` covers 60% of the pixel ``(1, 2)`` and 40% of the pixel ``(2,2)``.h](hXRegarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, }hj;sbj )}(h*e.g.*h]he.g.}hj;sbah}(h]h]h]h]h!]uh%j hj;ubh the point }hj;sbh;)}(h ``(1.4, 2)``h]h(1.4, 2)}hj;sbah}(h]h]h]h]h!]uh%h:hj;ubh covers 60% of the pixel }hj;sbh;)}(h ``(1, 2)``h]h(1, 2)}hj;sbah}(h]h]h]h]h!]uh%h:hj;ubh and 40% of the pixel }hj;sbh;)}(h ``(2,2)``h]h(2,2)}hj;sbah}(h]h]h]h]h!]uh%h:hj;ubh.}hj;sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;ubah}(h]h]h]h]h!]uh%jCh'h]h)Mhj7h&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hj<sbah}(h]h]h]h]h!]uh%jDhj <h'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hj*<sbah}(h]h]h]h]h!]uh%jchj&<ubh (}hj&<sbh6)}(hhh]j{)}(hSurfaceh]hSurface}hj?<sbah}(h]h]h]h]h!]uh%jzhj<<ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjA<jjj jNuh%h5hj&<ubh)}hj&<sbh -- }hj&<sbhsurface to draw on}(hj&<h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj#<ubah}(h]h]h]h]h!]uh%hhj <ubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hjw<sbah}(h]h]h]h]h!]uh%jchjs<ubh (}hjs<sbh6)}(hhh]j{)}(hColorh]hColor}hj<sbah}(h]h]h]h]h!]uh%jzhj<ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj<jjj jNuh%h5hjs<ubj{)}(h or h]h or }hj<sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(hinth]hint}hj<sbah}(h]h]h]h]h!]uh%jzhj<ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj<jjj jNuh%h5hjs<ubj{)}(h or h]h or }hj<sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(htupleh]htuple}hj<sbah}(h]h]h]h]h!]uh%jzhj<ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj<jjj jNuh%h5hjs<ubj{)}(hj8h]h(}hj<sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(hinth]hint}hj=sbah}(h]h]h]h]h!]uh%jzhj=ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj=jjj jNuh%h5hjs<ubj{)}(h, h]h, }hj=sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(hinth]hint}hj/=sbah}(h]h]h]h]h!]uh%jzhj,=ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj1=jjj jNuh%h5hjs<ubj{)}(h, h]h, }hjG=sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(hinth]hint}hjX=sbah}(h]h]h]h]h!]uh%jzhjU=ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjZ=jjj jNuh%h5hjs<ubj{)}(h, h]h, }hjp=sbah}(h]h]h]h]h!]uh%jzhjs<ubj{)}(hjh]h[}hj~=sbah}(h]h]h]h]h!]uh%jzhjs<ubh6)}(hhh]j{)}(hinth]hint}hj=sbah}(h]h]h]h]h!]uh%jzhj=ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj=jjj jNuh%h5hjs<ubj{)}(hjh]h]}hj=sbah}(h]h]h]h]h!]uh%jzhjs<ubj{)}(hjh]h)}hj=sbah}(h]h]h]h]h!]uh%jzhjs<ubh)}hjs<sbh -- }hjs<sbhAcolor to draw with, the alpha value is optional if using a tuple }(hjs<h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj=sbah}(h]h]h]h]h!]uh%h:hjs<h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjp<ubah}(h]h]h]h]h!]uh%hhj <ubh)}(hhh]h)}(hstart_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- start position of the line, (x, y)h](jd)}(h start_posh]h start_pos}hj=sbah}(h]h]h]h]h!]uh%jchj=ubh (}hj=sbh6)}(hhh]j{)}(htupleh]htuple}hj>sbah}(h]h]h]h]h!]uh%jzhj=ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj>jjj jNuh%h5hj=ubj{)}(hj8h]h(}hj>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hj*>sbah}(h]h]h]h]h!]uh%jzhj'>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj,>jjj jNuh%h5hj=ubj{)}(h or h]h or }hjB>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hjS>sbah}(h]h]h]h]h!]uh%jzhjP>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjU>jjj jNuh%h5hj=ubj{)}(h, h]h, }hjk>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hj|>sbah}(h]h]h]h]h!]uh%jzhjy>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj~>jjj jNuh%h5hj=ubj{)}(h or h]h or }hj>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hj>sbah}(h]h]h]h]h!]uh%jzhj>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj>jjj jNuh%h5hj=ubj{)}(h) or h]h) or }hj>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hlisth]hlist}hj>sbah}(h]h]h]h]h!]uh%jzhj>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj>jjj jNuh%h5hj=ubj{)}(hj8h]h(}hj>sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hj>sbah}(h]h]h]h]h!]uh%jzhj>ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj>jjj jNuh%h5hj=ubj{)}(h or h]h or }hj?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hj?sbah}(h]h]h]h]h!]uh%jzhj?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj!?jjj jNuh%h5hj=ubj{)}(h, h]h, }hj7?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hjH?sbah}(h]h]h]h]h!]uh%jzhjE?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjJ?jjj jNuh%h5hj=ubj{)}(h or h]h or }hj`?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hjq?sbah}(h]h]h]h]h!]uh%jzhjn?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjs?jjj jNuh%h5hj=ubj{)}(h) or h]h) or }hj?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hVector2h]hVector2}hj?sbah}(h]h]h]h]h!]uh%jzhj?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj?jjj jNuh%h5hj=ubj{)}(hj8h]h(}hj?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hj?sbah}(h]h]h]h]h!]uh%jzhj?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj?jjj jNuh%h5hj=ubj{)}(h or h]h or }hj?sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hj?sbah}(h]h]h]h]h!]uh%jzhj?ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj?jjj jNuh%h5hj=ubj{)}(h, h]h, }hj@sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%jzhj@ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj@jjj jNuh%h5hj=ubj{)}(h or h]h or }hj,@sbah}(h]h]h]h]h!]uh%jzhj=ubh6)}(hhh]j{)}(hfloath]hfloat}hj=@sbah}(h]h]h]h]h!]uh%jzhj:@ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj?@jjj jNuh%h5hj=ubj{)}(hjh]h)}hjU@sbah}(h]h]h]h]h!]uh%jzhj=ubh)}hj=sbh -- }hj=sbh"start position of the line, (x, y)}(hj=h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hhj <ubh)}(hhh]h)}(hend_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- end position of the line, (x, y)h](jd)}(hend_posh]hend_pos}hj@sbah}(h]h]h]h]h!]uh%jchj}@ubh (}hj}@sbh6)}(hhh]j{)}(htupleh]htuple}hj@sbah}(h]h]h]h]h!]uh%jzhj@ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj@jjj jNuh%h5hj}@ubj{)}(hj8h]h(}hj@sbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%jzhj@ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj@jjj jNuh%h5hj}@ubj{)}(h or h]h or }hj@sbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hj@sbah}(h]h]h]h]h!]uh%jzhj@ubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj@jjj jNuh%h5hj}@ubj{)}(h, h]h, }hj@sbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jzhj Aubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjAjjj jNuh%h5hj}@ubj{)}(h or h]h or }hj(Asbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hj9Asbah}(h]h]h]h]h!]uh%jzhj6Aubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj;Ajjj jNuh%h5hj}@ubj{)}(h) or h]h) or }hjQAsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hlisth]hlist}hjbAsbah}(h]h]h]h]h!]uh%jzhj_Aubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjdAjjj jNuh%h5hj}@ubj{)}(hj8h]h(}hjzAsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jzhjAubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjAjjj jNuh%h5hj}@ubj{)}(h or h]h or }hjAsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hjAsbah}(h]h]h]h]h!]uh%jzhjAubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjAjjj jNuh%h5hj}@ubj{)}(h, h]h, }hjAsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jzhjAubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjAjjj jNuh%h5hj}@ubj{)}(h or h]h or }hjAsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hjBsbah}(h]h]h]h]h!]uh%jzhjBubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjBjjj jNuh%h5hj}@ubj{)}(h) or h]h) or }hjBsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hVector2h]hVector2}hj.Bsbah}(h]h]h]h]h!]uh%jzhj+Bubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj0Bjjj jNuh%h5hj}@ubj{)}(hj8h]h(}hjFBsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hjVBsbah}(h]h]h]h]h!]uh%jzhjSBubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjXBjjj jNuh%h5hj}@ubj{)}(h or h]h or }hjnBsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hjBsbah}(h]h]h]h]h!]uh%jzhj|Bubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjBjjj jNuh%h5hj}@ubj{)}(h, h]h, }hjBsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hinth]hint}hjBsbah}(h]h]h]h]h!]uh%jzhjBubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjBjjj jNuh%h5hj}@ubj{)}(h or h]h or }hjBsbah}(h]h]h]h]h!]uh%jzhj}@ubh6)}(hhh]j{)}(hfloath]hfloat}hjBsbah}(h]h]h]h]h!]uh%jzhjBubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetjBjjj jNuh%h5hj}@ubj{)}(hjh]h)}hjBsbah}(h]h]h]h]h!]uh%jzhj}@ubh)}hj}@sbh -- }hj}@sbh end position of the line, (x, y)}(hj}@h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjz@ubah}(h]h]h]h]h!]uh%hhj <ubh)}(hhh]h)}(hblend (int) -- (optional) (deprecated) if non-zero (default) the line will be blended with the surface's existing pixel shades, otherwise it will overwrite themh](jd)}(hblendh]hblend}hjCsbah}(h]h]h]h]h!]uh%jchjCubh (}hjCsbh6)}(hhh]j{)}(hinth]hint}hj*Csbah}(h]h]h]h]h!]uh%jzhj'Cubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetj,Cjjj jNuh%h5hjCubh)}hjCsbh -- }hjCsbh(optional) (deprecated) if non-zero (default) the line will be blended with the surface's existing pixel shades, otherwise it will overwrite them}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hhj <ubeh}(h]h]h]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%jThj <ubeh}(h]h]h]h]h!]uh%j?hj <ubj@)}(hhh](jE)}(hReturnsh]hReturns}hjoCsbah}(h]h]h]h]h!]uh%jDhjlCh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the start_pos parameter value (float values will be truncated) and its width and height will be 0h](haa rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the }(hjCh&hh'Nh)Nubh;)}(h ``start_pos``h]h start_pos}hjCsbah}(h]h]h]h]h!]uh%h:hjCh&hh'Nh)NubhT parameter value (float values will be truncated) and its width and height will be 0}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj}Cubah}(h]h]h]h]h!]uh%jThjlCubeh}(h]h]h]h]h!]uh%j?hj <ubj@)}(hhh](jE)}(h Return typeh]h Return type}hjCsbah}(h]h]h]h]h!]uh%jDhjCh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjCsbah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej reftargetRectjjj jNuh%h5hjCubah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jThjCubeh}(h]h]h]h]h!]uh%j?hj <ubj@)}(hhh](jE)}(hRaisesh]hRaises}hjCsbah}(h]h]h]h]h!]uh%jDhjCh'h]h)KubjU)}(hhh]h)}(hETypeError -- if start_pos or end_pos is not a sequence of two numbersh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hjDsbah}(h]h]h]h]h!]uh%jchjDubah}(h]h]h]h]h!] refdomainjT< refexplicitreftypej. reftargetjDjjj jNuh%h5hjCubh -- }hjCsbhif }(hjCh&hh'Nh)Nubh;)}(h ``start_pos``h]h start_pos}hj#Dsbah}(h]h]h]h]h!]uh%h:hjCh&hh'Nh)Nubh or }(hjCh&hh'Nh)Nubh;)}(h ``end_pos``h]hend_pos}hj5Dsbah}(h]h]h]h]h!]uh%h:hjCh&hh'Nh)Nubh! is not a sequence of two numbers}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jThjCubeh}(h]h]h]h]h!]uh%j?hj <ubeh}(h]h]h]h]h!]uh%j:hj7h&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjgDsbah}(h]h](jNjceh]h]h!]uh%hhjcDh&hh'h]h)Mubh$Added support for keyword arguments.}(hjcDh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj_Dh&hh'h]h)Mubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)Mhj7ubh )}(h## pygame.draw.aaline ##h]h## pygame.draw.aaline ##}hjDsbah}(h]h]h]h]h!]h#h$uh%h hj7h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj6h&hh'Nh)Nubeh}(h]h](jT<functioneh]h]h!]j jT<j jDj jDj j j j j j j uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!aalines() (in module pygame.draw)pygame.draw.aalineshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(haalinesh](j)}(h pygame.draw.h]h pygame.draw.}hjDsbah}(h]h](jjeh]h]h!]h#h$uh%jhjDh&hh'h]h)Mubj)}(hjDh]haalines}hjDsbah}(h]h](jjeh]h]h!]h#h$uh%jhjDh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjDh&hh'h]h)Mubeh}(h]jDah](jjeh]h]h!]jj jhjjDjj jDj aalines()uh%jh'h]h)MhjDh&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`draw multiple contiguous straight antialiased line segments`h]h)}(hjDh]h;draw multiple contiguous straight antialiased line segments}hjDsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)Mubhz)}(h5:sg:`aalines(surface, color, closed, points) -> Rect`h]h)}(hjEh]h/aalines(surface, color, closed, points) -> Rect}hjEsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)Mubhz)}(h>:sg:`aalines(surface, color, closed, points, blend=1) -> Rect`h]h)}(hjEh]h8aalines(surface, color, closed, points, blend=1) -> Rect}hjEsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjDh&hh'h]h)Mubh)}(hODraws a sequence of contiguous straight antialiased lines on the given surface.h]hODraws a sequence of contiguous straight antialiased lines on the given surface.}hj6Esbah}(h]h]h]h]h!]uh%hh'h]h)MhjDh&hubj;)}(hhh](j@)}(hhh](jE)}(h Parametersh]h Parameters}hjJEsbah}(h]h]h]h]h!]uh%jDhjGEh'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](jd)}(hsurfaceh]hsurface}hjeEsbah}(h]h]h]h]h!]uh%jchjaEubh (}hjaEsbh6)}(hhh]j{)}(hSurfaceh]hSurface}hjzEsbah}(h]h]h]h]h!]uh%jzhjwEubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj|Ejjj jNuh%h5hjaEubh)}hjaEsbh -- }hjaEsbhsurface to draw on}(hjaEh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj^Eubah}(h]h]h]h]h!]uh%hhj[Eubh)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](jd)}(hcolorh]hcolor}hjEsbah}(h]h]h]h]h!]uh%jchjEubh (}hjEsbh6)}(hhh]j{)}(hColorh]hColor}hjEsbah}(h]h]h]h]h!]uh%jzhjEubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjEjjj jNuh%h5hjEubj{)}(h or h]h or }hjEsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(hinth]hint}hjEsbah}(h]h]h]h]h!]uh%jzhjEubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjEjjj jNuh%h5hjEubj{)}(h or h]h or }hjFsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(htupleh]htuple}hjFsbah}(h]h]h]h]h!]uh%jzhjFubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjFjjj jNuh%h5hjEubj{)}(hj8h]h(}hj1Fsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(hinth]hint}hjAFsbah}(h]h]h]h]h!]uh%jzhj>Fubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjCFjjj jNuh%h5hjEubj{)}(h, h]h, }hjYFsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(hinth]hint}hjjFsbah}(h]h]h]h]h!]uh%jzhjgFubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjlFjjj jNuh%h5hjEubj{)}(h, h]h, }hjFsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(hinth]hint}hjFsbah}(h]h]h]h]h!]uh%jzhjFubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjFjjj jNuh%h5hjEubj{)}(h, h]h, }hjFsbah}(h]h]h]h]h!]uh%jzhjEubj{)}(hjh]h[}hjFsbah}(h]h]h]h]h!]uh%jzhjEubh6)}(hhh]j{)}(hinth]hint}hjFsbah}(h]h]h]h]h!]uh%jzhjFubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjFjjj jNuh%h5hjEubj{)}(hjh]h]}hjFsbah}(h]h]h]h]h!]uh%jzhjEubj{)}(hjh]h)}hjFsbah}(h]h]h]h]h!]uh%jzhjEubh)}hjEsbh -- }hjEsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjEh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjGsbah}(h]h]h]h]h!]uh%h:hjEh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hhj[Eubh)}(hhh]h)}(huclosed (bool) -- if True an additional line segment is drawn between the first and last points in the points sequenceh](jd)}(hclosedh]hclosed}hj(Gsbah}(h]h]h]h]h!]uh%jchj$Gubh (}hj$Gsbh6)}(hhh]j{)}(hboolh]hbool}hj=Gsbah}(h]h]h]h]h!]uh%jzhj:Gubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj?Gjjj jNuh%h5hj$Gubh)}hj$Gsbh -- }hj$Gsbhif }(hj$Gh&hh'Nh)Nubh;)}(h``True``h]hTrue}hjaGsbah}(h]h]h]h]h!]uh%h:hj$Gh&hh'Nh)NubhN an additional line segment is drawn between the first and last points in the }(hj$Gh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjsGsbah}(h]h]h]h]h!]uh%h:hj$Gh&hh'Nh)Nubh sequence}(hj$Gh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj!Gubah}(h]h]h]h]h!]uh%hhj[Eubh)}(hhh]h)}(hXpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 2 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2) and from (x2, y2) to (x3, y3), additionally if the closed parameter is True another line segment will be drawn from (x3, y3) to (x1, y1)h](jd)}(hpointsh]hpoints}hjGsbah}(h]h]h]h]h!]uh%jchjGubh (}hjGsbh6)}(hhh]j{)}(htupleh]htuple}hjGsbah}(h]h]h]h]h!]uh%jzhjGubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjGjjj jNuh%h5hjGubj{)}(hj8h]h(}hjGsbah}(h]h]h]h]h!]uh%jzhjGubh6)}(hhh]j{)}(h coordinateh]h coordinate}hjGsbah}(h]h]h]h]h!]uh%jzhjGubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjGjjj jNuh%h5hjGubj{)}(h) or h]h) or }hjGsbah}(h]h]h]h]h!]uh%jzhjGubh6)}(hhh]j{)}(hlisth]hlist}hjGsbah}(h]h]h]h]h!]uh%jzhjGubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjHjjj jNuh%h5hjGubj{)}(hj8h]h(}hjHsbah}(h]h]h]h]h!]uh%jzhjGubh6)}(hhh]j{)}(h coordinateh]h coordinate}hj&Hsbah}(h]h]h]h]h!]uh%jzhj#Hubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetj(Hjjj jNuh%h5hjGubj{)}(hjh]h)}hj>Hsbah}(h]h]h]h]h!]uh%jzhjGubh)}hjGsbh -- }hjGsbh7a sequence of 2 or more (x, y) coordinates, where each }(hjGh&hh'Nh)Nubj )}(h *coordinate*h]h coordinate}hjWHsbah}(h]h]h]h]h!]uh%j hjGh&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hjGh&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hjkHh]hpygame.math.Vector2}hjmHsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjiHubah}(h]h]h]h]h!]refdochS refdomainjwHreftypeclass refexplicitrefwarnhYj hZNh[pygame.math.Vector2uh%h5h'h]h)M hjGh&hubhd of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points }(hjGh&hh'Nh)Nubh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh# a line segment will be drawn from }(hjGh&hh'Nh)Nubh;)}(h ``(x1, y1)``h]h(x1, y1)}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh to }(hjGh&hh'Nh)Nubh;)}(h ``(x2, y2)``h]h(x2, y2)}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh and from }(hjGh&hh'Nh)Nubh;)}(h ``(x2, y2)``h]h(x2, y2)}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh to }(hjGh&hh'Nh)Nubh;)}(h ``(x3, y3)``h]h(x3, y3)}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh, additionally if the }(hjGh&hh'Nh)Nubh;)}(h ``closed``h]hclosed}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh parameter is }(hjGh&hh'Nh)Nubh;)}(h``True``h]hTrue}hjHsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh) another line segment will be drawn from }(hjGh&hh'Nh)Nubh;)}(h ``(x3, y3)``h]h(x3, y3)}hj Isbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh to }(hjGh&hh'Nh)Nubh;)}(h ``(x1, y1)``h]h(x1, y1)}hjIsbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hhj[Eubh)}(hhh]h)}(hblend (int) -- (optional) (deprecated) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwrittenh](jd)}(hblendh]hblend}hj>Isbah}(h]h]h]h]h!]uh%jchj:Iubh (}hj:Isbh6)}(hhh]j{)}(hinth]hint}hjSIsbah}(h]h]h]h]h!]uh%jzhjPIubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetjUIjjj jNuh%h5hj:Iubh)}hj:Isbh -- }hj:Isbh(optional) (deprecated) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwritten}(hj:Ih&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj7Iubah}(h]h]h]h]h!]uh%hhj[Eubeh}(h]h]h]h]h!]uh%hhjXEubah}(h]h]h]h]h!]uh%jThjGEubeh}(h]h]h]h]h!]uh%j?hjDEubj@)}(hhh](jE)}(hReturnsh]hReturns}hjIsbah}(h]h]h]h]h!]uh%jDhjIh'h]h)KubjU)}(hhh]h)}(ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0h](ha rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the }(hjIh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjIsbah}(h]h]h]h]h!]uh%h:hjIh&hh'Nh)NubhN parameter (float values will be truncated) and its width and height will be 0}(hjIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%jThjIubeh}(h]h]h]h]h!]uh%j?hjDEubj@)}(hhh](jE)}(h Return typeh]h Return type}hjIsbah}(h]h]h]h]h!]uh%jDhjIh'h]h)KubjU)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hjIsbah}(h]h]h]h]h!] refdomainjE refexplicitreftypej reftargetRectjjj jNuh%h5hjIubah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%jThjIubeh}(h]h]h]h]h!]uh%j?hjDEubj@)}(hhh](jE)}(hRaisesh]hRaises}hjJsbah}(h]h]h]h]h!]uh%jDhjJh'h]h)KubjU)}(hhh]h)}(hhh](h)}(hhh]h)}(h>ValueError -- if len(points) < 2 (must have at least 2 points)h](h6)}(hhh]jd)}(h ValueErrorh]h ValueError}hj2Jsbah}(h]h]h]h]h!]uh%jchj/Jubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej. reftargetj4Jjjj jNuh%h5hj+Jubh -- }hj+Jsbhif }(hj+Jh&hh'Nh)Nubh;)}(h``len(points) < 2``h]hlen(points) < 2}hjRJsbah}(h]h]h]h]h!]uh%h:h;/j+Jh&hh'Nh)Nubh (must have at least 2 points)}(hj+Jh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj(Jubah}(h]h]h]h]h!]uh%hhj%Jubh)}(hhh]h)}(hPTypeError -- if points is not a sequence or points does not contain number pairsh](h6)}(hhh]jd)}(h TypeErrorh]h TypeError}hjzJsbah}(h]h]h]h]h!]uh%jchjwJubah}(h]h]h]h]h!] refdomainjE refexplicitreftypej. reftargetj|Jjjj jNuh%h5hjsJubh -- }hjsJsbhif }(hjsJh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjJsbah}(h]h]h]h]h!]uh%h:hjsJh&hh'Nh)Nubh is not a sequence or }(hjsJh&hh'Nh)Nubh;)}(h ``points``h]hpoints}hjJsbah}(h]h]h]h]h!]uh%h:hjsJh&hh'Nh)Nubh does not contain number pairs}(hjsJh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjpJubah}(h]h]h]h]h!]uh%hhj%Jubeh}(h]h]h]h]h!]uh%hhj"Jubah}(h]h]h]h]h!]uh%jThjJubeh}(h]h]h]h]h!]uh%j?hjDEubeh}(h]h]h]h]h!]uh%j:hjDh&hh'Nh)NubjO)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.0.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjJsbah}(h]h](jNjceh]h]h!]uh%hhjJh&hh'h]h)M"ubh$Added support for keyword arguments.}(hjJh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjJh&hh'h]h)M"ubah}(h]h]h]h]h!]jxversionchangedjz2.0.0uh%jNh&hh'h]h)M!hjDubh )}(h## pygame.draw.aalines ##h]h## pygame.draw.aalines ##}hj Ksbah}(h]h]h]h]h!]h#h$uh%h hjDh&hh'h]h)M#ubeh}(h]h]h]h]h!]uh%jhjDh&hh'Nh)Nubeh}(h]h](jEfunctioneh]h]h!]j jEj j"Kj j"Kj j j j j j j uh%jh&hhh,h'Nh)Nubh )}(h## pygame.draw ##h]h## pygame.draw ##}hj&Ksbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M&ubh figure)}(hhh](h image)}(hq.. figure:: code_examples/draw_module_example.png :alt: draw module example Example code for draw module. h]h}(h]h]h]h]h!]altdraw module exampleuri)ref/code_examples/draw_module_example.png candidates}*jHKs original_uri%code_examples/draw_module_example.pnguh%j9Kh'h]h)M'hj6Kubh caption)}(hExample code for draw module.h]hExample code for draw module.}hjPKsbah}(h]h]h]h]h!]uh%jNKh'h]h)M*hj6Kubeh}(h]id1ah]h]h]h!]uh%j4Kh'h]h)M'hh,h&hubh literal_block)}(hX= import pygame from math import pi # Initialize pygame pygame.init() # Set the height and width of the screen size = [400, 300] screen = pygame.display.set_mode(size) pygame.display.set_caption("Example code for the draw module") # Loop until the user clicks the close button. done = False clock = pygame.time.Clock() while not done: # This limits the while loop to a max of 60 times per second. # Leave this out and we will use all CPU we can. clock.tick(60) for event in pygame.event.get(): # User did something if event.type == pygame.QUIT: # If user clicked close done = True # Flag that we are done so we exit this loop # Clear the screen and set the screen background screen.fill("white") # Draw on the screen a green line from (0, 0) to (50, 30) # 5 pixels wide. Uses (r, g, b) color - medium sea green. pygame.draw.line(screen, (60, 179, 113), [0, 0], [50, 30], 5) # Draw on the screen a green line from (0, 50) to (50, 80) # Because it is an antialiased line, it is 1 pixel wide. # Uses (r, g, b) color - medium sea green. pygame.draw.aaline(screen, (60, 179, 113), [0, 50], [50, 80], True) # Draw on the screen 3 black lines, each 5 pixels wide. # The 'False' means the first and last points are not connected. pygame.draw.lines( screen, "black", False, [[0, 80], [50, 90], [200, 80], [220, 30]], 5 ) # Draw a rectangle outline pygame.draw.rect(screen, "black", [75, 10, 50, 20], 2) # Draw a solid rectangle. Same color as "black" above, specified in a new way pygame.draw.rect(screen, (0, 0, 0), [150, 10, 50, 20]) # Draw a rectangle with rounded corners pygame.draw.rect(screen, "green", [115, 210, 70, 40], 10, border_radius=15) pygame.draw.rect( screen, "red", [135, 260, 50, 30], 0, border_radius=10, border_top_left_radius=0, border_bottom_right_radius=15, ) # Draw an ellipse outline, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [225, 10, 50, 20], 2) # Draw an solid ellipse, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [300, 10, 50, 20]) # This draws a triangle using the polygon command pygame.draw.polygon(screen, "black", [[100, 100], [0, 200], [200, 200]], 5) # Draw an arc as part of an ellipse. # Use radians to determine what angle to draw. pygame.draw.arc(screen, "black", [210, 75, 150, 125], 0, pi / 2, 2) pygame.draw.arc(screen, "green", [210, 75, 150, 125], pi / 2, pi, 2) pygame.draw.arc(screen, "blue", [210, 75, 150, 125], pi, 3 * pi / 2, 2) pygame.draw.arc(screen, "red", [210, 75, 150, 125], 3 * pi / 2, 2 * pi, 2) # Draw a circle pygame.draw.circle(screen, "blue", [60, 250], 40) # Draw only one circle quadrant pygame.draw.circle(screen, "blue", [250, 250], 40, 0, draw_top_right=True) pygame.draw.circle(screen, "red", [250, 250], 40, 30, draw_top_left=True) pygame.draw.circle(screen, "green", [250, 250], 40, 20, draw_bottom_left=True) pygame.draw.circle(screen, "black", [250, 250], 40, 10, draw_bottom_right=True) # Go ahead and update the screen with what we've drawn. # This MUST happen after all the other drawing commands. pygame.display.flip() # Be IDLE friendly pygame.quit() h]hX= import pygame from math import pi # Initialize pygame pygame.init() # Set the height and width of the screen size = [400, 300] screen = pygame.display.set_mode(size) pygame.display.set_caption("Example code for the draw module") # Loop until the user clicks the close button. done = False clock = pygame.time.Clock() while not done: # This limits the while loop to a max of 60 times per second. # Leave this out and we will use all CPU we can. clock.tick(60) for event in pygame.event.get(): # User did something if event.type == pygame.QUIT: # If user clicked close done = True # Flag that we are done so we exit this loop # Clear the screen and set the screen background screen.fill("white") # Draw on the screen a green line from (0, 0) to (50, 30) # 5 pixels wide. Uses (r, g, b) color - medium sea green. pygame.draw.line(screen, (60, 179, 113), [0, 0], [50, 30], 5) # Draw on the screen a green line from (0, 50) to (50, 80) # Because it is an antialiased line, it is 1 pixel wide. # Uses (r, g, b) color - medium sea green. pygame.draw.aaline(screen, (60, 179, 113), [0, 50], [50, 80], True) # Draw on the screen 3 black lines, each 5 pixels wide. # The 'False' means the first and last points are not connected. pygame.draw.lines( screen, "black", False, [[0, 80], [50, 90], [200, 80], [220, 30]], 5 ) # Draw a rectangle outline pygame.draw.rect(screen, "black", [75, 10, 50, 20], 2) # Draw a solid rectangle. Same color as "black" above, specified in a new way pygame.draw.rect(screen, (0, 0, 0), [150, 10, 50, 20]) # Draw a rectangle with rounded corners pygame.draw.rect(screen, "green", [115, 210, 70, 40], 10, border_radius=15) pygame.draw.rect( screen, "red", [135, 260, 50, 30], 0, border_radius=10, border_top_left_radius=0, border_bottom_right_radius=15, ) # Draw an ellipse outline, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [225, 10, 50, 20], 2) # Draw an solid ellipse, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [300, 10, 50, 20]) # This draws a triangle using the polygon command pygame.draw.polygon(screen, "black", [[100, 100], [0, 200], [200, 200]], 5) # Draw an arc as part of an ellipse. # Use radians to determine what angle to draw. pygame.draw.arc(screen, "black", [210, 75, 150, 125], 0, pi / 2, 2) pygame.draw.arc(screen, "green", [210, 75, 150, 125], pi / 2, pi, 2) pygame.draw.arc(screen, "blue", [210, 75, 150, 125], pi, 3 * pi / 2, 2) pygame.draw.arc(screen, "red", [210, 75, 150, 125], 3 * pi / 2, 2 * pi, 2) # Draw a circle pygame.draw.circle(screen, "blue", [60, 250], 40) # Draw only one circle quadrant pygame.draw.circle(screen, "blue", [250, 250], 40, 0, draw_top_right=True) pygame.draw.circle(screen, "red", [250, 250], 40, 30, draw_top_left=True) pygame.draw.circle(screen, "green", [250, 250], 40, 20, draw_bottom_left=True) pygame.draw.circle(screen, "black", [250, 250], 40, 10, draw_bottom_right=True) # Go ahead and update the screen with what we've drawn. # This MUST happen after all the other drawing commands. pygame.display.flip() # Be IDLE friendly pygame.quit() }hjgKsbah}(h]h]h]h]h!]sourceR/home/runner/work/pygame/pygame/docs/reST/ref/code_examples/draw_module_example.pyh#h$forcehighlight_args} linenostartKsuh%jeKh'h]h)M,hh,h&hubeh}(h](hs pygame-draweh]h] pygame.drawah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjKerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jKj}Ks nametypes}jKsh}(j}Kh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jKh'h]h)Khh,h&hubjjj j jejjjsjxjGjLj%j%j/j/j6j6jDjDj`Kj6Ku footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKKsRparse_messages]transform_messages] transformerN include_log]docs/reST/ref/draw.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.618141 pygame-2.6.1/docs/generated/doctrees/ref/event.doctree0000644000175100001770000032561714676242417022404 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.event`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.event}hh`.h](h8You can also find a list of constants for keyboard keys }hjsbh6)}(h!:ref:`here `h]h)}(hjh]hhere}hjsbah}(h]h](hFstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdochS refdomainjreftyperef refexplicitrefwarnh[key-constants-labeluh%h5h'h]h)K^hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K^hh,h&hubh)}(hXA keyboard event occurs when a key is pressed (``KEYDOWN``) and when a key is released (``KEYUP``) The ``key`` attribute of keyboard events contains the value of what key was pressed or released. The ``mod`` attribute contains information about the state of keyboard modifiers (SHIFT, CTRL, ALT, etc.). The ``unicode`` attribute stores the 16-bit unicode value of the key that was pressed or released. The ``scancode`` attribute represents the physical location of a key on the keyboard.h](h/A keyboard event occurs when a key is pressed (}hjsbh;)}(h ``KEYDOWN``h]hKEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubh) and when a key is released (}hjsbh;)}(h ``KEYUP``h]hKEYUP}hj,sbah}(h]h]h]h]h!]uh%h:hjubh) The }hjsbh;)}(h``key``h]hkey}hj>sbah}(h]h]h]h]h!]uh%h:hjubhZ attribute of keyboard events contains the value of what key was pressed or released. The }hjsbh;)}(h``mod``h]hmod}hjPsbah}(h]h]h]h]h!]uh%h:hjubhd attribute contains information about the state of keyboard modifiers (SHIFT, CTRL, ALT, etc.). The }hjsbh;)}(h ``unicode``h]hunicode}hjbsbah}(h]h]h]h]h!]uh%h:hjubhX attribute stores the 16-bit unicode value of the key that was pressed or released. The }hjsbh;)}(h ``scancode``h]hscancode}hjtsbah}(h]h]h]h]h!]uh%h:hjubhE attribute represents the physical location of a key on the keyboard.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kahh,h&hubh)}(hXThe ``ACTIVEEVENT`` contains information about the application gaining or losing focus. The ``gain`` attribute will be 1 if the mouse enters the window, otherwise ``gain`` will be 0. The ``state`` attribute will have a value of ``SDL_APPMOUSEFOCUS`` if mouse focus was gained/lost, ``SDL_APPINPUTFOCUS`` if the application loses or gains keyboard focus, or ``SDL_APPACTIVE`` if the application is minimized (``gain`` will be 0) or restored.h](hThe }hjsbh;)}(h``ACTIVEEVENT``h]h ACTIVEEVENT}hjsbah}(h]h]h]h]h!]uh%h:hjubhI contains information about the application gaining or losing focus. The }hjsbh;)}(h``gain``h]hgain}hjsbah}(h]h]h]h]h!]uh%h:hjubh? attribute will be 1 if the mouse enters the window, otherwise }hjsbh;)}(h``gain``h]hgain}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be 0. The }hjsbh;)}(h ``state``h]hstate}hjsbah}(h]h]h]h]h!]uh%h:hjubh attribute will have a value of }hjsbh;)}(h``SDL_APPMOUSEFOCUS``h]hSDL_APPMOUSEFOCUS}hjsbah}(h]h]h]h]h!]uh%h:hjubh! if mouse focus was gained/lost, }hjsbh;)}(h``SDL_APPINPUTFOCUS``h]hSDL_APPINPUTFOCUS}hjsbah}(h]h]h]h]h!]uh%h:hjubh6 if the application loses or gains keyboard focus, or }hjsbh;)}(h``SDL_APPACTIVE``h]h SDL_APPACTIVE}hjsbah}(h]h]h]h]h!]uh%h:hjubh" if the application is minimized (}hjsbh;)}(h``gain``h]hgain}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be 0) or restored.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kghh,h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj*h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)Klubh)}(hQWhen compiled with SDL2, pygame has these additional events and their attributes.h]hQWhen compiled with SDL2, pygame has these additional events and their attributes.}hj<sbah}(h]h]h]h]h!]uh%hh'h]h)Knhh,h&hubj)}(hXAUDIODEVICEADDED which, iscapture (SDL backend >= 2.0.4) AUDIODEVICEREMOVED which, iscapture (SDL backend >= 2.0.4) FINGERMOTION touch_id, finger_id, x, y, dx, dy FINGERDOWN touch_id, finger_id, x, y, dx, dy FINGERUP touch_id, finger_id, x, y, dx, dy MOUSEWHEEL which, flipped, x, y, touch, precise_x, precise_y MULTIGESTURE touch_id, x, y, pinched, rotated, num_fingers TEXTEDITING text, start, length TEXTINPUT texth]hXAUDIODEVICEADDED which, iscapture (SDL backend >= 2.0.4) AUDIODEVICEREMOVED which, iscapture (SDL backend >= 2.0.4) FINGERMOTION touch_id, finger_id, x, y, dx, dy FINGERDOWN touch_id, finger_id, x, y, dx, dy FINGERUP touch_id, finger_id, x, y, dx, dy MOUSEWHEEL which, flipped, x, y, touch, precise_x, precise_y MULTIGESTURE touch_id, x, y, pinched, rotated, num_fingers TEXTEDITING text, start, length TEXTINPUT text}hjJsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Kshh,h&hubj)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj`sbah}(h]h](jaddedeh]h]h!]uh%hhj\ubah}(h]h]h]h]h!] translatableuh%hhjXh&hh'h]h)K~ubah}(h]h]h]h]h!]j9 versionaddedj;1.9.5uh%jh&hh'h]h)K}hh,ubj)}(hlChanged in pygame 2.0.2: Fixed amount horizontal scroll (x, positive to the right and negative to the left).h]h)}(hlChanged in pygame 2.0.2: Fixed amount horizontal scroll (x, positive to the right and negative to the left).h](h)}(hChanged in pygame 2.0.2: h]hChanged in pygame 2.0.2: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhSFixed amount horizontal scroll (x, positive to the right and negative to the left).}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj~h&hh'h]h)Kubah}(h]h]h]h]h!]j9versionchangedj;2.0.2uh%jh&hh'h]h)Khh,ubj)}(hOChanged in pygame 2.0.2: The touch attribute was added to all the MOUSE events.h]h)}(hOChanged in pygame 2.0.2: The touch attribute was added to all the MOUSE events.h](h)}(hChanged in pygame 2.0.2: h]hChanged in pygame 2.0.2: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhThe }(hjh&hh'Nh)Nubh;)}(h ``touch``h]htouch}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh attribute was added to all the }(hjh&hh'Nh)Nubh;)}(h ``MOUSE``h]hMOUSE}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh events.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j9versionchangedj;2.0.2uh%jh&hh'h]h)Khh,ubh)}(hXThe ``touch`` attribute of ``MOUSE`` events indicates whether or not the events were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles ``FINGERMOTION``, ``FINGERDOWN`` and ``FINGERUP`` events.h](hThe }hjsbh;)}(h ``touch``h]htouch}hjsbah}(h]h]h]h]h!]uh%h:hjubh attribute of }hjsbh;)}(h ``MOUSE``h]hMOUSE}hjsbah}(h]h]h]h]h!]uh%h:hjubh events indicates whether or not the events were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles }hjsbh;)}(h``FINGERMOTION``h]h FINGERMOTION}hj sbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h``FINGERDOWN``h]h FINGERDOWN}hj2sbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h ``FINGERUP``h]hFINGERUP}hjDsbah}(h]h]h]h]h!]uh%h:hjubh events.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hGNew in pygame 2.1.3: Added precise_x and precise_y to MOUSEWHEEL eventsh]h)}(hGNew in pygame 2.1.3: Added precise_x and precise_y to MOUSEWHEEL eventsh](h)}(hNew in pygame 2.1.3: h]hNew in pygame 2.1.3: }hjdsbah}(h]h](jjkeh]h]h!]uh%hhj`h&hh'h]h)KubhAdded }(hj`h&hh'Nh)Nubh;)}(h ``precise_x``h]h precise_x}hjvsbah}(h]h]h]h]h!]uh%h:hj`h&hh'Nh)Nubh and }(hj`h&hh'Nh)Nubh;)}(h ``precise_y``h]h precise_y}hjsbah}(h]h]h]h]h!]uh%h:hj`h&hh'Nh)Nubh to }(hj`h&hh'Nh)Nubh;)}(h``MOUSEWHEEL``h]h MOUSEWHEEL}hjsbah}(h]h]h]h]h!]uh%h:hj`h&hh'Nh)Nubh events}(hj`h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj\h&hh'h]h)Kubah}(h]h]h]h]h!]j9 versionaddedj;2.1.3uh%jh&hh'h]h)Khh,ubh)}(hX^``MOUSEWHEEL`` event occurs whenever the mouse wheel is moved. The ``which`` attribute determines if the event was generated from a touch input device vs an actual mousewheel. The ``preciseX`` attribute contains a float with the amount scrolled horizontally (positive to the right, negative to the left). The ``preciseY`` attribute contains a float with the amount scrolled vertically (positive away from user, negative towards user). The ``flipped`` attribute determines if the values in x and y will be opposite or not. If ``SDL_MOUSEWHEEL_FLIPPED`` is defined, the direction of x and y will be opposite.h](h;)}(h``MOUSEWHEEL``h]h MOUSEWHEEL}hjsbah}(h]h]h]h]h!]uh%h:hjubh5 event occurs whenever the mouse wheel is moved. The }hjsbh;)}(h ``which``h]hwhich}hjsbah}(h]h]h]h]h!]uh%h:hjubhh attribute determines if the event was generated from a touch input device vs an actual mousewheel. The }hjsbh;)}(h ``preciseX``h]hpreciseX}hjsbah}(h]h]h]h]h!]uh%h:hjubhu attribute contains a float with the amount scrolled horizontally (positive to the right, negative to the left). The }hjsbh;)}(h ``preciseY``h]hpreciseY}hjsbah}(h]h]h]h]h!]uh%h:hjubhv attribute contains a float with the amount scrolled vertically (positive away from user, negative towards user). The }hjsbh;)}(h ``flipped``h]hflipped}hjsbah}(h]h]h]h]h!]uh%h:hjubhK attribute determines if the values in x and y will be opposite or not. If }hjsbh;)}(h``SDL_MOUSEWHEEL_FLIPPED``h]hSDL_MOUSEWHEEL_FLIPPED}hjsbah}(h]h]h]h]h!]uh%h:hjubh7 is defined, the direction of x and y will be opposite.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h``TEXTEDITING`` event is triggered when a user activates an input method via hotkey or selecting an input method in a GUI and starts typingh](h;)}(h``TEXTEDITING``h]h TEXTEDITING}hj5sbah}(h]h]h]h]h!]uh%h:hj1ubh| event is triggered when a user activates an input method via hotkey or selecting an input method in a GUI and starts typing}hj1sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hThe ``which`` attribute for ``AUDIODEVICE*`` events is an integer representing the index for new audio devices that are added. ``AUDIODEVICE*`` events are used to update audio settings or device list.h](hThe }hjMsbh;)}(h ``which``h]hwhich}hjUsbah}(h]h]h]h]h!]uh%h:hjMubh attribute for }hjMsbh;)}(h``AUDIODEVICE*``h]h AUDIODEVICE*}hjgsbah}(h]h]h]h]h!]uh%h:hjMubhS events is an integer representing the index for new audio devices that are added. }hjMsbh;)}(h``AUDIODEVICE*``h]h AUDIODEVICE*}hjysbah}(h]h]h]h]h!]uh%h:hjMubh9 events are used to update audio settings or device list.}hjMsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)Kubh)}(h,Many new events were introduced in pygame 2.h]h,Many new events were introduced in pygame 2.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hpygame can recognize text or files dropped in its window. If a file is dropped, ``DROPFILE`` event will be sent, ``file`` will be its path. The ``DROPTEXT`` event is only supported on X11.h](hPpygame can recognize text or files dropped in its window. If a file is dropped, }hjsbh;)}(h ``DROPFILE``h]hDROPFILE}hjsbah}(h]h]h]h]h!]uh%h:hjubh event will be sent, }hjsbh;)}(h``file``h]hfile}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be its path. The }hjsbh;)}(h ``DROPTEXT``h]hDROPTEXT}hjsbah}(h]h]h]h]h!]uh%h:hjubh event is only supported on X11.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h``MIDIIN`` and ``MIDIOUT`` are events reserved for :mod:`pygame.midi` use. ``MIDI*`` events differ from ``AUDIODEVICE*`` events in that AUDIODEVICE events are triggered when there is a state change related to an audio input/output device.h](h;)}(h ``MIDIIN``h]hMIDIIN}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h ``MIDIOUT``h]hMIDIOUT}hj sbah}(h]h]h]h]h!]uh%h:hjubh are events reserved for }hjsbh6)}(h:mod:`pygame.midi`h]h;)}(hj h]h pygame.midi}hj! sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj+ reftypemod refexplicitrefwarnhYhhZNh[ pygame.midiuh%h5h'h]h)Khjubh use. }hjsbh;)}(h ``MIDI*``h]hMIDI*}hjA sbah}(h]h]h]h]h!]uh%h:hjubh events differ from }hjsbh;)}(h``AUDIODEVICE*``h]h AUDIODEVICE*}hjS sbah}(h]h]h]h]h!]uh%h:hjubhv events in that AUDIODEVICE events are triggered when there is a state change related to an audio input/output device.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h.pygame 2 also supports controller hot-pluggingh]h.pygame 2 also supports controller hot-plugging}hjk sbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hX|Event name Attributes and notes DROPFILE file DROPBEGIN (SDL backend >= 2.0.5) DROPCOMPLETE (SDL backend >= 2.0.5) DROPTEXT text (SDL backend >= 2.0.5) MIDIIN MIDIOUT CONTROLLERDEVICEADDED device_index JOYDEVICEADDED device_index CONTROLLERDEVICEREMOVED instance_id JOYDEVICEREMOVED instance_id CONTROLLERDEVICEREMAPPED instance_id KEYMAPCHANGED (SDL backend >= 2.0.4) CLIPBOARDUPDATE RENDER_TARGETS_RESET (SDL backend >= 2.0.2) RENDER_DEVICE_RESET (SDL backend >= 2.0.4) LOCALECHANGED (SDL backend >= 2.0.14)h]hX|Event name Attributes and notes DROPFILE file DROPBEGIN (SDL backend >= 2.0.5) DROPCOMPLETE (SDL backend >= 2.0.5) DROPTEXT text (SDL backend >= 2.0.5) MIDIIN MIDIOUT CONTROLLERDEVICEADDED device_index JOYDEVICEADDED device_index CONTROLLERDEVICEREMOVED instance_id JOYDEVICEREMOVED instance_id CONTROLLERDEVICEREMAPPED instance_id KEYMAPCHANGED (SDL backend >= 2.0.4) CLIPBOARDUPDATE RENDER_TARGETS_RESET (SDL backend >= 2.0.2) RENDER_DEVICE_RESET (SDL backend >= 2.0.4) LOCALECHANGED (SDL backend >= 2.0.14)}hjy sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khh,h&hubh)}(hyAlso in this version, ``instance_id`` attributes were added to joystick events, and the ``joy`` attribute was deprecated.h](hAlso in this version, }hj sbh;)}(h``instance_id``h]h instance_id}hj sbah}(h]h]h]h]h!]uh%h:hj ubh3 attributes were added to joystick events, and the }hj sbh;)}(h``joy``h]hjoy}hj sbah}(h]h]h]h]h!]uh%h:hj ubh attribute was deprecated.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h``KEYMAPCHANGED`` is a type of an event sent when keymap changes due to a system event such as an input language or keyboard layout change.h](h;)}(h``KEYMAPCHANGED``h]h KEYMAPCHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj ubhz is a type of an event sent when keymap changes due to a system event such as an input language or keyboard layout change.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h``CLIPBOARDUPDATE`` is an event sent when clipboard changes. This can still be considered as an experimental feature, some kinds of clipboard changes might not trigger this event.h](h;)}(h``CLIPBOARDUPDATE``h]hCLIPBOARDUPDATE}hj sbah}(h]h]h]h]h!]uh%h:hj ubh is an event sent when clipboard changes. This can still be considered as an experimental feature, some kinds of clipboard changes might not trigger this event.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h;``LOCALECHANGED`` is an event sent when user locale changesh](h;)}(h``LOCALECHANGED``h]h LOCALECHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj ubh* is an event sent when user locale changes}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj sbah}(h]h](jjkeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j9 versionaddedj;2.0.0uh%jh&hh'h]h)Khh,ubj)}(hpNew in pygame 2.1.3: KEYMAPCHANGED, CLIPBOARDUPDATE, RENDER_TARGETS_RESET, RENDER_DEVICE_RESET and LOCALECHANGEDh]h)}(hpNew in pygame 2.1.3: KEYMAPCHANGED, CLIPBOARDUPDATE, RENDER_TARGETS_RESET, RENDER_DEVICE_RESET and LOCALECHANGEDh](h)}(hNew in pygame 2.1.3: h]hNew in pygame 2.1.3: }hj: sbah}(h]h](jjkeh]h]h!]uh%hhj6 h&hh'h]h)Kubh;)}(h``KEYMAPCHANGED``h]h KEYMAPCHANGED}hjH sbah}(h]h]h]h]h!]uh%h:hj6 h&hh'Nh)Nubh, }(hj6 h&hh'Nh)Nubh;)}(h``CLIPBOARDUPDATE``h]hCLIPBOARDUPDATE}hjZ sbah}(h]h]h]h]h!]uh%h:hj6 h&hh'Nh)Nubh, }(hj6 h&hh'Nh)Nubh;)}(h``RENDER_TARGETS_RESET``h]hRENDER_TARGETS_RESET}hjl sbah}(h]h]h]h]h!]uh%h:hj6 h&hh'Nh)Nubh, }(hj6 h&hh'Nh)Nubh;)}(h``RENDER_DEVICE_RESET``h]hRENDER_DEVICE_RESET}hj~ sbah}(h]h]h]h]h!]uh%h:hj6 h&hh'Nh)Nubh and }(hj6 h&hh'Nh)Nubh;)}(h``LOCALECHANGED``h]h LOCALECHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj6 h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj2 h&hh'h]h)Kubah}(h]h]h]h]h!]j9 versionaddedj;2.1.3uh%jh&hh'h]h)Khh,ubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)Kubh)}(hSince pygame 2.0.1, there are a new set of events, called window events. Here is a list of all window events, along with a short descriptionh]hSince pygame 2.0.1, there are a new set of events, called window events. Here is a list of all window events, along with a short description}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hXEvent type Short description WINDOWSHOWN Window became shown WINDOWHIDDEN Window became hidden WINDOWEXPOSED Window got updated by some external event WINDOWMOVED Window got moved WINDOWRESIZED Window got resized WINDOWSIZECHANGED Window changed its size WINDOWMINIMIZED Window was minimized WINDOWMAXIMIZED Window was maximized WINDOWRESTORED Window was restored WINDOWENTER Mouse entered the window WINDOWLEAVE Mouse left the window WINDOWFOCUSGAINED Window gained focus WINDOWFOCUSLOST Window lost focus WINDOWCLOSE Window was closed WINDOWTAKEFOCUS Window was offered focus (SDL backend >= 2.0.5) WINDOWHITTEST Window has a special hit test (SDL backend >= 2.0.5) WINDOWICCPROFCHANGED Window ICC profile changed (SDL backend >= 2.0.18) WINDOWDISPLAYCHANGED Window moved on a new display (SDL backend >= 2.0.18)h]hXEvent type Short description WINDOWSHOWN Window became shown WINDOWHIDDEN Window became hidden WINDOWEXPOSED Window got updated by some external event WINDOWMOVED Window got moved WINDOWRESIZED Window got resized WINDOWSIZECHANGED Window changed its size WINDOWMINIMIZED Window was minimized WINDOWMAXIMIZED Window was maximized WINDOWRESTORED Window was restored WINDOWENTER Mouse entered the window WINDOWLEAVE Mouse left the window WINDOWFOCUSGAINED Window gained focus WINDOWFOCUSLOST Window lost focus WINDOWCLOSE Window was closed WINDOWTAKEFOCUS Window was offered focus (SDL backend >= 2.0.5) WINDOWHITTEST Window has a special hit test (SDL backend >= 2.0.5) WINDOWICCPROFCHANGED Window ICC profile changed (SDL backend >= 2.0.18) WINDOWDISPLAYCHANGED Window moved on a new display (SDL backend >= 2.0.18)}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khh,h&hubh)}(h``WINDOWMOVED``, ``WINDOWRESIZED`` and ``WINDOWSIZECHANGED`` have ``x`` and ``y`` attributes, ``WINDOWDISPLAYCHANGED`` has a ``display_index`` attribute. All windowevents have a ``window`` attribute.h](h;)}(h``WINDOWMOVED``h]h WINDOWMOVED}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``WINDOWRESIZED``h]h WINDOWRESIZED}hj sbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``WINDOWSIZECHANGED``h]hWINDOWSIZECHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj ubh have }hj sbh;)}(h``x``h]hx}hj sbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``y``h]hy}hj' sbah}(h]h]h]h]h!]uh%h:hj ubh attributes, }hj sbh;)}(h``WINDOWDISPLAYCHANGED``h]hWINDOWDISPLAYCHANGED}hj9 sbah}(h]h]h]h]h!]uh%h:hj ubh has a }hj sbh;)}(h``display_index``h]h display_index}hjK sbah}(h]h]h]h]h!]uh%h:hj ubh$ attribute. All windowevents have a }hj sbh;)}(h ``window``h]hwindow}hj] sbah}(h]h]h]h]h!]uh%h:hj ubh attribute.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hj} sbah}(h]h](jjkeh]h]h!]uh%hhjy ubah}(h]h]h]h]h!] translatableuh%hhju h&hh'h]h)Kubah}(h]h]h]h]h!]j9 versionaddedj;2.0.1uh%jh&hh'h]h)Khh,ubj)}(hBNew in pygame 2.1.3: WINDOWICCPROFCHANGED and WINDOWDISPLAYCHANGEDh]h)}(hBNew in pygame 2.1.3: WINDOWICCPROFCHANGED and WINDOWDISPLAYCHANGEDh](h)}(hNew in pygame 2.1.3: h]hNew in pygame 2.1.3: }hj sbah}(h]h](jjkeh]h]h!]uh%hhj h&hh'h]h)Kubh;)}(h``WINDOWICCPROFCHANGED``h]hWINDOWICCPROFCHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh and }(hj h&hh'Nh)Nubh;)}(h``WINDOWDISPLAYCHANGED``h]hWINDOWDISPLAYCHANGED}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j9 versionaddedj;2.1.3uh%jh&hh'h]h)Khh,ubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)Kubh)}(h1On Android, the following events can be generatedh]h1On Android, the following events can be generated}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj)}(hXEvent type Short description APP_TERMINATING OS is terminating the application APP_LOWMEMORY OS is low on memory, try to free memory if possible APP_WILLENTERBACKGROUND Application is entering background APP_DIDENTERBACKGROUND Application entered background APP_WILLENTERFOREGROUND Application is entering foreground APP_DIDENTERFOREGROUND Application entered foregroundh]hXEvent type Short description APP_TERMINATING OS is terminating the application APP_LOWMEMORY OS is low on memory, try to free memory if possible APP_WILLENTERBACKGROUND Application is entering background APP_DIDENTERBACKGROUND Application entered background APP_WILLENTERFOREGROUND Application is entering foreground APP_DIDENTERFOREGROUND Application entered foreground}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khh,h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj sbah}(h]h](jjkeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Mubah}(h]h]h]h]h!]j9 versionaddedj;2.1.3uh%jh&hh'h]h)Mhh,ubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj2 h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)Mubhe)}(hhh]h}(h]h]h]h]h!]entries](singlepump() (in module pygame.event)pygame.event.pumphNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hpumph](h desc_addname)}(h pygame.event.h]h pygame.event.}hj` sbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%j^ hjZ h&hh'h]h)Mubh desc_name)}(hj\ h]hpump}hjr sbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jp hjZ h&hh'h]h)Mubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjZ h&hh'h]h)Mubeh}(h]jQ ah](sig sig-objecteh]h]h!]modulehŌclasshfullnamej\ _toc_partshj\ _toc_namepump()uh%jX h'h]h)MhjU h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h.:sl:`internally process pygame event handlers`h]h)}(hj h]h(internally process pygame event handlers}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`pump() -> None`h]h)}(hj h]hpump() -> None}hj sbah}(h]h] signatureah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hX>For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call ``pygame.event.pump()`` to allow pygame to handle internal actions.h](hFor each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call }hj sbh;)}(h``pygame.event.pump()``h]hpygame.event.pump()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, to allow pygame to handle internal actions.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj h&hubh)}(hThis function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.event` functions.h](hpThis function is not necessary if your program is consistently processing events on the queue through the other }hj sbh6)}(h:mod:`pygame.event`h]h;)}(hj h]h pygame.event}hj sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemod refexplicitrefwarnhYhhZNh[ pygame.eventuh%h5h'h]h)Mhj ubh functions.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hXThere are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.h]hXThere are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.}hj+ sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh caution)}(hYThis function should only be called in the thread that initialized :mod:`pygame.display`.h]h)}(hj= h](hCThis function should only be called in the thread that initialized }hj? sbh6)}(h:mod:`pygame.display`h]h;)}(hjH h]hpygame.display}hjJ sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjF ubah}(h]h]h]h]h!]refdochS refdomainjT reftypemod refexplicitrefwarnhYhhZNh[pygame.displayuh%h5h'h]h)Mhj? ubh.}hj? sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj; ubah}(h]h]h]h]h!]uh%j9 h'h]h)Mhj h&hubh )}(h## pygame.event.pump ##h]h## pygame.event.pump ##}hjv sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjU h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj objtypej desctypej no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO get() (in module pygame.event)pygame.event.gethNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hgeth](j_ )}(h pygame.event.h]h pygame.event.}hj sbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hj h&hh'h]h)Mubjq )}(hj h]hget}hj sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hj h&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hj h&hh'h]h)Mubeh}(h]j ah](j j eh]h]h!]j hj hj j j hj j get()uh%jX h'h]h)Mhj h&hubj )}(hhh](hv)}(hhh](hz)}(h:sl:`get events from the queue`h]h)}(hj h]hget events from the queue}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M ubhz)}(h&:sg:`get(eventtype=None) -> Eventlist`h]h)}(hj h]h get(eventtype=None) -> Eventlist}hj sbah}(h]h]j ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M!ubhz)}(h1:sg:`get(eventtype=None, pump=True) -> Eventlist`h]h)}(hjh]h+get(eventtype=None, pump=True) -> Eventlist}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M"ubhz)}(h?:sg:`get(eventtype=None, pump=True, exclude=None) -> Eventlist`h]h)}(hj+h]h9get(eventtype=None, pump=True, exclude=None) -> Eventlist}hj-sbah}(h]h]j ah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M#ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M ubh)}(hThis will get all the messages and remove them from the queue. If a type or sequence of types is given only those messages will be removed from the queue and returned.h]hThis will get all the messages and remove them from the queue. If a type or sequence of types is given only those messages will be removed from the queue and returned.}hjFsbah}(h]h]h]h]h!]uh%hh'h]h)M%hj h&hubh)}(hIf a type or sequence of types is passed in the ``exclude`` argument instead, then all only *other* messages will be removed from the queue. If an ``exclude`` parameter is passed, the ``eventtype`` parameter *must* be None.h](h0If a type or sequence of types is passed in the }hjTsbh;)}(h ``exclude``h]hexclude}hj\sbah}(h]h]h]h]h!]uh%h:hjTubh! argument instead, then all only }hjTsbh emphasis)}(h*other*h]hother}hjpsbah}(h]h]h]h]h!]uh%jnhjTubh0 messages will be removed from the queue. If an }hjTsbh;)}(h ``exclude``h]hexclude}hjsbah}(h]h]h]h]h!]uh%h:hjTubh parameter is passed, the }hjTsbh;)}(h ``eventtype``h]h eventtype}hjsbah}(h]h]h]h]h!]uh%h:hjTubh parameter }hjTsbjo)}(h*must*h]hmust}hjsbah}(h]h]h]h]h!]uh%jnhjTubh be None.}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)M)hj h&hubh)}(hIf you are only taking specific events from the queue, be aware that the queue could eventually fill up with the events you are not interested.h]hIf you are only taking specific events from the queue, be aware that the queue could eventually fill up with the events you are not interested.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M.hj h&hubh)}(hWIf ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called.h](hIf }hjsbh;)}(h``pump``h]hpump}hjsbah}(h]h]h]h]h!]uh%h:hjubh is }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh (the default), then }hjsbh6)}(h:func:`pygame.event.pump()`h]h;)}(hjh]hpygame.event.pump()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.event.pumpuh%h5h'h]h)M1hjubh will be called.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M1hj h&hubj)}(h,Changed in pygame 1.9.5: Added pump argumenth]h)}(h,Changed in pygame 1.9.5: Added pump argumenth](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hj*sbah}(h]h](jjeh]h]h!]uh%hhj&h&hh'h]h)M3ubhAdded }(hj&h&hh'Nh)Nubh;)}(h``pump``h]hpump}hj<sbah}(h]h]h]h]h!]uh%h:hj&h&hh'Nh)Nubh argument}(hj&h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj"h&hh'h]h)M3ubah}(h]h]h]h]h!]j9versionchangedj;1.9.5uh%jh&hh'h]h)M3hj ubj)}(h/Changed in pygame 2.0.2: Added exclude argumenth]h)}(h/Changed in pygame 2.0.2: Added exclude argumenth](h)}(hChanged in pygame 2.0.2: h]hChanged in pygame 2.0.2: }hjesbah}(h]h](jjeh]h]h!]uh%hhjah&hh'h]h)M5ubhAdded }(hjah&hh'Nh)Nubh;)}(h ``exclude``h]hexclude}hjwsbah}(h]h]h]h]h!]uh%h:hjah&hh'Nh)Nubh argument}(hjah&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj]h&hh'h]h)M5ubah}(h]h]h]h]h!]j9versionchangedj;2.0.2uh%jh&hh'h]h)M4hj ubh )}(h## pygame.event.get ##h]h## pygame.event.get ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M6ubeh}(h]h]h]h]h!]uh%j hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO poll() (in module pygame.event)pygame.event.pollhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hpollh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)M8ubjq )}(hjh]hpoll}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)M8ubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)M8ubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj poll()uh%jX h'h]h)M8hjh&hubj )}(hhh](hv)}(hhh](hz)}(h':sl:`get a single event from the queue`h]h)}(hjh]h!get a single event from the queue}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M:ubhz)}(h:sg:`poll() -> Event instance`h]h)}(hjh]hpoll() -> Event instance}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M;ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M:ubh)}(hReturns a single event from the queue. If the event queue is empty an event of type ``pygame.NOEVENT`` will be returned immediately. The returned event is removed from the queue.h](hTReturns a single event from the queue. If the event queue is empty an event of type }hj0sbh;)}(h``pygame.NOEVENT``h]hpygame.NOEVENT}hj8sbah}(h]h]h]h]h!]uh%h:hj0ubhL will be returned immediately. The returned event is removed from the queue.}hj0sbeh}(h]h]h]h]h!]uh%hh'h]h)M=hjh&hubj: )}(hYThis function should only be called in the thread that initialized :mod:`pygame.display`.h]h)}(hjRh](hCThis function should only be called in the thread that initialized }hjTsbh6)}(h:mod:`pygame.display`h]h;)}(hj]h]hpygame.display}hj_sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj[ubah}(h]h]h]h]h!]refdochS refdomainjireftypemod refexplicitrefwarnhYhhZNh[pygame.displayuh%h5h'h]h)MBhjTubh.}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)MBhjPubah}(h]h]h]h]h!]uh%j9 h'h]h)MAhjh&hubh )}(h## pygame.event.poll ##h]h## pygame.event.poll ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MDubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO wait() (in module pygame.event)pygame.event.waithNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hwaith](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)MFubjq )}(hjh]hwait}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)MFubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)MFubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj wait()uh%jX h'h]h)MFhjh&hubj )}(hhh](hv)}(hhh](hz)}(h,:sl:`wait for a single event from the queue`h]h)}(hjh]h&wait for a single event from the queue}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MHubhz)}(h:sg:`wait() -> Event instance`h]h)}(hjh]hwait() -> Event instance}hj sbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MIubhz)}(h%:sg:`wait(timeout) -> Event instance`h]h)}(hjh]hwait(timeout) -> Event instance}hj!sbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MJubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MHubh)}(hXReturns a single event from the queue. If the queue is empty this function will wait until one is created. From pygame 2.0.0, if a ``timeout`` argument is given, the function will return an event of type ``pygame.NOEVENT`` if no events enter the queue in ``timeout`` milliseconds. The event is removed from the queue once it has been returned. While the program is waiting it will sleep in an idle state. This is important for programs that want to share the system with other applications.h](hReturns a single event from the queue. If the queue is empty this function will wait until one is created. From pygame 2.0.0, if a }hj:sbh;)}(h ``timeout``h]htimeout}hjBsbah}(h]h]h]h]h!]uh%h:hj:ubh> argument is given, the function will return an event of type }hj:sbh;)}(h``pygame.NOEVENT``h]hpygame.NOEVENT}hjTsbah}(h]h]h]h]h!]uh%h:hj:ubh! if no events enter the queue in }hj:sbh;)}(h ``timeout``h]htimeout}hjfsbah}(h]h]h]h]h!]uh%h:hj:ubh milliseconds. The event is removed from the queue once it has been returned. While the program is waiting it will sleep in an idle state. This is important for programs that want to share the system with other applications.}hj:sbeh}(h]h]h]h]h!]uh%hh'h]h)MLhjh&hubj)}(h5Changed in pygame 2.0.0.dev13: Added timeout argumenth]h)}(h5Changed in pygame 2.0.0.dev13: Added timeout argumenth](h)}(hChanged in pygame 2.0.0.dev13: h]hChanged in pygame 2.0.0.dev13: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)MUubhAdded }(hjh&hh'Nh)Nubh;)}(h ``timeout``h]htimeout}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj~h&hh'h]h)MUubah}(h]h]h]h]h!]j9versionchangedj; 2.0.0.dev13uh%jh&hh'h]h)MThjubj: )}(hYThis function should only be called in the thread that initialized :mod:`pygame.display`.h]h)}(hjh](hCThis function should only be called in the thread that initialized }hjsbh6)}(h:mod:`pygame.display`h]h;)}(hjh]hpygame.display}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZNh[pygame.displayuh%h5h'h]h)MWhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MWhjubah}(h]h]h]h]h!]uh%j9 h'h]h)MVhjh&hubh )}(h## pygame.event.wait ##h]h## pygame.event.wait ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MYubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j j j j j j j j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO peek() (in module pygame.event)pygame.event.peekhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hpeekh](j_ )}(h pygame.event.h]h pygame.event.}hj%sbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hj!h&hh'h]h)M[ubjq )}(hj#h]hpeek}hj3sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hj!h&hh'h]h)M[ubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hj!h&hh'h]h)M[ubeh}(h]jah](j j eh]h]h!]j hj hj j#j hj#j peek()uh%jX h'h]h)M[hjh&hubj )}(hhh](hv)}(hhh](hz)}(h2:sl:`test if event types are waiting on the queue`h]h)}(hjZh]h,test if event types are waiting on the queue}hj\sbah}(h]h]hah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhjUh&hh'h]h)M]ubhz)}(h":sg:`peek(eventtype=None) -> bool`h]h)}(hjqh]hpeek(eventtype=None) -> bool}hjssbah}(h]h]j ah]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%h)hKhjUh&hh'h]h)M^ubhz)}(h-:sg:`peek(eventtype=None, pump=True) -> bool`h]h)}(hjh]h'peek(eventtype=None, pump=True) -> bool}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjUh&hh'h]h)M_ubeh}(h]h]h]h]h!]uh%huhjRh&hh'h]h)M]ubh)}(hReturns ``True`` if there are any events of the given type waiting on the queue. If a sequence of event types is passed, this will return ``True`` if any of those events are on the queue.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubhz if there are any events of the given type waiting on the queue. If a sequence of event types is passed, this will return }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh) if any of those events are on the queue.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MahjRh&hubh)}(hWIf ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called.h](hIf }hjsbh;)}(h``pump``h]hpump}hjsbah}(h]h]h]h]h!]uh%h:hjubh is }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh (the default), then }hjsbh6)}(h:func:`pygame.event.pump()`h]h;)}(hjh]hpygame.event.pump()}hjsbah}(h]h](hFpyxpy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.event.pumpuh%h5h'h]h)Mehjubh will be called.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MehjRh&hubj)}(h,Changed in pygame 1.9.5: Added pump argumenth]h)}(h,Changed in pygame 1.9.5: Added pump argumenth](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hj3sbah}(h]h](jjeh]h]h!]uh%hhj/h&hh'h]h)MhubhAdded }(hj/h&hh'Nh)Nubh;)}(h``pump``h]hpump}hjEsbah}(h]h]h]h]h!]uh%h:hj/h&hh'Nh)Nubh argument}(hj/h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj+h&hh'h]h)Mhubah}(h]h]h]h]h!]j9versionchangedj;1.9.5uh%jh&hh'h]h)MghjRubh )}(h## pygame.event.peek ##h]h## pygame.event.peek ##}hjfsbah}(h]h]h]h]h!]h#h$uh%h hjRh&hh'h]h)Miubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j j}j j~j j~j j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO clear() (in module pygame.event)pygame.event.clearhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hclearh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mkubjq )}(hjh]hclear}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mkubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mkubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj clear()uh%jX h'h]h)Mkhjh&hubj )}(hhh](hv)}(hhh](hz)}(h&:sl:`remove all events from the queue`h]h)}(hjh]h remove all events from the queue}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mmubhz)}(h#:sg:`clear(eventtype=None) -> None`h]h)}(hjh]hclear(eventtype=None) -> None}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mnubhz)}(h.:sg:`clear(eventtype=None, pump=True) -> None`h]h)}(hjh]h(clear(eventtype=None, pump=True) -> None}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Moubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mmubh)}(hXRemoves all events from the queue. If ``eventtype`` is given, removes the given event or sequence of events. This has the same effect as :func:`pygame.event.get()` except ``None`` is returned. It can be slightly more efficient when clearing a full event queue.h](h&Removes all events from the queue. If }hjsbh;)}(h ``eventtype``h]h eventtype}hjsbah}(h]h]h]h]h!]uh%h:hjubhV is given, removes the given event or sequence of events. This has the same effect as }hjsbh6)}(h:func:`pygame.event.get()`h]h;)}(hj1h]hpygame.event.get()}hj3sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj/ubah}(h]h]h]h]h!]refdochS refdomainj=reftypefunc refexplicitrefwarnhYhhZNh[pygame.event.getuh%h5h'h]h)Mqhjubh except }hjsbh;)}(h``None``h]hNone}hjSsbah}(h]h]h]h]h!]uh%h:hjubhQ is returned. It can be slightly more efficient when clearing a full event queue.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mqhjh&hubh)}(hWIf ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called.h](hIf }hjksbh;)}(h``pump``h]hpump}hjssbah}(h]h]h]h]h!]uh%h:hjkubh is }hjksbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjkubh (the default), then }hjksbh6)}(h:func:`pygame.event.pump()`h]h;)}(hjh]hpygame.event.pump()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.event.pumpuh%h5h'h]h)Muhjkubh will be called.}hjksbeh}(h]h]h]h]h!]uh%hh'h]h)Muhjh&hubj)}(h,Changed in pygame 1.9.5: Added pump argumenth]h)}(h,Changed in pygame 1.9.5: Added pump argumenth](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)MxubhAdded }(hjh&hh'Nh)Nubh;)}(h``pump``h]hpump}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mxubah}(h]h]h]h]h!]j9versionchangedj;1.9.5uh%jh&hh'h]h)Mwhjubh )}(h## pygame.event.clear ##h]h## pygame.event.clear ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Myubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO %event_name() (in module pygame.event)pygame.event.event_namehNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(h event_nameh](j_ )}(h pygame.event.h]h pygame.event.}hj-sbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hj)h&hh'h]h)M{ubjq )}(hj+h]h event_name}hj;sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hj)h&hh'h]h)M{ubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hj)h&hh'h]h)M{ubeh}(h]j$ah](j j eh]h]h!]j hj hj j+j hj+j event_name()uh%jX h'h]h)M{hj&h&hubj )}(hhh](hv)}(hhh](hz)}(h*:sl:`get the string name from an event id`h]h)}(hjbh]h$get the string name from an event id}hjdsbah}(h]h]hah]h]h!]uh%hhj`ubah}(h]h]h]h]h!]uh%h)hKhj]h&hh'h]h)M}ubhz)}(h :sg:`event_name(type) -> string`h]h)}(hjyh]hevent_name(type) -> string}hj{sbah}(h]h]j ah]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%h)hKhj]h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%huhjZh&hh'h]h)M}ubh)}(hSReturns a string representing the name (in CapWords style) of the given event type.h]hSReturns a string representing the name (in CapWords style) of the given event type.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjZh&hubh)}(h|"UserEvent" is returned for all values in the user event id range. "Unknown" is returned when the event type does not exist.h]h|"UserEvent" is returned for all values in the user event id range. "Unknown" is returned when the event type does not exist.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjZh&hubj)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]h)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Mubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j9versionchangedj;2.5.0uh%jh&hh'h]h)MhjZubh )}(h## pygame.event.event_name ##h]h## pygame.event.event_name ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjZh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hj&h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO &set_blocked() (in module pygame.event)pygame.event.set_blockedhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(h set_blockedh](j_ )}(h pygame.event.h]h pygame.event.}hj sbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]h set_blocked}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj set_blocked()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h3:sl:`control which events are allowed on the queue`h]h)}(hj?h]h-control which events are allowed on the queue}hjAsbah}(h]h]hah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubhz)}(h:sg:`set_blocked(type) -> None`h]h)}(hjVh]hset_blocked(type) -> None}hjXsbah}(h]h]j ah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubhz)}(h#:sg:`set_blocked(typelist) -> None`h]h)}(hjmh]hset_blocked(typelist) -> None}hjosbah}(h]h]j ah]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubhz)}(h:sg:`set_blocked(None) -> None`h]h)}(hjh]hset_blocked(None) -> None}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj7h&hh'h]h)Mubh)}(hThe given event types are not allowed to appear on the event queue. By default all events can be placed on the queue. It is safe to disable an event type multiple times.h]hThe given event types are not allowed to appear on the event queue. By default all events can be placed on the queue. It is safe to disable an event type multiple times.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7h&hubh)}(hiIf ``None`` is passed as the argument, ALL of the event types are blocked from being placed on the queue.h](hIf }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh^ is passed as the argument, ALL of the event types are blocked from being placed on the queue.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj7h&hubh )}(h## pygame.event.set_blocked ##h]h## pygame.event.set_blocked ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj7h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO &set_allowed() (in module pygame.event)pygame.event.set_allowedhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(h set_allowedh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]h set_allowed}hj sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj set_allowed()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h3:sl:`control which events are allowed on the queue`h]h)}(hj3h]h-control which events are allowed on the queue}hj5sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubhz)}(h:sg:`set_allowed(type) -> None`h]h)}(hjJh]hset_allowed(type) -> None}hjLsbah}(h]h]j ah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubhz)}(h#:sg:`set_allowed(typelist) -> None`h]h)}(hjah]hset_allowed(typelist) -> None}hjcsbah}(h]h]j ah]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubhz)}(h:sg:`set_allowed(None) -> None`h]h)}(hjxh]hset_allowed(None) -> None}hjzsbah}(h]h]j ah]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj+h&hh'h]h)Mubh)}(hThe given event types are allowed to appear on the event queue. By default, all event types can be placed on the queue. It is safe to enable an event type multiple times.h]hThe given event types are allowed to appear on the event queue. By default, all event types can be placed on the queue. It is safe to enable an event type multiple times.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj+h&hubh)}(hdIf ``None`` is passed as the argument, ALL of the event types are allowed to be placed on the queue.h](hIf }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubhY is passed as the argument, ALL of the event types are allowed to be placed on the queue.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj+h&hubh )}(h## pygame.event.set_allowed ##h]h## pygame.event.set_allowed ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO &get_blocked() (in module pygame.event)pygame.event.get_blockedhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(h get_blockedh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]h get_blocked}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj get_blocked()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h7:sl:`test if a type of event is blocked from the queue`h]h)}(hj'h]h1test if a type of event is blocked from the queue}hj)sbah}(h]h]hah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubhz)}(h:sg:`get_blocked(type) -> bool`h]h)}(hj>h]hget_blocked(type) -> bool}hj@sbah}(h]h]j ah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubhz)}(h#:sg:`get_blocked(typelist) -> bool`h]h)}(hjUh]hget_blocked(typelist) -> bool}hjWsbah}(h]h]j ah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturns ``True`` if the given event type is blocked from the queue. If a sequence of event types is passed, this will return ``True`` if any of those event types are blocked.h](hReturns }hjpsbh;)}(h``True``h]hTrue}hjxsbah}(h]h]h]h]h!]uh%h:hjpubhm if the given event type is blocked from the queue. If a sequence of event types is passed, this will return }hjpsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjpubh) if any of those event types are blocked.}hjpsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.event.get_blocked ##h]h## pygame.event.get_blocked ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO #set_grab() (in module pygame.event)pygame.event.set_grabhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hset_grabh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]hset_grab}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj set_grab()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(hB:sl:`control the sharing of input devices with other applications`h]h)}(hjh]h None`h]h)}(hjh]hset_grab(bool) -> None}hj!sbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hWhen your program runs in a windowed environment, it will share the mouse and keyboard devices with other applications that have focus. If your program sets the event grab to ``True``, it will lock all input into your program.h](hWhen your program runs in a windowed environment, it will share the mouse and keyboard devices with other applications that have focus. If your program sets the event grab to }hj:sbh;)}(h``True``h]hTrue}hjBsbah}(h]h]h]h]h!]uh%h:hj:ubh+, it will lock all input into your program.}hj:sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hlIt is best to not always grab the input, since it prevents the user from doing other things on their system.h]hlIt is best to not always grab the input, since it prevents the user from doing other things on their system.}hjZsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.event.set_grab ##h]h## pygame.event.set_grab ##}hjhsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO #get_grab() (in module pygame.event)pygame.event.get_grabhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hget_grabh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]hget_grab}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj get_grab()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h2:sl:`test if the program is sharing input devices`h]h)}(hjh]h,test if the program is sharing input devices}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_grab() -> bool`h]h)}(hjh]hget_grab() -> bool}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hHReturns ``True`` when the input events are grabbed for this application.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh8 when the input events are grabbed for this application.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.event.get_grab ##h]h## pygame.event.get_grab ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j j7j j8j j8j j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO ,set_keyboard_grab() (in module pygame.event)pygame.event.set_keyboard_grabhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hset_keyboard_grabh](j_ )}(h pygame.event.h]h pygame.event.}hjQsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjMh&hh'h]h)Mubjq )}(hjOh]hset_keyboard_grab}hj_sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjMh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjMh&hh'h]h)Mubeh}(h]jHah](j j eh]h]h!]j hj hj jOj hjOj set_keyboard_grab()uh%jX h'h]h)MhjJh&hubj )}(hhh](hv)}(hhh](hz)}(h[:sl:`grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.`h]h)}(hjh]hUgrab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h%:sg:`set_keyboard_grab(bool) -> None`h]h)}(hjh]hset_keyboard_grab(bool) -> None}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj~h&hh'h]h)Mubh)}(hX\Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows). This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab.h]hX\Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows). This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj~h&hubj)}(hNew in pygame 2.5.0.h]h)}(hNew in pygame 2.5.0.h]h)}(hNew in pygame 2.5.0.h]hNew in pygame 2.5.0.}hjsbah}(h]h](jjkeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j9 versionaddedj;2.5.0uh%jh&hh'h]h)Mhj~ubh )}(h$## pygame.event.set_keyboard_grab ##h]h$## pygame.event.set_keyboard_grab ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj~h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjJh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO ,get_keyboard_grab() (in module pygame.event)pygame.event.get_keyboard_grabhNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hget_keyboard_grabh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]hget_keyboard_grab}hj*sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj get_keyboard_grab()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h):sl:`get the current keyboard grab state`h]h)}(hjQh]h#get the current keyboard grab state}hjSsbah}(h]h]hah]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mubhz)}(h!:sg:`get_keyboard_grab() -> bool`h]h)}(hjhh]hget_keyboard_grab() -> bool}hjjsbah}(h]h]j ah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjIh&hh'h]h)Mubh)}(h/Returns ``True`` when keyboard grab is enabled.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh when keyboard grab is enabled.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjIh&hubj)}(hNew in pygame 2.5.0.h]h)}(hNew in pygame 2.5.0.h]h)}(hNew in pygame 2.5.0.h]hNew in pygame 2.5.0.}hjsbah}(h]h](jjkeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j9 versionaddedj;2.5.0uh%jh&hh'h]h)MhjIubh )}(h$## pygame.event.get_keyboard_grab ##h]h$## pygame.event.get_keyboard_grab ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjIh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO post() (in module pygame.event)pygame.event.posthNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(hposth](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]hpost}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj post()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h$:sl:`place a new event on the queue`h]h)}(hj.h]hplace a new event on the queue}hj0sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mubhz)}(h:sg:`post(Event) -> bool`h]h)}(hjEh]hpost(Event) -> bool}hjGsbah}(h]h]j ah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)Mubh)}(h5Places the given event at the end of the event queue.h]h5Places the given event at the end of the event queue.}hj`sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubh)}(hThis is usually used for placing custom events on the event queue. Any type of event can be posted, and the events posted can have any attributes.h]hThis is usually used for placing custom events on the event queue. Any type of event can be posted, and the events posted can have any attributes.}hjnsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubh)}(hThis returns a boolean on whether the event was posted or not. Blocked events cannot be posted, and this function returns ``False`` if you try to post them.h](hzThis returns a boolean on whether the event was posted or not. Blocked events cannot be posted, and this function returns }hj|sbh;)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh if you try to post them.}hj|sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubj)}(hDChanged in pygame 2.0.1: returns a boolean, previously returned Noneh]h)}(hDChanged in pygame 2.0.1: returns a boolean, previously returned Noneh](h)}(hChanged in pygame 2.0.1: h]hChanged in pygame 2.0.1: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Mubh'returns a boolean, previously returned }(hjh&hh'Nh)Nubh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j9versionchangedj;2.0.1uh%jh&hh'h]h)Mhj&ubh )}(h## pygame.event.post ##h]h## pygame.event.post ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j jj jj jj j j j j j j uh%jS h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO &custom_type() (in module pygame.event)pygame.event.custom_typehNtauh%hdhh,h&hh'Nh)NubjT )}(hhh](jY )}(h custom_typeh](j_ )}(h pygame.event.h]h pygame.event.}hjsbah}(h]h](jk jl eh]h]h!]h#h$uh%j^ hjh&hh'h]h)Mubjq )}(hjh]h custom_type}hjsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjh&hh'h]h)Mubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Mubeh}(h]jah](j j eh]h]h!]j hj hj jj hjj custom_type()uh%jX h'h]h)Mhjh&hubj )}(hhh](hv)}(hhh](hz)}(h!:sl:`make custom user event type`h]h)}(hj9h]hmake custom user event type}hj;sbah}(h]h]hah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubhz)}(h:sg:`custom_type() -> int`h]h)}(hjPh]hcustom_type() -> int}hjRsbah}(h]h]j ah]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj1h&hh'h]h)Mubh)}(h1Reserves a ``pygame.USEREVENT`` for a custom use.h](h Reserves a }hjksbh;)}(h``pygame.USEREVENT``h]hpygame.USEREVENT}hjssbah}(h]h]h]h]h!]uh%h:hjkubh for a custom use.}hjksbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj1h&hubh)}(h Event`h]h)}(hjTh]hEvent(type, dict) -> Event}hjVsbah}(h]h]j ah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)Mubhz)}(h):sg:`Event(type, \**attributes) -> Event`h]h)}(h):sg:`Event(type, \**attributes) -> Event`h]h#Event(type, **attributes) -> Event}hjmsbah}(h]h]j ah]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj5h&hh'h]h)Mubh)}(hnA pygame object used for representing an event. ``Event`` instances support attribute assignment and deletion.h](h0A pygame object used for representing an event. }hjsbh;)}(h ``Event``h]hEvent}hjsbah}(h]h]h]h]h!]uh%h:hjubh5 instances support attribute assignment and deletion.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M hj5h&hubh)}(hxWhen creating the object, the attributes may come from a dictionary argument with string keys or from keyword arguments.h]hxWhen creating the object, the attributes may come from a dictionary argument with string keys or from keyword arguments.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hj5h&hubh note)}(hXFrom version 2.1.3 ``EventType`` is an alias for ``Event``. Beforehand, ``Event`` was a function that returned ``EventType`` instances. Use of ``Event`` is preferred over ``EventType`` wherever it is possible, as the latter could be deprecated in a future version.h]h)}(hXFrom version 2.1.3 ``EventType`` is an alias for ``Event``. Beforehand, ``Event`` was a function that returned ``EventType`` instances. Use of ``Event`` is preferred over ``EventType`` wherever it is possible, as the latter could be deprecated in a future version.h](hFrom version 2.1.3 }hjsbh;)}(h ``EventType``h]h EventType}hjsbah}(h]h]h]h]h!]uh%h:hjubh is an alias for }hjsbh;)}(h ``Event``h]hEvent}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Beforehand, }hjsbh;)}(h ``Event``h]hEvent}hjsbah}(h]h]h]h]h!]uh%h:hjubh was a function that returned }hjsbh;)}(h ``EventType``h]h EventType}hjsbah}(h]h]h]h]h!]uh%h:hjubh instances. Use of }hjsbh;)}(h ``Event``h]hEvent}hj sbah}(h]h]h]h]h!]uh%h:hjubh is preferred over }hjsbh;)}(h ``EventType``h]h EventType}hjsbah}(h]h]h]h]h!]uh%h:hjubhP wherever it is possible, as the latter could be deprecated in a future version.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jh'h]h)Mhj5h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](jO #type (pygame.event.Event attribute)pygame.event.Event.typehNtauh%hdhj5h&hh'Nh)NubjT )}(hhh](jY )}(htypeh]jq )}(hjNh]htype}hjPsbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjLh&hh'h]h)Mubah}(h]jGah](j j eh]h]h!]j hj jj Event.typej hŌEventtypej jcuh%jX h'h]h)MhjIh&hubj )}(hhh](hv)}(hhh](hz)}(h:sl:`event type identifier.`h]h)}(hjoh]hevent type identifier.}hjqsbah}(h]h]hah]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%h)hKhjjh&hh'h]h)Mubhz)}(h:sg:`type -> int`h]h)}(hjh]h type -> int}hjsbah}(h]h]j ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjgh&hh'h]h)Mubh)}(hRead-only. The event type identifier. For user created event objects, this is the ``type`` argument passed to :func:`pygame.event.Event()`.h](hRRead-only. The event type identifier. For user created event objects, this is the }hjsbh;)}(h``type``h]htype}hjsbah}(h]h]h]h]h!]uh%h:hjubh argument passed to }hjsbh6)}(h:func:`pygame.event.Event()`h]h;)}(hjh]hpygame.event.Event()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZjh[pygame.event.Eventuh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjgh&hubh)}(hPFor example, some predefined event identifiers are ``QUIT`` and ``MOUSEMOTION``.h](h3For example, some predefined event identifiers are }hjsbh;)}(h``QUIT``h]hQUIT}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``MOUSEMOTION``h]h MOUSEMOTION}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjgh&hubh )}(h## pygame.event.Event.type ##h]h## pygame.event.Event.type ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjgh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%j hjIh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j j. j j/ j j/ j j j j j j j uh%jS h&hhj5h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jO '__dict__ (pygame.event.Event attribute)pygame.event.Event.__dict__hNtauh%hdhj5h&hh'Nh)NubjT )}(hhh](jY )}(h__dict__h]jq )}(hjF h]h__dict__}hjH sbah}(h]h](j| j} eh]h]h!]h#h$uh%jp hjD h&hh'h]h)M$ubah}(h]j? ah](j j eh]h]h!]j hj jj Event.__dict__j hŌEvent__dict__j j[ uh%jX h'h]h)M$hjA h&hubj )}(hhh](hv)}(hhh](hz)}(h :sl:`event attribute dictionary`h]h)}(hjg h]hevent attribute dictionary}hji sbah}(h]h]hah]h]h!]uh%hhje ubah}(h]h]h]h]h!]uh%h)hKhjb h&hh'h]h)M&ubhz)}(h:sg:`__dict__ -> dict`h]h)}(hj~ h]h__dict__ -> dict}hj sbah}(h]h]j ah]h]h!]uh%hhj| ubah}(h]h]h]h]h!]uh%h)hKhjb h&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%huhj_ h&hh'h]h)M&ubh)}(hzRead-only. The event type specific attributes of an event. The ``dict`` attribute is a synonym for backward compatibility.h](h?Read-only. The event type specific attributes of an event. The }hj sbh;)}(h``dict``h]hdict}hj sbah}(h]h]h]h]h!]uh%h:hj ubh3 attribute is a synonym for backward compatibility.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M)hj_ h&hubh)}(h]For example, the attributes of a ``KEYDOWN`` event would be ``unicode``, ``key``, and ``mod``h](h!For example, the attributes of a }hj sbh;)}(h ``KEYDOWN``h]hKEYDOWN}hj sbah}(h]h]h]h]h!]uh%h:hj ubh event would be }hj sbh;)}(h ``unicode``h]hunicode}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``key``h]hkey}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, and }hj sbh;)}(h``mod``h]hmod}hj sbah}(h]h]h]h]h!]uh%h:hj ubeh}(h]h]h]h]h!]uh%hh'h]h)M,hj_ h&hubh )}(h!## pygame.event.Event.__dict__ ##h]h!## pygame.event.Event.__dict__ ##}hj !sbah}(h]h]h]h]h!]h#h$uh%h hj_ h&hh'h]h)M/ubeh}(h]h]h]h]h!]uh%j hjA h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j j"!j j#!j j#!j j j j j j j uh%jS h&hhj5h'Nh)Nubj)}(h(New in pygame 1.9.2: Mutable attributes.h]h)}(h(New in pygame 1.9.2: Mutable attributes.h](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hj/!sbah}(h]h](jjkeh]h]h!]uh%hhj+!h&hh'h]h)M2ubhMutable attributes.}(hj+!h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj'!h&hh'h]h)M2ubah}(h]h]h]h]h!]j9 versionaddedj;1.9.2uh%jh&hh'h]h)M1hj5ubh )}(h## pygame.event.Event ##h]h## pygame.event.Event ##}hjP!sbah}(h]h]h]h]h!]h#h$uh%h hj5h&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%j hj h&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j jg!j jh!j jh!j j j j j j j uh%jS h&hhh,h'Nh)Nubh )}(h## pygame.event ##h]h## pygame.event ##}hjl!sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M5ubeh}(h](hs pygame-eventeh]h] pygame.eventah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj!error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j!j|!s nametypes}j!sh}(j|!h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j!h'h]h)Khh,h&hubjQ jZ j j jjjjjj!jjj$j)jjjjjjjjjjjHjMjjjjjjj jjGjLj? jD u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/event.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.679141 pygame-2.6.1/docs/generated/doctrees/ref/examples.doctree0000644000175100001770000022132114676242417023064 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.examples`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.examples}hh h]h }hhsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khh,h&hubh)}(heg:h]heg:}hhsbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h1python -m pygame.examples.scaletest someimage.pngh]h1python -m pygame.examples.scaletest someimage.png}hhsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khh,h&hubh)}(hhResources such as images and sounds for the examples are found in the pygame/examples/data subdirectory.h]hhResources such as images and sounds for the examples are found in the pygame/examples/data subdirectory.}hhsbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hqYou can find where the example files are installed by using the following commands inside the python interpreter.h]hqYou can find where the example files are installed by using the following commands inside the python interpreter.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K hh,h&hubh)}(h>>> import pygame.examples.scaletest >>> pygame.examples.scaletest.__file__ '/usr/lib/python2.6/site-packages/pygame/examples/scaletest.py'h]h>>> import pygame.examples.scaletest >>> pygame.examples.scaletest.__file__ '/usr/lib/python2.6/site-packages/pygame/examples/scaletest.py'}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)K%hh,h&hubh)}(hXOn each OS and version of Python the location will be slightly different. For example on Windows it might be in 'C:/Python26/Lib/site-packages/pygame/examples/' On Mac OS X it might be in '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/examples/'h]hXOn each OS and version of Python the location will be slightly different. For example on Windows it might be in 'C:/Python26/Lib/site-packages/pygame/examples/' On Mac OS X it might be in '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/examples/'}hj"sbah}(h]h]h]h]h!]uh%hh'h]h)K)hh,h&hubh)}(h`You can also run the examples in the python interpreter by calling each modules main() function.h]h`You can also run the examples in the python interpreter by calling each modules main() function.}hj0sbah}(h]h]h]h]h!]uh%hh'h]h)K.hh,h&hubh)}(hI>>> import pygame.examples.scaletest >>> pygame.examples.scaletest.main()h]hI>>> import pygame.examples.scaletest >>> pygame.examples.scaletest.main()}hj>sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)K2hh,h&hubh)}(hWe're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming.h]hWe're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming.}hjLsbah}(h]h]h]h]h!]uh%hh'h]h)K6hh,h&hubh)}(heexamples as a package is new to pygame 1.9.0. But most of the examples came with pygame much earlier.h]heexamples as a package is new to pygame 1.9.0. But most of the examples came with pygame much earlier.}hjZsbah}(h]h]h]h]h!]uh%hh'h]h)K:hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single)aliens.main() (in module pygame.examples)pygame.examples.aliens.mainhNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(h aliens.mainh](h desc_addname)}(haliens.h]haliens.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhj~h&hh'h]h)K=ubh desc_name)}(hmainh]hmain}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhj~h&hh'h]h)K=ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj~h&hh'h]h)K=ubeh}(h]juah](sig sig-objecteh]h]h!]modulepygame.examplesclassaliensfullname aliens.main _toc_partsjaliensmain _toc_name aliens.main()uh%j|h'h]h)K=hjyh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h":sl:`play the full aliens example`h]h)}(hjh]hplay the full aliens example}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K?ubhz)}(h:sg:`aliens.main() -> None`h]h)}(hjh]haliens.main() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K?ubh)}(hX3This started off as a port of the ``SDL`` demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck)h](h"This started off as a port of the }hjsbh;)}(h``SDL``h]hSDL}hj sbah}(h]h]h]h]h!]uh%h:hjubhX  demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck)}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjh&hubh )}(h!## pygame.examples.aliens.main ##h]h!## pygame.examples.aliens.main ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KHubeh}(h]h]h]h]h!]uh%jhjyh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj:objtypej;desctypej;no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(stars.main() (in module pygame.examples)pygame.examples.stars.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h stars.mainh](j)}(hstars.h]hstars.}hj^sbah}(h]h](jjeh]h]h!]h#h$uh%jhjZh&hh'h]h)KJubj)}(hmainh]hmain}hjlsbah}(h]h](jjeh]h]h!]h#h$uh%jhjZh&hh'h]h)KJubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjZh&hh'h]h)KJubeh}(h]jUah](jjeh]h]h!]jjjstarsj stars.mainjjstarsmainj stars.main()uh%j|h'h]h)KJhjWh&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`run a simple starfield example`h]h)}(hjh]hrun a simple starfield example}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KLubhz)}(h:sg:`stars.main() -> None`h]h)}(hjh]hstars.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KMubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KLubh)}(hmA simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen.h]hmA simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubh )}(h ## pygame.examples.stars.main ##h]h ## pygame.examples.stars.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KRubeh}(h]h]h]h]h!]uh%jhjWh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(chimp.main() (in module pygame.examples)pygame.examples.chimp.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h chimp.mainh](j)}(hchimp.h]hchimp.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KTubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KTubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KTubeh}(h]jah](jjeh]h]h!]jjjchimpj chimp.mainjjchimpmainj chimp.main()uh%j|h'h]h)KThjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`hit the moving chimp`h]h)}(hjCh]hhit the moving chimp}hjEsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)KVubhz)}(h:sg:`chimp.main() -> None`h]h)}(hjZh]hchimp.main() -> None}hj\sbah}(h]h]jah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)KWubeh}(h]h]h]h]h!]uh%huhj;h&hh'h]h)KVubh)}(hThis simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial.h]hThis simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial.}hjusbah}(h]h]h]h]h!]uh%hh'h]h)KYhj;h&hubh )}(h ## pygame.examples.chimp.main ##h]h ## pygame.examples.chimp.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj;h&hh'h]h)K]ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)moveit.main() (in module pygame.examples)pygame.examples.moveit.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h moveit.mainh](j)}(hmoveit.h]hmoveit.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K_ubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K_ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K_ubeh}(h]jah](jjeh]h]h!]jjjmoveitj moveit.mainjjmoveitmainj moveit.main()uh%j|h'h]h)K_hjh&hubj)}(hhh](hv)}(hhh](hz)}(h,:sl:`display animated objects on the screen`h]h)}(hjh]h&display animated objects on the screen}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kaubhz)}(h:sg:`moveit.main() -> None`h]h)}(hjh]hmoveit.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kaubh)}(hThis is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen.h]hThis is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kdhjh&hubh)}(hNote it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes.h]hNote it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)Kghjh&hubh )}(h!## pygame.examples.moveit.main ##h]h!## pygame.examples.moveit.main ##}hj<sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jSj@jTjAjTjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(fonty.main() (in module pygame.examples)pygame.examples.fonty.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h fonty.mainh](j)}(hfonty.h]hfonty.}hjmsbah}(h]h](jjeh]h]h!]h#h$uh%jhjih&hh'h]h)Kmubj)}(hmainh]hmain}hj{sbah}(h]h](jjeh]h]h!]h#h$uh%jhjih&hh'h]h)Kmubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjih&hh'h]h)Kmubeh}(h]jdah](jjeh]h]h!]jjjfontyj fonty.mainjjfontymainj fonty.main()uh%j|h'h]h)Kmhjfh&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`run a font rendering example`h]h)}(hjh]hrun a font rendering example}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Koubhz)}(h:sg:`fonty.main() -> None`h]h)}(hjh]hfonty.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kpubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Koubh)}(hkSuper quick, super simple application demonstrating the different ways to render fonts with the font moduleh]hkSuper quick, super simple application demonstrating the different ways to render fonts with the font module}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Krhjh&hubh )}(h ## pygame.examples.fonty.main ##h]h ## pygame.examples.fonty.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kuubeh}(h]h]h]h]h!]uh%jhjfh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js0freetype_misc.main() (in module pygame.examples)"pygame.examples.freetype_misc.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hfreetype_misc.mainh](j)}(hfreetype_misc.h]hfreetype_misc.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kwubj)}(hmainh]hmain}hj&sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kwubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kwubeh}(h]jah](jjeh]h]h!]jjj freetype_miscjfreetype_misc.mainjj freetype_miscmainjfreetype_misc.main()uh%j|h'h]h)Kwhjh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`run a FreeType rendering example`h]h)}(hjRh]h run a FreeType rendering example}hjTsbah}(h]h]hah]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kyubhz)}(h":sg:`freetype_misc.main() -> None`h]h)}(hjih]hfreetype_misc.main() -> None}hjksbah}(h]h]jah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%huhjJh&hh'h]h)Kyubh)}(hXMA showcase of rendering features the :class:`pygame.freetype.Font` class provides in addition to those available with :class:`pygame.font.Font`. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text, horizontally stretched text and vertically stretched text.h](h%A showcase of rendering features the }hjsbh6)}(h:class:`pygame.freetype.Font`h]h;)}(hjh]hpygame.freetype.Font}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYjhZ freetype_misch[pygame.freetype.Fontuh%h5h'h]h)K|hjubh4 class provides in addition to those available with }hjsbh6)}(h:class:`pygame.font.Font`h]h;)}(hjh]hpygame.font.Font}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYjhZjh[pygame.font.Fontuh%h5h'h]h)K|hjubh. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text, horizontally stretched text and vertically stretched text.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K|hjJh&hubh )}(h ## pygame.examples.fonty.main ##h]h ## pygame.examples.fonty.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjJh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)vgrade.main() (in module pygame.examples)pygame.examples.vgrade.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h vgrade.mainh](j)}(hvgrade.h]hvgrade.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjvgradej vgrade.mainjjvgrademainj vgrade.main()uh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`display a vertical gradient`h]h)}(hjFh]hdisplay a vertical gradient}hjHsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Kubhz)}(h:sg:`vgrade.main() -> None`h]h)}(hj]h]hvgrade.main() -> None}hj_sbah}(h]h]jah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj>h&hh'h]h)Kubh)}(hX'Demonstrates creating a vertical gradient with pixelcopy and NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :]h]hX'Demonstrates creating a vertical gradient with pixelcopy and NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :]}hjxsbah}(h]h]h]h]h!]uh%hh'h]h)Khj>h&hubh )}(h!## pygame.examples.vgrade.main ##h]h!## pygame.examples.vgrade.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj>h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js,eventlist.main() (in module pygame.examples)pygame.examples.eventlist.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(heventlist.mainh](j)}(h eventlist.h]h eventlist.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjj eventlistjeventlist.mainjj eventlistmainjeventlist.main()uh%j|h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`display pygame events`h]h)}(hjh]hdisplay pygame events}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`eventlist.main() -> None`h]h)}(hjh]heventlist.main() -> None}hj sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hEventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom.h]hEventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom.}hj#sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThis is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control.h]hThis is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control.}hj1sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h$## pygame.examples.eventlist.main ##h]h$## pygame.examples.eventlist.main ##}hj?sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jVj@jWjAjWjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js,arraydemo.main() (in module pygame.examples)pygame.examples.arraydemo.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(harraydemo.mainh](j)}(h arraydemo.h]h arraydemo.}hjpsbah}(h]h](jjeh]h]h!]h#h$uh%jhjlh&hh'h]h)Kubj)}(hmainh]hmain}hj~sbah}(h]h](jjeh]h]h!]h#h$uh%jhjlh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjlh&hh'h]h)Kubeh}(h]jgah](jjeh]h]h!]jjj arraydemojarraydemo.mainjj arraydemomainjarraydemo.main()uh%j|h'h]h)Khjih&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`show various surfarray effects`h]h)}(hjh]hshow various surfarray effects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h,:sg:`arraydemo.main(arraytype=None) -> None`h]h)}(hjh]h&arraydemo.main(arraytype=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hAnother example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarrayh]hAnother example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hcThe ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError.h](hThe }hjsbh;)}(h ``arraytype``h]h arraytype}hjsbah}(h]h]h]h]h!]uh%h:hjubhR parameter is deprecated; passing any value besides 'numpy' will raise ValueError.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h$## pygame.examples.arraydemo.main ##h]h$## pygame.examples.arraydemo.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjih&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j!j@j"jAj"jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js(sound.main() (in module pygame.examples)pygame.examples.sound.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h sound.mainh](j)}(hsound.h]hsound.}hj;sbah}(h]h](jjeh]h]h!]h#h$uh%jhj7h&hh'h]h)Kubj)}(hmainh]hmain}hjIsbah}(h]h](jjeh]h]h!]h#h$uh%jhj7h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj7h&hh'h]h)Kubeh}(h]j2ah](jjeh]h]h!]jjjsoundj sound.mainjjsoundmainj sound.main()uh%j|h'h]h)Khj4h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`load and play a sound`h]h)}(hjuh]hload and play a sound}hjwsbah}(h]h]hah]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%h)hKhjph&hh'h]h)Kubhz)}(h(:sg:`sound.main(file_path=None) -> None`h]h)}(hjh]h"sound.main(file_path=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjph&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjmh&hh'h]h)Kubh)}(hoExtremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics.h]hoExtremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjmh&hubh)}(hJIf provided, use the audio file 'file_path', otherwise use a default file.h]hJIf provided, use the audio file 'file_path', otherwise use a default file.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjmh&hubh)}(h:``sound.py`` optional command line argument: an audio fileh](h;)}(h ``sound.py``h]hsound.py}hjsbah}(h]h]h]h]h!]uh%h:hjubh. optional command line argument: an audio file}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjmh&hubh )}(h ## pygame.examples.sound.main ##h]h ## pygame.examples.sound.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjmh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js4sound_array_demos.main() (in module pygame.examples)&pygame.examples.sound_array_demos.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hsound_array_demos.mainh](j)}(hsound_array_demos.h]hsound_array_demos.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjsound_array_demosjsound_array_demos.mainjjsound_array_demosmainjsound_array_demos.main()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`play various sndarray effects`h]h)}(hjJ h]hplay various sndarray effects}hjL sbah}(h]h]hah]h]h!]uh%hhjH ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubhz)}(h4:sg:`sound_array_demos.main(arraytype=None) -> None`h]h)}(hja h]h.sound_array_demos.main(arraytype=None) -> None}hjc sbah}(h]h]jah]h]h!]uh%hhj_ ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjB h&hh'h]h)Kubh)}(hUses sndarray and NumPy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echoes and the delay. Easy for you to recreate as needed.h]hUses sndarray and NumPy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echoes and the delay. Easy for you to recreate as needed.}hj| sbah}(h]h]h]h]h!]uh%hh'h]h)KhjB h&hubh)}(hcThe ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError.h](hThe }hj sbh;)}(h ``arraytype``h]h arraytype}hj sbah}(h]h]h]h]h!]uh%h:hj ubhR parameter is deprecated; passing any value besides 'numpy' will raise ValueError.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjB h&hubh )}(h,## pygame.examples.sound_array_demos.main ##h]h,## pygame.examples.sound_array_demos.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjB h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j j@j jAj jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)liquid.main() (in module pygame.examples)pygame.examples.liquid.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h liquid.mainh](j)}(hliquid.h]hliquid.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjliquidj liquid.mainjjliquidmainj liquid.main()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`display an animated liquid effect`h]h)}(hj h]h!display an animated liquid effect}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`liquid.main() -> None`h]h)}(hj, h]hliquid.main() -> None}hj. sbah}(h]h]jah]h]h!]uh%hhj* ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hThis example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap).h]hThis example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap).}hjG sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h!## pygame.examples.liquid.main ##h]h!## pygame.examples.liquid.main ##}hjU sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jl j@jm jAjm jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)glcube.main() (in module pygame.examples)pygame.examples.glcube.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h glcube.mainh](j)}(hglcube.h]hglcube.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j} ah](jjeh]h]h!]jjjglcubej glcube.mainjjglcubemainj glcube.main()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`display an animated 3D cube using OpenGL`h]h)}(hj h]h(display an animated 3D cube using OpenGL}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`glcube.main() -> None`h]h)}(hj h]hglcube.main() -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hHUsing PyOpenGL and pygame, this creates a spinning 3D multicolored cube.h]hHUsing PyOpenGL and pygame, this creates a spinning 3D multicolored cube.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h!## pygame.examples.glcube.main ##h]h!## pygame.examples.glcube.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j j@j jAj jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js2scrap_clipboard.main() (in module pygame.examples)$pygame.examples.scrap_clipboard.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hscrap_clipboard.mainh](j)}(hscrap_clipboard.h]hscrap_clipboard.}hj1 sbah}(h]h](jjeh]h]h!]h#h$uh%jhj- h&hh'h]h)Kubj)}(hmainh]hmain}hj? sbah}(h]h](jjeh]h]h!]h#h$uh%jhj- h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj- h&hh'h]h)Kubeh}(h]j( ah](jjeh]h]h!]jjjscrap_clipboardjscrap_clipboard.mainjjscrap_clipboardmainjscrap_clipboard.main()uh%j|h'h]h)Khj* h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`access the clipboard`h]h)}(hjk h]haccess the clipboard}hjm sbah}(h]h]hah]h]h!]uh%hhji ubah}(h]h]h]h]h!]uh%h)hKhjf h&hh'h]h)Kubhz)}(h$:sg:`scrap_clipboard.main() -> None`h]h)}(hj h]hscrap_clipboard.main() -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjf h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjc h&hh'h]h)Kubh)}(h9A simple demonstration example for the clipboard support.h]h9A simple demonstration example for the clipboard support.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjc h&hubh )}(h*## pygame.examples.scrap_clipboard.main ##h]h*## pygame.examples.scrap_clipboard.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjc h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj* h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j j@j jAj jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js'mask.main() (in module pygame.examples)pygame.examples.mask.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h mask.mainh](j)}(hmask.h]hmask.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjmaskj mask.mainjjmaskmainj mask.main()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`display multiple images bounce off each other using collision detection`h]h)}(hj h]hGdisplay multiple images bounce off each other using collision detection}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`mask.main(*args) -> None`h]h)}(hj- h]hmask.main(*args) -> None}hj/ sbah}(h]h]jah]h]h!]uh%hhj+ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hPositional arguments:h]hPositional arguments:}hjH sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hone or more image file names.h]hone or more image file names.}hjV sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khj h&hubh)}(hThis ``pygame.masks`` demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided.h](hThis }hjd sbh;)}(h``pygame.masks``h]h pygame.masks}hjl sbah}(h]h]h]h]h!]uh%h:hjd ubho demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided.}hjd sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(h]If run as a program then ``mask.py`` takes one or more image files as command line arguments.h](hIf run as a program then }hj sbh;)}(h ``mask.py``h]hmask.py}hj sbah}(h]h]h]h]h!]uh%h:hj ubh9 takes one or more image files as command line arguments.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.examples.mask.main ##h]h## pygame.examples.mask.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j j@j jAj jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js-testsprite.main() (in module pygame.examples)pygame.examples.testsprite.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(htestsprite.mainh](j)}(h testsprite.h]h testsprite.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjj testspritejtestsprite.mainjj testspritemainjtestsprite.main()uh%j|h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`show lots of sprites moving around`h]h)}(hj h]h"show lots of sprites moving around}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None`h]h)}(hj& h]htestsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None}hj( sbah}(h]h]jah]h]h!]uh%hhj$ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hOptional keyword arguments:h]hOptional keyword arguments:}hjA sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXupdate_rects - use the RenderUpdate sprite group class use_static - include non-moving images use_FastRenderGroup - Use the FastRenderGroup sprite group screen_dims - pygame window dimensions use_alpha - use alpha blending flags - additional display mode flagsh]hXupdate_rects - use the RenderUpdate sprite group class use_static - include non-moving images use_FastRenderGroup - Use the FastRenderGroup sprite group screen_dims - pygame window dimensions use_alpha - use alpha blending flags - additional display mode flags}hjO sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj h&hubh)}(hgLike the ``testsprite.c`` that comes with SDL, this pygame version shows lots of sprites moving around.h](h Like the }hj] sbh;)}(h``testsprite.c``h]h testsprite.c}hje sbah}(h]h]h]h]h!]uh%h:hj] ubhN that comes with SDL, this pygame version shows lots of sprites moving around.}hj] sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj h&hubh)}(hIIf run as a stand-alone program then no command line arguments are taken.h]hIIf run as a stand-alone program then no command line arguments are taken.}hj} sbah}(h]h]h]h]h!]uh%hh'h]h)M hj h&hubh )}(h%## pygame.examples.testsprite.main ##h]h%## pygame.examples.testsprite.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j j@j jAj jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js=headless_no_windows_needed.main() (in module pygame.examples)/pygame.examples.headless_no_windows_needed.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hheadless_no_windows_needed.mainh](j)}(hheadless_no_windows_needed.h]hheadless_no_windows_needed.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(hmainh]hmain}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]j ah](jjeh]h]h!]jjjheadless_no_windows_neededjheadless_no_windows_needed.mainjjheadless_no_windows_neededmainj!headless_no_windows_needed.main()uh%j|h'h]h)Mhj h&hubj)}(hhh](hv)}(hhh](hz)}(hD:sl:`write an image file that is smoothscaled copy of an input file`h]h)}(hj h]h>write an image file that is smoothscaled copy of an input file}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h>:sg:`headless_no_windows_needed.main(fin, fout, w, h) -> None`h]h)}(hj h]h8headless_no_windows_needed.main(fin, fout, w, h) -> None}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(h arguments:h]h arguments:}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hfin - name of an input image file fout - name of the output file to create/overwrite w, h - size of the rescaled image, as integer width and heighth]hfin - name of an input image file fout - name of the output file to create/overwrite w, h - size of the rescaled image, as integer width and height}hj6sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj h&hubh)}(hEHow to use pygame with no windowing system, like on headless servers.h]hEHow to use pygame with no windowing system, like on headless servers.}hjDsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hOThumbnail generation with scaling is an example of what you can do with pygame.h]hOThumbnail generation with scaling is an example of what you can do with pygame.}hjRsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hb``NOTE``: the pygame scale function uses MMX/SSE if available, and can be run in multiple threads.h](h;)}(h``NOTE``h]hNOTE}hjdsbah}(h]h]h]h]h!]uh%h:hj`ubhZ: the pygame scale function uses MMX/SSE if available, and can be run in multiple threads.}hj`sbeh}(h]h]h]h]h!]uh%hh'h]h)M"hj h&hubh)}(hgIf ``headless_no_windows_needed.py`` is run as a program it takes the following command line arguments:h](hIf }hj|sbh;)}(h!``headless_no_windows_needed.py``h]hheadless_no_windows_needed.py}hjsbah}(h]h]h]h]h!]uh%h:hj|ubhC is run as a program it takes the following command line arguments:}hj|sbeh}(h]h]h]h]h!]uh%hh'h]h)M%hj h&hubh)}(hQ-scale inputimage outputimage new_width new_height eg. -scale in.png outpng 50 50h]hQ-scale inputimage outputimage new_width new_height eg. -scale in.png outpng 50 50}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M*hj h&hubh )}(h5## pygame.examples.headless_no_windows_needed.main ##h]h5## pygame.examples.headless_no_windows_needed.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M-ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js+joystick.main() (in module pygame.examples)pygame.examples.joystick.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h joystick.mainh](j)}(h joystick.h]h joystick.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M/ubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M/ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M/ubeh}(h]jah](jjeh]h]h!]jjjjoystickj joystick.mainjjjoystickmainjjoystick.main()uh%j|h'h]h)M/hjh&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`demonstrate joystick functionality`h]h)}(hjh]h"demonstrate joystick functionality}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M1ubhz)}(h:sg:`joystick.main() -> None`h]h)}(hj,h]hjoystick.main() -> None}hj.sbah}(h]h]jah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M2ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M1ubh)}(h%A demo showing full joystick support.h]h%A demo showing full joystick support.}hjGsbah}(h]h]h]h]h!]uh%hh'h]h)M4hj h&hubhversionmodified)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hj_sbah}(h]h](jUaddedeh]h]h!]uh%hhj[ubah}(h]h]h]h]h!] translatableuh%hhjWh&hh'h]h)M7ubah}(h]h]h]h]h!]type versionaddedversion2.0.2uh%jUh&hh'h]h)M6hj ubh )}(h### pygame.examples.joystick.main ##h]h### pygame.examples.joystick.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js-blend_fill.main() (in module pygame.examples)pygame.examples.blend_fill.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hblend_fill.mainh](j)}(h blend_fill.h]h blend_fill.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M:ubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M:ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M:ubeh}(h]jah](jjeh]h]h!]jjj blend_filljblend_fill.mainjj blend_fillmainjblend_fill.main()uh%j|h'h]h)M:hjh&hubj)}(hhh](hv)}(hhh](hz)}(h?:sl:`demonstrate the various surface.fill method blend options`h]h)}(hjh]h9demonstrate the various surface.fill method blend options}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M<ubhz)}(h:sg:`blend_fill.main() -> None`h]h)}(hjh]hblend_fill.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M<ubh)}(hUA interactive demo that lets one choose which BLEND_xxx option to apply to a surface.h]hUA interactive demo that lets one choose which BLEND_xxx option to apply to a surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M?hjh&hubh )}(h%## pygame.examples.blend_fill.main ##h]h%## pygame.examples.blend_fill.main ##}hj*sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MBubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jAj@jBjAjBjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js.blit_blends.main() (in module pygame.examples) pygame.examples.blit_blends.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hblit_blends.mainh](j)}(h blit_blends.h]h blit_blends.}hj[sbah}(h]h](jjeh]h]h!]h#h$uh%jhjWh&hh'h]h)MDubj)}(hmainh]hmain}hjisbah}(h]h](jjeh]h]h!]h#h$uh%jhjWh&hh'h]h)MDubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjWh&hh'h]h)MDubeh}(h]jRah](jjeh]h]h!]jjj blit_blendsjblit_blends.mainjj blit_blendsmainjblit_blends.main()uh%j|h'h]h)MDhjTh&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`uses alternative additive fill to that of surface.fill`h]h)}(hjh]h6uses alternative additive fill to that of surface.fill}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MFubhz)}(h :sg:`blit_blends.main() -> None`h]h)}(hjh]hblit_blends.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MGubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MFubh)}(h\Fake additive blending. Using NumPy. it doesn't clamp. Press r,g,b Somewhat like blend_fill.h]h\Fake additive blending. Using NumPy. it doesn't clamp. Press r,g,b Somewhat like blend_fill.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MIhjh&hubh )}(h&## pygame.examples.blit_blends.main ##h]h&## pygame.examples.blit_blends.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MLubeh}(h]h]h]h]h!]uh%jhjTh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js*cursors.main() (in module pygame.examples)pygame.examples.cursors.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h cursors.mainh](j)}(hcursors.h]hcursors.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MNubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MNubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MNubeh}(h]jah](jjeh]h]h!]jjjcursorsj cursors.mainjjcursorsmainjcursors.main()uh%j|h'h]h)MNhjh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`display two different custom cursors`h]h)}(hj@h]h$display two different custom cursors}hjBsbah}(h]h]hah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)MPubhz)}(h:sg:`cursors.main() -> None`h]h)}(hjWh]hcursors.main() -> None}hjYsbah}(h]h]jah]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)MQubeh}(h]h]h]h]h!]uh%huhj8h&hh'h]h)MPubh)}(h0Display an arrow or circle with crossbar cursor.h]h0Display an arrow or circle with crossbar cursor.}hjrsbah}(h]h]h]h]h!]uh%hh'h]h)MShj8h&hubh )}(h"## pygame.examples.cursors.main ##h]h"## pygame.examples.cursors.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj8h&hh'h]h)MUubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js-pixelarray.main() (in module pygame.examples)pygame.examples.pixelarray.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hpixelarray.mainh](j)}(h pixelarray.h]h pixelarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MWubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MWubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MWubeh}(h]jah](jjeh]h]h!]jjj pixelarrayjpixelarray.mainjj pixelarraymainjpixelarray.main()uh%j|h'h]h)MWhjh&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`display various pixelarray generated effects`h]h)}(hjh]h,display various pixelarray generated effects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MYubhz)}(h:sg:`pixelarray.main() -> None`h]h)}(hjh]hpixelarray.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MZubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MYubh)}(h-Display various pixelarray generated effects.h]h-Display various pixelarray generated effects.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M\hjh&hubh )}(h%## pygame.examples.pixelarray.main ##h]h%## pygame.examples.pixelarray.main ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M^ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jBj@jCjAjCjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js,scaletest.main() (in module pygame.examples)pygame.examples.scaletest.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(hscaletest.mainh](j)}(h scaletest.h]h scaletest.}hj\sbah}(h]h](jjeh]h]h!]h#h$uh%jhjXh&hh'h]h)M`ubj)}(hmainh]hmain}hjjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjXh&hh'h]h)M`ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjXh&hh'h]h)M`ubeh}(h]jSah](jjeh]h]h!]jjj scaletestjscaletest.mainjj scaletestmainjscaletest.main()uh%j|h'h]h)M`hjUh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`interactively scale an image using smoothscale`h]h)}(hjh]h.interactively scale an image using smoothscale}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mbubhz)}(hQ:sg:`scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None`h]h)}(hjh]hKscaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mbubh)}(h arguments:h]h arguments:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mehjh&hubh)}(himagefile - file name of source image (required) convert_alpha - use convert_alpha() on the surf (default False) run_speed_test - (default False)h]himagefile - file name of source image (required) convert_alpha - use convert_alpha() on the surf (default False) run_speed_test - (default False)}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mihjh&hubh)}(hXA smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler.h]hXA smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mmhjh&hubh)}(hJIf ``scaletest.py`` is run as a program then the command line options are:h](hIf }hjsbh;)}(h``scaletest.py``h]h scaletest.py}hjsbah}(h]h]h]h]h!]uh%h:hjubh7 is run as a program then the command line options are:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mthjh&hubh)}(hiImageFile [-t] [-convert_alpha] [-t] = Run Speed Test [-convert_alpha] = Use convert_alpha() on the surf.h]hiImageFile [-t] [-convert_alpha] [-t] = Run Speed Test [-convert_alpha] = Use convert_alpha() on the surf.}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mxhjh&hubh )}(h$## pygame.examples.scaletest.main ##h]h$## pygame.examples.scaletest.main ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M|ubeh}(h]h]h]h]h!]uh%jhjUh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j7j@j8jAj8jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js'midi.main() (in module pygame.examples)pygame.examples.midi.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h midi.mainh](j)}(hmidi.h]hmidi.}hjQsbah}(h]h](jjeh]h]h!]h#h$uh%jhjMh&hh'h]h)M~ubj)}(hmainh]hmain}hj_sbah}(h]h](jjeh]h]h!]h#h$uh%jhjMh&hh'h]h)M~ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjMh&hh'h]h)M~ubeh}(h]jHah](jjeh]h]h!]jjjmidij midi.mainjjmidimainj midi.main()uh%j|h'h]h)M~hjJh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`run a midi example`h]h)}(hjh]hrun a midi example}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h6:sg:`midi.main(mode='output', device_id=None) -> None`h]h)}(hjh]h0midi.main(mode='output', device_id=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h Arguments:h]h Arguments:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX(mode - if 'output' run a midi keyboard output example 'input' run a midi event logger input example 'list' list available midi devices (default 'output') device_id - midi device number; if None then use the default midi input or output device for the systemh]hX(mode - if 'output' run a midi keyboard output example 'input' run a midi event logger input example 'list' list available midi devices (default 'output') device_id - midi device number; if None then use the default midi input or output device for the system}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjh&hubh)}(hThe output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine.h]hThe output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hEThe input example shows how to translate midi input to pygame events.h]hEThe input example shows how to translate midi input to pygame events.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hWith the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console.h]hWith the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hnew to pygame 1.9.0h]hnew to pygame 1.9.0}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.examples.midi.main ##h]h## pygame.examples.midi.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjJh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?j(j@j)jAj)jBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)scroll.main() (in module pygame.examples)pygame.examples.scroll.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h scroll.mainh](j)}(hscroll.h]hscroll.}hjBsbah}(h]h](jjeh]h]h!]h#h$uh%jhj>h&hh'h]h)Mubj)}(hmainh]hmain}hjPsbah}(h]h](jjeh]h]h!]h#h$uh%jhj>h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj>h&hh'h]h)Mubeh}(h]j9ah](jjeh]h]h!]jjjscrollj scroll.mainjjscrollmainj scroll.main()uh%j|h'h]h)Mhj;h&hubj)}(hhh](hv)}(hhh](hz)}(h?:sl:`run a Surface.scroll example that shows a magnified image`h]h)}(hj|h]h9run a Surface.scroll example that shows a magnified image}hj~sbah}(h]h]hah]h]h!"]uh%hhjzubah}(h]h]h]h]h!]uh%h)hKhjwh&hh'h]h)Mubhz)}(h*:sg:`scroll.main(image_file=None) -> None`h]h)}(hjh]h$scroll.main(image_file=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjwh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjth&hh'h]h)Mubh)}(hXThis example shows a scrollable image that has a zoom factor of eight. It uses the :meth:`Surface.scroll() ` function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used.h](hSThis example shows a scrollable image that has a zoom factor of eight. It uses the }hjsbh6)}(h0:meth:`Surface.scroll() `h]h;)}(hjh]hSurface.scroll()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYjhZscrollh[pygame.Surface.scrolluh%h5h'h]h)MhjubhX& function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjth&hubh)}(hWhen running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press ``ESC`` to quit.h](hWhen running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press }hjsbh;)}(h``ESC``h]hESC}hjsbah}(h]h]h]h]h!]uh%h:hjubh to quit.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjth&hubh )}(h!## pygame.examples.scroll.main ##h]h!## pygame.examples.scroll.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjth&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj;h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js)camera.main() (in module pygame.examples)pygame.examples.camera.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h camera.mainh](j)}(hcamera.h]hcamera.}hj2sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubj)}(hmainh]hmain}hj@sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jjjcameraj camera.mainjjcameramainj camera.main()uh%j|h'h]h)Mhj+h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`display video captured live from an attached camera`h]h)}(hjlh]h3display video captured live from an attached camera}hjnsbah}(h]h]hah]h]h!]uh%hhjjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)Mubhz)}(h:sg:`camera.main() -> None`h]h)}(hjh]hcamera.main() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjdh&hh'h]h)Mubh)}(hVA simple live video player, it uses the first available camera it finds on the system.h]hVA simple live video player, it uses the first available camera it finds on the system.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjdh&hubh )}(h!## pygame.examples.camera.main ##h]h!## pygame.examples.camera.main ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjdh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj+h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jj@jjAjjBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](js*playmus.main() (in module pygame.examples)pygame.examples.playmus.mainhNtauh%hdhh,h&hh'Nh)Nubjx)}(hhh](j})}(h playmus.mainh](j)}(hplaymus.h]hplaymus.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hmainh]hmain}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjplaymusj playmus.mainjjplaymusmainjplaymus.main()uh%j|h'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`play an audio file`h]h)}(hjh]hplay an audio file}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h%:sg:`playmus.main(file_path) -> None`h]h)}(hj.h]hplaymus.main(file_path) -> None}hj0sbah}(h]h]jah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(huA simple music player with window and keyboard playback control. Playback can be paused and rewound to the beginning.h]huA simple music player with window and keyboard playback control. Playback can be paused and rewound to the beginning.}hjIsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h"## pygame.examples.playmus.main ##h]h"## pygame.examples.playmus.main ##}hjWsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j?jnj@jojAjojBjCjDjEjFjGjHuh%jwh&hhh,h'Nh)Nubh )}(h## pygame.examples ##h]h## pygame.examples ##}hjssbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hspygame-exampleseh]h]pygame.examplesah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjuj~jUjZjjjjjdjijjjjjjjgjlj2j7j j j j j} j j( j- j j j j j j jjjjjRjWjjjjjSjXjHjMj9j>j)j.jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/examples.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.763141 pygame-2.6.1/docs/generated/doctrees/ref/fastevent.doctree0000644000175100001770000005131614676242417023252 0ustar00runnerdockerRsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.fastevent`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.fastevent}hh None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjkh&hh'h]h)Kubh)}(h'Initialize the pygame.fastevent module.h]h'Initialize the pygame.fastevent module.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjkh&hubh )}(h## pygame.fastevent.init ##h]h## pygame.fastevent.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjkh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jihj"h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'get_init() (in module pygame.fastevent)pygame.fastevent.get_inithNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hget_inith](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hjsbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjh&hh'h]h)Kubj>)}(hjh]hget_init}hjsbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjh&hh'h]h)KubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjh&hh'h]h)Kubeh}(h]jah](j]j^eh]h]h!]jbhjchjdjjehjjg get_init()uh%j%h'h]h)Khjh&hubjj)}(hhh](hv)}(hhh](hz)}(hC:sl:`returns True if the fastevent module is currently initialized`h]h)}(hj$h]h=returns True if the fastevent module is currently initialized}hj&sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K!ubhz)}(h:sg:`get_init() -> bool`h]h)}(hj;h]hget_init() -> bool}hj=sbah}(h]h]jah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K"ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K!ubh)}(hEReturns True if the pygame.fastevent module is currently initialized.h]hEReturns True if the pygame.fastevent module is currently initialized.}hjVsbah}(h]h]h]h]h!]uh%hh'h]h)K$hjh&hubh )}(h## pygame.fastevent.get_init ##h]h## pygame.fastevent.get_init ##}hjdsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K&ubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj{jj|jj|jjjjjjjuh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#pump() (in module pygame.fastevent)pygame.fastevent.pumphNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hpumph](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hjsbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjh&hh'h]h)K(ubj>)}(hjh]hpump}hjsbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjh&hh'h]h)K(ubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjh&hh'h]h)K(ubeh}(h]jah](j]j^eh]h]h!]jbhjchjdjjehjjgpump()uh%j%h'h]h)K(hjh&hubjj)}(hhh](hv)}(hhh](hz)}(h.:sl:`internally process pygame event handlers`h]h)}(hjh]h(internally process pygame event handlers}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K*ubhz)}(h:sg:`pump() -> None`h]h)}(hjh]hpump() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K+ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K*ubh)}(hFor each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system.h]hFor each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K-hjh&hubh)}(hThis function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.fastevent` functions.h](hpThis function is not necessary if your program is consistently processing events on the queue through the other }hj sbh6)}(h:mod:`pygame.fastevent`h]h;)}(hjh]hpygame.fastevent}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypemod refexplicitrefwarnhYhhZNh[pygame.fasteventuh%h5h'h]h)K1hj ubh functions.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)K1hjh&hubh)}(hXThere are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.h]hXThere are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.}hj<sbah}(h]h]h]h]h!]uh%hh'h]h)K4hjh&hubh )}(h## pygame.fastevent.pump ##h]h## pygame.fastevent.pump ##}hjJsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K9ubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjajjbjjbjjjjjjjuh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#wait() (in module pygame.fastevent)pygame.fastevent.waithNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hwaith](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hj{sbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjwh&hh'h]h)K;ubj>)}(hjyh]hwait}hjsbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjwh&hh'h]h)K;ubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjwh&hh'h]h)K;ubeh}(h]jrah](j]j^eh]h]h!]jbhjchjdjyjehjyjgwait()uh%j%h'h]h)K;hjth&hubjj)}(hhh](hv)}(hhh](hz)}(h:sl:`wait for an event`h]h)}(hjh]hwait for an event}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K=ubhz)}(h:sg:`wait() -> Event`h]h)}(hjh]hwait() -> Event}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K>ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K=ubh)}(hXReturns the current event on the queue. If there are no messages waiting on the queue, this will not return until one is available. Sometimes it is important to use this wait to get events from the queue, it will allow your application to idle when the user isn't doing anything with it.h]hXReturns the current event on the queue. If there are no messages waiting on the queue, this will not return until one is available. Sometimes it is important to use this wait to get events from the queue, it will allow your application to idle when the user isn't doing anything with it.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K@hjh&hubh )}(h## pygame.fastevent.wait ##h]h## pygame.fastevent.wait ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%jihjth&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#poll() (in module pygame.fastevent)pygame.fastevent.pollhNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hpollh](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hj!sbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjh&hh'h]h)KHubj>)}(hjh]hpoll}hj/sbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjh&hh'h]h)KHubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjh&hh'h]h)KHubeh}(h]jah](j]j^eh]h]h!]jbhjchjdjjehjjgpoll()uh%j%h'h]h)KHhjh&hubjj)}(hhh](hv)}(hhh](hz)}(h:sl:`get an available event`h]h)}(hjVh]hget an available event}hjXsbah}(h]h]hah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)KJubhz)}(h:sg:`poll() -> Event`h]h)}(hjmh]hpoll() -> Event}hjosbah}(h]h]jah]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)KKubeh}(h]h]h]h]h!]uh%huhjNh&hh'h]h)KJubh)}(htReturns next event on queue. If there is no event waiting on the queue, this will return an event with type NOEVENT.h]htReturns next event on queue. If there is no event waiting on the queue, this will return an event with type NOEVENT.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KMhjNh&hubh )}(h## pygame.fastevent.poll ##h]h## pygame.fastevent.poll ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjNh&hh'h]h)KPubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"get() (in module pygame.fastevent)pygame.fastevent.gethNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hgeth](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hjsbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjh&hh'h]h)KRubj>)}(hjh]hget}hjsbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjh&hh'h]h)KRubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjh&hh'h]h)KRubeh}(h]jah](j]j^eh]h]h!]jbhjchjdjjehjjgget()uh%j%h'h]h)KRhjh&hubjj)}(hhh](hv)}(hhh](hz)}(h#:sl:`get all events from the queue`h]h)}(hjh]hget all events from the queue}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KTubhz)}(h:sg:`get() -> list of Events`h]h)}(hjh]hget() -> list of Events}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KUubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KTubh)}(h>This will get all the messages and remove them from the queue.h]h>This will get all the messages and remove them from the queue.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)KWhjh&hubh )}(h## pygame.fastevent.get ##h]h## pygame.fastevent.get ##}hj<sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KYubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjSjjTjjTjjjjjjjuh%j h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#post() (in module pygame.fastevent)pygame.fastevent.posthNtauh%hdhh,h&hh'Nh)Nubj!)}(hhh](j&)}(hposth](j,)}(hpygame.fastevent.h]hpygame.fastevent.}hjmsbah}(h]h](j8j9eh]h]h!]h#h$uh%j+hjih&hh'h]h)K[ubj>)}(hjkh]hpost}hj{sbah}(h]h](jIjJeh]h]h!]h#h$uh%j=hjih&hh'h]h)K[ubjO)}(h()h]h}(h]h]h]h]h!]h#h$uh%jNhjih&hh'h]h)K[ubeh}(h]jdah](j]j^eh]h]h!]jbhjchjdjkjehjkjgpost()uh%j%h'h]h)K[hjfh&hubjj)}(hhh](hv)}(hhh](hz)}(h!:sl:`place an event on the queue`h]h)}(hjh]hplace an event on the queue}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K]ubhz)}(h:sg:`post(Event) -> None`h]h)}(hjh]hpost(Event) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K]ubh)}(hXEThis will post your own event objects onto the event queue. You can post any event type you want, but some care must be taken. For example, if you post a MOUSEBUTTONDOWN event to the queue, it is likely any code receiving the event will expect the standard MOUSEBUTTONDOWN attributes to be available, like 'pos' and 'button'.h]hXEThis will post your own event objects onto the event queue. You can post any event type you want, but some care must be taken. For example, if you post a MOUSEBUTTONDOWN event to the queue, it is likely any code receiving the event will expect the standard MOUSEBUTTONDOWN attributes to be available, like 'pos' and 'button'.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K`hjh&hubh)}(hXBecause pygame.fastevent.post() may have to wait for the queue to empty, you can get into a dead lock if you try to append an event on to a full queue from the thread that processes events. For that reason I do not recommend using this function in the main thread of an SDL program.h]hXBecause pygame.fastevent.post() may have to wait for the queue to empty, you can get into a dead lock if you try to append an event on to a full queue from the thread that processes events. For that reason I do not recommend using this function in the main thread of an SDL program.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kfhjh&hubh )}(h## pygame.fastevent.post ##h]h## pygame.fastevent.post ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%jihjfh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j h&hhh,h'Nh)Nubh )}(h## pygame.fastevent ##h]h## pygame.fastevent ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kmubeh}(h](hspygame-fasteventeh]h]pygame.fasteventah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjLerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjj'jjjjjrjwjjjjjdjiu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/fastevent.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612174.837141 pygame-2.6.1/docs/generated/doctrees/ref/font.doctree0000644000175100001770000026321514676242417022224 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.font`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.font}hh None`h]h)}(hjVh]hinit() -> None}hjXsbah}(h]h] signatureah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)K(ubeh}(h]h]h]h]h!]uh%huhj7h&hh'h]h)K'ubh)}(hThis method is called automatically by ``pygame.init()``. It initializes the font module. The module must be initialized before any other functions will work.h](h'This method is called automatically by }hjrsbh;)}(h``pygame.init()``h]h pygame.init()}hjzsbah}(h]h]h]h]h!]uh%h:hjrubhf. It initializes the font module. The module must be initialized before any other functions will work.}hjrsbeh}(h]h]h]h]h!]uh%hh'h]h)K*hj7h&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K.hj7h&hubh )}(h## pygame.font.init ##h]h## pygame.font.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj7h&hh'h]h)K0ubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jquit() (in module pygame.font)pygame.font.quithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hquith](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K2ubj )}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)K2ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K2ubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3quit()uh%jh'h]h)K2hjh&hubj6)}(hhh](hv)}(hhh](hz)}(h":sl:`uninitialize the font module`h]h)}(hjh]huninitialize the font module}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K4ubhz)}(h:sg:`quit() -> None`h]h)}(hj'h]hquit() -> None}hj)sbah}(h]h]jbah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K5ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K4ubh)}(h_Manually uninitialize SDL_ttf's font system. This is called automatically by ``pygame.quit()``.h](hMManually uninitialize SDL_ttf's font system. This is called automatically by }hjBsbh;)}(h``pygame.quit()``h]h pygame.quit()}hjJsbah}(h]h]h]h]h!]uh%h:hjBubh.}hjBsbeh}(h]h]h]h]h!]uh%hh'h]h)K7hjh&hubh)}(hKIt is safe to call this function even if font is currently not initialized.h]hKIt is safe to call this function even if font is currently not initialized.}hjbsbah}(h]h]h]h]h!]uh%hh'h]h)K:hjh&hubh )}(h## pygame.font.quit ##h]h## pygame.font.quit ##}hjpsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubj )}(hjh]hget_init}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)K>ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K>ubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3 get_init()uh%jh'h]h)K>hjh&hubj6)}(hhh](hv)}(hhh](hz)}(h,:sl:`true if the font module is initialized`h]h)}(hjh]h&true if the font module is initialized}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K@ubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KAubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K@ubh)}(h.Test if the font module is initialized or not.h]h.Test if the font module is initialized or not.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KChjh&hubh )}(h## pygame.font.get_init ##h]h## pygame.font.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KEubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj-jj.jj.jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*get_default_font() (in module pygame.font)pygame.font.get_default_fonthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_default_fonth](j)}(h pygame.font.h]h pygame.font.}hjGsbah}(h]h](jjeh]h]h!]h#h$uh%jhjCh&hh'h]h)KGubj )}(hjEh]hget_default_font}hjUsbah}(h]h](jjeh]h]h!]h#h$uh%j hjCh&hh'h]h)KGubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjCh&hh'h]h)KGubeh}(h]j>ah](j)j*eh]h]h!]j.hj/hj0jEj1hjEj3get_default_font()uh%jh'h]h)KGhj@h&hubj6)}(hhh](hv)}(hhh](hz)}(h*:sl:`get the filename of the default font`h]h)}(hj|h]h$get the filename of the default font}hj~sbah}(h]h]hah]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%h)hKhjwh&hh'h]h)KIubhz)}(h":sg:`get_default_font() -> string`h]h)}(hjh]hget_default_font() -> string}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjwh&hh'h]h)KJubeh}(h]h]h]h]h!]uh%huhjth&hh'h]h)KIubh)}(hReturn the filename of the system font. This is not the full path to the file. This file can usually be found in the same directory as the font module, but it can also be bundled in separate archives.h]hReturn the filename of the system font. This is not the full path to the file. This file can usually be found in the same directory as the font module, but it can also be bundled in separate archives.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KLhjth&hubh )}(h"## pygame.font.get_default_font ##h]h"## pygame.font.get_default_font ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjth&hh'h]h)KPubeh}(h]h]h]h]h!]uh%j5hj@h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-get_sdl_ttf_version() (in module pygame.font)pygame.font.get_sdl_ttf_versionhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_sdl_ttf_versionh](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KRubj )}(hjh]hget_sdl_ttf_version}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)KRubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KRubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3get_sdl_ttf_version()uh%jh'h]h)KRhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h:sl:`gets SDL_ttf version`h]h)}(hj"h]hgets SDL_ttf version}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KTubhz)}(h?:sg:`get_sdl_ttf_version(linked=True) -> (major, minor, patch)`h]h)}(hj9h]h9get_sdl_ttf_version(linked=True) -> (major, minor, patch)}hj;sbah}(h]h]jbah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KUubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KTubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave get_sdl_ttf_version feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hjZsbah}(h]h]h]h]h!]uh%jXhjTubhQ feature still in development available for testing and feedback. It may change. }hjTsbh reference)}(hf`Please leave get_sdl_ttf_version feedback with authors `_h]h6Please leave get_sdl_ttf_version feedback with authors}(hjnh6Please leave get_sdl_ttf_version feedback with authorsubah}(h]h]h]h]h!]name6Please leave get_sdl_ttf_version feedback with authorsrefuri*https://github.com/pygame/pygame/pull/3095uh%jlhjTubh target)}(h- h]h}(h]6please-leave-get-sdl-ttf-version-feedback-with-authorsah]h]6please leave get_sdl_ttf_version feedback with authorsah]h!]refurijuh%j referencedKhjTubeh}(h]h]h]h]h!]uh%hh'h]h)KWhjh&hubh)}(hXNReturns a tuple of integers that identify SDL_ttf's version. SDL_ttf is the underlying font rendering library, written in C, on which pygame's font module depends. If 'linked' is True (the default), the function returns the version of the linked TTF library. Otherwise this function returns the version of TTF pygame was compiled withh]hXNReturns a tuple of integers that identify SDL_ttf's version. SDL_ttf is the underlying font rendering library, written in C, on which pygame's font module depends. If 'linked' is True (the default), the function returns the version of the linked TTF library. Otherwise this function returns the version of TTF pygame was compiled with}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KZhjh&hubhversionmodified)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kaubah}(h]h]h]h]h!]type versionaddedversion2.1.3uh%jh&hh'h]h)K`hjubh )}(h%## pygame.font.get_sdl_ttf_version ##h]h%## pygame.font.get_sdl_ttf_version ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#get_fonts() (in module pygame.font)pygame.font.get_fontshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_fontsh](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kdubj )}(hjh]h get_fonts}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kdubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kdubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3 get_fonts()uh%jh'h]h)Kdhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h:sl:`get all available fonts`h]h)}(hj5h]hget all available fonts}hj7sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)Kfubhz)}(h$:sg:`get_fonts() -> list of strings`h]h)}(hjLh]hget_fonts() -> list of strings}hjNsbah}(h]h]jbah]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Kfubh)}(hReturns a list of all the fonts available on the system. The names of the fonts will be set to lowercase with all spaces and punctuation removed. This works on most systems, but some will return an empty list if they cannot find fonts.h]hReturns a list of all the fonts available on the system. The names of the fonts will be set to lowercase with all spaces and punctuation removed. This works on most systems, but some will return an empty list if they cannot find fonts.}hjgsbah}(h]h]h]h]h!]uh%hh'h]h)Kihj-h&hubj)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h]h)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hj}sbah}(h]h](jchangedeh]h]h!]uh%hhjyh&hh'h]h)KoubhCChecks through user fonts instead of just global fonts for Windows.}(hjyh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjuh&hh'h]h)Koubah}(h]h]h]h]h!]jversionchangedj2.1.3uh%jh&hh'h]h)Knhj-ubh )}(h## pygame.font.get_fonts ##h]h## pygame.font.get_fonts ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)Kpubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$match_font() (in module pygame.font)pygame.font.match_fonthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h match_fonth](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Krubj )}(hjh]h match_font}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Krubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Krubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3 match_font()uh%jh'h]h)Krhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h(:sl:`find a specific font on the system`h]h)}(hjh]h"find a specific font on the system}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Ktubhz)}(h8:sg:`match_font(name, bold=False, italic=False) -> path`h]h)}(hjh]h2match_font(name, bold=False, italic=False) -> path}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kuubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Ktubh)}(hReturns the full path to a font file on the system. If bold or italic are set to true, this will attempt to find the correct family of font.h]hReturns the full path to a font file on the system. If bold or italic are set to true, this will attempt to find the correct family of font.}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)Kwhjh&hubh)}(hThe font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. If none of the given names are found, None is returned.h]hThe font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. If none of the given names are found, None is returned.}hjEsbah}(h]h]h]h]h!]uh%hh'h]h)Kzhjh&hubj)}(h6New in pygame 2.0.1: Accept an iterable of font names.h]h)}(h6New in pygame 2.0.1: Accept an iterable of font names.h](h)}(hNew in pygame 2.0.1: h]hNew in pygame 2.0.1: }hj[sbah}(h]h](jjeh]h]h!]uh%hhjWh&hh'h]h)Kubh!Accept an iterable of font names.}(hjWh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjSh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.1uh%jh&hh'h]h)Khjubj)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h]h)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhCChecks through user fonts instead of just global fonts for Windows.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj|h&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.1.3uh%jh&hh'h]h)Khjubh)}(hExample:h]hExample:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh literal_block)}(hprint pygame.font.match_font('bitstreamverasans') # output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf # (but only if you have Vera on your system)h]hprint pygame.font.match_font('bitstreamverasans') # output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf # (but only if you have Vera on your system)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubh )}(h## pygame.font.match_font ##h]h## pygame.font.match_font ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!SysFont() (in module pygame.font)pygame.font.SysFonthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hSysFonth](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj )}(hjh]hSysFont}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3 SysFont()uh%jh'h]h)Khjh&hubj6)}(hhh](hv)}(hhh](hz)}(h0:sl:`create a Font object from the system fonts`h]h)}(hj)h]h*create a Font object from the system fonts}hj+sbah}(h]h]hah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Kubhz)}(h;:sg:`SysFont(name, size, bold=False, italic=False) -> Font`h]h)}(hj@h]h5SysFont(name, size, bold=False, italic=False) -> Font}hjBsbah}(h]h]jbah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj!h&hh'h]h)Kubh)}(hX_Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.h]hX_Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.}hj[sbah}(h]h]h]h]h!]uh%hh'h]h)Khj!h&hubh)}(hThe font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.h]hThe font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.}hjisbah}(h]h]h]h]h!]uh%hh'h]h)Khj!h&hubj)}(h6New in pygame 2.0.1: Accept an iterable of font names.h]h)}(h6New in pygame 2.0.1: Accept an iterable of font names.h](h)}(hNew in pygame 2.0.1: h]hNew in pygame 2.0.1: }hjsbah}(h]h](jjeh]h]h!]uh%hhj{h&hh'h]h)Kubh!Accept an iterable of font names.}(hj{h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjwh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.1uh%jh&hh'h]h)Khj!ubj)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h]h)}(h\Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.h](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhCChecks through user fonts instead of just global fonts for Windows.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.1.3uh%jh&hh'h]h)Khj!ubh )}(h## pygame.font.SysFont ##h]h## pygame.font.SysFont ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jFont (class in pygame.font)pygame.font.FonthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hFonth](j)}(h pygame.font.h]h pygame.font.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj )}(hjh]hFont}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kubeh}(h]jah](j)j*eh]h]h!]j.hj/hj0jj1hjj3juh%jh'h]h)Khjh&hubj6)}(hhh](hv)}(hhh](hz)}(h*:sl:`create a new Font object from a file`h]h)}(hj$ h]h$create a new Font object from a file}hj& sbah}(h]h]hah]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h+:sg:`Font(file_path=None, size=12) -> Font`h]h)}(hj; h]h%Font(file_path=None, size=12) -> Font}hj= sbah}(h]h]jbah]h]h!]uh%hhj9 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h#:sg:`Font(file_path, size) -> Font`h]h)}(hjR h]hFont(file_path, size) -> Font}hjT sbah}(h]h]jbah]h]h!]uh%hhjP ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h&:sg:`Font(pathlib.Path, size) -> Font`h]h)}(hji h]h Font(pathlib.Path, size) -> Font}hjk sbah}(h]h]jbah]h]h!]uh%hhjg ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h :sg:`Font(object, size) -> Font`h]h)}(hj h]hFont(object, size) -> Font}hj sbah}(h]h]jbah]h]h!]uh%hhj~ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hXLoad a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is ``None`` the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. If no arguments are given then the default font will be used and a font size of 12 is used.h](hLoad a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is }hj sbh;)}(h``None``h]hNone}hj sbah}(h]h]h]h]h!]uh%h:hj ubhX  the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. If no arguments are given then the default font will be used and a font size of 12 is used.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hFont objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs.h]hFont objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j!bold (pygame.font.Font attribute)pygame.font.Font.boldhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hboldh]j )}(hj h]hbold}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubah}(h]j ah](j)j*eh]h]h!]j.hj/jj0 Font.boldj1hӌFontboldj3j uh%jh'h]h)Khj h&hubj6)}(hhh](hv)}(hhh](hz)}(hG:sl:`Gets or sets whether the font should be rendered in (faked) bold.`h]h)}(hj h]hAGets or sets whether the font should be rendered in (faked) bold.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`bold -> bool`h]h)}(hj h]h bold -> bool}hj sbah}(h]h]jbah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h,Whether the font should be rendered in bold.h]h,Whether the font should be rendered in bold.}hj/ sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXJWhen set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.h]hXJWhen set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.}hj= sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjS sbah}(h]h](jjeh]h]h!]uh%hhjO ubah}(h]h]h]h]h!] translatableuh%hhjK h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)Khj ubh )}(h## Font.bold ##h]h## Font.bold ##}hjp sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#italic (pygame.font.Font attribute)pygame.font.Font.italichNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hitalich]j )}(hj h]hitalic}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubah}(h]j ah](j)j*eh]h]h!]j.hj/jj0 Font.italicj1hӌFontitalicj3j uh%jh'h]h)Khj h&hubj6)}(hhh](hv)}(hhh](hz)}(hJ:sl:`Gets or sets whether the font should be rendered in (faked) italics.`h]h)}(hj h]hDGets or sets whether the font should be rendered in (faked) italics.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`italic -> bool`h]h)}(hj h]hitalic -> bool}hj sbah}(h]h]jbah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h.Whether the font should be rendered in italic.h]h.Whether the font should be rendered in italic.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXKWhen set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.h]hXKWhen set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)Khj ubh )}(h## Font.italic ##h]h## Font.italic ##}hj3 sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjJ jjK jjK jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&underline (pygame.font.Font attribute)pygame.font.Font.underlinehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h underlineh]j )}(hjb h]h underline}hjd sbah}(h]h](jjeh]h]h!]h#h$uh%j hj` h&hh'h]h)Kubah}(h]j[ ah](j)j*eh]h]h!]j.hj/jj0Font.underlinej1hӌFont underlinej3jw uh%jh'h]h)Khj] h&hubj6)}(hhh](hv)}(hhh](hz)}(hI:sl:`Gets or sets whether the font should be rendered with an underline.`h]h)}(hj h]hCGets or sets whether the font should be rendered with an underline.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj~ h&hh'h]h)Kubhz)}(h:sg:`underline -> bool`h]h)}(hj h]hunderline -> bool}hj sbah}(h]h]jbah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj~ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj{ h&hh'h]h)Kubh)}(h1Whether the font should be rendered in underline.h]h1Whether the font should be rendered in underline.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj{ h&hubh)}(hWhen set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.h]hWhen set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj{ h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)Khj{ ubh )}(h## Font.underline ##h]h## Font.underline ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj{ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hj] h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*strikethrough (pygame.font.Font attribute)pygame.font.Font.strikethroughhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h strikethroughh]j )}(hj% h]h strikethrough}hj' sbah}(h]h](jjeh]h]h!]h#h$uh%j hj# h&hh'h]h)Kubah}(h]j ah](j)j*eh]h]h!]j.hj/jj0Font.strikethroughj1hӌFont strikethroughj3j: uh%jh'h]h)Khj h&hubj6)}(hhh](hv)}(hhh](hz)}(hL:sl:`Gets or sets whether the font should be rendered with a strikethrough.`h]h)}(hjF h]hFGets or sets whether the font should be rendered with a strikethrough.}hjH sbah}(h]h]hah]h]h!]uh%hhjD ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubhz)}(h:sg:`strikethrough -> bool`h]h)}(hj] h]hstrikethrough -> bool}hj_ sbah}(h]h]jbah]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj> h&hh'h]h)Kubh)}(h9Whether the font should be rendered with a strikethrough.h]h9Whether the font should be rendered with a strikethrough.}hjx sbah}(h]h]h]h]h!]uh%hh'h]h)Khj> h&hubh)}(hWhen set to True, all rendered fonts will include an strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.h]hWhen set to True, all rendered fonts will include an strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj> h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Khj> ubh )}(h## Font.strikethrough ##h]h## Font.strikethrough ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj> h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j5hj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"render() (pygame.font.Font method)pygame.font.Font.renderhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hrenderh](j )}(hj h]hrender}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j)j*eh]h]h!]j.hj/jj0 Font.renderj1hӌFontrenderj3 Font.render()uh%jh'h]h)Khj h&hubj6)}(hhh](hv)}(hhh](hz)}(h :sl:`draw text on a new Surface`h]h)}(hj h]hdraw text on a new Surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h@:sg:`render(text, antialias, color, background=None) -> Surface`h]h)}(hj+ h]h:render(text, antialias, color, background=None) -> Surface}hj- sbah}(h]h]jbah]h]h!]uh%hhj) ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hXThis creates a new Surface with the specified text rendered on it. :mod:`pygame.font` provides no way to directly draw text on an existing Surface: instead you must use :func:`Font.render` to create an image (Surface) of the text, then blit this image onto another Surface.h](hCThis creates a new Surface with the specified text rendered on it. }hjF sbh6)}(h:mod:`pygame.font`h]h;)}(hjP h]h pygame.font}hjR sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjN ubah}(h]h]h]h]h!]refdochS refdomainj\ reftypemod refexplicitrefwarnhYhhZjh[ pygame.fontuh%h5h'h]h)KhjF ubhT provides no way to directly draw text on an existing Surface: instead you must use }hjF sbh6)}(h:func:`Font.render`h]h;)}(hjt h]h Font.render()}hjv sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjr ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZjh[ Font.renderuh%h5h'h]h)KhjF ubhU to create an image (Surface) of the text, then blit this image onto another Surface.}hjF sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXThe text can only be a single line: newline characters are not rendered. Null characters ('\x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('\\u0001' to '\\uFFFF') were previously supported and any greater unicode codepoint would raise a UnicodeError. Now, characters in the UCS-4 range are supported. For char strings a ``LATIN1`` encoding is assumed. The antialias argument is a boolean: if True the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent.h](hXThe text can only be a single line: newline characters are not rendered. Null characters ('x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('\u0001' to '\uFFFF') were previously supported and any greater unicode codepoint would raise a UnicodeError. Now, characters in the UCS-4 range are supported. For char strings a }hj sbh;)}(h ``LATIN1``h]hLATIN1}hj sbah}(h]h]h]h]h!]uh%h:hj ubhXG encoding is assumed. The antialias argument is a boolean: if True the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hThe Surface returned will be of the dimensions required to hold the text. (the same as those returned by :func:`Font.size`). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font.h](hiThe Surface returned will be of the dimensions required to hold the text. (the same as those returned by }hj sbh6)}(h:func:`Font.size`h]h;)}(hj h]h Font.size()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZjh[ Font.sizeuh%h5h'h]h)Mhj ubh). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hXDepending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit ``RGB`` images. If the background is transparent a pixel alpha will be included.h](hX{Depending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit }hj sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hj ubhI images. If the background is transparent a pixel alpha will be included.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hXXOptimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values.h]hXXOptimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hxIf you render '\\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle newlines yourself.h]hxIf you render '\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle newlines yourself.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M"hj h&hubh)}(hTFont rendering is not thread safe: only a single thread can render text at any time.h]hTFont rendering is not thread safe: only a single thread can render text at any time.}hj*sbah}(h]h]h]h]h!]uh%hh'h]h)M%hj h&hubj)}(hChanged in pygame 2.0.3: Rendering UCS4 unicode works and does not raise an exception. Use if hasattr(pygame.font, "UCS4"): to see if pygame supports rendering UCS4 unicode including more languages and emoji.h]h)}(hChanged in pygame 2.0.3: Rendering UCS4 unicode works and does not raise an exception. Use if hasattr(pygame.font, "UCS4"): to see if pygame supports rendering UCS4 unicode including more languages and emoji.h](h)}(hChanged in pygame 2.0.3: h]hChanged in pygame 2.0.3: }hj@sbah}(h]h](jjeh]h]h!]uh%hhj<h&hh'h]h)M,ubhBRendering UCS4 unicode works and does not raise an exception. Use }(hj<h&hh'Nh)Nubh title_reference)}(h"`if hasattr(pygame.font, "UCS4"):`h]h if hasattr(pygame.font, "UCS4"):}hjTsbah}(h]h]h]h]h!]uh%jRhj<h&hh'Nh)NubhU to see if pygame supports rendering UCS4 unicode including more languages and emoji.}(hj<h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj8h&hh'h]h)M,ubah}(h]h]h]h]h!]jversionchangedj2.0.3uh%jh&hh'h]h)M(hj ubh )}(h## Font.render ##h]h## Font.render ##}hjusbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M-ubeh}(h]h]h]h]h!]uh%j5hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j size() (pygame.font.Font method)pygame.font.Font.sizehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hsizeh](j )}(hjh]hsize}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)M/ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M/ubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0 Font.sizej1hӌFontsizej3 Font.size()uh%jh'h]h)M/hjh&hubj6)}(hhh](hv)}(hhh](hz)}(h9:sl:`determine the amount of space needed to render text`h]h)}(hjh]h3determine the amount of space needed to render text}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M1ubhz)}(h#:sg:`size(text) -> (width, height)`h]h)}(hjh]hsize(text) -> (width, height)}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M2ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M1ubh)}(hReturns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for word wrapping and other layout effects.h]hReturns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for word wrapping and other layout effects.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M4hjh&hubh)}(hBe aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e".h]hBe aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M8hjh&hubh )}(h## Font.size ##h]h## Font.size ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M<ubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj5jj6jj6jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)set_underline() (pygame.font.Font method)pygame.font.Font.set_underlinehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h set_underlineh](j )}(hjMh]h set_underline}hjOsbah}(h]h](jjeh]h]h!]h#h$uh%j hjKh&hh'h]h)M>ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjKh&hh'h]h)M>ubeh}(h]jFah](j)j*eh]h]h!]j.hj/jj0Font.set_underlinej1hӌFont set_underlinej3Font.set_underline()uh%jh'h]h)M>hjHh&hubj6)}(hhh](hv)}(hhh](hz)}(h3:sl:`control if text is rendered with an underline`h]h)}(hjyh]h-control if text is rendered with an underline}hj{sbah}(h]h]hah]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)M@ubhz)}(h!:sg:`set_underline(bool) -> None`h]h)}(hjh]hset_underline(bool) -> None}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)MAubeh}(h]h]h]h]h!]uh%huhjqh&hh'h]h)M@ubh)}(hWhen enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.h]hWhen enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MChjqh&hubh note)}(h4This is the same as the :attr:`underline` attribute.h]h)}(hjh](hThis is the same as the }hjsbh6)}(h:attr:`underline`h]h;)}(hjh]h underline}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ underlineuh%h5h'h]h)MGhjubh attribute.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MGhjubah}(h]h]h]h]h!]uh%jh'h]h)MGhjqh&hubh )}(h## Font.set_underline ##h]h## Font.set_underline ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjqh&hh'h]h)MIubeh}(h]h]h]h]h!]uh%j5hjHh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)get_underline() (pygame.font.Font method)pygame.font.Font.get_underlinehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_underlineh](j )}(hj%h]h get_underline}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%j hj#h&hh'h]h)MKubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)MKubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.get_underlinej1hӌFont get_underlinej3Font.get_underline()uh%jh'h]h)MKhj h&hubj6)}(hhh](hv)}(hhh](hz)}(h6:sl:`check if text will be rendered with an underline`h]h)}(hjQh]h0check if text will be rendered with an underline}hjSsbah}(h]h]hah]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)MMubhz)}(h:sg:`get_underline() -> bool`h]h)}(hjhh]hget_underline() -> bool}hjjsbah}(h]h]jbah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)MNubeh}(h]h]h]h]h!]uh%huhjIh&hh'h]h)MMubh)}(h/Return True when the font underline is enabled.h]h/Return True when the font underline is enabled.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MPhjIh&hubh block_quote)}(h?.. note:: This is the same as the :attr:`underline` attribute. h]j)}(h4This is the same as the :attr:`underline` attribute.h]h)}(hjh](hThis is the same as the }hjsbh6)}(h:attr:`underline`h]h;)}(hjh]h underline}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ underlineuh%h5h'h]h)MRhjubh attribute.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MRhjubah}(h]h]h]h]h!]uh%jh'h]h)MRhjubah}(h]h]h]h]h!]uh%jh'h]h)MRhjIh&hubh )}(h## Font.get_underline ##h]h## Font.get_underline ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjIh&hh'h]h)MTubeh}(h]h]h]h]h!]uh%j5hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-set_strikethrough() (pygame.font.Font method)"pygame.font.Font.set_strikethroughhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hset_strikethroughh](j )}(hjh]hset_strikethrough}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)MVubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MVubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.set_strikethroughj1hӌFontset_strikethroughj3Font.set_strikethrough()uh%jh'h]h)MVhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h6:sl:`control if text is rendered with a strikethrough`h]h)}(hj3h]h0control if text is rendered with a strikethrough}hj5sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)MXubhz)}(h%:sg:`set_strikethrough(bool) -> None`h]h)}(hjJh]hset_strikethrough(bool) -> None}hjLsbah}(h]h]jbah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)MYubeh}(h]h]h]h]h!]uh%huhj+h&hh'h]h)MXubh)}(hWhen enabled, all rendered fonts will include a strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.h]hWhen enabled, all rendered fonts will include a strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.}hjesbah}(h]h]h]h]h!]uh%hh'h]h)M[hj+h&hubj)}(h8This is the same as the :attr:`strikethrough` attribute.h]h)}(hjuh](hThis is the same as the }hjwsbh6)}(h:attr:`strikethrough`h]h;)}(hjh]h strikethrough}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj~ubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ strikethroughuh%h5h'h]h)M_hjwubh attribute.}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)M_hjsubah}(h]h]h]h]h!]uh%jh'h]h)M_hj+h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mbubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Mahj+ubh )}(h## Font.set_strikethrough ##h]h## Font.set_strikethrough ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj+h&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-get_strikethrough() (pygame.font.Font method)"pygame.font.Font.get_strikethroughhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hget_strikethroughh](j )}(hjh]hget_strikethrough}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Meubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Meubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.get_strikethroughj1hӌFontget_strikethroughj3Font.get_strikethrough()uh%jh'h]h)Mehjh&hubj6)}(hhh](hv)}(hhh](hz)}(h9:sl:`check if text will be rendered with a strikethrough`h]h)}(hj.h]h3check if text will be rendered with a strikethrough}hj0sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mgubhz)}(h!:sg:`get_strikethrough() -> bool`h]h)}(hjEh]hget_strikethrough() -> bool}hjGsbah}(h]h]jbah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mhubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)Mgubh)}(h3Return True when the font strikethrough is enabled.h]h3Return True when the font strikethrough is enabled.}hj`sbah}(h]h]h]h]h!]uh%hh'h]h)Mjhj&h&hubj)}(h\.. note:: This is the same as the :attr:`strikethrough` attribute. .. versionadded:: 2.1.3 h](j)}(h8This is the same as the :attr:`strikethrough` attribute.h]h)}(hjth](hThis is the same as the }hjvsbh6)}(h:attr:`strikethrough`h]h;)}(hjh]h strikethrough}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj}ubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ strikethroughuh%h5h'h]h)Mlhjvubh attribute.}hjvsbeh}(h]h]h]h]h!]uh%hh'h]h)Mlhjrubah}(h]h]h]h]h!]uh%jh'h]h)Mlhjnubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Moubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Mnhjnubeh}(h]h]h]h]h!]uh%jh'h]h)Mlhj&h&hubh )}(h## Font.get_strikethrough ##h]h## Font.get_strikethrough ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mpubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$set_bold() (pygame.font.Font method)pygame.font.Font.set_boldhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hset_boldh](j )}(hjh]hset_bold}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mrubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mrubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0 Font.set_boldj1hӌFontset_boldj3Font.set_bold()uh%jh'h]h)Mrhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h(:sl:`enable fake rendering of bold text`[fh]h)}(hj3h]h"enable fake rendering of bold text}hj5sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mtubhz)}(h:sg:`set_bold(bool) -> None`h]h)}(hjJh]hset_bold(bool) -> None}hjLsbah}(h]h]jbah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Muubeh}(h]h]h]h]h!]uh%huhj+h&hh'h]h)Mtubh)}(hX3Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.h]hX3Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.}hjesbah}(h]h]h]h]h!]uh%hh'h]h)Mwhj+h&hubj)}(h/This is the same as the :attr:`bold` attribute.h]h)}(hjuh](hThis is the same as the }hjwsbh6)}(h :attr:`bold`h]h;)}(hjh]hbold}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj~ubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[bolduh%h5h'h]h)M}hjwubh attribute.}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)M}hjsubah}(h]h]h]h]h!]uh%jh'h]h)M}hj+h&hubh )}(h## Font.set_bold ##h]h## Font.set_bold ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$get_bold() (pygame.font.Font method)pygame.font.Font.get_boldhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hget_boldh](j )}(hjh]hget_bold}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0 Font.get_boldj1hӌFontget_boldj3Font.get_bold()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h):sl:`check if text will be rendered bold`h]h)}(hj h]h#check if text will be rendered bold}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_bold() -> bool`h]h)}(hj h]hget_bold() -> bool}hj"sbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h9Return True when the font bold rendering mode is enabled.h]h9Return True when the font bold rendering mode is enabled.}hj;sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(h/This is the same as the :attr:`bold` attribute.h]h)}(hjKh](hThis is the same as the }hjMsbh6)}(h :attr:`bold`h]h;)}(hjVh]hbold}hjXsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjTubah}(h]h]h]h]h!]refdochS refdomainjbreftypeattr refexplicitrefwarnhYhhZjh[bolduh%h5h'h]h)MhjMubh attribute.}hjMsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjIubah}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubh )}(h## Font.get_bold ##h]h## Font.get_bold ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&set_italic() (pygame.font.Font method)pygame.font.Font.set_italichNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h set_italich](j )}(hjh]h set_italic}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.set_italicj1hӌFont set_italicj3Font.set_italic()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h*:sl:`enable fake rendering of italic text`h]h)}(hjh]h$enable fake rendering of italic text}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`set_italic(bool) -> None`h]h)}(hjh]hset_italic(bool) -> None}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hX4Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.h]hX4Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(h1This is the same as the :attr:`italic` attribute.h]h)}(hj!h](hThis is the same as the }hj#sbh6)}(h:attr:`italic`h]h;)}(hj,h]hitalic}hj.sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj*ubah}(h]h]h]h]h!]refdochS refdomainj8reftypeattr refexplicitrefwarnhYhhZjh[italicuh%h5h'h]h)Mhj#ubh attribute.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubh )}(h## Font.set_italic ##h]h## Font.set_italic ##}hjZsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjqjjrjjrjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#metrics() (pygame.font.Font method)pygame.font.Font.metricshNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hmetricsh](j )}(hjh]hmetrics}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0 Font.metricsj1hӌFontmetricsj3Font.metrics()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h>:sl:`gets the metrics for each character in the passed string`h]h)}(hjh]h8gets the metrics for each character in the passed string}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`metrics(text) -> list`h]h)}(hjh]hmetrics(text) -> list}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXiThe list contains tuples for each character, which contain the minimum ``X`` offset, the maximum ``X`` offset, the minimum ``Y`` offset, the maximum ``Y`` offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character.h](hGThe list contains tuples for each character, which contain the minimum }hjsbh;)}(h``X``h]hX}hjsbah}(h]h]h]h]h!]uh%h:hjubh offset, the maximum }hjsbh;)}(h``X``h]hX}hjsbah}(h]h]h]h]h!]uh%h:hjubh offset, the minimum }hjsbh;)}(h``Y``h]hY}hjsbah}(h]h]h]h]h!]uh%h:hjubh offset, the maximum }hjsbh;)}(h``Y``h]hY}hj%sbah}(h]h]h]h]h!]uh%h:hjubh offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Font.metrics ##h]h## Font.metrics ##}hj=sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjTjjUjjUjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_italic() (pygame.font.Font method)pygame.font.Font.get_italichNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_italich](j )}(hjlh]h get_italic}hjnsbah}(h]h](jjeh]h]h!]h#h$uh%j hjjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjjh&hh'h]h)Mubeh}(h]jeah](j)j*eh]h]h!]j.hj/jj0Font.get_italicj1hӌFont get_italicj3Font.get_italic()uh%jh'h]h)Mhjgh&hubj6)}(hhh](hv)}(hhh](hz)}(h/:sl:`check if the text will be rendered italic`h]h)}(hjh]h)check if the text will be rendered italic}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_italic() -> bool`h]h)}(hjh]hget_italic() -> bool}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h;Return True when the font italic rendering mode is enabled.h]h;Return True when the font italic rendering mode is enabled.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(h1This is the same as the :attr:`italic` attribute.h]h)}(hjh](hThis is the same as the }hjsbh6)}(h:attr:`italic`h]h;)}(hjh]hitalic}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[italicuh%h5h'h]h)Mhjubh attribute.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubh )}(h## Font.get_italic ##h]h## Font.get_italic ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjgh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj*jj+jj+jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_linesize() (pygame.font.Font method)pygame.font.Font.get_linesizehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_linesizeh](j )}(hjBh]h get_linesize}hjDsbah}(h]h](jjeh]h]h!]h#h$uh%j hj@h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj@h&hh'h]h)Mubeh}(h]j;ah](j)j*eh]h]h!]j.hj/jj0Font.get_linesizej1hӌFont get_linesizej3Font.get_linesize()uh%jh'h]h)Mhj=h&hubj6)}(hhh](hv)}(hhh](hz)}(h):sl:`get the line space of the font text`h]h)}(hjnh]h#get the line space of the font text}hjpsbah}(h]h]hah]h]h!]uh%hhjlubah}(h]h]h]h]h!]uh%h)hKhjih&hh'h]h)Mubhz)}(h:sg:`get_linesize() -> int`h]h)}(hjh]hget_linesize() -> int}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjih&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjfh&hh'h]h)Mubh)}(hReturn the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines.h]hReturn the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjfh&hubh )}(h## Font.get_linesize ##h]h## Font.get_linesize ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjfh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hj=h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_height() (pygame.font.Font method)pygame.font.Font.get_heighthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_heighth](j )}(hjh]h get_height}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.get_heightj1hӌFont get_heightj3Font.get_height()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h :sl:`get the height of the font`h]h)}(hj h]hget the height of the font}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_height() -> int`h]h)}(hj h]hget_height() -> int}hj"sbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hmReturn the height in pixels of the actual rendered text. This is the average size for each glyph in the font.h]hmReturn the height in pixels of the actual rendered text. This is the average size for each glyph in the font.}hj;sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Font.get_height ##h]h## Font.get_height ##}hjIsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj`jjajjajjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_ascent() (pygame.font.Font method)pygame.font.Font.get_ascenthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_ascenth](j )}(hjxh]h get_ascent}hjzsbah}(h]h](jjeh]h]h!]h#h$uh%j hjvh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjvh&hh'h]h)Mubeh}(h]jqah](j)j*eh]h]h!]j.hj/jj0Font.get_ascentj1hӌFont get_ascentj3Font.get_ascent()uh%jh'h]h)Mhjsh&hubj6)}(hhh](hv)}(hhh](hz)}(h :sl:`get the ascent of the font`h]h)}(hjh]hget the ascent of the font}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_ascent() -> int`h]h)}(hjh]hget_ascent() -> int}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturn the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font.h]hReturn the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Font.get_ascent ##h]h## Font.get_ascent ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjsh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'get_descent() (pygame.font.Font method)pygame.font.Font.get_descenthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_descenth](j )}(hjh]h get_descent}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]j ah](j)j*eh]h]h!]j.hj/jj0Font.get_descentj1hӌFont get_descentj3Font.get_descent()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h!:sl:`get the descent of the font`h]h)}(hj?h]hget the descent of the font}hjAsbah}(h]h]hah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubhz)}(h:sg:`get_descent() -> int`h]h)}(hjVh]hget_descent() -> int}hjXsbah}(h]h]jbah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj7h&hh'h]h)Mubh)}(hReturn the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font.h]hReturn the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font.}hjqsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj7h&hubh )}(h## Font.get_descent ##h]h## Font.get_descent ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj7h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&set_script() (pygame.font.Font method)pygame.font.Font.set_scripthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h set_scripth](j )}(hjh]h set_script}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j)j*eh]h]h!]j.hj/jj0Font.set_scriptj1hӌFont set_scriptj3Font.set_script()uh%jh'h]h)Mhjh&hubj6)}(hhh](hv)}(hhh](hz)}(h*:sl:`set the script code for text shaping`h]h)}(hjh]h$set the script code for text shaping}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`set_script(str) -> None`h]h)}(hjh]hset_script(str) -> None}hjsbah}(h]h]jbah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave feedback with authors `_h](jY)}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%jXhj ubhQ feature still in development available for testing and feedback. It may change. }hj sbjm)}(hR`Please leave feedback with authors `_h]h"Please leave feedback with authors}(hj"h"Please leave feedback with authorsubah}(h]h]h]h]h!]name"Please leave feedback with authorsj*https://github.com/pygame/pygame/pull/3330uh%jlhj ubj)}(h- h]h}(h]"please-leave-feedback-with-authorsah]h]"please leave feedback with authorsah]h!]refurij3uh%jjKhj ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX"Sets the script used by harfbuzz text shaping, taking a 4 character script code as input. For example, Hindi is written in the Devanagari script, for which the script code is `"Deva"`. See the full list of script codes in `ISO 15924 `_.h](hSets the script used by harfbuzz text shaping, taking a 4 character script code as input. For example, Hindi is written in the Devanagari script, for which the script code is }hjGsbjS)}(h`"Deva"`h]h"Deva"}hjOsbah}(h]h]h]h]h!]uh%jRhjGubh'. See the full list of script codes in }hjGsbjm)}(hC`ISO 15924 `_h]h ISO 15924}(hjah ISO 15924ubah}(h]h]h]h]h!]name ISO 15924j4https://www.unicode.org/iso15924/iso15924-codes.htmluh%jlhjGubj)}(h7 h]h}(h] iso-15924ah]h] iso 15924ah]h!]refurijruh%jjKhjGubh.}hjGsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hoThis method requires pygame built with SDL_ttf 2.20.0 or above. Otherwise the method will raise a pygame.error.h]hoThis method requires pygame built with SDL_ttf 2.20.0 or above. Otherwise the method will raise a pygame.error.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.2.0.h]h)}(hNew in pygame 2.2.0.h]h)}(hNew in pygame 2.2.0.h]hNew in pygame 2.2.0.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.2.0uh%jh&hh'h]h)Mhjubh )}(h## Font.set_script ##h]h## Font.set_script ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubh )}(h## pygame.font.Font ##h]h## pygame.font.Font ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j5hjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.font ##h]h## pygame.font ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-fonteh]h] pygame.fontah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj5error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjj=j:j|jyu nametypes}(jjj=j|uh}(jh,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjjjjjjj>jCjjjjjjjjjjjjj j j j j[ j` j j# j j jjjFjKjj#jjjjjjjjjjjjjejjj;j@jjjqjvj jjjj:j4jyjsu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/font.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612174.9451408 pygame-2.6.1/docs/generated/doctrees/ref/freetype.doctree0000644000175100001770000050612714676242417023103 0ustar00runnerdockerXsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.freetype`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.freetype}hh` example shows these features in use.h](h&Extra rendering features available to }hjWsbh6)}(h:class:`pygame.freetype.Font`h]h;)}(hjah]hpygame.freetype.Font}hjcsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj_ubah}(h]h]h]h]h!]refdochS refdomainjmreftypeclass refexplicitrefwarnhYhhZNh[pygame.freetype.Fontuh%h5h'h]h)K*hjWubh& are direct to surface rendering (see }hjWsbh6)}(h:meth:`Font.render_to`h]h;)}(hjh]hFont.render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZNh[Font.render_touh%h5h'h]h)K*hjWubh), character kerning (see }hjWsbh6)}(h:attr:`Font.kerning`h]h;)}(hjh]h Font.kerning}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZNh[ Font.kerninguh%h5h'h]h)K*hjWubh), vertical layout (see }hjWsbh6)}(h:attr:`Font.vertical`h]h;)}(hjh]h Font.vertical}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZNh[ Font.verticaluh%h5h'h]h)K*hjWubh"), rotation of rendered text (see }hjWsbh6)}(h:attr:`Font.rotation`h]h;)}(hjh]h Font.rotation}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZNh[ Font.rotationuh%h5h'h]h)K*hjWubh), and the strong style (see }hjWsbh6)}(h:attr:`Font.strong`h]h;)}(hjh]h Font.strong}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj!reftypeattr refexplicitrefwarnhYhhZNh[ Font.stronguh%h5h'h]h)K*hjWubhH). Some properties are configurable, such as strong style strength (see }hjWsbh6)}(h:attr:`Font.strength`h]h;)}(hj9h]h Font.strength}hj;sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj7ubah}(h]h]h]h]h!]refdochS refdomainjEreftypeattr refexplicitrefwarnhYhhZNh[ Font.strengthuh%h5h'h]h)K*hjWubh!) and underline positioning (see }hjWsbh6)}(h!:attr:`Font.underline_adjustment`h]h;)}(hj]h]hFont.underline_adjustment}hj_sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj[ubah}(h]h]h]h]h!]refdochS refdomainjireftypeattr refexplicitrefwarnhYhhZNh[Font.underline_adjustmentuh%h5h'h]h)K*hjWubha). Text can be positioned by the upper right corner of the text box or by the text baseline (see }hjWsbh6)}(h:attr:`Font.origin`h]h;)}(hjh]h Font.origin}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZNh[ Font.originuh%h5h'h]h)K*hjWubhR). Finally, a font's vertical and horizontal size can be adjusted separately (see }hjWsbh6)}(h:attr:`Font.size`h]h;)}(hjh]h Font.size}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZNh[ Font.sizeuh%h5h'h]h)K*hjWubh). The }hjWsbh6)}(hI:any:`pygame.examples.freetype_misc `h]h;)}(hjh]hpygame.examples.freetype_misc}hjsbah}(h]h](hFanyeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainhreftypej refexplicitrefwarnhYhh["pygame.examples.freetype_misc.mainuh%h5h'h]h)K*hjWubh% example shows these features in use.}hjWsbeh}(h]h]h]h]h!]uh%hh'h]h)K*hh,h&hubh)}(hThe pygame package does not import ``freetype`` automatically when loaded. This module must be imported explicitly to be used. ::h](h#The pygame package does not import }hjsbh;)}(h ``freetype``h]hfreetype}hjsbah}(h]h]h]h]h!]uh%h:hjubhO automatically when loaded. This module must be imported explicitly to be used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K8hh,h&hubh literal_block)}(h$import pygame import pygame.freetypeh]h$import pygame import pygame.freetype}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)K;hh,h&hubhversionmodified)}(hNew in pygame 1.9.2: freetypeh]h)}(hNew in pygame 1.9.2: freetypeh](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hj)sbah}(h]h](jaddedeh]h]h!]uh%hhj%h&hh'h]h)K@ubh6)}(h:mod:`freetype`h]h;)}(hj:h]hfreetype}hj<sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj8ubah}(h]h]h]h]h!]refdochS refdomainjFreftypemod refexplicitrefwarnhYhhZNh[freetypeuh%h5h'h]h)K?hj%h&hubeh}(h]h]h]h]h!] translatableuh%hhj!h&hh'h]h)K@ubah}(h]h]h]h]h!]type versionaddedversion1.9.2uh%jh&hh'h]h)K>hh,ubhe)}(hhh]h}(h]h]h]h]h!]entries](single'get_error() (in module pygame.freetype)pygame.freetype.get_errorhNtauh%hdhh,h&hh'h]h)Nubhdesc)}(hhh](hdesc_signature)}(h get_errorh](h desc_addname)}(hpygame.freetype.h]hpygame.freetype.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KAubh desc_name)}(hjh]h get_error}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KAubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KAubeh}(h]jvah](sig sig-objecteh]h]h!]moduleh׌classhfullnamej _toc_partshj _toc_name get_error()uh%j}h'h]h)KAhjzh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h&:sl:`Return the latest FreeType error`h]h)}(hjh]h Return the latest FreeType error}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KCubhz)}(h:sg:`get_error() -> str`h]h)}(hjh]hget_error() -> str}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KDubhz)}(h:sg:`get_error() -> None`h]h)}(hjh]hget_error() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KEubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KCubh)}(hwReturn a description of the last error which occurred in the FreeType2 library, or ``None`` if no errors have occurred.h](hSReturn a description of the last error which occurred in the FreeType2 library, or }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh if no errors have occurred.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KGhjh&hubeh}(h]h]h]h]h!]uh%jhjzh&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]domainj>objtypej?desctypej?no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)get_version() (in module pygame.freetype)pygame.freetype.get_versionhNtauh%hdhh,h&hh'Nh)Nubjy)}(hhh](j~)}(h get_versionh](j)}(hpygame.freetype.h]hpygame.freetype.}hjbsbah}(h]h](jjeh]h]h!]h#h$uh%jhj^h&hh'h]h)KJubj)}(hj`h]h get_version}hjpsbah}(h]h](jjeh]h]h!]h#h$uh%jhj^h&hh'h]h)KJubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj^h&hh'h]h)KJubeh}(h]jYah](jjeh]h]h!]jhjhjj`jhj`j get_version()uh%j}h'h]h)KJhj[h&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`Return the FreeType version`h]h)}(hjh]hReturn the FreeType version}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KLubhz)}(h1:sg:`get_version(linked=True) -> (int, int, int)`h]h)}(hjh]h+get_version(linked=True) -> (int, int, int)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KMubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KLubh)}(hReturns the version of the FreeType library in use by this module. ``linked=True`` is the default behavior and returns the linked version of FreeType and ``linked=False`` returns the compiled version of FreeType.h](hCReturns the version of the FreeType library in use by this module. }hjsbh;)}(h``linked=True``h]h linked=True}hjsbah}(h]h]h]h]h!]uh%h:hjubhH is the default behavior and returns the linked version of FreeType and }hjsbh;)}(h``linked=False``h]h linked=False}hjsbah}(h]h]h]h]h!]uh%h:hjubh* returns the compiled version of FreeType.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubh)}(hNote that the ``freetype`` module depends on the FreeType 2 library. It will not compile with the original FreeType 1.0. Hence, the first element of the tuple will always be "2".h](hNote that the }hjsbh;)}(h ``freetype``h]hfreetype}hjsbah}(h]h]h]h]h!]uh%h:hjubh module depends on the FreeType 2 library. It will not compile with the original FreeType 1.0. Hence, the first element of the tuple will always be "2".}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KShjh&hubj )}(hChanged in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked versionh]h)}(hChanged in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked versionh](h)}(hChanged in pygame 2.2.0: h]hChanged in pygame 2.2.0: }hj#sbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)KWubh;)}(h ``linked``h]hlinked}hj2sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubhp keyword argument added and default behavior changed from returning compiled version to returning linked version}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KWubah}(h]h]h]h]h!]jeversionchangedjg2.2.0uh%jh&hh'h]h)KWhjubeh}(h]h]h]h]h!]uh%jhj[h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jCj\jDj]jEj]jFjGjHjIjJjKjLuh%jxh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt"init() (in module pygame.freetype)pygame.freetype.inithNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hinith](j)}(hpygame.freetype.h]hpygame.freetype.}hjvsbah}(h]h](jjeh]h]h!]h#h$uh%jhjrh&hh'h]h)KYubj)}(hjth]hinit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjrh&hh'h]h)KYubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjrh&hh'h]h)KYubeh}(h]jmah](jjeh]h]h!]jhjhjjtjhjtjinit()uh%j}h'h]h)KYhjoh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`Initialize the underlying FreeType library.`h]h)}(hjh]h+Initialize the underlying FreeType library.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K[ubhz)}(h0:sg:`init(cache_size=64, resolution=72) -> None`h]h)}(hjh]h*init(cache_size=64, resolution=72) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K\ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K[ubh)}(hThis function initializes the underlying FreeType library and must be called before trying to use any of the functionality of the ``freetype`` module.h](hThis function initializes the underlying FreeType library and must be called before trying to use any of the functionality of the }hjsbh;)}(h ``freetype``h]hfreetype}hjsbah}(h]h]h]h]h!]uh%h:hjubh module.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K^hjh&hubh)}(hHowever, :func:`pygame.init()` will automatically call this function if the ``freetype`` module is already imported. It is safe to call this function more than once.h](h However, }hjsbh6)}(h:func:`pygame.init()`h]h;)}(hjh]h pygame.init()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ pygame.inituh%h5h'h]h)Kbhjubh. will automatically call this function if the }hjsbh;)}(h ``freetype``h]hfreetype}hj)sbah}(h]h]h]h]h!]uh%h:hjubhM module is already imported. It is safe to call this function more than once.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kbhjh&hubh)}(hX9Optionally, you may specify a default *cache_size* for the Glyph cache: the maximum number of glyphs that will be cached at any given time by the module. Exceedingly small values will be automatically tuned for performance. Also a default pixel *resolution*, in dots per inch, can be given to adjust font scaling.h](h&Optionally, you may specify a default }hjAsbh emphasis)}(h *cache_size*h]h cache_size}hjKsbah}(h]h]h]h]h!]uh%jIhjAubh for the Glyph cache: the maximum number of glyphs that will be cached at any given time by the module. Exceedingly small values will be automatically tuned for performance. Also a default pixel }hjAsbjJ)}(h *resolution*h]h resolution}hj]sbah}(h]h]h]h]h!]uh%jIhjAubh8, in dots per inch, can be given to adjust font scaling.}hjAsbeh}(h]h]h]h]h!]uh%hh'h]h)Kfhjh&hubeh}(h]h]h]h]h!]uh%jhjoh&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj~jDjjEjjFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt"quit() (in module pygame.freetype)pygame.freetype.quithNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hquith](j)}(hpygame.freetype.h]hpygame.freetype.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Klubj)}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Klubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Klubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjquit()uh%j}h'h]h)Klhjh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`Shut down the underlying FreeType library.`h]h)}(hjh]h*Shut down the underlying FreeType library.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Knubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Koubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Knubh)}(hX2This function closes the ``freetype`` module. After calling this function, you should not invoke any class, method or function related to the ``freetype`` module as they are likely to fail or might give unpredictable results. It is safe to call this function even if the module hasn't been initialized yet.h](hThis function closes the }hjsbh;)}(h ``freetype``h]hfreetype}hj sbah}(h]h]h]h]h!]uh%h:hjubhi module. After calling this function, you should not invoke any class, method or function related to the }hjsbh;)}(h ``freetype``h]hfreetype}hj sbah}(h]h]h]h]h!]uh%h:hjubh module as they are likely to fail or might give unpredictable results. It is safe to call this function even if the module hasn't been initialized yet.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kqhjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj: jDj; jEj; jFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt&get_init() (in module pygame.freetype)pygame.freetype.get_inithNtauh%hdhh,h&hh'Nh)Nubjy)}(hhh](j~)}(hget_inith](j)}(hpygame.freetype.h]hpygame.freetype.}hjT sbah}(h]h](jjeh]h]h!]h#h$uh%jhjP h&hh'h]h)Kwubj)}(hjR h]hget_init}hjb sbah}(h]h](jjeh]h]h!]h#h$uh%jhjP h&hh'h]h)Kwubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjP h&hh'h]h)Kwubeh}(h]jK ah](jjeh]h]h!]jhjhjjR jhjR j get_init()uh%j}h'h]h)KwhjM h&hubj)}(hhh](hv)}(hhh](hz)}(hC:sl:`Returns True if the FreeType module is currently initialized.`h]h)}(hj h]h=Returns True if the FreeType module is currently initialized.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kyubhz)}(h:sg:`get_init() -> bool`h]h)}(hj h]hget_init() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kyubh)}(hLReturns ``True`` if the ``pygame.freetype`` module is currently initialized.h](hReturns }hj sbh;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj ubh if the }hj sbh;)}(h``pygame.freetype``h]hpygame.freetype}hj sbah}(h]h]h]h]h!]uh%h:hj ubh! module is currently initialized.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)K|hj h&hubj )}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj sbah}(h]h](jj4eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)K~ubah}(h]h]h]h]h!]je versionaddedjg1.9.5uh%jh&hh'h]h)K~hj ubeh}(h]h]h]h]h!]uh%jhjM h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt&was_init() (in module pygame.freetype)pygame.freetype.was_inithNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hwas_inith](j)}(hpygame.freetype.h]hpygame.freetype.}hj5 sbah}(h]h](jjeh]h]h!]h#h$uh%jhj1 h&hh'h]h)Kubj)}(hj3 h]hwas_init}hjC sbah}(h]h](jjeh]h]h!]h#h$uh%jhj1 h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj1 h&hh'h]h)Kubeh}(h]j, ah](jjeh]h]h!]jhjhjj3 jhj3 j was_init()uh%j}h'h]h)Khj. h&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`DEPRECATED: Use get_init() instead.`h]h)}(hjj h]h#DEPRECATED: Use get_init() instead.}hjl sbah}(h]h]hah]h]h!]uh%hhjh ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Kubhz)}(h:sg:`was_init() -> bool`h]h)}(hj h]hwas_init() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjb h&hh'h]h)Kubh)}(htDEPRECATED: Returns ``True`` if the ``pygame.freetype`` module is currently initialized. Use ``get_init()`` instead.h](hDEPRECATED: Returns }hj sbh;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj ubh if the }hj sbh;)}(h``pygame.freetype``h]hpygame.freetype}hj sbah}(h]h]h]h]h!]uh%h:hj ubh& module is currently initialized. Use }hj sbh;)}(h``get_init()``h]h get_init()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh instead.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjb h&hubeh}(h]h]h]h]h!]uh%jhj. h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt,get_cache_size() (in module pygame.freetype)pygame.freetype.get_cache_sizehNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hget_cache_sizeh](j)}(hpygame.freetype.h]hpygame.freetype.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hget_cache_size}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jget_cache_size()uh%j}h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`Return the glyph case size`h]h)}(hj8 h]hReturn the glyph case size}hj: sbah}(h]h]hah]h]h!]uh%hhj6 ubah}(h]h]h]h]h!]uh%h)hKhj3 h&hh'h]h)Kubhz)}(h:sg:`get_cache_size() -> long`h]h)}(hjO h]hget_cache_size() -> long}hjQ sbah}(h]h]jah]h]h!]uh%hhjM ubah}(h]h]h]h]h!]uh%h)hKhj3 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj0 h&hh'h]h)Kubh)}(h#See :func:`pygame.freetype.init()`.h](hSee }hjj sbh6)}(h:func:`pygame.freetype.init()`h]h;)}(hjt h]hpygame.freetype.init()}hjv sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjr ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[pygame.freetype.inituh%h5h'h]h)Khjj ubh.}hjj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj0 h&hubeh}(h]h]h]h]h!]uh%jhj h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt4get_default_resolution() (in module pygame.freetype)&pygame.freetype.get_default_resolutionhNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hget_default_resolutionh](j)}(hpygame.freetype.h]hpygame.freetype.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hget_default_resolution}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jget_default_resolution()uh%j}h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`Return the default pixel size in dots per inch`h]h)}(hj h]h.Return the default pixel size in dots per inch}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h&:sg:`get_default_resolution() -> long`h]h)}(hj h]h get_default_resolution() -> long}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hXReturns the default pixel size, in dots per inch, for the module. The default is 72 DPI.h]hXReturns the default pixel size, in dots per inch, for the module. The default is 72 DPI.}hj& sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubeh}(h]h]h]h]h!]uh%jhj h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj= jDj> jEj> jFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt4set_default_resolution() (in module pygame.freetype)&pygame.freetype.set_default_resolutionhNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hset_default_resolutionh](j)}(hpygame.freetype.h]hpygame.freetype.}hjW sbah}(h]h](jjeh]h]h!]h#h$uh%jhjS h&hh'h]h)Kubj)}(hjU h]hset_default_resolution}hje sbah}(h]h](jjeh]h]h!]h#h$uh%jhjS h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjS h&hh'h]h)Kubeh}(h]jN ah](jjeh]h]h!]jhjhjjU jhjU jset_default_resolution()uh%j}h'h]h)KhjP h&hubj)}(hhh](hv)}(hhh](hz)}(h@:sl:`Set the default pixel size in dots per inch for the module`h]h)}(hj h]h:Set the default pixel size in dots per inch for the module}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h*:sg:`set_default_resolution([resolution])`h]h)}(hj h]h$set_default_resolution([resolution])}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hSet the default pixel size, in dots per inch, for the module. If the optional argument is omitted or zero the resolution is reset to 72 DPI.h]hSet the default pixel size, in dots per inch, for the module. If the optional argument is omitted or zero the resolution is reset to 72 DPI.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubeh}(h]h]h]h]h!]uh%jhjP h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%SysFont() (in module pygame.freetype)pygame.freetype.SysFonthNtauh%hdhh,h&hh'Nh)Nubjy)}(hhh](j~)}(hSysFonth](j)}(hpygame.freetype.h]hpygame.freetype.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hSysFont}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj j SysFont()uh%j}h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`create a Font object from the system fonts`h]h)}(hj$ h]h*create a Font object from the system fonts}hj& sbah}(h]h]hah]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h;:sg:`SysFont(name, size, bold=False, italic=False) -> Font`h]h)}(hj; h]h5SysFont(name, size, bold=False, italic=False) -> Font}hj= sbah}(h]h]jah]h]h!]uh%hhj9 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hXcReturn a new Font object that is loaded from the system fonts. The font will match the requested *bold* and *italic* flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.h](haReturn a new Font object that is loaded from the system fonts. The font will match the requested }hjV sbjJ)}(h*bold*h]hbold}hj^ sbah}(h]h]h]h]h!]uh%jIhjV ubh and }hjV sbjJ)}(h*italic*h]hitalic}hjp sbah}(h]h]h]h]h!]uh%jIhjV ubh flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.}hjV sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hThe font *name* can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.h](h The font }hj sbjJ)}(h*name*h]hname}hj sbah}(h]h]h]h]h!]uh%jIhj ubh can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj )}(h6New in pygame 2.0.1: Accept an iterable of font names.h]h)}(h6New in pygame 2.0.1: Accept an iterable of font names.h](h)}(hNew in pygame 2.0.1: h]hNew in pygame 2.0.1: }hj sbah}(h]h](jj4eh]h]h!]uh%hhj h&hh'h]h)Kubh!Accept an iterable of font names.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]je versionaddedjg2.0.1uh%jh&hh'h]h)Khj ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt.get_default_font() (in module pygame.freetype) pygame.freetype.get_default_fonthNtauh%hdhh,h&hh'h]h)Nubjy)}(hhh](j~)}(hget_default_fonth](j)}(hpygame.freetype.h]hpygame.freetype.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hget_default_font}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jget_default_font()uh%j}h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`Get the filename of the default font`h]h)}(hj)h]h$Get the filename of the default font}hj+sbah}(h]h]hah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Kubhz)}(h":sg:`get_default_font() -> string`h]h)}(hj@h]hget_default_font() -> string}hjBsbah}(h]h]jah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj!h&hh'h]h)Kubh)}(hReturn the filename of the default pygame font. This is not the full path to the file. The file is usually in the same directory as the font module, but can also be bundled in a separate archive.h]hReturn the filename of the default pygame font. This is not the full path to the file. The file is usually in the same directory as the font module, but can also be bundled in a separate archive.}hj[sbah}(h]h]h]h]h!]uh%hh'h]h)Khj!h&hubeh}(h]h]h]h]h!]uh%jhj h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jCjrjDjsjEjsjFjGjHjIjJjKjLuh%jxh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jtFont (class in pygame.freetype)pygame.freetype.FonthNtauh%hdhh,h&hh'Nh)Nubjy)}(hhh](j~)}(hFonth](j)}(hpygame.freetype.h]hpygame.freetype.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hFont}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjjuh%j}h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`Create a new Font instance from a supported font file.`h]h)}(hjh]h6Create a new Font instance from a supported font file.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(hH:sg:`Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font`h]h)}(hjh]hBFont(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`Font(pathlib.Path) -> Font`h]h)}(hjh]hFont(pathlib.Path) -> Font}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hArgument *file* can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used.h](h Argument }hjsbjJ)}(h*file*h]hfile}hjsbah}(h]h]h]h]h!]uh%jIhjubh can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh target)}(h .. _freetype-font-size-argument:h]h}(h]h]h]h]h!]refidfreetype-font-size-argumentuh%jh)Khjh&hh'h]ubh)}(hXOptionally, a *size* argument may be specified to set the default size in points, which determines the size of the rendered characters. The size can also be passed explicitly to each method call. Because of the way the caching system works, specifying a default size on the constructor doesn't imply a performance gain over manually passing the size on each function call. If the font is bitmap and no *size* is given, the default size is set to the first available size for the font.h](hOptionally, a }hj-sbjJ)}(h*size*h]hsize}hj5sbah}(h]h]h]h]h!]uh%jIhj-ubhX argument may be specified to set the default size in points, which determines the size of the rendered characters. The size can also be passed explicitly to each method call. Because of the way the caching system works, specifying a default size on the constructor doesn't imply a performance gain over manually passing the size on each function call. If the font is bitmap and no }hj-sbjJ)}(h*size*h]hsize}hjGsbah}(h]h]h]h]h!]uh%jIhj-ubhL is given, the default size is set to the first available size for the font.}hj-sbeh}(h]j,ah]h]freetype-font-size-argumentah]h!]uh%hh'h]h)Khjh&hexpect_referenced_by_name}j]j!sexpect_referenced_by_id}j,j!subh)}(hIf the font file has more than one font, the font to load can be chosen with the *index* argument. An exception is raised for an out-of-range font index value.h](hQIf the font file has more than one font, the font to load can be chosen with the }hjdsbjJ)}(h*index*h]hindex}hjlsbah}(h]h]h]h]h!]uh%jIhjdubhG argument. An exception is raised for an out-of-range font index value.}hjdsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXThe optional *resolution* argument sets the pixel size, in dots per inch, for use in scaling glyphs for this Font instance. If 0 then the default module value, set by :func:`init`, is used. The Font object's resolution can only be changed by re-initializing the Font instance.h](h The optional }hjsbjJ)}(h *resolution*h]h resolution}hjsbah}(h]h]h]h]h!]uh%jIhjubh argument sets the pixel size, in dots per inch, for use in scaling glyphs for this Font instance. If 0 then the default module value, set by }hjsbh6)}(h :func:`init`h]h;)}(hjh]hinit()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZjh[inituh%h5h'h]h)Khjubha, is used. The Font object's resolution can only be changed by re-initializing the Font instance.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThe optional *ucs4* argument, an integer, sets the default text translation mode: 0 (False) recognize UTF-16 surrogate pairs, any other value (True), to treat Unicode text as UCS-4, with no surrogate pairs. See :attr:`Font.ucs4`.h](h The optional }hjsbjJ)}(h*ucs4*h]hucs4}hjsbah}(h]h]h]h]h!]uh%jIhjubh argument, an integer, sets the default text translation mode: 0 (False) recognize UTF-16 surrogate pairs, any other value (True), to treat Unicode text as UCS-4, with no surrogate pairs. See }hjsbh6)}(h:attr:`Font.ucs4`h]h;)}(hjh]h Font.ucs4}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ Font.ucs4uh%h5h'h]h)Khjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%name (pygame.freetype.Font attribute)pygame.freetype.Font.namehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hnameh]j)}(hjh]hname}hj!sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubah}(h]jah](jjeh]h]h!]jhjjj Font.namejh׌Fontnamejj4uh%j}h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Proper font name.`h]h)}(hj@h]hProper font name.}hjBsbah}(h]h]hah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)Kubhz)}(h:sg:`name -> string`h]h)}(hjWh]hname -> string}hjYsbah}(h]h]jah]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj8h&hh'h]h)Kubh)}(hRRead only. Returns the real (long) name of the font, as recorded in the font file.h]hRRead only. Returns the real (long) name of the font, as recorded in the font file.}hjrsbah}(h]h]h]h]h!]uh%hh'h]h)Khj8h&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%path (pygame.freetype.Font attribute)pygame.freetype.Font.pathhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hpathh]j)}(hjh]hpath}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubah}(h]jah](jjeh]h]h!]jhjjj Font.pathjh׌Fontpathjjuh%j}h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Font file path`h]h)}(hjh]hFont file path}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`path -> unicode`h]h)}(hjh]hpath -> unicode}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h3Read only. Returns the path of the loaded font fileh]h3Read only. Returns the path of the loaded font file}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj jDj jEj jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%size (pygame.freetype.Font attribute)pygame.freetype.Font.sizehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hsizeh]j)}(hj#h]hsize}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj!h&hh'h]h)Kubah}(h]jah](jjeh]h]h!]jhjjj Font.sizejh׌Fontsizejj8uh%j}h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`The default point size used in rendering`h]h)}(hjDh]h(The default point size used in rendering}hjFsbah}(h]h]hah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)Kubhz)}(h:sg:`size -> float`h]h)}(hj[h]h size -> float}hj]sbah}(h]h]jah]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)Kubhz)}(h:sg:`size -> (float, float)`h]h)}(hjrh]hsize -> (float, float)}hjtsbah}(h]h]jah]h]h!]uh%hhjpubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj<h&hh'h]h)Kubh)}(hXGet or set the default size for text metrics and rendering. It can be a single point size, given as a Python ``int`` or ``float``, or a font ppem (width, height) ``tuple``. Size values are non-negative. A zero size or width represents an undefined size. In this case the size must be given as a method argument, or an exception is raised. A zero width but non-zero height is a ValueError.h](hmGet or set the default size for text metrics and rendering. It can be a single point size, given as a Python }hjsbh;)}(h``int``h]hint}hjsbah}(h]h]h]h]h!]uh%h:hjubh or }hjsbh;)}(h ``float``h]hfloat}hjsbah}(h]h]h]h]h!]uh%h:hjubh!, or a font ppem (width, height) }hjsbh;)}(h ``tuple``h]htuple}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Size values are non-negative. A zero size or width represents an undefined size. In this case the size must be given as a method argument, or an exception is raised. A zero width but non-zero height is a ValueError.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj<h&hubh)}(hXKFor a scalable font, a single number value is equivalent to a tuple with width equal height. A font can be stretched vertically with height set greater than width, or horizontally with width set greater than height. For embedded bitmaps, as listed by :meth:`get_sizes`, use the nominal width and height to select an available size.h](hFor a scalable font, a single number value is equivalent to a tuple with width equal height. A font can be stretched vertically with height set greater than width, or horizontally with width set greater than height. For embedded bitmaps, as listed by }hjsbh6)}(h:meth:`get_sizes`h]h;)}(hjh]h get_sizes()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ get_sizesuh%h5h'h]h)Khjubh?, use the nominal width and height to select an available size.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj<h&hubh)}(hXfFont size differs for a non-scalable, bitmap, font. During a method call it must match one of the available sizes returned by method :meth:`get_sizes`. If not, an exception is raised. If the size is a single number, the size is first matched against the point size value. If no match, then the available size with the same nominal width and height is chosen.h](hFont size differs for a non-scalable, bitmap, font. During a method call it must match one of the available sizes returned by method }hjsbh6)}(h:meth:`get_sizes`h]h;)}(hj h]h get_sizes()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ get_sizesuh%h5h'h]h)Khjubh. If not, an exception is raised. If the size is a single number, the size is first matched against the point size value. If no match, then the available size with the same nominal width and height is chosen.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj<h&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj>jDj?jEj?jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt(get_rect() (pygame.freetype.Font method)pygame.freetype.Font.get_recthNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hget_recth](j)}(hjVh]hget_rect}hjXsbah}(h]h](jjeh]h]h!]h#h$uh%jhjTh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjTh&hh'h]h)Mubeh}(h]jOah](jjeh]h]h!]jhjjj Font.get_rectjh׌Fontget_rectjFont.get_rect()uh%j}h'h]h)MhjQh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`Return the size and offset of rendered text`h]h)}(hjh]h+Return the size and offset of rendered text}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Mubhz)}(hE:sg:`get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect`h]h)}(hjh]h?get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjzh&hh'h]h)Mubh)}(hXGets the final dimensions and origin, in pixels, of *text* using the optional *size* in points, *style*, and *rotation*. For other relevant render properties, and for any optional argument not given, the default values set for the :class:`Font` instance are used.h](h4Gets the final dimensions and origin, in pixels, of }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh using the optional }hjsbjJ)}(h*size*h]hsize}hjsbah}(h]h]h]h]h!]uh%jIhjubh in points, }hjsbjJ)}(h*style*h]hstyle}hjsbah}(h]h]h]h]h!]uh%jIhjubh, and }hjsbjJ)}(h *rotation*h]hrotation}hjsbah}(h]h]h]h]h!]uh%jIhjubhp. For other relevant render properties, and for any optional argument not given, the default values set for the }hjsbh6)}(h :class:`Font`h]h;)}(hjh]hFont}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[Fontuh%h5h'h]h)M hjubh instance are used.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M hjzh&hubh)}(hXKReturns a :class:`Rect ` instance containing the width and height of the text's bounding box and the position of the text's origin. The origin is useful in aligning separately rendered pieces of text. It gives the baseline position and bearing at the start of the text. See the :meth:`render_to` method for an example.h](h Returns a }hj.sbh6)}(h:class:`Rect `h]h;)}(hj8h]hRect}hj:sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj6ubah}(h]h]h]h]h!]refdochS refdomainjDreftypeclass refexplicitrefwarnhYhhZjh[ pygame.Rectuh%h5h'h]h)Mhj.ubh instance containing the width and height of the text's bounding box and the position of the text's origin. The origin is useful in aligning separately rendered pieces of text. It gives the baseline position and bearing at the start of the text. See the }hj.sbh6)}(h:meth:`render_to`h]h;)}(hj\h]h render_to()}hj^sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjZubah}(h]h]h]h]h!]refdochS refdomainjhreftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj.ubh method for an example.}hj.sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hLIf *text* is a char (byte) string, its encoding is assumed to be ``LATIN1``.h](hIf }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh8 is a char (byte) string, its encoding is assumed to be }hjsbh;)}(h ``LATIN1``h]hLATIN1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hOptionally, *text* can be ``None``, which will return the bounding rectangle for the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for more details.h](h Optionally, }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh can be }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubhM, which will return the bounding rectangle for the text passed to a previous }hjsbh6)}(h:meth:`get_rect`h]h;)}(hjh]h get_rect()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render`h]h;)}(hjh]hrender()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render_to`h]h;)}(hj,h]h render_to()}hj.sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj*ubah}(h]h]h]h]h!]refdochS refdomainj8reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render_raw`h]h;)}(hjPh]h render_raw()}hjRsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjNubah}(h]h]h]h]h!]refdochS refdomainj\reftypemeth refexplicitrefwarnhYhhZjh[ render_rawuh%h5h'h]h)Mhjubh, or }hjsbh6)}(h:meth:`render_raw_to`h]h;)}(hjth]hrender_raw_to()}hjvsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjrubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_raw_touh%h5h'h]h)Mhjubh call. See }hjsbh6)}(h:meth:`render_to`h]h;)}(hjh]h render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh for more details.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubeh}(h]h]h]h]h!]uh%jhjQh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt+get_metrics() (pygame.freetype.Font method) pygame.freetype.Font.get_metricshNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h get_metricsh](j)}(hjh]h get_metrics}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jhjjjFont.get_metricsjh׌Font get_metricsjFont.get_metrics()uh%j}h'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`Return the glyph metrics for the given text`h]h)}(hj h]h+Return the glyph metrics for the given text}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h/:sg:`get_metrics(text, size=0) -> [(...), ...]`h]h)}(hj$h]h)get_metrics(text, size=0) -> [(...), ...]}hj&sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M!ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M ubh)}(h7Returns the glyph metrics for each character in *text*.h](h0Returns the glyph metrics for each character in }hj?sbjJ)}(h*text*h]htext}hjGsbah}(h]h]h]h]h!]uh%jIhj?ubh.}hj?sbeh}(h]h]h]h]h!]uh%hh'h]h)M#hjh&hubh)}(hThe glyph metrics are returned as a list of tuples. Each tuple gives metrics of a single character glyph. The glyph metrics are:h]hThe glyph metrics are returned as a list of tuples. Each tuple gives metrics of a single character glyph. The glyph metrics are:}hj_sbah}(h]h]h]h]h!]uh%hh'h]h)M%hjh&hubj)}(hH(min_x, max_x, min_y, max_y, horizontal_advance_x, horizontal_advance_y)h]hH(min_x, max_x, min_y, max_y, horizontal_advance_x, horizontal_advance_y)}hjmsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)M*hjh&hubh)}(hThe bounding box min_x, max_x, min_y, and max_y values are returned as grid-fitted pixel coordinates of type int. The advance values are float values.h]hThe bounding box min_x, max_x, min_y, and max_y values are returned as grid-fitted pixel coordinates of type int. The advance values are float values.}hj{sbah}(h]h]h]h]h!]uh%hh'h]h)M,hjh&hubh)}(hThe calculations are done using the font's default size in points. Optionally you may specify another point size with the *size* argument.h](hzThe calculations are done using the font's default size in points. Optionally you may specify another point size with the }hjsbjJ)}(h*size*h]hsize}hjsbah}(h]h]h]h]h!]uh%jIhjubh argument.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M0hjh&hubh)}(hPThe metrics are adjusted for the current rotation, strong, and oblique settings.h]hPThe metrics are adjusted for the current rotation, strong, and oblique settings.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M3hjh&hubh)}(hOIf text is a char (byte) string, then its encoding is assumed to be ``LATIN1``.h](hDIf text is a char (byte) string, then its encoding is assumed to be }hjsbh;)}(h ``LATIN1``h]hLATIN1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M6hjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt'height (pygame.freetype.Font attribute)pygame.freetype.Font.heighthNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hheighth]j)}(hjh]hheight}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M9ubah}(h]jah](jjeh]h]h!]jhjjj Font.heightjh׌Fontheightjj uh%j}h'h]h)M9hjh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`The unscaled height of the font in font units`h]h)}(hjh]h-The unscaled height of the font in font units}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M;ubhz)}(h:sg:`height -> int`h]h)}(hj0h]h height -> int}hj2sbah}(h]h]jah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M<ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M;ubh)}(h\Read only. Gets the height of the font. This is the average value of all glyphs in the font.h]h\Read only. Gets the height of the font. This is the average value of all glyphs in the font.}hjKsbah}(h]h]h]h]h!]uh%hh'h]h)M>hjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjbjDjcjEjcjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)ascender (pygame.freetype.Font attribute)pygame.freetype.Font.ascenderhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hascenderh]j)}(hjzh]hascender}hj|sbah}(h]h](jjeh]h]h!]h#h$uh%jhjxh&hh'h]h)MAubah}(h]jsah](jjeh]h]h!]jhjjj Font.ascenderjh׌Fontascenderjjuh%j}h'h]h)MAhjuh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`The unscaled ascent of the font in font units`h]h)}(hjh]h-The unscaled ascent of the font in font units}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MCubhz)}(h:sg:`ascender -> int`h]h)}(hjh]hascender -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MDubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MCubh)}(h^Read only. Return the number of units from the font's baseline to the top of the bounding box.h]h^Read only. Return the number of units from the font's baseline to the top of the bounding box.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MFhjh&hubeh}(h]h]h]h]h!]uh%jhjuh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt*descender (pygame.freetype.Font attribute)pygame.freetype.Font.descenderhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h descenderh]j)}(hjh]h descender}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MIubah}(h]jah](jjeh]h]h!]jhjjjFont.descenderjh׌Font descenderjjuh%j}h'h]h)MIhjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`The unscaled descent of the font in font units`h]h)}(hjh]h.The unscaled descent of the font in font units}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MKubhz)}(h:sg:`descender -> int`h]h)}(hj4h]hdescender -> int}hj6sbah}(h]h]jah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MLubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MKubh)}(hRead only. Return the height in font units for the font descent. The descent is the number of units from the font's baseline to the bottom of the bounding box.h]hRead only. Return the height in font units for the font descent. The descent is the number of units from the font's baseline to the bottom of the bounding box.}hjOsbah}(h]h]h]h]h!]uh%hh'h]h)MNhjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjfjDjgjEjgjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt2get_sized_ascender() (pygame.freetype.Font method)'pygame.freetype.Font.get_sized_ascenderhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hget_sized_ascenderh](j)}(hj~h]hget_sized_ascender}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj|h&hh'h]h)MRubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj|h&hh'h]h)MRubeh}(h]jwah](jjeh]h]h!]jhjjjFont.get_sized_ascenderjh׌Fontget_sized_ascenderjFont.get_sized_ascender()uh%j}h'h]h)MRhjyh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`The scaled ascent of the font in pixels`h]h)}(hjh]h'The scaled ascent of the font in pixels}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MTubhz)}(h):sg:`get_sized_ascender(=0) -> int`h]h)}(hjh]h#get_sized_ascender(=0) -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MUubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MTubh)}(h~Return the number of units from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.h]h~Return the number of units from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MWhjh&hubeh}(h]h]h]h]h!]uh%jhjyh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt3get_sized_descender() (pygame.freetype.Font method)(pygame.freetype.Font.get_sized_descenderhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hget_sized_descenderh](j)}(hj h]hget_sized_descender}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)MZubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)MZubeh}(h]jah](jjeh]h]h!]jhjjjFont.get_sized_descenderjh׌Fontget_sized_descenderjFont.get_sized_descender()uh%j}h'h]h)MZhjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`The scaled descent of the font in pixels`h]h)}(hj7h]h(The scaled descent of the font in pixels}hj9sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)M\ubhz)}(h*:sg:`get_sized_descender(=0) -> int`h]h)}(hjNh]h$get_sized_descender(=0) -> int}hjPsbah}(h]h]jah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)M]ubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)M\ubh)}(hReturn the number of pixels from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.h]hReturn the number of pixels from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.}hjisbah}(h]h]h]h]h!]uh%hh'h]h)M_hj/h&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt0get_sized_height() (pygame.freetype.Font method)%pygame.freetype.Font.get_sized_heighthNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hget_sized_heighth](j)}(hjh]hget_sized_height}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mbubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mbubeh}(h]jah](jjeh]h]h!]jhjjjFont.get_sized_heightjh׌Fontget_sized_heightjFont.get_sized_height()uh%j}h'h]h)Mbhjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`The scaled height of the font in pixels`h]h)}(hjh]h'The scaled height of the font in pixels}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mdubhz)}(h':sg:`get_sized_height(=0) -> int`h]h)}(hjh]h!get_sized_height(=0) -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Meubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mdubh)}(hReturns the height of the font. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.h]hReturns the height of the font. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mghjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCj jDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt6get_sized_glyph_height() (pygame.freetype.Font method)+pygame.freetype.Font.get_sized_glyph_heighthNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hget_sized_glyph_heighth](j)}(hj%h]hget_sized_glyph_height}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%jhj#h&hh'h]h)Mjubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)Mjubeh}(h]jah](jjeh]h]h!]jhjjjFont.get_sized_glyph_heightjh׌Fontget_sized_glyph_heightjFont.get_sized_glyph_height()uh%j}h'h]h)Mjhj h&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`The scaled bounding box height of the font in pixels`h]h)}(hjQh]h4The scaled bounding box height of the font in pixels}hjSsbah}(h]h]hah]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mlubhz)}(h-:sg:`get_sized_glyph_height(=0) -> int`h]h)}(hjhh]h'get_sized_glyph_height(=0) -> int}hjjsbah}(h]h]jah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mmubeh}(h]h]h]h]h!]uh%huhjIh&hh'h]h)Mlubh)}(hReturn the glyph bounding box height of the font in pixels. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.h]hReturn the glyph bounding box height of the font in pixels. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MohjIh&hubeh}(h]h]h]h]h!]uh%jhj h&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)get_sizes() (pygame.freetype.Font method)pygame.freetype.Font.get_sizeshNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h get_sizesh](j)}(hjh]h get_sizes}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Msubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Msubeh}(h]jah](jjeh]h]h!]jhjjjFont.get_sizesjh׌Font get_sizesjFont.get_sizes()uh%j}h'h]h)Mshjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`return the available sizes of embedded bitmaps`h]h)}(hjh]h.return the available sizes of embedded bitmaps}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Muubhz)}(h9:sg:`get_sizes() -> [(int, int, int, float, float), ...]`h]h)}(hjh]h3get_sizes() -> [(int, int, int, float, float), ...]}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mvubhz)}(h:sg:`get_sizes() -> []`h]h)}(hj h]hget_sizes() -> []}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mwubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Muubh)}(hReturns a list of tuple records, one for each point size supported. Each tuple containing the point size, the height in pixels, width in pixels, horizontal ppem (nominal width) in fractional pixels, and vertical ppem (nominal height) in fractional pixels.h]hReturns a list of tuple records, one for each point size supported. Each tuple containing the point size, the height in pixels, width in pixels, horizontal ppem (nominal width) in fractional pixels, and vertical ppem (nominal height) in fractional pixels.}hj'sbah}(h]h]h]h]h!]uh%hh'h]h)Myhjh&hubeh}(h]h]h]h]h!]uh%jhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCj>jDj?jEj?jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt&render() (pygame.freetype.Font method)pygame.freetype.Font.renderhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hrenderh](j)}(hjVh]hrender}hjXsbah}(h]h](jjeh]h]h!]h#h$uh%jhjTh&hh'h]h)M~ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjTh&hh'h]h)M~ubeh}(h]jOah](jjeh]h]h!]jhjjj Font.renderjh׌Fontrenderj Font.render()uh%j}h'h]h)M~hjQh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Return rendered text as a surface`h]h)}(hjh]h!Return rendered text as a surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Mubhz)}(hj:sg:`render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)`h]h)}(hjh]hdrender(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjzh&hh'h]h)Mubh)}(hXGReturns a new :class:`Surface `, with the text rendered to it in the color given by 'fgcolor'. If no foreground color is given, the default foreground color, :attr:`fgcolor ` is used. If ``bgcolor`` is given, the surface will be filled with this color. When no background color is given, the surface background is transparent, zero alpha. Normally the returned surface has a 32 bit pixel size. However, if ``bgcolor`` is ``None`` and anti-aliasing is disabled a monochrome 8 bit colorkey surface, with colorkey set for the background color, is returned.h](hReturns a new }hjsbh6)}(h!:class:`Surface `h]h;)}(hjh]hSurface}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[pygame.Surfaceuh%h5h'h]h)Mhjubh, with the text rendered to it in the color given by 'fgcolor'. If no foreground color is given, the default foreground color, }hjsbh6)}(h:attr:`fgcolor `h]h;)}(hjh]hfgcolor}hjsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeattr refexplicitrefwarnhYhhZjh[ Font.fgcoloruh%h5h'h]h)Mhjubh is used. If }hjsbh;)}(h ``bgcolor``h]hbgcolor}hjsbah}(h]h]h]h]h!]uh%h:hjubh is given, the surface will be filled with this color. When no background color is given, the surface background is transparent, zero alpha. Normally the returned surface has a 32 bit pixel size. However, if }hjsbh;)}(h ``bgcolor``h]hbgcolor}hjsbah}(h]h]h]h]h!]uh%h:hjubh is }hjsbh;)}(h``None``h]hNone}hj(sbah}(h]h]h]h]h!]uh%h:hjubh| and anti-aliasing is disabled a monochrome 8 bit colorkey surface, with colorkey set for the background color, is returned.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hxThe return value is a tuple: the new surface and the bounding rectangle giving the size and origin of the rendered text.h]hxThe return value is a tuple: the new surface and the bounding rectangle giving the size and origin of the rendered text.}hj@sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hfIf an empty string is passed for text then the returned Rect is zero width and the height of the font.h]hfIf an empty string is passed for text then the returned Rect is zero width and the height of the font.}hjNsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(h}Optional *fgcolor*, *style*, *rotation*, and *size* arguments override the default values set for the :class:`Font` instance.h](h Optional }hj\sbjJ)}(h *fgcolor*h]hfgcolor}hjdsbah}(h]h]h]h]h!]uh%jIhj\ubh, }hj\sbjJ)}(h*style*h]hstyle}hjvsbah}(h]h]h]h]h!]uh%jIhj\ubh, }hj\sbjJ)}(h *rotation*h]hrotation}hjsbah}(h]h]h]h]h!]uh%jIhj\ubh, and }hj\sbjJ)}(h*size*h]hsize}hjsbah}(h]h]h]h]h!]uh%jIhj\ubh3 arguments override the default values set for the }hj\sbh6)}(h :class:`Font`h]h;)}(hjh]hFont}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[Fontuh%h5h'h]h)Mhj\ubh instance.}hj\sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hQIf *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``.h](hIf }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh= is a char (byte) string, then its encoding is assumed to be }hjsbh;)}(h ``LATIN1``h]hLATIN1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh)}(hOptionally, *text* can be ``None``, which will render the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for details.h](h Optionally, }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh can be }hjsbh;)}(h``None``h]hNone}hj"sbah}(h]h]h]h]h!]uh%h:hjubh2, which will render the text passed to a previous }hjsbh6)}(h:meth:`get_rect`h]h;)}(hj6h]h get_rect()}hj8sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj4ubah}(h]h]h]h]h!]refdochS refdomainjBreftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render`h]h;)}(hjZh]hrender()}hj\sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjXubah}(h]h]h]h]h!]refdochS refdomainjfreftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render_to`h]h;)}(hj~h]h render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj|ubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render_raw`h]h;)}(hjh]h render_raw()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_rawuh%h5h'h]h)Mhjubh, or }hjsbh6)}(h:meth:`render_raw_to`h]h;)}(hjh]hrender_raw_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_raw_touh%h5h'h]h)Mhjubh call. See }hjsbh6)}(h:meth:`render_to`h]h;)}(hjh]h render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh for details.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubeh}(h]h]h]h]h!]uh%jhjQh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjjDjjEjjFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)render_to() (pygame.freetype.Font method)pygame.freetype.Font.render_tohNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h render_toh](j)}(hj3h]h render_to}hj5sbah}(h]h](jjeh]h]h!]h#h$uh%jhj1h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj1h&hh'h]h)Mubeh}(h]j,ah](jjeh]h]h!]jhjjjFont.render_tojh׌Font render_tojFont.render_to()uh%j}h'h]h)Mhj.h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`Render text onto an existing surface`h]h)}(hj_h]h$Render text onto an existing surface}hjasbah}(h]h]hah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)Mubhz)}(hn:sg:`render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect`h]h)}(hjvh]hhrender_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect}hjxsbah}(h]h]jah]h]h!]uh%hhjtubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjWh&hh'h]h)Mubh)}(hXRenders the string *text* to the :mod:`pygame.Surface` *surf*, at position *dest*, a (x, y) surface coordinate pair. If either x or y is not an integer it is converted to one if possible. Any sequence where the first two items are x and y positional elements is accepted, including a :class:`Rect ` instance. As with :meth:`render`, optional *fgcolor*, *style*, *rotation*, and *size* argument are available.h](hRenders the string }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh to the }hjsbh6)}(h:mod:`pygame.Surface`h]h;)}(hjh]hpygame.Surface}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZjh[pygame.Surfaceuh%h5h'h]h)Mhjubh }hjsbjJ)}(h*surf*h]hsurf}hjsbah}(h]h]h]h]h!]uh%jIhjubh, at position }hjsbjJ)}(h*dest*h]hdest}hjsbah}(h]h]h]h]h!]uh%jIhjubh, a (x, y) surface coordinate pair. If either x or y is not an integer it is converted to one if possible. Any sequence where the first two items are x and y positional elements is accepted, including a }hjsbh6)}(h:class:`Rect `h]h;)}(hjh]hRect}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[ pygame.Rectuh%h5h'h]h)Mhjubh instance. As with }hjsbh6)}(h:meth:`render`h]h;)}(hjh]hrender()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj%reftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhjubh , optional }hjsbjJ)}(h *fgcolor*h]hfgcolor}hj;sbah}(h]h]h]h]h!]uh%jIhjubh, }hjsbjJ)}(h*style*h]hstyle}hjMsbah}(h]h]h]h]h!]uh%jIhjubh, }hjsbjJ)}(h *rotation*h]hrotation}hj_sbah}(h]h]h]h]h!]uh%jIhjubh, and }hjsbjJ)}(h*size*h]hsize}hjqsbah}(h]h]h]h]h!]uh%jIhjubh argument are available.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubh)}(hX-If a background color *bgcolor* is given, the text bounding box is first filled with that color. The text is blitted next. Both the background fill and text rendering involve full alpha blits. That is, the alpha values of the foreground, background, and destination target surface all affect the blit.h](hIf a background color }hjsbjJ)}(h *bgcolor*h]hbgcolor}hjsbah}(h]h]h]h]h!]uh%jIhjubhX is given, the text bounding box is first filled with that color. The text is blitted next. Both the background fill and text rendering involve full alpha blits. That is, the alpha values of the foreground, background, and destination target surface all affect the blit.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubh)}(heThe return value is a rectangle giving the size and position of the rendered text within the surface.h]heThe return value is a rectangle giving the size and position of the rendered text within the surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubh)}(hIf an empty string is passed for text then the returned :class:`Rect ` is zero width and the height of the font. The rect will test False.h](h8If an empty string is passed for text then the returned }hjsbh6)}(h:class:`Rect `h]h;)}(hjh]hRect}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[ pygame.Rectuh%h5h'h]h)MhjubhD is zero width and the height of the font. The rect will test False.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubh)}(hX0Optionally, *text* can be set ``None``, which will re-render text passed to a previous :meth:`render_to`, :meth:`get_rect`, :meth:`render`, :meth:`render_raw`, or :meth:`render_raw_to` call. Primarily, this feature is an aid to using :meth:`render_to` in combination with :meth:`get_rect`. An example: ::h](h Optionally, }hjsbjJ)}(h*text*h]htext}hjsbah}(h]h]h]h]h!]uh%jIhjubh can be set }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh1, which will re-render text passed to a previous }hjsbh6)}(h:meth:`render_to`h]h;)}(hjh]h render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj#reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`get_rect`h]h;)}(hj;h]h get_rect()}hj=sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj9ubah}(h]h]h]h]h!]refdochS refdomainjGreftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render`h]h;)}(hj_h]hrender()}hjasbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj]ubah}(h]h]h]h]h!]refdochS refdomainjkreftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhjubh, }hjsbh6)}(h:meth:`render_raw`h]h;)}(hjh]h render_raw()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_rawuh%h5h'h]h)Mhjubh, or }hjsbh6)}(h:meth:`render_raw_to`h]h;)}(hjh]hrender_raw_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_raw_touh%h5h'h]h)Mhjubh2 call. Primarily, this feature is an aid to using }hjsbh6)}(h:meth:`render_to`h]h;)}(hjh]h render_to()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjubh in combination with }hjsbh6)}(h:meth:`get_rect`h]h;)}(hjh]h get_rect()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhjubh . An example:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubj)}(hXdef word_wrap(surf, text, font, color=(0, 0, 0)): font.origin = True words = text.split(' ') width, height = surf.get_size() line_spacing = font.get_sized_height() + 2 x, y = 0, line_spacing space = font.get_rect(' ') for word in words: bounds = font.get_rect(word) if x + bounds.width + bounds.x >= width: x, y = 0, y + line_spacing if x + bounds.width + bounds.x >= width: raise ValueError("word too wide for the surface") if y + bounds.height - bounds.y >= height: raise ValueError("text to long for the surface") font.render_to(surf, (x, y), None, color) x += bounds.width + space.width return x, yh]hXdef word_wrap(surf, text, font, color=(0, 0, 0)): font.origin = True words = text.split(' ') width, height = surf.get_size() line_spacing = font.get_sized_height() + 2 x, y = 0, line_spacing space = font.get_rect(' ') for word in words: bounds = font.get_rect(word) if x + bounds.width + bounds.x >= width: x, y = 0, y + line_spacing if x + bounds.width + bounds.x >= width: raise ValueError("word too wide for the surface") if y + bounds.height - bounds.y >= height: raise ValueError("text to long for the surface") font.render_to(surf, (x, y), None, color) x += bounds.width + space.width return x, y}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MhjWh&hubh)}(hXWhen :meth:`render_to` is called with the same font properties ― :attr:`size`, :attr:`style`, :attr:`strength`, :attr:`wide`, :attr:`antialiased`, :attr:`vertical`, :attr:`rotation`, :attr:`kerning`, and :attr:`use_bitmap_strikes` ― as :meth:`get_rect`, :meth:`render_to` will use the layout calculated by :meth:`get_rect`. Otherwise, :meth:`render_to` will recalculate the layout if called with a text string or one of the above properties has changed after the :meth:`get_rect` call.h](hWhen }hj% sbh6)}(h:meth:`render_to`h]h;)}(hj/ h]h render_to()}hj1 sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj- ubah}(h]h]h]h]h!]refdochS refdomainj; reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj% ubh1 is called with the same font properties ― }hj% sbh6)}(h :attr:`size`h]h;)}(hjS h]hsize}hjU sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjQ ubah}(h]h]h]h]h!]refdochS refdomainj_ reftypeattr refexplicitrefwarnhYhhZjh[sizeuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h :attr:`style`h]h;)}(hjw h]hstyle}hjy sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hju ubah}(h]h]h]h]h!]refdochS refdomainj reftypeattr refexplicitrefwarnhYhhZjh[styleuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:attr:`strength`h]h;)}(hj h]hstrength}hj sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeattr refexplicitrefwarnhYhhZjh[strengthuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h :attr:`wide`h]h;)}(hj h]hwide}hj sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeattr refexplicitrefwarnhYhhZjh[wideuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:attr:`antialiased`h]h;)}(hj h]h antialiased}hj sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeattr refexplicitrefwarnhYhhZjh[ antialiaseduh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:attr:`vertical`h]h;)}(hj!h]hvertical}hj !sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypeattr refexplicitrefwarnhYhhZjh[verticaluh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:attr:`rotation`h]h;)}(hj+!h]hrotation}hj-!sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj)!ubah}(h]h]h]h]h!]refdochS refdomainj7!reftypeattr refexplicitrefwarnhYhhZjh[rotationuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:attr:`kerning`h]h;)}(hjO!h]hkerning}hjQ!sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjM!ubah}(h]h]h]h]h!]refdochS refdomainj[!reftypeattr refexplicitrefwarnhYhhZjh[kerninguh%h5h'h]h)Mhj% ubh, and }hj% sbh6)}(h:attr:`use_bitmap_strikes`h]h;)}(hjs!h]huse_bitmap_strikes}hju!sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjq!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypeattr refexplicitrefwarnhYhhZjh[use_bitmap_strikesuh%h5h'h]h)Mhj% ubh  ― as }hj% sbh6)}(h:meth:`get_rect`h]h;)}(hj!h]h get_rect()}hj!sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhj% ubh, }hj% sbh6)}(h:meth:`render_to`h]h;)}(hj!h]h render_to()}hj!sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj% ubh# will use the layout calculated by }hj% sbh6)}(h:meth:`get_rect`h]h;)}(hj!h]h get_rect()}hj!sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhj% ubh . Otherwise, }hj% sbh6)}(h:meth:`render_to`h]h;)}(hj"h]h render_to()}hj"sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj"ubah}(h]h]h]h]h!]refdochS refdomainj"reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj% ubho will recalculate the layout if called with a text string or one of the above properties has changed after the }hj% sbh6)}(h:meth:`get_rect`h]h;)}(hj'"h]h get_rect()}hj)"sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj%"ubah}(h]h]h]h]h!]refdochS refdomainj3"reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhj% ubh call.}hj% sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubh)}(hQIf *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``.h](hIf }hjO"sbjJ)}(h*text*h]htext}hjW"sbah}(h]h]h]h]h!]uh%jIhjO"ubh= is a char (byte) string, then its encoding is assumed to be }hjO"sbh;)}(h ``LATIN1``h]hLATIN1}hji"sbah}(h]h]h]h]h!]uh%h:hjO"ubh.}hjO"sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjWh&hubeh}(h]h]h]h]h!]uh%jhj.h&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCj"jDj"jEj"jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt*render_raw() (pygame.freetype.Font method)pygame.freetype.Font.render_rawhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h render_rawh](j)}(hj"h]h render_raw}hj"sbah}(h]h](jjeh]h]h!]h#h$uh%jhj"h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj"h&hh'h]h)Mubeh}(h]j"ah](jjeh]h]h!]jhjjjFont.render_rawjh׌Font render_rawjFont.render_raw()uh%j}h'h]h)Mhj"h&hubj)}(hhh](hv)}(hhh](hz)}(h/:sl:`Return rendered text as a string of bytes`h]h)}(hj"h]h)Return rendered text as a string of bytes}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubhz)}(hd:sg:`render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))`h]h)}(hj"h]h^render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))}hj"sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)Mubh)}(hLike :meth:`render` but with the pixels returned as a byte string of 8-bit gray-scale values. The foreground color is 255, the background 0, useful as an alpha mask for a foreground pattern.h](hLike }hj#sbh6)}(h:meth:`render`h]h;)}(hj #h]hrender()}hj #sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj#ubah}(h]h]h]h]h!]refdochS refdomainj#reftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhj#ubh but with the pixels returned as a byte string of 8-bit gray-scale values. The foreground color is 255, the background 0, useful as an alpha mask for a foreground pattern.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubeh}(h]h]h]h]h!]uh%jhj"h&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCj;#jDj<#jEj<#jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt-render_raw_to() (pygame.freetype.Font method)"pygame.freetype.Font.render_raw_tohNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h render_raw_toh](j)}(hjS#h]h render_raw_to}hjU#sbah}(h]h](jjeh]h]h!]h#h$uh%jhjQ#h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjQ#h&hh'h]h)Mubeh}(h]jL#ah](jjeh]h]h!]jhjjjFont.render_raw_tojh׌Font render_raw_tojFont.render_raw_to()uh%j}h'h]h)MhjN#h&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Render text into an array of ints`h]h)}(hj#h]h!Render text into an array of ints}hj#sbah}(h]h]hah]h]h!]uh%hhj}#ubah}(h]h]h]h]h!]uh%h)hKhjz#h&hh'h]h)Mubhz)}(hj:sg:`render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect`h]h)}(hj#h]hdrender_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect}hj#sbah}(h]h]jah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhjz#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjw#h&hh'h]h)Mubh)}(hXFRender to an array object exposing an array struct interface. The array must be two dimensional with integer items. The default *dest* value, ``None``, is equivalent to position (0, 0). See :meth:`render_to`. As with the other render methods, *text* can be ``None`` to render a text string passed previously to another method.h](hRender to an array object exposing an array struct interface. The array must be two dimensional with integer items. The default }hj#sbjJ)}(h*dest*h]hdest}hj#sbah}(h]h]h]h]h!]uh%jIhj#ubh value, }hj#sbh;)}(h``None``h]hNone}hj#sbah}(h]h]h]h]h!]uh%h:hj#ubh(, is equivalent to position (0, 0). See }hj#sbh6)}(h:meth:`render_to`h]h;)}(hj#h]h render_to()}hj#sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj#ubah}(h]h]h]h]h!]refdochS refdomainj#reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj#ubh$. As with the other render methods, }hj#sbjJ)}(h*text*h]htext}hj$sbah}(h]h]h]h]h!]uh%jIhj#ubh can be }hj#sbh;)}(h``None``h]hNone}hj$sbah}(h]h]h]h]h!]uh%h:hj#ubh= to render a text string passed previously to another method.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjw#h&hubh)}(h\The return value is a :func:`pygame.Rect` giving the size and position of the rendered text.h](hThe return value is a }hj+$sbh6)}(h:func:`pygame.Rect`h]h;)}(hj5$h]h pygame.Rect()}hj7$sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj3$ubah}(h]h]h]h]h!]refdochS refdomainjA$reftypefunc refexplicitrefwarnhYhhZjh[ pygame.Rectuh%h5h'h]h)Mhj+$ubh3 giving the size and position of the rendered text.}hj+$sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjw#h&hubeh}(h]h]h]h]h!]uh%jhjN#h&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jCjf$jDjg$jEjg$jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt&style (pygame.freetype.Font attribute)pygame.freetype.Font.stylehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hstyleh]j)}(hj~$h]hstyle}hj$sbah}(h]h](jjeh]h]h!]h#h$uh%jhj|$h&hh'h]h)Mubah}(h]jw$ah](jjeh]h]h!]jhjjj Font.stylejh׌Fontstylejj$uh%j}h'h]h)Mhjy$h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`The font's style flags`h]h)}(hj$h]hThe font's style flags}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Mubhz)}(h:sg:`style -> int`h]h)}(hj$h]h style -> int}hj$sbah}(h]h]jah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj$h&hh'h]h)Mubh)}(hX Gets or sets the default style of the Font. This default style will be used for all text rendering and size calculations unless overridden specifically a render or :meth:`get_rect` call. The style value may be a bit-wise OR of one or more of the following constants:h](hGets or sets the default style of the Font. This default style will be used for all text rendering and size calculations unless overridden specifically a render or }hj$sbh6)}(h:meth:`get_rect`h]h;)}(hj$h]h get_rect()}hj$sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj$ubah}(h]h]h]h]h!]refdochS refdomainj$reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhj$ubhV call. The style value may be a bit-wise OR of one or more of the following constants:}hj$sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj$h&hubj)}(hPSTYLE_NORMAL STYLE_UNDERLINE STYLE_OBLIQUE STYLE_STRONG STYLE_WIDE STYLE_DEFAULTh]hPSTYLE_NORMAL STYLE_UNDERLINE STYLE_OBLIQUE STYLE_STRONG STYLE_WIDE STYLE_DEFAULT}hj%sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhj$h&hubh)}(hThese constants may be found on the FreeType constants module. Optionally, the default style can be modified or obtained accessing the individual style attributes (underline, oblique, strong).h]hThese constants may be found on the FreeType constants module. Optionally, the default style can be modified or obtained accessing the individual style attributes (underline, oblique, strong).}hj%sbah}(h]h]h]h]h!]uh%hh'h]h)M hj$h&hubh)}(hThe ``STYLE_OBLIQUE`` and ``STYLE_STRONG`` styles are for scalable fonts only. An attempt to set either for a bitmap font raises an AttributeError. An attempt to set either for an inactive font, as returned by ``Font.__new__()``, raises a RuntimeError.h](hThe }hj%sbh;)}(h``STYLE_OBLIQUE``h]h STYLE_OBLIQUE}hj'%sbah}(h]h]h]h]h!]uh%h:hj%ubh and }hj%sbh;)}(h``STYLE_STRONG``h]h STYLE_STRONG}hj9%sbah}(h]h]h]h]h!]uh%h:hj%ubh styles are for scalable fonts only. An attempt to set either for a bitmap font raises an AttributeError. An attempt to set either for an inactive font, as returned by }hj%sbh;)}(h``Font.__new__()``h]hFont.__new__()}hjK%sbah}(h]h]h]h]h!]uh%h:hj%ubh, raises a RuntimeError.}hj%sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj$h&hubh)}(hAssigning ``STYLE_DEFAULT`` to the :attr:`style` property leaves the property unchanged, as this property defines the default. The :attr:`style` property will never return ``STYLE_DEFAULT``.h](h Assigning }hjc%sbh;)}(h``STYLE_DEFAULT``h]h STYLE_DEFAULT}hjk%sbah}(h]h]h]h]h!]uh%h:hjc%ubh to the }hjc%sbh6)}(h :attr:`style`h]h;)}(hj%h]hstyle}hj%sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj}%ubah}(h]h]h]h]h!]refdochS refdomainj%reftypeattr refexplicitrefwarnhYhhZjh[styleuh%h5h'h]h)Mhjc%ubhS property leaves the property unchanged, as this property defines the default. The }hjc%sbh6)}(h :attr:`style`h]h;)}(hj%h]hstyle}hj%sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj%ubah}(h]h]h]h]h!]refdochS refdomainj%reftypeattr refexplicitrefwarnhYhhZjh[styleuh%h5h'h]h)Mhjc%ubh property will never return }hjc%sbh;)}(h``STYLE_DEFAULT``h]h STYLE_DEFAULT}hj%sbah}(h]h]h]h]h!]uh%h:hjc%ubh.}hjc%sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj$h&hubeh}(h]h]h]h]h!]uh%jhjy$h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj%jDj%jEj%jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt*underline (pygame.freetype.Font attribute)pygame.freetype.Font.underlinehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h underlineh]j)}(hj%h]h underline}hj&sbah}(h]h](jjeh]h]h!]h#h$uh%jhj%h&hh'h]h)Mubah}(h]j%ah](jjeh]h]h!]jhjjjFont.underlinejh׌Font underlinejj&uh%j}h'h]h)Mhj%h&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`The state of the font's underline style flag`h]h)}(hj&h]h,The state of the font's underline style flag}hj!&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubhz)}(h:sg:`underline -> bool`h]h)}(hj6&h]hunderline -> bool}hj8&sbah}(h]h]jah]h]h!]uh%hhj4&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)Mubh)}(hGets or sets whether the font will be underlined when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter.h](hGets or sets whether the font will be underlined when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or }hjQ&sbh6)}(h:meth:`get_rect`h]h;)}(hj[&h]h get_rect()}hj]&sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjY&ubah}(h]h]h]h]h!]refdochS refdomainjg&reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)MhjQ&ubh! call, via the 'style' parameter.}hjQ&sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubeh}(h]h]h]h]h!]uh%jhj%h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj&jDj&jEj&jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt'strong (pygame.freetype.Font attribute)pygame.freetype.Font.stronghNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hstrongh]j)}(hj&h]hstrong}hj&sbah}(h]h](jjeh]h]h!]h#h$uh%jhj&h&hh'h]h)M!ubah}(h]j&ah](jjeh]h]h!]jhjjj Font.strongjh׌Fontstrongjj&uh%j}h'h]h)M!hj&h&hubj)}(hhh](hv)}(hhh](hz)}(h/:sl:`The state of the font's strong style flag`h]h)}(hj&h]h)The state of the font's strong style flag}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)M#ubhz)}(h:sg:`strong -> bool`h]h)}(hj&h]hstrong -> bool}hj&sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)M$ubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)M#ubh)}(hGets or sets whether the font will be bold when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter.h](hGets or sets whether the font will be bold when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or }hj&sbh6)}(h:meth:`get_rect`h]h;)}(hj'h]h get_rect()}hj'sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj&ubah}(h]h]h]h]h!]refdochS refdomainj 'reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)M&hj&ubh! call, via the 'style' parameter.}hj&sbeh}(h]h]h]h]h!]uh%hh'h]h)M&hj&h&hubeh}(h]h]h]h]h!]uh%jhj&h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj2'jDj3'jEj3'jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt(oblique (pygame.freetype.Font attribute)pygame.freetype.Font.obliquehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hobliqueh]j)}(hjJ'h]hoblique}hjL'sbah}(h]h](jjeh]h]h!]h#h$uh%jhjH'h&hh'h]h)M+ubah}(h]jC'ah](jjeh]h]h!]jhjjj Font.obliquejh׌Fontobliquejj_'uh%j}h'h]h)M+hjE'h&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`The state of the font's oblique style flag`h]h)}(hjk'h]h*The state of the font's oblique style flag}hjm'sbah}(h]h]hah]h]h!]uh%hhji'ubah}(h]h]h]h]h!]uh%h)hKhjf'h&hh'h]h)M-ubhz)}(h:sg:`oblique -> bool`h]h)}(hj'h]hoblique -> bool}hj'sbah}(h]h]jah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhjf'h&hh'h]h)M.ubeh}(h]h]h]h]h!]uh%huhjc'h&hh'h]h)M-ubh)}(hGets or sets whether the font will be rendered as oblique. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the *style* parameter.h](hGets or sets whether the font will be rendered as oblique. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or }hj'sbh6)}(h:meth:`get_rect`h]h;)}(hj'h]h get_rect()}hj'sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj'ubah}(h]h]h]h]h!]refdochS refdomainj'reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)M0hj'ubh call, via the }hj'sbjJ)}(h*style*h]hstyle}hj'sbah}(h]h]h]h]h!]uh%jIhj'ubh parameter.}hj'sbeh}(h]h]h]h]h!]uh%hh'h]h)M0hjc'h&hubh)}(hThe oblique style is only supported for scalable (outline) fonts. An attempt to set this style on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, setting this property raises a RuntimeError.h](hThe oblique style is only supported for scalable (outline) fonts. An attempt to set this style on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by }hj'sbh;)}(h``Font.__new__()``h]hFont.__new__()}hj'sbah}(h]h]h]h]h!]uh%h:hj'ubh., setting this property raises a RuntimeError.}hj'sbeh}(h]h]h]h]h!]uh%hh'h]h)M5hjc'h&hubeh}(h]h]h]h]h!]uh%jhjE'h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj (jDj (jEj (jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%wide (pygame.freetype.Font attribute)pygame.freetype.Font.widehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hwideh]j)}(hj"(h]hwide}hj$(sbah}(h]h](jjeh]h]h!]h#h$uh%jhj (h&hh'h]h)M:ubah}(h]j(ah](jjeh]h]h!]jhjjj Font.widejh׌Fontwidejj7(uh%j}h'h]h)M:hj(h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`The state of the font's wide style flag`h]h)}(hjC(h]h'The state of the font's wide style flag}hjE(sbah}(h]h]hah]h]h!]uh%hhjA(ubah}(h]h]h]h]h!]uh%h)hKhj>(h&hh'h]h)M<ubhz)}(h:sg:`wide -> bool`h]h)}(hjZ(h]h wide -> bool}hj\(sbah}(h]h]jah]h]h!]uh%hhjX(ubah}(h]h]h]h]h!]uh%h)hKhj>(h&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%huhj;(h&hh'h]h)M<ubh)}(hGets or sets whether the font will be stretched horizontally when drawing text. It produces a result similar to :class:`pygame.font.Font`'s bold. This style not available for rotated text.h](hpGets or sets whether the font will be stretched horizontally when drawing text. It produces a result similar to }hju(sbh6)}(h:class:`pygame.font.Font`h]h;)}(hj(h]hpygame.font.Font}hj(sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj}(ubah}(h]h]h]h]h!]refdochS refdomainj(reftypeclass refexplicitrefwarnhYhhZjh[pygame.font.Fontuh%h5h'h]h)M?hju(ubh3's bold. This style not available for rotated text.}hju(sbeh}(h]h]h]h]h!]uh%hh'h]h)M?hj;(h&hubeh}(h]h]h]h]h!]uh%jhj(h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj(jDj(jEj(jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)strength (pygame.freetype.Font attribute)pygame.freetype.Font.strengthhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hstrengthh]j)}(hj(h]hstrength}hj(sbah}(h]h](jjeh]h]h!]h#h$uh%jhj(h&hh'h]h)MDubah}(h]j(ah](jjeh]h]h!]jhjjj Font.strengthjh׌Fontstrengthjj(uh%j}h'h]h)MDhj(h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`The strength associated with the strong or wide font styles`h]h)}(hj(h]h;The strength associated with the strong or wide font styles}hj(sbah}(h]h]hah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)MFubhz)}(h:sg:`strength -> float`h]h)}(hj)h]hstrength -> float}hj)sbah}(h]h]jah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)MGubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)MFubh)}(hXThe amount by which a font glyph's size is enlarged for the strong or wide transformations, as a fraction of the untransformed size. For the wide style only the horizontal dimension is increased. For strong text both the horizontal and vertical dimensions are enlarged. A wide style of strength 0.08333 ( 1/12 ) is equivalent to the :class:`pygame.font.Font` bold style. The default is 0.02778 ( 1/36 ).h](hXMThe amount by which a font glyph's size is enlarged for the strong or wide transformations, as a fraction of the untransformed size. For the wide style only the horizontal dimension is increased. For strong text both the horizontal and vertical dimensions are enlarged. A wide style of strength 0.08333 ( 1/12 ) is equivalent to the }hj)sbh6)}(h:class:`pygame.font.Font`h]h;)}(hj%)h]hpygame.font.Font}hj')sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj#)ubah}(h]h]h]h]h!]refdochS refdomainj1)reftypeclass refexplicitrefwarnhYhhZjh[pygame.font.Fontuh%h5h'h]h)MIhj)ubh- bold style. The default is 0.02778 ( 1/36 ).}hj)sbeh}(h]h]h]h]h!]uh%hh'h]h)MIhj(h&hubh)}(hXThe strength style is only supported for scalable (outline) fonts. An attempt to set this property on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, assignment to this property raises a RuntimeError.h](hThe strength style is only supported for scalable (outline) fonts. An attempt to set this property on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by }hjM)sbh;)}(h``Font.__new__()``h]hFont.__new__()}hjU)sbah}(h]h]h]h]h!]uh%h:hjM)ubh4, assignment to this property raises a RuntimeError.}hjM)sbeh}(h]h]h]h]h!]uh%hh'h]h)MQhj(h&hubeh}(h]h]h]h]h!]uh%jhj(h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjv)jDjw)jEjw)jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt5underline_adjustment (pygame.freetype.Font attribute))pygame.freetype.Font.underline_adjustmenthNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hunderline_adjustmenth]j)}(hj)h]hunderline_adjustment}hj)sbah}(h]h](jjeh]h]h!]h#h$uh%jhj)h&hh'h]h)MVubah}(h]j)ah](jjeh]h]h!]jhjjjFont.underline_adjustmentjh׌Fontunderline_adjustmentjj)uh%j}h'h]h)MVhj)h&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`Adjustment factor for the underline position`h]h)}(hj)h]h,Adjustment factor for the underline position}hj)sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)MXubhz)}(h#:sg:`underline_adjustment -> float`h]h)}(hj)h]hunderline_adjustment -> float}hj)sbah}(h]h]jah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)MYubeh}(h]h]h]h]h!]uh%huhj)h&hh'h]h)MXubh)}(hXGets or sets a factor which, when positive, is multiplied with the font's underline offset to adjust the underline position. A negative value turns an underline into a strike-through or overline. It is multiplied with the ascender. Accepted values range between -2.0 and 2.0 inclusive. A value of 0.5 closely matches Tango underlining. A value of 1.0 mimics :class:`pygame.font.Font` underlining.h](hXfGets or sets a factor which, when positive, is multiplied with the font's underline offset to adjust the underline position. A negative value turns an underline into a strike-through or overline. It is multiplied with the ascender. Accepted values range between -2.0 and 2.0 inclusive. A value of 0.5 closely matches Tango underlining. A value of 1.0 mimics }hj)sbh6)}(h:class:`pygame.font.Font`h]h;)}(hj)h]hpygame.font.Font}hj)sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj)ubah}(h]h]h]h]h!]refdochS refdomainj)reftypeclass refexplicitrefwarnhYhhZjh[pygame.font.Fontuh%h5h'h]h)M[hj)ubh underlining.}hj)sbeh}(h]h]h]h]h!]uh%hh'h]h)M[hj)h&hubeh}(h]h]h]h]h!]uh%jhj)h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj*jDj*jEj*jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt,fixed_width (pygame.freetype.Font attribute) pygame.freetype.Font.fixed_widthhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h fixed_widthh]j)}(hj4*h]h fixed_width}hj6*sbah}(h]h](jjeh]h]h!]h#h$uh%jhj2*h&hh'h]h)Mbubah}(h]j-*ah](jjeh]h]h!]jhjjjFont.fixed_widthۋjh׌Font fixed_widthjjI*uh%j}h'h]h)Mbhj/*h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`Gets whether the font is fixed-width`h]h)}(hjU*h]h$Gets whether the font is fixed-width}hjW*sbah}(h]h]hah]h]h!]uh%hhjS*ubah}(h]h]h]h]h!]uh%h)hKhjP*h&hh'h]h)Mdubhz)}(h:sg:`fixed_width -> bool`h]h)}(hjl*h]hfixed_width -> bool}hjn*sbah}(h]h]jah]h]h!]uh%hhjj*ubah}(h]h]h]h]h!]uh%h)hKhjP*h&hh'h]h)Meubeh}(h]h]h]h]h!]uh%huhjM*h&hh'h]h)Mdubh)}(hRead only. Returns ``True`` if the font contains fixed-width characters (for example Courier, Bitstream Vera Sans Mono, Andale Mono).h](hRead only. Returns }hj*sbh;)}(h``True``h]hTrue}hj*sbah}(h]h]h]h]h!]uh%h:hj*ubhj if the font contains fixed-width characters (for example Courier, Bitstream Vera Sans Mono, Andale Mono).}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)MghjM*h&hubeh}(h]h]h]h]h!]uh%jhj/*h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj*jDj*jEj*jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt,fixed_sizes (pygame.freetype.Font attribute) pygame.freetype.Font.fixed_sizeshNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h fixed_sizesh]j)}(hj*h]h fixed_sizes}hj*sbah}(h]h](jjeh]h]h!]h#h$uh%jhj*h&hh'h]h)Mjubah}(h]j*ah](jjeh]h]h!]jhjjjFont.fixed_sizesjh׌Font fixed_sizesjj*uh%j}h'h]h)Mjhj*h&hubj)}(hhh](hv)}(hhh](hz)}(h7:sl:`the number of available bitmap sizes for the font`h]h)}(hj*h]h1the number of available bitmap sizes for the font}hj*sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mlubhz)}(h:sg:`fixed_sizes -> int`h]h)}(hj+h]hfixed_sizes -> int}hj+sbah}(h]h]jah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mmubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)Mlubh)}(hRead only. Returns the number of point sizes for which the font contains bitmap character images. If zero then the font is not a bitmap font. A scalable font may contain pre-rendered point sizes as strikes.h]hRead only. Returns the number of point sizes for which the font contains bitmap character images. If zero then the font is not a bitmap font. A scalable font may contain pre-rendered point sizes as strikes.}hj+sbah}(h]h]h]h]h!]uh%hh'h]h)Mohj*h&hubeh}(h]h]h]h]h!]uh%jhj*h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj2+jDj3+jEj3+jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)scalable (pygame.freetype.Font attribute)pygame.freetype.Font.scalablehNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hscalableh]j)}(hjJ+h]hscalable}hjL+sbah}(h]h](jjeh]h]h!]h#h$uh%jhjH+h&hh'h]h)Msubah}(h]jC+ah](jjeh]h]h!]jhjjj Font.scalablejh׌Fontscalablejj_+uh%j}h'h]h)MshjE+h&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Gets whether the font is scalable`h]h)}(hjk+h]h!Gets whether the font is scalable}hjm+sbah}(h]h]hah]h]h!]uh%hhji+ubah}(h]h]h]h]h!]uh%h)hKhjf+h&hh'h]h)Muubhz)}(h:sg:`scalable -> bool`h]h)}(hj+h]hscalable -> bool}hj+sbah}(h]h]jah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhjf+h&hh'h]h)Mvubeh}(h]h]h]h]h!]uh%huhjc+h&hh'h]h)Muubh)}(hRead only. Returns ``True`` if the font contains outline glyphs. If so, the point size is not limited to available bitmap sizes.h](hRead only. Returns }hj+sbh;)}(h``True``h]hTrue}hj+sbah}(h]h]h]h]h!]uh%h:hj+ubhe if the font contains outline glyphs. If so, the point size is not limited to available bitmap sizes.}hj+sbeh}(h]h]h]h]h!]uh%hh'h]h)Mxhjc+h&hubeh}(h]h]h]h]h!]uh%jhjE+h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj+jDj+jEj+jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt3use_bitmap_strikes (pygame.freetype.Font attribute)'pygame.freetype.Font.use_bitmap_strikeshNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(huse_bitmap_strikesh]j)}(hj+h]huse_bitmap_strikes}hj+sbah}(h]h](jjeh]h]h!]h#h$uh%jhj+h&hh'h]h)M{ubah}(h]j+ah](jjeh]h]h!]jhjjjFont.use_bitmap_strikesjh׌Fontuse_bitmap_strikesjj+uh%j}h'h]h)M{hj+h&hubj)}(hhh](hv)}(hhh](hz)}(h?:sl:`allow the use of embedded bitmaps in an outline font file`h]h)}(hj+h]h9allow the use of embedded bitmaps in an outline font file}hj,sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)M}ubhz)}(h :sg:`use_bitmap_strikes -> bool`h]h)}(hj,h]huse_bitmap_strikes -> bool}hj,sbah}(h]h]jah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%huhj+h&hh'h]h)M}ubh)}(hXSome scalable fonts include embedded bitmaps for particular point sizes. This property controls whether or not those bitmap strikes are used. Set it ``False`` to disable the loading of any bitmap strike. Set it ``True``, the default, to permit bitmap strikes for a non-rotated render with no style other than :attr:`wide` or :attr:`underline`. This property is ignored for bitmap fonts.h](hSome scalable fonts include embedded bitmaps for particular point sizes. This property controls whether or not those bitmap strikes are used. Set it }hj1,sbh;)}(h ``False``h]hFalse}hj9,sbah}(h]h]h]h]h!]uh%h:hj1,ubh5 to disable the loading of any bitmap strike. Set it }hj1,sbh;)}(h``True``h]hTrue}hjK,sbah}(h]h]h]h]h!]uh%h:hj1,ubhZ, the default, to permit bitmap strikes for a non-rotated render with no style other than }hj1,sbh6)}(h :attr:`wide`h]h;)}(hj_,h]hwide}hja,sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj],ubah}(h]h]h]h]h!]refdochS refdomainjk,reftypeattr refexplicitrefwarnhYhhZjh[wideuh%h5h'h]h)Mhj1,ubh or }hj1,sbh6)}(h:attr:`underline`h]h;)}(hj,h]h underline}hj,sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj,reftypeattr refexplicitrefwarnhYhhZjh[ underlineuh%h5h'h]h)Mhj1,ubh,. This property is ignored for bitmap fonts.}hj1,sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj+h&hubh)}(h3See also :attr:`fixed_sizes` and :meth:`get_sizes`.h](h See also }hj,sbh6)}(h:attr:`fixed_sizes`h]h;)}(hj,h]h fixed_sizes}hj,sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj,reftypeattr refexplicitrefwarnhYhhZjh[ fixed_sizesuh%h5h'h]h)Mhj,ubh and }hj,sbh6)}(h:meth:`get_sizes`h]h;)}(hj,h]h get_sizes()}hj,sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj,reftypemeth refexplicitrefwarnhYhhZjh[ get_sizesuh%h5h'h]h)Mhj,ubh.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj+h&hubeh}(h]h]h]h]h!]uh%jhj+h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj -jDj -jEj -jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt,antialiased (pygame.freetype.Font attribute) pygame.freetype.Font.antialiasedhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h antialiasedh]j)}(hj"-h]h antialiased}hj$-sbah}(h]h](jjeh]h]h!]h#h$uh%jhj -h&hh'h]h)Mubah}(h]j-ah](jjeh]h]h!]jhjjjFont.antialiasedjh׌Font antialiasedjj7-uh%j}h'h]h)Mhj-h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Font anti-aliasing mode`h]h)}(hjC-h]hFont anti-aliasing mode}hjE-sbah}(h]h]hah]h]h!]uh%hhjA-ubah}(h]h]h]h]h!]uh%h)hKhj>-h&hh'h]h)Mubhz)}(h:sg:`antialiased -> bool`h]h)}(hjZ-h]hantialiased -> bool}hj\-sbah}(h]h]jah]h]h!]uh%hhjX-ubah}(h]h]h]h]h!]uh%h)hKhj>-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj;-h&hh'h]h)Mubh)}(hGets or sets the font's anti-aliasing mode. This defaults to ``True`` on all fonts, which are rendered with full 8 bit blending.h](h=Gets or sets the font's anti-aliasing mode. This defaults to }hju-sbh;)}(h``True``h]hTrue}hj}-sbah}(h]h]h]h]h!]uh%h:hju-ubh; on all fonts, which are rendered with full 8 bit blending.}hju-sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;-h&hubh)}(hqSet to ``False`` to do monochrome rendering. This should provide a small speed gain and reduce cache memory size.h](hSet to }hj-sbh;)}(h ``False``h]hFalse}hj-sbah}(h]h]h]h]h!]uh%h:hj-ubha to do monochrome rendering. This should provide a small speed gain and reduce cache memory size.}hj-sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;-h&hubeh}(h]h]h]h]h!]uh%jhj-h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj-jDj-jEj-jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt(kerning (pygame.freetype.Font attribute)pygame.freetype.Font.kerninghNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hkerningh]j)}(hj-h]hkerning}hj-sbah}(h]h](jjeh]h]h!]h#h$uh%jhj-h&hh'h]h)Mubah}(h]j-ah](jjeh]h]h!]jhjjj Font.kerningjh׌Fontkerningjj-uh%j}h'h]h)Mhj-h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Character kerning mode`h]h)}(hj-h]hCharacter kerning mode}hj-sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubhz)}(h:sg:`kerning -> bool`h]h)}(hj.h]hkerning -> bool}hj.sbah}(h]h]jah]h]h!]uh%hhj .ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Mubh)}(hvGets or sets the font's kerning mode. This defaults to ``False`` on all fonts, which will be rendered without kerning.h](h7Gets or sets the font's kerning mode. This defaults to }hj).sbh;)}(h ``False``h]hFalse}hj1.sbah}(h]h]h]h]h!]uh%h:hj).ubh6 on all fonts, which will be rendered without kerning.}hj).sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj-h&hubh)}(hjSet to ``True`` to add kerning between character pairs, if supported by the font, when positioning glyphs.h](hSet to }hjI.sbh;)}(h``True``h]hTrue}hjQ.sbah}(h]h]h]h]h!]uh%h:hjI.ubh[ to add kerning between character pairs, if supported by the font, when positioning glyphs.}hjI.sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj-h&hubeh}(h]h]h]h]h!]uh%jhj-h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjr.jDjs.jEjs.jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)vertical (pygame.freetype.Font attribute)pygame.freetype.Font.verticalhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hverticalh]j)}(hj.h]hvertical}hj.sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubah}(h]j.ah](jjeh]h]h!]jhjjj Font.verticaljh׌Fontverticaljj.uh%j}h'h]h)Mhj.h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Font vertical mode`h]h)}(hj.h]hFont vertical mode}hj.sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubhz)}(h:sg:`vertical -> bool`h]h)}(hj.h]hvertical -> bool}hj.sbah}(h]h]jah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj.h&hh'h]h)Mubh)}(hGets or sets whether the characters are laid out vertically rather than horizontally. May be useful when rendering Kanji or some other vertical script.h]hGets or sets whether the characters are laid out vertically rather than horizontally. May be useful when rendering Kanji or some other vertical script.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj.h&hubh)}(hbSet to ``True`` to switch to a vertical text layout. The default is ``False``, place horizontally.h](hSet to }hj.sbh;)}(h``True``h]hTrue}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubh5 to switch to a vertical text layout. The default is }hj.sbh;)}(h ``False``h]hFalse}hj/sbah}(h]h]h]h]h!]uh%h:hj.ubh, place horizontally.}hj.sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj.h&hubh)}(hNote that the :class:`Font` class does not automatically determine script orientation. Vertical layout must be selected explicitly.h](hNote that the }hj/sbh6)}(h :class:`Font`h]h;)}(hj'/h]hFont}hj)/sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj%/ubah}(h]h]h]h]h!]refdochS refdomainj3/reftypeclass refexplicitrefwarnhYhhZjh[Fontuh%h5h'h]h)Mhj/ubhh class does not automatically determine script orientation. Vertical layout must be selected explicitly.}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj.h&hubh)}(hAlso note that several font formats (especially bitmap based ones) don't contain the necessary metrics to draw glyphs vertically, so drawing in those cases will give unspecified results.h]hAlso note that several font formats (especially bitmap based ones) don't contain the necessary metrics to draw glyphs vertically, so drawing in those cases will give unspecified results.}hjO/sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj.h&hubeh}(h]h]h]h]h!]uh%jhj.h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCjf/jDjg/jEjg/jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt)rotation (pygame.freetype.Font attribute)pygame.freetype.Font.rotationhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hrotationh]j)}(hj~/h]hrotation}hj/sbah}(h]h](jjeh]h]h!]h#h$uh%jhj|/h&hh'h]h)Mubah}(h]jw/ah](jjeh]h]h!]jhjjj Font.rotationjh׌Fontrotationjj/uh%j}h'h]h)Mhjy/h&hubj)}(hhh](hv)}(hhh](hz)}(h/:sl:`text rotation in degrees counterclockwise`h]h)}(hj/h]h)text rotation in degrees counterclockwise}hj/sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mubhz)}(h:sg:`rotation -> int`h]h)}(hj/h]hrotation -> int}hj/sbah}(h]h]jah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)Mubh)}(hXGets or sets the baseline angle of the rendered text. The angle is represented as integer degrees. The default angle is 0, with horizontal text rendered along the X-axis, and vertical text along the Y-axis. A positive value rotates these axes counterclockwise that many degrees. A negative angle corresponds to a clockwise rotation. The rotation value is normalized to a value within the range 0 to 359 inclusive (eg. 390 -> 390 - 360 -> 30, -45 -> 360 + -45 -> 315, 720 -> 720 - (2 * 360) -> 0).h]hXGets or sets the baseline angle of the rendered text. The angle is represented as integer degrees. The default angle is 0, with horizontal text rendered along the X-axis, and vertical text along the Y-axis. A positive value rotates these axes counterclockwise that many degrees. A negative angle corresponds to a clockwise rotation. The rotation value is normalized to a value within the range 0 to 359 inclusive (eg. 390 -> 390 - 360 -> 30, -45 -> 360 + -45 -> 315, 720 -> 720 - (2 * 360) -> 0).}hj/sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj/h&hubh)}(hOnly scalable (outline) fonts can be rotated. An attempt to change the rotation of a bitmap font raises an AttributeError. An attempt to change the rotation of an inactive font instance, as returned by ``Font.__new__()``, raises a RuntimeError.h](hOnly scalable (outline) fonts can be rotated. An attempt to change the rotation of a bitmap font raises an AttributeError. An attempt to change the rotation of an inactive font instance, as returned by }hj/sbh;)}(h``Font.__new__()``h]hFont.__new__()}hj/sbah}(h]h]h]h]h!]uh%h:hj/ubh, raises a RuntimeError.}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj/h&hubeh}(h]h]h]h]h!]uh%jhjy/h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj0jDj 0jEj 0jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt(fgcolor (pygame.freetype.Font attribute)pygame.freetype.Font.fgcolorhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hfgcolorh]j)}(hj 0h]hfgcolor}hj"0sbah}(h]h](jjeh]h]h!]h#h$uh%jhj0h&hh'h]h)Mubah}(h]j0ah](jjeh]h]h!]jhjjj Font.fgcolorjh׌Fontfgcolorjj50uh%j}h'h]h)Mhj0h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`default foreground color`h]h)}(hjA0h]hdefault foreground color}hjC0sbah}(h]h]hah]h]h!]uh%hhj?0ubah}(h]h]h]h]h!]uh%h)hKhj<0h&hh'h]h)Mubhz)}(h:sg:`fgcolor -> Color`h]h)}(hjX0h]hfgcolor -> Color}hjZ0sbah}(h]h]jah]h]h!]uh%hhjV0ubah}(h]h]h]h]h!]uh%h)hKhj<0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj90h&hh'h]h)Mubh)}(hGets or sets the default glyph rendering color. It is initially opaque black ― (0, 0, 0, 255). Applies to :meth:`render` and :meth:`render_to`.h](hpGets or sets the default glyph rendering color. It is initially opaque black ― (0, 0, 0, 255). Applies to }hjs0sbh6)}(h:meth:`render`h]h;)}(hj}0h]hrender()}hj0sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj{0ubah}(h]h]h]h]h!]refdochS refdomainj0reftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhjs0ubh and }hjs0sbh6)}(h:meth:`render_to`h]h;)}(hj0h]h render_to()}hj0sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj0ubah}(h]h]h]h]h!]refdochS refdomainj0reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhjs0ubh.}hjs0sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj90h&hubeh}(h]h]h]h]h!]uh%jhj0h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj0jDj0jEj0jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt(bgcolor (pygame.freetype.Font attribute)pygame.freetype.Font.bgcolorhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hbgcolorh]j)}(hj0h]hbgcolor}hj0sbah}(h]h](jjeh]h]h!]h#h$uh%jhj0h&hh'h]h)Mubah}(h]j0ah](jjeh]h]h!]jhjjj Font.bgcolorjh׌Fontbgcolorjj0uh%j}h'h]h)Mhj0h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`default background color`h]h)}(hj 1h]hdefault background color}hj 1sbah}(h]h]hah]h]h!]uh%hhj 1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubhz)}(h:sg:`bgcolor -> Color`h]h)}(hj"1h]hbgcolor -> Color}hj$1sbah}(h]h]jah]h]h!]uh%hhj 1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj1h&hh'h]h)Mubh)}(hGets or sets the default background rendering color. Initially it is unset and text will render with a transparent background by default. Applies to :meth:`render` and :meth:`render_to`.h](hGets or sets the default background rendering color. Initially it is unset and text will render with a transparent background by default. Applies to }hj=1sbh6)}(h:meth:`render`h]h;)}(hjG1h]hrender()}hjI1sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjE1ubah}(h]h]h]h]h!]refdochS refdomainjS1reftypemeth refexplicitrefwarnhYhhZjh[renderuh%h5h'h]h)Mhj=1ubh and }hj=1sbh6)}(h:meth:`render_to`h]h;)}(hjk1h]h render_to()}hjm1sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hji1ubah}(h]h]h]h]h!]refdochS refdomainjw1reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj=1ubh.}hj=1sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj1h&hubeh}(h]h]h]h]h!]uh%jhj0h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj1jDj1jEj1jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubj )}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj1sbah}(h]h](jj4eh]h]h!]uh%hhj1ubah}(h]h]h]h]h!] translatableuh%hhj1h&hh'h]h)Mubah}(h]h]h]h]h!]je versionaddedjg2.0.0uh%jh&hh'h]h)Mhjubhe)}(hhh]h}(h]h]h]h]h!]entries](jt'origin (pygame.freetype.Font attribute)pygame.freetype.Font.originhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(horiginh]j)}(hj1h]horigin}hj1sbah}(h]h](jjeh]h]h!]h#h$uh%jhj1h&hh'h]h)Mubah}(h]j1ah](jjeh]h]h!]jhjjj Font.originjh׌Fontoriginjj1uh%j}h'h]h)Mhj1h&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`Font render to text origin mode`h]h)}(hj1h]hFont render to text origin mode}hj1sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubhz)}(h:sg:`origin -> bool`h]h)}(hj2h]horigin -> bool}hj2sbah}(h]h]jah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj1h&hh'h]h)Mubh)}(hIf set ``True``, :meth:`render_to` and :meth:`render_raw_to` will take the *dest* position to be that of the text origin, as opposed to the top-left corner of the bounding box. See :meth:`get_rect` for details.h](hIf set }hj,2sbh;)}(h``True``h]hTrue}hj42sbah}(h]h]h]h]h!]uh%h:hj,2ubh, }hj,2sbh6)}(h:meth:`render_to`h]h;)}(hjH2h]h render_to()}hjJ2sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjF2ubah}(h]h]h]h]h!]refdochS refdomainjT2reftypemeth refexplicitrefwarnhYhhZjh[ render_touh%h5h'h]h)Mhj,2ubh and }hj,2sbh6)}(h:meth:`render_raw_to`h]h;)}(hjl2h]hrender_raw_to()}hjn2sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjj2ubah}(h]h]h]h]h!]refdochS refdomainjx2reftypemeth refexplicitrefwarnhYhhZjh[ render_raw_touh%h5h'h]h)Mhj,2ubh will take the }hj,2sbjJ)}(h*dest*h]hdest}hj2sbah}(h]h]h]h]h!]uh%jIhj,2ubhd position to be that of the text origin, as opposed to the top-left corner of the bounding box. See }hj,2sbh6)}(h:meth:`get_rect`h]h;)}(hj2h]h get_rect()}hj2sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj2reftypemeth refexplicitrefwarnhYhhZjh[get_rectuh%h5h'h]h)Mhj,2ubh for details.}hj,2sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj1h&hubeh}(h]h]h]h]h!]uh%jhj1h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj2jDj2jEj2jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt$pad (pygame.freetype.Font attribute)pygame.freetype.Font.padhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hpadh]j)}(hj2h]hpad}hj2sbah}(h]h](jjeh]h]h!]h#h$uh%jhj2h&hh'h]h)Mubah}(h]j2ah](jjeh]h]h!]jhjjjFont.padjh׌Fontpadjj3uh%j}h'h]h)Mhj2h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`padded boundary mode`h]h)}(hj 3h]hpadded boundary mode}hj3sbah}(h]h]hah]h]h!]uh%hhj 3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubhz)}(h:sg:`pad -> bool`h]h)}(hj#3h]h pad -> bool}hj%3sbah}(h]h]jah]h]h!]uh%hhj!3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj3h&hh'h]h)Mubh)}(hIf set ``True``, then the text boundary rectangle will be inflated to match that of :class:`font.Font `. Otherwise, the boundary rectangle is just large enough for the text.h](hIf set }hj>3sbh;)}(h``True``h]hTrue}hjF3sbah}(h]h]h]h]h!]uh%h:hj>3ubhE, then the text boundary rectangle will be inflated to match that of }hj>3sbh6)}(h%:class:`font.Font `h]h;)}(hjZ3h]h font.Font}hj\3sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjX3ubah}(h]h]h]h]h!]refdochS refdomainjf3reftypeclass refexplicitrefwarnhYhhZjh[pygame.font.Fontuh%h5h'h]h)Mhj>3ubhF. Otherwise, the boundary rectangle is just large enough for the text.}hj>3sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj3h&hubeh}(h]h]h]h]h!]uh%jhj2h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj3jDj3jEj3jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt%ucs4 (pygame.freetype.Font attribute)pygame.freetype.Font.ucs4hNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(hucs4h]j)}(hj3h]hucs4}hj3sbah}(h]h](jjeh]h]h!]h#h$uh%jhj3h&hh'h]h)Mubah}(h]j3ah](jjeh]h]h!]jhjjj Font.ucs4jh׌Fontucs4jj3uh%j}h'h]h)Mhj3h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Enable UCS-4 mode`h]h)}(hj3h]hEnable UCS-4 mode}hj3sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubhz)}(h:sg:`ucs4 -> bool`h]h)}(hj3h]h ucs4 -> bool}hj3sbah}(h]h]jah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj3h&hh'h]h)Mubh)}(hXGets or sets the decoding of Unicode text. By default, the freetype module performs UTF-16 surrogate pair decoding on Unicode text. This allows 32-bit escape sequences ('\Uxxxxxxxx') between 0x10000 and 0x10FFFF to represent their corresponding UTF-32 code points on Python interpreters built with a UCS-2 Unicode type (on Windows, for instance). It also means character values within the UTF-16 surrogate area (0xD800 to 0xDFFF) are considered part of a surrogate pair. A malformed surrogate pair will raise a UnicodeEncodeError. Setting ucs4 ``True`` turns surrogate pair decoding off, allowing access the full UCS-4 character range to a Python interpreter built with four-byte Unicode character support.h](hX Gets or sets the decoding of Unicode text. By default, the freetype module performs UTF-16 surrogate pair decoding on Unicode text. This allows 32-bit escape sequences ('Uxxxxxxxx') between 0x10000 and 0x10FFFF to represent their corresponding UTF-32 code points on Python interpreters built with a UCS-2 Unicode type (on Windows, for instance). It also means character values within the UTF-16 surrogate area (0xD800 to 0xDFFF) are considered part of a surrogate pair. A malformed surrogate pair will raise a UnicodeEncodeError. Setting ucs4 }hj3sbh;)}(h``True``h]hTrue}hj3sbah}(h]h]h]h]h!]uh%h:hj3ubh turns surrogate pair decoding off, allowing access the full UCS-4 character range to a Python interpreter built with four-byte Unicode character support.}hj3sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj3h&hubeh}(h]h]h]h]h!]uh%jhj3h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj4jDj 4jEj 4jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jt+resolution (pygame.freetype.Font attribute)pygame.freetype.Font.resolutionhNtauh%hdhjh&hh'h]h)Nubjy)}(hhh](j~)}(h resolutionh]j)}(hj74h]h resolution}hj94sbah}(h]h](jjeh]h]h!]h#h$uh%jhj54h&hh'h]h)Mubah}(h]j04ah](jjeh]h]h!]jhjjjFont.resolutionjh׌Font resolutionjjL4uh%j}h'h]h)Mhj24h&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Pixel resolution in dots per inch`h]h)}(hjX4h]h!Pixel resolution in dots per inch}hjZ4sbah}(h]h]hah]h]h!]uh%hhjV4ubah}(h]h]h]h]h!]uh%h)hKhjS4h&hh'h]h)Mubhz)}(h:sg:`resolution -> int`h]h)}(hjo4h]hresolution -> int}hjq4sbah}(h]h]jah]h]h!]uh%hhjm4ubah}(h]h]h]h]h!]uh%h)hKhjS4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjP4h&hh'h]h)Mubh)}(hWRead only. Gets pixel size used in scaling font glyphs for this :class:`Font` instance.h](h@Read only. Gets pixel size used in scaling font glyphs for this }hj4sbh6)}(h :class:`Font`h]h;)}(hj4h]hFont}hj4sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj4ubah}(h]h]h]h]h!]refdochS refdomainj4reftypeclass refexplicitrefwarnhYhhZjh[Fontuh%h5h'h]h)Mhj4ubh instance.}hj4sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjP4h&hubeh}(h]h]h]h]h!]uh%jhj24h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jCj4jDj4jEj4jFjGjHjIjJjKjLuh%jxh&hhjh'h]h)Nubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jCj4jDj4jEj4jFjGjHjIjJjKjLuh%jxh&hhh,h'Nh)Nubeh}(h](hspygame-freetypeeh]h]pygame.freetypeah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj 5error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}j,]j!asnameids}(j4j4j]j,u nametypes}(j4j]uh}(j4h,hsj )}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjvjjYj^jmjrjjjK jP j, j1 j j j j jN jS j j j j jjj,j-jjjjjj!jOjTjjjjjsjxjjjwj|jj jjjj#jjjOjTj,j1j"j"jL#jQ#jw$j|$j%j%j&j&jC'jH'j(j (j(j(j)j)j-*j2*j*j*jC+jH+j+j+j-j -j-j-j.j.jw/j|/j0j0j0j0j1j1j2j2j3j3j04j54u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]h system_message)}(hhh]h)}(hhh]hAHyperlink target "freetype-font-size-argument" is not referenced.}hj}5sbah}(h]h]h]h]h!]uh%hhjz5ubah}(h]h]h]h]h!]levelKtypeINFOsourceh]lineKuh%jx5uba transformerN include_log]docs/reST/ref/freetype.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612175.128141 pygame-2.6.1/docs/generated/doctrees/ref/gfxdraw.doctree0000644000175100001770000071000414676242417022711 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.gfxdraw`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.gfxdraw}hhh]hpixel}hjTsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jRhj<h&hh'h]h)K _toc_partsj1j> _toc_namepixel()uh%j:h'h]h)Kubhz)}(h):sg:`pixel(surface, x, y, color) -> None`h]h)}(hjh]h#pixel(surface, x, y, color) -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K?ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K>ubh)}(h?Draws a single pixel, at position (x ,y), on the given surface.h]h?Draws a single pixel, at position (x ,y), on the given surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KAhjh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](hliteral_strong)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]hliteral_emphasis)}(hSurfaceh]hSurface}hj sbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj  refspecific py:modulej1py:classNuh%h5hjubh)}hjsbh -- }hjsbhsurface to draw on}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h$x (int) -- x coordinate of the pixelh](j)}(hxh]hx}hjFsbah}(h]h]h]h]h!]uh%jhjBubh (}hjBsbh6)}(hhh]j )}(hinth]hint}hj[sbah}(h]h]h]h]h!]uh%j hjXubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetj]j$j%j1j&Nuh%h5hjBubh)}hjBsbh -- }hjBsbhx coordinate of the pixel}(hjBh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h$y (int) -- y coordinate of the pixelh](j)}(hyh]hy}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbhy coordinate of the pixel}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h(h]h(}hj4sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjEsbah}(h]h]h]h]h!]uh%j hjBubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjGj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hj]sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjnsbah}(h]h]h]h]h!]uh%j hjkubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjpj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubj )}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h]h]h]}hjsbah}(h]h]h]h]h!]uh%j hjubj )}(h)h]h)}hjsbah}(h]h]h]h]h!]uh%j hjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hj=sbah}(h]h]h]h]h!]uh%jhj:h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjRsbah}(h]h]h]h]h!]uh%h:hjNh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%jhj:ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjusbah}(h]h]h]h]h!]uh%jhjrh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj  refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjrubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.gfxdraw.pixel ##h]h## pygame.gfxdraw.pixel ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KMubeh}(h]h]h]h]h!]uh%j~hj7h&hh'Nh)Nubeh}(h]h](j functioneh]h]h!]domainj objtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1"hline() (in module pygame.gfxdraw)pygame.gfxdraw.hlinehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hhlineh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KOubjS)}(hjh]hhline}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)KOubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)KOubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj|hline()uh%j:h'h]h)KOhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a horizontal line`h]h)}(hj#h]hdraw a horizontal line}hj%sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KQubhz)}(h.:sg:`hline(surface, x1, x2, y, color) -> None`h]h)}(hj:h]h(hline(surface, x1, x2, y, color) -> None}hj<sbah}(h]h]jah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KRubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KQubh)}(hiDraws a straight horizontal line (``(x1, y)`` to ``(x2, y)``) on the given surface. There are no endcaps.h](h"Draws a straight horizontal line (}hjUsbh;)}(h ``(x1, y)``h]h(x1, y)}hj]sbah}(h]h]h]h]h!]uh%h:hjUubh to }hjUsbh;)}(h ``(x2, y)``h]h(x2, y)}hjosbah}(h]h]h]h]h!]uh%h:hjUubh-) on the given surface. There are no endcaps.}hjUsbeh}(h]h]h]h]h!]uh%hh'h]h)KThjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbhsurface to draw on}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h/x1 (int) -- x coordinate of one end of the lineh](j)}(hx1h]hx1}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh#x coordinate of one end of the line}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h5x2 (int) -- x coordinate of the other end of the lineh](j)}(hx2h]hx2}hjAsbah}(h]h]h]h]h!]uh%jhj=ubh (}hj=sbh6)}(hhh]j )}(hinth]hint}hjVsbah}(h]h]h]h]h!]uh%j hjSubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjXj$j%j1j&Nuh%h5hj=ubh)}hj=sbh -- }hj=sbh)x coordinate of the other end of the line}(hj=h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h#y (int) -- y coordinate of the lineh](j)}(hjh]hy}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbhy coordinate of the line}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(htupleh]htuple}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjubj )}(hj6h]h(}hj. sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hj> sbah}(h]h]h]h]h!]uh%j hj; ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj@ j$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjV sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjg sbah}(h]h]h]h]h!]uh%j hjd ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetji j$j%j1j&Nuh%h5hjubj )}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjubj )}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h[}hj sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjubj )}(hjh]h]}hj sbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h)}hj sbah}(h]h]h]h]h!]uh%j hjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hj3 sbah}(h]h]h]h]h!]uh%jhj0 h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjH sbah}(h]h]h]h]h!]uh%h:hjD h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjA ubah}(h]h]h]h]h!]uh%jhj0 ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjk sbah}(h]h]h]h]h!]uh%jhjh h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj| ubah}(h]h]h]h]h!]uh%hhjy ubah}(h]h]h]h]h!]uh%jhjh ubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.gfxdraw.hline ##h]h## pygame.gfxdraw.hline ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjj jj jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1"vline() (in module pygame.gfxdraw)pygame.gfxdraw.vlinehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hvlineh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj h&hh'h]h)KdubjS)}(hj h]hvline}hj sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj h&hh'h]h)Kdubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj h&hh'h]h)Kdubeh}(h]j ah](jrjseh]h]h!]jwj1jxhjyj jzj1j j|vline()uh%j:h'h]h)Kdhj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a vertical line`h]h)}(hj h]hdraw a vertical line}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kfubhz)}(h.:sg:`vline(surface, x, y1, y2, color) -> None`h]h)}(hj& h]h(vline(surface, x, y1, y2, color) -> None}hj( sbah}(h]h]jah]h]h!]uh%hhj$ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kfubh)}(hgDraws a straight vertical line (``(x, y1)`` to ``(x, y2)``) on the given surface. There are no endcaps.h](h Draws a straight vertical line (}hjA sbh;)}(h ``(x, y1)``h]h(x, y1)}hjI sbah}(h]h]h]h]h!]uh%h:hjA ubh to }hjA sbh;)}(h ``(x, y2)``h]h(x, y2)}hj[ sbah}(h]h]h]h]h!]uh%h:hjA ubh-) on the given surface. There are no endcaps.}hjA sbeh}(h]h]h]h]h!]uh%hh'h]h)Kihj h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjy sbah}(h]h]h]h]h!]uh%jhjv h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj sbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hj ubh)}hj sbh -- }hj sbhsurface to draw on}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhj ubj)}(hhh]h)}(h#x (int) -- x coordinate of the lineh](j)}(hjHh]hx}hj sbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hj ubh)}hj sbh -- }hj sbhx coordinate of the line}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhj ubj)}(hhh]h)}(h/y1 (int) -- y coordinate of one end of the lineh](j)}(hy1h]hy1}hj, sbah}(h]h]h]h]h!]uh%jhj( ubh (}hj( sbh6)}(hhh]j )}(hinth]hint}hjA sbah}(h]h]h]h]h!]uh%j hj> ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjC j$j%j1j&Nuh%h5hj( ubh)}hj( sbh -- }hj( sbh#y coordinate of one end of the line}(hj( h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%jhj ubj)}(hhh]h)}(h5y2 (int) -- y coordinate of the other end of the lineh](j)}(hy2h]hy2}hjx sbah}(h]h]h]h]h!]uh%jhjt ubh (}hjt sbh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjt ubh)}hjt sbh -- }hjt sbh)y coordinate of the other end of the line}(hjt h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjq ubah}(h]h]h]h]h!]uh%jhj ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj sbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j )}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hj ubj )}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%j hj ubh6)}(hhh]j )}(htupleh]htuple}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hj ubj )}(hj6h]h(}hj sbah}(h]h]h]h]h!]uh%j hj ubh6)}(hhh]j )}(hinth]hint}hj* sbah}(h]h]h]h]h!]uh%j hj' ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj, j$j%j1j&Nuh%h5hj ubj )}(h, h]h, }hjB sbah}(h]h]h]h]h!]uh%j hj ubh6)}(hhh]j )}(hinth]hint}hjS sbah}(h]h]h]h]h!]uh%j hjP ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjU j$j%j1j&Nuh%h5hj ubj )}(h, h]h, }hjk sbah}(h]h]h]h]h!]uh%j hj ubh6)}(hhh]j )}(hinth]hint}hj| sbah}(h]h]h]h]h!]uh%j hjy ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj~ j$j%j1j&Nuh%h5hj ubj )}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%j hj ubj )}(hjh]h[}hj sbah}(h]h]h]h]h!]uh%j hj ubh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hj ubj )}(hjh]h]}hj sbah}(h]h]h]h]h!]uh%j hj ubj )}(hjh]h)}hj sbah}(h]h]h]h]h!]uh%j hj ubh)}hj sbh -- }hj sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!]uh%jhjv ubeh}(h]h]h]h]h!]uh%jhjs ubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj4sbah}(h]h]h]h]h!]uh%h:hj0h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjs ubj)}(hhh](j)}(h Return typeh]h Return type}hjWsbah}(h]h]h]h]h!]uh%jhjTh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjlsbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjhubah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%jhjTubeh}(h]h]h]h]h!]uh%jhjs ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubh )}(h## pygame.gfxdraw.vline ##h]h## pygame.gfxdraw.vline ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kwubeh}(h]h]h]h]h!]uh%j~hj h&hh'Nh)Nubeh}(h]h](j functioneh]h]h!]jj jjjjjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1!line() (in module pygame.gfxdraw)pygame.gfxdraw.linehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hlineh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KyubjS)}(hjh]hline}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)Kyubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)Kyubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj|line()uh%j:h'h]h)Kyhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a line`h]h)}(hjh]h draw a line}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K{ubhz)}(h2:sg:`line(surface, x1, y1, x2, y2, color) -> None`h]h)}(hjh]h,line(surface, x1, y1, x2, y2, color) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K|ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K{ubh)}(h`Draws a straight line (``(x1, y1)`` to ``(x2, y2)``) on the given surface. There are no endcaps.h](hDraws a straight line (}hj-sbh;)}(h ``(x1, y1)``h]h(x1, y1)}hj5sbah}(h]h]h]h]h!]uh%h:hj-ubh to }hj-sbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjGsbah}(h]h]h]h]h!]uh%h:hj-ubh-) on the given surface. There are no endcaps.}hj-sbeh}(h]h]h]h]h!]uh%hh'h]h)K~hjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjesbah}(h]h]h]h]h!]uh%jhjbh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhj|ubh (}hj|sbh6)}(hhh]j )}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hj|ubh)}hj|sbh -- }hj|sbhsurface to draw on}(hj|h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%jhjvubj)}(hhh]h)}(h/x1 (int) -- x coordinate of one end of the lineh](j)}(hx1h]hx1}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh#x coordinate of one end of the line}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjvubj)}(hhh]h)}(h/y1 (int) -- y coordinate of one end of the lineh](j)}(hy1h]hy1}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hj.sbah}(h]h]h]h]h!]uh%j hj+ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj0j$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh#y coordinate of one end of the line}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjvubj)}(hhh]h)}(h5x2 (int) -- x coordinate of the other end of the lineh](j)}(hx2h]hx2}hjesbah}(h]h]h]h]h!]uh%jhjaubh (}hjasbh6)}(hhh]j )}(hinth]hint}hjzsbah}(h]h]h]h]h!]uh%j hjwubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj|j$j%j1j&Nuh%h5hjaubh)}hjasbh -- }hjasbh)x coordinate of the other end of the line}(hjah&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%jhjvubj)}(hhh]h)}(h5y2 (int) -- y coordinate of the other end of the lineh](j)}(hy2h]hy2}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh)y coordinate of the other end of the line}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjvubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h or h]h or }hj*sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(htupleh]htuple}hj;sbah}(h]h]h]h]h!]uh%j hj8ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj=j$j%j1j&Nuh%h5hjubj )}(hj6h]h(}hjSsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjcsbah}(h]h]h]h]h!]uh%j hj`ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjej$j%j1j&Nuh%h5hjubj )}(h, h]h, }hj{sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h)}hjsbah}(h]h]h]h]h!]uh%j hjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj)sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjvubeh}(h]h]h]h]h!]uh%jhjsubah}(h]h]h]h]h!]uh%jhjbubeh}(h]h]h]h]h!]uh%jhj_ubj)}(hhh](j)}(hReturnsh]hReturns}hjXsbah}(h]h]h]h]h!]uh%jhjUh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjmsbah}(h]h]h]h]h!]uh%h:hjih&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%jhjUubeh}(h]h]h]h]h!]uh%jhj_ubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj_ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.gfxdraw.line ##h]h## pygame.gfxdraw.line ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1&rectangle() (in module pygame.gfxdraw)pygame.gfxdraw.rectanglehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(h rectangleh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KubjS)}(hjh]h rectangle}hj sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)Kubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)Kubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj| rectangle()uh%j:h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a rectangle`h]h)}(hj4h]hdraw a rectangle}hj6sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Kubhz)}(h-:sg:`rectangle(surface, rect, color) -> None`h]h)}(hjKh]h'rectangle(surface, rect, color) -> None}hjMsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj,h&hh'h]h)Kubh)}(hYDraws an unfilled rectangle on the given surface. For a filled rectangle use :meth:`box`.h](hMDraws an unfilled rectangle on the given surface. For a filled rectangle use }hjfsbh6)}(h :meth:`box`h]h;)}(hjph]hbox()}hjrsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjnubah}(h]h]h]h]h!]refdochS refdomainj|reftypemeth refexplicitrefwarnhYj1hZNh[boxuh%h5h'h]h)Khjfubh.}hjfsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj,h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbhsurface to draw on}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h9rect (Rect) -- rectangle to draw, position and dimensionsh](j)}(hrecth]hrect}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hRecth]hRect}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh*rectangle to draw, position and dimensions}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjRsbah}(h]h]h]h]h!]uh%jhjNubh (}hjNsbh6)}(hhh]j )}(hColorh]hColor}hjgsbah}(h]h]h]h]h!]uh%j hjdubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjij$j%j1j&Nuh%h5hjNubj )}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjNubj )}(hj6h]h(}hjsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hj"sbah}(h]h]h]h]h!]uh%j hjNubj )}(hjh]h[}hj0sbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%j hj=ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjBj$j%j1j&Nuh%h5hjNubj )}(hjh]h]}hjXsbah}(h]h]h]h]h!]uh%j hjNubj )}(hjh]h)}hjesbah}(h]h]h]h]h!]uh%j hjNubh)}hjNsbh -- }hjNsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjNh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj~sbah}(h]h]h]h]h!]uh%h:hjNh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj,h&hh'Nh)Nubj_)}(hThe ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.h]h)}(hThe ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.h](hThe }hj(sbh;)}(h``rect.bottom``h]h rect.bottom}hj0sbah}(h]h]h]h]h!]uh%h:hj(ubh and }hj(sbh;)}(h``rect.right``h]h rect.right}hjBsbah}(h]h]h]h]h!]uh%h:hj(ubh attributes of a }hj(sbh6)}(h:mod:`pygame.Rect`h]h;)}(hjVh]h pygame.Rect}hjXsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjTubah}(h]h]h]h]h!]refdochS refdomainjbreftypemod refexplicitrefwarnhYj1hZNh[ pygame.Rectuh%h5h'h]h)Khj(ubhx always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.}hj(sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj$ubah}(h]h]h]h]h!]uh%j^h'h]h)Khj,h&hubh )}(h## pygame.gfxdraw.rectangle ##h]h## pygame.gfxdraw.rectangle ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1 box() (in module pygame.gfxdraw)pygame.gfxdraw.boxhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hboxh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KubjS)}(hjh]hbox}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)Kubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)Kubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj|box()uh%j:h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a filled rectangle`h]h)}(hjh]hdraw a filled rectangle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h':sg:`box(surface, rect, color) -> None`h]h)}(hjh]h!box(surface, rect, color) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h_Draws a filled rectangle on the given surface. For an unfilled rectangle use :meth:`rectangle`.h](hMDraws a filled rectangle on the given surface. For an unfilled rectangle use }hjsbh6)}(h:meth:`rectangle`h]h;)}(hj%h]h rectangle()}hj'sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj#ubah}(h]h]h]h]h!]refdochS refdomainj1reftypemeth refexplicitrefwarnhYj1hZNh[ rectangleuh%h5h'h]h)Khjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjSsbah}(h]h]h]h]h!]uh%jhjPh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjnsbah}(h]h]h]h]h!]uh%jhjjubh (}hjjsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjjubh)}hjjsbh -- }hjjsbhsurface to draw on}(hjjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%jhjdubj)}(hhh]h)}(h9rect (Rect) -- rectangle to draw, position and dimensionsh](j)}(hrecth]hrect}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hRecth]hRect}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh*rectangle to draw, position and dimensions}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjdubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h or h]h or }hj4sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(htupleh]htuple}hjEsbah}(h]h]h]h]h!]uh%j hjBubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjGj$j%j1j&Nuh%h5hjubj )}(hj6h]h(}hj]sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjmsbah}(h]h]h]h]h!]uh%j hjjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjoj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(hjh]h]}hj sbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h)}hjsbah}(h]h]h]h]h!]uh%j hjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj3sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjdubeh}(h]h]h]h]h!]uh%jhjaubah}(h]h]h]h]h!]uh%jhjPubeh}(h]h]h]h]h!]uh%jhjMubj)}(hhh](j)}(hReturnsh]hReturns}hjbsbah}(h]h]h]h]h!]uh%jhj_h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjwsbah}(h]h]h]h]h!]uh%h:hjsh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjpubah}(h]h]h]h]h!]uh%jhj_ubeh}(h]h]h]h]h!]uh%jhjMubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjMubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubj_)}(hThe ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.h]h)}(hThe ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.h](hThe }hjsbh;)}(h``rect.bottom``h]h rect.bottom}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``rect.right``h]h rect.right}hjsbah}(h]h]h]h]h!]uh%h:hjubh attributes of a }hjsbh6)}(h:mod:`pygame.Rect`h]h;)}(hj h]h pygame.Rect}hj sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj1hZNh[ pygame.Rectuh%h5h'h]h)Khjubhx always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j^h'h]h)Khjh&hubj_)}(hThe :func:`pygame.Surface.fill` method works just as well for drawing filled rectangles. In fact :func:`pygame.Surface.fill` can be hardware accelerated on some platforms with both software and hardware display modes.h]h)}(hThe :func:`pygame.Surface.fill` method works just as well for drawing filled rectangles. In fact :func:`pygame.Surface.fill` can be hardware accelerated on some platforms with both software and hardware display modes.h](hThe }hj=sbh6)}(h:func:`pygame.Surface.fill`h]h;)}(hjGh]hpygame.Surface.fill()}hjIsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjEubah}(h]h]h]h]h!]refdochS refdomainjSreftypefunc refexplicitrefwarnhYj1hZNh[pygame.Surface.filluh%h5h'h]h)Khj=ubhB method works just as well for drawing filled rectangles. In fact }hj=sbh6)}(h:func:`pygame.Surface.fill`h]h;)}(hjkh]hpygame.Surface.fill()}hjmsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjiubah}(h]h]h]h]h!]refdochS refdomainjwreftypefunc refexplicitrefwarnhYj1hZNh[pygame.Surface.filluh%h5h'h]h)Khj=ubh] can be hardware accelerated on some platforms with both software and hardware display modes.}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj9ubah}(h]h]h]h]h!]uh%j^h'h]h)Khjh&hubh )}(h## pygame.gfxdraw.box ##h]h## pygame.gfxdraw.box ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1#circle() (in module pygame.gfxdraw)pygame.gfxdraw.circlehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hcircleh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KubjS)}(hjh]hcircle}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)Kubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)Kubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj|circle()uh%j:h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a circle`h]h)}(hjh]h draw a circle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h-:sg:`circle(surface, x, y, r, color) -> None`h]h)}(hjh]h'circle(surface, x, y, r, color) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h]Draws an unfilled circle on the given surface. For a filled circle use :meth:`filled_circle`.h](hGDraws an unfilled circle on the given surface. For a filled circle use }hj0sbh6)}(h:meth:`filled_circle`h]h;)}(hj:h]hfilled_circle()}hj<sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj8ubah}(h]h]h]h]h!]refdochS refdomainjFreftypemeth refexplicitrefwarnhYj1hZNh[ filled_circleuh%h5h'h]h)Khj0ubh.}hj0sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjhsbah}(h]h]h]h]h!]uh%jhjeh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbhsurface to draw on}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%jhjyubj)}(hhh]h)}(h3x (int) -- x coordinate of the center of the circleh](j)}(hjHh]hx}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh(x coordinate of the center of the circle}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjyubj)}(hhh]h)}(h3y (int) -- y coordinate of the center of the circleh](j)}(hjh]hy}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hj/sbah}(h]h]h]h]h!]uh%j hj,ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj1j$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh(y coordinate of the center of the circle}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjyubj)}(hhh]h)}(hr (int) -- radius of the circleh](j)}(hrh]hr}hjfsbah}(h]h]h]h]h!]uh%jhjbubh (}hjbsbh6)}(hhh]j )}(hinth]hint}hj{sbah}(h]h]h]h]h!]uh%j hjxubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetj}j$j%j1j&Nuh%h5hjbubh)}hjbsbh -- }hjbsbhradius of the circle}(hjbh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%jhjyubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(hj6h]h(}hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hj0sbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%j hj>ubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjCj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjYsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjjsbah}(h]h]h]h]h!]uh%j hjgubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjlj$j%j1j&Nuh%h5hjubj )}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%j hjubh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubj )}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%j hjubj )}(hjh]h)}hjsbah}(h]h]h]h]h!]uh%j hjubh)}hjsbh -- }hjsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjyubeh}(h]h]h]h]h!]uh%jhjvubah}(h]h]h]h]h!]uh%jhjeubeh}(h]h]h]h]h!]uh%jhjbubj)}(hhh](j)}(hReturnsh]hReturns}hj sbah}(h]h]h]h]h!]uh%jhj h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj"sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhjbubj)}(hhh](j)}(h Return typeh]h Return type}hjEsbah}(h]h]h]h]h!]uh%jhjBh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjZsbah}(h]h]h]h]h!] refdomainj refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjVubah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%jhjBubeh}(h]h]h]h]h!]uh%jhjbubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.gfxdraw.circle ##h]h## pygame.gfxdraw.circle ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1%aacircle() (in module pygame.gfxdraw)pygame.gfxdraw.aacirclehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(haacircleh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjh&hh'h]h)KubjS)}(hjh]haacircle}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjh&hh'h]h)Kubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjh&hh'h]h)Kubeh}(h]jah](jrjseh]h]h!]jwj1jxhjyjjzj1jj| aacircle()uh%j:h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`draw an antialiased circle`h]h)}(hjh]hdraw an antialiased circle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h/:sg:`aacircle(surface, x, y, r, color) -> None`h]h)}(hjh]h)aacircle(surface, x, y, r, color) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h:Draws an unfilled antialiased circle on the given surface.h]h:Draws an unfilled antialiased circle on the given surface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj/sbah}(h]h]h]h]h!]uh%jhj,h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjJsbah}(h]h]h]h]h!]uh%jhjFubh (}hjFsbh6)}(hhh]j )}(hSurfaceh]hSurface}hj_sbah}(h]h]h]h]h!]uh%j hj\ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjaj$j%j1j&Nuh%h5hjFubh)}hjFsbh -- }hjFsbhsurface to draw on}(hjFh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jhj@ubj)}(hhh]h)}(h3x (int) -- x coordinate of the center of the circleh](j)}(hjHh]hx}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh(x coordinate of the center of the circle}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhj@ubj)}(hhh]h)}(h3y (int) -- y coordinate of the center of the circleh](j)}(hjh]hy}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j )}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetjj$j%j1j&Nuh%h5hjubh)}hjsbh -- }hjsbh(y coordinate of the center of the circle}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhj@ubj)}(hhh]h)}(hr (int) -- radius of the circleh](j)}(hjhh]hr}hj- sbah}(h]h]h]h]h!]uh%jhj) ubh (}hj) sbh6)}(hhh]j )}(hinth]hint}hjA sbah}(h]h]h]h]h!]uh%j hj> ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetjC j$j%j1j&Nuh%h5hj) ubh)}hj) sbh -- }hj) sbhradius of the circle}(hj) h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj& ubah}(h]h]h]h]h!]uh%jhj@ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjx sbah}(h]h]h]h]h!]uh%jhjt ubh (}hjt sbh6)}(hhh]j )}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjt ubj )}(h or h]h or }hj sbah}(h]h]h]h]h!]uh%j hjt ubh6)}(hhh]j )}(htupleh]htuple}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjt ubj )}(hj6h]h(}hj sbah}(h]h]h]h]h!]uh%j hjt ubh6)}(hhh]j )}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetj j$j%j1j&Nuh%h5hjt ubj )}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%j hjt ubh6)}(hhh]j )}(hinth]hint}hj!sbah}(h]h]h]h]h!]uh%j hj!ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetj !j$j%j1j&Nuh%h5hjt ubj )}(h, h]h, }hj!sbah}(h]h]h]h]h!]uh%j hjt ubh6)}(hhh]j )}(hinth]hint}hj0!sbah}(h]h]h]h]h!]uh%j hj-!ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetj2!j$j%j1j&Nuh%h5hjt ubj )}(h, h]h, }hjH!sbah}(h]h]h]h]h!]uh%j hjt ubj )}(hjh]h[}hjV!sbah}(h]h]h]h]h!]uh%j hjt ubh6)}(hhh]j )}(hinth]hint}hjf!sbah}(h]h]h]h]h!]uh%j hjc!ubah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetjh!j$j%j1j&Nuh%h5hjt ubj )}(hjh]h]}hj~!sbah}(h]h]h]h]h!]uh%j hjt ubj )}(hjh]h)}hj!sbah}(h]h]h]h]h!]uh%j hjt ubh)}hjt sbh -- }hjt sbhAcolor to draw with, the alpha value is optional if using a tuple }(hjt h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj!sbah}(h]h]h]h]h!]uh%h:hjt h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjq ubah}(h]h]h]h]h!]uh%jhj@ubeh}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!]uh%jhj,ubeh}(h]h]h]h]h!]uh%jhj)ubj)}(hhh](j)}(hReturnsh]hReturns}hj!sbah}(h]h]h]h]h!]uh%jhj!h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj!sbah}(h]h]h]h]h!]uh%h:hj!h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%jhj!ubeh}(h]h]h]h]h!]uh%jhj)ubj)}(hhh](j)}(h Return typeh]h Return type}hj "sbah}(h]h]h]h]h!]uh%jhj"h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj "sbah}(h]h]h]h]h!] refdomainjt refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj"ubah}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%jhj"ubeh}(h]h]h]h]h!]uh%jhj)ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.gfxdraw.aacircle ##h]h## pygame.gfxdraw.aacircle ##}hjJ"sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j~hjh&hh'Nh)Nubeh}(h]h](jtfunctioneh]h]h!]jjtjja"jja"jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1*filled_circle() (in module pygame.gfxdraw)pygame.gfxdraw.filled_circlehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(h filled_circleh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjz"sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjv"h&hh'h]h)KubjS)}(hjx"h]h filled_circle}hj"sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjv"h&hh'h]h)Kubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjv"h&hh'h]h)Kubeh}(h]jq"ah](jrjseh]h]h!]jwj1jxhjyjx"jzj1jx"j|filled_circle()uh%j:h'h]h)Khjs"h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a filled circle`h]h)}(hj"h]hdraw a filled circle}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubhz)}(h4:sg:`filled_circle(surface, x, y, r, color) -> None`h]h)}(hj"h]h.filled_circle(surface, x, y, r, color) -> None}hj"sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)Kubh)}(hVDraws a filled circle on the given surface. For an unfilled circle use :meth:`circle`.h](hGDraws a filled circle on the given surface. For an unfilled circle use }hj"sbh6)}(h:meth:`circle`h]h;)}(hj"h]hcircle()}hj"sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj"ubah}(h]h]h]h]h!]refdochS refdomainj"reftypemeth refexplicitrefwarnhYj1hZNh[circleuh%h5h'h]h)Khj"ubh.}hj"sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj"h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj#sbah}(h]h]h]h]h!]uh%jhj#h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj4#sbah}(h]h]h]h]h!]uh%jhj0#ubh (}hj0#sbh6)}(hhh]j )}(hSurfaceh]hSurface}hjI#sbah}(h]h]h]h]h!]uh%j hjF#ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjK#j$j%j1j&Nuh%h5hj0#ubh)}hj0#sbh -- }hj0#sbhsurface to draw on}(hj0#h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj-#ubah}(h]h]h]h]h!]uh%jhj*#ubj)}(hhh]h)}(h3x (int) -- x coordinate of the center of the circleh](j)}(hjHh]hx}hj#sbah}(h]h]h]h]h!]uh%jhj}#ubh (}hj}#sbh6)}(hhh]j )}(hinth]hint}hj#sbah}(h]h]h]h]h!]uh%j hj#ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj#j$j%j1j&Nuh%h5hj}#ubh)}hj}#sbh -- }hj}#sbh(x coordinate of the center of the circle}(hj}#h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjz#ubah}(h]h]h]h]h!]uh%jhj*#ubj)}(hhh]h)}(h3y (int) -- y coordinate of the center of the circleh](j)}(hjh]hy}hj#sbah}(h]h]h]h]h!]uh%jhj#ubh (}hj#sbh6)}(hhh]j )}(hinth]hint}hj#sbah}(h]h]h]h]h!]uh%j hj#ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj#j$j%j1j&Nuh%h5hj#ubh)}hj#sbh -- }hj#sbh(y coordinate of the center of the circle}(hj#h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%jhj*#ubj)}(hhh]h)}(hr (int) -- radius of the circleh](j)}(hjhh]hr}hj$sbah}(h]h]h]h]h!]uh%jhj$ubh (}hj$sbh6)}(hhh]j )}(hinth]hint}hj+$sbah}(h]h]h]h]h!]uh%j hj($ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj-$j$j%j1j&Nuh%h5hj$ubh)}hj$sbh -- }hj$sbhradius of the circle}(hj$h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%jhj*#ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjb$sbah}(h]h]h]h]h!]uh%jhj^$ubh (}hj^$sbh6)}(hhh]j )}(hColorh]hColor}hjw$sbah}(h]h]h]h]h!]uh%j hjt$ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetjy$j$j%j1j&Nuh%h5hj^$ubj )}(h or h]h or }hj$sbah}(h]h]h]h]h!]uh%j hj^$ubh6)}(hhh]j )}(htupleh]htuple}hj$sbah}(h]h]h]h]h!]uh%j hj$ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj$j$j%j1j&Nuh%h5hj^$ubj )}(hj6h]h(}hj$sbah}(h]h]h]h]h!]uh%j hj^$ubh6)}(hhh]j )}(hinth]hint}hj$sbah}(h]h]h]h]h!]uh%j hj$ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj$j$j%j1j&Nuh%h5hj^$ubj )}(h, h]h, }hj$sbah}(h]h]h]h]h!]uh%j hj^$ubh6)}(hhh]j )}(hinth]hint}hj$sbah}(h]h]h]h]h!]uh%j hj$ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj$j$j%j1j&Nuh%h5hj^$ubj )}(h, h]h, }hj %sbah}(h]h]h]h]h!]uh%j hj^$ubh6)}(hhh]j )}(hinth]hint}hj%sbah}(h]h]h]h]h!]uh%j hj%ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetj%j$j%j1j&Nuh%h5hj^$ubj )}(h, h]h, }hj2%sbah}(h]h]h]h]h!]uh%j hj^$ubj )}(hjh]h[}hj@%sbah}(h]h]h]h]h!]uh%j hj^$ubh6)}(hhh]j )}(hinth]hint}hjP%sbah}(h]h]h]h]h!]uh%j hjM%ubah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetjR%j$j%j1j&Nuh%h5hj^$ubj )}(hjh]h]}hjh%sbah}(h]h]h]h]h!]uh%j hj^$ubj )}(hjh]h)}hju%sbah}(h]h]h]h]h!]uh%j hj^$ubh)}hj^$sbh -- }hj^$sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj^$h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj%sbah}(h]h]h]h]h!]uh%h:hj^$h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj[$ubah}(h]h]h]h]h!]uh%jhj*#ubeh}(h]h]h]h]h!]uh%jhj'#ubah}(h]h]h]h]h!]uh%jhj#ubeh}(h]h]h]h]h!]uh%jhj#ubj)}(hhh](j)}(hReturnsh]hReturns}hj%sbah}(h]h]h]h]h!]uh%jhj%h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj%sbah}(h]h]h]h]h!]uh%h:hj%h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%jhj%ubeh}(h]h]h]h]h!]uh%jhj#ubj)}(hhh](j)}(h Return typeh]h Return type}hj%sbah}(h]h]h]h]h!]uh%jhj%h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj &sbah}(h]h]h]h]h!] refdomainj^# refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj&ubah}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%jhj%ubeh}(h]h]h]h]h!]uh%jhj#ubeh}(h]h]h]h]h!]uh%jhj"h&hh'Nh)Nubh )}(h"## pygame.gfxdraw.filled_circle ##h]h"## pygame.gfxdraw.filled_circle ##}hj4&sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hjs"h&hh'Nh)Nubeh}(h]h](j^#functioneh]h]h!]jj^#jjK&jjK&jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1$ellipse() (in module pygame.gfxdraw)pygame.gfxdraw.ellipsehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hellipseh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjd&sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj`&h&hh'h]h)MubjS)}(hjb&h]hellipse}hjr&sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj`&h&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj`&h&hh'h]h)Mubeh}(h]j[&ah](jrjseh]h]h!]jwj1jxhjyjb&jzj1jb&j| ellipse()uh%j:h'h]h)Mhj]&h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw an ellipse`h]h)}(hj&h]hdraw an ellipse}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubhz)}(h3:sg:`ellipse(surface, x, y, rx, ry, color) -> None`h]h)}(hj&h]h-ellipse(surface, x, y, rx, ry, color) -> None}hj&sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)Mubh)}(h`Draws an unfilled ellipse on the given surface. For a filled ellipse use :meth:`filled_ellipse`.h](hIDraws an unfilled ellipse on the given surface. For a filled ellipse use }hj&sbh6)}(h:meth:`filled_ellipse`h]h;)}(hj&h]hfilled_ellipse()}hj&sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj&ubah}(h]h]h]h]h!]refdochS refdomainj&reftypemeth refexplicitrefwarnhYj1hZNh[filled_ellipseuh%h5h'h]h)Mhj&ubh.}hj&sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj'sbah}(h]h]h]h]h!]uh%jhj'h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj'sbah}(h]h]h]h]h!]uh%jhj'ubh (}hj'sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj3'sbah}(h]h]h]h]h!]uh%j hj0'ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj5'j$j%j1j&Nuh%h5hj'ubh)}hj'sbh -- }hj'sbhsurface to draw on}(hj'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%jhj'ubj)}(hhh]h)}(h4x (int) -- x coordinate of the center of the ellipseh](j)}(hjHh]hx}hjk'sbah}(h]h]h]h]h!]uh%jhjg'ubh (}hjg'sbh6)}(hhh]j )}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%j hj|'ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj'j$j%j1j&Nuh%h5hjg'ubh)}hjg'sbh -- }hjg'sbh)x coordinate of the center of the ellipse}(hjg'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjd'ubah}(h]h]h]h]h!]uh%jhj'ubj)}(hhh]h)}(h4y (int) -- y coordinate of the center of the ellipseh](j)}(hjh]hy}hj'sbah}(h]h]h]h]h!]uh%jhj'ubh (}hj'sbh6)}(hhh]j )}(hinth]hint}hj'sbah}(h]h]h]h]h!]uh%j hj'ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj'j$j%j1j&Nuh%h5hj'ubh)}hj'sbh -- }hj'sbh)y coordinate of the center of the ellipse}(hj'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%jhj'ubj)}(hhh]h)}(h,rx (int) -- horizontal radius of the ellipseh](j)}(hrxh]hrx}hj(sbah}(h]h]h]h]h!]uh%jhj'ubh (}hj'sbh6)}(hhh]j )}(hinth]hint}hj(sbah}(h]h]h]h]h!]uh%j hj(ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj(j$j%j1j&Nuh%h5hj'ubh)}hj'sbh -- }hj'sbh horizontal radius of the ellipse}(hj'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%jhj'ubj)}(hhh]h)}(h*ry (int) -- vertical radius of the ellipseh](j)}(hryh]hry}hjM(sbah}(h]h]h]h]h!]uh%jhjI(ubh (}hjI(sbh6)}(hhh]j )}(hinth]hint}hjb(sbah}(h]h]h]h]h!]uh%j hj_(ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetjd(j$j%j1j&Nuh%h5hjI(ubh)}hjI(sbh -- }hjI(sbhvertical radius of the ellipse}(hjI(h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjF(ubah}(h]h]h]h]h!]uh%jhj'ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj(sbah}(h]h]h]h]h!]uh%jhj(ubh (}hj(sbh6)}(hhh]j )}(hColorh]hColor}hj(sbah}(h]h]h]h]h!]uh%j hj(ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj(j$j%j1j&Nuh%h5hj(ubj )}(h or h]h or }hj(sbah}(h]h]h]h]h!]uh%j hj(ubh6)}(hhh]j )}(htupleh]htuple}hj(sbah}(h]h]h]h]h!]uh%j hj(ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj(j$j%j1j&Nuh%h5hj(ubj )}(hj6h]h(}hj(sbah}(h]h]h]h]h!]uh%j hj(ubh6)}(hhh]j )}(hinth]hint}hj(sbah}(h]h]h]h]h!]uh%j hj(ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj)j$j%j1j&Nuh%h5hj(ubj )}(h, h]h, }hj)sbah}(h]h]h]h]h!]uh%j hj(ubh6)}(hhh]j )}(hinth]hint}hj()sbah}(h]h]h]h]h!]uh%j hj%)ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj*)j$j%j1j&Nuh%h5hj(ubj )}(h, h]h, }hj@)sbah}(h]h]h]h]h!]uh%j hj(ubh6)}(hhh]j )}(hinth]hint}hjQ)sbah}(h]h]h]h]h!]uh%j hjN)ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetjS)j$j%j1j&Nuh%h5hj(ubj )}(h, h]h, }hji)sbah}(h]h]h]h]h!]uh%j hj(ubj )}(hjh]h[}hjw)sbah}(h]h]h]h]h!]uh%j hj(ubh6)}(hhh]j )}(hinth]hint}hj)sbah}(h]h]h]h]h!]uh%j hj)ubah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetj)j$j%j1j&Nuh%h5hj(ubj )}(hjh]h]}hj)sbah}(h]h]h]h]h!]uh%j hj(ubj )}(hjh]h)}hj)sbah}(h]h]h]h]h!]uh%j hj(ubh)}hj(sbh -- }hj(sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj(h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj)sbah}(h]h]h]h]h!]uh%h:hj(h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%jhj'ubeh}(h]h]h]h]h!]uh%jhj'ubah}(h]h]h]h]h!]uh%jhj'ubeh}(h]h]h]h]h!]uh%jhj&ubj)}(hhh](j)}(hReturnsh]hReturns}hj)sbah}(h]h]h]h]h!]uh%jhj)h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj *sbah}(h]h]h]h]h!]uh%h:hj*h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%jhj)ubeh}(h]h]h]h]h!]uh%jhj&ubj)}(hhh](j)}(h Return typeh]h Return type}hj,*sbah}(h]h]h]h]h!]uh%jhj)*h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjA*sbah}(h]h]h]h]h!] refdomainjH' refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj=*ubah}(h]h]h]h]h!]uh%hhj:*ubah}(h]h]h]h]h!]uh%jhj)*ubeh}(h]h]h]h]h!]uh%jhj&ubeh}(h]h]h]h]h!]uh%jhj&h&hh'Nh)Nubh )}(h## pygame.gfxdraw.ellipse ##h]h## pygame.gfxdraw.ellipse ##}hjk*sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hj]&h&hh'Nh)Nubeh}(h]h](jH'functioneh]h]h!]jjH'jj*jj*jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1&aaellipse() (in module pygame.gfxdraw)pygame.gfxdraw.aaellipsehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(h aaellipseh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj*sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj*h&hh'h]h)MubjS)}(hj*h]h aaellipse}hj*sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj*h&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj*h&hh'h]h)Mubeh}(h]j*ah](jrjseh]h]h!]jwj1jxhjyj*jzj1j*j| aaellipse()uh%j:h'h]h)Mhj*h&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`draw an antialiased ellipse`h]h)}(hj*h]hdraw an antialiased ellipse}hj*sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubhz)}(h5:sg:`aaellipse(surface, x, y, rx, ry, color) -> None`h]h)}(hj*h]h/aaellipse(surface, x, y, rx, ry, color) -> None}hj*sbah}(h]h]jah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)Mubh)}(h;Draws an unfilled antialiased ellipse on the given surface.h]h;Draws an unfilled antialiased ellipse on the given surface.}hj+sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj*h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj+sbah}(h]h]h]h]h!]uh%jhj+h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj1+sbah}(h]h]h]h]h!]uh%jhj-+ubh (}hj-+sbh6)}(hhh]j )}(hSurfaceh]hSurface}hjF+sbah}(h]h]h]h]h!]uh%j hjC+ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjH+j$j%j1j&Nuh%h5hj-+ubh)}hj-+sbh -- }hj-+sbhsurface to draw on}(hj-+h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj*+ubah}(h]h]h]h]h!]uh%jhj'+ubj)}(hhh]h)}(h4x (int) -- x coordinate of the center of the ellipseh](j)}(hjHh]hx}hj~+sbah}(h]h]h]h]h!]uh%jhjz+ubh (}hjz+sbh6)}(hhh]j )}(hinth]hint}hj+sbah}(h]h]h]h]h!]uh%j hj+ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj+j$j%j1j&Nuh%h5hjz+ubh)}hjz+sbh -- }hjz+sbh)x coordinate of the center of the ellipse}(hjz+h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjw+ubah}(h]h]h]h]h!]uh%jhj'+ubj)}(hhh]h)}(h4y (int) -- y coordinate of the center of the ellipseh](j)}(hjh]hy}hj+sbah}(h]h]h]h]h!]uh%jhj+ubh (}hj+sbh6)}(hhh]j )}(hinth]hint}hj+sbah}(h]h]h]h]h!]uh%j hj+ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj+j$j%j1j&Nuh%h5hj+ubh)}hj+sbh -- }hj+sbh)y coordinate of the center of the ellipse}(hj+h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%jhj'+ubj)}(hhh]h)}(h,rx (int) -- horizontal radius of the ellipseh](j)}(hrxh]hrx}hj,sbah}(h]h]h]h]h!]uh%jhj,ubh (}hj,sbh6)}(hhh]j )}(hinth]hint}hj),sbah}(h]h]h]h]h!]uh%j hj&,ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj+,j$j%j1j&Nuh%h5hj,ubh)}hj,sbh -- }hj,sbh horizontal radius of the ellipse}(hj,h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ,ubah}(h]h]h]h]h!]uh%jhj'+ubj)}(hhh]h)}(h*ry (int) -- vertical radius of the ellipseh](j)}(hryh]hry}hj`,sbah}(h]h]h]h]h!]uh%jhj\,ubh (}hj\,sbh6)}(hhh]j )}(hinth]hint}hju,sbah}(h]h]h]h]h!]uh%j hjr,ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetjw,j$j%j1j&Nuh%h5hj\,ubh)}hj\,sbh -- }hj\,sbhvertical radius of the ellipse}(hj\,h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjY,ubah}(h]h]h]h]h!]uh%jhj'+ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj,sbah}(h]h]h]h]h!]uh%jhj,ubh (}hj,sbh6)}(hhh]j )}(hColorh]hColor}hj,sbah}(h]h]h]h]h!]uh%j hj,ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj,j$j%j1j&Nuh%h5hj,ubj )}(h or h]h or }hj,sbah}(h]h]h]h]h!]uh%j hj,ubh6)}(hhh]j )}(htupleh]htuple}hj,sbah}(h]h]h]h]h!]uh%j hj,ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj,j$j%j1j&Nuh%h5hj,ubj )}(hj6h]h(}hj-sbah}(h]h]h]h]h!]uh%j hj,ubh6)}(hhh]j )}(hinth]hint}hj-sbah}(h]h]h]h]h!]uh%j hj-ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj-j$j%j1j&Nuh%h5hj,ubj )}(h, h]h, }hj*-sbah}(h]h]h]h]h!]uh%j hj,ubh6)}(hhh]j )}(hinth]hint}hj;-sbah}(h]h]h]h]h!]uh%j hj8-ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj=-j$j%j1j&Nuh%h5hj,ubj )}(h, h]h, }hjS-sbah}(h]h]h]h]h!]uh%j hj,ubh6)}(hhh]j )}(hinth]hint}hjd-sbah}(h]h]h]h]h!]uh%j hja-ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetjf-j$j%j1j&Nuh%h5hj,ubj )}(h, h]h, }hj|-sbah}(h]h]h]h]h!]uh%j hj,ubj )}(hjh]h[}hj-sbah}(h]h]h]h]h!]uh%j hj,ubh6)}(hhh]j )}(hinth]hint}hj-sbah}(h]h]h]h]h!]uh%j hj-ubah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetj-j$j%j1j&Nuh%h5hj,ubj )}(hjh]h]}hj-sbah}(h]h]h]h]h!]uh%j hj,ubj )}(hjh]h)}hj-sbah}(h]h]h]h]h!]uh%j hj,ubh)}hj,sbh -- }hj,sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj,h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj-sbah}(h]h]h]h]h!]uh%h:hj,h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%jhj'+ubeh}(h]h]h]h]h!]uh%jhj$+ubah}(h]h]h]h]h!]uh%jhj+ubeh}(h]h]h]h]h!]uh%jhj+ubj)}(hhh](j)}(hReturnsh]hReturns}hj.sbah}(h]h]h]h]h!]uh%jhj.h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj.sbah}(h]h]h]h]h!]uh%h:hj.h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%jhj.ubeh}(h]h]h]h]h!]uh%jhj+ubj)}(hhh](j)}(h Return typeh]h Return type}hj?.sbah}(h]h]h]h]h!]uh%jhj<.h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjT.sbah}(h]h]h]h]h!] refdomainj[+ refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjP.ubah}(h]h]h]h]h!]uh%hhjM.ubah}(h]h]h]h]h!]uh%jhj<.ubeh}(h]h]h]h]h!]uh%jhj+ubeh}(h]h]h]h]h!]uh%jhj*h&hh'Nh)Nubh )}(h## pygame.gfxdraw.aaellipse ##h]h## pygame.gfxdraw.aaellipse ##}hj~.sbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)M,ubeh}(h]h]h]h]h!]uh%j~hj*h&hh'Nh)Nubeh}(h]h](j[+functioneh]h]h!]jj[+jj.jj.jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1+filled_ellipse() (in module pygame.gfxdraw)pygame.gfxdraw.filled_ellipsehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hfilled_ellipseh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj.sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj.h&hh'h]h)M.ubjS)}(hj.h]hfilled_ellipse}hj.sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj.h&hh'h]h)M.ubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj.h&hh'h]h)M.ubeh}(h]j.ah](jrjseh]h]h!]jwj1jxhjyj.jzj1j.j|filled_ellipse()uh%j:h'h]h)M.hj.h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a filled ellipse`h]h)}(hj.h]hdraw a filled ellipse}hj.sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)M0ubhz)}(h::sg:`filled_ellipse(surface, x, y, rx, ry, color) -> None`h]h)}(hj.h]h4filled_ellipse(surface, x, y, rx, ry, color) -> None}hj.sbah}(h]h]jah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)M1ubeh}(h]h]h]h]h!]uh%huhj.h&hh'h]h)M0ubh)}(hYDraws a filled ellipse on the given surface. For an unfilled ellipse use :meth:`ellipse`.h](hIDraws a filled ellipse on the given surface. For an unfilled ellipse use }hj/sbh6)}(h:meth:`ellipse`h]h;)}(hj/h]h ellipse()}hj!/sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj/ubah}(h]h]h]h]h!]refdochS refdomainj+/reftypemeth refexplicitrefwarnhYj1hZNh[ellipseuh%h5h'h]h)M3hj/ubh.}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)M3hj.h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjM/sbah}(h]h]h]h]h!]uh%jhjJ/h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjh/sbah}(h]h]h]h]h!]uh%jhjd/ubh (}hjd/sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj}/sbah}(h]h]h]h]h!]uh%j hjz/ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj/j$j%j1j&Nuh%h5hjd/ubh)}hjd/sbh -- }hjd/sbhsurface to draw on}(hjd/h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhja/ubah}(h]h]h]h]h!]uh%jhj^/ubj)}(hhh]h)}(h4x (int) -- x coordinate of the center of the ellipseh](j)}(hjHh]hx}hj/sbah}(h]h]h]h]h!]uh%jhj/ubh (}hj/sbh6)}(hhh]j )}(hinth]hint}hj/sbah}(h]h]h]h]h!]uh%j hj/ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj/j$j%j1j&Nuh%h5hj/ubh)}hj/sbh -- }hj/sbh)x coordinate of the center of the ellipse}(hj/h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%jhj^/ubj)}(hhh]h)}(h4y (int) -- y coordinate of the center of the ellipseh](j)}(hjh]hy}hj0sbah}(h]h]h]h]h!]uh%jhj/ubh (}hj/sbh6)}(hhh]j )}(hinth]hint}hj0sbah}(h]h]h]h]h!]uh%j hj0ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj0j$j%j1j&Nuh%h5hj/ubh)}hj/sbh -- }hj/sbh)y coordinate of the center of the ellipse}(hj/h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%jhj^/ubj)}(hhh]h)}(h,rx (int) -- horizontal radius of the ellipseh](j)}(hrxh]hrx}hjK0sbah}(h]h]h]h]h!]uh%jhjG0ubh (}hjG0sbh6)}(hhh]j )}(hinth]hint}hj`0sbah}(h]h]h]h]h!]uh%j hj]0ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetjb0j$j%j1j&Nuh%h5hjG0ubh)}hjG0sbh -- }hjG0sbh horizontal radius of the ellipse}(hjG0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjD0ubah}(h]h]h]h]h!]uh%jhj^/ubj)}(hhh]h)}(h*ry (int) -- vertical radius of the ellipseh](j)}(hryh]hry}hj0sbah}(h]h]h]h]h!]uh%jhj0ubh (}hj0sbh6)}(hhh]j )}(hinth]hint}hj0sbah}(h]h]h]h]h!]uh%j hj0ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj0j$j%j1j&Nuh%h5hj0ubh)}hj0sbh -- }hj0sbhvertical radius of the ellipse}(hj0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%jhj^/ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj0sbah}(h]h]h]h]h!]uh%jhj0ubh (}hj0sbh6)}(hhh]j )}(hColorh]hColor}hj0sbah}(h]h]h]h]h!]uh%j hj0ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj0j$j%j1j&Nuh%h5hj0ubj )}(h or h]h or }hj1sbah}(h]h]h]h]h!]uh%j hj0ubh6)}(hhh]j )}(htupleh]htuple}hj!1sbah}(h]h]h]h]h!]uh%j hj1ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj#1j$j%j1j&Nuh%h5hj0ubj )}(hj6h]h(}hj91sbah}(h]h]h]h]h!]uh%j hj0ubh6)}(hhh]j )}(hinth]hint}hjI1sbah}(h]h]h]h]h!]uh%j hjF1ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetjK1j$j%j1j&Nuh%h5hj0ubj )}(h, h]h, }hja1sbah}(h]h]h]h]h!]uh%j hj0ubh6)}(hhh]j )}(hinth]hint}hjr1sbah}(h]h]h]h]h!]uh%j hjo1ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetjt1j$j%j1j&Nuh%h5hj0ubj )}(h, h]h, }hj1sbah}(h]h]h]h]h!]uh%j hj0ubh6)}(hhh]j )}(hinth]hint}hj1sbah}(h]h]h]h]h!]uh%j hj1ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj1j$j%j1j&Nuh%h5hj0ubj )}(h, h]h, }hj1sbah}(h]h]h]h]h!]uh%j hj0ubj )}(hjh]h[}hj1sbah}(h]h]h]h]h!]uh%j hj0ubh6)}(hhh]j )}(hinth]hint}hj1sbah}(h]h]h]h]h!]uh%j hj1ubah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetj1j$j%j1j&Nuh%h5hj0ubj )}(hjh]h]}hj1sbah}(h]h]h]h]h!]uh%j hj0ubj )}(hjh]h)}hj1sbah}(h]h]h]h]h!]uh%j hj0ubh)}hj0sbh -- }hj0sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj0h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj2sbah}(h]h]h]h]h!]uh%h:hj0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%jhj^/ubeh}(h]h]h]h]h!]uh%jhj[/ubah}(h]h]h]h]h!]uh%jhjJ/ubeh}(h]h]h]h]h!]uh%jhjG/ubj)}(hhh](j)}(hReturnsh]hReturns}hj>2sbah}(h]h]h]h]h!]uh%jhj;2h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjS2sbah}(h]h]h]h]h!]uh%h:hjO2h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjL2ubah}(h]h]h]h]h!]uh%jhj;2ubeh}(h]h]h]h]h!]uh%jhjG/ubj)}(hhh](j)}(h Return typeh]h Return type}hjv2sbah}(h]h]h]h]h!]uh%jhjs2h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj2sbah}(h]h]h]h]h!] refdomainj/ refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj2ubah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%jhjs2ubeh}(h]h]h]h]h!]uh%jhjG/ubeh}(h]h]h]h]h!]uh%jhj.h&hh'Nh)Nubh )}(h### pygame.gfxdraw.filled_ellipse ##h]h### pygame.gfxdraw.filled_ellipse ##}hj2sbah}(h]h]h]h]h!]h#h$uh%h hj.h&hh'h]h)MBubeh}(h]h]h]h]h!]uh%j~hj.h&hh'Nh)Nubeh}(h]h](j/functioneh]h]h!]jj/jj2jj2jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1 arc() (in module pygame.gfxdraw)pygame.gfxdraw.archNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(harch](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj2sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj2h&hh'h]h)MDubjS)}(hj2h]harc}hj2sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj2h&hh'h]h)MDubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj2h&hh'h]h)MDubeh}(h]j2ah](jrjseh]h]h!]jwj1jxhjyj2jzj1j2j|arc()uh%j:h'h]h)MDhj2h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw an arc`h]h)}(hj3h]h draw an arc}hj3sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)MFubhz)}(hC:sg:`arc(surface, x, y, r, start_angle, stop_angle, color) -> None`h]h)}(hj13h]h=arc(surface, x, y, r, start_angle, stop_angle, color) -> None}hj33sbah}(h]h]jah]h]h!]uh%hhj/3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)MGubeh}(h]h]h]h]h!]uh%huhj3h&hh'h]h)MFubh)}(hiDraws an arc on the given surface. For an arc with its endpoints connected to its center use :meth:`pie`.h](h]Draws an arc on the given surface. For an arc with its endpoints connected to its center use }hjL3sbh6)}(h :meth:`pie`h]h;)}(hjV3h]hpie()}hjX3sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjT3ubah}(h]h]h]h]h!]refdochS refdomainjb3reftypemeth refexplicitrefwarnhYj1hZNh[pieuh%h5h'h]h)MIhjL3ubh.}hjL3sbeh}(h]h]h]h]h!]uh%hh'h]h)MIhj3h&hubh)}(hThe two angle arguments are given in degrees and indicate the start and stop positions of the arc. The arc is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, nothing will be drawnh](hThe two angle arguments are given in degrees and indicate the start and stop positions of the arc. The arc is drawn in a clockwise direction from the }hj~3sbh;)}(h``start_angle``h]h start_angle}hj3sbah}(h]h]h]h]h!]uh%h:hj~3ubh to the }hj~3sbh;)}(h``stop_angle``h]h stop_angle}hj3sbah}(h]h]h]h]h!]uh%h:hj~3ubh. If }hj~3sbh;)}(h``start_angle == stop_angle``h]hstart_angle == stop_angle}hj3sbah}(h]h]h]h]h!]uh%h:hj~3ubh, nothing will be drawn}hj~3sbeh}(h]h]h]h]h!]uh%hh'h]h)MLhj3h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj3sbah}(h]h]h]h]h!]uh%jhj3h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj3sbah}(h]h]h]h]h!]uh%jhj3ubh (}hj3sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj3sbah}(h]h]h]h]h!]uh%j hj3ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj3j$j%j1j&Nuh%h5hj3ubh)}hj3sbh -- }hj3sbhsurface to draw on}(hj3h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(h0x (int) -- x coordinate of the center of the arch](j)}(hjHh]hx}hj04sbah}(h]h]h]h]h!]uh%jhj,4ubh (}hj,4sbh6)}(hhh]j )}(hinth]hint}hjD4sbah}(h]h]h]h]h!]uh%j hjA4ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetjF4j$j%j1j&Nuh%h5hj,4ubh)}hj,4sbh -- }hj,4sbh%x coordinate of the center of the arc}(hj,4h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj)4ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(h0y (int) -- y coordinate of the center of the arch](j)}(hjh]hy}hj{4sbah}(h]h]h]h]h!]uh%jhjw4ubh (}hjw4sbh6)}(hhh]j )}(hinth]hint}hj4sbah}(h]h]h]h]h!]uh%j hj4ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj4j$j%j1j&Nuh%h5hjw4ubh)}hjw4sbh -- }hjw4sbh%y coordinate of the center of the arc}(hjw4h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjt4ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(hr (int) -- radius of the arch](j)}(hjhh]hr}hj4sbah}(h]h]h]h]h!]uh%jhj4ubh (}hj4sbh6)}(hhh]j )}(hinth]hint}hj4sbah}(h]h]h]h]h!]uh%j hj4ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj4j$j%j1j&Nuh%h5hj4ubh)}hj4sbh -- }hj4sbhradius of the arc}(hj4h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(h+start_angle (int) -- start angle in degreesh](j)}(h start_angleh]h start_angle}hj5sbah}(h]h]h]h]h!]uh%jhj 5ubh (}hj 5sbh6)}(hhh]j )}(hinth]hint}hj&5sbah}(h]h]h]h]h!]uh%j hj#5ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj(5j$j%j1j&Nuh%h5hj 5ubh)}hj 5sbh -- }hj 5sbhstart angle in degrees}(hj 5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj 5ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(h)stop_angle (int) -- stop angle in degreesh](j)}(h stop_angleh]h stop_angle}hj]5sbah}(h]h]h]h]h!]uh%jhjY5ubh (}hjY5sbh6)}(hhh]j )}(hinth]hint}hjr5sbah}(h]h]h]h]h!]uh%j hjo5ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetjt5j$j%j1j&Nuh%h5hjY5ubh)}hjY5sbh -- }hjY5sbhstop angle in degrees}(hjY5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjV5ubah}(h]h]h]h]h!]uh%jhj3ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj5sbah}(h]h]h]h]h!]uh%jhj5ubh (}hj5sbh6)}(hhh]j )}(hColorh]hColor}hj5sbah}(h]h]h]h]h!]uh%j hj5ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj5j$j%j1j&Nuh%h5hj5ubj )}(h or h]h or }hj5sbah}(h]h]h]h]h!]uh%j hj5ubh6)}(hhh]j )}(htupleh]htuple}hj5sbah}(h]h]h]h]h!]uh%j hj5ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj5j$j%j1j&Nuh%h5hj5ubj )}(hj6h]h(}hj5sbah}(h]h]h]h]h!]uh%j hj5ubh6)}(hhh]j )}(hinth]hint}hj6sbah}(h]h]h]h]h!]uh%j hj 6ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj6j$j%j1j&Nuh%h5hj5ubj )}(h, h]h, }hj'6sbah}(h]h]h]h]h!]uh%j hj5ubh6)}(hhh]j )}(hinth]hint}hj86sbah}(h]h]h]h]h!]uh%j hj56ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj:6j$j%j1j&Nuh%h5hj5ubj )}(h, h]h, }hjP6sbah}(h]h]h]h]h!]uh%j hj5ubh6)}(hhh]j )}(hinth]hint}hja6sbah}(h]h]h]h]h!]uh%j hj^6ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetjc6j$j%j1j&Nuh%h5hj5ubj )}(h, h]h, }hjy6sbah}(h]h]h]h]h!]uh%j hj5ubj )}(hjh]h[}hj6sbah}(h]h]h]h]h!]uh%j hj5ubh6)}(hhh]j )}(hinth]hint}hj6sbah}(h]h]h]h]h!]uh%j hj6ubah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetj6j$j%j1j&Nuh%h5hj5ubj )}(hjh]h]}hj6sbah}(h]h]h]h]h!]uh%j hj5ubj )}(hjh]h)}hj6sbah}(h]h]h]h]h!]uh%j hj5ubh)}hj5sbh -- }hj5sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj5h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj6sbah}(h]h]h]h]h!]uh%h:hj5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%jhj3ubeh}(h]h]h]h]h!]uh%jhj3ubah}(h]h]h]h]h!]uh%jhj3ubeh}(h]h]h]h]h!]uh%jhj3ubj)}(hhh](j)}(hReturnsh]hReturns}hj7sbah}(h]h]h]h]h!]uh%jhj7h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj7sbah}(h]h]h]h]h!]uh%h:hj7h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%jhj7ubeh}(h]h]h]h]h!]uh%jhj3ubj)}(hhh](j)}(h Return typeh]h Return type}hj<7sbah}(h]h]h]h]h!]uh%jhj97h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjQ7sbah}(h]h]h]h]h!] refdomainj 4 refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjM7ubah}(h]h]h]h]h!]uh%hhjJ7ubah}(h]h]h]h]h!]uh%jhj97ubeh}(h]h]h]h]h!]uh%jhj3ubeh}(h]h]h]h]h!]uh%jhj3h&hh'Nh)Nubj_)}(hWThis function uses *degrees* while the :func:`pygame.draw.arc` function uses *radians*.h]h)}(hWThis function uses *degrees* while the :func:`pygame.draw.arc` function uses *radians*.h](hThis function uses }hj7sbh emphasis)}(h *degrees*h]hdegrees}hj7sbah}(h]h]h]h]h!]uh%j7hj7ubh while the }hj7sbh6)}(h:func:`pygame.draw.arc`h]h;)}(hj7h]hpygame.draw.arc()}hj7sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj7ubah}(h]h]h]h]h!]refdochS refdomainj7reftypefunc refexplicitrefwarnhYj1hZNh[pygame.draw.arcuh%h5h'h]h)M_hj7ubh function uses }hj7sbj7)}(h *radians*h]hradians}hj7sbah}(h]h]h]h]h!]uh%j7hj7ubh.}hj7sbeh}(h]h]h]h]h!]uh%hh'h]h)M_hj{7ubah}(h]h]h]h]h!]uh%j^h'h]h)M^hj3h&hubh )}(h## pygame.gfxdraw.arc ##h]h## pygame.gfxdraw.arc ##}hj7sbah}(h]h]h]h]h!]h#h$uh%h hj3h&hh'h]h)Mbubeh}(h]h]h]h]h!]uh%j~hj2h&hh'Nh)Nubeh}(h]h](j 4functioneh]h]h!]jj 4jj7jj7jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1 pie() (in module pygame.gfxdraw)pygame.gfxdraw.piehNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hpieh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj 8sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj 8h&hh'h]h)MdubjS)}(hj 8h]hpie}hj8sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj 8h&hh'h]h)Mdubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj 8h&hh'h]h)Mdubeh}(h]j8ah](jrjseh]h]h!]jwj1jxhjyj 8jzj1j 8j|pie()uh%j:h'h]h)Mdhj8h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a pie`h]h)}(hjB8h]h draw a pie}hjD8sbah}(h]h]hah]h]h!]uh%hhj@8ubah}(h]h]h]h]h!]uh%h)hKhj=8h&hh'h]h)Mfubhz)}(hC:sg:`pie(surface, x, y, r, start_angle, stop_angle, color) -> None`h]h)}(hjY8h]h=pie(surface, x, y, r, start_angle, stop_angle, color) -> None}hj[8sbah}(h]h]jah]h]h!]uh%hhjW8ubah}(h]h]h]h]h!]uh%h)hKhj=8h&hh'h]h)Mgubeh}(h]h]h]h]h!]uh%huhj:8h&hh'h]h)Mfubh)}(hoDraws an unfilled pie on the given surface. A pie is an :meth:`arc` with its endpoints connected to its center.h](h8Draws an unfilled pie on the given surface. A pie is an }hjt8sbh6)}(h :meth:`arc`h]h;)}(hj~8h]harc()}hj8sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj|8ubah}(h]h]h]h]h!]refdochS refdomainj8reftypemeth refexplicitrefwarnhYj1hZNh[arcuh%h5h'h]h)Mihjt8ubh, with its endpoints connected to its center.}hjt8sbeh}(h]h]h]h]h!]uh%hh'h]h)Mihj:8h&hubh)}(hXDThe two angle arguments are given in degrees and indicate the start and stop positions of the pie. The pie is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, a straight line will be drawn from the center position at the given angle, to a length of the radius.h](hThe two angle arguments are given in degrees and indicate the start and stop positions of the pie. The pie is drawn in a clockwise direction from the }hj8sbh;)}(h``start_angle``h]h start_angle}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh to the }hj8sbh;)}(h``stop_angle``h]h stop_angle}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubh. If }hj8sbh;)}(h``start_angle == stop_angle``h]hstart_angle == stop_angle}hj8sbah}(h]h]h]h]h!]uh%h:hj8ubhg, a straight line will be drawn from the center position at the given angle, to a length of the radius.}hj8sbeh}(h]h]h]h]h!]uh%hh'h]h)Mlhj:8h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj8sbah}(h]h]h]h]h!]uh%jhj8h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj 9sbah}(h]h]h]h]h!]uh%jhj9ubh (}hj9sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj 9sbah}(h]h]h]h]h!]uh%j hj9ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj"9j$j%j1j&Nuh%h5hj9ubh)}hj9sbh -- }hj9sbhsurface to draw on}(hj9h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(h0x (int) -- x coordinate of the center of the pieh](j)}(hjHh]hx}hjX9sbah}(h]h]h]h]h!]uh%jhjT9ubh (}hjT9sbh6)}(hhh]j )}(hinth]hint}hjl9sbah}(h]h]h]h]h!]uh%j hji9ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetjn9j$j%j1j&Nuh%h5hjT9ubh)}hjT9sbh -- }hjT9sbh%x coordinate of the center of the pie}(hjT9h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjQ9ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(h0y (int) -- y coordinate of the center of the pieh](j)}(hjh]hy}hj9sbah}(h]h]h]h]h!]uh%jhj9ubh (}hj9sbh6)}(hhh]j )}(hinth]hint}hj9sbah}(h]h]h]h]h!]uh%j hj9ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj9j$j%j1j&Nuh%h5hj9ubh)}hj9sbh -- }hj9sbh%y coordinate of the center of the pie}(hj9h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(hr (int) -- radius of the pieh](j)}(hjhh]hr}hj9sbah}(h]h]h]h]h!]uh%jhj9ubh (}hj9sbh6)}(hhh]j )}(hinth]hint}hj:sbah}(h]h]h]h]h!]uh%j hj9ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj:j$j%j1j&Nuh%h5hj9ubh)}hj9sbh -- }hj9sbhradius of the pie}(hj9h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(h+start_angle (int) -- start angle in degreesh](j)}(h start_angleh]h start_angle}hj9:sbah}(h]h]h]h]h!]uh%jhj5:ubh (}hj5:sbh6)}(hhh]j )}(hinth]hint}hjN:sbah}(h]h]h]h]h!]uh%j hjK:ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetjP:j$j%j1j&Nuh%h5hj5:ubh)}hj5:sbh -- }hj5:sbhstart angle in degrees}(hj5:h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj2:ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(h)stop_angle (int) -- stop angle in degreesh](j)}(h stop_angleh]h stop_angle}hj:sbah}(h]h]h]h]h!]uh%jhj:ubh (}hj:sbh6)}(hhh]j )}(hinth]hint}hj:sbah}(h]h]h]h]h!]uh%j hj:ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj:j$j%j1j&Nuh%h5hj:ubh)}hj:sbh -- }hj:sbhstop angle in degrees}(hj:h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj~:ubah}(h]h]h]h]h!]uh%jhj9ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj:sbah}(h]h]h]h]h!]uh%jhj:ubh (}hj:sbh6)}(hhh]j )}(hColorh]hColor}hj:sbah}(h]h]h]h]h!]uh%j hj:ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj:j$j%j1j&Nuh%h5hj:ubj )}(h or h]h or }hj:sbah}(h]h]h]h]h!]uh%j hj:ubh6)}(hhh]j )}(htupleh]htuple}hj;sbah}(h]h]h]h]h!]uh%j hj ;ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj;j$j%j1j&Nuh%h5hj:ubj )}(hj6h]h(}hj';sbah}(h]h]h]h]h!]uh%j hj:ubh6)}(hhh]j )}(hinth]hint}hj7;sbah}(h]h]h]h]h!]uh%j hj4;ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj9;j$j%j1j&Nuh%h5hj:ubj )}(h, h]h, }hjO;sbah}(h]h]h]h]h!]uh%j hj:ubh6)}(hhh]j )}(hinth]hint}hj`;sbah}(h]h]h]h]h!]uh%j hj];ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetjb;j$j%j1j&Nuh%h5hj:ubj )}(h, h]h, }hjx;sbah}(h]h]h]h]h!]uh%j hj:ubh6)}(hhh]j )}(hinth]hint}hj;sbah}(h]h]h]h]h!]uh%j hj;ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj;j$j%j1j&Nuh%h5hj:ubj )}(h, h]h, }hj;sbah}(h]h]h]h]h!]uh%j hj:ubj )}(hjh]h[}hj;sbah}(h]h]h]h]h!]uh%j hj:ubh6)}(hhh]j )}(hinth]hint}hj;sbah}(h]h]h]h]h!]uh%j hj;ubah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetj;j$j%j1j&Nuh%h5hj:ubj )}(hjh]h]}hj;sbah}(h]h]h]h]h!]uh%j hj:ubj )}(hjh]h)}hj;sbah}(h]h]h]h]h!]uh%j hj:ubh)}hj:sbh -- }hj:sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj:h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj;sbah}(h]h]h]h]h!]uh%h:hj:h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%jhj9ubeh}(h]h]h]h]h!]uh%jhj8ubah}(h]h]h]h]h!]uh%jhj8ubeh}(h]h]h]h]h!]uh%jhj8ubj)}(hhh](j)}(hReturnsh]hReturns}hj,<sbah}(h]h]h]h]h!]uh%jhj)<h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjA<sbah}(h]h]h]h]h!]uh%h:hj=<h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj:<ubah}(h]h]h]h]h!]uh%jhj)<ubeh}(h]h]h]h]h!]uh%jhj8ubj)}(hhh](j)}(h Return typeh]h Return type}hjd<sbah}(h]h]h]h]h!]uh%jhja<h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjy<sbah}(h]h]h]h]h!] refdomainj59 refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hju<ubah}(h]h]h]h]h!]uh%hhjr<ubah}(h]h]h]h]h!]uh%jhja<ubeh}(h]h]h]h]h!]uh%jhj8ubeh}(h]h]h]h]h!]uh%jhj:8h&hh'Nh)Nubh )}(h## pygame.gfxdraw.pie ##h]h## pygame.gfxdraw.pie ##}hj<sbah}(h]h]h]h]h!]h#h$uh%h hj:8h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hj8h&hh'Nh)Nubeh}(h]h](j59functioneh]h]h!]jj59jj<jj<jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1#trigon() (in module pygame.gfxdraw)pygame.gfxdraw.trigonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(htrigonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj<sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj<h&hh'h]h)MubjS)}(hj<h]htrigon}hj<sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj<h&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj<h&hh'h]h)Mubeh}(h]j<ah](jrjseh]h]h!]jwj1jxhjyj<jzj1j<j|trigon()uh%j:h'h]h)Mhj<h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a trigon/triangle`h]h)}(hj=h]hdraw a trigon/triangle}hj =sbah}(h]h]hah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubhz)}(h<:sg:`trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None`h]h)}(hj=h]h6trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None}hj!=sbah}(h]h]jah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj=h&hh'h]h)Mubh)}(hhDraws an unfilled trigon (triangle) on the given surface. For a filled trigon use :meth:`filled_trigon`.h](hRDraws an unfilled trigon (triangle) on the given surface. For a filled trigon use }hj:=sbh6)}(h:meth:`filled_trigon`h]h;)}(hjD=h]hfilled_trigon()}hjF=sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjB=ubah}(h]h]h]h]h!]refdochS refdomainjP=reftypemeth refexplicitrefwarnhYj1hZNh[ filled_trigonuh%h5h'h]h)Mhj:=ubh.}hj:=sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj=h&hubh)}(hqA trigon can also be drawn using :meth:`polygon` e.g. ``polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h](h!A trigon can also be drawn using }hjl=sbh6)}(h:meth:`polygon`h]h;)}(hjv=h]h polygon()}hjx=sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjt=ubah}(h]h]h]h]h!]refdochS refdomainj=reftypemeth refexplicitrefwarnhYj1hZNh[polygonuh%h5h'h]h)Mhjl=ubh e.g. }hjl=sbh;)}(h;``polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h]h7polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)}hj=sbah}(h]h]h]h]h!]uh%h:hjl=ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj=h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj=sbah}(h]h]h]h]h!]uh%jhj=h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj=sbah}(h]h]h]h]h!]uh%jhj=ubh (}hj=sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj=sbah}(h]h]h]h]h!]uh%j hj=ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetj=j$j%j1j&Nuh%h5hj=ubh)}hj=sbh -- }hj=sbhsurface to draw on}(hj=h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h:x1 (int) -- x coordinate of the first corner of the trigonh](j)}(hx1h]hx1}hj>sbah}(h]h]h]h]h!]uh%jhj>ubh (}hj>sbh6)}(hhh]j )}(hinth]hint}hj/>sbah}(h]h]h]h]h!]uh%j hj,>ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj1>j$j%j1j&Nuh%h5hj>ubh)}hj>sbh -- }hj>sbh.x coordinate of the first corner of the trigon}(hj>h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h:y1 (int) -- y coordinate of the first corner of the trigonh](j)}(hy1h]hy1}hjf>sbah}(h]h]h]h]h!]uh%jhjb>ubh (}hjb>sbh6)}(hhh]j )}(hinth]hint}hj{>sbah}(h]h]h]h]h!]uh%j hjx>ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj}>j$j%j1j&Nuh%h5hjb>ubh)}hjb>sbh -- }hjb>sbh.y coordinate of the first corner of the trigon}(hjb>h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj_>ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h;x2 (int) -- x coordinate of the second corner of the trigonh](j)}(hx2h]hx2}hj>sbah}(h]h]h]h]h!]uh%jhj>ubh (}hj>sbh6)}(hhh]j )}(hinth]hint}hj>sbah}(h]h]h]h]h!]uh%j hj>ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj>j$j%j1j&Nuh%h5hj>ubh)}hj>sbh -- }hj>sbh/x coordinate of the second corner of the trigon}(hj>h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h;y2 (int) -- y coordinate of the second corner of the trigonh](j)}(hy2h]hy2}hj>sbah}(h]h]h]h]h!]uh%jhj>ubh (}hj>sbh6)}(hhh]j )}(hinth]hint}hj?sbah}(h]h]h]h]h!]uh%j hj?ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj?j$j%j1j&Nuh%h5hj>ubh)}hj>sbh -- }hj>sbh/y coordinate of the second corner of the trigon}(hj>h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h:x3 (int) -- x coordinate of the third corner of the trigonh](j)}(hx3h]hx3}hjJ?sbah}(h]h]h]h]h!]uh%jhjF?ubh (}hjF?sbh6)}(hhh]j )}(hinth]hint}hj_?sbah}(h]h]h]h]h!]uh%j hj\?ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetja?j$j%j1j&Nuh%h5hjF?ubh)}hjF?sbh -- }hjF?sbh.x coordinate of the third corner of the trigon}(hjF?h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjC?ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(h:y3 (int) -- y coordinate of the third corner of the trigonh](j)}(hy3h]hy3}hj?sbah}(h]h]h]h]h!]uh%jhj?ubh (}hj?sbh6)}(hhh]j )}(hinth]hint}hj?sbah}(h]h]h]h]h!]uh%j hj?ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj?j$j%j1j&Nuh%h5hj?ubh)}hj?sbh -- }hj?sbh.y coordinate of the third corner of the trigon}(hj?h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%jhj=ubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hj?sbah}(h]h]h]h]h!]uh%jhj?ubh (}hj?sbh6)}(hhh]j )}(hColorh]hColor}hj?sbah}(h]h]h]h]h!]uh%j hj?ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj?j$j%j1j&Nuh%h5hj?ubj )}(h or h]h or }hj@sbah}(h]h]h]h]h!]uh%j hj?ubh6)}(hhh]j )}(htupleh]htuple}hj @sbah}(h]h]h]h]h!]uh%j hj@ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj"@j$j%j1j&Nuh%h5hj?ubj )}(hj6h]h(}hj8@sbah}(h]h]h]h]h!]uh%j hj?ubh6)}(hhh]j )}(hinth]hint}hjH@sbah}(h]h]h]h]h!]uh%j hjE@ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetjJ@j$j%j1j&Nuh%h5hj?ubj )}(h, h]h, }hj`@sbah}(h]h]h]h]h!]uh%j hj?ubh6)}(hhh]j )}(hinth]hint}hjq@sbah}(h]h]h]h]h!]uh%j hjn@ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetjs@j$j%j1j&Nuh%h5hj?ubj )}(h, h]h, }hj@sbah}(h]h]h]h]h!]uh%j hj?ubh6)}(hhh]j )}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%j hj@ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj@j$j%j1j&Nuh%h5hj?ubj )}(h, h]h, }hj@sbah}(h]h]h]h]h!]uh%j hj?ubj )}(hjh]h[}hj@sbah}(h]h]h]h]h!]uh%j hj?ubh6)}(hhh]j )}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%j hj@ubah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetj@j$j%j1j&Nuh%h5hj?ubj )}(hjh]h]}hj@sbah}(h]h]h]h]h!]uh%j hj?ubj )}(hjh]h)}hj@sbah}(h]h]h]h]h!]uh%j hj?ubh)}hj?sbh -- }hj?sbhAcolor to draw with, the alpha value is optional if using a tuple }(hj?h&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjAsbah}(h]h]h]h]h!]uh%h:hj?h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%jhj=ubeh}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!]uh%jhj=ubeh}(h]h]h]h]h!]uh%jhj=ubj)}(hhh](j)}(hReturnsh]hReturns}hj=Asbah}(h]h]h]h]h!]uh%jhj:Ah'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjRAsbah}(h]h]h]h]h!]uh%h:hjNAh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjKAubah}(h]h]h]h]h!]uh%jhj:Aubeh}(h]h]h]h]h!]uh%jhj=ubj)}(hhh](j)}(h Return typeh]h Return type}hjuAsbah}(h]h]h]h]h!]uh%jhjrAh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjAsbah}(h]h]h]h]h!] refdomainj= refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjAubah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%jhjrAubeh}(h]h]h]h]h!]uh%jhj=ubeh}(h]h]h]h]h!]uh%jhj=h&hh'Nh)Nubh )}(h## pygame.gfxdraw.trigon ##h]h## pygame.gfxdraw.trigon ##}hjAsbah}(h]h]h]h]h!]h#h$uh%h hj=h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hj<h&hh'Nh)Nubeh}(h]h](j=functioneh]h]h!]jj=jjAjjAjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1%aatrigon() (in module pygame.gfxdraw)pygame.gfxdraw.aatrigonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(haatrigonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjAsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjAh&hh'h]h)MubjS)}(hjAh]haatrigon}hjAsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjAh&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjAh&hh'h]h)Mubeh}(h]jAah](jrjseh]h]h!]jwj1jxhjyjAjzj1jAj| aatrigon()uh%j:h'h]h)MhjAh&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`draw an antialiased trigon/triangle`h]h)}(hjBh]h#draw an antialiased trigon/triangle}hjBsbah}(h]h]hah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Mubhz)}(h>:sg:`aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None`h]h)}(hj0Bh]h8aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None}hj2Bsbah}(h]h]jah]h]h!]uh%hhj.Bubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjBh&hh'h]h)Mubh)}(hEDraws an unfilled antialiased trigon (triangle) on the given surface.h]hEDraws an unfilled antialiased trigon (triangle) on the given surface.}hjKBsbah}(h]h]h]h]h!]uh%hh'h]h)MhjBh&hubh)}(hxAn aatrigon can also be drawn using :meth:`aapolygon` e.g. ``aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h](h$An aatrigon can also be drawn using }hjYBsbh6)}(h:meth:`aapolygon`h]h;)}(hjcBh]h aapolygon()}hjeBsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjaBubah}(h]h]h]h]h!]refdochS refdomainjoBreftypemeth refexplicitrefwarnhYj1hZNh[ aapolygonuh%h5h'h]h)MhjYBubh e.g. }hjYBsbh;)}(h=``aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h]h9aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)}hjBsbah}(h]h]h]h]h!]uh%h:hjYBubeh}(h]h]h]h]h!]uh%hh'h]h)MhjBh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjBsbah}(h]h]h]h]h!]uh%jhjBh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjBsbah}(h]h]h]h]h!]uh%jhjBubh (}hjBsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjBsbah}(h]h]h]h]h!]uh%j hjBubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjBj$j%j1j&Nuh%h5hjBubh)}hjBsbh -- }hjBsbhsurface to draw on}(hjBh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h:x1 (int) -- x coordinate of the first corner of the trigonh](j)}(hx1h]hx1}hjCsbah}(h]h]h]h]h!]uh%jhjCubh (}hjCsbh6)}(hhh]j )}(hinth]hint}hjCsbah}(h]h]h]h]h!]uh%j hjCubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjCj$j%j1j&Nuh%h5hjCubh)}hjCsbh -- }hjCsbh.x coordinate of the first corner of the trigon}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h:y1 (int) -- y coordinate of the first corner of the trigonh](j)}(hy1h]hy1}hjSCsbah}(h]h]h]h]h!]uh%jhjOCubh (}hjOCsbh6)}(hhh]j )}(hinth]hint}hjhCsbah}(h]h]h]h]h!]uh%j hjeCubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjjCj$j%j1j&Nuh%h5hjOCubh)}hjOCsbh -- }hjOCsbh.y coordinate of the first corner of the trigon}(hjOCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjLCubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h;x2 (int) -- x coordinate of the second corner of the trigonh](j)}(hx2h]hx2}hjCsbah}(h]h]h]h]h!]uh%jhjCubh (}hjCsbh6)}(hhh]j )}(hinth]hint}hjCsbah}(h]h]h]h]h!]uh%j hjCubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjCj$j%j1j&Nuh%h5hjCubh)}hjCsbh -- }hjCsbh/x coordinate of the second corner of the trigon}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h;y2 (int) -- y coordinate of the second corner of the trigonh](j)}(hy2h]hy2}hjCsbah}(h]h]h]h]h!]uh%jhjCubh (}hjCsbh6)}(hhh]j )}(hinth]hint}hjDsbah}(h]h]h]h]h!]uh%j hjCubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjDj$j%j1j&Nuh%h5hjCubh)}hjCsbh -- }hjCsbh/y coordinate of the second corner of the trigon}(hjCh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h:x3 (int) -- x coordinate of the third corner of the trigonh](j)}(hx3h]hx3}hj7Dsbah}(h]h]h]h]h!]uh%jhj3Dubh (}hj3Dsbh6)}(hhh]j )}(hinth]hint}hjLDsbah}(h]h]h]h]h!]uh%j hjIDubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjNDj$j%j1j&Nuh%h5hj3Dubh)}hj3Dsbh -- }hj3Dsbh.x coordinate of the third corner of the trigon}(hj3Dh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj0Dubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(h:y3 (int) -- y coordinate of the third corner of the trigonh](j)}(hy3h]hy3}hjDsbah}(h]h]h]h]h!]uh%jhjDubh (}hjDsbh6)}(hhh]j )}(hinth]hint}hjDsbah}(h]h]h]h]h!]uh%j hjDubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjDj$j%j1j&Nuh%h5hjDubh)}hjDsbh -- }hjDsbh.y coordinate of the third corner of the trigon}(hjDh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj|Dubah}(h]h]h]h]h!]uh%jhjBubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjDsbah}(h]h]h]h]h!]uh%jhjDubh (}hjDsbh6)}(hhh]j )}(hColorh]hColor}hjDsbah}(h]h]h]h]h!]uh%j hjDubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjDj$j%j1j&Nuh%h5hjDubj )}(h or h]h or }hjDsbah}(h]h]h]h]h!]uh%j hjDubh6)}(hhh]j )}(htupleh]htuple}hj Esbah}(h]h]h]h]h!]uh%j hj Eubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjEj$j%j1j&Nuh%h5hjDubj )}(hj6h]h(}hj%Esbah}(h]h]h]h]h!]uh%j hjDubh6)}(hhh]j )}(hinth]hint}hj5Esbah}(h]h]h]h]h!]uh%j hj2Eubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetj7Ej$j%j1j&Nuh%h5hjDubj )}(h, h]h, }hjMEsbah}(h]h]h]h]h!]uh%j hjDubh6)}(hhh]j )}(hinth]hint}hj^Esbah}(h]h]h]h]h!]uh%j hj[Eubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetj`Ej$j%j1j&Nuh%h5hjDubj )}(h, h]h, }hjvEsbah}(h]h]h]h]h!]uh%j hjDubh6)}(hhh]j )}(hinth]hint}hjEsbah}(h]h]h]h]h!]uh%j hjEubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjEj$j%j1j&Nuh%h5hjDubj )}(h, h]h, }hjEsbah}(h]h]h]h]h!]uh%j hjDubj )}(hjh]h[}hjEsbah}(h]h]h]h]h!]uh%j hjDubh6)}(hhh]j )}(hinth]hint}hjEsbah}(h]h]h]h]h!]uh%j hjEubah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetjEj$j%j1j&Nuh%h5hjDubj )}(hjh]h]}hjEsbah}(h]h]h]h]h!]uh%j hjDubj )}(hjh]h)}hjEsbah}(h]h]h]h]h!]uh%j hjDubh)}hjDsbh -- }hjDsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjDh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjEsbah}(h]h]h]h]h!]uh%h:hjDh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%jhjBubeh}(h]h]h]h]h!]uh%jhjBubah}(h]h]h]h]h!]uh%jhjBubeh}(h]h]h]h]h!]uh%jhjBubj)}(hhh](j)}(hReturnsh]hReturns}hj*Fsbah}(h]h]h]h]h!]uh%jhj'Fh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj?Fsbah}(h]h]h]h]h!]uh%h:hj;Fh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj8Fubah}(h]h]h]h]h!]uh%jhj'Fubeh}(h]h]h]h]h!]uh%jhjBubj)}(hhh](j)}(h Return typeh]h Return type}hjbFsbah}(h]h]h]h]h!]uh%jhj_Fh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjwFsbah}(h]h]h]h]h!] refdomainjB refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjsFubah}(h]h]h]h]h!]uh%hhjpFubah}(h]h]h]h]h!]uh%jhj_Fubeh}(h]h]h]h]h!]uh%jhjBubeh}(h]h]h]h]h!]uh%jhjBh&hh'Nh)Nubh )}(h## pygame.gfxdraw.aatrigon ##h]h## pygame.gfxdraw.aatrigon ##}hjFsbah}(h]h]h]h]h!]h#h$uh%h hjBh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hjAh&hh'Nh)Nubeh}(h]h](jBfunctioneh]h]h!]jjBjjFjjFjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1*filled_trigon() (in module pygame.gfxdraw)pygame.gfxdraw.filled_trigonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(h filled_trigonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjFsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjFh&hh'h]h)MubjS)}(hjFh]h filled_trigon}hjFsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjFh&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjFh&hh'h]h)Mubeh}(h]jFah](jrjseh]h]h!]jwj1jxhjyjFjzj1jFj|filled_trigon()uh%j:h'h]h)MhjFh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`draw a filled trigon/triangle`h]h)}(hjGh]hdraw a filled trigon/triangle}hjGsbah}(h]h]hah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)Mubhz)}(hC:sg:`filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None`h]h)}(hjGh]h=filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None}hjGsbah}(h]h]jah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjFh&hh'h]h)Mubh)}(haDraws a filled trigon (triangle) on the given surface. For an unfilled trigon use :meth:`trigon`.h](hRDraws a filled trigon (triangle) on the given surface. For an unfilled trigon use }hj8Gsbh6)}(h:meth:`trigon`h]h;)}(hjBGh]htrigon()}hjDGsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj@Gubah}(h]h]h]h]h!]refdochS refdomainjNGreftypemeth refexplicitrefwarnhYj1hZNh[trigonuh%h5h'h]h)Mhj8Gubh.}hj8Gsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjFh&hubh)}(hA filled_trigon can also be drawn using :meth:`filled_polygon` e.g. ``filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h](h(A filled_trigon can also be drawn using }hjjGsbh6)}(h:meth:`filled_polygon`h]h;)}(hjtGh]hfilled_polygon()}hjvGsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjrGubah}(h]h]h]h]h!]refdochS refdomainjGreftypemeth refexplicitrefwarnhYj1hZNh[filled_polygonuh%h5h'h]h)MhjjGubh e.g. }hjjGsbh;)}(hB``filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)``h]h>filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)}hjGsbah}(h]h]h]h]h!]uh%h:hjjGubeh}(h]h]h]h]h!]uh%hh'h]h)MhjFh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjGsbah}(h]h]h]h]h!]uh%jhjGh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjGsbah}(h]h]h]h]h!]uh%jhjGubh (}hjGsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjGsbah}(h]h]h]h]h!]uh%j hjGubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjGj$j%j1j&Nuh%h5hjGubh)}hjGsbh -- }hjGsbhsurface to draw on}(hjGh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h:x1 (int) -- x coordinate of the first corner of the trigonh](j)}(hx1h]hx1}hjHsbah}(h]h]h]h]h!]uh%jhjHubh (}hjHsbh6)}(hhh]j )}(hinth]hint}hj-Hsbah}(h]h]h]h]h!]uh%j hj*Hubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetj/Hj$j%j1j&Nuh%h5hjHubh)}hjHsbh -- }hjHsbh.x coordinate of the first corner of the trigon}(hjHh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h:y1 (int) -- y coordinate of the first corner of the trigonh](j)}(hy1h]hy1}hjdHsbah}(h]h]h]h]h!]uh%jhj`Hubh (}hj`Hsbh6)}(hhh]j )}(hinth]hint}hjyHsbah}(h]h]h]h]h!]uh%j hjvHubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetj{Hj$j%j1j&Nuh%h5hj`Hubh)}hj`Hsbh -- }hj`Hsbh.y coordinate of the first corner of the trigon}(hj`Hh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj]Hubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h;x2 (int) -- x coordinate of the second corner of the trigonh](j)}(hx2h]hx2}hjHsbah}(h]h]h]h]h!]uh%jhjHubh (}hjHsbh6)}(hhh]j )}(hinth]hint}hjHsbah}(h]h]h]h]h!]uh%j hjHubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjHj$j%j1j&Nuh%h5hjHubh)}hjHsbh -- }hjHsbh/x coordinate of the second corner of the trigon}(hjHh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h;y2 (int) -- y coordinate of the second corner of the trigonh](j)}(hy2h]hy2}hjHsbah}(h]h]h]h]h!]uh%jhjHubh (}hjHsbh6)}(hhh]j )}(hinth]hint}hjIsbah}(h]h]h]h]h!]uh%j hjIubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjIj$j%j1j&Nuh%h5hjHubh)}hjHsbh -- }hjHsbh/y coordinate of the second corner of the trigon}(hjHh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h:x3 (int) -- x coordinate of the third corner of the trigonh](j)}(hx3h]hx3}hjHIsbah}(h]h]h]h]h!]uh%jhjDIubh (}hjDIsbh6)}(hhh]j )}(hinth]hint}hj]Isbah}(h]h]h]h]h!]uh%j hjZIubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetj_Ij$j%j1j&Nuh%h5hjDIubh)}hjDIsbh -- }hjDIsbh.x coordinate of the third corner of the trigon}(hjDIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjAIubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(h:y3 (int) -- y coordinate of the third corner of the trigonh](j)}(hy3h]hy3}hjIsbah}(h]h]h]h]h!]uh%jhjIubh (}hjIsbh6)}(hhh]j )}(hinth]hint}hjIsbah}(h]h]h]h]h!]uh%j hjIubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjIj$j%j1j&Nuh%h5hjIubh)}hjIsbh -- }hjIsbh.y coordinate of the third corner of the trigon}(hjIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%jhjGubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjIsbah}(h]h]h]h]h!]uh%jhjIubh (}hjIsbh6)}(hhh]j )}(hColorh]hColor}hjIsbah}(h]h]h]h]h!]uh%j hjIubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjIj$j%j1j&Nuh%h5hjIubj )}(h or h]h or }hj Jsbah}(h]h]h]h]h!]uh%j hjIubh6)}(hhh]j )}(htupleh]htuple}hjJsbah}(h]h]h]h]h!]uh%j hjJubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetj Jj$j%j1j&Nuh%h5hjIubj )}(hj6h]h(}hj6Jsbah}(h]h]h]h]h!]uh%j hjIubh6)}(hhh]j )}(hinth]hint}hjFJsbah}(h]h]h]h]h!]uh%j hjCJubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjHJj$j%j1j&Nuh%h5hjIubj )}(h, h]h, }hj^Jsbah}(h]h]h]h]h!]uh%j hjIubh6)}(hhh]j )}(hinth]hint}hjoJsbah}(h]h]h]h]h!]uh%j hjlJubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjqJj$j%j1j&Nuh%h5hjIubj )}(h, h]h, }hjJsbah}(h]h]h]h]h!]uh%j hjIubh6)}(hhh]j )}(hinth]hint}hjJsbah}(h]h]h]h]h!]uh%j hjJubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjJj$j%j1j&Nuh%h5hjIubj )}(h, h]h, }hjJsbah}(h]h]h]h]h!]uh%j hjIubj )}(hjh]h[}hjJsbah}(h]h]h]h]h!]uh%j hjIubh6)}(hhh]j )}(hinth]hint}hjJsbah}(h]h]h]h]h!]uh%j hjJubah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetjJj$j%j1j&Nuh%h5hjIubj )}(hjh]h]}hjJsbah}(h]h]h]h]h!]uh%j hjIubj )}(hjh]h)}hjJsbah}(h]h]h]h]h!]uh%j hjIubh)}hjIsbh -- }hjIsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjIh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hj Ksbah}(h]h]h]h]h!]uh%h:hjIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%jhjGubeh}(h]h]h]h]h!]uh%jhjGubah}(h]h]h]h]h!]uh%jhjGubeh}(h]h]h]h]h!]uh%jhjGubj)}(hhh](j)}(hReturnsh]hReturns}hj;Ksbah}(h]h]h]h]h!]uh%jhj8Kh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjPKsbah}(h]h]h]h]h!]uh%h:hjLKh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjIKubah}(h]h]h]h]h!]uh%jhj8Kubeh}(h]h]h]h]h!]uh%jhjGubj)}(hhh](j)}(h Return typeh]h Return type}hjsKsbah}(h]h]h]h]h!]uh%jhjpKh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjKsbah}(h]h]h]h]h!] refdomainjG refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hjKubah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%jhjpKubeh}(h]h]h]h]h!]uh%jhjGubeh}(h]h]h]h]h!]uh%jhjFh&hh'Nh)Nubh )}(h"## pygame.gfxdraw.filled_trigon ##h]h"## pygame.gfxdraw.filled_trigon ##}hjKsbah}(h]h]h]h]h!]h#h$uh%h hjFh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hjFh&hh'Nh)Nubeh}(h]h](jGfunctioneh]h]h!]jjGjjKjjKjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1$polygon() (in module pygame.gfxdraw)pygame.gfxdraw.polygonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hpolygonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjKsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjKh&hh'h]h)MubjS)}(hjKh]hpolygon}hjKsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjKh&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjKh&hh'h]h)Mubeh}(h]jKah](jrjseh]h]h!]jwj1jxhjyjKjzj1jKj| polygon()uh%j:h'h]h)MhjKh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a polygon`h]h)}(hjLh]hdraw a polygon}hjLsbah}(h]h]hah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mubhz)}(h-:sg:`polygon(surface, points, color) -> None`h]h)}(hj.Lh]h'polygon(surface, points, color) -> None}hj0Lsbah}(h]h]jah]h]h!]uh%hhj,Lubah}(h]h]h]h]h!]uh%h)hKhjLh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjLh&hh'h]h)Mubh)}(h`Draws an unfilled polygon on the given surface. For a filled polygon use :meth:`filled_polygon`.h](hIDraws an unfilled polygon on the given surface. For a filled polygon use }hjILsbh6)}(h:meth:`filled_polygon`h]h;)}(hjSLh]hfilled_polygon()}hjULsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjQLubah}(h]h]h]h]h!]refdochS refdomainj_Lreftypemeth refexplicitrefwarnhYj1hZNh[filled_polygonuh%h5h'h]h)MhjILubh.}hjILsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjLh&hubh)}(hX?The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``.h](h The adjacent coordinates in the }hj{Lsbh;)}(h ``points``h]hpoints}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubhi argument, as well as the first and last points, will be connected by line segments. e.g. For the points }hj{Lsbh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh# a line segment will be drawn from }hj{Lsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh to }hj{Lsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh, from }hj{Lsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh to }hj{Lsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh , and from }hj{Lsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hjLsbah}(h]h]h]h]h!]uh%h:hj{Lubh to }hj{Lsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjMsbah}(h]h]h]h]h!]uh%h:hj{Lubh.}hj{Lsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjLh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjMsbah}(h]h]h]h]h!]uh%jhjMh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj:Msbah}(h]h]h]h]h!]uh%jhj6Mubh (}hj6Msbh6)}(hhh]j )}(hSurfaceh]hSurface}hjOMsbah}(h]h]h]h]h!]uh%j hjLMubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjQMj$j%j1j&Nuh%h5hj6Mubh)}hj6Msbh -- }hj6Msbhsurface to draw on}(hj6Mh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj3Mubah}(h]h]h]h]h!]uh%jhj0Mubj)}(hhh]h)}(hpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats (float values will be truncated)h](j)}(hpointsh]hpoints}hjMsbah}(h]h]h]h]h!]uh%jhjMubh (}hjMsbh6)}(hhh]j )}(htupleh]htuple}hjMsbah}(h]h]h]h]h!]uh%j hjMubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjMj$j%j1j&Nuh%h5hjMubj )}(hj6h]h(}hjMsbah}(h]h]h]h]h!]uh%j hjMubh6)}(hhh]j )}(h coordinateh]h coordinate}hjMsbah}(h]h]h]h]h!]uh%j hjMubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjMj$j%j1j&Nuh%h5hjMubj )}(h) or h]h) or }hjMsbah}(h]h]h]h]h!]uh%j hjMubh6)}(hhh]j )}(hlisth]hlist}hjMsbah}(h]h]h]h]h!]uh%j hjMubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjMj$j%j1j&Nuh%h5hjMubj )}(hj6h]h(}hjNsbah}(h]h]h]h]h!]uh%j hjMubh6)}(hhh]j )}(h coordinateh]h coordinate}hjNsbah}(h]h]h]h]h!]uh%j hjNubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjNj$j%j1j&Nuh%h5hjMubj )}(hjh]h)}hj-Nsbah}(h]h]h]h]h!]uh%j hjMubh)}hjMsbh -- }hjMsbh7a sequence of 3 or more (x, y) coordinates, where each }(hjMh&hh'Nh)Nubj7)}(h *coordinate*h]h coordinate}hjFNsbah}(h]h]h]h]h!]uh%j7hjMh&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hjMh&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hjZNh]hpygame.math.Vector2}hj\Nsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjXNubah}(h]h]h]h]h!]refdochS refdomainjfNreftypeclass refexplicitrefwarnhYj1hZNh[pygame.math.Vector2uh%h5h'h]h)MhjMh&hubh2 of 2 ints/floats (float values will be truncated)}(hjMh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%jhj0Mubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjNsbah}(h]h]h]h]h!]uh%jhjNubh (}hjNsbh6)}(hhh]j )}(hColorh]hColor}hjNsbah}(h]h]h]h]h!]uh%j hjNubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjNj$j%j1j&Nuh%h5hjNubj )}(h or h]h or }hjNsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(htupleh]htuple}hjNsbah}(h]h]h]h]h!]uh%j hjNubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjNj$j%j1j&Nuh%h5hjNubj )}(hj6h]h(}hjNsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hjNsbah}(h]h]h]h]h!]uh%j hjNubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjNj$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hj Osbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hjOsbah}(h]h]h]h]h!]uh%j hjOubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetj Oj$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hj6Osbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hjGOsbah}(h]h]h]h]h!]uh%j hjDOubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjIOj$j%j1j&Nuh%h5hjNubj )}(h, h]h, }hj_Osbah}(h]h]h]h]h!]uh%j hjNubj )}(hjh]h[}hjmOsbah}(h]h]h]h]h!]uh%j hjNubh6)}(hhh]j )}(hinth]hint}hj}Osbah}(h]h]h]h]h!]uh%j hjzOubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetjOj$j%j1j&Nuh%h5hjNubj )}(hjh]h]}hjOsbah}(h]h]h]h]h!]uh%j hjNubj )}(hjh]h)}hjOsbah}(h]h]h]h]h!]uh%j hjNubh)}hjNsbh -- }hjNsbhAcolor to draw with, the alpha value is optional if using a tuple }(hjNh&hh'Nh)Nubh;)}(h ``(RGB[A])``h]h(RGB[A])}hjOsbah}(h]h]h]h]h!]uh%h:hjNh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%jhj0Mubeh}(h]h]h]h]h!]uh%jhj-Mubah}(h]h]h]h]h!]uh%jhjMubeh}(h]h]h]h]h!]uh%jhjMubj)}(hhh](j)}(hReturnsh]hReturns}hjOsbah}(h]h]h]h]h!]uh%jhjOh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjOsbah}(h]h]h]h]h!]uh%h:hjOh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%jhjOubeh}(h]h]h]h]h!]uh%jhjMubj)}(hhh](j)}(h Return typeh]h Return type}hj"Psbah}(h]h]h]h]h!]uh%jhjPh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj7Psbah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj3Pubah}(h]h]h]h]h!]uh%hhj0Pubah}(h]h]h]h]h!]uh%jhjPubeh}(h]h]h]h]h!]uh%jhjMubj)}(hhh](j)}(hRaisesh]hRaises}hj^Psbah}(h]h]h]h]h!]uh%jhj[Ph'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h>ValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hj|Psbah}(h]h]h]h]h!]uh%jhjyPubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypeexc reftargetj~Pj$j%j1j&Nuh%h5hjuPubh -- }hjuPsbhif }(hjuPh&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hjPsbah}(h]h]h]h]h!]uh%h:hjuPh&hh'Nh)Nubh (must have at least 3 points)}(hjuPh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjrPubah}(h]h]h]h]h!]uh%jhjoPubj)}(hhh]h)}(hQIndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)h](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hjPsbah}(h]h]h]h]h!]uh%jhjPubah}(h]h]h]h]h!] refdomainjdM refexplicitreftypejP reftargetjPj$j%j1j&Nuh%h5hjPubh -- }hjPsbhif }(hjPh&hh'Nh)Nubh;)}(h``len(coordinate) < 2``h]hlen(coordinate) < 2}hjPsbah}(h]h]h]h]h!]uh%h:hjPh&hh'Nh)Nubh- (each coordinate must have at least 2 items)}(hjPh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%jhjoPubeh}(h]h]h]h]h!]uh%jhjlPubah}(h]h]h]h]h!]uh%jhj[Pubeh}(h]h]h]h]h!]uh%jhjMubeh}(h]h]h]h]h!]uh%jhjLh&hh'Nh)Nubh )}(h## pygame.gfxdraw.polygon ##h]h## pygame.gfxdraw.polygon ##}hjQsbah}(h]h]h]h]h!]h#h$uh%h hjLh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hjKh&hh'Nh)Nubeh}(h]h](jdMfunctioneh]h]h!]jjdMjj2Qjj2Qjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1&aapolygon() (in module pygame.gfxdraw)pygame.gfxdraw.aapolygonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(h aapolygonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjKQsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjGQh&hh'h]h)MubjS)}(hjIQh]h aapolygon}hjYQsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjGQh&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjGQh&hh'h]h)Mubeh}(h]jBQah](jrjseh]h]h!]jwj1jxhjyjIQjzj1jIQj| aapolygon()uh%j:h'h]h)MhjDQh&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`draw an antialiased polygon`h]h)}(hjQh]hdraw an antialiased polygon}hjQsbah}(h]h]hah]h]h!]uh%hhj~Qubah}(h]h]h]h]h!]uh%h)hKhj{Qh&hh'h]h)Mubhz)}(h/:sg:`aapolygon(surface, points, color) -> None`h]h)}(hjQh]h)aapolygon(surface, points, color) -> None}hjQsbah}(h]h]jah]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%h)hKhj{Qh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjxQh&hh'h]h)Mubh)}(h;Draws an unfilled antialiased polygon on the given surface.h]h;Draws an unfilled antialiased polygon on the given surface.}hjQsbah}(h]h]h]h]h!]uh%hh'h]h)MhjxQh&hubh)}(hX?The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``.h](h The adjacent coordinates in the }hjQsbh;)}(h ``points``h]hpoints}hjQsbah}(h]h]h]h]h!]uh%h:hjQubhi argument, as well as the first and last points, will be connected by line segments. e.g. For the points }hjQsbh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hjQsbah}(h]h]h]h]h!]uh%h:hjQubh# a line segment will be drawn from }hjQsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjQsbah}(h]h]h]h]h!]uh%h:hjQubh to }hjQsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjQsbah}(h]h]h]h]h!]uh%h:hjQubh, from }hjQsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjRsbah}(h]h]h]h]h!]uh%h:hjQubh to }hjQsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hj"Rsbah}(h]h]h]h]h!]uh%h:hjQubh , and from }hjQsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hj4Rsbah}(h]h]h]h]h!]uh%h:hjQubh to }hjQsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjFRsbah}(h]h]h]h]h!]uh%h:hjQubh.}hjQsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjxQh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjdRsbah}(h]h]h]h]h!]uh%jhjaRh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjRsbah}(h]h]h]h]h!]uh%jhj{Rubh (}hj{Rsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjRsbah}(h]h]h]h]h!]uh%j hjRubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjRj$j%j1j&Nuh%h5hj{Rubh)}hj{Rsbh -- }hj{Rsbhsurface to draw on}(hj{Rh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjxRubah}(h]h]h]h]h!]uh%jhjuRubj)}(hhh]h)}(hpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats (float values will be truncated)h](j)}(hpointsh]hpoints}hjRsbah}(h]h]h]h]h!]uh%jhjRubh (}hjRsbh6)}(hhh]j )}(htupleh]htuple}hjRsbah}(h]h]h]h]h!]uh%j hjRubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetjRj$j%j1j&Nuh%h5hjRubj )}(hj6h]h(}hjRsbah}(h]h]h]h]h!]uh%j hjRubh6)}(hhh]j )}(h coordinateh]h coordinate}hj Ssbah}(h]h]h]h]h!]uh%j hjSubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetj Sj$j%j1j&Nuh%h5hjRubj )}(h) or h]h) or }hj!Ssbah}(h]h]h]h]h!]uh%j hjRubh6)}(hhh]j )}(hlisth]hlist}hj2Ssbah}(h]h]h]h]h!]uh%j hj/Subah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetj4Sj$j%j1j&Nuh%h5hjRubj )}(hj6h]h(}hjJSsbah}(h]h]h]h]h!]uh%j hjRubh6)}(hhh]j )}(h coordinateh]h coordinate}hjZSsbah}(h]h]h]h]h!]uh%j hjWSubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetj\Sj$j%j1j&Nuh%h5hjRubj )}(hjh]h)}hjrSsbah}(h]h]h]h]h!]uh%j hjRubh)}hjRsbh -- }hjRsbh7a sequence of 3 or more (x, y) coordinates, where each }(hjRh&hh'Nh)Nubj7)}(h *coordinate*h]h coordinate}hjSsbah}(h]h]h]h]h!]uh%j7hjRh&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hjRh&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hjSh]hpygame.math.Vector2}hjSsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjSubah}(h]h]h]h]h!]refdochS refdomainjSreftypeclass refexplicitrefwarnhYj1hZNh[pygame.math.Vector2uh%h5h'h]h)MhjRh&hubh2 of 2 ints/floats (float values will be truncated)}(hjRh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%jhjuRubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjSsbah}(h]h]h]h]h!]uh%jhjSubh (}hjSsbh6)}(hhh]j )}(hColorh]hColor}hjSsbah}(h]h]h]h]h!]uh%j hjSubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetjSj$j%j1j&Nuh%h5hjSubj )}(h or h]h or }hjTsbah}(h]h]h]h]h!]uh%j hjSubh6)}(hhh]j )}(htupleh]htuple}hjTsbah}(h]h]h]h]h!]uh%j hjTubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetjTj$j%j1j&Nuh%h5hjSubj )}(hj6h]h(}hj*Tsbah}(h]h]h]h]h!]uh%j hjSubh6)}(hhh]j )}(hinth]hint}hj:Tsbah}(h]h]h]h]h!]uh%j hj7Tubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejx reftargetjValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hjUsbah}(h]h]h]h]h!]uh%jhjUubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejP reftargetjUj$j%j1j&Nuh%h5hjUubh -- }hjUsbhif }(hjUh&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hjUsbah}(h]h]h]h]h!]uh%h:hjUh&hh'Nh)Nubh (must have at least 3 points)}(hjUh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%jhjUubj)}(hhh]h)}(hQIndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)h](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hj Vsbah}(h]h]h]h]h!]uh%jhjVubah}(h]h]h]h]h!] refdomainjR refexplicitreftypejP reftargetj Vj$j%j1j&Nuh%h5hjVubh -- }hjVsbhif }(hjVh&hh'Nh)Nubh;)}(h``len(coordinate) < 2``h]hlen(coordinate) < 2}hj)Vsbah}(h]h]h]h]h!]uh%h:hjVh&hh'Nh)Nubh- (each coordinate must have at least 2 items)}(hjVh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%jhjUubeh}(h]h]h]h]h!]uh%jhjUubah}(h]h]h]h]h!]uh%jhjUubeh}(h]h]h]h]h!]uh%jhj^Rubeh}(h]h]h]h]h!]uh%jhjxQh&hh'Nh)Nubh )}(h## pygame.gfxdraw.aapolygon ##h]h## pygame.gfxdraw.aapolygon ##}hj_Vsbah}(h]h]h]h]h!]h#h$uh%h hjxQh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j~hjDQh&hh'Nh)Nubeh}(h]h](jRfunctioneh]h]h!]jjRjjvVjjvVjjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1+filled_polygon() (in module pygame.gfxdraw)pygame.gfxdraw.filled_polygonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hfilled_polygonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjVsbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjVh&hh'h]h)MubjS)}(hjVh]hfilled_polygon}hjVsbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjVh&hh'h]h)Mubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjVh&hh'h]h)Mubeh}(h]jVah](jrjseh]h]h!]jwj1jxhjyjVjzj1jVj|filled_polygon()uh%j:h'h]h)MhjVh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a filled polygon`h]h)}(hjVh]hdraw a filled polygon}hjVsbah}(h]h]hah]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%h)hKhjVh&hh'h]h)Mubhz)}(h4:sg:`filled_polygon(surface, points, color) -> None`h]h)}(hjVh]h.filled_polygon(surface, points, color) -> None}hjVsbah}(h]h]jah]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%h)hKhjVh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjVh&hh'h]h)Mubh)}(hYDraws a filled polygon on the given surface. For an unfilled polygon use :meth:`polygon`.h](hIDraws a filled polygon on the given surface. For an unfilled polygon use }hjVsbh6)}(h:meth:`polygon`h]h;)}(hjWh]h polygon()}hjWsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjVubah}(h]h]h]h]h!]refdochS refdomainj Wreftypemeth refexplicitrefwarnhYj1hZNh[polygonuh%h5h'h]h)MhjVubh.}hjVsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjVh&hubh)}(hX?The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``.h](h The adjacent coordinates in the }hj(Wsbh;)}(h ``points``h]hpoints}hj0Wsbah}(h]h]h]h]h!]uh%h:hj(Wubhi argument, as well as the first and last points, will be connected by line segments. e.g. For the points }hj(Wsbh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hjBWsbah}(h]h]h]h]h!]uh%h:hj(Wubh# a line segment will be drawn from }hj(Wsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjTWsbah}(h]h]h]h]h!]uh%h:hj(Wubh to }hj(Wsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjfWsbah}(h]h]h]h]h!]uh%h:hj(Wubh, from }hj(Wsbh;)}(h ``(x2, y2)``h]h(x2, y2)}hjxWsbah}(h]h]h]h]h!]uh%h:hj(Wubh to }hj(Wsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hjWsbah}(h]h]h]h]h!]uh%h:hj(Wubh , and from }hj(Wsbh;)}(h ``(x3, y3)``h]h(x3, y3)}hjWsbah}(h]h]h]h]h!]uh%h:hj(Wubh to }hj(Wsbh;)}(h ``(x1, y1)``h]h(x1, y1)}hjWsbah}(h]h]h]h]h!]uh%h:hj(Wubh.}hj(Wsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjVh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjWsbah}(h]h]h]h]h!]uh%jhjWh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjWsbah}(h]h]h]h]h!]uh%jhjWubh (}hjWsbh6)}(hhh]j )}(hSurfaceh]hSurface}hjWsbah}(h]h]h]h]h!]uh%j hjWubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjWj$j%j1j&Nuh%h5hjWubh)}hjWsbh -- }hjWsbhsurface to draw on}(hjWh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%jhjWubj)}(hhh]h)}(hpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats (float values will be truncated)`h](j)}(hpointsh]hpoints}hj4Xsbah}(h]h]h]h]h!]uh%jhj0Xubh (}hj0Xsbh6)}(hhh]j )}(htupleh]htuple}hjIXsbah}(h]h]h]h]h!]uh%j hjFXubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejx reftargetjKXj$j%j1j&Nuh%h5hj0Xubj )}(hj6h]h(}hjaXsbah}(h]h]h]h]h!]uh%j hj0Xubh6)}(hhh]j )}(h coordinateh]h coordinate}hjqXsbah}(h]h]h]h]h!]uh%j hjnXubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejx reftargetjsXj$j%j1j&Nuh%h5hj0Xubj )}(h) or h]h) or }hjXsbah}(h]h]h]h]h!]uh%j hj0Xubh6)}(hhh]j )}(hlisth]hlist}hjXsbah}(h]h]h]h]h!]uh%j hjXubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejx reftargetjXj$j%j1j&Nuh%h5hj0Xubj )}(hj6h]h(}hjXsbah}(h]h]h]h]h!]uh%j hj0Xubh6)}(hhh]j )}(h coordinateh]h coordinate}hjXsbah}(h]h]h]h]h!]uh%j hjXubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejx reftargetjXj$j%j1j&Nuh%h5hj0Xubj )}(hjh]h)}hjXsbah}(h]h]h]h]h!]uh%j hj0Xubh)}hj0Xsbh -- }hj0Xsbh7a sequence of 3 or more (x, y) coordinates, where each }(hj0Xh&hh'Nh)Nubj7)}(h *coordinate*h]h coordinate}hjXsbah}(h]h]h]h]h!]uh%j7hj0Xh&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hj0Xh&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hjYh]hpygame.math.Vector2}hj Ysbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjYubah}(h]h]h]h]h!]refdochS refdomainjYreftypeclass refexplicitrefwarnhYj1hZNh[pygame.math.Vector2uh%h5h'h]h)M!hj0Xh&hubh3 of 2 ints/floats (float values will be truncated)`}(hj0Xh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj-Xubah}(h]h]h]h]h!]uh%jhjWubj)}(hhh]h)}(hycolor (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])h](j)}(hcolorh]hcolor}hjValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hj)[sbah}(h]h]h]h]h!]uh%jhj&[ubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejP reftargetj+[j$j%j1j&Nuh%h5hj"[ubh -- }hj"[sbhif }(hj"[h&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hjI[sbah}(h]h]h]h]h!]uh%h:hj"[h&hh'Nh)Nubh (must have at least 3 points)}(hj"[h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%jhj[ubj)}(hhh]h)}(hQIndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)h](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hjq[sbah}(h]h]h]h]h!]uh%jhjn[ubah}(h]h]h]h]h!] refdomainjX refexplicitreftypejP reftargetjs[j$j%j1j&Nuh%h5hjj[ubh -- }hjj[sbhif }(hjj[h&hh'Nh)Nubh;)}(h``len(coordinate) < 2``h]hlen(coordinate) < 2}hj[sbah}(h]h]h]h]h!]uh%h:hjj[h&hh'Nh)Nubh- (each coordinate must have at least 2 items)}(hjj[h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjg[ubah}(h]h]h]h]h!]uh%jhj[ubeh}(h]h]h]h]h!]uh%jhj[ubah}(h]h]h]h]h!]uh%jhj[ubeh}(h]h]h]h]h!]uh%jhjWubeh}(h]h]h]h]h!]uh%jhjVh&hh'Nh)Nubh )}(h### pygame.gfxdraw.filled_polygon ##h]h### pygame.gfxdraw.filled_polygon ##}hj[sbah}(h]h]h]h]h!]h#h$uh%h hjVh&hh'h]h)M1ubeh}(h]h]h]h]h!]uh%j~hjVh&hh'Nh)Nubeh}(h]h](jXfunctioneh]h]h!]jjXjj[jj[jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1-textured_polygon() (in module pygame.gfxdraw)pygame.gfxdraw.textured_polygonhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(htextured_polygonh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hj[sbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hj[h&hh'h]h)M3ubjS)}(hj[h]htextured_polygon}hj\sbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhj[h&hh'h]h)M3ubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchj[h&hh'h]h)M3ubeh}(h]j[ah](jrjseh]h]h!]jwj1jxhjyj[jzj1j[j|textured_polygon()uh%j:h'h]h)M3hj[h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a textured polygon`h]h)}(hj,\h]hdraw a textured polygon}hj.\sbah}(h]h]hah]h]h!]uh%hhj*\ubah}(h]h]h]h]h!]uh%h)hKhj'\h&hh'h]h)M5ubhz)}(h@:sg:`textured_polygon(surface, points, texture, tx, ty) -> None`h]h)}(hjC\h]h:textured_polygon(surface, points, texture, tx, ty) -> None}hjE\sbah}(h]h]jah]h]h!]uh%hhjA\ubah}(h]h]h]h]h!]uh%h)hKhj'\h&hh'h]h)M6ubeh}(h]h]h]h]h!]uh%huhj$\h&hh'h]h)M5ubh)}(hDraws a textured polygon on the given surface. For better performance, the surface and the texture should have the same format.h]hDraws a textured polygon on the given surface. For better performance, the surface and the texture should have the same format.}hj^\sbah}(h]h]h]h]h!]uh%hh'h]h)M8hj$\h&hubh)}(hA per-pixel alpha texture blit to a per-pixel alpha surface will differ from a :func:`pygame.Surface.blit` blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination.h](hOA per-pixel alpha texture blit to a per-pixel alpha surface will differ from a }hjl\sbh6)}(h:func:`pygame.Surface.blit`h]h;)}(hjv\h]hpygame.Surface.blit()}hjx\sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjt\ubah}(h]h]h]h]h!]refdochS refdomainj\reftypefunc refexplicitrefwarnhYj1hZNh[pygame.Surface.blituh%h5h'h]h)M;hjl\ubhZ blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination.}hjl\sbeh}(h]h]h]h]h!]uh%hh'h]h)M;hj$\h&hubh)}(hX?The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``.h](h The adjacent coordinates in the }hj\sbh;)}(h ``points``h]hpoints}hj\sbah}(h]h]h]h]h!]uh%h:hj\ubhi argument, as well as the first and last points, will be connected by line segments. e.g. For the points }hj\sbh;)}(h"``[(x1, y1), (x2, y2), (x3, y3)]``h]h[(x1, y1), (x2, y2), (x3, y3)]}hj\sbah}(h]h]h]h]h!]uh%h:hj\ubh# a line segment will be drawn from }hj\sbh;)}(h ``(x1, y1)``h]h(x1, y1)}hj\sbah}(h]h]h]h]h!]uh%h:hj\ubh to }hj\sbh;)}(h ``(x2, y2)``h]h(x2, y2)}hj\sbah}(h]h]h]h]h!]uh%h:hj\ubh, from }hj\sbh;)}(h ``(x2, y2)``h]h(x2, y2)}hj\sbah}(h]h]h]h]h!]uh%h:hj\ubh to }hj\sbh;)}(h ``(x3, y3)``h]h(x3, y3)}hj]sbah}(h]h]h]h]h!]uh%h:hj\ubh , and from }hj\sbh;)}(h ``(x3, y3)``h]h(x3, y3)}hj]sbah}(h]h]h]h]h!]uh%h:hj\ubh to }hj\sbh;)}(h ``(x1, y1)``h]h(x1, y1)}hj$]sbah}(h]h]h]h]h!]uh%h:hj\ubh.}hj\sbeh}(h]h]h]h]h!]uh%hh'h]h)M?hj$\h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjB]sbah}(h]h]h]h]h!]uh%jhj?]h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hj]]sbah}(h]h]h]h]h!]uh%jhjY]ubh (}hjY]sbh6)}(hhh]j )}(hSurfaceh]hSurface}hjr]sbah}(h]h]h]h]h!]uh%j hjo]ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjt]j$j%j1j&Nuh%h5hjY]ubh)}hjY]sbh -- }hjY]sbhsurface to draw on}(hjY]h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjV]ubah}(h]h]h]h]h!]uh%jhjS]ubj)}(hhh]h)}(hpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats (float values will be truncated)h](j)}(hpointsh]hpoints}hj]sbah}(h]h]h]h]h!]uh%jhj]ubh (}hj]sbh6)}(hhh]j )}(htupleh]htuple}hj]sbah}(h]h]h]h]h!]uh%j hj]ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj]j$j%j1j&Nuh%h5hj]ubj )}(hj6h]h(}hj]sbah}(h]h]h]h]h!]uh%j hj]ubh6)}(hhh]j )}(h coordinateh]h coordinate}hj]sbah}(h]h]h]h]h!]uh%j hj]ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj]j$j%j1j&Nuh%h5hj]ubj )}(h) or h]h) or }hj]sbah}(h]h]h]h]h!]uh%j hj]ubh6)}(hhh]j )}(hlisth]hlist}hj^sbah}(h]h]h]h]h!]uh%j hj ^ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj^j$j%j1j&Nuh%h5hj]ubj )}(hj6h]h(}hj(^sbah}(h]h]h]h]h!]uh%j hj]ubh6)}(hhh]j )}(h coordinateh]h coordinate}hj8^sbah}(h]h]h]h]h!]uh%j hj5^ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj:^j$j%j1j&Nuh%h5hj]ubj )}(hjh]h)}hjP^sbah}(h]h]h]h]h!]uh%j hj]ubh)}hj]sbh -- }hj]sbh7a sequence of 3 or more (x, y) coordinates, where each }(hj]h&hh'Nh)Nubj7)}(h *coordinate*h]h coordinate}hji^sbah}(h]h]h]h]h!]uh%j7hj]h&hh'Nh)Nubh& in the sequence must be a tuple/list/}(hj]h&hh'Nh)Nubh6)}(h:class:`pygame.math.Vector2`h]h;)}(hj}^h]hpygame.math.Vector2}hj^sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj{^ubah}(h]h]h]h]h!]refdochS refdomainj^reftypeclass refexplicitrefwarnhYj1hZNh[pygame.math.Vector2uh%h5h'h]h)MFhj]h&hubh2 of 2 ints/floats (float values will be truncated)}(hj]h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%jhjS]ubj)}(hhh]h)}(h3texture (Surface) -- texture to draw on the polygonh](j)}(htextureh]htexture}hj^sbah}(h]h]h]h]h!]uh%jhj^ubh (}hj^sbh6)}(hhh]j )}(hSurfaceh]hSurface}hj^sbah}(h]h]h]h]h!]uh%j hj^ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj^j$j%j1j&Nuh%h5hj^ubh)}hj^sbh -- }hj^sbhtexture to draw on the polygon}(hj^h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%jhjS]ubj)}(hhh]h)}(h#tx (int) -- x offset of the textureh](j)}(htxh]htx}hj^sbah}(h]h]h]h]h!]uh%jhj^ubh (}hj^sbh6)}(hhh]j )}(hinth]hint}hj_sbah}(h]h]h]h]h!]uh%j hj_ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetj_j$j%j1j&Nuh%h5hj^ubh)}hj^sbh -- }hj^sbhx offset of the texture}(hj^h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%jhjS]ubj)}(hhh]h)}(h#ty (int) -- y offset of the textureh](j)}(htyh]hty}hjJ_sbah}(h]h]h]h]h!]uh%jhjF_ubh (}hjF_sbh6)}(hhh]j )}(hinth]hint}hj__sbah}(h]h]h]h]h!]uh%j hj\_ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetja_j$j%j1j&Nuh%h5hjF_ubh)}hjF_sbh -- }hjF_sbhy offset of the texture}(hjF_h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjC_ubah}(h]h]h]h]h!]uh%jhjS]ubeh}(h]h]h]h]h!]uh%jhjP]ubah}(h]h]h]h]h!]uh%jhj?]ubeh}(h]h]h]h]h!]uh%jhj<]ubj)}(hhh](j)}(hReturnsh]hReturns}hj_sbah}(h]h]h]h]h!]uh%jhj_h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj_sbah}(h]h]h]h]h!]uh%h:hj_h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%jhj_ubeh}(h]h]h]h]h!]uh%jhj<]ubj)}(hhh](j)}(h Return typeh]h Return type}hj_sbah}(h]h]h]h]h!]uh%jhj_h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj_sbah}(h]h]h]h]h!] refdomainj] refexplicitreftypejx reftargetNoneTypej$j%j1j&Nuh%h5hj_ubah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%jhj_ubeh}(h]h]h]h]h!]uh%jhj<]ubj)}(hhh](j)}(hRaisesh]hRaises}hj`sbah}(h]h]h]h]h!]uh%jhj`h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h>ValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hj6`sbah}(h]h]h]h]h!]uh%jhj3`ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejP reftargetj8`j$j%j1j&Nuh%h5hj/`ubh -- }hj/`sbhif }(hj/`h&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hjV`sbah}(h]h]h]h]h!]uh%h:hj/`h&hh'Nh)Nubh (must have at least 3 points)}(hj/`h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj,`ubah}(h]h]h]h]h!]uh%jhj)`ubj)}(hhh]h)}(hQIndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)h](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hj~`sbah}(h]h]h]h]h!]uh%jhj{`ubah}(h]h]h]h]h!] refdomainj] refexplicitreftypejP reftargetj`j$j%j1j&Nuh%h5hjw`ubh -- }hjw`sbhif }(hjw`h&hh'Nh)Nubh;)}(h``len(coordinate) < 2``h]hlen(coordinate) < 2}hj`sbah}(h]h]h]h]h!]uh%h:hjw`h&hh'Nh)Nubh- (each coordinate must have at least 2 items)}(hjw`h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjt`ubah}(h]h]h]h]h!]uh%jhj)`ubeh}(h]h]h]h]h!]uh%jhj&`ubah}(h]h]h]h]h!]uh%jhj`ubeh}(h]h]h]h]h!]uh%jhj<]ubeh}(h]h]h]h]h!]uh%jhj$\h&hh'Nh)Nubh )}(h%## pygame.gfxdraw.textured_polygon ##h]h%## pygame.gfxdraw.textured_polygon ##}hj`sbah}(h]h]h]h]h!]h#h$uh%h hj$\h&hh'h]h)MVubeh}(h]h]h]h]h!]uh%j~hj[h&hh'Nh)Nubeh}(h]h](j]functioneh]h]h!]jj]jj`jj`jjjjjjjuh%j5h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j1#bezier() (in module pygame.gfxdraw)pygame.gfxdraw.bezierhNtauh%hdhh,h&hh'Nh)Nubj6)}(hhh](j;)}(hbezierh](jA)}(hpygame.gfxdraw.h]hpygame.gfxdraw.}hjasbah}(h]h](jMjNeh]h]h!]h#h$uh%j@hjah&hh'h]h)MXubjS)}(hjah]hbezier}hjasbah}(h]h](j^j_eh]h]h!]h#h$uh%jRhjah&hh'h]h)MXubjd)}(h()h]h}(h]h]h]h]h!]h#h$uh%jchjah&hh'h]h)MXubeh}(h]j`ah](jrjseh]h]h!]jwj1jxhjyjajzj1jaj|bezier()uh%j:h'h]h)MXhj`h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`draw a Bezier curve`h]h)}(hj9ah]hdraw a Bezier curve}hj;asbah}(h]h]hah]h]h!]uh%hhj7aubah}(h]h]h]h]h!]uh%h)hKhj4ah&hh'h]h)MZubhz)}(h3:sg:`bezier(surface, points, steps, color) -> None`h]h)}(hjPah]h-bezier(surface, points, steps, color) -> None}hjRasbah}(h]h]jah]h]h!]uh%hhjNaubah}(h]h]h]h]h!]uh%h)hKhj4ah&hh'h]h)M[ubeh}(h]h]h]h]h!]uh%huhj1ah&hh'h]h)MZubh)}(h+Draws a Bézier curve on the given surface.h]h+Draws a Bézier curve on the given surface.}hjkasbah}(h]h]h]h]h!]uh%hh'h]h)M]hj1ah&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjasbah}(h]h]h]h]h!]uh%jhj|ah'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h'surface (Surface) -- surface to draw onh](j)}(hsurfaceh]hsurface}hjasbah}(h]h]h]h]h!]uh%jhjaubh (}hjasbh6)}(hhh]j )}(hSurfaceh]hSurface}hjasbah}(h]h]h]h]h!]uh%j hjaubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejx reftargetjaj$j%j1j&Nuh%h5hjaubh)}hjasbh -- }hjasbhsurface to draw on}(hjah&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%jhjaubj)}(hhh]h)}(hpoints (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates used to form a curve, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats (float values will be truncated)h](j)}(hpointsh]hpoints}hjasbah}(h]h]h]h]h!]uh%jhjaubh (}hjasbh6)}(hhh]j )}(htupleh]htuple}hjasbah}(h]h]h]h]h!]uh%j hjaubah}(h]h]h]h]h!] refdomainja refexplicitreftypejx reftargetjaj$j%j1j&Nuh%h5hjaubj )}(hj6h]h(}hjbsbah}(h]h]h]h]h!]uh%j hjaubh6)}(hhh]j )}(h coordinateh]h coordinate}hj$bsbah}(h]h]h]h]h!]uh%j hj!bubah}(h]h]h]h]h!] refdomainja refexplicitreftypejx reftargetj&bj$j%j1j&Nuh%h5hjaubj )}(h) or h]h) or }hjValueError -- if len(points) < 3 (must have at least 3 points)h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hjlesbah}(h]h]h]h]h!]uh%jhjieubah}(h]h]h]h]h!] refdomainja refexplicitreftypejP reftargetjnej$j%j1j&Nuh%h5hjeeubh -- }hjeesbhif }(hjeeh&hh'Nh)Nubh;)}(h``len(points) < 3``h]hlen(points) < 3}hjesbah}(h]h]h]h]h!]uh%h:hjeeh&hh'Nh)Nubh (must have at least 3 points)}(hjeeh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjbeubah}(h]h]h]h]h!]uh%jhjeubj)}(hhh]h)}(hQIndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)h](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hjesbah}(h]h]h]h]h!]uh%jhjeubah}(h]h]h]h]h!] refdomainja refexplicitreftypejP reftargetjej$j%j1j&Nuh%h5hjeubh -- }hjesbhif }(hjeh&hh'Nh)Nubh;)}(h``len(coordinate) < 2``h]hlen(coordinate) < 2}hjesbah}(h]h]h]h]h!]uh%h:hjeh&hh'Nh)Nubh- (each coordinate must have at least 2 items)}(hjeh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%jhjeubeh}(h]h]h]h]h!]uh%jhjeubah}(h]h]h]h]h!]uh%jhjeubeh}(h]h]h]h]h!]uh%jhjyaubeh}(h]h]h]h]h!]uh%jhj1ah&hh'Nh)Nubh )}(h## pygame.gfxdraw.bezier ##h]h## pygame.gfxdraw.bezier ##}hj fsbah}(h]h]h]h]h!]h#h$uh%h hj1ah&hh'h]h)Mrubeh}(h]h]h]h]h!]uh%j~hj`h&hh'Nh)Nubeh}(h]h](jafunctioneh]h]h!]jjajj!fjj!fjjjjjjjuh%j5h&hhh,h'Nh)Nubh )}(h## pygame.gfxdraw ##h]h## pygame.gfxdraw ##}hj%fsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mtubeh}(h](hspygame-gfxdraweh]h]pygame.gfxdrawah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjeferror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j8fj5fs nametypes}j8fsh}(j5fh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jfh'h]h)Khh,h&hubj3j<jjj j jjjjjjjjjjjq"jv"j[&j`&j*j*j.j.j2j2j8j 8j<j<jAjAjFjFjKjKjBQjGQjVjVj[j[j`jau footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/gfxdraw.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612175.2641408 pygame-2.6.1/docs/generated/doctrees/ref/image.doctree0000644000175100001770000022426614676242417022343 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.image`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.image}hh Surface`h]h)}(hjh]hload(filename) -> Surface}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KGubhz)}(h+:sg:`load(fileobj, namehint="") -> Surface`h]h)}(hjh]h%load(fileobj, namehint="") -> Surface}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KHubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KFubh)}(hoLoad an image from a file source. You can pass either a filename, a Python file-like object, or a pathlib.Path.h]hoLoad an image from a file source. You can pass either a filename, a Python file-like object, or a pathlib.Path.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KJhjh&hubh)}(hXLPygame will automatically determine the image type (e.g., ``GIF`` or bitmap) and create a new Surface object from the data. In some cases it will need to know the file extension (e.g., ``GIF`` images should end in ".gif"). If you pass a raw file-like object, you may also want to pass the original filename as the namehint argument.h](h:Pygame will automatically determine the image type (e.g., }hjsbh;)}(h``GIF``h]hGIF}hjsbah}(h]h]h]h]h!]uh%h:hjubhx or bitmap) and create a new Surface object from the data. In some cases it will need to know the file extension (e.g., }hjsbh;)}(h``GIF``h]hGIF}hjsbah}(h]h]h]h]h!]uh%h:hjubh images should end in ".gif"). If you pass a raw file-like object, you may also want to pass the original filename as the namehint argument.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KMhjh&hubh)}(hThe returned Surface will contain the same color format, colorkey and alpha transparency as the file it came from. You will often want to call :func:`pygame.Surface.convert()` with no arguments, to create a copy that will draw more quickly on the screen.h](hThe returned Surface will contain the same color format, colorkey and alpha transparency as the file it came from. You will often want to call }hj*sbh6)}(h :func:`pygame.Surface.convert()`h]h;)}(hj4h]hpygame.Surface.convert()}hj6sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypefunc refexplicitrefwarnhYhhZNh[pygame.Surface.convertuh%h5h'h]h)KShj*ubhO with no arguments, to create a copy that will draw more quickly on the screen.}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)KShjh&hubh)}(hFor alpha transparency, like in .png images, use the :func:`pygame.Surface.convert_alpha()` method after loading so that the image has per pixel transparency.h](h5For alpha transparency, like in .png images, use the }hj\sbh6)}(h&:func:`pygame.Surface.convert_alpha()`h]h;)}(hjfh]hpygame.Surface.convert_alpha()}hjhsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjdubah}(h]h]h]h]h!]refdochS refdomainjrreftypefunc refexplicitrefwarnhYhhZNh[pygame.Surface.convert_alphauh%h5h'h]h)KXhj\ubhC method after loading so that the image has per pixel transparency.}hj\sbeh}(h]h]h]h]h!]uh%hh'h]h)KXhjh&hubh)}(hPygame may not always be built to support all image formats. At minimum it will support uncompressed ``BMP``. If :func:`pygame.image.get_extended()` returns ``True``, you should be able to load most images (including PNG, JPG and GIF).h](hePygame may not always be built to support all image formats. At minimum it will support uncompressed }hjsbh;)}(h``BMP``h]hBMP}hjsbah}(h]h]h]h]h!]uh%h:hjubh. If }hjsbh6)}(h#:func:`pygame.image.get_extended()`h]h;)}(hjh]hpygame.image.get_extended()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.get_extendeduh%h5h'h]h)K\hjubh returns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubhF, you should be able to load most images (including PNG, JPG and GIF).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K\hjh&hubh)}(h8You should use :func:`os.path.join()` for compatibility.h](hYou should use }hjsbh6)}(h:func:`os.path.join()`h]h;)}(hjh]hos.path.join()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ os.path.joinuh%h5h'h]h)Kahjubh for compatibility.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kahjh&hubh literal_block)}(h>eg. asurf = pygame.image.load(os.path.join('data', 'bla.png'))h]h>eg. asurf = pygame.image.load(os.path.join('data', 'bla.png'))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Kehjh&hubh )}(h## pygame.image.load ##h]h## pygame.image.load ##}hj&sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%jhjOh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj=objtypej>desctypej>no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jIsave() (in module pygame.image)pygame.image.savehNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(hsaveh](jY)}(h pygame.image.h]h pygame.image.}hjasbah}(h]h](jejfeh]h]h!]h#h$uh%jXhj]h&hh'h]h)Kiubjk)}(hj_h]hsave}hjosbah}(h]h](jvjweh]h]h!]h#h$uh%jjhj]h&hh'h]h)Kiubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hj]h&hh'h]h)Kiubeh}(h]jXah](jjeh]h]h!]jhjhjj_jhj_jsave()uh%jRh'h]h)KihjZh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`save an image to file (or file-like object)`h]h)}(hjh]h+save an image to file (or file-like object)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kkubhz)}(h%:sg:`save(Surface, filename) -> None`h]h)}(hjh]hsave(Surface, filename) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Klubhz)}(h1:sg:`save(Surface, fileobj, namehint="") -> None`h]h)}(hjh]h+save(Surface, fileobj, namehint="") -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kkubh)}(hXThis will save your Surface as either a ``BMP``, ``TGA``, ``PNG``, or ``JPEG`` image. If the filename extension is unrecognized it will default to ``TGA``. Both ``TGA``, and ``BMP`` file formats create uncompressed files. You can pass a filename, a pathlib.Path or a Python file-like object. For file-like object, the image is saved to ``TGA`` format unless a namehint with a recognizable extension is passed in.h](h(This will save your Surface as either a }hjsbh;)}(h``BMP``h]hBMP}hjsbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h``TGA``h]hTGA}hjsbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h``PNG``h]hPNG}hj sbah}(h]h]h]h]h!]uh%h:hjubh, or }hjsbh;)}(h``JPEG``h]hJPEG}hjsbah}(h]h]h]h]h!]uh%h:hjubhE image. If the filename extension is unrecognized it will default to }hjsbh;)}(h``TGA``h]hTGA}hj/sbah}(h]h]h]h]h!]uh%h:hjubh. Both }hjsbh;)}(h``TGA``h]hTGA}hjAsbah}(h]h]h]h]h!]uh%h:hjubh, and }hjsbh;)}(h``BMP``h]hBMP}hjSsbah}(h]h]h]h]h!]uh%h:hjubh file formats create uncompressed files. You can pass a filename, a pathlib.Path or a Python file-like object. For file-like object, the image is saved to }hjsbh;)}(h``TGA``h]hTGA}hjesbah}(h]h]h]h]h!]uh%h:hjubhE format unless a namehint with a recognizable extension is passed in.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kohjh&hubh note)}(hWhen saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible.h]h)}(hWhen saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible.h]hWhen saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kvhjubah}(h]h]h]h]h!]uh%j}h'h]h)Kvhjh&hubj)}(h1Changed in pygame 1.8: Saving PNG and JPEG files.h]h)}(h1Changed in pygame 1.8: Saving PNG and JPEG files.h](h)}(hChanged in pygame 1.8: h]hChanged in pygame 1.8: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)KzubhSaving PNG and JPEG files.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kzubah}(h]h]h]h]h!]jversionchangedj1.8uh%jh&hh'h]h)Kzhjubj)}(hChanged in pygame 2.0.0: The namehint parameter was added to make it possible to save other formats than TGA to a file-like object. Saving to a file-like object with JPEG is possible.h]h)}(hChanged in pygame 2.0.0: The namehint parameter was added to make it possible to save other formats than TGA to a file-like object. Saving to a file-like object with JPEG is possible.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhThe }(hjh&hh'Nh)Nubh;)}(h ``namehint``h]hnamehint}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhD parameter was added to make it possible to save other formats than }(hjh&hh'Nh)Nubh;)}(h``TGA``h]hTGA}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhK to a file-like object. Saving to a file-like object with JPEG is possible.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.0.0uh%jh&hh'h]h)K{hjubh )}(h## pygame.image.save ##h]h## pygame.image.save ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjZh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBj%jCj&jDj&jEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI0get_sdl_image_version() (in module pygame.image)"pygame.image.get_sdl_image_versionhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(hget_sdl_image_versionh](jY)}(h pygame.image.h]h pygame.image.}hj?sbah}(h]h](jejfeh]h]h!]h#h$uh%jXhj;h&hh'h]h)Kubjk)}(hj=h]hget_sdl_image_version}hjMsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhj;h&hh'h]h)Kubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hj;h&hh'h]h)Kubeh}(h]j6ah](jjeh]h]h!]jhjhjj=jhj=jget_sdl_image_version()uh%jRh'h]h)Khj8h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`get version number of the SDL_Image library being used`h]h)}(hjth]h6get version number of the SDL_Image library being used}hjvsbah}(h]h]hah]h]h!]uh%hhjrubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)Kubhz)}(h0:sg:`get_sdl_image_version(linked=True) -> None`h]h)}(hjh]h*get_sdl_image_version(linked=True) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)Kubhz)}(hA:sg:`get_sdl_image_version(linked=True) -> (major, minor, patch)`h]h)}(hjh]h;get_sdl_image_version(linked=True) -> (major, minor, patch)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjlh&hh'h]h)Kubh)}(hIf pygame is built with extended image formats, then this function will return the SDL_Image library's version number as a tuple of 3 integers ``(major, minor, patch)``. If not, then it will return ``None``.h](hIf pygame is built with extended image formats, then this function will return the SDL_Image library's version number as a tuple of 3 integers }hjsbh;)}(h``(major, minor, patch)``h]h(major, minor, patch)}hjsbah}(h]h]h]h]h!]uh%h:hjubh. If not, then it will return }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjlh&hubh)}(h``linked=True`` is the default behavior and the function will return the version of the library that Pygame is linked against, while ``linked=False`` will return the version of the library that Pygame is compiled against.h](h;)}(h``linked=True``h]h linked=True}hjsbah}(h]h]h]h]h!]uh%h:hjubhv is the default behavior and the function will return the version of the library that Pygame is linked against, while }hjsbh;)}(h``linked=False``h]h linked=False}hj sbah}(h]h]h]h]h!]uh%h:hjubhH will return the version of the library that Pygame is compiled against.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjlh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj% sbah}(h]h](jjeh]h]h!]uh%hhj! ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)Khjlubj)}(hChanged in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked versionh]h)}(hChanged in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked versionh](h)}(hChanged in pygame 2.2.0: h]hChanged in pygame 2.2.0: }hjJ sbah}(h]h](jjeh]h]h!]uh%hhjF h&hh'h]h)Kubh;)}(h ``linked``h]hlinked}hjX sbah}(h]h]h]h]h!]uh%h:hjF h&hh'Nh)Nubhp keyword argument added and default behavior changed from returning compiled version to returning linked version}(hjF h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjB h&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.2.0uh%jh&hh'h]h)Khjlubh )}(h(## pygame.image.get_sdl_image_version ##h]h(## pygame.image.get_sdl_image_version ##}hjy sbah}(h]h]h]h]h!]h#h$uh%h hjlh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj8h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBj jCj jDj jEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI'get_extended() (in module pygame.image)pygame.image.get_extendedhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h get_extendedh](jY)}(h pygame.image.h]h pygame.image.}hj sbah}(h]h](jejfeh]h]h!]h#h$uh%jXhj h&hh'h]h)Kubjk)}(hj h]h get_extended}hj sbah}(h]h](jvjweh]h]h!]h#h$uh%jjhj h&hh'h]h)Kubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jget_extended()uh%jRh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`test if extended image formats can be loaded`h]h)}(hj h]h,test if extended image formats can be loaded}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_extended() -> bool`h]h)}(hj h]hget_extended() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hIf pygame is built with extended image formats this function will return True. It is still not possible to determine which formats will be available, but generally you will be able to load them all.h]hIf pygame is built with extended image formats this function will return True. It is still not possible to determine which formats will be available, but generally you will be able to load them all.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.image.get_extended ##h]h## pygame.image.get_extended ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBj6 jCj7 jDj7 jEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI#tostring() (in module pygame.image)pygame.image.tostringhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(htostringh](jY)}(h pygame.image.h]h pygame.image.}hjP sbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjL h&hh'h]h)Kubjk)}(hjN h]htostring}hj^ sbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjL h&hh'h]h)Kubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjL h&hh'h]h)Kubeh}(h]jG ah](jjeh]h]h!]jhjhjjN jhjN j tostring()uh%jRh'h]h)KhjI h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`transfer image to byte buffer`h]h)}(hj h]htransfer image to byte buffer}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h7:sg:`tostring(Surface, format, flipped=False) -> bytes`h]h)}(hj h]h1tostring(Surface, format, flipped=False) -> bytes}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj} h&hh'h]h)Kubh)}(hX>Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped.h](h;Creates a string of bytes that can be transferred with the }hj sbh;)}(h``fromstring``h]h fromstring}hj sbah}(h]h]h]h]h!]uh%h:hj ubh or }hj sbh;)}(h ``frombytes``h]h frombytes}hj sbah}(h]h]h]h]h!]uh%h:hj ubh methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass }hj sbh;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj ubhF for the flipped argument, the byte buffer will be vertically flipped.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj} h&hubh)}(hThe format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.h]hThe format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj} h&hubj)}(hX* ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first h]j)}(hhh](j )}(h!``P``, 8-bit palettized Surfaces h]h)}(h ``P``, 8-bit palettized Surfacesh](h;)}(h``P``h]hP}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, 8-bit palettized Surfaces}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h``RGB``, 24-bit image h]h)}(h``RGB``, 24-bit imageh](h;)}(h``RGB``h]hRGB}hj> sbah}(h]h]h]h]h!]uh%h:hj: ubh, 24-bit image}hj: sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj6 ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h)``RGBX``, 32-bit image with unused space h]h)}(h(``RGBX``, 32-bit image with unused spaceh](h;)}(h``RGBX``h]hRGBX}hjd sbah}(h]h]h]h]h!]uh%h:hj` ubh , 32-bit image with unused space}hj` sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj\ ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h-``RGBA``, 32-bit image with an alpha channel h]h)}(h,``RGBA``, 32-bit image with an alpha channelh](h;)}(h``RGBA``h]hRGBA}hj sbah}(h]h]h]h]h!]uh%h:hj ubh$, 32-bit image with an alpha channel}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h0``ARGB``, 32-bit image with alpha channel first h]h)}(h/``ARGB``, 32-bit image with alpha channel firsth](h;)}(h``ARGB``h]hARGB}hj sbah}(h]h]h]h]h!]uh%h:hj ubh', 32-bit image with alpha channel first}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hI``BGRA``, 32-bit image with alpha channel, red and blue channels swapped h]h)}(hH``BGRA``, 32-bit image with alpha channel, red and blue channels swappedh](h;)}(h``BGRA``h]hBGRA}hj sbah}(h]h]h]h]h!]uh%h:hj ubh@, 32-bit image with alpha channel, red and blue channels swapped}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hC``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel h]h)}(hB``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channelh](h;)}(h``RGBA_PREMULT``h]h RGBA_PREMULT}hj sbah}(h]h]h]h]h!]uh%h:hj ubh2, 32-bit image with colors scaled by alpha channel}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hX``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first h]h)}(hW``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel firsth](h;)}(h``ARGB_PREMULT``h]h ARGB_PREMULT}hj" sbah}(h]h]h]h]h!]uh%h:hj ubhG, 32-bit image with colors scaled by alpha channel, alpha channel first}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubeh}(h]h]h]h]h!]jjuh%jh'h]h)Khj ubah}(h]h]h]h]h!]uh%hh'h]h)Khj} h&hubj~)}(h9it is preferred to use :func:`tobytes` as of pygame 2.1.3h]h)}(hjN h](hit is preferred to use }hjP sbh6)}(h:func:`tobytes`h]h;)}(hjY h]h tobytes()}hj[ sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjW ubah}(h]h]h]h]h!]refdochS refdomainje reftypefunc refexplicitrefwarnhYhhZNh[tobytesuh%h5h'h]h)KhjP ubh as of pygame 2.1.3}hjP sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjL ubah}(h]h]h]h]h!]uh%j}h'h]h)Khj} h&hubj)}(h New in pygame 2.1.3: BGRA formath]h)}(h New in pygame 2.1.3: BGRA formath](h)}(hNew in pygame 2.1.3: h]hNew in pygame 2.1.3: }hj sbah}(h]h](jjeh]h]h!]uh%hhj h&hh'h]h)Kubh BGRA format}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Khj} ubh )}(h## pygame.image.tostring ##h]h## pygame.image.tostring ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj} h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjI h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBj jCj jDj jEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI"tobytes() (in module pygame.image)pygame.image.tobyteshNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(htobytesh](jY)}(h pygame.image.h]h pygame.image.}hj sbah}(h]h](jejfeh]h]h!]h#h$uh%jXhj h&hh'h]h)Kubjk)}(hj h]htobytes}hj sbah}(h]h](jvjweh]h]h!]h#h$uh%jjhj h&hh'h]h)Kubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj j tobytes()uh%jRh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`transfer image to byte buffer`h]h)}(hj h]htransfer image to byte buffer}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h6:sg:`tobytes(Surface, format, flipped=False) -> bytes`h]h)}(hj- h]h0tobytes(Surface, format, flipped=False) -> bytes}hj/ sbah}(h]h]jah]h]h!]uh%hhj+ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hX>Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped.h](h;Creates a string of bytes that can be transferred with the }hjH sbh;)}(h``fromstring``h]h fromstring}hjP sbah}(h]h]h]h]h!]uh%h:hjH ubh or }hjH sbh;)}(h ``frombytes``h]h frombytes}hjb sbah}(h]h]h]h]h!]uh%h:hjH ubh methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass }hjH sbh;)}(h``True``h]hTrue}hjt sbah}(h]h]h]h]h!]uh%h:hjH ubhF for the flipped argument, the byte buffer will be vertically flipped.}hjH sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hThe format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.h]hThe format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hX* ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first h]j)}(hhh](j )}(h!``P``, 8-bit palettized Surfaces h]h)}(h ``P``, 8-bit palettized Surfacesh](h;)}(h``P``h]hP}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, 8-bit palettized Surfaces}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h``RGB``, 24-bit image h]h)}(h``RGB``, 24-bit imageh](h;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, 24-bit image}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h)``RGBX``, 32-bit image with unused space h]h)}(h(``RGBX``, 32-bit image with unused spaceh](h;)}(h``RGBX``h]hRGBX}hj sbah}(h]h]h]h]h!]uh%h:hj ubh , 32-bit image with unused space}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h-``RGBA``, 32-bit image with an alpha channel h]h)}(h,``RGBA``, 32-bit image with an alpha channelh](h;)}(h``RGBA``h]hRGBA}hjsbah}(h]h]h]h]h!]uh%h:hjubh$, 32-bit image with an alpha channel}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h0``ARGB``, 32-bit image with alpha channel first h]h)}(h/``ARGB``, 32-bit image with alpha channel firsth](h;)}(h``ARGB``h]hARGB}hjAsbah}(h]h]h]h]h!]uh%h:hj=ubh', 32-bit image with alpha channel first}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj9ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hI``BGRA``, 32-bit image with alpha channel, red and blue channels swapped h]h)}(hH``BGRA``, 32-bit image with alpha channel, red and blue channels swappedh](h;)}(h``BGRA``h]hBGRA}hjgsbah}(h]h]h]h]h!]uh%h:hjcubh@, 32-bit image with alpha channel, red and blue channels swapped}hjcsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj_ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hC``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel h]h)}(hB``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channelh](h;)}(h``RGBA_PREMULT``h]h RGBA_PREMULT}hjsbah}(h]h]h]h]h!]uh%h:hjubh2, 32-bit image with colors scaled by alpha channel}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(hX``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first h]h)}(hW``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel firsth](h;)}(h``ARGB_PREMULT``h]h ARGB_PREMULT}hjsbah}(h]h]h]h]h!]uh%h:hjubhG, 32-bit image with colors scaled by alpha channel, alpha channel first}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubeh}(h]h]h]h]h!]jjuh%jh'h]h)Khj ubah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj~)}(hthis function is an alias for :func:`tostring`. The use of this function is recommended over :func:`tostring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.h]h)}(hthis function is an alias for :func:`tostring`. The use of this function is recommended over :func:`tostring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.h](hthis function is an alias for }hjsbh6)}(h:func:`tostring`h]h;)}(hjh]h tostring()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[tostringuh%h5h'h]h)Khjubh/. The use of this function is recommended over }hjsbh6)}(h:func:`tostring`h]h;)}(hjh]h tostring()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[tostringuh%h5h'h]h)Khjubh as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j}h'h]h)Khj h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjEsbah}(h]h](jjeh]h]h!]uh%hhjAubah}(h]h]h]h]h!] translatableuh%hhj=h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Khj ubh )}(h## pygame.image.tobytes ##h]h## pygame.image.tobytes ##}hjbsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjyjCjzjDjzjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI%fromstring() (in module pygame.image)pygame.image.fromstringhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h fromstringh](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)Kubjk)}(hjh]h fromstring}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)Kubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj fromstring()uh%jRh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h+:sl:`create new Surface from a byte buffer`h]h)}(hjh]h%create new Surface from a byte buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h?:sg:`fromstring(bytes, size, format, flipped=False) -> Surface`h]h)}(hjh]h9fromstring(bytes, size, format, flipped=False) -> Surface}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hThis function takes arguments similar to :func:`pygame.image.tostring()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.h](h)This function takes arguments similar to }hjsbh6)}(h:func:`pygame.image.tostring()`h]h;)}(hjh]hpygame.image.tostring()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.tostringuh%h5h'h]h)Khjubh. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hyThe bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised.h](h[The bytes and format passed must compute to the exact size of image specified. Otherwise a }hj,sbh;)}(h``ValueError``h]h ValueError}hj4sbah}(h]h]h]h]h!]uh%h:hj,ubh will be raised.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hmSee the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame.h](hSee the }hjLsbh6)}(h!:func:`pygame.image.frombuffer()`h]h;)}(hjVh]hpygame.image.frombuffer()}hjXsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjTubah}(h]h]h]h]h!]refdochS refdomainjbreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.frombufferuh%h5h'h]h)KhjLubhD method for a potentially faster way to transfer images into pygame.}hjLsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj~)}(h;it is preferred to use :func:`frombytes` as of pygame 2.1.3h]h)}(hjh](hit is preferred to use }hjsbh6)}(h:func:`frombytes`h]h;)}(hjh]h frombytes()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ frombytesuh%h5h'h]h)Mhjubh as of pygame 2.1.3}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj~ubah}(h]h]h]h]h!]uh%j}h'h]h)Mhjh&hubh )}(h## pygame.image.fromstring ##h]h## pygame.image.fromstring ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjjCjjDjjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI$frombytes() (in module pygame.image)pygame.image.frombyteshNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h frombytesh](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)Mubjk)}(hjh]h frombytes}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)Mubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj frombytes()uh%jRh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h+:sl:`create new Surface from a byte buffer`h]h)}(hjh]h%create new Surface from a byte buffer}hj!sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h>:sg:`frombytes(bytes, size, format, flipped=False) -> Surface`h]h)}(hj6h]h8frombytes(bytes, size, format, flipped=False) -> Surface}hj8sbah}(h]h]jah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hThis function takes arguments similar to :func:`pygame.image.tobytes()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.h](h)This function takes arguments similar to }hjQsbh6)}(h:func:`pygame.image.tobytes()`h]h;)}(hj[h]hpygame.image.tobytes()}hj]sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjYubah}(h]h]h]h]h!]refdochS refdomainjgreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.tobytesuh%h5h'h]h)M hjQubh. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.}hjQsbeh}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh)}(hyThe bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised.h](h[The bytes and format passed must compute to the exact size of image specified. Otherwise a }hjsbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be raised.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hmSee the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame.h](hSee the }hjsbh6)}(h!:func:`pygame.image.frombuffer()`h]h;)}(hjh]hpygame.image.frombuffer()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.frombufferuh%h5h'h]h)MhjubhD method for a potentially faster way to transfer images into pygame.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj~)}(hthis function is an alias for :func:`fromstring`. The use of this function is recommended over :func:`fromstring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.h]h)}(hthis function is an alias for :func:`fromstring`. The use of this function is recommended over :func:`fromstring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.h](hthis function is an alias for }hjsbh6)}(h:func:`fromstring`h]h;)}(hjh]h fromstring()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ fromstringuh%h5h'h]h)Mhjubh/. The use of this function is recommended over }hjsbh6)}(h:func:`fromstring`h]h;)}(hjh]h fromstring()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ fromstringuh%h5h'h]h)Mhjubh as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%j}h'h]h)Mhjh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj=sbah}(h]h](jjeh]h]h!]uh%hhj9ubah}(h]h]h]h]h!] translatableuh%hhj5h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)Mhjubh )}(h## pygame.image.frombytes ##h]h## pygame.image.frombytes ##}hjZsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjqjCjrjDjrjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI%frombuffer() (in module pygame.image)pygame.image.frombufferhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h frombufferh](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)Mubjk)}(hjh]h frombuffer}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)Mubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj frombuffer()uh%jRh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`create a new Surface that shares data inside a bytes buffer`h]h)}(hjh]h;create a new Surface that shares data inside a bytes buffer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h1:sg:`frombuffer(buffer, size, format) -> Surface`h]h)}(hjh]h+frombuffer(buffer, size, format) -> Surface}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXDCreate a new Surface that shares pixel data directly from a buffer. This buffer can be bytes, a bytearray, a memoryview, a :class:`pygame.BufferProxy`, or any object that supports the buffer protocol. This method takes similar arguments to :func:`pygame.image.fromstring()`, but is unable to vertically flip the source data.h](h{Create a new Surface that shares pixel data directly from a buffer. This buffer can be bytes, a bytearray, a memoryview, a }hjsbh6)}(h:class:`pygame.BufferProxy`h]h;)}(hjh]hpygame.BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZNh[pygame.BufferProxyuh%h5h'h]h)M"hjubhZ, or any object that supports the buffer protocol. This method takes similar arguments to }hjsbh6)}(h!:func:`pygame.image.fromstring()`h]h;)}(hj h]hpygame.image.fromstring()}hj"sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj,reftypefunc refexplicitrefwarnhYhhZNh[pygame.image.fromstringuh%h5h'h]h)M"hjubh3, but is unable to vertically flip the source data.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M"hjh&hubh)}(hqThis will run much faster than :func:`pygame.image.fromstring`, since no pixel data must be allocated and copied.h](hThis will run much faster than }hjHsbh6)}(h:func:`pygame.image.fromstring`h]h;)}(hjRh]hpygame.image.fromstring()}hjTsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjPubah}(h]h]h]h]h!]refdochS refdomainj^reftypefunc refexplicitrefwarnhYhhZNh[pygame.image.fromstringuh%h5h'h]h)M(hjHubh3, since no pixel data must be allocated and copied.}hjHsbeh}(h]h]h]h]h!]uh%hh'h]h)M(hjh&hubh)}(h,It accepts the following 'format' arguments:h]h,It accepts the following 'format' arguments:}hjzsbah}(h]h]h]h]h!]uh%hh'h]h)M+hjh&hubj)}(hXP* ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``BGR``, 24-bit image, red and blue channels swapped. * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped h]j)}(hhh](j )}(h!``P``, 8-bit palettized Surfaces h]h)}(h ``P``, 8-bit palettized Surfacesh](h;)}(h``P``h]hP}hjsbah}(h]h]h]h]h!]uh%h:hjubh, 8-bit palettized Surfaces}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M-hjubah}(h]h]h]h]h!]uh%j h'h]h)M-hjubj )}(h``RGB``, 24-bit image h]h)}(h``RGB``, 24-bit imageh](h;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh, 24-bit image}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M/hjubah}(h]h]h]h]h!]uh%j h'h]h)M/hjubj )}(h6``BGR``, 24-bit image, red and blue channels swapped. h]h)}(h5``BGR``, 24-bit image, red and blue channels swapped.h](h;)}(h``BGR``h]hBGR}hjsbah}(h]h]h]h]h!]uh%h:hjubh., 24-bit image, red and blue channels swapped.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M1hjubah}(h]h]h]h]h!]uh%j h'h]h)M1hjubj )}(h)``RGBX``, 32-bit image with unused space h]h)}(h(``RGBX``, 32-bit image with unused spaceh](h;)}(h``RGBX``h]hRGBX}hj sbah}(h]h]h]h]h!]uh%h:hjubh , 32-bit image with unused space}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M3hjubah}(h]h]h]h]h!]uh%j h'h]h)M3hjubj )}(h-``RGBA``, 32-bit image with an alpha channel h]h)}(h,``RGBA``, 32-bit image with an alpha channelh](h;)}(h``RGBA``h]hRGBA}hj/sbah}(h]h]h]h]h!]uh%h:hj+ubh$, 32-bit image with an alpha channel}hj+sbeh}(h]h]h]h]h!]uh%hh'h]h)M5hj'ubah}(h]h]h]h]h!]uh%j h'h]h)M5hjubj )}(h0``ARGB``, 32-bit image with alpha channel first h]h)}(h/``ARGB``, 32-bit image with alpha channel firsth](h;)}(h``ARGB``h]hARGB}hjUsbah}(h]h]h]h]h!]uh%h:hjQubh', 32-bit image with alpha channel first}hjQsbeh}(h]h]h]h]h!]uh%hh'h]h)M7hjMubah}(h]h]h]h]h!]uh%j h'h]h)M7hjubj )}(hI``BGRA``, 32-bit image with alpha channel, red and blue channels swapped h]h)}(hH``BGRA``, 32-bit image with alpha channel, red and blue channels swappedh](h;)}(h``BGRA``h]hBGRA}hj{sbah}(h]h]h]h]h!]uh%h:hjwubh@, 32-bit image with alpha channel, red and blue channels swapped}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)M9hjsubah}(h]h]h]h]h!]uh%j h'h]h)M9hjubeh}(h]h]h]h]h!]jjuh%jh'h]h)M-hjubah}(h]h]h]h]h!]uh%hh'h]h)M-hjh&hubj)}(h New in pygame 2.1.3: BGRA formath]h)}(h New in pygame 2.1.3: BGRA formath](h)}(hNew in pygame 2.1.3: h]hNew in pygame 2.1.3: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)M;ubh BGRA format}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M;ubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jh&hh'h]h)M;hjubh )}(h## pygame.image.frombuffer ##h]h## pygame.image.frombuffer ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M<ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjjCjjDjjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI%load_basic() (in module pygame.image)pygame.image.load_basichNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h load_basich](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)M>ubjk)}(hjh]h load_basic}hj sbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)M>ubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)M>ubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj load_basic()uh%jRh'h]h)M>hjh&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`load new BMP image from a file (or file-like object)`h]h)}(hj4h]h4load new BMP image from a file (or file-like object)}hj6sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)M@ubhz)}(h!:sg:`load_basic(file) -> Surface`h]h)}(hjKh]hload_basic(file) -> Surface}hjMsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)MAubeh}(h]h]h]h]h!]uh%huhj,h&hh'h]h)M@ubh)}(hqLoad an image from a file source. You can pass either a filename or a Python file-like object, or a pathlib.Path.h]hqLoad an image from a file source. You can pass either a filename or a Python file-like object, or a pathlib.Path.}hjfsbah}(h]h]h]h]h!]uh%hh'h]h)MChj,h&hubh)}(hThis function only supports loading "basic" image format, ie ``BMP`` format. This function is always available, no matter how pygame was built.h](h=This function only supports loading "basic" image format, ie }hjtsbh;)}(h``BMP``h]hBMP}hj|sbah}(h]h]h]h]h!]uh%h:hjtubhK format. This function is always available, no matter how pygame was built.}hjtsbeh}(h]h]h]h]h!]uh%hh'h]h)MFhj,h&hubh )}(h## pygame.image.load_basic ##h]h## pygame.image.load_basic ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)MJubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjjCjjDjjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI(load_extended() (in module pygame.image)pygame.image.load_extended(hNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h load_extendedh](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)MLubjk)}(hjh]h load_extended}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)MLubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)MLubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjload_extended()uh%jRh'h]h)MLhjh&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`load an image from a file (or file-like object)`h]h)}(hjh]h/load an image from a file (or file-like object)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MNubhz)}(h(:sg:`load_extended(filename) -> Surface`h]h)}(hjh]h"load_extended(filename) -> Surface}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MOubhz)}(h4:sg:`load_extended(fileobj, namehint="") -> Surface`h]h)}(hj(h]h.load_extended(fileobj, namehint="") -> Surface}hj*sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MPubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MNubh)}(hThis function is similar to :func:`pygame.image.load()`, except that this function can only be used if pygame was built with extended image format support.h](hThis function is similar to }hjCsbh6)}(h:func:`pygame.image.load()`h]h;)}(hjMh]hpygame.image.load()}hjOsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjKubah}(h]h]h]h]h!]refdochS refdomainjYreftypefunc refexplicitrefwarnhYhhZNh[pygame.image.loaduh%h5h'h]h)MRhjCubhd, except that this function can only be used if pygame was built with extended image format support.}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)MRhjh&hubj)}(hChanged in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.h]h)}(hChanged in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.h](h)}(hChanged in pygame 2.0.1: h]hChanged in pygame 2.0.1: }hj}sbah}(h]h](jjeh]h]h!]uh%hhjyh&hh'h]h)M]ubh1This function is always available, but raises an }(hjyh&hh'Nh)Nubh;)}(h``NotImplementedError``h]hNotImplementedError}hjsbah}(h]h]h]h]h!]uh%h:hjyh&hh'Nh)Nubh if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.}(hjyh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjuh&hh'h]h)M]ubah}(h]h]h]h]h!]jversionchangedj2.0.1uh%jh&hh'h]h)MVhjubh )}(h ## pygame.image.load_extended ##h]h ## pygame.image.load_extended ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M^ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjjCjjDjjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jI(save_extended() (in module pygame.image)pygame.image.save_extendedhNtauh%hdhh,h&hh'Nh)NubjN)}(hhh](jS)}(h save_extendedh](jY)}(h pygame.image.h]h pygame.image.}hjsbah}(h]h](jejfeh]h]h!]h#h$uh%jXhjh&hh'h]h)M`ubjk)}(hjh]h save_extended}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jjhjh&hh'h]h)M`ubj|)}(h()h]h}(h]h]h]h]h!]h#h$uh%j{hjh&hh'h]h)M`ubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjsave_extended()uh%jRh'h]h)M`hjh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`save a png/jpg image to file (or file-like object)`h]h)}(hjh]h2save a png/jpg image to file (or file-like object)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mbubhz)}(h.:sg:`save_extended(Surface, filename) -> None`h]h)}(hj-h]h(save_extended(Surface, filename) -> None}hj/sbah}(h]h]jah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mcubhz)}(h::sg:`save_extended(Surface, fileobj, namehint="") -> None`h]h)}(hjDh]h4save_extended(Surface, fileobj, namehint="") -> None}hjFsbah}(h]h]jah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mdubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mbubh)}(hBThis will save your Surface as either a ``PNG`` or ``JPEG`` image.h](h(This will save your Surface as either a }hj_sbh;)}(h``PNG``h]hPNG}hjgsbah}(h]h]h]h]h!]uh%h:hj_ubh or }hj_sbh;)}(h``JPEG``h]hJPEG}hjysbah}(h]h]h]h]h!]uh%h:hj_ubh image.}hj_sbeh}(h]h]h]h]h!]uh%hh'h]h)Mfhjh&hubh)}(hIn case the image is being saved to a file-like object, this function uses the namehint argument to determine the format of the file being saved. Saves to ``JPEG`` in case the namehint was not specified while saving to a file-like object.h](hIn case the image is being saved to a file-like object, this function uses the namehint argument to determine the format of the file being saved. Saves to }hjsbh;)}(h``JPEG``h]hJPEG}hjsbah}(h]h]h]h]h!]uh%h:hjubhK in case the namehint was not specified while saving to a file-like object.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhhjh&hubj)}(hChanged in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.h]h)}(hChanged in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.h](h)}(hChanged in pygame 2.0.1: h]hChanged in pygame 2.0.1: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Mtubh1This function is always available, but raises an }(hjh&hh'Nh)Nubh;)}(h``NotImplementedError``h]hNotImplementedError}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mtubah}(h]h]h]h]h!]jversionchangedj2.0.1uh%jh&hh'h]h)Mmhjubh )}(h ## pygame.image.save_extended ##h]h ## pygame.image.save_extended ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Muubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jBjjCjjDjjEjFjGjHjIjJjKuh%jMh&hhh,h'Nh)Nubh )}(h## pygame.image ##h]h## pygame.image ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mwubeh}(h](hs pygame-imageeh]h] pygame.imageah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjHerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjKjTjXj]j6j;j j jG jL j j jjjjjjjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/image.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612175.3431408 pygame-2.6.1/docs/generated/doctrees/ref/joystick.doctree0000644000175100001770000034201714676242417023113 0ustar00runnerdocker sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.joystick`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.joystick}hh` for more details.h](htTo be able to get joystick events and update the joystick objects while the window is not in focus, you may set the }hjQsbh;)}(h(``SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS``h]h$SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS}hjYsbah}(h]h]h]h]h!]uh%h:hjQubh environment variable. See }hjQsbh6)}(h4:ref:`environment variables `h]h)}(hjmh]henvironment variables}hjosbah}(h]h](hFstdstd-refeh]h]h!]uh%hhjkubah}(h]h]h]h]h!]refdochS refdomainjyreftyperef refexplicitrefwarnh[environment-variablesuh%h5h'h]h)K+hjQubh for more details.}hjQsbeh}(h]h]h]h]h!]uh%hh'h]h)K+hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single"init() (in module pygame.joystick)pygame.joystick.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(hpygame.joystick.h]hpygame.joystick.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h]h)K0ubh desc_name)}(hjh]hinit}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h]h)K0ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K0ubeh}(h]jah](sig sig-objecteh]h]h!]modulej7classhfullnamej _toc_partsj7j _toc_nameinit()uh%jh'h]h)K0hjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h%:sl:`Initialize the joystick module.`h]h)}(hjh]hInitialize the joystick module.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K2ubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K3ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K2ubh)}(h;This function is called automatically by ``pygame.init()``.h](h)This function is called automatically by }hj*sbh;)}(h``pygame.init()``h]h pygame.init()}hj2sbah}(h]h]h]h]h!]uh%h:hj*ubh.}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)K5hjh&hubh)}(hhIt initializes the joystick module. The module must be initialized before any other functions will work.h]hhIt initializes the joystick module. The module must be initialized before any other functions will work.}hjJsbah}(h]h]h]h]h!]uh%hh'h]h)K7hjh&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjXsbah}(h]h]h]h]h!]uh%hh'h]h)K:hjh&hubh )}(h## pygame.joystick.init ##h]h## pygame.joystick.init ##}hjfsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubj)}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K>ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K>ubeh}(h]jah](jjeh]h]h!]jj7jhjjjj7jjquit()uh%jh'h]h)K>hjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Uninitialize the joystick module.`h]h)}(hjh]h!Uninitialize the joystick module.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K@ubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KAubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K@ubh)}(hhUninitialize the joystick module. After you call this any existing joystick objects will no longer work.h]hhUninitialize the joystick module. After you call this any existing joystick objects will no longer work.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KChjh&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KFhjh&hubh )}(h## pygame.joystick.quit ##h]h## pygame.joystick.quit ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KHubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj;jj<jj<jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_init() (in module pygame.joystick)pygame.joystick.get_inithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j)}(hpygame.joystick.h]hpygame.joystick.}hjUsbah}(h]h](jjeh]h]h!]h#h$uh%jhjQh&hh'h]h)KJubj)}(hjSh]hget_init}hjcsbah}(h]h](jjeh]h]h!]h#h$uh%jhjQh&hh'h]h)KJubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjQh&hh'h]h)KJubeh}(h]jLah](jjeh]h]h!]jj7jhjjSjj7jSj get_init()uh%jh'h]h)KJhjNh&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`Returns True if the joystick module is initialized.`h]h)}(hjh]h3Returns True if the joystick module is initialized.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KLubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KMubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KLubh)}(h@Test if the ``pygame.joystick.init()`` function has been called.h](h Test if the }hjsbh;)}(h``pygame.joystick.init()``h]hpygame.joystick.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh function has been called.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubh )}(h## pygame.joystick.get_init ##h]h## pygame.joystick.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KQubeh}(h]h]h]h]h!]uh%jhjNh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'get_count() (in module pygame.joystick)pygame.joystick.get_counthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_counth](j)}(hpygame.joystick.h]hpygame.joystick.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)KSubj)}(hj h]h get_count}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)KSubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)KSubeh}(h]jah](jjeh]h]h!]jj7jhjj jj7j j get_count()uh%jh'h]h)KShjh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`Returns the number of joysticks.`h]h)}(hjBh]h Returns the number of joysticks.}hjDsbah}(h]h]hah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)KUubhz)}(h:sg:`get_count() -> count`h]h)}(hjYh]hget_count() -> count}hj[sbah}(h]h]jah]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)KVubeh}(h]h]h]h]h!]uh%huhj:h&hh'h]h)KUubh)}(huReturn the number of joystick devices on the system. The count will be ``0`` if there are no joysticks on the system.h](hGReturn the number of joystick devices on the system. The count will be }hjtsbh;)}(h``0``h]h0}hj|sbah}(h]h]h]h]h!]uh%h:hjtubh) if there are no joysticks on the system.}hjtsbeh}(h]h]h]h]h!]uh%hh'h]h)KXhj:h&hubh)}(hpWhen you create Joystick objects using ``Joystick(id)``, you pass an integer that must be lower than this count.h](h'When you create Joystick objects using }hjsbh;)}(h``Joystick(id)``h]h Joystick(id)}hjsbah}(h]h]h]h]h!]uh%h:hjubh9, you pass an integer that must be lower than this count.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K[hj:h&hubh )}(h## pygame.joystick.get_count ##h]h## pygame.joystick.get_count ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#Joystick (class in pygame.joystick)pygame.joystick.JoystickhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hJoystickh](j)}(hpygame.joystick.h]hpygame.joystick.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K`ubj)}(hjh]hJoystick}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K`ubeh}(h]jah](jjeh]h]h!]jj7jhjjjj7jjjuh%jh'h]h)K`hjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`Create a new Joystick object.`h]h)}(hjh]hCreate a new Joystick object.}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kbubhz)}(h:sg:`Joystick(id) -> Joystick`h]h)}(hj&h]hJoystick(id) -> Joystick}hj(sbah}(h]h]jah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kbubh)}(hCreate a new joystick to access a physical device. The id argument must be a value from ``0`` to ``pygame.joystick.get_count() - 1``.h](hXCreate a new joystick to access a physical device. The id argument must be a value from }hjAsbh;)}(h``0``h]h0}hjIsbah}(h]h]h]h]h!]uh%h:hjAubh to }hjAsbh;)}(h#``pygame.joystick.get_count() - 1``h]hpygame.joystick.get_count() - 1}hj[sbah}(h]h]h]h]h!]uh%h:hjAubh.}hjAsbeh}(h]h]h]h]h!]uh%hh'h]h)Kehjh&hubh)}(hJoysticks are initialised on creation and are shut down when deallocated. Once the device is initialized the pygame event queue will start receiving events about its input.h]hJoysticks are initialised on creation and are shut down when deallocated. Once the device is initialized the pygame event queue will start receiving events about its input.}hjssbah}(h]h]h]h]h!]uh%hh'h]h)Khhjh&hubhversionmodified)}(hQChanged in pygame 2.0.0: Joystick objects are now opened immediately on creation.h]h)}(hQChanged in pygame 2.0.0: Joystick objects are now opened immediately on creation.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)Kmubh8Joystick objects are now opened immediately on creation.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kmubah}(h]h]h]h]h!]typeversionchangedversion2.0.0uh%jh&hh'h]h)Klhjubhe)}(hhh]h}(h]h]h]h]h!]entries](j(init() (pygame.joystick.Joystick method)pygame.joystick.Joystick.inithNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hinith](j)}(hjh]hinit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Knubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Knubeh}(h]jah](jjeh]h]h!]jj7jjj Joystick.initjj7JoystickinitjJoystick.init()uh%jh'h]h)Knhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`initialize the Joystick`h]h)}(hjh]hinitialize the Joystick}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kpubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kpubh)}(htInitialize the joystick, if it has been closed. It is safe to call this even if the joystick is already initialized.h]htInitialize the joystick, if it has been closed. It is safe to call this even if the joystick is already initialized.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kshjh&hubj)}(hDeprecated since pygame 2.0.0: In future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1.h]h)}(hDeprecated since pygame 2.0.0: In future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1.h](h)}(hDeprecated since pygame 2.0.0: h]hDeprecated since pygame 2.0.0: }hj6sbah}(h]h](j deprecatedeh]h]h!]uh%hhj2h&hh'h]h)NubhjIn future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1.}(hj2h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj.h&hh'h]h)Nubah}(h]h]h]h]h!]j deprecatedj2.0.0uh%jh&hh'h]h)Kvhjubh )}(h## Joystick.init ##h]h## Joystick.init ##}hjXsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K{ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjojjpjjpjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(quit() (pygame.joystick.Joystick method)pygame.joystick.Joystick.quithNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hquith](j)}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K}ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K}ubeh}(h]jah](jjeh]h]h!]jj7jjj Joystick.quitjj7JoystickquitjJoystick.quit()uh%jh'h]h)K}hjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`uninitialize the Joystick`h]h)}(hjh]huninitialize the Joystick}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hiClose a Joystick object. After this the pygame event queue will no longer receive events from the device.h]hiClose a Joystick object. After this the pygame event queue will no longer receive events from the device.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h'It is safe to call this more than once.h]h'It is safe to call this more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Joystick.quit ##h]h## Joystick.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_init() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_inithNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j)}(hj0h]hget_init}hj2sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Kubeh}(h]j)ah](jjeh]h]h!]jj7jjjJoystick.get_initjj7Joystickget_initjJoystick.get_init()uh%jh'h]h)Khj+h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`check if the Joystick is initialized`h]h)}(hj\h]h$check if the Joystick is initialized}hj^sbah}(h]h]hah]h]h!]uh%hhjZubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)Kubhz)}(h:sg:`get_init() -> bool`h]h)}(hjsh]hget_init() -> bool}hjusbah}(h]h]jah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjTh&hh'h]h)Kubh)}(h int`h]h)}(hjh]hget_id() -> int}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hReturns the original device index for this device. This is the same value that was passed to the ``Joystick()`` constructor. This method can safely be called while the Joystick is not initialized.h](haReturns the original device index for this device. This is the same value that was passed to the }hj)sbh;)}(h``Joystick()``h]h Joystick()}hj1sbah}(h]h]h]h]h!]uh%h:hj)ubhU constructor. This method can safely be called while the Joystick is not initialized.}hj)sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hDeprecated since pygame 2.0.0: The original device index is not useful in pygame 2. Use get_instance_id() instead. Will be removed in Pygame 2.1.h]h)}(hDeprecated since pygame 2.0.0: The original device index is not useful in pygame 2. Use get_instance_id() instead. Will be removed in Pygame 2.1.h](h)}(hDeprecated since pygame 2.0.0: h]hDeprecated since pygame 2.0.0: }hjQsbah}(h]h](jjAeh]h]h!]uh%hhjMh&hh'h]h)Nubh9The original device index is not useful in pygame 2. Use }(hjMh&hh'Nh)Nubh6)}(h:meth:`.get_instance_id`h]h;)}(hjeh]hget_instance_id()}hjgsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjcubah}(h]h]h]h]h!]refdochS refdomainjqreftypemeth refexplicitrefwarnhYj7hZj refspecifich[get_instance_iduh%h5h'h]h)KhjMh&hubh( instead. Will be removed in Pygame 2.1.}(hjMh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjIh&hh'h]h)Nubah}(h]h]h]h]h!]j deprecatedj2.0.0uh%jh&hh'h]h)Khjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j3get_instance_id() (pygame.joystick.Joystick method)(pygame.joystick.Joystick.get_instance_idhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_instance_id() -> inth](j)}(hget_instance_idh]hget_instance_id}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubh desc_returns)}(hinth]h6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainpyreftypej reftargetint refspecific py:modulej7py:classjuh%h5hjubah}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_instance_idjj7Joystickget_instance_idjJoystick.get_instance_id()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`get the joystick instance id`h]h)}(hj h]hget the joystick instance id}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_instance_id() -> int`h]h)}(hj h]hget_instance_id() -> int}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hfGet the joystick instance ID. This matches the ``instance_id`` field that is given in joystick events.h](h/Get the joystick instance ID. This matches the }hj8 sbh;)}(h``instance_id``h]h instance_id}hj@ sbah}(h]h]h]h]h!]uh%h:hj8 ubh( field that is given in joystick events.}hj8 sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]hNew in pygame 2.0.0dev11.}hj` sbah}(h]h](jaddedeh]h]h!]uh%hhj\ ubah}(h]h]h]h]h!] translatableuh%hhjX h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj 2.0.0dev11uh%jh&hh'h]h)Khjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_guid() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_guidhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_guid() -> strh](j)}(hget_guidh]hget_guid}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hstrh]h6)}(hhh]hstr}hj sbah}(h]h]h]h]h!] refdomainjreftypej reftargetstr refspecific py:modulej7py:classjuh%h5hj ubah}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jj7jjjJoystick.get_guidjj7Joystickget_guidjJoystick.get_guid()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`get the joystick GUID`h]h)}(hj h]hget the joystick GUID}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_guid() -> str`h]h)}(hj h]hget_guid() -> str}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hOGet the GUID string. This identifies the exact hardware of the joystick device.h]hOGet the GUID string. This identifies the exact hardware of the joystick device.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]hNew in pygame 2.0.0dev11.}hj2 sbah}(h]h](jjk eh]h]h!]uh%hhj. ubah}(h]h]h]h]h!] translatableuh%hhj* h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj 2.0.0dev11uh%jh&hh'h]h)Khj ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjX jjY jjY jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j3get_power_level() (pygame.joystick.Joystick method)(pygame.joystick.Joystick.get_power_levelhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_power_level() -> strh](j)}(hget_power_levelh]hget_power_level}hjr sbah}(h]h](jjeh]h]h!]h#h$uh%jhjn h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjn h&hh'h]h)Kubj)}(hstrh]h6)}(hhh]hstr}hj sbah}(h]h]h]h]h!] refdomainjreftypej reftargetstr refspecific py:modulej7py:classjuh%h5hj ubah}(h]h]h]h]h!]h#h$uh%jhjn h&hh'h]h)Kubeh}(h]ji ah](jjeh]h]h!]jj7jjjJoystick.get_power_leveljj7Joystickget_power_leveljJoystick.get_power_level()uh%jh'h]h)Khjk h&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`get the approximate power status of the device`h]h)}(hj h]h.get the approximate power status of the device}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_power_level() -> str`h]h)}(hj h]hget_power_level() -> str}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h3Get a string giving the power status of the device.h]h3Get a string giving the power status of the device.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hUOne of: ``empty``, ``low``, ``medium``, ``full``, ``wired``, ``max``, or ``unknown``.h](hOne of: }hj sbh;)}(h ``empty``h]hempty}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``low``h]hlow}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h ``medium``h]hmedium}hj' sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``full``h]hfull}hj9 sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h ``wired``h]hwired}hjK sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``max``h]hmax}hj] sbah}(h]h]h]h]h!]uh%h:hj ubh, or }hj sbh;)}(h ``unknown``h]hunknown}hjo sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]h)}(hNew in pygame 2.0.0dev11.h]hNew in pygame 2.0.0dev11.}hj sbah}(h]h](jjk eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj 2.0.0dev11uh%jh&hh'h]h)Khj ubh )}(h## Joystick.get_id ##h]h## Joystick.get_id ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjk h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_name() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_namehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_nameh](j)}(hj h]hget_name}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jj7jjjJoystick.get_namejj7Joystickget_namejJoystick.get_name()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`get the Joystick system name`h]h)}(hj h]hget the Joystick system name}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_name() -> string`h]h)}(hj h]hget_name() -> string}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturns the system name for this joystick device. It is unknown what name the system will give to the Joystick, but it should be a unique name that identifies the device. This method can safely be called while the Joystick is not initialized.h]hReturns the system name for this joystick device. It is unknown what name the system will give to the Joystick, but it should be a unique name that identifies the device. This method can safely be called while the Joystick is not initialized.}hj9 sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Joystick.get_name ##h]h## Joystick.get_name ##}hjG sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj^ jj_ jj_ jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/get_numaxes() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.get_numaxeshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_numaxesh](j)}(hjv h]h get_numaxes}hjx sbah}(h]h](jjeh]h]h!]h#h$uh%jhjt h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjt h&hh'h]h)Kubeh}(h]jo ah](jjeh]h]h!]jj7jjjJoystick.get_numaxesjj7Joystick get_numaxesjJoystick.get_numaxes()uh%jh'h]h)Khjq h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`get the number of axes on a Joystick`h]h)}(hj h]h$get the number of axes on a Joystick}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_numaxes() -> int`h]h)}(hj h]hget_numaxes() -> int}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturns the number of input axes are on a Joystick. There will usually be two for the position. Controls like rudders and throttles are treated as additional axes.h]hReturns the number of input axes are on a Joystick. There will usually be two for the position. Controls like rudders and throttles are treated as additional axes.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXZThe ``pygame.JOYAXISMOTION`` events will be in the range from ``-1.0`` to ``1.0``. A value of ``0.0`` means the axis is centered. Gamepad devices will usually be ``-1``, ``0``, or ``1`` with no values in between. Older analog joystick axes will not always use the full ``-1`` to ``1`` range, and the centered value will be some area around ``0``.h](hThe }hj sbh;)}(h``pygame.JOYAXISMOTION``h]hpygame.JOYAXISMOTION}hj sbah}(h]h]h]h]h!]uh%h:hj ubh" events will be in the range from }hj sbh;)}(h``-1.0``h]h-1.0}hj sbah}(h]h]h]h]h!]uh%h:hj ubh to }hj sbh;)}(h``1.0``h]h1.0}hj sbah}(h]h]h]h]h!]uh%h:hj ubh . A value of }hj sbh;)}(h``0.0``h]h0.0}hj sbah}(h]h]h]h]h!]uh%h:hj ubh= means the axis is centered. Gamepad devices will usually be }hj sbh;)}(h``-1``h]h-1}hj2 sbah}(h]h]h]h]h!]uh%h:hj ubh, }hj sbh;)}(h``0``h]h0}hjD sbah}(h]h]h]h]h!]uh%h:hj ubh, or }hj sbh;)}(h``1``h]h1}hjV sbah}(h]h]h]h]h!]uh%h:hj ubhT with no values in between. Older analog joystick axes will not always use the full }hj sbh;)}(h``-1``h]h-1}hjh sbah}(h]h]h]h]h!]uh%h:hj ubh to }hj sbh;)}(h``1``h]h1}hjz sbah}(h]h]h]h]h!]uh%h:hj ubh8 range, and the centered value will be some area around }hj sbh;)}(h``0``h]h0}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hsAnalog joysticks usually have a bit of noise in their axis, which will generate a lot of rapid small motion events.h]hsAnalog joysticks usually have a bit of noise in their axis, which will generate a lot of rapid small motion events.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Joystick.get_numaxes ##h]h## Joystick.get_numaxes ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjq h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_axis() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_axishNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_axish](j)}(hj h]hget_axis}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jj7jjjJoystick.get_axisjj7Joystickget_axisjJoystick.get_axis()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`get the current position of an axis`h]h)}(hj h]h#get the current position of an axis}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h$:sg:`get_axis(axis_number) -> float`h]h)}(hj$h]hget_axis(axis_number) -> float}hj&sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX0Returns the current position of a joystick axis. The value will range from ``-1`` to ``1`` with a value of ``0`` being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at ``0`` or using the full range of position values.h](hKReturns the current position of a joystick axis. The value will range from }hj?sbh;)}(h``-1``h]h-1}hjGsbah}(h]h]h]h]h!]uh%h:hj?ubh to }hj?sbh;)}(h``1``h]h1}hjYsbah}(h]h]h]h]h!]uh%h:hj?ubh with a value of }hj?sbh;)}(h``0``h]h0}hjksbah}(h]h]h]h]h!]uh%h:hj?ubh being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at }hj?sbh;)}(h``0``h]h0}hj}sbah}(h]h]h]h]h!]uh%h:hj?ubh, or using the full range of position values.}hj?sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hGThe axis number must be an integer from ``0`` to ``get_numaxes() - 1``.h](h(The axis number must be an integer from }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh to }hjsbh;)}(h``get_numaxes() - 1``h]hget_numaxes() - 1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(haWhen using gamepads both the control sticks and the analog triggers are usually reported as axes.h]haWhen using gamepads both the control sticks and the analog triggers are usually reported as axes.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Joystick.get_axis ##h]h## Joystick.get_axis ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j0get_numballs() (pygame.joystick.Joystick method)%pygame.joystick.Joystick.get_numballshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_numballsh](j)}(hjh]h get_numballs}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_numballsjj7Joystick get_numballsjJoystick.get_numballs()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`get the number of trackballs on a Joystick`h]h)}(hj0h]h*get the number of trackballs on a Joystick}hj2sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Kubhz)}(h:sg:`get_numballs() -> int`h]h)}(hjGh]hget_numballs() -> int}hjIsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)Kubh)}(hReturns the number of trackball devices on a Joystick. These devices work similar to a mouse but they have no absolute position; they only have relative amounts of movement.h]hReturns the number of trackball devices on a Joystick. These devices work similar to a mouse but they have no absolute position; they only have relative amounts of movement.}hjbsbah}(h]h]h]h]h!]uh%hh'h]h)Khj(h&hubh)}(hThe ``pygame.JOYBALLMOTION`` event will be sent when the trackball is rolled. It will report the amount of movement on the trackball.h](hThe }hjpsbh;)}(h``pygame.JOYBALLMOTION``h]hpygame.JOYBALLMOTION}hjxsbah}(h]h]h]h]h!]uh%h:hjpubhi event will be sent when the trackball is rolled. It will report the amount of movement on the trackball.}hjpsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj(h&hubh )}(h## Joystick.get_numballs ##h]h## Joystick.get_numballs ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_ball() (pygame.joystick.Joystick method)!pygame.joystick.Joystick.get_ballhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_ballh](j)}(hjh]hget_ball}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_balljj7Joystickget_balljJoystick.get_ball()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`get the relative position of a trackball`h]h)}(hjh]h(get the relative position of a trackball}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h#:sg:`get_ball(ball_number) -> x, y`h]h)}(hjh]hget_ball(ball_number) -> x, y}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturns the relative movement of a joystick button. The value is a ``x, y`` pair holding the relative movement since the last call to get_ball.h](hCReturns the relative movement of a joystick button. The value is a }hjsbh;)}(h``x, y``h]hx, y}hj%sbah}(h]h]h]h]h!]uh%h:hjubhD pair holding the relative movement since the last call to get_ball.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hHThe ball number must be an integer from ``0`` to ``get_numballs() - 1``.h](h(The ball number must be an integer from }hj=sbh;)}(h``0``h]h0}hjEsbah}(h]h]h]h]h!]uh%h:hj=ubh to }hj=sbh;)}(h``get_numballs() - 1``h]hget_numballs() - 1}hjWsbah}(h]h]h]h]h!]uh%h:hj=ubh.}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh )}(h## Joystick.get_ball ##h]h## Joystick.get_ball ##}hjosbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2get_numbuttons() (pygame.joystick.Joystick method)'pygame.joystick.Joystick.get_numbuttonshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_numbuttonsh](j)}(hjh]hget_numbuttons}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_numbuttonsjj7Joystickget_numbuttonsjJoystick.get_numbuttons()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`get the number of buttons on a Joystick`h]h)}(hjh]h'get the number of buttons on a Joystick}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_numbuttons() -> int`h]h)}(hjh]hget_numbuttons() -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hgReturns the number of pushable buttons on the joystick. These buttons have a boolean (on or off) state.h]hgReturns the number of pushable buttons on the joystick. These buttons have a boolean (on or off) state.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hpButtons generate a ``pygame.JOYBUTTONDOWN`` and ``pygame.JOYBUTTONUP`` event when they are pressed and released.h](hButtons generate a }hj sbh;)}(h``pygame.JOYBUTTONDOWN``h]hpygame.JOYBUTTONDOWN}hjsbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``pygame.JOYBUTTONUP``h]hpygame.JOYBUTTONUP}hj$sbah}(h]h]h]h]h!]uh%h:hj ubh* event when they are pressed and released.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Joystick.get_numbuttons ##h]h## Joystick.get_numbuttons ##}hj<sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjSjjTjjTjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_button() (pygame.joystick.Joystick method)#pygame.joystick.Joystick.get_buttonhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_buttonh](j)}(hjkh]h get_button}hjmsbah}(h]h](jjeh]h]h!]h#h$uh%jhjih&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjih&hh'h]h)Mubeh}(h]jdah](jjeh]h]h!]jj7jjjJoystick.get_buttonjj7Joystick get_buttonjJoystick.get_button()uh%jh'h]h)Mhjfh&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`get the current button state`h]h)}(hjh]hget the current button state}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h :sg:`get_button(button) -> bool`h]h)}(hjh]hget_button(button) -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h/Returns the current state of a joystick button.h]h/Returns the current state of a joystick button.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh )}(h## Joystick.get_button ##h]h## Joystick.get_button ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%jhjfh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/get_numhats() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.get_numhatshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_numhatsh](j)}(hjh]h get_numhats}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M$ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M$ubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_numhatsjj7Joystick get_numhatsjJoystick.get_numhats()uh%jh'h]h)M$hjh&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`get the number of hat controls on a Joystick`h]h)}(hj2h]h,get the number of hat controls on a Joystick}hj4sbah}(h]h]hah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)M&ubhz)}(h:sg:`get_numhats() -> int`h]h)}(hjIh]hget_numhats() -> int}hjKsbah}(h]h]jah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)M&ubh)}(hReturns the number of joystick hats on a Joystick. Hat devices are like miniature digital joysticks on a joystick. Each hat has two axes of input.h]hReturns the number of joystick hats on a Joystick. Hat devices are like miniature digital joysticks on a joystick. Each hat has two axes of input.}hjdsbah}(h]h]h]h]h!]uh%hh'h]h)M)hj*h&hubh)}(hThe ``pygame.JOYHATMOTION`` event is generated when the hat changes position. The ``position`` attribute for the event contains a pair of values that are either ``-1``, ``0``, or ``1``. A position of ``(0, 0)`` means the hat is centered.h](hThe }hjrsbh;)}(h``pygame.JOYHATMOTION``h]hpygame.JOYHATMOTION}hjzsbah}(h]h]h]h]h!]uh%h:hjrubh7 event is generated when the hat changes position. The }hjrsbh;)}(h ``position``h]hposition}hjsbah}(h]h]h]h]h!]uh%h:hjrubhC attribute for the event contains a pair of values that are either }hjrsbh;)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%h:hjrubh, }hjrsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjrubh, or }hjrsbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjrubh. A position of }hjrsbh;)}(h ``(0, 0)``h]h(0, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjrubh means the hat is centered.}hjrsbeh}(h]h]h]h]h!]uh%hh'h]h)M-hj*h&hubh )}(h## Joystick.get_numhats ##h]h## Joystick.get_numhats ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)M2ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+get_hat() (pygame.joystick.Joystick method) pygame.joystick.Joystick.get_hathNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_hath](j)}(hjh]hget_hat}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M4ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M4ubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.get_hatjj7Joystickget_hatjJoystick.get_hat()uh%jh'h]h)M4hjh&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`get the position of a joystick hat`h]h)}(hjGh]h"get the position of a joystick hat}hjIsbah}(h]h]hah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)M6ubhz)}(h!:sg:`get_hat(hat_number) -> x, y`h]h)}(hj^h]hget_hat(hat_number) -> x, y}hj`sbah}(h]h]jah]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)M7ubeh}(h]h]h]h]h!]uh%huhj?h&hh'h]h)M6ubh)}(hXWReturns the current position of a position hat. The position is given as two values representing the ``x`` and ``y`` position for the hat. ``(0, 0)`` means centered. A value of ``-1`` means left/down and a value of ``1`` means right/up: so ``(-1, 0)`` means left; ``(1, 0)`` means right; ``(0, 1)`` means up; ``(1, 1)`` means upper-right; etc.h](heReturns the current position of a position hat. The position is given as two values representing the }hjysbh;)}(h``x``h]hx}hjsbah}(h]h]h]h]h!]uh%h:hjyubh and }hjysbh;)}(h``y``h]hy}hjsbah}(h]h]h]h]h!]uh%h:hjyubh position for the hat. }hjysbh;)}(h ``(0, 0)``h]h(0, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means centered. A value of }hjysbh;)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means left/down and a value of }hjysbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means right/up: so }hjysbh;)}(h ``(-1, 0)``h]h(-1, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means left; }hjysbh;)}(h ``(1, 0)``h]h(1, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means right; }hjysbh;)}(h ``(0, 1)``h]h(0, 1)}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means up; }hjysbh;)}(h ``(1, 1)``h]h(1, 1)}hjsbah}(h]h]h]h]h!]uh%h:hjyubh means upper-right; etc.}hjysbeh}(h]h]h]h]h!]uh%hh'h]h)M9hj?h&hubh)}(hdThis value is digital, ``i.e.``, each coordinate can be ``-1``, ``0`` or ``1`` but never in-between.h](hThis value is digital, }hj)sbh;)}(h``i.e.``h]hi.e.}hj1sbah}(h]h]h]h]h!]uh%h:hj)ubh, each coordinate can be }hj)sbh;)}(h``-1``h]h-1}hjCsbah}(h]h]h]h]h!]uh%h:hj)ubh, }hj)sbh;)}(h``0``h]h0}hjUsbah}(h]h]h]h]h!]uh%h:hj)ubh or }hj)sbh;)}(h``1``h]h1}hjgsbah}(h]h]h]h]h!]uh%h:hj)ubh but never in-between.}hj)sbeh}(h]h]h]h]h!]uh%hh'h]h)M?hj?h&hubh)}(h?The hat number must be between ``0`` and ``get_numhats() - 1``.h](hThe hat number must be between }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``get_numhats() - 1``h]hget_numhats() - 1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MBhj?h&hubh )}(h## Joystick.get_hat ##h]h## Joystick.get_hat ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj?h&hh'h]h)MDubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*rumble() (pygame.joystick.Joystick method)pygame.joystick.Joystick.rumblehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hrumbleh](j)}(hjh]hrumble}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MFubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MFubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.rumblejj7JoystickrumblejJoystick.rumble()uh%jh'h]h)MFhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Start a rumbling effect`h]h)}(hj h]hStart a rumbling effect}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MHubhz)}(h=:sg:`rumble(low_frequency, high_frequency, duration) -> bool`h]h)}(hj#h]h7rumble(low_frequency, high_frequency, duration) -> bool}hj%sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MIubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MHubh)}(hX8Start a rumble effect on the joystick, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Joystick.stop_rumble` is called. If an effect is already playing, then it will be overwritten.h](hStart a rumble effect on the joystick, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or }hj>sbh6)}(h:meth:`Joystick.stop_rumble`h]h;)}(hjHh]hJoystick.stop_rumble()}hjJsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjFubah}(h]h]h]h]h!]refdochS refdomainjTreftypemeth refexplicitrefwarnhYj7hZjh[Joystick.stop_rumbleuh%h5h'h]h)MKhj>ubhI is called. If an effect is already playing, then it will be overwritten.}hj>sbeh}(h]h]h]h]h!]uh%hh'h]h)MKhjh&hubh)}(hReturns True if the rumble was played successfully or False if the joystick does not support it or :meth:`pygame.version.SDL` is below 2.0.9.h](hcReturns True if the rumble was played successfully or False if the joystick does not support it or }hjpsbh6)}(h:meth:`pygame.version.SDL`h]h;)}(hjzh]hpygame.version.SDL()}hj|sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjxubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZjh[pygame.version.SDLuh%h5h'h]h)MQhjpubh is below 2.0.9.}hjpsbeh}(h]h]h]h]h!]uh%hh'h]h)MQhjh&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjsbah}(h]h](jjk eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)MUubah}(h]h]h]h]h!]j versionaddedj2.0.2uh%jh&hh'h]h)MThjubh )}(h## Joystick.rumble ##h]h## Joystick.rumble ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MVubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/stop_rumble() (pygame.joystick.Joystick method)$pygame.joystick.Joystick.stop_rumblehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h stop_rumbleh](j)}(hjh]h stop_rumble}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MXubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MXubeh}(h]jah](jjeh]h]h!]jj7jjjJoystick.stop_rumblejj7Joystick stop_rumblejJoystick.stop_rumble()uh%jh'h]h)MXhjh&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`Stop any rumble effect playing`h]h)}(hj"h]hStop any rumble effect playing}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MZubhz)}(h:sg:`stop_rumble() -> None`h]h)}(hj9h]hstop_rumble() -> None}hj;sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M[ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MZubh)}(hbStops any rumble effect playing on the joystick. See :meth:`Joystick.rumble` for more information.h](h5Stops any rumble effect playing on the joystick. See }hjTsbh6)}(h:meth:`Joystick.rumble`h]h;)}(hj^h]hJoystick.rumble()}hj`sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj\ubah}(h]h]h]h]h!]refdochS refdomainjjreftypemeth refexplicitrefwarnhYj7hZjh[Joystick.rumbleuh%h5h'h]h)M]hjTubh for more information.}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)M]hjh&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjsbah}(h]h](jjk eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Maubah}(h]h]h]h]h!]j versionaddedj2.0.2uh%jh&hh'h]h)M`hjubh )}(h## Joystick.stop_rumble ##h]h## Joystick.stop_rumble ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mbubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubh )}(h## pygame.joystick.Joystick ##h]h## pygame.joystick.Joystick ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mdubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.joystick ##h]h## pygame.joystick ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mgubh figure)}(hhh](h image)}(h.. figure:: code_examples/joystick_calls.png :scale: 100 % :alt: joystick module example Example code for joystick module. h]h}(h]h]h]h]h!]scaleKdaltjoystick module exampleuri$ref/code_examples/joystick_calls.png candidates}*js original_uri code_examples/joystick_calls.pnguh%jh'h]h)Mhhjubh caption)}(h!Example code for joystick module.h]h!Example code for joystick module.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mlhjubeh}(h]id1ah]h]h]h!]uh%jh'h]h)Mhhh,h&hubh)}(hXimport pygame pygame.init() # This is a simple class that will help us print to the screen. # It has nothing to do with the joysticks, just outputting the # information. class TextPrint: def __init__(self): self.reset() self.font = pygame.font.Font(None, 25) def tprint(self, screen, text): text_bitmap = self.font.render(text, True, (0, 0, 0)) screen.blit(text_bitmap, (self.x, self.y)) self.y += self.line_height def reset(self): self.x = 10 self.y = 10 self.line_height = 15 def indent(self): self.x += 10 def unindent(self): self.x -= 10 def main(): # Set the width and height of the screen (width, height), and name the window. screen = pygame.display.set_mode((500, 700)) pygame.display.set_caption("Joystick example") # Used to manage how fast the screen updates. clock = pygame.time.Clock() # Get ready to print. text_print = TextPrint() # This dict can be left as-is, since pygame will generate a # pygame.JOYDEVICEADDED event for every joystick connected # at the start of the program. joysticks = {} done = False while not done: # Event processing step. # Possible joystick events: JOYAXISMOTION, JOYBALLMOTION, JOYBUTTONDOWN, # JOYBUTTONUP, JOYHATMOTION, JOYDEVICEADDED, JOYDEVICEREMOVED for event in pygame.event.get(): if event.type == pygame.QUIT: done = True # Flag that we are done so we exit this loop. if event.type == pygame.JOYBUTTONDOWN: print("Joystick button pressed.") if event.button == 0: joystick = joysticks[event.instance_id] if joystick.rumble(0, 0.7, 500): print(f"Rumble effect played on joystick {event.instance_id}") if event.type == pygame.JOYBUTTONUP: print("Joystick button released.") # Handle hotplugging if event.type == pygame.JOYDEVICEADDED: # This event will be generated when the program starts for every # joystick, filling up the list without needing to create them manually. joy = pygame.joystick.Joystick(event.device_index) joysticks[joy.get_instance_id()] = joy print(f"Joystick {joy.get_instance_id()} connencted") if event.type == pygame.JOYDEVICEREMOVED: del joysticks[event.instance_id] print(f"Joystick {event.instance_id} disconnected") # Drawing step # First, clear the screen to white. Don't put other drawing commands # above this, or they will be erased with this command. screen.fill((255, 255, 255)) text_print.reset() # Get count of joysticks. joystick_count = pygame.joystick.get_count() text_print.tprint(screen, f"Number of joysticks: {joystick_count}") text_print.indent() # For each joystick: for joystick in joysticks.values(): jid = joystick.get_instance_id() text_print.tprint(screen, f"Joystick {jid}") text_print.indent() # Get the name from the OS for the controller/joystick. name = joystick.get_name() text_print.tprint(screen, f"Joystick name: {name}") guid = joystick.get_guid() text_print.tprint(screen, f"GUID: {guid}") power_level = joystick.get_power_level() text_print.tprint(screen, f"Joystick's power level: {power_level}") # Usually axis run in pairs, up/down for one, and left/right for # the other. Triggers count as axes. axes = joystick.get_numaxes() text_print.tprint(screen, f"Number of axes: {axes}") text_print.indent() for i in range(axes): axis = joystick.get_axis(i) text_print.tprint(screen, f"Axis {i} value: {axis:>6.3f}") text_print.unindent() buttons = joystick.get_numbuttons() text_print.tprint(screen, f"Number of buttons: {buttons}") text_print.indent() for i in range(buttons): button = joystick.get_button(i) text_print.tprint(screen, f"Button {i:>2} value: {button}") text_print.unindent() hats = joystick.get_numhats() text_print.tprint(screen, f"Number of hats: {hats}") text_print.indent() # Hat position. All or nothing for direction, not a float like # get_axis(). Position is a tuple of int values (x, y). for i in range(hats): hat = joystick.get_hat(i) text_print.tprint(screen, f"Hat {i} value: {str(hat)}") text_print.unindent() text_print.unindent() # Go ahead and update the screen with what we've drawn. pygame.display.flip() # Limit to 30 frames per second. clock.tick(30) if __name__ == "__main__": main() # If you forget this line, the program will 'hang' # on exit if running from IDLE. pygame.quit() h]hXimport pygame pygame.init() # This is a simple class that will help us print to the screen. # It has nothing to do with the joysticks, just outputting the # information. class TextPrint: def __init__(self): self.reset() self.font = pygame.font.Font(None, 25) def tprint(self, screen, text): text_bitmap = self.font.render(text, True, (0, 0, 0)) screen.blit(text_bitmap, (self.x, self.y)) self.y += self.line_height def reset(self): self.x = 10 self.y = 10 self.line_height = 15 def indent(self): self.x += 10 def unindent(self): self.x -= 10 def main(): # Set the width and height of the screen (width, height), and name the window. screen = pygame.display.set_mode((500, 700)) pygame.display.set_caption("Joystick example") # Used to manage how fast the screen updates. clock = pygame.time.Clock() # Get ready to print. text_print = TextPrint() # This dict can be left as-is, since pygame will generate a # pygame.JOYDEVICEADDED event for every joystick connected # at the start of the program. joysticks = {} done = False while not done: # Event processing step. # Possible joystick events: JOYAXISMOTION, JOYBALLMOTION, JOYBUTTONDOWN, # JOYBUTTONUP, JOYHATMOTION, JOYDEVICEADDED, JOYDEVICEREMOVED for event in pygame.event.get(): if event.type == pygame.QUIT: done = True # Flag that we are done so we exit this loop. if event.type == pygame.JOYBUTTONDOWN: print("Joystick button pressed.") if event.button == 0: joystick = joysticks[event.instance_id] if joystick.rumble(0, 0.7, 500): print(f"Rumble effect played on joystick {event.instance_id}") if event.type == pygame.JOYBUTTONUP: print("Joystick button released.") # Handle hotplugging if event.type == pygame.JOYDEVICEADDED: # This event will be generated when the program starts for every # joystick, filling up the list without needing to create them manually. joy = pygame.joystick.Joystick(event.device_index) joysticks[joy.get_instance_id()] = joy print(f"Joystick {joy.get_instance_id()} connencted") if event.type == pygame.JOYDEVICEREMOVED: del joysticks[event.instance_id] print(f"Joystick {event.instance_id} disconnected") # Drawing step # First, clear the screen to white. Don't put other drawing commands # above this, or they will be erased with this command. screen.fill((255, 255, 255)) text_print.reset() # Get count of joysticks. joystick_count = pygame.joystick.get_count() text_print.tprint(screen, f"Number of joysticks: {joystick_count}") text_print.indent() # For each joystick: for joystick in joysticks.values(): jid = joystick.get_instance_id() text_print.tprint(screen, f"Joystick {jid}") text_print.indent() # Get the name from the OS for the controller/joystick. name = joystick.get_name() text_print.tprint(screen, f"Joystick name: {name}") guid = joystick.get_guid() text_print.tprint(screen, f"GUID: {guid}") power_level = joystick.get_power_level() text_print.tprint(screen, f"Joystick's power level: {power_level}") # Usually axis run in pairs, up/down for one, and left/right for # the other. Triggers count as axes. axes = joystick.get_numaxes() text_print.tprint(screen, f"Number of axes: {axes}") text_print.indent() for i in range(axes): axis = joystick.get_axis(i) text_print.tprint(screen, f"Axis {i} value: {axis:>6.3f}") text_print.unindent() buttons = joystick.get_numbuttons() text_print.tprint(screen, f"Number of buttons: {buttons}") text_print.indent() for i in range(buttons): button = joystick.get_button(i) text_print.tprint(screen, f"Button {i:>2} value: {button}") text_print.unindent() hats = joystick.get_numhats() text_print.tprint(screen, f"Number of hats: {hats}") text_print.indent() # Hat position. All or nothing for direction, not a float like # get_axis(). Position is a tuple of int values (x, y). for i in range(hats): hat = joystick.get_hat(i) text_print.tprint(screen, f"Hat {i} value: {str(hat)}") text_print.unindent() text_print.unindent() # Go ahead and update the screen with what we've drawn. pygame.display.flip() # Limit to 30 frames per second. clock.tick(30) if __name__ == "__main__": main() # If you forget this line, the program will 'hang' # on exit if running from IDLE. pygame.quit() }hj#sbah}(h]h]h]h]h!]source4/home/runner/work/pygame/pygame/examples/joystick.pyh#h$forcehighlight_args} linenostartKsuh%hh'h]h)Mnhh,h&hubh target)}(h.. _controller-mappings:h]h}(h]h]h]h]h!]refidcontroller-mappingsuh%j7h)Mhh,h&hh'h]ubeh}(h](hspygame-joystickeh]h]pygame.joystickah]h!]uh%h*hhh&hh'h]h)Kubh+)}(hhh](h0)}(hCommon Controller Axis Mappingsh]hCommon Controller Axis Mappings}hjPsbah}(h]h]h]h]h!]uh%h/hjMh&hh'h]h)Mtubh)}(hController mappings are drawn from the underlying SDL library which pygame uses and they differ between pygame 1 and pygame 2. Below are a couple of mappings for three popular controllers.h]hController mappings are drawn from the underlying SDL library which pygame uses and they differ between pygame 1 and pygame 2. Below are a couple of mappings for three popular controllers.}hj^sbah}(h]h]h]h]h!]uh%hh'h]h)MvhjMh&hubh)}(h/Axis and hat mappings are listed from -1 to +1.h]h/Axis and hat mappings are listed from -1 to +1.}hjlsbah}(h]h]h]h]h!]uh%hh'h]h)MyhjMh&hubh+)}(hhh](h0)}(h)Nintendo Switch Left Joy-Con (pygame 2.x)h]h)Nintendo Switch Left Joy-Con (pygame 2.x)}hj}sbah}(h]h]h]h]h!]uh%h/hjzh&hh'h]h)M}ubh)}(hThe Nintendo Switch Left Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"h]hThe Nintendo Switch Left Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjzh&hubh bullet_list)}(hhh](h list_item)}(hXR**Buttons**:: D-pad Up - Button 0 D-pad Down - Button 1 D-pad Left - Button 2 D-pad Right - Button 3 SL - Button 4 SR - Button 5 - - Button 8 Stick In - Button 10 Capture - Button 13 L - Button 14 ZL - Button 15 h](h)}(h **Buttons**::h](h strong)}(h **Buttons**h]hButtons}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hX,D-pad Up - Button 0 D-pad Down - Button 1 D-pad Left - Button 2 D-pad Right - Button 3 SL - Button 4 SR - Button 5 - - Button 8 Stick In - Button 10 Capture - Button 13 L - Button 14 ZL - Button 15h]hX,D-pad Up - Button 0 D-pad Down - Button 1 D-pad Left - Button 2 D-pad Right - Button 3 SL - Button 4 SR - Button 5 - - Button 8 Stick In - Button 10 Capture - Button 13 L - Button 14 ZL - Button 15}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hK**Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/JoyStick**::h](j)}(h**Hat/JoyStick**h]h Hat/JoyStick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubeh}(h]h]h]h]h!]bulletj uh%jh'h]h)Mhjzh&hubeh}(h]'nintendo-switch-left-joy-con-pygame-2-xah]h])nintendo switch left joy-con (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)M}ubh+)}(hhh](h0)}(h*Nintendo Switch Right Joy-Con (pygame 2.x)h]h*Nintendo Switch Right Joy-Con (pygame 2.x)}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)Mubh)}(hThe Nintendo Switch Right Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"h]hThe Nintendo Switch Right Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"}hj*sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hXR**Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 SL - Button 4 SR - Button 5 + - Button 9 Stick In - Button 11 Home - Button 12 R - Button 14 ZR - Button 15 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hjCsbah}(h]h]h]h]h!]uh%jhj?ubh:}hj?sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;ubh)}(hX,A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 SL - Button 4 SR - Button 5 + - Button 9 Stick In - Button 11 Home - Button 12 R - Button 14 ZR - Button 15h]hX,A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 SL - Button 4 SR - Button 5 + - Button 9 Stick In - Button 11 Home - Button 12 R - Button 14 ZR - Button 15}hj[sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj;ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj8h&hubj)}(hK**Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/JoyStick**::h](j)}(h**Hat/JoyStick**h]h Hat/JoyStick}hjwsbah}(h]h]h]h]h!]uh%jhjsubh:}hjssbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjoubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjoubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj8h&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)Mhjh&hubeh}(h](nintendo-switch-right-joy-con-pygame-2-xah]h]*nintendo switch right joy-con (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)Mubh+)}(hhh](h0)}(h+Nintendo Switch Pro Controller (pygame 2.x)h]h+Nintendo Switch Pro Controller (pygame 2.x)}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)Mubh)}(hThe Nintendo Switch Pro Controller has 6 axes, 16 buttons, and 0 hats. The controller is recognized as "Nintendo Switch Pro Controller".h]hThe Nintendo Switch Pro Controller has 6 axes, 16 buttons, and 0 hats. The controller is recognized as "Nintendo Switch Pro Controller".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hI**Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hjsbah}(h]h]h]h]h!]uh%jhj ubh:}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Left -> Right - Axis 2 Up -> Down - Axis 3h]h1Left -> Right - Axis 2 Up -> Down - Axis 3}hj'sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(h/**Left Trigger**:: Out -> In - Axis 4 h](h)}(h**Left Trigger**::h](j)}(h**Left Trigger**h]h Left Trigger}hjCsbah}(h]h]h]h]h!]uh%jhj?ubh:}hj?sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;ubh)}(hOut -> In - Axis 4h]hOut -> In - Axis 4}hj[sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj;ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(h0**Right Trigger**:: Out -> In - Axis 5 h](h)}(h**Right Trigger**::h](j)}(h**Right Trigger**h]h Right Trigger}hjwsbah}(h]h]h]h]h!]uh%jhjsubh:}hjssbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjoubh)}(hOut -> In - Axis 5h]hOut -> In - Axis 5}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjoubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hX**Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 - Button - Button 4 Home Button - Button 5 + Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Capture Button - Button 15 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hXA Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 - Button - Button 4 Home Button - Button 5 + Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Capture Button - Button 15h]hXA Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 - Button - Button 4 Home Button - Button 5 + Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Capture Button - Button 15}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)Mhjh&hubeh}(h])nintendo-switch-pro-controller-pygame-2-xah]h]+nintendo switch pro controller (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)Mubh+)}(hhh](h0)}(h XBox 360 Controller (pygame 2.x)h]h XBox 360 Controller (pygame 2.x)}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)Mubh)}(hxThe Xbox 360 controller mapping has 6 axes, 11 buttons and 1 hat. The controller is recognized as "Xbox 360 Controller".h]hxThe Xbox 360 controller mapping has 6 axes, 11 buttons and 1 hat. The controller is recognized as "Xbox 360 Controller".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjsbah}(h]h]h]h]h!]uh%jhj ubh:}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hj'sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hI**Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hjCsbah}(h]h]h]h]h!]uh%jhj?ubh:}hj?sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;ubh)}(h1Left -> Right - Axis 3 Up -> Down - Axis 4h]h1Left -> Right - Axis 3 Up -> Down - Axis 4}hj[sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj;ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(h/**Left Trigger**:: Out -> In - Axis 2 h](h)}(h**Left Trigger**::h](j)}(h**Left Trigger**h]h Left Trigger}hjwsbah}(h]h]h]h]h!]uh%jhjsubh:}hjssbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjoubh)}(hOut -> In - Axis 2h]hOut -> In - Axis 2}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjoubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(h0**Right Trigger**:: Out -> In - Axis 5 h](h)}(h**Right Trigger**::h](j)}(h**Right Trigger**h]h Right Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hOut -> In - Axis 5h]hOut -> In - Axis 5}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hXO**Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 Guide Button - Button 10 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hX)A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 Guide Button - Button 10h]hX)A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 Guide Button - Button 10}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubj)}(hH**Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/D-pad**::h](j)}(h **Hat/D-pad**h]h Hat/D-pad}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj ubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hj+sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)Mhjh&hubeh}(h]xbox-360-controller-pygame-2-xah]h] xbox 360 controller (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)Mubh+)}(hhh](h0)}(h%Playstation 4 Controller (pygame 2.x)h]h%Playstation 4 Controller (pygame 2.x)}hjPsbah}(h]h]h]h]h!]uh%h/hjMh&hh'h]h)M ubh)}(hqThe PlayStation 4 controller mapping has 6 axes and 16 buttons. The controller is recognized as "PS4 Controller".h]hqThe PlayStation 4 controller mapping has 6 axes and 16 buttons. The controller is recognized as "PS4 Controller".}hj^sbah}(h]h]h]h]h!]uh%hh'h]h)MhjMh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjwsbah}(h]h]h]h]h!]uh%jhjsubh:}hjssbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjoubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjoubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjlh&hubj)}(hI**Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Left -> Right - Axis 2 Up -> Down - Axis 3h]h1Left -> Right - Axis 2 Up -> Down - Axis 3}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjlh&hubj)}(h/**Left Trigger**:: Out -> In - Axis 4 h](h)}(h**Left Trigger**::h](j)}(h**Left Trigger**h]h Left Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hOut -> In - Axis 4h]hOut -> In - Axis 4}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjlh&hubj)}(h0**Right Trigger**:: Out -> In - Axis 5 h](h)}(h**Right Trigger**::h](j)}(h**Right Trigger**h]h Right Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj ubh)}(hOut -> In - Axis 5h]hOut -> In - Axis 5}hj+sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M!hj ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjlh&hubj)}(hX**Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Share Button - Button 4 PS Button - Button 5 Options Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Touch Pad Click - Button 15 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hjGsbah}(h]h]h]h]h!]uh%jhjCubh:}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)M#hj?ubh)}(hXCross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Share Button - Button 4 PS Button - Button 5 Options Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Touch Pad Click - Button 15h]hXCross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Share Button - Button 4 PS Button - Button 5 Options Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Touch Pad Click - Button 15}hj_sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M%hj?ubeh}(h]h]h]h]h!]uh%jh'h]h)M#hjlh&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)MhjMh&hubeh}(h]#playstation-4-controller-pygame-2-xah]h]%playstation 4 controller (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)M ubh+)}(hhh](h0)}(h%Playstation 5 Controller (pygame 2.x)h]h%Playstation 5 Controller (pygame 2.x)}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)M7ubh)}(hThe PlayStation 5 controller mapping has 6 axes, 13 buttons, and 1 hat. The controller is recognized as "Sony Interactive Entertainment Wireless Controller".h]hThe PlayStation 5 controller mapping has 6 axes, 13 buttons, and 1 hat. The controller is recognized as "Sony Interactive Entertainment Wireless Controller".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M9hjh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M<hjubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M>hjubeh}(h]h]h]h]h!]uh%jh'h]h)M<hjh&hubj)}(hI**Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MAhjubh)}(h1Left -> Right - Axis 3 Up -> Down - Axis 4h]h1Left -> Right - Axis 3 Up -> Down - Axis 4}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)MChjubeh}(h]h]h]h]h!]uh%jh'h]h)MAhjh&hubj)}(h/**Left Trigger**:: Out -> In - Axis 2 h](h)}(h**Left Trigger**::h](j)}(h**Left Trigger**h]h Left Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MFhj ubh)}(hOut -> In - Axis 2h]hOut -> In - Axis 2}hj+sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)MHhj ubeh}(h]h]h]h]h!]uh%jh'h]h)MFhjh&hubj)}(h0**Right Trigger**:: Out -> In - Axis 5 h](h)}(h**Right Trigger**::h](j)}(h**Right Trigger**h]h Right Trigger}hjGsbah}(h]h]h]h]h!]uh%jhjCubh:}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)MJhj?ubh)}(hOut -> In - Axis 5h]hOut -> In - Axis 5}hj_sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)MLhj?ubeh}(h]h]h]h]h!]uh%jh'h]h)MJhjh&hubj)}(hX**Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Left Trigger - Button 6 Right Trigger - Button 7 Share Button - Button 8 Options Button - Button 9 PS Button - Button 10 Left Stick in - Button 11 Right Stick in - Button 12 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hj{sbah}(h]h]h]h]h!]uh%jhjwubh:}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)MNhjsubh)}(hXaCross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Left Trigger - Button 6 Right Trigger - Button 7 Share Button - Button 8 Options Button - Button 9 PS Button - Button 10 Left Stick in - Button 11 Right Stick in - Button 12h]hXaCross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Left Trigger - Button 6 Right Trigger - Button 7 Share Button - Button 8 Options Button - Button 9 PS Button - Button 10 Left Stick in - Button 11 Right Stick in - Button 12}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)MPhjsubeh}(h]h]h]h]h!]uh%jh'h]h)MNhjh&hubj)}(hI**Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/D-pad**::h](j)}(h **Hat/D-pad**h]h Hat/D-pad}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M^hjubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M`hjubeh}(h]h]h]h]h!]uh%jh'h]h)M^hjh&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)M<hjh&hubeh}(h]#playstation-5-controller-pygame-2-xah]h]%playstation 5 controller (pygame 2.x)ah]h!]uh%h*hjMh&hh'h]h)M7ubh+)}(hhh](h0)}(h XBox 360 Controller (pygame 1.x)h]h XBox 360 Controller (pygame 1.x)}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)Mfubh)}(hThe Xbox 360 controller mapping has 5 axes, 10 buttons, and 1 hat. The controller is recognized as "Controller (XBOX 360 For Windows)".h]hThe Xbox 360 controller mapping has 5 axes, 10 buttons, and 1 hat. The controller is recognized as "Controller (XBOX 360 For Windows)".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhhjh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mkhj ubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hj+sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mmhj ubeh}(h]h]h]h]h!]uh%jh'h]h)Mkhjh&hubj)}(hI**Right Stick**:: Left -> Right - Axis 4 Up -> Down - Axis 3 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hjGsbah}(h]h]h]h]h!]uh%jhjCubh:}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)Mphj?ubh)}(h1Left -> Right - Axis 4 Up -> Down - Axis 3h]h1Left -> Right - Axis 4 Up -> Down - Axis 3}hj_sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mrhj?ubeh}(h]h]h]h]h!]uh%jh'h]h)Mphjh&hubj)}(h?**Left Trigger & Right Trigger**:: RT -> LT - Axis 2 h](h)}(h"**Left Trigger & Right Trigger**::h](j)}(h **Left Trigger & Right Trigger**h]hLeft Trigger & Right Trigger}hj{sbah}(h]h]h]h]h!]uh%jhjwubh:}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)Muhjsubh)}(hRT -> LT - Axis 2h]hRT -> LT - Axis 2}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mwhjsubeh}(h]h]h]h]h!]uh%jh'h]h)Muhjh&hubj)}(hX1**Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Myhjubh)}(hX A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9h]hX A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)M{hjubeh}(h]h]h]h]h!]uh%jh'h]h)Myhjh&hubj)}(hH**Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/D-pad**::h](j)}(h **Hat/D-pad**h]h Hat/D-pad}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)Mkhjh&hubeh}(h]xbox-360-controller-pygame-1-xah]h] xbox 360 controller (pygame 1.x)ah]h!]uh%h*hjMh&hh'h]h)Mfubh+)}(hhh](h0)}(h%Playstation 4 Controller (pygame 1.x)h]h%Playstation 4 Controller (pygame 1.x)}hj sbah}(h]h]h]h]h!]uh%h/hjh&hh'h]h)Mubh)}(h~The PlayStation 4 controller mapping has 6 axes, 14 buttons, and 1 hat. The controller is recognized as "Wireless Controller".h]h~The PlayStation 4 controller mapping has 6 axes, 14 buttons, and 1 hat. The controller is recognized as "Wireless Controller".}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hH**Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 h](h)}(h**Left Stick**::h](j)}(h**Left Stick**h]h Left Stick}hjGsbah}(h]h]h]h]h!]uh%jhjCubh:}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj?ubh)}(h1Left -> Right - Axis 0 Up -> Down - Axis 1h]h1Left -> Right - Axis 0 Up -> Down - Axis 1}hj_sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj?ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubj)}(hI**Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 h](h)}(h**Right Stick**::h](j)}(h**Right Stick**h]h Right Stick}hj{sbah}(h]h]h]h]h!]uh%jhjwubh:}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjsubh)}(h1Left -> Right - Axis 2 Up -> Down - Axis 3h]h1Left -> Right - Axis 2 Up -> Down - Axis 3}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjsubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubj)}(h/**Left Trigger**:: Out -> In - Axis 5 h](h)}(h**Left Trigger**::h](j)}(h**Left Trigger**h]h Left Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hOut -> In - Axis 5h]hOut -> In - Axis 5}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubj)}(h0**Right Trigger**:: Out -> In - Axis 4 h](h)}(h**Right Trigger**::h](j)}(h**Right Trigger**h]h Right Trigger}hjsbah}(h]h]h]h]h!]uh%jhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubh)}(hOut -> In - Axis 4h]hOut -> In - Axis 4}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhjubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubj)}(hX**Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 L. Trigger(Full)- Button 6 R. Trigger(Full)- Button 7 Share Button - Button 8 Options Button - Button 9 L. Stick In - Button 10 R. Stick In - Button 11 PS Button - Button 12 Touch Pad Click - Button 13 h](h)}(h **Buttons**::h](j)}(h **Buttons**h]hButtons}hj sbah}(h]h]h]h]h!]uh%jhj ubh:}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj ubh)}(hX}Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 L. Trigger(Full)- Button 6 R. Trigger(Full)- Button 7 Share Button - Button 8 Options Button - Button 9 L. Stick In - Button 10 R. Stick In - Button 11 PS Button - Button 12 Touch Pad Click - Button 13h]hX}Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 L. Trigger(Full)- Button 6 R. Trigger(Full)- Button 7 Share Button - Button 8 Options Button - Button 9 L. Stick In - Button 10 R. Stick In - Button 11 PS Button - Button 12 Touch Pad Click - Button 13}hj/ sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Mhj ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubj)}(hG**Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis h](h)}(h**Hat/D-pad**::h](j)}(h **Hat/D-pad**h]h Hat/D-pad}hjK sbah}(h]h]h]h]h!]uh%jhjG ubh:}hjG sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjC ubh)}(h1Down -> Up - Y Axis Left -> Right - X Axish]h1Down -> Up - Y Axis Left -> Right - X Axis}hjc sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)MhjC ubeh}(h]h]h]h]h!]uh%jh'h]h)Mhj<h&hubeh}(h]h]h]h]h!]jj uh%jh'h]h)Mhjh&hubeh}(h]#playstation-4-controller-pygame-1-xah]h]%playstation 4 controller (pygame 1.x)ah]h!]uh%h*hjMh&hh'h]h)Mubeh}(h](common-controller-axis-mappingsjDeh]h](common controller axis mappingscontroller-mappingseh]h!]uh%h*hhh&hh'h]h)Mtexpect_referenced_by_name}j j9sexpect_referenced_by_id}jDj9subeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}jD]j9asnameids}(jJjGj jDj j jjjjjjjJjGj~j{jjjjj j u nametypes}(jJj j jjjjJj~jjj uh}(jGh,hsj8)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j7h'h]h)Khh,h&hubjjjjjLjQjj jjjjjjj)j.jjjjj j ji jn j j jo jt j j jjjjjjjdjijjjjjjjjjDjMj jMjjzjjjjjGjj{jMjjjjj jjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages]h system_message)}(hhh]h)}(hhh]h9Hyperlink target "controller-mappings" is not referenced.}hj/!sbah}(h]h]h]h]h!]uh%hhj,!ubah}(h]h]h]h]h!]levelKtypeINFOsourceh]lineMuh%j*!uba transformerN include_log]docs/reST/ref/joystick.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612175.3901408 pygame-2.6.1/docs/generated/doctrees/ref/key.doctree0000644000175100001770000021212014676242417022033 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.key`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.key}hh` representing every key on the keyboard * ``mod``: a bitmask of all the :ref:`modifier keys ` that were in a pressed state when the event occurred h]h bullet_list)}(hhh](h list_item)}(hZ``key``: an :ref:`integer ID ` representing every key on the keyboardh]h)}(hZ``key``: an :ref:`integer ID ` representing every key on the keyboardh](h;)}(h``key``h]hkey}hj<sbah}(h]h]h]h]h!]uh%h:hj8ubh: an }hj8sbh6)}(h':ref:`integer ID `h]h)}(hjPh]h integer ID}hjRsbah}(h]h](hFstdstd-refeh]h]h!]uh%hhjNubah}(h]h]h]h]h!]refdochS refdomainj\reftyperef refexplicitrefwarnh[key-constants-labeluh%h5h'h]h)Khj8ubh' representing every key on the keyboard}hj8sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj4ubah}(h]h]h]h]h!]uh%j2h'h]h)Khj/ubj3)}(h~``mod``: a bitmask of all the :ref:`modifier keys ` that were in a pressed state when the event occurred h]h)}(h}``mod``: a bitmask of all the :ref:`modifier keys ` that were in a pressed state when the event occurredh](h;)}(h``mod``h]hmod}hjsbah}(h]h]h]h]h!]uh%h:hjubh: a bitmask of all the }hjsbh6)}(h*:ref:`modifier keys `h]h)}(hjh]h modifier keys}hjsbah}(h]h](hFstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdochS refdomainjreftyperef refexplicitrefwarnh[key-modifiers-labeluh%h5h'h]h)Khjubh5 that were in a pressed state when the event occurred}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj~ubah}(h]h]h]h]h!]uh%j2h'h]h)Khj/ubeh}(h]h]h]h]h!]bullet*uh%j-h'h]h)Khj)ubah}(h]h]h]h]h!]uh%j'h'h]h)Khh,h&hubh)}(hXThe ``pygame.KEYDOWN`` event has the additional attributes ``unicode`` and ``scancode``.h](hThe }hjsbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubh% event has the additional attributes }hjsbh;)}(h ``unicode``h]hunicode}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h ``scancode``h]hscancode}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubj()}(hXA* ``unicode``: a single character string that is the fully translated character entered, this takes into account the shift and composition keys * ``scancode``: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys h]j.)}(hhh](j3)}(h``unicode``: a single character string that is the fully translated character entered, this takes into account the shift and composition keysh]h)}(h``unicode``: a single character string that is the fully translated character entered, this takes into account the shift and composition keysh](h;)}(h ``unicode``h]hunicode}hj)sbah}(h]h]h]h]h!]uh%h:hj%ubh: a single character string that is the fully translated character entered, this takes into account the shift and composition keys}hj%sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj!ubah}(h]h]h]h]h!]uh%j2h'h]h)Khjubj3)}(h``scancode``: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys h]h)}(h``scancode``: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keysh](h;)}(h ``scancode``h]hscancode}hjOsbah}(h]h]h]h]h!]uh%h:hjKubh: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys}hjKsbeh}(h]h]h]h]h!]uh%hh'h]h)KhjGubah}(h]h]h]h]h!]uh%j2h'h]h)Khjubeh}(h]h]h]h]h!]jjuh%j-h'h]h)Khjubah}(h]h]h]h]h!]uh%j'h'h]h)Khh,h&hubhversionmodified)}(hNew in pygame 2.0.0: The pygame.TEXTINPUT event is preferred to the unicode attribute of pygame.KEYDOWN. The attribute text contains the input.h]h)}(hNew in pygame 2.0.0: The pygame.TEXTINPUT event is preferred to the unicode attribute of pygame.KEYDOWN. The attribute text contains the input.h](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hjsbah}(h]h](jyaddedeh]h]h!]uh%hhjh&hh'h]h)K#ubhThe }(hjh&hh'Nh)Nubh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh event is preferred to the }(hjh&hh'Nh)Nubh;)}(h ``unicode``h]hunicode}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh attribute of }(hjh&hh'Nh)Nubh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh. The attribute }(hjh&hh'Nh)Nubh;)}(h``text``h]htext}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh contains the input.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj{h&hh'h]h)K#ubah}(h]h]h]h]h!]type versionaddedversion2.0.0uh%jyh&hh'h]h)Khh,ubh target)}(h.. _key-constants-label:h]h}(h]h]h]h]h!]refidkey-constants-labeluh%jh)K greater-than sign K_QUESTION ? question mark K_AT @ at K_LEFTBRACKET [ left bracket K_BACKSLASH \ backslash K_RIGHTBRACKET ] right bracket K_CARET ^ caret K_UNDERSCORE _ underscore K_BACKQUOTE ` grave K_a a a K_b b b K_c c c K_d d d K_e e e K_f f f K_g g g K_h h h K_i i i K_j j j K_k k k K_l l l K_m m m K_n n n K_o o o K_p p p K_q q q K_r r r K_s s s K_t t t K_u u u K_v v v K_w w w K_x x x K_y y y K_z z z K_DELETE delete K_KP0 keypad 0 K_KP1 keypad 1 K_KP2 keypad 2 K_KP3 keypad 3 K_KP4 keypad 4 K_KP5 keypad 5 K_KP6 keypad 6 K_KP7 keypad 7 K_KP8 keypad 8 K_KP9 keypad 9 K_KP_PERIOD . keypad period K_KP_DIVIDE / keypad divide K_KP_MULTIPLY * keypad multiply K_KP_MINUS - keypad minus K_KP_PLUS + keypad plus K_KP_ENTER \r keypad enter K_KP_EQUALS = keypad equals K_UP up arrow K_DOWN down arrow K_RIGHT right arrow K_LEFT left arrow K_INSERT insert K_HOME home K_END end K_PAGEUP page up K_PAGEDOWN page down K_F1 F1 K_F2 F2 K_F3 F3 K_F4 F4 K_F5 F5 K_F6 F6 K_F7 F7 K_F8 F8 K_F9 F9 K_F10 F10 K_F11 F11 K_F12 F12 K_F13 F13 K_F14 F14 K_F15 F15 K_NUMLOCK numlock K_CAPSLOCK capslock K_SCROLLOCK scrollock K_RSHIFT right shift K_LSHIFT left shift K_RCTRL right control K_LCTRL left control K_RALT right alt K_LALT left alt K_RMETA right meta K_LMETA left meta K_LSUPER left Windows key K_RSUPER right Windows key K_MODE mode shift K_HELP help K_PRINT print screen K_SYSREQ sysrq K_BREAK break K_MENU menu K_POWER power K_EURO Euro K_AC_BACK Android back buttonh]hX}pygame Constant ASCII Description --------------------------------- K_BACKSPACE \b backspace K_TAB \t tab K_CLEAR clear K_RETURN \r return K_PAUSE pause K_ESCAPE ^[ escape K_SPACE space K_EXCLAIM ! exclaim K_QUOTEDBL " quotedbl K_HASH # hash K_DOLLAR $ dollar K_AMPERSAND & ampersand K_QUOTE quote K_LEFTPAREN ( left parenthesis K_RIGHTPAREN ) right parenthesis K_ASTERISK * asterisk K_PLUS + plus sign K_COMMA , comma K_MINUS - minus sign K_PERIOD . period K_SLASH / forward slash K_0 0 0 K_1 1 1 K_2 2 2 K_3 3 3 K_4 4 4 K_5 5 5 K_6 6 6 K_7 7 7 K_8 8 8 K_9 9 9 K_COLON : colon K_SEMICOLON ; semicolon K_LESS < less-than sign K_EQUALS = equals sign K_GREATER > greater-than sign K_QUESTION ? question mark K_AT @ at K_LEFTBRACKET [ left bracket K_BACKSLASH \ backslash K_RIGHTBRACKET ] right bracket K_CARET ^ caret K_UNDERSCORE _ underscore K_BACKQUOTE ` grave K_a a a K_b b b K_c c c K_d d d K_e e e K_f f f K_g g g K_h h h K_i i i K_j j j K_k k k K_l l l K_m m m K_n n n K_o o o K_p p p K_q q q K_r r r K_s s s K_t t t K_u u u K_v v v K_w w w K_x x x K_y y y K_z z z K_DELETE delete K_KP0 keypad 0 K_KP1 keypad 1 K_KP2 keypad 2 K_KP3 keypad 3 K_KP4 keypad 4 K_KP5 keypad 5 K_KP6 keypad 6 K_KP7 keypad 7 K_KP8 keypad 8 K_KP9 keypad 9 K_KP_PERIOD . keypad period K_KP_DIVIDE / keypad divide K_KP_MULTIPLY * keypad multiply K_KP_MINUS - keypad minus K_KP_PLUS + keypad plus K_KP_ENTER \r keypad enter K_KP_EQUALS = keypad equals K_UP up arrow K_DOWN down arrow K_RIGHT right arrow K_LEFT left arrow K_INSERT insert K_HOME home K_END end K_PAGEUP page up K_PAGEDOWN page down K_F1 F1 K_F2 F2 K_F3 F3 K_F4 F4 K_F5 F5 K_F6 F6 K_F7 F7 K_F8 F8 K_F9 F9 K_F10 F10 K_F11 F11 K_F12 F12 K_F13 F13 K_F14 F14 K_F15 F15 K_NUMLOCK numlock K_CAPSLOCK capslock K_SCROLLOCK scrollock K_RSHIFT right shift K_LSHIFT left shift K_RCTRL right control K_LCTRL left control K_RALT right alt K_LALT left alt K_RMETA right meta K_LMETA left meta K_LSUPER left Windows key K_RSUPER right Windows key K_MODE mode shift K_HELP help K_PRINT print screen K_SYSREQ sysrq K_BREAK break K_MENU menu K_POWER power K_EURO Euro K_AC_BACK Android back button}hjhsbah}(h]h]h]h]h!]h#h$uh%jfh'h]h)K0hh,h&hubj)}(h.. _key-modifiers-label:h]h}(h]h]h]h]h!]jkey-modifiers-labeluh%jh)Khh,h&hh'h]ubh)}(hThe keyboard also has a list of modifier states (from :mod:`pygame.locals`) that can be assembled by bitwise-ORing them together.h](h6The keyboard also has a list of modifier states (from }hjsbh6)}(h:mod:`pygame.locals`h]h;)}(hjh]h pygame.locals}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZNh[ pygame.localsuh%h5h'h]h)Khjubh7) that can be assembled by bitwise-ORing them together.}hjsbeh}(h]jah]h]key-modifiers-labelah]h!]uh%hh'h]h)Khh,h&hj0}jjvsj2}jjvsubjg)}(hX,pygame Constant Description ------------------------- KMOD_NONE no modifier keys pressed KMOD_LSHIFT left shift KMOD_RSHIFT right shift KMOD_SHIFT left shift or right shift or both KMOD_LCTRL left control KMOD_RCTRL right control KMOD_CTRL left control or right control or both KMOD_LALT left alt KMOD_RALT right alt KMOD_ALT left alt or right alt or both KMOD_LMETA left meta KMOD_RMETA right meta KMOD_META left meta or right meta or both KMOD_CAPS caps lock KMOD_NUM num lock KMOD_MODE AltGrh]hX,pygame Constant Description ------------------------- KMOD_NONE no modifier keys pressed KMOD_LSHIFT left shift KMOD_RSHIFT right shift KMOD_SHIFT left shift or right shift or both KMOD_LCTRL left control KMOD_RCTRL right control KMOD_CTRL left control or right control or both KMOD_LALT left alt KMOD_RALT right alt KMOD_ALT left alt or right alt or both KMOD_LMETA left meta KMOD_RMETA right meta KMOD_META left meta or right meta or both KMOD_CAPS caps lock KMOD_NUM num lock KMOD_MODE AltGr}hjsbah}(h]h]h]h]h!]h#h$uh%jfh'h]h)Khh,h&hubh)}(hXzThe modifier information is contained in the ``mod`` attribute of the ``pygame.KEYDOWN`` and ``pygame.KEYUP`` events. The ``mod`` attribute is a bitmask of all the modifier keys that were in a pressed state when the event occurred. The modifier information can be decoded using a bitwise AND (except for ``KMOD_NONE``, which should be compared using equals ``==``). For example:h](h-The modifier information is contained in the }hjsbh;)}(h``mod``h]hmod}hjsbah}(h]h]h]h]h!]uh%h:hjubh attribute of the }hjsbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``pygame.KEYUP``h]h pygame.KEYUP}hjsbah}(h]h]h]h]h!]uh%h:hjubh events. The }hjsbh;)}(h``mod``h]hmod}hjsbah}(h]h]h]h]h!]uh%h:hjubh attribute is a bitmask of all the modifier keys that were in a pressed state when the event occurred. The modifier information can be decoded using a bitwise AND (except for }hjsbh;)}(h ``KMOD_NONE``h]h KMOD_NONE}hjsbah}(h]h]h]h]h!]uh%h:hjubh(, which should be compared using equals }hjsbh;)}(h``==``h]h==}hj&sbah}(h]h]h]h]h!]uh%h:hjubh). For example:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubjg)}(hXfor event in pygame.event.get(): if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP: if event.mod == pygame.KMOD_NONE: print('No modifier keys were in a pressed state when this ' 'event occurred.') else: if event.mod & pygame.KMOD_LSHIFT: print('Left shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_RSHIFT: print('Right shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_SHIFT: print('Left shift or right shift or both were in a ' 'pressed state when this event occurred.')h]hXfor event in pygame.event.get(): if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP: if event.mod == pygame.KMOD_NONE: print('No modifier keys were in a pressed state when this ' 'event occurred.') else: if event.mod & pygame.KMOD_LSHIFT: print('Left shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_RSHIFT: print('Right shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_SHIFT: print('Left shift or right shift or both were in a ' 'pressed state when this event occurred.')}hj>sbah}(h]h]h]h]h!]h#h$uh%jfh'h]h)Khh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single$get_focused() (in module pygame.key)pygame.key.get_focusedhNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(h get_focusedh](h desc_addname)}(h pygame.key.h]h pygame.key.}hjhsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jfhjbh&hh'h]h)Kubh desc_name)}(hjdh]h get_focused}hjzsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jxhjbh&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjbh&hh'h]h)Kubeh}(h]jYah](sig sig-objecteh]h]h!]modulehӌclasshfullnamejd _toc_partshjd _toc_name get_focused()uh%j`h'h]h)Khj]h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(hE:sl:`true if the display is receiving keyboard input from the system`h]h)}(hjh]h?true if the display is receiving keyboard input from the system}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_focused() -> bool`h]h)}(hjh]hget_focused() -> bool}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hReturns ``True`` when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use :func:`pygame.event.set_grab()` to grab all input.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use }hjsbh6)}(h:func:`pygame.event.set_grab()`h]h;)}(hjh]hpygame.event.set_grab()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[pygame.event.set_grabuh%h5h'h]h)Khjubh to grab all input.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.key.get_focused ##h]h## pygame.key.get_focused ##}hj%sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj]h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj<objtypej=desctypej=no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW$get_pressed() (in module pygame.key)pygame.key.get_pressedhNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(h get_pressedh](jg)}(h pygame.key.h]h pygame.key.}hj`sbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj\h&hh'h]h)Kubjy)}(hj^h]h get_pressed}hjnsbah}(h]h](jjeh]h]h!]h#h$uh%jxhj\h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj\h&hh'h]h)Kubeh}(h]jWah](jjeh]h]h!]jhjhjj^jhj^j get_pressed()uh%j`h'h]h)KhjYh&hubj)}(hhh](hv)}(hhh](hz)}(h+:sl:`get the state of all keyboard buttons`h]h)}(hjh]h%get the state of all keyboard buttons}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_pressed() -> bools`h]h)}(hjh]hget_pressed() -> bools}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hReturns a sequence of boolean values representing the state of every key on the keyboard. Use the key constant values to index the array. A ``True`` value means that the button is pressed.h](hReturns a sequence of boolean values representing the state of every key on the keyboard. Use the key constant values to index the array. A }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh( value means that the button is pressed.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh note)}(hXGetting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to ``pygame.key.get_pressed()``. There is also no way to translate these pushed keys into a fully translated character value. See the ``pygame.KEYDOWN`` events on the :mod:`pygame.event` queue for this functionality.h]h)}(hXGetting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to ``pygame.key.get_pressed()``. There is also no way to translate these pushed keys into a fully translated character value. See the ``pygame.KEYDOWN`` events on the :mod:`pygame.event` queue for this functionality.h](hGetting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to }hjsbh;)}(h``pygame.key.get_pressed()``h]hpygame.key.get_pressed()}hjsbah}(h]h]h]h]h!]uh%h:hjubhg. There is also no way to translate these pushed keys into a fully translated character value. See the }hjsbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubh events on the }hjsbh6)}(h:mod:`pygame.event`h]h;)}(hjh]h pygame.event}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj'reftypemod refexplicitrefwarnhYhhZNh[ pygame.eventuh%h5h'h]h)Mhjubh queue for this functionality.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjubah}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubjz)}(hNew in pygame 2.2.0: The collection of bools returned by get_pressed can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes.h]h)}(hNew in pygame 2.2.0: The collection of bools returned by get_pressed can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes.h](h)}(hNew in pygame 2.2.0: h]hNew in pygame 2.2.0: }hjQsbah}(h]h](jyjeh]h]h!]uh%hhjMh&hh'h]h)Mubh$The collection of bools returned by }(hjMh&hh'Nh)Nubh;)}(h``get_pressed``h]h get_pressed}hjcsbah}(h]h]h]h]h!]uh%h:hjMh&hh'Nh)Nubhh can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes.}(hjMh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjIh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.2.0uh%jyh&hh'h]h)Mhjubjz)}(hNew in pygame 2.5.0: Iteration over the collection of bools returned by get_pressed is now restored. However it still does not make sense to iterate over it. Currently.h]h)}(hNew in pygame 2.5.0: Iteration over the collection of bools returned by get_pressed is now restored. However it still does not make sense to iterate over it. Currently.h](h)}(hNew in pygame 2.5.0: h]hNew in pygame 2.5.0: }hjsbah}(h]h](jyjeh]h]h!]uh%hhjh&hh'h]h)Mubh3Iteration over the collection of bools returned by }(hjh&hh'Nh)Nubh;)}(h``get_pressed``h]h get_pressed}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhU is now restored. However it still does not make sense to iterate over it. Currently.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.5.0uh%jyh&hh'h]h)Mhjubh )}(h## pygame.key.get_pressed ##h]h## pygame.key.get_pressed ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjYh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAjjBjjCjjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW!get_mods() (in module pygame.key)pygame.key.get_modshNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hget_modsh](jg)}(h pygame.key.h]h pygame.key.}hjsbah}(h]h](jsjteh]h]h!]h#h$uh%jfhjh&hh'h]h)Mubjy)}(hjh]hget_mods}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jxhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj get_mods()uh%j`h'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`determine which modifier keys are being held`h]h)}(hj%h]h,determine which modifier keys are being held}hj'sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`get_mods() -> int`h]h)}(hj<h]hget_mods() -> int}hj>sbah}(h]h]jah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturns a single integer representing a bitmask of all the modifier keys being held. Using bitwise operators you can test if specific :ref:`modifier keys ` are pressed.h](hReturns a single integer representing a bitmask of all the modifier keys being held. Using bitwise operators you can test if specific }hjWsbh6)}(h*:ref:`modifier keys `h]h)}(hjah]h modifier keys}hjcsbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj_ubah}(h]h]h]h]h!]refdochS refdomainjmreftyperef refexplicitrefwarnh[key-modifiers-labeluh%h5h'h]h)MhjWubh are pressed.}hjWsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## pygame.key.get_mods ##h]h## pygame.key.get_mods ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAjjBjjCjjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW!set_mods() (in module pygame.key)pygame.key.set_modshNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hset_modsh](jg)}(h pygame.key.h]h pygame.key.}hjsbah}(h]h](jsjteh]h]h!]h#h$uh%jfhjh&hh'h]h)M$ubjy)}(hjh]hset_mods}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jxhjh&hh'h]h)M$ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M$ubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj set_mods()uh%j`h'h]h)M$hjh&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`temporarily set which modifier keys are pressed`h]h)}(hjh]h/temporarily set which modifier keys are pressed}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M&ubhz)}(h:sg:`set_mods(int) -> None`h]h)}(hjh]hset_mods(int) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M&ubh)}(hoCreate a bitmask of the :ref:`modifier key constants ` you want to impose on your program.h](hCreate a bitmask of the }hj!sbh6)}(h3:ref:`modifier key constants `h]h)}(hj+h]hmodifier key constants}hj-sbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj)ubah}(h]h]h]h]h!]refdochS refdomainj7reftyperef refexplicitrefwarnh[key-modifiers-labeluh%h5h'h]h)M)hj!ubh$ you want to impose on your program.}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)M)hjh&hubh )}(h## pygame.key.set_mods ##h]h## pygame.key.set_mods ##}hjSsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M,ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAjjjBjkjCjkjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW#set_repeat() (in module pygame.key)pygame.key.set_repeathNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(h set_repeath](jg)}(h pygame.key.h]h pygame.key.}hjsbah}(h]h](jsjteh]h]h!]h#h$uh%jfhjh&hh'h]h)M.ubjy)}(hjh]h set_repeat}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jxhjh&hh'h]h)M.ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M.ubeh}(h]j{ah](jjeh]h]h!]jhjhjjjhjj set_repeat()uh%j`h'h]h)M.hj}h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`control how held keys are repeated`h]h)}(hjh]h"control how held keys are repeated}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M0ubhz)}(h:sg:`set_repeat() -> None`h]h)}(hjh]hset_repeat() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M1ubhz)}(h:sg:`set_repeat(delay) -> None`h]h)}(hjh]hset_repeat(delay) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M2ubhz)}(h):sg:`set_repeat(delay, interval) -> None`h]h)}(hjh]h#set_repeat(delay, interval) -> None}hj sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M0ubh)}(hXWhen the keyboard repeat is enabled, keys that are held down will generate multiple ``pygame.KEYDOWN`` events. The ``delay`` parameter is the number of milliseconds before the first repeated ``pygame.KEYDOWN`` event will be sent. After that, another ``pygame.KEYDOWN`` event will be sent every ``interval`` milliseconds. If a ``delay`` value is provided and an ``interval`` value is not provided or is 0, then the ``interval`` will be set to the same value as ``delay``.h](hTWhen the keyboard repeat is enabled, keys that are held down will generate multiple }hj sbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hj! sbah}(h]h]h]h]h!]uh%h:hj ubh events. The }hj sbh;)}(h ``delay``h]hdelay}hj3 sbah}(h]h]h]h]h!]uh%h:hj ubhC parameter is the number of milliseconds before the first repeated }hj sbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjE sbah}(h]h]h]h]h!]uh%h:hj ubh) event will be sent. After that, another }hj sbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjW sbah}(h]h]h]h]h!]uh%h:hj ubh event will be sent every }hj sbh;)}(h ``interval``h]hinterval}hji sbah}(h]h]h]h]h!]uh%h:hj ubh milliseconds. If a }hj sbh;)}(h ``delay``h]hdelay}hj{ sbah}(h]h]h]h]h!]uh%h:hj ubh value is provided and an }hj sbh;)}(h ``interval``h]hinterval}hj sbah}(h]h]h]h]h!]uh%h:hj ubh) value is not provided or is 0, then the }hj sbh;)}(h ``interval``h]hinterval}hj sbah}(h]h]h]h]h!]uh%h:hj ubh" will be set to the same value as }hj sbh;)}(h ``delay``h]hdelay}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M5hjh&hubh)}(hVTo disable key repeat call this function with no arguments or with ``delay`` set to 0.h](hCTo disable key repeat call this function with no arguments or with }hj sbh;)}(h ``delay``h]hdelay}hj sbah}(h]h]h]h]h!]uh%h:hj ubh set to 0.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M=hjh&hubh)}(h6When pygame is initialized the key repeat is disabled.h]h6When pygame is initialized the key repeat is disabled.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)M@hjh&hubh field_list)}(hhh]h field)}(hhh](h field_name)}(hRaisesh]hRaises}hj sbah}(h]h]h]h]h!]uh%j hj h'h]h)Kubh field_body)}(hhh]h)}(h)ValueError -- if delay or interval is < 0h](h6)}(hhh]hliteral_strong)}(h ValueErrorh]h ValueError}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypeexc reftargetj! refspecific py:modulehӌpy:classNuh%h5hj ubh -- }hj sbhif }(hj h&hh'Nh)Nubh;)}(h ``delay``h]hdelay}hjD sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh or }(hj h&hh'Nh)Nubh;)}(h ``interval``h]hinterval}hjV sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh is < 0}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%j hj ubeh}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!]uh%j hjh&hh'Nh)Nubjz)}(hlChanged in pygame 2.0.0: A ValueError is now raised (instead of a pygame.error) if delay or interval is < 0.h]h)}(hlChanged in pygame 2.0.0: A ValueError is now raised (instead of a pygame.error) if delay or interval is < 0.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hj sbah}(h]h](jychangedeh]h]h!]uh%hhj h&hh'h]h)MFubhA }(hj h&hh'Nh)Nubh;)}(h``ValueError``h]h ValueError}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh is now raised (instead of a }(hj h&hh'Nh)Nubh;)}(h``pygame.error``h]h pygame.error}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh) if }(hj h&hh'Nh)Nubh;)}(h ``delay``h]hdelay}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh or }(hj h&hh'Nh)Nubh;)}(h ``interval``h]hinterval}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh is < 0.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)MFubah}(h]h]h]h]h!]jversionchangedj2.0.0uh%jyh&hh'h]h)MDhjubh )}(h## pygame.key.set_repeat ##h]h## pygame.key.set_repeat ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MGubeh}(h]h]h]h]h!]uh%jhj}h&hh'Nh)Nubeh}(h]h](j4 functioneh]h]h!]jAj4 jBj jCj jDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW#get_repeat() (in module pygame.key)pygame.key.get_repeathNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(h get_repeath](jg)}(h pygame.key.h]h pygame.key.}hj" sbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj h&hh'h]h)MIubjy)}(hj h]h get_repeat}hj0 sbah}(h]h](jjeh]h]h!]h#h$uh%jxhj h&hh'h]h)MIubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)MIubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj j get_repeat()uh%j`h'h]h)MIhj h&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`see how held keys are repeated`h]h)}(hjW h]hsee how held keys are repeated}hjY sbah}(h]h]hah]h]h!]uh%hhjU ubah}(h]h]h]h]h!]uh%h)hKhjR h&hh'h]h)MKubhz)}(h':sg:`get_repeat() -> (delay, interval)`h]h)}(hjn h]h!get_repeat() -> (delay, interval)}hjp sbah}(h]h]jah]h]h!]uh%hhjl ubah}(h]h]h]h]h!]uh%h)hKhjR h&hh'h]h)MLubeh}(h]h]h]h]h!]uh%huhjO h&hh'h]h)MKubh)}(hGet the ``delay`` and ``interval`` keyboard repeat values. Refer to :func:`pygame.key.set_repeat()` for a description of these values.h](hGet the }hj sbh;)}(h ``delay``h]hdelay}hj sbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h ``interval``h]hinterval}hj sbah}(h]h]h]h]h!]uh%h:hj ubh" keyboard repeat values. Refer to }hj sbh6)}(h:func:`pygame.key.set_repeat()`h]h;)}(hj h]hpygame.key.set_repeat()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[pygame.key.set_repeatuh%h5h'h]h)MNhj ubh# for a description of these values.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)MNhjO h&hubjz)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj sbah}(h]h](jyjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)MRubah}(h]h]h]h]h!]j versionaddedj1.8uh%jyh&hh'h]h)MQhjO ubh )}(h## pygame.key.get_repeat ##h]h## pygame.key.get_repeat ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjO h&hh'h]h)MSubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAj jBj jCj jDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jWname() (in module pygame.key)pygame.key.namehNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hnameh](jg)}(h pygame.key.h]h pygame.key.}hj5 sbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj1 h&hh'h]h)MUubjy)}(hj3 h]hname}hjC sbah}(h]h](jjeh]h]h!]h#h$uh%jxhj1 h&hh'h]h)MUubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj1 h&hh'h]h)MUubeh}(h]j, ah](jjeh]h]h!]jhjhjj3 jhj3 jname()uh%j`h'h]h)MUhj. h&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`get the name of a key identifier`h]h)}(hjj h]h get the name of a key identifier}hjl sbah}(h]h]hah]h]h!]uh%hhjh ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)MWubhz)}(h':sg:`name(key, use_compat=True) -> str`h]h)}(hj h]h!name(key, use_compat=True) -> str}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)MXubeh}(h]h]h]h]h!]uh%huhjb h&hh'h]h)MWubh)}(hGet the descriptive name of the button from a keyboard button id constant. Returns an empty string (``""``) if the key is not found.h](hdGet the descriptive name of the button from a keyboard button id constant. Returns an empty string (}hj sbh;)}(h``""``h]h""}hj sbah}(h]h]h]h]h!]uh%h:hj ubh) if the key is not found.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)MZhjb h&hubh)}(hXpIf ``use_compat`` argument is ``True`` (which is the default), this function returns the legacy name of a key where applicable. The return value is expected to be the same across different pygame versions (provided the corresponding key constant exists and is unique). If the return value is passed to the ``key_code`` function, the original constant will be returned.h](hIf }hj sbh;)}(h``use_compat``h]h use_compat}hj sbah}(h]h]h]h]h!]uh%h:hj ubh argument is }hj sbh;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj ubhX  (which is the default), this function returns the legacy name of a key where applicable. The return value is expected to be the same across different pygame versions (provided the corresponding key constant exists and is unique). If the return value is passed to the }hj sbh;)}(h ``key_code``h]hkey_code}hj sbah}(h]h]h]h]h!]uh%h:hj ubh2 function, the original constant will be returned.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M]hjb h&hubh)}(h**Experimental:** ``use_compat`` parameter still in development for testing and feedback. It may change. `Please leave use_compat feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hj sbah}(h]h]h]h]h!]uh%j hj ubh }hj sbh;)}(h``use_compat``h]h use_compat}hj sbah}(h]h]h]h]h!]uh%h:hj ubhI parameter still in development for testing and feedback. It may change. }hj sbh reference)}(h]`Please leave use_compat feedback with authors `_h]h-Please leave use_compat feedback with authors}(hj, h-Please leave use_compat feedback with authorsubah}(h]h]h]h]h!]name-Please leave use_compat feedback with authorsrefuri*https://github.com/pygame/pygame/pull/3312uh%j* hj ubj)}(h- h]h}(h]-please-leave-use-compat-feedback-with-authorsah]h]-please leave use_compat feedback with authorsah]h!]refurij> uh%j referencedKhj ubeh}(h]h]h]h]h!]uh%hh'h]h)Mchjb h&hubh)}(hXIf this argument is ``False``, the returned name may be prettier to display and may cover a wider range of keys than with ``use_compat``, but there are no guarantees that this name will be the same across different pygame versions. If the name returned is passed to the ``key_code`` function, the original constant is returned back (this is an implementation detail which may change later, do not rely on this)h](hIf this argument is }hjS sbh;)}(h ``False``h]hFalse}hj[ sbah}(h]h]h]h]h!]uh%h:hjS ubh], the returned name may be prettier to display and may cover a wider range of keys than with }hjS sbh;)}(h``use_compat``h]h use_compat}hjm sbah}(h]h]h]h]h!]uh%h:hjS ubh, but there are no guarantees that this name will be the same across different pygame versions. If the name returned is passed to the }hjS sbh;)}(h ``key_code``h]hkey_code}hj sbah}(h]h]h]h]h!]uh%h:hjS ubh function, the original constant is returned back (this is an implementation detail which may change later, do not rely on this)}hjS sbeh}(h]h]h]h]h!]uh%hh'h]h)Mfhjb h&hubjz)}(hVChanged in pygame 2.1.3: Added use_compat argument and guaranteed API stability for ith]h)}(hVChanged in pygame 2.1.3: Added use_compat argument and guaranteed API stability for ith](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hj sbah}(h]h](jyj eh]h]h!]uh%hhj h&hh'h]h)MnubhAdded }(hj h&hh'Nh)Nubh;)}(h``use_compat``h]h use_compat}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh- argument and guaranteed API stability for it}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Mnubah}(h]h]h]h]h!]jversionchangedj2.1.3uh%jyh&hh'h]h)Mmhjb ubh )}(h## pygame.key.name ##h]h## pygame.key.name ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjb h&hh'h]h)Moubeh}(h]h]h]h]h!]uh%jhj. h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAj jBj jCj jDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW!key_code() (in module pygame.key)pygame.key.key_codehNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hkey_codeh](jg)}(h pygame.key.h]h pygame.key.}hjsbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj h&hh'h]h)Mqubjy)}(hjh]hkey_code}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jxhj h&hh'h]h)Mqubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mqubeh}(h]j ah](jjeh]h]h!]jhjhjjjhjj key_code()uh%j`h'h]h)Mqhj h&hubj)}(hhh](hv)}(hhh](hz)}(h,:sl:`get the key identifier from a key name`h]h)}(hj8h]h&get the key identifier from a key name}hj:sbah}(h]h]hah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Msubhz)}(h":sg:`key_code(name=string) -> int`h]h)}(hjOh]hkey_code(name=string) -> int}hjQsbah}(h]h]jah]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mtubeh}(h]h]h]h]h!]uh%huhj0h&hh'h]h)Msubh)}(hGet the key identifier code from the descriptive name of the key. This returns an integer matching one of the K_* keycodes. For example:h]hGet the key identifier code from the descriptive name of the key. This returns an integer matching one of the K_* keycodes. For example:}hjjsbah}(h]h]h]h]h!]uh%hh'h]h)Mvhj0h&hubjg)}(h>>> pygame.key.key_code("return") == pygame.K_RETURN True >>> pygame.key.key_code("0") == pygame.K_0 True >>> pygame.key.key_code("space") == pygame.K_SPACE Trueh]h>>> pygame.key.key_code("return") == pygame.K_RETURN True >>> pygame.key.key_code("0") == pygame.K_0 True >>> pygame.key.key_code("space") == pygame.K_SPACE True}hjxsbah}(h]h]h]h]h!]h#h$uh%jfh'h]h)M{hj0h&hubj )}(hhh]j )}(hhh](j )}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%j hjh'h]h)Kubj )}(hhh]h)}(h+ValueError -- if the key name is not known.h](h6)}(hhh]j )}(h ValueErrorh]h ValueError}hjsbah}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej7 reftargetjj9 j: hj; Nuh%h5hjubh -- }hjsbhif the key name is not known.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%j hjubeh}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!]uh%j hj0h&hh'Nh)Nubjz)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jyjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jyh&hh'h]h)Mhj0ubh )}(h## pygame.key.key_code ##h]h## pygame.key.key_code ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jAjjBjjCjjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW)start_text_input() (in module pygame.key)pygame.key.start_text_inputhNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hstart_text_inputh](jg)}(h pygame.key.h]h pygame.key.}hj2sbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj.h&hh'h]h)Mubjy)}(hj0h]hstart_text_input}hj@sbah}(h]h](jjeh]h]h!]h#h$uh%jxhj.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jhjhjj0jhj0jstart_text_input()uh%j`h'h]h)Mhj+h&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`start handling Unicode text input events`h]h)}(hjgh]h(start handling Unicode text input events}hjisbah}(h]h]hah]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%h)hKhjbh&hh'h]h)Mubhz)}(h :sg:`start_text_input() -> None`h]h)}(hj~h]hstart_text_input() -> None}hjsbah}(h]h]jah]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%h)hKhjbh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj_h&hh'h]h)Mubh)}(hStart receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If applicable, show the on-screen keyboard or IME editor.h](hStart receiving }hjsbh;)}(h``pygame.TEXTEDITING``h]hpygame.TEXTEDITING}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjubhB events. If applicable, show the on-screen keyboard or IME editor.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubh)}(hFor many languages, key presses will automatically generate a corresponding ``pygame.TEXTINPUT`` event. Special keys like escape or function keys, and certain key combinations will not generate ``pygame.TEXTINPUT`` events.h](hLFor many languages, key presses will automatically generate a corresponding }hjsbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjubhb event. Special keys like escape or function keys, and certain key combinations will not generate }hjsbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjubh events.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubh)}(hIn other languages, entering a single symbol may require multiple key presses, or a language-specific user interface. In this case, ``pygame.TEXTINPUT`` events are preferable to ``pygame.KEYDOWN`` events for text input.h](hIn other languages, entering a single symbol may require multiple key presses, or a language-specific user interface. In this case, }hjsbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjubh events are preferable to }hjsbh;)}(h``pygame.KEYDOWN``h]hpygame.KEYDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubh events for text input.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubh)}(hXnA ``pygame.TEXTEDITING`` event is received when an IME composition is started or changed. It contains the composition ``text``, ``length``, and editing ``start`` position within the composition (attributes ``text``, ``length``, and ``start``, respectively). When the composition is committed (or non-IME input is received), a ``pygame.TEXTINPUT`` event is generated.h](hA }hj/sbh;)}(h``pygame.TEXTEDITING``h]hpygame.TEXTEDITING}hj7sbah}(h]h]h]h]h!]uh%h:hj/ubh^ event is received when an IME composition is started or changed. It contains the composition }hj/sbh;)}(h``text``h]htext}hjIsbah}(h]h]h]h]h!]uh%h:hj/ubh, }hj/sbh;)}(h ``length``h]hlength}hj[sbah}(h]h]h]h]h!]uh%h:hj/ubh, and editing }hj/sbh;)}(h ``start``h]hstart}hjmsbah}(h]h]h]h]h!]uh%h:hj/ubh- position within the composition (attributes }hj/sbh;)}(h``text``h]htext}hjsbah}(h]h]h]h]h!]uh%h:hj/ubh, }hj/sbh;)}(h ``length``h]hlength}hjsbah}(h]h]h]h]h!]uh%h:hj/ubh, and }hj/sbh;)}(h ``start``h]hstart}hjsbah}(h]h]h]h]h!]uh%h:hj/ubhU, respectively). When the composition is committed (or non-IME input is received), a }hj/sbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hj/ubh event is generated.}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubh)}(h,Text input events handling is on by default.h]h,Text input events handling is on by default.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubjz)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jyjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jyh&hh'h]h)Mhj_ubh )}(h!## pygame.key.start_text_input ##h]h!## pygame.key.start_text_input ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj_h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj+h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAjjBjjCjjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW(stop_text_input() (in module pygame.key)pygame.key.stop_text_inputhNtauh%hdhh,h&hh'Nh)Nubj\)}(hhh](ja)}(hstop_text_inputh](jg)}(h pygame.key.h]h pygame.key.}hj1sbah}(h]h](jsjteh]h]h!]h#h$uh%jfhj-h&hh'h]h)Mubjy)}(hj/h]hstop_text_input}hj?sbah}(h]h](jjeh]h]h!]h#h$uh%jxhj-h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj-h&hh'h]h)Mubeh}(h]j(ah](jjeh]h]h!]jhjhjj/jhj/jstop_text_input()uh%j`h'h]h)Mhj*h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`stop handling Unicode text input events`h]h)}(hjfh]h'stop handling Unicode text input events}hjhsbah}(h]h]hah]h]h!]uh%hhjdubah}(h]h]h]h]h!]uh%h)hKhjah&hh'h]h)Mubhz)}(h:sg:`stop_text_input() -> None`h]h)}(hj}h]hstop_text_input() -> None}hjsbah}(h]h]jah]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%h)hKhjah&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj^h&hh'h]h)Mubh)}(hStop receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If an on-screen keyboard or IME editor was shown with ``pygame.key.start_text_input()``, hide it again.h](hStop receiving }hjsbh;)}(h``pygame.TEXTEDITING``h]hpygame.TEXTEDITING}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``pygame.TEXTINPUT``h]hpygame.TEXTINPUT}hjsbah}(h]h]h]h]h!]uh%h:hjubh? events. If an on-screen keyboard or IME editor was shown with }hjsbh;)}(h!``pygame.key.start_text_input()``h]hpygame.key.start_text_input()}hjsbah}(h]h]h]h]h!]uh%h:hjubh, hide it again.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj^h&hubh)}(h,Text input events handling is on by default.h]h,Text input events handling is on by default.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj^h&hubh)}(hTo avoid triggering the IME editor or the on-screen keyboard when the user is holding down a key during gameplay, text input should be disabled once text entry is finished, or when the user clicks outside of a text box.h]hTo avoid triggering the IME editor or the on-screen keyboard when the user is holding down a key during gameplay, text input should be disabled once text entry is finished, or when the user clicks outside of a text box.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj^h&hubjz)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jyjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jyh&hh'h]h)Mhj^ubh )}(h ## pygame.key.stop_text_input ##h]h ## pygame.key.stop_text_input ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj^h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj*h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAj4jBj5jCj5jDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jW,set_text_input_rect() (in module pygame.key)pygame.key.set_text_input_recthNtauh%hdhh,<h&hh'Nh)Nubj\)}(hhh](ja)}(hset_text_input_recth](jg)}(h pygame.key.h]h pygame.key.}hjNsbah}(h]h](jsjteh]h]h!]h#h$uh%jfhjJh&hh'h]h)Mubjy)}(hjLh]hset_text_input_rect}hj\sbah}(h]h](jjeh]h]h!]h#h$uh%jxhjJh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjJh&hh'h]h)Mubeh}(h]jEah](jjeh]h]h!]jhjhjjLjhjLjset_text_input_rect()uh%j`h'h]h)MhjGh&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`controls the position of the candidate list`h]h)}(hjh]h+controls the position of the candidate list}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj~h&hh'h]h)Mubhz)}(h':sg:`set_text_input_rect(Rect) -> None`h]h)}(hjh]h!set_text_input_rect(Rect) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj~h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj{h&hh'h]h)Mubh)}(hrThis sets the rectangle used for typing with an IME. It controls where the candidate list will open, if supported.h]hrThis sets the rectangle used for typing with an IME. It controls where the candidate list will open, if supported.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj{h&hubjz)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jyjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jyh&hh'h]h)Mhj{ubh )}(h$## pygame.key.set_text_input_rect ##h]h$## pygame.key.set_text_input_rect ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj{h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjGh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jAjjBjjCjjDjEjFjGjHjIjJuh%j[h&hhh,h'Nh)Nubh )}(h## pygame.key ##h]h## pygame.key ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-keyeh]h] pygame.keyah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjDerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(j]jaj]jvaunameids}(jjj-jjjjH jE u nametypes}(jj-jjH uh}(jh,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjjjjjYjbjWj\jjjjj{jj j j, j1 jE j? j j j)j.j(j-jEjJu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages](h system_message)}(hhh]h)}(hhh]h9Hyperlink target "key-constants-label" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypeINFOsourceh]lineK Mask`h]h)}(hjh]hfrom_surface(surface) -> Mask}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h2:sg:`from_surface(surface, threshold=127) -> Mask`h]h)}(hjh]h,from_surface(surface, threshold=127) -> Mask}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h~Creates a :class:`Mask` object from the given surface by setting all the opaque pixels and not setting the transparent pixels.h](h Creates a }hjsbh6)}(h :class:`Mask`h]h;)}(hjh]hMask}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYj9hZNh[Maskuh%h5h'h]h)Khjubhg object from the given surface by setting all the opaque pixels and not setting the transparent pixels.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hIf the surface uses a color-key, then it is used to decide which bits in the resulting mask are set. All the pixels that are **not** equal to the color-key are **set** and the pixels equal to the color-key are not set.h](h}If the surface uses a color-key, then it is used to decide which bits in the resulting mask are set. All the pixels that are }hj,sbh strong)}(h**not**h]hnot}hj6sbah}(h]h]h]h]h!]uh%j4hj,ubh equal to the color-key are }hj,sbj5)}(h**set**h]hset}hjHsbah}(h]h]h]h]h!]uh%j4hj,ubh3 and the pixels equal to the color-key are not set.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX3If a color-key is not used, then the alpha value of each pixel is used to decide which bits in the resulting mask are set. All the pixels that have an alpha value **greater than** the ``threshold`` parameter are **set** and the pixels with an alpha value less than or equal to the ``threshold`` are not set.h](hIf a color-key is not used, then the alpha value of each pixel is used to decide which bits in the resulting mask are set. All the pixels that have an alpha value }hj`sbj5)}(h**greater than**h]h greater than}hjhsbah}(h]h]h]h]h!]uh%j4hj`ubh the }hj`sbh;)}(h ``threshold``h]h threshold}hjzsbah}(h]h]h]h]h!]uh%h:hj`ubh parameter are }hj`sbj5)}(h**set**h]hset}hjsbah}(h]h]h]h]h!]uh%j4hj`ubh> and the pixels with an alpha value less than or equal to the }hj`sbh;)}(h ``threshold``h]h threshold}hjsbah}(h]h]h]h]h!]uh%h:hj`ubh are not set.}hj`sbeh}(h]h]h]h]h!]uh%hh'h]h)K#hjh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(h8surface (Surface) -- the surface to create the mask fromh](hliteral_strong)}(hsurfaceh]hsurface}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]hliteral_emphasis)}(hSurfaceh]hSurface}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj refspecific py:modulej9py:classNuh%h5hjubh)}hjsbh -- }hjsbh#the surface to create the mask from}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hthreshold (int) -- (optional) the alpha threshold (default is 127) to compare with each surface pixel's alpha value, if the surface is color-keyed this parameter is ignoredh](j)}(h thresholdh]h threshold}hj7sbah}(h]h]h]h]h!]uh%jhj3ubh (}hj3sbh6)}(hhh]j)}(hinth]hint}hjLsbah}(h]h]h]h]h!]uh%jhjIubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjNjjj9jNuh%h5hj3ubh)}hj3sbh -- }hj3sbhi(optional) the alpha threshold (default is 127) to compare with each surface pixel's alpha value, if the }(hj3h&hh'Nh)Nubh;)}(h ``surface``h]hsurface}hjpsbah}(h]h]h]h]h!]uh%h:hj3h&hh'Nh)Nubh) is color-keyed this parameter is ignored}(hj3h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h2a newly created Mask object from the given surfaceh](ha newly created }(hjh&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hjh]hMask}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYj9hZNh[Maskuh%h5h'h]h)K.hjh&hubh object from the given surface}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetMaskjjj9jNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh note)}(hQThis function is used to create the masks for :func:`pygame.sprite.collide_mask`.h]h)}(hQThis function is used to create the masks for :func:`pygame.sprite.collide_mask`.h](h.This function is used to create the masks for }hj:sbh6)}(h":func:`pygame.sprite.collide_mask`h]h;)}(hjDh]hpygame.sprite.collide_mask()}hjFsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjBubah}(h]h]h]h]h!]refdochS refdomainjPreftypefunc refexplicitrefwarnhYj9hZNh[pygame.sprite.collide_maskuh%h5h'h]h)K2hj:ubh.}hj:sbeh}(h]h]h]h]h!]uh%hh'h]h)K2hj6ubah}(h]h]h]h]h!]uh%j4h'h]h)K1hjh&hubh )}(h## pygame.mask.from_surface ##h]h## pygame.mask.from_surface ##}hjrsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K5ubeh}(h]h]h]h]h!]uh%jhj_h&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j]h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY(from_threshold() (in module pygame.mask)pygame.mask.from_thresholdhNtauh%hdhh,h&hh'Nh)Nubj^)}(hhh](jc)}(hfrom_thresholdh](ji)}(h pygame.mask.h]h pygame.mask.}hjsbah}(h]h](jujveh]h]h!]h#h$uh%jhhjh&hh'h]h)K7ubj{)}(hjh]hfrom_threshold}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jzhjh&hh'h]h)K7ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K7ubeh}(h]jah](jjeh]h]h!]jj9jhjjjj9jjfrom_threshold()uh%jbh'h]h)K7hjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`Creates a mask by thresholding Surfaces`h]h)}(hjh]h'Creates a mask by thresholding Surfaces}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K9ubhz)}(h,:sg:`from_threshold(surface, color) -> Mask`h]h)}(hjh]h&from_threshold(surface, color) -> Mask}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K:ubhz)}(hk:sg:`from_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask`h]h)}(hjh]hefrom_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K;ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K9ubh)}(hKThis is a more featureful method of getting a :class:`Mask` from a surface.h](h.This is a more featureful method of getting a }hj*sbh6)}(h :class:`Mask`h]h;)}(hj4h]hMask}hj6sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypeclass refexplicitrefwarnhYj9hZNh[Maskuh%h5h'h]h)K=hj*ubh from a surface.}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)K=hjh&hubh)}(hIf the optional ``othersurface`` is not used, all the pixels **within** the ``threshold`` of the ``color`` parameter are **set** in the resulting mask.h](hIf the optional }hj\sbh;)}(h``othersurface``h]h othersurface}hjdsbah}(h]h]h]h]h!]uh%h:hj\ubh is not used, all the pixels }hj\sbj5)}(h **within**h]hwithin}hjvsbah}(h]h]h]h]h!]uh%j4hj\ubh the }hj\sbh;)}(h ``threshold``h]h threshold}hjsbah}(h]h]h]h]h!]uh%h:hj\ubh of the }hj\sbh;)}(h ``color``h]hcolor}hjsbah}(h]h]h]h]h!]uh%h:hj\ubh parameter are }hj\sbj5)}(h**set**h]hset}hjsbah}(h]h]h]h]h!]uh%j4hj\ubh in the resulting mask.}hj\sbeh}(h]h]h]h]h!]uh%hh'h]h)K?hjh&hubh)}(hIf the optional ``othersurface`` is used, every pixel in the first surface that is **within** the ``threshold`` of the corresponding pixel in ``othersurface`` is **set** in the resulting mask.h](hIf the optional }hjsbh;)}(h``othersurface``h]h othersurface}hjsbah}(h]h]h]h]h!]uh%h:hjubh3 is used, every pixel in the first surface that is }hjsbj5)}(h **within**h]hwithin}hjsbah}(h]h]h]h]h!]uh%j4hjubh the }hjsbh;)}(h ``threshold``h]h threshold}hjsbah}(h]h]h]h]h!]uh%h:hjubh of the corresponding pixel in }hjsbh;)}(h``othersurface``h]h othersurface}hjsbah}(h]h]h]h]h!]uh%h:hjubh is }hjsbj5)}(h**set**h]hset}hjsbah}(h]h]h]h]h!]uh%j4hjubh in the resulting mask.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj2sbah}(h]h]h]h]h!]uh%jhj/h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h8surface (Surface) -- the surface to create the mask fromh](j)}(hsurfaceh]hsurface}hjMsbah}(h]h]h]h]h!]uh%jhjIubh (}hjIsbh6)}(hhh]j)}(hSurfaceh]hSurface}hjbsbah}(h]h]h]h]h!]uh%jhj_ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjdjjj9jNuh%h5hjIubh)}hjIsbh -- }hjIsbh#the surface to create the mask from}(hjIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%jhjCubj)}(hhh]h)}(hcolor (Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]]) -- color used to check if the surface's pixels are within the given threshold range, this parameter is ignored if the optional othersurface parameter is suppliedh](j)}(hcolorh]hcolor}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(htupleh]htuple}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(h(h]h(}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj*sbah}(h]h]h]h]h!]uh%jhj'ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj,jjj9jNuh%h5hjubj)}(h, h]h, }hjBsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjSsbah}(h]h]h]h]h!]uh%jhjPubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjUjjj9jNuh%h5hjubj)}(h, h]h, }hjksbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj|sbah}(h]h]h]h]h!]uh%jhjyubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj~jjj9jNuh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(h]h]h]}hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h) or h]h) or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hlisth]hlist}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(h, h]h, }hj*sbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj;sbah}(h]h]h]h]h!]uh%jhj8ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj=jjj9jNuh%h5hjubj)}(h, h]h, }hjSsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjdsbah}(h]h]h]h]h!]uh%jhjaubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjfjjj9jNuh%h5hjubj)}(h, h]h, }hj|sbah}(h]h]h]h]h!]uh%jhjubj)}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjjjj9jNuh%h5hjubj)}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%jhjubj)}(hjh]h]}hjsbah}(h]h]h]h]h!]uh%jhjubh)}hjsbh -- }hjsbhAcolor used to check if the surface's pixels are within the given }(hjh&hh'Nh)Nubh;)}(h ``threshold``h]h threshold}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh2 range, this parameter is ignored if the optional }(hjh&hh'Nh)Nubh;)}(h``othersurface``h]h othersurface}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh parameter is supplied}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjCubj)}(hhh]h)}(hthreshold (Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]]) -- (optional) the threshold range used to check the difference between two colors (default is (0, 0, 0, 255))h](j)}(h thresholdh]h threshold}hj sbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j)}(hColorh]hColor}hj$ sbah}(h]h]h]h]h!]uh%jhj! ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj& jjj9jNuh%h5hj ubj)}(h or h]h or }hj< sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hjM sbah}(h]h]h]h]h!]uh%jhjJ ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjO jjj9jNuh%h5hj ubj)}(h or h]h or }hje sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(htupleh]htuple}hjv sbah}(h]h]h]h]h!]uh%jhjs ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetjx jjj9jNuh%h5hj ubj)}(hjh]h(}hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubj)}(hjh]h[}hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj& sbah}(h]h]h]h]h!]uh%jhj# ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj( jjj9jNuh%h5hj ubj)}(hjh]h]}hj> sbah}(h]h]h]h]h!]uh%jhj ubj)}(h) or h]h) or }hjK sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hlisth]hlist}hj\ sbah}(h]h]h]h]h!]uh%jhjY ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj^ jjj9jNuh%h5hj ubj)}(hjh]h[}hjt sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(h, h]h, }hj sbah}(h]h]h]h]h!]uh%jhj ubj)}(hjh]h[}hj sbah}(h]h]h]h]h!]uh%jhj ubh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubj)}(hjh]h]}hj$ sbah}(h]h]h]h]h!]uh%jhj ubj)}(hjh]h]}hj1 sbah}(h]h]h]h]h!]uh%jhj ubh)}hj sbh -- }hj sbh[(optional) the threshold range used to check the difference between two colors (default is }(hj h&hh'Nh)Nubh;)}(h``(0, 0, 0, 255)``h]h(0, 0, 0, 255)}hjJ sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh)}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhjCubj)}(hhh]h)}(hothersurface (Surface) -- (optional) used to check whether the pixels of the first surface are within the given threshold range of the pixels from this surface (default is None)h](j)}(h othersurfaceh]h othersurface}hjo sbah}(h]h]h]h]h!]uh%jhjk ubh (}hjk sbh6)}(hhh]j)}(hSurfaceh]hSurface}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hjk ubh)}hjk sbh -- }hjk sbhV(optional) used to check whether the pixels of the first surface are within the given }(hjk h&hh'Nh)Nubh;)}(h ``threshold``h]h threshold}hj sbah}(h]h]h]h]h!]uh%h:hjk h&hh'Nh)Nubh3 range of the pixels from this surface (default is }(hjk h&hh'Nh)Nubh;)}(h``None``h]hNone}hj sbah}(h]h]h]h]h!]uh%h:hjk h&hh'Nh)Nubh)}(hjk h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjh ubah}(h]h]h]h]h!]uh%jhjCubj)}(hhh]h)}(hpalette_colors (int) -- (optional) indicates whether to use the palette colors or not, a nonzero value causes the palette colors to be used and a 0 causes them not to be used (default is 1)h](j)}(hpalette_colorsh]hpalette_colors}hj sbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetj jjj9jNuh%h5hj ubh)}hj sbh -- }hj sbh(optional) indicates whether to use the palette colors or not, a nonzero value causes the palette colors to be used and a 0 causes them not to be used (default is 1)}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhjCubeh}(h]h]h]h]h!]uh%jhj@ubah}(h]h]h]h]h!]uh%jhj/ubeh}(h]h]h]h]h!]uh%jhj,ubj)}(hhh](j)}(hReturnsh]hReturns}hj9 sbah}(h]h]h]h]h!]uh%jhj6 h'h]h)Kubj)}(hhh]h)}(h2a newly created Mask object from the given surfaceh](ha newly created }(hjJ h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hjT h]hMask}hjV sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjR ubah}(h]h]h]h]h!]refdochS refdomainj` reftypeclass refexplicitrefwarnhYj9hZNh[Maskuh%h5h'h]h)KUhjJ h&hubh object from the given surface}(hjJ h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjG ubah}(h]h]h]h]h!]uh%jhj6 ubeh}(h]h]h]h]h!]uh%jhj,ubj)}(hhh](j)}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%jhj h'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hj sbah}(h]h]h]h]h!] refdomainjw refexplicitreftypej reftargetMaskjjj9jNuh%h5hj ubah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhj,ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h ## pygame.mask.from_threshold ##h]h ## pygame.mask.from_threshold ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KXubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jwfunctioneh]h]h!]jjwjj jj jjjjjjjuh%j]h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jYMask (class in pygame.mask)pygame.mask.MaskhNtauh%hdhh,h&hh'Nh)Nubj^)}(hhh](jc)}(hMaskh](ji)}(h pygame.mask.h]h pygame.mask.}hj sbah}(h]h](jujveh]h]h!]h#h$uh%jhhj h&hh'h]h)KZubj{)}(hj h]hMask}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj h&hh'h]h)KZubeh}(h]j ah](jjeh]h]h!]jj9jhjj jj9j jj uh%jbh'h]h)KZhj h&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`pygame object for representing 2D bitmasks`h]h)}(hj$ h]h*pygame object for representing 2D bitmasks}hj& sbah}(h]h]hah]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K\ubhz)}(h(:sg:`Mask(size=(width, height)) -> Mask`h]h)}(hj; h]h"Mask(size=(width, height)) -> Mask}hj= sbah}(h]h]jah]h]h!]uh%hhj9 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K]ubhz)}(h4:sg:`Mask(size=(width, height), fill=False) -> Mask`h]h)}(hjR h]h.Mask(size=(width, height), fill=False) -> Mask}hjT sbah}(h]h]jah]h]h!]uh%hhjP ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)K\ubh)}(hA ``Mask`` object is used to represent a 2D bitmask. Each bit in the mask represents a pixel. 1 is used to indicate a set bit and 0 is used to indicate an unset bit. Set bits in a mask can be used to detect collisions with other masks and their set bits.h](hA }hjm sbh;)}(h``Mask``h]hMask}hju sbah}(h]h]h]h]h!]uh%h:hjm ubh object is used to represent a 2D bitmask. Each bit in the mask represents a pixel. 1 is used to indicate a set bit and 0 is used to indicate an unset bit. Set bits in a mask can be used to detect collisions with other masks and their set bits.}hjm sbeh}(h]h]h]h]h!]uh%hh'h]h)K`hj h&hubh)}(hXOA filled mask has all of its bits set to 1, conversely an unfilled/cleared/empty mask has all of its bits set to 0. Masks can be created unfilled (default) or filled by using the ``fill`` parameter. Masks can also be cleared or filled using the :func:`pygame.mask.Mask.clear()` and :func:`pygame.mask.Mask.fill()` methods respectively.h](hA filled mask has all of its bits set to 1, conversely an unfilled/cleared/empty mask has all of its bits set to 0. Masks can be created unfilled (default) or filled by using the }hj sbh;)}(h``fill``h]hfill}hj sbah}(h]h]h]h]h!]uh%h:hj ubh: parameter. Masks can also be cleared or filled using the }hj sbh6)}(h :func:`pygame.mask.Mask.clear()`h]h;)}(hj h]hpygame.mask.Mask.clear()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYj9hZj h[pygame.mask.Mask.clearuh%h5h'h]h)Kehj ubh and }hj sbh6)}(h:func:`pygame.mask.Mask.fill()`h]h;)}(hj h]hpygame.mask.Mask.fill()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYj9hZj h[pygame.mask.Mask.filluh%h5h'h]h)Kehj ubh methods respectively.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Kehj h&hubh)}(hA mask's coordinates start in the top left corner at ``(0, 0)`` just like :mod:`pygame.Surface`. Individual bits can be accessed using the :func:`pygame.mask.Mask.get_at()` and :func:`pygame.mask.Mask.set_at()` methods.h](h5A mask's coordinates start in the top left corner at }hj sbh;)}(h ``(0, 0)``h]h(0, 0)}hj sbah}(h]h]h]h]h!]uh%h:hj ubh just like }hj sbh6)}(h:mod:`pygame.Surface`h]h;)}(hjh]hpygame.Surface}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj9hZj h[pygame.Surfaceuh%h5h'h]h)Kkhj ubh,. Individual bits can be accessed using the }hj sbh6)}(h!:func:`pygame.mask.Mask.get_at()`h]h;)}(hj5h]hpygame.mask.Mask.get_at()}hj7sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj3ubah}(h]h]h]h]h!]refdochS refdomainjAreftypefunc refexplicitrefwarnhYj9hZj h[pygame.mask.Mask.get_atuh%h5h'h]h)Kkhj ubh and }hj sbh6)}(h!:func:`pygame.mask.Mask.set_at()`h]h;)}(hjYh]hpygame.mask.Mask.set_at()}hj[sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjWubah}(h]h]h]h]h!]refdochS refdomainjereftypefunc refexplicitrefwarnhYj9hZj h[pygame.mask.Mask.set_atuh%h5h'h]h)Kkhj ubh methods.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Kkhj h&hubh target)}(h.. _mask-offset-label:h]h}(h]h]h]h]h!]refidmask-offset-labeluh%jh)Khj h&hh'h]ubh)}(hXThe methods :meth:`overlap`, :meth:`overlap_area`, :meth:`overlap_mask`, :meth:`draw`, :meth:`erase`, and :meth:`convolve` use an offset parameter to indicate the offset of another mask's top left corner from the calling mask's top left corner. The calling mask's top left corner is considered to be the origin ``(0, 0)``. Offsets are a sequence of two values ``(x_offset, y_offset)``. Positive and negative offset values are supported.h](h The methods }hjsbh6)}(h:meth:`overlap`h]h;)}(hjh]h overlap()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj9hZj h[overlapuh%h5h'h]h)Krhjubh, }hjsbh6)}(h:meth:`overlap_area`h]h;)}(hjh]hoverlap_area()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj9hZj h[ overlap_areauh%h5h'h]h)Krhjubh, }hjsbh6)}(h:meth:`overlap_mask`h]h;)}(hjh]hoverlap_mask()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj9hZj h[ overlap_maskuh%h5h'h]h)Krhjubh, }hjsbh6)}(h :meth:`draw`h]h;)}(hjh]hdraw()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj9hZj h[drawuh%h5h'h]h)Krhjubh, }hjsbh6)}(h :meth:`erase`h]h;)}(hj)h]herase()}hj+sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj'ubah}(h]h]h]h]h!]refdochS refdomainj5reftypemeth refexplicitrefwarnhYj9hZj h[eraseuh%h5h'h]h)Krhjubh, and }hjsbh6)}(h:meth:`convolve`h]h;)}(hjMh]h convolve()}hjOsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjKubah}(h]h]h]h]h!]refdochS refdomainjYreftypemeth refexplicitrefwarnhYj9hZj h[convolveuh%h5h'h]h)Krhjubh use an offset parameter to indicate the offset of another mask's top left corner from the calling mask's top left corner. The calling mask's top left corner is considered to be the origin }hjsbh;)}(h ``(0, 0)``h]h(0, 0)}hjosbah}(h]h]h]h]h!]uh%h:hjubh'. Offsets are a sequence of two values }hjsbh;)}(h``(x_offset, y_offset)``h]h(x_offset, y_offset)}hjsbah}(h]h]h]h]h!]uh%h:hjubh4. Positive and negative offset values are supported.}hjsbeh}(h]jah]h]mask-offset-labelah]h!]uh%hh'h]h)Krhj h&hexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh literal_block)}(h 0 to x (x_offset) : : 0 ..... +----:---------+ to | : | y .......... +-----------+ (y_offset) | | othermask | | +-----------+ | calling_mask | +--------------+h]h 0 to x (x_offset) : : 0 ..... +----:---------+ to | : | y .......... +-----------+ (y_offset) | | othermask | | +-----------+ | calling_mask | +--------------+}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)K{hj h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h5size -- the dimensions of the mask (width and height)h](j)}(hsizeh]hsize}hjsbah}(h]h]h]h]h!]uh%jhjubh -- }hjsbh-the dimensions of the mask (width and height)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hXfill (bool) -- (optional) create an unfilled mask (default: False) or filled mask (True)h](j)}(hfillh]hfill}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hboolh]hbool}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjjjj9jj uh%h5hjubh)}hjsbh -- }hjsbh-(optional) create an unfilled mask (default: }(hjh&hh'Nh)Nubh;)}(h ``False``h]hFalse}hj2sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh) or filled mask (}(hjh&hh'Nh)Nubh;)}(h``True``h]hTrue}hjDsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjwsbah}(h]h]h]h]h!]uh%jhjth'h]h)Kubj)}(hhh]h)}(ha newly created Mask objecth](ha newly created }(hjh&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hjh]hMask}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Khjh&hubh object}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjtubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hjsbah}(h]h]h]h]h!] refdomainj" refexplicitreftypej reftargetMaskjjj9jj uh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubh)}(hChanged in pygame 2.0.0: Shallow copy support added. The Mask class supports the special method __copy__() and shallow copying via copy.copy(mask).h]h)}(hChanged in pygame 2.0.0: Shallow copy support added. The Mask class supports the special method __copy__() and shallow copying via copy.copy(mask).h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](hheh]h]h!]uh%hhj h&hh'h]h)Kubh Shallow copy support added. The }(hj h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hj$h]hMask}hj&sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj"ubah}(h]h]h]h]h!]refdochS refdomainj0reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Khj h&hubh# class supports the special method }(hj h&hh'Nh)Nubh;)}(h``__copy__()``h]h __copy__()}hjFsbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh and shallow copying via }(hj h&hh'Nh)Nubh;)}(h``copy.copy(mask)``h]hcopy.copy(mask)}hjXsbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]hҌversionchangedhԌ2.0.0uh%hh&hh'h]h)Khj ubh)}(h_Changed in pygame 2.0.0: Subclassing support added. The Mask class can be used as a base class.h]h)}(h_Changed in pygame 2.0.0: Subclassing support added. The Mask class can be used as a base class.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](hheh]h]h!]uh%hhj}h&hh'h]h)KubhSubclassing support added. The }(hj}h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hjh]hMask}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Khj}h&hubh# class can be used as a base class.}(hj}h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjyh&hh'h]h)Kubah}(h]h]h]h]h!]hҌversionchangedhԌ2.0.0uh%hh&hh'h]h)Khj ubh)}(h=Changed in pygame 1.9.5: Added support for keyword arguments.h]h)}(h=Changed in pygame 1.9.5: Added support for keyword arguments.h](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](hheh]h]h!]uh%hhjh&hh'h]h)Kubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]hҌversionchangedhԌ1.9.5uh%hh&hh'h]h)Khj ubh)}(hCChanged in pygame 1.9.5: Added the optional keyword parameter fill.h]h)}(hCChanged in pygame 1.9.5: Added the optional keyword parameter fill.h](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](hheh]h]h!]uh%hhjh&hh'h]h)Kubh%Added the optional keyword parameter }(hjh&hh'Nh)Nubh;)}(h``fill``h]hfill}hj sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]hҌversionchangedhԌ1.9.5uh%hh&hh'h]h)Khj ubh)}(hSChanged in pygame 1.9.5: Added support for masks with a width and/or a height of 0.h]h)}(hSChanged in pygame 1.9.5: Added support for masks with a width and/or a height of 0.h](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hj2sbah}(h]h](hheh]h]h!]uh%hhj.h&hh'h]h)Kubh:Added support for masks with a width and/or a height of 0.}(hj.h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj*h&hh'h]h)Kubah}(h]h]h]h]h!]hҌversionchangedhԌ1.9.5uh%hh&hh'h]h)Khj ubhe)}(hhh]h}(h]h]h]h]h!]entries](jY copy() (pygame.mask.Mask method)pygame.mask.Mask.copyhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hcopyh](j{)}(hjfh]hcopy}hjhsbah}(h]h](jjeh]h]h!]h#h$uh%jzhjdh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjdh&hh'h]h)Kubeh}(h]j_ah](jjeh]h]h!]jj9jj j Mask.copyjj9Maskcopyj Mask.copy()uh%jbh'h]h)Khjah&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`Returns a new copy of the mask`h]h)}(hjh]hReturns a new copy of the mask}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`copy() -> Mask`h]h)}(hjh]hcopy() -> Mask}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hja new copy of this mask, the new mask will have the same width, height, and set/unset bits as the originalh]hja new copy of this mask, the new mask will have the same width, height, and set/unset bits as the original}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hj sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetMaskjjj9jj uh%h5hj ubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubj5)}(hXIf a mask subclass needs to copy any instance specific attributes then it should override the ``__copy__()`` method. The overridden ``__copy__()`` method needs to call ``super().__copy__()`` and then copy the required data as in the following example code. :: class SubMask(pygame.mask.Mask): def __copy__(self): new_mask = super().__copy__() # Do any SubMask attribute copying here. return new_maskh](h)}(hXIf a mask subclass needs to copy any instance specific attributes then it should override the ``__copy__()`` method. The overridden ``__copy__()`` method needs to call ``super().__copy__()`` and then copy the required data as in the following example code.h](h^If a mask subclass needs to copy any instance specific attributes then it should override the }hj<sbh;)}(h``__copy__()``h]h __copy__()}hjDsbah}(h]h]h]h]h!]uh%h:hj<ubh method. The overridden }hj<sbh;)}(h``__copy__()``h]h __copy__()}hjVsbah}(h]h]h]h]h!]uh%h:hj<ubh method needs to call }hj<sbh;)}(h``super().__copy__()``h]hsuper().__copy__()}hjhsbah}(h]h]h]h]h!]uh%h:hj<ubhB and then copy the required data as in the following example code.}hj<sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj8ubj)}(hclass SubMask(pygame.mask.Mask): def __copy__(self): new_mask = super().__copy__() # Do any SubMask attribute copying here. return new_maskh]hclass SubMask(pygame.mask.Mask): def __copy__(self): new_mask = super().__copy__() # Do any SubMask attribute copying here. return new_mask}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj8ubeh}(h]h]h]h]h!]uh%j4h'h]h)Khjh&hubh)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](hheh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]hҌ versionaddedhԌ2.0.0uh%hh&hh'h]h)Khjubh )}(h## Mask.copy ##h]h## Mask.copy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjah&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjjjjjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY$get_size() (pygame.mask.Mask method)pygame.mask.Mask.get_sizehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hget_sizeh](j{)}(hjh]hget_size}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jzhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj9jj j Mask.get_sizejj9Maskget_sizejMask.get_size()uh%jbh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`Returns the size of the mask`h]h)}(hjh]hReturns the size of the mask}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h#:sg:`get_size() -> (width, height)`h]h)}(hj*h]hget_size() -> (width, height)}hj,sbah}(h]h]jah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjKsbah}(h]h]h]h]h!]uh%jhjHh'h]h)Kubj)}(hhh]h)}(h%the size of the mask, (width, height)h]h%the size of the mask, (width, height)}(hj\h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%jhjHubeh}(h]h]h]h]h!]uh%jhjEubj)}(hhh](j)}(h Return typeh]h Return type}hjysbah}(h]h]h]h]h!]uh%jhjvh'h]h)Kubj)}(hhh]h)}(htuple(int, int)h](h6)}(hhh]htuple}hjsbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargettuplejjj9jj uh%h5hjubh(}hjsbh6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetintjjj9jj uh%h5hjubh, }hjsbh6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetintjjj9jj uh%h5hjubh)}hjsbeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjvubeh}(h]h]h]h]h!]uh%jhjEubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubh )}(h## Mask.get_size ##h]h## Mask.get_size ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjjjjjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY$get_rect() (pygame.mask.Mask method)pygame.mask.Mask.get_recthNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hget_recth](j{)}(hjh]hget_rect}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jzhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj9jj j Mask.get_rectjj9Maskget_rectjMask.get_rect()uh%jbh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`Returns a Rect based on the size of the mask`h]h)}(hjCh]h,Returns a Rect based on the size of the mask}hjEsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Kubhz)}(h!:sg:`get_rect(\**kwargs) -> Rect`h]h)}(h!:sg:`get_rect(\**kwargs) -> Rect`h]hget_rect(**kwargs) -> Rect}hj\sbah}(h]h]jah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj;h&hh'h]h)Kubh)}(hXReturns a new :func:`pygame.Rect` object based on the size of this mask. The rect's default position will be ``(0, 0)`` and its default width and height will be the same as this mask's. The rect's attributes can be altered via :func:`pygame.Rect` attribute keyword arguments/values passed into this method. As an example, ``a_mask.get_rect(center=(10, 5))`` would create a :func:`pygame.Rect` based on the mask's size centered at the given position.h](hReturns a new }hjvsbh6)}(h:func:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj~ubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)KhjvubhL object based on the size of this mask. The rect's default position will be }hjvsbh;)}(h ``(0, 0)``h]h(0, 0)}hjsbah}(h]h]h]h]h!]uh%h:hjvubhl and its default width and height will be the same as this mask's. The rect's attributes can be altered via }hjvsbh6)}(h:func:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)KhjvubhL attribute keyword arguments/values passed into this method. As an example, }hjvsbh;)}(h#``a_mask.get_rect(center=(10, 5))``h]ha_mask.get_rect(center=(10, 5))}hjsbah}(h]h]h]h]h!]uh%h:hjvubh would create a }hjvsbh6)}(h:func:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)Khjvubh9 based on the mask's size centered at the given position.}hjvsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj;h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hbkwargs (dict) -- pygame.Rect() attribute keyword arguments/values that will be applied to the recth](j)}(hkwargsh]hkwargs}hj/sbah}(h]h]h]h]h!]uh%jhj+ubh (}hj+sbh6)}(hhh]j)}(hdicth]hdict}hjDsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjFjjj9jj uh%h5hj+ubh)}hj+sbh -- }hj+sbh6)}(h:func:`pygame.Rect`h]h;)}(hjgh]h pygame.Rect()}hjisbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjeubah}(h]h]h]h]h!]refdochS refdomainjsreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)Khj+h&hubhD attribute keyword arguments/values that will be applied to the rect}(hj+h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(ha new pygame.Rect() object based on the size of this mask with any pygame.Rect() attribute keyword arguments/values applied to ith](ha new }(hjh&hh'Nh)Nubh6)}(h:func:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)Khjh&hubh0 object based on the size of this mask with any }(hjh&hh'Nh)Nubh6)}(h:func:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj9hZj h[ pygame.Rectuh%h5h'h]h)Khjh&hubh1 attribute keyword arguments/values applied to it}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hRecth]h6)}(hhh]hRect}hj)sbah}(h]h]h]h]h!] refdomainjY refexplicitreftypej reftargetRectjjj9jj uh%h5hj%ubah}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj;h&hh'Nh)Nubh)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj[sbah}(h]h](hheh]h]h!]uh%hhjWubah}(h]h]h]h]h!] translatableuh%hhjSh&hh'h]h)Kubah}(h]h]h]h]h!]hҌ versionaddedhԌ2.0.0uh%hh&hh'h]h)Khj;ubh )}(h## Mask.get_rect ##h]h## Mask.get_rect ##}hjxsbah}(h]h]h]h]h!]h#h$uh%h hj;h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jYmethodeh]h]h!]jjYjjjjjjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY"get_at() (pygame.mask.Mask method)pygame.mask.Mask.get_athNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hget_ath](j{)}(hjh]hget_at}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jzhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj9jj j Mask.get_atjj9Maskget_atj Mask.get_at()uh%jbh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`Gets the bit at the given position`h]h)}(hjh]h"Gets the bit at the given position}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_at(pos) -> int`h]h)}(hjh]hget_at(pos) -> int}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj sbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h,pos -- the position of the bit to get (x, y)h](j)}(hposh]hpos}hjsbah}(h]h]h]h]h!]uh%jhjubh -- }hjsbh%the position of the bit to get (x, y)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjJsbah}(h]h]h]h]h!]uh%jhjGh'h]h)Kubj)}(hhh]h)}(h,1 if the bit is set, 0 if the bit is not seth]h,1 if the bit is set, 0 if the bit is not set}(hj[h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%jhjGubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjxsbah}(h]h]h]h]h!]uh%jhjuh'h]h)Kubj)}(hhh]h)}(hinth]h6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetintjjj9jj uh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjuubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h=IndexError -- if the position is outside of the mask's boundsh](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeexc reftargetjjjj9jj uh%h5hjubh -- }hjsbh/if the position is outside of the mask's bounds}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## Mask.get_at ##h]h## Mask.get_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjjjjjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY"set_at() (pygame.mask.Mask method)pygame.mask.Mask.set_athNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hset_ath](j{)}(hj4h]hset_at}hj6sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj2h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj2h&hh'h]h)Kubeh}(h]j-ah](jjeh]h]h!]jj9jj j Mask.set_atjj9Maskset_atj Mask.set_at()uh%jbh'h]h)Khj/h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`Sets the bit at the given position`h]h)}(hj`h]h"Sets the bit at the given position}hjbsbah}(h]h]hah]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%h)hKhj["h&hh'h]h)Kubhz)}(h:sg:`set_at(pos) -> None`h]h)}(hjwh]hset_at(pos) -> None}hjysbah}(h]h]jah]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%h)hKhj[h&hh'h]h)Kubhz)}(h":sg:`set_at(pos, value=1) -> None`h]h)}(hjh]hset_at(pos, value=1) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj[h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjXh&hh'h]h)Kubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h,pos -- the position of the bit to set (x, y)h](j)}(hposh]hpos}hjsbah}(h]h]h]h]h!]uh%jhjubh -- }hjsbh%the position of the bit to set (x, y)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h\value (int) -- any nonzero int will set the bit to 1, 0 will set the bit to 0 (default is 1)h](j)}(hvalueh]hvalue}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj jjj9jj uh%h5hjubh)}hjsbh -- }hjsbhMany nonzero int will set the bit to 1, 0 will set the bit to 0 (default is 1)}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjNsbah}(h]h]h]h]h!]uh%jhjKh'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjcsbah}(h]h]h]h]h!]uh%h:hj_h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%jhjKubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h=IndexError -- if the position is outside of the mask's boundsh](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjjj9jj uh%h5hjubh -- }hjsbh/if the position is outside of the mask's bounds}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjXh&hh'Nh)Nubh )}(h## Mask.set_at ##h]h## Mask.set_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjXh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj/h&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjj)jj)jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY#overlap() (pygame.mask.Mask method)pygame.mask.Mask.overlaphNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hoverlaph](j{)}(hj@h]hoverlap}hjBsbah}(h]h](jjeh]h]h!]h#h$uh%jzhj>h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj>h&hh'h]h)Kubeh}(h]j9ah](jjeh]h]h!]jj9jj j Mask.overlapjj9MaskoverlapjMask.overlap()uh%jbh'h]h)Khj;h&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`Returns the point of intersection`h]h)}(hjlh]h!Returns the point of intersection}hjnsbah}(h]h]hah]h]h!]uh%hhjjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)Kubhz)}(h&:sg:`overlap(other, offset) -> (x, y)`h]h)}(hjh]h overlap(other, offset) -> (x, y)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)Kubhz)}(h$:sg:`overlap(other, offset) -> None`h]h)}(hjh]hoverlap(other, offset) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjgh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjdh&hh'h]h)Kubh)}(hReturns the first point of intersection encountered between this mask and ``other``. A point of intersection is 2 overlapping set bits.h](hJReturns the first point of intersection encountered between this mask and }hjsbh;)}(h ``other``h]hother}hjsbah}(h]h]h]h]h!]uh%h:hjubh4. A point of intersection is 2 overlapping set bits.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjdh&hubh)}(hXcThe current algorithm searches the overlapping area in ``sizeof(unsigned long int) * CHAR_BIT`` bit wide column blocks (the value of ``sizeof(unsigned long int) * CHAR_BIT`` is platform dependent, for clarity it will be referred to as ``W``). Starting at the top left corner it checks bits 0 to ``W - 1`` of the first row (``(0, 0)`` to ``(W - 1, 0)``) then continues to the next row (``(0, 1)`` to ``(W - 1, 1)``). Once this entire column block is checked, it continues to the next one (``W`` to ``2 * W - 1``). This is repeated until it finds a point of intersection or the entire overlapping area is checked.h](h7The current algorithm searches the overlapping area in }hjsbh;)}(h(``sizeof(unsigned long int) * CHAR_BIT``h]h$sizeof(unsigned long int) * CHAR_BIT}hjsbah}(h]h]h]h]h!]uh%h:hjubh& bit wide column blocks (the value of }hjsbh;)}(h(``sizeof(unsigned long int) * CHAR_BIT``h]h$sizeof(unsigned long int) * CHAR_BIT}hjsbah}(h]h]h]h]h!]uh%h:hjubh> is platform dependent, for clarity it will be referred to as }hjsbh;)}(h``W``h]hW}hjsbah}(h]h]h]h]h!]uh%h:hjubh7). Starting at the top left corner it checks bits 0 to }hjsbh;)}(h ``W - 1``h]hW - 1}hjsbah}(h]h]h]h]h!]uh%h:hjubh of the first row (}hjsbh;)}(h ``(0, 0)``h]h(0, 0)}hj%sbah}(h]h]h]h]h!]uh%h:hjubh to }hjsbh;)}(h``(W - 1, 0)``h]h (W - 1, 0)}hj7sbah}(h]h]h]h]h!]uh%h:hjubh") then continues to the next row (}hjsbh;)}(h ``(0, 1)``h]h(0, 1)}hjIsbah}(h]h]h]h]h!]uh%h:hjubh to }hjsbh;)}(h``(W - 1, 1)``h]h (W - 1, 1)}hj[sbah}(h]h]h]h]h!]uh%h:hjubhK). Once this entire column block is checked, it continues to the next one (}hjsbh;)}(h``W``h]hW}hjmsbah}(h]h]h]h]h!]uh%h:hjubh to }hjsbh;)}(h ``2 * W - 1``h]h 2 * W - 1}hjsbah}(h]h]h]h]h!]uh%h:hjubhe). This is repeated until it finds a point of intersection or the entire overlapping area is checked.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjdh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h8other (Mask) -- the other mask to overlap with this maskh](j)}(hotherh]hother}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hMaskh]hMask}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjjjj9jj uh%h5hjubh)}hjsbh -- }hjsbh(the other mask to overlap with this mask}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h]offset -- the offset of other from this mask, for more details refer to the Mask offset notesh](j)}(hoffseth]hoffset}hjsbah}(h]h]h]h]h!]uh%jhjubh -- }hjsbhthe offset of }(hjh&hh'Nh)Nubh;)}(h ``other``h]hother}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh/ from this mask, for more details refer to the }(hjh&hh'Nh)Nubh6)}(h,:ref:`Mask offset notes `h]h)}(hj/h]hMask offset notes}hj1sbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj-ubah}(h]h]h]h]h!]refdochS refdomainj;reftyperef refexplicitrefwarnh[mask-offset-labeluh%h5h'h]h)Mhjh&hubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjnsbah}(h]h]h]h]h!]uh%jhjkh'h]h)Kubj)}(hhh]h)}(h0point of intersection or None if no intersectionh](hpoint of intersection or }(hjh&hh'Nh)Nubh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh if no intersection}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%jhjkubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(htuple(int, int) or NoneTypeh](h6)}(hhh]htuple}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargettuplejjj9jj uh%h5hjubh(}hjsbh6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetintjjj9jj uh%h5hjubh, }hjsbh6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetintjjj9jj uh%h5hjubh) or }hjsbh6)}(hhh]hNoneType}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hjubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjdh&hh'Nh)Nubh )}(h## Mask.overlap ##h]h## Mask.overlap ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hjdh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj;h&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjFjjFjjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY(overlap_area() (pygame.mask.Mask method)pygame.mask.Mask.overlap_areahNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(h overlap_areah](j{)}(hj]h]h overlap_area}hj_sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj[h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj[h&hh'h]h)Mubeh}(h]jVah](jjeh]h]h!]jj9jj jMask.overlap_areajj9Mask overlap_areajMask.overlap_area()uh%jbh'h]h)MhjXh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`Returns the number of overlapping set bits`h]h)}(hjh]h*Returns the number of overlapping set bits}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h,:sg:`overlap_area(other, offset) -> numbits`h]h)}(hjh]h&overlap_area(other, offset) -> numbits}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hSReturns the number of overlapping set bits between between this mask and ``other``.h](hIReturns the number of overlapping set bits between between this mask and }hjsbh;)}(h ``other``h]hother}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThis can be useful for collision detection. An approximate collision normal can be found by calculating the gradient of the overlapping area through the finite difference.h]hThis can be useful for collision detection. An approximate collision normal can be found by calculating the gradient of the overlapping area through the finite difference.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hdx = mask.overlap_area(other, (x + 1, y)) - mask.overlap_area(other, (x - 1, y)) dy = mask.overlap_area(other, (x, y + 1)) - mask.overlap_area(other, (x, y - 1))h]hdx = mask.overlap_area(other, (x + 1, y)) - mask.overlap_area(other, (x - 1, y)) dy = mask.overlap_area(other, (x, y + 1)) - mask.overlap_area(other, (x, y - 1))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h8other (Mask) -- the other mask to overlap with this maskh](j)}(hotherh]hother}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hMaskh]hMask}hj-sbah}(h]h]h]h]h!]uh%jhj*ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj/jjj9jj uh%h5hjubh)}hjsbh -- }hjsbh(the other mask to overlap with this mask}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h]offset -- the offset of other from this mask, for more details refer to the Mask offset notesh](j)}(hoffseth]hoffset}hjesbah}(h]h]h]h]h!]uh%jhjaubh -- }hjasbhthe offset of }(hjah&hh'Nh)Nubh;)}(h ``other``h]hother}hj{sbah}(h]h]h]h]h!]uh%h:hjah&hh'Nh)Nubh/ from this mask, for more details refer to the }(hjah&hh'Nh)Nubh6)}(h,:ref:`Mask offset notes `h]h)}(hjh]hMask offset notes}hjsbah}(h]h](hFstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdochS refdomainjreftyperef refexplicitrefwarnh[mask-offset-labeluh%h5h'h]h)M!hjah&hubeh}(h]h]h]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h"the number of overlapping set bitsh]h"the number of overlapping set bits}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hinth]h6)}(hhh]hint}hj sbah}(h]h]h]h]h!] refdomainjB refexplicitreftypej reftargetintjjj9jj uh%h5hj ubah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## Mask.overlap_area ##h]h## Mask.overlap_area ##}hj; sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%jhjXh&hh'Nh)Nubeh}(h]h](jBmethodeh]h]h!]jjBjjR jjR jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY(overlap_mask() (pygame.mask.Mask method)pygame.mask.Mask.overlap_maskhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(h overlap_maskh](j{)}(hji h]h overlap_mask}hjk sbah}(h]h](jjeh]h]h!]h#h$uh%jzhjg h&hh'h]h)M)ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjg h&hh'h]h)M)ubeh}(h]jb ah](jjeh]h]h!]jj9jj jMask.overlap_maskjj9Mask overlap_maskjMask.overlap_mask()uh%jbh'h]h)M)hjd h&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`Returns a mask of the overlapping set bits`h]h)}(hj h]h*Returns a mask of the overlapping set bits}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M+ubhz)}(h):sg:`overlap_mask(other, offset) -> Mask`h]h)}(hj h]h#overlap_mask(other, offset) -> Mask}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M,ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M+ubh)}(hyReturns a :class:`Mask`, the same size as this mask, containing the overlapping set bits between this mask and ``other``.h](h Returns a }hj sbh6)}(h :class:`Mask`h]h;)}(hj h]hMask}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)M.hj ubhX, the same size as this mask, containing the overlapping set bits between this mask and }hj sbh;)}(h ``other``h]hother}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M.hj h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj!sbah}(h]h]h]h]h!]uh%jhj!h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h8other (Mask) -- the other mask to overlap with this maskh](j)}(hotherh]hother}hj,!sbah}(h]h]h]h]h!]uh%jhj(!ubh (}hj(!sbh6)}(hhh]j)}(hMaskh]hMask}hjA!sbah}(h]h]h]h]h!]uh%jhj>!ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjC!jjj9jj uh%h5hj(!ubh)}hj(!sbh -- }hj(!sbh(the other mask to overlap with this mask}(hj(!h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj%!ubah}(h]h]h]h]h!]uh%jhj"!ubj)}(hhh]h)}(h]offset -- the offset of other from this mask, for more details refer to the Mask offset notesh](j)}(hoffseth]hoffset}hjy!sbah}(h]h]h]h]h!]uh%jhju!ubh -- }hju!sbhthe offset of }(hju!h&hh'Nh)Nubh;)}(h ``other``h]hother}hj!sbah}(h]h]h]h]h!]uh%h:hju!h&hh'Nh)Nubh/ from this mask, for more details refer to the }(hju!h&hh'Nh)Nubh6)}(h,:ref:`Mask offset notes `h]h)}(hj!h]hMask offset notes}hj!sbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj!ubah}(h]h]h]h]h!]refdochS refdomainj!reftyperef refexplicitrefwarnh[mask-offset-labeluh%h5h'h]h)M2hju!h&hubeh}(h]h]h]h]h!]uh%hhjr!ubah}(h]h]h]h]h!]uh%jhj"!ubeh}(h]h]h]h]h!]uh%jhj!ubah}(h]h]h]h]h!]uh%jhj!ubeh}(h]h]h]h]h!]uh%jhj !ubj)}(hhh](j)}(hReturnsh]hReturns}hj!sbah}(h]h]h]h]h!]uh%jhj!h'h]h)Kubj)}(hhh]h)}(h2a newly created Mask with the overlapping bits seth](ha newly created }(hj!h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hj!h]hMask}hj!sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj!ubah}(h]h]h]h]h!]refdochS refdomainj "reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)M5hj!h&hubh with the overlapping bits set}(hj!h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%jhj!ubeh}(h]h]h]h]h!]uh%jhj !ubj)}(hhh](j)}(h Return typeh]h Return type}hj4"sbah}(h]h]h]h]h!]uh%jhj1"h'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hjI"sbah}(h]h]h]h]h!] refdomainjV! refexplicitreftypej reftargetMaskjjj9jj uh%h5hjE"ubah}(h]h]h]h]h!]uh%hhjB"ubah}(h]h]h]h]h!]uh%jhj1"ubeh}(h]h]h]h]h!]uh%jhj !ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubh )}(h## Mask.overlap_mask ##h]h## Mask.overlap_mask ##}hjs"sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%jhjd h&hh'Nh)Nubeh}(h]h](jV!methodeh]h]h!]jjV!jj"jj"jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY fill() (pygame.mask.Mask method)pygame.mask.Mask.fillhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hfillh](j{)}(hj"h]hfill}hj"sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj"h&hh'h]h)M:ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj"h&hh'h]h)M:ubeh}(h]j"ah](jjeh]h]h!]jj9jj j Mask.filljj9Maskfillj Mask.fill()uh%jbh'h]h)M:hj"h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Sets all bits to 1`h]h)}(hj"h]hSets all bits to 1}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M<ubhz)}(h:sg:`fill() -> None`h]h)}(hj"h]hfill() -> None}hj"sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)M<ubh)}(hSets all bits in the mask to 1.h]hSets all bits in the mask to 1.}hj"sbah}(h]h]h]h]h!]uh%hh'h]h)M?hj"h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hj#sbah}(h]h]h]h]h!]uh%jhj#h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj(#sbah}(h]h]h]h]h!]uh%h:hj$#h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj!#ubah}(h]h]h]h]h!]uh%jhj#ubeh}(h]h]h]h]h!]uh%jhj #ubj)}(hhh](j)}(h Return typeh]h Return type}hjK#sbah}(h]h]h]h]h!]uh%jhjH#h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj`#sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hj\#ubah}(h]h]h]h]h!]uh%hhjY#ubah}(h]h]h]h]h!]uh%jhjH#ubeh}(h]h]h]h]h!]uh%jhj #ubeh}(h]h]h]h]h!]uh%jhj"h&hh'Nh)Nubh )}(h## Mask.fill ##h]h## Mask.fill ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)MDubeh}(h]h]h]h]h!]uh%jhj"h&hh'Nh)Nubeh}(h]h](jn#methodeh]h]h!]jjn#jj#jj#jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY!clear() (pygame.mask.Mask method)pygame.mask.Mask.clearhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hclearh](j{)}(hj#h]hclear}hj#sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj#h&hh'h]h)MFubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)MFubeh}(h]j#ah](jjeh]h]h!]jj9jj j Mask.clearjj9Maskclearj Mask.clear()uh%jbh'h]h)MFhj#h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Sets all bits to 0`h]h)}(hj#h]hSets all bits to 0}hj#sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)MHubhz)}(h:sg:`clear() -> None`h]h)}(hj#h]hclear() -> None}hj#sbah}(h]h]jah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)MIubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)MHubh)}(hSets all bits in the mask to 0.h]hSets all bits in the mask to 0.}hj$sbah}(h]h]h]h]h!]uh%hh'h]h)MKhj#h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hj+$sbah}(h]h]h]h]h!]uh%jhj($h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hj@$sbah}(h]h]h]h]h!]uh%h:hj<$h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj9$ubah}(h]h]h]h]h!]uh%jhj($ubeh}(h]h]h]h]h!]uh%jhj%$ubj)}(hhh](j)}(h Return typeh]h Return type}hjc$sbah}(h]h]h]h]h!]uh%jhj`$h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hjx$sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hjt$ubah}(h]h]h]h]h!]uh%hhjq$ubah}(h]h]h]h]h!]uh%jhj`$ubeh}(h]h]h]h]h!]uh%jhj%$ubeh}(h]h]h]h]h!]uh%jhj#h&hh'Nh)Nubh )}(h## Mask.clear ##h]h## Mask.clear ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)MPubeh}(h]h]h]h]h!]uh%jhj#h&hh'Nh)Nubeh}(h]h](j$methodeh]h]h!]jj$jj$jj$jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY"invert() (pygame.mask.Mask method)pygame.mask.Mask.inverthNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hinverth](j{)}(hj$h]hinvert}hj$sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj$h&hh'h]h)MRubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj$h&hh'h]h)MRubeh}(h]j$ah](jjeh]h]h!]jj9jj j Mask.invertjj9Maskinvertj Mask.invert()uh%jbh'h]h)MRhj$h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Flips all the bits`h]h)}(hj$h]hFlips all the bits}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)MTubhz)}(h:sg:`invert() -> None`h]h)}(hj%h]hinvert() -> None}hj%sbah}(h]h]jah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)MUubeh}(h]h]h]h]h!]uh%huhj$h&hh'h]h)MTubh)}(hiFlips all of the bits in the mask. All the set bits are cleared to 0 and all the unset bits are set to 1.h]hiFlips all of the bits in the mask. All the set bits are cleared to 0 and all the unset bits are set to 1.}hj/%sbah}(h]h]h]h]h!]uh%hh'h]h)MWhj$h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjC%sbah}(h]h]h]h]h!]uh%jhj@%h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjX%sbah}(h]h]h]h]h!]uh%h:hjT%h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjQ%ubah}(h]h]h]h]h!]uh%jhj@%ubeh}(h]h]h]h]h!]uh%jhj=%ubj)}(hhh](j)}(h Return typeh]h Return type}hj{%sbah}(h]h]h]h]h!]uh%jhjx%h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj%sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hj%ubah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%jhjx%ubeh}(h]h]h]h]h!]uh%jhj=%ubeh}(h]h]h]h]h!]uh%jhj$h&hh'Nh)Nubh )}(h## Mask.invert ##h]h## Mask.invert ##}hj%sbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)M]ubeh}(h]h]h]h]h!]uh%jhj$h&hh'Nh)Nubeh}(h]h](j%methodeh]h]h!]jj%jj%jj%jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY!scale() (pygame.mask.Mask method)pygame.mask.Mask.scalehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hscaleh](j{)}(hj%h]hscale}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj%h&hh'h]h)M_ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj%h&hh'h]h)M_ubeh}(h]j%ah](jjeh]h]h!]jj9jj j Mask.scalejj9Maskscalej Mask.scale()uh%jbh'h]h)M_hj%h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Resizes a mask`h]h)}(hj&h]hResizes a mask}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Maubhz)}(h$:sg:`scale((width, height)) -> Mask`h]h)}(hj,&h]hscale((width, height)) -> Mask}hj.&sbah}(h]h]jah]h]h!]uh%hhj*&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mbubeh}(h]h]h]h]h!]uh%huhj &h&hh'h]h)Maubh)}(hVCreates a new :class:`Mask` of the requested size with its bits scaled from this mask.h](hCreates a new }hjG&sbh6)}(h :class:`Mask`h]h;)}(hjQ&h]hMask}hjS&sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjO&ubah}(h]h]h]h]h!]refdochS refdomainj]&reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)MdhjG&ubh; of the requested size with its bits scaled from this mask.}hjG&sbeh}(h]h]h]h]h!]uh%hh'h]h)Mdhj &h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj&sbah}(h]h]h]h]h!]uh%jhj|&h'h]h)Kubj)}(hhh]h)}(h9size -- the width and height (size) of the mask to createh](j)}(hsizeh]hsize}hj&sbah}(h]h]h]h]h!]uh%jhj&ubh -- }hj&sbh1the width and height (size) of the mask to create}(hj&h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%jhj|&ubeh}(h]h]h]h]h!]uh%jhjy&ubj)}(hhh](j)}(hReturnsh]hReturns}hj&sbah}(h]h]h]h]h!]uh%jhj&h'h]h)Kubj)}(hhh]h)}(h5a new Mask object with its bits scaled from this maskh](ha new }(hj&h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hj&h]hMask}hj&sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj&ubah}(h]h]h]h]h!]refdochS refdomainj&reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Mihj&h&hubh+ object with its bits scaled from this mask}(hj&h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%jhj&ubeh}(h]h]h]h]h!]uh%jhjy&ubj)}(hhh](j)}(h Return typeh]h Return type}hj'sbah}(h]h]h]h]h!]uh%jhj'h'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hj&'sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetMaskjjj9jj uh%h5hj"'ubah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%jhj'ubeh}(h]h]h]h]h!]uh%jhjy&ubj)}(hhh](j)}(hRaisesh]hRaises}hjN'sbah}(h]h]h]h]h!]uh%jhjK'h'h]h)Kubj)}(hhh]h)}(h(ValueError -- if width < 0 or height < 0h](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hjf'sbah}(h]h]h]h]h!]uh%jhjc'ubah}(h]h]h]h]h!] refdomainj4' refexplicitreftypej reftargetjh'jjj9jj uh%h5hj_'ubh -- }hj_'sbhif }(hj_'h&hh'Nh)Nubh;)}(h ``width < 0``h]h width < 0}hj'sbah}(h]h]h]h]h!]uh%h:hj_'h&hh'Nh)Nubh or }(hj_'h&hh'Nh)Nubh;)}(h``height < 0``h]h height < 0}hj'sbah}(h]h]h]h]h!]uh%h:hj_'h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj\'ubah}(h]h]h]h]h!]uh%jhjK'ubeh}(h]h]h]h]h!]uh%jhjy&ubeh}(h]h]h]h]h!]uh%jhj &h&hh'Nh)Nubh )}(h## Mask.scale ##h]h## Mask.scale ##}hj'sbah}(h]h]h]h]h!]h#h$uh%h hj &h&hh'h]h)Mnubeh}(h]h]h]h]h!]uh%jhj%h&hh'Nh)Nubeh}(h]h](j4'methodeh]h]h!]jj4'jj'jj'jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY draw() (pygame.mask.Mask method)pygame.mask.Mask.drawhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hdrawh](j{)}(hj'h]hdraw}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj'h&hh'h]h)Mpubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj'h&hh'h]h)Mpubeh}(h]j'ah](jjeh]h]h!]jj9jj j Mask.drawjj9Maskdrawj Mask.draw()uh%jbh'h]h)Mphj'h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Draws a mask onto another`h]h)}(hj(h]hDraws a mask onto another}hj(sbah}(h]h]hah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Mrubhz)}(h!:sg:`draw(other, offset) -> None`h]h)}(hj/(h]hdraw(other, offset) -> None}hj1(sbah}(h]h]jah]h]h!]uh%hhj-(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Msubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)Mrubh)}(h`h]h)}(hj)h]hMask offset notes}hj)sbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj)ubah}(h]h]h]h]h!]refdochS refdomainj)reftyperef refexplicitrefwarnh[mask-offset-labeluh%h5h'h]h)Mxhj(h&hubeh}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%jhj(ubeh}(h]h]h]h]h!]uh%jhj~(ubah}(h]h]h]h]h!]uh%jhjm(ubeh}(h]h]h]h]h!]uh%jhjj(ubj)}(hhh](j)}(hReturnsh]hReturns}hjA)sbah}(h]h]h]h]h!]uh%jhj>)h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjV)sbah}(h]h]h]h]h!]uh%h:hjR)h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjO)ubah}(h]h]h]h]h!]uh%jhj>)ubeh}(h]h]h]h]h!]uh%jhjj(ubj)}(hhh](j)}(h Return typeh]h Return type}hjy)sbah}(h]h]h]h]h!]uh%jhjv)h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj)sbah}(h]h]h]h]h!] refdomainj( refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hj)ubah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%jhjv)ubeh}(h]h]h]h]h!]uh%jhjj(ubeh}(h]h]h]h]h!]uh%jhj(h&hh'Nh)Nubh )}(h## Mask.draw ##h]h## Mask.draw ##}hj)sbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%jhj'h&hh'Nh)Nubeh}(h]h](j(methodeh]h]h!]jj(jj)jj)jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY!erase() (pygame.mask.Mask method)pygame.mask.Mask.erasehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(heraseh](j{)}(hj)h]herase}hj)sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj)h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj)h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jj9jj j Mask.erasejj9Maskerasej Mask.erase()uh%jbh'h]h)Mhj)h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`Erases a mask from another`h]h)}(hj*h]hErases a mask from another}hj*sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj *h&hh'h]h)Mubhz)}(h":sg:`erase(other, offset) -> None`h]h)}(hj)*h]herase(other, offset) -> None}hj+*sbah}(h]h]jah]h]h!]uh%hhj'*ubah}(h]h]h]h]h!]uh%h)hKhj *h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj *h&hh'h]h)Mubh)}(h9Erases (clears) all bits set in ``other`` from this mask.h](h Erases (clears) all bits set in }hjD*sbh;)}(h ``other``h]hother}hjL*sbah}(h]h]h]h]h!]uh%h:hjD*ubh from this mask.}hjD*sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj *h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjj*sbah}(h]h]h]h]h!]uh%jhjg*h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h0other (Mask) -- the mask to erase from this maskh](j)}(hotherh]hother}hj*sbah}(h]h]h]h]h!]uh%jhj*ubh (}hj*sbh6)}(hhh]j)}(hMaskh]hMask}hj*sbah}(h]h]h]h]h!]uh%jhj*ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj*jjj9jj uh%h5hj*ubh)}hj*sbh -- }hj*sbh the mask to erase from this mask}(hj*h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj~*ubah}(h]h]h]h]h!]uh%jhj{*ubj)}(hhh]h)}(h]offset -- the offset of other from this mask, for more details refer to the Mask offset notesh](j)}(hoffseth]hoffset}hj*sbah}(h]h]h]h]h!]uh%jhj*ubh -- }hj*sbhthe offset of }(hj*h&hh'Nh)Nubh;)}(h ``other``h]hother}hj*sbah}(h]h]h]h]h!]uh%h:hj*h&hh'Nh)Nubh/ from this mask, for more details refer to the }(hj*h&hh'Nh)Nubh6)}(h,:ref:`Mask offset notes `h]h)}(hj*h]hMask offset notes}hj*sbah}(h]h](hFstdstd-refeh]h]h!]uh%hhj*ubah}(h]h]h]h]h!]refdochS refdomainj+reftyperef refexplicitrefwarnh[mask-offset-labeluh%h5h'h]h)Mhj*h&hubeh}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%jhj{*ubeh}(h]h]h]h]h!]uh%jhjx*ubah}(h]h]h]h]h!]uh%jhjg*ubeh}(h]h]h]h]h!]uh%jhjd*ubj)}(hhh](j)}(hReturnsh]hReturns}hj;+sbah}(h]h]h]h]h!]uh%jhj8+h'h]h)Kubj)}(hhh]h)}(hNoneh]h;)}(h``None``h]hNone}hjP+sbah}(h]h]h]h]h!]uh%h:hjL+h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjI+ubah}(h]h]h]h]h!]uh%jhj8+ubeh}(h]h]h]h]h!]uh%jhjd*ubj)}(hhh](j)}(h Return typeh]h Return type}hjs+sbah}(h]h]h]h]h!]uh%jhjp+h'h]h)Kubj)}(hhh]h)}(hNoneTypeh]h6)}(hhh]hNoneType}hj+sbah}(h]h]h]h]h!] refdomainj* refexplicitreftypej reftargetNoneTypejjj9jj uh%h5hj+ubah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%jhjp+ubeh}(h]h]h]h]h!]uh%jhjd*ubeh}(h]h]h]h]h!]uh%jhj *h&hh'Nh)Nubh )}(h## Mask.erase ##h]h## Mask.erase ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hj *h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj)h&hh'Nh)Nubeh}(h]h](j*methodeh]h]h!]jj*jj+jj+jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY!count() (pygame.mask.Mask method)pygame.mask.Mask.counthNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hcounth](j{)}(hj+h]hcount}hj+sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj+h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj+h&hh'h]h)Mubeh}(h]j+ah](jjeh]h]h!]jj9jj j Mask.countjj9Maskcountj Mask.count()uh%jbh'h]h)Mhj+h&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`Returns the number of set bits`h]h)}(hj ,h]hReturns the number of set bits}hj,sbah}(h]h]hah]h]h!]uh%hhj ,ubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)Mubhz)}(h:sg:`count() -> bits`h]h)}(hj#,h]hcount() -> bits}hj%,sbah}(h]h]jah]h]h!]uh%hhj!,ubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj,h&hh'h]h)Mubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjD,sbah}(h]h]h]h]h!]uh%jhjA,h'h]h)Kubj)}(hhh]h)}(h"the number of set bits in the maskh]h"the number of set bits in the mask}(hjU,h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjR,ubah}(h]h]h]h]h!]uh%jhjA,ubeh}(h]h]h]h]h!]uh%jhj>,ubj)}(hhh](j)}(h Return typeh]h Return type}hjr,sbah}(h]h]h]h]h!]uh%jhjo,h'h]h)Kubj)}(hhh]h)}(hinth]h6)}(hhh]hint}hj,sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetintjjj9jj uh%h5hj,ubah}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%jhjo,ubeh}(h]h]h]h]h!]uh%jhj>,ubeh}(h]h]h]h]h!]uh%jhj,h&hh'Nh)Nubh )}(h## Mask.count ##h]h## Mask.count ##}hj,sbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj+h&hh'Nh)Nubeh}(h]h](j,methodeh]h]h!]jj,jj,jj,jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY$centroid() (pygame.mask.Mask method)pygame.mask.Mask.centroidhNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hcentroidh](j{)}(hj,h]hcentroid}hj,sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj,h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj,h&hh'h]h)Mubeh}(h]j,ah](jjeh]h]h!]jj9jj j Mask.centroidjj9MaskcentroidjMask.centroid()uh%jbh'h]h)Mhj,h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`Returns the centroid of the set bits`h]h)}(hj -h]h$Returns the centroid of the set bits}hj-sbah}(h]h]hah]h]h!]uh%hhj -ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubhz)}(h:sg:`centroid() -> (x, y)`h]h)}(hj#-h]hcentroid() -> (x, y)}hj%-sbah}(h]h]jah]h]h!]uh%hhj!-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Mubh)}(hCFinds the centroid (the center mass of the set bits) for this mask.h]hCFinds the centroid (the center mass of the set bits) for this mask.}hj>-sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj-h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjR-sbah}(h]h]h]h]h!]uh%jhjO-h'h]h)Kubj)}(hhh]h)}(hia coordinate tuple indicating the centroid of the mask, it will return (0, 0) if the mask has no bits seth](hGa coordinate tuple indicating the centroid of the mask, it will return }(hjc-h&hh'Nh)Nubh;)}(h ``(0, 0)``h]h(0, 0)}hjk-sbah}(h]h]h]h]h!]uh%h:hjc-h&hh'Nh)Nubh if the mask has no bits set}(hjc-h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj`-ubah}(h]h]h]h]h!]uh%jhjO-ubeh}(h]h]h]h]h!]uh%jhjL-ubj)}(hhh](j)}(h Return typeh]h Return type}hj-sbah}(h]h]h]h]h!]uh%jhj-h'h]h)Kubj)}(hhh]h)}(htuple(int, int)h](h6)}(hhh]htuple}hj-sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargettuplejjj9jj uh%h5hj-ubh(}hj-sbh6)}(hhh]hint}hj-sbah}(h]h]h]h]h!] refdomainj- refexplicitreftypej reftargetintjjj9jj uh%h5hj-ubh, }hj-sbh6)}(hhh]hint}hj-sbah}(h]h]h]h]h!] refdomainj- refexplicitreftypej reftargetintjjj9jj uh%h5hj-ubh)}hj-sbeh}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%jhj-ubeh}(h]h]h]h]h!]uh%jhjL-ubeh}(h]h]h]h]h!]uh%jhj-h&hh'Nh)Nubh )}(h## Mask.centroid ##h]h## Mask.centroid ##}hj.sbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj,h&hh'Nh)Nubeh}(h]h](j-methodeh]h]h!]jj-jj.jj.jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY!angle() (pygame.mask.Mask method)pygame.mask.Mask.anglehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hangleh](j{)}(hj0.h]hangle}hj2.sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj..h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj..h&hh'h]h)Mubeh}(h]j).ah](jjeh]h]h!]jj9jj j Mask.anglejj9Maskanglej Mask.angle()uh%jbh'h]h)Mhj+.h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`Returns the orientation of the set bits`h]h)}(hj\.h]h'Returns the orientation of the set bits}hj^.sbah}(h]h]hah]h]h!]uh%hhjZ.ubah}(h]h]h]h]h!]uh%h)hKhjW.h&hh'h]h)Mubhz)}(h:sg:`angle() -> theta`h]h)}(hjs.h]hangle() -> theta}hju.sbah}(h]h]jah]h]h!]uh%hhjq.ubah}(h]h]h]h]h!]uh%h)hKhjW.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjT.h&hh'h]h)Mubh)}(hFinds the approximate orientation (from -90 to 90 degrees) of the set bits in the mask. This works best if performed on a mask with only one connected component.h]hFinds the approximate orientation (from -90 to 90 degrees) of the set bits in the mask. This works best if performed on a mask with only one connected component.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)MhjT.h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hj.sbah}(h]h]h]h]h!]uh%jhj.h'h]h)Kubj)}(hhh]h)}(h[the orientation of the set bits in the mask, it will return 0.0 if the mask has no bits seth](h [(x, y), ...]`h]h)}(hj/h]houtline() -> [(x, y), ...]}hj/sbah}(h]h]jah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mubhz)}(h':sg:`outline(every=1) -> [(x, y), ...]`h]h)}(hj/h]h!outline(every=1) -> [(x, y), ...]}hj/sbah}(h]h]jah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)Mubh)}(hReturns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner.h]hReturns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner.}hj0sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj/h&hubh)}(hThe ``every`` optional parameter skips set bits in the outline. For example, setting it to 10 would return a list of every 10th set bit in the outline.h](hThe }hj0sbh;)}(h ``every``h]hevery}hj0sbah}(h]h]h]h]h!]uh%h:hj0ubh optional parameter skips set bits in the outline. For example, setting it to 10 would return a list of every 10th set bit in the outline.}hj0sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj/h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj50sbah}(h]h]h]h]h!]uh%jhj20h'h]h)Kubj)}(hhh]h)}(haevery (int) -- (optional) indicates the number of bits to skip over in the outline (default is 1)h](j)}(heveryh]hevery}hjJ0sbah}(h]h]h]h]h!]uh%jhjF0ubh (}hjF0sbh6)}(hhh]j)}(hinth]hint}hj_0sbah}(h]h]h]h]h!]uh%jhj\0ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetja0jjj9jj uh%h5hjF0ubh)}hjF0sbh -- }hjF0sbhR(optional) indicates the number of bits to skip over in the outline (default is 1)}(hjF0h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjC0ubah}(h]h]h]h]h!]uh%jhj20ubeh}(h]h]h]h]h!]uh%jhj/0ubj)}(hhh](j)}(hReturnsh]hReturns}hj0sbah}(h]h]h]h]h!]uh%jhj0h'h]h)Kubj)}(hhh]h)}(h{a list of points outlining the first connected component encountered, an empty list is returned if the mask has no bits seth]h{a list of points outlining the first connected component encountered, an empty list is returned if the mask has no bits set}(hj0h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%jhj0ubeh}(h]h]h]h]h!]uh%jhj/0ubj)}(hhh](j)}(h Return typeh]h Return type}hj0sbah}(h]h]h]h]h!]uh%jhj0h'h]h)Kubj)}(hhh]h)}(hlist[tuple(int, int)]h](h6)}(hhh]hlist}hj0sbah}(h]h]h]h]h!] refdomainjt0 refexplicitreftypej reftargetlistjjj9jj uh%h5hj0ubh[}hj0sbh6)}(hhh]htuple}hj0sbah}(h]h]h]h]h!] refdomainjt0 refexplicitreftypej reftargettuplejjj9jj uh%h5hj0ubh(}hj0sbh6)}(hhh]hint}hj1sbah}(h]h]h]h]h!] refdomainjt0 refexplicitreftypej reftargetintjjj9jj uh%h5hj0ubh, }hj0sbh6)}(hhh]hint}hj1sbah}(h]h]h]h]h!] refdomainjt0 refexplicitreftypej reftargetintjjj9jj uh%h5hj0ubh)}hj0sbh]}hj0sbeh}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%jhj0ubeh}(h]h]h]h]h!]uh%jhj/0ubeh}(h]h]h]h]h!]uh%jhj/h&hh'Nh)Nubj5)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h]h)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h](hSee }hjT1sbh6)}(h:meth:`connected_component`h]h;)}(hj^1h]hconnected_component()}hj`1sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj\1ubah}(h]h]h]h]h!]refdochS refdomainjj1reftypemeth refexplicitrefwarnhYj9hZj h[connected_componentuh%h5h'h]h)MhjT1ubh8 for details on how a connected component is calculated.}hjT1sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjP1ubah}(h]h]h]h]h!]uh%j4h'h]h)Mhj/h&hubh )}(h## Mask.outline ##h]h## Mask.outline ##}hj1sbah}(h]h]h]h]h!]h#h$uh%h hj/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj/h&hh'Nh)Nubeh}(h]h](jt0methodeh]h]h!]jjt0jj1jj1jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY$convolve() (pygame.mask.Mask method)pygame.mask.Mask.convolvehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hconvolveh](j{)}(hj1h]hconvolve}hj1sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj1h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj1h&hh'h]h)Mubeh}(h]j1ah](jjeh]h]h!]jj9jj j Mask.convolvejj9MaskconvolvejMask.convolve()uh%jbh'h]h)Mhj1h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`Returns the convolution of this mask with another mask`h]h)}(hj1h]h6Returns the convolution of this mask with another mask}hj1sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubhz)}(h:sg:`convolve(other) -> Mask`h]h)}(hj1h]hconvolve(other) -> Mask}hj1sbah}(h]h]jah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubhz)}(h9:sg:`convolve(other, output=None, offset=(0, 0)) -> Mask`h]h)}(hj2h]h3convolve(other, output=None, offset=(0, 0)) -> Mask}hj2sbah}(h]h]jah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj1h&hh'h]h)Mubh)}(h1Convolve this mask with the given ``other`` Mask.h](h"Convolve this mask with the given }hj/2sbh;)}(h ``other``h]hother}hj72sbah}(h]h]h]h]h!]uh%h:hj/2ubh Mask.}hj/2sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj1h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjU2sbah}(h]h]h]h]h!]uh%jhjR2h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h/other (Mask) -- mask to convolve this mask withh](j)}(hotherh]hother}hjp2sbah}(h]h]h]h]h!]uh%jhjl2ubh (}hjl2sbh6)}(hhh]j)}(hMaskh]hMask}hj2sbah}(h]h]h]h]h!]uh%jhj2ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj2jjj9jj uh%h5hjl2ubh)}hjl2sbh -- }hjl2sbhmask to convolve this mask with}(hjl2h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhji2ubah}(h]h]h]h]h!]uh%jhjf2ubj)}(hhh]h)}(hIoutput (Mask or NoneType) -- (optional) mask for output (default is None)h](j)}(houtputh]houtput}hj2sbah}(h]h]h]h]h!]uh%jhj2ubh (}hj2sbh6)}(hhh]j)}(hMaskh]hMask}hj2sbah}(h]h]h]h]h!]uh%jhj2ubah}(h]h]h]h]h!] refdomainj2 refexplicitreftypej reftargetj2jjj9jj uh%h5hj2ubj)}(h or h]h or }hj2sbah}(h]h]h]h]h!]uh%jhj2ubh6)}(hhh]j)}(hNoneTypeh]hNoneType}hj2sbah}(h]h]h]h]h!]uh%jhj2ubah}(h]h]h]h]h!] refdomainj2 refexplicitreftypej reftargetj2jjj9jj uh%h5hj2ubh)}hj2sbh -- }hj2sbh'(optional) mask for output (default is }(hj2h&hh'Nh)Nubh;)}(h``None``h]hNone}hj3sbah}(h]h]h]h]h!]uh%h:hj2h&hh'Nh)Nubh)}(hj2h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%jhjf2ubj)}(hhh]h)}(hAoffset -- the offset of other from this mask, (default is (0, 0))h](j)}(hoffseth]hoffset}hjD3sbah}(h]h]h]h]h!]uh%jhj@3ubh -- }hj@3sbhthe offset of }(hj@3h&hh'Nh)Nubh;)}(h ``other``h]hother}hjZ3sbah}(h]h]h]h]h!]uh%h:hj@3h&hh'Nh)Nubh from this mask, (default is }(hj@3h&hh'Nh)Nubh;)}(h ``(0, 0)``h]h(0, 0)}hjl3sbah}(h]h]h]h]h!]uh%h:hj@3h&hh'Nh)Nubh)}(hj@3h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj=3ubah}(h]h]h]h]h!]uh%jhjf2ubeh}(h]h]h]h]h!]uh%jhjc2ubah}(h]h]h]h]h!]uh%jhjR2ubeh}(h]h]h]h]h!]uh%jhjO2ubj)}(hhh](j)}(hReturnsh]hReturns}hj3sbah}(h]h]h]h]h!]uh%jhj3h'h]h)Kubj)}(hhh]h)}(hXra Mask with the (i - offset[0], j - offset[1]) bit set, if shifting other (such that its bottom right corner is at (i, j)) causes it to overlap with this maskIf an output Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size (MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1)) is created and returned.h](h)}(ha :class:`Mask` with the ``(i - offset[0], j - offset[1])`` bit set, if shifting ``other`` (such that its bottom right corner is at ``(i, j)``) causes it to overlap with this maskh](ha }hj3sbh6)}(h :class:`Mask`h]h;)}(hj3h]hMask}hj3sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj3ubah}(h]h]h]h]h!]refdochS refdomainj3reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Mhj3ubh with the }hj3sbh;)}(h"``(i - offset[0], j - offset[1])``h]h(i - offset[0], j - offset[1])}hj3sbah}(h]h]h]h]h!]uh%h:hj3ubh bit set, if shifting }hj3sbh;)}(h ``other``h]hother}hj3sbah}(h]h]h]h]h!]uh%h:hj3ubh* (such that its bottom right corner is at }hj3sbh;)}(h ``(i, j)``h]h(i, j)}hj4sbah}(h]h]h]h]h!]uh%h:hj3ubh%) causes it to overlap with this mask}hj3sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj3h&hubh)}(hIf an ``output`` Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size ``(MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1))`` is created and returned.h](hIf an }hj4sbh;)}(h ``output``h]houtput}hj$4sbah}(h]h]h]h]h!]uh%h:hj4ubh] Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size (}hj4sbh;)}(hV``(MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1))``h]hR(MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1))}hj64sbah}(h]h]h]h]h!]uh%h:hj4ubh is created and returned.}hj4sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj3h&hubeh}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%jhj3ubeh}(h]h]h]h]h!]uh%jhjO2ubj)}(hhh](j)}(h Return typeh]h Return type}hjc4sbah}(h]h]h]h]h!]uh%jhj`4h'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hjx4sbah}(h]h]h]h]h!] refdomainj2 refexplicitreftypej reftargetMaskjjj9jj uh%h5hjt4ubah}(h]h]h]h]h!]uh%hhjq4ubah}(h]h]h]h]h!]uh%jhj`4ubeh}(h]h]h]h]h!]uh%jhjO2ubeh}(h]h]h]h]h!]uh%jhj1h&hh'Nh)Nubh )}(h## Mask.convolve ##h]h## Mask.convolve ##}hj4sbah}(h]h]h]h]h!]h#h$uh%h hj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj1h&hh'Nh)Nubeh}(h]h](j2methodeh]h]h!]jj2jj4jj4jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY/connected_component() (pygame.mask.Mask method)$pygame.mask.Mask.connected_componenthNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hconnected_componenth](j{)}(hj4h]hconnected_component}hj4sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj4h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj4h&hh'h]h)Mubeh}(h]j4ah](jjeh]h]h!]jj9jj jMask.connected_componentjj9Maskconnected_componentjMask.connected_component()uh%jbh'h]h)Mhj4h&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`Returns a mask containing a connected component`h]h)}(hj4h]h/Returns a mask containing a connected component}hj4sbah}(h]h]hah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubhz)}(h#:sg:`connected_component() -> Mask`h]h)}(hj5h]hconnected_component() -> Mask}hj5sbah}(h]h]jah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubhz)}(h&:sg:`connected_component(pos) -> Mask`h]h)}(hj*5h]h connected_component(pos) -> Mask}hj,5sbah}(h]h]jah]h]h!]uh%hhj(5ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj4h&hh'h]h)Mubh)}(hA connected component is a group (1 or more) of connected set bits (orthogonally and diagonally). The SAUF algorithm, which checks 8 point connectivity, is used to find a connected component in the mask.h]hA connected component is a group (1 or more) of connected set bits (orthogonally and diagonally). The SAUF algorithm, which checks 8 point connectivity, is used to find a connected component in the mask.}hjE5sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj4h&hubh)}(hX9By default this method will return a :class:`Mask` containing the largest connected component in the mask. Optionally, a bit coordinate can be specified and the connected component containing it will be returned. If the bit at the given location is not set, the returned :class:`Mask` will be empty (no bits set).h](h%By default this method will return a }hjS5sbh6)}(h :class:`Mask`h]h;)}(hj]5h]hMask}hj_5sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj[5ubah}(h]h]h]h]h!]refdochS refdomainji5reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)MhjS5ubh containing the largest connected component in the mask. Optionally, a bit coordinate can be specified and the connected component containing it will be returned. If the bit at the given location is not set, the returned }hjS5sbh6)}(h :class:`Mask`h]h;)}(hj5h]hMask}hj5sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj5ubah}(h]h]h]h]h!]refdochS refdomainj5reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)MhjS5ubh will be empty (no bits set).}hjS5sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj4h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj5sbah}(h]h]h]h]h!]uh%jhj5h'h]h)Kubj)}(hhh]h)}(hXpos -- (optional) selects the connected component that contains the bit at this positionh](j)}(hposh]hpos}hj5sbah}(h]h]h]h]h!]uh%jhj5ubh -- }hj5sbhQ(optional) selects the connected component that contains the bit at this position}(hj5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%jhj5ubeh}(h]h]h]h]h!]uh%jhj5ubj)}(hhh](j)}(hReturnsh]hReturns}hj5sbah}(h]h]h]h]h!]uh%jhj5h'h]h)Kubj)}(hhh]h)}(hX\a Mask object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returnedIf the pos parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the pos parameter selects an unset bit.h](h)}(ha :class:`Mask` object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returnedh](ha }hj6sbh6)}(h :class:`Mask`h]h;)}(hj6h]hMask}hj6sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj 6ubah}(h]h]h]h]h!]refdochS refdomainj6reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Mhj6ubh object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returned}hj6sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj6h&hubh)}(hIf the ``pos`` parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the ``pos`` parameter selects an unset bit.h](hIf the }hj66sbh;)}(h``pos``h]hpos}hj>6sbah}(h]h]h]h]h!]uh%h:hj66ubh parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the }hj66sbh;)}(h``pos``h]hpos}hjP6sbah}(h]h]h]h]h!]uh%h:hj66ubh parameter selects an unset bit.}hj66sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj6h&hubeh}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%jhj5ubeh}(h]h]h]h]h!]uh%jhj5ubj)}(hhh](j)}(h Return typeh]h Return type}hj}6sbah}(h]h]h]h]h!]uh%jhjz6h'h]h)Kubj)}(hhh]h)}(hMaskh]h6)}(hhh]hMask}hj6sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetMaskjjj9jj uh%h5hj6ubah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%jhjz6ubeh}(h]h]h]h]h!]uh%jhj5ubj)}(hhh](j)}(hRaisesh]hRaises}hj6sbah}(h]h]h]h]h!]uh%jhj6h'h]h)Kubj)}(hhh]h)}(hKIndexError -- if the optional pos parameter is outside of the mask's boundsh](h6)}(hhh]j)}(h IndexErrorh]h IndexError}hj6sbah}(h]h]h]h]h!]uh%jhj6ubah}(h]h]h]h]h!] refdomainj6 refexplicitreftypej reftargetj6jjj9jj uh%h5hj6ubh -- }hj6sbhif the optional }(hj6h&hh'Nh)Nubh;)}(h``pos``h]hpos}hj6sbah}(h]h]h]h]h!]uh%h:hj6h&hh'Nh)Nubh* parameter is outside of the mask's bounds}(hj6h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%jhj6ubeh}(h]h]h]h]h!]uh%jhj5ubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubh )}(h## Mask.connected_component ##h]h## Mask.connected_component ##}hj7sbah}(h]h]h]h]h!]h#h$uh%h hj4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubeh}(h]h](j6methodeh]h]h!]jj6jj37jj37jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY0connected_components() (pygame.mask.Mask method)%pygame.mask.Mask.connected_componentshNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hconnected_componentsh](j{)}(hjJ7h]hconnected_components}hjL7sbah}(h]h](jjeh]h]h!]h#h$uh%jzhjH7h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjH7h&hh'h]h)Mubeh}(h]jC7ah](jjeh]h]h!]jj9jj jMask.connected_componentsjj9Maskconnected_componentsjMask.connected_components()uh%jbh'h]h)MhjE7h&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`Returns a list of masks of connected components`h]h)}(hjv7h]h/Returns a list of masks of connected components}hjx7sbah}(h]h]hah]h]h!]uh%hhjt7ubah}(h]h]h]h]h!]uh%h)hKhjq7h&hh'h]h)Mubhz)}(h+:sg:`connected_components() -> [Mask, ...]`h]h)}(hj7h]h%connected_components() -> [Mask, ...]}hj7sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjq7h&hh'h]h)Mubhz)}(h4:sg:`connected_components(minimum=0) -> [Mask, ...]`h]h)}(hj7h]h.connected_components(minimum=0) -> [Mask, ...]}hj7sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjq7h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjn7h&hh'h]h)Mubh)}(hOProvides a list containing a :class:`Mask` object for each connected component.h](hProvides a list containing a }hj7sbh6)}(h :class:`Mask`h]h;)}(hj7h]hMask}hj7sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj7ubah}(h]h]h]h]h!]refdochS refdomainj7reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Mhj7ubh% object for each connected component.}hj7sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjn7h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj7sbah}(h]h]h]h]h!]uh%jhj7h'h]h)Kubj)}(hhh]h)}(hminimum (int) -- (optional) indicates the minimum number of bits (to filter out noise) per connected component (default is 0, which equates to no minimum and is equivalent to setting it to 1, as a connected component must have at least 1 bit set)h](j)}(hminimumh]hminimum}hj 8sbah}(h]h]h]h]h!]uh%jhj8ubh (}hj8sbh6)}(hhh]j)}(hinth]hint}hj!8sbah}(h]h]h]h]h!]uh%jhj8ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj#8jjj9jj uh%h5hj8ubh)}hj8sbh -- }hj8sbh(optional) indicates the minimum number of bits (to filter out noise) per connected component (default is 0, which equates to no minimum and is equivalent to setting it to 1, as a connected component must have at least 1 bit set)}(hj8h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%jhj7ubeh}(h]h]h]h]h!]uh%jhj7ubj)}(hhh](j)}(hReturnsh]hReturns}hj[8sbah}(h]h]h]h]h!]uh%jhjX8h'h]h)Kubj)}(hhh]h)}(hsa list containing a Mask object for each connected component, an empty list is returned if the mask has no bits seth](ha list containing a }(hjl8h&hh'Nh)Nubh6)}(h :class:`Mask`h]h;)}(hjv8h]hMask}hjx8sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjt8ubah}(h]h]h]h]h!]refdochS refdomainj8reftypeclass refexplicitrefwarnhYj9hZj h[Maskuh%h5h'h]h)Mhjl8h&hubh[ object for each connected component, an empty list is returned if the mask has no bits set}(hjl8h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhji8ubah}(h]h]h]h]h!]uh%jhjX8ubeh}(h]h]h]h]h!]uh%jhj7ubj)}(hhh](j)}(h Return typeh]h Return type}hj8sbah}(h]h]h]h]h!]uh%jhj8h'h]h)Kubj)}(hhh]h)}(h list[Mask]h](h6)}(hhh]hlist}hj8sbah}(h]h]h]h]h!] refdomainj68 refexplicitreftypej reftargetlistjjj9jj uh%h5hj8ubh[}hj8sbh6)}(hhh]hMask}hj8sbah}(h]h]h]h]h!] refdomainj68 refexplicitreftypej reftargetMaskjjj9jj uh%h5hj8ubh]}hj8sbeh}(h]h]h]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%jhj8ubeh}(h]h]h]h]h!]uh%jhj7ubeh}(h]h]h]h]h!]uh%jhjn7h&hh'Nh)Nubj5)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h]h)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h](hSee }hj 9sbh6)}(h:meth:`connected_component`h]h;)}(hj9h]hconnected_component()}hj9sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj9ubah}(h]h]h]h]h!]refdochS refdomainj 9reftypemeth refexplicitrefwarnhYj9hZj h[connected_componentuh%h5h'h]h)M#hj 9ubh8 for details on how a connected component is calculated.}hj 9sbeh}(h]h]h]h]h!]uh%hh'h]h)M#hj9ubah}(h]h]h]h]h!]uh%j4h'h]h)M"hjn7h&hubh )}(h## Mask.connected_components ##h]h## Mask.connected_components ##}hjB9sbah}(h]h]h]h]h!]h#h$uh%h hjn7h&hh'h]h)M&ubeh}(h]h]h]h]h!]uh%jhjE7h&hh'Nh)Nubeh}(h]h](j68methodeh]h]h!]jj68jjY9jjY9jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY.get_bounding_rects() (pygame.mask.Mask method)#pygame.mask.Mask.get_bounding_rectshNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(hget_bounding_rectsh](j{)}(hjp9h]hget_bounding_rects}hjr9sbah}(h]h](jjeh]h]h!]h#h$uh%jzhjn9h&hh'h]h)M(ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjn9h&hh'h]h)M(ubeh}(h]ji9ah](jjeh]h]h!]jj9jj jMask.get_bounding_rectsjj9Maskget_bounding_rectsjMask.get_bounding_rects()uh%jbh'h]h)M(hjk9h&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`Returns a list of bounding rects of connected components`h]h)}(hj9h]h8Returns a list of bounding rects of connected components}hj9sbah}(h]h]hah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)M*ubhz)}(h):sg:`get_bounding_rects() -> [Rect, ...]`h]h)}(hj9h]h#get_bounding_rects() -> [Rect, ...]}hj9sbah}(h]h]jah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%huhj9h&hh'h]h)M*ubh)}(hHProvides a list containing a bounding rect for each connected component.h]hHProvides a list containing a bounding rect for each connected component.}hj9sbah}(h]h]h]h]h!]uh%hh'h]h)M-hj9h&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hj9sbah}(h]h]h]h]h!]uh%jhj9h'h]h)Kubj)}(hhh]h)}(hua list containing a bounding rect for each connected component, an empty list is returned if the mask has no bits seth]hua list containing a bounding rect for each connected component, an empty list is returned if the mask has no bits set}(hj9h&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%jhj9ubeh}(h]h]h]h]h!]uh%jhj9ubj)}(hhh](j)}(h Return typeh]h Return type}hj:sbah}(h]h]h]h]h!]uh%jhj :h'h]h)Kubj)}(hhh]h)}(h list[Rect]h](h6)}(hhh]hlist}hj%:sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetlistjjj9jj uh%h5hj!:ubh[}hj!:sbh6)}(hhh]hRect}hj<:sbah}(h]h]h]h]h!] refdomainj3: refexplicitreftypej reftargetRectjjj9jj uh%h5hj!:ubh]}hj!:sbeh}(h]h]h]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%jhj :ubeh}(h]h]h]h]h!]uh%jhj9ubeh}(h]h]h]h]h!]uh%jhj9h&hh'Nh)Nubj5)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h]h)}(hWSee :meth:`connected_component` for details on how a connected component is calculated.h](hSee }hjn:sbh6)}(h:meth:`connected_component`h]h;)}(hjx:h]hconnected_component()}hjz:sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjv:ubah}(h]h]h]h]h!]refdochS refdomainj:reftypemeth refexplicitrefwarnhYj9hZj h[connected_componentuh%h5h'h]h)M4hjn:ubh8 for details on how a connected component is calculated.}hjn:sbeh}(h]h]h]h]h!]uh%hh'h]h)M4hjj:ubah}(h]h]h]h]h!]uh%j4h'h]h)M3hj9h&hubh )}(h## Mask.get_bounding_rects ##h]h## Mask.get_bounding_rects ##}hj:sbah}(h]h]h]h]h!]h#h$uh%h hj9h&hh'h]h)M7ubeh}(h]h]h]h]h!]uh%jhjk9h&hh'Nh)Nubeh}(h]h](j3:methodeh]h]h!]jj3:jj:jj:jjjjjjjuh%j]h&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jY&to_surface() (pygame.mask.Mask method)pygame.mask.Mask.to_surfacehNtauh%hdhj h&hh'Nh)Nubj^)}(hhh](jc)}(h to_surfaceh](j{)}(hj:h]h to_surface}hj:sbah}(h]h](jjeh]h]h!]h#h$uh%jzhj:h&hh'h]h)M9ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj:h&hh'h]h)M9ubeh}(h]j:ah](jjeh]h]h!]jj9jj jMask.to_surfacejj9Mask to_surfacejMask.to_surface()uh%jbh'h]h)M9hj:h&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`Returns a surface with the mask drawn on it`h]h)}(hj;h]h+Returns a surface with the mask drawn on it}hj;sbah}(h]h]hah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)M;ubhz)}(h:sg:`to_surface() -> Surface`h]h)}(hj;h]hto_surface() -> Surface}hj;sbah}(h]h]jah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)M<ubhz)}(h:sg:`to_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface`h]h)}(hj.;h]hto_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface}hj0;sbah}(h]h]jah]h]h!]uh%hhj,;ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%huhj:h&hh'h]h)M;ubh)}(hzDraws this mask on the given surface. Set bits (bits set to 1) and unset bits (bits set to 0) can be drawn onto a surface.h]hzDraws this mask on the given surface. Set bits (bits set to 1) and unset bits (bits set to 0) can be drawn onto a surface.}hjI;sbah}(h]h]h]h]h!]uh%hh'h]h)M?hj:h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj];sbah}(h]h]h]h]h!]uh%jhjZ;h'h]h)Kubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hXsurface (Surface or None) -- (optional) Surface to draw mask onto, if no surface is provided one will be created (default is None, which will cause a surface with the parameters Surface(size=mask.get_size(), flags=SRCALPHA, depth=32) to be created, drawn on, and returned)h](j)}(hsurfaceh]hsurface}hjx;sbah}(h]h]h]h]h!]uh%jhjt;ubh (}hjt;sbh6)}(hhh]j)}(hSurfaceh]hSurface}hj;sbah}(h]h]h]h]h!]uh%jhj;ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj;jjj9jj uh%h5hjt;ubj)}(h or h]h or }hj;sbah}(h]h]h]h]h!]uh%jhjt;ubh6)}(hhh]j)}(hNoneh]hNone}hj;sbah}(h]h]h]h]h!]uh%jhj;ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj;jjj9jj uh%h5hjt;ubh)}hjt;sbh -- }hjt;sbh`(optional) Surface to draw mask onto, if no surface is provided one will be created (default is }(hjt;h&hh'Nh)Nubh;)}(h``None``h]hNone}hj;sbah}(h]h]h]h]h!]uh%h:hjt;h&hh'Nh)Nubh1, which will cause a surface with the parameters }(hjt;h&hh'Nh)Nubh;)}(h;``Surface(size=mask.get_size(), flags=SRCALPHA, depth=32)``h]h7Surface(size=mask.get_size(), flags=SRCALPHA, depth=32)}hj;sbah}(h]h]h]h]h!]uh%h:hjt;h&hh'Nh)Nubh' to be created, drawn on, and returned)}(hjt;h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjq;ubah}(h]h]h]h]h!]uh%jhjn;ubj)}(hhh]h)}(hsetsurface (Surface or None) -- (optional) use this surface's color values to draw set bits (default is None), if this surface is smaller than the mask any bits outside its bounds will use the setcolor valueh](j)}(h setsurfaceh]h setsurface}hj<sbah}(h]h]h]h]h!]uh%jhj<ubh (}hj<sbh6)}(hhh]j)}(hSurfaceh]hSurface}hj'<sbah}(h]h]h]h]h!]uh%jhj$<ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj)<jjj9jj uh%h5hj<ubj)}(h or h]h or }hj?<sbah}(h]h]h]h]h!]uh%jhj<ubh6)}(hhh]j)}(hNoneh]hNone}hjP<sbah}(h]h]h]h]h!]uh%jhjM<ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjR<jjj9jj uh%h5hj<ubh)}hj<sbh -- }hj<sbhH(optional) use this surface's color values to draw set bits (default is }(hj<h&hh'Nh)Nubh;)}(h``None``h]hNone}hjt<sbah}(h]h]h]h]h!]uh%h:hj<h&hh'Nh)NubhU), if this surface is smaller than the mask any bits outside its bounds will use the }(hj<h&hh'Nh)Nubh;)}(h ``setcolor``h]hsetcolor}hj<sbah}(h]h]h]h]h!]uh%h:hj<h&hh'Nh)Nubh value}(hj<h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj <ubah}(h]h]h]h]h!]uh%jhjn;ubj)}(hhh]h)}(hunsetsurface (Surface or None) -- (optional) use this surface's color values to draw unset bits (default is None), if this surface is smaller than the mask any bits outside its bounds will use the unsetcolor valueh](j)}(h unsetsurfaceh]h unsetsurface}hj<sbah}(h]h]h]h]h!]uh%jhj<ubh (}hj<sbh6)}(hhh]j)}(hSurfaceh]hSurface}hj<sbah}(h]h]h]h]h!]uh%jhj<ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj<jjj9jj uh%h5hj<ubj)}(h or h]h or }hj<sbah}(h]h]h]h]h!]uh%jhj<ubh6)}(hhh]j)}(hNoneh]hNone}hj<sbah}(h]h]h]h]h!]uh%jhj<ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj<jjj9jj uh%h5hj<ubh)}hj<sbh -- }hj<sbhJ(optional) use this surface's color values to draw unset bits (default is }(hj<h&hh'Nh)Nubh;)}(h``None``h]hNone}hj =sbah}(h]h]h]h]h!]uh%h:hj<h&hh'Nh)NubhU), if this surface is smaller than the mask any bits outside its bounds will use the }(hj<h&hh'Nh)Nubh;)}(h``unsetcolor``h]h unsetcolor}hj=sbah}(h]h]h]h]h!]uh%h:hj<h&hh'Nh)Nubh value}(hj<h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%jhjn;ubj)}(hhh]h)}(hX%setcolor (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None) -- (optional) color to draw set bits (default is (255, 255, 255, 255), white), use None to skip drawing the set bits, the setsurface parameter (if set) will takes precedence over this parameterh](j)}(hsetcolorh]hsetcolor}hjD=sbah}(h]h]h]h]h!]uh%jhj@=ubh (}hj@=sbh6)}(hhh]j)}(hColorh]hColor}hjY=sbah}(h]h]h]h]h!]uh%jhjV=ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj[=jjj9jj uh%h5hj@=ubj)}(h or h]h or }hjq=sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hstrh]hstr}hj=sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj=jjj9jj uh%h5hj@=ubj)}(h or h]h or }hj=sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj=sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj=jjj9jj uh%h5hj@=ubj)}(h or h]h or }hj=sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(htupleh]htuple}hj=sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj=jjj9jj uh%h5hj@=ubj)}(hjh]h(}hj=sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj=sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj=jjj9jj uh%h5hj@=ubj)}(h, h]h, }hj>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj%>sbah}(h]h]h]h]h!]uh%jhj">ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj'>jjj9jj uh%h5hj@=ubj)}(h, h]h, }hj=>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hjN>sbah}(h]h]h]h]h!]uh%jhjK>ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjP>jjj9jj uh%h5hj@=ubj)}(h, h]h, }hjf>sbah}(h]h]h]h]h!]uh%jhj@=ubj)}(hjh]h[}hjt>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj>sbah}(h]h]h]h]h!]uh%jhj>ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj>jjj9jj uh%h5hj@=ubj)}(hjh]h]}hj>sbah}(h]h]h]h]h!]uh%jhj@=ubj)}(h) or h]h) or }hj>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hlisth]hlist}hj>sbah}(h]h]h]h]h!]uh%jhj>ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj>jjj9jj uh%h5hj@=ubj)}(hjh]h(}hj>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj>sbah}(h]h]h]h]h!]uh%jhj>ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj>jjj9jj uh%h5hj@=ubj)}(h, h]h, }hj>sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj ?sbah}(h]h]h]h]h!]uh%jhj?ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj ?jjj9jj uh%h5hj@=ubj)}(h, h]h, }hj#?sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hj4?sbah}(h]h]h]h]h!]uh%jhj1?ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj6?jjj9jj uh%h5hj@=ubj)}(h, h]h, }hjL?sbah}(h]h]h]h]h!]uh%jhj@=ubj)}(hjh]h[}hjZ?sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hinth]hint}hjj?sbah}(h]h]h]h]h!]uh%jhjg?ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjl?jjj9jj uh%h5hj@=ubj)}(hjh]h]}hj?sbah}(h]h]h]h]h!]uh%jhj@=ubj)}(h) or h]h) or }hj?sbah}(h]h]h]h]h!]uh%jhj@=ubh6)}(hhh]j)}(hNoneh]hNone}hj?sbah}(h]h]h]h]h!]uh%jhj?ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj?jjj9jj uh%h5hj@=ubh)}hj@=sbh -- }hj@=sbh.(optional) color to draw set bits (default is }(hj@=h&hh'Nh)Nubh;)}(h``(255, 255, 255, 255)``h]h(255, 255, 255, 255)}hj?sbah}(h]h]h]h]h!]uh%h:hj@=h&hh'Nh)Nubh, white), use }(hj@=h&hh'Nh)Nubh;)}(h``None``h]hNone}hj?sbah}(h]h]h]h]h!]uh%h:hj@=h&hh'Nh)Nubh# to skip drawing the set bits, the }(hj@=h&hh'Nh)Nubh;)}(h``setsurface``h]h setsurface}hj?sbah}(h]h]h]h]h!]uh%h:hj@=h&hh'Nh)Nubh= parameter (if set) will takes precedence over this parameter}(hj@=h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj==ubah}(h]h]h]h]h!]uh%jhjn;ubj)}(hhh]h)}(hX'unsetcolor (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None) -- (optional) color to draw unset bits (default is (0, 0, 0, 255), black), use None to skip drawing the unset bits, the unsetsurface parameter (if set) will takes precedence over this parameterh](j)}(h unsetcolorh]h unsetcolor}hj @sbah}(h]h]h]h]h!]uh%jhj @ubh (}hj @sbh6)}(hhh]j)}(hColorh]hColor}hj"@sbah}(h]h]h]h]h!]uh%jhj@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj$@jjj9jj uh%h5hj @ubj)}(h or h]h or }hj:@sbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hstrh]hstr}hjK@sbah}(h]h]h]h]h!]uh%jhjH@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjM@jjj9jj uh%h5hj @ubj)}(h or h]h or }hjc@sbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjt@sbah}(h]h]h]h]h!]uh%jhjq@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjv@jjj9jj uh%h5hj @ubj)}(h or h]h or }hj@sbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(htupleh]htuple}hj@sbah}(h]h]h]h]h!]uh%jhj@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj@jjj9jj uh%h5hj @ubj)}(hjh]h(}hj@sbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%jhj@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj@jjj9jj uh%h5hj @ubj)}(h, h]h, }hj@sbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hj@sbah}(h]h]h]h]h!]uh%jhj@ubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj@jjj9jj uh%h5hj @ubj)}(h, h]h, }hjAsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjAjjj9jj uh%h5hj @ubj)}(h, h]h, }hj/Asbah}(h]h]h]h]h!]uh%jhj @ubj)}(hjh]h[}hj=Asbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjMAsbah}(h]h]h]h]h!]uh%jhjJAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjOAjjj9jj uh%h5hj @ubj)}(hjh]h]}hjeAsbah}(h]h]h]h]h!]uh%jhj @ubj)}(h) or h]h) or }hjrAsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hlisth]hlist}hjAsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjAjjj9jj uh%h5hj @ubj)}(hjh]h(}hjAsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjAjjj9jj uh%h5hj @ubj)}(h, h]h, }hjAsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjAjjj9jj uh%h5hj @ubj)}(h, h]h, }hjAsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hjAsbah}(h]h]h]h]h!]uh%jhjAubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjAjjj9jj uh%h5hj @ubj)}(h, h]h, }hjBsbah}(h]h]h]h]h!]uh%jhj @ubj)}(hjh]h[}hj#Bsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hinth]hint}hj3Bsbah}(h]h]h]h]h!]uh%jhj0Bubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj5Bjjj9jj uh%h5hj @ubj)}(hjh]h]}hjKBsbah}(h]h]h]h]h!]uh%jhj @ubj)}(h) or h]h) or }hjXBsbah}(h]h]h]h]h!]uh%jhj @ubh6)}(hhh]j)}(hNoneh]hNone}hjiBsbah}(h]h]h]h]h!]uh%jhjfBubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjkBjjj9jj uh%h5hj @ubh)}hj @sbh -- }hj @sbh0(optional) color to draw unset bits (default is }(hj @h&hh'Nh)Nubh;)}(h``(0, 0, 0, 255)``h]h(0, 0, 0, 255)}hjBsbah}(h]h]h]h]h!]uh%h:hj @h&hh'Nh)Nubh, black), use }(hj @h&hh'Nh)Nubh;)}(h``None``h]hNone}hjBsbah}(h]h]h]h]h!]uh%h:hj @h&hh'Nh)Nubh% to skip drawing the unset bits, the }(hj @h&hh'Nh)Nubh;)}(h``unsetsurface``h]h unsetsurface}hjBsbah}(h]h]h]h]h!]uh%h:hj @h&hh'Nh)Nubh= parameter (if set) will takes precedence over this parameter}(hj @h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%jhjn;ubj)}(hhh]h)}(hXdest (Rect or tuple(int, int) or list(int, int) or Vector2(int, int)) -- (optional) surface destination of where to position the topleft corner of the mask being drawn (default is (0, 0)), if a Rect is used as the dest parameter, its x and y attributes will be used as the destination, NOTE1: rects with a negative width or height value will not be normalized before using their x and y values, NOTE2: this destination value is only used to position the mask on the surface, it does not offset the setsurface and unsetsurface from the mask, they are always aligned with the mask (i.e. position (0, 0) on the mask always corresponds to position (0, 0) on the setsurface and unsetsurface)h](j)}(hdesth]hdest}hjBsbah}(h]h]h]h]h!]uh%jhjBubh (}hjBsbh6)}(hhh]j)}(hRecth]hRect}hjBsbah}(h]h]h]h]h!]uh%jhjBubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjBjjj9jj uh%h5hjBubj)}(h or h]h or }hjCsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(htupleh]htuple}hjCsbah}(h]h]h]h]h!]uh%jhjCubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjCjjj9jj uh%h5hjBubj)}(hjh]h(}hj,Csbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hjCjjj9jj uh%h5hjBubj)}(h, h]h, }hjTCsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hjeCsbah}(h]h]h]h]h!]uh%jhjbCubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjgCjjj9jj uh%h5hjBubj)}(h) or h]h) or }hj}Csbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hlisth]hlist}hjCsbah}(h]h]h]h]h!]uh%jhjCubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjCjjj9jj uh%h5hjBubj)}(hjh]h(}hjCsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hjCsbah}(h]h]h]h]h!]uh%jhjCubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjCjjj9jj uh%h5hjBubj)}(h, h]h, }hjCsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hjCsbah}(h]h]h]h]h!]uh%jhjCubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjCjjj9jj uh%h5hjBubj)}(h) or h]h) or }hjCsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hVector2h]hVector2}hjDsbah}(h]h]h]h]h!]uh%jhjDubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj Djjj9jj uh%h5hjBubj)}(hjh]h(}hj Dsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hj0Dsbah}(h]h]h]h]h!]uh%jhj-Dubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj2Djjj9jj uh%h5hjBubj)}(h, h]h, }hjHDsbah}(h]h]h]h]h!]uh%jhjBubh6)}(hhh]j)}(hinth]hint}hjYDsbah}(h]h]h]h]h!]uh%jhjVDubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetj[Djjj9jj uh%h5hjBubj)}(h)h]h)}hjqDsbah}(h]h]h]h]h!]uh%jhjBubh)}hjBsbh -- }hjBsbhk(optional) surface destination of where to position the topleft corner of the mask being drawn (default is }(hjBh&hh'Nh)Nubh;)}(h ``(0, 0)``h]h(0, 0)}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh), if a Rect is used as the }(hjBh&hh'Nh)Nubh;)}(h``dest``h]hdest}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh parameter, its }(hjBh&hh'Nh)Nubh;)}(h``x``h]hx}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh and }(hjBh&hh'Nh)Nubh;)}(h``y``h]hy}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh- attributes will be used as the destination, }(hjBh&hh'Nh)Nubj5)}(h **NOTE1:**h]hNOTE1:}hjDsbah}(h]h]h]h]h!]uh%j4hjBh&hh'Nh)NubhW rects with a negative width or height value will not be normalized before using their }(hjBh&hh'Nh)Nubh;)}(h``x``h]hx}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh and }(hjBh&hh'Nh)Nubh;)}(h``y``h]hy}hjDsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh values, }(hjBh&hh'Nh)Nubj5)}(h **NOTE2:**h]hNOTE2:}hj Esbah}(h]h]h]h]h!]uh%j4hjBh&hh'Nh)Nubha this destination value is only used to position the mask on the surface, it does not offset the }(hjBh&hh'Nh)Nubh;)}(h``setsurface``h]h setsurface}hjEsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh and }(hjBh&hh'Nh)Nubh;)}(h``unsetsurface``h]h unsetsurface}hj-Esbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)NubhE from the mask, they are always aligned with the mask (i.e. position }(hjBh&hh'Nh)Nubh;)}(h ``(0, 0)``h]h(0, 0)}hj?Esbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh, on the mask always corresponds to position }(hjBh&hh'Nh)Nubh;)}(h ``(0, 0)``h]h(0, 0)}hjQEsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh on the }(hjBh&hh'Nh)Nubh;)}(h``setsurface``h]h setsurface}hjcEsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh and }(hjBh&hh'Nh)Nubh;)}(h``unsetsurface``h]h unsetsurface}hjuEsbah}(h]h]h]h]h!]uh%h:hjBh&hh'Nh)Nubh)}(hjBh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%jhjn;ubeh}(h]h]h]h]h!]uh%jhjk;ubah}(h]h]h]h]h!]uh%jhjZ;ubeh}(h]h]h]h]h!]uh%jhjW;ubj)}(hhh](j)}(hReturnsh]hReturns}hjEsbah}(h]h]h]h]h!]uh%jhjEh'h]h)Kubj)}(hhh]h)}(hrthe surface parameter (or a newly created surface if no surface parameter was provided) with this mask drawn on ith](hthe }(hjEh&hh'Nh)Nubh;)}(h ``surface``h]hsurface}hjEsbah}(h]h]h]h]h!]uh%h:hjEh&hh'Nh)Nubh- parameter (or a newly created surface if no }(hjEh&hh'Nh)Nubh;)}(h ``surface``h]hsurface}hjEsbah}(h]h]h]h]h!]uh%h:hjEh&hh'Nh)Nubh3 parameter was provided) with this mask drawn on it}(hjEh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%jhjEubeh}(h]h]h]h]h!]uh%jhjW;ubj)}(hhh](j)}(h Return typeh]h Return type}hjEsbah}(h]h]h]h]h!]uh%jhjEh'h]h)Kubj)}(hhh]h)}(hSurfaceh]h6)}(hhh]hSurface}hjFsbah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetSurfacejjj9jj uh%h5hj Fubah}(h]h]h]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%jhjEubeh}(h]h]h]h]h!]uh%jhjW;ubj)}(hhh](j)}(hRaisesh]hRaises}hj6Fsbah}(h]h]h]h]h!]uh%jhj3Fh'h]h)Kubj)}(hhh]h)}(hValueError -- if the setsurface parameter or unsetsurface parameter does not have the same format (bytesize/bitsize/alpha) as the surface parameterh](h6)}(hhh]j)}(h ValueErrorh]h ValueError}hjNFsbah}(h]h]h]h]h!]uh%jhjKFubah}(h]h]h]h]h!] refdomainj; refexplicitreftypej reftargetjPFjjj9jj uh%h5hjGFubh -- }hjGFsbhif the }(hjGFh&hh'Nh)Nubh;)}(h``setsurface``h]h setsurface}hjnFsbah}(h]h]h]h]h!]uh%h:hjGFh&hh'Nh)Nubh parameter or }(hjGFh&hh'Nh)Nubh;)}(h``unsetsurface``h]h unsetsurface}hjFsbah}(h]h]h]h]h!]uh%h:hjGFh&hh'Nh)NubhI parameter does not have the same format (bytesize/bitsize/alpha) as the }(hjGFh&hh'Nh)Nubh;)}(h ``surface``h]hsurface}hjFsbah}(h]h]h]h]h!]uh%h:hjGFh&hh'Nh)Nubh parameter}(hjGFh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjDFubah}(h]h]h]h]h!]uh%jhj3Fubeh}(h]h]h]h]h!]uh%jhjW;ubeh}(h]h]h]h]h!]uh%jhj:h&hh'Nh)Nubj5)}(hTo skip drawing the set bits, both ``setsurface`` and ``setcolor`` must be ``None``. The ``setsurface`` parameter defaults to ``None``, but ``setcolor`` defaults to a color value and therefore must be set to ``None``.h]h)}(hTo skip drawing the set bits, both ``setsurface`` and ``setcolor`` must be ``None``. The ``setsurface`` parameter defaults to ``None``, but ``setcolor`` defaults to a color value and therefore must be set to ``None``.h](h#To skip drawing the set bits, both }hjFsbh;)}(h``setsurface``h]h setsurface}hjFsbah}(h]h]h]h]h!]uh%h:hjFubh and }hjFsbh;)}(h ``setcolor``h]hsetcolor}hjFsbah}(h]h]h]h]h!]uh%h:hjFubh must be }hjFsbh;)}(h``None``h]hNone}hjFsbah}(h]h]h]h]h!]uh%h:hjFubh. The }hjFsbh;)}(h``setsurface``h]h setsurface}hjFsbah}(h]h]h]h]h!]uh%h:hjFubh parameter defaults to }hjFsbh;)}(h``None``h]hNone}hjGsbah}(h]h]h]h]h!]uh%h:hjFubh, but }hjFsbh;)}(h ``setcolor``h]hsetcolor}hj"Gsbah}(h]h]h]h]h!]uh%h:hjFubh8 defaults to a color value and therefore must be set to }hjFsbh;)}(h``None``h]hNone}hj4Gsbah}(h]h]h]h]h!]uh%h:hjFubh.}hjFsbeh}(h]h]h]h]h!]uh%hh'h]h)MqhjFubah}(h]h]h]h]h!]uh%j4h'h]h)Mphj:h&hubj5)}(hTo skip drawing the unset bits, both ``unsetsurface`` and ``unsetcolor`` must be ``None``. The ``unsetsurface`` parameter defaults to ``None``, but ``unsetcolor`` defaults to a color value and therefore must be set to ``None``.h]h)}(hTo skip drawing the unset bits, both ``unsetsurface`` and ``unsetcolor`` must be ``None``. The ``unsetsurface`` parameter defaults to ``None``, but ``unsetcolor`` defaults to a color value and therefore must be set to ``None``.h](h%To skip drawing the unset bits, both }hjVGsbh;)}(h``unsetsurface``h]h unsetsurface}hj^Gsbah}(h]h]h]h]h!]uh%h:hjVGubh and }hjVGsbh;)}(h``unsetcolor``h]h unsetcolor}hjpGsbah}(h]h]h]h]h!]uh%h:hjVGubh must be }hjVGsbh;)}(h``None``h]hNone}hjGsbah}(h]h]h]h]h!]uh%h:hjVGubh. The }hjVGsbh;)}(h``unsetsurface``h]h unsetsurface}hjGsbah}(h]h]h]h]h!]uh%h:hjVGubh parameter defaults to }hjVGsbh;)}(h``None``h]hNone}hjGsbah}(h]h]h]h]h!]uh%h:hjVGubh, but }hjVGsbh;)}(h``unsetcolor``h]h unsetcolor}hjGsbah}(h]h]h]h]h!]uh%h:hjVGubh8 defaults to a color value and therefore must be set to }hjVGsbh;)}(h``None``h]hNone}hjGsbah}(h]h]h]h]h!]uh%h:hjVGubh.}hjVGsbeh}(h]h]h]h]h!]uh%hh'h]h)MwhjRGubah}(h]h]h]h]h!]uh%j4h'h]h)Mvhj:h&hubh)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjGsbah}(h]h](hheh]h]h!]uh%hhjGubah}(h]h]h]h]h!] translatableuh%hhjGh&hh'h]h)M}ubah}(h]h]h]h]h!]hҌ versionaddedhԌ2.0.0uh%hh&hh'h]h)M|hj:ubh )}(h## Mask.to_surface ##h]h## Mask.to_surface ##}hj Hsbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%jhj:h&hh'Nh)Nubeh}(h]h](j;methodeh]h]h!]jj;jj$Hjj$Hjjjjjjjuh%j]h&hhj h'Nh)Nubh )}(h## pygame.mask.Mask ##h]h## pygame.mask.Mask ##}hj(Hsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](j"classeh]h]h!]jj"jj?Hjj?Hjjjjjjjuh%j]h&hhh,h'Nh)Nubh )}(h## pygame.mask ##h]h## pygame.mask ##}hjCHsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-maskeh]h] pygame.maskah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjHerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}j]jasnameids}(jVHjSHjju nametypes}(jVHjuh}(jSHh,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubj[jdjjj j jjj_jdjjjjjjj-j2j9j>jVj[jb jg j"j"j#j#j$j$j%j%j'j'j)j)j+j+j,j,j).j..j/j/j1j1j4j4jC7jH7ji9jn9j:j:u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]h system_message)}(hhh]h)}(hhh]h7Hyperlink target "mask-offset-label" is not referenced.}hjHsbah}(h]h]h]h]h!]uh%hhjHubah}(h]h]h]h]h!]levelKtypeINFOsourceh]lineKuh%jHuba transformerN include_log]docs/reST/ref/mask.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612175.7321408 pygame-2.6.1/docs/generated/doctrees/ref/math.doctree0000644000175100001770000067664314676242420022216 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.math`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.math}hh float`h]h)}(hjh]hclamp(value, min, max) -> float}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K7ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K6ubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%jhjubhQ feature still in development available for testing and feedback. It may change. }hjsbh reference)}(hX`Please leave clamp feedback with authors `_h]h(Please leave clamp feedback with authors}(hjh(Please leave clamp feedback with authorsubah}(h]h]h]h]h!]name(Please leave clamp feedback with authorsrefuri*https://github.com/pygame/pygame/pull/3326uh%jhjubh target)}(h- h]h}(h](please-leave-clamp-feedback-with-authorsah]h](please leave clamp feedback with authorsah]h!]refurijuh%j referencedKhjubeh}(h]h]h]h]h!]uh%hh'h]h)K9hjh&hubh)}(hZClamps a numeric ``value`` so that it's no lower than ``min``, and no higher than ``max``.h](hClamps a numeric }hjsbh;)}(h ``value``h]hvalue}hj"sbah}(h]h]h]h]h!]uh%h:hjubh so that it's no lower than }hjsbh;)}(h``min``h]hmin}hj4sbah}(h]h]h]h]h!]uh%h:hjubh, and no higher than }hjsbh;)}(h``max``h]hmax}hjFsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K float`h]h)}(hj h]hlerp(a, b, weight) -> float}hj sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KEubh)}(heLinearly interpolates between ``a`` and ``b`` by ``weight`` using the formula ``a + (b-a) * weight``.h](hLinearly interpolates between }hj%sbh;)}(h``a``h]ha}hj-sbah}(h]h]h]h]h!]uh%h:hj%ubh and }hj%sbh;)}(h``b``h]hb}hj?sbah}(h]h]h]h]h!]uh%h:hj%ubh by }hj%sbh;)}(h ``weight``h]hweight}hjQsbah}(h]h]h]h]h!]uh%h:hj%ubh using the formula }hj%sbh;)}(h``a + (b-a) * weight``h]ha + (b-a) * weight}hjcsbah}(h]h]h]h]h!]uh%h:hj%ubh.}hj%sbeh}(h]h]h]h]h!]uh%hh'h]h)KHhjh&hubh)}(hXIf ``weight`` is ``0.5``, ``lerp`` will return the value half-way between ``a`` and ``b``. When ``a = 10`` and ``b = 20``, ``lerp(a, b, 0.5)`` will return ``15``. You can think of weight as the percentage of interpolation from ``a`` to ``b``, ``0.0`` being 0% and ``1.0`` being 100%.h](hIf }hj{sbh;)}(h ``weight``h]hweight}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh is }hj{sbh;)}(h``0.5``h]h0.5}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh, }hj{sbh;)}(h``lerp``h]hlerp}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh( will return the value half-way between }hj{sbh;)}(h``a``h]ha}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh and }hj{sbh;)}(h``b``h]hb}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh. When }hj{sbh;)}(h ``a = 10``h]ha = 10}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh and }hj{sbh;)}(h ``b = 20``h]hb = 20}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh, }hj{sbh;)}(h``lerp(a, b, 0.5)``h]hlerp(a, b, 0.5)}hjsbah}(h]h]h]h]h!]uh%h:hj{ubh will return }hj{sbh;)}(h``15``h]h15}hjsbah}(h]h]h]h]h!]uh%h:hj{ubhB. You can think of weight as the percentage of interpolation from }hj{sbh;)}(h``a``h]ha}hj%sbah}(h]h]h]h]h!]uh%h:hj{ubh to }hj{sbh;)}(h``b``h]hb}hj7sbah}(h]h]h]h]h!]uh%h:hj{ubh, }hj{sbh;)}(h``0.0``h]h0.0}hjIsbah}(h]h]h]h]h!]uh%h:hj{ubh being 0% and }hj{sbh;)}(h``1.0``h]h1.0}hj[sbah}(h]h]h]h]h!]uh%h:hj{ubh being 100%.}hj{sbeh}(h]h]h]h]h!]uh%hh'h]h)KJhjh&hubh)}(h``lerp`` can be used for many things. You could rotate a sprite by a weight with ``angle = lerp(0, 360, weight)``. You could even scale an enemy's attack value based on the level you're playing:h](h;)}(h``lerp``h]hlerp}hjwsbah}(h]h]h]h]h!]uh%h:hjsubhI can be used for many things. You could rotate a sprite by a weight with }hjssbh;)}(h ``angle = lerp(0, 360, weight)``h]hangle = lerp(0, 360, weight)}hjsbah}(h]h]h]h]h!]uh%h:hjsubhQ. You could even scale an enemy's attack value based on the level you're playing:}hjssbeh}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubj)}(hWFINAL_LEVEL = 10 current_level = 2 attack = lerp(10, 50, current_level/MAX_LEVEL) # 18h]hWFINAL_LEVEL = 10 current_level = 2 attack = lerp(10, 50, current_level/MAX_LEVEL) # 18}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)KUhjh&hubh)}(hXIf you're on level 0, ``attack`` will be ``10``, if you're on level 10, ``attack`` will be ``50``. If you're on level 5, the result of ``current_level/MAX_LEVEL`` will be ``0.5`` which represents 50%, therefore ``attack`` will be ``30``, which is the midpoint of ``10`` and ``50``.h](hIf you're on level 0, }hjsbh;)}(h ``attack``h]hattack}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be }hjsbh;)}(h``10``h]h10}hjsbah}(h]h]h]h]h!]uh%h:hjubh, if you're on level 10, }hjsbh;)}(h ``attack``h]hattack}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be }hjsbh;)}(h``50``h]h50}hjsbah}(h]h]h]h]h!]uh%h:hjubh&. If you're on level 5, the result of }hjsbh;)}(h``current_level/MAX_LEVEL``h]hcurrent_level/MAX_LEVEL}hjsbah}(h]h]h]h]h!]uh%h:hjubh will be }hjsbh;)}(h``0.5``h]h0.5}hjsbah}(h]h]h]h]h!]uh%h:hjubh! which represents 50%, therefore }hjsbh;)}(h ``attack``h]hattack}hj#sbah}(h]h]h]h]h!]uh%h:hjubh will be }hjsbh;)}(h``30``h]h30}hj5sbah}(h]h]h]h]h!]uh%h:hjubh, which is the midpoint of }hjsbh;)}(h``10``h]h10}hjGsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``50``h]h50}hjYsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KZhjh&hubh)}(hERaises a ValueError if ``weight`` is outside the range of ``[0, 1]``.h](hRaises a ValueError if }hjqsbh;)}(h ``weight``h]hweight}hjysbah}(h]h]h]h]h!]uh%h:hjqubh is outside the range of }hjqsbh;)}(h ``[0, 1]``h]h[0, 1]}hjsbah}(h]h]h]h]h!]uh%h:hjqubh.}hjqsbeh}(h]h]h]h]h!]uh%hh'h]h)K_hjh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kbubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Kahjubh )}(h## math.lerp ##h]h## math.lerp ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jQh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jMVector2 (class in pygame.math)pygame.math.Vector2hNtauh%hdhh,h&hh'Nh)NubjR)}(hhh](jW)}(hVector2h](j])}(h pygame.math.h]h pygame.math.}hjsbah}(h]h](jijjeh]h]h!]h#h$uh%j\hjh&hh'h]h)Keubjo)}(hjh]hVector2}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Keubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jVh'h]h)Kehjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`a 2-Dimensional Vector`h]h)}(hj#h]ha 2-Dimensional Vector}hj%sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kgubhz)}(h :sg:`Vector2() -> Vector2(0, 0)`h]h)}(hj:h]hVector2() -> Vector2(0, 0)}hj<sbah}(h]h]jah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Khubhz)}(h:sg:`Vector2(int) -> Vector2`h]h)}(hjQh]hVector2(int) -> Vector2}hjSsbah}(h]h]jah]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kiubhz)}(h:sg:`Vector2(float) -> Vector2`h]h)}(hjhh]hVector2(float) -> Vector2}hjjsbah}(h]h]jah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kjubhz)}(h!:sg:`Vector2(Vector2) -> Vector2`h]h)}(hjh]hVector2(Vector2) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kkubhz)}(h:sg:`Vector2(x, y) -> Vector2`h]h)}(hjh]hVector2(x, y) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Klubhz)}(h :sg:`Vector2((x, y)) -> Vector2`h]h)}(hjh]hVector2((x, y)) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kgubh)}(h5Some general information about the ``Vector2`` class.h](h#Some general information about the }hjsbh;)}(h ``Vector2``h]hVector2}hjsbah}(h]h]h]h]h!]uh%h:hjubh class.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kohjh&hubj)}(hChanged in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclassh]h)}(hChanged in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclassh](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hjsbah}(h]h](jj[eh]h]h!]uh%hhjh&hh'h]h)KtubhqInherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Ktubah}(h]h]h]h]h!]jDversionchangedjF2.1.3uh%jh&hh'h]h)Kqhjubhe)}(hhh]h}(h]h]h]h]h!]entries](jM"dot() (pygame.math.Vector2 method)pygame.math.Vector2.dothNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hdoth](jo)}(hj$ h]hdot}hj& sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj" h&hh'h]h)Kuubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj" h&hh'h]h)Kuubeh}(h]j ah](jjeh]h]h!]jjjjj Vector2.dotjjVector2dotj Vector2.dot()uh%jVh'h]h)Kuhj h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`calculates the dot- or scalar-product with the other vector`h]h)}(hjP h]h;calculates the dot- or scalar-product with the other vector}hjR sbah}(h]h]hah]h]h!]uh%hhjN ubah}(h]h]h]h]h!]uh%h)hKhjK h&hh'h]h)Kwubhz)}(h:sg:`dot(Vector2) -> float`h]h)}(hjg h]hdot(Vector2) -> float}hji sbah}(h]h]jah]h]h!]uh%hhje ubah}(h]h]h]h]h!]uh%h)hKhjK h&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%huhjH h&hh'h]h)Kwubh )}(h## Vector2.dot ##h]h## Vector2.dot ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjH h&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM$cross() (pygame.math.Vector2 method)pygame.math.Vector2.crosshNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hcrossh](jo)}(hj h]hcross}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj h&hh'h]h)K|ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)K|ubeh}(h]j ah](jjeh]h]h!]jjjjj Vector2.crossjjVector2crossjVector2.cross()uh%jVh'h]h)K|hj h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`calculates the cross- or vector-product`h]h)}(hj h]h'calculates the cross- or vector-product}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K~ubhz)}(h:sg:`cross(Vector2) -> float`h]h)}(hj h]hcross(Vector2) -> float}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)K~ubh)}(h4calculates the third component of the cross-product.h]h4calculates the third component of the cross-product.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Vector2.cross ##h]h## Vector2.cross ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj4 jj5 jj5 jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(magnitude() (pygame.math.Vector2 method)pygame.math.Vector2.magnitudehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h magnitudeh](jo)}(hjL h]h magnitude}hjN sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjJ h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjJ h&hh'h]h)Kubeh}(h]jE ah](jjeh]h]h!]jjjjjVector2.magnitudejjVector2 magnitudejVector2.magnitude()uh%jVh'h]h)KhjG h&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`returns the Euclidean magnitude of the vector.`h]h)}(hjx h]h.returns the Euclidean magnitude of the vector.}hjz sbah}(h]h]hah]h]h!]uh%hhjv ubah}(h]h]h]h]h!]uh%h)hKhjs h&hh'h]h)Kubhz)}(h:sg:`magnitude() -> float`h]h)}(hj h]hmagnitude() -> float}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjs h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjp h&hh'h]h)Kubh)}(h|calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)``h](hGcalculates the magnitude of the vector which follows from the theorem: }hj sbh;)}(h5``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)``h]h1vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)}hj sbah}(h]h]h]h]h!]uh%h:hj ubeh}(h]h]h]h]h!]uh%hh'h]h)Khjp h&hubh )}(h## Vector2.magnitude ##h]h## Vector2.magnitude ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjp h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjG h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM0magnitude_squared() (pygame.math.Vector2 method)%pygame.math.Vector2.magnitude_squaredhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hmagnitude_squaredh](jo)}(hj h]hmagnitude_squared}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjVector2.magnitude_squaredjjVector2magnitude_squaredjVector2.magnitude_squared()uh%jVh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h2:sl:`returns the squared magnitude of the vector.`h]h)}(hj! h]h,returns the squared magnitude of the vector.}hj# sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h":sg:`magnitude_squared() -> float`h]h)}(hj8 h]hmagnitude_squared() -> float}hj: sbah}(h]h]jah]h]h!]uh%hhj6 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hcalculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.magnitude()`` because it avoids the square root.h](hGcalculates the magnitude of the vector which follows from the theorem: }hjS sbh;)}(h2``vec.magnitude_squared() == vec.x**2 + vec.y**2``h]h.vec.magnitude_squared() == vec.x**2 + vec.y**2}hj[ sbah}(h]h]h]h]h!]uh%h:hjS ubh. This is faster than }hjS sbh;)}(h``vec.magnitude()``h]hvec.magnitude()}hjm sbah}(h]h]h]h]h!]uh%h:hjS ubh# because it avoids the square root.}hjS sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Vector2.magnitude_squared ##h]h## Vector2.magnitude_squared ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%length() (pygame.math.Vector2 method)pygame.math.Vector2.lengthhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hlengthh](jo)}(hj h]hlength}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjVector2.lengthjjVector2lengthjVector2.length()uh%jVh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`returns the Euclidean length of the vector.`h]h)}(hj h]h+returns the Euclidean length of the vector.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`length() -> float`h]h)}(hj h]hlength() -> float}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2)``h](hZcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: }hj sbh;)}(h2``vec.length() == math.sqrt(vec.x**2 + vec.y**2)``h]h.vec.length() == math.sqrt(vec.x**2 + vec.y**2)}hj sbah}(h]h]h]h]h!]uh%h:hj ubeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Vector2.length ##h]h## Vector2.length ##}hj. sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjE jjF jjF jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM-length_squared() (pygame.math.Vector2 method)"pygame.math.Vector2.length_squaredhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hlength_squaredh](jo)}(hj] h]hlength_squared}hj_ sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj[ h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj[ h&hh'h]h)Kubeh}(h]jV ah](jjeh]h]h!]jjjjjVector2.length_squaredjjVector2length_squaredjVector2.length_squared()uh%jVh'h]h)KhjX h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns the squared Euclidean length of the vector.`h]h)}(hj h]h3returns the squared Euclidean length of the vector.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`length_squared() -> float`h]h)}(hj h]hlength_squared() -> float}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.length()`` because it avoids the square root.h](hZcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: }hj sbh;)}(h/``vec.length_squared() == vec.x**2 + vec.y**2``h]h+vec.length_squared() == vec.x**2 + vec.y**2}hj sbah}(h]h]h]h]h!]uh%h:hj ubh. This is faster than }hj sbh;)}(h``vec.length()``h]h vec.length()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh# because it avoids the square root.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Vector2.length_squared ##h]h## Vector2.length_squared ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjX h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(normalize() (pygame.math.Vector2 method)pygame.math.Vector2.normalizehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h normalizeh](jo)}(hj h]h normalize}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjVector2.normalizejjVector2 normalizejVector2.normalize()uh%jVh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`returns a vector with the same direction but length 1.`h]h)}(hjH h]h6returns a vector with the same direction but length 1.}hjJ sbah}(h]h]hah]h]h!]uh%hhjF ubah}(h]h]h]h]h!]uh%h)hKhjC h&hh'h]h)Kubhz)}(h:sg:`normalize() -> Vector2`h]h)}(hj_ h]hnormalize() -> Vector2}hja sbah}(h]h]jah]h]h!]uh%hhj] ubah}(h]h]h]h]h!]uh%h)hKhjC h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj@ h&hh'h]h)Kubh)}(hWReturns a new vector that has ``length`` equal to ``1`` and the same direction as self.h](hReturns a new vector that has }hjz sbh;)}(h ``length``h]hlength}hj sbah}(h]h]h]h]h!]uh%h:hjz ubh equal to }hjz sbh;)}(h``1``h]h1}hj sbah}(h]h]h]h]h!]uh%h:hjz ubh and the same direction as self.}hjz sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj@ h&hubh )}(h## Vector2.normalize ##h]h## Vector2.normalize ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj@ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+normalize_ip() (pygame.math.Vector2 method) pygame.math.Vector2.normalize_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h normalize_iph](jo)}(hj h]h normalize_ip}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjVector2.normalize_ipjjVector2 normalize_ipjVector2.normalize_ip()uh%jVh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`normalizes the vector in place so that its length is 1.`h]h)}(hjh]h7normalizes the vector in place so that its length is 1.}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`normalize_ip() -> None`h]h)}(hjh]hnormalize_ip() -> None}hj sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hkNormalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed.h](h%Normalizes the vector so that it has }hj9sbh;)}(h ``length``h]hlength}hjAsbah}(h]h]h]h]h!]uh%h:hj9ubh equal to }hj9sbh;)}(h``1``h]h1}hjSsbah}(h]h]h]h]h!]uh%h:hj9ubh-. The direction of the vector is not changed.}hj9sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Vector2.normalize_ip ##h]h## Vector2.normalize_ip ##}hjksbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,is_normalized() (pygame.math.Vector2 method)!pygame.math.Vector2.is_normalizedhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h is_normalizedh](jo)}(hjh]h is_normalized}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjVector2.is_normalizedjjVector2 is_normalizedjVector2.is_normalized()uh%jVh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`tests if the vector is normalized i.e. has length == 1.`h]h)}(hjh]h7tests if the vector is normalized i.e. has length == 1.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`is_normalized() -> Bool`h]h)}(hjh]his_normalized() -> Bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hYReturns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``.h](hReturns True if the vector has }hjsbh;)}(h ``length``h]hlength}hjsbah}(h]h]h]h]h!]uh%h:hjubh equal to }hjsbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjubh. Otherwise it returns }hjsbh;)}(h ``False``h]hFalse}hj$sbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Vector2.is_normalized ##h]h## Vector2.is_normalized ##}hj<sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjSjjTjjTjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.scale_to_length() (pygame.math.Vector2 method)#pygame.math.Vector2.scale_to_lengthhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hscale_to_lengthh](jo)}(hjkh]hscale_to_length}hjmsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjih&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjih&hh'h]h)Kubeh}(h]jdah](jjeh]h]h!]jjjjjVector2.scale_to_lengthjjVector2scale_to_lengthjVector2.scale_to_length()uh%jVh'h]h)Khjfh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`scales the vector to a given length.`h]h)}(hjh]h$scales the vector to a given length.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h$:sg:`scale_to_length(float) -> None`h]h)}(hjh]hscale_to_length(float) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hScales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised.h](h|Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh4. If the vector is the zero vector (i.e. has length }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh thus no direction) a }hjsbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hjubh is raised.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Vector2.scale_to_length ##h]h## Vector2.scale_to_length ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjfh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj$jj%jj%jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM&reflect() (pygame.math.Vector2 method)pygame.math.Vector2.reflecthNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hreflecth](jo)}(hj<h]hreflect}hj>sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj:h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj:h&hh'h]h)Kubeh}(h]j5ah](jjeh]h]h!]jjjjjVector2.reflectjjVector2reflectjVector2.reflect()uh%jVh'h]h)Khj7h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`returns a vector reflected of a given normal.`h]h)}(hjhh]h-returns a vector reflected of a given normal.}hjjsbah}(h]h]hah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjch&hh'h]h)Kubhz)}(h!:sg:`reflect(Vector2) -> Vector2`h]h)}(hjh]hreflect(Vector2) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%h)hKhjch&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj`h&hh'h]h)Kubh)}(hReturns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.h]hReturns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj`h&hubh )}(h## Vector2.reflect ##h]h## Vector2.reflect ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj`h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj7h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM)reflect_ip() (pygame.math.Vector2 method)pygame.math.Vector2.reflect_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h reflect_iph](jo)}(hjh]h reflect_ip}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjVector2.reflect_ipjjVector2 reflect_ipjVector2.reflect_ip()uh%jVh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`reflect the vector of a given normal in place.`h]h)}(hjh]h.reflect the vector of a given normal in place.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h!:sg:`reflect_ip(Vector2) -> None`h]h)}(hjh]hreflect_ip(Vector2) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hlChanges the direction of self as if it would have been reflected of a surface with the given surface normal.h]hlChanges the direction of self as if it would have been reflected of a surface with the given surface normal.}hj5sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Vector2.reflect_ip ##h]h## Vector2.reflect_ip ##}hjCsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjZjj[jj[jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*distance_to() (pygame.math.Vector2 method)pygame.math.Vector2.distance_tohNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h distance_toh](jo)}(hjrh]h distance_to}hjtsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjph&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjph&hh'h]h)Kubeh}(h]jkah](jjeh]h]h!]jjjjjVector2.distance_tojjVector2 distance_tojVector2.distance_to()uh%jVh'h]h)Khjmh&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`calculates the Euclidean distance to a given vector.`h]h)}(hjh]h4calculates the Euclidean distance to a given vector.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h#:sg:`distance_to(Vector2) -> float`h]h)}(hjh]hdistance_to(Vector2) -> float}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh )}(h## Vector2.distance_to ##h]h## Vector2.distance_to ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjmh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM2distance_squared_to() (pygame.math.Vector2 method)'pygame.math.Vector2.distance_squared_tohNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hdistance_squared_toh](jo)}(hjh]hdistance_squared_to}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjVector2.distance_squared_tojjVector2distance_squared_tojVector2.distance_squared_to()uh%jVh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(hB:sl:`calculates the squared Euclidean distance to a given vector.`h]h)}(hj+h]h float`h]h)}(hjBh]h%distance_squared_to(Vector2) -> float}hjDsbah}(h]h]jah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)Kubh )}(h!## Vector2.distance_squared_to ##h]h!## Vector2.distance_squared_to ##}hj]sbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjtjjujjujjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+move_towards() (pygame.math.Vector2 method) pygame.math.Vector2.move_towardshNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h move_towardsh](jo)}(hjh]h move_towards}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjVector2.move_towardsjjVector2 move_towardsjVector2.move_towards()uh%jVh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(hC:sl:`returns a vector moved toward the target by a given distance.`h]h)}(hjh]h=returns a vector moved toward the target by a given distance.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h-:sg:`move_towards(Vector2, float) -> Vector2`h]h)}(hjh]h'move_towards(Vector2, float) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%jhjubhQ feature still in development available for testing and feedback. It may change. }hjsbj)}(h_`Please leave move_towards feedback with authors `_h]h/Please leave move_towards feedback with authors}(hjh/Please leave move_towards feedback with authorsubah}(h]h]h]h]h!]name/Please leave move_towards feedback with authorsj*https://github.com/pygame/pygame/pull/2929uh%jhjubj)}(h- h]h}(h]/please-leave-move-towards-feedback-with-authorsah]h]/please leave move_towards feedback with authorsah]h!]refurijuh%jjKhjubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX;Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.h]hX;Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.}hj%sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj;sbah}(h]h](jj3eh]h]h!]uh%hhj7ubah}(h]h]h]h]h!] translatableuh%hhj3h&hh'h]h)M ubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)M hjubh )}(h## Vector2.move_towards ##h]h## Vector2.move_towards ##}hjXsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjojjpjjpjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.move_towards_ip() (pygame.math.Vector2 method)#pygame.math.Vector2.move_towards_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hmove_towards_iph](jo)}(hjh]hmove_towards_ip}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjVector2.move_towards_ipjjVector2move_towards_ipjVector2.move_towards_ip()uh%jVh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`moves the vector toward its target at a given distance.`h]h)}(hjh]h7moves the vector toward its target at a given distance.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h-:sg:`move_towards_ip(Vector2, float) -> None`h]h)}(hjh]h'move_towards_ip(Vector2, float) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%jhjubhQ feature still in development available for testing and feedback. It may change. }hjsbj)}(hb`Please leave move_towards_ip feedback with authors `_h]h2Please leave move_towards_ip feedback with authors}(hjh2Please leave move_towards_ip feedback with authorsubah}(h]h]h]h]h!]name2Please leave move_towards_ip feedback with authorsj*https://github.com/pygame/pygame/pull/2929uh%jhjubj)}(h- h]h}(h]2please-leave-move-towards-ip-feedback-with-authorsah]h]2please leave move_towards_ip feedback with authorsah]h!]refurij uh%jjKhjubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX'Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.h]hX'Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj6sbah}(h]h](jj3eh]h]h!]uh%hhj2ubah}(h]h]h]h]h!] translatableuh%hhj.h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Mhjubh )}(h## Vector2.move_towards_ip ##h]h## Vector2.move_towards_ip ##}hjSsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjkjjkjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM#lerp() (pygame.math.Vector2 method)pygame.math.Vector2.lerphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hlerph](jo)}(hjh]hlerp}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M ubeh}(h]j{ah](jjeh]h]h!]jjjjj Vector2.lerpjjVector2lerpjVector2.lerp()uh%jVh'h]h)M hj}h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns a linear interpolation to the given vector.`h]h)}(hjh]h3returns a linear interpolation to the given vector.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M"ubhz)}(h%:sg:`lerp(Vector2, float) -> Vector2`h]h)}(hjh]hlerp(Vector2, float) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M#ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M"ubh)}(hXReturns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self and other the result is going to be. It must be a value between ``0`` and ``1`` where ``0`` means self and ``1`` means other will be returned.h](hReturns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self and other the result is going to be. It must be a value between }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjubh where }hjsbh;)}(h``0``h]h0}hj sbah}(h]h]h]h]h!]uh%h:hjubh means self and }hjsbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjubh means other will be returned.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M%hjh&hubh )}(h## Vector2.lerp ##h]h## Vector2.lerp ##}hj6sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M*ubeh}(h]h]h]h]h!]uh%jhj}h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjMjjNjjNjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM$slerp() (pygame.math.Vector2 method)pygame.math.Vector2.slerphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hslerph](jo)}(hjeh]hslerp}hjgsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjch&hh'h]h)M,ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjch&hh'h]h)M,ubeh}(h]j^ah](jjeh]h]h!]jjjjj Vector2.slerpjjVector2slerpjVector2.slerp()uh%jVh'h]h)M,hj`h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`returns a spherical interpolation to the given vector.`h]h)}(hjh]h6returns a spherical interpolation to the given vector.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M.ubhz)}(h&:sg:`slerp(Vector2, float) -> Vector2`h]h)}(hjh]h slerp(Vector2, float) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M/ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M.ubh)}(hX;Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.h](hCalculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range }hjsbh;)}(h ``[-1, 1]``h]h[-1, 1]}hjsbah}(h]h]h]h]h!]uh%h:hjubh. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M1hjh&hubh )}(h## Vector2.slerp ##h]h## Vector2.slerp ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M7ubeh}(h]h]h]h]h!]uh%jhj`h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*elementwise() (pygame.math.Vector2 method)pygame.math.Vector2.elementwisehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h elementwiseh](jo)}(hjh]h elementwise}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)M9ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M9ubeh}(h]j ah](jjeh]h]h!]jjjjjVector2.elementwisejjVector2 elementwisejVector2.elementwise()uh%jVh'h]h)M9hj h&hubj)}(hhh](hv)}(hhh](hz)}(h7:sl:`The next operation will be performed elementwise.`h]h)}(hj>h]h1The next operation will be performed elementwise.}hj@sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)M;ubhz)}(h-:sg:`elementwise() -> VectorElementwiseProxy`h]h)}(hjUh]h'elementwise() -> VectorElementwiseProxy}hjWsbah}(h]h]jah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)M<ubeh}(h]h]h]h]h!]uh%huhj6h&hh'h]h)M;ubh)}(h>Applies the following operation to each element of the vector.h]h>Applies the following operation to each element of the vector.}hjpsbah}(h]h]h]h]h!]uh%hh'h]h)M>hj6h&hubh )}(h## Vector2.elementwise ##h]h## Vector2.elementwise ##}hj~sbah}(h]h]h]h]h!]h#h$uh%h hj6h&hh'h]h)M@ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%rotate() (pygame.math.Vector2 method)pygame.math.Vector2.rotatehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hrotateh](jo)}(hjh]hrotate}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)MBubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MBubeh}(h]jah](jjeh]h]h!]jjjjjVector2.rotatejjVector2rotatejVector2.rotate()uh%jVh'h]h)MBhjh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`rotates a vector by a given angle in degrees.`h]h)}(hjh]h-rotates a vector by a given angle in degrees.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MDubhz)}(h:sg:`rotate(angle) -> Vector2`h]h)}(hjh]hrotate(angle) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MEubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MDubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj sbah}(h]h]h]h]h!]uh%hh'h]h)MGhjh&hubh )}(h## Vector2.rotate ##h]h## Vector2.rotate ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MLubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj0jj1jj1jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM)rotate_rad() (pygame.math.Vector2 method)pygame.math.Vector2.rotate_radhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h rotate_radh](jo)}(hjHh]h rotate_rad}hjJsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjFh&hh'h]h)MNubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjFh&hh'h]h)MNubeh}(h]jAah](jjeh]h]h!]jjjjjVector2.rotate_radjjVector2 rotate_radjVector2.rotate_rad()uh%jVh'h]h)MNhjCh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`rotates a vector by a given angle in radians.`h]h)}(hjth]h-rotates a vector by a given angle in radians.}hjvsbah}(h]h]hah]h]h!]uh%hhjrubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)MPubhz)}(h":sg:`rotate_rad(angle) -> Vector2`h]h)}(hjh]hrotate_rad(angle) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)MQubeh}(h]h]h]h]h!]uh%huhjlh&hh'h]h)MPubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MShjlh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)MYubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)MXhjlubh )}(h## Vector2.rotate_rad ##h]h## Vector2.rotate_rad ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjlh&hh'h]h)MZubeh}(h]h]h]h]h!]uh%jhjCh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(rotate_ip() (pygame.math.Vector2 method)pygame.math.Vector2.rotate_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h rotate_iph](jo)}(hjh]h rotate_ip}hj sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)M\ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M\ubeh}(h]jah](jjeh]h]h!]jjjjjVector2.rotate_ipjjVector2 rotate_ipjVector2.rotate_ip()uh%jVh'h]h)M\hjh&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in degrees in place.`h]h)}(hj4h]h8rotates the vector by a given angle in degrees in place.}hj6sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)M^ubhz)}(h:sg:`rotate_ip(angle) -> None`h]h)}(hjKh]hrotate_ip(angle) -> None}hjMsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)M_ubeh}(h]h]h]h]h!]uh%huhj,h&hh'h]h)M^ubh)}(hRotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjfsbah}(h]h]h]h]h!]uh%hh'h]h)Mahj,h&hubh )}(h## Vector2.rotate_ip ##h]h## Vector2.rotate_ip ##}hjtsbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)Mfubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,rotate_ip_rad() (pygame.math.Vector2 method)!pygame.math.Vector2.rotate_ip_radhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h rotate_ip_radh](jo)}(hjh]h rotate_ip_rad}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mhubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mhubeh}(h]jah](jjeh]h]h!]jjjjjVector2.rotate_ip_radjjVector2 rotate_ip_radjVector2.rotate_ip_rad()uh%jVh'h]h)Mhhjh&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in radians in place.`h]h)}(hjh]h8rotates the vector by a given angle in radians in place.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mjubhz)}(h":sg:`rotate_ip_rad(angle) -> None`h]h)}(hjh]hrotate_ip_rad(angle) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mkubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mjubh)}(h(DEPRECATED: Use rotate_rad_ip() instead.h]h(DEPRECATED: Use rotate_rad_ip() instead.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mmhjh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Moubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)Mohjubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj<sbah}(h]h](j deprecatedeh]h]h!]uh%hhj8ubah}(h]h]h]h]h!] translatableuh%hhj4h&hh'h]h)Mqubah}(h]h]h]h]h!]jD deprecatedjF2.1.1uh%jh&hh'h]h)Mphjubh )}(h## Vector2.rotate_rad_ip ##h]h## Vector2.rotate_rad_ip ##}hjZsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mrubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjqjjrjjrjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,rotate_rad_ip() (pygame.math.Vector2 method)!pygame.math.Vector2.rotate_rad_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h rotate_rad_iph](jo)}(hjh]h rotate_rad_ip}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mtubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mtubeh}(h]jah](jjeh]h]h!]jjjjjVector2.rotate_rad_ipjjVector2 rotate_rad_ipjVector2.rotate_rad_ip()uh%jVh'h]h)Mthjh&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in radians in place.`h]h)}(hjh]h8rotates the vector by a given angle in radians in place.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mvubhz)}(h":sg:`rotate_rad_ip(angle) -> None`h]h)}(hjh]hrotate_rad_ip(angle) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mwubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mvubh)}(hRotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Myhjh&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)M~hjubh )}(h## Vector2.rotate_rad_ip ##h]h## Vector2.rotate_rad_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj1jj2jj2jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'angle_to() (pygame.math.Vector2 method)pygame.math.Vector2.angle_tohNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hangle_toh](jo)}(hjIh]hangle_to}hjKsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjGh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjGh&hh'h]h)Mubeh}(h]jBah](jjeh]h]h!]jjjjjVector2.angle_tojjVector2angle_tojVector2.angle_to()uh%jVh'h]h)MhjDh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`calculates the angle to a given vector in degrees.`h]h)}(hjuh]h2calculates the angle to a given vector in degrees.}hjwsbah}(h]h]hah]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%h)hKhjph&hh'h]h)Mubhz)}(h :sg:`angle_to(Vector2) -> float`h]h)}(hjh]hangle_to(Vector2) -> float}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjph&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjmh&hh'h]h)Mubh)}(hReturns the angle from self to the passed ``Vector2`` that would rotate self to be aligned with the passed ``Vector2`` without crossing over the negative x-axis.h](h*Returns the angle from self to the passed }hjsbh;)}(h ``Vector2``h]hVector2}hjsbah}(h]h]h]h]h!]uh%h:hjubh6 that would rotate self to be aligned with the passed }hjsbh;)}(h ``Vector2``h]hVector2}hjsbah}(h]h]h]h]h!]uh%h:hjubh+ without crossing over the negative x-axis.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjmh&hubh figure)}(hhh](h image)}(hl.. figure:: code_examples/angle_to.png :alt: angle_to image Example demonstrating the angle returned h]h}(h]h]h]h]h!]altangle_to imageuriref/code_examples/angle_to.png candidates}*js original_uricode_examples/angle_to.pnguh%jh'h]h)Mhjubh caption)}(h(Example demonstrating the angle returnedh]h(Example demonstrating the angle returned}hjsbah}(h]h]h]h]h!]uh%jh'h]h)Mhjubeh}(h]id6ah]h]h]h!]uh%jh'h]h)Mhjmh&hubh )}(h## Vector2.angle_to ##h]h## Vector2.angle_to ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjmh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjDh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj!jj"jj"jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'as_polar() (pygame.math.Vector2 method)pygame.math.Vector2.as_polarhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(has_polarh](jo)}(hj9h]has_polar}hj;sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj7h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj7h&hh'h]h)Mubeh}(h]j2ah](jjeh]h]h!]jjjjjVector2.as_polarjjVector2as_polarjVector2.as_polar()uh%jVh'h]h)Mhj4h&hubj)}(hhh](hv)}(hhh](hz)}(h?:sl:`returns a tuple with radial distance and azimuthal angle.`h]h)}(hjeh]h9returns a tuple with radial distance and azimuthal angle.}hjgsbah}(h]h]hah]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%h)hKhj`h&hh'h]h)Mubhz)}(h:sg:`as_polar() -> (r, phi)`h]h)}(hj|h]has_polar() -> (r, phi)}hj~sbah}(h]h]jah]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%h)hKhj`h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj]h&hh'h]h)Mubh)}(h\Returns a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle.h](hReturns a tuple }hjsbh;)}(h ``(r, phi)``h]h(r, phi)}hjsbah}(h]h]h]h]h!]uh%h:hjubh@ where r is the radial distance, and phi is the azimuthal angle.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj]h&hubh )}(h## Vector2.as_polar ##h]h## Vector2.as_polar ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj]h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM)from_polar() (pygame.math.Vector2 method)pygame.math.Vector2.from_polarhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(h from_polarh](jo)}(hjh]h from_polar}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjVector2.from_polarjjVector2 from_polarjVector2.from_polar()uh%jVh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple.`h]h)}(hjh]hGCreates a Vector2(x, y) or sets x and y from a polar coordinates tuple.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h-:sg:`Vector2.from_polar((r, phi)) -> Vector2`h]h)}(hj)h]h'Vector2.from_polar((r, phi)) -> Vector2}hj+sbah}(h]h]jah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h,:sg:`Vector2().from_polar((r, phi)) -> None`h]h)}(hj@h]h&Vector2().from_polar((r, phi)) -> None}hjBsbah}(h]h]jah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hIf used from the class creates a Vector2(x,y), else sets x and y. The values of x and y are defined from a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle.h](hqIf used from the class creates a Vector2(x,y), else sets x and y. The values of x and y are defined from a tuple }hj[sbh;)}(h ``(r, phi)``h]h(r, phi)}hjcsbah}(h]h]h]h]h!]uh%h:hj[ubh@ where r is the radial distance, and phi is the azimuthal angle.}hj[sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h## Vector2.from_polar ##h]h## Vector2.from_polar ##}hj{sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM&project() (pygame.math.Vector2 method)pygame.math.Vector2.projecthNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hprojecth](jo)}(hjh]hproject}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjVector2.projectjjVector2projectjVector2.project()uh%jVh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`projects a vector onto another.`h]h)}(hjh]hprojects a vector onto another.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h!:sg:`project(Vector2) -> Vector2`h]h)}(hjh]hproject(Vector2) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hReturns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_.h](hReturns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see }hjsbj)}(h>`Wikipedia `_h]h Wikipedia}(hjh Wikipediaubah}(h]h]h]h]h!]namejj/https://en.wikipedia.org/wiki/Vector_projectionuh%jhjubj)}(h2 h]h}(h] wikipediaah]h] wikipediaah]h!]refurij uh%jjKhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hj@sbah}(h]h](jj3eh]h]h!]uh%hhj<ubah}(h]h]h]h]h!] translatableuh%hhj8h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.0.2uh%jh&hh'h]h)Mhjubh )}(h## Vector2.project ##h]h## Vector2.project ##}hj]sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjtjjujjujjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM#copy() (pygame.math.Vector2 method)pygame.math.Vector2.copyhNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hcopyh](jo)}(hjh]hcopy}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjj Vector2.copyjjVector2copyjVector2.copy()uh%jVh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Returns a copy of itself.`h]h)}(hjh]hReturns a copy of itself.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`copy() -> Vector2`h]h)}(hjh]hcopy() -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h1Returns a new Vector2 having the same dimensions.h]h1Returns a new Vector2 having the same dimensions.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)Mhjubh )}(h## Vector2.copy ##h]h## Vector2.copy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj4jj5jj5jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.clamp_magnitude() (pygame.math.Vector2 method)#pygame.math.Vector2.clamp_magnitudehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hclamp_magnitudeh](jo)}(hjLh]hclamp_magnitude}hjNsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjJh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjJh&hh'h]h)Mubeh}(h]jEah](jjeh]h]h!]jjjjjVector2.clamp_magnitudejjVector2clamp_magnitudejVector2.clamp_magnitude()uh%jVh'h]h)MhjGh&hubj)}(hhh](hv)}(hhh](hz)}(h^:sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.`h]h)}(hjxh]hXReturns a copy of a vector with the magnitude clamped between max_length and min_length.}hjzsbah}(h]h]hah]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%h)hKhjsh&hh'h]h)Mubhz)}(h,:sg:`clamp_magnitude(max_length) -> Vector2`h]h)}(hjh]h&clamp_magnitude(max_length) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjsh&hh'h]h)Mubhz)}(h8:sg:`clamp_magnitude(min_length, max_length) -> Vector2`h]h)}(hjh]h2clamp_magnitude(min_length, max_length) -> Vector2}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjsh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjph&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%jhjubhQ feature still in development available for testing and feedback. It may change. }hjsbj)}(hb`Please leave clamp_magnitude feedback with authors `_h]h2Please leave clamp_magnitude feedback with authors}(hjh2Please leave clamp_magnitude feedback with authorsubah}(h]h]h]h]h!]name2Please leave clamp_magnitude feedback with authorsj*https://github.com/pygame/pygame/pull/2990uh%jhjubj)}(h- h]h}(h]2please-leave-clamp-magnitude-feedback-with-authorsah]h]2please leave clamp_magnitude feedback with authorsah]h!]refurijuh%jjKhjubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjph&hubh)}(hReturns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length``h](hBReturns a new copy of a vector with the magnitude clamped between }hjsbh;)}(h``max_length``h]h max_length}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``min_length``h]h min_length}hjsbah}(h]h]h]h]h!]uh%h:hjubh8. If only one argument is passed, it is taken to be the }hjsbh;)}(h``max_length``h]h max_length}hj(sbah}(h]h]h]h]h!]uh%h:hjubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjph&hubh)}(hThis function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative.h](hThis function raises }hj<sbh;)}(h``ValueError``h]h ValueError}hjDsbah}(h]h]h]h]h!]uh%h:hj<ubh if }hj<sbh;)}(h``min_length``h]h min_length}hjVsbah}(h]h]h]h]h!]uh%h:hj<ubh is greater than }hj<sbh;)}(h``max_length``h]h max_length}hjhsbah}(h]h]h]h]h!]uh%h:hj<ubh,, or if either of these values are negative.}hj<sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjph&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Mhjpubh )}(h## Vector2.clamp_magnitude ##h]h## Vector2.clamp_magnitude ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjph&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjGh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM1clamp_magnitude_ip() (pygame.math.Vector2 method)&pygame.math.Vector2.clamp_magnitude_iphNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hclamp_magnitude_iph](jo)}(hjh]hclamp_magnitude_ip}hjsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjVector2.clamp_magnitude_ipjjVector2clamp_magnitude_ipjVector2.clamp_magnitude_ip()uh%jVh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hE:sl:`Clamps the vector's magnitude between max_length and min_length`h]h)}(hj h]h?Clamps the vector's magnitude between max_length and min_length}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h,:sg:`clamp_magnitude_ip(max_length) -> None`h]h)}(hj h]h&clamp_magnitude_ip(max_length) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h8:sg:`clamp_magnitude_ip(min_length, max_length) -> None`h]h)}(hj. h]h2clamp_magnitude_ip(min_length, max_length) -> None}hj0 sbah}(h]h]jah]h]h!]uh%hhj, ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjM sbah}(h]h]h]h]h!]uh%jhjI ubhQ feature still in development available for testing and feedback. It may change. }hjI sbj)}(he`Please leave clamp_magnitude_ip feedback with authors `_h]h5Please leave clamp_magnitude_ip feedback with authors}(hj_ h5Please leave clamp_magnitude_ip feedback with authorsubah}(h]h]h]h]h!]name5Please leave clamp_magnitude_ip feedback with authorsj*https://github.com/pygame/pygame/pull/2990uh%jhjI ubj)}(h- h]h}(h]5please-leave-clamp-magnitude-ip-feedback-with-authorsah]h]5please leave clamp_magnitude_ip feedback with authorsah]h!]refurijp uh%jjKhjI ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hClamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length``h](h&Clamps the vector's magnitude between }hj sbh;)}(h``max_length``h]h max_length}hj sbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``min_length``h]h min_length}hj sbah}(h]h]h]h]h!]uh%h:hj ubh8. If only one argument is passed, it is taken to be the }hj sbh;)}(h``max_length``h]h max_length}hj sbah}(h]h]h]h]h!]uh%h:hj ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThis function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative.h](hThis function raises }hj sbh;)}(h``ValueError``h]h ValueError}hj sbah}(h]h]h]h]h!]uh%h:hj ubh if }hj sbh;)}(h``min_length``h]h min_length}hj sbah}(h]h]h]h]h!]uh%h:hj ubh is greater than }hj sbh;)}(h``max_length``h]h max_length}hj sbah}(h]h]h]h]h!]uh%h:hj ubh,, or if either of these values are negative.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj!sbah}(h]h](jj3eh]h]h!]uh%hhj !ubah}(h]h]h]h]h!] translatableuh%hhj!h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Mhjubh )}(h ## Vector2.clamp_magnitude_ip ##h]h ## Vector2.clamp_magnitude_ip ##}hj-!sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjD!jjE!jjE!jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%update() (pygame.math.Vector2 method)pygame.math.Vector2.updatehNtauh%hdhjh&hh'Nh)NubjR)}(hhh](jW)}(hupdateh](jo)}(hj\!h]hupdate}hj^!sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjZ!h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjZ!h&hh'h]h)Mubeh}(h]jU!ah](jjeh]h]h!]jjjjjVector2.updatejjVector2updatejVector2.update()uh%jVh'h]h)MhjW!h&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`Sets the coordinates of the vector.`h]h)}(hj!h]h#Sets the coordinates of the vector.}hj!sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update() -> None`h]h)}(hj!h]hupdate() -> None}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update(int) -> None`h]h)}(hj!h]hupdate(int) -> None}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update(float) -> None`h]h)}(hj!h]hupdate(float) -> None}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update(Vector2) -> None`h]h)}(hj!h]hupdate(Vector2) -> None}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update(x, y) -> None`h]h)}(hj!h]hupdate(x, y) -> None}hj!sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`update((x, y)) -> None`h]h)}(hj"h]hupdate((x, y)) -> None}hj"sbah}(h]h]jah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj!h&hh'h]h)Mubh)}(h"Sets coordinates x and y in place.h]h"Sets coordinates x and y in place.}hj-"sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj!h&hubj)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hjC"sbah}(h]h](jj3eh]h]h!]uh%hhj?"ubah}(h]h]h]h]h!] translatableuh%hhj;"h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF1.9.5uh%jh&hh'h]h)Mhj!ubh )}(h## Vector2.update ##h]h## Vector2.update ##}hj`"sbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjW!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjw"jjx"jjx"jjjjjjjuh%jQh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'epsilon (pygame.math.Vector2 attribute)pygame.math.Vector2.epsilonhNtauh%hdhjh&hh'h]h)NubjR)}(hhh](jW)}(hepsilonh]jo)}(hj"h]hepsilon}hj"sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj"h&hh'h]h)Mubah}(h]j"ah](jjeh]h]h!]jjjjjVector2.epsilonjjVector2epsilonjj"uh%jVh'h]h)Mhj"h&hubj)}(hhh](hv)}(hhh]hz)}(h6:sl:`Determines the tolerance of vector calculations.`h]h)}(hj"h]h0Determines the tolerance of vector calculations.}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mubah}(h]h]h]h]h!]uh%huhj"h&hh'h]h)Mubh)}(hBoth Vector classes have a value named ``epsilon`` that defaults to ``1e-6``. This value acts as a numerical margin in various methods to account for floating point arithmetic errors. Specifically, ``epsilon`` is used in the following places:h](h'Both Vector classes have a value named }hj"sbh;)}(h ``epsilon``h]hepsilon}hj"sbah}(h]h]h]h]h!]uh%h:hj"ubh that defaults to }hj"sbh;)}(h``1e-6``h]h1e-6}hj"sbah}(h]h]h]h]h!]uh%h:hj"ubhz. This value acts as a numerical margin in various methods to account for floating point arithmetic errors. Specifically, }hj"sbh;)}(h ``epsilon``h]hepsilon}hj"sbah}(h]h]h]h]h!]uh%h:hj"ubh! is used in the following places:}hj"sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubh block_quote)}(hX* comparing Vectors (``==`` and ``!=``) * the ``is_normalized`` method (if the square of the length is within ``epsilon`` of 1, it's normalized) * slerping (a Vector with a length of ``rotation (only used when rotating by a multiple of 90 degrees)h]h>rotation (only used when rotating by a multiple of 90 degrees)}hj#sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj#ubah}(h]h]h]h]h!]uh%j#h'h]h)Mhj#ubeh}(h]h]h]h]h!]bulletjuh%j#h'h]h)Mhj#ubah}(h]h]h]h]h!]uh%j#h'h]h)Mhj"h&hubh)}(hXWhile it's possible to change ``epsilon`` for a specific instance of a Vector, all the other Vectors will retain the default value. Changing ``epsilon`` on a specific instance however could lead to some asymmetric behavior where symmetry would be expected, such ash](hWhile it's possible to change }hj$sbh;)}(h ``epsilon``h]hepsilon}hj$sbah}(h]h]h]h]h!]uh%h:hj$ubhd for a specific instance of a Vector, all the other Vectors will retain the default value. Changing }hj$sbh;)}(h ``epsilon``h]hepsilon}hj($sbah}(h]h]h]h]h!]uh%h:hj$ubhp on a specific instance however could lead to some asymmetric behavior where symmetry would be expected, such as}hj$sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj"h&hubj)}(hu = pygame.Vector2(0, 1) v = pygame.Vector2(0, 1.2) u.epsilon = 0.5 # don't set it nearly this large print(u == v) # >> True print(v == u) # >> Falseh]hu = pygame.Vector2(0, 1) v = pygame.Vector2(0, 1.2) u.epsilon = 0.5 # don't set it nearly this large print(u == v) # >> True print(v == u) # >> False}hj@$sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhj"h&hubh)}(hYou'll probably never have to change ``epsilon`` from the default value, but in rare situations you might find that either the margin is too large or too small, in which case changing ``epsilon`` slightly might help you out.h](h%You'll probably never have to change }hjN$sbh;)}(h ``epsilon``h]hepsilon}hjV$sbah}(h]h]h]h]h!]uh%h:hjN$ubh from the default value, but in rare situations you might find that either the margin is too large or too small, in which case changing }hjN$sbh;)}(h ``epsilon``h]hepsilon}hjh$sbah}(h]h]h]h]h!]uh%h:hjN$ubh slightly might help you out.}hjN$sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj"h&hubeh}(h]h]h]h]h!]uh%jhj"h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jj$jj$jj$jjjjjjjuh%jQh&hhjh'h]h)Nubh )}(h## pygame.math.Vector2 ##h]h## pygame.math.Vector2 ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jj$jj$jj$jjjjjjjuh%jQh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jMVector3 (class in pygame.math)pygame.math.Vector3hNtauh%hdhh,h&hh'Nh)NubjR)}(hhh](jW)}(hVector3h](j])}(h pygame.math.h]h pygame.math.}hj$sbah}(h]h](jijjeh]h]h!]h#h$uh%j\hj$h&hh'h]h)Mubjo)}(hj$h]hVector3}hj$sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj$h&hh'h]h)Mubeh}(h]j$ah](jjeh]h]h!]jjjhjj$jjj$jj$uh%jVh'h]h)Mhj$h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`a 3-Dimensional Vector`h]h)}(hj$h]ha 3-Dimensional Vector}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M ubhz)}(h#:sg:`Vector3() -> Vector3(0, 0, 0)`h]h)}(hj%h]hVector3() -> Vector3(0, 0, 0)}hj%sbah}(h]h]jah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M!ubhz)}(h:sg:`Vector3(int) -> Vector3`h]h)}(hj%h]hVector3(int) -> Vector3}hj%sbah}(h]h]jah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M"ubhz)}(h:sg:`Vector3(float) -> Vector3`h]h)}(hj.%h]hVector3(float) -> Vector3}hj0%sbah}(h]h]jah]h]h!]uh%hhj,%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M#ubhz)}(h!:sg:`Vector3(Vector3) -> Vector3`h]h)}(hjE%h]hVector3(Vector3) -> Vector3}hjG%sbah}(h]h]jah]h]h!]uh%hhjC%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M$ubhz)}(h!:sg:`Vector3(x, y, z) -> Vector3`h]h)}(hj\%h]hVector3(x, y, z) -> Vector3}hj^%sbah}(h]h]jah]h]h!]uh%hhjZ%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M%ubhz)}(h#:sg:`Vector3((x, y, z)) -> Vector3`h]h)}(hjs%h]hVector3((x, y, z)) -> Vector3}hju%sbah}(h]h]jah]h]h!]uh%hhjq%ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)M&ubeh}(h]h]h]h]h!]uh%huhj$h&hh'h]h)M ubh)}(h1Some general information about the Vector3 class.h]h1Some general information about the Vector3 class.}hj%sbah}(h]h]h]h]h!]uh%hh'h]h)M(hj$h&hubj)}(hChanged in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclassh]h)}(hChanged in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclassh](h)}(hChanged in pygame 2.1.3: h]hChanged in pygame 2.1.3: }hj%sbah}(h]h](jj[eh]h]h!]uh%hhj%h&hh'h]h)M-ubhqInherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass}(hj%h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj%h&hh'h]h)M-ubah}(h]h]h]h]h!]jDversionchangedjF2.1.3uh%jh&hh'h]h)M*hj$ubhe)}(hhh]h}(h]h]h]h]h!]entries](jM"dot() (pygame.math.Vector3 method)pygame.math.Vector3.dothNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hdoth](jo)}(hj%h]hdot}hj%sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj%h&hh'h]h)M.ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj%h&hh'h]h)M.ubeh}(h]j%ah](jjeh]h]h!]jjjj$j Vector3.dotjjVector3dotj Vector3.dot()uh%jVh'h]h)M.hj%h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`calculates the dot- or scalar-product with the other vector`h]h)}(hj&h]h;calculates the dot- or scalar-product with the other vector}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)M0ubhz)}(h:sg:`dot(Vector3) -> float`h]h)}(hj&h]hdot(Vector3) -> float}hj&sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)M1ubeh}(h]h]h]h]h!]uh%huhj%h&hh'h]h)M0ubh )}(h## Vector3.dot ##h]h## Vector3.dot ##}hj6&sbah}(h]h]h]h]h!]h#h$uh%h hj%h&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%jhj%h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjM&jjN&jjN&jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM$cross() (pygame.math.Vector3 method)pygame.math.Vector3.crosshNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hcrossh](jo)}(hje&h]hcross}hjg&sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjc&h&hh'h]h)M5ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjc&h&hh'h]h)M5ubeh}(h]j^&ah](jjeh]h]h!]jjjj$j Vector3.crossjjVector3crossjVector3.cross()uh%jVh'h]h)M5hj`&h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`calculates the cross- or vector-product`h]h)}(hj&h]h'calculates the cross- or vector-product}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)M7ubhz)}(h:sg:`cross(Vector3) -> Vector3`h]h)}(hj&h]hcross(Vector3) -> Vector3}hj&sbah}(h]h]jah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)M7ubh)}(hcalculates the cross-product.h]hcalculates the cross-product.}hj&sbah}(h]h]h]h]h!]uh%hh'h]h)M:hj&h&hubh )}(h## Vector3.cross ##h]h## Vector3.cross ##}hj&sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)M<ubeh}(h]h]h]h]h!]uh%jhj`&h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj&jj&jj&jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(magnitude() (pygame.math.Vector3 method)pygame.math.Vector3.magnitudehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h magnitudeh](jo)}(hj'h]h magnitude}hj'sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj&h&hh'h]h)M>ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj&h&hh'h]h)M>ubeh}(h]j&ah](jjeh]h]h!]jjjj$jVector3.magnitudejjVector3 magnitudejVector3.magnitude()uh%jVh'h]h)M>hj&h&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`returns the Euclidean magnitude of the vector.`h]h)}(hj,'h]h.returns the Euclidean magnitude of the vector.}hj.'sbah}(h]h]hah]h]h!]uh%hhj*'ubah}(h]h]h]h]h!]uh%h)hKhj''h&hh'h]h)M@ubhz)}(h:sg:`magnitude() -> float`h]h)}(hjC'h]hmagnitude() -> float}hjE'sbah}(h]h]jah]h]h!]uh%hhjA'ubah}(h]h]h]h]h!]uh%h)hKhj''h&hh'h]h)MAubeh}(h]h]h]h]h!]uh%huhj$'h&hh'h]h)M@ubh)}(hcalculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)``h](hGcalculates the magnitude of the vector which follows from the theorem: }hj^'sbh;)}(h@``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)``h]h float`h]h)}(hj'h]hmagnitude_squared() -> float}hj'sbah}(h]h]jah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj'h&hh'h]h)MKubeh}(h]h]h]h]h!]uh%huhj'h&hh'h]h)MJubh)}(hcalculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.magnitude()`` because it avoids the square root.h](hGcalculates the magnitude of the vector which follows from the theorem: }hj(sbh;)}(h=``vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2``h]h9vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2}hj(sbah}(h]h]h]h]h!]uh%h:hj(ubh. This is faster than }hj(sbh;)}(h``vec.magnitude()``h]hvec.magnitude()}hj!(sbah}(h]h]h]h]h!]uh%h:hj(ubh# because it avoids the square root.}hj(sbeh}(h]h]h]h]h!]uh%hh'h]h)MMhj'h&hubh )}(h## Vector3.magnitude_squared ##h]h## Vector3.magnitude_squared ##}hj9(sbah}(h]h]h]h]h!]h#h$uh%h hj'h&hh'h]h)MSubeh}(h]h]h]h]h!]uh%jhj'h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjP(jjQ(jjQ(jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%length() (pygame.math.Vector3 method)pygame.math.Vector3.lengthhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hlengthh](jo)}(hjh(h]hlength}hjj(sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjf(h&hh'h]h)MUubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjf(h&hh'h]h)MUubeh}(h]ja(ah](jjeh]h]h!]jjjj$jVector3.lengthjjVector3lengthjVector3.length()uh%jVh'h]h)MUhjc(h&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`returns the Euclidean length of the vector.`h]h)}(hj(h]h+returns the Euclidean length of the vector.}hj(sbah}(h]h]hah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)MWubhz)}(h:sg:`length() -> float`h]h)}(hj(h]hlength() -> float}hj(sbah}(h]h]jah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)MXubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)MWubh)}(hcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)``h](hZcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: }hj(sbh;)}(h=``vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)``h]h9vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)}hj(sbah}(h]h]h]h]h!]uh%h:hj(ubeh}(h]h]h]h]h!]uh%hh'h]h)MZhj(h&hubh )}(h## Vector3.length ##h]h## Vector3.length ##}hj(sbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)M^ubeh}(h]h]h]h]h!]uh%jhjc(h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj(jj(jj(jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM-length_squared() (pygame.math.Vector3 method)"pygame.math.Vector3.length_squaredhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hlength_squaredh](jo)}(hj)h]hlength_squared}hj)sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj)h&hh'h]h)M`ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj)h&hh'h]h)M`ubeh}(h]j )ah](jjeh]h]h!]jjjj$jVector3.length_squaredjjVector3length_squaredjVector3.length_squared()uh%jVh'h]h)M`hj )h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns the squared Euclidean length of the vector.`h]h)}(hj=)h]h3returns the squared Euclidean length of the vector.}hj?)sbah}(h]h]hah]h]h!]uh%hhj;)ubah}(h]h]h]h]h!]uh%h)hKhj8)h&hh'h]h)Mbubhz)}(h:sg:`length_squared() -> float`h]h)}(hjT)h]hlength_squared() -> float}hjV)sbah}(h]h]jah]h]h!]uh%hhjR)ubah}(h]h]h]h]h!]uh%h)hKhj8)h&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%huhj5)h&hh'h]h)Mbubh)}(hcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.length()`` because it avoids the square root.h](hZcalculates the Euclidean length of the vector which follows from the Pythagorean theorem: }hjo)sbh;)}(h:``vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2``h]h6vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2}hjw)sbah}(h]h]h]h]h!]uh%h:hjo)ubh. This is faster than }hjo)sbh;)}(h``vec.length()``h]h vec.length()}hj)sbah}(h]h]h]h]h!]uh%h:hjo)ubh# because it avoids the square root.}hjo)sbeh}(h]h]h]h]h!]uh%hh'h]h)Mehj5)h&hubh )}(h## Vector3.length_squared ##h]h## Vector3.length_squared ##}hj)sbah}(h]h]h]h]h!]h#h$uh%h hj5)h&hh'h]h)Mjubeh}(h]h]h]h]h!]uh%jhj )h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj)jj)jj)jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(normalize() (pygame.math.Vector3 method)pygame.math.Vector3.normalizehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h normalizeh](jo)}(hj)h]h normalize}hj)sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj)h&hh'h]h)Mlubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj)h&hh'h]h)Mlubeh}(h]j)ah](jjeh]h]h!]jjjj$jVector3.normalizejjVector3 normalizejVector3.normalize()uh%jVh'h]h)Mlhj)h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`returns a vector with the same direction but length 1.`h]h)}(hj)h]h6returns a vector with the same direction but length 1.}hj)sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mnubhz)}(h:sg:`normalize() -> Vector3`h]h)}(hj*h]hnormalize() -> Vector3}hj*sbah}(h]h]jah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Moubeh}(h]h]h]h]h!]uh%huhj)h&hh'h]h)Mnubh)}(hWReturns a new vector that has ``length`` equal to ``1`` and the same direction as self.h](hReturns a new vector that has }hj.*sbh;)}(h ``length``h]hlength}hj6*sbah}(h]h]h]h]h!]uh%h:hj.*ubh equal to }hj.*sbh;)}(h``1``h]h1}hjH*sbah}(h]h]h]h]h!]uh%h:hj.*ubh and the same direction as self.}hj.*sbeh}(h]h]h]h]h!]uh%hh'h]h)Mqhj)h&hubh )}(h## Vector3.normalize ##h]h## Vector3.normalize ##}hj`*sbah}(h]h]h]h]h!]h#h$uh%h hj)h&hh'h]h)Mtubeh}(h]h]h]h]h!]uh%jhj)h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjw*jjx*jjx*jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+normalize_ip() (pygame.math.Vector3 method) pygame.math.Vector3.normalize_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h normalize_iph](jo)}(hj*h]h normalize_ip}hj*sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj*h&hh'h]h)Mvubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj*h&hh'h]h)Mvubeh}(h]j*ah](jjeh]h]h!]jjjj$jVector3.normalize_ipjjVector3 normalize_ipjVector3.normalize_ip()uh%jVh'h]h)Mvhj*h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`normalizes the vector in place so that its length is 1.`h]h)}(hj*h]h7normalizes the vector in place so that its length is 1.}hj*sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mxubhz)}(h:sg:`normalize_ip() -> None`h]h)}(hj*h]hnormalize_ip() -> None}hj*sbah}(h]h]jah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Myubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)Mxubh)}(hkNormalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed.h](h%Normalizes the vector so that it has }hj*sbh;)}(h ``length``h]hlength}hj*sbah}(h]h]h]h]h!]uh%h:hj*ubh equal to }hj*sbh;)}(h``1``h]h1}hj+sbah}(h]h]h]h]h!]uh%h:hj*ubh-. The direction of the vector is not changed.}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)M{hj*h&hubh )}(h## Vector3.normalize_ip ##h]h## Vector3.normalize_ip ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%jhj*h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj6+jj7+jj7+jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,is_normalized() (pygame.math.Vector3 method)!pygame.math.Vector3.is_normalizedhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h is_normalizedh](jo)}(hjN+h]h is_normalized}hjP+sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjL+h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjL+h&hh'h]h)Mubeh}(h]jG+ah](jjeh]h]h!]jjjj$jVector3.is_normalizedjjVector3 is_normalizedjVector3.is_normalized()uh%jVh'h]h)MhjI+h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`tests if the vector is normalized i.e. has length == 1.`h]h)}(hjz+h]h7tests if the vector is normalized i.e. has length == 1.}hj|+sbah}(h]h]hah]h]h!]uh%hhjx+ubah}(h]h]h]h]h!]uh%h)hKhju+h&hh'h]h)Mubhz)}(h:sg:`is_normalized() -> Bool`h]h)}(hj+h]his_normalized() -> Bool}hj+sbah}(h]h]jah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhju+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjr+h&hh'h]h)Mubh)}(hYReturns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``.h](hReturns True if the vector has }hj+sbh;)}(h ``length``h]hlength}hj+sbah}(h]h]h]h]h!]uh%h:hj+ubh equal to }hj+sbh;)}(h``1``h]h1}hj+sbah}(h]h]h]h]h!]uh%h:hj+ubh. Otherwise it returns }hj+sbh;)}(h ``False``h]hFalse}hj+sbah}(h]h]h]h]h!]uh%h:hj+ubh.}hj+sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjr+h&hubh )}(h## Vector3.is_normalized ##h]h## Vector3.is_normalized ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hjr+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjI+h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj,jj,jj,jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.scale_to_length() (pygame.math.Vector3 method)#pygame.math.Vector3.scale_to_lengthhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hscale_to_lengthh](jo)}(hj,h]hscale_to_length}hj!,sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj,h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj,h&hh'h]h)Mubeh}(h]j,ah](jjeh]h]h!]jjjj$jVector3.scale_to_lengthjjVector3scale_to_lengthjVector3.scale_to_length()uh%jVh'h]h)Mhj,h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`scales the vector to a given length.`h]h)}(hjK,h]h$scales the vector to a given length.}hjM,sbah}(h]h]hah]h]h!]uh%hhjI,ubah}(h]h]h]h]h!]uh%h)hKhjF,h&hh'h]h)Mubhz)}(h$:sg:`scale_to_length(float) -> None`h]h)}(hjb,h]hscale_to_length(float) -> None}hjd,sbah}(h]h]jah]h]h!]uh%hhj`,ubah}(h]h]h]h]h!]uh%h)hKhjF,h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjC,h&hh'h]h)Mubh)}(hScales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised.h](h|Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length }hj},sbh;)}(h``0``h]h0}hj,sbah}(h]h]h]h]h!]uh%h:hj},ubh4. If the vector is the zero vector (i.e. has length }hj},sbh;)}(h``0``h]h0}hj,sbah}(h]h]h]h]h!]uh%h:hj},ubh thus no direction) a }hj},sbh;)}(h``ValueError``h]h ValueError}hj,sbah}(h]h]h]h]h!]uh%h:hj},ubh is raised.}hj},sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjC,h&hubh )}(h## Vector3.scale_to_length ##h]h## Vector3.scale_to_length ##}hj,sbah}(h]h]h]h]h!]h#h$uh%h hjC,h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj,h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj,jj,jj,jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM&reflect() (pygame.math.Vector3 method)pygame.math.Vector3.reflecthNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hreflecth](jo)}(hj,h]hreflect}hj,sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj,h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj,h&hh'h]h)Mubeh}(h]j,ah](jjeh]h]h!]jjjj$jVector3.reflectjjVector3reflectjVector3.reflect()uh%jVh'h]h)Mhj,h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`returns a vector reflected of a given normal.`h]h)}(hj-h]h-returns a vector reflected of a given normal.}hj-sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubhz)}(h!:sg:`reflect(Vector3) -> Vector3`h]h)}(hj3-h]hreflect(Vector3) -> Vector3}hj5-sbah}(h]h]jah]h]h!]uh%hhj1-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Mubh)}(hReturns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.h]hReturns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.}hjN-sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj-h&hubh )}(h## Vector3.reflect ##h]h## Vector3.reflect ##}hj\-sbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj,h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjs-jjt-jjt-jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM)reflect_ip() (pygame.math.Vector3 method)pygame.math.Vector3.reflect_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h reflect_iph](jo)}(hj-h]h reflect_ip}hj-sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj-h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj-h&hh'h]h)Mubeh}(h]j-ah](jjeh]h]h!]jjjj$jVector3.reflect_ipjjVector3 reflect_ipjVector3.reflect_ip()uh%jVh'h]h)Mhj-h&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`reflect the vector of a given normal in place.`h]h)}(hj-h]h.reflect the vector of a given normal in place.}hj-sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubhz)}(h!:sg:`reflect_ip(Vector3) -> None`h]h)}(hj-h]hreflect_ip(Vector3) -> None}hj-sbah}(h]h]jah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Mubh)}(hlChanges the direction of self as if it would have been reflected of a surface with the given surface normal.h]hlChanges the direction of self as if it would have been reflected of a surface with the given surface normal.}hj-sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj-h&hubh )}(h## Vector3.reflect_ip ##h]h## Vector3.reflect_ip ##}hj-sbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj-h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj.jj.jj.jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*distance_to() (pygame.math.Vector3 method)pygame.math.Vector3.distance_tohNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h distance_toh](jo)}(hj&.h]h distance_to}hj(.sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj$.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj$.h&hh'h]h)Mubeh}(h]j.ah](jjeh]h]h!]jjjj$jVector3.distance_tojjVector3 distance_tojVector3.distance_to()uh%jVh'h]h)Mhj!.h&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`calculates the Euclidean distance to a given vector.`h]h)}(hjR.h]h4calculates the Euclidean distance to a given vector.}hjT.sbah}(h]h]hah]h]h!]uh%hhjP.ubah}(h]h]h]h]h!]uh%h)hKhjM.h&hh'h]h)Mubhz)}(h#:sg:`distance_to(Vector3) -> float`h]h)}(hji.h]hdistance_to(Vector3) -> float}hjk.sbah}(h]h]jah]h]h!]uh%hhjg.ubah}(h]h]h]h]h!]uh%h)hKhjM.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjJ.h&hh'h]h)Mubh )}(h## Vector3.distance_to ##h]h## Vector3.distance_to ##}hj.sbah}(h]h]h]h]h!]h#h$uh%h hjJ.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj!.h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj.jj.jj.jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM2distance_squared_to() (pygame.math.Vector3 method)'pygame.math.Vector3.distance_squared_tohNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hdistance_squared_toh](jo)}(hj.h]hdistance_squared_to}hj.sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Mubeh}(h]j.ah](jjeh]h]h!]jjjj$jVector3.distance_squared_tojjVector3distance_squared_tojVector3.distance_squared_to()uh%jVh'h]h)Mhj.h&hubj)}(hhh](hv)}(hhh](hz)}(hB:sl:`calculates the squared Euclidean distance to a given vector.`h]h)}(hj.h]h float`h]h)}(hj.h]h%distance_squared_to(Vector3) -> float}hj.sbah}(h]h]jah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj.h&hh'h]h)Mubh )}(h!## Vector3.distance_squared_to ##h]h!## Vector3.distance_squared_to ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hj.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj.h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj(/jj)/jj)/jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+move_towards() (pygame.math.Vector3 method) pygame.math.Vector3.move_towardshNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h move_towardsh](jo)}(hj@/h]h move_towards}hjB/sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj>/h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj>/h&hh'h]h)Mubeh}(h]j9/ah](jjeh]h]h!]jjjj$jVector3.move_towardsjjVector3 move_towardsjVector3.move_towards()uh%jVh'h]h)Mhj;/h&hubj)}(hhh](hv)}(hhh](hz)}(hC:sl:`returns a vector moved toward the target by a given distance.`h]h)}(hjl/h]h=returns a vector moved toward the target by a given distance.}hjn/sbah}(h]h]hah]h]h!]uh%hhjj/ubah}(h]h]h]h]h!]uh%h)hKhjg/h&hh'h]h)Mubhz)}(h-:sg:`move_towards(Vector3, float) -> Vector3`h]h)}(hj/h]h'move_towards(Vector3, float) -> Vector3}hj/sbah}(h]h]jah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhjg/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjd/h&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hj/sbah}(h]h]h]h]h!]uh%jhj/ubhQ feature still in development available for testing and feedback. It may change. }hj/sbj)}(h_`Please leave move_towards feedback with authors `_h]h/Please leave move_towards feedback with authors}(hj/h/Please leave move_towards feedback with authorsubah}(h]h]h]h]h!]name/Please leave move_towards feedback with authorsj*https://github.com/pygame/pygame/pull/2929uh%jhj/ubj)}(h- h]h}(h]id1ah]h]h]/please leave move_towards feedback with authorsah!]refurij/uh%jjhj/ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhjd/h&hubh)}(hX;Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.h]hX;Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.}hj/sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjd/h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj/sbah}(h]h](jj3eh]h]h!]uh%hhj/ubah}(h]h]h]h]h!] translatableuh%hhj/h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Mhjd/ubh )}(h## Vector3.move_towards ##h]h## Vector3.move_towards ##}hj 0sbah}(h]h]h]h]h!]h#h$uh%h hjd/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj;/h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj#0jj$0jj$0jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.move_towards_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.move_towards_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hmove_towards_iph](jo)}(hj;0h]hmove_towards_ip}hj=0sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj90h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj90h&hh'h]h)Mubeh}(h]j40ah](jjeh]h]h!]jjjj$jVector3.move_towards_ipjjVector3move_towards_ipjVector3.move_towards_ip()uh%jVh'h]h)Mhj60h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`moves the vector toward its target at a given distance.`h]h)}(hjg0h]h7moves the vector toward its target at a given distance.}hji0sbah}(h]h]hah]h]h!]uh%hhje0ubah}(h]h]h]h]h!]uh%h)hKhjb0h&hh'h]h)Mubhz)}(h-:sg:`move_towards_ip(Vector3, float) -> None`h]h)}(hj~0h]h'move_towards_ip(Vector3, float) -> None}hj0sbah}(h]h]jah]h]h!]uh%hhj|0ubah}(h]h]h]h]h!]uh%h)hKhjb0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj_0h&hh'h]h)Mubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hj0sbah}(h]h]h]h]h!]uh%jhj0ubhQ feature still in development available for testing and feedback. It may change. }hj0sbj)}(hb`Please leave move_towards_ip feedback with authors `_h]h2Please leave move_towards_ip feedback with authors}(hj0h2Please leave move_towards_ip feedback with authorsubah}(h]h]h]h]h!]name2Please leave move_towards_ip feedback with authorsj*https://github.com/pygame/pygame/pull/2929uh%jhj0ubj)}(h- h]h}(h]id2ah]h]h]2please leave move_towards_ip feedback with authorsah!]refurij0uh%jjhj0ubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_0h&hubh)}(hX'Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.h]hX'Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.}hj0sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj_0h&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hj0sbah}(h]h](jj3eh]h]h!]uh%hhj0ubah}(h]h]h]h]h!] translatableuh%hhj0h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)Mhj_0ubh )}(h## Vector3.move_towards_ip ##h]h## Vector3.move_towards_ip ##}hj1sbah}(h]h]h]h]h!]h#h$uh%h hj_0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj60h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj1jj1jj1jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM#lerp() (pygame.math.Vector3 method)pygame.math.Vector3.lerphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hlerph](jo)}(hj61h]hlerp}hj81sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj41h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj41h&hh'h]h)Mubeh}(h]j/1ah](jjeh]h]h!]jjjj$j Vector3.lerpjjVector3lerpjVector3.lerp()uh%jVh'h]h)Mhj11h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns a linear interpolation to the given vector.`h]h)}(hjb1h]h3returns a linear interpolation to the given vector.}hjd1sbah}(h]h]hah]h]h!]uh%hhj`1ubah}(h]h]h]h]h!]uh%h)hKhj]1h&hh'h]h)Mubhz)}(h%:sg:`lerp(Vector3, float) -> Vector3`h]h)}(hjy1h]hlerp(Vector3, float) -> Vector3}hj{1sbah}(h]h]jah]h]h!]uh%hhjw1ubah}(h]h]h]h]h!]uh%h)hKhj]1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjZ1h&hh'h]h)Mubh)}(hXReturns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between ``0`` and ``1``, where ``0`` means self and ``1`` means other will be returned.h](hReturns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between }hj1sbh;)}(h``0``h]h0}hj1sbah}(h]h]h]h]h!]uh%h:hj1ubh and }hj1sbh;)}(h``1``h]h1}hj1sbah}(h]h]h]h]h!]uh%h:hj1ubh, where }hj1sbh;)}(h``0``h]h0}hj1sbah}(h]h]h]h]h!]uh%h:hj1ubh means self and }hj1sbh;)}(h``1``h]h1}hj1sbah}(h]h]h]h]h!]uh%h:hj1ubh means other will be returned.}hj1sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjZ1h&hubh )}(h## Vector3.lerp ##h]h## Vector3.lerp ##}hj1sbah}(h]h]h]h]h!]h#h$uh%h hjZ1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj11h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj2jj2jj2jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM$slerp() (pygame.math.Vector3 method)pygame.math.Vector3.slerphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hslerph](jo)}(hj2h]hslerp}hj2sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj2h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj2h&hh'h]h)Mubeh}(h]j2ah](jjeh]h]h!]jjjj$j Vector3.slerpjjVector3slerpjVector3.slerp()uh%jVh'h]h)Mhj2h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`returns a spherical interpolation to the given vector.`h]h)}(hjE2h]h6returns a spherical interpolation to the given vector.}hjG2sbah}(h]h]hah]h]h!]uh%hhjC2ubah}(h]h]h]h]h!]uh%h)hKhj@2h&hh'h]h)Mubhz)}(h&:sg:`slerp(Vector3, float) -> Vector3`h]h)}(hj\2h]h slerp(Vector3, float) -> Vector3}hj^2sbah}(h]h]jah]h]h!]uh%hhjZ2ubah}(h]h]h]h]h!]uh%h)hKhj@2h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj=2h&hh'h]h)Mubh)}(hX;Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.h](hCalculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range }hjw2sbh;)}(h ``[-1, 1]``h]h[-1, 1]}hj2sbah}(h]h]h]h]h!]uh%h:hjw2ubh. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.}hjw2sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj=2h&hubh )}(h## Vector3.slerp ##h]h## Vector3.slerp ##}hj2sbah}(h]h]h]h]h!]h#h$uh%h hj=2h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj2h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj2jj2jj2jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*elementwise() (pygame.math.Vector3 method)pygame.math.Vector3.elementwisehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h elementwiseh](jo)}(hj2h]h elementwise}hj2sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj2h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj2h&hh'h]h)Mubeh}(h]j2ah](jjeh]h]h!]jjjj$jVector3.elementwisejjVector3 elementwisejVector3.elementwise()uh%jVh'h]h)Mhj2h&hubj)}(hhh](hv)}(hhh](hz)}(h7:sl:`The next operation will be performed elementwise.`h]h)}(hj2h]h1The next operation will be performed elementwise.}hj2sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Mubhz)}(h-:sg:`elementwise() -> VectorElementwiseProxy`h]h)}(hj 3h]h'elementwise() -> VectorElementwiseProxy}hj 3sbah}(h]h]jah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj2h&hh'h]h)Mubh)}(h>Applies the following operation to each element of the vector.h]h>Applies the following operation to each element of the vector.}hj$3sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj2h&hubh )}(h## Vector3.elementwise ##h]h## Vector3.elementwise ##}hj23sbah}(h]h]h]h]h!]h#h$uh%h hj2h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj2h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjI3jjJ3jjJ3jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%rotate() (pygame.math.Vector3 method)pygame.math.Vector3.rotatehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotateh](jo)}(hja3h]hrotate}hjc3sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj_3h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj_3h&hh'h]h)Mubeh}(h]jZ3ah](jjeh]h]h!]jjjj$jVector3.rotatejjVector3rotatejVector3.rotate()uh%jVh'h]h)Mhj\3h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`rotates a vector by a given angle in degrees.`h]h)}(hj3h]h-rotates a vector by a given angle in degrees.}hj3sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubhz)}(h':sg:`rotate(angle, Vector3) -> Vector3`h]h)}(hj3h]h!rotate(angle, Vector3) -> Vector3}hj3sbah}(h]h]jah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj3h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj3h&hh'h]h)Mubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj3sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj3h&hubh )}(h## Vector3.rotate ##h]h## Vector3.rotate ##}hj3sbah}(h]h]h]h]h!]h#h$uh%h hj3h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj\3h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj3jj3jj3jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM)rotate_rad() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_radh](jo)}(hj3h]h rotate_rad}hj3sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj3h&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj3h&hh'h]h)M ubeh}(h]j3ah](jjeh]h]h!]jjjj$jVector3.rotate_radjjVector3 rotate_radjVector3.rotate_rad()uh%jVh'h]h)M hj3h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`rotates a vector by a given angle in radians.`h]h)}(hj(4h]h-rotates a vector by a given angle in radians.}hj*4sbah}(h]h]hah]h]h!]uh%hhj&4ubah}(h]h]h]h]h!]uh%h)hKhj#4h&hh'h]h)M ubhz)}(h+:sg:`rotate_rad(angle, Vector3) -> Vector3`h]h)}(hj?4h]h%rotate_rad(angle, Vector3) -> Vector3}hjA4sbah}(h]h]jah]h]h!]uh%hhj=4ubah}(h]h]h]h]h!]uh%h)hKhj#4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj 4h&hh'h]h)M ubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjZ4sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj 4h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjp4sbah}(h]h](jj3eh]h]h!]uh%hhjl4ubah}(h]h]h]h]h!] translatableuh%hhjh4h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)Mhj 4ubh )}(h## Vector3.rotate_rad ##h]h## Vector3.rotate_rad ##}hj4sbah}(h]h]h]h]h!]h#h$uh%h hj 4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj3h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj4jj4jj4jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM(rotate_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_iph](jo)}(hj4h]h rotate_ip}hj4sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj4h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj4h&hh'h]h)Mubeh}(h]j4ah](jjeh]h]h!]jjjj$jVector3.rotate_ipjjVector3 rotate_ipjVector3.rotate_ip()uh%jVh'h]h)Mhj4h&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in degrees in place.`h]h)}(hj4h]h8rotates the vector by a given angle in degrees in place.}hj4sbah}(h]h]hah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubhz)}(h':sg:`rotate_ip(angle, Vector3) -> None`h]h)}(hj4h]h!rotate_ip(angle, Vector3) -> None}hj5sbah}(h]h]jah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj4h&hh'h]h)Mubh)}(hRotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj5sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj4h&hubh )}(h## Vector3.rotate_ip ##h]h## Vector3.rotate_ip ##}hj(5sbah}(h]h]h]h]h!]h#h$uh%h hj4h&hh'h]h)M#ubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj?5jj@5jj@5jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,rotate_ip_rad() (pygame.math.Vector3 method)!pygame.math.Vector3.rotate_ip_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_ip_radh](jo)}(hjW5h]h rotate_ip_rad}hjY5sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjU5h&hh'h]h)M%ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjU5h&hh'h]h)M%ubeh}(h]jP5ah](jjeh]h]h!]jjjj$jVector3.rotate_ip_radjjVector3 rotate_ip_radjVector3.rotate_ip_rad()uh%jVh'h]h)M%hjR5h&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in radians in place.`h]h)}(hj5h]h8rotates the vector by a given angle in radians in place.}hj5sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj~5h&hh'h]h)M'ubhz)}(h+:sg:`rotate_ip_rad(angle, Vector3) -> None`h]h)}(hj5h]h%rotate_ip_rad(angle, Vector3) -> None}hj5sbah}(h]h]jah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj~5h&hh'h]h)M(ubeh}(h]h]h]h]h!]uh%huhj{5h&hh'h]h)M'ubh)}(h(DEPRECATED: Use rotate_rad_ip() instead.h]h(DEPRECATED: Use rotate_rad_ip() instead.}hj5sbah}(h]h]h]h]h!]uh%hh'h]h)M*hj{5h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj5sbah}(h]h](jj3eh]h]h!]uh%hhj5ubah}(h]h]h]h]h!] translatableuh%hhj5h&hh'h]h)M,ubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)M,hj{5ubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj5sbah}(h]h](jjGeh]h]h!]uh%hhj5ubah}(h]h]h]h]h!] translatableuh%hhj5h&hh'h]h)M.ubah}(h]h]h]h]h!]jD deprecatedjF2.1.1uh%jh&hh'h]h)M-hj{5ubh )}(h## Vector3.rotate_ip_rad ##h]h## Vector3.rotate_ip_rad ##}hj 6sbah}(h]h]h]h]h!]h#h$uh%h hj{5h&hh'h]h)M/ubeh}(h]h]h]h]h!]uh%jhjR5h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj$6jj%6jj%6jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM,rotate_rad_ip() (pygame.math.Vector3 method)!pygame.math.Vector3.rotate_rad_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_rad_iph](jo)}(hj<6h]h rotate_rad_ip}hj>6sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj:6h&hh'h]h)M1ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj:6h&hh'h]h)M1ubeh}(h]j56ah](jjeh]h]h!]jjjj$jVector3.rotate_rad_ipjjVector3 rotate_rad_ipjVector3.rotate_rad_ip()uh%jVh'h]h)M1hj76h&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`rotates the vector by a given angle in radians in place.`h]h)}(hjh6h]h8rotates the vector by a given angle in radians in place.}hjj6sbah}(h]h]hah]h]h!]uh%hhjf6ubah}(h]h]h]h]h!]uh%h)hKhjc6h&hh'h]h)M3ubhz)}(h+:sg:`rotate_rad_ip(angle, Vector3) -> None`h]h)}(hj6h]h%rotate_rad_ip(angle, Vector3) -> None}hj6sbah}(h]h]jah]h]h!]uh%hhj}6ubah}(h]h]h]h]h!]uh%h)hKhjc6h&hh'h]h)M4ubeh}(h]h]h]h]h!]uh%huhj`6h&hh'h]h)M3ubh)}(hRotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj6sbah}(h]h]h]h]h!]uh%hh'h]h)M6hj`6h&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hj6sbah}(h]h](jj3eh]h]h!]uh%hhj6ubah}(h]h]h]h]h!] translatableuh%hhj6h&hh'h]h)M<ubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)M;hj`6ubh )}(h## Vector3.rotate_rad_ip ##h]h## Vector3.rotate_rad_ip ##}hj6sbah}(h]h]h]h]h!]h#h$uh%h hj`6h&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%jhj76h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj6jj6jj6jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'rotate_x() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_xhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_xh](jo)}(hj6h]hrotate_x}hj6sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj6h&hh'h]h)M?ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj6h&hh'h]h)M?ubeh}(h]j6ah](jjeh]h]h!]jjjj$jVector3.rotate_xjjVector3rotate_xjVector3.rotate_x()uh%jVh'h]h)M?hj6h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the x-axis by the angle in degrees.`h]h)}(hj(7h]h;rotates a vector around the x-axis by the angle in degrees.}hj*7sbah}(h]h]hah]h]h!]uh%hhj&7ubah}(h]h]h]h]h!]uh%h)hKhj#7h&hh'h]h)MAubhz)}(h :sg:`rotate_x(angle) -> Vector3`h]h)}(hj?7h]hrotate_x(angle) -> Vector3}hjA7sbah}(h]h]jah]h]h!]uh%hhj=7ubah}(h]h]h]h]h!]uh%h)hKhj#7h&hh'h]h)MBubeh}(h]h]h]h]h!]uh%huhj 7h&hh'h]h)MAubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjZ7sbah}(h]h]h]h]h!]uh%hh'h]h)MDhj 7h&hubh )}(h## Vector3.rotate_x ##h]h## Vector3.rotate_x ##}hjh7sbah}(h]h]h]h]h!]h#h$uh%h hj 7h&hh'h]h)MIubeh}(h]h]h]h]h!]uh%jhj6h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj7jj7jj7jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+rotate_x_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_x_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_x_radh](jo)}(hj7h]h rotate_x_rad}hj7sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj7h&hh'h]h)MKubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj7h&hh'h]h)MKubeh}(h]j7ah](jjeh]h]h!]jjjj$jVector3.rotate_x_radjjVector3 rotate_x_radjVector3.rotate_x_rad()uh%jVh'h]h)MKhj7h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the x-axis by the angle in radians.`h]h)}(hj7h]h;rotates a vector around the x-axis by the angle in radians.}hj7sbah}(h]h]hah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)MMubhz)}(h$:sg:`rotate_x_rad(angle) -> Vector3`h]h)}(hj7h]hrotate_x_rad(angle) -> Vector3}hj7sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)MNubeh}(h]h]h]h]h!]uh%huhj7h&hh'h]h)MMubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj7sbah}(h]h]h]h]h!]uh%hh'h]h)MPhj7h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj 8sbah}(h]h](jj3eh]h]h!]uh%hhj8ubah}(h]h]h]h]h!] translatableuh%hhj8h&hh'h]h)MVubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)MUhj7ubh )}(h## Vector3.rotate_x_rad ##h]h## Vector3.rotate_x_rad ##}hj(8sbah}(h]h]h]h]h!]h#h$uh%h hj7h&hh'h]h)MWubeh}(h]h]h]h]h!]uh%jhj7h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj?8jj@8jj@8jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*rotate_x_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_x_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_x_iph](jo)}(hjW8h]h rotate_x_ip}hjY8sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjU8h&hh'h]h)MYubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjU8h&hh'h]h)MYubeh}(h]jP8ah](jjeh]h]h!]jjjj$jVector3.rotate_x_ipjjVector3 rotate_x_ipjVector3.rotate_x_ip()uh%jVh'h]h)MYhjR8h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the x-axis by the angle in degrees in place.`h]h)}(hj8h]hFrotates the vector around the x-axis by the angle in degrees in place.}hj8sbah}(h]h]hah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhj~8h&hh'h]h)M[ubhz)}(h :sg:`rotate_x_ip(angle) -> None`h]h)}(hj8h]hrotate_x_ip(angle) -> None}hj8sbah}(h]h]jah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhj~8h&hh'h]h)M\ubeh}(h]h]h]h]h!]uh%huhj{8h&hh'h]h)M[ubh)}(hRotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj8sbah}(h]h]h]h]h!]uh%hh'h]h)M^hj{8h&hubh )}(h## Vector3.rotate_x_ip ##h]h## Vector3.rotate_x_ip ##}hj8sbah}(h]h]h]h]h!]h#h$uh%h hj{8h&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%jhjR8h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj8jj8jj8jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_x_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_x_ip_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_x_ip_radh](jo)}(hj8h]hrotate_x_ip_rad}hj8sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj8h&hh'h]h)Meubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj8h&hh'h]h)Meubeh}(h]j8ah](jjeh]h]h!]jjjj$jVector3.rotate_x_ip_radjjVector3rotate_x_ip_radjVector3.rotate_x_ip_rad()uh%jVh'h]h)Mehj8h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the x-axis by the angle in radians in place.`h]h)}(hj9h]hFrotates the vector around the x-axis by the angle in radians in place.}hj 9sbah}(h]h]hah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Mgubhz)}(h$:sg:`rotate_x_ip_rad(angle) -> None`h]h)}(hj59h]hrotate_x_ip_rad(angle) -> None}hj79sbah}(h]h]jah]h]h!]uh%hhj39ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Mhubeh}(h]h]h]h]h!]uh%huhj9h&hh'h]h)Mgubh)}(h*DEPRECATED: Use rotate_x_rad_ip() instead.h]h*DEPRECATED: Use rotate_x_rad_ip() instead.}hjP9sbah}(h]h]h]h]h!]uh%hh'h]h)Mjhj9h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjf9sbah}(h]h](jj3eh]h]h!]uh%hhjb9ubah}(h]h]h]h]h!] translatableuh%hhj^9h&hh'h]h)Mlubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)Mlhj9ubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj9sbah}(h]h](jjGeh]h]h!]uh%hhj9ubah}(h]h]h]h]h!] translatableuh%hhj9h&hh'h]h)Mnubah}(h]h]h]h]h!]jD deprecatedjF2.1.1uh%jh&hh'h]h)Mmhj9ubh )}(h## Vector3.rotate_x_ip_rad ##h]h## Vector3.rotate_x_ip_rad ##}hj9sbah}(h]h]h]h]h!]h#h$uh%h hj9h&hh'h]h)Moubeh}(h]h]h]h]h!]uh%jhj8h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj9jj9jj9jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_x_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_x_rad_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_x_rad_iph](jo)}(hj9h]hrotate_x_rad_ip}hj9sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj9h&hh'h]h)Mqubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj9h&hh'h]h)Mqubeh}(h]j9ah](jjeh]h]h!]jjjj$jVector3.rotate_x_rad_ipjjVector3rotate_x_rad_ipjVector3.rotate_x_rad_ip()uh%jVh'h]h)Mqhj9h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the x-axis by the angle in radians in place.`h]h)}(hj:h]hFrotates the vector around the x-axis by the angle in radians in place.}hj:sbah}(h]h]hah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Msubhz)}(h$:sg:`rotate_x_rad_ip(angle) -> None`h]h)}(hj:h]hrotate_x_rad_ip(angle) -> None}hj:sbah}(h]h]jah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)Mtubeh}(h]h]h]h]h!]uh%huhj9h&hh'h]h)Msubh)}(hRotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj5:sbah}(h]h]h]h]h!]uh%hh'h]h)Mvhj9h&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hjK:sbah}(h]h](jj3eh]h]h!]uh%hhjG:ubah}(h]h]h]h]h!] translatableuh%hhjC:h&hh'h]h)M|ubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)M{hj9ubh )}(h## Vector3.rotate_x_rad_ip ##h]h## Vector3.rotate_x_rad_ip ##}hjh:sbah}(h]h]h]h]h!]h#h$uh%h hj9h&hh'h]h)M}ubeh}(h]h]h]h]h!]uh%jhj9h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj:jj:jj:jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'rotate_y() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_yhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_yh](jo)}(hj:h]hrotate_y}hj:sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj:h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj:h&hh'h]h)Mubeh}(h]j:ah](jjeh]h]h!]jjjj$jVector3.rotate_yjjVector3rotate_yjVector3.rotate_y()uh%jVh'h]h)Mhj:h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the y-axis by the angle in degrees.`h]h)}(hj:h]h;rotates a vector around the y-axis by the angle in degrees.}hj:sbah}(h]h]hah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubhz)}(h :sg:`rotate_y(angle) -> Vector3`h]h)}(hj:h]hrotate_y(angle) -> Vector3}hj:sbah}(h]h]jah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj:h&hh'h]h)Mubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj:h&hubh )}(h## Vector3.rotate_y ##h]h## Vector3.rotate_y ##}hj;sbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj:h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj;jj;jj;jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+rotate_y_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_y_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_y_radh](jo)}(hj2;h]h rotate_y_rad}hj4;sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj0;h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj0;h&hh'h]h)Mubeh}(h]j+;ah](jjeh]h]h!]jjjj$jVector3.rotate_y_radjjVector3 rotate_y_radjVector3.rotate_y_rad()uh%jVh'h]h)Mhj-;h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the y-axis by the angle in radians.`h]h)}(hj^;h]h;rotates a vector around the y-axis by the angle in radians.}hj`;sbah}(h]h]hah]h]h!]uh%hhj\;ubah}(h]h]h]h]h!]uh%h)hKhjY;h&hh'h]h)Mubhz)}(h$:sg:`rotate_y_rad(angle) -> Vector3`h]h)}(hju;h]hrotate_y_rad(angle) -> Vector3}hjw;sbah}(h]h]jah]h]h!]uh%hhjs;ubah}(h]h]h]h]h!]uh%h)hKhjY;h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjV;h&hh'h]h)Mubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj;sbah}(h]h]h]h]h!]uh%hh'h]h)MhjV;h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj;sbah}(h]h](jj3eh]h]h!]uh%hhj;ubah}(h]h]h]h]h!] translatableuh%hhj;h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)MhjV;ubh )}(h## Vector3.rotate_y_rad ##h]h## Vector3.rotate_y_rad ##}hj;sbah}(h]h]h]h]h!]h#h$uh%h hjV;h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj-;h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj;jj;jj;jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*rotate_y_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_y_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_y_iph](jo)}(hj;h]h rotate_y_ip}hj;sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj;h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj;h&hh'h]h)Mubeh}(h]j;ah](jjeh]h]h!]jjjj$jVector3.rotate_y_ipjjVector3 rotate_y_ipjVector3.rotate_y_ip()uh%jVh'h]h)Mhj;h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the y-axis by the angle in degrees in place.`h]h)}(hj<h]hFrotates the vector around the y-axis by the angle in degrees in place.}hj <sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Mubhz)}(h :sg:`rotate_y_ip(angle) -> None`h]h)}(hj5<h]hrotate_y_ip(angle) -> None}hj7<sbah}(h]h]jah]h]h!]uh%hhj3<ubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj<h&hh'h]h)Mubh)}(hRotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjP<sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj<h&hubh )}(h## Vector3.rotate_y_ip ##h]h## Vector3.rotate_y_ip ##}hj^<sbah}(h]h]h]h]h!]h#h$uh%h hj<h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj;h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jju<jjv<jjv<jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_y_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_y_ip_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_y_ip_radh](jo)}(hj<h]hrotate_y_ip_rad}hj<sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj<h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj<h&hh'h]h)Mubeh}(h]j<ah](jjeh]h]h!]jjjj$jVector3.rotate_y_ip_radjjVector3rotate_y_ip_radjVector3.rotate_y_ip_rad()uh%jVh'h]h)Mhj<h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the y-axis by the angle in radians in place.`h]h)}(hj<h]hFrotates the vector around the y-axis by the angle in radians in place.}hj<sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Mubhz)}(h$:sg:`rotate_y_ip_rad(angle) -> None`h]h)}(hj<h]hrotate_y_ip_rad(angle) -> None}hj<sbah}(h]h]jah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj<h&hh'h]h)Mubh)}(h*DEPRECATED: Use rotate_y_rad_ip() instead.h]h*DEPRECATED: Use rotate_y_rad_ip() instead.}hj<sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj<h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hj=sbah}(h]h](jj3eh]h]h!]uh%hhj<ubah}(h]h]h]h]h!] translatableuh%hhj<h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)Mhj<ubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj&=sbah}(h]h](jjGeh]h]h!]uh%hhj"=ubah}(h]h]h]h]h!] translatableuh%hhj=h&hh'h]h)Mubah}(h]h]h]h]h!]jD deprecatedjF2.1.1uh%jh&hh'h]h)Mhj<ubh )}(h## Vector3.rotate_y_ip_rad ##h]h## Vector3.rotate_y_ip_rad ##}hjC=sbah}(h]h]h]h]h!]h#h$uh%h hj<h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj<h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjZ=jj[=jj[=jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_y_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_y_rad_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_y_rad_iph](jo)}(hjr=h]hrotate_y_rad_ip}hjt=sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjp=h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjp=h&hh'h]h)Mubeh}(h]jk=ah](jjeh]h]h!]jjjj$jVector3.rotate_y_rad_ipjjVector3rotate_y_rad_ipjVector3.rotate_y_rad_ip()uh%jVh'h]h)Mhjm=h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the y-axis by the angle in radians in place.`h]h)}(hj=h]hFrotates the vector around the y-axis by the angle in radians in place.}hj=sbah}(h]h]hah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubhz)}(h$:sg:`rotate_y_rad_ip(angle) -> None`h]h)}(hj=h]hrotate_y_rad_ip(angle) -> None}hj=sbah}(h]h]jah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj=h&hh'h]h)Mubh)}(hRotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj=sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj=h&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hj=sbah}(h]h](jj3eh]h]h!]uh%hhj=ubah}(h]h]h]h]h!] translatableuh%hhj=h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)Mhj=ubh )}(h## Vector3.rotate_y_rad_ip ##h]h## Vector3.rotate_y_rad_ip ##}hj>sbah}(h]h]h]h]h!]h#h$uh%h hj=h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjm=h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj>jj>jj>jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'rotate_z() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_zhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_zh](jo)}(hj2>h]hrotate_z}hj4>sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj0>h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj0>h&hh'h]h)Mubeh}(h]j+>ah](jjeh]h]h!]jjjj$jVector3.rotate_zjjVector3rotate_zjVector3.rotate_z()uh%jVh'h]h)Mhj->h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the z-axis by the angle in degrees.`h]h)}(hj^>h]h;rotates a vector around the z-axis by the angle in degrees.}hj`>sbah}(h]h]hah]h]h!]uh%hhj\>ubah}(h]h]h]h]h!]uh%h)hKhjY>h&hh'h]h)Mubhz)}(h :sg:`rotate_z(angle) -> Vector3`h]h)}(hju>h]hrotate_z(angle) -> Vector3}hjw>sbah}(h]h]jah]h]h!]uh%hhjs>ubah}(h]h]h]h]h!]uh%h)hKhjY>h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjV>h&hh'h]h)Mubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj>sbah}(h]h]h]h]h!]uh%hh'h]h)MhjV>h&hubh )}(h## Vector3.rotate_z ##h]h## Vector3.rotate_z ##}hj>sbah}(h]h]h]h]h!]h#h$uh%h hjV>h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj->h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj>jj>jj>jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+rotate_z_rad() (pygame.math.Vector3 method) pygame.math.Vector3.rotate_z_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_z_radh](jo)}(hj>h]h rotate_z_rad}hj>sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj>h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj>h&hh'h]h)Mubeh}(h]j>ah](jjeh]h]h!]jjjj$jVector3.rotate_z_radjjVector3 rotate_z_radjVector3.rotate_z_rad()uh%jVh'h]h)Mhj>h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`rotates a vector around the z-axis by the angle in radians.`h]h)}(hj>h]h;rotates a vector around the z-axis by the angle in radians.}hj>sbah}(h]h]hah]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Mubhz)}(h$:sg:`rotate_z_rad(angle) -> Vector3`h]h)}(hj?h]hrotate_z_rad(angle) -> Vector3}hj?sbah}(h]h]jah]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj>h&hh'h]h)Mubh)}(hReturns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hReturns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj+?sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj>h&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjA?sbah}(h]h](jj3eh]h]h!]uh%hhj=?ubah}(h]h]h]h]h!] translatableuh%hhj9?h&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.0.0uh%jh&hh'h]h)Mhj>ubh )}(h## Vector3.rotate_z_rad ##h]h## Vector3.rotate_z_rad ##}hj^?sbah}(h]h]h]h]h!]h#h$uh%h hj>h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj>h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jju?jjv?jjv?jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM*rotate_z_ip() (pygame.math.Vector3 method)pygame.math.Vector3.rotate_z_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h rotate_z_iph](jo)}(hj?h]h rotate_z_ip}hj?sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj?h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj?h&hh'h]h)Mubeh}(h]j?ah](jjeh]h]h!]jjjj$jVector3.rotate_z_ipjjVector3 rotate_z_ipjVector3.rotate_z_ip()uh%jVh'h]h)Mhj?h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the z-axis by the angle in degrees in place.`h]h)}(hj?h]hFrotates the vector around the z-axis by the angle in degrees in place.}hj?sbah}(h]h]hah]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)Mubhz)}(h :sg:`rotate_z_ip(angle) -> None`h]h)}(hj?h]hrotate_z_ip(angle) -> None}hj?sbah}(h]h]jah]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj?h&hh'h]h)Mubh)}(hRotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hj?sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj?h&hubh )}(h## Vector3.rotate_z_ip ##h]h## Vector3.rotate_z_ip ##}hj?sbah}(h]h]h]h]h!]h#h$uh%h hj?h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj?h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj@jj@jj@jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_z_ip_rad() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_z_ip_radhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_z_ip_radh](jo)}(hj(@h]hrotate_z_ip_rad}hj*@sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj&@h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj&@h&hh'h]h)Mubeh}(h]j!@ah](jjeh]h]h!]jjjj$jVector3.rotate_z_ip_radjjVector3rotate_z_ip_radjVector3.rotate_z_ip_rad()uh%jVh'h]h)Mhj#@h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the z-axis by the angle in radians in place.`h]h)}(hjT@h]hFrotates the vector around the z-axis by the angle in radians in place.}hjV@sbah}(h]h]hah]h]h!]uh%hhjR@ubah}(h]h]h]h]h!]uh%h)hKhjO@h&hh'h]h)Mubhz)}(h$:sg:`rotate_z_ip_rad(angle) -> None`h]h)}(hjk@h]hrotate_z_ip_rad(angle) -> None}hjm@sbah}(h]h]jah]h]h!]uh%hhji@ubah}(h]h]h]h]h!]uh%h)hKhjO@h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjL@h&hh'h]h)Mubh)}(h*DEPRECATED: Use rotate_z_rad_ip() instead.h]h*DEPRECATED: Use rotate_z_rad_ip() instead.}hj@sbah}(h]h]h]h]h!]uh%hh'h]h)MhjL@h&hubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj@sbah}(h]h](jjGeh]h]h!]uh%hhj@ubah}(h]h]h]h]h!] translatableuh%hhj@h&hh'h]h)Mubah}(h]h]h]h]h!]jD deprecatedjF2.1.1uh%jh&hh'h]h)MhjL@ubh )}(h## Vector3.rotate_z_ip_rad ##h]h## Vector3.rotate_z_ip_rad ##}hj@sbah}(h]h]h]h]h!]h#h$uh%h hjL@h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj#@h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj@jj@jj@jjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.rotate_z_rad_ip() (pygame.math.Vector3 method)#pygame.math.Vector3.rotate_z_rad_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hrotate_z_rad_iph](jo)}(hj@h]hrotate_z_rad_ip}hj@sbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhj@h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj@h&hh'h]h)Mubeh}(h]j@ah](jjeh]h]h!]jjjj$jVector3.rotate_z_rad_ipjjVector3rotate_z_rad_ipjVector3.rotate_z_rad_ip()uh%jVh'h]h)Mhj@h&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`rotates the vector around the z-axis by the angle in radians in place.`h]h)}(hjAh]hFrotates the vector around the z-axis by the angle in radians in place.}hjAsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubhz)}(h$:sg:`rotate_z_rad_ip(angle) -> None`h]h)}(hj+Ah]hrotate_z_rad_ip(angle) -> None}hj-Asbah}(h]h]jah]h]h!]uh%|}hhj)Aubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj Ah&hh'h]h)Mubh)}(hRotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).h]hRotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).}hjFAsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj Ah&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hj\Asbah}(h]h](jj3eh]h]h!]uh%hhjXAubah}(h]h]h]h]h!] translatableuh%hhjTAh&hh'h]h)Mubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)Mhj Aubh )}(h## Vector3.rotate_z_rad_ip ##h]h## Vector3.rotate_z_rad_ip ##}hjyAsbah}(h]h]h]h]h!]h#h$uh%h hj Ah&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj@h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjAjjAjjAjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'angle_to() (pygame.math.Vector3 method)pygame.math.Vector3.angle_tohNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hangle_toh](jo)}(hjAh]hangle_to}hjAsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjAh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjAh&hh'h]h)Mubeh}(h]jAah](jjeh]h]h!]jjjj$jVector3.angle_tojjVector3angle_tojVector3.angle_to()uh%jVh'h]h)MhjAh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`calculates the angle to a given vector in degrees.`h]h)}(hjAh]h2calculates the angle to a given vector in degrees.}hjAsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubhz)}(h :sg:`angle_to(Vector3) -> float`h]h)}(hjAh]hangle_to(Vector3) -> float}hjAsbah}(h]h]jah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjAh&hh'h]h)Mubh)}(h4Returns the angle between self and the given vector.h]h4Returns the angle between self and the given vector.}hjBsbah}(h]h]h]h]h!]uh%hh'h]h)MhjAh&hubh )}(h## Vector3.angle_to ##h]h## Vector3.angle_to ##}hjBsbah}(h]h]h]h]h!]h#h$uh%h hjAh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjAh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj+Bjj,Bjj,Bjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM+as_spherical() (pygame.math.Vector3 method) pygame.math.Vector3.as_sphericalhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(h as_sphericalh](jo)}(hjCBh]h as_spherical}hjEBsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjABh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjABh&hh'h]h)Mubeh}(h]jBh&hubj)}(hhh](hv)}(hhh](hz)}(hL:sl:`returns a tuple with radial distance, inclination and azimuthal angle.`h]h)}(hjoBh]hFreturns a tuple with radial distance, inclination and azimuthal angle.}hjqBsbah}(h]h]hah]h]h!]uh%hhjmBubah}(h]h]h]h]h!]uh%h)hKhjjBh&hh'h]h)M ubhz)}(h':sg:`as_spherical() -> (r, theta, phi)`h]h)}(hjBh]h!as_spherical() -> (r, theta, phi)}hjBsbah}(h]h]jah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhjjBh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjgBh&hh'h]h)M ubh)}(hReturns a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.h](hReturns a tuple }hjBsbh;)}(h``(r, theta, phi)``h]h(r, theta, phi)}hjBsbah}(h]h]h]h]h!]uh%h:hjBubh_ where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.}hjBsbeh}(h]h]h]h]h!]uh%hh'h]h)M hjgBh&hubh )}(h## Vector3.as_spherical ##h]h## Vector3.as_spherical ##}hjBsbah}(h]h]h]h]h!]h#h$uh%h hjgBh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj>Bh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjBjjBjjBjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM-from_spherical() (pygame.math.Vector3 method)"pygame.math.Vector3.from_sphericalhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hfrom_sphericalh](jo)}(hjBh]hfrom_spherical}hjBsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjBh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjBh&hh'h]h)Mubeh}(h]jBah](jjeh]h]h!]jjjj$jVector3.from_sphericaljjVector3from_sphericaljVector3.from_spherical()uh%jVh'h]h)MhjBh&hubj)}(hhh](hv)}(hhh](hz)}(hY:sl:`Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.`h]h)}(hjCh]hSCreates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.}hjCsbah}(h]h]hah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Mubhz)}(h8:sg:`Vector3.from_spherical((r, theta, phi)) -> Vector3`h]h)}(hj3Ch]h2Vector3.from_spherical((r, theta, phi)) -> Vector3}hj5Csbah}(h]h]jah]h]h!]uh%hhj1Cubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Mubhz)}(h7:sg:`Vector3().from_spherical((r, theta, phi)) -> None`h]h)}(hjJCh]h1Vector3().from_spherical((r, theta, phi)) -> None}hjLCsbah}(h]h]jah]h]h!]uh%hhjHCubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjCh&hh'h]h)Mubh)}(hIf used from the class creates a Vector3(x, y, z), else sets x, y, and z. The values of x, y, and z are from a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.h](huIf used from the class creates a Vector3(x, y, z), else sets x, y, and z. The values of x, y, and z are from a tuple }hjeCsbh;)}(h``(r, theta, phi)``h]h(r, theta, phi)}hjmCsbah}(h]h]h]h]h!]uh%h:hjeCubh_ where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.}hjeCsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjCh&hubh )}(h## Vector3.from_spherical ##h]h## Vector3.from_spherical ##}hjCsbah}(h]h]h]h]h!]h#h$uh%h hjCh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjBh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjCjjCjjCjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM&project() (pygame.math.Vector3 method)pygame.math.Vector3.projecthNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hprojecth](jo)}(hjCh]hproject}hjCsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjCh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjCh&hh'h]h)Mubeh}(h]jCah](jjeh]h]h!]jjjj$jVector3.projectjjVector3projectjVector3.project()uh%jVh'h]h)MhjCh&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`projects a vector onto another.`h]h)}(hjCh]hprojects a vector onto another.}hjCsbah}(h]h]hah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Mubhz)}(h!:sg:`project(Vector3) -> Vector3`h]h)}(hjCh]hproject(Vector3) -> Vector3}hjCsbah}(h]h]jah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjCh&hh'h]h)Mubh)}(hReturns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_.h](hReturns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see }hjDsbj)}(h>`Wikipedia `_h]h Wikipedia}(hjDh Wikipediaubah}(h]h]h]h]h!]namej"Dj/https://en.wikipedia.org/wiki/Vector_projectionuh%jhjDubj)}(h2 h]h}(h]id3ah]h]h] wikipediaah!]refurij*Duh%jjhjDubh.}hjDsbeh}(h]h]h]h]h!]uh%hh'h]h)M"hjCh&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjJDsbah}(h]h](jj3eh]h]h!]uh%hhjFDubah}(h]h]h]h]h!] translatableuh%hhjBDh&hh'h]h)M&ubah}(h]h]h]h]h!]jD versionaddedjF2.0.2uh%jh&hh'h]h)M%hjCubh )}(h## Vector3.project ##h]h## Vector3.project ##}hjgDsbah}(h]h]h]h]h!]h#h$uh%h hjCh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%jhjCh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj~DjjDjjDjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM#copy() (pygame.math.Vector3 method)pygame.math.Vector3.copyhNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hcopyh](jo)}(hjDh]hcopy}hjDsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjDh&hh'h]h)M)ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjDh&hh'h]h)M)ubeh}(h]jDah](jjeh]h]h!]jjjj$j Vector3.copyjjVector3copyjVector3.copy()uh%jVh'h]h)M)hjDh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`Returns a copy of itself.`h]h)}(hjDh]hReturns a copy of itself.}hjDsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)M+ubhz)}(h:sg:`copy() -> Vector3`h]h)}(hjDh]hcopy() -> Vector3}hjDsbah}(h]h]jah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)M,ubeh}(h]h]h]h]h!]uh%huhjDh&hh'h]h)M+ubh)}(h1Returns a new Vector3 having the same dimensions.h]h1Returns a new Vector3 having the same dimensions.}hjDsbah}(h]h]h]h]h!]uh%hh'h]h)M.hjDh&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hj Esbah}(h]h](jj3eh]h]h!]uh%hhjEubah}(h]h]h]h]h!] translatableuh%hhjEh&hh'h]h)M1ubah}(h]h]h]h]h!]jD versionaddedjF2.1.1uh%jh&hh'h]h)M0hjDubh )}(h## Vector3.copy ##h]h## Vector3.copy ##}hj'Esbah}(h]h]h]h]h!]h#h$uh%h hjDh&hh'h]h)M2ubeh}(h]h]h]h]h!]uh%jhjDh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj>Ejj?Ejj?Ejjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM.clamp_magnitude() (pygame.math.Vector3 method)#pygame.math.Vector3.clamp_magnitudehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hclamp_magnitudeh](jo)}(hjVEh]hclamp_magnitude}hjXEsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjTEh&hh'h]h)M5ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjTEh&hh'h]h)M5ubeh}(h]jOEah](jjeh]h]h!]jjjj$jVector3.clamp_magnitudejjVector3clamp_magnitudejVector3.clamp_magnitude()uh%jVh'h]h)M5hjQEh&hubj)}(hhh](hv)}(hhh](hz)}(h^:sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.`h]h)}(hjEh]hXReturns a copy of a vector with the magnitude clamped between max_length and min_length.}hjEsbah}(h]h]hah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj}Eh&hh'h]h)M7ubhz)}(h,:sg:`clamp_magnitude(max_length) -> Vector3`h]h)}(hjEh]h&clamp_magnitude(max_length) -> Vector3}hjEsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj}Eh&hh'h]h)M8ubhz)}(h8:sg:`clamp_magnitude(min_length, max_length) -> Vector3`h]h)}(hjEh]h2clamp_magnitude(min_length, max_length) -> Vector3}hjEsbah}(h]h]jah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj}Eh&hh'h]h)M9ubeh}(h]h]h]h]h!]uh%huhjzEh&hh'h]h)M7ubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjEsbah}(h]h]h]h]h!]uh%jhjEubhQ feature still in development available for testing and feedback. It may change. }hjEsbj)}(hb`Please leave clamp_magnitude feedback with authors `_h]h2Please leave clamp_magnitude feedback with authors}(hjEh2Please leave clamp_magnitude feedback with authorsubah}(h]h]h]h]h!]name2Please leave clamp_magnitude feedback with authorsj*https://github.com/pygame/pygame/pull/2990uh%jhjEubj)}(h- h]h}(h]id4ah]h]h]2please leave clamp_magnitude feedback with authorsah!]refurijEuh%jjhjEubeh}(h]h]h]h]h!]uh%hh'h]h)M;hjzEh&hubh)}(hReturns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length``h](hBReturns a new copy of a vector with the magnitude clamped between }hjFsbh;)}(h``max_length``h]h max_length}hjFsbah}(h]h]h]h]h!]uh%h:hjFubh and }hjFsbh;)}(h``min_length``h]h min_length}hj Fsbah}(h]h]h]h]h!]uh%h:hjFubh8. If only one argument is passed, it is taken to be the }hjFsbh;)}(h``max_length``h]h max_length}hj2Fsbah}(h]h]h]h]h!]uh%h:hjFubeh}(h]h]h]h]h!]uh%hh'h]h)M>hjzEh&hubh)}(hThis function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative.h](hThis function raises }hjFFsbh;)}(h``ValueError``h]h ValueError}hjNFsbah}(h]h]h]h]h!]uh%h:hjFFubh if }hjFFsbh;)}(h``min_length``h]h min_length}hj`Fsbah}(h]h]h]h]h!]uh%h:hjFFubh is greater than }hjFFsbh;)}(h``max_length``h]h max_length}hjrFsbah}(h]h]h]h]h!]uh%h:hjFFubh,, or if either of these values are negative.}hjFFsbeh}(h]h]h]h]h!]uh%hh'h]h)MBhjzEh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjFsbah}(h]h](jj3eh]h]h!]uh%hhjFubah}(h]h]h]h]h!] translatableuh%hhjFh&hh'h]h)MFubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)MEhjzEubh )}(h## Vector3.clamp_magnitude ##h]h## Vector3.clamp_magnitude ##}hjFsbah}(h]h]h]h]h!]h#h$uh%h hjzEh&hh'h]h)MGubeh}(h]h]h]h]h!]uh%jhjQEh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjFjjFjjFjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM1clamp_magnitude_ip() (pygame.math.Vector3 method)&pygame.math.Vector3.clamp_magnitude_iphNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hclamp_magnitude_iph](jo)}(hjFh]hclamp_magnitude_ip}hjFsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjFh&hh'h]h)MJubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjFh&hh'h]h)MJubeh}(h]jFah](jjeh]h]h!]jjjj$jVector3.clamp_magnitude_ipjjVector3clamp_magnitude_ipjVector3.clamp_magnitude_ip()uh%jVh'h]h)MJhjFh&hubj)}(hhh](hv)}(hhh](hz)}(hE:sl:`Clamps the vector's magnitude between max_length and min_length`h]h)}(hj Gh]h?Clamps the vector's magnitude between max_length and min_length}hj Gsbah}(h]h]hah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)MLubhz)}(h,:sg:`clamp_magnitude_ip(max_length) -> None`h]h)}(hj!Gh]h&clamp_magnitude_ip(max_length) -> None}hj#Gsbah}(h]h]jah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)MMubhz)}(h8:sg:`clamp_magnitude_ip(min_length, max_length) -> None`h]h)}(hj8Gh]h2clamp_magnitude_ip(min_length, max_length) -> None}hj:Gsbah}(h]h]jah]h]h!]uh%hhj6Gubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)MNubeh}(h]h]h]h]h!]uh%huhjGh&hh'h]h)MLubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_h](j)}(h**Experimental:**h]h Experimental:}hjWGsbah}(h]h]h]h]h!]uh%jhjSGubhQ feature still in development available for testing and feedback. It may change. }hjSGsbj)}(he`Please leave clamp_magnitude_ip feedback with authors `_h]h5Please leave clamp_magnitude_ip feedback with authors}(hjiGh5Please leave clamp_magnitude_ip feedback with authorsubah}(h]h]h]h]h!]name5Please leave clamp_magnitude_ip feedback with authorsj*https://github.com/pygame/pygame/pull/2990uh%jhjSGubj)}(h- h]h}(h]id5ah]h]h]5please leave clamp_magnitude_ip feedback with authorsah!]refurijzGuh%jjhjSGubeh}(h]h]h]h]h!]uh%hh'h]h)MPhjGh&hubh)}(hClamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length``h](h&Clamps the vector's magnitude between }hjGsbh;)}(h``max_length``h]h max_length}hjGsbah}(h]h]h]h]h!]uh%h:hjGubh and }hjGsbh;)}(h``min_length``h]h min_length}hjGsbah}(h]h]h]h]h!]uh%h:hjGubh8. If only one argument is passed, it is taken to be the }hjGsbh;)}(h``max_length``h]h max_length}hjGsbah}(h]h]h]h]h!]uh%h:hjGubeh}(h]h]h]h]h!]uh%hh'h]h)MShjGh&hubh)}(hThis function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative.h](hThis function raises }hjGsbh;)}(h``ValueError``h]h ValueError}hjGsbah}(h]h]h]h]h!]uh%h:hjGubh if }hjGsbh;)}(h``min_length``h]h min_length}hjGsbah}(h]h]h]h]h!]uh%h:hjGubh is greater than }hjGsbh;)}(h``max_length``h]h max_length}hjGsbah}(h]h]h]h]h!]uh%h:hjGubh,, or if either of these values are negative.}hjGsbeh}(h]h]h]h]h!]uh%hh'h]h)MVhjGh&hubj)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjHsbah}(h]h](jj3eh]h]h!]uh%hhjHubah}(h]h]h]h]h!] translatableuh%hhjHh&hh'h]h)MZubah}(h]h]h]h]h!]jD versionaddedjF2.1.3uh%jh&hh'h]h)MYhjGubh )}(h ## Vector3.clamp_magnitude_ip ##h]h ## Vector3.clamp_magnitude_ip ##}hj7Hsbah}(h]h]h]h]h!]h#h$uh%h hjGh&hh'h]h)M[ubeh}(h]h]h]h]h!]uh%jhjFh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjNHjjOHjjOHjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM%update() (pygame.math.Vector3 method)pygame.math.Vector3.updatehNtauh%hdhj$h&hh'Nh)NubjR)}(hhh](jW)}(hupdateh](jo)}(hjfHh]hupdate}hjhHsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjdHh&hh'h]h)M]ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjdHh&hh'h]h)M]ubeh}(h]j_Hah](jjeh]h]h!]jjjj$jVector3.updatejjVector3updatejVector3.update()uh%jVh'h]h)M]hjaHh&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`Sets the coordinates of the vector.`h]h)}(hjHh]h#Sets the coordinates of the vector.}hjHsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)M_ubhz)}(h:sg:`update() -> None`h]h)}(hjHh]hupdate() -> None}hjHsbah}(h]h]jah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)M`ubhz)}(h:sg:`update(int) -> None`h]h)}(hjHh]hupdate(int) -> None}hjHsbah}(h]h]jah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)Maubhz)}(h:sg:`update(float) -> None`h]h)}(hjHh]hupdate(float) -> None}hjHsbah}(h]h]jah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)Mbubhz)}(h:sg:`update(Vector3) -> None`h]h)}(hjHh]hupdate(Vector3) -> None}hjHsbah}(h]h]jah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)Mcubhz)}(h:sg:`update(x, y, z) -> None`h]h)}(hjIh]hupdate(x, y, z) -> None}hjIsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)Mdubhz)}(h:sg:`update((x, y, z)) -> None`h]h)}(hjIh]hupdate((x, y, z)) -> None}hjIsbah}(h]h]jah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhjHh&hh'h]h)Meubeh}(h]h]h]h]h!]uh%huhjHh&hh'h]h)M_ubh)}(h&Sets coordinates x, y, and z in place.h]h&Sets coordinates x, y, and z in place.}hj7Isbah}(h]h]h]h]h!]uh%hh'h]h)MghjHh&hubj)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hjMIsbah}(h]h](jj3eh]h]h!]uh%hhjIIubah}(h]h]h]h]h!] translatableuh%hhjEIh&hh'h]h)Mjubah}(h]h]h]h]h!]jD versionaddedjF1.9.5uh%jh&hh'h]h)MihjHubh )}(h## Vector3.update ##h]h## Vector3.update ##}hjjIsbah}(h]h]h]h]h!]h#h$uh%h hjHh&hh'h]h)Mkubeh}(h]h]h]h]h!]uh%jhjaHh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjIjjIjjIjjjjjjjuh%jQh&hhj$h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jM'epsilon (pygame.math.Vector3 attribute)pygame.math.Vector3.epsilonhNtauh%hdhj$h&hh'h]h)NubjR)}(hhh](jW)}(hepsilonh]jo)}(hjIh]hepsilon}hjIsbah}(h]h](jzj{eh]h]h!]h#h$uh%jnhjIh&hh'h]h)Mmubah}(h]jIah](jjeh]h]h!]jjjj$jVector3.epsilonjjVector3epsilonjjIuh%jVh'h]h)MmhjIh&hubj)}(hhh](hv)}(hhh]hz)}(h6:sl:`Determines the tolerance of vector calculations.`h]h)}(hjIh]h0Determines the tolerance of vector calculations.}hjIsbah}(h]h]hah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)Moubah}(h]h]h]h]h!]uh%huhjIh&hh'h]h)Moubh)}(h{With lengths within this number, vectors are considered equal. For more information see :attr:`pygame.math.Vector2.epsilon`h](hXWith lengths within this number, vectors are considered equal. For more information see }hjIsbh6)}(h#:attr:`pygame.math.Vector2.epsilon`h]h;)}(hjIh]hpygame.math.Vector2.epsilon}hjIsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjIubah}(h]h]h]h]h!]refdochS refdomainjIreftypeattr refexplicitrefwarnhYjhZj$h[pygame.math.Vector2.epsilonuh%h5h'h]h)MqhjIubeh}(h]h]h]h]h!]uh%hh'h]h)MqhjIh&hubeh}(h]h]h]h]h!]uh%jhjIh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jj Jjj Jjj Jjjjjjjjuh%jQh&hhj$h'h]h)Nubh )}(h## ##h]h## ##}hjJsbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)Mtubh )}(h## pygame.math.Vector3 ##h]h## pygame.math.Vector3 ##}hjJsbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)Muubeh}(h]h]h]h]h!]uh%jhj$h&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jj6Jjj7Jjj7Jjjjjjjjuh%jQh&hhh,h'Nh)Nubh )}(h## pygame.math ##h]h## pygame.math ##}hj;Jsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mwubeh}(h](hs pygame-matheh]h] pygame.mathah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj{Jerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jNJjKJjj jjjjj*j'jjjz jw u nametypes}(jNJjjjj*jjz uh}(jKJh,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjOjXj jjjjjj j" j j jE jJ j j j j jV j[ j j j j jjjdjij5j:jjjkjpjjjjjjjjjj j{jj^jcj jjjjAjFjjjjjjjBjGj2j7jjjjj'j!jjjEjJjjjjjw jq jU!jZ!j"j"j$j$j%j%j^&jc&j&j&j'j'ja(jf(j )j)j)j)j*j*jG+jL+j,j,j,j,j-j-j.j$.j.j.j9/j>/j/j/j40j90j0j0j/1j41j2j2j2j2jZ3j_3j3j3j4j4jP5jU5j56j:6j6j6j7j7jP8jU8j8j8j9j9j:j:j+;j0;j;j;j<j<jk=jp=j+>j0>j>j>j?j?j!@j&@j@j@jAjAjsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.midi`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.midi}hh None`h]h)}(hj;h]hinit() -> None}hj=sbah}(h]h] signatureah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K*ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K)ubh)}(heInitializes the :mod:`pygame.midi` module. Must be called before using the :mod:`pygame.midi` module.h](hInitializes the }hjWsbh6)}(h:mod:`pygame.midi`h]h;)}(hjah]h pygame.midi}hjcsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj_ubah}(h]h]h]h]h!]refdochS refdomainjmreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)K,hjWubh) module. Must be called before using the }hjWsbh6)}(h:mod:`pygame.midi`h]h;)}(hjh]h pygame.midi}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)K,hjWubh module.}hjWsbeh}(h]h]h]h]h!]uh%hh'h]h)K,hjh&hubh)}(h'It is safe to call this more than once.h]h'It is safe to call this more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K/hjh&hubh )}(h## pygame.midi.init ##h]h## pygame.midi.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K1ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jquit() (in module pygame.midi)pygame.midi.quithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hquith](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K3ubj)}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K3ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K3ubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjquit()uh%jh'h]h)K3hjh&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`uninitialize the midi module`h]h)}(hj+h]huninitialize the midi module}hj-sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)K5ubhz)}(h:sg:`quit() -> None`h]h)}(hjBh]hquit() -> None}hjDsbah}(h]h]jGah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)K6ubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)K5ubh)}(hUninitializes the :mod:`pygame.midi` module. If :func:`pygame.midi.init` was called to initialize the :mod:`pygame.midi` module, then this function will be called automatically when your program exits.h](hUninitializes the }hj]sbh6)}(h:mod:`pygame.midi`h]h;)}(hjgh]h pygame.midi}hjisbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjeubah}(h]h]h]h]h!]refdochS refdomainjsreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)K8hj]ubh module. If }hj]sbh6)}(h:func:`pygame.midi.init`h]h;)}(hjh]hpygame.midi.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj^hZNh[pygame.midi.inituh%h5h'h]h)K8hj]ubh was called to initialize the }hj]sbh6)}(h:mod:`pygame.midi`h]h;)}(hjh]h pygame.midi}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)K8hj]ubhQ module, then this function will be called automatically when your program exits.}hj]sbeh}(h]h]h]h]h!]uh%hh'h]h)K8hj#h&hubh)}(h0It is safe to call this function more than once.h]h0It is safe to call this function more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"get_init() (in module pygame.midi)pygame.midi.get_inithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K@ubj)}(hjh]hget_init}hj$sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K@ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K@ubeh}(h]j ah](jjeh]h]h!]jj^jhjjjj^jj get_init()uh%jh'h]h)K@hjh&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`returns True if the midi module is currently initialized`h]h)}(hjKh]h8returns True if the midi module is currently initialized}hjMsbah}(h]h]hah]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%h)hKhjFh&hh'h]h)KBubhz)}(h:sg:`get_init() -> bool`h]h)}(hjbh]hget_init() -> bool}hjdsbah}(h]h]jGah]h]h!]uh%hhj`ubah}(h]h]h]h]h!]uh%h)hKhjFh&hh'h]h)KCubeh}(h]h]h]h]h!]uh%huhjCh&hh'h]h)KBubh)}(h?Gets the initialization state of the :mod:`pygame.midi` module.h](h%Gets the initialization state of the }hj}sbh6)}(h:mod:`pygame.midi`h]h;)}(hjh]h pygame.midi}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)KEhj}ubh module.}hj}sbeh}(h]h]h]h]h!]uh%hh'h]h)KEhjCh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]h)}(h8True if the pygame.midi module is currently initialized.h](h;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh if the }(hjh&hh'Nh)Nubh6)}(h:mod:`pygame.midi`h]h;)}(hjh]h pygame.midi}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)KGhjh&hubh! module is currently initialized.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hboolh]h6)}(hhh]hbool}hj2sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetbool refspecific py:modulej^py:classNuh%h5hj.ubah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjCh&hh'Nh)Nubh)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hjhsbah}(h]h](hheh]h]h!]uh%hhjdubah}(h]h]h]h]h!] translatableuh%hhj`h&hh'h]h)KKubah}(h]h]h]h]h!]hČ versionaddedhƌ1.9.5uh%hh&hh'h]h)KJhjCubh )}(h## pygame.midi.get_init ##h]h## pygame.midi.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjCh&hh'h]h)KLubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](j@functioneh]h]h!]jj@jjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jInput (class in pygame.midi)pygame.midi.InputhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hInputh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KNubj)}(hjh]hInput}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KNubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjjuh%jh'h]h)KNhjh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`Input is used to get midi input from midi devices.`h]h)}(hjh]h2Input is used to get midi input from midi devices.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KPubhz)}(h:sg:`Input(device_id) -> None`h]h)}(hjh]hInput(device_id) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KQubhz)}(h+:sg:`Input(device_id, buffer_size) -> None`h]h)}(hj h]h%Input(device_id, buffer_size) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KRubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KPubj)}(hhh]j)}(hhh](j)}(h Parametersh]h Parameters}hj.sbah}(h]h]h]h]h!]uh%jhj+h'h]h)Kubj)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(h!device_id (int) -- midi device idh](hliteral_strong)}(h device_idh]h device_id}hjOsbah}(h]h]h]h]h!]uh%jMhjIubh (}hjIsbh6)}(hhh]hliteral_emphasis)}(hinth]hint}hjfsbah}(h]h]h]h]h!]uh%jdhjaubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjhjEjFj^jGjuh%h5hjIubh)}hjIsbh -- }hjIsbhmidi device id}(hjIh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%jDhjAubjE)}(hhh]h)}(hIbuffer_size (int) -- (optional) the number of input events to be bufferedh](jN)}(h buffer_sizeh]h buffer_size}hjsbah}(h]h]h]h]h!]uh%jMhjubh (}hjsbh6)}(hhh]je)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jdhjubah}(h]h]h]h]h!] refdomainj{ refexplicitreftypej reftargetjjEjFj^jGjuh%h5hjubh)}hjsbh -- }hjsbh4(optional) the number of input events to be buffered}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jDhjAubeh}(h]h]h]h]h!]uh%j?hj<ubah}(h]h]h]h]h!]uh%jhj+ubeh}(h]h]h]h]h!]uh%jhj(ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"close() (pygame.midi.Input method)pygame.midi.Input.closehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hcloseh](j)}(hjh]hclose}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)KWubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)KWubeh}(h]jah](jjeh]h]h!]jj^jjj Input.closejj^Inputclosej Input.close()uh%jh'h]h)KWhj h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`closes a midi stream, flushing any pending buffers.`h]h)}(hj:h]h3closes a midi stream, flushing any pending buffers.}hj<sbah}(h]h]hah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhj5h&hh'h]h)KYubhz)}(h:sg:`close() -> None`h]h)}(hjQh]hclose() -> None}hjSsbah}(h]h]jGah]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%h)hKhj5h&hh'h]h)KZubeh}(h]h]h]h]h!]uh%huhj2h&hh'h]h)KYubh)}(hCPortMidi attempts to close open streams when the application exits.h]hCPortMidi attempts to close open streams when the application exits.}hjlsbah}(h]h]h]h]h!]uh%hh'h]h)K\hj2h&hubh note)}(h-This is particularly difficult under Windows.h]h)}(hj~h]h-This is particularly difficult under Windows.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K^hj|ubah}(h]h]h]h]h!]uh%jzh'h]h)K^hj2h&hubh )}(h## Input.close ##h]h## Input.close ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj2h&hh'h]h)K`ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!poll() (pygame.midi.Input method)pygame.midi.Input.pollhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hpollh](j)}(hjh]hpoll}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kbubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kbubeh}(h]jah](jjeh]h]h!]jj^jjj Input.polljj^Inputpollj Input.poll()uh%jh'h]h)Kbhjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`returns True if there's data, or False if not.`h]h)}(hjh]h.returns True if there's data, or False if not.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kdubhz)}(h:sg:`poll() -> bool`h]h)}(hjh]hpoll() -> bool}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Keubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kdubh)}(h$Used to indicate if any data exists.h]h$Used to indicate if any data exists.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kghjh&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hj4sbah}(h]h]h]h]h!]uh%jhj1h'h]h)Kubj)}(hhh]h)}(h&True if there is data, False otherwiseh](h;)}(h``True``h]hTrue}hjIsbah}(h]h]h]h]h!]uh%h:hjEh&hh'Nh)Nubh if there is data, }(hjEh&hh'Nh)Nubh;)}(h ``False``h]hFalse}hj[sbah}(h]h]h]h]h!]uh%h:hjEh&hh'Nh)Nubh otherwise}(hjEh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%jhj1ubeh}(h]h]h]h]h!]uh%jhj.ubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hboolh]h6)}(hhh]hbool}hjsbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetbooljEjFj^jGjuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj.ubj)}(hhh](j)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hMidiException -- on errorh](h6)}(hhh]jN)}(h MidiExceptionh]h MidiException}hjsbah}(h]h]h]h]h!]uh%jMhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeexc reftargetjjEjFj^jGjuh%h5hjubh -- }hjsbhon error}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj.ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## Input.poll ##h]h## Input.poll ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Knubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjj' jj' jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j!read() (pygame.midi.Input method)pygame.midi.Input.readhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hreadh](j)}(hj> h]hread}hj@ sbah}(h]h](jjeh]h]h!]h#h$uh%jhj< h&hh'h]h)Kpubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj< h&hh'h]h)Kpubeh}(h]j7 ah](jjeh]h]h!]jj^jjj Input.readjj^Inputreadj Input.read()uh%jh'h]h)Kphj9 h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`reads num_events midi events from the buffer.`h]h)}(hjj h]h-reads num_events midi events from the buffer.}hjl sbah}(h]h]hah]h]h!]uh%hhjh ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Krubhz)}(h):sg:`read(num_events) -> midi_event_list`h]h)}(hj h]h#read(num_events) -> midi_event_list}hj sbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Ksubeh}(h]h]h]h]h!]uh%huhjb h&hh'h]h)Krubh)}(h7Reads from the input buffer and gives back midi events.h]h7Reads from the input buffer and gives back midi events.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kuhjb h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hj sbah}(h]h]h]h]h!]uh%jhj h'h]h)Kubj)}(hhh]h)}(h2num_events (int) -- number of input events to readh](jN)}(h num_eventsh]h num_events}hj sbah}(h]h]h]h]h!]uh%jMhj ubh (}hj sbh6)}(hhh]je)}(hinth]hint}hj sbah}(h]h]h]h]h!]uh%jdhj ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj jEjFj^jGjuh%h5hj ubh)}hj sbh -- }hj sbhnumber of input events to read}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhj ubj)}(hhh](j)}(hReturnsh]hReturns}hj sbah}(h]h]h]h]h!]uh%jhj h'h]h)Kubj)}(hhh]h)}(hSthe format for midi_event_list is [[[status, data1, data2, data3], timestamp], ...]h](h"the format for midi_event_list is }(hj% h&hh'Nh)Nubh;)}(h5``[[[status, data1, data2, data3], timestamp], ...]``h]h1[[[status, data1, data2, data3], timestamp], ...]}hj- sbah}(h]h]h]h]h!]uh%h:hj% h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhj ubj)}(hhh](j)}(h Return typeh]h Return type}hjP sbah}(h]h]h]h]h!]uh%jhjM h'h]h)Kubj)}(hhh]h)}(hlisth]h6)}(hhh]hlist}hje sbah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetlistjEjFj^jGjuh%h5hja ubah}(h]h]h]h]h!]uh%hhj^ ubah}(h]h]h]h]h!]uh%jhjM ubeh}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhjb h&hh'Nh)Nubh )}(h## Input.read ##h]h## Input.read ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjb h&hh'h]h)K}ubeh}(h]h]h]h]h!]uh%jhj9 h&hh'Nh)Nubeh}(h]h](j methodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubh )}(h## pygame.midi.Input ##h]h## pygame.midi.Input ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](j{classeh]h]h!]jj{jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jOutput (class in pygame.midi)pygame.midi.OutputhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hOutputh](j)}(h pygame.midi.h]h pygame.midi.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hOutput}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jj^jhjj jj^j jj uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`Output is used to send midi to an output device`h]h)}(hj h]h/Output is used to send midi to an output device}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`Output(device_id) -> None`h]h)}(hj h]hOutput(device_id) -> None}hj sbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h*:sg:`Output(device_id, latency=0) -> None`h]h)}(hj2 h]h$Output(device_id, latency=0) -> None}hj4 sbah}(h]h]jGah]h]h!]uh%hhj0 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h0:sg:`Output(device_id, buffer_size=256) -> None`h]h)}(hjI h]h*Output(device_id, buffer_size=256) -> None}hjK sbah}(h]h]jGah]h]h!]uh%hhjG ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h5:sg:`Output(device_id, latency, buffer_size) -> None`h]h)}(hj` h]h/Output(device_id, latency, buffer_size) -> None}hjb sbah}(h]h]jGah]h]h!]uh%hhj^ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hThe ``buffer_size`` specifies the number of output events to be buffered waiting for output. In some cases (see below) PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored.h](hThe }hj{ sbh;)}(h``buffer_size``h]h buffer_size}hj sbah}(h]h]h]h]h!]uh%h:hj{ ubh specifies the number of output events to be buffered waiting for output. In some cases (see below) PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored.}hj{ sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(h``latency`` is the delay in milliseconds applied to timestamps to determine when the output should actually occur. If ``latency`` is <<0, 0 is assumed.h](h;)}(h ``latency``h]hlatency}hj sbah}(h]h]h]h]h!]uh%h:hj ubhk is the delay in milliseconds applied to timestamps to determine when the output should actually occur. If }hj sbh;)}(h ``latency``h]hlatency}hj sbah}(h]h]h]h]h!]uh%h:hj ubh is <<0, 0 is assumed.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXIf ``latency`` is zero, timestamps are ignored and all output is delivered immediately. If ``latency`` is greater than zero, output is delayed until the message timestamp plus the ``latency``. In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency.h](hIf }hj sbh;)}(h ``latency``h]hlatency}hj sbah}(h]h]h]h]h!]uh%h:hj ubhM is zero, timestamps are ignored and all output is delivered immediately. If }hj sbh;)}(h ``latency``h]hlatency}hj sbah}(h]h]h]h]h!]uh%h:hj ubhN is greater than zero, output is delayed until the message timestamp plus the }hj sbh;)}(h ``latency``h]hlatency}hj sbah}(h]h]h]h]h!]uh%h:hj ubh. In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj{)}(h}Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.h]h)}(h}Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.h]h}Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%jzh'h]h)Khj h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j#abort() (pygame.midi.Output method)pygame.midi.Output.aborthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(haborth](j)}(hj8 h]habort}hj: sbah}(h]h](jjeh]h]h!]h#h$uh%jhj6 h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj6 h&hh'h]h)Kubeh}(h]j1 ah](jjeh]h]h!]jj^jj j Output.abortjj^OutputabortjOutput.abort()uh%jh'h]h)Khj3 h&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`terminates outgoing messages immediately`h]h)}(hjd h]h(terminates outgoing messages immediately}hjf sbah}(h]h]hah]h]h!]uh%hhjb ubah}(h]h]h]h]h!]uh%h)hKhj_ h&hh'h]h)Kubhz)}(h:sg:`abort() -> None`h]h)}(hj{ h]habort() -> None}hj} sbah}(h]h]jGah]h]h!]uh%hhjy ubah}(h]h]h]h]h!]uh%h)hKhj_ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj\ h&hh'h]h)Kubh)}(hThe caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time.h]hThe caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj\ h&hubh )}(h## Output.abort ##h]h## Output.abort ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj\ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj3 h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#close() (pygame.midi.Output method)pygame.midi.Output.closehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hcloseh](j)}(hj h]hclose}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jj^jj j Output.closejj^OutputclosejOutput.close()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`closes a midi stream, flushing any pending buffers.`h]h)}(hj h]h3closes a midi stream, flushing any pending buffers.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`close() -> None`h]h)}(hj h]hclose() -> None}hj sbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hCPortMidi attempts to close open streams when the application exits.h]hCPortMidi attempts to close open streams when the application exits.}hj1 sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj{)}(h-This is particularly difficult under Windows.h]h)}(hjA h]h-This is particularly difficult under Windows.}hjC sbah}(h]h]h]h]h!]uh%hh'h]h)Khj? ubah}(h]h]h]h]h!]uh%jzh'h]h)Khj h&hubh )}(h## Output.close ##h]h## Output.close ##}hjV sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjm jjn jjn jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j¬e_off() (pygame.midi.Output method)pygame.midi.Output.note_offhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hnote_offh](j)}(hj h]hnote_off}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j~ ah](jjeh]h]h!]jj^jj jOutput.note_offjj^Outputnote_offjOutput.note_off()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`turns a midi note off (note must be on)`h]h)}(hj h]h'turns a midi note off (note must be on)}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h6:sg:`note_off(note, velocity=None, channel=0) -> None`h]h)}(hj h]h0note_off(note, velocity=None, channel=0) -> None}hj sbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h]Turn a note off in the output stream. The note must already be on for this to work correctly.h]h]Turn a note off in the output stream. The note must already be on for this to work correctly.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Output.note_off ##h]h## Output.note_off ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%note_on() (pygame.midi.Output method)pygame.midi.Output.note_onhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hnote_onh](j)}(hj h]hnote_on}hj"sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj^jj jOutput.note_onjj^Outputnote_onjOutput.note_on()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`turns a midi note on (note must be off)`h]h)}(hjLh]h'turns a midi note on (note must be off)}hjNsbah}(h]h]hah]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)Kubhz)}(h5:sg:`note_on(note, velocity=None, channel=0) -> None`h]h)}(hjch]h/note_on(note, velocity=None, channel=0) -> None}hjesbah}(h]h]jGah]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%h)hKhjGh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjDh&hh'h]h)Kubh)}(h]Turn a note on in the output stream. The note must already be off for this to work correctly.h]h]Turn a note on in the output stream. The note must already be off for this to work correctly.}hj~sbah}(h]h]h]h]h!]uh%hh'h]h)KhjDh&hubh )}(h## Output.note_on ##h]h## Output.note_on ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjDh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,set_instrument() (pygame.midi.Output method)!pygame.midi.Output.set_instrumenthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hset_instrumenth](j)}(hjh]hset_instrument}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj^jj jOutput.set_instrumentjj^Outputset_instrumentjOutput.set_instrument()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`select an instrument, with a value between 0 and 127`h]h)}(hjh]h4select an instrument, with a value between 0 and 127}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h6:sg:`set_instrument(instrument_id, channel=0) -> None`h]h)}(hjh]h0set_instrument(instrument_id, channel=0) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hSelect an instrument.h]hSelect an instrument.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Output.set_instrument ##h]h## Output.set_instrument ##}hj'sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj>jj?jj?jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(pitch_bend() (pygame.midi.Output method)pygame.midi.Output.pitch_bendhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h pitch_bendh](j)}(hjVh]h pitch_bend}hjXsbah}(h]h](jjeh]h]h!]h#h$uh%jhjTh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjTh&hh'h]h)Kubeh}(h]jOah](jjeh]h]h!]jj^jj jOutput.pitch_bendjj^Output pitch_bendjOutput.pitch_bend()uh%jh'h]h)KhjQh&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`modify the pitch of a channel.`h]h)}(hjh]hmodify the pitch of a channel.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Kubhz)}(h0:sg:`set_instrument(value=0, channel=0) -> None`h]h)}(hjh]h*set_instrument(value=0, channel=0) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj}h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjzh&hh'h]h)Kubh)}(hX$Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers).h]hX$Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjzh&hubh)}(h@If no value is given, the pitch bend is returned to "no change".h]h@If no value is given, the pitch bend is returned to "no change".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjzh&hubh)}(hNew in pygame 1.9.4.h]h)}(hNew in pygame 1.9.4.h]h)}(hNew in pygame 1.9.4.h]hNew in pygame 1.9.4.}hjsbah}(h]h](hheh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]hČ versionaddedhƌ1.9.4uh%hh&hh'h]h)Khjzubeh}(h]h]h]h]h!]uh%jhjQh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#write() (pygame.midi.Output method)pygame.midi.Output.writehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hwriteh](j)}(hjh]hwrite}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj^jj j Output.writejj^OutputwritejOutput.write()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`writes a list of midi data to the Output`h]h)}(hjBh]h(writes a list of midi data to the Output}hjDsbah}(h]h]hah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Kubhz)}(h:sg:`write(data) -> None`h]h)}(hjYh]hwrite(data) -> None}hj[sbah}(h]h]jGah]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj:h&hh'h]h)Kubh)}(h8Writes series of MIDI information in the form of a list.h]h8Writes series of MIDI information in the form of a list.}hjtsbah}(h]h]h]h]h!]uh%hh'h]h)Khj:h&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hdata (list) -- data to write, the expected format is [[[status, data1=0, data2=0, ...], timestamp], ...] with the data# fields being optionalh](jN)}(hdatah]hdata}hjsbah}(h]h]h]h]h!]uh%jMhjubh (}hjsbh6)}(hhh]je)}(hlisth]hlist}hjsbah}(h]h]h]h]h!]uh%jdhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjjEjFj^jGj uh%h5hjubh)}hjsbh -- }hjsbh&data to write, the expected format is }(hjh&hh'Nh)Nubh;)}(h7``[[[status, data1=0, data2=0, ...], timestamp], ...]``h]h3[[[status, data1=0, data2=0, ...], timestamp], ...]}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh with the }(hjh&hh'Nh)Nubh;)}(h ``data#``h]hdata#}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh fields being optional}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%jhj h'h]h)Kubj)}(hhh]h)}(h9IndexError -- if more than 1024 elements in the data listh](h6)}(hhh]jN)}(h IndexErrorh]h IndexError}hj(sbah}(h]h]h]h]h!]uh%jMhj%ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj*jEjFj^jGj uh%h5hj!ubh -- }hj!sbh+if more than 1024 elements in the data list}(hj!h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhj:h&hh'Nh)Nubh)}(h Example: ::h]hExample:}hj`sbah}(h]h]h]h]h!]uh%hh'h]h)Khj:h&hubj)}(h# Program change at time 20000 and 500ms later send note 65 with # velocity 100. write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]])h]h# Program change at time 20000 and 500ms later send note 65 with # velocity 100. write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]])}hjnsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj:h&hubj{)}(h- Timestamps will be ignored if latency = 0 - To get a note to play immediately, send MIDI info with timestamp read from function Time - Optional data fields: ``write([[[0xc0, 0, 0], 20000]])`` is equivalent to ``write([[[0xc0], 20000]])``h]j@)}(hhh](jE)}(h)Timestamps will be ignored if latency = 0h]h)}(hjh]h)Timestamps will be ignored if latency = 0}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jDh'h]h)KhjubjE)}(hXTo get a note to play immediately, send MIDI info with timestamp read from function Timeh]h)}(hXTo get a note to play immediately, send MIDI info with timestamp read from function Timeh]hXTo get a note to play immediately, send MIDI info with timestamp read from function Time}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jDh'h]h)KhjubjE)}(hfOptional data fields: ``write([[[0xc0, 0, 0], 20000]])`` is equivalent to ``write([[[0xc0], 20000]])``h]h)}(hfOptional data fields: ``write([[[0xc0, 0, 0], 20000]])`` is equivalent to ``write([[[0xc0], 20000]])``h](hOptional data fields: }hjsbh;)}(h"``write([[[0xc0, 0, 0], 20000]])``h]hwrite([[[0xc0, 0, 0], 20000]])}hjsbah}(h]h]h]h]h!]uh%h:hjubh is equivalent to }hjsbh;)}(h``write([[[0xc0], 20000]])``h]hwrite([[[0xc0], 20000]])}hjsbah}(h]h]h]h]h!]uh%h:hjubeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jDh'h]h)Khjubeh}(h]h]h]h]h!]bullet-uh%j?h'h]h)Khj|ubah}(h]h]h]h]h!]uh%jzh'h]h)Khj:h&hubh )}(h## Output.write ##h]h## Output.write ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)write_short() (pygame.midi.Output method)pygame.midi.Output.write_shorthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h write_shorth](j)}(hj&h]h write_short}hj(sbah}(h]h](jjeh]h]h!]h#h$uh%jhj$h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj$h&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jj^jj jOutput.write_shortjj^Output write_shortjOutput.write_short()uh%jh'h]h)Khj!h&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`writes up to 3 bytes of midi data to the Output`h]h)}(hjRh]h/writes up to 3 bytes of midi data to the Output}hjTsbah}(h]h]hah]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kubhz)}(h!:sg:`write_short(status) -> None`h]h)}(hjih]hwrite_short(status) -> None}hjksbah}(h]h]jGah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kubhz)}(h3:sg:`write_short(status, data1=0, data2=0) -> None`h]h)}(hjh]h-write_short(status, data1=0, data2=0) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjJh&hh'h]h)Kubh)}(hlOutput MIDI information of 3 bytes or less. The ``data`` fields are optional and assumed to be 0 if omitted.h](h0Output MIDI information of 3 bytes or less. The }hjsbh;)}(h``data``h]hdata}hjsbah}(h]h]h]h]h!]uh%h:hjubh4 fields are optional and assumed to be 0 if omitted.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjJh&hubh)}(h"Examples of status byte values: ::h]hExamples of status byte values:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjJh&hubj)}(h-0xc0 # program change 0x90 # note on # etc.h]h-0xc0 # program change 0x90 # note on # etc.}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MhjJh&hubh)}(h Example: ::h]hExample:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hjJh&hubj)}(h9# note 65 on with velocity 100 write_short(0x90, 65, 100)h]h9# note 65 on with velocity 100 write_short(0x90, 65, 100)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MhjJh&hubh )}(h## Output.write_short ##h]h## Output.write_short ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjJh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*write_sys_ex() (pygame.midi.Output method)pygame.midi.Output.write_sys_exhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h write_sys_exh](j)}(hj"h]h write_sys_ex}hj$sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj^jj jOutput.write_sys_exjj^Output write_sys_exjOutput.write_sys_ex()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`writes a timestamped system-exclusive midi message.`h]h)}(hjNh]h3writes a timestamped system-exclusive midi message.}hjPsbah}(h]h]hah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)Mubhz)}(h%:sg:`write_sys_ex(when, msg) -> None`h]h)}(hjeh]hwrite_sys_ex(when, msg) -> None}hjgsbah}(h]h]jGah]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjFh&hh'h]h)Mubh)}(h3Writes a timestamped system-exclusive midi message.h]h3Writes a timestamped system-exclusive midi message.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjFh&hubj)}(hhh]j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]j@)}(hhh](jE)}(hhh]h)}(h&msg (list[int] or str) -- midi messageh](jN)}(hmsgh]hmsg}hjsbah}(h]h]h]h]h!]uh%jMhjubh (}hjsbh6)}(hhh]je)}(hlisth]hlist}hjsbah}(h]h]h]h]h!]uh%jdhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjjEjFj^jGj uh%h5hjubje)}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%jdhjubh6)}(hhh]je)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jdhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjEjFj^jGj uh%h5hjubje)}(h] or h]h] or }hjsbah}(h]h]h]h]h!]uh%jdhjubh6)}(hhh]je)}(hstrh]hstr}hjsbah}(h]h]h]h]h!]uh%jdhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetjjEjFj^jGj uh%h5hjubh)}hjsbh -- }hjsbh midi message}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jDhjubjE)}(hhh]h)}(h!when -- timestamp in millisecondsh](jN)}(hwhenh]hwhen}hjNsbah}(h]h]h]h]h!]uh%jMhjJubh -- }hjJsbhtimestamp in milliseconds}(hjJh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%jDhjubeh}(h]h]h]h]h!]uh%j?hjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjFh&hh'Nh)Nubh)}(h Example: ::h]hExample:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjFh&hubj)}(hmidi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7') # is equivalent to midi_output.write_sys_ex(pygame.midi.time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7])h]hmidi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7') # is equivalent to midi_output.write_sys_ex(pygame.midi.time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)M"hjFh&hubh )}(h## Output.write_sys_ex ##h]h## Output.write_sys_ex ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjFh&hh'h]h)M)ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubh )}(h## pygame.midi.Output ##h]h## pygame.midi.Output ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#get_count() (in module pygame.midi)pygame.midi.get_counthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_counth](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M-ubj)}(hjh]h get_count}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M-ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M-ubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jj get_count()uh%jh'h]h)M-hjh&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`gets the number of devices.`h]h)}(hj%h]hgets the number of devices.}hj'sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M/ubhz)}(h :sg:`get_count() -> num_devices`h]h)}(hj<h]hget_count() -> num_devices}hj>sbah}(h]h]jGah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M/ubh)}(h.Device ids range from 0 to ``get_count() - 1``h](hDevice ids range from 0 to }hjWsbh;)}(h``get_count() - 1``h]hget_count() - 1}hj_sbah}(h]h]h]h]h!]uh%h:hjWubeh}(h]h]h]h]h!]uh%hh'h]h)M2hjh&hubh )}(h## pygame.midi.get_count ##h]h## pygame.midi.get_count ##}hjssbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M4ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_default_input_id() (in module pygame.midi) pygame.midi.get_default_input_idhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_default_input_idh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M6ubj)}(hjh]hget_default_input_id}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M6ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M6ubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjget_default_input_id()uh%jh'h]h)M6hjh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`gets default input device number`h]h)}(hjh]h gets default input device number}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M8ubhz)}(h*:sg:`get_default_input_id() -> default_id`h]h)}(hjh]h$get_default_input_id() -> default_id}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M9ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M8ubh)}(hkThe following describes the usage details for this function and the :func:`get_default_output_id` function.h](hDThe following describes the usage details for this function and the }hj sbh6)}(h:func:`get_default_output_id`h]h;)}(hjh]hget_default_output_id()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj!reftypefunc refexplicitrefwarnhYj^hZNh[get_default_output_iduh%h5h'h]h)M;hj ubh function.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M;hjh&hubh)}(hReturn the default device ID or ``-1`` if there are no devices. The result can be passed to the :class:`Input`/:class:`Output` class.h](h Return the default device ID or }hj=sbh;)}(h``-1``h]h-1}hjEsbah}(h]h]h]h]h!]uh%h:hj=ubh: if there are no devices. The result can be passed to the }hj=sbh6)}(h:class:`Input`h]h;)}(hjYh]hInput}hj[sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjWubah}(h]h]h]h]h!]refdochS refdomainjereftypeclass refexplicitrefwarnhYj^hZNh[Inputuh%h5h'h]h)M>hj=ubh/}hj=sbh6)}(h:class:`Output`h]h;)}(hj}h]hOutput}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj{ubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYj^hZNh[Outputuh%h5h'h]h)M>hj=ubh class.}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)M>hjh&hubh)}(hsOn a PC the user can specify a default device by setting an environment variable. To use device #1, for example: ::h]hpOn a PC the user can specify a default device by setting an environment variable. To use device #1, for example:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MAhjh&hubj)}(hGset PM_RECOMMENDED_INPUT_DEVICE=1 or set PM_RECOMMENDED_OUTPUT_DEVICE=1h]hGset PM_RECOMMENDED_INPUT_DEVICE=1 or set PM_RECOMMENDED_OUTPUT_DEVICE=1}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MEhjh&hubh)}(hpThe user should first determine the available device ID by using the supplied application "testin" or "testout".h]hpThe user should first determine the available device ID by using the supplied application "testin" or "testout".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MIhjh&hubh)}(hXvIn general, the registry is a better place for this kind of info. With USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if ``PM_RECOMMENDED_INPUT_DEVICE`` (or ``PM_RECOMMENDED_OUTPUT_DEVICE``) is NOT found in the environment, then the default device is obtained by looking for a string in the registry under: ::h](hIn general, the registry is a better place for this kind of info. With USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if }hjsbh;)}(h``PM_RECOMMENDED_INPUT_DEVICE``h]hPM_RECOMMENDED_INPUT_DEVICE}hjsbah}(h]h]h]h]h!]uh%h:hjubh (or }hjsbh;)}(h ``PM_RECOMMENDED_OUTPUT_DEVICE``h]hPM_RECOMMENDED_OUTPUT_DEVICE}hjsbah}(h]h]h]h]h!]uh%h:hjubhu) is NOT found in the environment, then the default device is obtained by looking for a string in the registry under:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MLhjh&hubj)}(hHKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device or HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Deviceh]hHKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device or HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MThjh&hubh)}(hXThe number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB" and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB".h]hXThe number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB" and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB".}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MYhjh&hubh)}(hIn addition to the name, :func:`get_device_info()` returns "interf", which is the interface name. The "interface" is the underlying software system or API used by PortMidi to access devices. Supported interfaces: ::h](hIn addition to the name, }hjsbh6)}(h:func:`get_device_info()`h]h;)}(hj'h]hget_device_info()}hj)sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj%ubah}(h]h]h]h]h!]refdochS refdomainj3reftypefunc refexplicitrefwarnhYj^hZNh[get_device_infouh%h5h'h]h)M^hjubh returns "interf", which is the interface name. The "interface" is the underlying software system or API used by PortMidi to access devices. Supported interfaces:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M^hjh&hubj)}(hMMSystem # the only Win32 interface currently supported ALSA # the only Linux interface currently supported CoreMIDI # the only Mac OS X interface currently supported # DirectX - not implemented # OSS - not implementedvh]hMMSystem # the only Win32 interface currently supported ALSA # the only Linux interface currently supported CoreMIDI # the only Mac OS X interface currently supported # DirectX - not implemented # OSS - not implemented}hjOsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mchjh&hubh)}(hX(To specify both the interface and the device name in the registry, separate the two with a comma and a space. The string before the comma must be a substring of the "interf" string and the string after the space must be a substring of the "name" name string in order to match the device. e.g.: ::h]hX%To specify both the interface and the device name in the registry, separate the two with a comma and a space. The string before the comma must be a substring of the "interf" string and the string after the space must be a substring of the "name" name string in order to match the device. e.g.:}hj]sbah}(h]h]h]h]h!]uh%hh'h]h)Mihjh&hubj)}(hMMSystem, In USB MidiSport 1x1h]hMMSystem, In USB MidiSport 1x1}hjksbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mohjh&hubj{)}(hwIn the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID).h]h)}(hwIn the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID).h]hwIn the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID).}hj}sbah}(h]h]h]h]h!]uh%hh'h]h)Mrhjyubah}(h]h]h]h]h!]uh%jzh'h]h)Mqhjh&hubh )}(h&## pygame.midi.get_default_input_id ##h]h&## pygame.midi.get_default_input_id ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Muubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/get_default_output_id() (in module pygame.midi)!pygame.midi.get_default_output_idhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_default_output_idh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mwubj)}(hjh]hget_default_output_id}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mwubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mwubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjget_default_output_id()uh%jh'h]h)Mwhjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`gets default output device number`h]h)}(hjh]h!gets default output device number}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Myubhz)}(h+:sg:`get_default_output_id() -> default_id`h]h)}(hjh]h%get_default_output_id() -> default_id}hjsbah}(h]h]jGah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mzubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Myubh)}(h3See :func:`get_default_input_id` for usage details.h](hSee }hj)sbh6)}(h:func:`get_default_input_id`h]h;)}(hj3h]hget_default_input_id()}hj5sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj1ubah}(h]h]h]h]h!]refdochS refdomainj?reftypefunc refexplicitrefwarnhYj^hZNh[get_default_input_iduh%h5h'h]h)M|hj)ubh for usage details.}hj)sbeh}(h]h]h]h]h!]uh%hh'h]h)M|hjh&hubh )}(h'## pygame.midi.get_default_output_id ##h]h'## pygame.midi.get_default_output_id ##}hj[sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjrjjsjjsjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)get_device_info() (in module pygame.midi)pygame.midi.get_device_infohNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_device_infoh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hget_device_info}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjget_device_info()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`returns information about a midi device`h]h)}(hjh]h'returns information about a midi device}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(hE:sg:`get_device_info(an_id) -> (interf, name, input, output, opened)`h]h)}(hjh]h?get_device_info(an_id) -> (interf, name, input, output, opened)}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h$:sg:`get_device_info(an_id) -> None`h]h)}(hjh]hget_device_info(an_id) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h$Gets the device info for a given id.h]h$Gets the device info for a given id.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hhh](j)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h2an_id (int) -- id of the midi device being queriedh](jN)}(han_idh]han_id}hj3sbah}(h]h]h]h]h!]uh%jMhj/ubh (}hj/sbh6)}(hhh]je)}(hinth]hint}hjHsbah}(h]h]h]h]h!]uh%jdhjEubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjJjEjFj^jGNuh%h5hj/ubh)}hj/sbh -- }hj/sbh#id of the midi device being queried}(hj/h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hXif the id is out of range None is returned, otherwise a tuple of (interf, name, input, output, opened) is returned.interf: string describing the device interface (e.g. 'ALSA') name: string name of the device (e.g. 'Midi Through Port-0') input: 1 if the device is an input device, otherwise 0 output: 1 if the device is an output device, otherwise 0 opened: 1 if the device is opened, otherwise 0h](h)}(hwif the id is out of range ``None`` is returned, otherwise a tuple of (interf, name, input, output, opened) is returned.h](hif the id is out of range }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubhU is returned, otherwise a tuple of (interf, name, input, output, opened) is returned.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh block_quote)}(hX"- interf: string describing the device interface (e.g. 'ALSA') - name: string name of the device (e.g. 'Midi Through Port-0') - input: 1 if the device is an input device, otherwise 0 - output: 1 if the device is an output device, otherwise 0 - opened: 1 if the device is opened, otherwise 0h]j@)}(hhh](jE)}(h [Event, ...]`h]h)}(hj%h]h4midis2events(midi_events, device_id) -> [Event, ...]}hj'sbah}(h]h]jGah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hBTakes a sequence of midi events and returns list of pygame events.h]hBTakes a sequence of midi events and returns list of pygame events.}hj@sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThe ``midi_events`` data is expected to be a sequence of ``((status, data1, data2, data3), timestamp)`` midi events (all values required).h](hThe }hjNsbh;)}(h``midi_events``h]h midi_events}hjVsbah}(h]h]h]h]h!]uh%h:hjNubh& data is expected to be a sequence of }hjNsbh;)}(h.``((status, data1, data2, data3), timestamp)``h]h*((status, data1, data2, data3), timestamp)}hjhsbah}(h]h]h]h]h!]uh%h:hjNubh# midi events (all values required).}hjNsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hhh](j)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(h,a list of pygame events of event type MIDIINh](h&a list of pygame events of event type }(hjh&hh'Nh)Nubh;)}(h ``MIDIIN``h]hMIDIIN}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hlisth]h6)}(hhh]hlist}hjsbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetlistjEjFj^jGNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh )}(h## pygame.midi.midis2events ##h]h## pygame.midi.midis2events ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jtime() (in module pygame.midi)pygame.midi.timehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(htimeh](j)}(h pygame.midi.h]h pygame.midi.}hj2sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubj)}(hj0h]htime}hj@sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jj^jhjj0jj^j0jtime()uh%jh'h]h)Mhj+h&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`returns the current time in ms of the PortMidi timer`h]h)}(hjgh]h4returns the current time in ms of the PortMidi timer}hjisbah}(h]h]hah]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%h)hKhjbh&hh'h]h)Mubhz)}(h:sg:`time() -> time`h]h)}(hj~h]htime() -> time}hjsbah}(h]h]jGah]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%h)hKhjbh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj_h&hh'h]h)Mubh)}(hIThe time is reset to 0 when the :mod:`pygame.midi` module is initialized.h](h The time is reset to 0 when the }hjsbh6)}(h:mod:`pygame.midi`h]h;)}(hjh]h pygame.midi}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYj^hZNh[ pygame.midiuh%h5h'h]h)Mhjubh module is initialized.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj_h&hubh )}(h## pygame.midi.time ##h]h## pygame.midi.time ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj_h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj+h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+frequency_to_midi() (in module pygame.midi)pygame.midi.frequency_to_midihNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hfrequency_to_midih](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hfrequency_to_midi}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjfrequency_to_midi()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`Converts a frequency into a MIDI note. Rounds to the closest midi note.`h]h)}(hj1h]hGConverts a frequency into a MIDI note. Rounds to the closest midi note.}hj3sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)Mubhz)}(h/:sg:`frequency_to_midi(midi_note) -> midi_note`h]h)}(hjHh]h)frequency_to_midi(midi_note) -> midi_note}hjJsbah}(h]h]jGah]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj)h&hh'h]h)Mubh)}(h example: ::h]hexample:}hjcsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj)h&hubj)}(hfrequency_to_midi(27.5) == 21h]hfrequency_to_midi(27.5) == 21}hjqsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhj)h&hubh)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hjsbah}(h]h](hheh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]hČ versionaddedhƌ1.9.5uh%hh&hh'h]h)Mhj)ubh )}(h### pygame.midi.frequency_to_midi ##h]h### pygame.midi.frequency_to_midi ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+midi_to_frequency() (in module pygame.midi)pygame.midi.midi_to_frequencyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hmidi_to_frequencyh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hmidi_to_frequency}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjmidi_to_frequency()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`Converts a midi note to a frequency.`h]h)}(hj h]h$Converts a midi note to a frequency.}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h/:sg:`midi_to_frequency(midi_note) -> frequency`h]h)}(hj!h]h)midi_to_frequency(midi_note) -> frequency}hj#sbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h example: ::h]hexample:}hj<sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hmidi_to_frequency(21) == 27.5h]hmidi_to_frequency(21) == 27.5}hjJsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubh)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj`sbah}(h]h](hheh]h]h!]uh%hhj\ubah}(h]h]h]h]h!] translatableuh%hhjXh&hh'h]h)Mubah}(h]h]h]h]h!]hČ versionaddedhƌ1.9.5uh%hh&hh'h]h)Mhjubh )}(h### pygame.midi.midi_to_frequency ##h]h### pygame.midi.midi_to_frequency ##}hj}sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+midi_to_ansi_note() (in module pygame.midi)pygame.midi.midi_to_ansi_notehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hmidi_to_ansi_noteh](j)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hmidi_to_ansi_note}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jj^jhjjjj^jjmidi_to_ansi_note()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`Returns the Ansi Note name for a midi number.`h]h)}(hjh]h-Returns the Ansi Note name for a midi number.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h/:sg:`midi_to_ansi_note(midi_note) -> ansi_note`h]h)}(hjh]h)midi_to_ansi_note(midi_note) -> ansi_note}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h example: ::h]hexample:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubj)}(hmidi_to_ansi_note(21) == 'A0'h]hmidi_to_ansi_note(21) == 'A0'}hj#sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubh)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj9sbah}(h]h](hheh]h]h!]uh%hhj5ubah}(h]h]h]h]h!] translatableuh%hhj1h&hh'h]h)Mubah}(h]h]h]h]h!]hČ versionaddedhƌ1.9.5uh%hh&hh'h]h)Mhjubh )}(h### pygame.midi.midi_to_ansi_note ##h]h### pygame.midi.midi_to_ansi_note ##}hjVsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjmjjnjjnjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j MidiExceptionpygame.midi.MidiExceptionhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hj}h](hdesc_annotation)}(h6[<#text: 'exception'>, >]h](h exception}hjsbhdesc_sig_space)}(h h]h }hjsbah}(h]h]wah]h]h!]uh%jhjubeh}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h pygame.midi.h]h pygame.midi.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hj}h]h MidiException}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]j~ah](jjeh]h]h!]jj^jhjj}jj^j}jj}uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h@:sl:`exception that pygame.midi functions and classes can raise`h]h)}(hjh]h:exception that pygame.midi functions and classes can raise}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h":sg:`MidiException(errno) -> None`h]h)}(hjh]hMidiException(errno) -> None}hjsbah}(h]h]jGah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h## pygame.midi.MidiException ##h]h## pygame.midi.MidiException ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py exceptioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.midi ##h]h## pygame.midi ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-midieh]h] pygame.midiah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj_ error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j2 j/ s nametypes}j2 sh}(j/ h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j h'h]h)Khh,h&hubjjjjj jjjjj jjj7 j< j j j1 j6 j j j~ j jjjjjOjTjjjj$jj jjjjjjjjjjj)j.jjjjjjj~ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](h system_message)}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]levelKtypeINFOlineKsourceh]uh%j hj:h&hh'h]h)Kubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]levelKtypej lineMsourceh]uh%j hjJh&hh'h]h)Mubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]levelKtypej lineM sourceh]uh%j hjJh&hh'h]h)M ubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj#!sbah}(h]h]h]h]h!]uh%hhj !ubah}(h]h]h]h]h!]levelKtypej lineM sourceh]uh%j hjFh&hh'h]h)M ubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj>!sbah}(h]h]h]h]h!]uh%hhj;!ubah}(h]h]h]h]h!]levelKtypej lineMsourceh]uh%j hj)h&hh'h]h)Mubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hjY!sbah}(h]h]h]h]h!]uh%hhjV!ubah}(h]h]h]h]h!]levelKtypej lineMsourceh]uh%j hjh&hh'h]h)Mubj )}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hjt!sbah}(h]h]h]h]h!]uh%hhjq!ubah}(h]h]h]h]h!]levelKtypej lineMsourceh]uh%j hjh&hh'h]h)Mubetransform_messages] transformerN include_log]docs/reST/ref/midi.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.0231407 pygame-2.6.1/docs/generated/doctrees/ref/mixer.doctree0000644000175100001770000034747214676242420022404 0ustar00runnerdocker2sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.mixer`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.mixer}hh None`h]h)}(hjNh]hinit(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None}hjPsbah}(h]h] signatureah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)K/ubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)K.ubh)}(hXnInitialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used. (startup defaults may be changed by a :func:`pre_init` call).h](hX Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for }hjjsbh;)}(h``allowedchanges``h]hallowedchanges}hjrsbah}(h]h]h]h]h!]uh%h:hjjubh:, where -1 is used. (startup defaults may be changed by a }hjjsbh6)}(h:func:`pre_init`h]h;)}(hjh]h pre_init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pre_inituh%h5h'h]h)K1hjjubh call).}hjjsbeh}(h]h]h]h]h!]uh%hh'h]h)K1hj/h&hubh)}(hThe size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception.h]hThe size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K7hj/h&hubh)}(hdThe channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo.h]hdThe channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K None`h]h)}(hjh]hpre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kjubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kiubh)}(hXCall pre_init to change the defaults used when the real ``pygame.mixer.init()`` is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call ``pygame.mixer.pre_init()`` before calling the top level ``pygame.init()``. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used.h](h8Call pre_init to change the defaults used when the real }hj-sbh;)}(h``pygame.mixer.init()``h]hpygame.mixer.init()}hj5sbah}(h]h]h]h]h!]uh%h:hj-ubhh is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call }hj-sbh;)}(h``pygame.mixer.pre_init()``h]hpygame.mixer.pre_init()}hjGsbah}(h]h]h]h]h!]uh%h:hj-ubh before calling the top level }hj-sbh;)}(h``pygame.init()``h]h pygame.init()}hjYsbah}(h]h]h]h]h!]uh%h:hj-ubhg. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for }hj-sbh;)}(h``allowedchanges``h]hallowedchanges}hjksbah}(h]h]h]h]h!]uh%h:hj-ubh, where -1 is used.}hj-sbeh}(h]h]h]h]h!]uh%hh'h]h)Klhjh&hubj)}(hHChanged in pygame 1.8: The default buffersize changed from 1024 to 3072.h]h)}(hHChanged in pygame 1.8: The default buffersize changed from 1024 to 3072.h](h)}(hChanged in pygame 1.8: h]hChanged in pygame 1.8: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Ksubh The default }(hjh&hh'Nh)Nubh;)}(h``buffersize``h]h buffersize}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh changed from 1024 to 3072.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Ksubah}(h]h]h]h]h!]jversionchangedj 1.8uh%jh&hh'h]h)Kshjubj)}(hJChanged in pygame 1.9.1: The default buffersize changed from 3072 to 4096.h]h)}(hJChanged in pygame 1.9.1: The default buffersize changed from 3072 to 4096.h](h)}(hChanged in pygame 1.9.1: h]hChanged in pygame 1.9.1: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Ktubh The default }(hjh&hh'Nh)Nubh;)}(h``buffersize``h]h buffersize}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh changed from 3072 to 4096.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Ktubah}(h]h]h]h]h!]jversionchangedj 1.9.1uh%jh&hh'h]h)Kthjubj)}(hIChanged in pygame 2.0.0: The default buffersize changed from 4096 to 512.h]h)}(hIChanged in pygame 2.0.0: The default buffersize changed from 4096 to 512.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Kuubh The default }(hjh&hh'Nh)Nubh;)}(h``buffersize``h]h buffersize}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh changed from 4096 to 512.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kuubah}(h]h]h]h]h!]jversionchangedj 2.0.0uh%jh&hh'h]h)Kuhjubj)}(hKChanged in pygame 2.0.0: The default frequency changed from 22050 to 44100.h]h)}(hKChanged in pygame 2.0.0: The default frequency changed from 22050 to 44100.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hj<sbah}(h]h](jjeh]h]h!]uh%hhj8h&hh'h]h)Kvubh The default }(hj8h&hh'Nh)Nubh;)}(h ``frequency``h]h frequency}hjNsbah}(h]h]h]h]h!]uh%h:hj8h&hh'Nh)Nubh changed from 22050 to 44100.}(hj8h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj4h&hh'h]h)Kvubah}(h]h]h]h]h!]jversionchangedj 2.0.0uh%jh&hh'h]h)Kvhjubj)}(h?New in pygame 2.0.0: allowedchanges, devicename arguments addedh]h)}(h?New in pygame 2.0.0: allowedchanges, devicename arguments addedh](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hjwsbah}(h]h](jjTeh]h]h!]uh%hhjsh&hh'h]h)Kxubh;)}(h``allowedchanges``h]hallowedchanges}hjsbah}(h]h]h]h]h!]uh%h:hjsh&hh'Nh)Nubh, }(hjsh&hh'Nh)Nubh;)}(h``devicename``h]h devicename}hjsbah}(h]h]h]h]h!]uh%h:hjsh&hh'Nh)Nubh arguments added}(hjsh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjoh&hh'h]h)Kxubah}(h]h]h]h]h!]j versionaddedj 2.0.0uh%jh&hh'h]h)Kwhjubh )}(h## pygame.mixer.pre_init ##h]h## pygame.mixer.pre_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kyubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jquit() (in module pygame.mixer)pygame.mixer.quithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hquith](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K{ubj)}(hjh]hquit}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)K{ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K{ubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+quit()uh%jh'h]h)K{hjh&hubj.)}(hhh](hv)}(hhh](hz)}(h:sl:`uninitialize the mixer`h]h)}(hjh]huninitialize the mixer}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K}ubhz)}(h:sg:`quit() -> None`h]h)}(hj5h]hquit() -> None}hj7sbah}(h]h]jZah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K~ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K}ubh)}(hThis will uninitialize :mod:`pygame.mixer`. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later.h](hThis will uninitialize }hjPsbh6)}(h:mod:`pygame.mixer`h]h;)}(hjZh]h pygame.mixer}hj\sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjXubah}(h]h]h]h]h!]refdochS refdomainjfreftypemod refexplicitrefwarnhYhhZNh[ pygame.mixeruh%h5h'h]h)KhjPubhx. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later.}hjPsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.mixer.quit ##h]h## pygame.mixer.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#get_init() (in module pygame.mixer)pygame.mixer.get_inithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hget_init}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+ get_init()uh%jh'h]h)Khjh&hubj.)}(hhh](hv)}(hhh](hz)}(h&:sl:`test if the mixer is initialized`h]h)}(hjh]h test if the mixer is initialized}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h1:sg:`get_init() -> (frequency, format, channels)`h]h)}(hjh]h+get_init() -> (frequency, format, channels)}hj sbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hIf the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns ``None``.h](hIf the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns }hj sbh;)}(h``None``h]hNone}hj" sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.mixer.get_init ##h]h## pygame.mixer.get_init ##}hj: sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjQ jjR jjR jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jstop() (in module pygame.mixer)pygame.mixer.stophNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hstoph](j)}(h pygame.mixer.h]h pygame.mixer.}hjk sbah}(h]h](jjeh]h]h!]h#h$uh%jhjg h&hh'h]h)Kubj)}(hji h]hstop}hjy sbah}(h]h](j jeh]h]h!]h#h$uh%jhjg h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjg h&hh'h]h)Kubeh}(h]jb ah](j!j"eh]h]h!]j&hj'hj(ji j)hji j+stop()uh%jh'h]h)Khjd h&hubj.)}(hhh](hv)}(hhh](hz)}(h):sl:`stop playback of all sound channels`h]h)}(hj h]h#stop playback of all sound channels}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`stop() -> None`h]h)}(hj h]hstop() -> None}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h9This will stop all playback of all active mixer channels.h]h9This will stop all playback of all active mixer channels.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.mixer.stop ##h]h## pygame.mixer.stop ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjd h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j pause() (in module pygame.mixer)pygame.mixer.pausehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hpauseh](j)}(h pygame.mixer.h]h pygame.mixer.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hpause}hj sbah}(h]h](j jeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j!j"eh]h]h!]j&hj'hj(j j)hj j+pause()uh%jh'h]h)Khj h&hubj.)}(hhh](hv)}(hhh](hz)}(h5:sl:`temporarily stop playback of all sound channels`h]h)}(hjF h]h/temporarily stop playback of all sound channels}hjH sbah}(h]h]hah]h]h!]uh%hhjD ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubhz)}(h:sg:`pause() -> None`h]h)}(hj] h]hpause() -> None}hj_ sbah}(h]h]jZah]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj> h&hh'h]h)Kubh)}(hThis will temporarily stop all playback on the active mixer channels. The playback can later be resumed with ``pygame.mixer.unpause()``h](hmThis will temporarily stop all playback on the active mixer channels. The playback can later be resumed with }hjx sbh;)}(h``pygame.mixer.unpause()``h]hpygame.mixer.unpause()}hj sbah}(h]h]h]h]h!]uh%h:hjx ubeh}(h]h]h]h]h!]uh%hh'h]h)Khj> h&hubh )}(h## pygame.mixer.pause ##h]h## pygame.mixer.pause ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj> h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"unpause() (in module pygame.mixer)pygame.mixer.unpausehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hunpauseh](j)}(h pygame.mixer.h]h pygame.mixer.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hunpause}hj sbah}(h]h](j jeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j!j"eh]h]h!]j&hj'hj(j j)hj j+ unpause()uh%jh'h]h)Khj h&hubj.)}(hhh](hv)}(hhh](hz)}(h.:sl:`resume paused playback of sound channels`h]h)}(hj h]h(resume paused playback of sound channels}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`unpause() -> None`h]h)}(hj h]hunpause() -> None}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hGThis will resume all active sound channels after they have been paused.h]hGThis will resume all active sound channels after they have been paused.}hj, sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.mixer.unpause ##h]h## pygame.mixer.unpause ##}hj: sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjQ jjR jjR jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"fadeout() (in module pygame.mixer)pygame.mixer.fadeouthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hfadeouth](j)}(h pygame.mixer.h]h pygame.mixer.}hjk sbah}(h]h](jjeh]h]h!]h#h$uh%jhjg h&hh'h]h)Kubj)}(hji h]hfadeout}hjy sbah}(h]h](j jeh]h]h!]h#h$uh%jhjg h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjg h&hh'h]h)Kubeh}(h]jb ah](j!j"eh]h]h!]j&hj'hj(ji j)hji j+ fadeout()uh%jh'h]h)Khjd h&hubj.)}(hhh](hv)}(hhh](hz)}(h7:sl:`fade out the volume on all sounds before stopping`h]h)}(hj h]h1fade out the volume on all sounds before stopping}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`fadeout(time) -> None`h]h)}(hj h]hfadeout(time) -> None}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hThis will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop.h]hThis will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.mixer.fadeout ##h]h## pygame.mixer.fadeout ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjd h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+set_num_channels() (in module pygame.mixer)pygame.mixer.set_num_channelshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_num_channelsh](j)}(h pygame.mixer.h]h pygame.mixer.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hset_num_channels}hj sbah}(h]h](j jeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j!j"eh]h]h!]j&hj'hj(j j)hj j+set_num_channels()uh%jh'h]h)Khj h&hubj.)}(hhh](hv)}(hhh](hz)}(h/:sl:`set the total number of playback channels`h]h)}(hjF h]h)set the total number of playback channels}hjH sbah}(h]h]hah]h]h!]uh%hhjD ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubhz)}(h%:sg:`set_num_channels(count) -> None`h]h)}(hj] h]hset_num_channels(count) -> None}hj_ sbah}(h]h]jZah]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%h)hKhjA h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj> h&hh'h]h)Kubh)}(hSets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped.h]hSets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped.}hjx sbah}(h]h]h]h]h!]uh%hh'h]h)Khj> h&hubh )}(h### pygame.mixer.set_num_channels ##h]h### pygame.mixer.set_num_channels ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj> h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+get_num_channels() (in module pygame.mixer)pygame.mixer.get_num_channelshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_num_channelsh](j)}(h pygame.mixer.h]h pygame.mixer.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hget_num_channels}hj sbah}(h]h](j jeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j!j"eh]h]h!]j&hj'hj(j j)hj j+get_num_channels()uh%jh'h]h)Khj h&hubj.)}(hhh](hv)}(hhh](hz)}(h/:sl:`get the total number of playback channels`h]h)}(hj h]h)get the total number of playback channels}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h!:sg:`get_num_channels() -> count`h]h)}(hj h]hget_num_channels() -> count}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h9Returns the number of currently active playback channels.h]h9Returns the number of currently active playback channels.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h### pygame.mixer.get_num_channels ##h]h### pygame.mixer.get_num_channels ##}hj, sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjC jjD jjD jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'set_reserved() (in module pygame.mixer)pygame.mixer.set_reservedhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_reservedh](j)}(h pygame.mixer.h]h pygame.mixer.}hj] sbah}(h]h](jjeh]h]h!]h#h$uh%jhjY h&hh'h]h)Kubj)}(hj[ h]h set_reserved}hjk sbah}(h]h](j jeh]h]h!]h#h$uh%jhjY h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjY h&hh'h]h)Kubeh}(h]jT ah](j!j"eh]h]h!]j&hj'hj(j[ j)hj[ j+set_reserved()uh%jh'h]h)KhjV h&hubj.)}(hhh](hv)}(hhh](hz)}(h4:sl:`reserve channels from being automatically used`h]h)}(hj h]h.reserve channels from being automatically used}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h":sg:`set_reserved(count) -> count`h]h)}(hj h]hset_reserved(count) -> count}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hX.The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. This means that whenever you play a Sound without specifying a channel, a reserved channel will never be used. If sounds are currently playing on the reserved channels they will not be stopped.h]hX.The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. This means that whenever you play a Sound without specifying a channel, a reserved channel will never be used. If sounds are currently playing on the reserved channels they will not be stopped.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hThis allows the application to reserve a specific number of channels for important sounds that must not be dropped or have a guaranteed channel to play on.h]hThis allows the application to reserve a specific number of channels for important sounds that must not be dropped or have a guaranteed channel to play on.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hWill return number of channels actually reserved, this may be less than requested depending on the number of channels previously allocated.h]hWill return number of channels actually reserved, this may be less than requested depending on the number of channels previously allocated.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.mixer.set_reserved ##h]h## pygame.mixer.set_reserved ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjV h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'find_channel() (in module pygame.mixer)pygame.mixer.find_channelhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h find_channelh](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]h find_channel}hj-sbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+find_channel()uh%jh'h]h)Khjh&hubj.)}(hhh](hv)}(hhh](hz)}(h:sl:`find an unused channel`h]h)}(hjTh]hfind an unused channel}hjVsbah}(h]h]hah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhjOh&hh'h]h)Kubhz)}(h*:sg:`find_channel(force=False) -> Channel`h]h)}(hjkh]h$find_channel(force=False) -> Channel}hjmsbah}(h]h]jZah]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%h)hKhjOh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjLh&hh'h]h)Kubh)}(hX This will find and return an inactive Channel object. If there are no inactive Channels this function will return ``None``. If there are no inactive channels and the force argument is ``True``, this will find the Channel with the longest running Sound and return it.h](hrThis will find and return an inactive Channel object. If there are no inactive Channels this function will return }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh>. If there are no inactive channels and the force argument is }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubhJ, this will find the Channel with the longest running Sound and return it.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KhjLh&hubh )}(h## pygame.mixer.find_channel ##h]h## pygame.mixer.find_channel ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjLh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#get_busy() (in module pygame.mixer)pygame.mixer.get_busyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_busyh](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hget_busy}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+ get_busy()uh%jh'h]h)Khjh&hubj.)}(hhh](hv)}(hhh](hz)}(h&:sl:`test if any sound is being mixed`h]h)}(hjh]h test if any sound is being mixed}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_busy() -> bool`h]h)}(hj5h]hget_busy() -> bool}hj7sbah}(h]h]jZah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hkReturns ``True`` if the mixer is busy mixing any channels. If the mixer is idle then this return ``False``.h](hReturns }hjPsbh;)}(h``True``h]hTrue}hjXsbah}(h]h]h]h]h!]uh%h:hjPubhQ if the mixer is busy mixing any channels. If the mixer is idle then this return }hjPsbh;)}(h ``False``h]hFalse}hjjsbah}(h]h]h]h]h!]uh%h:hjPubh.}hjPsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.mixer.get_busy ##h]h## pygame.mixer.get_busy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j0get_sdl_mixer_version() (in module pygame.mixer)"pygame.mixer.get_sdl_mixer_versionhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_sdl_mixer_versionh](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hget_sdl_mixer_version}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+get_sdl_mixer_version()uh%jh'h]h)Khjh&hubj.)}(hhh](hv)}(hhh](hz)}(h!:sl:`get the mixer's SDL version`h]h)}(hjh]hget the mixer's SDL version}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h6:sg:`get_sdl_mixer_version() -> (major, minor, patch)`h]h)}(hjh]h0get_sdl_mixer_version() -> (major, minor, patch)}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(hA:sg:`get_sdl_mixer_version(linked=True) -> (major, minor, patch)`h]h)}(hjh]h;get_sdl_mixer_version(linked=True) -> (major, minor, patch)}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hj=sbah}(h]h]h]h]h!]uh%j;hj8h'h]h)Kubh field_body)}(hhh]h)}(h{linked (bool) -- if True (default) the linked version number is returned, otherwise the compiled version number is returnedh](hliteral_strong)}(hlinkedh]hlinked}hjVsbah}(h]h]h]h]h!]uh%jThjPubh (}hjPsbh6)}(hhh]hliteral_emphasis)}(hboolh]hbool}hjmsbah}(h]h]h]h]h!]uh%jkhjhubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej' reftargetjo refspecific py:modulehŌpy:classNuh%h5hjPubh)}hjPsbh -- }hjPsbhif }(hjPh&hh'Nh)Nubh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjPh&hh'Nh)Nubhc (default) the linked version number is returned, otherwise the compiled version number is returned}(hjPh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%jKhj8ubeh}(h]h]h]h]h!]uh%j6hj3ubj7)}(hhh](j<)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%j;hjh'h]h)KubjL)}(hhh]h)}(hthe mixer's SDL library version number (linked or compiled depending on the linked parameter) as a tuple of 3 integers (major, minor, patch)h](hLthe mixer's SDL library version number (linked or compiled depending on the }(hjh&hh'Nh)Nubh;)}(h ``linked``h]hlinked}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh% parameter) as a tuple of 3 integers }(hjh&hh'Nh)Nubh;)}(h``(major, minor, patch)``h]h(major, minor, patch)}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jKhjubeh}(h]h]h]h]h!]uh%j6hj3ubj7)}(hhh](j<)}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%j;hjh'h]h)KubjL)}(hhh]h)}(htupleh]h6)}(hhh]htuple}hjsbah}(h]h]h]h]h!] refdomainj refexplicitreftypej' reftargettuplejjhjNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jKhjubeh}(h]h]h]h]h!]uh%j6hj3ubeh}(h]h]h]h]h!]uh%j1hjh&hh'Nh)Nubh note)}(h:The linked and compile version numbers should be the same.h]h)}(hjMh]h:The linked and compile version numbers should be the same.}hjOsbah}(h]h]h]h]h!]uh%hh'h]h)MhjKubah}(h]h]h]h]h!]uh%jIh'h]h)Mhjh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjjsbah}(h]h](jjTeh]h]h!]uh%hhjfubah}(h]h]h]h]h!] translatableuh%hhjbh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj 2.0.0uh%jh&hh'h]h)Mhjubh )}(h(## pygame.mixer.get_sdl_mixer_version ##h]h(## pygame.mixer.get_sdl_mixer_version ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jSound (class in pygame.mixer)pygame.mixer.SoundhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hSoundh](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hSound}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+juh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h<:sl:`Create a new Sound object from a file or buffer object`h]h)}(hjh]h6Create a new Sound object from a file or buffer object}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h:sg:`Sound(filename) -> Sound`h]h)}(hjh]hSound(filename) -> Sound}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h#:sg:`Sound(file=filename) -> Sound`h]h)}(hjh]hSound(file=filename) -> Sound}hjsbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h':sg:`Sound(file=pathlib_path) -> Sound`h]h)}(hj&h]h!Sound(file=pathlib_path) -> Sound}hj(sbah}(h]h]jZah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h:sg:`Sound(buffer) -> Sound`h]h)}(hj=h]hSound(buffer) -> Sound}hj?sbah}(h]h]jZah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h#:sg:`Sound(buffer=buffer) -> Sound`h]h)}(hjTh]hSound(buffer=buffer) -> Sound}hjVsbah}(h]h]jZah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`Sound(object) -> Sound`h]h)}(hjkh]hSound(object) -> Sound}hjmsbah}(h]h]jZah]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h!:sg:`Sound(file=object) -> Sound`h]h)}(hjh]hSound(file=object) -> Sound}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h":sg:`Sound(array=object) -> Sound`h]h)}(hjh]hSound(array=object) -> Sound}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M ubh)}(hXLoad a new sound buffer from a filename, a python file object or a readable buffer object. Limited resampling will be performed to help the sample match the initialize arguments for the mixer. A Unicode string can only be a file pathname. A bytes object can be either a pathname or a buffer object. Use the 'file' or 'buffer' keywords to avoid ambiguity; otherwise Sound may guess wrong. If the array keyword is used, the object is expected to export a new buffer interface (The object is checked for a buffer interface first.)h]hXLoad a new sound buffer from a filename, a python file object or a readable buffer object. Limited resampling will be performed to help the sample match the initialize arguments for the mixer. A Unicode string can only be a file pathname. A bytes object can be either a pathname or a buffer object. Use the 'file' or 'buffer' keywords to avoid ambiguity; otherwise Sound may guess wrong. If the array keyword is used, the object is expected to export a new buffer interface (The object is checked for a buffer interface first.)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThe Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback. A Sound object also exports a new buffer interface.h]hThe Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback. A Sound object also exports a new buffer interface.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hSThe Sound can be loaded from an ``OGG`` audio file or from an uncompressed ``WAV``.h](h The Sound can be loaded from an }hjsbh;)}(h``OGG``h]hOGG}hjsbah}(h]h]h]h]h!]uh%h:hjubh$ audio file or from an uncompressed }hjsbh;)}(h``WAV``h]hWAV}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh)}(hcNote: The buffer will be copied internally, no data will be shared between it and the Sound object.h]hcNote: The buffer will be copied internally, no data will be shared between it and the Sound object.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M#hjh&hubh)}(hXSFor now buffer and array support is consistent with ``sndarray.make_sound`` for NumPy arrays, in that sample sign and byte order are ignored. This will change, either by correctly handling sign and byte order, or by raising an exception when different. Also, source samples are truncated to fit the audio sample size. This will not change.h](h4For now buffer and array support is consistent with }hjsbh;)}(h``sndarray.make_sound``h]hsndarray.make_sound}hjsbah}(h]h]h]h]h!]uh%h:hjubhX for NumPy arrays, in that sample sign and byte order are ignored. This will change, either by correctly handling sign and byte order, or by raising an exception when different. Also, source samples are truncated to fit the audio sample size. This will not change.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M&hjh&hubj)}(h-New in pygame 1.8: pygame.mixer.Sound(buffer)h]h)}(h-New in pygame 1.8: pygame.mixer.Sound(buffer)h](h)}(hNew in pygame 1.8: h]hNew in pygame 1.8: }hj8sbah}(h]h](jjTeh]h]h!]uh%hhj4h&hh'h]h)M,ubh;)}(h``pygame.mixer.Sound(buffer)``h]hpygame.mixer.Sound(buffer)}hjFsbah}(h]h]h]h]h!]uh%h:hj4h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj0h&hh'h]h)M,ubah}(h]h]h]h]h!]j versionaddedj 1.8uh%jh&hh'h]h)M,hjubj)}(hUNew in pygame 1.9.2: pygame.mixer.Sound keyword arguments and array interface supporth]h)}(hUNew in pygame 1.9.2: pygame.mixer.Sound keyword arguments and array interface supporth](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hjksbah}(h]h](jjTeh]h]h!]uh%hhjgh&hh'h]h)M.ubh6)}(h:class:`pygame.mixer.Sound`h]h;)}(hj{h]hpygame.mixer.Sound}hj}sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjyubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZjh[pygame.mixer.Sounduh%h5h'h]h)M.hjgh&hubh. keyword arguments and array interface support}(hjgh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjch&hh'h]h)M.ubah}(h]h]h]h]h!]j versionaddedj 1.9.2uh%jh&hh'h]h)M-hjubj)}(h6New in pygame 2.0.1: pathlib.Path support on Python 3.h]h)}(h6New in pygame 2.0.1: pathlib.Path support on Python 3.h](h)}(hNew in pygame 2.0.1: h]hNew in pygame 2.0.1: }hjsbah}(h]h](jjTeh]h]h!]uh%hhjh&hh'h]h)M0ubh!pathlib.Path support on Python 3.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M0ubah}(h]h]h]h]h!]j versionaddedj 2.0.1uh%jh&hh'h]h)M/hjubhe)}(hhh]h}(h]h]h]h]h!]entries](j"play() (pygame.mixer.Sound method)pygame.mixer.Sound.playhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hplayh](j)}(hjh]hplay}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)M1ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M1ubeh}(h]jah](j!j"eh]h]h!]j&hj'jj( Sound.playj)hŌSoundplayj+ Sound.play()uh%jh'h]h)M1hjh&hubj.)}(hhh](hv)}(hhh](hz)}(h:sl:`begin sound playback`h]h)}(hjh]hbegin sound playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M3ubhz)}(h4:sg:`play(loops=0, maxtime=0, fade_ms=0) -> Channel`h]h)}(hj+h]h.play(loops=0, maxtime=0, fade_ms=0) -> Channel}hj-sbah}(h]h]jZah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M4ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M3ubh)}(hBegin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary.h]hBegin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary.}hjFsbah}(h]h]h]h]h!]uh%hh'h]h)M6hj h&hubh)}(hXThe loops argument controls how many times the sample will be repeated after being played the first time. A value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call ``stop()`` to stop it).h](hXThe loops argument controls how many times the sample will be repeated after being played the first time. A value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call }hjTsbh;)}(h ``stop()``h]hstop()}hj\sbah}(h]h]h]h]h!]uh%h:hjTubh to stop it).}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)M:hj h&hubh)}(hWThe maxtime argument can be used to stop playback after a given number of milliseconds.h]hWThe maxtime argument can be used to stop playback after a given number of milliseconds.}hjtsbah}(h]h]h]h]h!]uh%hh'h]h)MAhj h&hubh)}(hThe fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete.h]hThe fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MDhj h&hubh)}(hBThis returns the Channel object for the channel that was selected.h]hBThis returns the Channel object for the channel that was selected.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MHhj h&hubh )}(h## Sound.play ##h]h## Sound.play ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)MJubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"stop() (pygame.mixer.Sound method)pygame.mixer.Sound.stophNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hstoph](j)}(hjh]hstop}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)MLubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MLubeh}(h]jah](j!j"eh]h]h!]j&hj'jj( Sound.stopj)hŌSoundstopj+ Sound.stop()uh%jh'h]h)MLhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h:sl:`stop sound playback`h]h)}(hjh]hstop sound playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MNubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MOubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MNubh)}(hAThis will stop the playback of this Sound on any active Channels.h]hAThis will stop the playback of this Sound on any active Channels.}hj+sbah}(h]h]h]h]h!]uh%hh'h]h)MQhjh&hubh )}(h## Sound.stop ##h]h## Sound.stop ##}hj9sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MSubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjPjjQjjQjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%fadeout() (pygame.mixer.Sound method)pygame.mixer.Sound.fadeouthNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hfadeouth](j)}(hjhh]hfadeout}hjjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjfh&hh'h]h)MUubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjfh&hh'h]h)MUubeh}(h]jaah](j!j"eh]h]h!]j&hj'jj( Sound.fadeoutj)hŌSoundfadeoutj+Sound.fadeout()uh%jh'h]h)MUhjch&hubj.)}(hhh](hv)}(hhh](hz)}(h*:sl:`stop sound playback after fading out`h]h)}(hjh]h$stop sound playback after fading out}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MWubhz)}(h:sg:`fadeout(time) -> None`h]h)}(hjh]hfadeout(time) -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MXubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MWubh)}(hThis will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels.h]hThis will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MZhjh&hubh )}(h## Sound.fadeout ##h]h## Sound.fadeout ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M^ubeh}(h]h]h]h]h!]uh%j-hjch&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(set_volume() (pygame.mixer.Sound method)pygame.mixer.Sound.set_volumehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h set_volumeh](j)}(hjh]h set_volume}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)M`ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M`ubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Sound.set_volumej)hŌSound set_volumej+Sound.set_volume()uh%jh'h]h)M`hjh&hubj.)}(hhh](hv)}(hhh](hz)}(h,:sl:`set the playback volume for this Sound`h]h)}(hj/h]h&set the playback volume for this Sound}hj1sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mbubhz)}(h:sg:`set_volume(value) -> None`h]h)}(hjFh]hset_volume(value) -> None}hjHsbah}(h]h]jZah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%huhj'h&hh'h]h)Mbubh)}(hThis will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound.h]hThis will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound.}hjasbah}(h]h]h]h]h!]uh%hh'h]h)Mehj'h&hubj2)}(hhh]j7)}(hhh](j<)}(h Parametersh]h Parameters}hjusbah}(h]h]h]h]h!]uh%j;hjrh'h]h)KubjL)}(hhh]h)}(hvalue (float) -- volume in the range of 0.0 to 1.0 (inclusive)If value < 0.0, the volume will not be changed If value > 1.0, the volume will be set to 1.0h](jU)}(hvalueh]hvalue}hjsbah}(h]h]h]h]h!]uh%jThjubh (}hjsbh6)}(hhh]jl)}(hfloath]hfloat}hjsbah}(h]h]h]h]h!]uh%jkhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej' reftargetjjjhjjuh%h5hjubh)}hjsbh -- }hjsbh)}(h-volume in the range of 0.0 to 1.0 (inclusive)h]h-volume in the range of 0.0 to 1.0 (inclusive)}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mihjh&hubhv)}(hhh](hz)}(h.If value < 0.0, the volume will not be changedh]h.If value < 0.0, the volume will not be changed}hjsbah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h-If value > 1.0, the volume will be set to 1.0h]h-If value > 1.0, the volume will be set to 1.0}hjsbah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jKhjrubeh}(h]h]h]h]h!]uh%j6hjoubah}(h]h]h]h]h!]uh%j1hj'h&hh'Nh)Nubh )}(h## Sound.set_volume ##h]h## Sound.set_volume ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj'h&hh'h]h)Mnubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](jmethodeh]h]h!]jjjj"jj"jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_volume() (pygame.mixer.Sound method)pygame.mixer.Sound.get_volumehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_volumeh](j)}(hj9h]h get_volume}hj;sbah}(h]h](j jeh]h]h!]h#h$uh%jhj7h&hh'h]h)Mpubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj7h&hh'h]h)Mpubeh}(h]j2ah](j!j"eh]h]h!]j&hj'jj(Sound.get_volumej)hŌSound get_volumej+Sound.get_volume()uh%jh'h]h)Mphj4h&hubj.)}(hhh](hv)}(hhh](hz)}(h:sl:`get the playback volume`h]h)}(hjeh]hget the playback volume}hjgsbah}(h]h]hah]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%h)hKhj`h&hh'h]h)Mrubhz)}(h:sg:`get_volume() -> value`h]h)}(hj|h]hget_volume() -> value}hj~sbah}(h]h]jZah]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%h)hKhj`h&hh'h]h)Msubeh}(h]h]h]h]h!]uh%huhj]h&hh'h]h)Mrubh)}(hFReturn a value from 0.0 to 1.0 representing the volume for this Sound.h]hFReturn a value from 0.0 to 1.0 representing the volume for this Sound.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Muhj]h&hubh )}(h## Sound.get_volume ##h]h## Sound.get_volume ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj]h&hh'h]h)Mwubeh}(h]h]h]h]h!]uh%j-hj4h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_num_channels() (pygame.mixer.Sound method)#pygame.mixer.Sound.get_num_channelshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_num_channelsh](j)}(hjh]hget_num_channels}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Myubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Myubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Sound.get_num_channelsj)hŌSoundget_num_channelsj+Sound.get_num_channels()uh%jh'h]h)Myhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h0:sl:`count how many times this Sound is playing`h]h)}(hjh]h*count how many times this Sound is playing}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M{ubhz)}(h!:sg:`get_num_channels() -> count`h]h)}(hjh]hget_num_channels() -> count}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M|ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M{ubh)}(h>Return the number of active channels this sound is playing on.h]h>Return the number of active channels this sound is playing on.}hj2sbah}(h]h]h]h]h!]uh%hh'h]h)M~hjh&hubh )}(h## Sound.get_num_channels ##h]h## Sound.get_num_channels ##}hj@sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjWjjXjjXjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_length() (pygame.mixer.Sound method)pygame.mixer.Sound.get_lengthhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_lengthh](j)}(hjoh]h get_length}hjqsbah}(h]h](j jeh]h]h!]h#h$uh%jhjmh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjmh&hh'h]h)Mubeh}(h]jhah](j!j"eh]h]h!]j&hj'jj(Sound.get_lengthj)hŌSound get_lengthj+Sound.get_length()uh%jh'h]h)Mhjjh&hubj.)}(hhh](hv)}(hhh](hz)}(h!:sl:`get the length of the Sound`h]h)}(hjh]hget the length of the Sound}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_length() -> seconds`h]h)}(hjh]hget_length() -> seconds}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h+Return the length of this Sound in seconds.h]h+Return the length of this Sound in seconds.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Sound.get_length ##h]h## Sound.get_length ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%get_raw() (pygame.mixer.Sound method)pygame.mixer.Sound.get_rawhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_rawh](j)}(hj h]hget_raw}hj sbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'jj( Sound.get_rawj)hŌSoundget_rawj+Sound.get_raw()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h4:sl:`return a bytestring copy of the Sound samples.`h]h)}(hj6h]h.return a bytestring copy of the Sound samples.}hj8sbah}(h]h]hah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubhz)}(h:sg:`get_raw() -> bytes`h]h)}(hjMh]hget_raw() -> bytes}hjOsbah}(h]h]jZah]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj.h&hh'h]h)Mubh)}(h4Return a copy of the Sound object buffer as a bytes.h]h4Return a copy of the Sound object buffer as a bytes.}hjhsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj.h&hubj)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj~sbah}(h]h](jjTeh]h]h!]uh%hhjzubah}(h]h]h]h]h!] translatableuh%hhjvh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj 1.9.2uh%jh&hh'h]h)Mhj.ubh )}(h## Sound.get_raw ##h]h## Sound.get_raw ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj.h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubh )}(h## pygame.mixer.Sound ##h]h## pygame.mixer.Sound ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jChannel (class in pygame.mixer)pygame.mixer.ChannelhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hChannelh](j)}(h pygame.mixer.h]h pygame.mixer.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hChannel}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'hj(jj)hjj+juh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h6:sl:`Create a Channel object for controlling playback`h]h)}(hjh]h0Create a Channel object for controlling playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`Channel(id) -> Channel`h]h)}(hj)h]hChannel(id) -> Channel}hj+sbah}(h]h]jZah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hReturn a Channel object for one of the current channels. The id must be a value from 0 to the value of ``pygame.mixer.get_num_channels()``.h](hgReturn a Channel object for one of the current channels. The id must be a value from 0 to the value of }hjDsbh;)}(h#``pygame.mixer.get_num_channels()``h]hpygame.mixer.get_num_channels()}hjLsbah}(h]h]h]h]h!]uh%h:hjDubh.}hjDsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(hThe Channel object can be used to get fine control over the playback of Sounds. A channel can only playback a single Sound at time. Using channels is entirely optional since pygame can manage them by default.h]hThe Channel object can be used to get fine control over the playback of Sounds. A channel can only playback a single Sound at time. Using channels is entirely optional since pygame can manage them by default.}hjdsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j$play() (pygame.mixer.Channel method)pygame.mixer.Channel.playhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hplayh](j)}(hjh]hplay}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]j~ah](j!j"eh]h]h!]j&hj'jj( Channel.playj)hŌChannelplayj+Channel.play()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h(:sl:`play a Sound on a specific Channel`h]h)}(hjh]h"play a Sound on a specific Channel}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h8:sg:`play(Sound, loops=0, maxtime=0, fade_ms=0) -> None`h]h)}(hjh]h2play(Sound, loops=0, maxtime=0, fade_ms=0) -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hThis will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped.h]hThis will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hXThe loops argument has the same meaning as in ``Sound.play()``: it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely.h](h.The loops argument has the same meaning as in }hjsbh;)}(h``Sound.play()``h]h Sound.play()}hjsbah}(h]h]h]h]h!]uh%h:hjubh: it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(h|As in ``Sound.play()``, the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds.h](hAs in }hjsbh;)}(h``Sound.play()``h]h Sound.play()}hjsbah}(h]h]h]h]h!]uh%h:hjubhf, the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hKAs in ``Sound.play()``, the fade_ms argument can be used fade in the sound.h](hAs in }hj1sbh;)}(h``Sound.play()``h]h Sound.play()}hj9sbah}(h]h]h]h]h!]uh%h:hj1ubh5, the fade_ms argument can be used fade in the sound.}hj1sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Channel.play ##h]h## Channel.play ##}hjQsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjhjjijjijjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$stop() (pygame.mixer.Channel method)pygame.mixer.Channel.stophNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hstoph](j)}(hjh]hstop}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhj~h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj~h&hh'h]h)Mubeh}(h]jyah](j!j"eh]h]h!]j&hj'jj( Channel.stopj)hŌChannelstopj+Channel.stop()uh%jh'h]h)Mhj{h&hubj.)}(hhh](hv)}(hhh](hz)}(h :sl:`stop playback on a Channel`h]h)}(hjh]hstop playback on a Channel}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hwStop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it.h]hwStop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Channel.stop ##h]h## Channel.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hj{h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%pause() (pygame.mixer.Channel method)pygame.mixer.Channel.pausehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hpauseh](j)}(hjh]hpause}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'jj( Channel.pausej)hŌChannelpausej+Channel.pause()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h,:sl:`temporarily stop playback of a channel`h]h)}(hjGh]h&temporarily stop playback of a channel}hjIsbah}(h]h]hah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Mubhz)}(h:sg:`pause() -> None`h]h)}(hj^h]hpause() -> None}hj`sbah}(h]h]jZah]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj?h&hh'h]h)Mubh)}(hqTemporarily stop the playback of sound on a channel. It can be resumed at a later time with ``Channel.unpause()``h](h\Temporarily stop the playback of sound on a channel. It can be resumed at a later time with }hjysbh;)}(h``Channel.unpause()``h]hChannel.unpause()}hjsbah}(h]h]h]h]h!]uh%h:hjyubeh}(h]h]h]h]h!]uh%hh'h]h)Mhj?h&hubh )}(h## Channel.pause ##h]h## Channel.pause ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj?h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'unpause() (pygame.mixer.Channel method)pygame.mixer.Channel.unpausehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hunpauseh](j)}(hjh]hunpause}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Channel.unpausej)hŌChannelunpausej+Channel.unpause()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h(:sl:`resume pause playback of a channel`h]h)}(hjh]h"resume pause playback of a channel}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`unpause() -> None`h]h)}(hjh]hunpause() -> None}hj sbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h(Resume the playback on a paused channel.h]h(Resume the playback on a paused channel.}hj"sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Channel.unpause ##h]h## Channel.unpause ##}hj0sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjGjjHjjHjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'fadeout() (pygame.mixer.Channel method)pygame.mixer.Channel.fadeouthNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hfadeouth](j)}(hj_h]hfadeout}hjasbah}(h]h](j jeh]h]h!]h#h$uh%jhj]h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj]h&hh'h]h)Mubeh}(h]jXah](j!j"eh]h]h!]j&hj'jj(Channel.fadeoutj)hŌChannelfadeoutj+Channel.fadeout()uh%jh'h]h)MhjZh&hubj.)}(hhh](hv)}(hhh](hz)}(h,:sl:`stop playback after fading channel out`h]h)}(hjh]h&stop playback after fading channel out}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`fadeout(time) -> None`h]h)}(hjh]hfadeout(time) -> None}hjsbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hcStop playback of a channel after fading out the sound over the given time argument in milliseconds.h]hcStop playback of a channel after fading out the sound over the given time argument in milliseconds.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Channel.fadeout ##h]h## Channel.fadeout ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjZh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*set_volume() (pygame.mixer.Channel method)pygame.mixer.Channel.set_volumehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h set_volumeh](j)}(hjh]h set_volume}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Channel.set_volumej)hŌChannel set_volumej+Channel.set_volume()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h):sl:`set the volume of a playing channel`h]h)}(hj&h]h#set the volume of a playing channel}hj(sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h:sg:`set_volume(value) -> None`h]h)}(hj=h]hset_volume(value) -> None}hj?sbah}(h]h]jZah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h%:sg:`set_volume(left, right) -> None`h]h)}(hjTh]hset_volume(left, right) -> None}hjVsbah}(h]h]jZah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hSet the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0.h]hSet the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0.}hjosbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hXOIf one argument is passed, it will be the volume of both speakers. If two arguments are passed and the mixer is in stereo mode, the first argument will be the volume of the left speaker and the second will be the volume of the right speaker. (If the second argument is ``None``, the first argument will be the volume of both speakers.)h](hX If one argument is passed, it will be the volume of both speakers. If two arguments are passed and the mixer is in stereo mode, the first argument will be the volume of the left speaker and the second will be the volume of the right speaker. (If the second argument is }hj}sbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hj}ubh:, the first argument will be the volume of both speakers.)}hj}sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hIf the channel is playing a Sound on which ``set_volume()`` has also been called, both calls are taken into account. For example:h](h+If the channel is playing a Sound on which }hjsbh;)}(h``set_volume()``h]h set_volume()}hjsbah}(h]h]h]h]h!]uh%h:hjubhF has also been called, both calls are taken into account. For example:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh literal_block)}(hXsound = pygame.mixer.Sound("s.wav") channel = s.play() # Sound plays at full volume by default sound.set_volume(0.9) # Now plays at 90% of full volume. sound.set_volume(0.6) # Now plays at 60% (previous value replaced). channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5).h]hXsound = pygame.mixer.Sound("s.wav") channel = s.play() # Sound plays at full volume by default sound.set_volume(0.9) # Now plays at 90% of full volume. sound.set_volume(0.6) # Now plays at 60% (previous value replaced). channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5).}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhjh&hubh )}(h## Channel.set_volume ##h]h## Channel.set_volume ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*get_volume() (pygame.mixer.Channel method)pygame.mixer.Channel.get_volumehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_volumeh](j)}(hjh]h get_volume}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Channel.get_volumej)hŌChannel get_volumej+Channel.get_volume()uh%jh'h]h)Mhjh&hubj.)}(hhh](hv)}(hhh](hz)}(h+:sl:`get the volume of the playing channel`h]h)}(hj(h]h%get the volume of the playing channel}hj*sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubhz)}(h:sg:`get_volume() -> value`h]h)}(hj?h]hget_volume() -> value}hjAsbah}(h]h]jZah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hReturn the volume of the channel for the current playing sound. This does not take into account stereo separation used by :meth:`Channel.set_volume`. The Sound object also has its own volume which is mixed with the channel.h](hzReturn the volume of the channel for the current playing sound. This does not take into account stereo separation used by }hjZsbh6)}(h:meth:`Channel.set_volume`h]h;)}(hjdh]hChannel.set_volume()}hjfsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjbubah}(h]h]h]h]h!]refdochS refdomainjpreftypemeth refexplicitrefwarnhYhhZjh[Channel.set_volumeuh%h5h'h]h)MhjZubhK. The Sound object also has its own volume which is mixed with the channel.}hjZsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h## Channel.get_volume ##h]h## Channel.get_volume ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(get_busy() (pygame.mixer.Channel method)pygame.mixer.Channel.get_busyhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hget_busyh](j)}(hjh]hget_busy}hjsbah}(h]h](j jeh]h]h!]h#h$uh%jhjh&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M ubeh}(h]jah](j!j"eh]h]h!]j&hj'jj(Channel.get_busyj)hŌChannelget_busyj+Channel.get_busy()uh%jh'h]h)M hjh&hubj.)}(hhh](hv)}(hhh](hz)}(h$:sl:`check if the channel is active`h]h)}(hjh]hcheck if the channel is active}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h:sg:`get_busy() -> bool`h]h)}(hjh]hget_busy() -> bool}hj sbah}(h]h]jZah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M ubh)}(hhReturns ``True`` if the channel is actively mixing sound. If the channel is idle this returns ``False``.h](hReturns }hj sbh;)}(h``True``h]hTrue}hj! sbah}(h]h]h]h]h!]uh%h:hj ubhN if the channel is actively mixing sound. If the channel is idle this returns }hj sbh;)}(h ``False``h]hFalse}hj3 sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## Channel.get_busy ##h]h## Channel.get_busy ##}hjK sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjb jjc jjc jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)get_sound() (pygame.mixer.Channel method)pygame.mixer.Channel.get_soundhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_soundh](j)}(hjz h]h get_sound}hj| sbah}(h]h](j jeh]h]h!]h#h$uh%jhjx h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjx h&hh'h]h)Mubeh}(h]js ah](j!j"eh]h]h!]j&hj'jj(Channel.get_soundj)hŌChannel get_soundj+Channel.get_sound()uh%jh'h]h)Mhju h&hubj.)}(hhh](hv)}(hhh](hz)}(h%:sl:`get the currently playing Sound`h]h)}(hj h]hget the currently playing Sound}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`get_sound() -> Sound`h]h)}(hj h]hget_sound() -> Sound}hj sbah}(h]h]jZah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hnReturn the actual Sound object currently playing on this channel. If the channel is idle ``None`` is returned.h](hYReturn the actual Sound object currently playing on this channel. If the channel is idle }hj sbh;)}(h``None``h]hNone}hj sbah}(h]h]h]h]h!]uh%h:hj ubh is returned.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h## Channel.get_sound ##h]h## Channel.get_sound ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j-hju h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj!jj!jj!jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%queue() (pygame.mixer.Channel method)pygame.mixer.Channel.queuehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(hqueueh](j)}(hj'!h]hqueue}hj)!sbah}(h]h](j jeh]h]h!]h#h$uh%jhj%!h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj%!h&hh'h]h)Mubeh}(h]j !ah](j!j"eh]h]h!]j&hj'jj( Channel.queuej)hŌChannelqueuej+Channel.queue()uh%jh'h]h)Mhj"!h&hubj.)}(hhh](hv)}(hhh](hz)}(h0:sl:`queue a Sound object to follow the current`h]h)}(hjS!h]h*queue a Sound object to follow the current}hjU!sbah}(h]h]hah]h]h!]uh%hhjQ!ubah}(h]h]h]h]h!]uh%h)hKhjN!h&hh'h]h)Mubhz)}(h:sg:`queue(Sound) -> None`h]h)}(hjj!h]hqueue(Sound) -> None}hjl!sbah}(h]h]jZah]h]h!]uh%hhjh!ubah}(h]h]h]h]h!]uh%h)hKhjN!h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjK!h&hh'h]h)Mubh)}(hXDWhen a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automatically. It is cleared on any other call to ``Channel.stop()`` or ``Channel.play()``.h](hXWhen a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automatically. It is cleared on any other call to }hj!sbh;)}(h``Channel.stop()``h]hChannel.stop()}hj!sbah}(h]h]h]h]h!]uh%h:hj!ubh or }hj!sbh;)}(h``Channel.play()``h]hChannel.play()}hj!sbah}(h]h]h]h]h!]uh%h:hj!ubh.}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)M"hjK!h&hubh)}(hcIf there is no sound actively playing on the Channel then the Sound will begin playing immediately.h]hcIf there is no sound actively playing on the Channel then the Sound will begin playing immediately.}hj!sbah}(h]h]h]h]h!]uh%hh'h]h)M(hjK!h&hubh )}(h## Channel.queue ##h]h## Channel.queue ##}hj!sbah}(h]h]h]h]h!]h#h$uh%h hjK!h&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%j-hj"!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj!jj!jj!jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)get_queue() (pygame.mixer.Channel method)pygame.mixer.Channel.get_queuehNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_queueh](j)}(hj!h]h get_queue}hj!sbah}(h]h](j jeh]h]h!]h#h$uh%jhj!h&hh'h]h)M-ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj!h&hh'h]h)M-ubeh}(h]j!ah](j!j"eh]h]h!]j&hj'jj(Channel.get_queuej)hŌChannel get_queuej+Channel.get_queue()uh%jh'h]h)M-hj!h&hubj.)}(hhh](hv)}(hhh](hz)}(h%:sl:`return any Sound that is queued`h]h)}(hj "h]hreturn any Sound that is queued}hj""sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M/ubhz)}(h:sg:`get_queue() -> Sound`h]h)}(hj7"h]hget_queue() -> Sound}hj9"sbah}(h]h]jZah]h]h!]uh%hhj5"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)M/ubh)}(hIf a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue.h]hIf a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue.}hjR"sbah}(h]h]h]h]h!]uh%hh'h]h)M2hj"h&hubh )}(h## Channel.get_queue ##h]h## Channel.get_queue ##}hj`"sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)M5ubeh}(h]h]h]h]h!]uh%j-hj!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjw"jjx"jjx"jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,set_endevent() (pygame.mixer.Channel method)!pygame.mixer.Channel.set_endeventhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h set_endeventh](j)}(hj"h]h set_endevent}hj"sbah}(h]h](j jeh]h]h!]h#h$uh%jhj"h&hh'h]h)M7ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj"h&hh'h]h)M7ubeh}(h]j"ah](j!j"eh]h]h!]j&hj'jj(Channel.set_endeventj)hŌChannel set_endeventj+Channel.set_endevent()uh%jh'h]h)M7hj"h&hubj.)}(hhh](hv)}(hhh](hz)}(h8:sl:`have the channel send an event when playback stops`h]h)}(hj"h]h2have the channel send an event when playback stops}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M9ubhz)}(h:sg:`set_endevent() -> None`h]h)}(hj"h]hset_endevent() -> None}hj"sbah}(h]h]jZah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M:ubhz)}(h :sg:`set_endevent(type) -> None`h]h)}(hj"h]hset_endevent(type) -> None}hj"sbah}(h]h]jZah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M;ubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)M9ubh)}(hWhen an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use ``pygame.event.get()`` to retrieve the endevent once it's sent.h](hWhen an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use }hj#sbh;)}(h``pygame.event.get()``h]hpygame.event.get()}hj #sbah}(h]h]h]h]h!]uh%h:hj#ubh) to retrieve the endevent once it's sent.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)M=hj"h&hubh)}(hNote that if you called ``Sound.play(n)`` or ``Channel.play(sound,n)``, the end event is sent only once: after the sound has been played "n+1" times (see the documentation of Sound.play).h](hNote that if you called }hj$#sbh;)}(h``Sound.play(n)``h]h Sound.play(n)}hj,#sbah}(h]h]h]h]h!]uh%h:hj$#ubh or }hj$#sbh;)}(h``Channel.play(sound,n)``h]hChannel.play(sound,n)}hj>#sbah}(h]h]h]h]h!]uh%h:hj$#ubhu, the end event is sent only once: after the sound has been played "n+1" times (see the documentation of Sound.play).}hj$#sbeh}(h]h]h]h]h!]uh%hh'h]h)MBhj"h&hubh)}(h~If ``Channel.stop()`` or ``Channel.play()`` is called while the sound was still playing, the event will be posted immediately.h](hIf }hjV#sbh;)}(h``Channel.stop()``h]hChannel.stop()}hj^#sbah}(h]h]h]h]h!]uh%h:hjV#ubh or }hjV#sbh;)}(h``Channel.play()``h]hChannel.play()}hjp#sbah}(h]h]h]h]h!]uh%h:hjV#ubhS is called while the sound was still playing, the event will be posted immediately.}hjV#sbeh}(h]h]h]h]h!]uh%hh'h]h)MFhj"h&hubh)}(hXThe type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between ``pygame.locals.USEREVENT`` and ``pygame.locals.NUMEVENTS``. If no type argument is given then the Channel will stop sending endevents.h](hThe type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between }hj#sbh;)}(h``pygame.locals.USEREVENT``h]hpygame.locals.USEREVENT}hj#sbah}(h]h]h]h]h!]uh%h:hj#ubh and }hj#sbh;)}(h``pygame.locals.NUMEVENTS``h]hpygame.locals.NUMEVENTS}hj#sbah}(h]h]h]h]h!]uh%h:hj#ubhL. If no type argument is given then the Channel will stop sending endevents.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)MIhj"h&hubh )}(h## Channel.set_endevent ##h]h## Channel.set_endevent ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)MNubeh}(h]h]h]h]h!]uh%j-hj"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj#jj#jj#jjjjjjjuh%jh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_endevent() (pygame.mixer.Channel method)!pygame.mixer.Channel.get_endeventhNtauh%hdhj h&hh'Nh)Nubj)}(hhh](j)}(h get_endeventh](j)}(hj#h]h get_endevent}hj#sbah}(h]h](j jeh]h]h!]h#h$uh%jhj#h&hh'h]h)MPubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)MPubeh}(h]j#ah](j!j"eh]h]h!]j&hj'jj(Channel.get_endeventj)hŌChannel get_endeventj+Channel.get_endevent()uh%jh'h]h)MPhj#h&hubj.)}(hhh](hv)}(hhh](hz)}(h7:sl:`get the event a channel sends when playback stops`h]h)}(hj$h]h1get the event a channel sends when playback stops}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)MRubhz)}(h:sg:`get_endevent() -> type`h]h)}(hj,$h]hget_endevent() -> type}hj.$sbah}(h]h]jZah]h]h!]uh%hhj*$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)MSubeh}(h]h]h]h]h!]uh%huhj $h&hh'h]h)MRubh)}(hReturns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns ``pygame.NOEVENT``.h](hReturns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns }hjG$sbh;)}(h``pygame.NOEVENT``h]hpygame.NOEVENT}hjO$sbah}(h]h]h]h]h!]uh%h:hjG$ubh.}hjG$sbeh}(h]h]h]h]h!]uh%hh'h]h)MUhj $h&hubh )}(h## Channel.get_endevent ##h]h## Channel.get_endevent ##}hjg$sbah}(h]h]h]h]h!]h#h$uh%h hj $h&hh'h]h)MYubeh}(h]h]h]h]h!]uh%j-hj#h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj~$jj$jj$jjjjjjjuh%jh&hhj h'Nh)Nubh )}(h## pygame.mixer.Channel ##h]h## pygame.mixer.Channel ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M[ubeh}(h]h]h]h]h!]uh%j-hjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jj$jj$jj$jjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.mixer ##h]h## pygame.mixer ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M]ubeh}(h](hs pygame-mixereh]h] pygame.mixerah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj$error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j$j$s nametypes}j$sh}(j$h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j%%h'h]h)Khh,h&hubjjjjjjjjjb jg j j j j jb jg j j j j jT jY jjjjjjjjjjjjjajfjjj2j7jjjhjmjjjjj~jjyj~jjjjjXj]jjjjjjjs jx j !j%!j!j!j"j"j#j#u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/mixer.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.0561407 pygame-2.6.1/docs/generated/doctrees/ref/mouse.doctree0000644000175100001770000012033714676242420022375 0ustar00runnerdockerԠsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.mouse`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.mouse}hh`_h](hQThere is proper functionality for mouse wheel behaviour with pygame 2 supporting }hj_sbh;)}(h``pygame.MOUSEWHEEL``h]hpygame.MOUSEWHEEL}hjgsbah}(h]h]h]h]h!]uh%h:hj_ubh events. The new events support horizontal and vertical scroll movements, with signed integer values representing the amount scrolled (}hj_sbh;)}(h``x``h]hx}hjysbah}(h]h]h]h]h!]uh%h:hj_ubh and }hj_sbh;)}(h``y``h]hy}hjsbah}(h]h]h]h]h!]uh%h:hj_ubh), as well as }hj_sbh;)}(h ``flipped``h]hflipped}hjsbah}(h]h]h]h]h!]uh%h:hj_ubh| direction (the set positive and negative values for each axis is flipped). Read more about SDL2 input-related changes here }hj_sbh reference)}(h1``_h]h,https://wiki.libsdl.org/MigrationGuide#input}(hjh,https://wiki.libsdl.org/MigrationGuide#inputubah}(h]h]h]h]h!]name,https://wiki.libsdl.org/MigrationGuide#inputrefurijuh%jhj_ubh target)}(h.h]h}(h]*https-wiki-libsdl-org-migrationguide-inputah]h],https://wiki.libsdl.org/migrationguide#inputah]h!]refurijuh%j referencedKhj_ubeh}(h]h]h]h]h!]uh%hh'h]h)K$hh,h&hubh)}(hXIn pygame 2, the mouse wheel functionality can be used by listening for the ``pygame.MOUSEWHEEL`` type of an event (Bear in mind they still emit ``pygame.MOUSEBUTTONDOWN`` events like in pygame 1.x, as well). When this event is triggered, a developer can access the appropriate ``Event`` object with ``pygame.event.get()``. The object can be used to access data about the mouse scroll, such as ``which`` (it will tell you what exact mouse device trigger the event).h](hLIn pygame 2, the mouse wheel functionality can be used by listening for the }hjsbh;)}(h``pygame.MOUSEWHEEL``h]hpygame.MOUSEWHEEL}hjsbah}(h]h]h]h]h!]uh%h:hjubh0 type of an event (Bear in mind they still emit }hjsbh;)}(h``pygame.MOUSEBUTTONDOWN``h]hpygame.MOUSEBUTTONDOWN}hjsbah}(h]h]h]h]h!]uh%h:hjubhk events like in pygame 1.x, as well). When this event is triggered, a developer can access the appropriate }hjsbh;)}(h ``Event``h]hEvent}hjsbah}(h]h]h]h]h!]uh%h:hjubh object with }hjsbh;)}(h``pygame.event.get()``h]hpygame.event.get()}hjsbah}(h]h]h]h]h!]uh%h:hjubhH. The object can be used to access data about the mouse scroll, such as }hjsbh;)}(h ``which``h]hwhich}hj)sbah}(h]h]h]h]h!]uh%h:hjubh> (it will tell you what exact mouse device trigger the event).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K+hh,h&hubh container)}(hhh](h caption)}(h3Code example of mouse scroll (tested on 2.0.0.dev7)h]h3Code example of mouse scroll (tested on 2.0.0.dev7)}hjHsbah}(h]h]h]h]h!]uh%jFh'h]h)K2hjCubh literal_block)}(hX# Taken from husano896's PR thread (slightly modified) import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() def main(): while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() return elif event.type == MOUSEWHEEL: print(event) print(event.x, event.y) print(event.flipped) print(event.which) # can access properties with # proper notation(ex: event.y) clock.tick(60) # Execute game: main()h]hX# Taken from husano896's PR thread (slightly modified) import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() def main(): while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() return elif event.type == MOUSEWHEEL: print(event) print(event.x, event.y) print(event.flipped) print(event.which) # can access properties with # proper notation(ex: event.y) clock.tick(60) # Execute game: main()}hjXsbah}(h]h]h]h]h!]h#h$forcelanguagepythonhighlight_args}uh%jVh'h]h)K2hjCubeh}(h]test-pyah]literal-block-wrapperah]test.pyah]h!] literal_blockuh%jAhh,h&hh'h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](single&get_pressed() (in module pygame.mouse)pygame.mouse.get_pressedhNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(h get_pressedh](h desc_addname)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KOubh desc_name)}(hjh]h get_pressed}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KOubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KOubeh}(h]jah](sig sig-objecteh]h]h!]module pygame.mouseclasshfullnamej _toc_partsjj _toc_name get_pressed()uh%jh'h]h)KOhjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h(:sl:`get the state of the mouse buttons`h]h)}(hjh]h"get the state of the mouse buttons}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KQubhz)}(h?:sg:`get_pressed(num_buttons=3) -> (button1, button2, button3)`h]h)}(hjh]h9get_pressed(num_buttons=3) -> (button1, button2, button3)}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KRubhz)}(hQ:sg:`get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)`h]h)}(hjh]hKget_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)}hj sbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KSubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KQubh)}(hReturns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently being pressed at the time of the call.h]hReturns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently being pressed at the time of the call.}hj#sbah}(h]h]h]h]h!]uh%hh'h]h)KUhjh&hubh)}(hNote, to get all of the mouse events it is better to use either ``pygame.event.wait()`` or ``pygame.event.get()`` and check all of those events to see if they are ``MOUSEBUTTONDOWN``, ``MOUSEBUTTONUP``, or ``MOUSEMOTION``.h](h@Note, to get all of the mouse events it is better to use either }hj1sbh;)}(h``pygame.event.wait()``h]hpygame.event.wait()}hj9sbah}(h]h]h]h]h!]uh%h:hj1ubh or }hj1sbh;)}(h``pygame.event.get()``h]hpygame.event.get()}hjKsbah}(h]h]h]h]h!]uh%h:hj1ubh2 and check all of those events to see if they are }hj1sbh;)}(h``MOUSEBUTTONDOWN``h]hMOUSEBUTTONDOWN}hj]sbah}(h]h]h]h]h!]uh%h:hj1ubh, }hj1sbh;)}(h``MOUSEBUTTONUP``h]h MOUSEBUTTONUP}hjosbah}(h]h]h]h]h!]uh%h:hj1ubh, or }hj1sbh;)}(h``MOUSEMOTION``h]h MOUSEMOTION}hjsbah}(h]h]h]h]h!]uh%h:hj1ubh.}hj1sbeh}(h]h]h]h]h!]uh%hh'h]h)KYhjh&hubh)}(hNote, that on ``X11`` some X servers use middle button emulation. When you click both buttons ``1`` and ``3`` at the same time a ``2`` button event can be emitted.h](hNote, that on }hjsbh;)}(h``X11``h]hX11}hjsbah}(h]h]h]h]h!]uh%h:hjubhI some X servers use middle button emulation. When you click both buttons }hjsbh;)}(h``1``h]h1}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``3``h]h3}hjsbah}(h]h]h]h]h!]uh%h:hjubh at the same time a }hjsbh;)}(h``2``h]h2}hjsbah}(h]h]h]h]h!]uh%h:hjubh button event can be emitted.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K^hjh&hubh)}(hkNote, remember to call ``pygame.event.get()`` before this function. Otherwise it will not work as expected.h](hNote, remember to call }hjsbh;)}(h``pygame.event.get()``h]hpygame.event.get()}hjsbah}(h]h]h]h]h!]uh%h:hjubh> before this function. Otherwise it will not work as expected.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kbhjh&hubh)}(hTo support five button mice, an optional parameter ``num_buttons`` has been added in pygame 2. When this is set to ``5``, ``button4`` and ``button5`` are added to the returned tuple. Only ``3`` and ``5`` are valid values for this parameter.h](h3To support five button mice, an optional parameter }hjsbh;)}(h``num_buttons``h]h num_buttons}hjsbah}(h]h]h]h]h!]uh%h:hjubh1 has been added in pygame 2. When this is set to }hjsbh;)}(h``5``h]h5}hj)sbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h ``button4``h]hbutton4}hj;sbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h ``button5``h]hbutton5}hjMsbah}(h]h]h]h]h!]uh%h:hjubh' are added to the returned tuple. Only }hjsbh;)}(h``3``h]h3}hj_sbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``5``h]h5}hjqsbah}(h]h]h]h]h!]uh%h:hjubh% are valid values for this parameter.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kehjh&hubhversionmodified)}(h3Changed in pygame 2.0.0: num_buttons argument addedh]h)}(h3Changed in pygame 2.0.0: num_buttons argument addedh](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)Kkubh;)}(h``num_buttons``h]h num_buttons}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument added}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kkubah}(h]h]h]h]h!]typeversionchangedversion2.0.0uh%jh&hh'h]h)Kjhjubh )}(h## pygame.mouse.get_pressed ##h]h## pygame.mouse.get_pressed ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Klubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"get_pos() (in module pygame.mouse)pygame.mouse.get_poshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_posh](j)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Knubj)}(hjh]hget_pos}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Knubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Knubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj get_pos()uh%jh'h]h)Knhjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`get the mouse cursor position`h]h)}(hj5h]hget the mouse cursor position}hj7sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)Kpubhz)}(h:sg:`get_pos() -> (x, y)`h]h)}(hjLh]hget_pos() -> (x, y)}hjNsbah}(h]h]jah]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)Kpubh)}(hReturns the ``x`` and ``y`` position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen.h](h Returns the }hjgsbh;)}(h``x``h]hx}hjosbah}(h]h]h]h]h!]uh%h:hjgubh and }hjgsbh;)}(h``y``h]hy}hjsbah}(h]h]h]h]h!]uh%h:hjgubh position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen.}hjgsbeh}(h]h]h]h]h!]uh%hh'h]h)Kshj-h&hubh )}(h## pygame.mouse.get_pos ##h]h## pygame.mouse.get_pos ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"get_rel() (in module pygame.mouse)pygame.mouse.get_relhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_relh](j)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kzubj)}(hjh]hget_rel}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kzubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kzubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj get_rel()uh%jh'h]h)Kzhjh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`get the amount of mouse movement`h]h)}(hjh]h get the amount of mouse movement}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K|ubhz)}(h:sg:`get_rel() -> (x, y)`h]h)}(hjh]hget_rel() -> (x, y)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K}ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K|ubh)}(hX$Returns the amount of movement in ``x`` and ``y`` since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual input mode is described at the top of the page.h](h"Returns the amount of movement in }hj1sbh;)}(h``x``h]hx}hj9sbah}(h]h]h]h]h!]uh%h:hj1ubh and }hj1sbh;)}(h``y``h]hy}hjKsbah}(h]h]h]h]h!]uh%h:hj1ubh since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual input mode is described at the top of the page.}hj1sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.mouse.get_rel ##h]h## pygame.mouse.get_rel ##}hjcsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjzjj{jj{jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"set_pos() (in module pygame.mouse)pygame.mouse.set_poshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_posh](j)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hset_pos}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj set_pos()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`set the mouse cursor position`h]h)}(hjh]hset the mouse cursor position}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`set_pos([x, y]) -> None`h]h)}(hjh]hset_pos([x, y]) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hSet the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new ``pygame.MOUSEMOTION`` event.h](hSet the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new }hjsbh;)}(h``pygame.MOUSEMOTION``h]hpygame.MOUSEMOTION}hjsbah}(h]h]h]h]h!]uh%h:hjubh event.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.mouse.set_pos ##h]h## pygame.mouse.set_pos ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj2jj3jj3jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&set_visible() (in module pygame.mouse)pygame.mouse.set_visiblehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_visibleh](j)}(h pygame.mouse.h]h pygame.mouse.}hjLsbah}(h]h](jjeh]h]h!]h#h$uh%jhjHh&hh'h]h)Kubj)}(hjJh]h set_visible}hjZsbah}(h]h](jjeh]h]h!]h#h$uh%jhjHh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjHh&hh'h]h)Kubeh}(h]jCah](jjeh]h]h!]jjjhjjJjjjJj set_visible()uh%jh'h]h)KhjEh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`hide or show the mouse cursor`h]h)}(hjh]hhide or show the mouse cursor}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj|h&hh'h]h)Kubhz)}(h:sg:`set_visible(bool) -> bool`h]h)}(hjh]hset_visible(bool) -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj|h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjyh&hh'h]h)Kubh)}(hzIf the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor.h]hzIf the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjyh&hubh )}(h## pygame.mouse.set_visible ##h]h## pygame.mouse.set_visible ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjyh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjEh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_visible() (in module pygame.mouse)pygame.mouse.get_visiblehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_visibleh](j)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]h get_visible}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj get_visible()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`get the current visibility state of the mouse cursor`h]h)}(hj'h]h4get the current visibility state of the mouse cursor}hj)sbah}(h]h]hah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubhz)}(h:sg:`get_visible() -> bool`h]h)}(hj>h]hget_visible() -> bool}hj@sbah}(h]h]jah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hlGet the current visibility state of the mouse cursor. ``True`` if the mouse is visible, ``False`` otherwise.h](h6Get the current visibility state of the mouse cursor. }hjYsbh;)}(h``True``h]hTrue}hjasbah}(h]h]h]h]h!]uh%h:hjYubh if the mouse is visible, }hjYsbh;)}(h ``False``h]hFalse}hjssbah}(h]h]h]h]h!]uh%h:hjYubh otherwise.}hjYsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)Khjubh )}(h## pygame.mouse.get_visible ##h]h## pygame.mouse.get_visible ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&get_focused() (in module pygame.mouse)pygame.mouse.get_focusedhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_focusedh](j)}(h pygame.mouse.h]h pygame.mouse.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]h get_focused}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj get_focused()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`check if the display is receiving mouse input`h]h)}(hj h]h-check if the display is receiving mouse input}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_focused() -> bool`h]h)}(hj. h]hget_focused() -> bool}hj0 sbah}(h]h]jah]h]h!]uh%hhj, ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hxReturns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus").h]hxReturns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus").}hjI sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hwThis method is most useful when working in a window. By contrast, in full-screen mode, this method always returns true.h]hwThis method is most useful when working in a window. By contrast, in full-screen mode, this method always returns true.}hjW sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXNote: under ``MS`` Windows, the window that has the mouse focus also has the keyboard focus. But under X-Windows, one window can receive mouse events and another receive keyboard events. ``pygame.mouse.get_focused()`` indicates whether the pygame window receives mouse events.h](h Note: under }hje sbh;)}(h``MS``h]hMS}hjm sbah}(h]h]h]h]h!]uh%h:hje ubh Windows, the window that has the mouse focus also has the keyboard focus. But under X-Windows, one window can receive mouse events and another receive keyboard events. }hje sbh;)}(h``pygame.mouse.get_focused()``h]hpygame.mouse.get_focused()}hj sbah}(h]h]h]h]h!]uh%h:hje ubh; indicates whether the pygame window receives mouse events.}hje sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.mouse.get_focused ##h]h## pygame.mouse.get_focused ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%set_cursor() (in module pygame.mouse)pygame.mouse.set_cursorhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h set_cursorh](j)}(h pygame.mouse.h]h pygame.mouse.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]h set_cursor}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjhjj jjj j set_cursor()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`set the mouse cursor to a new cursor`h]h)}(hj h]h$set the mouse cursor to a new cursor}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h/:sg:`set_cursor(pygame.cursors.Cursor) -> None`h]h)}(hj h]h)set_cursor(pygame.cursors.Cursor) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h;:sg:`set_cursor(size, hotspot, xormasks, andmasks) -> None`h]h)}(hj+ h]h5set_cursor(size, hotspot, xormasks, andmasks) -> None}hj- sbah}(h]h]jah]h]h!]uh%hhj) ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h*:sg:`set_cursor(hotspot, surface) -> None`h]h)}(hjB h]h$set_cursor(hotspot, surface) -> None}hjD sbah}(h]h]jah]h]h!]uh%hhj@ ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h":sg:`set_cursor(constant) -> None`h]h)}(hjY h]hset_cursor(constant) -> None}hj[ sbah}(h]h]jah]h]h!]uh%hhjW ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hSet the mouse cursor to something new. This function accepts either an explicit ``Cursor`` object or arguments to create a ``Cursor`` object.h](hPSet the mouse cursor to something new. This function accepts either an explicit }hjt sbh;)}(h ``Cursor``h]hCursor}hj| sbah}(h]h]h]h]h!]uh%h:hjt ubh! object or arguments to create a }hjt sbh;)}(h ``Cursor``h]hCursor}hj sbah}(h]h]h]h]h!]uh%h:hjt ubh object.}hjt sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hNSee :class:`pygame.cursors.Cursor` for help creating cursors and for examples.h](hSee }hj sbh6)}(h:class:`pygame.cursors.Cursor`h]h;)}(hj h]hpygame.cursors.Cursor}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYjhZNh[pygame.cursors.Cursoruh%h5h'h]h)Khj ubh, for help creating cursors and for examples.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hChanged in pygame 2.0.1.h]h)}(hChanged in pygame 2.0.1.h]h)}(hChanged in pygame 2.0.1.h]hChanged in pygame 2.0.1.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.0.1uh%jh&hh'h]h)Khj ubh )}(h## pygame.mouse.set_cursor ##h]h## pygame.mouse.set_cursor ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%get_cursor() (in module pygame.mouse)pygame.mouse.get_cursorhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_cursorh](j)}(h pygame.mouse.h]h pygame.mouse.}hj. sbah}(h]h](jjeh]h]h!]h#h$uh%jhj* h&hh'h]h)Kubj)}(hj, h]h get_cursor}hj< sbah}(h]h](jjeh]h]h!]h#h$uh%jhj* h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj* h&hh'h]h)Kubeh}(h]j% ah](jjeh]h]h!]jjjhjj, jjj, j get_cursor()uh%jh'h]h)Khj' h&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`get the current mouse cursor`h]h)}(hjc h]hget the current mouse cursor}hje sbah}(h]h]hah]h]h!]uh%hhja ubah}(h]h]h]h]h!]uh%h)hKhj^ h&hh'h]h)Kubhz)}(h+:sg:`get_cursor() -> pygame.cursors.Cursor`h]h)}(hjz h]h%get_cursor() -> pygame.cursors.Cursor}hj| sbah}(h]h]jah]h]h!]uh%hhjx ubah}(h]h]h]h]h!]uh%h)hKhj^ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj[ h&hh'h]h)Kubh)}(hGet the information about the mouse system cursor. The return value contains the same data as the arguments passed into :func:`pygame.mouse.set_cursor()`.h](hxGet the information about the mouse system cursor. The return value contains the same data as the arguments passed into }hj sbh6)}(h!:func:`pygame.mouse.set_cursor()`h]h;)}(hj h]hpygame.mouse.set_cursor()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjhZNh[pygame.mouse.set_cursoruh%h5h'h]h)Khj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj[ h&hubh note)}(hCode that unpacked a get_cursor() call into ``size, hotspot, xormasks, andmasks`` will still work, assuming the call returns an old school type cursor.h]h)}(hCode that unpacked a get_cursor() call into ``size, hotspot, xormasks, andmasks`` will still work, assuming the call returns an old school type cursor.h](h,Code that unpacked a get_cursor() call into }hj sbh;)}(h%``size, hotspot, xormasks, andmasks``h]h!size, hotspot, xormasks, andmasks}hj sbah}(h]h]h]h]h!]uh%h:hj ubhF will still work, assuming the call returns an old school type cursor.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj[ h&hubj)}(hChanged in pygame 2.0.1.h]h)}(hChanged in pygame 2.0.1.h]h)}(hChanged in pygame 2.0.1.h]hChanged in pygame 2.0.1.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.0.1uh%jh&hh'h]h)Khj[ ubh )}(h## pygame.mouse.get_cursor ##h]h## pygame.mouse.get_cursor ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj[ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj' h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj/ jj0 jj0 jjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.mouse ##h]h## pygame.mouse ##}hj4 sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kubeh}(h](hs pygame-mouseeh]h] pygame.mouseah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjt error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jG jD jjjqjmu nametypes}(jG jjquh}(jD h,hsj)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjjjmjCjjjjjjjjjCjHjjjjj j j% j* u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/mouse.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.1001408 pygame-2.6.1/docs/generated/doctrees/ref/music.doctree0000644000175100001770000015403214676242420022364 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.mixer.music`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.mixer.music}hh None`h]h)}(hjh]hload(filename) -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h(:sg:`load(fileobj, namehint="") -> None`h]h)}(hjh]h"load(fileobj, namehint="") -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj}h&hh'h]h)Kubh)}(hThis will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing.h]hThis will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj}h&hubh)}(hIf you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`load(fileobj, "ogg")`.h](hIf you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: }hjsbh;)}(h:code:`load(fileobj, "ogg")`h]hload(fileobj, "ogg")}hjsbah}(h]h]codeah]h]h!]languagehuh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K!hj}h&hubhversionmodified)}(h9Changed in pygame 2.0.2: Added optional namehint argumenth]h)}(h9Changed in pygame 2.0.2: Added optional namehint argumenth](h)}(hChanged in pygame 2.0.2: h]hChanged in pygame 2.0.2: }hj sbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)K%ubhAdded optional }(hjh&hh'Nh)Nubh;)}(h ``namehint``h]hnamehint}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)K%ubah}(h]h]h]h]h!]typeversionchangedversion2.0.2uh%jh&hh'h]h)K$hj}ubh )}(h## pygame.mixer.music.load ##h]h## pygame.mixer.music.load ##}hj?sbah}(h]h]h]h]h!]h#h$uh%h hj}h&hh'h]h)K&ubeh}(h]h]h]h]h!]uh%j{hj4h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjVobjtypejWdesctypejWno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.'unload() (in module pygame.mixer.music)pygame.mixer.music.unloadhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hunloadh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjzsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjvh&hh'h]h)K(ubjP)}(hjxh]hunload}hjsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjvh&hh'h]h)K(ubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjvh&hh'h]h)K(ubeh}(h]jqah](jojpeh]h]h!]jthjuhjvjxjwhjxjyunload()uh%j7h'h]h)K(hjsh&hubj|)}(hhh](hv)}(hhh](hz)}(h<:sl:`Unload the currently loaded music to free up resources`h]h)}(hjh]h6Unload the currently loaded music to free up resources}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K*ubhz)}(h:sg:`unload() -> None`h]h)}(hjh]hunload() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K+ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K*ubh)}(hBThis closes resources like files for any music that may be loaded.h]hBThis closes resources like files for any music that may be loaded.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K-hjh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)K0ubah}(h]h]h]h]h!]j; versionaddedj=2.0.0uh%jh&hh'h]h)K/hjubh )}(h## pygame.mixer.music.load ##h]h## pygame.mixer.music.load ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K1ubeh}(h]h]h]h]h!]uh%j{hjsh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j,j\j-j]j-j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.%play() (in module pygame.mixer.music)pygame.mixer.music.playhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hplayh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjFsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjBh&hh'h]h)K4ubjP)}(hjDh]hplay}hjTsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjBh&hh'h]h)K4ubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjBh&hh'h]h)K4ubeh}(h]j=ah](jojpeh]h]h!]jthjuhjvjDjwhjDjyplay()uh%j7h'h]h)K4hj?h&hubj|)}(hhh](hv)}(hhh](hz)}(h,:sl:`Start the playback of the music stream`h]h)}(hj{h]h&Start the playback of the music stream}hj}sbah}(h]h]hah]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%h)hKhjvh&hh'h]h)K6ubhz)}(h1:sg:`play(loops=0, start=0.0, fade_ms=0) -> None`h]h)}(hjh]h+play(loops=0, start=0.0, fade_ms=0) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjvh&hh'h]h)K7ubeh}(h]h]h]h]h!]uh%huhjsh&hh'h]h)K6ubh)}(h]This will play the loaded music stream. If the music is already playing it will be restarted.h]h]This will play the loaded music stream. If the music is already playing it will be restarted.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K9hjsh&hubh)}(h``loops`` is an optional integer argument, which is ``0`` by default, which indicates how many times to repeat the music. The music repeats indefinitely if this argument is set to ``-1``.h](h;)}(h ``loops``h]hloops}hjsbah}(h]h]h]h]h!]uh%h:hjubh+ is an optional integer argument, which is }hjsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjubh{ by default, which indicates how many times to repeat the music. The music repeats indefinitely if this argument is set to }hjsbh;)}(h``-1``h]h-1}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K``start`` is an optional float argument, which is ``0.0`` by default, which denotes the position in time from which the music starts playing. The starting position depends on the format of the music played. ``MP3`` and ``OGG`` use the position as time in seconds. For ``MP3`` files the start time position selected may not be accurate as things like variable bit rate encoding and ID3 tags can throw off the timing calculations. For ``MOD`` music it is the pattern order number. Passing a start position will raise a NotImplementedError if the start position cannot be set.h](h;)}(h ``start``h]hstart}hjsbah}(h]h]h]h]h!]uh%h:hjubh) is an optional float argument, which is }hjsbh;)}(h``0.0``h]h0.0}hjsbah}(h]h]h]h]h!]uh%h:hjubh by default, which denotes the position in time from which the music starts playing. The starting position depends on the format of the music played. }hjsbh;)}(h``MP3``h]hMP3}hj#sbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``OGG``h]hOGG}hj5sbah}(h]h]h]h]h!]uh%h:hjubh* use the position as time in seconds. For }hjsbh;)}(h``MP3``h]hMP3}hjGsbah}(h]h]h]h]h!]uh%h:hjubh files the start time position selected may not be accurate as things like variable bit rate encoding and ID3 tags can throw off the timing calculations. For }hjsbh;)}(h``MOD``h]hMOD}hjYsbah}(h]h]h]h]h!]uh%h:hjubh music it is the pattern order number. Passing a start position will raise a NotImplementedError if the start position cannot be set.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K@hjsh&hubh)}(hXn``fade_ms`` is an optional integer argument, which is ``0`` by default, which denotes the period of time (in milliseconds) over which the music will fade up from volume level ``0.0`` to full volume (or the volume level previously set by :func:`set_volume`). The sample may end before the fade-in is complete. If the music is already streaming ``fade_ms`` is ignored.h](h;)}(h ``fade_ms``h]hfade_ms}hjusbah}(h]h]h]h]h!]uh%h:hjqubh+ is an optional integer argument, which is }hjqsbh;)}(h``0``h]h0}hjsbah}(h]h]h]h]h!]uh%h:hjqubht by default, which denotes the period of time (in milliseconds) over which the music will fade up from volume level }hjqsbh;)}(h``0.0``h]h0.0}hjsbah}(h]h]h]h]h!]uh%h:hjqubh7 to full volume (or the volume level previously set by }hjqsbh6)}(h:func:`set_volume`h]h;)}(hjh]h set_volume()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ set_volumeuh%h5h'h]h)KIhjqubhX). The sample may end before the fade-in is complete. If the music is already streaming }hjqsbh;)}(h ``fade_ms``h]hfade_ms}hjsbah}(h]h]h]h]h!]uh%h:hjqubh is ignored.}hjqsbeh}(h]h]h]h]h!]uh%hh'h]h)KIhjsh&hubj)}(h8Changed in pygame 2.0.0: Added optional fade_ms argumenth]h)}(h8Changed in pygame 2.0.0: Added optional fade_ms argumenth](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KPubhAdded optional }(hjh&hh'Nh)Nubh;)}(h ``fade_ms``h]hfade_ms}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KPubah}(h]h]h]h]h!]j;versionchangedj=2.0.0uh%jh&hh'h]h)KOhjsubh )}(h## pygame.mixer.music.play ##h]h## pygame.mixer.music.play ##}hj"sbah}(h]h]h]h]h!]h#h$uh%h hjsh&hh'h]h)KQubeh}(h]h]h]h]h!]uh%j{hj?h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j9j\j:j]j:j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.'rewind() (in module pygame.mixer.music)pygame.mixer.music.rewindhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hrewindh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjSsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjOh&hh'h]h)KSubjP)}(hjQh]hrewind}hjasbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjOh&hh'h]h)KSubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjOh&hh'h]h)KSubeh}(h]jJah](jojpeh]h]h!]jthjuhjvjQjwhjQjyrewind()uh%j7h'h]h)KShjLh&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`restart music`h]h)}(hjh]h restart music}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KUubhz)}(h:sg:`rewind() -> None`h]h)}(hjh]hrewind() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KVubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KUubh)}(hResets playback of the current music to the beginning. If :func:`pause` has previously been used to pause the music, the music will remain paused.h](h:Resets playback of the current music to the beginning. If }hjsbh6)}(h :func:`pause`h]h;)}(hjh]hpause()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pauseuh%h5h'h]h)KXhjubhK has previously been used to pause the music, the music will remain paused.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KXhjh&hubh note)}(hX:func:`rewind` supports a limited number of file types and notably ``WAV`` files are NOT supported. For unsupported file types use :func:`play` which will restart the music that's already playing (note that this will start the music playing again even if previously paused).h]h)}(hX:func:`rewind` supports a limited number of file types and notably ``WAV`` files are NOT supported. For unsupported file types use :func:`play` which will restart the music that's already playing (note that this will start the music playing again even if previously paused).h](h6)}(h:func:`rewind`h]h;)}(hjh]hrewind()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[rewinduh%h5h'h]h)K[hjubh5 supports a limited number of file types and notably }hjsbh;)}(h``WAV``h]hWAV}hjsbah}(h]h]h]h]h!]uh%h:hjubh9 files are NOT supported. For unsupported file types use }hjsbh6)}(h :func:`play`h]h;)}(hj.h]hplay()}hj0sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj:reftypefunc refexplicitrefwarnhYhhZNh[playuh%h5h'h]h)K[hjubh which will restart the music that's already playing (note that this will start the music playing again even if previously paused).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K[hjubah}(h]h]h]h]h!]uh%jh'h]h)K[hjh&hubh )}(h## pygame.mixer.music.rewind ##h]h## pygame.mixer.music.rewind ##}hj\sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K`ubeh}(h]h]h]h]h!]uh%j{hjLh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jsj\jtj]jtj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.%stop() (in module pygame.mixer.music)pygame.mixer.music.stophNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hstoph](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)KbubjP)}(hjh]hstop}hjsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Kbubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Kbubeh}(h]jah](jojpeh]h]h!]jthjuhjvjjwhjjystop()uh%j7h'h]h)Kbhjh&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`stop the music playback`h]h)}(hjh]hstop the music playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kdubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Keubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kdubh)}(hsStops the music playback if it is currently playing. endevent will be triggered, if set. It won't unload the music.h]hsStops the music playback if it is currently playing. endevent will be triggered, if set. It won't unload the music.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kghjh&hubh )}(h## pygame.mixer.music.stop ##h]h## pygame.mixer.music.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.&pause() (in module pygame.mixer.music)pygame.mixer.music.pausehNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hpauseh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj3sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hj/h&hh'h]h)KmubjP)}(hj1h]hpause}hjAsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhj/h&hh'h]h)Kmubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hj/h&hh'h]h)Kmubeh}(h]j*ah](jojpeh]h]h!]jthjuhjvj1jwhj1jypause()uh%j7h'h]h)Kmhj,h&hubj|)}(hhh](hv)}(hhh](hz)}(h%:sl:`temporarily stop music playback`h]h)}(hjhh]htemporarily stop music playback}hjjsbah}(h]h]hah]h]h!]uh%hhjfubah}(h]h]h]h]h!]uh%h)hKhjch&hh'h]h)Koubhz)}(h:sg:`pause() -> None`h]h)}(hjh]hpause() -> None}hjsbah}(h]h]jah]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%h)hKhjch&hh'h]h)Kpubeh}(h]h]h]h]h!]uh%huhj`h&hh'h]h)Koubh)}(hcTemporarily stop playback of the music stream. It can be resumed with the :func:`unpause` function.h](hJTemporarily stop playback of the music stream. It can be resumed with the }hjsbh6)}(h:func:`unpause`h]h;)}(hjh]h unpause()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[unpauseuh%h5h'h]h)Krhjubh function.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Krhj`h&hubh )}(h## pygame.mixer.music.pause ##h]h## pygame.mixer.music.pause ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj`h&hh'h]h)Kuubeh}(h]h]h]h]h!]uh%j{hj,h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.(unpause() (in module pygame.mixer.music)pygame.mixer.music.unpausehNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hunpauseh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)KwubjP)}(hjh]hunpause}hj sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Kwubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Kwubeh}(h]jah](jojpeh]h]h!]jthjuhjvjjwhjjy unpause()uh%j7h'h]h)Kwhjh&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`resume paused music`h]h)}(hj2h]hresume paused music}hj4sbah}(h]h]hah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Kyubhz)}(h:sg:`unpause() -> None`h]h)}(hjIh]hunpause() -> None}hjKsbah}(h]h]jah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)Kyubh)}(hIThis will resume the playback of a music stream after it has been paused.h]hIThis will resume the playback of a music stream after it has been paused.}hjdsbah}(h]h]h]h]h!]uh%hh'h]h)K|hj*h&hubh )}(h ## pygame.mixer.music.unpause ##h]h ## pygame.mixer.music.unpause ##}hjrsbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)K~ubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.(fadeout() (in module pygame.mixer.music)pygame.mixer.music.fadeouthNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hfadeouth](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)KubjP)}(hjh]hfadeout}hjsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Kubeh}(h]jah](jojpeh]h]h!]jthjuhjvjjwhjjy fadeout()uh%j7h'h]h)Khjh&hubj|)}(hhh](hv)}(hhh](hz)}(h*:sl:`stop music playback after fading out`h]h)}(hjh]h$stop music playback after fading out}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`fadeout(time) -> None`h]h)}(hjh]hfadeout(time) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h.Fade out and stop the currently playing music.h]h.Fade out and stop the currently playing music.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h`The ``time`` argument denotes the integer milliseconds for which the fading effect is generated.h](hThe }hj sbh;)}(h``time``h]htime}hj sbah}(h]h]h]h]h!]uh%h:hj ubhT argument denotes the integer milliseconds for which the fading effect is generated.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hNote, that this function blocks until the music has faded out. Calls to :func:`fadeout` and :func:`set_volume` will have no effect during this time. If an event was set using :func:`set_endevent` it will be called after the music has faded.h](hHNote, that this function blocks until the music has faded out. Calls to }hj8 sbh6)}(h:func:`fadeout`h]h;)}(hjB h]h fadeout()}hjD sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj@ ubah}(h]h]h]h]h!]refdochS refdomainjN reftypefunc refexplicitrefwarnhYhhZNh[fadeoutuh%h5h'h]h)Khj8 ubh and }hj8 sbh6)}(h:func:`set_volume`h]h;)}(hjf h]h set_volume()}hjh sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjd ubah}(h]h]h]h]h!]refdochS refdomainjr reftypefunc refexplicitrefwarnhYhhZNh[ set_volumeuh%h5h'h]h)Khj8 ubhA will have no effect during this time. If an event was set using }hj8 sbh6)}(h:func:`set_endevent`h]h;)}(hj h]hset_endevent()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[ set_endeventuh%h5h'h]h)Khj8 ubh- it will be called after the music has faded.}hj8 sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## pygame.mixer.music.fadeout ##h]h ## pygame.mixer.music.fadeout ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j j\j j]j j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.+set_volume() (in module pygame.mixer.music)pygame.mixer.music.set_volumehNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(h set_volumeh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hj h&hh'h]h)KubjP)}(hj h]h set_volume}hj sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhj h&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hj h&hh'h]h)Kubeh}(h]j ah](jojpeh]h]h!]jthjuhjvj jwhj jy set_volume()uh%j7h'h]h)Khj h&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`set the music volume`h]h)}(hj h]hset the music volume}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h :sg:`set_volume(volume) -> None`h]h)}(hj/ h]hset_volume(volume) -> None}hj1 sbah}(h]h]jah]h]h!]uh%hhj- ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h%Set the volume of the music playback.h]h%Set the volume of the music playback.}hjJ sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXXThe ``volume`` argument is a float between ``0.0`` and ``1.0`` that sets the volume level. When new music is loaded the volume is reset to full volume. If ``volume`` is a negative value it will be ignored and the volume will remain set at the current level. If the ``volume`` argument is greater than ``1.0``, the volume will be set to ``1.0``.h](hThe }hjX sbh;)}(h ``volume``h]hvolume}hj` sbah}(h]h]h]h]h!]uh%h:hjX ubh argument is a float between }hjX sbh;)}(h``0.0``h]h0.0}hjr sbah}(h]h]h]h]h!]uh%h:hjX ubh and }hjX sbh;)}(h``1.0``h]h1.0}hj sbah}(h]h]h]h]h!]uh%h:hjX ubh] that sets the volume level. When new music is loaded the volume is reset to full volume. If }hjX sbh;)}(h ``volume``h]hvolume}hj sbah}(h]h]h]h]h!]uh%h:hjX ubhd is a negative value it will be ignored and the volume will remain set at the current level. If the }hjX sbh;)}(h ``volume``h]hvolume}hj sbah}(h]h]h]h]h!]uh%h:hjX ubh argument is greater than }hjX sbh;)}(h``1.0``h]h1.0}hj sbah}(h]h]h]h]h!]uh%h:hjX ubh, the volume will be set to }hjX sbh;)}(h``1.0``h]h1.0}hj sbah}(h]h]h]h]h!]uh%h:hjX ubh.}hjX sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h### pygame.mixer.music.set_volume ##h]h### pygame.mixer.music.set_volume ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j j\j j]j j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.+get_volume() (in module pygame.mixer.music)pygame.mixer.music.get_volumehNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(h get_volumeh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hj h&hh'h]h)KubjP)}(hj h]h get_volume}hj# sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhj h&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hj h&hh'h]h)Kubeh}(h]j ah](jojpeh]h]h!]jthjuhjvj jwhj jy get_volume()uh%j7h'h]h)Khj h&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`get the music volume`h]h)}(hjJ h]hget the music volume}hjL sbah}(h]h]hah]h]h!]uh%hhjH ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubhz)}(h:sg:`get_volume() -> value`h]h)}(hja h]hget_volume() -> value}hjc sbah}(h]h]jah]h]h!]uh%hhj_ ubah}(h]h]h]h]h!]uh%h)hKhjE h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjB h&hh'h]h)Kubh)}(hXReturns the current volume for the mixer. The value will be between ``0.0`` and ``1.0``.h](hDReturns the current volume for the mixer. The value will be between }hj| sbh;)}(h``0.0``h]h0.0}hj sbah}(h]h]h]h]h!]uh%h:hj| ubh and }hj| sbh;)}(h``1.0``h]h1.0}hj sbah}(h]h]h]h]h!]uh%h:hj| ubh.}hj| sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjB h&hubh )}(h### pygame.mixer.music.get_volume ##h]h### pygame.mixer.music.get_volume ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjB h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j j\j j]j j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.)get_busy() (in module pygame.mixer.music)pygame.mixer.music.get_busyhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hget_busyh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hj h&hh'h]h)KubjP)}(hj h]hget_busy}hj sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhj h&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hj h&hh'h]h)Kubeh}(h]j ah](jojpeh]h]h!]jthjuhjvj jwhj jy get_busy()uh%j7h'h]h)Khj h&hubj|)}(hhh](hv)}(hhh](hz)}(h*:sl:`check if the music stream is playing`h]h)}(hj h]h$check if the music stream is playing}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_busy() -> bool`h]h)}(hj+ h]hget_busy() -> bool}hj- sbah}(h]h]jah]h]h!]uh%hhj) ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused.h]hReturns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused.}hjF sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(h9Changed in pygame 2.0.1: Returns False when music paused.h]h)}(h9Changed in pygame 2.0.1: Returns False when music paused.h](h)}(hChanged in pygame 2.0.1: h]hChanged in pygame 2.0.1: }hj\ sbah}(h]h](jjeh]h]h!]uh%hhjX h&hh'h]h)Kubh Returns False when music paused.}(hjX h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjT h&hh'h]h)Kubah}(h]h]h]h]h!]j;versionchangedj=2.0.1uh%jh&hh'h]h)Khj ubh )}(h!## pygame.mixer.music.get_busy ##h]h!## pygame.mixer.music.get_busy ##}hj} sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j j\j j]j j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.(set_pos() (in module pygame.mixer.music)pygame.mixer.music.set_poshNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hset_posh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hj h&hh'h]h)KubjP)}(hj h]hset_pos}hj sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhj h&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hj h&hh'h]h)Kubeh}(h]j ah](jojpeh]h]h!]jthjuhjvj jwhj jy set_pos()uh%j7h'h]h)Khj h&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`set position to play from`h]h)}(hj h]hset position to play from}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`set_pos(pos) -> None`h]h)}(hj h]hset_pos(pos) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hThis sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format.h]hThis sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hX8For ``MOD`` files, pos is the integer pattern number in the module. For ``OGG`` it is the absolute position, in seconds, from the beginning of the sound. For ``MP3`` files, it is the relative position, in seconds, from the current position. For absolute positioning in an ``MP3`` file, first call :func:`rewind`.h](hFor }hj# sbh;)}(h``MOD``h]hMOD}hj+ sbah}(h]h]h]h]h!]uh%h:hj# ubh= files, pos is the integer pattern number in the module. For }hj# sbh;)}(h``OGG``h]hOGG}hj= sbah}(h]h]h]h]h!]uh%h:hj# ubhO it is the absolute position, in seconds, from the beginning of the sound. For }hj# sbh;)}(h``MP3``h]hMP3}hjO sbah}(h]h]h]h]h!]uh%h:hj# ubhk files, it is the relative position, in seconds, from the current position. For absolute positioning in an }hj# sbh;)}(h``MP3``h]hMP3}hja sbah}(h]h]h]h]h!]uh%h:hj# ubh file, first call }hj# sbh6)}(h:func:`rewind`h]h;)}(hju h]hrewind()}hjw sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjs ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[rewinduh%h5h'h]h)Khj# ubh.}hj# sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hOther file formats are unsupported. Newer versions of SDL_mixer have better positioning support than earlier ones. An SDLError is raised if a particular format does not support positioning.h]hOther file formats are unsupported. Newer versions of SDL_mixer have better positioning support than earlier ones. An SDLError is raised if a particular format does not support positioning.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hWFunction :func:`set_pos` calls underlining SDL_mixer function ``Mix_SetMusicPosition``.h](h Function }hj sbh6)}(h:func:`set_pos`h]h;)}(hj h]h set_pos()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYhhZNh[set_posuh%h5h'h]h)Khj ubh& calls underlining SDL_mixer function }hj sbh;)}(h``Mix_SetMusicPosition``h]hMix_SetMusicPosition}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj sbah}(h]h](jjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j; versionaddedj=1.9.2uh%jh&hh'h]h)Khj ubh )}(h ## pygame.mixer.music.set_pos ##h]h ## pygame.mixer.music.set_pos ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[j+j\j,j]j,j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.(get_pos() (in module pygame.mixer.music)pygame.mixer.music.get_poshNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hget_posh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjEsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjAh&hh'h]h)KubjP)}(hjCh]hget_pos}hjSsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjAh&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjAh&hh'h]h)Kubeh}(h]j<ah](jojpeh]h]h!]jthjuhjvjCjwhjCjy get_pos()uh%j7h'h]h)Khj>h&hubj|)}(hhh](hv)}(hhh](hz)}(h:sl:`get the music play time`h]h)}(hjzh]hget the music play time}hj|sbah}(h]h]hah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubhz)}(h:sg:`get_pos() -> time`h]h)}(hjh]hget_pos() -> time}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjrh&hh'h]h)Kubh)}(hThis gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets.h]hThis gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjrh&hubh )}(h ## pygame.mixer.music.get_pos ##h]h ## pygame.mixer.music.get_pos ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hj>h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.&queue() (in module pygame.mixer.music)pygame.mixer.music.queuehNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(hqueueh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)KubjP)}(hjh]hqueue}hjsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Kubeh}(h]jah](jojpeh]h]h!]jthjuhjvjjwhjjyqueue()uh%j7h'h]h)Khjh&hubj|)}(hhh](hv)}(hhh](hz)}(h.:sl:`queue a sound file to follow the current`h]h)}(hj h]h(queue a sound file to follow the current}hj"sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`queue(filename) -> None`h]h)}(hj7h]hqueue(filename) -> None}hj9sbah}(h]h]jah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h2:sg:`queue(fileobj, namehint="", loops=0) -> None`h]h)}(hjNh]h,queue(fileobj, namehint="", loops=0) -> None}hjPsbah}(h]h]jah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX]This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in the new sound becoming the queued sound. Also, if the current sound is ever stopped or changed, the queued sound will be lost.h]hX]This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in the new sound becoming the queued sound. Also, if the current sound is ever stopped or changed, the queued sound will be lost.}hjisbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hIf you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`queue(fileobj, "ogg")`.h](hIf you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: }hjwsbh;)}(h:code:`queue(fileobj, "ogg")`h]hqueue(fileobj, "ogg")}hjsbah}(h]h]jah]h]h!]languagehuh%h:hjwubh.}hjwsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXThe following example will play music by Bach six times, then play music by Mozart once:h]hXThe following example will play music by Bach six times, then play music by Mozart once:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh literal_block)}(hpygame.mixer.music.load('bach.ogg') pygame.mixer.music.play(5) # Plays six times, not five! pygame.mixer.music.queue('mozart.ogg')h]hpygame.mixer.music.load('bach.ogg') pygame.mixer.music.play(5) # Plays six times, not five! pygame.mixer.music.queue('mozart.ogg')}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubj)}(h9Changed in pygame 2.0.2: Added optional namehint argumenth]h)}(h9Changed in pygame 2.0.2: Added optional namehint argumenth](h)}(hChanged in pygame 2.0.2: h]hChanged in pygame 2.0.2: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)KubhAdded optional }(hjh&hh'Nh)Nubh;)}(h ``namehint``h]hnamehint}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j;versionchangedj=2.0.2uh%jh&hh'h]h)Khjubh )}(h## pygame.mixer.music.queue ##h]h## pygame.mixer.music.queue ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\j j]j j^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.-set_endevent() (in module pygame.mixer.music)pygame.mixer.music.set_endeventhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(h set_endeventh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hj"sbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)KubjP)}(hj h]h set_endevent}hj0sbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Kubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Kubeh}(h]jah](jojpeh]h]h!]jthjuhjvj jwhj jyset_endevent()uh%j7h'h]h)Khjh&hubj|)}(hhh](hv)}(hhh](hz)}(h6:sl:`have the music send an event when playback stops`h]h)}(hjWh]h0have the music send an event when playback stops}hjYsbah}(h]h]hah]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%h)hKhjRh&hh'h]h)Kubhz)}(h:sg:`set_endevent() -> None`h]h)}(hjnh]hset_endevent() -> None}hjpsbah}(h]h]jah]h]h!]uh%hhjlubah}(h]h]h]h]h!]uh%h)hKhjRh&hh'h]h)Kubhz)}(h :sg:`set_endevent(type) -> None`h]h)}(hjh]hset_endevent(type) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjRh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjOh&hh'h]h)Kubh)}(hThis causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued.h]hThis causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KhjOh&hubh)}(hThe event will be queued every time the music finishes, not just the first time. To stop the event from being queued, call this method with no argument.h]hThe event will be queued every time the music finishes, not just the first time. To stop the event from being queued, call this method with no argument.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjOh&hubh )}(h%## pygame.mixer.music.set_endevent ##h]h%## pygame.mixer.music.set_endevent ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjOh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.-get_endevent() (in module pygame.mixer.music)pygame.mixer.music.get_endeventhNtauh%hdhh,h&hh'Nh)Nubj3)}(hhh](j8)}(h get_endeventh](j>)}(hpygame.mixer.music.h]hpygame.mixer.music.}hjsbah}(h]h](jJjKeh]h]h!]h#h$uh%j=hjh&hh'h]h)MubjP)}(hjh]h get_endevent}hjsbah}(h]h](j[j\eh]h]h!]h#h$uh%jOhjh&hh'h]h)Mubja)}(h()h]h}(h]h]h]h]h!]h#h$uh%j`hjh&hh'h]h)Mubeh}(h]jah](jojpeh]h]h!]jthjuhjvjjwhjjyget_endevent()uh%j7h'h]h)Mhjh&hubj|)}(hhh](hv)}(hhh](hz)}(h7:sl:`get the event a channel sends when playback stops`h]h)}(hj"h]h1get the event a channel sends when playback stops}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubhz)}(h:sg:`get_endevent() -> type`h]h)}(hj9h]hget_endevent() -> type}hj;sbah}(h]h]jah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M ubh)}(hReturns the event type to be sent every time the music finishes playback. If there is no endevent the function returns ``pygame.NOEVENT``.h](hwReturns the event type to be sent every time the music finishes playback. If there is no endevent the function returns }hjTsbh;)}(h``pygame.NOEVENT``h]hpygame.NOEVENT}hj\sbah}(h]h]h]h]h!]uh%h:hjTubh.}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh )}(h%## pygame.mixer.music.get_endevent ##h]h%## pygame.mixer.music.get_endevent ##}hjtsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j{hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j[jj\jj]jj^j_j`jajbjcjduh%j2h&hhh,h'Nh)Nubh )}(h## pygame.mixer.music ##h]h## pygame.mixer.music ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hspygame-mixer-musiceh]h]pygame.mixer.musicah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubj0j9jqjvj=jBjJjOjjj*j/jjjjj j j j j j j j j<jAjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/music.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.1151407 pygame-2.6.1/docs/generated/doctrees/ref/overlay.doctree0000644000175100001770000003346514676242420022733 0ustar00runnerdocker*7sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.Overlay`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.Overlay}hh Overlay`h]h)}(hhh]h+Overlay(format, (width, height)) -> Overlay}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)Kubhk)}(hThe Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard ``RGB`` pixel formats, and can use multiple resolutions of data to create a single image.h](hnThe Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubhR pixel formats, and can use multiple resolutions of data to create a single image.}hjsbeh}(h]h]h]h]h!]uh%hjh'h]h)Khhh&hubhk)}(hThe Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays.h]hThe Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays.}hj2sbah}(h]h]h]h]h!]uh%hjh'h]h)Khhh&hubhk)}(hThe Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types:h]hThe Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types:}hj@sbah}(h]h]h]h]h!]uh%hjh'h]h)Khhh&hubh literal_block)}(hDYV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAYh]hDYV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAY}hjPsbah}(h]h]h]h]h!]h#h$uh%jNh'h]h)Khhh&hubhk)}(hThe width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay.h]hThe width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay.}hj^sbah}(h]h]h]h]h!]uh%hjh'h]h)K hhh&hubhk)}(h[The overlay objects are always visible, and always show above the regular display contents.h]h[The overlay objects are always visible, and always show above the regular display contents.}hjlsbah}(h]h]h]h]h!]uh%hjh'h]h)K$hhh&hubh)}(hhh]h}(h]h]h]h]h!]entries](h!display() (pygame.Overlay method)pygame.Overlay.displayhNtauh%hhhh&hh'Nh)Nubh)}(hhh](h)}(hdisplayh](h)}(hjh]hdisplay}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K'ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K'ubeh}(h]jah](hheh]h]h!]hhhhhʌOverlay.displayhhȌOverlaydisplayh͌Overlay.display()uh%hh'h]h)K'hjh&hubh)}(hhh](h)}(hhh](h)}(h :sl:`set the overlay pixel data`h]h)}(hjh]hset the overlay pixel data}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K)ubh)}(h :sg:`display((y, u, v)) -> None`h]h)}(hjh]hdisplay((y, u, v)) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K*ubh)}(h:sg:`display() -> None`h]h)}(hjh]hdisplay() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K+ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K)ubhk)}(hDisplay the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay.h]hDisplay the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay.}hjsbah}(h]h]h]h]h!]uh%hjh'h]h)K-hjh&hubhk)}(hIf no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated.h]hIf no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated.}hjsbah}(h]h]h]h]h!]uh%hjh'h]h)K1hjh&hubhk)}(hTThe strings are not validated, and improperly sized strings could crash the program.h]hTThe strings are not validated, and improperly sized strings could crash the program.}hj sbah}(h]h]h]h]h!]uh%hjh'h]h)K5hjh&hubh )}(h## Overlay.display ##h]h## Overlay.display ##}hj.sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K8ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]domainjEobjtypejFdesctypejFno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhhh'Nh)Nubh)}(hhh]h}(h]h]h]h]h!]entries](h&set_location() (pygame.Overlay method)pygame.Overlay.set_locationhNtauh%hhhh&hh'Nh)Nubh)}(hhh](h)}(h set_locationh](h)}(hjgh]h set_location}hjisbah}(h]h](hheh]h]h!]h#h$uh%hhjeh&hh'h]h)K:ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjeh&hh'h]h)K:ubeh}(h]j`ah](hheh]h]h!]hhhhhʌOverlay.set_locationhhȌOverlay set_locationh͌Overlay.set_location()uh%hh'h]h)K:hjbh&hubh)}(hhh](h)}(hhh](h)}(h,:sl:`control where the overlay is displayed`h]h)}(hjh]h&control where the overlay is displayed}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K None`h]h)}(hjh]hset_location(rect) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K=ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)KGubh)}(h:sg:`get_hardware(rect) -> int`h]h)}(hjWh]hget_hardware(rect) -> int}hjYsbah}(h]h]jah]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%h)hKhj;h&hh'h]h)KHubeh}(h]h]h]h]h!]uh%hhj8h&hh'h]h)KGubhk)}(hReturns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used.h]hReturns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used.}hjrsbah}(h]h]h]h]h!]uh%hjh'h]h)KJhj8h&hubh )}(h## Overlay.get_hardware ##h]h## Overlay.get_hardware ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj8h&hh'h]h)KMubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%hh&hhhh'Nh)Nubh )}(h## pygame.Overlay ##h]h## pygame.Overlay ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)KOubeh}(h]h]h]h]h!]uh%hhhh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%hh&hhh,h'Nh)Nubeh}(h]pygame-overlayah]h]pygame.overlayah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hhjjj`jej ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/overlay.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.1511407 pygame-2.6.1/docs/generated/doctrees/ref/pixelarray.doctree0000644000175100001770000013177214676242420023432 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:class:`pygame.PixelArray`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.PixelArray}hh PixelArray`h]h)}(hhh]h!PixelArray(Surface) -> PixelArray}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hXUThe PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays support slicing, both for returning a subarray or for assignment. A pixel array sliced on a single column or row returns a one dimensional pixel array. Arithmetic and other operations are not supported. A pixel array can be safely assigned to itself. Finally, pixel arrays export an array struct interface, allowing them to interact with :mod:`pygame.pixelcopy` methods and NumPy arrays.h](hX$The PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays support slicing, both for returning a subarray or for assignment. A pixel array sliced on a single column or row returns a one dimensional pixel array. Arithmetic and other operations are not supported. A pixel array can be safely assigned to itself. Finally, pixel arrays export an array struct interface, allowing them to interact with }hhsbh6)}(h:mod:`pygame.pixelcopy`h]h;)}(hjh]hpygame.pixelcopy}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZh~h[pygame.pixelcopyuh%h5h'h]h)K hhubh methods and NumPy arrays.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)K hhh&hubh)}(hzA PixelArray pixel item can be assigned a raw integer values, a :class:`pygame.Color` instance, or a (r, g, b[, a]) tuple.h](h@A PixelArray pixel item can be assigned a raw integer values, a }hj*sbh6)}(h:class:`pygame.Color`h]h;)}(hj4h]h pygame.Color}hj6sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypeclass refexplicitrefwarnhYhhZh~h[ pygame.Coloruh%h5h'h]h)Khj*ubh% instance, or a (r, g, b[, a]) tuple.}hj*sbeh}(h]h]h]h]h!]uh%hh'h]h)Khhh&hubh literal_block)}(h`pxarray[x, y] = 0xFF00FF pxarray[x, y] = pygame.Color(255, 0, 255) pxarray[x, y] = (255, 0, 255)h]h`pxarray[x, y] = 0xFF00FF pxarray[x, y] = pygame.Color(255, 0, 255) pxarray[x, y] = (255, 0, 255)}hj^sbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)Khhh&hubh)}(hHowever, only a pixel's integer value is returned. So, to compare a pixel to a particular color the color needs to be first mapped using the :meth:`Surface.map_rgb()` method of the Surface object for which the PixelArray was created.h](hHowever, only a pixel's integer value is returned. So, to compare a pixel to a particular color the color needs to be first mapped using the }hjlsbh6)}(h:meth:`Surface.map_rgb()`h]h;)}(hjvh]hSurface.map_rgb()}hjxsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjtubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[Surface.map_rgbuh%h5h'h]h)K!hjlubhC method of the Surface object for which the PixelArray was created.}hjlsbeh}(h]h]h]h]h!]uh%hh'h]h)K!hhh&hubj])}(hpxarray = pygame.PixelArray(surface) # Check, if the first pixel at the topleft corner is blue if pxarray[0, 0] == surface.map_rgb((0, 0, 255)): ...h]hpxarray = pygame.PixelArray(surface) # Check, if the first pixel at the topleft corner is blue if pxarray[0, 0] == surface.map_rgb((0, 0, 255)): ...}hjsbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)K(hhh&hubh)}(hWhen assigning to a range of of pixels, a non tuple sequence of colors or a PixelArray can be used as the value. For a sequence, the length must match the PixelArray width.h]hWhen assigning to a range of of pixels, a non tuple sequence of colors or a PixelArray can be used as the value. For a sequence, the length must match the PixelArray width.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K-hhh&hubj])}(hXpxarray[a:b] = 0xFF00FF # set all pixels to 0xFF00FF pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF, # second pixel = 0xAACCEE, ... pxarray[a:b] = [(255, 0, 255), (170, 204, 238), ...] # same as above pxarray[a:b] = [(255, 0, 255), 0xAACCEE, ...] # same as above pxarray[a:b] = otherarray[x:y] # slice sizes must matchh]hXpxarray[a:b] = 0xFF00FF # set all pixels to 0xFF00FF pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF, # second pixel = 0xAACCEE, ... pxarray[a:b] = [(255, 0, 255), (170, 204, 238), ...] # same as above pxarray[a:b] = [(255, 0, 255), 0xAACCEE, ...] # same as above pxarray[a:b] = otherarray[x:y] # slice sizes must match}hjsbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)K3hhh&hubh)}(hFor PixelArray assignment, if the right hand side array has a row length of 1, then the column is broadcast over the target array's rows. An array of height 1 is broadcast over the target's columns, and is equivalent to assigning a 1D PixelArray.h]hFor PixelArray assignment, if the right hand side array has a row length of 1, then the column is broadcast over the target array's rows. An array of height 1 is broadcast over the target's columns, and is equivalent to assigning a 1D PixelArray.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K:hhh&hubh)}(h^Subscript slices can also be used to assign to a rectangular subview of the target PixelArray.h]h^Subscript slices can also be used to assign to a rectangular subview of the target PixelArray.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K?hhh&hubj])}(h# Create some new PixelArray objects providing a different view # of the original array/surface. newarray = pxarray[2:4, 3:5] otherarray = pxarray[::2, ::2]h]h# Create some new PixelArray objects providing a different view # of the original array/surface. newarray = pxarray[2:4, 3:5] otherarray = pxarray[::2, ::2]}hjsbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)KDhhh&hubh)}(h{Subscript slices can also be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis. Theh]h{Subscript slices can also be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis. The}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KIhhh&hubj])}(hpxarray[::2, :] = (0, 0, 0) # Make even columns black. pxarray[::2] = (0, 0, 0) # Same as [::2, :]h]hpxarray[::2, :] = (0, 0, 0) # Make even columns black. pxarray[::2] = (0, 0, 0) # Same as [::2, :]}hjsbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)KNhhh&hubh)}(hX/During its lifetime, the PixelArray locks the surface, thus you explicitly have to close() it once its not used any more and the surface should perform operations in the same scope. It is best to use it as a context manager using the with PixelArray(surf) as pixel_array: style. So it works on pypy too.h]hX/During its lifetime, the PixelArray locks the surface, thus you explicitly have to close() it once its not used any more and the surface should perform operations in the same scope. It is best to use it as a context manager using the with PixelArray(surf) as pixel_array: style. So it works on pypy too.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KQhhh&hubh)}(h9A simple ``:`` slice index for the column can be omitted.h](h A simple }hjsbh;)}(h``:``h]h:}hj$sbah}(h]h]h]h]h!]uh%h:hjubh+ slice index for the column can be omitted.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KVhhh&hubj])}(hpxarray[::2, ...] = (0, 0, 0) # Same as pxarray[::2, :] pxarray[...] = (255, 0, 0) # Same as pxarray[:]h]hpxarray[::2, ...] = (0, 0, 0) # Same as pxarray[::2, :] pxarray[...] = (255, 0, 0) # Same as pxarray[:]}hj<sbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)KZhhh&hubh)}(hXaA note about PixelArray to PixelArray assignment, for arrays with an item size of 3 (created from 24 bit surfaces) pixel values are translated from the source to the destinations format. The red, green, and blue color elements of each pixel are shifted to match the format of the target surface. For all other pixel sizes no such remapping occurs. This should change in later pygame releases, where format conversions are performed for all pixel sizes. To avoid code breakage when full mapped copying is implemented it is suggested PixelArray to PixelArray copies be only between surfaces of identical format.h]hXaA note about PixelArray to PixelArray assignment, for arrays with an item size of 3 (created from 24 bit surfaces) pixel values are translated from the source to the destinations format. The red, green, and blue color elements of each pixel are shifted to match the format of the target surface. For all other pixel sizes no such remapping occurs. This should change in later pygame releases, where format conversions are performed for all pixel sizes. To avoid code breakage when full mapped copying is implemented it is suggested PixelArray to PixelArray copies be only between surfaces of identical format.}hjJsbah}(h]h]h]h]h!]uh%hh'h]h)K]hhh&hubhversionmodified)}(hNew in pygame 1.9.4: close() method was added. For explicitly cleaning up. being able to use PixelArray as a context manager for cleanup. both of these are useful for when working without reference counting (pypy).h](h)}(hNew in pygame 1.9.4: h]h)}(hNew in pygame 1.9.4: h]hNew in pygame 1.9.4: }hjbsbah}(h]h](jXaddedeh]h]h!]uh%hhj^ubah}(h]h]h]h]h!] translatableuh%hhjZh&hh'Nh)Nubh bullet_list)}(hhh](h list_item)}(h5close() method was added. For explicitly cleaning up.h]h)}(hjh]h5close() method was added. For explicitly cleaning up.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kihjubah}(h]h]h]h]h!]uh%j}h'h]h)Kihjzh&hubj~)}(h>being able to use PixelArray as a context manager for cleanup.h]h)}(hjh]h>being able to use PixelArray as a context manager for cleanup.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kjhjubah}(h]h]h]h]h!]uh%j}h'h]h)Kjhjzh&hubj~)}(hLboth of these are useful for when working without reference counting (pypy).h]h)}(hjh]hLboth of these are useful for when working without reference counting (pypy).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kkhjubah}(h]h]h]h]h!]uh%j}h'h]h)Kkhjzh&hubeh}(h]h]h]h]h!]bullet-uh%jxh'h]h)KihjZh&hubeh}(h]h]h]h]h!]type versionaddedversion1.9.4uh%jXh&hh'h]h)KghhubjY)}(hdNew in pygame 1.9.2: array struct interface transpose method broadcasting for a length 1 dimensionh](h)}(hNew in pygame 1.9.2: h]h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'Nh)Nubjy)}(hhh](j~)}(harray struct interfaceh]h)}(hjh]harray struct interface}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kohjubah}(h]h]h]h]h!]uh%j}h'h]h)Kohjh&hubj~)}(htranspose methodh]h)}(hjh]htranspose method}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kphj ubah}(h]h]h]h]h!]uh%j}h'h]h)Kphjh&hubj~)}(h%broadcasting for a length 1 dimensionh]h)}(hj&h]h%broadcasting for a length 1 dimension}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)Kqhj$ubah}(h]h]h]h]h!]uh%j}h'h]h)Kqhjh&hubeh}(h]h]h]h]h!]jjuh%jxh'h]h)Kohjh&hubeh}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)KmhhubjY)}(hChanged in pygame 1.9.2: A 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array. For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.h](h)}(hChanged in pygame 1.9.2: h]h)}(hChanged in pygame 1.9.2: h]hChanged in pygame 1.9.2: }hjQsbah}(h]h](jXchangedeh]h]h!]uh%hhjMubah}(h]h]h]h]h!] translatableuh%hhjIh&hh'Nh)Nubjy)}(hhh](j~)}(hkA 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array.h]h)}(hkA 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array.h]hkA 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array.}hjnsbah}(h]h]h]h]h!]uh%hh'h]h)Kuhjjubah}(h]h]h]h]h!]uh%j}h'h]h)Kuhjgh&hubj~)}(h]For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.h]h)}(h]For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.h]h]For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kwhjubah}(h]h]h]h]h!]uh%j}h'h]h)Kwhjgh&hubeh}(h]h]h]h]h!]jjuh%jxh'h]h)KuhjIh&hubeh}(h]h]h]h]h!]jversionchangedj1.9.2uh%jXh&hh'h]h)Kshhubh )}(h%versionadded: 1.8.0 Subscript supporth]h%versionadded: 1.8.0 Subscript support}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)K}ubh )}(hgversionadded: 1.8.1 Methods :meth:`make_surface`, :meth:`replace`, :meth:`extract`, and :meth:`compare`h]hgversionadded: 1.8.1 Methods :meth:`make_surface`, :meth:`replace`, :meth:`extract`, and :meth:`compare`}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Kubh )}(haversionadded: 1.9.2 Properties :attr:`itemsize`, :attr:`ndim`, :attr:`shape`, and :attr:`strides`h]haversionadded: 1.9.2 Properties :attr:`itemsize`, :attr:`ndim`, :attr:`shape`, and :attr:`strides`}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Kubh )}(h*versionadded: 1.9.2 Array struct interfaceh]h*versionadded: 1.9.2 Array struct interface}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Kubh )}(h)versionadded: 1.9.4 Methods :meth:`close`h]h)versionadded: 1.9.4 Methods :meth:`close`}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%surface (pygame.PixelArray attribute)pygame.PixelArray.surfacehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hsurfaceh]h)}(hjh]hsurface}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~hPixelArray.surfacehh PixelArraysurfacehjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h+:sl:`Gets the Surface the PixelArray uses.`h]h)}(hj"h]h%Gets the Surface the PixelArray uses.}hj$sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`surface -> Surface`h]h)}(hj9h]hsurface -> Surface}hj;sbah}(h]h]hah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(h+The Surface the PixelArray was created for.h]h+The Surface the PixelArray was created for.}hjTsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## PixelArray.surface ##h]h## PixelArray.surface ##}hjbsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]domainjyobjtypejzdesctypejzno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&itemsize (pygame.PixelArray attribute)pygame.PixelArray.itemsizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hitemsizeh]h)}(hjh]hitemsize}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~hPixelArray.itemsizehh PixelArrayitemsizehjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`Returns the byte size of a pixel array item`h]h)}(hjh]h+Returns the byte size of a pixel array item}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`itemsize -> int`h]h)}(hjh]hitemsize -> int}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(hOThis is the same as :meth:`Surface.get_bytesize` for the pixel array's surface.h](hThis is the same as }hjsbh6)}(h:meth:`Surface.get_bytesize`h]h;)}(hjh]hSurface.get_bytesize()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_bytesizeuh%h5h'h]h)Khjubh for the pixel array's surface.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubjY)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj(sbah}(h]h](jXjmeh]h]h!]uh%hhj$ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)Khjubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j~jNjjOjjOjjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"ndim (pygame.PixelArray attribute)pygame.PixelArray.ndimhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hndimh]h)}(hjfh]hndim}hjhsbah}(h]h](hheh]h]h!]h#h$uh%hhjdh&hh'h]h)Kubah}(h]j_ah](hheh]h]h!]hhhh~hPixelArray.ndimhh PixelArrayndimhj{uh%hzh'h]h)Khjah&hubh)}(hhh](h)}(hhh](h)}(h':sl:`Returns the number of dimensions.`h]h)}(hjh]h!Returns the number of dimensions.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`ndim -> int`h]h)}(hjh]h ndim -> int}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(h(A pixel array can be 1 or 2 dimensional.h]h(A pixel array can be 1 or 2 dimensional.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubjY)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)Khjubeh}(h]h]h]h]h!]uh%hhjah&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j~jjjjjjjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#shape (pygame.PixelArray attribute)pygame.PixelArray.shapehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hshapeh]h)}(hj h]hshape}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~hPixelArray.shapehh PixelArrayshapehj"uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h:sl:`Returns the array size.`h]h)}(hj.h]hReturns the array size.}hj0sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Kubh)}(h:sg:`shape -> tuple of int's`h]h)}(hjEh]hshape -> tuple of int's}hjGsbah}(h]h]hah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj&h&hh'h]h)Kubh)}(hjA tuple or length :attr:`ndim` giving the length of each dimension. Analogous to :meth:`Surface.get_size`.h](hA tuple or length }hj`sbh6)}(h :attr:`ndim`h]h;)}(hjjh]hndim}hjlsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjhubah}(h]h]h]h]h!]refdochS refdomainjvreftypeattr refexplicitrefwarnhYhhZh~h[ndimuh%h5h'h]h)Khj`ubh3 giving the length of each dimension. Analogous to }hj`sbh6)}(h:meth:`Surface.get_size`h]h;)}(hjh]hSurface.get_size()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_sizeuh%h5h'h]h)Khj`ubh.}hj`sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj&h&hubjY)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)Khj&ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j~jjjjjjjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%strides (pygame.PixelArray attribute)pygame.PixelArray.strideshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hstridesh]h)}(hjh]hstrides}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~hPixelArray.strideshh PixelArraystrideshjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h4:sl:`Returns byte offsets for each array dimension.`h]h)}(hjh]h.Returns byte offsets for each array dimension.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`strides -> tuple of int's`h]h)}(hj4h]hstrides -> tuple of int's}hj6sbah}(h]h]hah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(hA tuple or length :attr:`ndim` byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step).h](hA tuple or length }hjOsbh6)}(h :attr:`ndim`h]h;)}(hjYh]hndim}hj[sbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjWubah}(h]h]h]h]h!]refdochS refdomainjereftypeattr refexplicitrefwarnhYhhZh~h[ndimuh%h5h'h]h)KhjOubh byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step).}hjOsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubjY)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)Khjubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j~jjjjjjjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq)make_surface() (pygame.PixelArray method)pygame.PixelArray.make_surfacehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h make_surfaceh](h)}(hjh]h make_surface}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hPixelArray.make_surfacehh PixelArray make_surfacehPixelArray.make_surface()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`Creates a new Surface from the current PixelArray.`h]h)}(hjh]h2Creates a new Surface from the current PixelArray.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`make_surface() -> Surface`h]h)}(hj h]hmake_surface() -> Surface}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(hCreates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface.h]hCreates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface.}hj'sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj])}(h]# Create a new surface flipped around the vertical axis. sf = pxarray[:,::-1].make_surface ()h]h]# Create a new surface flipped around the vertical axis. sf = pxarray[:,::-1].make_surface ()}hj5sbah}(h]h]h]h]h!]h#h$uh%j\h'h]h)Khjh&hubjY)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hjKsbah}(h]h](jXjmeh]h]h!]uh%hhjGubah}(h]h]h]h]h!] translatableuh%hhjCh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jXh&hh'h]h)Khjubh )}(h## PixelArray.make_surface ##h]h## PixelArray.make_surface ##}hjhsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~jjjjjjjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$replace() (pygame.PixelArray method)pygame.PixelArray.replacehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hreplaceh](h)}(hjh]hreplace}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hPixelArray.replacehh PixelArrayreplacehPixelArray.replace()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(hC:sl:`Replaces the passed color in the PixelArray with another one.`h]h)}(hjh]h=Replaces the passed color in the PixelArray with another one.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(hQ:sg:`replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None`h]h)}(hjh]hKreplace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubh)}(hrReplaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color.h]hrReplaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX0It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well.h]hX0It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hQThis is an in place operation that directly affects the pixels of the PixelArray.h]hQThis is an in place operation that directly affects the pixels of the PixelArray.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubjY)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj' sbah}(h]h](jXjmeh]h]h!]uh%hhj# ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jXh&hh'h]h)Khjubh )}(h## PixelArray.replace ##h]h## PixelArray.replace ##}hjD sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~j[ jj\ jj\ jjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$extract() (pygame.PixelArray method)pygame.PixelArray.extracthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hextracth](h)}(hjs h]hextract}hju sbah}(h]h](hheh]h]h!]h#h$uh%hhjq h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjq h&hh'h]h)Kubeh}(h]jl ah](hheh]h]h!]hhhh~hPixelArray.extracthh PixelArrayextracthPixelArray.extract()uh%hzh'h]h)Khjn h&hubh)}(hhh](h)}(hhh](h)}(h4:sl:`Extracts the passed color from the PixelArray.`h]h)}(hj h]h.Extracts the passed color from the PixelArray.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(hM:sg:`extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray`h]h)}(hj h]hGextract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubh)}(hExtracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask.h]hExtracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hX/It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well.h]hX/It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubjY)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj sbah}(h]h](jXjmeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jXh&hh'h]h)Khj ubh )}(h## PixelArray.extract ##h]h## PixelArray.extract ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjn h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~j) jj* jj* jjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$compare() (pygame.PixelArray method)pygame.PixelArray.comparehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcompareh](h)}(hjA h]hcompare}hjC sbah}(h]h](hheh]h]h!]h#h$uh%hhj? h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj? h&hh'h]h)Kubeh}(h]j: ah](hheh]h]h!]hhhh~hPixelArray.comparehh PixelArraycomparehPixelArray.compare()uh%hzh'h]h)Khj< h&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`Compares the PixelArray with another one.`h]h)}(hjm h]h)Compares the PixelArray with another one.}hjo sbah}(h]h]hah]h]h!]uh%hhjk ubah}(h]h]h]h]h!]uh%h)hKhjh h&hh'h]h)Kubh)}(hM:sg:`compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray`h]h)}(hj h]hGcompare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhje h&hh'h]h)Kubh)}(hX Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays. Both PixelArray objects must have identical bit depths and dimensions.h]hX Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays. Both PixelArray objects must have identical bit depths and dimensions.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khje h&hubh)}(hX%It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as a threshold for the color detection. This causes the comparison to mark pixels with a similar, but not exactly identical color, as white.h]hX%It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as a threshold for the color detection. This causes the comparison to mark pixels with a similar, but not exactly identical color, as white.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhje h&hubjY)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj sbah}(h]h](jXjmeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)M ubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jXh&hh'h]h)Mhje ubh )}(h## PixelArray.compare ##h]h## PixelArray.compare ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hje h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhj< h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~j jj jj jjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&transpose() (pygame.PixelArray method)pygame.PixelArray.transposehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h transposeh](h)}(hj h]h transpose}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)M ubeh}(h]j ah](hheh]h]h!]hhhh~hPixelArray.transposehh PixelArray transposehPixelArray.transpose()uh%hzh'h]h)M hj h&hubh)}(hhh](h)}(hhh](h)}(h!:sl:`Exchanges the x and y axis.`h]h)}(hj; h]hExchanges the x and y axis.}hj= sbah}(h]h]hah]h]h!]uh%hhj9 ubah}(h]h]h]h]h!]uh%h)hKhj6 h&hh'h]h)Mubh)}(h:sg:`transpose() -> PixelArray`h]h)}(hjR h]htranspose() -> PixelArray}hjT sbah}(h]h]hah]h]h!]uh%hhjP ubah}(h]h]h]h]h!]uh%h)hKhj6 h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj3 h&hh'h]h)Mubh)}(hThis method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array.h]hThis method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array.}hjm sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj3 h&hubjY)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj sbah}(h]h](jXjmeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj{ h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jXh&hh'h]h)Mhj3 ubh )}(h## PixelArray.transpose ##h]h## PixelArray.transpose ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj3 h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~j jj jj jjjjjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"close() (pygame.PixelArray method)pygame.PixelArray.closehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcloseh](h)}(hj h]hclose}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]j ah](hheh]h]h!]hhhh~hPixelArray.closehh PixelArrayclosehPixelArray.close()uh%hzh'h]h)Mhj h&hubh)}(hhh](h)}(hhh](h)}(h7:sl:`Closes the PixelArray, and releases Surface lock.`h]h)}(hj h]h1Closes the PixelArray, and releases Surface lock.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubh)}(h:sg:`close() -> PixelArray`h]h)}(hj h]hclose() -> PixelArray}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Mubh)}(hZThis method is for explicitly closing the PixelArray, and releasing a lock on the Surface.h]hZThis method is for explicitly closing the PixelArray, and releasing a lock on the Surface.}hj- sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubjY)}(hNew in pygame 1.9.4.h]h)}(hNew in pygame 1.9.4.h]h)}(hNew in pygame 1.9.4.h]hNew in pygame 1.9.4.}hjC sbah}(h]h](jXjmeh]h]h!]uh%hhj? ubah}(h]h]h]h]h!] translatableuh%hhj; h&hh'h]h)M#ubah}(h]h]h]h]h!]j versionaddedj1.9.4uh%jXh&hh'h]h)M"hj ubh )}(h## PixelArray.close ##h]h## PixelArray.close ##}hj` sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M$ubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j~jw jjx jjx jjjjjjjuh%huh&hhhh'Nh)Nubh )}(h## pygame.PixelArray ##h]h## pygame.PixelArray ##}hj| sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j~j jj jj jjjjjjjuh%huh&hhh,h'Nh)Nubeh}(h]pygame-pixelarrayah]h]pygame.pixelarrayah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh|jjjjj_jdjj jjjjjjjl jq j: j? j j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/pixelarray.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.1681406 pygame-2.6.1/docs/generated/doctrees/ref/pixelcopy.doctree0000644000175100001770000005107414676242420023262 0ustar00runnerdocker1Rsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.pixelcopy`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.pixelcopy}hhah](sig sig-objecteh]h]h!]moduleh׌classhfullnamejI _toc_partshjI _toc_namesurface_to_array()uh%jEh'h]h)KhjBh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h,:sl:`copy surface pixels to an array object`h]h)}(hjh]h© surface pixels to an array object}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K ubhz)}(hM:sg:`surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None`h]h)}(hjh]hGsurface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K!ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K ubh)}(hXThe surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument ``kind`` and the target array dimension, a copy may be raw pixel value, RGB, a color component slice, or colorkey alpha transparency value. Recognized ``kind`` values are the single character codes 'P', 'R', 'G', 'B', 'A', and 'C'. Kind codes are case insensitive, so 'p' is equivalent to 'P'. The first two dimensions of the target must be the surface size (w, h).h](hmThe surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument }hjsbh;)}(h``kind``h]hkind}hjsbah}(h]h]h]h]h!]uh%h:hjubh and the target array dimension, a copy may be raw pixel value, RGB, a color component slice, or colorkey alpha transparency value. Recognized }hjsbh;)}(h``kind``h]hkind}hjsbah}(h]h]h]h]h!]uh%h:hjubh values are the single character codes 'P', 'R', 'G', 'B', 'A', and 'C'. Kind codes are case insensitive, so 'p' is equivalent to 'P'. The first two dimensions of the target must be the surface size (w, h).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K#hjh&hubh)}(hXThe default 'P' kind code does a direct raw integer pixel (mapped) value copy to a 2D array and a 'RGB' pixel component (unmapped) copy to a 3D array having shape (w, h, 3). For an 8 bit colormap surface this means the table index is copied to a 2D array, not the table value itself. A 2D array's item size must be at least as large as the surface's pixel byte size. The item size of a 3D array must be at least one byte.h]hXThe default 'P' kind code does a direct raw integer pixel (mapped) value copy to a 2D array and a 'RGB' pixel component (unmapped) copy to a 3D array having shape (w, h, 3). For an 8 bit colormap surface this means the table index is copied to a 2D array, not the table value itself. A 2D array's item size must be at least as large as the surface's pixel byte size. The item size of a 3D array must be at least one byte.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K+hjh&hubh)}(hX}For the 'R', 'G', 'B', and 'A' copy kinds a single color component of the unmapped surface pixels are copied to the target 2D array. For kind 'A' and surfaces with source alpha (the surface was created with the SRCALPHA flag), has a colorkey (set with :meth:`Surface.set_colorkey() `), or has a blanket alpha (set with :meth:`Surface.set_alpha() `) then the alpha values are those expected for a SDL surface. If a surface has no explicit alpha value, then the target array is filled with the value of the optional ``opaque`` surface_to_array argument (default 255: not transparent).h](hFor the 'R', 'G', 'B', and 'A' copy kinds a single color component of the unmapped surface pixels are copied to the target 2D array. For kind 'A' and surfaces with source alpha (the surface was created with the SRCALPHA flag), has a colorkey (set with }hjsbh6)}(h<:meth:`Surface.set_colorkey() `h]h;)}(hjh]hSurface.set_colorkey()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZNh[pygame.Surface.set_colorkeyuh%h5h'h]h)K2hjubh$), or has a blanket alpha (set with }hjsbh6)}(h6:meth:`Surface.set_alpha() `h]h;)}(hj4h]hSurface.set_alpha()}hj6sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypemeth refexplicitrefwarnhYhhZNh[pygame.Surface.set_alphauh%h5h'h]h)K2hjubh) then the alpha values are those expected for a SDL surface. If a surface has no explicit alpha value, then the target array is filled with the value of the optional }hjsbh;)}(h ``opaque``h]hopaque}hjVsbah}(h]h]h]h]h!]uh%h:hjubh: surface_to_array argument (default 255: not transparent).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K2hjh&hubh)}(hXCopy kind 'C' is a special case for alpha copy of a source surface with colorkey. Unlike the 'A' color component copy, the ``clear`` argument value is used for colorkey matches, ``opaque`` otherwise. By default, a match has alpha 0 (totally transparent), while everything else is alpha 255 (totally opaque). It is a more general implementation of :meth:`pygame.surfarray.array_colorkey`.h](h{Copy kind 'C' is a special case for alpha copy of a source surface with colorkey. Unlike the 'A' color component copy, the }hjnsbh;)}(h ``clear``h]hclear}hjvsbah}(h]h]h]h]h!]uh%h:hjnubh. argument value is used for colorkey matches, }hjnsbh;)}(h ``opaque``h]hopaque}hjsbah}(h]h]h]h]h!]uh%h:hjnubh otherwise. By default, a match has alpha 0 (totally transparent), while everything else is alpha 255 (totally opaque). It is a more general implementation of }hjnsbh6)}(h':meth:`pygame.surfarray.array_colorkey`h]h;)}(hjh]h!pygame.surfarray.array_colorkey()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZNh[pygame.surfarray.array_colorkeyuh%h5h'h]h)K>hjnubh.}hjnsbeh}(h]h]h]h]h!]uh%hh'h]h)K>hjh&hubh)}(hSpecific to surface_to_array, a ValueError is raised for target arrays with incorrect shape or item size. A TypeError is raised for an incorrect kind code. Surface specific problems, such as locking, raise a pygame.error.h]hSpecific to surface_to_array, a ValueError is raised for target arrays with incorrect shape or item size. A TypeError is raised for an incorrect kind code. Surface specific problems, such as locking, raise a pygame.error.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KEhjh&hubh )}(h'## pygame.pixelcopy.surface_to_array ##h]h'## pygame.pixelcopy.surface_to_array ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KIubeh}(h]h]h]h]h!]uh%jhjBh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j@h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j</array_to_surface() (in module pygame.pixelcopy)!pygame.pixelcopy.array_to_surfacehNtauh%hdhh,h&hh'Nh)NubjA)}(hhh](jF)}(harray_to_surfaceh](jL)}(hpygame.pixelcopy.h]hpygame.pixelcopy.}hj sbah}(h]h](jXjYeh]h]h!]h#h$uh%jKhj h&hh'h]h)KKubj^)}(hj h]harray_to_surface}hjsbah}(h]h](jijjeh]h]h!]h#h$uh%j]hj h&hh'h]h)KKubjo)}(h()h]h}(h]h]h]h]h!]h#h$uh%jnhj h&hh'h]h)KKubeh}(h]jah](j}j~eh]h]h!]jhjhjj jhj jarray_to_surface()uh%jEh'h]h)KKhjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`copy an array object to a surface`h]h)}(hjBh]h!copy an array object to a surface}hjDsbah}(h]h]hah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)KMubhz)}(h2:sg:`array_to_surface(, ) -> None`h]h)}(hjYh]h,array_to_surface(, ) -> None}hj[sbah}(h]h]jah]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%h)hKhj=h&hh'h]h)KNubeh}(h]h]h]h]h!]uh%huhj:h&hh'h]h)KMubh)}(h(See :func:`pygame.surfarray.blit_array`.h](hSee }hjtsbh6)}(h#:func:`pygame.surfarray.blit_array`h]h;)}(hj~h]hpygame.surfarray.blit_array()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj|ubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.surfarray.blit_arrayuh%h5h'h]h)KPhjtubh.}hjtsbeh}(h]h]h]h]h!]uh%hh'h]h)KPhj:h&hubh )}(h'## pygame.pixelcopy.array_to_surface ##h]h'## pygame.pixelcopy.array_to_surface ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj:h&hh'h]h)KRubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%j@h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j<(map_array() (in module pygame.pixelcopy)pygame.pixelcopy.map_arrayhNtauh%hdhh,h&hh'Nh)NubjA)}(hhh](jF)}(h map_arrayh](jL)}(hpygame.pixelcopy.h]hpygame.pixelcopy.}hjsbah}(h]h](jXjYeh]h]h!]h#h$uh%jKhjh&hh'h]h)KTubj^)}(hjh]h map_array}hjsbah}(h]h](jijjeh]h]h!]h#h$uh%j]hjh&hh'h]h)KTubjo)}(h()h]h}(h]h]h]h]h!]h#h$uh%jnhjh&hh'h]h)KTubeh}(h]jah](j}j~eh]h]h!]jhjhjjjhjj map_array()uh%jEh'h]h)KThjh&hubj)}(hhh](hv)}(hhh](hz)}(h::sl:`copy an array to another array, using surface format`h]h)}(hj h]h4copy an array to another array, using surface format}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KVubhz)}(h4:sg:`map_array(, , ) -> None`h]h)}(hj#h]h.map_array(, , ) -> None}hj%sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KWubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KVubh)}(h|Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of .h]h|Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of .}hj>sbah}(h]h]h]h]h!]uh%hh'h]h)KYhjh&hubh )}(h ## pygame.pixelcopy.map_array ##h]h ## pygame.pixelcopy.map_array ##}hjLsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K\ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjcjjdjjdjjjjjjjuh%j@h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j<+make_surface() (in module pygame.pixelcopy)pygame.pixelcopy.make_surfacehNtauh%hdhh,h&hh'Nh)NubjA)}(hhh](jF)}(h make_surfaceh](jL)}(hpygame.pixelcopy.h]hpygame.pixelcopy.}hj}sbah}(h]h](jXjYeh]h]h!]h#h$uh%jKhjyh&hh'h]h)K^ubj^)}(hj{h]h make_surface}hjsbah}(h]h](jijjeh]h]h!]h#h$uh%j]hjyh&hh'h]h)K^ubjo)}(h()h]h}(h]h]h]h]h!]h#h$uh%jnhjyh&hh'h]h)K^ubeh}(h]jtah](j}j~eh]h]h!]jhjhjj{jhj{jmake_surface()uh%jEh'h]h)K^hjvh&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`Copy an array to a new surface`h]h)}(hjh]hCopy an array to a new surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K`ubhz)}(h5:sg:`pygame.pixelcopy.make_surface(array) -> Surface`h]h)}(hjh]h/pygame.pixelcopy.make_surface(array) -> Surface}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kaubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K`ubh)}(hCreate a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values.h]hCreate a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kchjh&hubh )}(h### pygame.pixelcopy.make_surface ##h]h### pygame.pixelcopy.make_surface ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%jhjvh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%j@h&hhh,h'Nh)Nubh )}(h## pygame.pixelcopy ##h]h## pygame.pixelcopy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Khubeh}(h](hspygame-pixelcopyeh]h]pygame.pixelcopyah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjNerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j!js nametypes}j!sh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubj>jGjj jjjtjyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/pixelcopy.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.2241406 pygame-2.6.1/docs/generated/doctrees/ref/pygame.doctree0000644000175100001770000022673614676242420022541 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h :mod:`pygame`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame}hh (numpass, numfail)`h]h)}(hjh]hinit() -> (numpass, numfail)}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX|Initialize all imported pygame modules. No exceptions will be raised if a module fails, but the total number if successful and failed inits will be returned as a tuple. You can always initialize individual modules manually, but :func:`pygame.init` is a convenient way to get everything started. The ``init()`` functions for individual modules will raise exceptions when they fail.h](hInitialize all imported pygame modules. No exceptions will be raised if a module fails, but the total number if successful and failed inits will be returned as a tuple. You can always initialize individual modules manually, but }hjsbh6)}(h:func:`pygame.init`h]h;)}(hjh]h pygame.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ pygame.inituh%h5h'h]h)Khjubh4 is a convenient way to get everything started. The }hjsbh;)}(h ``init()``h]hinit()}hjsbah}(h]h]h]h]h!]uh%h:hjubhG functions for individual modules will raise exceptions when they fail.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hYou may want to initialize the different modules separately to speed up your program or remove the modules your game does not require.h]hYou may want to initialize the different modules separately to speed up your program or remove the modules your game does not require.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K$hjh&hubh)}(hIt is safe to call this ``init()`` more than once as repeated calls will have no effect. This is true even if you have ``pygame.quit()`` all the modules.h](hIt is safe to call this }hjsbh;)}(h ``init()``h]hinit()}hj&sbah}(h]h]h]h]h!]uh%h:hjubhU more than once as repeated calls will have no effect. This is true even if you have }hjsbh;)}(h``pygame.quit()``h]h pygame.quit()}hj8sbah}(h]h]h]h]h!]uh%h:hjubh all the modules.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K'hjh&hubh )}(h## pygame.init ##h]h## pygame.init ##}hjPsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K*ubeh}(h]h]h]h]h!]uh%jhjHh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjgobjtypejhdesctypejhno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBquit() (in module pygame) pygame.quithNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hquith](jR)}(hpygame.h]hpygame.}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjh&hh'h]h)K,ubjd)}(hjh]hquit}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjh&hh'h]h)K,ubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjh&hh'h]h)K,ubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjquit()uh%jKh'h]h)K,hjh&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`uninitialize all pygame modules`h]h)}(hjh]huninitialize all pygame modules}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K.ubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K/ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K.ubh)}(hXKUninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is safe to call this function more than once as repeated calls have no effect.h]hXKUninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is safe to call this function more than once as repeated calls have no effect.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K1hjh&hubh note)}(hCalling :func:`pygame.quit` will not exit your program. Consider letting your program end in the same way a normal Python program will end.h]h)}(hCalling :func:`pygame.quit` will not exit your program. Consider letting your program end in the same way a normal Python program will end.h](hCalling }hjsbh6)}(h:func:`pygame.quit`h]h;)}(hjh]h pygame.quit()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ pygame.quituh%h5h'h]h)K8hjubhp will not exit your program. Consider letting your program end in the same way a normal Python program will end.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K8hjubah}(h]h]h]h]h!]uh%jh'h]h)K7hjh&hubh )}(h## pygame.quit ##h]h## pygame.quit ##}hj>sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K;ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jljUjmjVjnjVjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBget_init() (in module pygame)pygame.get_inithNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hget_inith](jR)}(hpygame.h]hpygame.}hjosbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjkh&hh'h]h)K=ubjd)}(hjmh]hget_init}hj}sbah}(h]h](jojpeh]h]h!]h#h$uh%jchjkh&hh'h]h)K=ubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjkh&hh'h]h)K=ubeh}(h]jfah](jjeh]h]h!]jhjhjjmjhjmj get_init()uh%jKh'h]h)K=hjhh&hubj)}(hhh](hv)}(hhh](hz)}(h5:sl:`returns True if pygame is currently initialized`h]h)}(hjh]h/returns True if pygame is currently initialized}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K?ubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K?ubh)}(h4Returns ``True`` if pygame is currently initialized.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh$ if pygame is currently initialized.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjh&hubhversionmodified)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KEubah}(h]h]h]h]h!]type versionaddedversion1.9.5uh%jh&hh'h]h)KDhjubh )}(h## pygame.get_init ##h]h## pygame.get_init ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%jhjhh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jlj7jmj8jnj8jojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBerror pygame.errorhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hjGh](hdesc_annotation)}(h6[<#text: 'exception'>, >]h](h exception}hjRsbhdesc_sig_space)}(h h]h }hj\sbah}(h]h]wah]h]h!]uh%jZhjRubeh}(h]h]h]h]h!]h#h$uh%jPhjMh&hh'h]h)KHubjR)}(hpygame.h]hpygame.}hjqsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjMh&hh'h]h)KHubjd)}(hjGh]herror}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjMh&hh'h]h)KHubeh}(h]jHah](jjeh]h]h!]jhjhjjGjhjGjjGuh%jKh'h]h)KHhjJh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`standard pygame exception`h]h)}(hjh]hstandard pygame exception}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KJubhz)}(h!:sg:`raise pygame.error(message)`h]h)}(hjh]hraise pygame.error(message)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KKubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KJubh)}(hThis exception is raised whenever a pygame or SDL operation fails. You can catch any anticipated problems and deal with the error. The exception is always raised with a descriptive message about the problem.h]hThis exception is raised whenever a pygame or SDL operation fails. You can catch any anticipated problems and deal with the error. The exception is always raised with a descriptive message about the problem.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KMhjh&hubh)}(haDerived from the ``RuntimeError`` exception, which can also be used to catch these raised errors.h](hDerived from the }hjsbh;)}(h``RuntimeError``h]h RuntimeError}hjsbah}(h]h]h]h]h!]uh%h:hjubh@ exception, which can also be used to catch these raised errors.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KQhjh&hubh )}(h## pygame.error ##h]h## pygame.error ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KTubeh}(h]h]h]h]h!]uh%jhjJh&hh'Nh)Nubeh}(h]h](py exceptioneh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBget_error() (in module pygame)pygame.get_errorhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(h get_errorh](jR)}(hpygame.h]hpygame.}hj,sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhj(h&hh'h]h)KVubjd)}(hj*h]h get_error}hj:sbah}(h]h](jojpeh]h]h!]h#h$uh%jchj(h&hh'h]h)KVubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthj(h&hh'h]h)KVubeh}(h]j#ah](jjeh]h]h!]jhjhjj*jhj*j get_error()uh%jKh'h]h)KVhj%h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`get the current error message`h]h)}(hjah]hget the current error message}hjcsbah}(h]h]hah]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%h)hKhj\h&hh'h]h)KXubhz)}(h:sg:`get_error() -> errorstr`h]h)}(hjxh]hget_error() -> errorstr}hjzsbah}(h]h]jah]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%h)hKhj\h&hh'h]h)KYubeh}(h]h]h]h]h!]uh%huhjYh&hh'h]h)KXubh)}(hSDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed.h](hXSDL maintains an internal error message. This message will usually be given to you when }hjsbh6)}(h:func:`pygame.error`h]h;)}(hjh]hpygame.error()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[ pygame.erroruh%h5h'h]h)K[hjubh3 is raised, so this function will rarely be needed.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K[hjYh&hubh )}(h## pygame.get_error ##h]h## pygame.get_error ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjYh&hh'h]h)K_ubeh}(h]h]h]h]h!]uh%jhj%h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBset_error() (in module pygame)pygame.set_errorhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(h set_errorh](jR)}(hpygame.h]hpygame.}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjh&hh'h]h)Kaubjd)}(hjh]h set_error}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjh&hh'h]h)Kaubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjh&hh'h]h)Kaubeh}(h]jah](jjeh]h]h!]jhjhjjjhjj set_error()uh%jKh'h]h)Kahjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`set the current error message`h]h)}(hj+h]hset the current error message}hj-sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Kcubhz)}(h":sg:`set_error(error_msg) -> None`h]h)}(hjBh]hset_error(error_msg) -> None}hjDsbah}(h]h]jah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Kdubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)Kcubh)}(hSDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed.h](hXSDL maintains an internal error message. This message will usually be given to you when }hj]sbh6)}(h:func:`pygame.error`h]h;)}(hjgh]hpygame.error()}hjisbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjeubah}(h]h]h]h]h!]refdochS refdomainjsreftypefunc refexplicitrefwarnhYhhZNh[ pygame.erroruh%h5h'h]h)Kfhj]ubh3 is raised, so this function will rarely be needed.}hj]sbeh}(h]h]h]h]h!]uh%hh'h]h)Kfhj#h&hubh )}(h## pygame.set_error ##h]h## pygame.set_error ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Kjubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB$get_sdl_version() (in module pygame)pygame.get_sdl_versionhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hget_sdl_versionh](jR)}(hpygame.h]hpygame.}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjh&hh'h]h)Klubjd)}(hjh]hget_sdl_version}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjh&hh'h]h)Klubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjh&hh'h]h)Klubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjget_sdl_version()uh%jKh'h]h)Klhjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`get the version number of SDL`h]h)}(hjh]hget the version number of SDL}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Knubhz)}(h9:sg:`get_sdl_version(linked=True) -> major, minor, patch`h]h)}(hj h]h3get_sdl_version(linked=True) -> major, minor, patch}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Koubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Knubh)}(hXiReturns the three version numbers of the SDL library. ``linked=True`` will cause the function to return the version of the library that pygame is linked against while ``linked=False`` will cause the function to return the version of the library that pygame is compiled against. It can be used to detect which features may or may not be available through pygame.h](h6Returns the three version numbers of the SDL library. }hj'sbh;)}(h``linked=True``h]h linked=True}hj/sbah}(h]h]h]h]h!]uh%h:hj'ubhb will cause the function to return the version of the library that pygame is linked against while }hj'sbh;)}(h``linked=False``h]h linked=False}hjAsbah}(h]h]h]h]h!]uh%h:hj'ubh will cause the function to return the version of the library that pygame is compiled against. It can be used to detect which features may or may not be available through pygame.}hj'sbeh}(h]h]h]h]h!]uh%hh'h]h)Kqhjh&hubj)}(hNew in pygame 1.7.0.h]h)}(hNew in pygame 1.7.0.h]h)}(hNew in pygame 1.7.0.h]hNew in pygame 1.7.0.}hjasbah}(h]h](jj eh]h]h!]uh%hhj]ubah}(h]h]h]h]h!] translatableuh%hhjYh&hh'h]h)Kyubah}(h]h]h]h]h!]j versionaddedj1.7.0uh%jh&hh'h]h)Kxhjubj)}(h6Changed in pygame 2.2.0: linked keyword argument addedh]h)}(h6Changed in pygame 2.2.0: linked keyword argument addedh](h)}(hChanged in pygame 2.2.0: h]hChanged in pygame 2.2.0: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)K{ubh;)}(h ``linked``h]hlinked}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh keyword argument added}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj~h&hh'h]h)K{ubah}(h]h]h]h]h!]jversionchangedj2.2.0uh%jh&hh'h]h)Kzhjubh )}(h## pygame.get_sdl_version ##h]h## pygame.get_sdl_version ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K|ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB&get_sdl_byteorder() (in module pygame)pygame.get_sdl_byteorderhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hget_sdl_byteorderh](jR)}(hpygame.h]hpygame.}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjh&hh'h]h)K~ubjd)}(hjh]hget_sdl_byteorder}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjh&hh'h]h)K~ubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjh&hh'h]h)K~ubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjget_sdl_byteorder()uh%jKh'h]h)K~hjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`get the byte order of SDL`h]h)}(hjh]hget the byte order of SDL}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`get_sdl_byteorder() -> int`h]h)}(hj3h]hget_sdl_byteorder() -> int}hj5sbah}(h]h]jah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hReturns the byte order of the SDL library. It returns ``1234`` for little endian byte order and ``4321`` for big endian byte order.h](h6Returns the byte order of the SDL library. It returns }hjNsbh;)}(h``1234``h]h1234}hjVsbah}(h]h]h]h]h!]uh%h:hjNubh" for little endian byte order and }hjNsbh;)}(h``4321``h]h4321}hjhsbah}(h]h]h]h]h!]uh%h:hjNubh for big endian byte order.}hjNsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jj eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.8uh%jh&hh'h]h)Khjubh )}(h## pygame.get_sdl_byteorder ##h]h## pygame.get_sdl_byteorder ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB"register_quit() (in module pygame)pygame.register_quithNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(h register_quith](jR)}(hpygame.h]hpygame.}hjsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjh&hh'h]h)Kubjd)}(hjh]h register_quit}hjsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjh&hh'h]h)Kubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jhjhjjjhjjregister_quit()uh%jKh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`register a function to be called when pygame quits`h]h)}(hj h]h2register a function to be called when pygame quits}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h%:sg:`register_quit(callable) -> None`h]h)}(hj" h]hregister_quit(callable) -> None}hj$ sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hWhen :func:`pygame.quit` is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed.h](hWhen }hj= sbh6)}(h:func:`pygame.quit`h]h;)}(hjG h]h pygame.quit()}hjI sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjE ubah}(h]h]h]h]h!]refdochS refdomainjS reftypefunc refexplicitrefwarnhYhhZNh[ pygame.quituh%h5h'h]h)Khj= ubh is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed.}hj= sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.register_quit ##h]h## pygame.register_quit ##}hjo sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jlj jmj jnj jojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB"encode_string() (in module pygame)pygame.encode_stringhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(h encode_stringh](jR)}(hpygame.h]hpygame.}hj sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhj h&hh'h]h)Kubjd)}(hj h]h encode_string}hj sbah}(h]h](jojpeh]h]h!]h#h$uh%jchj h&hh'h]h)Kubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jencode_string()uh%jKh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`Encode a Unicode or bytes object`h]h)}(hj h]h Encode a Unicode or bytes object}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(hM:sg:`encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None`h]h)}(hj h]hGencode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h|obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``.h](hNobj: If Unicode, encode; if bytes, return unaltered; if anything else, return }hj sbh;)}(h``None``h]hNone}hj sbah}(h]h]h]h]h!]uh%h:hj ubh; if not given, raise }hj sbh;)}(h``SyntaxError``h]h SyntaxError}hj! sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hTencoding (string): If present, encoding to use. The default is ``'unicode_escape'``.h](h?encoding (string): If present, encoding to use. The default is }hj9 sbh;)}(h``'unicode_escape'``h]h'unicode_escape'}hjA sbah}(h]h]h]h]h!]uh%h:hj9 ubh.}hj9 sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hgerrors (string): If given, how to handle unencodable characters. The default is ``'backslashreplace'``.h](hPerrors (string): If given, how to handle unencodable characters. The default is }hjY sbh;)}(h``'backslashreplace'``h]h'backslashreplace'}hja sbah}(h]h]h]h]h!]uh%h:hjY ubh.}hjY sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hetype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``. For the default encoding and errors values there should be no encoding errors.h](hdetype (exception type): If given, the exception type to raise for an encoding error. The default is }hjy sbh;)}(h``UnicodeEncodeError``h]hUnicodeEncodeError}hj sbah}(h]h]h]h]h!]uh%h:hjy ubh, as returned by }hjy sbh;)}(h``PyUnicode_AsEncodedString()``h]hPyUnicode_AsEncodedString()}hj sbah}(h]h]h]h]h!]uh%h:hjy ubhP. For the default encoding and errors values there should be no encoding errors.}hjy sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hNThis function is used in encoding file paths. Keyword arguments are supported.h]hNThis function is used in encoding file paths. Keyword arguments are supported.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(h6New in pygame 1.9.2: (primarily for use in unit tests)h]h)}(h6New in pygame 1.9.2: (primarily for use in unit tests)h](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hj sbah}(h]h](jj eh]h]h!]uh%hhj h&hh'h]h)Kubh!(primarily for use in unit tests)}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jh&hh'h]h)Khj ubh )}(h## pygame.encode_string ##h]h## pygame.encode_string ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jlj jmj jnj jojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB%encode_file_path() (in module pygame)pygame.encode_file_pathhNtauh%hdhh,h&hh'Nh)NubjG)}(hhh](jL)}(hencode_file_pathh](jR)}(hpygame.h]hpygame.}hj sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhj h&hh'h]h)Kubjd)}(hj h]hencode_file_path}hj! sbah}(h]h](jojpeh]h]h!]h#h$uh%jchj h&hh'h]h)Kubju)}(h()h]h}(h]h]h]h]h!]h#h$uh%jthj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jhjhjj jhj jencode_file_path()uh%jKh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`Encode a Unicode or bytes object as a file system path`h]h)}(hjH h]h6Encode a Unicode or bytes object as a file system path}hjJ sbah}(h]h]hah]h]h!]uh%hhjF ubah}(h]h]h]h]h!]uh%h)hKhjC h&hh'h]h)Kubhz)}(h8:sg:`encode_file_path([obj [, etype]]) -> bytes or None`h]h)}(hj_ h]h2encode_file_path([obj [, etype]]) -> bytes or None}hja sbah}(h]h]jah]h]h!]uh%hhj] ubah}(h]h]h]h]h!]uh%h)hKhjC h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj@ h&hh'h]h)Kubh)}(h|obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``.h](hNobj: If Unicode, encode; if bytes, return unaltered; if anything else, return }hjz sbh;)}(h``None``h]hNone}hj sbah}(h]h]h]h]h!]uh%h:hjz ubh; if not given, raise }hjz sbh;)}(h``SyntaxError``h]h SyntaxError}hj sbah}(h]h]h]h]h!]uh%h:hjz ubh.}hjz sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj@ h&hubh)}(hetype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``.h](hdetype (exception type): If given, the exception type to raise for an encoding error. The default is }hj sbh;)}(h``UnicodeEncodeError``h]hUnicodeEncodeError}hj sbah}(h]h]h]h]h!]uh%h:hj ubh, as returned by }hj sbh;)}(h``PyUnicode_AsEncodedString()``h]hPyUnicode_AsEncodedString()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj@ h&hubh)}(hThis function is used to encode file paths in pygame. Encoding is to the codec as returned by ``sys.getfilesystemencoding()``. Keyword arguments are supported.h](h^This function is used to encode file paths in pygame. Encoding is to the codec as returned by }hj sbh;)}(h``sys.getfilesystemencoding()``h]hsys.getfilesystemencoding()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh". Keyword arguments are supported.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj@ h&hubj)}(h6New in pygame 1.9.2: (primarily for use in unit tests)h]h)}(h6New in pygame 1.9.2: (primarily for use in unit tests)h](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hj sbah}(h]h](jj eh]h]h!]uh%hhj h&hh'h]h)Kubh!(primarily for use in unit tests)}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.2uh%jh&hh'h]h)Khj@ ubh )}(h## pygame.encode_file_path ##h]h## pygame.encode_file_path ##}hj' sbah}(h]h]h]h]h!]h#h$uh%h hj@ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jlj> jmj? jnj? jojpjqjrjsjtjuuh%jFh&hhh,h'Nh)Nubeh}(h](hspygameeh]h]pygameah]h!]uh%h*hhh&hh'h]h)Kubh+)}(hhh](h0)}(h:mod:`pygame.version`h]h6)}(hjP h]h;)}(hjP h]hpygame.version}hjU sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjR ubah}(h]h]h]h]h!]refdochS refdomainj_ reftypemod refexplicitrefwarnhYhhZNh[pygame.versionuh%h5h'h]h)KhjN ubah}(h]h]h]h]h!]uh%h/hjK h&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hqmodule; pygame.versionmodule-pygame.versionhNtauh%hdhjK h&hh'Nh)Nubhv)}(hhh]hz)}(h1:sl:`small module containing version information`h]h)}(hj h]h+small module containing version information}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Kubh)}(hThis module is automatically imported into the pygame package and can be used to check which version of pygame has been imported.h]hThis module is automatically imported into the pygame package and can be used to check which version of pygame has been imported.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjK h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](jBver (in module pygame.version)pygame.version.verhNtauh%hdhjK h&hh'Nh)NubjG)}(hhh](jL)}(hverh](jR)}(hpygame.version.h]hpygame.version.}hj sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhj h&hh'h]h)Kubjd)}(hj h]hver}hj sbah}(h]h](jojpeh]h]h!]h#h$uh%jchj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jpygame.versionjhjj jj j jj uh%jKh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`version number as a string`h]h)}(hj h]hversion number as a string}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`ver = '1.2'`h]h)}(hj h]h ver = '1.2'}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hlThis is the version represented as a string. It can contain a micro release number as well, e.g. ``'1.5.2'``h](haThis is the version represented as a string. It can contain a micro release number as well, e.g. }hj% sbh;)}(h ``'1.5.2'``h]h'1.5.2'}hj- sbah}(h]h]h]h]h!]uh%h:hj% ubeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.version.ver ##h]h## pygame.version.ver ##}hjA sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pydataeh]h]h!]jljX jmjY jnjY jojpjqjrjsjtjuuh%jFh&hhjK h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jB!vernum (in module pygame.version)pygame.version.vernumhNtauh%hdhjK h&hh'Nh)NubjG)}(hhh](jL)}(hvernumh](jR)}(hpygame.version.h]hpygame.version.}hjr sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjn h&hh'h]h)Kubjd)}(hjp h]hvernum}hj sbah}(h]h](jojpeh]h]h!]h#h$uh%jchjn h&hh'h]h)Kubeh}(h]ji ah](jjeh]h]h!]jj jhjjp jj jp jjp uh%jKh'h]h)Khjk h&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`tupled integers of the version`h]h)}(hj h]htupled integers of the version}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`vernum = (1, 5, 3)`h]h)}(hj h]hvernum = (1, 5, 3)}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hThis version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this:h]hThis version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this:}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh literal_block)}(hif pygame.version.vernum < (1, 5): print('Warning, older version of pygame (%s)' % pygame.version.ver) disable_advanced_features = Trueh]hif pygame.version.vernum < (1, 5): print('Warning, older version of pygame (%s)' % pygame.version.ver) disable_advanced_features = True}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h]h)Khj h&hubj)}(h8New in pygame 1.9.6: Attributes major, minor, and patch.h]h)}(h8New in pygame 1.9.6: Attributes major, minor, and patch.h](h)}(hNew in pygame 1.9.6: h]hNew in pygame 1.9.6: }hj sbah}(h]h](jj eh]h]h!]uh%hhj h&hh'h]h)Kubh Attributes }(hj h&hh'Nh)Nubh;)}(h ``major``h]hmajor}hjsbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, }(hj h&hh'Nh)Nubh;)}(h ``minor``h]hminor}hjsbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, and }(hj h&hh'Nh)Nubh;)}(h ``patch``h]hpatch}hj*sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.9.6uh%jh&hh'h]h)Khj ubj )}(hMvernum.major == vernum[0] vernum.minor == vernum[1] vernum.patch == vernum[2]h]hMvernum.major == vernum[0] vernum.minor == vernum[1] vernum.patch == vernum[2]}hjKsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)Khj h&hubj)}(hiChanged in pygame 1.9.6: str(pygame.version.vernum) returns a string like "2.0.0" instead of "(2, 0, 0)".h]h)}(hiChanged in pygame 1.9.6: str(pygame.version.vernum) returns a string like "2.0.0" instead of "(2, 0, 0)".h](h)}(hChanged in pygame 1.9.6: h]hChanged in pygame 1.9.6: }hjasbah}(h]h](jjeh]h]h!]uh%hhj]h&hh'h]h)Kubh;)}(h``str(pygame.version.vernum)``h]hstr(pygame.version.vernum)}hjosbah}(h]h]h]h]h!]uh%h:hj]h&hh'Nh)Nubh returns a string like }(hj]h&hh'Nh)Nubh;)}(h ``"2.0.0"``h]h"2.0.0"}hjsbah}(h]h]h]h]h!]uh%h:hj]h&hh'Nh)Nubh instead of }(hj]h&hh'Nh)Nubh;)}(h``"(2, 0, 0)"``h]h "(2, 0, 0)"}hjsbah}(h]h]h]h]h!]uh%h:hj]h&hh'Nh)Nubh.}(hj]h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjYh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj1.9.6uh%jh&hh'h]h)Khj ubj)}(hChanged in pygame 1.9.6: repr(pygame.version.vernum) returns a string like "PygameVersion(major=2, minor=0, patch=0)" instead of "(2, 0, 0)".h]h)}(hChanged in pygame 1.9.6: repr(pygame.version.vernum) returns a string like "PygameVersion(major=2, minor=0, patch=0)" instead of "(2, 0, 0)".h](h)}(hChanged in pygame 1.9.6: h]hChanged in pygame 1.9.6: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Kubh;)}(h``repr(pygame.version.vernum)``h]hrepr(pygame.version.vernum)}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh returns a string like }(hjh&hh'Nh)Nubh;)}(h.``"PygameVersion(major=2, minor=0, patch=0)"``h]h*"PygameVersion(major=2, minor=0, patch=0)"}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh instead of }(hjh&hh'Nh)Nubh;)}(h``"(2, 0, 0)"``h]h "(2, 0, 0)"}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj1.9.6uh%jh&hh'h]h)Khj ubh )}(h## pygame.version.vernum ##h]h## pygame.version.vernum ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjk h&hh'Nh)Nubeh}(h]h](pydataeh]h]h!]jlj&jmj'jnj'jojpjqjrjsjtjuuh%jFh&hhjK h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBrev (in module pygame.version)pygame.version.revhNtauh%hdhjK h&hh'Nh)NubjG)}(hhh](jL)}(hrevh](jR)}(hpygame.version.h]hpygame.version.}hj@sbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhj<h&hh'h]h)Kubjd)}(hj>h]hrev}hjNsbah}(h]h](jojpeh]h]h!]h#h$uh%jchj<h&hh'h]h)Kubeh}(h]j7ah](jjeh]h]h!]jj jhjj>jj j>jj>uh%jKh'h]h)Khj9h&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`repository revision of the build`h]h)}(hjjh]h repository revision of the build}hjlsbah}(h]h]hah]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)Kubhz)}(h:sg:`rev = 'a6f89747b551+'`h]h)}(hjh]hrev = 'a6f89747b551+'}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjeh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjbh&hh'h]h)Kubh)}(hXThe Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds.h]hXThe Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjbh&hubh)}(hImportant note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string ``""``. It has always been returning an empty string since ``v1.9.5``.h](hImportant note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string }hjsbh;)}(h``""``h]h""}hjsbah}(h]h]h]h]h!]uh%h:hjubh5. It has always been returning an empty string since }hjsbh;)}(h ``v1.9.5``h]hv1.9.5}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjbh&hubj)}(h;Changed in pygame 1.9.5: Always returns an empty string "".h]h)}(h;Changed in pygame 1.9.5: Always returns an empty string "".h](h)}(hChanged in pygame 1.9.5: h]hChanged in pygame 1.9.5: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)M ubhAlways returns an empty string }(hjh&hh'Nh)Nubh;)}(h``""``h]h""}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M ubah}(h]h]h]h]h!]jversionchangedj1.9.5uh%jh&hh'h]h)M hjbubh )}(h## pygame.version.rev ##h]h## pygame.version.rev ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjbh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj9h&hh'Nh)Nubeh}(h]h](pydataeh]h]h!]jlj.jmj/jnj/jojpjqjrjsjtjuuh%jFh&hhjK h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBSDL (in module pygame.version)pygame.version.SDLhNtauh%hdhjK h&hh'Nh)NubjG)}(hhh](jL)}(hSDLh](jR)}(hpygame.version.h]hpygame.version.}hjHsbah}(h]h](j^j_eh]h]h!]h#h$uh%jQhjDh&hh'h]h)Mubjd)}(hjFh]hSDL}hjVsbah}(h]h](jojpeh]h]h!]h#h$uh%jchjDh&hh'h]h)Mubeh}(h]j?ah](jjeh]h]h!]jj jhjjFjj jFjjFuh%jKh'h]h)MhjAh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`tupled integers of the SDL library version`h]h)}(hjrh]h*tupled integers of the SDL library version}hjtsbah}(h]h]hah]h]h!]uh%hhjpubah}(h]h]h]h]h!]uh%h)hKhjmh&hh'h]h)Mubhz)}(h:sg:`SDL = '(2, 0, 12)'`h]h)}(hjh]hSDL = '(2, 0, 12)'}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjmh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjjh&hh'h]h)Mubh)}(hThis is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this:h]hThis is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjjh&hubj )}(h>>> pygame.version.SDL.major 2h]h>>> pygame.version.SDL.major 2}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)Mhjjh&hubh)}(h4printing the whole thing returns a string like this:h]h4printing the whole thing returns a string like this:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjjh&hubj )}(h=>>> pygame.version.SDL SDLVersion(major=2, minor=0, patch=12)h]h=>>> pygame.version.SDL SDLVersion(major=2, minor=0, patch=12)}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)Mhjjh&hubj)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jj eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)M#ubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jh&hh'h]h)M"hjjubh )}(h## pygame.version.SDL ##h]h## pygame.version.SDL ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjjh&hh'h]h)M$ubeh}(h]h]h]h]h!]uh%jhjAh&hh'Nh)Nubeh}(h]h](pydataeh]h]h!]jljjmjjnjjojpjqjrjsjtjuuh%jFh&hhjK h'Nh)Nubh )}(h## pygame.version ##h]h## pygame.version ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjK h&hh'h]h)M'ubh )}(h ## pygame ##h]h ## pygame ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hjK h&hh'h]h)M)ubh target)}(h.. _environment-variables:h]h}(h]h]h]h]h!]refidenvironment-variablesuh%j9h)MBhjK h&hh'h]ubh)}(h!**Setting Environment Variables**h]h strong)}(hjIh]hSetting Environment Variables}hjMsbah}(h]h]h]h]h!]uh%jKhjGubah}(h]jFah]h]environment-variablesah]h!]uh%hh'h]h)M,hjK h&hexpect_referenced_by_name}j^j;sexpect_referenced_by_id}jFj;subh)}(hXSome aspects of pygame's behaviour can be controlled by setting environment variables, they cover a wide range of the library's functionality. Some of the variables are from pygame itself, while others come from the underlying C SDL library that pygame uses.h]hXSome aspects of pygame's behaviour can be controlled by setting environment variables, they cover a wide range of the library's functionality. Some of the variables are from pygame itself, while others come from the underlying C SDL library that pygame uses.}hjesbah}(h]h]h]h]h!]uh%hh'h]h)M.hjK h&hubh)}(hDIn python, environment variables are usually set in code like this::h]hCIn python, environment variables are usually set in code like this:}hjssbah}(h]h]h]h]h!]uh%hh'h]h)M2hjK h&hubj )}(hEimport os os.environ['NAME_OF_ENVIRONMENT_VARIABLE'] = 'value_to_set'h]hEimport os os.environ['NAME_OF_ENVIRONMENT_VARIABLE'] = 'value_to_set'}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)M4hjK h&hubh)}(h7Or to preserve users ability to override the variable::h]h6Or to preserve users ability to override the variable:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M7hjK h&hubj )}(hDimport os os.environ['ENV_VAR'] = os.environ.get('ENV_VAR', 'value')h]hDimport os os.environ['ENV_VAR'] = os.environ.get('ENV_VAR', 'value')}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)M9hjK h&hubh)}(hlIf the variable is more useful for users of an app to set than the developer then they can set it like this:h]hlIf the variable is more useful for users of an app to set than the developer then they can set it like this:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M<hjK h&hubh)}(h **Windows**::h](jL)}(h **Windows**h]hWindows}hjsbah}(h]h]h]h]h!]uh%jKhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M>hjK h&hubj )}(hFset NAME_OF_ENVIRONMENT_VARIABLE=value_to_set python my_application.pyh]hFset NAME_OF_ENVIRONMENT_VARIABLE=value_to_set python my_application.py}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)M@hjK h&hubh)}(h**Linux/Mac**::h](jL)}(h **Linux/Mac**h]h Linux/Mac}hjsbah}(h]h]h]h]h!]uh%jKhjubh:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MChjK h&hubj )}(h&ENV_VAR=value python my_application.pyh]h&ENV_VAR=value python my_application.py}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MEhjK h&hubh)}(hFor some variables they need to be set before initialising pygame, some must be set before even importing pygame, and others can simply be set right before the area of code they control is run.h]hFor some variables they need to be set before initialising pygame, some must be set before even importing pygame, and others can simply be set right before the area of code they control is run.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)MGhjK h&hubh)}(hiBelow is a list of environment variables, their settable values, and a brief description of what they do.h]hiBelow is a list of environment variables, their settable values, and a brief description of what they do.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MJhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj)h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)MLubh)}(h **Pygame Environment Variables**h]jL)}(hj=h]hPygame Environment Variables}hj?sbah}(h]h]h]h]h!]uh%jKhj;ubah}(h]h]h]h]h!]uh%hh'h]h)MNhjK h&hubh)}(h-These variables are defined by pygame itself.h]h-These variables are defined by pygame itself.}hjRsbah}(h]h]h]h]h!]uh%hh'h]h)MPhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj`h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)MRubj )}(hfPYGAME_DISPLAY - Experimental (subject to change) Set index of the display to use, "0" is the default.h]hfPYGAME_DISPLAY - Experimental (subject to change) Set index of the display to use, "0" is the default.}hjrsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MVhjK h&hubh)}(hThis sets the display where pygame will open its window or screen. The value set here will be used if set before calling :func:`pygame.display.set_mode()`, and as long as no 'display' parameter is passed into :func:`pygame.display.set_mode()`.h](hyThis sets the display where pygame will open its window or screen. The value set here will be used if set before calling }hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[pygame.display.set_modeuh%h5h'h]h)MYhjubh7, and as long as no 'display' parameter is passed into }hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[pygame.display.set_modeuh%h5h'h]h)MYhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MYhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)M^ubj )}(h1PYGAME_FORCE_SCALE - Set to "photo" or "default".h]h1PYGAME_FORCE_SCALE - Set to "photo" or "default".}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MbhjK h&hubh)}(hThis forces set_mode() to use the SCALED display mode and, if "photo" is set, makes the scaling use the slowest, but highest quality anisotropic scaling algorithm, if it is available. Must be set before calling :func:`pygame.display.set_mode()`.h](hThis forces set_mode() to use the SCALED display mode and, if "photo" is set, makes the scaling use the slowest, but highest quality anisotropic scaling algorithm, if it is available. Must be set before calling }hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYj hZNh[pygame.display.set_modeuh%h5h'h]h)Mehjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MehjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj(h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mjubj )}(hTPYGAME_BLEND_ALPHA_SDL2 - New in pygame 2.0.0 Set to "1" to enable the SDL2 blitter.h]hTPYGAME_BLEND_ALPHA_SDL2 - New in pygame 2.0.0 Set to "1" to enable the SDL2 blitter.}hj:sbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MnhjK h&hubh)}(hThis makes pygame use the SDL2 blitter for all alpha blending. The SDL2 blitter is sometimes faster than the default blitter but uses a different formula so the final colours may differ. Must be set before :func:`pygame.init()` is called.h](hThis makes pygame use the SDL2 blitter for all alpha blending. The SDL2 blitter is sometimes faster than the default blitter but uses a different formula so the final colours may differ. Must be set before }hjHsbh6)}(h:func:`pygame.init()`h]h;)}(hjRh]h pygame.init()}hjTsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjPubah}(h]h]h]h]h!]refdochS refdomainj^reftypefunc refexplicitrefwarnhYj hZNh[ pygame.inituh%h5h'h]h)MqhjHubh is called.}hjHsbeh}(h]h]h]h]h!]uh%hh'h]h)MqhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjzh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mwubj )}(h;PYGAME_HIDE_SUPPORT_PROMPT - Set to "1" to hide the prompt.h]h;PYGAME_HIDE_SUPPORT_PROMPT - Set to "1" to hide the prompt.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)M{hjK h&hubh)}(hThis stops the welcome message popping up in the console that tells you which version of python, pygame & SDL you are using. Must be set before importing pygame.h]hThis stops the welcome message popping up in the console that tells you which version of python, pygame & SDL you are using. Must be set before importing pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M~hjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(h'PYGAME_FREETYPE - Set to "1" to enable.h]h'PYGAME_FREETYPE - Set to "1" to enable.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hThis switches the pygame.font module to a pure freetype implementation that bypasses SDL_ttf. See the font module for why you might want to do this. Must be set before importing pygame.h]hThis switches the pygame.font module to a pure freetype implementation that bypasses SDL_ttf. See the font module for why you might want to do this. Must be set before importing pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(h/PYGAME_CAMERA - Set to "opencv" or "vidcapture"h]h/PYGAME_CAMERA - Set to "opencv" or "vidcapture"}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hForces the library backend used in the camera module, overriding the platform defaults. Must be set before calling :func:`pygame.camera.init()`.h](hsForces the library backend used in the camera module, overriding the platform defaults. Must be set before calling }hjsbh6)}(h:func:`pygame.camera.init()`h]h;)}(hjh]hpygame.camera.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYj hZNh[pygame.camera.inituh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubh)}(hIn pygame 2.0.3, backends can be set programmatically instead, and the old OpenCV backend has been replaced with one on top of "opencv-python," rather than the old "highgui" OpenCV port. Also, there is a new native Windows backend available.h]hIn pygame 2.0.3, backends can be set programmatically instead, and the old OpenCV backend has been replaced with one on top of "opencv-python," rather than the old "highgui" OpenCV port. Also, there is a new native Windows backend available.}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh](hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj6h&hh'h]h)KhKubhz)}(hhh]h}(h]h]h]h]h!]uh%h)hj6h&hh'h]h)KhKubeh}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubh)}(h**SDL Environment Variables**h]jL)}(hjSh]hSDL Environment Variables}hjUsbah}(h]h]h]h]h!]uh%jKhjQubah}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubh)}(h#These variables are defined by SDL.h]h#These variables are defined by SDL.}hjhsbah}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubh)}(hFor documentation on the environment variables available in pygame 1 try `here `__. For Pygame 2, some selected environment variables are listed below.h](hIFor documentation on the environment variables available in pygame 1 try }hjvsbh reference)}(hN`here `__h]hhere}(hjhhereubah}(h]h]h]h]h!]namejrefuriChttps://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlenvvars.htmluh%j~hjvubhE. For Pygame 2, some selected environment variables are listed below.}hjvsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(h?SDL_VIDEO_CENTERED - Set to "1" to enable centering the window.h]h?SDL_VIDEO_CENTERED - Set to "1" to enable centering the window.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hThis will make the pygame window open in the centre of the display. Must be set before calling :func:`pygame.display.set_mode()`.h](h_This will make the pygame window open in the centre of the display. Must be set before calling -}hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[pygame.display.set_modeuh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(hRSDL_VIDEO_WINDOW_POS - Set to "x,y" to position the top left corner of the window.h]hRSDL_VIDEO_WINDOW_POS - Set to "x,y" to position the top left corner of the window.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hThis allows control over the placement of the pygame window within the display. Must be set before calling :func:`pygame.display.set_mode()`.h](hkThis allows control over the placement of the pygame window within the display. Must be set before calling }hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj$reftypefunc refexplicitrefwarnhYj hZNh[pygame.display.set_modeuh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hj@h&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(hFSDL_VIDEODRIVER - Set to "drivername" to change the video driver used.h]hFSDL_VIDEODRIVER - Set to "drivername" to change the video driver used.}hjRsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hX On some platforms there are multiple video drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.display.init()`.h](hOn some platforms there are multiple video drivers available and this allows users to pick between them. More information is available }hj`sbj)}(h.`here `__h]hhere}(hjhhhereubah}(h]h]h]h]h!]namejpj#https://wiki.libsdl.org/FAQUsingSDLuh%j~hj`ubh. Must be set before calling }hj`sbh6)}(h:func:`pygame.init()`h]h;)}(hjh]h pygame.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj}ubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[ pygame.inituh%h5h'h]h)Mhj`ubh or }hj`sbh6)}(h:func:`pygame.display.init()`h]h;)}(hjh]hpygame.display.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[pygame.display.inituh%h5h'h]h)Mhj`ubh.}hj`sbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(hFSDL_AUDIODRIVER - Set to "drivername" to change the audio driver used.h]hFSDL_AUDIODRIVER - Set to "drivername" to change the audio driver used.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hXOn some platforms there are multiple audio drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.mixer.init()`.h](hOn some platforms there are multiple audio drivers available and this allows users to pick between them. More information is available }hjsbj)}(h.`here `__h]hhere}(hjhhereubah}(h]h]h]h]h!]namejj#https://wiki.libsdl.org/FAQUsingSDLuh%j~hjubh. Must be set before calling }hjsbh6)}(h:func:`pygame.init()`h]h;)}(hj h]h pygame.init()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[ pygame.inituh%h5h'h]h)Mhjubh or }hjsbh6)}(h:func:`pygame.mixer.init()`h]h;)}(hj.h]hpygame.mixer.init()}hj0sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj:reftypefunc refexplicitrefwarnhYj hZNh[pygame.mixer.inituh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjVh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(h[SDL_VIDEO_ALLOW_SCREENSAVER Set to "1" to allow screensavers while pygame apps are running.h]h[SDL_VIDEO_ALLOW_SCREENSAVER Set to "1" to allow screensavers while pygame apps are running.}hjhsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hBy default pygame apps disable screensavers while they are running. Setting this environment variable allows users or developers to change that and make screensavers run again.h]hBy default pygame apps disable screensavers while they are running. Setting this environment variable allows users or developers to change that and make screensavers run again.}hjvsbah}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(hNSDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR Set to "0" to re-enable the compositor.h]hNSDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR Set to "0" to re-enable the compositor.}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hXMBy default SDL tries to disable the X11 compositor for all pygame apps. This is usually a good thing as it's faster, however if you have an app which *doesn't* update every frame and are using linux you may want to disable this bypass. The bypass has reported problems on KDE linux. This variable is only used on x11/linux platforms.h](hBy default SDL tries to disable the X11 compositor for all pygame apps. This is usually a good thing as it's faster, however if you have an app which }hjsbj)}(h *doesn't*h]hdoesn't}hjsbah}(h]h]h]h]h!]uh%jhjubh update every frame and are using linux you may want to disable this bypass. The bypass has reported problems on KDE linux. This variable is only used on x11/linux platforms.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubhv)}(hhh]hz)}(hhh]h}(h]h]h]h]h!]uh%h)hjh&hh'h]h)KhKubah}(h]h]h]h]h!]uh%huhjK h&hh'h]h)Mubj )}(huSDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS Set to "1" to allow joysticks to be updated even when the window is out of focush]huSDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS Set to "1" to allow joysticks to be updated even when the window is out of focus}hjsbah}(h]h]h]h]h!]h#h$uh%j h'h]h)MhjK h&hubh)}(hXBy default, when the window is not in focus, input devices do not get updated. However, using this environment variable it is possible to get joystick updates even when the window is in the background. Must be set before calling :func:`pygame.init()` or :func:`pygame.joystick.init()`.h](hBy default, when the window is not in focus, input devices do not get updated. However, using this environment variable it is possible to get joystick updates even when the window is in the background. Must be set before calling }hjsbh6)}(h:func:`pygame.init()`h]h;)}(hjh]h pygame.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[ pygame.inituh%h5h'h]h)Mhjubh or }hjsbh6)}(h:func:`pygame.joystick.init()`h]h;)}(hjh]hpygame.joystick.init()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj hZNh[pygame.joystick.inituh%h5h'h]h)Mhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MhjK h&hubeh}(h](j pygame-versioneh]h]pygame.versionah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjlerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}jF]j;asnameids}(jH jE j?j<j^jFu nametypes}(jH j?j^uh}(jE h,hsj:)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j9h'h]h)Khh,h&hubjDjMjjjfjkjHjMj#j(jjjjjjjjj j j j j<jK j j:)}(hhh]h}(h]j ah]h]h]h!]ismoduh%j9h'h]h)KhjK h&hubj j ji jn j7j<j?jDjFjGu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]h system_message)}(hhh]h)}(hhh]h;Hyperlink target "environment-variables" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypeINFOsourceh]lineMBuh%juba transformerN include_log]docs/reST/ref/pygame.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.2961407 pygame-2.6.1/docs/generated/doctrees/ref/rect.doctree0000644000175100001770000027202514676242420022204 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.Rect`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.Rect}hh Rect`h]h)}(hhh]h&Rect(left, top, width, height) -> Rect}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h0:sg:`Rect((left, top), (width, height)) -> Rect`h]h)}(hhh]h*Rect((left, top), (width, height)) -> Rect}hhsbah}(h]h]hah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h:sg:`Rect(object) -> Rect`h]h)}(hj h]hRect(object) -> Rect}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hPygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. Rects can also be created from Python objects that are already a Rect or have an attribute named "rect".h]hPygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. Rects can also be created from Python objects that are already a Rect or have an attribute named "rect".}hj&sbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hAny Pygame function that requires a Rect argument also accepts any of these values to construct a Rect. This makes it easier to create Rects on the fly as arguments for functions.h]hAny Pygame function that requires a Rect argument also accepts any of these values to construct a Rect. This makes it easier to create Rects on the fly as arguments for functions.}hj4sbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hX7The Rect functions that change the position or size of a Rect return a new copy of the Rect with the affected changes. The original Rect is not modified. Some methods have an alternate "in-place" version that returns None but affects the original Rect. These "in-place" methods are denoted with the "ip" suffix.h]hX7The Rect functions that change the position or size of a Rect return a new copy of the Rect with the affected changes. The original Rect is not modified. Some methods have an alternate "in-place" version that returns None but affects the original Rect. These "in-place" methods are denoted with the "ip" suffix.}hjBsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(h\The Rect object has several virtual attributes which can be used to move and align the Rect:h]h\The Rect object has several virtual attributes which can be used to move and align the Rect:}hjPsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubh literal_block)}(hx,y top, left, bottom, right topleft, bottomleft, topright, bottomright midtop, midleft, midbottom, midright center, centerx, centery size, width, height w,hh]hx,y top, left, bottom, right topleft, bottomleft, topright, bottomright midtop, midleft, midbottom, midright center, centerx, centery size, width, height w,h}hj`sbah}(h]h]h]h]h!]h#h$uh%j^h'h]h)K#hhh&hubj%)}(h+All of these attributes can be assigned to:h]h+All of these attributes can be assigned to:}hjnsbah}(h]h]h]h]h!]uh%j$h'h]h)K+hhh&hubj_)}(h'rect1.right = 10 rect2.center = (20,30)h]h'rect1.right = 10 rect2.center = (20,30)}hj|sbah}(h]h]h]h]h!]h#h$uh%j^h'h]h)K/hhh&hubj%)}(hAssigning to size, width or height changes the dimensions of the rectangle; all other assignments move the rectangle without resizing it. Notice that some attributes are integers and others are pairs of integers.h]hAssigning to size, width or height changes the dimensions of the rectangle; all other assignments move the rectangle without resizing it. Notice that some attributes are integers and others are pairs of integers.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)K2hhh&hubj%)}(hX#If a Rect has a nonzero width or height, it will return ``True`` for a nonzero test. Some methods return a Rect with 0 size to represent an invalid rectangle. A Rect with a 0 size will not collide when using collision detection methods (e.g. :meth:`collidepoint`, :meth:`colliderect`, etc.).h](h8If a Rect has a nonzero width or height, it will return }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh for a nonzero test. Some methods return a Rect with 0 size to represent an invalid rectangle. A Rect with a 0 size will not collide when using collision detection methods (e.g. }hjsbh6)}(h:meth:`collidepoint`h]h;)}(hjh]hcollidepoint()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ collidepointuh%h5h'h]h)K6hjubh, }hjsbh6)}(h:meth:`colliderect`h]h;)}(hjh]h colliderect()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ colliderectuh%h5h'h]h)K6hjubh, etc.).}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)K6hhh&hubj%)}(hThe coordinates for Rect objects are all integers. The size values can be programmed to have negative values, but these are considered illegal Rects for most operations.h]hThe coordinates for Rect objects are all integers. The size values can be programmed to have negative values, but these are considered illegal Rects for most operations.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)K;hhh&hubj%)}(hThere are several collision tests between other rectangles. Most python containers can be searched for collisions against a single Rect.h]hThere are several collision tests between other rectangles. Most python containers can be searched for collisions against a single Rect.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)K?hhh&hubj%)}(hXThe area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and ``rect1.colliderect(rect2)`` returns false.h](hThe area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and }hjsbh;)}(h``rect1.colliderect(rect2)``h]hrect1.colliderect(rect2)}hj$sbah}(h]h]h]h]h!]uh%h:hjubh returns false.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)KBhhh&hubj%)}(h!The Rect object is also iterable:h]h!The Rect object is also iterable:}hj<sbah}(h]h]h]h]h!]uh%j$h'h]h)KGhhh&hubj_)}(h#r = Rect(0, 1, 2, 3) x, y, w, h = rh]h#r = Rect(0, 1, 2, 3) x, y, w, h = r}hjJsbah}(h]h]h]h]h!]h#h$uh%j^h'h]h)KKhhh&hubhversionmodified)}(hXKNew in pygame 1.9.2: The Rect class can be subclassed. Methods such as copy() and move() will recognize this and return instances of the subclass. However, the subclass's __init__() method is not called, and __new__() is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied.h]j%)}(hXKNew in pygame 1.9.2: The Rect class can be subclassed. Methods such as copy() and move() will recognize this and return instances of the subclass. However, the subclass's __init__() method is not called, and __new__() is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied.h](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hjbsbah}(h]h](jXaddedeh]h]h!]uh%hhj^h&hh'h]h)KTubh2The Rect class can be subclassed. Methods such as }(hj^h&hh'Nh)Nubh;)}(h ``copy()``h]hcopy()}hjusbah}(h]h]h]h]h!]uh%h:hj^h&hh'Nh)Nubh and }(hj^h&hh'Nh)Nubh;)}(h ``move()``h]hmove()}hjsbah}(h]h]h]h]h!]uh%h:hj^h&hh'Nh)NubhS will recognize this and return instances of the subclass. However, the subclass's }(hj^h&hh'Nh)Nubh;)}(h``__init__()``h]h __init__()}hjsbah}(h]h]h]h]h!]uh%h:hj^h&hh'Nh)Nubh method is not called, and }(hj^h&hh'Nh)Nubh;)}(h ``__new__()``h]h __new__()}hjsbah}(h]h]h]h]h!]uh%h:hj^h&hh'Nh)Nubhr is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied.}(hj^h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjZh&hh'h]h)KTubah}(h]h]h]h]h!]type versionaddedversion1.9.2uh%jXh&hh'h]h)KNhhubhe)}(hhh]h}(h]h]h]h]h!]entries](hqcopy() (pygame.Rect method)pygame.Rect.copyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcopyh](h)}(hjh]hcopy}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)KUubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KUubeh}(h]jah](hheh]h]h!]hhhh~h Rect.copyhhRectcopyh Rect.copy()uh%hzh'h]h)KUhjh&hubh)}(hhh](h)}(hhh](h)}(h:sl:`copy the rectangle`h]h)}(hjh]hcopy the rectangle}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)KWubh)}(h:sg:`copy() -> Rect`h]h)}(hj&h]hcopy() -> Rect}hj(sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)KXubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KWubj%)}(hJReturns a new rectangle having the same position and size as the original.h]hJReturns a new rectangle having the same position and size as the original.}hjAsbah}(h]h]h]h]h!]uh%j$h'h]h)KZhjh&hubj%)}(hNew in pygame 1.9h]hNew in pygame 1.9}hjOsbah}(h]h]h]h]h!]uh%j$h'h]h)K\hjh&hubh )}(h## Rect.copy ##h]h## Rect.copy ##}hj]sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]domainjtobjtypejudesctypejuno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqmove() (pygame.Rect method)pygame.Rect.movehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hmoveh](h)}(hjh]hmove}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K`ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K`ubeh}(h]jah](hheh]h]h!]hhhh~h Rect.movehhRectmoveh Rect.move()uh%hzh'h]h)K`hjh&hubh)}(hhh](h)}(hhh](h)}(h:sl:`moves the rectangle`h]h)}(hjh]hmoves the rectangle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kbubh)}(h:sg:`move(x, y) -> Rect`h]h)}(hjh]hmove(x, y) -> Rect}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kbubj%)}(hReturns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative.h]hReturns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Kehjh&hubh )}(h## Rect.move ##h]h## Rect.move ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Khubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqmove_ip() (pygame.Rect method)pygame.Rect.move_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hmove_iph](h)}(hj1h]hmove_ip}hj3sbah}(h]h](hheh]h]h!]h#h$uh%hhj/h&hh'h]h)Kjubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj/h&hh'h]h)Kjubeh}(h]j*ah](hheh]h]h!]hhhh~h Rect.move_iphhRectmove_iphRect.move_ip()uh%hzh'h]h)Kjhj,h&hubh)}(hhh](h)}(hhh](h)}(h#:sl:`moves the rectangle, in place`h]h)}(hj]h]hmoves the rectangle, in place}hj_sbah}(h]h]hah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhjXh&hh'h]h)Klubh)}(h:sg:`move_ip(x, y) -> None`h]h)}(hjth]hmove_ip(x, y) -> None}hjvsbah}(h]h]hah]h]h!]uh%hhjrubah}(h]h]h]h]h!]uh%h)hKhjXh&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%hhjUh&hh'h]h)Klubj%)}(h:Same as the ``Rect.move()`` method, but operates in place.h](h Same as the }hjsbh;)}(h``Rect.move()``h]h Rect.move()}hjsbah}(h]h]h]h]h!]uh%h:hjubh method, but operates in place.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)KohjUh&hubh )}(h## Rect.move_ip ##h]h## Rect.move_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjUh&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%hhj,h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqinflate() (pygame.Rect method)pygame.Rect.inflatehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hinflateh](h)}(hjh]hinflate}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Ksubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Ksubeh}(h]jah](hheh]h]h!]hhhh~h Rect.inflatehhRectinflatehRect.inflate()uh%hzh'h]h)Kshjh&hubh)}(hhh](h)}(hhh](h)}(h':sl:`grow or shrink the rectangle size`h]h)}(hj h]h!grow or shrink the rectangle size}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kuubh)}(h:sg:`inflate(x, y) -> Rect`h]h)}(hj!h]hinflate(x, y) -> Rect}hj#sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kvubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kuubj%)}(hReturns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off.h]hReturns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off.}hj<sbah}(h]h]h]h]h!]uh%j$h'h]h)Kxhjh&hubh )}(h## Rect.inflate ##h]h## Rect.inflate ##}hjJsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K}ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjajzjbj{jbj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!inflate_ip() (pygame.Rect method)pygame.Rect.inflate_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h inflate_iph](h)}(hjyh]h inflate_ip}hj{sbah}(h]h](hheh]h]h!]h#h$uh%hhjwh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjwh&hh'h]h)Kubeh}(h]jrah](hheh]h]h!]hhhh~hRect.inflate_iphhRect inflate_iphRect.inflate_ip()uh%hzh'h]h)Khjth&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`grow or shrink the rectangle size, in place`h]h)}(hjh]h+grow or shrink the rectangle size, in place}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`inflate_ip(x, y) -> None`h]h)}(hjh]hinflate_ip(x, y) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(h=Same as the ``Rect.inflate()`` method, but operates in place.h](h Same as the }hjsbh;)}(h``Rect.inflate()``h]hRect.inflate()}hjsbah}(h]h]h]h]h!]uh%h:hjubh method, but operates in place.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Rect.inflate_ip ##h]h## Rect.inflate_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjth&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqscale_by() (pygame.Rect method)pygame.Rect.scale_byhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hscale_byh](h)}(hj&h]hscale_by}hj(sbah}(h]h](hheh]h]h!]h#h$uh%hhj$h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj$h&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~h Rect.scale_byhhRectscale_byhRect.scale_by()uh%hzh'h]h)Khj!h&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`scale the rectangle by given a multiplier`h]h)}(hjRh]h)scale the rectangle by given a multiplier}hjTsbah}(h]h]hah]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kubh)}(h:sg:`scale_by(scalar) -> Rect`h]h)}(hjih]hscale_by(scalar) -> Rect}hjksbah}(h]h]hah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kubh)}(h&:sg:`scale_by(scalex, scaley) -> Rect`h]h)}(hjh]h scale_by(scalex, scaley) -> Rect}hjsbah}(h]h]hah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjMh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjJh&hh'h]h)Kubj%)}(hXIReturns a new rectangle with the size scaled by the given multipliers. The rectangle remains centered around its current center. A single scalar or separate width and height scalars are allowed. Values above one will increase the size of the rectangle, whereas values between zero and one will decrease the size of the rectangle.h]hXIReturns a new rectangle with the size scaled by the given multipliers. The rectangle remains centered around its current center. A single scalar or separate width and height scalars are allowed. Values above one will increase the size of the rectangle, whereas values between zero and one will decrease the size of the rectangle.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)KhjJh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXchangedeh]h]h!]uh%hhjh&hh'h]h)Kubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)KhjJubh )}(h## Rect.scale_by ##h]h## Rect.scale_by ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjJh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"scale_by_ip() (pygame.Rect method)pygame.Rect.scale_by_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h scale_by_iph](h)}(hjh]h scale_by_ip}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hRect.scale_by_iphhRect scale_by_iphRect.scale_by_ip()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`grow or shrink the rectangle size, in place`h]h)}(hj.h]h+grow or shrink the rectangle size, in place}hj0sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Kubh)}(h!:sg:`scale_by_ip(scalar) -> None`h]h)}(hjEh]hscale_by_ip(scalar) -> None}hjGsbah}(h]h]hah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Kubh)}(h):sg:`scale_by_ip(scalex, scaley) -> None`h]h)}(hj\h]h#scale_by_ip(scalex, scaley) -> None}hj^sbah}(h]h]hah]h]h!]uh%hhjZubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj&h&hh'h]h)Kubj%)}(h>Same as the ``Rect.scale_by()`` method, but operates in place.h](h Same as the }hjwsbh;)}(h``Rect.scale_by()``h]hRect.scale_by()}hjsbah}(h]h]h]h]h!]uh%h:hjwubh method, but operates in place.}hjwsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj&h&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)Kubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)Khj&ubh )}(h## Rect.scale_by_ip ##h]h## Rect.scale_by_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqupdate() (pygame.Rect method)pygame.Rect.updatehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hupdateh](h)}(hjh]hupdate}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~h Rect.updatehhRectupdateh Rect.update()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`sets the position and size of the rectangle`h]h)}(hjh]h+sets the position and size of the rectangle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h.:sg:`update(left, top, width, height) -> None`h]h)}(hj2h]h(update(left, top, width, height) -> None}hj4sbah}(h]h]hah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h2:sg:`update((left, top), (width, height)) -> None`h]h)}(hjIh]h,update((left, top), (width, height)) -> None}hjKsbah}(h]h]hah]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`update(object) -> None`h]h)}(hj`h]hupdate(object) -> None}hjbsbah}(h]h]hah]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hSets the position and size of the rectangle, in place. See parameters for :meth:`pygame.Rect` for the parameters of this function.h](hJSets the position and size of the rectangle, in place. See parameters for }hj{sbh6)}(h:meth:`pygame.Rect`h]h;)}(hjh]h pygame.Rect()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ pygame.Rectuh%h5h'h]h)Khj{ubh% for the parameters of this function.}hj{sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubjY)}(hNew in pygame 2.0.1.h]j%)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj2.0.1uh%jXh&hh'h]h)Khjubh )}(h## Rect.update ##h]h## Rect.update ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqclamp() (pygame.Rect method)pygame.Rect.clamphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hclamph](h)}(hj h]hclamp}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~h Rect.clamphhRectclamph Rect.clamp()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h(:sl:`moves the rectangle inside another`h]h)}(hj- h]h"moves the rectangle inside another}hj/ sbah}(h]h]hah]h]h!]uh%hhj+ ubah}(h]h]h]h]h!]uh%h)hKhj( h&hh'h]h)Kubh)}(h:sg:`clamp(Rect) -> Rect`h]h)}(hjD h]hclamp(Rect) -> Rect}hjF sbah}(h]h]hah]h]h!]uh%hhjB ubah}(h]h]h]h]h!]uh%h)hKhj( h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj% h&hh'h]h)Kubj%)}(hReturns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed.h]hReturns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed.}hj_ sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj% h&hubh )}(h## Rect.clamp ##h]h## Rect.clamp ##}hjm sbah}(h]h]h]h]h!]h#h$uh%h hj% h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyj jzj j{j j|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqclamp_ip() (pygame.Rect method)pygame.Rect.clamp_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hclamp_iph](h)}(hj h]hclamp_ip}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~h Rect.clamp_iphhRectclamp_iphRect.clamp_ip()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h2:sl:`moves the rectangle inside another, in place`h]h)}(hj h]h,moves the rectangle inside another, in place}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h:sg:`clamp_ip(Rect) -> None`h]h)}(hj h]hclamp_ip(Rect) -> None}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubj%)}(h;Same as the ``Rect.clamp()`` method, but operates in place.h](h Same as the }hj sbh;)}(h``Rect.clamp()``h]h Rect.clamp()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh method, but operates in place.}hj sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj h&hubh )}(h## Rect.clamp_ip ##h]h## Rect.clamp_ip ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyj1 jzj2 j{j2 j|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqclip() (pygame.Rect method)pygame.Rect.cliphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcliph](h)}(hjI h]hclip}hjK sbah}(h]h](hheh]h]h!]h#h$uh%hhjG h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjG h&hh'h]h)Kubeh}(h]jB ah](hheh]h]h!]hhhh~h Rect.cliphhRectcliph Rect.clip()uh%hzh'h]h)KhjD h&hubh)}(hhh](h)}(hhh](h)}(h&:sl:`crops a rectangle inside another`h]h)}(hju h]h crops a rectangle inside another}hjw sbah}(h]h]hah]h]h!]uh%hhjs ubah}(h]h]h]h]h!]uh%h)hKhjp h&hh'h]h)Kubh)}(h:sg:`clip(Rect) -> Rect`h]h)}(hj h]hclip(Rect) -> Rect}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjp h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjm h&hh'h]h)Kubj%)}(hReturns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned.h]hReturns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khjm h&hubh )}(h## Rect.clip ##h]h## Rect.clip ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjm h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjD h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyj jzj j{j j|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqclipline() (pygame.Rect method)pygame.Rect.cliplinehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcliplineh](h)}(hj h]hclipline}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~h Rect.cliplinehhRectcliplinehRect.clipline()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h%:sl:`crops a line inside a rectangle`h]h)}(hj h]hcrops a line inside a rectangle}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h::sg:`clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))`h]h)}(hj' h]h4clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))}hj) sbah}(h]h]hah]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h$:sg:`clipline(x1, y1, x2, y2) -> ()`h]h)}(hj> h]hclipline(x1, y1, x2, y2) -> ()}hj@ sbah}(h]h]hah]h]h!]uh%hhj< ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h>:sg:`clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))`h]h)}(hjU h]h8clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))}hjW sbah}(h]h]hah]h]h!]uh%hhjS ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h(:sg:`clipline((x1, y1), (x2, y2)) -> ()`h]h)}(hjl h]h"clipline((x1, y1), (x2, y2)) -> ()}hjn sbah}(h]h]hah]h]h!]uh%hhjj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h<:sg:`clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))`h]h)}(hj h]h6clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h&:sg:`clipline((x1, y1, x2, y2)) -> ()`h]h)}(hj h]h clipline((x1, y1, x2, y2)) -> ()}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h@:sg:`clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))`h]h)}(hj h]h:clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h*:sg:`clipline(((x1, y1), (x2, y2))) -> ()`h]h)}(hj h]h$clipline(((x1, y1), (x2, y2))) -> ()}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubj%)}(hReturns the coordinates of a line that is cropped to be completely inside the rectangle. If the line does not overlap the rectangle, then an empty tuple is returned.h]hReturns the coordinates of a line that is cropped to be completely inside the rectangle. If the line does not overlap the rectangle, then an empty tuple is returned.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj h&hubj%)}(hwThe line to crop can be any of the following formats (floats can be used in place of ints, but they will be truncated):h]hwThe line to crop can be any of the following formats (floats can be used in place of ints, but they will be truncated):}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj h&hubh block_quote)}(h- four ints - 2 lists/tuples/Vector2s of 2 ints - a list/tuple of four ints - a list/tuple of 2 lists/tuples/Vector2s of 2 ints h]h bullet_list)}(hhh](h list_item)}(h four intsh]j%)}(hj h]h four ints}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h!2 lists/tuples/Vector2s of 2 intsh]j%)}(hj% h]h!2 lists/tuples/Vector2s of 2 ints}hj' sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj# ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(ha list/tuple of four intsh]j%)}(hj< h]ha list/tuple of four ints}hj> sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj: ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubj )}(h2a list/tuple of 2 lists/tuples/Vector2s of 2 ints h]j%)}(h1a list/tuple of 2 lists/tuples/Vector2s of 2 intsh]h1a list/tuple of 2 lists/tuples/Vector2s of 2 ints}hjU sbah}(h]h]h]h]h!]uh%j$h'h]h)KhjQ ubah}(h]h]h]h]h!]uh%j h'h]h)Khj ubeh}(h]h]h]h]h!]bullet-uh%j h'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(hReturnsh]hReturns}hj sbah}(h]h]h]h]h!]uh%j hj~ h'h]h)Kubh field_body)}(hhh]j%)}(ha tuple with the coordinates of the given line cropped to be completely inside the rectangle is returned, if the given line does not overlap the rectangle, an empty tuple is returnedh]ha tuple with the coordinates of the given line cropped to be completely inside the rectangle is returned, if the given line does not overlap the rectangle, an empty tuple is returned}(hj h&hh'Nh)Nubah}(h]h]h]h]h!]uh%j$hj ubah}(h]h]h]h]h!]uh%j hj~ ubeh}(h]h]h]h]h!]uh%j| hjy ubj} )}(hhh](j )}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%j hj h'h]h)Kubj )}(hhh]j%)}(h-tuple(tuple(int, int), tuple(int, int)) or ()h](h6)}(hhh]htuple}hj sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypeh reftargettuple refspecific py:modulehpy:classh~uh%h5hj ubh(}hj sbh6)}(hhh]htuple}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargettuplej j hj h~uh%h5hj ubh(}hj sbh6)}(hhh]hint}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetintj j hj h~uh%h5hj ubh, }hj sbh6)}(hhh]hint}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetintj j hj h~uh%h5hj ubh)}hj sbh, }hj sbh6)}(hhh]htuple}hj( sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargettuplej j hj h~uh%h5hj ubh(}hj sbh6)}(hhh]hint}hj> sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetintj j hj h~uh%h5hj ubh, }hj sbh6)}(hhh]hint}hjT sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetintj j hj h~uh%h5hj ubh)}hj sbh) or }hj sbh(}hj sbh)}hj sbeh}(h]h]h]h]h!]uh%j$hj ubah}(h]h]h]h]h!]uh%j hj ubeh}(h]h]h]h]h!]uh%j| hjy ubj} )}(hhh](j )}(hRaisesh]hRaises}hj sbah}(h]h]h]h]h!]uh%j hj h'h]h)Kubj )}(hhh]j%)}(h]TypeError -- if the line coordinates are not given as one of the above described line formatsh](h6)}(hhh]hliteral_strong)}(h TypeErrorh]h TypeError}hj sbah}(h]h]h]h]h!]uh%j hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeexc reftargetj j j hj h~uh%h5hj ubh -- }hj sbhPif the line coordinates are not given as one of the above described line formats}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hj ubah}(h]h]h]h]h!]uh%j hj ubeh}(h]h]h]h]h!]uh%j| hjy ubeh}(h]h]h]h]h!]uh%jw hj h&hh'Nh)Nubh note)}(hbThis method can be used for collision detection between a rect and a line. See example code below.h]j%)}(hbThis method can be used for collision detection between a rect and a line. See example code below.h]hbThis method can be used for collision detection between a rect and a line. See example code below.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubj )}(h|The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border.h]j%)}(h|The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border.h](hThe }hj sbh;)}(h``rect.bottom``h]h rect.bottom}hjsbah}(h]h]h]h]h!]uh%h:hj ubh and }hj sbh;)}(h``rect.right``h]h rect.right}hjsbah}(h]h]h]h]h!]uh%h:hj ubh attributes of a }hj sbh6)}(h:mod:`pygame.Rect`h]h;)}(hj*h]h pygame.Rect}hj,sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj(ubah}(h]h]h]h]h!]refdochS refdomainj6reftypemod refexplicitrefwarnhYhhZh~h[ pygame.Rectuh%h5h'h]h)Khj ubh3 always lie one pixel outside of its actual border.}hj sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj ubah}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubj_)}(hX|# Example using clipline(). clipped_line = rect.clipline(line) if clipped_line: # If clipped_line is not an empty tuple then the line # collides/overlaps with the rect. The returned value contains # the endpoints of the clipped line. start, end = clipped_line x1, y1 = start x2, y2 = end else: print("No clipping. The line is fully outside the rect.")h]hX|# Example using clipline(). clipped_line = rect.clipline(line) if clipped_line: # If clipped_line is not an empty tuple then the line # collides/overlaps with the rect. The returned value contains # the endpoints of the clipped line. start, end = clipped_line x1, y1 = start x2, y2 = end else: print("No clipping. The line is fully outside the rect.")}hjXsbah}(h]h]h]h]h!]h#h$uh%j^h'h]h)Khj h&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjnsbah}(h]h](jXjeh]h]h!]uh%hhjjh&hh'h]h)M ubh$Added support for keyword arguments.}(hjjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjfh&hh'h]h)M ubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)Mhj ubjY)}(hNew in pygame 2.0.0.h]j%)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)M ubah}(h]h]h]h]h!]j versionaddedj2.0.0uh%jXh&hh'h]h)M hj ubh )}(h## Rect.clipline ##h]h## Rect.clipline ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](j methodeh]h]h!]jyj jzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqunion() (pygame.Rect method)pygame.Rect.unionhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hunionh](h)}(hjh]hunion}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~h Rect.unionhhRectunionh Rect.union()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h#:sl:`joins two rectangles into one`h]h)}(hjh]hjoins two rectangles into one}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubh)}(h:sg:`union(Rect) -> Rect`h]h)}(hj%h]hunion(Rect) -> Rect}hj'sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj%)}(hReturns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals.h]hReturns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals.}hj@sbah}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubh )}(h## Rect.union ##h]h## Rect.union ##}hjNsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjejzjfj{jfj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqunion_ip() (pygame.Rect method)pygame.Rect.union_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hunion_iph](h)}(hj}h]hunion_ip}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj{h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj{h&hh'h]h)Mubeh}(h]jvah](hheh]h]h!]hhhh~h Rect.union_iphhRectunion_iphRect.union_ip()uh%hzh'h]h)Mhjxh&hubh)}(hhh](h)}(hhh](h)}(h-:sl:`joins two rectangles into one, in place`h]h)}(hjh]h'joins two rectangles into one, in place}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`union_ip(Rect) -> None`h]h)}(hjh]hunion_ip(Rect) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj%)}(h;Same as the ``Rect.union()`` method, but operates in place.h](h Same as the }hjsbh;)}(h``Rect.union()``h]h Rect.union()}hjsbah}(h]h]h]h]h!]uh%h:hjubh method, but operates in place.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubh )}(h## Rect.union_ip ##h]h## Rect.union_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhjxh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqunionall() (pygame.Rect method)pygame.Rect.unionallhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hunionallh](h)}(hj*h]hunionall}hj,sbah}(h]h](hheh]h]h!]h#h$uh%hhj(h&hh'h]h)M"ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj(h&hh'h]h)M"ubeh}(h]j#ah](hheh]h]h!]hhhh~h Rect.unionallhhRectunionallhRect.unionall()uh%hzh'h]h)M"hj%h&hubh)}(hhh](h)}(hhh](h)}(h":sl:`the union of many rectangles`h]h)}(hjVh]hthe union of many rectangles}hjXsbah}(h]h]hah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)M$ubh)}(h%:sg:`unionall(Rect_sequence) -> Rect`h]h)}(hjmh]hunionall(Rect_sequence) -> Rect}hjosbah}(h]h]hah]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)M%ubeh}(h]h]h]h]h!]uh%hhjNh&hh'h]h)M$ubj%)}(hFReturns the union of one rectangle with a sequence of many rectangles.h]hFReturns the union of one rectangle with a sequence of many rectangles.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)M'hjNh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)M*ubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)M*ubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)M)hjNubh )}(h## Rect.unionall ##h]h## Rect.unionall ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjNh&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%hhj%h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"unionall_ip() (pygame.Rect method)pygame.Rect.unionall_iphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h unionall_iph](h)}(hjh]h unionall_ip}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M-ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M-ubeh}(h]jah](hheh]h]h!]hhhh~hRect.unionall_iphhRect unionall_iphRect.unionall_ip()uh%hzh'h]h)M-hjh&hubh)}(hhh](h)}(hhh](h)}(h,:sl:`the union of many rectangles, in place`h]h)}(hjh]h&the union of many rectangles, in place}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M/ubh)}(h(:sg:`unionall_ip(Rect_sequence) -> None`h]h)}(hj1h]h"unionall_ip(Rect_sequence) -> None}hj3sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M/ubj%)}(hBThe same as the ``Rect.unionall()`` method, but operates in place.h](hThe same as the }hjLsbh;)}(h``Rect.unionall()``h]hRect.unionall()}hjTsbah}(h]h]h]h]h!]uh%h:hjLubh method, but operates in place.}hjLsbeh}(h]h]h]h]h!]uh%j$h'h]h)M2hjh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjtsbah}(h]h](jXjeh]h]h!]uh%hhjph&hh'h]h)M5ubh$Added support for keyword arguments.}(hjph&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjlh&hh'h]h)M5ubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)M4hjubh )}(h## Rect.unionall_ip ##h]h## Rect.unionall_ip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M6ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqfit() (pygame.Rect method)pygame.Rect.fithNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hfith](h)}(hjh]hfit}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M8ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M8ubeh}(h]jah](hheh]h]h!]hhhh~hRect.fithhRectfith Rect.fit()uh%hzh'h]h)M8hjh&hubh)}(hhh](h)}(hhh](h)}(h3:sl:`resize and move a rectangle with aspect ratio`h]h)}(hjh]h-resize and move a rectangle with aspect ratio}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M:ubh)}(h:sg:`fit(Rect) -> Rect`h]h)}(hjh]hfit(Rect) -> Rect}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M;ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M:ubj%)}(hReturns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height.h]hReturns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height.}hj"sbah}(h]h]h]h]h!]uh%j$h'h]h)M=hjh&hubh )}(h## Rect.fit ##h]h## Rect.fit ##}hj0sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MAubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjGjzjHj{jHj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq normalize() (pygame.Rect method)pygame.Rect.normalizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h normalizeh](h)}(hj_h]h normalize}hjasbah}(h]h](hheh]h]h!]h#h$uh%hhj]h&hh'h]h)MCubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj]h&hh'h]h)MCubeh}(h]jXah](hheh]h]h!]hhhh~hRect.normalizehhRect normalizehRect.normalize()uh%hzh'h]h)MChjZh&hubh)}(hhh](h)}(hhh](h)}(h:sl:`correct negative sizes`h]h)}(hjh]hcorrect negative sizes}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MEubh)}(h:sg:`normalize() -> None`h]h)}(hjh]hnormalize() -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MFubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MEubj%)}(hThis will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped.h]hThis will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)MHhjh&hubh )}(h## Rect.normalize ##h]h## Rect.normalize ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MLubeh}(h]h]h]h]h!]uh%hhjZh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqcontains() (pygame.Rect method)pygame.Rect.containshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcontainsh](h)}(hjh]hcontains}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MNubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MNubeh}(h]jah](hheh]h]h!]hhhh~h Rect.containshhRectcontainshRect.contains()uh%hzh'h]h)MNhjh&hubh)}(hhh](h)}(hhh](h)}(h-:sl:`test if one rectangle is inside another`h]h)}(hj&h]h'test if one rectangle is inside another}hj(sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)MPubh)}(h:sg:`contains(Rect) -> bool`h]h)}(hj=h]hcontains(Rect) -> bool}hj?sbah}(h]h]hah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)MQubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MPubj%)}(h=Returns true when the argument is completely inside the Rect.h]h=Returns true when the argument is completely inside the Rect.}hjXsbah}(h]h]h]h]h!]uh%j$h'h]h)MShjh&hubh )}(h## Rect.contains ##h]h## Rect.contains ##}hjfsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MUubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyj}jzj~j{j~j|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#collidepoint() (pygame.Rect method)pygame.Rect.collidepointhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h collidepointh](h)}(hjh]h collidepoint}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MWubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MWubeh}(h]jah](hheh]h]h!]hhhh~hRect.collidepointhhRect collidepointhRect.collidepoint()uh%hzh'h]h)MWhjh&hubh)}(hhh](h)}(hhh](h)}(h+:sl:`test if a point is inside a rectangle`h]h)}(hjh]h%test if a point is inside a rectangle}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MYubh)}(h :sg:`collidepoint(x, y) -> bool`h]h)}(hjh]hcollidepoint(x, y) -> bool}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MZubh)}(h!:sg:`collidepoint((x,y)) -> bool`h]h)}(hjh]hcollidepoint((x,y)) -> bool}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M[ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MYubj%)}(hReturns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle.h]hReturns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)M]hjh&hubj )}(hZFor collision detection between a rect and a line the :meth:`clipline` method can be used.h]j%)}(hZFor collision detection between a rect and a line the :meth:`clipline` method can be used.h](h6For collision detection between a rect and a line the }hjsbh6)}(h:meth:`clipline`h]h;)}(hj&h]h clipline()}hj(sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj$ubah}(h]h]h]h]h!]refdochS refdomainj2reftypemeth refexplicitrefwarnhYhhZh~h[cliplineuh%h5h'h]h)Mahjubh method can be used.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mahjubah}(h]h]h]h]h!]uh%j h'h]h)M`hjh&hubh )}(h## Rect.collidepoint ##h]h## Rect.collidepoint ##}hjTsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mdubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjkjzjlj{jlj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"colliderect() (pygame.Rect method)pygame.Rect.colliderecthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h colliderecth](h)}(hjh]h colliderect}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mfubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mfubeh}(h]j|ah](hheh]h]h!]hhhh~hRect.colliderecthhRect colliderecthRect.colliderect()uh%hzh'h]h)Mfhj~h&hubh)}(hhh](h)}(hhh](h)}(h$:sl:`test if two rectangles overlap`h]h)}(hjh]htest if two rectangles overlap}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mhubh)}(h:sg:`colliderect(Rect) -> bool`h]h)}(hjh]hcolliderect(Rect) -> bool}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Miubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mhubj%)}(hdReturns true if any portion of either rectangle overlap (except the top+bottom or left+right edges).h]hdReturns true if any portion of either rectangle overlap (except the top+bottom or left+right edges).}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Mkhjh&hubj )}(hZFor collision detection between a rect and a line the :meth:`clipline` method can be used.h]j%)}(hZFor collision detection between a rect and a line the :meth:`clipline` method can be used.h](h6For collision detection between a rect and a line the }hjsbh6)}(h:meth:`clipline`h]h;)}(hjh]h clipline()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYhhZh~h[cliplineuh%h5h'h]h)Mohjubh method can be used.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mohjubah}(h]h]h]h]h!]uh%j h'h]h)Mnhjh&hubh )}(h## Rect.colliderect ##h]h## Rect.colliderect ##}hj+sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mrubeh}(h]h]h]h]h!]uh%hhj~h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjBjzjCj{jCj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"collidelist() (pygame.Rect method)pygame.Rect.collidelisthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h collidelisth](h)}(hjZh]h collidelist}hj\sbah}(h]h](hheh]h]h!]h#h$uh%hhjXh&hh'h]h)Mtubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjXh&hh'h]h)Mtubeh}(h]jSah](hheh]h]h!]hhhh~hRect.collidelisthhRect collidelisthRect.collidelist()uh%hzh'h]h)MthjUh&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`test if one rectangle in a list intersects`h]h)}(hjh]h*test if one rectangle in a list intersects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mvubh)}(h :sg:`collidelist(list) -> index`h]h)}(hjh]hcollidelist(list) -> index}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mwubeh}(h]h]h]h]h!]uh%hhj~h&hh'h]h)Mvubj%)}(hTest whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned.h]hTest whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Myhj~h&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)M~ubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)M~ubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)M}hj~ubh )}(h## Rect.collidelist ##h]h## Rect.collidelist ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj~h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjUh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%collidelistall() (pygame.Rect method)pygame.Rect.collidelistallhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcollidelistallsh](h)}(hjh]hcollidelistall}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hRect.collidelistallhhRectcollidelistallhRect.collidelistall()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`test if all rectangles in a list intersect`h]h)}(hjJh]h*test if all rectangles in a list intersect}hjLsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)Mubh)}(h%:sg:`collidelistall(list) -> indices`h]h)}(hjah]hcollidelistall(list) -> indices}hjcsbah}(h]h]hah]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjBh&hh'h]h)Mubj%)}(hReturns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned.h]hReturns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned.}hj|sbah}(h]h]h]h]h!]uh%j$h'h]h)MhjBh&hubj%)}(hBNot only Rects are valid arguments, but these are all valid calls:h]hBNot only Rects are valid arguments, but these are all valid calls:}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)MhjBh&hubj_)}(hX7Rect = pygame.Rect r = Rect(0, 0, 10, 10) list_of_rects = [Rect(1, 1, 1, 1), Rect(2, 2, 2, 2)] indices0 = r.collidelistall(list_of_rects) list_of_lists = [[1, 1, 1, 1], [2, 2, 2, 2]] indices1 = r.collidelistall(list_of_lists) list_of_tuples = [(1, 1, 1, 1), (2, 2, 2, 2)] indices2 = r.collidelistall(list_of_tuples) list_of_double_tuples = [((1, 1), (1, 1)), ((2, 2), (2, 2))] indices3 = r.collidelistall(list_of_double_tuples) class ObjectWithRectAttribute(object): def __init__(self, r): self.rect = r list_of_object_with_rect_attribute = [ ObjectWithRectAttribute(Rect(1, 1, 1, 1)), ObjectWithRectAttribute(Rect(2, 2, 2, 2)), ] indices4 = r.collidelistall(list_of_object_with_rect_attribute) class ObjectWithCallableRectAttribute(object): def __init__(self, r): self._rect = r def rect(self): return self._rect list_of_object_with_callable_rect = [ ObjectWithCallableRectAttribute(Rect(1, 1, 1, 1)), ObjectWithCallableRectAttribute(Rect(2, 2, 2, 2)), ] indices5 = r.collidelistall(list_of_object_with_callable_rect)h]hX7Rect = pygame.Rect r = Rect(0, 0, 10, 10) list_of_rects = [Rect(1, 1, 1, 1), Rect(2, 2, 2, 2)] indices0 = r.collidelistall(list_of_rects) list_of_lists = [[1, 1, 1, 1], [2, 2, 2, 2]] indices1 = r.collidelistall(list_of_lists) list_of_tuples = [(1, 1, 1, 1), (2, 2, 2, 2)] indices2 = r.collidelistall(list_of_tuples) list_of_double_tuples = [((1, 1), (1, 1)), ((2, 2), (2, 2))] indices3 = r.collidelistall(list_of_double_tuples) class ObjectWithRectAttribute(object): def __init__(self, r): self.rect = r list_of_object_with_rect_attribute = [ ObjectWithRectAttribute(Rect(1, 1, 1, 1)), ObjectWithRectAttribute(Rect(2, 2, 2, 2)), ] indices4 = r.collidelistall(list_of_object_with_rect_attribute) class ObjectWithCallableRectAttribute(object): def __init__(self, r): self._rect = r def rect(self): return self._rect list_of_object_with_callable_rect = [ ObjectWithCallableRectAttribute(Rect(1, 1, 1, 1)), ObjectWithCallableRectAttribute(Rect(2, 2, 2, 2)), ] indices5 = r.collidelistall(list_of_object_with_callable_rect)}hjsbah}(h]h]h]h]h!]h#h$forcelanguagepythonhighlight_args}uh%j^h'h]h)MhjBh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)Mubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Mubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)MhjBubh )}(h## Rect.collidelistall ##h]h## Rect.collidelistall ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjBh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%collideobjects() (pygame.Rect method)pygame.Rect.collideobjectshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcollideobjectsh](h)}(hjh]hcollideobjects}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hRect.collideobjectshhRectcollideobjectshRect.collideobjects()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h-:sl:`test if any object in a list intersects`h]h)}(hj/h]h'test if any object in a list intersects}hj1sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubh)}(h):sg:`collideobjects(rect_list) -> object`h]h)}(hjFh]h#collideobjects(rect_list) -> object}hjHsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubh)}(h2:sg:`collideobjects(obj_list, key=func) -> object`h]h)}(hj]h]h,collideobjects(obj_list, key=func) -> object}hj_sbah}(h]h]hah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj'h&hh'h]h)Mubj%)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjects feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hj~sbah}(h]h]h]h]h!]uh%j|hjxubhQ feature still in development available for testing and feedback. It may change. }hjxsbh reference)}(ha`Please leave collideobjects feedback with authors `_h]h1Please leave collideobjects feedback with authors}(hjh1Please leave collideobjects feedback with authorsubah}(h]h]h]h]h!]name1Please leave collideobjects feedback with authorsrefuri*https://github.com/pygame/pygame/pull/3026uh%jhjxubh target)}(h- h]h}(h]1please-leave-collideobjects-feedback-with-authorsah]h]1please leave collideobjects feedback with authorsah]h!]refurijuh%j referencedKhjxubeh}(h]h]h]h]h!]uh%j$h'h]h)Mhj'h&hubj%)}(hTest whether the rectangle collides with any object in the sequence. The object of the first collision found is returned. If no collisions are found then ``None`` is returnedh](hTest whether the rectangle collides with any object in the sequence. The object of the first collision found is returned. If no collisions are found then }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh is returned}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhj'h&hubj%)}(hIf key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them.h](hzIf key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. }hjsbh;)}(h``lambda obj: obj.rectangle``h]hlambda obj: obj.rectangle}hjsbah}(h]h]h]h]h!]uh%h:hjubhV. If an object has multiple attributes of type Rect then key could return one of them.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhj'h&hubj_)}(hXr = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjects(rects) # -> print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ObjectWithSomRectAttribute("B", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("C", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ] # collision = r.collideobjects(objects) # this does not work because the items in the list are no Rect like object collision = r.collideobjects( objects, key=lambda o: o.collision_box ) # -> print(collision) screen_rect = r.collideobjects(objects, key=lambda o: o.draw_rect) # -> None print(screen_rect)h]hXr = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjects(rects) # -> print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ObjectWithSomRectAttribute("B", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("C", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ] # collision = r.collideobjects(objects) # this does not work because the items in the list are no Rect like object collision = r.collideobjects( objects, key=lambda o: o.collision_box ) # -> print(collision) screen_rect = r.collideobjects(objects, key=lambda o: o.draw_rect) # -> None print(screen_rect)}hjsbah}(h]h]h]h]h!]h#h$jjpythonj}uh%j^h'h]h)Mhj'h&hubjY)}(hNew in pygame 2.1.3.h]j%)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](jXjmeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hj h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jXh&hh'h]h)Mhj'ubh )}(h## Rect.collideobjects ##h]h## Rect.collideobjects ##}hj0sbah}(h]h]h]h]h!]h#h$uh%h hj'h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjGjzjHj{jHj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(collideobjectsall() (pygame.Rect method)pygame.Rect.collideobjectsallhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcollideobjectsallh](h)}(hj_h]hcollideobjectsall}hjasbah}(h]h](hheh]h]h!]h#h$uh%hhj]h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj]h&hh'h]h)Mubeh}(h]jXah](hheh]h]h!]hhhh~hRect.collideobjectsallhhRectcollideobjectsallhRect.collideobjectsall()uh%hzh'h]h)MhjZh&hubh)}(hhh](h)}(hhh](h)}(h-:sl:`test if all objects in a list intersect`h]h)}(hjh]h'test if all objects in a list intersect}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h-:sg:`collideobjectsall(rect_list) -> objects`h]h)}(hjh]h'collideobjectsall(rect_list) -> objects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h6:sg:`collideobjectsall(obj_list, key=func) -> objects`h]h)}(hjh]h0collideobjectsall(obj_list, key=func) -> objects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj%)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjectsall feedback with authors `_h](j})}(h**Experimental:**h]h Experimental:}hjsbah}(h]h]h]h]h!]uh%j|hjubhQ feature still in development available for testing and feedback. It may change. }hjsbj)}(hd`Please leave collideobjectsall feedback with authors `_h]h4Please leave collideobjectsall feedback with authors}(hjh4Please leave collideobjectsall feedback with authorsubah}(h]h]h]h]h!]name4Please leave collideobjectsall feedback with authorsj*https://github.com/pygame/pygame/pull/3026uh%jhjubj)}(h- h]h}(h]4please-leave-collideobjectsall-feedback-with-authorsah]h]4please leave collideobjectsall feedback with authorsah]h!]refurijuh%jjKhjubeh}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubj%)}(hReturns a list of all the objects that contain rectangles that collide with the Rect. If no intersecting objects are found, an empty list is returned.h]hReturns a list of all the objects that contain rectangles that collide with the Rect. If no intersecting objects are found, an empty list is returned.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubj%)}(hIf key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them.h](hzIf key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. }hjsbh;)}(h``lambda obj: obj.rectangle``h]hlambda obj: obj.rectangle}hj%sbah}(h]h]h]h]h!]uh%h:hjubhV. If an object has multiple attributes of type Rect then key could return one of them.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubj_)}(hX)r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjectsall( rects ) # -> [, , ] print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("B", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ObjectWithSomRectAttribute("C", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ] # collisions = r.collideobjectsall(objects) # this does not work because ObjectWithSomRectAttribute is not a Rect like object collisions = r.collideobjectsall( objects, key=lambda o: o.collision_box ) # -> [, ] print(collisions) screen_rects = r.collideobjectsall(objects, key=lambda o: o.draw_rect) # -> [] print(screen_rects)h]hX)r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjectsall( rects ) # -> [, , ] print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("B", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ObjectWithSomRectAttribute("C", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ] # collisions = r.collideobjectsall(objects) # this does not work because ObjectWithSomRectAttribute is not a Rect like object collisions = r.collideobjectsall( objects, key=lambda o: o.collision_box ) # -> [, ] print(collisions) screen_rects = r.collideobjectsall(objects, key=lambda o: o.draw_rect) # -> [] print(screen_rects)}hj=sbah}(h]h]h]h]h!]h#h$jjpythonj}uh%j^h'h]h)Mhjh&hubjY)}(hNew in pygame 2.1.3.h]j%)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjUsbah}(h]h](jXjmeh]h]h!]uh%hhjQubah}(h]h]h]h]h!] translatableuh%j$hjMh&hh'h]h)M/ubah}(h]h]h]h]h!]j versionaddedj2.1.3uh%jXh&hh'h]h)M.hjubh )}(h## Rect.collideobjectsall ##h]h## Rect.collideobjectsall ##}hjrsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%hhjZh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"collidedict() (pygame.Rect method)pygame.Rect.collidedicthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h collidedicth](h)}(hjh]h collidedict}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M2ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M2ubeh}(h]jah](hheh]h]h!]hhhh~hRect.collidedicthhRect collidedicthRect.collidedict()uh%hzh'h]h)M2hjh&hubh)}(hhh](h)}(hhh](h)}(h6:sl:`test if one rectangle in a dictionary intersects`h]h)}(hjh]h0test if one rectangle in a dictionary intersects}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M4ubh)}(h':sg:`collidedict(dict) -> (key, value)`h]h)}(hjh]h!collidedict(dict) -> (key, value)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M5ubh)}(h:sg:`collidedict(dict) -> None`h]h)}(hjh]hcollidedict(dict) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M6ubh)}(h5:sg:`collidedict(dict, use_values=0) -> (key, value)`h]h)}(hjh]h/collidedict(dict, use_values=0) -> (key, value)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M7ubh)}(h-:sg:`collidedict(dict, use_values=0) -> None`h]h)}(hj)h]h'collidedict(dict, use_values=0) -> None}hj+sbah}(h]h]hah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M4ubj%)}(hX Returns the first key and value pair that intersects with the calling Rect object. If no collisions are found, ``None`` is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.h](hoReturns the first key and value pair that intersects with the calling Rect object. If no collisions are found, }hjDsbh;)}(h``None``h]hNone}hjLsbah}(h]h]h]h]h!]uh%h:hjDubh is returned. If }hjDsbh;)}(h``use_values``h]h use_values}hj^sbah}(h]h]h]h]h!]uh%h:hjDubhw is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.}hjDsbeh}(h]h]h]h]h!]uh%j$h'h]h)M:hjh&hubj )}(hRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedict({tuple(key_rect) : value})``h]j%)}(hRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedict({tuple(key_rect) : value})``h](hxRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. }hjzsbh;)}(h/``rect.collidedict({tuple(key_rect) : value})``h]h+rect.collidedict({tuple(key_rect) : value})}hjsbah}(h]h]h]h]h!]uh%h:hjzubeh}(h]h]h]h]h!]uh%j$h'h]h)M@hjvubah}(h]h]h]h]h!]uh%j h'h]h)M?hjh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)MEubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)MEubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)MDhjubh )}(h## Rect.collidedict ##h]h## Rect.collidedict ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MFubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%collidedictall() (pygame.Rect method)pygame.Rect.collidedictallhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcollidedictallh](h)}(hjh]hcollidedictall}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MHubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MHubeh}(h]jah](hheh]h]h!]hhhh~hRect.collidedictallhhRectcollidedictallhRect.collidedictall()uh%hzh'h]h)MHhjh&hubh)}(hhh](h)}(hhh](h)}(h6:sl:`test if all rectangles in a dictionary intersect`h]h)}(hj h]h0test if all rectangles in a dictionary intersect}hj"sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MJubh)}(h1:sg:`collidedictall(dict) -> [(key, value), ...]`h]h)}(hj7h]h+collidedictall(dict) -> [(key, value), ...]}hj9sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MKubh)}(h?:sg:`collidedictall(dict, use_values=0) -> [(key, value), ...]`h]h)}(hjNh]h9collidedictall(dict, use_values=0) -> [(key, value), ...]}hjPsbah}(h]h]hah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MLubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MJubj%)}(hXReturns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.h](hReturns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If }hjisbh;)}(h``use_values``h]h use_values}hjqsbah}(h]h]h]h]h!]uh%h:hjiubhw is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.}hjisbeh}(h]h]h]h]h!]uh%j$h'h]h)MNhjh&hubj )}(hRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedictall({tuple(key_rect) : value})``h]j%)}(hRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedictall({tuple(key_rect) : value})``h](hxRect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. }hjsbh;)}(h2``rect.collidedictall({tuple(key_rect) : value})``h]h.rect.collidedictall({tuple(key_rect) : value})}hjsbah}(h]h]h]h]h!]uh%h:hjubeh}(h]h]h]h]h!]uh%j$h'h]h)MThjubah}(h]h]h]h]h!]uh%j h'h]h)MShjh&hubjY)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h]j%)}(h=Changed in pygame 2.5.0: Added support for keyword arguments.h](h)}(hChanged in pygame 2.5.0: h]hChanged in pygame 2.5.0: }hjsbah}(h]h](jXjeh]h]h!]uh%hhjh&hh'h]h)MYubh$Added support for keyword arguments.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)MYubah}(h]h]h]h]h!]jversionchangedj2.5.0uh%jXh&hh'h]h)MXhjubh )}(h## Rect.collidedictall ##h]h## Rect.collidedictall ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MZubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jyjjzjj{jj|j}j~jjjjuh%huh&hhhh'Nh)Nubh )}(h## pygame.Rect ##h]h## pygame.Rect ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)M\ubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jyj jzj j{j j|j}j~jjjjuh%huh&hhh,h'Nh)Nubeh}(h] pygame-rectah]h] pygame.rectah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjBerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjju nametypes}(jjjuh}(jh,hsh|jjjjj*j/jjjrjwjj$jjjjjjj j jB jG j j jjjvj{j#j(jjjjjXj]jjjjj|jjSjXjjjjjjjXj]jjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/rect.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.3361406 pygame-2.6.1/docs/generated/doctrees/ref/scrap.doctree0000644000175100001770000013355714676242420022365 0ustar00runnerdockerdsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.scrap`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.scrap}hh`_).h](hIFor an example of how the scrap module works refer to the examples page (}hjsbh6)}(h,:func:`pygame.examples.scrap_clipboard.main`h]h;)}(hjh]h&pygame.examples.scrap_clipboard.main()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjShZNh[$pygame.examples.scrap_clipboard.mainuh%h5h'h]h)K=hjubh") or the code directly in GitHub (}hjsbh reference)}(hn`pygame/examples/scrap_clipboard.py `_h]h"pygame/examples/scrap_clipboard.py}(hjh"pygame/examples/scrap_clipboard.pyubah}(h]h]h]h]h!]namej#refuriFhttps://github.com/pygame/pygame/blob/main/examples/scrap_clipboard.pyuh%jhjubh target)}(hI h]h}(h]"pygame-examples-scrap-clipboard-pyah]h]"pygame/examples/scrap_clipboard.pyah]h!]refurij,uh%j- referencedKhjubh).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K=hh,h&hubhversionmodified)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjQsbah}(h]h](jGaddedeh]h]h!]uh%hhjMubah}(h]h]h]h]h!] translatableuh%hhjIh&hh'h]h)KBubah}(h]h]h]h]h!]type versionaddedversion1.8uh%jGh&hh'h]h)KAhh,ubh note)}(hThe scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases.h]h)}(hThe scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases.h]hThe scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases.}hjwsbah}(h]h]h]h]h!]uh%hh'h]h)KDhjsubah}(h]h]h]h]h!]uh%jqh'h]h)KChh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](singleinit() (in module pygame.scrap)pygame.scrap.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(h pygame.scrap.h]h pygame.scrap.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KHubh desc_name)}(hjh]hinit}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h]h)KHubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KHubeh}(h]jah](sig sig-objecteh]h]h!]modulejSclasshfullnamej _toc_partsjSj _toc_nameinit()uh%jh'h]h)KHhjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h#:sl:`Initializes the scrap module.`h]h)}(hjh]hInitializes the scrap module.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KJubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KKubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KJubh)}(hInitialize the scrap module.h]hInitialize the scrap module.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KMhjh&hubh field_list)}(hhh]h field)}(hhh](h field_name)}(hRaisesh]hRaises}hj:sbah}(h]h]h]h]h!]uh%j8hj5h'h]h)Kubh field_body)}(hhh]h)}(h4pygame.error -- if unable to initialize scrap moduleh](h6)}(hhh]hliteral_strong)}(h pygame.errorh]h pygame.error}hjVsbah}(h]h]h]h]h!]uh%jThjQubah}(h]h]h]h]h!] refdomainpy refexplicitreftypeexc reftargetjX refspecific py:modulejSpy:classNuh%h5hjMubh -- }hjMsbh$if unable to initialize scrap module}(hjMh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%jHhj5ubeh}(h]h]h]h]h!]uh%j3hj0ubah}(h]h]h]h]h!]uh%j.hjh&hh'Nh)Nubjr)}(h_The scrap module requires :func:`pygame.display.set_mode()` be called before being initialized.h]h)}(h_The scrap module requires :func:`pygame.display.set_mode()` be called before being initialized.h](hThe scrap module requires }hjsbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjShZNh[pygame.display.set_modeuh%h5h'h]h)KQhjubh$ be called before being initialized.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KQhjubah}(h]h]h]h]h!]uh%jqh'h]h)KQhjh&hubh )}(h## pygame.scrap.init ##h]h## pygame.scrap.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)KTubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jkfunctioneh]h]h!]domainjkobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#get_init() (in module pygame.scrap)pygame.scrap.get_inithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j)}(h pygame.scrap.h]h pygame.scrap.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KVubj)}(hjh]hget_init}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KVubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KVubeh}(h]jah](jjeh]h]h!]jjSjhjjjjSjj get_init()uh%jh'h]h)KVhjh&hubj)}(hhh](hv)}(hhh](hz)}(h@:sl:`Returns True if the scrap module is currently initialized.`h]h)}(hj>h]h:Returns True if the scrap module is currently initialized.}hj@sbah}(h]h]hah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)KXubhz)}(h:sg:`get_init() -> bool`h]h)}(hjUh]hget_init() -> bool}hjWsbah}(h]h]jah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhj9h&hh'h]h)KYubeh}(h]h]h]h]h!]uh%huhj6h&hh'h]h)KXubh)}(h-Gets the scrap module's initialization state.h]h-Gets the scrap module's initialization state.}hjpsbah}(h]h]h]h]h!]uh%hh'h]h)K[hj6h&hubj/)}(hhh](j4)}(hhh](j9)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(hITrue if the pygame.scrap module is currently initialized, False otherwiseh](h;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh if the }(hjh&hh'Nh)Nubh6)}(h:mod:`pygame.scrap`h]h;)}(hjh]h pygame.scrap}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYjShZNh[ pygame.scrapuh%h5h'h]h)K]hjh&hubh" module is currently initialized, }(hjh&hh'Nh)Nubh;)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh otherwise}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hj~ubj4)}(hhh](j9)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(hboolh]h6)}(hhh]hbool}hj sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetbooljpjqjSjrNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hj~ubeh}(h]h]h]h]h!]uh%j.hj6h&hh'Nh)NubjH)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]h)}(hNew in pygame 1.9.5.h]hNew in pygame 1.9.5.}hj>sbah}(h]h](jGj\eh]h]h!]uh%hhj:ubah}(h]h]h]h]h!] translatableuh%hhj6h&hh'h]h)Kbubah}(h]h]h]h]h!]jm versionaddedjo1.9.5uh%jGh&hh'h]h)Kahj6ubh )}(h## pygame.scrap.get_init ##h]h## pygame.scrap.get_init ##}hj[sbah}(h]h]h]h]h!]h#h$uh%h hj6h&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjrjjrjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jget() (in module pygame.scrap)pygame.scrap.gethNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hgeth](j)}(h pygame.scrap.h]h pygame.scrap.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Keubj)}(hjh]hget}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Keubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Keubeh}(h]jah](jjeh]h]h!]jjSjhjjjjSjjget()uh%jh'h]h)Kehjh&hubj)}(hhh](hv)}(hhh](hz)}(h>:sl:`Gets the data for the specified type from the clipboard.`h]h)}(hjh]h8Gets the data for the specified type from the clipboard.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kgubhz)}(h:sg:`get(type) -> bytes | None`h]h)}(hjh]hget(type) -> bytes | None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Khubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kgubh)}(hRetrieves the data for the specified type from the clipboard. The data is returned as a byte string and might need further processing (such as decoding to Unicode).h]hRetrieves the data for the specified type from the clipboard. The data is returned as a byte string and might need further processing (such as decoding to Unicode).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kjhjh&hubj/)}(hhh](j4)}(hhh](j9)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(h9type (string) -- data type to retrieve from the clipboardh](jU)}(htypeh]htype}hjsbah}(h]h]h]h]h!]uh%jThjubh (}hjsbh6)}(hhh]hliteral_emphasis)}(hstringh]hstring}hj2sbah}(h]h]h]h]h!]uh%j0hj-ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj4jpjqjSjrNuh%h5hjubh)}hjsbh -- }hjsbh(data type to retrieve from the clipboard}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hjubj4)}(hhh](j9)}(hReturnsh]hReturns}hjlsbah}(h]h]h]h]h!]uh%j8hjih'h]h)KubjI)}(hhh]h)}(hddata (bytes object) for the given type identifier or None if no data for the given type is availableh](h5data (bytes object) for the given type identifier or }(hj}h&hh'Nh)Nubh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hj}h&hh'Nh)Nubh+ if no data for the given type is available}(hj}h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%jHhjiubeh}(h]h]h]h]h!]uh%j3hjubj4)}(hhh](j9)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(h bytes | Noneh](h6)}(hhh]hbytes}hjsbah}(h]h]h]h]h!] refdomainjG refexplicitreftypej reftargetbytesjpjqjSjrNuh%h5hjubh | }hjsbh6)}(hhh]hNone}hjsbah}(h]h]h]h]h!] refdomainjG refexplicitreftypej reftargetNonejpjqjSjrNuh%h5hjubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hjubeh}(h]h]h]h]h!]uh%j.hjh&hh'Nh)Nubh)}(htext = pygame.scrap.get(pygame.SCRAP_TEXT) if text: print("There is text in the clipboard.") else: print("There does not seem to be text in the clipboard.")h]htext = pygame.scrap.get(pygame.SCRAP_TEXT) if text: print("There is text in the clipboard.") else: print("There does not seem to be text in the clipboard.")}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Kvhjh&hubh )}(h## pygame.scrap.get ##h]h## pygame.scrap.get ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K|ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](jGfunctioneh]h]h!]jjGjj&jj&jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$get_types() (in module pygame.scrap)pygame.scrap.get_typeshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_typesh](j)}(h pygame.scrap.h]h pygame.scrap.}hj?sbah}(h]h](jjeh]h]h!]h#h$uh%jhj;h&hh'h]h)K~ubj)}(hj=h]h get_types}hjMsbah}(h]h](jjeh]h]h!]h#h$uh%jhj;h&hh'h]h)K~ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj;h&hh'h]h)K~ubeh}(h]j6ah](jjeh]h]h!]jjSjhjj=jjSj=j get_types()uh%jh'h]h)K~hj8h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`Gets a list of the available clipboard types.`h]h)}(hjth]h-Gets a list of the available clipboard types.}hjvsbah}(h]h]hah]h]h!]uh%hhjrubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)Kubhz)}(h:sg:`get_types() -> list`h]h)}(hjh]hget_types() -> list}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjoh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjlh&hh'h]h)Kubh)}(hGets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the :func:`pygame.scrap.get()` method to get the clipboard content of the specific type.h](hGets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the }hjsbh6)}(h:func:`pygame.scrap.get()`h]h;)}(hjh]hpygame.scrap.get()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjShZNh[pygame.scrap.getuh%h5h'h]h)Khjubh: method to get the clipboard content of the specific type.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjlh&hubj/)}(hhh](j4)}(hhh](j9)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(hulist of strings of the available clipboard data types, if there is no data in the clipboard an empty list is returnedh]hulist of strings of the available clipboard data types, if there is no data in the clipboard an empty list is returned}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hjubj4)}(hhh](j9)}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(hlisth]h6)}(hhh]hlist}hj!sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetlistjpjqjSjrNuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhj ubeh}(h]h]h]h]h!]uh%j3hjubeh}(h]h]h]h]h!]uh%j.hjlh&hh'Nh)Nubh)}(hfor t in pygame.scrap.get_types(): if "text" in t: # There is some content with the word "text" in its type string. print(pygame.scrap.get(t))h]hfor t in pygame.scrap.get_types(): if "text" in t: # There is some content with the word "text" in its type string. print(pygame.scrap.get(t))}hjLsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khjlh&hubh )}(h## pygame.scrap.get_types ##h]h## pygame.scrap.get_types ##}hjZsbah}(h]h]h]h]h!]h#h$uh%h hjlh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj8h&hh'Nh)Nubeh}(h]h](j/functioneh]h]h!]jj/jjqjjqjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jput() (in module pygame.scrap)pygame.scrap.puthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hputh](j)}(h pygame.scrap.h]h pygame.scrap.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hput}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjSjhjjjjSjjput()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`Places data into the clipboard.`h]h)}(hjh]hPlaces data into the clipboard.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`put(type, data) -> None`h]h)}(hjh]hput(type, data) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hXWPlaces data for a given clipboard type into the clipboard. The data must be a string buffer. The type is a string identifying the type of data to be placed into the clipboard. This can be one of the predefined ``pygame.SCRAP_PBM``, ``pygame.SCRAP_PPM``, ``pygame.SCRAP_BMP`` or ``pygame.SCRAP_TEXT`` values or a user defined string identifier.h](hPlaces data for a given clipboard type into the clipboard. The data must be a string buffer. The type is a string identifying the type of data to be placed into the clipboard. This can be one of the predefined }hjsbh;)}(h``pygame.SCRAP_PBM``h]hpygame.SCRAP_PBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h``pygame.SCRAP_PPM``h]hpygame.SCRAP_PPM}hj sbah}(h]h]h]h]h!]uh%h:hjubh, }hjsbh;)}(h``pygame.SCRAP_BMP``h]hpygame.SCRAP_BMP}hj sbah}(h]h]h]h]h!]uh%h:hjubh or }hjsbh;)}(h``pygame.SCRAP_TEXT``h]hpygame.SCRAP_TEXT}hj/ sbah}(h]h]h]h]h!]uh%h:hjubh, values or a user defined string identifier.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj/)}(hhh](j4)}(hhh](j9)}(h Parametersh]h Parameters}hjM sbah}(h]h]h]h]h!]uh%j8hjJ h'h]h)KubjI)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(hLtype (string) -- type identifier of the data to be placed into the clipboardh](jU)}(htypeh]htype}hjl sbah}(h]h]h]h]h!]uh%jThjh ubh (}hjh sbh6)}(hhh]j1)}(hstringh]hstring}hj sbah}(h]h]h]h]h!]uh%j0hj~ ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj jpjqjSjrNuh%h5hjh ubh)}hjh sbh -- }hjh sbh;type identifier of the data to be placed into the clipboard}(hjh h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhje ubah}(h]h]h]h]h!]uh%jc hj` ubjd )}(hhh]h)}(hCdata (bytes) -- data to be place into the clipboard, a bytes objecth](jU)}(hdatah]hdata}hj sbah}(h]h]h]h]h!]uh%jThj ubh (}hj sbh6)}(hhh]j1)}(hbytesh]hbytes}hj sbah}(h]h]h]h]h!]uh%j0hj ubah}(h]h]h]h]h!] refdomainj refexplicitreftypej reftargetj jpjqjSjrNuh%h5hj ubh)}hj sbh -- }hj sbh3data to be place into the clipboard, a bytes object}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jc hj` ubeh}(h]h]h]h]h!]uh%j^ hj[ ubah}(h]h]h]h]h!]uh%jHhjJ ubeh}(h]h]h]h]h!]uh%j3hjG ubj4)}(hhh](j9)}(hRaisesh]hRaises}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(h bool`h]h)}(hj h]hcontains(type) -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hOChecks whether data for the given type is currently available in the clipboard.h]hOChecks whether data for the given type is currently available in the clipboard.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj/)}(hhh](j4)}(hhh](j9)}(h Parametersh]h Parameters}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(h3type (string) -- data type to check availability ofh](jU)}(htypeh]htype}hj1 sbah}(h]h]h]h]h!]uh%jThj- ubh (}hj- sbh6)}(hhh]j1)}(hstringh]hstring}hjF sbah}(h]h]h]h]h!]uh%j0hjC ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjH jpjqjSjrNuh%h5hj- ubh)}hj- sbh -- }hj- sbh"data type to check availability of}(hj- h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj* ubah}(h]h]h]h]h!]uh%jHhj ubeh}(h]h]h]h]h!]uh%j3hj ubj4)}(hhh](j9)}(hReturnsh]hReturns}hj sbah}(h]h]h]h]h!]uh%j8hj} h'h]h)KubjI)}(hhh]h)}(hOTrue if data for the passed type is available in the clipboard, False otherwiseh](h;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh< if data for the passed type is available in the clipboard, }(hj h&hh'Nh)Nubh;)}(h ``False``h]hFalse}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh otherwise}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jHhj} ubeh}(h]h]h]h]h!]uh%j3hj ubj4)}(hhh](j9)}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(hboolh]h6)}(hhh]hbool}hj sbah}(h]h]h]h]h!] refdomainj[ refexplicitreftypej reftargetbooljpjqjSjrNuh%h5hj ubah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jHhj ubeh}(h]h]h]h]h!]uh%j3hj ubeh}(h]h]h]h]h!]uh%j.hj h&hh'Nh)Nubh)}(hif pygame.scrap.contains(pygame.SCRAP_TEXT): print("There is text in the clipboard.") if pygame.scrap.contains("own_data_type"): print("There is stuff in the clipboard.")h]hif pygame.scrap.contains(pygame.SCRAP_TEXT): print("There is text in the clipboard.") if pygame.scrap.contains("own_data_type"): print("There is stuff in the clipboard.")}hj sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khj h&hubh )}(h## pygame.scrap.contains ##h]h## pygame.scrap.contains ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](j[ functioneh]h]h!]jj[ jj2 jj2 jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jlost() (in module pygame.scrap)pygame.scrap.losthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hlosth](j)}(h pygame.scrap.h]h pygame.scrap.}hjK sbah}(h]h](jjeh]h]h!]h#h$uh%jhjG h&hh'h]h)Kubj)}(hjI h]hlost}hjY sbah}(h]h](jjeh]h]h!]h#h$uh%jhjG h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjG h&hh'h]h)Kubeh}(h]jB ah](jjeh]h]h!]jjSjhjjI jjSjI jlost()uh%jh'h]h)KhjD h&hubj)}(hhh](hv)}(hhh](hz)}(hS:sl:`Indicates if the clipboard ownership has been lost by the pygame application.`h]h)}(hj h]hMIndicates if the clipboard ownership has been lost by the pygame application.}hj sbah}(h]h]hah]h]h!]uh%hhj~ ubah}(h]h]h]h]h!]uh%h)hKhj{ h&hh'h]h)Kubhz)}(h:sg:`lost() -> bool`h]h)}(hj h]hlost() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj{ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjx h&hh'h]h)Kubh)}(hMIndicates if the clipboard ownership has been lost by the pygame application.h]hMIndicates if the clipboard ownership has been lost by the pygame application.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjx h&hubj/)}(hhh](j4)}(hhh](j9)}(hReturnsh]hReturns}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(hTrue, if the clipboard ownership has been lost by the pygame application, False if the pygame application still owns the clipboardh](h;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)NubhF, if the clipboard ownership has been lost by the pygame application, }(hj h&hh'Nh)Nubh;)}(h ``False``h]hFalse}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh3 if the pygame application still owns the clipboard}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jHhj ubeh}(h]h]h]h]h!]uh%j3hj ubj4)}(hhh](j9)}(h Return typeh]h Return type}hj sbah}(h]h]h]h]h!]uh%j8hj h'h]h)KubjI)}(hhh]h)}(hboolh]h6)}(hhh]hbool}hj) sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetbooljpjqjSjrNuh%h5hj% ubah}(h]h]h]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%jHhj ubeh}(h]h]h]h]h!]uh%j3hj ubeh}(h]h]h]h]h!]uh%j.hjx h&hh'Nh)Nubh)}(hTif pygame.scrap.lost(): print("The clipboard is in use by another application.")h]hTif pygame.scrap.lost(): print("The clipboard is in use by another application.")}hjT sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khjx h&hubh )}(h## pygame.scrap.lost ##h]h## pygame.scrap.lost ##}hjb sbah}(h]h]h]h]h!]h#h$uh%h hjx h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjD h&hh'Nh)Nubeh}(h]h](j7 functioneh]h]h!]jj7 jjy jjy jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#set_mode() (in module pygame.scrap)pygame.scrap.set_modehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_modeh](j)}(h pygame.scrap.h]h pygame.scrap.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hset_mode}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjSjhjj jjSj j set_mode()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`Sets the clipboard access mode.`h]h)}(hj h]hSets the clipboard access mode.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`set_mode(mode) -> None`h]h)}(hj h]hset_mode(mode) -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hX^Sets the access mode for the clipboard. This is only of interest for X11 environments where clipboard modes ``pygame.SCRAP_SELECTION`` (for mouse selections) and ``pygame.SCRAP_CLIPBOARD`` (for the clipboard) are available. Setting the mode to ``pygame.SCRAP_SELECTION`` in other environments will not change the mode from ``pygame.SCRAP_CLIPBOARD``.h](hlSets the access mode for the clipboard. This is only of interest for X11 environments where clipboard modes }hj sbh;)}(h``pygame.SCRAP_SELECTION``h]hpygame.SCRAP_SELECTION}hjsbah}(h]h]h]h]h!]uh%h:hj ubh (for mouse selections) and }hj sbh;)}(h``pygame.SCRAP_CLIPBOARD``h]hpygame.SCRAP_CLIPBOARD}hjsbah}(h]h]h]h]h!]uh%h:hj ubh8 (for the clipboard) are available. Setting the mode to }hj sbh;)}(h``pygame.SCRAP_SELECTION``h]hpygame.SCRAP_SELECTION}hj%sbah}(h]h]h]h]h!]uh%h:hj ubh5 in other environments will not change the mode from }hj sbh;)}(h``pygame.SCRAP_CLIPBOARD``h]hpygame.SCRAP_CLIPBOARD}hj7sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj/)}(hhh](j4)}(hhh](j9)}(h Parametersh]h Parameters}hjUsbah}(h]h]h]h]h!]uh%j8hjRh'h]h)KubjI)}(hhh]h)}(hmode -- access mode, supported values are pygame.SCRAP_CLIPBOARD and pygame.SCRAP_SELECTION (pygame.SCRAP_SELECTION only has an effect when used on X11 platforms)h](jU)}(hmodeh]hmode}hjjsbah}(h]h]h]h]h!]uh%jThjfubh -- }hjfsbh"access mode, supported values are }(hjfh&hh'Nh)Nubh;)}(h``pygame.SCRAP_CLIPBOARD``h]hpygame.SCRAP_CLIPBOARD}hjsbah}(h]h]h]h]h!]uh%h:hjfh&hh'Nh)Nubh and }(hjfh&hh'Nh)Nubh;)}(h``pygame.SCRAP_SELECTION``h]hpygame.SCRAP_SELECTION}hjsbah}(h]h]h]h]h!]uh%h:hjfh&hh'Nh)Nubh (}(hjfh&hh'Nh)Nubh;)}(h``pygame.SCRAP_SELECTION``h]hpygame.SCRAP_SELECTION}hjsbah}(h]h]h]h]h!]uh%h:hjfh&hh'Nh)Nubh/ only has an effect when used on X11 platforms)}(hjfh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%jHhjRubeh}(h]h]h]h]h!]uh%j3hjOubj4)}(hhh](j9)}(hRaisesh]hRaises}hjsbah}(h]h]h]h]h!]uh%j8hjh'h]h)KubjI)}(hhh]h)}(h[ValueError -- if the mode parameter is not pygame.SCRAP_CLIPBOARD or pygame.SCRAP_SELECTIONh](h6)}(hhh]jU)}(h ValueErrorh]h ValueError}hjsbah}(h]h]h]h]h!]uh%jThjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypejn reftargetjjpjqjSjrNuh%h5hjubh -- }hjsbhif the }(hjh&hh'Nh)Nubh;)}(h``mode``h]hmode}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh parameter is not }(hjh&hh'Nh)Nubh;)}(h``pygame.SCRAP_CLIPBOARD``h]hpygame.SCRAP_CLIPBOARD}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh or }(hjh&hh'Nh)Nubh;)}(h``pygame.SCRAP_SELECTION``h]hpygame.SCRAP_SELECTION}hj(sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jHhjubeh}(h]h]h]h]h!]uh%j3hjOubeh}(h]h]h]h]h!]uh%j.hj h&hh'Nh)Nubh )}(h## pygame.scrap.set_mode ##h]h## pygame.scrap.set_mode ##}hjNsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](jfunctioneh]h]h!]jjjjejjejjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.scrap ##h]h## pygame.scrap ##}hjisbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kubeh}(h](hs pygame-scrapeh]h] pygame.scrapah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j|jyj8j5u nametypes}(j|j8uh}(jyh,hsj.)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j-h'h]h)Khh,h&hubj5j/jjjjjjj6j;jjj j jB jG j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/scrap.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.3861406 pygame-2.6.1/docs/generated/doctrees/ref/sdl2_controller.doctree0000644000175100001770000016141114676242420024352 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame._sdl2.controller`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame._sdl2.controller}hh None`h]h)}(hjXh]hinit() -> None}hjZsbah}(h]h] signatureah]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)K,ubeh}(h]h]h]h]h!]uh%huhj9h&hh'h]h)K+ubh)}(h!Initialize the controller module.h]h!Initialize the controller module.}hjtsbah}(h]h]h]h]h!]uh%hh'h]h)K.hj9h&hubh )}(h"## pygame._sdl2.controller.init ##h]h"## pygame._sdl2.controller.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj9h&hh'h]h)K0ubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*quit() (in module pygame._sdl2.controller)pygame._sdl2.controller.quithNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hquith](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K2ubj )}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)K2ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K2ubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2jj3j*jj5quit()uh%jh'h]h)K2hjh&hubj8)}(hhh](hv)}(hhh](hz)}(h):sl:`Uninitialize the controller module.`h]h)}(hjh]h#Uninitialize the controller module.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K4ubhz)}(h:sg:`quit() -> None`h]h)}(hj h]hquit() -> None}hj sbah}(h]h]jdah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K5ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K4ubh)}(h#Uninitialize the controller module.h]h#Uninitialize the controller module.}hj$sbah}(h]h]h]h]h!]uh%hh'h]h)K7hjh&hubh )}(h"## pygame._sdl2.controller.quit ##h]h"## pygame._sdl2.controller.quit ##}hj2sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K9ubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjIjjJjjJjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_init() (in module pygame._sdl2.controller) pygame._sdl2.controller.get_inithNtauh%hdhh,h&hh'h]h)Nubj)}(hhh](j)}(hget_inith](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjcsbah}(h]h](jjeh]h]h!]h#h$uh%jhj_h&hh'h]h)K;ubj )}(hjah]hget_init}hjqsbah}(h]h](jjeh]h]h!]h#h$uh%j hj_h&hh'h]h)K;ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj_h&hh'h]h)K;ubeh}(h]jZah](j+j,eh]h]h!]j0j*j1hj2jaj3j*jaj5 get_init()uh%jh'h]h)K;hj\h&hubj8)}(hhh](hv)}(hhh](hz)}(h;:sl:`Returns True if the controller module is initialized.`h]h)}(hjh]h5Returns True if the controller module is initialized.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K=ubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jdah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K>ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K=ubh)}(h6Test if ``pygame._sdl2.controller.init()`` was called.h](hTest if }hjsbh;)}(h"``pygame._sdl2.controller.init()``h]hpygame._sdl2.controller.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh was called.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K@hjh&hubh block_quote)}(h).. ## pygame._sdl2.controller.get_init ##h]h )}(h&## pygame._sdl2.controller.get_init ##h]h&## pygame._sdl2.controller.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjubah}(h]h]h]h]h!]uh%jh'h]h)KBhjh&hubeh}(h]h]h]h]h!]uh%j7hj\h&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jj jjjjjjjjjjjuh%jh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4set_eventstate() (in module pygame._sdl2.controller)&pygame._sdl2.controller.set_eventstatehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hset_eventstateh](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%jhj#h&hh'h]h)KDubj )}(hj%h]hset_eventstate}hj5sbah}(h]h](jjeh]h]h!]h#h$uh%j hj#h&hh'h]h)KDubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)KDubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2j%j3j*j%j5set_eventstate()uh%jh'h]h)KDhj h&hubj8)}(hhh](hv)}(hhh](hz)}(h=:sl:`Sets the current state of events related to controllers`h]h)}(hj\h]h7Sets the current state of events related to controllers}hj^sbah}(h]h]hah]h]h!]uh%hhjZubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)KFubhz)}(h#:sg:`set_eventstate(state) -> None`h]h)}(hjsh]hset_eventstate(state) -> None}hjusbah}(h]h]jdah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)KGubeh}(h]h]h]h]h!]uh%huhjTh&hh'h]h)KFubh)}(h2Enable or disable events connected to controllers.h]h2Enable or disable events connected to controllers.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KIhjTh&hubh)}(h[Controllers can still generate joystick events, which will not be toggled by this function.h]h)}(hjh]h[Controllers can still generate joystick events, which will not be toggled by this function.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KLhjubah}(h]h]h]h]h!]uh%hh'h]h)KKhjTh&hubj)}(h>Changed in pygame 2.0.2:: Changed return type from int to Noneh]h)}(h>Changed in pygame 2.0.2:: Changed return type from int to Noneh](h)}(hChanged in pygame 2.0.2:: h]hChanged in pygame 2.0.2:: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)KOubh$Changed return type from int to None}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KOubah}(h]h]h]h]h!]jversionchangedj2.0.2:uh%jh&hh'h]h)KNhjTubh )}(h,## pygame._sdl2.controller.set_eventstate ##h]h,## pygame._sdl2.controller.set_eventstate ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjTh&hh'h]h)KPubeh}(h]h]h]h]h!]uh%j7hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4get_eventstate() (in module pygame._sdl2.controller)&pygame._sdl2.controller.get_eventstatehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_eventstateh](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)KRubj )}(hj h]hget_eventstate}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)KRubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)KRubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2j j3j*j j5get_eventstate()uh%jh'h]h)KRhjh&hubj8)}(hhh](hv)}(hhh](hz)}(h=:sl:`Gets the current state of events related to controllers`h]h)}(hjCh]h7Gets the current state of events related to controllers}hjEsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)KTubhz)}(h:sg:`get_eventstate() -> bool`h]h)}(hjZh]hget_eventstate() -> bool}hj\sbah}(h]h]jdah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)KUubeh}(h]h]h]h]h!]uh%huhj;h&hh'h]h)KTubh)}(h_Returns the current state of events related to controllers, True meaning events will be posted.h]h_Returns the current state of events related to controllers, True meaning events will be posted.}hjusbah}(h]h]h]h]h!]uh%hh'h]h)KWhj;h&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)K[ubah}(h]h]h]h]h!]j versionaddedj2.0.2uh%jh&hh'h]h)KZhj;ubh )}(h,## pygame._sdl2.controller.get_eventstate ##h]h,## pygame._sdl2.controller.get_eventstate ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj;h&hh'h]h)K\ubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/get_count() (in module pygame._sdl2.controller)!pygame._sdl2.controller.get_counthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_counth](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K^ubj )}(hjh]h get_count}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)K^ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K^ubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2jj3j*jj5 get_count()uh%jh'h]h)K^hjh&hubj8)}(hhh](hv)}(hhh](hz)}(h+:sl:`Get the number of joysticks connected`h]h)}(hjh]h%Get the number of joysticks connected}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)K`ubhz)}(h:sg:`get_count() -> int`h]h)}(hj%h]hget_count() -> int}hj'sbah}(h]h]jdah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kaubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K`ubh)}(h&Get the number of joysticks connected.h]h&Get the number of joysticks connected.}hj@sbah}(h]h]h]h]h!]uh%hh'h]h)Kchjh&hubh )}(h'## pygame._sdl2.controller.get_count ##h]h'## pygame._sdl2.controller.get_count ##}hjNsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Keubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjejjfjjfjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j3is_controller() (in module pygame._sdl2.controller)%pygame._sdl2.controller.is_controllerhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h is_controllerh](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj{h&hh'h]h)Kgubj )}(hj}h]h is_controller}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hj{h&hh'h]h)Kgubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj{h&hh'h]h)Kgubeh}(h]jvah](j+j,eh]h]h!]j0j*j1hj2j}j3j*j}j5is_controller()uh%jh'h]h)Kghjxh&hubj8)}(hhh](hv)}(hhh](hz)}(hO:sl:`Check if the given joystick is supported by the game controller interface`h]h)}(hjh]hICheck if the given joystick is supported by the game controller interface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kiubhz)}(h":sg:`is_controller(index) -> bool`h]h)}(hjh]his_controller(index) -> bool}hjsbah}(h]h]jdah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kjubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kiubh)}(hJReturns True if the index given can be used to create a controller object.h]hJReturns True if the index given can be used to create a controller object.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Klhjh&hubh )}(h+## pygame._sdl2.controller.is_controller ##h]h+## pygame._sdl2.controller.is_controller ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Knubeh}(h]h]h]h]h!]uh%j7hjxh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j3name_forindex() (in module pygame._sdl2.controller)%pygame._sdl2.controller.name_forindexhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h name_forindexh](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj!h&hh'h]h)Kpubj )}(hj#h]h name_forindex}hj3sbah}(h]h](jjeh]h]h!]h#h$uh%j hj!h&hh'h]h)Kpubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj!h&hh'h]h)Kpubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2j#j3j*j#j5name_forindex()uh%jh'h]h)Kphjh&hubj8)}(hhh](hv)}(hhh](hz)}(h$:sl:`Get the name of the controller`h]h)}(hjZh]hGet the name of the controller}hj\sbah}(h]h]hah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhjUh&hh'h]h)Krubhz)}(h*:sg:`name_forindex(index) -> name or None`h]h)}(hjqh]h$name_forindex(index) -> name or None}hjssbah}(h]h]jdah]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%h)hKhjUh&hh'h]h)Ksubeh}(h]h]h]h]h!]uh%huhjRh&hh'h]h)Krubh)}(hSReturns the name of controller, or None if there's no name or the index is invalid.h]hSReturns the name of controller, or None if there's no name or the index is invalid.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KuhjRh&hubh )}(h+## pygame._sdl2.controller.name_forindex ##h]h+## pygame._sdl2.controller.name_forindex ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjRh&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-Controller (class in pygame._sdl2.controller)"pygame._sdl2.controller.ControllerhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h Controllerh](j)}(hpygame._sdl2.controller.h]hpygame._sdl2.controller.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kzubj )}(hjh]h Controller}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kzubeh}(h]jah](j+j,eh]h]h!]j0j*j1hj2jj3j*jj5juh%jh'h]h)Kzhjh&hubj8)}(hhh](j)}(hX^| :sl:`Create a new Controller object.` | :sg:`Controller(index) -> Controller` Create a new Controller object. Index should be integer between 0 and ``pygame._sdl2.controller.get_count()``. Controllers also can be created from a ``pygame.joystick.Joystick`` using ``pygame._sdl2.controller.from_joystick``. Controllers are initialized on creation. h](hv)}(hhh](hz)}(h%:sl:`Create a new Controller object.`h]h)}(hjh]hCreate a new Controller object.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubhz)}(h%:sg:`Controller(index) -> Controller`h]h)}(hjh]hController(index) -> Controller}hjsbah}(h]h]jdah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjubh)}(hX Create a new Controller object. Index should be integer between 0 and ``pygame._sdl2.controller.get_count()``. Controllers also can be created from a ``pygame.joystick.Joystick`` using ``pygame._sdl2.controller.from_joystick``. Controllers are initialized on creation.h](hFCreate a new Controller object. Index should be integer between 0 and }hj+sbh;)}(h'``pygame._sdl2.controller.get_count()``h]h#pygame._sdl2.controller.get_count()}hj3sbah}(h]h]h]h]h!]uh%h:hj+ubh). Controllers also can be created from a }hj+sbh;)}(h``pygame.joystick.Joystick``h]hpygame.joystick.Joystick}hjEsbah}(h]h]h]h]h!]uh%h:hj+ubh using }hj+sbh;)}(h)``pygame._sdl2.controller.from_joystick``h]h%pygame._sdl2.controller.from_joystick}hjWsbah}(h]h]h]h]h!]uh%h:hj+ubh*. Controllers are initialized on creation.}hj+sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubeh}(h]h]h]h]h!]uh%jh'h]h)K|hjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j2quit() (pygame._sdl2.controller.Controller method)'pygame._sdl2.controller.Controller.quithNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hquith](j )}(hjh]hquit}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](j+j,eh]h]h!]j0j*j1jj2Controller.quitj3j* Controllerquitj5Controller.quit()uh%jh'h]h)Khjh&hubj8)}(hhh](hv)}(hhh](hz)}(h!:sl:`uninitialize the Controller`h]h)}(hjh]huninitialize the Controller}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jdah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hkClose a Controller object. After this the pygame event queue will no longer receive events from the device.h]hkClose a Controller object. After this the pygame event queue will no longer receive events from the device.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h'It is safe to call this more than once.h]h'It is safe to call this more than once.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Controller.quit ##h]h## Controller.quit ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j6get_init() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.get_inithNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_inith](j )}(hj1 h]hget_init}hj3 sbah}(h]h](jjeh]h]h!]h#h$uh%j hj/ h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj/ h&hh'h]h)Kubeh}(h]j* ah](j+j,eh]h]h!]j0j*j1jj2Controller.get_initj3j* Controllerget_initj5Controller.get_init()uh%jh'h]h)Khj, h&hubj8)}(hhh](hv)}(hhh](hz)}(h,:sl:`check if the Controller is initialized`h]h)}(hj] h]h&check if the Controller is initialized}hj_ sbah}(h]h]hah]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%h)hKhjX h&hh'h]h)Kubhz)}(h:sg:`get_init() -> bool`h]h)}(hjt h]hget_init() -> bool}hjv sbah}(h]h]jdah]h]h!]uh%hhjr ubah}(h]h]h]h]h!]uh%h)hKhjX h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjU h&hh'h]h)Kubh)}(h?Returns True if the Controller object is currently initialised.h]h?Returns True if the Controller object is currently initialised.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjU h&hubh )}(h## Controller.get_init ##h]h## Controller.get_init ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjU h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj, h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jBfrom_joystick() (pygame._sdl2.controller.Controller static method)0pygame._sdl2.controller.Controller.from_joystickhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h from_joystickh](hdesc_annotation)}(h3[<#text: 'static'>, >]h](hstatic}hj sbhdesc_sig_space)}(h h]h }hj sbah}(h]h]wah]h]h!]uh%j hj ubeh}(h]h]h]h]h!]h#h$uh%j hj h&hh'h]h)Kubj )}(hj h]h from_joystick}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j+j,eh]h]h!]j0j*j1jj2Controller.from_joystickj3j* Controller from_joystickj5Controller.from_joystick()uh%jh'h]h)Khj h&hubj8)}(hhh](hv)}(hhh](hz)}(h@:sl:`Create a Controller from a pygame.joystick.Joystick object`h]h)}(hj h]h:Create a Controller from a pygame.joystick.Joystick object}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h+:sg:`from_joystick(joystick) -> Controller`h]h)}(hj0 h]h%from_joystick(joystick) -> Controller}hj2 sbah}(h]h]jdah]h]h!]uh%hhj. ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hECreate a Controller object from a ``pygame.joystick.Joystick`` objecth](h"Create a Controller object from a }hjK sbh;)}(h``pygame.joystick.Joystick``h]hpygame.joystick.Joystick}hjS sbah}(h]h]h]h]h!]uh%h:hjK ubh object}hjK sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Controller.from_joystick ##h]h## Controller.from_joystick ##}hjk sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j6attached() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.attachedhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hattachedh](j )}(hj h]hattached}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j+j,eh]h]h!]j0j*j1jj2Controller.attachedj3j* Controllerattachedj5Controller.attached()uh%jh'h]h)Khj h&hubj8)}(hhh](hv)}(hhh](hz)}(hI:sl:`Check if the Controller has been opened and is currently connected.`h]h)}(hj h]hCCheck if the Controller has been opened and is currently connected.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`attached() -> bool`h]h)}(hj h]hattached() -> bool}hj sbah}(h]h]jdah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h>Returns True if the Controller object is opened and connected.h]h>Returns True if the Controller object is opened and connected.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Controller.attached ##h]h## Controller.attached ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j9as_joystick() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.as_joystickhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h as_joystickh](j )}(hj5 h]h as_joystick}hj7 sbah}(h]h](jjeh]h]h!]h#h$uh%j hj3 h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj3 h&hh'h]h)Kubeh}(h]j. ah](j+j,eh]h]h!]j0j*j1jj2Controller.as_joystickj3j* Controller as_joystickj5Controller.as_joystick()uh%jh'h]h)Khj0 h&hubj8)}(hhh](hv)}(hhh](hz)}(h1:sl:`Returns a pygame.joystick.Joystick() object`h]h)}(hja h]h+Returns a pygame.joystick.Joystick() object}hjc sbah}(h]h]hah]h]h!]uh%hhj_ ubah}(h]h]h]h]h!]uh%h)hKhj\ h&hh'h]h)Kubhz)}(h&:sg:`as_joystick() -> Joystick object`h]h)}(hjx h]h as_joystick() -> Joystick object}hjz sbah}(h]h]jdah]h]h!]uh%hhjv ubah}(h]h]h]h]h!]uh%h)hKhj\ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjY h&hh'h]h)Kubh)}(hPReturns a pygame.joystick.Joystick() object created from this controller's indexh]hPReturns a pygame.joystick.Joystick() object created from this controller's index}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjY h&hubh )}(h## Controller.as_joystick ##h]h## Controller.as_joystick ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjY h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj0 h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j6get_axis() (pygame._sdl2.controller.Controller method)+pygame._sdl2.controller.Controller.get_axishNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_axish](j )}(hj h]hget_axis}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j+j,eh]h]h!]j0j*j1jj2Controller.get_axisj3j* Controllerget_axisj5Controller.get_axis()uh%jh'h]h)Khj h&hubj8)}(hhh](hv)}(hhh](hz)}(h.:sl:`Get the current state of a joystick axis`h]h)}(hj h]h(Get the current state of a joystick axis}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_axis(axis) -> int`h]h)}(hj h]hget_axis(axis) -> int}hj sbah}(h]h]jdah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hoGet the current state of a trigger or joystick axis. The axis argument must be one of the following constants::h]hnGet the current state of a trigger or joystick axis. The axis argument must be one of the following constants:}hj. sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hCONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY, CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY, CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHTh]hCONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY, CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY, CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHT}hj< sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khj h&hubh)}(htJoysticks can return a value between -32768 and 32767. Triggers however can only return a value between 0 and 32768.h]htJoysticks can return a value between -32768 and 32767. Triggers however can only return a value between 0 and 32768.}hjJ sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Controller.get_axis ##h]h## Controller.get_axis ##}hjX sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjo jjp jjp jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j8get_button() (pygame._sdl2.controller.Controller method)-pygame._sdl2.controller.Controller.get_buttonhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_buttonh](j )}(hj h]h get_button}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](j+j,eh]h]h!]j0j*j1jj2Controller.get_buttonj3j* Controller get_buttonj5Controller.get_button()uh%jh'h]h)Khj h&hubj8)}(hhh](hv)}(hhh](hz)}(h':sl:`Get the current state of a button`h]h)}(hj h]h!Get the current state of a button}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h :sg:`get_button(button) -> bool`h]h)}(hj h]hget_button(button) -> bool}hj sbah}(h]h]jdah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hGet the current state of a button, True meaning it is pressed down. The button argument must be one of the following constants::h]hGet the current state of a button, True meaning it is pressed down. The button argument must be one of the following constants:}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hXCONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B, CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_DPAD_DOWN, CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT, CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_RIGHTSHOULDER, CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_RIGHTSTICK, CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_GUIDE, CONTROLLER_BUTTON_STARTh]hXCONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B, CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_DPAD_DOWN, CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT, CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_RIGHTSHOULDER, CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_RIGHTSTICK, CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_GUIDE, CONTROLLER_BUTTON_START}hj sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khj h&hubh )}(h## Controller.get_button ##h]h## Controller.get_button ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j9get_mapping() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.get_mappinghNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_mappingh](j )}(hj0 h]h get_mapping}hj2 sbah}(h]h](jjeh]h]h!]h#h$uh%j hj. h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj. h&hh'h]h)Kubeh}(h]j) ah](j+j,eh]h]h!]j0j*j1jj2Controller.get_mappingj3j* Controller get_mappingj5Controller.get_mapping()uh%jh'h]h)Khj+ h&hubj8)}(hhh](hv)}(hhh](hz)}(h0:sl:`Get the mapping assigned to the controller`h]h)}(hj\ h]h*Get the mapping assigned to the controller}hj^ sbah}(h]h]hah]h]h!]uh%hhjZ ubah}(h]h]h]h]h!]uh%h)hKhjW h&hh'h]h)Kubhz)}(h:sg:`get_mapping() -> mapping`h]h)}(hjs h]hget_mapping() -> mapping}hju sbah}(h]h]jdah]h]h!]uh%hhjq ubah}(h]h]h]h]h!]uh%h)hKhjW h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjT h&hh'h]h)Kubh)}(hrReturns a dict containing the mapping of the Controller. For more information see :meth:`Controller.set_mapping()`h](hRReturns a dict containing the mapping of the Controller. For more information see }hj sbh6)}(h :meth:`Controller.set_mapping()`h]h;)}(hj h]hController.set_mapping()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj*hZjh[Controller.set_mappinguh%h5h'h]h)Khj ubeh}(h]h]h]h]h!]uh%hh'h]h)KhjT h&hubj)}(h>Changed in pygame 2.0.2:: Return type changed from str to dicth]h)}(h>Changed in pygame 2.0.2:: Return type changed from str to dicth](h)}(hChanged in pygame 2.0.2:: h]hChanged in pygame 2.0.2:: }hj sbah}(h]h](jjeh]h]h!]uh%hhj h&hh'h]h)KubhReturn type changed from }(hj h&hh'Nh)Nubh;)}(h``str``h]hstr}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh to }(hj h&hh'Nh)Nubh;)}(h``dict``h]hdict}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.0.2:uh%jh&hh'h]h)KhjT ubh )}(h## Controller.get_mapping ##h]h## Controller.get_mapping ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjT h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j7hj+ h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j9set_mapping() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.set_mappinghNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h set_mappingh](j )}(hj4h]h set_mapping}hj6sbah}(h]h](jjeh]h]h!]h#h$uh%j hj2h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj2h&hh'h]h)Kubeh}(h]j-ah](j+j,eh]h]h!]j0j*j1jj2Controller.set_mappingj3j* Controller set_mappingj5Controller.set_mapping()uh%jh'h]h)Khj/h&hubj8)}(hhh](hv)}(hhh](hz)}(h(:sl:`Assign a mapping to the controller`h]h)}(hj`h]h"Assign a mapping to the controller}hjbsbah}(h]h]hah]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%h)hKhj[h&hh'h]h)Kubhz)}(h!:sg:`set_mapping(mapping) -> int`h]h)}(hjwh]hset_mapping(mapping) -> int}hjysbah}(h]h]jdah]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%h)hKhj[h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjXh&hh'h]h)Kubh)}(hX`Rebind buttons, axes, triggers and dpads. The mapping should be a dict containing all buttons, hats and axes. The easiest way to get this is to use the dict returned by :meth:`Controller.get_mapping`. To edit this mapping assign a value to the original button. The value of the dictionary must be a button, hat or axis represented in the following way:h](hRebind buttons, axes, triggers and dpads. The mapping should be a dict containing all buttons, hats and axes. The easiest way to get this is to use the dict returned by }hjsbh6)}(h:meth:`Controller.get_mapping`h]h;)}(hjh]hController.get_mapping()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj*hZjh[Controller.get_mappinguh%h5h'h]h)Khjubh. To edit this mapping assign a value to the original button. The value of the dictionary must be a button, hat or axis represented in the following way:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KhjXh&hubh bullet_list)}(hhh](h list_item)}(h8For a button use: bX where X is the index of the button.h]h)}(hjh]h8For a button use: bX where X is the index of the button.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jh'h]h)Khjh&hubj)}(hhFor a hat use: hX.Y where X is the index and the Y is the direction (up: 1, right: 2, down: 3, left: 4).h]h)}(hjh]hhFor a hat use: hX.Y where X is the index and the Y is the direction (up: 1, right: 2, down: 3, left: 4).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jh'h]h)Khjh&hubj)}(h6For an axis use: aX where x is the index of the axis. h]h)}(h5For an axis use: aX where x is the index of the axis.h]h5For an axis use: aX where x is the index of the axis.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jh'h]h)Khjh&hubeh}(h]h]h]h]h!]bullet*uh%jh'h]h)KhjXh&hubh)}(hAn example of mapping::h]hAn example of mapping:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KhjXh&hubh)}(hmapping = controller.get_mapping() # Get current mapping mapping["a"] = "b3" # Remap button a to y mapping["y"] = "b0" # Remap button y to a controller.set_mapping(mapping) # Set the mappingh]hmapping = controller.get_mapping() # Get current mapping mapping["a"] = "b3" # Remap button a to y mapping["y"] = "b0" # Remap button y to a controller.set_mapping(mapping) # Set the mapping}hj'sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)KhjXh&hubh)}(hXThe function will return 1 if a new mapping is added or 0 if an existing one is updated.h]hXThe function will return 1 if a new mapping is added or 0 if an existing one is updated.}hj5sbah}(h]h]h]h]h!]uh%hh'h]h)KhjXh&hubj)}(hAChanged in pygame 2.0.2:: Renamed from add_mapping to set_mappingh]h)}(hAChanged in pygame 2.0.2:: Renamed from add_mapping to set_mappingh](h)}(hChanged in pygame 2.0.2:: h]hChanged in pygame 2.0.2:: }hjKsbah}(h]h](jjeh]h]h!]uh%hhjGh&hh'h]h)Kubh Renamed from }(hjGh&hh'Nh)Nubh;)}(h``add_mapping``h]h add_mapping}hj]sbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubh to }(hjGh&hh'Nh)Nubh;)}(h``set_mapping``h]h set_mapping}hjosbah}(h]h]h]h]h!]uh%h:hjGh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjCh&hh'h]h)Kubah}(h]h]h]h]h!]jversionchangedj2.0.2:uh%jh&hh'h]h)KhjXubj)}(h@Changed in pygame 2.0.2:: Argument type changed from str to dicth]h)}(h@Changed in pygame 2.0.2:: Argument type changed from str to dicth](h)}(hChanged in pygame 2.0.2:: h]hChanged in pygame 2.0.2:: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)MubhArgument type changed from }(hjh&hh'Nh)Nubh;)}(h``str``h]hstr}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh to }(hjh&hh'Nh)Nubh;)}(h``dict``h]hdict}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]jversionchangedj2.0.2:uh%jh&hh'h]h)MhjXubh )}(h## Controller.set_mapping ##h]h## Controller.set_mapping ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjXh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j7hj/h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4rumble() (pygame._sdl2.controller.Controller method))pygame._sdl2.controller.Controller.rumblehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hrumbleh](j )}(hjh]hrumble}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j+j,eh]h]h!]j0j*j1jj2Controller.rumblej3j* Controllerrumblej5Controller.rumble()uh%jh'h]h)Mhjh&hubj8)}(hhh](hv)}(hhh](hz)}(h:sl:`Start a rumbling effect`h]h)}(hj0h]hStart a rumbling effect}hj2sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Mubhz)}(h=:sg:`rumble(low_frequency, high_frequency, duration) -> bool`h]h)}(hjGh]h7rumble(low_frequency, high_frequency, duration) -> bool}hjIsbah}(h]h]jdah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)Mubh)}(hX<Start a rumble effect on the controller, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Controller.stop_rumble` is called. If an effect is already playing, then it will be overwritten.h](hStart a rumble effect on the controller, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or }hjbsbh6)}(h:meth:`Controller.stop_rumble`h]h;)}(hjlh]hController.stop_rumble()}hjnsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjjubah}(h]h]h]h]h!]refdochS refdomainjxreftypemeth refexplicitrefwarnhYj*hZjh[Controller.stop_rumbleuh%h5h'h]h)M hjbubhI is called. If an effect is already playing, then it will be overwritten.}hjbsbeh}(h]h]h]h]h!]uh%hh'h]h)M hj(h&hubh)}(hReturns True if the rumble was played successfully or False if the controller does not support it or :meth:`pygame.version.SDL` is below 2.0.9.h](heReturns True if the rumble was played successfully or False if the controller does not support it or }hjsbh6)}(h:meth:`pygame.version.SDL`h]h;)}(hjh]hpygame.version.SDL()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj*hZjh[pygame.version.SDLuh%h5h'h]h)Mhjubh is below 2.0.9.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj(h&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.2uh%jh&hh'h]h)Mhj(ubh )}(h## Controller.rumble ##h]h## Controller.rumble ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j9stop_rumble() (pygame._sdl2.controller.Controller method).pygame._sdl2.controller.Controller.stop_rumblehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h stop_rumbleh](j )}(hjh]h stop_rumble}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j+j,eh]h]h!]j0j*j1jj2Controller.stop_rumblej3j* Controller stop_rumblej5Controller.stop_rumble()uh%jh'h]h)Mhjh&hubj8)}(hhh](hv)}(hhh](hz)}(h$:sl:`Stop any rumble effect playing`h]h)}(hjFh]hStop any rumble effect playing}hjHsbah}(h]h]hah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubhz)}(h:sg:`stop_rumble() -> None`h]h)}(hj]h]hstop_rumble() -> None}hj_sbah}(h]h]jdah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhjAh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj>h&hh'h]h)Mubh)}(hfStops any rumble effect playing on the controller. See :meth:`Controller.rumble` for more information.h](h7Stops any rumble effect playing on the controller. See }hjxsbh6)}(h:meth:`Controller.rumble`h]h;)}(hjh]hController.rumble()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj*hZjh[Controller.rumbleuh%h5h'h]h)Mhjxubh for more information.}hjxsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj>h&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.0.2uh%jh&hh'h]h)Mhj>ubh )}(h## Controller.stop_rumble ##h]h## Controller.stop_rumble ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj>h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%jh&hhjh'Nh)Nubeh}(h]h]h]h]h!]uh%j7hjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame._sdl2.controller ##h]h## pygame._sdl2.controller ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M"ubeh}(h](hspygame-sdl2-controllereh]h]pygame._sdl2.controllerah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj9error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjjjjjZj_jj#jj jjjvj{jj!jjjjj* j/ j j j j j. j3 j j j j j) j. j-j2jjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]!docs/reST/ref/sdl2_controller.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.4631407 pygame-2.6.1/docs/generated/doctrees/ref/sdl2_video.doctree0000644000175100001770000025362614676242420023307 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.sdl2_video`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.sdl2_video}hh Window`h]h)}(hj%h]hvWindow(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window}hj'sbah}(h]h] signatureah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ>from_display_module() (pygame._sdl2.video.Window class method)-pygame._sdl2.video.Window.from_display_modulehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hfrom_display_moduleh](hdesc_annotation)}(h8[<#text: 'classmethod'>, >]h](h classmethod}hjXsbhdesc_sig_space)}(h h]h }hjbsbah}(h]h]wah]h]h!]uh%j`hjXubeh}(h]h]h]h]h!]h#h$uh%jVhjRh&hh'h]h)Kubh)}(hjTh]hfrom_display_module}hjwsbah}(h]h](hheh]h]h!]h#h$uh%hhjRh&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjRh&hh'h]h)Kubeh}(h]jMah](hheh]h]h!]hhhhjWindow.from_display_modulejhWindowfrom_display_modulejWindow.from_display_module()uh%hh'h]h)KhjOh&hubj)}(hhh]h)}(hhh](h)}(hG:sl:`Creates window using window created by pygame.display.set_mode().`h]h)}(hjh]hACreates window using window created by pygame.display.set_mode().}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h%:sg:`from_display_module() -> Window`h]h)}(hjh]hfrom_display_module() -> Window}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjOh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ6from_window() (pygame._sdl2.video.Window class method)%pygame._sdl2.video.Window.from_windowhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h from_windowh](jW)}(h8[<#text: 'classmethod'>, >]h](h classmethod}hjsbja)}(h h]h }hj sbah}(h]h]jmah]h]h!]uh%j`hjubeh}(h]h]h]h]h!]h#h$uh%jVhjh&hh'h]h)Kubh)}(hjh]h from_window}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhhjWindow.from_windowjhWindow from_windowjWindow.from_window()uh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(hJ:sl:`Create Window from another window. Could be from another UI toolkit.`h]h)}(hjHh]hDCreate Window from another window. Could be from another UI toolkit.}hjJsbah}(h]h]hah]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubh)}(h":sg:`from_window(other) -> Window`h]h)}(hj_h]hfrom_window(other) -> Window}hjasbah}(h]h]j1ah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj@h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*grab (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.grabhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hgrabh]h)}(hjh]hgrab}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhhj Window.grabjhWindowgrabjjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h?:sl:`Gets or sets whether the mouse is confined to the window.`h]h)}(hjh]h9Gets or sets whether the mouse is confined to the window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K!ubh)}(h:sg:`grab -> bool`h]h)}(hjh]h grab -> bool}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K"ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K!ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ4relative_mouse (pygame._sdl2.video.Window attribute)(pygame._sdl2.video.Window.relative_mousehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hrelative_mouseh]h)}(hjh]hrelative_mouse}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)K$ubah}(h]jah](hheh]h]h!]hhhhjWindow.relative_mousejhWindowrelative_mousejj$uh%hh'h]h)K$hj h&hubj)}(hhh]h)}(hhh](h)}(h<:sl:`Gets or sets the window's relative mouse motion state.`h]h)}(hj0h]h6Gets or sets the window's relative mouse motion state.}hj2sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)K&ubh)}(h:sg:`relative_mouse -> bool`h]h)}(hjGh]hrelative_mouse -> bool}hjIsbah}(h]h]j1ah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)K'ubeh}(h]h]h]h]h!]uh%hhj(h&hh'h]h)K&ubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjkjjljjljjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ1set_windowed() (pygame._sdl2.video.Window method)&pygame._sdl2.video.Window.set_windowedhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h set_windowedh](h)}(hjh]h set_windowed}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K)ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K)ubeh}(h]j|ah](hheh]h]h!]hhhhjWindow.set_windowedjhWindow set_windowedjWindow.set_windowed()uh%hh'h]h)K)hj~h&hubj)}(hhh]h)}(hhh](h)}(h-:sl:`Enable windowed mode (exit fullscreen).`h]h)}(hjh]h'Enable windowed mode (exit fullscreen).}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K+ubh)}(h:sg:`set_windowed() -> None`h]h)}(hjh]hset_windowed() -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K,ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K+ubah}(h]h]h]h]h!]uh%jhj~h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ3set_fullscreen() (pygame._sdl2.video.Window method)(pygame._sdl2.video.Window.set_fullscreenhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hset_fullscreenh](h)}(hjh]hset_fullscreen}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K.ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K.ubeh}(h]jah](hheh]h]h!]hhhhjWindow.set_fullscreenjhWindowset_fullscreenjWindow.set_fullscreen()uh%hh'h]h)K.hjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Enter fullscreen.`h]h)}(hj.h]hEnter fullscreen.}hj0sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)K0ubh)}(h+:sg:`set_fullscreen(desktop=False) -> None`h]h)}(hjEh]h%set_fullscreen(desktop=False) -> None}hjGsbah}(h]h]j1ah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)K1ubeh}(h]h]h]h]h!]uh%hhj&h&hh'h]h)K0ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjijjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ+title (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.titlehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(htitleh]h)}(hjh]htitle}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K3ubah}(h]jzah](hheh]h]h!]hhhhj Window.titlejhWindowtitlejjuh%hh'h]h)K3hj|h&hubj)}(hhh]h)}(hhh](h)}(h,:sl:`Gets or sets whether the window title.`h]h)}(hjh]h&Gets or sets whether the window title.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K5ubh)}(h:sg:`title -> string`h]h)}(hjh]htitle -> string}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K6ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K5ubah}(h]h]h]h]h!]uh%jhj|h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,destroy() (pygame._sdl2.video.Window method)!pygame._sdl2.video.Window.destroyhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hdestroyh](h)}(hjh]hdestroy}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K8ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K8ubeh}(h]jah](hheh]h]h!]hhhhjWindow.destroyjhWindowdestroyjWindow.destroy()uh%hh'h]h)K8hjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Destroys the window.`h]h)}(hj!h]hDestroys the window.}hj#sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K:ubh)}(h:sg:`destroy() -> None`h]h)}(hj8h]hdestroy() -> None}hj:sbah}(h]h]j1ah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K;ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K:ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj\jj]jj]jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ)hide() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.hidehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hhideh](h)}(hjth]hhide}hjvsbah}(h]h](hheh]h]h!]h#h$uh%hhjrh&hh'h]h)K=ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjrh&hh'h]h)K=ubeh}(h]jmah](hheh]h]h!]hhhhj Window.hidejhWindowhidej Window.hide()uh%hh'h]h)K=hjoh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Hide the window.`h]h)}(hjh]hHide the window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K?ubh)}(h:sg:`hide() -> None`h]h)}(hjh]hhide() -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K?ubah}(h]h]h]h]h!]uh%jhjoh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ)show() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.showhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hshowh](h)}(hjh]hshow}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)KBubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KBubeh}(h]jah](hheh]h]h!]hhhhj Window.showjhWindowshowj Window.show()uh%hh'h]h)KBhjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Show the window.`h]h)}(hjh]hShow the window.}hj!sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KDubh)}(h:sg:`show() -> None`h]h)}(hj6h]hshow() -> None}hj8sbah}(h]h]j1ah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KEubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KDubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjZjj[jj[jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*focus() (pygame._sdl2.video.Window method)pygame._sdl2.video.Window.focushNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hfocush](h)}(hjrh]hfocus}hjtsbah}(h]h](hheh]h]h!]h#h$uh%hhjph&hh'h]h)KGubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjph&hh'h]h)KGubeh}(h]jkah](hheh]h]h!]hhhhj Window.focusjhWindowfocusjWindow.focus()uh%hh'h]h)KGhjmh&hubj)}(hhh]h)}(hhh](h)}(hw:sl:`Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.`h]h)}(hjh]hqRaise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KIubh)}(h%:sg:`focus(input_only=False) -> None`h]h)}(hjh]hfocus(input_only=False) -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KJubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KIubah}(h]h]h]h]h!]uh%jhjmh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,restore() (pygame._sdl2.video.Window method)!pygame._sdl2.video.Window.restorehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hrestoreh](h)}(hjh]hrestore}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)KLubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KLubeh}(h]jah](hheh]h]h!]hhhhjWindow.restorejhWindowrestorejWindow.restore()uh%hh'h]h)KLhjh&hubj)}(hhh]h)}(hhh](h)}(hG:sl:`Restore the size and position of a minimized or maximized window.`h]h)}(hjh]hARestore the size and position of a minimized or maximized window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KNubh)}(h:sg:`restore() -> None`h]h)}(hj4h]hrestore() -> None}hj6sbah}(h]h]j1ah]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KOubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KNubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjXjjYjjYjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-maximize() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.maximizehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hmaximizeh](h)}(hjph]hmaximize}hjrsbah}(h]h](hheh]h]h!]h#h$uh%hhjnh&hh'h]h)KQubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjnh&hh'h]h)KQubeh}(h]jiah](hheh]h]h!]hhhhjWindow.maximizejhWindowmaximizejWindow.maximize()uh%hh'h]h)KQhjkh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Maximize the window.`h]h)}(hjh]hMaximize the window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KSubh)}(h:sg:`maximize() -> None`h]h)}(hjh]hmaximize() -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KTubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KSubah}(h]h]h]h]h!]uh%jhjkh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-minimize() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.minimizehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hminimizeh](h)}(hjh]hminimize}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)KVubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KVubeh}(h]jah](hheh]h]h!]hhhhjWindow.minimizejhWindowminimizejWindow.minimize()uh%hh'h]h)KVhjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Minimize the window.`h]h)}(hjh]hMinimize the window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KXubh)}(h:sg:`maximize() -> None`h]h)}(hj2h]hmaximize() -> None}hj4sbah}(h]h]j1ah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KYubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)KXubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjVjjWjjWjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ/resizable (pygame._sdl2.video.Window attribute)#pygame._sdl2.video.Window.resizablehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h resizableh]h)}(hjnh]h resizable}hjpsbah}(h]h](hheh]h]h!]h#h$uh%hhjlh&hh'h]h)K[ubah}(h]jgah](hheh]h]h!]hhhhjWindow.resizablejhWindow resizablejjuh%hh'h]h)K[hjih&hubj)}(hhh]h)}(hhh](h)}(h4:sl:`Gets and sets whether the window is resizable.`h]h)}(hjh]h.Gets and sets whether the window is resizable.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K]ubh)}(h:sg:`resizable -> bool`h]h)}(hjh]hresizable -> bool}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K^ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K]ubah}(h]h]h]h]h!]uh%jhjih&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ0borderless (pygame._sdl2.video.Window attribute)$pygame._sdl2.video.Window.borderlesshNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h borderlessh]h)}(hjh]h borderless}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K`ubah}(h]jah](hheh]h]h!]hhhhjWindow.borderlessjhWindow borderlessjjuh%hh'h]h)K`hjh&hubj)}(hhh]h)}(hhh](h)}(h/:sl:`Add or remove the border from the window.`h]h)}(hj h]h)Add or remove the border from the window.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kbubh)}(h:sg:`borderless -> bool`h]h)}(hj h]hborderless -> bool}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kcubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kbubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj> jj? jj? jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-set_icon() (pygame._sdl2.video.Window method)"pygame._sdl2.video.Window.set_iconhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hset_iconh](h)}(hjV h]hset_icon}hjX sbah}(h]h](hheh]h]h!]h#h$uh%hhjT h&hh'h]h)Keubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjT h&hh'h]h)Keubeh}(h]jO ah](hheh]h]h!]hhhhjWindow.set_iconjhWindowset_iconjWindow.set_icon()uh%hh'h]h)KehjQ h&hubj)}(hhh]h)}(hhh](h)}(h":sl:`Set the icon for the window.`h]h)}(hj h]hSet the icon for the window.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj} h&hh'h]h)Kgubh)}(h:sg:`set_icon(surface) -> None`h]h)}(hj h]hset_icon(surface) -> None}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj} h&hh'h]h)Khubeh}(h]h]h]h]h!]uh%hhjz h&hh'h]h)Kgubah}(h]h]h]h]h!]uh%jhjQ h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ(id (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.idhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hidh]h)}(hj h]hid}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kjubah}(h]j ah](hheh]h]h!]hhhhj Window.idjhWindowidjj uh%hh'h]h)Kjhj h&hubj)}(hhh]h)}(hhh](h)}(h+:sl:`Get the unique window ID. *Read-only*`h]h)}(hj h]h%Get the unique window ID. *Read-only*}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Klubh)}(h:sg:`id -> int`h]h)}(hj h]h id -> int}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kmubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Klubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj1 jj2 jj2 jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*size (pygame._sdl2.video.Window attribute)pygame._sdl2.video.Window.sizehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hsizeh]h)}(hjI h]hsize}hjK sbah}(h]h](hheh]h]h!]h#h$uh%hhjG h&hh'h]h)Koubah}(h]jB ah](hheh]h]h!]hhhhj Window.sizejhWindowsizejj^ uh%hh'h]h)KohjD h&hubj)}(hhh]h)}(hhh](h)}(h$:sl:`Gets and sets the window size.`h]h)}(hjj h]hGets and sets the window size.}hjl sbah}(h]h]hah]h]h!]uh%hhjh ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Kqubh)}(h:sg:`size -> (int, int)`h]h)}(hj h]hsize -> (int, int)}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhje h&hh'h]h)Krubeh}(h]h]h]h]h!]uh%hhjb h&hh'h]h)Kqubah}(h]h]h]h]h!]uh%jhjD h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ.position (pygame._sdl2.video.Window attribute)"pygame._sdl2.video.Window.positionhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hpositionh]h)}(hj h]hposition}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Ktubah}(h]j ah](hheh]h]h!]hhhhjWindow.positionjhWindowpositionjj uh%hh'h]h)Kthj h&hubj)}(hhh]h)}(hhh](h)}(h(:sl:`Gets and sets the window position.`h]h)}(hj h]h"Gets and sets the window position.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kvubh)}(hI:sg:`position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED`h]h)}(hj h]hCposition -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kwubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kvubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-opacity (pygame._sdl2.video.Window attribute)!pygame._sdl2.video.Window.opacityhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hopacityh]h)}(hj1 h]hopacity}hj3 sbah}(h]h](hheh]h]h!]h#h$uh%hhj/ h&hh'h]h)Kyubah}(h]j* ah](hheh]h]h!]hhhhjWindow.opacityjhWindowopacityjjF uh%hh'h]h)Kyhj, h&hubj)}(hhh]h)}(hhh](h)}(h_:sl:`Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).`h]h)}(hjR h]hYGets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).}hjT sbah}(h]h]hah]h]h!]uh%hhjP ubah}(h]h]h]h]h!]uh%h)hKhjM h&hh'h]h)K{ubh)}(h:sg:`opacity -> float`h]h)}(hji h]hopacity -> float}hjk sbah}(h]h]j1ah]h]h!]uh%hhjg ubah}(h]h]h]h]h!]uh%h)hKhjM h&hh'h]h)K|ubeh}(h]h]h]h]h!]uh%hhjJ h&hh'h]h)K{ubah}(h]h]h]h]h!]uh%jhj, h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ3display_index (pygame._sdl2.video.Window attribute)'pygame._sdl2.video.Window.display_indexhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h display_indexh]h)}(hj h]h display_index}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)K~ubah}(h]j ah](hheh]h]h!]hhhhjWindow.display_indexjhWindow display_indexjj uh%hh'h]h)K~hj h&hubj)}(hhh]h)}(hhh](h)}(hD:sl:`Get the index of the display that owns the window. *Read-only*`h]h)}(hj h]h>Get the index of the display that owns the window. *Read-only*}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h:sg:`display_index -> int`h]h)}(hj h]hdisplay_index -> int}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ2set_modal_for() (pygame._sdl2.video.Window method)'pygame._sdl2.video.Window.set_modal_forhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h set_modal_forh](h)}(hj h]h set_modal_for}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhhjWindow.set_modal_forjhWindow set_modal_forjWindow.set_modal_for()uh%hh'h]h)Khj h&hubj)}(hhh]h)}(hhh](h)}(h\:sl:`Set the window as a modal for a parent window. This function is only supported on X11.`h]h)}(hjE h]hVSet the window as a modal for a parent window. This function is only supported on X11.}hjG sbah}(h]h]hah]h]h!]uh%hhjC ubah}(h]h]h]h]h!]uh%h)hKhj@ h&hh'h]h)Kubh)}(h#:sg:`set_modal_for(Window) -> None`h]h)}(hj\ h]hset_modal_for(Window) -> None}hj^ sbah}(h]h]j1ah]h]h!]uh%hhjZ ubah}(h]h]h]h]h!]uh%h)hKhj@ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj= h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjh'Nh)Nubeh}(h]h]h]h]h!]uh%jhhh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ%Texture (class in pygame._sdl2.video)pygame._sdl2.video.TexturehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hTextureh](h)}(hpygame._sdl2.video.h]hpygame._sdl2.video.}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubh)}(hj h]hTexture}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhhjj jhj jj uh%hh'h]h)Khj h&hubj)}(hhh](h)}(hhh](h)}(h0:sl:`pygame object that representing a Texture.`h]h)}(hj h]h*pygame object that representing a Texture.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h^:sg:`Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture`h]h)}(hj h]hXTexture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ9from_surface() (pygame._sdl2.video.Texture static method)'pygame._sdl2.video.Texture.from_surfacehNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(h from_surfaceh](jW)}(h3[<#text: 'static'>, >]h](hstatic}hj sbja)}(h h]h }hj! sbah}(h]h]jmah]h]h!]uh%j`hj ubeh}(h]h]h]h]h!]h#h$uh%jVhj h&hh'h]h)Kubh)}(hj h]h from_surface}hj5 sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhj jTexture.from_surfacejhTexture from_surfacejTexture.from_surface()uh%hh'h]h)Khj h&hubj)}(hhh]h)}(hhh](h)}(h0:sl:`Create a texture from an existing surface.`h]h)}(hj_ h]h*Create a texture from an existing surface.}hja sbah}(h]h]hah]h]h!]uh%hhj] ubah}(h]h]h]h]h!]uh%h)hKhjZ h&hh'h]h)Kubh)}(h0:sg:`from_surface(renderer, surface) -> Texture`h]h)}(hjv h]h*from_surface(renderer, surface) -> Texture}hjx sbah}(h]h]j1ah]h]h!]uh%hhjt ubah}(h]h]h]h]h!]uh%h)hKhjZ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjW h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ/renderer (pygame._sdl2.video.Texture attribute)#pygame._sdl2.video.Texture.rendererhNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hrendererh]h)}(hj h]hrenderer}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubah}(h]j ah](hheh]h]h!]hhhj jTexture.rendererjhTexturerendererjj uh%hh'h]h)Khj h&hubj)}(hhh]h)}(hhh](h)}(h@:sl:`Gets the renderer associated with the Texture. *Read-only*`h]h)}(hj h]h:Gets the renderer associated with the Texture. *Read-only*}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h:sg:`renderer -> Renderer`h]h)}(hj h]hrenderer -> Renderer}hj sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,width (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.widthhNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hwidthh]h)}(hj&h]hwidth}hj(sbah}(h]h](hheh]h]h!]h#h$uh%hhj$h&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhj j Texture.widthjhTexturewidthjj;uh%hh'h]h)Khj!h&hubj)}(hhh]h)}(hhh](h)}(h0:sl:`Gets the width of the Texture. *Read-only*`h]h)}(hjGh]h*Gets the width of the Texture. *Read-only*}hjIsbah}(h]h]hah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Kubh)}(h:sg:`width -> int`h]h)}(hj^h]h width -> int}hj`sbah}(h]h]j1ah]h]h!]uh%hhj\ubah}(h]h]h]h]h!]uh%h)hKhjBh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj?h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj!h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-height (pygame._sdl2.video.Texture attribute)!pygame._sdl2.video.Texture.heighthNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hheighth]h)}(hjh]hheight}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhj jTexture.heightjhTextureheightjjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h1:sl:`Gets the height of the Texture. *Read-only*`h]h)}(hjh]h+Gets the height of the Texture. *Read-only*}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`height -> int`h]h)}(hjh]h height -> int}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,alpha (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.alphahNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(halphah]h)}(hjh]halpha}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhj j Texture.alphajhTexturealphajj#uh%hh'h]h)Khj h&hubj)}(hhh]h)}(hhh](h)}(hU:sl:`Gets and sets an additional alpha value multiplied into render copy operations.`h]h)}(hj/h]hOGets and sets an additional alpha value multiplied into render copy operations.}hj1sbah}(h]h]hah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Kubh)}(h:sg:`alpha -> int`h]h)}(hjFh]h alpha -> int}hjHsbah}(h]h]j1ah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj'h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjkjjkjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ1blend_mode (pygame._sdl2.video.Texture attribute)%pygame._sdl2.video.Texture.blend_modehNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(h blend_modeh]h)}(hjh]h blend_mode}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]j{ah](hheh]h]h!]hhhj jTexture.blend_modejhTexture blend_modejjuh%hh'h]h)Khj}h&hubj)}(hhh]h)}(hhh](h)}(h3:sl:`Gets and sets the blend mode for the Texture.`h]h)}(hjh]h-Gets and sets the blend mode for the Texture.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`blend_mode -> int`h]h)}(hjh]hblend_mode -> int}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj}h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,color (pygame._sdl2.video.Texture attribute) pygame._sdl2.video.Texture.colorhNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hcolorh]h)}(hjh]hcolor}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhj j Texture.colorjhTexturecolorjj uh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(hU:sl:`Gets and sets an additional color value multiplied into render copy operations.`h]h)}(hjh]hOGets and sets an additional color value multiplied into render copy operations.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`color -> color`h]h)}(hj.h]hcolor -> color}hj0sbah}(h]h]j1ah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjRjjSjjSjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ.get_rect() (pygame._sdl2.video.Texture method)#pygame._sdl2.video.Texture.get_recthNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hget_recth](h)}(hjjh]hget_rect}hjlsbah}(h]h](hheh]h]h!]h#h$uh%hhjhh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjhh&hh'h]h)Kubeh}(h]jcah](hheh]h]h!]hhhj jTexture.get_rectjhTextureget_rectjTexture.get_rect()uh%hh'h]h)Khjeh&hubj)}(hhh]h)}(hhh](h)}(h.:sl:`Get the rectangular area of the texture.`h]h)}(hjh]h(Get the rectangular area of the texture.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h :sg:`get_rect(**kwargs) -> Rect`h]h)}(hjh]hget_rect(**kwargs) -> Rect}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjeh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*draw() (pygame._sdl2.video.Texture method)pygame._sdl2.video.Texture.drawhNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hdrawh](h)}(hjh]hdraw}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhj j Texture.drawjhTexturedrawjTexture.draw()uh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h<:sl:`Copy a portion of the texture to the rendering target.`h]h)}(hjh]h6Copy a portion of the texture to the rendering target.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h`:sg:`draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None`h]h)}(hj,h]hZdraw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None}hj.sbah}(h]h]j1ah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjPjjQjjQjjjjjjjuh%hh&hhj h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,update() (pygame._sdl2.video.Texture method)!pygame._sdl2.video.Texture.updatehNtauh%hdhj h&hh'Nh)Nubh)}(hhh](h)}(hupdateh](h)}(hjhh]hupdate}hjjsbah}(h]h](hheh]h]h!]h#h$uh%hhjfh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjfh&hh'h]h)Kubeh}(h]jaah](hheh]h]h!]hhhj jTexture.updatejhTextureupdatejTexture.update()uh%hh'h]h)Khjch&hubj)}(hhh]h)}(hhh](h)}(hP:sl:`Update the texture with a Surface. WARNING: Slow operation, use sparingly.`h]h)}(hjh]hJUpdate the texture with a Surface. WARNING: Slow operation, use sparingly.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h(:sg:`update(surface, area=None) -> None`h]h)}(hjh]h"update(surface, area=None) -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjch&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhj h'Nh)Nubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ#Image (class in pygame._sdl2.video)pygame._sdl2.video.ImagehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hImageh](h)}(hpygame._sdl2.video.h]hpygame._sdl2.video.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(hjh]hImage}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhhjjjhjjjuh%hh'h]h)Khjh&hubj)}(hhh](h)}(hhh](h)}(hY:sl:`Easy way to use a portion of a Texture without worrying about srcrect all the time.`h]h)}(hj!h]hSEasy way to use a portion of a Texture without worrying about srcrect all the time.}hj#sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h2:sg:`Image(textureOrImage, srcrect=None) -> Image`h]h)}(hj8h]h,Image(textureOrImage, srcrect=None) -> Image}hj:sbah}(h]h]j1ah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,get_rect() (pygame._sdl2.video.Image method)!pygame._sdl2.video.Image.get_recthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hget_recth](h)}(hjfh]hget_rect}hjhsbah}(h]h](hheh]h]h!]h#h$uh%hhjdh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjdh&hh'h]h)Kubeh}(h]j_ah](hheh]h]h!]hhhjjImage.get_rectjhImageget_rectjImage.get_rect()uh%hh'h]h)Khjah&hubj)}(hhh]h)}(hhh](h)}(h,:sl:`Get the rectangular area of the Image.`h]h)}(hjh]h&Get the rectangular area of the Image.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`get_rect() -> Rect`h]h)}(hjh]hget_rect() -> Rect}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjah&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ(draw() (pygame._sdl2.video.Image method)pygame._sdl2.video.Image.drawhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hdrawh](h)}(hjh]hdraw}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhjj Image.drawjhImagedrawj Image.draw()uh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h::sl:`Copy a portion of the Image to the rendering target.`h]h)}(hjh]h4Copy a portion of the Image to the rendering target.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h.:sg:`draw(srcrect=None, dstrect=None) -> None`h]h)}(hj(h]h(draw(srcrect=None, dstrect=None) -> None}hj*sbah}(h]h]j1ah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjLjjMjjMjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*angle (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.anglehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hangleh]h)}(hjdh]hangle}hjfsbah}(h]h](hheh]h]h!]h#h$uh%hhjbh&hh'h]h)Kubah}(h]j]ah](hheh]h]h!]hhhjj Image.anglejhImageanglejjyuh%hh'h]h)Khj_h&hubj)}(hhh]h)}(hhh](h)}(h::sl:`Gets and sets the angle the Image draws itself with.`h]h)}(hjh]h4Gets and sets the angle the Image draws itself with.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`angle -> float`h]h)}(hjh]hangle -> float}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj}h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj_h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ+origin (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.originhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(horiginh]h)}(hjh]horigin}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjj Image.originjhImageoriginjjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h^:sl:`Gets and sets the origin. Origin=None means the Image will be rotated around its center.`h]h)}(hjh]hXGets and sets the origin. Origin=None means the Image will be rotated around its center.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h':sg:`origin -> (float, float) or None.`h]h)}(hjh]h!origin -> (float, float) or None.}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj4jj5jj5jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ+flip_x (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.flip_xhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hflip_xh]h)}(hjLh]hflip_x}hjNsbah}(h]h](hheh]h]h!]h#h$uh%hhjJh&hh'h]h)Kubah}(h]jEah](hheh]h]h!]hhhjj Image.flip_xjhImageflip_xjjauh%hh'h]h)KhjGh&hubj)}(hhh]h)}(hhh](h)}(h?:sl:`Gets and sets whether the Image is flipped on the x axis.`h]h)}(hjmh]h9Gets and sets whether the Image is flipped on the x axis.}hjosbah}(h]h]hah]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%h)hKhjhh&hh'h]h)Kubh)}(h:sg:`flip_x -> bool`h]h)}(hjh]hflip_x -> bool}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjhh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjeh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjGh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ+flip_y (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.flip_yhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hflip_yh]h)}(hjh]hflip_y}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjj Image.flip_yjhImageflip_yjjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h?:sl:`Gets and sets whether the Image is flipped on the y axis.`h]h)}(hjh]h9Gets and sets whether the Image is flipped on the y axis.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`flip_y -> bool`h]h)}(hjh]hflip_y -> bool}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*color (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.colorhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hcolorh]h)}(hj4h]hcolor}hj6sbah}(h]h](hheh]h]h!]h#h$uh%hhj2h&hh'h]h)Kubah}(h]j-ah](hheh]h]h!]hhhjj Image.colorjhImagecolorjjIuh%hh'h]h)Khj/h&hubj)}(hhh]h)}(hhh](h)}(h-:sl:`Gets and sets the Image color modifier.`h]h)}(hjUh]h'Gets and sets the Image color modifier.}hjWsbah}(h]h]hah]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%h)hKhjPh&hh'h]h)Kubh)}(h:sg:`color -> Color`h]h)}(hjlh]hcolor -> Color}hjnsbah}(h]h]j1ah]h]h!]uh%hhjjubah}(h]h]h]h]h!]uh%h)hKhjPh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjMh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhj/h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ*alpha (pygame._sdl2.video.Image attribute)pygame._sdl2.video.Image.alphahNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(halphah]h)}(hjh]halpha}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjj Image.alphajhImagealphajjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h-:sl:`Gets and sets the Image alpha modifier.`h]h)}(hjh]h'Gets and sets the Image alpha modifier.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`alpha -> float`h]h)}(hjh]halpha -> float}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ/blend_mode (pygame._sdl2.video.Image attribute)#pygame._sdl2.video.Image.blend_modehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h blend_modeh]h)}(hjh]h blend_mode}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjjImage.blend_modejhImage blend_modejj1uh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h1:sl:`Gets and sets the blend mode for the Image.`h]h)}(hj=h]h+Gets and sets the blend mode for the Image.}hj?sbah}(h]h]hah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)Kubh)}(h:sg:`blend_mode -> int`h]h)}(hjTh]hblend_mode -> int}hjVsbah}(h]h]j1ah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj5h&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjxjjyjjyjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,texture (pygame._sdl2.video.Image attribute) pygame._sdl2.video.Image.texturehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(htextureh]h)}(hjh]htexture}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjj Image.texturejhImagetexturejjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h6:sl:`Gets and sets the Texture the Image is based on.`h]h)}(hjh]h0Gets and sets the Texture the Image is based on.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`texture -> Texture`h]h)}(hjh]htexture -> Texture}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,srcrect (pygame._sdl2.video.Image attribute) pygame._sdl2.video.Image.srcrecthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hsrcrecth]h)}(hjh]hsrcrect}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhjj Image.srcrectjhImagesrcrectjjuh%hh'h]h)Khjh&hubj)}(hhh]h)}(hhh](h)}(h3:sl:`Gets and sets the Rect the Image is based on.`h]h)}(hj%h]h-Gets and sets the Rect the Image is based on.}hj'sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h:sg:`srcrect -> Rect`h]h)}(hj<h]hsrcrect -> Rect}hj>sbah}(h]h]j1ah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jj`jjajjajjjjjjjuh%hh&hhjh'Nh)Nubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjnjjojjojjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ&Renderer (class in pygame._sdl2.video)pygame._sdl2.video.RendererhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hRendererh](h)}(hpygame._sdl2.video.h]hpygame._sdl2.video.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(hjh]hRenderer}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhhjjjhjjjuh%hh'h]h)Khjh&hubj)}(hhh](h)}(hhh](h)}(h1:sl:`Create a 2D rendering context for a window.`h]h)}(hjh]h+Create a 2D rendering context for a window.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h_:sg:`Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer`h]h)}(hjh]hYRenderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ8from_window() (pygame._sdl2.video.Renderer class method)'pygame._sdl2.video.Renderer.from_windowhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h from_windowh](jW)}(h8[<#text: 'classmethod'>, >]h](h classmethod}hjsbja)}(h h]h }hjsbah}(h]h]jmah]h]h!]uh%j`hjubeh}(h]h]h]h]h!]h#h$uh%jVhjh&hh'h]h)Mubh)}(hjh]h from_window}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhjjRenderer.from_windowjhRenderer from_windowjRenderer.from_window()uh%hh'h]h)Mhjh&hubj)}(hhh]h)}(hhh](h)}(h$:sl:`Easy way to create a Renderer.`h]h)}(hj?h]hEasy way to create a Renderer.}hjAsbah}(h]h]hah]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubh)}(h%:sg:`from_window(window) -> Renderer`h]h)}(hjVh]hfrom_window(window) -> Renderer}hjXsbah}(h]h]j1ah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhj:h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj7h&hh'h]h)Mubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjzjj{jj{jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ7draw_blend_mode (pygame._sdl2.video.Renderer attribute)+pygame._sdl2.video.Renderer.draw_blend_modehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(Whdraw_blend_modeh]h)}(hjh]hdraw_blend_mode}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubah}(h]jah](hheh]h]h!]hhhjjRenderer.draw_blend_modejhRendererdraw_blend_modejjuh%hh'h]h)Mhjh&hubj)}(hhh]h)}(hhh](h)}(hA:sl:`Gets and sets the blend mode used by the drawing functions.`h]h)}(hjh]h;Gets and sets the blend mode used by the drawing functions.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`draw_blend_mode -> int`h]h)}(hjh]hdraw_blend_mode -> int}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ2draw_color (pygame._sdl2.video.Renderer attribute)&pygame._sdl2.video.Renderer.draw_colorhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h draw_colorh]h)}(hjh]h draw_color}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M ubah}(h]jah](hheh]h]h!]hhhjjRenderer.draw_colorjhRenderer draw_colorjjuh%hh'h]h)M hjh&hubj)}(hhh]h)}(hhh](h)}(h<:sl:`Gets and sets the color used by the drawing functions.`h]h)}(hj'h]h6Gets and sets the color used by the drawing functions.}hj)sbah}(h]h]hah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M ubh)}(h:sg:`draw_color -> Color`h]h)}(hj>h]hdraw_color -> Color}hj@sbah}(h]h]j1ah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjbjjcjjcjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ,clear() (pygame._sdl2.video.Renderer method)!pygame._sdl2.video.Renderer.clearhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hclearh](h)}(hjzh]hclear}hj|sbah}(h]h](hheh]h]h!]h#h$uh%hhjxh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjxh&hh'h]h)Mubeh}(h]jsah](hheh]h]h!]hhhjjRenderer.clearjhRendererclearjRenderer.clear()uh%hh'h]h)Mhjuh&hubj)}(hhh]h)}(hhh](h)}(h@:sl:`Clear the current rendering target with the drawing color.`h]h)}(hjh]h:Clear the current rendering target with the drawing color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`clear() -> None`h]h)}(hjh]hclear() -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]uh%jhjuh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ.present() (pygame._sdl2.video.Renderer method)#pygame._sdl2.video.Renderer.presenthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hpresenth](h)}(hjh]hpresent}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhjjRenderer.presentjhRendererpresentjRenderer.present()uh%hh'h]h)Mhjh&hubj)}(hhh]h)}(hhh](h)}(hD:sl:`Updates the screen with any new rendering since previous call.`h]h)}(hj%h]h>Updates the screen with any new rendering since previous call.}hj'sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubh)}(h:sg:`present() -> None`h]h)}(hj<h]hpresent() -> None}hj>sbah}(h]h]j1ah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj`jjajjajjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ3get_viewport() (pygame._sdl2.video.Renderer method)(pygame._sdl2.video.Renderer.get_viewporthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h get_viewporth](h)}(hjxh]h get_viewport}hjzsbah}(h]h](hheh]h]h!]h#h$uh%hhjvh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjvh&hh'h]h)Mubeh}(h]jqah](hheh]h]h!]hhhjjRenderer.get_viewportjhRenderer get_viewportjRenderer.get_viewport()uh%hh'h]h)Mhjsh&hubj)}(hhh]h)}(hhh](h)}(h-:sl:`Returns the drawing area on the target.`h]h)}(hjh]h'Returns the drawing area on the target.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`get_viewport() -> Rect`h]h)}(hjh]hget_viewport() -> Rect}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]uh%jhjsh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ3set_viewport() (pygame._sdl2.video.Renderer method)(pygame._sdl2.video.Renderer.set_viewporthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h set_viewporth](h)}(hjh]h set_viewport}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhjjRenderer.set_viewportjhRenderer set_viewportjRenderer.set_viewport()uh%hh'h]h)Mhjh&hubj)}(hhh]h)}(hhh](h)}(hZ:sl:`Set the drawing area on the target. If area is None, the entire target will be used.`h]h)}(hj#h]hTSet the drawing area on the target. If area is None, the entire target will be used.}hj%sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubh)}(h :sg:`set_viewport(area) -> None`h]h)}(hj:h]hset_viewport(area) -> None}hj<sbah}(h]h]j1ah]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M!ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj^jj_jj_jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ4logical_size (pygame._sdl2.video.Renderer attribute)(pygame._sdl2.video.Renderer.logical_sizehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h logical_sizeh]h)}(hjvh]h logical_size}hjxsbah}(h]h](hheh]h]h!]h#h$uh%hhjth&hh'h]h)M#ubah}(h]joah](hheh]h]h!]hhhjjRenderer.logical_sizejhRenderer logical_sizejjuh%hh'h]h)M#hjqh&hubj)}(hhh]h)}(hhh](h)}(h%:sl:`Gets and sets the logical size.`h]h)}(hjh]hGets and sets the logical size.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M%ubh)}(h-:sg:`logical_size -> (int width, int height)`h]h)}(hjh]h'logical_size -> (int width, int height)}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M&ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M%ubah}(h]h]h]h]h!]uh%jhjqh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ-scale (pygame._sdl2.video.Renderer attribute)!pygame._sdl2.video.Renderer.scalehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hscaleh]h)}(hjh]hscale}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M(ubah}(h]jah](hheh]h]h!]hhhjjRenderer.scalejhRendererscalejjuh%hh'h]h)M(hjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Gets and sets the scale.`h]h)}(hj h]hGets and sets the scale.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M*ubh)}(h-:sg:`scale -> (float x_scale, float y_scale)`h]h)}(hj"h]h'scale -> (float x_scale, float y_scale)}hj$sbah}(h]h]j1ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M*ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjFjjGjjGjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ.target (pygame._sdl2.video.Renderer attribute)"pygame._sdl2.video.Renderer.targethNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(htargeth]h)}(hj^h]htarget}hj`sbah}(h]h](hheh]h]h!]h#h$uh%hhj\h&hh'h]h)M-ubah}(h]jWah](hheh]h]h!]hhhjjRenderer.targetjhRenderertargetjjsuh%hh'h]h)M-hjYh&hubj)}(hhh]h)}(hhh](h)}(hY:sl:`Gets and sets the render target. None represents the default target (the renderer).`h]h)}(hjh]hSGets and sets the render target. None represents the default target (the renderer).}hjsbah}(h]h]hah]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%h)hKhjzh&hh'h]h)M/ubh)}(h:sg:`target -> Texture or None`h]h)}(hjh]htarget -> Texture or None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjzh&hh'h]h)M0ubeh}(h]h]h]h]h!]uh%hhjwh&hh'h]h)M/ubah}(h]h]h]h]h!]uh%jhjYh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ+blit() (pygame._sdl2.video.Renderer method) pygame._sdl2.video.Renderer.blithNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(hblith](h)}(hjh]hblit}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M2ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M2ubeh}(h]jah](hheh]h]h!]hhhjj Renderer.blitjhRendererblitjRenderer.blit()uh%hh'h]h)M2hjh&hubj)}(hhh]h)}(hhh](h)}(h[:sl:`For compatibility purposes. Textures created by different Renderers cannot be shared!`h]h)}(hjh]hUFor compatibility purposes. Textures created by different Renderers cannot be shared!}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M4ubh)}(h;:sg:`blit(source, dest, area=None, special_flags=0)-> Rect`h]h)}(hjh]h5blit(source, dest, area=None, special_flags=0)-> Rect}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M5ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M4ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj9jj:jj:jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ0draw_line() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.draw_linehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h draw_lineh](h)}(hjQh]h draw_line}hjSsbah}(h]h](hheh]h]h!]h#h$uh%hhjOh&hh'h]h)M7ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjOh&hh'h]h)M7ubeh}(h]jJah](hheh]h]h!]hhhjjRenderer.draw_linejhRenderer draw_linejRenderer.draw_line()uh%hh'h]h)M7hjLh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Draws a line.`h]h)}(hj}h]h Draws a line.}hjsbah}(h]h]hah]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%h)hKhjxh&hh'h]h)M9ubh)}(h:sg:`draw_line(p1, p2) -> None`h]h)}(hjh]hdraw_line(p1, p2) -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjxh&hh'h]h)M:ubeh}(h]h]h]h]h!]uh%hhjuh&hh'h]h)M9ubah}(h]h]h]h]h!]uh%jhjLh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ1draw_point() (pygame._sdl2.video.Renderer method)&pygame._sdl2.video.Renderer.draw_pointhNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h draw_pointh](h)}(hjh]h draw_point}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M<ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M<ubeh}(h]jah](hheh]h]h!]hhhjjRenderer.draw_pointjhRenderer draw_pointjRenderer.draw_point()uh%hh'h]h)M<hjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Draws a point.`h]h)}(hjh]hDraws a point.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M>ubh)}(h:sg:`draw_point(point) -> None`h]h)}(hjh]hdraw_point(point) -> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M?ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M>ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj7jj8jj8jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ0draw_rect() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.draw_recthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h draw_recth](h)}(hjOh]h draw_rect}hjQsbah}(h]h](hheh]h]h!]h#h$uh%hhjMh&hh'h]h)MAubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjMh&hh'h]h)MAubeh}(h]jHah](hheh]h]h!]hhhjjRenderer.draw_rectjhRenderer draw_rectjRenderer.draw_rect()uh%hh'h]h)MAhjJh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Draws a rectangle.`h]h)}(hj{h]hDraws a rectangle.}hj}sbah}(h]h]hah]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%h)hKhjvh&hh'h]h)MCubh)}(h:sg:`draw_rect(rect)-> None`h]h)}(hjh]hdraw_rect(rect)-> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjvh&hh'h]h)MDubeh}(h]h]h]h]h!]uh%hhjsh&hh'h]h)MCubah}(h]h]h]h]h!]uh%jhjJh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ0fill_rect() (pygame._sdl2.video.Renderer method)%pygame._sdl2.video.Renderer.fill_recthNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h fill_recth](h)}(hjh]h fill_rect}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MFubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MFubeh}(h]jah](hheh]h]h!]hhhjjRenderer.fill_rectjhRenderer fill_rectjRenderer.fill_rect()uh%hh'h]h)MFhjh&hubj)}(hhh]h)}(hhh](h)}(h:sl:`Fills a rectangle.`h]h)}(hjh]hFills a rectangle.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MHubh)}(h:sg:`fill_rect(rect)-> None`h]h)}(hjh]hfill_rect(rect)-> None}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MIubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MHubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj5jj6jj6jjjjjjjuh%hh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hÌ1to_surface() (pygame._sdl2.video.Renderer method)&pygame._sdl2.video.Renderer.to_surfacehNtauh%hdhjh&hh'Nh)Nubh)}(hhh](h)}(h to_surfaceh](h)}(hjMh]h to_surface}hjOsbah}(h]h](hheh]h]h!]h#h$uh%hhjKh&hh'h]h)MKubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjKh&hh'h]h)MKubeh}(h]jFah](hheh]h]h!]hhhjjRenderer.to_surfacejhRenderer to_surfacejRenderer.to_surface()uh%hh'h]h)MKhjHh&hubj)}(hhh]h)}(hhh](h)}(hq:sl:`Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.`h]h)}(hjyh]hkRead pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.}hj{sbah}(h]h]hah]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)MMubh)}(h3:sg:`to_surface(surface=None, area=None)-> Surface`h]h)}(hjh]h-to_surface(surface=None, area=None)-> Surface}hjsbah}(h]h]j1ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)MNubeh}(h]h]h]h]h!]uh%hhjqh&hh'h]h)MMubah}(h]h]h]h]h!]uh%jhjHh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjh'Nh)Nubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubeh}(h](hspygame-sdl2-videoeh]h]pygame.sdl2_videoah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j? h'h]h)Khh,h&hubhhjMjRjjjjjj j|jjjjzjjjjmjrjjjkjpjjjijnjjjgjljjjO jT j j jB jG j j j* j/ j j j j j j j j j j jj$jjjj j{jjjjcjhjjjajfjjj_jdjjj]jbjjjEjJjjj-j2jjjjjjjjjjjjjjjjjsjxjjjqjvjjjojtjjjWj\jjjJjOjjjHjMjjjFjKu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/sdl2_video.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.4831407 pygame-2.6.1/docs/generated/doctrees/ref/sndarray.doctree0000644000175100001770000004777314676242420023104 0ustar00runnerdockerOsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.sndarray`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.sndarray}hhsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%j<hj&h&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhj&h&hh'h]h)Kubeh}(h]jah](sig sig-objecteh]h]h!]modulepygame.sndarrayclasshfullnamej( _toc_partsjbj( _toc_namearray()uh%j$h'h]h)Khj!h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h&:sl:`copy Sound samples into an array`h]h)}(hjsh]h copy Sound samples into an array}hjusbah}(h]h]hah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)Kubhz)}(h:sg:`array(Sound) -> array`h]h)}(hjh]harray(Sound) -> array}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjkh&hh'h]h)Kubh)}(hCreates a new array for the sound data and copies the samples. The array will always be in the format returned from ``pygame.mixer.get_init()``.h](htCreates a new array for the sound data and copies the samples. The array will always be in the format returned from }hjsbh;)}(h``pygame.mixer.get_init()``h]hpygame.mixer.get_init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjkh&hubh )}(h## pygame.sndarray.array ##h]h## pygame.sndarray.array ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjkh&hh'h]h)K"ubeh}(h]h]h]h]h!]uh%jihj!h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%samples() (in module pygame.sndarray)pygame.sndarray.sampleshNtauh%hdhh,h&hh'Nh)Nubj )}(hhh](j%)}(hsamplesh](j+)}(hpygame.sndarray.h]hpygame.sndarray.}hjsbah}(h]h](j7j8eh]h]h!]h#h$uh%j*hjh&hh'h]h)K$ubj=)}(hjh]hsamples}hjsbah}(h]h](jHjIeh]h]h!]h#h$uh%j<hjh&hh'h]h)K$ubjN)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhjh&hh'h]h)K$ubeh}(h]jah](j\j]eh]h]h!]jajbjchjdjjejbjjg samples()uh%j$h'h]h)K$hjh&hubjj)}(hhh](hv)}(hhh](hz)}(h+:sl:`reference Sound samples into an array`h]h)}(hj6h]h%reference Sound samples into an array}hj8sbah}(h]h]hah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)K&ubhz)}(h:sg:`samples(Sound) -> array`h]h)}(hjMh]hsamples(Sound) -> array}hjOsbah}(h]h]jah]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)K'ubeh}(h]h]h]h]h!]uh%huhj.h&hh'h]h)K&ubh)}(hCreates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from ``pygame.mixer.get_init()``.h](hCreates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from }hjhsbh;)}(h``pygame.mixer.get_init()``h]hpygame.mixer.get_init()}hjpsbah}(h]h]h]h]h!]uh%h:hjhubh.}hjhsbeh}(h]h]h]h]h!]uh%hh'h]h)K)hj.h&hubh )}(h## pygame.sndarray.samples ##h]h## pygame.sndarray.samples ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj.h&hh'h]h)K-ubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(make_sound() (in module pygame.sndarray)pygame.sndarray.make_soundhNtauh%hdhh,h&hh'Nh)Nubj )}(hhh](j%)}(h make_soundh](j+)}(hpygame.sndarray.h]hpygame.sndarray.}hjsbah}(h]h](j7j8eh]h]h!]h#h$uh%j*hjh&hh'h]h)K/ubj=)}(hjh]h make_sound}hjsbah}(h]h](jHjIeh]h]h!]h#h$uh%j<hjh&hh'h]h)K/ubjN)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhjh&hh'h]h)K/ubeh}(h]jah](j\j]eh]h]h!]jajbjchjdjjejbjjg make_sound()uh%j$h'h]h)K/hjh&hubjj)}(hhh](hv)}(hhh](hz)}(h*:sl:`convert an array into a Sound object`h]h)}(hjh]h$convert an array into a Sound object}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K1ubhz)}(h :sg:`make_sound(array) -> Sound`h]h)}(hjh]hmake_sound(array) -> Sound}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K2ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K1ubh)}(hCreate a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format.h]hCreate a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)K4hjh&hubh )}(h ## pygame.sndarray.make_sound ##h]h ## pygame.sndarray.make_sound ##}hj.sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K7ubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjEjjFjjFjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+use_arraytype() (in module pygame.sndarray)pygame.sndarray.use_arraytypehNtauh%hdhh,h&hh'h]h)Nubj )}(hhh](j%)}(h use_arraytypeh](j+)}(hpygame.sndarray.h]hpygame.sndarray.}hj_sbah}(h]h](j7j8eh]h]h!]h#h$uh%j*hj[h&hh'h]h)K9ubj=)}(hj]h]h use_arraytype}hjmsbah}(h]h](jHjIeh]h]h!]h#h$uh%j<hj[h&hh'h]h)K9ubjN)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhj[h&hh'h]h)K9ubeh}(h]jVah](j\j]eh]h]h!]jajbjchjdj]jejbj]jguse_arraytype()uh%j$h'h]h)K9hjXh&hubjj)}(hhh](hv)}(hhh](hz)}(h7:sl:`Sets the array system to be used for sound arrays`h]h)}(hjh]h1Sets the array system to be used for sound arrays}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K;ubhz)}(h':sg:`use_arraytype (arraytype) -> None`h]h)}(hjh]h!use_arraytype (arraytype) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Khjh&hubeh}(h]h]h]h]h!]uh%jihjXh&hh'h]h)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+get_arraytype() (in module pygame.sndarray)pygame.sndarray.get_arraytypehNtauh%hdhh,h&hh'Nh)Nubj )}(hhh](j%)}(h get_arraytypeh](j+)}(hpygame.sndarray.h]hpygame.sndarray.}hjsbah}(h]h](j7j8eh]h]h!]h#h$uh%j*hjh&hh'h]h)KCubj=)}(hjh]h get_arraytype}hj)sbah}(h]h](jHjIeh]h]h!]h#h$uh%j<hjh&hh'h]h)KCubjN)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhjh&hh'h]h)KCubeh}(h]jah](j\j]eh]h]h!]jajbjchjdjjejbjjgget_arraytype()uh%j$h'h]h)KChjh&hubjj)}(hhh](hv)}(hhh](hz)}(h+:sl:`Gets the currently active array type.`h]h)}(hjPh]h%Gets the currently active array type.}hjRsbah}(h]h]hah]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%h)hKhjKh&hh'h]h)KEubhz)}(h:sg:`get_arraytype () -> str`h]h)}(hjgh]hget_arraytype () -> str}hjisbah}(h]h]jah]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%h)hKhjKh&hh'h]h)KFubeh}(h]h]h]h]h!]uh%huhjHh&hh'h]h)KEubh)}(hDEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``.h](hQDEPRECATED: Returns the currently active array type. This will be a value of the }hjsbh;)}(h``get_arraytypes()``h]hget_arraytypes()}hjsbah}(h]h]h]h]h!]uh%h:hjubhq tuple and indicates which type of array module is used for the array creation. Using this function will raise a }hjsbh;)}(h``DeprecationWarning``h]hDeprecationWarning}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KHhjHh&hubhversionmodified)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KMubah}(h]h]h]h]h!]type versionaddedversion1.8uh%jh&hh'h]h)KLhjHubh )}(h### pygame.sndarray.get_arraytype ##h]h### pygame.sndarray.get_arraytype ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjHh&hh'h]h)KNubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_arraytypes() (in module pygame.sndarray)pygame.sndarray.get_arraytypeshNtauh%hdhh,h&hh'Nh)Nubj )}(hhh](j%)}(hget_arraytypesh](j+)}(hpygame.sndarray.h]hpygame.sndarray.}hjsbah}(h]h](j7j8eh]h]h!]h#h$uh%j*hj h&hh'h]h)KPubj=)}(hj h]hget_arraytypes}hjsbah}(h]h](jHjIeh]h]h!]h#h$uh%j<hj h&hh'h]h)KPubjN)}(h()h]h}(h]h]h]h]h!]h#h$uh%jMhj h&hh'h]h)KPubeh}(h]jah](j\j]eh]h]h!]jajbjchjdj jejbj jgget_arraytypes()uh%j$h'h]h)KPhjh&hubjj)}(hhh](hv)}(hhh](hz)}(h6:sl:`Gets the array system types currently supported.`h]h)}(hjDh]h0Gets the array system types currently supported.}hjFsbah}(h]h]hah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)KRubhz)}(h :sg:`get_arraytypes () -> tuple`h]h)}(hj[h]hget_arraytypes () -> tuple}hj]sbah}(h]h]jah]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%h)hKhj?h&hh'h]h)KSubeh}(h]h]h]h]h!]uh%huhj<h&hh'h]h)KRubh)}(hX@DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.sndarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``.h](hDEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the }hjvsbh6)}(h%:func:`pygame.sndarray.use_arraytype`h]h;)}(hjh]hpygame.sndarray.use_arraytype()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj~ubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjbhZNh[pygame.sndarray.use_arraytypeuh%h5h'h]h)KUhjvubhr () method. If no supported array system could be found, None will be returned. Using this function will raise a }hjvsbh;)}(h``DeprecationWarning``h]hDeprecationWarning}hjsbah}(h]h]h]h]h!]uh%h:hjvubh.}hjvsbeh}(h]h]h]h]h!]uh%hh'h]h)KUhj<h&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)K\ubah}(h]h]h]h]h!]j versionaddedj1.8uh%jh&hh'h]h)K[hj<ubh )}(h$## pygame.sndarray.get_arraytypes ##h]h$## pygame.sndarray.get_arraytypes ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj<h&hh'h]h)K]ubeh}(h]h]h]h]h!]uh%jihjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.sndarray ##h]h## pygame.sndarray ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)K_ubeh}(h](hspygame-sndarrayeh]h]pygame.sndarrayah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj;error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jj s nametypes}jsh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjj&jjjjjVj[jjjj u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/sndarray.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.7401407 pygame-2.6.1/docs/generated/doctrees/ref/sprite.doctree0000644000175100001770000046572214676242421022566 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.sprite`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.sprite}hh Sprite`h]h)}(hjh]hSprite(*groups) -> Sprite}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K9ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K8ubh)}(hThe base class for visible game objects. Derived classes will want to override the ``Sprite.update()`` and assign a ``Sprite.image`` and ``Sprite.rect`` attributes. The initializer can accept any number of Group instances to be added to.h](hSThe base class for visible game objects. Derived classes will want to override the }hj9sbh;)}(h``Sprite.update()``h]hSprite.update()}hjAsbah}(h]h]h]h]h!]uh%h:hj9ubh and assign a }hj9sbh;)}(h``Sprite.image``h]h Sprite.image}hjSsbah}(h]h]h]h]h!]uh%h:hj9ubh and }hj9sbh;)}(h``Sprite.rect``h]h Sprite.rect}hjesbah}(h]h]h]h]h!]uh%h:hj9ubhU attributes. The initializer can accept any number of Group instances to be added to.}hj9sbeh}(h]h]h]h]h!]uh%hh'h]h)K;hjh&hubh)}(hrWhen subclassing the Sprite, be sure to call the base initializer before adding the Sprite to Groups. For example:h]hrWhen subclassing the Sprite, be sure to call the base initializer before adding the Sprite to Groups. For example:}hj}sbah}(h]h]h]h]h!]uh%hh'h]h)K@hjh&hubh literal_block)}(hXclass Block(pygame.sprite.Sprite): # Constructor. Pass in the color of the block, # and its x and y position def __init__(self, color, width, height): # Call the parent class (Sprite) constructor pygame.sprite.Sprite.__init__(self) # Create an image of the block, and fill it with a color. # This could also be an image loaded from the disk. self.image = pygame.Surface([width, height]) self.image.fill(color) # Fetch the rectangle object that has the dimensions of the image # Update the position of this object by setting the values of rect.x and rect.y self.rect = self.image.get_rect()h]hXclass Block(pygame.sprite.Sprite): # Constructor. Pass in the color of the block, # and its x and y position def __init__(self, color, width, height): # Call the parent class (Sprite) constructor pygame.sprite.Sprite.__init__(self) # Create an image of the block, and fill it with a color. # This could also be an image loaded from the disk. self.image = pygame.Surface([width, height]) self.image.fill(color) # Fetch the rectangle object that has the dimensions of the image # Update the position of this object by setting the values of rect.x and rect.y self.rect = self.image.get_rect()}hjsbah}(h]h]h]h]h!]h#h$forcelanguagepythonhighlight_args}uh%jh'h]h)KChjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j&update() (pygame.sprite.Sprite method)pygame.sprite.Sprite.updatehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hupdateh](j)}(hjh]hupdate}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KVubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KVubeh}(h]jah](jjeh]h]h!]jjjjj Sprite.updatejjSpriteupdatejSprite.update()uh%jh'h]h)KVhjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`method to control sprite behavior`h]h)}(hjh]h!method to control sprite behavior}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KXubhz)}(h%:sg:`update(*args, **kwargs) -> None`h]h)}(hjh]hupdate(*args, **kwargs) -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KYubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KXubh)}(hThe default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by ``Group.update()`` with whatever arguments you give it.h](hThe default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by }hjsbh;)}(h``Group.update()``h]hGroup.update()}hjsbah}(h]h]h]h]h!]uh%h:hjubh% with whatever arguments you give it.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K[hjh&hubh)}(hoIt is not necessary to use this method if not using the convenience method by the same name in the Group class.h]hoIt is not necessary to use this method if not using the convenience method by the same name in the Group class.}hj3sbah}(h]h]h]h]h!]uh%hh'h]h)K_hjh&hubh )}(h## Sprite.update ##h]h## Sprite.update ##}hjAsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]domainjXobjtypejYdesctypejYno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#add() (pygame.sprite.Sprite method)pygame.sprite.Sprite.addhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(haddh](j)}(hjzh]hadd}hj|sbah}(h]h](jjeh]h]h!]h#h$uh%jhjxh&hh'h]h)Kdubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjxh&hh'h]h)Kdubeh}(h]jsah](jjeh]h]h!]jjjjj Sprite.addjjSpriteaddj Sprite.add()uh%jh'h]h)Kdhjuh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`add the sprite to groups`h]h)}(hjh]hadd the sprite to groups}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kfubhz)}(h:sg:`add(*groups) -> None`h]h)}(hjh]hadd(*groups) -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kfubh)}(hAny number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of.h]hAny number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kihjh&hubh )}(h## Sprite.add ##h]h## Sprite.add ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Klubeh}(h]h]h]h]h!]uh%jhjuh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&remove() (pygame.sprite.Sprite method)pygame.sprite.Sprite.removehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hremoveh](j)}(hjh]hremove}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Knubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Knubeh}(h]jah](jjeh]h]h!]jjjjj Sprite.removejjSpriteremovejSprite.remove()uh%jh'h]h)Knhjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`remove the sprite from groups`h]h)}(hjAh]hremove the sprite from groups}hjCsbah}(h]h]hah]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Kpubhz)}(h:sg:`remove(*groups) -> None`h]h)}(hjXh]hremove(*groups) -> None}hjZsbah}(h]h]j)ah]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%h)hKhj<h&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%huhj9h&hh'h]h)Kpubh)}(hAny number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of.h]hAny number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of.}hjssbah}(h]h]h]h]h!]uh%hh'h]h)Kshj9h&hubh )}(h## Sprite.remove ##h]h## Sprite.remove ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj9h&hh'h]h)Kvubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$kill() (pygame.sprite.Sprite method)pygame.sprite.Sprite.killhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hkillh](j)}(hjh]hkill}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kxubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kxubeh}(h]jah](jjeh]h]h!]jjjjj Sprite.killjjSpritekillj Sprite.kill()uh%jh'h]h)Kxhjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`remove the Sprite from all Groups`h]h)}(hjh]h!remove the Sprite from all Groups}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kzubhz)}(h:sg:`kill() -> None`h]h)}(hjh]hkill() -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K{ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kzubh)}(hThe Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups.h]hThe Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K}hjh&hubh )}(h## Sprite.kill ##h]h## Sprite.kill ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j3j^j4j_j4j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%alive() (pygame.sprite.Sprite method)pygame.sprite.Sprite.alivehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(haliveh](j)}(hjKh]halive}hjMsbah}(h]h](jjeh]h]h!]h#h$uh%jhjIh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjIh&hh'h]h)Kubeh}(h]jDah](jjeh]h]h!]jjjjj Sprite.alivejjSpritealivejSprite.alive()uh%jh'h]h)KhjFh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`does the sprite belong to any groups`h]h)}(hjwh]h$does the sprite belong to any groups}hjysbah}(h]h]hah]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%h)hKhjrh&hh'h]h)Kubhz)}(h:sg:`alive() -> bool`h]h)}(hjh]halive() -> bool}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjoh&hh'h]h)Kubh)}(h;Returns True when the Sprite belongs to one or more Groups.h]h;Returns True when the Sprite belongs to one or more Groups.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjoh&hubh )}(h## Sprite.alive ##h]h## Sprite.alive ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjoh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjFh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&groups() (pygame.sprite.Sprite method)pygame.sprite.Sprite.groupshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hgroupsh](j)}(hjh]hgroups}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjj Sprite.groupsjjSpritegroupsjSprite.groups()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`list of Groups that contain this Sprite`h]h)}(hjh]h'list of Groups that contain this Sprite}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`groups() -> group_list`h]h)}(hj)h]hgroups() -> group_list}hj+sbah}(h]h]j)ah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h9Return a list of all the Groups that contain this Sprite.h]h9Return a list of all the Groups that contain this Sprite.}hjDsbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Sprite.groups ##h]h## Sprite.groups ##}hjRsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jij^jjj_jjj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubh )}(h## pygame.sprite.Sprite ##h]h## pygame.sprite.Sprite ##}hjnsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#WeakSprite (class in pygame.sprite)pygame.sprite.WeakSpritehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h WeakSpriteh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]h WeakSprite}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)Khjh&hubj)}(hhh]hv)}(hhh](hz)}(h:sl:`A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.`h]h)}(hjh]hA subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h':sg:`WeakSprite(*groups) -> WeakSprite`h]h)}(hjh]h!WeakSprite(*groups) -> WeakSprite}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$DirtySprite (class in pygame.sprite)pygame.sprite.DirtySpritehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h DirtySpriteh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]h DirtySprite}hj,sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`A subclass of Sprite with more attributes and features.`h]h)}(hjHh]h7A subclass of Sprite with more attributes and features.}hjJsbah}(h]h]hah]h]h!]uh%hhjFubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubhz)}(h):sg:`DirtySprite(*groups) -> DirtySprite`h]h)}(hj_h]h#DirtySprite(*groups) -> DirtySprite}hjasbah}(h]h]j)ah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjCh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj@h&hh'h]h)Kubh)}(h7Extra DirtySprite attributes with their default values:h]h7Extra DirtySprite attributes with their default values:}hjzsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubh)}(h dirty = 1h]h dirty = 1}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubj)}(hif set to 1, it is repainted and then set to 0 again if set to 2 then it is always dirty ( repainted each frame, flag is not reset) 0 means that it is not dirty and therefore not repainted againh]hif set to 1, it is repainted and then set to 0 again if set to 2 then it is always dirty ( repainted each frame, flag is not reset) 0 means that it is not dirty and therefore not repainted again}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj@h&hubh)}(h blendmode = 0h]h blendmode = 0}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubj)}(h2its the special_flags argument of blit, blendmodesh]h2its the special_flags argument of blit, blendmodes}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj@h&hubh)}(hsource_rect = Noneh]hsource_rect = None}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubj)}(hOsource rect to use, remember that it is relative to topleft (0,0) of self.imageh]hOsource rect to use, remember that it is relative to topleft (0,0) of self.image}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj@h&hubh)}(h visible = 1h]h visible = 1}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubj)}(henormally 1, if set to 0 it will not be repainted (you must set it dirty too to be erased from screen)h]henormally 1, if set to 0 it will not be repainted (you must set it dirty too to be erased from screen)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj@h&hubh)}(h layer = 0h]h layer = 0}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khj@h&hubj)}(hd(READONLY value, it is read when adding it to the LayeredDirty, for details see doc of LayeredDirty)h]hd(READONLY value, it is read when adding it to the LayeredDirty, for details see doc of LayeredDirty)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khj@h&hubh )}(h## ##h]h## ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj@h&hh'h]h)Kubh )}(h## pygame.sprite.DirtySprite ##h]h## pygame.sprite.DirtySprite ##}hj"sbah}(h]h]h]h]h!]h#h$uh%h hj@h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]j9j^j:j_j:j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jGroup (class in pygame.sprite)pygame.sprite.GrouphNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hGrouph](j)}(hpygame.sprite.h]hpygame.sprite.}hjSsbah}(h]h](jjeh]h]h!]h#h$uh%jhjOh&hh'h]h)Kubj)}(hjQh]hGroup}hjasbah}(h]h](jjeh]h]h!]h#h$uh%jhjOh&hh'h]h)Kubeh}(h]jJah](jjeh]h]h!]jjjhjjQjjjQjjQuh%jh'h]h)KhjLh&hubj)}(hhh](hv)}(hhh](hz)}(hC:sl:`A container class to hold and manage multiple Sprite objects.`h]h)}(hj}h]h=A container class to hold and manage multiple Sprite objects.}hjsbah}(h]h]hah]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%h)hKhjxh&hh'h]h)Kubhz)}(h:sg:`Group(*sprites) -> Group`h]h)}(hjh]hGroup(*sprites) -> Group}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjxh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjuh&hh'h]h)Kubh)}(hA simple container for Sprite objects. This class can be inherited to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations:h]hA simple container for Sprite objects. This class can be inherited to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjuh&hubj)}(hin test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Spritesh]hin test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjuh&hubh)}(hThe Sprites in the Group are ordered only on python 3.6 and higher. Below python 3.6 drawing and iterating over the Sprites is in no particular order.h]hThe Sprites in the Group are ordered only on python 3.6 and higher. Below python 3.6 drawing and iterating over the Sprites is in no particular order.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjuh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j&sprites() (pygame.sprite.Group method)pygame.sprite.Group.spriteshNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hspritesh](j)}(hjh]hsprites}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjQj Group.spritesjjGroupspritesjGroup.sprites()uh%jh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`list of the Sprites this Group contains`h]h)}(hj h]h'list of the Sprites this Group contains}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`sprites() -> sprite_list`h]h)}(hj/ h]hsprites() -> sprite_list}hj1 sbah}(h]h]j)ah]h]h!]uh%hhj- ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturn a list of all the Sprites this group contains. You can also get an iterator from the group, but you cannot iterate over a Group while modifying it.h]hReturn a list of all the Sprites this group contains. You can also get an iterator from the group, but you cannot iterate over a Group while modifying it.}hjJ sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Group.sprites ##h]h## Group.sprites ##}hjX sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jo j^jp j_jp j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#copy() (pygame.sprite.Group method)pygame.sprite.Group.copyhNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hcopyh](j)}(hj h]hcopy}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.copyjjGroupcopyj Group.copy()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`duplicate the Group`h]h)}(hj h]hduplicate the Group}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`copy() -> Group`h]h)}(hj h]hcopy() -> Group}hj sbah}(h]h]j)ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hCreates a new Group with all the same Sprites as the original. If you have subclassed Group, the new object will have the same (sub-)class as the original. This only works if the derived class's constructor takes the same arguments as the Group class's.h]hCreates a new Group with all the same Sprites as the original. If you have subclassed Group, the new object will have the same (sub-)class as the original. This only works if the derived class's constructor takes the same arguments as the Group class's.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Group.copy ##h]h## Group.copy ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"add() (pygame.sprite.Group method)pygame.sprite.Group.addhNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(haddh](j)}(hj" h]hadd}hj$ sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.addjjGroupaddj Group.add()uh%jh'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`add Sprites to this Group`h]h)}(hjN h]hadd Sprites to this Group}hjP sbah}(h]h]hah]h]h!]uh%hhjL ubah}(h]h]h]h]h!]uh%h)hKhjI h&hh'h]h)Kubhz)}(h:sg:`add(*sprites) -> None`h]h)}(hje h]hadd(*sprites) -> None}hjg sbah}(h]h]j)ah]h]h!]uh%hhjc ubah}(h]h]h]h]h!]uh%h)hKhjI h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjF h&hh'h]h)Kubh)}(hnAdd any number of Sprites to this Group. This will only add Sprites that are not already members of the Group.h]hnAdd any number of Sprites to this Group. This will only add Sprites that are not already members of the Group.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjF h&hubh)}(h?Each sprite argument can also be a iterator containing Sprites.h]h?Each sprite argument can also be a iterator containing Sprites.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjF h&hubh )}(h## Group.add ##h]h## Group.add ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjF h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%remove() (pygame.sprite.Group method)pygame.sprite.Group.removehNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hremoveh](j)}(hj h]hremove}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.removejjGroupremovejGroup.remove()uh%jh'h]h)Mhj h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`remove Sprites from the Group`h]h)}(hj h]hremove Sprites from the Group}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`remove(*sprites) -> None`h]h)}(hj h]hremove(*sprites) -> None}hj sbah}(h]h]j)ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hqRemove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group.h]hqRemove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group.}hj) sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(h?Each sprite argument can also be a iterator containing Sprites.h]h?Each sprite argument can also be a iterator containing Sprites.}hj7 sbah}(h]h]h]h]h!]uh%hh'h]h)M hj h&hubh )}(h## Group.remove ##h]h## Group.remove ##}hjE sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j\ j^j] j_j] j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j"has() (pygame.sprite.Group method)pygame.sprite.Group.hashNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hhash](j)}(hjt h]hhas}hjv sbah}(h]h](jjeh]h]h!]h#h$uh%jhjr h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjr h&hh'h]h)Mubeh}(h]jm ah](jjeh]h]h!]jjjjQj Group.hasjjGrouphasj Group.has()uh%jh'h]h)Mhjo h&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`test if a Group contains Sprites`h]h)}(hj h]h test if a Group contains Sprites}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h:sg:`has(*sprites) -> bool`h]h)}(hj h]hhas(*sprites) -> bool}hj sbah}(h]h]j)ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hReturn True if the Group contains all of the given sprites. This is similar to using the "in" operator on the Group ("if sprite in group: ..."), which tests if a single Sprite belongs to a Group.h]hReturn True if the Group contains all of the given sprites. This is similar to using the "in" operator on the Group ("if sprite in group: ..."), which tests if a single Sprite belongs to a Group.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh)}(h?Each sprite argument can also be a iterator containing Sprites.h]h?Each sprite argument can also be a iterator containing Sprites.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h## Group.has ##h]h## Group.has ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjo h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%update() (pygame.sprite.Group method)pygame.sprite.Group.updatehNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hupdateh](j)}(hj h]hupdate}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.updatejjGroupupdatejGroup.update()uh%jh'h]h)Mhj h&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`call the update method on contained Sprites`h]h)}(hjI h]h+call the update method on contained Sprites}hjK sbah}(h]h]hah]h]h!]uh%hhjG ubah}(h]h]h]h]h!]uh%h)hKhjD h&hh'h]h)Mubhz)}(h%:sg:`update(*args, **kwargs) -> None`h]h)}(hj` h]hupdate(*args, **kwargs) -> None}hjb sbah}(h]h]j)ah]h]h!]uh%hhj^ ubah}(h]h]h]h]h!]uh%h)hKhjD h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjA h&hh'h]h)Mubh)}(hCalls the ``update()`` method on all Sprites in the Group. The base Sprite class has an update method that takes any number of arguments and does nothing. The arguments passed to ``Group.update()`` will be passed to each Sprite.h](h Calls the }hj{ sbh;)}(h ``update()``h]hupdate()}hj sbah}(h]h]h]h]h!]uh%h:hj{ ubh method on all Sprites in the Group. The base Sprite class has an update method that takes any number of arguments and does nothing. The arguments passed to }hj{ sbh;)}(h``Group.update()``h]hGroup.update()}hj sbah}(h]h]h]h]h!]uh%h:hj{ ubh will be passed to each Sprite.}hj{ sbeh}(h]h]h]h]h!]uh%hh'h]h)M!hjA h&hubh)}(hMThere is no way to get the return value from the ``Sprite.update()`` methods.h](h1There is no way to get the return value from the }hj sbh;)}(h``Sprite.update()``h]hSprite.update()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh methods.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)M&hjA h&hubh )}(h## Group.update ##h]h## Group.update ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjA h&hh'h]h)M)ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j#draw() (pygame.sprite.Group method)pygame.sprite.Group.drawhNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hdrawh](j)}(hj h]hdraw}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)M+ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)M+ubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.drawjjGroupdrawj Group.draw()uh%jh'h]h)M+hj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`blit the Sprite images`h]h)}(hj( h]hblit the Sprite images}hj* sbah}(h]h]hah]h]h!]uh%hhj& ubah}(h]h]h]h]h!]uh%h)hKhj# h&hh'h]h)M-ubhz)}(h?:sg:`draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]`h]h)}(hj? h]h9draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]}hjA sbah}(h]h]j)ah]h]h!]uh%hhj= ubah}(h]h]h]h]h!]uh%h)hKhj# h&hh'h]h)M.ubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)M-ubh)}(hXDraws the contained Sprites to the Surface argument. This uses the ``Sprite.image`` attribute for the source surface, and ``Sprite.rect`` for the position. ``special_flags`` is passed to ``Surface.blit()``. ``bgsurf`` is unused in this method but ``LayeredDirty.draw()`` uses it.h](hCDraws the contained Sprites to the Surface argument. This uses the }hjZ sbh;)}(h``Sprite.image``h]h Sprite.image}hjb sbah}(h]h]h]h]h!]uh%h:hjZ ubh' attribute for the source surface, and }hjZ sbh;)}(h``Sprite.rect``h]h Sprite.rect}hjt sbah}(h]h]h]h]h!]uh%h:hjZ ubh for the position. }hjZ sbh;)}(h``special_flags``h]h special_flags}hj sbah}(h]h]h]h]h!]uh%h:hjZ ubh is passed to }hjZ sbh;)}(h``Surface.blit()``h]hSurface.blit()}hj sbah}(h]h]h]h]h!]uh%h:hjZ ubh. }hjZ sbh;)}(h ``bgsurf``h]hbgsurf}hj sbah}(h]h]h]h]h!]uh%h:hjZ ubh is unused in this method but }hjZ sbh;)}(h``LayeredDirty.draw()``h]hLayeredDirty.draw()}hj sbah}(h]h]h]h]h!]uh%h:hjZ ubh uses it.}hjZ sbeh}(h]h]h]h]h!]uh%hh'h]h)M0hj h&hubh)}(hMThe Group does not keep sprites in any order, so the draw order is arbitrary.h]hMThe Group does not keep sprites in any order, so the draw order is arbitrary.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)M6hj h&hubh )}(h## Group.draw ##h]h## Group.draw ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)M9ubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$clear() (pygame.sprite.Group method)pygame.sprite.Group.clearhNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hclearh](j)}(hjh]hclear}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M;ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M;ubeh}(h]j ah](jjeh]h]h!]jjjjQj Group.clearjjGroupclearj Group.clear()uh%jh'h]h)M;hj h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`draw a background over the Sprites`h]h)}(hj=h]h"draw a background over the Sprites}hj?sbah}(h]h]hah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)M=ubhz)}(h-:sg:`clear(Surface_dest, background) -> None`h]h)}(hjTh]h'clear(Surface_dest, background) -> None}hjVsbah}(h]h]j)ah]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%h)hKhj8h&hh'h]h)M>ubeh}(h]h]h]h]h!]uh%huhj5h&hh'h]h)M=ubh)}(hErases the Sprites used in the last ``Group.draw()`` call. The destination Surface is cleared by filling the drawn Sprite positions with the background.h](h$Erases the Sprites used in the last }hjosbh;)}(h``Group.draw()``h]h Group.draw()}hjwsbah}(h]h]h]h]h!]uh%h:hjoubhd call. The destination Surface is cleared by filling the drawn Sprite positions with the background.}hjosbeh}(h]h]h]h]h!]uh%hh'h]h)M@hj5h&hubh)}(hXThe background is usually a Surface image the same dimensions as the destination Surface. However, it can also be a callback function that takes two arguments; the destination Surface and an area to clear. The background callback function will be called several times each clear.h]hXThe background is usually a Surface image the same dimensions as the destination Surface. However, it can also be a callback function that takes two arguments; the destination Surface and an area to clear. The background callback function will be called several times each clear.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MDhj5h&hubh)}(hGHere is an example callback that will clear the Sprites with solid red:h]hGHere is an example callback that will clear the Sprites with solid red:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)MIhj5h&hubj)}(hPdef clear_callback(surf, rect): color = 255, 0, 0 surf.fill(color, rect)h]hPdef clear_callback(surf, rect): color = 255, 0, 0 surf.fill(color, rect)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MMhj5h&hubh )}(h## Group.clear ##h]h## Group.clear ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj5h&hh'h]h)MQubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$empty() (pygame.sprite.Group method)pygame.sprite.Group.emptyhNtauh%hdhjuh&hh'Nh)Nubj)}(hhh](j)}(hemptyh](j)}(hjh]hempty}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MSubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MSubeh}(h]jah](jjeh]h]h!]jjjjQj Group.emptyjjGroupemptyj Group.empty()uh%jh'h]h)MShjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`remove all Sprites`h]h)}(hjh]hremove all Sprites}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MUubhz)}(h:sg:`empty() -> None`h]h)}(hj+h]hempty() -> None}hj-sbah}(h]h]j)ah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MVubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)MUubh)}(h$Removes all Sprites from this Group.h]h$Removes all Sprites from this Group.}hjFsbah}(h]h]h]h]h!]uh%hh'h]h)MXhj h&hubh )}(h## Group.empty ##h]h## Group.empty ##}hjTsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)MZubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jkj^jlj_jlj`jajbjcjdjejfuh%jh&hhjuh'Nh)Nubh )}(h## pygame.sprite.Group ##h]h## pygame.sprite.Group ##}hjpsbah}(h]h]h]h]h!]h#h$uh%h hjuh&hh'h]h)M\ubeh}(h]h]h]h]h!]uh%jhjLh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(WeakDirtySprite (class in pygame.sprite)pygame.sprite.WeakDirtySpritehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hWeakDirtySpriteh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M^ubj)}(hjh]hWeakDirtySprite}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M^ubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)M^hjh&hubj)}(hhh]hv)}(hhh](hz)}(hZ:sl:`A subclass of WeakSprite and DirtySprite that combines the benefits of both classes.`h]h)}(hjh]hTA subclass of WeakSprite and DirtySprite that combines the benefits of both classes.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M`ubhz)}(h1:sg:`WeakDirtySprite(*groups) -> WeakDirtySprite`h]h)}(hjh]h+WeakDirtySprite(*groups) -> WeakDirtySprite}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Maubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M`ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$RenderPlain (class in pygame.sprite)pygame.sprite.RenderPlainhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h RenderPlainh](j)}(hpygame.sprite.h]hpygame.sprite.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mcubj)}(hjh]h RenderPlain}hj.sbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mcubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)Mchjh&hubj)}(hhh](hv)}(hhh]hz)}(h!:sl:`Same as pygame.sprite.Group`h]h)}(hjJh]hSame as pygame.sprite.Group}hjLsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)Meubah}(h]h]h]h]h!]uh%huhjBh&hh'h]h)Meubh)}(hXThis class is an alias to ``pygame.sprite.Group()``. It has no additional functionality.h](hThis class is an alias to }hjesbh;)}(h``pygame.sprite.Group()``h]hpygame.sprite.Group()}hjmsbah}(h]h]h]h]h!]uh%h:hjeubh%. It has no additional functionality.}hjesbeh}(h]h]h]h]h!]uh%hh'h]h)MghjBh&hubh )}(h## pygame.sprite.RenderClear ##h]h## pygame.sprite.RenderClear ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjBh&hh'h]h)Miubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j$RenderClear (class in pygame.sprite)pygame.sprite.RenderClearhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h RenderClearh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mkubj)}(hjh]h RenderClear}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mkubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)Mkhjh&hubj)}(hhh](hv)}(hhh]hz)}(h!:sl:`Same as pygame.sprite.Group`h]h)}(hjh]hSame as pygame.sprite.Group}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mmubah}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mmubh)}(hXThis class is an alias to ``pygame.sprite.Group()``. It has no additional functionality.h](hThis class is an alias to }hjsbh;)}(h``pygame.sprite.Group()``h]hpygame.sprite.Group()}hjsbah}(h]h]h]h]h!]uh%h:hjubh%. It has no additional functionality.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mohjh&hubh )}(h## pygame.sprite.RenderClear ##h]h## pygame.sprite.RenderClear ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mqubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]j2j^j3j_j3j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&RenderUpdates (class in pygame.sprite)pygame.sprite.RenderUpdateshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h RenderUpdatesh](j)}(hpygame.sprite.h]hpygame.sprite.}hjLsbah}(h]h](jjeh]h]h!]h#h$uh%jhjHh&hh'h]h)Msubj)}(hjJh]h RenderUpdates}hjZsbah}(h]h](jjeh]h]h!]h#h$uh%jhjHh&hh'h]h)Msubeh}(h]jCah](jjeh]h]h!]jjjhjjJjjjJjjJuh%jh'h]h)MshjEh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`Group sub-class that tracks dirty updates.`h]h)}(hjvh]h*Group sub-class that tracks dirty updates.}hjxsbah}(h]h]hah]h]h!]uh%hhjtubah}(h]h]h]h]h!]uh%h)hKhjqh&hh'h]h)Muubhz)}(h.:sg:`RenderUpdates(*sprites) -> RenderUpdates`h]h)}(hjh]h(RenderUpdates(*sprites) -> RenderUpdates}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjqh&hh'h]h)Mvubeh}(h]h]h]h]h!]uh%huhjnh&hh'h]h)Muubh)}(hThis class is derived from ``pygame.sprite.Group()``. It has an extended ``draw()`` method that tracks the changed areas of the screen.h](hThis class is derived from }hjsbh;)}(h``pygame.sprite.Group()``h]hpygame.sprite.Group()}hjsbah}(h]h]h]h]h!]uh%h:hjubh. It has an extended }hjsbh;)}(h ``draw()``h]hdraw()}hjsbah}(h]h]h]h]h!]uh%h:hjubh4 method that tracks the changed areas of the screen.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mxhjnh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j+draw() (pygame.sprite.RenderUpdates method) pygame.sprite.RenderUpdates.drawhNtauh%hdhjnh&hh'Nh)Nubj)}(hhh](j)}(hdrawh](j)}(hjh]hdraw}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M{ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M{ubeh}(h]jah](jjeh]h]h!]jjjjJjRenderUpdates.drawjj RenderUpdatesdrawjRenderUpdates.draw()uh%jh'h]h)M{hjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`blit the Sprite images and track changed areas`h]h)}(hjh]h.blit the Sprite images and track changed areas}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M}ubhz)}(h>:sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list`h]h)}(hj0h]h8draw(surface, bgsurf=None, special_flags=0) -> Rect_list}hj2sbah}(h]h]j)ah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M~ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M}ubh)}(hX?Draws all the Sprites to the surface, the same as ``Group.draw()``. This method also returns a list of Rectangular areas on the screen that have been changed. The returned changes include areas of the screen that have been affected by previous ``Group.clear()`` calls. ``special_flags`` is passed to ``Surface.blit()``.h](h2Draws all the Sprites to the surface, the same as }hjKsbh;)}(h``Group.draw()``h]h Group.draw()}hjSsbah}(h]h]h]h]h!]uh%h:hjKubh. This method also returns a list of Rectangular areas on the screen that have been changed. The returned changes include areas of the screen that have been affected by previous }hjKsbh;)}(h``Group.clear()``h]h Group.clear()}hjesbah}(h]h]h]h]h!]uh%h:hjKubh calls. }hjKsbh;)}(h``special_flags``h]h special_flags}hjwsbah}(h]h]h]h]h!]uh%h:hjKubh is passed to }hjKsbh;)}(h``Surface.blit()``h]hSurface.blit()}hjsbah}(h]h]h]h]h!]uh%h:hjKubh.}hjKsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hThe returned Rect list should be passed to ``pygame.display.update()``. This will help performance on software driven display modes. This type of updating is usually only helpful on destinations with non-animating backgrounds.h](h+The returned Rect list should be passed to }hjsbh;)}(h``pygame.display.update()``h]hpygame.display.update()}hjsbah}(h]h]h]h]h!]uh%h:hjubh. This will help performance on software driven display modes. This type of updating is usually only helpful on destinations with non-animating backgrounds.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## RenderUpdates.draw ##h]h## RenderUpdates.draw ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjnh'Nh)Nubh )}(h!## pygame.sprite.RenderUpdates ##h]h!## pygame.sprite.RenderUpdates ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjnh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjEh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*OrderedUpdates() (in module pygame.sprite)pygame.sprite.OrderedUpdateshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hOrderedUpdatesh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(hj h]hOrderedUpdates}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjhjj jjj jOrderedUpdates()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hF:sl:`RenderUpdates sub-class that draws Sprites in order of addition.`h]h)}(hjCh]h@RenderUpdates sub-class that draws Sprites in order of addition.}hjEsbah}(h]h]hah]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Mubhz)}(h0:sg:`OrderedUpdates(*sprites) -> OrderedUpdates`h]h)}(hjZh]h*OrderedUpdates(*sprites) -> OrderedUpdates}hj\sbah}(h]h]j)ah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj;h&hh'h]h)Mubh)}(hThis class derives from ``pygame.sprite.RenderUpdates()``. It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups.h](hThis class derives from }hjusbh;)}(h!``pygame.sprite.RenderUpdates()``h]hpygame.sprite.RenderUpdates()}hj}sbah}(h]h]h]h]h!]uh%h:hjuubh. It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups.}hjusbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj;h&hubh )}(h"## pygame.sprite.OrderedUpdates ##h]h"## pygame.sprite.OrderedUpdates ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj;h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'LayeredUpdates (class in pygame.sprite)pygame.sprite.LayeredUpdateshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hLayeredUpdatesh](j)}(hpygame.sprite.h]hpygame.sprite.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]hLayeredUpdates}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hY:sl:`LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.`h]h)}(hjh]hSLayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h::sg:`LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates`h]h)}(hjh]h4LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates}hj sbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hBThis group is fully compatible with :class:`pygame.sprite.Sprite`.h](h$This group is fully compatible with }hj"sbh6)}(h:class:`pygame.sprite.Sprite`h]h;)}(hj,h]hpygame.sprite.Sprite}hj.sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj*ubah}(h]h]h]h]h!]refdochS refdomainj8reftypeclass refexplicitrefwarnhYjhZjh[pygame.sprite.Spriteuh%h5h'h]h)Mhj"ubh.}hj"sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hxYou can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0.h]hxYou can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0.}hjTsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hX3If the sprite you add has an attribute _layer then that layer will be used. If the \**kwarg contains 'layer' then the sprites passed will be added to that layer (overriding the ``sprite.layer`` attribute). If neither sprite has attribute layer nor \**kwarg then the default layer is used to add the sprites.h](hIf the sprite you add has an attribute _layer then that layer will be used. If the **kwarg contains 'layer' then the sprites passed will be added to that layer (overriding the }hjbsbh;)}(h``sprite.layer``h]h sprite.layer}hjjsbah}(h]h]h]h]h!]uh%h:hjbubhr attribute). If neither sprite has attribute layer nor **kwarg then the default layer is used to add the sprites.}hjbsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubhversionmodified)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jaddedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Mubah}(h]h]h]h]h!]type versionaddedversion1.8uh%jh&hh'h]h)Mhjubhe)}(hhh]h}(h]h]h]h]h!]entries](j+add() (pygame.sprite.LayeredUpdates method) pygame.sprite.LayeredUpdates.addhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(haddh](j)}(hjh]hadd}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.addjjLayeredUpdatesaddjLayeredUpdates.add()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`add a sprite or sequence of sprites to a group`h]h)}(hjh]h.add a sprite or sequence of sprites to a group}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h%:sg:`add(*sprites, **kwargs) -> None`h]h)}(hjh]hadd(*sprites, **kwargs) -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXIf the ``sprite(s)`` have an attribute layer then that is used for the layer. If \**kwargs contains 'layer' then the ``sprite(s)`` will be added to that argument (overriding the sprite layer attribute). If neither is passed then the ``sprite(s)`` will be added to the default layer.h](hIf the }hjsbh;)}(h ``sprite(s)``h]h sprite(s)}hj%sbah}(h]h]h]h]h!]uh%h:hjubha have an attribute layer then that is used for the layer. If **kwargs contains 'layer' then the }hjsbh;)}(h ``sprite(s)``h]h sprite(s)}hj7sbah}(h]h]h]h]h!]uh%h:hjubhg will be added to that argument (overriding the sprite layer attribute). If neither is passed then the }hjsbh;)}(h ``sprite(s)``h]h sprite(s)}hjIsbah}(h]h]h]h]h!]uh%h:hjubh$ will be added to the default layer.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## LayeredUpdates.add ##h]h## LayeredUpdates.add ##}hjasbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jxj^jyj_jyj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j/sprites() (pygame.sprite.LayeredUpdates method)$pygame.sprite.LayeredUpdates.spriteshNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hspritesh](j)}(hjh]hsprites}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.spritesjjLayeredUpdatesspritesjLayeredUpdates.sprites()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h?:sl:`returns a ordered list of sprites (first back, last top).`h]h)}(hjh]h9returns a ordered list of sprites (first back, last top).}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`sprites() -> sprites`h]h)}(hjh]hsprites() -> sprites}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h## LayeredUpdates.sprites ##h]h## LayeredUpdates.sprites ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,draw() (pygame.sprite.LayeredUpdates method)!pygame.sprite.LayeredUpdates.drawhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hdrawh](j)}(hjh]hdraw}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.drawjjLayeredUpdatesdrawjLayeredUpdates.draw()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hB:sl:`draw all sprites in the right order onto the passed surface.`h]h)}(hjIh]h:sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list`h]h)}(hj`h]h8draw(surface, bgsurf=None, special_flags=0) -> Rect_list}hjbsbah}(h]h]j)ah]h]h!]uh%hhj^ubah}(h]h]h]h]h!]uh%h)hKhjDh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjAh&hh'h]h)Mubh )}(h## LayeredUpdates.draw ##h]h## LayeredUpdates.draw ##}hj{sbah}(h]h]h]h]h!]h#h$uh%h hjAh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j6get_sprites_at() (pygame.sprite.LayeredUpdates method)+pygame.sprite.LayeredUpdates.get_sprites_athNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_sprites_ath](j)}(hjh]hget_sprites_at}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.get_sprites_atjjLayeredUpdatesget_sprites_atjLayeredUpdates.get_sprites_at()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h7:sl:`returns a list with all sprites at that position.`h]h)}(hjh]h1returns a list with all sprites at that position.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h.:sg:`get_sprites_at(pos) -> colliding_sprites`h]h)}(hjh]h(get_sprites_at(pos) -> colliding_sprites}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hBottom sprites first, top last.h]hBottom sprites first, top last.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h### LayeredUpdates.get_sprites_at ##h]h### LayeredUpdates.get_sprites_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j-j^j.j_j.j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2get_sprite() (pygame.sprite.LayeredUpdates method)'pygame.sprite.LayeredUpdates.get_spritehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_spriteh](j)}(hjEh]h get_sprite}hjGsbah}(h]h](jjeh]h]h!]h#h$uh%jhjCh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjCh&hh'h]h)Mubeh}(h]j>ah](jjeh]h]h!]jjjjjLayeredUpdates.get_spritejjLayeredUpdates get_spritejLayeredUpdates.get_sprite()uh%jh'h]h)Mhj@h&hubj)}(hhh](hv)}(hhh](hz)}(hA:sl:`returns the sprite at the index idx from the groups sprites`h]h)}(hjqh]h;returns the sprite at the index idx from the groups sprites}hjssbah}(h]h]hah]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%h)hKhjlh&hh'h]h)Mubhz)}(h:sg:`get_sprite(idx) -> sprite`h]h)}(hjh]hget_sprite(idx) -> sprite}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjlh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjih&hh'h]h)Mubh)}(h7Raises IndexOutOfBounds if the idx is not within range.h]h7Raises IndexOutOfBounds if the idx is not within range.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjih&hubh )}(h## LayeredUpdates.get_sprite ##h]h## LayeredUpdates.get_sprite ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjih&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj@h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j?remove_sprites_of_layer() (pygame.sprite.LayeredUpdates method)4pygame.sprite.LayeredUpdates.remove_sprites_of_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hremove_sprites_of_layerh](j)}(hjh]hremove_sprites_of_layer}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjj&LayeredUpdates.remove_sprites_of_layerjjLayeredUpdatesremove_sprites_of_layerj(LayeredUpdates.remove_sprites_of_layer()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(hB:sl:`removes all sprites from a layer and returns them as a list.`h]h)}(hj h]h sprites`h]h)}(hj#h]h,remove_sprites_of_layer(layer_nr) -> sprites}hj%sbah}(h]h]j)ah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h,## LayeredUpdates.remove_sprites_of_layer ##h]h,## LayeredUpdates.remove_sprites_of_layer ##}hj>sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jUj^jVj_jVj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.layers() (pygame.sprite.LayeredUpdates method)#pygame.sprite.LayeredUpdates.layershNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hlayersh](j)}(hjmh]hlayers}hjosbah}(h]h](jjeh]h]h!]h#h$uh%jhjkh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjkh&hh'h]h)Mubeh}(h]jfah](jjeh]h]h!]jjjjjLayeredUpdates.layersjjLayeredUpdateslayersjLayeredUpdates.layers()uh%jh'h]h)Mhjhh&hubj)}(hhh](hv)}(hhh](hz)}(hG:sl:`returns a list of layers defined (unique), sorted from bottom up.`h]h)}(hjh]hAreturns a list of layers defined (unique), sorted from bottom up.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`layers() -> layers`h]h)}(hjh]hlayers() -> layers}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h## LayeredUpdates.layers ##h]h## LayeredUpdates.layers ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjhh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4change_layer() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.change_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h change_layerh](j)}(hjh]h change_layer}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.change_layerjjLayeredUpdates change_layerjLayeredUpdates.change_layer()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`changes the layer of the sprite`h]h)}(hj&h]hchanges the layer of the sprite}hj(sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubhz)}(h-:sg:`change_layer(sprite, new_layer) -> None`h]h)}(hj=h]h'change_layer(sprite, new_layer) -> None}hj?sbah}(h]h]j)ah]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(h?sprite must have been added to the renderer. It is not checked.h]h?sprite must have been added to the renderer. It is not checked.}hjXsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h!## LayeredUpdates.change_layer ##h]h!## LayeredUpdates.change_layer ##}hjfsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j}j^j~j_j~j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j;get_layer_of_sprite() (pygame.sprite.LayeredUpdates method)0pygame.sprite.LayeredUpdates.get_layer_of_spritehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_layer_of_spriteh](j)}(hjh]hget_layer_of_sprite}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjj"LayeredUpdates.get_layer_of_spritejjLayeredUpdatesget_layer_of_spritej$LayeredUpdates.get_layer_of_sprite()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h4:sl:`returns the layer that sprite is currently in.`h]h)}(hjh]h.returns the layer that sprite is currently in.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h*:sg:`get_layer_of_sprite(sprite) -> layer`h]h)}(hjh]h$get_layer_of_sprite(sprite) -> layer}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hAIf the sprite is not found then it will return the default layer.h]hAIf the sprite is not found then it will return the default layer.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h(## LayeredUpdates.get_layer_of_sprite ##h]h(## LayeredUpdates.get_layer_of_sprite ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j5get_top_layer() (pygame.sprite.LayeredUpdates method)*pygame.sprite.LayeredUpdates.get_top_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h get_top_layerh](j)}(hj0h]h get_top_layer}hj2sbah}(h]h](jjeh]h]h!]h#h$uh%jhj.h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj.h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jjjjjLayeredUpdates.get_top_layerjjLayeredUpdates get_top_layerjLayeredUpdates.get_top_layer()uh%jh'h]h)Mhj+h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`returns the top layer`h]h)}(hj\h]hreturns the top layer}hj^sbah}(h]h]hah]h]h!]uh%hhjZubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)Mubhz)}(h:sg:`get_top_layer() -> layer`h]h)}(hjsh]hget_top_layer() -> layer}hjusbah}(h]h]j)ah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjWh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjTh&hh'h]h)Mubh )}(h"## LayeredUpdates.get_top_layer ##h]h"## LayeredUpdates.get_top_layer ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjTh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj+h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j8get_bottom_layer() (pygame.sprite.LayeredUpdates method)-pygame.sprite.LayeredUpdates.get_bottom_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_bottom_layerh](j)}(hjh]hget_bottom_layer}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.get_bottom_layerjjLayeredUpdatesget_bottom_layerj!LayeredUpdates.get_bottom_layer()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`returns the bottom layer`h]h)}(hjh]hreturns the bottom layer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h!:sg:`get_bottom_layer() -> layer`h]h)}(hjh]hget_bottom_layer() -> layer}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h%## LayeredUpdates.get_bottom_layer ##h]h%## LayeredUpdates.get_bottom_layer ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j2j^j3j_j3j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j5move_to_front() (pygame.sprite.LayeredUpdates method)*pygame.sprite.LayeredUpdates.move_to_fronthNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h move_to_fronth](j)}(hjJh]h move_to_front}hjLsbah}(h]h](jjeh]h]h!]h#h$uh%jhjHh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjHh&hh'h]h)Mubeh}(h]jCah](jjeh]h]h!]jjjjjLayeredUpdates.move_to_frontjjLayeredUpdates move_to_frontjLayeredUpdates.move_to_front()uh%jh'h]h)MhjEh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`brings the sprite to front layer`h]h)}(hjvh]h brings the sprite to front layer}hjxsbah}(h]h]hah]h]h!]uh%hhjtubah}(h]h]h]h]h!]uh%h)hKhjqh&hh'h]h)M ubhz)}(h#:sg:`move_to_front(sprite) -> None`h]h)}(hjh]hmove_to_front(sprite) -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjqh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhjnh&hh'h]h)M ubh)}(hdBrings the sprite to front, changing sprite layer to topmost layer (added at the end of that layer).h]hdBrings the sprite to front, changing sprite layer to topmost layer (added at the end of that layer).}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hjnh&hubh )}(h"## LayeredUpdates.move_to_front ##h]h"## LayeredUpdates.move_to_front ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjnh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjEh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4move_to_back() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.move_to_backhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h move_to_backh](j)}(hjh]h move_to_back}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.move_to_backjjLayeredUpdates move_to_backjLayeredUpdates.move_to_back()uh%jh'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`moves the sprite to the bottom layer`h]h)}(hjh]h$moves the sprite to the bottom layer}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubhz)}(h":sg:`move_to_back(sprite) -> None`h]h)}(hj(h]hmove_to_back(sprite) -> None}hj*sbah}(h]h]j)ah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mubh)}(hhMoves the sprite to the bottom layer, moving it behind all other layers and adding one additional layer.h]hhMoves the sprite to the bottom layer, moving it behind all other layers and adding one additional layer.}hjCsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj h&hubh )}(h!## LayeredUpdates.move_to_back ##h]h!## LayeredUpdates.move_to_back ##}hjQsbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jhj^jij_jij`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j6get_top_sprite() (pygame.sprite.LayeredUpdates method)+pygame.sprite.LayeredUpdates.get_top_spritehNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_top_spriteh](j)}(hjh]hget_top_sprite}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj~h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj~h&hh'h]h)Mubeh}(h]jyah](jjeh]h]h!]jjjjjLayeredUpdates.get_top_spritejjLayeredUpdatesget_top_spritejLayeredUpdates.get_top_sprite()uh%jh'h]h)Mhj{h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`returns the topmost sprite`h]h)}(hjh]hreturns the topmost sprite}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h :sg:`get_top_sprite() -> Sprite`h]h)}(hjh]hget_top_sprite() -> Sprite}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh )}(h### LayeredUpdates.get_top_sprite ##h]h### LayeredUpdates.get_top_sprite ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj{h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j>get_sprites_from_layer() (pygame.sprite.LayeredUpdates method)3pygame.sprite.LayeredUpdates.get_sprites_from_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_sprites_from_layerh](j)}(hj h]hget_sprites_from_layer}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)M"ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)M"ubeh}(h]jah](jjeh]h]h!]jjjjj%LayeredUpdates.get_sprites_from_layerjjLayeredUpdatesget_sprites_from_layerj'LayeredUpdates.get_sprites_from_layer()uh%jh'h]h)M"hjh&hubj)}(hhh](hv)}(hhh](hz)}(hG:sl:`returns all sprites from a layer, ordered by how they where added`h]h)}(hj9h]hAreturns all sprites from a layer, ordered by how they where added}hj;sbah}(h]h]hah]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)M$ubhz)}(h.:sg:`get_sprites_from_layer(layer) -> sprites`h]h)}(hjPh]h(get_sprites_from_layer(layer) -> sprites}hjRsbah}(h]h]j)ah]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%h)hKhj4h&hh'h]h)M%ubeh}(h]h]h]h]h!]uh%huhj1h&hh'h]h)M$ubh)}(hReturns all sprites from a layer, ordered by how they where added. It uses linear search and the sprites are not removed from layer.h]hReturns all sprites from a layer, ordered by how they where added. It uses linear search and the sprites are not removed from layer.}hjksbah}(h]h]h]h]h!]uh%hh'h]h)M'hj1h&hubh )}(h+## LayeredUpdates.get_sprites_from_layer ##h]h+## LayeredUpdates.get_sprites_from_layer ##}hjysbah}(h]h]h]h]h!]h#h$uh%h hj1h&hh'h]h)M*ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jj^jj_jj`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4switch_layer() (pygame.sprite.LayeredUpdates method))pygame.sprite.LayeredUpdates.switch_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h switch_layerh](j)}(hjh]h switch_layer}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)M,ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M,ubeh}(h]jah](jjeh]h]h!]jjjjjLayeredUpdates.switch_layerjjLayeredUpdates switch_layerjLayeredUpdates.switch_layer()uh%jh'h]h)M,hjh&hubj)}(hhh](hv)}(hhh](hz)}(h0:sl:`switches the sprites from layer1 to layer2`h]h)}(hjh]h*switches the sprites from layer1 to layer2}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M.ubhz)}(h0:sg:`switch_layer(layer1_nr, layer2_nr) -> None`h]h)}(hjh]h*switch_layer(layer1_nr, layer2_nr) -> None}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M/ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M.ubh)}(h0The layers number must exist, it is not checked.h]h0The layers number must exist, it is not checked.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M1hjh&hubh )}(h!## LayeredUpdates.switch_layer ##h]h!## LayeredUpdates.switch_layer ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j+j^j,j_j,j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubh )}(h"## pygame.sprite.LayeredUpdates ##h]h"## pygame.sprite.LayeredUpdates ##}hj0sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M5ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]jGj^jHj_jHj`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j%LayeredDirty (class in pygame.sprite)pygame.sprite.LayeredDirtyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h LayeredDirtyh](j)}(hpygame.sprite.h]hpygame.sprite.}hjasbah}(h]h](jjeh]h]h!]h#h$uh%jhj]h&hh'h]h)M7ubj)}(hj_h]h LayeredDirty}hjosbah}(h]h](jjeh]h]h!]h#h$uh%jhj]h&hh'h]h)M7ubeh}(h]jXah](jjeh]h]h!]jjjhjj_jjj_jj_uh%jh'h]h)M7hjZh&hubj)}(hhh](hv)}(hhh](hz)}(hP:sl:`LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.`h]h)}(hjh]hJLayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M9ubhz)}(h6:sg:`LayeredDirty(*sprites, **kwargs) -> LayeredDirty`h]h)}(hjh]h0LayeredDirty(*sprites, **kwargs) -> LayeredDirty}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M:ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M9ubh)}(hgThis group requires :class:`pygame.sprite.DirtySprite` or any sprite that has the following attributes:h](hThis group requires }hjsbh6)}(h":class:`pygame.sprite.DirtySprite`h]h;)}(hjh]hpygame.sprite.DirtySprite}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYjhZj_h[pygame.sprite.DirtySpriteuh%h5h'h]h)M<hjubh1 or any sprite that has the following attributes:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M<hjh&hubj)}(h@image, rect, dirty, visible, blendmode (see doc of DirtySprite).h]h@image, rect, dirty, visible, blendmode (see doc of DirtySprite).}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MAhjh&hubh)}(hX It uses the dirty flag technique and is therefore faster than the :class:`pygame.sprite.RenderUpdates` if you have many static sprites. It also switches automatically between dirty rect update and full screen drawing, so you do not have to worry what would be faster.h](hBIt uses the dirty flag technique and is therefore faster than the }hjsbh6)}(h$:class:`pygame.sprite.RenderUpdates`h]h;)}(hjh]hpygame.sprite.RenderUpdates}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYjhZj_h[pygame.sprite.RenderUpdatesuh%h5h'h]h)MChjubh if you have many static sprites. It also switches automatically between dirty rect update and full screen drawing, so you do not have to worry what would be faster.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)MChjh&hubh)}(hhSame as for the :class:`pygame.sprite.Group`. You can specify some additional attributes through kwargs:h](hSame as for the }hj/sbh6)}(h:class:`pygame.sprite.Group`h]h;)}(hj9h]hpygame.sprite.Group}hj;sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj7ubah}(h]h]h]h]h!]refdochS refdomainjEreftypeclass refexplicitrefwarnhYjhZj_h[pygame.sprite.Groupuh%h5h'h]h)MHhj/ubh<. You can specify some additional attributes through kwargs:}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)MHhjh&hubj)}(h_use_update: True/False default is False _default_layer: default layer where sprites without a layer are added. _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode, defaults to 1000./80 == 1000./fpsh]h_use_update: True/False default is False _default_layer: default layer where sprites without a layer are added. _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode, defaults to 1000./80 == 1000./fps}hjasbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MMhjh&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjwsbah}(h]h](jjeh]h]h!]uh%hhjsubah}(h]h]h]h]h!] translatableuh%hhjoh&hh'h]h)MSubah}(h]h]h]h]h!]j versionaddedj1.8uh%jh&hh'h]h)MRhjubhe)}(hhh]h}(h]h]h]h]h!]entries](j*draw() (pygame.sprite.LayeredDirty method)pygame.sprite.LayeredDirty.drawhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hdrawh](j)}(hjh]hdraw}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)MTubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MTubeh}(h]jah](jjeh]h]h!]jjjj_jLayeredDirty.drawjj LayeredDirtydrawjLayeredDirty.draw()uh%jh'h]h)MThjh&hubj)}(hhh](hv)}(hhh](hz)}(hB:sl:`draw all sprites in the right order onto the passed surface.`h]h)}(hjh]h Rect_list`h]h)}(hjh]h;draw(surface, bgsurf=None, special_flags=None) -> Rect_list}hjsbah}(h]h]j)ah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MWubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MVubh)}(hXMYou can pass the background too. If a background is already set, then the bgsurf argument has no effect. If present, the ``special_flags`` argument is always passed to ``Surface.blit()``, overriding ``DirtySprite.blendmode``. If ``special_flags`` is not present, ``DirtySprite.blendmode`` is passed to the ``Surface.blit()`` instead.h](hyYou can pass the background too. If a background is already set, then the bgsurf argument has no effect. If present, the }hj sbh;)}(h``special_flags``h]h special_flags}hj sbah}(h]h]h]h]h!]uh%h:hj ubh argument is always passed to }hj sbh;)}(h``Surface.blit()``h]hSurface.blit()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh , overriding }hj sbh;)}(h``DirtySprite.blendmode``h]hDirtySprite.blendmode}hj1 sbah}(h]h]h]h]h!]uh%h:hj ubh. If }hj sbh;)}(h``special_flags``h]h special_flags}hjC sbah}(h]h]h]h]h!]uh%h:hj ubh is not present, }hj sbh;)}(h``DirtySprite.blendmode``h]hDirtySprite.blendmode}hjU sbah}(h]h]h]h]h!]uh%h:hj ubh is passed to the }hj sbh;)}(h``Surface.blit()``h]hSurface.blit()}hjg sbah}(h]h]h]h]h!]uh%h:hj ubh instead.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)MYhjh&hubh )}(h## LayeredDirty.draw ##h]h## LayeredDirty.draw ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M_ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j j^j j_j j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+clear() (pygame.sprite.LayeredDirty method) pygame.sprite.LayeredDirty.clearhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hclearh](j)}(hj h]hclear}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Maubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Maubeh}(h]j ah](jjeh]h]h!]jjjj_jLayeredDirty.clearjj LayeredDirtyclearjLayeredDirty.clear()uh%jh'h]h)Mahj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`used to set background`h]h)}(hj h]hused to set background}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mcubhz)}(h!:sg:`clear(surface, bgd) -> None`h]h)}(hj h]hclear(surface, bgd) -> None}hj sbah}(h]h]j)ah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Mdubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Mcubh )}(h## LayeredDirty.clear ##h]h## LayeredDirty.clear ##}hj !sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mfubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j#!j^j$!j_j$!j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2repaint_rect() (pygame.sprite.LayeredDirty method)'pygame.sprite.LayeredDirty.repaint_recthNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h repaint_recth](j)}(hj;!h]h repaint_rect}hj=!sbah}(h]h](jjeh]h]h!]h#h$uh%jhj9!h&hh'h]h)Mhubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj9!h&hh'h]h)Mhubeh}(h]j4!ah](jjeh]h]h!]jjjj_jLayeredDirty.repaint_rectjj LayeredDirty repaint_rectjLayeredDirty.repaint_rect()uh%jh'h]h)Mhhj6!h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`repaints the given area`h]h)}(hjg!h]hrepaints the given area}hji!sbah}(h]h]hah]h]h!]uh%hhje!ubah}(h]h]h]h]h!]uh%h)hKhjb!h&hh'h]h)Mjubhz)}(h':sg:`repaint_rect(screen_rect) -> None`h]h)}(hj~!h]h!repaint_rect(screen_rect) -> None}hj!sbah}(h]h]j)ah]h]h!]uh%hhj|!ubah}(h]h]h]h]h!]uh%h)hKhjb!h&hh'h]h)Mkubeh}(h]h]h]h]h!]uh%huhj_!h&hh'h]h)Mjubh)}(h%screen_rect is in screen coordinates.h]h%screen_rect is in screen coordinates.}hj!sbah}(h]h]h]h]h!]uh%hh'h]h)Mmhj_!h&hubh )}(h## LayeredDirty.repaint_rect ##h]h## LayeredDirty.repaint_rect ##}hj!sbah}(h]h]h]h]h!]h#h$uh%h hj_!h&hh'h]h)Moubeh}(h]h]h]h]h!]uh%jhj6!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j!j^j!j_j!j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.set_clip() (pygame.sprite.LayeredDirty method)#pygame.sprite.LayeredDirty.set_cliphNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hset_cliph](j)}(hj!h]hset_clip}hj!sbah}(h]h](jjeh]h]h!]h#h$uh%jhj!h&hh'h]h)Mqubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj!h&hh'h]h)Mqubeh}(h]j!ah](jjeh]h]h!]jjjj_jLayeredDirty.set_clipjj LayeredDirtyset_clipjLayeredDirty.set_clip()uh%jh'h]h)Mqhj!h&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`clip the area where to draw. Just pass None (default) to reset the clip`h]h)}(hj"h]hGclip the area where to draw. Just pass None (default) to reset the clip}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Msubhz)}(h(:sg:`set_clip(screen_rect=None) -> None`h]h)}(hj"h]h"set_clip(screen_rect=None) -> None}hj"sbah}(h]h]j)ah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mtubeh}(h]h]h]h]h!]uh%huhj!h&hh'h]h)Msubh )}(h## LayeredDirty.set_clip ##h]h## LayeredDirty.set_clip ##}hj4"sbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Mvubeh}(h]h]h]h]h!]uh%jhj!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]jK"j^jL"j_jL"j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.get_clip() (pygame.sprite.LayeredDirty method)#pygame.sprite.LayeredDirty.get_cliphNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hget_cliph](j)}(hjc"h]hget_clip}hje"sbah}(h]h](jjeh]h]h!]h#h$uh%jhja"h&hh'h]h)Mxubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhja"h&hh'h]h)Mxubeh}(h]j\"ah](jjeh]h]h!]jjjj_jLayeredDirty.get_clipjj LayeredDirtyget_clipjLayeredDirty.get_clip()uh%jh'h]h)Mxhj^"h&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`clip the area where to draw. Just pass None (default) to reset the clip`h]h)}(hj"h]hGclip the area where to draw. Just pass None (default) to reset the clip}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Mzubhz)}(h:sg:`get_clip() -> Rect`h]h)}(hj"h]hget_clip() -> Rect}hj"sbah}(h]h]j)ah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M{ubeh}(h]h]h]h]h!]uh%huhj"h&hh'h]h)Mzubh )}(h## LayeredDirty.get_clip ##h]h## LayeredDirty.get_clip ##}hj"sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)M}ubeh}(h]h]h]h]h!]uh%jhj^"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j"j^j"j_j"j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j2change_layer() (pygame.sprite.LayeredDirty method)'pygame.sprite.LayeredDirty.change_layerhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(h change_layerh](j)}(hj"h]h change_layer}hj"sbah}(h]h](jjeh]h]h!]h#h$uh%jhj"h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj"h&hh'h]h)Mubeh}(h]j"ah](jjeh]h]h!]jjjj_jLayeredDirty.change_layerjj LayeredDirty change_layerjLayeredDirty.change_layer()uh%jh'h]h)Mhj"h&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`changes the layer of the sprite`h]h)}(hj#h]hchanges the layer of the sprite}hj#sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubhz)}(h-:sg:`change_layer(sprite, new_layer) -> None`h]h)}(hj3#h]h'change_layer(sprite, new_layer) -> None}hj5#sbah}(h]h]j)ah]h]h!]uh%hhj1#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)Mubh)}(h?sprite must have been added to the renderer. It is not checked.h]h?sprite must have been added to the renderer. It is not checked.}hjN#sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj#h&hubh )}(h## LayeredDirty.change_layer ##h]h## LayeredDirty.change_layer ##}hj\#sbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]js#j^jt#j_jt#j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j9set_timing_treshold() (pygame.sprite.LayeredDirty method).pygame.sprite.LayeredDirty.set_timing_tresholdhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hset_timing_tresholdh](j)}(hj#h]hset_timing_treshold}hj#sbah}(h]h](jjeh]h]h!]h#h$uh%jhj#h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj#h&hh'h]h)Mubeh}(h]j#ah](jjeh]h]h!]jjjj_j LayeredDirty.set_timing_tresholdjj LayeredDirtyset_timing_tresholdj"LayeredDirty.set_timing_treshold()uh%jh'h]h)Mhj#h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`sets the threshold in milliseconds`h]h)}(hj#h]h"sets the threshold in milliseconds}hj#sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubhz)}(h*:sg:`set_timing_treshold(time_ms) -> None`h]h)}(hj#h]h$set_timing_treshold(time_ms) -> None}hj#sbah}(h]h]j)ah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj#h&hh'h]h)Mubh)}(h/DEPRECATED: Use set_timing_threshold() instead.h]h/DEPRECATED: Use set_timing_threshold() instead.}hj#sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj#h&hubj)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]h)}(hDeprecated since pygame 2.1.1.h]hDeprecated since pygame 2.1.1.}hj#sbah}(h]h](j deprecatedeh]h]h!]uh%hhj#ubah}(h]h]h]h]h!] translatableuh%hhj#h&hh'h]h)Mubah}(h]h]h]h]h!]j deprecatedj2.1.1uh%jh&hh'h]h)Mhj#ubh )}(h&## LayeredDirty.set_timing_treshold ##h]h&## LayeredDirty.set_timing_treshold ##}hj$sbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj#h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j]j4$j^j5$j_j5$j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j:set_timing_threshold() (pygame.sprite.LayeredDirty method)/pygame.sprite.LayeredDirty.set_timing_thresholdhNtauh%hdhjh&hh'Nh)Nubj)}(hhh](j)}(hset_timing_thresholdh](j)}(hjL$h]hset_timing_threshold}hjN$sbah}(h]h](jjeh]h]h!]h#h$uh%jhjJ$h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjJ$h&hh'h]h)Mubeh}(h]jE$ah](jjeh]h]h!]jjjj_j!LayeredDirty.set_timing_thresholdjj LayeredDirtyset_timing_thresholdj#LayeredDirty.set_timing_threshold()uh%jh'h]h)MhjG$h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`sets the threshold in milliseconds`h]h)}(hjx$h]h"sets the threshold in milliseconds}hjz$sbah}(h]h]hah]h]h!]uh%hhjv$ubah}(h]h]h]h]h!]uh%h)hKhjs$h&hh'h]h)Mubhz)}(h+:sg:`set_timing_threshold(time_ms) -> None`h]h)}(hj$h]h%set_timing_threshold(time_ms) -> None}hj$sbah}(h]h]j)ah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhjs$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjp$h&hh'h]h)Mubh)}(hDefaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second.h]hDefaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second.}hj$sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjp$h&hubj)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]h)}(hNew in pygame 2.1.1.h]hNew in pygame 2.1.1.}hj$sbah}(h]h](jjeh]h]h!]uh%hhj$ubah}(h]h]h]h]h!] translatableuh%hhj$h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj2.1.1uh%jh&hh'h]h)Mhjp$ubh field_list)}(hhh]h field)}(hhh](h field_name)}(hRaisesh]hRaises}hj$sbah}(h]h]h]h]h!]uh%j$hj$h'h]h)Kubh field_body)}(hhh]h)}(h+TypeError -- if time_ms is not int or floath](h6)}(hhh]hliteral_strong)}(h TypeErrorh]h TypeError}hj%sbah}(h]h]h]h]h!]uh%j%hj%ubah}(h]h]h]h]h!] refdomainpy refexplicitreftypeexc reftargetj% refspecific py:modulejpy:classj_uh%h5hj$ubh -- }hj$sbhif }(hj$h&hh'Nh)Nubh;)}(h ``time_ms``h]htime_ms}hj*%sbah}(h]h]h]h]h!]uh%h:hj$h&hh'Nh)Nubh is not int or float}(hj$h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%j$hj$ubeh}(h]h]h]h]h!]uh%j$hj$ubah}(h]h]h]h]h!]uh%j$hjp$h&hh'Nh)Nubh )}(h'## LayeredDirty.set_timing_threshold ##h]h'## LayeredDirty.set_timing_threshold ##}hjT%sbah}(h]h]h]h]h!]h#h$uh%h hjp$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjG$h&hh'Nh)Nubeh}(h]h](j%methodeh]h]h!]j]j%j^jk%j_jk%j`jajbjcjdjejfuh%jh&hhjh'Nh)Nubh )}(h ## pygame.sprite.LayeredDirty ##h]h ## pygame.sprite.LayeredDirty ##}hjo%sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjZh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j]j%j^j%j_j%j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'GroupSingle() (in module pygame.sprite)pygame.sprite.GroupSinglehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h GroupSingleh](j)}(hpygame.sprite.h]hpygame.sprite.}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj%h&hh'h]h)Mubj)}(hj%h]h GroupSingle}hj%sbah}(h]h](jjeh]h]h!]h#h$uh%jhj%h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj%h&hh'h]h)Mubeh}(h]j%ah](jjeh]h]h!]jjjhjj%jjj%j GroupSingle()uh%jh'h]h)Mhj%h&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`Group container that holds a single sprite.`h]h)}(hj%h]h+Group container that holds a single sprite.}hj%sbah}(h]h]hah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)Mubhz)}(h-:sg:`GroupSingle(sprite=None) -> GroupSingle`h]h)}(hj%h]h'GroupSingle(sprite=None) -> GroupSingle}hj%sbah}(h]h]j)ah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj%h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj%h&hh'h]h)Mubh)}(hiThe GroupSingle container only holds a single Sprite. When a new Sprite is added, the old one is removed.h]hiThe GroupSingle container only holds a single Sprite. When a new Sprite is added, the old one is removed.}hj&sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj%h&hubh)}(hThere is a special property, ``GroupSingle.sprite``, that accesses the Sprite that this Group contains. It can be None when the Group is empty. The property can also be assigned to add a Sprite into the GroupSingle container.h](hThere is a special property, }hj&sbh;)}(h``GroupSingle.sprite``h]hGroupSingle.sprite}hj&sbah}(h]h]h]h]h!]uh%h:hj&ubh, that accesses the Sprite that this Group contains. It can be None when the Group is empty. The property can also be assigned to add a Sprite into the GroupSingle container.}hj&sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj%h&hubh )}(h## pygame.sprite.GroupSingle ##h]h## pygame.sprite.GroupSingle ##}hj5&sbah}(h]h]h]h]h!]h#h$uh%h hj%h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj%h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]jL&j^jM&j_jM&j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)spritecollide() (in module pygame.sprite)pygame.sprite.spritecollidehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h spritecollideh](j)}(hpygame.sprite.h]hpygame.sprite.}hjf&sbah}(h]h](jjeh]h]h!]h#h$uh%jhjb&h&hh'h]h)Mubj)}(hjd&h]h spritecollide}hjt&sbah}(h]h](jjeh]h]h!]h#h$uh%jhjb&h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjb&h&hh'h]h)Mubeh}(h]j]&ah](jjeh]h]h!]jjjhjjd&jjjd&jspritecollide()uh%jh'h]h)Mhj_&h&hubj)}(hhh](hv)}(hhh](hz)}(h<:sl:`Find sprites in a group that intersect another sprite.`h]h)}(hj&h]h6Find sprites in a group that intersect another sprite.}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubhz)}(hJ:sg:`spritecollide(sprite, group, dokill, collided = None) -> Sprite_list`h]h)}(hj&h]hDspritecollide(sprite, group, dokill, collided = None) -> Sprite_list}hj&sbah}(h]h]j)ah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)Mubh)}(hReturn a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the ``Sprite.rect`` attribute of each Sprite.h](hReturn a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the }hj&sbh;)}(h``Sprite.rect``h]h Sprite.rect}hj&sbah}(h]h]h]h]h!]uh%h:hj&ubh attribute of each Sprite.}hj&sbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubh)}(hgThe dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group.h]hgThe dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group.}hj&sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubh)}(hXUThe collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.h]hXUThe collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.}hj&sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubh)}(hcollided callables:h]hcollided callables:}hj 'sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubj)}(hTcollide_rect, collide_rect_ratio, collide_circle, collide_circle_ratio, collide_maskh]hTcollide_rect, collide_rect_ratio, collide_circle, collide_circle_ratio, collide_mask}hj'sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Mhj&h&hubh)}(hExample:h]hExample:}hj%'sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj&h&hubj)}(hXC# See if the Sprite block has collided with anything in the Group block_list # The True flag will remove the sprite in block_list blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True) # Check the list of colliding sprites, and add one to the score for each one for block in blocks_hit_list: score +=1h]hXC# See if the Sprite block has collided with anything in the Group block_list # The True flag will remove the sprite in block_list blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True) # Check the list of colliding sprites, and add one to the score for each one for block in blocks_hit_list: score +=1}hj3'sbah}(h]h]h]h]h!]h#h$jjpythonj}uh%jh'h]h)Mhj&h&hubh )}(h!## pygame.sprite.spritecollide ##h]h!## pygame.sprite.spritecollide ##}hjC'sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj_&h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]jZ'j^j['j_j['j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(collide_rect() (in module pygame.sprite)pygame.sprite.collide_recthNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h collide_recth](j)}(hpygame.sprite.h]hpygame.sprite.}hjt'sbah}(h]h](jjeh]h]h!]h#h$uh%jhjp'h&hh'h]h)Mubj)}(hjr'h]h collide_rect}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%jhjp'h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjp'h&hh'h]h)Mubeh}(h]jk'ah](jjeh]h]h!]jjjhjjr'jjjr'jcollide_rect()uh%jh'h]h)Mhjm'h&hubj)}(hhh](hv)}(hhh](hz)}(h;:sl:`Collision detection between two sprites, using rects.`h]h)}(hj'h]h5Collision detection between two sprites, using rects.}hj'sbah}(h]h]hah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj'h&hh'h]h)Mubhz)}(h':sg:`collide_rect(left, right) -> bool`h]h)}(hj'h]h!collide_rect(left, right) -> bool}hj'sbah}(h]h]j)ah]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%h)hKhj'h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj'h&hh'h]h)Mubh)}(hTests for collision between two sprites. Uses the pygame rect colliderect function to calculate the collision. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" attributes.h]hTests for collision between two sprites. Uses the pygame rect colliderect function to calculate the collision. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" attributes.}hj'sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj'h&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj'sbah}(h]h](jjeh]h]h!]uh%hhj'ubah}(h]h]h]h]h!] translatableuh%hhj'h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj1.8uh%jh&hh'h]h)Mhj'ubh )}(h ## pygame.sprite.collide_rect ##h]h ## pygame.sprite.collide_rect ##}hj(sbah}(h]h]h]h]h!]h#h$uh%h hj'h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjm'h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j%(j^j&(j_j&(j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j.collide_rect_ratio() (in module pygame.sprite) pygame.sprite.collide_rect_ratiohNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hcollide_rect_ratioh](j)}(hpygame.sprite.h]hpygame.sprite.}hj?(sbah}(h]h](jjeh]h]h!]h#h$uh%jhj;(h&hh'h]h)Mubj)}(hj=(h]hcollide_rect_ratio}hjM(sbah}(h]h](jjeh]h]h!]h#h$uh%jhj;(h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj;(h&hh'h]h)Mubeh}(h]j6(ah](jjeh]h]h!]jjjhjj=(jjj=(jcollide_rect_ratio()uh%jh'h]h)Mhj8(h&hubj)}(hhh](hv)}(hhh](hz)}(hM:sl:`Collision detection between two sprites, using rects scaled to a ratio.`h]h)}(hjt(h]hGCollision detection between two sprites, using rects scaled to a ratio.}hjv(sbah}(h]h]hah]h]h!]uh%hhjr(ubah}(h]h]h]h]h!]uh%h)hKhjo(h&hh'h]h)Mubhz)}(h4:sg:`collide_rect_ratio(ratio) -> collided_callable`h]h)}(hj(h]h.collide_rect_ratio(ratio) -> collided_callable}hj(sbah}(h]h]j)ah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhjo(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjl(h&hh'h]h)Mubh)}(hmA callable class that checks for collisions between two sprites, using a scaled version of the sprites rects.h]hmA callable class that checks for collisions between two sprites, using a scaled version of the sprites rects.}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjl(h&hubh)}(hIs created with a ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions.h]hIs created with a ratio, the instance is then intended to be passed as a collided callback function to the *collide functions.}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjl(h&hubh)}(hiA ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.h]hiA ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.}hj(sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjl(h&hubj)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj(sbah}(h]h](jjeh]h]h!]uh%hhj(ubah}(h]h]h]h]h!] translatableuh%hhj(h&hh'h]h)Mubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jh&hh'h]h)Mhjl(ubh )}(h&## pygame.sprite.collide_rect_ratio ##h]h&## pygame.sprite.collide_rect_ratio ##}hj(sbah}(h]h]h]h]h!]h#h$uh%h hjl(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhj8(h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j )j^j )j_j )j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*collide_circle() (in module pygame.sprite)pygame.sprite.collide_circlehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hcollide_circleh](j)}(khpygame.sprite.h]hpygame.sprite.}hj&)sbah}(h]h](jjeh]h]h!]h#h$uh%jhj")h&hh'h]h)Mubj)}(hj$)h]hcollide_circle}hj4)sbah}(h]h](jjeh]h]h!]h#h$uh%jhj")h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj")h&hh'h]h)Mubeh}(h]j)ah](jjeh]h]h!]jjjhjj$)jjj$)jcollide_circle()uh%jh'h]h)Mhj)h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`Collision detection between two sprites, using circles.`h]h)}(hj[)h]h7Collision detection between two sprites, using circles.}hj])sbah}(h]h]hah]h]h!]uh%hhjY)ubah}(h]h]h]h]h!]uh%h)hKhjV)h&hh'h]h)Mubhz)}(h):sg:`collide_circle(left, right) -> bool`h]h)}(hjr)h]h#collide_circle(left, right) -> bool}hjt)sbah}(h]h]j)ah]h]h!]uh%hhjp)ubah}(h]h]h]h]h!]uh%h)hKhjV)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjS)h&hh'h]h)Mubh)}(hXTests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute.h]hXTests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute.}hj)sbah}(h]h]h]h]h!]uh%hh'h]h)MhjS)h&hubj)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj)sbah}(h]h](jjeh]h]h!]uh%hhj)ubah}(h]h]h]h]h!] translatableuh%hhj)h&hh'h]h)M ubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jh&hh'h]h)MhjS)ubh )}(h"## pygame.sprite.collide_circle ##h]h"## pygame.sprite.collide_circle ##}hj)sbah}(h]h]h]h]h!]h#h$uh%h hjS)h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%jhj)h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j)j^j)j_j)j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j0collide_circle_ratio() (in module pygame.sprite)"pygame.sprite.collide_circle_ratiohNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hcollide_circle_ratioh](j)}(hpygame.sprite.h]hpygame.sprite.}hj)sbah}(h]h](jjeh]h]h!]h#h$uh%jhj)h&hh'h]h)M ubj)}(hj)h]hcollide_circle_ratio}hj)sbah}(h]h](jjeh]h]h!]h#h$uh%jhj)h&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj)h&hh'h]h)M ubeh}(h]j)ah](jjeh]h]h!]jjjhjj)jjj)jcollide_circle_ratio()uh%jh'h]h)M hj)h&hubj)}(hhh](hv)}(hhh](hz)}(hO:sl:`Collision detection between two sprites, using circles scaled to a ratio.`h]h)}(hj&*h]hICollision detection between two sprites, using circles scaled to a ratio.}hj(*sbah}(h]h]hah]h]h!]uh%hhj$*ubah}(h]h]h]h]h!]uh%h)hKhj!*h&hh'h]h)Mubhz)}(h6:sg:`collide_circle_ratio(ratio) -> collided_callable`h]h)}(hj=*h]h0collide_circle_ratio(ratio) -> collided_callable}hj?*sbah}(h]h]j)ah]h]h!]uh%hhj;*ubah}(h]h]h]h]h!]uh%h)hKhj!*h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj*h&hh'h]h)Mubh)}(hnA callable class that checks for collisions between two sprites, using a scaled version of the sprites radius.h]hnA callable class that checks for collisions between two sprites, using a scaled version of the sprites radius.}hjX*sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj*h&hubh)}(hIs created with a floating point ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions.h]hIs created with a floating point ratio, the instance is then intended to be passed as a collided callback function to the *collide functions.}hjf*sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj*h&hubh)}(hiA ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.h]hiA ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.}hjt*sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj*h&hubh)}(hX The created callable tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap, after scaling the circles radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute.h]hX The created callable tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap, after scaling the circles radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute.}hj*sbah}(h]h]h]h]h!]uh%hh'h]h)Mhj*h&hubj)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj*sbah}(h]h](jjeh]h]h!]uh%hhj*ubah}(h]h]h]h]h!] translatableuh%hhj*h&hh'h]h)M$ubah}(h]h]h]h]h!]j versionaddedj1.8.1uh%jh&hh'h]h)M#hj*ubh )}(h(## pygame.sprite.collide_circle_ratio ##h]h(## pygame.sprite.collide_circle_ratio ##}hj*sbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)M%ubeh}(h]h]h]h]h!]uh%jhj)h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j*j^j*j_j*j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(collide_mask() (in module pygame.sprite)pygame.sprite.collide_maskhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h collide_maskh](j)}(hpygame.sprite.h]hpygame.sprite.}hj*sbah}(h]h](jjeh]h]h!]h#h$uh%jhj*h&hh'h]h)M'ubj)}(hj*h]h collide_mask}hj*sbah}(h]h](jjeh]h]h!]h#h$uh%jhj*h&hh'h]h)M'ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj*h&hh'h]h)M'ubeh}(h]j*ah](jjeh]h]h!]jjjhjj*jjj*jcollide_mask()uh%jh'h]h)M'hj*h&hubj)}(hhh](hv)}(hhh](hz)}(h;:sl:`Collision detection between two sprites, using masks.`h]h)}(hj+h]h5Collision detection between two sprites, using masks.}hj+sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)M)ubhz)}(h2:sg:`collide_mask(sprite1, sprite2) -> (int, int)`h]h)}(hj2+h]h,collide_mask(sprite1, sprite2) -> (int, int)}hj4+sbah}(h]h]j)ah]h]h!]uh%hhj0+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)M*ubhz)}(h,:sg:`collide_mask(sprite1, sprite2) -> None`h]h)}(hjI+h]h&collide_mask(sprite1, sprite2) -> None}hjK+sbah}(h]h]j)ah]h]h!]uh%hhjG+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%huhj+h&hh'h]h)M)ubh)}(hXeTests for collision between two sprites, by testing if their bitmasks overlap (uses :func:`pygame.mask.Mask.overlap`). If the sprites have a ``mask`` attribute, it is used as the mask, otherwise a mask is created from the sprite's ``image`` (uses :func:`pygame.mask.from_surface`). Sprites must have a ``rect`` attribute; the ``mask`` attribute is optional.h](hTTests for collision between two sprites, by testing if their bitmasks overlap (uses }hjd+sbh6)}(h :func:`pygame.mask.Mask.overlap`h]h;)}(hjn+h]hpygame.mask.Mask.overlap()}hjp+sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjl+ubah}(h]h]h]h]h!]refdochS refdomainjz+reftypefunc refexplicitrefwarnhYjhZNh[pygame.mask.Mask.overlapuh%h5h'h]h)M-hjd+ubh). If the sprites have a }hjd+sbh;)}(h``mask``h]hmask}hj+sbah}(h]h]h]h]h!]uh%h:hjd+ubhR attribute, it is used as the mask, otherwise a mask is created from the sprite's }hjd+sbh;)}(h ``image``h]himage}hj+sbah}(h]h]h]h]h!]uh%h:hjd+ubh (uses }hjd+sbh6)}(h :func:`pygame.mask.from_surface`h]h;)}(hj+h]hpygame.mask.from_surface()}hj+sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj+ubah}(h]h]h]h]h!]refdochS refdomainj+reftypefunc refexplicitrefwarnhYjhZNh[pygame.mask.from_surfaceuh%h5h'h]h)M-hjd+ubh). Sprites must have a }hjd+sbh;)}(h``rect``h]hrect}hj+sbah}(h]h]h]h]h!]uh%h:hjd+ubh attribute; the }hjd+sbh;)}(h``mask``h]hmask}hj+sbah}(h]h]h]h]h!]uh%h:hjd+ubh attribute is optional.}hjd+sbeh}(h]h]h]h]h!]uh%hh'h]h)M-hj+h&hubh)}(hXThe first point of collision between the masks is returned. The collision point is offset from ``sprite1``'s mask's topleft corner (which is always (0, 0)). The collision point is a position within the mask and is not related to the actual screen position of ``sprite1``.h](h_The first point of collision between the masks is returned. The collision point is offset from }hj,sbh;)}(h ``sprite1``h]hsprite1}hj ,sbah}(h]h]h]h]h!]uh%h:hj,ubh's mask's topleft corner (which is always (0, 0)). The collision point is a position within the mask and is not related to the actual screen position of }hj,sbh;)}(h ``sprite1``h]hsprite1}hj,sbah}(h]h]h]h]h!]uh%h:hj,ubh.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)M3hj+h&hubh)}(hThis function is intended to be passed as a ``collided`` callback function to the group collide functions (see :meth:`spritecollide`, :meth:`groupcollide`, :meth:`spritecollideany`).h](h,This function is intended to be passed as a }hj4,sbh;)}(h ``collided``h]hcollided}hj<,sbah}(h]h]h]h]h!]uh%h:hj4,ubh7 callback function to the group collide functions (see }hj4,sbh6)}(h:meth:`spritecollide`h]h;)}(hjP,h]hspritecollide()}hjR,sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjN,ubah}(h]h]h]h]h!]refdochS refdomainj\,reftypemeth refexplicitrefwarnhYjhZNh[ spritecollideuh%h5h'h]h)M8hj4,ubh, }hj4,sbh6)}(h:meth:`groupcollide`h]h;)}(hjt,h]hgroupcollide()}hjv,sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjr,ubah}(h]h]h]h]h!]refdochS refdomainj,reftypemeth refexplicitrefwarnhYjhZNh[ groupcollideuh%h5h'h]h)M8hj4,ubh, }hj4,sbh6)}(h:meth:`spritecollideany`h]h;)}(hj,h]hspritecollideany()}hj,sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj,ubah}(h]h]h]h]h!]refdochS refdomainj,reftypemeth refexplicitrefwarnhYjhZNh[spritecollideanyuh%h5h'h]h)M8hj4,ubh).}hj4,sbeh}(h]h]h]h]h!]uh%hh'h]h)M8hj+h&hubh note)}(hTo increase performance, create and set a ``mask`` attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks.h]h)}(hTo increase performance, create and set a ``mask`` attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks.h](h*To increase performance, create and set a }hj,sbh;)}(h``mask``h]hmask}hj,sbah}(h]h]h]h]h!]uh%h:hj,ubh attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)M=hj,ubah}(h]h]h]h]h!]uh%j,h'h]h)M<hj+h&hubj,)}(hA new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated).h]h)}(hA new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated).h]hA new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated).}hj,sbah}(h]h]h]h]h!]uh%hh'h]h)MBhj,ubah}(h]h]h]h]h!]uh%j,h'h]h)MAhj+h&hubj)}(h]# Example of mask creation for a sprite. sprite.mask = pygame.mask.from_surface(sprite.image)h]h]# Example of mask creation for a sprite. sprite.mask = pygame.mask.from_surface(sprite.image)}hj-sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)MGhj+h&hubj$)}(hhh](j$)}(hhh](j$)}(hReturnsh]hReturns}hj-sbah}(h]h]h]h]h!]uh%j$hj-h'h]h)Kubj$)}(hhh]h)}(hBfirst point of collision between the masks or None if no collisionh](h.first point of collision between the masks or }(hj)-h&hh'Nh)Nubh;)}(h``None``h]hNone}hj1-sbah}(h]h]h]h]h!]uh%h:hj)-h&hh'Nh)Nubh if no collision}(hj)-h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj&-ubah}(h]h]h]h]h!]uh%j$hj-ubeh}(h]h]h]h]h!]uh%j$hj-ubj$)}(hhh](j$)}(h Return typeh]h Return type}hjX-sbah}(h]h]h]h]h!]uh%j$hjU-h'h]h)Kubj$)}(hhh]h)}(htuple(int, int) or NoneTypeh](h6)}(hhh]htuple}hjm-sbah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargettuplej%j %jj!%Nuh%h5hji-ubh(}hji-sbh6)}(hhh]hint}hj-sbah}(h]h]h]h]h!] refdomainj{- refexplicitreftypej reftargetintj%j %jj!%Nuh%h5hji-ubh, }hji-sbh6)}(hhh]hint}hj-sbah}(h]h]h]h]h!] refdomainj{- refexplicitreftypej reftargetintj%j %jj!%Nuh%h5hji-ubh) or }hji-sbh6)}(hhh]hNoneType}hj-sbah}(h]h]h]h]h!] refdomainj{- refexplicitreftypej reftargetNoneTypej%j %jj!%Nuh%h5hji-ubeh}(h]h]h]h]h!]uh%hhjf-ubah}(h]h]h]h]h!]uh%j$hjU-ubeh}(h]h]h]h]h!]uh%j$hj-ubeh}(h]h]h]h]h!]uh%j$hj+h&hh'Nh)Nubj)}(hNew in pygame 1.8.0.h]h)}(hNew in pygame 1.8.0.h]h)}(hNew in pygame 1.8.0.h]hNew in pygame 1.8.0.}hj-sbah}(h]h](jjeh]h]h!]uh%hhj-ubah}(h]h]h]h]h!] translatableuh%hhj-h&hh'h]h)MOubah}(h]h]h]h]h!]j versionaddedj1.8.0uh%jh&hh'h]h)MNhj+ubh )}(h ## pygame.sprite.collide_mask ##h]h ## pygame.sprite.collide_mask ##}hj-sbah}(h]h]h]h]h!]h#h$uh%h hj+h&hh'h]h)MPubeh}(h]h]h]h]h!]uh%jhj*h&hh'Nh)Nubeh}(h]h](j{-functioneh]h]h!]j]j{-j^j.j_j.j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(groupcollide() (in module pygame.sprite)pygame.sprite.groupcollidehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h groupcollideh](j)}(hpygame.sprite.h]hpygame.sprite.}hj/.sbah}(h]h](jjeh]h]h!]h#h$uh%jhj+.h&hh'h]h)MRubj)}(hj-.h]h groupcollide}hj=.sbah}(h]h](jjeh]h]h!]h#h$uh%jhj+.h&hh'h]h)MRubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj+.h&hh'h]h)MRubeh}(h]j&.ah](jjeh]h]h!]jjjhjj-.jjj-.jgroupcollide()uh%jh'h]h)MRhj(.h&hubj)}(hhh](hv)}(hhh](hz)}(h7:sl:`Find all sprites that collide between two groups.`h]h)}(hjd.h]h1Find all sprites that collide between two groups.}hjf.sbah}(h]h]hah]h]h!]uh%hhjb.ubah}(h]h]h]h]h!]uh%h)hKhj_.h&hh'h]h)MTubhz)}(hT:sg:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict`h]h)}(hj{.h]hNgroupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict}hj}.sbah}(h]h]j)ah]h]h!]uh%hhjy.ubah}(h]h]h]h]h!]uh%h)hKhj_.h&hh'h]h)MUubeh}(h]h]h]h]h!]uh%huhj\.h&hh'h]h)MTubh)}(hThis will find collisions between all the Sprites in two groups. Collision is determined by comparing the ``Sprite.rect`` attribute of each Sprite or by using the collided function if it is not None.h](hjThis will find collisions between all the Sprites in two groups. Collision is determined by comparing the }hj.sbh;)}(h``Sprite.rect``h]h Sprite.rect}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubhN attribute of each Sprite or by using the collided function if it is not None.}hj.sbeh}(h]h]h]h]h!]uh%hh'h]h)MWhj\.h&hubh)}(hEvery Sprite inside group1 is added to the return dictionary. The value for each item is the list of Sprites in group2 that intersect.h]hEvery Sprite inside group1 is added to the return dictionary. The value for each item is the list of Sprites in group2 that intersect.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)M[hj\.h&hubh)}(heIf either dokill argument is True, the colliding Sprites will be removed from their respective Group.h]heIf either dokill argument is True, the colliding Sprites will be removed from their respective Group.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)M^hj\.h&hubh)}(hXYThe collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.h]hXYThe collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.}hj.sbah}(h]h]h]h]h!]uh%hh'h]h)Mahj\.h&hubh )}(h ## pygame.sprite.groupcollide ##h]h ## pygame.sprite.groupcollide ##}hj.sbah}(h]h]h]h]h!]h#h$uh%h hj\.h&hh'h]h)Mgubeh}(h]h]h]h]h!]uh%jhj(.h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j.j^j.j_j.j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,spritecollideany() (in module pygame.sprite)pygame.sprite.spritecollideanyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hspritecollideanyh](j)}(hpygame.sprite.h]hpygame.sprite.}hj/sbah}(h]h](jjeh]h]h!]h#h$uh%jhj /h&hh'h]h)Miubj)}(hj/h]hspritecollideany}hj/sbah}(h]h](jjeh]h]h!]h#h$uh%jhj /h&hh'h]h)Miubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj /h&hh'h]h)Miubeh}(h]j/ah](jjeh]h]h!]jjjhjj/jjj/jspritecollideany()uh%jh'h]h)Mihj /h&hubj)}(hhh](hv)}(hhh](hz)}(h=:sl:`Simple test if a sprite intersects anything in a group.`h]h)}(hjF/h]h7Simple test if a sprite intersects anything in a group.}hjH/sbah}(h]h]hah]h]h!]uh%hhjD/ubah}(h]h]h]h]h!]uh%h)hKhjA/h&hh'h]h)Mkubhz)}(hd:sg:`spritecollideany(sprite, group, collided = None) -> Sprite` Collision with the returned sprite.h](h)}(h@:sg:`spritecollideany(sprite, group, collided = None) -> Sprite`h]h:spritecollideany(sprite, group, collided = None) -> Sprite}hj_/sbah}(h]h]j)ah]h]h!]uh%hhj[/ubh$ Collision with the returned sprite.}hj[/sbeh}(h]h]h]h]h!]uh%h)hKhjA/h&hh'h]h)Mlubhz)}(hK:sg:`spritecollideany(sprite, group, collided = None) -> None` No collisionh](h)}(h>:sg:`spritecollideany(sprite, group, collided = None) -> None`h]h8spritecollideany(sprite, group, collided = None) -> None}hj{/sbah}(h]h]j)ah]h]h!]uh%hhjw/ubh No collision}hjw/sbeh}(h]h]h]h]h!]uh%h)hKhjA/h&hh'h]h)Mmubeh}(h]h]h]h]h!]uh%huhj>/h&hh'h]h)Mkubh)}(hIf the sprite collides with any single sprite in the group, a single sprite from the group is returned. On no collision None is returned.h]hIf the sprite collides with any single sprite in the group, a single sprite from the group is returned. On no collision None is returned.}hj/sbah}(h]h]h]h]h!]uh%hh'h]h)Mohj>/h&hubh)}(hzIf you don't need all the features of the ``pygame.sprite.spritecollide()`` function, this function will be a bit quicker.h](h*If you don't need all the features of the }hj/sbh;)}(h!``pygame.sprite.spritecollide()``h]hpygame.sprite.spritecollide()}hj/sbah}(h]h]h]h]h!]uh%h:hj/ubh/ function, this function will be a bit quicker.}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)Mrhj>/h&hubh)}(hXYThe collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.h]hXYThe collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.}hj/sbah}(h]h]h]h]h!]uh%hh'h]h)Muhj>/h&hubh )}(h$## pygame.sprite.spritecollideany ##h]h$## pygame.sprite.spritecollideany ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hj>/h&hh'h]h)M{ubeh}(h]h]h]h]h!]uh%jhj /h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j]j/j^j/j_j/j`jajbjcjdjejfuh%jh&hhh,h'Nh)Nubh )}(h## ##h]h## ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M~ubh )}(h## pygame.sprite ##h]h## pygame.sprite ##}hj/sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-spriteeh]h] pygame.spriteah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj?0error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j0j0s nametypes}j0sh}(j0h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j0h'h]h)Khh,h&hubjjjjjsjxjjjjjDjIjjjjjjjJjOjjj j j j j j jm jr j j j j j jjjjjjjjjjCjHjjjj jjjjjjjjjjj>jCjjjfjkjjjjj)j.jjjCjHjjjyj~jj jjjXj]jjj j j4!j9!j!j!j\"ja"j"j"j#j#jE$jJ$j%j%j]&jb&jk'jp'j6(j;(j)j")j)j)j*j*j&.j+.j/j /u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/sprite.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.8661406 pygame-2.6.1/docs/generated/doctrees/ref/surface.doctree0000644000175100001770000051151014676242421022673 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.Surface`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.Surface}hh Surface`h]h)}(hhh]hASurface((width, height), flags=0, depth=0, masks=None) -> Surface}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h;:sg:`Surface((width, height), flags=0, Surface) -> Surface`h]h)}(hhh]h5Surface((width, height), flags=0, Surface) -> Surface}hhsbah}(h]h]hah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hA pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color.h]hA pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Khhh&hubj)}(hCall :meth:`pygame.Surface()` to create a new image object. The Surface will be cleared to all black. The only required arguments are the sizes. With no additional arguments, the Surface will be created in a format that best matches the display Surface.h](hCall }hjsbh6)}(h:meth:`pygame.Surface()`h]h;)}(hj'h]hpygame.Surface()}hj)sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj%ubah}(h]h]h]h]h!]refdochS refdomainj3reftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surfaceuh%h5h'h]h)Khjubh to create a new image object. The Surface will be cleared to all black. The only required arguments are the sizes. With no additional arguments, the Surface will be created in a format that best matches the display Surface.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Khhh&hubj)}(hThe pixel format can be controlled by passing the bit depth or an existing Surface. The flags argument is a bitmask of additional features for the surface. You can pass any combination of these flags:h]hThe pixel format can be controlled by passing the bit depth or an existing Surface. The flags argument is a bitmask of additional features for the surface. You can pass any combination of these flags:}hjOsbah}(h]h]h]h]h!]uh%j h'h]h)Khhh&hubh literal_block)}(hHWSURFACE (obsolete in pygame 2) creates the image in video memory SRCALPHA the pixel format will include a per-pixel alphah]hHWSURFACE (obsolete in pygame 2) creates the image in video memory SRCALPHA the pixel format will include a per-pixel alpha}hj_sbah}(h]h]h]h]h!]h#h$uh%j]h'h]h)Khhh&hubj)}(hTBoth flags are only a request, and may not be possible for all displays and formats.h]hTBoth flags are only a request, and may not be possible for all displays and formats.}hjmsbah}(h]h]h]h]h!]uh%j h'h]h)K hhh&hubj)}(hAdvance users can combine a set of bitmasks with a depth value. The masks are a set of 4 integers representing which bits in a pixel will represent each color. Normal Surfaces should not require the masks argument.h]hAdvance users can combine a set of bitmasks with a depth value. The masks are a set of 4 integers representing which bits in a pixel will represent each color. Normal Surfaces should not require the masks argument.}hj{sbah}(h]h]h]h]h!]uh%j h'h]h)K#hhh&hubj)}(hX;Surfaces can have many extra attributes like alpha planes, colorkeys, source rectangle clipping. These functions mainly effect how the Surface is blitted to other Surfaces. The blit routines will attempt to use hardware acceleration when possible, otherwise they will use highly optimized software blitting methods.h]hX;Surfaces can have many extra attributes like alpha planes, colorkeys, source rectangle clipping. These functions mainly effect how the Surface is blitted to other Surfaces. The blit routines will attempt to use hardware acceleration when possible, otherwise they will use highly optimized software blitting methods.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K'hhh&hubj)}(hXThere are three types of transparency supported in pygame: colorkeys, surface alphas, and pixel alphas. Surface alphas can be mixed with colorkeys, but an image with per pixel alphas cannot use the other modes. Colorkey transparency makes a single color value transparent. Any pixels matching the colorkey will not be drawn. The surface alpha value is a single value that changes the transparency for the entire image. A surface alpha of 255 is opaque, and a value of 0 is completely transparent.h]hXThere are three types of transparency supported in pygame: colorkeys, surface alphas, and pixel alphas. Surface alphas can be mixed with colorkeys, but an image with per pixel alphas cannot use the other modes. Colorkey transparency makes a single color value transparent. Any pixels matching the colorkey will not be drawn. The surface alpha value is a single value that changes the transparency for the entire image. A surface alpha of 255 is opaque, and a value of 0 is completely transparent.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K-hhh&hubj)}(hPer pixel alphas are different because they store a transparency value for every pixel. This allows for the most precise transparency effects, but it also the slowest. Per pixel alphas cannot be mixed with surface alpha and colorkeys.h]hPer pixel alphas are different because they store a transparency value for every pixel. This allows for the most precise transparency effects, but it also the slowest. Per pixel alphas cannot be mixed with surface alpha and colorkeys.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K5hhh&hubj)}(hX=There is support for pixel access for the Surfaces. Pixel access on hardware surfaces is slow and not recommended. Pixels can be accessed using the :meth:`get_at()` and :meth:`set_at()` functions. These methods are fine for simple access, but will be considerably slow when doing of pixel work with them. If you plan on doing a lot of pixel level work, it is recommended to use a :class:`pygame.PixelArray`, which gives an array like view of the surface. For involved mathematical manipulations try the :mod:`pygame.surfarray` module (It's quite quick, but requires NumPy.)h](hThere is support for pixel access for the Surfaces. Pixel access on hardware surfaces is slow and not recommended. Pixels can be accessed using the }hjsbh6)}(h:meth:`get_at()`h]h;)}(hjh]hget_at()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[get_atuh%h5h'h]h)K:hjubh and }hjsbh6)}(h:meth:`set_at()`h]h;)}(hjh]hset_at()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[set_atuh%h5h'h]h)K:hjubh functions. These methods are fine for simple access, but will be considerably slow when doing of pixel work with them. If you plan on doing a lot of pixel level work, it is recommended to use a }hjsbh6)}(h:class:`pygame.PixelArray`h]h;)}(hjh]hpygame.PixelArray}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[pygame.PixelArrayuh%h5h'h]h)K:hjubha, which gives an array like view of the surface. For involved mathematical manipulations try the }hjsbh6)}(h:mod:`pygame.surfarray`h]h;)}(hj)h]hpygame.surfarray}hj+sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj'ubah}(h]h]h]h]h!]refdochS refdomainj5reftypemod refexplicitrefwarnhYhhZh~h[pygame.surfarrayuh%h5h'h]h)K:hjubh/ module (It's quite quick, but requires NumPy.)}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)K:hhh&hubj)}(hXCAny functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can :meth:`lock()` and :meth:`unlock()` the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs. Remember to leave the Surface locked only while necessary.h](hvAny functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can }hjQsbh6)}(h:meth:`lock()`h]h;)}(hj[h]hlock()}hj]sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjYubah}(h]h]h]h]h!]refdochS refdomainjgreftypemeth refexplicitrefwarnhYhhZh~h[lockuh%h5h'h]h)KChjQubh and }hjQsbh6)}(h:meth:`unlock()`h]h;)}(hjh]hunlock()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj}ubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[unlockuh%h5h'h]h)KChjQubhX the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs. Remember to leave the Surface locked only while necessary.}hjQsbeh}(h]h]h]h]h!]uh%j h'h]h)KChhh&hubj)}(hSurface pixels are stored internally as a single number that has all the colors encoded into it. Use the :meth:`map_rgb()` and :meth:`unmap_rgb()` to convert between individual red, green, and blue values into a packed integer for that Surface.h](hiSurface pixels are stored internally as a single number that has all the colors encoded into it. Use the }hjsbh6)}(h:meth:`map_rgb()`h]h;)}(hjh]h map_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[map_rgbuh%h5h'h]h)KMhjubh and }hjsbh6)}(h:meth:`unmap_rgb()`h]h;)}(hjh]h unmap_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ unmap_rgbuh%h5h'h]h)KMhjubhb to convert between individual red, green, and blue values into a packed integer for that Surface.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)KMhhh&hubj)}(hSurfaces can also reference sections of other Surfaces. These are created with the :meth:`subsurface()` method. Any change to either Surface will effect the other.h](hSSurfaces can also reference sections of other Surfaces. These are created with the }hjsbh6)}(h:meth:`subsurface()`h]h;)}(hjh]h subsurface()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ subsurfaceuh%h5h'h]h)KRhjubh< method. Any change to either Surface will effect the other.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)KRhhh&hubj)}(hEach Surface contains a clipping area. By default the clip area covers the entire Surface. If it is changed, all drawing operations will only effect the smaller area.h]hEach Surface contains a clipping area. By default the clip area covers the entire Surface. If it is changed, all drawing operations will only effect the smaller area.}hj/sbah}(h]h]h]h]h!]uh%j h'h]h)KVhhh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](hqblit() (pygame.Surface method)pygame.Surface.blithNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hblith](h)}(hjPh]hblit}hjRsbah}(h]h](hheh]h]h!]h#h$uh%hhjNh&hh'h]h)KZubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjNh&hh'h]h)KZubeh}(h]jIah](hheh]h]h!]hhhh~h Surface.blithhSurfaceblithSurface.blit()uh%hzh'h]h)KZhjKh&hubh)}(hhh](h)}(hhh](h)}(h!:sl:`draw one image onto another`h]h)}(hj~h]hdraw one image onto another}hjsbah}(h]h]hah]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)K\ubh)}(h<:sg:`blit(source, dest, area=None, special_flags=0) -> Rect`h]h)}(hjh]h6blit(source, dest, area=None, special_flags=0) -> Rect}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)K]ubeh}(h]h]h]h]h!]uh%hhjvh&hh'h]h)K\ubj)}(hXtDraws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit.h]hXtDraws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K_hjvh&hubj)}(hrAn optional area rectangle can be passed as well. This represents a smaller portion of the source Surface to draw.h]hrAn optional area rectangle can be passed as well. This represents a smaller portion of the source Surface to draw.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Kehjvh&hubhversionmodified)}(hbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.h]j)}(hbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.h](h)}(hNew in pygame 1.8: h]hNew in pygame 1.8: }hjsbah}(h]h](jaddedeh]h]h!]uh%hhjh&hh'h]h)Kkubh Optional }(hjh&hh'Nh)Nubh;)}(h``special_flags``h]h special_flags}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh: }(hjh&hh'Nh)Nubh;)}(h ``BLEND_ADD``h]h BLEND_ADD}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh, }(hjh&hh'Nh)Nubh;)}(h ``BLEND_SUB``h]h BLEND_SUB}hj sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh, }(hjh&hh'Nh)Nubh;)}(h``BLEND_MULT``h]h BLEND_MULT}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh, }(hjh&hh'Nh)Nubh;)}(h ``BLEND_MIN``h]h BLEND_MIN}hj1sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh, }(hjh&hh'Nh)Nubh;)}(h ``BLEND_MAX``h]h BLEND_MAX}hjCsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)Kkubah}(h]h]h]h]h!]type versionaddedversion1.8uh%jh&hh'h]h)Khhjvubj)}(hNew in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.h]j)}(hNew in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.h](h)}(hNew in pygame 1.8.1: h]hNew in pygame 1.8.1: }hjnsbah}(h]h](j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h]h!]uh%h:hjjh&hh'Nh)Nubh.}(hjjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjfh&hh'h]h)Kqubah}(h]h]h]h]h!]jb versionaddedjd1.8.1uh%jh&hh'h]h)Klhjvubj)}(h@New in pygame 1.9.2: Optional special_flags: BLEND_PREMULTIPLIEDh]j)}(h@New in pygame 1.9.2: Optional special_flags: BLEND_PREMULTIPLIEDh](h)}(hNew in pygame 1.9.2: h]hNew in pygame 1.9.2: }hj]sbah}(h]h](jjeh]h]h!]uh%hhjYh&hh'h]h)Ktubh Optional }(hjYh&hh'Nh)Nubh;)}(h``special_flags``h]h special_flags}hjosbah}(h]h]h]h]h!]uh%h:hjYh&hh'Nh)Nubh: }(hjYh&hh'Nh)Nubh;)}(h``BLEND_PREMULTIPLIED``h]hBLEND_PREMULTIPLIED}hjsbah}(h]h]h]h]h!]uh%h:hjYh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjUh&hh'h]h)Ktubah}(h]h]h]h]h!]jb versionaddedjd1.9.2uh%jh&hh'h]h)Krhjvubj)}(hX`New in pygame 2.0.0: Optional special_flags: BLEND_ALPHA_SDL2 - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not.h]j)}(hX`New in pygame 2.0.0: Optional special_flags: BLEND_ALPHA_SDL2 - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not.h](h)}(hNew in pygame 2.0.0: h]hNew in pygame 2.0.0: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Kzubh Optional }(hjh&hh'Nh)Nubh;)}(h``special_flags``h]h special_flags}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh: }(hjh&hh'Nh)Nubh;)}(h``BLEND_ALPHA_SDL2``h]hBLEND_ALPHA_SDL2}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)NubhX" - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)Kzubah}(h]h]h]h]h!]jb versionaddedjd2.0.0uh%jh&hh'h]h)Kuhjvubj)}(hThe return rectangle is the area of the affected pixels, excluding any pixels outside the destination Surface, or outside the clipping area.h]hThe return rectangle is the area of the affected pixels, excluding any pixels outside the destination Surface, or outside the clipping area.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K{hjvh&hubj)}(h?Pixel alphas will be ignored when blitting to an 8 bit Surface.h]h?Pixel alphas will be ignored when blitting to an 8 bit Surface.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)K~hjvh&hubj)}(huFor a surface with colorkey or blanket alpha, a blit to self may give slightly different colors than a non self-blit.h]huFor a surface with colorkey or blanket alpha, a blit to self may give slightly different colors than a non self-blit.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Khjvh&hubh )}(h## Surface.blit ##h]h## Surface.blit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjvh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjKh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]domainj,objtypej-desctypej-no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqblits() (pygame.Surface method)pygame.Surface.blitshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hblitsh](h)}(hjNh]hblits}hjPsbah}(h]h](hheh]h]h!]h#h$uh%hhjLh&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjLh&hh'h]h)Kubeh}(h]jGah](hheh]h]h!]hhhh~h Surface.blitshhSurfaceblitshSurface.blits()uh%hzh'h]h)KhjIh&hubh)}(hhh](h)}(hhh](h)}(h#:sl:`draw many images onto another`h]h)}(hjzh]hdraw many images onto another}hj|sbah}(h]h]hah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubh)}(hS:sg:`blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None`h]h)}(hjh]hMblits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubh)}(h7:sg:`blits(((source, dest, area), ...)) -> [Rect, ...]`h]h)}(hjh]h1blits(((source, dest, area), ...)) -> [Rect, ...]}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubh)}(hF:sg:`blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]`h]h)}(hjh]h@blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjrh&hh'h]h)Kubj)}(hDraws many surfaces onto this Surface. It takes a sequence as input, with each of the elements corresponding to the ones of :meth:`blit()`. It needs at minimum a sequence of (source, dest).h](h|Draws many surfaces onto this Surface. It takes a sequence as input, with each of the elements corresponding to the ones of }hjsbh6)}(h:meth:`blit()`h]h;)}(hjh]hblit()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[blituh%h5h'h]h)Khjubh3. It needs at minimum a sequence of (source, dest).}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Khjrh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]j)}(hkblit_sequence -- a sequence of surfaces and arguments to blit them, they correspond to the blit() argumentsh](hliteral_strong)}(h blit_sequenceh]h blit_sequence}hj;sbah}(h]h]h]h]h!]uh%j9hj5ubh -- }hj5sbhJa sequence of surfaces and arguments to blit them, they correspond to the }(hj5h&hh'Nh)Nubh6)}(h:meth:`blit()`h]h;)}(hjSh]hblit()}hjUsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjQubah}(h]h]h]h]h!]refdochS refdomainj_reftypemeth refexplicitrefwarnhYhhZh~h[blituh%h5h'h]h)Khj5h&hubh arguments}(hj5h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j hj2ubah}(h]h]h]h]h!]uh%j0hj-ubj1)}(hhh]j)}(hWdoreturn -- if True, return a list of rects of the areas changed, otherwise return Noneh](j:)}(hdoreturnh]hdoreturn}hjsbah}(h]h]h]h]h!]uh%j9hjubh -- }hjsbhif }(hjh&hh'Nh)Nubh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh@, return a list of rects of the areas changed, otherwise return }(hjh&hh'Nh)Nubh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!]uh%j0hj-ubeh}(h]h]h]h]h!]uh%j+hj(ubah}(h]h]h]h]h!]uh%j&hjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj')}(hhh]j)}(hHa list of rects of the areas changed if doreturn is True, otherwise Noneh](h(a list of rects of the areas changed if }(hjh&hh'Nh)Nubh;)}(h ``doreturn``h]hdoreturn}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh is }(hjh&hh'Nh)Nubh;)}(h``True``h]hTrue}hj sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh , otherwise }(hjh&hh'Nh)Nubh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j hjubah}(h]h]h]h]h!]uh%j&hjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hj?sbah}(h]h]h]h]h!]uh%jhj<h'h]h)Kubj')}(hhh]j)}(h list or Noneh](h6)}(hhh]hlist}hjTsbah}(h]h]h]h]h!] refdomainpy refexplicitreftypeh reftargetlist refspecific py:modulehpy:classh~uh%h5hjPubh or }hjPsbh6)}(hhh]hNone}hjnsbah}(h]h]h]h]h!] refdomainjb refexplicitreftypeh reftargetNonejgjhhjih~uh%h5hjPubeh}(h]h]h]h]h!]uh%j hjMubah}(h]h]h]h]h!]uh%j&hj<ubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%j hjrh&hh'Nh)Nubj)}(hNew in pygame 1.9.4.h]hNew in pygame 1.9.4.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Khjrh&hubh )}(h## Surface.blits ##h]h## Surface.blits ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjIh&hh'Nh)Nubeh}(h]h](jbmethodeh]h]h!]j1jbj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!convert() (pygame.Surface method)pygame.Surface.converthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hconverth](h)}(hjh]hconvert}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hSurface.converthhSurfaceconverthSurface.convert()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h):sl:`change the pixel format of an image`h]h)}(hj h]h#change the pixel format of an image}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h&:sg:`convert(Surface=None) -> Surface`h]h)}(hj h]h convert(Surface=None) -> Surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h(:sg:`convert(depth, flags=0) -> Surface`h]h)}(hj. h]h"convert(depth, flags=0) -> Surface}hj0 sbah}(h]h]hah]h]h!]uh%hhj, ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h(:sg:`convert(masks, flags=0) -> Surface`h]h)}(hjE h]h"convert(masks, flags=0) -> Surface}hjG sbah}(h]h]hah]h]h!]uh%hhjC ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj)}(hCreates a new copy of the Surface with the pixel format changed. The new pixel format can be determined from another existing Surface. Otherwise depth, flags, and masks arguments can be used, similar to the :meth:`pygame.Surface()` call.h](hCreates a new copy of the Surface with the pixel format changed. The new pixel format can be determined from another existing Surface. Otherwise depth, flags, and masks arguments can be used, similar to the }hj` sbh6)}(h:meth:`pygame.Surface()`h]h;)}(hjj h]hpygame.Surface()}hjl sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjh ubah}(h]h]h]h]h!]refdochS refdomainjv reftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surfaceuh%h5h'h]h)Khj` ubh call.}hj` sbeh}(h]h]h]h]h!]uh%j h'h]h)Khjh&hubj)}(hIf no arguments are passed the new Surface will have the same pixel format as the display Surface. This is always the fastest format for blitting. It is a good idea to convert all Surfaces before they are blitted many times.h]hIf no arguments are passed the new Surface will have the same pixel format as the display Surface. This is always the fastest format for blitting. It is a good idea to convert all Surfaces before they are blitted many times.}hj sbah}(h]h]h]h]h!]uh%j h'h]h)Khjh&hubj)}(hThe converted Surface will have no pixel alphas. They will be stripped if the original had them. See :meth:`convert_alpha()` for preserving or creating per-pixel alphas.h](heThe converted Surface will have no pixel alphas. They will be stripped if the original had them. See }hj sbh6)}(h:meth:`convert_alpha()`h]h;)}(hj h]hconvert_alpha()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYhhZh~h[ convert_alphauh%h5h'h]h)Khj ubh- for preserving or creating per-pixel alphas.}hj sbeh}(h]h]h]h]h!]uh%j h'h]h)Khjh&hubj)}(hThe new copy will have the same class as the copied surface. This lets as Surface subclass inherit this method without the need to override, unless subclass specific instance attributes also need copying.h]hThe new copy will have the same class as the copied surface. This lets as Surface subclass inherit this method without the need to override, unless subclass specific instance attributes also need copying.}hj sbah}(h]h]h]h]h!]uh%j h'h]h)Khjh&hubh )}(h## Surface.convert ##h]h## Surface.convert ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j j2j j3j j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq'convert_alpha() (pygame.Surface method)pygame.Surface.convert_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h convert_alphah](h)}(hj h]h convert_alpha}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~hSurface.convert_alphahhSurface convert_alphahSurface.convert_alpha()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(hD:sl:`change the pixel format of an image including per pixel alphas`h]h)}(hj; h]h>change the pixel format of an image including per pixel alphas}hj= sbah}(h]h]hah]h]h!]uh%hhj9 ubah}(h]h]h]h]h!]uh%h)hKhj6 h&hh'h]h)Kubh)}(h':sg:`convert_alpha(Surface) -> Surface`h]h)}(hjR h]h!convert_alpha(Surface) -> Surface}hjT sbah}(h]h]hah]h]h!]uh%hhjP ubah}(h]h]h]h]h!]uh%h)hKhj6 h&hh'h]h)Kubh)}(h :sg:`convert_alpha() -> Surface`h]h)}(hji h]hconvert_alpha() -> Surface}hjk sbah}(h]h]hah]h]h!]uh%hhjg ubah}(h]h]h]h]h!]uh%h)hKhj6 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj3 h&hh'h]h)Kubj)}(hXCreates a new copy of the surface with the desired pixel format. The new surface will be in a format suited for quick blitting to the given format with per pixel alpha. If no surface is given, the new surface will be optimized for blitting to the current display.h]hXCreates a new copy of the surface with the desired pixel format. The new surface will be in a format suited for quick blitting to the given format with per pixel alpha. If no surface is given, the new surface will be optimized for blitting to the current display.}hj sbah}(h]h]h]h]h!]uh%j h'h]h)Khj3 h&hubj)}(hUnlike the :meth:`convert()` method, the pixel format for the new image will not be exactly the same as the requested source, but it will be optimized for fast alpha blitting to the destination.h](h Unlike the }hj sbh6)}(h:meth:`convert()`h]h;)}(hj h]h convert()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYhhZh~h[convertuh%h5h'h]h)Khj ubh method, the pixel format for the new image will not be exactly the same as the requested source, but it will be optimized for fast alpha blitting to the destination.}hj sbeh}(h]h]h]h]h!]uh%j h'h]h)Khj3 h&hubj)}(h[As with :meth:`convert()` the returned surface has the same class as the converted surface.h](hAs with }hj sbh6)}(h:meth:`convert()`h]h;)}(hj h]h convert()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYhhZh~h[convertuh%h5h'h]h)Khj ubhB the returned surface has the same class as the converted surface.}hj sbeh}(h]h]h]h]h!]uh%j h'h]h)Khj3 h&hubh )}(h## Surface.convert_alpha ##h]h## Surface.convert_alpha ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj3 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j j2j j3j j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqcopy() (pygame.Surface method)pygame.Surface.copyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcopyh](h)}(hj% h]hcopy}hj' sbah}(h]h](hheh]h]h!]h#h$uh%hhj# h&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj# h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~h Surface.copyhhSurfacecopyhSurface.copy()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h$:sl:`create a new copy of a Surface`h]h)}(hjQ h]hcreate a new copy of a Surface}hjS sbah}(h]h]hah]h]h!]uh%hhjO ubah}(h]h]h]h]h!]uh%h)hKhjL h&hh'h]h)Kubh)}(h:sg:`copy() -> Surface`h]h)}(hjh h]hcopy() -> Surface}hjj sbah}(h]h]hah]h]h!]uh%hhjf ubah}(h]h]h]h]h!]uh%h)hKhjL h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjI h&hh'h]h)Kubj)}(hXMakes a duplicate copy of a Surface. The new surface will have the same pixel formats, color palettes, transparency settings, and class as the original. If a Surface subclass also needs to copy any instance specific attributes then it should override ``copy()``.h](hMakes a duplicate copy of a Surface. The new surface will have the same pixel formats, color palettes, transparency settings, and class as the original. If a Surface subclass also needs to copy any instance specific attributes then it should override }hj sbh;)}(h ``copy()``h]hcopy()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh.}hj sbeh}(h]h]h]h]h!]uh%j h'h]h)KhjI h&hubh )}(h## Surface.copy ##h]h## Surface.copy ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjI h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j j2j j3j j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqfill() (pygame.Surface method)pygame.Surface.fillhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hfillh](h)}(hj h]hfill}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj h&hh'h]h)Kubeh}(h]j ah](hheh]h]h!]hhhh~h Surface.fillhhSurfacefillhSurface.fill()uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h%:sl:`fill Surface with a solid color`h]h)}(hj h]hfill Surface with a solid color}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h5:sg:`fill(color, rect=None, special_flags=0) -> Rect`h]h)}(hj h]h/fill(color, rect=None, special_flags=0) -> Rect}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubj)}(hFill the Surface with a solid color. If no rect argument is given the entire Surface will be filled. The rect argument will limit the fill to a specific area. The fill will also be contained by the Surface clip area.h]hFill the Surface with a solid color. If no rect argument is given the entire Surface will be filled. The rect argument will limit the fill to a specific area. The fill will also be contained by the Surface clip area.}hj0 sbah}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubj)}(hThe color argument can be either a ``RGB`` sequence, a ``RGBA`` sequence or a mapped color index. If using ``RGBA``, the Alpha (A part of ``RGBA``) is ignored unless the surface uses per pixel alpha (Surface has the ``SRCALPHA`` flag).h](h#The color argument can be either a }hj> sbh;)}(h``RGB``h]hRGB}hjF sbah}(h]h]h]h]h!]uh%h:hj> ubh sequence, a }hj> sbh;)}(h``RGBA``h]hRGBA}hjX sbah}(h]h]h]h]h!]uh%h:hj> ubh, sequence or a mapped color index. If using }hj> sbh;)}(h``RGBA``h]hRGBA}hjj sbah}(h]h]h]h]h!]uh%h:hj> ubh, the Alpha (A part of }hj> sbh;)}(h``RGBA``h]hRGBA}hj| sbah}(h]h]h]h]h!]uh%h:hj> ubhF) is ignored unless the surface uses per pixel alpha (Surface has the }hj> sbh;)}(h ``SRCALPHA``h]hSRCALPHA}hj sbah}(h]h]h]h]h!]uh%h:hj> ubh flag).}hj> sbeh}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubj)}(hbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.h]j)}(hbNew in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.h](h)}(hNew in pygame 1.8: h]hNew in pygame 1.8: }hj sbah}(h]h](jjeh]h]h!]uh%hhj h&hh'h]h)Kubh Optional }(hj h&hh'Nh)Nubh;)}(h``special_flags``h]h special_flags}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh: }(hj h&hh'Nh)Nubh;)}(h ``BLEND_ADD``h]h BLEND_ADD}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, }(hj h&hh'Nh)Nubh;)}(h ``BLEND_SUB``h]h BLEND_SUB}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, }(hj h&hh'Nh)Nubh;)}(h``BLEND_MULT``h]h BLEND_MULT}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, }(hj h&hh'Nh)Nubh;)}(h ``BLEND_MIN``h]h BLEND_MIN}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh, }(hj h&hh'Nh)Nubh;)}(h ``BLEND_MAX``h]h BLEND_MAX}hj sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hj h&hh'h]h)Kubah}(h]h]h]h]h!]jb versionaddedjd1.8uh%jh&hh'h]h)Khj ubj)}(hNew in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.h]j)}(hNew in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.h](h)}(hNew in pygame 1.8.1: h]hNew in pygame 1.8.1: }hjC sbah}(h]h](jjeh]h]h!]uh%hhj? h&hh'h]h)Kubh Optional }(hj? h&hh'Nh)Nubh;)}(h``special_flags``h]h special_flags}hjU sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh: }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGBA_ADD``h]hBLEND_RGBA_ADD}hjg sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGBA_SUB``h]hBLEND_RGBA_SUB}hjy sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGBA_MULT``h]hBLEND_RGBA_MULT}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGBA_MIN``h]hBLEND_RGBA_MIN}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGBA_MAX``h]hBLEND_RGBA_MAX}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGB_ADD``h]h BLEND_RGB_ADD}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGB_SUB``h]h BLEND_RGB_SUB}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGB_MULT``h]hBLEND_RGB_MULT}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGB_MIN``h]h BLEND_RGB_MIN}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh, }(hj? h&hh'Nh)Nubh;)}(h``BLEND_RGB_MAX``h]h BLEND_RGB_MAX}hj sbah}(h]h]h]h]h!]uh%h:hj? h&hh'Nh)Nubh.}(hj? h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hj; h&hh'h]h)Kubah}(h]h]h]h]h!]jb versionaddedjd1.8.1uh%jh&hh'h]h)Khj ubj)}(h+This will return the affected Surface area.h]h+This will return the affected Surface area.}hj*sbah}(h]h]h]h]h!]uh%j h'h]h)Khj h&hubh )}(h## Surface.fill ##h]h## Surface.fill ##}hj8sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jOj2jPj3jPj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq scroll() (pygame.Surface method)pygame.Surface.scrollhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hscrollh](h)}(hjgh]hscroll}hjisbah}(h]h](hheh]h]h!]h#h$uh%hhjeh&hh'h]h)Kubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjeh&hh'h]h)Kubeh}(h]j`ah](hheh]h]h!]hhhh~hSurface.scrollhhSurfacescrollhSurface.scroll()uh%hzh'h]h)Khjbh&hubh)}(hhh](h)}(hhh](h)}(h&:sl:`Shift the surface image in place`h]h)}(hjh]h Shift the surface image in place}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h :sg:`scroll(dx=0, dy=0) -> None`h]h)}(hjh]hscroll(dx=0, dy=0) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj)}(hX:Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is safe to have dx and dy values that exceed the surface size.h]hX:Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is safe to have dx and dy values that exceed the surface size.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Khjh&hubj)}(hNew in pygame 1.9.h]j)}(hNew in pygame 1.9.h]h)}(hNew in pygame 1.9.h]hNew in pygame 1.9.}hjsbah}(h]h](jjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9uh%jh&hh'h]h)Mhjubh )}(h## Surface.scroll ##h]h## Surface.scroll ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjbh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&set_colorkey() (pygame.Surface method)pygame.Surface.set_colorkeyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_colorkeyh](h)}(hj'h]h set_colorkey}hj)sbah}(h]h](hheh]h]h!]h#h$uh%hhj%h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj%h&hh'h]h)Mubeh}(h]j ah](hheh]h]h!]hhhh~hSurface.set_colorkeyhhSurface set_colorkeyhSurface.set_colorkey()uh%hzh'h]h)Mhj"h&hubh)}(hhh](h)}(hhh](h)}(h":sl:`Set the transparent colorkey`h]h)}(hjSh]hSet the transparent colorkey}hjUsbah}(h]h]hah]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%h)hKhjNh&hh'h]h)Mubh)}(h*:sg:`set_colorkey(Color, flags=0) -> None`h]h)}(hjjh]h$set_colorkey(Color, flags=0) -> None}hjlsbah}(h]h]hah]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%h)hKhjNh&hh'h]h)Mubh)}(h :sg:`set_colorkey(None) -> None`h]h)}(hjh]hset_colorkey(None) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjNh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjKh&hh'h]h)Mubj)}(hXSet the current color key for the Surface. When blitting this Surface onto a destination, any pixels that have the same color as the colorkey will be transparent. The color can be an ``RGB`` color or a mapped color integer. If ``None`` is passed, the colorkey will be unset.h](hSet the current color key for the Surface. When blitting this Surface onto a destination, any pixels that have the same color as the colorkey will be transparent. The color can be an }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh% color or a mapped color integer. If }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh' is passed, the colorkey will be unset.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)M hjKh&hubj)}(hThe colorkey will be ignored if the Surface is formatted to use per pixel alpha values. The colorkey can be mixed with the full Surface alpha value.h]hThe colorkey will be ignored if the Surface is formatted to use per pixel alpha values. The colorkey can be mixed with the full Surface alpha value.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)MhjKh&hubj)}(hThe optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source.h](h*The optional flags argument can be set to }hjsbh;)}(h``pygame.RLEACCEL``h]hpygame.RLEACCEL}hjsbah}(h]h]h]h]h!]uh%h:hjubh? to provide better performance on non accelerated displays. An }hjsbh;)}(h ``RLEACCEL``h]hRLEACCEL}hjsbah}(h]h]h]h]h!]uh%h:hjubhC Surface will be slower to modify, but quicker to blit as a source.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)MhjKh&hubh )}(h## Surface.set_colorkey ##h]h## Surface.set_colorkey ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjKh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j%j2j&j3j&j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&get_colorkey() (pygame.Surface method)pygame.Surface.get_colorkeyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_colorkeyh](h)}(hj=h]h get_colorkey}hj?sbah}(h]h](hheh]h]h!]h#h$uh%hhj;h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj;h&hh'h]h)Mubeh}(h]j6ah](hheh]h]h!]hhhh~hSurface.get_colorkeyhhSurface get_colorkeyhSurface.get_colorkey()uh%hzh'h]h)Mhj8h&hubh)}(hhh](h)}(hhh](h)}(h*:sl:`Get the current transparent colorkey`h]h)}(hjih]h$Get the current transparent colorkey}hjksbah}(h]h]hah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)Mubh)}(h#:sg:`get_colorkey() -> RGB or None`h]h)}(hjh]hget_colorkey() -> RGB or None}hjsbah}(h]h]hah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjah&hh'h]h)Mubj)}(hhReturn the current colorkey value for the Surface. If the colorkey is not set then ``None`` is returned.h](hSReturn the current colorkey value for the Surface. If the colorkey is not set then }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh is returned.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjah&hubh )}(h## Surface.get_colorkey ##h]h## Surface.get_colorkey ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjah&hh'h]h)M!ubeh}(h]h]h]h]h!]uh%hhj8h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#set_alpha() (pygame.Surface method)pygame.Surface.set_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_alphah](h)}(hjh]h set_alpha}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M#ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)M#ubeh}(h]jah](hheh]h]h!]hhhh~hSurface.set_alphahhSurface set_alphahSurface.set_alpha()uh%hzh'h]h)M#hjh&hubh)}(hhh](h)}(hhh](h)}(h4:sl:`set the alpha value for the full Surface image`h]h)}(hjh]h.set the alpha value for the full Surface image}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M%ubh)}(h':sg:`set_alpha(value, flags=0) -> None`h]h)}(hj-h]h!set_alpha(value, flags=0) -> None}hj/sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M&ubh)}(h:sg:`set_alpha(None) -> None`h]h)}(hjDh]hset_alpha(None) -> None}hjFsbah}(h]h]hah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M%ubj)}(hXSSet the current alpha value for the Surface. When blitting this Surface onto a destination, the pixels will be drawn slightly transparent. The alpha value is an integer from 0 to 255, 0 is fully transparent and 255 is fully opaque. If ``None`` is passed for the alpha value, then alpha blending will be disabled, including per-pixel alpha.h](hSet the current alpha value for the Surface. When blitting this Surface onto a destination, the pixels will be drawn slightly transparent. The alpha value is an integer from 0 to 255, 0 is fully transparent and 255 is fully opaque. If }hj_sbh;)}(h``None``h]hNone}hjgsbah}(h]h]h]h]h!]uh%h:hj_ubh` is passed for the alpha value, then alpha blending will be disabled, including per-pixel alpha.}hj_sbeh}(h]h]h]h]h!]uh%j h'h]h)M)hjh&hubj)}(hThis value is different than the per pixel Surface alpha. For a surface with per pixel alpha, blanket alpha is ignored and ``None`` is returned.h](h{This value is different than the per pixel Surface alpha. For a surface with per pixel alpha, blanket alpha is ignored and }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubh is returned.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)M/hjh&hubj)}(hNChanged in pygame 2.0: per-surface alpha can be combined with per-pixel alpha.h]j)}(hNChanged in pygame 2.0: per-surface alpha can be combined with per-pixel alpha.h](h)}(hChanged in pygame 2.0: h]hChanged in pygame 2.0: }hjsbah}(h]h](jchangedeh]h]h!]uh%hhjh&hh'h]h)M4ubh7per-surface alpha can be combined with per-pixel alpha.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)M4ubah}(h]h]h]h]h!]jbversionchangedjd2.0uh%jh&hh'h]h)M2hjubj)}(hThe optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source.h](h*The optional flags argument can be set to }hjsbh;)}(h``pygame.RLEACCEL``h]hpygame.RLEACCEL}hjsbah}(h]h]h]h]h!]uh%h:hjubh? to provide better performance on non accelerated displays. An }hjsbh;)}(h ``RLEACCEL``h]hRLEACCEL}hjsbah}(h]h]h]h]h!]uh%h:hjubhC Surface will be slower to modify, but quicker to blit as a source.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)M5hjh&hubh )}(h## Surface.set_alpha ##h]h## Surface.set_alpha ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M9ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_alpha() (pygame.Surface method)pygame.Surface.get_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_alphah](h)}(hj*h]h get_alpha}hj,sbah}(h]h](hheh]h]h!]h#h$uh%hhj(h&hh'h]h)M;ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj(h&hh'h]h)M;ubeh}(h]j#ah](hheh]h]h!]hhhh~hSurface.get_alphahhSurface get_alphahSurface.get_alpha()uh%hzh'h]h)M;hj%h&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`get the current Surface transparency value`h]h)}(hjVh]h*get the current Surface transparency value}hjXsbah}(h]h]hah]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)M=ubh)}(h:sg:`get_alpha() -> int_value`h]h)}(hjmh]hget_alpha() -> int_value}hjosbah}(h]h]hah]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%h)hKhjQh&hh'h]h)M>ubeh}(h]h]h]h]h!]uh%hhjNh&hh'h]h)M=ubj)}(h/Return the current alpha value for the Surface.h]h/Return the current alpha value for the Surface.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)M@hjNh&hubh )}(h## Surface.get_alpha ##h]h## Surface.get_alpha ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjNh&hh'h]h)MBubeh}(h]h]h]h]h!]uh%hhj%h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqlock() (pygame.Surface method)pygame.Surface.lockhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hlockh](h)}(hjh]hlock}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MDubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)MDubeh}(h]jah](hheh]h]h!]hhhh~h Surface.lockhhSurfacelockhSurface.lock()uh%hzh'h]h)MDhjh&hubh)}(hhh](h)}(hhh](h)}(h.:sl:`lock the Surface memory for pixel access`h]h)}(hjh]h(lock the Surface memory for pixel access}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MFubh)}(h:sg:`lock() -> None`h]h)}(hjh]hlock() -> None}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MGubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MFubj)}(hX@Lock the pixel data of a Surface for access. On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked.h]hX@Lock the pixel data of a Surface for access. On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked.}hj#sbah}(h]h]h]h]h!]uh%j h'h]h)MIhjh&hubj)}(h|Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame.h]h|Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame.}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)MOhjh&hubj)}(hNot all Surfaces require locking. The :meth:`mustlock()` method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it.h](h&Not all Surfaces require locking. The }hj?sbh6)}(h:meth:`mustlock()`h]h;)}(hjIh]h mustlock()}hjKsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjGubah}(h]h]h]h]h!]refdochS refdomainjUreftypemeth refexplicitrefwarnhYhhZh~h[mustlockuh%h5h'h]h)MRhj?ubh method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it.}hj?sbeh}(h]h]h]h]h!]uh%j h'h]h)MRhjh&hubj)}(hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.h]hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.}hjqsbah}(h]h]h]h]h!]uh%j h'h]h)MVhjh&hubj)}(hsIt is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.h]hsIt is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)M[hjh&hubh )}(h## Surface.lock ##h]h## Surface.lock ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M^ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq unlock() (pygame.Surface method)pygame.Surface.unlockhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hunlockh](h)}(hjh]hunlock}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M`ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)M`ubeh}(h]jah](hheh]h]h!]hhhh~hSurface.unlockhhSurfaceunlockhSurface.unlock()uh%hzh'h]h)M`hjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`unlock the Surface memory from pixel access`h]h)}(hjh]h+unlock the Surface memory from pixel access}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mbubh)}(h:sg:`unlock() -> None`h]h)}(hjh]hunlock() -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mcubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mbubj)}(hUnlock the Surface pixel data after it has been locked. The unlocked Surface can once again be drawn and managed by pygame. See the :meth:`lock()` documentation for more details.h](hUnlock the Surface pixel data after it has been locked. The unlocked Surface can once again be drawn and managed by pygame. See the }hjsbh6)}(h:meth:`lock()`h]h;)}(hj$h]hlock()}hj&sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj"ubah}(h]h]h]h]h!]refdochS refdomainj0reftypemeth refexplicitrefwarnhYhhZh~h[lockuh%h5h'h]h)Mehjubh documentation for more details.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mehjh&hubj)}(hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.h]hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.}hjLsbah}(h]h]h]h]h!]uh%j h'h]h)Mihjh&hubj)}(hsIt is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.h]hsIt is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.}hjZsbah}(h]h]h]h]h!]uh%j h'h]h)Mnhjh&hubh )}(h## Surface.unlock ##h]h## Surface.unlock ##}hjhsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mqubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"mustlock() (pygame.Surface method)pygame.Surface.mustlockhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hmustlockh](h)}(hjh]hmustlock}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Msubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Msubeh}(h]jah](hheh]h]h!]hhhh~hSurface.mustlockhhSurfacemustlockhSurface.mustlock()uh%hzh'h]h)Mshjh&hubh)}(hhh](h)}(hhh](h)}(h*:sl:`test if the Surface requires locking`h]h)}(hjh]h$test if the Surface requires locking}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Muubh)}(h:sg:`mustlock() -> bool`h]h)}(hjh]hmustlock() -> bool}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mvubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Muubj)}(hReturns ``True`` if the Surface is required to be locked to access pixel data. Usually pure software Surfaces do not require locking. This method is rarely needed, since it is safe and quickest to just lock all Surfaces as needed.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubh if the Surface is required to be locked to access pixel data. Usually pure software Surfaces do not require locking. This method is rarely needed, since it is safe and quickest to just lock all Surfaces as needed.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mxhjh&hubj)}(hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.h]hAll pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)M}hjh&hubh )}(h## Surface.mustlock ##h]h## Surface.mustlock ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j:j2j;j3j;j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_locked() (pygame.Surface method)pygame.Surface.get_lockedhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_lockedh](h)}(hjRh]h get_locked}hjTsbah}(h]h](hheh]h]h!]h#h$uh%hhjPh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjPh&hh'h]h)Mubeh}(h]jKah](hheh]h]h!]hhhh~hSurface.get_lockedhhSurface get_lockedhSurface.get_locked()uh%hzh'h]h)MhjMh&hubh)}(hhh](h)}(hhh](h)}(h+:sl:`test if the Surface is current locked`h]h)}(hj~h]h%test if the Surface is current locked}hjsbah}(h]h]hah]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)Mubh)}(h:sg:`get_locked() -> bool`h]h)}(hjh]hget_locked() -> bool}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjyh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjvh&hh'h]h)Mubj)}(hdReturns ``True`` when the Surface is locked. It doesn't matter how many times the Surface is locked.h](hReturns }hjsbh;)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h:hjubhT when the Surface is locked. It doesn't matter how many times the Surface is locked.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjvh&hubh )}(h## Surface.get_locked ##h]h## Surface.get_locked ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjvh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjMh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_locks() (pygame.Surface method)pygame.Surface.get_lockshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_locksh](h)}(hjh]h get_locks}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_lockshhSurface get_lockshSurface.get_locks()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h$:sl:`Gets the locks for the Surface`h]h)}(hj+h]hGets the locks for the Surface}hj-sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubh)}(h:sg:`get_locks() -> tuple`h]h)}(hjBh]hget_locks() -> tuple}hjDsbah}(h]h]hah]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj#h&hh'h]h)Mubj)}(h5Returns the currently existing locks for the Surface.h]h5Returns the currently existing locks for the Surface.}hj]sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj#h&hubh )}(h## Surface.get_locks ##h]h## Surface.get_locks ##}hjksbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq get_at() (pygame.Surface method)pygame.Surface.get_athNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_ath](h)}(hjh]hget_at}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_athhSurfaceget_athSurface.get_at()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h+:sl:`get the color value at a single pixel`h]h)}(hjh]h%get the color value at a single pixel}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`get_at((x, y)) -> Color`h]h)}(hjh]hget_at((x, y)) -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hReturn a copy of the ``RGBA`` Color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised.h](hReturn a copy of the }hjsbh;)}(h``RGBA``h]hRGBA}hjsbah}(h]h]h]h]h!]uh%h:hjubh Color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an }hjsbh;)}(h``IndexError``h]h IndexError}hjsbah}(h]h]h]h]h!]uh%h:hjubh exception will be raised.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hXGetting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using :mod:`pygame.surfarray`/:mod:`pygame.PixelArray`.h](hGetting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using }hj*sbh6)}(h:mod:`pygame.surfarray`h]h;)}(hj4h]hpygame.surfarray}hj6sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj2ubah}(h]h]h]h]h!]refdochS refdomainj@reftypemod refexplicitrefwarnhYhhZh~h[pygame.surfarrayuh%h5h'h]h)Mhj*ubh/}hj*sbh6)}(h:mod:`pygame.PixelArray`h]h;)}(hjXh]hpygame.PixelArray}hjZsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjVubah}(h]h]h]h]h!]refdochS refdomainjdreftypemod refexplicitrefwarnhYhhZh~h[pygame.PixelArrayuh%h5h'h]h)Mhj*ubh.}hj*sbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hEThis function will temporarily lock and unlock the Surface as needed.h]hEThis function will temporarily lock and unlock the Surface as needed.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hNew in pygame 1.9: Returning a Color instead of tuple. Use tuple(surf.get_at((x,y))) if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict.h]j)}(hNew in pygame 1.9: Returning a Color instead of tuple. Use tuple(surf.get_at((x,y))) if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict.h](h)}(hNew in pygame 1.9: h]hNew in pygame 1.9: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Mubh(Returning a Color instead of tuple. Use }(hjh&hh'Nh)Nubh;)}(h``tuple(surf.get_at((x,y)))``h]htuple(surf.get_at((x,y)))}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubho if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9uh%jh&hh'h]h)Mhjubh )}(h## Surface.get_at ##h]h## Surface.get_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq set_at() (pygame.Surface method)pygame.Surface.set_athNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hset_ath](h)}(hjh]hset_at}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.set_athhSurfaceset_athSurface.set_at()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h,:sl:`set the color value for a single pixel`h]h)}(hj$h]h&set the color value for a single pixel}hj&sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h#:sg:`set_at((x, y), Color) -> None`h]h)}(hj;h]hset_at((x, y), Color) -> None}hj=sbah}(h]h]hah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hSet the ``RGBA`` or mapped integer color value for a single pixel. If the Surface does not have per pixel alphas, the alpha value is ignored. Setting pixels outside the Surface area or outside the Surface clipping will have no effect.h](hSet the }hjVsbh;)}(h``RGBA``h]hRGBA}hj^sbah}(h]h]h]h]h!]uh%h:hjVubh or mapped integer color value for a single pixel. If the Surface does not have per pixel alphas, the alpha value is ignored. Setting pixels outside the Surface area or outside the Surface clipping will have no effect.}hjVsbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hjGetting and setting pixels one at a time is generally too slow to be used in a game or realtime situation.h]hjGetting and setting pixels one at a time is generally too slow to be used in a game or realtime situation.}hjvsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hEThis function will temporarily lock and unlock the Surface as needed.h]hEThis function will temporarily lock and unlock the Surface as needed.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubh note)}(hcIf the surface is palettized, the pixel color will be set to the most similar color in the palette.h]j)}(hcIf the surface is palettized, the pixel color will be set to the most similar color in the palette.h]hcIf the surface is palettized, the pixel color will be set to the most similar color in the palette.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjubah}(h]h]h]h]h!]uh%jh'h]h)Mhjh&hubh )}(h## Surface.set_at ##h]h## Surface.set_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq'get_at_mapped() (pygame.Surface method)pygame.Surface.get_at_mappedhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_at_mappedh](h)}(hjh]h get_at_mapped}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_at_mappedhhSurface get_at_mappedhSurface.get_at_mapped()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h2:sl:`get the mapped color value at a single pixel`h]h)}(hjh]h,get the mapped color value at a single pixel}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h$:sg:`get_at_mapped((x, y)) -> Color`h]h)}(hjh]hget_at_mapped((x, y)) -> Color}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hReturn the integer value of the given pixel. If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised.h](hiReturn the integer value of the given pixel. If the pixel position is outside the area of the Surface an }hj9sbh;)}(h``IndexError``h]h IndexError}hjAsbah}(h]h]h]h]h!]uh%h:hj9ubh exception will be raised.}hj9sbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(h[This method is intended for pygame unit testing. It unlikely has any use in an application.h]h[This method is intended for pygame unit testing. It unlikely has any use in an application.}hjYsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hEThis function will temporarily lock and unlock the Surface as needed.h]hEThis function will temporarily lock and unlock the Surface as needed.}hjgsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hNew in pygame 1.9.2.h]j)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj}sbah}(h]h](jjeh]h]h!]uh%hhjyubah}(h]h]h]h]h!] translatableuh%j hjuh&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9.2uh%jh&hh'h]h)Mhjubh )}(h## Surface.get_at_mapped ##h]h## Surface.get_at_mapped ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%get_palette() (pygame.Surface method)pygame.Surface.get_palettehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_paletteh](h)}(hjh]h get_palette}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_palettehhSurface get_palettehSurface.get_palette()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h6:sl:`get the color index palette for an 8-bit Surface`h]h)}(hjh]h0get the color index palette for an 8-bit Surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h+:sg:`get_palette() -> [RGB, RGB, RGB, ...]`h]h)}(hj h]h%get_palette() -> [RGB, RGB, RGB, ...]}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hReturn a list of up to 256 color elements that represent the indexed colors used in an 8-bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface.h]hReturn a list of up to 256 color elements that represent the indexed colors used in an 8-bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface.}hj'sbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hIReturning a list of ``Color(with length 3)`` instances instead of tuples.h](hReturning a list of }hj5sbh;)}(h``Color(with length 3)``h]hColor(with length 3)}hj=sbah}(h]h]h]h]h!]uh%h:hj5ubh instances instead of tuples.}hj5sbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hNew in pygame 1.9.h]j)}(hNew in pygame 1.9.h]h)}(hNew in pygame 1.9.h]hNew in pygame 1.9.}hj]sbah}(h]h](jjeh]h]h!]uh%hhjYubah}(h]h]h]h]h!] translatableuh%j hjUh&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9uh%jh&hh'h]h)Mhjubh )}(h## Surface.get_palette ##h]h## Surface.get_palette ##}hjzsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(get_palette_at() (pygame.Surface method)pygame.Surface.get_palette_athNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_palette_ath](h)}(hjh]hget_palette_at}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_palette_athhSurfaceget_palette_athSurface.get_palette_at()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h3:sl:`get the color for a single entry in a palette`h]h)}(hjh]h-get the color for a single entry in a palette}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h":sg:`get_palette_at(index) -> RGB`h]h)}(hjh]hget_palette_at(index) -> RGB}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hReturns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255.h]hReturns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hNNew in pygame 1.9: Returning Color(with length 3) instance instead of a tuple.h]j)}(hNNew in pygame 1.9: Returning Color(with length 3) instance instead of a tuple.h](h)}(hNew in pygame 1.9: h]hNew in pygame 1.9: }hjsbah}(h]h](jjeh]h]h!]uh%hhjh&hh'h]h)Mubh Returning }(hjh&hh'Nh)Nubh;)}(h``Color(with length 3)``h]hColor(with length 3)}hj/sbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh instance instead of a tuple.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j hjh&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9uh%jh&hh'h]h)Mhjubh )}(h## Surface.get_palette_at ##h]h## Surface.get_palette_at ##}hjPsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jgj2jhj3jhj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%set_palette() (pygame.Surface method)pygame.Surface.set_palettehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_paletteh](h)}(hjh]h set_palette}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj}h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj}h&hh'h]h)Mubeh}(h]jxah](hheh]h]h!]hhhh~hSurface.set_palettehhSurface set_palettehSurface.set_palette()uh%hzh'h]h)Mhjzh&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`set the color palette for an 8-bit Surface`h]h)}(hjh]h*set the color palette for an 8-bit Surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h/:sg:`set_palette([RGB, RGB, RGB, ...]) -> None`h]h)}(hjh]h)set_palette([RGB, RGB, RGB, ...]) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hSet the full palette for an 8-bit Surface. This will replace the colors in the existing palette. A partial palette can be passed and only the first colors in the original palette will be changed.h]hSet the full palette for an 8-bit Surface. This will replace the colors in the existing palette. A partial palette can be passed and only the first colors in the original palette will be changed.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hIThis function has no effect on a Surface with more than 8-bits per pixel.h]hIThis function has no effect on a Surface with more than 8-bits per pixel.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubh )}(h## Surface.set_palette ##h]h## Surface.set_palette ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjzh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(set_palette_at() (pygame.Surface method)pygame.Surface.set_palette_athNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hset_palette_ath](h)}(hj(h]hset_palette_at}hj*sbah}(h]h](hheh]h]h!]h#h$uh%hhj&h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj&h&hh'h]h)Mubeh}(h]j!ah](hheh]h]h!]hhhh~hSurface.set_palette_athhSurfaceset_palette_athSurface.set_palette_at()uh%hzh'h]h)Mhj#h&hubh)}(hhh](h)}(hhh](h)}(hB:sl:`set the color for a single index in an 8-bit Surface palette`h]h)}(hjTh]h None`h]h)}(hjkh]h"set_palette_at(index, RGB) -> None}hjmsbah}(h]h]hah]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%h)hKhjOh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjLh&hh'h]h)Mubj)}(hiSet the palette value for a single entry in a Surface palette. The index should be a value from 0 to 255.h]hiSet the palette value for a single entry in a Surface palette. The index should be a value from 0 to 255.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)MhjLh&hubj)}(hIThis function has no effect on a Surface with more than 8-bits per pixel.h]hIThis function has no effect on a Surface with more than 8-bits per pixel.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)MhjLh&hubh )}(h## Surface.set_palette_at ##h]h## Surface.set_palette_at ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjLh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj#h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!map_rgb() (pygame.Surface method)pygame.Surface.map_rgbhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hmap_rgbh](h)}(hjh]hmap_rgb}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)M ubeh}(h]jah](hheh]h]h!]hhhh~hSurface.map_rgbhhSurfacemap_rgbhSurface.map_rgb()uh%hzh'h]h)M hjh&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`convert a color into a mapped color value`h]h)}(hjh]h)convert a color into a mapped color value}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubh)}(h":sg:`map_rgb(Color) -> mapped_int`h]h)}(hjh]hmap_rgb(Color) -> mapped_int}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M ubj)}(hXConvert an ``RGBA`` color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.h](h Convert an }hj/sbh;)}(h``RGBA``h]hRGBA}hj7sbah}(h]h]h]h]h!]uh%h:hj/ubhX color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.}hj/sbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hYSee the Surface object documentation for more information about colors and pixel formats.h]hYSee the Surface object documentation for more information about colors and pixel formats.}hjOsbah}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubh )}(h## Surface.map_rgb ##h]h## Surface.map_rgb ##}hj]sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jtj2juj3juj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#unmap_rgb() (pygame.Surface method)pygame.Surface.unmap_rgbhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h unmap_rgbh](h)}(hjh]h unmap_rgb}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~hSurface.unmap_rgbhhSurface unmap_rgbhSurface.unmap_rgb()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h7:sl:`convert a mapped integer color value into a Color`h]h)}(hjh]h1convert a mapped integer color value into a Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h$:sg:`unmap_rgb(mapped_int) -> Color`h]h)}(hjh]hunmap_rgb(mapped_int) -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj)}(hConvert an mapped integer color into the ``RGB`` color components for this Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.h](h)Convert an mapped integer color into the }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh color components for this Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)Mhjh&hubj)}(hYSee the Surface object documentation for more information about colors and pixel formats.h]hYSee the Surface object documentation for more information about colors and pixel formats.}hj sbah}(h]h]h]h]h!]uh%j h'h]h)M"hjh&hubh )}(h## Surface.unmap_rgb ##h]h## Surface.unmap_rgb ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M%ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j/j2j0j3j0j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"set_clip() (pygame.Surface method)pygame.Surface.set_cliphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hset_cliph](h)}(hjGh]hset_clip}hjIsbah}(h]h](hheh]h]h!]h#h$uh%hhjEh&hh'h]h)M'ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjEh&hh'h]h)M'ubeh}(h]j@ah](hheh]h]h!]hhhh~hSurface.set_cliphhSurfaceset_cliphSurface.set_clip()uh%hzh'h]h)M'hjBh&hubh)}(hhh](h)}(hhh](h)}(h2:sl:`set the current clipping area of the Surface`h]h)}(hjsh]h,set the current clipping area of the Surface}hjusbah}(h]h]hah]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)M)ubh)}(h:sg:`set_clip(rect) -> None`h]h)}(hjh]hset_clip(rect) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)M*ubh)}(h:sg:`set_clip(None) -> None`h]h)}(hjh]hset_clip(None) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjnh&hh'h]h)M+ubeh}(h]h]h]h]h!]uh%hhjkh&hh'h]h)M)ubj)}(hEach Surface has an active clipping area. This is a rectangle that represents the only pixels on the Surface that can be modified. If ``None`` is passed for the rectangle the full Surface will be available for changes.h](hEach Surface has an active clipping area. This is a rectangle that represents the only pixels on the Surface that can be modified. If }hjsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjubhL is passed for the rectangle the full Surface will be available for changes.}hjsbeh}(h]h]h]h]h!]uh%j h'h]h)M-hjkh&hubj)}(hThe clipping area is always restricted to the area of the Surface itself. If the clip rectangle is too large it will be shrunk to fit inside the Surface.h]hThe clipping area is always restricted to the area of the Surface itself. If the clip rectangle is too large it will be shrunk to fit inside the Surface.}hjsbah}(h]h]h]h]h!]uh%j h'h]h)M2hjkh&hubh )}(h## Surface.set_clip ##h]h## Surface.set_clip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjkh&hh'h]h)M6ubeh}(h]h]h]h]h!]uh%hhjBh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"get_clip() (pygame.Surface method)pygame.Surface.get_cliphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_cliph](h)}(hjh]hget_clip}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M8ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)M8ubeh}(h]jah](hheh]h]h!]hhhh~hSurface.get_cliphhSurfaceget_cliphSurface.get_clip()uh%hzh'h]h)M8hjh&hubh)}(hhh](h)}(hhh](h)}(h2:sl:`get the current clipping area of the Surface`h]h)}(hjEh]h,get the current clipping area of the Surface}hjGsbah}(h]h]hah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj@h&hh'h]h)M:ubh)}(h:sg:`get_clip() -> Rect`h]h)}(hj\h]hget_clip() -> Rect}hj^sbah}(h]h]hah]h]h!]uh%hhjZubah}(h]h]h]h]h!]uh%h)hKhj@h&hh'h]h)M;ubeh}(h]h]h]h]h!]uh%hhj=h&hh'h]h)M:ubj)}(hXReturn a rectangle of the current clipping area. The Surface will always return a valid rectangle that will never be outside the bounds of the image. If the Surface has had ``None`` set for the clipping area, the Surface will return a rectangle with the full area of the Surface.h](hReturn a rectangle of the current clipping area. The Surface will always return a valid rectangle that will never be outside the bounds of the image. If the Surface has had }hjwsbh;)}(h``None``h]hNone}hjsbah}(h]h]h]h]h!]uh%h:hjwubhb set for the clipping area, the Surface will return a rectangle with the full area of the Surface.}hjwsbeh}(h]h]h]h]h!]uh%j h'h]h)M=hj=h&hubh )}(h## Surface.get_clip ##h]h## Surface.get_clip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj=h&hh'h]h)MBubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jj2jj3jj4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$subsurface() (pygame.Surface method)pygame.Surface.subsurfacehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h subsurfaceh](h)}(hjh]h subsurface}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)MDubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjh&hh'h]h)MDubeh}(h]jah](hheh]h]h!]hhhh~hSurface.subsurfacehhSurface subsurfacehSurface.subsurface()uh%hzh'h]h)MDhjh&hubh)}(hhh](h)}(hhh](h)}(h5:sl:`create a new surface that references its parent`h]h)}(hjh]h/create a new surface that references its parent}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MFubh)}(h!:sg:`subsurface(Rect) -> Surface`h]h)}(hj h]hsubsurface(Rect) -> Surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MGubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)MFubj)}(hX Returns a new Surface that shares its pixels with its new parent. The new Surface is considered a child of the original. Modifications to either Surface pixels will effect each other. Surface information like clipping area and color keys are unique to each Surface.h]hX Returns a new Surface that shares its pixels with its new parent. The new Surface is considered a child of the original. Modifications to either Surface pixels will effect each other. Surface information like clipping area and color keys are unique to each Surface.}hj$ sbah}(h]h]h]h]h!]uh%j h'h]h)MIhjh&hubj)}(hXThe new Surface will inherit the palette, color key, and alpha settings from its parent.h]hXThe new Surface will inherit the palette, color key, and alpha settings from its parent.}hj2 sbah}(h]h]h]h]h!]uh%j h'h]h)MNhjh&hubj)}(hIt is possible to have any number of subsurfaces and subsubsurfaces on the parent. It is also possible to subsurface the display Surface if the display mode is not hardware accelerated.h]hIt is possible to have any number of subsurfaces and subsubsurfaces on the parent. It is also possible to subsurface the display Surface if the display mode is not hardware accelerated.}hj@ sbah}(h]h]h]h]h!]uh%j h'h]h)MQhjh&hubj)}(h`See :meth:`get_offset()` and :meth:`get_parent()` to learn more about the state of a subsurface.h](hSee }hjN sbh6)}(h:meth:`get_offset()`h]h;)}(hjX h]h get_offset()}hjZ sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjV ubah}(h]h]h]h]h!]refdochS refdomainjd reftypemeth refexplicitrefwarnhYhhZh~h[ get_offsetuh%h5h'h]h)MUhjN ubh and }hjN sbh6)}(h:meth:`get_parent()`h]h;)}(hj| h]h get_parent()}hj~ sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjz ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYhhZh~h[ get_parentuh%h5h'h]h)MUhjN ubh/ to learn more about the state of a subsurface.}hjN sbeh}(h]h]h]h]h!]uh%j h'h]h)MUhjh&hubj)}(h Surface`h]h)}(hj$!h]hget_parent() -> Surface}hj&!sbah}(h]h]hah]h]h!]uh%hhj"!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)M_ubeh}(h]h]h]h]h!]uh%hhj!h&hh'h]h)M^ubj)}(hgReturns the parent Surface of a subsurface. If this is not a subsurface then ``None`` will be returned.h](hMReturns the parent Surface of a subsurface. If this is not a subsurface then }hj?!sbh;)}(h``None``h]hNone}hjG!sbah}(h]h]h]h]h!]uh%h:hj?!ubh will be returned.}hj?!sbeh}(h]h]h]h]h!]uh%j h'h]h)Mahj!h&hubh )}(h## Surface.get_parent ##h]h## Surface.get_parent ##}hj_!sbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Mdubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jv!j2jw!j3jw!j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(get_abs_parent() (pygame.Surface method)pygame.Surface.get_abs_parenthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_abs_parenth](h)}(hj!h]hget_abs_parent}hj!sbah}(h]h](hheh]h]h!]h#h$uh%hhj!h&hh'h]h)Mfubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj!h&hh'h]h)Mfubeh}(h]j!ah](hheh]h]h!]hhhh~hSurface.get_abs_parenthhSurfaceget_abs_parenthSurface.get_abs_parent()uh%hzh'h]h)Mfhj!h&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`find the top level parent of a subsurface`h]h)}(hj!h]h)find the top level parent of a subsurface}hj!sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Mhubh)}(h!:sg:`get_abs_parent() -> Surface`h]h)}(hj!h]hget_abs_parent() -> Surface}hj!sbah}(h]h]hah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhj!h&hh'h]h)Miubeh}(h]h]h]h]h!]uh%hhj!h&hh'h]h)Mhubj)}(hkReturns the parent Surface of a subsurface. If this is not a subsurface then this surface will be returned.h]hkReturns the parent Surface of a subsurface. If this is not a subsurface then this surface will be returned.}hj!sbah}(h]h]h]h]h!]uh%j h'h]h)Mkhj!h&hubh )}(h## Surface.get_abs_parent ##h]h## Surface.get_abs_parent ##}hj!sbah}(h]h]h]h]h!]h#h$uh%h hj!h&hh'h]h)Mnubeh}(h]h]h]h]h!]uh%hhj!h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j"j2j"j3j"j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_offset() (pygame.Surface method)pygame.Surface.get_offsethNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_offseth](h)}(hj)"h]h get_offset}hj+"sbah}(h]h](hheh]h]h!]h#h$uh%hhj'"h&hh'h]h)Mpubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj'"h&hh'h]h)Mpubeh}(h]j""ah](hheh]h]h!]hhhh~hSurface.get_offsethhSurface get_offsethSurface.get_offset()uh%hzh'h]h)Mphj$"h&hubh)}(hhh](h)}(hhh](h)}(h=:sl:`find the position of a child subsurface inside a parent`h]h)}(hjU"h]h7find the position of a child subsurface inside a parent}hjW"sbah}(h]h]hah]h]h!]uh%hhjS"ubah}(h]h]h]h]h!]uh%h)hKhjP"h&hh'h]h)Mrubh)}(h:sg:`get_offset() -> (x, y)`h]h)}(hjl"h]hget_offset() -> (x, y)}hjn"sbah}(h]h]hah]h]h!]uh%hhjj"ubah}(h]h]h]h]h!]uh%h)hKhjP"h&hh'h]h)Msubeh}(h]h]h]h]h!]uh%hhjM"h&hh'h]h)Mrubj)}(h}Get the offset position of a child subsurface inside of a parent. If the Surface is not a subsurface this will return (0, 0).h]h}Get the offset position of a child subsurface inside of a parent. If the Surface is not a subsurface this will return (0, 0).}hj"sbah}(h]h]h]h]h!]uh%j h'h]h)MuhjM"h&hubh )}(h## Surface.get_offset ##h]h## Surface.get_offset ##}hj"sbah}(h]h]h]h]h!]h#h$uh%h hjM"h&hh'h]h)Mxubeh}(h]h]h]h]h!]uh%hhj$"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j"j2j"j3j"j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(get_abs_offset() (pygame.Surface method)pygame.Surface.get_abs_offsethNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_abs_offseth](h)}(hj"h]hget_abs_offset}hj"sbah}(h]h](hheh]h]h!]h#h$uh%hhj"h&hh'h]h)Mzubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj"h&hh'h]h)Mzubeh}(h]j"ah](hheh]h]h!]hhhh~hSurface.get_abs_offsethhSurfaceget_abs_offsethSurface.get_abs_offset()uh%hzh'h]h)Mzhj"h&hubh)}(hhh](h)}(hhh](h)}(hR:sl:`find the absolute position of a child subsurface inside its top level parent`h]h)}(hj"h]hLfind the absolute position of a child subsurface inside its top level parent}hj"sbah}(h]h]hah]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M|ubh)}(h :sg:`get_abs_offset() -> (x, y)`h]h)}(hj#h]hget_abs_offset() -> (x, y)}hj #sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)M}ubeh}(h]h]h]h]h!]uh%hhj"h&hh'h]h)M|ubj)}(hGet the offset position of a child subsurface inside of its top level parent Surface. If the Surface is not a subsurface this will return (0, 0).h]hGet the offset position of a child subsurface inside of its top level parent Surface. If the Surface is not a subsurface this will return (0, 0).}hj"#sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj"h&hubh )}(h## Surface.get_abs_offset ##h]h## Surface.get_abs_offset ##}hj0#sbah}(h]h]h]h]h!]h#h$uh%h hj"h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj"h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jG#j2jH#j3jH#j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"get_size() (pygame.Surface method)pygame.Surface.get_sizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_sizeh](h)}(hj_#h]hget_size}hja#sbah}(h]h](hheh]h]h!]h#h$uh%hhj]#h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj]#h&hh'h]h)Mubeh}(h]jX#ah](hheh]h]h!]hhhh~hSurface.get_sizehhSurfaceget_sizehSurface.get_size()uh%hzh'h]h)MhjZ#h&hubh)}(hhh](h)}(hhh](h)}(h':sl:`get the dimensions of the Surface`h]h)}(hj#h]h!get the dimensions of the Surface}hj#sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubh)}(h#:sg:`get_size() -> (width, height)`h]h)}(hj#h]hget_size() -> (width, height)}hj#sbah}(h]h]hah]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%h)hKhj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj#h&hh'h]h)Mubj)}(h5Return the width and height of the Surface in pixels.h]h5Return the width and height of the Surface in pixels.}hj#sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj#h&hubh )}(h## Surface.get_size ##h]h## Surface.get_size ##}hj#sbah}(h]h]h]h]h!]h#h$uh%h hj#h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjZ#h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j#j2j#j3j#j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_width() (pygame.Surface method)pygame.Surface.get_widthhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_widthh](h)}(hj#h]h get_width}hj#sbah}(h]h](hheh]h]h!]h#h$uh%hhj#h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj#h&hh'h]h)Mubeh}(h]j#ah](hheh]h]h!]hhhh~hSurface.get_widthhhSurface get_widthhSurface.get_width()uh%hzh'h]h)Mhj#h&hubh)}(hhh](h)}(hhh](h)}(h":sl:`get the width of the Surface`h]h)}(hj&$h]hget the width of the Surface}hj($sbah}(h]h]hah]h]h!]uh%hhj$$ubah}(h]h]h]h]h!]uh%h)hKhj!$h&hh'h]h)Mubh)}(h:sg:`get_width() -> width`h]h)}(hj=$h]hget_width() -> width}hj?$sbah}(h]h]hah]h]h!]uh%hhj;$ubah}(h]h]h]h]h!]uh%h)hKhj!$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj$h&hh'h]h)Mubj)}(h*Return the width of the Surface in pixels.h]h*Return the width of the Surface in pixels.}hjX$sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj$h&hubh )}(h## Surface.get_width ##h]h## Surface.get_width ##}hjf$sbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj#h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j}$j2j~$j3j~$j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_height() (pygame.Surface method)pygame.Surface.get_heighthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_heighth](h)}(hj$h]h get_height}hj$sbah}(h]h](hheh]h]h!]h#h$uh%hhj$h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj$h&hh'h]h)Mubeh}(h]j$ah](hheh]h]h!]hhhh~hSurface.get_heighthhSurface get_heighthSurface.get_height()uh%hzh'h]h)Mhj$h&hubh)}(hhh](h)}(hhh](h)}(h#:sl:`get the height of the Surface`h]h)}(hj$h]hget the height of the Surface}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Mubh)}(h:sg:`get_height() -> height`h]h)}(hj$h]hget_height() -> height}hj$sbah}(h]h]hah]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%h)hKhj$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj$h&hh'h]h)Mubj)}(h+Return the height of the Surface in pixels.h]h+Return the height of the Surface in pixels.}hj$sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj$h&hubh )}(h## Surface.get_height ##h]h## Surface.get_height ##}hj%sbah}(h]h]h]h]h!]h#h$uh%h hj$h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj$h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j%j2j%j3j%j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"get_rect() (pygame.Surface method)pygame.Surface.get_recthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_recth](h)}(hj0%h]hget_rect}hj2%sbah}(h]h](hheh]h]h!]h#h$uh%hhj.%h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj.%h&hh'h]h)Mubeh}(h]j)%ah](hheh]h]h!]hhhh~hSurface.get_recthhSurfaceget_recthSurface.get_rect()uh%hzh'h]h)Mhj+%h&hubh)}(hhh](h)}(hhh](h)}(h-:sl:`get the rectangular area of the Surface`h]h)}(hj\%h]h'get the rectangular area of the Surface}hj^%sbah}(h]h]hah]h]h!]uh%hhjZ%ubah}(h]h]h]h]h!]uh%h)hKhjW%h&hh'h]h)Mubh)}(h!:sg:`get_rect(\**kwargs) -> Rect`h]h)}(h!:sg:`get_rect(\**kwargs) -> Rect`h]hget_rect(**kwargs) -> Rect}hju%sbah}(h]h]hah]h]h!]uh%hhjq%ubah}(h]h]h]h]h!]uh%h)hKhjW%h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjT%h&hh'h]h)Mubj)}(hReturns a new rectangle covering the entire surface. This rectangle will always start at (0, 0) with a width and height the same size as the image.h]hReturns a new rectangle covering the entire surface. This rectangle will always start at (0, 0) with a width and height the same size as the image.}hj%sbah}(h]h]h]h]h!]uh%j h'h]h)MhjT%h&hubj)}(hX You can pass keyword argument values to this function. These named values will be applied to the attributes of the Rect before it is returned. An example would be ``mysurf.get_rect(center=(100, 100))`` to create a rectangle for the Surface centered at a given position.h](hYou can pass keyword argument values to this function. These named values will be applied to the attributes of the Rect before it is returned. An example would be }hj%sbh;)}(h&``mysurf.get_rect(center=(100, 100))``h]h"mysurf.get_rect(center=(100, 100))}hj%sbah}(h]h]h]h]h!]uh%h:hj%ubhD to create a rectangle for the Surface centered at a given position.}hj%sbeh}(h]h]h]h]h!]uh%j h'h]h)MhjT%h&hubh )}(h## Surface.get_rect ##h]h## Surface.get_rect ##}hj%sbah}(h]h]h]h]h!]h#h$uh%h hjT%h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj+%h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j%j2j%j3j%j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%get_bitsize() (pygame.Surface method)pygame.Surface.get_bitsizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_bitsizeh](h)}(hj%h]h get_bitsize}hj%sbah}(h]h](hheh]h]h!]h#h$uh%hhj%h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj%h&hh'h]h)Mubeh}(h]j%ah](hheh]h]h!]hhhh~hSurface.get_bitsizehhSurface get_bitsizehSurface.get_bitsize()uh%hzh'h]h)Mhj%h&hubh)}(hhh](h)}(hhh](h)}(h3:sl:`get the bit depth of the Surface pixel format`h]h)}(hj&h]h-get the bit depth of the Surface pixel format}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubh)}(h:sg:`get_bitsize() -> int`h]h)}(hj/&h]hget_bitsize() -> int}hj1&sbah}(h]h]hah]h]h!]uh%hhj-&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj&h&hh'h]h)Mubj)}(hReturns the number of bits used to represent each pixel. This value may not exactly fill the number of bytes used per pixel. For example a 15 bit Surface still requires a full 2 bytes.h]hReturns the number of bits used to represent each pixel. This value may not exactly fill the number of bytes used per pixel. For example a 15 bit Surface still requires a full 2 bytes.}hjJ&sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj&h&hubh )}(h## Surface.get_bitsize ##h]h## Surface.get_bitsize ##}hjX&sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj%h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jo&j2jp&j3jp&j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&get_bytesize() (pygame.Surface method)pygame.Surface.get_bytesizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_bytesizeh](h)}(hj&h]h get_bytesize}hj&sbah}(h]h](hheh]h]h!]h#h$uh%hhj&h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj&h&hh'h]h)Mubeh}(h]j&ah](hheh]h]h!]hhhh~hSurface.get_bytesizehhSurface get_bytesizehSurface.get_bytesize()uh%hzh'h]h)Mhj&h&hubh)}(hhh](h)}(hhh](h)}(h*:sl:`get the bytes used per Surface pixel`h]h)}(hj&h]h$get the bytes used per Surface pixel}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubh)}(h:sg:`get_bytesize() -> int`h]h)}(hj&h]hget_bytesize() -> int}hj&sbah}(h]h]hah]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%h)hKhj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj&h&hh'h]h)Mubj)}(h*Return the number of bytes used per pixel.h]h*Return the number of bytes used per pixel.}hj&sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj&h&hubh )}(h## Surface.get_bytesize ##h]h## Surface.get_bytesize ##}hj&sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj&h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j 'j2j 'j3j 'j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_flags() (pygame.Surface method)pygame.Surface.get_flagshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_flagsh](h)}(hj"'h]h get_flags}hj$'sbah}(h]h](hheh]h]h!]h#h$uh%hhj 'h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj 'h&hh'h]h)Mubeh}(h]j'ah](hheh]h]h!]hhhh~hSurface.get_flagshhSurface get_flagshSurface.get_flags()uh%hzh'h]h)Mhj'h&hubh)}(hhh](h)}(hhh](h)}(h3:sl:`get the additional flags used for the Surface`h]h)}(hjN'h]h-get the additional flags used for the Surface}hjP'sbah}(h]h]hah]h]h!]uh%hhjL'ubah}(h]h]h]h]h!]uh%h)hKhjI'h&hh'h]h)Mubh)}(h:sg:`get_flags() -> int`h]h)}(hje'h]hget_flags() -> int}hjg'sbah}(h]h]hah]h]h!]uh%hhjc'ubah}(h]h]h]h]h!]uh%h)hKhjI'h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjF'h&hh'h]h)Mubj)}(hReturns a set of current Surface features. Each feature is a bit in the flags bitmask. Typical flags are ``RLEACCEL``, ``SRCALPHA``, and ``SRCCOLORKEY``.h](hiReturns a set of current Surface features. Each feature is a bit in the flags bitmask. Typical flags are }hj'sbh;)}(h ``RLEACCEL``h]hRLEACCEL}hj'sbah}(h]h]h]h]h!]uh%h:hj'ubh, }hj'sbh;)}(h ``SRCALPHA``h]hSRCALPHA}hj'sbah}(h]h]h]h]h!]uh%h:hj'ubh, and }hj'sbh;)}(h``SRCCOLORKEY``h]h SRCCOLORKEY}hj'sbah}(h]h]h]h]h!]uh%h:hj'ubh.}hj'sbeh}(h]h]h]h]h!]uh%j h'h]h)MhjF'h&hubj)}(hRHere is a more complete list of flags. A full list can be found in ``SDL_video.h``h](hCHere is a more complete list of flags. A full list can be found in }hj'sbh;)}(h``SDL_video.h``h]h SDL_video.h}hj'sbah}(h]h]h]h]h!]uh%h:hj'ubeh}(h]h]h]h]h!]uh%j h'h]h)MhjF'h&hubj^)}(hSWSURFACE 0x00000000 # Surface is in system memory HWSURFACE 0x00000001 # (obsolete in pygame 2) Surface is in video memory ASYNCBLIT 0x00000004 # (obsolete in pygame 2) Use asynchronous blits if possibleh]hSWSURFACE 0x00000000 # Surface is in system memory HWSURFACE 0x00000001 # (obsolete in pygame 2) Surface is in video memory ASYNCBLIT 0x00000004 # (obsolete in pygame 2) Use asynchronous blits if possible}hj'sbah}(h]h]h]h]h!]h#h$uh%j]h'h]h)MhjF'h&hubj)}(hQSee :func:`pygame.display.set_mode()` for flags exclusive to the display surface.h](hSee }hj'sbh6)}(h!:func:`pygame.display.set_mode()`h]h;)}(hj'h]hpygame.display.set_mode()}hj'sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj'ubah}(h]h]h]h]h!]refdochS refdomainj(reftypefunc refexplicitrefwarnhYhhZh~h[pygame.display.set_modeuh%h5h'h]h)Mhj'ubh, for flags exclusive to the display surface.}hj'sbeh}(h]h]h]h]h!]uh%j h'h]h)MhjF'h&hubj)}(hUsed internally (read-only)h]hUsed internally (read-only)}hj (sbah}(h]h]h]h]h!]uh%j h'h]h)MhjF'h&hubj^)}(hX[HWACCEL 0x00000100 # Blit uses hardware acceleration SRCCOLORKEY 0x00001000 # Blit uses a source color key RLEACCELOK 0x00002000 # Private flag RLEACCEL 0x00004000 # Surface is RLE encoded SRCALPHA 0x00010000 # Blit uses source alpha blending PREALLOC 0x01000000 # Surface uses preallocated memoryh]hX[HWACCEL 0x00000100 # Blit uses hardware acceleration SRCCOLORKEY 0x00001000 # Blit uses a source color key RLEACCELOK 0x00002000 # Private flag RLEACCEL 0x00004000 # Surface is RLE encoded SRCALPHA 0x00010000 # Blit uses source alpha blending PREALLOC 0x01000000 # Surface uses preallocated memory}hj.(sbah}(h]h]h]h]h!]h#h$uh%j]h'h]h)MhjF'h&hubh )}(h## Surface.get_flags ##h]h## Surface.get_flags ##}hj<(sbah}(h]h]h]h]h!]h#h$uh%h hjF'h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj'h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jS(j2jT(j3jT(j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_pitch() (pygame.Surface method)pygame.Surface.get_pitchhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_pitchh](h)}(hjk(h]h get_pitch}hjm(sbah}(h]h](hheh]h]h!]h#h$uh%hhji(h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hji(h&hh'h]h)Mubeh}(h]jd(ah](hheh]h]h!]hhhh~hSurface.get_pitchhhSurface get_pitchhSurface.get_pitch()uh%hzh'h]h)Mhjf(h&hubh)}(hhh](h)}(hhh](h)}(h2:sl:`get the number of bytes used per Surface row`h]h)}(hj(h]h,get the number of bytes used per Surface row}hj(sbah}(h]h]hah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Mubh)}(h:sg:`get_pitch() -> int`h]h)}(hj(h]hget_pitch() -> int}hj(sbah}(h]h]hah]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj(h&hh'h]h)Mubj)}(hReturn the number of bytes separating each row in the Surface. Surfaces in video memory are not always linearly packed. Subsurfaces will also have a larger pitch than their real width.h]hReturn the number of bytes separating each row in the Surface. Surfaces in video memory are not always linearly packed. Subsurfaces will also have a larger pitch than their real width.}hj(sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj(h&hubj)}(h1This value is not needed for normal pygame usage.h]h1This value is not needed for normal pygame usage.}hj(sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj(h&hubh )}(h## Surface.get_pitch ##h]h## Surface.get_pitch ##}hj(sbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjf(h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j(j2j(j3j(j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#get_masks() (pygame.Surface method)pygame.Surface.get_maskshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_masksh](h)}(hj)h]h get_masks}hj)sbah}(h]h](hheh]h]h!]h#h$uh%hhj)h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj)h&hh'h]h)Mubeh}(h]j )ah](hheh]h]h!]hhhh~hSurface.get_maskshhSurface get_maskshSurface.get_masks()uh%hzh'h]h)Mhj)h&hubh)}(hhh](h)}(hhh](h)}(hI:sl:`the bitmasks needed to convert between a color and a mapped integer`h]h)}(hj@)h]hCthe bitmasks needed to convert between a color and a mapped integer}hjB)sbah}(h]h]hah]h]h!]uh%hhj>)ubah}(h]h]h]h]h!]uh%h)hKhj;)h&hh'h]h)Mubh)}(h!:sg:`get_masks() -> (R, G, B, A)`h]h)}(hjW)h]hget_masks() -> (R, G, B, A)}hjY)sbah}(h]h]hah]h]h!]uh%hhjU)ubah}(h]h]h]h]h!]uh%h)hKhj;)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj8)h&hh'h]h)Mubj)}(hDReturns the bitmasks used to isolate each color in a mapped integer.h]hDReturns the bitmasks used to isolate each color in a mapped integer.}hjr)sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj8)h&hubj)}(h1This value is not needed for normal pygame usage.h]h1This value is not needed for normal pygame usage.}hj)sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj8)h&hubh )}(h## Surface.get_masks ##h]h## Surface.get_masks ##}hj)sbah}(h]h]h]h]h!]h#h$uh%h hj8)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj)h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j)j2j)j3j)j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq#set_masks() (pygame.Surface method)pygame.Surface.set_maskshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_masksh](h)}(hj)h]h set_masks}hj)sbah}(h]h](hheh]h]h!]h#h$uh%hhj)h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj)h&hh'h]h)Mubeh}(h]j)ah](hheh]h]h!]hhhh~hSurface.set_maskshhSurface set_maskshSurface.set_masks()uh%hzh'h]h)Mhj)h&hubh)}(hhh](h)}(hhh](h)}(hM:sl:`set the bitmasks needed to convert between a color and a mapped integer`h]h)}(hj)h]hGset the bitmasks needed to convert between a color and a mapped integer}hj)sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mubh)}(h":sg:`set_masks((r,g,b,a)) -> None`h]h)}(hj*h]hset_masks((r,g,b,a)) -> None}hj*sbah}(h]h]hah]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj)h&hh'h]h)Mubj)}(h+This is not needed for normal pygame usage.h]h+This is not needed for normal pygame usage.}hj*sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj)h&hubj)}(hmStarting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called.h]j)}(hmStarting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called.h]hmStarting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called.}hj-*sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj)*ubah}(h]h]h]h]h!]uh%jh'h]h)Mhj)h&hubj)}(hDeprecated since pygame 2.0.0.h]j)}(hDeprecated since pygame 2.0.0.h]h)}(hDeprecated since pygame 2.0.0.h]hDeprecated since pygame 2.0.0.}hjI*sbah}(h]h](j deprecatedeh]h]h!]uh%hhjE*ubah}(h]h]h]h]h!] translatableuh%j hjA*h&hh'h]h)Mubah}(h]h]h]h]h!]jb deprecatedjd2.0.0uh%jh&hh'h]h)Mhj)ubj)}(hNew in pygame 1.8.1.h]j)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hjo*sbah}(h]h](jjeh]h]h!]uh%hhjk*ubah}(h]h]h]h]h!] translatableuh%j hjg*h&hh'h]h)M ubah}(h]h]h]h]h!]jb versionaddedjd1.8.1uh%jh&hh'h]h)M hj)ubh )}(h## Surface.set_masks ##h]h## Surface.set_masks ##}hj*sbah}(h]h]h]h]h!]h#h$uh%h hj)h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhj)h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j*j2j*j3j*j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_shifts() (pygame.Surface method)pygame.Surface.get_shiftshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_shiftsh](h)}(hj*h]h get_shifts}hj*sbah}(h]h](hheh]h]h!]h#h$uh%hhj*h&hh'h]h)M ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj*h&hh'h]h)M ubeh}(h]j*ah](hheh]h]h!]hhhh~hSurface.get_shiftshhSurface get_shiftshSurface.get_shifts()uh%hzh'h]h)M hj*h&hubh)}(hhh](h)}(hhh](h)}(hK:sl:`the bit shifts needed to convert between a color and a mapped integer`h]h)}(hj*h]hEthe bit shifts needed to convert between a color and a mapped integer}hj*sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubh)}(h":sg:`get_shifts() -> (R, G, B, A)`h]h)}(hj*h]hget_shifts() -> (R, G, B, A)}hj+sbah}(h]h]hah]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj*h&hh'h]h)Mubj)}(hQReturns the pixel shifts need to convert between each color and a mapped integer.h]hQReturns the pixel shifts need to convert between each color and a mapped integer.}hj+sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj*h&hubj)}(h1This value is not needed for normal pygame usage.h]h1This value is not needed for normal pygame usage.}hj'+sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj*h&hubh )}(h## Surface.get_shifts ##h]h## Surface.get_shifts ##}hj5+sbah}(h]h]h]h]h!]h#h$uh%h hj*h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj*h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jL+j2jM+j3jM+j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$set_shifts() (pygame.Surface method)pygame.Surface.set_shiftshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_shiftsh](h)}(hjd+h]h set_shifts}hjf+sbah}(h]h](hheh]h]h!]h#h$uh%hhjb+h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjb+h&hh'h]h)Mubeh}(h]j]+ah](hheh]h]h!]hhhh~hSurface.set_shiftshhSurface set_shiftshSurface.set_shifts()uh%hzh'h]h)Mhj_+h&hubh)}(hhh](h)}(hhh](h)}(hP:sl:`sets the bit shifts needed to convert between a color and a mapped integer`h]h)}(hj+h]hJsets the bit shifts needed to convert between a color and a mapped integer}hj+sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Mubh)}(h#:sg:`set_shifts((r,g,b,a)) -> None`h]h)}(hj+h]hset_shifts((r,g,b,a)) -> None}hj+sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj+h&hh'h]h)Mubj)}(h+This is not needed for normal pygame usage.h]h+This is not needed for normal pygame usage.}hj+sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj+h&hubj)}(hnStarting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called.h]j)}(hnStarting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called.h]hnStarting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called.}hj+sbah}(h]h]h]h]h!]uh%j h'h]h)M hj+ubah}(h]h]h]h]h!]uh%jh'h]h)M hj+h&hubj)}(hDeprecated since pygame 2.0.0.h]j)}(hDeprecated since pygame 2.0.0.h]h)}(hDeprecated since pygame 2.0.0.h]hDeprecated since pygame 2.0.0.}hj+sbah}(h]h](jjT*eh]h]h!]uh%hhj+ubah}(h]h]h]h]h!] translatableuh%j hj+h&hh'h]h)M$ubah}(h]h]h]h]h!]jb deprecatedjd2.0.0uh%jh&hh'h]h)M#hj+ubj)}(hNew in pygame 1.8.1.h]j)}(hNew in pygame 1.8.1.h]h)}(hNew in pygame 1.8.1.h]hNew in pygame 1.8.1.}hj,sbah}(h]h](jjeh]h]h!]uh%hhj,ubah}(h]h]h]h]h!] translatableuh%j hj ,h&hh'h]h)M&ubah}(h]h]h]h]h!]jb versionaddedjd1.8.1uh%jh&hh'h]h)M%hj+ubh )}(h## Surface.set_shifts ##h]h## Surface.set_shifts ##}hj2,sbah}(h]h]h]h]h!]h#h$uh%h hj+h&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%hhj_+h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1jI,j2jJ,j3jJ,j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_losses() (pygame.Surface method)pygame.Surface.get_losseshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_lossesh](h)}(hja,h]h get_losses}hjc,sbah}(h]h](hheh]h]h!]h#h$uh%hhj_,h&hh'h]h)M)ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj_,h&hh'h]h)M)ubeh}(h]jZ,ah](hheh]h]h!]hhhh~hSurface.get_losseshhSurface get_losseshSurface.get_losses()uh%hzh'h]h)M)hj\,h&hubh)}(hhh](h)}(hhh](h)}(hO:sl:`the significant bits used to convert between a color and a mapped integer`h]h)}(hj,h]hIthe significant bits used to convert between a color and a mapped integer}hj,sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)M+ubh)}(h":sg:`get_losses() -> (R, G, B, A)`h]h)}(hj,h]hget_losses() -> (R, G, B, A)}hj,sbah}(h]h]hah]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%h)hKhj,h&hh'h]h)M,ubeh}(h]h]h]h]h!]uh%hhj,h&hh'h]h)M+ubj)}(hYReturn the least significant number of bits stripped from each color in a mapped integer.h]hYReturn the least significant number of bits stripped from each color in a mapped integer.}hj,sbah}(h]h]h]h]h!]uh%j h'h]h)M.hj,h&hubj)}(h1This value is not needed for normal pygame usage.h]h1This value is not needed for normal pygame usage.}hj,sbah}(h]h]h]h]h!]uh%j h'h]h)M1hj,h&hubh )}(h## Surface.get_losses ##h]h## Surface.get_losses ##}hj,sbah}(h]h]h]h]h!]h#h$uh%h hj,h&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%hhj\,h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j,j2j,j3j,j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq+get_bounding_rect() (pygame.Surface method) pygame.Surface.get_bounding_recthNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_bounding_recth](h)}(hj -h]hget_bounding_rect}hj -sbah}(h]h](hheh]h]h!]h#h$uh%hhj-h&hh'h]h)M5ubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj-h&hh'h]h)M5ubeh}(h]j-ah](hheh]h]h!]hhhh~hSurface.get_bounding_recthhSurfaceget_bounding_recthSurface.get_bounding_rect()uh%hzh'h]h)M5hj-h&hubh)}(hhh](h)}(hhh](h)}(h,:sl:`find the smallest rect containing data`h]h)}(hj6-h]h&find the smallest rect containing data}hj8-sbah}(h]h]hah]h]h!]uh%hhj4-ubah}(h]h]h]h]h!]uh%h)hKhj1-h&hh'h]h)M7ubh)}(h.:sg:`get_bounding_rect(min_alpha = 1) -> Rect`h]h)}(hjM-h]h(get_bounding_rect(min_alpha = 1) -> Rect}hjO-sbah}(h]h]hah]h]h!]uh%hhjK-ubah}(h]h]h]h]h!]uh%h)hKhj1-h&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%hhj.-h&hh'h]h)M7ubj)}(hReturns the smallest rectangular region that contains all the pixels in the surface that have an alpha value greater than or equal to the minimum alpha value.h]hReturns the smallest rectangular region that contains all the pixels in the surface that have an alpha value greater than or equal to the minimum alpha value.}hjh-sbah}(h]h]h]h]h!]uh%j h'h]h)M:hj.-h&hubj)}(hEThis function will temporarily lock and unlock the Surface as needed.h]hEThis function will temporarily lock and unlock the Surface as needed.}hjv-sbah}(h]h]h]h]h!]uh%j h'h]h)M>hj.-h&hubj)}(hNew in pygame 1.8.h]j)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj-sbah}(h]h](jjeh]h]h!]uh%hhj-ubah}(h]h]h]h]h!] translatableuh%j hj-h&hh'h]h)MAubah}(h]h]h]h]h!]jb versionaddedjd1.8uh%jh&hh'h]h)M@hj.-ubh )}(h## Surface.get_bounding_rect ##h]h## Surface.get_bounding_rect ##}hj-sbah}(h]h]h]h]h!]h#h$uh%h hj.-h&hh'h]h)MBubeh}(h]h]h]h]h!]uh%hhj-h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j-j2j-j3j-j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"get_view() (pygame.Surface method)pygame.Surface.get_viewhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hget_viewh](h)}(hj-h]hget_view}hj-sbah}(h]h](hheh]h]h!]h#h$uh%hhj-h&hh'h]h)MDubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj-h&hh'h]h)MDubeh}(h]j-ah](hheh]h]h!]hhhh~hSurface.get_viewhhSurfaceget_viewhSurface.get_view()uh%hzh'h]h)MDhj-h&hubh)}(hhh](h)}(hhh](h)}(h3:sl:`return a buffer view of the Surface's pixels.`h]h)}(hj.h]h-return a buffer view of the Surface's pixels.}hj.sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)MFubh)}(h):sg:`get_view(='2') -> BufferProxy`h]h)}(hj.h]h#get_view(='2') -> BufferProxy}hj.sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj-h&hh'h]h)MGubeh}(h]h]h]h]h!]uh%hhj-h&hh'h]h)MFubj)}(hReturn an object which exports a surface's internal pixel buffer as a C level array struct, Python level array interface or a C level buffer interface. The new buffer protocol is supported.h]hReturn an object which exports a surface's internal pixel buffer as a C level array struct, Python level array interface or a C level buffer interface. The new buffer protocol is supported.}hj6.sbah}(h]h]h]h]h!]uh%j h'h]h)MIhj-h&hubj)}(hThe kind argument is the length 1 string '0', '1', '2', '3', 'r', 'g', 'b', or 'a'. The letters are case insensitive; 'A' will work as well. The argument can be either a Unicode or byte (char) string. The default is '2'.h]hThe kind argument is the length 1 string '0', '1', '2', '3', 'r', 'g', 'b', or 'a'. The letters are case insensitive; 'A' will work as well. The argument can be either a Unicode or byte (char) string. The default is '2'.}hjD.sbah}(h]h]h]h]h!]uh%j h'h]h)MMhj-h&hubj)}(h'0' returns a contiguous unstructured bytes view. No surface shape information is given. A ``ValueError`` is raised if the surface's pixels are discontinuous.h](h['0' returns a contiguous unstructured bytes view. No surface shape information is given. A }hjR.sbh;)}(h``ValueError``h]h ValueError}hjZ.sbah}(h]h]h]h]h!]uh%h:hjR.ubh5 is raised if the surface's pixels are discontinuous.}hjR.sbeh}(h]h]h]h]h!]uh%j h'h]h)MRhj-h&hubj)}(h'1' returns a (surface-width * surface-height) array of continuous pixels. A ``ValueError`` is raised if the surface pixels are discontinuous.h](hM'1' returns a (surface-width * surface-height) array of continuous pixels. A }hjr.sbh;)}(h``ValueError``h]h ValueError}hjz.sbah}(h]h]h]h]h!]uh%h:hjr.ubh3 is raised if the surface pixels are discontinuous.}hjr.sbeh}(h]h]h]h]h!]uh%j h'h]h)MVhj-h&hubj)}(hX'2' returns a (surface-width, surface-height) array of raw pixels. The pixels are surface-bytesize-d unsigned integers. The pixel format is surface specific. The 3 byte unsigned integers of 24 bit surfaces are unlikely accepted by anything other than other pygame functions.h]hX'2' returns a (surface-width, surface-height) array of raw pixels. The pixels are surface-bytesize-d unsigned integers. The pixel format is surface specific. The 3 byte unsigned integers of 24 bit surfaces are unlikely accepted by anything other than other pygame functions.}hj.sbah}(h]h]h]h]h!]uh%j h'h]h)MZhj-h&hubj)}(hX'3' returns a (surface-width, surface-height, 3) array of ``RGB`` color components. Each of the red, green, and blue components are unsigned bytes. Only 24-bit and 32-bit surfaces are supported. The color components must be in either ``RGB`` or ``BGR`` order within the pixel.h](h:'3' returns a (surface-width, surface-height, 3) array of }hj.sbh;)}(h``RGB``h]hRGB}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubh color components. Each of the red, green, and blue components are unsigned bytes. Only 24-bit and 32-bit surfaces are supported. The color components must be in either }hj.sbh;)}(h``RGB``h]hRGB}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubh or }hj.sbh;)}(h``BGR``h]hBGR}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubh order within the pixel.}hj.sbeh}(h]h]h]h]h!]uh%j h'h]h)M_hj-h&hubj)}(hX:'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a (surface-width, surface-height) view of a single color component within a surface: a color plane. Color components are unsigned bytes. Both 24-bit and 32-bit surfaces support 'r', 'g', and 'b'. Only 32-bit surfaces with ``SRCALPHA`` support 'a'.h](hX!'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a (surface-width, surface-height) view of a single color component within a surface: a color plane. Color components are unsigned bytes. Both 24-bit and 32-bit surfaces support 'r', 'g', and 'b'. Only 32-bit surfaces with }hj.sbh;)}(h ``SRCALPHA``h]hSRCALPHA}hj.sbah}(h]h]h]h]h!]uh%h:hj.ubh support 'a'.}hj.sbeh}(h]h]h]h]h!]uh%j h'h]h)Mdhj-h&hubj)}(hXThe surface is locked only when an exposed interface is accessed. For new buffer interface accesses, the surface is unlocked once the last buffer view is released. For array interface and old buffer interface accesses, the surface remains locked until the BufferProxy object is released.h]hXThe surface is locked only when an exposed interface is accessed. For new buffer interface accesses, the surface is unlocked once the last buffer view is released. For array interface and old buffer interface accesses, the surface remains locked until the BufferProxy object is released.}hj/sbah}(h]h]h]h]h!]uh%j h'h]h)Mjhj-h&hubj)}(hNew in pygame 1.9.2.h]j)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj/sbah}(h]h](jjeh]h]h!]uh%hhj/ubah}(h]h]h]h]h!] translatableuh%j hj/h&hh'h]h)Mpubah}(h]h]h]h]h!]jb versionaddedjd1.9.2uh%jh&hh'h]h)Mphj-ubeh}(h]h]h]h]h!]uh%hhj-h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j@/j2jA/j3jA/j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$get_buffer() (pygame.Surface method)pygame.Surface.get_bufferhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h get_bufferh](h)}(hjX/h]h get_buffer}hjZ/sbah}(h]h](hheh]h]h!]h#h$uh%hhjV/h&hh'h]h)Mrubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hjV/h&hh'h]h)Mrubeh}(h]jQ/ah](hheh]h]h!]hhhh~hSurface.get_bufferhhSurface get_bufferhSurface.get_buffer()uh%hzh'h]h)MrhjS/h&hubh)}(hhh](h)}(hhh](h)}(h=:sl:`acquires a buffer object for the pixels of the Surface.`h]h)}(hj/h]h7acquires a buffer object for the pixels of the Surface.}hj/sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Mtubh)}(h!:sg:`get_buffer() -> BufferProxy`h]h)}(hj/h]hget_buffer() -> BufferProxy}hj/sbah}(h]h]hah]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%h)hKhj/h&hh'h]h)Muubeh}(h]h]h]h]h!]uh%hhj|/h&hh'h]h)Mtubj)}(hXCReturn a buffer object for the pixels of the Surface. The buffer can be used for direct pixel access and manipulation. Surface pixel data is represented as an unstructured block of memory, with a start address and length in bytes. The data need not be contiguous. Any gaps are included in the length, but otherwise ignored.h]hXCReturn a buffer object for the pixels of the Surface. The buffer can be used for direct pixel access and manipulation. Surface pixel data is represented as an unstructured block of memory, with a start address and length in bytes. The data need not be contiguous. Any gaps are included in the length, but otherwise ignored.}hj/sbah}(h]h]h]h]h!]uh%j h'h]h)Mwhj|/h&hubj)}(hThis method implicitly locks the Surface. The lock will be released when the returned :mod:`pygame.BufferProxy` object is garbage collected.h](hVThis method implicitly locks the Surface. The lock will be released when the returned }hj/sbh6)}(h:mod:`pygame.BufferProxy`h]h;)}(hj/h]hpygame.BufferProxy}hj/sbah}(h]h](hFpypy-modeh]h]h!]uh%h:hj/ubah}(h]h]h]h]h!]refdochS refdomainj/reftypemod refexplicitrefwarnhYhhZh~h[pygame.BufferProxyuh%h5h'h]h)M}hj/ubh object is garbage collected.}hj/sbeh}(h]h]h]h]h!]uh%j h'h]h)M}hj|/h&hubj)}(hNew in pygame 1.8.h]j)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj/sbah}(h]h](jjeh]h]h!]uh%hhj/ubah}(h]h]h]h]h!] translatableuh%j hj/h&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.8uh%jh&hh'h]h)Mhj|/ubh )}(h## Surface.get_buffer ##h]h## Surface.get_buffer ##}hj0sbah}(h]h]h]h]h!]h#h$uh%h hj|/h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjS/h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j20j2j30j3j30j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq*_pixels_address (pygame.Surface attribute)pygame.Surface._pixels_addresshNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h_pixels_addressh]h)}(hjJ0h]h_pixels_address}hjL0sbah}(h]h](hheh]h]h!]h#h$uh%hhjH0h&hh'h]h)Mubah}(h]jC0ah](hheh]h]h!]hhhh~hSurface._pixels_addresshhSurface_pixels_addresshj_0uh%hzh'h]h)MhjE0h&hubh)}(hhh](h)}(hhh](h)}(h:sl:`pixel buffer address`h]h)}(hjk0h]hpixel buffer address}hjm0sbah}(h]h]hah]h]h!]uh%hhji0ubah}(h]h]h]h]h!]uh%h)hKhjf0h&hh'h]h)Mubh)}(h:sg:`_pixels_address -> int`h]h)}(hj0h]h_pixels_address -> int}hj0sbah}(h]h]hah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhjf0h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjc0h&hh'h]h)Mubj)}(h6The starting address of the surface's raw pixel bytes.h]h6The starting address of the surface's raw pixel bytes.}hj0sbah}(h]h]h]h]h!]uh%j h'h]h)Mhjc0h&hubj)}(hNew in pygame 1.9.2.h]j)}(hNew in pygame 1.9.2.h]h)}(hNew in pygame 1.9.2.h]hNew in pygame 1.9.2.}hj0sbah}(h]h](jjeh]h]h!]uh%hhj0ubah}(h]h]h]h]h!] translatableuh%j hj0h&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd1.9.2uh%jh&hh'h]h)Mhjc0ubeh}(h]h]h]h]h!]uh%hhjE0h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]j1j0j2j0j3j0j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&premul_alpha() (pygame.Surface method)pygame.Surface.premul_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h premul_alphah](h)}(hj0h]h premul_alpha}hj0sbah}(h]h](hheh]h]h!]h#h$uh%hhj0h&hh'h]h)Mubj`)}(h()h]h}(h]h]h]h]h!]h#h$uh%j_hj0h&hh'h]h)Mubeh}(h]j0ah](hheh]h]h!]hhhh~hSurface.premul_alphahhSurface premul_alphahSurface.premul_alpha()uh%hzh'h]h)Mhj0h&hubh)}(hhh](h)}(hhh](h)}(h^:sl:`returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.`h]h)}(hj1h]hXreturns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.}hj1sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubh)}(h:sg:`premul_alpha() -> Surface`h]h)}(hj41h]hpremul_alpha() -> Surface}hj61sbah}(h]h]hah]h]h!]uh%hhj21ubah}(h]h]h]h]h!]uh%h)hKhj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj1h&hh'h]h)Mubj)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave premul_alpha feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hjU1sbah}(h]h]h]h]h!]uh%jS1hjO1ubhQ feature still in development available for testing and feedback. It may change. }hjO1sbh reference)}(h_`Please leave premul_alpha feedback with authors `_h]h/Please leave premul_alpha feedback with authors}(hji1h/Please leave premul_alpha feedback with authorsubah}(h]h]h]h]h!]name/Please leave premul_alpha feedback with authorsrefuri*https://github.com/pygame/pygame/pull/3276uh%jg1hjO1ubh target)}(h- h]h}(h]/please-leave-premul-alpha-feedback-with-authorsah]h]/please leave premul_alpha feedback with authorsah]h!]refurij{1uh%j|1 referencedKhjO1ubeh}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hX\Returns a copy of the initial surface with the red, green and blue color channels multiplied by the alpha channel. This is intended to make it easier to work with the BLEND_PREMULTIPLED blend mode flag of the blit() method. Surfaces which have called this method will only look correct after blitting if the BLEND_PREMULTIPLED special flag is used.h]hX\Returns a copy of the initial surface with the red, green and blue color channels multiplied by the alpha channel. This is intended to make it easier to work with the BLEND_PREMULTIPLED blend mode flag of the blit() method. Surfaces which have called this method will only look correct after blitting if the BLEND_PREMULTIPLED special flag is used.}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hXIt is worth noting that after calling this method, methods that return the colour of a pixel such as get_at() will return the alpha multiplied colour values. It is not possible to fully reverse an alpha multiplication of the colours in a surface as integer colour channel data is generally reduced by the operation (e.g. 255 x 0 = 0, from there it is not possible to reconstruct the original 255 from just the two remaining zeros in the colour and alpha channels).h]hXIt is worth noting that after calling this method, methods that return the colour of a pixel such as get_at() will return the alpha multiplied colour values. It is not possible to fully reverse an alpha multiplication of the colours in a surface as integer colour channel data is generally reduced by the operation (e.g. 255 x 0 = 0, from there it is not possible to reconstruct the original 255 from just the two remaining zeros in the colour and alpha channels).}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hX/If you call this method, and then call it again, it will multiply the colour channels by the alpha channel twice. There are many possible ways to obtain a surface with the colour channels pre-multiplied by the alpha channel in pygame, and it is not possible to tell the difference just from the information in the pixels. It is completely possible to have two identical surfaces - one intended for pre-multiplied alpha blending and one intended for normal blending. For this reason we do not store state on surfaces intended for pre-multiplied alpha blending.h]hX/If you call this method, and then call it again, it will multiply the colour channels by the alpha channel twice. There are many possible ways to obtain a surface with the colour channels pre-multiplied by the alpha channel in pygame, and it is not possible to tell the difference just from the information in the pixels. It is completely possible to have two identical surfaces - one intended for pre-multiplied alpha blending and one intended for normal blending. For this reason we do not store state on surfaces intended for pre-multiplied alpha blending.}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hXSurfaces without an alpha channel cannot use this method and will return an error if you use it on them. It is best used on 32 bit surfaces (the default on most platforms) as the blitting on these surfaces can be accelerated by SIMD versions of the pre-multiplied blitter.h]hXSurfaces without an alpha channel cannot use this method and will return an error if you use it on them. It is best used on 32 bit surfaces (the default on most platforms) as the blitting on these surfaces can be accelerated by SIMD versions of the pre-multiplied blitter.}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hIn general pre-multiplied alpha blitting is faster then 'straight alpha' blitting and produces superior results when blitting an alpha surface onto another surface with alpha - assuming both surfaces contain pre-multiplied alpha colours.h]hIn general pre-multiplied alpha blitting is faster then 'straight alpha' blitting and produces superior results when blitting an alpha surface onto another surface with alpha - assuming both surfaces contain pre-multiplied alpha colours.}hj1sbah}(h]h]h]h]h!]uh%j h'h]h)Mhj1h&hubj)}(hNew in pygame 2.2.0.h]j)}(hNew in pygame 2.2.0.h]h)}(hNew in pygame 2.2.0.h]hNew in pygame 2.2.0.}hj1sbah}(h]h](jjeh]h]h!]uh%hhj1ubah}(h]h]h]h]h!] translatableuh%j hj1h&hh'h]h)Mubah}(h]h]h]h]h!]jb versionaddedjd2.2.0uh%jh&hh'h]h)Mhj1ubh )}(h## Surface.premul_alpha ##h]h## Surface.premul_alpha ##}hj1sbah}(h]h]h]h]h!]h#h$uh%h hj1h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhj0h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]j1j2j2j2j3j2j4j5j6j7j8j9j:uh%huh&hhhh'Nh)Nubh )}(h## pygame.Surface ##h]h## pygame.Surface ##}hj2sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j1j02j2j12j3j12j4j5j6j7j8j9j:uh%huh&hhh,h'Nh)Nubeh}(h]pygame-surfaceah]h]pygame.surfaceah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjg2error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j:2j72j1j1u nametypes}(j:2j1uh}(j72h,hsh|jIjNjGjLjjj j j j# j j j`jej j%j6j;jjj#j(jjjjjjjKjPjjjjjjjjjjjjjxj}j!j&jjjjj@jEjjjjj j j!j!j""j'"j"j"jX#j]#j#j#j$j$j)%j.%j%j%j&j&j'j 'jd(ji(j )j)j)j)j*j*j]+jb+jZ,j_,j-j-j-j-jQ/jV/jC0jH0j0j0j1j~1u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/surface.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.9161406 pygame-2.6.1/docs/generated/doctrees/ref/surfarray.doctree0000644000175100001770000017566714676242421023304 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.surfarray`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.surfarray}hhh&hh'h]h)K(ubhz)}(h:sg:`array2d(Surface) -> array`h]h)}(hjZh]harray2d(Surface) -> array}hj\sbah}(h]h] signatureah]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%h)hKhj>h&hh'h]h)K)ubeh}(h]h]h]h]h!]uh%huhj;h&hh'h]h)K(ubh)}(hCopy the :meth:`mapped ` (raw) pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.h](h Copy the }hjvsbh6)}(h':meth:`mapped `h]h;)}(hjh]hmapped}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj~ubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.map_rgbuh%h5h'h]h)K+hjvubh (raw) pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.}hjvsbeh}(h]h]h]h]h!]uh%hh'h]h)K+hj;h&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hjsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hjh]hpygame.Surface.lock()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)K0hjubh4 - lock the Surface memory for pixel access method).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K0hj;h&hubh )}(h## pygame.surfarray.array2d ##h]h## pygame.surfarray.array2d ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj;h&hh'h]h)K4ubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'pixels2d() (in module pygame.surfarray)pygame.surfarray.pixels2dhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hpixels2dh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)K6ubj)}(hjh]hpixels2d}hj#sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)K6ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K6ubeh}(h]j ah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7 pixels2d()uh%jh'h]h)K6hjh&hubj:)}(hhh](hv)}(hhh](hz)}(h&:sl:`Reference pixels into a 2d array`h]h)}(hjJh]h Reference pixels into a 2d array}hjLsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)K8ubhz)}(h :sg:`pixels2d(Surface) -> array`h]h)}(hjah]hpixels2d(Surface) -> array}hjcsbah}(h]h]jfah]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)K9ubeh}(h]h]h]h]h!]uh%huhjBh&hh'h]h)K8ubh)}(hCreate a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hj|sbah}(h]h]h]h]h!]uh%hh'h]h)K;hjBh&hubh)}(hXPixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can.h]hXPixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K?hjBh&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hjsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hjh]hpygame.Surface.lock()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)KBhjubh3 - lock the Surface memory for pixel access method.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KBhjBh&hubh )}(h## pygame.surfarray.pixels2d ##h]h## pygame.surfarray.pixels2d ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjBh&hh'h]h)KGubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j&array3d() (in module pygame.surfarray)pygame.surfarray.array3dhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(harray3dh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)KIubj)}(hjh]harray3d}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)KIubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KIubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7 array3d()uh%jh'h]h)KIhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h!:sl:`Copy pixels into a 3d array`h]h)}(hj0h]hCopy pixels into a 3d array}hj2sbah}(h]h]hah]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)KKubhz)}(h:sg:`array3d(Surface) -> array`h]h)}(hjGh]harray3d(Surface) -> array}hjIsbah}(h]h]jfah]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%h)hKhj+h&hh'h]h)KLubeh}(h]h]h]h]h!]uh%huhj(h&hh'h]h)KKubh)}(hCopy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.h]hCopy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.}hjbsbah}(h]h]h]h]h!]uh%hh'h]h)KNhj(h&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hjpsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hjzh]hpygame.Surface.lock()}hj|sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjxubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)KRhjpubh4 - lock the Surface memory for pixel access method).}hjpsbeh}(h]h]h]h]h!]uh%hh'h]h)KRhj(h&hubh )}(h## pygame.surfarray.array3d ##h]h## pygame.surfarray.array3d ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj(h&hh'h]h)KVubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j'pixels3d() (in module pygame.surfarray)pygame.surfarray.pixels3dhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hpixels3dh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)KXubj)}(hjh]hpixels3d}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)KXubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KXubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7 pixels3d()uh%jh'h]h)KXhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h&:sl:`Reference pixels into a 3d array`h]h)}(hjh]h Reference pixels into a 3d array}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KZubhz)}(h :sg:`pixels3d(Surface) -> array`h]h)}(hjh]hpixels3d(Surface) -> array}hj!sbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K[ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KZubh)}(hCreate a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)K]hjh&hubh)}(hmThis will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced.h]hmThis will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced.}hjHsbah}(h]h]h]h]h!]uh%hh'h]h)Kahjh&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hjVsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj`h]hpygame.Surface.lock()}hjbsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj^ubah}(h]h]h]h]h!]refdochS refdomainjlreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)KdhjVubh3 - lock the Surface memory for pixel access method.}hjVsbeh}(h]h]h]h]h!]uh%hh'h]h)Kdhjh&hubh )}(h## pygame.surfarray.pixels3d ##h]h## pygame.surfarray.pixels3d ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kiubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*array_alpha() (in module pygame.surfarray)pygame.surfarray.array_alphahNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h array_alphah](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)Kkubj)}(hjh]h array_alpha}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kkubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kkubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7 array_alpha()uh%jh'h]h)Kkhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h':sl:`Copy pixel alphas into a 2d array`h]h)}(hjh]h!Copy pixel alphas into a 2d array}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kmubhz)}(h#:sg:`array_alpha(Surface) -> array`h]h)}(hjh]harray_alpha(Surface) -> array}hjsbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Knubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kmubh)}(hCopy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values.h]hCopy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Kphjh&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hj.sbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj8h]hpygame.Surface.lock()}hj:sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj6ubah}(h]h]h]h]h!]refdochS refdomainjDreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Kthj.ubh4 - lock the Surface memory for pixel access method).}hj.sbeh}(h]h]h]h]h!]uh%hh'h]h)Kthjh&hubh )}(h"## pygame.surfarray.array_alpha ##h]h"## pygame.surfarray.array_alpha ##}hj`sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kxubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjwjjxjjxjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+pixels_alpha() (in module pygame.surfarray)pygame.surfarray.pixels_alphahNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h pixels_alphah](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)Kzubj)}(hjh]h pixels_alpha}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Kzubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kzubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7pixels_alpha()uh%jh'h]h)Kzhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h,:sl:`Reference pixel alphas into a 2d array`h]h)}(hjh]h&Reference pixel alphas into a 2d array}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K|ubhz)}(h$:sg:`pixels_alpha(Surface) -> array`h]h)}(hjh]hpixels_alpha(Surface) -> array}hjsbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K}ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K|ubh)}(hCreate a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hCThis can only work on 32-bit Surfaces with a per-pixel alpha value.h]hCThis can only work on 32-bit Surfaces with a per-pixel alpha value.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hjsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hjh]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj*reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khjubh3 - lock the Surface memory for pixel access method.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h### pygame.surfarray.pixels_alpha ##h]h### pygame.surfarray.pixels_alpha ##}hjFsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj]jj^jj^jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(array_red() (in module pygame.surfarray)pygame.surfarray.array_redhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h array_redh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjwsbah}(h]h](jj eh]h]h!]h#h$uh%jhjsh&hh'h]h)Kubj)}(hjuh]h array_red}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjsh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjsh&hh'h]h)Kubeh}(h]jnah](j-j.eh]h]h!]j2j7j3hj4juj5j7juj7 array_red()uh%jh'h]h)Khjph&hubj:)}(hhh](hv)}(hhh](hz)}(h%:sl:`Copy red pixels into a 2d array`h]h)}(hjh]hCopy red pixels into a 2d array}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h!:sg:`array_red(Surface) -> array`h]h)}(hjh]harray_red(Surface) -> array}hjsbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hhCopy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format.h]hhCopy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hjsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hjh]hpygame.Surface.lock()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khjubh4 - lock the Surface memory for pixel access method).}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubhversionmodified)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hj(sbah}(h]h](jaddedeh]h]h!]uh%hhj$ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]type versionaddedversion2.0.2uh%jh&hh'h]h)Khjubh )}(h ## pygame.surfarray.array_red ##h]h ## pygame.surfarray.array_red ##}hjHsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hjph&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj_jj`jj`jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)pixels_red() (in module pygame.surfarray)pygame.surfarray.pixels_redhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h pixels_redh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjysbah}(h]h](jj eh]h]h!]h#h$uh%jhjuh&hh'h]h)Kubj)}(hjwh]h pixels_red}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjuh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjuh&hh'h]h)Kubeh}(h]jpah](j-j.eh]h]h!]j2j7j3hj4jwj5j7jwj7 pixels_red()uh%jh'h]h)Khjrh&hubj:)}(hhh](hv)}(hhh](hz)}(h*:sl:`Reference pixel red into a 2d array.`h]h)}(hjh]h$Reference pixel red into a 2d array.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h#:sg:`pixels_red (Surface) -> array`h]h)}(hjh]hpixels_red (Surface) -> array}hjsbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hCreate a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h0This can only work on 24-bit or 32-bit Surfaces.h]h0This can only work on 24-bit or 32-bit Surfaces.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hjsbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj h]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khjubh3 - lock the Surface memory for pixel access method.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h!## pygame.surfarray.pixels_red ##h]h!## pygame.surfarray.pixels_red ##}hj. sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hjrh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjE jjF jjF jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*array_green() (in module pygame.surfarray)pygame.surfarray.array_greenhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h array_greenh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hj_ sbah}(h]h](jj eh]h]h!]h#h$uh%jhj[ h&hh'h]h)Kubj)}(hj] h]h array_green}hjm sbah}(h]h](jjeh]h]h!]h#h$uh%j hj[ h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj[ h&hh'h]h)Kubeh}(h]jV ah](j-j.eh]h]h!]j2j7j3hj4j] j5j7j] j7 array_green()uh%jh'h]h)KhjX h&hubj:)}(hhh](hv)}(hhh](hz)}(h':sl:`Copy green pixels into a 2d array`h]h)}(hj h]h!Copy green pixels into a 2d array}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h#:sg:`array_green(Surface) -> array`h]h)}(hj h]harray_green(Surface) -> array}hj sbah}(h]h]jfah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hjCopy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format.h]hjCopy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hj sbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj h]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khj ubh4 - lock the Surface memory for pixel access method).}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hj sbah}(h]h](jj3eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]jD versionaddedjF2.0.2uh%jh&hh'h]h)Khj ubh )}(h"## pygame.surfarray.array_green ##h]h"## pygame.surfarray.array_green ##}hj+ sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hjX h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjB jjC jjC jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+pixels_green() (in module pygame.surfarray)pygame.surfarray.pixels_greenhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h pixels_greenh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hj\ sbah}(h]h](jj eh]h]h!]h#h$uh%jhjX h&hh'h]h)Kubj)}(hjZ h]h pixels_green}hjj sbah}(h]h](jjeh]h]h!]h#h$uh%j hjX h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjX h&hh'h]h)Kubeh}(h]jS ah](j-j.eh]h]h!]j2j7j3hj4jZ j5j7jZ j7pixels_green()uh%jh'h]h)KhjU h&hubj:)}(hhh](hv)}(hhh](hz)}(h,:sl:`Reference pixel green into a 2d array.`h]h)}(hj h]h&Reference pixel green into a 2d array.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h%:sg:`pixels_green (Surface) -> array`h]h)}(hj h]hpixels_green (Surface) -> array}hj sbah}(h]h]jfah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hCreate a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(h0This can only work on 24-bit or 32-bit Surfaces.h]h0This can only work on 24-bit or 32-bit Surfaces.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hj sbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj h]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khj ubh3 - lock the Surface memory for pixel access method.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h### pygame.surfarray.pixels_green ##h]h### pygame.surfarray.pixels_green ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hjU h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj( jj) jj) jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)array_blue() (in module pygame.surfarray)pygame.surfarray.array_bluehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h array_blueh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjB sbah}(h]h](jj eh]h]h!]h#h$uh%jhj> h&hh'h]h)Kubj)}(hj@ h]h array_blue}hjP sbah}(h]h](jjeh]h]h!]h#h$uh%j hj> h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj> h&hh'h]h)Kubeh}(h]j9 ah](j-j.eh]h]h!]j2j7j3hj4j@ j5j7j@ j7 array_blue()uh%jh'h]h)Khj; h&hubj:)}(hhh](hv)}(hhh](hz)}(h&:sl:`Copy blue pixels into a 2d array`h]h)}(hjw h]h Copy blue pixels into a 2d array}hjy sbah}(h]h]hah]h]h!]uh%hhju ubah}(h]h]h]h]h!]uh%h)hKhjr h&hh'h]h)Kubhz)}(h":sg:`array_blue(Surface) -> array`h]h)}(hj h]harray_blue(Surface) -> array}hj sbah}(h]h]jfah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjr h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjo h&hh'h]h)Kubh)}(hiCopy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format.h]hiCopy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjo h&hubh)}(hThis function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method).h](hNThis function will temporarily lock the Surface as pixels are copied (see the }hj sbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj h]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khj ubh4 - lock the Surface memory for pixel access method).}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjo h&hubj)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]h)}(hNew in pygame 2.0.2.h]hNew in pygame 2.0.2.}hj sbah}(h]h](jj3eh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]jD versionaddedjF2.0.2uh%jh&hh'h]h)Khjo ubh )}(h!## pygame.surfarray.array_blue ##h]h!## pygame.surfarray.array_blue ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjo h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hj; h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj% jj& jj& jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j*pixels_blue() (in module pygame.surfarray)pygame.surfarray.pixels_bluehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h pixels_blueh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hj? sbah}(h]h](jj eh]h]h!]h#h$uh%jhj; h&hh'h]h)Kubj)}(hj= h]h pixels_blue}hjM sbah}(h]h](jjeh]h]h!]h#h$uh%j hj; h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj; h&hh'h]h)Kubeh}(h]j6 ah](j-j.eh]h]h!]j2j7j3hj4j= j5j7j= j7 pixels_blue()uh%jh'h]h)Khj8 h&hubj:)}(hhh](hv)}(hhh](hz)}(h+:sl:`Reference pixel blue into a 2d array.`h]h)}(hjt h]h%Reference pixel blue into a 2d array.}hjv sbah}(h]h]hah]h]h!]uh%hhjr ubah}(h]h]h]h]h!]uh%h)hKhjo h&hh'h]h)Kubhz)}(h$:sg:`pixels_blue (Surface) -> array`h]h)}(hj h]hpixels_blue (Surface) -> array}hj sbah}(h]h]jfah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjo h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjl h&hh'h]h)Kubh)}(hCreate a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.h]hCreate a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjl h&hubh)}(h0This can only work on 24-bit or 32-bit Surfaces.h]h0This can only work on 24-bit or 32-bit Surfaces.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khjl h&hubh)}(hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method.h](hThe Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the }hj sbh6)}(h:meth:`pygame.Surface.lock`h]h;)}(hj h]hpygame.Surface.lock()}hj sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypemeth refexplicitrefwarnhYj7hZNh[pygame.Surface.lockuh%h5h'h]h)Khj ubh3 - lock the Surface memory for pixel access method.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjl h&hubh )}(h"## pygame.surfarray.pixels_blue ##h]h"## pygame.surfarray.pixels_blue ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjl h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j9hj8 h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-array_colorkey() (in module pygame.surfarray)pygame.surfarray.array_colorkeyhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(harray_colorkeyh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hj% sbah}(h]h](jj eh]h]h!]h#h$uh%jhj! h&hh'h]h)Kubj)}(hj# h]harray_colorkey}hj3 sbah}(h]h](jjeh]h]h!]h#h$uh%j hj! h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj! h&hh'h]h)Kubeh}(h]j ah](j-j.eh]h]h!]j2j7j3hj4j# j5j7j# j7array_colorkey()uh%jh'h]h)Khj h&hubj:)}(hhh](hv)}(hhh](hz)}(h.:sl:`Copy the colorkey values into a 2d array`h]h)}(hjZ h]h(Copy the colorkey values into a 2d array}hj\ sbah}(h]h]hah]h]h!]uh%hhjX ubah}(h]h]h]h]h!]uh%h)hKhjU h&hh'h]h)Kubhz)}(h&:sg:`array_colorkey(Surface) -> array`h]h)}(hjq h]h array_colorkey(Surface) -> array}hjs sbah}(h]h]jfah]h]h!]uh%hhjo ubah}(h]h]h]h]h!]uh%h)hKhjU h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjR h&hh'h]h)Kubh)}(hCreate a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque.h]hCreate a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjR h&hubh)}(hqThis will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned.h]hqThis will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjR h&hubh)}(hEThis function will temporarily lock the Surface as pixels are copied.h]hEThis function will temporarily lock the Surface as pixels are copied.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjR h&hubh )}(h%## pygame.surfarray.array_colorkey ##h]h%## pygame.surfarray.array_colorkey ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjR h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j9hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j+make_surface() (in module pygame.surfarray)pygame.surfarray.make_surfacehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h make_surfaceh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hj sbah}(h]h](jj eh]h]h!]h#h$uh%jhj h&hh'h]h)Mubj)}(hj h]h make_surface}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j hj h&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Mubeh}(h]j ah](j-j.eh]h]h!]j2j7j3hj4j j5j7j j7make_surface()uh%jh'h]h)Mhj h&hubj:)}(hhh](hv)}(hhh](hz)}(h$:sl:`Copy an array to a new surface`h]h)}(hjh]hCopy an array to a new surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h$:sg:`make_surface(array) -> Surface`h]h)}(hj3h]hmake_surface(array) -> Surface}hj5sbah}(h]h]jfah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXCreate a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. Function make_surface uses the array struct interface to acquire array properties, so is not limited to just NumPy arrays. See :mod:`pygame.pixelcopy`.h](hXCreate a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. Function make_surface uses the array struct interface to acquire array properties, so is not limited to just NumPy arrays. See }hjNsbh6)}(h:mod:`pygame.pixelcopy`h]h;)}(hjXh]hpygame.pixelcopy}hjZsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjVubah}(h]h]h]h]h!]refdochS refdomainjdreftypemod refexplicitrefwarnhYj7hZNh[pygame.pixelcopyuh%h5h'h]h)MhjNubh.}hjNsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(h4New in pygame 1.9.2: array struct interface support.h]h4New in pygame 1.9.2: array struct interface support.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hjh&hubh )}(h### pygame.surfarray.make_surface ##h]h### pygame.surfarray.make_surface ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j9hj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)blit_array() (in module pygame.surfarray)pygame.surfarray.blit_arrayhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h blit_arrayh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)Mubj)}(hjh]h blit_array}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7 blit_array()uh%jh'h]h)Mhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h':sl:`Blit directly from a array values`h]h)}(hjh]h!Blit directly from a array values}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h(:sg:`blit_array(Surface, array) -> None`h]h)}(hj h]h"blit_array(Surface, array) -> None}hj sbah}(h]h]jfah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXDirectly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ASCII character and record arrays are accepted.h]hXDirectly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ASCII character and record arrays are accepted.}hj&sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh)}(hMThis function will temporarily lock the Surface as the new values are copied.h]hMThis function will temporarily lock the Surface as the new values are copied.}hj4sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h!## pygame.surfarray.blit_array ##h]h!## pygame.surfarray.blit_array ##}hjBsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjYjjZjjZjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j(map_array() (in module pygame.surfarray)pygame.surfarray.map_arrayhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h map_arrayh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjssbah}(h]h](jj eh]h]h!]h#h$uh%jhjoh&hh'h]h)Mubj)}(hjqh]h map_array}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjoh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjoh&hh'h]h)Mubeh}(h]jjah](j-j.eh]h]h!]j2j7j3hj4jqj5j7jqj7 map_array()uh%jh'h]h)Mhjlh&hubj:)}(hhh](hv)}(hhh](hz)}(h$:sl:`Map a 3d array into a 2d array`h]h)}(hjh]hMap a 3d array into a 2d array}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M!ubhz)}(h,:sg:`map_array(Surface, array3d) -> array2d`h]h)}(hjh]h&map_array(Surface, array3d) -> array2d}hjsbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M!ubh)}(hConvert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Palette surface formats are supported for NumPy arrays.h]hConvert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Palette surface formats are supported for NumPy arrays.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M$hjh&hubh )}(h ## pygame.surfarray.map_array ##h]h ## pygame.surfarray.map_array ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M(ubeh}(h]h]h]h]h!]uh%j9hjlh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,use_arraytype() (in module pygame.surfarray)pygame.surfarray.use_arraytypehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h use_arraytypeh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)M*ubj)}(hjh]h use_arraytype}hj'sbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)M*ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M*ubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7use_arraytype()uh%jh'h]h)M*hjh&hubj:)}(hhh](hv)}(hhh](hz)}(h9:sl:`Sets the array system to be used for surface arrays`h]h)}(hjNh]h3Sets the array system to be used for surface arrays}hjPsbah}(h]h]hah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)M,ubhz)}(h':sg:`use_arraytype (arraytype) -> None`h]h)}(hjeh]h!use_arraytype (arraytype) -> None}hjgsbah}(h]h]jfah]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%h)hKhjIh&hh'h]h)M-ubeh}(h]h]h]h]h!]uh%huhjFh&hh'h]h)M,ubh)}(hDEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is ``'numpy'``. Other values will raise ValueError. Using this function will raise a ``DeprecationWarning``.h](hdDEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is }hjsbh;)}(h ``'numpy'``h]h'numpy'}hjsbah}(h]h]h]h]h!]uh%h:hjubhG. Other values will raise ValueError. Using this function will raise a }hjsbh;)}(h``DeprecationWarning``h]hDeprecationWarning}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M/hjFh&hubh )}(h$## pygame.surfarray.use_arraytype ##h]h$## pygame.surfarray.use_arraytype ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjFh&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j,get_arraytype() (in module pygame.surfarray)pygame.surfarray.get_arraytypehNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(h get_arraytypeh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)M5ubj)}(hjh]h get_arraytype}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)M5ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M5ubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7get_arraytype()uh%jh'h]h)M5hjh&hubj:)}(hhh](hv)}(hhh](hz)}(h+:sl:`Gets the currently active array type.`h]h)}(hjh]h%Gets the currently active array type.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M7ubhz)}(h:sg:`get_arraytype () -> str`h]h)}(hj/h]hget_arraytype () -> str}hj1sbah}(h]h]jfah]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M8ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M7ubh)}(hDEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``.h](hQDEPRECATED: Returns the currently active array type. This will be a value of the }hjJsbh;)}(h``get_arraytypes()``h]hget_arraytypes()}hjRsbah}(h]h]h]h]h!]uh%h:hjJubhq tuple and indicates which type of array module is used for the array creation. Using this function will raise a }hjJsbh;)}(h``DeprecationWarning``h]hDeprecationWarning}hjdsbah}(h]h]h]h]h!]uh%h:hjJubh.}hjJsbeh}(h]h]h]h]h!]uh%hh'h]h)M:hjh&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhj|h&hh'h]h)M?ubah}(h]h]h]h]h!]jD versionaddedjF1.8uh%jh&hh'h]h)M>hjubh )}(h$## pygame.surfarray.get_arraytype ##h]h$## pygame.surfarray.get_arraytype ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M@ubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j-get_arraytypes() (in module pygame.surfarray)pygame.surfarray.get_arraytypeshNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hget_arraytypesh](j)}(hpygame.surfarray.h]hpygame.surfarray.}hjsbah}(h]h](jj eh]h]h!]h#h$uh%jhjh&hh'h]h)MBubj)}(hjh]hget_arraytypes}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j hjh&hh'h]h)MBubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)MBubeh}(h]jah](j-j.eh]h]h!]j2j7j3hj4jj5j7jj7get_arraytypes()uh%jh'h]h)MBhjh&hubj:)}(hhh](hv)}(hhh](hz)}(h6:sl:`Gets the array system types currently supported.`h]h)}(hjh]h0Gets the array system types currently supported.}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MDubhz)}(h :sg:`get_arraytypes () -> tuple`h]h)}(hjh]hget_arraytypes () -> tuple}hj sbah}(h]h]jfah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)MEubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)MDubh)}(hXADEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.surfarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``.h](hDEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the }hj9sbh6)}(h&:func:`pygame.surfarray.use_arraytype`h]h;)}(hjCh]h pygame.surfarray.use_arraytype()}hjEsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjAubah}(h]h]h]h]h!]refdochS refdomainjOreftypefunc refexplicitrefwarnhYj7hZNh[pygame.surfarray.use_arraytypeuh%h5h'h]h)MGhj9ubhr () method. If no supported array system could be found, None will be returned. Using this function will raise a }hj9sbh;)}(h``DeprecationWarning``h]hDeprecationWarning}hjesbah}(h]h]h]h]h!]uh%h:hj9ubh.}hj9sbeh}(h]h]h]h]h!]uh%hh'h]h)MGhjh&hubj)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](jj3eh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhj}h&hh'h]h)MNubah}(h]h]h]h]h!]jD versionaddedjF1.8uh%jh&hh'h]h)MMhjubh )}(h%## pygame.surfarray.get_arraytypes ##h]h%## pygame.surfarray.get_arraytypes ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)MOubeh}(h]h]h]h]h!]uh%j9hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%jh&hhh,h'Nh)Nubh )}(h## pygame.surfarray ##h]h## pygame.surfarray ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)MQubeh}(h](hspygame-surfarrayeh]h]pygame.surfarrayah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jDh'h]h)Khh,h&hubjjj jjjjjjjjjjnjsjpjujV j[ jS jX j9 j> j6 j; j j! j j jjjjjojjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/surfarray.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.9291406 pygame-2.6.1/docs/generated/doctrees/ref/tests.doctree0000644000175100001770000003771014676242421022412 0ustar00runnerdocker?sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.tests`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.tests}hh]h]h'python -m pygame.tests []}hhsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)Khh,h&hubh)}(h|Command line option --help displays a usage message. Available options correspond to the :func:`pygame.tests.run` arguments.h](hYCommand line option --help displays a usage message. Available options correspond to the }hhsbh6)}(h:func:`pygame.tests.run`h]h;)}(hhh]hpygame.tests.run()}hhsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hhubah}(h]h]h]h]h!]refdochS refdomainhҌreftypefunc refexplicitrefwarnhY pygame.testshZNh[pygame.tests.runuh%h5h'h]h)Khhubh arguments.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hThe xxxx_test submodules of the tests package are unit test suites for individual parts of pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive.h]hThe xxxx_test submodules of the tests package are unit test suites for individual parts of pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive.}hhsbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hFor pygame development the test suite can be run from a pygame distribution root directory. Program ``run_tests.py`` is provided for convenience, though test/go.py can be run directly.h](hdFor pygame development the test suite can be run from a pygame distribution root directory. Program }hhsbh;)}(h``run_tests.py``h]h run_tests.py}hjsbah}(h]h]h]h]h!]uh%h:hhubhD is provided for convenience, though test/go.py can be run directly.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hXModule level tags control which modules are included in a unit test run. Tags are assigned to a unit test module with a corresponding _tags.py module. The tags module has the global __tags__, a list of tag names. For example, ``cdrom_test.py`` has a tag file ``cdrom_tags.py`` containing a tags list that has the 'interactive' string. The 'interactive' tag indicates ``cdrom_test.py`` expects user input. It is excluded from a ``run_tests.py`` or ``pygame.tests.go`` run.h](hModule level tags control which modules are included in a unit test run. Tags are assigned to a unit test module with a corresponding _tags.py module. The tags module has the global __tags__, a list of tag names. For example, }hjsbh;)}(h``cdrom_test.py``h]h cdrom_test.py}hj%sbah}(h]h]h]h]h!]uh%h:hjubh has a tag file }hjsbh;)}(h``cdrom_tags.py``h]h cdrom_tags.py}hj7sbah}(h]h]h]h]h!]uh%h:hjubh[ containing a tags list that has the 'interactive' string. The 'interactive' tag indicates }hjsbh;)}(h``cdrom_test.py``h]h cdrom_test.py}hjIsbah}(h]h]h]h]h!]uh%h:hjubh+ expects user input. It is excluded from a }hjsbh;)}(h``run_tests.py``h]h run_tests.py}hj[sbah}(h]h]h]h]h!]uh%h:hjubh or }hjsbh;)}(h``pygame.tests.go``h]hpygame.tests.go}hjmsbah}(h]h]h]h]h!]uh%h:hjubh run.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(hTwo other tags that are excluded are 'ignore' and 'subprocess_ignore'. These two tags indicate unit tests that will not run on a particular platform, or for which no corresponding pygame module is available.h]hTwo other tags that are excluded are 'ignore' and 'subprocess_ignore'. These two tags indicate unit tests that will not run on a particular platform, or for which no corresponding pygame module is available.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K%hh,h&hubh)}(hNThe test runner will list each excluded module along with the tag responsible.h]hNThe test runner will list each excluded module along with the tag responsible.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K)hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](singlerun() (in module pygame.tests)pygame.tests.runhNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hrunh](h desc_addname)}(h pygame.tests.h]h pygame.tests.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h]h)K+ubh desc_name)}(hjh]hrun}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h]h)K+ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)K+ubeh}(h]jah](sig sig-objecteh]h]h!]modulehclasshfullnamej _toc_partshj _toc_namerun()uh%jh'h]h)K+hjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h$:sl:`Run the pygame unit test suite`h]h)}(hjh]hRun the pygame unit test suite}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K-ubhz)}(h!:sg:`run(*args, **kwds) -> tuple`h]h)}(hjh]hrun(*args, **kwds) -> tuple}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K.ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K-ubh)}(h Positional arguments (optional):h]h Positional arguments (optional):}hj6sbah}(h]h]h]h]h!]uh%hh'h]h)K0hjh&hubh)}(hsThe names of tests to include. If omitted then all tests are run. Test names need not include the trailing '_test'.h]hsThe names of tests to include. If omitted then all tests are run. Test names need not include the trailing '_test'.}hjDsbah}(h]h]h]h]h!]h#h$uh%hh'h]h)K4hjh&hubh)}(hKeyword arguments:h]hKeyword arguments:}hjRsbah}(h]h]h]h]h!]uh%hh'h]h)K7hjh&hubh)}(hXincomplete - fail incomplete tests (default False) nosubprocess - run all test suites in the current process (default False, use separate subprocesses) dump - dump failures/errors as dict ready to eval (default False) file - if provided, the name of a file into which to dump failures/errors timings - if provided, the number of times to run each individual test to get an average run time (default is run each test once) exclude - A list of TAG names to exclude from the run show_output - show silenced stderr/stdout on errors (default False) all - dump all results, not just errors (default False) randomize - randomize order of tests (default False) seed - if provided, a seed randomizer integer multi_thread - if provided, the number of THREADS in which to run subprocessed tests time_out - if subprocess is True then the time limit in seconds before killing a test (default 30) fake - if provided, the name of the fake tests package in the run_tests__tests subpackage to run instead of the normal pygame tests python - the path to a python executable to run subprocessed tests (default sys.executable)h]hXincomplete - fail incomplete tests (default False) nosubprocess - run all test suites in the current process (default False, use separate subprocesses) dump - dump failures/errors as dict ready to eval (default False) file - if provided, the name of a file into which to dump failures/errors timings - if provided, the number of times to run each individual test to get an average run time (default is run each test once) exclude - A list of TAG names to exclude from the run show_output - show silenced stderr/stdout on errors (default False) all - dump all results, not just errors (default False) randomize - randomize order of tests (default False) seed - if provided, a seed randomizer integer multi_thread - if provided, the number of THREADS in which to run subprocessed tests time_out - if subprocess is True then the time limit in seconds before killing a test (default 30) fake - if provided, the name of the fake tests package in the run_tests__tests subpackage to run instead of the normal pygame tests python - the path to a python executable to run subprocessed tests (default sys.executable)}hj`sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)K;hjh&hubh)}(h Return value:h]h Return value:}hjnsbah}(h]h]h]h]h!]uh%hh'h]h)KQhjh&hubh)}(hzA tuple of total number of tests run, dictionary of error information. The dictionary is empty if no errors were recorded.h]hzA tuple of total number of tests run, dictionary of error information. The dictionary is empty if no errors were recorded.}hj|sbah}(h]h]h]h]h!]h#h$uh%hh'h]h)KUhjh&hubh)}(hBy default individual test modules are run in separate subprocesses. This recreates normal pygame usage where ``pygame.init()`` and ``pygame.quit()`` are called only once per program execution, and avoids unfortunate interactions between test modules.h](hnBy default individual test modules are run in separate subprocesses. This recreates normal pygame usage where }hjsbh;)}(h``pygame.init()``h]h pygame.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh and }hjsbh;)}(h``pygame.quit()``h]h pygame.quit()}hjsbah}(h]h]h]h]h!]uh%h:hjubhf are called only once per program execution, and avoids unfortunate interactions between test modules.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KXhjh&hubh)}(hX,A time limit is placed on test execution ensuring that any frozen tests processes are killed when their time allotment is expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode.h]hX,A time limit is placed on test execution ensuring that any frozen tests processes are killed when their time allotment is expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K]hjh&hubh)}(hTests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used for the randomization seed value.h]hTests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used for the randomization seed value.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kchjh&hubh)}(hXIndividual test modules may have a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only 'interactive' modules such as cdrom_test are ignored. An interactive module must be run from the console as a Python program.h]hXIndividual test modules may have a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only 'interactive' modules such as cdrom_test are ignored. An interactive module must be run from the console as a Python program.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kghjh&hubh)}(hNThis function can only be called once per Python session. It is not reentrant.h]hNThis function can only be called once per Python session. It is not reentrant.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Klhjh&hubh )}(h## pygame.tests.run ##h]h## pygame.tests.run ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Koubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj objtypej desctypej no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubh )}(h## pygame.tests ##h]h## pygame.tests ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kqubeh}(h](hs pygame-testseh]h] pygame.testsah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjZerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j-j*s nametypes}j-sh}(j*h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/tests.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.9571404 pygame-2.6.1/docs/generated/doctrees/ref/time.doctree0000644000175100001770000007562214676242421022212 0ustar00runnerdocker{sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.time`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.time}hh milliseconds`h]h)}(hj8h]hget_ticks() -> milliseconds}hj:sbah}(h]h] signatureah]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hyReturn the number of milliseconds since ``pygame.init()`` was called. Before pygame is initialized this will always be 0.h](h(Return the number of milliseconds since }hjTsbh;)}(h``pygame.init()``h]h pygame.init()}hj\sbah}(h]h]h]h]h!]uh%h:hjTubh@ was called. Before pygame is initialized this will always be 0.}hjTsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## pygame.time.get_ticks ##h]h## pygame.time.get_ticks ##}hjtsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhhh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌwait() (in module pygame.time)pygame.time.waithNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hwaith](h)}(h pygame.time.h]h pygame.time.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(hjh]hwait}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjh&hh'h]h)Kubeh}(h]jah](j j eh]h]h!]jjjhjjjjjjwait()uh%hh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`pause the program for an amount of time`h]h)}(hjh]h'pause the program for an amount of time}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`wait(milliseconds) -> time`h]h)}(hjh]hwait(milliseconds) -> time}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hXWill pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the ``pygame.time.delay()`` function.h](hWill pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the }hjsbh;)}(h``pygame.time.delay()``h]hpygame.time.delay()}hjsbah}(h]h]h]h]h!]uh%h:hjubh function.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h4This returns the actual number of milliseconds used.h]h4This returns the actual number of milliseconds used.}hj6sbah}(h]h]h]h]h!]uh%hh'h]h)K#hjh&hubh )}(h## pygame.time.wait ##h]h## pygame.time.wait ##}hjDsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K%ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj[jj\jj\jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌdelay() (in module pygame.time)pygame.time.delayhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hdelayh](h)}(h pygame.time.h]h pygame.time.}hjusbah}(h]h](hheh]h]h!]h#h$uh%hhjqh&hh'h]h)K'ubh)}(hjsh]hdelay}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjqh&hh'h]h)K'ubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjqh&hh'h]h)K'ubeh}(h]jlah](j j eh]h]h!]jjjhjjsjjjsjdelay()uh%hh'h]h)K'hjnh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`pause the program for an amount of time`h]h)}(hjh]h'pause the program for an amount of time}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K)ubhz)}(h!:sg:`delay(milliseconds) -> time`h]h)}(hjh]hdelay(milliseconds) -> time}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K*ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K)ubh)}(hWill pause for a given number of milliseconds. This function will use the processor (rather than sleeping) in order to make the delay more accurate than ``pygame.time.wait()``.h](hWill pause for a given number of milliseconds. This function will use the processor (rather than sleeping) in order to make the delay more accurate than }hjsbh;)}(h``pygame.time.wait()``h]hpygame.time.wait()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K,hjh&hubh)}(h4This returns the actual number of milliseconds used.h]h4This returns the actual number of milliseconds used.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K0hjh&hubh )}(h## pygame.time.delay ##h]h## pygame.time.delay ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K2ubeh}(h]h]h]h]h!]uh%jhjnh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj!jj"jj"jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ#set_timer() (in module pygame.time)pygame.time.set_timerhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h set_timerh](h)}(h pygame.time.h]h pygame.time.}hj;sbah}(h]h](hheh]h]h!]h#h$uh%hhj7h&hh'h]h)K4ubh)}(hj9h]h set_timer}hjIsbah}(h]h](hheh]h]h!]h#h$uh%hhj7h&hh'h]h)K4ubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhj7h&hh'h]h)K4ubeh}(h]j2ah](j j eh]h]h!]jjjhjj9jjj9j set_timer()uh%hh'h]h)K4hj4h&hubj)}(hhh](hv)}(hhh](hz)}(h3:sl:`repeatedly create an event on the event queue`h]h)}(hjph]h-repeatedly create an event on the event queue}hjrsbah}(h]h]hah]h]h!]uh%hhjnubah}(h]h]h]h]h!]uh%h)hKhjkh&hh'h]h)K6ubhz)}(h&:sg:`set_timer(event, millis) -> None`h]h)}(hjh]h set_timer(event, millis) -> None}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjkh&hh'h]h)K7ubhz)}(h/:sg:`set_timer(event, millis, loops=0) -> None`h]h)}(hjh]h)set_timer(event, millis, loops=0) -> None}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjkh&hh'h]h)K8ubeh}(h]h]h]h]h!]uh%huhjhh&hh'h]h)K6ubh)}(hSet an event to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed.h]hSet an event to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K:hjhh&hubh)}(hhThe ``event`` attribute can be a ``pygame.event.Event`` object or an integer type that denotes an event.h](hThe }hjsbh;)}(h ``event``h]hevent}hjsbah}(h]h]h]h]h!]uh%h:hjubh attribute can be a }hjsbh;)}(h``pygame.event.Event``h]hpygame.event.Event}hjsbah}(h]h]h]h]h!]uh%h:hjubh1 object or an integer type that denotes an event.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K=hjhh&hubh)}(h``loops`` is an integer that denotes the number of events posted. If 0 (default) then the events will keep getting posted, unless explicitly stopped.h](h;)}(h ``loops``h]hloops}hjsbah}(h]h]h]h]h!]uh%h:hjubh is an integer that denotes the number of events posted. If 0 (default) then the events will keep getting posted, unless explicitly stopped.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K@hjhh&hubh)}(hTo disable the timer for such an event, call the function again with the same event argument with ``millis`` argument set to 0.h](hbTo disable the timer for such an event, call the function again with the same event argument with }hjsbh;)}(h ``millis``h]hmillis}hjsbah}(h]h]h]h]h!]uh%h:hjubh argument set to 0.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KChjhh&hubh)}(hIt is also worth mentioning that a particular event type can only be put on a timer once. In other words, there cannot be two timers for the same event type. Setting an event timer for a particular event discards the old one for that event type.h]hIt is also worth mentioning that a particular event type can only be put on a timer once. In other words, there cannot be two timers for the same event type. Setting an event timer for a particular event discards the old one for that event type.}hj5sbah}(h]h]h]h]h!]uh%hh'h]h)KFhjhh&hubh)}(hX``loops`` replaces the ``once`` argument, and this does not break backward compatibilityh](h;)}(h ``loops``h]hloops}hjGsbah}(h]h]h]h]h!]uh%h:hjCubh replaces the }hjCsbh;)}(h``once``h]honce}hjYsbah}(h]h]h]h]h!]uh%h:hjCubh9 argument, and this does not break backward compatibility}hjCsbeh}(h]h]h]h]h!]uh%hh'h]h)KKhjhh&hubhversionmodified)}(h.New in pygame 2.0.0.dev3: once argument added.h]h)}(h.New in pygame 2.0.0.dev3: once argument added.h](h)}(hNew in pygame 2.0.0.dev3: h]hNew in pygame 2.0.0.dev3: }hj{sbah}(h]h](jqaddedeh]h]h!]uh%hhjwh&hh'h]h)KNubhonce argument added.}(hjwh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjsh&hh'h]h)KNubah}(h]h]h]h]h!]type versionaddedversion 2.0.0.dev3uh%jqh&hh'h]h)KNhjhubjr)}(hJChanged in pygame 2.0.1: event argument supports pygame.event.Event objecth]h)}(hJChanged in pygame 2.0.1: event argument supports pygame.event.Event objecth](h)}(hChanged in pygame 2.0.1: h]hChanged in pygame 2.0.1: }hjsbah}(h]h](jqchangedeh]h]h!]uh%hhjh&hh'h]h)KOubhevent argument supports }(hjh&hh'Nh)Nubh;)}(h``pygame.event.Event``h]hpygame.event.Event}hjsbah}(h]h]h]h]h!]uh%h:hjh&hh'Nh)Nubh object}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KOubah}(h]h]h]h]h!]jversionchangedj2.0.1uh%jqh&hh'h]h)KOhjhubjr)}(hBNew in pygame 2.0.1: added loops argument to replace once argumenth]h)}(hBNew in pygame 2.0.1: added loops argument to replace once argumenth](h)}(hNew in pygame 2.0.1: h]hNew in pygame 2.0.1: }hjsbah}(h]h](jqjeh]h]h!]uh%hhjh&hh'h]h)KQubh-added loops argument to replace once argument}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)KQubah}(h]h]h]h]h!]j versionaddedj2.0.1uh%jqh&hh'h]h)KPhjhubh )}(h## pygame.time.set_timer ##h]h## pygame.time.set_timer ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjhh&hh'h]h)KRubeh}(h]h]h]h]h!]uh%jhj4h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌClock (class in pygame.time)pygame.time.ClockhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hClockh](h)}(h pygame.time.h]h pygame.time.}hj5sbah}(h]h](hheh]h]h!]h#h$uh%hhj1h&hh'h]h)KTubh)}(hj3h]hClock}hjCsbah}(h]h](hheh]h]h!]h#h$uh%hhj1h&hh'h]h)KTubeh}(h]j,ah](j j eh]h]h!]jjjhjj3jjj3jj3uh%hh'h]h)KThj.h&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`create an object to help track time`h]h)}(hj_h]h#create an object to help track time}hjasbah}(h]h]hah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)KVubhz)}(h:sg:`Clock() -> Clock`h]h)}(hjvh]hClock() -> Clock}hjxsbah}(h]h]jDah]h]h!]uh%hhjtubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)KWubeh}(h]h]h]h]h!]uh%huhjWh&hh'h]h)KVubh)}(hCreates a new Clock object that can be used to track an amount of time. The clock also provides several functions to help control a game's framerate.h]hCreates a new Clock object that can be used to track an amount of time. The clock also provides several functions to help control a game's framerate.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KYhjWh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ!tick() (pygame.time.Clock method)pygame.time.Clock.tickhNtauh%hdhjWh&hh'Nh)Nubh)}(hhh](h)}(htickh](h)}(hjh]htick}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K\ubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjh&hh'h]h)K\ubeh}(h]jah](j j eh]h]h!]jjjj3j Clock.tickjjClocktickj Clock.tick()uh%hh'h]h)K\hjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`update the clock`h]h)}(hjh]hupdate the clock}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K^ubhz)}(h':sg:`tick(framerate=0) -> milliseconds`h]h)}(hjh]h!tick(framerate=0) -> milliseconds}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K_ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K^ubh)}(hwThis method should be called once per frame. It will compute how many milliseconds have passed since the previous call.h]hwThis method should be called once per frame. It will compute how many milliseconds have passed since the previous call.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kahjh&hubh)}(hX,If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick(40)`` once per frame, the program will never run at more than 40 frames per second.h](hIf you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling }hjsbh;)}(h``Clock.tick(40)``h]hClock.tick(40)}hj&sbah}(h]h]h]h]h!]uh%h:hjubhN once per frame, the program will never run at more than 40 frames per second.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kdhjh&hubh)}(hNote that this function uses SDL_Delay function which is not accurate on every platform, but does not use much CPU. Use tick_busy_loop if you want an accurate timer, and don't mind chewing CPU.h]hNote that this function uses SDL_Delay function which is not accurate on every platform, but does not use much CPU. Use tick_busy_loop if you want an accurate timer, and don't mind chewing CPU.}hj>sbah}(h]h]h]h]h!]uh%hh'h]h)Kjhjh&hubh )}(h## Clock.tick ##h]h## Clock.tick ##}hjLsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Knubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjcjjdjjdjjjjjjjuh%hh&hhjWh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ+tick_busy_loop() (pygame.time.Clock method) pygame.time.Clock.tick_busy_loophNtauh%hdhjWh&hh'Nh)Nubh)}(hhh](h)}(htick_busy_looph](h)}(hj{h]htick_busy_loop}hj}sbah}(h]h](hheh]h]h!]h#h$uh%hhjyh&hh'h]h)Kpubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjyh&hh'h]h)Kpubeh}(h]jtah](j j eh]h]h!]jjjj3jClock.tick_busy_loopjjClocktick_busy_loopjClock.tick_busy_loop()uh%hh'h]h)Kphjvh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`update the clock`h]h)}(hjh]hupdate the clock}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Krubhz)}(h1:sg:`tick_busy_loop(framerate=0) -> milliseconds`h]h)}(hjh]h+tick_busy_loop(framerate=0) -> milliseconds}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Ksubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Krubh)}(hwThis method should be called once per frame. It will compute how many milliseconds have passed since the previous call.h]hwThis method should be called once per frame. It will compute how many milliseconds have passed since the previous call.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kuhjh&hubh)}(hX6If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick_busy_loop(40)`` once per frame, the program will never run at more than 40 frames per second.h](hIf you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling }hjsbh;)}(h``Clock.tick_busy_loop(40)``h]hClock.tick_busy_loop(40)}hjsbah}(h]h]h]h]h!]uh%h:hjubhN once per frame, the program will never run at more than 40 frames per second.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kxhjh&hubh)}(hNote that this function uses :func:`pygame.time.delay`, which uses lots of CPU in a busy loop to make sure that timing is more accurate.h](hNote that this function uses }hjsbh6)}(h:func:`pygame.time.delay`h]h;)}(hjh]hpygame.time.delay()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjhZj3h[pygame.time.delayuh%h5h'h]h)K~hjubhR, which uses lots of CPU in a busy loop to make sure that timing is more accurate.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K~hjh&hubjr)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjAsbah}(h]h](jqjeh]h]h!]uh%hhj=ubah}(h]h]h]h]h!] translatableuh%hhj9h&hh'h]h)Kubah}(h]h]h]h]h!]j versionaddedj1.8uh%jqh&hh'h]h)Khjubh )}(h## Clock.tick_busy_loop ##h]h## Clock.tick_busy_loop ##}hj^sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjvh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjujjvjjvjjjjjjjuh%hh&hhjWh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ%get_time() (pygame.time.Clock method)pygame.time.Clock.get_timehNtauh%hdhjWh&hh'Nh)Nubh)}(hhh](h)}(hget_timeh](h)}(hjh]hget_time}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjh&hh'h]h)Kubeh}(h]jah](j j eh]h]h!]jjjj3jClock.get_timejjClockget_timejClock.get_time()uh%hh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`time used in the previous tick`h]h)}(hjh]htime used in the previous tick}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`get_time() -> milliseconds`h]h)}(hjh]hget_time() -> milliseconds}hjsbah}(h]h]jDah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hZThe number of milliseconds that passed between the previous two calls to ``Clock.tick()``.h](hIThe number of milliseconds that passed between the previous two calls to }hjsbh;)}(h``Clock.tick()``h]h Clock.tick()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Clock.get_time ##h]h## Clock.get_time ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj"jj#jj#jjjjjjjuh%hh&hhjWh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ(get_rawtime() (pygame.time.Clock method)pygame.time.Clock.get_rawtimehNtauh%hdhjWh&hh'Nh)Nubh)}(hhh](h)}(h get_rawtimeh](h)}(hj:h]h get_rawtime}hj<sbah}(h]h](hheh]h]h!]h#h$uh%hhj8h&hh'h]h)Kubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhj8h&hh'h]h)Kubeh}(h]j3ah](j j eh]h]h!]jjjj3jClock.get_rawtimejjClock get_rawtimejClock.get_rawtime()uh%hh'h]h)Khj5h&hubj)}(hhh](hv)}(hhh](hz)}(h+:sl:`actual time used in the previous tick`h]h)}(hjfh]h%actual time used in the previous tick}hjhsbah}(h]h]hah]h]h!]uh%hhjdubah}(h]h]h]h]h!]uh%h)hKhjah&hh'h]h)Kubhz)}(h#:sg:`get_rawtime() -> milliseconds`h]h)}(hj}h]hget_rawtime() -> milliseconds}hjsbah}(h]h]jDah]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%h)hKhjah&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj^h&hh'h]h)Kubh)}(hSimilar to ``Clock.get_time()``, but does not include any time used while ``Clock.tick()`` was delaying to limit the framerate.h](h Similar to }hjsbh;)}(h``Clock.get_time()``h]hClock.get_time()}hjsbah}(h]h]h]h]h!]uh%h:hjubh+, but does not include any time used while }hjsbh;)}(h``Clock.tick()``h]h Clock.tick()}hjsbah}(h]h]h]h]h!]uh%h:hjubh% was delaying to limit the framerate.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj^h&hubh )}(h## Clock.get_rawtime ##h]h## Clock.get_rawtime ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj^h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj5h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjjjjjjuh%hh&hhjWh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hɌ$get_fps() (pygame.time.Clock method)pygame.time.Clock.get_fpshNtauh%hdhjWh&hh'Nh)Nubh)}(hhh](h)}(hget_fpsh](h)}(hjh]hget_fps}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(h()h]h}(h]h]h]h]h!]h#h$uh%hhjh&hh'h]h)Kubeh}(h]jah](j j eh]h]h!]jjjj3j Clock.get_fpsjjClockget_fpsjClock.get_fps()uh%hh'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`compute the clock framerate`h]h)}(hj% h]hcompute the clock framerate}hj' sbah}(h]h]hah]h]h!]uh%hhj# ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_fps() -> float`h]h)}(hj< h]hget_fps() -> float}hj> sbah}(h]h]jDah]h]h!]uh%hhj: ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hyCompute your game's framerate (in frames per second). It is computed by averaging the last ten calls to ``Clock.tick()``.h](hhCompute your game's framerate (in frames per second). It is computed by averaging the last ten calls to }hjW sbh;)}(h``Clock.tick()``h]h Clock.tick()}hj_ sbah}(h]h]h]h]h!]uh%h:hjW ubh.}hjW sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Clock.get_fps ##h]h## Clock.get_fps ##}hjw sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjjjjjjuh%hh&hhjWh'Nh)Nubh )}(h## pygame.time.Clock ##h]h## pygame.time.Clock ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjWh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj.h&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubh )}(h## pygame.time ##h]h## pygame.time ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Kubeh}(h](hs pygame-timeeh]h] pygame.timeah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j5 h'h]h)Khh,h&hubhhjjjljqj2j7j,j1jjjtjyjjj3j8jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/time.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612176.9751406 pygame-2.6.1/docs/generated/doctrees/ref/touch.doctree0000644000175100001770000004006614676242421022370 0ustar00runnerdocker+@sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame._sdl2.touch`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame._sdl2.touch}hh int`h]h)}(hjFh]hget_num_devices() -> int}hjHsbah}(h]h] signatureah]h]h!]uh%hhjDubah}(h]h]h]h]h!]uh%h)hKhj*h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj'h&hh'h]h)Kubh)}(h-Return the number of available touch devices.h]h-Return the number of available touch devices.}hjbsbah}(h]h]h]h]h!]uh%hh'h]h)Khj'h&hubh )}(h(## pygame._sdl2.touch.get_num_devices ##h]h(## pygame._sdl2.touch.get_num_devices ##}hjpsbah}(h]h]h]h]h!]h#h$uh%h hj'h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j%hhh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h׌+get_device() (in module pygame._sdl2.touch)pygame._sdl2.touch.get_devicehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h get_deviceh](h)}(hpygame._sdl2.touch.h]hpygame._sdl2.touch.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubh)}(hjh]h get_device}hjsbah}(h]h](jjeh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhj jj!jjj# get_device()uh%hh'h]h)Khjh&hubj&)}(hhh](hv)}(hhh](hz)}(h1:sl:`get the a touch device id for a given index`h]h)}(hjh]h+get the a touch device id for a given index}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h":sg:`get_device(index) -> touchid`h]h)}(hjh]hget_device(index) -> touchid}hjsbah}(h]h]jRah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh field_list)}(hhh]h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]h)}(hMindex (int) -- This number is at least 0 and less than the number of devices.h](hliteral_strong)}(hindexh]hindex}hj7sbah}(h]h]h]h]h!]uh%j5hj1ubh (}hj1sbh6)}(hhh]hliteral_emphasis)}(hinth]hint}hjNsbah}(h]h]h]h]h!]uh%jLhjIubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetjP refspecific py:modulejpy:classNuh%h5hj1ubh)}hj1sbh -- }hj1sbh,This number is at least 0 and less than the }(hj1h&hh'Nh)Nubh6)}(h@:func:`number of devices `h]h;)}(hjxh]hnumber of devices}hjzsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjvubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjhZNh["pygame._sdl2.touch.get_num_devicesuh%h5h'h]h)Khj1h&hubh.}(hj1h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%j,hjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh)}(h9Return an integer id associated with the given ``index``.h](h/Return an integer id associated with the given }hjsbh;)}(h ``index``h]hindex}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h### pygame._sdl2.touch.get_device ##h]h### pygame._sdl2.touch.get_device ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%j%hjh&hh'Nh)Nubeh}(h]h](jcfunctioneh]h]h!]jjcjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h׌0get_num_fingers() (in module pygame._sdl2.touch)"pygame._sdl2.touch.get_num_fingershNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hget_num_fingersh](h)}(hpygame._sdl2.touch.h]hpygame._sdl2.touch.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K"ubh)}(hjh]hget_num_fingers}hjsbah}(h]h](jjeh]h]h!]h#h$uh%hhjh&hh'h]h)K"ubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)K"ubeh}(h]jah](jjeh]h]h!]jjjhj jj!jjj#get_num_fingers()uh%hh'h]h)K"hjh&hubj&)}(hhh](hv)}(hhh](hz)}(h;:sl:`the number of active fingers for a given touch device`h]h)}(hj7h]h5the number of active fingers for a given touch device}hj9sbah}(h]h]hah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)K$ubhz)}(h%:sg:`get_num_fingers(touchid) -> int`h]h)}(hjNh]hget_num_fingers(touchid) -> int}hjPsbah}(h]h]jRah]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%h)hKhj2h&hh'h]h)K%ubeh}(h]h]h]h]h!]uh%huhj/h&hh'h]h)K$ubh)}(hOReturn the number of fingers active for the touch device whose id is `touchid`.h](hEReturn the number of fingers active for the touch device whose id is }hjisbh title_reference)}(h `touchid`h]htouchid}hjssbah}(h]h]h]h]h!]uh%jqhjiubh.}hjisbeh}(h]h]h]h]h!]uh%hh'h]h)K'hj/h&hubh )}(h(## pygame._sdl2.touch.get_num_fingers ##h]h(## pygame._sdl2.touch.get_num_fingers ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj/h&hh'h]h)K*ubeh}(h]h]h]h]h!]uh%j%hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h׌+get_finger() (in module pygame._sdl2.touch)pygame._sdl2.touch.get_fingerhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h get_fingerh](h)}(hpygame._sdl2.touch.h]hpygame._sdl2.touch.}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)K,ubh)}(hjh]h get_finger}hjsbah}(h]h](jjeh]h]h!]h#h$uh%hhjh&hh'h]h)K,ubj )}(h()h]h}(h]h]h]h]h!]h#h$uh%j hjh&hh'h]h)K,ubeh}(h]jah](jjeh]h]h!]jjjhj jj!jjj# get_finger()uh%hh'h]h)K,hjh&hubj&)}(hhh](hv)}(hhh](hz)}(h,:sl:`get information about an active finger`h]h)}(hjh]h&get information about an active finger}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K.ubhz)}(h':sg:`get_finger(touchid, index) -> int`h]h)}(hjh]h!get_finger(touchid, index) -> int}hj sbah}(h]h]jRah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K/ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K.ubj)}(hhh]j)}(hhh](j)}(h Parametersh]h Parameters}hj)sbah}(h]h]h]h]h!]uh%jhj&h'h]h)Kubj-)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(h%touchid (int) -- The touch device id.h](j6)}(htouchidh]htouchid}hjHsbah}(h]h]h]h]h!]uh%j5hjDubh (}hjDsbh6)}(hhh]jM)}(hinth]hint}hj]sbah}(h]h]h]h]h!]uh%jLhjZubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej reftargetj_jgjhjjiNuh%h5hjDubh)}hjDsbh -- }hjDsbhThe touch device id.}(hjDh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%j?hj<ubj@)}(hhh]h)}(hoindex (int) -- The index of the finger to return information about, between 0 and the number of active fingers.h](j6)}(hindexh]hindex}hjsbah}(h]h]h]h]h!]uh%j5hjubh (}hjsbh6)}(hhh]jM)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jLhjubah}(h]h]h]h]h!] refdomainjr refexplicitreftypej reftargetjjgjhjjiNuh%h5hjubh)}hjsbh -- }hjsbhGThe index of the finger to return information about, between 0 and the }(hjh&hh'Nh)Nubh6)}(hG:func:`number of active fingers `h]h;)}(hjh]hnumber of active fingers}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjhZNh["pygame._sdl2.touch.get_num_fingersuh%h5h'h]h)K2hjh&hubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%j?hj<ubeh}(h]h]h]h]h!]uh%j:hj7ubah}(h]h]h]h]h!]uh%j,hj&ubeh}(h]h]h]h]h!]uh%jhj#ubah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh)}(h[Return a dict for the finger ``index`` active on ``touchid``. The dict contains these keys:h](hReturn a dict for the finger }hjsbh;)}(h ``index``h]hindex}hjsbah}(h]h]h]h]h!]uh%h:hjubh active on }hjsbh;)}(h ``touchid``h]htouchid}hj0sbah}(h]h]h]h]h!]uh%h:hjubh. The dict contains these keys:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K6hjh&hubh literal_block)}(hXid the id of the finger (an integer). x the normalized x position of the finger, between 0 and 1. y the normalized y position of the finger, between 0 and 1. pressure the amount of pressure applied by the finger, between 0 and 1.h]hXid the id of the finger (an integer). x the normalized x position of the finger, between 0 and 1. y the normalized y position of the finger, between 0 and 1. pressure the amount of pressure applied by the finger, between 0 and 1.}hjJsbah}(h]h]h]h]h!]h#h$uh%jHh'h]h)K;hjh&hubh )}(h### pygame._sdl2.touch.get_finger ##h]h### pygame._sdl2.touch.get_finger ##}hjXsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%j%hjh&hh'Nh)Nubeh}(h]h](jrfunctioneh]h]h!]jjrjjojjojjjjjjjuh%hh&hhh,h'Nh)Nubh )}(h## pygame._sdl2.touch ##h]h## pygame._sdl2.touch ##}hjssbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)KBubeh}(h](hspygame-sdl2-toucheh]h]pygame._sdl2.touchah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%jh'h]h)Khh,h&hubhhjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/touch.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.1201406 pygame-2.6.1/docs/generated/doctrees/ref/transform.doctree0000644000175100001770000021330014676242421023252 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.transform`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.transform}hh Surface`h]h)}(hjbh]h(flip(surface, flip_x, flip_y) -> Surface}hjdsbah}(h]h] signatureah]h]h!]uh%hhj`ubah}(h]h]h]h]h!]uh%h)hKhjFh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjCh&hh'h]h)Kubh)}(hThis can flip a Surface either vertically, horizontally, or both. The arguments ``flip_x`` and ``flip_y`` are booleans that control whether to flip each axis. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions.h](hPThis can flip a Surface either vertically, horizontally, or both. The arguments }hj~sbh;)}(h ``flip_x``h]hflip_x}hjsbah}(h]h]h]h]h!]uh%h:hj~ubh and }hj~sbh;)}(h ``flip_y``h]hflip_y}hjsbah}(h]h]h]h]h!]uh%h:hj~ubh are booleans that control whether to flip each axis. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions.}hj~sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjCh&hubh )}(h## pygame.transform.flip ##h]h## pygame.transform.flip ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjCh&hh'h]h)K#ubeh}(h]h]h]h]h!]uh%jAhhh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h$scale() (in module pygame.transform)pygame.transform.scalehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hscaleh](j)}(hpygame.transform.h]hpygame.transform.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K%ubj)}(hjh]hscale}hjsbah}(h]h](j j!eh]h]h!]h#h$uh%jhjh&hh'h]h)K%ubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjh&hh'h]h)K%ubeh}(h]jah](j4j5eh]h]h!]j9j:j;hj<jj=j:jj?scale()uh%hh'h]h)K%hjh&hubjB)}(hhh](hv)}(hhh](hz)}(h:sl:`resize to new resolution`h]h)}(hj h]hresize to new resolution}hj"sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K'ubhz)}(h8:sg:`scale(surface, size, dest_surface=None) -> Surface`h]h)}(hj7h]h2scale(surface, size, dest_surface=None) -> Surface}hj9sbah}(h]h]jnah]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K(ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K'ubh)}(h}Resizes the Surface to a new size, given as (width, height). This is a fast scale operation that does not sample the results.h]h}Resizes the Surface to a new size, given as (width, height). This is a fast scale operation that does not sample the results.}hjRsbah}(h]h]h]h]h!]uh%hh'h]h)K*hjh&hubh)}(hXAn optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the size (width, height) passed in. Also the destination surface must be the same format.h]hXAn optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the size (width, height) passed in. Also the destination surface must be the same format.}hj`sbah}(h]h]h]h]h!]uh%hh'h]h)K-hjh&hubh )}(h## pygame.transform.scale ##h]h## pygame.transform.scale ##}hjnsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K2ubeh}(h]h]h]h]h!]uh%jAhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h'scale_by() (in module pygame.transform)pygame.transform.scale_byhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hscale_byh](j)}(hpygame.transform.h]hpygame.transform.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)K4ubj)}(hjh]hscale_by}hjsbah}(h]h](j j!eh]h]h!]h#h$uh%jhjh&hh'h]h)K4ubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjh&hh'h]h)K4ubeh}(h]jah](j4j5eh]h]h!]j9j:j;hj<jj=j:jj? scale_by()uh%hh'h]h)K4hjh&hubjB)}(hhh](hv)}(hhh](hz)}(h/:sl:`resize to new resolution, using scalar(s)`h]h)}(hjh]h)resize to new resolution, using scalar(s)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K6ubhz)}(h=:sg:`scale_by(surface, factor, dest_surface=None) -> Surface`h]h)}(hjh]h7scale_by(surface, factor, dest_surface=None) -> Surface}hjsbah}(h]h]jnah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K7ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K6ubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave scale_by feedback with authors `_h](h strong)}(h**Experimental:**h]h Experimental:}hj sbah}(h]h]h]h]h!]uh%j hjubhQ feature still in development available for testing and feedback. It may change. }hjsbh reference)}(h[`Please leave scale_by feedback with authors `_h]h+Please leave scale_by feedback with authors}(hj h+Please leave scale_by feedback with authorsubah}(h]h]h]h]h!]name+Please leave scale_by feedback with authorsrefuri*https://github.com/pygame/pygame/pull/2723uh%jhjubh target)}(h- h]h}(h]+please-leave-scale-by-feedback-with-authorsah]h]+please leave scale_by feedback with authorsah]h!]refurij2uh%j3 referencedKhjubeh}(h]h]h]h]h!]uh%hh'h]h)K9hjh&hubh)}(hXSame as :func:`scale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.scale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.scale_by(surf, (2, 1))` doubles the image width but keeps the height the same.h](hSame as }hjIsbh6)}(h:func:`scale()`h]h;)}(hjSh]hscale()}hjUsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjQubah}(h]h]h]h]h!]refdochS refdomainj_reftypefunc refexplicitrefwarnhYj:hZNh[scaleuh%h5h'h]h)K Surface`h]h)}(hjEh]h!rotate(surface, angle) -> Surface}hjGsbah}(h]h]jnah]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%h)hKhj)h&hh'h]h)KJubeh}(h]h]h]h]h!]uh%huhj&h&hh'h]h)KIubh)}(hUnfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise.h]hUnfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise.}hj`sbah}(h]h]h]h]h!]uh%hh'h]h)KLhj&h&hubh)}(hXUnless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value.h]hXUnless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value.}hjnsbah}(h]h]h]h]h!]uh%hh'h]h)KPhj&h&hubh )}(h## pygame.transform.rotate ##h]h## pygame.transform.rotate ##}hj|sbah}(h]h]h]h]h!]h#h$uh%h hj&h&hh'h]h)KUubeh}(h]h]h]h]h!]uh%jAhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h'rotozoom() (in module pygame.transform)pygame.transform.rotozoomhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hrotozoomh](j)}(hpygame.transform.h]hpygame.transform.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)KWubj)}(hjh]hrotozoom}hjsbah}(h]h](j j!eh]h]h!]h#h$uh%jhjh&hh'h]h)KWubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjh&hh'h]h)KWubeh}(h]jah](j4j5eh]h]h!]j9j:j;hj<jj=j:jj? rotozoom()uh%hh'h]h)KWhjh&hubjB)}(hhh](hv)}(hhh](hz)}(h!:sl:`filtered scale and rotation`h]h)}(hjh]hfiltered scale and rotation}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KYubhz)}(h0:sg:`rotozoom(surface, angle, scale) -> Surface`h]h)}(hjh]h*rotozoom(surface, angle, scale) -> Surface}hjsbah}(h]h]jnah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KZubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KYubh)}(hX_This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise.h]hX_This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K\hjh&hubh )}(h## pygame.transform.rotozoom ##h]h## pygame.transform.rotozoom ##}hj"sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%jAhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj9jj:jj:jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h&scale2x() (in module pygame.transform)pygame.transform.scale2xhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hscale2xh](j)}(hpygame.transform.h]hpygame.transform.}hjSsbah}(h]h](jjeh]h]h!]h#h$uh%jhjOh&hh'h]h)Kdubj)}(hjQh]hscale2x}hjasbah}(h]h](j j!eh]h]h!]h#h$uh%jhjOh&hh'h]h)Kdubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjOh&hh'h]h)Kdubeh}(h]jJah](j4j5eh]h]h!]j9j:j;hj<jQj=j:jQj? scale2x()uh%hh'h]h)KdhjLh&hubjB)}(hhh](hv)}(hhh](hz)}(h:sl:`specialized image doubler`h]h)}(hjh]hspecialized image doubler}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kfubhz)}(h4:sg:`scale2x(surface, dest_surface=None) -> Surface`h]h)}(hjh]h.scale2x(surface, dest_surface=None) -> Surface}hjsbah}(h]h]jnah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kfubh)}(hThis will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics.h]hThis will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kihjh&hubh)}(hThis really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale.h]hThis really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kmhjh&hubh)}(hXAn optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format.h]hXAn optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Kqhjh&hubh )}(h## pygame.transform.scale2x ##h]h## pygame.transform.scale2x ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kvubeh}(h]h]h]h]h!]uh%jAhjLh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h*smoothscale() (in module pygame.transform)pygame.transform.smoothscalehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h smoothscaleh](j)}(hpygame.transform.h]hpygame.transform.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kxubj)}(hjh]h smoothscale}hj#sbah}(h]h](j j!eh]h]h!]h#h$uh%jhjh&hh'h]h)Kxubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjh&hh'h]h)Kxubeh}(h]j ah](j4j5eh]h]h!]j9j:j;hj<jj=j:jj? smoothscale()uh%hh'h]h)Kxhjh&hubjB)}(hhh](hv)}(hhh](hz)}(h3:sl:`scale a surface to an arbitrary size smoothly`h]h)}(hjJh]h-scale a surface to an arbitrary size smoothly}hjLsbah}(h]h]hah]h]h!]uh%hhjHubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)Kzubhz)}(h>:sg:`smoothscale(surface, size, dest_surface=None) -> Surface`h]h)}(hjah]h8smoothscale(surface, size, dest_surface=None) -> Surface}hjcsbah}(h]h]jnah]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%h)hKhjEh&hh'h]h)K{ubeh}(h]h]h]h]h!]uh%huhjBh&hh'h]h)Kzubh)}(hXUses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized ``MMX`` routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24.h](hX Uses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized }hj|sbh;)}(h``MMX``h]hMMX}hjsbah}(h]h]h]h]h!]uh%h:hj|ubhX routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24.}hj|sbeh}(h]h]h]h]h!]uh%hh'h]h)K}hjBh&hubh)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hjsbah}(h]h](hjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh1.8uh%hh&hh'h]h)KhjBubh )}(h"## pygame.transform.smoothscale ##h]h"## pygame.transform.smoothscale ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjBh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h-smoothscale_by() (in module pygame.transform)pygame.transform.smoothscale_byhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hsmoothscale_byh](j)}(hpygame.transform.h]hpygame.transform.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj)}(hjh]hsmoothscale_by}hjsbah}(h]h](j j!eh]h]h!]h#h$uh%jhjh&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjh&hh'h]h)Kubeh}(h]jah](j4j5eh]h]h!]j9j:j;hj<jj=j:jj?smoothscale_by()uh%hh'h]h)Khjh&hubjB)}(hhh](hv)}(hhh](hz)}(h/:sl:`resize to new resolution, using scalar(s)`h]h)}(hj'h]h)resize to new resolution, using scalar(s)}hj)sbah}(h]h]hah]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubhz)}(hC:sg:`smoothscale_by(surface, factor, dest_surface=None) -> Surface`h]h)}(hj>h]h=smoothscale_by(surface, factor, dest_surface=None) -> Surface}hj@sbah}(h]h]jnah]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%h)hKhj"h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(h**Experimental:** feature still in development available for testing and feedback. It may change. `Please leave smoothscale_by feedback with authors `_h](j )}(h**Experimental:**h]h Experimental:}hj]sbah}(h]h]h]h]h!]uh%j hjYubhQ feature still in development available for testing and feedback. It may change. }hjYsbj)}(ha`Please leave smoothscale_by feedback with authors `_h]h1Please leave smoothscale_by feedback with authors}(hjoh1Please leave smoothscale_by feedback with authorsubah}(h]h]h]h]h!]name1Please leave smoothscale_by feedback with authorsj1*https://github.com/pygame/pygame/pull/2723uh%jhjYubj4)}(h- h]h}(h]1please-leave-smoothscale-by-feedback-with-authorsah]h]1please leave smoothscale_by feedback with authorsah]h!]refurijuh%j3jBKhjYubeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXSame as :func:`smoothscale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.smoothscale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.smoothscale_by(surf, (2, 1))` doubles the image width but keeps the height the same.h](hSame as }hjsbh6)}(h:func:`smoothscale()`h]h;)}(hjh]h smoothscale()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYj:hZNh[ smoothscaleuh%h5h'h]h)KhjubhV, but scales by some factor, rather than taking the new size explicitly. For example, }hjsbh;)}(h):code:`transform.smoothscale_by(surf, 3)`h]h!transform.smoothscale_by(surf, 3)}hjsbah}(h]h]jah]h]h!]languagehuh%h:hjubh will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, }hjsbh;)}(h.:code:`transform.smoothscale_by(surf, (2, 1))`h]h&transform.smoothscale_by(surf, (2, 1))}hjsbah}(h]h]jah]h]h!]languagehuh%h:hjubh7 doubles the image width but keeps the height the same.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]h)}(hNew in pygame 2.1.3.h]hNew in pygame 2.1.3.}hjsbah}(h]h](hjeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh2.1.3uh%hh&hh'h]h)Khjubh )}(h%## pygame.transform.smoothscale_by ##h]h%## pygame.transform.smoothscale_by ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj(jj)jj)jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h6get_smoothscale_backend() (in module pygame.transform)(pygame.transform.get_smoothscale_backendhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hget_smoothscale_backendh](j)}(hpygame.transform.h]hpygame.transform.}hjBsbah}(h]h](jjeh]h]h!]h#h$uh%jhj>h&hh'h]h)Kubj)}(hj@h]hget_smoothscale_backend}hjPsbah}(h]h](j j!eh]h]h!]h#h$uh%jhj>h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj>h&hh'h]h)Kubeh}(h]j9ah](j4j5eh]h]h!]j9j:j;hj<j@j=j:j@j?get_smoothscale_backend()uh%hh'h]h)Khj;h&hubjB)}(hhh](hv)}(hhh](hz)}(hJ:sl:`return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'`h]h)}(hjwh]hDreturn smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'}hjysbah}(h]h]hah]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%h)hKhjrh&hh'h]h)Kubhz)}(h):sg:`get_smoothscale_backend() -> string`h]h)}(hjh]h#get_smoothscale_backend() -> string}hjsbah}(h]h]jnah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjoh&hh'h]h)Kubh)}(hShows whether or not smoothscale is using ``MMX`` or ``SSE`` acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime.h](h*Shows whether or not smoothscale is using }hjsbh;)}(h``MMX``h]hMMX}hjsbah}(h]h]h]h]h!]uh%h:hjubh or }hjsbh;)}(h``SSE``h]hSSE}hjsbah}(h]h]h]h]h!]uh%h:hjubh acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjoh&hubh)}(h;This function is provided for pygame testing and debugging.h]h;This function is provided for pygame testing and debugging.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjoh&hubh )}(h.## pygame.transform.get_smoothscale_backend ##h]h.## pygame.transform.get_smoothscale_backend ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjoh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhj;h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h6set_smoothscale_backend() (in module pygame.transform)(pygame.transform.set_smoothscale_backendhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hset_smoothscale_backendh](j)}(hpygame.transform.h]hpygame.transform.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hset_smoothscale_backend}hj( sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj h&hh'h]h)Kubeh}(h]j ah](j4j5eh]h]h!]j9j:j;hj<j j=j:j j?set_smoothscale_backend()uh%hh'h]h)Khj h&hubjB)}(hhh](hv)}(hhh](hz)}(hJ:sl:`set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'`h]h)}(hjO h]hDset smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'}hjQ sbah}(h]h]hah]h]h!]uh%hhjM ubah}(h]h]h]h]h!]uh%h)hKhjJ h&hh'h]h)Kubhz)}(h.:sg:`set_smoothscale_backend(backend) -> None`h]h)}(hjf h]h(set_smoothscale_backend(backend) -> None}hjh sbah}(h]h]jnah]h]h!]uh%hhjd ubah}(h]h]h]h]h!]uh%h)hKhjJ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjG h&hh'h]h)Kubh)}(hXSets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses ``MMX`` instructions only. 'SSE' allows ``SSE`` extensions as well. A value error is raised if type is not recognized or not supported by the current processor.h](hpSets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses }hj sbh;)}(h``MMX``h]hMMX}hj sbah}(h]h]h]h]h!]uh%h:hj ubh! instructions only. 'SSE' allows }hj sbh;)}(h``SSE``h]hSSE}hj sbah}(h]h]h]h]h!]uh%h:hj ubhq extensions as well. A value error is raised if type is not recognized or not supported by the current processor.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjG h&hubh)}(hThis function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only.h]hThis function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)KhjG h&hubh )}(h.## pygame.transform.set_smoothscale_backend ##h]h.## pygame.transform.set_smoothscale_backend ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjG h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h#chop() (in module pygame.transform)pygame.transform.chophNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(hchoph](j)}(hpygame.transform.h]hpygame.transform.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]hchop}hj sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj h&hh'h]h)Kubeh}(h]j ah](j4j5eh]h]h!]j9j:j;hj<j j=j:j j?chop()uh%hh'h]h)Khj h&hubjB)}(hhh](hv)}(hhh](hz)}(h;:sl:`gets a copy of an image with an interior area removed`h]h)}(hj' h]h5gets a copy of an image with an interior area removed}hj) sbah}(h]h]hah]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%h)hKhj" h&hh'h]h)Kubhz)}(h$:sg:`chop(surface, rect) -> Surface`h]h)}(hj> h]hchop(surface, rect) -> Surface}hj@ sbah}(h]h]jnah]h]h!]uh%hhj< ubah}(h]h]h]h]h!]uh%h)hKhj" h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hExtracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.)h]hExtracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.)}hjY sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(h``NOTE``: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface.h](h;)}(h``NOTE``h]hNOTE}hjk sbah}(h]h]h]h]h!]uh%h:hjg ubh: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface.}hjg sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## pygame.transform.chop ##h]h## pygame.transform.chop ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h(laplacian() (in module pygame.transform)pygame.transform.laplacianhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h laplacianh](j)}(hpygame.transform.h]hpygame.transform.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]h laplacian}hj sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj h&hh'h]h)Kubeh}(h]j ah](j4j5eh]h]h!]j9j:j;hj<j j=j:j j? laplacian()uh%hh'h]h)Khj h&hubjB)}(hhh](hv)}(hhh](hz)}(h:sl:`find edges in a surface`h]h)}(hj h]hfind edges in a surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h6:sg:`laplacian(surface, dest_surface=None) -> Surface`h]h)}(hj h]h0laplacian(surface, dest_surface=None) -> Surface}hj sbah}(h]h]jnah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h;Finds the edges in a surface using the laplacian algorithm.h]h;Finds the edges in a surface using the laplacian algorithm.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj1 sbah}(h]h](hjeh]h]h!]uh%hhj- ubah}(h]h]h]h]h!] translatableuh%hhj) h&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh1.8uh%hh&hh'h]h)Khj ubh )}(h ## pygame.transform.laplacian ##h]h ## pygame.transform.laplacian ##}hjN sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jje jjf jjf jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h/average_surfaces() (in module pygame.transform)!pygame.transform.average_surfaceshNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(haverage_surfacesh](j)}(hpygame.transform.h]hpygame.transform.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj{ h&hh'h]h)Kubj)}(hj} h]haverage_surfaces}hj sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj{ h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj{ h&hh'h]h)Kubeh}(h]jv ah](j4j5eh]h]h!]j9j:j;hj<j} j=j:j} j?average_surfaces()uh%hh'h]h)Khjx h&hubjB)}(hhh](hv)}(hhh](hz)}(h2:sl:`find the average surface from many surfaces.`h]h)}(hj h]h,find the average surface from many surfaces.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(hP:sg:`average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface`h]h)}(hj h]hJaverage_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface}hj sbah}(h]h]jnah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(haTakes a sequence of surfaces and returns a surface with average colors from each of the surfaces.h]haTakes a sequence of surfaces and returns a surface with average colors from each of the surfaces.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hpalette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors.h]hpalette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hONote, this function currently does not handle palette using surfaces correctly.h]hONote, this function currently does not handle palette using surfaces correctly.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj sbah}(h]h](hjeh]h]h!]uh%hhj ubah}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh1.8uh%hh&hh'h]h)Khj ubh)}(h*New in pygame 1.9: palette_colors argumenth]h)}(h*New in pygame 1.9: palette_colors argumenth](h)}(hNew in pygame 1.9: h]hNew in pygame 1.9: }hj= sbah}(h]h](hjeh]h]h!]uh%hhj9 h&hh'h]h)Kubh;)}(h``palette_colors``h]hpalette_colors}hjK sbah}(h]h]h]h]h!]uh%h:hj9 h&hh'Nh)Nubh argument}(hj9 h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj5 h&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh1.9uh%hh&hh'h]h)Khj ubh )}(h'## pygame.transform.average_surfaces ##h]h'## pygame.transform.average_surfaces ##}hjl sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhjx h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj jj jj jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h,average_color() (in module pygame.transform)pygame.transform.average_colorhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h average_colorh](j)}(hpygame.transform.h]hpygame.transform.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj)}(hj h]h average_color}hj sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj h&hh'h]h)Kubeh}(h]j ah](j4j5eh]h]h!]j9j:j;hj<j j=j:j j?average_color()uh%hh'h]h)Khj h&hubjB)}(hhh](hv)}(hhh](hz)}(h*:sl:`finds the average color of a surface`h]h)}(hj h]h$finds the average color of a surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(hF:sg:`average_color(surface, rect=None, consider_alpha=False) -> Color`h]h)}(hj h]h@average_color(surface, rect=None, consider_alpha=False) -> Color}hj sbah}(h]h]jnah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hFinds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. If consider_alpha is set to True, then alpha is taken into account (removing the black artifacts).h]hFinds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. If consider_alpha is set to True, then alpha is taken into account (removing the black artifacts).}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(h,New in pygame 2.1.2: consider_alpha argumenth]h)}(h,New in pygame 2.1.2: consider_alpha argumenth](h)}(hNew in pygame 2.1.2: h]hNew in pygame 2.1.2: }hj sbah}(h]h](hjeh]h]h!]uh%hhj h&hh'h]h)Kubh;)}(h``consider_alpha``h]hconsider_alpha}hj( sbah}(h]h]h]h]h!]uh%h:hj h&hh'Nh)Nubh argument}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhj h&hh'h]h)Kubah}(h]h]h]h]h!]h versionaddedh2.1.2uh%hh&hh'h]h)Khj ubh )}(h$## pygame.transform.average_color ##h]h$## pygame.transform.average_color ##}hjI sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jAhj h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jj` jja jja jjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h(grayscale() (in module pygame.transform)pygame.transform.grayscalehNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h grayscaleh](j)}(hpygame.transform.h]hpygame.transform.}hjz sbah}(h]h](jjeh]h]h!]h#h$uh%jhjv h&hh'h]h)Kubj)}(hjx h]h grayscale}hj sbah}(h]h](j j!eh]h]h!]h#h$uh%jhjv h&hh'h]h)Kubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hjv h&hh'h]h)Kubeh}(h]jq ah](j4j5eh]h]h!]j9j:j;hj<jx j=j:jx j? grayscale()uh%hh'h]h)Khjs h&hubjB)}(hhh](hv)}(hhh](hz)}(h:sl:`grayscale a surface`h]h)}(hj h]hgrayscale a surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h6:sg:`grayscale(surface, dest_surface=None) -> Surface`h]h)}(hj h]h0grayscale(surface, dest_surface=None) -> Surface}hj sbah}(h]h]jnah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hReturns a grayscaled version of the original surface using the luminosity formula which weights red, green and blue according to their wavelengths.h]hReturns a grayscaled version of the original surface using the luminosity formula which weights red, green and blue according to their wavelengths.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh)}(hAn optional destination surface can be passed which is faster than creating a new Surface. This destination surface must have the same dimensions (width, height) and depth as the source Surface.h]hAn optional destination surface can be passed which is faster than creating a new Surface. This destination surface must have the same dimensions (width, height) and depth as the source Surface.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h ## pygame.transform.grayscale ##h]h ## pygame.transform.grayscale ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jAhjs h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjjjjjjuh%hh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](h(threshold() (in module pygame.transform)pygame.transform.thresholdhNtauh%hdhh,h&hh'Nh)Nubh)}(hhh](h)}(h thresholdh](j)}(hpygame.transform.h]hpygame.transform.}hj.sbah}(h]h](jjeh]h]h!]h#h$uh%jhj*h&hh'h]h)Mubj)}(hj,h]h threshold}hj<sbah}(h]h](j j!eh]h]h!]h#h$uh%jhj*h&hh'h]h)Mubj&)}(h()h]h}(h]h]h]h]h!]h#h$uh%j%hj*h&hh'h]h)Mubeh}(h]j%ah](j4j5eh]h]h!]j9j:j;hj<j,j=j:j,j? threshold()uh%hh'h]h)Mhj'h&hubjB)}(hhh](hv)}(hhh](hz)}(hr:sl:`finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.`h]h)}(hjch]hlfinds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.}hjesbah}(h]h]hah]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%h)hKhj^h&hh'h]h)Mubhz)}(h:sg:`threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels`h]h)}(hjzh]hthreshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels}hj|sbah}(h]h]jnah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhj^h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhj[h&hh'h]h)Mubh)}(hThis versatile function can be used for find colors in a 'surf' close to a 'search_color' or close to colors in a separate 'search_surf'.h]hThis versatile function can be used for find colors in a 'surf' close to a 'search_color' or close to colors in a separate 'search_surf'.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj[h&hubh)}(hTIt can also be used to transfer pixels into a 'dest_surf' that match or don't match.h]hTIt can also be used to transfer pixels into a 'dest_surf' that match or don't match.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hj[h&hubh)}(hBy default it sets pixels in the 'dest_surf' where all of the pixels NOT within the threshold are changed to set_color. If inverse_set is optionally set to True, the pixels that ARE within the threshold are changed to set_color.h]hBy default it sets pixels in the 'dest_surf' where all of the pixels NOT within the threshold are changed to set_color. If inverse_set is optionally set to True, the pixels that ARE within the threshold are changed to set_color.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M hj[h&hubh)}(hIf the optional 'search_surf' surface is given, it is used to threshold against rather than the specified 'set_color'. That is, it will find each pixel in the 'surf' that is within the 'threshold' of the pixel at the same coordinates of the 'search_surf'.h]hIf the optional 'search_surf' surface is given, it is used to threshold against rather than the specified 'set_color'. That is, it will find each pixel in the 'surf' that is within the 'threshold' of the pixel at the same coordinates of the 'search_surf'.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhj[h&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parametersh]h Parameters}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubh field_body)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(hdest_surf (pygame.Surface or None) -- Surface we are changing. See 'set_behavior'. Should be None if counting (set_behavior is 0).h](hliteral_strong)}(h dest_surfh]h dest_surf}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]hliteral_emphasis)}(hpygame.Surfaceh]hpygame.Surface}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypej; reftargetj refspecific py:modulej:py:classNuh%h5hjubj)}(h or h]h or }hj/sbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hNoneh]hNone}hj@sbah}(h]h]h]h]h!]uh%jhj=ubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjBj,j-j:j.Nuh%h5hjubh)}hjsbh -- }hjsbh\Surface we are changing. See 'set_behavior'. Should be None if counting (set_behavior is 0).}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h3surf (pygame.Surface) -- Surface we are looking at.h](j)}(hsurfh]hsurf}hjwsbah}(h]h]h]h]h!]uh%jhjsubh (}hjssbh6)}(hhh]j)}(hpygame.Surfaceh]hpygame.Surface}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjsubh)}hjssbh -- }hjssbhSurface we are looking at.}(hjsh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjpubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h:search_color (pygame.Color) -- Color we are searching for.h](j)}(h search_colorh]h search_color}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(h pygame.Colorh]h pygame.Color}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjubh)}hjsbh -- }hjsbhColor we are searching for.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hthreshold (pygame.Color) -- Within this distance from search_color (or search_surf). You can use a threshold of (r,g,b,a) where the r,g,b can have different thresholds. So you could use an r threshold of 40 and a blue threshold of 2 if you like.h](j)}(h thresholdh]h threshold}hjsbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j)}(h pygame.Colorh]h pygame.Color}hj$sbah}(h]h]h]h]h!]uh%jhj!ubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetj&j,j-j:j.Nuh%h5hj ubh)}hj sbh -- }hj sbhWithin this distance from search_color (or search_surf). You can use a threshold of (r,g,b,a) where the r,g,b can have different thresholds. So you could use an r threshold of 40 and a blue threshold of 2 if you like.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h>set_color (pygame.Color or None) -- Color we set in dest_surf.h](j)}(h set_colorh]h set_color}hj[sbah}(h]h]h]h]h!]uh%jhjWubh (}hjWsbh6)}(hhh]j)}(h pygame.Colorh]h pygame.Color}hjpsbah}(h]h]h]h]h!]uh%jhjmubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjrj,j-j:j.Nuh%h5hjWubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjWubh6)}(hhh]j)}(hNoneh]hNone}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjWubh)}hjWsbh -- }hjWsbhColor we set in dest_surf.}(hjWh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hset_behavior (int) -- set_behavior=1 (default). Pixels in dest_surface will be changed to 'set_color'. set_behavior=0 we do not change 'dest_surf', just count. Make dest_surf=None. set_behavior=2 pixels set in 'dest_surf' will be from 'surf'.h](j)}(h set_behaviorh]h set_behavior}hjsbah}(h]h]h]h]h!]uh%jhjubh (}hjsbh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjubh)}hjsbh -- }hjsbj)}(hhh](j)}(hPset_behavior=1 (default). Pixels in dest_surface will be changed to 'set_color'.h]h)}(hj h]hPset_behavior=1 (default). Pixels in dest_surface will be changed to 'set_color'.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)M&hjubah}(h]h]h]h]h!]uh%jh'h]h)M&hjubj)}(hMset_behavior=0 we do not change 'dest_surf', just count. Make dest_surf=None.h]h)}(hj!h]hMset_behavior=0 we do not change 'dest_surf', just count. Make dest_surf=None.}hj#sbah}(h]h]h]h]h!]uh%hh'h]h)M'hjubah}(h]h]h]h]h!]uh%jh'h]h)M'hjubj)}(h>set_behavior=2 pixels set in 'dest_surf' will be from 'surf'. h]h)}(h=set_behavior=2 pixels set in 'dest_surf' will be from 'surf'.h]h=set_behavior=2 pixels set in 'dest_surf' will be from 'surf'.}hj:sbah}(h]h]h]h]h!]uh%hh'h]h)M(hj6ubah}(h]h]h]h]h!]uh%jh'h]h)M(hjubeh}(h]h]h]h]h!]bullet-uh%jh'h]h)M&hjh&hubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hsearch_surf (pygame.Surface or None) -- search_surf=None (default). Search against 'search_color' instead. search_surf=Surface. Look at the color in 'search_surf' rather than using 'search_color'.h](j)}(h search_surfh]h search_surf}hjisbah}(h]h]h]h]h!]uh%jhjeubh (}hjesbh6)}(hhh]j)}(hpygame.Surfaceh]hpygame.Surface}hj~sbah}(h]h]h]h]h!]uh%jhj{ubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjeubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjeubh6)}(hhh]j)}(hNoneh]hNone}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetjj,j-j:j.Nuh%h5hjeubh)}hjesbh -- }hjesbj)}(hhh](j)}(hBsearch_surf=None (default). Search against 'search_color' instead.h]h)}(hjh]hBsearch_surf=None (default). Search against 'search_color' instead.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M+hjubah}(h]h]h]h]h!]uh%jh'h]h)M+hjubj)}(hYsearch_surf=Surface. Look at the color in 'search_surf' rather than using 'search_color'.h]h)}(hjh]hYsearch_surf=Surface. Look at the color in 'search_surf' rather than using 'search_color'.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M,hjubah}(h]h]h]h]h!]uh%jh'h]h)M,hjubeh}(h]h]h]h]h!]jTjUuh%jh'h]h)M+hjeh&hubeh}(h]h]h]h]h!]uh%hhjbubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hzinverse_set (bool) -- False, default. Pixels outside of threshold are changed. True, Pixels within threshold are changed.h](j)}(h inverse_seth]h inverse_set}hjsbah}(h]h]h]h]h!]uh%jhj ubh (}hj sbh6)}(hhh]j)}(hboolh]hbool}hj&sbah}(h]h]h]h]h!]uh%jhj#ubah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetj(j,j-j:j.Nuh%h5hj ubh)}hj sbh -- }hj sbj)}(hhh](j)}(h8False, default. Pixels outside of threshold are changed.h]h)}(hjKh]h8False, default. Pixels outside of threshold are changed.}hjMsbah}(h]h]h]h]h!]uh%hh'h]h)M0hjIubah}(h]h]h]h]h!]uh%jh'h]h)M0hjFubj)}(h+True, Pixels within threshold are changed. h]h)}(h*True, Pixels within threshold are changed.h]h*True, Pixels within threshold are changed.}hjdsbah}(h]h]h]h]h!]uh%hh'h]h)M1hj`ubah}(h]h]h]h]h!]uh%jh'h]h)M1hjFubeh}(h]h]h]h]h!]jTjUuh%jh'h]h)M0hj h&hubeh}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(h Return typeh]h Return type}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hinth]h6)}(hhh]hint}hjsbah}(h]h]h]h]h!] refdomainj( refexplicitreftypej; reftargetintj,j-j:j.Nuh%h5hjubah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hReturnsh]hReturns}hjsbah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h)}(hpThe number of pixels that are within the 'threshold' in 'surf' compared to either 'search_color' or search_surf.h](hdThe number of pixels that are within the 'threshold' in 'surf' compared to either 'search_color' or }(hjh&hh'Nh)Nubh title_reference)}(h `search_surf`h]h search_surf}hjsbah}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubh.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hExamplesh]hExamples}(hjh&hh'Nh)Nubah}(h]h]h]h]h!]uh%jhjh'h]h)Kubj)}(hhh]h}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jh'h]h)M7hjh&hubeh}(h]h]h]h]h!]uh%jhj[h&hh'Nh)Nubh)}(hqSee the threshold tests for a full of examples: https://github.com/pygame/pygame/blob/main/test/transform_test.pyh](h0See the threshold tests for a full of examples: }hj@sbj)}(hAhttps://github.com/pygame/pygame/blob/main/test/transform_test.pyh]hAhttps://github.com/pygame/pygame/blob/main/test/transform_test.py}hjHsbah}(h]h]h]h]h!]refurijJuh%jhj@ubeh}(h]h]h]h]h!]uh%hh'h]h)M9hj[h&hubh literal_block)}(hXO def test_threshold_dest_surf_not_change(self): """the pixels within the threshold. All pixels not within threshold are changed to set_color. So there should be none changed in this test. """ (w, h) = size = (32, 32) threshold = (20, 20, 20, 20) original_color = (25, 25, 25, 25) original_dest_color = (65, 65, 65, 55) threshold_color = (10, 10, 10, 10) set_color = (255, 10, 10, 10) surf = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surf = pygame.Surface(size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(size, pygame.SRCALPHA, 32) surf.fill(original_color) search_surf.fill(threshold_color) dest_surf.fill(original_dest_color) # set_behavior=1, set dest_surface from set_color. # all within threshold of third_surface, so no color is set. THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 pixels_within_threshold = pygame.transform.threshold( dest_surface=dest_surf, surface=surf, search_color=None, threshold=threshold, set_color=set_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, search_surf=search_surf, ) # # Return, of pixels within threshold is correct self.assertEqual(w * h, pixels_within_threshold) # # Size of dest surface is correct dest_rect = dest_surf.get_rect() dest_size = dest_rect.size self.assertEqual(size, dest_size) # The color is not the change_color specified for every pixel As all # pixels are within threshold for pt in test_utils.rect_area_pts(dest_rect): self.assertNotEqual(dest_surf.get_at(pt), set_color) self.assertEqual(dest_surf.get_at(pt), original_dest_color) h]hXO def test_threshold_dest_surf_not_change(self): """the pixels within the threshold. All pixels not within threshold are changed to set_color. So there should be none changed in this test. """ (w, h) = size = (32, 32) threshold = (20, 20, 20, 20) original_color = (25, 25, 25, 25) original_dest_color = (65, 65, 65, 55) threshold_color = (10, 10, 10, 10) set_color = (255, 10, 10, 10) surf = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surf = pygame.Surface(size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(size, pygame.SRCALPHA, 32) surf.fill(original_color) search_surf.fill(threshold_color) dest_surf.fill(original_dest_color) # set_behavior=1, set dest_surface from set_color. # all within threshold of third_surface, so no color is set. THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 pixels_within_threshold = pygame.transform.threshold( dest_surface=dest_surf, surface=surf, search_color=None, threshold=threshold, set_color=set_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, search_surf=search_surf, ) # # Return, of pixels within threshold is correct self.assertEqual(w * h, pixels_within_threshold) # # Size of dest surface is correct dest_rect = dest_surf.get_rect() dest_size = dest_rect.size self.assertEqual(size, dest_size) # The color is not the change_color specified for every pixel As all # pixels are within threshold for pt in test_utils.rect_area_pts(dest_rect): self.assertNotEqual(dest_surf.get_at(pt), set_color) self.assertEqual(dest_surf.get_at(pt), original_dest_color) }hj_sbah}(h]h]h]h]h!]source6/home/runner/work/pygame/pygame/test/transform_test.pyh#h$forcehighlight_args} linenostartKsuh%j]h'h]h)M;hj[h&hubh)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]h)}(hNew in pygame 1.8.h]hNew in pygame 1.8.}hj{sbah}(h]h](hjeh]h]h!]uh%hhjwubah}(h]h]h]h]h!] translatableuh%hhjsh&hh'h]h)M?ubah}(h]h]h]h]h!]h versionaddedh1.8uh%hh&hh'h]h)M?hj[ubh)}(hYChanged in pygame 1.9.4: Fixed a lot of bugs and added keyword arguments. Test your code.h]h)}(hYChanged in pygame 1.9.4: Fixed a lot of bugs and added keyword arguments. Test your code.h](h)}(hChanged in pygame 1.9.4: h]hChanged in pygame 1.9.4: }hjsbah}(h]h](hheh]h]h!]uh%hhjh&hh'h]h)MBubh@Fixed a lot of bugs and added keyword arguments. Test your code.}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)MBubah}(h]h]h]h]h!]hversionchangedh1.9.4uh%hh&hh'h]h)M@hj[ubh )}(h ## pygame.transform.threshold ##h]h ## pygame.transform.threshold ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj[h&hh'h]h)MCubeh}(h]h]h]h]h!]uh%jAhj'h&hh'Nh)Nubeh}(h]h](j(functioneh]h]h!]jj(jjjjjjjjjjjuh%hh&hhh,h'Nh)Nubh )}(h## pygame.transform ##h]h## pygame.transform ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)MEubeh}(h](hspygame-transformeh]h]pygame.transformah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjj>j;jju nametypes}(jj>juh}(jh,hsj4)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j3h'h]h)Khh,h&hubhhjjjjj;j5jjjjjJjOj jjjjjj9j>j j j j j j jv j{ j j jq jv j%j*u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/ref/transform.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/0000755000175100001770000000000014676242436017737 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.1421406 pygame-2.6.1/docs/generated/doctrees/tut/CameraIntro.doctree0000644000175100001770000007331614676242421023516 0ustar00runnerdockervsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h#TUTORIAL:Camera Module Introductionh]h Text#TUTORIAL:Camera Module Introduction}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource=/home/runner/work/pygame/pygame/docs/reST/tut/CameraIntro.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h-Pygame Tutorials - Camera Module Introductionh]h-Pygame Tutorials - Camera Module Introduction}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hCamera Module Introductionh]hCamera Module Introduction}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(hby Nirav Patelh]h paragraph)}(hhh]hby Nirav Patel}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hnrp@eclecti.cc h]h)}(hnrp@eclecti.cch]h reference)}(hhh]hnrp@eclecti.cc}hhsbah}(h]h]h]h]h!]refurimailto:nrp@eclecti.ccuh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)Kubh)}(hXVPygame 1.9 comes with support for interfacing cameras, allowing you to capture still images, watch live streams, and do some simple computer vision. This tutorial will cover all of those use cases, providing code samples you can base your app or game on. You can refer to the :mod:`reference documentation ` for the full API.h](hXPygame 1.9 comes with support for interfacing cameras, allowing you to capture still images, watch live streams, and do some simple computer vision. This tutorial will cover all of those use cases, providing code samples you can base your app or game on. You can refer to the }hhsbh pending_xref)}(h.:mod:`reference documentation `h]h literal)}(hhh]hreference documentation}hhsbah}(h]h](xrefpypy-modeh]h]h!]uh%hhhubah}(h]h]h]h]h!]refdoctut/CameraIntro refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classN reftarget pygame.camerauh%hh'h(h)Khhubh for the full API.}hhsbeh}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubh note)}(hXAs of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as **EXPERIMENTAL**, meaning the API could change in subsequent versions.h]h)}(hXAs of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as **EXPERIMENTAL**, meaning the API could change in subsequent versions.h](hXSAs of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as }hj-sbh strong)}(h**EXPERIMENTAL**h]h EXPERIMENTAL}hj7sbah}(h]h]h]h]h!]uh%j5hj-ubh6, meaning the API could change in subsequent versions.}hj-sbeh}(h]h]h]h]h!]uh%hh'h(h)Khj)ubah}(h]h]h]h]h!]uh%j'h'h(h)Khh]h&hubhI)}(hhh](hN)}(hImport and Inith]hImport and Init}hjXsbah}(h]h]h]h]h!]uh%hMhjUh&hh'h(h)K$ubh literal_block)}(hbimport pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init()h]hbimport pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init()}hjhsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)K(hjUh&hubh)}(hbAs the camera module is optional, it needs to be imported and initialized manually as shown above.h]hbAs the camera module is optional, it needs to be imported and initialized manually as shown above.}hjvsbah}(h]h]h]h]h!]uh%hh'h(h)K/hjUh&hubeh}(h]import-and-initah]h]import and initah]h!]uh%hHhh]h&hh'h(h)K$ubhI)}(hhh](hN)}(hCapturing a Single Imageh]hCapturing a Single Image}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K4ubh)}(hX=Now we will go over the simplest case of opening a camera and capturing a frame as a surface. In the below example, we assume that there is a camera at /dev/video0 on the computer, and initialize it with a size of 640 by 480. The surface called image is whatever the camera was seeing when get_image() was called. ::h]hX:Now we will go over the simplest case of opening a camera and capturing a frame as a surface. In the below example, we assume that there is a camera at /dev/video0 on the computer, and initialize it with a size of 640 by 480. The surface called image is whatever the camera was seeing when get_image() was called.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K6hjh&hubjg)}(hWcam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image()h]hWcam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image()}hjsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)K`\ .h](hX2Using the threshold() function from the transform module, one can do simple green screen like effects, or isolate specifically colored objects in a scene. In the below example, we threshold out just the green tree and make the rest of the image black. Check the reference documentation for details on the }hj!sbh)}(h7:func:`threshold function `h]h)}(hj+h]hthreshold function}hj-sbah}(h]h](jpypy-funceh]h]h!]uh%hhj)ubah}(h]h]h]h]h!]refdocj refdomainj7reftypefunc refexplicitrefwarnjNjNjpygame.transform.thresholduh%hh'h(h)Khj!ubh .}hj!sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubjg)}(hself.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)h]hself.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)}hjSsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Khjh&hubj)}(h7.. image:: camera_thresholded.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_thresholded.jpgj}jjmsjcamera_thresholded.jpguh%jh'h(h)Khjh&hubh)}(hX{Of course, this is only useful if you already know the exact color of the object you are looking for. To get around this and make thresholding usable in the real world, we need to add a calibration stage where we identify the color of an object and use it to threshold against. We will be using the average_color() function of the transform module to do this. Below is an example calibration function that you could loop until an event like a key press, and an image of what it would look like. The color inside the box will be the one that is used for the threshold. Note that we are using the HSV colorspace in the below images.h]hX{Of course, this is only useful if you already know the exact color of the object you are looking for. To get around this and make thresholding usable in the real world, we need to add a calibration stage where we identify the color of an object and use it to threshold against. We will be using the average_color() function of the transform module to do this. Below is an example calibration function that you could loop until an event like a key press, and an image of what it would look like. The color inside the box will be the one that is used for the threshold. Note that we are using the HSV colorspace in the below images.}hjpsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubjg)}(hX%def calibrate(self): # capture the image self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface self.display.blit(self.snapshot, (0,0)) # make a rect in the middle of the screen crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # get the average color of the area inside the rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # fill the upper left corner with that color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip()h]hX%def calibrate(self): # capture the image self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface self.display.blit(self.snapshot, (0,0)) # make a rect in the middle of the screen crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # get the average color of the area inside the rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # fill the upper left corner with that color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip()}hj~sbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Khjh&hubj)}(h2.. image:: camera_average.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_average.jpgj}jjsjcamera_average.jpguh%jh'h(h)Khjh&hubjg)}(h[pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)h]h[pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)}hjsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Khjh&hubj)}(h2.. image:: camera_thresh.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_thresh.jpgj}jjsjcamera_thresh.jpguh%jh'h(h)Khjh&hubh)}(hYou can use the same idea to do a simple green screen/blue screen, by first getting a background image and then thresholding against it. The below example just has the camera pointed at a blank white wall in HSV colorspace.h]hYou can use the same idea to do a simple green screen/blue screen, by first getting a background image and then thresholding against it. The below example just has the camera pointed at a blank white wall in HSV colorspace.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubjg)}(hXxdef calibrate(self): # capture a bunch of background images bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # average them down to one to get rid of some noise pygame.transform.average_surfaces(bg,self.background) # blit it to the display surface self.display.blit(self.background, (0,0)) pygame.display.flip()h]hXxdef calibrate(self): # capture a bunch of background images bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # average them down to one to get rid of some noise pygame.transform.average_surfaces(bg,self.background) # blit it to the display surface self.display.blit(self.background, (0,0)) pygame.display.flip()}hjsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Khjh&hubj)}(h5.. image:: camera_background.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_background.jpgj}jjsjcamera_background.jpguh%jh'h(h)Khjh&hubjg)}(hipygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)h]hipygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)}hjsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Mhjh&hubj)}(h1.. image:: camera_green.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_green.jpgj}jjsjcamera_green.jpguh%jh'h(h)Mhjh&hubeh}(h] thresholdingah]h] thresholdingah]h!]uh%hHhjnh&hh'h(h)KubhI)}(hhh](hN)}(hUsing the Mask Moduleh]hUsing the Mask Module}hj sbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)M ubh)}(hXFThe stuff above is great if you just want to display images, but with the :mod:`mask module `, you can also use a camera as an input device for a game. For example, going back to the example of thresholding out a specific object, we can find the position of that object and use it to control an on screen object.h](hJThe stuff above is great if you just want to display images, but with the }hjsbh)}(h :mod:`mask module `h]h)}(hj#h]h mask module}hj%sbah}(h]h](jpypy-modeh]h]h!]uh%hhj!ubah}(h]h]h]h]h!]refdocj refdomainj/reftypemod refexplicitrefwarnjNjNj pygame.maskuh%hh'h(h)M hjubh, you can also use a camera as an input device for a game. For example, going back to the example of thresholding out a specific object, we can find the position of that object and use it to control an on screen object.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M hjh&hubjg)}(hXdef get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # threshold against the color we got before mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # keep only the largest blob of that color connected = mask.connected_component() # make sure the blob is big enough that it isn't just noise if mask.count() > 100: # find the center of the blob coord = mask.centroid() # draw a circle with size variable on the size of the blob pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip()h]hXdef get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # threshold against the color we got before mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # keep only the largest blob of that color connected = mask.connected_component() # make sure the blob is big enough that it isn't just noise if mask.count() > 100: # find the center of the blob coord = mask.centroid() # draw a circle with size variable on the size of the blob pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip()}hjKsbah}(h]h]h]h]h!]h#h$uh%jfh'h(h)Mhjh&hubj)}(h0.. image:: camera_mask.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uritut/camera_mask.jpgj}jjesjcamera_mask.jpguh%jh'h(h)M$hjh&hubh)}(hXThis is just the most basic example. You can track multiple different colored blobs, find the outlines of objects, have collision detection between real life and in game objects, get the angle of an object to allow for even finer control, and more. Have fun!h]hXThis is just the most basic example. You can track multiple different colored blobs, find the outlines of objects, have collision detection between real life and in game objects, get the angle of an object to allow for even finer control, and more. Have fun!}hjhsbah}(h]h]h]h]h!]uh%hh'h(h)M(hjh&hubeh}(h]using-the-mask-moduleah]h]using the mask moduleah]h!]uh%hHhjnh&hh'h(h)M ubeh}(h]basic-computer-visionah]h]basic computer visionah]h!]uh%hHhh]h&hh'h(h)Kubeh}(h]camera-module-introductionah]h]camera module introductionah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h]+pygame-tutorials-camera-module-introductionah]h]-pygame tutorials - camera module introductionah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjjj(j%jjj jjkjhjjj j jjj{jxu nametypes}(jjjj(jj jkjj jj{uh}(jhJjh]jjUj%jjjjjjhj+jjnj jjjjxju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/CameraIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.1741405 pygame-2.6.1/docs/generated/doctrees/tut/ChimpLineByLine.doctree0000644000175100001770000020065014676242421024256 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h7TUTORIAL:Line by Line Descriptions of the Chimp Exampleh]h Text7TUTORIAL:Line by Line Descriptions of the Chimp Example}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceA/home/runner/work/pygame/pygame/docs/reST/tut/ChimpLineByLine.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h-Pygame Tutorials - Line By Line Chimp Exampleh]h-Pygame Tutorials - Line By Line Chimp Example}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hLine By Line Chimph]hLine By Line Chimp}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)Kubh compound)}(hhh]htoctree)}(hhh]h}(h]h]h]h]h!]htut/ChimpLineByLineentries]N tut/chimp.pya includefiles]hamaxdepthJcaptionNglobhidden includehiddennumberedK titlesonly rawentries]uh%hh'h(h)Khhubah}(h]h]toctree-wrapperah]h]h!]uh%hhh]h&hh'h(h)NubhI)}(hhh](hN)}(h Introductionh]h Introduction}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hXIn the *pygame* examples there is a simple example named "chimp". This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame's abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling.h](hIn the }hj$sbh emphasis)}(h*pygame*h]hpygame}hj.sbah}(h]h]h]h]h!]uh%j,hj$ubhX examples there is a simple example named "chimp". This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame's abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling.}hj$sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hThe program and images can be found inside the standard source distribution of pygame. You can run it by running `python -m pygame.examples.chimp` in your terminal.h](hqThe program and images can be found inside the standard source distribution of pygame. You can run it by running }hjFsbh title_reference)}(h!`python -m pygame.examples.chimp`h]hpython -m pygame.examples.chimp}hjPsbah}(h]h]h]h]h!]uh%jNhjFubh in your terminal.}hjFsbeh}(h]h]h]h]h!]uh%hh'h(h)K"hjh&hubh)}(hThis tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out.h]hThis tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out.}hjhsbah}(h]h]h]h]h!]uh%hh'h(h)K&hjh&hubh)}(hThis is an excellent tutorial for people getting their first look at the *pygame* code. Once *pygame* is fully installed, you can find and run the chimp demo for yourself in the examples directory.h](hIThis is an excellent tutorial for people getting their first look at the }hjvsbj-)}(h*pygame*h]hpygame}hj~sbah}(h]h]h]h]h!]uh%j,hjvubh code. Once }hjvsbj-)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j,hjvubh` is fully installed, you can find and run the chimp demo for yourself in the examples directory.}hjvsbeh}(h]h]h]h]h!]uh%hh'h(h)K*hjh&hubh container)}(h.. rst-class:: small-heading (no, this is not a banner ad, it's the screenshot) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source `h](h)}(h2(no, this is not a banner ad, it's the screenshot)h]h2(no, this is not a banner ad, it's the screenshot)}hjsbah}(h]h] small-headingah]h]h!]uh%hh'h(h)K2hjubh image)}(h4.. image:: chimpshot.gif :alt: chimp game banner h]h}(h]h]h]h]h!]altchimp game banneruritut/chimpshot.gif candidates}*js original_uri chimpshot.gifuh%jh'h(h)K4hjubh)}(h:doc:`Full Source `h]h pending_xref)}(hjh]h inline)}(hjh]h Full Source}hjsbah}(h]h](xrefstdstd-doceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoch refdomainjreftypedoc refexplicitrefwarn reftargetchimp.pyuh%jh'h(h)K7hjubah}(h]h]h]h]h!]uh%hh'h(h)K7hjubeh}(h]h]( fullwidthleadingtrailingeh]h]h!]uh%jhjh&hh'h(h)Nubeh}(h] introductionah]h] introductionah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hImport Modulesh]hImport Modules}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K;ubh)}(hThis is the code that imports all the needed modules into your program. It also checks for the availability of some of the optional pygame modules. ::h]hThis is the code that imports all the needed modules into your program. It also checks for the availability of some of the optional pygame modules.}hj#sbah}(h]h]h]h]h!]uh%hh'h(h)K=hjh&hubh literal_block)}(h# Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data")h]h# Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data")}hj3sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)K@hjh&hubh)}(hyFirst, we import the standard "os" python module. This allow us to do things like create platform independent file paths.h]hyFirst, we import the standard "os" python module. This allow us to do things like create platform independent file paths.}hjAsbah}(h]h]h]h]h!]uh%hh'h(h)KMhjh&hubh)}(hIn the next line, we import the pygame package. In our case, we import pygame as ``pg``, so that all of the functionality of pygame is able to be referenced from the namespace ``pg``.h](hQIn the next line, we import the pygame package. In our case, we import pygame as }hjOsbh literal)}(h``pg``h]hpg}hjYsbah}(h]h]h]h]h!]uh%jWhjOubhY, so that all of the functionality of pygame is able to be referenced from the namespace }hjOsbjX)}(h``pg``h]hpg}hjksbah}(h]h]h]h]h!]uh%jWhjOubh.}hjOsbeh}(h]h]h]h]h!]uh%hh'h(h)KPhjh&hubh)}(hX<Some pygame modules are optional, and if they aren't found, they evaluate to ``False``. Because of that, we decide to print a nice warning message if the :mod:`font` or :mod:`mixer ` modules in pygame are not available. (Although they will only be unavailable in very uncommon situations).h](hMSome pygame modules are optional, and if they aren't found, they evaluate to }hjsbjX)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%jWhjubhD. Because of that, we decide to print a nice warning message if the }hjsbj)}(h:mod:`font`h]jX)}(hjh]hfont}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classNj pygame.fontuh%jh'h(h)KThjubh or }hjsbj)}(h:mod:`mixer `h]jX)}(hjh]hmixer}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.mixeruh%jh'h(h)KThjubhk modules in pygame are not available. (Although they will only be unavailable in very uncommon situations).}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KThjh&hubh)}(hX<Lastly, we prepare two paths for the rest of the code to use. ``main_dir`` uses the `os.path` module and the `__file__` variable provided by Python to locate the game's python file, and extract the folder from that path. It then prepares the variable ``data_dir`` to tell the loading functions exactly where to look.h](h>Lastly, we prepare two paths for the rest of the code to use. }hjsbjX)}(h ``main_dir``h]hmain_dir}hjsbah}(h]h]h]h]h!]uh%jWhjubh uses the }hjsbjO)}(h `os.path`h]hos.path}hjsbah}(h]h]h]h]h!]uh%jNhjubh module and the }hjsbjO)}(h `__file__`h]h__file__}hjsbah}(h]h]h]h]h!]uh%jNhjubh variable provided by Python to locate the game's python file, and extract the folder from that path. It then prepares the variable }hjsbjX)}(h ``data_dir``h]hdata_dir}hj+sbah}(h]h]h]h]h!]uh%jWhjubh5 to tell the loading functions exactly where to look.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KZhjh&hubeh}(h]import-modulesah]h]import modulesah]h!]uh%hHhh]h&hh'h(h)K;ubhI)}(hhh](hN)}(hLoading Resourcesh]hLoading Resources}hjNsbah}(h]h]h]h]h!]uh%hMhjKh&hh'h(h)Kbubh)}(hHere we have two functions we can use to load images and sounds. We will look at each function individually in this section. ::h]h|Here we have two functions we can use to load images and sounds. We will look at each function individually in this section.}hj\sbah}(h]h]h]h]h!]uh%hh'h(h)KdhjKh&hubj2)}(hXdef load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect()h]hXdef load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect()}hjjsbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)KghjKh&hubh)}(hThis function takes the name of an image to load. It also optionally takes an argument it can use to set a colorkey for the image, and an argument to scale the image. A colorkey is used in graphics to represent a color of the image that is transparent.h]hThis function takes the name of an image to load. It also optionally takes an argument it can use to set a colorkey for the image, and an argument to scale the image. A colorkey is used in graphics to represent a color of the image that is transparent.}hjxsbah}(h]h]h]h]h!]uh%hh'h(h)KwhjKh&hubh)}(hXThe first thing this function does is create a full pathname to the file. In this example all the resources are in a "data" subdirectory. By using the `os.path.join` function, a pathname will be created that works for whatever platform the game is running on.h](hThe first thing this function does is create a full pathname to the file. In this example all the resources are in a "data" subdirectory. By using the }hjsbjO)}(h`os.path.join`h]h os.path.join}hjsbah}(h]h]h]h]h!]uh%jNhjubh^ function, a pathname will be created that works for whatever platform the game is running on.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K|hjKh&hubh)}(hXGNext we load the image using the :func:`pygame.image.load` function. After the image is loaded, we make an important call to the `convert()` function. This makes a new copy of a Surface and converts its color format and depth to match the display. This means blitting the image to the screen will happen as quickly as possible.h](h!Next we load the image using the }hjsbj)}(h:func:`pygame.image.load`h]jX)}(hjh]hpygame.image.load()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.image.loaduh%jh'h(h)KhjubhG function. After the image is loaded, we make an important call to the }hjsbjO)}(h `convert()`h]h convert()}hjsbah}(h]h]h]h]h!]uh%jNhjubh function. This makes a new copy of a Surface and converts its color format and depth to match the display. This means blitting the image to the screen will happen as quickly as possible.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjKh&hubh)}(hWe then scale the image, using the :func:`pygame.transform.scale` function. This function takes a Surface and the size it should be scaled to. To scale by a scalar, we can get the size and scale the x and y by the scalar.h](h#We then scale the image, using the }hjsbj)}(h:func:`pygame.transform.scale`h]jX)}(hjh]hpygame.transform.scale()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.transform.scaleuh%jh'h(h)Khjubh function. This function takes a Surface and the size it should be scaled to. To scale by a scalar, we can get the size and scale the x and y by the scalar.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjKh&hubh)}(hXLast, we set the colorkey for the image. If the user supplied an argument for the colorkey argument we use that value as the colorkey for the image. This would usually just be a color RGB value, like (255, 255, 255) for white. You can also pass a value of -1 as the colorkey. In this case the function will lookup the color at the topleft pixel of the image, and use that color for the colorkey. ::h]hXLast, we set the colorkey for the image. If the user supplied an argument for the colorkey argument we use that value as the colorkey for the image. This would usually just be a color RGB value, like (255, 255, 255) for white. You can also pass a value of -1 as the colorkey. In this case the function will lookup the color at the topleft pixel of the image, and use that color for the colorkey.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KhjKh&hubj2)}(hXdef load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return soundh]hXdef load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound}hj*sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)KhjKh&hubh)}(hXFNext is the function to load a sound file. The first thing this function does is check to see if the :mod:`pygame.mixer` module was imported correctly. If not, it returns a small class instance that has a dummy play method. This will act enough like a normal Sound object for this game to run without any extra error checking.h](heNext is the function to load a sound file. The first thing this function does is check to see if the }hj8sbj)}(h:mod:`pygame.mixer`h]jX)}(hjBh]h pygame.mixer}hjDsbah}(h]h](jpypy-modeh]h]h!]uh%jWhj@ubah}(h]h]h]h]h!]refdoch refdomainjNreftypemod refexplicitrefwarnjNjNj pygame.mixeruh%jh'h(h)Khj8ubh module was imported correctly. If not, it returns a small class instance that has a dummy play method. This will act enough like a normal Sound object for this game to run without any extra error checking.}hj8sbeh}(h]h]h]h]h!]uh%hh'h(h)KhjKh&hubh)}(hThis function is similar to the image loading function, but handles some different problems. First we create a full path to the sound image, and load the sound file. Then we simply return the loaded Sound object.h]hThis function is similar to the image loading function, but handles some different problems. First we create a full path to the sound image, and load the sound file. Then we simply return the loaded Sound object.}hjjsbah}(h]h]h]h]h!]uh%hh'h(h)KhjKh&hubeh}(h]loading-resourcesah]h]loading resourcesah]h!]uh%hHhh]h&hh'h(h)KbubhI)}(hhh](hN)}(hGame Object Classesh]hGame Object Classes}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hHere we create two classes to represent the objects in our game. Almost all the logic for the game goes into these two classes. We will look over them one at a time here. ::h]hHere we create two classes to represent the objects in our game. Almost all the logic for the game goes into these two classes. We will look over them one at a time here.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj2)}(hXclass Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = Falseh]hXclass Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False}hjsbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)Khjh&hubh)}(hXsHere we create a class to represent the players fist. It is derived from the `Sprite` class included in the :mod:`pygame.sprite` module. The `__init__` function is called when new instances of this class are created. The first thing we do is be sure to call the `__init__` function for our base class. This allows the Sprite's `__init__` function to prepare our object for use as a sprite. This game uses one of the sprite drawing Group classes. These classes can draw sprites that have an "image" and "rect" attribute. By simply changing these two attributes, the renderer will draw the current image at the current position.h](hMHere we create a class to represent the players fist. It is derived from the }hjsbjO)}(h`Sprite`h]hSprite}hjsbah}(h]h]h]h]h!]uh%jNhjubh class included in the }hjsbj)}(h:mod:`pygame.sprite`h]jX)}(hjh]h pygame.sprite}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.spriteuh%jh'h(h)Khjubh module. The }hjsbjO)}(h `__init__`h]h__init__}hjsbah}(h]h]h]h]h!]uh%jNhjubho function is called when new instances of this class are created. The first thing we do is be sure to call the }hjsbjO)}(h `__init__`h]h__init__}hjsbah}(h]h]h]h]h!]uh%jNhjubh7 function for our base class. This allows the Sprite's }hjsbjO)}(h `__init__`h]h__init__}hjsbah}(h]h]h]h]h!]uh%jNhjubhX" function to prepare our object for use as a sprite. This game uses one of the sprite drawing Group classes. These classes can draw sprites that have an "image" and "rect" attribute. By simply changing these two attributes, the renderer will draw the current image at the current position.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXXAll sprites have an `update()` method. This function is typically called once per frame. It is where you should put code that moves and updates the variables for the sprite. The `update()` method for the fist moves the fist to the location of the mouse pointer. It also offsets the fist position slightly if the fist is in the "punching" state.h](hAll sprites have an }hj'sbjO)}(h `update()`h]hupdate()}hj/sbah}(h]h]h]h]h!]uh%jNhj'ubh method. This function is typically called once per frame. It is where you should put code that moves and updates the variables for the sprite. The }hj'sbjO)}(h `update()`h]hupdate()}hjAsbah}(h]h]h]h]h!]uh%jNhj'ubh method for the fist moves the fist to the location of the mouse pointer. It also offsets the fist position slightly if the fist is in the "punching" state.}hj'sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hThe following two functions `punch()` and `unpunch()` change the punching state for the fist. The `punch()` method also returns a true value if the fist is colliding with the given target sprite. ::h](hThe following two functions }hjYsbjO)}(h `punch()`h]hpunch()}hjasbah}(h]h]h]h]h!]uh%jNhjYubh and }hjYsbjO)}(h `unpunch()`h]h unpunch()}hjssbah}(h]h]h]h]h!]uh%jNhjYubh- change the punching state for the fist. The }hjYsbjO)}(h `punch()`h]hpunch()}hjsbah}(h]h]h]h]h!]uh%jNhjYubhX method also returns a true value if the fist is colliding with the given target sprite.}hjYsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj2)}(hXyclass Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.imageh]hXyclass Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image}hjsbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)Khjh&hubh)}(hXThe `Chimp` class is doing a little more work than the fist, but nothing more complex. This class will move the chimp back and forth across the screen. When the monkey is punched, he will spin around to exciting effect. This class is also derived from the base :class:`Sprite ` class, and is initialized the same as the fist. While initializing, the class also sets the attribute "area" to be the size of the display screen.h](hThe }hjsbjO)}(h`Chimp`h]hChimp}hjsbah}(h]h]h]h]h!]uh%jNhjubh class is doing a little more work than the fist, but nothing more complex. This class will move the chimp back and forth across the screen. When the monkey is punched, he will spin around to exciting effect. This class is also derived from the base }hjsbj)}(h&:class:`Sprite `h]jX)}(hjh]hSprite}hjsbah}(h]h](jpypy-classeh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypeclass refexplicitrefwarnjNjNjpygame.sprite.Spriteuh%jh'h(h)Mhjubh class, and is initialized the same as the fist. While initializing, the class also sets the attribute "area" to be the size of the display screen.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXThe `update` function for the chimp simply looks at the current "dizzy" state, which is true when the monkey is spinning from a punch. It calls either the `_spin` or `_walk` method. These functions are prefixed with an underscore. This is just a standard python idiom which suggests these methods should only be used by the `Chimp` class. We could go so far as to give them a double underscore, which would tell python to really try to make them private methods, but we don't need such protection. :)h](hThe }hjsbjO)}(h`update`h]hupdate}hjsbah}(h]h]h]h]h!]uh%jNhjubh function for the chimp simply looks at the current "dizzy" state, which is true when the monkey is spinning from a punch. It calls either the }hjsbjO)}(h`_spin`h]h_spin}hj sbah}(h]h]h]h]h!]uh%jNhjubh or }hjsbjO)}(h`_walk`h]h_walk}hjsbah}(h]h]h]h]h!]uh%jNhjubh method. These functions are prefixed with an underscore. This is just a standard python idiom which suggests these methods should only be used by the }hjsbjO)}(h`Chimp`h]hChimp}hj-sbah}(h]h]h]h]h!]uh%jNhjubh class. We could go so far as to give them a double underscore, which would tell python to really try to make them private methods, but we don't need such protection. :)}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXxThe `_walk` method creates a new position for the monkey by moving the current rect by a given offset. If this new position crosses outside the display area of the screen, it reverses the movement offset. It also mirrors the image using the :func:`pygame.transform.flip` function. This is a crude effect that makes the monkey look like he's turning the direction he is moving.h](hThe }hjEsbjO)}(h`_walk`h]h_walk}hjMsbah}(h]h]h]h]h!]uh%jNhjEubh method creates a new position for the monkey by moving the current rect by a given offset. If this new position crosses outside the display area of the screen, it reverses the movement offset. It also mirrors the image using the }hjEsbj)}(h:func:`pygame.transform.flip`h]jX)}(hjah]hpygame.transform.flip()}hjcsbah}(h]h](jpypy-funceh]h]h!]uh%jWhj_ubah}(h]h]h]h]h!]refdoch refdomainjmreftypefunc refexplicitrefwarnjNjNjpygame.transform.flipuh%jh'h(h)M#hjEubhj function. This is a crude effect that makes the monkey look like he's turning the direction he is moving.}hjEsbeh}(h]h]h]h]h!]uh%hh'h(h)M#hjh&hubh)}(hXThe `_spin` method is called when the monkey is currently "dizzy". The dizzy attribute is used to store the current amount of rotation. When the monkey has rotated all the way around (360 degrees) it resets the monkey image back to the original, non-rotated version. Before calling the :func:`pygame.transform.rotate` function, you'll see the code makes a local reference to the function simply named "rotate". There is no need to do that for this example, it is just done here to keep the following line's length a little shorter. Note that when calling the `rotate` function, we are always rotating from the original monkey image. When rotating, there is a slight loss of quality. Repeatedly rotating the same image and the quality would get worse each time. Also, when rotating an image, the size of the image will actually change. This is because the corners of the image will be rotated out, making the image bigger. We make sure the center of the new image matches the center of the old image, so it rotates without moving.h](hThe }hjsbjO)}(h`_spin`h]h_spin}hjsbah}(h]h]h]h]h!]uh%jNhjubhX method is called when the monkey is currently "dizzy". The dizzy attribute is used to store the current amount of rotation. When the monkey has rotated all the way around (360 degrees) it resets the monkey image back to the original, non-rotated version. Before calling the }hjsbj)}(h:func:`pygame.transform.rotate`h]jX)}(hjh]hpygame.transform.rotate()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.transform.rotateuh%jh'h(h)M)hjubh function, you'll see the code makes a local reference to the function simply named "rotate". There is no need to do that for this example, it is just done here to keep the following line's length a little shorter. Note that when calling the }hjsbjO)}(h`rotate`h]hrotate}hjsbah}(h]h]h]h]h!]uh%jNhjubhX function, we are always rotating from the original monkey image. When rotating, there is a slight loss of quality. Repeatedly rotating the same image and the quality would get worse each time. Also, when rotating an image, the size of the image will actually change. This is because the corners of the image will be rotated out, making the image bigger. We make sure the center of the new image matches the center of the old image, so it rotates without moving.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M)hjh&hubh)}(hThe last method is `punched()` which tells the sprite to enter its dizzy state. This will cause the image to start spinning. It also makes a copy of the current image named "original".h](hThe last method is }hjsbjO)}(h `punched()`h]h punched()}hjsbah}(h]h]h]h]h!]uh%jNhjubh which tells the sprite to enter its dizzy state. This will cause the image to start spinning. It also makes a copy of the current image named "original".}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M8hjh&hubeh}(h]game-object-classesah]h]game object classesah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hInitialize Everythingh]hInitialize Everything}hj sbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)M>ubh)}(hBefore we can do much with pygame, we need to make sure its modules are initialized. In this case we will also open a simple graphics window. Now we are in the `main()` function of the program, which actually runs everything. ::h](hBefore we can do much with pygame, we need to make sure its modules are initialized. In this case we will also open a simple graphics window. Now we are in the }hjsbjO)}(h`main()`h]hmain()}hj sbah}(h]h]h]h]h!]uh%jNhjubh9 function of the program, which actually runs everything.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M@hjh&hubj2)}(hpg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False)h]hpg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False)}hj8sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)MDhjh&hubh)}(hXThe first line to initialize *pygame* takes care of a bit of work for us. It checks through the imported *pygame* modules and attempts to initialize each one of them. It is possible to go back and check if modules failed to initialize, but we won't bother here. It is also possible to take a lot more control and initialize each specific module by hand. That type of control is generally not needed, but is available if you desire.h](hThe first line to initialize }hjFsbj-)}(h*pygame*h]hpygame}hjNsbah}(h]h]h]h]h!]uh%j,hjFubhD takes care of a bit of work for us. It checks through the imported }hjFsbj-)}(h*pygame*h]hpygame}hj`sbah}(h]h]h]h]h!]uh%j,hjFubhX> modules and attempts to initialize each one of them. It is possible to go back and check if modules failed to initialize, but we won't bother here. It is also possible to take a lot more control and initialize each specific module by hand. That type of control is generally not needed, but is available if you desire.}hjFsbeh}(h]h]h]h]h!]uh%hh'h(h)MIhjh&hubh)}(hX*Next we set up the display graphics mode. Note that the :mod:`pygame.display` module is used to control all the display settings. In this case we are asking for a 1280 by 480 window, with the ``SCALED`` display flag. This automatically scales up the window for displays much larger than the window.h](h8Next we set up the display graphics mode. Note that the }hjxsbj)}(h:mod:`pygame.display`h]jX)}(hjh]hpygame.display}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jWhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNjpygame.displayuh%jh'h(h)MPhjxubhs module is used to control all the display settings. In this case we are asking for a 1280 by 480 window, with the }hjxsbjX)}(h ``SCALED``h]hSCALED}hjsbah}(h]h]h]h]h!]uh%jWhjxubh` display flag. This automatically scales up the window for displays much larger than the window.}hjxsbeh}(h]h]h]h]h!]uh%hh'h(h)MPhjh&hubh)}(hX Last we set the window title and turn off the mouse cursor for our window. Very basic to do, and now we have a small black window ready to do our bidding. Usually the cursor defaults to visible, so there is no need to really set the state unless we want to hide it.h]hX Last we set the window title and turn off the mouse cursor for our window. Very basic to do, and now we have a small black window ready to do our bidding. Usually the cursor defaults to visible, so there is no need to really set the state unless we want to hide it.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MVhjh&hubeh}(h]initialize-everythingah]h]initialize everythingah]h!]uh%hHhh]h&hh'h(h)M>ubhI)}(hhh](hN)}(hCreate The Backgroundh]hCreate The Background}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)M]ubh)}(hOur program is going to have text message in the background. It would be nice for us to create a single surface to represent the background and repeatedly use that. The first step is to create the surface. ::h]hOur program is going to have text message in the background. It would be nice for us to create a single surface to represent the background and repeatedly use that. The first step is to create the surface.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M_hjh&hubj2)}(hmbackground = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187))h]hmbackground = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187))}hjsbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)Mchjh&hubh)}(hXThis creates a new surface for us that is the same size as the display window. Note the extra call to `convert()` after creating the Surface. The convert with no arguments will make sure our background is the same format as the display window, which will give us the fastest results.h](hfThis creates a new surface for us that is the same size as the display window. Note the extra call to }hjsbjO)}(h `convert()`h]h convert()}hjsbah}(h]h]h]h]h!]uh%jNhjubh after creating the Surface. The convert with no arguments will make sure our background is the same format as the display window, which will give us the fastest results.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mghjh&hubh)}(hWe also fill the entire background with a certain green color. The fill() function usually takes an RGB triplet as arguments, but supports many input formats. See the :mod:`pygame.Color` for all the color formats.h](hWe also fill the entire background with a certain green color. The fill() function usually takes an RGB triplet as arguments, but supports many input formats. See the }hjsbj)}(h:mod:`pygame.Color`h]jX)}(hj)h]h pygame.Color}hj+sbah}(h]h](jpypy-modeh]h]h!]uh%jWhj'ubah}(h]h]h]h]h!]refdoch refdomainj5reftypemod refexplicitrefwarnjNjNj pygame.Coloruh%jh'h(h)Mlhjubh for all the color formats.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mlhjh&hubeh}(h]create-the-backgroundah]h]create the backgroundah]h!]uh%hHhh]h&hh'h(h)M]ubhI)}(hhh](hN)}(h$Put Text On The Background, Centeredh]h$Put Text On The Background, Centered}hj\sbah}(h]h]h]h]h!]uh%hMhjYh&hh'h(h)Mrubh)}(hNow that we have a background surface, lets get the text rendered to it. We only do this if we see the :mod:`pygame.font` module has imported properly. If not, we just skip this section. ::h](hgNow that we have a background surface, lets get the text rendered to it. We only do this if we see the }hjjsbj)}(h:mod:`pygame.font`h]jX)}(hjth]h pygame.font}hjvsbah}(h]h](jpypy-modeh]h]h!]uh%jWhjrubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.fontuh%jh'h(h)MthjjubhA module has imported properly. If not, we just skip this section.}hjjsbeh}(h]h]h]h]h!]uh%hh'h(h)MthjYh&hubj2)}(hif pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos)h]hif pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos)}hjsbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)MxhjYh&hubh)}(hAs you see, there are a couple steps to getting this done. First we must create the font object and render it into a new surface. We then find the center of that new surface and blit (paste) it onto the background.h]hAs you see, there are a couple steps to getting this done. First we must create the font object and render it into a new surface. We then find the center of that new surface and blit (paste) it onto the background.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M~hjYh&hubh)}(hXThe font is created with the `font` module's `Font()` constructor. Usually you will pass the name of a TrueType font file to this function, but we can also pass `None`, which will use a default font. The `Font` constructor also needs to know the size of font we want to create.h](hThe font is created with the }hjsbjO)}(h`font`h]hfont}hjsbah}(h]h]h]h]h!]uh%jNhjubh module's }hjsbjO)}(h`Font()`h]hFont()}hjsbah}(h]h]h]h]h!]uh%jNhjubhl constructor. Usually you will pass the name of a TrueType font file to this function, but we can also pass }hjsbjO)}(h`None`h]hNone}hjsbah}(h]h]h]h]h!]uh%jNhjubh%, which will use a default font. The }hjsbjO)}(h`Font`h]hFont}hjsbah}(h]h]h]h]h!]uh%jNhjubhC constructor also needs to know the size of font we want to create.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)MhjYh&hubh)}(hWe then render that font into a new surface. The `render` function creates a new surface that is the appropriate size for our text. In this case we are also telling render to create antialiased text (for a nice smooth look) and to use a dark grey color.h](h1We then render that font into a new surface. The }hj sbjO)}(h`render`h]hrender}hj sbah}(h]h]h]h]h!]uh%jNhj ubh function creates a new surface that is the appropriate size for our text. In this case we are also telling render to create antialiased text (for a nice smooth look) and to use a dark grey color.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)MhjYh&hubh)}(hNext we need to find the centered position of the text on our display. We create a "Rect" object from the text dimensions, which allows us to easily assign it to the screen center.h]hNext we need to find the centered position of the text on our display. We create a "Rect" object from the text dimensions, which allows us to easily assign it to the screen center.}hj. sbah}(h]h]h]h]h!]uh%hh'h(h)MhjYh&hubh)}(hRFinally we blit (blit is like a copy or paste) the text onto the background image.h]hRFinally we blit (blit is like a copy or paste) the text onto the background image.}hj< sbah}(h]h]h]h]h!]uh%hh'h(h)MhjYh&hubeh}(h]#put-text-on-the-background-centeredah]h]$put text on the background, centeredah]h!]uh%hHhh]h&hh'h(h)MrubhI)}(hhh](hN)}(h+Display The Background While Setup Finishesh]h+Display The Background While Setup Finishes}hjU sbah}(h]h]h]h]h!]uh%hMhjR h&hh'h(h)Mubh)}(hvWe still have a black window on the screen. Lets show our background while we wait for the other resources to load. ::h]hsWe still have a black window on the screen. Lets show our background while we wait for the other resources to load.}hjc sbah}(h]h]h]h]h!]uh%hh'h(h)MhjR h&hubj2)}(h1screen.blit(background, (0, 0)) pg.display.flip()h]h1screen.blit(background, (0, 0)) pg.display.flip()}hjq sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)MhjR h&hubh)}(h}This will blit our entire background onto the display window. The blit is self explanatory, but what about this flip routine?h]h}This will blit our entire background onto the display window. The blit is self explanatory, but what about this flip routine?}hj sbah}(h]h]h]h]h!]uh%hh'h(h)MhjR h&hubh)}(hX In pygame, changes to the display surface are not immediately visible. Normally, a display must be updated in areas that have changed for them to be visible to the user. In this case the `flip()` function works nicely because it simply handles the entire window area.h](hIn pygame, changes to the display surface are not immediately visible. Normally, a display must be updated in areas that have changed for them to be visible to the user. In this case the }hj sbjO)}(h`flip()`h]hflip()}hj sbah}(h]h]h]h]h!]uh%jNhj ubhH function works nicely because it simply handles the entire window area.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)MhjR h&hubeh}(h]+display-the-background-while-setup-finishesah]h]+display the background while setup finishesah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hPrepare Game Objecth]hPrepare Game Object}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mubh)}(h>Here we create all the objects that the game is going to need.h]h>Here we create all the objects that the game is going to need.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj2)}(hwhiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock()h]hwhiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock()}hj sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)Mhj h&hubh)}(hFirst we load two sound effects using the `load_sound` function we defined above. Then we create an instance of each of our sprite classes. And lastly we create a sprite :class:`Group ` which will contain all our sprites.h](h*First we load two sound effects using the }hj sbjO)}(h `load_sound`h]h load_sound}hj sbah}(h]h]h]h]h!]uh%jNhj ubht function we defined above. Then we create an instance of each of our sprite classes. And lastly we create a sprite }hj sbj)}(h$:class:`Group `h]jX)}(hj h]hGroup}hj sbah}(h]h](jpypy-classeh]h]h!]uh%jWhj ubah}(h]h]h]h]h!]refdoch refdomainj reftypeclass refexplicitrefwarnjNjNjpygame.sprite.Groupuh%jh'h(h)Mhj ubh$ which will contain all our sprites.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXWe actually use a special sprite group named :class:`RenderPlain `. This sprite group can draw all the sprites it contains to the screen. It is called `RenderPlain` because there are actually more advanced Render groups. But for our game, we just need simple drawing. We create the group named "allsprites" by passing a list with all the sprites that should belong in the group. We could later on add or remove sprites from this group, but in this game we won't need to.h](h-We actually use a special sprite group named }hj& sbj)}(h0:class:`RenderPlain `h]jX)}(hj0 h]h RenderPlain}hj2 sbah}(h]h](jpypy-classeh]h]h!]uh%jWhj. ubah}(h]h]h]h]h!]refdoch refdomainj< reftypeclass refexplicitrefwarnjNjNjpygame.sprite.RenderPlainuh%jh'h(h)Mhj& ubhU. This sprite group can draw all the sprites it contains to the screen. It is called }hj& sbjO)}(h `RenderPlain`h]h RenderPlain}hjR sbah}(h]h]h]h]h!]uh%jNhj& ubhX2 because there are actually more advanced Render groups. But for our game, we just need simple drawing. We create the group named "allsprites" by passing a list with all the sprites that should belong in the group. We could later on add or remove sprites from this group, but in this game we won't need to.}hj& sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hThe `clock` object we create will be used to help control our game's framerate. we will use it in the main loop of our game to make sure it doesn't run too fast.h](hThe }hjj sbjO)}(h`clock`h]hclock}hjr sbah}(h]h]h]h]h!]uh%jNhjj ubh object we create will be used to help control our game's framerate. we will use it in the main loop of our game to make sure it doesn't run too fast.}hjj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]prepare-game-objectah]h]prepare game objectah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(h Main Looph]h Main Loop}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mubh)}(h,Nothing much here, just an infinite loop. ::h]h)Nothing much here, just an infinite loop.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj2)}(h,going = True while going: clock.tick(60)h]h,going = True while going: clock.tick(60)}hj sbah}(h]h]h]h]h!]h#h$uh%j1h'h(h)Mhj h&hubh)}(hAll games run in some sort of loop. The usual order of things is to check on the state of the computer and user input, move and update the state of all the objects, and then draw them to the screen. You'll see that this example is no different.h]hAll games run in some sort of loop. The usual order of things is to check on the state of the computer and user input, move and update the state of all the objects, and then draw them to the screen. You'll see that this example is no different.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hvWe also make a call to our `clock` object, which will make sure our game doesn't run faster than 60 frames per second.h](hWe also make a call to our }hj sbjO)}(h`clock`h]hclock}hj sbah}(h]h]h]h]h!]uh%jNhj ubhT object, which will make sure our game doesn't run faster than 60 frames per second.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h] main-loopah]h] main loopah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hHandle All Input Eventsh]hHandle All Input Events}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mubh)}(h?This is an extremely simple case of working the event queue. ::h]h/home/runner/work/pygame/pygame/docs/reST/tut/DisplayModes.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h(Pygame Tutorials - Setting Display Modesh]h(Pygame Tutorials - Setting Display Modes}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hSetting Display Modesh]hSetting Display Modes}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)KubhI)}(hhh](hN)}(h Introductionh]h Introduction}hhsbah}(h]h]h]h]h!]uh%hMhhh&hh'h(h)Kubh)}(hXSetting the display mode in *pygame* creates a visible image surface on the monitor. This surface can either cover the full screen, or be windowed on platforms that support a window manager. The display surface is nothing more than a standard *pygame* surface object. There are special functions needed in the :mod:`pygame.display` module to keep the image surface contents updated on the monitor.h](hSetting the display mode in }hhsbh emphasis)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhhubh creates a visible image surface on the monitor. This surface can either cover the full screen, or be windowed on platforms that support a window manager. The display surface is nothing more than a standard }hhsbj)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhhubh; surface object. There are special functions needed in the }hhsbh pending_xref)}(h:mod:`pygame.display`h]h literal)}(hj/h]hpygame.display}hj3sbah}(h]h](xrefpypy-modeh]h]h!]uh%j1hj-ubah}(h]h]h]h]h!]refdoctut/DisplayModes refdomainj>reftypemod refexplicitrefwarn py:moduleNpy:classN reftargetpygame.displayuh%j+h'h(h)KhhubhB module to keep the image surface contents updated on the monitor.}hhsbeh}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(hXSetting the display mode in *pygame* is an easier task than with most graphic libraries. The advantage is if your display mode is not available, *pygame* will emulate the display mode that you asked for. *Pygame* will select a display resolution and color depth that best matches the settings you have requested, then allow you to access the display with the format you have requested. In reality, since the :mod:`pygame.display` module is a binding around the SDL library, SDL is really doing all this work.h](hSetting the display mode in }hj^sbj)}(h*pygame*h]hpygame}hjfsbah}(h]h]h]h]h!]uh%jhj^ubhm is an easier task than with most graphic libraries. The advantage is if your display mode is not available, }hj^sbj)}(h*pygame*h]hpygame}hjxsbah}(h]h]h]h]h!]uh%jhj^ubh3 will emulate the display mode that you asked for. }hj^sbj)}(h*Pygame*h]hPygame}hjsbah}(h]h]h]h]h!]uh%jhj^ubh will select a display resolution and color depth that best matches the settings you have requested, then allow you to access the display with the format you have requested. In reality, since the }hj^sbj,)}(h:mod:`pygame.display`h]j2)}(hjh]hpygame.display}hjsbah}(h]h](j=pypy-modeh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypemod refexplicitrefwarnjPNjQNjRpygame.displayuh%j+h'h(h)Khj^ubhO module is a binding around the SDL library, SDL is really doing all this work.}hj^sbeh}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(hXThere are advantages and disadvantages to setting the display mode in this manner. The advantage is that if your game requires a specific display mode, your game will run on platforms that do not support your requirements. It also makes life easier when you're getting something started, it is always easy to go back later and make the mode selection a little more particular. The disadvantage is that what you request is not always what you will get. There is also a performance penalty when the display mode must be emulated. This tutorial will help you understand the different methods for querying the platforms display capabilities, and setting the display mode for your game.h]hXThere are advantages and disadvantages to setting the display mode in this manner. The advantage is that if your game requires a specific display mode, your game will run on platforms that do not support your requirements. It also makes life easier when you're getting something started, it is always easy to go back later and make the mode selection a little more particular. The disadvantage is that what you request is not always what you will get. There is also a performance penalty when the display mode must be emulated. This tutorial will help you understand the different methods for querying the platforms display capabilities, and setting the display mode for your game.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K(hhh&hubeh}(h] introductionah]h] introductionah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hSetting Basicsh]hSetting Basics}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K6ubh)}(hXThe first thing to learn about is how to actually set the current display mode. The display mode may be set at any time after the :mod:`pygame.display` module has been initialized. If you have previously set the display mode, setting it again will change the current mode. Setting the display mode is handled with the function :func:`pygame.display.set_mode((width, height), flags, depth) `. If the width and height of the new display mode is not passed, the created surface will have the same size as the current screen resolution. If only the width or height is set to 0, the surface will have the same respective width or height as the screen resolution. Note that in older versions of Pygame using a SDL version prior to 1.2.10, not passing in the width and height will raise an exception. The depth flag is the requested bits per pixel for the surface. If the given depth is 8, *pygame* will create a color-mapped surface. When given a higher bit depth, *pygame* will use a packed color mode. Much more information about depths and color modes can be found in the documentation for the display and surface modules. The default value for depth is 0. When given an argument of 0, *pygame* will select the best bit depth to use, usually the same as the system's current bit depth. The flags argument lets you control extra features for the display mode. Again, more information about this is found in the *pygame* reference documents.h](hThe first thing to learn about is how to actually set the current display mode. The display mode may be set at any time after the }hjsbj,)}(h:mod:`pygame.display`h]j2)}(hjh]hpygame.display}hjsbah}(h]h](j=pypy-modeh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypemod refexplicitrefwarnjPNjQNjRpygame.displayuh%j+h'h(h)K8hjubh module has been initialized. If you have previously set the display mode, setting it again will change the current mode. Setting the display mode is handled with the function }hjsbj,)}(hX:func:`pygame.display.set_mode((width, height), flags, depth) `h]j2)}(hjh]h6pygame.display.set_mode((width, height), flags, depth)}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainj'reftypefunc refexplicitrefwarnjPNjQNjRpygame.display.set_modeuh%j+h'h(h)K8hjubhX. If the width and height of the new display mode is not passed, the created surface will have the same size as the current screen resolution. If only the width or height is set to 0, the surface will have the same respective width or height as the screen resolution. Note that in older versions of Pygame using a SDL version prior to 1.2.10, not passing in the width and height will raise an exception. The depth flag is the requested bits per pixel for the surface. If the given depth is 8, }hjsbj)}(h*pygame*h]hpygame}hj=sbah}(h]h]h]h]h!]uh%jhjubhD will create a color-mapped surface. When given a higher bit depth, }hjsbj)}(h*pygame*h]hpygame}hjOsbah}(h]h]h]h]h!]uh%jhjubh will use a packed color mode. Much more information about depths and color modes can be found in the documentation for the display and surface modules. The default value for depth is 0. When given an argument of 0, }hjsbj)}(h*pygame*h]hpygame}hjasbah}(h]h]h]h]h!]uh%jhjubh will select the best bit depth to use, usually the same as the system's current bit depth. The flags argument lets you control extra features for the display mode. Again, more information about this is found in the }hjsbj)}(h*pygame*h]hpygame}hjssbah}(h]h]h]h]h!]uh%jhjubh reference documents.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K8hjh&hubeh}(h]setting-basicsah]h]setting basicsah]h!]uh%hHhh]h&hh'h(h)K6ubhI)}(hhh](hN)}(h How to Decideh]h How to Decide}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)KTubh)}(hX)So how do you select a display mode that is going to work best with your graphic resources and the platform your game is running on? There are several methods for gathering information about the display device. All of these methods must be called after the display module has been initialized, but you likely want to call them before setting the display mode. First, :func:`pygame.display.Info() ` will return a special object type of VidInfo, which can tell you a lot about the graphics driver capabilities. The function :func:`pygame.display.list_modes(depth, flags, display) ` can be used to find the supported graphic modes by the system. :func:`pygame.display.mode_ok((width, height), flags, depth, display) ` takes the same arguments as :func:`set_mode() `, but returns the closest matching bit depth to the one you request. Lastly, :func:`pygame.display.get_driver() ` will return the name of the graphics driver selected by *pygame*.h](hXoSo how do you select a display mode that is going to work best with your graphic resources and the platform your game is running on? There are several methods for gathering information about the display device. All of these methods must be called after the display module has been initialized, but you likely want to call them before setting the display mode. First, }hjsbj,)}(h3:func:`pygame.display.Info() `h]j2)}(hjh]hpygame.display.Info()}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.Infouh%j+h'h(h)KVhjubh} will return a special object type of VidInfo, which can tell you a lot about the graphics driver capabilities. The function }hjsbj,)}(hT:func:`pygame.display.list_modes(depth, flags, display) `h]j2)}(hjh]h0pygame.display.list_modes(depth, flags, display)}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.list_modesuh%j+h'h(h)KVhjubh@ can be used to find the supported graphic modes by the system. }hjsbj,)}(h_:func:`pygame.display.mode_ok((width, height), flags, depth, display) `h]j2)}(hjh]h>pygame.display.mode_ok((width, height), flags, depth, display)}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.mode_okuh%j+h'h(h)KVhjubh takes the same arguments as }hjsbj,)}(h,:func:`set_mode() `h]j2)}(hjh]h set_mode()}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainj&reftypefunc refexplicitrefwarnjPNjQNjRpygame.display.set_modeuh%j+h'h(h)KVhjubhM, but returns the closest matching bit depth to the one you request. Lastly, }hjsbj,)}(h?:func:`pygame.display.get_driver() `h]j2)}(hj>h]hpygame.display.get_driver()}hj@sbah}(h]h](j=pypy-funceh]h]h!]uh%j1hj<ubah}(h]h]h]h]h!]refdocjJ refdomainjJreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.get_driveruh%j+h'h(h)KVhjubh9 will return the name of the graphics driver selected by }hjsbj)}(h*pygame*h]hpygame}hj`sbah}(h]h]h]h]h!]uh%jhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KVhjh&hubh)}(hXJust remember the golden rule. *Pygame* will work with pretty much any display mode you request. Some display modes will need to be emulated, which will slow your game down, since *pygame* will need to convert every update you make to the "real" display mode. The best bet is to always let *pygame* choose the best bit depth, and convert all your graphic resources to that format when they are loaded. You let *pygame* choose its bit depth by calling :func:`set_mode() ` with no depth argument or a depth of 0, or you can call :func:`mode_ok() ` to find a closest matching bit depth to what you need.h](hJust remember the golden rule. }hjxsbj)}(h*Pygame*h]hPygame}hjsbah}(h]h]h]h]h!]uh%jhjxubh will work with pretty much any display mode you request. Some display modes will need to be emulated, which will slow your game down, since }hjxsbj)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjxubhf will need to convert every update you make to the "real" display mode. The best bet is to always let }hjxsbj)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjxubhp choose the best bit depth, and convert all your graphic resources to that format when they are loaded. You let }hjxsbj)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjxubh! choose its bit depth by calling }hjxsbj,)}(h,:func:`set_mode() `h]j2)}(hjh]h set_mode()}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.set_modeuh%j+h'h(h)Khhjxubh9 with no depth argument or a depth of 0, or you can call }hjxsbj,)}(h*:func:`mode_ok() `h]j2)}(hjh]h mode_ok()}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.mode_okuh%j+h'h(h)Khhjxubh7 to find a closest matching bit depth to what you need.}hjxsbeh}(h]h]h]h]h!]uh%hh'h(h)Khhjh&hubh)}(hX.When your display mode is windowed, you usually must match the same bit depth as the desktop. When you are fullscreen, some platforms can switch to any bit depth that best suits your needs. You can find the depth of the current desktop if you get a VidInfo object before ever setting your display mode.h]hX.When your display mode is windowed, you usually must match the same bit depth as the desktop. When you are fullscreen, some platforms can switch to any bit depth that best suits your needs. You can find the depth of the current desktop if you get a VidInfo object before ever setting your display mode.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Kwhjh&hubh)}(hAfter setting the display mode, you can find out information about its settings by getting a VidInfo object, or by calling any of the Surface.get* methods on the display surface.h]hAfter setting the display mode, you can find out information about its settings by getting a VidInfo object, or by calling any of the Surface.get* methods on the display surface.}hj$sbah}(h]h]h]h]h!]uh%hh'h(h)K~hjh&hubeh}(h] how-to-decideah]h] how to decideah]h!]uh%hHhh]h&hh'h(h)KTubhI)}(hhh](hN)}(h Functionsh]h Functions}hj=sbah}(h]h]h]h]h!]uh%hMhj:h&hh'h(h)Kubh)}(hThese are the routines you can use to determine the most appropriate display mode. You can find more information about these functions in the display module documentation.h]hThese are the routines you can use to determine the most appropriate display mode. You can find more information about these functions in the display module documentation.}hjKsbah}(h]h]h]h]h!]uh%hh'h(h)Khj:h&hubh block_quote)}(hX:func:`pygame.display.mode_ok(size, flags, depth, display) ` This function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation. :func:`pygame.display.list_modes(depth, flags, display) ` Returns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to :any:`FULLSCREEN `\ . If you specify your own flags without :any:`FULLSCREEN `\ , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used. :func:`pygame.display.get_desktop_sizes() ` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable. :func:`pygame.display.Info() ` This function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h](h)}(hT:func:`pygame.display.mode_ok(size, flags, depth, display) `h]j,)}(hjah]j2)}(hjah]h3pygame.display.mode_ok(size, flags, depth, display)}hjfsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjcubah}(h]h]h]h]h!]refdocjJ refdomainjpreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.mode_okuh%j+h'h(h)Khj_ubah}(h]h]h]h]h!]uh%hh'h(h)Khj[ubjZ)}(hXThis function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation. h]h)}(hXThis function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation.h]hXThis function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jYh'h(h)Khj[ubh)}(hT:func:`pygame.display.list_modes(depth, flags, display) `h]j,)}(hjh]j2)}(hjh]h0pygame.display.list_modes(depth, flags, display)}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.list_modesuh%j+h'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj[ubjZ)}(hXReturns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to :any:`FULLSCREEN `\ . If you specify your own flags without :any:`FULLSCREEN `\ , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used. h]h)}(hXReturns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to :any:`FULLSCREEN `\ . If you specify your own flags without :any:`FULLSCREEN `\ , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used.h](hReturns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to }hjsbj,)}(h+:any:`FULLSCREEN `h]j2)}(hjh]h FULLSCREEN}hjsbah}(h]h](j=anyeh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainhreftypej refexplicitrefwarnjRpygame.display.set_modeuh%j+h'h(h)Khjubh* . If you specify your own flags without }hjsbj,)}(h+:any:`FULLSCREEN `h]j2)}(hjh]h FULLSCREEN}hjsbah}(h]h](j=anyeh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainhreftypej refexplicitrefwarnjRpygame.display.set_modeuh%j+h'h(h)Khjubh , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jYh'h(h)Khj[ubh definition_list)}(hhh]h definition_list_item)}(hX#:func:`pygame.display.get_desktop_sizes() ` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable. h](h term)}(hM:func:`pygame.display.get_desktop_sizes() `h]j,)}(hj4h]j2)}(hj4h]h"pygame.display.get_desktop_sizes()}hj9sbah}(h]h](j=pypy-funceh]h]h!]uh%j1hj6ubah}(h]h]h]h]h!]refdocjJ refdomainjCreftypefunc refexplicitrefwarnjPNjQNjR pygame.display.get_desktop_sizesuh%j+h'h(h)Khj2ubah}(h]h]h]h]h!]uh%j0h'h(h)Khj,ubh definition)}(hhh]h)}(hThis function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable.h]hThis function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable.}hj`sbah}(h]h]h]h]h!]uh%hh'h(h)Khj]ubah}(h]h]h]h]h!]uh%j[h'h(h)Khj,ubeh}(h]h]h]h]h!]uh%j*h'h(h)Khj'ubah}(h]h]h]h]h!]uh%j%h'h(h)Khj[ubh)}(h3:func:`pygame.display.Info() `h]j,)}(hjh]j2)}(hjh]hpygame.display.Info()}hjsbah}(h]h](j=pypy-funceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypefunc refexplicitrefwarnjPNjQNjRpygame.display.Infouh%j+h'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj[ubjZ)}(hXThis function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h](h)}(hThis function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object. ::h]hThis function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubh literal_block)}(hX>>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h]hX>>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) }hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjubeh}(h]h]h]h]h!]uh%jYh'h(h)Khj[ubeh}(h]h]h]h]h!]uh%jYh'h(h)Khj:h&hubh)}(hEYou can test all these flags as simply members of the VidInfo object.h]hEYou can test all these flags as simply members of the VidInfo object.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj:h&hubeh}(h] functionsah]h] functionsah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hExamplesh]hExamples}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hHere are some examples of different methods to init the graphics display. They should help you get an idea of how to go about setting your display mode. ::h]hHere are some examples of different methods to init the graphics display. They should help you get an idea of how to go about setting your display mode.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj)}(hXN>>> # give me the best depth with a 640 x 480 windowed display >>> pygame.display.set_mode((640, 480)) >>> # give me the biggest 16-bit display available >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit not supported') ... else: ... print('Found Resolution:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> # need an 8-bit surface, nothing else will do >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Can only work with an 8-bit display, sorry') ... else: ... pygame.display.set_mode((800, 600), 0, 8)h]hXN>>> # give me the best depth with a 640 x 480 windowed display >>> pygame.display.set_mode((640, 480)) >>> # give me the biggest 16-bit display available >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit not supported') ... else: ... print('Found Resolution:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> # need an 8-bit surface, nothing else will do >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Can only work with an 8-bit display, sorry') ... else: ... pygame.display.set_mode((800, 600), 0, 8)}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubeh}(h]examplesah]h]examplesah]h!]uh%hHhh]h&hh'h(h)Kubeh}(h]setting-display-modesah]h]setting display modesah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h]&pygame-tutorials-setting-display-modesah]h](pygame tutorials - setting display modesah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj\error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j/j,j'j$jjjjj7j4jjjju nametypes}(j/j'jjj7jjuh}(j,hJj$h]jhjjj4jjj:jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/DisplayModes.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.2021406 pygame-2.6.1/docs/generated/doctrees/tut/ImportInit.doctree0000644000175100001770000002517514676242421023410 0ustar00runnerdockerr*sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hTUTORIAL:Import and Initializeh]h TextTUTORIAL:Import and Initialize}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource`h](h1. }hhsbh pending_xref)}(h!:ref:`Introduction `h]h inline)}(hhh]h Introduction}hhsbah}(h]h](xrefstdstd-refeh]h]h!]uh%hhhubah}(h]h]h]h]h!]refdoch~ refdomainhˌreftyperef refexplicitrefwarn reftarget makegames-1uh%hh'h(h)Khhubeh}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh block_quote)}(h5\1.1. :ref:`A note on coding styles ` h]h)}(h4\1.1. :ref:`A note on coding styles `h](h1.1. }hhsbh)}(h.:ref:`A note on coding styles `h]h)}(hhh]hA note on coding styles}hhsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhhubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-1-1uh%hh'h(h)Khhubeh}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(h6\2. :ref:`Revision: Pygame fundamentals `h](h2. }hjsbh)}(h2:ref:`Revision: Pygame fundamentals `h]h)}(hj(h]hRevision: Pygame fundamentals}hj*sbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhj&ubah}(h]h]h]h]h!]refdoch~ refdomainj4reftyperef refexplicitrefwarnh܌ makegames-2uh%hh'h(h)Khjubeh}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(h\2.1. :ref:`The basic pygame game ` \2.2. :ref:`Basic pygame objects ` \2.3. :ref:`Blitting ` \2.4. :ref:`The event loop ` \2.5. :ref:`Ta-da! ` h](h)}(h2\2.1. :ref:`The basic pygame game `h](h2.1. }hjPsbh)}(h,:ref:`The basic pygame game `h]h)}(hjZh]hThe basic pygame game}hj\sbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjXubah}(h]h]h]h]h!]refdoch~ refdomainjfreftyperef refexplicitrefwarnh܌ makegames-2-1uh%hh'h(h)K hjPubeh}(h]h]h]h]h!]uh%hh'h(h)K hjLubh)}(h1\2.2. :ref:`Basic pygame objects `h](h2.2. }hj~sbh)}(h+:ref:`Basic pygame objects `h]h)}(hjh]hBasic pygame objects}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-2-2uh%hh'h(h)K"hj~ubeh}(h]h]h]h]h!]uh%hh'h(h)K"hjLubh)}(h%\2.3. :ref:`Blitting `h](h2.3. }hjsbh)}(h:ref:`Blitting `h]h)}(hjh]hBlitting}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-2-3uh%hh'h(h)K$hjubeh}(h]h]h]h]h!]uh%hh'h(h)K$hjLubh)}(h+\2.4. :ref:`The event loop `h](h2.4. }hjsbh)}(h%:ref:`The event loop `h]h)}(hjh]hThe event loop}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-2-4uh%hh'h(h)K&hjubeh}(h]h]h]h]h!]uh%hh'h(h)K&hjLubh)}(h#\2.5. :ref:`Ta-da! `h](h2.5. }hjsbh)}(h:ref:`Ta-da! `h]h)}(hjh]hTa-da!}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-2-5uh%hh'h(h)K(hjubeh}(h]h]h]h]h!]uh%hh'h(h)K(hjLubeh}(h]h]h]h]h!]uh%hh'h(h)K hhh&hubh)}(h+\3. :ref:`Kicking things off `h](h3. }hj<sbh)}(h':ref:`Kicking things off `h]h)}(hjFh]hKicking things off}hjHsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjDubah}(h]h]h]h]h!]refdoch~ refdomainjRreftyperef refexplicitrefwarnh܌ makegames-3uh%hh'h(h)K*hj<ubeh}(h]h]h]h]h!]uh%hh'h(h)K*hhh&hubh)}(h|\3.1. :ref:`The first lines, and loading modules ` \3.2. :ref:`Resource handling functions ` h](h)}(hA\3.1. :ref:`The first lines, and loading modules `h](h3.1. }hjnsbh)}(h;:ref:`The first lines, and loading modules `h]h)}(hjxh]h$The first lines, and loading modules}hjzsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjvubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-3-1uh%hh'h(h)K,hjnubeh}(h]h]h]h]h!]uh%hh'h(h)K,hjjubh)}(h8\3.2. :ref:`Resource handling functions `h](h3.2. }hjsbh)}(h2:ref:`Resource handling functions `h]h)}(hjh]hResource handling functions}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-3-2uh%hh'h(h)K.hjubeh}(h]h]h]h]h!]uh%hh'h(h)K.hjjubeh}(h]h]h]h]h!]uh%hh'h(h)K,hhh&hubh)}(h,\4. :ref:`Game object classes `h](h4. }hjsbh)}(h(:ref:`Game object classes `h]h)}(hjh]hGame object classes}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-4uh%hh'h(h)K0hjubeh}(h]h]h]h]h!]uh%hh'h(h)K0hhh&hubh)}(h\4.1. :ref:`A simple ball class ` \4.1.1. :ref:`Diversion 1: Sprites ` \4.1.2. :ref:`Diversion 2: Vector physics ` h](h)}(h0\4.1. :ref:`A simple ball class `h](h4.1. }hjsbh)}(h*:ref:`A simple ball class `h]h)}(hj h]hA simple ball class}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhj ubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-4-1uh%hh'h(h)K2hjubeh}(h]h]h]h]h!]uh%hh'h(h)K2hjubh)}(ht\4.1.1. :ref:`Diversion 1: Sprites ` \4.1.2. :ref:`Diversion 2: Vector physics ` h](h)}(h5\4.1.1. :ref:`Diversion 1: Sprites `h](h4.1.1. }hj4sbh)}(h-:ref:`Diversion 1: Sprites `h]h)}(hj>h]hDiversion 1: Sprites}hj@sbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhj<ubah}(h]h]h]h]h!]refdoch~ refdomainjJreftyperef refexplicitrefwarnh܌makegames-4-1-1uh%hh'h(h)K4hj4ubeh}(h]h]h]h]h!]uh%hh'h(h)K4hj0ubh)}(h<\4.1.2. :ref:`Diversion 2: Vector physics `h](h4.1.2. }hjbsbh)}(h4:ref:`Diversion 2: Vector physics `h]h)}(hjlh]hDiversion 2: Vector physics}hjnsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjjubah}(h]h]h]h]h!]refdoch~ refdomainjxreftyperef refexplicitrefwarnh܌makegames-4-1-2uh%hh'h(h)K6hjbubeh}(h]h]h]h]h!]uh%hh'h(h)K6hj0ubeh}(h]h]h]h]h!]uh%hh'h(h)K4hjubeh}(h]h]h]h]h!]uh%hh'h(h)K2hhh&hubh)}(h2\5. :ref:`User-controllable objects `h](h5. }hjsbh)}(h.:ref:`User-controllable objects `h]h)}(hjh]hUser-controllable objects}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-5uh%hh'h(h)K8hjubeh}(h]h]h]h]h!]uh%hh'h(h)K8hhh&hubh)}(ho\5.1. :ref:`A simple bat class ` \5.1.1. :ref:`Diversion 3: Pygame events ` h](h)}(h/\5.1. :ref:`A simple bat class `h](h5.1. }hjsbh)}(h):ref:`A simple bat class `h]h)}(hjh]hA simple bat class}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-5-1uh%hh'h(h)K:hjubeh}(h]h]h]h]h!]uh%hh'h(h)K:hjubh)}(h<\5.1.1. :ref:`Diversion 3: Pygame events ` h]h)}(h;\5.1.1. :ref:`Diversion 3: Pygame events `h](h5.1.1. }hjsbh)}(h3:ref:`Diversion 3: Pygame events `h]h)}(hj h]hDiversion 3: Pygame events}hj sbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌makegames-5-1-1uh%hh'h(h)K`h](h6. }hj:sbh)}(h,:ref:`Putting it all together `h]h)}(hjDh]hPutting it all together}hjFsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjBubah}(h]h]h]h]h!]refdoch~ refdomainjPreftyperef refexplicitrefwarnh܌ makegames-6uh%hh'h(h)K>hj:ubeh}(h]h]h]h]h!]uh%hh'h(h)K>hhh&hubh)}(h\6.1. :ref:`Let the ball hit sides ` \6.2. :ref:`Let the ball hit bats ` \6.3. :ref:`The Finished product ` h](h)}(h3\6.1. :ref:`Let the ball hit sides `h](h6.1. }hjlsbh)}(h-:ref:`Let the ball hit sides `h]h)}(hjvh]hLet the ball hit sides}hjxsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjtubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-6-1uh%hh'h(h)K@hjlubeh}(h]h]h]h]h!]uh%hh'h(h)K@hjhubh)}(h2\6.2. :ref:`Let the ball hit bats `h](h6.2. }hjsbh)}(h,:ref:`Let the ball hit bats `h]h)}(hjh]hLet the ball hit bats}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-6-2uh%hh'h(h)KBhjubeh}(h]h]h]h]h!]uh%hh'h(h)KBhjhubh)}(h1\6.3. :ref:`The Finished product `h](h6.3. }hjsbh)}(h+:ref:`The Finished product `h]h)}(hjh]hThe Finished product}hjsbah}(h]h](hʌstdstd-refeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoch~ refdomainjreftyperef refexplicitrefwarnh܌ makegames-6-3uh%hh'h(h)KDhjubeh}(h]h]h]h]h!]uh%hh'h(h)KDhjhubeh}(h]h]h]h]h!]uh%hh'h(h)K@hhh&hubh target)}(h.. _makegames-1:h]h}(h]h]h]h]h!]refid makegames-1uh%jh)Kehhh&hh'h(ubeh}(h]table-of-contentsah]h]table of contentsah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(h1. Introductionh]h1. Introduction}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)KJubh)}(hX\First of all, I will assume you have read the :doc:`Line By Line Chimp ` tutorial, which introduces the basics of Python and pygame. Give it a read before reading this tutorial, as I won't bother repeating what that tutorial says (or at least not in as much detail). This tutorial is aimed at those who understand how to make a ridiculously simple little "game", and who would like to make a relatively simple game like Pong. It introduces you to some concepts of game design, some simple mathematics to work out ball physics, and some ways to keep your game easy to maintain and expand.h](h.First of all, I will assume you have read the }hj#sbh)}(h+:doc:`Line By Line Chimp `h]h)}(hj-h]hLine By Line Chimp}hj/sbah}(h]h](hʌstdstd-doceh]h]h!]uh%hhj+ubah}(h]h]h]h]h!]refdoch~ refdomainj9reftypedoc refexplicitrefwarnh܌ChimpLineByLineuh%hh'h(h)KLhj#ubhX tutorial, which introduces the basics of Python and pygame. Give it a read before reading this tutorial, as I won't bother repeating what that tutorial says (or at least not in as much detail). This tutorial is aimed at those who understand how to make a ridiculously simple little "game", and who would like to make a relatively simple game like Pong. It introduces you to some concepts of game design, some simple mathematics to work out ball physics, and some ways to keep your game easy to maintain and expand.}hj#sbeh}(h]h]h]h]h!]uh%hh'h(h)KLhjh&hubh)}(hX#All the code in this tutorial works toward implementing `TomPong `_, a game I've written. By the end of the tutorial, you should not only have a firmer grasp of pygame, but you should also understand how TomPong works, and how to make your own version.h](h8All the code in this tutorial works toward implementing }hjUsbh reference)}(h2`TomPong `_h]hTomPong}(hj_hTomPongubah}(h]h]h]h]h!]namejgrefuri%http://tomchance.org.uk/projects/ponguh%j]hjUubj)}(h( h]h}(h]tompongah]h]tompongah]h!]refurijpuh%j referencedKhjUubh, a game I've written. By the end of the tutorial, you should not only have a firmer grasp of pygame, but you should also understand how TomPong works, and how to make your own version.}hjUsbeh}(h]h]h]h]h!]uh%hh'h(h)KShjh&hubh)}(hNow, for a brief recap of the basics of pygame. A common method of organising the code for a game is to divide it into the following six sections:h]hNow, for a brief recap of the basics of pygame. A common method of organising the code for a game is to divide it into the following six sections:}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KWhjh&hubh)}(hX- **Load modules** which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself - **Resource handling classes**; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have. - **Game object classes**; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class. - **Any other game functions**; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function. - **Initialise the game**, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in. - **The main loop**, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen. h]h bullet_list)}(hhh](h list_item)}(h**Load modules** which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself h]h)}(h**Load modules** which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itselfh](h strong)}(h**Load modules**h]h Load modules}hjsbah}(h]h]h]h]h!]uh%jhjubh which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KZhjubah}(h]h]h]h]h!]uh%jh'h(h)KZhjubj)}(hX**Resource handling classes**; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have. h]h)}(h**Resource handling classes**; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have.h](j)}(h**Resource handling classes**h]hResource handling classes}hjsbah}(h]h]h]h]h!]uh%jhjubh; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K]hjubah}(h]h]h]h]h!]uh%jh'h(h)K]hjubj)}(hXc**Game object classes**; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class. h]h)}(hXb**Game object classes**; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class.h](j)}(h**Game object classes**h]hGame object classes}hjsbah}(h]h]h]h]h!]uh%jhjubhXK; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kahjubah}(h]h]h]h]h!]uh%jh'h(h)Kahjubj)}(hXK**Any other game functions**; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function. h]h)}(hXJ**Any other game functions**; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function.h](j)}(h**Any other game functions**h]hAny other game functions}hjsbah}(h]h]h]h]h!]uh%jhjubhX.; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kfhjubah}(h]h]h]h]h!]uh%jh'h(h)Kfhjubj)}(h**Initialise the game**, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in. h]h)}(h**Initialise the game**, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in.h](j)}(h**Initialise the game**h]hInitialise the game}hjDsbah}(h]h]h]h]h!]uh%jhj@ubh, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in.}hj@sbeh}(h]h]h]h]h!]uh%hh'h(h)Kjhj<ubah}(h]h]h]h]h!]uh%jh'h(h)Kjhjubj)}(h**The main loop**, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen. h]h)}(h**The main loop**, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen.h](j)}(h**The main loop**h]h The main loop}hjjsbah}(h]h]h]h]h!]uh%jhjfubh, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen.}hjfsbeh}(h]h]h]h]h!]uh%hh'h(h)Kmhjbubah}(h]h]h]h]h!]uh%jh'h(h)Kmhjubeh}(h]h]h]h]h!]bullet-uh%jh'h(h)KZhjubah}(h]h]h]h]h!]uh%hh'h(h)KZhjh&hubh)}(hXEvery game you make will have some or all of those sections, possibly with more of your own. For the purposes of this tutorial, I will write about how TomPong is laid out, and the ideas I write about can be transferred to almost any kind of game you might make. I will also assume that you want to keep all of the code in a single file, but if you're making a reasonably large game, it's often a good idea to source certain sections into module files. Putting the game object classes into a file called ``objects.py``, for example, can help you keep game logic separate from game objects. If you have a lot of resource handling code, it can also be handy to put that into ``resources.py``. You can then :code:`from objects,resources import *` to import all of the classes and functions.h](hXEvery game you make will have some or all of those sections, possibly with more of your own. For the purposes of this tutorial, I will write about how TomPong is laid out, and the ideas I write about can be transferred to almost any kind of game you might make. I will also assume that you want to keep all of the code in a single file, but if you're making a reasonably large game, it's often a good idea to source certain sections into module files. Putting the game object classes into a file called }hjsbh literal)}(h``objects.py``h]h objects.py}hjsbah}(h]h]h]h]h!]uh%jhjubh, for example, can help you keep game logic separate from game objects. If you have a lot of resource handling code, it can also be handy to put that into }hjsbj)}(h``resources.py``h]h resources.py}hjsbah}(h]h]h]h]h!]uh%jhjubh. You can then }hjsbj)}(h':code:`from objects,resources import *`h]hfrom objects,resources import *}hjsbah}(h]h]codeah]h]h!]languagehuh%jhjubh, to import all of the classes and functions.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kphjh&hubj)}(h.. _makegames-1-1:h]h}(h]h]h]h]h!]j makegames-1-1uh%jh)Khjh&hh'h(ubeh}(h]( introductionj eh]h](1. introduction makegames-1eh]h!]uh%hHhh]h&hh'h(h)KJexpect_referenced_by_name}jjsexpect_referenced_by_id}j jsubhI)}(hhh](hN)}(h1.1. A note on coding stylesh]h1.1. A note on coding styles}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K|ubh)}(hXThe first thing to remember when approaching any programming project is to decide on a coding style, and stay consistent. Python solves a lot of the problems because of its strict interpretation of whitespace and indentation, but you can still choose the size of your indentations, whether you put each module import on a new line, how you comment code, etc. You'll see how I do all of this in the code examples; you needn't use my style, but whatever style you adopt, use it all the way through the program code. Also try to document all of your classes, and comment on any bits of code that seem obscure, though don't start commenting the obvious. I've seen plenty of people do the following::h]hXThe first thing to remember when approaching any programming project is to decide on a coding style, and stay consistent. Python solves a lot of the problems because of its strict interpretation of whitespace and indentation, but you can still choose the size of your indentations, whether you put each module import on a new line, how you comment code, etc. You'll see how I do all of this in the code examples; you needn't use my style, but whatever style you adopt, use it all the way through the program code. Also try to document all of your classes, and comment on any bits of code that seem obscure, though don't start commenting the obvious. I've seen plenty of people do the following:}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K~hjh&hubh literal_block)}(h>player1.score += scoreup # Add scoreup to player1 scoreh]h>player1.score += scoreup # Add scoreup to player1 score}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubh)}(hThe worst code is poorly laid out, with seemingly random changes in style, and poor documentation. Poor code is not only annoying for other people, but it also makes it difficult for you to maintain.h]hThe worst code is poorly laid out, with seemingly random changes in style, and poor documentation. Poor code is not only annoying for other people, but it also makes it difficult for you to maintain.}hj%sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h](a-note-on-coding-stylesjeh]h](1.1. a note on coding styles makegames-1-1eh]h!]uh%hHhh]h&hh'h(h)K|j}j9jsj}jjsubeh}(h]id1ah]h]h]making games with pygameah!]uh%hHhhJh&hh'h(h)K j~ubeh}(h]making-games-with-pygameah]h]h]jDah!]uh%hHhhh&hh'h(h)Kj~ubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjwerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(j ]jaj]jaunameids}(making games with pygameNjj jj jjjzjwj9jj8j5u nametypes}(jjjjjzj9j8uh}(jHhJj@h]j hj jjjjwjqjjj5ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]h system_message)}(hhh]h)}(h;Duplicate implicit target name: "making games with pygame".h]h;Duplicate implicit target name: "making games with pygame".}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]j@alevelKtypeINFOsourceh(lineK uh%jhh]h&hh'h(h)K ubatransform_messages](j)}(hhh]h)}(hhh]h1Hyperlink target "makegames-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypejsourceh(lineKeuh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-1-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypejsourceh(lineKuh%jube transformerN include_log]docs/reST/tut/MakeGames.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.2461405 pygame-2.6.1/docs/generated/doctrees/tut/MoveIt.doctree0000644000175100001770000017707314676242421022522 0ustar00runnerdocker0sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h&TUTORIAL:Help! How Do I Move An Image?h]h Text&TUTORIAL:Help! How Do I Move An Image?}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource8/home/runner/work/pygame/pygame/docs/reST/tut/MoveIt.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h0Pygame Tutorials - Help! How Do I Move An Image?h]h0Pygame Tutorials - Help! How Do I Move An Image?}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hHelp! How Do I Move An Image?h]hHelp! How Do I Move An Image?}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)Kubh)}(hXaMany people new to programming and graphics have a hard time figuring out how to make an image move around the screen. Without understanding all the concepts, it can be very confusing. You're not the first person to be stuck here, I'll do my best to take things step by step. We'll even try to end with methods of keeping your animations efficient.h]hXaMany people new to programming and graphics have a hard time figuring out how to make an image move around the screen. Without understanding all the concepts, it can be very confusing. You're not the first person to be stuck here, I'll do my best to take things step by step. We'll even try to end with methods of keeping your animations efficient.}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubh)}(hNote that we won't be teaching you to program with python in this article, just introduce you to some of the basics with pygame.h]hNote that we won't be teaching you to program with python in this article, just introduce you to some of the basics with pygame.}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubhI)}(hhh](hN)}(hJust Pixels On The Screenh]hJust Pixels On The Screen}hj sbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hPygame has a display Surface. This is basically an image that is visible on the screen, and the image is made up of pixels. The main way you change these pixels is by calling the blit() function. This copies the pixels from one image onto another.h]hPygame has a display Surface. This is basically an image that is visible on the screen, and the image is made up of pixels. The main way you change these pixels is by calling the blit() function. This copies the pixels from one image onto another.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXThis is the first thing to understand. When you blit an image onto the screen, you are simply changing the color of the pixels on the screen. Pixels aren't added or moved, we just change the colors of the pixels already on the screen. These images you blit to the screen are also Surfaces in pygame, but they are in no way connected to the display Surface. When they are blitted to the screen they are copied into the display, but you still have a unique copy of the original.h]hXThis is the first thing to understand. When you blit an image onto the screen, you are simply changing the color of the pixels on the screen. Pixels aren't added or moved, we just change the colors of the pixels already on the screen. These images you blit to the screen are also Surfaces in pygame, but they are in no way connected to the display Surface. When they are blitted to the screen they are copied into the display, but you still have a unique copy of the original.}hj'sbah}(h]h]h]h]h!]uh%hh'h(h)K$hjh&hubh)}(hXWith this brief description. Perhaps you can already understand what is needed to "move" an image. We don't actually move anything at all. We simply blit the image in a new position. But before we draw the image in the new position, we'll need to "erase" the old one. Otherwise the image will be visible in two places on the screen. By rapidly erasing the image and redrawing it in a new place, we achieve the "illusion" of movement.h]hXWith this brief description. Perhaps you can already understand what is needed to "move" an image. We don't actually move anything at all. We simply blit the image in a new position. But before we draw the image in the new position, we'll need to "erase" the old one. Otherwise the image will be visible in two places on the screen. By rapidly erasing the image and redrawing it in a new place, we achieve the "illusion" of movement.}hj5sbah}(h]h]h]h]h!]uh%hh'h(h)K,hjh&hubh)}(hXThrough the rest of this tutorial we will break this process down into simpler steps. Even explaining the best ways to have multiple images moving around the screen. You probably already have questions. Like, how do we "erase" the image before drawing it in a new position? Perhaps you're still totally lost? Well hopefully the rest of this tutorial can straighten things out for you.h]hXThrough the rest of this tutorial we will break this process down into simpler steps. Even explaining the best ways to have multiple images moving around the screen. You probably already have questions. Like, how do we "erase" the image before drawing it in a new position? Perhaps you're still totally lost? Well hopefully the rest of this tutorial can straighten things out for you.}hjCsbah}(h]h]h]h]h!]uh%hh'h(h)K3hjh&hubeh}(h]just-pixels-on-the-screenah]h]just pixels on the screenah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hLet's Go Back A Steph]hLet's Go Back A Step}hj\sbah}(h]h]h]h]h!]uh%hMhjYh&hh'h(h)KhjYh&hubh)}(hbSo let's begin by creating our screen list and fill it with a beautiful landscape of 1s and 2s. ::h]h_So let's begin by creating our screen list and fill it with a beautiful landscape of 1s and 2s.}hjxsbah}(h]h]h]h]h!]uh%hh'h(h)KEhjYh&hubh literal_block)}(hD>>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1]h]hD>>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KHhjYh&hubh)}(hNow we've created our background. It's not going to be very exciting unless we also draw a player on the screen. We'll create a mighty hero that looks like the number 8. Let's stick him near the middle of the map and see what it looks like. ::h]hNow we've created our background. It's not going to be very exciting unless we also draw a player on the screen. We'll create a mighty hero that looks like the number 8. Let's stick him near the middle of the map and see what it looks like.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KMhjYh&hubj)}(h6>>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]h6>>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KRhjYh&hubh)}(hXThis might have been as far as you've gotten if you jumped right in doing some graphics programming with pygame. You've got some nice looking stuff on the screen, but it cannot move anywhere. Perhaps now that our screen is just a list of numbers, it's easier to see how to move him?h]hXThis might have been as far as you've gotten if you jumped right in doing some graphics programming with pygame. You've got some nice looking stuff on the screen, but it cannot move anywhere. Perhaps now that our screen is just a list of numbers, it's easier to see how to move him?}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KWhjYh&hubeh}(h]let-s-go-back-a-stepah]h]let's go back a stepah]h!]uh%hHhh]h&hh'h(h)K>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]hP>>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kdhjh&hubh)}(hNow it is pretty easy to move him to a new position. We simply change the value of playerpos, and draw him on the screen again. ::h]hNow it is pretty easy to move him to a new position. We simply change the value of playerpos, and draw him on the screen again.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Kjhjh&hubj)}(h\>>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1]h]h\>>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kmhjh&hubh)}(hX?Whoops. Now we can see two heroes. One in the old position, and one in his new position. This is exactly the reason we need to "erase" the hero in his old position before we draw him in the new position. To erase him, we need to change that value in the list back to what it was before the hero was there. That means we need to keep track of the values on the screen before the hero replaced them. There's several ways you could do this, but the easiest is usually to keep a separate copy of the screen background. This means we need to make some changes to our little game.h]hX?Whoops. Now we can see two heroes. One in the old position, and one in his new position. This is exactly the reason we need to "erase" the hero in his old position before we draw him in the new position. To erase him, we need to change that value in the list back to what it was before the hero was there. That means we need to keep track of the values on the screen before the hero replaced them. There's several ways you could do this, but the easiest is usually to keep a separate copy of the screen background. This means we need to make some changes to our little game.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Kshjh&hubeh}(h]making-the-hero-moveah]h]making the hero moveah]h!]uh%hHhh]h&hh'h(h)K^ubhI)}(hhh](hN)}(hCreating A Maph]hCreating A Map}hj*sbah}(h]h]h]h]h!]uh%hMhj'h&hh'h(h)K~ubh)}(hX"What we want to do is create a separate list we will call our background. We will create the background so it looks like our original screen did, with 1s and 2s. Then we will copy each item from the background to the screen. After that we can finally draw our hero back onto the screen. ::h]hXWhat we want to do is create a separate list we will call our background. We will create the background so it looks like our original screen did, with 1s and 2s. Then we will copy each item from the background to the screen. After that we can finally draw our hero back onto the screen.}hj8sbah}(h]h]h]h]h!]uh%hh'h(h)Khj'h&hubj)}(hX>>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #a new blank screen >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]hX>>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #a new blank screen >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjFsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj'h&hubh)}(hIt may seem like a lot of extra work. We're no farther off than we were before the last time we tried to make him move. But this time we have the extra information we need to move him properly.h]hIt may seem like a lot of extra work. We're no farther off than we were before the last time we tried to make him move. But this time we have the extra information we need to move him properly.}hjTsbah}(h]h]h]h]h!]uh%hh'h(h)Khj'h&hubeh}(h]creating-a-mapah]h]creating a mapah]h!]uh%hHhh]h&hh'h(h)K~ubhI)}(hhh](hN)}(hMaking The Hero Move (Take 2)h]hMaking The Hero Move (Take 2)}hjmsbah}(h]h]h]h]h!]uh%hMhjjh&hh'h(h)Kubh)}(hThis time it will be easy to move the hero around. First we will erase the hero from his old position. We do this by copying the correct value from the background onto the screen. Then we will draw the character in his new position on the screenh]hThis time it will be easy to move the hero around. First we will erase the hero from his old position. We do this by copying the correct value from the background onto the screen. Then we will draw the character in his new position on the screen}hj{sbah}(h]h]h]h]h!]uh%hh'h(h)Khjjh&hubh doctest_block)}(h>>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1]h]h>>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1]}hjsbah}(h]h]doctestah]h]h!]h#h$uh%jhjjh&hh'Nh)Nubh)}(hsThere it is. The hero has moved one space to the left. We can use this same code to move him to the left again. ::h]hpThere it is. The hero has moved one space to the left. We can use this same code to move him to the left again.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjjh&hubj)}(h>>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1]h]h>>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjjh&hubh)}(hExcellent! This isn't exactly what you'd call smooth animation. But with a couple small changes, we'll make this work directly with graphics on the screen.h]hExcellent! This isn't exactly what you'd call smooth animation. But with a couple small changes, we'll make this work directly with graphics on the screen.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjjh&hubeh}(h]making-the-hero-move-take-2ah]h]making the hero move (take 2)ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hDefinition: "blit"h]hDefinition: "blit"}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hX In the next sections we will transform our program from using lists to using real graphics on the screen. When displaying the graphics we will use the term **blit** frequently. If you are new to doing graphics work, you are probably unfamiliar with this common term.h](hIn the next sections we will transform our program from using lists to using real graphics on the screen. When displaying the graphics we will use the term }hjsbh strong)}(h**blit**h]hblit}hjsbah}(h]h]h]h]h!]uh%jhjubhf frequently. If you are new to doing graphics work, you are probably unfamiliar with this common term.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hX8BLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just *"assigning"* pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image.h](hBLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just }hjsbh emphasis)}(h *"assigning"*h]h "assigning"}hj sbah}(h]h]h]h]h!]uh%jhjubhn pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXOther graphics libraries will use the word *bitblt*, or just *blt*, but they are talking about the same thing. It is basically copying memory from one place to another. Actually, it is a bit more advanced than straight copying of memory, since it needs to handle things like pixel formats, clipping, and scanline pitches. Advanced blitters can also handle things like transparency and other special effects.h](h+Other graphics libraries will use the word }hj!sbj)}(h*bitblt*h]hbitblt}hj)sbah}(h]h]h]h]h!]uh%jhj!ubh , or just }hj!sbj)}(h*blt*h]hblt}hj;sbah}(h]h]h]h]h!]uh%jhj!ubhXU, but they are talking about the same thing. It is basically copying memory from one place to another. Actually, it is a bit more advanced than straight copying of memory, since it needs to handle things like pixel formats, clipping, and scanline pitches. Advanced blitters can also handle things like transparency and other special effects.}hj!sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]definition-blitah]h]definition: "blit"ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(h!Going From The List To The Screenh]h!Going From The List To The Screen}hj^sbah}(h]h]h]h]h!]uh%hMhj[h&hh'h(h)Kubh)}(hXTo take the code we see in the above to examples and make them work with pygame is very straightforward. We'll pretend we have loaded some pretty graphics and named them "terrain1", "terrain2", and "hero". Where before we assigned numbers to a list, we now blit graphics to the screen. Another big change, instead of using positions as a single index (0 through 5), we now need a two dimensional coordinate. We'll pretend each of the graphics in our game is 10 pixels wide. ::h]hXTo take the code we see in the above to examples and make them work with pygame is very straightforward. We'll pretend we have loaded some pretty graphics and named them "terrain1", "terrain2", and "hero". Where before we assigned numbers to a list, we now blit graphics to the screen. Another big change, instead of using positions as a single index (0 through 5), we now need a two dimensional coordinate. We'll pretend each of the graphics in our game is 10 pixels wide.}hjlsbah}(h]h]h]h]h!]uh%hh'h(h)Khj[h&hubj)}(h>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0))h]h>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0))}hjzsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj[h&hubh)}(hXHmm, that code should seem very familiar, and hopefully more importantly; the code above should make a little sense. Hopefully my illustration of setting simple values in a list shows the similarity of setting pixels on the screen (with blit). The only part that's really extra work is converting the player position into coordinates on the screen. For now we just use a crude :code:`(playerpos*10, 0)` , but we can certainly do better than that. Now let's move the player image over a space. This code should have no surprises. ::h](hXyHmm, that code should seem very familiar, and hopefully more importantly; the code above should make a little sense. Hopefully my illustration of setting simple values in a list shows the similarity of setting pixels on the screen (with blit). The only part that's really extra work is converting the player position into coordinates on the screen. For now we just use a crude }hjsbh literal)}(h:code:`(playerpos*10, 0)`h]h(playerpos*10, 0)}hjsbah}(h]h]codeah]h]h!]languagehuh%jhjubh~ , but we can certainly do better than that. Now let's move the player image over a space. This code should have no surprises.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj[h&hubj)}(h>>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0))h]h>>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj[h&hubh)}(hXThere you have it. With this code we've shown how to display a simple background with a hero's image on it. Then we've properly moved that hero one space to the left. So where do we go from here? Well for one the code is still a little awkward. First thing we'll want to do is find a cleaner way to represent the background and player position. Then perhaps a bit of smoother, real animation.h]hXThere you have it. With this code we've shown how to display a simple background with a hero's image on it. Then we've properly moved that hero one space to the left. So where do we go from here? Well for one the code is still a little awkward. First thing we'll want to do is find a cleaner way to represent the background and player position. Then perhaps a bit of smoother, real animation.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj[h&hubeh}(h]!going-from-the-list-to-the-screenah]h]!going from the list to the screenah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hScreen Coordinatesh]hScreen Coordinates}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hXTo position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination.h]hXTo position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXaPygame comes with a convenient container for these coordinates, it is a Rect. The Rect basically represents a rectangular area in these coordinates. It has topleft corner and a size. The Rect comes with a lot of convenient methods which help you move and position them. In our next examples we will represent the positions of our objects with the Rects.h]hXaPygame comes with a convenient container for these coordinates, it is a Rect. The Rect basically represents a rectangular area in these coordinates. It has topleft corner and a size. The Rect comes with a lot of convenient methods which help you move and position them. In our next examples we will represent the positions of our objects with the Rects.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hX{Also know that many functions in pygame expect Rect arguments. All of these functions can also accept a simple tuple of 4 elements (left, top, width, height). You aren't always required to use these Rect objects, but you will mainly want to. Also, the blit() function can accept a Rect as its position argument, it simply uses the topleft corner of the Rect as the real position.h]hX{Also know that many functions in pygame expect Rect arguments. All of these functions can also accept a simple tuple of 4 elements (left, top, width, height). You aren't always required to use these Rect objects, but you will mainly want to. Also, the blit() function can accept a Rect as its position argument, it simply uses the topleft corner of the Rect as the real position.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]screen-coordinatesah]h]screen coordinatesah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hChanging The Backgroundh]hChanging The Background}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubh)}(hXIn all our previous sections, we've been storing the background as a list of different types of ground. That is a good way to create a tile-based game, but we want smooth scrolling. To make that a little easier, we're going to change the background into a single image that covers the whole screen. This way, when we want to "erase" our objects (before redrawing them) we only need to blit the section of the erased background onto the screen.h]hXIn all our previous sections, we've been storing the background as a list of different types of ground. That is a good way to create a tile-based game, but we want smooth scrolling. To make that a little easier, we're going to change the background into a single image that covers the whole screen. This way, when we want to "erase" our objects (before redrawing them) we only need to blit the section of the erased background onto the screen.}hj$sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hBy passing an optional third Rect argument to blit, we tell blit to only use that subsection of the source image. You'll see that in use below as we erase the player image.h]hBy passing an optional third Rect argument to blit, we tell blit to only use that subsection of the source image. You'll see that in use below as we erase the player image.}hj2sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hAlso note, now when we finish drawing to the screen, we call pygame.display.update() which will show everything we've drawn onto the screen.h]hAlso note, now when we finish drawing to the screen, we call pygame.display.update() which will show everything we've drawn onto the screen.}hj@sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]changing-the-backgroundah]h]changing the backgroundah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hSmooth Movementh]hSmooth Movement}hjYsbah}(h]h]h]h]h!]uh%hMhjVh&hh'h(h)M ubh)}(hTo make something appear to move smoothly, we only want to move it a couple pixels at a time. Here is the code to make an object move smoothly across the screen. Based on what we already now know, this should look pretty simple. ::h]hTo make something appear to move smoothly, we only want to move it a couple pixels at a time. Here is the code to make an object move smoothly across the screen. Based on what we already now know, this should look pretty simple.}hjgsbah}(h]h]h]h]h!]uh%hh'h(h)M"hjVh&hubj)}(hX>>> screen = create_screen() >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #draw the background >>> position = player.get_rect() >>> screen.blit(player, position) #draw the player >>> pygame.display.update() #and show it all >>> for x in range(100): #animate 100 frames ... screen.blit(background, position, position) #erase ... position = position.move(2, 0) #move player ... screen.blit(player, position) #draw new player ... pygame.display.update() #and show it all ... clock.tick(60) #update 60 times per secondh]hX>>> screen = create_screen() >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #draw the background >>> position = player.get_rect() >>> screen.blit(player, position) #draw the player >>> pygame.display.update() #and show it all >>> for x in range(100): #animate 100 frames ... screen.blit(background, position, position) #erase ... position = position.move(2, 0) #move player ... screen.blit(player, position) #draw new player ... pygame.display.update() #and show it all ... clock.tick(60) #update 60 times per second}hjusbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M&hjVh&hubh)}(hXOThere you have it. This is all the code that is needed to smoothly animate an object across the screen. We can even use a pretty background character. Another benefit of doing the background this way, the image for the player can have transparency or cutout sections and it will still draw correctly over the background (a free bonus).h]hXOThere you have it. This is all the code that is needed to smoothly animate an object across the screen. We can even use a pretty background character. Another benefit of doing the background this way, the image for the player can have transparency or cutout sections and it will still draw correctly over the background (a free bonus).}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M6hjVh&hubh)}(hWe also throw in a call to pygame.time.Clock() to grab the clock element. With it, we can call clock.tick() to set the framerate in frames per second. This slows down our program a little, otherwise it might run so fast you might not see it.h]hWe also throw in a call to pygame.time.Clock() to grab the clock element. With it, we can call clock.tick() to set the framerate in frames per second. This slows down our program a little, otherwise it might run so fast you might not see it.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M<hjVh&hubeh}(h]smooth-movementah]h]smooth movementah]h!]uh%hHhh]h&hh'h(h)M ubhI)}(hhh](hN)}(hSo, What Next?h]hSo, What Next?}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)MCubh)}(hXWell there we have it. Hopefully this article has done everything it promised to do. But, at this point the code really isn't ready for the next best-selling game. How do we easily have multiple moving objects? What exactly are those mysterious functions like load_player_image()? We also need a way to get simple user input, and loop for more than 100 frames. We'll take the example we have here, and turn it into an object oriented creation that would make momma proud.h]hXWell there we have it. Hopefully this article has done everything it promised to do. But, at this point the code really isn't ready for the next best-selling game. How do we easily have multiple moving objects? What exactly are those mysterious functions like load_player_image()? We also need a way to get simple user input, and loop for more than 100 frames. We'll take the example we have here, and turn it into an object oriented creation that would make momma proud.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MEhjh&hubeh}(h] so-what-nextah]h]so, what next?ah]h!]uh%hHhh]h&hh'h(h)MCubhI)}(hhh](hN)}(hFirst, The Mystery Functionsh]hFirst, The Mystery Functions}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)MOubh)}(hFull information on these types of functions can be found in other tutorials and reference. The pygame.image module has a load() function which will do what we want. The lines to load the images should become this. ::h]hFull information on these types of functions can be found in other tutorials and reference. The pygame.image module has a load() function which will do what we want. The lines to load the images should become this.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MQhjh&hubj)}(hq>>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert()h]hq>>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)MUhjh&hubh)}(hXWe can see that's pretty simple, the load function just takes a filename and returns a new Surface with the loaded image. After loading we make a call to the Surface method, convert(). Convert returns us a new Surface of the image, but now converted to the same pixel format as our display. Since the images will be the same format at the screen, they will blit very quickly. If we did not convert, the blit() function is slower, since it has to convert from one type of pixel to another as it goes.h]hXWe can see that's pretty simple, the load function just takes a filename and returns a new Surface with the loaded image. After loading we make a call to the Surface method, convert(). Convert returns us a new Surface of the image, but now converted to the same pixel format as our display. Since the images will be the same format at the screen, they will blit very quickly. If we did not convert, the blit() function is slower, since it has to convert from one type of pixel to another as it goes.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MYhjh&hubh)}(hX_You may also have noticed that both the load() and convert() return new Surfaces. This means we're really creating two Surfaces on each of these lines. In other programming languages, this results in a memory leak (not a good thing). Fortunately Python is smart enough to handle this, and pygame will properly clean up the Surface we end up not using.h]hX_You may also have noticed that both the load() and convert() return new Surfaces. This means we're really creating two Surfaces on each of these lines. In other programming languages, this results in a memory leak (not a good thing). Fortunately Python is smart enough to handle this, and pygame will properly clean up the Surface we end up not using.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mahjh&hubh)}(hXThe other mystery function we saw in the above example was create_screen(). In pygame it is simple to create a new window for graphics. The code to create a 640x480 surface is below. By passing no other arguments, pygame will just pick the best color depth and pixel format for us. ::h]hXThe other mystery function we saw in the above example was create_screen(). In pygame it is simple to create a new window for graphics. The code to create a 640x480 surface is below. By passing no other arguments, pygame will just pick the best color depth and pixel format for us.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mghjh&hubj)}(h0>>> screen = pygame.display.set_mode((640, 480))h]h0>>> screen = pygame.display.set_mode((640, 480))}hj%sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mlhjh&hubeh}(h]first-the-mystery-functionsah]h]first, the mystery functionsah]h!]uh%hHhh]h&hh'h(h)MOubhI)}(hhh](hN)}(hHandling Some Inputh]hHandling Some Input}hj>sbah}(h]h]h]h]h!]uh%hMhj;h&hh'h(h)Mpubh)}(hXWe desperately need to change the main loop to look for any user input, (like when the user closes the window). We need to add "event handling" to our program. All graphical programs use this Event Based design. The program gets events like "keyboard pressed" or "mouse moved" from the computer. Then the program responds to the different events. Here's what the code should look like. Instead of looping for 100 frames, we'll keep looping until the user asks us to stop. ::h]hXWe desperately need to change the main loop to look for any user input, (like when the user closes the window). We need to add "event handling" to our program. All graphical programs use this Event Based design. The program gets events like "keyboard pressed" or "mouse moved" from the computer. Then the program responds to the different events. Here's what the code should look like. Instead of looping for 100 frames, we'll keep looping until the user asks us to stop.}hjLsbah}(h]h]h]h]h!]uh%hh'h(h)Mrhj;h&hubj)}(h>>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... move_and_draw_all_game_objects()h]h>>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... move_and_draw_all_game_objects()}hjZsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mzhj;h&hubh)}(hX What this code simply does is, first loop forever, then check if there are any events from the user. We exit the program if the user presses the close button on the window. After we've checked all the events we move and draw our game objects. (We'll also erase them before they move, too)h]hX What this code simply does is, first loop forever, then check if there are any events from the user. We exit the program if the user presses the close button on the window. After we've checked all the events we move and draw our game objects. (We'll also erase them before they move, too)}hjhsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj;h&hubeh}(h]handling-some-inputah]h]handling some inputah]h!]uh%hHhh]h&hh'h(h)MpubhI)}(hhh](hN)}(hMoving Multiple Imagesh]hMoving Multiple Images}hjsbah}(h]h]h]h]h!]uh%hMhj~h&hh'h(h)Mubh)}(hXHere's the part where we're really going to change things around. Let's say we want 10 different images moving around on the screen. A good way to handle this is to use python's classes. We'll create a class that represents our game object. This object will have a function to move itself, and then we can create as many as we like. The functions to draw and move the object need to work in a way where they only move one frame (or one step) at a time. Here's the python code to create our class. ::h]hXHere's the part where we're really going to change things around. Let's say we want 10 different images moving around on the screen. A good way to handle this is to use python's classes. We'll create a class that represents our game object. This object will have a function to move itself, and then we can create as many as we like. The functions to draw and move the object need to work in a way where they only move one frame (or one step) at a time. Here's the python code to create our class.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj~h&hubj)}(hXP>>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(self.speed, 0) ... if self.pos.right > 600: ... self.pos.left = 0h]hXP>>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(self.speed, 0) ... if self.pos.right > 600: ... self.pos.left = 0}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhj~h&hubh)}(hSo we have two functions in our class. The init function constructs our object. It positions the object and sets its speed. The move method moves the object one step. If it's gone too far, it moves the object back to the left.h]hSo we have two functions in our class. The init function constructs our object. It positions the object and sets its speed. The move method moves the object one step. If it's gone too far, it moves the object back to the left.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj~h&hubeh}(h]moving-multiple-imagesah]h]moving multiple imagesah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hPutting It All Togetherh]hPutting It All Together}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubh)}(hNow with our new object class, we can put together the entire game. Here is what the main function for our program will look like. ::h]hNow with our new object class, we can put together the entire game. Here is what the main function for our program will look like.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj)}(hX>>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #create 10 objects
... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60)h]hX>>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #create 10 objects
... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubh)}(hXAnd there it is. This is the code we need to animate 10 objects on the screen. The only point that might need explaining is the two loops we use to clear all the objects and draw all the objects. In order to do things properly, we need to erase all the objects before drawing any of them. In our sample here it may not matter, but when objects are overlapping, using two loops like this becomes important.h]hXAnd there it is. This is the code we need to animate 10 objects on the screen. The only point that might need explaining is the two loops we use to clear all the objects and draw all the objects. In order to do things properly, we need to erase all the objects before drawing any of them. In our sample here it may not matter, but when objects are overlapping, using two loops like this becomes important.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]putting-it-all-togetherah]h]putting it all togetherah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(h!Preparing for Improved User Inputh]h!Preparing for Improved User Input}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubh)}(hnWith all keyboard input terminating the program, that's not very interactive. Let's add some extra user input!h]hnWith all keyboard input terminating the program, that's not very interactive. Let's add some extra user input!}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXdFirst we should create a unique character that the player will control. We can do that in much the same way we created the other movable entities. Let's call the player object p. We can already move any object, but, a player should have more input than simply moving right. To accommodate this, let's revamp our move function under our GameObject class. ::h]hXaFirst we should create a unique character that the player will control. We can do that in much the same way we created the other movable entities. Let's call the player object p. We can already move any object, but, a player should have more input than simply moving right. To accommodate this, let's revamp our move function under our GameObject class.}hj#sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj)}(hX->>> def move(self, up=False, down=False, left=False, right=False): ... if right: ... self.pos.right += self.speed ... if left: ... self.pos.right -= self.speed ... if down: ... self.pos.top += self.speed ... if up: ... self.pos.top -= self.speed ... if self.pos.right > WIDTH: ... self.pos.left = 0 ... if self.pos.top > HEIGHT-SPRITE_HEIGHT: ... self.pos.top = 0 ... if self.pos.right < SPRITE_WIDTH: ... self.pos.right = WIDTH ... if self.pos.top < 0: ... self.pos.top = HEIGHT-SPRITE_HEIGHTh]hX->>> def move(self, up=False, down=False, left=False, right=False): ... if right: ... self.pos.right += self.speed ... if left: ... self.pos.right -= self.speed ... if down: ... self.pos.top += self.speed ... if up: ... self.pos.top -= self.speed ... if self.pos.right > WIDTH: ... self.pos.left = 0 ... if self.pos.top > HEIGHT-SPRITE_HEIGHT: ... self.pos.top = 0 ... if self.pos.right < SPRITE_WIDTH: ... self.pos.right = WIDTH ... if self.pos.top < 0: ... self.pos.top = HEIGHT-SPRITE_HEIGHT}hj1sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubh)}(hXThere's certainly a lot more going on here, so let's take it one step at a time. First, we've added some default values into the move function, declared as up, down, left, and right. These booleans will allow us to specifically select a direction that the object is moving in. The first part, where we go through and check True for each variable, is where we will add to the position of the object, much like before. Right controls horizontal, and top controls vertical positions.h]hXThere's certainly a lot more going on here, so let's take it one step at a time. First, we've added some default values into the move function, declared as up, down, left, and right. These booleans will allow us to specifically select a direction that the object is moving in. The first part, where we go through and check True for each variable, is where we will add to the position of the object, much like before. Right controls horizontal, and top controls vertical positions.}hj?sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXAdditionally, we've removed the magic number present previously, and replaced it with the constants WIDTH, HEIGHT, SPRITE_WIDTH, and SPRITE_HEIGHT. These values represent the screen width and height, along with the width and height of the object displayed on the screen.h]hXAdditionally, we've removed the magic number present previously, and replaced it with the constants WIDTH, HEIGHT, SPRITE_WIDTH, and SPRITE_HEIGHT. These values represent the screen width and height, along with the width and height of the object displayed on the screen.}hjMsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hThe second part, where the position is being checked, ensures that the position is within the confines of our screen. With this in place, we need to make sure that when one of our other objects calls move, we set right to true.h]hThe second part, where the position is being checked, ensures that the position is within the confines of our screen. With this in place, we need to make sure that when one of our other objects calls move, we set right to true.}hj[sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]!preparing-for-improved-user-inputah]h]!preparing for improved user inputah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hAdding the User Inputh]hAdding the User Input}hjtsbah}(h]h]h]h]h!]uh%hMhjqh&hh'h(h)Mubh)}(hXKWe've already seen that pygame has event handling, and we know that KEYDOWN is an event in this loop. We could, under KEYDOWN, assert the key press matches an arrow key, where we would then call move. However, this movement will only occur once every time a key is pressed, and it therefore will be extremely choppy and unpleasant.h]hXKWe've already seen that pygame has event handling, and we know that KEYDOWN is an event in this loop. We could, under KEYDOWN, assert the key press matches an arrow key, where we would then call move. However, this movement will only occur once every time a key is pressed, and it therefore will be extremely choppy and unpleasant.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjqh&hubh)}(hXdFor this, we can use pygame.key.get_pressed(), which returns a list of all keys, and whether or not they are currently pressed. Since we want these key presses to be maintained whether an event is currently happening or not, we should put it outside of the main event handling loop, but still within our game loop. Our functionality will look like this. ::h]hXaFor this, we can use pygame.key.get_pressed(), which returns a list of all keys, and whether or not they are currently pressed. Since we want these key presses to be maintained whether an event is currently happening or not, we should put it outside of the main event handling loop, but still within our game loop. Our functionality will look like this.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjqh&hubj)}(h>>> keys = pygame.key.get_pressed() >>> if keys[pygame.K_UP]: ... p.move(up=True) >>> if keys[pygame.K_DOWN]: ... p.move(down=True) >>> if keys[pygame.K_LEFT]: ... p.move(left=True) >>> if keys[pygame.K_RIGHT]: ... p.move(right=True)h]h>>> keys = pygame.key.get_pressed() >>> if keys[pygame.K_UP]: ... p.move(up=True) >>> if keys[pygame.K_DOWN]: ... p.move(down=True) >>> if keys[pygame.K_LEFT]: ... p.move(left=True) >>> if keys[pygame.K_RIGHT]: ... p.move(right=True)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjqh&hubh)}(hWe simply get our list of keys pressed, called keys. We can then check the index at the key code position to see if it is held down. For more key codes, I recommend checking out the documentation on pygame.key.h]hWe simply get our list of keys pressed, called keys. We can then check the index at the key code position to see if it is held down. For more key codes, I recommend checking out the documentation on pygame.key.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjqh&hubh)}(hWhen up is held, we move our object, p, up. When down is held, we move down. Rinse and repeat for all cases, and we're good to go!h]hWhen up is held, we move our object, p, up. When down is held, we move down. Rinse and repeat for all cases, and we're good to go!}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjqh&hubeh}(h]adding-the-user-inputah]h]adding the user inputah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(h%Putting it all Together One More timeh]h%Putting it all Together One More time}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubh)}(hyNow that we're finished with the player functionality, let's take one last look to make sure we understand everything. ::h]hvNow that we're finished with the player functionality, let's take one last look to make sure we understand everything.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj)}(hX>>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> entity = pygame.image.load('alien1.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> p = GameObject(player, 10, 3) #create the player object >>> for x in range(10): #create 10 objects
... o = GameObject(entity, x*40, x) ... objects.append(o) >>> while True: ... screen.blit(background, p.pos, p.pos) ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... keys = pygame.key.get_pressed() ... if keys[pygame.K_UP]: ... p.move(up=True) ... if keys[pygame.K_DOWN]: ... p.move(down=True) ... if keys[pygame.K_LEFT]: ... p.move(left=True) ... if keys[pygame.K_RIGHT]: ... p.move(right=True) ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... screen.blit(p.image, p.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60)h]hX>>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> entity = pygame.image.load('alien1.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> p = GameObject(player, 10, 3) #create the player object >>> for x in range(10): #create 10 objects
... o = GameObject(entity, x*40, x) ... objects.append(o) >>> while True: ... screen.blit(background, p.pos, p.pos) ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... keys = pygame.key.get_pressed() ... if keys[pygame.K_UP]: ... p.move(up=True) ... if keys[pygame.K_DOWN]: ... p.move(down=True) ... if keys[pygame.K_LEFT]: ... p.move(left=True) ... if keys[pygame.K_RIGHT]: ... p.move(right=True) ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... screen.blit(p.image, p.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubh)}(hA few things not mentioned earlier: we load in a second image and call it entity, and we use that for all objects that aren't the player, which uses the player image defined earlier.h]hA few things not mentioned earlier: we load in a second image and call it entity, and we use that for all objects that aren't the player, which uses the player image defined earlier.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M>hjh&hubh)}(htAnd that's all there is to it! Now we have a fully functional player object that is controlled using the arrow keys!h]htAnd that's all there is to it! Now we have a fully functional player object that is controlled using the arrow keys!}hj sbah}(h]h]h]h]h!]uh%hh'h(h)MBhjh&hubeh}(h]%putting-it-all-together-one-more-timeah]h]%putting it all together one more timeah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hYou Are On Your Own From Hereh]hYou Are On Your Own From Here}hj$sbah}(h]h]h]h]h!]uh%hMhj!h&hh'h(h)MGubh)}(hX@So what would be next on your road to learning? Well first playing around with this example a bit. The full running version of this example is available in the pygame examples directory. It is the example named :func:`moveit.py ` . Take a look at the code and play with it, run it, learn it.h](hSo what would be next on your road to learning? Well first playing around with this example a bit. The full running version of this example is available in the pygame examples directory. It is the example named }hj2sbh pending_xref)}(h/:func:`moveit.py `h]j)}(hj>h]h moveit.py}hj@sbah}(h]h](xrefpypy-funceh]h]h!]uh%jhj<ubah}(h]h]h]h]h!]refdoc tut/MoveIt refdomainjKreftypefunc refexplicitrefwarn py:moduleNpy:classN reftargetpygame.examples.moveit.mainuh%j:h'h(h)MIhj2ubh> . Take a look at the code and play with it, run it, learn it.}hj2sbeh}(h]h]h]h]h!]uh%hh'h(h)MIhj!h&hubh)}(hXThings you may want to work on is maybe having more than one type of object. Finding a way to cleanly "delete" objects when you don't want to show them any more. Also updating the display.update() call to pass a list of the areas on-screen that have changed.h]hXThings you may want to work on is maybe having more than one type of object. Finding a way to cleanly "delete" objects when you don't want to show them any more. Also updating the display.update() call to pass a list of the areas on-screen that have changed.}hjksbah}(h]h]h]h]h!]uh%hh'h(h)MOhj!h&hubh)}(hThere are also other tutorials and examples in pygame that cover these issues. So when you're ready to keep learning, keep on reading. :-)h]hThere are also other tutorials and examples in pygame that cover these issues. So when you're ready to keep learning, keep on reading. :-)}hjysbah}(h]h]h]h]h!]uh%hh'h(h)MThj!h&hubh)}(hLastly, you can feel free to come to the pygame mailing list or chatroom with any questions on this stuff. There's always folks on hand who can help you out with this sort of business.h]hLastly, you can feel free to come to the pygame mailing list or chatroom with any questions on this stuff. There's always folks on hand who can help you out with this sort of business.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MWhj!h&hubh)}(h,Lastly, have fun, that's what games are for!h]h,Lastly, have fun, that's what games are for!}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M[hj!h&hubeh}(h]you-are-on-your-own-from-hereah]h]you are on your own from hereah]h!]uh%hHhh]h&hh'h(h)MGubeh}(h]help-how-do-i-move-an-imageah]h]help! how do i move an image?ah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h],pygame-tutorials-help-how-do-i-move-an-imageah]h]0pygame tutorials - help! how do i move an image?ah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjVjSjjj$j!jgjdjjjXjUjjjj jSjPjjjjj8j5j{jxjjjjjnjkjjjjjju nametypes}(jjjVjj$jgjjXjjjSjjj8j{jjjnjjjuh}(jhJjh]jSjjjYj!jjdj'jjjjUjjj[j jjPjjjVjjj5jjxj;jj~jjjkjjjqjjjj!u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/MoveIt.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.2721405 pygame-2.6.1/docs/generated/doctrees/tut/PygameIntro.doctree0000644000175100001770000013417414676242421023550 0ustar00runnerdockerqsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h#TUTORIAL:Pygame Python Introductionh]h Text#TUTORIAL:Pygame Python Introduction}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource=/home/runner/work/pygame/pygame/docs/reST/tut/PygameIntro.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h Pygame Introh]h Pygame Intro}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hPython Pygame Introductionh]hPython Pygame Introduction}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)Kubh)}(hXThis article is an introduction to the `pygame library `_ for `Python programmers `_. The original version appeared in the `PyZine volume 1 issue 3 `_. This version contains minor revisions, to create an all-around better article. Pygame is a Python extension library that wraps the `SDL `_ library and its helpers.h](h'This article is an introduction to the }hhsbh)}(h)`pygame library `_h]hpygame library}(hhhpygame libraryubah}(h]h]h]h]h!]namepygame libraryrefurihttp://www.pygame.orguh%hhhubh target)}(h h]h}(h]pygame-libraryah]h]pygame libraryah]h!]refurijuh%j referencedKhhubh for }hhsbh)}(h/`Python programmers `_h]hPython programmers}(hjhPython programmersubah}(h]h]h]h]h!]namePython programmersjhttps://www.python.org/uh%hhhubj)}(h h]h}(h]python-programmersah]h]python programmersah]h!]refurij,uh%jjKhhubh'. The original version appeared in the }hhsbh)}(ht`PyZine volume 1 issue 3 `_h]hPyZine volume 1 issue 3}(hj>hPyZine volume 1 issue 3ubah}(h]h]h]h]h!]namePyZine volume 1 issue 3jWhttps://web.archive.org/web/20030810011958/http://store.pyzine.com:80/article.phtml?a=2uh%hhhubj)}(hZ h]h}(h]pyzine-volume-1-issue-3ah]h]pyzine volume 1 issue 3ah]h!]refurijOuh%jjKhhubh. This version contains minor revisions, to create an all-around better article. Pygame is a Python extension library that wraps the }hhsbh)}(h`SDL `_h]hSDL}(hjahSDLubah}(h]h]h]h]h!]namejijhttp://www.libsdl.orguh%hhhubj)}(h h]h}(h]sdlah]h]sdlah]h!]refurijquh%jjKhhubh library and its helpers.}hhsbeh}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubhI)}(hhh](hN)}(hHISTORYh]hHISTORY}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hX]Pygame started in the summer of 2000. Being a C programmer of many years, I discovered both Python and SDL at about the same time. You are already familiar with Python, which was at version 1.5.2. You may need an introduction to SDL, which is the Simple DirectMedia Layer. Created by Sam Lantinga, SDL is a cross-platform C library for controlling multimedia, comparable to DirectX. It has been used for hundreds of commercial and open source games. I was impressed at how clean and straightforward both projects were and it wasn't long before I realized mixing Python and SDL was an interesting proposal.h]hX]Pygame started in the summer of 2000. Being a C programmer of many years, I discovered both Python and SDL at about the same time. You are already familiar with Python, which was at version 1.5.2. You may need an introduction to SDL, which is the Simple DirectMedia Layer. Created by Sam Lantinga, SDL is a cross-platform C library for controlling multimedia, comparable to DirectX. It has been used for hundreds of commercial and open source games. I was impressed at how clean and straightforward both projects were and it wasn't long before I realized mixing Python and SDL was an interesting proposal.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K hjh&hubh)}(hX]I discovered a small project already under-way with exactly the same idea, PySDL. Created by Mark Baker, PySDL was a straightforward implementation of SDL as a Python extension. The interface was cleaner than a generic SWIG wrapping, but I felt it forced a "C style" of code. The sudden death of PySDL prompted me to take on a new project of my own.h]hX]I discovered a small project already under-way with exactly the same idea, PySDL. Created by Mark Baker, PySDL was a straightforward implementation of SDL as a Python extension. The interface was cleaner than a generic SWIG wrapping, but I felt it forced a "C style" of code. The sudden death of PySDL prompted me to take on a new project of my own.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K*hjh&hubh)}(hXI wanted to put together a project that really took advantage of Python. My goal was to make it easy to do the simple things, and straightforward to do the difficult things. Pygame was started in October, 2000. Six months later pygame version 1.0 was released.h]hXI wanted to put together a project that really took advantage of Python. My goal was to make it easy to do the simple things, and straightforward to do the difficult things. Pygame was started in October, 2000. Six months later pygame version 1.0 was released.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K1hjh&hubeh}(h]historyah]h]historyah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hTASTEh]hTASTE}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K8ubh)}(hX9I find the best way to understand a new library is to jump straight into an example. In the early days of pygame, I created a bouncing ball animation with 7 lines of code. Let's take a look at a friendlier version of that same thing. This should be simple enough to follow along, and a complete breakdown follows.h]hX9I find the best way to understand a new library is to jump straight into an example. In the early days of pygame, I created a bouncing ball animation with 7 lines of code. Let's take a look at a friendlier version of that same thing. This should be simple enough to follow along, and a complete breakdown follows.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K;hjh&hubh image)}(h3.. image:: intro_ball.gif :class: inlined-right h]h}(h]h] inlined-rightah]h]h!]uritut/intro_ball.gif candidates}*js original_uriintro_ball.gifuh%jh'h(h)KAhjh&hubh literal_block)}(hXNimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("intro_ball.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill("black") screen.blit(ball, ballrect) pygame.display.flip()h]hXNimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("intro_ball.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill("black") screen.blit(ball, ballrect) pygame.display.flip()}hjsbah}(h]h]h]h]h!]h#h$forcelanguagepythonhighlight_args}uh%jh'h(h)KDhjh&hubh)}(hXThis is as simple as you can get for a bouncing animation. First we see importing and initializing pygame is nothing noteworthy. The ``import pygame`` imports the package with all the available pygame modules. The call to ``pygame.init()`` initializes each of these modules. Make sure the gif file of the bouncing ball is in the same folder as the code block. On :clr:`line 4` we set the size of the display window, for best results you can change these numbers to match your own monitor's resolution. On :clr:`line 8` we create a graphical window with the call to ``pygame.display.set_mode()``. Pygame and SDL make this easy by defaulting to the best graphics modes for the graphics hardware. You can override the mode and SDL will compensate for anything the hardware cannot do. Pygame represents images as *Surface* objects. The ``display.set_mode()`` function creates a new *Surface* object that represents the actual displayed graphics. Any drawing you do to this Surface will become visible on the monitor.h](hThis is as simple as you can get for a bouncing animation. First we see importing and initializing pygame is nothing noteworthy. The }hjsbh literal)}(h``import pygame``h]h import pygame}hjsbah}(h]h]h]h]h!]uh%jhjubhH imports the package with all the available pygame modules. The call to }hjsbj)}(h``pygame.init()``h]h pygame.init()}hj0sbah}(h]h]h]h]h!]uh%jhjubh| initializes each of these modules. Make sure the gif file of the bouncing ball is in the same folder as the code block. On }hjsbh inline)}(h :clr:`line 4`h]hline 4}hjDsbah}(h]h] codelinerefah]h]h!]uh%jBhjubh we set the size of the display window, for best results you can change these numbers to match your own monitor's resolution. On }hjsbjC)}(h :clr:`line 8`h]hline 8}hjWsbah}(h]h]jOah]h]h!]uh%jBhjubh/ we create a graphical window with the call to }hjsbj)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjisbah}(h]h]h]h]h!]uh%jhjubh. Pygame and SDL make this easy by defaulting to the best graphics modes for the graphics hardware. You can override the mode and SDL will compensate for anything the hardware cannot do. Pygame represents images as }hjsbh emphasis)}(h *Surface*h]hSurface}hj}sbah}(h]h]h]h]h!]uh%j{hjubh objects. The }hjsbj)}(h``display.set_mode()``h]hdisplay.set_mode()}hjsbah}(h]h]h]h]h!]uh%jhjubh function creates a new }hjsbj|)}(h *Surface*h]hSurface}hjsbah}(h]h]h]h]h!]uh%j{hjubh} object that represents the actual displayed graphics. Any drawing you do to this Surface will become visible on the monitor.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K`hjh&hubh)}(hXCAt :clr:`line 10` we load our ball image. Pygame supports a variety of image formats through the SDL_image library, including BMP, JPG, PNG, TGA, and GIF. The ``pygame.image.load()`` function returns us a Surface with the ball data. The Surface will keep any colorkey or alpha transparency from the file. After loading the ball image we create a variable named ballrect. Pygame comes with a convenient utility object type named :class:`Rect `, which represents a rectangular area. Later, in the animation part of the code, we will see what the *Rect* objects can do.h](hAt }hjsbjC)}(h:clr:`line 10`h]hline 10}hjsbah}(h]h]jOah]h]h!]uh%jBhjubh we load our ball image. Pygame supports a variety of image formats through the SDL_image library, including BMP, JPG, PNG, TGA, and GIF. The }hjsbj)}(h``pygame.image.load()``h]hpygame.image.load()}hjsbah}(h]h]h]h]h!]uh%jhjubh function returns us a Surface with the ball data. The Surface will keep any colorkey or alpha transparency from the file. After loading the ball image we create a variable named ballrect. Pygame comes with a convenient utility object type named }hjsbh pending_xref)}(h:class:`Rect `h]j)}(hjh]hRect}hjsbah}(h]h](xrefpypy-classeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoctut/PygameIntro refdomainjreftypeclass refexplicitrefwarn py:moduleNpy:classN reftarget pygame.Rectuh%jh'h(h)Kthjubhf, which represents a rectangular area. Later, in the animation part of the code, we will see what the }hjsbj|)}(h*Rect*h]hRect}hjsbah}(h]h]h]h]h!]uh%j{hjubh objects can do.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kthjh&hubh)}(hXAt this point, :clr:`line 13`, our program is initialized and ready to run. Inside an infinite loop we check for user input, move the ball, and then draw the ball. If you are familiar with GUI programming, you have had experience with events and event loops. In pygame this is no different, we check if a *QUIT* event has happened. If so we simply exit the program, pygame will ensure everything is cleanly shutdown.h](hAt this point, }hj(sbjC)}(h:clr:`line 13`h]hline 13}hj0sbah}(h]h]jOah]h]h!]uh%jBhj(ubhX, our program is initialized and ready to run. Inside an infinite loop we check for user input, move the ball, and then draw the ball. If you are familiar with GUI programming, you have had experience with events and event loops. In pygame this is no different, we check if a }hj(sbj|)}(h*QUIT*h]hQUIT}hjBsbah}(h]h]h]h]h!]uh%j{hj(ubhi event has happened. If so we simply exit the program, pygame will ensure everything is cleanly shutdown.}hj(sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hIt is time to update our position for the ball. :clr:`Lines 17` moves the ballrect variable by the current speed. :clr:`Lines 18 thru 21` reverse the speed if the ball has moved outside the screen. Not exactly Newtonian physics, but it is all we need.h](h0It is time to update our position for the ball. }hjZsbjC)}(h:clr:`Lines 17`h]hLines 17}hjbsbah}(h]h]jOah]h]h!]uh%jBhjZubh3 moves the ballrect variable by the current speed. }hjZsbjC)}(h:clr:`Lines 18 thru 21`h]hLines 18 thru 21}hjtsbah}(h]h]jOah]h]h!]uh%jBhjZubhr reverse the speed if the ball has moved outside the screen. Not exactly Newtonian physics, but it is all we need.}hjZsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXOn :clr:`line 23` we erase the screen by filling it with a black RGB color. If you have never worked with animations this may seem strange. You may be asking "Why do we need to erase anything, why don't we just move the ball on the screen?" That is not quite the way computer animation works. Animation is nothing more than a series of single images, which when displayed in sequence do a very good job of fooling the human eye into seeing motion. The screen is just a single image that the user sees. If we did not take the time to erase the ball from the screen, we would actually see a "trail" of the ball as we continuously draw the ball in its new positions.h](hOn }hjsbjC)}(h:clr:`line 23`h]hline 23}hjsbah}(h]h]jOah]h]h!]uh%jBhjubhX we erase the screen by filling it with a black RGB color. If you have never worked with animations this may seem strange. You may be asking "Why do we need to erase anything, why don't we just move the ball on the screen?" That is not quite the way computer animation works. Animation is nothing more than a series of single images, which when displayed in sequence do a very good job of fooling the human eye into seeing motion. The screen is just a single image that the user sees. If we did not take the time to erase the ball from the screen, we would actually see a "trail" of the ball as we continuously draw the ball in its new positions.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXcOn :clr:`line 24` we draw the ball image onto the screen. Drawing of images is handled by the :meth:`Surface.blit() ` method. A blit basically means copying pixel colors from one image to another. We pass the blit method a source :class:`Surface ` to copy from, and a position to place the source onto the destination.h](hOn }hjsbjC)}(h:clr:`line 24`h]hline 24}hjsbah}(h]h]jOah]h]h!]uh%jBhjubhM we draw the ball image onto the screen. Drawing of images is handled by the }hjsbj)}(h,:meth:`Surface.blit() `h]j)}(hjh]hSurface.blit()}hjsbah}(h]h](jpypy-metheh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemeth refexplicitrefwarnjNj Nj pygame.Surface.blituh%jh'h(h)Khjubhq method. A blit basically means copying pixel colors from one image to another. We pass the blit method a source }hjsbj)}(h!:class:`Surface `h]j)}(hjh]hSurface}hjsbah}(h]h](jpypy-classeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypeclass refexplicitrefwarnjNj Nj pygame.Surfaceuh%jh'h(h)KhjubhG to copy from, and a position to place the source onto the destination.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXThe last thing we need to do is actually update the visible display. Pygame manages the display with a double buffer. When we are finished drawing we call the :func:`pygame.display.flip()` method. This makes everything we have drawn on the screen Surface become visible. This buffering makes sure we only see completely drawn frames on the screen. Without it, the user would see the half completed parts of the screen as they are being created.h](hThe last thing we need to do is actually update the visible display. Pygame manages the display with a double buffer. When we are finished drawing we call the }hjsbj)}(h:func:`pygame.display.flip()`h]j)}(hjh]hpygame.display.flip()}hj sbah}(h]h](jpypy-funceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainj*reftypefunc refexplicitrefwarnjNj Nj pygame.display.flipuh%jh'h(h)KhjubhX method. This makes everything we have drawn on the screen Surface become visible. This buffering makes sure we only see completely drawn frames on the screen. Without it, the user would see the half completed parts of the screen as they are being created.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXThat concludes this short introduction to pygame. Pygame also has modules to do things like input handling for the keyboard, mouse, and joystick. It can mix audio and decode streaming music. With the *Surfaces* you can draw simple shapes, rotate and scale the picture, and even manipulate the pixels of an image in realtime as numpy arrays. Pygame also has the ability to act as a cross platform display layer for PyOpenGL. Most of the pygame modules are written in C, few are actually done in Python.h](hThat concludes this short introduction to pygame. Pygame also has modules to do things like input handling for the keyboard, mouse, and joystick. It can mix audio and decode streaming music. With the }hjFsbj|)}(h *Surfaces*h]hSurfaces}hjNsbah}(h]h]h]h]h!]uh%j{hjFubhX# you can draw simple shapes, rotate and scale the picture, and even manipulate the pixels of an image in realtime as numpy arrays. Pygame also has the ability to act as a cross platform display layer for PyOpenGL. Most of the pygame modules are written in C, few are actually done in Python.}hjFsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hThe pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting.h]hThe pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting.}hjfsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]tasteah]h]tasteah]h!]uh%hHhh]h&hh'h(h)K8ubhI)}(hhh](hN)}(hPYTHON AND GAMINGh]hPYTHON AND GAMING}hjsbah}(h]h]h]h]h!]uh%hMhj|h&hh'h(h)Kubh)}(hI"Is Python suitable for gaming?" The answer is, "It depends on the game."h]hI"Is Python suitable for gaming?" The answer is, "It depends on the game."}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(hXPython is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer.h]hXPython is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubj)}(h4.. image:: intro_blade.jpg :class: inlined-right h]h}(h]h] inlined-rightah]h]h!]uritut/intro_blade.jpgj}jjsjintro_blade.jpguh%jh'h(h)Khj|h&hubh)}(hX>Over the past several years there has been an interesting trend in game development, the move towards higher level languages. Usually a game is split into two major parts. The game engine, which must be as fast as possible, and the game logic, which makes the engine actually do something. It wasn't long ago when the engine of a game was written in assembly, with portions written in C. Nowadays, C has moved to the game engine, while often the game itself is written in higher level scripting languages. Games like Quake3 and Unreal run these scripts as portable bytecode.h]hX>Over the past several years there has been an interesting trend in game development, the move towards higher level languages. Usually a game is split into two major parts. The game engine, which must be as fast as possible, and the game logic, which makes the engine actually do something. It wasn't long ago when the engine of a game was written in assembly, with portions written in C. Nowadays, C has moved to the game engine, while often the game itself is written in higher level scripting languages. Games like Quake3 and Unreal run these scripts as portable bytecode.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(hXIn early 2001, developer Rebel Act Studios finished their game, Severance: Blade of Darkness. Using their own custom 3D engine, the rest of the game is written with Python. The game is a bloody action 3rd person perspective fighter. You control medieval warriors into intricate decapitating combination attacks while exploring dungeons and castles. You can download third party add-ons for this game, and find they are nothing more than Python source files.h]hXIn early 2001, developer Rebel Act Studios finished their game, Severance: Blade of Darkness. Using their own custom 3D engine, the rest of the game is written with Python. The game is a bloody action 3rd person perspective fighter. You control medieval warriors into intricate decapitating combination attacks while exploring dungeons and castles. You can download third party add-ons for this game, and find they are nothing more than Python source files.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(htMore recently, Python has been used in a variety of games like Freedom Force, and Humungous' Backyard Sports Series.h]htMore recently, Python has been used in a variety of games like Freedom Force, and Humungous' Backyard Sports Series.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubj)}(h6.. image:: intro_freedom.jpg :class: inlined-right h]h}(h]h] inlined-rightah]h]h!]uritut/intro_freedom.jpgj}jjsjintro_freedom.jpguh%jh'h(h)Khj|h&hubh)}(hXPygame and SDL serve as an excellent C engine for 2D games. Games will still find the largest part of their runtime is spent inside SDL handling the graphics. SDL can take advantage of graphics hardware acceleration. Enabling this can change a game from running around 40 frames per second to over 200 frames per second. When you see your Python game running at 200 frames per second, you realize that Python and games can work together.h]hXPygame and SDL serve as an excellent C engine for 2D games. Games will still find the largest part of their runtime is spent inside SDL handling the graphics. SDL can take advantage of graphics hardware acceleration. Enabling this can change a game from running around 40 frames per second to over 200 frames per second. When you see your Python game running at 200 frames per second, you realize that Python and games can work together.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(hXIt is impressive how well both Python and SDL work on multiple platforms. For example, in May of 2001 I released my own full pygame project, SolarWolf, an arcade style action game. One thing that has surprised me is that one year later there has been no need for any patches, bug fixes, or updates. The game was developed entirely on windows, but runs on Linux, Mac OSX, and many Unixes without any extra work on my end.h]hXIt is impressive how well both Python and SDL work on multiple platforms. For example, in May of 2001 I released my own full pygame project, SolarWolf, an arcade style action game. One thing that has surprised me is that one year later there has been no need for any patches, bug fixes, or updates. The game was developed entirely on windows, but runs on Linux, Mac OSX, and many Unixes without any extra work on my end.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(hX6Still, there are very clear limitations. The best way to manage hardware accelerated graphics is not always the way to get fastest results from software rendering. Hardware support is not available on all platforms. When a game gets more complex, it often must commit to one or the other. SDL has some other design limitations, things like full screen scrolling graphics can quickly bring your game down to unplayable speeds. While SDL is not suitable for all types of games, remember companies like Loki have used SDL to run a wide variety of retail quality titles.h]hX6Still, there are very clear limitations. The best way to manage hardware accelerated graphics is not always the way to get fastest results from software rendering. Hardware support is not available on all platforms. When a game gets more complex, it often must commit to one or the other. SDL has some other design limitations, things like full screen scrolling graphics can quickly bring your game down to unplayable speeds. While SDL is not suitable for all types of games, remember companies like Loki have used SDL to run a wide variety of retail quality titles.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubh)}(hXPygame is fairly low-level when it comes to writing games. You'll quickly find yourself needing to wrap common functions into your own game environment. The great thing about this is there is nothing inside pygame to get in your way. Your program is in full control of everything. The side effect of that is you will find yourself borrowing a lot of code to get a more advanced framework put together. You'll need a better understanding of what you are doing.h]hXPygame is fairly low-level when it comes to writing games. You'll quickly find yourself needing to wrap common functions into your own game environment. The great thing about this is there is nothing inside pygame to get in your way. Your program is in full control of everything. The side effect of that is you will find yourself borrowing a lot of code to get a more advanced framework put together. You'll need a better understanding of what you are doing.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj|h&hubeh}(h]python-and-gamingah]h]python and gamingah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hCLOSINGh]hCLOSING}hj4sbah}(h]h]h]h]h!]uh%hMhj1h&hh'h(h)Mubh)}(hXNDeveloping games is very rewarding, there is something exciting about being able to see and interact with the code you've written. Pygame currently has almost 30 other projects using it. Several of them are ready to play now. You may be surprised to visit the pygame website, and see what other users have been able to do with Python.h]hXNDeveloping games is very rewarding, there is something exciting about being able to see and interact with the code you've written. Pygame currently has almost 30 other projects using it. Several of them are ready to play now. You may be surprised to visit the pygame website, and see what other users have been able to do with Python.}hjBsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj1h&hubh)}(hXOne thing that has caught my attention is the amount of people coming to Python for the first time to try game development. I can see why games are a draw for new programmers, but it can be difficult since creating games requires a firmer understanding of the language. I've tried to support this group of users by writing many examples and pygame tutorials for people new to these concepts.h]hXOne thing that has caught my attention is the amount of people coming to Python for the first time to try game development. I can see why games are a draw for new programmers, but it can be difficult since creating games requires a firmer understanding of the language. I've tried to support this group of users by writing many examples and pygame tutorials for people new to these concepts.}hjPsbah}(h]h]h]h]h!]uh%hh'h(h)M hj1h&hubh)}(hXIn the end, my advice is to keep it simple. I cannot stress this enough. If you are planning to create your first game, there is a lot to learn. Even a simpler game will challenge your designs, and complex games don't necessarily mean fun games. When you understand Python, you can use pygame to create a simple game in only one or two weeks. From there you'll need a surprising amount of time to add the polish to make that into a full presentable game.h]hXIn the end, my advice is to keep it simple. I cannot stress this enough. If you are planning to create your first game, there is a lot to learn. Even a simpler game will challenge your designs, and complex games don't necessarily mean fun games. When you understand Python, you can use pygame to create a simple game in only one or two weeks. From there you'll need a surprising amount of time to add the polish to make that into a full presentable game.}hj^sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj1h&hubhI)}(hhh](hN)}(hPygame Modules Overviewh]hPygame Modules Overview}hjosbah}(h]h]h]h]h!]uh%hMhjlh&hh'h(h)Mubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhjubj)}(hhh]h}(h]h]h]h]h!]colwidthK2uh%jhjubh tbody)}(hhh](h row)}(hhh](h entry)}(hhh]h)}(h:mod:`cdrom `h]j)}(hjh]j)}(hjh]hcdrom}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj  pygame.cdromuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hplaybackh]hplayback}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`cursors `h]j)}(hjh]j)}(hjh]hcursors}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj pygame.cursorsuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h-load cursor images, includes standard cursorsh]h-load cursor images, includes standard cursors}hj0sbah}(h]h]h]h]h!]uh%hh'h(h)Khj-ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`display `h]j)}(hjRh]j)}(hjRh]hdisplay}hjWsbah}(h]h](jpypy-modeh]h]h!]uh%jhjTubah}(h]h]h]h]h!]refdocj refdomainjareftypemod refexplicitrefwarnjNj Nj pygame.displayuh%jh'h(h)M hjPubah}(h]h]h]h]h!]uh%hh'h(h)KhjMubah}(h]h]h]h]h!]uh%jhjJubj)}(hhh]h)}(h$control the display window or screenh]h$control the display window or screen}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjJubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`draw `h]j)}(hjh]j)}(hjh]hdraw}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj  pygame.drawuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h!draw simple shapes onto a Surfaceh]h!draw simple shapes onto a Surface}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`event `h]j)}(hjh]j)}(hjh]hevent}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj  pygame.eventuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(h!manage events and the event queueh]h!manage events and the event queue}hj&sbah}(h]h]h]h]h!]uh%hh'h(h)Khj#ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`font `h]j)}(hjHh]j)}(hjHh]hfont}hjMsbah}(h]h](jpypy-modeh]h]h!]uh%jhjJubah}(h]h]h]h]h!]refdocj refdomainjWreftypemod refexplicitrefwarnjNj Nj  pygame.fontuh%jh'h(h)M hjFubah}(h]h]h]h]h!]uh%hh'h(h)KhjCubah}(h]h]h]h]h!]uh%jhj@ubj)}(hhh]h)}(h create and render TrueType fontsh]h create and render TrueType fonts}hjxsbah}(h]h]h]h]h!]uh%hh'h(h)Khjuubah}(h]h]h]h]h!]uh%jhj@ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`image `h]j)}(hjh]j)}(hjh]himage}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj  pygame.imageuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hsave and load imagesh]hsave and load images}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h!:mod:`joystick `h]j)}(hjh]j)}(hjh]hjoystick}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj pygame.joystickuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hmanage joystick devicesh]hmanage joystick devices}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`key `h]j)}(hj>h]j)}(hj>h]hkey}hjCsbah}(h]h](jpypy-modeh]h]h!]uh%jhj@ubah}(h]h]h]h]h!]refdocj refdomainjMreftypemod refexplicitrefwarnjNj Nj  pygame.keyuh%jh'h(h)M hj<ubah}(h]h]h]h]h!]uh%hh'h(h)Khj9ubah}(h]h]h]h]h!]uh%jhj6ubj)}(hhh]h)}(hmanage the keyboardh]hmanage the keyboard}hjnsbah}(h]h]h]h]h!]uh%hh'h(h)Khjkubah}(h]h]h]h]h!]uh%jhj6ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`mouse `h]j)}(hjh]j)}(hjh]hmouse}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj  pygame.mouseuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hmanage the mouseh]hmanage the mouse}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h!:mod:`sndarray `h]j)}(hjh]j)}(hjh]hsndarray}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnjNj Nj pygame.sndarrayuh%jh'h(h)M hjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jhjubj)}(hhh]h)}(hmanipulate sounds with numpyh]hmanipulate sounds with numpy}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khj ubah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h#:mod:`surfarray `h]j)}(hj4 h]j)}(hj4 h]h surfarray}hj9 sbah}(h]h](jpypy-modeh]h]h!]uh%jhj6 ubah}(h]h]h]h]h!]refdocj refdomainjC reftypemod refexplicitrefwarnjNj Nj pygame.surfarrayuh%jh'h(h)M hj2 ubah}(h]h]h]h]h!]uh%hh'h(h)Khj/ ubah}(h]h]h]h]h!]uh%jhj, ubj)}(hhh]h)}(hmanipulate images with numpyh]hmanipulate images with numpy}hjd sbah}(h]h]h]h]h!]uh%hh'h(h)Khja ubah}(h]h]h]h]h!]uh%jhj, ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h:mod:`time `h]j)}(hj h]j)}(hj h]htime}hj sbah}(h]h](jpypy-modeh]h]h!]uh%jhj ubah}(h]h]h]h]h!]refdocj refdomainj reftypemod refexplicitrefwarnjNj Nj  pygame.timeuh%jh'h(h)M hj ubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubah}(h]h]h]h]h!]uh%jhj~ ubj)}(hhh]h)}(hcontrol timingh]hcontrol timing}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khj ubah}(h]h]h]h]h!]uh%jhj~ ubeh}(h]h]h]h]h!]uh%jhjubj)}(hhh](j)}(hhh]h)}(h#:mod:`transform `h]j)}(hj h]j)}(hj h]h transform}hj sbah}(h]h](jpypy-modeh]h]h!]uh%jhj ubah}(h]h]h]h]h!]refdocj refdomainj reftypemod refexplicitrefwarnjNj Nj pygame.transformuh%jh'h(h)M hj ubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubah}(h]h]h]h]h!]uh%jhj ubj)}(hhh]h)}(hscale, rotate, and flip imagesh]hscale, rotate, and flip images}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khj ubah}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]colsKuh%jhjubah}(h]h](colwidths-givenmore-to-exploreeh]h]h!]uh%j}hjlh&hh'h(h)Nubeh}(h]pygame-modules-overviewah]h]pygame modules overviewah]h!]uh%hHhj1h&hh'h(h)Mubeh}(h]closingah]h]closingah]h!]uh%hHhh]h&hh'h(h)Mubeh}(h]python-pygame-introductionah]h]python pygame introductionah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h] pygame-introah]h] pygame introah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksjfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jT jQ jL jI jjj6j3jYjVj{jxjjjyjvj.j+jD jA j< j9 u nametypes}(jT jL jj6jYj{jjyj.jD j< uh}(jQ hJjI h]jj j3j-jVjPjxjrjjjvjj+j|jA j1j9 jlu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/PygameIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3041406 pygame-2.6.1/docs/generated/doctrees/tut/SpriteIntro.doctree0000644000175100001770000023035614676242421023573 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h$TUTORIAL: Sprite Module Introductionh]h Text$TUTORIAL: Sprite Module Introduction}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource=/home/runner/work/pygame/pygame/docs/reST/tut/SpriteIntro.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h-Pygame Tutorials - Sprite Module Introductionh]h-Pygame Tutorials - Sprite Module Introduction}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hSprite Module Introductionh]hSprite Module Introduction}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)Kubh)}(hXvPygame version 1.3 comes with a new module, ``pygame.sprite``. This module is written in Python and includes some higher-level classes to manage your game objects. By using this module to its full potential, you can easily manage and draw your game objects. The sprite classes are very optimized, so it's likely your game will run faster with the sprite module than without.h](h,Pygame version 1.3 comes with a new module, }hhsbh literal)}(h``pygame.sprite``h]h pygame.sprite}hhsbah}(h]h]h]h]h!]uh%hhhubhX9. This module is written in Python and includes some higher-level classes to manage your game objects. By using this module to its full potential, you can easily manage and draw your game objects. The sprite classes are very optimized, so it's likely your game will run faster with the sprite module than without.}hhsbeh}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubh)}(hXThe sprite module is also meant to be very generic. It turns out you can use it with nearly any type of gameplay. All this flexibility comes with a slight penalty, it needs a little understanding to properly use it. The :mod:`reference documentation ` for the sprite module can keep you running, but you'll probably need a bit more explanation of how to use ``pygame.sprite`` in your own game.h](hThe sprite module is also meant to be very generic. It turns out you can use it with nearly any type of gameplay. All this flexibility comes with a slight penalty, it needs a little understanding to properly use it. The }hjsbh pending_xref)}(h.:mod:`reference documentation `h]h)}(hjh]hreference documentation}hjsbah}(h]h](xrefpypy-modeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoctut/SpriteIntro refdomainj'reftypemod refexplicitrefwarn py:moduleNpy:classN reftarget pygame.spriteuh%jh'h(h)Khjubhk for the sprite module can keep you running, but you'll probably need a bit more explanation of how to use }hjsbh)}(h``pygame.sprite``h]h pygame.sprite}hjAsbah}(h]h]h]h]h!]uh%hhjubh in your own game.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubh)}(hX?Several of the pygame examples (like "chimp" and "aliens") have been updated to use the sprite module. You may want to look into those first to see what this sprite module is all about. The chimp module even has its own line-by-line tutorial, which may help get more understanding of programming with python and pygame.h]hX?Several of the pygame examples (like "chimp" and "aliens") have been updated to use the sprite module. You may want to look into those first to see what this sprite module is all about. The chimp module even has its own line-by-line tutorial, which may help get more understanding of programming with python and pygame.}hjYsbah}(h]h]h]h]h!]uh%hh'h(h)Khh]h&hubh)}(hXsNote that this introduction will assume you have a bit of experience programming with python, and are somewhat familiar with the different parts of creating a simple game. In this tutorial the word "reference" is occasionally used. This represents a python variable. Variables in python are references, so you can have several variables all pointing to the same object.h]hXsNote that this introduction will assume you have a bit of experience programming with python, and are somewhat familiar with the different parts of creating a simple game. In this tutorial the word "reference" is occasionally used. This represents a python variable. Variables in python are references, so you can have several variables all pointing to the same object.}hjgsbah}(h]h]h]h]h!]uh%hh'h(h)K%hh]h&hubhI)}(hhh](hN)}(hHistory Lessonh]hHistory Lesson}hjxsbah}(h]h]h]h]h!]uh%hMhjuh&hh'h(h)K,ubh)}(hXThe term "sprite" is a holdover from older computer and game machines. These older boxes were unable to draw and erase normal graphics fast enough for them to work as games. These machines had special hardware to handle game like objects that needed to animate very quickly. These objects were called "sprites" and had special limitations, but could be drawn and updated very fast. They usually existed in special overlay buffers in the video. These days computers have become generally fast enough to handle sprite like objects without dedicated hardware. The term sprite is still used to represent just about anything in a 2D game that is animated.h]hXThe term "sprite" is a holdover from older computer and game machines. These older boxes were unable to draw and erase normal graphics fast enough for them to work as games. These machines had special hardware to handle game like objects that needed to animate very quickly. These objects were called "sprites" and had special limitations, but could be drawn and updated very fast. They usually existed in special overlay buffers in the video. These days computers have become generally fast enough to handle sprite like objects without dedicated hardware. The term sprite is still used to represent just about anything in a 2D game that is animated.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K.hjuh&hubeh}(h]history-lessonah]h]history lessonah]h!]uh%hHhh]h&hh'h(h)K,ubhI)}(hhh](hN)}(h The Classesh]h The Classes}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)K9ubh)}(hX'The sprite module comes with two main classes. The first is :class:`Sprite `, which should be used as a base class for all your game objects. This class doesn't really do anything on its own, it just includes several functions to help manage the game object. The other type of class is :class:`Group `. The ``Group`` class is a container for different ``Sprite`` objects. There are actually several different types of group classes. Some of the ``Groups`` can draw all the elements they contain, for example.h](h`h]h)}(hjh]hSprite}hjsbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.Spriteuh%jh'h(h)K;hjubh, which should be used as a base class for all your game objects. This class doesn't really do anything on its own, it just includes several functions to help manage the game object. The other type of class is }hjsbj)}(h$:class:`Group `h]h)}(hjh]hGroup}hjsbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.Groupuh%jh'h(h)K;hjubh. The }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh$ class is a container for different }hjsbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhjubhS objects. There are actually several different types of group classes. Some of the }hjsbh)}(h ``Groups``h]hGroups}hj!sbah}(h]h]h]h]h!]uh%hhjubh5 can draw all the elements they contain, for example.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K;hjh&hubh)}(hThis is all there really is to it. We'll start with a description of what each type of class does, and then discuss the proper ways to use these two classes.h]hThis is all there really is to it. We'll start with a description of what each type of class does, and then discuss the proper ways to use these two classes.}hj9sbah}(h]h]h]h]h!]uh%hh'h(h)KDhjh&hubeh}(h] the-classesah]h] the classesah]h!]uh%hHhh]h&hh'h(h)K9ubhI)}(hhh](hN)}(hThe Sprite Classh]hThe Sprite Class}hjRsbah}(h]h]h]h]h!]uh%hMhjOh&hh'h(h)KIubh)}(hXAs mentioned before, the Sprite class is designed to be a base class for all your game objects. You cannot really use it on its own, as it only has several methods to help it work with the different ``Group`` classes. The sprite keeps track of which groups it belongs to. The class constructor (``__init__`` method) takes an argument of a ``Group`` (or list of ``Groups``) the ``Sprite`` instance should belong to. You can also change the ``Group`` membership for the ``Sprite`` with the :meth:`add() ` and :meth:`remove() ` methods. There is also a :meth:`groups() ` method, which returns a list of the current groups containing the sprite.h](hAs mentioned before, the Sprite class is designed to be a base class for all your game objects. You cannot really use it on its own, as it only has several methods to help it work with the different }hj`sbh)}(h ``Group``h]hGroup}hjhsbah}(h]h]h]h]h!]uh%hhj`ubhW classes. The sprite keeps track of which groups it belongs to. The class constructor (}hj`sbh)}(h ``__init__``h]h__init__}hjzsbah}(h]h]h]h]h!]uh%hhj`ubh method) takes an argument of a }hj`sbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhj`ubh (or list of }hj`sbh)}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%hhj`ubh) the }hj`sbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhj`ubh4 instance should belong to. You can also change the }hj`sbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhj`ubh membership for the }hj`sbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhj`ubh with the }hj`sbj)}(h(:meth:`add() `h]h)}(hjh]hadd()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Sprite.adduh%jh'h(h)KKhj`ubh and }hj`sbj)}(h.:meth:`remove() `h]h)}(hj h]hremove()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhj ubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Sprite.removeuh%jh'h(h)KKhj`ubh methods. There is also a }hj`sbj)}(h.:meth:`groups() `h]h)}(hj0h]hgroups()}hj2sbah}(h]h](j&pypy-metheh]h]h!]uh%hhj.ubah}(h]h]h]h]h!]refdocj3 refdomainj<reftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Sprite.groupsuh%jh'h(h)KKhj`ubhJ method, which returns a list of the current groups containing the sprite.}hj`sbeh}(h]h]h]h]h!]uh%hh'h(h)KKhjOh&hubh)}(hXWhen using your Sprite classes it's best to think of them as "valid" or "alive" when they are belonging to one or more ``Groups``. When you remove the instance from all groups pygame will clean up the object. (Unless you have your own references to the instance somewhere else.) The :meth:`kill() ` method removes the sprite from all groups it belongs to. This will cleanly delete the sprite object. If you've put some little games together, you'll know sometimes cleanly deleting a game object can be tricky. The sprite also comes with an :meth:`alive() ` method, which returns true if it is still a member of any groups.h](hwWhen using your Sprite classes it's best to think of them as "valid" or "alive" when they are belonging to one or more }hjXsbh)}(h ``Groups``h]hGroups}hj`sbah}(h]h]h]h]h!]uh%hhjXubh. When you remove the instance from all groups pygame will clean up the object. (Unless you have your own references to the instance somewhere else.) The }hjXsbj)}(h*:meth:`kill() `h]h)}(hjth]hkill()}hjvsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjrubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Sprite.killuh%jh'h(h)KWhjXubh method removes the sprite from all groups it belongs to. This will cleanly delete the sprite object. If you've put some little games together, you'll know sometimes cleanly deleting a game object can be tricky. The sprite also comes with an }hjXsbj)}(h,:meth:`alive() `h]h)}(hjh]halive()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Sprite.aliveuh%jh'h(h)KWhjXubhB method, which returns true if it is still a member of any groups.}hjXsbeh}(h]h]h]h]h!]uh%hh'h(h)KWhjOh&hubeh}(h]the-sprite-classah]h]the sprite classah]h!]uh%hHhh]h&hh'h(h)KIubhI)}(hhh](hN)}(hThe Group Classh]hThe Group Class}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kdubh)}(hXThe ``Group`` class is just a simple container. Similar to the sprite, it has an :meth:`add() ` and :meth:`remove() ` method which can change which sprites belong to the group. You also can pass a sprite or list of sprites to the constructor (``__init__()`` method) to create a ``Group`` instance that contains some initial sprites.h](hThe }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubhD class is just a simple container. Similar to the sprite, it has an }hjsbj)}(h':meth:`add() `h]h)}(hjh]hadd()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.adduh%jh'h(h)Kfhjubh and }hjsbj)}(h-:meth:`remove() `h]h)}(hjh]hremove()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainj%reftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.removeuh%jh'h(h)Kfhjubh~ method which can change which sprites belong to the group. You also can pass a sprite or list of sprites to the constructor (}hjsbh)}(h``__init__()``h]h __init__()}hj;sbah}(h]h]h]h]h!]uh%hhjubh method) to create a }hjsbh)}(h ``Group``h]hGroup}hjMsbah}(h]h]h]h]h!]uh%hhjubh- instance that contains some initial sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kfhjh&hubh)}(hXlThe ``Group`` has a few other methods like :meth:`empty() ` to remove all sprites from the group and :meth:`copy() ` which will return a copy of the group with all the same members. Also the :meth:`has() ` method will quickly check if the ``Group`` contains a sprite or list of sprites.h](hThe }hjesbh)}(h ``Group``h]hGroup}hjmsbah}(h]h]h]h]h!]uh%hhjeubh has a few other methods like }hjesbj)}(h+:meth:`empty() `h]h)}(hjh]hempty()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.emptyuh%jh'h(h)Knhjeubh* to remove all sprites from the group and }hjesbj)}(h):meth:`copy() `h]h)}(hjh]hcopy()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.copyuh%jh'h(h)KnhjeubhK which will return a copy of the group with all the same members. Also the }hjesbj)}(h':meth:`has() `h]h)}(hjh]hhas()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.hasuh%jh'h(h)Knhjeubh" method will quickly check if the }hjesbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjeubh& contains a sprite or list of sprites.}hjesbeh}(h]h]h]h]h!]uh%hh'h(h)Knhjh&hubh)}(hXFThe other function you will use frequently is the :meth:`sprites() ` method. This returns an object that can be looped on to access every sprite the group contains. Currently this is just a list of the sprites, but in later version of python this will likely use iterators for better performance.h](h2The other function you will use frequently is the }hjsbj)}(h/:meth:`sprites() `h]h)}(hj h]h sprites()}hjsbah}(h]h](j&pypy-metheh]h]h!]uh%hhj ubah}(h]h]h]h]h!]refdocj3 refdomainjreftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.spritesuh%jh'h(h)Kuhjubh method. This returns an object that can be looped on to access every sprite the group contains. Currently this is just a list of the sprites, but in later version of python this will likely use iterators for better performance.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kuhjh&hubh)}(hX#As a shortcut, the ``Group`` also has an :meth:`update() ` method, which will call an ``update()`` method on every sprite in the group. Passing the same arguments to each one. Usually in a game you need some function that updates the state of a game object. It's very easy to call your own methods using the ``Group.sprites()`` method, but this is a shortcut that's used enough to be included. Also note that the base ``Sprite`` class has a "dummy" ``update()`` method that takes any sort of arguments and does nothing.h](hAs a shortcut, the }hj5sbh)}(h ``Group``h]hGroup}hj=sbah}(h]h]h]h]h!]uh%hhj5ubh also has an }hj5sbj)}(h-:meth:`update() `h]h)}(hjQh]hupdate()}hjSsbah}(h]h](j&pypy-metheh]h]h!]uh%hhjOubah}(h]h]h]h]h!]refdocj3 refdomainj]reftypemeth refexplicitrefwarnj9Nj:Nj;pygame.sprite.Group.updateuh%jh'h(h)K{hj5ubh method, which will call an }hj5sbh)}(h ``update()``h]hupdate()}hjssbah}(h]h]h]h]h!]uh%hhj5ubh method on every sprite in the group. Passing the same arguments to each one. Usually in a game you need some function that updates the state of a game object. It's very easy to call your own methods using the }hj5sbh)}(h``Group.sprites()``h]hGroup.sprites()}hjsbah}(h]h]h]h]h!]uh%hhj5ubh[ method, but this is a shortcut that's used enough to be included. Also note that the base }hj5sbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhj5ubh class has a "dummy" }hj5sbh)}(h ``update()``h]hupdate()}hjsbah}(h]h]h]h]h!]uh%hhj5ubh: method that takes any sort of arguments and does nothing.}hj5sbeh}(h]h]h]h]h!]uh%hh'h(h)K{hjh&hubh)}(hLastly, the Group has a couple other methods that allow you to use it with the builtin ``len()`` function, getting the number of sprites it contains, and the "truth" operator, which allows you to do "if mygroup:" to check if the group has any sprites.h](hWLastly, the Group has a couple other methods that allow you to use it with the builtin }hjsbh)}(h ``len()``h]hlen()}hjsbah}(h]h]h]h]h!]uh%hhjubh function, getting the number of sprites it contains, and the "truth" operator, which allows you to do "if mygroup:" to check if the group has any sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]the-group-classah]h]the group classah]h!]uh%hHhh]h&hh'h(h)KdubhI)}(hhh](hN)}(hMixing Them Togetherh]hMixing Them Together}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hXAt this point the two classes seem pretty basic. Not doing a lot more than you can do with a simple list and your own class of game objects. But there are some big advantages to using the ``Sprite`` and ``Group`` together. A sprite can belong to as many groups as you want. Remember as soon as it belongs to no groups, it will usually be cleared up (unless you have other "non-group" references to that object).h](hAt this point the two classes seem pretty basic. Not doing a lot more than you can do with a simple list and your own class of game objects. But there are some big advantages to using the }hjsbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhjubh and }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh together. A sprite can belong to as many groups as you want. Remember as soon as it belongs to no groups, it will usually be cleared up (unless you have other "non-group" references to that object).}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXThe first big thing is a fast simple way to categorize sprites. For example, say we had a Pacman-like game. We could make separate groups for the different types of objects in the game. Ghosts, Pac, and Pellets. When Pac eats a power pellet, we can change the state for all ghost objects by effecting everything in the Ghost group. This is quicker and simpler than looping through a list of all the game objects and checking which ones are ghosts.h]hXThe first big thing is a fast simple way to categorize sprites. For example, say we had a Pacman-like game. We could make separate groups for the different types of objects in the game. Ghosts, Pac, and Pellets. When Pac eats a power pellet, we can change the state for all ghost objects by effecting everything in the Ghost group. This is quicker and simpler than looping through a list of all the game objects and checking which ones are ghosts.}hj,sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXAdding and removing groups and sprites from each other is a very fast operation, quicker than using lists to store everything. Therefore you can very efficiently change group memberships. Groups can be used to work like simple attributes for each game object. Instead of tracking some attribute like "close_to_player" for a bunch of enemy objects, you could add them to a separate group. Then when you need to access all the enemies that are near the player, you already have a list of them, instead of going through a list of all the enemies, checking for the "close_to_player" flag. Later on your game could add multiple players, and instead of adding more "close_to_player2", "close_to_player3" attributes, you can easily add them to different groups for each player.h]hXAdding and removing groups and sprites from each other is a very fast operation, quicker than using lists to store everything. Therefore you can very efficiently change group memberships. Groups can be used to work like simple attributes for each game object. Instead of tracking some attribute like "close_to_player" for a bunch of enemy objects, you could add them to a separate group. Then when you need to access all the enemies that are near the player, you already have a list of them, instead of going through a list of all the enemies, checking for the "close_to_player" flag. Later on your game could add multiple players, and instead of adding more "close_to_player2", "close_to_player3" attributes, you can easily add them to different groups for each player.}hj:sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXAnother important benefit of using the ``Sprites`` and ``Groups`` is that the groups cleanly handle the deleting (or killing) of game objects. In a game where many objects are referencing other objects, sometimes deleting an object can be the hardest part, since it can't go away until it is not referenced by anyone. Say we have an object that is "chasing" another object. The chaser can keep a simple Group that references the object (or objects) it is chasing. If the object being chased happens to be destroyed, we don't need to worry about notifying the chaser to stop chasing. The chaser can see for itself that its group is now empty, and perhaps find a new target.h](h'Another important benefit of using the }hjHsbh)}(h ``Sprites``h]hSprites}hjPsbah}(h]h]h]h]h!]uh%hhjHubh and }hjHsbh)}(h ``Groups``h]hGroups}hjbsbah}(h]h]h]h]h!]uh%hhjHubhX_ is that the groups cleanly handle the deleting (or killing) of game objects. In a game where many objects are referencing other objects, sometimes deleting an object can be the hardest part, since it can't go away until it is not referenced by anyone. Say we have an object that is "chasing" another object. The chaser can keep a simple Group that references the object (or objects) it is chasing. If the object being chased happens to be destroyed, we don't need to worry about notifying the chaser to stop chasing. The chaser can see for itself that its group is now empty, and perhaps find a new target.}hjHsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hX6Again, the thing to remember is that adding and removing sprites from groups is a very cheap/fast operation. You may be best off by adding many groups to contain and organize your game objects. Some could even be empty for large portions of the game, there isn't any penalties for managing your game like this.h]hX6Again, the thing to remember is that adding and removing sprites from groups is a very cheap/fast operation. You may be best off by adding many groups to contain and organize your game objects. Some could even be empty for large portions of the game, there isn't any penalties for managing your game like this.}hjzsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]mixing-them-togetherah]h]mixing them togetherah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hThe Many Group Typesh]hThe Many Group Types}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hXThe above examples and reasons to use ``Sprites`` and ``Groups`` are only a tip of the iceberg. Another advantage is that the sprite module comes with several different types of ``Groups``. These groups all work just like a regular old ``Group``, but they also have added functionality (or slightly different functionality). Here's a list of the ``Group`` classes included with the sprite module.h](h&The above examples and reasons to use }hjsbh)}(h ``Sprites``h]hSprites}hjsbah}(h]h]h]h]h!]uh%hhjubh and }hjsbh)}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%hhjubhr are only a tip of the iceberg. Another advantage is that the sprite module comes with several different types of }hjsbh)}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%hhjubh0. These groups all work just like a regular old }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubhf, but they also have added functionality (or slightly different functionality). Here's a list of the }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh) classes included with the sprite module.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh block_quote)}(hX:class:`Group ` This is the standard "no frills" group mainly explained above. Most of the other ``Groups`` are derived from this one, but not all. :class:`GroupSingle ` This works exactly like the regular ``Group`` class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites. :class:`RenderPlain ` This is a standard group derived from ``Group``. It has a draw() method that draws all the sprites it contains to the screen (or any ``Surface``). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it. :class:`RenderClear ` This is derived from the ``RenderPlain`` group, and adds a method named ``clear()``. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the ``clear()`` method is called. :class:`RenderUpdates ` This is the Cadillac of rendering ``Groups``. It is inherited from ``RenderClear``, but changes the ``draw()`` method to also return a list of pygame ``Rects``, which represent all the areas on screen that have been changed. h](h)}(h$:class:`Group `h]j)}(hjh]h)}(hjh]hGroup}hjsbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainj reftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.Groupuh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubj )}(hThis is the standard "no frills" group mainly explained above. Most of the other ``Groups`` are derived from this one, but not all. h]h)}(hThis is the standard "no frills" group mainly explained above. Most of the other ``Groups`` are derived from this one, but not all.h](hQThis is the standard "no frills" group mainly explained above. Most of the other }hj<sbh)}(h ``Groups``h]hGroups}hjDsbah}(h]h]h]h]h!]uh%hhj<ubh( are derived from this one, but not all.}hj<sbeh}(h]h]h]h]h!]uh%hh'h(h)Khj8ubah}(h]h]h]h]h!]uh%j h'h(h)Khj ubh)}(h0:class:`GroupSingle `h]j)}(hjdh]h)}(hjdh]h GroupSingle}hjisbah}(h]h](j&pypy-classeh]h]h!]uh%hhjfubah}(h]h]h]h]h!]refdocj3 refdomainjsreftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.GroupSingleuh%jh'h(h)Khjbubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubj )}(hXThis works exactly like the regular ``Group`` class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites. h]h)}(hThis works exactly like the regular ``Group`` class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites.h](h$This works exactly like the regular }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j h'h(h)Khj ubh)}(h0:class:`RenderPlain `h]j)}(hjh]h)}(hjh]h RenderPlain}hjsbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.RenderPlainuh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubj )}(hX,This is a standard group derived from ``Group``. It has a draw() method that draws all the sprites it contains to the screen (or any ``Surface``). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it. h]h)}(hX+This is a standard group derived from ``Group``. It has a draw() method that draws all the sprites it contains to the screen (or any ``Surface``). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it.h](h&This is a standard group derived from }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubhV. It has a draw() method that draws all the sprites it contains to the screen (or any }hjsbh)}(h ``Surface``h]hSurface}hjsbah}(h]h]h]h]h!]uh%hhjubh). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j h'h(h)Khj ubh)}(h0:class:`RenderClear `h]j)}(hjh]h)}(hjh]h RenderClear}hj!sbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainj+reftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.RenderClearuh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubj )}(hXTThis is derived from the ``RenderPlain`` group, and adds a method named ``clear()``. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the ``clear()`` method is called. h]h)}(hXSThis is derived from the ``RenderPlain`` group, and adds a method named ``clear()``. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the ``clear()`` method is called.h](hThis is derived from the }hjGsbh)}(h``RenderPlain``h]h RenderPlain}hjOsbah}(h]h]h]h]h!]uh%hhjGubh group, and adds a method named }hjGsbh)}(h ``clear()``h]hclear()}hjasbah}(h]h]h]h]h!]uh%hhjGubh. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the }hjGsbh)}(h ``clear()``h]hclear()}hjssbah}(h]h]h]h]h!]uh%hhjGubh method is called.}hjGsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjCubah}(h]h]h]h]h!]uh%j h'h(h)Khj ubh)}(h4:class:`RenderUpdates `h]j)}(hjh]h)}(hjh]h RenderUpdates}hjsbah}(h]h](j&pypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj3 refdomainjreftypeclass refexplicitrefwarnj9Nj:Nj;pygame.sprite.RenderUpdatesuh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj ubj )}(hThis is the Cadillac of rendering ``Groups``. It is inherited from ``RenderClear``, but changes the ``draw()`` method to also return a list of pygame ``Rects``, which represent all the areas on screen that have been changed. h]h)}(hThis is the Cadillac of rendering ``Groups``. It is inherited from ``RenderClear``, but changes the ``draw()`` method to also return a list of pygame ``Rects``, which represent all the areas on screen that have been changed.h](h"This is the Cadillac of rendering }hjsbh)}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%hhjubh. It is inherited from }hjsbh)}(h``RenderClear``h]h RenderClear}hjsbah}(h]h]h]h]h!]uh%hhjubh, but changes the }hjsbh)}(h ``draw()``h]hdraw()}hjsbah}(h]h]h]h]h!]uh%hhjubh( method to also return a list of pygame }hjsbh)}(h ``Rects``h]hRects}hjsbah}(h]h]h]h]h!]uh%hhjubhA, which represent all the areas on screen that have been changed.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j h'h(h)Khj ubeh}(h]h]h]h]h!]uh%j h'h(h)Khjh&hubh)}(hXThat is the list of different groups available We'll discuss more about these rendering groups in the next section. There's nothing stopping you from creating your own Group classes as well. They are just python code, so you can inherit from one of these and add/change whatever you want. In the future I hope we can add a couple more ``Groups`` to this list. A ``GroupMulti`` which is like the ``GroupSingle``, but can hold up to a given number of sprites (in some sort of circular buffer?). Also a super-render group that can clear the position of the old sprites without needing a background image to do it (by grabbing a copy of the screen before blitting). Who knows really, but in the future we can add more useful classes to this list.h](hXOThat is the list of different groups available We'll discuss more about these rendering groups in the next section. There's nothing stopping you from creating your own Group classes as well. They are just python code, so you can inherit from one of these and add/change whatever you want. In the future I hope we can add a couple more }hj sbh)}(h ``Groups``h]hGroups}hj( sbah}(h]h]h]h]h!]uh%hhj ubh to this list. A }hj sbh)}(h``GroupMulti``h]h GroupMulti}hj: sbah}(h]h]h]h]h!]uh%hhj ubh which is like the }hj sbh)}(h``GroupSingle``h]h GroupSingle}hjL sbah}(h]h]h]h]h!]uh%hhj ubhXL, but can hold up to a given number of sprites (in some sort of circular buffer?). Also a super-render group that can clear the position of the old sprites without needing a background image to do it (by grabbing a copy of the screen before blitting). Who knows really, but in the future we can add more useful classes to this list.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]the-many-group-typesah]h]the many group typesah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hThe Rendering Groupsh]hThe Rendering Groups}hjo sbah}(h]h]h]h]h!]uh%hMhjl h&hh'h(h)Kubh)}(hXFrom above we can see there are three different rendering groups. We could probably just get away with the ``RenderUpdates`` one, but it adds overhead not really needed for something like a scrolling game. So we have a couple tools here, pick the right one for the right job.h](hkFrom above we can see there are three different rendering groups. We could probably just get away with the }hj} sbh)}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%hhj} ubh one, but it adds overhead not really needed for something like a scrolling game. So we have a couple tools here, pick the right one for the right job.}hj} sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjl h&hubh)}(hX For a scrolling type game, where the background completely changes every frame, we obviously don't need to worry about python's update rectangles in the call to ``display.update()``. You should definitely go with the ``RenderPlain`` group here to manage your rendering.h](hFor a scrolling type game, where the background completely changes every frame, we obviously don't need to worry about python's update rectangles in the call to }hj sbh)}(h``display.update()``h]hdisplay.update()}hj sbah}(h]h]h]h]h!]uh%hhj ubh$. You should definitely go with the }hj sbh)}(h``RenderPlain``h]h RenderPlain}hj sbah}(h]h]h]h]h!]uh%hhj ubh% group here to manage your rendering.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjl h&hubh)}(hXFor games where the background is more stationary, you definitely don't want pygame updating the entire screen (since it doesn't need to). This type of game usually involves erasing the old position of each object, then drawing it in a new place for each frame. This way we are only changing what is necessary. Most of the time you will just want to use the ``RenderUpdates`` class here. Since you will also want to pass this list of changes to the ``display.update()`` function.h](hXfFor games where the background is more stationary, you definitely don't want pygame updating the entire screen (since it doesn't need to). This type of game usually involves erasing the old position of each object, then drawing it in a new place for each frame. This way we are only changing what is necessary. Most of the time you will just want to use the }hj sbh)}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%hhj ubhJ class here. Since you will also want to pass this list of changes to the }hj sbh)}(h``display.update()``h]hdisplay.update()}hj sbah}(h]h]h]h]h!]uh%hhj ubh function.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjl h&hubh)}(hXThe ``RenderUpdates`` class also does a good job at minimizing overlapping areas in the list of updated rectangles. If the previous position and current position of an object overlap, it will merge them into a single rectangle. Combined with the fact that it properly handles deleted objects, this is one powerful ``Group`` class. If you've written a game that manages the changed rectangles for the objects in a game, you know this is the cause for a lot of messy code in your game. Especially once you start to throw in objects that can be deleted at any time. All this work is reduced to a ``clear()`` and ``draw()`` method with this monster class. Plus with the overlap checking, it is likely faster than when you did it manually.h](hThe }hj sbh)}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%hhj ubhX% class also does a good job at minimizing overlapping areas in the list of updated rectangles. If the previous position and current position of an object overlap, it will merge them into a single rectangle. Combined with the fact that it properly handles deleted objects, this is one powerful }hj sbh)}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%hhj ubhX class. If you've written a game that manages the changed rectangles for the objects in a game, you know this is the cause for a lot of messy code in your game. Especially once you start to throw in objects that can be deleted at any time. All this work is reduced to a }hj sbh)}(h ``clear()``h]hclear()}hj- sbah}(h]h]h]h]h!]uh%hhj ubh and }hj sbh)}(h ``draw()``h]hdraw()}hj? sbah}(h]h]h]h]h!]uh%hhj ubhs method with this monster class. Plus with the overlap checking, it is likely faster than when you did it manually.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjl h&hubh)}(hXIAlso note that there's nothing stopping you from mixing and matching these render groups in your game. You should definitely use multiple rendering groups when you want to do layering with your sprites. Also if the screen is split into multiple sections, perhaps each section of the screen should use an appropriate render group?h]hXIAlso note that there's nothing stopping you from mixing and matching these render groups in your game. You should definitely use multiple rendering groups when you want to do layering with your sprites. Also if the screen is split into multiple sections, perhaps each section of the screen should use an appropriate render group?}hjW sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjl h&hubeh}(h]the-rendering-groupsah]h]the rendering groupsah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hCollision Detectionh]hCollision Detection}hjp sbah}(h]h]h]h]h!]uh%hMhjm h&hh'h(h)Mubh)}(hThe sprite module also comes with two very generic collision detection functions. For more complex games, these really won't work for you, but you can easily grab the source code for them, and modify them as needed.h]hThe sprite module also comes with two very generic collision detection functions. For more complex games, these really won't work for you, but you can easily grab the source code for them, and modify them as needed.}hj~ sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjm h&hubh)}(h4Here's a summary of what they are, and what they do.h]h4Here's a summary of what they are, and what they do.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjm h&hubj )}(hXe :func:`spritecollide(sprite, group, dokill, collided = None) -> list ` This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the ``kill()`` method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) This finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new ``Explosion`` where the bomb was. (Note, the ``Explosion`` class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.) :func:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary ` This is similar to the ``spritecollide`` function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a ``dokill`` argument for the sprites in each list. When ``dokill1`` is true, the colliding sprites in ``group1`` will be ``kill()``ed. When ``dokill2`` is true, we get the same results for ``group2``. The dictionary it returns works like this; each key in the dictionary is a sprite from ``group1`` that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 This code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the ``values()`` or ``items()`` if we wanted to do something to the specific shots that collided with aliens. If we did loop over the ``values()`` we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens". h](h)}(hc:func:`spritecollide(sprite, group, dokill, collided = None) -> list `h]j)}(hj h]h)}(hj h]h=spritecollide(sprite, group, dokill, collided = None) -> list}hj sbah}(h]h](j&pypy-funceh]h]h!]uh%hhj ubah}(h]h]h]h]h!]refdocj3 refdomainj reftypefunc refexplicitrefwarnj9Nj:Nj;pygame.sprite.spritecollideuh%jh'h(h)M hj ubah}(h]h]h]h]h!]uh%hh'h(h)M hj ubj )}(hX9This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the ``kill()`` method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) This finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new ``Explosion`` where the bomb was. (Note, the ``Explosion`` class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.) h](h)}(hXThis checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the ``kill()`` method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop ::h](hX(This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the }hj sbh)}(h ``kill()``h]hkill()}hj sbah}(h]h]h]h]h!]uh%hhj ubh method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M"hj ubh literal_block)}(hl>>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0)h]hl>>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0)}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)M*hj ubh)}(hXThis finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new ``Explosion`` where the bomb was. (Note, the ``Explosion`` class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.)h](hThis finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new }hj sbh)}(h ``Explosion``h]h Explosion}hj sbah}(h]h]h]h]h!]uh%hhj ubh where the bomb was. (Note, the }hj sbh)}(h ``Explosion``h]h Explosion}hj sbah}(h]h]h]h]h!]uh%hhj ubh class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.)}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M.hj ubeh}(h]h]h]h]h!]uh%j h'h(h)M"hj ubh)}(hr:func:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary `h]j)}(hj5 h]h)}(hj5 h]hMgroupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary}hj: sbah}(h]h](j&pypy-funceh]h]h!]uh%hhj7 ubah}(h]h]h]h]h!]refdocj3 refdomainjD reftypefunc refexplicitrefwarnj9Nj:Nj;pygame.sprite.groupcollideuh%jh'h(h)M5hj3 ubah}(h]h]h]h]h!]uh%hh'h(h)M5hj ubj )}(hX This is similar to the ``spritecollide`` function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a ``dokill`` argument for the sprites in each list. When ``dokill1`` is true, the colliding sprites in ``group1`` will be ``kill()``ed. When ``dokill2`` is true, we get the same results for ``group2``. The dictionary it returns works like this; each key in the dictionary is a sprite from ``group1`` that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 This code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the ``values()`` or ``items()`` if we wanted to do something to the specific shots that collided with aliens. If we did loop over the ``values()`` we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens". h](h)}(hXlThis is similar to the ``spritecollide`` function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a ``dokill`` argument for the sprites in each list. When ``dokill1`` is true, the colliding sprites in ``group1`` will be ``kill()``ed. When ``dokill2`` is true, we get the same results for ``group2``. The dictionary it returns works like this; each key in the dictionary is a sprite from ``group1`` that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best ::h](hThis is similar to the }hj` sbh)}(h``spritecollide``h]h spritecollide}hjh sbah}(h]h]h]h]h!]uh%hhj` ubh function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a }hj` sbh)}(h ``dokill``h]hdokill}hjz sbah}(h]h]h]h]h!]uh%hhj` ubh- argument for the sprites in each list. When }hj` sbh)}(h ``dokill1``h]hdokill1}hj sbah}(h]h]h]h]h!]uh%hhj` ubh# is true, the colliding sprites in }hj` sbh)}(h ``group1``h]hgroup1}hj sbah}(h]h]h]h]h!]uh%hhj` ubh will be }hj` sbh)}(h``kill()``ed. When ``dokill2``h]hkill()``ed. When ``dokill2}hj sbah}(h]h]h]h]h!]uh%hhj` ubh& is true, we get the same results for }hj` sbh)}(h ``group2``h]hgroup2}hj sbah}(h]h]h]h]h!]uh%hhj` ubhY. The dictionary it returns works like this; each key in the dictionary is a sprite from }hj` sbh)}(h ``group1``h]hgroup1}hj sbah}(h]h]h]h]h!]uh%hhj` ubh that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best}hj` sbeh}(h]h]h]h]h!]uh%hh'h(h)M7hj\ ubj )}(h>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1h]h>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)MAhj\ ubh)}(hXThis code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the ``values()`` or ``items()`` if we wanted to do something to the specific shots that collided with aliens. If we did loop over the ``values()`` we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens".h](hThis code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the }hj sbh)}(h ``values()``h]hvalues()}hj sbah}(h]h]h]h]h!]uh%hhj ubh or }hj sbh)}(h ``items()``h]hitems()}hj sbah}(h]h]h]h]h!]uh%hhj ubhg if we wanted to do something to the specific shots that collided with aliens. If we did loop over the }hj sbh)}(h ``values()``h]hvalues()}hj& sbah}(h]h]h]h]h!]uh%hhj ubh we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens".}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)MFhj\ ubeh}(h]h]h]h]h!]uh%j h'h(h)M7hj ubeh}(h]h]h]h]h!]uh%j h'h(h)M hjm h&hubh)}(hXThose are the basic collision functions that come with pygame. It should be easy to roll your own that perhaps use something different than the "rect" attribute. Or maybe try to fine-tweak your code a little more by directly effecting the collision object, instead of building a list of the collision? The code in the sprite collision functions is very optimized, but you could speed it up slightly by taking out some functionality you don't need.h]hXThose are the basic collision functions that come with pygame. It should be easy to roll your own that perhaps use something different than the "rect" attribute. Or maybe try to fine-tweak your code a little more by directly effecting the collision object, instead of building a list of the collision? The code in the sprite collision functions is very optimized, but you could speed it up slightly by taking out some functionality you don't need.}hjJ sbah}(h]h]h]h]h!]uh%hh'h(h)MNhjm h&hubeh}(h]collision-detectionah]h]collision detectionah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hCommon Problemsh]hCommon Problems}hjc sbah}(h]h]h]h]h!]uh%hMhj` h&hh'h(h)MWubh)}(hX4Currently there is one main problem that catches new users. When you derive your new sprite class with the Sprite base, you **must** call the ``Sprite.__init__()`` method from your own class ``__init__()`` method. If you forget to call the ``Sprite.__init__()`` method, you get a cryptic error, like this ::h](h|Currently there is one main problem that catches new users. When you derive your new sprite class with the Sprite base, you }hjq sbh strong)}(h**must**h]hmust}hj{ sbah}(h]h]h]h]h!]uh%jy hjq ubh call the }hjq sbh)}(h``Sprite.__init__()``h]hSprite.__init__()}hj sbah}(h]h]h]h]h!]uh%hhjq ubh method from your own class }hjq sbh)}(h``__init__()``h]h __init__()}hj sbah}(h]h]h]h]h!]uh%hhjq ubh$ method. If you forget to call the }hjq sbh)}(h``Sprite.__init__()``h]hSprite.__init__()}hj sbah}(h]h]h]h]h!]uh%hhjq ubh+ method, you get a cryptic error, like this}hjq sbeh}(h]h]h]h]h!]uh%hh'h(h)MYhj` h&hubj )}(hAAttributeError: 'mysprite' instance has no attribute '_Sprite__g'h]hAAttributeError: 'mysprite' instance has no attribute '_Sprite__g'}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)M_hj` h&hubeh}(h]common-problemsah]h]common problemsah]h!]uh%hHhh]h&hh'h(h)MWubhI)}(hhh](hN)}(h'Extending Your Own Classes *(Advanced)*h](hExtending Your Own Classes }0hj sbh emphasis)}(h *(Advanced)*h]h (Advanced)}hj sbah}(h]h]h]h]h!]uh%j hj ubeh}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mcubh)}(hBecause of speed concerns, the current ``Group`` classes try to only do exactly what they need, and not handle a lot of general situations. If you decide you need extra features, you may want to create your own ``Group`` class.h](h'Because of speed concerns, the current }hj sbh)}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%hhj ubh classes try to only do exactly what they need, and not handle a lot of general situations. If you decide you need extra features, you may want to create your own }hj sbh)}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%hhj ubh class.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mehj h&hubh)}(hXDThe ``Sprite`` and ``Group`` classes were designed to be extended, so feel free to create your own ``Group`` classes to do specialized things. The best place to start is probably the actual python source code for the sprite module. Looking at the current ``Sprite`` groups should be enough example on how to create your own.h](hThe }hj2 sbh)}(h ``Sprite``h]hSprite}hj: sbah}(h]h]h]h]h!]uh%hhj2 ubh and }hj2 sbh)}(h ``Group``h]hGroup}hjL sbah}(h]h]h]h]h!]uh%hhj2 ubhG classes were designed to be extended, so feel free to create your own }hj2 sbh)}(h ``Group``h]hGroup}hj^ sbah}(h]h]h]h]h!]uh%hhj2 ubh classes to do specialized things. The best place to start is probably the actual python source code for the sprite module. Looking at the current }hj2 sbh)}(h ``Sprite``h]hSprite}hjp sbah}(h]h]h]h]h!]uh%hhj2 ubh; groups should be enough example on how to create your own.}hj2 sbeh}(h]h]h]h]h!]uh%hh'h(h)Mihj h&hubh)}(hX,For example, here is the source code for a rendering ``Group`` that calls a ``render()`` method for each sprite, instead of just blitting an "image" variable from it. Since we want it to also handle updated areas, we will start with a copy of the original ``RenderUpdates`` group, here is the code::h](h5For example, here is the source code for a rendering }hj sbh)}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%hhj ubh that calls a }hj sbh)}(h ``render()``h]hrender()}hj sbah}(h]h]h]h]h!]uh%hhj ubh method for each sprite, instead of just blitting an "image" variable from it. Since we want it to also handle updated areas, we will start with a copy of the original }hj sbh)}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%hhj ubh group, here is the code:}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mohj h&hubj )}(hXclass RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirtyh]hXclass RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)Mthj h&hubh)}(hmFollowing is more information on how you could create your own ``Sprite`` and ``Group`` objects from scratch.h](h?Following is more information on how you could create your own }hj sbh)}(h ``Sprite``h]hSprite}hj sbah}(h]h]h]h]h!]uh%hhj ubh and }hj sbh)}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%hhj ubh objects from scratch.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXThe ``Sprite`` objects only "require" two methods. "add_internal()" and "remove_internal()". These are called by the ``Group`` classes when they are removing a sprite from themselves. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a group. Your ``Sprite`` will need some way to also keep track of the ``Groups`` it belongs to. You will likely want to try to match the other methods and arguments to the real ``Sprite`` class, but if you're not going to use those methods, you sure don't need them.h](hThe }hj sbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhj ubhh objects only "require" two methods. "add_internal()" and "remove_internal()". These are called by the }hj sbh)}(h ``Group``h]hGroup}hj&sbah}(h]h]h]h]h!]uh%hhj ubh> classes when they are removing a sprite from themselves. The }hj sbh)}(h``add_internal()``h]hadd_internal()}hj8sbah}(h]h]h]h]h!]uh%hhj ubh and }hj sbh)}(h``remove_internal()``h]hremove_internal()}hjJsbah}(h]h]h]h]h!]uh%hhj ubh/ have a single argument which is a group. Your }hj sbh)}(h ``Sprite``h]hSprite}hj\sbah}(h]h]h]h]h!]uh%hhj ubh. will need some way to also keep track of the }hj sbh)}(h ``Groups``h]hGroups}hjnsbah}(h]h]h]h]h!]uh%hhj ubha it belongs to. You will likely want to try to match the other methods and arguments to the real }hj sbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhj ubhO class, but if you're not going to use those methods, you sure don't need them.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXIt is almost the same requirements for creating your own ``Group``. In fact, if you look at the source you'll see the ``GroupSingle`` isn't derived from the ``Group`` class, it just implements the same methods so you can't really tell the difference. Again you need an "add_internal()" and "remove_internal()" method that the sprites call when they want to belong or remove themselves from the group. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a sprite. The only other requirement for the ``Group`` classes is they have a dummy attribute named "_spritegroup". It doesn't matter what the value is, as long as the attribute is present. The Sprite classes can look for this attribute to determine the difference between a "group" and any ordinary python container. (This is important, because several sprite methods can take an argument of a single group, or a sequence of groups. Since they both look similar, this is the most flexible way to "see" the difference.)h](h9It is almost the same requirements for creating your own }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh4. In fact, if you look at the source you'll see the }hjsbh)}(h``GroupSingle``h]h GroupSingle}hjsbah}(h]h]h]h]h!]uh%hhjubh isn't derived from the }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubh class, it just implements the same methods so you can't really tell the difference. Again you need an "add_internal()" and "remove_internal()" method that the sprites call when they want to belong or remove themselves from the group. The }hjsbh)}(h``add_internal()``h]hadd_internal()}hjsbah}(h]h]h]h]h!]uh%hhjubh and }hjsbh)}(h``remove_internal()``h]hremove_internal()}hjsbah}(h]h]h]h]h!]uh%hhjubhN have a single argument which is a sprite. The only other requirement for the }hjsbh)}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%hhjubhX classes is they have a dummy attribute named "_spritegroup". It doesn't matter what the value is, as long as the attribute is present. The Sprite classes can look for this attribute to determine the difference between a "group" and any ordinary python container. (This is important, because several sprite methods can take an argument of a single group, or a sequence of groups. Since they both look similar, this is the most flexible way to "see" the difference.)}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hYou should go through the code for the sprite module. While the code is a bit "tuned", it's got enough comments to help you follow along. There's even a TODO section in the source if you feel like contributing.h]hYou should go through the code for the sprite module. While the code is a bit "tuned", it's got enough comments to help you follow along. There's even a TODO section in the source if you feel like contributing.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]#extending-your-own-classes-advancedah]h]%extending your own classes (advanced)ah]h!]uh%hHhh]h&hh'h(h)Mcubeh}(h]sprite-module-introductionah]h]sprite module introductionah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h]+pygame-tutorials-sprite-module-introductionah]h]-pygame tutorials - sprite module introductionah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjberror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j5j2j-j*jjjLjIjjjjjjji jf jj jg j] jZ j j j%j"u nametypes}(j5j-jjLjjjji jj j] j j%uh}(j2hJj*h]jjujIjjjOjjjjjf jjg jl jZ jm j j` j"j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/SpriteIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3571405 pygame-2.6.1/docs/generated/doctrees/tut/SurfarrayIntro.doctree0000644000175100001770000024045414676242421024303 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h-TUTORIAL:Introduction to the surfarray moduleh]h Text-TUTORIAL:Introduction to the surfarray module}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource@/home/runner/work/pygame/pygame/docs/reST/tut/SurfarrayIntro.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h)Pygame Tutorials - Surfarray Introductionh]h)Pygame Tutorials - Surfarray Introduction}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hSurfarray Introductionh]hSurfarray Introduction}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhzsbah}(h]h]h]h]h!]uh%hxhhuh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hhh]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhuubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubht)}(hhh](hy)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hxhhh'h(h)Kubh)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hsh'h(h)Khhph&hubeh}(h]h]docinfoah]h]h!]uh%hnhh]h&hh'h(h)KubhI)}(hhh](hN)}(h Introductionh]h Introduction}hhsbah}(h]h]h]h]h!]uh%hMhhh&hh'h(h)Kubh)}(hXThis tutorial will attempt to introduce users to both NumPy and the pygame surfarray module. To beginners, the code that uses surfarray can be quite intimidating. But actually there are only a few concepts to understand and you will be up and running. Using the surfarray module, it becomes possible to perform pixel level operations from straight python code. The performance can become quite close to the level of doing the code in C.h]hXThis tutorial will attempt to introduce users to both NumPy and the pygame surfarray module. To beginners, the code that uses surfarray can be quite intimidating. But actually there are only a few concepts to understand and you will be up and running. Using the surfarray module, it becomes possible to perform pixel level operations from straight python code. The performance can become quite close to the level of doing the code in C.}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(hYou may just want to jump down to the *"Examples"* section to get an idea of what is possible with this module, then start at the beginning here to work your way up.h](h&You may just want to jump down to the }hj sbh emphasis)}(h *"Examples"*h]h "Examples"}hjsbah}(h]h]h]h]h!]uh%jhj ubhs section to get an idea of what is possible with this module, then start at the beginning here to work your way up.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Khhh&hubh)}(hXNow I won't try to fool you into thinking everything is very easy. To get more advanced effects by modifying pixel values is very tricky. Just mastering NumPy takes a lot of learning. In this tutorial I'll be sticking with the basics and using a lot of examples in an attempt to plant seeds of wisdom. After finishing the tutorial you should have a basic handle on how the surfarray works.h]hXNow I won't try to fool you into thinking everything is very easy. To get more advanced effects by modifying pixel values is very tricky. Just mastering NumPy takes a lot of learning. In this tutorial I'll be sticking with the basics and using a lot of examples in an attempt to plant seeds of wisdom. After finishing the tutorial you should have a basic handle on how the surfarray works.}hj-sbah}(h]h]h]h]h!]uh%hh'h(h)K"hhh&hubeh}(h] introductionah]h] introductionah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hNumPyh]hNumPy}hjFsbah}(h]h]h]h]h!]uh%hMhjCh&hh'h(h)K+ubh)}(hXIf you do not have the python NumPy package installed, you will need to do that now, by following the `NumPy Installation Guide `_. To make sure NumPy is working for you, you should get something like this from the interactive python prompt. ::h](hfIf you do not have the python NumPy package installed, you will need to do that now, by following the }hjTsbh)}(h8`NumPy Installation Guide `_h]hNumPy Installation Guide}(hj\hNumPy Installation Guideubah}(h]h]h]h]h!]nameNumPy Installation Guiderefurihttps://numpy.org/install/uh%hhjTubh target)}(h h]h}(h]numpy-installation-guideah]h]numpy installation guideah]h!]refurijnuh%jo referencedKhjTubho. To make sure NumPy is working for you, you should get something like this from the interactive python prompt.}hjTsbeh}(h]h]h]h]h!]uh%hh'h(h)K-hjCh&hubh literal_block)}(hXs>>> from numpy import * #import numeric >>> a = array((1,2,3,4,5)) #create an array >>> a #display the array array([1, 2, 3, 4, 5]) >>> a[2] #index into the array 3 >>> a*2 #new array with twiced values array([ 2, 4, 6, 8, 10])h]hXs>>> from numpy import * #import numeric >>> a = array((1,2,3,4,5)) #create an array >>> a #display the array array([1, 2, 3, 4, 5]) >>> a[2] #index into the array 3 >>> a*2 #new array with twiced values array([ 2, 4, 6, 8, 10])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K3hjCh&hubh)}(hX9As you can see, the NumPy module gives us a new data type, the *array*. This object holds an array of fixed size, and all values inside are of the same type. The arrays can also be multidimensional, which is how we will use them with images. There's a bit more to it than this, but it is enough to get us started.h](h?As you can see, the NumPy module gives us a new data type, the }hjsbj)}(h*array*h]harray}hjsbah}(h]h]h]h]h!]uh%jhjubh. This object holds an array of fixed size, and all values inside are of the same type. The arrays can also be multidimensional, which is how we will use them with images. There's a bit more to it than this, but it is enough to get us started.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K>> len(a) #get array size 5 >>> a[2:] #elements 2 and up array([3, 4, 5]) >>> a[:-2] #all except last 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #add first and last array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #add arrays of wrong sizes Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,)h]hX>>> len(a) #get array size 5 >>> a[2:] #elements 2 and up array([3, 4, 5]) >>> a[:-2] #all except last 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #add first and last array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #add arrays of wrong sizes Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KIhjCh&hubh)}(hXWe get an error on the last command, because we try add together two arrays that are different sizes. In order for two arrays two operate with each other, including comparisons and assignment, they must have the same dimensions. It is very important to know that the new arrays created from slicing the original all reference the same values. So changing the values in a slice also changes the original values. It is important how this is done. ::h]hXWe get an error on the last command, because we try add together two arrays that are different sizes. In order for two arrays two operate with each other, including comparisons and assignment, they must have the same dimensions. It is very important to know that the new arrays created from slicing the original all reference the same values. So changing the values in a slice also changes the original values. It is important how this is done.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KVhjCh&hubj)}(hX>>> a #show our starting array array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #slice middle 2 elements >>> aa #show the slice array([2, 3]) >>> aa[1] = 13 #chance value in slice >>> a #show change in original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #make copy of array >>> aaa #show copy array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #set middle values to 0 >>> aaa #show copy array([1, 0, 0, 0, 5]) >>> a #show original again array([ 1, 2, 13, 4, 5])h]hX>>> a #show our starting array array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #slice middle 2 elements >>> aa #show the slice array([2, 3]) >>> aa[1] = 13 #chance value in slice >>> a #show change in original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #make copy of array >>> aaa #show copy array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #set middle values to 0 >>> aaa #show copy array([1, 0, 0, 0, 5]) >>> a #show original again array([ 1, 2, 13, 4, 5])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K]hjCh&hubh)}(hNow we will look at small arrays with two dimensions. Don't be too worried, getting started it is the same as having a two dimensional tuple *(a tuple inside a tuple)*. Let's get started with two dimensional arrays. ::h](hNow we will look at small arrays with two dimensions. Don't be too worried, getting started it is the same as having a two dimensional tuple }hjsbj)}(h*(a tuple inside a tuple)*h]h(a tuple inside a tuple)}hj sbah}(h]h]h]h]h!]uh%jhjubh0. Let's get started with two dimensional arrays.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KnhjCh&hubj)}(hX>>> row1 = (1,2,3) #create a tuple of vals >>> row2 = (3,4,5) #another tuple >>> (row1,row2) #show as a 2D tuple ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #create a 2D array >>> b #show the array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #show a new 2D array array([[1, 2], [3, 4], [5, 6]])h]hX>>> row1 = (1,2,3) #create a tuple of vals >>> row2 = (3,4,5) #another tuple >>> (row1,row2) #show as a 2D tuple ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #create a 2D array >>> b #show the array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #show a new 2D array array([[1, 2], [3, 4], [5, 6]])}hj#sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KshjCh&hubh)}(hXeNow with this two dimensional array *(from now on as "2D")* we can index specific values and do slicing on both dimensions. Simply using a comma to separate the indices allows us to lookup/slice in multiple dimensions. Just using "``:``" as an index *(or not supplying enough indices)* gives us all the values in that dimension. Let's see how this works. ::h](h$Now with this two dimensional array }hj1sbj)}(h*(from now on as "2D")*h]h(from now on as "2D")}hj9sbah}(h]h]h]h]h!]uh%jhj1ubh we can index specific values and do slicing on both dimensions. Simply using a comma to separate the indices allows us to lookup/slice in multiple dimensions. Just using "}hj1sbh literal)}(h``:``h]h:}hjMsbah}(h]h]h]h]h!]uh%jKhj1ubh" as an index }hj1sbj)}(h#*(or not supplying enough indices)*h]h!(or not supplying enough indices)}hj_sbah}(h]h]h]h]h!]uh%jhj1ubhE gives us all the values in that dimension. Let's see how this works.}hj1sbeh}(h]h]h]h]h!]uh%hh'h(h)KhjCh&hubj)}(hX>>> b #show our array from above array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #index a single value 2 >>> b[1,:] #slice second row array([3, 4, 5]) >>> b[1] #slice second row (same as above) array([3, 4, 5]) >>> b[:,2] #slice last column array([3, 5]) >>> b[:,:2] #slice into a 2x2 array array([[1, 2], [3, 4]])h]hX>>> b #show our array from above array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #index a single value 2 >>> b[1,:] #slice second row array([3, 4, 5]) >>> b[1] #slice second row (same as above) array([3, 4, 5]) >>> b[:,2] #slice last column array([3, 5]) >>> b[:,:2] #slice into a 2x2 array array([[1, 2], [3, 4]])}hjwsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KhjCh&hubh)}(hXOk, stay with me here, this is about as hard as it gets. When using NumPy there is one more feature to slicing. Slicing arrays also allow you to specify a *slice increment*. The syntax for a slice with increment is ``start_index : end_index : increment``. ::h](hOk, stay with me here, this is about as hard as it gets. When using NumPy there is one more feature to slicing. Slicing arrays also allow you to specify a }hjsbj)}(h*slice increment*h]hslice increment}hjsbah}(h]h]h]h]h!]uh%jhjubh+. The syntax for a slice with increment is }hjsbjL)}(h'``start_index : end_index : increment``h]h#start_index : end_index : increment}hjsbah}(h]h]h]h]h!]uh%jKhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjCh&hubj)}(hX>>> c = arange(10) #like range, but makes an array >>> c #show the array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #slice odd values from 1 to 6 array([1, 3, 5]) >>> c[4::4] #slice every 4th val starting at 4 array([4, 8]) >>> c[8:1:-1] #slice 1 to 8, reversed array([8, 7, 6, 5, 4, 3, 2])h]hX>>> c = arange(10) #like range, but makes an array >>> c #show the array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #slice odd values from 1 to 6 array([1, 3, 5]) >>> c[4::4] #slice every 4th val starting at 4 array([4, 8]) >>> c[8:1:-1] #slice 1 to 8, reversed array([8, 7, 6, 5, 4, 3, 2])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KhjCh&hubh)}(hWell that is it. There's enough information there to get you started using NumPy with the surfarray module. There's certainly a lot more to NumPy, but this is only an introduction. Besides, we want to get on to the fun stuff, correct?h]hWell that is it. There's enough information there to get you started using NumPy with the surfarray module. There's certainly a lot more to NumPy, but this is only an introduction. Besides, we want to get on to the fun stuff, correct?}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KhjCh&hubeh}(h]numpyah]h]numpyah]h!]uh%hHhh]h&hh'h(h)K+ubhI)}(hhh](hN)}(hImport Surfarrayh]hImport Surfarray}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubh)}(hXIn order to use the surfarray module we need to import it. Since both surfarray and NumPy are optional components for pygame, it is nice to make sure they import correctly before using them. In these examples I'm going to import NumPy into a variable named *N*. This will let you know which functions I'm using are from the NumPy package. *(and is a lot shorter than typing NumPy before each function)* ::h](hXIn order to use the surfarray module we need to import it. Since both surfarray and NumPy are optional components for pygame, it is nice to make sure they import correctly before using them. In these examples I'm going to import NumPy into a variable named }hjsbj)}(h*N*h]hN}hjsbah}(h]h]h]h]h!]uh%jhjubhO. This will let you know which functions I'm using are from the NumPy package. }hjsbj)}(h?*(and is a lot shorter than typing NumPy before each function)*h]h=(and is a lot shorter than typing NumPy before each function)}hjsbah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj)}(htry: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required."h]htry: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required."}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubeh}(h]import-surfarrayah]h]import surfarrayah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hSurfarray Introductionh]hSurfarray Introduction}hj3sbah}(h]h]h]h]h!]uh%hMhj0h&hh'h(h)Kubh)}(hXThere are two main types of functions in surfarray. One set of functions for creating an array that is a copy of a surface pixel data. The other functions create a referenced copy of the array pixel data, so that changes to the array directly affect the original surface. There are other functions that allow you to access any per-pixel alpha values as arrays along with a few other helpful functions. We will look at these other functions later on.h]hXThere are two main types of functions in surfarray. One set of functions for creating an array that is a copy of a surface pixel data. The other functions create a referenced copy of the array pixel data, so that changes to the array directly affect the original surface. There are other functions that allow you to access any per-pixel alpha values as arrays along with a few other helpful functions. We will look at these other functions later on.}hjAsbah}(h]h]h]h]h!]uh%hh'h(h)Khj0h&hubh)}(hXWhen working with these surface arrays, there are two ways of representing the pixel values. First, they can be represented as mapped integers. This type of array is a simple 2D array with a single integer representing the surface's mapped color value. This type of array is good for moving parts of an image around. The other type of array uses three RGB values to represent each pixel color. This type of array makes it extremely simple to do types of effects that change the color of each pixel. This type of array is also a little trickier to deal with, since it is essentially a 3D numeric array. Still, once you get your mind into the right mode, it is not much harder than using the normal 2D arrays.h]hXWhen working with these surface arrays, there are two ways of representing the pixel values. First, they can be represented as mapped integers. This type of array is a simple 2D array with a single integer representing the surface's mapped color value. This type of array is good for moving parts of an image around. The other type of array uses three RGB values to represent each pixel color. This type of array makes it extremely simple to do types of effects that change the color of each pixel. This type of array is also a little trickier to deal with, since it is essentially a 3D numeric array. Still, once you get your mind into the right mode, it is not much harder than using the normal 2D arrays.}hjOsbah}(h]h]h]h]h!]uh%hh'h(h)Khj0h&hubh)}(hXThe NumPy module uses a machine's natural number types to represent the data values, so a NumPy array can consist of integers that are 8-bits, 16-bits, and 32-bits. *(the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types)*. Because of this limitation of integer sizes, you must take a little extra care that the type of arrays that reference pixel data can be properly mapped to a proper type of data. The functions create these arrays from surfaces are:h](hThe NumPy module uses a machine's natural number types to represent the data values, so a NumPy array can consist of integers that are 8-bits, 16-bits, and 32-bits. }hj]sbj)}(h*(the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types)*h]h(the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types)}hjesbah}(h]h]h]h]h!]uh%jhj]ubh. Because of this limitation of integer sizes, you must take a little extra care that the type of arrays that reference pixel data can be properly mapped to a proper type of data. The functions create these arrays from surfaces are:}hj]sbeh}(h]h]h]h]h!]uh%hh'h(h)Khj0h&hubhindex)}(hhh]h}(h]h]h]h]h!]entries]uh%j}hj0h&hh'h(h)Nubhdesc)}(hhh](hdesc_signature)}(hpixels2d(surface)h](h desc_addname)}(h surfarray.h]h surfarray.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubh desc_name)}(hpixels2dh]hpixels2d}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubhdesc_parameterlist)}(hsurfaceh]hdesc_parameter)}(hsurfaceh]h desc_sig_name)}(hsurfaceh]hsurface}hjsbah}(h]h]nah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$multi_line_parameter_listuh%jhjh&hh'h(h)Kubeh}(h]h](sig sig-objecteh]h]h!]module surfarrayclasshfullnamej _toc_partsjj _toc_name pixels2d()uh%jh'h(h)Khjh&hubh desc_content)}(hhh]h)}(hCreates a 2D array *(integer pixel values)* that reference the original surface data. This will work for all surface formats except 24-bit.h](hCreates a 2D array }hjsbj)}(h*(integer pixel values)*h]h(integer pixel values)}hjsbah}(h]h]h]h]h!]uh%jhjubh` that reference the original surface data. This will work for all surface formats except 24-bit.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%jhjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]domainj!objtypej"desctypej"no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhj0h'h(h)Nubj~)}(hhh]h}(h]h]h]h]h!]entries]uh%j}hj0h&hh'h(h)Nubj)}(hhh](j)}(harray2d(surface)h](j)}(h surfarray.h]h surfarray.}hjBsbah}(h]h](jjeh]h]h!]h#h$uh%jhj>h&hh'h(h)Kubj)}(harray2dh]harray2d}hjPsbah}(h]h](jjeh]h]h!]h#h$uh%jhj>h&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjfsbah}(h]h]jah]h]h!]uh%jhjbubah}(h]h]h]h]h!]h#h$uh%jhj^ubah}(h]h]h]h]h!]h#h$juh%jhj>h&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjRjjjRj array2d()uh%jh'h(h)Khj;h&hubj)}(hhh]h)}(hTCreates a 2D array *(integer pixel values)* that is copied from any type of surface.h](hCreates a 2D array }hjsbj)}(h*(integer pixel values)*h]h(integer pixel values)}hjsbah}(h]h]h]h]h!]uh%jhjubh) that is copied from any type of surface.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%jhj;h&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]j&jj'jj(jj)j*j+j,j-j.j/uh%jh&hhj0h'h(h)Nubj~)}(hhh]h}(h]h]h]h]h!]entries]uh%j}hj0h&hh'h(h)Nubj)}(hhh](j)}(hpixels3d(surface)h](j)}(h surfarray.h]h surfarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubj)}(hpixels3dh]hpixels3d}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjjjjj pixels3d()uh%jh'h(h)Khjh&hubj)}(hhh]h)}(hCreates a 3D array *(RGB pixel values)* that reference the original surface data. This will only work on 24-bit and 32-bit surfaces that have RGB or BGR formatting.h](hCreates a 3D array }hjsbj)}(h*(RGB pixel values)*h]h(RGB pixel values)}hjsbah}(h]h]h]h]h!]uh%jhjubh} that reference the original surface data. This will only work on 24-bit and 32-bit surfaces that have RGB or BGR formatting.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%jhjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]j&j=j'j>j(j>j)j*j+j,j-j.j/uh%jh&hhj0h'h(h)Nubj~)}(hhh]h}(h]h]h]h]h!]entries]uh%j}hj0h&hh'h(h)Nubj)}(hhh](j)}(harray3d(surface)h](j)}(h surfarray.h]h surfarray.}hjTsbah}(h]h](jjeh]h]h!]h#h$uh%jhjPh&hh'h(h)Kubj)}(harray3dh]harray3d}hjbsbah}(h]h](jjeh]h]h!]h#h$uh%jhjPh&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjxsbah}(h]h]jah]h]h!]uh%jhjtubah}(h]h]h]h]h!]h#h$uh%jhjpubah}(h]h]h]h]h!]h#h$juh%jhjPh&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjdjjjdj array3d()uh%jh'h(h)KhjMh&hubj)}(hhh]h)}(hPCreates a 3D array *(RGB pixel values)* that is copied from any type of surface.h](hCreates a 3D array }hjsbj)}(h*(RGB pixel values)*h]h(RGB pixel values)}hjsbah}(h]h]h]h]h!]uh%jhjubh) that is copied from any type of surface.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%jhjMh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]j&jj'jj(jj)j*j+j,j-j.j/uh%jh&hhj0h'h(h)Nubh)}(hHere is a small chart that might better illustrate what types of functions should be used on which surfaces. As you can see, both the arrayXD functions will work with any type of surface.h]hHere is a small chart that might better illustrate what types of functions should be used on which surfaces. As you can see, both the arrayXD functions will work with any type of surface.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj0h&hubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h}(h]h]h]h]h!]colwidthKstubKuh%jhjubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhjubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhjubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhjubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhjubh thead)}(hhh]h row)}(hhh](h entry)}(hhh]h}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(h32-bith]h32-bit}hj0sbah}(h]h]h]h]h!]uh%hh'h(h)Khj-ubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(h24-bith]h24-bit}hjGsbah}(h]h]h]h]h!]uh%hh'h(h)KhjDubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(h16-bith]h16-bit}hj^sbah}(h]h]h]h]h!]uh%hh'h(h)Khj[ubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(h 8-bit(c-map)h]h 8-bit(c-map)}hjusbah}(h]h]h]h]h!]uh%hh'h(h)Khjrubah}(h]h]h]h]h!]uh%j"hjubeh}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!]uh%jhjubh tbody)}(hhh](j)}(hhh](j#)}(hhh]h)}(hpixel2dh]hpixel2d}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(hyesh]hyes}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(hyesh]hyes}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj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uh%j"hjubj#)}(hhh]h)}(hyesh]hyes}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(hyesh]hyes}hj/sbah}(h]h]h]h]h!]uh%hh'h(h)Khj,ubah}(h]h]h]h]h!]uh%j"hjubj#)}(hhh]h)}(hyesh]hyes}hjFsbah}(h]h]h]h]h!]uh%hh'h(h)KhjCubah}(h]h]h]h]h!]uh%j"hjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]colsKuh%jhjubah}(h]h](colwidths-givenmatrixeh]h]h!]uh%jhj0h&hh'h(h)Nubeh}(h]id1ah]h]h]surfarray introductionah!]uh%hHhh]h&hh'h(h)Kj~ubhI)}(hhh](hN)}(hExamplesh]hExamples}hjsbah}(h]h]h]h]h!]uh%hMhj}h&hh'h(h)Mubh)}(hXLWith this information, we are equipped to start trying things with surface arrays. The following are short little demonstrations that create a NumPy array and display them in pygame. These different tests are found in the *arraydemo.py* example. There is a simple function named *surfdemo_show* that displays an array on the screen.h](hWith this information, we are equipped to start trying things with surface arrays. The following are short little demonstrations that create a NumPy array and display them in pygame. These different tests are found in the }hjsbj)}(h*arraydemo.py*h]h arraydemo.py}hjsbah}(h]h]h]h]h!]uh%jhjubh+ example. There is a simple function named }hjsbj)}(h*surfdemo_show*h]h surfdemo_show}hjsbah}(h]h]h]h]h!]uh%jhjubh& that displays an array on the screen.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj}h&hubh container)}(hX.. container:: example .. image:: surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Our first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the ``zeros`` function. Here we create a 2D array of all zeros and display it. .. container:: break .. .. container:: example .. image:: surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer. .. container:: break .. .. container:: example .. image:: surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Here we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the :meth:`mapped ` (raw) surface pixels. We will use this image in the rest of the samples. .. container:: break .. .. container:: example .. image:: surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Here we flip the image vertically. All we need to do is take the original image array and slice it using a negative increment. .. container:: break .. .. container:: example .. image:: surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Based on the last example, scaling an image down is pretty logical. We just slice out all the pixels using an increment of 2 vertically and horizontally. .. container:: break .. .. container:: example .. image:: surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Scaling the image up is a little more work, but is similar to the previous scaling down, we do it all with slicing. First we create an array that is double the size of our original. First we copy the original array into every other pixel of the new array. Then we do it again for every other pixel doing the odd columns. At this point we have the image scaled properly going across, but every other row is black, so we simply need to copy each row to the one underneath it. Then we have an image doubled in size. .. container:: break .. .. container:: example .. image:: surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Now we are using 3D arrays to change the colors. Here we set all the values in green and blue to zero. This leaves us with just the red channel. .. container:: break .. .. container:: example .. image:: surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Here we perform a 3x3 convolution filter that will soften our image. It looks like a lot of steps here, but what we are doing is shifting the image 1 pixel in each direction and adding them all together (with some multiplication for weighting). Then average all the values. It's no Gaussian, but it's fast. One point with NumPy arrays, the precision of arithmetic operations is determined by the array with the largest data type. So if factor was not declared as a 1 element array of type numpy.int32, the multiplications would be performed using numpy.int8, the 8 bit integer type of each rgbarray element. This will cause value truncation. The soften array must also be declared to have a larger integer size than rgbarray to avoid truncation. .. container:: break .. .. container:: example .. image:: surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Lastly, we are cross fading between the original image and a solid bluish image. Not exciting, but the dest image could be anything, and changing the 0.50 multiplier will let you choose any step in a linear crossfade between two images. .. container:: break ..h](j)}(hXp.. image:: surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Our first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the ``zeros`` function. Here we create a 2D array of all zeros and display it. .. container:: break ..h](h image)}(h4.. image:: surfarray_allblack.png :alt: allblack h]h}(h]h]h]h]h!]altallblackuritut/surfarray_allblack.png candidates}*js original_urisurfarray_allblack.pnguh%jh'h(h)M hjubj)}(hBallblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack')h]hBallblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack')}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjubh)}(hOur first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the ``zeros`` function. Here we create a 2D array of all zeros and display it.h](hOur first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the }hjsbjL)}(h ``zeros``h]hzeros}hjsbah}(h]h]h]h]h!]uh%jKhjubhA function. Here we create a 2D array of all zeros and display it.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hj ubah}(h]h]breakah]h]h!]uh%jhjubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hX.. image:: surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer. .. container:: break ..h](j)}(h2.. image:: surfarray_striped.png :alt: striped h]h}(h]h]h]h]h!]altstripeduritut/surfarray_striped.pngj}jj9 sjsurfarray_striped.pnguh%jh'h(h)M hj( ubj)}(hzstriped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped')h]hzstriped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped')}hj< sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M%hj( ubh)}(hX,Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer.h]hX,Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer.}hjJ sbah}(h]h]h]h]h!]uh%hh'h(h)M*hj( ubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hjX ubah}(h]h]breakah]h]h!]uh%jhj( ubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hX.. image:: surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Here we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the :meth:`mapped ` (raw) surface pixels. We will use this image in the rest of the samples. .. container:: break ..h](j)}(h4.. image:: surfarray_rgbarray.png :alt: rgbarray h]h}(h]h]h]h]h!]altrgbarrayuritut/surfarray_rgbarray.pngj}jj sjsurfarray_rgbarray.pnguh%jh'h(h)M5hjs ubj)}(h|imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray')h]h|imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray')}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M:hjs ubh)}(hXHere we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the :meth:`mapped ` (raw) surface pixels. We will use this image in the rest of the samples.h](hXHere we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the }hj sbh pending_xref)}(h':meth:`mapped `h]jL)}(hj h]hmapped}hj sbah}(h]h](xrefpypy-metheh]h]h!]uh%jKhj ubah}(h]h]h]h]h!]refdoctut/SurfarrayIntro refdomainj reftypemeth refexplicitrefwarn py:modulejpy:classN reftargetpygame.Surface.map_rgbuh%j h'h(h)M>hj ubhI (raw) surface pixels. We will use this image in the rest of the samples.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M>hjs ubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hj ubah}(h]h]breakah]h]h!]uh%jhjs ubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hX.. image:: surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Here we flip the image vertically. All we need to do is take the original image array and slice it using a negative increment. .. container:: break ..h](j)}(h2.. image:: surfarray_flipped.png :alt: flipped h]h}(h]h]h]h]h!]altflippeduritut/surfarray_flipped.pngj}jj sjsurfarray_flipped.pnguh%jh'h(h)MLhj ubj)}(h`. There is one very useful function though.h](hvThere are only a few other functions available in surfarray. You can get a better list with more documentation on the }hjNsbj )}(h2:mod:`surfarray reference page `h]jL)}(hjXh]hsurfarray reference page}hjZsbah}(h]h](j pypy-modeh]h]h!]uh%jKhjVubah}(h]h]h]h]h!]refdocj refdomainjdreftypemod refexplicitrefwarnj jj Nj pygame.surfarrayuh%j h'h(h)M hjNubh+. There is one very useful function though.}hjNsbeh}(h]h]h]h]h!]uh%hh'h(h)M hj=h&hubj~)}(hhh]h}(h]h]h]h]h!]entries]uh%j}hj=h&hh'h(h)Nubj)}(hhh](j)}(h$surfarray.blit_array(surface, array)h](j)}(h surfarray.h]h surfarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Mubj)}(h blit_arrayh]h blit_array}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Mubj)}(hsurface, arrayh](j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubj)}(harrayh]j)}(harrayh]harray}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubeh}(h]h]h]h]h!]h#h$juh%jhjh&hh'h(h)Mubeh}(h]h](jjeh]h]h!]jjj surfarrayjsurfarray.blit_arrayjj surfarray blit_arrayjsurfarray.blit_array()uh%jh'h(h)Mhjh&hubj)}(hhh]h)}(hXThis will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized.h]hXThis will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubah}(h]h]h]h]h!]uh%jhjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]j&jj'jj(jj)j*j+j,j-j.j/uh%jh&hhj=h'h(h)Nubeh}(h]other-surfarray-functionsah]h]other surfarray functionsah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hMore Advanced NumPyh]hMore Advanced NumPy}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubh)}(hXDThere's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation *"in place"*. For example, you would want to replace ``screen[:] = screen + brightmap`` with the much faster ``add(screen, brightmap, screen)``. Anyway, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays.h](hX1There's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation }hj,sbj)}(h *"in place"*h]h "in place"}hj4sbah}(h]h]h]h]h!]uh%jhj,ubh). For example, you would want to replace }hj,sbjL)}(h"``screen[:] = screen + brightmap``h]hscreen[:] = screen + brightmap}hjFsbah}(h]h]h]h]h!]uh%jKhj,ubh with the much faster }hj,sbjL)}(h"``add(screen, brightmap, screen)``h]hadd(screen, brightmap, screen)}hjXsbah}(h]h]h]h]h!]uh%jKhj,ubh. Anyway, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays.}hj,sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXZAnother thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8-bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8-bit numbers and 32-bit numbers will give a result as 32-bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception.h]hXZAnother thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8-bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8-bit numbers and 32-bit numbers will give a result as 32-bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception.}hjpsbah}(h]h]h]h]h!]uh%hh'h(h)M+hjh&hubh)}(hLastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating.h]hLastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating.}hj~sbah}(h]h]h]h]h!]uh%hh'h(h)M4hjh&hubeh}(h]more-advanced-numpyah]h]more advanced numpyah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(h Graduationh]h Graduation}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)M9ubh)}(hXsWell there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some *"flame"* demos floating around that use surfarray to create a realtime fire effect.h](hXWell there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some }hjsbj)}(h *"flame"*h]h"flame"}hjsbah}(h]h]h]h]h!]uh%jhjubhK demos floating around that use surfarray to create a realtime fire effect.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M;hjh&hubh)}(hBest of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck.h]hBest of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MAhjh&hubeh}(h] graduationah]h] graduationah]h!]uh%hHhh]h&hh'h(h)M9ubeh}(h]surfarray-introductionah]h]h]j{ah!]uh%hHhhJh&hh'h(h)K j~ubeh}(h]'pygame-tutorials-surfarray-introductionah]h])pygame tutorials - surfarray introductionah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksj"footnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjsurfarray introductionNj@j=jjjzjwj-j*j j jT jQ j:j7jjjjjju nametypes}(jjVj@jjzj-j jT j:jjjuh}(jhJjh]j=hjjCjwjqj*jjwj0j j}jQ j j7jW jj=jjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j!KsRparse_messages]h system_message)}(hhh]h)}(h9Duplicate implicit target name: "surfarray introduction".h]h9Duplicate implicit target name: "surfarray introduction".}hjzsbah}(h]h]h]h]h!]uh%hhjwubah}(h]h]h]h]h!]jwalevelKtypeINFOsourceh(lineKuh%juhj0h&hh'h(h)Kubatransform_messages] transformerN include_log] docs/reST/tut/SurfarrayIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3641405 pygame-2.6.1/docs/generated/doctrees/tut/chimp.py.doctree0000644000175100001770000003517014676242421023035 0ustar00runnerdockerm:sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hpygame/examples/chimp.pyh]hpygame/examples/chimp.py}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh':/home/runner/work/pygame/pygame/docs/reST/tut/chimp.py.rsth)Kubh literal_block)}(hX#!/usr/bin/env python """ pygame.examples.chimp This simple example is used for the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. """ # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") # functions to create our resources def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) image = image.convert() size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound # classes for our game objects class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" # Initialize Everything pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) # Create The Background background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) # Put Text On The Background, Centered if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) # Display The Background screen.blit(background, (0, 0)) pg.display.flip() # Prepare Game Objects whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() # Main Loop going = True while going: clock.tick(60) # Handle Input Events for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() allsprites.update() # Draw Everything screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() pg.quit() # Game Over # this calls the 'main' function when this script is executed if __name__ == "__main__": main() h]hX#!/usr/bin/env python """ pygame.examples.chimp This simple example is used for the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. """ # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") # functions to create our resources def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) image = image.convert() size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound # classes for our game objects class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" # Initialize Everything pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) # Create The Background background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) # Put Text On The Background, Centered if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) # Display The Background screen.blit(background, (0, 0)) pg.display.flip() # Prepare Game Objects whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() # Main Loop going = True while going: clock.tick(60) # Handle Input Events for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() allsprites.update() # Draw Everything screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() pg.quit() # Game Over # this calls the 'main' function when this script is executed if __name__ == "__main__": main() }hhQsbah}(h]h]h]h]h!]source1/home/runner/work/pygame/pygame/examples/chimp.pyh#h$forcelanguagepythonhighlight_args} linenostartKsuh%hOh'hNh)Khh;h&hubeh}(h]pygame-examples-chimp-pyah]h]pygame/examples/chimp.pyah]h!]uh%h9hhh&hh'hNh)Kubeh}(h]h]h]h]h!]sourcehNtranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerherror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}hlhis nametypes}hlsh}hih;s footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/chimp.py.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9741259 pygame-2.6.1/docs/generated/doctrees/tut/en/0000755000175100001770000000000014676242436020341 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9751258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/0000755000175100001770000000000014676242436022647 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/1.Prolog/0000755000175100001770000000000014676242436024250 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3701406 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/1.Prolog/introduction.doctree0000644000175100001770000002426414676242421030342 0ustar00runnerdocker(sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceW/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/1.Prolog/introduction.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(hProlog? Why Pygame?h]hProlog? Why Pygame?}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXAs we know, every kind of game has 3 sections (Because game is a subgroup of program): **input**, **process** and **output**. If you want to make a game in C **console environment** (Write C source code then execute that on the console) simply, all you have to do is just using lots of scanf(or unnormalized getch function) functions and procedural complex algorithm followed by printf(with blinking clear function) functions with ASCII arts! However, when you get bored of making outdated, graphic-less CUI, discontinuous game, now it’s time to learn GUI based game making tool. You can directly enter into Unity **game engine** or Unreal game engine. However, there are too much barrier to overcome. Quaternion for 3D collision, Mechanim/Legacy animation compatibility, Larger memory/Faster CPU for simulate in high-graphic mod, and etc! So, there is a dilemma between console environment and game engine. Can this dilemma to be solved?h](hWAs we know, every kind of game has 3 sections (Because game is a subgroup of program): }hhssbh strong)}(h **input**h]hinput}hh}sbah}(h]h ]h"]h$]h&]uh(h{hhsubh, }hhssbh|)}(h **process**h]hprocess}hhsbah}(h]h ]h"]h$]h&]uh(h{hhsubh and }hhssbh|)}(h **output**h]houtput}hhsbah}(h]h ]h"]h$]h&]uh(h{hhsubh". If you want to make a game in C }hhssbh|)}(h**console environment**h]hconsole environment}hhsbah}(h]h ]h"]h$]h&]uh(h{hhsubhX (Write C source code then execute that on the console) simply, all you have to do is just using lots of scanf(or unnormalized getch function) functions and procedural complex algorithm followed by printf(with blinking clear function) functions with ASCII arts! However, when you get bored of making outdated, graphic-less CUI, discontinuous game, now it’s time to learn GUI based game making tool. You can directly enter into Unity }hhssbh|)}(h**game engine**h]h game engine}hhsbah}(h]h ]h"]h$]h&]uh(h{hhsubhX5 or Unreal game engine. However, there are too much barrier to overcome. Quaternion for 3D collision, Mechanim/Legacy animation compatibility, Larger memory/Faster CPU for simulate in high-graphic mod, and etc! So, there is a dilemma between console environment and game engine. Can this dilemma to be solved?}hhssbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h%.. image:: introduction-PuyoPuyo.png h]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/1.Prolog/introduction-PuyoPuyo.png candidates}*hs original_uriintroduction-PuyoPuyo.pnguh(hh*h+h,Khh`h)hubhr)}(h$Example of C console game - PuyoPuyoh]h$Example of C console game - PuyoPuyo}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(h .. image:: introduction-TPS.png h]h}(h]h ]h"]h$]h&]uri1tut/en/Red_or_Black/1.Prolog/introduction-TPS.pngh}hj shintroduction-TPS.pnguh(hh*h+h,Khh`h)hubhr)}(h"Example of Unity Engine game - TPSh]h"Example of Unity Engine game - TPS}hj sbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hXYes. Pygame can solve that. Pygame is an external library of **Python** which enables you to make a **game**. Pygame has advantages of console environment. For example, single pygame project nearly equals single source code, so we have to focus on writing source code only. (with some sound file or some image file in the same directory). Because Pygame is not a tool but a library, single command “import pygame” makes current source code to use pygame’s everything. That is, Pygame is simple to access. Pygame has advantages of game engine, too. For example, Pygame provide input functions (which check every possible state of keyboard, mouse and even files) and output functions (drawing geometry, fill certain colors or set display) to user. That is, user can run the program on the GUI environment if it based on Pygame. Because Pygame is based on Python, functions in Pygame project can be executed selectively, even almost simultaneously. That is, Pygame is event-driven.h](h=Yes. Pygame can solve that. Pygame is an external library of }hjsbh|)}(h **Python**h]hPython}hj"sbah}(h]h ]h"]h$]h&]uh(h{hjubh which enables you to make a }hjsbh|)}(h**game**h]hgame}hj4sbah}(h]h ]h"]h$]h&]uh(h{hjubhXl. Pygame has advantages of console environment. For example, single pygame project nearly equals single source code, so we have to focus on writing source code only. (with some sound file or some image file in the same directory). Because Pygame is not a tool but a library, single command “import pygame” makes current source code to use pygame’s everything. That is, Pygame is simple to access. Pygame has advantages of game engine, too. For example, Pygame provide input functions (which check every possible state of keyboard, mouse and even files) and output functions (drawing geometry, fill certain colors or set display) to user. That is, user can run the program on the GUI environment if it based on Pygame. Because Pygame is based on Python, functions in Pygame project can be executed selectively, even almost simultaneously. That is, Pygame is event-driven.}hjsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(h'.. image:: introduction-Battleship.png h]h}(h]h ]h"]h$]h&]uri8tut/en/Red_or_Black/1.Prolog/introduction-Battleship.pngh}hjWshintroduction-Battleship.pnguh(hh*h+h,Khh`h)hubhr)}(hExample of Pygame - Battleshiph]hExample of Pygame - Battleship}hjZsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hX<So, Pygame has both good point of console environment (example of low-level game maker) and game engine (example of high-level game maker). Pygame is good **intersection** between console environment to game engine. That’s enough to use Pygame. No need to master it (if your dream is one-man game developer in advanced game engine, start to learn about that game engine right now!), but at least, try Pygame. (if you are interested in any kind of unique program including game maker or if you want to code any game on advanced environment aside from console environment)h](hSo, Pygame has both good point of console environment (example of low-level game maker) and game engine (example of high-level game maker). Pygame is good }hjhsbh|)}(h**intersection**h]h intersection}hjpsbah}(h]h ]h"]h$]h&]uh(h{hjhubhX between console environment to game engine. That’s enough to use Pygame. No need to master it (if your dream is one-man game developer in advanced game engine, start to learn about that game engine right now!), but at least, try Pygame. (if you are interested in any kind of unique program including game maker or if you want to code any game on advanced environment aside from console environment)}hjhsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubeh}(h]prolog-why-pygameah ]h"]prolog? why pygame?ah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZjju nametypes}(h2h]juh}(h/h hZh5jh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/2.Print_text/0000755000175100001770000000000014676242436025147 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021500000000000010213 xustar00113 path=pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.doctree 28 mtime=1727612177.3781404 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.doct0000644000175100001770000005423214676242421032003 0ustar00runnerdockerXsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceh/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hBasic TEMPLATE and OUTPUTh]hBasic TEMPLATE and OUTPUT}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h]basic-template-and-outputah ]h"]basic template and outputah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h–Into Event-driven and GUIh]h–Into Event-driven and GUI}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hXAs I said, Pygame is based on GUI environment. Furthermore, Pygame is good for making 2D game because of its input/output format. So, you have to say good-bye for print or input standard function of Python (Because they work only on CUI environment). Then, what functions in Pygame replace these functions? First, we have to go back to friendly “Hello World!” project, which is learning about basic template and output. **(Requiring any font file(.ttf) in the same project directory)**h](hXAs I said, Pygame is based on GUI environment. Furthermore, Pygame is good for making 2D game because of its input/output format. So, you have to say good-bye for print or input standard function of Python (Because they work only on CUI environment). Then, what functions in Pygame replace these functions? First, we have to go back to friendly “Hello World!” project, which is learning about basic template and output. }hhsbh strong)}(hA**(Requiring any font file(.ttf) in the same project directory)**h]h=(Requiring any font file(.ttf) in the same project directory)}hhsbah}(h]h ]h"]h$]h&]uh(hhhubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h&.. image:: Basic-ouput-sourcecode.png h]h}(h]h ]h"]h$]h&]uri;tut/en/Red_or_Black/2.Print_text/Basic-ouput-sourcecode.png candidates}*hs original_uriBasic-ouput-sourcecode.pnguh(hh*h+h,Khhyh)hubh)}(h).. image:: Bagic-ouput-result-screen.png h]h}(h]h ]h"]h$]h&]uri>tut/en/Red_or_Black/2.Print_text/Bagic-ouput-result-screen.pngh}hhshBagic-ouput-result-screen.pnguh(hh*h+h,Khhyh)hubh)}(h9Source Code for Hello World Project and its result screenh]h9Source Code for Hello World Project and its result screen}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXJWow, it’s complicated in compare to python’s print(“Hello World”) (Just a single line command). It’s because text in GUI environment has 5 components: text contents, font, size, color and location. If you want to print any text into screen, you have to set other 4 components, not only string (unless when it is in GUI environment). Only ``pygame.display.set_caption(“Hello World Project”)`` function in #7 do the same function as python’s print(“Hello World Project”). The only difference is that output string is always on window caption (title of current program)h](hX\Wow, it’s complicated in compare to python’s print(“Hello World”) (Just a single line command). It’s because text in GUI environment has 5 components: text contents, font, size, color and location. If you want to print any text into screen, you have to set other 4 components, not only string (unless when it is in GUI environment). Only }hhsbh literal)}(h9``pygame.display.set_caption(“Hello World Project”)``h]h5pygame.display.set_caption(“Hello World Project”)}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh function in #7 do the same function as python’s print(“Hello World Project”). The only difference is that output string is always on window caption (title of current program)}hhsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hFirst, look at the template of source code before understanding how to output something, source code can be dived into 4 sections: Header(#1-#2), Initial statement(#3-#12), Always statement(#13-#20) and Event statement(#16-#19).h]hFirst, look at the template of source code before understanding how to output something, source code can be dived into 4 sections: Header(#1-#2), Initial statement(#3-#12), Always statement(#13-#20) and Event statement(#16-#19).}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXIn **Header**, importing modules will be executed. ``import pygame, sys`` is always needed. Needless to say, because this is pygame project and game has to be terminated when player want to exit(``sys.exit()`` at #19). ``from pygame.locals import*`` is also necessary to use useful constants just like ``QUIT`` at #17. In **Initial statement** (commands before infinite loop), some global values will be initialized and some functions will be called for one time. Global values just like colors has to be initialized here in order to increase readability. Remember, this is GUI which is colorful. Color has three components: red, green and blue. So, color value has to be initialized just like ``red = (255, 0, 0)``. Function named ``pygame.init()`` must be called preceding to other pygame functions. Then other pygame functions can be executed. (Other pygame functions will be explained later.)h](hIn }hj sbh)}(h **Header**h]hHeader}hjsbah}(h]h ]h"]h$]h&]uh(hhj ubh&, importing modules will be executed. }hj sbh)}(h``import pygame, sys``h]himport pygame, sys}hj#sbah}(h]h ]h"]h$]h&]uh(hhj ubhz is always needed. Needless to say, because this is pygame project and game has to be terminated when player want to exit(}hj sbh)}(h``sys.exit()``h]h sys.exit()}hj5sbah}(h]h ]h"]h$]h&]uh(hhj ubh at #19). }hj sbh)}(h``from pygame.locals import*``h]hfrom pygame.locals import*}hjGsbah}(h]h ]h"]h$]h&]uh(hhj ubh5 is also necessary to use useful constants just like }hj sbh)}(h``QUIT``h]hQUIT}hjYsbah}(h]h ]h"]h$]h&]uh(hhj ubh at #17. In }hj sbh)}(h**Initial statement**h]hInitial statement}hjksbah}(h]h ]h"]h$]h&]uh(hhj ubhX_ (commands before infinite loop), some global values will be initialized and some functions will be called for one time. Global values just like colors has to be initialized here in order to increase readability. Remember, this is GUI which is colorful. Color has three components: red, green and blue. So, color value has to be initialized just like }hj sbh)}(h``red = (255, 0, 0)``h]hred = (255, 0, 0)}hj}sbah}(h]h ]h"]h$]h&]uh(hhj ubh. Function named }hj sbh)}(h``pygame.init()``h]h pygame.init()}hjsbah}(h]h ]h"]h$]h&]uh(hhj ubh must be called preceding to other pygame functions. Then other pygame functions can be executed. (Other pygame functions will be explained later.)}hj sbeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hX?In **Always statement** (commands within infinite loop), some global values will be updated routinely and some functions will be called routinely unless they are enclosed into conditional statement. Function named ``pygame.display.update()`` should be called after every processes are done. Because this function is printing the results of processes onto screen(=monitor). If this function is not executed in the last part of Always statement, there will be a probability that current screen and internal data does not match. (Other pygame functions will be explained later.)h](hIn }hjsbh)}(h**Always statement**h]hAlways statement}hjsbah}(h]h ]h"]h$]h&]uh(hhjubh (commands within infinite loop), some global values will be updated routinely and some functions will be called routinely unless they are enclosed into conditional statement. Function named }hjsbh)}(h``pygame.display.update()``h]hpygame.display.update()}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhXN should be called after every processes are done. Because this function is printing the results of processes onto screen(=monitor). If this function is not executed in the last part of Always statement, there will be a probability that current screen and internal data does not match. (Other pygame functions will be explained later.)}hjsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K hhyh)hubh)}(hXIn **Event statement** (commands within loop which check every possible events), there will be suitable conditional statements when certain event is triggered. ``pygame.event.get()`` function returns a list of events occurred by processes in Always statement. And this list is automatically arranged by time (oldest to newest). So, using for-in statement, every triggered event caused by Always statement can be resolved procedurally. (Remind that this is the trait of event-driven.) For example, commands in #17-#19 will deal with QUIT event. In this case, pygame will be terminated then system will be terminated because system must be terminated after pygame is terminated! (Other events will be explained later.)h](hIn }hjsbh)}(h**Event statement**h]hEvent statement}hjsbah}(h]h ]h"]h$]h&]uh(hhjubh (commands within loop which check every possible events), there will be suitable conditional statements when certain event is triggered. }hjsbh)}(h``pygame.event.get()``h]hpygame.event.get()}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhX function returns a list of events occurred by processes in Always statement. And this list is automatically arranged by time (oldest to newest). So, using for-in statement, every triggered event caused by Always statement can be resolved procedurally. (Remind that this is the trait of event-driven.) For example, commands in #17-#19 will deal with QUIT event. In this case, pygame will be terminated then system will be terminated because system must be terminated after pygame is terminated! (Other events will be explained later.)}hjsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K"hhyh)hubh)}(hX(Regarding this template is fixed, then we can add special functions in correct place to print “Hello World!”. First, we need to set **font** and **size**. ``pygame.font.Font(“HoonWhiteCatR,ttf”, 32)`` function at #9 will set not only font by ttf file but also size (32). Return value of this function need to be stored into object(= myTextFont). Then member function of myTextFont named ``render(“Hello World!”, True, red, green)`` at #10 will return a value(= myText). render function can set **text contents** and **color**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location** will be center of the screen.h](hRegarding this template is fixed, then we can add special functions in correct place to print “Hello World!”. First, we need to set }hj sbh)}(h**font**h]hfont}hjsbah}(h]h ]h"]h$]h&]uh(hhj ubh and }hj sbh)}(h**size**h]hsize}hj%sbah}(h]h ]h"]h$]h&]uh(hhj ubh. }hj sbh)}(h1``pygame.font.Font(“HoonWhiteCatR,ttf”, 32)``h]h-pygame.font.Font(“HoonWhiteCatR,ttf”, 32)}hj7sbah}(h]h ]h"]h$]h&]uh(hhj ubh function at #9 will set not only font by ttf file but also size (32). Return value of this function need to be stored into object(= myTextFont). Then member function of myTextFont named }hj sbh)}(h0``render(“Hello World!”, True, red, green)``h]h,render(“Hello World!”, True, red, green)}hjIsbah}(h]h ]h"]h$]h&]uh(hhj ubh? at #10 will return a value(= myText). render function can set }hj sbh)}(h**text contents**h]h text contents}hj[sbah}(h]h ]h"]h$]h&]uh(hhj ubh and }hj sbh)}(hX**color**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location**h]hXcolor**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location}hjmsbah}(h]h ]h"]h$]h&]uh(hhj ubh will be center of the screen.}hj sbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K$hhyh)hubh)}(hX$But how to determine where is the center of screen? First, we have to decide the range of screen, by using ``pygame.display.set_mode((640,480))`` in #8, canvas(where all values which has size, color, position will be drawn when display.update is called) will be generated and its size becomes 640 x 480. Then, its center is exactly (320,240). If the total size is given, we can decide any position even accounting some margin with little calculation (Remind that in 2D GUI, everything has x and y which has to be printed) (Just like turtle graphic, if it goes **right, x increases**, if it goes **down**, **y increase**. Don’t confused!). And we know that all functions I mentioned will be putted into Initial statement, because this information are fixed while the program go on. Although everything is fixed, we have to design that fill and blit functions to be putted into Always statement, because of these functions’ trait. ``fill(white)`` function in #14 means filling canvas by single color(white). ``blit(myText, myTextArea)`` function in #15 means drawing specific object(= myText) on specific location(= myTextArea) of canvas. Notice that drawing(blit) has to be done after filling(fill). When everything is drawn on canvas, result of canvas will be display onto window when display.update is executed.h](hkBut how to determine where is the center of screen? First, we have to decide the range of screen, by using }hjsbh)}(h&``pygame.display.set_mode((640,480))``h]h"pygame.display.set_mode((640,480))}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhX in #8, canvas(where all values which has size, color, position will be drawn when display.update is called) will be generated and its size becomes 640 x 480. Then, its center is exactly (320,240). If the total size is given, we can decide any position even accounting some margin with little calculation (Remind that in 2D GUI, everything has x and y which has to be printed) (Just like turtle graphic, if it goes }hjsbh)}(h**right, x increases**h]hright, x increases}hjsbah}(h]h ]h"]h$]h&]uh(hhjubh , if it goes }hjsbh)}(h**down**h]hdown}hjsbah}(h]h ]h"]h$]h&]uh(hhjubh, }hjsbh)}(h**y increase**h]h y increase}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhX:. Don’t confused!). And we know that all functions I mentioned will be putted into Initial statement, because this information are fixed while the program go on. Although everything is fixed, we have to design that fill and blit functions to be putted into Always statement, because of these functions’ trait. }hjsbh)}(h``fill(white)``h]h fill(white)}hjsbah}(h]h ]h"]h$]h&]uh(hhjubh> function in #14 means filling canvas by single color(white). }hjsbh)}(h``blit(myText, myTextArea)``h]hblit(myText, myTextArea)}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhX function in #15 means drawing specific object(= myText) on specific location(= myTextArea) of canvas. Notice that drawing(blit) has to be done after filling(fill). When everything is drawn on canvas, result of canvas will be display onto window when display.update is executed.}hjsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K&hhyh)hubh)}(hXuThat was the explanation of the entire source code, which has 20 lines. It seems it takes too much time to understand source code with only 20 lines. However, adding or changing from this source code is not that hard because we understand the template of this source code and step of printing. What about adding process logic in this source code? That will be next project.h]hXuThat was the explanation of the entire source code, which has 20 lines. It seems it takes too much time to understand source code with only 20 lines. However, adding or changing from this source code is not that hard because we understand the template of this source code and step of printing. What about adding process logic in this source code? That will be next project.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K)hhyh)hubh)}(h ::h]h}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K+hhyh)hubh literal_block)}(hXimport pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20h]hXimport pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(jh*h+h,K-hhyh)hubeh}(h]into-event-driven-and-guiah ]h"]–into event-driven and guiah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj_error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsj2j/u nametypes}(h2h]hvj2uh}(h/h hZh5hsh`j/hyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/3.Move_text/0000755000175100001770000000000014676242436024762 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3851404 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/3.Move_text/Basic PROCESS.doctree0000644000175100001770000003350014676242421030444 0ustar00runnerdocker57sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource[/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/3.Move_text/Basic PROCESS.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h Basic PROCESSh]h Basic PROCESS}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h] basic-processah ]h"] basic processah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h-Setting for Animationh]h-Setting for Animation}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hXoPrevious project looks like a single image instead of game. Because there is no input neither process to control output. Of course, clicking exit button on window is not counted because it is just shutting down the entire program. First, we will let text “Hello World!” to move automatically (and now project will be looks like an animation rather than single image), which means adding first processing logic on this project. How to move text? We know that location of text is initialized in Initial statement. So, location of text should be updated in Always statement, with adding some variable to process something.h]hXoPrevious project looks like a single image instead of game. Because there is no input neither process to control output. Of course, clicking exit button on window is not counted because it is just shutting down the entire program. First, we will let text “Hello World!” to move automatically (and now project will be looks like an animation rather than single image), which means adding first processing logic on this project. How to move text? We know that location of text is initialized in Initial statement. So, location of text should be updated in Always statement, with adding some variable to process something.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h(.. image:: Bagic-PROCESS-sourcecode.png h]h}(h]h ]h"]h$]h&]uritut/en/Red_or_Black/3.Move_text/Bagic-PROCESS-resultscreen.pngh}hhshBagic-PROCESS-resultscreen.pnguh(hh*h+h,Khhyh)hubh)}(h<(Source Code for Moving World Project and its result screen)h]h<(Source Code for Moving World Project and its result screen)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(h>(Not the entire source code of Moving World Project, but part)h]h>(Not the entire source code of Moving World Project, but part)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hO(Moving World! moves automatically just like Arkanoid ball or DVD screensaver.)h]hO(Moving World! moves automatically just like Arkanoid ball or DVD screensaver.)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXNew line #1 - #5 were appended at the end of Initial statement. Also, multiple if-else phases (#6 - #9) were inserted at the beginning of Always statement, with line #11 at the end of always statements. We can understand what commands of #2 - #10 do. They just change variables for position of “Moving World” when Always statement being started. But there is a problem. How fast is “Moving World?” It is sure that displacement of “Moving World” is sqrt(2) (simple Pythagorean equation). But how often displacement of “Moving World” is changed? It can’t be determined without calculating time complexity of Always statement! (Because it depends on how often Always statement being started) And time complex will be differ to computer to computer, so can’t be fixed.h]hXNew line #1 - #5 were appended at the end of Initial statement. Also, multiple if-else phases (#6 - #9) were inserted at the beginning of Always statement, with line #11 at the end of always statements. We can understand what commands of #2 - #10 do. They just change variables for position of “Moving World” when Always statement being started. But there is a problem. How fast is “Moving World?” It is sure that displacement of “Moving World” is sqrt(2) (simple Pythagorean equation). But how often displacement of “Moving World” is changed? It can’t be determined without calculating time complexity of Always statement! (Because it depends on how often Always statement being started) And time complex will be differ to computer to computer, so can’t be fixed.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXWe need to add the conception of **fixed speed** into this project. How? Look at #1 and #11. There is ``pygame.time.Clock()`` on Initial statement and ``tick(60)`` on Always statement. 60 means FPS (frame rate per second). We know that FPS means how often display is changed in 1 second. What function means change (= update) display in pygame? That’s right. Pygame.display.update() function. So, FPS means how often Always statement being executed in 1 second. Because there is 1 Pygame.display.update() function in 1 always statements. (So, FPS means **selective delay** according to current program’s process speed, **not selective acceleration**, so FPS cannot work if FPS is too high.) If we let fps(= **time**) to be fixed in this project, we can change **velocity** of certain game object by finding appropriate value for **displacement**. pygame.time.Clock() is needed to fix the speed of project before game started. Notice that tick function has to be called when Pygame.display.update() is called. Because tick counts the number of update function. It is one of the exception of function that can be executed after Pygame.display.update().h](h!We need to add the conception of }hhsbh strong)}(h**fixed speed**h]h fixed speed}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh6 into this project. How? Look at #1 and #11. There is }hhsbh literal)}(h``pygame.time.Clock()``h]hpygame.time.Clock()}hjsbah}(h]h ]h"]h$]h&]uh(jhhubh on Initial statement and }hhsbj)}(h ``tick(60)``h]htick(60)}hj#sbah}(h]h ]h"]h$]h&]uh(jhhubhX on Always statement. 60 means FPS (frame rate per second). We know that FPS means how often display is changed in 1 second. What function means change (= update) display in pygame? That’s right. Pygame.display.update() function. So, FPS means how often Always statement being executed in 1 second. Because there is 1 Pygame.display.update() function in 1 always statements. (So, FPS means }hhsbh)}(h**selective delay**h]hselective delay}hj5sbah}(h]h ]h"]h$]h&]uh(hhhubh1 according to current program’s process speed, }hhsbh)}(h**not selective acceleration**h]hnot selective acceleration}hjGsbah}(h]h ]h"]h$]h&]uh(hhhubh:, so FPS cannot work if FPS is too high.) If we let fps(= }hhsbh)}(h**time**h]htime}hjYsbah}(h]h ]h"]h$]h&]uh(hhhubh-) to be fixed in this project, we can change }hhsbh)}(h **velocity**h]hvelocity}hjksbah}(h]h ]h"]h$]h&]uh(hhhubh9 of certain game object by finding appropriate value for }hhsbh)}(h**displacement**h]h displacement}hj}sbah}(h]h ]h"]h$]h&]uh(hhhubhX1. pygame.time.Clock() is needed to fix the speed of project before game started. Notice that tick function has to be called when Pygame.display.update() is called. Because tick counts the number of update function. It is one of the exception of function that can be executed after Pygame.display.update().}hhsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K hhyh)hubh)}(hXROkay, we learn that “Fixing time” is needed when screen is updated. Every screen of dynamic game is frequently changed unless it is static game. So, we have to know that. However, this project isn’t look like a game because its result can be anticipated easily (there is no input to change result) Now, input logic will be inserted.h]hXROkay, we learn that “Fixing time” is needed when screen is updated. Every screen of dynamic game is frequently changed unless it is static game. So, we have to know that. However, this project isn’t look like a game because its result can be anticipated easily (there is no input to change result) Now, input logic will be inserted.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K"hhyh)hubh)}(h ::h]h}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K%hhyh)hubh literal_block)}(hXnimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11h]hXnimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(jh*h+h,K'hhyh)hubeh}(h]setting-for-animationah ]h"]-setting for animationah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsjju nametypes}(h2h]hvjuh}(h/h hZh5hsh`jhyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/4.Control_text/0000755000175100001770000000000014676242436025475 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.3911405 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/4.Control_text/Basic INPUT.doctree0000644000175100001770000003542014676242421030743 0ustar00runnerdocker;sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource\/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/4.Control_text/Basic INPUT.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h Basic INPUTh]h Basic INPUT}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h] basic-inputah ]h"] basic inputah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h-New Input is new Eventh]h-New Input is new Event}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hX&Usually, we learn how to output something first (Think about Hello World!), learning how to input something is always second. Why? Because input is not the requirement for some program in contrast to output is the requirement for every program. (That’s definition of program. more than or same as 0 input, more than or same as 1 output.) However, every game needs input. That’s why we said “I like playing games”. Playing means moving your part of body (maybe your finger). Anyway, let’s add input logic to make this project into real game.h]hX&Usually, we learn how to output something first (Think about Hello World!), learning how to input something is always second. Why? Because input is not the requirement for some program in contrast to output is the requirement for every program. (That’s definition of program. more than or same as 0 input, more than or same as 1 output.) However, every game needs input. That’s why we said “I like playing games”. Playing means moving your part of body (maybe your finger). Anyway, let’s add input logic to make this project into real game.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h&.. image:: Bagic-INPUT-sourcecode.png h]h}(h]h ]h"]h$]h&]uri=tut/en/Red_or_Black/4.Control_text/Bagic-INPUT-sourcecode.png candidates}*hs original_uriBagic-INPUT-sourcecode.pnguh(hh*h+h,Khhyh)hubh)}(h(.. image:: Bagic-INPUT-resultscreen.png h]h}(h]h ]h"]h$]h&]uri?tut/en/Red_or_Black/4.Control_text/Bagic-INPUT-resultscreen.pngh}hhshBagic-INPUT-resultscreen.pnguh(hh*h+h,Khhyh)hubh)}(hA(Source Code for Controlling World Project and its result screen)h]hA(Source Code for Controlling World Project and its result screen)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hC(Not the entire source code of Controlling World Project, but part)h]hC(Not the entire source code of Controlling World Project, but part)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hT(Controlling World! moves when player press one of four direction arrow of keyboard)h]hT(Controlling World! moves when player press one of four direction arrow of keyboard)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXThere are 2 big difference in comparison to before project. First big difference is line #5, which adds checking ``KEYDOWN`` **event** is triggered or not. Other lines are just changing previous algorithm to act differently. We know that same command can make big difference in entire program when it is executed before Event statement of after Event statement. Pay attention that process about changing location appear after Event statement. (**Update after set**. That is second big difference). Variable ``event.key`` means latest pressed key on keyboard. Look at the specific key name. K_UP, K_LEFT, K_DOWN, K_RIGHT. Very intuitive **K_ series**. (Given by pygame.locals which we added at the Header) Furthermore, there are other key named K_8, K_a, K_L, K_LCTRL, K_DELETE, or K_F4. We can understand meaning of these keys without extra explanation. Full key list can be found in `https://www.pygame.org/docs/ref/key.html#pygame.key.name.`h](hqThere are 2 big difference in comparison to before project. First big difference is line #5, which adds checking }hhsbh literal)}(h ``KEYDOWN``h]hKEYDOWN}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh }hhsbh strong)}(h **event**h]hevent}hjsbah}(h]h ]h"]h$]h&]uh(jhhubhX6 is triggered or not. Other lines are just changing previous algorithm to act differently. We know that same command can make big difference in entire program when it is executed before Event statement of after Event statement. Pay attention that process about changing location appear after Event statement. (}hhsbj)}(h**Update after set**h]hUpdate after set}hjsbah}(h]h ]h"]h$]h&]uh(jhhubh+. That is second big difference). Variable }hhsbh)}(h ``event.key``h]h event.key}hj'sbah}(h]h ]h"]h$]h&]uh(hhhubht means latest pressed key on keyboard. Look at the specific key name. K_UP, K_LEFT, K_DOWN, K_RIGHT. Very intuitive }hhsbj)}(h **K_ series**h]h K_ series}hj9sbah}(h]h ]h"]h$]h&]uh(jhhubh. (Given by pygame.locals which we added at the Header) Furthermore, there are other key named K_8, K_a, K_L, K_LCTRL, K_DELETE, or K_F4. We can understand meaning of these keys without extra explanation. Full key list can be found in }hhsbh title_reference)}(h;`https://www.pygame.org/docs/ref/key.html#pygame.key.name.`h]h9https://www.pygame.org/docs/ref/key.html#pygame.key.name.}hjMsbah}(h]h ]h"]h$]h&]uh(jKhhubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh)}(hXNotice that KEYDOWN means “this key was not pressed before, but **now is pressed**” and meaning of **“hold” is not included** here. In the case of hold, new event-handling about checking ``KEYUP`` (it means “this key was pressed before, but now is not pressed”) is needed with some processing (which needs extra variable and algorithm). This will be mentioned at advanced part.h](hBNotice that KEYDOWN means “this key was not pressed before, but }hjasbj)}(h**now is pressed**h]hnow is pressed}hjisbah}(h]h ]h"]h$]h&]uh(jhjaubh” and meaning of }hjasbj)}(h**“hold” is not included**h]h“hold” is not included}hj{sbah}(h]h ]h"]h$]h&]uh(jhjaubh> here. In the case of hold, new event-handling about checking }hjasbh)}(h ``KEYUP``h]hKEYUP}hjsbah}(h]h ]h"]h$]h&]uh(hhjaubh (it means “this key was pressed before, but now is not pressed”) is needed with some processing (which needs extra variable and algorithm). This will be mentioned at advanced part.}hjasbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K!hhyh)hubh)}(hXAdding input was easy because it’s just adding if phase with certain event parameter. Now game project is done because project has output, process and input step-by-step! Really? No. This project can’t be called as a game because there is no **interaction** between at least two **game objects**, no **rule** for playing this (neither constrains (ex. HP, time) nor score). Mostly, not **enjoyable** (no motivation, no variety of input and output, no attractive contents) Firstly, we have to learn more advanced input (for example, handling for mouse status), process (for example, idea for functionalization) and output (for example, printing image/sound or visualizing internal data) to flourish game interface/system. Don’t stay in the level of printing const text or inputting single pressed key. Of course, experiences of this level are surely helpful for advanced level. So, let’s go to advanced level!h](hAdding input was easy because it’s just adding if phase with certain event parameter. Now game project is done because project has output, process and input step-by-step! Really? No. This project can’t be called as a game because there is no }hjsbj)}(h**interaction**h]h interaction}hjsbah}(h]h ]h"]h$]h&]uh(jhjubh between at least two }hjsbj)}(h**game objects**h]h game objects}hjsbah}(h]h ]h"]h$]h&]uh(jhjubh, no }hjsbj)}(h**rule**h]hrule}hjsbah}(h]h ]h"]h$]h&]uh(jhjubhM for playing this (neither constrains (ex. HP, time) nor score). Mostly, not }hjsbj)}(h **enjoyable**h]h enjoyable}hjsbah}(h]h ]h"]h$]h&]uh(jhjubhX (no motivation, no variety of input and output, no attractive contents) Firstly, we have to learn more advanced input (for example, handling for mouse status), process (for example, idea for functionalization) and output (for example, printing image/sound or visualizing internal data) to flourish game interface/system. Don’t stay in the level of printing const text or inputting single pressed key. Of course, experiences of this level are surely helpful for advanced level. So, let’s go to advanced level!}hjsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,K#hhyh)hubh)}(h ::h]h}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K'hhyh)hubh literal_block)}(hXyimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update()h]hXyimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update()}hj sbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(j h*h+h,K)hhyh)hubeh}(h]new-input-is-new-eventah ]h"]-new input is new eventah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjMerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsj ju nametypes}(h2h]hvj uh}(h/h hZh5hsh`jhyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/5.HP_bar/0000755000175100001770000000000014676242436024145 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022500000000000010214 xustar00121 path=pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.doctree 28 mtime=1727612177.3971405 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROC0000644000175100001770000003046314676242421031764 0ustar00runnerdocker(1sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourcep/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h)with Advanced PROCESS - Functionalizationh]h)with Advanced PROCESS - Functionalization}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hFirst, Let’s print visualized geometry, not text. How about HP bar? If max HP of game is fixed and current HP of game can vary from 0 to max HP, what will be simplest way to print both two data?h]hFirst, Let’s print visualized geometry, not text. How about HP bar? If max HP of game is fixed and current HP of game can vary from 0 to max HP, what will be simplest way to print both two data?}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h&.. image:: AdvancedOutputProcess1.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess1.gif candidates}*hs original_uriAdvancedOutputProcess1.gifuh(hh*h+h,Khh`h)hubh)}(h&.. image:: AdvancedOutputProcess2.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess2.gifh}hhshAdvancedOutputProcess2.gifuh(hh*h+h,Khh`h)hubh)}(h&.. image:: AdvancedOutputProcess3.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess3.gifh}hhshAdvancedOutputProcess3.gifuh(hh*h+h,Khh`h)hubhr)}(hXYeah, just re-rendering text when certain variable is changed. How to change variable? That logic is inside of Event statement. (Pressing up or down to adjust HP.) Same method as before. But they are still text, which means they are not visualized enough. How to visualize these two data more detail (max HP, current HP)? We can use idea of magazine (gun’s magazine). HP is integer value, which is discrete. So, it can be printed as below:h]hXYeah, just re-rendering text when certain variable is changed. How to change variable? That logic is inside of Event statement. (Pressing up or down to adjust HP.) Same method as before. But they are still text, which means they are not visualized enough. How to visualize these two data more detail (max HP, current HP)? We can use idea of magazine (gun’s magazine). HP is integer value, which is discrete. So, it can be printed as below:}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(h&.. image:: AdvancedOutputProcess4.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess4.gifh}hhshAdvancedOutputProcess4.gifuh(hh*h+h,Khh`h)hubh)}(h&.. image:: AdvancedOutputProcess5.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess5.gifh}hhshAdvancedOutputProcess5.gifuh(hh*h+h,Khh`h)hubh)}(h'.. image:: AdvancedOutputProcess6.gif h]h}(h]h ]h"]h$]h&]uri7tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess6.gifh}hhshAdvancedOutputProcess6.gifuh(hh*h+h,Khh`h)hubhr)}(hXMuch better, isn’t it? Drawing logic is inside of #6. Logic is simple, first, draw a **big rectangular** which color is black. Then, check whether draw a **smaller rectangular** which color is red or not depending on current HP. Finally, draw **margin** of current small rectangular. Margin of color is white. We can find there are 4 parameters for location data in ``pygame.draw.rect`` (I mean, third data. First data is canvas data, second data is color data and fourth data is width.) The easiest way to understand 4 parameters is change them. Change one value into 10 or 30 while others are 20! Then it can be understood. Needless to explain.h](hWMuch better, isn’t it? Drawing logic is inside of #6. Logic is simple, first, draw a }hhsbh strong)}(h**big rectangular**h]hbig rectangular}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh2 which color is black. Then, check whether draw a }hhsbh)}(h**smaller rectangular**h]hsmaller rectangular}hjsbah}(h]h ]h"]h$]h&]uh(hhhubhB which color is red or not depending on current HP. Finally, draw }hhsbh)}(h **margin**h]hmargin}hjsbah}(h]h ]h"]h$]h&]uh(hhhubhq of current small rectangular. Margin of color is white. We can find there are 4 parameters for location data in }hhsbh literal)}(h``pygame.draw.rect``h]hpygame.draw.rect}hj*sbah}(h]h ]h"]h$]h&]uh(j(hhubhX (I mean, third data. First data is canvas data, second data is color data and fourth data is width.) The easiest way to understand 4 parameters is change them. Change one value into 10 or 30 while others are 20! Then it can be understood. Needless to explain.}hhsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hXFurthermore, now it’s time to functionalize specifically. I push Always statement and Event statement into main function. (#7 is needed to find main function and execute it.) And made new function for drawHP. Functionalization idea for game is not far away from that of normal GUI program. For example, it is better to make **single print function for every single value** which has to be displayed. Of course, setting location for each value has to be done while you are designing the screen.h](hXFFurthermore, now it’s time to functionalize specifically. I push Always statement and Event statement into main function. (#7 is needed to find main function and execute it.) And made new function for drawHP. Functionalization idea for game is not far away from that of normal GUI program. For example, it is better to make }hjBsbh)}(h0**single print function for every single value**h]h,single print function for every single value}hjJsbah}(h]h ]h"]h$]h&]uh(hhjBubhy which has to be displayed. Of course, setting location for each value has to be done while you are designing the screen.}hjBsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubhr)}(h ::h]h}hjbsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K"hh`h)hubh literal_block)}(hXEimport pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main()h]hXEimport pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main()}hjrsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(jph*h+h,K$hh`h)hubeh}(h]'with-advanced-process-functionalizationah ]h"])with advanced process - functionalizationah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZjju nametypes}(h2h]juh}(h/h hZh5jh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/6.Buttons/0000755000175100001770000000000014676242436024451 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022400000000000010213 xustar00120 path=pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT.doctree 28 mtime=1727612177.4031405 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTP0000644000175100001770000003473114676242421032155 0ustar00runnerdocker9sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceo/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h with Advanced OUTPUT – Buttonsh]h with Advanced OUTPUT – Buttons}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXEven if KEYDOWN event is used, it seems like this is not entirely GUI game because GUI of this game is only used for output(=print), not input. Input for GUI means caring mouse event for specific location. How about making two buttons to increase or decrease HP?h]hXEven if KEYDOWN event is used, it seems like this is not entirely GUI game because GUI of this game is only used for output(=print), not input. Input for GUI means caring mouse event for specific location. How about making two buttons to increase or decrease HP?}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h$.. image:: AdvancedInputOutput1.gif h]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput1.gif candidates}*hs original_uriAdvancedInputOutput1.gifuh(hh*h+h,Khh`h)hubh)}(h#.. image:: AdvancedInputOutput2.gifh]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput2.gifh}hhshAdvancedInputOutput2.gifuh(hh*h+h,Khh`h)hubhr)}(hXOkay, making two buttons is simple. Look at the button, they have unique visual shape. How can it be? Simple as previous idea: First, draw **big square**. Second, draw **smaller square** which has small width (this square doesn’t have inner color so color of big square can be displayed) so inner square and outer square seems like separated. But these buttons are still for output only. We need to make click area for this.h](hOkay, making two buttons is simple. Look at the button, they have unique visual shape. How can it be? Simple as previous idea: First, draw }hhsbh strong)}(h**big square**h]h big square}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh. Second, draw }hhsbh)}(h**smaller square**h]hsmaller square}hhsbah}(h]h ]h"]h$]h&]uh(hhhubh which has small width (this square doesn’t have inner color so color of big square can be displayed) so inner square and outer square seems like separated. But these buttons are still for output only. We need to make click area for this.}hhsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(h#.. image:: AdvancedInputOutput3.gifh]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput3.gifh}hhshAdvancedInputOutput3.gifuh(hh*h+h,Khh`h)hubh)}(h$.. image:: AdvancedInputOutput4.gif h]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput4.gifh}hhshAdvancedInputOutput4.gifuh(hh*h+h,Khh`h)hubh)}(h$.. image:: AdvancedInputOutput5.gif h]h}(h]h ]h"]h$]h&]uri6tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput5.gifh}hhshAdvancedInputOutput5.gifuh(hh*h+h,Khh`h)hubhr)}(hX.Now new event ``MOUSEBUTTONUP`` is added at Event statement. Notice that up of mouse is same as down of key. If MOUSEBUTTONUP is activated, ``event.pos`` will be recorded as x and y. Which means, clicked point. So, determining clicked point is whether inside of certain Rect area or not is needed by checking ``collidepoint``. If inside, it means “**user clicked some point which is part of certain area**” then, adequate process (updating value) is needed. Notice that there are two area for input: **(270, 425, 45, 45)** and **(325, 425, 45, 45)** at Event Statement. Notice that also there are two area for output. **(margin, height - r -10 , r, r)** and **(margin + r + r_margin, height - r - 10, r, r)** at drawButtons. In the case of button, input and output area for button must be **identical**. (Otherwise, this button will be deceptive!) It will be best idea to set this data as same value without calculating exact location of function (for output) into constant (for input). There is no specific function to tie this area, so you have to care about this.h](hNow new event }hjsbh literal)}(h``MOUSEBUTTONUP``h]h MOUSEBUTTONUP}hj sbah}(h]h ]h"]h$]h&]uh(jhjubhm is added at Event statement. Notice that up of mouse is same as down of key. If MOUSEBUTTONUP is activated, }hjsbj )}(h ``event.pos``h]h event.pos}hjsbah}(h]h ]h"]h$]h&]uh(jhjubh will be recorded as x and y. Which means, clicked point. So, determining clicked point is whether inside of certain Rect area or not is needed by checking }hjsbj )}(h``collidepoint``h]h collidepoint}hj.sbah}(h]h ]h"]h$]h&]uh(jhjubh. If inside, it means “}hjsbh)}(h9**user clicked some point which is part of certain area**h]h5user clicked some point which is part of certain area}hj@sbah}(h]h ]h"]h$]h&]uh(hhjubha” then, adequate process (updating value) is needed. Notice that there are two area for input: }hjsbh)}(h**(270, 425, 45, 45)**h]h(270, 425, 45, 45)}hjRsbah}(h]h ]h"]h$]h&]uh(hhjubh and }hjsbh)}(h**(325, 425, 45, 45)**h]h(325, 425, 45, 45)}hjdsbah}(h]h ]h"]h$]h&]uh(hhjubhE at Event Statement. Notice that also there are two area for output. }hjsbh)}(h#**(margin, height - r -10 , r, r)**h]h(margin, height - r -10 , r, r)}hjvsbah}(h]h ]h"]h$]h&]uh(hhjubh and }hjsbh)}(h2**(margin + r + r_margin, height - r - 10, r, r)**h]h.(margin + r + r_margin, height - r - 10, r, r)}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhQ at drawButtons. In the case of button, input and output area for button must be }hjsbh)}(h **identical**h]h identical}hjsbah}(h]h ]h"]h$]h&]uh(hhjubhX. (Otherwise, this button will be deceptive!) It will be best idea to set this data as same value without calculating exact location of function (for output) into constant (for input). There is no specific function to tie this area, so you have to care about this.}hjsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(h ::h]h}hjsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh literal_block)}(hXI import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main()h]hXI import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main()}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(jh*h+h,K"hh`h)hubeh}(h]with-advanced-output-buttonsah ]h"] with advanced output – buttonsah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZjju nametypes}(h2h]juh}(h/h hZh5jh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]h system_message)}(hhh]hr)}(h?Explicit markup ends without a blank line; unexpected unindent.h]h?Explicit markup ends without a blank line; unexpected unindent.}hjjsbah}(h]h ]h"]h$]h&]uh(hqhjgubah}(h]h ]h"]h$]h&]levelKtypeWARNINGlineKsourceh+uh(jehh`h)hh*h+h,Kubatransform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/7.Game_board/0000755000175100001770000000000014676242436025034 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022200000000000010211 xustar00118 path=pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.doctree 28 mtime=1727612177.4071405 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha0000644000175100001770000003662314676242421032246 0ustar00runnerdocker=sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourcem/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(hand plus alphah]hand plus alpha}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXKActually, everything doesn’t seem like a game. Now, we will insert a rule into this program. Then. It will become game. Rule is simple: counting red or black from 5x5 2D array and choose the color which has much more number! If correct, HP++, otherwise, HP--. Then new array will be set for next quiz! too simple but game which can be made in this tutorial. First, we need to generate 2D array and print it. How? We learned how to print integer data (which equals single data (0D array)) and two buttons (which equals single array (1D array). Case of 2D array just needs one-more step.h]hXKActually, everything doesn’t seem like a game. Now, we will insert a rule into this program. Then. It will become game. Rule is simple: counting red or black from 5x5 2D array and choose the color which has much more number! If correct, HP++, otherwise, HP--. Then new array will be set for next quiz! too simple but game which can be made in this tutorial. First, we need to generate 2D array and print it. How? We learned how to print integer data (which equals single data (0D array)) and two buttons (which equals single array (1D array). Case of 2D array just needs one-more step.}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h$.. image:: AdvancedOutputAlpha1.gif h]h}(h]h ]h"]h$]h&]uri9tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha1.gif candidates}*hs original_uriAdvancedOutputAlpha1.gifuh(hh*h+h,Khh`h)hubh)}(h$.. image:: AdvancedOutputAlpha2.gif h]h}(h]h ]h"]h$]h&]uri9tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha2.gifh}hhshAdvancedOutputAlpha2.gifuh(hh*h+h,Khh`h)hubh)}(h$.. image:: AdvancedOutputAlpha3.gif h]h}(h]h ]h"]h$]h&]uri9tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha3.gifh}hhshAdvancedOutputAlpha3.gifuh(hh*h+h,Khh`h)hubhr)}(hXgenerateboard function returns randomly generated 2D board with the number of red block and black block. Needless to explain. Also, printboard function prints 2D board by same method as 1D array. Output color will be changed by data of board[i][j] is 1 or not. This board is for output only. Processing about margin seems to be annoying because we have to know exact location by calculating. Remember prolog. Output (executing result) of Pygame is GUI but input(coding) of Pygame is CUI. That is Pygame.h]hXgenerateboard function returns randomly generated 2D board with the number of red block and black block. Needless to explain. Also, printboard function prints 2D board by same method as 1D array. Output color will be changed by data of board[i][j] is 1 or not. This board is for output only. Processing about margin seems to be annoying because we have to know exact location by calculating. Remember prolog. Output (executing result) of Pygame is GUI but input(coding) of Pygame is CUI. That is Pygame.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hXActually, there are a lot of idea for improving this game. How about changing button into image file? How about adding sound effect when previous chose was correct or not? How about setting time limit? How about adding visual effect when player win(maxHP) or not(minHP)? How about make the board bigger with another colors? How about implement Flood-it game by given interface? There are still lots of selection because this game is simple.h]hXActually, there are a lot of idea for improving this game. How about changing button into image file? How about adding sound effect when previous chose was correct or not? How about setting time limit? How about adding visual effect when player win(maxHP) or not(minHP)? How about make the board bigger with another colors? How about implement Flood-it game by given interface? There are still lots of selection because this game is simple.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(h ::h]h}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh literal_block)}(hX:import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main()h]hX:import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(hh*h+h,Khh`h)hubeh}(h]and-plus-alphaah ]h"]and plus alphaah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhhu nametypes}(h2h]huh}(h/h hZh5hh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0151258 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/8.Epilog/0000755000175100001770000000000014676242436024234 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.4111404 pygame-2.6.1/docs/generated/doctrees/tut/en/Red_or_Black/8.Epilog/Epilog.doctree0000644000175100001770000001433714676242421027024 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceQ/home/runner/work/pygame/pygame/docs/reST/tut/en/Red_or_Black/8.Epilog/Epilog.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(hEpilogh]hEpilog}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXHowever, this is end of tutorial. This tutorial covers only a few of Pygame. But don’t worry. Programming is the most creative activity human can do. Immanuel Kant said “Genius is the innate mental aptitude through which nature gives the rule to art”. Programming is making a rule and give it to computer. If rule is made, computer can do anything within rule. So, number of cases incredibly increase.h]hXHowever, this is end of tutorial. This tutorial covers only a few of Pygame. But don’t worry. Programming is the most creative activity human can do. Immanuel Kant said “Genius is the innate mental aptitude through which nature gives the rule to art”. Programming is making a rule and give it to computer. If rule is made, computer can do anything within rule. So, number of cases incredibly increase.}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubhr)}(hXqWhat is conclusion? **Output is greater than input**. We can implement much more program within our knowledge. Or, we can learn new knowledge easily by connecting it to old knowledge. That’s trait of programming. And so is game. “Radom” is the key concept for every game. (including simple game made on this tutorial!) number of cases is much greater when random variable is concerned. If random variable starts to affect another random variable and so on, output will be greater like Avalanche. That’s why game is interesting. Concept of “Random” is the only unique characteristic for game in comparison to novel, music or movie. Think about Tetris. How much effort Alexey Leonidovich Pajitnov spent? Do you think it is greater than sum of Tetris player’s playing time above the world, along 35 years? That’s ultimate example of both power of programming and game.h](hWhat is conclusion? }hhsbh strong)}(h **Output is greater than input**h]hOutput is greater than input}hhsbah}(h]h ]h"]h$]h&]uh(hhhubhX=. We can implement much more program within our knowledge. Or, we can learn new knowledge easily by connecting it to old knowledge. That’s trait of programming. And so is game. “Radom” is the key concept for every game. (including simple game made on this tutorial!) number of cases is much greater when random variable is concerned. If random variable starts to affect another random variable and so on, output will be greater like Avalanche. That’s why game is interesting. Concept of “Random” is the only unique characteristic for game in comparison to novel, music or movie. Think about Tetris. How much effort Alexey Leonidovich Pajitnov spent? Do you think it is greater than sum of Tetris player’s playing time above the world, along 35 years? That’s ultimate example of both power of programming and game.}hhsbeh}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hvSo, game makers are Avalanche makers. Now it’s time to create any game! Learn! Utilize! Go through trial and errors!h]hvSo, game makers are Avalanche makers. Now it’s time to create any game! Learn! Utilize! Go through trial and errors!}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubeh}(h]epilogah ]h"]epilogah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerherror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhhu nametypes}(h2h]huh}(h/h hZh5hh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9751258 pygame-2.6.1/docs/generated/doctrees/tut/ko/0000755000175100001770000000000014676242436020350 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000015300000000000010214 xustar0079 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/0000755000175100001770000000000014676242436021457 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000017200000000000010215 xustar0094 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/1.프롤로그/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/1.????/0000755000175100001770000000000014676242436022271 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021100000000000010207 xustar00109 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/1.프롤로그/소개.doctree 28 mtime=1727612177.4181404 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/1.????/??.doctree0000644000175100001770000003657614676242421024130 0ustar00runnerdockers=sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourced/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/1.프롤로그/소개.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h 프롤로그h]h 프롤로그}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h]id1ah ]h"] 프롤로그ah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h– 왜 하필 파이게임?h]h– 왜 하필 파이게임?}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hX게임도 프로그램의 일부이기 때문에, 게임은 입력, 처리 그리고 출력으로 구성된다. C 콘솔 환경에서 게임을 만든다고 가정해 보자(C로 소스코드를 작성한 후 콘솔에서 실행하는 방식). 그러면 입력은 수많은 scanf(또는 엔터 입력 필요 없는 비표준 getch) 함수로, 처리는 항상 절차적으로 실행되는 복잡한 알고리즘으로, 출력은 아스키아트를 이용한 printf(그리고 화면을 지우는 깜빡거리는 clear)함수로 구성할 수 있다. 하지만 이렇게 만든 게임은 구식이고, 그래픽 없는 CUI고, 끉겨 보인다는 단점이 있다. 이런 식의 게임을 만드는 것이 질린다면, 보통 Unity 게임엔진이나 Unreal 게임엔진 등 게임 엔진에도 손을 대보게 된다. 하지만, 게임 엔진은 입문장벽이 높다는 단점이 있다. 복소수좌표를 활용한 공간상에서의 충돌, Mechanin/Legacy 애니메이션 호환성, 더 좋은 그래픽을 위한 더 큰 메모리/더 빠른 CPU… 아무래도 콘솔 환경과 게임 엔진 사이에는 딜레마가 있는 것 같다. 이 딜레마를 해결할 수 있을까?h]hX게임도 프로그램의 일부이기 때문에, 게임은 입력, 처리 그리고 출력으로 구성된다. C 콘솔 환경에서 게임을 만든다고 가정해 보자(C로 소스코드를 작성한 후 콘솔에서 실행하는 방식). 그러면 입력은 수많은 scanf(또는 엔터 입력 필요 없는 비표준 getch) 함수로, 처리는 항상 절차적으로 실행되는 복잡한 알고리즘으로, 출력은 아스키아트를 이용한 printf(그리고 화면을 지우는 깜빡거리는 clear)함수로 구성할 수 있다. 하지만 이렇게 만든 게임은 구식이고, 그래픽 없는 CUI고, 끉겨 보인다는 단점이 있다. 이런 식의 게임을 만드는 것이 질린다면, 보통 Unity 게임엔진이나 Unreal 게임엔진 등 게임 엔진에도 손을 대보게 된다. 하지만, 게임 엔진은 입문장벽이 높다는 단점이 있다. 복소수좌표를 활용한 공간상에서의 충돌, Mechanin/Legacy 애니메이션 호환성, 더 좋은 그래픽을 위한 더 큰 메모리/더 빠른 CPU… 아무래도 콘솔 환경과 게임 엔진 사이에는 딜레마가 있는 것 같다. 이 딜레마를 해결할 수 있을까?}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h>.. image:: introduction-PuyoPuyo.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriItut/ko/빨간블록 검은블록/1.프롤로그/introduction-PuyoPuyo.png candidates}*hs original_uriintroduction-PuyoPuyo.pnguh(hh*h+h,Khhyh)hubh literal_block)}(hXWimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-PuyoPuyo.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXWimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-PuyoPuyo.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khhyh)hubh)}(h1(C 콘솔 환경 게임의 예시 - 뿌요뿌요)h]h1(C 콘솔 환경 게임의 예시 - 뿌요뿌요)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K2hhyh)hubh)}(h9.. image:: introduction-TPS.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriDtut/ko/빨간블록 검은블록/1.프롤로그/introduction-TPS.pngh}hhshintroduction-TPS.pnguh(hh*h+h,K5hhyh)hubh)}(hXRimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-TPS.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXRimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-TPS.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K8hhyh)hubh)}(h/(유니티 게임 엔진 게임의 예시- TPS)h]h/(유니티 게임 엔진 게임의 예시- TPS)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KThhyh)hubh)}(hXv다행히 파이게임은 그 딜레마를 해결할 수 있다. 파이게임 이란 프로그래머가 게임을 만들 수 있게 해 주는 파이썬의 외부 라이브러리이다. 파이게임은 콘솔 환경에서의 장점을 가지고 있다. 그 첫째 장점은 하나의 파이게임 프로젝트은 하나의 소스코드와 거의 동치관계라는 것이다. (외부 소리 파일이나 외부 사진 파일을 제외화면) 그래서 프로그래머는 소스 코드를 작성하는 것에만 집중하면 된다. 그리고 둘째 장점은 파이게임은 툴이 아닌 라이브러리이기 때문에, 소스파일에 “import pygame”만 있으면 그 소스파일은 파이게임의 모든 것에 접근할 수 있게 된다. 접근성이 좋다는 것이다. 파이게임은 게임 엔진의 장점도 가지고 있다. 그 첫째 장점은 파이게임이 키보드, 마우스, 파일 등의 상태를 확인하는 입력 관련 함수들과, 도형 그리기, 색 칠하기, 디스플레이 설정 등의 출력 관련 함수들을 제공하기 때문에, CUI가 아닌 GUI 환경에서 실행된다는 것이다. 그리고 둘째 장점은 파이게임이 파이썬에 기반하였기 때문에, 파이게임의 함수들은 절차적이 아닌 이벤트적(여러 함수들이 선택적으로 실행되거나 거의 동시에 실행됨)으로 실행된다는 것이다.h]hXv다행히 파이게임은 그 딜레마를 해결할 수 있다. 파이게임 이란 프로그래머가 게임을 만들 수 있게 해 주는 파이썬의 외부 라이브러리이다. 파이게임은 콘솔 환경에서의 장점을 가지고 있다. 그 첫째 장점은 하나의 파이게임 프로젝트은 하나의 소스코드와 거의 동치관계라는 것이다. (외부 소리 파일이나 외부 사진 파일을 제외화면) 그래서 프로그래머는 소스 코드를 작성하는 것에만 집중하면 된다. 그리고 둘째 장점은 파이게임은 툴이 아닌 라이브러리이기 때문에, 소스파일에 “import pygame”만 있으면 그 소스파일은 파이게임의 모든 것에 접근할 수 있게 된다. 접근성이 좋다는 것이다. 파이게임은 게임 엔진의 장점도 가지고 있다. 그 첫째 장점은 파이게임이 키보드, 마우스, 파일 등의 상태를 확인하는 입력 관련 함수들과, 도형 그리기, 색 칠하기, 디스플레이 설정 등의 출력 관련 함수들을 제공하기 때문에, CUI가 아닌 GUI 환경에서 실행된다는 것이다. 그리고 둘째 장점은 파이게임이 파이썬에 기반하였기 때문에, 파이게임의 함수들은 절차적이 아닌 이벤트적(여러 함수들이 선택적으로 실행되거나 거의 동시에 실행됨)으로 실행된다는 것이다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KVhhyh)hubh)}(h@.. image:: introduction-Battleship.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriKtut/ko/빨간블록 검은블록/1.프롤로그/introduction-Battleship.pngh}hjshintroduction-Battleship.pnguh(hh*h+h,KYhhyh)hubh)}(hXYimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-Battleship.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXYimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-Battleship.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hjsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K\hhyh)hubh)}(h*(파이게임 게임의 예시- 배틀십)h]h*(파이게임 게임의 예시- 배틀십)}hj-sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kxhhyh)hubh)}(hX요약하자면, 파이게임은 저급 수준(콘솔 환경은 예시 중 하나)의 게임 제작 프로그램과 고급 수준(게임 엔진은 예시 중 하나)의 게임 제작 프로그램의 장점을 모두 가진다는 것이다. 파이게임은 이 둘 사이의 좋은 연결점이 된다. 이것이 파이게임을 쓸 이유이다. 더 복잡한 게임 엔진을 최대한 활용해 게임을 만드는 1인 개발자가 목표가 아닌 이상 (빨리 그 게임 엔진을 배우는 것이 낫다!), 콘솔 환경용 게임이 아닌 더 발전된 환경에서 게임을 한번쯤은 코딩해 보고 싶다면 (물론, 푹 빠지면 계속 코딩하게 될 것이다!), 한번쯤은 파이게임을 시도해 볼만 하다.h]hX요약하자면, 파이게임은 저급 수준(콘솔 환경은 예시 중 하나)의 게임 제작 프로그램과 고급 수준(게임 엔진은 예시 중 하나)의 게임 제작 프로그램의 장점을 모두 가진다는 것이다. 파이게임은 이 둘 사이의 좋은 연결점이 된다. 이것이 파이게임을 쓸 이유이다. 더 복잡한 게임 엔진을 최대한 활용해 게임을 만드는 1인 개발자가 목표가 아닌 이상 (빨리 그 게임 엔진을 배우는 것이 낫다!), 콘솔 환경용 게임이 아닌 더 발전된 환경에서 게임을 한번쯤은 코딩해 보고 싶다면 (물론, 푹 빠지면 계속 코딩하게 될 것이다!), 한번쯤은 파이게임을 시도해 볼만 하다.}hj;sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kzhhyh)hubeh}(h]id2ah ]h"]– 왜 하필 파이게임?ah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj{error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsjNjKu nametypes}(h2h]hvjNuh}(h/h hZh5hsh`jKhyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/2.텍스트 출력/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/2.??? ??/0000755000175100001770000000000014676242436022431 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024100000000000010212 xustar00133 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력.doctree 28 mtime=1727612177.4251404 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/2.??? ??/?? ???? ??.doctree0000644000175100001770000005700614676242421025151 0ustar00runnerdocker]sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource|/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h기본 형식과 기초 출력h]h기본 형식과 기초 출력}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h]id1ah ]h"]기본 형식과 기초 출력ah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h1–이벤트 기반과 GUI 기반으로의 입문h]h1–이벤트 기반과 GUI 기반으로의 입문}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hXm앞서 말했듯, 파이게임은 GUI를 기반으로 한다. 정확히는, 파이게임은 2D용 입력, 출력 함수를 사용하여 2D GUI를 기반으로 한다. 어찌됐든, CUI환경에서만 먹히는 파이썬의 print함수나 input함수와는 이별을 해야 한다. 그렇다면, 파이게임의 어떤 함수가 print/input함수를 대체하는가? 우선, 프로그래밍 언어의 기본 형식과 출력을 배우는 친숙한 예제인 “Hello World!”프로젝트로 되돌아가야 한다. (이 프로젝트는 같은 디렉토리에 .ttf확장자를 가지는 폰트 파일을 필요로 한다.)h]hXm앞서 말했듯, 파이게임은 GUI를 기반으로 한다. 정확히는, 파이게임은 2D용 입력, 출력 함수를 사용하여 2D GUI를 기반으로 한다. 어찌됐든, CUI환경에서만 먹히는 파이썬의 print함수나 input함수와는 이별을 해야 한다. 그렇다면, 파이게임의 어떤 함수가 print/input함수를 대체하는가? 우선, 프로그래밍 언어의 기본 형식과 출력을 배우는 친숙한 예제인 “Hello World!”프로젝트로 되돌아가야 한다. (이 프로젝트는 같은 디렉토리에 .ttf확장자를 가지는 폰트 파일을 필요로 한다.)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h?.. image:: Basic-ouput-sourcecode.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriNtut/ko/빨간블록 검은블록/2.텍스트 출력/Basic-ouput-sourcecode.png candidates}*hs original_uriBasic-ouput-sourcecode.pnguh(hh*h+h,Khhyh)hubh literal_block)}(hXXimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Basic-ouput-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Basic-ouput-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khhyh)hubh)}(hB.. image:: Bagic-ouput-result-screen.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriQtut/ko/빨간블록 검은블록/2.텍스트 출력/Bagic-ouput-result-screen.pngh}hhshBagic-ouput-result-screen.pnguh(hh*h+h,K3hhyh)hubh)}(hX[import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-ouput-result-screen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hX[import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-ouput-result-screen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K6hhyh)hubh)}(h<(Hello World 프로젝트의 소스 코드와 실행 결과)h]h<(Hello World 프로젝트의 소스 코드와 실행 결과)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KShhyh)hubh)}(hXn1줄짜리 print(“Hello World!”)에 비하면 소스 코드가 꽤 복잡하다. 이것은 GUI환경에서 텍스트는 최소 5개의 구성 성분(텍스트 내용, 폰트, 크기, 색상, 좌표)를 가지기 때문이다. GUI환경에서 텍스트는 1개의 구성 성분(텍스트 내용)만을 가지므로, 4개의 구성 성분이 추가된 셈이다. 예외적으로, #7의 pygame.display.set_caption(“Hello World Project”)함수는 print(“Hello World Project”)함수와 동일한 기능을 한다. 하지만, 이 함수 속 문자열은 프로그램의 윈도우 캡션에 고정된 문자열이다.h]hXn1줄짜리 print(“Hello World!”)에 비하면 소스 코드가 꽤 복잡하다. 이것은 GUI환경에서 텍스트는 최소 5개의 구성 성분(텍스트 내용, 폰트, 크기, 색상, 좌표)를 가지기 때문이다. GUI환경에서 텍스트는 1개의 구성 성분(텍스트 내용)만을 가지므로, 4개의 구성 성분이 추가된 셈이다. 예외적으로, #7의 pygame.display.set_caption(“Hello World Project”)함수는 print(“Hello World Project”)함수와 동일한 기능을 한다. 하지만, 이 함수 속 문자열은 프로그램의 윈도우 캡션에 고정된 문자열이다.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KUhhyh)hubh)}(hX우선, 무언가를 출력하기 위해선 소스코드가 어떻게 작성되어야 하는지 그 형식을 살펴보자. 소스코드는 4개의 부분으로 나눠질 수 있다. Header(#1-#2), Initial문(#3-#12), Always문(#13-#20), Event문(#16-#19)가 그것이다.h]hX우선, 무언가를 출력하기 위해선 소스코드가 어떻게 작성되어야 하는지 그 형식을 살펴보자. 소스코드는 4개의 부분으로 나눠질 수 있다. Header(#1-#2), Initial문(#3-#12), Always문(#13-#20), Event문(#16-#19)가 그것이다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KWhhyh)hubh)}(hXHeader에선, 모듈들을 import하는 작업이 실행된다. 여기에 import pygame, sys는 항상 필요하다. 이 프로젝트가 파이게임 프로젝트이며, 사용자가 프로그램을 종료하고 싶을 때 종료되어야 하기 때문에(실제로 #19에서 sys.exit()가 실행된다) 추가적인 설명이 필요 없는 당연한 문구이다. from pygame.locals import*는 #17에서의 QUIT같은 유용한 상수들을 선언 없이 사용하기 위해 거의 반필수적으로 필요하다.h]hXHeader에선, 모듈들을 import하는 작업이 실행된다. 여기에 import pygame, sys는 항상 필요하다. 이 프로젝트가 파이게임 프로젝트이며, 사용자가 프로그램을 종료하고 싶을 때 종료되어야 하기 때문에(실제로 #19에서 sys.exit()가 실행된다) 추가적인 설명이 필요 없는 당연한 문구이다. from pygame.locals import*는 #17에서의 QUIT같은 유용한 상수들을 선언 없이 사용하기 위해 거의 반필수적으로 필요하다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KYhhyh)hubh)}(hXInitial문(무한 반복문 이전의 문장들)에선, 전역 변수가 한번만 초기화되거나 몇몇 함수가 한번만 호출된다. 주로 색상과 같은 전역 변수들이 가독성을 높이기 위해 초기화된다. 파이게임은 여러가지 색상을 사용하는 화려한 GUI임을 까먹어선 안된다. (게임이므로) 하나의 색상은 R값, G값, B값 3개의 구성 요소를 가진다. 그래서 색상 변수는 red = (255, 0, 0)와 같이 선언되어야 한다. pygame.init()과 같은 함수는 나중에 사용할 함수를 위해선 가장 앞서서 호출되어야 한다. (이 외의 함수들은 나중에 언급하겠다.)h]hXInitial문(무한 반복문 이전의 문장들)에선, 전역 변수가 한번만 초기화되거나 몇몇 함수가 한번만 호출된다. 주로 색상과 같은 전역 변수들이 가독성을 높이기 위해 초기화된다. 파이게임은 여러가지 색상을 사용하는 화려한 GUI임을 까먹어선 안된다. (게임이므로) 하나의 색상은 R값, G값, B값 3개의 구성 요소를 가진다. 그래서 색상 변수는 red = (255, 0, 0)와 같이 선언되어야 한다. pygame.init()과 같은 함수는 나중에 사용할 함수를 위해선 가장 앞서서 호출되어야 한다. (이 외의 함수들은 나중에 언급하겠다.)}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K[hhyh)hubh)}(hXvAlways문(무한 반복문)에선, 전역 변수가 계속 업데이트되거나 몇몇 함수가 계속 호출된다. (물론, 조건문이 있는 경우 조건이 맞을 때만) pygame.display.update() 라는 함수는 일반적으로 다른 변수/함수의 처리가 끝난 이후에 호출되는데, 이 함수는 처리의 결과물들을 스크린(= 모니터)에 출력하는 함수이기 때문이다. 이 함수가 Always문 마지막에 실행되지 않으면, 출력되는 화면과 게임 내부 데이터가 서로 일치하지 않는 문제가 생길 수 있다. (이 외의 함수들은 나중에 언급하겠다.)h]hXvAlways문(무한 반복문)에선, 전역 변수가 계속 업데이트되거나 몇몇 함수가 계속 호출된다. (물론, 조건문이 있는 경우 조건이 맞을 때만) pygame.display.update() 라는 함수는 일반적으로 다른 변수/함수의 처리가 끝난 이후에 호출되는데, 이 함수는 처리의 결과물들을 스크린(= 모니터)에 출력하는 함수이기 때문이다. 이 함수가 Always문 마지막에 실행되지 않으면, 출력되는 화면과 게임 내부 데이터가 서로 일치하지 않는 문제가 생길 수 있다. (이 외의 함수들은 나중에 언급하겠다.)}hj*sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K]hhyh)hubh)}(hXEvent문(모든 이벤트를 체크하는 반복문)에선, 특정 이벤트가 발생하면 이에 대한 처리가 이루어진다. pygame.event.get() 함수는 Always문에서 발생한 이벤트들의 배열을 반환한다. 그리고 이 이벤트들은 자동적으로 발생 시간순으로 정렬된다. 그러므로, for-in문을 쓰면, Always문에서 발생한 모든 이벤트들을 순차적으로 처리할 수 있다 (이벤트 기반). 예를 들어서, #17-#19는 QUIT라는 이벤트를 처리하고 있다. 이 이벤트가 트리거되면, 파이게임이 종료된 이후 시스템이 종료되게 된다. (이 외의 함수들은 나중에 언급하겠다.)h]hXEvent문(모든 이벤트를 체크하는 반복문)에선, 특정 이벤트가 발생하면 이에 대한 처리가 이루어진다. pygame.event.get() 함수는 Always문에서 발생한 이벤트들의 배열을 반환한다. 그리고 이 이벤트들은 자동적으로 발생 시간순으로 정렬된다. 그러므로, for-in문을 쓰면, Always문에서 발생한 모든 이벤트들을 순차적으로 처리할 수 있다 (이벤트 기반). 예를 들어서, #17-#19는 QUIT라는 이벤트를 처리하고 있다. 이 이벤트가 트리거되면, 파이게임이 종료된 이후 시스템이 종료되게 된다. (이 외의 함수들은 나중에 언급하겠다.)}hj8sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K_hhyh)hubh)}(hX-기본 형식이 고정되어 있다고 가정하면, 이 형식에 일부 함수들을 적절히 삽입하면 “Hello World!”가 출력되게 할 수 있다. 첫째로, 텍스트의 폰트와 크기가 정해져야 한다. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) 라는 #9의 함수는 주어진 이름의 ttf파일로 폰트를 정하고 크기 (이 경우 32)도 정한다. 이 함수의 반환 값은 myTextFont라는 객체에 저장해 두었다. 그리고 myTextFont객체의 render(“Hello World!”, True, red, green)라는 #10의 함수의 반환 값을 myText라는 객체에 저장해 두었다. render 함수는 텍스트 내용과 색상을 정할 수 있다. 이 경우, 텍스트의 색상은 빨간 색, 텍스트가 아닌 구역의 색상은 초록 색이 된다. myText객체의 get_rect() 라는 #11의 함수의 반환 값을 myTextArea라는 객체에 저장해 두는데, myTextArea는 텍스트를 출력하기 위해 할당된 구역을 의미한다. get_rect()라는 함수는 텍스트의 폰트 크기와 텍스트의 길이를 고려하여 적절한 직사각형 공간을 반환한다. 만약 myTextArea라는 객체의 center라는 멤버 변수를 텍스트가 화면 정중앙에 오게끔 수정한다면, (#12) 텍스트의 위치를 화면 정중앙으로 오게 알 수 있다.h]hX-기본 형식이 고정되어 있다고 가정하면, 이 형식에 일부 함수들을 적절히 삽입하면 “Hello World!”가 출력되게 할 수 있다. 첫째로, 텍스트의 폰트와 크기가 정해져야 한다. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) 라는 #9의 함수는 주어진 이름의 ttf파일로 폰트를 정하고 크기 (이 경우 32)도 정한다. 이 함수의 반환 값은 myTextFont라는 객체에 저장해 두었다. 그리고 myTextFont객체의 render(“Hello World!”, True, red, green)라는 #10의 함수의 반환 값을 myText라는 객체에 저장해 두었다. render 함수는 텍스트 내용과 색상을 정할 수 있다. 이 경우, 텍스트의 색상은 빨간 색, 텍스트가 아닌 구역의 색상은 초록 색이 된다. myText객체의 get_rect() 라는 #11의 함수의 반환 값을 myTextArea라는 객체에 저장해 두는데, myTextArea는 텍스트를 출력하기 위해 할당된 구역을 의미한다. get_rect()라는 함수는 텍스트의 폰트 크기와 텍스트의 길이를 고려하여 적절한 직사각형 공간을 반환한다. 만약 myTextArea라는 객체의 center라는 멤버 변수를 텍스트가 화면 정중앙에 오게끔 수정한다면, (#12) 텍스트의 위치를 화면 정중앙으로 오게 알 수 있다.}hjFsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kahhyh)hubh)}(hXm하지만 화면 정중앙을 어떻게 알아낼 수 있을까? 우선, 화면의 전체 크기를 정해야 한다. #8의 pygame.display.set_mode((640,480)) 함수는 캔버스 (크기, 색상, 위치 정보를 가지는 변수들이 display.update함수가 호출되면 그려지는 공간)를 생성하고 그 크기를 640 x 480으로 고정시킨다. 그렇다면, 화면의 정중앙은 (320, 240)이다. 화면의 전체 크기가 확정된다면, 약간의 계산만 하면 모든 종류의 위치를 결정할 수 있게 된다. (2D GUI이므로 출력되는 모든 것은 x, y성분을 가진다) (오른쪽이 x좌표가 크고, 아래쪽이 y좌표가 큼을 헷갈리면 안된다. 앞서서 말한 함수들은 모두 Initial문에 실행되어야 하는 것들이다, 왜나하면 이 정보들은 프로그램 도중 업데이트가 필요 없기 때문이다.h]hXm하지만 화면 정중앙을 어떻게 알아낼 수 있을까? 우선, 화면의 전체 크기를 정해야 한다. #8의 pygame.display.set_mode((640,480)) 함수는 캔버스 (크기, 색상, 위치 정보를 가지는 변수들이 display.update함수가 호출되면 그려지는 공간)를 생성하고 그 크기를 640 x 480으로 고정시킨다. 그렇다면, 화면의 정중앙은 (320, 240)이다. 화면의 전체 크기가 확정된다면, 약간의 계산만 하면 모든 종류의 위치를 결정할 수 있게 된다. (2D GUI이므로 출력되는 모든 것은 x, y성분을 가진다) (오른쪽이 x좌표가 크고, 아래쪽이 y좌표가 큼을 헷갈리면 안된다. 앞서서 말한 함수들은 모두 Initial문에 실행되어야 하는 것들이다, 왜나하면 이 정보들은 프로그램 도중 업데이트가 필요 없기 때문이다.}hjTsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kchhyh)hubh)}(hX물론, fill함수나 blit함수는 함수의 특성 때문에 Always문에 실행된다. #14의 fill(white) 함수는 캔버스를 단색(하얀색)으로 채우는 기능을 수행한다. #15의 blit(myText, myTextArea)는 특정 객체(myText)를 특정 위치(myTextArea)에 그리는 기능을 수행한다. blit이 fill 이후에 수행되어야 한다. 모든 것이 캔버스에 그려지고 나면, 캔버스의 결과물은 display.update함수가 실행되면 출력되게 된다.h]hX물론, fill함수나 blit함수는 함수의 특성 때문에 Always문에 실행된다. #14의 fill(white) 함수는 캔버스를 단색(하얀색)으로 채우는 기능을 수행한다. #15의 blit(myText, myTextArea)는 특정 객체(myText)를 특정 위치(myTextArea)에 그리는 기능을 수행한다. blit이 fill 이후에 수행되어야 한다. 모든 것이 캔버스에 그려지고 나면, 캔버스의 결과물은 display.update함수가 실행되면 출력되게 된다.}hjbsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kehhyh)hubh)}(hX이것이 20줄짜리 소스코드를 위한 설명이었다. 20줄짜리 소스코드 치곤 작동 원리를 이해하는 데 시간이 오래 걸리는 것 같다. 하지만, 이 소스코드에 무언가를 추가하거나 수정하는 것은 그다지 어렵지 않을 것이다. 이 소스코드의 기본 형식과 출력을 위한 기본 단계를 이해했다면 말이다. 여기에 처리 로직을 추가하는 것은 어떨까? 다음 프로젝트에서 진행될 것이다.h]hX이것이 20줄짜리 소스코드를 위한 설명이었다. 20줄짜리 소스코드 치곤 작동 원리를 이해하는 데 시간이 오래 걸리는 것 같다. 하지만, 이 소스코드에 무언가를 추가하거나 수정하는 것은 그다지 어렵지 않을 것이다. 이 소스코드의 기본 형식과 출력을 위한 기본 단계를 이해했다면 말이다. 여기에 처리 로직을 추가하는 것은 어떨까? 다음 프로젝트에서 진행될 것이다.}hjpsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kghhyh)hubh)}(h<참고 코드> ::h]h<참고 코드>}hj~sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Kjhhyh)hubh)}(hXimport pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20h]hXimport pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20}hjsbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,Klhhyh)hubeh}(h]guiah ]h"]1–이벤트 기반과 gui 기반으로의 입문ah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsjju nametypes}(h2h]hvjuh}(h/h hZh5hsh`jhyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/3.텍스트 이동/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/3.??? ??/0000755000175100001770000000000014676242436022432 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022400000000000010213 xustar00120 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리.doctree 28 mtime=1727612177.4311404 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/3.??? ??/?? ??.doctree0000644000175100001770000004117114676242421024512 0ustar00runnerdockernBsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceo/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h 기초 처리h]h 기초 처리}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h]id1ah ]h"] 기초 처리ah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h%-화면이 움직이기 위한 조건h]h%-화면이 움직이기 위한 조건}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hX이전 프로젝트는 게임이 아니라 이미지 한 장 같아 보인다. 출력을 바꾸는 입력이나 처리가 없기 때문이다. 물론, 윈도우의 종료 버튼을 누르는 것은 고려되지 않는다 (프로그램을 종료하는 것에 불과하므로). 우선, 우리는 “Hello World!”가 자동적으로 움직이게 할 것이다. 그러면 이제 프로젝트는 이미지 한 장이 아닌 애니메이션 같아 보일 것이다. 어떻게 텍스트를 움직일까? 우리는 텍스트의 위치가 Initial statement에서 초기화됨을 알고 있다. 그렇다면, 이 위치가 Always statement에서 업데이트되게 하면 된다. 물론, 추가적인 변수가 필요할 것이다.h]hX이전 프로젝트는 게임이 아니라 이미지 한 장 같아 보인다. 출력을 바꾸는 입력이나 처리가 없기 때문이다. 물론, 윈도우의 종료 버튼을 누르는 것은 고려되지 않는다 (프로그램을 종료하는 것에 불과하므로). 우선, 우리는 “Hello World!”가 자동적으로 움직이게 할 것이다. 그러면 이제 프로젝트는 이미지 한 장이 아닌 애니메이션 같아 보일 것이다. 어떻게 텍스트를 움직일까? 우리는 텍스트의 위치가 Initial statement에서 초기화됨을 알고 있다. 그렇다면, 이 위치가 Always statement에서 업데이트되게 하면 된다. 물론, 추가적인 변수가 필요할 것이다.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(hA.. image:: Bagic-PROCESS-sourcecode.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriPtut/ko/빨간블록 검은블록/3.텍스트 이동/Bagic-PROCESS-sourcecode.png candidates}*hs original_uriBagic-PROCESS-sourcecode.pnguh(hh*h+h,Khhyh)hubh literal_block)}(hXZimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXZimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khhyh)hubh)}(hC.. image:: Bagic-PROCESS-resultscreen.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriRtut/ko/빨간블록 검은블록/3.텍스트 이동/Bagic-PROCESS-resultscreen.pngh}hhshBagic-PROCESS-resultscreen.pnguh(hh*h+h,K3hhyh)hubh)}(hX\import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hX\import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K6hhyh)hubh)}(hE(Moving World 프로젝트의 소스 코드 일부 와 실행 결과)h]hE(Moving World 프로젝트의 소스 코드 일부 와 실행 결과)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KShhyh)hubh)}(hV(Moving World가 알카노이드의 공이나 DVD 화면보호기처럼 움직인다.)h]hV(Moving World가 알카노이드의 공이나 DVD 화면보호기처럼 움직인다.)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KUhhyh)hubh)}(hX-#1 - #5가 Initial문의 뒷부분에 추가되었다. 또한, 다중 if-else문은 Always문의 앞부분에 추가되었고, #11이 Always문의 뒷부분에 추가되었다. #2 - #10이 무엇을 처리하는지는 쉽다. Always문이 시작될 때 Moving World의 좌표에 해당되는 변수를 바꾸고 있다. 하지만 문제가 있다. Moving World는 얼마나 빠를까? Moving World의 변위는 루트2 임은 확실하다. (피타고라스 정리를 이용하면) 하지만 얼마나 자주 Moving World의 변위가 바뀌는가? 이것은 Always문의 시간 복잡도를 분석하지 않는 이상 알아낼 수 없다. (이것은 Always문이 시작하는 빈도에 따라 달라지므로) 그리고 시간 복잡도는 컴퓨터마다 다르다. 그래서 이 시간은 고정될 수 없다.h]hX-#1 - #5가 Initial문의 뒷부분에 추가되었다. 또한, 다중 if-else문은 Always문의 앞부분에 추가되었고, #11이 Always문의 뒷부분에 추가되었다. #2 - #10이 무엇을 처리하는지는 쉽다. Always문이 시작될 때 Moving World의 좌표에 해당되는 변수를 바꾸고 있다. 하지만 문제가 있다. Moving World는 얼마나 빠를까? Moving World의 변위는 루트2 임은 확실하다. (피타고라스 정리를 이용하면) 하지만 얼마나 자주 Moving World의 변위가 바뀌는가? 이것은 Always문의 시간 복잡도를 분석하지 않는 이상 알아낼 수 없다. (이것은 Always문이 시작하는 빈도에 따라 달라지므로) 그리고 시간 복잡도는 컴퓨터마다 다르다. 그래서 이 시간은 고정될 수 없다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KYhhyh)hubh)}(hX우리는 이 프로젝트에 고정 속도라는 개념을 추가해야 한다. 어떻게? #1과 #11을 보면, Initial statement에 pygame.time.Clock()함수가, Always문에 tick(60)함수가 있음을 확인할 수 있다. 60이라는 수는 여기서 FPS(Frame Per Second)를 의미한다. FPS가 1초에 화면이 얼마나 자주 바뀌는지를 의미한다. 화면을 바꾸는(업데이트하는) 파이게임의 함수는 무엇인가? 바로 Pygame.display.update() 함수이다. 그러므로, FPS는 1초에 Always문이 실행되는 횟수를 의미하게 된다. 이는 Always문 속에는 단 하나의 Pygame.display.update() 함수가 존재하기 때문이다. FPS는 일종의 선택적인 딜레이 함수와 같은 기능(프로그램 처리 속도에 따라)을 한다, 선택적인 가속 함수가 아니므로, FPS값이 너무 크면 FPS대로 작동하지 않을 수 있다. 우리가 프로젝트 내에서 시간(FPS)을 고정시켜 두면, 특정 게임 오브젝트의 적절한 변위만 찾아내면 그 오브젝트의 속도를 정할 수 있다. pygame.time.Clock()은 게임이 시작되기 이전 속도를 고정시키는 기능을 한다. tick함수는 Pygame.display.update()보다 나중에 와야 한다. 왜냐하면 tick함수는 화면이 몇 번 업데이트되었는지를 계산하기 때문이다. Pygame.display.update() 함수보다 나중에 실행되야 하는 몇 안되는 함수 중 하나이다.h]hX우리는 이 프로젝트에 고정 속도라는 개념을 추가해야 한다. 어떻게? #1과 #11을 보면, Initial statement에 pygame.time.Clock()함수가, Always문에 tick(60)함수가 있음을 확인할 수 있다. 60이라는 수는 여기서 FPS(Frame Per Second)를 의미한다. FPS가 1초에 화면이 얼마나 자주 바뀌는지를 의미한다. 화면을 바꾸는(업데이트하는) 파이게임의 함수는 무엇인가? 바로 Pygame.display.update() 함수이다. 그러므로, FPS는 1초에 Always문이 실행되는 횟수를 의미하게 된다. 이는 Always문 속에는 단 하나의 Pygame.display.update() 함수가 존재하기 때문이다. FPS는 일종의 선택적인 딜레이 함수와 같은 기능(프로그램 처리 속도에 따라)을 한다, 선택적인 가속 함수가 아니므로, FPS값이 너무 크면 FPS대로 작동하지 않을 수 있다. 우리가 프로젝트 내에서 시간(FPS)을 고정시켜 두면, 특정 게임 오브젝트의 적절한 변위만 찾아내면 그 오브젝트의 속도를 정할 수 있다. pygame.time.Clock()은 게임이 시작되기 이전 속도를 고정시키는 기능을 한다. tick함수는 Pygame.display.update()보다 나중에 와야 한다. 왜냐하면 tick함수는 화면이 몇 번 업데이트되었는지를 계산하기 때문이다. Pygame.display.update() 함수보다 나중에 실행되야 하는 몇 안되는 함수 중 하나이다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K[hhyh)hubh)}(hX화면이 업데이트 될 때, 시간을 고정하는 방법을 알았다. 정지된 화면보다는 정신없이 움직이는 화면이 게임에선 많으므로, 이를 반드시 알고 있어야 한다. 그러나, 이 프로젝트는 결과가 너무 쉽게 예측되기 때문에 게임이 아닌 것처럼 보인다는 단점은 아직도 있다. (결과를 바꿀 입력이 없으므로) 이젠, 입력 로직이 추가 되어야만 한다.h]hX화면이 업데이트 될 때, 시간을 고정하는 방법을 알았다. 정지된 화면보다는 정신없이 움직이는 화면이 게임에선 많으므로, 이를 반드시 알고 있어야 한다. 그러나, 이 프로젝트는 결과가 너무 쉽게 예측되기 때문에 게임이 아닌 것처럼 보인다는 단점은 아직도 있다. (결과를 바꿀 입력이 없으므로) 이젠, 입력 로직이 추가 되어야만 한다.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K]hhyh)hubh)}(h<참고 코드> ::h]h<참고 코드>}hj*sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K`hhyh)hubh)}(hXnimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11h]hXnimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11}hj8sbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,Kbhhyh)hubeh}(h]id2ah ]h"]%-화면이 움직이기 위한 조건ah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjxerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsjKjHu nametypes}(h2h]hvjKuh}(h/h hZh5hsh`jHhyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/4.텍스트 조종/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/4.??? ??/0000755000175100001770000000000014676242436022433 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022400000000000010213 xustar00120 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력.doctree 28 mtime=1727612177.4371405 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/4.??? ??/?? ??.doctree0000644000175100001770000004122614676242421024514 0ustar00runnerdockerBsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceo/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(h 기초 입력h]h 기초 입력}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubah}(h]id1ah ]h"] 기초 입력ah$]h&]uh(h hhh)hh*h+h,K ubh )}(hhh](h)}(h(-새로운 입력은 새로운 이벤트h]h(-새로운 입력은 새로운 이벤트}hh|sbah}(h]h ]h"]h$]h&]uh(hhhyh)hh*h+h,Kubh paragraph)}(hX생각해보면, 우리는 무언가를 출력하는 방법을 먼저 배우고(“Hello World”를 생각해봐라) 무언가를 입력하는 방법은 나중에 배운다. 왜 그런가? 왜냐면 입력은 몇몇 프로그램에선 필수조건이 아니지만, 출력은 모든 프로그램에선 항상 필수조건이기 때문이다. (프로그램의 정의: 0개 이상의 입력, 1개 이상의 출력) 그러나, 모든 게임은 입력이 필요하다. 그것이 우리는 “나는 게임을 Play한다”라고 말하는 이유이다. Play라는 단어는 몸의 일부분(아마도 손가락)을 움직인다는 뜻이다. 어쨌든, 이 프로젝트가 진짜 게임이 되기 위해 입력 로직을 추가해보자.h]hX생각해보면, 우리는 무언가를 출력하는 방법을 먼저 배우고(“Hello World”를 생각해봐라) 무언가를 입력하는 방법은 나중에 배운다. 왜 그런가? 왜냐면 입력은 몇몇 프로그램에선 필수조건이 아니지만, 출력은 모든 프로그램에선 항상 필수조건이기 때문이다. (프로그램의 정의: 0개 이상의 입력, 1개 이상의 출력) 그러나, 모든 게임은 입력이 필요하다. 그것이 우리는 “나는 게임을 Play한다”라고 말하는 이유이다. Play라는 단어는 몸의 일부분(아마도 손가락)을 움직인다는 뜻이다. 어쨌든, 이 프로젝트가 진짜 게임이 되기 위해 입력 로직을 추가해보자.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhyh)hubh image)}(h?.. image:: Bagic-INPUT-sourcecode.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriNtut/ko/빨간블록 검은블록/4.텍스트 조종/Bagic-INPUT-sourcecode.png candidates}*hs original_uriBagic-INPUT-sourcecode.pnguh(hh*h+h,Khhyh)hubh literal_block)}(hXXimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khhyh)hubh)}(hA.. image:: Bagic-INPUT-resultscreen.png :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriPtut/ko/빨간블록 검은블록/4.텍스트 조종/Bagic-INPUT-resultscreen.pngh}hhshBagic-INPUT-resultscreen.pnguh(hh*h+h,K3hhyh)hubh)}(hXZimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXZimport sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K6hhyh)hubh)}(hJ(Controlling World 프로젝트의 소스 코드 일부 와 실행 결과)h]hJ(Controlling World 프로젝트의 소스 코드 일부 와 실행 결과)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KShhyh)hubh)}(hY(Controlling World가 키보드 방향키를 누르면 해당 방향으로 움직인다.)h]hY(Controlling World가 키보드 방향키를 누르면 해당 방향으로 움직인다.)}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KUhhyh)hubh)}(hXI이전 프로젝트와 비교하여 2개의 큰 차이점이 생겼다. 첫째는 #5에 KEYDOWN 이벤트가 트리거 되었는지 아닌지를 판단하는 것이다. 다른 줄들은 이전의 알고리즘의 약간 다르게 동작하도록 바꾼 것에 불과하다. 똑같은 명령어가 Event문 앞에 있느냐 뒤에 있느냐 결과는 완전히 달라질 수 있음을 우리는 알고 있다. 좌표를 업데이트하는 경우, Event문이 종료되고 이루어짐에 주목해라. (세팅 된 후 업데이트된다. 그것이 두번째 차이점이다.) 객체 event.key는 키보드에 마지막으로 눌린 키를 의미한다. 구체적인 키의 이름을 보아라. K_UP, K_LEFT, K_DOWN, K_RIGHT. 매우 직관적인 K_시리즈이다. (Header의 pygame.locals로부터 이용할 수 있다.) 다른 키의 이름으로는 K_8, K_a, K_L, K_LCTRL, K_DELETE, L_F4등이 있다. 이런 키들도 추가적인 도움 없이 직관적으로 이해할 수 있다. 모든 키 이름 목록은 https://www.pygame.org/docs/ref/key.html#pygame.key.name 에서 확인할 수 있다.h](hX이전 프로젝트와 비교하여 2개의 큰 차이점이 생겼다. 첫째는 #5에 KEYDOWN 이벤트가 트리거 되었는지 아닌지를 판단하는 것이다. 다른 줄들은 이전의 알고리즘의 약간 다르게 동작하도록 바꾼 것에 불과하다. 똑같은 명령어가 Event문 앞에 있느냐 뒤에 있느냐 결과는 완전히 달라질 수 있음을 우리는 알고 있다. 좌표를 업데이트하는 경우, Event문이 종료되고 이루어짐에 주목해라. (세팅 된 후 업데이트된다. 그것이 두번째 차이점이다.) 객체 event.key는 키보드에 마지막으로 눌린 키를 의미한다. 구체적인 키의 이름을 보아라. K_UP, K_LEFT, K_DOWN, K_RIGHT. 매우 직관적인 K_시리즈이다. (Header의 pygame.locals로부터 이용할 수 있다.) 다른 키의 이름으로는 K_8, K_a, K_L, K_LCTRL, K_DELETE, L_F4등이 있다. 이런 키들도 추가적인 도움 없이 직관적으로 이해할 수 있다. 모든 키 이름 목록은 }hjsbhA)}(h8https://www.pygame.org/docs/ref/key.html#pygame.key.nameh]h8https://www.pygame.org/docs/ref/key.html#pygame.key.name}hjsbah}(h]h ]h"]h$]h&]refurij uh(h@hjubh 에서 확인할 수 있다.}hjsbeh}(h]h ]h"]h$]h&]uh(hh*h+h,KWhhyh)hubh)}(hXKEYDOWN은 “이 키는 이전에는 눌리지 않았지만, 지금은 눌렸다.”를 의미하고, “이전부터 지금까지 계속 눌린 채로 있다.”를 의미하지는 않는다. 눌려있는 경우를 다루기 위해서는, KEYUP이라는 이벤트를 추가적으로 확인해야 한다. (변수와 알고리즘이 더 추가된다) 이는 심화 부분에서 다루겠다.h]hXKEYDOWN은 “이 키는 이전에는 눌리지 않았지만, 지금은 눌렸다.”를 의미하고, “이전부터 지금까지 계속 눌린 채로 있다.”를 의미하지는 않는다. 눌려있는 경우를 다루기 위해서는, KEYUP이라는 이벤트를 추가적으로 확인해야 한다. (변수와 알고리즘이 더 추가된다) 이는 심화 부분에서 다루겠다.}hj!sbah}(h]h ]h"]h$]h&]uh(hh*h+h,KYhhyh)hubh)}(hXn입력을 추가하는 것은 단순히 이벤트 인자를 추가하는 것이기 때문에 쉽다. 이제 게임 프로젝트는 완성되었다. 왜냐하면 프로젝트가 출력, 처리, 입력을 가지고 있기 때문이다. 맞는가? 아니다. 이 프로젝트는 게임 오브젝트간 상호작용이 전혀 없고, 플레이 규칙(제약조건(HP, 시간 등)도 없고 점수도 없다)이 없고, 즐길 것(동기부여 요소, 입력 출력의 다양성, 컨텐츠)이 없기 때문에 게임이라고 불릴 수 없다. 우선, 게임의 인터페이스/시스템을 풍성하게 하기 위해 우리는 심화된 입력(마우스 상태 반영), 처리(적절한 함수화), 출력(이미지, 소리 및 내부 데이터 시각화 방법)을 알아야 한다. 물론, 기초 단계에서의 경험이 반드시 도움이 된다. 심화 단계로 가보자!h]hXn입력을 추가하는 것은 단순히 이벤트 인자를 추가하는 것이기 때문에 쉽다. 이제 게임 프로젝트는 완성되었다. 왜냐하면 프로젝트가 출력, 처리, 입력을 가지고 있기 때문이다. 맞는가? 아니다. 이 프로젝트는 게임 오브젝트간 상호작용이 전혀 없고, 플레이 규칙(제약조건(HP, 시간 등)도 없고 점수도 없다)이 없고, 즐길 것(동기부여 요소, 입력 출력의 다양성, 컨텐츠)이 없기 때문에 게임이라고 불릴 수 없다. 우선, 게임의 인터페이스/시스템을 풍성하게 하기 위해 우리는 심화된 입력(마우스 상태 반영), 처리(적절한 함수화), 출력(이미지, 소리 및 내부 데이터 시각화 방법)을 알아야 한다. 물론, 기초 단계에서의 경험이 반드시 도움이 된다. 심화 단계로 가보자!}hj/sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K[hhyh)hubh)}(h<참고 코드> ::h]h<참고 코드>}hj=sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K^hhyh)hubh)}(hXyimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update()h]hXyimport pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update()}hjKsbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,K`hhyh)hubeh}(h]id2ah ]h"](-새로운 입력은 새로운 이벤트ah$]h&]uh(h hhh)hh*h+h,Kubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhvhsj^j[u nametypes}(h2h]hvj^uh}(h/h hZh5hsh`j[hyu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000016300000000000010215 xustar0087 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/5.HP바/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/5.HP?/0000755000175100001770000000000014676242436022230 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024100000000000010212 xustar00133 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리.doctree 28 mtime=1727612177.4451404 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/5.HP?/?? ?? ??? ?? ??.doctree0000644000175100001770000005142414676242421025343 0ustar00runnerdocker Ssphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource|/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h#그리고 심화 처리 - 함수화h]h#그리고 심화 처리 - 함수화}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(h우선, 텍스트가 아닌, 도형을 시각화 하겠다. HP 바는 어떤가? 만약 HP의 최대값이 고정되어 있고 오직 현재 HP 값만이 변한다면, 이 두 데이터를 출력하는 가장 쉬운 방법은 무엇인가?h]h우선, 텍스트가 아닌, 도형을 시각화 하겠다. HP 바는 어떤가? 만약 HP의 최대값이 고정되어 있고 오직 현재 HP 값만이 변한다면, 이 두 데이터를 출력하는 가장 쉬운 방법은 무엇인가?}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h?.. image:: AdvancedOutputProcess1.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess1.gif candidates}*hs original_uriAdvancedOutputProcess1.gifuh(hh*h+h,Khh`h)hubh literal_block)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khh`h)hubh)}(h?.. image:: AdvancedOutputProcess2.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess2.gifh}hhshAdvancedOutputProcess2.gifuh(hh*h+h,K.hh`h)hubh)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K1hh`h)hubh)}(h?.. image:: AdvancedOutputProcess3.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess3.gifh}hhshAdvancedOutputProcess3.gifuh(hh*h+h,KMhh`h)hubh)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,KPhh`h)hubhr)}(hXI변수의 값이 변할 때마다 텍스트를 다시 렌더링 하기만 하면 된다. 변수의 값은 어떻게 바꾸는가? 그것은 Event문에서 이루어진다. (키보드 위 또는 아래를 눌러 HP를 조절하게 하였다.) 이전과 동일한 방법이다. 하지만, 이것들은 여전히 텍스트이다. 아직 충분히 시각화 되지 않는다. 이 데이터들을 어떻게 더 상세하게 시각화 할까? 총 탄창에서 아이디어를 따올 수 있다. HP는 정수 값이고, 불연속적 값을 가지므로, 아래와 같이 출력될 수 있다.h]hXI변수의 값이 변할 때마다 텍스트를 다시 렌더링 하기만 하면 된다. 변수의 값은 어떻게 바꾸는가? 그것은 Event문에서 이루어진다. (키보드 위 또는 아래를 눌러 HP를 조절하게 하였다.) 이전과 동일한 방법이다. 하지만, 이것들은 여전히 텍스트이다. 아직 충분히 시각화 되지 않는다. 이 데이터들을 어떻게 더 상세하게 시각화 할까? 총 탄창에서 아이디어를 따올 수 있다. HP는 정수 값이고, 불연속적 값을 가지므로, 아래와 같이 출력될 수 있다.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Klhh`h)hubh)}(h?.. image:: AdvancedOutputProcess4.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess4.gifh}hjshAdvancedOutputProcess4.gifuh(hh*h+h,Knhh`h)hubh)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hjsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,Kqhh`h)hubh)}(h?.. image:: AdvancedOutputProcess5.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess5.gifh}hj#shAdvancedOutputProcess5.gifuh(hh*h+h,Khh`h)hubh)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hj&sbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,Khh`h)hubh)}(h?.. image:: AdvancedOutputProcess6.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriCtut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess6.gifh}hjBshAdvancedOutputProcess6.gifuh(hh*h+h,Khh`h)hubh)}(hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess6.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXXimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess6.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hjEsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,Khh`h)hubhr)}(hX3훨씬 나아졌다. 그리는 로직은 #6을 확인하면 된다. 로직은 단순하다. 먼저, 큰 검은 색 직사각형을 그린다. 그 다음, 현재 HP을 따져서 작은 빨간 색 직사각형들을 0개 또는 최대 개수만큼 그린다. 마지막으로, 작은 직사각형들에 하얀 테두리를 그린다. pygame.draw.rect 함수에선 위치 변수로 4개의 매개 변수가 사용된 것을 확인할 수 있는데 (첫번째 변수는 캔버스 변수이고, 두번째 변수는 색상 변수, 네번째 변수는 두께 변수이다.) 이 4개의 매개 변수의 용도가 무엇인지는 직접 설명하는 것보다, 직접 값을 변경하면서 확인하는 것이 가장 쉽게 이해할 수 있다. 3개의 값이 20일 때 하나의 값 만을 10또는 30으로 바꿔 보아라!h]hX3훨씬 나아졌다. 그리는 로직은 #6을 확인하면 된다. 로직은 단순하다. 먼저, 큰 검은 색 직사각형을 그린다. 그 다음, 현재 HP을 따져서 작은 빨간 색 직사각형들을 0개 또는 최대 개수만큼 그린다. 마지막으로, 작은 직사각형들에 하얀 테두리를 그린다. pygame.draw.rect 함수에선 위치 변수로 4개의 매개 변수가 사용된 것을 확인할 수 있는데 (첫번째 변수는 캔버스 변수이고, 두번째 변수는 색상 변수, 네번째 변수는 두께 변수이다.) 이 4개의 매개 변수의 용도가 무엇인지는 직접 설명하는 것보다, 직접 값을 변경하면서 확인하는 것이 가장 쉽게 이해할 수 있다. 3개의 값이 20일 때 하나의 값 만을 10또는 30으로 바꿔 보아라!}hjUsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(hX그리고, 이제는 본격적으로 함수화를 해야 한다. Always문과 Event문을 main함수에 담았는데, 이 경우 main함수를 프로그램이 찾을 수 있도록 #7에서 추가적인 처리를 해야 한다. 그 다음 drawHP라는 새로운 함수를 만들었다. 게임에서의 함수화 아이디어는 GUI 프로그램을 만들 때의 함수화 아이디어와 크게 다르지 않다. 예를 들면, 하나의 변수를 출력하는 하나의 출력 함수를 각각 만들어 두는 것이 좋을 것이다. 물론, 각각의 변수가 출력 될 좌표를 정하는 것은 화면 전체를 디자인할 때 선행되어야 할 것이다.h]hX그리고, 이제는 본격적으로 함수화를 해야 한다. Always문과 Event문을 main함수에 담았는데, 이 경우 main함수를 프로그램이 찾을 수 있도록 #7에서 추가적인 처리를 해야 한다. 그 다음 drawHP라는 새로운 함수를 만들었다. 게임에서의 함수화 아이디어는 GUI 프로그램을 만들 때의 함수화 아이디어와 크게 다르지 않다. 예를 들면, 하나의 변수를 출력하는 하나의 출력 함수를 각각 만들어 두는 것이 좋을 것이다. 물론, 각각의 변수가 출력 될 좌표를 정하는 것은 화면 전체를 디자인할 때 선행되어야 할 것이다.}hjcsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(h<참고 코드> ::h]h<참고 코드>}hjqsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(hXEimport pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main()h]hXEimport pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main()}hjsbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,Khh`h)hubeh}(h]id1ah ]h"]#그리고 심화 처리 - 함수화ah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZjju nametypes}(h2h]juh}(h/h hZh5jh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000016700000000000010221 xustar0091 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/6.버튼들/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/6.???/0000755000175100001770000000000014676242436022177 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024500000000000010216 xustar00137 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력.doctree 28 mtime=1727612177.4531405 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/6.???/?? ?? ??? ?? ??.doctree0000644000175100001770000005040314676242421025306 0ustar00runnerdockerPsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h"그리고 심화 출력 – 버튼h]h"그리고 심화 출력 – 버튼}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXKEYDOWN이 사용되었지만, 아직도 이 게임이 완전한 GUI가 아닌 것처럼 보이는 이유는 GUI가 입력은 없고 오직 출력(프린트)하는 데에만 사용되었기 때문이다. GUI에서의 입력이란 특정한 위치에서의 마우스 이벤트를 처리하는 것이다. HP를 증가시키거나 감소시키는 버튼 2개를 만드는 것은 어떨까?h]hXKEYDOWN이 사용되었지만, 아직도 이 게임이 완전한 GUI가 아닌 것처럼 보이는 이유는 GUI가 입력은 없고 오직 출력(프린트)하는 데에만 사용되었기 때문이다. GUI에서의 입력이란 특정한 위치에서의 마우스 이벤트를 처리하는 것이다. HP를 증가시키거나 감소시키는 버튼 2개를 만드는 것은 어떨까?}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h=.. image:: AdvancedInputOutput1.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput1.gif candidates}*hs original_uriAdvancedInputOutput1.gifuh(hh*h+h,Khh`h)hubh literal_block)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khh`h)hubh)}(h=.. image:: AdvancedInputOutput2.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput2.gifh}hhshAdvancedInputOutput2.gifuh(hh*h+h,K.hh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K1hh`h)hubhr)}(hX버튼 2개를 만드는 것은 쉽다. 버튼을 보면, 뭔가 특이한 효과가 적용되어 있음을 알 수 있다. 어떻게 한 것인가? 이전의 아이디어처럼 단순하다. 첫째, 큰 정사각형을 그린다. 둘째, 내용은 없고 두께만 있는 작은 정사각형을 그린다. 하지만 이 버튼들은 아직 출력용이다. 이 버튼들을 위한 클릭 가능 공간을 만들어야 한다.h]hX버튼 2개를 만드는 것은 쉽다. 버튼을 보면, 뭔가 특이한 효과가 적용되어 있음을 알 수 있다. 어떻게 한 것인가? 이전의 아이디어처럼 단순하다. 첫째, 큰 정사각형을 그린다. 둘째, 내용은 없고 두께만 있는 작은 정사각형을 그린다. 하지만 이 버튼들은 아직 출력용이다. 이 버튼들을 위한 클릭 가능 공간을 만들어야 한다.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,KMhh`h)hubh)}(h=.. image:: AdvancedInputOutput3.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput3.gifh}hhshAdvancedInputOutput3.gifuh(hh*h+h,KOhh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,KRhh`h)hubh)}(h=.. image:: AdvancedInputOutput4.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput4.gifh}hjshAdvancedInputOutput4.gifuh(hh*h+h,Knhh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hjsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,Kqhh`h)hubh)}(h=.. image:: AdvancedInputOutput5.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput5.gifh}hj#shAdvancedInputOutput5.gifuh(hh*h+h,Khh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hj&sbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,Khh`h)hubhr)}(hX이제 Event문에 MOUSEBUTTONUP이 추가되었다. 마우스가 UP 된 것은 키보드가 DOWN된 것과 동일한 의미를 가진다. 만약 MOUSEBUTTONUP이 활성화되면, event.pos는 x값과 y값을 기록해야 하는데, 이 것은 클릭 지점을 나타낸다. 그러므로, 클릭이 특정 정사각형 내부에서 일어났는지 아닌 지는 collidepoint를 확인하면 된다. 만약 내부였다면, “사용자가 특정 영역 내부를 클릭했다”를 의미하게 된다. 그 다음, 변수를 업데이트하는 적절한 처리만이 필요하게 된다. 입력을 위한 두 변수가 존재하고, (Event문에 있음) (270, 425, 45, 45)와 (325, 425, 45, 45). 출력을 위한 두 변수도 존재함을 확인하라. (drawButtons에 있음) (margin, height - r -10 , r, r)과 (margin + r + r_margin, height - r - 10, r, r). 버튼의 경우, 입력 영역과 출력 영역이 동일해야 한다. 그렇지 않다면, 버튼의 판정 범위는 오해의 소지가 될 수 있다! 변수(출력 용)들을 구체적인 계산을 통해 상수(입력 용) 값을 알아내기 싫다면, 이 변수들을 동일한 변수로 두는 것이 좋은 생각일 것이다. 두 영역을 하나로 묶을 수 있는 함수는 없으므로, 이 점은 항상 신경 써야 한다.h]hX이제 Event문에 MOUSEBUTTONUP이 추가되었다. 마우스가 UP 된 것은 키보드가 DOWN된 것과 동일한 의미를 가진다. 만약 MOUSEBUTTONUP이 활성화되면, event.pos는 x값과 y값을 기록해야 하는데, 이 것은 클릭 지점을 나타낸다. 그러므로, 클릭이 특정 정사각형 내부에서 일어났는지 아닌 지는 collidepoint를 확인하면 된다. 만약 내부였다면, “사용자가 특정 영역 내부를 클릭했다”를 의미하게 된다. 그 다음, 변수를 업데이트하는 적절한 처리만이 필요하게 된다. 입력을 위한 두 변수가 존재하고, (Event문에 있음) (270, 425, 45, 45)와 (325, 425, 45, 45). 출력을 위한 두 변수도 존재함을 확인하라. (drawButtons에 있음) (margin, height - r -10 , r, r)과 (margin + r + r_margin, height - r - 10, r, r). 버튼의 경우, 입력 영역과 출력 영역이 동일해야 한다. 그렇지 않다면, 버튼의 판정 범위는 오해의 소지가 될 수 있다! 변수(출력 용)들을 구체적인 계산을 통해 상수(입력 용) 값을 알아내기 싫다면, 이 변수들을 동일한 변수로 두는 것이 좋은 생각일 것이다. 두 영역을 하나로 묶을 수 있는 함수는 없으므로, 이 점은 항상 신경 써야 한다.}hj6sbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(h<참고 코드> ::h]h<참고 코드>}hjDsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubh)}(hXI import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main()h]hXI import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main()}hjRsbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,Khh`h)hubeh}(h]id1ah ]h"]"그리고 심화 출력 – 버튼ah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZjejbu nametypes}(h2h]jeuh}(h/h hZh5jbh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000016700000000000010221 xustar0091 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/7.게임판/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/7.???/0000755000175100001770000000000014676242436022200 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024200000000000010213 xustar00134 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/7.게임판/심화 출력 그리고 조금 더.doctree 28 mtime=1727612177.4591405 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/7.???/?? ?? ??? ?? ?.doctree0000644000175100001770000005020014676242421025203 0ustar00runnerdockeruPsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource}/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/7.게임판/심화 출력 그리고 조금 더.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h그리고 조금 더!h]h그리고 조금 더!}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hX1사실, 모든 것들이 게임 같아 보이진 않는다. 이제, 이 프로그램에 규칙을 추가하려 한다. 그러면, 이 프로그램은 게임이 된다. 규칙은 간단하다: 5x5 2차원 배열에서 빨간 블록, 검은 블록의 수를 세고, 더 많은 색상의 블록을 고르는 것이다! 정답이라면 HP는 증가하고 오답이라면, HP는 감소한다. 그 다음, 다음 문제를 위한 새로운 2차원 배열이 그려진다! 대단히 단순하지만 이 튜토리얼 내에서 만들어 질 수 있는 게임이다. 우선, 2차원 배열을 만들고 출력해야 한다. 어떻게? 우리는 정수 데이터(0차원 배열과 같음)나 두 버튼(1차원 배열과 같음)을 출력하는 법을 알 고 있다. 2차원 배열은 요소 하나만 더 추가되면 된다.h]hX1사실, 모든 것들이 게임 같아 보이진 않는다. 이제, 이 프로그램에 규칙을 추가하려 한다. 그러면, 이 프로그램은 게임이 된다. 규칙은 간단하다: 5x5 2차원 배열에서 빨간 블록, 검은 블록의 수를 세고, 더 많은 색상의 블록을 고르는 것이다! 정답이라면 HP는 증가하고 오답이라면, HP는 감소한다. 그 다음, 다음 문제를 위한 새로운 2차원 배열이 그려진다! 대단히 단순하지만 이 튜토리얼 내에서 만들어 질 수 있는 게임이다. 우선, 2차원 배열을 만들고 출력해야 한다. 어떻게? 우리는 정수 데이터(0차원 배열과 같음)나 두 버튼(1차원 배열과 같음)을 출력하는 법을 알 고 있다. 2차원 배열은 요소 하나만 더 추가되면 된다.}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubh image)}(h=.. image:: AdvancedOutputAlpha1.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/7.게임판/AdvancedOutputAlpha1.gif candidates}*hs original_uriAdvancedOutputAlpha1.gifuh(hh*h+h,Khh`h)hubh literal_block)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagepythonhighlight_args}uh(hh*h+h,Khh`h)hubh)}(h=.. image:: AdvancedOutputAlpha2.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/7.게임판/AdvancedOutputAlpha2.gifh}hhshAdvancedOutputAlpha2.gifuh(hh*h+h,K.hh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,K1hh`h)hubh)}(h=.. image:: AdvancedOutputAlpha3.gif :class: inlined-right h]h}(h]h ] inlined-rightah"]h$]h&]uriEtut/ko/빨간블록 검은블록/7.게임판/AdvancedOutputAlpha3.gifh}hhshAdvancedOutputAlpha3.gifuh(hh*h+h,KMhh`h)hubh)}(hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()h]hXVimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip()}hhsbah}(h]h ]h"]h$]h&]hhhhpythonh}uh(hh*h+h,KPhh`h)hubhr)}(hXhgenerateboard 함수는 무작위로 만들어진 2차원 배열과 빨간 블록, 검은 블록의 개수를 반환한다. 더 설명할 필요도 없다. 또한, printboard 함수는 1차원 배열처럼 2차원 배열을 출력한다. 출력 색상은 board[i][j]가 1인지 아닌 지에 따라 달라진다. 이 게임판은 단순히 출력 용이다. 테두리를 처리하려면 부분의 크기를 가지고 전체 크기를 계산해야 해서 짜증날 수 있다. 이것은 프롤로그에서 언급한 대로, 파이게임 갖는 특성 (실행 결과는 GUI이지만 코드 작성은 CUI) 때문이다.h]hXhgenerateboard 함수는 무작위로 만들어진 2차원 배열과 빨간 블록, 검은 블록의 개수를 반환한다. 더 설명할 필요도 없다. 또한, printboard 함수는 1차원 배열처럼 2차원 배열을 출력한다. 출력 색상은 board[i][j]가 1인지 아닌 지에 따라 달라진다. 이 게임판은 단순히 출력 용이다. 테두리를 처리하려면 부분의 크기를 가지고 전체 크기를 계산해야 해서 짜증날 수 있다. 이것은 프롤로그에서 언급한 대로, 파이게임 갖는 특성 (실행 결과는 GUI이지만 코드 작성은 CUI) 때문이다.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Klhh`h)hubhr)}(hX사실, 이 구현한 게임은 개선의 여지가 많다. 버튼을 이미지 파일로 바꾸면? 정답이거나 오답일 때 효과음을 넣으면? 시간 제한을 넣으면? 정답이거나 오답일 때 시각적 효과를 넣으면? 게임판을 더 크게 하고 색상을 더 다양히 넣는다면? 이 인터페이스를 가지고 Flood-it을 구현한다면? 구현한 게임이 단순하기 때문에 선택지는 많다.h]hX사실, 이 구현한 게임은 개선의 여지가 많다. 버튼을 이미지 파일로 바꾸면? 정답이거나 오답일 때 효과음을 넣으면? 시간 제한을 넣으면? 정답이거나 오답일 때 시각적 효과를 넣으면? 게임판을 더 크게 하고 색상을 더 다양히 넣는다면? 이 인터페이스를 가지고 Flood-it을 구현한다면? 구현한 게임이 단순하기 때문에 선택지는 많다.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Knhh`h)hubhr)}(h<참고 코드> ::h]h<참고 코드>}hjsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Kphh`h)hubh)}(hX:import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main()h]hX:import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main()}hjsbah}(h]h ]h"]h$]h&]hhuh(hh*h+h,Krhh`h)hubeh}(h]id1ah ]h"]그리고 조금 더!ah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjTerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZj'j$u nametypes}(h2h]j'uh}(h/h hZh5j$h`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jbKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000017200000000000010215 xustar0094 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/8.에필로그/ 28 mtime=1727612190.0161257 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/8.????/0000755000175100001770000000000014676242436022300 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021700000000000010215 xustar00115 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/8.에필로그/에필로그.doctree 28 mtime=1727612177.4621406 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/8.????/????.doctree0000644000175100001770000001614614676242421024324 0ustar00runnerdocker[sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessection)}(hhh]h title)}(hAuthor: Youngwook Kim (Korean)h]h TextAuthor: Youngwook Kim (Korean)}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourcej/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/8.에필로그/에필로그.rstlineKubah}(h]author-youngwook-kim-koreanah ]h"]author: youngwook kim (korean)ah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh]h)}(hContact: rumia0601@gmail.comh](h Contact: }hh8sbh reference)}(hrumia0601@gmail.comh]hrumia0601@gmail.com}hhBsbah}(h]h ]h"]h$]h&]refurimailto:rumia0601@gmail.comuh(h@hh8ubeh}(h]h ]h"]h$]h&]uh(hhh5h)hh*h+h,Kubah}(h]contact-rumia0601-gmail-comah ]h"]contact: rumia0601@gmail.comah$]h&]uh(h hhh)hh*h+h,Kubh )}(hhh](h)}(h 에필로그h]h 에필로그}hhcsbah}(h]h ]h"]h$]h&]uh(hhh`h)hh*h+h,K ubh paragraph)}(hXC그러나, 튜토리얼은 여기에서 끝이 난다. 이 튜토리얼은 파이게임의 극소수만을 다뤘다. 하지만 걱정하지 마라. 프로그램은 사람이 할 수 있는 가장 창의적인 활동이다. 임마누엘 칸트는 “천재성이란 어떤 대상에 규칙을 부여할 수 있는 능력이다”라고 말했다. 프로그래밍은 규칙을 만들어서 컴퓨터에게 입력시키는 것이다. 규칙이 만들어진다면, 컴퓨터는 규칙 내에서 무엇이든지 할 수 있다. 그러므로, 경우의 수가 매우 커지게 된다.h]hXC그러나, 튜토리얼은 여기에서 끝이 난다. 이 튜토리얼은 파이게임의 극소수만을 다뤘다. 하지만 걱정하지 마라. 프로그램은 사람이 할 수 있는 가장 창의적인 활동이다. 임마누엘 칸트는 “천재성이란 어떤 대상에 규칙을 부여할 수 있는 능력이다”라고 말했다. 프로그래밍은 규칙을 만들어서 컴퓨터에게 입력시키는 것이다. 규칙이 만들어진다면, 컴퓨터는 규칙 내에서 무엇이든지 할 수 있다. 그러므로, 경우의 수가 매우 커지게 된다.}hhssbah}(h]h ]h"]h$]h&]uh(hqh*h+h,K hh`h)hubhr)}(hXn결론이 무엇인가? 출력이 입력보다 크다는 것이다. 우리는 우리의 지식만으로 지식보다 더 폭넓은 프로그램을 구현할 수 있다. 또는 우리는 새로운 지식을 기존의 지식에 연결시키면서 습득할 수도 있다. 그것이 프로그래밍의 특성이다. 게임도 마찬가지이다. “난수”라는 개념은 모든 게임(이미 구현한 게임도 포함!)에서 대단히 중요한 개념이다. 난수까지 고려되었을 때 경우의 수는 매우 커지게 된다. 만약 하나의 난수가 다른 난수까지 영향을 미치게 된다면, “눈사태”와 같은 효과가 나게 된다. 그것이 게임이 흥미로운 이유이다. “난수”라는 개념은 소설, 음악, 영화 등은 가질 수 없는 게임만의 특성이다. 테트리스를 생각해 보아라. 알렉세이 파지트노프가 테트리스를 위해 얼만큼의 시간을 투자했을까? 이 시간이 35년 넘게 전세계 사람들이 플레이 한 시간보다 클까? 이것이 바로 프로그래밍과 게임이 갖는 두 특성이 완벽히 발휘된 예시이다.h]hXn결론이 무엇인가? 출력이 입력보다 크다는 것이다. 우리는 우리의 지식만으로 지식보다 더 폭넓은 프로그램을 구현할 수 있다. 또는 우리는 새로운 지식을 기존의 지식에 연결시키면서 습득할 수도 있다. 그것이 프로그래밍의 특성이다. 게임도 마찬가지이다. “난수”라는 개념은 모든 게임(이미 구현한 게임도 포함!)에서 대단히 중요한 개념이다. 난수까지 고려되었을 때 경우의 수는 매우 커지게 된다. 만약 하나의 난수가 다른 난수까지 영향을 미치게 된다면, “눈사태”와 같은 효과가 나게 된다. 그것이 게임이 흥미로운 이유이다. “난수”라는 개념은 소설, 음악, 영화 등은 가질 수 없는 게임만의 특성이다. 테트리스를 생각해 보아라. 알렉세이 파지트노프가 테트리스를 위해 얼만큼의 시간을 투자했을까? 이 시간이 35년 넘게 전세계 사람들이 플레이 한 시간보다 클까? 이것이 바로 프로그래밍과 게임이 갖는 두 특성이 완벽히 발휘된 예시이다.}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubhr)}(h그러므로, 게임을 만드는 것은 눈사태를 일으키는 것과 같다. 이제 아무 게임이나 만들 시간이다! 배우고, 활용하고, 시행 착오를 겪어 보자!h]h그러므로, 게임을 만드는 것은 눈사태를 일으키는 것과 같다. 이제 아무 게임이나 만들 시간이다! 배우고, 활용하고, 시행 착오를 겪어 보자!}hhsbah}(h]h ]h"]h$]h&]uh(hqh*h+h,Khh`h)hubeh}(h]id1ah ]h"] 에필로그ah$]h&]uh(h hhh)hh*h+h,K ubeh}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerhόerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(h2h/h]hZhhu nametypes}(h2h]huh}(h/h hZh5hh`u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}hKsRparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000017100000000000010214 xustar0093 path=pygame-2.6.1/docs/generated/doctrees/tut/ko/빨간블록 검은블록/개요.doctree 28 mtime=1727612177.4691405 pygame-2.6.1/docs/generated/doctrees/tut/ko/???? ????/??.doctree0000644000175100001770000002157314676242421023305 0ustar00runnerdockerp#sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(h한국어 튜토리얼h]h Text한국어 튜토리얼}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsourceU/home/runner/work/pygame/pygame/docs/reST/tut/ko/빨간블록 검은블록/개요.rstlineKubh )}(hhh](h)}(h한국어 튜토리얼h]h한국어 튜토리얼}hh0sbah}(h]h ]h"]h$]h&]uh(hhh-h)hh*h+h,Kubh line_block)}(hhh]h h,)}(hhh]h}(h]h ]h"]h$]h&]uh(h,hh@h)hh*h+h,KindentKubah}(h]h ]h"]h$]h&]uh(h>hh-h)hh*h+h,Kubh definition_list)}(hhh](h definition_list_item)}(h9:doc:`1 부 <1.프롤로그/소개>` 프롤로그/소개 h](h term)}(h$:doc:`1 부 <1.프롤로그/소개>`h]h pending_xref)}(hhch]h inline)}(hhch]h1 부}hhlsbah}(h]h ](xrefstdstd-doceh"]h$]h&]uh(hjhhgubah}(h]h ]h"]h$]h&]refdoc'tut/ko/빨간블록 검은블록/개요 refdomainhwreftypedoc refexplicitrefwarn reftarget1.프롤로그/소개uh(heh*h+h,K hhaubah}(h]h ]h"]h$]h&]uh(h_h*h+h,K hh[ubh definition)}(hhh]h paragraph)}(h프롤로그/소개h]h프롤로그/소개}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K hhubah}(h]h ]h"]h$]h&]uh(hh*h+h,K hh[ubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,K hhVubhZ)}(hN:doc:`2 부 <2.텍스트 출력/기초 템플릿과 출력>` 텍스트 출력 h](h`)}(h<:doc:`2 부 <2.텍스트 출력/기초 템플릿과 출력>`h]hf)}(hhh]hk)}(hhh]h2 부}hhsbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhhubah}(h]h ]h"]h$]h&]refdoch refdomainhnjreftypedoc refexplicitrefwarnh-2.텍스트 출력/기초 템플릿과 출력uh(heh*h+h,K hhubah}(h]h ]h"]h$]h&]uh(h_h*h+h,K hhubh)}(hhh]h)}(h텍스트 출력h]h텍스트 출력}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K hhubah}(h]h ]h"]h$]h&]uh(hh*h+h,K hhubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,K hhVh)hubhZ)}(hA:doc:`3 부 <3.텍스트 이동/기초 처리>` 텍스트 이동 h](h`)}(h/:doc:`3 부 <3.텍스트 이동/기초 처리>`h]hf)}(hjh]hk)}(hjh]h3 부}hjsbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftypedoc refexplicitrefwarnh 3.텍스트 이동/기초 처리uh(heh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(h_h*h+h,Khhubh)}(hhh]h)}(h텍스트 이동h]h텍스트 이동}hj,sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khj)ubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubhZ)}(hA:doc:`4 부 <4.텍스트 조종/기초 입력>` 텍스트 조종 h](h`)}(h/:doc:`4 부 <4.텍스트 조종/기초 입력>`h]hf)}(hjLh]hk)}(hjLh]h4 부}hjQsbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhjNubah}(h]h ]h"]h$]h&]refdoch refdomainj[reftypedoc refexplicitrefwarnh 4.텍스트 조종/기초 입력uh(heh*h+h,KhjJubah}(h]h ]h"]h$]h&]uh(h_h*h+h,KhjFubh)}(hhh]h)}(h텍스트 조종h]h텍스트 조종}hjvsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjsubah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjFubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubhZ)}(hC:doc:`5 부 <5.HP바/심화 출력 그리고 심화 처리>` HP바 h](h`)}(h<:doc:`5 부 <5.HP바/심화 출력 그리고 심화 처리>`h]hf)}(hjh]hk)}(hjh]h5 부}hjsbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftypedoc refexplicitrefwarnh-5.HP바/심화 출력 그리고 심화 처리uh(heh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(h_h*h+h,Khjubh)}(hhh]h)}(hHP바h]hHP바}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubhZ)}(hK:doc:`6 부 <6.버튼들/심화 입력 그리고 심화 출력>` 버튼들 h](h`)}(h@:doc:`6 부 <6.버튼들/심화 입력 그리고 심화 출력>`h]hf)}(hjh]hk)}(hjh]h6 부}hjsbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftypedoc refexplicitrefwarnh16.버튼들/심화 입력 그리고 심화 출력uh(heh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(h_h*h+h,Khjubh)}(hhh]h)}(h 버튼들h]h 버튼들}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubhZ)}(hH:doc:`7 부 <7.게임판/심화 출력 그리고 조금 더>` 게임판 h](h`)}(h=:doc:`7 부 <7.게임판/심화 출력 그리고 조금 더>`h]hf)}(hj*h]hk)}(hj*h]h7 부}hj/sbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhj,ubah}(h]h ]h"]h$]h&]refdoch refdomainj9reftypedoc refexplicitrefwarnh.7.게임판/심화 출력 그리고 조금 더uh(heh*h+h,Khj(ubah}(h]h ]h"]h$]h&]uh(h_h*h+h,Khj$ubh)}(hhh]h)}(h 게임판h]h 게임판}hjTsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjQubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khj$ubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubhZ)}(h7:doc:`8 부 <8.에필로그/에필로그>` 에필로그h](h`)}(h*:doc:`8 부 <8.에필로그/에필로그>`h]hf)}(hjth]hk)}(hjth]h8 부}hjysbah}(h]h ](hvstdstd-doceh"]h$]h&]uh(hjhjvubah}(h]h ]h"]h$]h&]refdoch refdomainjreftypedoc refexplicitrefwarnh8.에필로그/에필로그uh(heh*h+h,Khjrubah}(h]h ]h"]h$]h&]uh(h_h*h+h,Khjnubh)}(hhh]h)}(h 에필로그h]h 에필로그}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjnubeh}(h]h ]h"]h$]h&]uh(hYh*h+h,KhhVh)hubeh}(h]h ]h"]h$]h&]uh(hTh*h+h,K hh-h)hubeh}(h]id2ah ]h"]h$]한국어 튜토리얼ah&]uh(h hh h)hh*h+h,K referencedubeh}(h]id1ah ]h"]h$]jah&]uh(h hhh)hh*h+h,Kjubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}한국어 튜토리얼Ns nametypes}j;sh}(jh jh-u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]h system_message)}(hhh]h)}(h9Duplicate implicit target name: "한국어 튜토리얼".h]h9Duplicate implicit target name: "한국어 튜토리얼".}hj_sbah}(h]h ]h"]h$]h&]uh(hhj\ubah}(h]h ]h"]h$]h&]jalevelKtypeINFOsourceh+lineKuh(jZhh-h)hh*h+h,Kubatransform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.6671405 pygame-2.6.1/docs/generated/doctrees/tut/newbieguide.doctree0000644000175100001770000022730514676242422023601 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h.TUTORIAL: David Clark's Newbie Guide To Pygameh]h Text.TUTORIAL: David Clark's Newbie Guide To Pygame}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource=/home/runner/work/pygame/pygame/docs/reST/tut/newbieguide.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/tut/common.txth)Kubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh9sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hNewbie Guide to Pygameh]hNewbie Guide to Pygame}hhOsbah}(h]h]h]h]h!]uh%hMhhJh&hh'h(h)KubhI)}(hhh](hN)}(hA Newbie Guide to pygameh]hA Newbie Guide to pygame}hh`sbah}(h]h]h]h]h!]uh%hMhh]h&hh'h(h)K ubh paragraph)}(h@or **Things I learned by trial and error so you don't have to,**h](hor }hhpsbh strong)}(h=**Things I learned by trial and error so you don't have to,**h]h9Things I learned by trial and error so you don't have to,}hhzsbah}(h]h]h]h]h!]uh%hxhhpubeh}(h]h]h]h]h!]uh%hnh'h(h)Khh]h&hubho)}(h8or **How I learned to stop worrying and love the blit.**h](hor }hhsbhy)}(h5**How I learned to stop worrying and love the blit.**h]h1How I learned to stop worrying and love the blit.}hhsbah}(h]h]h]h]h!]uh%hxhhubeh}(h]h]h]h]h!]uh%hnh'h(h)Khh]h&hubho)}(hXPygame_ is a python wrapper for SDL_, written by Pete Shinners. What this means is that, using pygame, you can write games or other multimedia applications in Python that will run unaltered on any of SDL's supported platforms (Windows, Linux, Mac, and others).h](h reference)}(hPygame_h]hPygame}(hhhPygameubah}(h]h]h]h]h!]namehrefurihttps://www.pygame.org/uh%hhhresolvedKubh is a python wrapper for }hhsbh)}(hSDL_h]hSDL}(hhhSDLubah}(h]h]h]h]h!]namehhhttp://libsdl.orguh%hhhhKubh, written by Pete Shinners. What this means is that, using pygame, you can write games or other multimedia applications in Python that will run unaltered on any of SDL's supported platforms (Windows, Linux, Mac, and others).}hhsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khh]h&hubho)}(hXPygame may be easy to learn, but the world of graphics programming can be pretty confusing to the newcomer. I wrote this to try to distill the practical knowledge I've gained over the past year or so of working with pygame, and its predecessor, PySDL. I've tried to rank these suggestions in order of importance, but how relevant any particular hint is will depend on your own background and the details of your project.h]hXPygame may be easy to learn, but the world of graphics programming can be pretty confusing to the newcomer. I wrote this to try to distill the practical knowledge I've gained over the past year or so of working with pygame, and its predecessor, PySDL. I've tried to rank these suggestions in order of importance, but how relevant any particular hint is will depend on your own background and the details of your project.}hhsbah}(h]h]h]h]h!]uh%hnh'h(h)Khh]h&hubhI)}(hhh](hN)}(h"Get comfortable working in Python.h]h"Get comfortable working in Python.}hhsbah}(h]h]h]h]h!]uh%hMhhh&hh'h(h)K!ubho)}(hXThe most important thing is to feel confident using python. Learning something as potentially complicated as graphics programming will be a real chore if you're also unfamiliar with the language you're using. Write a few sizable non-graphical programs in python -- parse some text files, write a guessing game or a journal-entry program or something. Get comfortable with string and list manipulation -- know how to split, slice and combine strings and lists. Know how ``import`` works -- try writing a program that is spread across several source files. Write your own functions, and practice manipulating numbers and characters; know how to convert between the two. Get to the point where the syntax for using lists and dictionaries is second-nature -- you don't want to have to run to the documentation every time you need to slice a list or sort a set of keys. Get comfortable using file paths -- this will come in handy later when you start loading assets and creating save files.h](hXThe most important thing is to feel confident using python. Learning something as potentially complicated as graphics programming will be a real chore if you're also unfamiliar with the language you're using. Write a few sizable non-graphical programs in python -- parse some text files, write a guessing game or a journal-entry program or something. Get comfortable with string and list manipulation -- know how to split, slice and combine strings and lists. Know how }hjsbh literal)}(h ``import``h]himport}hj sbah}(h]h]h]h]h!]uh%j hjubhX works -- try writing a program that is spread across several source files. Write your own functions, and practice manipulating numbers and characters; know how to convert between the two. Get to the point where the syntax for using lists and dictionaries is second-nature -- you don't want to have to run to the documentation every time you need to slice a list or sort a set of keys. Get comfortable using file paths -- this will come in handy later when you start loading assets and creating save files.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)K#hhh&hubho)}(hXResist the temptation to ask for direct help online when you run into trouble. Instead, fire up the interpreter and play with the problem for a few hours, or use print statements and debugging tools to find out what's going wrong in your code. Get into the habit of looking things up in the official `Python documentation`_, and Googling error messages to figure out what they mean.h](hX.Resist the temptation to ask for direct help online when you run into trouble. Instead, fire up the interpreter and play with the problem for a few hours, or use print statements and debugging tools to find out what's going wrong in your code. Get into the habit of looking things up in the official }hj#sbh)}(h`Python documentation`_h]hPython documentation}(hj+hPython documentationubah}(h]h]h]h]h!]namePython documentationhhttps://docs.python.org/3/uh%hhj#hKubh;, and Googling error messages to figure out what they mean.}hj#sbeh}(h]h]h]h]h!]uh%hnh'h(h)K1hhh&hubho)}(hX!This may sound incredibly dull, but the confidence you'll gain through your familiarity with python will work wonders when it comes time to write your game. The time you spend making python code second-nature will be nothing compared to the time you'll save when you're writing real code.h]hX!This may sound incredibly dull, but the confidence you'll gain through your familiarity with python will work wonders when it comes time to write your game. The time you spend making python code second-nature will be nothing compared to the time you'll save when you're writing real code.}hjGsbah}(h]h]h]h]h!]uh%hnh'h(h)K8hhh&hubeh}(h]!get-comfortable-working-in-pythonah]h]"get comfortable working in python.ah]h!]uh%hHhh]h&hh'h(h)K!ubhI)}(hhh](hN)}(h0Recognize which parts of pygame you really need.h]h0Recognize which parts of pygame you really need.}hj`sbah}(h]h]h]h]h!]uh%hMhj]h&hh'h(h)K?ubho)}(hXaLooking at the jumble of classes at the top of the pygame documentation index may be confusing. The important thing is to realize that you can do a great deal with only a tiny subset of functions. Many classes you'll probably never use -- in a year, I haven't touched the ``Channel``, ``Joystick``, ``cursors``, ``surfarray`` or ``version`` functions.h](hXLooking at the jumble of classes at the top of the pygame documentation index may be confusing. The important thing is to realize that you can do a great deal with only a tiny subset of functions. Many classes you'll probably never use -- in a year, I haven't touched the }hjnsbj )}(h ``Channel``h]hChannel}hjvsbah}(h]h]h]h]h!]uh%j hjnubh, }hjnsbj )}(h ``Joystick``h]hJoystick}hjsbah}(h]h]h]h]h!]uh%j hjnubh, }hjnsbj )}(h ``cursors``h]hcursors}hjsbah}(h]h]h]h]h!]uh%j hjnubh, }hjnsbj )}(h ``surfarray``h]h surfarray}hjsbah}(h]h]h]h]h!]uh%j hjnubh or }hjnsbj )}(h ``version``h]hversion}hjsbah}(h]h]h]h]h!]uh%j hjnubh functions.}hjnsbeh}(h]h]h]h]h!]uh%hnh'h(h)KAhj]h&hubeh}(h]/recognize-which-parts-of-pygame-you-really-needah]h]0recognize which parts of pygame you really need.ah]h!]uh%hHhh]h&hh'h(h)K?ubhI)}(hhh](hN)}(hKnow what a surface is.h]hKnow what a surface is.}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)KIubho)}(hXAThe most important part of pygame is the surface. Just think of a surface as a blank piece of paper. You can do a lot of things with a surface -- you can draw lines on it, fill parts of it with color, copy images to and from it, and set or read individual pixel colors on it. A surface can be any size (within reason) and you can have as many of them as you like (again, within reason). One surface is special -- the one you create with :func:`pygame.display.set_mode()`. This 'display surface' represents the screen; whatever you do to it will appear on the user's screen.h](hXThe most important part of pygame is the surface. Just think of a surface as a blank piece of paper. You can do a lot of things with a surface -- you can draw lines on it, fill parts of it with color, copy images to and from it, and set or read individual pixel colors on it. A surface can be any size (within reason) and you can have as many of them as you like (again, within reason). One surface is special -- the one you create with }hjsbh pending_xref)}(h!:func:`pygame.display.set_mode()`h]j )}(hjh]hpygame.display.set_mode()}hjsbah}(h]h](xrefpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdoctut/newbieguide refdomainjreftypefunc refexplicitrefwarn py:moduleNpy:classN reftargetpygame.display.set_modeuh%jh'h(h)KKhjubhh. This 'display surface' represents the screen; whatever you do to it will appear on the user's screen.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)KKhjh&hubho)}(hXSo how do you create surfaces? As mentioned above, you create the special 'display surface' with ``pygame.display.set_mode()``. You can create a surface that contains an image by using :func:`pygame.image.load()`, or you can make a surface that contains text with :func:`pygame.font.Font.render()`. You can even create a surface that contains nothing at all with :func:`pygame.Surface()`.h](hbSo how do you create surfaces? As mentioned above, you create the special 'display surface' with }hj(sbj )}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hj0sbah}(h]h]h]h]h!]uh%j hj(ubh<. You can create a surface that contains an image by using }hj(sbj)}(h:func:`pygame.image.load()`h]j )}(hjDh]hpygame.image.load()}hjFsbah}(h]h](jpypy-funceh]h]h!]uh%j hjBubah}(h]h]h]h]h!]refdocj refdomainjPreftypefunc refexplicitrefwarnjNjNjpygame.image.loaduh%jh'h(h)KThj(ubh4, or you can make a surface that contains text with }hj(sbj)}(h!:func:`pygame.font.Font.render()`h]j )}(hjhh]hpygame.font.Font.render()}hjjsbah}(h]h](jpypy-funceh]h]h!]uh%j hjfubah}(h]h]h]h]h!]refdocj refdomainjtreftypefunc refexplicitrefwarnjNjNjpygame.font.Font.renderuh%jh'h(h)KThj(ubhC. You can even create a surface that contains nothing at all with }hj(sbj)}(h:func:`pygame.Surface()`h]j )}(hjh]hpygame.Surface()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.Surfaceuh%jh'h(h)KThj(ubh.}hj(sbeh}(h]h]h]h]h!]uh%hnh'h(h)KThjh&hubho)}(hMost of the surface functions are not critical. Just learn :meth:`.Surface.blit()`, :meth:`.Surface.fill()`, :meth:`.Surface.set_at()` and :meth:`.Surface.get_at()`, and you'll be fine.h](h;Most of the surface functions are not critical. Just learn }hjsbj)}(h:meth:`.Surface.blit()`h]j )}(hjh]hSurface.blit()}hjsbah}(h]h](jpypy-metheh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypemeth refexplicitrefwarnjNjN refspecificj Surface.blituh%jh'h(h)KZhjubh, }hjsbj)}(h:meth:`.Surface.fill()`h]j )}(hjh]hSurface.fill()}hjsbah}(h]h](jpypy-metheh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypemeth refexplicitrefwarnjNjNjj Surface.filluh%jh'h(h)KZhjubh, }hjsbj)}(h:meth:`.Surface.set_at()`h]j )}(hjh]hSurface.set_at()}hj sbah}(h]h](jpypy-metheh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypemeth refexplicitrefwarnjNjNjjSurface.set_atuh%jh'h(h)KZhjubh and }hjsbj)}(h:meth:`.Surface.get_at()`h]j )}(hj+h]hSurface.get_at()}hj-sbah}(h]h](jpypy-metheh]h]h!]uh%j hj)ubah}(h]h]h]h]h!]refdocj refdomainj7reftypemeth refexplicitrefwarnjNjNjjSurface.get_atuh%jh'h(h)KZhjubh, and you'll be fine.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)KZhjh&hubeh}(h]know-what-a-surface-isah]h]know what a surface is.ah]h!]uh%hHhh]h&hh'h(h)KIubhI)}(hhh](hN)}(hUse Surface.convert().h]hUse Surface.convert().}hj^sbah}(h]h]h]h]h!]uh%hMhj[h&hh'h(h)K_ubho)}(hXWhen I first read the documentation for :meth:`.Surface.convert()`, I didn't think it was something I had to worry about. 'I only use PNGs, therefore everything I do will be in the same format. So I don't need ``convert()``';. It turns out I was very, very wrong.h](h(When I first read the documentation for }hjlsbj)}(h:meth:`.Surface.convert()`h]j )}(hjvh]hSurface.convert()}hjxsbah}(h]h](jpypy-metheh]h]h!]uh%j hjtubah}(h]h]h]h]h!]refdocj refdomainjreftypemeth refexplicitrefwarnjNjNjjSurface.convertuh%jh'h(h)Kahjlubh, I didn't think it was something I had to worry about. 'I only use PNGs, therefore everything I do will be in the same format. So I don't need }hjlsbj )}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j hjlubh(';. It turns out I was very, very wrong.}hjlsbeh}(h]h]h]h]h!]uh%hnh'h(h)Kahj[h&hubho)}(hXThe 'format' that ``convert()`` refers to isn't the *file* format (i.e. PNG, JPEG, GIF), it's what's called the 'pixel format'. This refers to the particular way that a surface records individual colors in a specific pixel. If the surface format isn't the same as the display format, SDL will have to convert it on-the-fly for every blit -- a fairly time-consuming process. Don't worry too much about the explanation; just note that ``convert()`` is necessary if you want to get any kind of speed out of your blits.h](hThe 'format' that }hjsbj )}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j hjubh refers to isn't the }hjsbh emphasis)}(h*file*h]hfile}hjsbah}(h]h]h]h]h!]uh%jhjubhXy format (i.e. PNG, JPEG, GIF), it's what's called the 'pixel format'. This refers to the particular way that a surface records individual colors in a specific pixel. If the surface format isn't the same as the display format, SDL will have to convert it on-the-fly for every blit -- a fairly time-consuming process. Don't worry too much about the explanation; just note that }hjsbj )}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j hjubhE is necessary if you want to get any kind of speed out of your blits.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Kfhj[h&hubho)}(h~How do you use convert? Just call it after creating a surface with the :func:`.image.load()` function. Instead of just doing::h](hGHow do you use convert? Just call it after creating a surface with the }hjsbj)}(h:func:`.image.load()`h]j )}(hjh]h image.load()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainj reftypefunc refexplicitrefwarnjNjNjj image.loaduh%jh'h(h)Knhjubh! function. Instead of just doing:}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Knhj[h&hubh literal_block)}(h&surface = pygame.image.load('foo.png')h]h&surface = pygame.image.load('foo.png')}hj*sbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)Kqhj[h&hubho)}(hDo::h]hDo:}hj8sbah}(h]h]h]h]h!]uh%hnh'h(h)Kshj[h&hubj))}(h0surface = pygame.image.load('foo.png').convert()h]h0surface = pygame.image.load('foo.png').convert()}hjFsbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)Kuhj[h&hubho)}(hIt's that easy. You just need to call it once per surface, when you load an image off the disk. You'll be pleased with the results; I see about a 6x increase in blitting speed by calling ``convert()``.h](hIt's that easy. You just need to call it once per surface, when you load an image off the disk. You'll be pleased with the results; I see about a 6x increase in blitting speed by calling }hjTsbj )}(h ``convert()``h]h convert()}hj\sbah}(h]h]h]h]h!]uh%j hjTubh.}hjTsbeh}(h]h]h]h]h!]uh%hnh'h(h)Kwhj[h&hubho)}(hX_The only times you don't want to use ``convert()`` is when you really need to have absolute control over an image's internal format -- say you were writing an image conversion program or something, and you needed to ensure that the output file had the same pixel format as the input file. If you're writing a game, you need speed. Use ``convert()``.h](h%The only times you don't want to use }hjtsbj )}(h ``convert()``h]h convert()}hj|sbah}(h]h]h]h]h!]uh%j hjtubhX is when you really need to have absolute control over an image's internal format -- say you were writing an image conversion program or something, and you needed to ensure that the output file had the same pixel format as the input file. If you're writing a game, you need speed. Use }hjtsbj )}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j hjtubh.}hjtsbeh}(h]h]h]h]h!]uh%hnh'h(h)K{hj[h&hubeh}(h]use-surface-convertah]h]use surface.convert().ah]h!]uh%hHhh]h&hh'h(h)K_ubhI)}(hhh](hN)}(h3Be wary of outdated, obsolete, and optional advice.h]h3Be wary of outdated, obsolete, and optional advice.}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubho)}(hXSPygame has been around since the early 2000s, and a lot has changed since then -- both within the framework itself and within the broader computing landscape as a whole. Make sure to check the dates on materials you read (including this guide!), and take older advice with a grain of salt. Here are some common things that stick out to me:h]hXSPygame has been around since the early 2000s, and a lot has changed since then -- both within the framework itself and within the broader computing landscape as a whole. Make sure to check the dates on materials you read (including this guide!), and take older advice with a grain of salt. Here are some common things that stick out to me:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(h&**Dirty Rects & performance 'tricks'**h]hy)}(hjh]h"Dirty Rects & performance 'tricks'}hjsbah}(h]h]h]h]h!]uh%hxhjubah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hX When you read older bits of pygame documentation or guides online, you may see some emphasis on only updating portions of the screen that are dirty, for the sake of performance (in this context, "dirty" means the region has changed since the previous frame was drawn).h]hX When you read older bits of pygame documentation or guides online, you may see some emphasis on only updating portions of the screen that are dirty, for the sake of performance (in this context, "dirty" means the region has changed since the previous frame was drawn).}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXGenerally this entails calling :func:`pygame.display.update()` (with a list of rects) instead of :func:`pygame.display.flip()`, not having scrolling backgrounds, or even not filling the screen with a background color every frame because pygame supposedly can't handle it. Some of pygame's API is designed to support this paradigm as well (e.g. :func:`pygame.sprite.RenderUpdates`), which made a lot of sense in the early years of pygame.h](hGenerally this entails calling }hjsbj)}(h:func:`pygame.display.update()`h]j )}(hjh]hpygame.display.update()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.updateuh%jh'h(h)Khjubh# (with a list of rects) instead of }hjsbj)}(h:func:`pygame.display.flip()`h]j )}(hj h]hpygame.display.flip()}hj"sbah}(h]h](jpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainj,reftypefunc refexplicitrefwarnjNjNjpygame.display.flipuh%jh'h(h)Khjubh, not having scrolling backgrounds, or even not filling the screen with a background color every frame because pygame supposedly can't handle it. Some of pygame's API is designed to support this paradigm as well (e.g. }hjsbj)}(h#:func:`pygame.sprite.RenderUpdates`h]j )}(hjDh]hpygame.sprite.RenderUpdates()}hjFsbah}(h]h](jpypy-funceh]h]h!]uh%j hjBubah}(h]h]h]h]h!]refdocj refdomainjPreftypefunc refexplicitrefwarnjNjNjpygame.sprite.RenderUpdatesuh%jh'h(h)Khjubh:), which made a lot of sense in the early years of pygame.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXPIn the present day (2022) though, most modest desktop computers are powerful enough to refresh the entire display once per frame at 60 FPS and beyond. You can have a moving camera, or dynamic backgrounds and your game should run totally fine at 60 FPS. CPUs are more powerful nowadays, and you can use ``display.flip()`` without fear.h](hX0In the present day (2022) though, most modest desktop computers are powerful enough to refresh the entire display once per frame at 60 FPS and beyond. You can have a moving camera, or dynamic backgrounds and your game should run totally fine at 60 FPS. CPUs are more powerful nowadays, and you can use }hjlsbj )}(h``display.flip()``h]hdisplay.flip()}hjtsbah}(h]h]h]h]h!]uh%j hjlubh without fear.}hjlsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hThat being said there are still some times when this old technique is still useful for squeezing out a few extra FPS. For example, with a single screen game like an Asteroids or Space Invaders. Here is the rough process for how it works:h]hThat being said there are still some times when this old technique is still useful for squeezing out a few extra FPS. For example, with a single screen game like an Asteroids or Space Invaders. Here is the rough process for how it works:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXInstead of updating the whole screen every frame, only the parts that changed since the last frame are updated. You do this by keeping track of those rectangles in a list, then calling ``update(the_dirty_rectangles)`` at the end of the frame. In detail for a moving sprite:h](hInstead of updating the whole screen every frame, only the parts that changed since the last frame are updated. You do this by keeping track of those rectangles in a list, then calling }hjsbj )}(h ``update(the_dirty_rectangles)``h]hupdate(the_dirty_rectangles)}hjsbah}(h]h]h]h]h!]uh%j hjubh9 at the end of the frame. In detail for a moving sprite:}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubh block_quote)}(hX<* Blit a piece of the background over the sprite's current location, erasing it. * Append the sprite's current location rectangle to a list called dirty_rects. * Move the sprite. * Draw the sprite at its new location. * Append the sprite's new location to my dirty_rects list. * Call ``display.update(dirty_rects)`` h]h bullet_list)}(hhh](h list_item)}(hNBlit a piece of the background over the sprite's current location, erasing it.h]ho)}(hjh]hNBlit a piece of the background over the sprite's current location, erasing it.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjubj)}(hLAppend the sprite's current location rectangle to a list called dirty_rects.h]ho)}(hjh]hLAppend the sprite's current location rectangle to a list called dirty_rects.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjubj)}(hMove the sprite.h]ho)}(hjh]hMove the sprite.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjubj)}(h$Draw the sprite at its new location.h]ho)}(hjh]h$Draw the sprite at its new location.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khj ubah}(h]h]h]h]h!]uh%jh'h(h)Khjubj)}(h8Append the sprite's new location to my dirty_rects list.h]ho)}(hj%h]h8Append the sprite's new location to my dirty_rects list.}hj'sbah}(h]h]h]h]h!]uh%hnh'h(h)Khj#ubah}(h]h]h]h]h!]uh%jh'h(h)Khjubj)}(h%Call ``display.update(dirty_rects)`` h]ho)}(h$Call ``display.update(dirty_rects)``h](hCall }hj>sbj )}(h``display.update(dirty_rects)``h]hdisplay.update(dirty_rects)}hjFsbah}(h]h]h]h]h!]uh%j hj>ubeh}(h]h]h]h]h!]uh%hnh'h(h)Khj:ubah}(h]h]h]h]h!]uh%jh'h(h)Khjubeh}(h]h]h]h]h!]bullet*uh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjh&hubho)}(hXEven though this technique is not required for making performant 2D games with modern CPUs, it is still useful to be aware of. There are also still plenty of other ways to accidentally tank your game's performance with poorly optimized rendering logic. For example, even on modern hardware it's probably too slow to call ``set_at`` once per pixel on the display surface. Being mindful of performance is still something you'll have to do.h](hXAEven though this technique is not required for making performant 2D games with modern CPUs, it is still useful to be aware of. There are also still plenty of other ways to accidentally tank your game's performance with poorly optimized rendering logic. For example, even on modern hardware it's probably too slow to call }hjnsbj )}(h ``set_at``h]hset_at}hjvsbah}(h]h]h]h]h!]uh%j hjnubhj once per pixel on the display surface. Being mindful of performance is still something you'll have to do.}hjnsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXThere just aren't that many 'one neat trick to fix your code performance' tips. Every game is different and there are different problems and different algorithms to solve them efficiently in each type of game. Pretty much every time your 2D game code is failing to hit a reasonable frame rate the underlying cause turns out to be bad algorithm or a misunderstanding of fundamental game design patterns.h]hXThere just aren't that many 'one neat trick to fix your code performance' tips. Every game is different and there are different problems and different algorithms to solve them efficiently in each type of game. Pretty much every time your 2D game code is failing to hit a reasonable frame rate the underlying cause turns out to be bad algorithm or a misunderstanding of fundamental game design patterns.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXIf you are having performance problems, first make sure you aren't loading files repeatedly in your game loop, then use one of the many options for profiling your code to find out what is taking up the most time. Once you are armed with at least some knowledge on why your game is slow, try asking the internet (via google), or the pygame community if they've got some better algorithms to help you out.h]hXIf you are having performance problems, first make sure you aren't loading files repeatedly in your game loop, then use one of the many options for profiling your code to find out what is taking up the most time. Once you are armed with at least some knowledge on why your game is slow, try asking the internet (via google), or the pygame community if they've got some better algorithms to help you out.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(h**HWSURFACE and DOUBLEBUF**h]hy)}(hjh]hHWSURFACE and DOUBLEBUF}hjsbah}(h]h]h]h]h!]uh%hxhjubah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXLThe HWSURFACE :func:`.display.set_mode()` flag does nothing in pygame versions 2.0.0 and later (you can check the docs if you don't believe me)! There's no reason to use it anymore. Even in pygame 1, its effect is pretty nuanced and generally misunderstood by most pygame users. It was never a magic speed-up flag, unfortunately.h](hThe HWSURFACE }hjsbj)}(h:func:`.display.set_mode()`h]j )}(hjh]hdisplay.set_mode()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%j hjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjjdisplay.set_modeuh%jh'h(h)KhjubhX# flag does nothing in pygame versions 2.0.0 and later (you can check the docs if you don't believe me)! There's no reason to use it anymore. Even in pygame 1, its effect is pretty nuanced and generally misunderstood by most pygame users. It was never a magic speed-up flag, unfortunately.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hDDOUBLEBUF still has some use, but is also not a magic speed up flag.h]hDDOUBLEBUF still has some use, but is also not a magic speed up flag.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(h**The Sprite class**h]hy)}(hjh]hThe Sprite class}hjsbah}(h]h]h]h]h!]uh%hxhjubah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXYou don't need to use the built-in :class:`.Sprite` or :class:`.Group` classes if you don't want to. In a lot of tutorials, it may seem like ``Sprite`` is the fundamental "GameObject" of pygame, from which all other objects must derive, but in reality it's pretty much just a wrapper around a ``Rect`` and a ``Surface``, with some additional convenience methods. You may find it more intuitive (and fun) to write your game's core logic and classes from scratch.h](h#You don't need to use the built-in }hjsbj)}(h:class:`.Sprite`h]j )}(hj"h]hSprite}hj$sbah}(h]h](jpypy-classeh]h]h!]uh%j hj ubah}(h]h]h]h]h!]refdocj refdomainj.reftypeclass refexplicitrefwarnjNjNjjSpriteuh%jh'h(h)Khjubh or }hjsbj)}(h:class:`.Group`h]j )}(hjFh]hGroup}hjHsbah}(h]h](jpypy-classeh]h]h!]uh%j hjDubah}(h]h]h]h]h!]refdocj refdomainjRreftypeclass refexplicitrefwarnjNjNjjGroupuh%jh'h(h)KhjubhH classes if you don't want to. In a lot of tutorials, it may seem like }hjsbj )}(h ``Sprite``h]hSprite}hjhsbah}(h]h]h]h]h!]uh%j hjubh is the fundamental "GameObject" of pygame, from which all other objects must derive, but in reality it's pretty much just a wrapper around a }hjsbj )}(h``Rect``h]hRect}hjzsbah}(h]h]h]h]h!]uh%j hjubh and a }hjsbj )}(h ``Surface``h]hSurface}hjsbah}(h]h]h]h]h!]uh%j hjubh, with some additional convenience methods. You may find it more intuitive (and fun) to write your game's core logic and classes from scratch.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubeh}(h]0be-wary-of-outdated-obsolete-and-optional-adviceah]h]3be wary of outdated, obsolete, and optional advice.ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh]hN)}(hThere is NO rule six.h]hThere is NO rule six.}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubah}(h]there-is-no-rule-sixah]h]there is no rule six.ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(h$Don't get distracted by side issues.h]h$Don't get distracted by side issues.}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubho)}(hXSometimes, new game programmers spend too much time worrying about issues that aren't really critical to their game's success. The desire to get secondary issues 'right' is understandable, but early in the process of creating a game, you cannot even know what the important questions are, let alone what answers you should choose. The result can be a lot of needless prevarication.h]hXSometimes, new game programmers spend too much time worrying about issues that aren't really critical to their game's success. The desire to get secondary issues 'right' is understandable, but early in the process of creating a game, you cannot even know what the important questions are, let alone what answers you should choose. The result can be a lot of needless prevarication.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXFor example, consider the question of how to organize your graphics files. Should each frame have its own graphics file, or each sprite? Perhaps all the graphics should be zipped up into one archive? A great deal of time has been wasted on a lot of projects, asking these questions on mailing lists, debating the answers, profiling, etc, etc. This is a secondary issue; any time spent discussing it should have been spent coding the actual game.h]hXFor example, consider the question of how to organize your graphics files. Should each frame have its own graphics file, or each sprite? Perhaps all the graphics should be zipped up into one archive? A great deal of time has been wasted on a lot of projects, asking these questions on mailing lists, debating the answers, profiling, etc, etc. This is a secondary issue; any time spent discussing it should have been spent coding the actual game.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hThe insight here is that it is far better to have a 'pretty good' solution that was actually implemented, than a perfect solution that you never got around to writing.h]hThe insight here is that it is far better to have a 'pretty good' solution that was actually implemented, than a perfect solution that you never got around to writing.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubeh}(h]#don-t-get-distracted-by-side-issuesah]h]$don't get distracted by side issues.ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(hRects are your friends.h]hRects are your friends.}hj sbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Kubho)}(hXPete Shinners' wrapper may have cool alpha effects and fast blitting speeds, but I have to admit my favorite part of pygame is the lowly :class:`.Rect` class. A rect is simply a rectangle -- defined only by the position of its top left corner, its width, and its height. Many pygame functions take rects as arguments, and they also take 'rectstyles', a sequence that has the same values as a rect. So if I need a rectangle that defines the area between 10, 20 and 40, 50, I can do any of the following::h](hPete Shinners' wrapper may have cool alpha effects and fast blitting speeds, but I have to admit my favorite part of pygame is the lowly }hjsbj)}(h:class:`.Rect`h]j )}(hj#h]hRect}hj%sbah}(h]h](jpypy-classeh]h]h!]uh%j hj!ubah}(h]h]h]h]h!]refdocj refdomainj/reftypeclass refexplicitrefwarnjNjNjjRectuh%jh'h(h)KhjubhX` class. A rect is simply a rectangle -- defined only by the position of its top left corner, its width, and its height. Many pygame functions take rects as arguments, and they also take 'rectstyles', a sequence that has the same values as a rect. So if I need a rectangle that defines the area between 10, 20 and 40, 50, I can do any of the following:}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubj))}(hrect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30))h]hrect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30))}hjKsbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)Khjh&hubho)}(hIf you use any of the first three versions, however, you get access to Rect's utility functions. These include functions to move, shrink and inflate rects, find the union of two rects, and a variety of collision-detection functions.h]hIf you use any of the first three versions, however, you get access to Rect's utility functions. These include functions to move, shrink and inflate rects, find the union of two rects, and a variety of collision-detection functions.}hjYsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hFor example, suppose I'd like to get a list of all the sprites that contain a point (x, y) -- maybe the player clicked there, or maybe that's the current location of a bullet. It's simple if each sprite has a .rect member -- I just do::h]hFor example, suppose I'd like to get a list of all the sprites that contain a point (x, y) -- maybe the player clicked there, or maybe that's the current location of a bullet. It's simple if each sprite has a .rect member -- I just do:}hjgsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubj))}(h^sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]h]h^sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]}hjusbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)Mhjh&hubho)}(hXGRects have no other relation to surfaces or graphics functions, other than the fact that you can use them as arguments. You can also use them in places that have nothing to do with graphics, but still need to be defined as rectangles. Every project I discover a few new places to use rects where I never thought I'd need them.h]hXGRects have no other relation to surfaces or graphics functions, other than the fact that you can use them as arguments. You can also use them in places that have nothing to do with graphics, but still need to be defined as rectangles. Every project I discover a few new places to use rects where I never thought I'd need them.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)M hjh&hubeh}(h]rects-are-your-friendsah]h]rects are your friends.ah]h!]uh%hHhh]h&hh'h(h)KubhI)}(hhh](hN)}(h4Don't bother with pixel-perfect collision detection.h]h4Don't bother with pixel-perfect collision detection.}hjsbah}(h]h]h]h]h!]uh%hMhjh&hh'h(h)Mubho)}(hSo you've got your sprites moving around, and you need to know whether or not they're bumping into one another. It's tempting to write something like the following:h]hSo you've got your sprites moving around, and you need to know whether or not they're bumping into one another. It's tempting to write something like the following:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubj)}(h* Check to see if the rects are in collision. If they aren't, ignore them. * For each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision. h]j)}(hhh](j)}(hHCheck to see if the rects are in collision. If they aren't, ignore them.h]ho)}(hjh]hHCheck to see if the rects are in collision. If they aren't, ignore them.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjubah}(h]h]h]h]h!]uh%jh'h(h)Mhjubj)}(hFor each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision. h]ho)}(hFor each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision.h]hFor each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjubah}(h]h]h]h]h!]uh%jh'h(h)Mhjubeh}(h]h]h]h]h!]jfjguh%jh'h(h)Mhjubah}(h]h]h]h]h!]uh%jh'h(h)Mhjh&hubho)}(hXThere are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.h]hXThere are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubeh}(h]3don-t-bother-with-pixel-perfect-collision-detectionah]h]4don't bother with pixel-perfect collision detection.ah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hManaging the event subsystem.h]hManaging the event subsystem.}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)M$ubho)}(hPygame's event system is kind of tricky. There are actually two different ways to find out what an input device (keyboard, mouse or joystick) is doing.h]hPygame's event system is kind of tricky. There are actually two different ways to find out what an input device (keyboard, mouse or joystick) is doing.}hj! sbah}(h]h]h]h]h!]uh%hnh'h(h)M&hj h&hubho)}(hThe first is by directly checking the state of the device. You do this by calling, say, :func:`pygame.mouse.get_pos()` or :func:`pygame.key.get_pressed()`. This will tell you the state of that device *at the moment you call the function.*h](hYThe first is by directly checking the state of the device. You do this by calling, say, }hj/ sbj)}(h:func:`pygame.mouse.get_pos()`h]j )}(hj9 h]hpygame.mouse.get_pos()}hj; sbah}(h]h](jpypy-funceh]h]h!]uh%j hj7 ubah}(h]h]h]h]h!]refdocj refdomainjE reftypefunc refexplicitrefwarnjNjNjpygame.mouse.get_posuh%jh'h(h)M)hj/ ubh or }hj/ sbj)}(h :func:`pygame.key.get_pressed()`h]j )}(hj] h]hpygame.key.get_pressed()}hj_ sbah}(h]h](jpypy-funceh]h]h!]uh%j hj[ ubah}(h]h]h]h]h!]refdocj refdomainji reftypefunc refexplicitrefwarnjNjNjpygame.key.get_presseduh%jh'h(h)M)hj/ ubh.. This will tell you the state of that device }hj/ sbj)}(h&*at the moment you call the function.*h]h$at the moment you call the function.}hj sbah}(h]h]h]h]h!]uh%jhj/ ubeh}(h]h]h]h]h!]uh%hnh'h(h)M)hj h&hubho)}(hThe second method uses the SDL event queue. This queue is a list of events -- events are added to the list as they're detected, and they're deleted from the queue as they're read off.h]hThe second method uses the SDL event queue. This queue is a list of events -- events are added to the list as they're detected, and they're deleted from the queue as they're read off.}hj sbah}(h]h]h]h]h!]uh%hnh'h(h)M.hj h&hubho)}(hXThere are advantages and disadvantages to each system. State-checking (system 1) gives you precision -- you know exactly when a given input was made -- if ``mouse.get_pressed([0])`` is 1, that means that the left mouse button is down *right at this moment*. The event queue merely reports that the mouse was down at some time in the past; if you check the queue fairly often, that can be ok, but if you're delayed from checking it by other code, input latency can grow. Another advantage of the state-checking system is that it detects "chording" easily; that is, several states at the same time. If you want to know whether the ``t`` and ``f`` keys are down at the same time, just check::h](hThere are advantages and disadvantages to each system. State-checking (system 1) gives you precision -- you know exactly when a given input was made -- if }hj sbj )}(h``mouse.get_pressed([0])``h]hmouse.get_pressed([0])}hj sbah}(h]h]h]h]h!]uh%j hj ubh5 is 1, that means that the left mouse button is down }hj sbj)}(h*right at this moment*h]hright at this moment}hj sbah}(h]h]h]h]h!]uh%jhj ubhXx. The event queue merely reports that the mouse was down at some time in the past; if you check the queue fairly often, that can be ok, but if you're delayed from checking it by other code, input latency can grow. Another advantage of the state-checking system is that it detects "chording" easily; that is, several states at the same time. If you want to know whether the }hj sbj )}(h``t``h]ht}hj sbah}(h]h]h]h]h!]uh%j hj ubh and }hj sbj )}(h``f``h]hf}hj sbah}(h]h]h]h]h!]uh%j hj ubh, keys are down at the same time, just check:}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)M2hj h&hubj))}(hCif key.get_pressed[K_t] and key.get_pressed[K_f]: print("Yup!")h]hCif key.get_pressed[K_t] and key.get_pressed[K_f]: print("Yup!")}hj sbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)M=hj h&hubho)}(hIn the queue system, however, each keypress arrives in the queue as a completely separate event, so you'd need to remember that the ``t`` key was down, and hadn't come up yet, while checking for the ``f`` key. A little more complicated.h](hIn the queue system, however, each keypress arrives in the queue as a completely separate event, so you'd need to remember that the }hj sbj )}(h``t``h]ht}hj sbah}(h]h]h]h]h!]uh%j hj ubh> key was down, and hadn't come up yet, while checking for the }hj sbj )}(h``f``h]hf}hj sbah}(h]h]h]h]h!]uh%j hj ubh! key. A little more complicated.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)M@hj h&hubho)}(hXThe state system has one great weakness, however. It only reports what the state of the device is at the moment it's called; if the user hits a mouse button then releases it just before a call to ``mouse.get_pressed()``, the mouse button will return 0 -- ``get_pressed()`` missed the mouse button press completely. The two events, ``MOUSEBUTTONDOWN`` and ``MOUSEBUTTONUP``, will still be sitting in the event queue, however, waiting to be retrieved and processed.h](hThe state system has one great weakness, however. It only reports what the state of the device is at the moment it's called; if the user hits a mouse button then releases it just before a call to }hj7 sbj )}(h``mouse.get_pressed()``h]hmouse.get_pressed()}hj? sbah}(h]h]h]h]h!]uh%j hj7 ubh$, the mouse button will return 0 -- }hj7 sbj )}(h``get_pressed()``h]h get_pressed()}hjQ sbah}(h]h]h]h]h!]uh%j hj7 ubh< missed the mouse button press completely. The two events, }hj7 sbj )}(h``MOUSEBUTTONDOWN``h]hMOUSEBUTTONDOWN}hjc sbah}(h]h]h]h]h!]uh%j hj7 ubh and }hj7 sbj )}(h``MOUSEBUTTONUP``h]h MOUSEBUTTONUP}hju sbah}(h]h]h]h]h!]uh%j hj7 ubh[, will still be sitting in the event queue, however, waiting to be retrieved and processed.}hj7 sbeh}(h]h]h]h]h!]uh%hnh'h(h)MEhj h&hubho)}(hXThe lesson is: choose the system that meets your requirements. If you don't have much going on in your loop -- say you're just sitting in a ``while True`` loop, waiting for input, use ``get_pressed()`` or another state function; the latency will be lower. On the other hand, if every keypress is crucial, but latency isn't as important -- say your user is typing something in an editbox, use the event queue. Some key presses may be slightly late, but at least you'll get them all.h](hThe lesson is: choose the system that meets your requirements. If you don't have much going on in your loop -- say you're just sitting in a }hj sbj )}(h``while True``h]h while True}hj sbah}(h]h]h]h]h!]uh%j hj ubh loop, waiting for input, use }hj sbj )}(h``get_pressed()``h]h get_pressed()}hj sbah}(h]h]h]h]h!]uh%j hj ubhX or another state function; the latency will be lower. On the other hand, if every keypress is crucial, but latency isn't as important -- say your user is typing something in an editbox, use the event queue. Some key presses may be slightly late, but at least you'll get them all.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)MMhj h&hubho)}(hXA note about ``event.poll()`` vs. ``wait()`` -- ``poll()`` may seem better, since it doesn't block your program from doing anything while it's waiting for input -- ``wait()`` suspends the program until an event is received. However, ``poll()`` will consume 100% of available CPU time while it runs, and it will fill the event queue with ``NOEVENTS``. Use ``set_blocked()`` to select just those event types you're interested in -- your queue will be much more manageable.h](h A note about }hj sbj )}(h``event.poll()``h]h event.poll()}hj sbah}(h]h]h]h]h!]uh%j hj ubh vs. }hj sbj )}(h ``wait()``h]hwait()}hj sbah}(h]h]h]h]h!]uh%j hj ubh -- }hj sbj )}(h ``poll()``h]hpoll()}hj sbah}(h]h]h]h]h!]uh%j hj ubhj may seem better, since it doesn't block your program from doing anything while it's waiting for input -- }hj sbj )}(h ``wait()``h]hwait()}hj sbah}(h]h]h]h]h!]uh%j hj ubh; suspends the program until an event is received. However, }hj sbj )}(h ``poll()``h]hpoll()}hj sbah}(h]h]h]h]h!]uh%j hj ubh^ will consume 100% of available CPU time while it runs, and it will fill the event queue with }hj sbj )}(h ``NOEVENTS``h]hNOEVENTS}hj! sbah}(h]h]h]h]h!]uh%j hj ubh. Use }hj sbj )}(h``set_blocked()``h]h set_blocked()}hj3 sbah}(h]h]h]h]h!]uh%j hj ubhb to select just those event types you're interested in -- your queue will be much more manageable.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)MUhj h&hubho)}(hXAnother note about the event queue -- even if you don't want to use it, you must still clear it periodically because it's still going to be filling up with events in the background as the user presses keys and mouses over the window. On Windows, if your game goes too long without clearing the queue, the operating system will think it has frozen and show a "The application is not responding" message. Iterating over ``event.get()`` or simply calling ``event.clear()`` once per frame will avoid this.h](hXAnother note about the event queue -- even if you don't want to use it, you must still clear it periodically because it's still going to be filling up with events in the background as the user presses keys and mouses over the window. On Windows, if your game goes too long without clearing the queue, the operating system will think it has frozen and show a "The application is not responding" message. Iterating over }hjK sbj )}(h``event.get()``h]h event.get()}hjS sbah}(h]h]h]h]h!]uh%j hjK ubh or simply calling }hjK sbj )}(h``event.clear()``h]h event.clear()}hje sbah}(h]h]h]h]h!]uh%j hjK ubh once per frame will avoid this.}hjK sbeh}(h]h]h]h]h!]uh%hnh'h(h)M]hj h&hubeh}(h]managing-the-event-subsystemah]h]managing the event subsystem.ah]h!]uh%hHhh]h&hh'h(h)M$ubhI)}(hhh](hN)}(hColorkey vs. Alpha.h]hColorkey vs. Alpha.}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mgubho)}(hgThere's a lot of confusion around these two techniques, and much of it comes from the terminology used.h]hgThere's a lot of confusion around these two techniques, and much of it comes from the terminology used.}hj sbah}(h]h]h]h]h!]uh%hnh'h(h)Mihj h&hubho)}(hX'Colorkey blitting' involves telling pygame that all pixels of a certain color in a certain image are transparent instead of whatever color they happen to be. These transparent pixels are not blitted when the rest of the image is blitted, and so don't obscure the background. This is how we make sprites that aren't rectangular in shape. Simply call :meth:`.Surface.set_colorkey()`, and pass in an RGB tuple -- say (0,0,0). This would make every pixel in the source image transparent instead of black.h](hX`'Colorkey blitting' involves telling pygame that all pixels of a certain color in a certain image are transparent instead of whatever color they happen to be. These transparent pixels are not blitted when the rest of the image is blitted, and so don't obscure the background. This is how we make sprites that aren't rectangular in shape. Simply call }hj sbj)}(h:meth:`.Surface.set_colorkey()`h]j )}(hj h]hSurface.set_colorkey()}hj sbah}(h]h](jpypy-metheh]h]h!]uh%j hj ubah}(h]h]h]h]h!]refdocj refdomainj reftypemeth refexplicitrefwarnjNjNjjSurface.set_colorkeyuh%jh'h(h)Mlhj ubhx, and pass in an RGB tuple -- say (0,0,0). This would make every pixel in the source image transparent instead of black.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mlhj h&hubho)}(hX'Alpha' is different, and it comes in two flavors. 'Image alpha' applies to the whole image, and is probably what you want. Properly known as 'translucency', alpha causes each pixel in the source image to be only *partially* opaque. For example, if you set a surface's alpha to 192 and then blitted it onto a background, 3/4 of each pixel's color would come from the source image, and 1/4 from the background. Alpha is measured from 255 to 0, where 0 is completely transparent, and 255 is completely opaque. Note that colorkey and alpha blitting can be combined -- this produces an image that is fully transparent in some spots, and semi-transparent in others.h](h'Alpha' is different, and it comes in two flavors. 'Image alpha' applies to the whole image, and is probably what you want. Properly known as 'translucency', alpha causes each pixel in the source image to be only }hj sbj)}(h *partially*h]h partially}hj sbah}(h]h]h]h]h!]uh%jhj ubhX opaque. For example, if you set a surface's alpha to 192 and then blitted it onto a background, 3/4 of each pixel's color would come from the source image, and 1/4 from the background. Alpha is measured from 255 to 0, where 0 is completely transparent, and 255 is completely opaque. Note that colorkey and alpha blitting can be combined -- this produces an image that is fully transparent in some spots, and semi-transparent in others.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mthj h&hubho)}(hX'Per-pixel alpha' is the other flavor of alpha, and it's more complicated. Basically, each pixel in the source image has its own alpha value, from 0 to 255. Each pixel, therefore, can have a different opacity when blitted onto a background. This type of alpha can't be mixed with colorkey blitting, and it overrides per-image alpha. Per-pixel alpha is rarely used in games, and to use it you have to save your source image in a graphic editor with a special *alpha channel*. It's complicated -- don't use it yet.h](hX'Per-pixel alpha' is the other flavor of alpha, and it's more complicated. Basically, each pixel in the source image has its own alpha value, from 0 to 255. Each pixel, therefore, can have a different opacity when blitted onto a background. This type of alpha can't be mixed with colorkey blitting, and it overrides per-image alpha. Per-pixel alpha is rarely used in games, and to use it you have to save your source image in a graphic editor with a special }hj sbj)}(h*alpha channel*h]h alpha channel}hj sbah}(h]h]h]h]h!]uh%jhj ubh(. It's complicated -- don't use it yet.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)M~hj h&hubeh}(h]colorkey-vs-alphaah]h]colorkey vs. alpha.ah]h!]uh%hHhh]h&hh'h(h)MgubhI)}(hhh](hN)}(h2Software architecture, design patterns, and games.h]h2Software architecture, design patterns, and games.}hj! sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mubho)}(hXrYou may reach a point where you're comfortable writing code, you're able to solve complex problems without assistance, you understand how to use most of pygame's modules, and yet, as you work on larger projects they always seem to get messier and harder to maintain as time goes on. This can manifest in many ways -- for example, fixing bugs in one place might always seem to create new bugs elsewhere, figuring out *where* code should go might become a challenge, adding new things might frequently require you to rewrite many other things, and so on. Finally, you decide to cut your losses and start fresh on something new.h](hXYou may reach a point where you're comfortable writing code, you're able to solve complex problems without assistance, you understand how to use most of pygame's modules, and yet, as you work on larger projects they always seem to get messier and harder to maintain as time goes on. This can manifest in many ways -- for example, fixing bugs in one place might always seem to create new bugs elsewhere, figuring out }hj/ sbj)}(h*where*h]hwhere}hj7 sbah}(h]h]h]h]h!]uh%jhj/ ubh code should go might become a challenge, adding new things might frequently require you to rewrite many other things, and so on. Finally, you decide to cut your losses and start fresh on something new.}hj/ sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hThis is a common issue and it can be frustrating -- on the one hand, your programming skills are improving, and yet you aren't able to finish the games you start due to somewhat nebulous organizational problems.h]hThis is a common issue and it can be frustrating -- on the one hand, your programming skills are improving, and yet you aren't able to finish the games you start due to somewhat nebulous organizational problems.}hjO sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hThis brings us to the concept of software architecture and design patterns. You may be familiar with pygame's "standard" base template (there are many equivalent variations of this, so don't stress about the small details too much)::h]hThis brings us to the concept of software architecture and design patterns. You may be familiar with pygame's "standard" base template (there are many equivalent variations of this, so don't stress about the small details too much):}hj] sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubj))}(hX!import pygame pygame.init() screen = pygame.display.set_mode((1280,720)) clock = pygame.time.Clock() while True: # Process player inputs. for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() raise SystemExit # Do logical updates here. # ... screen.fill("purple") # Fill the display with a solid color # Render the graphics here. # ... pygame.display.flip() # Refresh on-screen display clock.tick(60) # wait until next frame (at 60 FPS)h]hX!import pygame pygame.init() screen = pygame.display.set_mode((1280,720)) clock = pygame.time.Clock() while True: # Process player inputs. for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() raise SystemExit # Do logical updates here. # ... screen.fill("purple") # Fill the display with a solid color # Render the graphics here. # ... pygame.display.flip() # Refresh on-screen display clock.tick(60) # wait until next frame (at 60 FPS)-.}hjk sbah}(h]h]h]h]h!]h#h$uh%j(h'h(h)Mhj h&hubho)}(hX}It does some initial setup, starts a loop, and then proceeds to repeatedly collect input, handle the game's logic, and draw the current frame forever until the program ends. The update, render, wait loop shown here is actually a design pattern that serves as the skeleton of most games -- it's prolific because it's clean, it's organized, and it works. (There's also an important but easy-to-miss design feature here in the form of a strict division between the game's logic and rendering routines. This decision alone prevents a whole category of potential bugs related to objects updating and rendering concurrently, which is nice).h]hX}It does some initial setup, starts a loop, and then proceeds to repeatedly collect input, handle the game's logic, and draw the current frame forever until the program ends. The update, render, wait loop shown here is actually a design pattern that serves as the skeleton of most games -- it's prolific because it's clean, it's organized, and it works. (There's also an important but easy-to-miss design feature here in the form of a strict division between the game's logic and rendering routines. This decision alone prevents a whole category of potential bugs related to objects updating and rendering concurrently, which is nice).}hjy sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hX4It turns out that there are many design patterns like this that are used frequently in games and in software development at large. For a great resource on this specifically for games, I highly recommend `Game Programming Patterns`_, a short free, e-book on the topic. It covers a bunch of useful patterns and concrete situations where you might want to employ them. It won't instantly make you a better coder, but learning some theory about software architecture can go a long way towards helping you escape plateaus and tackle larger projects more confidently.h](hIt turns out that there are many design patterns like this that are used frequently in games and in software development at large. For a great resource on this specifically for games, I highly recommend }hj sbh)}(h`Game Programming Patterns`_h]hGame Programming Patterns}(hj hGame Programming Patternsubah}(h]h]h]h]h!]nameGame Programming Patternsh1https://gameprogrammingpatterns.com/contents.htmluh%hhj hKubhXL, a short free, e-book on the topic. It covers a bunch of useful patterns and concrete situations where you might want to employ them. It won't instantly make you a better coder, but learning some theory about software architecture can go a long way towards helping you escape plateaus and tackle larger projects more confidently.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubeh}(h]/software-architecture-design-patterns-and-gamesah]h]2software architecture, design patterns, and games.ah]h!]uh%hHhh]h&hh'h(h)MubhI)}(hhh](hN)}(hDo things the pythony way.h]hDo things the pythony way.}hj sbah}(h]h]h]h]h!]uh%hMhj h&hh'h(h)Mubho)}(hXA final note (this isn't the least important one; it just comes at the end). Pygame is a pretty lightweight wrapper around SDL, which is in turn a pretty lightweight wrapper around your native OS graphics calls. Chances are pretty good that if your code is still slow, and you've done the things I've mentioned above, then the problem lies in the way you're addressing your data in python. Certain idioms are just going to be slow in python no matter what you do. Luckily, python is a very clear language -- if a piece of code looks awkward or unwieldy, chances are its speed can be improved, too. Read over `Why Pygame is Slow`_ for some deeper insight into why pygame might be considered slower than other frameworks/engines, and what that actually means in practice. And if you're truly stumped by performance problems, profilers like cProfile_ (or SnakeViz_, a visualizer for cProfile) can help identify bottlenecks (they'll tell you which parts of the code are taking the longest to execute). That said, premature optimisation is the root of all evil; if it's already fast enough, don't torture the code trying to make it faster. If it's fast enough, let it be :)h](hXbA final note (this isn't the least important one; it just comes at the end). Pygame is a pretty lightweight wrapper around SDL, which is in turn a pretty lightweight wrapper around your native OS graphics calls. Chances are pretty good that if your code is still slow, and you've done the things I've mentioned above, then the problem lies in the way you're addressing your data in python. Certain idioms are just going to be slow in python no matter what you do. Luckily, python is a very clear language -- if a piece of code looks awkward or unwieldy, chances are its speed can be improved, too. Read over }hj sbh)}(h`Why Pygame is Slow`_h]hWhy Pygame is Slow}(hj hWhy Pygame is Slowubah}(h]h]h]h]h!]nameWhy Pygame is SlowhJhttps://blubberquark.tumblr.com/post/630054903238262784/why-pygame-is-slowuh%hhj hKubh for some deeper insight into why pygame might be considered slower than other frameworks/engines, and what that actually means in practice. And if you're truly stumped by performance problems, profilers like }hj sbh)}(h cProfile_h]hcProfile}(hj hcProfileubah}(h]h]h]h]h!]namej h.https://docs.python.org/3/library/profile.htmluh%hhj hKubh (or }hj sbh)}(h SnakeViz_h]hSnakeViz}(hj hSnakeVizubah}(h]h]h]h]h!]namej h%https://jiffyclub.github.io/snakeviz/uh%hhj hKubhX4, a visualizer for cProfile) can help identify bottlenecks (they'll tell you which parts of the code are taking the longest to execute). That said, premature optimisation is the root of all evil; if it's already fast enough, don't torture the code trying to make it faster. If it's fast enough, let it be :)}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(heThere you go. Now you know practically everything I know about using pygame. Now, go write that game!h]heThere you go. Now you know practically everything I know about using pygame. Now, go write that game!}hj sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubh transition)}(h----h]h}(h]h]h]h]h!]uh%j h'h(h)Mhj h&hubho)}(h*David Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game.*h]j)}(hj. h]hDavid Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game.}hj0 sbah}(h]h]h]h]h!]uh%jhj, ubah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(h/*This guide was substantially updated in 2022.*h]j)}(hjE h]h-This guide was substantially updated in 2022.}hjG sbah}(h]h]h]h]h!]uh%jhjC ubah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubh target)}(h#.. _Pygame: https://www.pygame.org/h]h}(h]pygameah]h]pygameah]h!]hhuh%jZ h)Mhj h&hh'h( referencedubj[ )}(h.. _SDL: http://libsdl.orgh]h}(h]sdlah]h]sdlah]h!]hhuh%jZ h)Mhj h&hh'h(jh ubj[ )}(h4.. _Python documentation: https://docs.python.org/3/h]h}(h]python-documentationah]h]python documentationah]h!]hj<uh%jZ h)Mhj h&hh'h(jh ubj[ )}(hP.. _Game Programming Patterns: https://gameprogrammingpatterns.com/contents.htmlh]h}(h]game-programming-patternsah]h]game programming patternsah]h!]hj uh%jZ h)M hj h&hh'h(jh ubj[ )}(hb.. _Why Pygame is Slow: https://blubberquark.tumblr.com/post/630054903238262784/why-pygame-is-slowh]h}(h]why-pygame-is-slowah]h]why pygame is slowah]h!]hj uh%jZ h)M hj h&hh'h(jh ubj[ )}(h<.. _cProfile: https://docs.python.org/3/library/profile.htmlh]h}(h]cprofileah]h]cprofileah]h!]hj uh%jZ h)M hj h&hh'h(jh ubj[ )}(h3.. _SnakeViz: https://jiffyclub.github.io/snakeviz/h]h}(h]snakevizah]h]snakevizah]h!]hj uh%jZ h)M hj h&hh'h(jh ubeh}(h]do-things-the-pythony-wayah]h]do things the pythony way.ah]h!]uh%hHhh]h&hh'h(h)Mubeh}(h]a-newbie-guide-to-pygameah]h]a newbie guide to pygameah]h!]uh%hHhhJh&hh'h(h)K ubeh}(h]newbie-guide-to-pygameah]h]newbie guide to pygameah]h!]uh%hHhhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(hMA Newbie Guide to pygametranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhMN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(pygame]hasdl]hapython documentation]j+agame programming patterns]j awhy pygame is slow]j acprofile]j asnakeviz]j aurefids}nameids}(j j j j jZjWjjjXjUjjjjjjjjjjj j j j j j j j j j je jb jr jo j~ j{ j j j j j j j j u nametypes}(j j jZjjXjjjjjj j j j j je jr j~ j j j j uh}(j hJj h]jWhjj]jUjjj[jjjjjjjjj jj j j j j j j j jb j\ jo ji j{ ju j j j j j j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]docs/reST/tut/newbieguide.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.6811404 pygame-2.6.1/docs/generated/doctrees/tut/tom_games2.doctree0000644000175100001770000005110214676242422023335 0ustar00runnerdocker7Rsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hRevision: Pygame fundamentalsh]hRevision: Pygame fundamentals}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'hh]h&hh'hNh)K ubhP)}(h.. _makegames-2-1:h]h}(h]h]h]h]h!]h[ makegames-2-1uh%hOh)K,hh]h&hh'hNubh:)}(hhh](h?)}(h2.1. The basic Pygame gameh]h2.1. The basic Pygame game}hh|sbah}(h]h]h]h]h!]uh%h>hhyh&hh'hNh)Kubh paragraph)}(hXaFor the sake of revision, and to ensure that you are familiar with the basic structure of a Pygame program, I'll briefly run through a basic Pygame program, which will display no more than a window with some text in it, that should, by the end, look something like this (though of course the window decoration will probably be different on your system):h]hXaFor the sake of revision, and to ensure that you are familiar with the basic structure of a Pygame program, I'll briefly run through a basic Pygame program, which will display no more than a window with some text in it, that should, by the end, look something like this (though of course the window decoration will probably be different on your system):}hhsbah}(h]h]h]h]h!]uh%hh'hNh)Khhyh&hubh image)}(h.. image:: tom_basic.png h]h}(h]h]h]h]h!]uritut/tom_basic.png candidates}*hs original_uri tom_basic.pnguh%hh'hNh)Khhyh&hubh)}(h0The full code for this example looks like this::h]h/The full code for this example looks like this:}hhsbah}(h]h]h]h]h!]uh%hh'hNh)Khhyh&hubh literal_block)}(hX#!/usr/bin/python import pygame from pygame.locals import * def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Display some text font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Event loop while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main()h]hX#!/usr/bin/python import pygame from pygame.locals import * def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Display some text font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Event loop while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main()}hhsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)Khhyh&hubhP)}(h.. _makegames-2-2:h]h}(h]h]h]h]h!]h[ makegames-2-2uh%hOh)Kahhyh&hh'hNubeh}(h](the-basic-pygame-gamehxeh]h](2.1. the basic pygame game makegames-2-1eh]h!]uh%h9hh]h&hh'hNh)Kexpect_referenced_by_name}hhnsexpect_referenced_by_id}hxhnsubh:)}(hhh](h?)}(h2.2. Basic Pygame objectsh]h2.2. Basic Pygame objects}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'hNh)KFubh)}(hXAs you can see, the code consists of three main objects: the screen, the background, and the text. Each of these objects is created by first calling an instance of an in-built Pygame object, and then modifying it to fit our needs. The screen is a slightly special case, because we still modify the display through Pygame calls, rather than calling methods belonging to the screen object. But for all other Pygame objects, we first create the object as a copy of a Pygame object, giving it some attributes, and build our game objects from them.h]hXAs you can see, the code consists of three main objects: the screen, the background, and the text. Each of these objects is created by first calling an instance of an in-built Pygame object, and then modifying it to fit our needs. The screen is a slightly special case, because we still modify the display through Pygame calls, rather than calling methods belonging to the screen object. But for all other Pygame objects, we first create the object as a copy of a Pygame object, giving it some attributes, and build our game objects from them.}hhsbah}(h]h]h]h]h!]uh%hh'hNh)KHhhh&hubh)}(hXDWith the background, we first create a Pygame Surface object, and make it the size of the screen. We then perform the convert() operation to convert the Surface to a single pixel format. This is more obviously necessary when we have several images and surfaces, all of different pixel formats, which makes rendering them quite slow. By converting all the surfaces, we can drastically speed up rendering times. Finally, we fill the background surface with white (255, 255, 255). These values are :firstterm:`RGB` (Red Green Blue), and can be worked out from any good paint program.h](hXWith the background, we first create a Pygame Surface object, and make it the size of the screen. We then perform the convert() operation to convert the Surface to a single pixel format. This is more obviously necessary when we have several images and surfaces, all of different pixel formats, which makes rendering them quite slow. By converting all the surfaces, we can drastically speed up rendering times. Finally, we fill the background surface with white (255, 255, 255). These values are }hjsbh emphasis)}(h:firstterm:`RGB`h]hRGB}hj sbah}(h]h] firsttermah]h]h!]uh%j hjubhE (Red Green Blue), and can be worked out from any good paint program.}hjsbeh}(h]h]h]h]h!]uh%hh'hNh)KNhhh&hubh)}(hX*With the text, we require more than one object. First, we create a font object, which defines which font to use, and the size of the font. Then we create a text object, by using the ``render`` method that belongs to our font object, supplying three arguments: the text to be rendered, whether or not it should be anti-aliased (1=yes, 0=no), and the color of the text (again in RGB format). Next we create a third text object, which gets the rectangle for the text. The easiest way to understand this is to imagine drawing a rectangle that will surround all of the text; you can then use this rectangle to get/set the position of the text on the screen. So in this example we get the rectangle, set its ``centerx`` attribute to be the ``centerx`` attribute of the background (so the text's center will be the same as the background's center, i.e. the text will be centered on the screen on the x axis). We could also set the y coordinate, but it's not any different so I left the text at the top of the screen. As the screen is small anyway, it didn't seem necessary.h](hWith the text, we require more than one object. First, we create a font object, which defines which font to use, and the size of the font. Then we create a text object, by using the }hj%sbh literal)}(h ``render``h]hrender}hj/sbah}(h]h]h]h]h!]uh%j-hj%ubhX method that belongs to our font object, supplying three arguments: the text to be rendered, whether or not it should be anti-aliased (1=yes, 0=no), and the color of the text (again in RGB format). Next we create a third text object, which gets the rectangle for the text. The easiest way to understand this is to imagine drawing a rectangle that will surround all of the text; you can then use this rectangle to get/set the position of the text on the screen. So in this example we get the rectangle, set its }hj%sbj.)}(h ``centerx``h]hcenterx}hjAsbah}(h]h]h]h]h!]uh%j-hj%ubh attribute to be the }hj%sbj.)}(h ``centerx``h]hcenterx}hjSsbah}(h]h]h]h]h!]uh%j-hj%ubhXA attribute of the background (so the text's center will be the same as the background's center, i.e. the text will be centered on the screen on the x axis). We could also set the y coordinate, but it's not any different so I left the text at the top of the screen. As the screen is small anyway, it didn't seem necessary.}hj%sbeh}(h]h]h]h]h!]uh%hh'hNh)KThhh&hubhP)}(h.. _makegames-2-3:h]h}(h]h]h]h]h!]h[ makegames-2-3uh%hOh)K}hhh&hh'hNubeh}(h](basic-pygame-objectsheh]h](2.2. basic pygame objects makegames-2-2eh]h!]uh%h9hh]h&hh'hNh)KFh}j|hsh}hhsubh:)}(hhh](h?)}(h 2.3. Blittingh]h 2.3. Blitting}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)Kbubh)}(hX@Now we have created our game objects, we need to actually render them. If we didn't and we ran the program, we'd just see a blank window, and the objects would remain invisible. The term used for rendering objects is :firstterm:`blitting`, which is where you copy the pixels belonging to said object onto the destination object. So to render the background object, you blit it onto the screen. In this example, to make things simple, we blit the text onto the background (so the background will now have a copy of the text on it), and then blit the background onto the screen.h](hNow we have created our game objects, we need to actually render them. If we didn't and we ran the program, we'd just see a blank window, and the objects would remain invisible. The term used for rendering objects is }hjsbj )}(h:firstterm:`blitting`h]hblitting}hjsbah}(h]h]jah]h]h!]uh%j hjubhXR, which is where you copy the pixels belonging to said object onto the destination object. So to render the background object, you blit it onto the screen. In this example, to make things simple, we blit the text onto the background (so the background will now have a copy of the text on it), and then blit the background onto the screen.}hjsbeh}(h]h]h]h]h!]uh%hh'hNh)Kdhjh&hubh)}(hXVBlitting is one of the slowest operations in any game, so you need to be careful not to blit too much onto the screen in every frame. If you have a background image, and a ball flying around the screen, then you could blit the background and then the ball in every frame, which would cover up the ball's previous position and render the new ball, but this would be pretty slow. A better solution is to blit the background onto the area that the ball previously occupied, which can be found by the ball's previous rectangle, and then blitting the ball, so that you are only blitting two small areas.h]hXVBlitting is one of the slowest operations in any game, so you need to be careful not to blit too much onto the screen in every frame. If you have a background image, and a ball flying around the screen, then you could blit the background and then the ball in every frame, which would cover up the ball's previous position and render the new ball, but this would be pretty slow. A better solution is to blit the background onto the area that the ball previously occupied, which can be found by the ball's previous rectangle, and then blitting the ball, so that you are only blitting two small areas.}hjsbah}(h]h]h]h]h!]uh%hh'hNh)Kjhjh&hubhP)}(h.. _makegames-2-4:h]h}(h]h]h]h]h!]h[ makegames-2-4uh%hOh)Khjh&hh'hNubeh}(h](blittingjueh]h]( 2.3. blitting makegames-2-3eh]h!]uh%h9hh]h&hh'hNh)Kbh}jjksh}jujksubh:)}(hhh](h?)}(h2.4. The event looph]h2.4. The event loop}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)Ktubh)}(hXOnce you've set the game up, you need to put it into a loop so that it will continuously run until the user signals that he/she wants to exit. So you start an open ``while`` loop, and then for each iteration of the loop, which will be each frame of the game, update the game. The first thing is to check for any Pygame events, which will be the user hitting the keyboard, clicking a mouse button, moving a joystick, resizing the window, or trying to close it. In this case, we simply want to watch out for for user trying to quit the game by closing the window, in which case the game should ``return``, which will end the ``while`` loop. Then we simply need to re-blit the background, and flip (update) the display to have everything drawn. OK, as nothing moves or happens in this example, we don't strictly speaking need to re-blit the background in every iteration, but I put it in because when things are moving around on the screen, you will need to do all your blitting here.h](hOnce you've set the game up, you need to put it into a loop so that it will continuously run until the user signals that he/she wants to exit. So you start an open }hjsbj.)}(h ``while``h]hwhile}hjsbah}(h]h]h]h]h!]uh%j-hjubhX loop, and then for each iteration of the loop, which will be each frame of the game, update the game. The first thing is to check for any Pygame events, which will be the user hitting the keyboard, clicking a mouse button, moving a joystick, resizing the window, or trying to close it. In this case, we simply want to watch out for for user trying to quit the game by closing the window, in which case the game should }hjsbj.)}(h ``return``h]hreturn}hjsbah}(h]h]h]h]h!]uh%j-hjubh, which will end the }hjsbj.)}(h ``while``h]hwhile}hjsbah}(h]h]h]h]h!]uh%j-hjubhX] loop. Then we simply need to re-blit the background, and flip (update) the display to have everything drawn. OK, as nothing moves or happens in this example, we don't strictly speaking need to re-blit the background in every iteration, but I put it in because when things are moving around on the screen, you will need to do all your blitting here.}hjsbeh}(h]h]h]h]h!]uh%hh'hNh)Kvhjh&hubhP)}(h.. _makegames-2-5:h]h}(h]h]h]h]h!]h[ makegames-2-5uh%hOh)Khjh&hh'hNubeh}(h](the-event-loopjeh]h](2.4. the event loop makegames-2-4eh]h!]uh%h9hh]h&hh'hNh)Kth}j<jsh}jjsubh:)}(hhh](h?)}(h 2.5. Ta-da!h]h 2.5. Ta-da!}hjDsbah}(h]h]h]h]h!]uh%h>hjAh&hh'hNh)Kubh)}(hX@And that's it - your most basic Pygame game! All games will take a form similar to this, but with lots more code for the actual game functions themselves, which are more to do your with programming, and less guided in structure by the workings of Pygame. This is what this tutorial is really about, and will now go onto.h]hX@And that's it - your most basic Pygame game! All games will take a form similar to this, but with lots more code for the actual game functions themselves, which are more to do your with programming, and less guided in structure by the workings of Pygame. This is what this tutorial is really about, and will now go onto.}hjRsbah}(h]h]h]h]h!]uh%hh'hNh)KhjAh&hubeh}(h](ta-daj5eh]h]( 2.5. ta-da! makegames-2-5eh]h!]uh%h9hh]h&hh'hNh)Kh}jfj+sh}j5j+subeh}(h](h\id1eh]h]( 2. revision: pygame fundamentals makegames-2eh]h!]uh%h9hh;h&hh'hNh)K h}jqhQsh}h\hQsubeh}(h]revision-pygame-fundamentalsah]h]revision: pygame fundamentalsah]h!]uh%h9hhh&hh'hNh)Kubeh}(h]h]h]h]h!]sourcehNtranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h\]hQahx]hnah]haju]jkaj]jaj5]j+aunameids}(j{jxjqh\jpjmhhxhhj|hj{jxjjujjj<jj;j8jfj5jejbu nametypes}(j{jqjph܈hۉj|j{jjj<j;jfjeuh}(jxh;h\h]jmh]hxhyhhyhhjxhjujjjjjj8jj5jAjbjAu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](h system_message)}(hhh]h)}(hhh]h1Hyperlink target "makegames-2" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypeINFOsourcehNlineK'uh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-2-1" is not referenced.}hj1sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]levelKtypej+sourcehNlineK,uh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-2-2" is not referenced.}hjKsbah}(h]h]h]h]h!]uh%hhjHubah}(h]h]h]h]h!]levelKtypej+sourcehNlineKauh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-2-3" is not referenced.}hjesbah}(h]h]h]h]h!]uh%hhjbubah}(h]h]h]h]h!]levelKtypej+sourcehNlineK}uh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-2-4" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]levelKtypej+sourcehNlineKuh%jubj)}(hhh]h)}(hhh]h3Hyperlink target "makegames-2-5" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypej+sourcehNlineKuh%jube transformerN include_log]docs/reST/tut/tom_games2.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.6931405 pygame-2.6.1/docs/generated/doctrees/tut/tom_games3.doctree0000644000175100001770000004154214676242422023345 0ustar00runnerdockerWCsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hKicking things offh]hKicking things off}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'hh]h&hh'hNh)K ubh paragraph)}(hXThe first sections of code are relatively simple, and, once written, can usually be reused in every game you consequently make. They will do all of the boring, generic tasks like loading modules, loading images, opening networking connections, playing music, and so on. They will also include some simple but effective error handling, and any customisation you wish to provide on top of functions provided by modules like ``sys`` and ``pygame``.h](hXThe first sections of code are relatively simple, and, once written, can usually be reused in every game you consequently make. They will do all of the boring, generic tasks like loading modules, loading images, opening networking connections, playing music, and so on. They will also include some simple but effective error handling, and any customisation you wish to provide on top of functions provided by modules like }hhpsbh literal)}(h``sys``h]hsys}hhzsbah}(h]h]h]h]h!]uh%hxhhpubh and }hhpsbhy)}(h ``pygame``h]hpygame}hhsbah}(h]h]h]h]h!]uh%hxhhpubh.}hhpsbeh}(h]h]h]h]h!]uh%hnh'hNh)Khh]h&hubhP)}(h.. _makegames-3-1:h]h}(h]h]h]h]h!]h[ makegames-3-1uh%hOh)K2hh]h&hh'hNubh:)}(hhh](h?)}(h)3.1. The first lines, and loading modulesh]h)3.1. The first lines, and loading modules}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'hNh)Kubho)}(hX First off, you need to start off your game and load up your modules. It's always a good idea to set a few things straight at the top of the main source file, such as the name of the file, what it contains, the license it is under, and any other helpful info you might want to give those who will be looking at it. Then you can load modules, with some error checking so that Python doesn't print out a nasty traceback, which non-programmers won't understand. The code is fairly simple, so I won't bother explaining any of it::h]hX First off, you need to start off your game and load up your modules. It's always a good idea to set a few things straight at the top of the main source file, such as the name of the file, what it contains, the license it is under, and any other helpful info you might want to give those who will be looking at it. Then you can load modules, with some error checking so that Python doesn't print out a nasty traceback, which non-programmers won't understand. The code is fairly simple, so I won't bother explaining any of it:}hhsbah}(h]h]h]h]h!]uh%hnh'hNh)Khhh&hubh literal_block)}(hX#!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError as err: print(f"couldn't load module. {err}") sys.exit(2)h]hX#!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError as err: print(f"couldn't load module. {err}") sys.exit(2)}hhsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)Khhh&hubhP)}(h.. _makegames-3-2:h]h}(h]h]h]h]h!]h[ makegames-3-2uh%hOh)KThhh&hh'hNubeh}(h](#the-first-lines-and-loading-modulesheh]h]()3.1. the first lines, and loading modules makegames-3-1eh]h!]uh%h9hh]h&hh'hNh)Kexpect_referenced_by_name}hhsexpect_referenced_by_id}hhsubh:)}(hhh](h?)}(h 3.2. Resource handling functionsh]h 3.2. Resource handling functions}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'hNh)K9ubho)}(hXIn the :doc:`Line By Line Chimp ` example, the first code to be written was for loading images and sounds. As these were totally independent of any game logic or game objects, they were written as separate functions, and were written first so that later code could make use of them. I generally put all my code of this nature first, in their own, classless functions; these will, generally speaking, be resource handling functions. You can of course create classes for these, so that you can group them together, and maybe have an object with which you can control all of your resources. As with any good programming environment, it's up to you to develop your own best practice and style.h](hIn the }hjsbh pending_xref)}(h+:doc:`Line By Line Chimp `h]h inline)}(hjh]hLine By Line Chimp}hjsbah}(h]h](xrefstdstd-doceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoctut/tom_games3 refdomainj"reftypedoc refexplicitrefwarn reftargetChimpLineByLineuh%jh'hNh)K;hjubhX example, the first code to be written was for loading images and sounds. As these were totally independent of any game logic or game objects, they were written as separate functions, and were written first so that later code could make use of them. I generally put all my code of this nature first, in their own, classless functions; these will, generally speaking, be resource handling functions. You can of course create classes for these, so that you can group them together, and maybe have an object with which you can control all of your resources. As with any good programming environment, it's up to you to develop your own best practice and style.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)K;hhh&hubho)}(hXIt's always a good idea to write your own resource handling functions, because although Pygame has methods for opening images and sounds, and other modules will have their methods of opening other resources, those methods can take up more than one line, they can require consistent modification by yourself, and they often don't provide satisfactory error handling. Writing resource handling functions gives you sophisticated, reusable code, and gives you more control over your resources. Take this example of an image loading function::h]hXIt's always a good idea to write your own resource handling functions, because although Pygame has methods for opening images and sounds, and other modules will have their methods of opening other resources, those methods can take up more than one line, they can require consistent modification by yourself, and they often don't provide satisfactory error handling. Writing resource handling functions gives you sophisticated, reusable code, and gives you more control over your resources. Take this example of an image loading function:}hj@sbah}(h]h]h]h]h!]uh%hnh'hNh)KBhhh&hubh)}(hXdef load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect()h]hXdef load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect()}hjNsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)KHhhh&hubho)}(hXHere we make a more sophisticated image loading function than the one provided by :func:`pygame.image.load`. Note that the first line of the function is a documentation string describing what the function does, and what object(s) it returns. The function assumes that all of your images are in a directory called data, and so it takes the filename and creates the full pathname, for example ``data/ball.png``, using the :citetitle:`os` module to ensure cross-platform compatibility. Then it tries to load the image, and convert any alpha regions so you can achieve transparency, and it returns a more human-readable error if there's a problem. Finally it returns the image object, and its :class:`rect `.h](hRHere we make a more sophisticated image loading function than the one provided by }hj\sbj)}(h:func:`pygame.image.load`h]hy)}(hjfh]hpygame.image.load()}hjhsbah}(h]h](j!pypy-funceh]h]h!]uh%hxhjdubah}(h]h]h]h]h!]refdocj. refdomainjrreftypefunc refexplicitrefwarn py:moduleNpy:classNj4pygame.image.loaduh%jh'hNh)KVhj\ubhX. Note that the first line of the function is a documentation string describing what the function does, and what object(s) it returns. The function assumes that all of your images are in a directory called data, and so it takes the filename and creates the full pathname, for example }hj\sbhy)}(h``data/ball.png``h]h data/ball.png}hjsbah}(h]h]h]h]h!]uh%hxhj\ubh , using the }hj\sbh emphasis)}(h:citetitle:`os`h]hos}hjsbah}(h]h] citetitleah]h]h!]uh%jhj\ubh module to ensure cross-platform compatibility. Then it tries to load the image, and convert any alpha regions so you can achieve transparency, and it returns a more human-readable error if there's a problem. Finally it returns the image object, and its }hj\sbj)}(h:class:`rect `h]hy)}(hjh]hrect}hjsbah}(h]h](j!pypy-classeh]h]h!]uh%hxhjubah}(h]h]h]h]h!]refdocj. refdomainjreftypeclass refexplicitrefwarnjNjNj4 pygame.Rectuh%jh'hNh)KVhj\ubh.}hj\sbeh}(h]h]h]h]h!]uh%hnh'hNh)KVhhh&hubho)}(hXYou can make similar functions for loading any other resources, such as loading sounds. You can also make resource handling classes, to give you more flexibility with more complex resources. For example, you could make a music class, with an ``__init__`` function that loads the sound (perhaps borrowing from a ``load_sound()`` function), a function to pause the music, and a function to restart. Another handy resource handling class is for network connections. Functions to open sockets, pass data with suitable security and error checking, close sockets, finger addresses, and other network tasks, can make writing a game with network capabilities relatively painless.h](hYou can make similar functions for loading any other resources, such as loading sounds. You can also make resource handling classes, to give you more flexibility with more complex resources. For example, you could make a music class, with an }hjsbhy)}(h ``__init__``h]h__init__}hjsbah}(h]h]h]h]h!]uh%hxhjubh9 function that loads the sound (perhaps borrowing from a }hjsbhy)}(h``load_sound()``h]h load_sound()}hjsbah}(h]h]h]h]h!]uh%hxhjubhXX function), a function to pause the music, and a function to restart. Another handy resource handling class is for network connections. Functions to open sockets, pass data with suitable security and error checking, close sockets, finger addresses, and other network tasks, can make writing a game with network capabilities relatively painless.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)K]hhh&hubho)}(hXRemember the chief task of these functions/classes is to ensure that by the time you get around to writing game object classes, and the main loop, there's almost nothing left to do. Class inheritance can make these basic classes especially handy. Don't go overboard though; functions which will only be used by one class should be written as part of that class, not as a global function.h]hXRemember the chief task of these functions/classes is to ensure that by the time you get around to writing game object classes, and the main loop, there's almost nothing left to do. Class inheritance can make these basic classes especially handy. Don't go overboard though; functions which will only be used by one class should be written as part of that class, not as a global function.}hj sbah}(h]h]h]h]h!]uh%hnh'hNh)Kdhhh&hubeh}(h](resource-handling-functionsheh]h]( 3.2. resource handling functions makegames-3-2eh]h!]uh%h9hh]h&hh'hNh)K9h}j!hsh}hhsubeh}(h](h\id1eh]h](3. kicking things off makegames-3eh]h!]uh%h9hh;h&hh'hNh)K h}j,hQsh}h\hQsubeh}(h]kicking-things-offah]h]kicking things offah]h!]uh%h9hhh&hh'hNh)Kubeh}(h]h]h]h]h!]sourcehNtranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjcerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h\]hQah]hah]haunameids}(j6j3j,h\j+j(hhhhj!hj ju nametypes}(j6j,j+hhj!j uh}(j3h;h\h]j(h]hhhhhhjhu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jqKsRparse_messages]transform_messages](h system_message)}(hhh]ho)}(hhh]h1Hyperlink target "makegames-3" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypeINFOsourcehNlineK'uh%jubj)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-3-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypejsourcehNlineK2uh%jubj)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-3-2" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypejsourcehNlineKTuh%jube transformerN include_log]docs/reST/tut/tom_games3.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7081404 pygame-2.6.1/docs/generated/doctrees/tut/tom_games4.doctree0000644000175100001770000005616714676242422023357 0ustar00runnerdockerl\sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hGame object classesh]hGame object classes}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'hh]h&hh'hNh)K ubh paragraph)}(hXOnce you've loaded your modules, and written your resource handling functions, you'll want to get on to writing some game objects. The way this is done is fairly simple, though it can seem complex at first. You write a class for each type of object in the game, and then create an instance of those classes for the objects. You can then use those classes' methods to manipulate the objects, giving objects some motion and interactive capabilities. So your game, in pseudo-code, will look like this::h]hXOnce you've loaded your modules, and written your resource handling functions, you'll want to get on to writing some game objects. The way this is done is fairly simple, though it can seem complex at first. You write a class for each type of object in the game, and then create an instance of those classes for the objects. You can then use those classes' methods to manipulate the objects, giving objects some motion and interactive capabilities. So your game, in pseudo-code, will look like this:}hhpsbah}(h]h]h]h]h!]uh%hnh'hNh)Khh]h&hubh literal_block)}(hX#!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update()h]hX#!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update()}hhsbah}(h]h]h]h]h!]h#h$uh%h~h'hNh)Khh]h&hubho)}(hXThis is, of course, a very simple example, and you'd need to put in all the code, instead of those little bracketed comments. But you should get the basic idea. You create a class, into which you put all the functions for a ball, including ``__init__``, which would create all the ball's attributes, and ``update``, which would move the ball to its new position, before blitting it onto the screen in this position.h](hThis is, of course, a very simple example, and you'd need to put in all the code, instead of those little bracketed comments. But you should get the basic idea. You create a class, into which you put all the functions for a ball, including }hhsbh literal)}(h ``__init__``h]h__init__}hhsbah}(h]h]h]h]h!]uh%hhhubh4, which would create all the ball's attributes, and }hhsbh)}(h ``update``h]hupdate}hhsbah}(h]h]h]h]h!]uh%hhhubhe, which would move the ball to its new position, before blitting it onto the screen in this position.}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)K*hh]h&hubho)}(hXYou can then create more classes for all of your other game objects, and then create instances of them so that you can handle them easily in the ``main`` function and the main program loop. Contrast this with initiating the ball in the ``main`` function, and then having lots of classless functions to manipulate a set ball object, and you'll hopefully see why using classes is an advantage: It allows you to put all of the code for each object in one place; it makes using objects easier; it makes adding new objects, and manipulating them, more flexible. Rather than adding more code for each new ball object, you could simply create new instances of the ``Ball`` class for each new ball object. Magic!h](hYou can then create more classes for all of your other game objects, and then create instances of them so that you can handle them easily in the }hhsbh)}(h``main``h]hmain}hhsbah}(h]h]h]h]h!]uh%hhhubhS function and the main program loop. Contrast this with initiating the ball in the }hhsbh)}(h``main``h]hmain}hhsbah}(h]h]h]h]h!]uh%hhhubhX function, and then having lots of classless functions to manipulate a set ball object, and you'll hopefully see why using classes is an advantage: It allows you to put all of the code for each object in one place; it makes using objects easier; it makes adding new objects, and manipulating them, more flexible. Rather than adding more code for each new ball object, you could simply create new instances of the }hhsbh)}(h``Ball``h]hBall}hhsbah}(h]h]h]h]h!]uh%hhhubh' class for each new ball object. Magic!}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)K/hh]h&hubhP)}(h.. _makegames-4-1:h]h}(h]h]h]h]h!]h[ makegames-4-1uh%hOh)KUhh]h&hh'hNubh:)}(hhh](h?)}(h4.1. A simple ball classh]h4.1. A simple ball class}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)K:ubho)}(hHere is a simple class with the functions necessary for creating a ball object that will, if the ``update`` function is called in the main loop, move across the screen::h](haHere is a simple class with the functions necessary for creating a ball object that will, if the }hj"sbh)}(h ``update``h]hupdate}hj*sbah}(h]h]h]h]h!]uh%hhj"ubh= function is called in the main loop, move across the screen:}hj"sbeh}(h]h]h]h]h!]uh%hnh'hNh)Khjh&hh'hNh)K`ubho)}(hXThe other reason for creating a class for each object is sprites. Each image you render in your game will be a sprite object, and so to begin with, the class for each object should inherit the :class:`Sprite ` class. This is a really nice feature of Python - class inheritance. Now the ``Ball`` class has all of the functions that come with the ``Sprite`` class, and any object instances of the ``Ball`` class will be registered by Pygame as sprites. Whereas with text and the background, which don't move, it's OK to blit the object onto the background, Pygame handles sprite objects in a different manner, which you'll see when we look at the whole program's code.h](hThe other reason for creating a class for each object is sprites. Each image you render in your game will be a sprite object, and so to begin with, the class for each object should inherit the }hjsbh pending_xref)}(h&:class:`Sprite `h]h)}(hjh]hSprite}hjsbah}(h]h](xrefpypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoctut/tom_games4 refdomainjreftypeclass refexplicitrefwarn py:moduleNpy:classN reftargetpygame.sprite.Spriteuh%jh'hNh)KbhjubhM class. This is a really nice feature of Python - class inheritance. Now the }hjsbh)}(h``Ball``h]hBall}hjsbah}(h]h]h]h]h!]uh%hhjubh3 class has all of the functions that come with the }hjsbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhjubh( class, and any object instances of the }hjsbh)}(h``Ball``h]hBall}hjsbah}(h]h]h]h]h!]uh%hhjubhX class will be registered by Pygame as sprites. Whereas with text and the background, which don't move, it's OK to blit the object onto the background, Pygame handles sprite objects in a different manner, which you'll see when we look at the whole program's code.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)Kbhjh&hubho)}(hXBasically, you create both a ball object, and a sprite object for that ball, and you then call the ball's update function on the sprite object, thus updating the sprite. Sprites also give you sophisticated ways of determining if two objects have collided. Normally you might just check in the main loop to see if their rectangles overlap, but that would involve a lot of code, which would be a waste because the ``Sprite`` class provides two functions (``spritecollide`` and ``groupcollide``) to do this for you.h](hXBasically, you create both a ball object, and a sprite object for that ball, and you then call the ball's update function on the sprite object, thus updating the sprite. Sprites also give you sophisticated ways of determining if two objects have collided. Normally you might just check in the main loop to see if their rectangles overlap, but that would involve a lot of code, which would be a waste because the }hj1sbh)}(h ``Sprite``h]hSprite}hj9sbah}(h]h]h]h]h!]uh%hhj1ubh class provides two functions (}hj1sbh)}(h``spritecollide``h]h spritecollide}hjKsbah}(h]h]h]h]h!]uh%hhj1ubh and }hj1sbh)}(h``groupcollide``h]h groupcollide}hj]sbah}(h]h]h]h]h!]uh%hhj1ubh) to do this for you.}hj1sbeh}(h]h]h]h]h!]uh%hnh'hNh)Kjhjh&hubhP)}(h.. _makegames-4-1-2:h]h}(h]h]h]h]h!]h[makegames-4-1-2uh%hOh)Khjh&hh'hNubeh}(h](diversion-1-spritesjeh]h](4.1.1. diversion 1: spritesmakegames-4-1-1eh]h!]uh%h9hjh&hh'hNh)K`expect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh:)}(hhh](h?)}(h"4.1.2. Diversion 2: Vector physicsh]h"4.1.2. Diversion 2: Vector physics}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)Ktubho)}(hX^Other than the structure of the ``Ball`` class, the notable thing about this code is the vector physics, used to calculate the ball's movement. With any game involving angular movement, you won't get very far unless you're comfortable with trigonometry, so I'll just introduce the basics you need to know to make sense of the ``calcnewpos`` function.h](h Other than the structure of the }hjsbh)}(h``Ball``h]hBall}hjsbah}(h]h]h]h]h!]uh%hhjubhX class, the notable thing about this code is the vector physics, used to calculate the ball's movement. With any game involving angular movement, you won't get very far unless you're comfortable with trigonometry, so I'll just introduce the basics you need to know to make sense of the }hjsbh)}(h``calcnewpos``h]h calcnewpos}hjsbah}(h]h]h]h]h!]uh%hhjubh function.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)Kvhjh&hubho)}(hXTo begin with, you'll notice that the ball has an attribute ``vector``, which is made up of ``angle`` and ``z``. The angle is measured in radians, and will give you the direction in which the ball is moving. Z is the speed at which the ball moves. So by using this vector, we can determine the direction and speed of the ball, and therefore how much it will move on the x and y axes:h](hN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h\]hQaj]jaj]jaj]juaunameids}(jjjh\jjjjjjjjjjjzjjyjvu nametypes}(jjjjjjjjzjyuh}(jh;h\h]jh]jjjjjjjjjjjvju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](h system_message)}(hhh]ho)}(hhh]h1Hyperlink target "makegames-4" is not referenced.}hj3sbah}(h]h]h]h]h!]uh%hnhj0ubah}(h]h]h]h]h!]levelKtypeINFOsourcehNlineK'uh%j.ubj/)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-4-1" is not referenced.}hjNsbah}(h]h]h]h]h!]uh%hnhjKubah}(h]h]h]h]h!]levelKtypejHsourcehNlineKUuh%j.ubj/)}(hhh]ho)}(hhh]h5Hyperlink target "makegames-4-1-1" is not referenced.}hjhsbah}(h]h]h]h]h!]uh%hnhjeubah}(h]h]h]h]h!]levelKtypejHsourcehNlineK{uh%j.ubj/)}(hhh]ho)}(hhh]h5Hyperlink target "makegames-4-1-2" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypejHsourcehNlineKuh%j.ube transformerN include_log]docs/reST/tut/tom_games4.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7221403 pygame-2.6.1/docs/generated/doctrees/tut/tom_games5.doctree0000644000175100001770000005054514676242422023352 0ustar00runnerdockerZQsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hUser-controllable objectsh]hUser-controllable objects}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'hh]h&hh'hNh)K ubh paragraph)}(hXSo far you can create a Pygame window, and render a ball that will fly across the screen. The next step is to make some bats which the user can control. This is potentially far more simple than the ball, because it requires no physics (unless your user-controlled object will move in ways more complex than up and down, e.g. a platform character like Mario, in which case you'll need more physics). User-controllable objects are pretty easy to create, thanks to Pygame's event queue system, as you'll see.h]hXSo far you can create a Pygame window, and render a ball that will fly across the screen. The next step is to make some bats which the user can control. This is potentially far more simple than the ball, because it requires no physics (unless your user-controlled object will move in ways more complex than up and down, e.g. a platform character like Mario, in which case you'll need more physics). User-controllable objects are pretty easy to create, thanks to Pygame's event queue system, as you'll see.}hhpsbah}(h]h]h]h]h!]uh%hnh'hNh)K hh]h&hubhP)}(h.. _makegames-5-1:h]h}(h]h]h]h]h!]h[ makegames-5-1uh%hOh)K0hh]h&hh'hNubh:)}(hhh](h?)}(h5.1. A simple bat classh]h5.1. A simple bat class}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'hNh)Kubho)}(hX~The principle behind the bat class is similar to that of the ball class. You need an ``__init__`` function to initialise the ball (so you can create object instances for each bat), an ``update`` function to perform per-frame changes on the bat before it is blitted the bat to the screen, and the functions that will define what this class will actually do. Here's some sample code::h](hUThe principle behind the bat class is similar to that of the ball class. You need an }hhsbh literal)}(h ``__init__``h]h__init__}hhsbah}(h]h]h]h]h!]uh%hhhubhW function to initialise the ball (so you can create object instances for each bat), an }hhsbh)}(h ``update``h]hupdate}hhsbah}(h]h]h]h]h!]uh%hhhubh function to perform per-frame changes on the bat before it is blitted the bat to the screen, and the functions that will define what this class will actually do. Here's some sample code:}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)Khhh&hubh literal_block)}(hXyclass Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown"h]hXyclass Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown"}hhsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)Khhh&hubho)}(hXAs you can see, this class is very similar to the ball class in its structure. But there are differences in what each function does. First of all, there is a reinit function, which is used when a round ends, and the bat needs to be set back in its starting place, with any attributes set back to their necessary values. Next, the way in which the bat is moved is a little more complex than with the ball, because here its movement is simple (up/down), but it relies on the user telling it to move, unlike the ball which just keeps moving in every frame. To make sense of how the bat moves, it is helpful to look at a quick diagram to show the sequence of events:h]hXAs you can see, this class is very similar to the ball class in its structure. But there are differences in what each function does. First of all, there is a reinit function, which is used when a round ends, and the bat needs to be set back in its starting place, with any attributes set back to their necessary values. Next, the way in which the bat is moved is a little more complex than with the ball, because here its movement is simple (up/down), but it relies on the user telling it to move, unlike the ball which just keeps moving in every frame. To make sense of how the bat moves, it is helpful to look at a quick diagram to show the sequence of events:}hhsbah}(h]h]h]h]h!]uh%hnh'hNh)KAhhh&hubh image)}(h#.. image:: tom_event-flowchart.png h]h}(h]h]h]h]h!]uritut/tom_event-flowchart.png candidates}*hs original_uritom_event-flowchart.pnguh%hh'hNh)KGhhh&hubho)}(hXWhat happens here is that the person controlling the bat pushes down on the key that moves the bat up. For each iteration of the main game loop (for every frame), if the key is still held down, then the ``state`` attribute of that bat object will be set to "moving", and the ``moveup`` function will be called, causing the ball's y position to be reduced by the value of the ``speed`` attribute (in this example, 10). In other words, so long as the key is held down, the bat will move up the screen by 10 pixels per frame. The ``state`` attribute isn't used here yet, but it's useful to know if you're dealing with spin, or would like some useful debugging output.h](hWhat happens here is that the person controlling the bat pushes down on the key that moves the bat up. For each iteration of the main game loop (for every frame), if the key is still held down, then the }hhsbh)}(h ``state``h]hstate}hjsbah}(h]h]h]h]h!]uh%hhhubh? attribute of that bat object will be set to "moving", and the }hhsbh)}(h ``moveup``h]hmoveup}hjsbah}(h]h]h]h]h!]uh%hhhubhZ function will be called, causing the ball's y position to be reduced by the value of the }hhsbh)}(h ``speed``h]hspeed}hj+sbah}(h]h]h]h]h!]uh%hhhubh attribute (in this example, 10). In other words, so long as the key is held down, the bat will move up the screen by 10 pixels per frame. The }hhsbh)}(h ``state``h]hstate}hj=sbah}(h]h]h]h]h!]uh%hhhubh attribute isn't used here yet, but it's useful to know if you're dealing with spin, or would like some useful debugging output.}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)KIhhh&hubho)}(hXlAs soon as the player lets go of that key, the second set of boxes is invoked, and the ``state`` attribute of the bat object will be set back to "still", and the ``movepos`` attribute will be set back to [0,0], meaning that when the ``update`` function is called, it won't move the bat any more. So when the player lets go of the key, the bat stops moving. Simple!h](hWAs soon as the player lets go of that key, the second set of boxes is invoked, and the }hjUsbh)}(h ``state``h]hstate}hj]sbah}(h]h]h]h]h!]uh%hhjUubhB attribute of the bat object will be set back to "still", and the }hjUsbh)}(h ``movepos``h]hmovepos}hjosbah}(h]h]h]h]h!]uh%hhjUubh< attribute will be set back to [0,0], meaning that when the }hjUsbh)}(h ``update``h]hupdate}hjsbah}(h]h]h]h]h!]uh%hhjUubhy function is called, it won't move the bat any more. So when the player lets go of the key, the bat stops moving. Simple!}hjUsbeh}(h]h]h]h]h!]uh%hnh'hNh)KPhhh&hubhP)}(h.. _makegames-5-1-1:h]h}(h]h]h]h]h!]h[makegames-5-1-1uh%hOh)Krhhh&hh'hNubh:)}(hhh](h?)}(h!5.1.1. Diversion 3: Pygame eventsh]h!5.1.1. Diversion 3: Pygame events}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)KWubho)}(hXSo how do we know when the player is pushing keys down, and then releasing them? With the Pygame event queue system, dummy! It's a really easy system to use and understand, so this shouldn't take long :) You've already seen the event queue in action in the basic Pygame program, where it was used to check if the user was quitting the application. The code for moving the bat is about as simple as that::h]hXSo how do we know when the player is pushing keys down, and then releasing them? With the Pygame event queue system, dummy! It's a really easy system to use and understand, so this shouldn't take long :) You've already seen the event queue in action in the basic Pygame program, where it was used to check if the user was quitting the application. The code for moving the bat is about as simple as that:}hjsbah}(h]h]h]h]h!]uh%hnh'hNh)KYhjh&hubh)}(hX{for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still"h]hX{for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still"}hjsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)K^hjh&hubho)}(hX Here assume that you've already created an instance of a bat, and called the object ``player``. You can see the familiar layout of the ``for`` structure, which iterates through each event found in the Pygame event queue, which is retrieved with the :mod:`event.get() ` function. As the user hits keys, pushes mouse buttons and moves the joystick about, those actions are pumped into the Pygame event queue, and left there until dealt with. So in each iteration of the main game loop, you go through these events, checking if they're ones you want to deal with, and then dealing with them appropriately. The :func:`event.pump() ` function that was in the ``Bat.update`` function is then called in every iteration to pump out old events, and keep the queue current.h](hTHere assume that you've already created an instance of a bat, and called the object }hjsbh)}(h ``player``h]hplayer}hjsbah}(h]h]h]h]h!]uh%hhjubh). You can see the familiar layout of the }hjsbh)}(h``for``h]hfor}hjsbah}(h]h]h]h]h!]uh%hhjubhk structure, which iterates through each event found in the Pygame event queue, which is retrieved with the }hjsbh pending_xref)}(h%:mod:`event.get() `h]h)}(hjh]h event.get()}hjsbah}(h]h](xrefpypy-modeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoctut/tom_games5 refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classN reftargetpygame.event.getuh%jh'hNh)KkhjubhXS function. As the user hits keys, pushes mouse buttons and moves the joystick about, those actions are pumped into the Pygame event queue, and left there until dealt with. So in each iteration of the main game loop, you go through these events, checking if they're ones you want to deal with, and then dealing with them appropriately. The }hjsbj)}(h(:func:`event.pump() `h]h)}(hj*h]h event.pump()}hj,sbah}(h]h](j pypy-funceh]h]h!]uh%hhj(ubah}(h]h]h]h]h!]refdocj refdomainj6reftypefunc refexplicitrefwarnj Nj!Nj"pygame.event.pumpuh%jh'hNh)Kkhjubh function that was in the }hjsbh)}(h``Bat.update``h]h Bat.update}hjLsbah}(h]h]h]h]h!]uh%hhjubh_ function is then called in every iteration to pump out old events, and keep the queue current.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)Kkhjh&hubho)}(hXpFirst we check if the user is quitting the program, and quit it if they are. Then we check if any keys are being pushed down, and if they are, we check if they're the designated keys for moving the bat up and down. If they are, then we call the appropriate moving function, and set the player state appropriately (though the states moveup and movedown and changed in the ``moveup()`` and ``movedown()`` functions, which makes for neater code, and doesn't break *encapsulation*, which means that you assign attributes to the object itself, without referring to the name of the instance of that object). Notice here we have three states: still, moveup, and movedown. Again, these come in handy if you want to debug or calculate spin. We also check if any keys have been "let go" (i.e. are no longer being held down), and again if they're the right keys, we stop the bat from moving.h](hXsFirst we check if the user is quitting the program, and quit it if they are. Then we check if any keys are being pushed down, and if they are, we check if they're the designated keys for moving the bat up and down. If they are, then we call the appropriate moving function, and set the player state appropriately (though the states moveup and movedown and changed in the }hjdsbh)}(h ``moveup()``h]hmoveup()}hjlsbah}(h]h]h]h]h!]uh%hhjdubh and }hjdsbh)}(h``movedown()``h]h movedown()}hj~sbah}(h]h]h]h]h!]uh%hhjdubh; functions, which makes for neater code, and doesn't break }hjdsbh emphasis)}(h*encapsulation*h]h encapsulation}hjsbah}(h]h]h]h]h!]uh%jhjdubhX, which means that you assign attributes to the object itself, without referring to the name of the instance of that object). Notice here we have three states: still, moveup, and movedown. Again, these come in handy if you want to debug or calculate spin. We also check if any keys have been "let go" (i.e. are no longer being held down), and again if they're the right keys, we stop the bat from moving.}hjdsbeh}(h]h]h]h]h!]uh%hnh'hNh)Kshjh&hubeh}(h](diversion-3-pygame-eventsjeh]h](!5.1.1. diversion 3: pygame eventsmakegames-5-1-1eh]h!]uh%h9hhh&hh'hNh)KWexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubeh}(h](a-simple-bat-classheh]h](5.1. a simple bat class makegames-5-1eh]h!]uh%h9hh]h&hh'hNh)Kj}jh~sj}hh~subeh}(h](h\id1eh]h](5. user-controllable objects makegames-5eh]h!]uh%h9hh;h&hh'hNh)K j}jhQsj}h\hQsubeh}(h]user-controllable-objectsah]h]user-controllable objectsah]h!]uh%h9hhh&hh'hNh)Kubeh}(h]h]h]h]h!]sourcehNtranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h\]hQah]h~aj]jaunameids}(jjjh\jjjhjjjjjju nametypes}(jjjjjjjuh}(jh;h\h]jh]hhjhjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages](h system_message)}(hhh]ho)}(hhh]h1Hyperlink target "makegames-5" is not referenced.}hjjsbah}(h]h]h]h]h!]uh%hnhjgubah}(h]h]h]h]h!]levelKtypeINFOsourcehNlineK%uh%jeubjf)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-5-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypejsourcehNlineK0uh%jeubjf)}(hhh]ho)}(hhh]h5Hyperlink target "makegames-5-1-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypejsourcehNlineKruh%jeube transformerN include_log]docs/reST/tut/tom_games5.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7361405 pygame-2.6.1/docs/generated/doctrees/tut/tom_games6.doctree0000644000175100001770000010673714676242422023360 0ustar00runnerdockerԍsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h Common definitions for tutorialsh]h Text Common definitions for tutorials}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/tut/common.txtlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hPutting it all togetherh]hPutting it all together}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'hh]h&hh'hNh)K ubh paragraph)}(hXSSo far you've learnt all the basics necessary to build a simple game. You should understand how to create Pygame objects, how Pygame displays objects, how it handles events, and how you can use physics to introduce some motion into your game. Now I'll just show how you can take all those chunks of code and put them together into a working game. What we need first is to let the ball hit the sides of the screen, and for the bat to be able to hit the ball, otherwise there's not going to be much gameplay involved. We do this using Pygame's :meth:`collision ` methods.h](hXSo far you've learnt all the basics necessary to build a simple game. You should understand how to create Pygame objects, how Pygame displays objects, how it handles events, and how you can use physics to introduce some motion into your game. Now I'll just show how you can take all those chunks of code and put them together into a working game. What we need first is to let the ball hit the sides of the screen, and for the bat to be able to hit the ball, otherwise there's not going to be much gameplay involved. We do this using Pygame's }hhpsbh pending_xref)}(h,:meth:`collision `h]h literal)}(hh|h]h collision}hhsbah}(h]h](xrefpypy-metheh]h]h!]uh%h~hhzubah}(h]h]h]h]h!]refdoctut/tom_games6 refdomainhreftypemeth refexplicitrefwarn py:moduleNpy:classN reftargetpygame.Rect.collidepointuh%hxh'hNh)K hhpubh methods.}hhpsbeh}(h]h]h]h]h!]uh%hnh'hNh)K hh]h&hubhP)}(h.. _makegames-6-1:h]h}(h]h]h]h]h!]h[ makegames-6-1uh%hOh)K1hh]h&hh'hNubh:)}(hhh](h?)}(h6.1. Let the ball hit sidesh]h6.1. Let the ball hit sides}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'hNh)Kubho)}(hXThe basic principle behind making it bounce of the sides is easy to grasp. You grab the coordinates of the four corners of the ball, and check to see if they correspond with the x or y coordinate of the edge of the screen. So if the top right and top left corners both have a y coordinate of zero, you know that the ball is currently on the top edge of the screen. We do all this in the ``update`` function, after we've worked out the new position of the ball.h](hXThe basic principle behind making it bounce of the sides is easy to grasp. You grab the coordinates of the four corners of the ball, and check to see if they correspond with the x or y coordinate of the edge of the screen. So if the top right and top left corners both have a y coordinate of zero, you know that the ball is currently on the top edge of the screen. We do all this in the }hhsbh)}(h ``update``h]hupdate}hhsbah}(h]h]h]h]h!]uh%h~hhubh? function, after we've worked out the new position of the ball.}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)Khhh&hubh literal_block)}(hXif not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z)h]hXif not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z)}hhsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)Khhh&hubho)}(hXgHere we check to see if the ``area`` contains the new position of the ball (it always should, so we needn't have an ``else`` clause, though in other circumstances you might want to consider it). We then check if the coordinates for the four corners are *colliding* with the area's edges, and create objects for each result. If they are, the objects will have a value of 1, or ``True``. If they don't, then the value will be ``None``, or ``False``. We then see if it has hit the top or bottom, and if it has we change the ball's direction. Handily, using radians we can do this by simply reversing its positive/negative value. We also check to see if the ball has gone off the sides, and if it has we call the ``offcourt`` function. This, in my game, resets the ball, adds 1 point to the score of the player specified when calling the function, and displays the new score.h](hHere we check to see if the }hhsbh)}(h``area``h]harea}hhsbah}(h]h]h]h]h!]uh%h~hhubhP contains the new position of the ball (it always should, so we needn't have an }hhsbh)}(h``else``h]helse}hjsbah}(h]h]h]h]h!]uh%h~hhubh clause, though in other circumstances you might want to consider it). We then check if the coordinates for the four corners are }hhsbh emphasis)}(h *colliding*h]h colliding}hj%sbah}(h]h]h]h]h!]uh%j#hhubhp with the area's edges, and create objects for each result. If they are, the objects will have a value of 1, or }hhsbh)}(h``True``h]hTrue}hj7sbah}(h]h]h]h]h!]uh%h~hhubh(. If they don't, then the value will be }hhsbh)}(h``None``h]hNone}hjIsbah}(h]h]h]h]h!]uh%h~hhubh, or }hhsbh)}(h ``False``h]hFalse}hj[sbah}(h]h]h]h]h!]uh%h~hhubhX. We then see if it has hit the top or bottom, and if it has we change the ball's direction. Handily, using radians we can do this by simply reversing its positive/negative value. We also check to see if the ball has gone off the sides, and if it has we call the }hhsbh)}(h ``offcourt``h]hoffcourt}hjmsbah}(h]h]h]h]h!]uh%h~hhubh function. This, in my game, resets the ball, adds 1 point to the score of the player specified when calling the function, and displays the new score.}hhsbeh}(h]h]h]h]h!]uh%hnh'hNh)K-hhh&hubho)}(hFinally, we recompile the vector based on the new angle. And that is it. The ball will now merrily bounce off the walls and go offcourt with good grace.h]hFinally, we recompile the vector based on the new angle. And that is it. The ball will now merrily bounce off the walls and go offcourt with good grace.}hjsbah}(h]h]h]h]h!]uh%hnh'hNh)K6hhh&hubhP)}(h.. _makegames-6-2:h]h}(h]h]h]h]h!]h[ makegames-6-2uh%hOh)KXhhh&hh'hNubeh}(h](let-the-ball-hit-sidesheh]h](6.1. let the ball hit sides makegames-6-1eh]h!]uh%h9hh]h&hh'hNh)Kexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubh:)}(hhh](h?)}(h6.2. Let the ball hit batsh]h6.2. Let the ball hit bats}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'hNh)K=ubho)}(hXMaking the ball hit the bats is very similar to making it hit the sides of the screen. We still use the collide method, but this time we check to see if the rectangles for the ball and either bat collide. In this code I've also put in some extra code to avoid various glitches. You'll find that you'll have to put all sorts of extra code in to avoid glitches and bugs, so it's good to get used to seeing it.h]hXMaking the ball hit the bats is very similar to making it hit the sides of the screen. We still use the collide method, but this time we check to see if the rectangles for the ball and either bat collide. In this code I've also put in some extra code to avoid various glitches. You'll find that you'll have to put all sorts of extra code in to avoid glitches and bugs, so it's good to get used to seeing it.}hjsbah}(h]h]h]h]h!]uh%hnh'hNh)K?hjh&hubh)}(hXWelse: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z)h]hXWelse: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z)}hjsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)KFhjh&hubho)}(hX@We start this section with an ``else`` statement, because this carries on from the previous chunk of code to check if the ball hits the sides. It makes sense that if it doesn't hit the sides, it might hit a bat, so we carry on the conditional statement. The first glitch to fix is to shrink the players' rectangles by 3 pixels in both dimensions, to stop the bat catching a ball that goes behind them (if you imagine you just move the bat so that as the ball travels behind it, the rectangles overlap, and so normally the ball would then have been "hit" - this prevents that).h](hWe start this section with an }hjsbh)}(h``else``h]helse}hjsbah}(h]h]h]h]h!]uh%h~hjubhX statement, because this carries on from the previous chunk of code to check if the ball hits the sides. It makes sense that if it doesn't hit the sides, it might hit a bat, so we carry on the conditional statement. The first glitch to fix is to shrink the players' rectangles by 3 pixels in both dimensions, to stop the bat catching a ball that goes behind them (if you imagine you just move the bat so that as the ball travels behind it, the rectangles overlap, and so normally the ball would then have been "hit" - this prevents that).}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)KZhjh&hubho)}(hXNext we check if the rectangles collide, with one more glitch fix. Notice that I've commented on these odd bits of code - it's always good to explain bits of code that are abnormal, both for others who look at your code, and so you understand it when you come back to it. The without the fix, the ball might hit a corner of the bat, change direction, and one frame later still find itself inside the bat. Then it would again think it has been hit, and change its direction. This can happen several times, making the ball's motion completely unrealistic. So we have a variable, ``self.hit``, which we set to ``True`` when it has been hit, and ``False`` one frame later. When we check if the rectangles have collided, we also check if ``self.hit`` is ``True``/``False``, to stop internal bouncing.h](hXANext we check if the rectangles collide, with one more glitch fix. Notice that I've commented on these odd bits of code - it's always good to explain bits of code that are abnormal, both for others who look at your code, and so you understand it when you come back to it. The without the fix, the ball might hit a corner of the bat, change direction, and one frame later still find itself inside the bat. Then it would again think it has been hit, and change its direction. This can happen several times, making the ball's motion completely unrealistic. So we have a variable, }hjsbh)}(h ``self.hit``h]hself.hit}hjsbah}(h]h]h]h]h!]uh%h~hjubh, which we set to }hjsbh)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h~hjubh when it has been hit, and }hjsbh)}(h ``False``h]hFalse}hj$sbah}(h]h]h]h]h!]uh%h~hjubhR one frame later. When we check if the rectangles have collided, we also check if }hjsbh)}(h ``self.hit``h]hself.hit}hj6sbah}(h]h]h]h]h!]uh%h~hjubh is }hjsbh)}(h``True``h]hTrue}hjHsbah}(h]h]h]h]h!]uh%h~hjubh/}hjsbh)}(h ``False``h]hFalse}hjZsbah}(h]h]h]h]h!]uh%h~hjubh, to stop internal bouncing.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)K`hjh&hubho)}(hXThe important code here is pretty easy to understand. All rectangles have a :meth:`colliderect ` function, into which you feed the rectangle of another object, which returns ``True`` if the rectangles do overlap, and ``False`` if not. If they do, we can change the direction by subtracting the current angle from ``pi`` (again, a handy trick you can do with radians, which will adjust the angle by 90 degrees and send it off in the right direction; you might find at this point that a thorough understanding of radians is in order!). Just to finish the glitch checking, we switch ``self.hit`` back to ``False`` if it's the frame after they were hit.h](hLThe important code here is pretty easy to understand. All rectangles have a }hjrsbhy)}(h-:meth:`colliderect `h]h)}(hj|h]h colliderect}hj~sbah}(h]h](hpypy-metheh]h]h!]uh%h~hjzubah}(h]h]h]h]h!]refdoch refdomainjreftypemeth refexplicitrefwarnhNhNhpygame.Rect.colliderectuh%hxh'hNh)KghjrubhN function, into which you feed the rectangle of another object, which returns }hjrsbh)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%h~hjrubh# if the rectangles do overlap, and }hjrsbh)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%h~hjrubhW if not. If they do, we can change the direction by subtracting the current angle from }hjrsbh)}(h``pi``h]hpi}hjsbah}(h]h]h]h]h!]uh%h~hjrubhX (again, a handy trick you can do with radians, which will adjust the angle by 90 degrees and send it off in the right direction; you might find at this point that a thorough understanding of radians is in order!). Just to finish the glitch checking, we switch }hjrsbh)}(h ``self.hit``h]hself.hit}hjsbah}(h]h]h]h]h!]uh%h~hjrubh back to }hjrsbh)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%h~hjrubh' if it's the frame after they were hit.}hjrsbeh}(h]h]h]h]h!]uh%hnh'hNh)Kghjh&hubho)}(hX We also then recompile the vector. You would of course want to remove the same line in the previous chunk of code, so that you only do this once after the ``if-else`` conditional statement. And that's it! The combined code will now allow the ball to hit sides and bats.h](hWe also then recompile the vector. You would of course want to remove the same line in the previous chunk of code, so that you only do this once after the }hjsbh)}(h ``if-else``h]hif-else}hjsbah}(h]h]h]h]h!]uh%h~hjubhg conditional statement. And that's it! The combined code will now allow the ball to hit sides and bats.}hjsbeh}(h]h]h]h]h!]uh%hnh'hNh)Knhjh&hubhP)}(h.. _makegames-6-3:h]h}(h]h]h]h]h!]h[ makegames-6-3uh%hOh)Khjh&hh'hNubeh}(h](let-the-ball-hit-batsjeh]h](6.2. let the ball hit bats makegames-6-2eh]h!]uh%h9hh]h&hh'hNh)K=j}j/jsj}jjsubh:)}(hhh](h?)}(h6.3. The Finished producth]h6.3. The Finished product}hj7sbah}(h]h]h]h]h!]uh%h>hj4h&hh'hNh)Kuubho)}(hThe final product, with all the bits of code thrown together, as well as some other bits ofcode to glue it all together, will look like this::h]hThe final product, with all the bits of code thrown together, as well as some other bits ofcode to glue it all together, will look like this:}hjEsbah}(h]h]h]h]h!]uh%hnh'hNh)Kwhj4h&hubh)}(hX# # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initialise players global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initialise ball speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initialise sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Initialise clock clock = pygame.time.Clock() # Event loop while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main()h]hX# # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initialise players global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initialise ball speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initialise sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Initialise clock clock = pygame.time.Clock() # Event loop while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main()}hjSsbah}(h]h]h]h]h!]h#h$uh%hh'hNh)Kzhj4h&hubho)}(hXAs well as showing you the final product, I'll point you back to TomPong, upon which all of this is based. Download it, have a look at the source code, and you'll see a full implementation of pong using all of the code you've seen in this tutorial, as well as lots of other code I've added in various versions, such as some extra physics for spinning, and various other bug and glitch fixes.h]hXAs well as showing you the final product, I'll point you back to TomPong, upon which all of this is based. Download it, have a look at the source code, and you'll see a full implementation of pong using all of the code you've seen in this tutorial, as well as lots of other code I've added in various versions, such as some extra physics for spinning, and various other bug and glitch fixes.}hjasbah}(h]h]h]h]h!]uh%hnh'hNh)MFhj4h&hubho)}(h:Oh, find TomPong at http://tomchance.org.uk/projects/pong.h](hOh, find TomPong at }hjosbh reference)}(h%http://tomchance.org.uk/projects/pongh]h%http://tomchance.org.uk/projects/pong}hjysbah}(h]h]h]h]h!]refurij{uh%jwhjoubh.}hjosbeh}(h]h]h]h]h!]uh%hnh'hNh)MJhj4h&hubeh}(h](the-finished-productj(eh]h](6.3. the finished product makegames-6-3eh]h!]uh%h9hh]h&hh'hNh)Kuj}jjsj}j(jsubeh}(h](h\id1eh]h](6. putting it all together makegames-6eh]h!]uh%h9hh;h&hh'hNh)K j}jhQsj}h\hQsubeh}(h]putting-it-all-togetherah]h]putting it all togetherah]h!]uh%h9hhh&hh'hNh)Kubeh}(h]h]h]h]h!]sourcehNtranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehN _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h\]hQah]haj]jaj(]jaunameids}(jjjh\jjjhjjj/jj.j+jj(jju nametypes}(jjjjjj/j.jjuh}(jh;h\h]jh]hhjhjjj+jj(j4jj4u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](h system_message)}(hhh]ho)}(hhh]h1Hyperlink target "makegames-6" is not referenced.}hjFsbah}(h]h]h]h]h!]uh%hnhjCubah}(h]h]h]h]h!]levelKtypeINFOsourcehNlineK%uh%jAubjB)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-6-1" is not referenced.}hjasbah}(h]h]h]h]h!]uh%hnhj^ubah}(h]h]h]h]h!]levelKtypej[sourcehNlineK1uh%jAubjB)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-6-2" is not referenced.}hj{sbah}(h]h]h]h]h!]uh%hnhjxubah}(h]h]h]h]h!]levelKtypej[sourcehNlineKXuh%jAubjB)}(hhh]ho)}(hhh]h3Hyperlink target "makegames-6-3" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hnhjubah}(h]h]h]h]h!]levelKtypej[sourcehNlineKuh%jAube transformerN include_log]docs/reST/tut/tom_games6.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0171256 pygame-2.6.1/docs/generated/es/0000755000175100001770000000000014676242436015722 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.9071286 pygame-2.6.1/docs/generated/es/.buildinfo0000644000175100001770000000034614676242432017675 0ustar00runnerdocker# Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. config: 76d453bacefe0ccecda0e62e5d1d1f81 tags: 645f666f9bcd5a90fca523b33c5a78b7 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.970112 pygame-2.6.1/docs/generated/es/LGPL.txt0000644000175100001770000006347614676242340017233 0ustar00runnerdocker GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0191257 pygame-2.6.1/docs/generated/es/_images/0000755000175100001770000000000014676242436017326 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/es/_images/camera_average.jpg0000644000175100001770000005062114676242340022750 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?먢 ( (8q??Ȭ$F?\JS__daSͪg)q;_`?JI (ADͱwmcg bn"X>46tPlR҉/;#.]g CYٗ_XW/%ȑXmG[5yޘ"vEY8]ڽ@6)_g?ָQuA%A~|e2_}_Srk/E>Y}3Iq Wc*)SsomaObN6a'.:6%$KUtkmcC)xPx 䐏N+gFUjJ.M^F,s$}8tZKX4n=Wf?s#%O銣q"c?V {*>_M?#iUH).^{ZtԮU; ;ϵYԼKI5 Rc=:V<,7u hN7Drpr2:ugkJW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U{`TbA2A{M*]&:85'#R+ԩ_^m QC7QHI mߌU E+B*jEC)b"`r88=1jPWwԓL}+&{MrK=ƫ"Gf44zYmQjXvg:MN3W-f?EZir0gpl ۲toU@;OpRݞN'.;H z1WTvmcu":Vv~=Xoȋ'^wT+Uv EL]f^|:u37 epKҴ! i[$is>'0@o~Ʋ]ƿ;/#ͫs}*hv q~8-Fc sÁj1ϩo?dz5}_Ô$e:еw‚>ʳ.λd ;dUQ_]Ҧt(*ǔ#[6RYpbr@cǁuu)[y>ۭ:[ƽgq30 1?F 'ҳӫZcko穙5sGw{ɽ[~~X m+/÷i_jS~7dE^ T-(hVldZ,8vAPކ7g1'مDќ֜ D$Kz}9n6$o&[o+7fs润H#v})|/׊Z1,vHFlvxqv9G{FPH/=9>Rs۽hK fӮd>B[_n<{+Ǐk*8;F79u ~;dLy=ƶԮfot zzjlL21Hc+ji븎>4fYߥKZO`utq sJCAoZ|SFy*8+y6U+G["㷨XO4="?'?=jy屎Ծwd o<9.Wr XӜwU|?67ɟF㿷ҩK;n=bn&$^y51pouH-,R8sƇ䃐+,ݲ9>A%y#> aD,,-M+e* .Qe0jzq^ְ(Yqi0eTUΜg=U!9#nGBYGCc$gӽ!ve>H+HT././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/es/_images/camera_background.jpg0000644000175100001770000001650514676242340023460 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?n͑3>‘ZǴ9sC3)Ґ rFxANw'Tl n͡Į357IdQc Ls mϵ5ӱ8@1L Jւp>P}?TBh%ɽg)Gx;$3gGlR'GEoKA=:d=6gڃ 94uf]./Nz)2޴dVM* ^s/=Hn{RD]7'4ޗю3fخ4= /=q~FcR֤Qv)NHR*?lq`zzt.7xq&~q.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ER<G'!~ў{ =s֡(4(\ҳ.y ~n0x892Gc2 TnAj]s ^9qVm2G$Sv'J|z6x ֲn-1 0UA)m{RNlm}V7?4F0CcB;JG4n"C+Q@vi 2Lz~5.*l(9{r0x N,!'qFw.>SaWݐ$l8qnIK1sSy=?4z0xHF'ڗ֎a ?:18Nޗ0pi8iyIz8.I~8 ~I1J܄)OҀuh <)8?PKx ~ۑJiU2ӡ'޳mt!@4\B7ԀたƳrz q#Pތq9+Ns#nϭ5p42@" ` ) aaM1zYZӗP?#r4Wd_w8 򁟥f؝7#КpspAߥCdCМsڑ33FTl0=T};nrjUnb@:MS#Kd~& =0xn]AJq2}q}YHoCP5HFcG ,$֏ZX N ľ\ ʃV ̧L9*:#:8aPG/܊FK+[šSK)[<|})pǨCF 8/gsG1/Qlg/)PCa<{SFcA`[~4JA 9܀$eO>RaG$+{ӈOCS m?JR@\)6O"IJɺd!}0<gWy~aCd;v!,|SC'q@5f0w$3$b_n}UnF>ݩ@ۓG3GH13Yإa_ 9r{74#S>Jv2~}ne p)6r)cM4rϸx_zR{rg=pM=Q>ךR6Z=5_N=i#8&@ S,?VM $; 4;Or0G*e@o>Ƥi'4쎥u+ciGКR*0SkSF 1N}zjvΐ͓LҶ}R0ĜAnQ9jU$ld:RG>~8 U)4#6OzGlx>?JA'8ZjZ! WG(܃;7"nxQ G٤:l T\k0:6LןpF? %cT6O4A ~ zc((͎}qRrnǟ1p>A€OG@&쑋~=3ʕS#֢;푊 z(~I)V5-q\ѵ.HSpr3 R8²o(qVoz@۷>nѱb? I1l7q7>NJH%Ay` 6TlEzq򢒾3`ݣ˻?J[,=: =ș#"WkǠ8 T F)ɍU$v 1s})Ĭ [" ]BAXI4vHk8lcrœn>Sʎ!ORE[{cY;aM OK֬6}:ZNJ858F<=#e"h././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/es/_images/camera_green.jpg0000644000175100001770000002375314676242340022444 0ustar00runnerdockerJ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Ig\G65=I<ϞF˘'*y϶PR5*M7\N1U\Ԛju#sB/vomo%ʼ]UH|H_Gڨje&e}y%21R!jG`kY%#k˞{ݷ}5K-| xfVml$O^A%ZdIldS ,- u̼OЊMKK.7Snnϻ]N3 HrdRB.x _ZD&Ks܊]LqWŚutmGdAQݐy׌ҫx_`y QYȉz`瞟p\Ul*kmկx,lsYzKo:yuk

^wM`\`RvJFn>.K{T_XIcӜCJjWM+ZFlhVQE~qiyy$1;@ @ <`A[piU?omXTI6N'o\™L-͡.$;#+W9:]]I$1SE7$CH}+泜Gқ\.O:]rqOBM/PLB$n1o#<=G;:.Z@C$a W1ְto۔TM(kpQp#zWI<s68PIPXFOOZ嬨UnMNw1MGwk[/˽RK"? ݌*ij JʲFnqӏƲ_SQ-EdeW%g[>8y9+,'R{-Dޛ`*Tkm,į%ߟ=ۂv839m%:wvd* ;68޸~!˪Opmci9A21W׹K&խs4Z3l6ɴ?P}+rW8^׷cЭb0t-,shLsC##pn5iWNhlaYħozU3Ŀƕ9$CӟAҫkvhV,rW8^˲eT4Ҋ#_pn.r!{I7o+k+KK,:%5qjtzz3<1X&y37HD"`MqZQJiѲMw<;5\d2zҧ}-Ź#80sׯa9YuƥG RTZR8M?Q6{^'`?ji.Nw)*׮O zi4+c+{θ'sߵB)n'JF=f'G^R?}%3iog''K?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/es/_images/camera_mask.jpg0000644000175100001770000004453314676242340022276 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?}iea9w&d'uwYAGS+|:-LQn0:j$X9GKES: JGr> ӭ$ Yߧ}Gly\co.ync=+8^mϑz7[ӐE韙J+Xt7w dWϦ>PG&'[I6Fq}58c_Z/]/QNOͳ\z׿cVͳ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mE% 89ο{QZnp\h_?$3 a׫ m#݊@85i4,gĀo#򬚋.Jp*Ф5DX!Cs'Ksuٙ^GO$4$eo!{UQ$ҦwO M5|^ e(*>{0t!3VAX /,u``TvnqIjֈ>RfF3L:?Un}jR![q&X~͎YEKބ""k0݇Yq@j BO ~zeTSh=WPӜyQ 9l5 .OPS`--[`>s([=>le8Gqz8'TMY"HRU;ju $nlm.3^IRvw}x(|QSo_Kt쭮 I;o\{R_\nx3Հ5wdǴ_EK<[í5UɧoS?)MMI%F+ 9$ `2UzTEopK%[$gxAhnWWj?wz~}aқҚ c$?*-n.pX#Sa_-|cnOfEKm6Vizz֙F4kFb3Ko$|?Z2G'ۭEfvۘ?֬»P{F"z;'-QJ9P<QmgwA%M򫚵vr~aߧWy2;SKޤ}B-wp'5 C.%S[ F"Gshjͬ-vBe:s 4yV ' my 5 M$I}03[Īv$`~dTrZ=r6ccU`C4<\Uԋ ȋN`e#]$*H G8eE<,$ q+P٥Y)G(s{ֿ-uKadUAwΖb U ,*vM2H0'JhBZlm&`1IXSWgʩ1"bϯZ{,@c\.zuU (Uky^dRqU=K-Fݲ2DOھd{[$Q#a&x)~OlkOHk^y=Ͻ]ǸsGMUt$\f~ckyTH#d{psOmNG9Ү8)ֺ++*n<ՃM9\ȸI,B2qRi~}t@=3޺hmV"v84PGb}2EtR{R0pѐ[ڄ>#Z*mǾ4Fp?:p1K Cϔ܉#fг9n>* FS^sf A]nX α5[/ 5/m%e}qxsH]۫OpG+vFi;a5|h@BfSß|&wZ~'././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/es/_images/camera_rgb.jpg0000644000175100001770000007735014676242340022120 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?__ ZeYiȤN__igɻ]o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$`\ѭn9I-Dۘ'k:$!anOJN[RoKJa+Kn ;rE6Je) 9>|<4)dҠ` 9;QO9WZFWV"PY-cku,* ~潇<7F O#=y[me7&Rq$5s.T0Fr)Öir>PǦ9㫲箒,ɞIbpZ}@}QCl<÷^zx=B/ $~ZiJlwh|;fg3 pO .p\pGP+S>2l?LïZH,晠Z6xHNyʷx9I3\_|+ . m#JxDiXIEx 4jBʔt_ՄE/wk1--tPoltlqR]YZv g&LԾ0O&hqPGo/AԞ?zzE]ȳ{F8 I?t>]: yF;9&G7^8y5fM %&Wno< 7*y_ō BƥVWmxIozR0Mw8!~皧qjZ}@^qqڙCE̓ _;qMN3V9@iIRݻS]Rz{Ϲ-ҮWEԿgxy ǩ5V<"Dj$g"QKc쐳@åa;ZV85D+=ϵsnKe߅z;A֢i4O9]b| }FW >WY~xq΁$4k5goʣk1=@<=[ G 4k3ꨰlc~lWcz莿g}QWwtn|Rӎ >ϨŻ:pARvS9[۾ofVZ+esوgI =p9%%\[ d Na}A89⾀Ծ-.M.[l g;35ZςX=ͮp d$a# nTPjn"tw*obF_FkZ=6\nI#GSs{h1j CY-!W،#_h#././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/es/_images/camera_thresh.jpg0000644000175100001770000001037214676242340022632 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ʊ(((((((((((((((((((((((((((((((((((((((((((((((((*}K_4oϻʋzXmB4HFnYc̖ Sr9aA%|RFte$D*Fj (,(((((((((((((((((+뿁 oa=j?nwIba}y֐];es#Y7#( X;I Tӊ\/tv#K?Fem\B*999IS! 0zf# W8M'ƛwfk%)*#ďΙ,7GoP0eՓ'`}O*ŦoyfN`qx;Wѯu9(Š(((((((((((((((/éUX Ϛ%2") ]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ʞΚ%K7G)>r{qAp<ʊ+9ݗ *FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/es/_images/camera_thresholded.jpg0000644000175100001770000005617614676242340023656 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?L +X.dI_p]Xrx5_^Im{ ~fMLAp~R#FX%C|`N4)(FdYr#8GOÌhQEQEQEQEQExh5M*3m#M>T+ (pϥrkL/t˵e̍2Oa5tz1k60{;WDeь˱A +ϓ RKCt#mp䜎8QՖ'3Zn)]zإPd 5u]ҍm\RyD\JvF"f`l7`<13] c:b;8>?ZcKdX4V=A\g~;sR4dXLH¬>[@,@99{ˍ1Ǵ~nJ?7~GN1KHJ1F&O;p٦#Ē&7'kzp}4\\\G<1/}pijq= |n9e,NPF $ą̈̄eR @<HϨlI+Fv 98>(g1آSHn\G>)bjK(储<簨i.>f5a"`%qyus{r7\$]$xRZȑHYx(: AL-̱yvA0>awgr(".T198( ( ( ( ( )ƱbKd~B@Cʈ,jv4(((((({k$/ɱ 88 -m'fD9S0y=H9ȵ^[C^,v`#0U<$ygqc#ٔވHulsq:A}V\Ӎ\+X4u+z),Vlm [q+2$g LLb NrA#``w#l SEJ)0f P*'fLA"慥 VYcl5 >18㎾ÛL|@H,/m2aNn4աUYK JހS2/̧ X+c޳nٴL@IGLDvy⹪U&fS$k]n9F,m;pUݰܭeڬ&4RI ʤ##eV$C&'Û&lXk3$F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ѯbxE%=Uhl9=OjwM4K3I,'~e!dvev>IS^L Zl0w=7Gf8;.BYYZY]GbrXOi/vul`/V$X`rА+ ThZSY ;|r \3Nn#O[AX=͂K{{cG`:62INJR}%( A.pI@ hi%rRKn-qq?m[\Gn`!*'J2][GQOeG-wݜm@$>wb{sq1hn0Tݼa[wj=][ى#'nYZpbA2yVwmin\Ev|w{I'IF&Tl\/7$IYBpo>GY{ m49>o Fw0dO{M"bPJ4*#F2*iI'Ams-Rܒp0-Uvl(;(((((7 EUjHyExuzf\xfD;'/cKsfGiڽ8ũ8{׏2IQ7H@@=rB܁X^,xFEI2';n)yX KqgY2 -H.JKdO Zm[T&oy 3rWxf*]8{Z}7Ut$\aX^XJc\E{jDH \Mk>(_,\Ǖ8䑊ƌ 2pI +%մ+uc7*"pˀrs8 )U׉;%s^ܰ OM½hmNuyq)m!PK)J [ dS隊ThxةdbpGn$bQ< r#tj:Բ 08준ylEZVV5Ѝf#CvԜwLhsZ]nH2Ek#t;Bi^Z㳶6fTRq}MMJˁ-0,nb݋V 66 ܌Y𥦁F+ZB]Xbx!˸8+K#+K+YKԓ94kw&5șSmP1<@㡨5Z:z K"Q[QEQEQEQEQE\M%+<I",YqWI[DE4YFrr mVu#̉='bt 9mR+\F˰nUNvwGP}چ22\yva͸dT 'ުI\gr o*)s6Q/5d5p$ q87X'dJsAf yWa-QNXx u oKk$1`q*q\xI'wW/rULB%03K นdb@G.:$>wy8nrBm\p =:E0]PF*@rzjajyjOCiASNmXDJ'AU`~88#X6֡Ӂ^^r^çG{eM*mp(Ey8X]mol,9D> s;g ȫWRۭP~fm&t-\D1 Px!I! Yծt&+7ٻC+mq8l"Aq&wFG90O+Ղt*(E+K#%X0#=CEP././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/es/_images/camera_yuv.jpg0000644000175100001770000004721114676242340022162 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:C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ɞZ@o\#?UeGb(˚_nhX@>>PEv qJOQq:i^ ᐳ x 秵, )LG ^# Ii+bpҤm5kfk3;HQqXfAS}6';%# NCwgEa{;ٯoaYTQt:&v'nvtO&JV)&f7 `!WTf䐽ẻDvʍ(+wgO<.g qzGbrğzmmbayFQ@IwҜ £,^wlLW8~{ \v^M6irrGIkisp d/U'(ͤ5)r-AґV?ңivڙP{(X61PqIvE5޸52¯j'rح&?4"\_˭Jf~Ly~T杼T 3~rDk Pk+?=_zviqf#SGd皷_%w/S Z'@633zy.]9Fy9([qh΀:隵> D?7N:QSݓ}n.:<n)V;fV집ӨCOPC知S TykF8jN1r]]bzr!(":n5d9?ʕFROZ( hcwrzL gޏ^w$2#ޭ!y68OU}b2YTRڕzcx={yP>LCҭY^̄T2Lt; R28$ k!mҰ>.*TQgUW쐷ڲ}:޴f6QM92Gt-ۢ6vo #}Assǧ,ݹN+m3*ެI|ę' =ԗZOMSgIV4oNZ3N|cVXUְQ[[KK=Hƪg1sBujkh/hm ƺvq#` jZ(LuOyX/G9`ߺ?7:v]npZw1cSd֦Eev*Th ȍL>m-_d^J_$NϸƝ"9sQORO${™g!QjVW℺(dkrz9NPNmPpP# x5{:5OpZ t!=iqsJFIsސ h{lJy'l6$3S].z0mtȍTI,eb O\c?Җ/-#qӰP|*' ?ZWg^j̈ aߊ'ML(wG.'eWVm|Au ̑`Ƣxj#Wyn^h$!%B$xv|OݏS~Ra΅l?6@b#]|D1gv?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_images/chimpshot.gif0000644000175100001770000013167214676242340022017 0ustar00runnerdockerGIF89a(&p,(&Ɉ{V˩P+õOǴ+ćnƸ1#Ե˦­#fѽ+uwyjfffې::f::!ɾa/:::Y.ff:fffF۶ff::ې:ffې::w{vʴf::::ۧ||.˺0mkM:f::f:W\VJMFG}rZGfkjzVSHC::ff::f:f~_dcx_\:fnhX9{uWwĚLhSPmWlvy 2Z|c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9,VNV~c֨I*R WwwwpK\ެ$-F_L bE!<*0OX5Vջ""~E^E0~C'SAZJAA+w~wiN Bˍ&DD22 d-b3Ldң2F6rX(a Veĉ|{D8Y(`eHa!#d"a ~[؅ 7iw0҈0AluN<70Ԕ4*g6l0 M'Mi$iA=W-˼a%6zc#zD#k#^ֈk#l`~8xV*̇VJ:vJ> AYBEeaw2F2&z[_`R!&TZu#c1Xed6UDd(MY0wP+k|GPf^˘30B- *%!EFzO(oːm(@L7#n2E#F!=/kCFmSfa*Fl=Bd]UNקEH6Sc:љd/WlX{Xs=QwqLԈ #!wS$5)a=>7ga~xр4HE(\lE0Q|BFm&."铧Tsjr* %8 9z'\%}*ÌG44#XF3ffЂ: U< S\#xJ:[hs5i41#i Eq|b$T>JԢ᧗9KbEcL:,Bϐ~Apl CZSTEDBHG)hA rxuRTRPEBSA UG4q*P.0Il#stE:dZͬf7z hGKҚMjWֺlgKͭnw pKMr:ЍtKZͮvz xKMz|Kͯ~LN;'L [ΰ7T{ GL(NW0gL8αw@L"HN&;PL*[Xβ .{G;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/es/_images/pygame_lofi.png0000644000175100001770000040614214676242340022330 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace -N''IDATx^|Wg+NX  hNK݅-P!Hq;ş? -ݙ{=5FNTn**rUXǶWj*$Q I*W[ErXB/L>5UܠBV x dT\b YAT%d """""""""jRTܥb}V,гkPѫ=еa@~YvyByƺMEwu!]S=F{T|5(RA1@DDDDDDDDD԰ȸ*S(J .a@VTH%jd """""""""jfxAES S6 3NDwnݞL7]_HǢL8|+5+L2/F-zOcqYW  Gd|'6u$p Jdyȑ<0@DDDDD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ZM(Qv1 0 09iYPVHBOY]gaat2 @NRCv>JBiJ2_GgaaSR;KNt# Q*^NiʊrBpzNaaat?qIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/es/_images/pygame_logo.png0000644000175100001770000040174414676242340022342 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace {AIDATx^Ggn]-H bF݈}qwww}N=D Azpu?gp{]U/rbcUQaWQںn U4  DDDDDDDDDD}$Qq*Fp_"ph`򁈈 ! !;>Pq*dgQwQqUc!5ņ㰎 c7ʅÝpuWQ]@M ڏEK={ae岙Se*>W7TxTiL2.2o{Td6eg$cM~o-3Wq)0.W̄ztuN] k[QX*w$Q!͛R>Rv#qv Z p%[w.'_W/YJ@Ż*S )D DDDDDDDDDD*V=wpkmwHv'Fp[gUK168C<}D DDDDDDDDDD=Ki/Qq>Rlxl^%M;HHOd o^qkUT400@DDDDDDDDDsdkc*Gɛp`NABPYĆnx\wwn*rǫ@Qgn{~#ڙI؃ =H K̉yAĻmrD}`: 3ߛB&U*~;N"""""""""BVo'oۖ(z(,ОϿi [%GWq2&ԫ1@DDDDDDDDDԽTb[9p: D6@qp'gӽj8vr k(G0@DDDDDDDDD}$𖊝n{j06 6 w`d)`0k.іKyq*ZcTH !*S(UŶށI"""""""""!Ϩ8L7m"]H:+W߫g-C]}z G}ܦD.*&HT-јpY'*~Sv$QCc͋y{Bgw% >%?H|NpĹ61_u)"T\o{3ypvP=U Vdw*$ @E~d """""""""zN9\ux | r:À;),90k_kާUx*,\ܠ3 k{ne(l)L&RE>8\qq$Q'9(YWWӯ[hҟp꣞ȗ;Z8.{vL9`>8\Ip:}qF@J-ϋ~S?Z|U j>RqQ/$Qױx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zi: ֥`=őB:3l6 {:H's62~dR<*Ѓ4V#cBt+ʅWbrggInׅ9E: w~V-.B3J|=h=:!ZQUtc7 !C7!<ߺ*LQP:a!T%9wiȱ(R=rMi0E1KrSr e^b-BdߩMFLi)ըFa(;4J\ӄdr!3;wt `.8ܑ:|?VM#m(L +@-ڭOB])0Ή ^h|ɹQ,dB3JFgQ;:%h^O]iNODzBJ q;Y ]SaOFhW7ȢBh|"vJ1UaRv8Ph?-)=㮨)V B\? J;C iDg,rR}(R%2DPԎngUB]ٙHBh^n/d%0@)?KphYT˄Er">k=4oORZTGjAez6ay0UߒDŽR0B[cm=bPmټ5R܎$:!4A`\u*E #B=c@Y[#;S#!"B꺸jr{t @72w1MȓBV4a\5=o ۅPMD*M544=doe -rD)gh/^)}T}v\ع c19f 1.T(6sQmn敜 .790 0 øYXPO:RCiLfgaǤ>)K#!B(5[Yl)D(#iAHq@q-Rym!6Z0tF(rXWzB*K難Y!BžBJ *SB(=_ aTȩMqd4)k9'pJkL/Ri{(laa7ƘL/)n7!4  J +'\eb$ChE $.iQ%dXd%)5VO,qda=):@BsRw L #q]Zo(6yQR5WYrN4`aa?Dܤfl-v3F!!X+Dcg@ݥMRCY 9 Jwh=VGGy&aƹ(JF5(g$ q4>MHc2Ro{}aZM(Qv1 0 09iYPVHBOY]gaat2 @NRCv>JBiJ2_GgaaSR;KNt# Q*^NiʊrBpzNaaat?qIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/es/_static/pygame_lofi.svg0000644000175100001770000016362114676242340022367 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/es/_static/pygame_logo.png0000644000175100001770000040174414676242340022364 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guF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_V.be+YyU0Adp%Іh4hxmNmTsO~[tEAǖ&v8%p!e덙g!:YS5qP!~ C.a2J-c M&ZCyyE[mϷJ-NWmpc+9(i~P2T2,ZO=--log#H4%Gּl[ T:u++_uV6+2Bu:G!ɋ[[ A3uGtr"YzAt e>q ?7%BWl_qp8# oOTF?AmAOOe!w3)uHqBLD5 da,cѯgWP>?Zw3c"kՓ2V,?<B{͕!V~p \%F2?SPJj:+gr+2qgd@ mi}fv3sV /d66M񛒁4&QjqQwȹ̵8Np85'T!k1KB# X's{2.Ӟ@6+@Ay0ϒ0 YkzB T25#X%2ㆋ8ZH]S%FxEihXpt ˪lVX:x2 m?dˬO@&lW:Ӟ@=Nz2e[Zp| fp8N{%Qܯz Iҹ֚)QA#C.GXmxg^3]mLƊ[}%}!F鈯1POԭ!JǧG+Cr0`pI\TtMʫsaSu,h+=^)ՀgIRP"CIC%}!V9d9)IV4PG!oVY&VxpKA3Yj:@lfp8N;>Tx~,Q-T8B(%q ' OV\C/u3|'}p8 -<\2k"eH%oTP ̽hK1`Q:r} uhh;4`@Sx$d*SK #or+SkJ:'p8NɠNP̷0Lkf)BX '\S;i E !QBxQVX`ovnQŇxgDD5&JG[h#^ /#=E")^\]:!1h렭/bhжhqBB$qP9|硔zy?.)!@.^AF߄ U|#'p;/}NوP{oN h=w_ M[j\s; ҙŌnGc׾dH5%x$' :}©OciBP n&4`ht%ߨZǛp=N(BOD|dn--1t\D` w<z' HUb[)B31y]7aZ)Q>iLD5&9Wp񦒁HK_F"Jrݶt>bF}#cȹxK1LRb

" ) ); }, /** * helper function to hide the search marks again */ hideSearchWords: () => { document .querySelectorAll("#searchbox .highlight-link") .forEach((el) => el.remove()); document .querySelectorAll("span.highlighted") .forEach((el) => el.classList.remove("highlighted")); localStorage.removeItem("sphinx_highlight_terms") }, initEscapeListener: () => { // only install a listener if it is really needed if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; document.addEventListener("keydown", (event) => { // bail for input elements if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; // bail with special keys if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { SphinxHighlight.hideSearchWords(); event.preventDefault(); } }); }, }; _ready(() => { /* Do not call highlightSearchWords() when we are on the search page. * It will highlight words from the *previous* search query. */ if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); SphinxHighlight.initEscapeListener(); }); ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_static/tooltip.css0000644000175100001770000000143614676242340021552 0ustar00runnerdocker/* Implement hyperlink tooltips * * Adapted from "Sexy Tooltips with Just CSS" * http://sixrevisions.com/css/css-only-tooltips/ */ .tooltip { cursor: help; text-decoration: none; position: relative; } .tooltip span.tooltip-content { margin-left: -999em; position: absolute; } .tooltip:hover span.tooltip-content { position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; } .tooltip:hover img { border: 0; margin: -10px 0 0 -55px; float: left; position: absolute; } .tooltip:hover em { font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; display: block; padding: 0.2em 0 0.6em 0; } .classic { padding: 0.8em 1em; } .custom { padding: 0.5em 0.8em 0.8em 2em; } * html a:hover { background: transparent; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612169.9411418 pygame-2.6.1/docs/generated/es/_static/translations.js0000644000175100001770000001004114676242412022415 0ustar00runnerdockerDocumentation.addTranslations({ "locale": "es", "messages": { "%(filename)s — %(docstitle)s": "%(filename)s — %(docstitle)s", "© %(copyright_prefix)s %(copyright)s.": "", ", in ": ", en ", "About these documents": "Sobre este documento", "Automatically generated list of changes in version %(version)s": "Lista de cambios generada autom\u00e1ticamente en la versi\u00f3n %(version)s", "C API changes": "Cambios en la API C", "Changes in Version %(version)s — %(docstitle)s": "Cambios en la versi\u00f3n %(version)s — %(docstitle)s", "Collapse sidebar": "Contraer barra lateral", "Complete Table of Contents": "\u00cdndice de contenidos completo", "Contents": "Contenidos", "Copyright": "Copyright", "Created using Sphinx %(sphinx_version)s.": "Creado usando Sphinx %(sphinx_version)s.", "Expand sidebar": "Expandir barra lateral", "Full index on one page": "\u00cdndice completo en una p\u00e1gina", "General Index": "\u00cdndice General", "Global Module Index": "\u00cdndice Global de M\u00f3dulos", "Go": "Ir a", "Hide Search Matches": "Ocultar coincidencias de la b\u00fasqueda", "Index": "\u00cdndice", "Index – %(key)s": "", "Index pages by letter": "\u00cdndice alfab\u00e9tico de p\u00e1ginas", "Indices and tables:": "\u00cdndices y tablas:", "Last updated on %(last_updated)s.": "Actualizado por \u00faltima vez en %(last_updated)s.", "Library changes": "Cambios en la biblioteca", "Navigation": "Navegaci\u00f3n", "Next topic": "Pr\u00f3ximo tema", "Other changes": "Otros cambios", "Overview": "Resumen", "Please activate JavaScript to enable the search\n functionality.": "Por favor, active JavaScript para habilitar la funcionalidad\n de b\u00fasqueda.", "Preparing search...": "Preparando b\u00fasqueda...", "Previous topic": "Tema anterior", "Quick search": "B\u00fasqueda r\u00e1pida", "Search": "B\u00fasqueda", "Search Page": "P\u00e1gina de B\u00fasqueda", "Search Results": "Resultados de la b\u00fasqueda", "Search finished, found ${resultCount} page(s) matching the search query.": "B\u00fasqueda finalizada, se encontraron ${resultCount} p\u00e1ginas que coinciden con la consulta de b\u00fasqueda.", "Search within %(docstitle)s": "Buscar en %(docstitle)s", "Searching": "Buscando", "Searching for multiple words only shows matches that contain\n all words.": "La b\u00fasqueda de varias palabras solo muestra coincidencias que contienen\n todas las palabras.", "Show Source": "Mostrar el c\u00f3digo", "Table of Contents": "Tabla de contenido", "This Page": "Esta p\u00e1gina", "Welcome! This is": "\u00a1Bienvenido! Este es", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Su b\u00fasqueda no coincide con ning\u00fan documentos. Por favor, aseg\u00farese de que todas las palabras est\u00e9n correctamente escritas y que usted all\u00e1 seleccionado las suficientes categor\u00edas.", "all functions, classes, terms": "todas las funciones, clases, t\u00e9rminos", "can be huge": "puede ser muy grande", "last updated": "actualizado por \u00faltima vez el", "lists all sections and subsections": "muestra todas las secciones y subsecciones", "next chapter": "pr\u00f3ximo cap\u00edtulo", "previous chapter": "cap\u00edtulo anterior", "quick access to all modules": "acceso r\u00e1pido a todos los m\u00f3dulos", "search": "buscar", "search this documentation": "buscar en esta documentaci\u00f3n", "the documentation for": "la documentaci\u00f3n para" }, "plural_expr": "n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2" });././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.6521313 pygame-2.6.1/docs/generated/es/color_list.html0000644000175100001770000052043214676242431020762 0ustar00runnerdocker Colores Nombrados — pygame v2.6.1 documentation

color lets you specify any of these named colors when creating a new pygame.Color (taken from the colordict module).

Name

Color

aliceblue

████████

antiquewhite

████████

antiquewhite1

████████

antiquewhite2

████████

antiquewhite3

████████

antiquewhite4

████████

aqua

████████

aquamarine

████████

aquamarine1

████████

aquamarine2

████████

aquamarine3

████████

aquamarine4

████████

azure

████████

azure1

████████

azure2

████████

azure3

████████

azure4

████████

beige

████████

bisque

████████

bisque1

████████

bisque2

████████

bisque3

████████

bisque4

████████

black

████████

blanchedalmond

████████

blue

████████

blue1

████████

blue2

████████

blue3

████████

blue4

████████

blueviolet

████████

brown

████████

brown1

████████

brown2

████████

brown3

████████

brown4

████████

burlywood

████████

burlywood1

████████

burlywood2

████████

burlywood3

████████

burlywood4

████████

cadetblue

████████

cadetblue1

████████

cadetblue2

████████

cadetblue3

████████

cadetblue4

████████

chartreuse

████████

chartreuse1

████████

chartreuse2

████████

chartreuse3

████████

chartreuse4

████████

chocolate

████████

chocolate1

████████

chocolate2

████████

chocolate3

████████

chocolate4

████████

coral

████████

coral1

████████

coral2

████████

coral3

████████

coral4

████████

cornflowerblue

████████

cornsilk

████████

cornsilk1

████████

cornsilk2

████████

cornsilk3

████████

cornsilk4

████████

crimson

████████

cyan

████████

cyan1

████████

cyan2

████████

cyan3

████████

cyan4

████████

darkblue

████████

darkcyan

████████

darkgoldenrod

████████

darkgoldenrod1

████████

darkgoldenrod2

████████

darkgoldenrod3

████████

darkgoldenrod4

████████

darkgray

████████

darkgreen

████████

darkgrey

████████

darkkhaki

████████

darkmagenta

████████

darkolivegreen

████████

darkolivegreen1

████████

darkolivegreen2

████████

darkolivegreen3

████████

darkolivegreen4

████████

darkorange

████████

darkorange1

████████

darkorange2

████████

darkorange3

████████

darkorange4

████████

darkorchid

████████

darkorchid1

████████

darkorchid2

████████

darkorchid3

████████

darkorchid4

████████

darkred

████████

darksalmon

████████

darkseagreen

████████

darkseagreen1

████████

darkseagreen2

████████

darkseagreen3

████████

darkseagreen4

████████

darkslateblue

████████

darkslategray

████████

darkslategray1

████████

darkslategray2

████████

darkslategray3

████████

darkslategray4

████████

darkslategrey

████████

darkturquoise

████████

darkviolet

████████

deeppink

████████

deeppink1

████████

deeppink2

████████

deeppink3

████████

deeppink4

████████

deepskyblue

████████

deepskyblue1

████████

deepskyblue2

████████

deepskyblue3

████████

deepskyblue4

████████

dimgray

████████

dimgrey

████████

dodgerblue

████████

dodgerblue1

████████

dodgerblue2

████████

dodgerblue3

████████

dodgerblue4

████████

firebrick

████████

firebrick1

████████

firebrick2

████████

firebrick3

████████

firebrick4

████████

floralwhite

████████

forestgreen

████████

fuchsia

████████

gainsboro

████████

ghostwhite

████████

gold

████████

gold1

████████

gold2

████████

gold3

████████

gold4

████████

goldenrod

████████

goldenrod1

████████

goldenrod2

████████

goldenrod3

████████

goldenrod4

████████

gray

████████

gray0

████████

gray1

████████

gray2

████████

gray3

████████

gray4

████████

gray5

████████

gray6

████████

gray7

████████

gray8

████████

gray9

████████

gray10

████████

gray11

████████

gray12

████████

gray13

████████

gray14

████████

gray15

████████

gray16

████████

gray17

████████

gray18

████████

gray19

████████

gray20

████████

gray21

████████

gray22

████████

gray23

████████

gray24

████████

gray25

████████

gray26

████████

gray27

████████

gray28

████████

gray29

████████

gray30

████████

gray31

████████

gray32

████████

gray33

████████

gray34

████████

gray35

████████

gray36

████████

gray37

████████

gray38

████████

gray39

████████

gray40

████████

gray41

████████

gray42

████████

gray43

████████

gray44

████████

gray45

████████

gray46

████████

gray47

████████

gray48

████████

gray49

████████

gray50

████████

gray51

████████

gray52

████████

gray53

████████

gray54

████████

gray55

████████

gray56

████████

gray57

████████

gray58

████████

gray59

████████

gray60

████████

gray61

████████

gray62

████████

gray63

████████

gray64

████████

gray65

████████

gray66

████████

gray67

████████

gray68

████████

gray69

████████

gray70

████████

gray71

████████

gray72

████████

gray73

████████

gray74

████████

gray75

████████

gray76

████████

gray77

████████

gray78

████████

gray79

████████

gray80

████████

gray81

████████

gray82

████████

gray83

████████

gray84

████████

gray85

████████

gray86

████████

gray87

████████

gray88

████████

gray89

████████

gray90

████████

gray91

████████

gray92

████████

gray93

████████

gray94

████████

gray95

████████

gray96

████████

gray97

████████

gray98

████████

gray99

████████

gray100

████████

green

████████

green1

████████

green2

████████

green3

████████

green4

████████

greenyellow

████████

grey

████████

grey0

████████

grey1

████████

grey2

████████

grey3

████████

grey4

████████

grey5

████████

grey6

████████

grey7

████████

grey8

████████

grey9

████████

grey10

████████

grey11

████████

grey12

████████

grey13

████████

grey14

████████

grey15

████████

grey16

████████

grey17

████████

grey18

████████

grey19

████████

grey20

████████

grey21

████████

grey22

████████

grey23

████████

grey24

████████

grey25

████████

grey26

████████

grey27

████████

grey28

████████

grey29

████████

grey30

████████

grey31

████████

grey32

████████

grey33

████████

grey34

████████

grey35

████████

grey36

████████

grey37

████████

grey38

████████

grey39

████████

grey40

████████

grey41

████████

grey42

████████

grey43

████████

grey44

████████

grey45

████████

grey46

████████

grey47

████████

grey48

████████

grey49

████████

grey50

████████

grey51

████████

grey52

████████

grey53

████████

grey54

████████

grey55

████████

grey56

████████

grey57

████████

grey58

████████

grey59

████████

grey60

████████

grey61

████████

grey62

████████

grey63

████████

grey64

████████

grey65

████████

grey66

████████

grey67

████████

grey68

████████

grey69

████████

grey70

████████

grey71

████████

grey72

████████

grey73

████████

grey74

████████

grey75

████████

grey76

████████

grey77

████████

grey78

████████

grey79

████████

grey80

████████

grey81

████████

grey82

████████

grey83

████████

grey84

████████

grey85

████████

grey86

████████

grey87

████████

grey88

████████

grey89

████████

grey90

████████

grey91

████████

grey92

████████

grey93

████████

grey94

████████

grey95

████████

grey96

████████

grey97

████████

grey98

████████

grey99

████████

grey100

████████

honeydew

████████

honeydew1

████████

honeydew2

████████

honeydew3

████████

honeydew4

████████

hotpink

████████

hotpink1

████████

hotpink2

████████

hotpink3

████████

hotpink4

████████

indianred

████████

indianred1

████████

indianred2

████████

indianred3

████████

indianred4

████████

indigo

████████

ivory

████████

ivory1

████████

ivory2

████████

ivory3

████████

ivory4

████████

khaki

████████

khaki1

████████

khaki2

████████

khaki3

████████

khaki4

████████

lavender

████████

lavenderblush

████████

lavenderblush1

████████

lavenderblush2

████████

lavenderblush3

████████

lavenderblush4

████████

lawngreen

████████

lemonchiffon

████████

lemonchiffon1

████████

lemonchiffon2

████████

lemonchiffon3

████████

lemonchiffon4

████████

lightblue

████████

lightblue1

████████

lightblue2

████████

lightblue3

████████

lightblue4

████████

lightcoral

████████

lightcyan

████████

lightcyan1

████████

lightcyan2

████████

lightcyan3

████████

lightcyan4

████████

lightgoldenrod

████████

lightgoldenrod1

████████

lightgoldenrod2

████████

lightgoldenrod3

████████

lightgoldenrod4

████████

lightgoldenrodyellow

████████

lightgray

████████

lightgreen

████████

lightgrey

████████

lightpink

████████

lightpink1

████████

lightpink2

████████

lightpink3

████████

lightpink4

████████

lightsalmon

████████

lightsalmon1

████████

lightsalmon2

████████

lightsalmon3

████████

lightsalmon4

████████

lightseagreen

████████

lightskyblue

████████

lightskyblue1

████████

lightskyblue2

████████

lightskyblue3

████████

lightskyblue4

████████

lightslateblue

████████

lightslategray

████████

lightslategrey

████████

lightsteelblue

████████

lightsteelblue1

████████

lightsteelblue2

████████

lightsteelblue3

████████

lightsteelblue4

████████

lightyellow

████████

lightyellow1

████████

lightyellow2

████████

lightyellow3

████████

lightyellow4

████████

lime

████████

limegreen

████████

linen

████████

magenta

████████

magenta1

████████

magenta2

████████

magenta3

████████

magenta4

████████

maroon

████████

maroon1

████████

maroon2

████████

maroon3

████████

maroon4

████████

mediumaquamarine

████████

mediumblue

████████

mediumorchid

████████

mediumorchid1

████████

mediumorchid2

████████

mediumorchid3

████████

mediumorchid4

████████

mediumpurple

████████

mediumpurple1

████████

mediumpurple2

████████

mediumpurple3

████████

mediumpurple4

████████

mediumseagreen

████████

mediumslateblue

████████

mediumspringgreen

████████

mediumturquoise

████████

mediumvioletred

████████

midnightblue

████████

mintcream

████████

mistyrose

████████

mistyrose1

████████

mistyrose2

████████

mistyrose3

████████

mistyrose4

████████

moccasin

████████

navajowhite

████████

navajowhite1

████████

navajowhite2

████████

navajowhite3

████████

navajowhite4

████████

navy

████████

navyblue

████████

oldlace

████████

olive

████████

olivedrab

████████

olivedrab1

████████

olivedrab2

████████

olivedrab3

████████

olivedrab4

████████

orange

████████

orange1

████████

orange2

████████

orange3

████████

orange4

████████

orangered

████████

orangered1

████████

orangered2

████████

orangered3

████████

orangered4

████████

orchid

████████

orchid1

████████

orchid2

████████

orchid3

████████

orchid4

████████

palegoldenrod

████████

palegreen

████████

palegreen1

████████

palegreen2

████████

palegreen3

████████

palegreen4

████████

paleturquoise

████████

paleturquoise1

████████

paleturquoise2

████████

paleturquoise3

████████

paleturquoise4

████████

palevioletred

████████

palevioletred1

████████

palevioletred2

████████

palevioletred3

████████

palevioletred4

████████

papayawhip

████████

peachpuff

████████

peachpuff1

████████

peachpuff2

████████

peachpuff3

████████

peachpuff4

████████

peru

████████

pink

████████

pink1

████████

pink2

████████

pink3

████████

pink4

████████

plum

████████

plum1

████████

plum2

████████

plum3

████████

plum4

████████

powderblue

████████

purple

████████

purple1

████████

purple2

████████

purple3

████████

purple4

████████

red

████████

red1

████████

red2

████████

red3

████████

red4

████████

rosybrown

████████

rosybrown1

████████

rosybrown2

████████

rosybrown3

████████

rosybrown4

████████

royalblue

████████

royalblue1

████████

royalblue2

████████

royalblue3

████████

royalblue4

████████

saddlebrown

████████

salmon

████████

salmon1

████████

salmon2

████████

salmon3

████████

salmon4

████████

sandybrown

████████

seagreen

████████

seagreen1

████████

seagreen2

████████

seagreen3

████████

seagreen4

████████

seashell

████████

seashell1

████████

seashell2

████████

seashell3

████████

seashell4

████████

sienna

████████

sienna1

████████

sienna2

████████

sienna3

████████

sienna4

████████

silver

████████

skyblue

████████

skyblue1

████████

skyblue2

████████

skyblue3

████████

skyblue4

████████

slateblue

████████

slateblue1

████████

slateblue2

████████

slateblue3

████████

slateblue4

████████

slategray

████████

slategray1

████████

slategray2

████████

slategray3

████████

slategray4

████████

slategrey

████████

snow

████████

snow1

████████

snow2

████████

snow3

████████

snow4

████████

springgreen

████████

springgreen1

████████

springgreen2

████████

springgreen3

████████

springgreen4

████████

steelblue

████████

steelblue1

████████

steelblue2

████████

steelblue3

████████

steelblue4

████████

tan

████████

tan1

████████

tan2

████████

tan3

████████

tan4

████████

teal

████████

thistle

████████

thistle1

████████

thistle2

████████

thistle3

████████

thistle4

████████

tomato

████████

tomato1

████████

tomato2

████████

tomato3

████████

tomato4

████████

turquoise

████████

turquoise1

████████

turquoise2

████████

turquoise3

████████

turquoise4

████████

violet

████████

violetred

████████

violetred1

████████

violetred2

████████

violetred3

████████

violetred4

████████

wheat

████████

wheat1

████████

wheat2

████████

wheat3

████████

wheat4

████████

white

████████

whitesmoke

████████

yellow

████████

yellow1

████████

yellow2

████████

yellow3

████████

yellow4

████████

yellowgreen

████████




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0221257 pygame-2.6.1/docs/generated/es/doctrees/0000755000175100001770000000000014676242436017532 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612183.815133 pygame-2.6.1/docs/generated/es/doctrees/color_list.doctree0000644000175100001770000155020614676242430023255 0ustar00runnerdocker!sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(hColores Nombradosh]hColores Nombrados}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh'6/home/runner/work/pygame/pygame/docs/es/color_list.rsth)Kubh raw)}(hXh]hX}hhBsbah}(h]h]h]h]h!]formathtmlh#h$uh%h@h'h?h)Khh,h&hubh paragraph)}(h:doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_).h](h pending_xref)}(h :doc:`color`h]h inline)}(hh\h]hcolor}hh`sbah}(h]h](xrefstdstd-doceh]h]h!]uh%h^hhZubah}(h]h]h]h]h!]refdoc color_list refdomainhkreftypedoc refexplicitrefwarn reftargetcoloruh%hXh'h?h)MhhTubh@ lets you specify any of these named colors when creating a new }hhTsbh literal)}(h``pygame.Color``h]h pygame.Color}hhsbah}(h]h]h]h]h!]uh%hhhTubh (taken from the }hhTsbh reference)}(hT`colordict module `_h]hcolordict module}(hhhcolordict moduleubah}(h]h]h]h]h!]namecolordict modulerefuri>https://github.com/pygame/pygame/blob/main/src_py/colordict.pyuh%hhhTubh target)}(hA h]h}(h]colordict-moduleah]h]colordict moduleah]h!]refurihuh%h referencedKhhTubh).}hhTsbeh}(h]h]h]h]h!]uh%hRh'h?h)Mhh,h&hubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h}(h]h]h]h]h!]colwidthKuh%hhhubh)}(hhh]h}(h]h]h]h]h!]colwidthKfuh%hhhubh thead)}(hhh]h row)}(hhh](h entry)}(hhh]hS)}(hNameh]hName}hhsbah}(h]h]h]h]h!]uh%hRh'h?h)MChhubah}(h]h]h]h]h!]uh%hhhubh)}(hhh]hS)}(hColorh]hColor}hj sbah}(h]h]h]h]h!]uh%hRh'h?h)MChj ubah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%hhhubh tbody)}(hhh](h)}(hhh](h)}(hhh]hS)}(h ``aliceblue``h]h)}(hj9h]h aliceblue}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h%:aliceblue:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h] aliceblueah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite``h]h)}(hjh]h antiquewhite}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h(:antiquewhite:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhiteah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite1``h]h)}(hjh]h antiquewhite1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite2``h]h)}(hjh]h antiquewhite2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite2:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h] antiquewhite2ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite3``h]h)}(hjah]h antiquewhite3}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h):antiquewhite3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``antiquewhite4``h]h)}(hjh]h antiquewhite4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):antiquewhite4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] antiquewhite4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aqua``h]h)}(hjh]haqua}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :aqua:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]aquaah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine``h]h)}(hj?h]h aquamarine}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h&:aquamarine:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] aquamarineah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine1``h]h)}(hjh]h aquamarine1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine2``h]h)}(hjh]h aquamarine2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine3``h]h)}(hjh]h aquamarine3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':aquamarine3:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] aquamarine3ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``aquamarine4``h]h)}(hjgh]h aquamarine4}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h':aquamarine4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] aquamarine4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure``h]h)}(hjh]hazure}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:azure:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azureah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure1``h]h)}(hjh]hazure1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure2``h]h)}(hjEh]hazure2}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":azure2:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]azure2ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure3``h]h)}(hjh]hazure3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``azure4``h]h)}(hjh]hazure4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":azure4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]azure4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``beige``h]h)}(hj#h]hbeige}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:beige:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]beigeah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque``h]h)}(hjmh]hbisque}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h":bisque:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisqueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque1``h]h)}(hjh]hbisque1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisque1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque2``h]h)}(hjh]hbisque2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque2:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]bisque2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque3``h]h)}(hjKh]hbisque3}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h#:bisque3:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h]bisque3ah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``bisque4``h]h)}(hjh]hbisque4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:bisque4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]bisque4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``black``h]h)}(hjh]hblack}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:black:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blackah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blanchedalmond``h]h)}(hj)h]hblanchedalmond}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h*:blanchedalmond:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h]blanchedalmondah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blue``h]h)}(hjsh]hblue}hjusbah}(h]h]h]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnubah}(h]h]h]h]h!]uh%hhjkubh)}(hhh]hS)}(h :blue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjubah}(h]h]h]h]h!]uh%hhjkubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue1``h]h)}(hjh]hblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:blue1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]blue1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue2``h]h)}(hj h]hblue2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:blue2:`████████`h]h_)}(hj' h]h████████}hj) sbah}(h]h]blue2ah]h]h!]uh%h^hj% ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj" ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue3``h]h)}(hjQ h]hblue3}hjS sbah}(h]h]h]h]h!]uh%hhjO ubah}(h]h]h]h]h!]uh%hRh'h?h)MahjL ubah}(h]h]h]h]h!]uh%hhjI ubh)}(hhh]hS)}(h!:blue3:`████████`h]h_)}(hjq h]h████████}hjs sbah}(h]h]blue3ah]h]h!]uh%h^hjo ubah}(h]h]h]h]h!]uh%hRh'h?h)Mahjl ubah}(h]h]h]h]h!]uh%hhjI ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``blue4``h]h)}(hj h]hblue4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h!:blue4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]blue4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``blueviolet``h]h)}(hj h]h blueviolet}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mchj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:blueviolet:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] bluevioletah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mchj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown``h]h)}(hj/ h]hbrown}hj1 sbah}(h]h]h]h]h!]uh%hhj- ubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj* ubah}(h]h]h]h]h!]uh%hhj' ubh)}(hhh]hS)}(h!:brown:`████████`h]h_)}(hjO h]h████████}hjQ sbah}(h]h]brownah]h]h!]uh%h^hjM ubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJ ubah}(h]h]h]h]h!]uh%hhj' ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown1``h]h)}(hjy h]hbrown1}hj{ sbah}(h]h]h]h]h!]uh%hhjw ubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjt ubah}(h]h]h]h]h!]uh%hhjq ubh)}(hhh]hS)}(h":brown1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]brown1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mehj ubah}(h]h]h]h]h!]uh%hhjq ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown2``h]h)}(hj h]hbrown2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":brown2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]brown2ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown3``h]h)}(hj h]hbrown3}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":brown3:`████████`h]h_)}(hj- h]h████████}hj/ sbah}(h]h]brown3ah]h]h!]uh%h^hj+ ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj( ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``brown4``h]h)}(hjW h]hbrown4}hjY sbah}(h]h]h]h]h!]uh%hhjU ubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjR ubah}(h]h]h]h]h!]uh%hhjO ubh)}(hhh]hS)}(h":brown4:`████████`h]h_)}(hjw h]h████████}hjy sbah}(h]h]brown4ah]h]h!]uh%h^hju ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhhjr ubah}(h]h]h]h]h!]uh%hhjO ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``burlywood``h]h)}(hj h]h burlywood}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mihj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h%:burlywood:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywoodah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mihj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood1``h]h)}(hj h]h burlywood1}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:burlywood1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood2``h]h)}(hj5 h]h burlywood2}hj7 sbah}(h]h]h]h]h!]uh%hhj3 ubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0 ubah}(h]h]h]h]h!]uh%hhj- ubh)}(hhh]hS)}(h&:burlywood2:`████████`h]h_)}(hjU h]h████████}hjW sbah}(h]h] burlywood2ah]h]h!]uh%h^hjS ubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjP ubah}(h]h]h]h]h!]uh%hhj- ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood3``h]h)}(hj h]h burlywood3}hj sbah}(h]h]h]h]h!]uh%hhj} ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjz ubah}(h]h]h]h]h!]uh%hhjw ubh)}(hhh]hS)}(h&:burlywood3:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood3ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhj ubah}(h]h]h]h]h!]uh%hhjw ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``burlywood4``h]h)}(hj h]h burlywood4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:burlywood4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] burlywood4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cadetblue``h]h)}(hj h]h cadetblue}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h%:cadetblue:`████████`h]h_)}(hj3 h]h████████}hj5 sbah}(h]h] cadetblueah]h]h!]uh%h^hj1 ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj. ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue1``h]h)}(hj] h]h cadetblue1}hj_ sbah}(h]h]h]h]h!]uh%hhj[ ubah}(h]h]h]h]h!]uh%hRh'h?h)MohjX ubah}(h]h]h]h]h!]uh%hhjU ubh)}(hhh]hS)}(h&:cadetblue1:`████████`h]h_)}(hj} h]h████████}hj sbah}(h]h] cadetblue1ah]h]h!]uh%h^hj{ ubah}(h]h]h]h]h!]uh%hRh'h?h)Mohjx ubah}(h]h]h]h]h!]uh%hhjU ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue2``h]h)}(hj h]h cadetblue2}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:cadetblue2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] cadetblue2ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue3``h]h)}(hj h]h cadetblue3}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:cadetblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cadetblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cadetblue4``h]h)}(hj;h]h cadetblue4}hj=sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h&:cadetblue4:`████████`h]h_)}(hj[h]h████████}hj]sbah}(h]h] cadetblue4ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse``h]h)}(hjh]h chartreuse}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h&:chartreuse:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse1``h]h)}(hjh]h chartreuse1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse2``h]h)}(hjh]h chartreuse2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Muhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse2:`████████`h]h_)}(hj9h]h████████}hj;sbah}(h]h] chartreuse2ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse3``h]h)}(hjch]h chartreuse3}hjesbah}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^ubah}(h]h]h]h]h!]uh%hhj[ubh)}(hhh]hS)}(h':chartreuse3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~ubah}(h]h]h]h]h!]uh%hhj[ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chartreuse4``h]h)}(hjh]h chartreuse4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':chartreuse4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chartreuse4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``chocolate``h]h)}(hjh]h chocolate}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:chocolate:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolateah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate1``h]h)}(hjAh]h chocolate1}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h&:chocolate1:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] chocolate1ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate2``h]h)}(hjh]h chocolate2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolate2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate3``h]h)}(hjh]h chocolate3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] chocolate3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``chocolate4``h]h)}(hjh]h chocolate4}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M|hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:chocolate4:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h] chocolate4ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)M|hj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral``h]h)}(hjih]hcoral}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h!:coral:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coralah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral1``h]h)}(hjh]hcoral1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral2``h]h)}(hjh]hcoral2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral3``h]h)}(hjGh]hcoral3}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":coral3:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h]coral3ah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``coral4``h]h)}(hjh]hcoral4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":coral4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]coral4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cornflowerblue``h]h)}(hjh]hcornflowerblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:cornflowerblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cornflowerblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk``h]h)}(hj%h]hcornsilk}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:cornsilk:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h]cornsilkah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk1``h]h)}(hjoh]h cornsilk1}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h%:cornsilk1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cornsilk1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk2``h]h)}(hjh]h cornsilk2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:cornsilk2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] cornsilk2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk3``h]h)}(hjh]h cornsilk3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:cornsilk3:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] cornsilk3ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cornsilk4``h]h)}(hjMh]h cornsilk4}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h%:cornsilk4:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h] cornsilk4ah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``crimson``h]h)}(hjh]hcrimson}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:crimson:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]crimsonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``cyan``h]h)}(hjh]hcyan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :cyan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan1``h]h)}(hj+h]hcyan1}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h!:cyan1:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h]cyan1ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan2``h]h)}(hjuh]hcyan2}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h!:cyan2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyan2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan3``h]h)}(hjh]hcyan3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:cyan3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]cyan3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``cyan4``h]h)}(hj h]hcyan4}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:cyan4:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h]cyan4ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkblue``h]h)}(hjSh]hdarkblue}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h$:darkblue:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h]darkblueah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkcyan``h]h)}(hjh]hdarkcyan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:darkcyan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkcyanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod``h]h)}(hjh]h darkgoldenrod}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkgoldenrod:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h] darkgoldenrodah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod1``h]h)}(hj1h]hdarkgoldenrod1}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h*:darkgoldenrod1:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]darkgoldenrod1ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod2``h]h)}(hj{h]hdarkgoldenrod2}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h*:darkgoldenrod2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkgoldenrod2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod3``h]h)}(hjh]hdarkgoldenrod3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkgoldenrod3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkgoldenrod3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkgoldenrod4``h]h)}(hjh]hdarkgoldenrod4}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkgoldenrod4:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]darkgoldenrod4ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgray``h]h)}(hjYh]hdarkgray}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h$:darkgray:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h]darkgrayah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgreen``h]h)}(hjh]h darkgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:darkgreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkgreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkgrey``h]h)}(hjh]hdarkgrey}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:darkgrey:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h]darkgreyah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkkhaki``h]h)}(hj7h]h darkkhaki}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h%:darkkhaki:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h] darkkhakiah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkmagenta``h]h)}(hjh]h darkmagenta}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h':darkmagenta:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkmagentaah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen``h]h)}(hjh]hdarkolivegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:darkolivegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen1``h]h)}(hjh]hdarkolivegreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h+:darkolivegreen1:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h]darkolivegreen1ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen2``h]h)}(hj_h]hdarkolivegreen2}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h+:darkolivegreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen2ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen3``h]h)}(hjh]hdarkolivegreen3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:darkolivegreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkolivegreen4``h]h)}(hjh]hdarkolivegreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:darkolivegreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]darkolivegreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange``h]h)}(hj=h]h darkorange}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h&:darkorange:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] darkorangeah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange1``h]h)}(hjh]h darkorange1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange2``h]h)}(hjh]h darkorange2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange3``h]h)}(hjh]h darkorange3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorange3:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h] darkorange3ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorange4``h]h)}(hjeh]h darkorange4}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h':darkorange4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorange4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid``h]h)}(hjh]h darkorchid}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:darkorchid:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchidah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid1``h]h)}(hjh]h darkorchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid2``h]h)}(hjCh]h darkorchid2}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h':darkorchid2:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] darkorchid2ah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid3``h]h)}(hjh]h darkorchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkorchid4``h]h)}(hjh]h darkorchid4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':darkorchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkorchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``darkred``h]h)}(hj!h]hdarkred}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:darkred:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h]darkredah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darksalmon``h]h)}(hjkh]h darksalmon}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h&:darksalmon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darksalmonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen``h]h)}(hjh]h darkseagreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:darkseagreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen1``h]h)}(hjh]h darkseagreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen1:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h] darkseagreen1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen2``h]h)}(hjIh]h darkseagreen2}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h):darkseagreen2:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] darkseagreen2ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen3``h]h)}(hjh]h darkseagreen3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkseagreen4``h]h)}(hjh]h darkseagreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):darkseagreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] darkseagreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslateblue``h]h)}(hj' h]h darkslateblue}hj) sbah}(h]h]h]h]h!]uh%hhj% ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj" ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h):darkslateblue:`████████`h]h_)}(hjG h]h████████}hjI sbah}(h]h] darkslateblueah]h]h!]uh%h^hjE ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjB ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray``h]h)}(hjq h]h darkslategray}hjs sbah}(h]h]h]h]h!]uh%hhjo ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjl ubah}(h]h]h]h]h!]uh%hhji ubh)}(hhh]hS)}(h):darkslategray:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h] darkslategrayah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhji ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray1``h]h)}(hj h]hdarkslategray1}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h*:darkslategray1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]darkslategray1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray2``h]h)}(hj!h]hdarkslategray2}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h*:darkslategray2:`████████`h]h_)}(hj%!h]h████████}hj'!sbah}(h]h]darkslategray2ah]h]h!]uh%h^hj#!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj !ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray3``h]h)}(hjO!h]hdarkslategray3}hjQ!sbah}(h]h]h]h]h!]uh%hhjM!ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJ!ubah}(h]h]h]h]h!]uh%hhjG!ubh)}(hhh]hS)}(h*:darkslategray3:`████████`h]h_)}(hjo!h]h████████}hjq!sbah}(h]h]darkslategray3ah]h]h!]uh%h^hjm!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjj!ubah}(h]h]h]h]h!]uh%hhjG!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategray4``h]h)}(hj!h]hdarkslategray4}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h*:darkslategray4:`████████`h]h_)}(hj!h]h████████}hj!sbah}(h]h]darkslategray4ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkslategrey``h]h)}(hj!h]h darkslategrey}hj!sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h):darkslategrey:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h] darkslategreyah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj!ubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkturquoise``h]h)}(hj-"h]h darkturquoise}hj/"sbah}(h]h]h]h]h!]uh%hhj+"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj("ubah}(h]h]h]h]h!]uh%hhj%"ubh)}(hhh]hS)}(h):darkturquoise:`████████`h]h_)}(hjM"h]h████████}hjO"sbah}(h]h] darkturquoiseah]h]h!]uh%h^hjK"ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjH"ubah}(h]h]h]h]h!]uh%hhj%"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``darkviolet``h]h)}(hjw"h]h darkviolet}hjy"sbah}(h]h]h]h]h!]uh%hhju"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjr"ubah}(h]h]h]h]h!]uh%hhjo"ubh)}(hhh]hS)}(h&:darkviolet:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h] darkvioletah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhjo"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink``h]h)}(hj"h]hdeeppink}hj"sbah}(h]h]h]h]h!]uh%hhj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhj"ubh)}(hhh]hS)}(h$:deeppink:`████████`h]h_)}(hj"h]h████████}hj"sbah}(h]h]deeppinkah]h]h!]uh%h^hj"ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhj"ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink1``h]h)}(hj #h]h deeppink1}hj #sbah}(h]h]h]h]h!]uh%hhj #ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink1:`████████`h]h_)}(hj+#h]h████████}hj-#sbah}(h]h] deeppink1ah]h]h!]uh%h^hj)#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&#ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink2``h]h)}(hjU#h]h deeppink2}hjW#sbah}(h]h]h]h]h!]uh%hhjS#ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP#ubah}(h]h]h]h]h!]uh%hhjM#ubh)}(hhh]hS)}(h%:deeppink2:`████████`h]h_)}(hju#h]h████████}hjw#sbah}(h]h] deeppink2ah]h]h!]uh%h^hjs#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjp#ubah}(h]h]h]h]h!]uh%hhjM#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink3``h]h)}(hj#h]h deeppink3}hj#sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink3:`████████`h]h_)}(hj#h]h████████}hj#sbah}(h]h] deeppink3ah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``deeppink4``h]h)}(hj#h]h deeppink4}hj#sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj#ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:deeppink4:`████████`h]h_)}(hj $h]h████████}hj $sbah}(h]h] deeppink4ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue``h]h)}(hj3$h]h deepskyblue}hj5$sbah}(h]h]h]h]h!]uh%hhj1$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.$ubah}(h]h]h]h]h!]uh%hhj+$ubh)}(hhh]hS)}(h':deepskyblue:`████████`h]h_)}(hjS$h]h████████}hjU$sbah}(h]h] deepskyblueah]h]h!]uh%h^hjQ$ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjN$ubah}(h]h]h]h]h!]uh%hhj+$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue1``h]h)}(hj}$h]h deepskyblue1}hj$sbah}(h]h]h]h]h!]uh%hhj{$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx$ubah}(h]h]h]h]h!]uh%hhju$ubh)}(hhh]hS)}(h(:deepskyblue1:`████████`h]h_)}(hj$h]h████████}hj$sbah}(h]h] deepskyblue1ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhju$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue2``h]h)}(hj$h]h deepskyblue2}hj$sbah}(h]h]h]h]h!]uh%hhj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj$ubh)}(hhh]hS)}(h(:deepskyblue2:`████████`h]h_)}(hj$h]h████████}hj$sbah}(h]h] deepskyblue2ah]h]h!]uh%h^hj$ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj$ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue3``h]h)}(hj%h]h deepskyblue3}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj %ubah}(h]h]h]h]h!]uh%hhj %ubh)}(hhh]hS)}(h(:deepskyblue3:`████████`h]h_)}(hj1%h]h████████}hj3%sbah}(h]h] deepskyblue3ah]h]h!]uh%h^hj/%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,%ubah}(h]h]h]h]h!]uh%hhj %ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``deepskyblue4``h]h)}(hj[%h]h deepskyblue4}hj]%sbah}(h]h]h]h]h!]uh%hhjY%ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV%ubah}(h]h]h]h]h!]uh%hhjS%ubh)}(hhh]hS)}(h(:deepskyblue4:`████████`h]h_)}(hj{%h]h████████}hj}%sbah}(h]h] deepskyblue4ah]h]h!]uh%h^hjy%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjv%ubah}(h]h]h]h]h!]uh%hhjS%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``dimgray``h]h)}(hj%h]hdimgray}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h#:dimgray:`████████`h]h_)}(hj%h]h████████}hj%sbah}(h]h]dimgrayah]h]h!]uh%h^hj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``dimgrey``h]h)}(hj%h]hdimgrey}hj%sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj%ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h#:dimgrey:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h]dimgreyah]h]h!]uh%h^hj &ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj &ubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue``h]h)}(hj9&h]h dodgerblue}hj;&sbah}(h]h]h]h]h!]uh%hhj7&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4&ubah}(h]h]h]h]h!]uh%hhj1&ubh)}(hhh]hS)}(h&:dodgerblue:`████████`h]h_)}(hjY&h]h████████}hj[&sbah}(h]h] dodgerblueah]h]h!]uh%h^hjW&ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjT&ubah}(h]h]h]h]h!]uh%hhj1&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue1``h]h)}(hj&h]h dodgerblue1}hj&sbah}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~&ubah}(h]h]h]h]h!]uh%hhj{&ubh)}(hhh]hS)}(h':dodgerblue1:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h] dodgerblue1ah]h]h!]uh%h^hj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj{&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue2``h]h)}(hj&h]h dodgerblue2}hj&sbah}(h]h]h]h]h!]uh%hhj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj&ubh)}(hhh]hS)}(h':dodgerblue2:`████████`h]h_)}(hj&h]h████████}hj&sbah}(h]h] dodgerblue2ah]h]h!]uh%h^hj&ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj&ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue3``h]h)}(hj'h]h dodgerblue3}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h':dodgerblue3:`████████`h]h_)}(hj7'h]h████████}hj9'sbah}(h]h] dodgerblue3ah]h]h!]uh%h^hj5'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2'ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``dodgerblue4``h]h)}(hja'h]h dodgerblue4}hjc'sbah}(h]h]h]h]h!]uh%hhj_'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\'ubah}(h]h]h]h]h!]uh%hhjY'ubh)}(hhh]hS)}(h':dodgerblue4:`████████`h]h_)}(hj'h]h████████}hj'sbah}(h]h] dodgerblue4ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|'ubah}(h]h]h]h]h!]uh%hhjY'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``firebrick``h]h)}(hj'h]h firebrick}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h%:firebrick:`████████`h]h_)}(hj'h]h████████}hj'sbah}(h]h] firebrickah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick1``h]h)}(hj'h]h firebrick1}hj'sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj'ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h&:firebrick1:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick1ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick2``h]h)}(hj?(h]h firebrick2}hjA(sbah}(h]h]h]h]h!]uh%hhj=(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:(ubah}(h]h]h]h]h!]uh%hhj7(ubh)}(hhh]hS)}(h&:firebrick2:`████████`h]h_)}(hj_(h]h████████}hja(sbah}(h]h] firebrick2ah]h]h!]uh%h^hj](ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZ(ubah}(h]h]h]h]h!]uh%hhj7(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick3``h]h)}(hj(h]h firebrick3}hj(sbah}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubh)}(hhh]hS)}(h&:firebrick3:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick3ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``firebrick4``h]h)}(hj(h]h firebrick4}hj(sbah}(h]h]h]h]h!]uh%hhj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubh)}(hhh]hS)}(h&:firebrick4:`████████`h]h_)}(hj(h]h████████}hj(sbah}(h]h] firebrick4ah]h]h!]uh%h^hj(ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj(ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``floralwhite``h]h)}(hj)h]h floralwhite}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h':floralwhite:`████████`h]h_)}(hj=)h]h████████}hj?)sbah}(h]h] floralwhiteah]h]h!]uh%h^hj;)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8)ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``forestgreen``h]h)}(hjg)h]h forestgreen}hji)sbah}(h]h]h]h]h!]uh%hhje)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjb)ubah}(h]h]h]h]h!]uh%hhj_)ubh)}(hhh]hS)}(h':forestgreen:`████████`h]h_)}(hj)h]h████████}hj)sbah}(h]h] forestgreenah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj_)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``fuchsia``h]h)}(hj)h]hfuchsia}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h#:fuchsia:`████████`h]h_)}(hj)h]h████████}hj)sbah}(h]h]fuchsiaah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gainsboro``h]h)}(hj)h]h gainsboro}hj)sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj)ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h%:gainsboro:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h] gainsboroah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``ghostwhite``h]h)}(hjE*h]h ghostwhite}hjG*sbah}(h]h]h]h]h!]uh%hhjC*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@*ubah}(h]h]h]h]h!]uh%hhj=*ubh)}(hhh]hS)}(h&:ghostwhite:`████████`h]h_)}(hje*h]h████████}hjg*sbah}(h]h] ghostwhiteah]h]h!]uh%h^hjc*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`*ubah}(h]h]h]h]h!]uh%hhj=*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``gold``h]h)}(hj*h]hgold}hj*sbah}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubh)}(hhh]hS)}(h :gold:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h]goldah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold1``h]h)}(hj*h]hgold1}hj*sbah}(h]h]h]h]h!]uh%hhj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubh)}(hhh]hS)}(h!:gold1:`████████`h]h_)}(hj*h]h████████}hj*sbah}(h]h]gold1ah]h]h!]uh%h^hj*ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhj*ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold2``h]h)}(hj#+h]hgold2}hj%+sbah}(h]h]h]h]h!]uh%hhj!+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h!:gold2:`████████`h]h_)}(hjC+h]h████████}hjE+sbah}(h]h]gold2ah]h]h!]uh%h^hjA+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>+ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold3``h]h)}(hjm+h]hgold3}hjo+sbah}(h]h]h]h]h!]uh%hhjk+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjh+ubah}(h]h]h]h]h!]uh%hhje+ubh)}(hhh]hS)}(h!:gold3:`████████`h]h_)}(hj+h]h████████}hj+sbah}(h]h]gold3ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhje+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gold4``h]h)}(hj+h]hgold4}hj+sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h!:gold4:`████████`h]h_)}(hj+h]h████████}hj+sbah}(h]h]gold4ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``goldenrod``h]h)}(hj,h]h goldenrod}hj,sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj+ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h%:goldenrod:`████████`h]h_)}(hj!,h]h████████}hj#,sbah}(h]h] goldenrodah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod1``h]h)}(hjK,h]h goldenrod1}hjM,sbah}(h]h]h]h]h!]uh%hhjI,ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjF,ubah}(h]h]h]h]h!]uh%hhjC,ubh)}(hhh]hS)}(h&:goldenrod1:`████████`h]h_)}(hjk,h]h████████}hjm,sbah}(h]h] goldenrod1ah]h]h!]uh%h^hji,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjf,ubah}(h]h]h]h]h!]uh%hhjC,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod2``h]h)}(hj,h]h goldenrod2}hj,sbah}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubh)}(hhh]hS)}(h&:goldenrod2:`████████`h]h_)}(hj,h]h████████}hj,sbah}(h]h] goldenrod2ah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod3``h]h)}(hj,h]h goldenrod3}hj,sbah}(h]h]h]h]h!]uh%hhj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubh)}(hhh]hS)}(h&:goldenrod3:`████████`h]h_)}(hj,h]h████████}hj-sbah}(h]h] goldenrod3ah]h]h!]uh%h^hj,ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj,ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``goldenrod4``h]h)}(hj)-h]h goldenrod4}hj+-sbah}(h]h]h]h]h!]uh%hhj'-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$-ubah}(h]h]h]h]h!]uh%hhj!-ubh)}(hhh]hS)}(h&:goldenrod4:`████████`h]h_)}(hjI-h]h████████}hjK-sbah}(h]h] goldenrod4ah]h]h!]uh%h^hjG-ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjD-ubah}(h]h]h]h]h!]uh%hhj!-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``gray``h]h)}(hjs-h]hgray}hju-sbah}(h]h]h]h]h!]uh%hhjq-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjn-ubah}(h]h]h]h]h!]uh%hhjk-ubh)}(hhh]hS)}(h :gray:`████████`h]h_)}(hj-h]h████████}hj-sbah}(h]h]grayah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhjk-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray0``h]h)}(hj-h]hgray0}hj-sbah}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h!:gray0:`████████`h]h_)}(hj-h]h████████}hj-sbah}(h]h]gray0ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj-ubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray1``h]h)}(hj.h]hgray1}hj .sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h!:gray1:`████████`h]h_)}(hj'.h]h████████}hj).sbah}(h]h]gray1ah]h]h!]uh%h^hj%.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj".ubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray2``h]h)}(hjQ.h]hgray2}hjS.sbah}(h]h]h]h]h!]uh%hhjO.ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjL.ubah}(h]h]h]h]h!]uh%hhjI.ubh)}(hhh]hS)}(h!:gray2:`████████`h]h_)}(hjq.h]h████████}hjs.sbah}(h]h]gray2ah]h]h!]uh%h^hjo.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjl.ubah}(h]h]h]h]h!]uh%hhjI.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray3``h]h)}(hj.h]hgray3}hj.sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubh)}(hhh]hS)}(h!:gray3:`████████`h]h_)}(hj.h]h████████}hj.sbah}(h]h]gray3ah]h]h!]uh%h^hj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray4``h]h)}(hj.h]hgray4}hj.sbah}(h]h]h]h]h!]uh%hhj.ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj.ubh)}(hhh]hS)}(h!:gray4:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray4ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray5``h]h)}(hj//h]hgray5}hj1/sbah}(h]h]h]h]h!]uh%hhj-/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*/ubah}(h]h]h]h]h!]uh%hhj'/ubh)}(hhh]hS)}(h!:gray5:`████████`h]h_)}(hjO/h]h████████}hjQ/sbah}(h]h]gray5ah]h]h!]uh%h^hjM/ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJ/ubah}(h]h]h]h]h!]uh%hhj'/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray6``h]h)}(hjy/h]hgray6}hj{/sbah}(h]h]h]h]h!]uh%hhjw/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjt/ubah}(h]h]h]h]h!]uh%hhjq/ubh)}(hhh]hS)}(h!:gray6:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray6ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhjq/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray7``h]h)}(hj/h]hgray7}hj/sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h!:gray7:`████████`h]h_)}(hj/h]h████████}hj/sbah}(h]h]gray7ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj/ubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray8``h]h)}(hj 0h]hgray8}hj0sbah}(h]h]h]h]h!]uh%hhj 0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h!:gray8:`████████`h]h_)}(hj-0h]h████████}hj/0sbah}(h]h]gray8ah]h]h!]uh%h^hj+0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(0ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray9``h]h)}(hjW0h]hgray9}hjY0sbah}(h]h]h]h]h!]uh%hhjU0ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjR0ubah}(h]h]h]h]h!]uh%hhjO0ubh)}(hhh]hS)}(h!:gray9:`████████`h]h_)}(hjw0h]h████████}hjy0sbah}(h]h]gray9ah]h]h!]uh%h^hju0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjr0ubah}(h]h]h]h]h!]uh%hhjO0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray10``h]h)}(hj0h]hgray10}hj0sbah}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h":gray10:`████████`h]h_)}(hj0h]h████████}hj0sbah}(h]h]gray10ah]h]h!]uh%h^hj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray11``h]h)}(hj0h]hgray11}hj0sbah}(h]h]h]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj0ubh)}(hhh]hS)}(h":gray11:`████████`h]h_)}(hj 1h]h████████}hj 1sbah}(h]h]gray11ah]h]h!]uh%h^hj 1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj0ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray12``h]h)}(hj51h]hgray12}hj71sbah}(h]h]h]h]h!]uh%hhj31ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj01ubah}(h]h]h]h]h!]uh%hhj-1ubh)}(hhh]hS)}(h":gray12:`████████`h]h_)}(hjU1h]h████████}hjW1sbah}(h]h]gray12ah]h]h!]uh%h^hjS1ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP1ubah}(h]h]h]h]h!]uh%hhj-1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray13``h]h)}(hj1h]hgray13}hj1sbah}(h]h]h]h]h!]uh%hhj}1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz1ubah}(h]h]h]h]h!]uh%hhjw1ubh)}(hhh]hS)}(h":gray13:`████████`h]h_)}(hj1h]h████████}hj1sbah}(h]h]gray13ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhjw1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray14``h]h)}(hj1h]hgray14}hj1sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h":gray14:`████████`h]h_)}(hj1h]h████████}hj1sbah}(h]h]gray14ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj1ubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray15``h]h)}(hj2h]hgray15}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj 2ubh)}(hhh]hS)}(h":gray15:`████████`h]h_)}(hj32h]h████████}hj52sbah}(h]h]gray15ah]h]h!]uh%h^hj12ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.2ubah}(h]h]h]h]h!]uh%hhj 2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray16``h]h)}(hj]2h]hgray16}hj_2sbah}(h]h]h]h]h!]uh%hhj[2ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX2ubah}(h]h]h]h]h!]uh%hhjU2ubh)}(hhh]hS)}(h":gray16:`████████`h]h_)}(hj}2h]h████████}hj2sbah}(h]h]gray16ah]h]h!]uh%h^hj{2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx2ubah}(h]h]h]h]h!]uh%hhjU2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray17``h]h)}(hj2h]hgray17}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubh)}(hhh]hS)}(h":gray17:`████████`h]h_)}(hj2h]h████████}hj2sbah}(h]h]gray17ah]h]h!]uh%h^hj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray18``h]h)}(hj2h]hgray18}hj2sbah}(h]h]h]h]h!]uh%hhj2ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj2ubh)}(hhh]hS)}(h":gray18:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray18ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj 3ubah}(h]h]h]h]h!]uh%hhj2ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray19``h]h)}(hj;3h]hgray19}hj=3sbah}(h]h]h]h]h!]uh%hhj93ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj63ubah}(h]h]h]h]h!]uh%hhj33ubh)}(hhh]hS)}(h":gray19:`████████`h]h_)}(hj[3h]h████████}hj]3sbah}(h]h]gray19ah]h]h!]uh%h^hjY3ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV3ubah}(h]h]h]h]h!]uh%hhj33ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray20``h]h)}(hj3h]hgray20}hj3sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj}3ubh)}(hhh]hS)}(h":gray20:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray20ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj}3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray21``h]h)}(hj3h]hgray21}hj3sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h":gray21:`████████`h]h_)}(hj3h]h████████}hj3sbah}(h]h]gray21ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj3ubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray22``h]h)}(hj4h]hgray22}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray22:`████████`h]h_)}(hj94h]h████████}hj;4sbah}(h]h]gray22ah]h]h!]uh%h^hj74ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj44ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray23``h]h)}(hjc4h]hgray23}hje4sbah}(h]h]h]h]h!]uh%hhja4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^4ubah}(h]h]h]h]h!]uh%hhj[4ubh)}(hhh]hS)}(h":gray23:`████████`h]h_)}(hj4h]h████████}hj4sbah}(h]h]gray23ah]h]h!]uh%h^hj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~4ubah}(h]h]h]h]h!]uh%hhj[4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray24``h]h)}(hj4h]hgray24}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray24:`████████`h]h_)}(hj4h]h████████}hj4sbah}(h]h]gray24ah]h]h!]uh%h^hj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray25``h]h)}(hj4h]hgray25}hj4sbah}(h]h]h]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj4ubh)}(hhh]hS)}(h":gray25:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray25ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj4ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray26``h]h)}(hjA5h]hgray26}hjC5sbah}(h]h]h]h]h!]uh%hhj?5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<5ubah}(h]h]h]h]h!]uh%hhj95ubh)}(hhh]hS)}(h":gray26:`████████`h]h_)}(hja5h]h████████}hjc5sbah}(h]h]gray26ah]h]h!]uh%h^hj_5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\5ubah}(h]h]h]h]h!]uh%hhj95ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray27``h]h)}(hj5h]hgray27}hj5sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h":gray27:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray27ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray28``h]h)}(hj5h]hgray28}hj5sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h":gray28:`████████`h]h_)}(hj5h]h████████}hj5sbah}(h]h]gray28ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj5ubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray29``h]h)}(hj6h]hgray29}hj!6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray29:`████████`h]h_)}(hj?6h]h████████}hjA6sbah}(h]h]gray29ah]h]h!]uh%h^hj=6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:6ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray30``h]h)}(hji6h]hgray30}hjk6sbah}(h]h]h]h]h!]uh%hhjg6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjd6ubah}(h]h]h]h]h!]uh%hhja6ubh)}(hhh]hS)}(h":gray30:`████████`h]h_)}(hj6h]h████████}hj6sbah}(h]h]gray30ah]h]h!]uh%h^hj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhja6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray31``h]h)}(hj6h]hgray31}hj6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray31:`████████`h]h_)}(hj6h]h████████}hj6sbah}(h]h]gray31ah]h]h!]uh%h^hj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray32``h]h)}(hj6h]hgray32}hj6sbah}(h]h]h]h]h!]uh%hhj6ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhj6ubh)}(hhh]hS)}(h":gray32:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray32ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj6ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray33``h]h)}(hjG7h]hgray33}hjI7sbah}(h]h]h]h]h!]uh%hhjE7ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjB7ubah}(h]h]h]h]h!]uh%hhj?7ubh)}(hhh]hS)}(h":gray33:`████████`h]h_)}(hjg7h]h████████}hji7sbah}(h]h]gray33ah]h]h!]uh%h^hje7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjb7ubah}(h]h]h]h]h!]uh%hhj?7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray34``h]h)}(hj7h]hgray34}hj7sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h":gray34:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray34ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray35``h]h)}(hj7h]hgray35}hj7sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h":gray35:`████████`h]h_)}(hj7h]h████████}hj7sbah}(h]h]gray35ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj7ubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray36``h]h)}(hj%8h]hgray36}hj'8sbah}(h]h]h]h]h!]uh%hhj#8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj 8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray36:`████████`h]h_)}(hjE8h]h████████}hjG8sbah}(h]h]gray36ah]h]h!]uh%h^hjC8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@8ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray37``h]h)}(hjo8h]hgray37}hjq8sbah}(h]h]h]h]h!]uh%hhjm8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjj8ubah}(h]h]h]h]h!]uh%hhjg8ubh)}(hhh]hS)}(h":gray37:`████████`h]h_)}(hj8h]h████████}hj8sbah}(h]h]gray37ah]h]h!]uh%h^hj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhjg8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray38``h]h)}(hj8h]hgray38}hj8sbah}(h]h]h]h]h!]uh%hhj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray38:`████████`h]h_)}(hj8h]h████████}hj8sbah}(h]h]gray38ah]h]h!]uh%h^hj8ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray39``h]h)}(hj9h]hgray39}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj8ubh)}(hhh]hS)}(h":gray39:`████████`h]h_)}(hj#9h]h████████}hj%9sbah}(h]h]gray39ah]h]h!]uh%h^hj!9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj8ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray40``h]h)}(hjM9h]hgray40}hjO9sbah}(h]h]h]h]h!]uh%hhjK9ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjH9ubah}(h]h]h]h]h!]uh%hhjE9ubh)}(hhh]hS)}(h":gray40:`████████`h]h_)}(hjm9h]h████████}hjo9sbah}(h]h]gray40ah]h]h!]uh%h^hjk9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjh9ubah}(h]h]h]h]h!]uh%hhjE9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray41``h]h)}(hj9h]hgray41}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h":gray41:`████████`h]h_)}(hj9h]h████████}hj9sbah}(h]h]gray41ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj9ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray42``h]h)}(hj9h]hgray42}hj9sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj9ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h":gray42:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray42ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj9ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray43``h]h)}(hj+:h]hgray43}hj-:sbah}(h]h]h]h]h!]uh%hhj):ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj&:ubah}(h]h]h]h]h!]uh%hhj#:ubh)}(hhh]hS)}(h":gray43:`████████`h]h_)}(hjK:h]h████████}hjM:sbah}(h]h]gray43ah]h]h!]uh%h^hjI:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjF:ubah}(h]h]h]h]h!]uh%hhj#:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray44``h]h)}(hju:h]hgray44}hjw:sbah}(h]h]h]h]h!]uh%hhjs:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjp:ubah}(h]h]h]h]h!]uh%hhjm:ubh)}(hhh]hS)}(h":gray44:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray44ah]h]h!]uh%h^hj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhjm:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray45``h]h)}(hj:h]hgray45}hj:sbah}(h]h]h]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhj:ubh)}(hhh]hS)}(h":gray45:`████████`h]h_)}(hj:h]h████████}hj:sbah}(h]h]gray45ah]h]h!]uh%h^hj:ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj:ubah}(h]h]h]h]h!]uh%hhj:ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray46``h]h)}(hj ;h]hgray46}hj ;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray46:`████████`h]h_)}(hj);h]h████████}hj+;sbah}(h]h]gray46ah]h]h!]uh%h^hj';ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj$;ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray47``h]h)}(hjS;h]hgray47}hjU;sbah}(h]h]h]h]h!]uh%hhjQ;ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjN;ubah}(h]h]h]h]h!]uh%hhjK;ubh)}(hhh]hS)}(h":gray47:`████████`h]h_)}(hjs;h]h████████}hju;sbah}(h]h]gray47ah]h]h!]uh%h^hjq;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjn;ubah}(h]h]h]h]h!]uh%hhjK;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray48``h]h)}(hj;h]hgray48}hj;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray48:`████████`h]h_)}(hj;h]h████████}hj;sbah}(h]h]gray48ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray49``h]h)}(hj;h]hgray49}hj;sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj;ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h":gray49:`████████`h]h_)}(hj<h]h████████}hj <sbah}(h]h]gray49ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray50``h]h)}(hj1<h]hgray50}hj3<sbah}(h]h]h]h]h!]uh%hhj/<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,<ubah}(h]h]h]h]h!]uh%hhj)<ubh)}(hhh]hS)}(h":gray50:`████████`h]h_)}(hjQ<h]h████████}hjS<sbah}(h]h]gray50ah]h]h!]uh%h^hjO<ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjL<ubah}(h]h]h]h]h!]uh%hhj)<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray51``h]h)}(hj{<h]hgray51}hj}<sbah}(h]h]h]h]h!]uh%hhjy<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjv<ubah}(h]h]h]h]h!]uh%hhjs<ubh)}(hhh]hS)}(h":gray51:`████████`h]h_)}(hj<h]h████████}hj<sbah}(h]h]gray51ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjs<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray52``h]h)}(hj<h]hgray52}hj<sbah}(h]h]h]h]h!]uh%hhj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj<ubh)}(hhh]hS)}(h":gray52:`████████`h]h_)}(hj<h]h████████}hj<sbah}(h]h]gray52ah]h]h!]uh%h^hj<ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj<ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray53``h]h)}(hj=h]hgray53}hj=sbah}(h]h]h]h]h!]uh%hhj =ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj =ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray53:`████████`h]h_)}(hj/=h]h████████}hj1=sbah}(h]h]gray53ah]h]h!]uh%h^hj-=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*=ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray54``h]h)}(hjY=h]hgray54}hj[=sbah}(h]h]h]h]h!]uh%hhjW=ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjT=ubah}(h]h]h]h]h!]uh%hhjQ=ubh)}(hhh]hS)}(h":gray54:`████████`h]h_)}(hjy=h]h████████}hj{=sbah}(h]h]gray54ah]h]h!]uh%h^hjw=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjt=ubah}(h]h]h]h]h!]uh%hhjQ=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray55``h]h)}(hj=h]hgray55}hj=sbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray55:`████████`h]h_)}(hj=h]h████████}hj=sbah}(h]h]gray55ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray56``h]h)}(hj=h]hgray56}hj=sbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj=ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":gray56:`████████`h]h_)}(hj >h]h████████}hj>sbah}(h]h]gray56ah]h]h!]uh%h^hj >ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray57``h]h)}(hj7>h]hgray57}hj9>sbah}(h]h]h]h]h!]uh%hhj5>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2>ubah}(h]h]h]h]h!]uh%hhj/>ubh)}(hhh]hS)}(h":gray57:`████████`h]h_)}(hjW>h]h████████}hjY>sbah}(h]h]gray57ah]h]h!]uh%h^hjU>ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjR>ubah}(h]h]h]h]h!]uh%hhj/>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray58``h]h)}(hj>h]hgray58}hj>sbah}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|>ubah}(h]h]h]h]h!]uh%hhjy>ubh)}(hhh]hS)}(h":gray58:`████████`h]h_)}(hj>h]h████████}hj>sbah}(h]h]gray58ah]h]h!]uh%h^hj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhjy>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray59``h]h)}(hj>h]hgray59}hj>sbah}(h]h]h]h]h!]uh%hhj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj>ubh)}(hhh]hS)}(h":gray59:`████████`h]h_)}(hj>h]h████████}hj>sbah}(h]h]gray59ah]h]h!]uh%h^hj>ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj>ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray60``h]h)}(hj?h]hgray60}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj ?ubh)}(hhh]hS)}(h":gray60:`████████`h]h_)}(hj5?h]h████████}hj7?sbah}(h]h]gray60ah]h]h!]uh%h^hj3?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0?ubah}(h]h]h]h]h!]uh%hhj ?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray61``h]h)}(hj_?h]hgray61}hja?sbah}(h]h]h]h]h!]uh%hhj]?ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZ?ubah}(h]h]h]h]h!]uh%hhjW?ubh)}(hhh]hS)}(h":gray61:`████████`h]h_)}(hj?h]h████████}hj?sbah}(h]h]gray61ah]h]h!]uh%h^hj}?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz?ubah}(h]h]h]h]h!]uh%hhjW?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray62``h]h)}(hj?h]hgray62}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":gray62:`████████`h]h_)}(hj?h]h████████}hj?sbah}(h]h]gray62ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray63``h]h)}(hj?h]hgray63}hj?sbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj?ubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h":gray63:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray63ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray64``h]h)}(hj=@h]hgray64}hj?@sbah}(h]h]h]h]h!]uh%hhj;@ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8@ubah}(h]h]h]h]h!]uh%hhj5@ubh)}(hhh]hS)}(h":gray64:`████████`h]h_)}(hj]@h]h████████}hj_@sbah}(h]h]gray64ah]h]h!]uh%h^hj[@ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX@ubah}(h]h]h]h]h!]uh%hhj5@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray65``h]h)}(hj@h]hgray65}hj@sbah}(h]h]h]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj@ubah}(h]h]h]h]h!]uh%hhj@ubh)}(hhh]hS)}(h":gray65:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray65ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj@ubah}(h]h]h]h]h!]uh%hhj@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray66``h]h)}(hj@h]hgray66}hj@sbah}(h]h]h]h]h!]uh%hhj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj@ubah}(h]h]h]h]h!]uh%hhj@ubh)}(hhh]hS)}(h":gray66:`████████`h]h_)}(hj@h]h████████}hj@sbah}(h]h]gray66ah]h]h!]uh%h^hj@ubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj@ubah}(h]h]h]h]h!]uh%hhj@ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray67``h]h)}(hjAh]hgray67}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M"hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray67:`████████`h]h_)}(hj;Ah]h████████}hj=Asbah}(h]h]gray67ah]h]h!]uh%h^hj9Aubah}(h]h]h]h]h!]uh%hRh'h?h)M"hj6Aubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray68``h]h)}(hjeAh]hgray68}hjgAsbah}(h]h]h]h]h!]uh%hhjcAubah}(h]h]h]h]h!]uh%hRh'h?h)M#hj`Aubah}(h]h]h]h]h!]uh%hhj]Aubh)}(hhh]hS)}(h":gray68:`████████`h]h_)}(hjAh]h████████}hjAsbah}(h]h]gray68ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)M#hjAubah}(h]h]h]h]h!]uh%hhj]Aubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray69``h]h)}(hjAh]hgray69}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray69:`████████`h]h_)}(hjAh]h████████}hjAsbah}(h]h]gray69ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjAubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray70``h]h)}(hjAh]hgray70}hjAsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjAubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h":gray70:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray70ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjBubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray71``h]h)}(hjCBh]hgray71}hjEBsbah}(h]h]h]h]h!]uh%hhjABubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj>Bubah}(h]h]h]h]h!]uh%hhj;Bubh)}(hhh]hS)}(h":gray71:`████████`h]h_)}(hjcBh]h████████}hjeBsbah}(h]h]gray71ah]h]h!]uh%h^hjaBubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj^Bubah}(h]h]h]h]h!]uh%hhj;Bubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray72``h]h)}(hjBh]hgray72}hjBsbah}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjBubah}(h]h]h]h]h!]uh%hhjBubh)}(hhh]hS)}(h":gray72:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray72ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjBubah}(h]h]h]h]h!]uh%hhjBubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray73``h]h)}(hjBh]hgray73}hjBsbah}(h]h]h]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjBubah}(h]h]h]h]h!]uh%hhjBubh)}(hhh]hS)}(h":gray73:`████████`h]h_)}(hjBh]h████████}hjBsbah}(h]h]gray73ah]h]h!]uh%h^hjBubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjBubah}(h]h]h]h]h!]uh%hhjBubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray74``h]h)}(hj!Ch]hgray74}hj#Csbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjCubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h":gray74:`████████`h]h_)}(hjACh]h████████}hjCCsbah}(h]h]gray74ah]h]h!]uh%h^hj?Cubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjhj.Iubah}(h]h]h]h]h!]uh%hhj+Iubh)}(hhh]hS)}(h":gray95:`████████`h]h_)}(hjSIh]h████████}hjUIsbah}(h]h]gray95ah]h]h!]uh%h^hjQIubah}(h]h]h]h]h!]uh%hRh'h?h)M>hjNIubah}(h]h]h]h]h!]uh%hhj+Iubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray96``h]h)}(hj}Ih]hgray96}hjIsbah}(h]h]h]h]h!]uh%hhj{Iubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjxIubah}(h]h]h]h]h!]uh%hhjuIubh)}(hhh]hS)}(h":gray96:`████████`h]h_)}(hjIh]h████████}hjIsbah}(h]h]gray96ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjIubah}(h]h]h]h]h!]uh%hhjuIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray97``h]h)}(hjIh]hgray97}hjIsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjIubah}(h]h]h]h]h!]uh%hhjIubh)}(hhh]hS)}(h":gray97:`████████`h]h_)}(hjIh]h████████}hjIsbah}(h]h]gray97ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjIubah}(h]h]h]h]h!]uh%hhjIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray98``h]h)}(hjJh]hgray98}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj Jubah}(h]h]h]h]h!]uh%hhj Jubh)}(hhh]hS)}(h":gray98:`████████`h]h_)}(hj1Jh]h████████}hj3Jsbah}(h]h]gray98ah]h]h!]uh%h^hj/Jubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj,Jubah}(h]h]h]h]h!]uh%hhj Jubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray99``h]h)}(hj[Jh]hgray99}hj]Jsbah}(h]h]h]h]h!]uh%hhjYJubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjVJubah}(h]h]h]h]h!]uh%hhjSJubh)}(hhh]hS)}(h":gray99:`████████`h]h_)}(hj{Jh]h████████}hj}Jsbah}(h]h]gray99ah]h]h!]uh%h^hjyJubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjvJubah}(h]h]h]h]h!]uh%hhjSJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``gray100``h]h)}(hjJh]hgray100}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MChjJubah}(h]h]h]h]h!]uh%hhjJubh)}(hhh]hS)}(h#:gray100:`████████`h]h_)}(hjJh]h████████}hjJsbah}(h]h]gray100ah]h]h!]uh%h^hjJubah}(h]h]h]h]h!]uh%hRh'h?h)MChjJubah}(h]h]h]h]h!]uh%hhjJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green``h]h)}(hjJh]hgreen}hjJsbah}(h]h]h]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%hRh'h?h)MDhjJubah}(h]h]h]h]h!]uh%hhjJubh)}(hhh]hS)}(h!:green:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]greenah]h]h!]uh%h^hj Kubah}(h]h]h]h]h!]uh%hRh'h?h)MDhj Kubah}(h]h]h]h]h!]uh%hhjJubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green1``h]h)}(hj9Kh]hgreen1}hj;Ksbah}(h]h]h]h]h!]uh%hhj7Kubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4Kubah}(h]h]h]h]h!]uh%hhj1Kubh)}(hhh]hS)}(h":green1:`████████`h]h_)}(hjYKh]h████████}hj[Ksbah}(h]h]green1ah]h]h!]uh%h^hjWKubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTKubah}(h]h]h]h]h!]uh%hhj1Kubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green2``h]h)}(hjKh]hgreen2}hjKsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~Kubah}(h]h]h]h]h!]uh%hhj{Kubh)}(hhh]hS)}(h":green2:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]green2ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjKubah}(h]h]h]h]h!]uh%hhj{Kubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green3``h]h)}(hjKh]hgreen3}hjKsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjKubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h":green3:`████████`h]h_)}(hjKh]h████████}hjKsbah}(h]h]green3ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjKubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``green4``h]h)}(hjLh]hgreen4}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h":green4:`████████`h]h_)}(hj7Lh]h████████}hj9Lsbah}(h]h]green4ah]h]h!]uh%h^hj5Lubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2Lubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``greenyellow``h]h)}(hjaLh]h greenyellow}hjcLsbah}(h]h]h]h]h!]uh%hhj_Lubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\Lubah}(h]h]h]h]h!]uh%hhjYLubh)}(hhh]hS)}(h':greenyellow:`████████`h]h_)}(hjLh]h████████}hjLsbah}(h]h] greenyellowah]h]h!]uh%h^hjLubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|Lubah}(h]h]h]h]h!]uh%hhjYLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``grey``h]h)}(hjLh]hgrey}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h :grey:`████████`h]h_)}(hjLh]h████████}hjLsbah}(h]h]greyah]h]h!]uh%h^hjLubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjLubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey0``h]h)}(hjLh]hgrey0}hjLsbah}(h]h]h]h]h!]uh%hhjLubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjLubah}(h]h]h]h]h!]uh%hhjLubh)}(hhh]hS)}(h!:grey0:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey0ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjMubah}(h]h]h]h]h!]uh%hhjLubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey1``h]h)}(hj?Mh]hgrey1}hjAMsbah}(h]h]h]h]h!]uh%hhj=Mubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:Mubah}(h]h]h]h]h!]uh%hhj7Mubh)}(hhh]hS)}(h!:grey1:`████████`h]h_)}(hj_Mh]h████████}hjaMsbah}(h]h]grey1ah]h]h!]uh%h^hj]Mubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZMubah}(h]h]h]h]h!]uh%hhj7Mubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey2``h]h)}(hjMh]hgrey2}hjMsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjMubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h!:grey2:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey2ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjMubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey3``h]h)}(hjMh]hgrey3}hjMsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjMubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h!:grey3:`████████`h]h_)}(hjMh]h████████}hjMsbah}(h]h]grey3ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjMubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey4``h]h)}(hjNh]hgrey4}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey4:`████████`h]h_)}(hj=Nh]h████████}hj?Nsbah}(h]h]grey4ah]h]h!]uh%h^hj;Nubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8Nubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey5``h]h)}(hjgNh]hgrey5}hjiNsbah}(h]h]h]h]h!]uh%hhjeNubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbNubah}(h]h]h]h]h!]uh%hhj_Nubh)}(hhh]hS)}(h!:grey5:`████████`h]h_)}(hjNh]h████████}hjNsbah}(h]h]grey5ah]h]h!]uh%h^hjNubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjNubah}(h]h]h]h]h!]uh%hhj_Nubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey6``h]h)}(hjNh]hgrey6}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey6:`████████`h]h_)}(hjNh]h████████}hjNsbah}(h]h]grey6ah]h]h!]uh%h^hjNubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjNubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey7``h]h)}(hjNh]hgrey7}hjNsbah}(h]h]h]h]h!]uh%hhjNubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjNubah}(h]h]h]h]h!]uh%hhjNubh)}(hhh]hS)}(h!:grey7:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey7ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjOubah}(h]h]h]h]h!]uh%hhjNubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey8``h]h)}(hjEOh]hgrey8}hjGOsbah}(h]h]h]h]h!]uh%hhjCOubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@Oubah}(h]h]h]h]h!]uh%hhj=Oubh)}(hhh]hS)}(h!:grey8:`████████`h]h_)}(hjeOh]h████████}hjgOsbah}(h]h]grey8ah]h]h!]uh%h^hjcOubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`Oubah}(h]h]h]h]h!]uh%hhj=Oubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey9``h]h)}(hjOh]hgrey9}hjOsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MThjOubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h!:grey9:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey9ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MThjOubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey10``h]h)}(hjOh]hgrey10}hjOsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjOubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h":grey10:`████████`h]h_)}(hjOh]h████████}hjOsbah}(h]h]grey10ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjOubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey11``h]h)}(hj#Ph]hgrey11}hj%Psbah}(h]h]h]h]h!]uh%hhj!Pubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey11:`████████`h]h_)}(hjCPh]h████████}hjEPsbah}(h]h]grey11ah]h]h!]uh%h^hjAPubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>Pubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey12``h]h)}(hjmPh]hgrey12}hjoPsbah}(h]h]h]h]h!]uh%hhjkPubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhPubah}(h]h]h]h]h!]uh%hhjePubh)}(hhh]hS)}(h":grey12:`████████`h]h_)}(hjPh]h████████}hjPsbah}(h]h]grey12ah]h]h!]uh%h^hjPubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjPubah}(h]h]h]h]h!]uh%hhjePubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey13``h]h)}(hjPh]hgrey13}hjPsbah}(h]h]h]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey13:`████████`h]h_)}(hjPh]h████████}hjPsbah}(h]h]grey13ah]h]h!]uh%h^hjPubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjPubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey14``h]h)}(hjQh]hgrey14}hjQsbah}(h]h]h]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjPubah}(h]h]h]h]h!]uh%hhjPubh)}(hhh]hS)}(h":grey14:`████████`h]h_)}(hj!Qh]h████████}hj#Qsbah}(h]h]grey14ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjQubah}(h]h]h]h]h!]uh%hhjPubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey15``h]h)}(hjKQh]hgrey15}hjMQsbah}(h]h]h]h]h!]uh%hhjIQubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFQubah}(h]h]h]h]h!]uh%hhjCQubh)}(hhh]hS)}(h":grey15:`████████`h]h_)}(hjkQh]h████████}hjmQsbah}(h]h]grey15ah]h]h!]uh%h^hjiQubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfQubah}(h]h]h]h]h!]uh%hhjCQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey16``h]h)}(hjQh]hgrey16}hjQsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjQubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h":grey16:`████████`h]h_)}(hjQh]h████████}hjQsbah}(h]h]grey16ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjQubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey17``h]h)}(hjQh]hgrey17}hjQsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjQubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h":grey17:`████████`h]h_)}(hjQh]h████████}hjRsbah}(h]h]grey17ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjQubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey18``h]h)}(hj)Rh]hgrey18}hj+Rsbah}(h]h]h]h]h!]uh%hhj'Rubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$Rubah}(h]h]h]h]h!]uh%hhj!Rubh)}(hhh]hS)}(h":grey18:`████████`h]h_)}(hjIRh]h████████}hjKRsbah}(h]h]grey18ah]h]h!]uh%h^hjGRubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDRubah}(h]h]h]h]h!]uh%hhj!Rubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey19``h]h)}(hjsRh]hgrey19}hjuRsbah}(h]h]h]h]h!]uh%hhjqRubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnRubah}(h]h]h]h]h!]uh%hhjkRubh)}(hhh]hS)}(h":grey19:`████████`h]h_)}(hjRh]h████████}hjRsbah}(h]h]grey19ah]h]h!]uh%h^hjRubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjRubah}(h]h]h]h]h!]uh%hhjkRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey20``h]h)}(hjRh]hgrey20}hjRsbah}(h]h]h]h]h!]uh%hhjRubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjRubah}(h]h]h]h]h!]uh%hhjRubh)}(hhh]hS)}(h":grey20:`████████`h]h_)}(hjRh]h████████}hjRsbah}(h]h]grey20ah]h]h!]uh%h^hjRubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjRubah}(h]h]h]h]h!]uh%hhjRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey21``h]h)}(hjSh]hgrey21}hj Ssbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)M`hjSubah}(h]h]h]h]h!]uh%hhjRubh)}(hhh]hS)}(h":grey21:`████████`h]h_)}(hj'Sh]h████████}hj)Ssbah}(h]h]grey21ah]h]h!]uh%h^hj%Subah}(h]h]h]h]h!]uh%hRh'h?h)M`hj"Subah}(h]h]h]h]h!]uh%hhjRubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey22``h]h)}(hjQSh]hgrey22}hjSSsbah}(h]h]h]h]h!]uh%hhjOSubah}(h]h]h]h]h!]uh%hRh'h?h)MahjLSubah}(h]h]h]h]h!]uh%hhjISubh)}(hhh]hS)}(h":grey22:`████████`h]h_)}(hjqSh]h████████}hjsSsbah}(h]h]grey22ah]h]h!]uh%h^hjoSubah}(h]h]h]h]h!]uh%hRh'h?h)MahjlSubah}(h]h]h]h]h!]uh%hhjISubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey23``h]h)}(hjSh]hgrey23}hjSsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MbhjSubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h":grey23:`████████`h]h_)}(hjSh]h████████}hjSsbah}(h]h]grey23ah]h]h!]uh%h^hjSubah}(h]h]h]h]h!]uh%hRh'h?h)MbhjSubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey24``h]h)}(hjSh]hgrey24}hjSsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MchjSubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h":grey24:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey24ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MchjTubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey25``h]h)}(hj/Th]hgrey25}hj1Tsbah}(h]h]h]h]h!]uh%hhj-Tubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj*Tubah}(h]h]h]h]h!]uh%hhj'Tubh)}(hhh]hS)}(h":grey25:`████████`h]h_)}(hjOTh]h████████}hjQTsbah}(h]h]grey25ah]h]h!]uh%h^hjMTubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJTubah}(h]h]h]h]h!]uh%hhj'Tubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey26``h]h)}(hjyTh]hgrey26}hj{Tsbah}(h]h]h]h]h!]uh%hhjwTubah}(h]h]h]h]h!]uh%hRh'h?h)MehjtTubah}(h]h]h]h]h!]uh%hhjqTubh)}(hhh]hS)}(h":grey26:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey26ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MehjTubah}(h]h]h]h]h!]uh%hhjqTubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey27``h]h)}(hjTh]hgrey27}hjTsbah}(h]h]h]h]h!]uh%hhjTubah}(h]h]h]h]h!]uh%hRh'h?h)MfhjTubah}(h]h]h]h]h!]uh%hhjTubh)}(hhh]hS)}(h":grey27:`████████`h]h_)}(hjTh]h████████}hjTsbah}(h]h]grey27ah]h]h!]uh%h^hjTubah}(h]h]h]h]h!]uh%hRh'h?h)MfhjTubah}(h]h]h]h]h!]uh%hhjTubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey28``h]h)}(hj Uh]hgrey28}hjUsbah}(h]h]h]h]h!]uh%hhj Uubah}(h]h]h]h]h!]uh%hRh'h?h)MghjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey28:`████████`h]h_)}(hj-Uh]h████████}hj/Usbah}(h]h]grey28ah]h]h!]uh%h^hj+Uubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj(Uubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey29``h]h)}(hjWUh]hgrey29}hjYUsbah}(h]h]h]h]h!]uh%hhjUUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjRUubah}(h]h]h]h]h!]uh%hhjOUubh)}(hhh]hS)}(h":grey29:`████████`h]h_)}(hjwUh]h████████}hjyUsbah}(h]h]grey29ah]h]h!]uh%h^hjuUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjrUubah}(h]h]h]h]h!]uh%hhjOUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey30``h]h)}(hjUh]hgrey30}hjUsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MihjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey30:`████████`h]h_)}(hjUh]h████████}hjUsbah}(h]h]grey30ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MihjUubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey31``h]h)}(hjUh]hgrey31}hjUsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MjhjUubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h":grey31:`████████`h]h_)}(hj Vh]h████████}hj Vsbah}(h]h]grey31ah]h]h!]uh%h^hj Vubah}(h]h]h]h]h!]uh%hRh'h?h)MjhjVubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey32``h]h)}(hj5Vh]hgrey32}hj7Vsbah}(h]h]h]h]h!]uh%hhj3Vubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0Vubah}(h]h]h]h]h!]uh%hhj-Vubh)}(hhh]hS)}(h":grey32:`████████`h]h_)}(hjUVh]h████████}hjWVsbah}(h]h]grey32ah]h]h!]uh%h^hjSVubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjPVubah}(h]h]h]h]h!]uh%hhj-Vubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey33``h]h)}(hjVh]hgrey33}hjVsbah}(h]h]h]h]h!]uh%hhj}Vubah}(h]h]h]h]h!]uh%hRh'h?h)MlhjzVubah}(h]h]h]h]h!]uh%hhjwVubh)}(hhh]hS)}(h":grey33:`████████`h]h_)}(hjVh]h████████}hjVsbah}(h]h]grey33ah]h]h!]uh%h^hjVubah}(h]h]h]h]h!]uh%hRh'h?h)MlhjVubah}(h]h]h]h]h!]uh%hhjwVubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey34``h]h)}(hjVh]hgrey34}hjVsbah}(h]h]h]h]h!]uh%hhjVubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjVubah}(h]h]h]h]h!]uh%hhjVubh)}(hhh]hS)}(h":grey34:`████████`h]h_)}(hjVh]h████████}hjVsbah}(h]h]grey34ah]h]h!]uh%h^hjVubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjVubah}(h]h]h]h]h!]uh%hhjVubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey35``h]h)}(hjWh]hgrey35}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MnhjWubah}(h]h]h]h]h!]uh%hhj Wubh)}(hhh]hS)}(h":grey35:`████████`h]h_)}(hj3Wh]h████████}hj5Wsbah}(h]h]grey35ah]h]h!]uh%h^hj1Wubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj.Wubah}(h]h]h]h]h!]uh%hhj Wubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey36``h]h)}(hj]Wh]hgrey36}hj_Wsbah}(h]h]h]h]h!]uh%hhj[Wubah}(h]h]h]h]h!]uh%hRh'h?h)MohjXWubah}(h]h]h]h]h!]uh%hhjUWubh)}(hhh]hS)}(h":grey36:`████████`h]h_)}(hj}Wh]h████████}hjWsbah}(h]h]grey36ah]h]h!]uh%h^hj{Wubah}(h]h]h]h]h!]uh%hRh'h?h)MohjxWubah}(h]h]h]h]h!]uh%hhjUWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey37``h]h)}(hjWh]hgrey37}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MphjWubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h":grey37:`████████`h]h_)}(hjWh]h████████}hjWsbah}(h]h]grey37ah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MphjWubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey38``h]h)}(hjWh]hgrey38}hjWsbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MqhjWubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h":grey38:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey38ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj Xubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey39``h]h)}(hj;Xh]hgrey39}hj=Xsbah}(h]h]h]h]h!]uh%hhj9Xubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6Xubah}(h]h]h]h]h!]uh%hhj3Xubh)}(hhh]hS)}(h":grey39:`████████`h]h_)}(hj[Xh]h████████}hj]Xsbah}(h]h]grey39ah]h]h!]uh%h^hjYXubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVXubah}(h]h]h]h]h!]uh%hhj3Xubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey40``h]h)}(hjXh]hgrey40}hjXsbah}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%hRh'h?h)MshjXubah}(h]h]h]h]h!]uh%hhj}Xubh)}(hhh]hS)}(h":grey40:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey40ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)MshjXubah}(h]h]h]h]h!]uh%hhj}Xubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey41``h]h)}(hjXh]hgrey41}hjXsbah}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%hRh'h?h)MthjXubah}(h]h]h]h]h!]uh%hhjXubh)}(hhh]hS)}(h":grey41:`████████`h]h_)}(hjXh]h████████}hjXsbah}(h]h]grey41ah]h]h!]uh%h^hjXubah}(h]h]h]h]h!]uh%hRh'h?h)MthjXubah}(h]h]h]h]h!]uh%hhjXubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey42``h]h)}(hjYh]hgrey42}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MuhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey42:`████████`h]h_)}(hj9Yh]h████████}hj;Ysbah}(h]h]grey42ah]h]h!]uh%h^hj7Yubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4Yubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey43``h]h)}(hjcYh]hgrey43}hjeYsbah}(h]h]h]h]h!]uh%hhjaYubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^Yubah}(h]h]h]h]h!]uh%hhj[Yubh)}(hhh]hS)}(h":grey43:`████████`h]h_)}(hjYh]h████████}hjYsbah}(h]h]grey43ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~Yubah}(h]h]h]h]h!]uh%hhj[Yubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey44``h]h)}(hjYh]hgrey44}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MwhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey44:`████████`h]h_)}(hjYh]h████████}hjYsbah}(h]h]grey44ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MwhjYubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey45``h]h)}(hjYh]hgrey45}hjYsbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MxhjYubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h":grey45:`████████`h]h_)}(hjZh]h████████}hjZsbah}(h]h]grey45ah]h]h!]uh%h^hjZubah}(h]h]h]h]h!]uh%hRh'h?h)MxhjZubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey46``h]h)}(hjAZh]hgrey46}hjCZsbah}(h]h]h]h]h!]uh%hhj?Zubah}(h]h]h]h]h!]uh%hRh'h?h)Myhjgubah}(h]h]h]h]h!]uh%hhj;gubh)}(hhh]hS)}(h":grey91:`████████`h]h_)}(hjcgh]h████████}hjegsbah}(h]h]grey91ah]h]h!]uh%h^hjagubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^gubah}(h]h]h]h]h!]uh%hhj;gubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey92``h]h)}(hjgh]hgrey92}hjgsbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h":grey92:`████████`h]h_)}(hjgh]h████████}hjgsbah}(h]h]grey92ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey93``h]h)}(hjgh]hgrey93}hjgsbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h":grey93:`████████`h]h_)}(hjgh]h████████}hjgsbah}(h]h]grey93ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjgubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``grey94``h]h)}(hj!hh]hgrey94}hj#hsbah}(h]h]h]h]h!]uh%hhjhubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjhubh)}(hhh]hS)}(h":grey94:`████████`h]h_)}(hjAhh]h████████}hjChsbah}(h]h]grey94ah]h]h!]uh%h^hj?hubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue1``h]h)}(hjmuh]h lightblue1}hjousbah}(h]h]h]h]h!]uh%hhjkuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhuubah}(h]h]h]h]h!]uh%hhjeuubh)}(hhh]hS)}(h&:lightblue1:`████████`h]h_)}(hjuh]h████████}hjusbah}(h]h] lightblue1ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjeuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue2``h]h)}(hjuh]h lightblue2}hjusbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h&:lightblue2:`████████`h]h_)}(hjuh]h████████}hjusbah}(h]h] lightblue2ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue3``h]h)}(hjvh]h lightblue3}hjvsbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjuubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h&:lightblue3:`████████`h]h_)}(hj!vh]h████████}hj#vsbah}(h]h] lightblue3ah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightblue4``h]h)}(hjKvh]h lightblue4}hjMvsbah}(h]h]h]h]h!]uh%hhjIvubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFvubah}(h]h]h]h]h!]uh%hhjCvubh)}(hhh]hS)}(h&:lightblue4:`████████`h]h_)}(hjkvh]h████████}hjmvsbah}(h]h] lightblue4ah]h]h!]uh%h^hjivubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfvubah}(h]h]h]h]h!]uh%hhjCvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcoral``h]h)}(hjvh]h lightcoral}hjvsbah}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubh)}(hhh]hS)}(h&:lightcoral:`████████`h]h_)}(hjvh]h████████}hjvsbah}(h]h] lightcoralah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightcyan``h]h)}(hjvh]h lightcyan}hjvsbah}(h]h]h]h]h!]uh%hhjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubh)}(hhh]hS)}(h%:lightcyan:`████████`h]h_)}(hjvh]h████████}hjwsbah}(h]h] lightcyanah]h]h!]uh%h^hjvubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjvubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan1``h]h)}(hj)wh]h lightcyan1}hj+wsbah}(h]h]h]h]h!]uh%hhj'wubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$wubah}(h]h]h]h]h!]uh%hhj!wubh)}(hhh]hS)}(h&:lightcyan1:`████████`h]h_)}(hjIwh]h████████}hjKwsbah}(h]h] lightcyan1ah]h]h!]uh%h^hjGwubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDwubah}(h]h]h]h]h!]uh%hhj!wubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan2``h]h)}(hjswh]h lightcyan2}hjuwsbah}(h]h]h]h]h!]uh%hhjqwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnwubah}(h]h]h]h]h!]uh%hhjkwubh)}(hhh]hS)}(h&:lightcyan2:`████████`h]h_)}(hjwh]h████████}hjwsbah}(h]h] lightcyan2ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjkwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan3``h]h)}(hjwh]h lightcyan3}hjwsbah}(h]h]h]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h&:lightcyan3:`████████`h]h_)}(hjwh]h████████}hjwsbah}(h]h] lightcyan3ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjwubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightcyan4``h]h)}(hjxh]h lightcyan4}hj xsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h&:lightcyan4:`████████`h]h_)}(hj'xh]h████████}hj)xsbah}(h]h] lightcyan4ah]h]h!]uh%h^hj%xubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"xubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod``h]h)}(hjQxh]hlightgoldenrod}hjSxsbah}(h]h]h]h]h!]uh%hhjOxubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLxubah}(h]h]h]h]h!]uh%hhjIxubh)}(hhh]hS)}(h*:lightgoldenrod:`████████`h]h_)}(hjqxh]h████████}hjsxsbah}(h]h]lightgoldenrodah]h]h!]uh%h^hjoxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjlxubah}(h]h]h]h]h!]uh%hhjIxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod1``h]h)}(hjxh]hlightgoldenrod1}hjxsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubh)}(hhh]hS)}(h+:lightgoldenrod1:`████████`h]h_)}(hjxh]h████████}hjxsbah}(h]h]lightgoldenrod1ah]h]h!]uh%h^hjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod2``h]h)}(hjxh]hlightgoldenrod2}hjxsbah}(h]h]h]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjxubh)}(hhh]hS)}(h+:lightgoldenrod2:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrod2ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjxubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod3``h]h)}(hj/yh]hlightgoldenrod3}hj1ysbah}(h]h]h]h]h!]uh%hhj-yubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*yubah}(h]h]h]h]h!]uh%hhj'yubh)}(hhh]hS)}(h+:lightgoldenrod3:`████████`h]h_)}(hjOyh]h████████}hjQysbah}(h]h]lightgoldenrod3ah]h]h!]uh%h^hjMyubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJyubah}(h]h]h]h]h!]uh%hhj'yubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrod4``h]h)}(hjyyh]hlightgoldenrod4}hj{ysbah}(h]h]h]h]h!]uh%hhjwyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtyubah}(h]h]h]h]h!]uh%hhjqyubh)}(hhh]hS)}(h+:lightgoldenrod4:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrod4ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjqyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgoldenrodyellow``h]h)}(hjyh]hlightgoldenrodyellow}hjysbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h0:lightgoldenrodyellow:`████████`h]h_)}(hjyh]h████████}hjysbah}(h]h]lightgoldenrodyellowah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjyubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightgray``h]h)}(hj zh]h lightgray}hjzsbah}(h]h]h]h]h!]uh%hhj zubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightgray:`████████`h]h_)}(hj-zh]h████████}hj/zsbah}(h]h] lightgrayah]h]h!]uh%h^hj+zubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(zubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightgreen``h]h)}(hjWzh]h lightgreen}hjYzsbah}(h]h]h]h]h!]uh%hhjUzubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRzubah}(h]h]h]h]h!]uh%hhjOzubh)}(hhh]hS)}(h&:lightgreen:`████████`h]h_)}(hjwzh]h████████}hjyzsbah}(h]h] lightgreenah]h]h!]uh%h^hjuzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjrzubah}(h]h]h]h]h!]uh%hhjOzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightgrey``h]h)}(hjzh]h lightgrey}hjzsbah}(h]h]h]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightgrey:`████████`h]h_)}(hjzh]h████████}hjzsbah}(h]h] lightgreyah]h]h!]uh%h^hjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``lightpink``h]h)}(hjzh]h lightpink}hjzsbah}(h]h]h]h]h!]uh%hhjzubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjzubh)}(hhh]hS)}(h%:lightpink:`████████`h]h_)}(hj {h]h████████}hj {sbah}(h]h] lightpinkah]h]h!]uh%h^hj {ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhjzubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink1``h]h)}(hj5{h]h lightpink1}hj7{sbah}(h]h]h]h]h!]uh%hhj3{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0{ubah}(h]h]h]h]h!]uh%hhj-{ubh)}(hhh]hS)}(h&:lightpink1:`████████`h]h_)}(hjU{h]h████████}hjW{sbah}(h]h] lightpink1ah]h]h!]uh%h^hjS{ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjP{ubah}(h]h]h]h]h!]uh%hhj-{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink2``h]h)}(hj{h]h lightpink2}hj{sbah}(h]h]h]h]h!]uh%hhj}{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjz{ubah}(h]h]h]h]h!]uh%hhjw{ubh)}(hhh]hS)}(h&:lightpink2:`████████`h]h_)}(hj{h]h████████}hj{sbah}(h]h] lightpink2ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhjw{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink3``h]h)}(hj{h]h lightpink3}hj{sbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h&:lightpink3:`████████`h]h_)}(hj{h]h████████}hj{sbah}(h]h] lightpink3ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj{ubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightpink4``h]h)}(hj|h]h lightpink4}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj |ubh)}(hhh]hS)}(h&:lightpink4:`████████`h]h_)}(hj3|h]h████████}hj5|sbah}(h]h] lightpink4ah]h]h!]uh%h^hj1|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.|ubah}(h]h]h]h]h!]uh%hhj |ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon``h]h)}(hj]|h]h lightsalmon}hj_|sbah}(h]h]h]h]h!]uh%hhj[|ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjX|ubah}(h]h]h]h]h!]uh%hhjU|ubh)}(hhh]hS)}(h':lightsalmon:`████████`h]h_)}(hj}|h]h████████}hj|sbah}(h]h] lightsalmonah]h]h!]uh%h^hj{|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjx|ubah}(h]h]h]h]h!]uh%hhjU|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon1``h]h)}(hj|h]h lightsalmon1}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubh)}(hhh]hS)}(h(:lightsalmon1:`████████`h]h_)}(hj|h]h████████}hj|sbah}(h]h] lightsalmon1ah]h]h!]uh%h^hj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon2``h]h)}(hj|h]h lightsalmon2}hj|sbah}(h]h]h]h]h!]uh%hhj|ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhj|ubh)}(hhh]hS)}(h(:lightsalmon2:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightsalmon2ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj }ubah}(h]h]h]h]h!]uh%hhj|ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon3``h]h)}(hj;}h]h lightsalmon3}hj=}sbah}(h]h]h]h]h!]uh%hhj9}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6}ubah}(h]h]h]h]h!]uh%hhj3}ubh)}(hhh]hS)}(h(:lightsalmon3:`████████`h]h_)}(hj[}h]h████████}hj]}sbah}(h]h] lightsalmon3ah]h]h!]uh%h^hjY}ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjV}ubah}(h]h]h]h]h!]uh%hhj3}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsalmon4``h]h)}(hj}h]h lightsalmon4}hj}sbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}}ubh)}(hhh]hS)}(h(:lightsalmon4:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightsalmon4ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightseagreen``h]h)}(hj}h]h lightseagreen}hj}sbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h):lightseagreen:`████████`h]h_)}(hj}h]h████████}hj}sbah}(h]h] lightseagreenah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj}ubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue``h]h)}(hj~h]h lightskyblue}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h(:lightskyblue:`████████`h]h_)}(hj9~h]h████████}hj;~sbah}(h]h] lightskyblueah]h]h!]uh%h^hj7~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4~ubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue1``h]h)}(hjc~h]h lightskyblue1}hje~sbah}(h]h]h]h]h!]uh%hhja~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^~ubah}(h]h]h]h]h!]uh%hhj[~ubh)}(hhh]hS)}(h):lightskyblue1:`████████`h]h_)}(hj~h]h████████}hj~sbah}(h]h] lightskyblue1ah]h]h!]uh%h^hj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~~ubah}(h]h]h]h]h!]uh%hhj[~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue2``h]h)}(hj~h]h lightskyblue2}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h):lightskyblue2:`████████`h]h_)}(hj~h]h████████}hj~sbah}(h]h] lightskyblue2ah]h]h!]uh%h^hj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue3``h]h)}(hj~h]h lightskyblue3}hj~sbah}(h]h]h]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj~ubh)}(hhh]hS)}(h):lightskyblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightskyblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj~ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightskyblue4``h]h)}(hjAh]h lightskyblue4}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h):lightskyblue4:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] lightskyblue4ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslateblue``h]h)}(hjh]hlightslateblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightslateblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslategray``h]h)}(hjh]hlightslategray}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslategray:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightslategrayah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightslategrey``h]h)}(hjh]hlightslategrey}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:lightslategrey:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h]lightslategreyah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue``h]h)}(hjih]hlightsteelblue}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h*:lightsteelblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue1``h]h)}(hjh]hlightsteelblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue1:`████████`h]h_)}(hjӀh]h████████}hjՀsbah}(h]h]lightsteelblue1ah]h]h!]uh%h^hjрubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj΀ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue2``h]h)}(hjh]hlightsteelblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue3``h]h)}(hjGh]hlightsteelblue3}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h+:lightsteelblue3:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h]lightsteelblue3ah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightsteelblue4``h]h)}(hjh]hlightsteelblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:lightsteelblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]lightsteelblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow``h]h)}(hjہh]h lightyellow}hj݁sbah}(h]h]h]h]h!]uh%hhjفubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjցubah}(h]h]h]h]h!]uh%hhjӁubh)}(hhh]hS)}(h':lightyellow:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightyellowah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjӁubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow1``h]h)}(hj%h]h lightyellow1}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow1:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h] lightyellow1ah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow2``h]h)}(hjoh]h lightyellow2}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h(:lightyellow2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] lightyellow2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow3``h]h)}(hjh]h lightyellow3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow3:`████████`h]h_)}(hjقh]h████████}hjۂsbah}(h]h] lightyellow3ah]h]h!]uh%h^hjׂubah}(h]h]h]h]h!]uh%hRh'h?h)MhjԂubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lightyellow4``h]h)}(hjh]h lightyellow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:lightyellow4:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] lightyellow4ah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``lime``h]h)}(hjMh]hlime}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h :lime:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h]limeah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``limegreen``h]h)}(hjh]h limegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:limegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] limegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``linen``h]h)}(hjh]hlinen}hjsbah}(h]h]h]h]h!]uh%hhj߃ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj܃ubah}(h]h]h]h]h!]uh%hhjكubh)}(hhh]hS)}(h!:linen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]linenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjكubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta``h]h)}(hj+h]hmagenta}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h#:magenta:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h]magentaah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)M hjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta1``h]h)}(hjuh]hmagenta1}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)M hjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h$:magenta1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]magenta1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta2``h]h)}(hjh]hmagenta2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:magenta2:`████████`h]h_)}(hj߄h]h████████}hjsbah}(h]h]magenta2ah]h]h!]uh%h^hj݄ubah}(h]h]h]h]h!]uh%hRh'h?h)M hjڄubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta3``h]h)}(hj h]hmagenta3}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:magenta3:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h]magenta3ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M hj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``magenta4``h]h)}(hjSh]hmagenta4}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h$:magenta4:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h]magenta4ah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon``h]h)}(hjh]hmaroon}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":maroon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon1``h]h)}(hjh]hmaroon1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj߅ubh)}(hhh]hS)}(h#:maroon1:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h]maroon1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj߅ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon2``h]h)}(hj1h]hmaroon2}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h#:maroon2:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]maroon2ah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon3``h]h)}(hj{h]hmaroon3}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h#:maroon3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroon3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``maroon4``h]h)}(hjņh]hmaroon4}hjdžsbah}(h]h]h]h]h!]uh%hhjÆubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:maroon4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]maroon4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumaquamarine``h]h)}(hjh]hmediumaquamarine}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h,:mediumaquamarine:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]mediumaquamarineah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumblue``h]h)}(hjYh]h mediumblue}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h&:mediumblue:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h] mediumblueah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid``h]h)}(hjh]h mediumorchid}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:mediumorchid:`████████`h]h_)}(hjÇh]h████████}hjŇsbah}(h]h] mediumorchidah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid1``h]h)}(hjh]h mediumorchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumorchid1:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h] mediumorchid1ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid2``h]h)}(hj7h]h mediumorchid2}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h):mediumorchid2:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h] mediumorchid2ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid3``h]h)}(hjh]h mediumorchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h):mediumorchid3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumorchid3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumorchid4``h]h)}(hjˈh]h mediumorchid4}hj͈sbah}(h]h]h]h]h!]uh%hhjɈubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƈubah}(h]h]h]h]h!]uh%hhjÈubh)}(hhh]hS)}(h):mediumorchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumorchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjÈubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple``h]h)}(hjh]h mediumpurple}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h(:mediumpurple:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h] mediumpurpleah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple1``h]h)}(hj_h]h mediumpurple1}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h):mediumpurple1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumpurple1ah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple2``h]h)}(hjh]h mediumpurple2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumpurple2:`████████`h]h_)}(hjɉh]h████████}hjˉsbah}(h]h] mediumpurple2ah]h]h!]uh%h^hjljubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjĉubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple3``h]h)}(hjh]h mediumpurple3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):mediumpurple3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mediumpurple3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumpurple4``h]h)}(hj=h]h mediumpurple4}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h):mediumpurple4:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] mediumpurple4ah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumseagreen``h]h)}(hjh]hmediumseagreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:mediumseagreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumseagreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumslateblue``h]h)}(hjъh]hmediumslateblue}hjӊsbah}(h]h]h]h]h!]uh%hhjϊubah}(h]h]h]h]h!]uh%hRh'h?h)M!hj̊ubah}(h]h]h]h]h!]uh%hhjɊubh)}(hhh]hS)}(h+:mediumslateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumslateblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M!hjubah}(h]h]h]h]h!]uh%hhjɊubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumspringgreen``h]h)}(hjh]hmediumspringgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M"hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h-:mediumspringgreen:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h]mediumspringgreenah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)M"hj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumturquoise``h]h)}(hjeh]hmediumturquoise}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)M#hj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h+:mediumturquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]mediumturquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M#hjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mediumvioletred``h]h)}(hjh]hmediumvioletred}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h+:mediumvioletred:`████████`h]h_)}(hjϋh]h████████}hjыsbah}(h]h]mediumvioletredah]h]h!]uh%h^hj͋ubah}(h]h]h]h]h!]uh%hRh'h?h)M$hjʋubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``midnightblue``h]h)}(hjh]h midnightblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:midnightblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] midnightblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M%hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``mintcream``h]h)}(hjCh]h mintcream}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h%:mintcream:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] mintcreamah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)M&hj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``mistyrose``h]h)}(hjh]h mistyrose}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:mistyrose:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyroseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M'hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose1``h]h)}(hj׌h]h mistyrose1}hjٌsbah}(h]h]h]h]h!]uh%hhjՌubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjҌubah}(h]h]h]h]h!]uh%hhjόubh)}(hhh]hS)}(h&:mistyrose1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyrose1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M(hjubah}(h]h]h]h]h!]uh%hhjόubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose2``h]h)}(hj!h]h mistyrose2}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M)hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:mistyrose2:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h] mistyrose2ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)M)hj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose3``h]h)}(hjkh]h mistyrose3}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)M*hjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h&:mistyrose3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] mistyrose3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M*hjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``mistyrose4``h]h)}(hjh]h mistyrose4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M+hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:mistyrose4:`████████`h]h_)}(hjՍh]h████████}hj׍sbah}(h]h] mistyrose4ah]h]h!]uh%h^hjӍubah}(h]h]h]h]h!]uh%hRh'h?h)M+hjЍubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``moccasin``h]h)}(hjh]hmoccasin}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M,hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:moccasin:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h]moccasinah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M,hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite``h]h)}(hjIh]h navajowhite}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)M-hjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h':navajowhite:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] navajowhiteah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)M-hjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite1``h]h)}(hjh]h navajowhite1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M.hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:navajowhite1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M.hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite2``h]h)}(hjݎh]h navajowhite2}hjߎsbah}(h]h]h]h]h!]uh%hhjێubah}(h]h]h]h]h!]uh%hRh'h?h)M/hj؎ubah}(h]h]h]h]h!]uh%hhjՎubh)}(hhh]hS)}(h(:navajowhite2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M/hjubah}(h]h]h]h]h!]uh%hhjՎubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite3``h]h)}(hj'h]h navajowhite3}hj)sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)M0hj"ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:navajowhite3:`████████`h]h_)}(hjGh]h████████}hjIsbah}(h]h] navajowhite3ah]h]h!]uh%h^hjEubah}(h]h]h]h]h!]uh%hRh'h?h)M0hjBubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navajowhite4``h]h)}(hjqh]h navajowhite4}hjssbah}(h]h]h]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%hRh'h?h)M1hjlubah}(h]h]h]h]h!]uh%hhjiubh)}(hhh]hS)}(h(:navajowhite4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] navajowhite4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M1hjubah}(h]h]h]h]h!]uh%hhjiubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``navy``h]h)}(hjh]hnavy}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M2hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :navy:`████████`h]h_)}(hjۏh]h████████}hjݏsbah}(h]h]navyah]h]h!]uh%h^hjُubah}(h]h]h]h]h!]uh%hRh'h?h)M2hj֏ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``navyblue``h]h)}(hjh]hnavyblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M3hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:navyblue:`████████`h]h_)}(hj%h]h████████}hj'sbah}(h]h]navyblueah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)M3hj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``oldlace``h]h)}(hjOh]holdlace}hjQsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)M4hjJubah}(h]h]h]h]h!]uh%hhjGubh)}(hhh]hS)}(h#:oldlace:`████████`h]h_)}(hjoh]h████████}hjqsbah}(h]h]oldlaceah]h]h!]uh%h^hjmubah}(h]h]h]h]h!]uh%hRh'h?h)M4hjjubah}(h]h]h]h]h!]uh%hhjGubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``olive``h]h)}(hjh]holive}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M5hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:olive:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]oliveah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M5hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``olivedrab``h]h)}(hjh]h olivedrab}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M6hjސubah}(h]h]h]h]h!]uh%hhjېubh)}(hhh]hS)}(h%:olivedrab:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrabah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M6hjubah}(h]h]h]h]h!]uh%hhjېubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab1``h]h)}(hj-h]h olivedrab1}hj/sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)M7hj(ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h&:olivedrab1:`████████`h]h_)}(hjMh]h████████}hjOsbah}(h]h] olivedrab1ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)M7hjHubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab2``h]h)}(hjwh]h olivedrab2}hjysbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)M8hjrubah}(h]h]h]h]h!]uh%hhjoubh)}(hhh]hS)}(h&:olivedrab2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrab2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M8hjubah}(h]h]h]h]h!]uh%hhjoubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab3``h]h)}(hjh]h olivedrab3}hjÑsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M9hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:olivedrab3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] olivedrab3ah]h]h!]uh%h^hjߑubah}(h]h]h]h]h!]uh%hRh'h?h)M9hjܑubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``olivedrab4``h]h)}(hj h]h olivedrab4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)M:hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:olivedrab4:`████████`h]h_)}(hj+h]h████████}hj-sbah}(h]h] olivedrab4ah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)M:hj&ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange``h]h)}(hjUh]horange}hjWsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)M;hjPubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h":orange:`████████`h]h_)}(hjuh]h████████}hjwsbah}(h]h]orangeah]h]h!]uh%h^hjsubah}(h]h]h]h]h!]uh%hRh'h?h)M;hjpubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange1``h]h)}(hjh]horange1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M<hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orange1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orange1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M<hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange2``h]h)}(hjh]horange2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M=hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orange2:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]orange2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M=hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange3``h]h)}(hj3h]horange3}hj5sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)M>hj.ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h#:orange3:`████████`h]h_)}(hjSh]h████████}hjUsbah}(h]h]orange3ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)M>hjNubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orange4``h]h)}(hj}h]horange4}hjsbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjxubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h#:orange4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orange4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M?hjubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orangered``h]h)}(hjǓh]h orangered}hjɓsbah}(h]h]h]h]h!]uh%hhjœubah}(h]h]h]h]h!]uh%hRh'h?h)M@hj“ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:orangered:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] orangeredah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M@hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered1``h]h)}(hjh]h orangered1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h&:orangered1:`████████`h]h_)}(hj1h]h████████}hj3sbah}(h]h] orangered1ah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)MAhj,ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered2``h]h)}(hj[h]h orangered2}hj]sbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjVubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h&:orangered2:`████████`h]h_)}(hj{h]h████████}hj}sbah}(h]h] orangered2ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)MBhjvubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered3``h]h)}(hjh]h orangered3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MChjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:orangered3:`████████`h]h_)}(hjŔh]h████████}hjǔsbah}(h]h] orangered3ah]h]h!]uh%h^hjÔubah}(h]h]h]h]h!]uh%hRh'h?h)MChjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``orangered4``h]h)}(hjh]h orangered4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MDhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:orangered4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] orangered4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)MDhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid``h]h)}(hj9h]horchid}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)MEhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h":orchid:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h]orchidah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MEhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid1``h]h)}(hjh]horchid1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h#:orchid1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MFhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid2``h]h)}(hj͕h]horchid2}hjϕsbah}(h]h]h]h]h!]uh%hhj˕ubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjȕubah}(h]h]h]h]h!]uh%hhjŕubh)}(hhh]hS)}(h#:orchid2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MGhjubah}(h]h]h]h]h!]uh%hhjŕubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid3``h]h)}(hjh]horchid3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MHhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:orchid3:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h]orchid3ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)MHhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``orchid4``h]h)}(hjah]horchid4}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h#:orchid4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]orchid4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MIhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegoldenrod``h]h)}(hjh]h palegoldenrod}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h):palegoldenrod:`████████`h]h_)}(hj˖h]h████████}hj͖sbah}(h]h] palegoldenrodah]h]h!]uh%h^hjɖubah}(h]h]h]h]h!]uh%hRh'h?h)MJhjƖubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``palegreen``h]h)}(hjh]h palegreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:palegreen:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MKhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen1``h]h)}(hj?h]h palegreen1}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h&:palegreen1:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] palegreen1ah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MLhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen2``h]h)}(hjh]h palegreen2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:palegreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MMhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen3``h]h)}(hjӗh]h palegreen3}hj՗sbah}(h]h]h]h]h!]uh%hhjїubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjΗubah}(h]h]h]h]h!]uh%hhj˗ubh)}(hhh]hS)}(h&:palegreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palegreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MNhjubah}(h]h]h]h]h!]uh%hhj˗ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palegreen4``h]h)}(hjh]h palegreen4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MOhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:palegreen4:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] palegreen4ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)MOhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise``h]h)}(hjgh]h paleturquoise}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h):paleturquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] paleturquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MPhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise1``h]h)}(hjh]hpaleturquoise1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MQhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise1:`████████`h]h_)}(hjјh]h████████}hjӘsbah}(h]h]paleturquoise1ah]h]h!]uh%h^hjϘubah}(h]h]h]h]h!]uh%hRh'h?h)MQhj̘ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise2``h]h)}(hjh]hpaleturquoise2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]paleturquoise2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MRhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise3``h]h)}(hjEh]hpaleturquoise3}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)MShj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h*:paleturquoise3:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]paleturquoise3ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)MShj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``paleturquoise4``h]h)}(hjh]hpaleturquoise4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:paleturquoise4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]paleturquoise4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MThjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred``h]h)}(hjٙh]h palevioletred}hjۙsbah}(h]h]h]h]h!]uh%hhjיubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjԙubah}(h]h]h]h]h!]uh%hhjљubh)}(hhh]hS)}(h):palevioletred:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] palevioletredah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MUhjubah}(h]h]h]h]h!]uh%hhjљubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred1``h]h)}(hj#h]hpalevioletred1}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)MVhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred1:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]palevioletred1ah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)MVhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred2``h]h)}(hjmh]hpalevioletred2}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h*:palevioletred2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]palevioletred2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MWhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred3``h]h)}(hjh]hpalevioletred3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred3:`████████`h]h_)}(hjךh]h████████}hjٚsbah}(h]h]palevioletred3ah]h]h!]uh%h^hj՚ubah}(h]h]h]h]h!]uh%hRh'h?h)MXhjҚubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``palevioletred4``h]h)}(hjh]hpalevioletred4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h*:palevioletred4:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]palevioletred4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)MYhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``papayawhip``h]h)}(hjKh]h papayawhip}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h&:papayawhip:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h] papayawhipah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)MZhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``peachpuff``h]h)}(hjh]h peachpuff}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:peachpuff:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuffah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M[hjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff1``h]h)}(hjߛh]h peachpuff1}hjsbah}(h]h]h]h]h!]uh%hhjݛubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjڛubah}(h]h]h]h]h!]uh%hhjכubh)}(hhh]hS)}(h&:peachpuff1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuff1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M\hjubah}(h]h]h]h]h!]uh%hhjכubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff2``h]h)}(hj)h]h peachpuff2}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)M]hj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h&:peachpuff2:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h] peachpuff2ah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)M]hjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff3``h]h)}(hjsh]h peachpuff3}hjusbah}(h]h]h]h]h!]uh%hhjqubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjnubah}(h]h]h]h]h!]uh%hhjkubh)}(hhh]hS)}(h&:peachpuff3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] peachpuff3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M^hjubah}(h]h]h]h]h!]uh%hhjkubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peachpuff4``h]h)}(hjh]h peachpuff4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M_hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:peachpuff4:`████████`h]h_)}(hjݜh]h████████}hjߜsbah}(h]h] peachpuff4ah]h]h!]uh%h^hjۜubah}(h]h]h]h]h!]uh%hRh'h?h)M_hj؜ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``peru``h]h)}(hjh]hperu}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M`hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :peru:`████████`h]h_)}(hj'h]h████████}hj)sbah}(h]h]peruah]h]h!]uh%h^hj%ubah}(h]h]h]h]h!]uh%hRh'h?h)M`hj"ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``pink``h]h)}(hjQh]hpink}hjSsbah}(h]h]h]h]h!]uh%hhjOubah}(h]h]h]h]h!]uh%hRh'h?h)MahjLubah}(h]h]h]h]h!]uh%hhjIubh)}(hhh]hS)}(h :pink:`████████`h]h_)}(hjqh]h████████}hjssbah}(h]h]pinkah]h]h!]uh%h^hjoubah}(h]h]h]h]h!]uh%hRh'h?h)Mahjlubah}(h]h]h]h]h!]uh%hhjIubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink1``h]h)}(hjh]hpink1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:pink1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mbhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink2``h]h)}(hjh]hpink2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mchjubah}(h]h]h]h]h!]uh%hhjݝubh)}(hhh]hS)}(h!:pink2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mchjubah}(h]h]h]h]h!]uh%hhjݝubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink3``h]h)}(hj/h]hpink3}hj1sbah}(h]h]h]h]h!]uh%hhj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mdhj*ubah}(h]h]h]h]h!]uh%hhj'ubh)}(hhh]hS)}(h!:pink3:`████████`h]h_)}(hjOh]h████████}hjQsbah}(h]h]pink3ah]h]h!]uh%h^hjMubah}(h]h]h]h]h!]uh%hRh'h?h)MdhjJubah}(h]h]h]h]h!]uh%hhj'ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``pink4``h]h)}(hjyh]hpink4}hj{sbah}(h]h]h]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjtubah}(h]h]h]h]h!]uh%hhjqubh)}(hhh]hS)}(h!:pink4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]pink4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mehjubah}(h]h]h]h]h!]uh%hhjqubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``plum``h]h)}(hjÞh]hplum}hjŞsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :plum:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]plumah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mfhjޞubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum1``h]h)}(hj h]hplum1}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum1:`████████`h]h_)}(hj-h]h████████}hj/sbah}(h]h]plum1ah]h]h!]uh%h^hj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mghj(ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum2``h]h)}(hjWh]hplum2}hjYsbah}(h]h]h]h]h!]uh%hhjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhhjRubah}(h]h]h]h]h!]uh%hhjOubh)}(hhh]hS)}(h!:plum2:`████████`h]h_)}(hjwh]h████████}hjysbah}(h]h]plum2ah]h]h!]uh%h^hjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhhjrubah}(h]h]h]h]h!]uh%hhjOubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum3``h]h)}(hjh]hplum3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mihjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum3:`████████`h]h_)}(hjh]h████████}hjßsbah}(h]h]plum3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mihjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``plum4``h]h)}(hjh]hplum4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:plum4:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]plum4ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mjhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``powderblue``h]h)}(hj5h]h powderblue}hj7sbah}(h]h]h]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mkhj0ubah}(h]h]h]h]h!]uh%hhj-ubh)}(hhh]hS)}(h&:powderblue:`████████`h]h_)}(hjUh]h████████}hjWsbah}(h]h] powderblueah]h]h!]uh%h^hjSubah}(h]h]h]h]h!]uh%hRh'h?h)MkhjPubah}(h]h]h]h]h!]uh%hhj-ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple``h]h)}(hjh]hpurple}hjsbah}(h]h]h]h]h!]uh%hhj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjzubah}(h]h]h]h]h!]uh%hhjwubh)}(hhh]hS)}(h":purple:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]purpleah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mlhjubah}(h]h]h]h]h!]uh%hhjwubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple1``h]h)}(hjɠh]hpurple1}hjˠsbah}(h]h]h]h]h!]uh%hhjǠubah}(h]h]h]h]h!]uh%hRh'h?h)MmhjĠubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:purple1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]purple1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mmhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple2``h]h)}(hjh]hpurple2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h#:purple2:`████████`h]h_)}(hj3h]h████████}hj5sbah}(h]h]purple2ah]h]h!]uh%h^hj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mnhj.ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple3``h]h)}(hj]h]hpurple3}hj_sbah}(h]h]h]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MohjXubah}(h]h]h]h]h!]uh%hhjUubh)}(hhh]hS)}(h#:purple3:`████████`h]h_)}(hj}h]h████████}hjsbah}(h]h]purple3ah]h]h!]uh%h^hj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mohjxubah}(h]h]h]h]h!]uh%hhjUubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``purple4``h]h)}(hjh]hpurple4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mphjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:purple4:`████████`h]h_)}(hjǡh]h████████}hjɡsbah}(h]h]purple4ah]h]h!]uh%h^hjšubah}(h]h]h]h]h!]uh%hRh'h?h)Mphj¡ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red``h]h)}(hjh]hred}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h:red:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]redah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mqhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red1``h]h)}(hj;h]hred1}hj=sbah}(h]h]h]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mrhj6ubah}(h]h]h]h]h!]uh%hhj3ubh)}(hhh]hS)}(h :red1:`████████`h]h_)}(hj[h]h████████}hj]sbah}(h]h]red1ah]h]h!]uh%h^hjYubah}(h]h]h]h]h!]uh%hRh'h?h)MrhjVubah}(h]h]h]h]h!]uh%hhj3ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red2``h]h)}(hjh]hred2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubh)}(hhh]hS)}(h :red2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]red2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mshjubah}(h]h]h]h]h!]uh%hhj}ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red3``h]h)}(hjϢh]hred3}hjѢsbah}(h]h]h]h]h!]uh%hhj͢ubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjʢubah}(h]h]h]h]h!]uh%hhjǢubh)}(hhh]hS)}(h :red3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]red3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mthjubah}(h]h]h]h]h!]uh%hhjǢubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``red4``h]h)}(hjh]hred4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Muhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :red4:`████████`h]h_)}(hj9h]h████████}hj;sbah}(h]h]red4ah]h]h!]uh%h^hj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Muhj4ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``rosybrown``h]h)}(hjch]h rosybrown}hjesbah}(h]h]h]h]h!]uh%hhjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj^ubah}(h]h]h]h]h!]uh%hhj[ubh)}(hhh]hS)}(h%:rosybrown:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrownah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mvhj~ubah}(h]h]h]h]h!]uh%hhj[ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown1``h]h)}(hjh]h rosybrown1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown1:`████████`h]h_)}(hjͣh]h████████}hjϣsbah}(h]h] rosybrown1ah]h]h!]uh%h^hjˣubah}(h]h]h]h]h!]uh%hRh'h?h)Mwhjȣubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown2``h]h)}(hjh]h rosybrown2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrown2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mxhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown3``h]h)}(hjAh]h rosybrown3}hjCsbah}(h]h]h]h]h!]uh%hhj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj<ubah}(h]h]h]h]h!]uh%hhj9ubh)}(hhh]hS)}(h&:rosybrown3:`████████`h]h_)}(hjah]h████████}hjcsbah}(h]h] rosybrown3ah]h]h!]uh%h^hj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Myhj\ubah}(h]h]h]h]h!]uh%hhj9ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``rosybrown4``h]h)}(hjh]h rosybrown4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:rosybrown4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] rosybrown4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mzhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``royalblue``h]h)}(hjդh]h royalblue}hjפsbah}(h]h]h]h]h!]uh%hhjӤubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjФubah}(h]h]h]h]h!]uh%hhjͤubh)}(hhh]hS)}(h%:royalblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M{hjubah}(h]h]h]h]h!]uh%hhjͤubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue1``h]h)}(hjh]h royalblue1}hj!sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M|hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue1:`████████`h]h_)}(hj?h]h████████}hjAsbah}(h]h] royalblue1ah]h]h!]uh%h^hj=ubah}(h]h]h]h]h!]uh%hRh'h?h)M|hj:ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue2``h]h)}(hjih]h royalblue2}hjksbah}(h]h]h]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjdubah}(h]h]h]h]h!]uh%hhjaubh)}(hhh]hS)}(h&:royalblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)M}hjubah}(h]h]h]h]h!]uh%hhjaubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue3``h]h)}(hjh]h royalblue3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue3:`████████`h]h_)}(hjӥh]h████████}hjեsbah}(h]h] royalblue3ah]h]h!]uh%h^hjѥubah}(h]h]h]h]h!]uh%hRh'h?h)M~hjΥubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``royalblue4``h]h)}(hjh]h royalblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:royalblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] royalblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``saddlebrown``h]h)}(hjGh]h saddlebrown}hjIsbah}(h]h]h]h]h!]uh%hhjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhj?ubh)}(hhh]hS)}(h':saddlebrown:`████████`h]h_)}(hjgh]h████████}hjisbah}(h]h] saddlebrownah]h]h!]uh%h^hjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj?ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon``h]h)}(hjh]hsalmon}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":salmon:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmonah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon1``h]h)}(hjۦh]hsalmon1}hjݦsbah}(h]h]h]h]h!]uh%hhj٦ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj֦ubah}(h]h]h]h]h!]uh%hhjӦubh)}(hhh]hS)}(h#:salmon1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmon1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjӦubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon2``h]h)}(hj%h]hsalmon2}hj'sbah}(h]h]h]h]h!]uh%hhj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:salmon2:`████████`h]h_)}(hjEh]h████████}hjGsbah}(h]h]salmon2ah]h]h!]uh%h^hjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon3``h]h)}(hjoh]hsalmon3}hjqsbah}(h]h]h]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjgubh)}(hhh]hS)}(h#:salmon3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]salmon3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjgubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``salmon4``h]h)}(hjh]hsalmon4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:salmon4:`████████`h]h_)}(hj٧h]h████████}hjۧsbah}(h]h]salmon4ah]h]h!]uh%h^hjקubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjԧubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``sandybrown``h]h)}(hjh]h sandybrown}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:sandybrown:`████████`h]h_)}(hj#h]h████████}hj%sbah}(h]h] sandybrownah]h]h!]uh%h^hj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen``h]h)}(hjMh]hseagreen}hjOsbah}(h]h]h]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhjEubh)}(hhh]hS)}(h$:seagreen:`████████`h]h_)}(hjmh]h████████}hjosbah}(h]h]seagreenah]h]h!]uh%h^hjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjEubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen1``h]h)}(hjh]h seagreen1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seagreen1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen2``h]h)}(hjh]h seagreen2}hjsbah}(h]h]h]h]h!]uh%hhjߨubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjܨubah}(h]h]h]h]h!]uh%hhj٨ubh)}(hhh]hS)}(h%:seagreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj٨ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen3``h]h)}(hj+h]h seagreen3}hj-sbah}(h]h]h]h]h!]uh%hhj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhj#ubh)}(hhh]hS)}(h%:seagreen3:`████████`h]h_)}(hjKh]h████████}hjMsbah}(h]h] seagreen3ah]h]h!]uh%h^hjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhj#ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seagreen4``h]h)}(hjuh]h seagreen4}hjwsbah}(h]h]h]h]h!]uh%hhjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjmubh)}(hhh]hS)}(h%:seagreen4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seagreen4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjmubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell``h]h)}(hjh]hseashell}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:seashell:`████████`h]h_)}(hjߩh]h████████}hjsbah}(h]h]seashellah]h]h!]uh%h^hjݩubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjکubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell1``h]h)}(hj h]h seashell1}hj sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seashell1:`████████`h]h_)}(hj)h]h████████}hj+sbah}(h]h] seashell1ah]h]h!]uh%h^hj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell2``h]h)}(hjSh]h seashell2}hjUsbah}(h]h]h]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhjKubh)}(hhh]hS)}(h%:seashell2:`████████`h]h_)}(hjsh]h████████}hjusbah}(h]h] seashell2ah]h]h!]uh%h^hjqubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjnubah}(h]h]h]h]h!]uh%hhjKubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell3``h]h)}(hjh]h seashell3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h%:seashell3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] seashell3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``seashell4``h]h)}(hjh]h seashell4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjߪubh)}(hhh]hS)}(h%:seashell4:`████████`h]h_)}(hjh]h████████}hj sbah}(h]h] seashell4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjߪubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna``h]h)}(hj1h]hsienna}hj3sbah}(h]h]h]h]h!]uh%hhj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj)ubh)}(hhh]hS)}(h":sienna:`████████`h]h_)}(hjQh]h████████}hjSsbah}(h]h]siennaah]h]h!]uh%h^hjOubah}(h]h]h]h]h!]uh%hRh'h?h)MhjLubah}(h]h]h]h]h!]uh%hhj)ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna1``h]h)}(hj{h]hsienna1}hj}sbah}(h]h]h]h]h!]uh%hhjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjsubh)}(hhh]hS)}(h#:sienna1:`████████`h]h_)}(hjh]h████████}hjsbavh}(h]h]sienna1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjsubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna2``h]h)}(hjūh]hsienna2}hjǫsbah}(h]h]h]h]h!]uh%hhjëubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:sienna2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]sienna2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna3``h]h)}(hjh]hsienna3}hjsbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:sienna3:`████████`h]h_)}(hj/h]h████████}hj1sbah}(h]h]sienna3ah]h]h!]uh%h^hj-ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj*ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``sienna4``h]h)}(hjYh]hsienna4}hj[sbah}(h]h]h]h]h!]uh%hhjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhjQubh)}(hhh]hS)}(h#:sienna4:`████████`h]h_)}(hjyh]h████████}hj{sbah}(h]h]sienna4ah]h]h!]uh%h^hjwubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjtubah}(h]h]h]h]h!]uh%hhjQubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``silver``h]h)}(hjh]hsilver}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":silver:`████████`h]h_)}(hjìh]h████████}hjŬsbah}(h]h]silverah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue``h]h)}(hjh]hskyblue}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:skyblue:`████████`h]h_)}(hj h]h████████}hjsbah}(h]h]skyblueah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue1``h]h)}(hj7h]hskyblue1}hj9sbah}(h]h]h]h]h!]uh%hhj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhj/ubh)}(hhh]hS)}(h$:skyblue1:`████████`h]h_)}(hjWh]h████████}hjYsbah}(h]h]skyblue1ah]h]h!]uh%h^hjUubah}(h]h]h]h]h!]uh%hRh'h?h)MhjRubah}(h]h]h]h]h!]uh%hhj/ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue2``h]h)}(hjh]hskyblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjyubh)}(hhh]hS)}(h$:skyblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]skyblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjyubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue3``h]h)}(hj˭h]hskyblue3}hjͭsbah}(h]h]h]h]h!]uh%hhjɭubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƭubah}(h]h]h]h]h!]uh%hhjíubh)}(hhh]hS)}(h$:skyblue3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]skyblue3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjíubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``skyblue4``h]h)}(hjh]hskyblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h$:skyblue4:`████████`h]h_)}(hj5h]h████████}hj7sbah}(h]h]skyblue4ah]h]h!]uh%h^hj3ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj0ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slateblue``h]h)}(hj_h]h slateblue}hjasbah}(h]h]h]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhjWubh)}(hhh]hS)}(h%:slateblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblueah]h]h!]uh%h^hj}ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjzubah}(h]h]h]h]h!]uh%hhjWubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue1``h]h)}(hjh]h slateblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue1:`████████`h]h_)}(hjɮh]h████████}hjˮsbah}(h]h] slateblue1ah]h]h!]uh%h^hjǮubah}(h]h]h]h]h!]uh%hRh'h?h)MhjĮubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue2``h]h)}(hjh]h slateblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblue2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue3``h]h)}(hj=h]h slateblue3}hj?sbah}(h]h]h]h]h!]uh%hhj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhj5ubh)}(hhh]hS)}(h&:slateblue3:`████████`h]h_)}(hj]h]h████████}hj_sbah}(h]h] slateblue3ah]h]h!]uh%h^hj[ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjXubah}(h]h]h]h]h!]uh%hhj5ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slateblue4``h]h)}(hjh]h slateblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slateblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slateblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slategray``h]h)}(hjѯh]h slategray}hjӯsbah}(h]h]h]h]h!]uh%hhjϯubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj̯ubah}(h]h]h]h]h!]uh%hhjɯubh)}(hhh]hS)}(h%:slategray:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategrayah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjɯubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray1``h]h)}(hjh]h slategray1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray1:`████████`h]h_)}(hj;h]h████████}hj=sbah}(h]h] slategray1ah]h]h!]uh%h^hj9ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj6ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray2``h]h)}(hjeh]h slategray2}hjgsbah}(h]h]h]h]h!]uh%hhjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj]ubh)}(hhh]hS)}(h&:slategray2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategray2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj]ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray3``h]h)}(hjh]h slategray3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray3:`████████`h]h_)}(hjϰh]h████████}hjѰsbah}(h]h] slategray3ah]h]h!]uh%h^hjͰubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjʰubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``slategray4``h]h)}(hjh]h slategray4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:slategray4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] slategray4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``slategrey``h]h)}(hjCh]h slategrey}hjEsbah}(h]h]h]h]h!]uh%hhjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhj;ubh)}(hhh]hS)}(h%:slategrey:`████████`h]h_)}(hjch]h████████}hjesbah}(h]h] slategreyah]h]h!]uh%h^hjaubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj^ubah}(h]h]h]h]h!]uh%hhj;ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``snow``h]h)}(hjh]hsnow}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :snow:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snowah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow1``h]h)}(hjױh]hsnow1}hjٱsbah}(h]h]h]h]h!]uh%hhjձubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjұubah}(h]h]h]h]h!]uh%hhjϱubh)}(hhh]hS)}(h!:snow1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snow1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjϱubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow2``h]h)}(hj!h]hsnow2}hj#sbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:snow2:`████████`h]h_)}(hjAh]h████████}hjCsbah}(h]h]snow2ah]h]h!]uh%h^hj?ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj<ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow3``h]h)}(hjkh]hsnow3}hjmsbah}(h]h]h]h]h!]uh%hhjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjcubh)}(hhh]hS)}(h!:snow3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]snow3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjcubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``snow4``h]h)}(hjh]hsnow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:snow4:`████████`h]h_)}(hjղh]h████████}hjײsbah}(h]h]snow4ah]h]h!]uh%h^hjӲubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjвubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen``h]h)}(hjh]h springgreen}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h':springgreen:`████████`h]h_)}(hjh]h████████}hj!sbah}(h]h] springgreenah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen1``h]h)}(hjIh]h springgreen1}hjKsbah}(h]h]h]h]h!]uh%hhjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhjAubh)}(hhh]hS)}(h(:springgreen1:`████████`h]h_)}(hjih]h████████}hjksbah}(h]h] springgreen1ah]h]h!]uh%h^hjgubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjdubah}(h]h]h]h]h!]uh%hhjAubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen2``h]h)}(hjh]h springgreen2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:springgreen2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] springgreen2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen3``h]h)}(hjݳh]h springgreen3}hj߳sbah}(h]h]h]h]h!]uh%hhj۳ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjسubah}(h]h]h]h]h!]uh%hhjճubh)}(hhh]hS)}(h(:springgreen3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] springgreen3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjճubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``springgreen4``h]h)}(hj'h]h springgreen4}hj)sbah}(h]h]h]h]h!]uh%hhj%ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj"ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h(:springgreen4:`████████`h]h_)}(hjGh]h████████}hjIsbah}(h]h] springgreen4ah]h]h!]uh%h^hjEubah}(h]h]h]h]h!]uh%hRh'h?h)MhjBubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``steelblue``h]h)}(hjqh]h steelblue}hjssbah}(h]h]h]h]h!]uh%hhjoubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjlubah}(h]h]h]h]h!]uh%hhjiubh)}(hhh]hS)}(h%:steelblue:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] steelblueah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjiubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue1``h]h)}(hjh]h steelblue1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue1:`████████`h]h_)}(hj۴h]h████████}hjݴsbah}(h]h] steelblue1ah]h]h!]uh%h^hjٴubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjִubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue2``h]h)}(hjh]h steelblue2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue2:`████████`h]h_)}(hj%h]h████████}hj'sbah}(h]h] steelblue2ah]h]h!]uh%h^hj#ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue3``h]h)}(hjOh]h steelblue3}hjQsbah}(h]h]h]h]h!]uh%hhjMubah}(h]h]h]h]h!]uh%hRh'h?h)MhjJubah}(h]h]h]h]h!]uh%hhjGubh)}(hhh]hS)}(h&:steelblue3:`████████`h]h_)}(hjoh]h████████}hjqsbah}(h]h] steelblue3ah]h]h!]uh%h^hjmubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjjubah}(h]h]h]h]h!]uh%hhjGubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``steelblue4``h]h)}(hjh]h steelblue4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:steelblue4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] steelblue4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan``h]h)}(hjh]htan}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj޵ubah}(h]h]h]h]h!]uh%hhj۵ubh)}(hhh]hS)}(h:tan:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tanah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj۵ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan1``h]h)}(hj-h]htan1}hj/sbah}(h]h]h]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj(ubah}(h]h]h]h]h!]uh%hhj%ubh)}(hhh]hS)}(h :tan1:`████████`h]h_)}(hjMh]h████████}hjOsbah}(h]h]tan1ah]h]h!]uh%h^hjKubah}(h]h]h]h]h!]uh%hRh'h?h)MhjHubah}(h]h]h]h]h!]uh%hhj%ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan2``h]h)}(hjwh]htan2}hjysbah}(h]h]h]h]h!]uh%hhjuubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjrubah}(h]h]h]h]h!]uh%hhjoubh)}(hhh]hS)}(h :tan2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tan2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjoubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan3``h]h)}(hjh]htan3}hjösbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :tan3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tan3ah]h]h!]uh%h^hj߶ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjܶubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``tan4``h]h)}(hj h]htan4}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h :tan4:`████████`h]h_)}(hj+h]h████████}hj-sbah}(h]h]tan4ah]h]h!]uh%h^hj)ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj&ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``teal``h]h)}(hjUh]hteal}hjWsbah}(h]h]h]h]h!]uh%hhjSubah}(h]h]h]h]h!]uh%hRh'h?h)MhjPubah}(h]h]h]h]h!]uh%hhjMubh)}(hhh]hS)}(h :teal:`████████`h]h_)}(hjuh]h████████}hjwsbah}(h]h]tealah]h]h!]uh%h^hjsubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjpubah}(h]h]h]h]h!]uh%hhjMubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle``h]h)}(hjh]hthistle}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:thistle:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistleah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle1``h]h)}(hjh]hthistle1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:thistle1:`████████`h]h_)}(hj h]h████████}hj sbah}(h]h]thistle1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle2``h]h)}(hj3h]hthistle2}hj5sbah}(h]h]h]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj.ubah}(h]h]h]h]h!]uh%hhj+ubh)}(hhh]hS)}(h$:thistle2:`████████`h]h_)}(hjSh]h████████}hjUsbah}(h]h]thistle2ah]h]h!]uh%h^hjQubah}(h]h]h]h]h!]uh%hRh'h?h)MhjNubah}(h]h]h]h]h!]uh%hhj+ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle3``h]h)}(hj}h]hthistle3}hjsbah}(h]h]h]h]h!]uh%hhj{ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjxubah}(h]h]h]h]h!]uh%hhjuubh)}(hhh]hS)}(h$:thistle3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistle3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjuubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``thistle4``h]h)}(hjǸh]hthistle4}hjɸsbah}(h]h]h]h]h!]uh%hhjŸubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj¸ubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h$:thistle4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]thistle4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato``h]h)}(hjh]htomato}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhj ubh)}(hhh]hS)}(h":tomato:`████████`h]h_)}(hj1h]h████████}hj3sbah}(h]h]tomatoah]h]h!]uh%h^hj/ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj,ubah}(h]h]h]h]h!]uh%hhj ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato1``h]h)}(hj[h]htomato1}hj]sbah}(h]h]h]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%hRh'h?h)MhjVubah}(h]h]h]h]h!]uh%hhjSubh)}(hhh]hS)}(h#:tomato1:`████████`h]h_)}(hj{h]h████████}hj}sbah}(h]h]tomato1ah]h]h!]uh%h^hjyubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjvubah}(h]h]h]h]h!]uh%hhjSubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato2``h]h)}(hjh]htomato2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:tomato2:`████████`h]h_)}(hjŹh]h████████}hjǹsbah}(h]h]tomato2ah]h]h!]uh%h^hjùubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato3``h]h)}(hjh]htomato3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:tomato3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]tomato3ah]h]h!]uh%h^hj ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``tomato4``h]h)}(hj9h]htomato4}hj;sbah}(h]h]h]h]h!]uh%hhj7ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj4ubah}(h]h]h]h]h!]uh%hhj1ubh)}(hhh]hS)}(h#:tomato4:`████████`h]h_)}(hjYh]h████████}hj[sbah}(h]h]tomato4ah]h]h!]uh%h^hjWubah}(h]h]h]h]h!]uh%hRh'h?h)MhjTubah}(h]h]h]h]h!]uh%hhj1ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``turquoise``h]h)}(hjh]h turquoise}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj~ubah}(h]h]h]h]h!]uh%hhj{ubh)}(hhh]hS)}(h%:turquoise:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoiseah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj{ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise1``h]h)}(hjͺh]h turquoise1}hjϺsbah}(h]h]h]h]h!]uh%hhj˺ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjȺubah}(h]h]h]h]h!]uh%hhjźubh)}(hhh]hS)}(h&:turquoise1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoise1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjźubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise2``h]h)}(hjh]h turquoise2}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:turquoise2:`████████`h]h_)}(hj7h]h████████}hj9sbah}(h]h] turquoise2ah]h]h!]uh%h^hj5ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj2ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise3``h]h)}(hjah]h turquoise3}hjcsbah}(h]h]h]h]h!]uh%hhj_ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj\ubah}(h]h]h]h]h!]uh%hhjYubh)}(hhh]hS)}(h&:turquoise3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] turquoise3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj|ubah}(h]h]h]h]h!]uh%hhjYubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``turquoise4``h]h)}(hjh]h turquoise4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:turquoise4:`████████`h]h_)}(hj˻h]h████████}hjͻsbah}(h]h] turquoise4ah]h]h!]uh%h^hjɻubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjƻubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``violet``h]h)}(hjh]hviolet}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":violet:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]violetah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``violetred``h]h)}(hj?h]h violetred}hjAsbah}(h]h]h]h]h!]uh%hhj=ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj:ubah}(h]h]h]h]h!]uh%hhj7ubh)}(hhh]hS)}(h%:violetred:`████████`h]h_)}(hj_h]h████████}hjasbah}(h]h] violetredah]h]h!]uh%h^hj]ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjZubah}(h]h]h]h]h!]uh%hhj7ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred1``h]h)}(hjh]h violetred1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:violetred1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred2``h]h)}(hjӼh]h violetred2}hjռsbah}(h]h]h]h]h!]uh%hhjѼubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjμubah}(h]h]h]h]h!]uh%hhj˼ubh)}(hhh]hS)}(h&:violetred2:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred2ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj˼ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred3``h]h)}(hjh]h violetred3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h&:violetred3:`████████`h]h_)}(hj=h]h████████}hj?sbah}(h]h] violetred3ah]h]h!]uh%h^hj;ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj8ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``violetred4``h]h)}(hjgh]h violetred4}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjbubah}(h]h]h]h]h!]uh%hhj_ubh)}(hhh]hS)}(h&:violetred4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] violetred4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhj_ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat``h]h)}(hjh]hwheat}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:wheat:`████████`h]h_)}(hjѽh]h████████}hjӽsbah}(h]h]wheatah]h]h!]uh%h^hjϽubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj̽ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat1``h]h)}(hjh]hwheat1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":wheat1:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat2``h]h)}(hjEh]hwheat2}hjGsbah}(h]h]h]h]h!]uh%hhjCubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj@ubah}(h]h]h]h]h!]uh%hhj=ubh)}(hhh]hS)}(h":wheat2:`████████`h]h_)}(hjeh]h████████}hjgsbah}(h]h]wheat2ah]h]h!]uh%h^hjcubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj`ubah}(h]h]h]h]h!]uh%hhj=ubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat3``h]h)}(hjh]hwheat3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":wheat3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``wheat4``h]h)}(hjپh]hwheat4}hj۾sbah}(h]h]h]h]h!]uh%hhj׾ubah}(h]h]h]h]h!]uh%hRh'h?h)MhjԾubah}(h]h]h]h]h!]uh%hhjѾubh)}(hhh]hS)}(h":wheat4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]wheat4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjѾubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``white``h]h)}(hj#h]hwhite}hj%sbah}(h]h]h]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h!:white:`████████`h]h_)}(hjCh]h████████}hjEsbah}(h]h]whiteah]h]h!]uh%h^hjAubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj>ubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``whitesmoke``h]h)}(hjmh]h whitesmoke}hjosbah}(h]h]h]h]h!]uh%hhjkubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjhubah}(h]h]h]h]h!]uh%hhjeubh)}(hhh]hS)}(h&:whitesmoke:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h] whitesmokeah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjeubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow``h]h)}(hjh]hyellow}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h":yellow:`████████`h]h_)}(hj׿h]h████████}hjٿsbah}(h]h]yellowah]h]h!]uh%h^hjտubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjҿubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow1``h]h)}(hjh]hyellow1}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow1:`████████`h]h_)}(hj!h]h████████}hj#sbah}(h]h]yellow1ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow2``h]h)}(hjKh]hyellow2}hjMsbah}(h]h]h]h]h!]uh%hhjIubah}(h]h]h]h]h!]uh%hRh'h?h)MhjFubah}(h]h]h]h]h!]uh%hhjCubh)}(hhh]hS)}(h#:yellow2:`████████`h]h_)}(hjkh]h████████}hjmsbah}(h]h]yellow2ah]h]h!]uh%h^hjiubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjfubah}(h]h]h]h]h!]uh%hhjCubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow3``h]h)}(hjh]hyellow3}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow3:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]yellow3ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h ``yellow4``h]h)}(hjh]hyellow4}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubh)}(hhh]hS)}(h#:yellow4:`████████`h]h_)}(hjh]h████████}hjsbah}(h]h]yellow4ah]h]h!]uh%h^hjubah}(h]h]h]h]h!]uh%hRh'h?h)Mhjubah}(h]h]h]h]h!]uh%hhjubeh}(h]h]h]h]h!]uh%hhj.ubh)}(hhh](h)}(hhh]hS)}(h``yellowgreen``h]h)}(hj)h]h yellowgreen}hj+sbah}(h]h]h]h]h!]uh%hhj'ubah}(h]h]h]h]h!]uh%hRh'h?h)Mhj$ubah}(h]h]h]h]h!]uh%hhj!ubh)}(hhh]hS)}(h':yellowgreen:`████████`h]h_)}(hjIh]h████████}hjKsbah}(h]h] yellowgreenah]h]h!]uh%h^hjGubah}(h]h]h]h]h!]uh%hRh'h?h)MhjDubah}(h]h]h]h]h!]uh%hhj!ubeh}(h]h]h]h]h!]uh%hhj.ubeh}(h]h]h]h]h!]uh%j,hhubeh}(h]h]h]h]h!]colsKuh%hhhubah}(h]h]h]h]h!]uh%hhh,h&hh'h?h)Nubeh}(h]colores-nombradosah]h]colores nombradosah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinkshfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjhhu nametypes}(jhuh}(jh,hhu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](h system_message)}(hhh]hS)}(hyNo directive entry for "role" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "role".h]hyNo directive entry for "role" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "role".}hjsbah}(h]h]h]h]h!]uh%hRhjubah}(h]h]h]h]h!]levelKtypeINFOlineKsource,internal padding before docs/reST/common.txtuh%jhhh&hh'h(h)Kubj)}(hhh]hS)}(hwNo directive entry for "raw" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "raw".h]hwNo directive entry for "raw" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "raw".}hj2sbah}(h]h]h]h]h!]uh%hRhj/ubah}(h]h]h]h]h!]levelKtypej+lineKsourceh(uh%jhh,h&hh'h?h)Kubetransform_messages] transformerN include_log]docs/es/color_list.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.3991318 pygame-2.6.1/docs/generated/es/doctrees/environment.pickle0000644000175100001770000042314714676242430023274 0ustar00runnerdockersphinx.environmentBuildEnvironment)}(appN doctreedirsphinx.util._pathlib_StrPath(/homerunnerworkpygamehdocs generatedesdoctreestRsrcdirh (h h h h hhhhtRconfig sphinx.configConfig)}(setupN extensions](sphinx.ext.autodocsphinx.ext.doctestsphinx.ext.coverage ext.headersext.boilerplateext.customversionext.edit_on_githubelanguageh locale_dirs]localesasource_encoding utf-8-sig needs_sphinxNprojecthauthorAuthor name not setproject_copyright2000-2023, pygame developers copyrighth3version2.6.1releaseh6today today_fmtNfigure_language_filename{root}.{language}{ext} gettext_allow_fuzzy_translationstranslation_progress_classesroot_docindex master_doch@ source_suffix}.rstrestructuredtextsexclude_patterns]include_patterns]**a default_roleNadd_function_parenthesesadd_module_namestoc_object_entriestoc_object_entries_show_parentsdomaintrim_footnote_reference_space show_authorspygments_stylesphinxhighlight_languagedefaulthighlight_options}templates_path]../reST/_templatesatemplate_bridgeN keep_warningssuppress_warnings]show_warning_typesmodindex_common_prefix]ha rst_epilogN rst_prologNtrim_doctest_flagsprimary_domainpyneeds_extensions} manpages_urlNnitpickynitpick_ignore]nitpick_ignore_regex]numfignumfig_secnum_depthK numfig_format}(section Sección %sfigure Figura %stableTabla %s code-blockLista %sumaximum_signature_line_lengthNmath_number_allmath_eqref_formatN math_numfig math_numsep. tls_verify tls_cacertsN user_agentN smartquotessmartquotes_actionqDesmartquotes_excludes}( languages]jaabuilders](mantexteuoption_emphasise_placeholders epub_versionG@ epub_themeepubepub_theme_options}epub_identifierunknown epub_schemehepub_uidh epub_cover) epub_guide)epub_pre_files]epub_post_files]html_css_files]epub_exclude_files] epub_tocdepthK epub_tocdup epub_tocscopehVepub_fix_imagesepub_max_image_widthKepub_show_urlsinlinehtml_use_indexepub_descriptionhepub_contributorhepub_writing_mode horizontal html_themeclassichtml_theme_path]../reST/themesahtml_theme_options}home_urihttps://www.pygame.org/s html_titlepygame v2.6.1 documentation html_styleN html_logo../reST/_static/pygame_tiny.png html_favicon../reST/_static/pygame.ico html_js_files]html_static_path]../reST/_staticahtml_extra_path] ../LGPL.txtahtml_last_updated_fmtN html_sidebars}html_additional_pages}html_domain_indiceshtml_permalinkshtml_permalinks_icon¶html_split_indexhtml_copy_sourcehtml_show_sourcelinkhtml_sourcelink_suffix.txthtml_use_opensearchh9html_file_suffixNhtml_link_suffixNhtml_show_copyrighthtml_show_search_summaryhtml_show_sphinx html_context}html_output_encodingutf-8html_compact_listshtml_secnumber_suffix. html_search_languageNhtml_search_options}html_search_scorerh9html_scaled_image_link html_baseurlh9html_codeblock_linenos_stylehhtml_math_rendererN html4_writer mathjax_path;https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.jsmathjax_options}mathjax_inline](\(\)emathjax_display](\[\]emathjax_configNmathjax3_configNgettext_compactgettext_location gettext_uuidgettext_auto_buildgettext_additional_targets]gettext_last_translatorFULL NAME gettext_language_teamLANGUAGE latex_documents](h@ Pygame.texPygame DocumentationPygame Developersmanualta latex_logoNlatex_appendices]latex_use_latex_multicolumnlatex_toplevel_sectioningNlatex_domain_indiceslatex_show_urlsnolatex_show_pagerefslatex_elements}latex_additional_files]latex_table_style](booktabs colorrowse latex_themej latex_theme_options}latex_theme_path]linkcheck_ignore]linkcheck_exclude_documents]linkcheck_allowed_redirects}linkcheck_auth]linkcheck_request_headers}linkcheck_retriesKlinkcheck_timeoutKlinkcheck_workersKlinkcheck_anchorslinkcheck_anchors_ignore]^!a linkcheck_anchors_ignore_for_url)linkcheck_rate_limit_timeoutG@rlinkcheck_allow_unauthorized#linkcheck_report_timeouts_as_broken man_show_urlsman_make_section_directorytexinfo_appendices]texinfo_elements}texinfo_domain_indicestexinfo_show_urlsfootnotetexinfo_no_detailmenutexinfo_cross_referencestext_sectionchars*=-~"+` text_newlinesunixtext_add_secnumberstext_secnumber_suffix. xml_prettyc_id_attributes]c_paren_attributes]c_extra_keywords](alignasalignofboolcomplex imaginarynoreturn static_assert thread_localec_maximum_signature_line_lengthNcpp_index_common_prefix]cpp_id_attributes]cpp_paren_attributes]!cpp_maximum_signature_line_lengthNcpp_debug_lookupcpp_debug_show_tree(javascript_maximum_signature_line_lengthNstrip_signature_backslash!python_use_unqualified_type_names$python_maximum_signature_line_lengthN"python_display_short_literal_typesapplehelp_bundle_idNapplehelp_dev_regionen-usapplehelp_bundle_version1applehelp_iconNapplehelp_kb_urlNapplehelp_remote_urlNapplehelp_index_anchorsapplehelp_min_term_lengthNapplehelp_indexer_path/usr/bin/hiutilapplehelp_codesign_path/usr/bin/codesign applehelp_disable_external_toolshtmlhelp_basename Pygamedochtmlhelp_file_suffixNhtmlhelp_link_suffixNqthelp_namespaceN qthelp_themenonavqthelp_theme_options}autoclass_contentclassautodoc_member_order alphabeticalautodoc_class_signaturemixedautodoc_default_options}autodoc_docstring_signatureautodoc_mock_imports]autodoc_typehints signature$autodoc_typehints_description_targetallautodoc_type_aliases}autodoc_typehints_formatshortautodoc_warningiserrorautodoc_inherit_docstringsautodoc_preserve_defaultsdoctest_show_successes doctest_path]doctest_test_doctest_blockshVdoctest_global_setuph9doctest_global_cleanuph9doctest_default_flagsK)coverage_modules)coverage_ignore_modules]coverage_ignore_functions]coverage_ignore_classes]coverage_ignore_pyobjects]coverage_c_path]coverage_c_regexes}coverage_ignore_c_items}coverage_write_headlinecoverage_statistics_to_reportcoverage_statistics_to_stdoutcoverage_skip_undoc_in_sourcecoverage_show_missing_items headers_dest src_c/docheaders_mkdirsheaders_filename_sfx_docheaders_templateheader.hboilerplate_skip_transform]h@aversionadded_formatNew in pygame %sversionchanged_formatChanged in pygame %sdeprecated_formatDeprecated since pygame %sversionextended_formatExtended in pygame %sedit_on_github_project pygame/pygameedit_on_github_branchmainepub_css_files]_options}(h/henvh0h1jh2h3htmlh4h3jh5h6jh7h6jh8h9jh:Njh(hjh)h*jh;hjhAh@jh?h@jhBhCjh,h-jhFhGjhHhIjhKNjhLjhMjhNjhOhPjhQjhRjhShTjhUhVjhWhXjhYhZjh\Njh]jh^h_jh`jhahbjhcNjhdNjhejhfhgjh.Nh9hhhih9hjNjhkh9hlhmh9hnhoh9hpjhqKjhrhsjh|Njh}jh~NjhjhhjhjhNjhNjhjhhjhhjhj epub_basenamehh9hG@hhhhhhh epub_titlehh epub_authorh1h epub_languagehhepub_publisherh1hepub_copyrighth3hhhhhhhhhjh)jh)jhhjhhjjjhhhjhKjhjhhVjhjhKjhhhepub_use_indexhhhhhhhhhhhhjhhjhhjhhjhtml_short_titlehjhNjhhjhhjhhjhhjhhjhhjhNjhhjhhjhΈjhψjhhjhjh҉jhӈjhԈjhhjhh9jhNjhNjhڈjhۈjh܉jhhjhhjhjhhjhNjhhjhh9h9hjhh9jhhjhNjhjhhjhhjhhjhhjhNjmathjax2_configNjhNjhjhjhjhjhjjjjjjjj latex_enginepdflatexh9jjh9j Nh9j jh9jh9latex_use_xindyh9jNh9jh9jjh9jh9jjh9jjh9jjh9jj h9jjh9j j!h9latex_docclass}h9j"j#h9j$j%h9j&j'h9j(j)h9j*j+h9j,Kh9j-Kh9j.Kh9j/h9j0j1h9j3)h9j4G@rh9j5h9j6h9 man_pages](h@pygame pygame 2.6.1]h1aKtah9j7h9j8h9singlehtml_sidebarshjtexinfo_documents](h@pygamehh1jOne line description of project Miscellaneoustah9j9j:h9j;j<h9j=h9j>j?h9j@h9jAh9jBjCjjDjEjjFjjGjHjjIjjJjKjjLjMjjNjOjjXNjjYjZjj[j\jj]j^jj_Njj`h9jah9jbNjjcjjdjjeNjjfjapplehelp_bundle_nameh applehelpjgNjjhjijjjjkjjlNjapplehelp_kb_product pygame-2.6.1jjmNjjnNjjojjpNjapplehelp_stopwordshjapplehelp_localehjapplehelp_title pygame Helpjapplehelp_codesign_identityNjapplehelp_codesign_flags]jjqjrjjsjtjjujdevhelp_basenamehdevhelpjvjwh9jxNjjyNjqthelp_basenamehjjzNjj{j|jj}j~jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjh9jjh9jhVh9jh9h9jh9h9jK)h9j)h9jjh9jjh9jjh9jjh9jjh9jjh9jjh9jh9jh9jh9jh9jh9jjjjh9jjjjjjjjh9jjjjjjjjjjjjjjjjjjuub config_statusKconfig_status_extrah9eventsNh/sphinx.projectProject)}(hh (h h h h hhhhtRhBhD_first_source_suffixhDdocnames(tutorials/MoverImagenreferencias/camerareferencias/colortutorials/GuiaNewbietutorials/tom_juegos3indextutorials/SpriteIntrotutorials/tom_juegos4tutorials/ModosVisualizaciontutorials/IniciarImportartutorials/CamaraIntroreferencias/cdromtutorials/SurfarrayIntrotutorials/CrearJuegostutorials/chimpance.pytutorials/tom_juegos2referencias/cursors color_list tutorials/ChimpanceLineaporLinealogosreferencias/bufferproxytutorials/tom_juegos5tutorials/tom_juegos6_path_to_docname}(pathlib PosixPathcolor_list.rstRj&j0 index.rstRjj0 logos.rstRj(j0 referenciasbufferproxy.rstRj)j0j: camera.rstRjj0j: cdrom.rstRj j0j: color.rstRjj0j: cursors.rstRj%j0 tutorialsCamaraIntro.rstRjj0jJChimpanceLineaporLinea.rstRj'j0jJCrearJuegos.rstRj"j0jJGuiaNewbie.rstRjj0jJIniciarImportar.rstRjj0jJModosVisualizacion.rstRjj0jJMoverImagen.rstRjj0jJSpriteIntro.rstRjj0jJSurfarrayIntro.rstRj!j0jJchimpance.py.rstRj#j0jJtom_juegos2.rstRj$j0jJtom_juegos3.rstRjj0jJtom_juegos4.rstRjj0jJtom_juegos5.rstRj*j0jJtom_juegos6.rstRj+u_docname_to_path}(j&j3jj6j(j9j)j=jj@j jCjjFj%jIjjMj'jPj"jSjjVjjYjj\jj_jjbj!jej#jhj$jkjjnjjqj*jtj+jwuubh5}(sphinx.domains.cKsphinx.domains.changesetKsphinx.domains.citationKsphinx.domains.cppK sphinx.domains.indexKsphinx.domains.javascriptKsphinx.domains.mathKsphinx.domains.pythonKsphinx.domains.rstKsphinx.domains.stdKhTK?uversioning_conditionversioning_comparedomains}settings}(auto_id_prefixid image_loadinglinkembed_stylesheetcloak_email_addresses pep_base_urlhttps://peps.python.org/pep_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/rfc_referencesNinput_encodingh-doctitle_xformsectsubtitle_xformsection_self_link halt_levelKfile_insertion_enabledsmartquotes_locales]jhhQ language_codeh smart_quotesuall_docs}(j&)~A#jA#j(0A#j)A#j_A#j ވA#jA#j%hӊA#j-A#j'uA#j"A#jfA#joA#jόA#j%A#jA#j! qA#j#A#j$A#jA#jA#j*(GA#j+{A#u dependencies collections defaultdictbuiltinssetR(j&(../reST/common.txtj(()../reST/_static/pygame_powered_lowres.png"../reST/_static/pygame_powered.png../reST/_static/pygame_lofi.png../reST/_static/pygame_tiny.png../reST/_static/pygame_logo.pngj)(../reST/common.txtj(../reST/common.txtj (../reST/common.txtj(../reST/common.txtj%(../reST/common.txt3../reST/ref/code_examples/cursors_module_example.pyj(!../reST/tut/camera_background.jpg../reST/tut/camera_mask.jpg../reST/tut/camera_yuv.jpg../reST/tut/camera_green.jpg"../reST/tut/camera_thresholded.jpg../reST/common.txt../reST/tut/camera_thresh.jpg../reST/tut/camera_rgb.jpg../reST/tut/camera_hsv.jpg../reST/tut/camera_average.jpgj'(tutorials/chimpshot.giftutorials/common.txtj"(../reST/common.txtj(../reST/common.txtj(../reST/common.txtj(../reST/common.txtj(../reST/common.txtj(../reST/common.txtj!( ../reST/tut/surfarray_soften.png!../reST/tut/surfarray_flipped.png"../reST/tut/surfarray_rgbarray.png!../reST/tut/surfarray_striped.png ../reST/tut/surfarray_redimg.png../reST/common.txt!../reST/tut/surfarray_scaleup.png../reST/tut/surfarray_xfade.png"../reST/tut/surfarray_allblack.png#../reST/tut/surfarray_scaledown.pngj#(../../examples/chimp.pytutorials/common.txtj$(../reST/common.txt../reST/tut/tom_basic.pngj(../reST/common.txtj(../reST/common.txt../reST/tut/tom_radians.png../reST/tut/tom_formulae.pngj*(../reST/common.txtj+(../reST/common.txtuincludedjjR reread_always_pickled_doctree_cache}_write_doc_doctree_cache}metadatajjdictRtitles}(j&docutils.nodestitle)}( rawsourceh9children]jTextColores Nombrados}parentjsba attributes}(ids]classes]names]dupnames]backrefs]utagnamejubjj)}(j h9j ]j Página Principal de Pygame}jj sbaj}(j]j]j]j]j]ujjubj(j)}(j h9j ]j Página de Logotipos de Pygame}jj-sbaj}(j]j]j]j]j]ujjubj)j)}(j h9j ]jliteral)}(j ]j pygame.BufferProxy}jj?sbaj :class:`pygame.BufferProxy`jj=j}(j]j](xrefpypy-classej]j]j]ulineNsourceNjj:ubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j>)}(j ]j  pygame.camera}jj[sbaj :mod:`pygame.camera`jj=j}(j]j](jJpypy-modej]j]j]ujPNjQNjjXubaj}(j]j]j]j]j]ujjubj j)}(j h9j ]j>)}(j ]j  pygame.cdrom}jjtsbaj :mod:`pygame.cdrom`jj=j}(j]j](jJpypy-modej]j]j]ujPNjQNjjqubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j>)}(j ]j  pygame.Color}jjsbaj :mod:`pygame.Color`jj=j}(j]j](jJpypy-modej]j]j]ujPNjQNjjubaj}(j]j]j]j]j]ujjubj%j)}(j h9j ]j>)}(j ]j pygame.cursors}jjsbaj :mod:`pygame.cursors`jj=j}(j]j](jJpypy-modej]j]j]ujPNjQNjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j 7Tutoriales Pygame - Introducción al Módulo de Cámara}jjsbaj}(j]j]j]j]j]ujjubj'j)}(j h9j ]j >Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea}jjsbaj}(j]j]j]j]j]ujjubj"j)}(j h9j ]j Crear Juegos con Pygame}jjsbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j "Guía de Pygame para Principiantes}jjsbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j -Tutoriales de Pygame - Importar e Inicializar}jjsbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j DTutoriales de Pygame - Configuración de los Modos de Visualización}jjsbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j 9Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen?}jj sbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j :Tutoriales de Pygame - Introducción al Módulo de Sprites}jjsbaj}(j]j]j]j]j]ujjubj!j)}(j h9j ]j 0Tutoriales de Pygame - Introducción a Surfarray}jj$sbaj}(j]j]j]j]j]ujjubj#j)}(j h9j ]j pygame/examples/chimp.py}jj1sbaj}(j]j]j]j]j]ujjubj$j)}(j h9j ]j  Revisión: Fundamentos de Pygame}jj>sbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j  Dando Inicio}jjKsbaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j Clases de objetos de juego}jjXsbaj}(j]j]j]j]j]ujjubj*j)}(j h9j ]j %Objetos controlables por los usuarios}jjesbaj}(j]j]j]j]j]ujjubj+j)}(j h9j ]j  Juntando Todo}jjrsbaj}(j]j]j]j]j]ujjubu longtitles}(j&jjj j(j-j)j:jjXj jqjjj%jjjj'jj"jjj)}(j h9j ]j Guía de Pygame para Newbies}jjsbaj}(j]j]j]j]j]ujjubjjjjjj jjj!j$j#j1j$j>jjKjjXj*jej+jrutocs}(j&j bullet_list)}(j h9j ]j list_item)}(j h9j ]sphinx.addnodescompact_paragraph)}(j h9j ]j reference)}(j h9j ]j Colores Nombrados}jjsbaj}(j]j]j]j]j]internalrefurij& anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Página Principal de Pygame}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](jtoctree)}(j ]j h9jjj}(j]j]j]j]j]jjentries](Nj)NjNj NjNj%NjNj'Nj"NjNjNjNjNjNj!Nj#Nj$NjNjNj*Nj+Nlogose includefiles](j)jj jj%jj'j"jjjjjj!j#j$jjj*j+jemaxdepthKcaptionNglobhidden includehiddennumberedK titlesonly rawentries]ujPKjQ1/home/runner/work/pygame/pygame/docs/es/index.rstjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Documentos}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #documentosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Tutoriales}jj>sbaj}(j]j]j]j]j]internalrefurij anchorname #tutorialesujjjj;ubaj}(j]j]j]j]j]ujjjj8ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Referencias}jjasbaj}(j]j]j]j]j]internalrefurij anchorname #referenciasujjjj^ubaj}(j]j]j]j]j]ujjjj[ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubj(j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Página de Logotipos de Pygame}jjsbaj}(j]j]j]j]j]internalrefurij( anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Logotipos de Pygame}jjsbaj}(j]j]j]j]j]internalrefurij( anchorname#logotipos-de-pygameujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Logotipos legendarios}jjsbaj}(j]j]j]j]j]internalrefurij( anchorname#logotipos-legendariosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubj)j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j ]j pygame.BufferProxy}jjsbaj jFjj=j}(j]j](jJjKjLej]j]j]ujPNjQNjjubaj}(j]j]j]j]j]internalrefurij) anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  BufferProxy}jjGsbaj}(j]j]j]j]j]ujj=jjDubaj}(j]j]j]j]j]internalrefurij) anchorname#pygame.BufferProxyujjjjAubaj}(j]j]j]j]j]skip_section_numberujjjj>ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j BufferProxy.parent}jjqsbaj}(j]j]j]j]j]ujj=jjnubaj}(j]j]j]j]j]internalrefurij) anchorname#pygame.BufferProxy.parentujjjjkubaj}(j]j]j]j]j]skip_section_numberujjjjhubaj}(j]j]j]j]j]ujjjjeubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j BufferProxy.length}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij) anchorname#pygame.BufferProxy.lengthujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjeubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j BufferProxy.raw}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij) anchorname#pygame.BufferProxy.rawujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjeubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j BufferProxy.write()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij) anchorname#pygame.BufferProxy.writeujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjeubej}(j]j]j]j]j]ujjjj>ubej}(j]j]j]j]j]ujjjj;ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j ]j  pygame.camera}jjFsbaj jbjj=j}(j]j](jJjfjgej]j]j]ujPNjQNjjCubaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjj@ubaj}(j]j]j]j]j]ujjjj=ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j init()}jjnsbaj}(j]j]j]j]j]ujj=jjkubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.initujjjjhubaj}(j]j]j]j]j]skip_section_numberujjjjeubaj}(j]j]j]j]j]ujjjjbubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j get_backends()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.get_backendsujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjbubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  colorspace()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.colorspaceujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjbubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j list_cameras()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.list_camerasujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjbubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera}jj" sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Cameraujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.start()}jjL sbaj}(j]j]j]j]j]ujj=jjI ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Camera.startujjjjF ubaj}(j]j]j]j]j]skip_section_numberujjjjC ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Camera.stop()}jjy sbaj}(j]j]j]j]j]ujj=jjv ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Camera.stopujjjjs ubaj}(j]j]j]j]j]skip_section_numberujjjjp ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.get_controls()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname"#pygame.camera.Camera.get_controlsujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.set_controls()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname"#pygame.camera.Camera.set_controlsujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.get_size()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Camera.get_sizeujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.query_image()}jj- sbaj}(j]j]j]j]j]ujj=jj* ubaj}(j]j]j]j]j]internalrefurij anchorname!#pygame.camera.Camera.query_imageujjjj' ubaj}(j]j]j]j]j]skip_section_numberujjjj$ ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.get_image()}jjZ sbaj}(j]j]j]j]j]ujj=jjW ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Camera.get_imageujjjjT ubaj}(j]j]j]j]j]skip_section_numberujjjjQ ubaj}(j]j]j]j]j]ujjjj@ ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Camera.get_raw()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.camera.Camera.get_rawujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj~ ubaj}(j]j]j]j]j]ujjjj@ ubej}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjjbubej}(j]j]j]j]j]ujjjj=ubej}(j]j]j]j]j]ujjjj:ubaj}(j]j]j]j]j]ujjubj j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j ]j  pygame.cdrom}jj sbaj j{jj=j}(j]j](jJjjej]j]j]ujPNjQNjj ubaj}(j]j]j]j]j]internalrefurij  anchornameh9ujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j init()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.initujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j quit()}jj* sbaj}(j]j]j]j]j]ujj=jj' ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.quitujjjj$ ubaj}(j]j]j]j]j]skip_section_numberujjjj! ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  get_init()}jjW sbaj}(j]j]j]j]j]ujj=jjT ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.get_initujjjjQ ubaj}(j]j]j]j]j]skip_section_numberujjjjN ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  get_count()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.get_countujjjj~ ubaj}(j]j]j]j]j]skip_section_numberujjjj{ ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CDujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.init()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.initujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.quit()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.quitujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.get_init()}jj5 sbaj}(j]j]j]j]j]ujj=jj2 ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_initujjjj/ ubaj}(j]j]j]j]j]skip_section_numberujjjj, ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.play()}jjb sbaj}(j]j]j]j]j]ujj=jj_ ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.playujjjj\ ubaj}(j]j]j]j]j]skip_section_numberujjjjY ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.stop()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.stopujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.pause()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.pauseujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.resume()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.resumeujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.eject()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.ejectujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.get_id()}jjC sbaj}(j]j]j]j]j]ujj=jj@ ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_idujjjj= ubaj}(j]j]j]j]j]skip_section_numberujjjj: ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.get_name()}jjp sbaj}(j]j]j]j]j]ujj=jjm ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_nameujjjjj ubaj}(j]j]j]j]j]skip_section_numberujjjjg ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.get_busy()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_busyujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_paused()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_pausedujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_current()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_currentujjjj ubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_empty()}jj$sbaj}(j]j]j]j]j]ujj=jj!ubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_emptyujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_numtracks()}jjQsbaj}(j]j]j]j]j]ujj=jjNubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_numtracksujjjjKubaj}(j]j]j]j]j]skip_section_numberujjjjHubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_track_audio()}jj~sbaj}(j]j]j]j]j]ujj=jj{ubaj}(j]j]j]j]j]internalrefurij  anchorname #pygame.cdrom.CD.get_track_audioujjjjxubaj}(j]j]j]j]j]skip_section_numberujjjjuubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  CD.get_all()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij  anchorname#pygame.cdrom.CD.get_allujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_track_start()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij  anchorname #pygame.cdrom.CD.get_track_startujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j CD.get_track_length()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij  anchorname!#pygame.cdrom.CD.get_track_lengthujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j ]j  pygame.Color}jjSsbaj jjj=j}(j]j](jJjjej]j]j]ujPNjQNjjPubaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjMubaj}(j]j]j]j]j]ujjjjJubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color}jj{sbaj}(j]j]j]j]j]ujj=jjxubaj}(j]j]j]j]j]internalrefurij anchorname #pygame.Colorujjjjuubaj}(j]j]j]j]j]skip_section_numberujjjjrubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.r}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.rujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.g}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.gujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.b}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.bujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.a}jj,sbaj}(j]j]j]j]j]ujj=jj)ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.aujjjj&ubaj}(j]j]j]j]j]skip_section_numberujjjj#ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Color.cmy}jjYsbaj}(j]j]j]j]j]ujj=jjVubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.cmyujjjjSubaj}(j]j]j]j]j]skip_section_numberujjjjPubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Color.hsva}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.hsvaujjjjubaj}(j]j]j]j]j]skip_section_numberujjjj}ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Color.hsla}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.hslaujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Color.i1i2i3}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.i1i2i3ujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.normalize()}jj sbaj}(j]j]j]j]j]ujj=jj ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.normalizeujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.correct_gamma()}jj:sbaj}(j]j]j]j]j]ujj=jj7ubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.correct_gammaujjjj4ubaj}(j]j]j]j]j]skip_section_numberujjjj1ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.set_length()}jjgsbaj}(j]j]j]j]j]ujj=jjdubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.set_lengthujjjjaubaj}(j]j]j]j]j]skip_section_numberujjjj^ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.grayscale()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.grayscaleujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Color.lerp()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.lerpujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.premul_alpha()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.premul_alphaujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Color.update()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij anchorname#pygame.Color.updateujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjrubej}(j]j]j]j]j]ujjjjoubaj}(j]j]j]j]j]ujjjjJubej}(j]j]j]j]j]ujjjjGubaj}(j]j]j]j]j]ujjubj%j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j ]j pygame.cursors}jjisbaj jjj=j}(j]j](jJjjej]j]j]ujPNjQNjjfubaj}(j]j]j]j]j]internalrefurij% anchornameh9ujjjjcubaj}(j]j]j]j]j]ujjjj`ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  compile()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.compileujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  load_xbm()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.load_xbmujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j Cursor}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.Cursorujjjjubaj}(j]j]j]j]j]skip_section_numberujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Cursor.copy()}jjsbaj}(j]j]j]j]j]ujj=jjubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.Cursor.copyujjjjubaj}(j]j]j]j]j]skip_section_numberujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Cursor.type}jjBsbaj}(j]j]j]j]j]ujj=jj?ubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.Cursor.typeujjjj<ubaj}(j]j]j]j]j]skip_section_numberujjjj9ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j>)}(j h9j ]j  Cursor.data}jjosbaj}(j]j]j]j]j]ujj=jjlubaj}(j]j]j]j]j]internalrefurij% anchorname#pygame.cursors.Cursor.dataujjjjiubaj}(j]j]j]j]j]skip_section_numberujjjjfubaj}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjj`ubej}(j]j]j]j]j]ujjjj]ubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 7Tutoriales Pygame - Introducción al Módulo de Cámara}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j #Introducción al Módulo de Cámara}jjsbaj}(j]j]j]j]j]internalrefurij anchorname!#introduccion-al-modulo-de-camaraujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Importación e Inicialización}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#importacion-e-inicializacionujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Captura de una sola imagen}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#captura-de-una-sola-imagenujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Listado de Cámaras Conectadas}jj<sbaj}(j]j]j]j]j]internalrefurij anchorname#listado-de-camaras-conectadasujjjj9ubaj}(j]j]j]j]j]ujjjj6ubaj}(j]j]j]j]j]ujjjj3ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Uso los Controles de la Cámara}jj_sbaj}(j]j]j]j]j]internalrefurij anchorname#uso-los-controles-de-la-camaraujjjj\ubaj}(j]j]j]j]j]ujjjjYubaj}(j]j]j]j]j]ujjjj3ubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j #Captura de una Transmisión en Vivo}jjsbaj}(j]j]j]j]j]internalrefurij anchorname##captura-de-una-transmision-en-vivoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Visión Básica por Computadora}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#vision-basica-por-computadoraujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Modelos de Color}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#modelos-de-colorujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Thresholding (Umbralización)}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#thresholding-umbralizacionujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Uso del Módulo de Máscara}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#uso-del-modulo-de-mascaraujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubj'j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j >Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea}jjgsbaj}(j]j]j]j]j]internalrefurij' anchornameh9ujjjjdubaj}(j]j]j]j]j]ujjjjaubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Chimpancé, Línea Por Línea}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#chimpance-linea-por-lineaujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j ]j h9jjj}(j]j]j]j]j]jj'j]Ntutorials/chimpance.pyaj ]jaj Jj Nj jjjKjj]ujPKjQL/home/runner/work/pygame/pygame/docs/es/tutorials/ChimpanceLineaporLinea.rstjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Introducción}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname #introduccionujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Importación de Módulos}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#importacion-de-modulosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Carga de Recursos}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#carga-de-recursosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Clases de Objetos para Juegos}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#clases-de-objetos-para-juegosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Inicializar Todo}jjAsbaj}(j]j]j]j]j]internalrefurij' anchorname#inicializar-todoujjjj>ubaj}(j]j]j]j]j]ujjjj;ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Crear el Fondo}jjdsbaj}(j]j]j]j]j]internalrefurij' anchorname#crear-el-fondoujjjjaubaj}(j]j]j]j]j]ujjjj^ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Centrar Texto en el Fondo}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#centrar-texto-en-el-fondoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j *Mostrar el Fondo mientras Termina el Setup}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname+#mostrar-el-fondo-mientras-termina-el-setupujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Preparar Objetos del Juego}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#preparar-objetos-del-juegoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Bucle principal (Main Loop)}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#bucle-principal-main-loopujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Manejar los Eventos de Entrada}jjsbaj}(j]j]j]j]j]internalrefurij' anchorname#manejar-los-eventos-de-entradaujjjjubaj}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Actualizar los Sprites}jj6sbaj}(j]j]j]j]j]internalrefurij' anchorname#actualizar-los-spritesujjjj3ubaj}(j]j]j]j]j]ujjjj0ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Dibujar la Escena Completa}jjYsbaj}(j]j]j]j]j]internalrefurij' anchorname#dibujar-la-escena-completaujjjjVubaj}(j]j]j]j]j]ujjjjSubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Fin del Juego}jj|sbaj}(j]j]j]j]j]internalrefurij' anchorname#fin-del-juegoujjjjyubaj}(j]j]j]j]j]ujjjjvubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjj}ubaj}(j]j]j]j]j]ujjjjaubej}(j]j]j]j]j]ujjjj^ubaj}(j]j]j]j]j]ujjubj"j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Crear Juegos con Pygame}jjsbaj}(j]j]j]j]j]internalrefurij" anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Crear Juegos con Pygame}jjsbaj}(j]j]j]j]j]internalrefurij" anchorname#id1ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Tabla de Contenido}jjsbaj}(j]j]j]j]j]internalrefurij" anchorname#tabla-de-contenidoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 1. Introducción}jj"sbaj}(j]j]j]j]j]internalrefurij" anchorname #introduccionujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j ,1.1. Una nota sobre estilos de codificación}jjEsbaj}(j]j]j]j]j]internalrefurij" anchorname'#una-nota-sobre-estilos-de-codificacionujjjjBubaj}(j]j]j]j]j]ujjjj?ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j "Guía de Pygame para Principiantes}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j "Guía de Pygame para Principiantes}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#id1ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j #Ponte cómodo trabajando con Python}jjsbaj}(j]j]j]j]j]internalrefurij anchorname##ponte-comodo-trabajando-con-pythonujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 4Reconoce qué partes de pygame necesitás realmente.}jjsbaj}(j]j]j]j]j]internalrefurij anchorname2#reconoce-que-partes-de-pygame-necesitas-realmenteujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j %Sepa qué es una Surface (superficie)}jjsbaj}(j]j]j]j]j]internalrefurij anchorname##sepa-que-es-una-surface-superficieujjjj ubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Usa surface.convert().}jj1sbaj}(j]j]j]j]j]internalrefurij anchorname#usa-surface-convertujjjj.ubaj}(j]j]j]j]j]ujjjj+ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Animación rect "sucia".}jjTsbaj}(j]j]j]j]j]internalrefurij anchorname#animacion-rect-suciaujjjjQubaj}(j]j]j]j]j]ujjjjNubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j NO hay regla seis.}jjwsbaj}(j]j]j]j]j]internalrefurij anchorname#no-hay-regla-seisujjjjtubaj}(j]j]j]j]j]ujjjjqubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j ALos surfaces de hardware son más problemáticos de lo que valen.}jjsbaj}(j]j]j]j]j]internalrefurij anchorname?#los-surfaces-de-hardware-son-mas-problematicos-de-lo-que-valenujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j +No te distraigas con problemas secundarios.}jjsbaj}(j]j]j]j]j]internalrefurij anchorname+#no-te-distraigas-con-problemas-secundariosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Los rects son tus amigos.}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#los-rects-son-tus-amigosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j ANo te molestes con la detección de colisión de píxel perfecto.}jjsbaj}(j]j]j]j]j]internalrefurij anchorname>#no-te-molestes-con-la-deteccion-de-colision-de-pixel-perfectoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j #Gestión del subsistema de eventos.}jj&sbaj}(j]j]j]j]j]internalrefurij anchorname"#gestion-del-subsistema-de-eventosujjjj#ubaj}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Colorkey vs. Alpha.}jjIsbaj}(j]j]j]j]j]internalrefurij anchorname#colorkey-vs-alphaujjjjFubaj}(j]j]j]j]j]ujjjjCubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j !Haz cosas a la manera de pythony.}jjlsbaj}(j]j]j]j]j]internalrefurij anchorname!#haz-cosas-a-la-manera-de-pythonyujjjjiubaj}(j]j]j]j]j]ujjjjfubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j -Tutoriales de Pygame - Importar e Inicializar}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Importar e Inicializar}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#importar-e-inicializarujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Importar}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #importarujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Inicializar}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #inicializarujjjjubaj}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Cerrar (Quit)}jj5sbaj}(j]j]j]j]j]internalrefurij anchorname #cerrar-quitujjjj2ubaj}(j]j]j]j]j]ujjjj/ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j DTutoriales de Pygame - Configuración de los Modos de Visualización}jjysbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjvubaj}(j]j]j]j]j]ujjjjsubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j -Configuración de los Modos de Visualización}jjsbaj}(j]j]j]j]j]internalrefurij anchorname,#configuracion-de-los-modos-de-visualizacionujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Introducción}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #introduccionujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Configuración básica}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#configuracion-basicaujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Cómo decidir}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #como-decidirujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Funciones}jj!sbaj}(j]j]j]j]j]internalrefurij anchorname #funcionesujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Ejemplos}jjDsbaj}(j]j]j]j]j]internalrefurij anchorname #ejemplosujjjjAubaj}(j]j]j]j]j]ujjjj>ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjsubej}(j]j]j]j]j]ujjjjpubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 9Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen?}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j "¡Ayuda! ¿Cómo Muevo Una Imagen?}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#ayuda-como-muevo-una-imagenujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Solo Píxeles en la Pantalla}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#solo-pixeles-en-la-pantallaujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Damos Un Paso Hacia Atrás}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#damos-un-paso-hacia-atrasujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Hacer Mover al Héroe}jj sbaj}(j]j]j]j]j]internalrefurij anchorname#hacer-mover-al-heroeujjjj ubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Crear un Mapa}jj0sbaj}(j]j]j]j]j]internalrefurij anchorname#crear-un-mapaujjjj-ubaj}(j]j]j]j]j]ujjjj*ubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Hacer Mover al Héroe (Toma 2)}jjSsbaj}(j]j]j]j]j]internalrefurij anchorname#hacer-mover-al-heroe-toma-2ujjjjPubaj}(j]j]j]j]j]ujjjjMubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Definición: "blit"}jjvsbaj}(j]j]j]j]j]internalrefurij anchorname#definicion-blitujjjjsubaj}(j]j]j]j]j]ujjjjpubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Pasar de la Lista a la Pantalla}jjsbaj}(j]j]j]j]j]internalrefurij anchorname #pasar-de-la-lista-a-la-pantallaujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Coordenadas de Pantalla}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#coordenadas-de-pantallaujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Cambiando el Fondo}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#cambiando-el-fondoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Movimiento Fluido}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#movimiento-fluidoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Entonces, ¿Qué Sigue?}jj%sbaj}(j]j]j]j]j]internalrefurij anchorname#entonces-que-sigueujjjj"ubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Primero, Funciones Misteriosas}jjHsbaj}(j]j]j]j]j]internalrefurij anchorname#primero-funciones-misteriosasujjjjEubaj}(j]j]j]j]j]ujjjjBubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Manejo de Algunas Entradas}jjksbaj}(j]j]j]j]j]internalrefurij anchorname#manejo-de-algunas-entradasujjjjhubaj}(j]j]j]j]j]ujjjjeubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Mover Imágenes Múltiples}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#mover-imagenes-multiplesujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Ensamblando Todo}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#ensamblando-todoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j &De Ahora En Más, Estás Por Tu Cuenta}jjsbaj}(j]j]j]j]j]internalrefurij anchorname$#de-ahora-en-mas-estas-por-tu-cuentaujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j :Tutoriales de Pygame - Introducción al Módulo de Sprites}jjsbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjjubaj}(j]j]j]j]j]ujjjjubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j #Introducción al Módulo de Sprites}jj7sbaj}(j]j]j]j]j]internalrefurij anchorname"#introduccion-al-modulo-de-spritesujjjj4ubaj}(j]j]j]j]j]ujjjj1ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Lección de Historia}jjWsbaj}(j]j]j]j]j]internalrefurij anchorname#leccion-de-historiaujjjjTubaj}(j]j]j]j]j]ujjjjQubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Las Clases}jjzsbaj}(j]j]j]j]j]internalrefurij anchorname #las-clasesujjjjwubaj}(j]j]j]j]j]ujjjjtubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j La Clase Sprite}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#la-clase-spriteujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j La Clase Grupo}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#la-clase-grupoujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Mezclándolos Juntos}jjsbaj}(j]j]j]j]j]internalrefurij anchorname#mezclandolos-juntosujjjjubaj}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Los Muchos Tipos de Grupos}jj sbaj}(j]j]j]j]j]internalrefurij anchorname#los-muchos-tipos-de-gruposujjjj ubaj}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Los Grupos de Renderizado}jj) sbaj}(j]j]j]j]j]internalrefurij anchorname#los-grupos-de-renderizadoujjjj& ubaj}(j]j]j]j]j]ujjjj# ubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Detección de Colisiones}jjL sbaj}(j]j]j]j]j]internalrefurij anchorname#deteccion-de-colisionesujjjjI ubaj}(j]j]j]j]j]ujjjjF ubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Problemas Comunes}jjo sbaj}(j]j]j]j]j]internalrefurij anchorname#problemas-comunesujjjjl ubaj}(j]j]j]j]j]ujjjji ubaj}(j]j]j]j]j]ujjjjNubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ](j Extendiendo tus Propias Clases }jj sbjemphasis)}(j ]j  (Avanzado)}jj sbaj  *(Avanzado)*jj j}(j]j]j]j]j]ujPNjQNjj ubej}(j]j]j]j]j]internalrefurij anchorname(#extendiendo-tus-propias-clases-avanzadoujjjj ubaj}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjjNubej}(j]j]j]j]j]ujjjj1ubej}(j]j]j]j]j]ujjjj.ubaj}(j]j]j]j]j]ujjjjubej}(j]j]j]j]j]ujjjjubaj}(j]j]j]j]j]ujjubj!j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 0Tutoriales de Pygame - Introducción a Surfarray}jj sbaj}(j]j]j]j]j]internalrefurij! anchornameh9ujjjj ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Introducción a Surfarray}jj!sbaj}(j]j]j]j]j]internalrefurij! anchorname#introduccion-a-surfarrayujjjj!ubaj}(j]j]j]j]j]ujjjj ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Introducción}jj%!sbaj}(j]j]j]j]j]internalrefurij! anchorname #introduccionujjjj"!ubaj}(j]j]j]j]j]ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j NumPy}jjH!sbaj}(j]j]j]j]j]internalrefurij! anchorname#numpyujjjjE!ubaj}(j]j]j]j]j]ujjjjB!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Importar Surfarray}jjk!sbaj}(j]j]j]j]j]internalrefurij! anchorname#importar-surfarrayujjjjh!ubaj}(j]j]j]j]j]ujjjje!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Introducción a Surfarray}jj!sbaj}(j]j]j]j]j]internalrefurij! anchorname#id1ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Ejemplos}jj!sbaj}(j]j]j]j]j]internalrefurij! anchorname #ejemplosujjjj!ubaj}(j]j]j]j]j]ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Bloqueo de Superficie (Surface)}jj!sbaj}(j]j]j]j]j]internalrefurij! anchorname#bloqueo-de-superficie-surfaceujjjj!ubaj}(j]j]j]j]j]ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Transparencia}jj!sbaj}(j]j]j]j]j]internalrefurij! anchorname#transparenciaujjjj!ubaj}(j]j]j]j]j]ujjjj!ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j Otras Funciones de Surfarray}jj"sbaj}(j]j]j]j]j]internalrefurij! anchorname#otras-funciones-de-surfarrayujjjj"ubaj}(j]j]j]j]j]ujjjj"ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j NumPy más Avanzado}jj="sbaj}(j]j]j]j]j]internalrefurij! anchorname#numpy-mas-avanzadoujjjj:"ubaj}(j]j]j]j]j]ujjjj7"ubaj}(j]j]j]j]j]ujjjj!ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  Graduación}jj`"sbaj}(j]j]j]j]j]internalrefurij! anchorname #graduacionujjjj]"ubaj}(j]j]j]j]j]ujjjjZ"ubaj}(j]j]j]j]j]ujjjj!ubej}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjjj ubej}(j]j]j]j]j]ujjjj ubaj}(j]j]j]j]j]ujjubj#j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j pygame/examples/chimp.py}jj"sbaj}(j]j]j]j]j]internalrefurij# anchornameh9ujjjj"ubaj}(j]j]j]j]j]ujjjj"ubaj}(j]j]j]j]j]ujjjj"ubaj}(j]j]j]j]j]ujjubj$j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j  Revisión: Fundamentos de Pygame}jj"sbaj}(j]j]j]j]j]internalrefurij$ anchornameh9ujjjj"ubaj}(j]j]j]j]j]ujjjj"ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j #2. Revisión: Fundamentos de Pygame}jj"sbaj}(j]j]j]j]j]internalrefurij$ anchorname#hacerjuegos-2ujjjj"ubaj}(j]j]j]j]j]ujjjj"ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 2.1. El juego básico de Pygame}jj#sbaj}(j]j]j]j]j]internalrefurij$ anchorname#el-juego-basico-de-pygameujjjj #ubaj}(j]j]j]j]j]ujjjj#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 2.2. Objetos Pygame Básicos}jj1#sbaj}(j]j]j]j]j]internalrefurij$ anchorname#objetos-pygame-basicosujjjj.#ubaj}(j]j]j]j]j]ujjjj+#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  2.3. Blitting}jjT#sbaj}(j]j]j]j]j]internalrefurij$ anchorname #blittingujjjjQ#ubaj}(j]j]j]j]j]ujjjjN#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 2.4. Evento en Bucle}jjw#sbaj}(j]j]j]j]j]internalrefurij$ anchorname#evento-en-bucleujjjjt#ubaj}(j]j]j]j]j]ujjjjq#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j  2.5. Ta-da!}jj#sbaj}(j]j]j]j]j]internalrefurij$ anchorname#ta-daujjjj#ubaj}(j]j]j]j]j]ujjjj#ubaj}(j]j]j]j]j]ujjjj#ubej}(j]j]j]j]j]ujjjj"ubej}(j]j]j]j]j]ujjjj"ubaj}(j]j]j]j]j]ujjjj"ubej}(j]j]j]j]j]ujjjj"ubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j  Dando Inicio}jj#sbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjj#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 1. Dando Inicio}jj#sbaj}(j]j]j]j]j]internalrefurij anchorname#hacerjuegos-3ujjjj#ubaj}(j]j]j]j]j]ujjjj#ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j )3.1. Primeras líneas y carga de módulos}jj$sbaj}(j]j]j]j]j]internalrefurij anchorname##primeras-lineas-y-carga-de-modulosujjjj$ubaj}(j]j]j]j]j]ujjjj$ubaj}(j]j]j]j]j]ujjjj$ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j $3.2. Funciones de manejo de recursos}jj@$sbaj}(j]j]j]j]j]internalrefurij anchorname #funciones-de-manejo-de-recursosujjjj=$ubaj}(j]j]j]j]j]ujjjj:$ubaj}(j]j]j]j]j]ujjjj$ubej}(j]j]j]j]j]ujjjj#ubej}(j]j]j]j]j]ujjjj#ubaj}(j]j]j]j]j]ujjjj#ubej}(j]j]j]j]j]ujjjj#ubaj}(j]j]j]j]j]ujjubjj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j Clases de objetos de juego}jj$sbaj}(j]j]j]j]j]internalrefurij anchornameh9ujjjj$ubaj}(j]j]j]j]j]ujjjj~$ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 4. Clases de objetos de juego}jj$sbaj}(j]j]j]j]j]internalrefurij anchorname#hacerjuegos-4ujjjj$ubaj}(j]j]j]j]j]ujjjj$ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 4.1. Una clase simple de pelota}jj$sbaj}(j]j]j]j]j]internalrefurij anchorname#una-clase-simple-de-pelotaujjjj$ubaj}(j]j]j]j]j]ujjjj$ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 4.1.1. Digresión 1: Sprites}jj$sbaj}(j]j]j]j]j]internalrefurij anchorname#digresion-1-spritesujjjj$ubaj}(j]j]j]j]j]ujjjj$ubaj}(j]j]j]j]j]ujjjj$ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j (4.1.2. Digresión 2: Física de vectores}jj%sbaj}(j]j]j]j]j]internalrefurij anchorname#digresion-2-fisica-de-vectoresujjjj%ubaj}(j]j]j]j]j]ujjjj%ubaj}(j]j]j]j]j]ujjjj$ubej}(j]j]j]j]j]ujjjj$ubej}(j]j]j]j]j]ujjjj$ubaj}(j]j]j]j]j]ujjjj$ubej}(j]j]j]j]j]ujjjj$ubaj}(j]j]j]j]j]ujjjj~$ubej}(j]j]j]j]j]ujjjj{$ubaj}(j]j]j]j]j]ujjubj*j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j %Objetos controlables por los usuarios}jjV%sbaj}(j]j]j]j]j]internalrefurij* anchornameh9ujjjjS%ubaj}(j]j]j]j]j]ujjjjP%ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j (5. Objetos controlables por los usuarios}jju%sbaj}(j]j]j]j]j]internalrefurij* anchorname#hacerjuegos-5ujjjjr%ubaj}(j]j]j]j]j]ujjjjo%ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 5.1. Una clase simple de bate}jj%sbaj}(j]j]j]j]j]internalrefurij* anchorname#una-clase-simple-de-bateujjjj%ubaj}(j]j]j]j]j]ujjjj%ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j &5.1.1. Digresión 3: Eventos de Pygame}jj%sbaj}(j]j]j]j]j]internalrefurij* anchorname#digresion-3-eventos-de-pygameujjjj%ubaj}(j]j]j]j]j]ujjjj%ubaj}(j]j]j]j]j]ujjjj%ubaj}(j]j]j]j]j]ujjjj%ubej}(j]j]j]j]j]ujjjj%ubaj}(j]j]j]j]j]ujjjjo%ubej}(j]j]j]j]j]ujjjjl%ubaj}(j]j]j]j]j]ujjjjP%ubej}(j]j]j]j]j]ujjjjM%ubaj}(j]j]j]j]j]ujjubj+j)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j  Juntando Todo}jj&sbaj}(j]j]j]j]j]internalrefurij+ anchornameh9ujjjj&ubaj}(j]j]j]j]j]ujjjj%ubj)}(j h9j ]j)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j 1. Juntando todo}jj$&sbaj}(j]j]j]j]j]internalrefurij+ anchorname#hacerjuegos-6ujjjj!&ubaj}(j]j]j]j]j]ujjjj&ubj)}(j h9j ](j)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j )6.1. Dejá que la pelota golpee los lados}jjD&sbaj}(j]j]j]j]j]internalrefurij+ anchorname$#deja-que-la-pelota-golpee-los-ladosujjjjA&ubaj}(j]j]j]j]j]ujjjj>&ubaj}(j]j]j]j]j]ujjjj;&ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 6.2. Let the ball hit bats}jjg&sbaj}(j]j]j]j]j]internalrefurij+ anchorname#let-the-ball-hit-batsujjjjd&ubaj}(j]j]j]j]j]ujjjja&ubaj}(j]j]j]j]j]ujjjj;&ubj)}(j h9j ]j)}(j h9j ]j)}(j h9j ]j 6.3. El producto final}jj&sbaj}(j]j]j]j]j]internalrefurij+ anchorname#el-producto-finalujjjj&ubaj}(j]j]j]j]j]ujjjj&ubaj}(j]j]j]j]j]ujjjj;&ubej}(j]j]j]j]j]ujjjj&ubej}(j]j]j]j]j]ujjjj&ubaj}(j]j]j]j]j]ujjjj%ubej}(j]j]j]j]j]ujjjj%ubaj}(j]j]j]j]j]ujjubutoc_num_entries}(j&KjKj(Kj)KjKj KjKj%KjK j'Kj"KjKjKjKjKjK j!K j#Kj$KjKjKj*Kj+Kutoc_secnumbers}toc_fignumbers}toctree_includes}(j](j)jj jj%jj'j"jjjjjj!j#j$jjj*j+jej']jaufiles_to_rebuild}(j)(jj(jj (jj(jj%(jj(jj'(jj"(jj(jj(jj(jj(jj(jj!(jj#(j'jj$(jj(jj(jj*(jj+(jj(ju glob_toctrees(jnumbered_toctrees domaindata}(c}( root_symbolsphinx.domains.c._symbolSymbol)}(jN siblingAboveN siblingBelowNidentN declarationNdocnameNjPNisRedeclaration_children_by_name}_children_by_docname}_anon_childrenubobjects}h5Ku changeset}(changes}(1.8.0]sphinx.domains.changeset ChangeSet( versionaddedj)KMpygame BufferProxyNNew in pygame 1.8.0.ta1.9.2](j '(versionextendedj)KNj 'j'Extended in pygame 1.9.2.tj '(versionchangedjKapygameColorNJChanged in pygame 1.9.2: Color objects export the C level array interface.te2.0.2]j '( versionaddedjK pygame.cameraN2New in pygame 2.0.2: Windows native camera supportta2.0.3](j '( versionaddedjKj"'N(New in pygame 2.0.3: New OpenCV backendstj '(versionchangedjK>j"'initN Surfaceparent -> ej ]j*j'j&j)uj'}(j*j'j*j(j*+The size, in bytes, of the exported buffer.j*] length -> intaj ]j*j'j&j)uj'}(j*j'j*j(j*9A copy of the exported buffer as a single block of bytes.j*] raw -> bytesaj ]j*j'j&j)uj'}(j*j'j*j(j*!Write raw bytes to object buffer.j*]write(buffer, offset=0)aj ]j*j'j&j)uj'}(j*j'j*jw(j*Bpygame object to export a surface buffer through an array protocolj*]$BufferProxy() -> BufferProxyaj ](j'j'j'j'ej*j'j&j)upygame-bufferproxyj*j'}(j*j'j*j(j* Module initj*]init(backend = None) -> Noneaj ]j*j'j&juj'}(j*j'j*j(j*)Get the backends supported on this systemj*]get_backends() -> [str]aj ]j*j'j&juj'}(j*j'j*j(j*Surface colorspace conversionj*]:colorspace(Surface, format, DestSurface = None) -> Surfaceaj ]j*j'j&juj'}(j*j'j*j(j*#returns a list of available camerasj*]list_cameras() -> [cameras]aj ]j*j'j&juj'}(j*j'j*j(j*(opens, initializes, and starts capturingj*]start() -> Noneaj ]j*j'j&juj'}(j*j'j*j(j*+stops, uninitializes, and closes the cameraj*]stop() -> Noneaj ]j*j'j&juj'}(j*j'j*j(j*$gets current values of user controlsj*]:get_controls() -> (hflip = bool, vflip = bool, brightness)aj ]j*j'j&juj'}(j*j'j*j(j*2changes camera settings if supported by the cameraj*]`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)aj ]j*j'j&juj'}(j*j'j*j(j*3returns the dimensions of the images being recordedj*]get_size() -> (width, height)aj ]j*j'j&juj'}(j*j'j*j(j*checks if a frame is readyj*]query_image() -> boolaj ]j*j'j&juj'}(j*j'j*j(j*captures an image as a Surfacej*]$get_image(Surface = None) -> Surfaceaj ]j*j'j&juj'}(j*j'j*j(j*$returns an unmodified image as bytesj*]get_raw() -> bytesaj ]j*j'j&juj'}(j*j'j*j(j* load a cameraj*]1Camera(device, (width, height), format) -> Cameraaj ](j'j'j'j'j'j'j'j'ej*j'j&ju pygame.camera}(j*j*j*j(j*pygame module for camera usej*]j ](j'j'j'j'j'ej*j'j&juj'}(j*j'j*j(j*initialize the cdrom modulej*]init() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*uninitialize the cdrom modulej*]quit() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*'true if the cdrom module is initializedj*]get_init() -> boolaj ]j*j'j&j uj'}(j*j'j*j(j*!number of cd drives on the systemj*]get_count() -> countaj ]j*j'j&j uj'}(j*j'j*j(j* initialize a cdrom drive for usej*]init() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*"uninitialize a cdrom drive for usej*]quit() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*"true if this cd device initializedj*]get_init() -> boolaj ]j*j'j&j uj'}(j*j'j*j(j*start playing audioj*])play(track, start=None, end=None) -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*stop audio playbackj*]stop() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*temporarily stop audio playbackj*]pause() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*unpause audio playbackj*]resume() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*eject or open the cdrom drivej*]eject() -> Noneaj ]j*j'j&j uj'}(j*j'j*j(j*the index of the cdrom drivej*]get_id() -> idaj ]j*j'j&j uj'}(j*j'j*j(j*"the system name of the cdrom drivej*]get_name() -> nameaj ]j*j'j&j uj'}(j*j'j*j)j*"true if the drive is playing audioj*]get_busy() -> boolaj ]j*j'j&j uj'}(j*j'j*j)j*true if the drive is pausedj*]get_paused() -> boolaj ]j*j'j&j uj'}(j*j'j*j )j*#the current audio playback positionj*]get_current() -> track, secondsaj ]j*j'j&j uj(}(j*j(j*j )j* False if a cdrom is in the drivej*]get_empty() -> boolaj ]j*j(j&j uj(}(j*j(j*j)j*!the number of tracks on the cdromj*]get_numtracks() -> countaj ]j*j(j&j uj(}(j*j(j*j)j*&true if the cdrom track has audio dataj*]get_track_audio(track) -> boolaj ]j*j(j&j uj (}(j*j (j*j)j*get all track informationj*]/get_all() -> [(audio, start, end, length), ...]aj ]j*j (j&j uj (}(j*j (j*j)j*start time of a cdrom trackj*]!get_track_start(track) -> secondsaj ]j*j (j&j uj(}(j*j(j*j!)j*length of a cdrom trackj*]"get_track_length(track) -> secondsaj ]j*j(j&j uj'}(j*j'j*j(j*class to manage a cdrom drivej*] CD(id) -> CDaj ](j'j'j'j'j'j'j'j'j'j'j'j'j'j(j(j(j (j (j(ej*j'j&j u pygame.cdrom}(j*j*j*j(j*%pygame module for audio cdrom controlj*]j ](j'j'j'j'j'ej*j'j&j uj(}(j*j(j*j))j*(Gets or sets the red value of the Color.j*]r -> intaj ]j*j(j&juj(}(j*j(j*j-)j**Gets or sets the green value of the Color.j*]g -> intaj ]j*j(j&juj(}(j*j(j*j1)j*)Gets or sets the blue value of the Color.j*]b -> intaj ]j*j(j&juj(}(j*j(j*j5)j**Gets or sets the alpha value of the Color.j*]a -> intaj ]j*j(j&juj"(}(j*j"(j*j9)j*1Gets or sets the CMY representation of the Color.j*] cmy -> tupleaj ]j*j"(j&juj%(}(j*j%(j*j=)j*2Gets or sets the HSVA representation of the Color.j*] hsva -> tupleaj ]j*j%(j&juj((}(j*j((j*jA)j*2Gets or sets the HSLA representation of the Color.j*] hsla -> tupleaj ]j*j((j&juj+(}(j*j+(j*jE)j*4Gets or sets the I1I2I3 representation of the Color.j*]i1i2i3 -> tupleaj ]j*j+(j&juj.(}(j*j.(j*jI)j*0Returns the normalized RGBA values of the Color.j*]normalize() -> tupleaj ]j*j.(j&juj1(}(j*j1(j*jM)j*+Applies a certain gamma value to the Color.j*]correct_gamma (gamma) -> Coloraj ]j*j1(j&juj4(}(j*j4(j*jQ)j*7Set the number of elements in the Color to 1,2,3, or 4.j*]set_length(len) -> Noneaj ]j*j4(j&juj7(}(j*j7(j*jU)j* returns the grayscale of a Colorj*]grayscale() -> Coloraj ]j*j7(j&juj:(}(j*j:(j*jY)j*2returns a linear interpolation to the given Color.j*]lerp(Color, float) -> Coloraj ]j*j:(j&juj=(}(j*j=(j*j])j*Mreturns a Color where the r,g,b components have been multiplied by the alpha.j*]premul_alpha() -> Coloraj ]j*j=(j&juj@(}(j*j@(j*ja)j*Sets the elements of the colorj*](update(r, g, b) -> Noneupdate(r, g, b, a=255) -> Noneupdate(color_value) -> Noneej ]j*j@(j&juj(}(j*j(j*j%)j*'pygame object for color representationsj*](Color(r, g, b) -> ColorColor(r, g, b, a=255) -> ColorColor(color_value) -> Colorej ](j(j(j(j(j"(j%(j((j+(j.(j1(j4(j7(j:(j=(j@(ej*j(j&ju pygame-colorj+jG(}(j*jG(j*jg)j*-create binary cursor data from simple stringsj*]=compile(strings, black='X', white='.', xor='o') -> data, maskaj ]j*jG(j&j%ujJ(}(j*jJ(j*jk)j*!load cursor data from an XBM filej*](#load_xbm(cursorfile) -> cursor_args-load_xbm(cursorfile, maskfile) -> cursor_argsej ]j*jJ(j&j%ujP(}(j*jP(j*js)j*copy the current cursorj*]copy() -> Cursoraj ]j*jP(j&j%ujS(}(j*jS(j*jw)j*Gets the cursor typej*]type -> stringaj ]j*jS(j&j%ujV(}(j*jV(j*j{)j*Gets the cursor dataj*] data -> tupleaj ]j*jV(j&j%ujM(}(j*jM(j*jo)j*#pygame object representing a cursorj*](3Cursor(size, hotspot, xormasks, andmasks) -> Cursor"Cursor(hotspot, surface) -> CursorCursor(constant) -> CursorCursor(Cursor) -> CursorCursor() -> Cursorej ](jP(jS(jV(ej*jM(j&j%upygame.cursors}(j*j*j*j(j*"pygame module for cursor resourcesj*]j ](jG(jJ(jM(ej*jD(j&j%uuub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612183.839133 pygame-2.6.1/docs/generated/es/doctrees/index.doctree0000644000175100001770000010446614676242430022215 0ustar00runnerdocker+sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(hPágina Principal de Pygameh]h TextPágina Principal de Pygame}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource1/home/runner/work/pygame/pygame/docs/es/index.rstlineKubh compound)}(hhh]htoctree)}(hhh]h}(h]h ]h"]h$]h&]hindexentries](Nreferencias/bufferproxyNreferencias/cameraNreferencias/cdromNreferencias/colorNreferencias/cursorsNtutorials/CamaraIntroN tutorials/ChimpanceLineaporLineaNtutorials/CrearJuegosNtutorials/GuiaNewbieNtutorials/IniciarImportarNtutorials/ModosVisualizacionNtutorials/MoverImagenNtutorials/SpriteIntroNtutorials/SurfarrayIntroNtutorials/chimpance.pyNtutorials/tom_juegos2Ntutorials/tom_juegos3Ntutorials/tom_juegos4Ntutorials/tom_juegos5Ntutorials/tom_juegos6Nlogose includefiles](h@hBhDhFhHhJhLhNhPhRhThVhXhZh\h^h`hbhdhfhhemaxdepthKcaptionNglobhidden includehiddennumberedK titlesonly rawentries]uh(h2h*h+h,Khh/ubah}(h]h ]toctree-wrapperah"]h$]h&]uh(h-hh h)hh*h+h,Nubh )}(hhh](h)}(h Documentosh]h Documentos}hhsbah}(h]h ]h"]h$]h&]uh(hhh|h)hh*h+h,Kubh definition_list)}(hhh](h definition_list_item)}(hj`Readme`_ Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo. h](h term)}(h `Readme`_h]h reference)}(hhh]hReadme}(hhhReadmeubah}(h]h ]h"]h$]h&]namehrefuri../../wiki/aboutuh(hhhresolvedKubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubh definition)}(hhh]h paragraph)}(h_Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo.h]h_Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubh)}(h`Install`_ Pasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema. h](h)}(h `Install`_h]h)}(hhh]hInstall}(hhhInstallubah}(h]h ]h"]h$]h&]namehh/../../wiki/GettingStarted#Pygame%20Installationuh(hhhhKubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubh)}(hhh]h)}(hPasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema.h]hPasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema.}hhsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khhubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhh)hubh)}(hW`File Path Function Arguments`_ Cómo maneja Pygame las rutas del sistema de archivos. h](h)}(h`File Path Function Arguments`_h]h)}(hjh]hFile Path Function Arguments}(hjhFile Path Function Argumentsubah}(h]h ]h"]h$]h&]nameFile Path Function Argumentsh../filepaths.htmluh(hhjhKubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubh)}(hhh]h)}(h6Cómo maneja Pygame las rutas del sistema de archivos.h]h6Cómo maneja Pygame las rutas del sistema de archivos.}hj6sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khj3ubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhh)hubh)}(hD`Pygame Logos`_ Los logotipos de Pygame en diferentes resoluciones. h](h)}(h`Pygame Logos`_h]h)}(hjVh]h Pygame Logos}(hjXh Pygame Logosubah}(h]h ]h"]h$]h&]name Pygame Logosh logos.htmluh(hhjThKubah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjPubh)}(hhh]h)}(h3Los logotipos de Pygame en diferentes resoluciones.h]h3Los logotipos de Pygame en diferentes resoluciones.}hjrsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjoubah}(h]h ]h"]h$]h&]uh(hh*h+h,KhjPubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhh)hubh)}(h`LGPL License`_ Esta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa. h](h)}(h`LGPL License`_h]h)}(hjh]h LGPL License}(hjh LGPL Licenseubah}(h]h ]h"]h$]h&]name LGPL Licenseh ../LGPL.txtuh(hhjhKubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubh)}(hhh]h)}(hEsta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa.h]hEsta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khhh)hubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khh|h)hubeh}(h] documentosah ]h"] documentosah$]h&]uh(h hh h)hh*h+h,Kubh )}(hhh](h)}(h Tutorialesh]h Tutoriales}hjsbah}(h]h ]h"]h$]h&]uh(hhjh)hh*h+h,K#ubh comment)}(h=:doc:`Introducción a Pygame `h]h=:doc:`Introducción a Pygame `}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh(jhjh)hh*h+h,K%ubj)}(h5Una introducción a los conceptos básicos de Pygame.h]h5Una introducción a los conceptos básicos de Pygame.}hjsbah}(h]h ]h"]h$]h&]jjuh(jhjh)hh*h+h,K&ubj)}(hXEsto está escrito por usuarios de Python y aparece en el volúmen dos de la revista Py.h]hXEsto está escrito por usuarios de Python y aparece en el volúmen dos de la revista Py.}hjsbah}(h]h ]h"]h$]h&]jjuh(jhjh)hh*h+h,K(ubh)}(hhh](h)}(h:doc:`Importación e Inicialización ` Los pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas. h](h)}(hA:doc:`Importación e Inicialización `h]h pending_xref)}(hjh]h inline)}(hjh]hImportación e Inicialización}hj'sbah}(h]h ](xrefstdstd-doceh"]h$]h&]uh(j%hj"ubah}(h]h ]h"]h$]h&]refdoch= refdomainj2reftypedoc refexplicitrefwarn reftargettutorials/IniciarImportaruh(j h*h+h,K)hjubah}(h]h ]h"]h$]h&]uh(hh*h+h,K)hjubh)}(hhh]h)}(hLos pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas.h]hLos pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas.}hjNsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K*hjKubah}(h]h ]h"]h$]h&]uh(hh*h+h,K*hjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K)hjubh)}(h:doc:`¿Cómo muevo una imagen? ` Un tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados. h](h)}(h8:doc:`¿Cómo muevo una imagen? `h]j!)}(hjnh]j&)}(hjnh]h¿Cómo muevo una imagen?}hjssbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjpubah}(h]h ]h"]h$]h&]refdoch= refdomainj}reftypedoc refexplicitrefwarnjCtutorials/MoverImagenuh(j h*h+h,K.hjlubah}(h]h ]h"]h$]h&]uh(hh*h+h,K.hjhubh)}(hhh]h)}(hUn tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados.h]hUn tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K/hjubah}(h]h ]h"]h$]h&]uh(hh*h+h,K/hjhubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K.hjh)hubh)}(hXC:doc:`Tutorial del Chimpancé, Linea por Linea ` Los ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo. h](h)}(hR:doc:`Tutorial del Chimpancé, Linea por Linea `h]j!)}(hjh]j&)}(hjh]h(Tutorial del Chimpancé, Linea por Linea}hjsbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjC tutorials/ChimpanceLineaporLineauh(j h*h+h,K2hjubah}(h]h ]h"]h$]h&]uh(hh*h+h,K2hjubh)}(hhh]h)}(hLos ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo.h]hLos ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K3hjubah}(h]h ]h"]h$]h&]uh(hh*h+h,K3hjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K2hjh)hubh)}(hX:doc:`Introducción al Módulo de Sprites ` Pygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente. h](h)}(hB:doc:`Introducción al Módulo de Sprites `h]j!)}(hjh]j&)}(hjh]h#Introducción al Módulo de Sprites}hjsbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjCtutorials/SpriteIntrouh(j h*h+h,K7hjubah}(h]h ]h"]h$]h&]uh(hh*h+h,K7hjubh)}(hhh]h)}(hXkPygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente.h]hXkPygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente.}hj,sbah}(h]h ]h"]h$]h&]uh(hh*h+h,K8hj)ubah}(h]h ]h"]h$]h&]uh(hh*h+h,K8hjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K7hjh)hubh)}(hXj:doc:`Introducción a Surfarray ` Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py. h](h)}(h;:doc:`Introducción a Surfarray `h]j!)}(hjLh]j&)}(hjLh]hIntroducción a Surfarray}hjQsbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjNubah}(h]h ]h"]h$]h&]refdoch= refdomainj[reftypedoc refexplicitrefwarnjCtutorials/SurfarrayIntrouh(j h*h+h,K>hjJubah}(h]h ]h"]h$]h&]uh(hh*h+h,K>hjFubh)}(hhh]h)}(hX-Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py.h]hX-Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py.}hjvsbah}(h]h ]h"]h$]h&]uh(hh*h+h,K?hjsubah}(h]h ]h"]h$]h&]uh(hh*h+h,K?hjFubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K>hjh)hubh)}(hX :doc:`Introducción al Módulo de Cámara ` Pygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos. h](h)}(hB:doc:`Introducción al Módulo de Cámara `h]j!)}(hjh]j&)}(hjh]h#Introducción al Módulo de Cámara}hjsbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjCtutorials/CamaraIntrouh(j h*h+h,KDhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KDhjubh)}(hhh]h)}(hPygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos.h]hPygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KEhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KEhjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,KDhjh)hubh)}(h:doc:`Guía Newbie ` Una lista de trece útiles tips para que las personas se sientas cómodas usando pygame. h](h)}(h*:doc:`Guía Newbie `h]j!)}(hjh]j&)}(hjh]h Guía Newbie}hjsbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjCtutorials/GuiaNewbieuh(j h*h+h,KIhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KIhjubh)}(hhh]h)}(hXUna lista de trece útiles tips para que las personas se sientas cómodas usando pygame.h]hXUna lista de trece útiles tips para que las personas se sientas cómodas usando pygame.}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,KJhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KJhjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,KIhjh)hubh)}(h:doc:`Tutorial para Crear Juegos ` Un largo tutorial que cubre los grandes temas necesarios para crear un juego completo. h](h)}(h9:doc:`Tutorial para Crear Juegos `h]j!)}(hj*h]j&)}(hj*h]hTutorial para Crear Juegos}hj/sbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hj,ubah}(h]h ]h"]h$]h&]refdoch= refdomainj9reftypedoc refexplicitrefwarnjCtutorials/CrearJuegosuh(j h*h+h,KLhj(ubah}(h]h ]h"]h$]h&]uh(hh*h+h,KLhj$ubh)}(hhh]h)}(hVUn largo tutorial que cubre los grandes temas necesarios para crear un juego completo.h]hVUn largo tutorial que cubre los grandes temas necesarios para crear un juego completo.}hjTsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KMhjQubah}(h]h ]h"]h$]h&]uh(hh*h+h,KMhj$ubeh}(h]h ]h"]h$]h&]uh(hh*h+h,KLhjh)hubh)}(h}:doc:`Modos de Visualización ` Obteniendo una superficie de visualización para la pantalla. h](h)}(h=:doc:`Modos de Visualización `h]j!)}(hjth]j&)}(hjth]hModos de Visualización}hjysbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hjvubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftypedoc refexplicitrefwarnjCtutorials/ModosVisualizacionuh(j h*h+h,KOhjrubah}(h]h ]h"]h$]h&]uh(hh*h+h,KOhjnubh)}(hhh]h)}(h=Obteniendo una superficie de visualización para la pantalla.h]h=Obteniendo una superficie de visualización para la pantalla.}hjsbah}(h]h ]h"]h$]h&]uh(hh*h+h,KPhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KPhjnubeh}(h]h ]h"]h$]h&]uh(hh*h+h,KOhjh)hubeh}(h]h ]h"]h$]h&]uh(hh*h+h,K)hjh)hubeh}(h] tutorialesah ]h"] tutorialesah$]h&]uh(h hh h)hh*h+h,K#ubh )}(hhh](h)}(h Referenciash]h Referencias}hjsbah}(h]h ]h"]h$]h&]uh(hhjh)hh*h+h,KTubh)}(hhh](h)}(h^:ref:`genindex` Una lista de todas las funciones, clases, y métodos en el paquete de pygame. h](h)}(h:ref:`genindex`h]j!)}(hjh]j&)}(hjh]hgenindex}hjsbah}(h]h ](j1stdstd-refeh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftyperef refexplicitrefwarnjCgenindexuh(j h*h+h,KVhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KVhjubh)}(hhh]h)}(hMUna lista de todas las funciones, clases, y métodos en el paquete de pygame.h]hMUna lista de todas las funciones, clases, y métodos en el paquete de pygame.}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,KWhjubah}(h]h ]h"]h$]h&]uh(hh*h+h,KWhjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,KVhjubh)}(h\:doc:`referencias/bufferproxy` Una vista del protocolo de arrays de píxeles de superficie. h](h)}(h:doc:`referencias/bufferproxy`h]j!)}(hj*h]j&)}(hj*h]hreferencias/bufferproxy}hj/sbah}(h]h ](j1stdstd-doceh"]h$]h&]uh(j%hj,ubah}(h]h ]h"]h$]h&]refdoch= refdomainj9reftypedoc refexplicitrefwarnjCreferencias/bufferproxyuh(j h*h+h,KYhj(ubah}(h]h ]h"]h$]h&]uh(hh*h+h,KYhj$ubh)}(hhh]h)}(h`h]h:doc:`pygame C API `}hjsbah}(h]h ]h"]h$]h&]jjuh(jhjh)hh*h+h,Kubj)}(hBLa API de C compartida entre los módulos de extensión de Pygame.h]hBLa API de C compartida entre los módulos de extensión de Pygame.}hjsbah}(h]h ]h"]h$]h&]jjuh(jhjh)hh*h+h,Kubh)}(hhh]h)}(hC:ref:`search` Búsqueda de documentos de Pygame por palabra clave. h](h)}(h :ref:`search`h]j!)}(hjh]j&)}(hjh]hsearch}hjsbah}(h]h ](j1stdstd-refeh"]h$]h&]uh(j%hjubah}(h]h ]h"]h$]h&]refdoch= refdomainjreftyperef refexplicitrefwarnjCsearchuh(j h*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubh)}(hhh]h)}(h4Búsqueda de documentos de Pygame por palabra clave.h]h4Búsqueda de documentos de Pygame por palabra clave.}hj sbah}(h]h ]h"]h$]h&]uh(hh*h+h,Khj ubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubeh}(h]h ]h"]h$]h&]uh(hh*h+h,Khjubah}(h]h ]h"]h$]h&]uh(hh*h+h,Khjh)hubh target)}(h.. _Readme: ../../wiki/abouth]h}(h]readmeah ]h"]readmeah$]h&]hhuh(j3 h,Khjh)hh*h+ referencedubj4 )}(h<.. _Install: ../../wiki/GettingStarted#Pygame%20Installationh]h}(h]installah ]h"]installah$]h&]hhuh(j3 h,Khjh)hh*h+jA ubj4 )}(h3.. _File Path Function Arguments: ../filepaths.htmlh]h}(h]file-path-function-argumentsah ]h"]file path function argumentsah$]h&]hj,uh(j3 h,Khjh)hh*h+jA ubj4 )}(h.. _LGPL License: ../LGPL.txth]h}(h] lgpl-licenseah ]h"] lgpl licenseah$]h&]hjuh(j3 h,Khjh)hh*h+jA ubj4 )}(h.. _Pygame Logos: logos.htmlh]h}(h] pygame-logosah ]h"] pygame logosah$]h&]hjhuh(j3 h,Khjh)hh*h+jA ubeh}(h] referenciasah ]h"] referenciasah$]h&]uh(h hh h)hh*h+h,KTubeh}(h]pagina-principal-de-pygameah ]h"]página principal de pygameah$]h&]uh(h hhh)hh*h+h,Kubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(readme]hainstall]hafile path function arguments]ja pygame logos]jXa lgpl license]jaurefids}nameids}(j j| jjjjjw jt j> j; jK jH jW jT jc j` jo jl u nametypes}(j jjjw j> jK jW jc jo uh}(j| h jh|jjjt jj; j5 jH jB jT jN j` jZ jl jf u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612183.850133 pygame-2.6.1/docs/generated/es/doctrees/logos.doctree0000644000175100001770000002724114676242430022224 0ustar00runnerdocker.sphinx.addnodesdocument)}( rawsourcechildren]docutils.nodessection)}(hhh](h title)}(hPágina de Logotipos de Pygameh]h TextPágina de Logotipos de Pygame}parenthsba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh _documenthsource1/home/runner/work/pygame/pygame/docs/es/logos.rstlineKubh )}(hhh](h)}(hLogotipos de Pygameh]hLogotipos de Pygame}hh0sbah}(h]h ]h"]h$]h&]uh(hhh-h)hh*h+h,Kubh paragraph)}(hEstos logotipos están disponibles para su uso en tus propios proyectos. Por favor, colocarlos donde creas conveniente. El logotipo fue creado por TheCorruptor el 29 de julio de 2001 y fue ampliado por Mega_JC el 29 de Agosto de 2021.h]hEstos logotipos están disponibles para su uso en tus propios proyectos. Por favor, colocarlos donde creas conveniente. El logotipo fue creado por TheCorruptor el 29 de julio de 2001 y fue ampliado por Mega_JC el 29 de Agosto de 2021.}hh@sbah}(h]h ]h"]h$]h&]uh(h>h*h+h,Khh-h)hubh container)}(hX.. image:: ../reST/_static/pygame_logo.png | `pygame_logo.svg <../_static/pygame_logo.svg>`_ | `pygame_logo.png <../_static/pygame_logo.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_lofi.png | `pygame_lofi.svg <../_static/pygame_lofi.svg>`_ | `pygame_lofi.png <../_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_powered.png | `pygame_powered.svg <../_static/pygame_powered.svg>`_ | `pygame_powered.png <../_static/pygame_powered.png>`_ - 1617 x 640 .. image:: ../reST/_static/pygame_tiny.png | `pygame_tiny.png <../_static/pygame_tiny.png>`_ - 214 x 60 .. image:: ../reST/_static/pygame_powered_lowres.png | `pygame_powered_lowres.png <../_static/pygame_powered_lowres.png>`_ - 101 x 40h](h image)}(h+.. image:: ../reST/_static/pygame_logo.png h]h}(h]h ]h"]h$]h&]uri../reST/_static/pygame_logo.png candidates}*hasuh(hTh*h+h,KhhPubh line_block)}(hhh](h h,)}(h/`pygame_logo.svg <../_static/pygame_logo.svg>`_h](h reference)}(hhmh]hpygame_logo.svg}(hhqhpygame_logo.svgubah}(h]h ]h"]h$]h&]namehxrefuri../_static/pygame_logo.svguh(hohhkubh target)}(h <../_static/pygame_logo.svg>h]h}(h]pygame-logo-svgah ]h"]pygame_logo.svgah$]h&]refurihuh(h referencedKhhkubeh}(h]h ]h"]h$]h&]uh(h,indentKhhgh*h+h,Kubhj)}(h<`pygame_logo.png <../_static/pygame_logo.png>`_ - 1561 x 438h](hp)}(h/`pygame_logo.png <../_static/pygame_logo.png>`_h]hpygame_logo.png}(hhhpygame_logo.pngubah}(h]h ]h"]h$]h&]namehh../_static/pygame_logo.pnguh(hohhubh)}(h <../_static/pygame_logo.png>h]h}(h]pygame-logo-pngah ]h"]pygame_logo.pngah$]h&]refurihuh(hhKhhubh - 1561 x 438}hhsbeh}(h]h ]h"]h$]h&]uh(h,hKhhgh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h+.. image:: ../reST/_static/pygame_lofi.png h]h}(h]h ]h"]h$]h&]uri../reST/_static/pygame_lofi.pnghb}hdhsuh(hTh*h+h,KhhPubhf)}(hhh](hj)}(h/`pygame_lofi.svg <../_static/pygame_lofi.svg>`_h](hp)}(hhh]hpygame_lofi.svg}(hhhpygame_lofi.svgubah}(h]h ]h"]h$]h&]namehh../_static/pygame_lofi.svguh(hohhubh)}(h <../_static/pygame_lofi.svg>h]h}(h]pygame-lofi-svgah ]h"]pygame_lofi.svgah$]h&]refurihuh(hhKhhubeh}(h]h ]h"]h$]h&]uh(h,hKhhh*h+h,Kubhj)}(h<`pygame_lofi.png <../_static/pygame_lofi.png>`_ - 1561 x 438h](hp)}(h/`pygame_lofi.png <../_static/pygame_lofi.png>`_h]hpygame_lofi.png}(hjhpygame_lofi.pngubah}(h]h ]h"]h$]h&]namejh../_static/pygame_lofi.pnguh(hohjubh)}(h <../_static/pygame_lofi.png>h]h}(h]pygame-lofi-pngah ]h"]pygame_lofi.pngah$]h&]refurijuh(hhKhjubh - 1561 x 438}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhhh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h... image:: ../reST/_static/pygame_powered.png h]h}(h]h ]h"]h$]h&]uri"../reST/_static/pygame_powered.pnghb}hdj?suh(hTh*h+h,KhhPubhf)}(hhh](hj)}(h5`pygame_powered.svg <../_static/pygame_powered.svg>`_h](hp)}(hjFh]hpygame_powered.svg}(hjHhpygame_powered.svgubah}(h]h ]h"]h$]h&]namejOh../_static/pygame_powered.svguh(hohjDubh)}(h <../_static/pygame_powered.svg>h]h}(h]pygame-powered-svgah ]h"]pygame_powered.svgah$]h&]refurijWuh(hhKhjDubeh}(h]h ]h"]h$]h&]uh(h,hKhjAh*h+h,Kubhj)}(hB`pygame_powered.png <../_static/pygame_powered.png>`_ - 1617 x 640h](hp)}(h5`pygame_powered.png <../_static/pygame_powered.png>`_h]hpygame_powered.png}(hjohpygame_powered.pngubah}(h]h ]h"]h$]h&]namejwh../_static/pygame_powered.pnguh(hohjkubh)}(h <../_static/pygame_powered.png>h]h}(h]pygame-powered-pngah ]h"]pygame_powered.pngah$]h&]refurijuh(hhKhjkubh - 1617 x 640}hjksbeh}(h]h ]h"]h$]h&]uh(h,hKhjAh*h+h,Kubeh}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h+.. image:: ../reST/_static/pygame_tiny.png h]h}(h]h ]h"]h$]h&]uri../reST/_static/pygame_tiny.pnghb}hdjsuh(hTh*h+h,KhhPubhf)}(hhh]hj)}(h:`pygame_tiny.png <../_static/pygame_tiny.png>`_ - 214 x 60h](hp)}(h/`pygame_tiny.png <../_static/pygame_tiny.png>`_h]hpygame_tiny.png}(hjhpygame_tiny.pngubah}(h]h ]h"]h$]h&]namejh../_static/pygame_tiny.pnguh(hohjubh)}(h <../_static/pygame_tiny.png>h]h}(h]pygame-tiny-pngah ]h"]pygame_tiny.pngah$]h&]refurijuh(hhKhjubh - 214 x 60}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhjh*h+h,Kubah}(h]h ]h"]h$]h&]uh(hehhPubhU)}(h5.. image:: ../reST/_static/pygame_powered_lowres.png h]h}(h]h ]h"]h$]h&]uri)../reST/_static/pygame_powered_lowres.pnghb}hdjsuh(hTh*h+h,K"hhPubhf)}(hhh]hj)}(hN`pygame_powered_lowres.png <../_static/pygame_powered_lowres.png>`_ - 101 x 40h](hp)}(hC`pygame_powered_lowres.png <../_static/pygame_powered_lowres.png>`_h]hpygame_powered_lowres.png}(hjhpygame_powered_lowres.pngubah}(h]h ]h"]h$]h&]namejh$../_static/pygame_powered_lowres.pnguh(hohjubh)}(h' <../_static/pygame_powered_lowres.png>h]h}(h]pygame-powered-lowres-pngah ]h"]pygame_powered_lowres.pngah$]h&]refurijuh(hhKhjubh - 101 x 40}hjsbeh}(h]h ]h"]h$]h&]uh(h,hKhjh*h+h,Kubah}(h]h ]h"]h$]h&]uh(hehhPubeh}(h]h ] fullwidthah"]h$]h&]uh(hNhh-h)hh*h+h,Nubh?)}(hExiste una imagen de Photoshop con capas de mayor resolución dispnible `aquí `_. *(1.3 MB)*h](hHExiste una imagen de Photoshop con capas de mayor resolución dispnible }hj(sbhp)}(h5`aquí `_h]haquí}(hj0haquíubah}(h]h ]h"]h$]h&]namej8h*https://www.pygame.org/ftp/pygame_logo.psduh(hohj(ubh)}(h- h]h}(h]aquiah ]h"]aquíah$]h&]refurij@uh(hhKhj(ubh. }hj(sbh emphasis)}(h *(1.3 MB)*h]h(1.3 MB)}hjTsbah}(h]h ]h"]h$]h&]uh(jRhj(ubeh}(h]h ]h"]h$]h&]uh(h>h*h+h,K'hh-h)hubh )}(hhh](h)}(hLogotipos legendariosh]hLogotipos legendarios}hjksbah}(h]h ]h"]h$]h&]uh(hhjhh)hh*h+h,K+ubhO)}(h;`legacy_logos.zip <../_static/legacy_logos.zip>`_ - 50.1 KBh]h?)}(hj{h](hp)}(h1`legacy_logos.zip <../_static/legacy_logos.zip>`_h]hlegacy_logos.zip}(hjhlegacy_logos.zipubah}(h]h ]h"]h$]h&]namejh../_static/legacy_logos.zipuh(hohj}ubh)}(h <../_static/legacy_logos.zip>h]h}(h]legacy-logos-zipah ]h"]legacy_logos.zipah$]h&]refurijuh(hhKhj}ubh - 50.1 KB}hj}sbeh}(h]h ]h"]h$]h&]uh(h>h*h+h,K/hjyubah}(h]h ] fullwidthah"]h$]h&]uh(hNhjhh)hh*h+h,Nubeh}(h]logotipos-legendariosah ]h"]logotipos legendariosah$]h&]uh(h hh-h)hh*h+h,K+ubeh}(h]logotipos-de-pygameah ]h"]logotipos de pygameah$]h&]uh(h hh h)hh*h+h,Kubeh}(h]pagina-de-logotipos-de-pygameah ]h"]página de logotipos de pygameah$]h&]uh(h hhh)hh*h+h,Kubah}(h]h ]h"]h$]h&]sourceh+translation_progress}(totalK translatedKuuh(hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNhN generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh+ _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjhhhhhhj jjaj^jjjjj j jJjGjjjju nametypes}(jjhhhj jajjj jJjjuh}(jh jh-hhhhhhjjj^jXjjjjj jjGjAjjhjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](h system_message)}(hhh]h?)}(hNo directive entry for "container" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "container".h]hNo directive entry for "container" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "container".}hjWsbah}(h]h ]h"]h$]h&]uh(h>hjTubah}(h]h ]h"]h$]h&]levelKtypeINFOlineK sourceh+uh(jRhh-h)hh*h+h,K ubjS)}(hhh]h?)}(h{No directive entry for "image" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "image".h]h{No directive entry for "image" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "image".}hjssbah}(h]h ]h"]h$]h&]uh(h>hjpubah}(h]h ]h"]h$]h&]levelKtypejmlineKsourceh+uh(jRhhPubetransform_messages] transformerN include_log] decorationNh)hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0231256 pygame-2.6.1/docs/generated/es/doctrees/referencias/0000755000175100001770000000000014676242436022020 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612183.872133 pygame-2.6.1/docs/generated/es/doctrees/referencias/bufferproxy.doctree0000644000175100001770000010001214676242430025726 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:class:`pygame.BufferProxy`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.BufferProxy}hh) -> BufferProxy`h]h)}(hhh]h$BufferProxy() -> BufferProxy}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hX:class:`BufferProxy` es un tipo de soporte de pygame, diseñado como el valor de retorno de los métodos :meth:`Surface.get_buffer` y :meth:`Surface.get_view`. Para todas las versiones de Python, un objeto :class:`BufferProxy` exporta una estructura C y un array de interface a nivel de Python en nombre del búfer del objeto principal. También se exporta una nueva interfaz de búfer. En pygame, :class:`BufferProxy` es clave para implementar el módulo :mod:`pygame.surfarray`.h](h6)}(h:class:`BufferProxy`h]h;)}(hhh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hhubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)KhhubhU es un tipo de soporte de pygame, diseñado como el valor de retorno de los métodos }hhsbh6)}(h:meth:`Surface.get_buffer`h]h;)}(hj"h]hSurface.get_buffer()}hj$sbah}(h]h](hFpypy-metheh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj.reftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_bufferuh%h5h'h]h)Khhubh y }hhsbh6)}(h:meth:`Surface.get_view`h]h;)}(hjFh]hSurface.get_view()}hjHsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjDubah}(h]h]h]h]h!]refdochS refdomainjRreftypemeth refexplicitrefwarnhYhhZh~h[Surface.get_viewuh%h5h'h]h)Khhubh0. Para todas las versiones de Python, un objeto }hhsbh6)}(h:class:`BufferProxy`h]h;)}(hjjh]h BufferProxy}hjlsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjhubah}(h]h]h]h]h!]refdochS refdomainjvreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khhubh exporta una estructura C y un array de interface a nivel de Python en nombre del búfer del objeto principal. También se exporta una nueva interfaz de búfer. En pygame, }hhsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khhubh& es clave para implementar el módulo }hhsbh6)}(h:mod:`pygame.surfarray`h]h;)}(hjh]hpygame.surfarray}hjsbah}(h]h](hFpypy-modeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemod refexplicitrefwarnhYhhZh~h[pygame.surfarrayuh%h5h'h]h)Khhubh.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khhh&hubh)}(hXgLas instancias :class:`BufferProxy` pueden ser creadas directamente desde el código de Python, ya sea para un buffer superior que exporta una interfaz o a partir de un ``dict`` de Python que describe el diseño del búfer de un objeto. Las entradas del dict se basan en el mapeo de la interfaz de matriz a nivel de Python. Se reconocen las siguientes claves:h](hLas instancias }hjsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)Khjubh pueden ser creadas directamente desde el código de Python, ya sea para un buffer superior que exporta una interfaz o a partir de un }hjsbh;)}(h``dict``h]hdict}hjsbah}(h]h]h]h]h!]uh%h:hjubh de Python que describe el diseño del búfer de un objeto. Las entradas del dict se basan en el mapeo de la interfaz de matriz a nivel de Python. Se reconocen las siguientes claves:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khhh&hubh block_quote)}(hX``"shape"`` : tupla La longitud de cada elemento del array como una tupla de enteros. La longitud de la tupla es el número de dimensiones en el array. ``"typestr"`` : string El tipo de elemento del array como una cadena de longitud 3. El primer carácter indica el orden de bytes, '<' para para formato little-endian, ">" para formato big-endian, y '\|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, "" para formato big-endian, y '\|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, "" para formato big-endian, y '\|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, "" para formato big-endian, y '|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, " Surface`h]h)}(hjh]hparent -> Surface}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)KSubh)}(h:sg:`parent -> `h]h)}(hjh]hparent -> }hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjth&hh'h]h)KTubeh}(h]h]h]h]h!]uh%hhjqh&hh'h]h)KRubh)}(hLa clase :class:`Surface` que devolvió el objeto de clase :class:`BufferProxy` o el objeto pasado a una llamada de :class:`BufferProxy`.h](h La clase }hjsbh6)}(h:class:`Surface`h]h;)}(hjh]hSurface}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Surfaceuh%h5h'h]h)KVhjubh" que devolvió el objeto de clase }hjsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)KVhjubh% o el objeto pasado a una llamada de }hjsbh6)}(h:class:`BufferProxy`h]h;)}(hjh]h BufferProxy}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYhhZh~h[ BufferProxyuh%h5h'h]h)KVhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KVhjqh&hubeh}(h]h]h]h]h!]uh%hhjSh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]domainjEobjtypejFdesctypejFno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq'length (atributo de pygame.BufferProxy)pygame.BufferProxy.lengthhNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hlengthh]h)}(hjgh]hlength}hjisbah}(h]h](hheh]h]h!]h#h$uh%hhjeh&hh'h]h)KYubah}(h]j`ah](hheh]h]h!]hhhh~hBufferProxy.lengthhh BufferProxylengthhj|uh%hzh'h]h)KYhjbh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`The size, in bytes, of the exported buffer.`h]h)}(hjh]h+The size, in bytes, of the exported buffer.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K[ubh)}(h:sg:`length -> int`h]h)}(hjh]h length -> int}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K\ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)K[ubh)}(hXEl número de bytes validos de datos exportados. Para datos discotinuous, es decir, datos que no forman un solo bloque de memoria, los bytes dentro de los espacios vacios se excluyen del conteo. Esta propiedad es equivalente al campo "len" de la estructura C ``Py_buffer``.h](hXEl número de bytes validos de datos exportados. Para datos discotinuous, es decir, datos que no forman un solo bloque de memoria, los bytes dentro de los espacios vacios se excluyen del conteo. Esta propiedad es equivalente al campo "len" de la estructura C }hjsbh;)}(h ``Py_buffer``h]h Py_buffer}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K^hjh&hubeh}(h]h]h]h]h!]uh%hhjbh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq$raw (atributo de pygame.BufferProxy)pygame.BufferProxy.rawhNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hrawh]h)}(hjh]hraw}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kcubah}(h]jah](hheh]h]h!]hhhh~hBufferProxy.rawhh BufferProxyrawhjuh%hzh'h]h)Kchjh&hubh)}(hhh](h)}(hhh](h)}(h?:sl:`A copy of the exported buffer as a single block of bytes.`h]h)}(hjh]h9A copy of the exported buffer as a single block of bytes.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Keubh)}(h:sg:`raw -> bytes`h]h)}(hj3h]h raw -> bytes}hj5sbah}(h]h]hah]h]h!]uh%hhj1ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Keubh)}(hsLos datos del búfer como un objeto ``str``/``bytes``. Cualquier espacio vacío en los datos exportados se elimina.h](h$Los datos del búfer como un objeto }hjNsbh;)}(h``str``h]hstr}hjVsbah}(h]h]h]h]h!]uh%h:hjNubh/}hjNsbh;)}(h ``bytes``h]hbytes}hjhsbah}(h]h]h]h]h!]uh%h:hjNubh>. Cualquier espacio vacío en los datos exportados se elimina.}hjNsbeh}(h]h]h]h]h!]uh%hh'h]h)Khhjh&hubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%huh&hhhh'h]h)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq'write() (método de pygame.BufferProxy)pygame.BufferProxy.writehNtauh%hdhhh&hh'h]h)Nubhv)}(hhh](h{)}(hwriteh](h)}(hjh]hwrite}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kkubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kkubeh}(h]jah](hheh]h]h!]hhhh~hBufferProxy.writehh BufferProxywritehBufferProxy.write()uh%hzh'h]h)Kkhjh&hubh)}(hhh](h)}(hhh](h)}(h':sl:`Write raw bytes to object buffer.`h]h)}(hjh]h!Write raw bytes to object buffer.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kmubh)}(h:sg:`write(buffer, offset=0)`h]h)}(hjh]hwrite(buffer, offset=0)}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Knubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kmubh)}(hX Sobreescribe bytes en el objeto superior (o antecesor). Los datos deben ser contiguos en C o F, de lo contrario se genera un ValueError. El argumento `buffer` es un objeto ``str``/``bytes``. Un desplazamiento opcional proporciona una posición de inicio, en bytes, dentro del búfer donde comienza la sobreescritura. Si el desplazamiento es negativo o mayor o igual que el valor :attr:`length` del proxy, se genera un excepción ``IndexException``. Si ``len(buffer) > proxy.length + offset``, se genera un ``ValueError``.h](hSobreescribe bytes en el objeto superior (o antecesor). Los datos deben ser contiguos en C o F, de lo contrario se genera un ValueError. El argumento }hjsbh title_reference)}(h`buffer`h]hbuffer}hj sbah}(h]h]h]h]h!]uh%j hjubh es un objeto }hjsbh;)}(h``str``h]hstr}hjsbah}(h]h]h]h]h!]uh%h:hjubh/}hjsbh;)}(h ``bytes``h]hbytes}hj/sbah}(h]h]h]h]h!]uh%h:hjubh. Un desplazamiento opcional proporciona una posición de inicio, en bytes, dentro del búfer donde comienza la sobreescritura. Si el desplazamiento es negativo o mayor o igual que el valor }hjsbh6)}(h:attr:`length`h]h;)}(hjCh]hlength}hjEsbah}(h]h](hFpypy-attreh]h]h!]uh%h:hjAubah}(h]h]h]h]h!]refdochS refdomainjOreftypeattr refexplicitrefwarnhYhhZh~h[lengthuh%h5h'h]h)Kphjubh$ del proxy, se genera un excepción }hjsbh;)}(h``IndexException``h]hIndexException}hjesbah}(h]h]h]h]h!]uh%h:hjubh. Si }hjsbh;)}(h'``len(buffer) > proxy.length + offset``h]h#len(buffer) > proxy.length + offset}hjwsbah}(h]h]h]h]h!]uh%h:hjubh, se genera un }hjsbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kphjh&hubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%huh&hhhh'h]h)Nubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jJjjKjjLjjMjNjOjPjQjRjSuh%huh&hhh,h'Nh)Nubeh}(h]pygame-bufferproxyah]h]pygame.bufferproxyah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh|jQjVj`jejjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]#docs/es/referencias/bufferproxy.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612183.9081328 pygame-2.6.1/docs/generated/es/doctrees/referencias/camera.doctree0000644000175100001770000013536014676242430024621 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.camera`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.camera}hh/home/runner/work/pygame/pygame/docs/es/referencias/camera.rsth)Khh1ubah}(h]h]h]h]h!]uh%h/hh,h&hh'h]h)Kubhindex)}(hhh]h}(h]h]h]h]h!]entries](pairmodule; pygame.cameramodule-pygame.camerahNtauh%hdhh,h&hh'Nh)Nubh line_block)}(hhh]h h))}(h":sl:`pygame module for camera use`h]h inline)}(hh}h]hpygame module for camera use}hhsbah}(h]h] summarylineah]h]h!]uh%hhh{ubah}(h]h]h]h]h!]uh%h)indentKhhwh&hh'h]h)K ubah}(h]h]h]h]h!]uh%huhh,h&hh'h]h)K ubh paragraph)}(hActualmente, Pygame soporta cámaras nativas de Linux (V4L2) y Windows (MSMF), con un soporte de plataforma más amplio disponible a través de un backend (controlador) integrado en OpenCV.h]hActualmente, Pygame soporta cámaras nativas de Linux (V4L2) y Windows (MSMF), con un soporte de plataforma más amplio disponible a través de un backend (controlador) integrado en OpenCV.}hhsbah}(h]h]h]h]h!]uh%hh'h]h)K hh,h&hubhversionmodified)}(h2New in pygame 2.0.2: Windows native camera supporth]h)}(h2New in pygame 2.0.2: Windows native camera supporth](h)}(hNew in pygame 2.0.2: h]hNew in pygame 2.0.2: }hhsbah}(h]h](haddedeh]h]h!]uh%hhhh&hh'h]h)KubhWindows native camera support}(hhh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhhh&hh'h]h)Kubah}(h]h]h]h]h!]type versionaddedversion2.0.2uh%hh&hh'h]h)Khh,ubh)}(h(New in pygame 2.0.3: New OpenCV backendsh]h)}(h(New in pygame 2.0.3: New OpenCV backendsh](h)}(hNew in pygame 2.0.3: h]hNew in pygame 2.0.3: }hhsbah}(h]h](hheh]h]h!]uh%hhhh&hh'h]h)KubhNew OpenCV backends}(hhh&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%hhhh&hh'h]h)Kubah}(h]h]h]h]h!]h֌ versionaddedh،2.0.3uh%hh&hh'h]h)Khh,ubh)}(h¡EXPERIMENTAL!: Este API puede cambiar o desaparecer en lanzamientos posteriores de pygame. Si lo utilizas, es muy probable que tu código se rompa en la próxima versión de pygame.h]h¡EXPERIMENTAL!: Este API puede cambiar o desaparecer en lanzamientos posteriores de pygame. Si lo utilizas, es muy probable que tu código se rompa en la próxima versión de pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh)}(h*La función de Bayer a ``RGB`` se basa en:h](hLa función de Bayer a }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh se basa en:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh literal_block)}(hX+Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.h]hX+Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}hj3sbah}(h]h]h]h]h!]h#h$uh%j1h'h]h)Khh,h&hubh)}(hNuevo en pygame 1.9.0.h]hNuevo en pygame 1.9.0.}hjAsbah}(h]h]h]h]h!]uh%hh'h]h)K/hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single$init() (en el módulo pygame.camera)pygame.camera.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(hpygame.camera.h]hpygame.camera.}hjksbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jihjeh&hh'h]h)K1ubh desc_name)}(hjgh]hinit}hj}sbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%j{hjeh&hh'h]h)K1ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjeh&hh'h]h)K1ubeh}(h]j\ah](sig sig-objecteh]h]h!]module pygame.cameraclasshfullnamejg _toc_partsjjg _toc_nameinit()uh%jch'h]h)K1hj`h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h:sl:`Module init`h]h)}(hjh]h Module init}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K3ubhz)}(h":sg:`init(backend = None) -> None`h]h)}(hjh]hinit(backend = None) -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K4ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K3ubh)}(hXEsta función inicia el módulo de la cámara, seleccionando el mejor controlador (backend) de la cámara web que pueda encontrar en tu sistema. No se garantiza que tenga éxito e incluso puede intentar importar módulos de teceros, como `OpenCV`. Si deseas anular la elección de controlador (backend), podés hacer un llamado para pasar el nombre del controlador que deseas a esta función. Podés obtener más información sobre los controladores (backends) en la función :func:`get_backends()`.h](hEsta función inicia el módulo de la cámara, seleccionando el mejor controlador (backend) de la cámara web que pueda encontrar en tu sistema. No se garantiza que tenga éxito e incluso puede intentar importar módulos de teceros, como }hjsbh title_reference)}(h`OpenCV`h]hOpenCV}hjsbah}(h]h]h]h]h!]uh%jhjubh. Si deseas anular la elección de controlador (backend), podés hacer un llamado para pasar el nombre del controlador que deseas a esta función. Podés obtener más información sobre los controladores (backends) en la función }hjsbh6)}(h:func:`get_backends()`h]h;)}(hjh]hget_backends()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYjhZNh[ get_backendsuh%h5h'h]h)K6hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K6hjh&hubh)}(hhjubh )}(h## pygame.camera.init ##h]h## pygame.camera.init ##}hjUsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K@ubeh}(h]h]h]h]h!]uh%jhj`h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjlobjtypejmdesctypejmno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j^h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ,get_backends() (en el módulo pygame.camera)pygame.camera.get_backendshNtauh%hdhh,h&hh'Nh)Nubj_)}(hhh](jd)}(h get_backendsh](jj)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jihjh&hh'h]h)KBubj|)}(hjh]h get_backends}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)KBubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)KBubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjget_backends()uh%jch'h]h)KBhjh&hubj)}(hhh](hv)}(hhh](hz)}(h/:sl:`Get the backends supported on this system`h]h)}(hjh]h)Get the backends supported on this system}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KDubhz)}(h:sg:`get_backends() -> [str]`h]h)}(hjh]hget_backends() -> [str]}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KEubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KDubh)}(hEste función devuelve cada controlador (backend) que considera que tienen posibilidad de funcionar en tu sistema, en orden de prioridad.h]hEste función devuelve cada controlador (backend) que considera que tienen posibilidad de funcionar en tu sistema, en orden de prioridad.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KGhjh&hubh)}(hpygame.camera Backends: ::h]hpygame.camera Backends:}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KJhjh&hubj2)}(hX Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the futureh]hX Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future}hjsbah}(h]h]h]h]h!]h#h$uh%j1h'h]h)KMhjh&hubh)}(hBHay dos diferencias princiales entre los controladores (backends).h]hBHay dos diferencias princiales entre los controladores (backends).}hj!sbah}(h]h]h]h]h!]uh%hh'h]h)KVhjh&hubh)}(hXLos controladores (backends) _camera están integrados en el mismo pygame y no requieren importaciones de terceros. Todos los demás controlaores sí lo requieren. Para los controladores OpenCV y VideoCapture, esos módulos deben estar instalados en tu sistema.h]hXLos controladores (backends) _camera están integrados en el mismo pygame y no requieren importaciones de terceros. Todos los demás controlaores sí lo requieren. Para los controladores OpenCV y VideoCapture, esos módulos deben estar instalados en tu sistema.}hj/sbah}(h]h]h]h]h!]uh%hh'h]h)KXhjh&hubh)}(hXLa otra gran diferencia es "enumeración de cámaras". Algunos constroladores no tienen una forma de enumerar los nombres de las cámaras o incluso la cantidad de cámaras en el sistema. En estos casos, la función :func:`list_cameras()` devolverá algo como ``[0]``. Si sabés que tenés varias cámaras en el sistema, estos puertos de controladores pasarán un "número de índice de cámara" si lo utilizas como el parámetro ``device``.h](hLa otra gran diferencia es "enumeración de cámaras". Algunos constroladores no tienen una forma de enumerar los nombres de las cámaras o incluso la cantidad de cámaras en el sistema. En estos casos, la función }hj=sbh6)}(h:func:`list_cameras()`h]h;)}(hjGh]hlist_cameras()}hjIsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjEubah}(h]h]h]h]h!]refdochS refdomainjSreftypefunc refexplicitrefwarnhYjhZNh[ list_camerasuh%h5h'h]h)K]hj=ubh devolverá algo como }hj=sbh;)}(h``[0]``h]h[0]}hjisbah}(h]h]h]h]h!]uh%h:hj=ubh. Si sabés que tenés varias cámaras en el sistema, estos puertos de controladores pasarán un "número de índice de cámara" si lo utilizas como el parámetro }hj=sbh;)}(h ``device``h]hdevice}hj{sbah}(h]h]h]h]h!]uh%h:hj=ubh.}hj=sbeh}(h]h]h]h]h!]uh%hh'h]h)K]hjh&hubh)}(hNew in pygame 2.0.3.h]h)}(hNew in pygame 2.0.3.h]h)}(hNew in pygame 2.0.3.h]hNew in pygame 2.0.3.}hjsbah}(h]h](hheh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%hhjh&hh'h]h)Keubah}(h]h]h]h]h!]h֌ versionaddedh،2.0.3uh%hh&hh'h]h)Kdhjubh )}(h ## pygame.camera.get_backends ##h]h ## pygame.camera.get_backends ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kfubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jqjjrjjsjjtjujvjwjxjyjzuh%j^h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ*colorspace() (en el módulo pygame.camera)pygame.camera.colorspacehNtauh%hdhh,h&hh'Nh)Nubj_)}(hhh](jd)}(h colorspaceh](jj)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jihjh&hh'h]h)Khubj|)}(hjh]h colorspace}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Khubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Khubeh}(h]jah](jjeh]h]h!]jjjhjjjjjj colorspace()uh%jch'h]h)Khhjh&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`Surface colorspace conversion`h]h)}(hjh]hSurface colorspace conversion}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kjubhz)}(h@:sg:`colorspace(Surface, format, DestSurface = None) -> Surface`h]h)}(hj5h]h:colorspace(Surface, format, DestSurface = None) -> Surface}hj7sbah}(h]h]jah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kkubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kjubh)}(hXPermite la conversión "RGB" a un espacio de color destino de "HSV" o "YUV". Las surfaces (superficies) de origen y destino deben tener el mismo tamaño y profundidad de píxel. Esto es útil para la visión por computadora de dispositivos con capacidad de procesamiento limitada. Captura una imagen lo más pequeña posible, la redimensiona con ``transform.scale()`` haciendola aún más pequeña, y luego convierte el espacio de color a "YUV" o "HSV" antes de realizar cualquier procesamiento en ella.h](hXZPermite la conversión "RGB" a un espacio de color destino de "HSV" o "YUV". Las surfaces (superficies) de origen y destino deben tener el mismo tamaño y profundidad de píxel. Esto es útil para la visión por computadora de dispositivos con capacidad de procesamiento limitada. Captura una imagen lo más pequeña posible, la redimensiona con }hjPsbh;)}(h``transform.scale()``h]htransform.scale()}hjXsbah}(h]h]h]h]h!]uh%h:hjPubh haciendola aún más pequeña, y luego convierte el espacio de color a "YUV" o "HSV" antes de realizar cualquier procesamiento en ella.}hjPsbeh}(h]h]h]h]h!]uh%hh'h]h)Kmhjh&hubh )}(h## pygame.camera.colorspace ##h]h## pygame.camera.colorspace ##}hjpsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kuubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jqjjrjjsjjtjujvjwjxjyjzuh%j^h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ,list_cameras() (en el módulo pygame.camera)pygame.camera.list_camerashNtauh%hdhh,h&hh'Nh)Nubj_)}(hhh](jd)}(h list_camerash](jj)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jihjh&hh'h]h)Kwubj|)}(hjh]h list_cameras}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Kwubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kwubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjlist_cameras()uh%jch'h]h)Kwhjh&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`returns a list of available cameras`h]h)}(hjh]h#returns a list of available cameras}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kyubhz)}(h!:sg:`list_cameras() -> [cameras]`h]h)}(hjh]hlist_cameras() -> [cameras]}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kyubh)}(hVerifica la disponibilidad de cámaras y devuelve una lista de cadenas de nombres de cámaras, listas para ser utilizados por :class:`pygame.camera.Camera`.h](h~Verifica la disponibilidad de cámaras y devuelve una lista de cadenas de nombres de cámaras, listas para ser utilizados por }hjsbh6)}(h:class:`pygame.camera.Camera`h]h;)}(hjh]hpygame.camera.Camera}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYjhZNh[pygame.camera.Camerauh%h5h'h]h)K|hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K|hjh&hubh)}(hSi el controlador (backend) de la cámara no soporta la enuemración de webcams, esto devolverá algo como ``[0]``. Ver :func:`get_backends()` para obtener mucha más información.h](hkSi el controlador (backend) de la cámara no soporta la enuemración de webcams, esto devolverá algo como }hj:sbh;)}(h``[0]``h]h[0]}hjBsbah}(h]h]h]h]h!]uh%h:hj:ubh. Ver }hj:sbh6)}(h:func:`get_backends()`h]h;)}(hjVh]hget_backends()}hjXsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjTubah}(h]h]h]h]h!]refdochS refdomainjbreftypefunc refexplicitrefwarnhYjhZNh[ get_backendsuh%h5h'h]h)Khj:ubh& para obtener mucha más información.}hj:sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## pygame.camera.list_cameras ##h]h ## pygame.camera.list_cameras ##}hj~sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jqjjrjjsjjtjujvjwjxjyjzuh%j^h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZCamera (clase en pygame.camera)pygame.camera.CamerahNtauh%hdhh,h&hh'Nh)Nubj_)}(hhh](jd)}(hCamerah](jj)}(hpygame.camera.h]hpygame.camera.}hjsbah}(h]h](jvjweh]h]h!]h#h$uh%jihjh&hh'h]h)Kubj|)}(hjh]hCamera}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjhjjjjjjjuh%jch'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`load a camera`h]h)}(hjh]h load a camera}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h7:sg:`Camera(device, (width, height), format) -> Camera`h]h)}(hjh]h1Camera(device, (width, height), format) -> Camera}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hX7Carga una cámara. En Linux, el dispositivo suele ser algo como "/dev/video0". El ancho y alto predeterminados son 640x480. El formato es el espacio de color deseado para la salida. Esto es útil para fines de visión por computadora. El valor predeterminado es ``RGB``. Los siguientes formatos son compatibles:h](hXCarga una cámara. En Linux, el dispositivo suele ser algo como "/dev/video0". El ancho y alto predeterminados son 640x480. El formato es el espacio de color deseado para la salida. Esto es útil para fines de visión por computadora. El valor predeterminado es }hj sbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hj ubh*. Los siguientes formatos son compatibles:}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh block_quote)}(hv* ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value h]h bullet_list)}(hhh](h list_item)}(h``RGB`` - Red, Green, Blue h]h)}(h``RGB`` - Red, Green, Blueh](h;)}(h``RGB``h]hRGB}hj@sbah}(h]h]h]h]h!]uh%h:hj<ubh - Red, Green, Blue}hj<sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj8ubah}(h]h]h]h]h!]uh%j6h'h]h)Khj3ubj7)}(h2``YUV`` - Luma, Blue Chrominance, Red Chrominance h]h)}(h1``YUV`` - Luma, Blue Chrominance, Red Chrominanceh](h;)}(h``YUV``h]hYUV}hjfsbah}(h]h]h]h]h!]uh%h:hjbubh* - Luma, Blue Chrominance, Red Chrominance}hjbsbeh}(h]h]h]h]h!]uh%hh'h]h)Khj^ubah}(h]h]h]h]h!]uh%j6h'h]h)Khj3ubj7)}(h!``HSV`` - Hue, Saturation, Value h]h)}(h ``HSV`` - Hue, Saturation, Valueh](h;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hjubh - Hue, Saturation, Value}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%j6h'h]h)Khj3ubeh}(h]h]h]h]h!]bullet*uh%j1h'h]h)Khj-ubah}(h]h]h]h]h!]uh%j+h'h]h)Khjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ)start() (método de pygame.camera.Camera)pygame.camera.Camera.starthNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(hstarth](j|)}(hjh]hstart}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjj Camera.startjjCamerastartjCamera.start()uh%jch'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h.:sl:`opens, initializes, and starts capturing`h]h)}(hjh]h(opens, initializes, and starts capturing}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`start() -> None`h]h)}(hjh]hstart() -> None}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hAbre el dispositivo de la cámara, intenta inicializarlo y comienza a grabar imágenes en un búfer. La cámara debe estar iniciada antes de que se puedan utilizar las siguientes funciones.h]hAbre el dispositivo de la cámara, intenta inicializarlo y comienza a grabar imágenes en un búfer. La cámara debe estar iniciada antes de que se puedan utilizar las siguientes funciones.}hj)sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Camera.start ##h]h## Camera.start ##}hj7sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqjNjrjOjsjOjtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ(stop() (método de pygame.camera.Camera)pygame.camera.Camera.stophNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(hstoph](j|)}(hjfh]hstop}hjhsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjdh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjdh&hh'h]h)Kubeh}(h]j_ah](jjeh]h]h!]jjjjj Camera.stopjjCamerastopj Camera.stop()uh%jch'h]h)Khjah&hubj)}(hhh](hv)}(hhh](hz)}(h1:sl:`stops, uninitializes, and closes the camera`h]h)}(hjh]h+stops, uninitializes, and closes the camera}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hDetiene la grabación, desinicializa la cámara y la cierra. Una vez que la cámara se detiene, las funciones siguientes no se pueden utilizar hasta que se inicie nuevamente.h]hDetiene la grabación, desinicializa la cámara y la cierra. Una vez que la cámara se detiene, las funciones siguientes no se pueden utilizar hasta que se inicie nuevamente.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Camera.stop ##h]h## Camera.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjah&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqjjrjjsjjtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ0get_controls() (método de pygame.camera.Camera)!pygame.camera.Camera.get_controlshNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(h get_controlsh](j|)}(hjh]h get_controls}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjCamera.get_controlsjjCamera get_controlsjCamera.get_controls()uh%jch'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`gets current values of user controls`h]h)}(hj-h]h$gets current values of user controls}hj/sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Kubhz)}(h@:sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)`h]h)}(hjDh]h:get_controls() -> (hflip = bool, vflip = bool, brightness)}hjFsbah}(h]h]jah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj%h&hh'h]h)Kubh)}(hXSi la cámara lo admite, get_controls devolverá la configuración actual para el volteo horizontal y vertical de la imagen como booleanos y el brillo como un número entero. Si no es compatible, devolverá los valores predeterminados (0, 0, 0). Hay que tener en cuenta que los valores de retorno acá pueden ser diferentes a los devueltos por set_controls, aunque es más probable que sean correctos.h]hXSi la cámara lo admite, get_controls devolverá la configuración actual para el volteo horizontal y vertical de la imagen como booleanos y el brillo como un número entero. Si no es compatible, devolverá los valores predeterminados (0, 0, 0). Hay que tener en cuenta que los valores de retorno acá pueden ser diferentes a los devueltos por set_controls, aunque es más probable que sean correctos.}hj_sbah}(h]h]h]h]h!]uh%hh'h]h)Khj%h&hubh )}(h## Camera.get_controls ##h]h## Camera.get_controls ##}hjmsbah}(h]h]h]h]h!]h#h$uh%h hj%h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqjjrjjsjjtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ0set_controls() (método de pygame.camera.Camera)!pygame.camera.Camera.set_controlshNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(h set_controlsh](j|)}(hjh]h set_controls}hjsbah}(h]h](jjeh]h]h!]h#h$uh%j{hjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](jjeh]h]h!]jjjjjCamera.set_controlsjjCamera set_controlsjCamera.set_controls()uh%jch'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h8:sl:`changes camera settings if supported by the camera`h]h)}(hjh]h2changes camera settings if supported by the camera}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(hf:sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)`h]h)}(hjh]h`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hXTe permite cambiar la configuración de la cámara si la cámara lo admite. Los valores devueltos serán los valores de la entrada si la cámara afirma que tuvo éxito, o si no, los valores previamente utilizados. Cada argumento es opcional y se puede elegir el deseado mediante el suministro de una palabra clave, como hflip. Hay que tener en cuenta que la configuración real siendo utilizada por la cámara puede no ser la misma que la devuelta por set_controls. En Windows :code:`hflip` y :code:`vflip` están implementados por pygame, no por la cámara, por lo que siempre deberían funcionar, pero el brillo :code:`brightness` no está soportado.h](hXTe permite cambiar la configuración de la cámara si la cámara lo admite. Los valores devueltos serán los valores de la entrada si la cámara afirma que tuvo éxito, o si no, los valores previamente utilizados. Cada argumento es opcional y se puede elegir el deseado mediante el suministro de una palabra clave, como hflip. Hay que tener en cuenta que la configuración real siendo utilizada por la cámara puede no ser la misma que la devuelta por set_controls. En Windows }hjsbh;)}(h :code:`hflip`h]hhflip}hj sbah}(h]h]codeah]h]h!]languagehuh%h:hjubh y }hjsbh;)}(h :code:`vflip`h]hvflip}hj sbah}(h]h]j ah]h]h!]languagehuh%h:hjubhl están implementados por pygame, no por la cámara, por lo que siempre deberían funcionar, pero el brillo }hjsbh;)}(h:code:`brightness`h]h brightness}hj) sbah}(h]h]j ah]h]h!]languagehuh%h:hjubh no está soportado.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## Camera.set_controls ##h]h## Camera.set_controls ##}hjB sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqjY jrjZ jsjZ jtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ,get_size() (método de pygame.camera.Camera)pygame.camera.Camera.get_sizehNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(hget_sizeh](j|)}(hjq h]hget_size}hjs sbah}(h]h](jjeh]h]h!]h#h$uh%j{hjo h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjo h&hh'h]h)Kubeh}(h]jj ah](jjeh]h]h!]jjjjjCamera.get_sizejjCameraget_sizejCamera.get_size()uh%jch'h]h)Khjl h&hubj)}(hhh](hv)}(hhh](hz)}(h9:sl:`returns the dimensions of the images being recorded`h]h)}(hj h]h3returns the dimensions of the images being recorded}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h#:sg:`get_size() -> (width, height)`h]h)}(hj h]hget_size() -> (width, height)}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hDevuelve las dimensiones actuales de las imágenes capturadas por la cámara. Esto devolverá el tamaño real, que puede ser diferente al especificado durante la inicialización si la cámara no admite ese tamaño.h]hDevuelve las dimensiones actuales de las imágenes capturadas por la cámara. Esto devolverá el tamaño real, que puede ser diferente al especificado durante la inicialización si la cámara no admite ese tamaño.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Camera.get_size ##h]h## Camera.get_size ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjl h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqj jrj jsj jtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ/query_image() (método de pygame.camera.Camera) pygame.camera.Camera.query_imagehNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(h query_imageh](j|)}(hj h]h query_image}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j{hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjCamera.query_imagejjCamera query_imagejCamera.query_image()uh%jch'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h :sl:`checks if a frame is ready`h]h)}(hj8 h]hchecks if a frame is ready}hj: sbah}(h]h]hah]h]h!]uh%hhj6 ubah}(h]h]h]h]h!]uh%h)hKhj3 h&hh'h]h)Kubhz)}(h:sg:`query_image() -> bool`h]h)}(hjO h]hquery_image() -> bool}hjQ sbah}(h]h]jah]h]h!]uh%hhjM ubah}(h]h]h]h]h!]uh%h)hKhj3 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj0 h&hh'h]h)Kubh)}(hXSi una imagen está lista, devuelve TRUE (verdadero). De lo contrario, devuelve FALSE (falso). Hay que tener en cuenta que algunas webcams siempre devolverán falso y solo pondrán en cola un cuadro cuando se les llame con una función de bloqueo como :func:`get_image()`. En Windows (MSMF), y en los backends de OpenCV, la función :func:`query_image()` debería ser confiable. Esto es útil para separar la frecuencia de cuadros del juego de la velocidad de la cámara sin tener que usar subprocesos.h](hSi una imagen está lista, devuelve TRUE (verdadero). De lo contrario, devuelve FALSE (falso). Hay que tener en cuenta que algunas webcams siempre devolverán falso y solo pondrán en cola un cuadro cuando se les llame con una función de bloqueo como }hjj sbh6)}(h:func:`get_image()`h]h;)}(hjt h]h get_image()}hjv sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjr ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjhZjh[ get_imageuh%h5h'h]h)Khjj ubh>. En Windows (MSMF), y en los backends de OpenCV, la función }hjj sbh6)}(h:func:`query_image()`h]h;)}(hj h]h query_image()}hj sbah}(h]h](hFpypy-funceh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypefunc refexplicitrefwarnhYjhZjh[ query_imageuh%h5h'h]h)Khjj ubh debería ser confiable. Esto es útil para separar la frecuencia de cuadros del juego de la velocidad de la cámara sin tener que usar subprocesos.}hjj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj0 h&hubh )}(h## Camera.query_image ##h]h## Camera.query_image ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj0 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqj jrj jsj jtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ-get_image() (método de pygame.camera.Camera)pygame.camera.Camera.get_imagehNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(h get_imageh](j|)}(hj h]h get_image}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j{hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjCamera.get_imagejjCamera get_imagejCamera.get_image()uh%jch'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h$:sl:`captures an image as a Surface`h]h)}(hj h]hcaptures an image as a Surface}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h*:sg:`get_image(Surface = None) -> Surface`h]h)}(hj2 h]h$get_image(Surface = None) -> Surface}hj4 sbah}(h]h]jah]h]h!]uh%hhj0 ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hXExtrae una imagen del búfer como una superficie ``RGB``. Opcionalmente, se puede reutilizar una superficie existente para ahorrar tiempo. La profundidad de bits de la superficie es de 24 bits en Linux, 32 bits en Windows, o la misma que la superficie suministrada opcionalmente.h](h1Extrae una imagen del búfer como una superficie }hjM sbh;)}(h``RGB``h]hRGB}hjU sbah}(h]h]h]h]h!]uh%h:hjM ubh. Opcionalmente, se puede reutilizar una superficie existente para ahorrar tiempo. La profundidad de bits de la superficie es de 24 bits en Linux, 32 bits en Windows, o la misma que la superficie suministrada opcionalmente.}hjM sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Camera.get_image ##h]h## Camera.get_image ##}hjm sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqj jrj jsj jtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](jZ+get_raw() (método de pygame.camera.Camera)pygame.camera.Camera.get_rawhNtauh%hdhjh&hh'Nh)Nubj_)}(hhh](jd)}(hget_rawh](j|)}(hj h]hget_raw}hj sbah}(h]h](jjeh]h]h!]h#h$uh%j{hj h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]j ah](jjeh]h]h!]jjjjjCamera.get_rawjjCameraget_rawjCamera.get_raw()uh%jch'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h*:sl:`returns an unmodified image as bytes`h]h)}(hj h]h$returns an unmodified image as bytes}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_raw() -> bytes`h]h)}(hj h]hget_raw() -> bytes}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hObtiene una imagen de la cámara como una cadena en el formato de píxel nativo de la cámara. Útil para la integración con las otras bibliotecas. Esto devuelve un objeto de bytes.h]hObtiene una imagen de la cámara como una cadena en el formato de píxel nativo de la cámara. Útil para la integración con las otras bibliotecas. Esto devuelve un objeto de bytes.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## Camera.get_raw ##h]h## Camera.get_raw ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jqj jrj jsj jtjujvjwjxjyjzuh%j^h&hhjh'Nh)Nubh )}(h## pygame.camera.Camera ##h]h## pygame.camera.Camera ##}hj$ sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jqj; jrj< jsj< jtjujvjwjxjyjzuh%j^h&hhh,h'Nh)Nubh )}(h## pygame.camera ##h]h## pygame.camera ##}hj@ sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubeh}(h](hs pygame-cameraeh]h] pygame.cameraah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jS jP s nametypes}jS sh}(jP h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j h'h]h)Khh,h&hubj\jejjjjjjjjjjj_jdjjjjjj jo j j j j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](h system_message)}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]levelKtypeINFOlineKKsourceh]uh%j hjh&hh'h]h)KKubj )}(hhh]h)}(hoNo role entry for "code" in module "docutils.parsers.rst.languages.es". Using English fallback for role "code".h]hoNo role entry for "code" in module "docutils.parsers.rst.languages.es". Using English fallback for role "code".}hj sbah}(h]h]h]h]h!]uh%hhj ubah}(h]h]h]h]h!]levelKtypej lineKŒsourceh]uh%j hjh&hh'h]h)Kubetransform_messages] transformerN include_log]docs/es/referencias/camera.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612183.9611328 pygame-2.6.1/docs/generated/es/doctrees/referencias/cdrom.doctree0000644000175100001770000016350614676242430024500 0ustar00runnerdocker;sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.cdrom`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.cdrom}hh`_.h]h paragraph)}(hXEste módulo no es funcional en pygame 2.0 y versiones superiores, a menos que hayas compilado manualmente pygame con SDL1. Este módulo no estará soportado en el futuro. Una alternativa para la funcionalidad de cdrom de Python es `pycdio `_.h](hEste módulo no es funcional en pygame 2.0 y versiones superiores, a menos que hayas compilado manualmente pygame con SDL1. Este módulo no estará soportado en el futuro. Una alternativa para la funcionalidad de cdrom de Python es }hhsbh reference)}(h,`pycdio `_h]hpycdio}(hhhpycdioubah}(h]h]h]h]h!]namehrefuri https://pypi.org/project/pycdio/uh%hhhubh target)}(h# h]h}(h]pycdioah]h]pycdioah]h!]refurihuh%h referencedKhhubh.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)K hhubah}(h]h]h]h]h!]uh%hh'h]h)K hh,h&hubh)}(hXbEl módulo cdrom administra las unidades de ``CD`` y ``DVD`` en la computadora. También puede controlar la reproducción de CD de audio. Este módulo debe inicializarse antes de poder hacer algo. Cada objeto ``CD``que crees representa una unidad de cdrom y también debe inicializarse individualmente antes de poder realizar la mayoría de las acciones.h](h,El módulo cdrom administra las unidades de }hhsbh;)}(h``CD``h]hCD}hhsbah}(h]h]h]h]h!]uh%h:hhubh y }hhsbh;)}(h``DVD``h]hDVD}hhsbah}(h]h]h]h]h!]uh%h:hhubh en la computadora. También puede controlar la reproducción de CD de audio. Este módulo debe inicializarse antes de poder hacer algo. Cada objeto }hhsbh problematic)}(h``h]h``}hjsbah}(h]id2ah]h]h]h!]refidid1uh%j hhubhCD``que crees representa una unidad de cdrom y también debe inicializarse individualmente antes de poder realizar la mayoría de las acciones.}hhsbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single#init() (en el módulo pygame.cdrom)pygame.cdrom.inithNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hinith](h desc_addname)}(h pygame.cdrom.h]h pygame.cdrom.}hjEsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jChj?h&hh'h]h)Kubh desc_name)}(hjAh]hinit}hjWsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jUhj?h&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj?h&hh'h]h)Kubeh}(h]j6ah](sig sig-objecteh]h]h!]module pygame.cdromclasshfullnamejA _toc_partsj{jA _toc_nameinit()uh%j=h'h]h)Khj:h&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h!:sl:`initialize the cdrom module`h]h)}(hjh]hinitialize the cdrom module}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h] signatureah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hInicializa el módulo de cdrom. Esto escaneará el sistema en busca de todos los dispositivos ``CD``. El módulo debe inicializarse antes de que funcionen cualquier otra función. Esto ocurre automáticamente cuando llamas ``pygame.init()``.h](h^Inicializa el módulo de cdrom. Esto escaneará el sistema en busca de todos los dispositivos }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh{. El módulo debe inicializarse antes de que funcionen cualquier otra función. Esto ocurre automáticamente cuando llamas }hjsbh;)}(h``pygame.init()``h]h pygame.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h1Es seguro llamar a este función más de una vez.h]h1Es seguro llamar a este función más de una vez.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K hjh&hubh )}(h## pygame.cdrom.init ##h]h## pygame.cdrom.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)K"ubeh}(h]h]h]h]h!]uh%jhj:h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainjobjtypejdesctypejno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%j8h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4#quit() (en el módulo pygame.cdrom)pygame.cdrom.quithNtauh%hdhh,h&hh'Nh)Nubj9)}(hhh](j>)}(hquith](jD)}(h pygame.cdrom.h]h pygame.cdrom.}hj:sbah}(h]h](jPjQeh]h]h!]h#h$uh%jChj6h&hh'h]h)K$ubjV)}(hj8h]hquit}hjHsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj6h&hh'h]h)K$ubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj6h&hh'h]h)K$ubeh}(h]j1ah](jujveh]h]h!]jzj{j|hj}j8j~j{j8jquit()uh%j=h'h]h)K$hj3h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`uninitialize the cdrom module`h]h)}(hjoh]huninitialize the cdrom module}hjqsbah}(h]h]hah]h]h!]uh%hhjmubah}(h]h]h]h]h!]uh%h)hKhjjh&hh'h]h)K&ubhz)}(h:sg:`quit() -> None`h]h)}(hjh]hquit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjjh&hh'h]h)K'ubeh}(h]h]h]h]h!]uh%huhjgh&hh'h]h)K&ubh)}(h{Decinicializa el módulo cdrom. Después de llamar a esta función, cualquier objeto ``CD`` existente dejará de funcionar.h](hUDecinicializa el módulo cdrom. Después de llamar a esta función, cualquier objeto }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh existente dejará de funcionar.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K)hjgh&hubh)}(h1Es seguro llamar a esta función más de una vez.h]h1Es seguro llamar a esta función más de una vez.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K,hjgh&hubh )}(h## pygame.cdrom.quit ##h]h## pygame.cdrom.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjgh&hh'h]h)K.ubeh}(h]h]h]h]h!]uh%jhj3h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4'get_init() (en el módulo pygame.cdrom)pygame.cdrom.get_inithNtauh%hdhh,h&hh'Nh)Nubj9)}(hhh](j>)}(hget_inith](jD)}(h pygame.cdrom.h]h pygame.cdrom.}hjsbah}(h]h](jPjQeh]h]h!]h#h$uh%jChjh&hh'h]h)K0ubjV)}(hjh]hget_init}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)K0ubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)K0ubeh}(h]jah](jujveh]h]h!]jzj{j|hj}jj~j{jj get_init()uh%j=h'h]h)K0hjh&hubj)}(hhh](hv)}(hhh](hz)}(h-:sl:`true if the cdrom module is initialized`h]h)}(hj5h]h'true if the cdrom module is initialized}hj7sbah}(h]h]hah]h]h!]uh%hhj3ubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)K2ubhz)}(h:sg:`get_init() -> bool`h]h)}(hjLh]hget_init() -> bool}hjNsbah}(h]h]jah]h]h!]uh%hhjJubah}(h]h]h]h]h!]uh%h)hKhj0h&hh'h]h)K3ubeh}(h]h]h]h]h!]uh%huhj-h&hh'h]h)K2ubh)}(hComprueba si el módulo cdrom está inicializado o no. Esto es diferente de ``CD.init()`` ya que cada unidad también debe inicializarse individualmente.h](hLComprueba si el módulo cdrom está inicializado o no. Esto es diferente de }hjgsbh;)}(h ``CD.init()``h]h CD.init()}hjosbah}(h]h]h]h]h!]uh%h:hjgubh@ ya que cada unidad también debe inicializarse individualmente.}hjgsbeh}(h]h]h]h]h!]uh%hh'h]h)K5hj-h&hubh )}(h## pygame.cdrom.get_init ##h]h## pygame.cdrom.get_init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj-h&hh'h]h)K8ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4(get_count() (en el módulo pygame.cdrom)pygame.cdrom.get_counthNtauh%hdhh,h&hh'Nh)Nubj9)}(hhh](j>)}(h get_counth](jD)}(h pygame.cdrom.h]h pygame.cdrom.}hjsbah}(h]h](jPjQeh]h]h!]h#h$uh%jChjh&hh'h]h)K:ubjV)}(hjh]h get_count}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)K:ubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)K:ubeh}(h]jah](jujveh]h]h!]jzj{j|hj}jj~j{jj get_count()uh%j=h'h]h)K:hjh&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`number of cd drives on the system`h]h)}(hjh]h!number of cd drives on the system}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K count`h]h)}(hjh]hget_count() -> count}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K=ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K)}(hCDh](jD)}(h pygame.cdrom.h]h pygame.cdrom.}hjpsbah}(h]h](jPjQeh]h]h!]h#h$uh%jChjlh&hh'h]h)KEubjV)}(hjnh]hCD}hj~sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjlh&hh'h]h)KEubeh}(h]jgah](jujveh]h]h!]jzj{j|hj}jnj~j{jnjjnuh%j=h'h]h)KEhjih&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`class to manage a cdrom drive`h]h)}(hjh]hclass to manage a cdrom drive}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KGubhz)}(h:sg:`CD(id) -> CD`h]h)}(hjh]h CD(id) -> CD}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KHubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KGubh)}(hPodés crear un objeto ``CD`` para cada unidad de CD en el sistema. Usa ``pygame.cdrom.get_count()`` para determinar cuántas unidades existen realmente. El argumento 'id' es un número entero que representa la unidad, comenzando en cero.h](hPodés crear un objeto }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh+ para cada unidad de CD en el sistema. Usa }hjsbh;)}(h``pygame.cdrom.get_count()``h]hpygame.cdrom.get_count()}hjsbah}(h]h]h]h]h!]uh%h:hjubh para determinar cuántas unidades existen realmente. El argumento 'id' es un número entero que representa la unidad, comenzando en cero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KJhjh&hubh)}(h|El objeto ``CD`` no está inicializado, solo podés llamar ``CD.get_id()` y ``CD.get_name()`` en una unidad no inicializada.h](h El objeto }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh+ no está inicializado, solo podés llamar }hjsbh;)}(h"``CD.get_id()` y ``CD.get_name()``h]hCD.get_id()` y ``CD.get_name()}hjsbah}(h]h]h]h]h!]uh%h:hjubh en una unidad no inicializada.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KOhjh&hubh)}(h]Es seguro crear múltiples objetos ``CD``para la misma unidad, todos cooperarán normalmente.h](h#Es seguro crear múltiples objetos }hj0sbj )}(h``h]h``}hj8sbah}(h]id4ah]h]h]h!]refidid3uh%j hj0ubh8CD``para la misma unidad, todos cooperarán normalmente.}hj0sbeh}(h]h]h]h]h!]uh%hh'h]h)KRhjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j4#init() (método de pygame.cdrom.CD)pygame.cdrom.CD.inithNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hinith](jV)}(hjfh]hinit}hjhsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjdh&hh'h]h)KUubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjdh&hh'h]h)KUubeh}(h]j_ah](jujveh]h]h!]jzj{j|jnj}CD.initj~j{CDinitj CD.init()uh%j=h'h]h)KUhjah&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`initialize a cdrom drive for use`h]h)}(hjh]h initialize a cdrom drive for use}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KWubhz)}(h:sg:`init() -> None`h]h)}(hjh]hinit() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)KXubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)KWubh)}(hInicializa la unidad de CD para ser utilizada. El debe estar inicializada para que la mayoría de los métodos ``CD`` funcionen. Incluso si el resto de pygame está inicializado.h](hoInicializa la unidad de CD para ser utilizada. El debe estar inicializada para que la mayoría de los métodos }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh= funcionen. Incluso si el resto de pygame está inicializado.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KZhjh&hubh)}(hPuede haber una breve pausa mientras la unidad se inicializa. Evitá utilizar ``CD.init()`` si el programa no debe detenerse durante uno o dos segundos.h](hNPuede haber una breve pausa mientras la unidad se inicializa. Evitá utilizar }hjsbh;)}(h ``CD.init()``h]h CD.init()}hjsbah}(h]h]h]h]h!]uh%h:hjubh= si el programa no debe detenerse durante uno o dos segundos.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K^hjh&hubh )}(h ## CD.init ##h]h ## CD.init ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kbubeh}(h]h]h]h]h!]uh%jhjah&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4#quit() (método de pygame.cdrom.CD)pygame.cdrom.CD.quithNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hquith](jV)}(hj3h]hquit}hj5sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj1h&hh'h]h)Kdubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj1h&hh'h]h)Kdubeh}(h]j,ah](jujveh]h]h!]jzj{j|jnj}CD.quitj~j{CDquitj CD.quit()uh%j=h'h]h)Kdhj.h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`uninitialize a cdrom drive for use`h]h)}(hj_h]h"uninitialize a cdrom drive for use}hjasbah}(h]h]hah]h]h!]uh%hhj]ubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)Kfubhz)}(h:sg:`quit() -> None`h]h)}(hjvh]hquit() -> None}hjxsbah}(h]h]jah]h]h!]uh%hhjtubah}(h]h]h]h]h!]uh%h)hKhjZh&hh'h]h)Kgubeh}(h]h]h]h]h!]uh%huhjWh&hh'h]h)Kfubh)}(hDesinicializa una unidad para su uso. Hacé un llamado a esto cuando tu programa no vaya a acceder a la unidad durante un tiempo.h]hDesinicializa una unidad para su uso. Hacé un llamado a esto cuando tu programa no vaya a acceder a la unidad durante un tiempo.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KihjWh&hubh )}(h ## CD.quit ##h]h ## CD.quit ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjWh&hh'h]h)Klubeh}(h]h]h]h]h!]uh%jhj.h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4'get_init() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_inithNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_inith](jV)}(hjh]hget_init}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Knubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Knubeh}(h]jah](jujveh]h]h!]jzj{j|jnj} CD.get_initj~j{CDget_initj CD.get_init()uh%j=h'h]h)Knhjh&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`true if this cd device initialized`h]h)}(hjh]h"true if this cd device initialized}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kpubhz)}(h:sg:`get_init() -> bool`h]h)}(hjh]hget_init() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kpubh)}(hComprueba si este dispositivo ``CDROM`` está inicializado. Esto es diferente de ``pygame.cdrom.init()`` ya que cada unidad también debe inicializarse individualmente.h](hComprueba si este dispositivo }hj,sbh;)}(h ``CDROM``h]hCDROM}hj4sbah}(h]h]h]h]h!]uh%h:hj,ubh* está inicializado. Esto es diferente de }hj,sbh;)}(h``pygame.cdrom.init()``h]hpygame.cdrom.init()}hjFsbah}(h]h]h]h]h!]uh%h:hj,ubh@ ya que cada unidad también debe inicializarse individualmente.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Kshjh&hubh )}(h## CD.get_init ##h]h## CD.get_init ##}hj^sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kwubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjujjvjjvjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4#play() (método de pygame.cdrom.CD)pygame.cdrom.CD.playhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hplayh](jV)}(hjh]hplay}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Kyubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Kyubeh}(h]jah](jujveh]h]h!]jzj{j|jnj}CD.playj~j{CDplayj CD.play()uh%j=h'h]h)Kyhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`start playing audio`h]h)}(hjh]hstart playing audio}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K{ubhz)}(h/:sg:`play(track, start=None, end=None) -> None`h]h)}(hjh]h)play(track, start=None, end=None) -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)K|ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)K{ubh)}(hXReproduce audio desde un CD de audio en la unidad. Además del argumento del número de pista, también podés introducir un tiempo de inicio y fin para la reproducción. El tiempo de inicio y fin está en segundos y puede limintar la selección de una pista de audio reproducida.h]hXReproduce audio desde un CD de audio en la unidad. Además del argumento del número de pista, también podés introducir un tiempo de inicio y fin para la reproducción. El tiempo de inicio y fin está en segundos y puede limintar la selección de una pista de audio reproducida.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)K~hjh&hubh)}(hSi introducir un tiempo de inicio pero no de fin, el audio se reproducirá hasta el final de la pista. Si introducis un tiempo de inicio y 'None' para el tiempo final, el audio se reproducirá hasta el final de todo el disco.h]hSi introducir un tiempo de inicio pero no de fin, el audio se reproducirá hasta el final de la pista. Si introducis un tiempo de inicio y 'None' para el tiempo final, el audio se reproducirá hasta el final de todo el disco.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hkVéase ``CD.get_numtracks()`` y ``CD.get_track_audio()`` para encontrar las pistas que se van a reproducir.h](hVéase }hjsbh;)}(h``CD.get_numtracks()``h]hCD.get_numtracks()}hjsbah}(h]h]h]h]h!]uh%h:hjubh y }hjsbh;)}(h``CD.get_track_audio()``h]hCD.get_track_audio()}hj!sbah}(h]h]h]h]h!]uh%h:hjubh3 para encontrar las pistas que se van a reproducir.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hYNota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en 0.h](h+Nota: la pista 0 es la primera pista en el }hj9sbh;)}(h``CD``h]hCD}hjAsbah}(h]h]h]h]h!]uh%h:hj9ubh(. Los números de pistas comienzan en 0.}hj9sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## CD.play ##h]h ## CD.play ##}hjYsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjpjjqjjqjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4#stop() (método de pygame.cdrom.CD)pygame.cdrom.CD.stophNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hstoph](jV)}(hjh]hstop}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Kubeh}(h]jah](jujveh]h]h!]jzj{j|jnj}CD.stopj~j{CDstopj CD.stop()uh%j=h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`stop audio playback`h]h)}(hjh]hstop audio playback}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`stop() -> None`h]h)}(hjh]hstop() -> None}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hDetiene la reproducción del audio desde el CD-ROM. También se perderá la posición actual de reproducción. Este método no hace nada si la unidad no está reproduciendo audio.h]hDetiene la reproducción del audio desde el CD-ROM. También se perderá la posición actual de reproducción. Este método no hace nada si la unidad no está reproduciendo audio.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h ## CD.stop ##h]h ## CD.stop ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4$pause() (método de pygame.cdrom.CD)pygame.cdrom.CD.pausehNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hpauseh](jV)}(hj# h]hpause}hj% sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj! h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj! h&hh'h]h)Kubeh}(h]j ah](jujveh]h]h!]jzj{j|jnj}CD.pausej~j{CDpausej CD.pause()uh%j=h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h%:sl:`temporarily stop audio playback`h]h)}(hjO h]htemporarily stop audio playback}hjQ sbah}(h]h]hah]h]h!]uh%hhjM ubah}(h]h]h]h]h!]uh%h)hKhjJ h&hh'h]h)Kubhz)}(h:sg:`pause() -> None`h]h)}(hjf h]hpause() -> None}hjh sbah}(h]h]jah]h]h!]uh%hhjd ubah}(h]h]h]h]h!]uh%h)hKhjJ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjG h&hh'h]h)Kubh)}(hDetiene temporalmente la reproducción del audio en el ``CD``. La reproducción puede reanudarse en el mismo punto con el método ``CD.resume()``. Si el ``CD`` no está reproduciendo, este método no hace nada.h](h7Detiene temporalmente la reproducción del audio en el }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubhE. La reproducción puede reanudarse en el mismo punto con el método }hj sbh;)}(h``CD.resume()``h]h CD.resume()}hj sbah}(h]h]h]h]h!]uh%h:hj ubh. Si el }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh3 no está reproduciendo, este método no hace nada.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjG h&hubh)}(hUNota: la pista 0 es la primera en el ``CD``. Los números de pista comienzan en cero.h](h%Nota: la pista 0 es la primera en el }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh*. Los números de pista comienzan en cero.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjG h&hubh )}(h## CD.pause ##h]h## CD.pause ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjG h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4%resume() (método de pygame.cdrom.CD)pygame.cdrom.CD.resumehNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hresumeh](jV)}(hj h]hresume}hj sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj h&hh'h]h)Kubeh}(h]j ah](jujveh]h]h!]jzj{j|jnj} CD.resumej~j{CDresumej CD.resume()uh%j=h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`unpause audio playback`h]h)}(hj@ h]hunpause audio playback}hjB sbah}(h]h]hah]h]h!]uh%hhj> ubah}(h]h]h]h]h!]uh%h)hKhj; h&hh'h]h)Kubhz)}(h:sg:`resume() -> None`h]h)}(hjW h]hresume() -> None}hjY sbah}(h]h]jah]h]h!]uh%hhjU ubah}(h]h]h]h]h!]uh%h)hKhj; h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj8 h&hh'h]h)Kubh)}(h}Reanuda la reproducción de un ``CD``. Si el ``CD`` no está en pausa o ya se está reproduciendo, este método no hace nada.h](hReanuda la reproducción de un }hjr sbh;)}(h``CD``h]hCD}hjz sbah}(h]h]h]h]h!]uh%h:hjr ubh. Si el }hjr sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hjr ubhJ no está en pausa o ya se está reproduciendo, este método no hace nada.}hjr sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj8 h&hubh )}(h## CD.resume ##h]h## CD.resume ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj8 h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4$eject() (método de pygame.cdrom.CD)pygame.cdrom.CD.ejecthNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hejecth](jV)}(hj h]heject}hj sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj h&hh'h]h)Kubeh}(h]j ah](jujveh]h]h!]jzj{j|jnj}CD.ejectj~j{CDejectj CD.eject()uh%j=h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h#:sl:`eject or open the cdrom drive`h]h)}(hj h]heject or open the cdrom drive}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`eject() -> None`h]h)}(hj h]heject() -> None}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hoEsto abrirá la unidad de CD y expulsará el CD-ROM. Si la unidad está reproduciendo o en pausa, se detendrá.h]hoEsto abrirá la unidad de CD y expulsará el CD-ROM. Si la unidad está reproduciendo o en pausa, se detendrá.}hj1 sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.eject ##h]h## CD.eject ##}hj? sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjV jjW jjW jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4%get_id() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_idhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_idh](jV)}(hjn h]hget_id}hjp sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjl h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjl h&hh'h]h)Kubeh}(h]jg ah](jujveh]h]h!]jzj{j|jnj} CD.get_idj~j{CDget_idj CD.get_id()uh%j=h'h]h)Khji h&hubj)}(hhh](hv)}(hhh](hz)}(h":sl:`the index of the cdrom drive`h]h)}(hj h]hthe index of the cdrom drive}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_id() -> id`h]h)}(hj h]hget_id() -> id}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hDevuelve el ID entero que se utilizó para crear la instancia de ``CD``. Este método puede funcionar en un ``CD`` no inicializado.h](hADevuelve el ID entero que se utilizó para crear la instancia de }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh%. Este método puede funcionar en un }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh no inicializado.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_id ##h]h## CD.get_id ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhji h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4'get_name() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_namehNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_nameh](jV)}(hj- h]hget_name}hj/ sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj+ h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj+ h&hh'h]h)Kubeh}(h]j& ah](jujveh]h]h!]jzj{j|jnj} CD.get_namej~j{CDget_namej CD.get_name()uh%j=h'h]h)Khj( h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`the system name of the cdrom drive`h]h)}(hjY h]h"the system name of the cdrom drive}hj[ sbah}(h]h]hah]h]h!]uh%hhjW ubah}(h]h]h]h]h!]uh%h)hKhjT h&hh'h]h)Kubhz)}(h:sg:`get_name() -> name`h]h)}(hjp h]hget_name() -> name}hjr sbah}(h]h]jah]h]h!]uh%hhjn ubah}(h]h]h]h]h!]uh%h)hKhjT h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjQ h&hh'h]h)Kubh)}(hDevuelve el nombre de la unidad en forma de cadena. Este es el nombre de sitema utilizado para representar la unidad, a menudo es la letra de la unidad o el nombre del dispositivo. Este método puede funcionar en un ``CD`` no inicializado.h](hDevuelve el nombre de la unidad en forma de cadena. Este es el nombre de sitema utilizado para representar la unidad, a menudo es la letra de la unidad o el nombre del dispositivo. Este método puede funcionar en un }hj sbh;)}(h``CD``h]hCD}hj sbah}(h]h]h]h]h!]uh%h:hj ubh no inicializado.}hj sbeh}(h]h]h]h]h!]uh%hh'h]h)KhjQ h&hubh )}(h## CD.get_name ##h]h## CD.get_name ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjQ h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj( h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4'get_busy() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_busyhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_busyh](jV)}(hj h]hget_busy}hj sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj h&hh'h]h)Kubeh}(h]j ah](jujveh]h]h!]jzj{j|jnj} CD.get_busyj~j{CDget_busyj CD.get_busy()uh%j=h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h(:sl:`true if the drive is playing audio`h]h)}(hj h]h"true if the drive is playing audio}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_busy() -> bool`h]h)}(hj h]hget_busy() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hIDevuelve True (verdadero) si la unidad está ocupada reproduciendo audio.h]hIDevuelve True (verdadero) si la unidad está ocupada reproduciendo audio.}hj8 sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_busy ##h]h## CD.get_busy ##}hjF sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj] jj^ jj^ jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4)get_paused() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_pausedhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(h get_pausedh](jV)}(hju h]h get_paused}hjw sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjs h&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjs h&hh'h]h)Kubeh}(h]jn ah](jujveh]h]h!]jzj{j|jnj} CD.get_pausedj~j{CD get_pausedjCD.get_paused()uh%j=h'h]h)Khjp h&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`true if the drive is paused`h]h)}(hj h]htrue if the drive is paused}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`get_paused() -> bool`h]h)}(hj h]hget_paused() -> bool}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(hBDevuelve True (verdadero) si la unidad está actualmente en pausa.h]hBDevuelve True (verdadero) si la unidad está actualmente en pausa.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubh )}(h## CD.get_paused ##h]h## CD.get_paused ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjp h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jj jj jj jjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4*get_current() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_currenthNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(h get_currenth](jV)}(hjh]h get_current}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Kubeh}(h]j ah](jujveh]h]h!]jzj{j|jnj}CD.get_currentj~j{CD get_currentjCD.get_current()uh%j=h'h]h)Khj h&hubj)}(hhh](hv)}(hhh](hz)}(h):sl:`the current audio playback position`h]h)}(hj<h]h#the current audio playback position}hj>sbah}(h]h]hah]h]h!]uh%hhj:ubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)Kubhz)}(h%:sg:`get_current() -> track, seconds`h]h)}(hjSh]hget_current() -> track, seconds}hjUsbah}(h]h]jah]h]h!]uh%hhjQubah}(h]h]h]h]h!]uh%h)hKhj7h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj4h&hh'h]h)Kubh)}(hDevuelve tanto la pista actual como el tiempo de esa pista. Este método funciona cuando la unidad está reproduciendo o en pausa.h]hDevuelve tanto la pista actual como el tiempo de esa pista. Este método funciona cuando la unidad está reproduciendo o en pausa.}hjnsbah}(h]h]h]h]h!]uh%hh'h]h)Khj4h&hubh)}(h[Nota: la pista 0 es la primera pista en el ``CD``. Los números de pista comienzan en cero.h](h+Nota: la pista 0 es la primera pista en el }hj|sbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hj|ubh*. Los números de pista comienzan en cero.}hj|sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj4h&hubh )}(h## CD.get_current ##h]h## CD.get_current ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj4h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhj h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4(get_empty() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_emptyhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(h get_emptyh](jV)}(hjh]h get_empty}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Kubeh}(h]jah](jujveh]h]h!]jzj{j|jnj} CD.get_emptyj~j{CD get_emptyjCD.get_empty()uh%j=h'h]h)Khjh&hubj)}(hhh](hv)}(hhh](hz)}(h&:sl:`False if a cdrom is in the drive`h]h)}(hjh]h False if a cdrom is in the drive}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`get_empty() -> bool`h]h)}(hjh]hget_empty() -> bool}hjsbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hxDevuelve False (falso) si hay un CD-ROM en la unidad actualmente. Si la unidad está vacía devolverá True (verdadero).h]hxDevuelve False (falso) si hay un CD-ROM en la unidad actualmente. Si la unidad está vacía devolverá True (verdadero).}hj)sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh )}(h## CD.get_empty ##h]h## CD.get_empty ##}hj7sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjNjjOjjOjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4,get_numtracks() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_numtrackshNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(h get_numtracksh](jV)}(hjfh]h get_numtracks}hjhsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjdh&hh'h]h)Kubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjdh&hh'h]h)Kubeh}(h]j_ah](jujveh]h]h!]jzj{j|jnj}CD.get_numtracksj~j{CD get_numtracksjCD.get_numtracks()uh%j=h'h]h)Khjah&hubj)}(hhh](hv)}(hhh](hz)}(h':sl:`the number of tracks on the cdrom`h]h)}(hjh]h!the number of tracks on the cdrom}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h:sg:`get_numtracks() -> count`h]h)}(hjh]hget_numtracks() -> count}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hzDevuelve el número de pistas en el CD-ROM de la unidad. Esto devolverá cero si la unidad está vacía o no tiene pistas.h]hzDevuelve el número de pistas en el CD-ROM de la unidad. Esto devolverá cero si la unidad está vacía o no tiene pistas.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## CD.get_numtracks ##h]h## CD.get_numtracks ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjah&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4.get_track_audio() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_track_audiohNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_track_audioh](jV)}(hjh]hget_track_audio}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Mubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Mubeh}(h]jah](jujveh]h]h!]jzj{j|jnj}CD.get_track_audioj~j{CDget_track_audiojCD.get_track_audio()uh%j=h'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h,:sl:`true if the cdrom track has audio data`h]h)}(hj-h]h&true if the cdrom track has audio data}hj/sbah}(h]h]hah]h]h!]uh%hhj+ubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)M ubhz)}(h$:sg:`get_track_audio(track) -> bool`h]h)}(hjDh]hget_track_audio(track) -> bool}hjFsbah}(h]h]jah]h]h!]uh%hhjBubah}(h]h]h]h]h!]uh%h)hKhj(h&hh'h]h)M ubeh}(h]h]h]h]h!]uh%huhj%h&hh'h]h)M ubh)}(hDetermina si una pista en un CD-ROM contiene datos de audio. También podés llamar a ``CD.num_tracks()`` y ``CD.get_all()`` para obtener más información sobre el CD-ROM.h](hVDetermina si una pista en un CD-ROM contiene datos de audio. También podés llamar a }hj_sbh;)}(h``CD.num_tracks()``h]hCD.num_tracks()}hjgsbah}(h]h]h]h]h!]uh%h:hj_ubh y }hj_sbh;)}(h``CD.get_all()``h]h CD.get_all()}hjysbah}(h]h]h]h]h!]uh%h:hj_ubh0 para obtener más información sobre el CD-ROM.}hj_sbeh}(h]h]h]h]h!]uh%hh'h]h)M hj%h&hubh)}(h\Nota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en cero.h](h+Nota: la pista 0 es la primera pista en el }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh+. Los números de pistas comienzan en cero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Mhj%h&hubh )}(h## CD.get_track_audio ##h]h## CD.get_track_audio ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj%h&hh'h]h)Mubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4&get_all() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_allhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_allh](jV)}(hjh]hget_all}hjsbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjh&hh'h]h)Mubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjh&hh'h]h)Mubeh}(h]jah](jujveh]h]h!]jzj{j|jnj} CD.get_allj~j{CDget_allj CD.get_all()uh%j=h'h]h)Mhjh&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`get all track information`h]h)}(hj h]hget all track information}hjsbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubhz)}(h5:sg:`get_all() -> [(audio, start, end, length), ...]`h]h)}(hj#h]h/get_all() -> [(audio, start, end, length), ...]}hj%sbah}(h]h]jah]h]h!]uh%hhj!ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Mubh)}(hXgDevuelve una lista con información para cada pista en el CD-ROM. La información consiste en una tupla con cuatro valores. El valor "audio" es True (verdadero) si la pista contiene data de audio. Los valores de inicio, fin y longitud son números de puntos flotantes en segundos. "Start" (inicio) y "end" (fin) representan tiempos absolutos en todo el disco.h]hXgDevuelve una lista con información para cada pista en el CD-ROM. La información consiste en una tupla con cuatro valores. El valor "audio" es True (verdadero) si la pista contiene data de audio. Los valores de inicio, fin y longitud son números de puntos flotantes en segundos. "Start" (inicio) y "end" (fin) representan tiempos absolutos en todo el disco.}hj>sbah}(h]h]h]h]h!]uh%hh'h]h)Mhjh&hubh )}(h## CD.get_all ##h]h## CD.get_all ##}hjLsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M"ubeh}(h]h]h]h]h!]uh%jhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjcjjdjjdjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4.get_track_start() (método de pygame.cdrom.CD)pygame.cdrom.CD.get_track_starthNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_track_starth](jV)}(hj{h]hget_track_start}hj}sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhjyh&hh'h]h)M$ubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhjyh&hh'h]h)M$ubeh}(h]jtah](jujveh]h]h!]jzj{j|jnj}CD.get_track_startj~j{CDget_track_startjCD.get_track_start()uh%j=h'h]h)M$hjvh&hubj)}(hhh](hv)}(hhh](hz)}(h!:sl:`start time of a cdrom track`h]h)}(hjh]hstart time of a cdrom track}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M&ubhz)}(h':sg:`get_track_start(track) -> seconds`h]h)}(hjh]h!get_track_start(track) -> seconds}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M'ubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)M&ubh)}(hIDevuelve el tiempo absoluto en segundos al inicio de la pista del CD-ROM.h]hIDevuelve el tiempo absoluto en segundos al inicio de la pista del CD-ROM.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M)hjh&hubh)}(hYNota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero.h](h)Nota: la pista 0 es la primera pista del }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh*. Los números de pista comienzan en cero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M+hjh&hubh )}(h## CD.get_track_start ##h]h## CD.get_track_start ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M.ubeh}(h]h]h]h]h!]uh%jhjvh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j4/get_track_length() (método de pygame.cdrom.CD) pygame.cdrom.CD.get_track_lengthhNtauh%hdhjh&hh'Nh)Nubj9)}(hhh](j>)}(hget_track_lengthh](jV)}(hj6h]hget_track_length}hj8sbah}(h]h](jajbeh]h]h!]h#h$uh%jUhj4h&hh'h]h)M0ubjg)}(h()h]h}(h]h]h]h]h!]h#h$uh%jfhj4h&hh'h]h)M0ubeh}(h]j/ah](jujveh]h]h!]jzj{j|jnj}CD.get_track_lengthj~j{CDget_track_lengthjCD.get_track_length()uh%j=h'h]h)M0hj1h&hubj)}(hhh](hv)}(hhh](hz)}(h:sl:`length of a cdrom track`h]h)}(hjbh]hlength of a cdrom track}hjdsbah}(h]h]hah]h]h!]uh%hhj`ubah}(h]h]h]h]h!]uh%h)hKhj]h&hh'h]h)M2ubhz)}(h(:sg:`get_track_length(track) -> seconds`h]h)}(hjyh]h"get_track_length(track) -> seconds}hj{sbah}(h]h]jah]h]h!]uh%hhjwubah}(h]h]h]h]h!]uh%h)hKhj]h&hh'h]h)M3ubeh}(h]h]h]h]h!]uh%huhjZh&hh'h]h)M2ubh)}(hWDevuelve un valor de punto flotante en segundos de la duración de la pista del CD-ROM.h]hWDevuelve un valor de punto flotante en segundos de la duración de la pista del CD-ROM.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)M5hjZh&hubh)}(hYNota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero.h](h)Nota: la pista 0 es la primera pista del }hjsbh;)}(h``CD``h]hCD}hjsbah}(h]h]h]h]h!]uh%h:hjubh*. Los números de pista comienzan en cero.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)M8hjZh&hubh )}(h## CD.get_track_length ##h]h## CD.get_track_length ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjZh&hh'h]h)M;ubeh}(h]h]h]h]h!]uh%jhj1h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhjh'Nh)Nubh )}(h## pygame.cdrom.CD ##h]h## pygame.cdrom.CD ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M=ubeh}(h]h]h]h]h!]uh%jhjih&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]jjjjjjjjj j!j"j#j$uh%j8h&hhh,h'Nh)Nubh )}(h## pygame.cdrom ##h]h## pygame.cdrom ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)M?ubeh}(h](hs pygame-cdromeh]h] pygame.cdromah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj:error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j hhu nametypes}(j hˈuh}(j h,hsh)}(hhh]h}(h]hsah]h]h]h!]ismoduh%hh'h]h)Khh,h&hubhhjh system_message)}(hhh]h)}(h/Inline literal start-string without end-string.h]h/Inline literal start-string without end-string.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]jah]h]h]h!]jalevelKtypeWARNINGlineKsourceh]uh%jhh,h&hh'h]h)Kubjjj6j?j1j6jjjjjgjljHj)}(hhh]h)}(h/Inline literal start-string without end-string.h]h/Inline literal start-string without end-string.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]jHah]h]h]h!]jBalevelKtypejlineKRsourceh]uh%jhjh&hh'h]h)KSubjBj8j_jdj,j1jjjjjjj j! j j j j jg jl j& j+ j j jn js j jjjj_jdjjjjjtjyj/j4u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jHKsRparse_messages](j)}(hhh]h)}(hNo directive entry for "warning" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "warning".h]hNo directive entry for "warning" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "warning".}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypeINFOlineKsourceh(uh%jhh,h&hh'h]h)K ubjjetransform_messages] transformerN include_log]docs/es/referencias/cdrom.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.0171325 pygame-2.6.1/docs/generated/es/doctrees/referencias/color.doctree0000644000175100001770000022131014676242430024476 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.Color`h]h pending_xref)}(hh3h]h literal)}(hh3h]h pygame.Color}hh Color`h]h)}(hhh]hColor(r, g, b) -> Color}hhsbah}(h]h] signatureah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h$:sg:`Color(r, g, b, a=255) -> Color`h]h)}(hhh]hColor(r, g, b, a=255) -> Color}hhsbah}(h]h]hah]h]h!]uh%hhhubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubh)}(h!:sg:`Color(color_value) -> Color`h]h)}(hj h]hColor(color_value) -> Color}hj sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhhh&hh'h]h)K ubeh}(h]h]h]h]h!]uh%hhhh&hh'h]h)K ubh paragraph)}(hXLa clase ``Color`` representa valores de color ``RGBA`` utilizando un rango de valores de 0 a 255 inclusive. Permite realizar operaciones aritméticas básicas, como operaciones binarias ``+``, ``-``, ``*``, ``//``, ``%``, y unaria ``~`` para crear nuevos colores. Admite conversiones a otros espacios de colores como ``HSV`` o ``HSL``, y te permite ajustar canales individuales de color. El valor alfa se establece en 255 (completamente opaco) de forma predeterminada si no se proporciona. Las operaciones aritméticas y método ``correct_gamma()`` conservan las subclases. Para los operadores binarios, la clase de color devuelto es la del objeto de color de la parte izquierda del operador.h](h La clase }hj&sbh;)}(h ``Color``h]hColor}hj.sbah}(h]h]h]h]h!]uh%h:hj&ubh representa valores de color }hj&sbh;)}(h``RGBA``h]hRGBA}hj@sbah}(h]h]h]h]h!]uh%h:hj&ubh utilizando un rango de valores de 0 a 255 inclusive. Permite realizar operaciones aritméticas básicas, como operaciones binarias }hj&sbh;)}(h``+``h]h+}hjRsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``-``h]h-}hjdsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``*``h]h*}hjvsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``//``h]h//}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh, }hj&sbh;)}(h``%``h]h%}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh , y unaria }hj&sbh;)}(h``~``h]h~}hjsbah}(h]h]h]h]h!]uh%h:hj&ubhQ para crear nuevos colores. Admite conversiones a otros espacios de colores como }hj&sbh;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh o }hj&sbh;)}(h``HSL``h]hHSL}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh, y te permite ajustar canales individuales de color. El valor alfa se establece en 255 (completamente opaco) de forma predeterminada si no se proporciona. Las operaciones aritméticas y método }hj&sbh;)}(h``correct_gamma()``h]hcorrect_gamma()}hjsbah}(h]h]h]h]h!]uh%h:hj&ubh conservan las subclases. Para los operadores binarios, la clase de color devuelto es la del objeto de color de la parte izquierda del operador.}hj&sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hLos objetos de color admiten comparación de igualdad con otros objetos de color y tuplas de 3 o 4 elementos de enteros. Hubo un error en pygame 1.8.1 donde el valor alfa predeterminado era 0, no 255 como antes.h]hLos objetos de color admiten comparación de igualdad con otros objetos de color y tuplas de 3 o 4 elementos de enteros. Hubo un error en pygame 1.8.1 donde el valor alfa predeterminado era 0, no 255 como antes.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hX'Los objetos de color exportan la interfaz de array a nivel C. La interfaz exporta un array de bytes no firmados unidimensional de solo lectura con la misma longitud asignada que el color. También se exporta la nueva interfaz del búfer, con la mismas características que la interfaz del array.h]hX'Los objetos de color exportan la interfaz de array a nivel C. La interfaz exporta un array de bytes no firmados unidimensional de solo lectura con la misma longitud asignada que el color. También se exporta la nueva interfaz del búfer, con la mismas características que la interfaz del array.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khhh&hubj%)}(hLos operadores de división entera, ``//``, y módulo, ``%``, no generan una excepción por división por cero. En su lugar, si un canal de color, o alfa, en el color de la parte derecha es 0, entonces el resultado es 1. Por ejemplo: ::h](h$Los operadores de división entera, }hjsbh;)}(h``//``h]h//}hjsbah}(h]h]h]h]h!]uh%h:hjubh , y módulo, }hjsbh;)}(h``%``h]h%}hj0sbah}(h]h]h]h]h!]uh%h:hjubh, no generan una excepción por división por cero. En su lugar, si un canal de color, o alfa, en el color de la parte derecha es 0, entonces el resultado es 1. Por ejemplo:}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)K%hhh&hubh literal_block)}(h# Estas expresiones son True (verdaderas) Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)h]h# Estas expresiones son True (verdaderas) Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)}hjJsbah}(h]h]h]h]h!]h#h$uh%jHh'h]h)K*hhh&hubj%)}(hXUsa ``int(color)`` para obtener el valor entero inmutable del color, que se puede utilizar como clave en un diccionario. Este valor entero difiere de los valores de píxeles mapeados de los métodos :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` y :meth:`pygame.Surface.unmap_rgb`. Se puede pasar como argumento ``color_value`` a :class:`Color` (útil con conjuntos).h](hUsa }hjXsbh;)}(h``int(color)``h]h int(color)}hj`sbah}(h]h]h]h]h!]uh%h:hjXubh para obtener el valor entero inmutable del color, que se puede utilizar como clave en un diccionario. Este valor entero difiere de los valores de píxeles mapeados de los métodos }hjXsbh6)}(h$:meth:`pygame.Surface.get_at_mapped`h]h;)}(hjth]hpygame.Surface.get_at_mapped()}hjvsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjrubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.get_at_mappeduh%h5h'h]h)K.hjXubh, }hjXsbh6)}(h:meth:`pygame.Surface.map_rgb`h]h;)}(hjh]hpygame.Surface.map_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.map_rgbuh%h5h'h]h)K.hjXubh y }hjXsbh6)}(h :meth:`pygame.Surface.unmap_rgb`h]h;)}(hjh]hpygame.Surface.unmap_rgb()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[pygame.Surface.unmap_rgbuh%h5h'h]h)K.hjXubh . Se puede pasar como argumento }hjXsbh;)}(h``color_value``h]h color_value}hjsbah}(h]h]h]h]h!]uh%h:hjXubh a }hjXsbh6)}(h:class:`Color`h]h;)}(hjh]hColor}hjsbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K.hjXubh (útil con conjuntos).}hjXsbeh}(h]h]h]h]h!]uh%j$h'h]h)K.hhh&hubj%)}(hFVer :doc:`color_list` para ejemplos de nombres de colores disponibles.h](hVer }hjsbh6)}(h:doc:`color_list`h]h)}(hj$h]h color_list}hj&sbah}(h]h](hFstdstd-doceh]h]h!]uh%hhj"ubah}(h]h]h]h]h!]refdochS refdomainj0reftypedoc refexplicitrefwarnh[ color_listuh%h5h'h]h)K6hjubh1 para ejemplos de nombres de colores disponibles.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)K6hhh&hubh field_list)}(hhh](h field)}(hhh](h field_name)}(h Parámetrosh]h Parámetros}hjXsbah}(h]h]h]h]h!]uh%jVhjSh'h]h)Kubh field_body)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]j%)}(h9r (int) -- el valor rojo en el rango de 0 a 255 inclusiveh](hliteral_strong)}(hrh]hr}hj{sbah}(h]h]h]h]h!]uh%jyhjuubh (}hjusbh6)}(hhh]hliteral_emphasis)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainpy refexplicitreftypeh reftargetj refspecific py:modulehpy:classh~uh%h5hjuubh)}hjusbh -- }hjusbh.el valor rojo en el rango de 0 a 255 inclusive}(hjuh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjrubah}(h]h]h]h]h!]uh%jphjmubjq)}(hhh]j%)}(h:g (int) -- el valor verde en el rango de 0 a 255 inclusiveh](jz)}(hgh]hg}hjsbah}(h]h]h]h]h!]uh%jyhjubh (}hjsbh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubh)}hjsbh -- }hjsbh/el valor verde en el rango de 0 a 255 inclusive}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]uh%jphjmubjq)}(hhh]j%)}(h9b (int) -- el color azul en el rango de 0 a 255 inclusiveh](jz)}(hbh]hb}hjsbah}(h]h]h]h]h!]uh%jyhjubh (}hjsbh6)}(hhh]j)}(hinth]hint}hj.sbah}(h]h]h]h]h!]uh%jhj+ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj0jjhjh~uh%h5hjubh)}hjsbh -- }hjsbh.el color azul en el rango de 0 a 255 inclusive}(hjh&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]uh%jphjmubjq)}(hhh]j%)}(hXa (int) -- (opcional) valor alfa en el rango de 0 a 255 inclusive, predeterminado es 255h](jz)}(hah]ha}hjesbah}(h]h]h]h]h!]uh%jyhjaubh (}hjasbh6)}(hhh]j)}(hinth]hint}hjzsbah}(h]h]h]h]h!]uh%jhjwubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj|jjhjh~uh%h5hjaubh)}hjasbh -- }hjasbhM(opcional) valor alfa en el rango de 0 a 255 inclusive, predeterminado es 255}(hjah&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hj^ubah}(h]h]h]h]h!]uh%jphjmubjq)}(hhh]j%)}(hXncolor_value (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int])) -- valor del color (ver nota abajo para los formatos admitidos)/home/runner/work/pygame/pygame/docs/es/referencias/color.rst:45: (INFO/1) No directive entry for "note" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "note".Formatos de color_value admitidos: - Objeto Color: clona el objeto de clase Color - Nombre de color: str: nombre del color a utilizar, por ejemplo 'red' (todos los nombres admitidos se pueden encontrar en color_list, con muestras de ejemplo) - Formato de color HTML str: '#rrggbbaa' o '#rrggbb', donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona - Número hexadecimal str: '0xrrggbbaa' o '0xrrggbb', donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona. - int: valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, 0xrrggbbaa, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado. - tupla/lista de valores enteros de color: (R, G, B, A) o (R, G, B), donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona.h](jz)}(h color_valueh]h color_value}hjsbah}(h]h]h]h]h!]uh%jyhjubh (}hjsbh6)}(hhh]j)}(hColorh]hColor}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hstrh]hstr}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h or h]h or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h or h]h or }hj0sbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(htupleh]htuple}hjAsbah}(h]h]h]h]h!]uh%jhj>ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjCjjhjh~uh%h5hjubj)}(h(h]h(}hjYsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjjsbah}(h]h]h]h]h!]uh%jhjgubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjljjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h[h]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h]h]h]}hj sbah}(h]h]h]h]h!]uh%jhjubj)}(h) or h]h) or }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hlisth]hlist}hj*sbah}(h]h]h]h]h!]uh%jhj'ubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj,jjhjh~uh%h5hjubj)}(hj[h]h(}hjBsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjRsbah}(h]h]h]h]h!]uh%jhjOubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjTjjhjh~uh%h5hjubj)}(h, h]h, }hjjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hj{sbah}(h]h]h]h]h!]uh%jhjxubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetj}jjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(h, h]h, }hjsbah}(h]h]h]h]h!]uh%jhjubj)}(hjh]h[}hjsbah}(h]h]h]h]h!]uh%jhjubh6)}(hhh]j)}(hinth]hint}hjsbah}(h]h]h]h]h!]uh%jhjubah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetjjjhjh~uh%h5hjubj)}(hj h]h]}hjsbah}(h]h]h]h]h!]uh%jhjubj)}(h)h]h)}hjsbah}(h]h]h]h]h!]uh%jhjubh)}hjsbh -- }hjsbj%)}(hsbah}(h]h]h]h]h!]uh%h:hj6ubh admitidos:}hj6sbeh}(h]h]h]h]h!]uh%j4h'h]h)K@hj0ubh definition)}(hhh]h)}(hhh](h)}(h;- **Objeto Color:** clona el objeto de clase :class:`Color`h](h- }hj^sbh strong)}(h**Objeto Color:**h]h Objeto Color:}hjhsbah}(h]h]h]h]h!]uh%jfhj^ubh clona el objeto de clase }hj^sbh6)}(h:class:`Color`h]h;)}(hj|h]hColor}hj~sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjzubah}(h]h]h]h]h!]refdochS refdomainjreftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)KAhj^ubeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubh)}(h- **Nombre de color: str:** nombre del color a utilizar, por ejemplo ``'red'`` (todos los nombres admitidos se pueden encontrar en :doc:`color_list`, con muestras de ejemplo)h](h- }hjsbjg)}(h**Nombre de color: str:**h]hNombre de color: str:}hjsbah}(h]h]h]h]h!]uh%jfhjubh* nombre del color a utilizar, por ejemplo }hjsbh;)}(h ``'red'``h]h'red'}hjsbah}(h]h]h]h]h!]uh%h:hjubh5 (todos los nombres admitidos se pueden encontrar en }hjsbh6)}(h:doc:`color_list`h]h)}(hjh]h color_list}hjsbah}(h]h](hFstdstd-doceh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdochS refdomainjreftypedoc refexplicitrefwarnh[ color_listuh%h5h'h]h)KBhjubh, con muestras de ejemplo)}hjsbeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubh)}(h- **Formato de color HTML str:** ``'#rrggbbaa'`` o ``'#rrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporcionah](h- }hjsbjg)}(h**Formato de color HTML str:**h]hFormato de color HTML str:}hjsbah}(h]h]h]h]h!]uh%jfhjubh }hjsbh;)}(h``'#rrggbbaa'``h]h '#rrggbbaa'}hjsbah}(h]h]h]h]h!]uh%h:hjubh o }hjsbh;)}(h ``'#rrggbb'``h]h '#rrggbb'}hj"sbah}(h]h]h]h]h!]uh%h:hjubh, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona}hjsbeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubh)}(h- **Número hexadecimal str:** ``'0xrrggbbaa'`` o ``'0xrrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona.h](h- }hj:sbjg)}(h**Número hexadecimal str:**h]hNúmero hexadecimal str:}hjBsbah}(h]h]h]h]h!]uh%jfhj:ubh }hj:sbh;)}(h``'0xrrggbbaa'``h]h '0xrrggbbaa'}hjTsbah}(h]h]h]h]h!]uh%h:hj:ubh o }hj:sbh;)}(h``'0xrrggbb'``h]h '0xrrggbb'}hjfsbah}(h]h]h]h]h!]uh%h:hj:ubh, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona.}hj:sbeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubh)}(hX\- **int:** valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, ``0xrrggbbaa``, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado.h](h- }hj~sbjg)}(h**int:**h]hint:}hjsbah}(h]h]h]h]h!]uh%jfhj~ubh valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, }hj~sbh;)}(h``0xrrggbbaa``h]h 0xrrggbbaa}hjsbah}(h]h]h]h]h!]uh%h:hj~ubh, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado.}hj~sbeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubh)}(h- **tupla/lista de valores enteros de color:** ``(R, G, B, A)`` o ``(R, G, B)``, donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona.h](h- }hjsbjg)}(h,**tupla/lista de valores enteros de color:**h]h(tupla/lista de valores enteros de color:}hjsbah}(h]h]h]h]h!]uh%jfhjubh }hjsbh;)}(h``(R, G, B, A)``h]h (R, G, B, A)}hjsbah}(h]h]h]h]h!]uh%h:hjubh o }hjsbh;)}(h ``(R, G, B)``h]h (R, G, B)}hjsbah}(h]h]h]h]h!]uh%h:hjubh, donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona.}hjsbeh}(h]h]h]h]h!]uh%h)hKhj[h'h]h)Kubeh}(h]h]h]h]h!]uh%hhjXubah}(h]h]h]h]h!]uh%jVh'h]h)KAhj0ubeh}(h]h]h]h]h!]uh%j.h'h]h)K@hj+ubah}(h]h]h]h]h!]uh%j)h'h]h)K@hj%ubah}(h]h]h]h]h!]uh%j#h'h]h)K?hjh&hubeh}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]uh%jphjmubeh}(h]h]h]h]h!]uh%jkhjhubah}(h]h]h]h]h!]uh%jfhjSubeh}(h]h]h]h]h!]uh%jQhjNubjR)}(hhh](jW)}(hDevuelveh]hDevuelve}hj3 sbah}(h]h]h]h]h!]uh%jVhj0 h'h]h)Kubjg)}(hhh]j%)}(ha newly created Color objecth](ha newly created }(hjD h&hh'Nh)Nubh6)}(h:class:`Color`h]h;)}(hjN h]hColor}hjP sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hjL ubah}(h]h]h]h]h!]refdochS refdomainjZ reftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K[hjD h&hubh object}(hjD h&hh'Nh)Nubeh}(h]h]h]h]h!]uh%j$hjA ubah}(h]h]h]h]h!]uh%jfhj0 ubeh}(h]h]h]h]h!]uh%jQhjNubjR)}(hhh](jW)}(hTipo del valor devueltoh]hTipo del valor devuelto}hj sbah}(h]h]h]h]h!]uh%jVhj h'h]h)Kubjg)}(hhh]j%)}(hColorh]h6)}(hhh]hColor}hj sbah}(h]h]h]h]h!] refdomainj refexplicitreftypeh reftargetColorjjhjh~uh%h5hj ubah}(h]h]h]h]h!]uh%j$hj ubah}(h]h]h]h]h!]uh%jfhj ubeh}(h]h]h]h]h!]uh%jQhjNubeh}(h]h]h]h]h!]uh%jLhhh&hh'Nh)Nubhversionmodified)}(h\Changed in pygame 2.0.0: Soporte para tuplas, listas y objetos Color al crear objetos Color.h]j%)}(h\Changed in pygame 2.0.0: Soporte para tuplas, listas y objetos Color al crear objetos Color.h](h)}(hChanged in pygame 2.0.0: h]hChanged in pygame 2.0.0: }hj sbah}(h]h](j changedeh]h]h!]uh%hhj h&hh'h]h)K`ubh&Soporte para tuplas, listas y objetos }(hj h&hh'Nh)Nubh6)}(h:class:`Color`h]h;)}(hj h]hColor}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K_hj h&hubh al crear objetos }(hj h&hh'Nh)Nubh6)}(h:class:`Color`h]h;)}(hj h]hColor}hj sbah}(h]h](hFpypy-classeh]h]h!]uh%h:hj ubah}(h]h]h]h]h!]refdochS refdomainj reftypeclass refexplicitrefwarnhYhhZh~h[Coloruh%h5h'h]h)K_hj h&hubh.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hj h&hh'h]h)K`ubah}(h]h]h]h]h!]typeversionchangedversion2.0.0uh%j h&hh'h]h)K^hhubj )}(hJChanged in pygame 1.9.2: Color objects export the C level array interface.h]j%)}(hJChanged in pygame 1.9.2: Color objects export the C level array interface.h](h)}(hChanged in pygame 1.9.2: h]hChanged in pygame 1.9.2: }hjB sbah}(h]h](j j eh]h]h!]uh%hhj> h&hh'h]h)Kaubh1Color objects export the C level array interface.}(hj> h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hj: h&hh'h]h)Kaubah}(h]h]h]h]h!]j6 versionchangedj8 1.9.2uh%j h&hh'h]h)Kahhubj )}(hLChanged in pygame 1.9.0: Color objects support 4-element tuples of integers.h]j%)}(hLChanged in pygame 1.9.0: Color objects support 4-element tuples of integers.h](h)}(hChanged in pygame 1.9.0: h]hChanged in pygame 1.9.0: }hjk sbah}(h]h](j j eh]h]h!]uh%hhjg h&hh'h]h)Kbubh3Color objects support 4-element tuples of integers.}(hjg h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hjc h&hh'h]h)Kbubah}(h]h]h]h]h!]j6 versionchangedj8 1.9.0uh%j h&hh'h]h)Kbhhubj )}(h9Changed in pygame 1.8.1: New implementation of the class.h]j%)}(h9Changed in pygame 1.8.1: New implementation of the class.h](h)}(hChanged in pygame 1.8.1: h]hChanged in pygame 1.8.1: }hj sbah}(h]h](j j eh]h]h!]uh%hhj h&hh'h]h)Kdubh New implementation of the class.}(hj h&hh'Nh)Nubeh}(h]h]h]h]h!] translatableuh%j$hj h&hh'h]h)Kdubah}(h]h]h]h]h!]j6 versionchangedj8 1.8.1uh%j h&hh'h]h)Kchhubhe)}(hhh]h}(h]h]h]h]h!]entries](hqr (atributo de pygame.Color)pygame.Color.rhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hj}h]h)}(hj}h]hr}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Keubah}(h]j ah](hheh]h]h!]hhhh~hColor.rhhColorj}hj uh%hzh'h]h)Kehj h&hubh)}(hhh](h)}(hhh](h)}(h.:sl:`Gets or sets the red value of the Color.`h]h)}(hj h]h(Gets or sets the red value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kgubh)}(h:sg:`r -> int`h]h)}(hj h]hr -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Khubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kgubj%)}(hEl valor rojo del color.h]hEl valor rojo del color.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Kjhj h&hubh )}(h ## Color.r ##h]h ## Color.r ##}hj' sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Klubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]domainj> objtypej? desctypej? no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqg (atributo de pygame.Color)pygame.Color.ghNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hjh]h)}(hjh]hg}hja sbah}(h]h](hheh]h]h!]h#h$uh%hhj^ h&hh'h]h)Knubah}(h]jY ah](hheh]h]h!]hhhh~hColor.ghhColorjhjt uh%hzh'h]h)Knhj[ h&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`Gets or sets the green value of the Color.`h]h)}(hj h]h*Gets or sets the green value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj} ubah}(h]h]h]h]h!]uh%h)hKhjz h&hh'h]h)Kpubh)}(h:sg:`g -> int`h]h)}(hj h]hg -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhjz h&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%hhjw h&hh'h]h)Kpubj%)}(hEl valor verde del color.h]hEl valor verde del color.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Kshjw h&hubh )}(h ## Color.g ##h]h ## Color.g ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjw h&hh'h]h)Kuubeh}(h]h]h]h]h!]uh%hhj[ h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC j jD j jE j jF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqb (atributo de pygame.Color)pygame.Color.bhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hjh]h)}(hjh]hb}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kwubah}(h]j ah](hheh]h]h!]hhhh~hColor.bhhColorjhj uh%hzh'h]h)Kwhj h&hubh)}(hhh](h)}(hhh](h)}(h/:sl:`Gets or sets the blue value of the Color.`h]h)}(hj h]h)Gets or sets the blue value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kyubh)}(h:sg:`b -> int`h]h)}(hj$ h]hb -> int}hj& sbah}(h]h]hah]h]h!]uh%hhj" ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kzubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kyubj%)}(hEl valor azul del color.h]hEl valor azul del color.}hj? sbah}(h]h]h]h]h!]uh%j$h'h]h)K|hj h&hubh )}(h ## Color.b ##h]h ## Color.b ##}hjM sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)K~ubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC jd jD je jE je jF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqa (atributo de pygame.Color)pygame.Color.ahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hjgh]h)}(hjgh]ha}hj} sbah}(h]h](hheh]h]h!]h#h$uh%hhjz h&hh'h]h)Kubah}(h]ju ah](hheh]h]h!]hhhh~hColor.ahhColorjghj uh%hzh'h]h)Khjw h&hubh)}(hhh](h)}(hhh](h)}(h0:sl:`Gets or sets the alpha value of the Color.`h]h)}(hj h]h*Gets or sets the alpha value of the Color.}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubh)}(h:sg:`a -> int`h]h)}(hj h]ha -> int}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'h]h)Kubj%)}(hEl valor alfa del color.h]hEl valor alfa del color.}hj sbah}(h]h]h]h]h!]uh%j$h'h]h)Khj h&hubh )}(h ## Color.a ##h]h ## Color.a ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjw h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC j jD j jE j jF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqcmy (atributo de pygame.Color)pygame.Color.cmyhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hcmyh]h)}(hj h]hcmy}hj sbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubah}(h]j ah](hheh]h]h!]hhhh~h Color.cmyhhColorcmyhj uh%hzh'h]h)Khj h&hubh)}(hhh](h)}(hhh](h)}(h7:sl:`Gets or sets the CMY representation of the Color.`h]h)}(hj+ h]h1Gets or sets the CMY representation of the Color.}hj- sbah}(h]h]hah]h]h!]uh%hhj) ubah}(h]h]h]h]h!]uh%h)hKhj& h&hh'h]h)Kubh)}(h:sg:`cmy -> tuple`h]h)}(hjB h]h cmy -> tuple}hjD sbah}(h]h]hah]h]h!]uh%hhj@ ubah}(h]h]h]h]h!]uh%h)hKhj& h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj# h&hh'h]h)Kubj%)}(hXLa representación ``CMY`` del color. Los componentes ``CMY`` están en los rangos ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Tené en cuenta que estos no devolverá los valores ``CMY`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``CMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY`` difieran ligeramente de lo que podrías esperar.h](hLa representación }hj] sbh;)}(h``CMY``h]hCMY}hje sbah}(h]h]h]h]h!]uh%h:hj] ubh del color. Los componentes }hj] sbh;)}(h``CMY``h]hCMY}hjw sbah}(h]h]h]h]h!]uh%h:hj] ubh están en los rangos }hj] sbh;)}(h``C``h]hC}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh = [0, 1], }hj] sbh;)}(h``M``h]hM}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh = [0, 1], }hj] sbh;)}(h``Y``h]hY}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh? = [0, 1]. Tené en cuenta que estos no devolverá los valores }hj] sbh;)}(h``CMY``h]hCMY}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh exactos para los valores }hj] sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh= establecidos en todos los casos. Debido a la asignación de }hj] sbh;)}(h``RGB``h]hRGB}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh de 0-255 y la asignación de }hj] sbh;)}(hK``CMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY``h]hGCMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY}hj sbah}(h]h]h]h]h!]uh%h:hj] ubh1 difieran ligeramente de lo que podrías esperar.}hj] sbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj# h&hubh )}(h## Color.cmy ##h]h## Color.cmy ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hj# h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC j$jD j%jE j%jF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqhsva (atributo de pygame.Color)pygame.Color.hsvahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hhsvah]h)}(hj<h]hhsva}hj>sbah}(h]h](hheh]h]h!]h#h$uh%hhj:h&hh'h]h)Kubah}(h]j5ah](hheh]h]h!]hhhh~h Color.hsvahhColorhsvahjQuh%hzh'h]h)Khj7h&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`Gets or sets the HSVA representation of the Color.`h]h)}(hj]h]h2Gets or sets the HSVA representation of the Color.}hj_sbah}(h]h]hah]h]h!]uh%hhj[ubah}(h]h]h]h]h!]uh%h)hKhjXh&hh'h]h)Kubh)}(h:sg:`hsva -> tuple`h]h)}(hjth]h hsva -> tuple}hjvsbah}(h]h]hah]h]h!]uh%hhjrubah}(h]h]h]h]h!]uh%h)hKhjXh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjUh&hh'h]h)Kubj%)}(hXLa representación ``HSVA`` del color. Los componentes ``HSVA`` están en los rangos ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Tené en cuenta que esto devolverá los valores ``HSV`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSV`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSV`` difieran ligeramente de lo que podrías esperar.h](hLa representación }hjsbh;)}(h``HSVA``h]hHSVA}hjsbah}(h]h]h]h]h!]uh%h:hjubh del color. Los componentes }hjsbh;)}(h``HSVA``h]hHSVA}hjsbah}(h]h]h]h]h!]uh%h:hjubh están en los rangos }hjsbh;)}(h``H``h]hH}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 360], }hjsbh;)}(h``S``h]hS}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 100], }hjsbh;)}(h``V``h]hV}hjsbah}(h]h]h]h]h!]uh%h:hjubhK = [0, 100], A = [0, 100]. Tené en cuenta que esto devolverá los valores }hjsbh;)}(h``HSV``h]hHSV}hjsbah}(h]h]h]h]h!]uh%h:hjubh exactos para los valores }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh= establecidos en todos los casos. Debido a la asignación de }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh de 0-255 y la asignación de }hjsbh;)}(h``HSV``h]hHSV}hj'sbah}(h]h]h]h]h!]uh%h:hjubhH de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores }hjsbh;)}(h``HSV``h]hHSV}hj9sbah}(h]h]h]h]h!]uh%h:hjubh1 difieran ligeramente de lo que podrías esperar.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)KhjUh&hubh )}(h## Color.hsva ##h]h## Color.hsva ##}hjQsbah}(h]h]h]h]h!]h#h$uh%h hjUh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj7h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC jhjD jijE jijF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hqhsla (atributo de pygame.Color)pygame.Color.hslahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hhslah]h)}(hjh]hhsla}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj~h&hh'h]h)Kubah}(h]jyah](hheh]h]h!]hhhh~h Color.hslahhColorhslahjuh%hzh'h]h)Khj{h&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`Gets or sets the HSLA representation of the Color.`h]h)}(hjh]h2Gets or sets the HSLA representation of the Color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`hsla -> tuple`h]h)}(hjh]h hsla -> tuple}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hXLa representación ``HSLA`` del color. Los componentes ``HSLA`` están en rangos ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Tené en cuenta que esto no devolverá los valores ``HSL`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSL`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSL`` difieran ligeramente de lo que podrías esperar.h](hLa representación }hjsbh;)}(h``HSLA``h]hHSLA}hjsbah}(h]h]h]h]h!]uh%h:hjubh del color. Los componentes }hjsbh;)}(h``HSLA``h]hHSLA}hjsbah}(h]h]h]h]h!]uh%h:hjubh están en rangos }hjsbh;)}(h``H``h]hH}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 360], }hjsbh;)}(h``S``h]hS}hjsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 100], }hjsbh;)}(h``L``h]hL}hj#sbah}(h]h]h]h]h!]uh%h:hjubhN = [0, 100], A = [0, 100]. Tené en cuenta que esto no devolverá los valores }hjsbh;)}(h``HSL``h]hHSL}hj5sbah}(h]h]h]h]h!]uh%h:hjubh exactos para los valores }hjsbh;)}(h``RGB``h]hRGB}hjGsbah}(h]h]h]h]h!]uh%h:hjubh= establecidos en todos los casos. Debido a la asignación de }hjsbh;)}(h``RGB``h]hRGB}hjYsbah}(h]h]h]h]h!]uh%h:hjubh de 0-255 y la asignación de }hjsbh;)}(h``HSL``h]hHSL}hjksbah}(h]h]h]h]h!]uh%h:hjubhH de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores }hjsbh;)}(h``HSL``h]hHSL}hj}sbah}(h]h]h]h]h!]uh%h:hjubh1 difieran ligeramente de lo que podrías esperar.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.hsla ##h]h## Color.hsla ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj{h&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq!i1i2i3 (atributo de pygame.Color)pygame.Color.i1i2i3hNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hi1i2i3h]h)}(hjh]hi1i2i3}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubah}(h]jah](hheh]h]h!]hhhh~h Color.i1i2i3hhColori1i2i3hjuh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h::sl:`Gets or sets the I1I2I3 representation of the Color.`h]h)}(hjh]h4Gets or sets the I1I2I3 representation of the Color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`i1i2i3 -> tuple`h]h)}(hjh]hi1i2i3 -> tuple}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hXLa representación ``I1I2I3`` del color. Los componentes ``I1I2I3`` están en los rangos ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Tené en cuenta que esto no devolverá los valores ``I1I2I3`` exactos para los valores ``RGB`` establecidos en todos los cosas. Debido a la asignación de ``RGB`` de 0-255 y la asignación ``I1I2I3`` de 0-1, los errores de redondeo pueden hacer que los valores ``I1I2I3``difieran ligeramente de lo que podrías esperar.h](hLa representación }hjsbh;)}(h ``I1I2I3``h]hI1I2I3}hjsbah}(h]h]h]h]h!]uh%h:hjubh del color. Los componentes }hjsbh;)}(h ``I1I2I3``h]hI1I2I3}hj1sbah}(h]h]h]h]h!]uh%h:hjubh están en los rangos }hjsbh;)}(h``I1``h]hI1}hjCsbah}(h]h]h]h]h!]uh%h:hjubh = [0, 1], }hjsbh;)}(h``I2``h]hI2}hjUsbah}(h]h]h]h]h!]uh%h:hjubh = [-0.5, 0.5], }hjsbh;)}(h``I3``h]hI3}hjgsbah}(h]h]h]h]h!]uh%h:hjubhC = [-0.5, 0.5]. Tené en cuenta que esto no devolverá los valores }hjsbh;)}(h ``I1I2I3``h]hI1I2I3}hjysbah}(h]h]h]h]h!]uh%h:hjubh exactos para los valores }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh= establecidos en todos los cosas. Debido a la asignación de }hjsbh;)}(h``RGB``h]hRGB}hjsbah}(h]h]h]h]h!]uh%h:hjubh de 0-255 y la asignación }hjsbh;)}(h ``I1I2I3``h]hI1I2I3}hjsbah}(h]h]h]h]h!]uh%h:hjubh> de 0-1, los errores de redondeo pueden hacer que los valores }hjsbh problematic)}(h``h]h``}hjsbah}(h]id2ah]h]h]h!]refidid1uh%jhjubh8I1I2I3``difieran ligeramente de lo que podrías esperar.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.i1i2i3 ##h]h## Color.i1i2i3 ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](py attributeeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%normalize() (método de pygame.Color)pygame.Color.normalizehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h normalizeh](h)}(hj h]h normalize}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhj h&hh'h]h)Kubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj h&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.normalizehhColor normalizehColor.normalize()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h6:sl:`Returns the normalized RGBA values of the Color.`h]h)}(hj;h]h0Returns the normalized RGBA values of the Color.}hj=sbah}(h]h]hah]h]h!]uh%hhj9ubah}(h]h]h]h]h!]uh%h)hKhj6h&hh'h]h)Kubh)}(h:sg:`normalize() -> tuple`h]h)}(hjRh]hnormalize() -> tuple}hjTsbah}(h]h]hah]h]h!]uh%hhjPubah}(h]h]h]h]h!]uh%h)hKhj6h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhj3h&hh'h]h)Kubj%)}(hGDevuelve los valores ``RGBA`` del color como valores de punto flotante.h](hDevuelve los valores }hjmsbh;)}(h``RGBA``h]hRGBA}hjusbah}(h]h]h]h]h!]uh%h:hjmubh* del color como valores de punto flotante.}hjmsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khj3h&hubh )}(h## Color.normalize ##h]h## Color.normalize ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hj3h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq)correct_gamma() (método de pygame.Color)pygame.Color.correct_gammahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h correct_gammah](h)}(hjh]h correct_gamma}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.correct_gammahhColor correct_gammahColor.correct_gamma()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h1:sl:`Applies a certain gamma value to the Color.`h]h)}(hjh]h+Applies a certain gamma value to the Color.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h$:sg:`correct_gamma (gamma) -> Color`h]h)}(hjh]hcorrect_gamma (gamma) -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hfAplica un cierto valor de gamma al color y devuelve un nuevo color con los valores ``RGBA`` ajustados.h](hSAplica un cierto valor de gamma al color y devuelve un nuevo color con los valores }hjsbh;)}(h``RGBA``h]hRGBA}hj"sbah}(h]h]h]h]h!]uh%h:hjubh ajustados.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.correct_gamma ##h]h## Color.correct_gamma ##}hj:sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jQjD jRjE jRjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq&set_length() (método de pygame.Color)pygame.Color.set_lengthhNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h set_lengthh](h)}(hjih]h set_length}hjksbah}(h]h](hheh]h]h!]h#h$uh%hhjgh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjgh&hh'h]h)Kubeh}(h]jbah](hheh]h]h!]hhhh~hColor.set_lengthhhColor set_lengthhColor.set_length()uh%hzh'h]h)Khjdh&hubh)}(hhh](h)}(hhh](h)}(h=:sl:`Set the number of elements in the Color to 1,2,3, or 4.`h]h)}(hjh]h7Set the number of elements in the Color to 1,2,3, or 4.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`set_length(len) -> None`h]h)}(hjh]hset_length(len) -> None}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hDEPRECATED: Puedes desempaquetar los valores que necesitas de la siguiente manera: ``r, g, b, _ = pygame.Color(100, 100, 100)`` si solo deseas r, g and b o ``r, g, *_ = pygame.Color(100, 100, 100)`` si solo deseas r y gh](hSDEPRECATED: Puedes desempaquetar los valores que necesitas de la siguiente manera: }hjsbh;)}(h,``r, g, b, _ = pygame.Color(100, 100, 100)``h]h(r, g, b, _ = pygame.Color(100, 100, 100)}hjsbah}(h]h]h]h]h!]uh%h:hjubh si solo deseas r, g and b o }hjsbh;)}(h*``r, g, *_ = pygame.Color(100, 100, 100)``h]h&r, g, *_ = pygame.Color(100, 100, 100)}hjsbah}(h]h]h]h]h!]uh%h:hjubh si solo deseas r y g}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubj%)}(hLa longitud predeterminada de un color es 4. Los colores pueden tener longitudes 1, 2, 3 o 4. Esto es útil si querés desempaquetar a r,g,b,a. Si querés obtener la longitud de un color, usa ``len(acolor)``.h](hLa longitud predeterminada de un color es 4. Los colores pueden tener longitudes 1, 2, 3 o 4. Esto es útil si querés desempaquetar a r,g,b,a. Si querés obtener la longitud de un color, usa }hjsbh;)}(h``len(acolor)``h]h len(acolor)}hjsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubj )}(hDeprecated since pygame 2.1.3.h]j%)}(hDeprecated since pygame 2.1.3.h]h)}(hDeprecated since pygame 2.1.3.h]hDeprecated since pygame 2.1.3.}hj!sbah}(h]h](j deprecatedeh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Kubah}(h]h]h]h]h!]j6 deprecatedj8 2.1.3uh%j h&hh'h]h)Khjubj )}(hNew in pygame 1.9.0.h]j%)}(hNew in pygame 1.9.0.h]h)}(hNew in pygame 1.9.0.h]hNew in pygame 1.9.0.}hjGsbah}(h]h](j addedeh]h]h!]uh%hhjCubah}(h]h]h]h]h!] translatableuh%j$hj?h&hh'h]h)Kubah}(h]h]h]h]h!]j6 versionaddedj8 1.9.0uh%j h&hh'h]h)Khjubh )}(h## Color.set_length ##h]h## Color.set_length ##}hjesbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjdh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC j|jD j}jE j}jF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq%grayscale() (método de pygame.Color)pygame.Color.grayscalehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h grayscaleh](h)}(hjh]h grayscale}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Kubeh}(h]jah](hheh]h]h!]hhhh~hColor.grayscalehhColor grayscalehColor.grayscale()uh%hzh'h]h)Khjh&hubh)}(hhh](h)}(hhh](h)}(h&:sl:`returns the grayscale of a Color`h]h)}(hjh]h returns the grayscale of a Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubh)}(h:sg:`grayscale() -> Color`h]h)}(hjh]hgrayscale() -> Color}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Kubj%)}(hDevuelve un color que representa la versión en escala de grises de sí mismo utilizando la fórmula de luminosidad que pondera el rojo, verde y azul según sus longitudes de onda.h]hDevuelve un color que representa la versión en escala de grises de sí mismo utilizando la fórmula de luminosidad que pondera el rojo, verde y azul según sus longitudes de onda.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)Khjh&hubh )}(h## Color.grayscale ##h]h## Color.grayscale ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq lerp() (método de pygame.Color)pygame.Color.lerphNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hlerph](h)}(hj/h]hlerp}hj1sbah}(h]h](hheh]h]h!]h#h$uh%hhj-h&hh'h]h)Kubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhj-h&hh'h]h)Kubeh}(h]j(ah](hheh]h]h!]hhhh~h Color.lerphhColorlerph Color.lerp()uh%hzh'h]h)Khj*h&hubh)}(hhh](h)}(hhh](h)}(h8:sl:`returns a linear interpolation to the given Color.`h]h)}(hj[h]h2returns a linear interpolation to the given Color.}hj]sbah}(h]h]hah]h]h!]uh%hhjYubah}(h]h]h]h]h!]uh%h)hKhjVh&hh'h]h)Kubh)}(h!:sg:`lerp(Color, float) -> Color`h]h)}(hjrh]hlerp(Color, float) -> Color}hjtsbah}(h]h]hah]h]h!]uh%hhjpubah}(h]h]h]h]h!]uh%h)hKhjVh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%hhjSh&hh'h]h)Kubj%)}(hXPDevuelve un color que es una interpolación entre sí mismo y el color dado en el espacio RGBA. El segundo parámetro determina qué tan lejos estará el resultado entre sí mismo y el otro color. Debe ser un valor entre 0 y 1, donde 0 significa que devolverá el color inicial, el de sí mismo, y 1 significa que devolverá otro color.h]hXPDevuelve un color que es una interpolación entre sí mismo y el color dado en el espacio RGBA. El segundo parámetro determina qué tan lejos estará el resultado entre sí mismo y el otro color. Debe ser un valor entre 0 y 1, donde 0 significa que devolverá el color inicial, el de sí mismo, y 1 significa que devolverá otro color.}hjsbah}(h]h]h]h]h!]uh%j$h'h]h)MhjSh&hubj )}(hNew in pygame 2.0.1.h]j%)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjsbah}(h]h](j jReh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Mubah}(h]h]h]h]h!]j6 versionaddedj8 2.0.1uh%j h&hh'h]h)MhjSubh )}(h## Color.lerp ##h]h## Color.lerp ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjSh&hh'h]h)M ubeh}(h]h]h]h]h!]uh%hhj*h&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq(premul_alpha() (método de pygame.Color)pygame.Color.premul_alphahNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(h premul_alphah](h)}(hjh]h premul_alpha}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)M ubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)M ubeh}(h]jah](hheh]h]h!]hhhh~hColor.premul_alphahhColor premul_alphahColor.premul_alpha()uh%hzh'h]h)M hjh&hubh)}(hhh](h)}(hhh](h)}(hS:sl:`returns a Color where the r,g,b components have been multiplied by the alpha.`h]h)}(hjh]hMreturns a Color where the r,g,b components have been multiplied by the alpha.}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubh)}(h:sg:`premul_alpha() -> Color`h]h)}(hj2h]hpremul_alpha() -> Color}hj4sbah}(h]h]hah]h]h!]uh%hhj0ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)M ubj%)}(hDevuelve un nuevo color en el que cada uno de los canales de rojo, verde y azul ha sido multiplicado por el canal alfa del color original. El canal alfa permanece sin cambios.h]hDevuelve un nuevo color en el que cada uno de los canales de rojo, verde y azul ha sido multiplicado por el canal alfa del color original. El canal alfa permanece sin cambios.}hjMsbah}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubj%)}(hEsto es útil cuando se traba con la bandera de modo ``BLEND_PREMULTIPLIED`` de mezcla para :meth:`pygame.Surface.blit()`, que asume que todas las superficies que lo utilizan están utilizando colores con alfa pre-multiplicado.h](h5Esto es útil cuando se traba con la bandera de modo }hj[sbh;)}(h``BLEND_PREMULTIPLIED``h]hBLEND_PREMULTIPLIED}hjcsbah}(h]h]h]h]h!]uh%h:hj[ubh de mezcla para }hj[sbh6)}(h:meth:`pygame.Surface.blit()`h]h;)}(hjwh]hpygame.Surface.blit()}hjysbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjuubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h["pygame.Surface.blituh%h5h'h]h)Mhj[ubhj, que asume que todas las superficies que lo utilizan están utilizando colores con alfa pre-multiplicado.}hj[sbeh}(h]h]h]h]h!]uh%j$h'h]h)Mhjh&hubj )}(hNew in pygame 2.0.0.h]j%)}(hNew in pygame 2.0.0.h]h)}(hNew in pygame 2.0.0.h]hNew in pygame 2.0.0.}hjsbah}(h]h](j jReh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)Mubah}(h]h]h]h]h!]j6 versionaddedj8 2.0.0uh%j h&hh'h]h)Mhjubh )}(h## Color.premul_alpha ##h]h## Color.premul_alpha ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](hq"update() (método de pygame.Color)pygame.Color.updatehNtauh%hdhhh&hh'Nh)Nubhv)}(hhh](h{)}(hupdateh](h)}(hjh]hupdate}hjsbah}(h]h](hheh]h]h!]h#h$uh%hhjh&hh'h]h)Mubj)}(h()h]h}(h]h]h]h]h!]h#h$uh%jhjh&hh'h]h)Mubeh}(h]jah](hheh]h]h!]hhhh~h Color.updatehhColorupdatehColor.update()uh%hzh'h]h)Mhjh&hubh)}(hhh](h)}(hhh](h)}(h$:sl:`Sets the elements of the color`h]h)}(hjh]hSets the elements of the color}hj!sbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h:sg:`update(r, g, b) -> None`h]h)}(hj6h]hupdate(r, g, b) -> None}hj8sbah}(h]h]hah]h]h!]uh%hhj4ubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Mubh)}(h$:sg:`update(r, g, b, a=255) -> None`h]h)}(hjMh]hupdate(r, g, b, a=255) -> None}hjOsbah}(h]h]hah]h]h!]uh%hhjKubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M ubh)}(h!:sg:`update(color_value) -> None`h]h)}(hjdh]hupdate(color_value) -> None}hjfsbah}(h]h]hah]h]h!]uh%hhjbubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)M!ubeh}(h]h]h]h]h!]uh%hhjh&hh'h]h)Mubj%)}(hEstablece los elementos del color. Consulta los parámetros de :meth:`pygame.Color` para los parámetros de esta función. Si el valor alfa no se estableció, no cambiará.h](h?Establece los elementos del color. Consulta los parámetros de }hjsbh6)}(h:meth:`pygame.Color`h]h;)}(hjh]hpygame.Color()}hjsbah}(h]h](hFpypy-metheh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypemeth refexplicitrefwarnhYhhZh~h[ pygame.Coloruh%h5h'h]h)M#hjubhY para los parámetros de esta función. Si el valor alfa no se estableció, no cambiará.}hjsbeh}(h]h]h]h]h!]uh%j$h'h]h)M#hjh&hubj )}(hNew in pygame 2.0.1.h]j%)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hjsbah}(h]h](j jReh]h]h!]uh%hhjubah}(h]h]h]h]h!] translatableuh%j$hjh&hh'h]h)M'ubah}(h]h]h]h]h!]j6 versionaddedj8 2.0.1uh%j h&hh'h]h)M&hjubh )}(h## Color.update ##h]h## Color.update ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)M(ubeh}(h]h]h]h]h!]uh%hhjh&hh'Nh)Nubeh}(h]h](pymethodeh]h]h!]jC jjD jjE jjF jG jH jI jJ jK jL uh%huh&hhhh'Nh)Nubh )}(h## pygame.Color ##h]h## pygame.Color ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'h]h)M)ubeh}(h]h]h]h]h!]uh%hhhwh&hh'Nh)Nubeh}(h]h](jclasseh]h]h!]jC jjD j jE j jF jG jH jI jJ jK jL uh%huh&hhh,h'Nh)Nubeh}(h] pygame-colorah]h] pygame.colorah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj?error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}(jh,hsh|j j jY j^ j j ju jz j j j5j:jyj~jjjh system_message)}(hhh]j%)}(h/Inline literal start-string without end-string.h]h/Inline literal start-string without end-string.}hjsbah}(h]h]h]h]h!]uh%j$hjubah}(h]jah]h]h]h!]jalevelKtypeWARNINGlineKsourceh]uh%jhjh&hh'h]h)Kubjjjj jjjbjgjjj(j-jjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jMKsRparse_messages](j)}(hhh]j%)}(hyNo directive entry for "note" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "note".h]hyNo directive entry for "note" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "note".}hjsbah}(h]h]h]h]h!]uh%j$hjubah}(h]h]h]h]h!]levelKtypeINFOlineK-sourceh]uh%jhh)}(hXNvalor del color (ver nota abajo para los formatos admitidos) .. note:: Formatos de ``color_value`` admitidos: | - **Objeto Color:** clona el objeto de clase :class:`Color` | - **Nombre de color: str:** nombre del color a utilizar, por ejemplo ``'red'`` (todos los nombres admitidos se pueden encontrar en :doc:`color_list`, con muestras de ejemplo) | - **Formato de color HTML str:** ``'#rrggbbaa'`` o ``'#rrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona | - **Número hexadecimal str:** ``'0xrrggbbaa'`` o ``'0xrrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona. | - **int:** valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, ``0xrrggbbaa``, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado. | - **tupla/lista de valores enteros de color:** ``(R, G, B, A)`` o ``(R, G, B)``, donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona. h](jj%eh}(h]h]h]h]h!] translatableuh%hh&hh'h]h)K=hjubh&hh'Nh)Nubjetransform_messages] transformerN include_log]docs/es/referencias/color.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.0891325 pygame-2.6.1/docs/generated/es/doctrees/referencias/cursors.doctree0000644000175100001770000012763214676242430025074 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h:mod:`pygame.cursors`h]h pending_xref)}(hh3h]h literal)}(hh3h]hpygame.cursors}hh>> pygame.mouse.set_cursor(*pygame.cursors.arrow)h]h2>>> pygame.mouse.set_cursor(*pygame.cursors.arrow)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khh,h&hubh)}(hSLas siguientes variables pueden ser pasadas a ``pygame.mouse.set_cursor`` function:h](h.Las siguientes variables pueden ser pasadas a }hj!sbh;)}(h``pygame.mouse.set_cursor``h]hpygame.mouse.set_cursor}hj)sbah}(h]h]h]h]h!]uh%h:hj!ubh function:}hj!sbeh}(h]h]h]h]h!]uh%hh'h]h)Khh,h&hubh block_quote)}(h* ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` h]h bullet_list)}(hhh](h list_item)}(h``pygame.cursors.arrow`` h]h)}(h``pygame.cursors.arrow``h]h;)}(hjTh]hpygame.cursors.arrow}hjVsbah}(h]h]h]h]h!]uh%h:hjRubah}(h]h]h]h]h!]uh%hh'h]h)KhjNubah}(h]h]h]h]h!]uh%jLh'h]h)KhjIubjM)}(h``pygame.cursors.diamond`` h]h)}(h``pygame.cursors.diamond``h]h;)}(hjuh]hpygame.cursors.diamond}hjwsbah}(h]h]h]h]h!]uh%h:hjsubah}(h]h]h]h]h!]uh%hh'h]h)K!hjoubah}(h]h]h]h]h!]uh%jLh'h]h)K!hjIubjM)}(h``pygame.cursors.broken_x`` h]h)}(h``pygame.cursors.broken_x``h]h;)}(hjh]hpygame.cursors.broken_x}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K#hjubah}(h]h]h]h]h!]uh%jLh'h]h)K#hjIubjM)}(h``pygame.cursors.tri_left`` h]h)}(h``pygame.cursors.tri_left``h]h;)}(hjh]hpygame.cursors.tri_left}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K%hjubah}(h]h]h]h]h!]uh%jLh'h]h)K%hjIubjM)}(h``pygame.cursors.tri_right`` h]h)}(h``pygame.cursors.tri_right``h]h;)}(hjh]hpygame.cursors.tri_right}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K'hjubah}(h]h]h]h]h!]uh%jLh'h]h)K'hjIubeh}(h]h]h]h]h!]bullet*uh%jGh'h]h)KhjCubah}(h]h]h]h]h!]uh%jAh'h]h)Khh,h&hubh)}(hEste módulo también contiene algunos cursores como cadenas de caracters formateadas. Será necesario pasarlos a la función ``pygame.cursors.compile()`` antes de poder utilizarlos. El ejemplo de llamada se vería así:h](h~Este módulo también contiene algunos cursores como cadenas de caracters formateadas. Será necesario pasarlos a la función }hjsbh;)}(h``pygame.cursors.compile()``h]hpygame.cursors.compile()}hj sbah}(h]h]h]h]h!]uh%h:hjubhB antes de poder utilizarlos. El ejemplo de llamada se vería así:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K)hh,h&hubj)}(h|>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)h]h|>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)}hj!sbah}(h]h]h]h]h!]h#h$uh%jh'h]h)K0hh,h&hubh)}(hvLas siguientes cadenas de caracteres se pueden convertir en mapas de bits de cursor con ``pygame.cursors.compile()`` :h](hXLas siguientes cadenas de caracteres se pueden convertir en mapas de bits de cursor con }hj/sbh;)}(h``pygame.cursors.compile()``h]hpygame.cursors.compile()}hj7sbah}(h]h]h]h]h!]uh%h:hj/ubh :}hj/sbeh}(h]h]h]h]h!]uh%hh'h]h)K3hh,h&hubjB)}(h* ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` h]jH)}(hhh](jM)}(h&``pygame.cursors.thickarrow_strings`` h]h)}(h%``pygame.cursors.thickarrow_strings``h]h;)}(hj\h]h!pygame.cursors.thickarrow_strings}hj^sbah}(h]h]h]h]h!]uh%h:hjZubah}(h]h]h]h]h!]uh%hh'h]h)K6hjVubah}(h]h]h]h]h!]uh%jLh'h]h)K6hjSubjM)}(h#``pygame.cursors.sizer_x_strings`` h]h)}(h"``pygame.cursors.sizer_x_strings``h]h;)}(hj}h]hpygame.cursors.sizer_x_strings}hjsbah}(h]h]h]h]h!]uh%h:hj{ubah}(h]h]h]h]h!]uh%hh'h]h)K8hjwubah}(h]h]h]h]h!]uh%jLh'h]h)K8hjSubjM)}(h#``pygame.cursors.sizer_y_strings`` h]h)}(h"``pygame.cursors.sizer_y_strings``h]h;)}(hjh]hpygame.cursors.sizer_y_strings}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)K:hjubah}(h]h]h]h]h!]uh%jLh'h]h)K:hjSubjM)}(h$``pygame.cursors.sizer_xy_strings`` h]h)}(h#``pygame.cursors.sizer_xy_strings``h]h;)}(hjh]hpygame.cursors.sizer_xy_strings}hjsbah}(h]h]h]h]h!]uh%h:hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjubah}(h]h]h]h]h!]uh%jLh'h]h)K>hjSubeh}(h]h]h]h]h!]jjuh%jGh'h]h)K6hjOubah}(h]h]h]h]h!]uh%jAh'h]h)K6hh,h&hubhe)}(hhh]h}(h]h]h]h]h!]entries](single(compile() (en el módulo pygame.cursors)pygame.cursors.compilehNtauh%hdhh,h&hh'Nh)Nubhdesc)}(hhh](hdesc_signature)}(hcompileh](h desc_addname)}(hpygame.cursors.h]hpygame.cursors.}hj#sbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%j!hjh&hh'h]h)K@ubh desc_name)}(hjh]hcompile}hj5sbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%j3hjh&hh'h]h)K@ubhdesc_parameterlist)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjh&hh'h]h)K@ubeh}(h]jah](sig sig-objecteh]h]h!]modulehŌclasshfullnamej _toc_partshj _toc_name compile()uh%jh'h]h)K@hjh&hubh desc_content)}(hhh](hv)}(hhh](hz)}(h3:sl:`create binary cursor data from simple strings`h]h)}(hjih]h-create binary cursor data from simple strings}hjksbah}(h]h]hah]h]h!]uh%hhjgubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)KBubhz)}(hC:sg:`compile(strings, black='X', white='.', xor='o') -> data, mask`h]h)}(hjh]h=compile(strings, black='X', white='.', xor='o') -> data, mask}hjsbah}(h]h] signatureah]h]h!]uh%hhj~ubah}(h]h]h]h]h!]uh%h)hKhjdh&hh'h]h)KCubeh}(h]h]h]h]h!]uh%huhjah&hh'h]h)KBubh)}(hXSe puede utilizar una secuencia de cadenas para crear datos binarios de cursor para el cursor del sistema. Esto devuelve los datos binarios en forma de dos tuplas. Estas se pueden pasar como tercer y cuarto argumento, respectivamente, de la función :func:`pygame.mouse.set_cursor()`.h](hSe puede utilizar una secuencia de cadenas para crear datos binarios de cursor para el cursor del sistema. Esto devuelve los datos binarios en forma de dos tuplas. Estas se pueden pasar como tercer y cuarto argumento, respectivamente, de la función }hjsbh6)}(h!:func:`pygame.mouse.set_cursor()`h]h;)}(hjh]hpygame.mouse.set_cursor()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZNh[pygame.mouse.set_cursoruh%h5h'h]h)KEhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KEhjah&hubh)}(hXDSi estás creando tus propias cadenas de caracteres, podés usar cualquier valor para representar los píxeles blanco y negro. Algunos sistemas permiten establecer un color especial de alternancia para el color del sistema, también llamado color xor. Si el sistema no admite cursores xor, ese color será simplemente negro.h]hXDSi estás creando tus propias cadenas de caracteres, podés usar cualquier valor para representar los píxeles blanco y negro. Algunos sistemas permiten establecer un color especial de alternancia para el color del sistema, también llamado color xor. Si el sistema no admite cursores xor, ese color será simplemente negro.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)KJhjah&hubh)}(hLa altura debe ser divisible por 8. el ancho de las cadenas debe ser igual y divisible por 8. Si estas dos condiciones no se cumplen, se generará un ``ValueError``. Un ejemplo de conjunto de cadenas de caracteres de cursor se ve así:h](hLa altura debe ser divisible por 8. el ancho de las cadenas debe ser igual y divisible por 8. Si estas dos condiciones no se cumplen, se generará un }hjsbh;)}(h``ValueError``h]h ValueError}hjsbah}(h]h]h]h]h!]uh%h:hjubhG. Un ejemplo de conjunto de cadenas de caracteres de cursor se ve así:}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)KPhjah&hubj)}(hXthickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ")h]hXthickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ")}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)KWhjah&hubh )}(h## pygame.cursors.compile ##h]h## pygame.cursors.compile ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjah&hh'h]h)Kqubeh}(h]h]h]h]h!]uh%j_hjh&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]domainj!objtypej"desctypej"no-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j)load_xbm() (en el módulo pygame.cursors)pygame.cursors.load_xbmhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hload_xbmh](j")}(hpygame.cursors.h]hpygame.cursors.}hjEsbah}(h]h](j.j/eh]h]h!]h#h$uh%j!hjAh&hh'h]h)Ksubj4)}(hjCh]hload_xbm}hjSsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjAh&hh'h]h)KsubjE)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjAh&hh'h]h)Ksubeh}(h]j<ah](jSjTeh]h]h!]jXhjYhjZjCj[hjCj] load_xbm()uh%jh'h]h)Kshj>h&hubj`)}(hhh](hv)}(hhh](hz)}(h':sl:`load cursor data from an XBM file`h]h)}(hjzh]h!load cursor data from an XBM file}hj|sbah}(h]h]hah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kuubhz)}(h):sg:`load_xbm(cursorfile) -> cursor_args`h]h)}(hjh]h#load_xbm(cursorfile) -> cursor_args}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kvubhz)}(h3:sg:`load_xbm(cursorfile, maskfile) -> cursor_args`h]h)}(hjh]h-load_xbm(cursorfile, maskfile) -> cursor_args}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kwubeh}(h]h]h]h]h!]uh%huhjrh&hh'h]h)Kuubh)}(hEsto carga cursores para un subconjunto simple de archivos ``XBM`` . Los archivos ``XBM`` son tradicionalmente utilizados para almacenar cursores en sistemas UNIX, son un formato ASCII utilizado para representar imágenes simples.h](h;Esto carga cursores para un subconjunto simple de archivos }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh . Los archivos }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh son tradicionalmente utilizados para almacenar cursores en sistemas UNIX, son un formato ASCII utilizado para representar imágenes simples.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Kyhjrh&hubh)}(hA veces, los valores de color blanco y negro se dividen en dos archivos ``XBM`` separados. Podés pasar un segundo argumento de archivo de máscara (maskfile) para cargar las dos imágenes en un solo cursor.h](hHA veces, los valores de color blanco y negro se dividen en dos archivos }hjsbh;)}(h``XBM``h]hXBM}hjsbah}(h]h]h]h]h!]uh%h:hjubh separados. Podés pasar un segundo argumento de archivo de máscara (maskfile) para cargar las dos imágenes en un solo cursor.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)K~hjrh&hubh)}(hLos argumentos 'cursorfile' y 'maskfile' pueden ser nombres de archivos u objetos similares a archivos con el método 'readlines'h]hLos argumentos 'cursorfile' y 'maskfile' pueden ser nombres de archivos u objetos similares a archivos con el método 'readlines'}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjrh&hubh)}(hlEl valor de retorno 'cursor_args' puede ser pasado directamente a la función ``pygame.mouse.set_cursor()``.h](hNEl valor de retorno 'cursor_args' puede ser pasado directamente a la función }hj#sbh;)}(h``pygame.mouse.set_cursor()``h]hpygame.mouse.set_cursor()}hj+sbah}(h]h]h]h]h!]uh%h:hj#ubh.}hj#sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjrh&hubh )}(h## pygame.cursors.load_xbm ##h]h## pygame.cursors.load_xbm ##}hjCsbah}(h]h]h]h]h!]h#h$uh%h hjrh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%j_hj>h&hh'Nh)Nubeh}(h]h](pyfunctioneh]h]h!]j&jZj'j[j(j[j)j*j+j,j-j.j/uh%jh&hhh,h'Nh)Nubhe)}(hhh]h}(h]h]h]h]h!]entries](j Cursor (clase en pygame.cursors)pygame.cursors.CursorhNtauh%hdhh,h&hh'Nh)Nubj)}(hhh](j)}(hCursorh](j")}(hpygame.cursors.h]hpygame.cursors.}hjtsbah}(h]h](j.j/eh]h]h!]h#h$uh%j!hjph&hh'h]h)Kubj4)}(hjrh]hCursor}hjsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjph&hh'h]h)Kubeh}(h]jkah](jSjTeh]h]h!]jXhjYhjZjrj[hjrj]jruh%jh'h]h)Khjmh&hubj`)}(hhh](hv)}(hhh](hz)}(h):sl:`pygame object representing a cursor`h]h)}(hjh]h#pygame object representing a cursor}hjsbah}(h]h]hah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h9:sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor`h]h)}(hjh]h3Cursor(size, hotspot, xormasks, andmasks) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h(:sg:`Cursor(hotspot, surface) -> Cursor`h]h)}(hjh]h"Cursor(hotspot, surface) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h :sg:`Cursor(constant) -> Cursor`h]h)}(hjh]hCursor(constant) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`Cursor(Cursor) -> Cursor`h]h)}(hjh]hCursor(Cursor) -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubhz)}(h:sg:`Cursor() -> Cursor`h]h)}(hjh]hCursor() -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjh&hh'h]h)Kubh)}(hXEn pygame 2, hay 3 tipos de cursores que podés crear para darle un poco de brillo adicional a tu juego. Existen cursores de tipo **bitmap**, que ya existían en Pygame 1.x, y se compilan a partir de una cadena de caracteres o se cargan desde un archivo xbm. Luego, están los cursores de tipo **system**, donde eliges un conjunto predefinido que transmitirá el mismo significado pero se verá nativo en diferentes sistemas operativos. Por último puedes crear un cursor de tipo **color**, que muestra una superficie de Pygame como el cursor.h](hEn pygame 2, hay 3 tipos de cursores que podés crear para darle un poco de brillo adicional a tu juego. Existen cursores de tipo }hj,sbh strong)}(h **bitmap**h]hbitmap}hj6sbah}(h]h]h]h]h!]uh%j4hj,ubh, que ya existían en Pygame 1.x, y se compilan a partir de una cadena de caracteres o se cargan desde un archivo xbm. Luego, están los cursores de tipo }hj,sbj5)}(h **system**h]hsystem}hjHsbah}(h]h]h]h]h!]uh%j4hj,ubh, donde eliges un conjunto predefinido que transmitirá el mismo significado pero se verá nativo en diferentes sistemas operativos. Por último puedes crear un cursor de tipo }hj,sbj5)}(h **color**h]hcolor}hjZsbah}(h]h]h]h]h!]uh%j4hj,ubh6, que muestra una superficie de Pygame como el cursor.}hj,sbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h!**Creando un cursor del sistema**h]j5)}(hjth]hCreando un cursor del sistema}hjvsbah}(h]h]h]h]h!]uh%j4hjrubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXElegí una constante de esta lista, pasala a ``pygame.cursors.Cursor(constant)``, ¡y listo! Tené en cuenta que no todos los sistemas admiten todos los cursores del sistema y es posible que obtengas una sustitución en su lugar. Por ejemplo, en MacOS, WAIT/WAITARROW debería mostrarse como una flecha y SIZENWSE/SIZENESW/SIZEALL debería mostrarse como una mano cerrada. Y en Wayland, cada cursor SIZE debería aparecer como una mano. debería mostrarse como una mano cerrada.h](h-Elegí una constante de esta lista, pasala a }hjsbh;)}(h#``pygame.cursors.Cursor(constant)``h]hpygame.cursors.Cursor(constant)}hjsbah}(h]h]h]h]h!]uh%h:hjubhX, ¡y listo! Tené en cuenta que no todos los sistemas admiten todos los cursores del sistema y es posible que obtengas una sustitución en su lugar. Por ejemplo, en MacOS, WAIT/WAITARROW debería mostrarse como una flecha y SIZENWSE/SIZENESW/SIZEALL debería mostrarse como una mano cerrada. Y en Wayland, cada cursor SIZE debería aparecer como una mano. debería mostrarse como una mano cerrada.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubj)}(hXPygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow (flecha) pygame.SYSTEM_CURSOR_IBEAM i-beam (viga en i, o viga de doble t) pygame.SYSTEM_CURSOR_WAIT wait (espera) pygame.SYSTEM_CURSOR_CROSSHAIR crosshair (cruz de mira) pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (pequeño cursor de espera) (or wait if not available) (o si no está disponible, espera) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing (doble flecha apuntando al noroeste y sudeste) northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing (doble flecha apuntando al noreste y sudoeste) northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing (doble flecha apuntando al oeste y al este) west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing (doble flecha apuntando al norte y sur) north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing (flecha de cuatro puntas apuntando al norte, sur, este y oeste) north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones (círculo tachado o calaveras cruzadas) pygame.SYSTEM_CURSOR_HAND hand (mano)h]hXPygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow (flecha) pygame.SYSTEM_CURSOR_IBEAM i-beam (viga en i, o viga de doble t) pygame.SYSTEM_CURSOR_WAIT wait (espera) pygame.SYSTEM_CURSOR_CROSSHAIR crosshair (cruz de mira) pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (pequeño cursor de espera) (or wait if not available) (o si no está disponible, espera) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing (doble flecha apuntando al noroeste y sudeste) northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing (doble flecha apuntando al noreste y sudoeste) northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing (doble flecha apuntando al oeste y al este) west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing (doble flecha apuntando al norte y sur) north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing (flecha de cuatro puntas apuntando al norte, sur, este y oeste) north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones (círculo tachado o calaveras cruzadas) pygame.SYSTEM_CURSOR_HAND hand (mano)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h]h)Khjh&hubh)}(h***Creando un cursor sin pasar argumentos**h]j5)}(hjh]h&Creando un cursor sin pasar argumentos}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXtAdemás de las constantes del cursor disponibles y descritas anteriormente, también podés llamar a ``pygame.cursors.Cursor()``, y tu cursor está listo (hacer esto es lo mismo que llamar a ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``) Haciendo una de estas llamadas lo que en realidad se crea es un cursor del sistema utilizando la imagen nativa predeterminada.h](heAdemás de las constantes del cursor disponibles y descritas anteriormente, también podés llamar a }hjsbh;)}(h``pygame.cursors.Cursor()``h]hpygame.cursors.Cursor()}hjsbah}(h]h]h]h]h!]uh%h:hjubh?, y tu cursor está listo (hacer esto es lo mismo que llamar a }hjsbh;)}(h5``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``h]h1pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)}hjsbah}(h]h]h]h]h!]uh%h:hjubh) Haciendo una de estas llamadas lo que en realidad se crea es un cursor del sistema utilizando la imagen nativa predeterminada.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h**Creando un curosr de color**h]j5)}(hjh]hCreando un curosr de color}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXPara crear un cursor de color, hay que crear un objeto ``Cursor`` a partir de un ``hotspot`` y una ``surface``. Un ``hotspot`` es una coordenada (x,y) que determina donde en el cursor está el punto exacto. La posición debe estar dentro de los límites de la ``surface``.h](h7Para crear un cursor de color, hay que crear un objeto }hjsbh;)}(h ``Cursor``h]hCursor}hjsbah}(h]h]h]h]h!]uh%h:hjubh a partir de un }hjsbh;)}(h ``hotspot``h]hhotspot}hj1sbah}(h]h]h]h]h!]uh%h:hjubh y una }hjsbh;)}(h ``surface``h]hsurface}hjCsbah}(h]h]h]h]h!]uh%h:hjubh. Un }hjsbh;)}(h ``hotspot``h]hhotspot}hjUsbah}(h]h]h]h]h!]uh%h:hjubh es una coordenada (x,y) que determina donde en el cursor está el punto exacto. La posición debe estar dentro de los límites de la }hjsbh;)}(h ``surface``h]hsurface}hjgsbah}(h]h]h]h]h!]uh%h:hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(h.**Creando un cursor de mapa de bits (bitmap)**h]j5)}(hjh]h*Creando un cursor de mapa de bits (bitmap)}hjsbah}(h]h]h]h]h!]uh%j4hjubah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX2Cuando el cursor del mouse está visible, se mostrará como un mapa de bits en blanco y negro utilizando los arrays de máscaras (bitmask) dadas. El ``size`` (tamaño) es una secuencia que contiene el ancho y alto del cursor. El ``hotspot``es una secuencia que contiene la posición del hotspot del cursor.h](hCuando el cursor del mouse está visible, se mostrará como un mapa de bits en blanco y negro utilizando los arrays de máscaras (bitmask) dadas. El }hjsbh;)}(h``size``h]hsize}hjsbah}(h]h]h]h]h!]uh%h:hjubhH (tamaño) es una secuencia que contiene el ancho y alto del cursor. El }hjsbh problematic)}(h``h]h``}hjsbah}(h]id2ah]h]h]h!]refidid1uh%jhjubhKhotspot``es una secuencia que contiene la posición del hotspot del cursor.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hXUn cursor tiene un ancho y alto, pero la posición del mouse está representada mediante un conjunto de coordenadas de punto. Por lo tanto, el valor pasado al ``hotspot`` del cursor ayuda a pygame a determinar exactamente en qué punto se encuentra el cursor.h](hUn cursor tiene un ancho y alto, pero la posición del mouse está representada mediante un conjunto de coordenadas de punto. Por lo tanto, el valor pasado al }hjsbh;)}(h ``hotspot``h]hhotspot}hjsbah}(h]h]h]h]h!]uh%h:hjubhY del cursor ayuda a pygame a determinar exactamente en qué punto se encuentra el cursor.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hX``xormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks`` es una secuencia de bytes que contiene los datos de máscara de bits del cursor. Para crear estas variable podemos utilizar la función :func:`pygame.cursors.compile()`.h](h;)}(ho``xormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks``h]hkxormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks}hjsbah}(h]h]h]h]h!]uh%h:hjubh es una secuencia de bytes que contiene los datos de máscara de bits del cursor. Para crear estas variable podemos utilizar la función }hjsbh6)}(h :func:`pygame.cursors.compile()`h]h;)}(hjh]hpygame.cursors.compile()}hjsbah}(h]h](hFpypy-funceh]h]h!]uh%h:hjubah}(h]h]h]h]h!]refdochS refdomainjreftypefunc refexplicitrefwarnhYhhZjrh[pygame.cursors.compileuh%h5h'h]h)Khjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubh)}(hAncho y alto deben ser múltiplos de 8, y las arrays de máscara (mask arrays) deben tener el tamaño correcto para el ancho y el alto dados. De lo contrario, se generará una excepción.h]hAncho y alto deben ser múltiplos de 8, y las arrays de máscara (mask arrays) deben tener el tamaño correcto para el ancho y el alto dados. De lo contrario, se generará una excepción.}hj-sbah}(h]h]h]h]h!]uh%hh'h]h)Khjh&hubhe)}(hhh]h}(h]h]h]h]h!]entries](j)copy() (método de pygame.cursors.Cursor)pygame.cursors.Cursor.copyhNtauh%hdhjh&hh'h]h)Nubj)}(hhh](j)}(hcopyh](j4)}(hjNh]hcopy}hjPsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjLh&hh'h]h)KubjE)}(h()h]h}(h]h]h]h]h!]h#h$uh%jDhjLh&hh'h]h)Kubeh}(h]jGah](jSjTeh]h]h!]jXhjYjrjZ Cursor.copyj[hŌCursorcopyj] Cursor.copy()uh%jh'h]h)KhjIh&hubj`)}(hhh](hv)}(hhh](hz)}(h:sl:`copy the current cursor`h]h)}(hjzh]hcopy the current cursor}hj|sbah}(h]h]hah]h]h!]uh%hhjxubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubhz)}(h:sg:`copy() -> Cursor`h]h)}(hjh]hcopy() -> Cursor}hjsbah}(h]h]jah]h]h!]uh%hhjubah}(h]h]h]h]h!]uh%h)hKhjuh&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhjrh&hh'h]h)Kubh)}(hPDevuelve un nuevo objeto Cursor con los mismos datos y hotspots que el original.h]hPDevuelve un nuevo objeto Cursor con los mismos datos y hotspots que el original.}hjsbah}(h]h]h]h]h!]uh%hh'h]h)Khjrh&hubeh}(h]h]h]h]h!]uh%j_hjIh&hh'h]h)Nubeh}(h]h](pymethodeh]h]h!]j&jj'jj(jj)j*j+j,j-j.j/uh%jh&hhjh'h]h)Nubh )}(h ## pygame.cursors.Cursor.copy ##h]h ## pygame.cursors.Cursor.copy ##}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](j(type (atributo de pygame.cursors.Cursor)pygame.cursors.Cursor.typehNtauh%hdhjh&hh'h]h)Nubj)}(hhh](j)}(htypeh]j4)}(hjh]htype}hjsbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hjh&hh'h]h)Kubah}(h]jah](jSjTeh]h]h!]jXhjYjrjZ Cursor.typej[hŌCursortypej]juh%jh'h]h)Khjh&hubj`)}(hhh](hv)}(hhh](hz)}(h:sl:`Gets the cursor type`h]h)}(hj h]hGets the cursor type}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`type -> string`h]h)}(hj! h]htype -> string}hj# sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h8El tipo será ``"system"``, ``"bitmap"``, o ``"color"``.h](hEl tipo será }hj< sbh;)}(h ``"system"``h]h"system"}hjD sbah}(h]h]h]h]h!]uh%h:hj< ubh, }hj< sbh;)}(h ``"bitmap"``h]h"bitmap"}hjV sbah}(h]h]h]h]h!]uh%h:hj< ubh, o }hj< sbh;)}(h ``"color"``h]h"color"}hjh sbah}(h]h]h]h]h!]uh%h:hj< ubh.}hj< sbeh}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubeh}(h]h]h]h]h!]uh%j_hjh&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]j&j j'j j(j j)j*j+j,j-j.j/uh%jh&hhjh'h]h)Nubh )}(h ## pygame.cursors.Cursor.type ##h]h ## pygame.cursors.Cursor.type ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubhe)}(hhh]h}(h]h]h]h]h!]entries](j(data (atributo de pygame.cursors.Cursor)pygame.cursors.Cursor.datahNtauh%hdhjh&hh'h]h)Nubj)}(hhh](j)}(hdatah]j4)}(hj h]hdata}hj sbah}(h]h](j?j@eh]h]h!]h#h$uh%j3hj h&hh'h]h)Kubah}(h]j ah](jSjTeh]h]h!]jXhjYjrjZ Cursor.dataj[hŌCursordataj]j uh%jh'h]h)Khj h&hubj`)}(hhh](hv)}(hhh](hz)}(h:sl:`Gets the cursor data`h]h)}(hj h]hGets the cursor data}hj sbah}(h]h]hah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubhz)}(h:sg:`data -> tuple`h]h)}(hj h]h data -> tuple}hj sbah}(h]h]jah]h]h!]uh%hhj ubah}(h]h]h]h]h!]uh%h)hKhj h&hh'h]h)Kubeh}(h]h]h]h]h!]uh%huhj h&hh'h]h)Kubh)}(h]Devuelve los datos que se utilizaron para crear este objeto de cursor, envuelto en una tupla.h]h]Devuelve los datos que se utilizaron para crear este objeto de cursor, envuelto en una tupla.}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Khj h&hubeh}(h]h]h]h]h!]uh%j_hj h&hh'h]h)Nubeh}(h]h](py attributeeh]h]h!]j&j j'j j(j j)j*j+j,j-j.j/uh%jh&hhjh'h]h)Nubh )}(h ## pygame.cursors.Cursor.data ##h]h ## pygame.cursors.Cursor.data ##}hj sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Kubhversionmodified)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]h)}(hNew in pygame 2.0.1.h]hNew in pygame 2.0.1.}hj6 sbah}(h]h](j, addedeh]h]h!]uh%hhj2 ubah}(h]h]h]h]h!] translatableuh%hhj. h&hh'h]h)Mubah}(h]h]h]h]h!]type versionaddedversion2.0.1uh%j, h&hh'h]h)Khjubh )}(h## pygame.cursors.Cursor ##h]h## pygame.cursors.Cursor ##}hjV sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h]h)Mubeh}(h]h]h]h]h!]uh%j_hjmh&hh'Nh)Nubeh}(h]h](pyclasseh]h]h!]j&jm j'jn j(jn j)j*j+j,j-j.j/uh%jh&hhh,h'Nh)Nubh )}(h## pygame.cursors ##h]h## pygame.cursors ##}hjr sbah}(h]h]h]h]h!]h#h$uh%h hh,h&hh'h]h)Mubh)}(h_Código de ejemplo para crear y establecer cursores. (Click en el mouse para cambiar el cursor)h]h_Código de ejemplo para crear y establecer cursores. (Click en el mouse para cambiar el cursor)}hj sbah}(h]h]h]h]h!]uh%hh'h]h)Mhh,h&hubj)}(hX# pygame setup import pygame as pg pg.init() screen = pg.display.set_mode([600, 400]) pg.display.set_caption("Example code for the cursors module") # create a system cursor system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO) # create bitmap cursors bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow) bitmap_2 = pg.cursors.Cursor( (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings) ) # create a color cursor surf = pg.Surface((40, 40)) # you could also load an image surf.fill((120, 50, 50)) # and use that as your surface color = pg.cursors.Cursor((20, 20), surf) cursors = [system, bitmap_1, bitmap_2, color] cursor_index = 0 pg.mouse.set_cursor(cursors[cursor_index]) clock = pg.time.Clock() going = True while going: clock.tick(60) screen.fill((0, 75, 30)) pg.display.flip() for event in pg.event.get(): if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE): going = False # if the mouse is clicked it will switch to a new cursor if event.type == pg.MOUSEBUTTONDOWN: cursor_index += 1 cursor_index %= len(cursors) pg.mouse.set_cursor(cursors[cursor_index]) pg.quit() h]hX# pygame setup import pygame as pg pg.init() screen = pg.display.set_mode([600, 400]) pg.display.set_caption("Example code for the cursors module") # create a system cursor system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO) # create bitmap cursors bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow) bitmap_2 = pg.cursors.Cursor( (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings) ) # create a color cursor surf = pg.Surface((40, 40)) # you could also load an image surf.fill((120, 50, 50)) # and use that as your surface color = pg.cursors.Cursor((20, 20), surf) cursors = [system, bitmap_1, bitmap_2, color] cursor_index = 0 pg.mouse.set_cursor(cursors[cursor_index]) clock = pg.time.Clock() going = True while going: clock.tick(60) screen.fill((0, 75, 30)) pg.display.flip() for event in pg.event.get(): if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE): going = False # if the mouse is clicked it will switch to a new cursor if event.type == pg.MOUSEBUTTONDOWN: cursor_index += 1 cursor_index %= len(cursors) pg.mouse.set_cursor(cursors[cursor_index]) pg.quit() }hj sbah}(h]h]h]h]h!]sourceU/home/runner/work/pygame/pygame/docs/reST/ref/code_examples/cursors_module_example.pyh#h$forcehighlight_args} linenostartKsuh%jh'h]h)Mhh,h&hubeh}(h](hspygame-cursorseh]h]pygame.cursorsah]h!]uh%h*hhh&hh'h]h)Kubeh}(h]h]h]h]h!]sourceh]translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh] _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}j j s nametypes}j sh}(j h,hsh target)}(hhh]h}(h]hsah]h]h]h!]ismoduh%j h'h]h)Khh,h&hubjjj<jAjkjpjh system_message)}(hhh]h)}(h/Inline literal start-string without end-string.h]h/Inline literal start-string without end-string.}hj+ sbah}(h]h]h]h]h!]uh%hhj( ubah}(h]jah]h]h]h!]jalevelKtypeWARNINGlineKЌsourceh]uh%j& hjh&hh'h]h)KubjjjGjLjjj j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]j( atransform_messages] transformerN include_log]docs/es/referencias/cursors.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0241258 pygame-2.6.1/docs/generated/es/doctrees/tutorials/0000755000175100001770000000000014676242436021560 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.1121323 pygame-2.6.1/docs/generated/es/doctrees/tutorials/CamaraIntro.doctree0000644000175100001770000010112214676242430025316 0ustar00runnerdockerGsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h-TUTORIAL: Introducción al Módulo de Cámarah]h Text-TUTORIAL: Introducción al Módulo de Cámara}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceA/home/runner/work/pygame/pygame/docs/es/tutorials/CamaraIntro.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h7Tutoriales Pygame - Introducción al Módulo de Cámarah]h7Tutoriales Pygame - Introducción al Módulo de Cámara}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(h#Introducción al Módulo de Cámarah]h#Introducción al Módulo de Cámara}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAutorh]hAutor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Nirav Patelh]h paragraph)}(hh}h]h Nirav Patel}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContactoh]hContacto}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hnrp@eclecti.cch]h)}(hhh]h reference)}(hhh]hnrp@eclecti.cc}hhsbah}(h]h]h]h]h!]refurimailto:nrp@eclecti.ccuh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh)}(hXPygame 1.9 viene con soporte para cámaras interconectadas, lo que nos permite capturar imagenes quietas, ver transmiciones en vivo y hacer visión computarizada. Este tutorial cubrirá todos estos casos de uso, proporcionando ejemplos de código que pueden usar para basar sus propias apps o juegos. Pueden consultar la documentación de referencia por una API completa: :mod:`reference documentation `h](hXtPygame 1.9 viene con soporte para cámaras interconectadas, lo que nos permite capturar imagenes quietas, ver transmiciones en vivo y hacer visión computarizada. Este tutorial cubrirá todos estos casos de uso, proporcionando ejemplos de código que pueden usar para basar sus propias apps o juegos. Pueden consultar la documentación de referencia por una API completa: }hj sbh pending_xref)}(h.:mod:`reference documentation `h]h literal)}(hjh]hreference documentation}hjsbah}(h]h](xrefpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoctutorials/CamaraIntro refdomainj&reftypemod refexplicitrefwarn py:moduleNpy:classN reftarget pygame.camerauh%jh'h(h)Khj ubeh}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh note)}(hXA partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como **EXPERIMENTAL**, lo que significa que la API podría cambiar las versiones posteriores.h]h)}(hXA partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como **EXPERIMENTAL**, lo que significa que la API podría cambiar las versiones posteriores.h](hX|A partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como }hjHsbh strong)}(h**EXPERIMENTAL**h]h EXPERIMENTAL}hjRsbah}(h]h]h]h]h!]uh%jPhjHubhH, lo que significa que la API podría cambiar las versiones posteriores.}hjHsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjDubah}(h]h]h]h]h!]uh%jBh'h(h)KhhNh&hubh:)}(hhh](h?)}(hImportación e Inicializaciónh]hImportación e Inicialización}hjssbah}(h]h]h]h]h!]uh%h>hjph&hh'h(h)K&ubh literal_block)}(hbimport pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init()h]hbimport pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K*hjph&hubh)}(huDado que el módulo de cámara es opcional, necesita ser importado e inicializado manualmente como se muestra arriba.h]huDado que el módulo de cámara es opcional, necesita ser importado e inicializado manualmente como se muestra arriba.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K1hjph&hubeh}(h]importacion-e-inicializacionah]h]importación e inicializaciónah]h!]uh%h9hhNh&hh'h(h)K&ubh:)}(hhh](h?)}(hCaptura de una sola imagenh]hCaptura de una sola imagen}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)K6ubh)}(hX[Ahora repasaremos el caso más simple en el que abrimos una cámara y capturamos un cuadro como Surface. En el siguiente ejemplo, asumimos que hay una cámara en /dev/video0 en la computadora, y la inicializamos con un tamaño de 640 por 480. La Surface llamada 'image' es lo que sea que la cámara estaba viendo cuando get_image() fue llamada. ::h]hXXAhora repasaremos el caso más simple en el que abrimos una cámara y capturamos un cuadro como Surface. En el siguiente ejemplo, asumimos que hay una cámara en /dev/video0 en la computadora, y la inicializamos con un tamaño de 640 por 480. La Surface llamada 'image' es lo que sea que la cámara estaba viendo cuando get_image() fue llamada.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K8hjh&hubj)}(hWcam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image()h]hWcam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K>hjh&hubh:)}(hhh](h?)}(hListado de Cámaras Conectadash]hListado de Cámaras Conectadas}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)KDubh)}(hPuede que se estén preguntando, ¿y si no sabemos la ruta exacta de la cámara? Podemos pedirle al módulo que nos proporcione la lista de cámaras conectadas a la computadora y que inicialice la primera cámara en la lista. ::h]hPuede que se estén preguntando, ¿y si no sabemos la ruta exacta de la cámara? Podemos pedirle al módulo que nos proporcione la lista de cámaras conectadas a la computadora y que inicialice la primera cámara en la lista.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KFhjh&hubj)}(hgcamlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480))h]hgcamlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KKhjh&hubeh}(h]listado-de-camaras-conectadasah]h]listado de cámaras conectadasah]h!]uh%h9hjh&hh'h(h)KDubh:)}(hhh](h?)}(hUso los Controles de la Cámarah]hUso los Controles de la Cámara}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)KQubh)}(hLa mayoría de las cámaras admiten controles como voltear la imagen y cambiar el brillo. set_controls() y get_controls() pueden ser usados en cualquier momento después de usar start(). ::h]hLa mayoría de las cámaras admiten controles como voltear la imagen y cambiar el brillo. set_controls() y get_controls() pueden ser usados en cualquier momento después de usar start().}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KShj h&hubj)}(hIcam.set_controls(hflip = True, vflip = False) print camera.get_controls()h]hIcam.set_controls(hflip = True, vflip = False) print camera.get_controls()}hj(sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KWhj h&hubeh}(h]uso-los-controles-de-la-camaraah]h]uso los controles de la cámaraah]h!]uh%h9hjh&hh'h(h)KQubeh}(h]captura-de-una-sola-imagenah]h]captura de una sola imagenah]h!]uh%h9hhNh&hh'h(h)K6ubh:)}(hhh](h?)}(h#Captura de una Transmisión en Vivoh]h#Captura de una Transmisión en Vivo}hjIsbah}(h]h]h]h]h!]uh%h>hjFh&hh'h(h)K\ubh)}(hXEl resto de este tutorial se basará en capturar un flujo en vivo de imagenes. Para ello usaremos la clase que se muestra a continuación. Como se describe, simplemente mostrará (blit) en la pantalla una corriente constante de cuadros a la pantalla, mostrando efecivamente un video en vivo. Básicamente es lo que se espera, hacer un bucle con get_image(), se aplica a la pantalla de Surface, y lo voltea. Por razones de rendimiento, suministraremos a la cámara la misma Surface para utilizar en cada ocasión. ::h]hXEl resto de este tutorial se basará en capturar un flujo en vivo de imagenes. Para ello usaremos la clase que se muestra a continuación. Como se describe, simplemente mostrará (blit) en la pantalla una corriente constante de cuadros a la pantalla, mostrando efecivamente un video en vivo. Básicamente es lo que se espera, hacer un bucle con get_image(), se aplica a la pantalla de Surface, y lo voltea. Por razones de rendimiento, suministraremos a la cámara la misma Surface para utilizar en cada ocasión.}hjWsbah}(h]h]h]h]h!]uh%hh'h(h)K^hjFh&hubj)}(hXHclass Capture: def __init__(self): self.size = (640,480) # crear una visualización de surface. cosas estándar de pygame self.display = pygame.display.set_mode(self.size, 0) # esto es lo mismo que vimos antes self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no se detectaron cámaras.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # crear una surface para capturar, con fines de rendimiento # profundidad de bit es la misma que la de la Surface de visualización. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # si no querés vincular la velocidad de cuadros a la cámara, podés verificar # si la cámara tiene una imagen lista. Tené en cuenta que mientras esto funciona # en la mayoría de las cámaras, algunas nunca van a devolver un 'true'. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # pasalo (blit) a la Surface de visualización. ¡Simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # cerrar la cámara de forma segura self.cam.stop() going = False self.get_and_flip()h]hXHclass Capture: def __init__(self): self.size = (640,480) # crear una visualización de surface. cosas estándar de pygame self.display = pygame.display.set_mode(self.size, 0) # esto es lo mismo que vimos antes self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no se detectaron cámaras.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # crear una surface para capturar, con fines de rendimiento # profundidad de bit es la misma que la de la Surface de visualización. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # si no querés vincular la velocidad de cuadros a la cámara, podés verificar # si la cámara tiene una imagen lista. Tené en cuenta que mientras esto funciona # en la mayoría de las cámaras, algunas nunca van a devolver un 'true'. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # pasalo (blit) a la Surface de visualización. ¡Simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # cerrar la cámara de forma segura self.cam.stop() going = False self.get_and_flip()}hjesbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KghjFh&hubh)}(hXDado que get_image() es una llamada de bloqueo que podría tomar bastante tiempo en una cámara lenta, este ejemplo usa query_image() para ver si la cámara está lista. Esto permite separar la velocidad de fotogramas de tu juego de la de tu cámara. También es posible hacer que la cámara capture imágenes en un subproceso separado obteniendo aproximadamente la misma ganancia de rendimiento, si encontrás que tu cámara no es compatible con la función query_image().h]hXDado que get_image() es una llamada de bloqueo que podría tomar bastante tiempo en una cámara lenta, este ejemplo usa query_image() para ver si la cámara está lista. Esto permite separar la velocidad de fotogramas de tu juego de la de tu cámara. También es posible hacer que la cámara capture imágenes en un subproceso separado obteniendo aproximadamente la misma ganancia de rendimiento, si encontrás que tu cámara no es compatible con la función query_image().}hjssbah}(h]h]h]h]h!]uh%hh'h(h)KhjFh&hubeh}(h]"captura-de-una-transmision-en-vivoah]h]#captura de una transmisión en vivoah]h!]uh%h9hhNh&hh'h(h)K\ubh:)}(hhh](h?)}(hVisión Básica por Computadorah]hVisión Básica por Computadora}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hzAl usar los módulos de la cámara, transormación y máscara, pygame puede hacer algo de visión por computadora básica.h]hzAl usar los módulos de la cámara, transormación y máscara, pygame puede hacer algo de visión por computadora básica.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh:)}(hhh](h?)}(hModelos de Colorh]hModelos de Color}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hX"When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial.h]hX"When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj)}(h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB")h]h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB")}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubh image)}(h=.. image:: ../../reST/tut/camera_rgb.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_rgb.jpg candidates}*js original_uri../../reST/tut/camera_rgb.jpguh%jh'h(h)Khjh&hubj)}(h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV")h]h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV")}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubj)}(h=.. image:: ../../reST/tut/camera_yuv.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_yuv.jpgj}jjsj../../reST/tut/camera_yuv.jpguh%jh'h(h)Khjh&hubj)}(h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV")h]h@self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV")}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubj)}(h>.. image:: ../../reST/tut/camera_hsv.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_hsv.jpgj}jj sj../../reST/tut/camera_hsv.jpguh%jh'h(h)Khjh&hubeh}(h]modelos-de-colorah]h]modelos de colorah]h!]uh%h9hjh&hh'h(h)Kubh:)}(hhh](h?)}(hThresholding (Umbralización)h]hThresholding (Umbralización)}hj.sbah}(h]h]h]h]h!]uh%h>hj+h&hh'h(h)Kubh)}(hXUsando la función threshold() del módulo de transformación, uno puede hacer simple efectos del estilo de pantalla verde o asilar objetos de colores especificos en una escena. En el siguiente ejemplo, usamos umbralización para separar el árbol verde y hacemos que el resto de la imagen sea negra. Consultá la documentación de referencia para más detalles de la función: :func:`threshold function `\ .h](hXzUsando la función threshold() del módulo de transformación, uno puede hacer simple efectos del estilo de pantalla verde o asilar objetos de colores especificos en una escena. En el siguiente ejemplo, usamos umbralización para separar el árbol verde y hacemos que el resto de la imagen sea negra. Consultá la documentación de referencia para más detalles de la función: }hj<sbj)}(h7:func:`threshold function `h]j)}(hjFh]hthreshold function}hjHsbah}(h]h](j%pypy-funceh]h]h!]uh%jhjDubah}(h]h]h]h]h!]refdocj2 refdomainjRreftypefunc refexplicitrefwarnj8Nj9Nj:pygame.transform.thresholduh%jh'h(h)Khj<ubh .}hj<sbeh}(h]h]h]h]h!]uh%hh'h(h)Khj+h&hubj)}(hself.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)h]hself.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)}hjnsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj+h&hubj)}(hF.. image:: ../../reST/tut/camera_thresholded.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri"../reST/tut/camera_thresholded.jpgj}jjsj%../../reST/tut/camera_thresholded.jpguh%jh'h(h)Khj+h&hubh)}(hXPor supuesto, esto solo es útil si ya conocés el color exacto del objeto que estás buscando. Para evitar esto y hacer la umbralización utilizable en el mundo real, necesitamos agregar una etapa de calibración en la que identifiquemos el color de un objeto y usarlo para umbralizarlo. Nosotros usaremos la función average_color() del módulo de transformación para hacer esto. A continuación, se muestra un ejemplo de la función calibración que se podría repetir hasta que se produzca un evento como apretar una tecla y [obtener] una imagen de cómo se vería. El color adentro del cuadro será el que se use para la umbralización. Hay que tener en cuenta que estamos usando el modelo de color HSV en las imágenes a continuación.h]hXPor supuesto, esto solo es útil si ya conocés el color exacto del objeto que estás buscando. Para evitar esto y hacer la umbralización utilizable en el mundo real, necesitamos agregar una etapa de calibración en la que identifiquemos el color de un objeto y usarlo para umbralizarlo. Nosotros usaremos la función average_color() del módulo de transformación para hacer esto. A continuación, se muestra un ejemplo de la función calibración que se podría repetir hasta que se produzca un evento como apretar una tecla y [obtener] una imagen de cómo se vería. El color adentro del cuadro será el que se use para la umbralización. Hay que tener en cuenta que estamos usando el modelo de color HSV en las imágenes a continuación.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj+h&hubj)}(hXKdef calibrate(self): # capturar la imagen self.snapshot = self.cam.get_image(self.snapshot) # aplicarlo a la Surface de visualización self.display.blit(self.snapshot, (0,0)) # crear un rectángulo (rect) en el medio de la pantalla crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # obtener el color promedio del área dentro del rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # rellenar la esquina superior izquierda con ese color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip()h]hXKdef calibrate(self): # capturar la imagen self.snapshot = self.cam.get_image(self.snapshot) # aplicarlo a la Surface de visualización self.display.blit(self.snapshot, (0,0)) # crear un rectángulo (rect) en el medio de la pantalla crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # obtener el color promedio del área dentro del rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # rellenar la esquina superior izquierda con ese color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj+h&hubj)}(hA.. image:: ../../reST/tut/camera_average.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_average.jpgj}jjsj!../../reST/tut/camera_average.jpguh%jh'h(h)Khj+h&hubj)}(h[pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)h]h[pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj+h&hubj)}(hA.. image:: ../../reST/tut/camera_thresh.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_thresh.jpgj}jjsj ../../reST/tut/camera_thresh.jpguh%jh'h(h)Khj+h&hubh)}(hPueden usar la misma idea para hacer una simple pantalla verde/azul, al obtener primero una imagen del fondo y después umbralizar contrastando con ella. El ejemplo a continuación solo tiene la cámara apuntando a una pared blanca en modelo de color HSV.h]hPueden usar la misma idea para hacer una simple pantalla verde/azul, al obtener primero una imagen del fondo y después umbralizar contrastando con ella. El ejemplo a continuación solo tiene la cámara apuntando a una pared blanca en modelo de color HSV.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj+h&hubj)}(hXdef calibrate(self): # captura un montón de imagenes de fondo. bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # promedia el color de las imágenes para llegar a uno solo y deshacerse de posibles perturbaciones pygame.transform.average_surfaces(bg,self.background) # aplicarlo a la Surface de visualización self.display.blit(self.background, (0,0)) pygame.display.flip()h]hXdef calibrate(self): # captura un montón de imagenes de fondo. bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # promedia el color de las imágenes para llegar a uno solo y deshacerse de posibles perturbaciones pygame.transform.average_surfaces(bg,self.background) # aplicarlo a la Surface de visualización self.display.blit(self.background, (0,0)) pygame.display.flip()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khj+h&hubj)}(hD.. image:: ../../reST/tut/camera_background.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri!../reST/tut/camera_background.jpgj}jjsj$../../reST/tut/camera_background.jpguh%jh'h(h)Mhj+h&hubj)}(hipygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)h]hipygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M hj+h&hubj)}(h@.. image:: ../../reST/tut/camera_green.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_green.jpgj}jjsj../../reST/tut/camera_green.jpguh%jh'h(h)Mhj+h&hubeh}(h]thresholding-umbralizacionah]h]thresholding (umbralización)ah]h!]uh%h9hjh&hh'h(h)Kubh:)}(hhh](h?)}(hUso del Módulo de Máscarah]hUso del Módulo de Máscara}hj&sbah}(h]h]h]h]h!]uh%h>hj#h&hh'h(h)Mubh)}(hXiLo anterior es genial si solo querés mostrar imágenes, pero con el módulo :mod:`mask module `, también podés usar la cámara como dispositivo de entrada para un juego. Por ejemplo, volviendo al ejemplo de la umbralización de un objeto específico, podemos encontrar la posición de ese objeto y usarlo para controlar un objeto en la pantalla.h](hMLo anterior es genial si solo querés mostrar imágenes, pero con el módulo }hj4sbj)}(h :mod:`mask module `h]j)}(hj>h]h mask module}hj@sbah}(h]h](j%pypy-modeh]h]h!]uh%jhj<ubah}(h]h]h]h]h!]refdocj2 refdomainjJreftypemod refexplicitrefwarnj8Nj9Nj: pygame.maskuh%jh'h(h)Mhj4ubh, también podés usar la cámara como dispositivo de entrada para un juego. Por ejemplo, volviendo al ejemplo de la umbralización de un objeto específico, podemos encontrar la posición de ese objeto y usarlo para controlar un objeto en la pantalla.}hj4sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubj)}(hXdef get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # umbralizar contra el color que obtuvimos antes mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # mantener solo el manchón más grande de ese color connected = mask.connected_component() # asegurarse que el manchón sea lo suficientemente grande, que no sea solo perturbaciones if mask.count() > 100: # encontrar el centro del manchónfind the center of the blob coord = mask.centroid() # dibujar un círculo con un tamaño variable en el tamaño del manchón pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip()h]hXdef get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # umbralizar contra el color que obtuvimos antes mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # mantener solo el manchón más grande de ese color connected = mask.connected_component() # asegurarse que el manchón sea lo suficientemente grande, que no sea solo perturbaciones if mask.count() > 100: # encontrar el centro del manchónfind the center of the blob coord = mask.centroid() # dibujar un círculo con un tamaño variable en el tamaño del manchón pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip()}hjfsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhj#h&hubj)}(h?.. image:: ../../reST/tut/camera_mask.jpg :class: trailing h]h}(h]h]trailingah]h]h!]uri../reST/tut/camera_mask.jpgj}jjsj../../reST/tut/camera_mask.jpguh%jh'h(h)M-hj#h&hubh)}(hX$Este es solo el ejemplo más básico. Podés rastrear múltiples manchas de diferentes colores, encontrar los contornos de los objetos, tener detección de colisiones entre objetos de la vida real y del juego, obtener el ángulo de un objetos para permitir su control, y más. ¡A divertirse!h]hX$Este es solo el ejemplo más básico. Podés rastrear múltiples manchas de diferentes colores, encontrar los contornos de los objetos, tener detección de colisiones entre objetos de la vida real y del juego, obtener el ángulo de un objetos para permitir su control, y más. ¡A divertirse!}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M1hj#h&hubeh}(h]uso-del-modulo-de-mascaraah]h]uso del módulo de máscaraah]h!]uh%h9hjh&hh'h(h)Mubeh}(h]vision-basica-por-computadoraah]h]visión básica por computadoraah]h!]uh%h9hhNh&hh'h(h)Kubeh}(h] introduccion-al-modulo-de-camaraah]h]#introducción al módulo de cámaraah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]2tutoriales-pygame-introduccion-al-modulo-de-camaraah]h]7tutoriales pygame - introducción al módulo de cámaraah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjjjCj@jjj;j8jjjjj(j%j jjju nametypes}(jjjjCjj;jjj(j juh}(jh;jhNjjpj@jjjj8j jjFjjj%jjj+jj#u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]!docs/es/tutorials/CamaraIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.1431324 pygame-2.6.1/docs/generated/es/doctrees/tutorials/ChimpanceLineaporLinea.doctree0000644000175100001770000021560014676242430027457 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hCTUTORIAL:Descripciones línea por línea del ejemplo del chimpancéh]h TextCTUTORIAL:Descripciones línea por línea del ejemplo del chimpancé}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceL/home/runner/work/pygame/pygame/docs/es/tutorials/ChimpanceLineaporLinea.rstlineKubh )}(h Common definitions for tutorialsh]h Common definitions for tutorials}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/es/tutorials/common.txth)Kubh section)}(hhh](h title)}(h>Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Líneah]h>Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(hChimpancé, Línea Por Líneah]hChimpancé, Línea Por Línea}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAutorh]hAutor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(hAPete Shinners. Traducción al español: Estefania Pivaral Serranoh]h paragraph)}(hh}h]hAPete Shinners. Traducción al español: Estefania Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)K hh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)K hhah&hubhe)}(hhh](hj)}(hContactoh]hContacto}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.org h]h)}(hpete@shinners.orgh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)K ubh compound)}(hhh]htoctree)}(hhh]h}(h]h]h]h]h!]h tutorials/ChimpanceLineaporLineaentries]Ntutorials/chimpance.pya includefiles]hamaxdepthJcaptionNglobhidden includehiddennumberedK titlesonly rawentries]uh%hh'h(h)Khhubah}(h]h]toctree-wrapperah]h]h!]uh%hhhNh&hh'h(h)Nubh:)}(hhh](h?)}(h Introducciónh]h Introducción}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hXEntre los ejemplos de *pygame* hay un ejemplo simple llamado "chimp" (chimpancé). Este ejemplo simula un mono golpeable que se mueve alrededor de la pantalla con promesas de riquezas y recomepensas. El ejemplo en sí es muy simple y acarrea poco código de comprobación de error. Como modelo de programa, Chimp demuestra muchas de las bondades de pygame, como por ejemplo crear una ventana, cargar imágenes y sonidos, representar texto, y manejo de eventos básicos y del mouse.h](hEntre los ejemplos de }hjsbh emphasis)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjubhX hay un ejemplo simple llamado "chimp" (chimpancé). Este ejemplo simula un mono golpeable que se mueve alrededor de la pantalla con promesas de riquezas y recomepensas. El ejemplo en sí es muy simple y acarrea poco código de comprobación de error. Como modelo de programa, Chimp demuestra muchas de las bondades de pygame, como por ejemplo crear una ventana, cargar imágenes y sonidos, representar texto, y manejo de eventos básicos y del mouse.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hEl programa y las imagenes se pueden encontrar dentro de la fuente estándar de distribución de pygame. Se puede ejecutar al correr `python -m pygame.examples.chimp` en la terminal.h](hEl programa y las imagenes se pueden encontrar dentro de la fuente estándar de distribución de pygame. Se puede ejecutar al correr }hj7sbh title_reference)}(h!`python -m pygame.examples.chimp`h]hpython -m pygame.examples.chimp}hjAsbah}(h]h]h]h]h!]uh%j?hj7ubh en la terminal.}hj7sbeh}(h]h]h]h]h!]uh%hh'h(h)K hjh&hubh)}(hEste tutorial atravesará el código bloque a bloque, explicando cómo funciona el mismo. Además, se hará mención de cómo se puede mejorar el código y qué errores de comprobación podrían ser de ayuda.h]hEste tutorial atravesará el código bloque a bloque, explicando cómo funciona el mismo. Además, se hará mención de cómo se puede mejorar el código y qué errores de comprobación podrían ser de ayuda.}hjYsbah}(h]h]h]h]h!]uh%hh'h(h)K$hjh&hubh)}(hXEste tutorial es excelente para aquellas personas que están buscando una primera aproximación a códigos de *pygame*. Una vez que *pygame* esté completamente instalado, podrás encontrar y ejecutar la demostración del chimpancé para ti mismo en el directorio de ejemplos.h](hnEste tutorial es excelente para aquellas personas que están buscando una primera aproximación a códigos de }hjgsbj)}(h*pygame*h]hpygame}hjosbah}(h]h]h]h]h!]uh%jhjgubh. Una vez que }hjgsbj)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjgubh esté completamente instalado, podrás encontrar y ejecutar la demostración del chimpancé para ti mismo en el directorio de ejemplos.}hjgsbeh}(h]h]h]h]h!]uh%hh'h(h)K(hjh&hubh container)}(h.. rst-class:: small-heading (no, este no es un anuncio, es una captura de pantalla) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source `h](h)}(h7(no, este no es un anuncio, es una captura de pantalla)h]h7(no, este no es un anuncio, es una captura de pantalla)}hjsbah}(h]h] small-headingah]h]h!]uh%hh'h(h)K1hjubh image)}(h4.. image:: chimpshot.gif :alt: chimp game banner h]h}(h]h]h]h]h!]altchimp game banneruritutorials/chimpshot.gif candidates}*js original_uri chimpshot.gifuh%jh'h(h)K3hjubh)}(h!:doc:`Full Source `h]h pending_xref)}(hjh]h inline)}(hjh]h Full Source}hjsbah}(h]h](xrefstdstd-doceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoch refdomainjreftypedoc refexplicitrefwarn reftarget chimpance.pyuh%jh'h(h)K6hjubah}(h]h]h]h]h!]uh%hh'h(h)K6hjubeh}(h]h]( fullwidthleadingtrailingeh]h]h!]uh%jhjh&hh'h(h)Nubeh}(h] introduccionah]h] introducciónah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hImportación de Módulosh]hImportación de Módulos}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)K:ubh)}(hEste es el código que importa todos los módulos necesarios del programa. Este código también comprueba la disponibilidad de algunos de los módulos opcionales de pygame. ::h]hEste es el código que importa todos los módulos necesarios del programa. Este código también comprueba la disponibilidad de algunos de los módulos opcionales de pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K` o :mod:`mixer ` no están disponibles. (Aunque estos solo podrían no estar disponibles en situaciones poco comunes).h](hcAlgunos de los módulos de pygame son opcionales, y si no fueran encontrados, la evaluación será }hjtsbjI)}(h ``False``h]hFalse}hj|sbah}(h]h]h]h]h!]uh%jHhjtubh_. Es por eso que decidimos mostrar (print) un agradable mensaje de advertencia si los módulos }hjtsbj)}(h:mod:`font`h]jI)}(hjh]hfont}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classNj pygame.fontuh%jh'h(h)KUhjtubh o }hjtsbj)}(h:mod:`mixer `h]jI)}(hjh]hmixer}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.mixeruh%jh'h(h)KUhjtubhf no están disponibles. (Aunque estos solo podrían no estar disponibles en situaciones poco comunes).}hjtsbeh}(h]h]h]h]h!]uh%hh'h(h)KUhjh&hubh)}(hXxFinalmente, se preparan dos rutas que serán usadas para el resto del código. Una de ellas es ``main_dir``, que usa el módulo `os.path` y la variable `__file__` asignada por Python para localizar el archivo de juegos de python, y extraer la carpeta desde esa ruta. Luego, ésta prepara la ruta ``data_dir`` para indicarle a las funciones de carga exactamente dónde buscar.h](h_Finalmente, se preparan dos rutas que serán usadas para el resto del código. Una de ellas es }hjsbjI)}(h ``main_dir``h]hmain_dir}hjsbah}(h]h]h]h]h!]uh%jHhjubh, que usa el módulo }hjsbj@)}(h `os.path`h]hos.path}hjsbah}(h]h]h]h]h!]uh%j?hjubh y la variable }hjsbj@)}(h `__file__`h]h__file__}hj sbah}(h]h]h]h]h!]uh%j?hjubh asignada por Python para localizar el archivo de juegos de python, y extraer la carpeta desde esa ruta. Luego, ésta prepara la ruta }hjsbjI)}(h ``data_dir``h]hdata_dir}hjsbah}(h]h]h]h]h!]uh%jHhjubhC para indicarle a las funciones de carga exactamente dónde buscar.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K[hjh&hubeh}(h]importacion-de-modulosah]h]importación de módulosah]h!]uh%h9hhNh&hh'h(h)K:ubh:)}(hhh](h?)}(hCarga de Recursosh]hCarga de Recursos}hj?sbah}(h]h]h]h]h!]uh%h>hj<h&hh'h(h)Kcubh)}(hA continuación, se presentan dos funciones que se pueden usar para cargar imágenes y sonidos. En esta sección examinaremos cada función individualmente. ::h]hA continuación, se presentan dos funciones que se pueden usar para cargar imágenes y sonidos. En esta sección examinaremos cada función individualmente.}hjMsbah}(h]h]h]h]h!]uh%hh'h(h)Kehj<h&hubj#)}(hXdef load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect()h]hXdef load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect()}hj[sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Khhj<h&hubh)}(hX?Esta función toma el nombre de la imagen a cargar. Opcionalmente, también toma un argumento que puede usar para definir la clave de color (colorkey) de la imagen, y un argumento para determinar la escala de la imagen. La clave de color se usa en la gráfica para representar un color en la imagen que es transparente.h]hX?Esta función toma el nombre de la imagen a cargar. Opcionalmente, también toma un argumento que puede usar para definir la clave de color (colorkey) de la imagen, y un argumento para determinar la escala de la imagen. La clave de color se usa en la gráfica para representar un color en la imagen que es transparente.}hjisbah}(h]h]h]h]h!]uh%hh'h(h)Kxhj<h&hubh)}(hXLo que esta función hace en primera instancia es crearle al archivo un nombre de ruta completo. En este ejemplo, todos los recursos están en el subdirectorio "data". Al usar la función `os.path.join`, se creará el nombre de ruta para cualquier plataforma en que se ejecute el juego.h](hLo que esta función hace en primera instancia es crearle al archivo un nombre de ruta completo. En este ejemplo, todos los recursos están en el subdirectorio "data". Al usar la función }hjwsbj@)}(h`os.path.join`h]h os.path.join}hjsbah}(h]h]h]h]h!]uh%j?hjwubhT, se creará el nombre de ruta para cualquier plataforma en que se ejecute el juego.}hjwsbeh}(h]h]h]h]h!]uh%hh'h(h)K~hj<h&hubh)}(hXEl paso siguiente es cargar la imagen usando la función :func:`pygame.image.load`. Luego de que la imagen se cargue, llamamos a la función `convert()`. Al hacer esto se crea una nueva copia del Surface y convierte su formato de color y la profundidad, de tal forma que coincida con el mostrado. Esto significa que el dibujo (blitting) de la imagen a la pantalla sucederá lo más rápido posible.h](h9El paso siguiente es cargar la imagen usando la función }hjsbj)}(h:func:`pygame.image.load`h]jI)}(hjh]hpygame.image.load()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.image.loaduh%jh'h(h)Khjubh;. Luego de que la imagen se cargue, llamamos a la función }hjsbj@)}(h `convert()`h]h convert()}hjsbah}(h]h]h]h]h!]uh%j?hjubh. Al hacer esto se crea una nueva copia del Surface y convierte su formato de color y la profundidad, de tal forma que coincida con el mostrado. Esto significa que el dibujo (blitting) de la imagen a la pantalla sucederá lo más rápido posible.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj<h&hubh)}(hX'Luego, usando la función :func:`pygame.transform.scale` se definirá el tamaño de la imagen. Esta función toma una Surface y el tamaño al cual se debería adecuar. Para darle tamaño con números escalares, se puede tomar la medida y determinar las dimensiones *x* e *y* con número escalar.h](hLuego, usando la función }hjsbj)}(h:func:`pygame.transform.scale`h]jI)}(hjh]hpygame.transform.scale()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.transform.scaleuh%jh'h(h)Khjubh se definirá el tamaño de la imagen. Esta función toma una Surface y el tamaño al cual se debería adecuar. Para darle tamaño con números escalares, se puede tomar la medida y determinar las dimensiones }hjsbj)}(h*x*h]hx}hjsbah}(h]h]h]h]h!]uh%jhjubh e }hjsbj)}(h*y*h]hy}hjsbah}(h]h]h]h]h!]uh%jhjubh con número escalar.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj<h&hubh)}(hXFinalmente, definimos la clave de color para la imagen. Si el usuario suministró un valor para el parametro de la clave de color, usamos ese valor como la clave de color de la imagen. Usualmente, éste sería un valor de color RGB (red-green-blue = rojo-verde-azul), como (255, 255, 255) para el color blanco. También es posible pasar el valor -1 como la clave de color. En este caso, la función buscará el color en el píxel de arriba a la izquierda de la imagen, y lo usará para la clave de color. ::h]hXFinalmente, definimos la clave de color para la imagen. Si el usuario suministró un valor para el parametro de la clave de color, usamos ese valor como la clave de color de la imagen. Usualmente, éste sería un valor de color RGB (red-green-blue = rojo-verde-azul), como (255, 255, 255) para el color blanco. También es posible pasar el valor -1 como la clave de color. En este caso, la función buscará el color en el píxel de arriba a la izquierda de la imagen, y lo usará para la clave de color.}hj1sbah}(h]h]h]h]h!]uh%hh'h(h)Khj<h&hubj#)}(hXdef load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return soundh]hXdef load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound}hj?sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Khj<h&hubh)}(hXLa anterior, es la función para cargar un archivo de sonido. Lo primero que hace esta función es verificar si el módulo :mod:`pygame.mixer` se importó correctamente. En caso de no ser así, la función va a devolver una instancia de reproducción de un sonido de error. Esto obrará como un objeto de Sonido normal para que el juego se ejecute sin ningún error de comprobación extra.h](h{La anterior, es la función para cargar un archivo de sonido. Lo primero que hace esta función es verificar si el módulo }hjMsbj)}(h:mod:`pygame.mixer`h]jI)}(hjWh]h pygame.mixer}hjYsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjUubah}(h]h]h]h]h!]refdoch refdomainjcreftypemod refexplicitrefwarnjNjNj pygame.mixeruh%jh'h(h)KhjMubh se importó correctamente. En caso de no ser así, la función va a devolver una instancia de reproducción de un sonido de error. Esto obrará como un objeto de Sonido normal para que el juego se ejecute sin ningún error de comprobación extra.}hjMsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj<h&hubh)}(hEsta funcion es similar a la función de carga de imagen, pero maneja diferentes problemas. Primero, creamos una ruta completa al sonido de la imagen y cargamos el archivo de sonido. Luego, simplemente devolvemos el objeto de Sonido cargado.h]hEsta funcion es similar a la función de carga de imagen, pero maneja diferentes problemas. Primero, creamos una ruta completa al sonido de la imagen y cargamos el archivo de sonido. Luego, simplemente devolvemos el objeto de Sonido cargado.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj<h&hubeh}(h]carga-de-recursosah]h]carga de recursosah]h!]uh%h9hhNh&hh'h(h)Kcubh:)}(hhh](h?)}(hClases de Objetos para Juegosh]hClases de Objetos para Juegos}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hEn este caso creamos dos clases (classes) que representan los objetos en nuestro juego. Casi toda la logica del juego se organiza en estas dos clases. A continuación las revisaremos de a una. ::h]hEn este caso creamos dos clases (classes) que representan los objetos en nuestro juego. Casi toda la logica del juego se organiza en estas dos clases. A continuación las revisaremos de a una.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj#)}(hXclass Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = Falseh]hXclass Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False}hjsbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Khjh&hubh)}(hXqEn este caso, creamos una clase (class) que representa el puño del jugador. Esta se deriva de la clase `Sprite` incluida en el módulo :mod:`pygame.sprite`. La función `__init__` es llamada cuando se crean nuevas instancias de este clase. Esto le permite a la función `__init__` del Sprite preparar nuestro objeto para ser usado como una imagen (sprite). Este juego usa uno de los dibujos de sprite de la clase de Grupo. Estas clases pueden dibujar sprites que tienen un atributo "imagen" y uno "rect". Al cambiar simplemente estos dos atributos, el compilador (renderer) dibujará la imagen actual en la posición actual.h](hhEn este caso, creamos una clase (class) que representa el puño del jugador. Esta se deriva de la clase }hjsbj@)}(h`Sprite`h]hSprite}hjsbah}(h]h]h]h]h!]uh%j?hjubh incluida en el módulo }hjsbj)}(h:mod:`pygame.sprite`h]jI)}(hjh]h pygame.sprite}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.spriteuh%jh'h(h)Khjubh. La función }hjsbj@)}(h `__init__`h]h__init__}hjsbah}(h]h]h]h]h!]uh%j?hjubh[ es llamada cuando se crean nuevas instancias de este clase. Esto le permite a la función }hjsbj@)}(h `__init__`h]h__init__}hjsbah}(h]h]h]h]h!]uh%j?hjubhXX del Sprite preparar nuestro objeto para ser usado como una imagen (sprite). Este juego usa uno de los dibujos de sprite de la clase de Grupo. Estas clases pueden dibujar sprites que tienen un atributo "imagen" y uno "rect". Al cambiar simplemente estos dos atributos, el compilador (renderer) dibujará la imagen actual en la posición actual.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXTodos los sprites tienen un método `update()`. Esta función es tipicamente llamada una vez por cuadro. Es en esta función donde se debería colocar el código que mueva y actualice las variables para el sprite. El método de `update()` para el movimiento del puño, mueve el puño al lugar donde se encuentre el puntero del mouse. Asímismo, compensa sutilmente la posición del puño sobre el objeto, si el puño está en condición de golpear.h](h$Todos los sprites tienen un método }hj*sbj@)}(h `update()`h]hupdate()}hj2sbah}(h]h]h]h]h!]uh%j?hj*ubh. Esta función es tipicamente llamada una vez por cuadro. Es en esta función donde se debería colocar el código que mueva y actualice las variables para el sprite. El método de }hj*sbj@)}(h `update()`h]hupdate()}hjDsbah}(h]h]h]h]h!]uh%j?hj*ubh para el movimiento del puño, mueve el puño al lugar donde se encuentre el puntero del mouse. Asímismo, compensa sutilmente la posición del puño sobre el objeto, si el puño está en condición de golpear.}hj*sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hLas siguientes dos funciones `punch()` y `unpunch()` cambian la condición de golpeado del puño. El método `punch()` también devuelve un valor verdadero si el puño está chocando con el sprite objetivo. ::h](hLas siguientes dos funciones }hj\sbj@)}(h `punch()`h]hpunch()}hjdsbah}(h]h]h]h]h!]uh%j?hj\ubh y }hj\sbj@)}(h `unpunch()`h]h unpunch()}hjvsbah}(h]h]h]h]h!]uh%j?hj\ubh9 cambian la condición de golpeado del puño. El método }hj\sbj@)}(h `punch()`h]hpunch()}hjsbah}(h]h]h]h]h!]uh%j?hj\ubhX también devuelve un valor verdadero si el puño está chocando con el sprite objetivo.}hj\sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj#)}(hXxclass Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite intializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.imageh]hXxclass Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite intializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image}hjsbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Khjh&hubh)}(hXSi bien la clase (class) `Chimp` está haciendo un poco más de trabajo que el puño, no resulta mucho más complejo. Esta clase moverá al chimpancé hacia adelante y hacia atrás, por la pantalla. Cuando el mono es golpeado, él girará con un efecto de emoción. Esta clase también es derivada de la base de clases :class:`Sprite ` y es iniciada de igual manera que el puño. Mientras se inicia, la clase también establece el atributo "area" para que sea del tamaño de la pantalla de visualización.h](hSi bien la clase (class) }hjsbj@)}(h`Chimp`h]hChimp}hjsbah}(h]h]h]h]h!]uh%j?hjubhX está haciendo un poco más de trabajo que el puño, no resulta mucho más complejo. Esta clase moverá al chimpancé hacia adelante y hacia atrás, por la pantalla. Cuando el mono es golpeado, él girará con un efecto de emoción. Esta clase también es derivada de la base de clases }hjsbj)}(h&:class:`Sprite `h]jI)}(hjh]hSprite}hjsbah}(h]h](jpypy-classeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypeclass refexplicitrefwarnjNjNjpygame.sprite.Spriteuh%jh'h(h)Mhjubh y es iniciada de igual manera que el puño. Mientras se inicia, la clase también establece el atributo "area" para que sea del tamaño de la pantalla de visualización.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXMLa función `update` para el chimpancé simplemente se fija en el estado actual del mono. Esta puede ser "dizzy" (mareado), la cual sería verdadera si el mono está girando a causa del golpe. La función llama al método `_spin` o `_walk`. Estas funciones son prefijadas con un guión bajo, lo cual en el idioma estándar de python sugiere que estos métodos deberían ser solo usados por la clase `Chimp`. Podríamos incluso hasta escribirlas con un doble guión bajo, lo cual indicaría a python que realmente intente hacerlas un método privado, pero no necesitamos tal protección. :)h](h La función }hjsbj@)}(h`update`h]hupdate}hjsbah}(h]h]h]h]h!]uh%j?hjubh para el chimpancé simplemente se fija en el estado actual del mono. Esta puede ser "dizzy" (mareado), la cual sería verdadera si el mono está girando a causa del golpe. La función llama al método }hjsbj@)}(h`_spin`h]h_spin}hj sbah}(h]h]h]h]h!]uh%j?hjubh o }hjsbj@)}(h`_walk`h]h_walk}hjsbah}(h]h]h]h]h!]uh%j?hjubh. Estas funciones son prefijadas con un guión bajo, lo cual en el idioma estándar de python sugiere que estos métodos deberían ser solo usados por la clase }hjsbj@)}(h`Chimp`h]hChimp}hj0sbah}(h]h]h]h]h!]uh%j?hjubh. Podríamos incluso hasta escribirlas con un doble guión bajo, lo cual indicaría a python que realmente intente hacerlas un método privado, pero no necesitamos tal protección. :)}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M%hjh&hubh)}(hXEl método `_walk` crea una nueva posición para el mono al mover el 'rect' actual al centro del puño. Si la nueva posición se cruza hacia afuera del área de visualización de la pantalla, el movimiento del puño da marcha atrás. También imita la imagen usando la función :func:`pygame.transform.flip`. Este es un efecto crudo que hace que el mono se vea como si estuviera cambiando de dirección.h](h El método }hjHsbj@)}(h`_walk`h]h_walk}hjPsbah}(h]h]h]h]h!]uh%j?hjHubhX crea una nueva posición para el mono al mover el 'rect' actual al centro del puño. Si la nueva posición se cruza hacia afuera del área de visualización de la pantalla, el movimiento del puño da marcha atrás. También imita la imagen usando la función }hjHsbj)}(h:func:`pygame.transform.flip`h]jI)}(hjdh]hpygame.transform.flip()}hjfsbah}(h]h](jpypy-funceh]h]h!]uh%jHhjbubah}(h]h]h]h]h!]refdoch refdomainjpreftypefunc refexplicitrefwarnjNjNjpygame.transform.flipuh%jh'h(h)M.hjHubh`. Este es un efecto crudo que hace que el mono se vea como si estuviera cambiando de dirección.}hjHsbeh}(h]h]h]h]h!]uh%hh'h(h)M.hjh&hubh)}(hXEl método `_spin` es llamado cuando el mono está actualmente en estado "dizzy" (mareado). El atributo 'dizzy' es usado para guardar el monto de rotación. Cuando el mono ha rotado por completo en su eje (360 grados) se resetea la imagen a la versión original no rotada. Antes de llamar a la función :func:`pygame.transform.rotate`, verás que el código hace una referencia local a la función simplemente llamanda "rotate". No hay ncesidad de hacer eso en este ejemplo, aquí fue realizada para mantener la siguiente línea un poco más corta. Notese que al llamar a la función `rotate`, se está siempre rotando la imagen original del mono. Cuando rotamos, hay un pequeña pérdida de calidad. Rotar repetidamente la misma imagen genera que la calidad se deteriore cada vez más. Esto se debe a que las esquinas de la imagen van a haber sido rotadas de más, causando que la imagen se haga más grande. Nos aseguramos que la nueva imagen coincida con el centro de la vieja imagen, para que de esta forma se rote sin moverse.h](h El método }hjsbj@)}(h`_spin`h]h_spin}hjsbah}(h]h]h]h]h!]uh%j?hjubhX es llamado cuando el mono está actualmente en estado "dizzy" (mareado). El atributo 'dizzy' es usado para guardar el monto de rotación. Cuando el mono ha rotado por completo en su eje (360 grados) se resetea la imagen a la versión original no rotada. Antes de llamar a la función }hjsbj)}(h:func:`pygame.transform.rotate`h]jI)}(hjh]hpygame.transform.rotate()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.transform.rotateuh%jh'h(h)M5hjubh, verás que el código hace una referencia local a la función simplemente llamanda "rotate". No hay ncesidad de hacer eso en este ejemplo, aquí fue realizada para mantener la siguiente línea un poco más corta. Notese que al llamar a la función }hjsbj@)}(h`rotate`h]hrotate}hjsbah}(h]h]h]h]h!]uh%j?hjubhX, se está siempre rotando la imagen original del mono. Cuando rotamos, hay un pequeña pérdida de calidad. Rotar repetidamente la misma imagen genera que la calidad se deteriore cada vez más. Esto se debe a que las esquinas de la imagen van a haber sido rotadas de más, causando que la imagen se haga más grande. Nos aseguramos que la nueva imagen coincida con el centro de la vieja imagen, para que de esta forma se rote sin moverse.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)M5hjh&hubh)}(hEl último método es `punched()` el cual indica al sprite que entre en un estado de mareo. Esto causará que la imagen empice a girar. Además, también crea una copia de la actual imagen llamada "original".h](hEl último método es }hjsbj@)}(h `punched()`h]h punched()}hjsbah}(h]h]h]h]h!]uh%j?hjubh el cual indica al sprite que entre en un estado de mareo. Esto causará que la imagen empice a girar. Además, también crea una copia de la actual imagen llamada "original".}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)MDhjh&hubeh}(h]clases-de-objetos-para-juegosah]h]clases de objetos para juegosah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hInicializar Todoh]hInicializar Todo}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)MJubh)}(hAntes de poder hacer algo con pygame, necesitamos asegurarnos que los módulos estén inicializados. En este caso, vamos a abrir también una simple ventana de gráficos. Ahora estamos en la función `main()` del programa, la cual ejecuta todo. ::h](hAntes de poder hacer algo con pygame, necesitamos asegurarnos que los módulos estén inicializados. En este caso, vamos a abrir también una simple ventana de gráficos. Ahora estamos en la función }hjsbj@)}(h`main()`h]hmain()}hj#sbah}(h]h]h]h]h!]uh%j?hjubh$ del programa, la cual ejecuta todo.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)MLhj h&hubj#)}(hpg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False)h]hpg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False)}hj;sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)MRhj h&hubh)}(hXLa primera línea para inicializar *pygame* realiza algo de trabajo por nosotros. Verifica a través del módulo importado *pygame* e intenta inicializar cada uno de ellos. Es posible volver y verificar que los módulos que fallaron al iniciar, pero no vamos a molestarnos acá con eso. También es posible tomar mucho más control e inicializar cada módulo en especifico, uno a uno. Ese tipo de control no es necesario generalmente, pero está disponible en caso de ser deseado.h](h#La primera línea para inicializar }hjIsbj)}(h*pygame*h]hpygame}hjQsbah}(h]h]h]h]h!]uh%jhjIubhP realiza algo de trabajo por nosotros. Verifica a través del módulo importado }hjIsbj)}(h*pygame*h]hpygame}hjcsbah}(h]h]h]h]h!]uh%jhjIubhX] e intenta inicializar cada uno de ellos. Es posible volver y verificar que los módulos que fallaron al iniciar, pero no vamos a molestarnos acá con eso. También es posible tomar mucho más control e inicializar cada módulo en especifico, uno a uno. Ese tipo de control no es necesario generalmente, pero está disponible en caso de ser deseado.}hjIsbeh}(h]h]h]h]h!]uh%hh'h(h)MWhj h&hubh)}(hXLuego, se configura el modo de visualización de gráficos. Notse que el módulo :mod:`pygame.display` es usado para controlar todas las configuraciones de visualización. En este caso nosotros estamos buscando una ventana 1280x480, con ``SCALED``, que es la señal de visualización (display flag) Esto aumenta proporcionalmente la ventana de visualización (display) más grande que la ventana. (window)h](hQLuego, se configura el modo de visualización de gráficos. Notse que el módulo }hj{sbj)}(h:mod:`pygame.display`h]jI)}(hjh]hpygame.display}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNjpygame.displayuh%jh'h(h)M^hj{ubh es usado para controlar todas las configuraciones de visualización. En este caso nosotros estamos buscando una ventana 1280x480, con }hj{sbjI)}(h ``SCALED``h]hSCALED}hjsbah}(h]h]h]h]h!]uh%jHhj{ubh, que es la señal de visualización (display flag) Esto aumenta proporcionalmente la ventana de visualización (display) más grande que la ventana. (window)}hj{sbeh}(h]h]h]h]h!]uh%hh'h(h)M^hj h&hubh)}(hXPor último, establecemos el título de la ventana y apagamos el cursor del mouse para nuestra ventana. Es una acción básica y ahora tenemos una pequeña ventana negra que está lista para nuestras instrucciones (bidding) u ofertas. Generalmente, el cursor se mantiene visible por default, asi que no hay mucha necesidad de realmente establecer este estado a menos que querramos esconderlo.h]hXPor último, establecemos el título de la ventana y apagamos el cursor del mouse para nuestra ventana. Es una acción básica y ahora tenemos una pequeña ventana negra que está lista para nuestras instrucciones (bidding) u ofertas. Generalmente, el cursor se mantiene visible por default, asi que no hay mucha necesidad de realmente establecer este estado a menos que querramos esconderlo.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mehj h&hubeh}(h]inicializar-todoah]h]inicializar todoah]h!]uh%h9hhNh&hh'h(h)MJubh:)}(hhh](h?)}(hCrear el Fondoh]hCrear el Fondo}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mmubh)}(hNuestro programa va a tener un mensaje de texto en el fondo. Sería bueno crear un único surface que represente el fondo y lo use repetidas veces. El primer paso es crear el Surface. ::h]hNuestro programa va a tener un mensaje de texto en el fondo. Sería bueno crear un único surface que represente el fondo y lo use repetidas veces. El primer paso es crear el Surface.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mohjh&hubj#)}(hmbackground = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187))h]hmbackground = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187))}hjsbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mshjh&hubh)}(hX`Esto crea el nuevo surface, que en nuestro caso, es del mismo tamaño que la ventana de visualización. Notese el llamado extra a `convert()` luego de crear la Surface. La función `convert()` sin argumentos es para asegurarnos que nuestro fondo sea del mismo formato que la ventana de visualización, lo cual nos va a brindar resultados más rápidos.h](hEsto crea el nuevo surface, que en nuestro caso, es del mismo tamaño que la ventana de visualización. Notese el llamado extra a }hjsbj@)}(h `convert()`h]h convert()}hj sbah}(h]h]h]h]h!]uh%j?hjubh( luego de crear la Surface. La función }hjsbj@)}(h `convert()`h]h convert()}hjsbah}(h]h]h]h]h!]uh%j?hjubh sin argumentos es para asegurarnos que nuestro fondo sea del mismo formato que la ventana de visualización, lo cual nos va a brindar resultados más rápidos.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mwhjh&hubh)}(hXLo que nosotros hicimos también, fue rellenar el fondo con un color verduzco. La función `fill()` suele tomar como argumento tres instancias de colores RGB, pero soporta muchos formatos de entrada. Para ver todos los formatos de color veasé :mod:`pygame.Color`.h](h[Lo que nosotros hicimos también, fue rellenar el fondo con un color verduzco. La función }hj4sbj@)}(h`fill()`h]hfill()}hj<sbah}(h]h]h]h]h!]uh%j?hj4ubh suele tomar como argumento tres instancias de colores RGB, pero soporta muchos formatos de entrada. Para ver todos los formatos de color veasé }hj4sbj)}(h:mod:`pygame.Color`h]jI)}(hjPh]h pygame.Color}hjRsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjNubah}(h]h]h]h]h!]refdoch refdomainj\reftypemod refexplicitrefwarnjNjNj pygame.Coloruh%jh'h(h)M}hj4ubh.}hj4sbeh}(h]h]h]h]h!]uh%hh'h(h)M}hjh&hubeh}(h]crear-el-fondoah]h]crear el fondoah]h!]uh%h9hhNh&hh'h(h)Mmubh:)}(hhh](h?)}(hCentrar Texto en el Fondoh]hCentrar Texto en el Fondo}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubh)}(hAhora que tenemos el surface del fondo, vamos a representar el texto en él. Nosotros solo haremos esto si vemos que el módulo :mod:`pygame.font` se importó correctamente. De no ser así, hay que saltear esta sección. ::h](hAhora que tenemos el surface del fondo, vamos a representar el texto en él. Nosotros solo haremos esto si vemos que el módulo }hjsbj)}(h:mod:`pygame.font`h]jI)}(hjh]h pygame.font}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jHhjubah}(h]h]h]h]h!]refdoch refdomainjreftypemod refexplicitrefwarnjNjNj pygame.fontuh%jh'h(h)MhjubhJ se importó correctamente. De no ser así, hay que saltear esta sección.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj#)}(hif pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos)h]hif pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos)}hjsbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhjh&hubh)}(hTal como pueden ver, hay un par de pasos para realizar esto. Primero, debemos crear la fuente del objeto y renderizarlo (representarlo) en una nueva Surface. Luego, buscamos el centro de esa nueva surface y lo pegamos (blit) al fondo.h]hTal como pueden ver, hay un par de pasos para realizar esto. Primero, debemos crear la fuente del objeto y renderizarlo (representarlo) en una nueva Surface. Luego, buscamos el centro de esa nueva surface y lo pegamos (blit) al fondo.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXkLa fuente es creada con el constructor `Font()` del módulo `font`. Generalmente, uno va a poner el nombre de la fuente TrueType en esta función, pero también se puede poner `None`, como hicimos en este caso, y entonces se usará la fuente por predeterminada. El constructor `Font` también necesita la información del tamaño de la fuente que se quiere crear.h](h'La fuente es creada con el constructor }hjsbj@)}(h`Font()`h]hFont()}hjsbah}(h]h]h]h]h!]uh%j?hjubh del módulo }hjsbj@)}(h`font`h]hfont}hjsbah}(h]h]h]h]h!]uh%j?hjubhn. Generalmente, uno va a poner el nombre de la fuente TrueType en esta función, pero también se puede poner }hjsbj@)}(h`None`h]hNone}hj sbah}(h]h]h]h]h!]uh%j?hjubh_, como hicimos en este caso, y entonces se usará la fuente por predeterminada. El constructor }hjsbj@)}(h`Font`h]hFont}hj sbah}(h]h]h]h]h!]uh%j?hjubhP también necesita la información del tamaño de la fuente que se quiere crear.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXFLuego vamos a represetar (renderizar) la fuente en la nueva surface. La función `render` crea una nueva surface que es del tamaño apropiado para nuestro texto. En este caso, también le estamos pidiendo al render que cree un texto suavizado (para un lindo efecto de suavidad en la apariencia) y que use un color gris oscuro.h](hQLuego vamos a represetar (renderizar) la fuente en la nueva surface. La función }hj5 sbj@)}(h`render`h]hrender}hj= sbah}(h]h]h]h]h!]uh%j?hj5 ubh crea una nueva surface que es del tamaño apropiado para nuestro texto. En este caso, también le estamos pidiendo al render que cree un texto suavizado (para un lindo efecto de suavidad en la apariencia) y que use un color gris oscuro.}hj5 sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hLo siguiente que necesitamos es encontrar la posición la posición central, para colocar el texto en el centro de la pantalla. Creamos un objeto "Rect" de las dimensiones del texto, lo cual nos permite asignarlo fácilmente al centro de la pantalla.h]hLo siguiente que necesitamos es encontrar la posición la posición central, para colocar el texto en el centro de la pantalla. Creamos un objeto "Rect" de las dimensiones del texto, lo cual nos permite asignarlo fácilmente al centro de la pantalla.}hjU sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hKFinalmente, blitteamos (pegamos o copiamos) el texto en la imagen de fondo.h]hKFinalmente, blitteamos (pegamos o copiamos) el texto en la imagen de fondo.}hjc sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]centrar-texto-en-el-fondoah]h]centrar texto en el fondoah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(h*Mostrar el Fondo mientras Termina el Setuph]h*Mostrar el Fondo mientras Termina el Setup}hj| sbah}(h]h]h]h]h!]uh%h>hjy h&hh'h(h)Mubh)}(h~Todavía tenemos una ventana negra en la pantalla. Mostremos el fondo mientras esperamos que se carguen los otros recursos. ::h]h{Todavía tenemos una ventana negra en la pantalla. Mostremos el fondo mientras esperamos que se carguen los otros recursos.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjy h&hubj#)}(h5screen.blit(background, (0, 0)) pygame.display.flip()h]h5screen.blit(background, (0, 0)) pygame.display.flip()}hj sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhjy h&hubh)}(hEsto va a blittear (pegar o copiar) nuestro fondo en la ventana de visualización. El blit se explica por sí mismo, pero ¿qué está haciendo esa rutina flip?h]hEsto va a blittear (pegar o copiar) nuestro fondo en la ventana de visualización. El blit se explica por sí mismo, pero ¿qué está haciendo esa rutina flip?}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjy h&hubh)}(hX5En pygame, los cambios en la surface de visualización (display) no se hacen visibles inmediatamente. Normalmente, la pantalla debe ser actualizacada para que el usuario pueda ver los cambios realizados. En este caso la función `flip()` es perfecta para eso porque se encarga de toda el área de la pantalla.h](hEn pygame, los cambios en la surface de visualización (display) no se hacen visibles inmediatamente. Normalmente, la pantalla debe ser actualizacada para que el usuario pueda ver los cambios realizados. En este caso la función }hj sbj@)}(h`flip()`h]hflip()}hj sbah}(h]h]h]h]h!]uh%j?hj ubhH es perfecta para eso porque se encarga de toda el área de la pantalla.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjy h&hubeh}(h]*mostrar-el-fondo-mientras-termina-el-setupah]h]*mostrar el fondo mientras termina el setupah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hPreparar Objetos del Juegoh]hPreparar Objetos del Juego}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Mubh)}(hEEn este caso crearemos todos los objetos que el juego va a necesitar.h]hEEn este caso crearemos todos los objetos que el juego va a necesitar.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj#)}(hwhiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock()h]hwhiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock()}hj sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhj h&hubh)}(hX)Primero cargamos dos efectos de sonido usando la función `load_sound`, que se encuentra definida en código arriba. Luego, creamos una instancia para cada uno de los sprites de la clase. Por último, creamos el sprite :class:`Group ` que va a contener todos nuestros sprites.h](h:Primero cargamos dos efectos de sonido usando la función }hj sbj@)}(h `load_sound`h]h load_sound}hj sbah}(h]h]h]h]h!]uh%j?hj ubh, que se encuentra definida en código arriba. Luego, creamos una instancia para cada uno de los sprites de la clase. Por último, creamos el sprite }hj sbj)}(h$:class:`Group `h]jI)}(hj% h]hGroup}hj' sbah}(h]h](jpypy-classeh]h]h!]uh%jHhj# ubah}(h]h]h]h]h!]refdoch refdomainj1 reftypeclass refexplicitrefwarnjNjNjpygame.sprite.Groupuh%jh'h(h)Mhj ubh* que va a contener todos nuestros sprites.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXZEn realidad, nosotros usamos un grupo especial de sprites llamado :class:`RenderPlain`. Este grupo de sprites puede dibujar en la pantalla todos los sprites que contiene. Es llamado `RenderPlain` porque en realidad hay grupos Render más avanzados, pero para nuestro juego nosotros solo necesitamos un dibujo simple. Nosotros creamos el grupo llamado "allsprites" al pasar una lista con todos los sprites que deberían pertenecer al grupo. Exise la posibilidad, si más adelante quisieramos, de agregar o sacar sprites de este grupo, pero para este juego no sería necesario.h](hBEn realidad, nosotros usamos un grupo especial de sprites llamado }hjM sbj)}(h/:class:`RenderPlain`h]jI)}(hjW h]h RenderPlain}hjY sbah}(h]h](jpypy-classeh]h]h!]uh%jHhjU ubah}(h]h]h]h]h!]refdoch refdomainjc reftypeclass refexplicitrefwarnjNjNjpygame.sprite.RenderPlainuh%jh'h(h)MhjM ubh`. Este grupo de sprites puede dibujar en la pantalla todos los sprites que contiene. Es llamado }hjM sbj@)}(h `RenderPlain`h]h RenderPlain}hjy sbah}(h]h]h]h]h!]uh%j?hjM ubhX| porque en realidad hay grupos Render más avanzados, pero para nuestro juego nosotros solo necesitamos un dibujo simple. Nosotros creamos el grupo llamado "allsprites" al pasar una lista con todos los sprites que deberían pertenecer al grupo. Exise la posibilidad, si más adelante quisieramos, de agregar o sacar sprites de este grupo, pero para este juego no sería necesario.}hjM sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hEl objeto `clock` que creamos será usado para ayudar a controlar la frequencia de cuadros de nuestro juego. Vamos a usarlo en el bucle (loop) principal de nuestro juego para asegurarnos que no se ejecute demasiado rápido.h](h El objeto }hj sbj@)}(h`clock`h]hclock}hj sbah}(h]h]h]h]h!]uh%j?hj ubh que creamos será usado para ayudar a controlar la frequencia de cuadros de nuestro juego. Vamos a usarlo en el bucle (loop) principal de nuestro juego para asegurarnos que no se ejecute demasiado rápido.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]preparar-objetos-del-juegoah]h]preparar objetos del juegoah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hBucle principal (Main Loop)h]hBucle principal (Main Loop)}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Mubh)}(h0No hay mucho por acá, solo un loop infinito. ::h]h-No hay mucho por acá, solo un loop infinito.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj#)}(h,going = True while going: clock.tick(60)h]h,going = True while going: clock.tick(60)}hj sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhj h&hubh)}(hXTodos los juegos se ejecutan sobre una especie de loop. El orden usual de las cosas es verificar el estado de la computadora y la entrada de usuario, mover y actualizar el estado de todos los objetos, y luego dibujarlos en la pantalla. Verás que este ejemplo no es diferente.h]hXTodos los juegos se ejecutan sobre una especie de loop. El orden usual de las cosas es verificar el estado de la computadora y la entrada de usuario, mover y actualizar el estado de todos los objetos, y luego dibujarlos en la pantalla. Verás que este ejemplo no es diferente.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hTambién haremos un llamado a nuestro objeto `clock`, que asegurará que nuestro juego no se ejecute pasando los 60 cuadros por segundo.h](h-También haremos un llamado a nuestro objeto }hj sbj@)}(h`clock`h]hclock}hj sbah}(h]h]h]h]h!]uh%j?hj ubhT, que asegurará que nuestro juego no se ejecute pasando los 60 cuadros por segundo.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]bucle-principal-main-loopah]h]bucle principal (main loop)ah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hManejar los Eventos de Entradah]hManejar los Eventos de Entrada}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Mubh)}(hKEste es un caso extremandamente simple para trabajar la cola de eventos. ::h]hHEste es un caso extremandamente simple para trabajar la cola de eventos.}hj- sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj#)}(hXfor event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch()h]hXfor event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch()}hj; sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhj h&hubh)}(hX$Primero obtenemos todos los Eventos (events) disponibles en pygame y los recorremos en loop. Las primeras dos pruebas es para ver si el usuario dejó nuestro juego, o si presionó la tecla de escape. En estos casos, configuramos ``going`` en ``False``, permitiendonos salir del loop infinito.h](hPrimero obtenemos todos los Eventos (events) disponibles en pygame y los recorremos en loop. Las primeras dos pruebas es para ver si el usuario dejó nuestro juego, o si presionó la tecla de escape. En estos casos, configuramos }hjI sbjI)}(h ``going``h]hgoing}hjQ sbah}(h]h]h]h]h!]uh%jHhjI ubh en }hjI sbjI)}(h ``False``h]hFalse}hjc sbah}(h]h]h]h]h!]uh%jHhjI ubh), permitiendonos salir del loop infinito.}hjI sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX@A continuación, verificamos si se presionó o si se soltó el botón del mouse. En el caso de que el botón se haya presionado, preguntamos al primer objeto si chocó con el mono. Se reproduce el sonido apropiado, y si el mono fue golpeado, le decimos que empiece a girar (al hacer un llamado a su método `punched()` )h](hX3A continuación, verificamos si se presionó o si se soltó el botón del mouse. En el caso de que el botón se haya presionado, preguntamos al primer objeto si chocó con el mono. Se reproduce el sonido apropiado, y si el mono fue golpeado, le decimos que empiece a girar (al hacer un llamado a su método }hj{ sbj@)}(h `punched()`h]h punched()}hj sbah}(h]h]h]h]h!]uh%j?hj{ ubh )}hj{ sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]manejar-los-eventos-de-entradaah]h]manejar los eventos de entradaah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hActualizar los Spritesh]hActualizar los Sprites}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)M ubj#)}(hallsprites.update()h]hallsprites.update()}hj sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)M hj h&hubh)}(hX\Los grupos de Sprite tienen un método `update()`, que simplemente llama al método de actualización para todos los sprites que contiene. Cada uno de los objetos se va a mover, dependiendo de cuál sea el estado en el que estén. Acá es donde el mono se va a mover de un lado a otro, o va a girar un poco más lejos si fue recientemente golpeado.h](h'Los grupos de Sprite tienen un método }hj sbj@)}(h `update()`h]hupdate()}hj sbah}(h]h]h]h]h!]uh%j?hj ubhX+, que simplemente llama al método de actualización para todos los sprites que contiene. Cada uno de los objetos se va a mover, dependiendo de cuál sea el estado en el que estén. Acá es donde el mono se va a mover de un lado a otro, o va a girar un poco más lejos si fue recientemente golpeado.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]actualizar-los-spritesah]h]actualizar los spritesah]h!]uh%h9hhNh&hh'h(h)M ubh:)}(hhh](h?)}(hDibujar la Escena Completah]hDibujar la Escena Completa}hj sbah}(h]h]h]h]h!l]uh%h>hj h&hh'h(h)Mubh)}(hZAhora que todos los objetos están en el lugar indicado, es el momento para dibujarlos. ::h]hWAhora que todos los objetos están en el lugar indicado, es el momento para dibujarlos.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj#)}(hMscreen.blit(background, (0, 0)) allsprites.draw(screen) pygame.display.flip()h]hMscreen.blit(background, (0, 0)) allsprites.draw(screen) pygame.display.flip()}hj sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)Mhj h&hubh)}(hXqLa primera llamada de blit dibujará el fondo en toda la pantalla. Esto borra todo lo que vimos en el cuadro anterior (ligeramente ineficiente, pero suficientemnte bueno para este juego). A continuación, llamamos al método `draw()` del contenedor de sprites. Ya que este contenedor de sprites es en realidad una instancia del grupo de sprites "DrawPlain", sabe como dibujar nuestros sprites. Por último, usamos el método `flip()` para voltear los contenidos del software de pygame. Se realiza el flip a través del cargado de la imagen en segundo plano. Esto hace que todo lo que dibujamos luego se visibilice de una vez.h](hLa primera llamada de blit dibujará el fondo en toda la pantalla. Esto borra todo lo que vimos en el cuadro anterior (ligeramente ineficiente, pero suficientemnte bueno para este juego). A continuación, llamamos al método }hj sbj@)}(h`draw()`h]hdraw()}hj sbah}(h]h]h]h]h!]uh%j?hj ubh del contenedor de sprites. Ya que este contenedor de sprites es en realidad una instancia del grupo de sprites "DrawPlain", sabe como dibujar nuestros sprites. Por último, usamos el método }hj sbj@)}(h`flip()`h]hflip()}hj1 sbah}(h]h]h]h]h!]uh%j?hj ubh para voltear los contenidos del software de pygame. Se realiza el flip a través del cargado de la imagen en segundo plano. Esto hace que todo lo que dibujamos luego se visibilice de una vez.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M!hj h&hubeh}(h]dibujar-la-escena-completaah]h]dibujar la escena completaah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(h Fin del Juegoh]h Fin del Juego}hjT sbah}(h]h]h]h]h!]uh%h>hjQ h&hh'h(h)M,ubh)}(h=El usuario ha salido del juego, hora de limpiar (clean up) ::h]h:El usuario ha salido del juego, hora de limpiar (clean up)}hjb sbah}(h]h]h]h]h!]uh%hh'h(h)M.hjQ h&hubj#)}(h pg.quit()h]h pg.quit()}hjp sbah}(h]h]h]h]h!]h#h$uh%j"h'h(h)M0hjQ h&hubh)}(hX2Hacer la limpieza, el cleanup, de la ejecución del juego en *pygame* es extremandamente simple. Ya que todas las variables son automáticamente destruidas, nosotros no tenemos que hacer realmnete nada, únicamente llamar a `pg.quit()` que explicitamente hace la limpieza de las partes internas del pygame.h](h=Hacer la limpieza, el cleanup, de la ejecución del juego en }hj~ sbj)}(h*pygame*h]hpygame}hj sbah}(h]h]h]h]h!]uh%jhj~ ubh es extremandamente simple. Ya que todas las variables son automáticamente destruidas, nosotros no tenemos que hacer realmnete nada, únicamente llamar a }hj~ sbj@)}(h `pg.quit()`h]h pg.quit()}hj sbah}(h]h]h]h]h!]uh%j?hj~ ubhG que explicitamente hace la limpieza de las partes internas del pygame.}hj~ sbeh}(h]h]h]h]h!]uh%hh'h(h)M2hjQ h&hubeh}(h] fin-del-juegoah]h] fin del juegoah]h!]uh%h9hhNh&hh'h(h)M,ubeh}(h]chimpance-linea-por-lineaah]h]chimpancé, línea por líneaah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]8tutorial-de-pygame-ejemplo-del-chimpance-linea-por-lineaah]h]>tutorial de pygame - ejemplo del chimpancé, línea por líneaah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j j j jjj9j6jjjjjjj}jzjv js j j j j j j j j j j jN jK j j u nametypes}(j j jj9jjjj}jv j j j j j jN j uh}(j h;j hNjjj6jjj<jjjj jzjjs jj jy j j j j j j j j jK j j jQ u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]h system_message)}(hhh](h)}(hnProblems with "include" directive path: InputError: [Errno 2] No such file or directory: '../reST/common.txt'.h]hnProblems with "include" directive path: InputError: [Errno 2] No such file or directory: '../reST/common.txt'.}hjX sbah}(h]h]h]h]h!]uh%hhjU ubj#)}(h).. include:: ../../../../reST/common.txt h]h).. include:: ../../../../reST/common.txt }hjf sbah}(h]h]h]h]h!]h#h$uh%j"hjU h'h8ubeh}(h]h]h]h]h!]levelKtypeSEVERElineKsourceh8uh%jS hhh&hh'h8h)Kubatransform_messages] transformerN include_log],docs/es/tutorials/ChimpanceLineaporLinea.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.1591322 pygame-2.6.1/docs/generated/es/doctrees/tutorials/CrearJuegos.doctree0000644000175100001770000007077014676242430025345 0ustar00runnerdockerqsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h+TUTORIAL:Tom Chance's Making Games Tutorialh]h Text+TUTORIAL:Tom Chance's Making Games Tutorial}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceA/home/runner/work/pygame/pygame/docs/es/tutorials/CrearJuegos.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hCrear Juegos con Pygameh]hCrear Juegos con Pygame}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(hCrear Juegos con Pygameh]hCrear Juegos con Pygame}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh]h field)}(hhh](h field_name)}(hTraducción al españolh]hTraducción al español}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(hEstefanía Pivaral Serrano h]h paragraph)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubah}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh )}(h .. toctree::h]h .. toctree::}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h:hidden:h]h:hidden:}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h:glob:h]h:glob:}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h tom_games2h]h tom_games2}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h tom_games3h]h tom_games3}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h tom_games4h]h tom_games4}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h tom_games5h]h tom_games5}hhsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh )}(h tom_games6h]h tom_games6}hjsbah}(h]h]h]h]h!]h#h$uh%h hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hTabla de Contenidoh]hTabla de Contenido}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(h(\1. :ref:`Introducción `h](h1. }hj#sbh pending_xref)}(h$:ref:`Introducción `h]h inline)}(hj/h]h Introducción}hj3sbah}(h]h](xrefstdstd-refeh]h]h!]uh%j1hj-ubah}(h]h]h]h]h!]refdoctutorials/CrearJuegos refdomainj>reftyperef refexplicitrefwarn reftarget crearjuegos-1uh%j+h'h(h)Khj#ubeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh block_quote)}(h7\1.1. :ref:`A note on coding styles ` h]h)}(h6\1.1. :ref:`A note on coding styles `h](h1.1. }hj^sbj,)}(h0:ref:`A note on coding styles `h]j2)}(hjhh]hA note on coding styles}hjjsbah}(h]h](j=stdstd-refeh]h]h!]uh%j1hjfubah}(h]h]h]h]h!]refdocjJ refdomainjtreftyperef refexplicitrefwarnjPcrearjuegos-1-1uh%j+h'h(h)K hj^ubeh}(h]h]h]h]h!]uh%hh'h(h)K hjZubah}(h]h]h]h]h!]uh%jXh'h(h)K hjh&hubh )}(h;\2. :ref:`Revisión: Fundamentos de Pygame `h]h;\2. :ref:`Revisión: Fundamentos de Pygame `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K#ubh )}(h9\2.1. :ref:`El juego básico de pygame `h]h9\2.1. :ref:`El juego básico de pygame `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K%ubh )}(h9\2.2. :ref:`Objetos básicos de pygame `h]h9\2.2. :ref:`Objetos básicos de pygame `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K'ubh )}(h'\2.3. :ref:`Blitting `h]h'\2.3. :ref:`Blitting `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K)ubh )}(hC\2.4. :ref:`El evento en loop (búcle de evento) `h]hC\2.4. :ref:`El evento en loop (búcle de evento) `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K+ubh )}(h%\2.5. :ref:`Ta-ra! `h]h%\2.5. :ref:`Ta-ra! `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K-ubh )}(h)\3. :ref:`Dandole inicio `h]h)\3. :ref:`Dandole inicio `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K/ubh )}(hG\3.1. :ref:`Las primeras líneas y carga de módulos `h]hG\3.1. :ref:`Las primeras líneas y carga de módulos `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K1ubh )}(h>\3.2. :ref:`Funciones de manejo de recursos `h]h>\3.2. :ref:`Funciones de manejo de recursos `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K3ubh )}(h4\4. :ref:`Clases de objeto de juego `h]h4\4. :ref:`Clases de objeto de juego `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K5ubh )}(h;\4.1. :ref:`Una clase de pelota sencilla `h]h;\4.1. :ref:`Una clase de pelota sencilla `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K7ubh )}(h5\4.1.1. :ref:`Desvío 1: Sprites `h]h5\4.1.1. :ref:`Desvío 1: Sprites `}hj,sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K9ubh )}(h?\4.1.2. :ref:`Desvío 2: Física vectorial `h]h?\4.1.2. :ref:`Desvío 2: Física vectorial `}hj:sbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K;ubh )}(h=\5. :ref:`Objetos controlable por el usuario `h]h=\5. :ref:`Objetos controlable por el usuario `}hjHsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K=ubh )}(h9\5.1. :ref:`Una clase de bate sencillo `h]h9\5.1. :ref:`Una clase de bate sencillo `}hjVsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)K?ubh )}(h?\5.1.1. :ref:`Desvío 3: Eventos de Pygame `h]h?\5.1.1. :ref:`Desvío 3: Eventos de Pygame `}hjdsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)KAubh )}(h5\6. :ref:`Ensamblando los elementos `h]h5\6. :ref:`Ensamblando los elementos `}hjrsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)KCubh )}(hC\6.1. :ref:`Deja que la pelota golpée los lados `h]hC\6.1. :ref:`Deja que la pelota golpée los lados `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)KEubh )}(hA\6.2. :ref:`Deja que la pelota golpée el bate `h]hA\6.2. :ref:`Deja que la pelota golpée el bate `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)KGubh )}(h0\6.3. :ref:`El producto final `h]h0\6.3. :ref:`El producto final `}hjsbah}(h]h]h]h]h!]h#h$uh%h hjh&hh'h(h)KJubh target)}(h.. _crearjuegos-1:h]h}(h]h]h]h]h!]refid crearjuegos-1uh%jh)K]hjh&hh'h(ubeh}(h]tabla-de-contenidoah]h]tabla de contenidoah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(h1. Introducciónh]h1. Introducción}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)KNubh)}(hXAntes que nada, asumo que han leído el tutorial :doc:`Chimpancé línea por línea `, que presenta lo básico de Python y pygame. Denle una leida antes de leer este tutorial, ya que no voy a repetir lo que ese tutorial dice (o al menos no en tanto detalle.) Este tutorial apunta a aquellos que entienden cómo hacer un "juego" ridiculamente simple, y a quien le gustaría hacer un juego relativamente sencillo como Pong. Les presenta algunos conceptos de diseño de juegos, algunas nociones matemáticas sencillas para trabajar con la física de la pelota, y algunas formas de mantener el juego fácil de mantener y expandir.h](h1Antes que nada, asumo que han leído el tutorial }hjsbj,)}(h<:doc:`Chimpancé línea por línea `h]j2)}(hjh]hChimpancé línea por línea}hjsbah}(h]h](j=stdstd-doceh]h]h!]uh%j1hjubah}(h]h]h]h]h!]refdocjJ refdomainjreftypedoc refexplicitrefwarnjPChimpanceLineaporLineauh%j+h'h(h)KPhjubhX, que presenta lo básico de Python y pygame. Denle una leida antes de leer este tutorial, ya que no voy a repetir lo que ese tutorial dice (o al menos no en tanto detalle.) Este tutorial apunta a aquellos que entienden cómo hacer un "juego" ridiculamente simple, y a quien le gustaría hacer un juego relativamente sencillo como Pong. Les presenta algunos conceptos de diseño de juegos, algunas nociones matemáticas sencillas para trabajar con la física de la pelota, y algunas formas de mantener el juego fácil de mantener y expandir.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KPhjh&hubh)}(hXKTodo el código en este tutorial sirve para implementar `TomPong `_, un juego que yo he escrito. Hacia el fin del tutorial, no solo deberías tener una idea más firme de pygame, sino que también deberías poder entender como funciona TomPong y cómo hacer tu propia versión.h](h8Todo el código en este tutorial sirve para implementar }hjsbh reference)}(hA`TomPong `_h]hTomPong}(hj hTomPongubah}(h]h]h]h]h!]namejrefuri4http://www.tomchance.uklinux.net/projects/pong.shtmluh%j hjubj)}(h7 h]h}(h]tompongah]h]tompongah]h!]refurijuh%j referencedKhjubh, un juego que yo he escrito. Hacia el fin del tutorial, no solo deberías tener una idea más firme de pygame, sino que también deberías poder entender como funciona TomPong y cómo hacer tu propia versión.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KYhjh&hubh)}(hAhora, un breve resumen de los conceptos básicos de pygame. Un método común para organizar el código de un juego es dividirlo en las siguientes seis secciones:h]hAhora, un breve resumen de los conceptos básicos de pygame. Un método común para organizar el código de un juego es dividirlo en las siguientes seis secciones:}hj7sbah}(h]h]h]h]h!]uh%hh'h(h)K]hjh&hubjY)}(hX- **Carga de módulos** que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame. - **Funciones de manejo de recursos**; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener. - **Clases de objeto de juego**; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú. - **Cualquier otra función del juego**; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función. - **Inicializar el juego**, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar. - **El loop (búcle) principal**, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla. h]h bullet_list)}(hhh](h list_item)}(h**Carga de módulos** que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame. h]h)}(h**Carga de módulos** que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame.h](h strong)}(h**Carga de módulos**h]hCarga de módulos}hjZsbah}(h]h]h]h]h!]uh%jXhjTubh que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame.}hjTsbeh}(h]h]h]h]h!]uh%hh'h(h)K`hjPubah}(h]h]h]h]h!]uh%jNh'h(h)K`hjKubjO)}(hX**Funciones de manejo de recursos**; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener. h]h)}(hX**Funciones de manejo de recursos**; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener.h](jY)}(h#**Funciones de manejo de recursos**h]hFunciones de manejo de recursos}hjsbah}(h]h]h]h]h!]uh%jXhj|ubh; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener.}hj|sbeh}(h]h]h]h]h!]uh%hh'h(h)Kchjxubah}(h]h]h]h]h!]uh%jNh'h(h)KchjKubjO)}(hX**Clases de objeto de juego**; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú. h]h)}(hX**Clases de objeto de juego**; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú.h](jY)}(h**Clases de objeto de juego**h]hClases de objeto de juego}hjsbah}(h]h]h]h]h!]uh%jXhjubhXb; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kghjubah}(h]h]h]h]h!]uh%jNh'h(h)KghjKubjO)}(hXu**Cualquier otra función del juego**; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función. h]h)}(hXt**Cualquier otra función del juego**; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función.h](jY)}(h%**Cualquier otra función del juego**h]h!Cualquier otra función del juego}hjsbah}(h]h]h]h]h!]uh%jXhjubhXO; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Klhjubah}(h]h]h]h]h!]uh%jNh'h(h)KlhjKubjO)}(h**Inicializar el juego**, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar. h]h)}(h**Inicializar el juego**, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar.h](jY)}(h**Inicializar el juego**h]hInicializar el juego}hjsbah}(h]h]h]h]h!]uh%jXhjubh, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kqhjubah}(h]h]h]h]h!]uh%jNh'h(h)KqhjKubjO)}(h**El loop (búcle) principal**, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla. h]h)}(h**El loop (búcle) principal**, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla.h](jY)}(h**El loop (búcle) principal**h]hEl loop (búcle) principal}hjsbah}(h]h]h]h]h!]uh%jXhjubh, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kthjubah}(h]h]h]h]h!]uh%jNh'h(h)KthjKubeh}(h]h]h]h]h!]bullet-uh%jIh'h(h)K`hjEubah}(h]h]h]h]h!]uh%jXh'h(h)K`hjh&hubh)}(hXeCada juego que hagas tendrá alguna o todas estas secciones, posiblemente con más de las propias. Para los propósitos de este tutorial, voy a escribir sobre como TomPong está planteado y las ideas sobre las que escribo pueden transferirse a casi cualquier tipo de juego que puedas crear. También voy a asumir que deseas mantener todo el código en un único archivo, pero si estás creando un juego razonablemente grande, suele ser una buena idea incluir ciertas secciones en los archivos de módulos. Poner las clases de objeto en un archivo llamado ``objects.py``, por ejemplo, puede ayudarte a mantener la lógica del juego separada de los objetos del juego. Si tenés mucho código de manejo de recursos, también puede ser útil poner eso en ``resources.py`` Luego podés usar :code:`from objects,resources import *` para importar todas las clases y funciones.h](hX+Cada juego que hagas tendrá alguna o todas estas secciones, posiblemente con más de las propias. Para los propósitos de este tutorial, voy a escribir sobre como TomPong está planteado y las ideas sobre las que escribo pueden transferirse a casi cualquier tipo de juego que puedas crear. También voy a asumir que deseas mantener todo el código en un único archivo, pero si estás creando un juego razonablemente grande, suele ser una buena idea incluir ciertas secciones en los archivos de módulos. Poner las clases de objeto en un archivo llamado }hjDsbh literal)}(h``objects.py``h]h objects.py}hjNsbah}(h]h]h]h]h!]uh%jLhjDubh, por ejemplo, puede ayudarte a mantener la lógica del juego separada de los objetos del juego. Si tenés mucho código de manejo de recursos, también puede ser útil poner eso en }hjDsbjM)}(h``resources.py``h]h resources.py}hj`sbah}(h]h]h]h]h!]uh%jLhjDubh Luego podés usar }hjDsbjM)}(h':code:`from objects,resources import *`h]hfrom objects,resources import *}hjrsbah}(h]h]codeah]h]h!]languagehuh%jLhjDubh, para importar todas las clases y funciones.}hjDsbeh}(h]h]h]h]h!]uh%hh'h(h)Kwhjh&hubj)}(h.. _crearjuegos-1-1:h]h}(h]h]h]h]h!]jcrearjuegos-1-1uh%jh)Khjh&hh'h(ubeh}(h]( introduccionjeh]h](1. introducción crearjuegos-1eh]h!]uh%h9hhNh&hh'h(h)KNexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh:)}(hhh](h?)}(h,1.1. Una nota sobre estilos de codificaciónh]h,1.1. Una nota sobre estilos de codificación}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hXLo primero a tener en cuenta cuando abordamos cualquier proyecto de programación es el decidir el estilo de codificación, y mantenerse consistente. Python resuelve mucho de los problemas debido a su estricta interpretación de los espacios en blanco y la sangría, pero aún así se puede elegir el tamaño de sus sangrías, si coloca cada importación de módulo en una nueva línea, cómo comentas el código, etc. Verás cómo hago todas estas cosas en los ejemplos del código; no es necesario que se use mi estilo, pero cualquiera sea el estilo que adoptes, usalo en todo el programa. Tratá también de documentar todas tus clases y comentá en cada fragmento de código que parezca oscuro, sin caer en comentar lo obvio. He visto mucho gente que hace lo siguiente: :h]hXLo primero a tener en cuenta cuando abordamos cualquier proyecto de programación es el decidir el estilo de codificación, y mantenerse consistente. Python resuelve mucho de los problemas debido a su estricta interpretación de los espacios en blanco y la sangría, pero aún así se puede elegir el tamaño de sus sangrías, si coloca cada importación de módulo en una nueva línea, cómo comentas el código, etc. Verás cómo hago todas estas cosas en los ejemplos del código; no es necesario que se use mi estilo, pero cualquiera sea el estilo que adoptes, usalo en todo el programa. Tratá también de documentar todas tus clases y comentá en cada fragmento de código que parezca oscuro, sin caer en comentar lo obvio. He visto mucho gente que hace lo siguiente: :}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubjY)}(hplayer1.score += scoreup # Add scoreup to player1 score (Agrega scoreup al score de player 1) h]h definition_list)}(hhh]h definition_list_item)}(heplayer1.score += scoreup # Add scoreup to player1 score (Agrega scoreup al score de player 1) h](h term)}(h>player1.score += scoreup # Add scoreup to player1 scoreh]h>player1.score += scoreup # Add scoreup to player1 score}hjsbah}(h]h]h]h]h!]uh%jh'h(h)Khjubh definition)}(hhh]h)}(h%(Agrega scoreup al score de player 1)h]h%(Agrega scoreup al score de player 1)}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjubeh}(h]h]h]h]h!]uh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%jXh'h(h)Khjh&hubh)}(hEl peor código está mal diseñado, con cambios en el estilo que aparentan ser aleatorios y documentación deficiente. El código deficiente no solo es molesto para otras personas, pero también hace que sea difícil de mantener para uno mismo.h]hEl peor código está mal diseñado, con cambios en el estilo que aparentan ser aleatorios y documentación deficiente. El código deficiente no solo es molesto para otras personas, pero también hace que sea difícil de mantener para uno mismo.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h](&una-nota-sobre-estilos-de-codificacionjeh]h](,1.1. una nota sobre estilos de codificacióncrearjuegos-1-1eh]h!]uh%h9hhNh&hh'h(h)Kj}j!jsj}jjsubeh}(h]id1ah]h]h]crear juegos con pygameah!]uh%h9hh;h&hh'h(h)K j,ubeh}(h]crear-juegos-con-pygameah]h]h]j,ah!]uh%h9hhh&hh'h(h)Kj,ubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj_error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(j]jaj]jaunameids}(crear juegos con pygameNjjjjjjj(j%j!jj ju nametypes}(jjjjj(j!j uh}(j0h;j(hNjjjjjjj%jjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jmKsRparse_messages]h system_message)}(hhh]h)}(h:Duplicate implicit target name: "crear juegos con pygame".h]h:Duplicate implicit target name: "crear juegos con pygame".}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]j(alevelKtypeINFOsourceh(lineK uh%jhhNh&hh'h(h)K ubatransform_messages](j)}(hhh]h)}(hhh]h3Hyperlink target "crearjuegos-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypejsourceh(lineK]uh%jubj)}(hhh]h)}(hhh]h5Hyperlink target "crearjuegos-1-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%hhjubah}(h]h]h]h]h!]levelKtypejsourceh(lineKuh%jube transformerN include_log]!docs/es/tutorials/CrearJuegos.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.1921322 pygame-2.6.1/docs/generated/es/doctrees/tutorials/GuiaNewbie.doctree0000644000175100001770000023133214676242430025144 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h.TUTORIAL: David Clark's Newbie Guide To Pygameh]h Text.TUTORIAL: David Clark's Newbie Guide To Pygame}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsource@/home/runner/work/pygame/pygame/docs/es/tutorials/GuiaNewbie.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h"Guía de Pygame para Principiantesh]h"Guía de Pygame para Principiantes}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh field_list)}(hhh]h field)}(hhh](h field_name)}(hTraducción al españolh]hTraducción al español}hhZsbah}(h]h]h]h]h!]uh%hXhhUh'h(h)Kubh field_body)}(hEstefanía Pivaral Serrano h]h paragraph)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhpsbah}(h]h]h]h]h!]uh%hnh'h(h)K hhjubah}(h]h]h]h]h!]uh%hhhhUubeh}(h]h]h]h]h!]uh%hSh'h(h)K hhPh&hubah}(h]h]docinfoah]h]h!]uh%hNhh;h&hh'h(h)K ubh:)}(hhh](h?)}(h"Guía de Pygame para Principiantesh]h"Guía de Pygame para Principiantes}hhsbah}(h]h]h]h]h!]uh%h>hhh&hh'h(h)Kubho)}(hYo **Cosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso**h](ho }hhsbh strong)}(hW**Cosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso**h]hSCosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso}hhsbah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hnh'h(h)Khhh&hubho)}(h;o **Cómo aprendí a dejar de preocuparme y amar el blit.**h](ho }hhsbh)}(h9**Cómo aprendí a dejar de preocuparme y amar el blit.**h]h5Cómo aprendí a dejar de preocuparme y amar el blit.}hhsbah}(h]h]h]h]h!]uh%hhhubeh}(h]h]h]h]h!]uh%hnh'h(h)Khhh&hubho)}(hX"Pygame_ es un contenedor de Python para SDL_, escrito por Pete Shinners. Lo cual significa que al usar pygame, podés escribir juegos u otras aplicaciones multimedia en Python que se ejecutarán sin alteraciones en cualquier plataforma compatible con SDL (Windows, Unix, Mac, BeOS y otras).h](h reference)}(hPygame_h]hPygame}(hhhPygameubah}(h]h]h]h]h!]namehrefurihttps://www.pygame.org/uh%hhh܌resolvedKubh! es un contenedor de Python para }hhsbh)}(hSDL_h]hSDL}(hhhSDLubah}(h]h]h]h]h!]namejhhttp://libsdl.orguh%hhhhKubh, escrito por Pete Shinners. Lo cual significa que al usar pygame, podés escribir juegos u otras aplicaciones multimedia en Python que se ejecutarán sin alteraciones en cualquier plataforma compatible con SDL (Windows, Unix, Mac, BeOS y otras).}hhsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khhh&hubho)}(hXPygame puede ser fácil de aprender, pero el mundo de la programación de gráficos pueden ser bastante confusos para el recién llegado. Escribí esto para tratar de destilar el conocimiento práctico que obtuve durante el último año trabajando con pygame y su predecesor, PySDL. He tratado de clasificar las sugerencias en orden de importancia, pero cuán relevante es cada consejo dependerá de tu propio antecedente y los detalles de tu proyecto.h]hXPygame puede ser fácil de aprender, pero el mundo de la programación de gráficos pueden ser bastante confusos para el recién llegado. Escribí esto para tratar de destilar el conocimiento práctico que obtuve durante el último año trabajando con pygame y su predecesor, PySDL. He tratado de clasificar las sugerencias en orden de importancia, pero cuán relevante es cada consejo dependerá de tu propio antecedente y los detalles de tu proyecto.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khhh&hubh:)}(hhh](h?)}(h#Ponte cómodo trabajando con Pythonh]h#Ponte cómodo trabajando con Python}hj%sbah}(h]h]h]h]h!]uh%h>hj"h&hh'h(h)K%ubho)}(hXLo más importante es sentirse confiado usando python. Aprender algo tan potencialmente complicado como programación de gráficos será un verdadero fastidio si tampoco se está familiarizado con el lenguaje que se está usando. Escrí una cantidad de programas considerables en Python -- analizá (parse) algunos archivos de texto, escribí un juego de adivinanzas o un programa de entradas de diario, o algo. Ponte cómodo con las secuencias de caracteres que representan textos (strings) y la manipulación de listas. Sepa cómo funciona ``import`` (importar) -- intenta escribir un programa que se extienda a varios archivos fuente. Escribe tus propias funciones, y practica manipular números y caracteres; sepa cómo convertir de una a otra. Llega al punto en que la sintaxis para usar listas y diccionarios es algo instintivo-- no querés tener que ejecutar la documentación cada vez que necesitas dividir una lista u ordernar un juego de llaves. Resiste la tentación de correr a una lista de emails, comp.lang.python, o IRC cuando te encuentres en un problema. En lugar de eso, enciende el interperte y juega con el problema por unas horas. Imprime el `Python 2.0 Quick Reference`_ y conservalo junto a la computadora.h](hXLo más importante es sentirse confiado usando python. Aprender algo tan potencialmente complicado como programación de gráficos será un verdadero fastidio si tampoco se está familiarizado con el lenguaje que se está usando. Escrí una cantidad de programas considerables en Python -- analizá (parse) algunos archivos de texto, escribí un juego de adivinanzas o un programa de entradas de diario, o algo. Ponte cómodo con las secuencias de caracteres que representan textos (strings) y la manipulación de listas. Sepa cómo funciona }hj3sbh literal)}(h ``import``h]himport}hj=sbah}(h]h]h]h]h!]uh%j;hj3ubhXc (importar) -- intenta escribir un programa que se extienda a varios archivos fuente. Escribe tus propias funciones, y practica manipular números y caracteres; sepa cómo convertir de una a otra. Llega al punto en que la sintaxis para usar listas y diccionarios es algo instintivo-- no querés tener que ejecutar la documentación cada vez que necesitas dividir una lista u ordernar un juego de llaves. Resiste la tentación de correr a una lista de emails, comp.lang.python, o IRC cuando te encuentres en un problema. En lugar de eso, enciende el interperte y juega con el problema por unas horas. Imprime el }hj3sbh)}(h`Python 2.0 Quick Reference`_h]hPython 2.0 Quick Reference}(hjOhPython 2.0 Quick Referenceubah}(h]h]h]h]h!]namePython 2.0 Quick Referencehhjh&hh'h(h)K?ubho)}(hXVer el revoltijo de clases en la parte superior de la documentación del índice de documentación de pygame puede ser confuso. Lo más importante es darse cuenta de que se puede hacer mucho con tan solo un pequeño subconjunto de funciones. Existen muchas clases que probablemente nunca uses -- en un año, yo no he tocado las funciones ``Channel``, ``Joystick``, ``cursors``, ``Userrect``, ``surfarray`` o ``version``.h](hXSVer el revoltijo de clases en la parte superior de la documentación del índice de documentación de pygame puede ser confuso. Lo más importante es darse cuenta de que se puede hacer mucho con tan solo un pequeño subconjunto de funciones. Existen muchas clases que probablemente nunca uses -- en un año, yo no he tocado las funciones }hjsbj<)}(h ``Channel``h]hChannel}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``Joystick``h]hJoystick}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``cursors``h]hcursors}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``Userrect``h]hUserrect}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``surfarray``h]h surfarray}hjsbah}(h]h]h]h]h!]uh%j;hjubh o }hjsbj<)}(h ``version``h]hversion}hjsbah}(h]h]h]h]h!]uh%j;hjubh.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)KAhjh&hubeh}(h]1reconoce-que-partes-de-pygame-necesitas-realmenteah]h]4reconoce qué partes de pygame necesitás realmente.ah]h!]uh%h9hhh&hh'h(h)K?ubh:)}(hhh](h?)}(h%Sepa qué es una Surface (superficie)h]h%Sepa qué es una Surface (superficie)}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)KKubho)}(hXLa parte más importante de pygame es la Surface (superficie). La Surface puede pensarse como una hoja de papel en blanco. Se pueden hacer muchas cosas con la Surface -- se pueden dibujar líneas, colorear partes de ella con colores, copiar imágenes hacia y desde ella, y establecer o leer píxeles indivduales de colores en ella. Una Surface puede ser de cualquier tamaño (dentro de lo lógico) y puede haber tantas como quieras (de nuevo, dentro de lo razonable). Una Surface es especial -- la que vayas a crear con ``pygame.display.set_mode()``. Esta 'display surface' (surface de visualización) representa la pantalla; lo que sea que hagas en ella aparecerá en la pantalla del usuario. Solo puedes tener una de esas -- esa es una limitación de SDL, no de pygame.h](hXLa parte más importante de pygame es la Surface (superficie). La Surface puede pensarse como una hoja de papel en blanco. Se pueden hacer muchas cosas con la Surface -- se pueden dibujar líneas, colorear partes de ella con colores, copiar imágenes hacia y desde ella, y establecer o leer píxeles indivduales de colores en ella. Una Surface puede ser de cualquier tamaño (dentro de lo lógico) y puede haber tantas como quieras (de nuevo, dentro de lo razonable). Una Surface es especial -- la que vayas a crear con }hj%sbj<)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hj-sbah}(h]h]h]h]h!]uh%j;hj%ubh. Esta 'display surface' (surface de visualización) representa la pantalla; lo que sea que hagas en ella aparecerá en la pantalla del usuario. Solo puedes tener una de esas -- esa es una limitación de SDL, no de pygame.}hj%sbeh}(h]h]h]h]h!]uh%hnh'h(h)KMhjh&hubho)}(hX`Entonces, ¿cómo crear Surfaces? Como mencioné arriba, la Surface especial se crea con ``pygame.display.set_mode()``. Se puede crear una surface que contenga una imagen usando ``image.load()``, o podés crear una surface que contenga texto con ``font.render()``. Incluso se puede crear una surface que no contenga nada en absoluto con ``Surface()``.h](hYEntonces, ¿cómo crear Surfaces? Como mencioné arriba, la Surface especial se crea con }hjEsbj<)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjMsbah}(h]h]h]h]h!]uh%j;hjEubh=. Se puede crear una surface que contenga una imagen usando }hjEsbj<)}(h``image.load()``h]h image.load()}hj_sbah}(h]h]h]h]h!]uh%j;hjEubh4, o podés crear una surface que contenga texto con }hjEsbj<)}(h``font.render()``h]h font.render()}hjqsbah}(h]h]h]h]h!]uh%j;hjEubhJ. Incluso se puede crear una surface que no contenga nada en absoluto con }hjEsbj<)}(h ``Surface()``h]h Surface()}hjsbah}(h]h]h]h]h!]uh%j;hjEubh.}hjEsbeh}(h]h]h]h]h!]uh%hnh'h(h)KXhjh&hubho)}(hLa mayoría de las funciones de Surface no son críticas. Sólo es necesario aprender ``blit()``, ``fill()``, ``set_at()`` y ``get_at()``, y vas a estar bien.h](hVLa mayoría de las funciones de Surface no son críticas. Sólo es necesario aprender }hjsbj<)}(h ``blit()``h]hblit()}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``fill()``h]hfill()}hjsbah}(h]h]h]h]h!]uh%j;hjubh, }hjsbj<)}(h ``set_at()``h]hset_at()}hjsbah}(h]h]h]h]h!]uh%j;hjubh y }hjsbj<)}(h ``get_at()``h]hget_at()}hjsbah}(h]h]h]h]h!]uh%j;hjubh, y vas a estar bien.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)K^hjh&hubeh}(h]"sepa-que-es-una-surface-superficieah]h]%sepa qué es una surface (superficie)ah]h!]uh%h9hhh&hh'h(h)KKubh:)}(hhh](h?)}(hUsa surface.convert().h]hUsa surface.convert().}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kcubho)}(hX&Cuando yo leí por primera vez la documentación para ``surface.convert()``, no pensé que fuera algo de lo que tuviera que preocuparme. 'Sólo voy a usar PNGs, por lo tanto todo o que haga será en ese formato. Entonces no necesito ``convert()``';. Resultó ser que estaba muy, muy equivocado.h](h6Cuando yo leí por primera vez la documentación para }hj sbj<)}(h``surface.convert()``h]hsurface.convert()}hjsbah}(h]h]h]h]h!]uh%j;hj ubh, no pensé que fuera algo de lo que tuviera que preocuparme. 'Sólo voy a usar PNGs, por lo tanto todo o que haga será en ese formato. Entonces no necesito }hj sbj<)}(h ``convert()``h]h convert()}hj$sbah}(h]h]h]h]h!]uh%j;hj ubh0';. Resultó ser que estaba muy, muy equivocado.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Kehjh&hubho)}(hX~El 'format' (formato) al que ``convert()`` se refiere no es el formato del archivo (por ejemplo, PNG, JPEG, GIF), es lo que se llama el 'píxel format' (formato pixel). Esto se refiere a la forma particular en la que una Surface registra colores individuales en un píxel especifico. Si el formato de la Surface (Surface format) no es el mismo que el formato de visualización (display format), SDL tendrá que convertirlo sobre la marcha para cada blit -- un proceso que consume bastante tiempo. No te preocupes demasiado por la explicación; solo ten en cuenta que ``convert()`` es necesario si querés que haya velocidad en tus blits.h](hEl 'format' (formato) al que }hj<sbj<)}(h ``convert()``h]h convert()}hjDsbah}(h]h]h]h]h!]uh%j;hj<ubhX se refiere no es el formato del archivo (por ejemplo, PNG, JPEG, GIF), es lo que se llama el 'píxel format' (formato pixel). Esto se refiere a la forma particular en la que una Surface registra colores individuales en un píxel especifico. Si el formato de la Surface (Surface format) no es el mismo que el formato de visualización (display format), SDL tendrá que convertirlo sobre la marcha para cada blit -- un proceso que consume bastante tiempo. No te preocupes demasiado por la explicación; solo ten en cuenta que }hj<sbj<)}(h ``convert()``h]h convert()}hjVsbah}(h]h]h]h]h!]uh%j;hj<ubh9 es necesario si querés que haya velocidad en tus blits.}hj<sbeh}(h]h]h]h]h!]uh%hnh'h(h)Kjhjh&hubho)}(h¿Cómo se usa convert? Sólo hay que hacer una call (llamada) creando la Surface con la función ``image.load()``. En vez de hacer únicamente::h](hb¿Cómo se usa convert? Sólo hay que hacer una call (llamada) creando la Surface con la función }hjnsbj<)}(h``image.load()``h]h image.load()}hjvsbah}(h]h]h]h]h!]uh%j;hjnubh. En vez de hacer únicamente:}hjnsbeh}(h]h]h]h]h!]uh%hnh'h(h)Kshjh&hubh literal_block)}(h&surface = pygame.image.load('foo.png')h]h&surface = pygame.image.load('foo.png')}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kvhjh&hubho)}(hHaz::h]hHaz:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Kxhjh&hubj)}(h0surface = pygame.image.load('foo.png').convert()h]h0surface = pygame.image.load('foo.png').convert()}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kzhjh&hubho)}(hXsEs así de fácil. Lo único que se necesita es hacer una de esas calls (llamadas) por Surface, cuando cargues una imagen del disco. It's that easy. You just need to call it once per surface, when you load an image off the disk. Estará satisfecho con los resultados; veo al rededor de un 6x aumento de la velocidad de blitting llamando (haciendo la call) ``convert()``.h](hXeEs así de fácil. Lo único que se necesita es hacer una de esas calls (llamadas) por Surface, cuando cargues una imagen del disco. It's that easy. You just need to call it once per surface, when you load an image off the disk. Estará satisfecho con los resultados; veo al rededor de un 6x aumento de la velocidad de blitting llamando (haciendo la call) }hjsbj<)}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j;hjubh.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)K|hjh&hubho)}(hXLa única vez que no vas a querer usar ``convert()`` es cuando realmente necesitas tener el control absoluto sobre al formato interno de una imagen -- digamos que estás escribiendo un programa de conversión de imagen o algo así, y necesitás asegurarte que el archivo de salida tenga el mismo formato píxeles que el archivo de entrada. Si estás escribiendo un juego, necesitás velocidad. Usa ``convert()``.h](h'La única vez que no vas a querer usar }hjsbj<)}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j;hjubhXZ es cuando realmente necesitas tener el control absoluto sobre al formato interno de una imagen -- digamos que estás escribiendo un programa de conversión de imagen o algo así, y necesitás asegurarte que el archivo de salida tenga el mismo formato píxeles que el archivo de entrada. Si estás escribiendo un juego, necesitás velocidad. Usa }hjsbj<)}(h ``convert()``h]h convert()}hjsbah}(h]h]h]h]h!]uh%j;hjubh.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubeh}(h]usa-surface-convertah]h]usa surface.convert().ah]h!]uh%h9hhh&hh'h(h)Kcubh:)}(hhh](h?)}(hAnimación rect "sucia".h]hAnimación rect "sucia".}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubho)}(hXkLa causa más común de frecuencias de cuadros inadecuadas en los programas Pygame resulta de malinterpretar la función ``pygame.display.update()``. Con pygame, con simplemente dibujar algo en la Surface de visualización no hace que aparezca en la pantalla -- necesitas hacer un llamado a ``pygame.display.update()``. Hay tres formas de llamar a esta función:h](hyLa causa más común de frecuencias de cuadros inadecuadas en los programas Pygame resulta de malinterpretar la función }hj%sbj<)}(h``pygame.display.update()``h]hpygame.display.update()}hj-sbah}(h]h]h]h]h!]uh%j;hj%ubh. Con pygame, con simplemente dibujar algo en la Surface de visualización no hace que aparezca en la pantalla -- necesitas hacer un llamado a }hj%sbj<)}(h``pygame.display.update()``h]hpygame.display.update()}hj?sbah}(h]h]h]h]h!]uh%j;hj%ubh-. Hay tres formas de llamar a esta función:}hj%sbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubh block_quote)}(hX* ``pygame.display.update()`` -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa). * ``pygame.display.flip()`` -- Esto hace lo mismo, y también hará lo correcto si estás usando ``double-buffered`` aceleración de hardware, que no es así, entonces sigamos ... * ``pygame.display.update(a rectangle or some list of rectangles)`` -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques. h]h bullet_list)}(hhh](h list_item)}(h}``pygame.display.update()`` -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa).h]ho)}(hjfh](j<)}(h``pygame.display.update()``h]hpygame.display.update()}hjksbah}(h]h]h]h]h!]uh%j;hjhubhb -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa).}hjhsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjdubah}(h]h]h]h]h!]uh%jbh'h(h)Khj_ubjc)}(h``pygame.display.flip()`` -- Esto hace lo mismo, y también hará lo correcto si estás usando ``double-buffered`` aceleración de hardware, que no es así, entonces sigamos ...h]ho)}(hjh](j<)}(h``pygame.display.flip()``h]hpygame.display.flip()}hjsbah}(h]h]h]h]h!]uh%j;hjubhF -- Esto hace lo mismo, y también hará lo correcto si estás usando }hjsbj<)}(h``double-buffered``h]hdouble-buffered}hjsbah}(h]h]h]h]h!]uh%j;hjubh? aceleración de hardware, que no es así, entonces sigamos ...}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)Khj_ubjc)}(h``pygame.display.update(a rectangle or some list of rectangles)`` -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques. h]ho)}(h``pygame.display.update(a rectangle or some list of rectangles)`` -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques.h](j<)}(hA``pygame.display.update(a rectangle or some list of rectangles)``h]h=pygame.display.update(a rectangle or some list of rectangles)}hjsbah}(h]h]h]h]h!]uh%j;hjubhQ -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)Khj_ubeh}(h]h]h]h]h!]bullet*uh%j]h'h(h)KhjYubah}(h]h]h]h]h!]uh%jWh'h(h)Khjh&hubho)}(hX\La mayoría de la gente nueva en programación gráfica usa la primera opción -- ellos actualizan la pantalla completa en cada cuadro. El problema es que esto es inaceptablemente lento para la mayoría de la gente. Hacer una call a ``update()`` toma 35 milisegundos en mi máquina, lo cual no parece mucho, hasta que te das cuenta que 1000 / 35 = 28 cuadros por segundo *máximo*. Y eso es sin la lóagica del juego, sin blits, sin entrada (input) , sin IA, nada. Estoy aquí sentado actualizando la pantalla, y 28 fps (frames per second - cuadros por segundo) es mi máximo de cuadros por segundo. Ugh.h](hLa mayoría de la gente nueva en programación gráfica usa la primera opción -- ellos actualizan la pantalla completa en cada cuadro. El problema es que esto es inaceptablemente lento para la mayoría de la gente. Hacer una call a }hjsbj<)}(h ``update()``h]hupdate()}hjsbah}(h]h]h]h]h!]uh%j;hjubh~ toma 35 milisegundos en mi máquina, lo cual no parece mucho, hasta que te das cuenta que 1000 / 35 = 28 cuadros por segundo }hjsbh emphasis)}(h *máximo*h]hmáximo}hjsbah}(h]h]h]h]h!]uh%jhjubh. Y eso es sin la lóagica del juego, sin blits, sin entrada (input) , sin IA, nada. Estoy aquí sentado actualizando la pantalla, y 28 fps (frames per second - cuadros por segundo) es mi máximo de cuadros por segundo. Ugh.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXLa solucion es llamada 'dirty rect animation' o 'animación de rect sucia'. En vez de actualizar la pantalla completa en cada cuadro, solo se actualizan las partes que cambiaron desde el último cuadros. Yo hago esto al hacer un seeguimiento de esos rectángulos en una lista, luego llamando a ``update(the_dirty_rectangles)`` al final del cuadro. En detalle para un sprite en movimiento, yo:h](hX&La solucion es llamada 'dirty rect animation' o 'animación de rect sucia'. En vez de actualizar la pantalla completa en cada cuadro, solo se actualizan las partes que cambiaron desde el último cuadros. Yo hago esto al hacer un seeguimiento de esos rectángulos en una lista, luego llamando a }hj(sbj<)}(h ``update(the_dirty_rectangles)``h]hupdate(the_dirty_rectangles)}hj0sbah}(h]h]h]h]h!]uh%j;hj(ubhB al final del cuadro. En detalle para un sprite en movimiento, yo:}hj(sbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubjX)}(hXQ* Blit una parte del fondo sobre la ubicación actual del sprite, borrándolo. * Añado el rectángulo de la ubicación actual a la lista llamada dirty_rects. * Muevo el sprite. * Dibujo (Draw) el sprite en su nueva ubicación. * Agrego la nueva ubicación del sprite a mi lista de dirty_rects. * Llamo a ``display.update(dirty_rects)`` h]j^)}(hhh](jc)}(hLBlit una parte del fondo sobre la ubicación actual del sprite, borrándolo.h]ho)}(hjQh]hLBlit una parte del fondo sobre la ubicación actual del sprite, borrándolo.}hjSsbah}(h]h]h]h]h!]uh%hnh'h(h)KhjOubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubjc)}(hMAñado el rectángulo de la ubicación actual a la lista llamada dirty_rects.h]ho)}(hjhh]hMAñado el rectángulo de la ubicación actual a la lista llamada dirty_rects.}hjjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjfubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubjc)}(hMuevo el sprite.h]ho)}(hjh]hMuevo el sprite.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khj}ubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubjc)}(h/Dibujo (Draw) el sprite en su nueva ubicación.h]ho)}(hjh]h/Dibujo (Draw) el sprite en su nueva ubicación.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubjc)}(h@Agrego la nueva ubicación del sprite a mi lista de dirty_rects.h]ho)}(hjh]h@Agrego la nueva ubicación del sprite a mi lista de dirty_rects.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubjc)}(h(Llamo a ``display.update(dirty_rects)`` h]ho)}(h'Llamo a ``display.update(dirty_rects)``h](hLlamo a }hjsbj<)}(h``display.update(dirty_rects)``h]hdisplay.update(dirty_rects)}hjsbah}(h]h]h]h]h!]uh%j;hjubeh}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)KhjLubeh}(h]h]h]h]h!]jjuh%j]h'h(h)KhjHubah}(h]h]h]h]h!]uh%jWh'h(h)Khjh&hubho)}(hXLa diferenci aen velocidad es asombrosa. Tengan en consideración que SolarWolf_ tiene docenas de sprites en constante movimiento que se actualizan sin problemas, y aún así le queda suficiente tiempo para mostrar un campo estelar de paralaje en el fondo, y también actualizarlo.h](hFLa diferenci aen velocidad es asombrosa. Tengan en consideración que }hjsbh)}(h SolarWolf_h]h SolarWolf}(hjh SolarWolfubah}(h]h]h]h]h!]namejh7https://www.pygame.org/shredwheat/solarwolf/index.shtmluh%hhjhKubh tiene docenas de sprites en constante movimiento que se actualizan sin problemas, y aún así le queda suficiente tiempo para mostrar un campo estelar de paralaje en el fondo, y también actualizarlo.}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hX^Hay dos casos en que esta técnica no funciona. El primero es cuando toda la ventana o la pantalla es siendo actualizada realmente en cada cuadro -- pensá en un motor de desplazamiento como un juego de estrategia en tiempo real o un desplazamiento lateral. Entonces, ¿qué hacés en ese caso? Bueno, la respuesta corta es -- no escribas este tipo de juegos en pygame. La respuesta larga es desplazarse en pasos de varios píxeles a la vez; no intentes hacer del desplazamiento algo perfectamente suave. El jugador apreciará un juego que se desplaza rápidamente y no notará demasiado el fondo saltando.h]hX^Hay dos casos en que esta técnica no funciona. El primero es cuando toda la ventana o la pantalla es siendo actualizada realmente en cada cuadro -- pensá en un motor de desplazamiento como un juego de estrategia en tiempo real o un desplazamiento lateral. Entonces, ¿qué hacés en ese caso? Bueno, la respuesta corta es -- no escribas este tipo de juegos en pygame. La respuesta larga es desplazarse en pasos de varios píxeles a la vez; no intentes hacer del desplazamiento algo perfectamente suave. El jugador apreciará un juego que se desplaza rápidamente y no notará demasiado el fondo saltando.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hX+Una nota final -- no todo juego requeire altas frecuencias de cuadros. Un juego de guerra estratégico podría funcionar fácilmente con solo unas pocas actualizaciones por segundo -- en este caso, la complejidad agregada de la animación de rect sucio (dirty rect animation) puede no ser necesaria.h]hX+Una nota final -- no todo juego requeire altas frecuencias de cuadros. Un juego de guerra estratégico podría funcionar fácilmente con solo unas pocas actualizaciones por segundo -- en este caso, la complejidad agregada de la animación de rect sucio (dirty rect animation) puede no ser necesaria.}hj%sbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubeh}(h]animacion-rect-suciaah]h]animación rect "sucia".ah]h!]uh%h9hhh&hh'h(h)Kubh:)}(hhh]h?)}(hNO hay regla seis.h]hNO hay regla seis.}hj>sbah}(h]h]h]h]h!]uh%h>hj;h&hh'h(h)Kubah}(h]no-hay-regla-seisah]h]no hay regla seis.ah]h!]uh%h9hhh&hh'h(h)Kubh:)}(hhh](h?)}(hALos surfaces de hardware son más problemáticos de lo que valen.h]hALos surfaces de hardware son más problemáticos de lo que valen.}hjWsbah}(h]h]h]h]h!]uh%h>hjTh&hh'h(h)Kubho)}(hB**Especialmente en pygame 2, porque HWSURFACE ahora no hace nada**h]h)}(hjgh]h>Especialmente en pygame 2, porque HWSURFACE ahora no hace nada}hjisbah}(h]h]h]h]h!]uh%hhjeubah}(h]h]h]h]h!]uh%hnh'h(h)KhjTh&hubho)}(hXSi estuviste mirando las distintas flags (banderas) que se pueden usar con ``pygame.display.set_mode()``, puede que hayas pensado lo siguiente: `Hey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!`. No es tu culpa; hemos sido entrenados por años en juegos 3D como para creer que la aceleración de hardware es buena, y el rendering (representación) del software es lento.h](hKSi estuviste mirando las distintas flags (banderas) que se pueden usar con }hj|sbj<)}(h``pygame.display.set_mode()``h]hpygame.display.set_mode()}hjsbah}(h]h]h]h]h!]uh%j;hj|ubh(, puede que hayas pensado lo siguiente: }hj|sbh title_reference)}(h`Hey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!`h]hHey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!}hjsbah}(h]h]h]h]h!]uh%jhj|ubh. No es tu culpa; hemos sido entrenados por años en juegos 3D como para creer que la aceleración de hardware es buena, y el rendering (representación) del software es lento.}hj|sbeh}(h]h]h]h]h!]uh%hnh'h(h)KhjTh&hubho)}(hYDesafortunadamente, el rendering de hardware viene con una larga lista de inconvenientes:h]hYDesafortunadamente, el rendering de hardware viene con una larga lista de inconvenientes:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)KhjTh&hubjX)}(hXg* Solo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar. * Solo funciona en pantalla completa. * Complica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta. * Pierdes el puntero del mouse. Si especificás ``HWSURFACE`` (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia! * Podría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos. h]j^)}(hhh](jc)}(hXSolo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar. h]ho)}(hXSolo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar.h]hXSolo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)Khjubjc)}(h$Solo funciona en pantalla completa. h]ho)}(h#Solo funciona en pantalla completa.h]h#Solo funciona en pantalla completa.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)Khjubjc)}(hXComplica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta. h]ho)}(hXComplica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta.h]hXComplica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjubah}(h]h]h]h]h!]uh%jbh'h(h)Khjubjc)}(hX]Pierdes el puntero del mouse. Si especificás ``HWSURFACE`` (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia! h]ho)}(hX\Pierdes el puntero del mouse. Si especificás ``HWSURFACE`` (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia!h](h.Pierdes el puntero del mouse. Si especificás }hjsbj<)}(h ``HWSURFACE``h]h HWSURFACE}hjsbah}(h]h]h]h]h!]uh%j;hjubhX! (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia!}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Khj ubah}(h]h]h]h]h!]uh%jbh'h(h)Khjubjc)}(hXVPodría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos. h]ho)}(hXUPodría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos.h]hXUPodría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos.}hj;sbah}(h]h]h]h]h!]uh%hnh'h(h)Khj7ubah}(h]h]h]h]h!]uh%jbh'h(h)Khjubeh}(h]h]h]h]h!]jjuh%j]h'h(h)Khjubah}(h]h]h]h]h!]uh%jWh'h(h)KhjTh&hubho)}(hXEl rendering (representación) de hardware tiene su lugar. Funciona de manera bastante confiable en Windows, por lo que si no estás interesado en el rendimiento de multiplataformas, puede proporcionarte un aumento sustancial de la velocidad. Sin embargo, tiene un costo -- mayor dolor de cabeza y complejidad. Es mejor apegarse al viejo y confiable ``SWSURFACE`` hasta que estés seguro de lo que estás haciendo.h](hX^El rendering (representación) de hardware tiene su lugar. Funciona de manera bastante confiable en Windows, por lo que si no estás interesado en el rendimiento de multiplataformas, puede proporcionarte un aumento sustancial de la velocidad. Sin embargo, tiene un costo -- mayor dolor de cabeza y complejidad. Es mejor apegarse al viejo y confiable }hj[sbj<)}(h ``SWSURFACE``h]h SWSURFACE}hjcsbah}(h]h]h]h]h!]uh%j;hj[ubh3 hasta que estés seguro de lo que estás haciendo.}hj[sbeh}(h]h]h]h]h!]uh%hnh'h(h)KhjTh&hubeh}(h]>los-surfaces-de-hardware-son-mas-problematicos-de-lo-que-valenah]h]Alos surfaces de hardware son más problemáticos de lo que valen.ah]h!]uh%h9hhh&hh'h(h)Kubh:)}(hhh](h?)}(h+No te distraigas con problemas secundarios.h]h+No te distraigas con problemas secundarios.}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubho)}(hXA veces, los nuevos programadores dedican mucho tiempo preocupandose sobre problemas que no son realmente críticos para el éxito de su juego. El deseo de arreglar los problemas secundarios es entendible, pero al principio en el proceso de creación de un juego, ni siquiera puedes saber cuáles son las preguntas importantes, mucho menos qué respuestas deberías elegir. El resultado puede ser un montón de prevariaciones innecesarias.h]hXA veces, los nuevos programadores dedican mucho tiempo preocupandose sobre problemas que no son realmente críticos para el éxito de su juego. El deseo de arreglar los problemas secundarios es entendible, pero al principio en el proceso de creación de un juego, ni siquiera puedes saber cuáles son las preguntas importantes, mucho menos qué respuestas deberías elegir. El resultado puede ser un montón de prevariaciones innecesarias.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hXPor ejemplo, consideren la pregunta de cómo organizar los archivos gráficos. ¿Debería cada cuadro tener su propio archivo gráfico, o cada sprite? ¿Quizás todos los gráficos se deberían comprimir en un archivo? Se ha perdido una gran cantidad de tiempo en muchos proyectos, preguntándose estas preguntas en lista de correo, debatiendo las respuestas, haciendo perfiles, etc, etc. Este es un tema secundario; cualquier cantidad de tiempo invertido en discutir eso, debería haber sido usado en escribir el código del juego real.h]hXPor ejemplo, consideren la pregunta de cómo organizar los archivos gráficos. ¿Debería cada cuadro tener su propio archivo gráfico, o cada sprite? ¿Quizás todos los gráficos se deberían comprimir en un archivo? Se ha perdido una gran cantidad de tiempo en muchos proyectos, preguntándose estas preguntas en lista de correo, debatiendo las respuestas, haciendo perfiles, etc, etc. Este es un tema secundario; cualquier cantidad de tiempo invertido en discutir eso, debería haber sido usado en escribir el código del juego real.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubho)}(hEl idea es que es mucho mejor tener una solución 'bastante buena' que haya sido implementada, que una solucion perfecta que nunca se haya llegado a escribir.h]hEl idea es que es mucho mejor tener una solución 'bastante buena' que haya sido implementada, que una solucion perfecta que nunca se haya llegado a escribir.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Khjh&hubeh}(h]*no-te-distraigas-con-problemas-secundariosah]h]+no te distraigas con problemas secundarios.ah]h!]uh%h9hhh&hh'h(h)Kubh:)}(hhh](h?)}(hLos rects son tus amigos.h]hLos rects son tus amigos.}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubho)}(hXCEl envoltorio de Pete Shinners puede tener efectos alfa geniales y velocidades rápidas de blitting, pero tengo que admitir que mi parte favorita de pygame es la humilde clase ``Rect``. Un rect es simplemente un rectángulo -- definido solo por la posición de su esquina superior izquierda, su ancho y su altura. Muchas funciones de pygame toman rects como argumentos, y ellas solo hacen 'rectstyles', una secuencia que tiene los mismos valores que un rect. Entonces si necesito un rectángulo que defina el área entre 10, 20 y 40, 50, puedo hacer cualquier de las siguientes::h](hEl envoltorio de Pete Shinners puede tener efectos alfa geniales y velocidades rápidas de blitting, pero tengo que admitir que mi parte favorita de pygame es la humilde clase }hjsbj<)}(h``Rect``h]hRect}hjsbah}(h]h]h]h]h!]uh%j;hjubhX. Un rect es simplemente un rectángulo -- definido solo por la posición de su esquina superior izquierda, su ancho y su altura. Muchas funciones de pygame toman rects como argumentos, y ellas solo hacen 'rectstyles', una secuencia que tiene los mismos valores que un rect. Entonces si necesito un rectángulo que defina el área entre 10, 20 y 40, 50, puedo hacer cualquier de las siguientes:}hjsbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubj)}(hrect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30))h]hrect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M hjh&hubho)}(hXSin embargo, si usas cualquiera de las primeras tres versiones, obtendrás accesso a las funciones de utilidad del rect. Estas incluyen funciones para mover, encoger e inflar los rects, encontrar la union de dos rects, y una variedad de funciones de detección de colisión.h]hXSin embargo, si usas cualquiera de las primeras tres versiones, obtendrás accesso a las funciones de utilidad del rect. Estas incluyen funciones para mover, encoger e inflar los rects, encontrar la union de dos rects, y una variedad de funciones de detección de colisión.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubho)}(hXPor ejemplo, supongamos que yo quiero obtener una lista de todos los sprites que contiene un punto (x,y) -- quizás el jugador clickeó ahí, o quizás esa es la ubicación actual de una bala. Es simple si cada sprite tiene un miembro .rect -- solo hay que hacer:h]hXPor ejemplo, supongamos que yo quiero obtener una lista de todos los sprites que contiene un punto (x,y) -- quizás el jugador clickeó ahí, o quizás esa es la ubicación actual de una bala. Es simple si cada sprite tiene un miembro .rect -- solo hay que hacer:}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubjX)}(h_sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)] h]ho)}(h^sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]h]h^sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]}hj%sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj!ubah}(h]h]h]h]h!]uh%jWh'h(h)Mhjh&hubho)}(hXyLos rects no tienen otra relación con los surfaces o con las funciones gráficas, aparte del hecho de que puedes usarlos como argumentos. También se pueden usar en lugares que no tienen nada que ver con gráficos, pero aún así deben ser definidos como rectángulos. En cada proyecto descrubro algunos lugares nuevos donde usar rects donde nunca pensé que los necesitaría.h]hXyLos rects no tienen otra relación con los surfaces o con las funciones gráficas, aparte del hecho de que puedes usarlos como argumentos. También se pueden usar en lugares que no tienen nada que ver con gráficos, pero aún así deben ser definidos como rectángulos. En cada proyecto descrubro algunos lugares nuevos donde usar rects donde nunca pensé que los necesitaría.}hj9sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjh&hubeh}(h]los-rects-son-tus-amigosah]h]los rects son tus amigos.ah]h!]uh%h9hhh&hh'h(h)Mubh:)}(hhh](h?)}(hANo te molestes con la detección de colisión de píxel perfecto.h]hANo te molestes con la detección de colisión de píxel perfecto.}hjRsbah}(h]h]h]h]h!]uh%h>hjOh&hh'h(h)M'ubho)}(hAsí que, tenés tus sprites moviendose y necesitás saber si se están chocando entre sí. Es tentador escribir algo como lo siguiente:ite something like the following:h]hAsí que, tenés tus sprites moviendose y necesitás saber si se están chocando entre sí. Es tentador escribir algo como lo siguiente:ite something like the following:}hj`sbah}(h]h]h]h]h!]uh%hnh'h(h)M)hjOh&hubjX)}(h* Checkear si los rects están en colisión. Si no lo están, ignorarlos. * Para cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión. h]j^)}(hhh](jc)}(hGCheckear si los rects están en colisión. Si no lo están, ignorarlos.h]ho)}(hjwh]hGCheckear si los rects están en colisión. Si no lo están, ignorarlos.}hjysbah}(h]h]h]h]h!]uh%hnh'h(h)M+hjuubah}(h]h]h]h]h!]uh%jbh'h(h)M+hjrubjc)}(hPara cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión. h]ho)}(hPara cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión.h]hPara cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)M,hjubah}(h]h]h]h]h!]uh%jbh'h(h)M,hjrubeh}(h]h]h]h]h!]jjuh%j]h'h(h)M+hjnubah}(h]h]h]h]h!]uh%jWh'h(h)M+hjOh&hubho)}(hXHay otras formas de hacer esto, con ???????? coordinando máscaras de sprite y así sucesivamente, pero de cualquier forma en que se haga en pygame, probablemente sea demasiado lento. Para la mayoría de los juego probablemente sea mejor hacer solo un "sub-rect de colisión" -- esto es, crear un rect por cada sprite que es un poco más pequeño que la imagen real, y usar eso para colisiones. Esto va a resultar más rápido y, en la mayoría de los casos, el jugador no va a notar la imprecisión. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.h]hXHay otras formas de hacer esto, con ???????? coordinando máscaras de sprite y así sucesivamente, pero de cualquier forma en que se haga en pygame, probablemente sea demasiado lento. Para la mayoría de los juego probablemente sea mejor hacer solo un "sub-rect de colisión" -- esto es, crear un rect por cada sprite que es un poco más pequeño que la imagen real, y usar eso para colisiones. Esto va a resultar más rápido y, en la mayoría de los casos, el jugador no va a notar la imprecisión. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)M.hjOh&hubeh}(h]=no-te-molestes-con-la-deteccion-de-colision-de-pixel-perfectoah]h]Ano te molestes con la detección de colisión de píxel perfecto.ah]h!]uh%h9hhh&hh'h(h)M'ubh:)}(hhh](h?)}(h#Gestión del subsistema de eventos.h]h#Gestión del subsistema de eventos.}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)M>ubho)}(hEl sistema de eventos de Pygame es un poco truculento. Hay en realidad dos formas diferntes de saber qué está haciendo un dispositivo de entrada (teclado, mouse, o joystick).h]hEl sistema de eventos de Pygame es un poco truculento. Hay en realidad dos formas diferntes de saber qué está haciendo un dispositivo de entrada (teclado, mouse, o joystick).}hjsbah}(h]h]h]h]h!]uh%hnh'h(h)M@hjh&hubho)}(hLa primera es directamente comprobar el estado del dispositivo. Esto se hace mediante la llamada, digamos, ``pygame.mouse.get_pos()`` o ``pygame.key.get_pressed()``. Esto te indicará el estado de tu dispositivo *en el momento en que llames a la función*h](hkLa primera es directamente comprobar el estado del dispositivo. Esto se hace mediante la llamada, digamos, }hjsbj<)}(h``pygame.mouse.get_pos()``h]hpygame.mouse.get_pos()}hjsbah}(h]h]h]h]h!]uh%j;hjubh o }hjsbj<)}(h``pygame.key.get_pressed()``h]hpygame.key.get_pressed()}hjsbah}(h]h]h]h]h!]uh%j;hjubh0. Esto te indicará el estado de tu dispositivo }hjsbj)}(h+*en el momento en que llames a la función*h]h)en el momento en que llames a la función}hj sbah}(h]h]h]h]h!]uh%jhjubeh}(h]h]h]h]h!]uh%hnh'h(h)MDhjh&hubho)}(hEl segundo método usa la cola de eventos de SDL. Esta cola es una lista de eventos -- eventos se agregan a la lista al ser detectados, y se eliminan de la cola mientras se leen.h]hEl segundo método usa la cola de eventos de SDL. Esta cola es una lista de eventos -- eventos se agregan a la lista al ser detectados, y se eliminan de la cola mientras se leen.}hj% sbah}(h]h]h]h]h!]uh%hnh'h(h)MJhjh&hubho)}(hX.Hay ventajas y desventajas para cada sistema. Comprobación de estado (sistema 1) (state-checking) aporta precisión -- sabés exactamente cuándo se realizó la entrada -- si ``mouse.get_pressed([0])`` (mouse fue presionado) es 1, eso significa que el botón izquierdo del mpuse está abajo *justo en este momento*. La cola de eventos meramente reporta que el mouse estuvo abajo en algún momento del pasado; si revisas la cola con bastante frecuencia, eso puede estar bien, pero si te demorás en verificarlo con otro código, latencia de entrada puede incrementar. Otra ventaja del sistema de comprobación de estado es que detecta "acordes" fácilmente; es decir, varios estados al mismo tiempo. Si querés saber si las teclas ``t`` y la ``f`` están ambas presionadas al mismo tiempo, sólo hay que checkear::h](hHay ventajas y desventajas para cada sistema. Comprobación de estado (sistema 1) (state-checking) aporta precisión -- sabés exactamente cuándo se realizó la entrada -- si }hj3 sbj<)}(h``mouse.get_pressed([0])``h]hmouse.get_pressed([0])}hj; sbah}(h]h]h]h]h!]uh%j;hj3 ubhZ (mouse fue presionado) es 1, eso significa que el botón izquierdo del mpuse está abajo }hj3 sbj)}(h*justo en este momento*h]hjusto en este momento}hjM sbah}(h]h]h]h]h!]uh%jhj3 ubhX. La cola de eventos meramente reporta que el mouse estuvo abajo en algún momento del pasado; si revisas la cola con bastante frecuencia, eso puede estar bien, pero si te demorás en verificarlo con otro código, latencia de entrada puede incrementar. Otra ventaja del sistema de comprobación de estado es que detecta "acordes" fácilmente; es decir, varios estados al mismo tiempo. Si querés saber si las teclas }hj3 sbj<)}(h``t``h]ht}hj_ sbah}(h]h]h]h]h!]uh%j;hj3 ubh y la }hj3 sbj<)}(h``f``h]hf}hjq sbah}(h]h]h]h]h!]uh%j;hj3 ubhB están ambas presionadas al mismo tiempo, sólo hay que checkear:}hj3 sbeh}(h]h]h]h]h!]uh%hnh'h(h)MNhjh&hubj)}(hEif (key.get_pressed[K_t] and key.get_pressed[K_f]): print("Sip!")h]hEif (key.get_pressed[K_t] and key.get_pressed[K_f]): print("Sip!")}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)MZhjh&hubho)}(hXSin embargo, en el sistema de colas, cada pulsación de tecla llega a la cola como un evento completamente separado, entonces será necesario recordar que la tecla ``t`` estuvo presionada y que aún no había sido soltada mientras la tecla ``f`` fue presionada. Un poco más complicado.h](hSin embargo, en el sistema de colas, cada pulsación de tecla llega a la cola como un evento completamente separado, entonces será necesario recordar que la tecla }hj sbj<)}(h``t``h]ht}hj sbah}(h]h]h]h]h!]uh%j;hj ubhG estuvo presionada y que aún no había sido soltada mientras la tecla }hj sbj<)}(h``f``h]hf}hj sbah}(h]h]h]h]h!]uh%j;hj ubh) fue presionada. Un poco más complicado.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)M]hjh&hubho)}(hXSin embargo, el sistema de estados tiene una gran desventaja. Solo informa el estado del dispositivo al momento en que es llamado; si el usuario clickea el botón del mouse y lo suelta justo antes del llamado a ``mouse.get_pressed()``, el botón del mouse va a devolver un 0 -- ``get_pressed()`` falló completamente en detectar la pulsación del botón del mouse. Dos events, ``MOUSEBUTTONDOWN`` y ``MOUSEBUTTONUP``, seguirán esperando en la cola de eventos a ser recuperados y procesados.h](hSin embargo, el sistema de estados tiene una gran desventaja. Solo informa el estado del dispositivo al momento en que es llamado; si el usuario clickea el botón del mouse y lo suelta justo antes del llamado a }hj sbj<)}(h``mouse.get_pressed()``h]hmouse.get_pressed()}hj sbah}(h]h]h]h]h!]uh%j;hj ubh,, el botón del mouse va a devolver un 0 -- }hj sbj<)}(h``get_pressed()``h]h get_pressed()}hj sbah}(h]h]h]h]h!]uh%j;hj ubhR falló completamente en detectar la pulsación del botón del mouse. Dos events, }hj sbj<)}(h``MOUSEBUTTONDOWN``h]hMOUSEBUTTONDOWN}hj sbah}(h]h]h]h]h!]uh%j;hj ubh y }hj sbj<)}(h``MOUSEBUTTONUP``h]h MOUSEBUTTONUP}hj sbah}(h]h]h]h]h!]uh%j;hj ubhK, seguirán esperando en la cola de eventos a ser recuperados y procesados.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mbhjh&hubho)}(hX/La lección es la siguiente: elegí el sistema que cumpla con tus requisitos. Si no hay mucho sucediendo en tu loop -- supongamos, estás sentado en un bucle de ``while True``, esperando una entrada, usa ``get_pressed()`` u otra función de estado; la latencia será menor. Por otro lado, si cada pulsación de tecla es crucial, pero la latencia no es tan importante -- por ejemplo, el usuario está escribiendo algo en un cuadro de edición, usá la cola de eventos. Algunas pulsaciones de tecla pueden retrasarse un poco, pero al menos van a aparecer todas.h](hLa lección es la siguiente: elegí el sistema que cumpla con tus requisitos. Si no hay mucho sucediendo en tu loop -- supongamos, estás sentado en un bucle de }hj sbj<)}(h``while True``h]h while True}hj' sbah}(h]h]h]h]h!]uh%j;hj ubh, esperando una entrada, usa }hj sbj<)}(h``get_pressed()``h]h get_pressed()}hj9 sbah}(h]h]h]h]h!]uh%j;hj ubhXR u otra función de estado; la latencia será menor. Por otro lado, si cada pulsación de tecla es crucial, pero la latencia no es tan importante -- por ejemplo, el usuario está escribiendo algo en un cuadro de edición, usá la cola de eventos. Algunas pulsaciones de tecla pueden retrasarse un poco, pero al menos van a aparecer todas.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mjhjh&hubho)}(hXUna nota sobre ``event.poll()`` vs. ``wait()`` -- ``poll()`` puede parecer mejor ya que no impide al programa de hacer otra cosa mientras está esperando la entrada -- ``wait()`` suspende el programa hasta que reciba el evento. Sin embargo, ``poll()`` consumirá el 100% del tiempo disponible del CPU mientras se esté ejecutando y llenará la cola de eventos con ``NOEVENTS``. Para seleccionar solo los tipo de eventos que resultan de interés usa ``set_blocked()``, la cola será mucho más manejable.h](hUna nota sobre }hjQ sbj<)}(h``event.poll()``h]h event.poll()}hjY sbah}(h]h]h]h]h!]uh%j;hjQ ubh vs. }hjQ sbj<)}(h ``wait()``h]hwait()}hjk sbah}(h]h]h]h]h!]uh%j;hjQ ubh -- }hjQ sbj<)}(h ``poll()``h]hpoll()}hj} sbah}(h]h]h]h]h!]uh%j;hjQ ubhm puede parecer mejor ya que no impide al programa de hacer otra cosa mientras está esperando la entrada -- }hjQ sbj<)}(h ``wait()``h]hwait()}hj sbah}(h]h]h]h]h!]uh%j;hjQ ubh? suspende el programa hasta que reciba el evento. Sin embargo, }hjQ sbj<)}(h ``poll()``h]hpoll()}hj sbah}(h]h]h]h]h!]uh%j;hjQ ubhq consumirá el 100% del tiempo disponible del CPU mientras se esté ejecutando y llenará la cola de eventos con }hjQ sbj<)}(h ``NOEVENTS``h]hNOEVENTS}hj sbah}(h]h]h]h]h!]uh%j;hjQ ubhJ. Para seleccionar solo los tipo de eventos que resultan de interés usa }hjQ sbj<)}(h``set_blocked()``h]h set_blocked()}hj sbah}(h]h]h]h]h!]uh%j;hjQ ubh%, la cola será mucho más manejable.}hjQ sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mshjh&hubeh}(h]!gestion-del-subsistema-de-eventosah]h]#gestión del subsistema de eventos.ah]h!]uh%h9hhh&hh'h(h)M>ubh:)}(hhh](h?)}(hColorkey vs. Alpha.h]hColorkey vs. Alpha.}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)M}ubho)}(hmHay mucha confusión en torno a estas dos técnicas, y gran parte de esto proviene de la terminología usada.h]hmHay mucha confusión en torno a estas dos técnicas, y gran parte de esto proviene de la terminología usada.}hj sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hX?'Colorkey blitting' (blitting de la clave de color) implica decirle a pygame que todos lso píxeles de cierto color de una determinada imagen son transparentes en vez del color que realmente sean. Estos píxeles transparentes no son blitteados cuando el resto de la imagen es blitteada y entonces no oscurecen el fondo. Así es como hacemos los sprites que no son de forma rectangular. Simplemente llamamos a ``surface.set_colorkey(color)``, donde el color es una tupla RGB, supongamos (0,0,0). Esto haría que cada píxel en la imagen de origen transparente en vez de negro.0h](hX'Colorkey blitting' (blitting de la clave de color) implica decirle a pygame que todos lso píxeles de cierto color de una determinada imagen son transparentes en vez del color que realmente sean. Estos píxeles transparentes no son blitteados cuando el resto de la imagen es blitteada y entonces no oscurecen el fondo. Así es como hacemos los sprites que no son de forma rectangular. Simplemente llamamos a }hj sbj<)}(h``surface.set_colorkey(color)``h]hsurface.set_colorkey(color)}hj sbah}(h]h]h]h]h!]uh%j;hj ubh, donde el color es una tupla RGB, supongamos (0,0,0). Esto haría que cada píxel en la imagen de origen transparente en vez de negro.}hj sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hX'Alpha' es diferente, y como en dos sabores. 'Image alpha' (imagen alfa) que aplica a la imagen completa, y es probablemente lo que quieras. Propiamente conocido como 'translucidez', alpha causa que cada píxel en la imagen de origen sea solo *parcialmente* opaco. Por ejemplo, si configuras el alfa de una surface en 192 y después lo blitteas (convertis) en un fondo, 3/4 del color de cada píxel provendrá de la imagen de origan, y 1/4 del fondo. Alfa se mide de 255 a 0, donde 0 es completamente transparente, y 255 es completamente opaco. Nótese que el blitting con colorkey y alfa (colorkey and alfa blitting) pueden combinarse -- esto produce una imagen completamente transparete en algunos lugares y semi-transparente en otros.h](h'Alpha' es diferente, y como en dos sabores. 'Image alpha' (imagen alfa) que aplica a la imagen completa, y es probablemente lo que quieras. Propiamente conocido como 'translucidez', alpha causa que cada píxel en la imagen de origen sea solo }hj$ sbj)}(h*parcialmente*h]h parcialmente}hj, sbah}(h]h]h]h]h!]uh%jhj$ ubhX opaco. Por ejemplo, si configuras el alfa de una surface en 192 y después lo blitteas (convertis) en un fondo, 3/4 del color de cada píxel provendrá de la imagen de origan, y 1/4 del fondo. Alfa se mide de 255 a 0, donde 0 es completamente transparente, y 255 es completamente opaco. Nótese que el blitting con colorkey y alfa (colorkey and alfa blitting) pueden combinarse -- esto produce una imagen completamente transparete en algunos lugares y semi-transparente en otros.}hj$ sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubho)}(hX^'Per-pixel alpha' ('Alfa por pixel') es el otro tipo de alfa, y es más complicado Básicamente, cada píxel de la imagen de origen tiene su propio valor alfa, de 0 a 1. Cada píxel, por lo tanto, puede tener una opacidad diferente cuando se blittea (proyecta) sobre el fondo. Este tipo de alfa no se puede mezclar con la proyección (el blitting) de la clave de color, y anula el 'per-image' alfa. El alfa por píxel (per-pixel alfa) es raramente usado en juego, y para usarlo tenes que guardar la imagen de origen en un editor gráfico con un *canal alpha* especial. Es complicado -- no lo usen todavía.h](hX!'Per-pixel alpha' ('Alfa por pixel') es el otro tipo de alfa, y es más complicado Básicamente, cada píxel de la imagen de origen tiene su propio valor alfa, de 0 a 1. Cada píxel, por lo tanto, puede tener una opacidad diferente cuando se blittea (proyecta) sobre el fondo. Este tipo de alfa no se puede mezclar con la proyección (el blitting) de la clave de color, y anula el 'per-image' alfa. El alfa por píxel (per-pixel alfa) es raramente usado en juego, y para usarlo tenes que guardar la imagen de origen en un editor gráfico con un }hjD sbj)}(h *canal alpha*h]h canal alpha}hjL sbah}(h]h]h]h]h!]uh%jhjD ubh0 especial. Es complicado -- no lo usen todavía.}hjD sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhj h&hubeh}(h]colorkey-vs-alphaah]h]colorkey vs. alpha.ah]h!]uh%h9hhh&hh'h(h)M}ubh:)}(hhh](h?)}(h!Haz cosas a la manera de pythony.h]h!Haz cosas a la manera de pythony.}hjo sbah}(h]h]h]h]h!]uh%h>hjl h&hh'h(h)Mubho)}(hX#Una nota final (no es la menos importante, simplemente viene al final) Pygame es un envoltorio bastante liviano alrededor de SDL, que a su vez es un ligero envoltorio alrededor de las calls (llamadas) de gráficos del sistema operativo nativo. Las posibilidades son muy buenas de que si tu código sigue lento, habiendo seguido las indicaciones que mencioné arriba, entonces el problema yace en la forma en que estás direccionando tus datos en python. Algunos modismos simplemente van a ser lentos en python sin importar lo que hagas. Afortunadamente, python es un lenguaje muy claro -- si un fragmento del código se ve extraño o difícil de manejar, es probable que su velocidad también se pueda mejorar. Lée `Python Performance Tips`_ para obtener excelentes consejos sobre cómo puede mejorar la velocidad del código. Dicho esto, la optimización prematura es la razí de todos los males; si simplemente no es lo suficientemente rápido no tortures el código intentando hacerlo más rápido. Algunas cosas simplemente no están destinadas a ser. :)h](hXUna nota final (no es la menos importante, simplemente viene al final) Pygame es un envoltorio bastante liviano alrededor de SDL, que a su vez es un ligero envoltorio alrededor de las calls (llamadas) de gráficos del sistema operativo nativo. Las posibilidades son muy buenas de que si tu código sigue lento, habiendo seguido las indicaciones que mencioné arriba, entonces el problema yace en la forma en que estás direccionando tus datos en python. Algunos modismos simplemente van a ser lentos en python sin importar lo que hagas. Afortunadamente, python es un lenguaje muy claro -- si un fragmento del código se ve extraño o difícil de manejar, es probable que su velocidad también se pueda mejorar. Lée }hj} sbh)}(h`Python Performance Tips`_h]hPython Performance Tips}(hj hPython Performance Tipsubah}(h]h]h]h]h!]namePython Performance Tipshghttp://www-rohan.sdsu.edu/~gawron/compling/course_core/python_intro/intro_lecture_files/fastpython.htmluh%hhj} hKubhX= para obtener excelentes consejos sobre cómo puede mejorar la velocidad del código. Dicho esto, la optimización prematura es la razí de todos los males; si simplemente no es lo suficientemente rápido no tortures el código intentando hacerlo más rápido. Algunas cosas simplemente no están destinadas a ser. :)}hj} sbeh}(h]h]h]h]h!]uh%hnh'h(h)Mhjl h&hubho)}(ht¡Ya está! Ahora sabés prácticamente todo lo que yo sé sobre el uso de pygame. Ahora, ¡ve a escribir ese juego!h]ht¡Ya está! Ahora sabés prácticamente todo lo que yo sé sobre el uso de pygame. Ahora, ¡ve a escribir ese juego!}hj sbah}(h]h]h]h]h!]uh%hnh'h(h)Mhjl h&hubh transition)}(h----h]h}(h]h]h]h]h!]uh%j h'h(h)Mhjl h&hubho)}(h*David Clark es un ávido usuario de pygame y es editor de Pygame Code Repository, una vidriera del códigos de juegos en python suministrado por la comunidad. Él es también el autor de Twitch, un juego de arcade completamente promedio de pygame.*h]j)}(hj h]hDavid Clark es un ávido usuario de pygame y es editor de Pygame Code Repository, una vidriera del códigos de juegos en python suministrado por la comunidad. Él es también el autor de Twitch, un juego de arcade completamente promedio de pygame.}hj sbah}(h]h]h]h]h!]uh%jhj ubah}(h]h]h]h]h!]uh%hnh'h(h)Mhjl h&hubh target)}(h#.. _Pygame: https://www.pygame.org/h]h}(h]pygameah]h]pygameah]h!]hhuh%j h)Mhjl h&hh'h( referencedubj )}(h.. _SDL: http://libsdl.orgh]h}(h]sdlah]h]sdlah]h!]hj uh%j h)Mhjl h&hh'h(j ubj )}(h\.. _Python 2.0 Quick Reference: http://www.brunningonline.net/simon/python/quick-ref2_0.htmlh]h}(h]python-2-0-quick-referenceah]h]python 2.0 quick referenceah]h!]hj`uh%j h)Mhjl h&hh'h(j ubj )}(hF.. _SolarWolf: https://www.pygame.org/shredwheat/solarwolf/index.shtmlh]h}(h] solarwolfah]h] solarwolfah]h!]hj uh%j h)Mhjl h&hh'h(j ubj )}(h.. _Python Performance Tips: http://www-rohan.sdsu.edu/~gawron/compling/course_core/python_intro/intro_lecture_files/fastpython.htmlh]h}(h]python-performance-tipsah]h]python performance tipsah]h!]hj uh%j h)Mhjl h&hh'h(j ubeh}(h] haz-cosas-a-la-manera-de-pythonyah]h]!haz cosas a la manera de pythony.ah]h!]uh%h9hhh&hh'h(h)Mubeh}(h]id1ah]h]h]"guía de pygame para principiantesah!]uh%h9hh;h&hh'h(h)Kj ubeh}(h]!guia-de-pygame-para-principiantesah]h]h]j ah!]uh%h9hhh&hh'h(h)Kj ubeh}(h]h]h]h]h!]sourceh(h>Guía de Pygame para Newbiestranslation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjS error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(pygame]hasdl]hapython 2.0 quick reference]jOa solarwolf]japython performance tips]j aurefids}nameids}("guía de pygame para principiantesNj~j{jjjjjjj8j5jQjNjj}jjjLjIjjj j ji jf j j j j j j j j j j j j u nametypes}(j j~jjjj8jQjjjLjj ji j j j j j j uh}(j# h;j hj{j"jjjjjjj5jjNj;j}jTjjjIjjjOj jjf j j jl j j j j j j j j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}ja KsRparse_messages](h system_message)}(hhh]ho)}(h{No directive entry for "title" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "title".h]h{No directive entry for "title" in module "docutils.parsers.rst.languages.es". Using English fallback for directive "title".}hj sbah}(h]h]h]h]h!]uh%hnhj ubah}(h]h]h]h]h!]levelKtypeINFOlineKsourceh8uh%j hh;h&hh'h(h)K ubj )}(hhh]ho)}(hEDuplicate implicit target name: "guía de pygame para principiantes".h]hEDuplicate implicit target name: "guía de pygame para principiantes".}hj sbah}(h]h]h]h]h!]uh%hnhj ubah}(h]h]h]h]h!]j alevelKtypej sourceh(lineKuh%j hhh&hh'h(h)Kubetransform_messages] transformerN include_log] docs/es/tutorials/GuiaNewbie.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.2021322 pygame-2.6.1/docs/generated/es/doctrees/tutorials/IniciarImportar.doctree0000644000175100001770000003052714676242430026224 0ustar00runnerdockerL1sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hTUTORIAL:Import and Initializeh]h TextTUTORIAL:Import and Initialize}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceE/home/runner/work/pygame/pygame/docs/es/tutorials/IniciarImportar.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h-Tutoriales de Pygame - Importar e Inicializarh]h-Tutoriales de Pygame - Importar e Inicializar}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(hImportar e Inicializarh]hImportar e Inicializar}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAutorh]hAutor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hh}h]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContactoh]hContacto}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.orgh]h)}(hhh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh)}(hXImportar e inicializar pygame es un proceso muy simple. También es lo suficientemente flexible para que el usuario tenga el control sobre lo que está sucediendo. Pygame es una colección de diferentes módulos en un mismo paquete de python. Algunos de los módulos están escritos en C, y algunos otros están escritos en python. Algunos módulos también son opcionales y es posible que no estén presentes.h]hXImportar e inicializar pygame es un proceso muy simple. También es lo suficientemente flexible para que el usuario tenga el control sobre lo que está sucediendo. Pygame es una colección de diferentes módulos en un mismo paquete de python. Algunos de los módulos están escritos en C, y algunos otros están escritos en python. Algunos módulos también son opcionales y es posible que no estén presentes.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh)}(hEsto es solo una breve introducción sobre lo que sucede cuando se importa pygame. Para una explicación más clara, definitivamente recomiendo que vean los ejemplos de pygame.h]hEsto es solo una breve introducción sobre lo que sucede cuando se importa pygame. Para una explicación más clara, definitivamente recomiendo que vean los ejemplos de pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh:)}(hhh](h?)}(hImportarh]hImportar}hj*sbah}(h]h]h]h]h!]uh%h>hj'h&hh'h(h)Kubh)}(hPrimero debemos importar el paquete de pygame. Desde la versión 1.4 de pygame este ha sido actualizado para ser mucho más fácil. La mayoría de los juegos importarán todo pygame de esta manera.::h]hPrimero debemos importar el paquete de pygame. Desde la versión 1.4 de pygame este ha sido actualizado para ser mucho más fácil. La mayoría de los juegos importarán todo pygame de esta manera.:}hj8sbah}(h]h]h]h]h!]uh%hh'h(h)K!hj'h&hubh literal_block)}(h)import pygame from pygame.locals import *h]h)import pygame from pygame.locals import *}hjHsbah}(h]h]h]h]h!]h#h$uh%jFh'h(h)K%hj'h&hubh)}(hX"La primera línea aquí es la única necesaria. Esta línea importa todos los módulos de pygame disponibles en el paquete de pygame. La segunda línea es opcional y plantea un conjunto de funciones limitadas en el 'espacio global de nombres' (global namespace) de la secuencia de comandos.h]hX"La primera línea aquí es la única necesaria. Esta línea importa todos los módulos de pygame disponibles en el paquete de pygame. La segunda línea es opcional y plantea un conjunto de funciones limitadas en el 'espacio global de nombres' (global namespace) de la secuencia de comandos.}hjVsbah}(h]h]h]h]h!]uh%hh'h(h)K(hj'h&hubh)}(hUna cosa importante a tener en cuenta es que muchos de los módulos de pygame son opcionales. Por ejemplo, uno de estos es el módulo de fuentes. Cuando se importa pygame (import pygame), pygame comprobará si el módulo de fuentes está disponible.h]hUna cosa importante a tener en cuenta es que muchos de los módulos de pygame son opcionales. Por ejemplo, uno de estos es el módulo de fuentes. Cuando se importa pygame (import pygame), pygame comprobará si el módulo de fuentes está disponible.}hjdsbah}(h]h]h]h]h!]uh%hh'h(h)K-hj'h&hubh)}(hXSi el módulo de fuentes está disponible se importará como "pygame.font". Si el módulo no está disponible, "pygame.font" se establecera como 'None' (ninguno). Esto hace que sea bastante fácil probar más adelante si el módulo de fuentes está disponible.h]hXSi el módulo de fuentes está disponible se importará como "pygame.font". Si el módulo no está disponible, "pygame.font" se establecera como 'None' (ninguno). Esto hace que sea bastante fácil probar más adelante si el módulo de fuentes está disponible.}hjrsbah}(h]h]h]h]h!]uh%hh'h(h)K1hj'h&hubeh}(h]importarah]h]importarah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(h Inicializarh]h Inicializar}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)K7ubh)}(hAntes de que pueda hacerse mucho con pygame, será necesario inicializarlo. La manera más común es hacerlo mediante una 'llamada' (call).::h]hAntes de que pueda hacerse mucho con pygame, será necesario inicializarlo. La manera más común es hacerlo mediante una 'llamada' (call).:}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K9hjh&hubjG)}(h pygame.init()h]h pygame.init()}hjsbah}(h]h]h]h]h!]h#h$uh%jFh'h(h)Khjh&hubjG)}(hpygame.font.init()h]hpygame.font.init()}hjsbah}(h]h]h]h]h!]h#h$uh%jFh'h(h)KDhjh&hubh)}(hX\Tengan en cuenta que si hay un error cuando se inicialzia con "pygame.init()", fallará silenciosamente. Al inicializar manualmente módulos como éste, cualquier error generará una excepción. Cualquier módulo que deba ser inicializado también tiene una función "get_init()", que devolverá Verdadero (true) si el módulo ha sido inicializado.h]hX\Tengan en cuenta que si hay un error cuando se inicialzia con "pygame.init()", fallará silenciosamente. Al inicializar manualmente módulos como éste, cualquier error generará una excepción. Cualquier módulo que deba ser inicializado también tiene una función "get_init()", que devolverá Verdadero (true) si el módulo ha sido inicializado.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KFhjh&hubh)}(hMEs seguro llamar a la función init() para cualquier módulo más de una vez.h]hMEs seguro llamar a la función init() para cualquier módulo más de una vez.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KKhjh&hubeh}(h] inicializarah]h] inicializarah]h!]uh%h9hhNh&hh'h(h)K7ubh:)}(hhh](h?)}(h Cerrar (Quit)h]h Cerrar (Quit)}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)KOubh)}(hXbLos módulos que son inicializados por lo general tienen una función quit() (abandonar) que dejará la configuración de los recursos como se encontraba antes. Las variables utilizadas son destruidas. No hay necesidad de hacer un llamado explicitamente, ya que *pygame* cerrará limpiamente todos los módulos inicializados, una vez que python finaliza.h](hXLos módulos que son inicializados por lo general tienen una función quit() (abandonar) que dejará la configuración de los recursos como se encontraba antes. Las variables utilizadas son destruidas. No hay necesidad de hacer un llamado explicitamente, ya que }hjsbh emphasis)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%jhjubhT cerrará limpiamente todos los módulos inicializados, una vez que python finaliza.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KQhjh&hubeh}(h] cerrar-quitah]h] cerrar (quit)ah]h!]uh%h9hhNh&hh'h(h)KOubeh}(h]importar-e-inicializarah]h]importar e inicializarah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]+tutoriales-de-pygame-importar-e-inicializarah]h]-tutoriales de pygame - importar e inicializarah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j=j:j5j2jjjjj-j*u nametypes}(j=j5jjj-uh}(j:h;j2hNjj'jjj*ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]%docs/es/tutorials/IniciarImportar.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.2191322 pygame-2.6.1/docs/generated/es/doctrees/tutorials/ModosVisualizacion.doctree0000644000175100001770000010741214676242430026750 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h0TUTORIAL: Choosing and Configuring Display Modesh]h Text0TUTORIAL: Choosing and Configuring Display Modes}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceH/home/runner/work/pygame/pygame/docs/es/tutorials/ModosVisualizacion.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(hDTutoriales de Pygame - Configuración de los Modos de Visualizaciónh]hDTutoriales de Pygame - Configuración de los Modos de Visualización}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(h-Configuración de los Modos de Visualizaciónh]h-Configuración de los Modos de Visualización}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hh}h]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.orgh]h)}(hhh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh:)}(hhh](h?)}(h Introducciónh]h Introducción}hjsbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Kubh)}(hXConfigurar el modo de visualización en *pygame* crea una imagen de *Surface* visible en el monitor. Esta *Surface* puede o cubrir la pantalla completa, o si se está usando una plataforma que soporta la gestión de ventanas, la imagen puede usarse en ventana. La *Surface* de visualización no es más que un objeto de *Surface* estándar de *pygame*. Hay funciones especiales necesarias en el módulo :mod:`pygame.display` para mantener los contenidos de la imagen de *Surface* actualizada en el monitor.h](h(Configurar el modo de visualización en }hjsbh emphasis)}(h*pygame*h]hpygame}hj&sbah}(h]h]h]h]h!]uh%j$hjubh crea una imagen de }hjsbj%)}(h *Surface*h]hSurface}hj8sbah}(h]h]h]h]h!]uh%j$hjubh visible en el monitor. Esta }hjsbj%)}(h *Surface*h]hSurface}hjJsbah}(h]h]h]h]h!]uh%j$hjubh puede o cubrir la pantalla completa, o si se está usando una plataforma que soporta la gestión de ventanas, la imagen puede usarse en ventana. La }hjsbj%)}(h *Surface*h]hSurface}hj\sbah}(h]h]h]h]h!]uh%j$hjubh/ de visualización no es más que un objeto de }hjsbj%)}(h *Surface*h]hSurface}hjnsbah}(h]h]h]h]h!]uh%j$hjubh estándar de }hjsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjubh4. Hay funciones especiales necesarias en el módulo }hjsbh pending_xref)}(h:mod:`pygame.display`h]h literal)}(hjh]hpygame.display}hjsbah}(h]h](xrefpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoctutorials/ModosVisualizacion refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classN reftargetpygame.displayuh%jh'h(h)Khjubh. para mantener los contenidos de la imagen de }hjsbj%)}(h *Surface*h]hSurface}hjsbah}(h]h]h]h]h!]uh%j$hjubh actualizada en el monitor.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj h&hubh)}(hXnConfigurar el modo de visualización en *pygame* es una tarea más fácil que con la mayoría de las bibliotecas gráficas. La ventaja es que si el modo de visualización no está disponible, *pygame* va a emular el modo de visualización que fue pedido. *Pygame* seleccionará la resolución de la visualización y la profundidad del color de la visualización que mejor coincida con la configuración solicitada, luego permitirá tener acceso al formato de visualización requerido. En realidad, ya que el módulo :mod:`pygame.display` está enlazado con la librería SDL, es SDL quién realmente hace todo este trabajo.h](h(Configurar el modo de visualización en }hjsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjubh es una tarea más fácil que con la mayoría de las bibliotecas gráficas. La ventaja es que si el modo de visualización no está disponible, }hjsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjubh7 va a emular el modo de visualización que fue pedido. }hjsbj%)}(h*Pygame*h]hPygame}hjsbah}(h]h]h]h]h!]uh%j$hjubh seleccionará la resolución de la visualización y la profundidad del color de la visualización que mejor coincida con la configuración solicitada, luego permitirá tener acceso al formato de visualización requerido. En realidad, ya que el módulo }hjsbj)}(h:mod:`pygame.display`h]j)}(hjh]hpygame.display}hjsbah}(h]h](jpypy-modeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainj#reftypemod refexplicitrefwarnjNjNjpygame.displayuh%jh'h(h)KhjubhU está enlazado con la librería SDL, es SDL quién realmente hace todo este trabajo.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj h&hubh)}(hXEsta forma de configurar el modo de visualización presenta ventajas y desventajas. La ventaja es que si tu juego requiere un modo de visualización específico, el juego va a poder ejecutarse aún en plataformas que no soporten los requerimientos. Esto también va a simplificarles la vida cuando estén comenzando con algo, ya que siempre es fácil volver luego y hacer la selección de modo un poco más específicos. La desventaja es que lo que soliciten no es siempre lo que van a obtener. Hay un castigo o multa en el rendimineto cuando el modo de visualización debe ser emulado. Este tutorial les ayudará a entender los métodos diferentes para consultar (querying) las capacidades de visualización de las plataformas, y configurar el modo de visualización para tu juego.h]hXEsta forma de configurar el modo de visualización presenta ventajas y desventajas. La ventaja es que si tu juego requiere un modo de visualización específico, el juego va a poder ejecutarse aún en plataformas que no soporten los requerimientos. Esto también va a simplificarles la vida cuando estén comenzando con algo, ya que siempre es fácil volver luego y hacer la selección de modo un poco más específicos. La desventaja es que lo que soliciten no es siempre lo que van a obtener. Hay un castigo o multa en el rendimineto cuando el modo de visualización debe ser emulado. Este tutorial les ayudará a entender los métodos diferentes para consultar (querying) las capacidades de visualización de las plataformas, y configurar el modo de visualización para tu juego.}hj?sbah}(h]h]h]h]h!]uh%hh'h(h)K(hj h&hubeh}(h] introduccionah]h] introducciónah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hConfiguración básicah]hConfiguración básica}hjXsbah}(h]h]h]h]h!]uh%h>hjUh&hh'h(h)K7ubh)}(hXLo primero a aprender es cómo configurar realmente el modo de visualización actual. El modo de visualización se puede establecer en cualquier momento luego de haber inicializado el módulo :mod:`pygame.display` Si ya estableciste previamente el modo de visualización, configurarlo nuevamente va a cambiar el actual modo. La configuración del modo de visualización se maneja con la función :func: `pygame.display.set_mode((width, height), flags, depth) `. El único argumento requerido en esta función es la secuencia que contiene el ancho (width) y el alto (height) del nuevo modo de visualización. La bandera de profundidad (depth flag) es los bits por píxel solicitados para la *Surface*. Si la profundidad dada es 8, *pygame* va a crear la asignación de colores de la *Surface*. En el caso que se le otorgue una mayor profundida de bits, *pygame* usará el modo de color empaquetado.h](hLo primero a aprender es cómo configurar realmente el modo de visualización actual. El modo de visualización se puede establecer en cualquier momento luego de haber inicializado el módulo }hjfsbj)}(h:mod:`pygame.display`h]j)}(hjph]hpygame.display}hjrsbah}(h]h](jpypy-modeh]h]h!]uh%jhjnubah}(h]h]h]h]h!]refdocj refdomainj|reftypemod refexplicitrefwarnjNjNjpygame.displayuh%jh'h(h)K9hjfubh Si ya estableciste previamente el modo de visualización, configurarlo nuevamente va a cambiar el actual modo. La configuración del modo de visualización se maneja con la función :func: }hjfsbh title_reference)}(hR`pygame.display.set_mode((width, height), flags, depth) `h]hPpygame.display.set_mode((width, height), flags, depth) }hjsbah}(h]h]h]h]h!]uh%jhjfubh. El único argumento requerido en esta función es la secuencia que contiene el ancho (width) y el alto (height) del nuevo modo de visualización. La bandera de profundidad (depth flag) es los bits por píxel solicitados para la }hjfsbj%)}(h *Surface*h]hSurface}hjsbah}(h]h]h]h]h!]uh%j$hjfubh. Si la profundidad dada es 8, }hjfsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjfubh, va a crear la asignación de colores de la }hjfsbj%)}(h *Surface*h]hSurface}hjsbah}(h]h]h]h]h!]uh%j$hjfubh=. En el caso que se le otorgue una mayor profundida de bits, }hjfsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjfubh% usará el modo de color empaquetado.}hjfsbeh}(h]h]h]h]h!]uh%hh'h(h)K9hjUh&hubh)}(hXTPodrán encontrar mucha más información acerca de profundidades y modo de color en la documentación sobre los módulos de visualización y *Surface*. El valor por default para la profundidad es 0. Cuando a un argumento se le asigna 0, *pygame* va a seleccionar el mejor bit de profunidad para usar, generalmente es el mismo bit de profundidad que el sistema actual. El argumento de banderas permite controlar características extras para el modo de visualización. Nuevamente, en caso de querer más información acerca del tema, se puede encontrar en los documentos de referencia de *pygame*.h](hPodrán encontrar mucha más información acerca de profundidades y modo de color en la documentación sobre los módulos de visualización y }hjsbj%)}(h *Surface*h]hSurface}hjsbah}(h]h]h]h]h!]uh%j$hjubhW. El valor por default para la profundidad es 0. Cuando a un argumento se le asigna 0, }hjsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjubhXU va a seleccionar el mejor bit de profunidad para usar, generalmente es el mismo bit de profundidad que el sistema actual. El argumento de banderas permite controlar características extras para el modo de visualización. Nuevamente, en caso de querer más información acerca del tema, se puede encontrar en los documentos de referencia de }hjsbj%)}(h*pygame*h]hpygame}hj sbah}(h]h]h]h]h!]uh%j$hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KHhjUh&hubeh}(h]configuracion-basicaah]h]configuración básicaah]h!]uh%h9hhNh&hh'h(h)K7ubh:)}(hhh](h?)}(h Cómo decidirh]h Cómo decidir}hjCsbah}(h]h]h]h]h!]uh%h>hj@h&hh'h(h)KUubh)}(hXEntonces, ¿cómo seleccionar el modo de visualización que va a funcionar mejor con los recursos gráficos y en la plataforma en la que está corriendo el juego? Hay varios métodos diferentes para reunir la información sobre la visualización del dispositivo. Todos estos métodos deben ser 'llamados' (called) luego de que se haya inicializado el módulo de visualización, pero es probable que quieran llamarlos antes de configurar el modo de visualización. Primero, :func:`pygame.display.Info() ` va a devolver un tipo de objeto VidInfo especial, que les dirá mucho acerca de las capacidades del controlador gráfico. La función :func:`pygame.display.list_modes(depth, flags) ` puede ser usada para encontrar los modos gráficos respaldados por el sistema. :func: `pygame.display.mode_ok((width, height), flags, depth) ` toma el mismo argumento que :func:`set_mode() `, pero devuelve la coincidencia más próxima al bit de profundidad solicitado. Por último, :func:`pygame.display.get_driver() ` devuelve el nombre del controlador gráfico seleccionado por *pygame*h](hXEntonces, ¿cómo seleccionar el modo de visualización que va a funcionar mejor con los recursos gráficos y en la plataforma en la que está corriendo el juego? Hay varios métodos diferentes para reunir la información sobre la visualización del dispositivo. Todos estos métodos deben ser 'llamados' (called) luego de que se haya inicializado el módulo de visualización, pero es probable que quieran llamarlos antes de configurar el modo de visualización. Primero, }hjQsbj)}(h3:func:`pygame.display.Info() `h]j)}(hj[h]hpygame.display.Info()}hj]sbah}(h]h](jpypy-funceh]h]h!]uh%jhjYubah}(h]h]h]h]h!]refdocj refdomainjgreftypefunc refexplicitrefwarnjNjNjpygame.display.Infouh%jh'h(h)KWhjQubh va a devolver un tipo de objeto VidInfo especial, que les dirá mucho acerca de las capacidades del controlador gráfico. La función }hjQsbj)}(hK:func:`pygame.display.list_modes(depth, flags) `h]j)}(hjh]h'pygame.display.list_modes(depth, flags)}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhj}ubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.list_modesuh%jh'h(h)KWhjQubhW puede ser usada para encontrar los modos gráficos respaldados por el sistema. :func: }hjQsbj)}(hP`pygame.display.mode_ok((width, height), flags, depth) `h]hNpygame.display.mode_ok((width, height), flags, depth) }hjsbah}(h]h]h]h]h!]uh%jhjQubh toma el mismo argumento que }hjQsbj)}(h,:func:`set_mode() `h]j)}(hjh]h set_mode()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.set_modeuh%jh'h(h)KWhjQubh], pero devuelve la coincidencia más próxima al bit de profundidad solicitado. Por último, }hjQsbj)}(h?:func:`pygame.display.get_driver() `h]j)}(hjh]hpygame.display.get_driver()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.get_driveruh%jh'h(h)KWhjQubh> devuelve el nombre del controlador gráfico seleccionado por }hjQsbj%)}(h*pygame*h]hpygame}hjsbah}(h]h]h]h]h!]uh%j$hjQubeh}(h]h]h]h]h!]uh%hh'h(h)KWhj@h&hubh)}(hX3Solo hay que recordar la regla de oro: *Pygame* va a trabajar con practicamente cualquier modo de visualización solicitado. A algunos modos de visualización va a ser necesario emularlos, lo cual va lentificar el juego, ya que *pygame* va a necesitar convertir cada actualziación que se haga, al modo de visualización "real". La mejor apuesta es siempre dejar que *pygame* elija la mejor profundidad de bit, y que convierta todos los recursos gráficos a ese formato cuando se carguen. Al 'llamar' (call) a la función :func:`set_mode() ` sin ningún argumento o con profundidad 0 dejamos que *pygame* elija por sí mismo la profundidad de bit. O sino se puede llamar a :func:`mode_ok() ` para encontrar la coincidencia más cercana a la profundidad de bit necesaria.h](h'Solo hay que recordar la regla de oro: }hjsbj%)}(h*Pygame*h]hPygame}hjsbah}(h]h]h]h]h!]uh%j$hjubh va a trabajar con practicamente cualquier modo de visualización solicitado. A algunos modos de visualización va a ser necesario emularlos, lo cual va lentificar el juego, ya que }hjsbj%)}(h*pygame*h]hpygame}hj)sbah}(h]h]h]h]h!]uh%j$hjubh va a necesitar convertir cada actualziación que se haga, al modo de visualización "real". La mejor apuesta es siempre dejar que }hjsbj%)}(h*pygame*h]hpygame}hj;sbah}(h]h]h]h]h!]uh%j$hjubh elija la mejor profundidad de bit, y que convierta todos los recursos gráficos a ese formato cuando se carguen. Al 'llamar' (call) a la función }hjsbj)}(h,:func:`set_mode() `h]j)}(hjOh]h set_mode()}hjQsbah}(h]h](jpypy-funceh]h]h!]uh%jhjMubah}(h]h]h]h]h!]refdocj refdomainj[reftypefunc refexplicitrefwarnjNjNjpygame.display.set_modeuh%jh'h(h)Kjhjubh7 sin ningún argumento o con profundidad 0 dejamos que }hjsbj%)}(h*pygame*h]hpygame}hjqsbah}(h]h]h]h]h!]uh%j$hjubhE elija por sí mismo la profundidad de bit. O sino se puede llamar a }hjsbj)}(h*:func:`mode_ok() `h]j)}(hjh]h mode_ok()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.mode_okuh%jh'h(h)KjhjubhO para encontrar la coincidencia más cercana a la profundidad de bit necesaria.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kjhj@h&hubh)}(hXCuando el modo de visualización es en una ventana, lo que generalmente se debe hacer es hacer coincidir el bit de profundidad con el del escritorio. Cuando se está usando pantalla completa, algunas plataformas pueden cambiar a cualquier bit de profundidad que mejor se adecue a las necesidades del usuario. Pueden encontrar la profundidad del escritorio actual si obtienen un *objeto VidInfo* antes de configurar el modo de visualización.h](hXzCuando el modo de visualización es en una ventana, lo que generalmente se debe hacer es hacer coincidir el bit de profundidad con el del escritorio. Cuando se está usando pantalla completa, algunas plataformas pueden cambiar a cualquier bit de profundidad que mejor se adecue a las necesidades del usuario. Pueden encontrar la profundidad del escritorio actual si obtienen un }hjsbj%)}(h*objeto VidInfo*h]hobjeto VidInfo}hjsbah}(h]h]h]h]h!]uh%j$hjubh/ antes de configurar el modo de visualización.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kvhj@h&hubh)}(hLuego de establecer el modo de visualización, pueden descubrir información acerca de su configuración al obtener el objeto VidInfo, o al llamar cualquiera de los métodos Surface.get* en la superficie de visualización.h]hLuego de establecer el modo de visualización, pueden descubrir información acerca de su configuración al obtener el objeto VidInfo, o al llamar cualquiera de los métodos Surface.get* en la superficie de visualización.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K}hj@h&hubeh}(h] como-decidirah]h] cómo decidirah]h!]uh%h9hhNh&hh'h(h)KUubh:)}(hhh](h?)}(h Funcionesh]h Funciones}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hEstas son las rutinas que se pueden usar para determinar el modo de visualización más apropiado. Pueden encontrar más información acerca de estas funciones en la documentación del modo de visualización.h]hEstas son las rutinas que se pueden usar para determinar el modo de visualización más apropiado. Pueden encontrar más información acerca de estas funciones en la documentación del modo de visualización.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh block_quote)}(hX :func:`pygame.display.mode_ok(size, flags, depth) ` Esta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación. :func:`pygame.display.list_modes(depth, flags) ` Deveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es :any:`FULLSCREEN `\ . Si especifican sus propias banderas sin :any:`FULLSCREEN `\ , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor. :func:`pygame.display.Info() ` Esta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h](h)}(hK:func:`pygame.display.mode_ok(size, flags, depth) `h]j)}(hj h]j)}(hj h]h*pygame.display.mode_ok(size, flags, depth)}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhj ubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.mode_okuh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubj)}(hXEsta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación. h]h)}(hXEsta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación.h]hXEsta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación.}hj5sbah}(h]h]h]h]h!]uh%hh'h(h)Khj1ubah}(h]h]h]h]h!]uh%jh'h(h)Khjubh)}(hK:func:`pygame.display.list_modes(depth, flags) `h]j)}(hjKh]j)}(hjKh]h'pygame.display.list_modes(depth, flags)}hjPsbah}(h]h](jpypy-funceh]h]h!]uh%jhjMubah}(h]h]h]h]h!]refdocj refdomainjZreftypefunc refexplicitrefwarnjNjNjpygame.display.list_modesuh%jh'h(h)KhjIubah}(h]h]h]h]h!]uh%hh'h(h)Khjubj)}(hXNDeveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es :any:`FULLSCREEN `\ . Si especifican sus propias banderas sin :any:`FULLSCREEN `\ , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor. h]h)}(hXMDeveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es :any:`FULLSCREEN `\ . Si especifican sus propias banderas sin :any:`FULLSCREEN `\ , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor.h](hDeveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es }hjvsbj)}(h+:any:`FULLSCREEN `h]j)}(hjh]h FULLSCREEN}hjsbah}(h]h](janyeh]h]h!]uh%jhj~ubah}(h]h]h]h]h!]refdocj refdomainhreftypej refexplicitrefwarnjpygame.display.set_modeuh%jh'h(h)Khjvubh, . Si especifican sus propias banderas sin }hjvsbj)}(h+:any:`FULLSCREEN `h]j)}(hjh]h FULLSCREEN}hjsbah}(h]h](janyeh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainhreftypej refexplicitrefwarnjpygame.display.set_modeuh%jh'h(h)Khjvubh , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor.}hjvsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjrubah}(h]h]h]h]h!]uh%jh'h(h)Khjubh)}(h3:func:`pygame.display.Info() `h]j)}(hjh]j)}(hjh]hpygame.display.Info()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdocj refdomainjreftypefunc refexplicitrefwarnjNjNjpygame.display.Infouh%jh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khjubj)}(hXEsta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h](h)}(hEsta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto. ::h]hEsta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubh literal_block)}(hX>>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) h]hX>>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) }hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)Khjubeh}(h]h]h]h]h!]uh%jh'h(h)Khjubeh}(h]h]h]h]h!]uh%jh'h(h)Khjh&hubh)}(hXPueden probar todas estas banderas (flags) simplemente como miembros del objeto VidInfo.h]hXPueden probar todas estas banderas (flags) simplemente como miembros del objeto VidInfo.}hj%sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h] funcionesah]h] funcionesah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hEjemplosh]hEjemplos}hj>sbah}(h]h]h]h]h!]uh%h>hj;h&hh'h(h)Kubh)}(hAcá hay algunos ejemplos de diferentes métodos para iniciar la visualización gráfica. Estos deberían ayudar a dar una idea de cómo configurar su modo de visualizción ::h]hAcá hay algunos ejemplos de diferentes métodos para iniciar la visualización gráfica. Estos deberían ayudar a dar una idea de cómo configurar su modo de visualizción}hjLsbah}(h]h]h]h]h!]uh%hh'h(h)Khj;h&hubj )}(hX>>> #dame la mejor profundidad con una visualización de ventana en 640 x 480 >>> pygame.display.set_mode((640, 480)) >>> #dame la mayor visualización disponible en 16-bit >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit no está soportado') ... else: ... print('Resolución encontrada:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> #es necesario una surface de 8-bit, nada más va a funcionar >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Solo puede funcionar con una visualización de 8-bit, lo lamento') ... else: ... pygame.display.set_mode((800, 600), 0, 8)h]hX>>> #dame la mejor profundidad con una visualización de ventana en 640 x 480 >>> pygame.display.set_mode((640, 480)) >>> #dame la mayor visualización disponible en 16-bit >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit no está soportado') ... else: ... print('Resolución encontrada:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> #es necesario una surface de 8-bit, nada más va a funcionar >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Solo puede funcionar con una visualización de 8-bit, lo lamento') ... else: ... pygame.display.set_mode((800, 600), 0, 8)}hjZsbah}(h]h]h]h]h!]h#h$uh%j h'h(h)Khj;h&hubeh}(h]ejemplosah]h]ejemplosah]h!]uh%h9hhNh&hh'h(h)Kubeh}(h]+configuracion-de-los-modos-de-visualizacionah]h]-configuración de los modos de visualizaciónah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]@tutoriales-de-pygame-configuracion-de-los-modos-de-visualizacionah]h]Dtutoriales de pygame - configuración de los modos de visualizaciónah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j}jzjujrjRjOj=j:jjj8j5jmjju nametypes}(j}jujRj=jj8jmuh}(jzh;jrhNjOj j:jUjj@j5jjjj;u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log](docs/es/tutorials/ModosVisualizacion.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.2411323 pygame-2.6.1/docs/generated/es/doctrees/tutorials/MoverImagen.doctree0000644000175100001770000015701014676242430025336 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h+TUTORIAL:¡Ayuda! ¿Cómo Muevo Una Imagen?h]h Text+TUTORIAL:¡Ayuda! ¿Cómo Muevo Una Imagen?}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceA/home/runner/work/pygame/pygame/docs/es/tutorials/MoverImagen.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h9Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen?h]h9Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen?}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(h"¡Ayuda! ¿Cómo Muevo Una Imagen?h]h"¡Ayuda! ¿Cómo Muevo Una Imagen?}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAutorh]hAutor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hh}h]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContactoh]hContacto}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.orgh]h)}(hhh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh)}(hXMuchas personas nueva en programación y gráficos tienen dificultades para descubrir cómo hacer que una imagen se mueva por la pantalla. Sin entender todos los conceptos puede resultar muy confuso. No sos la primera persona atrapada ahí, haré todo lo posible para que vayamos paso por paso. Incluso, intentaremos terminar con métodos para mantener la eficiencia de tus animaciones.h]hXMuchas personas nueva en programación y gráficos tienen dificultades para descubrir cómo hacer que una imagen se mueva por la pantalla. Sin entender todos los conceptos puede resultar muy confuso. No sos la primera persona atrapada ahí, haré todo lo posible para que vayamos paso por paso. Incluso, intentaremos terminar con métodos para mantener la eficiencia de tus animaciones.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh)}(hTengan en cuenta que en este articulo no vamos a enseñar cómo programar en python, solo presentaremos algunos conceptos básicos de pygame.h]hTengan en cuenta que en este articulo no vamos a enseñar cómo programar en python, solo presentaremos algunos conceptos básicos de pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh:)}(hhh](h?)}(hSolo Píxeles en la Pantallah]hSolo Píxeles en la Pantalla}hj*sbah}(h]h]h]h]h!]uh%h>hj'h&hh'h(h)Kubh)}(hXPygame tiene una Surface de visualización. Básicamente, esto es una imagen que está visible en la pantalla y la imagen está compuesta por píxeles. La forma principal de cambiar estos píxeles es llamando a la función blit(). Esto copia los píxeles de una imagen a otra.h]hXPygame tiene una Surface de visualización. Básicamente, esto es una imagen que está visible en la pantalla y la imagen está compuesta por píxeles. La forma principal de cambiar estos píxeles es llamando a la función blit(). Esto copia los píxeles de una imagen a otra.}hj8sbah}(h]h]h]h]h!]uh%hh'h(h)K!hj'h&hubh)}(hXEEsto es lo primero que hay que entender. Cuando proyectás (blit) una imagen en la pantalla, lo que estás haciendo es simplemente cambiar el color de los píxeles. Los píxeles no se agregan ni se mueven, simplemente cambiamos el color de los píxeles que ya se encuentran en la pantalla. Las imágenes que uno proyecta (blit) a la pantalla son también surfaces (superficies) en pygame pero no están conectadas de ninguna manera a la Surface de visualización. Cuando se proyectan en la pantalla, se copian en la visualización, pero aún mantenes una copia única del original.h]hXEEsto es lo primero que hay que entender. Cuando proyectás (blit) una imagen en la pantalla, lo que estás haciendo es simplemente cambiar el color de los píxeles. Los píxeles no se agregan ni se mueven, simplemente cambiamos el color de los píxeles que ya se encuentran en la pantalla. Las imágenes que uno proyecta (blit) a la pantalla son también surfaces (superficies) en pygame pero no están conectadas de ninguna manera a la Surface de visualización. Cuando se proyectan en la pantalla, se copian en la visualización, pero aún mantenes una copia única del original.}hjFsbah}(h]h]h]h]h!]uh%hh'h(h)K&hj'h&hubh)}(hXLuego de esta breve descripción, quizás ya puedas entender lo que se necesita para "mover" una imagen. En realidad, no movemos nada en absoluto. Lo que hacemos es simplemente proyectar (blit) la imagen en una nueva posición, pero antes de dibujar la imagen en la nueva posición, necesitamos "borrar" la anterior. De lo contrario, la imagen será visible en dos lugares de la pantalla. Al borrar rápidamente la imagen y volverla a dibujar en un nuevo lugar en la pantalla, logramos la "ilusión" de movimiento.h]hXLuego de esta breve descripción, quizás ya puedas entender lo que se necesita para "mover" una imagen. En realidad, no movemos nada en absoluto. Lo que hacemos es simplemente proyectar (blit) la imagen en una nueva posición, pero antes de dibujar la imagen en la nueva posición, necesitamos "borrar" la anterior. De lo contrario, la imagen será visible en dos lugares de la pantalla. Al borrar rápidamente la imagen y volverla a dibujar en un nuevo lugar en la pantalla, logramos la "ilusión" de movimiento.}hjTsbah}(h]h]h]h]h!]uh%hh'h(h)K/hj'h&hubh)}(hXA lo largo del tutorial, vamos a dividir este proceso en pasos más simples. Incluso explicaremos la mejor manera de tener múltiples imagenes moviendose por la pantalla. Probablemente ya tengas preguntas; por ejemplo, ¿cómo "borramos" la imagen antes de dibujarla en una nueva posición? Quizás todavía estás completamente perdido. Bueno, espero que el resto de este tutorial pueda aclarar las cosas.h]hXA lo largo del tutorial, vamos a dividir este proceso en pasos más simples. Incluso explicaremos la mejor manera de tener múltiples imagenes moviendose por la pantalla. Probablemente ya tengas preguntas; por ejemplo, ¿cómo "borramos" la imagen antes de dibujarla en una nueva posición? Quizás todavía estás completamente perdido. Bueno, espero que el resto de este tutorial pueda aclarar las cosas.}hjbsbah}(h]h]h]h]h!]uh%hh'h(h)K8hj'h&hubeh}(h]solo-pixeles-en-la-pantallaah]h]solo píxeles en la pantallaah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hDamos Un Paso Hacia Atrásh]hDamos Un Paso Hacia Atrás}hj{sbah}(h]h]h]h]h!]uh%h>hjxh&hh'h(h)KAubh)}(hXEs posible que el concepto de píxeles e imagenes sea aún un poco extraño. ¡Buenas noticias! En las próximas secciones vamos a usar código que hace todo lo que queremos, solo que no usa píxeles. Vamos a crear una pequeña lista de python de 6 números, y vamos a imaginar que representa unos gráficos fantásticos que podemos ver en la pantalla. Podría ser de hecho sorprendente lo cerca que esto representa lo que haremos después con gráficos reales.h]hXEs posible que el concepto de píxeles e imagenes sea aún un poco extraño. ¡Buenas noticias! En las próximas secciones vamos a usar código que hace todo lo que queremos, solo que no usa píxeles. Vamos a crear una pequeña lista de python de 6 números, y vamos a imaginar que representa unos gráficos fantásticos que podemos ver en la pantalla. Podría ser de hecho sorprendente lo cerca que esto representa lo que haremos después con gráficos reales.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KChjxh&hubh)}(hlEntonces, comencemos creando nuestra lista de pantalla y completandola con un paisaje hermoso de 1s y 2s. ::h]hiEntonces, comencemos creando nuestra lista de pantalla y completandola con un paisaje hermoso de 1s y 2s.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KKhjxh&hubh literal_block)}(hD>>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1]h]hD>>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KNhjxh&hubh)}(hAhora hemos creado nuestro fondo. No va a ser muy emocionante a menos que también dibujemos un jugador en la pantalla. Vamos a crear un héroe poderoso que se parezca al número 8. Vamos a ponerlo cerca de la mitad del mapa y veamos cómo se ve. ::h]hAhora hemos creado nuestro fondo. No va a ser muy emocionante a menos que también dibujemos un jugador en la pantalla. Vamos a crear un héroe poderoso que se parezca al número 8. Vamos a ponerlo cerca de la mitad del mapa y veamos cómo se ve.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KShjxh&hubj)}(h6>>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]h6>>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KXhjxh&hubh)}(hX&Puede que esto haya sido tan lejos como hayas llegado si saltaste a hacer algo de programación gráfica con pygame. Tenés algunas cosas bonitas en la pantalla, pero no pueden moverse a ningun lado. Quizás ahora que nuestra pantalla es una lista de números, es más fácil ver cómo moverlo.h]hX&Puede que esto haya sido tan lejos como hayas llegado si saltaste a hacer algo de programación gráfica con pygame. Tenés algunas cosas bonitas en la pantalla, pero no pueden moverse a ningun lado. Quizás ahora que nuestra pantalla es una lista de números, es más fácil ver cómo moverlo.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K]hjxh&hubeh}(h]damos-un-paso-hacia-atrasah]h]damos un paso hacia atrásah]h!]uh%h9hhNh&hh'h(h)KAubh:)}(hhh](h?)}(hHacer Mover al Héroeh]hHacer Mover al Héroe}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kdubh)}(hAntes de empezar a mover el personaje, necesitamos hacer el seguimiento de algún tipo de posición para él. En la última sección, cuando lo dibujamos, simplemente elegimos una posición al arbitraria. Esta vez hagámoslo de forma más oficial. ::h]hAntes de empezar a mover el personaje, necesitamos hacer el seguimiento de algún tipo de posición para él. En la última sección, cuando lo dibujamos, simplemente elegimos una posición al arbitraria. Esta vez hagámoslo de forma más oficial.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Kfhjh&hubj)}(hP>>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]hP>>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kkhjh&hubh)}(hAhora es bastante fácil moverlo en una nueva posición. Podemos simplemente cambiar el valor de playerpos (posición del player) y dibujarlo en la pantalla nuevamente. ::h]hAhora es bastante fácil moverlo en una nueva posición. Podemos simplemente cambiar el valor de playerpos (posición del player) y dibujarlo en la pantalla nuevamente.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Kqhjh&hubj)}(h\>>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1]h]h\>>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1]}hj"sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kuhjh&hubh)}(hXWhoops. Ahora podemos ver dos héroes. Uno en la vieja posición, y otro en la nueva posición. Esta es exactamente la razón por la que necesitamos "borrar" al héroe en la posición anterior antes de dibujarlo en la nueva posición. Para borrarlo, necesitamos cambiar ese valor en la lista de nuevo al valor que tenía antes de que el héroe lo reemplazara. Eso significa que debemos hacer un seguimiento de los valores en la pantalla antes que el héroe estuviera allí. Hay varias formas de hacerlo, pero la más fácil suele ser mantener una copia separada del fondo de la pantalla. Esto significa que tenemos que hacer cambios en nuestro pequeño juego.h]hXWhoops. Ahora podemos ver dos héroes. Uno en la vieja posición, y otro en la nueva posición. Esta es exactamente la razón por la que necesitamos "borrar" al héroe en la posición anterior antes de dibujarlo en la nueva posición. Para borrarlo, necesitamos cambiar ese valor en la lista de nuevo al valor que tenía antes de que el héroe lo reemplazara. Eso significa que debemos hacer un seguimiento de los valores en la pantalla antes que el héroe estuviera allí. Hay varias formas de hacerlo, pero la más fácil suele ser mantener una copia separada del fondo de la pantalla. Esto significa que tenemos que hacer cambios en nuestro pequeño juego.}hj0sbah}(h]h]h]h]h!]uh%hh'h(h)K{hjh&hubeh}(h]hacer-mover-al-heroeah]h]hacer mover al héroeah]h!]uh%h9hhNh&hh'h(h)Kdubh:)}(hhh](h?)}(h Crear un Mapah]h Crear un Mapa}hjIsbah}(h]h]h]h]h!]uh%h>hjFh&hh'h(h)Kubh)}(hXBLo que queremos hacer es crear una lista separada que llamaremos nuestro fondo (background). Vamos a crear el fondo para que se vea como lo hacía nuestra pantalla original, con 1s y 2s. Luego, vamos a copiar cada item del fondo a la pantalla. Después de eso, podemos finalmente dibujar nuestro héroe en la pantalla. ::h]hX>Lo que queremos hacer es crear una lista separada que llamaremos nuestro fondo (background). Vamos a crear el fondo para que se vea como lo hacía nuestra pantalla original, con 1s y 2s. Luego, vamos a copiar cada item del fondo a la pantalla. Después de eso, podemos finalmente dibujar nuestro héroe en la pantalla.}hjWsbah}(h]h]h]h]h!]uh%hh'h(h)KhjFh&hubj)}(hX>>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #una nueva pantalla en blanco >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]h]hX>>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #una nueva pantalla en blanco >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1]}hjesbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KhjFh&hubh)}(hPuede parecer mucho trabajo extra. No estamos muy lejos de donde estabamos la última vez que tratamos de hacer que se moviera. Pero esta vez tenemos la información extra que necesitamos para moverlo correctamente.h]hPuede parecer mucho trabajo extra. No estamos muy lejos de donde estabamos la última vez que tratamos de hacer que se moviera. Pero esta vez tenemos la información extra que necesitamos para moverlo correctamente.}hjssbah}(h]h]h]h]h!]uh%hh'h(h)KhjFh&hubeh}(h] crear-un-mapaah]h] crear un mapaah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hHacer Mover al Héroe (Toma 2)h]hHacer Mover al Héroe (Toma 2)}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hEsta vez va a ser fácil mover al héroe. Primero borramos el héroe de su antigua posición. Esto lo podemos hacer copiando el valor correcto del fondo a la pantalla. Luego, dibujamos el personaje en la nueva posición en la pantalla.h]hEsta vez va a ser fácil mover al héroe. Primero borramos el héroe de su antigua posición. Esto lo podemos hacer copiando el valor correcto del fondo a la pantalla. Luego, dibujamos el personaje en la nueva posición en la pantalla.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh doctest_block)}(h>>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1]h]h>>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1]}hjsbah}(h]h]doctestah]h]h!]h#h$uh%jhjh&hh'Nh)Nubh)}(hAhí está. El héroe se ha movido un lugar hacia la izquierda. Podemos usar este mismo código para moverlo una vez más hacia la izqueirda. ::h]hAhí está. El héroe se ha movido un lugar hacia la izquierda. Podemos usar este mismo código para moverlo una vez más hacia la izqueirda.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj)}(h>>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1]h]h>>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1]}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubh)}(hExcelente! Esto no es exactamente lo que llamarías una animación fluida, pero con unos pequeños cambios, haremos que esto funcione directamente con gráficos en la pantalla.h]hExcelente! Esto no es exactamente lo que llamarías una animación fluida, pero con unos pequeños cambios, haremos que esto funcione directamente con gráficos en la pantalla.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]hacer-mover-al-heroe-toma-2ah]h]hacer mover al héroe (toma 2)ah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hDefinición: "blit"h]hDefinición: "blit"}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hX,En las próximas secciónes transformaremos nuestro programa, de usar listas pasará a usar gráficos reales en la pantalla. Al mostrar los gráficos vamos a usar el término **blit** frecuentemente. Si sos nuevo en el trabajo gráfico, probablemente no estés familiarizado con este término común.h](hEn las próximas secciónes transformaremos nuestro programa, de usar listas pasará a usar gráficos reales en la pantalla. Al mostrar los gráficos vamos a usar el término }hjsbh strong)}(h**blit**h]hblit}hjsbah}(h]h]h]h]h!]uh%jhjubhu frecuentemente. Si sos nuevo en el trabajo gráfico, probablemente no estés familiarizado con este término común.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXJBLIT: Basicamente, blit significa copiar gráficos de una imagen a otra. Una definición más formal es copiar una matriz de datos a un mapa de bits. 'Blit' se puede pensar como *asignar* píxeles. Es similar a establecer valores en nuestra lista de pantalla más arriba, blitear asigna el color de los píxeles en nuestra imagen.h](hBLIT: Basicamente, blit significa copiar gráficos de una imagen a otra. Una definición más formal es copiar una matriz de datos a un mapa de bits. 'Blit' se puede pensar como }hjsbh emphasis)}(h *asignar*h]hasignar}hj(sbah}(h]h]h]h]h!]uh%j&hjubh píxeles. Es similar a establecer valores en nuestra lista de pantalla más arriba, blitear asigna el color de los píxeles en nuestra imagen.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXOtras bibliotecas gráficas usarán la palabra *bitblt*, o solo *blt*, pero están hablando de lo mismo. Es básicamente copiar memoria de un lugar a otro. En realidad, es un poco más avanzado que simpleente copiar la memoria, ya que necesita manejar cosas como formatos de píxeles, recortes y separaciones de líneas de exploración. Los mezcladores (blitters) avanzados también pueden manejar cosas como la transparecia y otros efectos especiales.h](h/Otras bibliotecas gráficas usarán la palabra }hj@sbj')}(h*bitblt*h]hbitblt}hjHsbah}(h]h]h]h]h!]uh%j&hj@ubh , o solo }hj@sbj')}(h*blt*h]hblt}hjZsbah}(h]h]h]h]h!]uh%j&hj@ubhX, pero están hablando de lo mismo. Es básicamente copiar memoria de un lugar a otro. En realidad, es un poco más avanzado que simpleente copiar la memoria, ya que necesita manejar cosas como formatos de píxeles, recortes y separaciones de líneas de exploración. Los mezcladores (blitters) avanzados también pueden manejar cosas como la transparecia y otros efectos especiales.}hj@sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]definicion-blitah]h]definición: "blit"ah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hPasar de la Lista a la Pantallah]hPasar de la Lista a la Pantalla}hj}sbah}(h]h]h]h]h!]uh%h>hjzh&hh'h(h)Kubh)}(hXTomar el código que vemos en los ejemplos anteriores y hacerlo funcionar con pygame es muy sencillo. Simulemos que tenemos cargados algunos gráficos bonitos y los llamamos "terrain1", "terrain2" y "hero". Donde antes asignamos números a una lista, ahora mostramos (blit) gráficos en la pantalla. Otro gran cambio, en vez de usar posiciones como un solo índice (0 through 5), ahora necesitamos una coordenada bidimensional. Fingiremos que uno de los gráficos de nuestro juego tiene 10 píxeles de ancho. ::h]hXTomar el código que vemos en los ejemplos anteriores y hacerlo funcionar con pygame es muy sencillo. Simulemos que tenemos cargados algunos gráficos bonitos y los llamamos "terrain1", "terrain2" y "hero". Donde antes asignamos números a una lista, ahora mostramos (blit) gráficos en la pantalla. Otro gran cambio, en vez de usar posiciones como un solo índice (0 through 5), ahora necesitamos una coordenada bidimensional. Fingiremos que uno de los gráficos de nuestro juego tiene 10 píxeles de ancho.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjzh&hubj)}(h>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0))h]h>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjzh&hubh)}(hX[Hmm, ese código debería parecerte muy familiar, y con suerte, más importante; el código anterior debería tener un poco de sentido. Con suerte, mi ilustración de configurar valores simples en una lista muestra la similitud de establecer píxeles en la pantalla (con blit). La única parte que es realmente trabajo extra es convertir la posición del jugador en coordenadas en la pantalla. Por ahora, solo usamos un :code:`(playerpos*10, 0)` crudo, pero ciertamente podemos hacer algo mejor que eso. Ahora, movamos la imagen del jugador sobre un espacio. Este código no debería tener sorpresas. ::h](hXHmm, ese código debería parecerte muy familiar, y con suerte, más importante; el código anterior debería tener un poco de sentido. Con suerte, mi ilustración de configurar valores simples en una lista muestra la similitud de establecer píxeles en la pantalla (con blit). La única parte que es realmente trabajo extra es convertir la posición del jugador en coordenadas en la pantalla. Por ahora, solo usamos un }hjsbh literal)}(h:code:`(playerpos*10, 0)`h]h(playerpos*10, 0)}hjsbah}(h]h]codeah]h]h!]languagehuh%jhjubh crudo, pero ciertamente podemos hacer algo mejor que eso. Ahora, movamos la imagen del jugador sobre un espacio. Este código no debería tener sorpresas.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjzh&hubj)}(h>>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0))h]h>>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0))}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjzh&hubh)}(hXAhí está. Con este código, hemos mostrado cómo visualizar un fondo simple con la imagen de un héroe. Luego, hemos movido correctamente a ese héroe un espacio hacia la izquierda. Entonces, ¿dónde vamos desde aquí? Bueno, para empezar, el código es todavía un poco extraño. Lo primero que queremos hacer es encontrar una forma más límpia de representar el fondo y la posición del jugador. Luego, quizás una animación un poco más real y fluida.h]hXAhí está. Con este código, hemos mostrado cómo visualizar un fondo simple con la imagen de un héroe. Luego, hemos movido correctamente a ese héroe un espacio hacia la izquierda. Entonces, ¿dónde vamos desde aquí? Bueno, para empezar, el código es todavía un poco extraño. Lo primero que queremos hacer es encontrar una forma más límpia de representar el fondo y la posición del jugador. Luego, quizás una animación un poco más real y fluida.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjzh&hubeh}(h]pasar-de-la-lista-a-la-pantallaah]h]pasar de la lista a la pantallaah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hCoordenadas de Pantallah]hCoordenadas de Pantalla}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubh)}(hX^Para posicionar un objeto en la pantalla, necesitamos decirle a la función blit () dónde poner la imagen. En pygame siempre pasamos las posiciones como una coordenada (X,Y). Esto reprenseta el número de píxeles a la derecha y el número de pixeles hacia abajo, para colocar la imagen. La esquina superior izquierda de la Surface es la coordenada (0,0). Moverse un poco hacia la derecha sería (10, 0), y luego moverse hacia abajo en la misma proporción sería (10,10). Al hacer blit, el argumento de posición representa dónde se debe colocar la esquina superior izquierda de la fuente en el destino.h]hX^Para posicionar un objeto en la pantalla, necesitamos decirle a la función blit () dónde poner la imagen. En pygame siempre pasamos las posiciones como una coordenada (X,Y). Esto reprenseta el número de píxeles a la derecha y el número de pixeles hacia abajo, para colocar la imagen. La esquina superior izquierda de la Surface es la coordenada (0,0). Moverse un poco hacia la derecha sería (10, 0), y luego moverse hacia abajo en la misma proporción sería (10,10). Al hacer blit, el argumento de posición representa dónde se debe colocar la esquina superior izquierda de la fuente en el destino.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXPygame viene con un conveniente container para estas coordenadas, este es un Rect. El Rect básicamente representa un área rectangular en estas coordenadas. Tiene una esquina superior izquierda y un tamaño. El Rect viene con muchos métodos convenientes que ayudan a moverlo y posicionarlo. En nuestros próximos ejemplos representaremos las posiciones de nuestros objetos con Rects.h]hXPygame viene con un conveniente container para estas coordenadas, este es un Rect. El Rect básicamente representa un área rectangular en estas coordenadas. Tiene una esquina superior izquierda y un tamaño. El Rect viene con muchos métodos convenientes que ayudan a moverlo y posicionarlo. En nuestros próximos ejemplos representaremos las posiciones de nuestros objetos con Rects.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh)}(hXTambién, hay que tener en cuenta que muchas funciones en pygame esperan argumentos Rect. Todas estas funciones pueden también aceptar una simple tupla de 4 elementos (izquierda, arriba, ancho, alto). No siempre es necesario usar estos objetos Rect, pero mayormente querrás hacerlo. Además la función blit () puede aceptar un Rect como su argumento de posición, simplemente usa la esquina superior izquierda del Rect como su posición real.h]hXTambién, hay que tener en cuenta que muchas funciones en pygame esperan argumentos Rect. Todas estas funciones pueden también aceptar una simple tupla de 4 elementos (izquierda, arriba, ancho, alto). No siempre es necesario usar estos objetos Rect, pero mayormente querrás hacerlo. Además la función blit () puede aceptar un Rect como su argumento de posición, simplemente usa la esquina superior izquierda del Rect como su posición real.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]coordenadas-de-pantallaah]h]coordenadas de pantallaah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hCambiando el Fondoh]hCambiando el Fondo}hj5sbah}(h]h]h]h]h!]uh%h>hj2h&hh'h(h)Mubh)}(hXEn todas nuestras secciones anteriores, hemos estado almacenando el fondo como una lista de diferentes tipos de terrenos. Esa es una buena forma de crear un juego basado en mosaicos, pero queremos un desplazamiento fluido. Para hacerlo un poco más fácil, vamos a cambiar el fondo a una imagen única que cubra toda la pantalla. De esta forma, cuando queremos "borrar" nuestros objetos (antes de volver a dibujarlos) solo necesitamos blitear la sección del fondo borrado en la pantalla.h]hXEn todas nuestras secciones anteriores, hemos estado almacenando el fondo como una lista de diferentes tipos de terrenos. Esa es una buena forma de crear un juego basado en mosaicos, pero queremos un desplazamiento fluido. Para hacerlo un poco más fácil, vamos a cambiar el fondo a una imagen única que cubra toda la pantalla. De esta forma, cuando queremos "borrar" nuestros objetos (antes de volver a dibujarlos) solo necesitamos blitear la sección del fondo borrado en la pantalla.}hjCsbah}(h]h]h]h]h!]uh%hh'h(h)M!hj2h&hubh)}(hAl pasar a blit un tercer argumento Rect de manera opcional, le decimos que use esa subsección de la imagen de origen. Lo verás en uso a continuación mientras borramos la imagen del jugador.h]hAl pasar a blit un tercer argumento Rect de manera opcional, le decimos que use esa subsección de la imagen de origen. Lo verás en uso a continuación mientras borramos la imagen del jugador.}hjQsbah}(h]h]h]h]h!]uh%hh'h(h)M)hj2h&hubh)}(hNótese que ahora, cuando terminamos de dibujar en la pantalla, llamamos pygame.display.update() que mostrará todo lo que hemos dibujado en la pantalla.h]hNótese que ahora, cuando terminamos de dibujar en la pantalla, llamamos pygame.display.update() que mostrará todo lo que hemos dibujado en la pantalla.}hj_sbah}(h]h]h]h]h!]uh%hh'h(h)M-hj2h&hubeh}(h]cambiando-el-fondoah]h]cambiando el fondoah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hMovimiento Fluidoh]hMovimiento Fluido}hjxsbah}(h]h]h]h]h!]uh%h>hjuh&hh'h(h)M2ubh)}(hXPara hacer que algo parezca moverse suavemente, vamos a querer moverlo únicamente un par de píxeles a la vez. Acá está el código para hacer que un objeto se mueva suavemente a través de la pantalla. Según lo que ya sabemos, esto debería parecer bastante simple. ::h]hX Para hacer que algo parezca moverse suavemente, vamos a querer moverlo únicamente un par de píxeles a la vez. Acá está el código para hacer que un objeto se mueva suavemente a través de la pantalla. Según lo que ya sabemos, esto debería parecer bastante simple.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M4hjuh&hubj)}(hX>>> screen = create_screen() >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #dibujar el fondo >>> position = player.get_rect() >>> screen.blit(player, position) #dibujar el jugador >>> pygame.display.update() #y mostrarlo todo >>> for x in range(100): #animar 100 cuadros ... screen.blit(background, position, position) #borrar ... position = position.move(2, 0) #mover el jugador ... screen.blit(player, position) #dibujar nuevo jugador ... pygame.display.update() #y mostrarlo todo ... pygame.time.delay(100) #detener el programa por 1/10 segundosh]hX>>> screen = create_screen() >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #dibujar el fondo >>> position = player.get_rect() >>> screen.blit(player, position) #dibujar el jugador >>> pygame.display.update() #y mostrarlo todo >>> for x in range(100): #animar 100 cuadros ... screen.blit(background, position, position) #borrar ... position = position.move(2, 0) #mover el jugador ... screen.blit(player, position) #dibujar nuevo jugador ... pygame.display.update() #y mostrarlo todo ... pygame.time.delay(100) #detener el programa por 1/10 segundos}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M9hjuh&hubh)}(hXoAhí está. Este es todo el código que es necesario para animar suavemente un objeto a través de la pantalla. Incluso podemos usar un bonito paisaje de fondo. Otro beneficio de hacer el fondo de esta manera es que la imagen para el jugador puede tener transaprencias o secciones recortadas y aún así se dibujará de correctamente sobre el fondo (un bonus gratis).h]hXoAhí está. Este es todo el código que es necesario para animar suavemente un objeto a través de la pantalla. Incluso podemos usar un bonito paisaje de fondo. Otro beneficio de hacer el fondo de esta manera es que la imagen para el jugador puede tener transaprencias o secciones recortadas y aún así se dibujará de correctamente sobre el fondo (un bonus gratis).}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MHhjuh&hubh)}(hTambién hicimos una llamada a pygame.time.delay() al final de nuestro bucle (loop) anterior. Esto ralentiza un poco nuestro programa; de lo contrario, podría ejecutarse tan rápido que sería posible no verlo.h]hTambién hicimos una llamada a pygame.time.delay() al final de nuestro bucle (loop) anterior. Esto ralentiza un poco nuestro programa; de lo contrario, podría ejecutarse tan rápido que sería posible no verlo.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MNhjuh&hubeh}(h]movimiento-fluidoah]h]movimiento fluidoah]h!]uh%h9hhNh&hh'h(h)M2ubh:)}(hhh](h?)}(hEntonces, ¿Qué Sigue?h]hEntonces, ¿Qué Sigue?}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)MTubh)}(hX;Bueno, aquí lo tenemos. Esperemos que este artículo haya cumplido con lo prometido. Aún así, en este punto, el código no está realmente listo para ser el próximo juego más vendido. ¿Cómo hacer para tener múltiples objetos moviendose fácilmente? ¿Qué son exactamente esas misteriosas funciones como load_player_image()? También necesitamos una forma de obtener una entrada simple de usuario y un bucle de más de 100 cuadros. Tomaremos el ejemplo que tenemos acá, y lo convertiremos en una creación orientada a objetos que podría enorgullecería a mamá.h]hX;Bueno, aquí lo tenemos. Esperemos que este artículo haya cumplido con lo prometido. Aún así, en este punto, el código no está realmente listo para ser el próximo juego más vendido. ¿Cómo hacer para tener múltiples objetos moviendose fácilmente? ¿Qué son exactamente esas misteriosas funciones como load_player_image()? También necesitamos una forma de obtener una entrada simple de usuario y un bucle de más de 100 cuadros. Tomaremos el ejemplo que tenemos acá, y lo convertiremos en una creación orientada a objetos que podría enorgullecería a mamá.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MVhjh&hubeh}(h]entonces-que-sigueah]h]entonces, ¿qué sigue?ah]h!]uh%h9hhNh&hh'h(h)MTubh:)}(hhh](h?)}(hPrimero, Funciones Misteriosash]hPrimero, Funciones Misteriosas}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Maubh)}(hSe puede encontrar información completa de este tipo de funciones en otros tutoriales y referencia. El módulo pygame.image tiene una función load() que hará lo que queramos. Las líneas para cargar las imágenes deberían llegar a ser así. ::h]hSe puede encontrar información completa de este tipo de funciones en otros tutoriales y referencia. El módulo pygame.image tiene una función load() que hará lo que queramos. Las líneas para cargar las imágenes deberían llegar a ser así.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mchjh&hubj)}(hq>>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert()h]hq>>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert()}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhhjh&hubh)}(hX9Podemos ver que es bastante simple, la función load() solo toma un nombre de archivo y devuelve una nueva Surface con la imagen cargada. Después de cargar, hacemos una llamada al método de Surface, conver(). 'Convert' nos devuelve una nueva Surface de la imagen, pero ahora convertida al mismo formato de píxel que nuestra pantalla. Dado que las imagenes serán del mismo formato que la pantalla, van a blittear muy rápidamente. Si no usaramos 'convert', la función blit() es más lenta, ya que tiene que convertir de un tipo de píxel a otro a medida que avanza.h]hX9Podemos ver que es bastante simple, la función load() solo toma un nombre de archivo y devuelve una nueva Surface con la imagen cargada. Después de cargar, hacemos una llamada al método de Surface, conver(). 'Convert' nos devuelve una nueva Surface de la imagen, pero ahora convertida al mismo formato de píxel que nuestra pantalla. Dado que las imagenes serán del mismo formato que la pantalla, van a blittear muy rápidamente. Si no usaramos 'convert', la función blit() es más lenta, ya que tiene que convertir de un tipo de píxel a otro a medida que avanza.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mlhjh&hubh)}(hXEs posible que hayas notado que ambas load() y convert() devuelven una nueva Surface. Esto significa que estamos realmente creando dos Surfaces en cada una de estas líneas. En otros lenguajes de programación, esto da como resultado una fuga de memoria (no es algo bueno). Afortunadamente, Python es lo suficientemente inteligente como manejar esto, y pygame limpiará adecuadamente la Surface que terminamos sin usar.h]hXEs posible que hayas notado que ambas load() y convert() devuelven una nueva Surface. Esto significa que estamos realmente creando dos Surfaces en cada una de estas líneas. En otros lenguajes de programación, esto da como resultado una fuga de memoria (no es algo bueno). Afortunadamente, Python es lo suficientemente inteligente como manejar esto, y pygame limpiará adecuadamente la Surface que terminamos sin usar.}hj(sbah}(h]h]h]h]h!]uh%hh'h(h)Mvhjh&hubh)}(hXKLa otra función misteriosa que vimos en el ejemplo anterior fue create_screen(). En pygame es simple de crear una nueva ventana para gráficos. El código para crear una surface de 640x480 está a continuación. Al no pasar otros argumentos, pygame solo eligirá la mejor profundidad de color y formato de píxel para nosotros. ::h]hXHLa otra función misteriosa que vimos en el ejemplo anterior fue create_screen(). En pygame es simple de crear una nueva ventana para gráficos. El código para crear una surface de 640x480 está a continuación. Al no pasar otros argumentos, pygame solo eligirá la mejor profundidad de color y formato de píxel para nosotros.}hj6sbah}(h]h]h]h]h!]uh%hh'h(h)M}hjh&hubj)}(h0>>> screen = pygame.display.set_mode((640, 480))h]h0>>> screen = pygame.display.set_mode((640, 480))}hjDsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubeh}(h]primero-funciones-misteriosasah]h]primero, funciones misteriosasah]h!]uh%h9hhNh&hh'h(h)Maubh:)}(hhh](h?)}(hManejo de Algunas Entradash]hManejo de Algunas Entradas}hj]sbah}(h]h]h]h]h!]uh%h>hjZh&hh'h(h)Mubh)}(hX5Necesitamos desesperadamente cambiar el bucle principal para que buscar cualquier entrada de usuario (como cuando el usuario cierra la ventana). Necesitamos agregar "manejo de eventos" a nuestro programa. Todos los programas gráficos usan este diseño basado en eventos. El programa obtiene eventos como "tecla presionada" o "mouse movido" de la computadora. Entonces el programa responde a los diferentes eventos. Así es como debería ser el código. En lugar de un bucle de 100 cuadros, seguiremos en el bucle hasta que el usuario nos pida que nos detengamos.::h]hX4Necesitamos desesperadamente cambiar el bucle principal para que buscar cualquier entrada de usuario (como cuando el usuario cierra la ventana). Necesitamos agregar "manejo de eventos" a nuestro programa. Todos los programas gráficos usan este diseño basado en eventos. El programa obtiene eventos como "tecla presionada" o "mouse movido" de la computadora. Entonces el programa responde a los diferentes eventos. Así es como debería ser el código. En lugar de un bucle de 100 cuadros, seguiremos en el bucle hasta que el usuario nos pida que nos detengamos.:}hjksbah}(h]h]h]h]h!]uh%hh'h(h)MhjZh&hubj)}(h>>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... move_and_draw_all_game_objects()h]h>>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... move_and_draw_all_game_objects()}hjysbah}(h]h]h]h]h!]h#h$uh%jh'h(h)MhjZh&hubh)}(hXhLo que simplemente hace este código es, en primer lugar ejecuta el bucle para siempre, luego verifica si hay algún evento del usuario. Salimos del programa si el usuario presiona el teclado o el botón de cerrar en la ventana. Después de revisar todos los eventos, movemos y dibujamos nuestros objetos del juego. (También los borraremos antes de moverlos.)h]hXhLo que simplemente hace este código es, en primer lugar ejecuta el bucle para siempre, luego verifica si hay algún evento del usuario. Salimos del programa si el usuario presiona el teclado o el botón de cerrar en la ventana. Después de revisar todos los eventos, movemos y dibujamos nuestros objetos del juego. (También los borraremos antes de moverlos.)}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MhjZh&hubeh}(h]manejo-de-algunas-entradasah]h]manejo de algunas entradasah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hMover Imágenes Múltiplesh]hMover Imágenes Múltiples}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubh)}(hXEsta es la parte en que realmente vamos a cambiar las cosas. Digamos que queremos 10 imágenes diferentes moviéndose en la pantalla. Una buena forma de manejar esto es usando las CLASES de python. Crearemos una CLASE que represente nuestro objeto de juego. Este objeto tendrá una función para moverse solo y luego podemos crear tantos como queramos. Las funciones para dibujar y mover el objeto necesitan funcionar de una manera en que muevan solo un cuadro (o un paso) a la vez. Acá está el código de python para crear nuestra clase. ::h]hXEsta es la parte en que realmente vamos a cambiar las cosas. Digamos que queremos 10 imágenes diferentes moviéndose en la pantalla. Una buena forma de manejar esto es usando las CLASES de python. Crearemos una CLASE que represente nuestro objeto de juego. Este objeto tendrá una función para moverse solo y luego podemos crear tantos como queramos. Las funciones para dibujar y mover el objeto necesitan funcionar de una manera en que muevan solo un cuadro (o un paso) a la vez. Acá está el código de python para crear nuestra clase.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj)}(hXP>>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(0, self.speed) ... if self.pos.right > 600: ... self.pos.left = 0h]hXP>>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(0, self.speed) ... if self.pos.right > 600: ... self.pos.left = 0}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubh)}(hXEntonces, tenemos dos funciones en nuestra clase. La función init (inicializar) construye nuestro objeto, posiciona el objeto y establece su velocidad. El método move (mover) mueve el objeto un paso. Si se va demasiado lejos, mueve el objeto de nuevo hacia la izquierda.h]hXEntonces, tenemos dos funciones en nuestra clase. La función init (inicializar) construye nuestro objeto, posiciona el objeto y establece su velocidad. El método move (mover) mueve el objeto un paso. Si se va demasiado lejos, mueve el objeto de nuevo hacia la izquierda.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]mover-imagenes-multiplesah]h]mover imágenes múltiplesah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hEnsamblando Todoh]hEnsamblando Todo}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubh)}(hAhora con nuestra nueva clase objeto, podemos montar el juego completo. Así es como se verá la función principal para nuestro programa. ::h]hAhora con nuestra nueva clase objeto, podemos montar el juego completo. Así es como se verá la función principal para nuestro programa.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubj)}(hX>>> screen = pygame.display.set_mode((640, 480)) >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #crear 10 objetos
... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... pygame.time.delay(100)h]hX>>> screen = pygame.display.set_mode((640, 480)) >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #crear 10 objetos
... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... pygame.time.delay(100)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Mhjh&hubh)}(hXY ahí está. Este es el código que necesitamos para animar 10 objetos en la pantalla. El único punto que podría necesitar explicación son los dos bucles (loops) que usamos para borrar todos los objetos y dibujar todos los objetos. Para hacer las cosas correctamente, necestamos borrar todos los objetos antes de dibujar alguno de ellos. En nuestro ejemplo puede que no importe pero cuando los objetos se superponen, el uso de dos bucles (loops) como estos se vuelve muy importante.h]hXY ahí está. Este es el código que necesitamos para animar 10 objetos en la pantalla. El único punto que podría necesitar explicación son los dos bucles (loops) que usamos para borrar todos los objetos y dibujar todos los objetos. Para hacer las cosas correctamente, necestamos borrar todos los objetos antes de dibujar alguno de ellos. En nuestro ejemplo puede que no importe pero cuando los objetos se superponen, el uso de dos bucles (loops) como estos se vuelve muy importante.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubeh}(h]ensamblando-todoah]h]ensamblando todoah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(h&De Ahora En Más, Estás Por Tu Cuentah]h&De Ahora En Más, Estás Por Tu Cuenta}hj&sbah}(h]h]h]h]h!]uh%h>hj#h&hh'h(h)Mubh)}(hXhEntonces, ¿qué será lo siguiente en tu camino de aprendizaje? Bueno, primero jugar un poco con este ejemplo. La versión ejecutable completa de este ejemplo está disponible en los directorios de ejemplos de pygame. Está en el ejemplo llamado :func:`moveit.py ` . Dale una mirada al código y jugá con él, correlo, aprendelo.h](hEntonces, ¿qué será lo siguiente en tu camino de aprendizaje? Bueno, primero jugar un poco con este ejemplo. La versión ejecutable completa de este ejemplo está disponible en los directorios de ejemplos de pygame. Está en el ejemplo llamado }hj4sbh pending_xref)}(h/:func:`moveit.py `h]j)}(hj@h]h moveit.py}hjBsbah}(h]h](xrefpypy-funceh]h]h!]uh%jhj>ubah}(h]h]h]h]h!]refdoctutorials/MoverImagen refdomainjMreftypefunc refexplicitrefwarn py:moduleNpy:classN reftargetpygame.examples.moveit.mainuh%j<h'h(h)Mhj4ubhB . Dale una mirada al código y jugá con él, correlo, aprendelo.}hj4sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubh)}(hX)Algunas cosas en las que quizás quieras trabajar es en tener más de un tipo de objeto. Encontrar una manera de "eliminar" objetos limpiamente cuando ya no quieras mostrarlos. También, actualizar el llamado (call) display.update() para pasar una lista de las áreas en pantalla que han cambiado.h]hX)Algunas cosas en las que quizás quieras trabajar es en tener más de un tipo de objeto. Encontrar una manera de "eliminar" objetos limpiamente cuando ya no quieras mostrarlos. También, actualizar el llamado (call) display.update() para pasar una lista de las áreas en pantalla que han cambiado.}hjmsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubh)}(hEn pygame hay otros tutoriales y ejemplos que cubren estos temas. Así que cuando estés listo para seguir aprendiendo, seguí leyendo. :-)h]hEn pygame hay otros tutoriales y ejemplos que cubren estos temas. Así que cuando estés listo para seguir aprendiendo, seguí leyendo. :-)}hj{sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubh)}(hPor último, podés unirte a la lista de correos de pygame o al chatroom con total libertad para consultar dudas al respecto. Siempre hay personas disponibles que están dispuestas a ayudar con estos temas.h]hPor último, podés unirte a la lista de correos de pygame o al chatroom con total libertad para consultar dudas al respecto. Siempre hay personas disponibles que están dispuestas a ayudar con estos temas.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubh)}(h/Finalmente, divertite, para eso son los juegos!h]h/Finalmente, divertite, para eso son los juegos!}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj#h&hubeh}(h]#de-ahora-en-mas-estas-por-tu-cuentaah]h]&de ahora en más, estás por tu cuentaah]h!]uh%h9hhNh&hh'h(h)Mubeh}(h]ayuda-como-muevo-una-imagenah]h]"¡ayuda! ¿cómo muevo una imagen?ah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]0tutoriales-de-pygame-ayuda-como-muevo-una-imagenah]h]9tutoriales de pygame - ¡ayuda! ¿cómo muevo una imagen?ah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjujrjjjCj@jjjjjwjtjjj/j,jrjojjjjjWjTjjjjj jjju nametypes}(jjjujjCjjjwjj/jrjjjWjjj juh}(jh;jhNjrj'jjxj@jjjFjjjtjjjzj,jjoj2jjujjjTjjjZjjjjjj#u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]!docs/es/tutorials/MoverImagen.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.273132 pygame-2.6.1/docs/generated/es/doctrees/tutorials/SpriteIntro.doctree0000644000175100001770000024576614676242430025427 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h$TUTORIAL: Sprite Module Introductionh]h Text$TUTORIAL: Sprite Module Introduction}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceA/home/runner/work/pygame/pygame/docs/es/tutorials/SpriteIntro.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h:Tutoriales de Pygame - Introducción al Módulo de Spritesh]h:Tutoriales de Pygame - Introducción al Módulo de Sprites}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(h#Introducción al Módulo de Spritesh]h#Introducción al Módulo de Sprites}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAuthorh]hAuthor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hh}h]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContacth]hContact}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.orgh]h)}(hhh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh)}(hXComentario: una forma simple de entender los Sprites, es pensarlos como elementos visuales utilizados para representar objetos y personajes en juegos, y se pueden crear y manipular utilizando la biblioteca de Pygame. Si bien se podría traducir el término "sprite" por "imagen en movimiento" o "personaje animado", en el contexto de programación se ha adoptado ampliamente y es comúnmente utilizado en español, sin traducción.h]hXComentario: una forma simple de entender los Sprites, es pensarlos como elementos visuales utilizados para representar objetos y personajes en juegos, y se pueden crear y manipular utilizando la biblioteca de Pygame. Si bien se podría traducir el término "sprite" por "imagen en movimiento" o "personaje animado", en el contexto de programación se ha adoptado ampliamente y es comúnmente utilizado en español, sin traducción.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh)}(hXLa versión de pygame 1.3 viene con un nuevo módulo, ``pygame.sprite``. Este módulo está escrito en Python e incluye algunas clases de nivel superior para administrar los objetos del juego. Al usar este módulo en todo su potencial, se puede fácilmente administrar y dibujar los objetos del juego. Las clases de sprites están muy optimizadas, por lo que es probable que tu juego funcione más rápido con el módulo de sprites que sin él.h](h6La versión de pygame 1.3 viene con un nuevo módulo, }hjsbh literal)}(h``pygame.sprite``h]h pygame.sprite}hj#sbah}(h]h]h]h]h!]uh%j!hjubhXu. Este módulo está escrito en Python e incluye algunas clases de nivel superior para administrar los objetos del juego. Al usar este módulo en todo su potencial, se puede fácilmente administrar y dibujar los objetos del juego. Las clases de sprites están muy optimizadas, por lo que es probable que tu juego funcione más rápido con el módulo de sprites que sin él.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KhhNh&hubh)}(hXEl módulo de sprites también pretende ser genérico, resulta que lo podés usar con casi cualquier tipo de juego. Toda esta flexibilidad viene con una pequeña penalización, es necesario entenderlo para usarlo correctamente. El :mod:`reference documentation ` para el módulo de sprites puede mantenerte andando, pero probablemente necesites un poco más de explicaicón sobre cómo usar ``pygame.sprite`` en tu propio juego.h](hEl módulo de sprites también pretende ser genérico, resulta que lo podés usar con casi cualquier tipo de juego. Toda esta flexibilidad viene con una pequeña penalización, es necesario entenderlo para usarlo correctamente. El }hj;sbh pending_xref)}(h.:mod:`reference documentation `h]j")}(hjGh]hreference documentation}hjIsbah}(h]h](xrefpypy-modeh]h]h!]uh%j!hjEubah}(h]h]h]h]h!]refdoctutorials/SpriteIntro refdomainjTreftypemod refexplicitrefwarn py:moduleNpy:classN reftarget pygame.spriteuh%jCh'h(h)K!hj;ubh para el módulo de sprites puede mantenerte andando, pero probablemente necesites un poco más de explicaicón sobre cómo usar }hj;sbj")}(h``pygame.sprite``h]h pygame.sprite}hjnsbah}(h]h]h]h]h!]uh%j!hj;ubh en tu propio juego.}hj;sbeh}(h]h]h]h]h!]uh%hh'h(h)K!hhNh&hubh)}(hXZVarios de los ejemplos de pygame (como "chimp" y "aliens") han sido actualizados para usar el módulo de sprites. Es posible que quieras verificarlos para ver de qué se trata este módulo de sprites. El módulo de chimp incluso tiene su propio tutorial línea por línea, que puede ayudar a comprender mejor la programación con python y pygame.h]hXZVarios de los ejemplos de pygame (como "chimp" y "aliens") han sido actualizados para usar el módulo de sprites. Es posible que quieras verificarlos para ver de qué se trata este módulo de sprites. El módulo de chimp incluso tiene su propio tutorial línea por línea, que puede ayudar a comprender mejor la programación con python y pygame.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K(hhNh&hubh)}(hXTengan en cuenta que esta introducción asumirá que tienen un poco de experiencia programando con python y que están familiarizados con diferentes partes de la creación de un simple juego. En este tutorial la palabra "referencia" es usada ocasionalmente. Esta representa una variable de python. Las variables en python son referencias, por lo que pueden haber varias variables apuntando al mismo objeto.h]hXTengan en cuenta que esta introducción asumirá que tienen un poco de experiencia programando con python y que están familiarizados con diferentes partes de la creación de un simple juego. En este tutorial la palabra "referencia" es usada ocasionalmente. Esta representa una variable de python. Las variables en python son referencias, por lo que pueden haber varias variables apuntando al mismo objeto.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K.hhNh&hubh:)}(hhh](h?)}(hLección de Historiah]hLección de Historia}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)K6ubh)}(hXEl término "sprite" es un vestigio de las computadoras y máquinas de juego más antiguas. Estas cajas antiguas no eran capaces de dibujar y borrar gráficos normales lo suficientemente rápido como para que funcionara como juego. Estas máquinas tenían un hardware especial para manejar juegos como objetos que necesitaban animarse rápidamente. Estos objetos eran llamados "sprites" y tenían limitaciones especiales, pero podían dibujarse y actualizarse muy rápido. Por lo general, existían en buffers especiales superpuestos en el video. Hoy en día las computadores se han vuelto lo suficientemente rápidas para manejar objetos similares a sprites sin un hardware dedicado. El término sprite es todavía usado para representar casi cualquier cosa en un juego 2D animado.h]hXEl término "sprite" es un vestigio de las computadoras y máquinas de juego más antiguas. Estas cajas antiguas no eran capaces de dibujar y borrar gráficos normales lo suficientemente rápido como para que funcionara como juego. Estas máquinas tenían un hardware especial para manejar juegos como objetos que necesitaban animarse rápidamente. Estos objetos eran llamados "sprites" y tenían limitaciones especiales, pero podían dibujarse y actualizarse muy rápido. Por lo general, existían en buffers especiales superpuestos en el video. Hoy en día las computadores se han vuelto lo suficientemente rápidas para manejar objetos similares a sprites sin un hardware dedicado. El término sprite es todavía usado para representar casi cualquier cosa en un juego 2D animado.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K8hjh&hubeh}(h]leccion-de-historiaah]h]lección de historiaah]h!]uh%h9hhNh&hh'h(h)K6ubh:)}(hhh](h?)}(h Las Clasesh]h Las Clases}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)KEubh)}(hXHEl módulo de sprites viene con dos clases principales. La primera es :class:`Sprite `, que debe usarse como clse base para todos los objetos de tu juego. Esta clase realmente no hace nada por sí sola, sólo incluye varias funciones para ayudar a administrar el objeto del juego. El otro tipo de clase es :class:`Group `. La clase ``Group`` es un contenedor para diferentes objetos ``Sprite``. De hecho, hay varios tipos diferentes de clases de Group. Algunos de los ``Groups`` pueden dibujar todos los elementos que contienen, por ejemplo.h](hFEl módulo de sprites viene con dos clases principales. La primera es }hjsbjD)}(h&:class:`Sprite `h]j")}(hjh]hSprite}hjsbah}(h]h](jSpypy-classeh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.Spriteuh%jCh'h(h)KGhjubh, que debe usarse como clse base para todos los objetos de tu juego. Esta clase realmente no hace nada por sí sola, sólo incluye varias funciones para ayudar a administrar el objeto del juego. El otro tipo de clase es }hjsbjD)}(h$:class:`Group `h]j")}(hjh]hGroup}hj sbah}(h]h](jSpypy-classeh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.Groupuh%jCh'h(h)KGhjubh . La clase }hjsbj")}(h ``Group``h]hGroup}hj*sbah}(h]h]h]h]h!]uh%j!hjubh* es un contenedor para diferentes objetos }hjsbj")}(h ``Sprite``h]hSprite}hj<sbah}(h]h]h]h]h!]uh%j!hjubhK. De hecho, hay varios tipos diferentes de clases de Group. Algunos de los }hjsbj")}(h ``Groups``h]hGroups}hjNsbah}(h]h]h]h]h!]uh%j!hjubh? pueden dibujar todos los elementos que contienen, por ejemplo.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KGhjh&hubh)}(hEsto es todo lo que hay, realmente. Comenzaremos con una descriçión de lo que hace cada tipo de clase y luego discutiremos las formas adecuadas de usar las dos clases.h]hEsto es todo lo que hay, realmente. Comenzaremos con una descriçión de lo que hace cada tipo de clase y luego discutiremos las formas adecuadas de usar las dos clases.}hjfsbah}(h]h]h]h]h!]uh%hh'h(h)KPhjh&hubeh}(h] las-clasesah]h] las clasesah]h!]uh%h9hhNh&hh'h(h)KEubh:)}(hhh](h?)}(hLa Clase Spriteh]hLa Clase Sprite}hjsbah}(h]h]h]h]h!]uh%h>hj|h&hh'h(h)KUubh)}(hX Como se mencionó anteriormente, la clase Sprite está diseñada para ser una clase base para todos los objetos del juego. Realmente no podés usarla por sí sola, ya que sólo tiene varios métodos para ayudarlo a trabajar con diferentes clases ``Grupo``. El sprite realiza un seguimiento de a qué grupo pertenece. El constructor de clases (método ``__init__``) toma un argumento de un ``Grupo`` (o listas de ``Grupos``) al que debería pertencer la instancia ``Sprite``. También se puede cambiar la pertenencia del ``Sprite`` con los métodos :meth:`add() ` y :meth:`remove() `. Hay también un método :meth:`groups() `, que devuelve una lista de los grupos actuales que contiene el sprite.h](hComo se mencionó anteriormente, la clase Sprite está diseñada para ser una clase base para todos los objetos del juego. Realmente no podés usarla por sí sola, ya que sólo tiene varios métodos para ayudarlo a trabajar con diferentes clases }hjsbj")}(h ``Grupo``h]hGrupo}hjsbah}(h]h]h]h]h!]uh%j!hjubh`. El sprite realiza un seguimiento de a qué grupo pertenece. El constructor de clases (método }hjsbj")}(h ``__init__``h]h__init__}hjsbah}(h]h]h]h]h!]uh%j!hjubh) toma un argumento de un }hjsbj")}(h ``Grupo``h]hGrupo}hjsbah}(h]h]h]h]h!]uh%j!hjubh (o listas de }hjsbj")}(h ``Grupos``h]hGrupos}hjsbah}(h]h]h]h]h!]uh%j!hjubh)) al que debería pertencer la instancia }hjsbj")}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%j!hjubh/. También se puede cambiar la pertenencia del }hjsbj")}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%j!hjubh con los métodos }hjsbjD)}(h(:meth:`add() `h]j")}(hjh]hadd()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Sprite.adduh%jCh'h(h)KWhjubh y }hjsbjD)}(h.:meth:`remove() `h]j")}(hj'h]hremove()}hj)sbah}(h]h](jSpypy-metheh]h]h!]uh%j!hj%ubah}(h]h]h]h]h!]refdocj` refdomainj3reftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Sprite.removeuh%jCh'h(h)KWhjubh. Hay también un método }hjsbjD)}(h.:meth:`groups() `h]j")}(hjKh]hgroups()}hjMsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjIubah}(h]h]h]h]h!]refdocj` refdomainjWreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Sprite.groupsuh%jCh'h(h)KWhjubhG, que devuelve una lista de los grupos actuales que contiene el sprite.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KWhj|h&hubh)}(hXCuando se usen las clases de Sprite, es mejor pensarlas como "válidas" o "vivas", cuando pertenecen a uno o más ``Grupos``. Cuando se eliminen las instancias de todos los grupos, pygame limpiará el objeto. (A menos que tengas tus propias referencias a la instancia en otro lugar.) El método :meth:`kill() ` elimina los sprites de todos los grupos a los que pertenece. Esto eliminará limpiamente el objeto sprite. Si ya has armado algún juego, sabés que a veces eliminar limpiamente un objeto del juego puede ser complicado. El sprite también viene con un método :meth:`alive() ` que devuelve "true" (verdadero) si todavía es miembro de algún grupo.h](hrCuando se usen las clases de Sprite, es mejor pensarlas como "válidas" o "vivas", cuando pertenecen a uno o más }hjssbj")}(h ``Grupos``h]hGrupos}hj{sbah}(h]h]h]h]h!]uh%j!hjsubh. Cuando se eliminen las instancias de todos los grupos, pygame limpiará el objeto. (A menos que tengas tus propias referencias a la instancia en otro lugar.) El método }hjssbjD)}(h*:meth:`kill() `h]j")}(hjh]hkill()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Sprite.killuh%jCh'h(h)KchjsubhX elimina los sprites de todos los grupos a los que pertenece. Esto eliminará limpiamente el objeto sprite. Si ya has armado algún juego, sabés que a veces eliminar limpiamente un objeto del juego puede ser complicado. El sprite también viene con un método }hjssbjD)}(h,:meth:`alive() `h]j")}(hjh]halive()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Sprite.aliveuh%jCh'h(h)KchjsubhH que devuelve "true" (verdadero) si todavía es miembro de algún grupo.}hjssbeh}(h]h]h]h]h!]uh%hh'h(h)Kchj|h&hubeh}(h]la-clase-spriteah]h]la clase spriteah]h!]uh%h9hhNh&hh'h(h)KUubh:)}(hhh](h?)}(hLa Clase Grupoh]hLa Clase Grupo}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Koubh)}(hXLa clase ``Group`` es solo un simple contenedor. Similar a un sprite, tiene un método :meth:`add() ` y otro método :meth:`remove()` que puede cambiar qué sprites pertenecen a el grupo. También podés pasar un sprite o una lista de sprites al constructor (``__init__()`` method) para crear una instancia ``Group`` que contiene algunos sprites iniciales.h](h La clase }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubhE es solo un simple contenedor. Similar a un sprite, tiene un método }hjsbjD)}(h':meth:`add() `h]j")}(hjh]hadd()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.adduh%jCh'h(h)Kqhjubh y otro método }hjsbjD)}(h,:meth:`remove()`h]j")}(hj4h]hremove()}hj6sbah}(h]h](jSpypy-metheh]h]h!]uh%j!hj2ubah}(h]h]h]h]h!]refdocj` refdomainj@reftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.removeuh%jCh'h(h)Kqhjubh~ que puede cambiar qué sprites pertenecen a el grupo. También podés pasar un sprite o una lista de sprites al constructor (}hjsbj")}(h``__init__()``h]h __init__()}hjVsbah}(h]h]h]h]h!]uh%j!hjubh" method) para crear una instancia }hjsbj")}(h ``Group``h]hGroup}hjhsbah}(h]h]h]h]h!]uh%j!hjubh( que contiene algunos sprites iniciales.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kqhjh&hubh)}(hXEl ``Group`` tiene algunos otros métodos como :meth:`empty()` para eliminar todos los sprites de el grupo y :meth:`copy() ` que devolverá una copia del grupo con todos los mismos miembros. Además, el método :meth:`has() ` verificará rápidamente si el ``Group`` contiene un sprite o lista de sprites.h](hEl }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh# tiene algunos otros métodos como }hjsbjD)}(h*:meth:`empty()`h]j")}(hjh]hempty()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.emptyuh%jCh'h(h)Kxhjubh/ para eliminar todos los sprites de el grupo y }hjsbjD)}(h):meth:`copy() `h]j")}(hjh]hcopy()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.copyuh%jCh'h(h)KxhjubhW que devolverá una copia del grupo con todos los mismos miembros. Además, el método }hjsbjD)}(h':meth:`has() `h]j")}(hjh]hhas()}hjsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.hasuh%jCh'h(h)Kxhjubh verificará rápidamente si el }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh' contiene un sprite o lista de sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Kxhjh&hubh)}(hXaLa otra función que usarás frecuentemente es el método :meth:`sprites()`. Esto devuelve un objeto que se puede enlazar para acceder a todos los sprites que contiene el grupo. Actualmente, esta es solo una lista de sprites, pero en una versión posterior de python es probable que use iteradores para un mejor rendimiento.h](h:La otra función que usarás frecuentemente es el método }hjsbjD)}(h.:meth:`sprites()`h]j")}(hj(h]h sprites()}hj*sbah}(h]h](jSpypy-metheh]h]h!]uh%j!hj&ubah}(h]h]h]h]h!]refdocj` refdomainj4reftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.spritesuh%jCh'h(h)Khjubh. Esto devuelve un objeto que se puede enlazar para acceder a todos los sprites que contiene el grupo. Actualmente, esta es solo una lista de sprites, pero en una versión posterior de python es probable que use iteradores para un mejor rendimiento.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXjComo atajo, el ``Group`` también tiene un método :meth:`update()`, que llamará a un método ``update()`` para cada sprite en el grupo, pasando los argumentos a cada uno. Generalmente, en un juego se necesita alguna función que actualice el estado de los objetos del juego. Es muy fácil llamar a tu propio método usando el método ``Group.sprites()``, pero este es un atajo que se usa lo suficiente como para ser incluido. También, tengan en cuenta que la clase base ``Sprite`` tiene un método ficticio, tipo "dummy", ``update()`` que toma cualquier tipo de argumento y no hace nada.h](hComo atajo, el }hjPsbj")}(h ``Group``h]hGroup}hjXsbah}(h]h]h]h]h!]uh%j!hjPubh también tiene un método }hjPsbjD)}(h,:meth:`update()`h]j")}(hjlh]hupdate()}hjnsbah}(h]h](jSpypy-metheh]h]h!]uh%j!hjjubah}(h]h]h]h]h!]refdocj` refdomainjxreftypemeth refexplicitrefwarnjfNjgNjhpygame.sprite.Group.updateuh%jCh'h(h)KhjPubh, que llamará a un método }hjPsbj")}(h ``update()``h]hupdate()}hjsbah}(h]h]h]h]h!]uh%j!hjPubh para cada sprite en el grupo, pasando los argumentos a cada uno. Generalmente, en un juego se necesita alguna función que actualice el estado de los objetos del juego. Es muy fácil llamar a tu propio método usando el método }hjPsbj")}(h``Group.sprites()``h]hGroup.sprites()}hjsbah}(h]h]h]h]h!]uh%j!hjPubhv, pero este es un atajo que se usa lo suficiente como para ser incluido. También, tengan en cuenta que la clase base }hjPsbj")}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%j!hjPubh* tiene un método ficticio, tipo "dummy", }hjPsbj")}(h ``update()``h]hupdate()}hjsbah}(h]h]h]h]h!]uh%j!hjPubh5 que toma cualquier tipo de argumento y no hace nada.}hjPsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXPor último, el Group tiene un par de otros métodos que permiten usarlo como funición interna ``len()``, obteniendo el número de sprites que contiene, y el operador "truth" (verdad), que te permite hacer "if mygroup:" para verificar si el grupo tiene sprites.h](h`Por último, el Group tiene un par de otros métodos que permiten usarlo como funición interna }hjsbj")}(h ``len()``h]hlen()}hjsbah}(h]h]h]h]h!]uh%j!hjubh, obteniendo el número de sprites que contiene, y el operador "truth" (verdad), que te permite hacer "if mygroup:" para verificar si el grupo tiene sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]la-clase-grupoah]h]la clase grupoah]h!]uh%h9hhNh&hh'h(h)Koubh:)}(hhh](h?)}(hMezclándolos Juntosh]hMezclándolos Juntos}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hXA esta altura, las dos clases parecen bastante básicas. No hacen mucho más de lo que podés hacer con una simple lista y tu propia clase de objetos de juego. Pero hay algunas ventajas grandes al usar ``Sprite`` y ``Group`` juntos. Un sprite puede pertenecer a tantos grupos como quieras, recordá que tan pronto como pertenezca a ningún grupo, generalmente se borrará (a menos que tengas otra referencia "no-grupales" para ese objeto)h](hA esta altura, las dos clases parecen bastante básicas. No hacen mucho más de lo que podés hacer con una simple lista y tu propia clase de objetos de juego. Pero hay algunas ventajas grandes al usar }hjsbj")}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%j!hjubh y }hjsbj")}(h ``Group``h]hGroup}hj/sbah}(h]h]h]h]h!]uh%j!hjubh juntos. Un sprite puede pertenecer a tantos grupos como quieras, recordá que tan pronto como pertenezca a ningún grupo, generalmente se borrará (a menos que tengas otra referencia "no-grupales" para ese objeto)}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXLo primero es una forma rápida y sencilla de categorizar sprites. Por ejemplo, digamos que tenemos un juego tipo Pacman. Podríamos hacer grupos separados por diferentes tipos de objetos en el juego. Fantasmas, Pac y Pellets (pastilla de poder). Cuando Pac come una pastilla de poder, podemos cambiar el estado de todos los objetos fantasma afectando a todo el grupo Fantasma. Esta manera es más rápida y sencilla que recorrer en loop la lista de todos los objetos del juego y comrpobar cuáles son fantasmas.h]hXLo primero es una forma rápida y sencilla de categorizar sprites. Por ejemplo, digamos que tenemos un juego tipo Pacman. Podríamos hacer grupos separados por diferentes tipos de objetos en el juego. Fantasmas, Pac y Pellets (pastilla de poder). Cuando Pac come una pastilla de poder, podemos cambiar el estado de todos los objetos fantasma afectando a todo el grupo Fantasma. Esta manera es más rápida y sencilla que recorrer en loop la lista de todos los objetos del juego y comrpobar cuáles son fantasmas.}hjGsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXTAgregar y eliminar grupos y sprites entre sí es una operación muy rápida, más rápida que usar listas para almacenar todo. Por lo tanto, podés cambiar de manera muy eficiente la pertenencia de los grupos. Los grupos se pueden usar para funcionar como atributos simples para cada objeto del juego. En lugar de rastrear algún atributo como "close_to_player" para un montón de objetos enemigos, podrías agregarlos a un grupo separado. Luego, cuando necesites acceder a todos los enemigos que están cerca del jugador, ya tenés una lista de ellos, en vez de examinar una lista de todos los enemigos, buscando el indicador "close_to_player". Más adelante, tu juego podría agregar múltiples jugadores, y en lugar de agregar más atributos "close_to_player2", "close_to_player3", podés fácilmente agregarlos a diferentes grupos o a cada jugador.h]hXTAgregar y eliminar grupos y sprites entre sí es una operación muy rápida, más rápida que usar listas para almacenar todo. Por lo tanto, podés cambiar de manera muy eficiente la pertenencia de los grupos. Los grupos se pueden usar para funcionar como atributos simples para cada objeto del juego. En lugar de rastrear algún atributo como "close_to_player" para un montón de objetos enemigos, podrías agregarlos a un grupo separado. Luego, cuando necesites acceder a todos los enemigos que están cerca del jugador, ya tenés una lista de ellos, en vez de examinar una lista de todos los enemigos, buscando el indicador "close_to_player". Más adelante, tu juego podría agregar múltiples jugadores, y en lugar de agregar más atributos "close_to_player2", "close_to_player3", podés fácilmente agregarlos a diferentes grupos o a cada jugador.}hjUsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hXOtro beneficio importante de usar ``Sprites`` y ``Groups`` es que los grupos manejan limpiamente el borrado (o eliminación) de los objetos del juego. En un juego en el que muchos objetos hacen referencia a otros objetos, a veces eliminar un objeto puede ser la parte más difícil, ya que no puede desaparecer hasta que nadie haga referencia a él. Digamos que tenemos un objeto que está "persiguiendo" a otro objeto. El perseguidor puede mantener un Group simple que hace referencia al objeto (u objetos) que está persiguiendo. Si el objeto perseguido es destruido, no necesitamos preocuparnos por notificar al perseguidor que deje de perseguir. El perseguidor puede verlo por sí mismo que su grupo está ahora vacío y quizás encuentre un nuevo objetivo.h](h"Otro beneficio importante de usar }hjcsbj")}(h ``Sprites``h]hSprites}hjksbah}(h]h]h]h]h!]uh%j!hjcubh y }hjcsbj")}(h ``Groups``h]hGroups}hj}sbah}(h]h]h]h]h!]uh%j!hjcubhX es que los grupos manejan limpiamente el borrado (o eliminación) de los objetos del juego. En un juego en el que muchos objetos hacen referencia a otros objetos, a veces eliminar un objeto puede ser la parte más difícil, ya que no puede desaparecer hasta que nadie haga referencia a él. Digamos que tenemos un objeto que está "persiguiendo" a otro objeto. El perseguidor puede mantener un Group simple que hace referencia al objeto (u objetos) que está persiguiendo. Si el objeto perseguido es destruido, no necesitamos preocuparnos por notificar al perseguidor que deje de perseguir. El perseguidor puede verlo por sí mismo que su grupo está ahora vacío y quizás encuentre un nuevo objetivo.}hjcsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hX^Una vez más, lo que hay que recordar es que agregar y eliminar sprites de grupos es una operación muy barata/rápida. Puede que te vaya mejor agregando muchos grupos para contener y organizar los objetos de tu juego. Algunos podrían incluso estar vacíos durante gran parte del juego, no hay penalizaciones por administrar tu juego de esta manera.h]hX^Una vez más, lo que hay que recordar es que agregar y eliminar sprites de grupos es una operación muy barata/rápida. Puede que te vaya mejor agregando muchos grupos para contener y organizar los objetos de tu juego. Algunos podrían incluso estar vacíos durante gran parte del juego, no hay penalizaciones por administrar tu juego de esta manera.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]mezclandolos-juntosah]h]mezclándolos juntosah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hLos Muchos Tipos de Gruposh]hLos Muchos Tipos de Grupos}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hXLos ejemplos anteriores y las razones para usar ``Sprites`` y ``Groups`` son solo la punta del iceberg. Otra ventaja es que el módulo viene con varios tipos diferentes de ``Groups``. Todos estos grupos funcionan como un ``Group`` normal y corrientes, pero también tienen funcionalidades añadidas (o ligeramente diferentes). Acá hay una lista de las clases ``Group`` incluidas con el módulo de sprites.h](h0Los ejemplos anteriores y las razones para usar }hjsbj")}(h ``Sprites``h]hSprites}hjsbah}(h]h]h]h]h!]uh%j!hjubh y }hjsbj")}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%j!hjubhd son solo la punta del iceberg. Otra ventaja es que el módulo viene con varios tipos diferentes de }hjsbj")}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%j!hjubh'. Todos estos grupos funcionan como un }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh normal y corrientes, pero también tienen funcionalidades añadidas (o ligeramente diferentes). Acá hay una lista de las clases }hjsbj")}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%j!hjubh% incluidas con el módulo de sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh block_quote)}(hX:class:`Group ` Este es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros ``Groups`` se derivan de este, pero no todos. :class:`GroupSingle ` Esto funciona exactamente como la clase regular ``Group``, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites. :class:`RenderPlain ` Este es un grupo estándar derivado de ``Group``. Tiene un método draw() que dibuja en la pantalla (o en cualquier ``Surface``) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear. :class:`RenderClear ` Esto se deriva del grupo ``RenderPlain`` y agrega además un método llamado ``clear()``. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método ``clear()``. :class:`RenderUpdates ` Este es el Cádilac de renderizado de ``Groups``. Es heredado de ``RenderClear``, pero cambia el método ``draw()`` para también devolver una lista de ``Rects`` de pygame, que representan todas las áreas de la pantalla que han sido modificadas. h](h)}(h$:class:`Group `h]jD)}(hj,h]j")}(hj,h]hGroup}hj1sbah}(h]h](jSpypy-classeh]h]h!]uh%j!hj.ubah}(h]h]h]h]h!]refdocj` refdomainj;reftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.Groupuh%jCh'h(h)Khj*ubah}(h]h]h]h]h!]uh%hh'h(h)Khj&ubj%)}(hEste es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros ``Groups`` se derivan de este, pero no todos. h]h)}(hEste es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros ``Groups`` se derivan de este, pero no todos.h](hjEste es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros }hjWsbj")}(h ``Groups``h]hGroups}hj_sbah}(h]h]h]h]h!]uh%j!hjWubh# se derivan de este, pero no todos.}hjWsbeh}(h]h]h]h]h!]uh%hh'h(h)KhjSubah}(h]h]h]h]h!]uh%j$h'h(h)Khj&ubh)}(h0:class:`GroupSingle `h]jD)}(hjh]j")}(hjh]h GroupSingle}hjsbah}(h]h](jSpypy-classeh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.GroupSingleuh%jCh'h(h)Khj}ubah}(h]h]h]h]h!]uh%hh'h(h)Khj&ubj%)}(hXEsto funciona exactamente como la clase regular ``Group``, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites. h]h)}(hXEsto funciona exactamente como la clase regular ``Group``, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites.h](h0Esto funciona exactamente como la clase regular }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j$h'h(h)Khj&ubh)}(h0:class:`RenderPlain `h]jD)}(hjh]j")}(hjh]h RenderPlain}hjsbah}(h]h](jSpypy-classeh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.RenderPlainuh%jCh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj&ubj%)}(hXKEste es un grupo estándar derivado de ``Group``. Tiene un método draw() que dibuja en la pantalla (o en cualquier ``Surface``) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear. h]h)}(hXJEste es un grupo estándar derivado de ``Group``. Tiene un método draw() que dibuja en la pantalla (o en cualquier ``Surface``) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear.h](h'Este es un grupo estándar derivado de }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubhD. Tiene un método draw() que dibuja en la pantalla (o en cualquier }hjsbj")}(h ``Surface``h]hSurface}hjsbah}(h]h]h]h]h!]uh%j!hjubh) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j$h'h(h)Khj&ubh)}(h0:class:`RenderClear `h]jD)}(hj7h]j")}(hj7h]h RenderClear}hj<sbah}(h]h](jSpypy-classeh]h]h!]uh%j!hj9ubah}(h]h]h]h]h!]refdocj` refdomainjFreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.RenderClearuh%jCh'h(h)Khj5ubah}(h]h]h]h]h!]uh%hh'h(h)Khj&ubj%)}(hXEsto se deriva del grupo ``RenderPlain`` y agrega además un método llamado ``clear()``. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método ``clear()``. h]h)}(hXEsto se deriva del grupo ``RenderPlain`` y agrega además un método llamado ``clear()``. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método ``clear()``.h](hEsto se deriva del grupo }hjbsbj")}(h``RenderPlain``h]h RenderPlain}hjjsbah}(h]h]h]h]h!]uh%j!hjbubh% y agrega además un método llamado }hjbsbj")}(h ``clear()``h]hclear()}hj|sbah}(h]h]h]h]h!]uh%j!hjbubhX&. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método }hjbsbj")}(h ``clear()``h]hclear()}hjsbah}(h]h]h]h]h!]uh%j!hjbubh.}hjbsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj^ubah}(h]h]h]h]h!]uh%j$h'h(h)Khj&ubh)}(h4:class:`RenderUpdates `h]jD)}(hjh]j")}(hjh]h RenderUpdates}hjsbah}(h]h](jSpypy-classeh]h]h!]uh%j!hjubah}(h]h]h]h]h!]refdocj` refdomainjreftypeclass refexplicitrefwarnjfNjgNjhpygame.sprite.RenderUpdatesuh%jCh'h(h)Khjubah}(h]h]h]h]h!]uh%hh'h(h)Khj&ubj%)}(hEste es el Cádilac de renderizado de ``Groups``. Es heredado de ``RenderClear``, pero cambia el método ``draw()`` para también devolver una lista de ``Rects`` de pygame, que representan todas las áreas de la pantalla que han sido modificadas. h]h)}(hEste es el Cádilac de renderizado de ``Groups``. Es heredado de ``RenderClear``, pero cambia el método ``draw()`` para también devolver una lista de ``Rects`` de pygame, que representan todas las áreas de la pantalla que han sido modificadas.h](h&Este es el Cádilac de renderizado de }hjsbj")}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%j!hjubh. Es heredado de }hjsbj")}(h``RenderClear``h]h RenderClear}hjsbah}(h]h]h]h]h!]uh%j!hjubh, pero cambia el método }hjsbj")}(h ``draw()``h]hdraw()}hj sbah}(h]h]h]h]h!]uh%j!hjubh% para también devolver una lista de }hjsbj")}(h ``Rects``h]hRects}hj sbah}(h]h]h]h]h!]uh%j!hjubhU de pygame, que representan todas las áreas de la pantalla que han sido modificadas.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%j$h'h(h)Khj&ubeh}(h]h]h]h]h!]uh%j$h'h(h)Khjh&hubh)}(hX*Esa es la lista de los diferentes grupos disponibles. Hablaremos más acerca de estos grupos de rendering en la próxima sección. No hay nada que te impida crear tus propias clases de grupos tampoco. Son solo código de python, asi que podés heredar de uno de estos y agregar/cambiar lo que quieras. En el futuro, espero que podamos agregar un par más de ``Groups`` a la lista. Un ``GroupMulti`` que es como el ``GroupSingle``, pero que puede contener hasta un número determinado de sprites (¿en algún tipo de búfer circular?). También un grupo súper renderizador que puede borrar la posición de los sprites sin necesitar una imagen de fondo para hacerlo (al tomar una copia de la pantalla antes de blittear). Quién sabe realmente, pero en el futuro podemos agregar más clases útiles a esta lista.h](hXfEsa es la lista de los diferentes grupos disponibles. Hablaremos más acerca de estos grupos de rendering en la próxima sección. No hay nada que te impida crear tus propias clases de grupos tampoco. Son solo código de python, asi que podés heredar de uno de estos y agregar/cambiar lo que quieras. En el futuro, espero que podamos agregar un par más de }hj; sbj")}(h ``Groups``h]hGroups}hjC sbah}(h]h]h]h]h!]uh%j!hj; ubh a la lista. Un }hj; sbj")}(h``GroupMulti``h]h GroupMulti}hjU sbah}(h]h]h]h]h!]uh%j!hj; ubh que es como el }hj; sbj")}(h``GroupSingle``h]h GroupSingle}hjg sbah}(h]h]h]h]h!]uh%j!hj; ubhX}, pero que puede contener hasta un número determinado de sprites (¿en algún tipo de búfer circular?). También un grupo súper renderizador que puede borrar la posición de los sprites sin necesitar una imagen de fondo para hacerlo (al tomar una copia de la pantalla antes de blittear). Quién sabe realmente, pero en el futuro podemos agregar más clases útiles a esta lista.}hj; sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubh)}(hNota de traducción: "rendering" se puede entender como el proceso de producir una imagen o animación a partir de datos digitales utilizando software de gráficos. La traducción puede ser "renderizado" o "procesamiento de imágenes".h]hNota de traducción: "rendering" se puede entender como el proceso de producir una imagen o animación a partir de datos digitales utilizando software de gráficos. La traducción puede ser "renderizado" o "procesamiento de imágenes".}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubeh}(h]los-muchos-tipos-de-gruposah]h]los muchos tipos de gruposah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hLos Grupos de Renderizadoh]hLos Grupos de Renderizado}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Mubh)}(hXKDe lo analizado anteriormente, podemos ver que hay tres grupos diferentes de renderizado. Con ``RenderUpdates`` podríamos salirnos con la nuestra, pero agrega una sobrecarga que no es realmente necesaria para algo como un juego de desplazamiento. Así que acá tenemos un par de herramientas, elegí la adecuada para cada trabajo.h](h^De lo analizado anteriormente, podemos ver que hay tres grupos diferentes de renderizado. Con }hj sbj")}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%j!hj ubh podríamos salirnos con la nuestra, pero agrega una sobrecarga que no es realmente necesaria para algo como un juego de desplazamiento. Así que acá tenemos un par de herramientas, elegí la adecuada para cada trabajo.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX?Para un juego del tipo de desplazamiento, donde el fondo cambia completamente en cada cuadro, obviamente necesitamos no necesitamos preocuparnos por los rectángulos de actualización de python en la llamada ``display.update()``. Definitvamente deberías ir con el grupo ``RenderPlain`` para administrar tu renderizado.h](hPara un juego del tipo de desplazamiento, donde el fondo cambia completamente en cada cuadro, obviamente necesitamos no necesitamos preocuparnos por los rectángulos de actualización de python en la llamada }hj sbj")}(h``display.update()``h]hdisplay.update()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh+. Definitvamente deberías ir con el grupo }hj sbj")}(h``RenderPlain``h]h RenderPlain}hj sbah}(h]h]h]h]h!]uh%j!hj ubh! para administrar tu renderizado.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M hj h&hubh)}(hXPara juegos donde el fondo es más estático, definitivamente no vas a querer que Pygame actualice la pantalla completa (ya que no es necesario). Este tipo de juegos generalmente implica borrar la posición anterior de cada objeto y luego dibujarlo en el lugar nuevo de cada cuadro. De esta manera solo estamos cambiando lo necesario. La mayoría de las veces solo querrás usar la clase ``RenderUpdates`` acá. Dado que también querrás pasar la lista de cambios a la función ``display.update()``.h](hXPara juegos donde el fondo es más estático, definitivamente no vas a querer que Pygame actualice la pantalla completa (ya que no es necesario). Este tipo de juegos generalmente implica borrar la posición anterior de cada objeto y luego dibujarlo en el lugar nuevo de cada cuadro. De esta manera solo estamos cambiando lo necesario. La mayoría de las veces solo querrás usar la clase }hj sbj")}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%j!hj ubhJ acá. Dado que también querrás pasar la lista de cambios a la función }hj sbj")}(h``display.update()``h]hdisplay.update()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX5La clase ``RenderUpdates`` también hace un buen trabajo al minimizar las áreas superpuestas en la lista de rectángulos actualizados. Si la posición anterior y la actual de un objeto se superponen, las fusionará en un solo rectángulo. Combinado con el hecho de que maneja los objetos eliminados, esta es una poderosa clase ``Group``. Si has escrito un juego que administra los rectángulos modificados para los objetos en el juego, sabés que ésta es la causa de la gran cantidad de código desordenado en el juego. Especialmente, una vez que empiezas a agregar objetos que puedan ser eliminados en cualquier momento. Todo este trabajo se reduce a los monstruosos métodos ``clear()`` y ``draw()``. Además, con la verificación de superposición, es probable que sea más rápido que cuando lo hacías manualmente.h](h La clase }hj* sbj")}(h``RenderUpdates``h]h RenderUpdates}hj2 sbah}(h]h]h]h]h!]uh%j!hj* ubhX. también hace un buen trabajo al minimizar las áreas superpuestas en la lista de rectángulos actualizados. Si la posición anterior y la actual de un objeto se superponen, las fusionará en un solo rectángulo. Combinado con el hecho de que maneja los objetos eliminados, esta es una poderosa clase }hj* sbj")}(h ``Group``h]hGroup}hjD sbah}(h]h]h]h]h!]uh%j!hj* ubhXV. Si has escrito un juego que administra los rectángulos modificados para los objetos en el juego, sabés que ésta es la causa de la gran cantidad de código desordenado en el juego. Especialmente, una vez que empiezas a agregar objetos que puedan ser eliminados en cualquier momento. Todo este trabajo se reduce a los monstruosos métodos }hj* sbj")}(h ``clear()``h]hclear()}hjV sbah}(h]h]h]h]h!]uh%j!hj* ubh y }hj* sbj")}(h ``draw()``h]hdraw()}hjh sbah}(h]h]h]h]h!]uh%j!hj* ubhv. Además, con la verificación de superposición, es probable que sea más rápido que cuando lo hacías manualmente.}hj* sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXuTambién hay que tener en cuenta que no hay nada que impida mezclar y combinar estos grupos de renderizado en tu juego. Definitivamente deberías usar múltiples grupos de renderizado cuando quieras hacer capas con tus sprites. Además, si la pantalla se divide en varias secciones, ¿quizás cada sección de la pantalla debería usar un grupo de representación adecuado?h]hXuTambién hay que tener en cuenta que no hay nada que impida mezclar y combinar estos grupos de renderizado en tu juego. Definitivamente deberías usar múltiples grupos de renderizado cuando quieras hacer capas con tus sprites. Además, si la pantalla se divide en varias secciones, ¿quizás cada sección de la pantalla debería usar un grupo de representación adecuado?}hj sbah}(h]h]h]h]h!]uh%hh'h(h)M%hj h&hubeh}(h]los-grupos-de-renderizadoah]h]los grupos de renderizadoah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hDetección de Colisionesh]hDetección de Colisiones}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)M-ubh)}(hXEl módulo de sprites también viene con dos funciones de detección de colisiones muy genéricas. Para juegos más complejos, estos realmente no funcionarán adecuadamente, pero fácilmente se puede obtener el código fuente y modificarlos según sea necesario.h]hXEl módulo de sprites también viene con dos funciones de detección de colisiones muy genéricas. Para juegos más complejos, estos realmente no funcionarán adecuadamente, pero fácilmente se puede obtener el código fuente y modificarlos según sea necesario.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)M/hj h&hubh)}(h1Acá hay un resumen de lo que son y lo que hacen.h]h1Acá hay un resumen de lo que son y lo que hacen.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)M4hj h&hubj%)}(hX :func:`spritecollide(sprite, group, dokill) -> list ` Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método ``kill()`` para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) Esto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo ``Explosion`` donde estaba la bomba. (Tengan en cuenta que la clase ``Explosion`` acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.) :func:`groupcollide(group1, group2, dokill1, dokill2) -> dictionary ` Esto es similar a la función ``spritecollide``, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento ``dokill`` para los sprites en cada lista. Cuando ``dokill1`` es verdadero, los sprites que colisionan en ``group1`` serán ``kill()`` (matados). Cuando ``dokill2`` es verdaero, vamos a tener el mismo resultado para el ``group2``. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de ``group1`` que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor. :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los ``values()`` o ``items()`` si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos ``values()`` estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens. h](h)}(hR:func:`spritecollide(sprite, group, dokill) -> list `h]jD)}(hj h]j")}(hj h]h,spritecollide(sprite, group, dokill) -> list}hj sbah}(h]h](jSpypy-funceh]h]h!]uh%j!hj ubah}(h]h]h]h]h!]refdocj` refdomainj reftypefunc refexplicitrefwarnjfNjgNjhpygame.sprite.spritecollideuh%jCh'h(h)M6hj ubah}(h]h]h]h]h!]uh%hh'h(h)M6hj ubj%)}(hXEsto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método ``kill()`` para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) Esto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo ``Explosion`` donde estaba la bomba. (Tengan en cuenta que la clase ``Explosion`` acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.) h](h)}(hX*Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método ``kill()`` para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle ::h](hX8Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método }hj sbj")}(h ``kill()``h]hkill()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M8hj ubh literal_block)}(hl>>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0)h]hl>>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0)}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)MAhj ubh)}(hXEsto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo ``Explosion`` donde estaba la bomba. (Tengan en cuenta que la clase ``Explosion`` acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.)h](hEsto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo }hj$ sbj")}(h ``Explosion``h]h Explosion}hj, sbah}(h]h]h]h]h!]uh%j!hj$ ubh7 donde estaba la bomba. (Tengan en cuenta que la clase }hj$ sbj")}(h ``Explosion``h]h Explosion}hj> sbah}(h]h]h]h]h!]uh%j!hj$ ubh acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.)}hj$ sbeh}(h]h]h]h]h!]uh%hh'h(h)MEhj ubeh}(h]h]h]h]h!]uh%j$h'h(h)M8hj ubh)}(ha:func:`groupcollide(group1, group2, dokill1, dokill2) -> dictionary `h]jD)}(hj^ h]j")}(hj^ h]h dictionary}hjc sbah}(h]h](jSpypy-funceh]h]h!]uh%j!hj` ubah}(h]h]h]h]h!]refdocj` refdomainjm reftypefunc refexplicitrefwarnjfNjgNjhpygame.sprite.groupcollideuh%jCh'h(h)MMhj\ ubah}(h]h]h]h]h!]uh%hh'h(h)MMhj ubj%)}(hXkEsto es similar a la función ``spritecollide``, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento ``dokill`` para los sprites en cada lista. Cuando ``dokill1`` es verdadero, los sprites que colisionan en ``group1`` serán ``kill()`` (matados). Cuando ``dokill2`` es verdaero, vamos a tener el mismo resultado para el ``group2``. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de ``group1`` que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor. :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los ``values()`` o ``items()`` si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos ``values()`` estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens. h](h)}(hXEsto es similar a la función ``spritecollide``, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento ``dokill`` para los sprites en cada lista. Cuando ``dokill1`` es verdadero, los sprites que colisionan en ``group1`` serán ``kill()`` (matados). Cuando ``dokill2`` es verdaero, vamos a tener el mismo resultado para el ``group2``. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de ``group1`` que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor. ::h](hEsto es similar a la función }hj sbj")}(h``spritecollide``h]h spritecollide}hj sbah}(h]h]h]h]h!]uh%j!hj ubh, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento K}hj sbj")}(h ``dokill``h]hdokill}hj sbah}(h]h]h]h]h!]uh%j!hj ubh( para los sprites en cada lista. Cuando }hj sbj")}(h ``dokill1``h]hdokill1}hj sbah}(h]h]h]h]h!]uh%j!hj ubh- es verdadero, los sprites que colisionan en }hj sbj")}(h ``group1``h]hgroup1}hj sbah}(h]h]h]h]h!]uh%j!hj ubh serán }hj sbj")}(h ``kill()``h]hkill()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh (matados). Cuando }hj sbj")}(h ``dokill2``h]hdokill2}hj sbah}(h]h]h]h]h!]uh%j!hj ubh7 es verdaero, vamos a tener el mismo resultado para el }hj sbj")}(h ``group2``h]hgroup2}hj sbah}(h]h]h]h]h!]uh%j!hj ubha. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de }hj sbj")}(h ``group1``h]hgroup1}hj sbah}(h]h]h]h]h!]uh%j!hj ubh que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)MOhj ubj )}(h>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1h]h>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1}hj' sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)MYhj ubh)}(hX:Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los ``values()`` o ``items()`` si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos ``values()`` estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens.h](hEste código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los }hj5 sbj")}(h ``values()``h]hvalues()}hj= sbah}(h]h]h]h]h!]uh%j!hj5 ubh o }hj5 sbj")}(h ``items()``h]hitems()}hjO sbah}(h]h]h]h]h!]uh%j!hj5 ubhm si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos }hj5 sbj")}(h ``values()``h]hvalues()}hja sbah}(h]h]h]h]h!]uh%j!hj5 ubh estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens.}hj5 sbeh}(h]h]h]h]h!]uh%hh'h(h)M^hj ubeh}(h]h]h]h]h!]uh%j$h'h(h)MOhj ubeh}(h]h]h]h]h!]uh%j$h'h(h)M6hj h&hubh)}(hXEstas son las funciones básicas de colisión que vienen con pygame. Debería ser fácil crear uno propio que quizás use algo diferente al atributo "rect". ¿O tal vez intentar ajustar un poco más tu código afectando directamente el objeto de colisión en lugar de construir una lista de colisiones? El código en las funciones de colisión de sprites está muy optimizado, pero podrías acelerarlo ligeramente eliminando algunas funcionalidaded que no necesitas.h]hXEstas son las funciones básicas de colisión que vienen con pygame. Debería ser fácil crear uno propio que quizás use algo diferente al atributo "rect". ¿O tal vez intentar ajustar un poco más tu código afectando directamente el objeto de colisión en lugar de construir una lista de colisiones? El código en las funciones de colisión de sprites está muy optimizado, pero podrías acelerarlo ligeramente eliminando algunas funcionalidaded que no necesitas.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mghj h&hubeh}(h]deteccion-de-colisionesah]h]detección de colisionesah]h!]uh%h9hhNh&hh'h(h)M-ubh:)}(hhh](h?)}(hProblemas Comunesh]hProblemas Comunes}hj sbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Mpubh)}(hXVActualmente hay un problema principal que atrapa a los nuevos usuarios. Cuando derivas tus nueva clase de sprites con la base de Sprite, TENÉS que llamar al método ``Sprite._init_()`` desde el método ``_init_()`` de tu propia clase. Si te olvidás de llamar al método ``Sprite.__init__()``, vas a obtener un error críptico, como este ::h](hActualmente hay un problema principal que atrapa a los nuevos usuarios. Cuando derivas tus nueva clase de sprites con la base de Sprite, TENÉS que llamar al método }hj sbj")}(h``Sprite._init_()``h]hSprite._init_()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh desde el método }hj sbj")}(h ``_init_()``h]h_init_()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh: de tu propia clase. Si te olvidás de llamar al método }hj sbj")}(h``Sprite.__init__()``h]hSprite.__init__()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh-, vas a obtener un error críptico, como este}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mrhj h&hubj )}(hAAttributeError: 'mysprite' instance has no attribute '_Sprite__g'h]hAAttributeError: 'mysprite' instance has no attribute '_Sprite__g'}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)Mxhj h&hubeh}(h]problemas-comunesah]h]problemas comunesah]h!]uh%h9hhNh&hh'h(h)Mpubh:)}(hhh](h?)}(h+Extendiendo tus Propias Clases *(Avanzado)*h](hExtendiendo tus Propias Clases }hj sbh emphasis)}(h *(Avanzado)*h]h (Avanzado)}hj sbah}(h]h]h]h]h!]uh%j hj ubeh}(h]h]h]h]h!]uh%h>hj h&hh'h(h)M|ubh)}(hXDebido a problemas de velocidad, las clases de ``Group`` actuales intentan solo hacer exactamente lo que necesitan, y no manejar muchas situaciones generales. Si decidís que necesitás funciones adicionales, es posible que desees crear tu propia clase ``Group``.h](h/Debido a problemas de velocidad, las clases de }hj' sbj")}(h ``Group``h]hGroup}hj/ sbah}(h]h]h]h]h!]uh%j!hj' ubh actuales intentan solo hacer exactamente lo que necesitan, y no manejar muchas situaciones generales. Si decidís que necesitás funciones adicionales, es posible que desees crear tu propia clase }hj' sbj")}(h ``Group``h]hGroup}hjA sbah}(h]h]h]h]h!]uh%j!hj' ubh.}hj' sbeh}(h]h]h]h]h!]uh%hh'h(h)M~hj h&hubh)}(hXoLas clases ``Sprite`` y ``Gorup`` fueron diseñadas para ser extendidas, así que sentite libre de crear tus propias clases ``Group`` para hacer cosas especializadas. El mejor lugar para empezar es probablemente el código fuente real de python para el módulo de sprite. Mirar el actual grupo ``Sprite`` debería ser ejemplo suficiente de cómo crear el tuyo propio.h](h Las clases }hjY sbj")}(h ``Sprite``h]hSprite}hja sbah}(h]h]h]h]h!]uh%j!hjY ubh y }hjY sbj")}(h ``Gorup``h]hGorup}hjs sbah}(h]h]h]h]h!]uh%j!hjY ubh[ fueron diseñadas para ser extendidas, así que sentite libre de crear tus propias clases }hjY sbj")}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%j!hjY ubh para hacer cosas especializadas. El mejor lugar para empezar es probablemente el código fuente real de python para el módulo de sprite. Mirar el actual grupo }hjY sbj")}(h ``Sprite``h]hSprite}hj sbah}(h]h]h]h]h!]uh%j!hjY ubh? debería ser ejemplo suficiente de cómo crear el tuyo propio.}hjY sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hXVPor ejemplo, aquí está el código fuente para un ``Group`` de renderización que llama a un método ``render()`` para cada sprite, en lugar de simplemente blittear una variable de "imagen" de él. Como queremos que también maneje áreas actualizadas, empezaremos con una copia del grupo ``RenderUpdates`` original, acá está el código ::h](h3Por ejemplo, aquí está el código fuente para un }hj sbj")}(h ``Group``h]hGroup}hj sbah}(h]h]h]h]h!]uh%j!hj ubh* de renderización que llama a un método }hj sbj")}(h ``render()``h]hrender()}hj sbah}(h]h]h]h]h!]uh%j!hj ubh para cada sprite, en lugar de simplemente blittear una variable de "imagen" de él. Como queremos que también maneje áreas actualizadas, empezaremos con una copia del grupo }hj sbj")}(h``RenderUpdates``h]h RenderUpdates}hj sbah}(h]h]h]h]h!]uh%j!hj ubh original, acá está el código}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubj )}(hXclass RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirtyh]hXclass RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty}hj sbah}(h]h]h]h]h!]h#h$uh%j h'h(h)Mhj h&hubh)}(hvA continuación hay más información acerca de cómo podés crear tus propios objetos ``Sprite`` y ``Group`` de cero.h](hWA continuación hay más información acerca de cómo podés crear tus propios objetos }hjsbj")}(h ``Sprite``h]hSprite}hj sbah}(h]h]h]h]h!]uh%j!hjubh y }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh de cero.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX<Los objetos ``Sprite`` solo "requieren" dos métodos: "add_internal()" y "remove_internal()". Estos son llamados por la clase ``Group`` cuando están eliminando un sprite de sí mismos. Los métodos ``add_internal()`` y ``remove_internal()`` tienen un único argumento que es un grupo. Tu ``Sprite`` necesitará alguna forma de realizar un seguimiento de los ``Groups`` a los que pertenece. Es probable que quieras intentar hacer coincidir los otros métodos y argumentos con la clase real de ``Sprites``, pero si no vas a usar esos métodos, seguro que no los necesitás.h](h Los objetos }hj3sbj")}(h ``Sprite``h]hSprite}hj;sbah}(h]h]h]h]h!]uh%j!hj3ubhh solo "requieren" dos métodos: "add_internal()" y "remove_internal()". Estos son llamados por la clase }hj3sbj")}(h ``Group``h]hGroup}hjMsbah}(h]h]h]h]h!]uh%j!hj3ubh@ cuando están eliminando un sprite de sí mismos. Los métodos }hj3sbj")}(h``add_internal()``h]hadd_internal()}hj_sbah}(h]h]h]h]h!]uh%j!hj3ubh y }hj3sbj")}(h``remove_internal()``h]hremove_internal()}hjqsbah}(h]h]h]h]h!]uh%j!hj3ubh0 tienen un único argumento que es un grupo. Tu }hj3sbj")}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%j!hj3ubh< necesitará alguna forma de realizar un seguimiento de los }hj3sbj")}(h ``Groups``h]hGroups}hjsbah}(h]h]h]h]h!]uh%j!hj3ubh| a los que pertenece. Es probable que quieras intentar hacer coincidir los otros métodos y argumentos con la clase real de }hj3sbj")}(h ``Sprites``h]hSprites}hjsbah}(h]h]h]h]h!]uh%j!hj3ubhD, pero si no vas a usar esos métodos, seguro que no los necesitás.}hj3sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX$Son casi los mismos requerimientos para crear tu propio ``Group``. De hecho, si observas la fuente, verás que el ``GroupSingle`` no está derivado de la clase ``Group``, simplemente implementa los mismos métodos, por lo que realmente no se puede notar la diferencia. De nuevo, necesitás un método "add_internal()" y "remove_internal()" para que los sprites llamen cuando quieren pertenecer o eliminarse a sí mismos del grupo. Tanto ``add_internal()`` como ``remove_internal()`` tienen un único argumento que es un sprite. El único requisito adicional para las clases ``Group`` es que tengan un atributo ficticio llamado "_spritegroup". No importa cuál sea el valor, en tanto el atributo esté presente. Las clases Sprite pueden buscar este atributo para determinar la diferencia entre un "grupo" y cualquier contenedor ordinario de python. (Esto es importante porque varios métodos de sprites pueden tomar un argumento de un solo grupo o una secuencia de grupos. Dado que ambos se ven similares, esta es la forma más flexible de "ver" la diferencia.)h](h8Son casi los mismos requerimientos para crear tu propio }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubh1. De hecho, si observas la fuente, verás que el }hjsbj")}(h``GroupSingle``h]h GroupSingle}hjsbah}(h]h]h]h]h!]uh%j!hjubh no está derivado de la clase }hjsbj")}(h ``Group``h]hGroup}hjsbah}(h]h]h]h]h!]uh%j!hjubhX , simplemente implementa los mismos métodos, por lo que realmente no se puede notar la diferencia. De nuevo, necesitás un método "add_internal()" y "remove_internal()" para que los sprites llamen cuando quieren pertenecer o eliminarse a sí mismos del grupo. Tanto }hjsbj")}(h``add_internal()``h]hadd_internal()}hjsbah}(h]h]h]h]h!]uh%j!hjubh como }hjsbj")}(h``remove_internal()``h]hremove_internal()}hjsbah}(h]h]h]h]h!]uh%j!hjubh\ tienen un único argumento que es un sprite. El único requisito adicional para las clases }hjsbj")}(h ``Group``h]hGroup}hj!sbah}(h]h]h]h]h!]uh%j!hjubhX es que tengan un atributo ficticio llamado "_spritegroup". No importa cuál sea el valor, en tanto el atributo esté presente. Las clases Sprite pueden buscar este atributo para determinar la diferencia entre un "grupo" y cualquier contenedor ordinario de python. (Esto es importante porque varios métodos de sprites pueden tomar un argumento de un solo grupo o una secuencia de grupos. Dado que ambos se ven similares, esta es la forma más flexible de "ver" la diferencia.)}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hDeberías pasar por el código para el módulo de sprite. Si bien el código está un poco "afinado", tiene suficientes comentarios para ayudarte a seguirlo. Hay incluso una sección de tareas para hacer en la fuente si tenés ganas de contribuir.h]hDeberías pasar por el código para el módulo de sprite. Si bien el código está un poco "afinado", tiene suficientes comentarios para ayudarte a seguirlo. Hay incluso una sección de tareas para hacer en la fuente si tenés ganas de contribuir.}hj9sbah}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]'extendiendo-tus-propias-clases-avanzadoah]h])extendiendo tus propias clases (avanzado)ah]h!]uh%h9hhNh&hh'h(h)M|ubeh}(h]!introduccion-al-modulo-de-spritesah]h]#introducción al módulo de spritesah]h!]uh%h9hh;h&hh'h(h)K ubeh}(h]6tutoriales-de-pygame-introduccion-al-modulo-de-spritesah]h]:tutoriales de pygame - introducción al módulo de spritesah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j\jYjTjQjjjyjvjjjjjjj j j j j j j j jLjIu nametypes}(j\jTjjyjjjj j j j jLuh}(jYh;jQhNjjjvjjj|jjjjj jj j j j j j jIj u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]!docs/es/tutorials/SpriteIntro.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.326132 pygame-2.6.1/docs/generated/es/doctrees/tutorials/SurfarrayIntro.doctree0000644000175100001770000025501414676242430026122 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(h-TUTORIAL:Introduction to the surfarray moduleh]h Text-TUTORIAL:Introduction to the surfarray module}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourceD/home/runner/work/pygame/pygame/docs/es/tutorials/SurfarrayIntro.rstlineKubh )}(hPygame specific reST elements.h]hPygame specific reST elements.}hh*sbah}(h]h]h]h]h!]h#h$uh%h hhh&hh'docs/reST/common.txth)Kubh section)}(hhh](h title)}(h0Tutoriales de Pygame - Introducción a Surfarrayh]h0Tutoriales de Pygame - Introducción a Surfarray}hh@sbah}(h]h]h]h]h!]uh%h>hh;h&hh'h(h)Kubh:)}(hhh](h?)}(hIntroducción a Surfarrayh]hIntroducción a Surfarray}hhQsbah}(h]h]h]h]h!]uh%h>hhNh&hh'h(h)K ubh field_list)}(hhh](h field)}(hhh](h field_name)}(hAutorh]hAutor}hhksbah}(h]h]h]h]h!]uh%hihhfh'h(h)Kubh field_body)}(h Pete Shinnersh]h paragraph)}(hh}h]h Pete Shinners}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khh{ubah}(h]h]h]h]h!]uh%hyhhfubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hContactoh]hContacto}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hpete@shinners.orgh]h)}(hhh]h reference)}(hhh]hpete@shinners.org}hhsbah}(h]h]h]h]h!]refurimailto:pete@shinners.orguh%hhhubah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubhe)}(hhh](hj)}(hTraducción al españolh]hTraducción al español}hhsbah}(h]h]h]h]h!]uh%hihhh'h(h)Kubhz)}(hEstefanía Pivaral Serrano h]h)}(hEstefanía Pivaral Serranoh]hEstefanía Pivaral Serrano}hhsbah}(h]h]h]h]h!]uh%hh'h(h)Khhubah}(h]h]h]h]h!]uh%hyhhubeh}(h]h]h]h]h!]uh%hdh'h(h)Khhah&hubeh}(h]h]docinfoah]h]h!]uh%h_hhNh&hh'h(h)Kubh:)}(hhh](h?)}(h Introducciónh]h Introducción}hjsbah}(h]h]h]h]h!]uh%h>hj h&hh'h(h)Kubh)}(hXEste tutorial intentará presentar tanto Numpy como el módulo de surfarray de pygame a los usuarios. Para principiantes, el código que utiliza surfarray puede ser bastante intimidante. Pero en realidad, hay sólo unos pocos conceptos que entender y estarás listo para empezar. Con el uso del módulo de surfarray es posible realizar operaciones a nivel de píxeles desde el código Python sencillo. El rendimiento puede llegar a ser bastante cercano al nivel de hacer el código en C.h]hXEste tutorial intentará presentar tanto Numpy como el módulo de surfarray de pygame a los usuarios. Para principiantes, el código que utiliza surfarray puede ser bastante intimidante. Pero en realidad, hay sólo unos pocos conceptos que entender y estarás listo para empezar. Con el uso del módulo de surfarray es posible realizar operaciones a nivel de píxeles desde el código Python sencillo. El rendimiento puede llegar a ser bastante cercano al nivel de hacer el código en C.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khj h&hubh)}(hPuede que solo desees ir directamente a la sección *"Examples"* para tener una idea de lo que es posible con este módulo, y luego comenzar desde el principio aquí para ir avanzando.h](h4Puede que solo desees ir directamente a la sección }hj*sbh emphasis)}(h *"Examples"*h]h "Examples"}hj4sbah}(h]h]h]h]h!]uh%j2hj*ubhx para tener una idea de lo que es posible con este módulo, y luego comenzar desde el principio aquí para ir avanzando.}hj*sbeh}(h]h]h]h]h!]uh%hh'h(h)K hj h&hubh)}(hXAhora bien, no voy a engañarte para que pienses que todo va a ser muy sencillo. Lograr efectos avanzados modificando los valores de píxeles puede ser complicado. Solo dominar NumPy requiere aprendizaje. En este tutorial me centraré en lo básico y utilizaré muchos ejemplos en un intento de sembrar las semillas de la sabiduría. Después de haber terminado el tutorial, deberías tener una comprensión básica de cómo funciona el surfarray.h]hXAhora bien, no voy a engañarte para que pienses que todo va a ser muy sencillo. Lograr efectos avanzados modificando los valores de píxeles puede ser complicado. Solo dominar NumPy requiere aprendizaje. En este tutorial me centraré en lo básico y utilizaré muchos ejemplos en un intento de sembrar las semillas de la sabiduría. Después de haber terminado el tutorial, deberías tener una comprensión básica de cómo funciona el surfarray.}hjLsbah}(h]h]h]h]h!]uh%hh'h(h)K$hj h&hubeh}(h] introduccionah]h] introducciónah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hNumPyh]hNumPy}hjesbah}(h]h]h]h]h!]uh%h>hjbh&hh'h(h)K-ubh)}(hXaSi no tenés instalado el paquete NumPy de python, necesitarás hacerlo. Podés descargar el paquete dede la página de descargas de NumPy en `NumPy Downloads Page `_ Para asegurarte que Numpy esté funcionando correctamente, deberías obtener algo como esto desde prompt (inteprete) interactivo de Python.::h](hSi no tenés instalado el paquete NumPy de python, necesitarás hacerlo. Podés descargar el paquete dede la página de descargas de NumPy en }hjssbh)}(hE`NumPy Downloads Page `_h]hNumPy Downloads Page}(hj{hNumPy Downloads Pageubah}(h]h]h]h]h!]nameNumPy Downloads Pagerefuri+http://www.scipy.org/scipylib/download.htmluh%hhjsubh target)}(h. h]h}(h]numpy-downloads-pageah]h]numpy downloads pageah]h!]refurijuh%j referencedKhjsubh Para asegurarte que Numpy esté funcionando correctamente, deberías obtener algo como esto desde prompt (inteprete) interactivo de Python.:}hjssbeh}(h]h]h]h]h!]uh%hh'h(h)K/hjbh&hubh literal_block)}(hXl>>> from numpy import * #importar numeric >>> a = array((1,2,3,4,5)) #crear un array >>> a #mostrar array array([1, 2, 3, 4, 5]) >>> a[2] #index al array 3 >>> a*2 #nuevo array con valores dobles array([ 2, 4, 6, 8, 10])h]hXl>>> from numpy import * #importar numeric >>> a = array((1,2,3,4,5)) #crear un array >>> a #mostrar array array([1, 2, 3, 4, 5]) >>> a[2] #index al array 3 >>> a*2 #nuevo array con valores dobles array([ 2, 4, 6, 8, 10])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K7hjbh&hubh)}(hXrComo se puede ver, el módulo NumPy nos proporciona un nuevo tipo de data, el *array*. Este objeto mantiene un array de tamaño fijo, y todos los valores que contiene en su interior son del mismo tipo. Los arrays (matrices) también pueden ser multidimensionales, que es como las usaremos con imágenes. Hay un poco más de información, pero es suficiente para empezar.h](hNComo se puede ver, el módulo NumPy nos proporciona un nuevo tipo de data, el }hjsbj3)}(h*array*h]harray}hjsbah}(h]h]h]h]h!]uh%j2hjubhX. Este objeto mantiene un array de tamaño fijo, y todos los valores que contiene en su interior son del mismo tipo. Los arrays (matrices) también pueden ser multidimensionales, que es como las usaremos con imágenes. Hay un poco más de información, pero es suficiente para empezar.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)K@hjbh&hubh)}(hXSi mirás al último comando de arriba, verás que las operaciones matemáticas en los array de NumPy se aplican para todos los valores del array. Esto se llama "element-wise operations" (operaciones elemento a elemento). Estos arrays también pueden dividirse en listas normales. La sintaxis de la división es la misma que se usa en objetos Python estándar. *(así que estudia si es necesario)*.h](hXiSi mirás al último comando de arriba, verás que las operaciones matemáticas en los array de NumPy se aplican para todos los valores del array. Esto se llama "element-wise operations" (operaciones elemento a elemento). Estos arrays también pueden dividirse en listas normales. La sintaxis de la división es la misma que se usa en objetos Python estándar. }hjsbj3)}(h$*(así que estudia si es necesario)*h]h"(así que estudia si es necesario)}hjsbah}(h]h]h]h]h!]uh%j2hjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)KFhjbh&hubh)}(h;Aquí hay algunos ejemplos más de arrays que funcionan. ::h]h8Aquí hay algunos ejemplos más de arrays que funcionan.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)KMhjbh&hubj)}(hX;>>> len(a) #obtener el tamaño del array 5 >>> a[2:] #elementos a partir del 2 array([3, 4, 5]) >>> a[:-2] #todos excepto los últimos 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #agregar el primero y último array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #agregar arrays de tamaños incorrectos Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,)h]hX;>>> len(a) #obtener el tamaño del array 5 >>> a[2:] #elementos a partir del 2 array([3, 4, 5]) >>> a[:-2] #todos excepto los últimos 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #agregar el primero y último array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #agregar arrays de tamaños incorrectos Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,)}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)KOhjbh&hubh)}(hXObtenemos un error con el último comando, porque intentamos sumar dos arrays que tienen tamaños diferentes. Para que dos arrays operen entre sí, incluyendo operaciones comparaciones y asignaciones, deben tener las mismas dismensiones. Es muy importante saber que los nuevos arrays creados a partir de cortar el original hacen referencia a los mismos valores. Por lo tanto, cambiar los valores en una porción de la división también cambia los valores originales. Es importante cómo se hace esto. ::h]hXObtenemos un error con el último comando, porque intentamos sumar dos arrays que tienen tamaños diferentes. Para que dos arrays operen entre sí, incluyendo operaciones comparaciones y asignaciones, deben tener las mismas dismensiones. Es muy importante saber que los nuevos arrays creados a partir de cortar el original hacen referencia a los mismos valores. Por lo tanto, cambiar los valores en una porción de la división también cambia los valores originales. Es importante cómo se hace esto.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)K\hjbh&hubj)}(hX@>>> a #mostrar nuestro array inicial array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #dividir al medio 2 elementos >>> aa #mostrar la división array([2, 3]) >>> aa[1] = 13 #cambiar el valor en la división >>> a #mostrar cambio en el original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #copiar el array >>> aaa #mostrar copia array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #configurar los valores medios a 0 >>> aaa #mostrar copia array([1, 0, 0, 0, 5]) >>> a #mostrar nuevamente el original array([ 1, 2, 13, 4, 5])h]hX@>>> a #mostrar nuestro array inicial array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #dividir al medio 2 elementos >>> aa #mostrar la división array([2, 3]) >>> aa[1] = 13 #cambiar el valor en la división >>> a #mostrar cambio en el original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #copiar el array >>> aaa #mostrar copia array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #configurar los valores medios a 0 >>> aaa #mostrar copia array([1, 0, 0, 0, 5]) >>> a #mostrar nuevamente el original array([ 1, 2, 13, 4, 5])}hj"sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Kdhjbh&hubh)}(hAhora vamos a ver pequeños arrays con dos dimensiones. No te preocupes demasiado, comenzar es lo mismo que tener una tupla de dos dimensiones *(una tupla dentro de otra tupla)*. Empecemos con los arrays de dos dimensiones. ::h](hAhora vamos a ver pequeños arrays con dos dimensiones. No te preocupes demasiado, comenzar es lo mismo que tener una tupla de dos dimensiones }hj0sbj3)}(h"*(una tupla dentro de otra tupla)*h]h (una tupla dentro de otra tupla)}hj8sbah}(h]h]h]h]h!]uh%j2hj0ubh.. Empecemos con los arrays de dos dimensiones.}hj0sbeh}(h]h]h]h]h!]uh%hh'h(h)Kuhjbh&hubj)}(hX>>> row1 = (1,2,3) #crear una tupla de valores >>> row2 = (3,4,5) #otra tupla >>> (row1,row2) #mostrar como una tupla de dos dimensiones ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #crear un array en 2D >>> b #mostrar el array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #mostrar el nuevo array en 2D array([[1, 2], [3, 4], [5, 6]])h]hX>>> row1 = (1,2,3) #crear una tupla de valores >>> row2 = (3,4,5) #otra tupla >>> (row1,row2) #mostrar como una tupla de dos dimensiones ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #crear un array en 2D >>> b #mostrar el array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #mostrar el nuevo array en 2D array([[1, 2], [3, 4], [5, 6]])}hjPsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)K{hjbh&hubh)}(hXAhora, con estos arrays bidimensionales *(de ahora en más "2D")* podemos indexar valores específicos y hacer cortes ambas dimensiones. Simplemente usando una coma para separar los índices, nos permite buscar/cortar en múltiple dimensiones. Simplemente usando "``:``" como un índex *(o no proporcionando suficiente índices)* nos devuelve todos los valores en esa dimensión. Veamos cómo funciona esto. ::h](h(Ahora, con estos arrays bidimensionales }hj^sbj3)}(h*(de ahora en más "2D")*h]h(de ahora en más "2D")}hjfsbah}(h]h]h]h]h!]uh%j2hj^ubh podemos indexar valores específicos y hacer cortes ambas dimensiones. Simplemente usando una coma para separar los índices, nos permite buscar/cortar en múltiple dimensiones. Simplemente usando "}hj^sbh literal)}(h``:``h]h:}hjzsbah}(h]h]h]h]h!]uh%jxhj^ubh" como un índex }hj^sbj3)}(h+*(o no proporcionando suficiente índices)*h]h)(o no proporcionando suficiente índices)}hjsbah}(h]h]h]h]h!]uh%j2hj^ubhN nos devuelve todos los valores en esa dimensión. Veamos cómo funciona esto.}hj^sbeh}(h]h]h]h]h!]uh%hh'h(h)Khjbh&hubj)}(hX1>>> b #mostrar nuestro array desde arriba array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #indexar un único valor 2 >>> b[1,:] #dividir la segunda fila array([3, 4, 5]) >>> b[1] #dividir la segunda fila (igual que arriba) array([3, 4, 5]) >>> b[:,2] #dividir la última columna array([3, 5]) >>> b[:,:2] #dividir en un array de 2x2 array([[1, 2], [3, 4]])h]hX1>>> b #mostrar nuestro array desde arriba array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #indexar un único valor 2 >>> b[1,:] #dividir la segunda fila array([3, 4, 5]) >>> b[1] #dividir la segunda fila (igual que arriba) array([3, 4, 5]) >>> b[:,2] #dividir la última columna array([3, 5]) >>> b[:,:2] #dividir en un array de 2x2 array([[1, 2], [3, 4]])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjbh&hubh)}(hX:De acuerdo, mantente conmigo acá, esto es lo más díficil que puede ponerse. Al usar NumPy hay una característica más para la división. La división de arrays también permite especificar un *incremento de divsión*. La sintaxis para una división con incremento es ``start_index : end_index : increment``. ::h](hDe acuerdo, mantente conmigo acá, esto es lo más díficil que puede ponerse. Al usar NumPy hay una característica más para la división. La división de arrays también permite especificar un }hjsbj3)}(h*incremento de divsión*h]hincremento de divsión}hjsbah}(h]h]h]h]h!]uh%j2hjubh3. La sintaxis para una división con incremento es }hjsbjy)}(h'``start_index : end_index : increment``h]h#start_index : end_index : increment}hjsbah}(h]h]h]h]h!]uh%jxhjubh.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjbh&hubj)}(hX>>> c = arange(10) #como el rango, pero crea un array >>> c #muestra el array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #divide valores impares desde el 1 al 6 array([1, 3, 5]) >>> c[4::4] #divide cada 4to valor, empezando por el 4 array([4, 8]) >>> c[8:1:-1] #divide 1 al 8, de atrás para adelante /// invertido array([8, 7, 6, 5, 4, 3, 2])h]hX>>> c = arange(10) #como el rango, pero crea un array >>> c #muestra el array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #divide valores impares desde el 1 al 6 array([1, 3, 5]) >>> c[4::4] #divide cada 4to valor, empezando por el 4 array([4, 8]) >>> c[8:1:-1] #divide 1 al 8, de atrás para adelante /// invertido array([8, 7, 6, 5, 4, 3, 2])}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjbh&hubh)}(hBien, eso es todo. Hay suficiente información acá para que puedas empezar a usar Numpy con el módulo surfarray. Ciertamente hay mucho más en NumPy, pero esto es solo una introducción. Además, ¿queremos pasar a cosas divertidas, no?h]hBien, eso es todo. Hay suficiente información acá para que puedas empezar a usar Numpy con el módulo surfarray. Ciertamente hay mucho más en NumPy, pero esto es solo una introducción. Además, ¿queremos pasar a cosas divertidas, no?}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjbh&hubeh}(h]numpyah]h]numpyah]h!]uh%h9hhNh&hh'h(h)K-ubh:)}(hhh](h?)}(hImportar Surfarrayh]hImportar Surfarray}hj sbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Kubh)}(hXPara usar el módulo surfarray necesitamos importarlo. Dado que ambos, tanto surfarray y NumPy, son componentes opcionales para pygame es bueno asegurarse de que se importen correctamente antes de usarlos. En estos ejemplos voy a importar NumPy en una variable llamada *N*. Esto permitirá saber qué funciones estoy usando son del paquete de NumPy. *(y es mucho más corto que escribir NumPy antes de cada función)* ::h](hX Para usar el módulo surfarray necesitamos importarlo. Dado que ambos, tanto surfarray y NumPy, son componentes opcionales para pygame es bueno asegurarse de que se importen correctamente antes de usarlos. En estos ejemplos voy a importar NumPy en una variable llamada }hjsbj3)}(h*N*h]hN}hj!sbah}(h]h]h]h]h!]uh%j2hjubhN. Esto permitirá saber qué funciones estoy usando son del paquete de NumPy. }hjsbj3)}(hC*(y es mucho más corto que escribir NumPy antes de cada función)*h]hA(y es mucho más corto que escribir NumPy antes de cada función)}hj3sbah}(h]h]h]h]h!]uh%j2hjubeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubj)}(hprobá: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required."h]hprobá: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required."}hjGsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)Khjh&hubeh}(h]importar-surfarrayah]h]importar surfarrayah]h!]uh%h9hhNh&hh'h(h)Kubh:)}(hhh](h?)}(hIntroducción a Surfarrayh]hIntroducción a Surfarray}hj`sbah}(h]h]h]h]h!]uh%h>hj]h&hh'h(h)Kubh)}(hXHay dos tipos principales de funciones en surfarray. Un conjunto de funciones para crear un array que es una copia de los datos de píxeles de la superficie (surface). Las otras funciones crean una copia referenciada de los datos de píxeles del array, de modo que los cambios en el array afectan directamente a la surface original. Hay otras funciones que permiten acceder a cualquier valor alfa por pixel, como arrays junto con algunas otras funciones útiles. Veremos estas otras funciones más adelante.h]hXHay dos tipos principales de funciones en surfarray. Un conjunto de funciones para crear un array que es una copia de los datos de píxeles de la superficie (surface). Las otras funciones crean una copia referenciada de los datos de píxeles del array, de modo que los cambios en el array afectan directamente a la surface original. Hay otras funciones que permiten acceder a cualquier valor alfa por pixel, como arrays junto con algunas otras funciones útiles. Veremos estas otras funciones más adelante.}hjnsbah}(h]h]h]h]h!]uh%hh'h(h)Khj]h&hubh)}(hXAl trabajar con estos arrays de surface, existen dos formas de representar los valores de píxeles. En primar lugar, pueden representarse como enteros mapeados. Este tipo de array es un array simple en 2D con un solo entero que representa el valor de color mapeado de la superficie. Este tipo de array es últil para mover partes de una imagen al rededor de la pantalla. El otro tipo de array utiliza tres valores RGB para representar el color de cada píxel. Este tipo de array hace que sea extremadamente sencillo realizar efectos que cambian el color de cada píxel. Este tipo de array es también un poco más complicado de manejar, ya que es esencialmente un array numérico 3D. Aún así, una vez que ajustas tu mente en el modo adecuado, no es mucho más difícil que usar un array 2D normal.h]hXAl trabajar con estos arrays de surface, existen dos formas de representar los valores de píxeles. En primar lugar, pueden representarse como enteros mapeados. Este tipo de array es un array simple en 2D con un solo entero que representa el valor de color mapeado de la superficie. Este tipo de array es últil para mover partes de una imagen al rededor de la pantalla. El otro tipo de array utiliza tres valores RGB para representar el color de cada píxel. Este tipo de array hace que sea extremadamente sencillo realizar efectos que cambian el color de cada píxel. Este tipo de array es también un poco más complicado de manejar, ya que es esencialmente un array numérico 3D. Aún así, una vez que ajustas tu mente en el modo adecuado, no es mucho más difícil que usar un array 2D normal.}hj|sbah}(h]h]h]h]h!]uh%hh'h(h)Khj]h&hubh)}(hXEl módulo NumPy utiliza los tipos de números naturales de la máquina para representar los valores de los datos, por lo que un array de NumPy puede consistir de enteros de 8-bits, 16-bits y 32-bits. *(los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros)*. Debido a esta limitación de tamaños de los enteros, debes tener un poco más de cuidado para asegurarte de que el tipo de arrays que hacen referencia a los datos de píxeles se pueda mapear correctamente con un tipo adecuado de datos. Las funciones que crean estos arrays a partir de las superficies son:h](hEl módulo NumPy utiliza los tipos de números naturales de la máquina para representar los valores de los datos, por lo que un array de NumPy puede consistir de enteros de 8-bits, 16-bits y 32-bits. }hjsbj3)}(h*(los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros)*h]h(los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros)}hjsbah}(h]h]h]h]h!]uh%j2hjubhX4. Debido a esta limitación de tamaños de los enteros, debes tener un poco más de cuidado para asegurarte de que el tipo de arrays que hacen referencia a los datos de píxeles se pueda mapear correctamente con un tipo adecuado de datos. Las funciones que crean estos arrays a partir de las superficies son:}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj]h&hubhindex)}(hhh]h}(h]h]h]h]h!]entries]uh%jhj]h&hh'h(h)Nubhdesc)}(hhh](hdesc_signature)}(hpixels2d(surface)h](h desc_addname)}(h surfarray.h]h surfarray.}hjsbah}(h]h]( sig-prename descclassnameeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubh desc_name)}(hpixels2dh]hpixels2d}hjsbah}(h]h](sig-namedescnameeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubhdesc_parameterlist)}(hsurfaceh]hdesc_parameter)}(hsurfaceh]h desc_sig_name)}(hsurfaceh]hsurface}hjsbah}(h]h]nah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$multi_line_parameter_listuh%jhjh&hh'h(h)Kubeh}(h]h](sig sig-objecteh]h]h!]module surfarrayclasshfullnamej _toc_partsjj _toc_name pixels2d()uh%jh'h(h)Khjh&hubh desc_content)}(hhh]h)}(hCrea una matriz 2D *(valores de píxeles enteros)* que hace referencia a los datos originales de la superficie. Esto funcionará para todos los formatos de surface excepto el de 24-bit.h](hCrea una matriz 2D }hj%sbj3)}(h*(valores de píxeles enteros)*h]h(valores de píxeles enteros)}hj-sbah}(h]h]h]h]h!]uh%j2hj%ubh que hace referencia a los datos originales de la superficie. Esto funcionará para todos los formatos de surface excepto el de 24-bit.}hj%sbeh}(h]h]h]h]h!]uh%hh'h(h)Khj"h&hubah}(h]h]h]h]h!]uh%j hjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]domainjNobjtypejOdesctypejOno-indexnoindexno-index-entry noindexentryno-contents-entrynocontentsentryno-typesettinguh%jh&hhj]h'h(h)Nubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhj]h&hh'h(h)Nubj)}(hhh](j)}(harray2d(surface)h](j)}(h surfarray.h]h surfarray.}hjosbah}(h]h](jjeh]h]h!]h#h$uh%jhjkh&hh'h(h)Kubj)}(harray2dh]harray2d}hj}sbah}(h]h](jjeh]h]h!]h#h$uh%jhjkh&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjkh&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjjjjj array2d()uh%jh'h(h)Khjhh&hubj!)}(hhh]h)}(hcCrea un array 2D *(valores de píxeles enteros)* que es copiada desde cualquier tipo de superficie.h](hCrea un array 2D }hjsbj3)}(h*(valores de píxeles enteros)*h]h(valores de píxeles enteros)}hjsbah}(h]h]h]h]h!]uh%j2hjubh3 que es copiada desde cualquier tipo de superficie.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%j hjhh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSjjTjjUjjVjWjXjYjZj[j\uh%jh&hhj]h'h(h)Nubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhj]h&hh'h(h)Nubj)}(hhh](j)}(hpixels3d(surface)h](j)}(h surfarray.h]h surfarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubj)}(hpixels3dh]hpixels3d}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhjh&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjjjjj pixels3d()uh%jh'h(h)Khjh&hubj!)}(hhh]h)}(hCrea un array 3D *(valores de píxeles RGB)* que hacen referencia a los datos originales de la superficie. Esto solo funcionará en superficies de 24-bit y 32-bit que tengan el formato RGB o BGR.h](hCrea un array 3D }hjAsbj3)}(h*(valores de píxeles RGB)*h]h(valores de píxeles RGB)}hjIsbah}(h]h]h]h]h!]uh%j2hjAubh que hacen referencia a los datos originales de la superficie. Esto solo funcionará en superficies de 24-bit y 32-bit que tengan el formato RGB o BGR.}hjAsbeh}(h]h]h]h]h!]uh%hh'h(h)Khj>h&hubah}(h]h]h]h]h!]uh%j hjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSjjjTjkjUjkjVjWjXjYjZj[j\uh%jh&hhj]h'h(h)Nubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhj]h&hh'h(h)Nubj)}(hhh](j)}(harray3d(surface)h](j)}(h surfarray.h]h surfarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj}h&hh'h(h)Kubj)}(harray3dh]harray3d}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhj}h&hh'h(h)Kubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubah}(h]h]h]h]h!]h#h$juh%jhj}h&hh'h(h)Kubeh}(h]h](jjeh]h]h!]jjjhjjjjjj array3d()uh%jh'h(h)Khjzh&hubj!)}(hhh]h)}(hZCrea un array 3D *(valores de píxeles RGB)* que se copia desde cualquier tipo de surface.h](hCrea un array 3D }hjsbj3)}(h*(valores de píxeles RGB)*h]h(valores de píxeles RGB)}hjsbah}(h]h]h]h]h!]uh%j2hjubh. que se copia desde cualquier tipo de surface.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Khjh&hubah}(h]h]h]h]h!]uh%j hjzh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSjjTjjUjjVjWjXjYjZj[j\uh%jh&hhj]h'h(h)Nubh)}(hAquí hay una pequeña tabla que podría ilustrar mejor qué tipos de funciones se deben usar en cada surface. Como se puede observar, ambas funciones de array funcionarán con cualquier tipo de surface.h]hAquí hay una pequeña tabla que podría ilustrar mejor qué tipos de funciones se deben usar en cada surface. Como se puede observar, ambas funciones de array funcionarán con cualquier tipo de surface.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Mhj]h&hubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h}(h]h]h]h]h!]colwidthKstubKuh%jhj ubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhj ubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhj ubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhj ubj)}(hhh]h}(h]h]h]h]h!]colwidthKuh%jhj ubh thead)}(hhh]h row)}(hhh](h entry)}(hhh]h}(h]h]h]h]h!]uh%jOhjLubjP)}(hhh]h)}(h32-bith]h32-bit}hj]sbah}(h]h]h]h]h!]uh%hh'h(h)KhjZubah}(h]h]h]h]h!]uh%jOhjLubjP)}(hhh]h)}(h24-bith]h24-bit}hjtsbah}(h]h]h]h]h!]uh%hh'h(h)Khjqubah}(h]h]h]h]h!]uh%jOhjLubjP)}(hhh]h)}(h16-bith]h16-bit}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jOhjLubjP)}(hhh]h)}(h 8-bit(c-map)h]h 8-bit(c-map)}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jOhjLubeh}(h]h]h]h]h!]uh%jJhjGubah}(h]h]h]h]h!]uh%jEhj ubh tbody)}(hhh](jK)}(hhh](jP)}(hhh]h)}(hpixel2dh]hpixel2d}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h)}(hyesh]hyes}hjsbah}(h]h]h]h]h!]uh%hh'h(h)Khjubah}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h)}(hyesh]hyes}hjsbah}(h]h]h]h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h!]uh%hh'h(h)Khj+ubah}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h)}(hyesh]hyes}hjEsbah}(h]h]h]h]h!]uh%hh'h(h)KhjBubah}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h)}(hyesh]hyes}hj\sbah}(h]h]h]h]h!]uh%hh'h(h)KhjYubah}(h]h]h]h]h!]uh%jOhjubjP)}(hhh]h)}(hyesh]hyes}hjssbah}(h]h]h]h]h!]uh%hh'h(h)Khjpubah}(h]h]h]h]h!]uh%jOhjubeh}(h]h]h]h]h!]uh%jJhjubeh}(h]h]h]h]h!]uh%jhj ubeh}(h]h]h]h]h!]colsKuh%j hjubah}(h]h](colwidths-givenmatrixeh]h]h!]uh%jhj]h&hh'h(h)Nubeh}(h]id1ah]h]h]introducción a surfarrayah!]uh%h9hhNh&hh'h(h)Kjubh:)}(hhh](h?)}(hEjemplosh]hEjemplos}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)Mubh)}(hXeCon esta información, estamos preparados para comenzar a probar cosas con los arrays de surface. A continuación encontrarán pequeñas demostraciones que crean un array de NumPy y los muestran en pygame. Estas diferentes pruebas se encuentran en el ejemplo arraydemo.py. Hay una función simple llamada *surfdemo_show* que muestra un array en la pantalla.h](hX1Con esta información, estamos preparados para comenzar a probar cosas con los arrays de surface. A continuación encontrarán pequeñas demostraciones que crean un array de NumPy y los muestran en pygame. Estas diferentes pruebas se encuentran en el ejemplo arraydemo.py. Hay una función simple llamada }hjsbj3)}(h*surfdemo_show*h]h surfdemo_show}hjsbah}(h]h]h]h]h!]uh%j2hjubh% que muestra un array en la pantalla.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjh&hubh container)}(hX.. container:: example .. image:: ../../reST/tut/surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Nuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función ``zeros``. Aquí creamos un array 2D de todos ceros y lo mostramos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Aquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface :meth:`mapped ` (raw). Usaremos esta imagen en el resto de los ejemplos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Aquí volteamos la imagen verticalmente. Todo lo que necesitamos para esto es tomar el array de la imagen original y cortarlo usando un incremento negativo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Basado en el último ejemplo, reducir una imagen escalar es bastante lógico. Simplemente cortamos todos los píxeles usando un incremento de 2 vertical y horizontalmente. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Aumentar la escala de la imagen requiere un poco más de trabajo, pero es similar al escalado previo hacia abajo, lo hacemos todo con cortes. Primero, creamos un array que tiene el doble del tamaño de nuestro original. Primero copiamos el array original en cada otro píxel del nuevo array. Luego lo hacemos de nuevo para cada otro píxel, haciendo las columnas impares. En este punto, tenemos la imagen escalada correctamente en sentido horizontal, pero las otras filas son negras, por lo que simplemente debemos copiar cada fila a la que está debajo. Entonces tenemos una imagen duplicada en tamaño. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Ahora estamos usando arrays 3D para cambiar los colores. Acá establecemos todos los valores en verde y azul en cero. Esto nos deja solo con el canal rojo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Aquí realizamos un filtro de convulción 3x3 que suavizará nuestra imagen. Parece que hay muchos pasos aquí, pero lo que estamos haciendo es desplazar la imagen 1 píxel en cada dirección y sumarlos todos juntos (con algunas multiplicaciones por ponderación). Luego se promedian todos los valores. No es Gaussiano, pero es rápido. Un punto con los arrays NumPy, la precisión de las operaciones aritméticas está determinada por el array con el tipo de datos más grande. Entonces, si el factor no se declarara como un array de 1 elemento de tipo numpy.int32, las multiplicaciones se realizarían utilizando numpy.int8, el entero de 8 bits de cada elemento rgbarray. Esto causará una truncación de valores. El array de suavizado también debe declararse con un tamaño de entero más grande que rgbarray para evitar la truncación. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Por último, estamos realizando una transición gradual entre la imagen original y una imagen de color azul sólido. No es emocionante, pero la imagen de destino podría ser cualquier cosa, y cambiar el multiplicador 0.50 permitirá elegir cualquier paso en una transición lineal entre dos imágenes. .. container:: break ..h](j)}(hX.. image:: ../../reST/tut/surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Nuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función ``zeros``. Aquí creamos un array 2D de todos ceros y lo mostramos. .. container:: break ..h](h image)}(hC.. image:: ../../reST/tut/surfarray_allblack.png :alt: allblack h]h}(h]h]h]h]h!]altallblackuri"../reST/tut/surfarray_allblack.png candidates}*js original_uri%../../reST/tut/surfarray_allblack.pnguh%jh'h(h)Mhjubj)}(hBallblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack')h]hBallblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack')}hjsbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M"hjubh)}(hNuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función ``zeros``. Aquí creamos un array 2D de todos ceros y lo mostramos.h](hNuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función }hj sbjy)}(h ``zeros``h]hzeros}hj sbah}(h]h]h]h]h!]uh%jxhj ubh:. Aquí creamos un array 2D de todos ceros y lo mostramos.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)M%hjubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hj( ubah}(h]h]breakah]h]h!]uh%jhjubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hX:.. image:: ../../reST/tut/surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Aquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado. .. container:: break ..h](j)}(hA.. image:: ../../reST/tut/surfarray_striped.png :alt: striped h]h}(h]h]h]h]h!]altstripeduri!../reST/tut/surfarray_striped.pngj}jjT sj$../../reST/tut/surfarray_striped.pnguh%jh'h(h)M0hjC ubj)}(hzstriped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped')h]hzstriped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped')}hjW sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)M5hjC ubh)}(hXSAquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado.h]hXSAquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado.}hje sbah}(h]h]h]h]h!]uh%hh'h(h)M:hjC ubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hjs ubah}(h]h]breakah]h]h!]uh%jhjC ubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hX .. image:: ../../reST/tut/surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface :meth:`mapped ` (raw). Usaremos esta imagen en el resto de los ejemplos. .. container:: break ..h](j)}(hC.. image:: ../../reST/tut/surfarray_rgbarray.png :alt: rgbarray h]h}(h]h]h]h]h!]altrgbarrayuri"../reST/tut/surfarray_rgbarray.pngj}jj sj%../../reST/tut/surfarray_rgbarray.pnguh%jh'h(h)MFhj ubj)}(h|imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray')h]h|imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray')}hj sbah}(h]h]h]h]h!]h#h$uh%jh'h(h)MKhj ubh)}(hX"Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface :meth:`mapped ` (raw). Usaremos esta imagen en el resto de los ejemplos.h](hXAquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface }hj sbh pending_xref)}(h':meth:`mapped `h]jy)}(hj h]hmapped}hj sbah}(h]h](xrefpypy-metheh]h]h!]uh%jxhj ubah}(h]h]h]h]h!]refdoctutorials/SurfarrayIntro refdomainj reftypemeth refexplicitrefwarn py:modulejpy:classN reftargetpygame.Surface.map_rgbuh%j h'h(h)MOhj ubh9 (raw). Usaremos esta imagen en el resto de los ejemplos.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)MOhj ubj)}(h..h]h )}(hhh]h}(h]h]h]h]h!]h#h$uh%h hj ubah}(h]h]breakah]h]h!]uh%jhj ubeh}(h]h]exampleah]h]h!]uh%jhjubj)}(hXA.. image:: ../../reST/tut/surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Aquí volteamos la imagen verticalmente. Todo lo que necesitamos para esto es tomar el array de la imagen original y cortarlo usando un incremento negativo. .. container:: break ..h](j)}(hA.. image:: ../../reST/tut/surfarray_flipped.png :alt: flipped h]h}(h]h]h]h]h!]altflippeduri!../reST/tut/surfarray_flipped.pngj}jj sj$../../reST/tut/surfarray_flipped.pnguh%jh'h(h)M^hj ubj)}(hhj h&hh'h(h)Mubh)}(hXAl igual que el resto de pygame, surfarray bloqueará cualquier Surface que necesite para acceder a los datos de píxeles. Sin embargo, hay un elemento más a tener en cuenta; al crear los array de *pixeles*, la surface original quedará bloqueada durante la vida útil de ese array de píxeles. Es importante recordarlo. Asegurate de *"eliminar"* el array de píxeles o de dejarlo fuera del alcance *(es decir, cuando la funcion vuelve, etc.)*.h](hAl igual que el resto de pygame, surfarray bloqueará cualquier Surface que necesite para acceder a los datos de píxeles. Sin embargo, hay un elemento más a tener en cuenta; al crear los array de }hj sbj3)}(h *pixeles*h]hpixeles}hj sbah}(h]h]h]h]h!]uh%j2hj ubh, la surface original quedará bloqueada durante la vida útil de ese array de píxeles. Es importante recordarlo. Asegurate de }hj sbj3)}(h *"eliminar"*h]h "eliminar"}hj sbah}(h]h]h]h]h!]uh%j2hj ubh5 el array de píxeles o de dejarlo fuera del alcance }hj sbj3)}(h,*(es decir, cuando la funcion vuelve, etc.)*h]h*(es decir, cuando la funcion vuelve, etc.)}hj sbah}(h]h]h]h]h!]uh%j2hj ubh.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubh)}(hX;También hay que tener en cuenta que realmente no querés hacer muchos *(si es que alguno)* accesos directos a píxeles en la surface del hardware *(HWSURFACE)*. Esto se debe a que los datos de la surface se encuentra en la tarjeta gráfica, y transferir cambios de píxeles a través del bus PCI/AGP no es rápido.h](hGTambién hay que tener en cuenta que realmente no querés hacer muchos }hj8 sbj3)}(h*(si es que alguno)*h]h(si es que alguno)}hj@ sbah}(h]h]h]h]h!]uh%j2hj8 ubh8 accesos directos a píxeles en la surface del hardware }hj8 sbj3)}(h *(HWSURFACE)*h]h (HWSURFACE)}hjR sbah}(h]h]h]h]h!]uh%j2hj8 ubh. Esto se debe a que los datos de la surface se encuentra en la tarjeta gráfica, y transferir cambios de píxeles a través del bus PCI/AGP no es rápido.}hj8 sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubeh}(h]bloqueo-de-superficie-surfaceah]h]bloqueo de superficie (surface)ah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(h Transparenciah]h Transparencia}hju sbah}(h]h]h]h]h!]uh%h>hjr h&hh'h(h)Mubh)}(hXEl módulo surfarray tiene varios métodos para acceder a los valores alpha/colorclave de una Surface. Ninguna de las funciones alpha se ve afectada por la transparencia general de una Surface, solo por los vaores de los píxeles. Aquí está la lista de esas funciones.h]hXEl módulo surfarray tiene varios métodos para acceder a los valores alpha/colorclave de una Surface. Ninguna de las funciones alpha se ve afectada por la transparencia general de una Surface, solo por los vaores de los píxeles. Aquí está la lista de esas funciones.}hj sbah}(h]h]h]h]h!]uh%hh'h(h)Mhjr h&hubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhjr h&hh'h(h)Nubj)}(hhh](j)}(hpixels_alpha(surface)h](j)}(h surfarray.h]h surfarray.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h(h)M ubj)}(h pixels_alphah]h pixels_alpha}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h(h)M ubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hj sbah}(h]h]jah]h]h!]uh%jhj ubah}(h]h]h]h]h!]h#h$uh%jhj ubah}(h]h]h]h]h!]h#h$juh%jhj h&hh'h(h)M ubeh}(h]h](jjeh]h]h!]jjjhjj jjj jpixels_alpha()uh%jh'h(h)M hj h&hubj!)}(hhh]h)}(hCrea un array 2D *(valores enteros de píxeles)* que hace referencia a los datos alpha de la surface original. Esto solo funcionará en imágenes de 32-bit con un componente alfa de 8-bit.h](hCrea un array 2D }hj sbj3)}(h*(valores enteros de píxeles)*h]h(valores enteros de píxeles)}hj sbah}(h]h]h]h]h!]uh%j2hj ubh que hace referencia a los datos alpha de la surface original. Esto solo funcionará en imágenes de 32-bit con un componente alfa de 8-bit.}hj sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubah}(h]h]h]h]h!]uh%j hj h&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSj jTj jUj jVjWjXjYjZj[j\uh%jh&hhjr h'h(h)Nubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhjr h&hh'h(h)Nubj)}(hhh](j)}(harray_alpha(surface)h](j)}(h surfarray.h]h surfarray.}hj, sbah}(h]h](jjeh]h]h!]h#h$uh%jhj( h&hh'h(h)Mubj)}(h array_alphah]h array_alpha}hj: sbah}(h]h](jjeh]h]h!]h#h$uh%jhj( h&hh'h(h)Mubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjP sbah}(h]h]jah]h]h!]uh%jhjL ubah}(h]h]h]h]h!]h#h$uh%jhjH ubah}(h]h]h]h]h!]h#h$juh%jhj( h&hh'h(h)Mubeh}(h]h](jjeh]h]h!]jjjhjj< jjj< j array_alpha()uh%jh'h(h)Mhj% h&hubj!)}(hhh]h)}(hCrea un array 2D *(valores enteros de píxeles)* que se copia desde cualquier tipo de surface. Si la surface no tiene valores alfa, el array tendrá valores completamten opacos *(255)*.h](hCrea un array 2D }hju sbj3)}(h*(valores enteros de píxeles)*h]h(valores enteros de píxeles)}hj} sbah}(h]h]h]h]h!]uh%j2hju ubh que se copia desde cualquier tipo de surface. Si la surface no tiene valores alfa, el array tendrá valores completamten opacos }hju sbj3)}(h*(255)*h]h(255)}hj sbah}(h]h]h]h]h!]uh%j2hju ubh.}hju sbeh}(h]h]h]h]h!]uh%hh'h(h)Mhjr h&hubah}(h]h]h]h]h!]uh%j hj% h&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSj jTj jUj jVjWjXjYjZj[j\uh%jh&hhjr h'h(h)Nubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhjr h&hh'h(h)Nubj)}(hhh](j)}(harray_colorkey(surface)h](j)}(h surfarray.h]h surfarray.}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h(h)Mubj)}(harray_colorkeyh]harray_colorkey}hj sbah}(h]h](jjeh]h]h!]h#h$uh%jhj h&hh'h(h)Mubj)}(hsurfaceh]j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hj sbah}(h]h]jah]h]h!]uh%jhj ubah}(h]h]h]h]h!]h#h$uh%jhj ubah}(h]h]h]h]h!]h#h$juh%jhj h&hh'h(h)Mubeh}(h]h](jjeh]h]h!]jjjhjj jjj jarray_colorkey()uh%jh'h(h)Mhj h&hubj!)}(hhh]h)}(hCrea un array 2D *(valores enteros de píxeles)* que está establecida como transparente *(0)* donde el color de ese píxel coincide con el color clave de la Surface.h](hCrea un array 2D }hjsbj3)}(h*(valores enteros de píxeles)*h]h(valores enteros de píxeles)}hjsbah}(h]h]h]h]h!]uh%j2hjubh) que está establecida como transparente }hjsbj3)}(h*(0)*h]h(0)}hj*sbah}(h]h]h]h]h!]uh%j2hjubhH donde el color de ese píxel coincide con el color clave de la Surface.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)Mhj h&hubah}(h]h]h]h]h!]uh%j hj h&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSjKjTjLjUjLjVjWjXjYjZj[j\uh%jh&hhjr h'h(h)Nubeh}(h] transparenciaah]h] transparenciaah]h!]uh%h9hhNh&hh'h(h)Mubh:)}(hhh](h?)}(hOtras Funciones de Surfarrayh]hOtras Funciones de Surfarray}hj[sbah}(h]h]h]h]h!]uh%h>hjXh&hh'h(h)M$ubh)}(hSolo hay algunas otras funciones disponibles en surfarray. Podés obtener una lista mejor con mayor documentación en :mod:`surfarray reference page `. Sin embargo, hay una función muy útil.h](hvSolo hay algunas otras funciones disponibles en surfarray. Podés obtener una lista mejor con mayor documentación en }hjisbj )}(h2:mod:`surfarray reference page `h]jy)}(hjsh]hsurfarray reference page}hjusbah}(h]h](j pypy-modeh]h]h!]uh%jxhjqubah}(h]h]h]h]h!]refdocj refdomainjreftypemod refexplicitrefwarnj jj Nj pygame.surfarrayuh%j h'h(h)M&hjiubh*. Sin embargo, hay una función muy útil.}hjisbeh}(h]h]h]h]h!]uh%hh'h(h)M&hjXh&hubj)}(hhh]h}(h]h]h]h]h!]entries]uh%jhjXh&hh'h(h)Nubj)}(hhh](j)}(h$surfarray.blit_array(surface, array)h](j)}(h surfarray.h]h surfarray.}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)M*ubj)}(h blit_arrayh]h blit_array}hjsbah}(h]h](jjeh]h]h!]h#h$uh%jhjh&hh'h(h)M*ubj)}(hsurface, arrayh](j)}(hsurfaceh]j)}(hsurfaceh]hsurface}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubj)}(harrayh]j)}(harrayh]harray}hjsbah}(h]h]jah]h]h!]uh%jhjubah}(h]h]h]h]h!]h#h$uh%jhjubeh}(h]h]h]h]h!]h#h$juh%jhjh&hh'h(h)M*ubeh}(h]h](jjeh]h]h!]jjj surfarrayjsurfarray.blit_arrayjj surfarray blit_arrayjsurfarray.blit_array()uh%jh'h(h)M*hjh&hubj!)}(hhh]h)}(hXAEsto transferirá cualquier tipo de array de surface 2D o 3D a una Surface con las mismas dimensiones. Este blit de surfarray generalmente será más rápido que asignar un array a la de pixeles referenciado. Sin embargo, no debería ser tan rápido como el blitting normal de surface, ya que esos están muy optimizados.h]hXAEsto transferirá cualquier tipo de array de surface 2D o 3D a una Surface con las mismas dimensiones. Este blit de surfarray generalmente será más rápido que asignar un array a la de pixeles referenciado. Sin embargo, no debería ser tan rápido como el blitting normal de surface, ya que esos están muy optimizados.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M-hjh&hubah}(h]h]h]h]h!]uh%j hjh&hh'h(h)Nubeh}(h]h](pyfunctioneh]h]h!]jSj)jTj*jUj*jVjWjXjYjZj[j\uh%jh&hhjXh'h(h)Nubeh}(h]otras-funciones-de-surfarrayah]h]otras funciones de surfarrayah]h!]uh%h9hhNh&hh'h(h)M$ubh:)}(hhh](h?)}(hNumPy más Avanzadoh]hNumPy más Avanzado}hj9sbah}(h]h]h]h]h!]uh%h>hj6h&hh'h(h)M6ubh)}(hXHay un par más de cosas que deberías saber sobre los arrays Numpy. Cuando se trata de arrays muy grandes, como los que son de 640x480, hay algunas cosas adicionales sobre las que debes tener cuidado. Principalmente, mientras que usar los operadores como + y * en los arrays los hace fáciles de usar, también es muy costoso en arrays grandes. Estos operadores deben hacer nuevas copias temporales del array, que luego generalmente se copian en otro array. Esto puede requerir mucho tiempo. Afortunadamente, todos los operadores de Numpy vienen con funciones especiales que pueden realizar la operación *"in place*" (en su lugar). Por ejemplo, en lugar de usar ``screen[:] = screen + brightmap`` podrías querer usar ``add(screen, brightmap, screen)`` que es más rápido. De todos modos, debes leer la documentación UFunc de Numpy para obtener más información sobre esto. Es importante cuando se trata de los arrays.h](hX^Hay un par más de cosas que deberías saber sobre los arrays Numpy. Cuando se trata de arrays muy grandes, como los que son de 640x480, hay algunas cosas adicionales sobre las que debes tener cuidado. Principalmente, mientras que usar los operadores como + y * en los arrays los hace fáciles de usar, también es muy costoso en arrays grandes. Estos operadores deben hacer nuevas copias temporales del array, que luego generalmente se copian en otro array. Esto puede requerir mucho tiempo. Afortunadamente, todos los operadores de Numpy vienen con funciones especiales que pueden realizar la operación }hjGsbj3)}(h *"in place*h]h "in place}hjOsbah}(h]h]h]h]h!]uh%j2hjGubh/" (en su lugar). Por ejemplo, en lugar de usar }hjGsbjy)}(h"``screen[:] = screen + brightmap``h]hscreen[:] = screen + brightmap}hjasbah}(h]h]h]h]h!]uh%jxhjGubh podrías querer usar }hjGsbjy)}(h"``add(screen, brightmap, screen)``h]hadd(screen, brightmap, screen)}hjssbah}(h]h]h]h]h!]uh%jxhjGubh que es más rápido. De todos modos, debes leer la documentación UFunc de Numpy para obtener más información sobre esto. Es importante cuando se trata de los arrays.}hjGsbeh}(h]h]h]h]h!]uh%hh'h(h)M7hj6h&hubh)}(hXOtra cosa a tener en cuenta al trabajar con arrays NumPy es el tipo de datos del array. Algunos de los arrays (especialmente el tipo de píxeles mapeado) a menudo devuelven arrays con un valor sin signo en 8-bits. Estos arrays se desbordarán fácilmente si no tienes cuidado. NumPy usará la misma coerción que se encuentra en los programas en C, por lo que mezclar una operación con números de 8 bits y 32 bits dará como resultado números de 32 bits. Puedes convertir el tipo de datos del array, pero definitivamente debes ser consciente de qué tipos de arrays tienes, si NumPy se encuentra en una situación en la que se arruinaría la precisión, lanzará una excepción.h]hXOtra cosa a tener en cuenta al trabajar con arrays NumPy es el tipo de datos del array. Algunos de los arrays (especialmente el tipo de píxeles mapeado) a menudo devuelven arrays con un valor sin signo en 8-bits. Estos arrays se desbordarán fácilmente si no tienes cuidado. NumPy usará la misma coerción que se encuentra en los programas en C, por lo que mezclar una operación con números de 8 bits y 32 bits dará como resultado números de 32 bits. Puedes convertir el tipo de datos del array, pero definitivamente debes ser consciente de qué tipos de arrays tienes, si NumPy se encuentra en una situación en la que se arruinaría la precisión, lanzará una excepción.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MDhj6h&hubh)}(hPor último, debes tenér en cuenta que al asignar valores en los arrays 3D, estos deben estar entre 0 y 255, de lo contrario se producirá alguna truncación indefinida.h]hPor último, debes tenér en cuenta que al asignar valores en los arrays 3D, estos deben estar entre 0 y 255, de lo contrario se producirá alguna truncación indefinida.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)MNhj6h&hubeh}(h]numpy-mas-avanzadoah]h]numpy más avanzadoah]h!]uh%h9hhNh&hh'h(h)M6ubh:)}(hhh](h?)}(h Graduaciónh]h Graduación}hjsbah}(h]h]h]h]h!]uh%h>hjh&hh'h(h)MTubh)}(hXtBueno, ahí está. Mi breve introducción a NumPy y surfarray. Espero que ahora veas lo que es posible, y aunque nunca los uses por ti mismo, no tengas miedo cuando veas código que los use. Echale un vistazo al ejemplo vgrade para ver más sobre los arrays numéricos. También, hay algunos demos *"flame"* que usan surfarray para crear un efectp de fuego en tiempo real.h](hX*Bueno, ahí está. Mi breve introducción a NumPy y surfarray. Espero que ahora veas lo que es posible, y aunque nunca los uses por ti mismo, no tengas miedo cuando veas código que los use. Echale un vistazo al ejemplo vgrade para ver más sobre los arrays numéricos. También, hay algunos demos }hjsbj3)}(h *"flame"*h]h"flame"}hjsbah}(h]h]h]h]h!]uh%j2hjubhA que usan surfarray para crear un efectp de fuego en tiempo real.}hjsbeh}(h]h]h]h]h!]uh%hh'h(h)MVhjh&hubh)}(hLo mejor que podés hacer es probar alguna cosas por tu cuenta. Ve despacio al principio y ve construyendo poco a poco, ya he visto algunas cosas geniales con surfarray, como gradientes radiales y más. Buena suerte.h]hLo mejor que podés hacer es probar alguna cosas por tu cuenta. Ve despacio al principio y ve construyendo poco a poco, ya he visto algunas cosas geniales con surfarray, como gradientes radiales y más. Buena suerte.}hjsbah}(h]h]h]h]h!]uh%hh'h(h)M]hjh&hubeh}(h] graduacionah]h] graduaciónah]h!]uh%h9hhNh&hh'h(h)MTubeh}(h]introduccion-a-surfarrayah]h]h]jah!]uh%h9hh;h&hh'h(h)K jubeh}(h]-tutoriales-de-pygame-introduccion-a-surfarrayah]h]0tutoriales de pygame - introducción a surfarrayah]h!]uh%h9hhh&hh'h(h)Kubeh}(h]h]h]h]h!]sourceh(translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh>N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksjOfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj.error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh( _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjintroducción a surfarrayNj_j\jjjjjZjWj j jo jl jUjRj3j0jjjju nametypes}(jjqj_jjjZj jo jUj3jjuh}(jh;jhNj\j jjbjjjWjjj]j jjl j jRjr j0jXjj6jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j<KsRparse_messages]h system_message)}(hhh]h)}(h self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" # Initialize Everything pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) # Create The Background background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) # Put Text On The Background, Centered if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) # Display The Background screen.blit(background, (0, 0)) pg.display.flip() # Prepare Game Objects whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() # Main Loop going = True while going: clock.tick(60) # Handle Input Events for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() allsprites.update() # Draw Everything screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() pg.quit() # Game Over # this calls the 'main' function when this script is executed if __name__ == "__main__": main() h]hX#!/usr/bin/env python """ pygame.examples.chimp This simple example is used for the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. """ # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") # functions to create our resources def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) image = image.convert() size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound # classes for our game objects class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" # Initialize Everything pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) # Create The Background background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) # Put Text On The Background, Centered if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) # Display The Background screen.blit(background, (0, 0)) pg.display.flip() # Prepare Game Objects whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() # Main Loop going = True while going: clock.tick(60) # Handle Input Events for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() allsprites.update() # Draw Everything screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() pg.quit() # Game Over # this calls the 'main' function when this script is executed if __name__ == "__main__": main() }hhBsbah}(h]h]h]h]h!]source1/home/runner/work/pygame/pygame/examples/chimp.pyh#h$forcelanguagepythonhighlight_args} linenostartKsuh%h@h'h?h)Khh,h&hubeh}(h]pygame-examples-chimp-pyah]h]pygame/examples/chimp.pyah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerherror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}h]hZs nametypes}h]sh}hZh,s footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]h system_message)}(hhh](h paragraph)}(hnProblems with "include" directive path: InputError: [Errno 2] No such file or directory: '../reST/common.txt'.h]hnProblems with "include" directive path: InputError: [Errno 2] No such file or directory: '../reST/common.txt'.}hhsbah}(h]h]h]h]h!]uh%hhhubhA)}(h).. include:: ../../../../reST/common.txt h]h).. include:: ../../../../reST/common.txt }hjsbah}(h]h]h]h]h!]h#h$uh%h@hhh'h(ubeh}(h]h]h]h]h!]levelKtypeSEVERElineKsourceh(uh%hhhh&hh'h(h)Kubatransform_messages] transformerN include_log]"docs/es/tutorials/chimpance.py.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.3451319 pygame-2.6.1/docs/generated/es/doctrees/tutorials/tom_juegos2.doctree0000644000175100001770000005371414676242430025370 0ustar00runnerdockerWsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h Revisión: Fundamentos de Pygameh]h Revisión: Fundamentos de Pygame}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh'A/home/runner/work/pygame/pygame/docs/es/tutorials/tom_juegos2.rsth)Kubh target)}(h.. _hacerjuegos-2:h]h}(h]h]h]h]h!]refid hacerjuegos-2uh%h@h)Khh,h&hh'h?ubh+)}(hhh](h0)}(h#2. Revisión: Fundamentos de Pygameh]h#2. Revisión: Fundamentos de Pygame}hhQsbah}(h]h]h]h]h!]uh%h/hhNh&hh'h?h)K ubhA)}(h.. _hacerjuegos-2-1:h]h}(h]h]h]h]h!]hLhacerjuegos-2-1uh%h@h)K hhNh&hh'h?ubh+)}(hhh](h0)}(h2.1. El juego básico de Pygameh]h2.1. El juego básico de Pygame}hhmsbah}(h]h]h]h]h!]uh%h/hhjh&hh'h?h)Kubh paragraph)}(hX}Por el bien de la revisión, y para asegurarme de que estés familiarizado/a con la estrucutra de un programa básico de Pygame, voy a ejecutar brevemente un programa básico de Pygame, que mostrará no más que una ventana con un poco de texto en ella. Al final, debería verse algo así (aunque claro que la decoración de la ventana será probablemente diferente en tu sistema):h]hX}Por el bien de la revisión, y para asegurarme de que estés familiarizado/a con la estrucutra de un programa básico de Pygame, voy a ejecutar brevemente un programa básico de Pygame, que mostrará no más que una ventana con un poco de texto en ella. Al final, debería verse algo así (aunque claro que la decoración de la ventana será probablemente diferente en tu sistema):}hh}sbah}(h]h]h]h]h!]uh%h{h'h?h)Khhjh&hubh image)}(h(.. image:: ../../reST/tut/tom_basic.png h]h}(h]h]h]h]h!]uri../reST/tut/tom_basic.png candidates}*hs original_uri../../reST/tut/tom_basic.pnguh%hh'h?h)Khhjh&hubh|)}(h2El código completo para este ejemplo se ve así::h]h1El código completo para este ejemplo se ve así:}hhsbah}(h]h]h]h]h!]uh%h{h'h?h)Khhjh&hubh literal_block)}(hX#!/usr/bin/python import pygame from pygame.locals import * def main(): # Inicializar pantalla pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Mostrar texto font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blittear todo a la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Bucle de eventos (event loop) while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main()h]hX#!/usr/bin/python import pygame from pygame.locals import * def main(): # Inicializar pantalla pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Mostrar texto font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blittear todo a la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Bucle de eventos (event loop) while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main()}hhsbah}(h]h]h]h]h!]h#h$uh%hh'h?h)Khhjh&hubhA)}(h.. _hacerjuegos-2-2:h]h}(h]h]h]h]h!]hLhacerjuegos-2-2uh%h@h)KUhhjh&hh'h?ubeh}(h](el-juego-basico-de-pygamehieh]h](2.1. el juego básico de pygamehacerjuegos-2-1eh]h!]uh%h*hhNh&hh'h?h)Kexpect_referenced_by_name}hh_sexpect_referenced_by_id}hih_subh+)}(hhh](h0)}(h2.2. Objetos Pygame Básicosh]h2.2. Objetos Pygame Básicos}hhsbah}(h]h]h]h]h!]uh%h/hhh&hh'h?h)KFubh|)}(hXwComo pueden ver, el código consiste de tres objetos proncipales: la pantalla, el fondo y el texto. Cada uno de estos objetos está creado primero llamando a una instancia de objeto integrado de Pygame, y luego modificándolo para adaptarse a nuestras necesidades. La pantalla es un caso levemente especial, porque todavía modificamos la pantalla a través de llamadas de Pygame, en lugar de llamar los métodos pertenecientes al objeto de pantalla. Pero para los demás objetos de Pygame, primero creamos el objeto como una copia de un objeto de Pygame, dándole algunos atributos, y construimos nuestro objeto a partir de ellos.h]hXwComo pueden ver, el código consiste de tres objetos proncipales: la pantalla, el fondo y el texto. Cada uno de estos objetos está creado primero llamando a una instancia de objeto integrado de Pygame, y luego modificándolo para adaptarse a nuestras necesidades. La pantalla es un caso levemente especial, porque todavía modificamos la pantalla a través de llamadas de Pygame, en lugar de llamar los métodos pertenecientes al objeto de pantalla. Pero para los demás objetos de Pygame, primero creamos el objeto como una copia de un objeto de Pygame, dándole algunos atributos, y construimos nuestro objeto a partir de ellos.}hhsbah}(h]h]h]h]h!]uh%h{h'h?h)KHhhh&hubh|)}(hXCon el fondo, primero creamos un objeto Surface de Pygame y le damos el tamaño de la pantalla. Luego realizamos la operación convert() para convertir la Surface a un formato de un solo píxel. Esto es obviamente necesario cuando tenemos varias imágenes y superficies, todas con diferentes formatos de píxeles, lo cual hace que su renderización sea bastante lenta. Al convertir todas las superficies (surfaces), podemos acelerar drásticamente los tiempos de renderizado. Finalmente, llenamos la superficie de fondo con color blanco (255, 255, 255). Estos valores son :firstterm:`RGB` (Red Green Blue), y se pueden obtener desde cualquier buen programa de dibujo.h](hX<Con el fondo, primero creamos un objeto Surface de Pygame y le damos el tamaño de la pantalla. Luego realizamos la operación convert() para convertir la Surface a un formato de un solo píxel. Esto es obviamente necesario cuando tenemos varias imágenes y superficies, todas con diferentes formatos de píxeles, lo cual hace que su renderización sea bastante lenta. Al convertir todas las superficies (surfaces), podemos acelerar drásticamente los tiempos de renderizado. Finalmente, llenamos la superficie de fondo con color blanco (255, 255, 255). Estos valores son }hhsbh emphasis)}(h:firstterm:`RGB`h]hRGB}hhsbah}(h]h] firsttermah]h]h!]uh%hhhubhO (Red Green Blue), y se pueden obtener desde cualquier buen programa de dibujo.}hhsbeh}(h]h]h]h]h!]uh%h{h'h?h)KNhhh&hubh|)}(hXCon el texto, requerimos más de un objeto. Primero, creamos un objeto de fuente (font object), que define qué fuente usar y qué tamaño va a tener. Luego, creamos un objeto texto (text object) usando el método ``render`` que pertenece a nuestro objeto de fuente, suministrando tres argumentos: el texto que se va a renderizar, si debe tener anti-aliasing (1=yes, 0=no), y el color para el texto (otra vez en formato RGB). A continuación, creamos un tercer objeto de texto, que obtiene un rectangulo para el texto. La forma más fácil de entender esto es imaginando dibujar un rectángulo que rodeará todo el texto; luego se puede usar este rectángulo para obtener/establecer la posición del texto en la pantalla. En este ejemplo, obtenemos el rectángulo y establecemos su atributo ``centerx`` para que sea el atributo ``centerx`` del fondo (así el centro del texto será el mismo que el centro del fondo, es decir el texto estará centrado en la pantalla en el eje x). También podríamos establecer la coordenada y, pero no es diferente, así que dejé el texto en la parte superior de la pantalla. Como la pantalla es pequeña de todas formas, no parecía necesario.h](hCon el texto, requerimos más de un objeto. Primero, creamos un objeto de fuente (font object), que define qué fuente usar y qué tamaño va a tener. Luego, creamos un objeto texto (text object) usando el método }hjsbh literal)}(h ``render``h]hrender}hj sbah}(h]h]h]h]h!]uh%jhjubhX7 que pertenece a nuestro objeto de fuente, suministrando tres argumentos: el texto que se va a renderizar, si debe tener anti-aliasing (1=yes, 0=no), y el color para el texto (otra vez en formato RGB). A continuación, creamos un tercer objeto de texto, que obtiene un rectangulo para el texto. La forma más fácil de entender esto es imaginando dibujar un rectángulo que rodeará todo el texto; luego se puede usar este rectángulo para obtener/establecer la posición del texto en la pantalla. En este ejemplo, obtenemos el rectángulo y establecemos su atributo }hjsbj)}(h ``centerx``h]hcenterx}hj2sbah}(h]h]h]h]h!]uh%jhjubh para que sea el atributo }hjsbj)}(h ``centerx``h]hcenterx}hjDsbah}(h]h]h]h]h!]uh%jhjubhXT del fondo (así el centro del texto será el mismo que el centro del fondo, es decir el texto estará centrado en la pantalla en el eje x). También podríamos establecer la coordenada y, pero no es diferente, así que dejé el texto en la parte superior de la pantalla. Como la pantalla es pequeña de todas formas, no parecía necesario.}hjsbeh}(h]h]h]h]h!]uh%h{h'h?h)KUhhh&hubhA)}(h.. _hacerjuegos-2-3:h]h}(h]h]h]h]h!]hLhacerjuegos-2-3uh%h@h)Krhhh&hh'h?ubeh}(h](objetos-pygame-basicosheh]h](2.2. objetos pygame básicoshacerjuegos-2-2eh]h!]uh%h*hhNh&hh'h?h)KFh}jmhsh}hhsubh+)}(hhh](h0)}(h 2.3. Blittingh]h 2.3. Blitting}hjusbah}(h]h]h]h]h!]uh%h/hjrh&hh'h?h)Kcubh|)}(hXgAhora que hemos creado nuestros objetos de juego, necesitamos renderizarlos. Si no lo hiciéramos, y ejecutáramos el programa, solo veríamos una pantalla en blanco y los objetos permanecerían invisibles. El término usado para renderizar objetos es :firstterm:`blitting`, que es donde se copian los píxeles pertenecientes a dicho objeto en el objeto de destino. Entonecs, para renderizar el objeto de fondo, lo blitteamos en la pantalla. En este ejemplo, para simplificar las cosas, blitteamos el texto en el fondo (para que el fondo tenga una copia del texto en él) y luego blitteamos el fondo en la pantalla.h](hAhora que hemos creado nuestros objetos de juego, necesitamos renderizarlos. Si no lo hiciéramos, y ejecutáramos el programa, solo veríamos una pantalla en blanco y los objetos permanecerían invisibles. El término usado para renderizar objetos es }hjsbh)}(h:firstterm:`blitting`h]hblitting}hjsbah}(h]h]jah]h]h!]uh%hhjubhXV, que es donde se copian los píxeles pertenecientes a dicho objeto en el objeto de destino. Entonecs, para renderizar el objeto de fondo, lo blitteamos en la pantalla. En este ejemplo, para simplificar las cosas, blitteamos el texto en el fondo (para que el fondo tenga una copia del texto en él) y luego blitteamos el fondo en la pantalla.}hjsbeh}(h]h]h]h]h!]uh%h{h'h?h)Kehjrh&hubh|)}(hX|Blitting es uno de las operaciones más lentas de cualquier juego, por lo que debes tener cuidado de no blittear demasiado en la pantalla en cada cuadro. Si tienes una imagen de fondo y una pelota volando por la pantalla, podrías blittear el fondo y luego la pelota en cada cuadro, lo que cubriría la posición anterior de la pelota y renderizaría la nueva pelota, pero esto sería bastante lento. Una mejor solución es blittear el fondo en el área que la pelota ocupó previamente, lo que se puede encontrar en el rectángulo anterior de la pelota, y luego blittear la pelota, para que solo estés blitteando dos áreas pequeñas.h]hX|Blitting es uno de las operaciones más lentas de cualquier juego, por lo que debes tener cuidado de no blittear demasiado en la pantalla en cada cuadro. Si tienes una imagen de fondo y una pelota volando por la pantalla, podrías blittear el fondo y luego la pelota en cada cuadro, lo que cubriría la posición anterior de la pelota y renderizaría la nueva pelota, pero esto sería bastante lento. Una mejor solución es blittear el fondo en el área que la pelota ocupó previamente, lo que se puede encontrar en el rectángulo anterior de la pelota, y luego blittear la pelota, para que solo estés blitteando dos áreas pequeñas.}hjsbah}(h]h]h]h]h!]uh%h{h'h?h)Kkhjrh&hubhA)}(h.. _hacerjuegos-2-4:h]h}(h]h]h]h]h!]hLhacerjuegos-2-4uh%h@h)Khjrh&hh'h?ubeh}(h](blittingjfeh]h]( 2.3. blittinghacerjuegos-2-3eh]h!]uh%h*hhNh&hh'h?h)Kch}jj\sh}jfj\subh+)}(hhh](h0)}(h2.4. Evento en Bucleh]h2.4. Evento en Bucle}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h?h)Ktubh|)}(hX#Una vez que ya hayas configurado el juego, necesitás ponerlo en un bucle para que se ejecute cotninuamente hasta que el usuario señale que quiere salir. Asi que comenzás un bucle abierto ``while``, y luego por cada iteración del bucle, que será cada cuadro del juego, actualizas el juego. Lo primero es verificar cualquier evento de Pygame, que será el usuario presionando el teclado, clickeando el botón del mouse, moviendo un joystick, redimensionando la ventana, o tratando de cerrarla. En este caso, simplemente queremos estar atentos a que el usuario intente salir del juego cerrando la ventana, en cuyo caso el juego debería ``return``, que terminará el bucle ``while``. Luego, simplemente necesitamos volver a dibujar (re-blit) el fondo, y actualizar la pantalla para que todo se dibuje. Okay, como nada se mueve o sucede, en este ejemplo, estrictamente hablando no necesitamos volver a dibujar el fondo en cada iteración, pero lo incluí porque cuando las cosas se mueven en la pantalla, necesitarás hacer todo tu dibujado (blitting) aquí.h](hUna vez que ya hayas configurado el juego, necesitás ponerlo en un bucle para que se ejecute cotninuamente hasta que el usuario señale que quiere salir. Asi que comenzás un bucle abierto }hjsbj)}(h ``while``h]hwhile}hjsbah}(h]h]h]h]h!]uh%jhjubhX, y luego por cada iteración del bucle, que será cada cuadro del juego, actualizas el juego. Lo primero es verificar cualquier evento de Pygame, que será el usuario presionando el teclado, clickeando el botón del mouse, moviendo un joystick, redimensionando la ventana, o tratando de cerrarla. En este caso, simplemente queremos estar atentos a que el usuario intente salir del juego cerrando la ventana, en cuyo caso el juego debería }hjsbj)}(h ``return``h]hreturn}hjsbah}(h]h]h]h]h!]uh%jhjubh, que terminará el bucle }hjsbj)}(h ``while``h]hwhile}hjsbah}(h]h]h]h]h!]uh%jhjubhXw. Luego, simplemente necesitamos volver a dibujar (re-blit) el fondo, y actualizar la pantalla para que todo se dibuje. Okay, como nada se mueve o sucede, en este ejemplo, estrictamente hablando no necesitamos volver a dibujar el fondo en cada iteración, pero lo incluí porque cuando las cosas se mueven en la pantalla, necesitarás hacer todo tu dibujado (blitting) aquí.}hjsbeh}(h]h]h]h]h!]uh%h{h'h?h)Kvhjh&hubhA)}(h.. _hacerjuegos-2-5:h]h}(h]h]h]h]h!]hLhacerjuegos-2-5uh%h@h)Khjh&hh'h?ubeh}(h](evento-en-buclejeh]h](2.4. evento en buclehacerjuegos-2-4eh]h!]uh%h*hhNh&hh'h?h)Kth}j-jsh}jjsubh+)}(hhh](h0)}(h 2.5. Ta-da!h]h 2.5. Ta-da!}hj5sbah}(h]h]h]h]h!]uh%h/hj2h&hh'h?h)Kubh|)}(hX`¡Y eso es todo - tu más básico juego de Pygame! Todos los juegos tomarán una forma similar a esta, pero con mucho más código para las funciones del juego real en sí, que tienen más que ver con la programación y menos estructurados por el funcionamiento de Pygame. Esto es realmente de lo que trata este tutorial y seguiremos adelante con ello.h]hX`¡Y eso es todo - tu más básico juego de Pygame! Todos los juegos tomarán una forma similar a esta, pero con mucho más código para las funciones del juego real en sí, que tienen más que ver con la programación y menos estructurados por el funcionamiento de Pygame. Esto es realmente de lo que trata este tutorial y seguiremos adelante con ello.}hjCsbah}(h]h]h]h]h!]uh%h{h'h?h)Khj2h&hubeh}(h](ta-daj&eh]h]( 2.5. ta-da!hacerjuegos-2-5eh]h!]uh%h*hhNh&hh'h?h)Kh}jWjsh}j&jsubeh}(h](hMid1eh]h](#2. revisión: fundamentos de pygame hacerjuegos-2eh]h!]uh%h*hh,h&hh'h?h)K h}jbhBsh}hMhBsubeh}(h]revision-fundamentos-de-pygameah]h] revisión: fundamentos de pygameah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(hM]hBahi]h_ah]hajf]j\aj]jaj&]jaunameids}(jljijbhMjaj^hhihhjmhjljijjfjjj-jj,j)jWj&jVjSu nametypes}(jljbjah͈h̉jmjljjj-j,jWjVuh}(jih,hMhNj^hNhihjhhjhhjihjfjrjjrjjj)jj&j2jSj2u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]h system_message)}(hhh]h|)}(hwNo role entry for "emphasis" in module "docutils.parsers.rst.languages.es". Using English fallback for role "emphasis".h]hwNo role entry for "emphasis" in module "docutils.parsers.rst.languages.es". Using English fallback for role "emphasis".}hjsbah}(h]h]h]h]h!]uh%h{hjubah}(h]h]h]h]h!]levelKtypeINFOlineKsourceh?uh%jhh,h&hh'h?h)Kubatransform_messages](j)}(hhh]h|)}(hhh]h3Hyperlink target "hacerjuegos-2" is not referenced.}hj#sbah}(h]h]h]h]h!]uh%h{hj ubah}(h]h]h]h]h!]levelKtypejsourceh?lineKuh%jubj)}(hhh]h|)}(hhh]h5Hyperlink target "hacerjuegos-2-1" is not referenced.}hj=sbah}(h]h]h]h]h!]uh%h{hj:ubah}(h]h]h]h]h!]levelKtypejsourceh?lineK uh%jubj)}(hhh]h|)}(hhh]h5Hyperlink target "hacerjuegos-2-2" is not referenced.}hjWsbah}(h]h]h]h]h!]uh%h{hjTubah}(h]h]h]h]h!]levelKtypejsourceh?lineKUuh%jubj)}(hhh]h|)}(hhh]h5Hyperlink target "hacerjuegos-2-3" is not referenced.}hjqsbah}(h]h]h]h]h!]uh%h{hjnubah}(h]h]h]h]h!]levelKtypejsourceh?lineKruh%jubj)}(hhh]h|)}(hhh]h5Hyperlink target "hacerjuegos-2-4" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h{hjubah}(h]h]h]h]h!]levelKtypejsourceh?lineKuh%jubj)}(hhh]h|)}(hhh]h5Hyperlink target "hacerjuegos-2-5" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h{hjubah}(h]h]h]h]h!]levelKtypejsourceh?lineKuh%jube transformerN include_log]!docs/es/tutorials/tom_juegos2.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.3551319 pygame-2.6.1/docs/generated/es/doctrees/tutorials/tom_juegos3.doctree0000644000175100001770000004305714676242430025370 0ustar00runnerdocker$Fsphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h Dando Inicioh]h Dando Inicio}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh'A/home/runner/work/pygame/pygame/docs/es/tutorials/tom_juegos3.rsth)Kubh target)}(h.. _hacerjuegos-3:h]h}(h]h]h]h]h!]refid hacerjuegos-3uh%h@h)Khh,h&hh'h?ubh+)}(hhh](h0)}(h1. Dando Inicioh]h1. Dando Inicio}hhQsbah}(h]h]h]h]h!]uh%h/hhNh&hh'h?h)K ubh paragraph)}(hXLas primeras secciones de código son relativamente simples y, una vez escritas, pueden usualmente ser pueden reutilizar en todos los juegos que posteriormente hagas. Realizarán todas las tareas aburridas y genéricas como cargar módulos, cargar imágenes, abrir conexiones de red, reproducir música y así sucesivamente. También incluirán una gestión de errores simple pero efectiva, y cualquier personalización que desees proporcionar además de las funciones proporcionadas por los módulos como ``sys`` y ``pygame``.h](hXLas primeras secciones de código son relativamente simples y, una vez escritas, pueden usualmente ser pueden reutilizar en todos los juegos que posteriormente hagas. Realizarán todas las tareas aburridas y genéricas como cargar módulos, cargar imágenes, abrir conexiones de red, reproducir música y así sucesivamente. También incluirán una gestión de errores simple pero efectiva, y cualquier personalización que desees proporcionar además de las funciones proporcionadas por los módulos como }hhasbh literal)}(h``sys``h]hsys}hhksbah}(h]h]h]h]h!]uh%hihhaubh y }hhasbhj)}(h ``pygame``h]hpygame}hh}sbah}(h]h]h]h]h!]uh%hihhaubh.}hhasbeh}(h]h]h]h]h!]uh%h_h'h?h)KhhNh&hubhA)}(h.. _hacerjuegos-3-1:h]h}(h]h]h]h]h!]hLhacerjuegos-3-1uh%h@h)K&hhNh&hh'h?ubh+)}(hhh](h0)}(h)3.1. Primeras líneas y carga de módulosh]h)3.1. Primeras líneas y carga de módulos}hhsbah}(h]h]h]h]h!]uh%h/hhh&hh'h?h)Kubh`)}(hX9En primer lugar, necesitás iniciar tu juego y cargar tus módulos. Siempre es una buena idea establecer algunas cosas al principio del archivo fuente principal, como el nombre del archivo, qué contiene, bajo qué licencia se encuentra, y cualquier otra información útil que desees proporcionar a quienes que lo van a estar viendo. Luego puedes cargar módulos, con algunas verificaciones de errores para que Python no imprima una traza desagradable que los no programadores no entenderán. El código es bastante simple, por lo que no me molestaré en explicarlo.::h]hX8En primer lugar, necesitás iniciar tu juego y cargar tus módulos. Siempre es una buena idea establecer algunas cosas al principio del archivo fuente principal, como el nombre del archivo, qué contiene, bajo qué licencia se encuentra, y cualquier otra información útil que desees proporcionar a quienes que lo van a estar viendo. Luego puedes cargar módulos, con algunas verificaciones de errores para que Python no imprima una traza desagradable que los no programadores no entenderán. El código es bastante simple, por lo que no me molestaré en explicarlo.:}hhsbah}(h]h]h]h]h!]uh%h_h'h?h)Khhh&hubh literal_block)}(hX#!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2)h]hX#!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2)}hhsbah}(h]h]h]h]h!]h#h$uh%hh'h?h)Khhh&hubhA)}(h.. _hacerjuegos-3-2:h]h}(h]h]h]h]h!]hLhacerjuegos-3-2uh%h@h)KIhhh&hh'h?ubeh}(h]("primeras-lineas-y-carga-de-modulosheh]h]()3.1. primeras líneas y carga de móduloshacerjuegos-3-1eh]h!]uh%h*hhNh&hh'h?h)Kexpect_referenced_by_name}hhsexpect_referenced_by_id}hhsubh+)}(hhh](h0)}(h$3.2. Funciones de manejo de recursosh]h$3.2. Funciones de manejo de recursos}hhsbah}(h]h]h]h]h!]uh%h/hhh&hh'h?h)K:ubh`)}(hX1En el ejemplo :doc:`Chimpancé, Línea Por Línea `, el primer código que se escribió fue para cargar imagenes y sonidos. Como estos eran totalmente independiente de cualquier lógica de juego u objetos del juego, se los escribió como funciones separadas y se escribieron primero para que el código posterior pudiera hacer uso de ellas. Generalmente, coloco todo mi código de esta naturaleza primero, en sus propias funciones sin clase; estas serán, en términos generales, funciones de manejo de recursos. Por supuesto, también podés crear clases para estas funciones, para que puedas agruparlas y tal vez tener un objeto con el que puedas controlar todos los recursos. Como con cualquier buen entorno de programación, depende de vos desarrollar tu propia práctica y estilo óptimo.h](hEn el ejemplo }hhsbh pending_xref)}(h=:doc:`Chimpancé, Línea Por Línea `h]h inline)}(hjh]hChimpancé, Línea Por Línea}hjsbah}(h]h](xrefstdstd-doceh]h]h!]uh%jhjubah}(h]h]h]h]h!]refdoctutorials/tom_juegos3 refdomainjreftypedoc refexplicitrefwarn reftargetChimpanceLineaporLineauh%jh'h?h)K`.h](hWAcá creamos una función de carga de imagen más sofisticada que la proporcionada por }hjMsbj)}(h:func:`pygame.image.load`h]hj)}(hjWh]hpygame.image.load()}hjYsbah}(h]h](jpypy-funceh]h]h!]uh%hihjUubah}(h]h]h]h]h!]refdocj refdomainjcreftypefunc refexplicitrefwarn py:moduleNpy:classNj%pygame.image.loaduh%jh'h?h)KXhjMubhX.. Observen que la primera línea de la función es una cadena de documentación describiendo qué hace cada función, y qué objeto(s) devuelve. La función asume que todas tus imágenes están en el directorio llamado "data", por lo que toma el nombre del archivo y crea la ruta completa, por ejemplo }hjMsbhj)}(h``data/ball.png``h]h data/ball.png}hj{sbah}(h]h]h]h]h!]uh%hihjMubh, usando el módulo }hjMsbh emphasis)}(h:citetitle:`os`h]hos}hjsbah}(h]h] citetitleah]h]h!]uh%jhjMubhX para asegurar la compatibilidad entre plataformas. Luego intenta cargar la imagen y convertir cualquier región alfa para que puedas lograr la transparencia, y devuelve un mensaje de error más legible si hay algún problema. Finalmente, devuelve el objeto de imagen y su clase }hjMsbj)}(h:class:`rect `h]hj)}(hjh]hrect}hjsbah}(h]h](jpypy-classeh]h]h!]uh%hihjubah}(h]h]h]h]h!]refdocj refdomainjreftypeclass refexplicitrefwarnjtNjuNj% pygame.Rectuh%jh'h?h)KXhjMubh.}hjMsbeh}(h]h]h]h]h!]uh%h_h'h?h)KXhhh&hubh`)}(hXPodés crear funciones similares para cargar cualquier otro recurso, como cargar sonidos. También podés crear clases de manejo de recursos para darte más flexibilidad con recursos más complejos. Por ejemplo, podrías crear una clase de música, con una función ``__init__`` que carga la música (quizás tomando prestada de la función ``load_sound()``), una función para pausar la música y otra para reiniciarla. Otra clase útil de manejo de recursos es para conexiones de red. Funciones para abrir sockets, pasar datos con seguridad y verificación de errores adecuados, cerrar sockets, buscar direcciones, y otras tareas de red, pueden hacer que escribir un juego con capacidades de red sea relativamente indoloro.h](hX Podés crear funciones similares para cargar cualquier otro recurso, como cargar sonidos. También podés crear clases de manejo de recursos para darte más flexibilidad con recursos más complejos. Por ejemplo, podrías crear una clase de música, con una función }hjsbhj)}(h ``__init__``h]h__init__}hjsbah}(h]h]h]h]h!]uh%hihjubh? que carga la música (quizás tomando prestada de la función }hjsbhj)}(h``load_sound()``h]h load_sound()}hjsbah}(h]h]h]h]h!]uh%hihjubhXp), una función para pausar la música y otra para reiniciarla. Otra clase útil de manejo de recursos es para conexiones de red. Funciones para abrir sockets, pasar datos con seguridad y verificación de errores adecuados, cerrar sockets, buscar direcciones, y otras tareas de red, pueden hacer que escribir un juego con capacidades de red sea relativamente indoloro.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)K_hhh&hubh`)}(hXRecordá que la tarea principal de estas funciones/clases es asegurarse de que para cuando llegues a escribir las clases de objetos de juego y el bucle principal, casi no haya nada más que hacer. La herencia de clases puede hacer que estas clases básicas sean especialmente útiles. Pero no te excedas, las funciones que solo serán utilizadas por una clase deben ser escritas como parte de esa clase, no como una función global.h]hXRecordá que la tarea principal de estas funciones/clases es asegurarse de que para cuando llegues a escribir las clases de objetos de juego y el bucle principal, casi no haya nada más que hacer. La herencia de clases puede hacer que estas clases básicas sean especialmente útiles. Pero no te excedas, las funciones que solo serán utilizadas por una clase deben ser escritas como parte de esa clase, no como una función global.}hjsbah}(h]h]h]h]h!]uh%h_h'h?h)Kfhhh&hubeh}(h](funciones-de-manejo-de-recursosheh]h]($3.2. funciones de manejo de recursoshacerjuegos-3-2eh]h!]uh%h*hhNh&hh'h?h)K:h}jhsh}hhsubeh}(h](hMid1eh]h](1. dando inicio hacerjuegos-3eh]h!]uh%h*hh,h&hh'h?h)K h}jhBsh}hMhBsubeh}(h] dando-inicioah]h] dando inicioah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjTerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(hM]hBah]hah]haunameids}(j'j$jhMjjhhhhjhjju nametypes}(j'jjhh߉jjuh}(j$h,hMhNjhNhhhhhhjhu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jbKsRparse_messages]transform_messages](h system_message)}(hhh]h`)}(hhh]h3Hyperlink target "hacerjuegos-3" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h_hjubah}(h]h]h]h]h!]levelKtypeINFOsourceh?lineKuh%jubj)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-3-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h_hjubah}(h]h]h]h]h!]levelKtypejsourceh?lineK&uh%jubj)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-3-2" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h_hjubah}(h]h]h]h]h!]levelKtypejsourceh?lineKIuh%jube transformerN include_log]!docs/es/tutorials/tom_juegos3.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.3691318 pygame-2.6.1/docs/generated/es/doctrees/tutorials/tom_juegos4.doctree0000644000175100001770000006050614676242430025367 0ustar00runnerdocker;asphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(hClases de objetos de juegoh]hClases de objetos de juego}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh'A/home/runner/work/pygame/pygame/docs/es/tutorials/tom_juegos4.rsth)Kubh target)}(h.. _hacerjuegos-4:h]h}(h]h]h]h]h!]refid hacerjuegos-4uh%h@h)Khh,h&hh'h?ubh+)}(hhh](h0)}(h4. Clases de objetos de juegoh]h4. Clases de objetos de juego}hhQsbah}(h]h]h]h]h!]uh%h/hhNh&hh'h?h)K ubh paragraph)}(hX,Una vez que hayas cargado tus módulos y escrito tus funciones de manejo de recursos, querrás pasar a escribir algunos objetos de juego. La forma en que esto se realiza es bastante simple, sin embargo puede parecer complejo al principio. Escribirás una clase para cada tipo de objeto en el juego y después crearás una instancia de esas clases para los objetos. Luego podés usar los métodos de esas clases para manipular los objetos, dándoles algún tipo de movimiento y capacidades interactivas. Entonces tu juego, en pseudo-código, se verá así::h]hX+Una vez que hayas cargado tus módulos y escrito tus funciones de manejo de recursos, querrás pasar a escribir algunos objetos de juego. La forma en que esto se realiza es bastante simple, sin embargo puede parecer complejo al principio. Escribirás una clase para cada tipo de objeto en el juego y después crearás una instancia de esas clases para los objetos. Luego podés usar los métodos de esas clases para manipular los objetos, dándoles algún tipo de movimiento y capacidades interactivas. Entonces tu juego, en pseudo-código, se verá así:}hhasbah}(h]h]h]h]h!]uh%h_h'h?h)KhhNh&hubh literal_block)}(hX#!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update()h]hX#!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update()}hhqsbah}(h]h]h]h]h!]h#h$uh%hoh'h?h)KhhNh&hubh`)}(hXPor supuesto, esto es un ejemplo muy simple, y tendrías que agregar todo el código en lugar de esos pequeños comentarios entre corchetes. Pero deberías entender la idea básica. Creás una clase, en la cual colocás todas las funciones de la pelota, incluyendo ``__init__``,que crearía todos los atributos de la pelota, y ``update``, que movería la pelota a su nueva posición antes de blittearla en la pantalla en esta posición.h](hX Por supuesto, esto es un ejemplo muy simple, y tendrías que agregar todo el código en lugar de esos pequeños comentarios entre corchetes. Pero deberías entender la idea básica. Creás una clase, en la cual colocás todas las funciones de la pelota, incluyendo }hhsbh literal)}(h ``__init__``h]h__init__}hhsbah}(h]h]h]h]h!]uh%hhhubh2,que crearía todos los atributos de la pelota, y }hhsbh)}(h ``update``h]hupdate}hhsbah}(h]h]h]h]h!]uh%hhhubhc, que movería la pelota a su nueva posición antes de blittearla en la pantalla en esta posición.}hhsbeh}(h]h]h]h]h!]uh%h_h'h?h)K,hhNh&hubh`)}(hXLuego podés crear más clases para todos tus otros objetos de juego, y luego crear instancias de los mismos para que puedas manejarlos fácilmente en la función ``main`` y en el bucle principal del programa. En contraste con iniciar la pelota en la función ``main``, y luego tener muchas funciones sin clase para manipular un objeto de pelota establecido, y espero que puedas ver por qué usar clases es una ventaja: te permite poner todo el código perteneciente a cada objeto en un único lugar; hace que sea más fácil usar objetos; hace que agregar nuevos objetos y manipularlos sea más flexible. En lugar de agregar más código para cada nuevo objeto de pelota, podés simplemente crear instancias de la clase ``Ball`` para cada nuevo objeto de pelota. ¡Mágia!h](hLuego podés crear más clases para todos tus otros objetos de juego, y luego crear instancias de los mismos para que puedas manejarlos fácilmente en la función }hhsbh)}(h``main``h]hmain}hhsbah}(h]h]h]h]h!]uh%hhhubhY y en el bucle principal del programa. En contraste con iniciar la pelota en la función }hhsbh)}(h``main``h]hmain}hhsbah}(h]h]h]h]h!]uh%hhhubhX, y luego tener muchas funciones sin clase para manipular un objeto de pelota establecido, y espero que puedas ver por qué usar clases es una ventaja: te permite poner todo el código perteneciente a cada objeto en un único lugar; hace que sea más fácil usar objetos; hace que agregar nuevos objetos y manipularlos sea más flexible. En lugar de agregar más código para cada nuevo objeto de pelota, podés simplemente crear instancias de la clase }hhsbh)}(h``Ball``h]hBall}hhsbah}(h]h]h]h]h!]uh%hhhubh, para cada nuevo objeto de pelota. ¡Mágia!}hhsbeh}(h]h]h]h]h!]uh%h_h'h?h)K1hhNh&hubhA)}(h.. _hacerjuegos-4-1:h]h}(h]h]h]h]h!]hLhacerjuegos-4-1uh%h@h)KKhhNh&hh'h?ubh+)}(hhh](h0)}(h4.1. Una clase simple de pelotah]h4.1. Una clase simple de pelota}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h?h)Khjh&hubhp)}(hXclass Ball(pygame.sprite.Sprite): """A ball that will move across the screen (Una peleota se moverá a través de la pantalla) Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy)h]hXclass Ball(pygame.sprite.Sprite): """A ball that will move across the screen (Una peleota se moverá a través de la pantalla) Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy)}hj3sbah}(h]h]h]h]h!]h#h$uh%hoh'h?h)KAhjh&hubh`)}(hX1Aquí tenemos la clase ``Ball`` con una función ``__init__`` que configura la pelota, una función ``update`` que cambia el rectángulo de la pelota para que esté en la nueva posición, y una función ``calcnewpos`` para calcular la nueva posición de la pelota basada en su posición actual, y el vector por el cual se está moviendo. Explicaré la física en un momento. Lo único más a destacar es la cadena de documentación, que es un poco más larga esta vez, y explica los conceptos básicos del la clase. Estas cadenas son útiles no solo para ti mismo y otros programadores que revisen el código, sino también para las herramientas que analicen y documenten tu código. No harán mucha diferencia en programas pequeños, pero en los grandes son invaluables, así que es una buena costumbre de adquirir.h](hAquí tenemos la clase }hjAsbh)}(h``Ball``h]hBall}hjIsbah}(h]h]h]h]h!]uh%hhjAubh con una función }hjAsbh)}(h ``__init__``h]h__init__}hj[sbah}(h]h]h]h]h!]uh%hhjAubh' que configura la pelota, una función }hjAsbh)}(h ``update``h]hupdate}hjmsbah}(h]h]h]h]h!]uh%hhjAubh] que cambia el rectángulo de la pelota para que esté en la nueva posición, y una función }hjAsbh)}(h``calcnewpos``h]h calcnewpos}hjsbah}(h]h]h]h]h!]uh%hhjAubhXW para calcular la nueva posición de la pelota basada en su posición actual, y el vector por el cual se está moviendo. Explicaré la física en un momento. Lo único más a destacar es la cadena de documentación, que es un poco más larga esta vez, y explica los conceptos básicos del la clase. Estas cadenas son útiles no solo para ti mismo y otros programadores que revisen el código, sino también para las herramientas que analicen y documenten tu código. No harán mucha diferencia en programas pequeños, pero en los grandes son invaluables, así que es una buena costumbre de adquirir.}hjAsbeh}(h]h]h]h]h!]uh%h_h'h?h)KWhjh&hubhA)}(h.. _hacerjuegos-4-1-1:h]h}(h]h]h]h]h!]hLhacerjuegos-4-1-1uh%h@h)Kqhjh&hh'h?ubh+)}(hhh](h0)}(h4.1.1. Digresión 1: Spritesh]h4.1.1. Digresión 1: Sprites}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h?h)Kbubh`)}(hXLa otra razón por la cual crear una clase por cada objeto son los sprites. Cada imagen que se renderiza en tu juego será un objeto, por lo que en principio, la clase de cada objeto debería heredar la clase :class:`Sprite `. Esta es una característica muy útil de Python: la herencia de clases. Ahora, la clase ``Ball`` tiene todas las funciones que vienen con la clase ``Sprite``, y cualquier instancia del objeto de la clase ``Ball`` será registrada por Pygame como un sprite. Mientras que con el texto y el fondo, que no se mueven, está bien hacer un blit del objeto sobre el fondo, Pygame maneja los objetos sprites de manera diferente, lo cual verás cuando miremos el código completo del programa.h](hLa otra razón por la cual crear una clase por cada objeto son los sprites. Cada imagen que se renderiza en tu juego será un objeto, por lo que en principio, la clase de cada objeto debería heredar la clase }hjsbh pending_xref)}(h&:class:`Sprite `h]h)}(hjh]hSprite}hjsbah}(h]h](xrefpypy-classeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoctutorials/tom_juegos4 refdomainjreftypeclass refexplicitrefwarn py:moduleNpy:classN reftargetpygame.sprite.Spriteuh%jh'h?h)KdhjubhZ. Esta es una característica muy útil de Python: la herencia de clases. Ahora, la clase }hjsbh)}(h``Ball``h]hBall}hjsbah}(h]h]h]h]h!]uh%hhjubh3 tiene todas las funciones que vienen con la clase }hjsbh)}(h ``Sprite``h]hSprite}hjsbah}(h]h]h]h]h!]uh%hhjubh/, y cualquier instancia del objeto de la clase }hjsbh)}(h``Ball``h]hBall}hj sbah}(h]h]h]h]h!]uh%hhjubhX será registrada por Pygame como un sprite. Mientras que con el texto y el fondo, que no se mueven, está bien hacer un blit del objeto sobre el fondo, Pygame maneja los objetos sprites de manera diferente, lo cual verás cuando miremos el código completo del programa.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kdhjh&hubh`)}(hX?Básicamente, creas tanto un objeto pelota y un objeto sprite para la pelota, y luego llamás a la función update de la pelota en el objeto de sprite, actualizando así el sprite. Los sprites también te dan formas sofisticadas de determinar si dos objetos han colisionado. Normalmente, podrías simplemente comprobar en el bucle principal para ver si sus rectángulos se superponen, pero eso implicaría mucho código, lo cual sería una pérdida de tiempo porque la clase ``Sprite`` proporciona dos funciones (``spritecollide`` y ``groupcollide``) para hacer esto por vos.h](hXBásicamente, creas tanto un objeto pelota y un objeto sprite para la pelota, y luego llamás a la función update de la pelota en el objeto de sprite, actualizando así el sprite. Los sprites también te dan formas sofisticadas de determinar si dos objetos han colisionado. Normalmente, podrías simplemente comprobar en el bucle principal para ver si sus rectángulos se superponen, pero eso implicaría mucho código, lo cual sería una pérdida de tiempo porque la clase }hj"sbh)}(h ``Sprite``h]hSprite}hj*sbah}(h]h]h]h]h!]uh%hhj"ubh proporciona dos funciones (}hj"sbh)}(h``spritecollide``h]h spritecollide}hj<sbah}(h]h]h]h]h!]uh%hhj"ubh y }hj"sbh)}(h``groupcollide``h]h groupcollide}hjNsbah}(h]h]h]h]h!]uh%hhj"ubh) para hacer esto por vos.}hj"sbeh}(h]h]h]h]h!]uh%h_h'h?h)Klhjh&hubhA)}(h.. _hacerjuegos-4-1-2:h]h}(h]h]h]h]h!]hLhacerjuegos-4-1-2uh%h@h)Khjh&hh'h?ubeh}(h](digresion-1-spritesjeh]h](4.1.1. digresión 1: spriteshacerjuegos-4-1-1eh]h!]uh%h*hjh&hh'h?h)Kbexpect_referenced_by_name}jwjsexpect_referenced_by_id}jjsubh+)}(hhh](h0)}(h(4.1.2. Digresión 2: Física de vectoresh]h(4.1.2. Digresión 2: Física de vectores}hjsbah}(h]h]h]h]h!]uh%h/hj~h&hh'h?h)Kvubh`)}(hXAparte de la estructura de la clase ``Ball``, lo notable de este código es la física de vectores utilizada para calcular el movimiento de la pelota. En cualquier juego que involucre movimiento angular, no se llegará muy lejos a menos que se esté cómodo con la trigonometría, así que simplemente introduciré los conceptos básicos que necesitás saber para entender la función ``calcnewpos``.h](h$Aparte de la estructura de la clase }hjsbh)}(h``Ball``h]hBall}hjsbah}(h]h]h]h]h!]uh%hhjubhXU, lo notable de este código es la física de vectores utilizada para calcular el movimiento de la pelota. En cualquier juego que involucre movimiento angular, no se llegará muy lejos a menos que se esté cómodo con la trigonometría, así que simplemente introduciré los conceptos básicos que necesitás saber para entender la función }hjsbh)}(h``calcnewpos``h]h calcnewpos}hjsbah}(h]h]h]h]h!]uh%hhjubh.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kxhj~h&hubh`)}(hXPara empezar, notarás que la pelota tiene un atributo llamado ``vector``, que está compuesto por ``angle`` y ``z``. El ángulo estpa medido en radianes y dará la dirección en la que la pelota se mueve. Z es la velocidad a la que se mueve la pelota. Entonces, usando este vector, podemos determinar la dirección y velocidad de la pelota, y por lo tanto, cuánto se moverá en los ejes x e y:h](h?Para empezar, notarás que la pelota tiene un atributo llamado }hjsbh)}(h ``vector``h]hvector}hjsbah}(h]h]h]h]h!]uh%hhjubh, que está compuesto por }hjsbh)}(h ``angle``h]hangle}hjsbah}(h]h]h]h]h!]uh%hhjubh y }hjsbh)}(h``z``h]hz}hjsbah}(h]h]h]h]h!]uh%hhjubhX. El ángulo estpa medido en radianes y dará la dirección en la que la pelota se mueve. Z es la velocidad a la que se mueve la pelota. Entonces, usando este vector, podemos determinar la dirección y velocidad de la pelota, y por lo tanto, cuánto se moverá en los ejes x e y:}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)K}hj~h&hubh image)}(h*.. image:: ../../reST/tut/tom_radians.png h]h}(h]h]h]h]h!]uri../reST/tut/tom_radians.png candidates}*js original_uri../../reST/tut/tom_radians.pnguh%jh'h?h)Khj~h&hubh`)}(hXEl diagrama anterior ilustra las matemáticas básicas detrás de los vectores. En el diagrama de la izquierda, se puede ver el movimiento proyectado de la pelota representado por una línea azul. La longitud de esa línea (z) representa su velocidad, y el ángulo es la dirección en la que se moverá. El ángulo para el movimiento de la pelota siempre se tomará desde el eje x a la derecha, y se mide en sentido horario desde esa línea, como se muestra en el diagrama.h]hXEl diagrama anterior ilustra las matemáticas básicas detrás de los vectores. En el diagrama de la izquierda, se puede ver el movimiento proyectado de la pelota representado por una línea azul. La longitud de esa línea (z) representa su velocidad, y el ángulo es la dirección en la que se moverá. El ángulo para el movimiento de la pelota siempre se tomará desde el eje x a la derecha, y se mide en sentido horario desde esa línea, como se muestra en el diagrama.}hjsbah}(h]h]h]h]h!]uh%h_h'h?h)Khj~h&hubh`)}(hX A partir del ángulo y la velocidad de la pelota, podemos lograr calcular cuánto se ha movido a lo largo de los ejes x e y. Necesitamos hacer esto porque Pygame en sí no admite vectores, y solo podemos mover la pelota moviendo su rectángulo a lo largo de los dos ejes. Por lo tanto, necesitamos :firstterm:`resolve` (resolver) el ángulo y la velocidad en su movimiento en el eje x (dx) y en el eje y (dy). Esto es un asunto sencillo de trigonometría y se puede hacer con las fórmulas que se muestran en el diagrama.h](hX*A partir del ángulo y la velocidad de la pelota, podemos lograr calcular cuánto se ha movido a lo largo de los ejes x e y. Necesitamos hacer esto porque Pygame en sí no admite vectores, y solo podemos mover la pelota moviendo su rectángulo a lo largo de los dos ejes. Por lo tanto, necesitamos }hj&sbh emphasis)}(h:firstterm:`resolve`h]hresolve}hj0sbah}(h]h] firsttermah]h]h!]uh%j.hj&ubh (resolver) el ángulo y la velocidad en su movimiento en el eje x (dx) y en el eje y (dy). Esto es un asunto sencillo de trigonometría y se puede hacer con las fórmulas que se muestran en el diagrama.}hj&sbeh}(h]h]h]h]h!]uh%h_h'h?h)Khj~h&hubh`)}(hX)Si has estudiado trigonometría elemental antes, nada de esto debería ser nuevo para vos. Pero en caso que seas olvidadizo, acá hay algunas fórmulas útiles para recordar, que te ayudarán a visualizar los ángulos (a mi me resulta más fácil visualizar los ángulos en grados que en radianes.h]hX)Si has estudiado trigonometría elemental antes, nada de esto debería ser nuevo para vos. Pero en caso que seas olvidadizo, acá hay algunas fórmulas útiles para recordar, que te ayudarán a visualizar los ángulos (a mi me resulta más fácil visualizar los ángulos en grados que en radianes.}hjIsbah}(h]h]h]h]h!]uh%h_h'h?h)Khj~h&hubj)}(h+.. image:: ../../reST/tut/tom_formulae.png h]h}(h]h]h]h]h!]uri../reST/tut/tom_formulae.pngj}jjbsj../../reST/tut/tom_formulae.pnguh%jh'h?h)Khj~h&hubeh}(h](digresion-2-fisica-de-vectoresjpeh]h]((4.1.2. digresión 2: física de vectoreshacerjuegos-4-1-2eh]h!]uh%h*hjh&hh'h?h)Kvjz}jkjfsj|}jpjfsubeh}(h](una-clase-simple-de-pelotajeh]h](4.1. una clase simple de pelotahacerjuegos-4-1eh]h!]uh%h*hhNh&hh'h?h)K`. A medida que el usuario presiona teclas, pulsa botones del ratón y mueve el joystick, esas acciones se bombean en la cola de eventos de Pygame, y se dejan allí hasta que se traten. Así que en cada iteración del bucle principal del juego, se pasa por estos eventos, comprobando si son los que se desean tratar, y luego tratándolos adecuadamente. La función :func:`event.pump() ` que estaba en la función ``Bat.update`` se llama entonces en cada iteración para eliminar los eventos antiguos y mantener la cola actual.h](hRAquí se asume que ya has creado una instancia de un bate y has llamado al objeto }hjsbh)}(h ``player``h]hplayer}hjsbah}(h]h]h]h]h!]uh%hhjubh2. Podés ver el familiar diseño de la estrictura }hjsbh)}(h``for``h]hfor}hjsbah}(h]h]h]h]h!]uh%hhjubhq, que itera a través de cada evento encontrado en la cola de eventos de Pygame, que se recupera con la función }hjsbh pending_xref)}(h%:mod:`event.get() `h]h)}(hjh]h event.get()}hjsbah}(h]h](xrefpypy-modeh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdoctutorials/tom_juegos5 refdomainjreftypemod refexplicitrefwarn py:moduleNpy:classN reftargetpygame.event.getuh%jh'h?h)KohjubhXl. A medida que el usuario presiona teclas, pulsa botones del ratón y mueve el joystick, esas acciones se bombean en la cola de eventos de Pygame, y se dejan allí hasta que se traten. Así que en cada iteración del bucle principal del juego, se pasa por estos eventos, comprobando si son los que se desean tratar, y luego tratándolos adecuadamente. La función }hjsbj)}(h(:func:`event.pump() `h]h)}(hjh]h event.pump()}hjsbah}(h]h](jpypy-funceh]h]h!]uh%hhjubah}(h]h]h]h]h!]refdocj refdomainj"reftypefunc refexplicitrefwarnj Nj Njpygame.event.pumpuh%jh'h?h)Kohjubh que estaba en la función }hjsbh)}(h``Bat.update``h]h Bat.update}hj8sbah}(h]h]h]h]h!]uh%hhjubhc se llama entonces en cada iteración para eliminar los eventos antiguos y mantener la cola actual.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kohjh&hubh`)}(hXPrimero verificamos si el usuario está saliendo del programa, y lo cerramos si es así. Luego verificamos si se está presionando alguna tecla, y si lo están, verificamos si son las teclas designadas para mover la paleta hacia arriba y hacia abajo. Si lo son, llamamos a la función de movimiento correspondiente y establecemos el estado del jugador adecuadamente (aunque los estados moveup (moverarriba) y movedown (moverabajo) se cambian en las funciones ``moveup()`` y ``movedown()``, lo que hace que el código sea más ordenado y no rompe la *encapsulación*, lo que significa que se asignan atributos al objeto en sí, sin referirse al nombre de la instancia de ese objeto). Aquí notamos que tenemos tres estados: still (quieto), moveup (moverarriba), movedown (moverabajo). De nuevo, estos son útiles si se quiere depurar o calular giros, efectos de rotación. También verificamos si alguna tecla ha sido "soltada" (es decir, que ya no está siendo presionada), y nuevamente, si son las teclas correctas, detenemos el movimiento del bate.h](hXPrimero verificamos si el usuario está saliendo del programa, y lo cerramos si es así. Luego verificamos si se está presionando alguna tecla, y si lo están, verificamos si son las teclas designadas para mover la paleta hacia arriba y hacia abajo. Si lo son, llamamos a la función de movimiento correspondiente y establecemos el estado del jugador adecuadamente (aunque los estados moveup (moverarriba) y movedown (moverabajo) se cambian en las funciones }hjPsbh)}(h ``moveup()``h]hmoveup()}hjXsbah}(h]h]h]h]h!]uh%hhjPubh y }hjPsbh)}(h``movedown()``h]h movedown()}hjjsbah}(h]h]h]h]h!]uh%hhjPubh=, lo que hace que el código sea más ordenado y no rompe la }hjPsbh emphasis)}(h*encapsulación*h]hencapsulación}hj~sbah}(h]h]h]h]h!]uh%j|hjPubhX, lo que significa que se asignan atributos al objeto en sí, sin referirse al nombre de la instancia de ese objeto). Aquí notamos que tenemos tres estados: still (quieto), moveup (moverarriba), movedown (moverabajo). De nuevo, estos son útiles si se quiere depurar o calular giros, efectos de rotación. También verificamos si alguna tecla ha sido "soltada" (es decir, que ya no está siendo presionada), y nuevamente, si son las teclas correctas, detenemos el movimiento del bate.}hjPsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kwhjh&hubeh}(h](digresion-3-eventos-de-pygamejeh]h](&5.1.1. digresión 3: eventos de pygamehacerjuegos-5-1-1eh]h!]uh%h*hhzh&hh'h?h)K[expect_referenced_by_name}jjsexpect_referenced_by_id}jjsubeh}(h](una-clase-simple-de-batehyeh]h](5.1. una clase simple de batehacerjuegos-5-1eh]h!]uh%h*hhNh&hh'h?h)Kj}jhosj}hyhosubeh}(h](hMid1eh]h]((5. objetos controlables por los usuarios hacerjuegos-5eh]h!]uh%h*hh,h&hh'h?h)K j}jhBsj}hMhBsubeh}(h]%objetos-controlables-por-los-usuariosah]h]%objetos controlables por los usuariosah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(hM]hBahy]hoaj]jaunameids}(jjjhMjjjhyjjjjjju nametypes}(jjjjjjjuh}(jh,hMhNjhNhyhzjhzjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](h system_message)}(hhh]h`)}(hhh]h3Hyperlink target "hacerjuegos-5" is not referenced.}hjVsbah}(h]h]h]h]h!]uh%h_hjSubah}(h]h]h]h]h!]levelKtypeINFOsourceh?lineKuh%jQubjR)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-5-1" is not referenced.}hjqsbah}(h]h]h]h]h!]uh%h_hjnubah}(h]h]h]h]h!]levelKtypejksourceh?lineK%uh%jQubjR)}(hhh]h`)}(hhh]h7Hyperlink target "hacerjuegos-5-1-1" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h_hjubah}(h]h]h]h]h!]levelKtypejksourceh?lineKjuh%jQube transformerN include_log]!docs/es/tutorials/tom_juegos5.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.394132 pygame-2.6.1/docs/generated/es/doctrees/tutorials/tom_juegos6.doctree0000644000175100001770000011202114676242430025357 0ustar00runnerdockersphinx.addnodesdocument)}( rawsourcechildren](docutils.nodescomment)}(hPygame specific reST elements.h]h TextPygame specific reST elements.}parenth sba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hh _documenthsourcedocs/reST/common.txtlineKubh section)}(hhh](h title)}(h Juntando Todoh]h Juntando Todo}hh1sbah}(h]h]h]h]h!]uh%h/hh,h&hh'A/home/runner/work/pygame/pygame/docs/es/tutorials/tom_juegos6.rsth)Kubh target)}(h.. _hacerjuegos-6:h]h}(h]h]h]h]h!]refid hacerjuegos-6uh%h@h)Khh,h&hh'h?ubh+)}(hhh](h0)}(h1. Juntando todoh]h1. Juntando todo}hhQsbah}(h]h]h]h]h!]uh%h/hhNh&hh'h?h)K ubh paragraph)}(hXHasta ahora has aprendido todo lo básico necesario para construir un juego simple. Estás en condiciones de entender cómo crear objetos de Pygame, cómo Pygame muestra objetos, cómo maneja eventos y cómo pódes usar física para introducir algo de movimiento en tu juego. Ahora simplemente te mostraré cómo podés tomar todas esas partes de código y juntarlas en un juego funcional. Lo que necesitamos primero es permitir que la pelota golpee los lados de la pantalla, y que la paleta pueda golpear la pelota, de lo contrario no habrá mucho juego involucrado. Hacemos esto utilizando los métodos de colisión de Pygame: :meth:`collision `.h](hXuHasta ahora has aprendido todo lo básico necesario para construir un juego simple. Estás en condiciones de entender cómo crear objetos de Pygame, cómo Pygame muestra objetos, cómo maneja eventos y cómo pódes usar física para introducir algo de movimiento en tu juego. Ahora simplemente te mostraré cómo podés tomar todas esas partes de código y juntarlas en un juego funcional. Lo que necesitamos primero es permitir que la pelota golpee los lados de la pantalla, y que la paleta pueda golpear la pelota, de lo contrario no habrá mucho juego involucrado. Hacemos esto utilizando los métodos de colisión de Pygame: }hhasbh pending_xref)}(h,:meth:`collision `h]h literal)}(hhmh]h collision}hhqsbah}(h]h](xrefpypy-metheh]h]h!]uh%hohhkubah}(h]h]h]h]h!]refdoctutorials/tom_juegos6 refdomainh|reftypemeth refexplicitrefwarn py:moduleNpy:classN reftargetpygame.Rect.collidepointuh%hih'h?h)K hhaubh.}hhasbeh}(h]h]h]h]h!]uh%h_h'h?h)K hhNh&hubhA)}(h.. _hacerjuegos-6-1:h]h}(h]h]h]h]h!]hLhacerjuegos-6-1uh%h@h)K&hhNh&hh'h?ubh+)}(hhh](h0)}(h)6.1. Dejá que la pelota golpee los ladosh]h)6.1. Dejá que la pelota golpee los lados}hhsbah}(h]h]h]h]h!]uh%h/hhh&hh'h?h)Kubh`)}(hXEl principio básico para hacer que rebote en los lados es fácil de comprender. Se obtienen las coordenadas de las cuatro esquinas de la pelota y se comprueba si corresponden con la coordenada x o y del borde de la pantalla. Por lo tanto, si la esquina superior derecha e izquierda tienen una coordenada 'y' de cero, sabés que la pelota está actualmente en el borde superior de la pantalla. Se hace todo esto en la función ``update``, despue´s de haber calculado la nueva posición de la pelota.h](hXEl principio básico para hacer que rebote en los lados es fácil de comprender. Se obtienen las coordenadas de las cuatro esquinas de la pelota y se comprueba si corresponden con la coordenada x o y del borde de la pantalla. Por lo tanto, si la esquina superior derecha e izquierda tienen una coordenada 'y' de cero, sabés que la pelota está actualmente en el borde superior de la pantalla. Se hace todo esto en la función }hhsbhp)}(h ``update``h]hupdate}hhsbah}(h]h]h]h]h!]uh%hohhubh?, despue´s de haber calculado la nueva posición de la pelota.}hhsbeh}(h]h]h]h]h!]uh%h_h'h?h)Khhh&hubh literal_block)}(hXif not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z)h]hXif not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z)}hhsbah}(h]h]h]h]h!]h#h$uh%hh'h?h)K hhh&hubh`)}(hXAquí comprobamos si el ``area`` contiene la nueva posición de la bola (lo que siempre debería ser así, por lo que no necesitamos una cláusula ``else``, aunque en otras circunstancias podríamos considerarla). Luego verificamos si las coordenadas de las cuatro esquinas están *colisionando* con los bordes del área, y creamos objetos para cada resultado. Si lo están, los objetos tendrán un valor de 1 o ``True``. Si no, el valor será ``None`` o ``False``. Luego verificamos si ha chocado con la parte superior o inferior, y si lo ha hecho, cambiamos la dirección de la pelota. Afortunadamente, usando radianes podemos hacer esto simplemente invirtiendo su valor positivo/negativo. También comprobamos si la bola se ha salido de los lados, y si lo ha hecho, llamamos a la función ``offcourt``. En mi juego, esto reinicia la bola, agrega 1 punto al puntaje del jugador especificado al llamar la función y muestra el nuevo puntaje.h](hAquí comprobamos si el }hhsbhp)}(h``area``h]harea}hhsbah}(h]h]h]h]h!]uh%hohhubhs contiene la nueva posición de la bola (lo que siempre debería ser así, por lo que no necesitamos una cláusula }hhsbhp)}(h``else``h]helse}hjsbah}(h]h]h]h]h!]uh%hohhubh~, aunque en otras circunstancias podríamos considerarla). Luego verificamos si las coordenadas de las cuatro esquinas están }hhsbh emphasis)}(h*colisionando*h]h colisionando}hjsbah}(h]h]h]h]h!]uh%jhhubhu con los bordes del área, y creamos objetos para cada resultado. Si lo están, los objetos tendrán un valor de 1 o }hhsbhp)}(h``True``h]hTrue}hj(sbah}(h]h]h]h]h!]uh%hohhubh. Si no, el valor será }hhsbhp)}(h``None``h]hNone}hj:sbah}(h]h]h]h]h!]uh%hohhubh o }hhsbhp)}(h ``False``h]hFalse}hjLsbah}(h]h]h]h]h!]uh%hohhubhXH. Luego verificamos si ha chocado con la parte superior o inferior, y si lo ha hecho, cambiamos la dirección de la pelota. Afortunadamente, usando radianes podemos hacer esto simplemente invirtiendo su valor positivo/negativo. También comprobamos si la bola se ha salido de los lados, y si lo ha hecho, llamamos a la función }hhsbhp)}(h ``offcourt``h]hoffcourt}hj^sbah}(h]h]h]h]h!]uh%hohhubh. En mi juego, esto reinicia la bola, agrega 1 punto al puntaje del jugador especificado al llamar la función y muestra el nuevo puntaje.}hhsbeh}(h]h]h]h]h!]uh%h_h'h?h)K.hhh&hubh`)}(hFinalmente, recompilamos el vector en función del nuevo ángulo. Y eso es todo. La pelota ahora rebotará felizmente en las paredes y saldrá de la cancha con gracia.h]hFinalmente, recompilamos el vector en función del nuevo ángulo. Y eso es todo. La pelota ahora rebotará felizmente en las paredes y saldrá de la cancha con gracia.}hjvsbah}(h]h]h]h]h!]uh%h_h'h?h)K7hhh&hubhA)}(h.. _hacerjuegos-6-2:h]h}(h]h]h]h]h!]hLhacerjuegos-6-2uh%h@h)KMhhh&hh'h?ubeh}(h](#deja-que-la-pelota-golpee-los-ladosheh]h]()6.1. dejá que la pelota golpee los ladoshacerjuegos-6-1eh]h!]uh%h*hhNh&hh'h?h)Kexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubh+)}(hhh](h0)}(h6.2. Let the ball hit batsh]h6.2. Let the ball hit bats}hjsbah}(h]h]h]h]h!]uh%h/hjh&hh'h?h)K>ubh`)}(hXHacer que la pelota golpee los bates es muy similar a hacer que golpee los lados de la pantalla. Todavía usamos el método de colisión. Todavía usamos el método de colisión, pero esta vez comprobamos si los rectángulos de la pelota y cualquiera de los bates colisionan. En este código también he agregado código adicional para evitar errores. Descubrirás que tendrás que poner todo tipo de código adicional para evitar errores y problemas, así que es bueno acostumbrarse a verlo.h]hXHacer que la pelota golpee los bates es muy similar a hacer que golpee los lados de la pantalla. Todavía usamos el método de colisión. Todavía usamos el método de colisión, pero esta vez comprobamos si los rectángulos de la pelota y cualquiera de los bates colisionan. En este código también he agregado código adicional para evitar errores. Descubrirás que tendrás que poner todo tipo de código adicional para evitar errores y problemas, así que es bueno acostumbrarse a verlo.}hjsbah}(h]h]h]h]h!]uh%h_h'h?h)K@hjh&hubh)}(hXelse: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z)h]hXelse: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z)}hjsbah}(h]h]h]h]h!]h#h$uh%hh'h?h)KGhjh&hubh`)}(hXComenzamos esta sección con una declaración ``else``, porque esto continúa desde el fragmento de código anterior, para comprobar si la pelota golpea los lados. Tiene sentido que si no golpea los lados, podría golpear el bate, por lo que continuamos con la declaración condicional. El primer error a corregir es reducir el tamaño de los rectángulos de los jugadores en 3 píxeles en ambas dimensiones, para evitar que el bate atrape una pelota que pasa detrás de ellos (si imaginás que simplemente mueve el bate para que la pelota viaje detrás de él, los rectángulos se superponen, y normalmente la pelota habría sido "golepada" - esto lo evita)h](h.Comenzamos esta sección con una declaración }hjsbhp)}(h``else``h]helse}hjsbah}(h]h]h]h]h!]uh%hohjubhX\, porque esto continúa desde el fragmento de código anterior, para comprobar si la pelota golpea los lados. Tiene sentido que si no golpea los lados, podría golpear el bate, por lo que continuamos con la declaración condicional. El primer error a corregir es reducir el tamaño de los rectángulos de los jugadores en 3 píxeles en ambas dimensiones, para evitar que el bate atrape una pelota que pasa detrás de ellos (si imaginás que simplemente mueve el bate para que la pelota viaje detrás de él, los rectángulos se superponen, y normalmente la pelota habría sido "golepada" - esto lo evita)}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)K[hjh&hubh`)}(hXA continuación, comprobamos si los rectángulos colisionan, con una corrección adicional de errores. Observá que he comentado sobre estas partes extrañas del código: siempre es bueno explicar las partes del código que son anormales, tanto para otros que miran tu código, como para que lo entiendas cuando regreses a él. Sin la corrección, la pelota podría golpear una esquina del bate, cambiar la dirección, y un cuadro después, aún encontrarse dentro del bate. Luego, volvería a pensar que ha sido golpeada, y cambiaría su dirección. Esto puede suceder varias veces, haciendo que el movimiento de la pelota sea completamente irreal. Por lo tanto, tenemos una variable, ``self.hit``, que la establecemos en ``True`` cuando ha sido golpeada y ``False`` un cuadro después. Cuando comprobamos si los rectángulos han colisionado, también verificamos si ``self.hit`` es ``True``/``False``, para evitar rebotes internos.h](hXA continuación, comprobamos si los rectángulos colisionan, con una corrección adicional de errores. Observá que he comentado sobre estas partes extrañas del código: siempre es bueno explicar las partes del código que son anormales, tanto para otros que miran tu código, como para que lo entiendas cuando regreses a él. Sin la corrección, la pelota podría golpear una esquina del bate, cambiar la dirección, y un cuadro después, aún encontrarse dentro del bate. Luego, volvería a pensar que ha sido golpeada, y cambiaría su dirección. Esto puede suceder varias veces, haciendo que el movimiento de la pelota sea completamente irreal. Por lo tanto, tenemos una variable, }hjsbhp)}(h ``self.hit``h]hself.hit}hjsbah}(h]h]h]h]h!]uh%hohjubh, que la establecemos en }hjsbhp)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%hohjubh cuando ha sido golpeada y }hjsbhp)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%hohjubhe un cuadro después. Cuando comprobamos si los rectángulos han colisionado, también verificamos si }hjsbhp)}(h ``self.hit``h]hself.hit}hj'sbah}(h]h]h]h]h!]uh%hohjubh es }hjsbhp)}(h``True``h]hTrue}hj9sbah}(h]h]h]h]h!]uh%hohjubh/}hjsbhp)}(h ``False``h]hFalse}hjKsbah}(h]h]h]h]h!]uh%hohjubh, para evitar rebotes internos.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kahjh&hubh`)}(hXEl código importante aquí es bastante fácil de entender. Todos los rectángulos tienen una función :meth:`colliderect `, en la que alimentas el rectángulo de otro objeto y devuelve ``True`` si los rectángulos se superpone, y ``False`` si no lo hacen. Si se superponen, podemos cambiar la dirección restando el ángulo actual de ``pi`` (de nuevo, un truco útil que podés hacer con radianes, que ajustará el ángulo en 90 grados y lo enviará en la dirección correcta; podrías encontrar en este punto que es necesario una comprensión detallada de radianes.) Solo para terminar la comprobación de errores, cambiamos ``self.hit`` de vuelta a ``False`` si es el cuadro por le cual fueron golpeados.h](hgEl código importante aquí es bastante fácil de entender. Todos los rectángulos tienen una función }hjcsbhj)}(h-:meth:`colliderect `h]hp)}(hjmh]h colliderect}hjosbah}(h]h](h{pypy-metheh]h]h!]uh%hohjkubah}(h]h]h]h]h!]refdoch refdomainjyreftypemeth refexplicitrefwarnhNhNhpygame.Rect.colliderectuh%hih'h?h)Kjhjcubh?, en la que alimentas el rectángulo de otro objeto y devuelve }hjcsbhp)}(h``True``h]hTrue}hjsbah}(h]h]h]h]h!]uh%hohjcubh% si los rectángulos se superpone, y }hjcsbhp)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%hohjcubh_ si no lo hacen. Si se superponen, podemos cambiar la dirección restando el ángulo actual de }hjcsbhp)}(h``pi``h]hpi}hjsbah}(h]h]h]h]h!]uh%hohjcubhX (de nuevo, un truco útil que podés hacer con radianes, que ajustará el ángulo en 90 grados y lo enviará en la dirección correcta; podrías encontrar en este punto que es necesario una comprensión detallada de radianes.) Solo para terminar la comprobación de errores, cambiamos }hjcsbhp)}(h ``self.hit``h]hself.hit}hjsbah}(h]h]h]h]h!]uh%hohjcubh de vuelta a }hjcsbhp)}(h ``False``h]hFalse}hjsbah}(h]h]h]h]h!]uh%hohjcubh. si es el cuadro por le cual fueron golpeados.}hjcsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kjhjh&hubh`)}(hX3También volvemos a compilar el vector. Por supuesto, querrás eliminar la misma línea en el fragmento de código anterior, para que solo lo hagas una vez después de la declaración condicional ``if-else``. ¡Y eso es todo! El código combinado ahora permitirá que la pelota golpee los lados y los bates.h](hTambién volvemos a compilar el vector. Por supuesto, querrás eliminar la misma línea en el fragmento de código anterior, para que solo lo hagas una vez después de la declaración condicional }hjsbhp)}(h ``if-else``h]hif-else}hjsbah}(h]h]h]h]h!]uh%hohjubhd. ¡Y eso es todo! El código combinado ahora permitirá que la pelota golpee los lados y los bates.}hjsbeh}(h]h]h]h]h!]uh%h_h'h?h)Kqhjh&hubhA)}(h.. _hacerjuegos-6-3:h]h}(h]h]h]h]h!]hLhacerjuegos-6-3uh%h@h)Khjh&hh'h?ubeh}(h](let-the-ball-hit-batsjeh]h](6.2. let the ball hit batshacerjuegos-6-2eh]h!]uh%h*hhNh&hh'h?h)K>j}j jsj}jjsubh+)}(hhh](h0)}(h6.3. El producto finalh]h6.3. El producto final}hj(sbah}(h]h]h]h]h!]uh%h/hj%h&hh'h?h)Kyubh`)}(hEl producto final, con todos los fragmentos de código unidos, así como algunos otros fragmentos de código pegados juntos, se verá así::h]hEl producto final, con todos los fragmentos de código unidos, así como algunos otros fragmentos de código pegados juntos, se verá así:}hj6sbah}(h]h]h]h]h!]uh%h_h'h?h)K{hj%h&hubh)}(hXk# # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initializar pantalla pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initializar jugadores global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initializar pelota speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initializar sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blittear todo en la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Initializar reloj clock = pygame.time.Clock() # Bucle de eventos while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main()h]hXk# # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initializar pantalla pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initializar jugadores global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initializar pelota speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initializar sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blittear todo en la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Initializar reloj clock = pygame.time.Clock() # Bucle de eventos while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main()}hjDsbah}(h]h]h]h]h!]h#h$uh%hh'h?h)K~hj%h&hubh`)}(hXAdemás de mostrar el producto final, señalaré de vuelta a TomPong, en el cual se basa todo esto. Descargalo, échale un vistazo al código fuente y verás una implementación de pong utilizando todo el código que has visto en este tutorial, así como también un montón de otros códigos que he agregado en varias versiones, como física adicional para girar y varias otras correcciones de errores y fallas.h]hXAdemás de mostrar el producto final, señalaré de vuelta a TomPong, en el cual se basa todo esto. Descargalo, échale un vistazo al código fuente y verás una implementación de pong utilizando todo el código que has visto en este tutorial, así como también un montón de otros códigos que he agregado en varias versiones, como física adicional para girar y varias otras correcciones de errores y fallas.}hjRsbah}(h]h]h]h]h!]uh%h_h'h?h)MJhj%h&hubh`)}(hQAh, TomPong se encuentra en http://www.tomchance.uklinux.net/projects/pong.shtml.h](hAh, TomPong se encuentra en }hj`sbh reference)}(h4http://www.tomchance.uklinux.net/projects/pong.shtmlh]h4http://www.tomchance.uklinux.net/projects/pong.shtml}hjjsbah}(h]h]h]h]h!]refurijluh%jhhj`ubh.}hj`sbeh}(h]h]h]h]h!]uh%h_h'h?h)MOhj%h&hubeh}(h](el-producto-finaljeh]h](6.3. el producto finalhacerjuegos-6-3eh]h!]uh%h*hhNh&hh'h?h)Kyj}jjsj}jjsubeh}(h](hMid1eh]h](1. juntando todo hacerjuegos-6eh]h!]uh%h*hh,h&hh'h?h)K j}jhBsj}hMhBsubeh}(h] juntando-todoah]h] juntando todoah]h!]uh%h*hhh&hh'h?h)Kubeh}(h]h]h]h]h!]sourceh?translation_progress}(totalK translatedKuuh%hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(outputNh/N generatorN datestampN root_prefix/ source_linkN source_urlN toc_backlinksentryfootnote_backlinks sectnum_xformstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeesrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh? _destinationN _config_files]file_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(hM]hBah]haj]jaj]jaunameids}(jjjhMjjjhjjj jjjjjjju nametypes}(jjjjjj jjjuh}(jh,hMhNjhNhhjhjjjjjj%jj%u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](h system_message)}(hhh]h`)}(hhh]h3Hyperlink target "hacerjuegos-6" is not referenced.}hj7sbah}(h]h]h]h]h!]uh%h_hj4ubah}(h]h]h]h]h!]levelKtypeINFOsourceh?lineKuh%j2ubj3)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-6-1" is not referenced.}hjRsbah}(h]h]h]h]h!]uh%h_hjOubah}(h]h]h]h]h!]levelKtypejLsourceh?lineK&uh%j2ubj3)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-6-2" is not referenced.}hjlsbah}(h]h]h]h]h!]uh%h_hjiubah}(h]h]h]h]h!]levelKtypejLsourceh?lineKMuh%j2ubj3)}(hhh]h`)}(hhh]h5Hyperlink target "hacerjuegos-6-3" is not referenced.}hjsbah}(h]h]h]h]h!]uh%h_hjubah}(h]h]h]h]h!]levelKtypejLsourceh?lineKuh%j2ube transformerN include_log]!docs/es/tutorials/tom_juegos6.rst(NNNNta decorationNh&hub.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.8811288 pygame-2.6.1/docs/generated/es/genindex.html0000644000175100001770000003505414676242432020414 0ustar00runnerdocker Índice — pygame v2.6.1 documentation

Índice

A | B | C | D | E | G | H | I | L | M | N | P | Q | R | S | T | U | W

A

B

C

D

E

G

H

I

L

M

N

P

Q

R

S

T

U

W

././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.6771312 pygame-2.6.1/docs/generated/es/index.html0000644000175100001770000002206214676242431017714 0ustar00runnerdocker Página Principal de Pygame — pygame v2.6.1 documentation

Página Principal de Pygame

Documentos

Readme

Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo.

Install

Pasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema.

File Path Function Arguments

Cómo maneja Pygame las rutas del sistema de archivos.

Pygame Logos

Los logotipos de Pygame en diferentes resoluciones.

LGPL License

Esta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa.

Tutoriales

Importación e Inicialización

Los pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas.

¿Cómo muevo una imagen?

Un tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados.

Tutorial del Chimpancé, Linea por Linea

Los ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo.

Introducción al Módulo de Sprites

Pygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente.

Introducción a Surfarray

Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py.

Introducción al Módulo de Cámara

Pygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos.

Guía Newbie

Una lista de trece útiles tips para que las personas se sientas cómodas usando pygame.

Tutorial para Crear Juegos

Un largo tutorial que cubre los grandes temas necesarios para crear un juego completo.

Modos de Visualización

Obteniendo una superficie de visualización para la pantalla.

Referencias

Índice

Una lista de todas las funciones, clases, y métodos en el paquete de pygame.

pygame.BufferProxy

Una vista del protocolo de arrays de píxeles de superficie.

pygame.Color

Representación de color

pygame.cursors

Carga y compilación de imágenes de cursores.

Página de Búsqueda

Búsqueda de documentos de Pygame por palabra clave.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.6901312 pygame-2.6.1/docs/generated/es/logos.html0000644000175100001770000001361214676242431017731 0ustar00runnerdocker Página de Logotipos de Pygame — pygame v2.6.1 documentation

Logotipos de Pygame

Estos logotipos están disponibles para su uso en tus propios proyectos. Por favor, colocarlos donde creas conveniente. El logotipo fue creado por TheCorruptor el 29 de julio de 2001 y fue ampliado por Mega_JC el 29 de Agosto de 2021.

Existe una imagen de Photoshop con capas de mayor resolución dispnible aquí. (1.3 MB)

Logotipos legendarios

legacy_logos.zip - 50.1 KB




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.9191287 pygame-2.6.1/docs/generated/es/objects.inv0000644000175100001770000000326314676242432020071 0ustar00runnerdocker# Sphinx inventory version 2 # Project: pygame # Version: 2.6.1 # The remainder of this file is compressed using zlib. xڭYr6)iRKtj%$㤞6U8Vߡc9Kg$%P")b*&8%^y'ea9Q^N$"Nٷߡ ;R1(XkICH ~$?='IAR7"LȶFvYeR *FvDzR.dD⭊0#nzK.j3QBѿ+$5lYd9vÊվ k{,)bC]-Zّlh<D,Gk)jA_$L)4Y}P>"ϱ'lAVK=Bd#\% G.k#Ma3Oc5rG+3 b)SkW[[\l={؞nevШȊv i'@IeٍdId(2) ·61aNݾ8'c7̔ĺxVfxt=4㝖D=A:t axg>wOP=LH}Z\^֩ჴj:*I?He8^=}V< XD:I.D" % "I7$ *!aVY-$LXZNx>Co,cM  9F\@%ADiʄB1=tM#\I<&uioӈ`K6HW̼rh>Ck1d;:vvarQ?)Va~翄ĺZ_..fQ)Op.\l$Dp.g>75[[xUX@-ӈ:N6w9-LnzEz6 P)'Sɽ+I\KEYB.pEYDՉQ-O)f8# !`lB@S_2Rkshg8J.pױfG^V.yA3eDKC!`znkW᯼CH;ZI'dvC`!. P)D#[t1tD&,45WxoO &"Ku=f,kZ\tpmT-?55GiC޲k^B7){p `~u: ET'>m)Mcs8;*[o(?KdQTAU`.'@/<",LbQɾW tTݺ QנԶxqz{Ji۫6'BJ!kN2Y (v"M X6[8:ʞ)K;h cͮXlXR5M,nvɶb7@`g.m~:E_[_R -Ԥx8/P\c)rMfqSLFձefߘ^GlJ)A5p"ȸO~wh$.vμ)؂D䔅K././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.8911288 pygame-2.6.1/docs/generated/es/py-modindex.html0000644000175100001770000000670414676242432021050 0ustar00runnerdocker Índice de Módulos Python — pygame v2.6.1 documentation

Índice de Módulos Python

.
 
.
    pygame.camera módulo de pygame para el uso de la cámara
    pygame.cdrom módulo de pygame para el control de CD de audio.
    pygame.cursors módulo de pygame para recursos de cursor
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0241258 pygame-2.6.1/docs/generated/es/referencias/0000755000175100001770000000000014676242436020210 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.778131 pygame-2.6.1/docs/generated/es/referencias/bufferproxy.html0000644000175100001770000003751714676242431023461 0ustar00runnerdocker pygame.BufferProxy — pygame v2.6.1 documentation
pygame.BufferProxy
pygame object to export a surface buffer through an array protocol
BufferProxy(<parent>) -> BufferProxy
Return wrapped exporting object.
The size, in bytes, of the exported buffer.
A copy of the exported buffer as a single block of bytes.
Write raw bytes to object buffer.

BufferProxy es un tipo de soporte de pygame, diseñado como el valor de retorno de los métodos Surface.get_buffer() y Surface.get_view(). Para todas las versiones de Python, un objeto BufferProxy exporta una estructura C y un array de interface a nivel de Python en nombre del búfer del objeto principal. También se exporta una nueva interfaz de búfer. En pygame, BufferProxy es clave para implementar el módulo pygame.surfarray.

Las instancias BufferProxy pueden ser creadas directamente desde el código de Python, ya sea para un buffer superior que exporta una interfaz o a partir de un dict de Python que describe el diseño del búfer de un objeto. Las entradas del dict se basan en el mapeo de la interfaz de matriz a nivel de Python. Se reconocen las siguientes claves:

"shape"tupla

La longitud de cada elemento del array como una tupla de enteros. La longitud de la tupla es el número de dimensiones en el array.

"typestr"string

El tipo de elemento del array como una cadena de longitud 3. El primer carácter indica el orden de bytes, '<' para para formato little-endian, ">" para formato big-endian, y '|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, "<u4" es un entero sin signo de 4 bytes en formato little-endian, como un píxel de 32 bits en una PC, mientras que "|V3" representaría un píxel de 24 bits, que no tiene un equivalente entero.

"data"tupla

La dirección de inicio de el búfer físico y una bandera de solo lectura como una tupla de longitud 2. La dirección es un valor entero, mientras que la bandera de solo lectura es un valor boleano- "Falso" para escribir, "Verdadero" para solo lectura.

"strides"tupla(opcional)

La información del array stride (el número de bytes a saltar para alcanzar el próximo valor) representado como una tupla de enteros. Es requerido únicamente para arreys que no son contiguos en C. La longitud de la tupla debe coincidir con la de "shape".

"parent"object(opcional)

El objeto exportador. Puede ser usado para mantener vivo el objeto superior (antecesor) mientras su búfer es visible.

"before"callable(opcional)

Callback (rellamada) invocado cuando la instancia BufferProxy exporta el búfer. El callback recibe un argumento, el objeto "parent" se se proporciona, de lo contrario, None. El callback es útil para establecer un bloqueo en el objeto superior o antecesor (parent).

"after"callable(opcional)

Callback (rellamada) invocado cuando se libera un búfer exportado. El callback recibe un argumento, el objeto "parent"``(antecesor) si se proporciona, de lo contrario, ``None. El callback es útil para liberar un bloqueo en el objeto parent (superior o antecesor)

La clase BufferProxy soporta subclases, variables de instancias y referencias débiles

New in pygame 1.8.0.

Extended in pygame 1.9.2.

parent
Return wrapped exporting object.
parent -> Surface
parent -> <parent>

La clase Surface que devolvió el objeto de clase BufferProxy o el objeto pasado a una llamada de BufferProxy.

length
The size, in bytes, of the exported buffer.
length -> int

El número de bytes validos de datos exportados. Para datos discotinuous, es decir, datos que no forman un solo bloque de memoria, los bytes dentro de los espacios vacios se excluyen del conteo. Esta propiedad es equivalente al campo "len" de la estructura C Py_buffer.

raw
A copy of the exported buffer as a single block of bytes.
raw -> bytes

Los datos del búfer como un objeto str/bytes. Cualquier espacio vacío en los datos exportados se elimina.

write()
Write raw bytes to object buffer.
write(buffer, offset=0)

Sobreescribe bytes en el objeto superior (o antecesor). Los datos deben ser contiguos en C o F, de lo contrario se genera un ValueError. El argumento buffer es un objeto str/bytes. Un desplazamiento opcional proporciona una posición de inicio, en bytes, dentro del búfer donde comienza la sobreescritura. Si el desplazamiento es negativo o mayor o igual que el valor length del proxy, se genera un excepción IndexException. Si len(buffer) > proxy.length + offset, se genera un ValueError.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.865131 pygame-2.6.1/docs/generated/es/referencias/camera.html0000644000175100001770000006253014676242431022327 0ustar00runnerdocker pygame.camera — pygame v2.6.1 documentation
pygame.camera
pygame module for camera use
Module init
Get the backends supported on this system
Surface colorspace conversion
returns a list of available cameras
load a camera

Actualmente, Pygame soporta cámaras nativas de Linux (V4L2) y Windows (MSMF), con un soporte de plataforma más amplio disponible a través de un backend (controlador) integrado en OpenCV.

New in pygame 2.0.2: Windows native camera support

New in pygame 2.0.3: New OpenCV backends

¡EXPERIMENTAL!: Este API puede cambiar o desaparecer en lanzamientos posteriores de pygame. Si lo utilizas, es muy probable que tu código se rompa en la próxima versión de pygame.

La función de Bayer a RGB se basa en:

Sonix SN9C101 based webcam basic I/F routines
Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

Nuevo en pygame 1.9.0.

pygame.camera.init()
Module init
init(backend = None) -> None

Esta función inicia el módulo de la cámara, seleccionando el mejor controlador (backend) de la cámara web que pueda encontrar en tu sistema. No se garantiza que tenga éxito e incluso puede intentar importar módulos de teceros, como OpenCV. Si deseas anular la elección de controlador (backend), podés hacer un llamado para pasar el nombre del controlador que deseas a esta función. Podés obtener más información sobre los controladores (backends) en la función get_backends().

Changed in pygame 2.0.3: Option to explicitly select backend

pygame.camera.get_backends()
Get the backends supported on this system
get_backends() -> [str]

Este función devuelve cada controlador (backend) que considera que tienen posibilidad de funcionar en tu sistema, en orden de prioridad.

pygame.camera Backends:

Backend           OS        Description
---------------------------------------------------------------------------------
_camera (MSMF)    Windows   Builtin, works on Windows 8+ Python3
_camera (V4L2)    Linux     Builtin
OpenCV            Any       Uses `opencv-python` module, can't enumerate cameras
OpenCV-Mac        Mac       Same as OpenCV, but has camera enumeration
VideoCapture      Windows   Uses abandoned `VideoCapture` module, can't enumerate
                            cameras, may be removed in the future

Hay dos diferencias princiales entre los controladores (backends).

Los controladores (backends) _camera están integrados en el mismo pygame y no requieren importaciones de terceros. Todos los demás controlaores sí lo requieren. Para los controladores OpenCV y VideoCapture, esos módulos deben estar instalados en tu sistema.

La otra gran diferencia es "enumeración de cámaras". Algunos constroladores no tienen una forma de enumerar los nombres de las cámaras o incluso la cantidad de cámaras en el sistema. En estos casos, la función list_cameras() devolverá algo como [0]. Si sabés que tenés varias cámaras en el sistema, estos puertos de controladores pasarán un "número de índice de cámara" si lo utilizas como el parámetro device.

New in pygame 2.0.3.

pygame.camera.colorspace()
Surface colorspace conversion
colorspace(Surface, format, DestSurface = None) -> Surface

Permite la conversión "RGB" a un espacio de color destino de "HSV" o "YUV". Las surfaces (superficies) de origen y destino deben tener el mismo tamaño y profundidad de píxel. Esto es útil para la visión por computadora de dispositivos con capacidad de procesamiento limitada. Captura una imagen lo más pequeña posible, la redimensiona con transform.scale() haciendola aún más pequeña, y luego convierte el espacio de color a "YUV" o "HSV" antes de realizar cualquier procesamiento en ella.

pygame.camera.list_cameras()
returns a list of available cameras
list_cameras() -> [cameras]

Verifica la disponibilidad de cámaras y devuelve una lista de cadenas de nombres de cámaras, listas para ser utilizados por pygame.camera.Cameraload a camera.

Si el controlador (backend) de la cámara no soporta la enuemración de webcams, esto devolverá algo como [0]. Ver get_backends() para obtener mucha más información.

pygame.camera.Camera
load a camera
Camera(device, (width, height), format) -> Camera
opens, initializes, and starts capturing
stops, uninitializes, and closes the camera
gets current values of user controls
changes camera settings if supported by the camera
returns the dimensions of the images being recorded
checks if a frame is ready
captures an image as a Surface
returns an unmodified image as bytes

Carga una cámara. En Linux, el dispositivo suele ser algo como "/dev/video0". El ancho y alto predeterminados son 640x480. El formato es el espacio de color deseado para la salida. Esto es útil para fines de visión por computadora. El valor predeterminado es RGB. Los siguientes formatos son compatibles:

  • RGB - Red, Green, Blue

  • YUV - Luma, Blue Chrominance, Red Chrominance

  • HSV - Hue, Saturation, Value

start()
opens, initializes, and starts capturing
start() -> None

Abre el dispositivo de la cámara, intenta inicializarlo y comienza a grabar imágenes en un búfer. La cámara debe estar iniciada antes de que se puedan utilizar las siguientes funciones.

stop()
stops, uninitializes, and closes the camera
stop() -> None

Detiene la grabación, desinicializa la cámara y la cierra. Una vez que la cámara se detiene, las funciones siguientes no se pueden utilizar hasta que se inicie nuevamente.

get_controls()
gets current values of user controls
get_controls() -> (hflip = bool, vflip = bool, brightness)

Si la cámara lo admite, get_controls devolverá la configuración actual para el volteo horizontal y vertical de la imagen como booleanos y el brillo como un número entero. Si no es compatible, devolverá los valores predeterminados (0, 0, 0). Hay que tener en cuenta que los valores de retorno acá pueden ser diferentes a los devueltos por set_controls, aunque es más probable que sean correctos.

set_controls()
changes camera settings if supported by the camera
set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)

Te permite cambiar la configuración de la cámara si la cámara lo admite. Los valores devueltos serán los valores de la entrada si la cámara afirma que tuvo éxito, o si no, los valores previamente utilizados. Cada argumento es opcional y se puede elegir el deseado mediante el suministro de una palabra clave, como hflip. Hay que tener en cuenta que la configuración real siendo utilizada por la cámara puede no ser la misma que la devuelta por set_controls. En Windows hflip y vflip están implementados por pygame, no por la cámara, por lo que siempre deberían funcionar, pero el brillo brightness no está soportado.

get_size()
returns the dimensions of the images being recorded
get_size() -> (width, height)

Devuelve las dimensiones actuales de las imágenes capturadas por la cámara. Esto devolverá el tamaño real, que puede ser diferente al especificado durante la inicialización si la cámara no admite ese tamaño.

query_image()
checks if a frame is ready
query_image() -> bool

Si una imagen está lista, devuelve TRUE (verdadero). De lo contrario, devuelve FALSE (falso). Hay que tener en cuenta que algunas webcams siempre devolverán falso y solo pondrán en cola un cuadro cuando se les llame con una función de bloqueo como get_image(). En Windows (MSMF), y en los backends de OpenCV, la función query_image() debería ser confiable. Esto es útil para separar la frecuencia de cuadros del juego de la velocidad de la cámara sin tener que usar subprocesos.

get_image()
captures an image as a Surface
get_image(Surface = None) -> Surface

Extrae una imagen del búfer como una superficie RGB. Opcionalmente, se puede reutilizar una superficie existente para ahorrar tiempo. La profundidad de bits de la superficie es de 24 bits en Linux, 32 bits en Windows, o la misma que la superficie suministrada opcionalmente.

get_raw()
returns an unmodified image as bytes
get_raw() -> bytes

Obtiene una imagen de la cámara como una cadena en el formato de píxel nativo de la cámara. Útil para la integración con las otras bibliotecas. Esto devuelve un objeto de bytes.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.9091308 pygame-2.6.1/docs/generated/es/referencias/cdrom.html0000644000175100001770000007623714676242431022214 0ustar00runnerdocker pygame.cdrom — pygame v2.6.1 documentation
pygame.cdrom
pygame module for audio cdrom control
initialize the cdrom module
uninitialize the cdrom module
true if the cdrom module is initialized
number of cd drives on the system
class to manage a cdrom drive

Advertencia

Este módulo no es funcional en pygame 2.0 y versiones superiores, a menos que hayas compilado manualmente pygame con SDL1. Este módulo no estará soportado en el futuro. Una alternativa para la funcionalidad de cdrom de Python es pycdio.

El módulo cdrom administra las unidades de CD y DVD en la computadora. También puede controlar la reproducción de CD de audio. Este módulo debe inicializarse antes de poder hacer algo. Cada objeto ``CD``que crees representa una unidad de cdrom y también debe inicializarse individualmente antes de poder realizar la mayoría de las acciones.

pygame.cdrom.init()
initialize the cdrom module
init() -> None

Inicializa el módulo de cdrom. Esto escaneará el sistema en busca de todos los dispositivos CD. El módulo debe inicializarse antes de que funcionen cualquier otra función. Esto ocurre automáticamente cuando llamas pygame.init().

Es seguro llamar a este función más de una vez.

pygame.cdrom.quit()
uninitialize the cdrom module
quit() -> None

Decinicializa el módulo cdrom. Después de llamar a esta función, cualquier objeto CD existente dejará de funcionar.

Es seguro llamar a esta función más de una vez.

pygame.cdrom.get_init()
true if the cdrom module is initialized
get_init() -> bool

Comprueba si el módulo cdrom está inicializado o no. Esto es diferente de CD.init() ya que cada unidad también debe inicializarse individualmente.

pygame.cdrom.get_count()
number of cd drives on the system
get_count() -> count

Devuelve el número de unidades de CD en el sistema. Cuando creas objetos CD, debes pasar un ID entero que debe ser menor que este recuento. El recuento será 0 si no hay unidades en el sistema.

pygame.cdrom.CD
class to manage a cdrom drive
CD(id) -> CD
initialize a cdrom drive for use
uninitialize a cdrom drive for use
true if this cd device initialized
start playing audio
stop audio playback
temporarily stop audio playback
unpause audio playback
eject or open the cdrom drive
the index of the cdrom drive
the system name of the cdrom drive
true if the drive is playing audio
true if the drive is paused
the current audio playback position
False if a cdrom is in the drive
the number of tracks on the cdrom
true if the cdrom track has audio data
get all track information
start time of a cdrom track
length of a cdrom track

Podés crear un objeto CD para cada unidad de CD en el sistema. Usa pygame.cdrom.get_count() para determinar cuántas unidades existen realmente. El argumento 'id' es un número entero que representa la unidad, comenzando en cero.

El objeto CD no está inicializado, solo podés llamar CD.get_id()` y ``CD.get_name() en una unidad no inicializada.

Es seguro crear múltiples objetos ``CD``para la misma unidad, todos cooperarán normalmente.

init()
initialize a cdrom drive for use
init() -> None

Inicializa la unidad de CD para ser utilizada. El debe estar inicializada para que la mayoría de los métodos CD funcionen. Incluso si el resto de pygame está inicializado.

Puede haber una breve pausa mientras la unidad se inicializa. Evitá utilizar CD.init() si el programa no debe detenerse durante uno o dos segundos.

quit()
uninitialize a cdrom drive for use
quit() -> None

Desinicializa una unidad para su uso. Hacé un llamado a esto cuando tu programa no vaya a acceder a la unidad durante un tiempo.

get_init()
true if this cd device initialized
get_init() -> bool

Comprueba si este dispositivo CDROM está inicializado. Esto es diferente de pygame.cdrom.init() ya que cada unidad también debe inicializarse individualmente.

play()
start playing audio
play(track, start=None, end=None) -> None

Reproduce audio desde un CD de audio en la unidad. Además del argumento del número de pista, también podés introducir un tiempo de inicio y fin para la reproducción. El tiempo de inicio y fin está en segundos y puede limintar la selección de una pista de audio reproducida.

Si introducir un tiempo de inicio pero no de fin, el audio se reproducirá hasta el final de la pista. Si introducis un tiempo de inicio y 'None' para el tiempo final, el audio se reproducirá hasta el final de todo el disco.

Véase CD.get_numtracks() y CD.get_track_audio() para encontrar las pistas que se van a reproducir.

Nota: la pista 0 es la primera pista en el CD. Los números de pistas comienzan en 0.

stop()
stop audio playback
stop() -> None

Detiene la reproducción del audio desde el CD-ROM. También se perderá la posición actual de reproducción. Este método no hace nada si la unidad no está reproduciendo audio.

pause()
temporarily stop audio playback
pause() -> None

Detiene temporalmente la reproducción del audio en el CD. La reproducción puede reanudarse en el mismo punto con el método CD.resume(). Si el CD no está reproduciendo, este método no hace nada.

Nota: la pista 0 es la primera en el CD. Los números de pista comienzan en cero.

resume()
unpause audio playback
resume() -> None

Reanuda la reproducción de un CD. Si el CD no está en pausa o ya se está reproduciendo, este método no hace nada.

eject()
eject or open the cdrom drive
eject() -> None

Esto abrirá la unidad de CD y expulsará el CD-ROM. Si la unidad está reproduciendo o en pausa, se detendrá.

get_id()
the index of the cdrom drive
get_id() -> id

Devuelve el ID entero que se utilizó para crear la instancia de CD. Este método puede funcionar en un CD no inicializado.

get_name()
the system name of the cdrom drive
get_name() -> name

Devuelve el nombre de la unidad en forma de cadena. Este es el nombre de sitema utilizado para representar la unidad, a menudo es la letra de la unidad o el nombre del dispositivo. Este método puede funcionar en un CD no inicializado.

get_busy()
true if the drive is playing audio
get_busy() -> bool

Devuelve True (verdadero) si la unidad está ocupada reproduciendo audio.

get_paused()
true if the drive is paused
get_paused() -> bool

Devuelve True (verdadero) si la unidad está actualmente en pausa.

get_current()
the current audio playback position
get_current() -> track, seconds

Devuelve tanto la pista actual como el tiempo de esa pista. Este método funciona cuando la unidad está reproduciendo o en pausa.

Nota: la pista 0 es la primera pista en el CD. Los números de pista comienzan en cero.

get_empty()
False if a cdrom is in the drive
get_empty() -> bool

Devuelve False (falso) si hay un CD-ROM en la unidad actualmente. Si la unidad está vacía devolverá True (verdadero).

get_numtracks()
the number of tracks on the cdrom
get_numtracks() -> count

Devuelve el número de pistas en el CD-ROM de la unidad. Esto devolverá cero si la unidad está vacía o no tiene pistas.

get_track_audio()
true if the cdrom track has audio data
get_track_audio(track) -> bool

Determina si una pista en un CD-ROM contiene datos de audio. También podés llamar a CD.num_tracks() y CD.get_all() para obtener más información sobre el CD-ROM.

Nota: la pista 0 es la primera pista en el CD. Los números de pistas comienzan en cero.

get_all()
get all track information
get_all() -> [(audio, start, end, length), ...]

Devuelve una lista con información para cada pista en el CD-ROM. La información consiste en una tupla con cuatro valores. El valor "audio" es True (verdadero) si la pista contiene data de audio. Los valores de inicio, fin y longitud son números de puntos flotantes en segundos. "Start" (inicio) y "end" (fin) representan tiempos absolutos en todo el disco.

get_track_start()
start time of a cdrom track
get_track_start(track) -> seconds

Devuelve el tiempo absoluto en segundos al inicio de la pista del CD-ROM.

Nota: la pista 0 es la primera pista del CD. Los números de pista comienzan en cero.

get_track_length()
length of a cdrom track
get_track_length(track) -> seconds

Devuelve un valor de punto flotante en segundos de la duración de la pista del CD-ROM.

Nota: la pista 0 es la primera pista del CD. Los números de pista comienzan en cero.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.9631307 pygame-2.6.1/docs/generated/es/referencias/color.html0000644000175100001770000010413314676242431022211 0ustar00runnerdocker pygame.Color — pygame v2.6.1 documentation
pygame.Color
pygame object for color representations
Color(r, g, b) -> Color
Color(r, g, b, a=255) -> Color
Color(color_value) -> Color
Gets or sets the red value of the Color.
Gets or sets the green value of the Color.
Gets or sets the blue value of the Color.
Gets or sets the alpha value of the Color.
Gets or sets the CMY representation of the Color.
Gets or sets the HSVA representation of the Color.
Gets or sets the HSLA representation of the Color.
Gets or sets the I1I2I3 representation of the Color.
Returns the normalized RGBA values of the Color.
Applies a certain gamma value to the Color.
Set the number of elements in the Color to 1,2,3, or 4.
returns the grayscale of a Color
returns a linear interpolation to the given Color.
returns a Color where the r,g,b components have been multiplied by the alpha.
Sets the elements of the color

La clase Color representa valores de color RGBA utilizando un rango de valores de 0 a 255 inclusive. Permite realizar operaciones aritméticas básicas, como operaciones binarias +, -, *, //, %, y unaria ~ para crear nuevos colores. Admite conversiones a otros espacios de colores como HSV o HSL, y te permite ajustar canales individuales de color. El valor alfa se establece en 255 (completamente opaco) de forma predeterminada si no se proporciona. Las operaciones aritméticas y método correct_gamma() conservan las subclases. Para los operadores binarios, la clase de color devuelto es la del objeto de color de la parte izquierda del operador.

Los objetos de color admiten comparación de igualdad con otros objetos de color y tuplas de 3 o 4 elementos de enteros. Hubo un error en pygame 1.8.1 donde el valor alfa predeterminado era 0, no 255 como antes.

Los objetos de color exportan la interfaz de array a nivel C. La interfaz exporta un array de bytes no firmados unidimensional de solo lectura con la misma longitud asignada que el color. También se exporta la nueva interfaz del búfer, con la mismas características que la interfaz del array.

Los operadores de división entera, //, y módulo, %, no generan una excepción por división por cero. En su lugar, si un canal de color, o alfa, en el color de la parte derecha es 0, entonces el resultado es 1. Por ejemplo:

# Estas expresiones son True (verdaderas)
Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3)
Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)

Usa int(color) para obtener el valor entero inmutable del color, que se puede utilizar como clave en un diccionario. Este valor entero difiere de los valores de píxeles mapeados de los métodos pygame.Surface.get_at_mapped(), pygame.Surface.map_rgb() y pygame.Surface.unmap_rgb(). Se puede pasar como argumento color_value a Color (útil con conjuntos).

Ver color_list para ejemplos de nombres de colores disponibles.

Parámetros:
  • r (int) -- el valor rojo en el rango de 0 a 255 inclusive

  • g (int) -- el valor verde en el rango de 0 a 255 inclusive

  • b (int) -- el color azul en el rango de 0 a 255 inclusive

  • a (int) -- (opcional) valor alfa en el rango de 0 a 255 inclusive, predeterminado es 255

  • color_value (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int])) --

    valor del color (ver nota abajo para los formatos admitidos)

    Nota

    Formatos de color_value admitidos:
    - Objeto Color: clona el objeto de clase Color
    - Nombre de color: str: nombre del color a utilizar, por ejemplo 'red' (todos los nombres admitidos se pueden encontrar en color_list, con muestras de ejemplo)
    - Formato de color HTML str: '#rrggbbaa' o '#rrggbb', donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona
    - Número hexadecimal str: '0xrrggbbaa' o '0xrrggbb', donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona.
    - int: valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, 0xrrggbbaa, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado.
    - tupla/lista de valores enteros de color: (R, G, B, A) o (R, G, B), donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona.

Devuelve:

a newly created Color object

Tipo del valor devuelto:

Color

Changed in pygame 2.0.0: Soporte para tuplas, listas y objetos Color al crear objetos Color.

Changed in pygame 1.9.2: Color objects export the C level array interface.

Changed in pygame 1.9.0: Color objects support 4-element tuples of integers.

Changed in pygame 1.8.1: New implementation of the class.

r
Gets or sets the red value of the Color.
r -> int

El valor rojo del color.

g
Gets or sets the green value of the Color.
g -> int

El valor verde del color.

b
Gets or sets the blue value of the Color.
b -> int

El valor azul del color.

a
Gets or sets the alpha value of the Color.
a -> int

El valor alfa del color.

cmy
Gets or sets the CMY representation of the Color.
cmy -> tuple

La representación CMY del color. Los componentes CMY están en los rangos C = [0, 1], M = [0, 1], Y = [0, 1]. Tené en cuenta que estos no devolverá los valores CMY exactos para los valores RGB establecidos en todos los casos. Debido a la asignación de RGB de 0-255 y la asignación de CMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY difieran ligeramente de lo que podrías esperar.

hsva
Gets or sets the HSVA representation of the Color.
hsva -> tuple

La representación HSVA del color. Los componentes HSVA están en los rangos H = [0, 360], S = [0, 100], V = [0, 100], A = [0, 100]. Tené en cuenta que esto devolverá los valores HSV exactos para los valores RGB establecidos en todos los casos. Debido a la asignación de RGB de 0-255 y la asignación de HSV de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores HSV difieran ligeramente de lo que podrías esperar.

hsla
Gets or sets the HSLA representation of the Color.
hsla -> tuple

La representación HSLA del color. Los componentes HSLA están en rangos H = [0, 360], S = [0, 100], L = [0, 100], A = [0, 100]. Tené en cuenta que esto no devolverá los valores HSL exactos para los valores RGB establecidos en todos los casos. Debido a la asignación de RGB de 0-255 y la asignación de HSL de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores HSL difieran ligeramente de lo que podrías esperar.

i1i2i3
Gets or sets the I1I2I3 representation of the Color.
i1i2i3 -> tuple

La representación I1I2I3 del color. Los componentes I1I2I3 están en los rangos I1 = [0, 1], I2 = [-0.5, 0.5], I3 = [-0.5, 0.5]. Tené en cuenta que esto no devolverá los valores I1I2I3 exactos para los valores RGB establecidos en todos los cosas. Debido a la asignación de RGB de 0-255 y la asignación I1I2I3 de 0-1, los errores de redondeo pueden hacer que los valores ``I1I2I3``difieran ligeramente de lo que podrías esperar.

normalize()
Returns the normalized RGBA values of the Color.
normalize() -> tuple

Devuelve los valores RGBA del color como valores de punto flotante.

correct_gamma()
Applies a certain gamma value to the Color.
correct_gamma (gamma) -> Color

Aplica un cierto valor de gamma al color y devuelve un nuevo color con los valores RGBA ajustados.

set_length()
Set the number of elements in the Color to 1,2,3, or 4.
set_length(len) -> None

DEPRECATED: Puedes desempaquetar los valores que necesitas de la siguiente manera: r, g, b, _ = pygame.Color(100, 100, 100) si solo deseas r, g and b o r, g, *_ = pygame.Color(100, 100, 100) si solo deseas r y g

La longitud predeterminada de un color es 4. Los colores pueden tener longitudes 1, 2, 3 o 4. Esto es útil si querés desempaquetar a r,g,b,a. Si querés obtener la longitud de un color, usa len(acolor).

Deprecated since pygame 2.1.3.

New in pygame 1.9.0.

grayscale()
returns the grayscale of a Color
grayscale() -> Color

Devuelve un color que representa la versión en escala de grises de sí mismo utilizando la fórmula de luminosidad que pondera el rojo, verde y azul según sus longitudes de onda.

lerp()
returns a linear interpolation to the given Color.
lerp(Color, float) -> Color

Devuelve un color que es una interpolación entre sí mismo y el color dado en el espacio RGBA. El segundo parámetro determina qué tan lejos estará el resultado entre sí mismo y el otro color. Debe ser un valor entre 0 y 1, donde 0 significa que devolverá el color inicial, el de sí mismo, y 1 significa que devolverá otro color.

New in pygame 2.0.1.

premul_alpha()
returns a Color where the r,g,b components have been multiplied by the alpha.
premul_alpha() -> Color

Devuelve un nuevo color en el que cada uno de los canales de rojo, verde y azul ha sido multiplicado por el canal alfa del color original. El canal alfa permanece sin cambios.

Esto es útil cuando se traba con la bandera de modo BLEND_PREMULTIPLIED de mezcla para pygame.Surface.blit(), que asume que todas las superficies que lo utilizan están utilizando colores con alfa pre-multiplicado.

New in pygame 2.0.0.

update()
Sets the elements of the color
update(r, g, b) -> None
update(r, g, b, a=255) -> None
update(color_value) -> None

Establece los elementos del color. Consulta los parámetros de pygame.Color()pygame object for color representations para los parámetros de esta función. Si el valor alfa no se estableció, no cambiará.

New in pygame 2.0.1.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.0191305 pygame-2.6.1/docs/generated/es/referencias/cursors.html0000644000175100001770000011013114676242431022566 0ustar00runnerdocker pygame.cursors — pygame v2.6.1 documentation
pygame.cursors
pygame module for cursor resources
create binary cursor data from simple strings
load cursor data from an XBM file
pygame object representing a cursor

Pygame ofrece control sobre el cursor del hardware del sistema. Pygame admite cursores en blanco y negro (cursores de mapa de bits), así como cursores variantes del sistema y cursores de color. Podés controlar el cursor utilizando funciones dentro del módulo pygame.mouse.

Este módulo de cursores contiene funciones para cargar y decodificar varios formatos de cursores. Estas te permiten almacenar fácilmente tus cursores en archivos externos o directamente como cadenas de caracteres codificadas en Python.

El módulo incluye varios cursores estándar. La función pygame.mouse.set_cursor() toma varios argumentos. Todos estos argumentos se han almacenado en una única tupla que puedes llamar de la siguiente manera:

>>> pygame.mouse.set_cursor(*pygame.cursors.arrow)

Las siguientes variables pueden ser pasadas a pygame.mouse.set_cursor function:

  • pygame.cursors.arrow

  • pygame.cursors.diamond

  • pygame.cursors.broken_x

  • pygame.cursors.tri_left

  • pygame.cursors.tri_right

Este módulo también contiene algunos cursores como cadenas de caracters formateadas. Será necesario pasarlos a la función pygame.cursors.compile() antes de poder utilizarlos. El ejemplo de llamada se vería así:

>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings)
>>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)

Las siguientes cadenas de caracteres se pueden convertir en mapas de bits de cursor con pygame.cursors.compile() :

  • pygame.cursors.thickarrow_strings

  • pygame.cursors.sizer_x_strings

  • pygame.cursors.sizer_y_strings

  • pygame.cursors.sizer_xy_strings

  • pygame.cursor.textmarker_strings

pygame.cursors.compile()
create binary cursor data from simple strings
compile(strings, black='X', white='.', xor='o') -> data, mask

Se puede utilizar una secuencia de cadenas para crear datos binarios de cursor para el cursor del sistema. Esto devuelve los datos binarios en forma de dos tuplas. Estas se pueden pasar como tercer y cuarto argumento, respectivamente, de la función pygame.mouse.set_cursor().

Si estás creando tus propias cadenas de caracteres, podés usar cualquier valor para representar los píxeles blanco y negro. Algunos sistemas permiten establecer un color especial de alternancia para el color del sistema, también llamado color xor. Si el sistema no admite cursores xor, ese color será simplemente negro.

La altura debe ser divisible por 8. el ancho de las cadenas debe ser igual y divisible por 8. Si estas dos condiciones no se cumplen, se generará un ValueError. Un ejemplo de conjunto de cadenas de caracteres de cursor se ve así:

thickarrow_strings = (               #sized 24x24
  "XX                      ",
  "XXX                     ",
  "XXXX                    ",
  "XX.XX                   ",
  "XX..XX                  ",
  "XX...XX                 ",
  "XX....XX                ",
  "XX.....XX               ",
  "XX......XX              ",
  "XX.......XX             ",
  "XX........XX            ",
  "XX........XXX           ",
  "XX......XXXXX           ",
  "XX.XXX..XX              ",
  "XXXX XX..XX             ",
  "XX   XX..XX             ",
  "     XX..XX             ",
  "      XX..XX            ",
  "      XX..XX            ",
  "       XXXX             ",
  "       XX               ",
  "                        ",
  "                        ",
  "                        ")
pygame.cursors.load_xbm()
load cursor data from an XBM file
load_xbm(cursorfile) -> cursor_args
load_xbm(cursorfile, maskfile) -> cursor_args

Esto carga cursores para un subconjunto simple de archivos XBM . Los archivos XBM son tradicionalmente utilizados para almacenar cursores en sistemas UNIX, son un formato ASCII utilizado para representar imágenes simples.

A veces, los valores de color blanco y negro se dividen en dos archivos XBM separados. Podés pasar un segundo argumento de archivo de máscara (maskfile) para cargar las dos imágenes en un solo cursor.

Los argumentos 'cursorfile' y 'maskfile' pueden ser nombres de archivos u objetos similares a archivos con el método 'readlines'

El valor de retorno 'cursor_args' puede ser pasado directamente a la función pygame.mouse.set_cursor().

pygame.cursors.Cursor
pygame object representing a cursor
Cursor(size, hotspot, xormasks, andmasks) -> Cursor
Cursor(hotspot, surface) -> Cursor
Cursor(constant) -> Cursor
Cursor(Cursor) -> Cursor
Cursor() -> Cursor
copy the current cursor
Gets the cursor type
Gets the cursor data

En pygame 2, hay 3 tipos de cursores que podés crear para darle un poco de brillo adicional a tu juego. Existen cursores de tipo bitmap, que ya existían en Pygame 1.x, y se compilan a partir de una cadena de caracteres o se cargan desde un archivo xbm. Luego, están los cursores de tipo system, donde eliges un conjunto predefinido que transmitirá el mismo significado pero se verá nativo en diferentes sistemas operativos. Por último puedes crear un cursor de tipo color, que muestra una superficie de Pygame como el cursor.

Creando un cursor del sistema

Elegí una constante de esta lista, pasala a pygame.cursors.Cursor(constant), ¡y listo! Tené en cuenta que no todos los sistemas admiten todos los cursores del sistema y es posible que obtengas una sustitución en su lugar. Por ejemplo, en MacOS, WAIT/WAITARROW debería mostrarse como una flecha y SIZENWSE/SIZENESW/SIZEALL debería mostrarse como una mano cerrada. Y en Wayland, cada cursor SIZE debería aparecer como una mano. debería mostrarse como una mano cerrada.

Pygame Cursor Constant           Description
--------------------------------------------
pygame.SYSTEM_CURSOR_ARROW       arrow (flecha)
pygame.SYSTEM_CURSOR_IBEAM       i-beam (viga en i, o viga de doble t)
pygame.SYSTEM_CURSOR_WAIT        wait (espera)
pygame.SYSTEM_CURSOR_CROSSHAIR   crosshair (cruz de mira)
pygame.SYSTEM_CURSOR_WAITARROW   small wait cursor (pequeño cursor de espera)
                                 (or wait if not available) (o si no está disponible, espera)
pygame.SYSTEM_CURSOR_SIZENWSE    double arrow pointing (doble flecha apuntando al noroeste y sudeste)
                                 northwest and southeast
pygame.SYSTEM_CURSOR_SIZENESW    double arrow pointing (doble flecha apuntando al noreste y sudoeste)
                                 northeast and southwest
pygame.SYSTEM_CURSOR_SIZEWE      double arrow pointing (doble flecha apuntando al oeste y al este)
                                 west and east
pygame.SYSTEM_CURSOR_SIZENS      double arrow pointing (doble flecha apuntando al norte y sur)
                                 north and south
pygame.SYSTEM_CURSOR_SIZEALL     four pointed arrow pointing (flecha de cuatro puntas apuntando al norte, sur, este y oeste)
                                 north, south, east, and west
pygame.SYSTEM_CURSOR_NO          slashed circle or crossbones (círculo tachado o calaveras cruzadas)
pygame.SYSTEM_CURSOR_HAND        hand (mano)

Creando un cursor sin pasar argumentos

Además de las constantes del cursor disponibles y descritas anteriormente, también podés llamar a pygame.cursors.Cursor(), y tu cursor está listo (hacer esto es lo mismo que llamar a pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)) Haciendo una de estas llamadas lo que en realidad se crea es un cursor del sistema utilizando la imagen nativa predeterminada.

Creando un curosr de color

Para crear un cursor de color, hay que crear un objeto Cursor a partir de un hotspot y una surface. Un hotspot es una coordenada (x,y) que determina donde en el cursor está el punto exacto. La posición debe estar dentro de los límites de la surface.

Creando un cursor de mapa de bits (bitmap)

Cuando el cursor del mouse está visible, se mostrará como un mapa de bits en blanco y negro utilizando los arrays de máscaras (bitmask) dadas. El size (tamaño) es una secuencia que contiene el ancho y alto del cursor. El ``hotspot``es una secuencia que contiene la posición del hotspot del cursor.

Un cursor tiene un ancho y alto, pero la posición del mouse está representada mediante un conjunto de coordenadas de punto. Por lo tanto, el valor pasado al hotspot del cursor ayuda a pygame a determinar exactamente en qué punto se encuentra el cursor.

xormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks es una secuencia de bytes que contiene los datos de máscara de bits del cursor. Para crear estas variable podemos utilizar la función pygame.cursors.compile()create binary cursor data from simple strings.

Ancho y alto deben ser múltiplos de 8, y las arrays de máscara (mask arrays) deben tener el tamaño correcto para el ancho y el alto dados. De lo contrario, se generará una excepción.

copy()
copy the current cursor
copy() -> Cursor

Devuelve un nuevo objeto Cursor con los mismos datos y hotspots que el original.

type
Gets the cursor type
type -> string

El tipo será "system", "bitmap", o "color".

data
Gets the cursor data
data -> tuple

Devuelve los datos que se utilizaron para crear este objeto de cursor, envuelto en una tupla.

New in pygame 2.0.1.

Código de ejemplo para crear y establecer cursores. (Click en el mouse para cambiar el cursor)

# pygame setup
import pygame as pg

pg.init()
screen = pg.display.set_mode([600, 400])
pg.display.set_caption("Example code for the cursors module")

# create a system cursor
system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO)

# create bitmap cursors
bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow)
bitmap_2 = pg.cursors.Cursor(
    (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings)
)

# create a color cursor
surf = pg.Surface((40, 40)) # you could also load an image
surf.fill((120, 50, 50))        # and use that as your surface
color = pg.cursors.Cursor((20, 20), surf)

cursors = [system, bitmap_1, bitmap_2, color]
cursor_index = 0

pg.mouse.set_cursor(cursors[cursor_index])

clock = pg.time.Clock()
going = True
while going:
    clock.tick(60)
    screen.fill((0, 75, 30))
    pg.display.flip()

    for event in pg.event.get():
        if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE):
            going = False

        # if the mouse is clicked it will switch to a new cursor
        if event.type == pg.MOUSEBUTTONDOWN:
            cursor_index += 1
            cursor_index %= len(cursors)
            pg.mouse.set_cursor(cursors[cursor_index])

pg.quit()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.8971286 pygame-2.6.1/docs/generated/es/search.html0000644000175100001770000000634014676242432020054 0ustar00runnerdocker Búsqueda — pygame v2.6.1 documentation

Búsqueda

La búsqueda de varias palabras solo muestra coincidencias que contienen todas las palabras.

././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.9171286 pygame-2.6.1/docs/generated/es/searchindex.js0000644000175100001770000026574414676242432020573 0ustar00runnerdockerSearch.setIndex({"alltitles": {"1. Dando Inicio": [[19, "hacerjuegos-3"]], "1. Introducci\u00f3n": [[10, "introduccion"]], "1. Juntando todo": [[22, "hacerjuegos-6"]], "1.1. Una nota sobre estilos de codificaci\u00f3n": [[10, "una-nota-sobre-estilos-de-codificacion"]], "2. Revisi\u00f3n: Fundamentos de Pygame": [[18, "hacerjuegos-2"]], "2.1. El juego b\u00e1sico de Pygame": [[18, "el-juego-basico-de-pygame"]], "2.2. Objetos Pygame B\u00e1sicos": [[18, "objetos-pygame-basicos"]], "2.3. Blitting": [[18, "blitting"]], "2.4. Evento en Bucle": [[18, "evento-en-bucle"]], "2.5. Ta-da!": [[18, "ta-da"]], "3.1. Primeras l\u00edneas y carga de m\u00f3dulos": [[19, "primeras-lineas-y-carga-de-modulos"]], "3.2. Funciones de manejo de recursos": [[19, "funciones-de-manejo-de-recursos"]], "4. Clases de objetos de juego": [[20, "hacerjuegos-4"]], "4.1. Una clase simple de pelota": [[20, "una-clase-simple-de-pelota"]], "4.1.1. Digresi\u00f3n 1: Sprites": [[20, "digresion-1-sprites"]], "4.1.2. Digresi\u00f3n 2: F\u00edsica de vectores": [[20, "digresion-2-fisica-de-vectores"]], "5. Objetos controlables por los usuarios": [[21, "hacerjuegos-5"]], "5.1. Una clase simple de bate": [[21, "una-clase-simple-de-bate"]], "5.1.1. Digresi\u00f3n 3: Eventos de Pygame": [[21, "digresion-3-eventos-de-pygame"]], "6.1. Dej\u00e1 que la pelota golpee los lados": [[22, "deja-que-la-pelota-golpee-los-lados"]], "6.2. Let the ball hit bats": [[22, "let-the-ball-hit-bats"]], "6.3. El producto final": [[22, "el-producto-final"]], "Actualizar los Sprites": [[9, "actualizar-los-sprites"]], "Animaci\u00f3n rect \"sucia\".": [[11, "animacion-rect-sucia"]], "Bloqueo de Superficie (Surface)": [[16, "bloqueo-de-superficie-surface"]], "Bucle principal (Main Loop)": [[9, "bucle-principal-main-loop"]], "Cambiando el Fondo": [[14, "cambiando-el-fondo"]], "Captura de una Transmisi\u00f3n en Vivo": [[8, "captura-de-una-transmision-en-vivo"]], "Captura de una sola imagen": [[8, "captura-de-una-sola-imagen"]], "Carga de Recursos": [[9, "carga-de-recursos"]], "Centrar Texto en el Fondo": [[9, "centrar-texto-en-el-fondo"]], "Cerrar (Quit)": [[12, "cerrar-quit"]], "Chimpanc\u00e9, L\u00ednea Por L\u00ednea": [[9, "chimpance-linea-por-linea"]], "Clases de Objetos para Juegos": [[9, "clases-de-objetos-para-juegos"]], "Clases de objetos de juego": [[20, null]], "Colores Nombrados": [[0, null]], "Colorkey vs. Alpha.": [[11, "colorkey-vs-alpha"]], "Configuraci\u00f3n b\u00e1sica": [[13, "configuracion-basica"]], "Configuraci\u00f3n de los Modos de Visualizaci\u00f3n": [[13, "configuracion-de-los-modos-de-visualizacion"]], "Coordenadas de Pantalla": [[14, "coordenadas-de-pantalla"]], "Crear Juegos con Pygame": [[10, null], [10, "id1"]], "Crear el Fondo": [[9, "crear-el-fondo"]], "Crear un Mapa": [[14, "crear-un-mapa"]], "C\u00f3mo decidir": [[13, "como-decidir"]], "Damos Un Paso Hacia Atr\u00e1s": [[14, "damos-un-paso-hacia-atras"]], "Dando Inicio": [[19, null]], "De Ahora En M\u00e1s, Est\u00e1s Por Tu Cuenta": [[14, "de-ahora-en-mas-estas-por-tu-cuenta"]], "Definici\u00f3n: \"blit\"": [[14, "definicion-blit"]], "Detecci\u00f3n de Colisiones": [[15, "deteccion-de-colisiones"]], "Dibujar la Escena Completa": [[9, "dibujar-la-escena-completa"]], "Documentos": [[1, "documentos"]], "Ejemplos": [[13, "ejemplos"], [16, "ejemplos"]], "Ensamblando Todo": [[14, "ensamblando-todo"]], "Entonces, \u00bfQu\u00e9 Sigue?": [[14, "entonces-que-sigue"]], "Extendiendo tus Propias Clases (Avanzado)": [[15, "extendiendo-tus-propias-clases-avanzado"]], "Fin del Juego": [[9, "fin-del-juego"]], "Funciones": [[13, "funciones"]], "Gesti\u00f3n del subsistema de eventos.": [[11, "gestion-del-subsistema-de-eventos"]], "Graduaci\u00f3n": [[16, "graduacion"]], "Gu\u00eda de Pygame para Principiantes": [[11, null], [11, "id1"]], "Hacer Mover al H\u00e9roe": [[14, "hacer-mover-al-heroe"]], "Hacer Mover al H\u00e9roe (Toma 2)": [[14, "hacer-mover-al-heroe-toma-2"]], "Haz cosas a la manera de pythony.": [[11, "haz-cosas-a-la-manera-de-pythony"]], "Importaci\u00f3n de M\u00f3dulos": [[9, "importacion-de-modulos"]], "Importaci\u00f3n e Inicializaci\u00f3n": [[8, "importacion-e-inicializacion"]], "Importar": [[12, "importar"]], "Importar Surfarray": [[16, "importar-surfarray"]], "Importar e Inicializar": [[12, "importar-e-inicializar"]], "Inicializar": [[12, "inicializar"]], "Inicializar Todo": [[9, "inicializar-todo"]], "Introducci\u00f3n": [[9, "introduccion"], [13, "introduccion"], [16, "introduccion"]], "Introducci\u00f3n a Surfarray": [[16, "introduccion-a-surfarray"], [16, "id1"]], "Introducci\u00f3n al M\u00f3dulo de C\u00e1mara": [[8, "introduccion-al-modulo-de-camara"]], "Introducci\u00f3n al M\u00f3dulo de Sprites": [[15, "introduccion-al-modulo-de-sprites"]], "Juntando Todo": [[22, null]], "La Clase Grupo": [[15, "la-clase-grupo"]], "La Clase Sprite": [[15, "la-clase-sprite"]], "Las Clases": [[15, "las-clases"]], "Lecci\u00f3n de Historia": [[15, "leccion-de-historia"]], "Listado de C\u00e1maras Conectadas": [[8, "listado-de-camaras-conectadas"]], "Logotipos de Pygame": [[2, "logotipos-de-pygame"]], "Logotipos legendarios": [[2, "logotipos-legendarios"]], "Los Grupos de Renderizado": [[15, "los-grupos-de-renderizado"]], "Los Muchos Tipos de Grupos": [[15, "los-muchos-tipos-de-grupos"]], "Los rects son tus amigos.": [[11, "los-rects-son-tus-amigos"]], "Los surfaces de hardware son m\u00e1s problem\u00e1ticos de lo que valen.": [[11, "los-surfaces-de-hardware-son-mas-problematicos-de-lo-que-valen"]], "Manejar los Eventos de Entrada": [[9, "manejar-los-eventos-de-entrada"]], "Manejo de Algunas Entradas": [[14, "manejo-de-algunas-entradas"]], "Mezcl\u00e1ndolos Juntos": [[15, "mezclandolos-juntos"]], "Modelos de Color": [[8, "modelos-de-color"]], "Mostrar el Fondo mientras Termina el Setup": [[9, "mostrar-el-fondo-mientras-termina-el-setup"]], "Mover Im\u00e1genes M\u00faltiples": [[14, "mover-imagenes-multiples"]], "Movimiento Fluido": [[14, "movimiento-fluido"]], "NO hay regla seis.": [[11, "no-hay-regla-seis"]], "No te distraigas con problemas secundarios.": [[11, "no-te-distraigas-con-problemas-secundarios"]], "No te molestes con la detecci\u00f3n de colisi\u00f3n de p\u00edxel perfecto.": [[11, "no-te-molestes-con-la-deteccion-de-colision-de-pixel-perfecto"]], "NumPy": [[16, "numpy"]], "NumPy m\u00e1s Avanzado": [[16, "numpy-mas-avanzado"]], "Objetos controlables por los usuarios": [[21, null]], "Otras Funciones de Surfarray": [[16, "otras-funciones-de-surfarray"]], "Pasar de la Lista a la Pantalla": [[14, "pasar-de-la-lista-a-la-pantalla"]], "Ponte c\u00f3modo trabajando con Python": [[11, "ponte-comodo-trabajando-con-python"]], "Preparar Objetos del Juego": [[9, "preparar-objetos-del-juego"]], "Primero, Funciones Misteriosas": [[14, "primero-funciones-misteriosas"]], "Problemas Comunes": [[15, "problemas-comunes"]], "P\u00e1gina Principal de Pygame": [[1, null]], "P\u00e1gina de Logotipos de Pygame": [[2, null]], "Reconoce qu\u00e9 partes de pygame necesit\u00e1s realmente.": [[11, "reconoce-que-partes-de-pygame-necesitas-realmente"]], "Referencias": [[1, "referencias"]], "Revisi\u00f3n: Fundamentos de Pygame": [[18, null]], "Sepa qu\u00e9 es una Surface (superficie)": [[11, "sepa-que-es-una-surface-superficie"]], "Solo P\u00edxeles en la Pantalla": [[14, "solo-pixeles-en-la-pantalla"]], "Tabla de Contenido": [[10, "tabla-de-contenido"]], "Thresholding (Umbralizaci\u00f3n)": [[8, "thresholding-umbralizacion"]], "Transparencia": [[16, "transparencia"]], "Tutorial de Pygame - Ejemplo del Chimpanc\u00e9, L\u00ednea Por L\u00ednea": [[9, null]], "Tutoriales": [[1, "tutoriales"]], "Tutoriales Pygame - Introducci\u00f3n al M\u00f3dulo de C\u00e1mara": [[8, null]], "Tutoriales de Pygame - Configuraci\u00f3n de los Modos de Visualizaci\u00f3n": [[13, null]], "Tutoriales de Pygame - Importar e Inicializar": [[12, null]], "Tutoriales de Pygame - Introducci\u00f3n a Surfarray": [[16, null]], "Tutoriales de Pygame - Introducci\u00f3n al M\u00f3dulo de Sprites": [[15, null]], "Tutoriales de Pygame - \u00a1Ayuda! \u00bfC\u00f3mo Muevo Una Imagen?": [[14, null]], "Usa surface.convert().": [[11, "usa-surface-convert"]], "Uso del M\u00f3dulo de M\u00e1scara": [[8, "uso-del-modulo-de-mascara"]], "Uso los Controles de la C\u00e1mara": [[8, "uso-los-controles-de-la-camara"]], "Visi\u00f3n B\u00e1sica por Computadora": [[8, "vision-basica-por-computadora"]], "pygame.BufferProxypygame object to export a surface buffer through an array protocol": [[3, null]], "pygame.Colorpygame object for color representations": [[6, null]], "pygame.camerapygame module for camera use": [[4, null]], "pygame.cdrompygame module for audio cdrom control": [[5, null]], "pygame.cursorspygame module for cursor resources": [[7, null]], "pygame/examples/chimp.py": [[17, null]], "\u00a1Ayuda! \u00bfC\u00f3mo Muevo Una Imagen?": [[14, "ayuda-como-muevo-una-imagen"]]}, "docnames": ["color_list", "index", "logos", "referencias/bufferproxy", "referencias/camera", "referencias/cdrom", "referencias/color", "referencias/cursors", "tutorials/CamaraIntro", "tutorials/ChimpanceLineaporLinea", "tutorials/CrearJuegos", "tutorials/GuiaNewbie", "tutorials/IniciarImportar", "tutorials/ModosVisualizacion", "tutorials/MoverImagen", "tutorials/SpriteIntro", "tutorials/SurfarrayIntro", "tutorials/chimpance.py", "tutorials/tom_juegos2", "tutorials/tom_juegos3", "tutorials/tom_juegos4", "tutorials/tom_juegos5", "tutorials/tom_juegos6"], "envversion": {"sphinx": 63, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["color_list.rst", "index.rst", "logos.rst", "referencias/bufferproxy.rst", "referencias/camera.rst", "referencias/cdrom.rst", "referencias/color.rst", "referencias/cursors.rst", "tutorials/CamaraIntro.rst", "tutorials/ChimpanceLineaporLinea.rst", "tutorials/CrearJuegos.rst", "tutorials/GuiaNewbie.rst", "tutorials/IniciarImportar.rst", "tutorials/ModosVisualizacion.rst", "tutorials/MoverImagen.rst", "tutorials/SpriteIntro.rst", "tutorials/SurfarrayIntro.rst", "tutorials/chimpance.py.rst", "tutorials/tom_juegos2.rst", "tutorials/tom_juegos3.rst", "tutorials/tom_juegos4.rst", "tutorials/tom_juegos5.rst", "tutorials/tom_juegos6.rst"], "indexentries": {"a (atributo de pygame.color)": [[6, "pygame.Color.a", false]], "b (atributo de pygame.color)": [[6, "pygame.Color.b", false]], "bufferproxy (clase en pygame)": [[3, "pygame.BufferProxy", false]], "camera (clase en pygame.camera)": [[4, "pygame.camera.Camera", false]], "cd (clase en pygame.cdrom)": [[5, "pygame.cdrom.CD", false]], "cmy (atributo de pygame.color)": [[6, "pygame.Color.cmy", false]], "color (clase en pygame)": [[6, "pygame.Color", false]], "colorspace() (en el m\u00f3dulo pygame.camera)": [[4, "pygame.camera.colorspace", false]], "compile() (en el m\u00f3dulo pygame.cursors)": [[7, "pygame.cursors.compile", false]], "copy() (m\u00e9todo de pygame.cursors.cursor)": [[7, "pygame.cursors.Cursor.copy", false]], "correct_gamma() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.correct_gamma", false]], "cursor (clase en pygame.cursors)": [[7, "pygame.cursors.Cursor", false]], "data (atributo de pygame.cursors.cursor)": [[7, "pygame.cursors.Cursor.data", false]], "eject() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.eject", false]], "g (atributo de pygame.color)": [[6, "pygame.Color.g", false]], "get_all() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_all", false]], "get_backends() (en el m\u00f3dulo pygame.camera)": [[4, "pygame.camera.get_backends", false]], "get_busy() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_busy", false]], "get_controls() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.get_controls", false]], "get_count() (en el m\u00f3dulo pygame.cdrom)": [[5, "pygame.cdrom.get_count", false]], "get_current() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_current", false]], "get_empty() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_empty", false]], "get_id() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_id", false]], "get_image() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.get_image", false]], "get_init() (en el m\u00f3dulo pygame.cdrom)": [[5, "pygame.cdrom.get_init", false]], "get_init() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_init", false]], "get_name() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_name", false]], "get_numtracks() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_numtracks", false]], "get_paused() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_paused", false]], "get_raw() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.get_raw", false]], "get_size() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.get_size", false]], "get_track_audio() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_track_audio", false]], "get_track_length() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_track_length", false]], "get_track_start() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.get_track_start", false]], "grayscale() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.grayscale", false]], "hsla (atributo de pygame.color)": [[6, "pygame.Color.hsla", false]], "hsva (atributo de pygame.color)": [[6, "pygame.Color.hsva", false]], "i1i2i3 (atributo de pygame.color)": [[6, "pygame.Color.i1i2i3", false]], "init() (en el m\u00f3dulo pygame.camera)": [[4, "pygame.camera.init", false]], "init() (en el m\u00f3dulo pygame.cdrom)": [[5, "pygame.cdrom.init", false]], "init() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.init", false]], "length (atributo de pygame.bufferproxy)": [[3, "pygame.BufferProxy.length", false]], "lerp() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.lerp", false]], "list_cameras() (en el m\u00f3dulo pygame.camera)": [[4, "pygame.camera.list_cameras", false]], "load_xbm() (en el m\u00f3dulo pygame.cursors)": [[7, "pygame.cursors.load_xbm", false]], "module": [[4, "module-pygame.camera", false], [5, "module-pygame.cdrom", false], [7, "module-pygame.cursors", false]], "normalize() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.normalize", false]], "parent (atributo de pygame.bufferproxy)": [[3, "pygame.BufferProxy.parent", false]], "pause() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.pause", false]], "play() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.play", false]], "premul_alpha() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.premul_alpha", false]], "pygame.camera": [[4, "module-pygame.camera", false]], "pygame.cdrom": [[5, "module-pygame.cdrom", false]], "pygame.cursors": [[7, "module-pygame.cursors", false]], "query_image() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.query_image", false]], "quit() (en el m\u00f3dulo pygame.cdrom)": [[5, "pygame.cdrom.quit", false]], "quit() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.quit", false]], "r (atributo de pygame.color)": [[6, "pygame.Color.r", false]], "raw (atributo de pygame.bufferproxy)": [[3, "pygame.BufferProxy.raw", false]], "resume() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.resume", false]], "set_controls() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.set_controls", false]], "set_length() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.set_length", false]], "start() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.start", false]], "stop() (m\u00e9todo de pygame.camera.camera)": [[4, "pygame.camera.Camera.stop", false]], "stop() (m\u00e9todo de pygame.cdrom.cd)": [[5, "pygame.cdrom.CD.stop", false]], "type (atributo de pygame.cursors.cursor)": [[7, "pygame.cursors.Cursor.type", false]], "update() (m\u00e9todo de pygame.color)": [[6, "pygame.Color.update", false]], "write() (m\u00e9todo de pygame.bufferproxy)": [[3, "pygame.BufferProxy.write", false]]}, "objects": {"pygame": [[3, 0, 1, "", "BufferProxy"], [6, 0, 1, "", "Color"], [4, 3, 0, "-", "camera"], [5, 3, 0, "-", "cdrom"], [7, 3, 0, "-", "cursors"]], "pygame.BufferProxy": [[3, 1, 1, "", "length"], [3, 1, 1, "", "parent"], [3, 1, 1, "", "raw"], [3, 2, 1, "", "write"]], "pygame.Color": [[6, 1, 1, "", "a"], [6, 1, 1, "", "b"], [6, 1, 1, "", "cmy"], [6, 2, 1, "", "correct_gamma"], [6, 1, 1, "", "g"], [6, 2, 1, "", "grayscale"], [6, 1, 1, "", "hsla"], [6, 1, 1, "", "hsva"], [6, 1, 1, "", "i1i2i3"], [6, 2, 1, "", "lerp"], [6, 2, 1, "", "normalize"], [6, 2, 1, "", "premul_alpha"], [6, 1, 1, "", "r"], [6, 2, 1, "", "set_length"], [6, 2, 1, "", "update"]], "pygame.camera": [[4, 0, 1, "", "Camera"], [4, 4, 1, "", "colorspace"], [4, 4, 1, "", "get_backends"], [4, 4, 1, "", "init"], [4, 4, 1, "", "list_cameras"]], "pygame.camera.Camera": [[4, 2, 1, "", "get_controls"], [4, 2, 1, "", "get_image"], [4, 2, 1, "", "get_raw"], [4, 2, 1, "", "get_size"], [4, 2, 1, "", "query_image"], [4, 2, 1, "", "set_controls"], [4, 2, 1, "", "start"], [4, 2, 1, "", "stop"]], "pygame.cdrom": [[5, 0, 1, "", "CD"], [5, 4, 1, "", "get_count"], [5, 4, 1, "", "get_init"], [5, 4, 1, "", "init"], [5, 4, 1, "", "quit"]], "pygame.cdrom.CD": [[5, 2, 1, "", "eject"], [5, 2, 1, "", "get_all"], [5, 2, 1, "", "get_busy"], [5, 2, 1, "", "get_current"], [5, 2, 1, "", "get_empty"], [5, 2, 1, "", "get_id"], [5, 2, 1, "", "get_init"], [5, 2, 1, "", "get_name"], [5, 2, 1, "", "get_numtracks"], [5, 2, 1, "", "get_paused"], [5, 2, 1, "", "get_track_audio"], [5, 2, 1, "", "get_track_length"], [5, 2, 1, "", "get_track_start"], [5, 2, 1, "", "init"], [5, 2, 1, "", "pause"], [5, 2, 1, "", "play"], [5, 2, 1, "", "quit"], [5, 2, 1, "", "resume"], [5, 2, 1, "", "stop"]], "pygame.cursors": [[7, 0, 1, "", "Cursor"], [7, 4, 1, "", "compile"], [7, 4, 1, "", "load_xbm"]], "pygame.cursors.Cursor": [[7, 2, 1, "", "copy"], [7, 1, 1, "", "data"], [7, 1, 1, "", "type"]]}, "objnames": {"0": ["py", "class", "Python clase"], "1": ["py", "attribute", "Python atributo"], "2": ["py", "method", "Python m\u00e9todo"], "3": ["py", "module", "Python m\u00f3dulo"], "4": ["py", "function", "Python funci\u00f3n"]}, "objtypes": {"0": "py:class", "1": "py:attribute", "2": "py:method", "3": "py:module", "4": "py:function"}, "terms": {"0": [3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22], "0x00": 6, "0xff": 6, "0xrrggbb": 6, "0xrrggbba": 6, "1": [1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17], "10": [9, 11, 14, 16, 17, 18, 21, 22], "100": [6, 8, 11, 14, 16], "1000": 11, "101": 2, "105": 8, "1080": 13, "12": [9, 17], "120": 7, "128": 16, "1280": [9, 17], "1280x480": 9, "13": [16, 22], "145": 8, "15": [9, 17], "150": 18, "1561": 2, "16": [7, 13, 16], "1617": 2, "16711680": 13, "170": [8, 9, 17], "18": [9, 17], "187": [9, 17], "192": 11, "1920": 13, "1s": 14, "2": [3, 4, 5, 6, 7, 8, 9, 11, 16, 17], "20": [7, 11, 16], "2000": 1, "2001": 2, "2004": 4, "2021": 2, "214": 2, "235": [9, 17], "238": [9, 17], "24": [3, 4, 7, 16], "24x24": 7, "25": [9, 17], "250": 18, "255": [6, 8, 9, 11, 13, 16, 18], "28": 11, "29": 2, "2d": [1, 15, 16], "2s": 14, "2x2": 16, "3": [2, 3, 4, 6, 7, 11, 14, 15, 16], "30": [7, 8, 11], "32": [3, 4, 13, 16], "33": 16, "35": 11, "36": 18, "360": [6, 9, 17], "3d": [11, 16], "3x3": 16, "4": [3, 6, 8, 9, 11, 12, 13, 14, 16, 17, 19, 22], "40": [2, 7, 11, 14], "400": [7, 8], "438": 2, "47": 22, "480": [8, 9, 13, 14, 17, 22], "4to": 16, "5": [6, 8, 9, 14, 16, 17, 22], "50": [2, 7, 8, 11, 16, 18], "6": [14, 16], "60": [2, 7, 9, 17, 22], "600": [7, 13, 14], "63": 6, "64": [6, 9, 17], "640": [2, 8, 13, 14, 22], "640x480": [4, 14, 16], "65280": 13, "6x": 11, "7": 16, "75": 7, "8": [3, 4, 6, 7, 13, 14, 16, 22], "80": [9, 17], "800": 13, "9": [1, 3, 4, 6, 8, 16], "90": [8, 9, 17, 22], "A": [3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22], "Al": [8, 9, 12, 13, 14, 15, 16, 18], "Algo": 10, "Antes": [9, 10, 12, 14], "Con": [11, 14, 15, 16, 18, 21], "De": [4, 7, 9, 15, 16, 21, 22], "El": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 19, 20, 21], "En": [1, 3, 4, 6, 7, 8, 9, 10, 11, 13, 15, 16, 18, 19, 20, 21, 22], "Entre": 9, "Es": [3, 5, 9, 11, 12, 14, 15, 16, 21], "Esa": [14, 15], "Ese": 9, "Eso": 14, "Esta": [1, 3, 4, 9, 11, 12, 13, 14, 15, 20], "Estar\u00e1": 11, "Estas": [6, 7, 9, 11, 13, 15, 16, 20], "Este": [1, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16], "Esto": [1, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22], "Estos": [2, 11, 13, 15, 16, 18], "Estoy": 11, "Est\u00e1": 14, "Est\u00e1s": 22, "Hay": [4, 8, 11, 13, 14, 15, 16], "He": [10, 11, 22], "La": [3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19, 20, 21, 22], "Las": [1, 3, 4, 6, 7, 9, 11, 12, 14, 16, 19], "Les": 10, "Lo": [8, 9, 10, 11, 13, 14, 15, 16, 18, 20, 21, 22], "Los": [1, 3, 4, 5, 6, 7, 9, 12, 14, 16, 20, 21], "Mi": 16, "NO": 4, "No": [4, 9, 12, 14, 15, 16, 20], "Nos": 9, "O": [13, 15], "OS": 4, "Otra": [11, 15, 16, 19], "Otras": 14, "Otro": [14, 15], "Por": [2, 3, 6, 7, 8, 11, 12, 13, 15, 16, 18, 19, 20, 22], "Qui\u00e9n": 15, "Qu\u00e9": 11, "Se": [3, 6, 7, 9, 11, 12, 14, 22], "Sin": [11, 14, 16, 22], "Son": 15, "Sonido": 9, "Te": 4, "Tu": 15, "Un": [1, 3, 7, 10, 11, 15, 16], "Una": [1, 4, 5, 9, 11, 12, 15, 16, 18], "Uno": 14, "Y": [6, 7, 11, 13, 14, 18, 22], "Ya": [9, 11, 21], "Yo": 11, "_": 6, "__file__": [9, 17], "__init__": [8, 9, 14, 15, 17, 19, 20, 21, 22], "__main__": [17, 18, 22], "__name__": [17, 18, 22], "_camer": 4, "_init_": 15, "_spin": [9, 17], "_sprite__g": 15, "_spritegroup": 15, "_walk": [9, 17], "aa": [6, 16], "aaa": 16, "abaj": [6, 11, 14, 16, 21], "abandon": [4, 12], "abiert": [1, 18], "abord": 10, "abov": 4, "abre": 4, "abrim": 8, "abrir": [5, 9, 19], "absolut": [5, 11, 14], "abspath": [9, 17], "aburr": [11, 19], "aca": [4, 9, 13, 14, 15, 16, 19, 20, 21], "acarre": 9, "acced": [5, 15, 16], "acces": [11, 13, 16], "access": 11, "accion": [5, 9, 21], "acel": 11, "aceler": [11, 15, 18], "acept": 14, "acerc": [1, 13, 15], "aclar": 14, "acolor": 6, "acord": 11, "acostumbr": 22, "across": [9, 17, 20, 22], "actu": 11, "actual": [4, 5, 9, 11, 13, 15, 20, 21, 22], "actualic": [9, 15], "actualiz": [10, 11, 12, 13, 14, 15, 18, 20], "actualizac": 9, "actualzi": 13, "acuerd": 16, "adapt": 18, "add": [10, 15, 16], "add_internal": 15, "adecu": [9, 13, 14, 15, 16, 19, 21], "adel": [9, 12, 15, 16, 18], "ademas": [5, 7, 9, 14, 15, 16, 19, 22], "adentr": 8, "adicional": [7, 15, 16, 22], "adivin": 11, "administr": [1, 5, 15], "admit": [4, 6, 7, 8, 11, 20], "adopt": [10, 15], "adquir": 20, "advertent": 9, "advis": 4, "aen": 11, "afect": [15, 16], "afin": 15, "afirm": 4, "afortun": [11, 14, 16, 22], "after": 3, "afuer": 9, "agost": 2, "agp": 16, "agrad": 9, "agreg": [8, 9, 10, 11, 14, 15, 16, 20, 22], "agrup": 19, "ah": 22, "ahi": [11, 14, 16], "ahor": [8, 9, 10, 11, 15, 16, 18, 20, 21, 22], "ahorr": [4, 11], "ai": [19, 22], "ajust": [6, 15, 16, 22], "alcanc": 16, "alcanz": 3, "aleatori": 10, "alfa": [6, 11, 16, 19], "algun": [1, 4, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22], "ali": 15, "aliasing": 18, "aliceblu": 0, "aliens": 15, "aliment": 22, "alin": 11, "aliv": 15, "all": 5, "all_my_sprites_list": 11, "allblack": 16, "alli": [14, 21], "allow": 8, "allsprit": [9, 17], "almacen": [7, 14, 15], "along": 17, "alpha": [6, 16], "alrededor": [9, 11], "also": 7, "altas": 11, "alter": 11, "altern": [5, 7], "alto": [4, 7, 13, 14], "altur": [7, 11, 15, 16], "amar": 11, "ambas": [11, 14, 16, 22], "ambos": [11, 15, 16], "ampli": [2, 4, 15], "an": [4, 7, 8, 11], "analic": 20, "analiz": [11, 15], "ancho": [4, 7, 11, 13, 14], "and": [4, 6, 7, 8, 9, 11, 16, 17, 19, 20, 22], "andand": 15, "anding": 11, "andmasks": 7, "angle": [20, 22], "angul": [8, 20, 22], "anim": [1, 14, 15], "animation": 11, "anormal": 22, "antecedent": 11, "antecesor": 3, "anterior": [7, 8, 9, 14, 15, 18, 20, 22], "anti": 18, "antigu": [14, 15, 21], "antiquewhit": 0, "antiquewhite1": 0, "antiquewhite2": 0, "antiquewhite3": 0, "antiquewhite4": 0, "anul": [4, 11], "anunci": 9, "any": [0, 4, 11], "apag": 9, "aparec": [7, 11, 15], "aparent": 10, "aparezc": 11, "aparient": 9, "apart": [11, 20], "apeg": 11, "api": [4, 8], "aplic": [3, 6, 8, 11, 16, 21], "aport": 11, "append": [8, 14, 15], "appli": 6, "apps": 8, "apreci": 11, "aprend": [11, 13, 14, 16, 22], "aprendel": 14, "aprendizaj": [14, 16], "apret": 8, "apropi": [9, 13, 15], "aproxim": [8, 9], "apuest": 13, "apunt": [7, 8, 10, 15], "aqu": [0, 2, 9, 11, 12, 14, 15, 16, 18, 20, 21, 22], "aquamarin": 0, "aquamarine1": 0, "aquamarine2": 0, "aquamarine3": 0, "aquamarine4": 0, "aquell": [9, 10], "arang": 16, "arbitrari": 14, "arbol": 8, "arcad": 11, "archiv": [1, 7, 9, 10, 11, 14, 19], "are": [4, 8, 9, 11, 14, 15, 16, 17, 18, 20, 21, 22], "argument": [3, 4, 5, 6, 7, 9, 11, 13, 14, 15, 18], "arguments": 1, "arising": 4, "aritmet": [6, 16], "armad": 15, "array": [6, 16], "array2d": 16, "array3d": 16, "array_alph": 16, "array_colorkey": 16, "arraydem": [1, 16], "arrays": [1, 7, 16], "arregl": 11, "arreys": 3, "arrib": [8, 9, 11, 14, 16, 21], "arrow": 7, "arruin": 16, "articul": 14, "as": [3, 4, 7, 8, 9, 16, 17, 20], "ascii": 7, "asegur": [8, 9, 16, 18, 19], "asegurart": [11, 16], "asegurat": 16, "asegurens": 16, "asi": [7, 9, 10, 11, 14, 15, 16, 18, 19, 20, 21, 22], "asign": [6, 9, 13, 14, 16, 21], "asil": 8, "asim": 9, "asombr": 11, "astype": 16, "asum": [6, 8, 10, 15, 19, 21], "asunt": 20, "at": [8, 9, 17, 22], "ataj": 15, "atent": 18, "atrap": [14, 15, 22], "atras": [9, 16], "atraves": 9, "atribut": [9, 15, 18, 20, 21], "attribut": [15, 20, 21, 22], "attributeerror": 15, "aument": [9, 11, 16], "aun": [4, 10, 11, 13, 14, 16, 22], "aunqu": [4, 9, 16, 18, 19, 21, 22], "author": [4, 13, 15], "automat": [5, 9, 12], "automatiz": 11, "autor": [8, 9, 11, 12, 14, 16], "avail": [4, 7], "avanz": [1, 9, 14], "average_color": 8, "average_surfac": 8, "avid": 11, "ayud": [1, 7, 9, 13, 15, 20], "ayudart": [10, 15], "azul": [6, 8, 9, 16, 20], "azur": 0, "azure1": 0, "azure2": 0, "azure3": 0, "azure4": 0, "a\u00f1ad": [11, 15], "a\u00f1o": 11, "a\u00f1os": [1, 11], "b": [6, 16], "back": [9, 17], "backend": 4, "backends": 4, "background": [8, 9, 14, 17, 18, 22], "baj": [1, 9, 19], "bal": [11, 15], "ball": [19, 20, 21], "ballsprit": 22, "bander": [3, 6, 11, 13], "bann": [1, 17], "barat": 15, "bas": [3, 4, 8, 9, 14, 15, 16, 17, 20, 22], "basic": [1, 4, 6, 9, 10, 11, 14, 15, 16, 19, 20, 21, 22], "bastant": [8, 11, 12, 14, 15, 16, 18, 19, 20, 21, 22], "bat": [10, 22], "bay": 4, "bb": 6, "be": [4, 11, 16], "beam": 7, "been": 6, "befor": 3, "beig": 0, "being": 4, "benefici": [14, 15], "beos": 11, "bett": 11, "bg": 8, "bgr": 16, "bibliotec": [4, 13, 14, 15], "bidding": 9, "bidimensional": [14, 16], "bien": [9, 11, 13, 15, 16, 18, 20], "big": [3, 15], "bin": [17, 18, 19, 20], "binari": [1, 6, 7], "binary": [4, 7], "bisqu": 0, "bisque1": 0, "bisque2": 0, "bisque3": 0, "bisque4": 0, "bit": [8, 13, 16], "bitblt": 14, "bitmap": 7, "bitmap_1": 7, "bitmap_2": 7, "bitmask": 7, "bits": [3, 4, 7, 13, 14, 16], "bitsiz": 13, "bl": 22, "black": [0, 7], "blanc": [7, 8, 9, 10, 11, 14, 18], "blanchedalmond": 0, "blend_premultipli": 6, "blit": [6, 8, 9, 11, 16, 17, 18, 20, 22], "blit_array": 16, "blit_hw": 13, "blit_hw_": 13, "blit_hw_cc": 13, "blit_sw": 13, "blit_sw_": 13, "blit_sw_cc": 13, "blits": 11, "blitt": [9, 11, 14, 15, 18, 20, 21, 22], "blitte": 11, "blitters": 14, "blitting": [9, 11, 16], "blob": 8, "block": 3, "bloqu": [3, 9, 11, 16], "bloque": [3, 4, 8], "blt": 14, "blu": [0, 4, 6, 9, 18], "blue1": 0, "blue2": 0, "blue3": 0, "blue4": 0, "blueviolet": 0, "bmp": 14, "bol": 22, "bolean": 3, "bomb": [15, 21], "bombs": 15, "bondad": 9, "bonit": 14, "bonus": 14, "bool": [4, 5], "boolean": [4, 15], "boom": 15, "boom_sound": 15, "bord": 22, "borr": [1, 9, 11, 14, 15], "both": 8, "boton": [9, 10, 11, 14, 18, 21], "bottomleft": 22, "bottomright": 22, "br": 22, "brev": [5, 10, 12, 14, 16], "brevement": [18, 21], "brightmap": 16, "brightness": 4, "brill": [4, 7, 8], "brind": 9, "broadcast": 16, "broken_x": 7, "brown": 0, "brown1": 0, "brown2": 0, "brown3": 0, "brown4": 0, "bucl": [8, 10, 11, 14, 15, 19, 20, 21, 22], "bucle": 20, "buen": [9, 10, 11, 14, 15, 16, 18, 19, 20, 22], "buf": [3, 4, 6, 15], "buffer": 11, "bufferproxy": [1, 3], "buffers": 15, "builtin": 4, "burlywood": 0, "burlywood1": 0, "burlywood2": 0, "burlywood3": 0, "burlywood4": 0, "bus": [11, 16], "busc": [5, 8, 9, 14, 15, 16, 19], "business": 4, "busqued": 1, "but": [4, 11, 17], "by": [4, 6, 8, 17], "bytes": [3, 4, 6, 7], "bytesiz": 13, "c": [3, 4, 6, 12, 16], "cabez": 11, "cad": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "caden": [3, 4, 5, 7, 19, 20], "cadetblu": 0, "cadetblue1": 0, "cadetblue2": 0, "cadetblue3": 0, "cadetblue4": 0, "cadilac": 15, "caer": 10, "caj": [15, 21], "calaver": 7, "calcnewp": [20, 22], "calcul": [20, 22], "calculat": 20, "calibr": 8, "calibrat": 8, "calid": 9, "call": [9, 11, 12, 13, 14, 15, 16, 17, 20], "callabl": 3, "callback": 3, "calls": [11, 17], "calul": 21, "cam": [1, 4], "cambi": [1, 4, 6, 7, 8, 9, 10, 11, 13, 15, 16, 20, 21, 22], "camer": 8, "camin": 14, "camlist": 8, "camp": [3, 11], "can": [4, 9, 17], "canal": [6, 11, 16], "canch": 22, "cannot": [19, 22], "cantid": [4, 11, 15], "cap": [2, 15], "capac": [4, 13, 15, 19, 20], "captur": [1, 4, 9], "capturing": 4, "caract": 3, "caracter": [7, 11], "caracterist": [6, 13, 16, 20], "caracters": 7, "carg": [1, 4, 7, 10, 11, 13, 14, 16, 20], "carpet": 9, "cas": [4, 6, 8, 9, 11, 13, 15, 18, 20, 21], "casi": [1, 9, 10, 15, 16, 19], "castig": 13, "categoriz": 15, "caus": [4, 9, 11, 15, 16, 17], "cc": 8, "ccolor": 8, "cd": 5, "cent": [8, 9, 17], "center": 17, "centerx": [9, 17, 18], "centr": [8, 16, 18], "central": 9, "cer": [5, 6, 13, 15, 16, 22], "cerc": [14, 15], "cercan": [13, 16], "cerr": [7, 8, 14, 18, 19, 21], "certain": 6, "chang": [4, 6, 15], "channel": 11, "chartreus": 0, "chartreuse1": 0, "chartreuse2": 0, "chartreuse3": 0, "chartreuse4": 0, "chatroom": 14, "check": [11, 20], "checking": 11, "checks": 4, "chimp": [9, 15], "chimpanc": [1, 10, 19], "choc": [9, 11, 15, 22], "chocolat": 0, "chocolate1": 0, "chocolate2": 0, "chocolate3": 0, "chocolate4": 0, "choic": 8, "chrominanc": 4, "cierr": [4, 14], "ciert": [6, 8, 10, 11, 14, 16], "circl": [7, 8], "circul": [7, 8, 15], "circunst": 22, "clar": [11, 12, 18], "clark": 11, "clas": [1, 3, 6, 8, 10, 11, 14, 19], "clasific": 11, "class": [5, 6, 8, 9, 14, 15, 17, 20, 21, 22], "clausul": 22, "clav": [1, 3, 4, 6, 9, 11, 15, 16], "cle": [9, 15], "cleanup": 9, "clench": [9, 17], "click": [7, 18], "clicke": 11, "clist": 8, "clock": [7, 9, 17, 22], "clon": 6, "clos": 4, "close_to_play": 15, "close_to_player2": 15, "close_to_player3": 15, "clse": 15, "cmy": 6, "cod": [4, 7, 11], "codific": 7, "codig": [1, 3, 4, 7, 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 21, 22], "coding": 10, "coercion": 16, "coinc": [9, 13], "coincid": [3, 13, 15, 16], "coincident": 13, "col": [4, 9, 11, 21], "coleccion": 12, "colision": [8, 20, 22], "collid": [9, 17], "collidepoint": [11, 22], "colliderect": [9, 17, 22], "collision": [11, 22], "collisions": 11, "coloc": [2, 9, 10, 14, 19], "colocas": 20, "color": [1, 4, 7, 9, 11, 13, 14, 16, 18], "color_list": 6, "color_valu": 6, "colorclav": 16, "colordict": 0, "colorkey": [9, 17], "colors": 0, "colorspac": [4, 8], "column": 16, "com": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22], "comand": 12, "combin": [11, 15, 22], "comenc": 14, "coment": [10, 22], "comentari": [15, 20], "comenz": [5, 13, 15, 16, 22], "comenzas": 18, "comercial": 1, "comienc": 11, "comienz": [3, 4, 5], "comments": 17, "comod": [1, 20], "comp": 11, "compar": [6, 11, 16], "compat": [4, 8, 11], "compatibil": 19, "compens": 9, "compil": [1, 5, 7, 9, 22], "complej": [9, 11, 15, 19, 20, 21], "complet": [1, 6, 8, 11, 13, 14, 15, 16, 18, 19, 20, 22], "completamt": 16, "complic": [11, 15, 16], "component": [6, 16], "components": 6, "comport": 22, "comprend": [15, 22], "comprension": [1, 10, 16, 22], "comprim": 11, "comprob": [9, 11, 12, 20, 21, 22], "comprueb": [5, 9, 15, 22], "compuest": [1, 14, 20], "comput": [1, 4, 5, 9, 11, 14, 15], "computariz": 8, "comrpob": 15, "comun": [9, 10, 11, 12, 14], "concept": [1, 10, 14, 16, 20], "condicion": [7, 9, 22], "condicional": 22, "conditions": 4, "conect": [10, 14], "conexion": 19, "confi": 11, "confiabl": [4, 11], "confianz": 11, "configur": [4, 9, 11, 12, 14, 16, 18, 20], "confund": 11, "confus": [11, 14], "confusion": 11, "conjunt": [3, 6, 7, 12, 16, 21], "conmig": 16, "connect": 8, "connected_component": 8, "conoc": 11, "conoces": 8, "cons": [5, 18], "conscient": 16, "consej": 11, "consequential": 4, "conserv": 6, "conserval": 11, "consider": [4, 11, 22], "consist": 16, "consistent": 10, "constant": [7, 8, 11, 19], "constrol": 4, "constru": [14, 15, 16, 18, 22], "constructor": [9, 15], "consult": [6, 8, 13, 14], "consum": 11, "contact": [8, 9, 12, 13, 14, 15, 16], "contain": 14, "contains": [9, 17, 21, 22], "conte": 3, "conten": [9, 13, 15], "contenedor": [9, 11, 15], "conteng": 11, "context": 15, "contien": [5, 7, 9, 11, 13, 15, 16, 19, 22], "contigu": 3, "continu": [8, 9, 14, 15, 16, 18, 21, 22], "contorn": 8, "contr": [8, 20], "contract": 4, "contrari": [3, 4, 7, 14, 16, 22], "contrast": 8, "contribu": 15, "contributors": 4, "control": [4, 7, 9, 11, 12, 13, 19], "controlaor": 4, "controls": 4, "conv": 14, "convenient": [2, 14], "conversion": [4, 6, 11], "convert": [7, 9, 13, 14, 16, 17, 18, 19, 22], "convert_alph": [19, 22], "convertis": 11, "conviert": [4, 9, 13], "convulcion": 16, "cooper": 5, "coord": 8, "coorden": [7, 18, 22], "coordin": 11, "copi": [9, 11, 14, 15, 16, 18], "copy": [3, 7, 15], "copyright": 4, "coral": 0, "coral1": 0, "coral2": 0, "coral3": 0, "coral4": 0, "corchet": 20, "cornflowerblu": 0, "cornsilk": 0, "cornsilk1": 0, "cornsilk2": 0, "cornsilk3": 0, "cornsilk4": 0, "corr": [9, 11, 13], "corre": [11, 14], "correccion": 22, "correct": [1, 4, 7, 9, 11, 14, 15, 16, 21, 22], "correct_gamm": 6, "correg": 22, "correl": 14, "correspond": 22, "correspondient": [11, 21], "corrient": [8, 15], "cort": [9, 11, 16], "cos": [6, 8, 9, 10, 12, 14, 15, 16, 18, 19, 20, 22], "cost": 11, "costos": 16, "costumbr": 20, "cotninu": 18, "could": [7, 16], "couldn": [19, 22], "count": [5, 8], "cpu": 11, "cre": [1, 2, 3, 5, 6, 7, 8, 11, 13, 15, 16, 18, 19, 20, 21, 22], "creacion": [11, 14, 15], "creas": 20, "creat": [6, 7, 11, 17, 20], "create_graphics_scr": 14, "create_scr": 14, "creating": 0, "crect": 8, "crimson": 0, "criptic": 15, "critic": 11, "critt": [9, 17], "crossbon": 7, "crossh": 7, "crucial": 11, "crud": [9, 14], "cruz": [7, 9, 15], "cuadr": [4, 8, 9, 11, 14, 15, 18, 21, 22], "cualqu": [10, 11, 13, 22], "cualqui": [1, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21], "cuan": 11, "cuand": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "cuant": [5, 20], "cuart": 7, "cuatr": [5, 7, 22], "cubr": [1, 8, 13, 14, 18], "cuent": [4, 6, 7, 8, 10, 11, 12, 13, 15, 16], "cuid": [16, 18], "culp": 11, "cumpl": [7, 11, 14], "curosr": 7, "current": [4, 5, 7], "current_h": 13, "current_w": 13, "cursor": [1, 9], "cursor_args": 7, "cursor_index": 7, "cursorfil": 7, "cursors": [1, 7, 11], "cuy": [18, 21], "cu\u00e1l": [9, 15], "cu\u00e1les": [11, 15], "cyan": 0, "cyan1": 0, "cyan2": 0, "cyan3": 0, "cyan4": 0, "da": [9, 14, 19], "dad": [6, 7, 8, 11, 13, 14, 15, 16], "dal": 14, "dam": [13, 18], "damag": 4, "dan": 20, "dandol": [18, 20], "dar": [13, 16, 20], "darkblu": 0, "darkcy": 0, "darkgoldenrod": 0, "darkgoldenrod1": 0, "darkgoldenrod2": 0, "darkgoldenrod3": 0, "darkgoldenrod4": 0, "darkgr": 0, "darkgray": 0, "darkgrey": 0, "darkkhaki": 0, "darkmagent": 0, "darkolivegr": 0, "darkolivegreen1": 0, "darkolivegreen2": 0, "darkolivegreen3": 0, "darkolivegreen4": 0, "darkorang": 0, "darkorange1": 0, "darkorange2": 0, "darkorange3": 0, "darkorange4": 0, "darkorch": 0, "darkorchid1": 0, "darkorchid2": 0, "darkorchid3": 0, "darkorchid4": 0, "darkr": 0, "darksalmon": 0, "darkseagr": 0, "darkseagreen1": 0, "darkseagreen2": 0, "darkseagreen3": 0, "darkseagreen4": 0, "darkslateblu": 0, "darkslategray": 0, "darkslategray1": 0, "darkslategray2": 0, "darkslategray3": 0, "darkslategray4": 0, "darkslategrey": 0, "darkturquois": 0, "darkviolet": 0, "darl": [7, 9], "dars": 11, "dart": 19, "das": 11, "dat": [3, 4, 5, 7, 9, 11, 14, 15, 16, 17, 19, 22], "data_d": [9, 17], "dav": 11, "deb": [3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "debaj": 16, "debat": 11, "debil": 3, "dec": [3, 9, 10, 11, 14, 16, 18, 21], "decid": [9, 10, 15], "decinicializ": 5, "declar": [16, 22], "decodific": 7, "decor": 18, "ded": 16, "dedic": [11, 15], "dediqu": 11, "deeppink": 0, "deeppink1": 0, "deeppink2": 0, "deeppink3": 0, "deeppink4": 0, "deepskyblu": 0, "deepskyblue1": 0, "deepskyblue2": 0, "deepskyblue3": 0, "deepskyblue4": 0, "def": [8, 9, 14, 15, 17, 18, 19, 20, 21, 22], "default": [9, 13], "defect": 13, "deficient": 10, "defin": [9, 10, 11, 18, 21], "definit": [12, 15, 16], "definitv": 15, "dej": [5, 9, 11, 12, 13, 15, 16, 18, 21], "delay": 14, "dem": 16, "demas": [4, 18], "demasi": [9, 11, 14, 16, 18], "demoras": 11, "demostr": [9, 16], "demuestr": 9, "denl": 10, "dentr": [3, 7, 8, 9, 11, 16, 22], "depend": [9, 11, 19, 21], "depending": [9, 17], "deprecat": 6, "depth": 13, "depur": 21, "derech": [6, 14, 20, 22], "deriv": [9, 15], "des": [4, 6, 9, 10, 13, 15, 16, 19, 21], "desact": 22, "desafortun": 11, "desagrad": 19, "desaparec": [4, 11, 15], "desarroll": 19, "desbloqu": 11, "desbord": 16, "descarg": 16, "descargal": 22, "desconect": 10, "describ": [3, 8, 13, 19], "descripcion": 14, "descript": 13, "description": [4, 7], "descrit": 7, "descri\u00e7ion": 15, "descrubr": 11, "descubr": [13, 14, 22], "desd": [1, 3, 5, 7, 9, 11, 12, 14, 15, 16, 18, 20, 22], "dese": [10, 11], "desempaquet": 6, "desesper": 14, "deshac": 8, "design": 21, "desinfl": 22, "desinicializ": [4, 5], "desorden": 15, "despaci": 16, "desplaz": [3, 11, 14, 15, 16], "despu": 22, "despues": [5, 8, 11, 14, 16, 20, 22], "dest": 16, "destac": 20, "destil": 11, "destin": [4, 11, 14, 16, 18], "destru": [9, 12, 15], "destsurfac": 4, "desventaj": [11, 13], "detall": [1, 8, 10, 11, 22], "deteccion": 8, "detect": [8, 11], "deten": [5, 14, 21], "detendr": 5, "deteng": 14, "deterior": 9, "determin": [5, 6, 7, 9, 11, 13, 15, 16, 20], "detien": [4, 5, 21], "detras": [1, 20, 21, 22], "dev": [4, 8], "deveuelv": 13, "devic": [4, 5], "devolu": 13, "devolv": [3, 4, 5, 6, 8, 9, 11, 12, 13, 15], "devuelt": [4, 6, 15], "devuelv": [4, 5, 6, 7, 9, 13, 14, 15, 16, 19, 22], "dga2": 11, "dia": 15, "diagram": [20, 21], "diamond": 7, "diari": 11, "dibuj": [1, 8, 11, 14, 15, 18], "dic": 10, "diccionari": [6, 11, 15], "dich": [10, 11, 18], "dict": 3, "dictionary": 15, "dif": 6, "diferenci": 11, "diferent": [1, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 20, 21], "difernt": 11, "diff": 16, "dificil": [10, 11, 15, 16], "dificult": 10, "dificultad": 14, "difier": 6, "dig": [11, 14, 15, 21], "digit": 6, "digital": 15, "dimension": [3, 4, 9, 16, 22], "dimensions": 4, "dimgray": 0, "dimgrey": 0, "dir": 13, "direccion": [3, 9, 11, 16, 19, 20, 22], "direct": [3, 4, 7, 11, 14, 15, 16], "directori": [9, 14, 19], "dirty": [11, 15], "dirty_rects": 11, "disabl": [9, 17], "disc": [5, 11], "disclaim": 4, "discotinuous": 3, "discut": [11, 15], "dise\u00f1": [3, 10, 14, 15, 21], "disk": 11, "dismension": 16, "dispar": 15, "display": [7, 8, 9, 11, 13, 14, 15, 17, 18, 20, 21, 22], "dispnibl": 2, "dispon": [2, 4, 6, 7, 9, 11, 12, 13, 14, 15, 16], "disponibil": [4, 9], "disposit": [4, 5, 8, 11, 13], "dispuest": [14, 16], "distint": 11, "distribu": [1, 9], "distribution": 4, "divert": [8, 16], "divertit": 14, "divid": [7, 10, 11, 14, 15, 16], "divis": 7, "division": [6, 16], "divsion": 16, "dizzy": [9, 17], "do": 11, "dobl": [7, 9, 16], "docen": 11, "document": [8, 10, 11, 13, 16, 19, 20], "documentation": [4, 8, 15], "dodgerblu": 0, "dodgerblue1": 0, "dodgerblue2": 0, "dodgerblue3": 0, "dodgerblue4": 0, "doesn": 22, "dokill": 15, "dokill1": 15, "dokill2": 15, "dolor": 11, "domin": 16, "dond": [1, 2, 3, 6, 7, 9, 11, 14, 15, 16, 18, 21, 22], "dos": [4, 5, 6, 7, 9, 11, 14, 15, 16, 18, 20], "doubl": [7, 11], "doublebuf": 11, "downloads": 16, "drastic": 18, "draw": [8, 9, 11, 15, 17, 22], "drawplain": 9, "driv": 5, "dud": 14, "dummy": 15, "duplic": 16, "duracion": 5, "durant": [4, 5, 11, 15, 16], "dvd": 5, "dx": [20, 22], "dy": [20, 22], "each": 11, "easily": 8, "east": 7, "easy": 11, "echal": [16, 22], "eclecti": 8, "edicion": 11, "editor": 11, "efec": 8, "efect": [1, 8, 9, 11, 14, 16, 19, 21], "efectp": 16, "eficient": [1, 14, 15], "eje": [9, 18, 20], "eject": 5, "ejecu": 9, "ejecut": [9, 11, 13, 14, 18], "ejempl": [1, 3, 6, 7, 8, 10, 11, 12, 14, 15, 18, 19, 20, 21], "ejes": 20, "eleccion": 4, "eleg": [4, 7, 10, 11, 14, 15, 16], "element": [3, 6, 14, 15, 16], "elemental": 20, "elements": 6, "elif": [9, 17, 21, 22], "elig": [7, 14], "elij": 13, "elimin": [3, 11, 14, 15, 16, 21, 22], "ello": [8, 18], "else": [9, 13, 15, 17, 19, 22], "emails": 11, "embarg": [11, 16, 20], "emocion": [9, 14, 16], "empaquet": 13, "empec": 16, "empez": [14, 15, 16, 20], "empic": 9, "empiec": 9, "empiez": 15, "empty": 15, "emul": 13, "encapsul": 21, "encarg": 9, "enciend": 11, "encog": 11, "encontr": [1, 4, 5, 6, 8, 9, 11, 12, 13, 14, 16, 18, 21, 22], "encontras": 8, "encuentr": [7, 9, 11, 14, 15, 16, 19, 22], "end": 5, "end_index": 16, "endi": 3, "ends": [9, 17], "enemig": 15, "enfoc": 8, "enga\u00f1art": 16, "enlaz": [13, 15], "enorgullec": 14, "ense\u00f1": 14, "entend": [10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22], "enter": [3, 4, 5, 6, 16], "entiend": [10, 22], "entonc": [6, 9, 10, 11, 13, 16, 20, 21], "entonecs": 18, "entorn": 19, "entrad": [3, 4, 8, 10, 11], "entrar": 11, "entren": 11, "enuemr": 4, "enumer": 4, "enumerat": 4, "enumeration": 4, "env": [17, 19], "envi": 22, "environment": 20, "envoltori": 11, "envuelt": 7, "equivalent": 3, "equivoc": 11, "err": [19, 22], "error": [6, 9, 11, 12, 15, 16, 19, 22], "escal": [6, 9, 16], "escalar": 9, "escan": 5, "escap": [9, 22], "escen": 8, "escond": 9, "escri": 11, "escrib": [3, 9, 10, 11, 16, 19, 20], "escrit": [10, 11, 12, 15, 19, 20], "escritori": 13, "esencial": 16, "espaci": [3, 4, 6, 9, 10, 12, 14], "espa\u00f1ol": [8, 9, 10, 11, 12, 13, 14, 15, 16], "especi": 9, "especial": [7, 9, 11, 13, 14, 15, 16, 18, 19], "especializ": 15, "especif": [8, 9, 11, 13, 15, 16], "especific": [4, 13, 16, 22], "especificas": 11, "especifiqu": 11, "esper": [6, 7, 8, 9, 11, 14, 15, 16, 20], "esquin": [8, 9, 11, 14, 22], "estab": [8, 11, 14, 15, 21], "establec": [3, 6, 7, 9, 11, 13, 14, 16, 18, 19, 20, 21, 22], "establecer": 12, "estam": [8, 9, 14, 15, 16], "estan": [1, 2, 4, 6, 7, 9, 11, 12, 13, 14, 15, 16, 19, 21, 22], "estand": [7, 8, 9, 10, 13, 15, 16], "estaras": 16, "estat": 15, "estefan": [8, 10, 11, 12, 13, 14, 15, 16], "estefani": 9, "estel": 11, "esten": [8, 9, 12, 13], "estes": [11, 14, 18], "estil": [8, 19], "estpa": 20, "estrateg": 11, "estrategi": 11, "estrell": 15, "estrict": [10, 18], "estrictur": 21, "estructur": [3, 18, 20, 21], "estrucutr": 18, "estudi": [16, 20], "estuv": [9, 11, 14], "etap": 8, "etc": [10, 11, 16], "evalu": 9, "even": 4, "event": [4, 7, 8, 14, 17, 22], "events": [8, 9, 11, 17], "everything": 17, "evit": [5, 8, 16, 22], "exact": [6, 7, 8, 9, 11, 13, 14, 15, 16], "examin": [1, 9, 15], "exampl": [7, 9, 16], "exced": 19, "excelent": [9, 11, 14], "excepcion": [3, 6, 7, 12, 16], "except": [10, 16, 19, 22], "exclu": 3, "execut": 17, "exemplary": 4, "exis": 9, "exist": [2, 5, 7, 8, 11, 15, 16], "existent": [4, 5], "exit": [4, 11, 14, 19, 22], "expand": 10, "experient": 15, "experimental": [4, 8], "explanation": 17, "explic": [9, 11, 12, 14, 15, 19, 20, 22], "explicaicon": 15, "explicit": [9, 12], "explicitly": 4, "expliqu": 15, "explor": 14, "explosion": 15, "export": 6, "exporting": 3, "expresion": 6, "express": 4, "expuls": 5, "extend": 3, "extern": 7, "extiend": 11, "extra": [4, 9, 14], "extras": 13, "extraterrestr": 15, "extra\u00f1": [11, 14, 22], "extrem": 16, "extremand": 9, "f": [3, 4, 11, 19, 22], "facil": [7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22], "factor": 16, "fall": [9, 11, 12, 22], "fals": [3, 4, 5, 7, 8, 9, 17, 22], "famili": [14, 21], "familiariz": [11, 14, 15, 18], "familiarizart": 11, "fantasm": 15, "fantast": 14, "fast": 11, "fastidi": 11, "favor": 2, "favorit": 11, "feliz": 22, "fev": [9, 17], "fictici": 15, "fij": [9, 16], "fil": [1, 7, 16], "filenotfounderror": [19, 22], "fill": [7, 8, 9, 11, 17, 18, 22], "filtr": [1, 16], "fin": [4, 5, 8, 10], "final": [5, 9, 10, 11, 14, 18, 19], "finaliz": [12, 21], "fing": 14, "firebrick": 0, "firebrick1": 0, "firebrick2": 0, "firebrick3": 0, "firebrick4": 0, "firm": [6, 10], "fisic": [3, 10, 21, 22], "fist": [9, 17], "fist_offset": [9, 17], "fitness": 4, "flag": [9, 13], "flags": [11, 13], "flam": 16, "flash": 1, "flech": 7, "flexibil": [15, 19], "flexibl": [12, 15, 20], "flip": [7, 8, 9, 11, 17, 18, 22], "flipp": 16, "float": 6, "floralwhit": 0, "flotant": [3, 5, 6, 16], "flowchart": 21, "fluj": 8, "follow": 17, "following": [4, 9, 11, 17], "fond": [8, 10, 11, 15, 18, 20, 22], "font": [9, 11, 12, 17, 18], "fonts": [9, 17], "foo": 11, "for": [8, 9, 11, 14, 15, 17, 18, 20, 21, 22], "forestgr": 0, "form": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21], "formal": 14, "format": [3, 4, 6, 7, 9, 11, 13, 14, 16, 18], "forms": 4, "formul": [6, 20], "fotogram": 8, "four": 7, "fps": 11, "fragment": [10, 11, 22], "fram": [4, 11, 22], "frecuenci": [4, 11], "frecuent": [14, 15], "frequenci": 9, "from": [0, 7, 8, 10, 12, 16, 18, 19, 22], "from_threshold": 8, "fuchsi": 0, "fueg": 16, "fuent": [9, 11, 12, 14, 15, 18, 19, 22], "fuer": [9, 11, 16], "fug": 14, "full": [9, 17], "fullnam": [9, 17, 19, 22], "fullscr": 13, "func": 13, "funcion": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18, 20, 21, 22], "funcional": [5, 15, 22], "funcionalidad": 15, "function": [1, 7, 8, 17, 20], "functions": [17, 20, 21, 22], "funicion": 15, "fusion": 15, "futur": [4, 5, 15], "g": [6, 20], "gainsbor": 0, "gam": [11, 17, 19, 20, 22], "gameobject": 14, "gamm": 6, "gan": [11, 15], "gananci": 8, "garantiz": 4, "gaussian": 16, "gener": [3, 6, 7, 9, 12, 15, 19], "general": [1, 9, 11, 12, 13, 15, 16, 19, 22], "generally": 8, "genial": [8, 11, 16], "gent": [10, 11], "gestion": [13, 19], "get": [4, 5, 7, 8, 9, 13, 14, 17, 18, 21, 22], "get_": 5, "get_all": 5, "get_alph": [19, 22], "get_and_flip": 8, "get_at": [9, 11, 17], "get_at_mapp": 6, "get_backends": 4, "get_buff": 3, "get_busy": 5, "get_controls": [4, 8], "get_count": 5, "get_current": 5, "get_driv": 13, "get_empty": 5, "get_imag": [4, 8], "get_init": [5, 9, 12, 17], "get_nam": 5, "get_numtracks": 5, "get_p": [9, 11, 17], "get_paus": 5, "get_press": 11, "get_raw": 4, "get_rect": [9, 14, 17, 18, 19, 20, 21, 22], "get_siz": [4, 9, 17, 18, 22], "get_surfac": [9, 17, 20, 21, 22], "get_track_audi": 5, "get_track_length": 5, "get_track_start": 5, "get_view": 3, "get_width": [9, 17], "getopt": [19, 22], "gets": [4, 6, 7], "gg": 6, "ghostwhit": 0, "gif": 11, "gir": [9, 21, 22], "giv": 6, "global": [12, 19, 22], "gnu": [19, 22], "going": [7, 8, 9, 11, 17], "gold": 0, "gold1": 0, "gold2": 0, "gold3": 0, "gold4": 0, "goldenrod": 0, "goldenrod1": 0, "goldenrod2": 0, "goldenrod3": 0, "goldenrod4": 0, "golep": 22, "golp": [9, 22], "golpeabl": 9, "goods": 4, "gorup": 15, "grab": 4, "grabacion": 4, "graci": [21, 22], "grad": [9, 20, 22], "gradient": 16, "gradual": 16, "grafic": [9, 11, 13, 14, 15, 16], "gran": [4, 11, 14, 15], "grand": [1, 8, 9, 10, 15, 16, 20], "gratis": 14, "gray": 0, "gray0": 0, "gray1": 0, "gray10": 0, "gray100": 0, "gray11": 0, "gray12": 0, "gray13": 0, "gray14": 0, "gray15": 0, "gray16": 0, "gray17": 0, "gray18": 0, "gray19": 0, "gray2": 0, "gray20": 0, "gray21": 0, "gray22": 0, "gray23": 0, "gray24": 0, "gray25": 0, "gray26": 0, "gray27": 0, "gray28": 0, "gray29": 0, "gray3": 0, "gray30": 0, "gray31": 0, "gray32": 0, "gray33": 0, "gray34": 0, "gray35": 0, "gray36": 0, "gray37": 0, "gray38": 0, "gray39": 0, "gray4": 0, "gray40": 0, "gray41": 0, "gray42": 0, "gray43": 0, "gray44": 0, "gray45": 0, "gray46": 0, "gray47": 0, "gray48": 0, "gray49": 0, "gray5": 0, "gray50": 0, "gray51": 0, "gray52": 0, "gray53": 0, "gray54": 0, "gray55": 0, "gray56": 0, "gray57": 0, "gray58": 0, "gray59": 0, "gray6": 0, "gray60": 0, "gray61": 0, "gray62": 0, "gray63": 0, "gray64": 0, "gray65": 0, "gray66": 0, "gray67": 0, "gray68": 0, "gray69": 0, "gray7": 0, "gray70": 0, "gray71": 0, "gray72": 0, "gray73": 0, "gray74": 0, "gray75": 0, "gray76": 0, "gray77": 0, "gray78": 0, "gray79": 0, "gray8": 0, "gray80": 0, "gray81": 0, "gray82": 0, "gray83": 0, "gray84": 0, "gray85": 0, "gray86": 0, "gray87": 0, "gray88": 0, "gray89": 0, "gray9": 0, "gray90": 0, "gray91": 0, "gray92": 0, "gray93": 0, "gray94": 0, "gray95": 0, "gray96": 0, "gray97": 0, "gray98": 0, "gray99": 0, "grayscal": 6, "gre": [0, 4, 6, 9, 18], "green1": 0, "green2": 0, "green3": 0, "green4": 0, "greenyellow": 0, "grey": 0, "grey0": 0, "grey1": 0, "grey10": 0, "grey100": 0, "grey11": 0, "grey12": 0, "grey13": 0, "grey14": 0, "grey15": 0, "grey16": 0, "grey17": 0, "grey18": 0, "grey19": 0, "grey2": 0, "grey20": 0, "grey21": 0, "grey22": 0, "grey23": 0, "grey24": 0, "grey25": 0, "grey26": 0, "grey27": 0, "grey28": 0, "grey29": 0, "grey3": 0, "grey30": 0, "grey31": 0, "grey32": 0, "grey33": 0, "grey34": 0, "grey35": 0, "grey36": 0, "grey37": 0, "grey38": 0, "grey39": 0, "grey4": 0, "grey40": 0, "grey41": 0, "grey42": 0, "grey43": 0, "grey44": 0, "grey45": 0, "grey46": 0, "grey47": 0, "grey48": 0, "grey49": 0, "grey5": 0, "grey50": 0, "grey51": 0, "grey52": 0, "grey53": 0, "grey54": 0, "grey55": 0, "grey56": 0, "grey57": 0, "grey58": 0, "grey59": 0, "grey6": 0, "grey60": 0, "grey61": 0, "grey62": 0, "grey63": 0, "grey64": 0, "grey65": 0, "grey66": 0, "grey67": 0, "grey68": 0, "grey69": 0, "grey7": 0, "grey70": 0, "grey71": 0, "grey72": 0, "grey73": 0, "grey74": 0, "grey75": 0, "grey76": 0, "grey77": 0, "grey78": 0, "grey79": 0, "grey8": 0, "grey80": 0, "grey81": 0, "grey82": 0, "grey83": 0, "grey84": 0, "grey85": 0, "grey86": 0, "grey87": 0, "grey88": 0, "grey89": 0, "grey9": 0, "grey90": 0, "grey91": 0, "grey92": 0, "grey93": 0, "grey94": 0, "grey95": 0, "grey96": 0, "grey97": 0, "grey98": 0, "grey99": 0, "gris": [6, 9], "group": [9, 15], "group1": 15, "group2": 15, "groupcollid": [15, 20], "groupmulti": 15, "groups": 15, "groupsingl": 15, "grup": 9, "grupal": 15, "guard": [9, 10, 11], "guerr": 11, "gui": [1, 8], "guion": 9, "gust": [10, 11], "h": 6, "hab": [5, 9, 11, 13, 15, 16, 22], "habl": [14, 15, 18], "habr": [12, 22], "hac": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22], "haces": 11, "haci": [9, 10, 11, 16, 21], "hag": [9, 10, 11, 13, 15, 19, 22], "hagamosl": 14, "hand": 7, "handl": 17, "handling": 20, "har": [9, 11, 14, 21], "haran": 20, "hardwar": [7, 15, 16], "hast": [4, 5, 8, 9, 11, 14, 15, 18, 21, 22], "hav": 6, "hech": [11, 14, 15, 22], "height": [4, 13, 14], "hell": 18, "hem": [11, 14, 18], "her": [14, 15, 17, 20], "hered": [15, 20], "herenci": [19, 20], "hermos": 14, "herramient": [15, 20], "hexadecimal": 6, "hey": 11, "hflip": [4, 8], "hic": [9, 14, 18], "hitbox": [9, 17], "hits": [20, 21, 22], "hmm": 14, "hoj": 11, "honeydew": 0, "honeydew1": 0, "honeydew2": 0, "honeydew3": 0, "honeydew4": 0, "hor": [9, 11], "horari": 20, "horizontal": [4, 16], "hotpink": 0, "hotpink1": 0, "hotpink2": 0, "hotpink3": 0, "hotpink4": 0, "hotspot": 7, "hotspots": 7, "howev": 4, "hoy": 15, "hsl": 6, "hsla": 6, "hsv": [4, 6, 8], "hsva": 6, "html": 6, "http": [19, 22], "hub": 6, "hue": 4, "humild": 11, "hw": 13, "hwsurfac": [11, 16], "i": [3, 4, 7, 8, 14], "i1": 6, "i1i2i3": 6, "i2": 6, "i3": 6, "ia": 11, "iceberg": 15, "id": 5, "ide": [8, 10, 11, 13, 16, 19, 20], "identifiqu": 8, "idiom": 9, "if": [4, 5, 7, 8, 9, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22], "ignor": 11, "igual": [3, 7, 9, 16], "iguald": 6, "ilusion": 14, "ilustr": [14, 16, 20], "imag": [1, 2, 4, 7, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22], "imagen": [1, 4, 7, 8, 9, 10, 11, 15, 16, 18, 19], "imagin": [14, 18], "imaginas": 22, "imgsurfac": 16, "imit": 9, "impar": 16, "impid": [11, 15], "implement": [3, 4, 10, 11, 15, 22], "implementation": 6, "impli": 4, "implic": [11, 15, 20], "import": [1, 4, 7, 10, 11, 13, 14, 15, 17, 18, 19, 22], "importerror": [16, 19, 22], "imprecision": 11, "imprim": [11, 19], "in": [3, 4, 5, 6, 7, 8, 9, 11, 14, 15, 16, 17, 18, 21, 22], "inacept": 11, "inadecu": 11, "incidental": 4, "inclsuvi": 6, "inclu": [1, 7, 9, 10, 11, 15, 16, 18, 19, 20], "including": 4, "inclus": [4, 5, 9, 11, 14, 15], "inclusiv": 6, "inconvenient": 11, "incorrect": 16, "increibl": 11, "increment": [11, 16], "indefin": 16, "independient": [9, 19], "index": [5, 16], "indexexception": 3, "indianr": 0, "indianred1": 0, "indianred2": 0, "indianred3": 0, "indianred4": 0, "indic": [1, 3, 4, 9, 11, 14, 15, 16], "indig": 0, "indirect": 4, "indivdual": 11, "individual": [5, 6, 9, 11], "indolor": 19, "ineficient": 9, "inferior": 22, "infinit": 9, "inflar": 11, "inflat": [9, 17, 22], "info": 13, "inform": [1, 3, 4, 5, 9, 11, 13, 14, 15, 16, 19], "information": 5, "inici": [3, 4, 5, 9, 13, 20, 21], "inicial": [6, 15, 16], "inicialic": 8, "inicializ": [1, 4, 5, 10, 13, 14, 18, 21], "inicialzi": 12, "init": [4, 5, 7, 8, 9, 12, 13, 14, 17, 18, 22], "initializ": [4, 5, 9, 17, 22], "initializing": 8, "initiat": 20, "inlcu": 1, "inmediat": 9, "inmut": 6, "innecesari": 11, "input": [11, 17, 20], "inspir": 1, "instal": [1, 4, 9, 16], "install": 1, "instanc": [15, 20], "instanci": [3, 5, 9, 10, 15, 18, 20, 21], "inste": 11, "instint": 11, "instruccion": 9, "int": [3, 6], "int32": 16, "int8": 16, "integers": 6, "integr": [4, 18], "inteligent": [14, 15], "intent": [4, 9, 11, 12, 14, 15, 16, 18, 19], "intepret": 16, "inter": 21, "interact": [1, 16, 20], "interconect": 8, "interes": 11, "interfac": [3, 6], "interfaz": [3, 6], "interior": 16, "intern": [9, 11, 15, 22], "interpert": 11, "interpol": 6, "interpolation": 6, "interpret": 10, "interruption": 4, "intializ": 9, "intimid": 16, "introduc": [5, 20, 22], "introduccion": [1, 12], "introducis": 5, "invalu": 20, "invert": [11, 16], "inviert": 22, "invirt": 22, "invis": 18, "invoc": [3, 21], "involucr": [1, 20, 22], "ir": [15, 16], "irc": 11, "irreal": 22, "is": [4, 5, 7, 8, 9, 15, 17, 19, 22], "isntal": 11, "it": [7, 9, 11, 17, 20], "ite": 11, "item": 14, "items": 15, "iter": [15, 18, 21, 22], "ivory": 0, "ivory1": 0, "ivory2": 0, "ivory3": 0, "ivory4": 0, "izqueird": 14, "izquierd": [6, 8, 9, 11, 14, 20, 22], "join": [9, 17, 19, 22], "joystick": [11, 18, 21], "jp": 4, "jpeg": 11, "jueg": [1, 4, 7, 8, 11, 12, 13, 14, 15, 19, 21, 22], "jug": 14, "jugador": [9, 10, 11, 14, 15, 21, 22], "juli": 2, "junt": [11, 16], "just": 11, "k_a": 22, "k_down": [21, 22], "k_escap": [7, 8, 9, 17], "k_f": 11, "k_t": 11, "k_up": [21, 22], "k_z": 22, "kb": 2, "key": [7, 8, 9, 11, 17, 21, 22], "keydown": [7, 8, 9, 14, 17, 21, 22], "keys": 15, "keyup": [21, 22], "khaki": 0, "khaki1": 0, "khaki2": 0, "khaki3": 0, "khaki4": 0, "kill": 15, "kills": 15, "l": 6, "lad": [9, 11, 14], "lament": 13, "lang": 11, "lanz": 16, "lanzamient": 4, "larg": [1, 11, 14, 20], "last": 16, "lat": 8, "latenci": 11, "lateral": 11, "lavend": 0, "lavenderblush": 0, "lavenderblush1": 0, "lavenderblush2": 0, "lavenderblush3": 0, "lavenderblush4": 0, "lawngr": 0, "leccion": 11, "lectur": [3, 6], "lee": 11, "leen": 11, "leer": [10, 11, 16], "left": [9, 14, 17, 21, 22], "legacy_log": 2, "legibl": [6, 19], "lei": 11, "leid": 10, "lej": [6, 9, 14, 20], "lemonchiffon": 0, "lemonchiffon1": 0, "lemonchiffon2": 0, "lemonchiffon3": 0, "lemonchiffon4": 0, "len": [3, 6, 7, 15, 16], "length": [3, 5], "lenguaj": [11, 14], "lent": [8, 11, 14, 18], "lentific": 13, "lerp": 6, "letr": 5, "lets": 0, "level": 6, "levement": 18, "leyend": 14, "lgpl": 1, "liability": 4, "liabl": 4, "liber": 3, "libert": 14, "libr": [13, 15], "licenci": [1, 19], "licens": [1, 19, 22], "liger": [6, 9, 11, 15], "lightblu": 0, "lightblue1": 0, "lightblue2": 0, "lightblue3": 0, "lightblue4": 0, "lightcoral": 0, "lightcy": 0, "lightcyan1": 0, "lightcyan2": 0, "lightcyan3": 0, "lightcyan4": 0, "lightgoldenrod": 0, "lightgoldenrod1": 0, "lightgoldenrod2": 0, "lightgoldenrod3": 0, "lightgoldenrod4": 0, "lightgoldenrodyellow": 0, "lightgr": 0, "lightgray": 0, "lightgrey": 0, "lightpink": 0, "lightpink1": 0, "lightpink2": 0, "lightpink3": 0, "lightpink4": 0, "lightsalmon": 0, "lightsalmon1": 0, "lightsalmon2": 0, "lightsalmon3": 0, "lightsalmon4": 0, "lightseagr": 0, "lightskyblu": 0, "lightskyblue1": 0, "lightskyblue2": 0, "lightskyblue3": 0, "lightskyblue4": 0, "lightslateblu": 0, "lightslategray": 0, "lightslategrey": 0, "lightsteelblu": 0, "lightsteelblue1": 0, "lightsteelblue2": 0, "lightsteelblue3": 0, "lightsteelblue4": 0, "lightyellow": 0, "lightyellow1": 0, "lightyellow2": 0, "lightyellow3": 0, "lightyellow4": 0, "lik": 11, "lim": 0, "limegr": 0, "limint": 5, "limit": [4, 7, 11, 12, 15, 16], "limpi": [9, 12, 14, 15, 22], "limpiez": 9, "lin": [0, 6, 11, 14, 16, 17], "lind": 9, "line": [1, 10, 12, 15, 19, 20, 22], "lineal": 16, "linux": [4, 8, 11], "liqu": 14, "list": [1, 4, 5, 6, 7, 9, 11, 13, 15, 16], "list_camer": [4, 8], "list_mod": 13, "littl": [3, 11], "livian": 11, "llam": [3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "llamand": 9, "llamas": 20, "llav": 11, "lleg": [8, 11, 14, 16, 19, 20], "llen": [11, 18, 22], "llev": 21, "load": [4, 7, 9, 11, 14, 16, 17, 19, 20, 22], "load_background_imag": 14, "load_imag": [9, 17], "load_player_imag": 14, "load_png": [19, 20, 21, 22], "load_sound": [9, 17, 19], "load_xbm": 7, "loagic": 11, "local": [9, 10], "localiz": 9, "locals": [8, 12, 18, 19, 22], "log": 1, "logic": [9, 10, 11, 16, 19], "logotip": 1, "logr": [14, 16, 19, 20], "longitud": [3, 5, 6, 20], "look": 8, "loop": [10, 11, 14, 15, 17, 18], "loops": 14, "loss": [4, 13], "lostsprit": 15, "ls": 4, "lso": 11, "lueg": [4, 7, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22], "lug": [6, 7, 9, 11, 14, 15, 16, 18, 19, 20, 21], "lugar": [11, 14], "luj": 15, "lum": 4, "lumin": 6, "lun": 11, "m": [6, 9], "mac": [4, 7, 11], "magent": 0, "magenta1": 0, "magenta2": 0, "magenta3": 0, "magenta4": 0, "magi": 20, "main": [8, 17, 18, 20, 22], "main_d": [9, 17], "mak": 22, "mal": [10, 11], "malinterpret": 11, "mam": 14, "man": 7, "manag": 5, "manch": 8, "manchon": 8, "manchonfind": 8, "manej": [1, 10, 11, 13, 15, 16, 20, 22], "maner": [6, 7, 9, 12, 14, 15, 16, 20, 21, 22], "manipul": [11, 15, 16, 20], "manten": [3, 8, 9, 10, 13, 14, 15, 21], "mantenert": 15, "manteng": 21, "mantent": 16, "mantien": [9, 16], "manual": [5, 8, 11, 12, 15], "map": [6, 7, 16], "map_rgb": 6, "mape": 3, "mapp": 16, "maquin": [11, 15, 16], "mar": 9, "maravill": 11, "marc": 8, "marcador": 10, "march": [9, 11], "mare": 9, "mari": 21, "maroon": 0, "maroon1": 0, "maroon2": 0, "maroon3": 0, "maroon4": 0, "mas": [1, 4, 5, 6, 8, 9, 10, 12, 13, 15, 18, 19, 20, 21], "masc": [7, 11], "mask": [7, 8], "maskfil": 7, "masks": [11, 13], "mat": 15, "matemat": [10, 16, 20], "materials": 4, "math": [19, 20, 22], "matric": 16, "matriz": [3, 14, 16], "max": 8, "maxim": 11, "may": 4, "mayor": [1, 2, 3, 5, 8, 11, 12, 13, 14, 15, 16, 19], "mb": 2, "med": [9, 14, 20, 21], "medi": [8, 16], "mediant": [4, 7, 11, 12], "mediumaquamarin": 0, "mediumblu": 0, "mediumorch": 0, "mediumorchid1": 0, "mediumorchid2": 0, "mediumorchid3": 0, "mediumorchid4": 0, "mediumpurpl": 0, "mediumpurple1": 0, "mediumpurple2": 0, "mediumpurple3": 0, "mediumpurple4": 0, "mediumseagr": 0, "mediumslateblu": 0, "mediumspringgr": 0, "mediumturquois": 0, "mediumvioletr": 0, "mega_jc": 2, "mejor": [4, 9, 11, 13, 14, 15, 16, 18], "memori": [3, 11, 14], "men": [5, 9, 10, 11, 14, 15, 18, 20, 21], "mencion": [9, 11, 15], "menor": [5, 11, 13], "mensaj": [9, 19], "ment": 16, "menu": 10, "menud": [5, 16, 19], "mer": 11, "merchantability": 4, "met": [4, 11], "method": 15, "methods": 20, "metod": [1, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 22], "mezcl": [6, 11, 16], "mezclador": 14, "mid": [11, 20], "midleft": [21, 22], "midnightblu": 0, "midright": [21, 22], "mied": 16, "miembr": [11, 13, 15], "mientr": [3, 5, 8, 11, 14, 16, 20, 21], "milisegund": 11, "min": 8, "minim": 16, "minimiz": 15, "mintcream": 0, "mir": [1, 7, 11, 14, 15, 20, 21, 22], "miras": 16, "mism": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22], "miss": [9, 17], "mistyros": 0, "mistyrose1": 0, "mistyrose2": 0, "mistyrose3": 0, "mistyrose4": 0, "mit": 14, "mix": [9, 17], "mizun": 4, "moccasin": 0, "mod": [1, 6, 9, 11, 16], "mode_ok": 13, "model": 9, "modif": 19, "modific": [15, 16, 18], "modification": 4, "modism": 11, "modul": [0, 1, 3, 6, 10, 12, 13, 14, 16, 17, 20, 22], "molest": [1, 9, 10, 19], "molesti": 11, "moment": [8, 9, 11, 13, 15, 20], "mon": 9, "monitor": 13, "monkey": [9, 17], "monkeys": [9, 17], "monstruos": 15, "mont": [9, 14], "monton": [8, 11, 15, 22], "mor": [8, 22], "mosaic": 14, "most": [11, 16], "mostr": [7, 8, 11, 13, 14, 16, 18, 21, 22], "motor": 11, "mous": [7, 9, 11, 14, 17, 18], "mousebuttondown": [7, 9, 11, 17], "mousebuttonup": [9, 11, 17], "mov": [9, 10, 11, 16, 17, 18, 20, 21, 22], "movabl": [21, 22], "move_and_draw_all_game_objects": 14, "move_ip": [9, 17], "movedown": [21, 22], "moveit": 14, "movep": [21, 22], "mover": 21, "moverabaj": 21, "moverarrib": 21, "moveup": [21, 22], "movimient": [9, 11, 15, 20, 21, 22], "mpus": 11, "msmf": 4, "much": [4, 9, 10, 11, 12, 13, 14, 16, 18, 20, 21, 22], "muestr": [6, 7, 8, 14, 15, 16, 20, 22], "muev": [1, 9, 11, 18, 20, 21, 22], "mult": 13, "multidimensional": 16, "multimedi": 11, "multipl": [5, 7, 8, 10, 15, 16], "multiplataform": 11, "multipli": 6, "multiplic": 6, "mund": [8, 11], "music": 19, "must": 4, "mygroup": 15, "mysprit": 15, "n": 16, "nad": [5, 9, 10, 11, 13, 14, 15, 18, 19, 20], "nadi": 15, "nam": [0, 5, 9, 17, 19, 22], "namespac": 12, "nativ": [4, 7, 8, 11], "natural": 16, "naturalez": 19, "navajowhit": 0, "navajowhite1": 0, "navajowhite2": 0, "navajowhite3": 0, "navajowhite4": 0, "navy": 0, "navyblu": 0, "ncesid": 9, "neces": [9, 12, 13, 18], "necesari": [1, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22], "necesit": [1, 6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22], "necesitas": [15, 18, 19, 20, 21], "necest": 14, "need": 11, "needs": 17, "negat": [3, 16, 22], "negligenc": 4, "negr": [7, 8, 9, 11, 16], "net": [19, 22], "new": [0, 3, 4, 6, 7, 20], "newbi": 1, "newly": 6, "newp": [9, 17, 20, 21, 22], "newrect": 15, "ningun": [9, 12, 13, 14, 15, 16], "nirav": 8, "nivel": [1, 3, 6, 15, 16], "nocion": 10, "noevents": 11, "nombr": [3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 19, 21], "non": [3, 4, 5, 6, 9, 12, 17, 18, 19, 22], "nonesound": [9, 17], "norest": 7, "normal": [5, 9, 15, 16, 20, 22], "normaliz": 6, "noroest": 7, "nort": 7, "north": 7, "northeast": 7, "northwest": 7, "nosotr": [8, 9, 14], "not": [4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 20, 21, 22], "notabl": 20, "notes": [6, 9, 11, 14], "notic": [4, 11], "notici": 14, "notific": 15, "nots": 9, "nrp": 8, "nuestr": [9, 14, 15, 16, 18], "nuev": [3, 4, 6, 7, 9, 10, 11, 13, 14, 15, 16, 18, 20, 21, 22], "num_tracks": 5, "numb": [5, 6], "numer": [3, 4, 5, 6, 9, 11, 14, 15, 16], "numeric": 16, "numpy": 1, "nunc": [8, 11, 16], "object": [7, 9, 18, 19, 20, 21, 22], "objects": [6, 10, 14, 17], "objet": [1, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 19, 22], "obrar": 9, "observ": [15, 16, 19, 22], "obten": [1, 4, 5, 6, 8, 9, 11, 13, 14, 15, 16, 18, 21], "obtendras": 11, "obteng": [7, 13], "obtien": [4, 11, 13, 14, 18, 22], "obtuv": [8, 11], "obvi": [10, 15, 18], "ocasion": 8, "ocasional": 15, "ocup": [5, 18, 19], "ocurr": 5, "oest": 7, "of": [0, 3, 4, 5, 6, 8, 11, 20], "ofert": 9, "off": 11, "offcourt": 22, "offset": 3, "oficial": 14, "ofrec": [7, 8], "okay": 18, "oldlac": 0, "oliv": 0, "olivedrab": 0, "olivedrab1": 0, "olivedrab2": 0, "olivedrab3": 0, "olivedrab4": 0, "olvid": 15, "olvidadiz": 20, "olvidas": 15, "on": [4, 5, 9, 10, 11, 17], "once": 11, "onda": 6, "one": [21, 22], "ooo": 11, "opac": [6, 11, 16], "opcion": 11, "opcional": [3, 4, 6, 8, 9, 12, 14, 16], "open": 5, "opencv": [4, 8], "opens": 4, "oper": [6, 7, 9, 11, 15, 16, 18], "operands": 16, "operations": 16, "optim": 19, "optimiz": [11, 15, 16], "option": 4, "optional": 8, "or": [4, 5, 6, 7, 8, 9, 11, 17, 21, 22], "orang": 0, "orange1": 0, "orange2": 0, "orange3": 0, "orange4": 0, "oranger": 0, "orangered1": 0, "orangered2": 0, "orangered3": 0, "orangered4": 0, "orchid": 0, "orchid1": 0, "orchid2": 0, "orchid3": 0, "orchid4": 0, "orden": [3, 4, 9, 11, 13, 21], "ordern": 11, "ordinari": 15, "org": [9, 12, 13, 14, 15, 16], "organiz": [1, 9, 10, 11, 15], "orient": 14, "orig": [4, 11, 14], "original": [6, 7, 9, 14, 15, 16, 17], "oro": 13, "oscur": [9, 10], "oscurec": 11, "other": [4, 11], "otherwis": 4, "otorg": 13, "our": 17, "out": 4, "over": 17, "pac": 15, "pacm": 15, "pag": 16, "pagin": 16, "paisaj": 14, "palabr": [1, 4, 14, 15, 21], "palegoldenrod": 0, "palegr": 0, "palegreen1": 0, "palegreen2": 0, "palegreen3": 0, "palegreen4": 0, "palet": [21, 22], "paleturquois": 0, "paleturquoise1": 0, "paleturquoise2": 0, "paleturquoise3": 0, "paleturquoise4": 0, "palevioletr": 0, "palevioletred1": 0, "palevioletred2": 0, "palevioletred3": 0, "palevioletred4": 0, "panic": 11, "pantall": [1, 8, 9, 10, 11, 13, 15, 16, 18, 20, 21, 22], "papayawhip": 0, "papel": 11, "paquet": [1, 9, 12, 16], "par": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "paralaj": 11, "paramet": 8, "parametr": [4, 6, 9], "parcial": 11, "parec": [11, 14, 15, 16, 18, 20], "parecert": 14, "pared": 22, "parent": 3, "parezc": [1, 10, 14], "parpad": 11, "pars": 11, "part": [3, 6, 7, 8, 9, 10, 14, 15, 16, 18, 19, 20, 22], "particul": [4, 11], "pas": [1, 3, 4, 5, 6, 7, 9, 11, 15, 16, 19, 20, 21, 22], "pasal": [7, 8], "pass": [9, 17], "pastill": 15, "patel": 8, "path": [1, 9, 17, 19, 22], "paus": [5, 19], "pc": 3, "pci": 16, "peachpuff": 0, "peachpuff1": 0, "peachpuff2": 0, "peachpuff3": 0, "peachpuff4": 0, "ped": [8, 13], "peg": [9, 22], "peleot": 20, "pellets": 15, "pelot": [10, 18, 21], "penaliz": 15, "pendient": 10, "pens": [11, 14, 15, 22], "peor": [10, 11], "peque\u00f1": [4, 7, 9, 10, 11, 14, 15, 16, 18, 20], "per": [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "perd": [5, 9, 11, 14, 20], "perfect": 9, "perfil": 11, "performanc": 11, "permanec": [6, 18], "permit": [1, 4, 6, 7, 8, 9, 13, 15, 16, 20, 22], "permitt": 4, "persegu": 15, "perseguidor": 15, "persigu": 15, "person": [1, 9, 10, 14, 21], "personaj": [14, 15, 21], "personaliz": [1, 19], "pertenc": 15, "pertenec": [9, 15, 18], "pertenecient": [18, 20], "pertenent": 15, "pertenezc": 15, "perturb": 8, "peru": 0, "pet": [9, 11, 12, 13, 14, 15, 16], "pg": [7, 9, 17], "photoshop": 2, "physics": [19, 22], "pi": 22, "pid": [9, 14], "piens": 16, "pierd": 11, "pink": 0, "pink1": 0, "pink2": 0, "pink3": 0, "pink4": 0, "pist": 5, "pivaral": [8, 9, 10, 11, 12, 13, 14, 15, 16], "pixel": [1, 3, 4, 6, 7, 9, 13, 16, 18, 21, 22], "pixel2d": 16, "pixel3d": 16, "pixels2d": 16, "pixels3d": 16, "pixels_alph": 16, "plac": 16, "plan": 9, "plant": 10, "plante": 12, "plataform": [1, 4, 8, 9, 11, 13, 19, 21], "platform": 9, "play": [5, 9, 10, 11, 14, 15, 17, 21, 22], "playback": 5, "player1": [10, 22], "player2": 22, "playerimag": 14, "playerp": 14, "playersprit": 22, "playing": 5, "plum": 0, "plum1": 0, "plum2": 0, "plum3": 0, "plum4": 0, "png": [2, 9, 11, 16, 17, 19, 20, 21, 22], "pngs": 11, "poc": [1, 7, 9, 11, 13, 14, 15, 16, 18, 20, 21], "pod": [5, 7, 8, 9, 10, 13, 14, 15, 16, 18, 20, 22], "poder": [14, 15], "podes": [4, 5, 7, 8, 10, 11, 14, 15, 16, 19, 20, 21, 22], "podr": [6, 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 22], "podran": 13, "podras": [9, 10], "point": 7, "pointing": 7, "poll": 11, "pon": [9, 10, 14, 16, 18, 20, 22], "ponder": [6, 16], "pondran": 4, "pong": [10, 19, 22], "popul": 17, "porcion": 16, "porqu": [9, 11, 15, 16, 18, 19, 20, 21, 22], "pos": [9, 14, 17], "posibil": [4, 9, 11], "posibl": [4, 7, 8, 9, 10, 12, 14, 15, 16], "posicion": [3, 5, 7, 8, 9, 11, 14, 15, 18, 20, 21, 22], "posit": 22, "position": [5, 9, 14, 17, 20], "possibility": 4, "possibl": 8, "posterior": [4, 8, 15, 19], "potencial": [11, 15, 21], "powderblu": 0, "practic": [11, 13, 19], "pre": 6, "precision": [11, 16], "preconstru": 1, "predecesor": 11, "predefin": 7, "predetermin": [4, 6, 7, 9], "prefij": 9, "pregunt": [8, 9, 11, 14], "prematur": 11, "premul_alph": 6, "preocup": [11, 15, 16], "preocupart": 11, "prep": 9, "prepar": [16, 17], "present": [9, 10, 12, 13, 14, 15, 16], "presion": [9, 10, 11, 14, 18, 21], "presional": 21, "prest": 19, "pretend": 15, "prevari": 11, "previ": [4, 13, 15, 16, 18], "prim": [3, 9, 14, 15, 16, 19, 21, 22], "primer": [5, 8, 9, 10, 11, 12, 13, 15, 16, 18, 21, 22], "princial": 4, "principal": [3, 10, 14, 15, 16, 19, 20, 21], "principi": [1, 16, 19, 20, 21, 22], "print": [8, 9, 11, 13, 14, 17, 19, 22], "printing": 13, "priorid": 4, "priv": 9, "prob": [12, 13, 16], "probabl": [4, 11, 13, 14, 15, 18], "probably": 11, "problem": [9, 10, 19, 22], "proces": [4, 11, 12, 14, 15], "procurement": 4, "produc": [11, 15, 16], "produzc": 8, "profits": 4, "profun": 13, "profund": [4, 8, 9, 13, 14], "program": [1, 5, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21], "projects": [19, 22], "promedi": [8, 11, 16], "promes": 9, "promet": 14, "prompt": 16, "proncipal": 18, "pront": [15, 21], "propi": [2, 7, 8, 10, 11, 13, 19], "propied": 3, "proporcion": [3, 6, 8, 11, 14, 16, 19, 20], "proporcional": 9, "proporcionart": 11, "proposit": 10, "proteccion": 9, "protocol": 1, "provendr": 11, "provid": 4, "provien": 11, "prox": 14, "proxim": [3, 4, 13, 14, 15], "proxy": 3, "proyeccion": 11, "proyect": [2, 10, 11, 14, 20], "proyectas": 14, "prueb": [9, 11, 16], "pseud": 20, "public": [19, 22], "pud": [15, 19], "pued": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "puert": 4, "pull": [9, 17], "puls": 21, "pulsacion": 11, "pummel": [9, 17], "pump": [21, 22], "punch": [9, 17], "punch_sound": [9, 17], "punching": [9, 17], "punt": [3, 5, 6, 7, 11, 14, 15, 16, 22], "puntaj": 22, "punter": [9, 11], "puodes": 21, "purpl": 0, "purple1": 0, "purple2": 0, "purple3": 0, "purple4": 0, "purpos": 4, "put": 17, "pu\u00f1": [1, 9], "py": [1, 10, 14, 16], "py_buff": 3, "pycdi": 5, "pygam": [0, 19, 20, 22], "pygame_lofi": 2, "pygame_log": 2, "pygame_power": 2, "pygame_powered_lowr": 2, "pygame_tiny": 2, "pysdl": 11, "python": [1, 3, 4, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20], "python3": 4, "qce": 4, "qued": [11, 16, 22], "quer": [11, 13, 14, 15, 16, 18], "queres": [6, 8, 11, 16], "querr": 9, "querras": [14, 15, 20, 22], "query_imag": [4, 8], "querying": 13, "qui": 10, "quick": 11, "quier": [9, 11, 13, 14, 15, 18, 21], "quiet": [8, 21], "quis": 15, "quisier": 9, "quit": [5, 7, 8, 9, 14, 17, 18, 21, 22], "quizas": [11, 14, 15, 19], "qui\u00e9n": [1, 11, 13], "r": [6, 15, 16], "radial": 16, "radian": [20, 22], "rais": [8, 16, 19, 22], "ralentiz": 14, "rand": 22, "randint": 22, "random": [19, 22], "rang": [6, 8, 14, 16], "rap": [9, 11, 14, 15, 16], "rapid": [11, 13, 14, 15, 16], "rar": [11, 15], "rastr": [8, 15], "raton": 21, "raw": [3, 16], "raz": 11, "razon": [8, 10, 11, 14, 15, 20], "re": 18, "readlin": 7, "readm": 1, "ready": 4, "real": [4, 8, 11, 13, 14, 15, 16, 18], "realid": [7, 9, 11, 13, 14, 16], "realistic": [19, 22], "realiz": [4, 5, 6, 9, 11, 15, 16, 18, 19, 20, 21], "realment": [5, 9, 13, 14, 15, 16, 18, 21], "realmnet": 9, "reanud": 5, "rebot": 22, "recent": 16, "recib": [3, 11], "recien": 11, "recient": [9, 15], "recom": 12, "recomepens": 9, "recompil": 22, "reconoc": 3, "record": [4, 10, 11, 13, 15, 16, 19, 20], "recorr": [9, 15], "recorrier": 15, "recort": 14, "rect": [8, 9, 14, 15, 17, 19, 20, 21, 22], "rectangl": 11, "rectangul": [8, 11, 14, 15, 18, 20, 22], "rectangular": 11, "rects": [14, 15], "rectstyl": 11, "recuent": 5, "recuper": [11, 21], "recurs": [10, 12, 13, 20], "red": [0, 4, 6, 9, 10, 18, 19], "red1": 0, "red2": 0, "red3": 0, "red4": 0, "rededor": [11, 16], "redimension": [4, 18], "redimg": 16, "redistribution": 4, "redistributions": 4, "redonde": 6, "reduc": [15, 16, 22], "reduzc": 21, "reemplaz": 14, "refer": 21, "referenc": [8, 11, 15, 16], "referenci": [9, 16], "referent": [3, 8, 9, 13, 14, 15, 16], "refier": 11, "region": 19, "registr": [11, 20], "regl": [13, 22], "regres": 22, "regul": 15, "regular": 1, "reinici": [19, 22], "reinit": [21, 22], "relacion": 11, "relat": [10, 19], "releas": [19, 22], "relev": 11, "rellam": 3, "rellen": [8, 9, 15], "reloj": 22, "remov": [4, 15], "remove_internal": 15, "rend": [9, 11, 15, 17, 18], "render": 9, "rendercl": 15, "rendering": [11, 15], "renderiz": [9, 18, 20, 21], "renderplain": [9, 15, 17, 22], "renderupdat": 15, "renderupdatesdraw": 15, "rendimient": [8, 11, 15, 16], "rendiminet": 13, "repas": 8, "repet": [8, 9, 10], "repetid": 9, "report": 11, "repository": 11, "reprenset": 14, "represent": [1, 3, 5, 6, 7, 9, 11, 14, 15, 16, 20], "representation": 6, "representations": 9, "representing": 7, "represet": 9, "reproduc": [4, 5, 9, 15, 19], "reproduccion": [5, 9], "requeir": 11, "requer": [3, 10, 13, 15, 16, 18, 19], "requier": [4, 13, 15, 16, 21], "requir": 16, "requisit": [11, 15], "res": 11, "resete": 9, "resolu": [1, 2, 13], "resolv": 20, "resourc": [10, 17, 20], "respald": 13, "respect": [7, 14], "respond": 14, "respuest": 11, "rest": [5, 8, 9, 11, 14, 16, 22], "resuelv": 10, "result": [6, 9, 11, 14, 15, 16, 20, 22], "resum": [5, 10, 15], "retain": 4, "retorn": [3, 4, 7], "retras": 11, "return": [3, 9, 15, 17, 18, 19, 20, 21, 22], "returns": [4, 6, 9, 17, 20, 21, 22], "reun": 13, "reutiliz": [4, 19], "revis": [9, 11, 14, 20], "revoltij": 11, "rgb": [4, 6, 8, 9, 11, 16, 18], "rgba": 6, "rgbarray": 16, "ridicul": 10, "right": [9, 14, 17, 21, 22], "riquez": 9, "rleaccel": [9, 17], "rod": 18, "roj": [6, 9, 16], "rom": 5, "romp": [4, 21], "rond": 21, "rosybrown": 0, "rosybrown1": 0, "rosybrown2": 0, "rosybrown3": 0, "rosybrown4": 0, "rot": 9, "rotacion": [9, 21], "rotat": [9, 17], "routin": 4, "row1": 16, "row2": 16, "royalblu": 0, "royalblue1": 0, "royalblue2": 0, "royalblue3": 0, "royalblue4": 0, "rr": 6, "rrggbb": 6, "rrggbba": 6, "run": 22, "runs": 17, "rut": [1, 8, 9, 19], "rutin": [9, 13], "s": [6, 11, 15, 19, 20, 22], "sab": [8, 9, 11, 14, 15, 16, 20, 21], "sabes": [4, 11, 15, 22], "sabidur": 16, "sabor": 11, "sac": 9, "saddlebrown": 0, "sal": [4, 9, 11, 14, 15, 18, 21, 22], "saldr": 22, "salmon": 0, "salmon1": 0, "salmon2": 0, "salmon3": 0, "salmon4": 0, "salt": [3, 9, 11, 14], "sam": 4, "sandybrown": 0, "sangr": 10, "satisfactori": 19, "satisfech": 11, "saturation": 4, "scal": [4, 9, 17], "scaledown": 16, "scaleup": 16, "scor": 10, "scoreup": 10, "scre": [7, 9, 14, 15, 16, 17, 18, 20, 21, 22], "script": 17, "sdl": [11, 13], "sdl1": 5, "seagr": 0, "seagreen1": 0, "seagreen2": 0, "seagreen3": 0, "seagreen4": 0, "seashell": 0, "seashell1": 0, "seashell2": 0, "seashell3": 0, "seashell4": 0, "seccion": [9, 10, 14, 15, 16, 19, 22], "second": [11, 22], "seconds": 5, "secuenci": [7, 11, 12, 13, 15, 21], "seeguimient": 11, "segu": [11, 14, 15, 18], "seguimient": [14, 15], "segun": [6, 14, 15], "segund": [3, 5, 6, 7, 9, 11, 12, 14, 16, 21], "segur": [5, 8, 11, 12, 15, 19], "seis": 10, "seleccion": [4, 5, 11, 13], "select": 4, "self": [8, 9, 14, 15, 17, 20, 21, 22], "sembr": 16, "semi": 11, "semill": 16, "sencill": [10, 14, 15, 16, 20], "sensibil": 11, "sent": [11, 14, 16, 20, 22], "sentit": 15, "separ": [4, 7, 8, 10, 11, 14, 15, 16, 19], "ser": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 22], "seran": [4, 9, 14, 15, 19], "serran": [8, 9, 10, 11, 12, 13, 14, 15, 16], "servic": 4, "set": 6, "set_at": [11, 16], "set_block": 11, "set_caption": [7, 9, 17, 18, 22], "set_colorkey": [9, 11, 17], "set_controls": [4, 8], "set_cursor": 7, "set_length": 6, "set_mod": [7, 8, 9, 11, 13, 14, 17, 18, 22], "set_vis": [9, 17], "sets": 6, "settings": 4, "setup": 7, "se\u00f1al": [9, 18, 22], "shall": 4, "shap": [3, 16], "shifts": 13, "shinners": [9, 11, 12, 13, 14, 15, 16], "shots": 15, "shtml": [19, 22], "si": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "sid": [6, 9, 11, 12, 14, 15, 20, 21, 22], "siempr": [4, 9, 13, 14, 15, 16, 19, 20, 22], "siend": [4, 11, 21], "sienn": 0, "sienna1": 0, "sienna2": 0, "sienna3": 0, "sienna4": 0, "sient": 1, "sig": [11, 21], "sign": [3, 16], "signif": [6, 8, 9, 11, 13, 14, 15, 21], "signific": 7, "sigueint": 9, "siguient": [3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 21, 22], "silenci": [11, 12], "silv": 0, "simil": [9, 14, 15, 16, 18, 21, 22], "similar": [7, 15, 19], "similitud": 14, "simpl": [1, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 19, 22], "simpleent": 14, "simplement": [7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22], "simplific": [13, 18], "simul": [9, 14], "sinc": 6, "singl": 3, "sino": [10, 13, 20], "sintaxis": [11, 16], "sip": 11, "siqu": 11, "sirv": 10, "sistem": [1, 4, 5, 7, 9, 11, 13, 18, 21], "sitem": 5, "situacion": [9, 15, 16], "siz": [3, 7, 8, 9, 13, 17], "sizeall": 7, "sizenesw": 7, "sizenws": 7, "sizer_x_strings": 7, "sizer_xy_strings": 7, "sizer_y_strings": 7, "skyblu": 0, "skyblue1": 0, "skyblue2": 0, "skyblue3": 0, "skyblue4": 0, "slash": 7, "slateblu": 0, "slateblue1": 0, "slateblue2": 0, "slateblue3": 0, "slateblue4": 0, "slategray": 0, "slategray1": 0, "slategray2": 0, "slategray3": 0, "slategray4": 0, "slategrey": 0, "slow": 11, "small": [7, 11], "sn9c101": 4, "snapshot": 8, "snow": 0, "snow1": 0, "snow2": 0, "snow3": 0, "snow4": 0, "so": 11, "sobr": [4, 5, 7, 9, 11, 12, 13, 14, 15, 16, 19, 20, 22], "sobrecarg": 15, "sobreescrib": 3, "sobreescritur": 3, "socket": [19, 22], "sockets": 19, "sofistic": [19, 20], "soft": 16, "softwar": [1, 4, 9, 11, 15], "sol": [3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22], "solarwolf": 11, "solicit": [11, 13], "solt": [9, 11, 21], "solucion": [11, 18], "som": 11, "something": [8, 11], "sonar": [11, 15], "sonido": [9, 15], "sonidos": [9, 10, 19], "sonix": 4, "soport": [3, 4, 5, 6, 8, 9, 13], "sorprendent": 14, "sorpres": 14, "sorry": 8, "sos": 14, "sound": [9, 17], "sourc": [4, 9], "south": 7, "southeast": 7, "southwest": 7, "spe": [14, 21, 22], "special": 4, "specify": 0, "spin": [9, 17], "spinning": [9, 17], "spirt": 1, "split": [9, 17], "springgr": 0, "springgreen1": 0, "springgreen2": 0, "springgreen3": 0, "springgreen4": 0, "sprit": [1, 11, 17, 21, 22], "spritecollid": [15, 20], "spritedict": 15, "sprites_click": 11, "src": 16, "start": [4, 5, 8, 9, 17], "start_index": 16, "starts": [4, 17], "stat": [9, 11, 17, 21, 22], "stdin": 16, "steelblu": 0, "steelblue1": 0, "steelblue2": 0, "steelblue3": 0, "steelblue4": 0, "still": [21, 22], "stop": [4, 5, 8], "stops": 4, "str": [3, 4, 6], "strict": 4, "strid": 3, "string": [3, 7], "strings": [7, 11], "strip": 16, "styles": 10, "suav": 11, "suavement": 14, "suavid": 9, "suaviz": [9, 16], "sub": 11, "subcl": [3, 6], "subconjunt": [7, 11], "subdirectori": 9, "subproces": [4, 8], "subseccion": 14, "substitut": 4, "suced": [9, 11, 12, 18, 21, 22], "suces": [11, 19], "such": 4, "sudest": 7, "sudoest": 7, "suel": [4, 9, 10, 14], "suelt": [11, 21], "suen": 11, "suert": [14, 16], "suficient": [8, 11, 12, 14, 15, 16], "suficientemnt": 9, "sugerent": 11, "sugier": 9, "sum": 16, "suministr": [4, 8, 9, 11, 18], "sup": 15, "superfici": [1, 4, 6, 7, 13, 14, 18], "superior": [1, 3, 5, 8, 11, 14, 15, 18, 22], "superpon": [14, 15, 20, 22], "superposicion": [11, 15], "superpuest": 15, "supong": 11, "support": [4, 6], "supuest": [8, 19, 20, 22], "sur": [7, 22], "surf": 7, "surfac": [1, 4, 6, 7, 8, 9, 13, 14, 15, 17, 18, 22], "surfarray": [1, 3, 11], "surfdemo_show": 16, "suspend": 11, "sustancial": 11, "sustitu": 7, "sutil": 9, "svg": 2, "switch": 7, "swsurfac": 11, "sys": [14, 19, 22], "system": [4, 5, 7], "system_cursor_arrow": 7, "system_cursor_crossh": 7, "system_cursor_hand": 7, "system_cursor_ibeam": 7, "system_cursor_n": 7, "system_cursor_sizeall": 7, "system_cursor_sizenesw": 7, "system_cursor_sizens": 7, "system_cursor_sizenws": 7, "system_cursor_sizew": 7, "system_cursor_wait": 7, "system_cursor_waitarrow": 7, "systemexit": [19, 22], "s\u00e9": 11, "t": [4, 7, 11, 19, 22], "tabl": 16, "tach": 7, "tak": [0, 4], "takafumi": 4, "tal": [9, 15, 19], "tama\u00f1": [3, 4, 7, 8, 9, 10, 11, 13, 14, 16, 18, 22], "tambien": [1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "tampoc": [11, 15], "tan": [0, 6, 11, 14, 15, 16, 21], "tan1": 0, "tan2": 0, "tan3": 0, "tan4": 0, "tant": [5, 7, 10, 11, 14, 15, 16, 20, 22], "tar": [15, 19], "tare": [13, 19], "target": [9, 17], "tarjet": 16, "teal": 0, "tecer": 4, "tecl": [8, 9, 10, 11, 14, 18, 21], "tecnic": 11, "tem": [1, 11, 13, 14], "temporal": [5, 16], "temporarily": 5, "ten": [4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22], "tendr": [10, 11, 14, 16, 20], "tendran": [19, 22], "tendras": 22, "tener": 16, "tenes": [4, 10, 11, 14, 15, 16, 21], "teng": [4, 11, 12, 13, 14, 15, 16, 18], "tennis": [21, 22], "tentacion": 11, "tentador": 11, "terc": [3, 7, 14, 18], "tercer": [4, 16], "termin": [11, 14, 15, 16, 18, 19, 22], "terminal": 9, "terminolog": 11, "terrain1": 14, "terrain2": 14, "terren": 14, "text": [11, 17, 18, 20], "textmarker_strings": 7, "textp": [9, 17, 18], "than": [8, 11, 22], "that": [4, 7, 11, 17, 20, 22], "the": [0, 3, 4, 5, 6, 7, 8, 9, 11, 15, 17, 19, 20, 21], "the_dirty_rectangl": 11, "thecorruptor": 2, "then": 17, "theory": 4, "ther": [11, 17, 18], "thes": 0, "thickarrow_strings": 7, "this": [4, 5, 9, 11, 17], "thistl": 0, "thistle1": 0, "thistle2": 0, "thistle3": 0, "thistle4": 0, "threshold": 8, "through": 14, "tick": [7, 9, 17, 22], "tiemp": [4, 5, 8, 11, 16, 18, 20, 21], "tien": [1, 3, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 20, 22], "tim": [5, 7, 9, 14, 17, 22], "tip": [1, 3, 6, 7, 9, 10, 11, 13, 14, 16, 20, 22], "tipic": 9, "tips": [1, 11], "titul": 9, "tl": 22, "to": [4, 5, 6, 7, 8, 9, 10, 11, 15, 17, 20], "toc": 11, "tod": [1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20], "todav": [9, 11, 14, 15, 16, 18, 22], "togeth": 16, "tom": [7, 8, 9, 11, 13, 15, 16, 18, 19, 20, 22], "tom_event": 21, "tomat": 0, "tomato1": 0, "tomato2": 0, "tomato3": 0, "tomato4": 0, "tomchanc": [19, 22], "tompong": [10, 22], "tontuel": 21, "too": 11, "topleft": [9, 17, 22], "topright": 22, "torn": 11, "tort": 4, "tortur": 11, "total": [14, 19], "tr": 22, "trab": 6, "trabaj": [9, 10, 13, 14, 15, 16], "traceback": 16, "track": 5, "tracks": 5, "tradicional": 7, "traduc": 15, "traduccion": [8, 9, 10, 11, 12, 13, 14, 15, 16], "transaprent": 14, "transfer": [10, 16], "transform": [4, 8, 9, 14, 16, 17], "transicion": 16, "translucidez": 11, "transmicion": [1, 8], "transmit": 7, "transorm": 8, "transpareci": 14, "transparent": [9, 11, 19], "transparet": 11, "trat": [10, 11, 14, 15, 16, 18, 21], "traves": [4, 9, 14, 16, 18, 20, 21], "traz": [10, 19], "trec": 1, "tres": [9, 11, 15, 16, 18, 21], "tri_left": 7, "tri_right": 7, "trigonometr": 20, "tru": [4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18, 20, 22], "truc": 22, "truculent": 11, "truetyp": 9, "truncacion": 16, "truth": 15, "try": [19, 22], "tupl": [3, 5, 6, 7, 11, 14, 16], "turn": [9, 17], "turquois": 0, "turquoise1": 0, "turquoise2": 0, "turquoise3": 0, "turquoise4": 0, "tutorial": [10, 17, 18, 22], "tuv": [4, 11, 15], "tuy": 15, "twitch": 11, "type": [7, 8, 9, 14, 17, 18, 21, 22], "typestr": 3, "u": [3, 7, 9, 11, 15, 19], "u4": 3, "ubic": 11, "ufunc": 16, "ugh": 11, "uint": 16, "uklinux": [19, 22], "ultil": 16, "ultim": [7, 9, 11, 13, 14, 15, 16], "unari": 6, "unas": 11, "under": [19, 22], "unic": [3, 7, 9, 10, 11, 12, 13, 14, 15, 16, 20], "unid": [5, 22], "unidad": 5, "unidimensional": 6, "uninitializ": [4, 5], "union": [11, 15], "unirt": 14, "unix": [7, 11], "unmap_rgb": 6, "unmodifi": 4, "unpaus": 5, "unpunch": [9, 17], "until": 17, "up": 9, "updat": [6, 9, 11, 14, 15, 17, 20, 21, 22], "usa": [5, 6, 8, 9, 14, 15, 16], "usad": [1, 3, 8, 9, 11, 13, 15, 18], "usal": 10, "usam": [8, 9, 14, 22], "usan": [8, 14, 16], "usand": [1, 8, 9, 11, 13, 14, 15, 16, 18, 19, 20, 22], "usar": [4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18, 20, 21, 22], "usaran": 14, "usaras": 15, "usarl": [8, 9, 11, 15, 16], "usars": [13, 15], "usas": 11, "use": [5, 7, 8, 9, 10, 11, 14, 15, 16], "used": 17, "useful": 8, "usen": [11, 15], "user": [4, 20], "userrect": 11, "uses": [4, 11, 16], "uso": [1, 2, 5, 11, 14, 15, 16, 19, 21], "usos": 1, "usr": [17, 18, 19, 20], "usual": [9, 19], "usuari": [9, 10, 11, 12, 13, 14, 15, 16, 18], "util": [1, 3, 4, 6, 8, 10, 11, 15, 16, 19, 20, 21, 22], "utiliz": [1, 4, 5, 6, 7, 8, 12, 15, 16, 19, 20, 21, 22], "v": [3, 6], "v3": 3, "v4l2": [4, 8], "va": [9, 11, 13, 14, 16, 18], "vac": [5, 13], "vaci": [3, 15], "val": [3, 8, 15], "valor": [3, 4, 5, 6, 7, 9, 11, 13, 14, 15, 16, 18, 21, 22], "valu": [4, 6, 15], "valueerror": [3, 7, 8, 16], "vam": [9, 14, 15, 16], "van": [5, 8, 9, 11, 13, 14, 19], "vaor": 16, "vari": [1, 4, 7, 10, 11, 13, 14, 15, 16, 18, 22], "variabl": [3, 7, 8, 9, 12, 15, 16, 22], "variant": 7, "varied": 11, "vas": [10, 11, 15], "vay": [5, 11, 14, 15], "ve": [7, 11, 14, 16, 18], "vea": [9, 14], "veam": [14, 16], "vean": 12, "veas": [5, 9, 16], "vec": [7, 9, 10, 11, 15, 22], "vector": 22, "veloc": [4, 8, 11, 14, 15, 20], "vem": [9, 14], "ven": 15, "vend": 14, "ventaj": [11, 13, 15, 20], "ventan": [9, 11, 13, 14, 18, 21], "veo": 11, "ver": [4, 6, 7, 8, 9, 11, 14, 15, 16, 18, 20, 21, 22], "veras": [9, 10, 14, 15, 16, 20, 21, 22], "verd": [6, 8, 9, 15, 16], "verdader": [3, 4, 5, 6, 9, 11, 12, 15], "verdaer": 15, "verduzc": 9, "verif": [4, 9, 14, 15, 19], "verific": [8, 9, 11, 15, 18, 21, 22], "verl": [14, 15, 22], "vers": 18, "version": [1, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 19, 22], "vertical": [4, 16], "vestigi": 15, "vez": [4, 5, 9, 11, 12, 14, 15, 16, 18, 19, 20, 22], "vflip": [4, 8], "vgrad": 16, "via": 8, "viaj": 22, "vid": [8, 13, 16], "vide": [8, 11, 15], "video0": [4, 8], "video_mem": 13, "videocaptur": [4, 8], "videoinf": 13, "vidinf": 13, "vidr": 11, "viej": [9, 11, 14], "vien": [8, 11, 14, 15, 16, 20], "viend": [8, 19], "vig": 7, "vim": [8, 9, 14], "vincul": 8, "violet": 0, "violetr": 0, "violetred1": 0, "violetred2": 0, "violetred3": 0, "violetred4": 0, "visibilic": 9, "visibl": [3, 7, 9, 13, 14], "vision": [1, 4], "vist": [1, 10, 16, 21, 22], "vistaz": [16, 22], "visual": 15, "visualiz": [1, 8, 9, 11, 14, 20], "visualizcion": 13, "viv": [1, 3, 15], "vol": [18, 21], "volt": [8, 9, 16], "volte": [4, 8], "volv": [8, 9, 13, 14, 18, 21, 22], "vos": [11, 19, 20], "voy": [10, 11, 16, 18], "vuelt": [15, 21, 22], "vuelv": [14, 16], "wait": [7, 11], "waitarrow": 7, "walk": [9, 17], "warning": [9, 17], "warranti": 4, "wav": [9, 17], "way": [4, 11], "wayland": 7, "ways": 11, "we": 8, "web": [4, 17], "webcam": 4, "webcams": 4, "west": 7, "wheat": 0, "wheat1": 0, "wheat2": 0, "wheat3": 0, "wheat4": 0, "when": [0, 8, 9, 11, 17], "wher": 6, "wheth": 4, "which": [21, 22], "whiff": [9, 17], "whiff_sound": [9, 17], "whil": [7, 8, 9, 11, 14, 17, 18, 20, 22], "whit": [0, 7], "whitesmok": 0, "whoops": 14, "width": [4, 13], "will": [7, 8, 9, 11, 17, 20, 22], "win": [9, 17], "window": 9, "windows": [4, 11], "wis": 16, "with": [4, 8, 9, 11, 16, 17, 19, 21, 22], "without": 4, "wm": 13, "won": 11, "works": 4, "wrapp": 3, "writ": 3, "www": [19, 22], "x": [2, 7, 9, 11, 13, 14, 18, 20, 22], "x4": 11, "xbm": 7, "xfad": 16, "xor": 7, "xormasks": 7, "xx": 7, "xxx": 7, "xxxx": 7, "xxxxx": 7, "xy": 22, "yac": 11, "yellow": 0, "yellow1": 0, "yellow2": 0, "yellow3": 0, "yellow4": 0, "yellowgr": 0, "yes": [16, 18], "you": [0, 7, 8, 11], "your": 7, "yuv": [4, 8], "z": [20, 22], "zer": 16, "zip": 2, "\u00c9l": 11, "\u00e9sta": [9, 15], "\u00e9ste": [9, 12]}, "titles": ["Colores Nombrados", "P\u00e1gina Principal de Pygame", "P\u00e1gina de Logotipos de Pygame", "pygame.BufferProxy", "pygame.camera", "pygame.cdrom", "pygame.Color", "pygame.cursors", "Tutoriales Pygame - Introducci\u00f3n al M\u00f3dulo de C\u00e1mara", "Tutorial de Pygame - Ejemplo del Chimpanc\u00e9, L\u00ednea Por L\u00ednea", "Crear Juegos con Pygame", "Gu\u00eda de Pygame para Newbies", "Tutoriales de Pygame - Importar e Inicializar", "Tutoriales de Pygame - Configuraci\u00f3n de los Modos de Visualizaci\u00f3n", "Tutoriales de Pygame - \u00a1Ayuda! \u00bfC\u00f3mo Muevo Una Imagen?", "Tutoriales de Pygame - Introducci\u00f3n al M\u00f3dulo de Sprites", "Tutoriales de Pygame - Introducci\u00f3n a Surfarray", "pygame/examples/chimp.py", "Revisi\u00f3n: Fundamentos de Pygame", "Dando Inicio", "Clases de objetos de juego", "Objetos controlables por los usuarios", "Juntando Todo"], "titleterms": {"1": [10, 18, 19, 20, 21, 22], "2": [14, 18, 19, 20, 22], "3": [18, 19, 21, 22], "4": [18, 20], "5": [18, 21], "6": 22, "De": 14, "El": [18, 22], "En": 14, "Est\u00e1s": 14, "La": 15, "Las": 15, "Los": [11, 15], "NO": 11, "No": 11, "Otras": 16, "Por": [9, 14], "Qu\u00e9": 14, "Tu": 14, "Un": 14, "Una": [10, 14, 20, 21], "actualiz": 9, "ahor": 14, "algun": 14, "alpha": 11, "amig": 11, "an": 3, "anim": 11, "array": 3, "atras": 14, "audi": 5, "avanz": [15, 16], "ayud": 14, "ball": 22, "basic": [8, 13, 18], "bat": 21, "bats": 22, "blit": 14, "blitting": 18, "bloque": 16, "bucl": [9, 18], "buff": 3, "bufferproxypygam": 3, "cam": 8, "cambi": 14, "camer": 4, "camerapygam": 4, "captur": 8, "carg": [9, 19], "cdrom": 5, "cdrompygam": 5, "centr": 9, "cerr": 12, "chimp": 17, "chimpanc": 9, "clas": [9, 15, 20, 21], "codif": 10, "colision": [11, 15], "color": [0, 6, 8], "colorkey": 11, "colorpygam": 6, "com": [13, 14], "comod": 11, "complet": 9, "comput": 8, "comun": 15, "conect": 8, "configur": 13, "conten": 10, "control": [5, 8, 21], "convert": 11, "coorden": 14, "cos": 11, "cre": [9, 10, 14], "cuent": 14, "cursor": 7, "cursorspygam": 7, "da": 18, "dam": 14, "dand": 19, "decid": 13, "definicion": 14, "dej": 22, "deteccion": [11, 15], "dibuj": 9, "digresion": [20, 21], "distraig": 11, "document": 1, "ejempl": [9, 13, 16], "ensambl": 14, "entonc": 14, "entrad": [9, 14], "escen": 9, "estil": 10, "event": [9, 11, 18, 21], "exampl": 17, "export": 3, "extend": 15, "fin": 9, "final": 22, "fisic": 20, "flu": 14, "fond": [9, 14], "for": [4, 5, 6, 7], "funcion": [13, 14, 16, 19], "fundament": 18, "gestion": 11, "golpe": 22, "graduacion": 16, "grup": 15, "gui": 11, "hac": 14, "haci": 14, "hardwar": 11, "haz": 11, "hero": 14, "histori": 15, "hit": 22, "imag": [8, 14], "imagen": 14, "import": [8, 9, 12, 16], "inici": 19, "inicializ": [8, 9, 12], "introduccion": [8, 9, 10, 13, 15, 16], "jueg": [9, 10, 18, 20], "junt": [15, 22], "lad": 22, "leccion": 15, "legendari": 2, "let": 22, "lin": 19, "line": 9, "list": [8, 14], "logotip": 2, "loop": 9, "main": 9, "manej": [9, 14, 19], "maner": 11, "map": 14, "mas": [11, 14, 16], "masc": 8, "mezcl": 15, "mientr": 9, "misteri": 14, "mod": 13, "model": 8, "modul": [4, 5, 7, 8, 9, 15, 19], "molest": 11, "mostr": 9, "mov": 14, "movimient": 14, "much": 15, "muev": 14, "multipl": 14, "necesitas": 11, "nombr": 0, "not": 10, "numpy": 16, "object": [3, 6], "objet": [9, 18, 20, 21], "pagin": [1, 2], "pantall": 14, "par": [9, 11], "part": 11, "pas": 14, "pelot": [20, 22], "perfect": 11, "pixel": [11, 14], "pont": 11, "prepar": 9, "primer": [14, 19], "principal": [1, 9], "principi": 11, "problem": [11, 15], "problemat": 11, "product": 22, "propi": 15, "protocol": 3, "py": 17, "pygam": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21], "python": 11, "pythony": 11, "quit": 12, "realment": 11, "reconoc": 11, "rect": 11, "rects": 11, "recurs": [9, 19], "referent": 1, "regl": 11, "renderiz": 15, "representations": 6, "resourc": 7, "revision": 18, "secundari": 11, "seis": 11, "sep": 11, "setup": 9, "sig": 14, "simpl": [20, 21], "sobr": 10, "sol": [8, 14], "sprit": [9, 15, 20], "subsistem": 11, "suci": 11, "superfici": [11, 16], "surfac": [3, 11, 16], "surfarray": 16, "ta": 18, "tabl": 10, "termin": 9, "text": 9, "the": 22, "thresholding": 8, "through": 3, "tip": 15, "to": 3, "tod": [9, 14, 22], "tom": 14, "trabaj": 11, "transmision": 8, "transparent": 16, "tutorial": [1, 8, 9, 12, 13, 14, 15, 16], "umbraliz": 8, "usa": 11, "use": 4, "uso": 8, "usuari": 21, "val": 11, "vector": 20, "vision": 8, "visualiz": 13, "viv": 8, "vs": 11}})././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0251257 pygame-2.6.1/docs/generated/es/tutorials/0000755000175100001770000000000014676242436017750 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.0761304 pygame-2.6.1/docs/generated/es/tutorials/CamaraIntro.html0000644000175100001770000011150114676242431023030 0ustar00runnerdocker Tutoriales Pygame - Introducción al Módulo de Cámara — pygame v2.6.1 documentation

Introducción al Módulo de Cámara

Autor:

Nirav Patel

Contacto:

nrp@eclecti.cc

Traducción al español:

Estefanía Pivaral Serrano

Pygame 1.9 viene con soporte para cámaras interconectadas, lo que nos permite capturar imagenes quietas, ver transmiciones en vivo y hacer visión computarizada. Este tutorial cubrirá todos estos casos de uso, proporcionando ejemplos de código que pueden usar para basar sus propias apps o juegos. Pueden consultar la documentación de referencia por una API completa: reference documentation

Nota

A partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como EXPERIMENTAL, lo que significa que la API podría cambiar las versiones posteriores.

Importación e Inicialización

import pygame
import pygame.camera
from pygame.locals import *

pygame.init()
pygame.camera.init()

Dado que el módulo de cámara es opcional, necesita ser importado e inicializado manualmente como se muestra arriba.

Captura de una sola imagen

Ahora repasaremos el caso más simple en el que abrimos una cámara y capturamos un cuadro como Surface. En el siguiente ejemplo, asumimos que hay una cámara en /dev/video0 en la computadora, y la inicializamos con un tamaño de 640 por 480. La Surface llamada 'image' es lo que sea que la cámara estaba viendo cuando get_image() fue llamada.

cam = pygame.camera.Camera("/dev/video0",(640,480))
cam.start()
image = cam.get_image()

Listado de Cámaras Conectadas

Puede que se estén preguntando, ¿y si no sabemos la ruta exacta de la cámara? Podemos pedirle al módulo que nos proporcione la lista de cámaras conectadas a la computadora y que inicialice la primera cámara en la lista.

camlist = pygame.camera.list_cameras()
if camlist:
    cam = pygame.camera.Camera(camlist[0],(640,480))

Uso los Controles de la Cámara

La mayoría de las cámaras admiten controles como voltear la imagen y cambiar el brillo. set_controls() y get_controls() pueden ser usados en cualquier momento después de usar start().

cam.set_controls(hflip = True, vflip = False)
print camera.get_controls()

Captura de una Transmisión en Vivo

El resto de este tutorial se basará en capturar un flujo en vivo de imagenes. Para ello usaremos la clase que se muestra a continuación. Como se describe, simplemente mostrará (blit) en la pantalla una corriente constante de cuadros a la pantalla, mostrando efecivamente un video en vivo. Básicamente es lo que se espera, hacer un bucle con get_image(), se aplica a la pantalla de Surface, y lo voltea. Por razones de rendimiento, suministraremos a la cámara la misma Surface para utilizar en cada ocasión.

class Capture:
    def __init__(self):
        self.size = (640,480)
        # crear una visualización de surface. cosas estándar de pygame
        self.display = pygame.display.set_mode(self.size, 0)

        # esto es lo mismo que vimos antes
        self.clist = pygame.camera.list_cameras()
        if not self.clist:
            raise ValueError("Sorry, no se detectaron cámaras.")
        self.cam = pygame.camera.Camera(self.clist[0], self.size)
        self.cam.start()

        # crear una surface para capturar, con fines de rendimiento
        # profundidad de bit es la misma que la de la Surface de visualización.
        self.snapshot = pygame.surface.Surface(self.size, 0, self.display)

    def get_and_flip(self):
        # si no querés vincular la velocidad de cuadros a la cámara, podés verificar
        # si la cámara tiene una imagen lista. Tené en cuenta que mientras esto funciona
        # en la mayoría de las cámaras, algunas nunca van a devolver un 'true'.
        if self.cam.query_image():
            self.snapshot = self.cam.get_image(self.snapshot)

        # pasalo (blit) a la Surface de visualización. ¡Simple!
        self.display.blit(self.snapshot, (0,0))
        pygame.display.flip()

    def main(self):
        going = True
        while going:
            events = pygame.event.get()
            for e in events:
                if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE):
                    # cerrar la cámara de forma segura
                    self.cam.stop()
                    going = False

            self.get_and_flip()

Dado que get_image() es una llamada de bloqueo que podría tomar bastante tiempo en una cámara lenta, este ejemplo usa query_image() para ver si la cámara está lista. Esto permite separar la velocidad de fotogramas de tu juego de la de tu cámara. También es posible hacer que la cámara capture imágenes en un subproceso separado obteniendo aproximadamente la misma ganancia de rendimiento, si encontrás que tu cámara no es compatible con la función query_image().

Visión Básica por Computadora

Al usar los módulos de la cámara, transormación y máscara, pygame puede hacer algo de visión por computadora básica.

Modelos de Color

When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial.

self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB")
../_images/camera_rgb.jpg
self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV")
../_images/camera_yuv.jpg
self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV")
../_images/camera_hsv.jpg

Thresholding (Umbralización)

Usando la función threshold() del módulo de transformación, uno puede hacer simple efectos del estilo de pantalla verde o asilar objetos de colores especificos en una escena. En el siguiente ejemplo, usamos umbralización para separar el árbol verde y hacemos que el resto de la imagen sea negra. Consultá la documentación de referencia para más detalles de la función: threshold function.

self.thresholded = pygame.surface.Surface(self.size, 0, self.display)
self.snapshot = self.cam.get_image(self.snapshot)
pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)
../_images/camera_thresholded.jpg

Por supuesto, esto solo es útil si ya conocés el color exacto del objeto que estás buscando. Para evitar esto y hacer la umbralización utilizable en el mundo real, necesitamos agregar una etapa de calibración en la que identifiquemos el color de un objeto y usarlo para umbralizarlo. Nosotros usaremos la función average_color() del módulo de transformación para hacer esto. A continuación, se muestra un ejemplo de la función calibración que se podría repetir hasta que se produzca un evento como apretar una tecla y [obtener] una imagen de cómo se vería. El color adentro del cuadro será el que se use para la umbralización. Hay que tener en cuenta que estamos usando el modelo de color HSV en las imágenes a continuación.

def calibrate(self):
    # capturar la imagen
    self.snapshot = self.cam.get_image(self.snapshot)
    # aplicarlo a la Surface de visualización
    self.display.blit(self.snapshot, (0,0))
    # crear un rectángulo (rect) en el medio de la pantalla
    crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4)
    # obtener el color promedio del área dentro del rect
    self.ccolor = pygame.transform.average_color(self.snapshot, crect)
    # rellenar la esquina superior izquierda con ese color
    self.display.fill(self.ccolor, (0,0,50,50))
    pygame.display.flip()
../_images/camera_average.jpg
pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)
../_images/camera_thresh.jpg

Pueden usar la misma idea para hacer una simple pantalla verde/azul, al obtener primero una imagen del fondo y después umbralizar contrastando con ella. El ejemplo a continuación solo tiene la cámara apuntando a una pared blanca en modelo de color HSV.

def calibrate(self):
    # captura un montón de imagenes de fondo.
    bg = []
    for i in range(0,5):
      bg.append(self.cam.get_image(self.background))
    # promedia el color de las imágenes para llegar a uno solo y deshacerse de posibles perturbaciones
    pygame.transform.average_surfaces(bg,self.background)
    # aplicarlo a la Surface de visualización
    self.display.blit(self.background, (0,0))
    pygame.display.flip()
../_images/camera_background.jpg
pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)
../_images/camera_green.jpg

Uso del Módulo de Máscara

Lo anterior es genial si solo querés mostrar imágenes, pero con el módulo mask module, también podés usar la cámara como dispositivo de entrada para un juego. Por ejemplo, volviendo al ejemplo de la umbralización de un objeto específico, podemos encontrar la posición de ese objeto y usarlo para controlar un objeto en la pantalla.

def get_and_flip(self):
    self.snapshot = self.cam.get_image(self.snapshot)
    # umbralizar contra el color que obtuvimos antes
    mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30))
    self.display.blit(self.snapshot,(0,0))
    # mantener solo el manchón más grande de ese color
    connected = mask.connected_component()
    # asegurarse que el manchón sea lo suficientemente grande, que no sea solo perturbaciones
    if mask.count() > 100:
        # encontrar el centro del manchónfind the center of the blob
        coord = mask.centroid()
        # dibujar un círculo con un tamaño variable en el tamaño del manchón
        pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5))
    pygame.display.flip()
../_images/camera_mask.jpg

Este es solo el ejemplo más básico. Podés rastrear múltiples manchas de diferentes colores, encontrar los contornos de los objetos, tener detección de colisiones entre objetos de la vida real y del juego, obtener el ángulo de un objetos para permitir su control, y más. ¡A divertirse!




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612185.16913 pygame-2.6.1/docs/generated/es/tutorials/ChimpanceLineaporLinea.html0000644000175100001770000016056114676242431025174 0ustar00runnerdocker Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea — pygame v2.6.1 documentation

Chimpancé, Línea Por Línea

Autor:

Pete Shinners. Traducción al español: Estefania Pivaral Serrano

Contacto:

pete@shinners.org

Introducción

Entre los ejemplos de pygame hay un ejemplo simple llamado "chimp" (chimpancé). Este ejemplo simula un mono golpeable que se mueve alrededor de la pantalla con promesas de riquezas y recomepensas. El ejemplo en sí es muy simple y acarrea poco código de comprobación de error. Como modelo de programa, Chimp demuestra muchas de las bondades de pygame, como por ejemplo crear una ventana, cargar imágenes y sonidos, representar texto, y manejo de eventos básicos y del mouse.

El programa y las imagenes se pueden encontrar dentro de la fuente estándar de distribución de pygame. Se puede ejecutar al correr python -m pygame.examples.chimp en la terminal.

Este tutorial atravesará el código bloque a bloque, explicando cómo funciona el mismo. Además, se hará mención de cómo se puede mejorar el código y qué errores de comprobación podrían ser de ayuda.

Este tutorial es excelente para aquellas personas que están buscando una primera aproximación a códigos de pygame. Una vez que pygame esté completamente instalado, podrás encontrar y ejecutar la demostración del chimpancé para ti mismo en el directorio de ejemplos.

(no, este no es un anuncio, es una captura de pantalla)

chimp game banner

Full Source

Importación de Módulos

Este es el código que importa todos los módulos necesarios del programa. Este código también comprueba la disponibilidad de algunos de los módulos opcionales de pygame.

# Import Modules
import os
import pygame as pg

if not pg.font:
    print("Warning, fonts disabled")
if not pg.mixer:
    print("Warning, sound disabled")

main_dir = os.path.split(os.path.abspath(__file__))[0]
data_dir = os.path.join(main_dir, "data")

Primero, se importa el módulo estándar de python "os" (sistema operativo). Esto permite hacer cosas como crear rutas de archivos independientes de la platforma.

En la sigueinte línea, se importa el paquete de pygame. En nuestro caso, importamos pygame como pg, para que todas las funciones de pygame puedan ser referenciadas desde el espacio de nombres pg.

Algunos de los módulos de pygame son opcionales, y si no fueran encontrados, la evaluación será False. Es por eso que decidimos mostrar (print) un agradable mensaje de advertencia si los módulos font o mixer no están disponibles. (Aunque estos solo podrían no estar disponibles en situaciones poco comunes).

Finalmente, se preparan dos rutas que serán usadas para el resto del código. Una de ellas es main_dir, que usa el módulo os.path y la variable __file__ asignada por Python para localizar el archivo de juegos de python, y extraer la carpeta desde esa ruta. Luego, ésta prepara la ruta data_dir para indicarle a las funciones de carga exactamente dónde buscar.

Carga de Recursos

A continuación, se presentan dos funciones que se pueden usar para cargar imágenes y sonidos. En esta sección examinaremos cada función individualmente.

def load_image(name, colorkey=None, scale=1):
    fullname = os.path.join(data_dir, name)
    image = pg.image.load(fullname)

    size = image.get_size()
    size = (size[0] * scale, size[1] * scale)
    image = pg.transform.scale(image, size)

    image = image.convert()
    if colorkey is not None:
        if colorkey == -1:
            colorkey = image.get_at((0, 0))
        image.set_colorkey(colorkey, pg.RLEACCEL)
    return image, image.get_rect()

Esta función toma el nombre de la imagen a cargar. Opcionalmente, también toma un argumento que puede usar para definir la clave de color (colorkey) de la imagen, y un argumento para determinar la escala de la imagen. La clave de color se usa en la gráfica para representar un color en la imagen que es transparente.

Lo que esta función hace en primera instancia es crearle al archivo un nombre de ruta completo. En este ejemplo, todos los recursos están en el subdirectorio "data". Al usar la función os.path.join, se creará el nombre de ruta para cualquier plataforma en que se ejecute el juego.

El paso siguiente es cargar la imagen usando la función pygame.image.load(). Luego de que la imagen se cargue, llamamos a la función convert(). Al hacer esto se crea una nueva copia del Surface y convierte su formato de color y la profundidad, de tal forma que coincida con el mostrado. Esto significa que el dibujo (blitting) de la imagen a la pantalla sucederá lo más rápido posible.

Luego, usando la función pygame.transform.scale() se definirá el tamaño de la imagen. Esta función toma una Surface y el tamaño al cual se debería adecuar. Para darle tamaño con números escalares, se puede tomar la medida y determinar las dimensiones x e y con número escalar.

Finalmente, definimos la clave de color para la imagen. Si el usuario suministró un valor para el parametro de la clave de color, usamos ese valor como la clave de color de la imagen. Usualmente, éste sería un valor de color RGB (red-green-blue = rojo-verde-azul), como (255, 255, 255) para el color blanco. También es posible pasar el valor -1 como la clave de color. En este caso, la función buscará el color en el píxel de arriba a la izquierda de la imagen, y lo usará para la clave de color.

def load_sound(name):
    class NoneSound:
        def play(self):
            pass

    if not pg.mixer or not pg.mixer.get_init():
        return NoneSound()

    fullname = os.path.join(data_dir, name)
    sound = pg.mixer.Sound(fullname)

    return sound

La anterior, es la función para cargar un archivo de sonido. Lo primero que hace esta función es verificar si el módulo pygame.mixer se importó correctamente. En caso de no ser así, la función va a devolver una instancia de reproducción de un sonido de error. Esto obrará como un objeto de Sonido normal para que el juego se ejecute sin ningún error de comprobación extra.

Esta funcion es similar a la función de carga de imagen, pero maneja diferentes problemas. Primero, creamos una ruta completa al sonido de la imagen y cargamos el archivo de sonido. Luego, simplemente devolvemos el objeto de Sonido cargado.

Clases de Objetos para Juegos

En este caso creamos dos clases (classes) que representan los objetos en nuestro juego. Casi toda la logica del juego se organiza en estas dos clases. A continuación las revisaremos de a una.

class Fist(pg.sprite.Sprite):
    """moves a clenched fist on the screen, following the mouse"""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("fist.png", -1)
        self.fist_offset = (-235, -80)
        self.punching = False

    def update(self):
        """move the fist based on the mouse position"""
        pos = pg.mouse.get_pos()
        self.rect.topleft = pos
        self.rect.move_ip(self.fist_offset)
        if self.punching:
            self.rect.move_ip(15, 25)

    def punch(self, target):
        """returns true if the fist collides with the target"""
        if not self.punching:
            self.punching = True
            hitbox = self.rect.inflate(-5, -5)
            return hitbox.colliderect(target.rect)

    def unpunch(self):
        """called to pull the fist back"""
        self.punching = False

En este caso, creamos una clase (class) que representa el puño del jugador. Esta se deriva de la clase Sprite incluida en el módulo pygame.sprite. La función __init__ es llamada cuando se crean nuevas instancias de este clase. Esto le permite a la función __init__ del Sprite preparar nuestro objeto para ser usado como una imagen (sprite). Este juego usa uno de los dibujos de sprite de la clase de Grupo. Estas clases pueden dibujar sprites que tienen un atributo "imagen" y uno "rect". Al cambiar simplemente estos dos atributos, el compilador (renderer) dibujará la imagen actual en la posición actual.

Todos los sprites tienen un método update(). Esta función es tipicamente llamada una vez por cuadro. Es en esta función donde se debería colocar el código que mueva y actualice las variables para el sprite. El método de update() para el movimiento del puño, mueve el puño al lugar donde se encuentre el puntero del mouse. Asímismo, compensa sutilmente la posición del puño sobre el objeto, si el puño está en condición de golpear.

Las siguientes dos funciones punch() y unpunch() cambian la condición de golpeado del puño. El método punch() también devuelve un valor verdadero si el puño está chocando con el sprite objetivo.

class Chimp(pg.sprite.Sprite):
    """moves a monkey critter across the screen. it can spin the
    monkey when it is punched."""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite intializer
        self.image, self.rect = load_image("chimp.png", -1, 4)
        screen = pg.display.get_surface()
        self.area = screen.get_rect()
        self.rect.topleft = 10, 90
        self.move = 18
        self.dizzy = False

    def update(self):
        """walk or spin, depending on the monkeys state"""
        if self.dizzy:
            self._spin()
        else:
            self._walk()

    def _walk(self):
        """move the monkey across the screen, and turn at the ends"""
        newpos = self.rect.move((self.move, 0))
        if not self.area.contains(newpos):
            if self.rect.left < self.area.left or self.rect.right > self.area.right:
                self.move = -self.move
                newpos = self.rect.move((self.move, 0))
                self.image = pg.transform.flip(self.image, True, False)
        self.rect = newpos

    def _spin(self):
        """spin the monkey image"""
        center = self.rect.center
        self.dizzy = self.dizzy + 12
        if self.dizzy >= 360:
            self.dizzy = False
            self.image = self.original
        else:
            rotate = pg.transform.rotate
            self.image = rotate(self.original, self.dizzy)
        self.rect = self.image.get_rect(center=center)

    def punched(self):
        """this will cause the monkey to start spinning"""
        if not self.dizzy:
            self.dizzy = True
            self.original = self.image

Si bien la clase (class) Chimp está haciendo un poco más de trabajo que el puño, no resulta mucho más complejo. Esta clase moverá al chimpancé hacia adelante y hacia atrás, por la pantalla. Cuando el mono es golpeado, él girará con un efecto de emoción. Esta clase también es derivada de la base de clases Sprite y es iniciada de igual manera que el puño. Mientras se inicia, la clase también establece el atributo "area" para que sea del tamaño de la pantalla de visualización.

La función update para el chimpancé simplemente se fija en el estado actual del mono. Esta puede ser "dizzy" (mareado), la cual sería verdadera si el mono está girando a causa del golpe. La función llama al método _spin o _walk. Estas funciones son prefijadas con un guión bajo, lo cual en el idioma estándar de python sugiere que estos métodos deberían ser solo usados por la clase Chimp. Podríamos incluso hasta escribirlas con un doble guión bajo, lo cual indicaría a python que realmente intente hacerlas un método privado, pero no necesitamos tal protección. :)

El método _walk crea una nueva posición para el mono al mover el 'rect' actual al centro del puño. Si la nueva posición se cruza hacia afuera del área de visualización de la pantalla, el movimiento del puño da marcha atrás. También imita la imagen usando la función pygame.transform.flip(). Este es un efecto crudo que hace que el mono se vea como si estuviera cambiando de dirección.

El método _spin es llamado cuando el mono está actualmente en estado "dizzy" (mareado). El atributo 'dizzy' es usado para guardar el monto de rotación. Cuando el mono ha rotado por completo en su eje (360 grados) se resetea la imagen a la versión original no rotada. Antes de llamar a la función pygame.transform.rotate(), verás que el código hace una referencia local a la función simplemente llamanda "rotate". No hay ncesidad de hacer eso en este ejemplo, aquí fue realizada para mantener la siguiente línea un poco más corta. Notese que al llamar a la función rotate, se está siempre rotando la imagen original del mono. Cuando rotamos, hay un pequeña pérdida de calidad. Rotar repetidamente la misma imagen genera que la calidad se deteriore cada vez más. Esto se debe a que las esquinas de la imagen van a haber sido rotadas de más, causando que la imagen se haga más grande. Nos aseguramos que la nueva imagen coincida con el centro de la vieja imagen, para que de esta forma se rote sin moverse.

El último método es punched() el cual indica al sprite que entre en un estado de mareo. Esto causará que la imagen empice a girar. Además, también crea una copia de la actual imagen llamada "original".

Inicializar Todo

Antes de poder hacer algo con pygame, necesitamos asegurarnos que los módulos estén inicializados. En este caso, vamos a abrir también una simple ventana de gráficos. Ahora estamos en la función main() del programa, la cual ejecuta todo.

pg.init()
screen = pg.display.set_mode((1280, 480), pg.SCALED)
pg.display.set_caption("Monkey Fever")
pg.mouse.set_visible(False)

La primera línea para inicializar pygame realiza algo de trabajo por nosotros. Verifica a través del módulo importado pygame e intenta inicializar cada uno de ellos. Es posible volver y verificar que los módulos que fallaron al iniciar, pero no vamos a molestarnos acá con eso. También es posible tomar mucho más control e inicializar cada módulo en especifico, uno a uno. Ese tipo de control no es necesario generalmente, pero está disponible en caso de ser deseado.

Luego, se configura el modo de visualización de gráficos. Notse que el módulo pygame.display es usado para controlar todas las configuraciones de visualización. En este caso nosotros estamos buscando una ventana 1280x480, con SCALED, que es la señal de visualización (display flag) Esto aumenta proporcionalmente la ventana de visualización (display) más grande que la ventana. (window)

Por último, establecemos el título de la ventana y apagamos el cursor del mouse para nuestra ventana. Es una acción básica y ahora tenemos una pequeña ventana negra que está lista para nuestras instrucciones (bidding) u ofertas. Generalmente, el cursor se mantiene visible por default, asi que no hay mucha necesidad de realmente establecer este estado a menos que querramos esconderlo.

Crear el Fondo

Nuestro programa va a tener un mensaje de texto en el fondo. Sería bueno crear un único surface que represente el fondo y lo use repetidas veces. El primer paso es crear el Surface.

background = pg.Surface(screen.get_size())
background = background.convert()
background.fill((170, 238, 187))

Esto crea el nuevo surface, que en nuestro caso, es del mismo tamaño que la ventana de visualización. Notese el llamado extra a convert() luego de crear la Surface. La función convert() sin argumentos es para asegurarnos que nuestro fondo sea del mismo formato que la ventana de visualización, lo cual nos va a brindar resultados más rápidos.

Lo que nosotros hicimos también, fue rellenar el fondo con un color verduzco. La función fill() suele tomar como argumento tres instancias de colores RGB, pero soporta muchos formatos de entrada. Para ver todos los formatos de color veasé pygame.Colorpygame object for color representations.

Centrar Texto en el Fondo

Ahora que tenemos el surface del fondo, vamos a representar el texto en él. Nosotros solo haremos esto si vemos que el módulo pygame.font se importó correctamente. De no ser así, hay que saltear esta sección.

if pg.font:
    font = pg.font.Font(None, 64)
    text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10))
    textpos = text.get_rect(centerx=background.get_width() / 2, y=10)
    background.blit(text, textpos)

Tal como pueden ver, hay un par de pasos para realizar esto. Primero, debemos crear la fuente del objeto y renderizarlo (representarlo) en una nueva Surface. Luego, buscamos el centro de esa nueva surface y lo pegamos (blit) al fondo.

La fuente es creada con el constructor Font() del módulo font. Generalmente, uno va a poner el nombre de la fuente TrueType en esta función, pero también se puede poner None, como hicimos en este caso, y entonces se usará la fuente por predeterminada. El constructor Font también necesita la información del tamaño de la fuente que se quiere crear.

Luego vamos a represetar (renderizar) la fuente en la nueva surface. La función render crea una nueva surface que es del tamaño apropiado para nuestro texto. En este caso, también le estamos pidiendo al render que cree un texto suavizado (para un lindo efecto de suavidad en la apariencia) y que use un color gris oscuro.

Lo siguiente que necesitamos es encontrar la posición la posición central, para colocar el texto en el centro de la pantalla. Creamos un objeto "Rect" de las dimensiones del texto, lo cual nos permite asignarlo fácilmente al centro de la pantalla.

Finalmente, blitteamos (pegamos o copiamos) el texto en la imagen de fondo.

Mostrar el Fondo mientras Termina el Setup

Todavía tenemos una ventana negra en la pantalla. Mostremos el fondo mientras esperamos que se carguen los otros recursos.

screen.blit(background, (0, 0))
pygame.display.flip()

Esto va a blittear (pegar o copiar) nuestro fondo en la ventana de visualización. El blit se explica por sí mismo, pero ¿qué está haciendo esa rutina flip?

En pygame, los cambios en la surface de visualización (display) no se hacen visibles inmediatamente. Normalmente, la pantalla debe ser actualizacada para que el usuario pueda ver los cambios realizados. En este caso la función flip() es perfecta para eso porque se encarga de toda el área de la pantalla.

Preparar Objetos del Juego

En este caso crearemos todos los objetos que el juego va a necesitar.

whiff_sound = load_sound("whiff.wav")
punch_sound = load_sound("punch.wav")
chimp = Chimp()
fist = Fist()
allsprites = pg.sprite.RenderPlain((chimp, fist))
clock = pg.time.Clock()

Primero cargamos dos efectos de sonido usando la función load_sound, que se encuentra definida en código arriba. Luego, creamos una instancia para cada uno de los sprites de la clase. Por último, creamos el sprite Group que va a contener todos nuestros sprites.

En realidad, nosotros usamos un grupo especial de sprites llamado RenderPlain. Este grupo de sprites puede dibujar en la pantalla todos los sprites que contiene. Es llamado RenderPlain porque en realidad hay grupos Render más avanzados, pero para nuestro juego nosotros solo necesitamos un dibujo simple. Nosotros creamos el grupo llamado "allsprites" al pasar una lista con todos los sprites que deberían pertenecer al grupo. Exise la posibilidad, si más adelante quisieramos, de agregar o sacar sprites de este grupo, pero para este juego no sería necesario.

El objeto clock que creamos será usado para ayudar a controlar la frequencia de cuadros de nuestro juego. Vamos a usarlo en el bucle (loop) principal de nuestro juego para asegurarnos que no se ejecute demasiado rápido.

Bucle principal (Main Loop)

No hay mucho por acá, solo un loop infinito.

going = True
while going:
    clock.tick(60)

Todos los juegos se ejecutan sobre una especie de loop. El orden usual de las cosas es verificar el estado de la computadora y la entrada de usuario, mover y actualizar el estado de todos los objetos, y luego dibujarlos en la pantalla. Verás que este ejemplo no es diferente.

También haremos un llamado a nuestro objeto clock, que asegurará que nuestro juego no se ejecute pasando los 60 cuadros por segundo.

Manejar los Eventos de Entrada

Este es un caso extremandamente simple para trabajar la cola de eventos.

for event in pg.event.get():
    if event.type == pg.QUIT:
        going = False
    elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE:
        going = False
    elif event.type == pg.MOUSEBUTTONDOWN:
        if fist.punch(chimp):
            punch_sound.play()  # punch
            chimp.punched()
        else:
            whiff_sound.play()  # miss
    elif event.type == pg.MOUSEBUTTONUP:
        fist.unpunch()

Primero obtenemos todos los Eventos (events) disponibles en pygame y los recorremos en loop. Las primeras dos pruebas es para ver si el usuario dejó nuestro juego, o si presionó la tecla de escape. En estos casos, configuramos going en False, permitiendonos salir del loop infinito.

A continuación, verificamos si se presionó o si se soltó el botón del mouse. En el caso de que el botón se haya presionado, preguntamos al primer objeto si chocó con el mono. Se reproduce el sonido apropiado, y si el mono fue golpeado, le decimos que empiece a girar (al hacer un llamado a su método punched() )

Actualizar los Sprites

allsprites.update()

Los grupos de Sprite tienen un método update(), que simplemente llama al método de actualización para todos los sprites que contiene. Cada uno de los objetos se va a mover, dependiendo de cuál sea el estado en el que estén. Acá es donde el mono se va a mover de un lado a otro, o va a girar un poco más lejos si fue recientemente golpeado.

Dibujar la Escena Completa

Ahora que todos los objetos están en el lugar indicado, es el momento para dibujarlos.

screen.blit(background, (0, 0))
allsprites.draw(screen)
pygame.display.flip()

La primera llamada de blit dibujará el fondo en toda la pantalla. Esto borra todo lo que vimos en el cuadro anterior (ligeramente ineficiente, pero suficientemnte bueno para este juego). A continuación, llamamos al método draw() del contenedor de sprites. Ya que este contenedor de sprites es en realidad una instancia del grupo de sprites "DrawPlain", sabe como dibujar nuestros sprites. Por último, usamos el método flip() para voltear los contenidos del software de pygame. Se realiza el flip a través del cargado de la imagen en segundo plano. Esto hace que todo lo que dibujamos luego se visibilice de una vez.

Fin del Juego

El usuario ha salido del juego, hora de limpiar (clean up)

pg.quit()

Hacer la limpieza, el cleanup, de la ejecución del juego en pygame es extremandamente simple. Ya que todas las variables son automáticamente destruidas, nosotros no tenemos que hacer realmnete nada, únicamente llamar a pg.quit() que explicitamente hace la limpieza de las partes internas del pygame.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612185.19913 pygame-2.6.1/docs/generated/es/tutorials/CrearJuegos.html0000644000175100001770000002462414676242431023052 0ustar00runnerdocker Crear Juegos con Pygame — pygame v2.6.1 documentation

Crear Juegos con Pygame

Traducción al español:

Estefanía Pivaral Serrano

Tabla de Contenido

1. Introducción

1. Introducción

Antes que nada, asumo que han leído el tutorial Chimpancé línea por línea, que presenta lo básico de Python y pygame. Denle una leida antes de leer este tutorial, ya que no voy a repetir lo que ese tutorial dice (o al menos no en tanto detalle.) Este tutorial apunta a aquellos que entienden cómo hacer un "juego" ridiculamente simple, y a quien le gustaría hacer un juego relativamente sencillo como Pong. Les presenta algunos conceptos de diseño de juegos, algunas nociones matemáticas sencillas para trabajar con la física de la pelota, y algunas formas de mantener el juego fácil de mantener y expandir.

Todo el código en este tutorial sirve para implementar TomPong, un juego que yo he escrito. Hacia el fin del tutorial, no solo deberías tener una idea más firme de pygame, sino que también deberías poder entender como funciona TomPong y cómo hacer tu propia versión.

Ahora, un breve resumen de los conceptos básicos de pygame. Un método común para organizar el código de un juego es dividirlo en las siguientes seis secciones:

  • Carga de módulos que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame.

  • Funciones de manejo de recursos; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener.

  • Clases de objeto de juego; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú.

  • Cualquier otra función del juego; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función.

  • Inicializar el juego, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar.

  • El loop (búcle) principal, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla.

Cada juego que hagas tendrá alguna o todas estas secciones, posiblemente con más de las propias. Para los propósitos de este tutorial, voy a escribir sobre como TomPong está planteado y las ideas sobre las que escribo pueden transferirse a casi cualquier tipo de juego que puedas crear. También voy a asumir que deseas mantener todo el código en un único archivo, pero si estás creando un juego razonablemente grande, suele ser una buena idea incluir ciertas secciones en los archivos de módulos. Poner las clases de objeto en un archivo llamado objects.py, por ejemplo, puede ayudarte a mantener la lógica del juego separada de los objetos del juego. Si tenés mucho código de manejo de recursos, también puede ser útil poner eso en resources.py Luego podés usar from objects,resources import * para importar todas las clases y funciones.

1.1. Una nota sobre estilos de codificación

Lo primero a tener en cuenta cuando abordamos cualquier proyecto de programación es el decidir el estilo de codificación, y mantenerse consistente. Python resuelve mucho de los problemas debido a su estricta interpretación de los espacios en blanco y la sangría, pero aún así se puede elegir el tamaño de sus sangrías, si coloca cada importación de módulo en una nueva línea, cómo comentas el código, etc. Verás cómo hago todas estas cosas en los ejemplos del código; no es necesario que se use mi estilo, pero cualquiera sea el estilo que adoptes, usalo en todo el programa. Tratá también de documentar todas tus clases y comentá en cada fragmento de código que parezca oscuro, sin caer en comentar lo obvio. He visto mucho gente que hace lo siguiente: :

player1.score += scoreup # Add scoreup to player1 score

(Agrega scoreup al score de player 1)

El peor código está mal diseñado, con cambios en el estilo que aparentan ser aleatorios y documentación deficiente. El código deficiente no solo es molesto para otras personas, pero también hace que sea difícil de mantener para uno mismo.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.2911298 pygame-2.6.1/docs/generated/es/tutorials/GuiaNewbie.html0000644000175100001770000011362514676242431022660 0ustar00runnerdocker Guía de Pygame para Newbies — pygame v2.6.1 documentation
Traducción al español:

Estefanía Pivaral Serrano

Guía de Pygame para Principiantes

o Cosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso

o Cómo aprendí a dejar de preocuparme y amar el blit.

Pygame es un contenedor de Python para SDL, escrito por Pete Shinners. Lo cual significa que al usar pygame, podés escribir juegos u otras aplicaciones multimedia en Python que se ejecutarán sin alteraciones en cualquier plataforma compatible con SDL (Windows, Unix, Mac, BeOS y otras).

Pygame puede ser fácil de aprender, pero el mundo de la programación de gráficos pueden ser bastante confusos para el recién llegado. Escribí esto para tratar de destilar el conocimiento práctico que obtuve durante el último año trabajando con pygame y su predecesor, PySDL. He tratado de clasificar las sugerencias en orden de importancia, pero cuán relevante es cada consejo dependerá de tu propio antecedente y los detalles de tu proyecto.

Ponte cómodo trabajando con Python

Lo más importante es sentirse confiado usando python. Aprender algo tan potencialmente complicado como programación de gráficos será un verdadero fastidio si tampoco se está familiarizado con el lenguaje que se está usando. Escrí una cantidad de programas considerables en Python -- analizá (parse) algunos archivos de texto, escribí un juego de adivinanzas o un programa de entradas de diario, o algo. Ponte cómodo con las secuencias de caracteres que representan textos (strings) y la manipulación de listas. Sepa cómo funciona import (importar) -- intenta escribir un programa que se extienda a varios archivos fuente. Escribe tus propias funciones, y practica manipular números y caracteres; sepa cómo convertir de una a otra. Llega al punto en que la sintaxis para usar listas y diccionarios es algo instintivo-- no querés tener que ejecutar la documentación cada vez que necesitas dividir una lista u ordernar un juego de llaves. Resiste la tentación de correr a una lista de emails, comp.lang.python, o IRC cuando te encuentres en un problema. En lugar de eso, enciende el interperte y juega con el problema por unas horas. Imprime el Python 2.0 Quick Reference y conservalo junto a la computadora.

Esto puede sonar increiblemente aburrido, pero la confianza que vas a ganar al familiarizarte con python hará maravillas cuando se trate de escribir tu propio juego. El tiempo que dediques a escribir código python de forma instintiva no será nada en comparación con el tiempo que ahorrarás al escribir código real.

Reconoce qué partes de pygame necesitás realmente.

Ver el revoltijo de clases en la parte superior de la documentación del índice de documentación de pygame puede ser confuso. Lo más importante es darse cuenta de que se puede hacer mucho con tan solo un pequeño subconjunto de funciones. Existen muchas clases que probablemente nunca uses -- en un año, yo no he tocado las funciones Channel, Joystick, cursors, Userrect, surfarray o version.

Sepa qué es una Surface (superficie)

La parte más importante de pygame es la Surface (superficie). La Surface puede pensarse como una hoja de papel en blanco. Se pueden hacer muchas cosas con la Surface -- se pueden dibujar líneas, colorear partes de ella con colores, copiar imágenes hacia y desde ella, y establecer o leer píxeles indivduales de colores en ella. Una Surface puede ser de cualquier tamaño (dentro de lo lógico) y puede haber tantas como quieras (de nuevo, dentro de lo razonable). Una Surface es especial -- la que vayas a crear con pygame.display.set_mode(). Esta 'display surface' (surface de visualización) representa la pantalla; lo que sea que hagas en ella aparecerá en la pantalla del usuario. Solo puedes tener una de esas -- esa es una limitación de SDL, no de pygame.

Entonces, ¿cómo crear Surfaces? Como mencioné arriba, la Surface especial se crea con pygame.display.set_mode(). Se puede crear una surface que contenga una imagen usando image.load(), o podés crear una surface que contenga texto con font.render(). Incluso se puede crear una surface que no contenga nada en absoluto con Surface().

La mayoría de las funciones de Surface no son críticas. Sólo es necesario aprender blit(), fill(), set_at() y get_at(), y vas a estar bien.

Usa surface.convert().

Cuando yo leí por primera vez la documentación para surface.convert(), no pensé que fuera algo de lo que tuviera que preocuparme. 'Sólo voy a usar PNGs, por lo tanto todo o que haga será en ese formato. Entonces no necesito convert()';. Resultó ser que estaba muy, muy equivocado.

El 'format' (formato) al que convert() se refiere no es el formato del archivo (por ejemplo, PNG, JPEG, GIF), es lo que se llama el 'píxel format' (formato pixel). Esto se refiere a la forma particular en la que una Surface registra colores individuales en un píxel especifico. Si el formato de la Surface (Surface format) no es el mismo que el formato de visualización (display format), SDL tendrá que convertirlo sobre la marcha para cada blit -- un proceso que consume bastante tiempo. No te preocupes demasiado por la explicación; solo ten en cuenta que convert() es necesario si querés que haya velocidad en tus blits.

¿Cómo se usa convert? Sólo hay que hacer una call (llamada) creando la Surface con la función image.load(). En vez de hacer únicamente:

surface = pygame.image.load('foo.png')

Haz:

surface = pygame.image.load('foo.png').convert()

Es así de fácil. Lo único que se necesita es hacer una de esas calls (llamadas) por Surface, cuando cargues una imagen del disco. It's that easy. You just need to call it once per surface, when you load an image off the disk. Estará satisfecho con los resultados; veo al rededor de un 6x aumento de la velocidad de blitting llamando (haciendo la call) convert().

La única vez que no vas a querer usar convert() es cuando realmente necesitas tener el control absoluto sobre al formato interno de una imagen -- digamos que estás escribiendo un programa de conversión de imagen o algo así, y necesitás asegurarte que el archivo de salida tenga el mismo formato píxeles que el archivo de entrada. Si estás escribiendo un juego, necesitás velocidad. Usa convert().

Animación rect "sucia".

La causa más común de frecuencias de cuadros inadecuadas en los programas Pygame resulta de malinterpretar la función pygame.display.update(). Con pygame, con simplemente dibujar algo en la Surface de visualización no hace que aparezca en la pantalla -- necesitas hacer un llamado a pygame.display.update(). Hay tres formas de llamar a esta función:

  • pygame.display.update() -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa).

  • pygame.display.flip() -- Esto hace lo mismo, y también hará lo correcto si estás usando double-buffered aceleración de hardware, que no es así, entonces sigamos ...

  • pygame.display.update(a rectangle or some list of rectangles) -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques.

La mayoría de la gente nueva en programación gráfica usa la primera opción -- ellos actualizan la pantalla completa en cada cuadro. El problema es que esto es inaceptablemente lento para la mayoría de la gente. Hacer una call a update() toma 35 milisegundos en mi máquina, lo cual no parece mucho, hasta que te das cuenta que 1000 / 35 = 28 cuadros por segundo máximo. Y eso es sin la lóagica del juego, sin blits, sin entrada (input) , sin IA, nada. Estoy aquí sentado actualizando la pantalla, y 28 fps (frames per second - cuadros por segundo) es mi máximo de cuadros por segundo. Ugh.

La solucion es llamada 'dirty rect animation' o 'animación de rect sucia'. En vez de actualizar la pantalla completa en cada cuadro, solo se actualizan las partes que cambiaron desde el último cuadros. Yo hago esto al hacer un seeguimiento de esos rectángulos en una lista, luego llamando a update(the_dirty_rectangles) al final del cuadro. En detalle para un sprite en movimiento, yo:

  • Blit una parte del fondo sobre la ubicación actual del sprite, borrándolo.

  • Añado el rectángulo de la ubicación actual a la lista llamada dirty_rects.

  • Muevo el sprite.

  • Dibujo (Draw) el sprite en su nueva ubicación.

  • Agrego la nueva ubicación del sprite a mi lista de dirty_rects.

  • Llamo a display.update(dirty_rects)

La diferenci aen velocidad es asombrosa. Tengan en consideración que SolarWolf tiene docenas de sprites en constante movimiento que se actualizan sin problemas, y aún así le queda suficiente tiempo para mostrar un campo estelar de paralaje en el fondo, y también actualizarlo.

Hay dos casos en que esta técnica no funciona. El primero es cuando toda la ventana o la pantalla es siendo actualizada realmente en cada cuadro -- pensá en un motor de desplazamiento como un juego de estrategia en tiempo real o un desplazamiento lateral. Entonces, ¿qué hacés en ese caso? Bueno, la respuesta corta es -- no escribas este tipo de juegos en pygame. La respuesta larga es desplazarse en pasos de varios píxeles a la vez; no intentes hacer del desplazamiento algo perfectamente suave. El jugador apreciará un juego que se desplaza rápidamente y no notará demasiado el fondo saltando.

Una nota final -- no todo juego requeire altas frecuencias de cuadros. Un juego de guerra estratégico podría funcionar fácilmente con solo unas pocas actualizaciones por segundo -- en este caso, la complejidad agregada de la animación de rect sucio (dirty rect animation) puede no ser necesaria.

NO hay regla seis.

Los surfaces de hardware son más problemáticos de lo que valen.

Especialmente en pygame 2, porque HWSURFACE ahora no hace nada

Si estuviste mirando las distintas flags (banderas) que se pueden usar con pygame.display.set_mode(), puede que hayas pensado lo siguiente: Hey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!. No es tu culpa; hemos sido entrenados por años en juegos 3D como para creer que la aceleración de hardware es buena, y el rendering (representación) del software es lento.

Desafortunadamente, el rendering de hardware viene con una larga lista de inconvenientes:

  • Solo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar.

  • Solo funciona en pantalla completa.

  • Complica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta.

  • Pierdes el puntero del mouse. Si especificás HWSURFACE (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia!

  • Podría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos.

El rendering (representación) de hardware tiene su lugar. Funciona de manera bastante confiable en Windows, por lo que si no estás interesado en el rendimiento de multiplataformas, puede proporcionarte un aumento sustancial de la velocidad. Sin embargo, tiene un costo -- mayor dolor de cabeza y complejidad. Es mejor apegarse al viejo y confiable SWSURFACE hasta que estés seguro de lo que estás haciendo.

No te distraigas con problemas secundarios.

A veces, los nuevos programadores dedican mucho tiempo preocupandose sobre problemas que no son realmente críticos para el éxito de su juego. El deseo de arreglar los problemas secundarios es entendible, pero al principio en el proceso de creación de un juego, ni siquiera puedes saber cuáles son las preguntas importantes, mucho menos qué respuestas deberías elegir. El resultado puede ser un montón de prevariaciones innecesarias.

Por ejemplo, consideren la pregunta de cómo organizar los archivos gráficos. ¿Debería cada cuadro tener su propio archivo gráfico, o cada sprite? ¿Quizás todos los gráficos se deberían comprimir en un archivo? Se ha perdido una gran cantidad de tiempo en muchos proyectos, preguntándose estas preguntas en lista de correo, debatiendo las respuestas, haciendo perfiles, etc, etc. Este es un tema secundario; cualquier cantidad de tiempo invertido en discutir eso, debería haber sido usado en escribir el código del juego real.

El idea es que es mucho mejor tener una solución 'bastante buena' que haya sido implementada, que una solucion perfecta que nunca se haya llegado a escribir.

Los rects son tus amigos.

El envoltorio de Pete Shinners puede tener efectos alfa geniales y velocidades rápidas de blitting, pero tengo que admitir que mi parte favorita de pygame es la humilde clase Rect. Un rect es simplemente un rectángulo -- definido solo por la posición de su esquina superior izquierda, su ancho y su altura. Muchas funciones de pygame toman rects como argumentos, y ellas solo hacen 'rectstyles', una secuencia que tiene los mismos valores que un rect. Entonces si necesito un rectángulo que defina el área entre 10, 20 y 40, 50, puedo hacer cualquier de las siguientes:

rect = pygame.Rect(10, 20, 30, 30)
rect = pygame.Rect((10, 20, 30, 30))
rect = pygame.Rect((10, 20), (30, 30))
rect = (10, 20, 30, 30)
rect = ((10, 20, 30, 30))

Sin embargo, si usas cualquiera de las primeras tres versiones, obtendrás accesso a las funciones de utilidad del rect. Estas incluyen funciones para mover, encoger e inflar los rects, encontrar la union de dos rects, y una variedad de funciones de detección de colisión.

Por ejemplo, supongamos que yo quiero obtener una lista de todos los sprites que contiene un punto (x,y) -- quizás el jugador clickeó ahí, o quizás esa es la ubicación actual de una bala. Es simple si cada sprite tiene un miembro .rect -- solo hay que hacer:

sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]

Los rects no tienen otra relación con los surfaces o con las funciones gráficas, aparte del hecho de que puedes usarlos como argumentos. También se pueden usar en lugares que no tienen nada que ver con gráficos, pero aún así deben ser definidos como rectángulos. En cada proyecto descrubro algunos lugares nuevos donde usar rects donde nunca pensé que los necesitaría.

No te molestes con la detección de colisión de píxel perfecto.

Así que, tenés tus sprites moviendose y necesitás saber si se están chocando entre sí. Es tentador escribir algo como lo siguiente:ite something like the following:

  • Checkear si los rects están en colisión. Si no lo están, ignorarlos.

  • Para cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión.

Hay otras formas de hacer esto, con ???????? coordinando máscaras de sprite y así sucesivamente, pero de cualquier forma en que se haga en pygame, probablemente sea demasiado lento. Para la mayoría de los juego probablemente sea mejor hacer solo un "sub-rect de colisión" -- esto es, crear un rect por cada sprite que es un poco más pequeño que la imagen real, y usar eso para colisiones. Esto va a resultar más rápido y, en la mayoría de los casos, el jugador no va a notar la imprecisión. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.

Gestión del subsistema de eventos.

El sistema de eventos de Pygame es un poco truculento. Hay en realidad dos formas diferntes de saber qué está haciendo un dispositivo de entrada (teclado, mouse, o joystick).

La primera es directamente comprobar el estado del dispositivo. Esto se hace mediante la llamada, digamos, pygame.mouse.get_pos() o pygame.key.get_pressed(). Esto te indicará el estado de tu dispositivo en el momento en que llames a la función

El segundo método usa la cola de eventos de SDL. Esta cola es una lista de eventos -- eventos se agregan a la lista al ser detectados, y se eliminan de la cola mientras se leen.

Hay ventajas y desventajas para cada sistema. Comprobación de estado (sistema 1) (state-checking) aporta precisión -- sabés exactamente cuándo se realizó la entrada -- si mouse.get_pressed([0]) (mouse fue presionado) es 1, eso significa que el botón izquierdo del mpuse está abajo justo en este momento. La cola de eventos meramente reporta que el mouse estuvo abajo en algún momento del pasado; si revisas la cola con bastante frecuencia, eso puede estar bien, pero si te demorás en verificarlo con otro código, latencia de entrada puede incrementar. Otra ventaja del sistema de comprobación de estado es que detecta "acordes" fácilmente; es decir, varios estados al mismo tiempo. Si querés saber si las teclas t y la f están ambas presionadas al mismo tiempo, sólo hay que checkear:

if (key.get_pressed[K_t] and key.get_pressed[K_f]):
    print("Sip!")

Sin embargo, en el sistema de colas, cada pulsación de tecla llega a la cola como un evento completamente separado, entonces será necesario recordar que la tecla t estuvo presionada y que aún no había sido soltada mientras la tecla f fue presionada. Un poco más complicado.

Sin embargo, el sistema de estados tiene una gran desventaja. Solo informa el estado del dispositivo al momento en que es llamado; si el usuario clickea el botón del mouse y lo suelta justo antes del llamado a mouse.get_pressed(), el botón del mouse va a devolver un 0 -- get_pressed() falló completamente en detectar la pulsación del botón del mouse. Dos events, MOUSEBUTTONDOWN y MOUSEBUTTONUP, seguirán esperando en la cola de eventos a ser recuperados y procesados.

La lección es la siguiente: elegí el sistema que cumpla con tus requisitos. Si no hay mucho sucediendo en tu loop -- supongamos, estás sentado en un bucle de while True, esperando una entrada, usa get_pressed() u otra función de estado; la latencia será menor. Por otro lado, si cada pulsación de tecla es crucial, pero la latencia no es tan importante -- por ejemplo, el usuario está escribiendo algo en un cuadro de edición, usá la cola de eventos. Algunas pulsaciones de tecla pueden retrasarse un poco, pero al menos van a aparecer todas.

Una nota sobre event.poll() vs. wait() -- poll() puede parecer mejor ya que no impide al programa de hacer otra cosa mientras está esperando la entrada -- wait() suspende el programa hasta que reciba el evento. Sin embargo, poll() consumirá el 100% del tiempo disponible del CPU mientras se esté ejecutando y llenará la cola de eventos con NOEVENTS. Para seleccionar solo los tipo de eventos que resultan de interés usa set_blocked(), la cola será mucho más manejable.

Colorkey vs. Alpha.

Hay mucha confusión en torno a estas dos técnicas, y gran parte de esto proviene de la terminología usada.

'Colorkey blitting' (blitting de la clave de color) implica decirle a pygame que todos lso píxeles de cierto color de una determinada imagen son transparentes en vez del color que realmente sean. Estos píxeles transparentes no son blitteados cuando el resto de la imagen es blitteada y entonces no oscurecen el fondo. Así es como hacemos los sprites que no son de forma rectangular. Simplemente llamamos a surface.set_colorkey(color), donde el color es una tupla RGB, supongamos (0,0,0). Esto haría que cada píxel en la imagen de origen transparente en vez de negro.

'Alpha' es diferente, y como en dos sabores. 'Image alpha' (imagen alfa) que aplica a la imagen completa, y es probablemente lo que quieras. Propiamente conocido como 'translucidez', alpha causa que cada píxel en la imagen de origen sea solo parcialmente opaco. Por ejemplo, si configuras el alfa de una surface en 192 y después lo blitteas (convertis) en un fondo, 3/4 del color de cada píxel provendrá de la imagen de origan, y 1/4 del fondo. Alfa se mide de 255 a 0, donde 0 es completamente transparente, y 255 es completamente opaco. Nótese que el blitting con colorkey y alfa (colorkey and alfa blitting) pueden combinarse -- esto produce una imagen completamente transparete en algunos lugares y semi-transparente en otros.

'Per-pixel alpha' ('Alfa por pixel') es el otro tipo de alfa, y es más complicado Básicamente, cada píxel de la imagen de origen tiene su propio valor alfa, de 0 a 1. Cada píxel, por lo tanto, puede tener una opacidad diferente cuando se blittea (proyecta) sobre el fondo. Este tipo de alfa no se puede mezclar con la proyección (el blitting) de la clave de color, y anula el 'per-image' alfa. El alfa por píxel (per-pixel alfa) es raramente usado en juego, y para usarlo tenes que guardar la imagen de origen en un editor gráfico con un canal alpha especial. Es complicado -- no lo usen todavía.

Haz cosas a la manera de pythony.

Una nota final (no es la menos importante, simplemente viene al final) Pygame es un envoltorio bastante liviano alrededor de SDL, que a su vez es un ligero envoltorio alrededor de las calls (llamadas) de gráficos del sistema operativo nativo. Las posibilidades son muy buenas de que si tu código sigue lento, habiendo seguido las indicaciones que mencioné arriba, entonces el problema yace en la forma en que estás direccionando tus datos en python. Algunos modismos simplemente van a ser lentos en python sin importar lo que hagas. Afortunadamente, python es un lenguaje muy claro -- si un fragmento del código se ve extraño o difícil de manejar, es probable que su velocidad también se pueda mejorar. Lée Python Performance Tips para obtener excelentes consejos sobre cómo puede mejorar la velocidad del código. Dicho esto, la optimización prematura es la razí de todos los males; si simplemente no es lo suficientemente rápido no tortures el código intentando hacerlo más rápido. Algunas cosas simplemente no están destinadas a ser. :)

¡Ya está! Ahora sabés prácticamente todo lo que yo sé sobre el uso de pygame. Ahora, ¡ve a escribir ese juego!


David Clark es un ávido usuario de pygame y es editor de Pygame Code Repository, una vidriera del códigos de juegos en python suministrado por la comunidad. Él es también el autor de Twitch, un juego de arcade completamente promedio de pygame.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612185.31213 pygame-2.6.1/docs/generated/es/tutorials/IniciarImportar.html0000644000175100001770000002136614676242431023735 0ustar00runnerdocker Tutoriales de Pygame - Importar e Inicializar — pygame v2.6.1 documentation

Importar e Inicializar

Autor:

Pete Shinners

Contacto:

pete@shinners.org

Traducción al español:

Estefanía Pivaral Serrano

Importar e inicializar pygame es un proceso muy simple. También es lo suficientemente flexible para que el usuario tenga el control sobre lo que está sucediendo. Pygame es una colección de diferentes módulos en un mismo paquete de python. Algunos de los módulos están escritos en C, y algunos otros están escritos en python. Algunos módulos también son opcionales y es posible que no estén presentes.

Esto es solo una breve introducción sobre lo que sucede cuando se importa pygame. Para una explicación más clara, definitivamente recomiendo que vean los ejemplos de pygame.

Importar

Primero debemos importar el paquete de pygame. Desde la versión 1.4 de pygame este ha sido actualizado para ser mucho más fácil. La mayoría de los juegos importarán todo pygame de esta manera.:

import pygame
from pygame.locals import *

La primera línea aquí es la única necesaria. Esta línea importa todos los módulos de pygame disponibles en el paquete de pygame. La segunda línea es opcional y plantea un conjunto de funciones limitadas en el 'espacio global de nombres' (global namespace) de la secuencia de comandos.

Una cosa importante a tener en cuenta es que muchos de los módulos de pygame son opcionales. Por ejemplo, uno de estos es el módulo de fuentes. Cuando se importa pygame (import pygame), pygame comprobará si el módulo de fuentes está disponible.

Si el módulo de fuentes está disponible se importará como "pygame.font". Si el módulo no está disponible, "pygame.font" se establecera como 'None' (ninguno). Esto hace que sea bastante fácil probar más adelante si el módulo de fuentes está disponible.

Inicializar

Antes de que pueda hacerse mucho con pygame, será necesario inicializarlo. La manera más común es hacerlo mediante una 'llamada' (call).:

pygame.init()

Esto intentará inicializar todos los módulos de pygame automáticamente. No todos los módulos necesitan ser inicializados, pero esto inicializará automaticamente los que sí son necesarios. Se puede también inicializar fácilmente cada módulo de pygame de forma manual. Por ejemplo para inicializar únicamente el módulo de fuentes simplemente habría que hacer el siguiente 'llamado'.

pygame.font.init()

Tengan en cuenta que si hay un error cuando se inicialzia con "pygame.init()", fallará silenciosamente. Al inicializar manualmente módulos como éste, cualquier error generará una excepción. Cualquier módulo que deba ser inicializado también tiene una función "get_init()", que devolverá Verdadero (true) si el módulo ha sido inicializado.

Es seguro llamar a la función init() para cualquier módulo más de una vez.

Cerrar (Quit)

Los módulos que son inicializados por lo general tienen una función quit() (abandonar) que dejará la configuración de los recursos como se encontraba antes. Las variables utilizadas son destruidas. No hay necesidad de hacer un llamado explicitamente, ya que pygame cerrará limpiamente todos los módulos inicializados, una vez que python finaliza.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.3541298 pygame-2.6.1/docs/generated/es/tutorials/ModosVisualizacion.html0000644000175100001770000004623014676242431024460 0ustar00runnerdocker Tutoriales de Pygame - Configuración de los Modos de Visualización — pygame v2.6.1 documentation

Configuración de los Modos de Visualización

Author:

Pete Shinners

Contact:

pete@shinners.org

Traducción al español:

Estefanía Pivaral Serrano

Introducción

Configurar el modo de visualización en pygame crea una imagen de Surface visible en el monitor. Esta Surface puede o cubrir la pantalla completa, o si se está usando una plataforma que soporta la gestión de ventanas, la imagen puede usarse en ventana. La Surface de visualización no es más que un objeto de Surface estándar de pygame. Hay funciones especiales necesarias en el módulo pygame.display para mantener los contenidos de la imagen de Surface actualizada en el monitor.

Configurar el modo de visualización en pygame es una tarea más fácil que con la mayoría de las bibliotecas gráficas. La ventaja es que si el modo de visualización no está disponible, pygame va a emular el modo de visualización que fue pedido. Pygame seleccionará la resolución de la visualización y la profundidad del color de la visualización que mejor coincida con la configuración solicitada, luego permitirá tener acceso al formato de visualización requerido. En realidad, ya que el módulo pygame.display está enlazado con la librería SDL, es SDL quién realmente hace todo este trabajo.

Esta forma de configurar el modo de visualización presenta ventajas y desventajas. La ventaja es que si tu juego requiere un modo de visualización específico, el juego va a poder ejecutarse aún en plataformas que no soporten los requerimientos. Esto también va a simplificarles la vida cuando estén comenzando con algo, ya que siempre es fácil volver luego y hacer la selección de modo un poco más específicos. La desventaja es que lo que soliciten no es siempre lo que van a obtener. Hay un castigo o multa en el rendimineto cuando el modo de visualización debe ser emulado. Este tutorial les ayudará a entender los métodos diferentes para consultar (querying) las capacidades de visualización de las plataformas, y configurar el modo de visualización para tu juego.

Configuración básica

Lo primero a aprender es cómo configurar realmente el modo de visualización actual. El modo de visualización se puede establecer en cualquier momento luego de haber inicializado el módulo pygame.display Si ya estableciste previamente el modo de visualización, configurarlo nuevamente va a cambiar el actual modo. La configuración del modo de visualización se maneja con la función :func: pygame.display.set_mode((width, height), flags, depth) <pygame.display.set_mode>. El único argumento requerido en esta función es la secuencia que contiene el ancho (width) y el alto (height) del nuevo modo de visualización. La bandera de profundidad (depth flag) es los bits por píxel solicitados para la Surface. Si la profundidad dada es 8, pygame va a crear la asignación de colores de la Surface. En el caso que se le otorgue una mayor profundida de bits, pygame usará el modo de color empaquetado.

Podrán encontrar mucha más información acerca de profundidades y modo de color en la documentación sobre los módulos de visualización y Surface. El valor por default para la profundidad es 0. Cuando a un argumento se le asigna 0, pygame va a seleccionar el mejor bit de profunidad para usar, generalmente es el mismo bit de profundidad que el sistema actual. El argumento de banderas permite controlar características extras para el modo de visualización. Nuevamente, en caso de querer más información acerca del tema, se puede encontrar en los documentos de referencia de pygame.

Cómo decidir

Entonces, ¿cómo seleccionar el modo de visualización que va a funcionar mejor con los recursos gráficos y en la plataforma en la que está corriendo el juego? Hay varios métodos diferentes para reunir la información sobre la visualización del dispositivo. Todos estos métodos deben ser 'llamados' (called) luego de que se haya inicializado el módulo de visualización, pero es probable que quieran llamarlos antes de configurar el modo de visualización. Primero, pygame.display.Info() va a devolver un tipo de objeto VidInfo especial, que les dirá mucho acerca de las capacidades del controlador gráfico. La función pygame.display.list_modes(depth, flags) puede ser usada para encontrar los modos gráficos respaldados por el sistema. :func: pygame.display.mode_ok((width, height), flags, depth) <pygame.display.mode_ok> toma el mismo argumento que set_mode(), pero devuelve la coincidencia más próxima al bit de profundidad solicitado. Por último, pygame.display.get_driver() devuelve el nombre del controlador gráfico seleccionado por pygame

Solo hay que recordar la regla de oro: Pygame va a trabajar con practicamente cualquier modo de visualización solicitado. A algunos modos de visualización va a ser necesario emularlos, lo cual va lentificar el juego, ya que pygame va a necesitar convertir cada actualziación que se haga, al modo de visualización "real". La mejor apuesta es siempre dejar que pygame elija la mejor profundidad de bit, y que convierta todos los recursos gráficos a ese formato cuando se carguen. Al 'llamar' (call) a la función set_mode() sin ningún argumento o con profundidad 0 dejamos que pygame elija por sí mismo la profundidad de bit. O sino se puede llamar a mode_ok() para encontrar la coincidencia más cercana a la profundidad de bit necesaria.

Cuando el modo de visualización es en una ventana, lo que generalmente se debe hacer es hacer coincidir el bit de profundidad con el del escritorio. Cuando se está usando pantalla completa, algunas plataformas pueden cambiar a cualquier bit de profundidad que mejor se adecue a las necesidades del usuario. Pueden encontrar la profundidad del escritorio actual si obtienen un objeto VidInfo antes de configurar el modo de visualización.

Luego de establecer el modo de visualización, pueden descubrir información acerca de su configuración al obtener el objeto VidInfo, o al llamar cualquiera de los métodos Surface.get* en la superficie de visualización.

Funciones

Estas son las rutinas que se pueden usar para determinar el modo de visualización más apropiado. Pueden encontrar más información acerca de estas funciones en la documentación del modo de visualización.

pygame.display.mode_ok(size, flags, depth)

Esta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación.

pygame.display.list_modes(depth, flags)

Deveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es FULLSCREEN. Si especifican sus propias banderas sin FULLSCREEN, probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor.

pygame.display.Info()

Esta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto.

>>> import pygame.display
>>> pygame.display.init()
>>> info = pygame.display.Info()
>>> print(info)
<VideoInfo(hw = 0, wm = 1,video_mem = 0
        blit_hw = 0, blit_hw_CC = 0, blit_hw_A = 0,
        blit_sw = 0, blit_sw_CC = 0, blit_sw_A = 0,
        bitsize  = 32, bytesize = 4,
        masks =  (16711680, 65280, 255, 0),
        shifts = (16, 8, 0, 0),
        losses =  (0, 0, 0, 8),
        current_w = 1920, current_h = 1080
>

Pueden probar todas estas banderas (flags) simplemente como miembros del objeto VidInfo.

Ejemplos

Acá hay algunos ejemplos de diferentes métodos para iniciar la visualización gráfica. Estos deberían ayudar a dar una idea de cómo configurar su modo de visualizción

>>> #dame la mejor profundidad con una visualización de ventana en 640 x 480
>>> pygame.display.set_mode((640, 480))

>>> #dame la mayor visualización disponible en 16-bit
>>> modes = pygame.display.list_modes(16)
>>> if not modes:
...     print('16-bit no está soportado')
... else:
...     print('Resolución encontrada:', modes[0])
...     pygame.display.set_mode(modes[0], FULLSCREEN, 16)

>>> #es necesario una surface de 8-bit, nada más va a funcionar
>>> if pygame.display.mode_ok((800, 600), 0, 8) != 8:
...     print('Solo puede funcionar con una visualización de 8-bit, lo lamento')
... else:
...     pygame.display.set_mode((800, 600), 0, 8)



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.4341297 pygame-2.6.1/docs/generated/es/tutorials/MoverImagen.html0000644000175100001770000013600614676242431023050 0ustar00runnerdocker Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen? — pygame v2.6.1 documentation

¡Ayuda! ¿Cómo Muevo Una Imagen?

Autor:

Pete Shinners

Contacto:

pete@shinners.org

Traducción al español:

Estefanía Pivaral Serrano

Muchas personas nueva en programación y gráficos tienen dificultades para descubrir cómo hacer que una imagen se mueva por la pantalla. Sin entender todos los conceptos puede resultar muy confuso. No sos la primera persona atrapada ahí, haré todo lo posible para que vayamos paso por paso. Incluso, intentaremos terminar con métodos para mantener la eficiencia de tus animaciones.

Tengan en cuenta que en este articulo no vamos a enseñar cómo programar en python, solo presentaremos algunos conceptos básicos de pygame.

Solo Píxeles en la Pantalla

Pygame tiene una Surface de visualización. Básicamente, esto es una imagen que está visible en la pantalla y la imagen está compuesta por píxeles. La forma principal de cambiar estos píxeles es llamando a la función blit(). Esto copia los píxeles de una imagen a otra.

Esto es lo primero que hay que entender. Cuando proyectás (blit) una imagen en la pantalla, lo que estás haciendo es simplemente cambiar el color de los píxeles. Los píxeles no se agregan ni se mueven, simplemente cambiamos el color de los píxeles que ya se encuentran en la pantalla. Las imágenes que uno proyecta (blit) a la pantalla son también surfaces (superficies) en pygame pero no están conectadas de ninguna manera a la Surface de visualización. Cuando se proyectan en la pantalla, se copian en la visualización, pero aún mantenes una copia única del original.

Luego de esta breve descripción, quizás ya puedas entender lo que se necesita para "mover" una imagen. En realidad, no movemos nada en absoluto. Lo que hacemos es simplemente proyectar (blit) la imagen en una nueva posición, pero antes de dibujar la imagen en la nueva posición, necesitamos "borrar" la anterior. De lo contrario, la imagen será visible en dos lugares de la pantalla. Al borrar rápidamente la imagen y volverla a dibujar en un nuevo lugar en la pantalla, logramos la "ilusión" de movimiento.

A lo largo del tutorial, vamos a dividir este proceso en pasos más simples. Incluso explicaremos la mejor manera de tener múltiples imagenes moviendose por la pantalla. Probablemente ya tengas preguntas; por ejemplo, ¿cómo "borramos" la imagen antes de dibujarla en una nueva posición? Quizás todavía estás completamente perdido. Bueno, espero que el resto de este tutorial pueda aclarar las cosas.

Damos Un Paso Hacia Atrás

Es posible que el concepto de píxeles e imagenes sea aún un poco extraño. ¡Buenas noticias! En las próximas secciones vamos a usar código que hace todo lo que queremos, solo que no usa píxeles. Vamos a crear una pequeña lista de python de 6 números, y vamos a imaginar que representa unos gráficos fantásticos que podemos ver en la pantalla. Podría ser de hecho sorprendente lo cerca que esto representa lo que haremos después con gráficos reales.

Entonces, comencemos creando nuestra lista de pantalla y completandola con un paisaje hermoso de 1s y 2s.

>>> screen = [1, 1, 2, 2, 2, 1]
>>> print(screen)
[1, 1, 2, 2, 2, 1]

Ahora hemos creado nuestro fondo. No va a ser muy emocionante a menos que también dibujemos un jugador en la pantalla. Vamos a crear un héroe poderoso que se parezca al número 8. Vamos a ponerlo cerca de la mitad del mapa y veamos cómo se ve.

>>> screen[3] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

Puede que esto haya sido tan lejos como hayas llegado si saltaste a hacer algo de programación gráfica con pygame. Tenés algunas cosas bonitas en la pantalla, pero no pueden moverse a ningun lado. Quizás ahora que nuestra pantalla es una lista de números, es más fácil ver cómo moverlo.

Hacer Mover al Héroe

Antes de empezar a mover el personaje, necesitamos hacer el seguimiento de algún tipo de posición para él. En la última sección, cuando lo dibujamos, simplemente elegimos una posición al arbitraria. Esta vez hagámoslo de forma más oficial.

>>> playerpos = 3
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

Ahora es bastante fácil moverlo en una nueva posición. Podemos simplemente cambiar el valor de playerpos (posición del player) y dibujarlo en la pantalla nuevamente.

>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 8, 8, 2, 1]

Whoops. Ahora podemos ver dos héroes. Uno en la vieja posición, y otro en la nueva posición. Esta es exactamente la razón por la que necesitamos "borrar" al héroe en la posición anterior antes de dibujarlo en la nueva posición. Para borrarlo, necesitamos cambiar ese valor en la lista de nuevo al valor que tenía antes de que el héroe lo reemplazara. Eso significa que debemos hacer un seguimiento de los valores en la pantalla antes que el héroe estuviera allí. Hay varias formas de hacerlo, pero la más fácil suele ser mantener una copia separada del fondo de la pantalla. Esto significa que tenemos que hacer cambios en nuestro pequeño juego.

Crear un Mapa

Lo que queremos hacer es crear una lista separada que llamaremos nuestro fondo (background). Vamos a crear el fondo para que se vea como lo hacía nuestra pantalla original, con 1s y 2s. Luego, vamos a copiar cada item del fondo a la pantalla. Después de eso, podemos finalmente dibujar nuestro héroe en la pantalla.

>>> background = [1, 1, 2, 2, 2, 1]
>>> screen = [0]*6                         #una nueva pantalla en blanco
>>> for i in range(6):
...     screen[i] = background[i]
>>> print(screen)
[1, 1, 2, 2, 2, 1]
>>> playerpos = 3
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

Puede parecer mucho trabajo extra. No estamos muy lejos de donde estabamos la última vez que tratamos de hacer que se moviera. Pero esta vez tenemos la información extra que necesitamos para moverlo correctamente.

Hacer Mover al Héroe (Toma 2)

Esta vez va a ser fácil mover al héroe. Primero borramos el héroe de su antigua posición. Esto lo podemos hacer copiando el valor correcto del fondo a la pantalla. Luego, dibujamos el personaje en la nueva posición en la pantalla.

>>> print(screen)
[1, 1, 2, 8, 2, 1]
>>> screen[playerpos] = background[playerpos]
>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 8, 2, 2, 1]

Ahí está. El héroe se ha movido un lugar hacia la izquierda. Podemos usar este mismo código para moverlo una vez más hacia la izqueirda.

>>> screen[playerpos] = background[playerpos]
>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 8, 2, 2, 2, 1]

Excelente! Esto no es exactamente lo que llamarías una animación fluida, pero con unos pequeños cambios, haremos que esto funcione directamente con gráficos en la pantalla.

Definición: "blit"

En las próximas secciónes transformaremos nuestro programa, de usar listas pasará a usar gráficos reales en la pantalla. Al mostrar los gráficos vamos a usar el término blit frecuentemente. Si sos nuevo en el trabajo gráfico, probablemente no estés familiarizado con este término común.

BLIT: Basicamente, blit significa copiar gráficos de una imagen a otra. Una definición más formal es copiar una matriz de datos a un mapa de bits. 'Blit' se puede pensar como asignar píxeles. Es similar a establecer valores en nuestra lista de pantalla más arriba, blitear asigna el color de los píxeles en nuestra imagen.

Otras bibliotecas gráficas usarán la palabra bitblt, o solo blt, pero están hablando de lo mismo. Es básicamente copiar memoria de un lugar a otro. En realidad, es un poco más avanzado que simpleente copiar la memoria, ya que necesita manejar cosas como formatos de píxeles, recortes y separaciones de líneas de exploración. Los mezcladores (blitters) avanzados también pueden manejar cosas como la transparecia y otros efectos especiales.

Pasar de la Lista a la Pantalla

Tomar el código que vemos en los ejemplos anteriores y hacerlo funcionar con pygame es muy sencillo. Simulemos que tenemos cargados algunos gráficos bonitos y los llamamos "terrain1", "terrain2" y "hero". Donde antes asignamos números a una lista, ahora mostramos (blit) gráficos en la pantalla. Otro gran cambio, en vez de usar posiciones como un solo índice (0 through 5), ahora necesitamos una coordenada bidimensional. Fingiremos que uno de los gráficos de nuestro juego tiene 10 píxeles de ancho.

>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1]
>>> screen = create_graphics_screen()
>>> for i in range(6):
...     screen.blit(background[i], (i*10, 0))
>>> playerpos = 3
>>> screen.blit(playerimage, (playerpos*10, 0))

Hmm, ese código debería parecerte muy familiar, y con suerte, más importante; el código anterior debería tener un poco de sentido. Con suerte, mi ilustración de configurar valores simples en una lista muestra la similitud de establecer píxeles en la pantalla (con blit). La única parte que es realmente trabajo extra es convertir la posición del jugador en coordenadas en la pantalla. Por ahora, solo usamos un (playerpos*10, 0) crudo, pero ciertamente podemos hacer algo mejor que eso. Ahora, movamos la imagen del jugador sobre un espacio. Este código no debería tener sorpresas.

>>> screen.blit(background[playerpos], (playerpos*10, 0))
>>> playerpos = playerpos - 1
>>> screen.blit(playerimage, (playerpos*10, 0))

Ahí está. Con este código, hemos mostrado cómo visualizar un fondo simple con la imagen de un héroe. Luego, hemos movido correctamente a ese héroe un espacio hacia la izquierda. Entonces, ¿dónde vamos desde aquí? Bueno, para empezar, el código es todavía un poco extraño. Lo primero que queremos hacer es encontrar una forma más límpia de representar el fondo y la posición del jugador. Luego, quizás una animación un poco más real y fluida.

Coordenadas de Pantalla

Para posicionar un objeto en la pantalla, necesitamos decirle a la función blit () dónde poner la imagen. En pygame siempre pasamos las posiciones como una coordenada (X,Y). Esto reprenseta el número de píxeles a la derecha y el número de pixeles hacia abajo, para colocar la imagen. La esquina superior izquierda de la Surface es la coordenada (0,0). Moverse un poco hacia la derecha sería (10, 0), y luego moverse hacia abajo en la misma proporción sería (10,10). Al hacer blit, el argumento de posición representa dónde se debe colocar la esquina superior izquierda de la fuente en el destino.

Pygame viene con un conveniente container para estas coordenadas, este es un Rect. El Rect básicamente representa un área rectangular en estas coordenadas. Tiene una esquina superior izquierda y un tamaño. El Rect viene con muchos métodos convenientes que ayudan a moverlo y posicionarlo. En nuestros próximos ejemplos representaremos las posiciones de nuestros objetos con Rects.

También, hay que tener en cuenta que muchas funciones en pygame esperan argumentos Rect. Todas estas funciones pueden también aceptar una simple tupla de 4 elementos (izquierda, arriba, ancho, alto). No siempre es necesario usar estos objetos Rect, pero mayormente querrás hacerlo. Además la función blit () puede aceptar un Rect como su argumento de posición, simplemente usa la esquina superior izquierda del Rect como su posición real.

Cambiando el Fondo

En todas nuestras secciones anteriores, hemos estado almacenando el fondo como una lista de diferentes tipos de terrenos. Esa es una buena forma de crear un juego basado en mosaicos, pero queremos un desplazamiento fluido. Para hacerlo un poco más fácil, vamos a cambiar el fondo a una imagen única que cubra toda la pantalla. De esta forma, cuando queremos "borrar" nuestros objetos (antes de volver a dibujarlos) solo necesitamos blitear la sección del fondo borrado en la pantalla.

Al pasar a blit un tercer argumento Rect de manera opcional, le decimos que use esa subsección de la imagen de origen. Lo verás en uso a continuación mientras borramos la imagen del jugador.

Nótese que ahora, cuando terminamos de dibujar en la pantalla, llamamos pygame.display.update() que mostrará todo lo que hemos dibujado en la pantalla.

Movimiento Fluido

Para hacer que algo parezca moverse suavemente, vamos a querer moverlo únicamente un par de píxeles a la vez. Acá está el código para hacer que un objeto se mueva suavemente a través de la pantalla. Según lo que ya sabemos, esto debería parecer bastante simple.

>>> screen = create_screen()
>>> player = load_player_image()
>>> background = load_background_image()
>>> screen.blit(background, (0, 0))        #dibujar el fondo
>>> position = player.get_rect()
>>> screen.blit(player, position)          #dibujar el jugador
>>> pygame.display.update()                #y mostrarlo todo
>>> for x in range(100):                   #animar 100 cuadros
...     screen.blit(background, position, position) #borrar
...     position = position.move(2, 0)     #mover el jugador
...     screen.blit(player, position)      #dibujar nuevo jugador
...     pygame.display.update()            #y mostrarlo todo
...     pygame.time.delay(100)             #detener el programa por 1/10 segundos

Ahí está. Este es todo el código que es necesario para animar suavemente un objeto a través de la pantalla. Incluso podemos usar un bonito paisaje de fondo. Otro beneficio de hacer el fondo de esta manera es que la imagen para el jugador puede tener transaprencias o secciones recortadas y aún así se dibujará de correctamente sobre el fondo (un bonus gratis).

También hicimos una llamada a pygame.time.delay() al final de nuestro bucle (loop) anterior. Esto ralentiza un poco nuestro programa; de lo contrario, podría ejecutarse tan rápido que sería posible no verlo.

Entonces, ¿Qué Sigue?

Bueno, aquí lo tenemos. Esperemos que este artículo haya cumplido con lo prometido. Aún así, en este punto, el código no está realmente listo para ser el próximo juego más vendido. ¿Cómo hacer para tener múltiples objetos moviendose fácilmente? ¿Qué son exactamente esas misteriosas funciones como load_player_image()? También necesitamos una forma de obtener una entrada simple de usuario y un bucle de más de 100 cuadros. Tomaremos el ejemplo que tenemos acá, y lo convertiremos en una creación orientada a objetos que podría enorgullecería a mamá.

Primero, Funciones Misteriosas

Se puede encontrar información completa de este tipo de funciones en otros tutoriales y referencia. El módulo pygame.image tiene una función load() que hará lo que queramos. Las líneas para cargar las imágenes deberían llegar a ser así.

>>> player = pygame.image.load('player.bmp').convert()
>>> background = pygame.image.load('liquid.bmp').convert()

Podemos ver que es bastante simple, la función load() solo toma un nombre de archivo y devuelve una nueva Surface con la imagen cargada. Después de cargar, hacemos una llamada al método de Surface, conver(). 'Convert' nos devuelve una nueva Surface de la imagen, pero ahora convertida al mismo formato de píxel que nuestra pantalla. Dado que las imagenes serán del mismo formato que la pantalla, van a blittear muy rápidamente. Si no usaramos 'convert', la función blit() es más lenta, ya que tiene que convertir de un tipo de píxel a otro a medida que avanza.

Es posible que hayas notado que ambas load() y convert() devuelven una nueva Surface. Esto significa que estamos realmente creando dos Surfaces en cada una de estas líneas. En otros lenguajes de programación, esto da como resultado una fuga de memoria (no es algo bueno). Afortunadamente, Python es lo suficientemente inteligente como manejar esto, y pygame limpiará adecuadamente la Surface que terminamos sin usar.

La otra función misteriosa que vimos en el ejemplo anterior fue create_screen(). En pygame es simple de crear una nueva ventana para gráficos. El código para crear una surface de 640x480 está a continuación. Al no pasar otros argumentos, pygame solo eligirá la mejor profundidad de color y formato de píxel para nosotros.

>>> screen = pygame.display.set_mode((640, 480))

Manejo de Algunas Entradas

Necesitamos desesperadamente cambiar el bucle principal para que buscar cualquier entrada de usuario (como cuando el usuario cierra la ventana). Necesitamos agregar "manejo de eventos" a nuestro programa. Todos los programas gráficos usan este diseño basado en eventos. El programa obtiene eventos como "tecla presionada" o "mouse movido" de la computadora. Entonces el programa responde a los diferentes eventos. Así es como debería ser el código. En lugar de un bucle de 100 cuadros, seguiremos en el bucle hasta que el usuario nos pida que nos detengamos.:

>>> while True:
...     for event in pygame.event.get():
...         if event.type in (QUIT, KEYDOWN):
...             sys.exit()
...     move_and_draw_all_game_objects()

Lo que simplemente hace este código es, en primer lugar ejecuta el bucle para siempre, luego verifica si hay algún evento del usuario. Salimos del programa si el usuario presiona el teclado o el botón de cerrar en la ventana. Después de revisar todos los eventos, movemos y dibujamos nuestros objetos del juego. (También los borraremos antes de moverlos.)

Mover Imágenes Múltiples

Esta es la parte en que realmente vamos a cambiar las cosas. Digamos que queremos 10 imágenes diferentes moviéndose en la pantalla. Una buena forma de manejar esto es usando las CLASES de python. Crearemos una CLASE que represente nuestro objeto de juego. Este objeto tendrá una función para moverse solo y luego podemos crear tantos como queramos. Las funciones para dibujar y mover el objeto necesitan funcionar de una manera en que muevan solo un cuadro (o un paso) a la vez. Acá está el código de python para crear nuestra clase.

>>> class GameObject:
...     def __init__(self, image, height, speed):
...         self.speed = speed
...         self.image = image
...         self.pos = image.get_rect().move(0, height)
...     def move(self):
...         self.pos = self.pos.move(0, self.speed)
...         if self.pos.right > 600:
...             self.pos.left = 0

Entonces, tenemos dos funciones en nuestra clase. La función init (inicializar) construye nuestro objeto, posiciona el objeto y establece su velocidad. El método move (mover) mueve el objeto un paso. Si se va demasiado lejos, mueve el objeto de nuevo hacia la izquierda.

Ensamblando Todo

Ahora con nuestra nueva clase objeto, podemos montar el juego completo. Así es como se verá la función principal para nuestro programa.

>>> screen = pygame.display.set_mode((640, 480))
>>> player = pygame.image.load('player.bmp').convert()
>>> background = pygame.image.load('background.bmp').convert()
>>> screen.blit(background, (0, 0))
>>> objects = []
>>> for x in range(10):                    #crear 10 objetos</i>
...     o = GameObject(player, x*40, x)
...     objects.append(o)
>>> while True:
...     for event in pygame.event.get():
...         if event.type in (QUIT, KEYDOWN):
...             sys.exit()
...     for o in objects:
...         screen.blit(background, o.pos, o.pos)
...     for o in objects:
...         o.move()
...         screen.blit(o.image, o.pos)
...     pygame.display.update()
...     pygame.time.delay(100)

Y ahí está. Este es el código que necesitamos para animar 10 objetos en la pantalla. El único punto que podría necesitar explicación son los dos bucles (loops) que usamos para borrar todos los objetos y dibujar todos los objetos. Para hacer las cosas correctamente, necestamos borrar todos los objetos antes de dibujar alguno de ellos. En nuestro ejemplo puede que no importe pero cuando los objetos se superponen, el uso de dos bucles (loops) como estos se vuelve muy importante.

De Ahora En Más, Estás Por Tu Cuenta

Entonces, ¿qué será lo siguiente en tu camino de aprendizaje? Bueno, primero jugar un poco con este ejemplo. La versión ejecutable completa de este ejemplo está disponible en los directorios de ejemplos de pygame. Está en el ejemplo llamado moveit.py . Dale una mirada al código y jugá con él, correlo, aprendelo.

Algunas cosas en las que quizás quieras trabajar es en tener más de un tipo de objeto. Encontrar una manera de "eliminar" objetos limpiamente cuando ya no quieras mostrarlos. También, actualizar el llamado (call) display.update() para pasar una lista de las áreas en pantalla que han cambiado.

En pygame hay otros tutoriales y ejemplos que cubren estos temas. Así que cuando estés listo para seguir aprendiendo, seguí leyendo. :-)

Por último, podés unirte a la lista de correos de pygame o al chatroom con total libertad para consultar dudas al respecto. Siempre hay personas disponibles que están dispuestas a ayudar con estos temas.

Finalmente, divertite, para eso son los juegos!




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.5171294 pygame-2.6.1/docs/generated/es/tutorials/SpriteIntro.html0000644000175100001770000012325714676242432023126 0ustar00runnerdocker Tutoriales de Pygame - Introducción al Módulo de Sprites — pygame v2.6.1 documentation

Introducción al Módulo de Sprites

Author:

Pete Shinners

Contact:

pete@shinners.org

Traducción al español:

Estefanía Pivaral Serrano

Comentario: una forma simple de entender los Sprites, es pensarlos como elementos visuales utilizados para representar objetos y personajes en juegos, y se pueden crear y manipular utilizando la biblioteca de Pygame. Si bien se podría traducir el término "sprite" por "imagen en movimiento" o "personaje animado", en el contexto de programación se ha adoptado ampliamente y es comúnmente utilizado en español, sin traducción.

La versión de pygame 1.3 viene con un nuevo módulo, pygame.sprite. Este módulo está escrito en Python e incluye algunas clases de nivel superior para administrar los objetos del juego. Al usar este módulo en todo su potencial, se puede fácilmente administrar y dibujar los objetos del juego. Las clases de sprites están muy optimizadas, por lo que es probable que tu juego funcione más rápido con el módulo de sprites que sin él.

El módulo de sprites también pretende ser genérico, resulta que lo podés usar con casi cualquier tipo de juego. Toda esta flexibilidad viene con una pequeña penalización, es necesario entenderlo para usarlo correctamente. El reference documentation para el módulo de sprites puede mantenerte andando, pero probablemente necesites un poco más de explicaicón sobre cómo usar pygame.sprite en tu propio juego.

Varios de los ejemplos de pygame (como "chimp" y "aliens") han sido actualizados para usar el módulo de sprites. Es posible que quieras verificarlos para ver de qué se trata este módulo de sprites. El módulo de chimp incluso tiene su propio tutorial línea por línea, que puede ayudar a comprender mejor la programación con python y pygame.

Tengan en cuenta que esta introducción asumirá que tienen un poco de experiencia programando con python y que están familiarizados con diferentes partes de la creación de un simple juego. En este tutorial la palabra "referencia" es usada ocasionalmente. Esta representa una variable de python. Las variables en python son referencias, por lo que pueden haber varias variables apuntando al mismo objeto.

Lección de Historia

El término "sprite" es un vestigio de las computadoras y máquinas de juego más antiguas. Estas cajas antiguas no eran capaces de dibujar y borrar gráficos normales lo suficientemente rápido como para que funcionara como juego. Estas máquinas tenían un hardware especial para manejar juegos como objetos que necesitaban animarse rápidamente. Estos objetos eran llamados "sprites" y tenían limitaciones especiales, pero podían dibujarse y actualizarse muy rápido. Por lo general, existían en buffers especiales superpuestos en el video. Hoy en día las computadores se han vuelto lo suficientemente rápidas para manejar objetos similares a sprites sin un hardware dedicado. El término sprite es todavía usado para representar casi cualquier cosa en un juego 2D animado.

Las Clases

El módulo de sprites viene con dos clases principales. La primera es Sprite, que debe usarse como clse base para todos los objetos de tu juego. Esta clase realmente no hace nada por sí sola, sólo incluye varias funciones para ayudar a administrar el objeto del juego. El otro tipo de clase es Group. La clase Group es un contenedor para diferentes objetos Sprite. De hecho, hay varios tipos diferentes de clases de Group. Algunos de los Groups pueden dibujar todos los elementos que contienen, por ejemplo.

Esto es todo lo que hay, realmente. Comenzaremos con una descriçión de lo que hace cada tipo de clase y luego discutiremos las formas adecuadas de usar las dos clases.

La Clase Sprite

Como se mencionó anteriormente, la clase Sprite está diseñada para ser una clase base para todos los objetos del juego. Realmente no podés usarla por sí sola, ya que sólo tiene varios métodos para ayudarlo a trabajar con diferentes clases Grupo. El sprite realiza un seguimiento de a qué grupo pertenece. El constructor de clases (método __init__) toma un argumento de un Grupo (o listas de Grupos) al que debería pertencer la instancia Sprite. También se puede cambiar la pertenencia del Sprite con los métodos add() y remove(). Hay también un método groups(), que devuelve una lista de los grupos actuales que contiene el sprite.

Cuando se usen las clases de Sprite, es mejor pensarlas como "válidas" o "vivas", cuando pertenecen a uno o más Grupos. Cuando se eliminen las instancias de todos los grupos, pygame limpiará el objeto. (A menos que tengas tus propias referencias a la instancia en otro lugar.) El método kill() elimina los sprites de todos los grupos a los que pertenece. Esto eliminará limpiamente el objeto sprite. Si ya has armado algún juego, sabés que a veces eliminar limpiamente un objeto del juego puede ser complicado. El sprite también viene con un método alive() que devuelve "true" (verdadero) si todavía es miembro de algún grupo.

La Clase Grupo

La clase Group es solo un simple contenedor. Similar a un sprite, tiene un método add() y otro método remove() que puede cambiar qué sprites pertenecen a el grupo. También podés pasar un sprite o una lista de sprites al constructor (__init__() method) para crear una instancia Group que contiene algunos sprites iniciales.

El Group tiene algunos otros métodos como empty() para eliminar todos los sprites de el grupo y copy() que devolverá una copia del grupo con todos los mismos miembros. Además, el método has() verificará rápidamente si el Group contiene un sprite o lista de sprites.

La otra función que usarás frecuentemente es el método sprites(). Esto devuelve un objeto que se puede enlazar para acceder a todos los sprites que contiene el grupo. Actualmente, esta es solo una lista de sprites, pero en una versión posterior de python es probable que use iteradores para un mejor rendimiento.

Como atajo, el Group también tiene un método update(), que llamará a un método update() para cada sprite en el grupo, pasando los argumentos a cada uno. Generalmente, en un juego se necesita alguna función que actualice el estado de los objetos del juego. Es muy fácil llamar a tu propio método usando el método Group.sprites(), pero este es un atajo que se usa lo suficiente como para ser incluido. También, tengan en cuenta que la clase base Sprite tiene un método ficticio, tipo "dummy", update() que toma cualquier tipo de argumento y no hace nada.

Por último, el Group tiene un par de otros métodos que permiten usarlo como funición interna len(), obteniendo el número de sprites que contiene, y el operador "truth" (verdad), que te permite hacer "if mygroup:" para verificar si el grupo tiene sprites.

Mezclándolos Juntos

A esta altura, las dos clases parecen bastante básicas. No hacen mucho más de lo que podés hacer con una simple lista y tu propia clase de objetos de juego. Pero hay algunas ventajas grandes al usar Sprite y Group juntos. Un sprite puede pertenecer a tantos grupos como quieras, recordá que tan pronto como pertenezca a ningún grupo, generalmente se borrará (a menos que tengas otra referencia "no-grupales" para ese objeto)

Lo primero es una forma rápida y sencilla de categorizar sprites. Por ejemplo, digamos que tenemos un juego tipo Pacman. Podríamos hacer grupos separados por diferentes tipos de objetos en el juego. Fantasmas, Pac y Pellets (pastilla de poder). Cuando Pac come una pastilla de poder, podemos cambiar el estado de todos los objetos fantasma afectando a todo el grupo Fantasma. Esta manera es más rápida y sencilla que recorrer en loop la lista de todos los objetos del juego y comrpobar cuáles son fantasmas.

Agregar y eliminar grupos y sprites entre sí es una operación muy rápida, más rápida que usar listas para almacenar todo. Por lo tanto, podés cambiar de manera muy eficiente la pertenencia de los grupos. Los grupos se pueden usar para funcionar como atributos simples para cada objeto del juego. En lugar de rastrear algún atributo como "close_to_player" para un montón de objetos enemigos, podrías agregarlos a un grupo separado. Luego, cuando necesites acceder a todos los enemigos que están cerca del jugador, ya tenés una lista de ellos, en vez de examinar una lista de todos los enemigos, buscando el indicador "close_to_player". Más adelante, tu juego podría agregar múltiples jugadores, y en lugar de agregar más atributos "close_to_player2", "close_to_player3", podés fácilmente agregarlos a diferentes grupos o a cada jugador.

Otro beneficio importante de usar Sprites y Groups es que los grupos manejan limpiamente el borrado (o eliminación) de los objetos del juego. En un juego en el que muchos objetos hacen referencia a otros objetos, a veces eliminar un objeto puede ser la parte más difícil, ya que no puede desaparecer hasta que nadie haga referencia a él. Digamos que tenemos un objeto que está "persiguiendo" a otro objeto. El perseguidor puede mantener un Group simple que hace referencia al objeto (u objetos) que está persiguiendo. Si el objeto perseguido es destruido, no necesitamos preocuparnos por notificar al perseguidor que deje de perseguir. El perseguidor puede verlo por sí mismo que su grupo está ahora vacío y quizás encuentre un nuevo objetivo.

Una vez más, lo que hay que recordar es que agregar y eliminar sprites de grupos es una operación muy barata/rápida. Puede que te vaya mejor agregando muchos grupos para contener y organizar los objetos de tu juego. Algunos podrían incluso estar vacíos durante gran parte del juego, no hay penalizaciones por administrar tu juego de esta manera.

Los Muchos Tipos de Grupos

Los ejemplos anteriores y las razones para usar Sprites y Groups son solo la punta del iceberg. Otra ventaja es que el módulo viene con varios tipos diferentes de Groups. Todos estos grupos funcionan como un Group normal y corrientes, pero también tienen funcionalidades añadidas (o ligeramente diferentes). Acá hay una lista de las clases Group incluidas con el módulo de sprites.

Group

Este es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros Groups se derivan de este, pero no todos.

GroupSingle

Esto funciona exactamente como la clase regular Group, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites.

RenderPlain

Este es un grupo estándar derivado de Group. Tiene un método draw() que dibuja en la pantalla (o en cualquier Surface) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear.

RenderClear

Esto se deriva del grupo RenderPlain y agrega además un método llamado clear(). Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método clear().

RenderUpdates

Este es el Cádilac de renderizado de Groups. Es heredado de RenderClear, pero cambia el método draw() para también devolver una lista de Rects de pygame, que representan todas las áreas de la pantalla que han sido modificadas.

Esa es la lista de los diferentes grupos disponibles. Hablaremos más acerca de estos grupos de rendering en la próxima sección. No hay nada que te impida crear tus propias clases de grupos tampoco. Son solo código de python, asi que podés heredar de uno de estos y agregar/cambiar lo que quieras. En el futuro, espero que podamos agregar un par más de Groups a la lista. Un GroupMulti que es como el GroupSingle, pero que puede contener hasta un número determinado de sprites (¿en algún tipo de búfer circular?). También un grupo súper renderizador que puede borrar la posición de los sprites sin necesitar una imagen de fondo para hacerlo (al tomar una copia de la pantalla antes de blittear). Quién sabe realmente, pero en el futuro podemos agregar más clases útiles a esta lista.

Nota de traducción: "rendering" se puede entender como el proceso de producir una imagen o animación a partir de datos digitales utilizando software de gráficos. La traducción puede ser "renderizado" o "procesamiento de imágenes".

Los Grupos de Renderizado

De lo analizado anteriormente, podemos ver que hay tres grupos diferentes de renderizado. Con RenderUpdates podríamos salirnos con la nuestra, pero agrega una sobrecarga que no es realmente necesaria para algo como un juego de desplazamiento. Así que acá tenemos un par de herramientas, elegí la adecuada para cada trabajo.

Para un juego del tipo de desplazamiento, donde el fondo cambia completamente en cada cuadro, obviamente necesitamos no necesitamos preocuparnos por los rectángulos de actualización de python en la llamada display.update(). Definitvamente deberías ir con el grupo RenderPlain para administrar tu renderizado.

Para juegos donde el fondo es más estático, definitivamente no vas a querer que Pygame actualice la pantalla completa (ya que no es necesario). Este tipo de juegos generalmente implica borrar la posición anterior de cada objeto y luego dibujarlo en el lugar nuevo de cada cuadro. De esta manera solo estamos cambiando lo necesario. La mayoría de las veces solo querrás usar la clase RenderUpdates acá. Dado que también querrás pasar la lista de cambios a la función display.update().

La clase RenderUpdates también hace un buen trabajo al minimizar las áreas superpuestas en la lista de rectángulos actualizados. Si la posición anterior y la actual de un objeto se superponen, las fusionará en un solo rectángulo. Combinado con el hecho de que maneja los objetos eliminados, esta es una poderosa clase Group. Si has escrito un juego que administra los rectángulos modificados para los objetos en el juego, sabés que ésta es la causa de la gran cantidad de código desordenado en el juego. Especialmente, una vez que empiezas a agregar objetos que puedan ser eliminados en cualquier momento. Todo este trabajo se reduce a los monstruosos métodos clear() y draw(). Además, con la verificación de superposición, es probable que sea más rápido que cuando lo hacías manualmente.

También hay que tener en cuenta que no hay nada que impida mezclar y combinar estos grupos de renderizado en tu juego. Definitivamente deberías usar múltiples grupos de renderizado cuando quieras hacer capas con tus sprites. Además, si la pantalla se divide en varias secciones, ¿quizás cada sección de la pantalla debería usar un grupo de representación adecuado?

Detección de Colisiones

El módulo de sprites también viene con dos funciones de detección de colisiones muy genéricas. Para juegos más complejos, estos realmente no funcionarán adecuadamente, pero fácilmente se puede obtener el código fuente y modificarlos según sea necesario.

Acá hay un resumen de lo que son y lo que hacen.

spritecollide(sprite, group, dokill) -> list

Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método kill() para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle

>>> for bomb in sprite.spritecollide(player, bombs, 1):
...     boom_sound.play()
...     Explosion(bomb, 0)

Esto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo Explosion donde estaba la bomba. (Tengan en cuenta que la clase Explosion acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.)

groupcollide(group1, group2, dokill1, dokill2) -> dictionary

Esto es similar a la función spritecollide, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento dokill para los sprites en cada lista. Cuando dokill1 es verdadero, los sprites que colisionan en group1 serán kill() (matados). Cuando dokill2 es verdaero, vamos a tener el mismo resultado para el group2. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de group1 que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor.

>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys()
...     boom_sound.play()
...     Explosion(alien, 0)
...     kills += 1

Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los values() o items() si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos values() estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens.

Estas son las funciones básicas de colisión que vienen con pygame. Debería ser fácil crear uno propio que quizás use algo diferente al atributo "rect". ¿O tal vez intentar ajustar un poco más tu código afectando directamente el objeto de colisión en lugar de construir una lista de colisiones? El código en las funciones de colisión de sprites está muy optimizado, pero podrías acelerarlo ligeramente eliminando algunas funcionalidaded que no necesitas.

Problemas Comunes

Actualmente hay un problema principal que atrapa a los nuevos usuarios. Cuando derivas tus nueva clase de sprites con la base de Sprite, TENÉS que llamar al método Sprite._init_() desde el método _init_() de tu propia clase. Si te olvidás de llamar al método Sprite.__init__(), vas a obtener un error críptico, como este

AttributeError: 'mysprite' instance has no attribute '_Sprite__g'

Extendiendo tus Propias Clases (Avanzado)

Debido a problemas de velocidad, las clases de Group actuales intentan solo hacer exactamente lo que necesitan, y no manejar muchas situaciones generales. Si decidís que necesitás funciones adicionales, es posible que desees crear tu propia clase Group.

Las clases Sprite y Gorup fueron diseñadas para ser extendidas, así que sentite libre de crear tus propias clases Group para hacer cosas especializadas. El mejor lugar para empezar es probablemente el código fuente real de python para el módulo de sprite. Mirar el actual grupo Sprite debería ser ejemplo suficiente de cómo crear el tuyo propio.

Por ejemplo, aquí está el código fuente para un Group de renderización que llama a un método render() para cada sprite, en lugar de simplemente blittear una variable de "imagen" de él. Como queremos que también maneje áreas actualizadas, empezaremos con una copia del grupo RenderUpdates original, acá está el código

class RenderUpdatesDraw(RenderClear):
    """call sprite.draw(screen) to render sprites"""
    def draw(self, surface):
        dirty = self.lostsprites
        self.lostsprites = []
        for s, r in self.spritedict.items():
            newrect = s.draw(screen) #Here's the big change
            if r is 0:
                dirty.append(newrect)
            else:
                dirty.append(newrect.union(r))
            self.spritedict[s] = newrect
        return dirty

A continuación hay más información acerca de cómo podés crear tus propios objetos Sprite y Group de cero.

Los objetos Sprite solo "requieren" dos métodos: "add_internal()" y "remove_internal()". Estos son llamados por la clase Group cuando están eliminando un sprite de sí mismos. Los métodos add_internal() y remove_internal() tienen un único argumento que es un grupo. Tu Sprite necesitará alguna forma de realizar un seguimiento de los Groups a los que pertenece. Es probable que quieras intentar hacer coincidir los otros métodos y argumentos con la clase real de Sprites, pero si no vas a usar esos métodos, seguro que no los necesitás.

Son casi los mismos requerimientos para crear tu propio Group. De hecho, si observas la fuente, verás que el GroupSingle no está derivado de la clase Group, simplemente implementa los mismos métodos, por lo que realmente no se puede notar la diferencia. De nuevo, necesitás un método "add_internal()" y "remove_internal()" para que los sprites llamen cuando quieren pertenecer o eliminarse a sí mismos del grupo. Tanto add_internal() como remove_internal() tienen un único argumento que es un sprite. El único requisito adicional para las clases Group es que tengan un atributo ficticio llamado "_spritegroup". No importa cuál sea el valor, en tanto el atributo esté presente. Las clases Sprite pueden buscar este atributo para determinar la diferencia entre un "grupo" y cualquier contenedor ordinario de python. (Esto es importante porque varios métodos de sprites pueden tomar un argumento de un solo grupo o una secuencia de grupos. Dado que ambos se ven similares, esta es la forma más flexible de "ver" la diferencia.)

Deberías pasar por el código para el módulo de sprite. Si bien el código está un poco "afinado", tiene suficientes comentarios para ayudarte a seguirlo. Hay incluso una sección de tareas para hacer en la fuente si tenés ganas de contribuir.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.6011293 pygame-2.6.1/docs/generated/es/tutorials/SurfarrayIntro.html0000644000175100001770000014352714676242432023640 0ustar00runnerdocker Tutoriales de Pygame - Introducción a Surfarray — pygame v2.6.1 documentation

Introducción a Surfarray

Autor:

Pete Shinners

Contacto:

pete@shinners.org

Traducción al español:

Estefanía Pivaral Serrano

Introducción

Este tutorial intentará presentar tanto Numpy como el módulo de surfarray de pygame a los usuarios. Para principiantes, el código que utiliza surfarray puede ser bastante intimidante. Pero en realidad, hay sólo unos pocos conceptos que entender y estarás listo para empezar. Con el uso del módulo de surfarray es posible realizar operaciones a nivel de píxeles desde el código Python sencillo. El rendimiento puede llegar a ser bastante cercano al nivel de hacer el código en C.

Puede que solo desees ir directamente a la sección "Examples" para tener una idea de lo que es posible con este módulo, y luego comenzar desde el principio aquí para ir avanzando.

Ahora bien, no voy a engañarte para que pienses que todo va a ser muy sencillo. Lograr efectos avanzados modificando los valores de píxeles puede ser complicado. Solo dominar NumPy requiere aprendizaje. En este tutorial me centraré en lo básico y utilizaré muchos ejemplos en un intento de sembrar las semillas de la sabiduría. Después de haber terminado el tutorial, deberías tener una comprensión básica de cómo funciona el surfarray.

NumPy

Si no tenés instalado el paquete NumPy de python, necesitarás hacerlo. Podés descargar el paquete dede la página de descargas de NumPy en NumPy Downloads Page Para asegurarte que Numpy esté funcionando correctamente, deberías obtener algo como esto desde prompt (inteprete) interactivo de Python.:

>>> from numpy import *                    #importar numeric
>>> a = array((1,2,3,4,5))                 #crear un array
>>> a                                      #mostrar array
array([1, 2, 3, 4, 5])
>>> a[2]                                   #index al array
3
>>> a*2                                    #nuevo array con valores dobles
array([ 2,  4,  6,  8, 10])

Como se puede ver, el módulo NumPy nos proporciona un nuevo tipo de data, el array. Este objeto mantiene un array de tamaño fijo, y todos los valores que contiene en su interior son del mismo tipo. Los arrays (matrices) también pueden ser multidimensionales, que es como las usaremos con imágenes. Hay un poco más de información, pero es suficiente para empezar.

Si mirás al último comando de arriba, verás que las operaciones matemáticas en los array de NumPy se aplican para todos los valores del array. Esto se llama "element-wise operations" (operaciones elemento a elemento). Estos arrays también pueden dividirse en listas normales. La sintaxis de la división es la misma que se usa en objetos Python estándar. (así que estudia si es necesario).

Aquí hay algunos ejemplos más de arrays que funcionan.

>>> len(a)                                 #obtener el tamaño del array
5
>>> a[2:]                                  #elementos a partir del 2
array([3, 4, 5])
>>> a[:-2]                                 #todos excepto los últimos 2
array([1, 2, 3])
>>> a[2:] + a[:-2]                         #agregar el primero y último
array([4, 6, 8])
>>> array((1,2,3)) + array((3,4))          #agregar arrays de tamaños incorrectos
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: operands could not be broadcast together with shapes (3,) (2,)

Obtenemos un error con el último comando, porque intentamos sumar dos arrays que tienen tamaños diferentes. Para que dos arrays operen entre sí, incluyendo operaciones comparaciones y asignaciones, deben tener las mismas dismensiones. Es muy importante saber que los nuevos arrays creados a partir de cortar el original hacen referencia a los mismos valores. Por lo tanto, cambiar los valores en una porción de la división también cambia los valores originales. Es importante cómo se hace esto.

>>> a                                      #mostrar nuestro array inicial
array([1, 2, 3, 4, 5])
>>> aa = a[1:3]                            #dividir al medio 2 elementos
>>> aa                                     #mostrar la división
array([2, 3])
>>> aa[1] = 13                             #cambiar el valor en la división
>>> a                                      #mostrar cambio en el original
array([ 1, 2, 13,  4,  5])
>>> aaa = array(a)                         #copiar el array
>>> aaa                                    #mostrar copia
array([ 1, 2, 13,  4,  5])
>>> aaa[1:4] = 0                           #configurar los valores medios a 0
>>> aaa                                    #mostrar copia
array([1, 0, 0, 0, 5])
>>> a                                      #mostrar nuevamente el original
array([ 1, 2, 13,  4,  5])

Ahora vamos a ver pequeños arrays con dos dimensiones. No te preocupes demasiado, comenzar es lo mismo que tener una tupla de dos dimensiones (una tupla dentro de otra tupla). Empecemos con los arrays de dos dimensiones.

>>> row1 = (1,2,3)                         #crear una tupla de valores
>>> row2 = (3,4,5)                         #otra tupla
>>> (row1,row2)                            #mostrar como una tupla de dos dimensiones
((1, 2, 3), (3, 4, 5))
>>> b = array((row1, row2))                #crear un array en 2D
>>> b                                      #mostrar el array
array([[1, 2, 3],
       [3, 4, 5]])
>>> array(((1,2),(3,4),(5,6)))             #mostrar el nuevo array en 2D
array([[1, 2],
       [3, 4],
       [5, 6]])

Ahora, con estos arrays bidimensionales (de ahora en más "2D") podemos indexar valores específicos y hacer cortes ambas dimensiones. Simplemente usando una coma para separar los índices, nos permite buscar/cortar en múltiple dimensiones. Simplemente usando ":" como un índex (o no proporcionando suficiente índices) nos devuelve todos los valores en esa dimensión. Veamos cómo funciona esto.

>>> b                                      #mostrar nuestro array desde arriba
array([[1, 2, 3],
       [3, 4, 5]])
>>> b[0,1]                                 #indexar un único valor
2
>>> b[1,:]                                 #dividir la segunda fila
array([3, 4, 5])
>>> b[1]                                   #dividir la segunda fila (igual que arriba)
array([3, 4, 5])
>>> b[:,2]                                 #dividir la última columna
array([3, 5])
>>> b[:,:2]                                #dividir en un array de 2x2
array([[1, 2],
       [3, 4]])

De acuerdo, mantente conmigo acá, esto es lo más díficil que puede ponerse. Al usar NumPy hay una característica más para la división. La división de arrays también permite especificar un incremento de divsión. La sintaxis para una división con incremento es start_index : end_index : increment.

>>> c = arange(10)                         #como el rango, pero crea un array
>>> c                                      #muestra el array
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> c[1:6:2]                               #divide valores impares desde el 1 al 6
array([1, 3, 5])
>>> c[4::4]                                #divide cada 4to valor, empezando por el 4
array([4, 8])
>>> c[8:1:-1]                              #divide 1 al 8, de atrás para adelante /// invertido
array([8, 7, 6, 5, 4, 3, 2])

Bien, eso es todo. Hay suficiente información acá para que puedas empezar a usar Numpy con el módulo surfarray. Ciertamente hay mucho más en NumPy, pero esto es solo una introducción. Además, ¿queremos pasar a cosas divertidas, no?

Importar Surfarray

Para usar el módulo surfarray necesitamos importarlo. Dado que ambos, tanto surfarray y NumPy, son componentes opcionales para pygame es bueno asegurarse de que se importen correctamente antes de usarlos. En estos ejemplos voy a importar NumPy en una variable llamada N. Esto permitirá saber qué funciones estoy usando son del paquete de NumPy. (y es mucho más corto que escribir NumPy antes de cada función)

probá:
    import numpy as N
    import pygame.surfarray as surfarray
except ImportError:
    raise ImportError, "NumPy and Surfarray are required."

Introducción a Surfarray

Hay dos tipos principales de funciones en surfarray. Un conjunto de funciones para crear un array que es una copia de los datos de píxeles de la superficie (surface). Las otras funciones crean una copia referenciada de los datos de píxeles del array, de modo que los cambios en el array afectan directamente a la surface original. Hay otras funciones que permiten acceder a cualquier valor alfa por pixel, como arrays junto con algunas otras funciones útiles. Veremos estas otras funciones más adelante.

Al trabajar con estos arrays de surface, existen dos formas de representar los valores de píxeles. En primar lugar, pueden representarse como enteros mapeados. Este tipo de array es un array simple en 2D con un solo entero que representa el valor de color mapeado de la superficie. Este tipo de array es últil para mover partes de una imagen al rededor de la pantalla. El otro tipo de array utiliza tres valores RGB para representar el color de cada píxel. Este tipo de array hace que sea extremadamente sencillo realizar efectos que cambian el color de cada píxel. Este tipo de array es también un poco más complicado de manejar, ya que es esencialmente un array numérico 3D. Aún así, una vez que ajustas tu mente en el modo adecuado, no es mucho más difícil que usar un array 2D normal.

El módulo NumPy utiliza los tipos de números naturales de la máquina para representar los valores de los datos, por lo que un array de NumPy puede consistir de enteros de 8-bits, 16-bits y 32-bits. (los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros). Debido a esta limitación de tamaños de los enteros, debes tener un poco más de cuidado para asegurarte de que el tipo de arrays que hacen referencia a los datos de píxeles se pueda mapear correctamente con un tipo adecuado de datos. Las funciones que crean estos arrays a partir de las superficies son:

surfarray.pixels2d(surface)

Crea una matriz 2D (valores de píxeles enteros) que hace referencia a los datos originales de la superficie. Esto funcionará para todos los formatos de surface excepto el de 24-bit.

surfarray.array2d(surface)

Crea un array 2D (valores de píxeles enteros) que es copiada desde cualquier tipo de superficie.

surfarray.pixels3d(surface)

Crea un array 3D (valores de píxeles RGB) que hacen referencia a los datos originales de la superficie. Esto solo funcionará en superficies de 24-bit y 32-bit que tengan el formato RGB o BGR.

surfarray.array3d(surface)

Crea un array 3D (valores de píxeles RGB) que se copia desde cualquier tipo de surface.

Aquí hay una pequeña tabla que podría ilustrar mejor qué tipos de funciones se deben usar en cada surface. Como se puede observar, ambas funciones de array funcionarán con cualquier tipo de surface.

32-bit

24-bit

16-bit

8-bit(c-map)

pixel2d

yes

yes

yes

array2d

yes

yes

yes

yes

pixel3d

yes

yes

array3d

yes

yes

yes

yes

Ejemplos

Con esta información, estamos preparados para comenzar a probar cosas con los arrays de surface. A continuación encontrarán pequeñas demostraciones que crean un array de NumPy y los muestran en pygame. Estas diferentes pruebas se encuentran en el ejemplo arraydemo.py. Hay una función simple llamada surfdemo_show que muestra un array en la pantalla.

allblack
allblack = N.zeros((128, 128))
surfdemo_show(allblack, 'allblack')

Nuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función zeros. Aquí creamos un array 2D de todos ceros y lo mostramos.

striped
striped = N.zeros((128, 128, 3))
striped[:] = (255, 0, 0)
striped[:,::3] = (0, 255, 255)
surfdemo_show(striped, 'striped')

Aquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado.

rgbarray
imgsurface = pygame.image.load('surfarray.png')
rgbarray = surfarray.array3d(imgsurface)
surfdemo_show(rgbarray, 'rgbarray')

Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface mapped (raw). Usaremos esta imagen en el resto de los ejemplos.

flipped
flipped = rgbarray[:,::-1]
surfdemo_show(flipped, 'flipped')

Aquí volteamos la imagen verticalmente. Todo lo que necesitamos para esto es tomar el array de la imagen original y cortarlo usando un incremento negativo.

scaledown
scaledown = rgbarray[::2,::2]
surfdemo_show(scaledown, 'scaledown')

Basado en el último ejemplo, reducir una imagen escalar es bastante lógico. Simplemente cortamos todos los píxeles usando un incremento de 2 vertical y horizontalmente.

scaleup
shape = rgbarray.shape
scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2]))
scaleup[::2,::2,:] = rgbarray
scaleup[1::2,::2,:] = rgbarray
scaleup[:,1::2] = scaleup[:,::2]
surfdemo_show(scaleup, 'scaleup')

Aumentar la escala de la imagen requiere un poco más de trabajo, pero es similar al escalado previo hacia abajo, lo hacemos todo con cortes. Primero, creamos un array que tiene el doble del tamaño de nuestro original. Primero copiamos el array original en cada otro píxel del nuevo array. Luego lo hacemos de nuevo para cada otro píxel, haciendo las columnas impares. En este punto, tenemos la imagen escalada correctamente en sentido horizontal, pero las otras filas son negras, por lo que simplemente debemos copiar cada fila a la que está debajo. Entonces tenemos una imagen duplicada en tamaño.

redimg
redimg = N.array(rgbarray)
redimg[:,:,1:] = 0
surfdemo_show(redimg, 'redimg')

Ahora estamos usando arrays 3D para cambiar los colores. Acá establecemos todos los valores en verde y azul en cero. Esto nos deja solo con el canal rojo.

soften
factor = N.array((8,), N.int32)
soften = N.array(rgbarray, N.int32)
soften[1:,:]  += rgbarray[:-1,:] * factor
soften[:-1,:] += rgbarray[1:,:] * factor
soften[:,1:]  += rgbarray[:,:-1] * factor
soften[:,:-1] += rgbarray[:,1:] * factor
soften //= 33
surfdemo_show(soften, 'soften')

Aquí realizamos un filtro de convulción 3x3 que suavizará nuestra imagen. Parece que hay muchos pasos aquí, pero lo que estamos haciendo es desplazar la imagen 1 píxel en cada dirección y sumarlos todos juntos (con algunas multiplicaciones por ponderación). Luego se promedian todos los valores. No es Gaussiano, pero es rápido. Un punto con los arrays NumPy, la precisión de las operaciones aritméticas está determinada por el array con el tipo de datos más grande. Entonces, si el factor no se declarara como un array de 1 elemento de tipo numpy.int32, las multiplicaciones se realizarían utilizando numpy.int8, el entero de 8 bits de cada elemento rgbarray. Esto causará una truncación de valores. El array de suavizado también debe declararse con un tamaño de entero más grande que rgbarray para evitar la truncación.

xfade
src = N.array(rgbarray)
dest = N.zeros(rgbarray.shape)
dest[:] = 20, 50, 100
diff = (dest - src) * 0.50
xfade = src + diff.astype(N.uint)
surfdemo_show(xfade, 'xfade')

Por último, estamos realizando una transición gradual entre la imagen original y una imagen de color azul sólido. No es emocionante, pero la imagen de destino podría ser cualquier cosa, y cambiar el multiplicador 0.50 permitirá elegir cualquier paso en una transición lineal entre dos imágenes.

Con suerte, a estas alturas estás empezando a ver cómo surfarray puede ser utilizado para realizar efectos especiales y transformaciones que sólo son posibles a nivel de píxeles. Como mínimo, se puede utilizar surfarray para realizar muchas operaciones del tipo Surface.set_at() y Surface.set_at() rápidamente. Pero no creas que esto ha terminado, todavía queda mucho por aprender.

Bloqueo de Superficie (Surface)

Al igual que el resto de pygame, surfarray bloqueará cualquier Surface que necesite para acceder a los datos de píxeles. Sin embargo, hay un elemento más a tener en cuenta; al crear los array de pixeles, la surface original quedará bloqueada durante la vida útil de ese array de píxeles. Es importante recordarlo. Asegurate de "eliminar" el array de píxeles o de dejarlo fuera del alcance (es decir, cuando la funcion vuelve, etc.).

También hay que tener en cuenta que realmente no querés hacer muchos (si es que alguno) accesos directos a píxeles en la surface del hardware (HWSURFACE). Esto se debe a que los datos de la surface se encuentra en la tarjeta gráfica, y transferir cambios de píxeles a través del bus PCI/AGP no es rápido.

Transparencia

El módulo surfarray tiene varios métodos para acceder a los valores alpha/colorclave de una Surface. Ninguna de las funciones alpha se ve afectada por la transparencia general de una Surface, solo por los vaores de los píxeles. Aquí está la lista de esas funciones.

surfarray.pixels_alpha(surface)

Crea un array 2D (valores enteros de píxeles) que hace referencia a los datos alpha de la surface original. Esto solo funcionará en imágenes de 32-bit con un componente alfa de 8-bit.

surfarray.array_alpha(surface)

Crea un array 2D (valores enteros de píxeles) que se copia desde cualquier tipo de surface. Si la surface no tiene valores alfa, el array tendrá valores completamten opacos (255).

surfarray.array_colorkey(surface)

Crea un array 2D (valores enteros de píxeles) que está establecida como transparente (0) donde el color de ese píxel coincide con el color clave de la Surface.

Otras Funciones de Surfarray

Solo hay algunas otras funciones disponibles en surfarray. Podés obtener una lista mejor con mayor documentación en surfarray reference page. Sin embargo, hay una función muy útil.

surfarray.blit_array(surface, array)

Esto transferirá cualquier tipo de array de surface 2D o 3D a una Surface con las mismas dimensiones. Este blit de surfarray generalmente será más rápido que asignar un array a la de pixeles referenciado. Sin embargo, no debería ser tan rápido como el blitting normal de surface, ya que esos están muy optimizados.

NumPy más Avanzado

Hay un par más de cosas que deberías saber sobre los arrays Numpy. Cuando se trata de arrays muy grandes, como los que son de 640x480, hay algunas cosas adicionales sobre las que debes tener cuidado. Principalmente, mientras que usar los operadores como + y * en los arrays los hace fáciles de usar, también es muy costoso en arrays grandes. Estos operadores deben hacer nuevas copias temporales del array, que luego generalmente se copian en otro array. Esto puede requerir mucho tiempo. Afortunadamente, todos los operadores de Numpy vienen con funciones especiales que pueden realizar la operación "in place" (en su lugar). Por ejemplo, en lugar de usar screen[:] = screen + brightmap podrías querer usar add(screen, brightmap, screen) que es más rápido. De todos modos, debes leer la documentación UFunc de Numpy para obtener más información sobre esto. Es importante cuando se trata de los arrays.

Otra cosa a tener en cuenta al trabajar con arrays NumPy es el tipo de datos del array. Algunos de los arrays (especialmente el tipo de píxeles mapeado) a menudo devuelven arrays con un valor sin signo en 8-bits. Estos arrays se desbordarán fácilmente si no tienes cuidado. NumPy usará la misma coerción que se encuentra en los programas en C, por lo que mezclar una operación con números de 8 bits y 32 bits dará como resultado números de 32 bits. Puedes convertir el tipo de datos del array, pero definitivamente debes ser consciente de qué tipos de arrays tienes, si NumPy se encuentra en una situación en la que se arruinaría la precisión, lanzará una excepción.

Por último, debes tenér en cuenta que al asignar valores en los arrays 3D, estos deben estar entre 0 y 255, de lo contrario se producirá alguna truncación indefinida.

Graduación

Bueno, ahí está. Mi breve introducción a NumPy y surfarray. Espero que ahora veas lo que es posible, y aunque nunca los uses por ti mismo, no tengas miedo cuando veas código que los use. Echale un vistazo al ejemplo vgrade para ver más sobre los arrays numéricos. También, hay algunos demos "flame" que usan surfarray para crear un efectp de fuego en tiempo real.

Lo mejor que podés hacer es probar alguna cosas por tu cuenta. Ve despacio al principio y ve construyendo poco a poco, ya he visto algunas cosas geniales con surfarray, como gradientes radiales y más. Buena suerte.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.6341293 pygame-2.6.1/docs/generated/es/tutorials/chimpance.py.html0000644000175100001770000010350014676242432023207 0ustar00runnerdocker pygame/examples/chimp.py — pygame v2.6.1 documentation
#!/usr/bin/env python
""" pygame.examples.chimp

This simple example is used for the line-by-line tutorial
that comes with pygame. It is based on a 'popular' web banner.
Note there are comments here, but for the full explanation,
follow along in the tutorial.
"""


# Import Modules
import os
import pygame as pg

if not pg.font:
    print("Warning, fonts disabled")
if not pg.mixer:
    print("Warning, sound disabled")

main_dir = os.path.split(os.path.abspath(__file__))[0]
data_dir = os.path.join(main_dir, "data")


# functions to create our resources
def load_image(name, colorkey=None, scale=1):
    fullname = os.path.join(data_dir, name)
    image = pg.image.load(fullname)
    image = image.convert()

    size = image.get_size()
    size = (size[0] * scale, size[1] * scale)
    image = pg.transform.scale(image, size)

    if colorkey is not None:
        if colorkey == -1:
            colorkey = image.get_at((0, 0))
        image.set_colorkey(colorkey, pg.RLEACCEL)
    return image, image.get_rect()


def load_sound(name):
    class NoneSound:
        def play(self):
            pass

    if not pg.mixer or not pg.mixer.get_init():
        return NoneSound()

    fullname = os.path.join(data_dir, name)
    sound = pg.mixer.Sound(fullname)

    return sound


# classes for our game objects
class Fist(pg.sprite.Sprite):
    """moves a clenched fist on the screen, following the mouse"""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("fist.png", -1)
        self.fist_offset = (-235, -80)
        self.punching = False

    def update(self):
        """move the fist based on the mouse position"""
        pos = pg.mouse.get_pos()
        self.rect.topleft = pos
        self.rect.move_ip(self.fist_offset)
        if self.punching:
            self.rect.move_ip(15, 25)

    def punch(self, target):
        """returns true if the fist collides with the target"""
        if not self.punching:
            self.punching = True
            hitbox = self.rect.inflate(-5, -5)
            return hitbox.colliderect(target.rect)

    def unpunch(self):
        """called to pull the fist back"""
        self.punching = False


class Chimp(pg.sprite.Sprite):
    """moves a monkey critter across the screen. it can spin the
    monkey when it is punched."""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("chimp.png", -1, 4)
        screen = pg.display.get_surface()
        self.area = screen.get_rect()
        self.rect.topleft = 10, 90
        self.move = 18
        self.dizzy = False

    def update(self):
        """walk or spin, depending on the monkeys state"""
        if self.dizzy:
            self._spin()
        else:
            self._walk()

    def _walk(self):
        """move the monkey across the screen, and turn at the ends"""
        newpos = self.rect.move((self.move, 0))
        if not self.area.contains(newpos):
            if self.rect.left < self.area.left or self.rect.right > self.area.right:
                self.move = -self.move
                newpos = self.rect.move((self.move, 0))
                self.image = pg.transform.flip(self.image, True, False)
        self.rect = newpos

    def _spin(self):
        """spin the monkey image"""
        center = self.rect.center
        self.dizzy = self.dizzy + 12
        if self.dizzy >= 360:
            self.dizzy = False
            self.image = self.original
        else:
            rotate = pg.transform.rotate
            self.image = rotate(self.original, self.dizzy)
        self.rect = self.image.get_rect(center=center)

    def punched(self):
        """this will cause the monkey to start spinning"""
        if not self.dizzy:
            self.dizzy = True
            self.original = self.image


def main():
    """this function is called when the program starts.
    it initializes everything it needs, then runs in
    a loop until the function returns."""
    # Initialize Everything
    pg.init()
    screen = pg.display.set_mode((1280, 480), pg.SCALED)
    pg.display.set_caption("Monkey Fever")
    pg.mouse.set_visible(False)

    # Create The Background
    background = pg.Surface(screen.get_size())
    background = background.convert()
    background.fill((170, 238, 187))

    # Put Text On The Background, Centered
    if pg.font:
        font = pg.font.Font(None, 64)
        text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10))
        textpos = text.get_rect(centerx=background.get_width() / 2, y=10)
        background.blit(text, textpos)

    # Display The Background
    screen.blit(background, (0, 0))
    pg.display.flip()

    # Prepare Game Objects
    whiff_sound = load_sound("whiff.wav")
    punch_sound = load_sound("punch.wav")
    chimp = Chimp()
    fist = Fist()
    allsprites = pg.sprite.RenderPlain((chimp, fist))
    clock = pg.time.Clock()

    # Main Loop
    going = True
    while going:
        clock.tick(60)

        # Handle Input Events
        for event in pg.event.get():
            if event.type == pg.QUIT:
                going = False
            elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE:
                going = False
            elif event.type == pg.MOUSEBUTTONDOWN:
                if fist.punch(chimp):
                    punch_sound.play()  # punch
                    chimp.punched()
                else:
                    whiff_sound.play()  # miss
            elif event.type == pg.MOUSEBUTTONUP:
                fist.unpunch()

        allsprites.update()

        # Draw Everything
        screen.blit(background, (0, 0))
        allsprites.draw(screen)
        pg.display.flip()

    pg.quit()


# Game Over


# this calls the 'main' function when this script is executed
if __name__ == "__main__":
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612185.667129 pygame-2.6.1/docs/generated/es/tutorials/tom_juegos2.html0000644000175100001770000004010114676242432023063 0ustar00runnerdocker Revisión: Fundamentos de Pygame — pygame v2.6.1 documentation

2. Revisión: Fundamentos de Pygame

2.1. El juego básico de Pygame

Por el bien de la revisión, y para asegurarme de que estés familiarizado/a con la estrucutra de un programa básico de Pygame, voy a ejecutar brevemente un programa básico de Pygame, que mostrará no más que una ventana con un poco de texto en ella. Al final, debería verse algo así (aunque claro que la decoración de la ventana será probablemente diferente en tu sistema):

../_images/tom_basic.png

El código completo para este ejemplo se ve así:

#!/usr/bin/python

import pygame
from pygame.locals import *

def main():
    # Inicializar pantalla
    pygame.init()
    screen = pygame.display.set_mode((150, 50))
    pygame.display.set_caption('Basic Pygame program')

    # Llenar fondo
    background = pygame.Surface(screen.get_size())
    background = background.convert()
    background.fill((250, 250, 250))

    # Mostrar texto
    font = pygame.font.Font(None, 36)
    text = font.render("Hello There", 1, (10, 10, 10))
    textpos = text.get_rect()
    textpos.centerx = background.get_rect().centerx
    background.blit(text, textpos)

    # Blittear todo a la pantalla
    screen.blit(background, (0, 0))
    pygame.display.flip()

    # Bucle de eventos (event loop)
    while True:
        for event in pygame.event.get():
            if event.type == QUIT:
                return

        screen.blit(background, (0, 0))
        pygame.display.flip()


if __name__ == '__main__': main()

2.2. Objetos Pygame Básicos

Como pueden ver, el código consiste de tres objetos proncipales: la pantalla, el fondo y el texto. Cada uno de estos objetos está creado primero llamando a una instancia de objeto integrado de Pygame, y luego modificándolo para adaptarse a nuestras necesidades. La pantalla es un caso levemente especial, porque todavía modificamos la pantalla a través de llamadas de Pygame, en lugar de llamar los métodos pertenecientes al objeto de pantalla. Pero para los demás objetos de Pygame, primero creamos el objeto como una copia de un objeto de Pygame, dándole algunos atributos, y construimos nuestro objeto a partir de ellos.

Con el fondo, primero creamos un objeto Surface de Pygame y le damos el tamaño de la pantalla. Luego realizamos la operación convert() para convertir la Surface a un formato de un solo píxel. Esto es obviamente necesario cuando tenemos varias imágenes y superficies, todas con diferentes formatos de píxeles, lo cual hace que su renderización sea bastante lenta. Al convertir todas las superficies (surfaces), podemos acelerar drásticamente los tiempos de renderizado. Finalmente, llenamos la superficie de fondo con color blanco (255, 255, 255). Estos valores son RGB (Red Green Blue), y se pueden obtener desde cualquier buen programa de dibujo.

Con el texto, requerimos más de un objeto. Primero, creamos un objeto de fuente (font object), que define qué fuente usar y qué tamaño va a tener. Luego, creamos un objeto texto (text object) usando el método render que pertenece a nuestro objeto de fuente, suministrando tres argumentos: el texto que se va a renderizar, si debe tener anti-aliasing (1=yes, 0=no), y el color para el texto (otra vez en formato RGB). A continuación, creamos un tercer objeto de texto, que obtiene un rectangulo para el texto. La forma más fácil de entender esto es imaginando dibujar un rectángulo que rodeará todo el texto; luego se puede usar este rectángulo para obtener/establecer la posición del texto en la pantalla. En este ejemplo, obtenemos el rectángulo y establecemos su atributo centerx para que sea el atributo centerx del fondo (así el centro del texto será el mismo que el centro del fondo, es decir el texto estará centrado en la pantalla en el eje x). También podríamos establecer la coordenada y, pero no es diferente, así que dejé el texto en la parte superior de la pantalla. Como la pantalla es pequeña de todas formas, no parecía necesario.

2.3. Blitting

Ahora que hemos creado nuestros objetos de juego, necesitamos renderizarlos. Si no lo hiciéramos, y ejecutáramos el programa, solo veríamos una pantalla en blanco y los objetos permanecerían invisibles. El término usado para renderizar objetos es blitting, que es donde se copian los píxeles pertenecientes a dicho objeto en el objeto de destino. Entonecs, para renderizar el objeto de fondo, lo blitteamos en la pantalla. En este ejemplo, para simplificar las cosas, blitteamos el texto en el fondo (para que el fondo tenga una copia del texto en él) y luego blitteamos el fondo en la pantalla.

Blitting es uno de las operaciones más lentas de cualquier juego, por lo que debes tener cuidado de no blittear demasiado en la pantalla en cada cuadro. Si tienes una imagen de fondo y una pelota volando por la pantalla, podrías blittear el fondo y luego la pelota en cada cuadro, lo que cubriría la posición anterior de la pelota y renderizaría la nueva pelota, pero esto sería bastante lento. Una mejor solución es blittear el fondo en el área que la pelota ocupó previamente, lo que se puede encontrar en el rectángulo anterior de la pelota, y luego blittear la pelota, para que solo estés blitteando dos áreas pequeñas.

2.4. Evento en Bucle

Una vez que ya hayas configurado el juego, necesitás ponerlo en un bucle para que se ejecute cotninuamente hasta que el usuario señale que quiere salir. Asi que comenzás un bucle abierto while, y luego por cada iteración del bucle, que será cada cuadro del juego, actualizas el juego. Lo primero es verificar cualquier evento de Pygame, que será el usuario presionando el teclado, clickeando el botón del mouse, moviendo un joystick, redimensionando la ventana, o tratando de cerrarla. En este caso, simplemente queremos estar atentos a que el usuario intente salir del juego cerrando la ventana, en cuyo caso el juego debería return, que terminará el bucle while. Luego, simplemente necesitamos volver a dibujar (re-blit) el fondo, y actualizar la pantalla para que todo se dibuje. Okay, como nada se mueve o sucede, en este ejemplo, estrictamente hablando no necesitamos volver a dibujar el fondo en cada iteración, pero lo incluí porque cuando las cosas se mueven en la pantalla, necesitarás hacer todo tu dibujado (blitting) aquí.

2.5. Ta-da!

¡Y eso es todo - tu más básico juego de Pygame! Todos los juegos tomarán una forma similar a esta, pero con mucho más código para las funciones del juego real en sí, que tienen más que ver con la programación y menos estructurados por el funcionamiento de Pygame. Esto es realmente de lo que trata este tutorial y seguiremos adelante con ello.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.6981292 pygame-2.6.1/docs/generated/es/tutorials/tom_juegos3.html0000644000175100001770000003255414676242432023101 0ustar00runnerdocker Dando Inicio — pygame v2.6.1 documentation

1. Dando Inicio

Las primeras secciones de código son relativamente simples y, una vez escritas, pueden usualmente ser pueden reutilizar en todos los juegos que posteriormente hagas. Realizarán todas las tareas aburridas y genéricas como cargar módulos, cargar imágenes, abrir conexiones de red, reproducir música y así sucesivamente. También incluirán una gestión de errores simple pero efectiva, y cualquier personalización que desees proporcionar además de las funciones proporcionadas por los módulos como sys y pygame.

3.1. Primeras líneas y carga de módulos

En primer lugar, necesitás iniciar tu juego y cargar tus módulos. Siempre es una buena idea establecer algunas cosas al principio del archivo fuente principal, como el nombre del archivo, qué contiene, bajo qué licencia se encuentra, y cualquier otra información útil que desees proporcionar a quienes que lo van a estar viendo. Luego puedes cargar módulos, con algunas verificaciones de errores para que Python no imprima una traza desagradable que los no programadores no entenderán. El código es bastante simple, por lo que no me molestaré en explicarlo.:

#!/usr/bin/env python
#
# Tom's Pong
# A simple pong game with realistic physics and AI
# http://www.tomchance.uklinux.net/projects/pong.shtml
#
# Released under the GNU General Public License

VERSION = "0.4"

try:
    import sys
    import random
    import math
    import os
    import getopt
    import pygame
    from socket import *
    from pygame.locals import *
except ImportError, err:
    print(f"couldn't load module. {err}")
    sys.exit(2)

3.2. Funciones de manejo de recursos

En el ejemplo Chimpancé, Línea Por Línea, el primer código que se escribió fue para cargar imagenes y sonidos. Como estos eran totalmente independiente de cualquier lógica de juego u objetos del juego, se los escribió como funciones separadas y se escribieron primero para que el código posterior pudiera hacer uso de ellas. Generalmente, coloco todo mi código de esta naturaleza primero, en sus propias funciones sin clase; estas serán, en términos generales, funciones de manejo de recursos. Por supuesto, también podés crear clases para estas funciones, para que puedas agruparlas y tal vez tener un objeto con el que puedas controlar todos los recursos. Como con cualquier buen entorno de programación, depende de vos desarrollar tu propia práctica y estilo óptimo.

Siempre es una buena idea escribir tus propias funciones de manejo de recursos, porque aunque Pygame tiene métodos para abrir imágenes y sonidos, y otros módulos tendrán sus métodos para abrir otros recursos, esos métodos pueden ocupar más de una línea, pueden requerir una modificación constante de tu parte y a menudo no proporcionan un manejo de errores satisfactorios. Escribir funciones de manejo de recursos te da código sofisticado y reutilizable, y te da mayor control sobre tus recursos. Tomá este ejemplo de una función de carga de imágenes:

def load_png(name):
    """ Load image and return image object"""
    fullname = os.path.join("data", name)
    try:
        image = pygame.image.load(fullname)
        if image.get_alpha() is None:
            image = image.convert()
        else:
            image = image.convert_alpha()
    except FileNotFoundError:
        print(f"Cannot load image: {fullname}")
        raise SystemExit
    return image, image.get_rect()

Acá creamos una función de carga de imagen más sofisticada que la proporcionada por pygame.image.load(). Observen que la primera línea de la función es una cadena de documentación describiendo qué hace cada función, y qué objeto(s) devuelve. La función asume que todas tus imágenes están en el directorio llamado "data", por lo que toma el nombre del archivo y crea la ruta completa, por ejemplo data/ball.png, usando el módulo os para asegurar la compatibilidad entre plataformas. Luego intenta cargar la imagen y convertir cualquier región alfa para que puedas lograr la transparencia, y devuelve un mensaje de error más legible si hay algún problema. Finalmente, devuelve el objeto de imagen y su clase rect.

Podés crear funciones similares para cargar cualquier otro recurso, como cargar sonidos. También podés crear clases de manejo de recursos para darte más flexibilidad con recursos más complejos. Por ejemplo, podrías crear una clase de música, con una función __init__ que carga la música (quizás tomando prestada de la función load_sound()), una función para pausar la música y otra para reiniciarla. Otra clase útil de manejo de recursos es para conexiones de red. Funciones para abrir sockets, pasar datos con seguridad y verificación de errores adecuados, cerrar sockets, buscar direcciones, y otras tareas de red, pueden hacer que escribir un juego con capacidades de red sea relativamente indoloro.

Recordá que la tarea principal de estas funciones/clases es asegurarse de que para cuando llegues a escribir las clases de objetos de juego y el bucle principal, casi no haya nada más que hacer. La herencia de clases puede hacer que estas clases básicas sean especialmente útiles. Pero no te excedas, las funciones que solo serán utilizadas por una clase deben ser escritas como parte de esa clase, no como una función global.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612185.734129 pygame-2.6.1/docs/generated/es/tutorials/tom_juegos4.html0000644000175100001770000004277614676242432023111 0ustar00runnerdocker Clases de objetos de juego — pygame v2.6.1 documentation

4. Clases de objetos de juego

Una vez que hayas cargado tus módulos y escrito tus funciones de manejo de recursos, querrás pasar a escribir algunos objetos de juego. La forma en que esto se realiza es bastante simple, sin embargo puede parecer complejo al principio. Escribirás una clase para cada tipo de objeto en el juego y después crearás una instancia de esas clases para los objetos. Luego podés usar los métodos de esas clases para manipular los objetos, dándoles algún tipo de movimiento y capacidades interactivas. Entonces tu juego, en pseudo-código, se verá así:

#!/usr/bin/python

# [load modules here]

# [resource handling functions here]

class Ball:
    # [ball functions (methods) here]
    # [e.g. a function to calculate new position]
    # [and a function to check if it hits the side]

def main:
    # [initiate game environment here]

    # [create new object as instance of ball class]
    ball = Ball()

    while True:
        # [check for user input]

        # [call ball's update function]
        ball.update()

Por supuesto, esto es un ejemplo muy simple, y tendrías que agregar todo el código en lugar de esos pequeños comentarios entre corchetes. Pero deberías entender la idea básica. Creás una clase, en la cual colocás todas las funciones de la pelota, incluyendo __init__,que crearía todos los atributos de la pelota, y update, que movería la pelota a su nueva posición antes de blittearla en la pantalla en esta posición.

Luego podés crear más clases para todos tus otros objetos de juego, y luego crear instancias de los mismos para que puedas manejarlos fácilmente en la función main y en el bucle principal del programa. En contraste con iniciar la pelota en la función main, y luego tener muchas funciones sin clase para manipular un objeto de pelota establecido, y espero que puedas ver por qué usar clases es una ventaja: te permite poner todo el código perteneciente a cada objeto en un único lugar; hace que sea más fácil usar objetos; hace que agregar nuevos objetos y manipularlos sea más flexible. En lugar de agregar más código para cada nuevo objeto de pelota, podés simplemente crear instancias de la clase Ball para cada nuevo objeto de pelota. ¡Mágia!

4.1. Una clase simple de pelota

Aquí hay una clase simple con el código necesario para crear un objeto pelota que se moverá a través de la pantalla, si la función update esa llamada en el bucleo principal:

class Ball(pygame.sprite.Sprite):
    """A ball that will move across the screen  (Una peleota se moverá a través de la pantalla)
    Returns: ball object
    Functions: update, calcnewpos
    Attributes: area, vector"""

    def __init__(self, vector):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png('ball.png')
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.vector = vector

    def update(self):
        newpos = self.calcnewpos(self.rect,self.vector)
        self.rect = newpos

    def calcnewpos(self,rect,vector):
        (angle,z) = vector
        (dx,dy) = (z*math.cos(angle),z*math.sin(angle))
        return rect.move(dx,dy)

Aquí tenemos la clase Ball con una función __init__ que configura la pelota, una función update que cambia el rectángulo de la pelota para que esté en la nueva posición, y una función calcnewpos para calcular la nueva posición de la pelota basada en su posición actual, y el vector por el cual se está moviendo. Explicaré la física en un momento. Lo único más a destacar es la cadena de documentación, que es un poco más larga esta vez, y explica los conceptos básicos del la clase. Estas cadenas son útiles no solo para ti mismo y otros programadores que revisen el código, sino también para las herramientas que analicen y documenten tu código. No harán mucha diferencia en programas pequeños, pero en los grandes son invaluables, así que es una buena costumbre de adquirir.

4.1.1. Digresión 1: Sprites

La otra razón por la cual crear una clase por cada objeto son los sprites. Cada imagen que se renderiza en tu juego será un objeto, por lo que en principio, la clase de cada objeto debería heredar la clase Sprite. Esta es una característica muy útil de Python: la herencia de clases. Ahora, la clase Ball tiene todas las funciones que vienen con la clase Sprite, y cualquier instancia del objeto de la clase Ball será registrada por Pygame como un sprite. Mientras que con el texto y el fondo, que no se mueven, está bien hacer un blit del objeto sobre el fondo, Pygame maneja los objetos sprites de manera diferente, lo cual verás cuando miremos el código completo del programa.

Básicamente, creas tanto un objeto pelota y un objeto sprite para la pelota, y luego llamás a la función update de la pelota en el objeto de sprite, actualizando así el sprite. Los sprites también te dan formas sofisticadas de determinar si dos objetos han colisionado. Normalmente, podrías simplemente comprobar en el bucle principal para ver si sus rectángulos se superponen, pero eso implicaría mucho código, lo cual sería una pérdida de tiempo porque la clase Sprite proporciona dos funciones (spritecollide y groupcollide) para hacer esto por vos.

4.1.2. Digresión 2: Física de vectores

Aparte de la estructura de la clase Ball, lo notable de este código es la física de vectores utilizada para calcular el movimiento de la pelota. En cualquier juego que involucre movimiento angular, no se llegará muy lejos a menos que se esté cómodo con la trigonometría, así que simplemente introduciré los conceptos básicos que necesitás saber para entender la función calcnewpos.

Para empezar, notarás que la pelota tiene un atributo llamado vector, que está compuesto por angle y z. El ángulo estpa medido en radianes y dará la dirección en la que la pelota se mueve. Z es la velocidad a la que se mueve la pelota. Entonces, usando este vector, podemos determinar la dirección y velocidad de la pelota, y por lo tanto, cuánto se moverá en los ejes x e y:

../_images/tom_radians.png

El diagrama anterior ilustra las matemáticas básicas detrás de los vectores. En el diagrama de la izquierda, se puede ver el movimiento proyectado de la pelota representado por una línea azul. La longitud de esa línea (z) representa su velocidad, y el ángulo es la dirección en la que se moverá. El ángulo para el movimiento de la pelota siempre se tomará desde el eje x a la derecha, y se mide en sentido horario desde esa línea, como se muestra en el diagrama.

A partir del ángulo y la velocidad de la pelota, podemos lograr calcular cuánto se ha movido a lo largo de los ejes x e y. Necesitamos hacer esto porque Pygame en sí no admite vectores, y solo podemos mover la pelota moviendo su rectángulo a lo largo de los dos ejes. Por lo tanto, necesitamos resolve (resolver) el ángulo y la velocidad en su movimiento en el eje x (dx) y en el eje y (dy). Esto es un asunto sencillo de trigonometría y se puede hacer con las fórmulas que se muestran en el diagrama.

Si has estudiado trigonometría elemental antes, nada de esto debería ser nuevo para vos. Pero en caso que seas olvidadizo, acá hay algunas fórmulas útiles para recordar, que te ayudarán a visualizar los ángulos (a mi me resulta más fácil visualizar los ángulos en grados que en radianes.

../_images/tom_formulae.png



Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612185.769129 pygame-2.6.1/docs/generated/es/tutorials/tom_juegos5.html0000644000175100001770000004744214676242432023105 0ustar00runnerdocker Objetos controlables por los usuarios — pygame v2.6.1 documentation

5. Objetos controlables por los usuarios

Hasta ahora puodés crear una ventana de Pygame y renderizar una pelota que volará por la pantalla. El siguiente paso es crear algunos bates que el usuario pueda controlar. Esto es potencialmente más simple que la pelota, porque no requiere física (a menos que el objeto controlado por el usuario se mueva de manera más compleja que hacia arriba y abajo, por ejemplo, un personaje de plataforma como Mario, en cuyo caso necesitarás más física) Los objetos controlados por el usuario son bastante fácil de crear, gracias al sistema de cola de Pygame, como ya verás.

5.1. Una clase simple de bate

El principio detrás de la clase de bate es similar al de la clase de pelota. Necesitás una función __init__ para inicializar el bate (para que puedas crear instancias de objeto para cada bat), una función update para realizar cambios por cuadro en el bate antes de que sea blitteado en la pantalla, y las funciones que definirán lo que esta clase realmente hará. Aquí tenés un ejemplo de código:

class Bat(pygame.sprite.Sprite):
    """Movable tennis 'bat' with which one hits the ball
    Returns: bat object
    Functions: reinit, update, moveup, movedown
    Attributes: which, speed"""

    def __init__(self, side):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("bat.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.side = side
        self.speed = 10
        self.state = "still"
        self.reinit()

    def reinit(self):
        self.state = "still"
        self.movepos = [0,0]
        if self.side == "left":
            self.rect.midleft = self.area.midleft
        elif self.side == "right":
            self.rect.midright = self.area.midright

    def update(self):
        newpos = self.rect.move(self.movepos)
        if self.area.contains(newpos):
            self.rect = newpos
        pygame.event.pump()

    def moveup(self):
        self.movepos[1] = self.movepos[1] - (self.speed)
        self.state = "moveup"

    def movedown(self):
        self.movepos[1] = self.movepos[1] + (self.speed)
        self.state = "movedown"

Como puedes ver, esta clase es muy similar en estructura a la clase de la pelota, pero hay diferencias en lo que hace cada función. En primer lugar, hay una función "reinit", que es utilizada cuando una ronda finaliza y el bate debe volver a su lugar de inicio con cualquier atributo establecido de vuelta a sus valores necesarios. A continuación, la forma en que se mueve el bate es un poco más compleja que con la pelota, porque acá su movimiento es simple (arriba/abajo), pero depende de que el usuario le diga que se mueva, a diferencia de la pelota que simplemente sigue moviéndose en cada cuadro. Para entender cómo se mueve el bate, es útil mirar brevemente un diagrama para mostrar la secuencia de eventos:

.. image:: tom_event-flowchart.png

Lo que sucede aquí es que la persona controlando el bate presional la tecla que mueve el bate hacia arriba. Para cada interación de el bucle principal del juego (para cada cuadro), si la tecla sigue presionada, entonces el atributo state de ese objeto de bate se establecerá en "moviendose" y se llamará a la función moveup, lo que hará que la posición 'y' de la pelota se reduzca por el valor de atributo speed (en este ejemplo, 10). En otras palabras, mientras la tecla se mantenga presionada, el bate se moverá hacia arriba de la pantalla en 10 píxeles por cuadro. El atributo state no se utiliza aquí, pero es útil saberlo si estás tratando con giros o si deseas obtener alguna salida de depuración útil.

Tan pronto como el jugador suelte la tecla, se invoca el segundo conjunto de cajas y el atributo state del objeto de bate se establecerá de nuevo en "still" y el atributo movepos volverá a establecerse en [0,0], lo que significa que cuando se llame a la función update, ya no movera el bate. Así que cuando el jugador suelta la tecla, el bate se detiene. ¡Simple!

5.1.1. Digresión 3: Eventos de Pygame

Entonces, ¿cómo sabemos cuándo el jugador está presionando teclas y luego las suelta? ¡Con el sistema de cola de eventos de Pygame, tontuelo! Es un sistema realmente fácil de usar y entender, así que esto no debería llevar mucho tiempo :) Ya has visto la cola de eventos en acción en el programa básico de Pygame, donde se usó para verificar si el usuario estaba cerrando la aplicación. El código para mover el bate es tan simple como eso:

for event in pygame.event.get():
    if event.type == QUIT:
        return
    elif event.type == KEYDOWN:
        if event.key == K_UP:
            player.moveup()
        if event.key == K_DOWN:
            player.movedown()
    elif event.type == KEYUP:
        if event.key == K_UP or event.key == K_DOWN:
            player.movepos = [0,0]
            player.state = "still"

Aquí se asume que ya has creado una instancia de un bate y has llamado al objeto player. Podés ver el familiar diseño de la estrictura for, que itera a través de cada evento encontrado en la cola de eventos de Pygame, que se recupera con la función event.get(). A medida que el usuario presiona teclas, pulsa botones del ratón y mueve el joystick, esas acciones se bombean en la cola de eventos de Pygame, y se dejan allí hasta que se traten. Así que en cada iteración del bucle principal del juego, se pasa por estos eventos, comprobando si son los que se desean tratar, y luego tratándolos adecuadamente. La función event.pump() que estaba en la función Bat.update se llama entonces en cada iteración para eliminar los eventos antiguos y mantener la cola actual.

Primero verificamos si el usuario está saliendo del programa, y lo cerramos si es así. Luego verificamos si se está presionando alguna tecla, y si lo están, verificamos si son las teclas designadas para mover la paleta hacia arriba y hacia abajo. Si lo son, llamamos a la función de movimiento correspondiente y establecemos el estado del jugador adecuadamente (aunque los estados moveup (moverarriba) y movedown (moverabajo) se cambian en las funciones moveup() y movedown(), lo que hace que el código sea más ordenado y no rompe la encapsulación, lo que significa que se asignan atributos al objeto en sí, sin referirse al nombre de la instancia de ese objeto). Aquí notamos que tenemos tres estados: still (quieto), moveup (moverarriba), movedown (moverabajo). De nuevo, estos son útiles si se quiere depurar o calular giros, efectos de rotación. También verificamos si alguna tecla ha sido "soltada" (es decir, que ya no está siendo presionada), y nuevamente, si son las teclas correctas, detenemos el movimiento del bate.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.8321288 pygame-2.6.1/docs/generated/es/tutorials/tom_juegos6.html0000644000175100001770000014515414676242432023105 0ustar00runnerdocker Juntando Todo — pygame v2.6.1 documentation

1. Juntando todo

Hasta ahora has aprendido todo lo básico necesario para construir un juego simple. Estás en condiciones de entender cómo crear objetos de Pygame, cómo Pygame muestra objetos, cómo maneja eventos y cómo pódes usar física para introducir algo de movimiento en tu juego. Ahora simplemente te mostraré cómo podés tomar todas esas partes de código y juntarlas en un juego funcional. Lo que necesitamos primero es permitir que la pelota golpee los lados de la pantalla, y que la paleta pueda golpear la pelota, de lo contrario no habrá mucho juego involucrado. Hacemos esto utilizando los métodos de colisión de Pygame: collision.

6.1. Dejá que la pelota golpee los lados

El principio básico para hacer que rebote en los lados es fácil de comprender. Se obtienen las coordenadas de las cuatro esquinas de la pelota y se comprueba si corresponden con la coordenada x o y del borde de la pantalla. Por lo tanto, si la esquina superior derecha e izquierda tienen una coordenada 'y' de cero, sabés que la pelota está actualmente en el borde superior de la pantalla. Se hace todo esto en la función update, despue´s de haber calculado la nueva posición de la pelota.

if not self.area.contains(newpos):
      tl = not self.area.collidepoint(newpos.topleft)
      tr = not self.area.collidepoint(newpos.topright)
      bl = not self.area.collidepoint(newpos.bottomleft)
      br = not self.area.collidepoint(newpos.bottomright)
      if tr and tl or (br and bl):
              angle = -angle
      if tl and bl:
              self.offcourt(player=2)
      if tr and br:
              self.offcourt(player=1)

self.vector = (angle,z)

Aquí comprobamos si el area contiene la nueva posición de la bola (lo que siempre debería ser así, por lo que no necesitamos una cláusula else, aunque en otras circunstancias podríamos considerarla). Luego verificamos si las coordenadas de las cuatro esquinas están colisionando con los bordes del área, y creamos objetos para cada resultado. Si lo están, los objetos tendrán un valor de 1 o True. Si no, el valor será None o False. Luego verificamos si ha chocado con la parte superior o inferior, y si lo ha hecho, cambiamos la dirección de la pelota. Afortunadamente, usando radianes podemos hacer esto simplemente invirtiendo su valor positivo/negativo. También comprobamos si la bola se ha salido de los lados, y si lo ha hecho, llamamos a la función offcourt. En mi juego, esto reinicia la bola, agrega 1 punto al puntaje del jugador especificado al llamar la función y muestra el nuevo puntaje.

Finalmente, recompilamos el vector en función del nuevo ángulo. Y eso es todo. La pelota ahora rebotará felizmente en las paredes y saldrá de la cancha con gracia.

6.2. Let the ball hit bats

Hacer que la pelota golpee los bates es muy similar a hacer que golpee los lados de la pantalla. Todavía usamos el método de colisión. Todavía usamos el método de colisión, pero esta vez comprobamos si los rectángulos de la pelota y cualquiera de los bates colisionan. En este código también he agregado código adicional para evitar errores. Descubrirás que tendrás que poner todo tipo de código adicional para evitar errores y problemas, así que es bueno acostumbrarse a verlo.

else:
    # Desinflar los rectángulos para que no quede la pelota detrás del bate
    player1.rect.inflate(-3, -3)
    player2.rect.inflate(-3, -3)

    # ¿Colisionan la pelota y el bate?
    # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente
    # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del
    # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él.
    # De esta manera, la pelota siempre puede escapar y rebotar limpiamente.
    if self.rect.colliderect(player1.rect) == 1 and not self.hit:
        angle = math.pi - angle
        self.hit = not self.hit
    elif self.rect.colliderect(player2.rect) == 1 and not self.hit:
        angle = math.pi - angle
        self.hit = not self.hit
    elif self.hit:
        self.hit = not self.hit
self.vector = (angle,z)

Comenzamos esta sección con una declaración else, porque esto continúa desde el fragmento de código anterior, para comprobar si la pelota golpea los lados. Tiene sentido que si no golpea los lados, podría golpear el bate, por lo que continuamos con la declaración condicional. El primer error a corregir es reducir el tamaño de los rectángulos de los jugadores en 3 píxeles en ambas dimensiones, para evitar que el bate atrape una pelota que pasa detrás de ellos (si imaginás que simplemente mueve el bate para que la pelota viaje detrás de él, los rectángulos se superponen, y normalmente la pelota habría sido "golepada" - esto lo evita)

A continuación, comprobamos si los rectángulos colisionan, con una corrección adicional de errores. Observá que he comentado sobre estas partes extrañas del código: siempre es bueno explicar las partes del código que son anormales, tanto para otros que miran tu código, como para que lo entiendas cuando regreses a él. Sin la corrección, la pelota podría golpear una esquina del bate, cambiar la dirección, y un cuadro después, aún encontrarse dentro del bate. Luego, volvería a pensar que ha sido golpeada, y cambiaría su dirección. Esto puede suceder varias veces, haciendo que el movimiento de la pelota sea completamente irreal. Por lo tanto, tenemos una variable, self.hit, que la establecemos en True cuando ha sido golpeada y False un cuadro después. Cuando comprobamos si los rectángulos han colisionado, también verificamos si self.hit es True/False, para evitar rebotes internos.

El código importante aquí es bastante fácil de entender. Todos los rectángulos tienen una función colliderect, en la que alimentas el rectángulo de otro objeto y devuelve True si los rectángulos se superpone, y False si no lo hacen. Si se superponen, podemos cambiar la dirección restando el ángulo actual de pi (de nuevo, un truco útil que podés hacer con radianes, que ajustará el ángulo en 90 grados y lo enviará en la dirección correcta; podrías encontrar en este punto que es necesario una comprensión detallada de radianes.) Solo para terminar la comprobación de errores, cambiamos self.hit de vuelta a False si es el cuadro por le cual fueron golpeados.

También volvemos a compilar el vector. Por supuesto, querrás eliminar la misma línea en el fragmento de código anterior, para que solo lo hagas una vez después de la declaración condicional if-else. ¡Y eso es todo! El código combinado ahora permitirá que la pelota golpee los lados y los bates.

6.3. El producto final

El producto final, con todos los fragmentos de código unidos, así como algunos otros fragmentos de código pegados juntos, se verá así:

#
# Tom's Pong
# A simple pong game with realistic physics and AI
# http://www.tomchance.uklinux.net/projects/pong.shtml
#
# Released under the GNU General Public License

VERSION = "0.4"

try:
    import sys
    import random
    import math
    import os
    import getopt
    import pygame
    from socket import *
    from pygame.locals import *
except ImportError, err:
    print(f"couldn't load module. {err}")
    sys.exit(2)

def load_png(name):
    """ Load image and return image object"""
    fullname = os.path.join("data", name)
    try:
        image = pygame.image.load(fullname)
        if image.get_alpha is None:
            image = image.convert()
        else:
            image = image.convert_alpha()
    except FileNotFoundError:
        print(f"Cannot load image: {fullname}")
        raise SystemExit
    return image, image.get_rect()

class Ball(pygame.sprite.Sprite):
    """A ball that will move across the screen
    Returns: ball object
    Functions: update, calcnewpos
    Attributes: area, vector"""

    def __init__(self, (xy), vector):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("ball.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.vector = vector
        self.hit = 0

    def update(self):
        newpos = self.calcnewpos(self.rect,self.vector)
        self.rect = newpos
        (angle,z) = self.vector

        if not self.area.contains(newpos):
            tl = not self.area.collidepoint(newpos.topleft)
            tr = not self.area.collidepoint(newpos.topright)
            bl = not self.area.collidepoint(newpos.bottomleft)
            br = not self.area.collidepoint(newpos.bottomright)
            if tr and tl or (br and bl):
                angle = -angle
            if tl and bl:
                #self.offcourt()
                angle = math.pi - angle
            if tr and br:
                angle = math.pi - angle
                #self.offcourt()
        else:
            # Desinflar los rectángulos para que no quede la pelota detrás del bate
            player1.rect.inflate(-3, -3)
            player2.rect.inflate(-3, -3)

            # ¿Colisionan la pelota y el bate?
            # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente
            # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del
            # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él.
            # De esta manera, la pelota siempre puede escapar y rebotar limpiamente.
            if self.rect.colliderect(player1.rect) == 1 and not self.hit:
                angle = math.pi - angle
                self.hit = not self.hit
            elif self.rect.colliderect(player2.rect) == 1 and not self.hit:
                angle = math.pi - angle
                self.hit = not self.hit
            elif self.hit:
                self.hit = not self.hit
        self.vector = (angle,z)

    def calcnewpos(self,rect,vector):
        (angle,z) = vector
        (dx,dy) = (z*math.cos(angle),z*math.sin(angle))
        return rect.move(dx,dy)

class Bat(pygame.sprite.Sprite):
    """Movable tennis 'bat' with which one hits the ball
    Returns: bat object
    Functions: reinit, update, moveup, movedown
    Attributes: which, speed"""

    def __init__(self, side):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("bat.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.side = side
        self.speed = 10
        self.state = "still"
        self.reinit()

    def reinit(self):
        self.state = "still"
        self.movepos = [0,0]
        if self.side == "left":
            self.rect.midleft = self.area.midleft
        elif self.side == "right":
            self.rect.midright = self.area.midright

    def update(self):
        newpos = self.rect.move(self.movepos)
        if self.area.contains(newpos):
            self.rect = newpos
        pygame.event.pump()

    def moveup(self):
        self.movepos[1] = self.movepos[1] - (self.speed)
        self.state = "moveup"

    def movedown(self):
        self.movepos[1] = self.movepos[1] + (self.speed)
        self.state = "movedown"


def main():
    # Initializar pantalla
    pygame.init()
    screen = pygame.display.set_mode((640, 480))
    pygame.display.set_caption("Basic Pong")

    # Llenar fondo
    background = pygame.Surface(screen.get_size())
    background = background.convert()
    background.fill((0, 0, 0))

    # Initializar jugadores
    global player1
    global player2
    player1 = Bat("left")
    player2 = Bat("right")

    # Initializar pelota
    speed = 13
    rand = ((0.1 * (random.randint(5,8))))
    ball = Ball((0,0),(0.47,speed))

    # Initializar sprites
    playersprites = pygame.sprite.RenderPlain((player1, player2))
    ballsprite = pygame.sprite.RenderPlain(ball)

    # Blittear todo en la pantalla
    screen.blit(background, (0, 0))
    pygame.display.flip()

    # Initializar reloj
    clock = pygame.time.Clock()

    # Bucle de eventos
    while True:
        # Make sure game doesn't run at more than 60 frames per second
        clock.tick(60)

        for event in pygame.event.get():
            if event.type == QUIT:
                return
            elif event.type == KEYDOWN:
                if event.key == K_a:
                    player1.moveup()
                if event.key == K_z:
                    player1.movedown()
                if event.key == K_UP:
                    player2.moveup()
                if event.key == K_DOWN:
                    player2.movedown()
            elif event.type == KEYUP:
                if event.key == K_a or event.key == K_z:
                    player1.movepos = [0,0]
                    player1.state = "still"
                if event.key == K_UP or event.key == K_DOWN:
                    player2.movepos = [0,0]
                    player2.state = "still"

        screen.blit(background, ball.rect, ball.rect)
        screen.blit(background, player1.rect, player1.rect)
        screen.blit(background, player2.rect, player2.rect)
        ballsprite.update()
        playersprites.update()
        ballsprite.draw(screen)
        playersprites.draw(screen)
        pygame.display.flip()


if __name__ == "__main__":
    main()

Además de mostrar el producto final, señalaré de vuelta a TomPong, en el cual se basa todo esto. Descargalo, échale un vistazo al código fuente y verás una implementación de pong utilizando todo el código que has visto en este tutorial, así como también un montón de otros códigos que he agregado en varias versiones, como física adicional para girar y varias otras correcciones de errores y fallas.

Ah, TomPong se encuentra en http://www.tomchance.uklinux.net/projects/pong.shtml.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.0961404 pygame-2.6.1/docs/generated/filepaths.html0000644000175100001770000001424214676242422020156 0ustar00runnerdocker File Path Function Arguments — pygame v2.6.1 documentation

A pygame function or method which takes a file path argument will accept either a Unicode or a byte (8-bit or ASCII character) string. Unicode strings are translated to Python's default filesystem encoding, as returned by sys.getfilesystemencoding(). A Unicode code point above U+FFFF (\uFFFF) can be coded directly with a 32-bit escape sequences (\Uxxxxxxxx), even for Python interpreters built with an UCS-2 (16-bit character) Unicode type. Byte strings are passed to the operating system unchanged.

Null characters (\x00) are not permitted in the path, raising an exception. An exception is also raised if an Unicode file path cannot be encoded. How UTF-16 surrogate codes are handled is Python-interpreter-dependent. Use UTF-32 code points and 32-bit escape sequences instead. The exception types are function-dependent.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612182.0591366 pygame-2.6.1/docs/generated/genindex.html0000644000175100001770000035504214676242426020012 0ustar00runnerdocker Index — pygame v2.6.1 documentation

Index

_ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W

_

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.1681404 pygame-2.6.1/docs/generated/index.html0000644000175100001770000005760114676242422017314 0ustar00runnerdocker Pygame Front Page — pygame v2.6.1 documentation

Pygame Front Page

Quick start

Welcome to pygame! Once you've got pygame installed (pip install pygame or pip3 install pygame for most people), the next question is how to get a game loop running. Pygame, unlike some other libraries, gives you full control of program execution. That freedom means it is easy to mess up in your initial steps.

Here is a good example of a basic setup (opens the window, updates the screen, and handles events)--

# Example file showing a basic pygame "game loop"
import pygame

# pygame setup
pygame.init()
screen = pygame.display.set_mode((1280, 720))
clock = pygame.time.Clock()
running = True

while running:
    # poll for events
    # pygame.QUIT event means the user clicked X to close your window
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # fill the screen with a color to wipe away anything from last frame
    screen.fill("purple")

    # RENDER YOUR GAME HERE

    # flip() the display to put your work on screen
    pygame.display.flip()

    clock.tick(60)  # limits FPS to 60

pygame.quit()

Here is a slightly more fleshed out example, which shows you how to move something (a circle in this case) around on screen--

# Example file showing a circle moving on screen
import pygame

# pygame setup
pygame.init()
screen = pygame.display.set_mode((1280, 720))
clock = pygame.time.Clock()
running = True
dt = 0

player_pos = pygame.Vector2(screen.get_width() / 2, screen.get_height() / 2)

while running:
    # poll for events
    # pygame.QUIT event means the user clicked X to close your window
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # fill the screen with a color to wipe away anything from last frame
    screen.fill("purple")

    pygame.draw.circle(screen, "red", player_pos, 40)

    keys = pygame.key.get_pressed()
    if keys[pygame.K_w]:
        player_pos.y -= 300 * dt
    if keys[pygame.K_s]:
        player_pos.y += 300 * dt
    if keys[pygame.K_a]:
        player_pos.x -= 300 * dt
    if keys[pygame.K_d]:
        player_pos.x += 300 * dt

    # flip() the display to put your work on screen
    pygame.display.flip()

    # limits FPS to 60
    # dt is delta time in seconds since last frame, used for framerate-
    # independent physics.
    dt = clock.tick(60) / 1000

pygame.quit()

For more in depth reference, check out the Tutorials section below, check out a video tutorial (I'm a fan of this one), or reference the API documentation by module.

Documents

Readme

Basic information about pygame: what it is, who is involved, and where to find it.

Install

Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system.

File Path Function Arguments

How pygame handles file system paths.

Pygame Logos

The logos of Pygame in different resolutions.

LGPL License

This is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program.

Tutorials

Introduction to Pygame

An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine.

Import and Initialize

The beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms.

How do I move an Image?

A basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated.

Chimp Tutorial, Line by Line

The pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example.

Sprite Module Introduction

Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used.

Surfarray Introduction

Pygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py.

Camera Module Introduction

Pygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases.

Newbie Guide

A list of thirteen helpful tips for people to get comfortable using pygame.

Making Games Tutorial

A large tutorial that covers the bigger topics needed to create an entire game.

Display Modes

Getting a display surface for the screen.

한국어 튜토리얼 (Korean Tutorial)

빨간블록 검은블록

Reference

Index

A list of all functions, classes, and methods in the pygame package.

pygame.BufferProxy

An array protocol view of surface pixels

pygame.Color

Color representation.

pygame.cursors

Loading and compiling cursor images.

pygame.display

Configure the display surface.

pygame.draw

Drawing simple shapes like lines and ellipses to surfaces.

pygame.event

Manage the incoming events from various input devices and the windowing platform.

pygame.examples

Various programs demonstrating the use of individual pygame modules.

pygame.font

Loading and rendering TrueType fonts.

pygame.freetype

Enhanced pygame module for loading and rendering font faces.

pygame.gfxdraw

Anti-aliasing draw functions.

pygame.image

Loading, saving, and transferring of surfaces.

pygame.joystick

Manage the joystick devices.

pygame.key

Manage the keyboard device.

pygame.locals

Pygame constants.

pygame.mixer

Load and play sounds

pygame.mouse

Manage the mouse device and display.

pygame.mixer.music

Play streaming music tracks.

pygame

Top level functions to manage pygame.

pygame.PixelArray

Manipulate image pixel data.

pygame.Rect

Flexible container for a rectangle.

pygame.scrap

Native clipboard access.

pygame.sndarray

Manipulate sound sample data.

pygame.sprite

Higher level objects to represent game images.

pygame.Surface

Objects for images and the screen.

pygame.surfarray

Manipulate image pixel data.

pygame.tests

Test pygame.

pygame.time

Manage timing and framerate.

pygame.transform

Resize and move images.

pygame C API

The C api shared amongst pygame extension modules.

Search Page

Search pygame documents by keyword.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.1811404 pygame-2.6.1/docs/generated/logos.html0000644000175100001770000001622514676242422017325 0ustar00runnerdocker Pygame Logos Page — pygame v2.6.1 documentation

Pygame Logos

These logos are available for use in your own game projects. Please put them up wherever you see fit. The logo was created by TheCorruptor on July 29, 2001 and upscaled by Mega_JC on August 29, 2021.

There is a higher resolution layered photoshop image available here. (1.3 MB)

Legacy logos

legacy_logos.zip - 50.1 KB




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612182.1521366 pygame-2.6.1/docs/generated/objects.inv0000644000175100001770000002271514676242426017470 0ustar00runnerdocker# Sphinx inventory version 2 # Project: pygame # Version: 2.6.1 # The remainder of this file is compressed using zlib. xڽ}[8{ -v~12s+]Y= ? Ň~ڇb< /޵YL@cvl̋.DJab0"_|ϽmwߋHݠ'yom3`.>\>v&d[euE2ĈVuU$bET>W+T',EVrFn`&AA!p\eUS0pUuTAƑ.jd ԯPl`{IK+a,nmPtLHPN1HD)*Xz:/OD95(*} uQCJ`pW6E%QlB6a+ĚvE-jܡR4 u-LTw :%i܄p֦47.O-g6mukX%>ORkF'Xr vi=GٺJ(?RT1r4S"CO"Mth.':G ljOu1* xO\]JjCh!_)4b2J@YLO,I/0*/+GvɐjIr ֘mYoJVt[I=4*e^*預ύ?uMpU"D?fE *8y~sK-mw;.MmN*!o+}ODH9Qj: ϓ-zGꚂr9O#q'fP/hD>fZSDR(EX>:9\t4gI QVHqr+ <+-PWmG+os^$Гh sSդUEU5 pFG|뗷 d̈́,M؏%%`29 8%]\_ѿ.S gMӱh F(W!7LR 6cz?`жp!+h<XJ{0:;|^n4%dw:21|Yl(l&t(1J@ObV^qW&.d!g_@%Vh(YEj77xUIHUr)>ҽ,ê1 S벨1Mbd׭&jXj*LUO*KPiCİ],[Q fb8=M-P >WؕߦEI#" y:*]Ty X(\&i"F"v-]qT"N8[͙mvm(#jF҂ؙ4W{e KUTl7$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~שWJ5l#} Python Module Index — pygame v2.6.1 documentation

Python Module Index

. | p
 
.
    pygame._sdl2.controller pygame module to work with controllers
    pygame._sdl2.touch pygame module to work with touch input
    pygame._sdl2.video Experimental pygame module for porting new SDL video systems
    pygame.camera pygame module for camera use
    pygame.cdrom pygame module for audio cdrom control
    pygame.cursors pygame module for cursor resources
    pygame.display pygame module to control the display window and screen
    pygame.draw pygame module for drawing shapes
    pygame.event pygame module for interacting with events and queues
    pygame.examples module of example programs
    pygame.fastevent pygame module for interacting with events and queues from multiple threads.
    pygame.font pygame module for loading and rendering fonts
    pygame.freetype Enhanced pygame module for loading and rendering computer fonts
    pygame.gfxdraw pygame module for drawing shapes
    pygame.image pygame module for loading and saving images
    pygame.joystick Pygame module for interacting with joysticks, gamepads, and trackballs.
    pygame.key pygame module to work with the keyboard
    pygame.locals pygame constants
    pygame.mask pygame module for image masks.
    pygame.math pygame module for vector classes
    pygame.midi pygame module for interacting with midi input and output.
    pygame.mixer pygame module for loading and playing sounds
    pygame.mixer.music pygame module for controlling streamed audio
    pygame.mouse pygame module to work with the mouse
    pygame.pixelcopy pygame module for general pixel array copying
    pygame.scrap pygame module for clipboard support.
    pygame.sndarray pygame module for accessing sound sample data
    pygame.sprite pygame module with basic game object classes
    pygame.surfarray pygame module for accessing surface pixel data using array interfaces
    pygame.tests Pygame unit test suite package
    pygame.time pygame module for monitoring time
    pygame.transform pygame module to transform surfaces
    pygame.version small module containing version information
 
p
pygame the top level pygame package
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0281258 pygame-2.6.1/docs/generated/ref/0000755000175100001770000000000014676242436016067 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.2131402 pygame-2.6.1/docs/generated/ref/bufferproxy.html0000644000175100001770000004165214676242422021333 0ustar00runnerdocker pygame.BufferProxy — pygame v2.6.1 documentation
pygame.BufferProxy
pygame object to export a surface buffer through an array protocol
BufferProxy(<parent>) -> BufferProxy
Return wrapped exporting object.
The size, in bytes, of the exported buffer.
A copy of the exported buffer as a single block of bytes.
Write raw bytes to object buffer.

BufferProxy is a pygame support type, designed as the return value of the Surface.get_buffer() and Surface.get_view() methods. For all Python versions a BufferProxy object exports a C struct and Python level array interface on behalf of its parent object's buffer. A new buffer interface is also exported. In pygame, BufferProxy is key to implementing the pygame.surfarraypygame module for accessing surface pixel data using array interfaces module.

BufferProxy instances can be created directly from Python code, either for a parent that exports an interface, or from a Python dict describing an object's buffer layout. The dict entries are based on the Python level array interface mapping. The following keys are recognized:

"shape"tuple

The length of each array dimension as a tuple of integers. The length of the tuple is the number of dimensions in the array.

"typestr"string

The array element type as a length 3 string. The first character gives byteorder, '<' for little-endian, '>' for big-endian, and '|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, "<u4" is an unsigned 4 byte little-endian integer, such as a 32 bit pixel on a PC, while "|V3" would represent a 24 bit pixel, which has no integer equivalent.

"data"tuple

The physical buffer start address and a read-only flag as a length 2 tuple. The address is an integer value, while the read-only flag is a bool—False for writable, True for read-only.

"strides"tuple(optional)

Array stride information as a tuple of integers. It is required only of non C-contiguous arrays. The tuple length must match that of "shape".

"parent"object(optional)

The exporting object. It can be used to keep the parent object alive while its buffer is visible.

"before"callable(optional)

Callback invoked when the BufferProxy instance exports the buffer. The callback is given one argument, the "parent" object if given, otherwise None. The callback is useful for setting a lock on the parent.

"after"callable(optional)

Callback invoked when an exported buffer is released. The callback is passed on argument, the "parent" object if given, otherwise None. The callback is useful for releasing a lock on the parent.

The BufferProxy class supports subclassing, instance variables, and weak references.

New in pygame 1.8.0.

Extended in pygame 1.9.2.

parent
Return wrapped exporting object.
parent -> Surface
parent -> <parent>

The Surface which returned the BufferProxy object or the object passed to a BufferProxy call.

length
The size, in bytes, of the exported buffer.
length -> int

The number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the Py_buffer C struct len field.

raw
A copy of the exported buffer as a single block of bytes.
raw -> bytes

The buffer data as a str/bytes object. Any gaps in the exported data are removed.

write()
Write raw bytes to object buffer.
write(buffer, offset=0)

Overwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument buffer is a str/bytes object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's length value, an IndexException is raised. If len(buffer) > proxy.length + offset, a ValueError is raised.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.2551403 pygame-2.6.1/docs/generated/ref/camera.html0000644000175100001770000006375714676242422020222 0ustar00runnerdocker pygame.camera — pygame v2.6.1 documentation
pygame.camera
pygame module for camera use
Module init
Get the backends supported on this system
Surface colorspace conversion
returns a list of available cameras
load a camera

Note

Use import pygame.camera before using this module.

Pygame currently supports Linux (V4L2) and Windows (MSMF) cameras natively, with wider platform support available via an integrated OpenCV backend.

New in pygame 2.0.2: Windows native camera support

New in pygame 2.0.3: New OpenCV backends

EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code will very likely break with the next pygame release.

The Bayer to RGB function is based on:

Sonix SN9C101 based webcam basic I/F routines
Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

New in pygame 1.9.0.

pygame.camera.init()
Module init
init(backend = None) -> None

This function starts up the camera module, choosing the best webcam backend it can find for your system. This is not guaranteed to succeed, and may even attempt to import third party modules, like OpenCV. If you want to override its backend choice, you can call pass the name of the backend you want into this function. More about backends in get_backends().

Changed in pygame 2.0.3: Option to explicitly select backend

pygame.camera.get_backends()
Get the backends supported on this system
get_backends() -> [str]

This function returns every backend it thinks has a possibility of working on your system, in order of priority.

pygame.camera Backends:

Backend           OS        Description
---------------------------------------------------------------------------------
_camera (MSMF)    Windows   Builtin, works on Windows 8+ Python3
_camera (V4L2)    Linux     Builtin
OpenCV            Any       Uses `opencv-python` module, can't enumerate cameras
OpenCV-Mac        Mac       Same as OpenCV, but has camera enumeration
VideoCapture      Windows   Uses abandoned `VideoCapture` module, can't enumerate
                            cameras, may be removed in the future

There are two main differences among backends.

The _camera backends are built in to pygame itself, and require no third party imports. All the other backends do. For the OpenCV and VideoCapture backends, those modules need to be installed on your system.

The other big difference is "camera enumeration." Some backends don't have a way to list out camera names, or even the number of cameras on the system. In these cases, list_cameras() will return something like [0]. If you know you have multiple cameras on the system, these backend ports will pass through a "camera index number" through if you use that as the device parameter.

New in pygame 2.0.3.

pygame.camera.colorspace()
Surface colorspace conversion
colorspace(Surface, format, DestSurface = None) -> Surface

Allows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, transform.scale() it even smaller, and then convert the colorspace to YUV or HSV before doing any processing on it.

pygame.camera.list_cameras()
returns a list of available cameras
list_cameras() -> [cameras]

Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into pygame.camera.Cameraload a camera.

If the camera backend doesn't support webcam enumeration, this will return something like [0]. See get_backends() for much more information.

pygame.camera.Camera
load a camera
Camera(device, (width, height), format) -> Camera
opens, initializes, and starts capturing
stops, uninitializes, and closes the camera
gets current values of user controls
changes camera settings if supported by the camera
returns the dimensions of the images being recorded
checks if a frame is ready
captures an image as a Surface
returns an unmodified image as bytes

Loads a camera. On Linux, the device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is RGB. The following are supported:

  • RGB - Red, Green, Blue

  • YUV - Luma, Blue Chrominance, Red Chrominance

  • HSV - Hue, Saturation, Value

start()
opens, initializes, and starts capturing
start() -> None

Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used.

stop()
stops, uninitializes, and closes the camera
stop() -> None

Stops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again.

get_controls()
gets current values of user controls
get_controls() -> (hflip = bool, vflip = bool, brightness)

If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct.

set_controls()
changes camera settings if supported by the camera
set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)

Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. On Windows, hflip and vflip are implemented by pygame, not by the Camera, so they should always work, but brightness is unsupported.

get_size()
returns the dimensions of the images being recorded
get_size() -> (width, height)

Returns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size.

query_image()
checks if a frame is ready
query_image() -> bool

If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). On Windows (MSMF), and the OpenCV backends, query_image() should be reliable, though. This is useful to separate the framerate of the game from that of the camera without having to use threading.

get_image()
captures an image as a Surface
get_image(Surface = None) -> Surface

Pulls an image off of the buffer as an RGB Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is 24 bits on Linux, 32 bits on Windows, or the same as the optionally supplied Surface.

get_raw()
returns an unmodified image as bytes
get_raw() -> bytes

Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. This returns a bytes object




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.2921402 pygame-2.6.1/docs/generated/ref/cdrom.html0000644000175100001770000007730614676242422020071 0ustar00runnerdocker pygame.cdrom — pygame v2.6.1 documentation
pygame.cdrom
pygame module for audio cdrom control
initialize the cdrom module
uninitialize the cdrom module
true if the cdrom module is initialized
number of cd drives on the system
class to manage a cdrom drive

Warning

This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. One alternative for python cdrom functionality is pycdio.

The cdrom module manages the CD and DVD drives on a computer. It can also control the playback of audio CDs. This module needs to be initialized before it can do anything. Each CD object you create represents a cdrom drive and must also be initialized individually before it can do most things.

pygame.cdrom.init()
initialize the cdrom module
init() -> None

Initialize the cdrom module. This will scan the system for all CD devices. The module must be initialized before any other functions will work. This automatically happens when you call pygame.init().

It is safe to call this function more than once.

pygame.cdrom.quit()
uninitialize the cdrom module
quit() -> None

Uninitialize the cdrom module. After you call this any existing CD objects will no longer work.

It is safe to call this function more than once.

pygame.cdrom.get_init()
true if the cdrom module is initialized
get_init() -> bool

Test if the cdrom module is initialized or not. This is different than the CD.init() since each drive must also be initialized individually.

pygame.cdrom.get_count()
number of cd drives on the system
get_count() -> count

Return the number of cd drives on the system. When you create CD objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system.

pygame.cdrom.CD
class to manage a cdrom drive
CD(id) -> CD
initialize a cdrom drive for use
uninitialize a cdrom drive for use
true if this cd device initialized
start playing audio
stop audio playback
temporarily stop audio playback
unpause audio playback
eject or open the cdrom drive
the index of the cdrom drive
the system name of the cdrom drive
true if the drive is playing audio
true if the drive is paused
the current audio playback position
False if a cdrom is in the drive
the number of tracks on the cdrom
true if the cdrom track has audio data
get all track information
start time of a cdrom track
length of a cdrom track

You can create a CD object for each cdrom on the system. Use pygame.cdrom.get_count() to determine how many drives actually exist. The id argument is an integer of the drive, starting at zero.

The CD object is not initialized, you can only call CD.get_id() and CD.get_name() on an uninitialized drive.

It is safe to create multiple CD objects for the same drive, they will all cooperate normally.

init()
initialize a cdrom drive for use
init() -> None

Initialize the cdrom drive for use. The drive must be initialized for most CD methods to work. Even if the rest of pygame has been initialized.

There may be a brief pause while the drive is initialized. Avoid CD.init() if the program should not stop for a second or two.

quit()
uninitialize a cdrom drive for use
quit() -> None

Uninitialize a drive for use. Call this when your program will not be accessing the drive for awhile.

get_init()
true if this cd device initialized
get_init() -> bool

Test if this CDROM device is initialized. This is different than the pygame.cdrom.init() since each drive must also be initialized individually.

play()
start playing audio
play(track, start=None, end=None) -> None

Playback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played.

If you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc.

See the CD.get_numtracks() and CD.get_track_audio() to find tracks to playback.

Note, track 0 is the first track on the CD. Track numbers start at zero.

stop()
stop audio playback
stop() -> None

Stops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio.

pause()
temporarily stop audio playback
pause() -> None

Temporarily stop audio playback on the CD. The playback can be resumed at the same point with the CD.resume() method. If the CD is not playing this method does nothing.

Note, track 0 is the first track on the CD. Track numbers start at zero.

resume()
unpause audio playback
resume() -> None

Unpause a paused CD. If the CD is not paused or already playing, this method does nothing.

eject()
eject or open the cdrom drive
eject() -> None

This will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped.

get_id()
the index of the cdrom drive
get_id() -> id

Returns the integer id that was used to create the CD instance. This method can work on an uninitialized CD.

get_name()
the system name of the cdrom drive
get_name() -> name

Return the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized CD.

get_busy()
true if the drive is playing audio
get_busy() -> bool

Returns True if the drive busy playing back audio.

get_paused()
true if the drive is paused
get_paused() -> bool

Returns True if the drive is currently paused.

get_current()
the current audio playback position
get_current() -> track, seconds

Returns both the current track and time of that track. This method works when the drive is either playing or paused.

Note, track 0 is the first track on the CD. Track numbers start at zero.

get_empty()
False if a cdrom is in the drive
get_empty() -> bool

Return False if there is a cdrom currently in the drive. If the drive is empty this will return True.

get_numtracks()
the number of tracks on the cdrom
get_numtracks() -> count

Return the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks.

get_track_audio()
true if the cdrom track has audio data
get_track_audio(track) -> bool

Determine if a track on a cdrom contains audio data. You can also call CD.num_tracks() and CD.get_all() to determine more information about the cdrom.

Note, track 0 is the first track on the CD. Track numbers start at zero.

get_all()
get all track information
get_all() -> [(audio, start, end, length), ...]

Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc.

get_track_start()
start time of a cdrom track
get_track_start(track) -> seconds

Return the absolute time in seconds where at start of the cdrom track.

Note, track 0 is the first track on the CD. Track numbers start at zero.

get_track_length()
length of a cdrom track
get_track_length(track) -> seconds

Return a floating point value in seconds of the length of the cdrom track.

Note, track 0 is the first track on the CD. Track numbers start at zero.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.3381402 pygame-2.6.1/docs/generated/ref/color.html0000644000175100001770000010643414676242422020076 0ustar00runnerdocker pygame.Color — pygame v2.6.1 documentation
pygame.Color
pygame object for color representations
Color(r, g, b) -> Color
Color(r, g, b, a=255) -> Color
Color(color_value) -> Color
Gets or sets the red value of the Color.
Gets or sets the green value of the Color.
Gets or sets the blue value of the Color.
Gets or sets the alpha value of the Color.
Gets or sets the CMY representation of the Color.
Gets or sets the HSVA representation of the Color.
Gets or sets the HSLA representation of the Color.
Gets or sets the I1I2I3 representation of the Color.
Returns the normalized RGBA values of the Color.
Applies a certain gamma value to the Color.
Set the number of elements in the Color to 1,2,3, or 4.
returns the grayscale of a Color
returns a linear interpolation to the given Color.
returns a Color where the r,g,b components have been multiplied by the alpha.
Sets the elements of the color

The Color class represents RGBA color values using a value range of 0 to 255 inclusive. It allows basic arithmetic operations — binary operations +, -, *, //, %, and unary operation ~ — to create new colors, supports conversions to other color spaces such as HSV or HSL and lets you adjust single color channels. Alpha defaults to 255 (fully opaque) when not given. The arithmetic operations and correct_gamma() method preserve subclasses. For the binary operators, the class of the returned color is that of the left hand color object of the operator.

Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers. There was a bug in pygame 1.8.1 where the default alpha was 0, not 255 like previously.

Color objects export the C level array interface. The interface exports a read-only one dimensional unsigned byte array of the same assigned length as the color. The new buffer interface is also exported, with the same characteristics as the array interface.

The floor division, //, and modulus, %, operators do not raise an exception for division by zero. Instead, if a color, or alpha, channel in the right hand color is 0, then the result is 0. For example:

# These expressions are True
Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3)
Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0)

Use int(color) to return the immutable integer value of the color, usable as a dict key. This integer value differs from the mapped pixel values of pygame.Surface.get_at_mapped()get the mapped color value at a single pixel, pygame.Surface.map_rgb()convert a color into a mapped color value and pygame.Surface.unmap_rgb()convert a mapped integer color value into a Color. It can be passed as a color_value argument to Color (useful with sets).

See Named Colors for samples of the available named colors.

Parameters:
  • r (int) -- red value in the range of 0 to 255 inclusive

  • g (int) -- green value in the range of 0 to 255 inclusive

  • b (int) -- blue value in the range of 0 to 255 inclusive

  • a (int) -- (optional) alpha value in the range of 0 to 255 inclusive, default is 255

  • color_value (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int])) --

    color value (see note below for the supported formats)

    Note

    Supported color_value formats:
    - Color object: clones the given Color object
    - Color name: str: name of the color to use, e.g. 'red' (all the supported name strings can be found in the Named Colors, with sample swatches)
    - HTML color format str: '#rrggbbaa' or '#rrggbb', where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided
    - hex number str: '0xrrggbbaa' or '0xrrggbb', where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided
    - int: int value of the color to use, using hex numbers can make this parameter more readable, e.g. 0xrrggbbaa, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided
    - tuple/list of int color values: (R, G, B, A) or (R, G, B), where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not provided

Returns:

a newly created Color object

Return type:

Color

Changed in pygame 2.0.0: Support for tuples, lists, and Color objects when creating Color objects.

Changed in pygame 1.9.2: Color objects export the C level array interface.

Changed in pygame 1.9.0: Color objects support 4-element tuples of integers.

Changed in pygame 1.8.1: New implementation of the class.

r
Gets or sets the red value of the Color.
r -> int

The red value of the Color.

g
Gets or sets the green value of the Color.
g -> int

The green value of the Color.

b
Gets or sets the blue value of the Color.
b -> int

The blue value of the Color.

a
Gets or sets the alpha value of the Color.
a -> int

The alpha value of the Color.

cmy
Gets or sets the CMY representation of the Color.
cmy -> tuple

The CMY representation of the Color. The CMY components are in the ranges C = [0, 1], M = [0, 1], Y = [0, 1]. Note that this will not return the absolutely exact CMY values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the CMY mapping from 0-1 rounding errors may cause the CMY values to differ slightly from what you might expect.

hsva
Gets or sets the HSVA representation of the Color.
hsva -> tuple

The HSVA representation of the Color. The HSVA components are in the ranges H = [0, 360], S = [0, 100], V = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact HSV values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the HSV mapping from 0-100 and 0-360 rounding errors may cause the HSV values to differ slightly from what you might expect.

hsla
Gets or sets the HSLA representation of the Color.
hsla -> tuple

The HSLA representation of the Color. The HSLA components are in the ranges H = [0, 360], S = [0, 100], L = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact HSL values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the HSL mapping from 0-100 and 0-360 rounding errors may cause the HSL values to differ slightly from what you might expect.

i1i2i3
Gets or sets the I1I2I3 representation of the Color.
i1i2i3 -> tuple

The I1I2I3 representation of the Color. The I1I2I3 components are in the ranges I1 = [0, 1], I2 = [-0.5, 0.5], I3 = [-0.5, 0.5]. Note that this will not return the absolutely exact I1I2I3 values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the I1I2I3 mapping from 0-1 rounding errors may cause the I1I2I3 values to differ slightly from what you might expect.

normalize()
Returns the normalized RGBA values of the Color.
normalize() -> tuple

Returns the normalized RGBA values of the Color as floating point values.

correct_gamma()
Applies a certain gamma value to the Color.
correct_gamma (gamma) -> Color

Applies a certain gamma value to the Color and returns a new Color with the adjusted RGBA values.

set_length()
Set the number of elements in the Color to 1,2,3, or 4.
set_length(len) -> None

DEPRECATED: You may unpack the values you need like so, r, g, b, _ = pygame.Color(100, 100, 100) If you only want r, g and b Or r, g, *_ = pygame.Color(100, 100, 100) if you only want r and g

The default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do len(acolor).

Deprecated since pygame 2.1.3.

New in pygame 1.9.0.

grayscale()
returns the grayscale of a Color
grayscale() -> Color

Returns a Color which represents the grayscaled version of self using the luminosity formula which weights red, green and blue according to their wavelengths..

lerp()
returns a linear interpolation to the given Color.
lerp(Color, float) -> Color

Returns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned.

New in pygame 2.0.1.

premul_alpha()
returns a Color where the r,g,b components have been multiplied by the alpha.
premul_alpha() -> Color

Returns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged.

This is useful when working with the BLEND_PREMULTIPLIED blending mode flag for pygame.Surface.blit()draw one image onto another, which assumes that all surfaces using it are using pre-multiplied alpha colors.

New in pygame 2.0.0.

update()
Sets the elements of the color
update(r, g, b) -> None
update(r, g, b, a=255) -> None
update(color_value) -> None

Sets the elements of the color. See parameters for pygame.Color()pygame object for color representations for the parameters of this function. If the alpha value was not set it will not change.

New in pygame 2.0.1.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.5051403 pygame-2.6.1/docs/generated/ref/color_list.html0000644000175100001770000052412714676242423021135 0ustar00runnerdocker Named Colors — pygame v2.6.1 documentation

pygame.Colorpygame object for color representations lets you specify any of these named colors when creating a new pygame.Color (taken from the colordict module).

Name

Color

aliceblue

████████

antiquewhite

████████

antiquewhite1

████████

antiquewhite2

████████

antiquewhite3

████████

antiquewhite4

████████

aqua

████████

aquamarine

████████

aquamarine1

████████

aquamarine2

████████

aquamarine3

████████

aquamarine4

████████

azure

████████

azure1

████████

azure2

████████

azure3

████████

azure4

████████

beige

████████

bisque

████████

bisque1

████████

bisque2

████████

bisque3

████████

bisque4

████████

black

████████

blanchedalmond

████████

blue

████████

blue1

████████

blue2

████████

blue3

████████

blue4

████████

blueviolet

████████

brown

████████

brown1

████████

brown2

████████

brown3

████████

brown4

████████

burlywood

████████

burlywood1

████████

burlywood2

████████

burlywood3

████████

burlywood4

████████

cadetblue

████████

cadetblue1

████████

cadetblue2

████████

cadetblue3

████████

cadetblue4

████████

chartreuse

████████

chartreuse1

████████

chartreuse2

████████

chartreuse3

████████

chartreuse4

████████

chocolate

████████

chocolate1

████████

chocolate2

████████

chocolate3

████████

chocolate4

████████

coral

████████

coral1

████████

coral2

████████

coral3

████████

coral4

████████

cornflowerblue

████████

cornsilk

████████

cornsilk1

████████

cornsilk2

████████

cornsilk3

████████

cornsilk4

████████

crimson

████████

cyan

████████

cyan1

████████

cyan2

████████

cyan3

████████

cyan4

████████

darkblue

████████

darkcyan

████████

darkgoldenrod

████████

darkgoldenrod1

████████

darkgoldenrod2

████████

darkgoldenrod3

████████

darkgoldenrod4

████████

darkgray

████████

darkgreen

████████

darkgrey

████████

darkkhaki

████████

darkmagenta

████████

darkolivegreen

████████

darkolivegreen1

████████

darkolivegreen2

████████

darkolivegreen3

████████

darkolivegreen4

████████

darkorange

████████

darkorange1

████████

darkorange2

████████

darkorange3

████████

darkorange4

████████

darkorchid

████████

darkorchid1

████████

darkorchid2

████████

darkorchid3

████████

darkorchid4

████████

darkred

████████

darksalmon

████████

darkseagreen

████████

darkseagreen1

████████

darkseagreen2

████████

darkseagreen3

████████

darkseagreen4

████████

darkslateblue

████████

darkslategray

████████

darkslategray1

████████

darkslategray2

████████

darkslategray3

████████

darkslategray4

████████

darkslategrey

████████

darkturquoise

████████

darkviolet

████████

deeppink

████████

deeppink1

████████

deeppink2

████████

deeppink3

████████

deeppink4

████████

deepskyblue

████████

deepskyblue1

████████

deepskyblue2

████████

deepskyblue3

████████

deepskyblue4

████████

dimgray

████████

dimgrey

████████

dodgerblue

████████

dodgerblue1

████████

dodgerblue2

████████

dodgerblue3

████████

dodgerblue4

████████

firebrick

████████

firebrick1

████████

firebrick2

████████

firebrick3

████████

firebrick4

████████

floralwhite

████████

forestgreen

████████

fuchsia

████████

gainsboro

████████

ghostwhite

████████

gold

████████

gold1

████████

gold2

████████

gold3

████████

gold4

████████

goldenrod

████████

goldenrod1

████████

goldenrod2

████████

goldenrod3

████████

goldenrod4

████████

gray

████████

gray0

████████

gray1

████████

gray2

████████

gray3

████████

gray4

████████

gray5

████████

gray6

████████

gray7

████████

gray8

████████

gray9

████████

gray10

████████

gray11

████████

gray12

████████

gray13

████████

gray14

████████

gray15

████████

gray16

████████

gray17

████████

gray18

████████

gray19

████████

gray20

████████

gray21

████████

gray22

████████

gray23

████████

gray24

████████

gray25

████████

gray26

████████

gray27

████████

gray28

████████

gray29

████████

gray30

████████

gray31

████████

gray32

████████

gray33

████████

gray34

████████

gray35

████████

gray36

████████

gray37

████████

gray38

████████

gray39

████████

gray40

████████

gray41

████████

gray42

████████

gray43

████████

gray44

████████

gray45

████████

gray46

████████

gray47

████████

gray48

████████

gray49

████████

gray50

████████

gray51

████████

gray52

████████

gray53

████████

gray54

████████

gray55

████████

gray56

████████

gray57

████████

gray58

████████

gray59

████████

gray60

████████

gray61

████████

gray62

████████

gray63

████████

gray64

████████

gray65

████████

gray66

████████

gray67

████████

gray68

████████

gray69

████████

gray70

████████

gray71

████████

gray72

████████

gray73

████████

gray74

████████

gray75

████████

gray76

████████

gray77

████████

gray78

████████

gray79

████████

gray80

████████

gray81

████████

gray82

████████

gray83

████████

gray84

████████

gray85

████████

gray86

████████

gray87

████████

gray88

████████

gray89

████████

gray90

████████

gray91

████████

gray92

████████

gray93

████████

gray94

████████

gray95

████████

gray96

████████

gray97

████████

gray98

████████

gray99

████████

gray100

████████

green

████████

green1

████████

green2

████████

green3

████████

green4

████████

greenyellow

████████

grey

████████

grey0

████████

grey1

████████

grey2

████████

grey3

████████

grey4

████████

grey5

████████

grey6

████████

grey7

████████

grey8

████████

grey9

████████

grey10

████████

grey11

████████

grey12

████████

grey13

████████

grey14

████████

grey15

████████

grey16

████████

grey17

████████

grey18

████████

grey19

████████

grey20

████████

grey21

████████

grey22

████████

grey23

████████

grey24

████████

grey25

████████

grey26

████████

grey27

████████

grey28

████████

grey29

████████

grey30

████████

grey31

████████

grey32

████████

grey33

████████

grey34

████████

grey35

████████

grey36

████████

grey37

████████

grey38

████████

grey39

████████

grey40

████████

grey41

████████

grey42

████████

grey43

████████

grey44

████████

grey45

████████

grey46

████████

grey47

████████

grey48

████████

grey49

████████

grey50

████████

grey51

████████

grey52

████████

grey53

████████

grey54

████████

grey55

████████

grey56

████████

grey57

████████

grey58

████████

grey59

████████

grey60

████████

grey61

████████

grey62

████████

grey63

████████

grey64

████████

grey65

████████

grey66

████████

grey67

████████

grey68

████████

grey69

████████

grey70

████████

grey71

████████

grey72

████████

grey73

████████

grey74

████████

grey75

████████

grey76

████████

grey77

████████

grey78

████████

grey79

████████

grey80

████████

grey81

████████

grey82

████████

grey83

████████

grey84

████████

grey85

████████

grey86

████████

grey87

████████

grey88

████████

grey89

████████

grey90

████████

grey91

████████

grey92

████████

grey93

████████

grey94

████████

grey95

████████

grey96

████████

grey97

████████

grey98

████████

grey99

████████

grey100

████████

honeydew

████████

honeydew1

████████

honeydew2

████████

honeydew3

████████

honeydew4

████████

hotpink

████████

hotpink1

████████

hotpink2

████████

hotpink3

████████

hotpink4

████████

indianred

████████

indianred1

████████

indianred2

████████

indianred3

████████

indianred4

████████

indigo

████████

ivory

████████

ivory1

████████

ivory2

████████

ivory3

████████

ivory4

████████

khaki

████████

khaki1

████████

khaki2

████████

khaki3

████████

khaki4

████████

lavender

████████

lavenderblush

████████

lavenderblush1

████████

lavenderblush2

████████

lavenderblush3

████████

lavenderblush4

████████

lawngreen

████████

lemonchiffon

████████

lemonchiffon1

████████

lemonchiffon2

████████

lemonchiffon3

████████

lemonchiffon4

████████

lightblue

████████

lightblue1

████████

lightblue2

████████

lightblue3

████████

lightblue4

████████

lightcoral

████████

lightcyan

████████

lightcyan1

████████

lightcyan2

████████

lightcyan3

████████

lightcyan4

████████

lightgoldenrod

████████

lightgoldenrod1

████████

lightgoldenrod2

████████

lightgoldenrod3

████████

lightgoldenrod4

████████

lightgoldenrodyellow

████████

lightgray

████████

lightgreen

████████

lightgrey

████████

lightpink

████████

lightpink1

████████

lightpink2

████████

lightpink3

████████

lightpink4

████████

lightsalmon

████████

lightsalmon1

████████

lightsalmon2

████████

lightsalmon3

████████

lightsalmon4

████████

lightseagreen

████████

lightskyblue

████████

lightskyblue1

████████

lightskyblue2

████████

lightskyblue3

████████

lightskyblue4

████████

lightslateblue

████████

lightslategray

████████

lightslategrey

████████

lightsteelblue

████████

lightsteelblue1

████████

lightsteelblue2

████████

lightsteelblue3

████████

lightsteelblue4

████████

lightyellow

████████

lightyellow1

████████

lightyellow2

████████

lightyellow3

████████

lightyellow4

████████

lime

████████

limegreen

████████

linen

████████

magenta

████████

magenta1

████████

magenta2

████████

magenta3

████████

magenta4

████████

maroon

████████

maroon1

████████

maroon2

████████

maroon3

████████

maroon4

████████

mediumaquamarine

████████

mediumblue

████████

mediumorchid

████████

mediumorchid1

████████

mediumorchid2

████████

mediumorchid3

████████

mediumorchid4

████████

mediumpurple

████████

mediumpurple1

████████

mediumpurple2

████████

mediumpurple3

████████

mediumpurple4

████████

mediumseagreen

████████

mediumslateblue

████████

mediumspringgreen

████████

mediumturquoise

████████

mediumvioletred

████████

midnightblue

████████

mintcream

████████

mistyrose

████████

mistyrose1

████████

mistyrose2

████████

mistyrose3

████████

mistyrose4

████████

moccasin

████████

navajowhite

████████

navajowhite1

████████

navajowhite2

████████

navajowhite3

████████

navajowhite4

████████

navy

████████

navyblue

████████

oldlace

████████

olive

████████

olivedrab

████████

olivedrab1

████████

olivedrab2

████████

olivedrab3

████████

olivedrab4

████████

orange

████████

orange1

████████

orange2

████████

orange3

████████

orange4

████████

orangered

████████

orangered1

████████

orangered2

████████

orangered3

████████

orangered4

████████

orchid

████████

orchid1

████████

orchid2

████████

orchid3

████████

orchid4

████████

palegoldenrod

████████

palegreen

████████

palegreen1

████████

palegreen2

████████

palegreen3

████████

palegreen4

████████

paleturquoise

████████

paleturquoise1

████████

paleturquoise2

████████

paleturquoise3

████████

paleturquoise4

████████

palevioletred

████████

palevioletred1

████████

palevioletred2

████████

palevioletred3

████████

palevioletred4

████████

papayawhip

████████

peachpuff

████████

peachpuff1

████████

peachpuff2

████████

peachpuff3

████████

peachpuff4

████████

peru

████████

pink

████████

pink1

████████

pink2

████████

pink3

████████

pink4

████████

plum

████████

plum1

████████

plum2

████████

plum3

████████

plum4

████████

powderblue

████████

purple

████████

purple1

████████

purple2

████████

purple3

████████

purple4

████████

red

████████

red1

████████

red2

████████

red3

████████

red4

████████

rosybrown

████████

rosybrown1

████████

rosybrown2

████████

rosybrown3

████████

rosybrown4

████████

royalblue

████████

royalblue1

████████

royalblue2

████████

royalblue3

████████

royalblue4

████████

saddlebrown

████████

salmon

████████

salmon1

████████

salmon2

████████

salmon3

████████

salmon4

████████

sandybrown

████████

seagreen

████████

seagreen1

████████

seagreen2

████████

seagreen3

████████

seagreen4

████████

seashell

████████

seashell1

████████

seashell2

████████

seashell3

████████

seashell4

████████

sienna

████████

sienna1

████████

sienna2

████████

sienna3

████████

sienna4

████████

silver

████████

skyblue

████████

skyblue1

████████

skyblue2

████████

skyblue3

████████

skyblue4

████████

slateblue

████████

slateblue1

████████

slateblue2

████████

slateblue3

████████

slateblue4

████████

slategray

████████

slategray1

████████

slategray2

████████

slategray3

████████

slategray4

████████

slategrey

████████

snow

████████

snow1

████████

snow2

████████

snow3

████████

snow4

████████

springgreen

████████

springgreen1

████████

springgreen2

████████

springgreen3

████████

springgreen4

████████

steelblue

████████

steelblue1

████████

steelblue2

████████

steelblue3

████████

steelblue4

████████

tan

████████

tan1

████████

tan2

████████

tan3

████████

tan4

████████

teal

████████

thistle

████████

thistle1

████████

thistle2

████████

thistle3

████████

thistle4

████████

tomato

████████

tomato1

████████

tomato2

████████

tomato3

████████

tomato4

████████

turquoise

████████

turquoise1

████████

turquoise2

████████

turquoise3

████████

turquoise4

████████

violet

████████

violetred

████████

violetred1

████████

violetred2

████████

violetred3

████████

violetred4

████████

wheat

████████

wheat1

████████

wheat2

████████

wheat3

████████

wheat4

████████

white

████████

whitesmoke

████████

yellow

████████

yellow1

████████

yellow2

████████

yellow3

████████

yellow4

████████

yellowgreen

████████




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.5491402 pygame-2.6.1/docs/generated/ref/cursors.html0000644000175100001770000010405614676242423020457 0ustar00runnerdocker pygame.cursors — pygame v2.6.1 documentation
pygame.cursors
pygame module for cursor resources
create binary cursor data from simple strings
load cursor data from an XBM file
pygame object representing a cursor

Pygame offers control over the system hardware cursor. Pygame supports black and white cursors (bitmap cursors), as well as system variant cursors and color cursors. You control the cursor with functions inside pygame.mousepygame module to work with the mouse.

This cursors module contains functions for loading and decoding various cursor formats. These allow you to easily store your cursors in external files or directly as encoded python strings.

The module includes several standard cursors. The pygame.mouse.set_cursor()set the mouse cursor to a new cursor function takes several arguments. All those arguments have been stored in a single tuple you can call like this:

>>> pygame.mouse.set_cursor(*pygame.cursors.arrow)

The following variables can be passed to pygame.mouse.set_cursor function:

  • pygame.cursors.arrow

  • pygame.cursors.diamond

  • pygame.cursors.broken_x

  • pygame.cursors.tri_left

  • pygame.cursors.tri_right

This module also contains a few cursors as formatted strings. You'll need to pass these to pygame.cursors.compile() function before you can use them. The example call would look like this:

>>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings)
>>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor)

The following strings can be converted into cursor bitmaps with pygame.cursors.compile() :

  • pygame.cursors.thickarrow_strings

  • pygame.cursors.sizer_x_strings

  • pygame.cursors.sizer_y_strings

  • pygame.cursors.sizer_xy_strings

  • pygame.cursor.textmarker_strings

pygame.cursors.compile()
create binary cursor data from simple strings
compile(strings, black='X', white='.', xor='o') -> data, mask

A sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the pygame.mouse.set_cursor()set the mouse cursor to a new cursor function.

If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black.

The height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, ValueError is raised. An example set of cursor strings looks like this

thickarrow_strings = (               #sized 24x24
  "XX                      ",
  "XXX                     ",
  "XXXX                    ",
  "XX.XX                   ",
  "XX..XX                  ",
  "XX...XX                 ",
  "XX....XX                ",
  "XX.....XX               ",
  "XX......XX              ",
  "XX.......XX             ",
  "XX........XX            ",
  "XX........XXX           ",
  "XX......XXXXX           ",
  "XX.XXX..XX              ",
  "XXXX XX..XX             ",
  "XX   XX..XX             ",
  "     XX..XX             ",
  "      XX..XX            ",
  "      XX..XX            ",
  "       XXXX             ",
  "       XX               ",
  "                        ",
  "                        ",
  "                        ")
pygame.cursors.load_xbm()
load cursor data from an XBM file
load_xbm(cursorfile) -> cursor_args
load_xbm(cursorfile, maskfile) -> cursor_args

This loads cursors for a simple subset of XBM files. XBM files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images.

Sometimes the black and white color values will be split into two separate XBM files. You can pass a second maskfile argument to load the two images into a single cursor.

The cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method.

The return value cursor_args can be passed directly to the pygame.mouse.set_cursor() function.

pygame.cursors.Cursor
pygame object representing a cursor
Cursor(size, hotspot, xormasks, andmasks) -> Cursor
Cursor(hotspot, surface) -> Cursor
Cursor(constant) -> Cursor
Cursor(Cursor) -> Cursor
Cursor() -> Cursor
copy the current cursor
Gets the cursor type
Gets the cursor data

In pygame 2, there are 3 types of cursors you can create to give your game that little bit of extra polish. There's bitmap type cursors, which existed in pygame 1.x, and are compiled from a string or load from an xbm file. Then there are system type cursors, where you choose a preset that will convey the same meaning but look native across different operating systems. Finally you can create a color cursor, which displays a pygame surface as the cursor.

Creating a system cursor

Choose a constant from this list, pass it into pygame.cursors.Cursor(constant), and you're good to go. Be advised that not all systems support every system cursor, and you may get a substitution instead. For example, on MacOS, WAIT/WAITARROW should show up as an arrow, and SIZENWSE/SIZENESW/SIZEALL should show up as a closed hand. And on Wayland, every SIZE cursor should show up as a hand.

Pygame Cursor Constant           Description
--------------------------------------------
pygame.SYSTEM_CURSOR_ARROW       arrow
pygame.SYSTEM_CURSOR_IBEAM       i-beam
pygame.SYSTEM_CURSOR_WAIT        wait
pygame.SYSTEM_CURSOR_CROSSHAIR   crosshair
pygame.SYSTEM_CURSOR_WAITARROW   small wait cursor
                                 (or wait if not available)
pygame.SYSTEM_CURSOR_SIZENWSE    double arrow pointing
                                 northwest and southeast
pygame.SYSTEM_CURSOR_SIZENESW    double arrow pointing
                                 northeast and southwest
pygame.SYSTEM_CURSOR_SIZEWE      double arrow pointing
                                 west and east
pygame.SYSTEM_CURSOR_SIZENS      double arrow pointing
                                 north and south
pygame.SYSTEM_CURSOR_SIZEALL     four pointed arrow pointing
                                 north, south, east, and west
pygame.SYSTEM_CURSOR_NO          slashed circle or crossbones
pygame.SYSTEM_CURSOR_HAND        hand

Creating a cursor without passing arguments

In addition to the cursor constants available and described above, you can also call pygame.cursors.Cursor(), and your cursor is ready (doing that is the same as calling pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW). Doing one of those calls actually creates a system cursor using the default native image.

Creating a color cursor

To create a color cursor, create a Cursor from a hotspot and a surface. hotspot is an (x,y) coordinate that determines where in the cursor the exact point is. The hotspot position must be within the bounds of the surface.

Creating a bitmap cursor

When the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The size is a sequence containing the cursor width and height. hotspot is a sequence containing the cursor hotspot position.

A cursor has a width and height, but a mouse position is represented by a set of point coordinates. So the value passed into the cursor hotspot variable helps pygame to actually determine at what exact point the cursor is at.

xormasks is a sequence of bytes containing the cursor xor data masks. Lastly andmasks, a sequence of bytes containing the cursor bitmask data. To create these variables, we can make use of the pygame.cursors.compile()create binary cursor data from simple strings function.

Width and height must be a multiple of 8, and the mask arrays must be the correct size for the given width and height. Otherwise an exception is raised.

copy()
copy the current cursor
copy() -> Cursor

Returns a new Cursor object with the same data and hotspot as the original.

type
Gets the cursor type
type -> string

The type will be "system", "bitmap", or "color".

data
Gets the cursor data
data -> tuple

Returns the data that was used to create this cursor object, wrapped up in a tuple.

New in pygame 2.0.1.

Example code for creating and settings cursors. (Click the mouse to switch cursor)

# pygame setup
import pygame as pg

pg.init()
screen = pg.display.set_mode([600, 400])
pg.display.set_caption("Example code for the cursors module")

# create a system cursor
system = pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO)

# create bitmap cursors
bitmap_1 = pg.cursors.Cursor(*pg.cursors.arrow)
bitmap_2 = pg.cursors.Cursor(
    (24, 24), (0, 0), *pg.cursors.compile(pg.cursors.thickarrow_strings)
)

# create a color cursor
surf = pg.Surface((40, 40)) # you could also load an image
surf.fill((120, 50, 50))        # and use that as your surface
color = pg.cursors.Cursor((20, 20), surf)

cursors = [system, bitmap_1, bitmap_2, color]
cursor_index = 0

pg.mouse.set_cursor(cursors[cursor_index])

clock = pg.time.Clock()
going = True
while going:
    clock.tick(60)
    screen.fill((0, 75, 30))
    pg.display.flip()

    for event in pg.event.get():
        if event.type == pg.QUIT or (event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE):
            going = False

        # if the mouse is clicked it will switch to a new cursor
        if event.type == pg.MOUSEBUTTONDOWN:
            cursor_index += 1
            cursor_index %= len(cursors)
            pg.mouse.set_cursor(cursors[cursor_index])

pg.quit()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.6401403 pygame-2.6.1/docs/generated/ref/display.html0000644000175100001770000022454114676242423020426 0ustar00runnerdocker pygame.display — pygame v2.6.1 documentation
pygame.display
pygame module to control the display window and screen
Initialize the display module
Uninitialize the display module
Returns True if the display module has been initialized
Initialize a window or screen for display
Get a reference to the currently set display surface
Update the full display Surface to the screen
Update portions of the screen for software displays
Get the name of the pygame display backend
Create a video display information object
Get information about the current windowing system
Get sizes of active desktops
Get list of available fullscreen modes
Pick the best color depth for a display mode
Get the value for an OpenGL flag for the current display
Request an OpenGL display attribute for the display mode
Returns True when the display is active on the screen
Iconify the display surface
Switch between fullscreen and windowed displays
Change the hardware gamma ramps
Change the hardware gamma ramps with a custom lookup
Change the system image for the display window
Set the current window caption
Get the current window caption
Set the display color palette for indexed displays
Return the number of displays
Return the size of the window or screen
Return whether the screensaver is allowed to run.
Set whether the screensaver may run

This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs full screen. Once you create the display you treat it as a regular Surface. Changes are not immediately visible onscreen; you must choose one of the two flipping functions to update the actual display.

The origin of the display, where x = 0 and y = 0, is the top left of the screen. Both axes increase positively towards the bottom right of the screen.

The pygame display can actually be initialized in one of several modes. By default, the display is a basic software driven framebuffer. You can request special modules like automatic scaling or OpenGL support. These are controlled by flags passed to pygame.display.set_mode().

Pygame can only have a single display active at any time. Creating a new one with pygame.display.set_mode() will close the previous display. To detect the number and size of attached screens, you can use pygame.display.get_desktop_sizes and then select appropriate window size and display index to pass to pygame.display.set_mode().

For backward compatibility pygame.display allows precise control over the pixel format or display resolutions. This used to be necessary with old graphics cards and CRT screens, but is usually not needed any more. Use the functions pygame.display.mode_ok(), pygame.display.list_modes(), and pygame.display.Info() to query detailed information about the display.

Once the display Surface is created, the functions from this module affect the single existing display. The Surface becomes invalid if the module is uninitialized. If a new display mode is set, the existing Surface will automatically switch to operate on the new display.

When the display mode is set, several events are placed on the pygame event queue. pygame.QUIT is sent when the user has requested the program to shut down. The window will receive pygame.ACTIVEEVENT events as the display gains and loses input focus. If the display is set with the pygame.RESIZABLE flag, pygame.VIDEORESIZE events will be sent when the user adjusts the window dimensions. Hardware displays that draw direct to the screen will get pygame.VIDEOEXPOSE events when portions of the window must be redrawn.

A new windowevent API was introduced in pygame 2.0.1. Check event module docs for more information on that

Some display environments have an option for automatically stretching all windows. When this option is enabled, this automatic stretching distorts the appearance of the pygame window. In the pygame examples directory, there is example code (prevent_display_stretching.py) which shows how to disable this automatic stretching of the pygame display on Microsoft Windows (Vista or newer required).

pygame.display.init()
Initialize the display module
init() -> None

Initializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level pygame.init().

Pygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable SDL_VIDEODRIVER can be set to control which backend is used. The systems with multiple choices are listed here.

Windows : windib, directx
Unix    : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib

On some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable SDL_WINDOWID must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display.

It is harmless to call this more than once, repeated calls have no effect.

pygame.display.quit()
Uninitialize the display module
quit() -> None

This will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits.

It is harmless to call this more than once, repeated calls have no effect.

pygame.display.get_init()
Returns True if the display module has been initialized
get_init() -> bool

Returns True if the pygame.displaypygame module to control the display window and screen module is currently initialized.

pygame.display.set_mode()
Initialize a window or screen for display
set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface

This function will create a display Surface. The arguments passed in are requests for a display type. The actual created display will be the best possible match supported by the system.

Note that calling this function implicitly initializes pygame.display, if it was not initialized before.

The size argument is a pair of numbers representing the width and height. The flags argument is a collection of additional options. The depth argument represents the number of bits to use for color.

The Surface that gets returned can be drawn to like a regular Surface but changes will eventually be seen on the monitor.

If no size is passed or is set to (0, 0) and pygame uses SDL version 1.2.10 or above, the created Surface will have the same size as the current screen resolution. If only the width or height are set to 0, the Surface will have the same width or height as the screen resolution. Using a SDL version prior to 1.2.10 will raise an exception.

It is usually best to not pass the depth argument. It will default to the best and fastest color depth for the system. If your game requires a specific color format you can control the depth with this argument. Pygame will emulate an unavailable color depth which can be slow.

When requesting fullscreen display modes, sometimes an exact match for the requested size cannot be made. In these situations pygame will select the closest compatible match. The returned surface will still always match the requested size.

On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Note that SCALED is considered an experimental API and may change in future releases.

The flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). Here are the display flags you will want to choose from:

pygame.FULLSCREEN    create a fullscreen display
pygame.DOUBLEBUF     only applicable with OPENGL
pygame.HWSURFACE     (obsolete in pygame 2) hardware accelerated, only in FULLSCREEN
pygame.OPENGL        create an OpenGL-renderable display
pygame.RESIZABLE     display window should be resizeable
pygame.NOFRAME       display window will have no border or controls
pygame.SCALED        resolution depends on desktop size and scale graphics
pygame.SHOWN         window is opened in visible mode (default)
pygame.HIDDEN        window is opened in hidden mode

New in pygame 2.0.0: SCALED, SHOWN and HIDDEN

By setting the vsync parameter to 1, it is possible to get a display with vertical sync, but you are not guaranteed to get one. The request only works at all for calls to set_mode() with the pygame.OPENGL or pygame.SCALED flags set, and is still not guaranteed even with one of those set. What you get depends on the hardware and driver configuration of the system pygame is running on. Here is an example usage of a call to set_mode() that may give you a display with vsync:

flags = pygame.OPENGL | pygame.FULLSCREEN
window_surface = pygame.display.set_mode((1920, 1080), flags, vsync=1)

Vsync behaviour is considered experimental, and may change in future releases.

New in pygame 2.0.0: vsync

Basic example:

# Open a window on the screen
screen_width=700
screen_height=400
screen=pygame.display.set_mode([screen_width, screen_height])

The display index 0 means the default display is used. If no display index argument is provided, the default display can be overridden with an environment variable.

Changed in pygame 1.9.5: display argument added

Changed in pygame 2.1.3: pygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with.

pygame.display.get_surface()
Get a reference to the currently set display surface
get_surface() -> Surface

Return a reference to the currently set display Surface. If no display mode has been set this will return None.

pygame.display.flip()
Update the full display Surface to the screen
flip() -> None

This will update the contents of the entire display. If your display mode is using the flags pygame.HWSURFACE and pygame.DOUBLEBUF on pygame 1, this will wait for a vertical retrace and swap the surfaces.

When using an pygame.OPENGL display mode this will perform a gl buffer swap.

pygame.display.update()
Update portions of the screen for software displays
update(rectangle=None) -> None
update(rectangle_list) -> None

This function is like an optimized version of pygame.display.flip() for software displays. It allows only a portion of the screen to be updated, instead of the entire area. If no argument is passed it updates the entire Surface area like pygame.display.flip().

Note that calling display.update(None) means no part of the window is updated. Whereas display.update() means the whole window is updated.

You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped.

This call cannot be used on pygame.OPENGL displays and will generate an exception.

pygame.display.get_driver()
Get the name of the pygame display backend
get_driver() -> name

Pygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the SDL_VIDEODRIVER flags in pygame.display.set_mode() to see some of the common options.

pygame.display.Info()
Create a video display information object
Info() -> VideoInfo

Creates a simple object containing several attributes to describe the current graphics environment. If this is called before pygame.display.set_mode() some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes:

hw:         1 if the display is hardware accelerated
wm:         1 if windowed display modes can be used
video_mem:  The megabytes of video memory on the display. This is 0 if
            unknown
bitsize:    Number of bits used to store each pixel
bytesize:   Number of bytes used to store each pixel
masks:      Four values used to pack RGBA values into pixels
shifts:     Four values used to pack RGBA values into pixels
losses:     Four values used to pack RGBA values into pixels
blit_hw:    1 if hardware Surface blitting is accelerated
blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated
blit_hw_A:  1 if hardware Surface pixel alpha blitting is accelerated
blit_sw:    1 if software Surface blitting is accelerated
blit_sw_CC: 1 if software Surface colorkey blitting is accelerated
blit_sw_A:  1 if software Surface pixel alpha blitting is accelerated
current_h, current_w:  Height and width of the current video mode, or
            of the desktop mode if called before the display.set_mode
            is called. (current_h, current_w are available since
            SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if
            an old SDL is being used.
pygame.display.get_wm_info()
Get information about the current windowing system
get_wm_info() -> dict

Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display.

New in pygame 1.7.1.

pygame.display.get_desktop_sizes()
Get sizes of active desktops
get_desktop_sizes() -> list

This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers.

The length of the list is not the same as the number of attached monitors, as a desktop can be mirrored across multiple monitors. The desktop sizes do not indicate the maximum monitor resolutions supported by the hardware, but the desktop size configured in the operating system.

In order to fit windows into the desktop as it is currently configured, and to respect the resolution configured by the operating system in fullscreen mode, this function should be used to replace many use cases of pygame.display.list_modes() whenever applicable.

New in pygame 2.0.0.

pygame.display.list_modes()
Get list of available fullscreen modes
list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list

This function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of -1 means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest.

If depth is 0, the current/best color depth for the display is used. The flags defaults to pygame.FULLSCREEN, but you may need to add additional flags for specific fullscreen modes.

The display index 0 means the default display is used.

Since pygame 2.0, pygame.display.get_desktop_sizes() has taken over some use cases from pygame.display.list_modes():

To find a suitable size for non-fullscreen windows, it is preferable to use pygame.display.get_desktop_sizes() to get the size of the current desktop, and to then choose a smaller window size. This way, the window is guaranteed to fit, even when the monitor is configured to a lower resolution than the maximum supported by the hardware.

To avoid changing the physical monitor resolution, it is also preferable to use pygame.display.get_desktop_sizes() to determine the fullscreen resolution. Developers are strongly advised to default to the current physical monitor resolution unless the user explicitly requests a different one (e.g. in an options menu or configuration file).

Changed in pygame 1.9.5: display argument added

pygame.display.mode_ok()
Pick the best color depth for a display mode
mode_ok(size, flags=0, depth=0, display=0) -> depth

This function uses the same arguments as pygame.display.set_mode(). It is used to determine if a requested display mode is available. It will return 0 if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for.

Usually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match.

The function will return 0 if the passed display flags cannot be set.

The display index 0 means the default display is used.

Changed in pygame 1.9.5: display argument added

pygame.display.gl_get_attribute()
Get the value for an OpenGL flag for the current display
gl_get_attribute(flag) -> value

After calling pygame.display.set_mode() with the pygame.OPENGL flag, it is a good idea to check the value of any requested OpenGL attributes. See pygame.display.gl_set_attribute() for a list of valid flags.

Changed in pygame 2.5.0: Added support for keyword arguments.

pygame.display.gl_set_attribute()
Request an OpenGL display attribute for the display mode
gl_set_attribute(flag, value) -> None

When calling pygame.display.set_mode() with the pygame.OPENGL flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before pygame.display.set_mode().

Many settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested.

The OPENGL flags are:

GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE,
GL_ACCUM_GREEN_SIZE,  GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE,
GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO

GL_MULTISAMPLEBUFFERS

Whether to enable multisampling anti-aliasing. Defaults to 0 (disabled).

Set GL_MULTISAMPLESAMPLES to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3.

GL_STENCIL_SIZE

Minimum bit size of the stencil buffer. Defaults to 0.

GL_DEPTH_SIZE

Minimum bit size of the depth buffer. Defaults to 16.

GL_STEREO

1 enables stereo 3D. Defaults to 0.

GL_BUFFER_SIZE

Minimum bit size of the frame buffer. Defaults to 0.

Changed in pygame 2.5.0: Added support for keyword arguments.

New in pygame 2.0.0: Additional attributes:

GL_ACCELERATED_VISUAL,
GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION,
GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK,
GL_SHARE_WITH_CURRENT_CONTEXT,
GL_CONTEXT_RELEASE_BEHAVIOR,
GL_FRAMEBUFFER_SRGB_CAPABLE

GL_CONTEXT_PROFILE_MASK

Sets the OpenGL profile to one of these values:

GL_CONTEXT_PROFILE_CORE             disable deprecated features
GL_CONTEXT_PROFILE_COMPATIBILITY    allow deprecated features
GL_CONTEXT_PROFILE_ES               allow only the ES feature
                                    subset of OpenGL

GL_ACCELERATED_VISUAL

Set to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed.

pygame.display.get_active()
Returns True when the display is active on the screen
get_active() -> bool

Returns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after pygame.display.set_mode(). This method may return True even if the application is fully hidden behind another application window.

This will return False if the display Surface has been iconified or minimized (either via pygame.display.iconify() or via an OS specific method such as the minimize-icon available on most desktops).

The method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop.

Note

This function returning True is unrelated to whether the application has input focus. Please see pygame.key.get_focused() and pygame.mouse.get_focused() for APIs related to input focus.

pygame.display.iconify()
Iconify the display surface
iconify() -> bool

Request the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful.

When the display is iconified pygame.display.get_active() will return False. The event queue should receive an ACTIVEEVENT event when the window has been iconified. Additionally, the event queue also receives a WINDOWEVENT_MINIMIZED event when the window has been iconified on pygame 2.

pygame.display.toggle_fullscreen()
Switch between fullscreen and windowed displays
toggle_fullscreen() -> int

Switches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen.

Supported display drivers in pygame 1:

  • x11 (Linux/Unix)

  • wayland (Linux/Unix)

Supported display drivers in pygame 2:

  • windows (Windows)

  • x11 (Linux/Unix)

  • wayland (Linux/Unix)

  • cocoa (OSX/Mac)

Note

toggle_fullscreen() doesn't work on Windows unless the window size is in pygame.display.list_modes()Get list of available fullscreen modes or the window is created with the flag pygame.SCALED. See issue #2380.

pygame.display.set_gamma()
Change the hardware gamma ramps
set_gamma(red, green=None, blue=None) -> bool

DEPRECATED: This functionality will go away in SDL3.

Set the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return True.

A gamma value of 1.0 creates a linear color table. Lower values will darken the display and higher values will brighten.

Deprecated since pygame 2.2.0.

pygame.display.set_gamma_ramp()
Change the hardware gamma ramps with a custom lookup
set_gamma_ramp(red, green, blue) -> bool

DEPRECATED: This functionality will go away in SDL3.

Set the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between 0 and 0xffff. Not all systems and hardware support gamma ramps, if the function succeeds it will return True.

Deprecated since pygame 2.2.0.

pygame.display.set_icon()
Change the system image for the display window
set_icon(Surface) -> None

Sets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon.

Note that calling this function implicitly initializes pygame.display, if it was not initialized before.

You can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system.

Some systems do not allow the window icon to change after it has been shown. This function can be called before pygame.display.set_mode() to create the icon before the display mode is set.

pygame.display.set_caption()
Set the current window caption
set_caption(title, icontitle=None) -> None

If the display has a window title, this function will change the name on the window. In pygame 1.x, some systems supported an alternate shorter title to be used for minimized displays, but in pygame 2 icontitle does nothing.

Changed in pygame 2.5.0: Added support for keyword arguments.

pygame.display.get_caption()
Get the current window caption
get_caption() -> (title, icontitle)

Returns the title and icontitle for the display window. In pygame 2.x these will always be the same value.

pygame.display.set_palette()
Set the display color palette for indexed displays
set_palette(palette=None) -> None

This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of RGB triplets.

Changed in pygame 2.5.0: Added support for keyword arguments.

pygame.display.get_num_displays()
Return the number of displays
get_num_displays() -> int

Returns the number of available displays. This is always 1 if pygame.get_sdl_version()get the version number of SDL returns a major version number below 2.

New in pygame 1.9.5.

pygame.display.get_window_size()
Return the size of the window or screen
get_window_size() -> tuple

Returns the size of the window initialized with pygame.display.set_mode()Initialize a window or screen for display. This may differ from the size of the display surface if SCALED is used.

New in pygame 2.0.0.

pygame.display.get_allow_screensaver()
Return whether the screensaver is allowed to run.
get_allow_screensaver() -> bool

Return whether screensaver is allowed to run whilst the app is running. Default is False. By default pygame does not allow the screensaver during game play.

Note

Some platforms do not have a screensaver or support disabling the screensaver. Please see pygame.display.set_allow_screensaver()Set whether the screensaver may run for caveats with screensaver support.

New in pygame 2.0.0.

pygame.display.set_allow_screensaver()
Set whether the screensaver may run
set_allow_screensaver(bool) -> None

Change whether screensavers should be allowed whilst the app is running. The default value of the argument to the function is True. By default pygame does not allow the screensaver during game play.

If the screensaver has been disallowed due to this function, it will automatically be allowed to run when pygame.quit()uninitialize all pygame modules is called.

It is possible to influence the default value via the environment variable SDL_HINT_VIDEO_ALLOW_SCREENSAVER, which can be set to either 0 (disable) or 1 (enable).

Note

Disabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. SDL_HINT_VIDEO_ALLOW_SCREENSAVER is available in SDL 2.0.2 or later. SDL1.2 does not implement this.

New in pygame 2.0.0.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.7631402 pygame-2.6.1/docs/generated/ref/draw.html0000644000175100001770000024346614676242423017725 0ustar00runnerdocker pygame.draw — pygame v2.6.1 documentation
pygame.draw
pygame module for drawing shapes
draw a rectangle
draw a polygon
draw a circle
draw an ellipse
draw an elliptical arc
draw a straight line
draw multiple contiguous straight line segments
draw a straight antialiased line
draw multiple contiguous straight antialiased line segments

Draw several simple shapes to a surface. These functions will work for rendering to any format of surface.

Most of the functions take a width argument to represent the size of stroke (thickness) around the edge of the shape. If a width of 0 is passed the shape will be filled (solid).

All the drawing functions respect the clip area for the surface and will be constrained to that area. The functions return a rectangle representing the bounding area of changed pixels. This bounding rectangle is the 'minimum' bounding box that encloses the affected area.

All the drawing functions accept a color argument that can be one of the following formats:

A color's alpha value will be written directly into the surface (if the surface contains pixel alphas), but the draw function will not draw transparently.

These functions temporarily lock the surface they are operating on. Many sequential drawing calls can be sped up by locking and unlocking the surface object around the draw calls (see pygame.Surface.lock()lock the Surface memory for pixel access and pygame.Surface.unlock()unlock the Surface memory from pixel access).

Note

See the pygame.gfxdrawpygame module for drawing shapes module for alternative draw methods.

pygame.draw.rect()
draw a rectangle
rect(surface, color, rect) -> Rect
rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect

Draws a rectangle on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • rect (Rect) -- rectangle to draw, position and dimensions

  • width (int) --

    (optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the rect parameter)

    if width == 0, (default) fill the rectangle
    if width > 0, used for line thickness
    if width < 0, nothing will be drawn

    Changed in pygame 2.1.1: Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area.

  • border_radius (int) -- (optional) used for drawing rectangle with rounded corners. The supported range is [0, min(height, width) / 2], with 0 representing a rectangle without rounded corners.

  • border_top_left_radius (int) -- (optional) used for setting the value of top left border. If you don't set this value, it will use the border_radius value.

  • border_top_right_radius (int) -- (optional) used for setting the value of top right border. If you don't set this value, it will use the border_radius value.

  • border_bottom_left_radius (int) -- (optional) used for setting the value of bottom left border. If you don't set this value, it will use the border_radius value.

  • border_bottom_right_radius (int) --

    (optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value.

    if border_radius < 1 it will draw rectangle without rounded corners
    if any of border radii has the value < 0 it will use value of the border_radius
    If sum of radii on the same side of the rectangle is greater than the rect size the radii
    will get scaled

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0

Return type:

Rect

Note

The pygame.Surface.fill()fill Surface with a solid color method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms.

Changed in pygame 2.0.0: Added support for keyword arguments.

Changed in pygame 2.0.0.dev8: Added support for border radius.

pygame.draw.polygon()
draw a polygon
polygon(surface, color, points) -> Rect
polygon(surface, color, points, width=0) -> Rect

Draws a polygon on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates that make up the vertices of the polygon, each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats, e.g. [(x1, y1), (x2, y2), (x3, y3)]

  • width (int) --

    (optional) used for line thickness or to indicate that the polygon is to be filled

    if width == 0, (default) fill the polygon
    if width > 0, used for line thickness
    if width < 0, nothing will be drawn

    Note

    When using width values > 1, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the width notes of the pygame.draw.line()draw a straight line function.

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:
  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • TypeError -- if points is not a sequence or points does not contain number pairs

Note

For an aapolygon, use aalines() with closed=True.

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.circle()
draw a circle
circle(surface, color, center, radius) -> Rect
circle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect

Draws a circle on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • center (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- center point of the circle as a sequence of 2 ints/floats, e.g. (x, y)

  • radius (int or float) -- radius of the circle, measured from the center parameter, nothing will be drawn if the radius is less than 1

  • width (int) --

    (optional) used for line thickness or to indicate that the circle is to be filled

    if width == 0, (default) fill the circle
    if width > 0, used for line thickness
    if width < 0, nothing will be drawn

    Note

    When using width values > 1, the edge lines will only grow inward.

  • draw_top_right (bool) -- (optional) if this is set to True then the top right corner of the circle will be drawn

  • draw_top_left (bool) -- (optional) if this is set to True then the top left corner of the circle will be drawn

  • draw_bottom_left (bool) -- (optional) if this is set to True then the bottom left corner of the circle will be drawn

  • draw_bottom_right (bool) --

    (optional) if this is set to True then the bottom right corner of the circle will be drawn

    if any of the draw_circle_part is True then it will draw all circle parts that have the True
    value, otherwise it will draw the entire circle.

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the center parameter value (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:
  • TypeError -- if center is not a sequence of two numbers

  • TypeError -- if radius is not a number

Changed in pygame 2.0.0: Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the center coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the center param. The drawing algorithm was improved to look more like a circle.

Changed in pygame 2.0.0.dev8: Added support for drawing circle quadrants.

pygame.draw.ellipse()
draw an ellipse
ellipse(surface, color, rect) -> Rect
ellipse(surface, color, rect, width=0) -> Rect

Draws an ellipse on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • rect (Rect) -- rectangle to indicate the position and dimensions of the ellipse, the ellipse will be centered inside the rectangle and bounded by it

  • width (int) --

    (optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the rect parameter)

    if width == 0, (default) fill the ellipse
    if width > 0, used for line thickness
    if width < 0, nothing will be drawn

    Note

    When using width values > 1, the edge lines will only grow inward from the original boundary of the rect parameter.

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0

Return type:

Rect

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.arc()
draw an elliptical arc
arc(surface, color, rect, start_angle, stop_angle) -> Rect
arc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect

Draws an elliptical arc on the given surface.

The two angle arguments are given in radians and indicate the start and stop positions of the arc. The arc is drawn in a counterclockwise direction from the start_angle to the stop_angle.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • rect (Rect) -- rectangle to indicate the position and dimensions of the ellipse which the arc will be based on, the ellipse will be centered inside the rectangle

  • start_angle (float) -- start angle of the arc in radians

  • stop_angle (float) --

    stop angle of the arc in radians

    if start_angle < stop_angle, the arc is drawn in a counterclockwise direction from the start_angle to the stop_angle
    if start_angle > stop_angle, tau (tau == 2 * pi) will be added to the stop_angle, if the resulting stop angle value is greater than the start_angle the above start_angle < stop_angle case applies, otherwise nothing will be drawn
    if start_angle == stop_angle, nothing will be drawn

  • width (int) --

    (optional) used for line thickness (not to be confused with the width value of the rect parameter)

    if width == 0, nothing will be drawn
    if width > 0, (default is 1) used for line thickness
    if width < 0, same as width == 0

    Note

    When using width values > 1, the edge lines will only grow inward from the original boundary of the rect parameter.

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given rect parameter and its width and height will be 0

Return type:

Rect

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.line()
draw a straight line
line(surface, color, start_pos, end_pos) -> Rect
line(surface, color, start_pos, end_pos, width=1) -> Rect

Draws a straight line on the given surface. There are no endcaps. For thick lines the ends are squared off.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • start_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- start position of the line, (x, y)

  • end_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- end position of the line, (x, y)

  • width (int) --

    (optional) used for line thickness

    if width >= 1, used for line thickness (default is 1)
    if width < 1, nothing will be drawn

    Note

    When using width values > 1, lines will grow as follows.

    For odd width values, the thickness of each line grows with the original line being in the center.

    For even width values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction).

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the start_pos parameter value (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:

TypeError -- if start_pos or end_pos is not a sequence of two numbers

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.lines()
draw multiple contiguous straight line segments
lines(surface, color, closed, points) -> Rect
lines(surface, color, closed, points, width=1) -> Rect

Draws a sequence of contiguous straight lines on the given surface. There are no endcaps or miter joints. For thick lines the ends are squared off. Drawing thick lines with sharp corners can have undesired looking results.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • closed (bool) -- if True an additional line segment is drawn between the first and last points in the points sequence

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 2 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2) and from (x2, y2) to (x3, y3), additionally if the closed parameter is True another line segment will be drawn from (x3, y3) to (x1, y1)

  • width (int) --

    (optional) used for line thickness

    if width >= 1, used for line thickness (default is 1)
    if width < 1, nothing will be drawn

    Note

    When using width values > 1 refer to the width notes of line() for details on how thick lines grow.

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:
  • ValueError -- if len(points) < 2 (must have at least 2 points)

  • TypeError -- if points is not a sequence or points does not contain number pairs

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.aaline()
draw a straight antialiased line
aaline(surface, color, start_pos, end_pos) -> Rect
aaline(surface, color, start_pos, end_pos, blend=1) -> Rect

Draws a straight antialiased line on the given surface.

The line has a thickness of one pixel and the endpoints have a height and width of one pixel each.

The way a line and its endpoints are drawn:

If both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer).

Otherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis):

For each endpoint:

If x, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them.

Otherwise:

Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint.

Find which pixels would be covered and how much by that point.

If the endpoint is the left one, multiply the coverage by (1 - the decimal part of x).

Otherwise multiply the coverage by the decimal part of x.

Then draw those pixels.

e.g.:
The left endpoint of the line ((1, 1.3), (5, 3)) would cover 70% of the pixel (1, 1) and 30% of the pixel (1, 2) while the right one would cover 100% of the pixel (5, 3).
The left endpoint of the line ((1.2, 1.4), (4.6, 3.1)) would cover 56% (i.e. 0.8 * 70%) of the pixel (1, 1) and 24% (i.e. 0.8 * 30%) of the pixel (1, 2) while the right one would cover 42% (i.e. 0.6 * 70%) of the pixel (5, 3) and 18% (i.e. 0.6 * 30%) of the pixel (5, 4) while the right

Then for each point between the endpoints, along the line, whose x-coordinate is a whole number:

Find which pixels would be covered and how much by that point and draw them.

e.g.:
The points along the line ((1, 1), (4, 2.5)) would be (2, 1.5) and (3, 2) and would cover 50% of the pixel (2, 1), 50% of the pixel (2, 2) and 100% of the pixel (3, 2).
The points along the line ((1.2, 1.4), (4.6, 3.1)) would be (2, 1.8) (covering 20% of the pixel (2, 1) and 80% of the pixel (2, 2)), (3, 2.3) (covering 70% of the pixel (3, 2) and 30% of the pixel (3, 3)) and (4, 2.8) (covering 20% of the pixel (2, 1) and 80% of the pixel (2, 2))

Otherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using y instead of x, top instead of left and bottom instead of right).

Note

Regarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, e.g. the point (1.4, 2) covers 60% of the pixel (1, 2) and 40% of the pixel (2,2).

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • start_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- start position of the line, (x, y)

  • end_pos (tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float)) -- end position of the line, (x, y)

  • blend (int) -- (optional) (deprecated) if non-zero (default) the line will be blended with the surface's existing pixel shades, otherwise it will overwrite them

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the start_pos parameter value (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:

TypeError -- if start_pos or end_pos is not a sequence of two numbers

Changed in pygame 2.0.0: Added support for keyword arguments.

pygame.draw.aalines()
draw multiple contiguous straight antialiased line segments
aalines(surface, color, closed, points) -> Rect
aalines(surface, color, closed, points, blend=1) -> Rect

Draws a sequence of contiguous straight antialiased lines on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

  • closed (bool) -- if True an additional line segment is drawn between the first and last points in the points sequence

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 2 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2) and from (x2, y2) to (x3, y3), additionally if the closed parameter is True another line segment will be drawn from (x3, y3) to (x1, y1)

  • blend (int) -- (optional) (deprecated) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwritten

Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0

Return type:

Rect

Raises:
  • ValueError -- if len(points) < 2 (must have at least 2 points)

  • TypeError -- if points is not a sequence or points does not contain number pairs

Changed in pygame 2.0.0: Added support for keyword arguments.

draw module example

Example code for draw module.

import pygame
from math import pi

# Initialize pygame
pygame.init()

# Set the height and width of the screen
size = [400, 300]
screen = pygame.display.set_mode(size)

pygame.display.set_caption("Example code for the draw module")

# Loop until the user clicks the close button.
done = False
clock = pygame.time.Clock()

while not done:
    # This limits the while loop to a max of 60 times per second.
    # Leave this out and we will use all CPU we can.
    clock.tick(60)

    for event in pygame.event.get():  # User did something
        if event.type == pygame.QUIT:  # If user clicked close
            done = True  # Flag that we are done so we exit this loop

    # Clear the screen and set the screen background
    screen.fill("white")

    # Draw on the screen a green line from (0, 0) to (50, 30)
    # 5 pixels wide. Uses (r, g, b) color - medium sea green.
    pygame.draw.line(screen, (60, 179, 113), [0, 0], [50, 30], 5)

    # Draw on the screen a green line from (0, 50) to (50, 80)
    # Because it is an antialiased line, it is 1 pixel wide.
    # Uses (r, g, b) color - medium sea green.
    pygame.draw.aaline(screen, (60, 179, 113), [0, 50], [50, 80], True)

    # Draw on the screen 3 black lines, each 5 pixels wide.
    # The 'False' means the first and last points are not connected.
    pygame.draw.lines(
        screen, "black", False, [[0, 80], [50, 90], [200, 80], [220, 30]], 5
    )

    # Draw a rectangle outline
    pygame.draw.rect(screen, "black", [75, 10, 50, 20], 2)

    # Draw a solid rectangle. Same color as "black" above, specified in a new way
    pygame.draw.rect(screen, (0, 0, 0), [150, 10, 50, 20])

    # Draw a rectangle with rounded corners
    pygame.draw.rect(screen, "green", [115, 210, 70, 40], 10, border_radius=15)
    pygame.draw.rect(
        screen,
        "red",
        [135, 260, 50, 30],
        0,
        border_radius=10,
        border_top_left_radius=0,
        border_bottom_right_radius=15,
    )

    # Draw an ellipse outline, using a rectangle as the outside boundaries
    pygame.draw.ellipse(screen, "red", [225, 10, 50, 20], 2)

    # Draw an solid ellipse, using a rectangle as the outside boundaries
    pygame.draw.ellipse(screen, "red", [300, 10, 50, 20])

    # This draws a triangle using the polygon command
    pygame.draw.polygon(screen, "black", [[100, 100], [0, 200], [200, 200]], 5)

    # Draw an arc as part of an ellipse.
    # Use radians to determine what angle to draw.
    pygame.draw.arc(screen, "black", [210, 75, 150, 125], 0, pi / 2, 2)
    pygame.draw.arc(screen, "green", [210, 75, 150, 125], pi / 2, pi, 2)
    pygame.draw.arc(screen, "blue", [210, 75, 150, 125], pi, 3 * pi / 2, 2)
    pygame.draw.arc(screen, "red", [210, 75, 150, 125], 3 * pi / 2, 2 * pi, 2)

    # Draw a circle
    pygame.draw.circle(screen, "blue", [60, 250], 40)

    # Draw only one circle quadrant
    pygame.draw.circle(screen, "blue", [250, 250], 40, 0, draw_top_right=True)
    pygame.draw.circle(screen, "red", [250, 250], 40, 30, draw_top_left=True)
    pygame.draw.circle(screen, "green", [250, 250], 40, 20, draw_bottom_left=True)
    pygame.draw.circle(screen, "black", [250, 250], 40, 10, draw_bottom_right=True)

    # Go ahead and update the screen with what we've drawn.
    # This MUST happen after all the other drawing commands.
    pygame.display.flip()

# Be IDLE friendly
pygame.quit()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.8441403 pygame-2.6.1/docs/generated/ref/event.html0000644000175100001770000020710714676242423020101 0ustar00runnerdocker pygame.event — pygame v2.6.1 documentation
pygame.event
pygame module for interacting with events and queues
internally process pygame event handlers
get events from the queue
get a single event from the queue
wait for a single event from the queue
test if event types are waiting on the queue
remove all events from the queue
get the string name from an event id
control which events are allowed on the queue
control which events are allowed on the queue
test if a type of event is blocked from the queue
control the sharing of input devices with other applications
test if the program is sharing input devices
grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.
get the current keyboard grab state
place a new event on the queue
make custom user event type
pygame object for representing events

Pygame handles all its event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the pygame.displaypygame module to control the display window and screen module. If the display has not been initialized and a video mode not set, the event queue may not work properly.

The event queue has an upper limit on the number of events it can hold. When the queue becomes full new events are quietly dropped. To prevent lost events, especially input events which signal a quit command, your program must handle events every frame (with pygame.event.get(), pygame.event.pump(), pygame.event.wait(), pygame.event.peek() or pygame.event.clear()) and process them. Not handling events may cause your system to decide your program has locked up. To speed up queue processing use pygame.event.set_blocked()control which events are allowed on the queue to limit which events get queued.

To get the state of various input devices, you can forego the event queue and access the input devices directly with their appropriate modules: pygame.mousepygame module to work with the mouse, pygame.keypygame module to work with the keyboard, and pygame.joystickPygame module for interacting with joysticks, gamepads, and trackballs.. If you use this method, remember that pygame requires some form of communication with the system window manager and other parts of the platform. To keep pygame in sync with the system, you will need to call pygame.event.pump()internally process pygame event handlers to keep everything current. Usually, this should be called once per game loop. Note: Joysticks will not send any events until the device has been initialized.

The event queue contains pygame.event.Eventpygame object for representing events event objects. There are a variety of ways to access the queued events, from simply checking for the existence of events, to grabbing them directly off the stack. The event queue also offers some simple filtering which can slightly help performance by blocking certain event types from the queue. Use pygame.event.set_allowed()control which events are allowed on the queue and pygame.event.set_blocked()control which events are allowed on the queue to change this filtering. By default, all event types can be placed on the queue.

All pygame.event.Eventpygame object for representing events instances contain an event type identifier and attributes specific to that event type. The event type identifier is accessible as the pygame.event.Event.typeevent type identifier. property. Any of the event specific attributes can be accessed through the pygame.event.Event.__dict__event attribute dictionary attribute or directly as an attribute of the event object (as member lookups are passed through to the object's dictionary values). The event object has no method functions. Users can create their own new events with the pygame.event.Event()pygame object for representing events function.

The event type identifier is in between the values of NOEVENT and NUMEVENTS. User defined events should have a value in the inclusive range of USEREVENT to NUMEVENTS - 1. User defined events can get a custom event number with pygame.event.custom_type()make custom user event type. It is recommended all user events follow this system.

Events support equality and inequality comparisons. Two events are equal if they are the same type and have identical attribute values.

While debugging and experimenting, you can print an event object for a quick display of its type and members. The function pygame.event.event_name()get the string name from an event id can be used to get a string representing the name of the event type.

Events that come from the system will have a guaranteed set of member attributes based on the type. The following is a list of event types with their specific attributes.

QUIT              none
ACTIVEEVENT       gain, state
KEYDOWN           key, mod, unicode, scancode
KEYUP             key, mod, unicode, scancode
MOUSEMOTION       pos, rel, buttons, touch
MOUSEBUTTONUP     pos, button, touch
MOUSEBUTTONDOWN   pos, button, touch
JOYAXISMOTION     joy (deprecated), instance_id, axis, value
JOYBALLMOTION     joy (deprecated), instance_id, ball, rel
JOYHATMOTION      joy (deprecated), instance_id, hat, value
JOYBUTTONUP       joy (deprecated), instance_id, button
JOYBUTTONDOWN     joy (deprecated), instance_id, button
VIDEORESIZE       size, w, h
VIDEOEXPOSE       none
USEREVENT         code

Changed in pygame 2.0.0: The joy attribute was deprecated, instance_id was added.

Changed in pygame 2.0.1: The unicode attribute was added to KEYUP event.

Note that ACTIVEEVENT, VIDEORESIZE and VIDEOEXPOSE are considered as "legacy" events, the use of pygame2 WINDOWEVENT API is recommended over the use of this older API.

You can also find a list of constants for keyboard keys here.

A keyboard event occurs when a key is pressed (KEYDOWN) and when a key is released (KEYUP) The key attribute of keyboard events contains the value of what key was pressed or released. The mod attribute contains information about the state of keyboard modifiers (SHIFT, CTRL, ALT, etc.). The unicode attribute stores the 16-bit unicode value of the key that was pressed or released. The scancode attribute represents the physical location of a key on the keyboard.

The ACTIVEEVENT contains information about the application gaining or losing focus. The gain attribute will be 1 if the mouse enters the window, otherwise gain will be 0. The state attribute will have a value of SDL_APPMOUSEFOCUS if mouse focus was gained/lost, SDL_APPINPUTFOCUS if the application loses or gains keyboard focus, or SDL_APPACTIVE if the application is minimized (gain will be 0) or restored.


When compiled with SDL2, pygame has these additional events and their attributes.

AUDIODEVICEADDED   which, iscapture (SDL backend >= 2.0.4)
AUDIODEVICEREMOVED which, iscapture (SDL backend >= 2.0.4)
FINGERMOTION       touch_id, finger_id, x, y, dx, dy
FINGERDOWN         touch_id, finger_id, x, y, dx, dy
FINGERUP           touch_id, finger_id, x, y, dx, dy
MOUSEWHEEL         which, flipped, x, y, touch, precise_x, precise_y
MULTIGESTURE       touch_id, x, y, pinched, rotated, num_fingers
TEXTEDITING        text, start, length
TEXTINPUT          text

New in pygame 1.9.5.

Changed in pygame 2.0.2: Fixed amount horizontal scroll (x, positive to the right and negative to the left).

Changed in pygame 2.0.2: The touch attribute was added to all the MOUSE events.

The touch attribute of MOUSE events indicates whether or not the events were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles FINGERMOTION, FINGERDOWN and FINGERUP events.

New in pygame 2.1.3: Added precise_x and precise_y to MOUSEWHEEL events

MOUSEWHEEL event occurs whenever the mouse wheel is moved. The which attribute determines if the event was generated from a touch input device vs an actual mousewheel. The preciseX attribute contains a float with the amount scrolled horizontally (positive to the right, negative to the left). The preciseY attribute contains a float with the amount scrolled vertically (positive away from user, negative towards user). The flipped attribute determines if the values in x and y will be opposite or not. If SDL_MOUSEWHEEL_FLIPPED is defined, the direction of x and y will be opposite.

TEXTEDITING event is triggered when a user activates an input method via hotkey or selecting an input method in a GUI and starts typing

The which attribute for AUDIODEVICE* events is an integer representing the index for new audio devices that are added. AUDIODEVICE* events are used to update audio settings or device list.


Many new events were introduced in pygame 2.

pygame can recognize text or files dropped in its window. If a file is dropped, DROPFILE event will be sent, file will be its path. The DROPTEXT event is only supported on X11.

MIDIIN and MIDIOUT are events reserved for pygame.midipygame module for interacting with midi input and output. use. MIDI* events differ from AUDIODEVICE* events in that AUDIODEVICE events are triggered when there is a state change related to an audio input/output device.

pygame 2 also supports controller hot-plugging

Event name               Attributes and notes

DROPFILE                 file
DROPBEGIN                (SDL backend >= 2.0.5)
DROPCOMPLETE             (SDL backend >= 2.0.5)
DROPTEXT                 text (SDL backend >= 2.0.5)
MIDIIN
MIDIOUT
CONTROLLERDEVICEADDED    device_index
JOYDEVICEADDED           device_index
CONTROLLERDEVICEREMOVED  instance_id
JOYDEVICEREMOVED         instance_id
CONTROLLERDEVICEREMAPPED instance_id
KEYMAPCHANGED            (SDL backend >= 2.0.4)
CLIPBOARDUPDATE
RENDER_TARGETS_RESET     (SDL backend >= 2.0.2)
RENDER_DEVICE_RESET      (SDL backend >= 2.0.4)
LOCALECHANGED            (SDL backend >= 2.0.14)

Also in this version, instance_id attributes were added to joystick events, and the joy attribute was deprecated.

KEYMAPCHANGED is a type of an event sent when keymap changes due to a system event such as an input language or keyboard layout change.

CLIPBOARDUPDATE is an event sent when clipboard changes. This can still be considered as an experimental feature, some kinds of clipboard changes might not trigger this event.

LOCALECHANGED is an event sent when user locale changes

New in pygame 2.0.0.

New in pygame 2.1.3: KEYMAPCHANGED, CLIPBOARDUPDATE, RENDER_TARGETS_RESET, RENDER_DEVICE_RESET and LOCALECHANGED


Since pygame 2.0.1, there are a new set of events, called window events. Here is a list of all window events, along with a short description

Event type                Short description

WINDOWSHOWN            Window became shown
WINDOWHIDDEN           Window became hidden
WINDOWEXPOSED          Window got updated by some external event
WINDOWMOVED            Window got moved
WINDOWRESIZED          Window got resized
WINDOWSIZECHANGED      Window changed its size
WINDOWMINIMIZED        Window was minimized
WINDOWMAXIMIZED        Window was maximized
WINDOWRESTORED         Window was restored
WINDOWENTER            Mouse entered the window
WINDOWLEAVE            Mouse left the window
WINDOWFOCUSGAINED      Window gained focus
WINDOWFOCUSLOST        Window lost focus
WINDOWCLOSE            Window was closed
WINDOWTAKEFOCUS        Window was offered focus (SDL backend >= 2.0.5)
WINDOWHITTEST          Window has a special hit test (SDL backend >= 2.0.5)
WINDOWICCPROFCHANGED   Window ICC profile changed (SDL backend >= 2.0.18)
WINDOWDISPLAYCHANGED   Window moved on a new display (SDL backend >= 2.0.18)

WINDOWMOVED, WINDOWRESIZED and WINDOWSIZECHANGED have x and y attributes, WINDOWDISPLAYCHANGED has a display_index attribute. All windowevents have a window attribute.

New in pygame 2.0.1.

New in pygame 2.1.3: WINDOWICCPROFCHANGED and WINDOWDISPLAYCHANGED


On Android, the following events can be generated

Event type                 Short description

APP_TERMINATING           OS is terminating the application
APP_LOWMEMORY             OS is low on memory, try to free memory if possible
APP_WILLENTERBACKGROUND   Application is entering background
APP_DIDENTERBACKGROUND    Application entered background
APP_WILLENTERFOREGROUND   Application is entering foreground
APP_DIDENTERFOREGROUND    Application entered foreground

New in pygame 2.1.3.


pygame.event.pump()
internally process pygame event handlers
pump() -> None

For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call pygame.event.pump() to allow pygame to handle internal actions.

This function is not necessary if your program is consistently processing events on the queue through the other pygame.eventpygame module for interacting with events and queues functions.

There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.

Caution

This function should only be called in the thread that initialized pygame.displaypygame module to control the display window and screen.

pygame.event.get()
get events from the queue
get(eventtype=None) -> Eventlist
get(eventtype=None, pump=True) -> Eventlist
get(eventtype=None, pump=True, exclude=None) -> Eventlist

This will get all the messages and remove them from the queue. If a type or sequence of types is given only those messages will be removed from the queue and returned.

If a type or sequence of types is passed in the exclude argument instead, then all only other messages will be removed from the queue. If an exclude parameter is passed, the eventtype parameter must be None.

If you are only taking specific events from the queue, be aware that the queue could eventually fill up with the events you are not interested.

If pump is True (the default), then pygame.event.pump()internally process pygame event handlers will be called.

Changed in pygame 1.9.5: Added pump argument

Changed in pygame 2.0.2: Added exclude argument

pygame.event.poll()
get a single event from the queue
poll() -> Event instance

Returns a single event from the queue. If the event queue is empty an event of type pygame.NOEVENT will be returned immediately. The returned event is removed from the queue.

Caution

This function should only be called in the thread that initialized pygame.displaypygame module to control the display window and screen.

pygame.event.wait()
wait for a single event from the queue
wait() -> Event instance
wait(timeout) -> Event instance

Returns a single event from the queue. If the queue is empty this function will wait until one is created. From pygame 2.0.0, if a timeout argument is given, the function will return an event of type pygame.NOEVENT if no events enter the queue in timeout milliseconds. The event is removed from the queue once it has been returned. While the program is waiting it will sleep in an idle state. This is important for programs that want to share the system with other applications.

Changed in pygame 2.0.0.dev13: Added timeout argument

Caution

This function should only be called in the thread that initialized pygame.displaypygame module to control the display window and screen.

pygame.event.peek()
test if event types are waiting on the queue
peek(eventtype=None) -> bool
peek(eventtype=None, pump=True) -> bool

Returns True if there are any events of the given type waiting on the queue. If a sequence of event types is passed, this will return True if any of those events are on the queue.

If pump is True (the default), then pygame.event.pump()internally process pygame event handlers will be called.

Changed in pygame 1.9.5: Added pump argument

pygame.event.clear()
remove all events from the queue
clear(eventtype=None) -> None
clear(eventtype=None, pump=True) -> None

Removes all events from the queue. If eventtype is given, removes the given event or sequence of events. This has the same effect as pygame.event.get()get events from the queue except None is returned. It can be slightly more efficient when clearing a full event queue.

If pump is True (the default), then pygame.event.pump()internally process pygame event handlers will be called.

Changed in pygame 1.9.5: Added pump argument

pygame.event.event_name()
get the string name from an event id
event_name(type) -> string

Returns a string representing the name (in CapWords style) of the given event type.

"UserEvent" is returned for all values in the user event id range. "Unknown" is returned when the event type does not exist.

Changed in pygame 2.5.0: Added support for keyword arguments.

pygame.event.set_blocked()
control which events are allowed on the queue
set_blocked(type) -> None
set_blocked(typelist) -> None
set_blocked(None) -> None

The given event types are not allowed to appear on the event queue. By default all events can be placed on the queue. It is safe to disable an event type multiple times.

If None is passed as the argument, ALL of the event types are blocked from being placed on the queue.

pygame.event.set_allowed()
control which events are allowed on the queue
set_allowed(type) -> None
set_allowed(typelist) -> None
set_allowed(None) -> None

The given event types are allowed to appear on the event queue. By default, all event types can be placed on the queue. It is safe to enable an event type multiple times.

If None is passed as the argument, ALL of the event types are allowed to be placed on the queue.

pygame.event.get_blocked()
test if a type of event is blocked from the queue
get_blocked(type) -> bool
get_blocked(typelist) -> bool

Returns True if the given event type is blocked from the queue. If a sequence of event types is passed, this will return True if any of those event types are blocked.

pygame.event.set_grab()
control the sharing of input devices with other applications
set_grab(bool) -> None

When your program runs in a windowed environment, it will share the mouse and keyboard devices with other applications that have focus. If your program sets the event grab to True, it will lock all input into your program.

It is best to not always grab the input, since it prevents the user from doing other things on their system.

pygame.event.get_grab()
test if the program is sharing input devices
get_grab() -> bool

Returns True when the input events are grabbed for this application.

pygame.event.set_keyboard_grab()
grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.
set_keyboard_grab(bool) -> None

Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows). This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab.

New in pygame 2.5.0.

pygame.event.get_keyboard_grab()
get the current keyboard grab state
get_keyboard_grab() -> bool

Returns True when keyboard grab is enabled.

New in pygame 2.5.0.

pygame.event.post()
place a new event on the queue
post(Event) -> bool

Places the given event at the end of the event queue.

This is usually used for placing custom events on the event queue. Any type of event can be posted, and the events posted can have any attributes.

This returns a boolean on whether the event was posted or not. Blocked events cannot be posted, and this function returns False if you try to post them.

Changed in pygame 2.0.1: returns a boolean, previously returned None

pygame.event.custom_type()
make custom user event type
custom_type() -> int

Reserves a pygame.USEREVENT for a custom use.

If too many events are made a pygame.errorstandard pygame exception is raised.

New in pygame 2.0.0.dev3.

pygame.event.Event
pygame object for representing events
Event(type, dict) -> Event
Event(type, **attributes) -> Event
event type identifier.
event attribute dictionary

A pygame object used for representing an event. Event instances support attribute assignment and deletion.

When creating the object, the attributes may come from a dictionary argument with string keys or from keyword arguments.

Note

From version 2.1.3 EventType is an alias for Event. Beforehand, Event was a function that returned EventType instances. Use of Event is preferred over EventType wherever it is possible, as the latter could be deprecated in a future version.

type
event type identifier.
type -> int

Read-only. The event type identifier. For user created event objects, this is the type argument passed to pygame.event.Event()pygame object for representing events.

For example, some predefined event identifiers are QUIT and MOUSEMOTION.

__dict__
event attribute dictionary
__dict__ -> dict

Read-only. The event type specific attributes of an event. The dict attribute is a synonym for backward compatibility.

For example, the attributes of a KEYDOWN event would be unicode, key, and mod

New in pygame 1.9.2: Mutable attributes.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9071403 pygame-2.6.1/docs/generated/ref/examples.html0000644000175100001770000013474114676242423020601 0ustar00runnerdocker pygame.examples — pygame v2.6.1 documentation
pygame.examples
module of example programs
play the full aliens example
run a simple starfield example
hit the moving chimp
display animated objects on the screen
run a font rendering example
run a FreeType rendering example
display a vertical gradient
display pygame events
show various surfarray effects
load and play a sound
play various sndarray effects
display an animated liquid effect
display an animated 3D cube using OpenGL
access the clipboard
display multiple images bounce off each other using collision detection
show lots of sprites moving around
write an image file that is smoothscaled copy of an input file
demonstrate joystick functionality
demonstrate the various surface.fill method blend options
uses alternative additive fill to that of surface.fill
display two different custom cursors
display various pixelarray generated effects
interactively scale an image using smoothscale
run a midi example
run a Surface.scroll example that shows a magnified image
display video captured live from an attached camera
play an audio file

These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects.

There are several ways to run the examples. First they can be run as stand-alone programs. Second they can be imported and their main() methods called (see below). Finally, the easiest way is to use the python -m option:

python -m pygame.examples.<example name> <example arguments>

eg:

python -m pygame.examples.scaletest someimage.png

Resources such as images and sounds for the examples are found in the pygame/examples/data subdirectory.

You can find where the example files are installed by using the following commands inside the python interpreter.

>>> import pygame.examples.scaletest
>>> pygame.examples.scaletest.__file__
'/usr/lib/python2.6/site-packages/pygame/examples/scaletest.py'

On each OS and version of Python the location will be slightly different. For example on Windows it might be in 'C:/Python26/Lib/site-packages/pygame/examples/' On Mac OS X it might be in '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/examples/'

You can also run the examples in the python interpreter by calling each modules main() function.

>>> import pygame.examples.scaletest
>>> pygame.examples.scaletest.main()

We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming.

examples as a package is new to pygame 1.9.0. But most of the examples came with pygame much earlier.

aliens.main()
play the full aliens example
aliens.main() -> None

This started off as a port of the SDL demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck)

stars.main()
run a simple starfield example
stars.main() -> None

A simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen.

chimp.main()
hit the moving chimp
chimp.main() -> None

This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial.

moveit.main()
display animated objects on the screen
moveit.main() -> None

This is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen.

Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes.

fonty.main()
run a font rendering example
fonty.main() -> None

Super quick, super simple application demonstrating the different ways to render fonts with the font module

freetype_misc.main()
run a FreeType rendering example
freetype_misc.main() -> None

A showcase of rendering features the pygame.freetype.FontCreate a new Font instance from a supported font file. class provides in addition to those available with pygame.font.Fontcreate a new Font object from a file. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text, horizontally stretched text and vertically stretched text.

vgrade.main()
display a vertical gradient
vgrade.main() -> None

Demonstrates creating a vertical gradient with pixelcopy and NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :]

eventlist.main()
display pygame events
eventlist.main() -> None

Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom.

This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control.

arraydemo.main()
show various surfarray effects
arraydemo.main(arraytype=None) -> None

Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray

The arraytype parameter is deprecated; passing any value besides 'numpy' will raise ValueError.

sound.main()
load and play a sound
sound.main(file_path=None) -> None

Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics.

If provided, use the audio file 'file_path', otherwise use a default file.

sound.py optional command line argument: an audio file

sound_array_demos.main()
play various sndarray effects
sound_array_demos.main(arraytype=None) -> None

Uses sndarray and NumPy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echoes and the delay. Easy for you to recreate as needed.

The arraytype parameter is deprecated; passing any value besides 'numpy' will raise ValueError.

liquid.main()
display an animated liquid effect
liquid.main() -> None

This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap).

glcube.main()
display an animated 3D cube using OpenGL
glcube.main() -> None

Using PyOpenGL and pygame, this creates a spinning 3D multicolored cube.

scrap_clipboard.main()
access the clipboard
scrap_clipboard.main() -> None

A simple demonstration example for the clipboard support.

mask.main()
display multiple images bounce off each other using collision detection
mask.main(*args) -> None

Positional arguments:

one or more image file names.

This pygame.masks demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided.

If run as a program then mask.py takes one or more image files as command line arguments.

testsprite.main()
show lots of sprites moving around
testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None

Optional keyword arguments:

update_rects - use the RenderUpdate sprite group class
use_static - include non-moving images
use_FastRenderGroup - Use the FastRenderGroup sprite group
screen_dims - pygame window dimensions
use_alpha - use alpha blending
flags - additional display mode flags

Like the testsprite.c that comes with SDL, this pygame version shows lots of sprites moving around.

If run as a stand-alone program then no command line arguments are taken.

headless_no_windows_needed.main()
write an image file that is smoothscaled copy of an input file
headless_no_windows_needed.main(fin, fout, w, h) -> None

arguments:

fin - name of an input image file
fout - name of the output file to create/overwrite
w, h - size of the rescaled image, as integer width and height

How to use pygame with no windowing system, like on headless servers.

Thumbnail generation with scaling is an example of what you can do with pygame.

NOTE: the pygame scale function uses MMX/SSE if available, and can be run in multiple threads.

If headless_no_windows_needed.py is run as a program it takes the following command line arguments:

-scale inputimage outputimage new_width new_height
eg. -scale in.png outpng 50 50
joystick.main()
demonstrate joystick functionality
joystick.main() -> None

A demo showing full joystick support.

New in pygame 2.0.2.

blend_fill.main()
demonstrate the various surface.fill method blend options
blend_fill.main() -> None

A interactive demo that lets one choose which BLEND_xxx option to apply to a surface.

blit_blends.main()
uses alternative additive fill to that of surface.fill
blit_blends.main() -> None

Fake additive blending. Using NumPy. it doesn't clamp. Press r,g,b Somewhat like blend_fill.

cursors.main()
display two different custom cursors
cursors.main() -> None

Display an arrow or circle with crossbar cursor.

pixelarray.main()
display various pixelarray generated effects
pixelarray.main() -> None

Display various pixelarray generated effects.

scaletest.main()
interactively scale an image using smoothscale
scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None

arguments:

imagefile - file name of source image (required)
convert_alpha - use convert_alpha() on the surf (default False)
run_speed_test - (default False)

A smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler.

If scaletest.py is run as a program then the command line options are:

ImageFile [-t] [-convert_alpha]
[-t] = Run Speed Test
[-convert_alpha] = Use convert_alpha() on the surf.
midi.main()
run a midi example
midi.main(mode='output', device_id=None) -> None

Arguments:

mode - if 'output' run a midi keyboard output example
          'input' run a midi event logger input example
          'list' list available midi devices
       (default 'output')
device_id - midi device number; if None then use the default midi input or
            output device for the system

The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine.

The input example shows how to translate midi input to pygame events.

With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console.

new to pygame 1.9.0

scroll.main()
run a Surface.scroll example that shows a magnified image
scroll.main(image_file=None) -> None

This example shows a scrollable image that has a zoom factor of eight. It uses the Surface.scroll() function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used.

When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press ESC to quit.

camera.main()
display video captured live from an attached camera
camera.main() -> None

A simple live video player, it uses the first available camera it finds on the system.

playmus.main()
play an audio file
playmus.main(file_path) -> None

A simple music player with window and keyboard playback control. Playback can be paused and rewound to the beginning.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9271402 pygame-2.6.1/docs/generated/ref/fastevent.html0000644000175100001770000003447414676242423020764 0ustar00runnerdocker pygame.fastevent — pygame v2.6.1 documentation
pygame.fastevent
pygame module for interacting with events and queues
initialize pygame.fastevent
returns True if the fastevent module is currently initialized
internally process pygame event handlers
wait for an event
get an available event
get all events from the queue
place an event on the queue

IMPORTANT NOTE: THIS MODULE IS DEPRECATED IN PYGAME 2.2

In older pygame versions before pygame 2, pygame.eventpygame module for interacting with events and queues was not well suited for posting events from different threads. This module served as a replacement (with less features) for multithreaded use. Now, the usage of this module is highly discouraged in favour of use of the main pygame.eventpygame module for interacting with events and queues module. This module will be removed in a future pygame version.

Below, the legacy docs of the module is provided

pygame.fastevent.init()
initialize pygame.fastevent
init() -> None

Initialize the pygame.fastevent module.

pygame.fastevent.get_init()
returns True if the fastevent module is currently initialized
get_init() -> bool

Returns True if the pygame.fastevent module is currently initialized.

pygame.fastevent.pump()
internally process pygame event handlers
pump() -> None

For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system.

This function is not necessary if your program is consistently processing events on the queue through the other pygame.fasteventpygame module for interacting with events and queues functions.

There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up.

pygame.fastevent.wait()
wait for an event
wait() -> Event

Returns the current event on the queue. If there are no messages waiting on the queue, this will not return until one is available. Sometimes it is important to use this wait to get events from the queue, it will allow your application to idle when the user isn't doing anything with it.

pygame.fastevent.poll()
get an available event
poll() -> Event

Returns next event on queue. If there is no event waiting on the queue, this will return an event with type NOEVENT.

pygame.fastevent.get()
get all events from the queue
get() -> list of Events

This will get all the messages and remove them from the queue.

pygame.fastevent.post()
place an event on the queue
post(Event) -> None

This will post your own event objects onto the event queue. You can post any event type you want, but some care must be taken. For example, if you post a MOUSEBUTTONDOWN event to the queue, it is likely any code receiving the event will expect the standard MOUSEBUTTONDOWN attributes to be available, like 'pos' and 'button'.

Because pygame.fastevent.post() may have to wait for the queue to empty, you can get into a dead lock if you try to append an event on to a full queue from the thread that processes events. For that reason I do not recommend using this function in the main thread of an SDL program.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9871402 pygame-2.6.1/docs/generated/ref/font.html0000644000175100001770000013723314676242423017730 0ustar00runnerdocker pygame.font — pygame v2.6.1 documentation
pygame.font
pygame module for loading and rendering fonts
initialize the font module
uninitialize the font module
true if the font module is initialized
get the filename of the default font
gets SDL_ttf version
get all available fonts
find a specific font on the system
create a Font object from the system fonts
create a new Font object from a file

The font module allows for rendering TrueType fonts into Surface objects. This module is built on top of the SDL_ttf library, which comes with all normal pygame installations.

Most of the work done with fonts are done by using the actual Font objects. The module by itself only has routines to support the creation of Font objects with pygame.font.Font()create a new Font object from a file.

You can load fonts from the system by using the pygame.font.SysFont()create a Font object from the system fonts function. There are a few other functions to help look up the system fonts.

Pygame comes with a builtin default font, freesansbold. This can always be accessed by passing None as the font name.

Before pygame 2.0.3, pygame.font accepts any UCS-2 / UTF-16 character ('\u0001' to '\uFFFF'). After 2.0.3, pygame.font built with SDL_ttf 2.0.15 accepts any valid UCS-4 / UTF-32 character (like emojis, if the font has them) ('\U00000001' to '\U0010FFFF')). More about this in Font.render().

Before pygame 2.0.3, this character space restriction can be avoided by using the pygame.freetypeEnhanced pygame module for loading and rendering computer fonts based pygame.ftfont to emulate the Font module. This can be used by defining the environment variable PYGAME_FREETYPE before the first import of pygamethe top level pygame package. Since the problem pygame.ftfont solves no longer exists, it will likely be removed in the future.

pygame.font.init()
initialize the font module
init() -> None

This method is called automatically by pygame.init(). It initializes the font module. The module must be initialized before any other functions will work.

It is safe to call this function more than once.

pygame.font.quit()
uninitialize the font module
quit() -> None

Manually uninitialize SDL_ttf's font system. This is called automatically by pygame.quit().

It is safe to call this function even if font is currently not initialized.

pygame.font.get_init()
true if the font module is initialized
get_init() -> bool

Test if the font module is initialized or not.

pygame.font.get_default_font()
get the filename of the default font
get_default_font() -> string

Return the filename of the system font. This is not the full path to the file. This file can usually be found in the same directory as the font module, but it can also be bundled in separate archives.

pygame.font.get_sdl_ttf_version()
gets SDL_ttf version
get_sdl_ttf_version(linked=True) -> (major, minor, patch)

Experimental: feature still in development available for testing and feedback. It may change. Please leave get_sdl_ttf_version feedback with authors

Returns a tuple of integers that identify SDL_ttf's version. SDL_ttf is the underlying font rendering library, written in C, on which pygame's font module depends. If 'linked' is True (the default), the function returns the version of the linked TTF library. Otherwise this function returns the version of TTF pygame was compiled with

New in pygame 2.1.3.

pygame.font.get_fonts()
get all available fonts
get_fonts() -> list of strings

Returns a list of all the fonts available on the system. The names of the fonts will be set to lowercase with all spaces and punctuation removed. This works on most systems, but some will return an empty list if they cannot find fonts.

Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.

pygame.font.match_font()
find a specific font on the system
match_font(name, bold=False, italic=False) -> path

Returns the full path to a font file on the system. If bold or italic are set to true, this will attempt to find the correct family of font.

The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. If none of the given names are found, None is returned.

New in pygame 2.0.1: Accept an iterable of font names.

Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.

Example:

print pygame.font.match_font('bitstreamverasans')
# output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
# (but only if you have Vera on your system)
pygame.font.SysFont()
create a Font object from the system fonts
SysFont(name, size, bold=False, italic=False) -> Font

Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.

The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.

New in pygame 2.0.1: Accept an iterable of font names.

Changed in pygame 2.1.3: Checks through user fonts instead of just global fonts for Windows.

pygame.font.Font
create a new Font object from a file
Font(file_path=None, size=12) -> Font
Font(file_path, size) -> Font
Font(pathlib.Path, size) -> Font
Font(object, size) -> Font
Gets or sets whether the font should be rendered in (faked) bold.
Gets or sets whether the font should be rendered in (faked) italics.
Gets or sets whether the font should be rendered with an underline.
Gets or sets whether the font should be rendered with a strikethrough.
draw text on a new Surface
determine the amount of space needed to render text
control if text is rendered with an underline
check if text will be rendered with an underline
control if text is rendered with a strikethrough
check if text will be rendered with a strikethrough
enable fake rendering of bold text
check if text will be rendered bold
enable fake rendering of italic text
gets the metrics for each character in the passed string
check if the text will be rendered italic
get the line space of the font text
get the height of the font
get the ascent of the font
get the descent of the font
set the script code for text shaping

Load a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is None the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. If no arguments are given then the default font will be used and a font size of 12 is used.

Font objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs.

bold
Gets or sets whether the font should be rendered in (faked) bold.
bold -> bool

Whether the font should be rendered in bold.

When set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.

New in pygame 2.0.0.

italic
Gets or sets whether the font should be rendered in (faked) italics.
italic -> bool

Whether the font should be rendered in italic.

When set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.

New in pygame 2.0.0.

underline
Gets or sets whether the font should be rendered with an underline.
underline -> bool

Whether the font should be rendered in underline.

When set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.

New in pygame 2.0.0.

strikethrough
Gets or sets whether the font should be rendered with a strikethrough.
strikethrough -> bool

Whether the font should be rendered with a strikethrough.

When set to True, all rendered fonts will include an strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.

New in pygame 2.1.3.

render()
draw text on a new Surface
render(text, antialias, color, background=None) -> Surface

This creates a new Surface with the specified text rendered on it. pygame.fontpygame module for loading and rendering fonts provides no way to directly draw text on an existing Surface: instead you must use Font.render() to create an image (Surface) of the text, then blit this image onto another Surface.

The text can only be a single line: newline characters are not rendered. Null characters ('x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('\u0001' to '\uFFFF') were previously supported and any greater unicode codepoint would raise a UnicodeError. Now, characters in the UCS-4 range are supported. For char strings a LATIN1 encoding is assumed. The antialias argument is a boolean: if True the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent.

The Surface returned will be of the dimensions required to hold the text. (the same as those returned by Font.size()). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font.

Depending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit RGB images. If the background is transparent a pixel alpha will be included.

Optimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values.

If you render '\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle newlines yourself.

Font rendering is not thread safe: only a single thread can render text at any time.

Changed in pygame 2.0.3: Rendering UCS4 unicode works and does not raise an exception. Use if hasattr(pygame.font, "UCS4"): to see if pygame supports rendering UCS4 unicode including more languages and emoji.

size()
determine the amount of space needed to render text
size(text) -> (width, height)

Returns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for word wrapping and other layout effects.

Be aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e".

set_underline()
control if text is rendered with an underline
set_underline(bool) -> None

When enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes.

Note

This is the same as the underline attribute.

get_underline()
check if text will be rendered with an underline
get_underline() -> bool

Return True when the font underline is enabled.

Note

This is the same as the underline attribute.

set_strikethrough()
control if text is rendered with a strikethrough
set_strikethrough(bool) -> None

When enabled, all rendered fonts will include a strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes.

Note

This is the same as the strikethrough attribute.

New in pygame 2.1.3.

get_strikethrough()
check if text will be rendered with a strikethrough
get_strikethrough() -> bool

Return True when the font strikethrough is enabled.

Note

This is the same as the strikethrough attribute.

New in pygame 2.1.3.

set_bold()
enable fake rendering of bold text
set_bold(bool) -> None

Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes.

Note

This is the same as the bold attribute.

get_bold()
check if text will be rendered bold
get_bold() -> bool

Return True when the font bold rendering mode is enabled.

Note

This is the same as the bold attribute.

set_italic()
enable fake rendering of italic text
set_italic(bool) -> None

Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes.

Note

This is the same as the italic attribute.

metrics()
gets the metrics for each character in the passed string
metrics(text) -> list

The list contains tuples for each character, which contain the minimum X offset, the maximum X offset, the minimum Y offset, the maximum Y offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character.

get_italic()
check if the text will be rendered italic
get_italic() -> bool

Return True when the font italic rendering mode is enabled.

Note

This is the same as the italic attribute.

get_linesize()
get the line space of the font text
get_linesize() -> int

Return the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines.

get_height()
get the height of the font
get_height() -> int

Return the height in pixels of the actual rendered text. This is the average size for each glyph in the font.

get_ascent()
get the ascent of the font
get_ascent() -> int

Return the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font.

get_descent()
get the descent of the font
get_descent() -> int

Return the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font.

set_script()
set the script code for text shaping
set_script(str) -> None

Experimental: feature still in development available for testing and feedback. It may change. Please leave feedback with authors

Sets the script used by harfbuzz text shaping, taking a 4 character script code as input. For example, Hindi is written in the Devanagari script, for which the script code is "Deva". See the full list of script codes in ISO 15924.

This method requires pygame built with SDL_ttf 2.20.0 or above. Otherwise the method will raise a pygame.error.

New in pygame 2.2.0.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.0921402 pygame-2.6.1/docs/generated/ref/freetype.html0000644000175100001770000030124214676242423020576 0ustar00runnerdocker pygame.freetype — pygame v2.6.1 documentation
pygame.freetype
Enhanced pygame module for loading and rendering computer fonts
Return the latest FreeType error
Return the FreeType version
Initialize the underlying FreeType library.
Shut down the underlying FreeType library.
Returns True if the FreeType module is currently initialized.
DEPRECATED: Use get_init() instead.
Return the glyph case size
Return the default pixel size in dots per inch
Set the default pixel size in dots per inch for the module
create a Font object from the system fonts
Get the filename of the default font
Create a new Font instance from a supported font file.

The pygame.freetype module is a replacement for pygame.fontpygame module for loading and rendering fonts. It has all of the functionality of the original, plus many new features. Yet is has absolutely no dependencies on the SDL_ttf library. It is implemented directly on the FreeType 2 library. The pygame.freetype module is not itself backward compatible with pygame.fontpygame module for loading and rendering fonts. Instead, use the pygame.ftfont module as a drop-in replacement for pygame.fontpygame module for loading and rendering fonts.

All font file formats supported by FreeType can be rendered by pygame.freetype, namely TTF, Type1, CFF, OpenType, SFNT, PCF, FNT, BDF, PFR and Type42 fonts. All glyphs having UTF-32 code points are accessible (see Font.ucs4).

Most work on fonts is done using Font instances. The module itself only has routines for initialization and creation of Font objects. You can load fonts from the system using the SysFont() function.

Extra support of bitmap fonts is available. Available bitmap sizes can be listed (see Font.get_sizes()). For bitmap only fonts Font can set the size for you (see the Font.size property).

For now undefined character codes are replaced with the .notdef (not defined) character. How undefined codes are handled may become configurable in a future release.

Pygame comes with a built-in default font. This can always be accessed by passing None as the font name to the Font constructor.

Extra rendering features available to pygame.freetype.FontCreate a new Font instance from a supported font file. are direct to surface rendering (see Font.render_to()), character kerning (see Font.kerning), vertical layout (see Font.vertical), rotation of rendered text (see Font.rotation), and the strong style (see Font.strong). Some properties are configurable, such as strong style strength (see Font.strength) and underline positioning (see Font.underline_adjustment). Text can be positioned by the upper right corner of the text box or by the text baseline (see Font.origin). Finally, a font's vertical and horizontal size can be adjusted separately (see Font.size). The pygame.examples.freetype_misc example shows these features in use.

The pygame package does not import freetype automatically when loaded. This module must be imported explicitly to be used.

import pygame
import pygame.freetype

New in pygame 1.9.2: freetype

pygame.freetype.get_error()
Return the latest FreeType error
get_error() -> str
get_error() -> None

Return a description of the last error which occurred in the FreeType2 library, or None if no errors have occurred.

pygame.freetype.get_version()
Return the FreeType version
get_version(linked=True) -> (int, int, int)

Returns the version of the FreeType library in use by this module. linked=True is the default behavior and returns the linked version of FreeType and linked=False returns the compiled version of FreeType.

Note that the freetype module depends on the FreeType 2 library. It will not compile with the original FreeType 1.0. Hence, the first element of the tuple will always be "2".

Changed in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked version

pygame.freetype.init()
Initialize the underlying FreeType library.
init(cache_size=64, resolution=72) -> None

This function initializes the underlying FreeType library and must be called before trying to use any of the functionality of the freetype module.

However, pygame.init()initialize all imported pygame modules will automatically call this function if the freetype module is already imported. It is safe to call this function more than once.

Optionally, you may specify a default cache_size for the Glyph cache: the maximum number of glyphs that will be cached at any given time by the module. Exceedingly small values will be automatically tuned for performance. Also a default pixel resolution, in dots per inch, can be given to adjust font scaling.

pygame.freetype.quit()
Shut down the underlying FreeType library.
quit() -> None

This function closes the freetype module. After calling this function, you should not invoke any class, method or function related to the freetype module as they are likely to fail or might give unpredictable results. It is safe to call this function even if the module hasn't been initialized yet.

pygame.freetype.get_init()
Returns True if the FreeType module is currently initialized.
get_init() -> bool

Returns True if the pygame.freetype module is currently initialized.

New in pygame 1.9.5.

pygame.freetype.was_init()
DEPRECATED: Use get_init() instead.
was_init() -> bool

DEPRECATED: Returns True if the pygame.freetype module is currently initialized. Use get_init() instead.

pygame.freetype.get_cache_size()
Return the glyph case size
get_cache_size() -> long

See pygame.freetype.init()Initialize the underlying FreeType library..

pygame.freetype.get_default_resolution()
Return the default pixel size in dots per inch
get_default_resolution() -> long

Returns the default pixel size, in dots per inch, for the module. The default is 72 DPI.

pygame.freetype.set_default_resolution()
Set the default pixel size in dots per inch for the module
set_default_resolution([resolution])

Set the default pixel size, in dots per inch, for the module. If the optional argument is omitted or zero the resolution is reset to 72 DPI.

pygame.freetype.SysFont()
create a Font object from the system fonts
SysFont(name, size, bold=False, italic=False) -> Font

Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font.

The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order.

New in pygame 2.0.1: Accept an iterable of font names.

pygame.freetype.get_default_font()
Get the filename of the default font
get_default_font() -> string

Return the filename of the default pygame font. This is not the full path to the file. The file is usually in the same directory as the font module, but can also be bundled in a separate archive.

pygame.freetype.Font
Create a new Font instance from a supported font file.
Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font
Font(pathlib.Path) -> Font
Proper font name.
Font file path
The default point size used in rendering
Return the size and offset of rendered text
Return the glyph metrics for the given text
The unscaled height of the font in font units
The unscaled ascent of the font in font units
The unscaled descent of the font in font units
The scaled ascent of the font in pixels
The scaled descent of the font in pixels
The scaled height of the font in pixels
The scaled bounding box height of the font in pixels
return the available sizes of embedded bitmaps
Return rendered text as a surface
Render text onto an existing surface
Return rendered text as a string of bytes
Render text into an array of ints
The font's style flags
The state of the font's underline style flag
The state of the font's strong style flag
The state of the font's oblique style flag
The state of the font's wide style flag
The strength associated with the strong or wide font styles
Adjustment factor for the underline position
Gets whether the font is fixed-width
the number of available bitmap sizes for the font
Gets whether the font is scalable
allow the use of embedded bitmaps in an outline font file
Font anti-aliasing mode
Character kerning mode
Font vertical mode
text rotation in degrees counterclockwise
default foreground color
default background color
Font render to text origin mode
padded boundary mode
Enable UCS-4 mode
Pixel resolution in dots per inch

Argument file can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used.

Optionally, a size argument may be specified to set the default size in points, which determines the size of the rendered characters. The size can also be passed explicitly to each method call. Because of the way the caching system works, specifying a default size on the constructor doesn't imply a performance gain over manually passing the size on each function call. If the font is bitmap and no size is given, the default size is set to the first available size for the font.

If the font file has more than one font, the font to load can be chosen with the index argument. An exception is raised for an out-of-range font index value.

The optional resolution argument sets the pixel size, in dots per inch, for use in scaling glyphs for this Font instance. If 0 then the default module value, set by init(), is used. The Font object's resolution can only be changed by re-initializing the Font instance.

The optional ucs4 argument, an integer, sets the default text translation mode: 0 (False) recognize UTF-16 surrogate pairs, any other value (True), to treat Unicode text as UCS-4, with no surrogate pairs. See Font.ucs4.

name
Proper font name.
name -> string

Read only. Returns the real (long) name of the font, as recorded in the font file.

path
Font file path
path -> unicode

Read only. Returns the path of the loaded font file

size
The default point size used in rendering
size -> float
size -> (float, float)

Get or set the default size for text metrics and rendering. It can be a single point size, given as a Python int or float, or a font ppem (width, height) tuple. Size values are non-negative. A zero size or width represents an undefined size. In this case the size must be given as a method argument, or an exception is raised. A zero width but non-zero height is a ValueError.

For a scalable font, a single number value is equivalent to a tuple with width equal height. A font can be stretched vertically with height set greater than width, or horizontally with width set greater than height. For embedded bitmaps, as listed by get_sizes(), use the nominal width and height to select an available size.

Font size differs for a non-scalable, bitmap, font. During a method call it must match one of the available sizes returned by method get_sizes(). If not, an exception is raised. If the size is a single number, the size is first matched against the point size value. If no match, then the available size with the same nominal width and height is chosen.

get_rect()
Return the size and offset of rendered text
get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect

Gets the final dimensions and origin, in pixels, of text using the optional size in points, style, and rotation. For other relevant render properties, and for any optional argument not given, the default values set for the Font instance are used.

Returns a Rect instance containing the width and height of the text's bounding box and the position of the text's origin. The origin is useful in aligning separately rendered pieces of text. It gives the baseline position and bearing at the start of the text. See the render_to() method for an example.

If text is a char (byte) string, its encoding is assumed to be LATIN1.

Optionally, text can be None, which will return the bounding rectangle for the text passed to a previous get_rect(), render(), render_to(), render_raw(), or render_raw_to() call. See render_to() for more details.

get_metrics()
Return the glyph metrics for the given text
get_metrics(text, size=0) -> [(...), ...]

Returns the glyph metrics for each character in text.

The glyph metrics are returned as a list of tuples. Each tuple gives metrics of a single character glyph. The glyph metrics are:

(min_x, max_x, min_y, max_y, horizontal_advance_x, horizontal_advance_y)

The bounding box min_x, max_x, min_y, and max_y values are returned as grid-fitted pixel coordinates of type int. The advance values are float values.

The calculations are done using the font's default size in points. Optionally you may specify another point size with the size argument.

The metrics are adjusted for the current rotation, strong, and oblique settings.

If text is a char (byte) string, then its encoding is assumed to be LATIN1.

height
The unscaled height of the font in font units
height -> int

Read only. Gets the height of the font. This is the average value of all glyphs in the font.

ascender
The unscaled ascent of the font in font units
ascender -> int

Read only. Return the number of units from the font's baseline to the top of the bounding box.

descender
The unscaled descent of the font in font units
descender -> int

Read only. Return the height in font units for the font descent. The descent is the number of units from the font's baseline to the bottom of the bounding box.

get_sized_ascender()
The scaled ascent of the font in pixels
get_sized_ascender(<size>=0) -> int

Return the number of units from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.

get_sized_descender()
The scaled descent of the font in pixels
get_sized_descender(<size>=0) -> int

Return the number of pixels from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation.

get_sized_height()
The scaled height of the font in pixels
get_sized_height(<size>=0) -> int

Returns the height of the font. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.

get_sized_glyph_height()
The scaled bounding box height of the font in pixels
get_sized_glyph_height(<size>=0) -> int

Return the glyph bounding box height of the font in pixels. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation.

get_sizes()
return the available sizes of embedded bitmaps
get_sizes() -> [(int, int, int, float, float), ...]
get_sizes() -> []

Returns a list of tuple records, one for each point size supported. Each tuple containing the point size, the height in pixels, width in pixels, horizontal ppem (nominal width) in fractional pixels, and vertical ppem (nominal height) in fractional pixels.

render()
Return rendered text as a surface
render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)

Returns a new Surface, with the text rendered to it in the color given by 'fgcolor'. If no foreground color is given, the default foreground color, fgcolor is used. If bgcolor is given, the surface will be filled with this color. When no background color is given, the surface background is transparent, zero alpha. Normally the returned surface has a 32 bit pixel size. However, if bgcolor is None and anti-aliasing is disabled a monochrome 8 bit colorkey surface, with colorkey set for the background color, is returned.

The return value is a tuple: the new surface and the bounding rectangle giving the size and origin of the rendered text.

If an empty string is passed for text then the returned Rect is zero width and the height of the font.

Optional fgcolor, style, rotation, and size arguments override the default values set for the Font instance.

If text is a char (byte) string, then its encoding is assumed to be LATIN1.

Optionally, text can be None, which will render the text passed to a previous get_rect(), render(), render_to(), render_raw(), or render_raw_to() call. See render_to() for details.

render_to()
Render text onto an existing surface
render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect

Renders the string text to the pygame.Surfacepygame object for representing images surf, at position dest, a (x, y) surface coordinate pair. If either x or y is not an integer it is converted to one if possible. Any sequence where the first two items are x and y positional elements is accepted, including a Rect instance. As with render(), optional fgcolor, style, rotation, and size argument are available.

If a background color bgcolor is given, the text bounding box is first filled with that color. The text is blitted next. Both the background fill and text rendering involve full alpha blits. That is, the alpha values of the foreground, background, and destination target surface all affect the blit.

The return value is a rectangle giving the size and position of the rendered text within the surface.

If an empty string is passed for text then the returned Rect is zero width and the height of the font. The rect will test False.

Optionally, text can be set None, which will re-render text passed to a previous render_to(), get_rect(), render(), render_raw(), or render_raw_to() call. Primarily, this feature is an aid to using render_to() in combination with get_rect(). An example:

def word_wrap(surf, text, font, color=(0, 0, 0)):
    font.origin = True
    words = text.split(' ')
    width, height = surf.get_size()
    line_spacing = font.get_sized_height() + 2
    x, y = 0, line_spacing
    space = font.get_rect(' ')
    for word in words:
        bounds = font.get_rect(word)
        if x + bounds.width + bounds.x >= width:
            x, y = 0, y + line_spacing
        if x + bounds.width + bounds.x >= width:
            raise ValueError("word too wide for the surface")
        if y + bounds.height - bounds.y >= height:
            raise ValueError("text to long for the surface")
        font.render_to(surf, (x, y), None, color)
        x += bounds.width + space.width
    return x, y

When render_to() is called with the same font properties ― size, style, strength, wide, antialiased, vertical, rotation, kerning, and use_bitmap_strikes ― as get_rect(), render_to() will use the layout calculated by get_rect(). Otherwise, render_to() will recalculate the layout if called with a text string or one of the above properties has changed after the get_rect() call.

If text is a char (byte) string, then its encoding is assumed to be LATIN1.

render_raw()
Return rendered text as a string of bytes
render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))

Like render() but with the pixels returned as a byte string of 8-bit gray-scale values. The foreground color is 255, the background 0, useful as an alpha mask for a foreground pattern.

render_raw_to()
Render text into an array of ints
render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect

Render to an array object exposing an array struct interface. The array must be two dimensional with integer items. The default dest value, None, is equivalent to position (0, 0). See render_to(). As with the other render methods, text can be None to render a text string passed previously to another method.

The return value is a pygame.Rect()pygame object for storing rectangular coordinates giving the size and position of the rendered text.

style
The font's style flags
style -> int

Gets or sets the default style of the Font. This default style will be used for all text rendering and size calculations unless overridden specifically a render or get_rect() call. The style value may be a bit-wise OR of one or more of the following constants:

STYLE_NORMAL
STYLE_UNDERLINE
STYLE_OBLIQUE
STYLE_STRONG
STYLE_WIDE
STYLE_DEFAULT

These constants may be found on the FreeType constants module. Optionally, the default style can be modified or obtained accessing the individual style attributes (underline, oblique, strong).

The STYLE_OBLIQUE and STYLE_STRONG styles are for scalable fonts only. An attempt to set either for a bitmap font raises an AttributeError. An attempt to set either for an inactive font, as returned by Font.__new__(), raises a RuntimeError.

Assigning STYLE_DEFAULT to the style property leaves the property unchanged, as this property defines the default. The style property will never return STYLE_DEFAULT.

underline
The state of the font's underline style flag
underline -> bool

Gets or sets whether the font will be underlined when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or get_rect() call, via the 'style' parameter.

strong
The state of the font's strong style flag
strong -> bool

Gets or sets whether the font will be bold when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or get_rect() call, via the 'style' parameter.

oblique
The state of the font's oblique style flag
oblique -> bool

Gets or sets whether the font will be rendered as oblique. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or get_rect() call, via the style parameter.

The oblique style is only supported for scalable (outline) fonts. An attempt to set this style on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by Font.__new__(), setting this property raises a RuntimeError.

wide
The state of the font's wide style flag
wide -> bool

Gets or sets whether the font will be stretched horizontally when drawing text. It produces a result similar to pygame.font.Fontcreate a new Font object from a file's bold. This style not available for rotated text.

strength
The strength associated with the strong or wide font styles
strength -> float

The amount by which a font glyph's size is enlarged for the strong or wide transformations, as a fraction of the untransformed size. For the wide style only the horizontal dimension is increased. For strong text both the horizontal and vertical dimensions are enlarged. A wide style of strength 0.08333 ( 1/12 ) is equivalent to the pygame.font.Fontcreate a new Font object from a file bold style. The default is 0.02778 ( 1/36 ).

The strength style is only supported for scalable (outline) fonts. An attempt to set this property on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by Font.__new__(), assignment to this property raises a RuntimeError.

underline_adjustment
Adjustment factor for the underline position
underline_adjustment -> float

Gets or sets a factor which, when positive, is multiplied with the font's underline offset to adjust the underline position. A negative value turns an underline into a strike-through or overline. It is multiplied with the ascender. Accepted values range between -2.0 and 2.0 inclusive. A value of 0.5 closely matches Tango underlining. A value of 1.0 mimics pygame.font.Fontcreate a new Font object from a file underlining.

fixed_width
Gets whether the font is fixed-width
fixed_width -> bool

Read only. Returns True if the font contains fixed-width characters (for example Courier, Bitstream Vera Sans Mono, Andale Mono).

fixed_sizes
the number of available bitmap sizes for the font
fixed_sizes -> int

Read only. Returns the number of point sizes for which the font contains bitmap character images. If zero then the font is not a bitmap font. A scalable font may contain pre-rendered point sizes as strikes.

scalable
Gets whether the font is scalable
scalable -> bool

Read only. Returns True if the font contains outline glyphs. If so, the point size is not limited to available bitmap sizes.

use_bitmap_strikes
allow the use of embedded bitmaps in an outline font file
use_bitmap_strikes -> bool

Some scalable fonts include embedded bitmaps for particular point sizes. This property controls whether or not those bitmap strikes are used. Set it False to disable the loading of any bitmap strike. Set it True, the default, to permit bitmap strikes for a non-rotated render with no style other than wide or underline. This property is ignored for bitmap fonts.

See also fixed_sizes and get_sizes().

antialiased
Font anti-aliasing mode
antialiased -> bool

Gets or sets the font's anti-aliasing mode. This defaults to True on all fonts, which are rendered with full 8 bit blending.

Set to False to do monochrome rendering. This should provide a small speed gain and reduce cache memory size.

kerning
Character kerning mode
kerning -> bool

Gets or sets the font's kerning mode. This defaults to False on all fonts, which will be rendered without kerning.

Set to True to add kerning between character pairs, if supported by the font, when positioning glyphs.

vertical
Font vertical mode
vertical -> bool

Gets or sets whether the characters are laid out vertically rather than horizontally. May be useful when rendering Kanji or some other vertical script.

Set to True to switch to a vertical text layout. The default is False, place horizontally.

Note that the Font class does not automatically determine script orientation. Vertical layout must be selected explicitly.

Also note that several font formats (especially bitmap based ones) don't contain the necessary metrics to draw glyphs vertically, so drawing in those cases will give unspecified results.

rotation
text rotation in degrees counterclockwise
rotation -> int

Gets or sets the baseline angle of the rendered text. The angle is represented as integer degrees. The default angle is 0, with horizontal text rendered along the X-axis, and vertical text along the Y-axis. A positive value rotates these axes counterclockwise that many degrees. A negative angle corresponds to a clockwise rotation. The rotation value is normalized to a value within the range 0 to 359 inclusive (eg. 390 -> 390 - 360 -> 30, -45 -> 360 + -45 -> 315, 720 -> 720 - (2 * 360) -> 0).

Only scalable (outline) fonts can be rotated. An attempt to change the rotation of a bitmap font raises an AttributeError. An attempt to change the rotation of an inactive font instance, as returned by Font.__new__(), raises a RuntimeError.

fgcolor
default foreground color
fgcolor -> Color

Gets or sets the default glyph rendering color. It is initially opaque black ― (0, 0, 0, 255). Applies to render() and render_to().

bgcolor
default background color
bgcolor -> Color

Gets or sets the default background rendering color. Initially it is unset and text will render with a transparent background by default. Applies to render() and render_to().

New in pygame 2.0.0.

origin
Font render to text origin mode
origin -> bool

If set True, render_to() and render_raw_to() will take the dest position to be that of the text origin, as opposed to the top-left corner of the bounding box. See get_rect() for details.

pad
padded boundary mode
pad -> bool

If set True, then the text boundary rectangle will be inflated to match that of font.Font. Otherwise, the boundary rectangle is just large enough for the text.

ucs4
Enable UCS-4 mode
ucs4 -> bool

Gets or sets the decoding of Unicode text. By default, the freetype module performs UTF-16 surrogate pair decoding on Unicode text. This allows 32-bit escape sequences ('Uxxxxxxxx') between 0x10000 and 0x10FFFF to represent their corresponding UTF-32 code points on Python interpreters built with a UCS-2 Unicode type (on Windows, for instance). It also means character values within the UTF-16 surrogate area (0xD800 to 0xDFFF) are considered part of a surrogate pair. A malformed surrogate pair will raise a UnicodeEncodeError. Setting ucs4 True turns surrogate pair decoding off, allowing access the full UCS-4 character range to a Python interpreter built with four-byte Unicode character support.

resolution
Pixel resolution in dots per inch
resolution -> int

Read only. Gets pixel size used in scaling font glyphs for this Font instance.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.2331402 pygame-2.6.1/docs/generated/ref/gfxdraw.html0000644000175100001770000023516514676242423020427 0ustar00runnerdocker pygame.gfxdraw — pygame v2.6.1 documentation
pygame.gfxdraw
pygame module for drawing shapes
draw a pixel
draw a horizontal line
draw a vertical line
draw a line
draw a rectangle
draw a filled rectangle
draw a circle
draw an antialiased circle
draw a filled circle
draw an ellipse
draw an antialiased ellipse
draw a filled ellipse
draw an arc
draw a pie
draw a trigon/triangle
draw an antialiased trigon/triangle
draw a filled trigon/triangle
draw a polygon
draw an antialiased polygon
draw a filled polygon
draw a textured polygon
draw a Bezier curve

EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release.

The pygame package does not import gfxdraw automatically when loaded, so it must imported explicitly to be used.

import pygame
import pygame.gfxdraw

For all functions the arguments are strictly positional and integers are accepted for coordinates and radii. The color argument can be one of the following formats:

The functions rectangle() and box() will accept any (x, y, w, h) sequence for their rect argument, though pygame.Rectpygame object for storing rectangular coordinates instances are preferred.

To draw a filled antialiased shape, first use the antialiased (aa*) version of the function, and then use the filled (filled_*) version. For example:

col = (255, 0, 0)
surf.fill((255, 255, 255))
pygame.gfxdraw.aacircle(surf, x, y, 30, col)
pygame.gfxdraw.filled_circle(surf, x, y, 30, col)

Note

For threading, each of the functions releases the GIL during the C part of the call.

Note

See the pygame.drawpygame module for drawing shapes module for alternative draw methods. The pygame.gfxdraw module differs from the pygame.drawpygame module for drawing shapes module in the API it uses and the different draw functions available. pygame.gfxdraw wraps the primitives from the library called SDL_gfx, rather than using modified versions.

New in pygame 1.9.0.

pygame.gfxdraw.pixel()
draw a pixel
pixel(surface, x, y, color) -> None

Draws a single pixel, at position (x ,y), on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the pixel

  • y (int) -- y coordinate of the pixel

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.hline()
draw a horizontal line
hline(surface, x1, x2, y, color) -> None

Draws a straight horizontal line ((x1, y) to (x2, y)) on the given surface. There are no endcaps.

Parameters:
  • surface (Surface) -- surface to draw on

  • x1 (int) -- x coordinate of one end of the line

  • x2 (int) -- x coordinate of the other end of the line

  • y (int) -- y coordinate of the line

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.vline()
draw a vertical line
vline(surface, x, y1, y2, color) -> None

Draws a straight vertical line ((x, y1) to (x, y2)) on the given surface. There are no endcaps.

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the line

  • y1 (int) -- y coordinate of one end of the line

  • y2 (int) -- y coordinate of the other end of the line

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.line()
draw a line
line(surface, x1, y1, x2, y2, color) -> None

Draws a straight line ((x1, y1) to (x2, y2)) on the given surface. There are no endcaps.

Parameters:
  • surface (Surface) -- surface to draw on

  • x1 (int) -- x coordinate of one end of the line

  • y1 (int) -- y coordinate of one end of the line

  • x2 (int) -- x coordinate of the other end of the line

  • y2 (int) -- y coordinate of the other end of the line

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.rectangle()
draw a rectangle
rectangle(surface, rect, color) -> None

Draws an unfilled rectangle on the given surface. For a filled rectangle use box().

Parameters:
  • surface (Surface) -- surface to draw on

  • rect (Rect) -- rectangle to draw, position and dimensions

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Note

The rect.bottom and rect.right attributes of a pygame.Rectpygame object for storing rectangular coordinates always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.

pygame.gfxdraw.box()
draw a filled rectangle
box(surface, rect, color) -> None

Draws a filled rectangle on the given surface. For an unfilled rectangle use rectangle().

Parameters:
  • surface (Surface) -- surface to draw on

  • rect (Rect) -- rectangle to draw, position and dimensions

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Note

The rect.bottom and rect.right attributes of a pygame.Rectpygame object for storing rectangular coordinates always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing.

Note

The pygame.Surface.fill()fill Surface with a solid color method works just as well for drawing filled rectangles. In fact pygame.Surface.fill()fill Surface with a solid color can be hardware accelerated on some platforms with both software and hardware display modes.

pygame.gfxdraw.circle()
draw a circle
circle(surface, x, y, r, color) -> None

Draws an unfilled circle on the given surface. For a filled circle use filled_circle().

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the circle

  • y (int) -- y coordinate of the center of the circle

  • r (int) -- radius of the circle

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.aacircle()
draw an antialiased circle
aacircle(surface, x, y, r, color) -> None

Draws an unfilled antialiased circle on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the circle

  • y (int) -- y coordinate of the center of the circle

  • r (int) -- radius of the circle

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.filled_circle()
draw a filled circle
filled_circle(surface, x, y, r, color) -> None

Draws a filled circle on the given surface. For an unfilled circle use circle().

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the circle

  • y (int) -- y coordinate of the center of the circle

  • r (int) -- radius of the circle

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.ellipse()
draw an ellipse
ellipse(surface, x, y, rx, ry, color) -> None

Draws an unfilled ellipse on the given surface. For a filled ellipse use filled_ellipse().

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the ellipse

  • y (int) -- y coordinate of the center of the ellipse

  • rx (int) -- horizontal radius of the ellipse

  • ry (int) -- vertical radius of the ellipse

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.aaellipse()
draw an antialiased ellipse
aaellipse(surface, x, y, rx, ry, color) -> None

Draws an unfilled antialiased ellipse on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the ellipse

  • y (int) -- y coordinate of the center of the ellipse

  • rx (int) -- horizontal radius of the ellipse

  • ry (int) -- vertical radius of the ellipse

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.filled_ellipse()
draw a filled ellipse
filled_ellipse(surface, x, y, rx, ry, color) -> None

Draws a filled ellipse on the given surface. For an unfilled ellipse use ellipse().

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the ellipse

  • y (int) -- y coordinate of the center of the ellipse

  • rx (int) -- horizontal radius of the ellipse

  • ry (int) -- vertical radius of the ellipse

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.arc()
draw an arc
arc(surface, x, y, r, start_angle, stop_angle, color) -> None

Draws an arc on the given surface. For an arc with its endpoints connected to its center use pie().

The two angle arguments are given in degrees and indicate the start and stop positions of the arc. The arc is drawn in a clockwise direction from the start_angle to the stop_angle. If start_angle == stop_angle, nothing will be drawn

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the arc

  • y (int) -- y coordinate of the center of the arc

  • r (int) -- radius of the arc

  • start_angle (int) -- start angle in degrees

  • stop_angle (int) -- stop angle in degrees

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Note

This function uses degrees while the pygame.draw.arc()draw an elliptical arc function uses radians.

pygame.gfxdraw.pie()
draw a pie
pie(surface, x, y, r, start_angle, stop_angle, color) -> None

Draws an unfilled pie on the given surface. A pie is an arc() with its endpoints connected to its center.

The two angle arguments are given in degrees and indicate the start and stop positions of the pie. The pie is drawn in a clockwise direction from the start_angle to the stop_angle. If start_angle == stop_angle, a straight line will be drawn from the center position at the given angle, to a length of the radius.

Parameters:
  • surface (Surface) -- surface to draw on

  • x (int) -- x coordinate of the center of the pie

  • y (int) -- y coordinate of the center of the pie

  • r (int) -- radius of the pie

  • start_angle (int) -- start angle in degrees

  • stop_angle (int) -- stop angle in degrees

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.trigon()
draw a trigon/triangle
trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None

Draws an unfilled trigon (triangle) on the given surface. For a filled trigon use filled_trigon().

A trigon can also be drawn using polygon() e.g. polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)

Parameters:
  • surface (Surface) -- surface to draw on

  • x1 (int) -- x coordinate of the first corner of the trigon

  • y1 (int) -- y coordinate of the first corner of the trigon

  • x2 (int) -- x coordinate of the second corner of the trigon

  • y2 (int) -- y coordinate of the second corner of the trigon

  • x3 (int) -- x coordinate of the third corner of the trigon

  • y3 (int) -- y coordinate of the third corner of the trigon

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.aatrigon()
draw an antialiased trigon/triangle
aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None

Draws an unfilled antialiased trigon (triangle) on the given surface.

An aatrigon can also be drawn using aapolygon() e.g. aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)

Parameters:
  • surface (Surface) -- surface to draw on

  • x1 (int) -- x coordinate of the first corner of the trigon

  • y1 (int) -- y coordinate of the first corner of the trigon

  • x2 (int) -- x coordinate of the second corner of the trigon

  • y2 (int) -- y coordinate of the second corner of the trigon

  • x3 (int) -- x coordinate of the third corner of the trigon

  • y3 (int) -- y coordinate of the third corner of the trigon

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.filled_trigon()
draw a filled trigon/triangle
filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None

Draws a filled trigon (triangle) on the given surface. For an unfilled trigon use trigon().

A filled_trigon can also be drawn using filled_polygon() e.g. filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)

Parameters:
  • surface (Surface) -- surface to draw on

  • x1 (int) -- x coordinate of the first corner of the trigon

  • y1 (int) -- y coordinate of the first corner of the trigon

  • x2 (int) -- x coordinate of the second corner of the trigon

  • y2 (int) -- y coordinate of the second corner of the trigon

  • x3 (int) -- x coordinate of the third corner of the trigon

  • y3 (int) -- y coordinate of the third corner of the trigon

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

pygame.gfxdraw.polygon()
draw a polygon
polygon(surface, points, color) -> None

Draws an unfilled polygon on the given surface. For a filled polygon use filled_polygon().

The adjacent coordinates in the points argument, as well as the first and last points, will be connected by line segments. e.g. For the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2), from (x2, y2) to (x3, y3), and from (x3, y3) to (x1, y1).

Parameters:
  • surface (Surface) -- surface to draw on

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats (float values will be truncated)

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Raises:
  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • IndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)

pygame.gfxdraw.aapolygon()
draw an antialiased polygon
aapolygon(surface, points, color) -> None

Draws an unfilled antialiased polygon on the given surface.

The adjacent coordinates in the points argument, as well as the first and last points, will be connected by line segments. e.g. For the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2), from (x2, y2) to (x3, y3), and from (x3, y3) to (x1, y1).

Parameters:
  • surface (Surface) -- surface to draw on

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats (float values will be truncated)

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Raises:
  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • IndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)

pygame.gfxdraw.filled_polygon()
draw a filled polygon
filled_polygon(surface, points, color) -> None

Draws a filled polygon on the given surface. For an unfilled polygon use polygon().

The adjacent coordinates in the points argument, as well as the first and last points, will be connected by line segments. e.g. For the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2), from (x2, y2) to (x3, y3), and from (x3, y3) to (x1, y1).

Parameters:
  • surface (Surface) -- surface to draw on

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats (float values will be truncated)`

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Raises:
  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • IndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)

pygame.gfxdraw.textured_polygon()
draw a textured polygon
textured_polygon(surface, points, texture, tx, ty) -> None

Draws a textured polygon on the given surface. For better performance, the surface and the texture should have the same format.

A per-pixel alpha texture blit to a per-pixel alpha surface will differ from a pygame.Surface.blit()draw one image onto another blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination.

The adjacent coordinates in the points argument, as well as the first and last points, will be connected by line segments. e.g. For the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2), from (x2, y2) to (x3, y3), and from (x3, y3) to (x1, y1).

Parameters:
  • surface (Surface) -- surface to draw on

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats (float values will be truncated)

  • texture (Surface) -- texture to draw on the polygon

  • tx (int) -- x offset of the texture

  • ty (int) -- y offset of the texture

Returns:

None

Return type:

NoneType

Raises:
  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • IndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)

pygame.gfxdraw.bezier()
draw a Bezier curve
bezier(surface, points, steps, color) -> None

Draws a Bézier curve on the given surface.

Parameters:
  • surface (Surface) -- surface to draw on

  • points (tuple(coordinate) or list(coordinate)) -- a sequence of 3 or more (x, y) coordinates used to form a curve, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2a 2-Dimensional Vector of 2 ints/floats (float values will be truncated)

  • steps (int) -- number of steps for the interpolation, the minimum is 2

  • color (Color or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])

Returns:

None

Return type:

NoneType

Raises:
  • ValueError -- if steps < 2

  • ValueError -- if len(points) < 3 (must have at least 3 points)

  • IndexError -- if len(coordinate) < 2 (each coordinate must have at least 2 items)




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.2801402 pygame-2.6.1/docs/generated/ref/image.html0000644000175100001770000011537414676242423020046 0ustar00runnerdocker pygame.image — pygame v2.6.1 documentation
pygame.image
pygame module for image transfer
load new image from a file (or file-like object)
save an image to file (or file-like object)
get version number of the SDL_Image library being used
test if extended image formats can be loaded
transfer image to byte buffer
transfer image to byte buffer
create new Surface from a byte buffer
create new Surface from a byte buffer
create a new Surface that shares data inside a bytes buffer
load new BMP image from a file (or file-like object)
load an image from a file (or file-like object)
save a png/jpg image to file (or file-like object)

The image module contains functions for loading and saving pictures, as well as transferring Surfaces to formats usable by other packages.

Note that there is no Image class; an image is loaded as a Surface object. The Surface class allows manipulation (drawing lines, setting pixels, capturing regions, etc.).

In the vast majority of installations, pygame is built to support extended formats, using the SDL_Image library behind the scenes. However, some installations may only support uncompressed BMP images. With full image support, the pygame.image.load()load new image from a file (or file-like object) function can load the following formats.

  • BMP

  • GIF (non-animated)

  • JPEG

  • LBM (and PBM, PGM, PPM)

  • PCX

  • PNG

  • PNM

  • SVG (limited support, using Nano SVG)

  • TGA (uncompressed)

  • TIFF

  • WEBP

  • XPM

New in pygame 2.0: Loading SVG, WebP, PNM

Saving images only supports a limited set of formats. You can save to the following formats.

  • BMP

  • JPEG

  • PNG

  • TGA

JPEG and JPG, as well as TIF and TIFF refer to the same file format

New in pygame 1.8: Saving PNG and JPEG files.

pygame.image.load()
load new image from a file (or file-like object)
load(filename) -> Surface
load(fileobj, namehint="") -> Surface

Load an image from a file source. You can pass either a filename, a Python file-like object, or a pathlib.Path.

Pygame will automatically determine the image type (e.g., GIF or bitmap) and create a new Surface object from the data. In some cases it will need to know the file extension (e.g., GIF images should end in ".gif"). If you pass a raw file-like object, you may also want to pass the original filename as the namehint argument.

The returned Surface will contain the same color format, colorkey and alpha transparency as the file it came from. You will often want to call pygame.Surface.convert()change the pixel format of an image with no arguments, to create a copy that will draw more quickly on the screen.

For alpha transparency, like in .png images, use the pygame.Surface.convert_alpha()change the pixel format of an image including per pixel alphas method after loading so that the image has per pixel transparency.

Pygame may not always be built to support all image formats. At minimum it will support uncompressed BMP. If pygame.image.get_extended()test if extended image formats can be loaded returns True, you should be able to load most images (including PNG, JPG and GIF).

You should use os.path.join() for compatibility.

eg. asurf = pygame.image.load(os.path.join('data', 'bla.png'))
pygame.image.save()
save an image to file (or file-like object)
save(Surface, filename) -> None
save(Surface, fileobj, namehint="") -> None

This will save your Surface as either a BMP, TGA, PNG, or JPEG image. If the filename extension is unrecognized it will default to TGA. Both TGA, and BMP file formats create uncompressed files. You can pass a filename, a pathlib.Path or a Python file-like object. For file-like object, the image is saved to TGA format unless a namehint with a recognizable extension is passed in.

Note

When saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible.

Changed in pygame 1.8: Saving PNG and JPEG files.

Changed in pygame 2.0.0: The namehint parameter was added to make it possible to save other formats than TGA to a file-like object. Saving to a file-like object with JPEG is possible.

pygame.image.get_sdl_image_version()
get version number of the SDL_Image library being used
get_sdl_image_version(linked=True) -> None
get_sdl_image_version(linked=True) -> (major, minor, patch)

If pygame is built with extended image formats, then this function will return the SDL_Image library's version number as a tuple of 3 integers (major, minor, patch). If not, then it will return None.

linked=True is the default behavior and the function will return the version of the library that Pygame is linked against, while linked=False will return the version of the library that Pygame is compiled against.

New in pygame 2.0.0.

Changed in pygame 2.2.0: linked keyword argument added and default behavior changed from returning compiled version to returning linked version

pygame.image.get_extended()
test if extended image formats can be loaded
get_extended() -> bool

If pygame is built with extended image formats this function will return True. It is still not possible to determine which formats will be available, but generally you will be able to load them all.

pygame.image.tostring()
transfer image to byte buffer
tostring(Surface, format, flipped=False) -> bytes

Creates a string of bytes that can be transferred with the fromstring or frombytes methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass True for the flipped argument, the byte buffer will be vertically flipped.

The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.

  • P, 8-bit palettized Surfaces

  • RGB, 24-bit image

  • RGBX, 32-bit image with unused space

  • RGBA, 32-bit image with an alpha channel

  • ARGB, 32-bit image with alpha channel first

  • BGRA, 32-bit image with alpha channel, red and blue channels swapped

  • RGBA_PREMULT, 32-bit image with colors scaled by alpha channel

  • ARGB_PREMULT, 32-bit image with colors scaled by alpha channel, alpha channel first

Note

it is preferred to use tobytes() as of pygame 2.1.3

New in pygame 2.1.3: BGRA format

pygame.image.tobytes()
transfer image to byte buffer
tobytes(Surface, format, flipped=False) -> bytes

Creates a string of bytes that can be transferred with the fromstring or frombytes methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass True for the flipped argument, the byte buffer will be vertically flipped.

The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame.

  • P, 8-bit palettized Surfaces

  • RGB, 24-bit image

  • RGBX, 32-bit image with unused space

  • RGBA, 32-bit image with an alpha channel

  • ARGB, 32-bit image with alpha channel first

  • BGRA, 32-bit image with alpha channel, red and blue channels swapped

  • RGBA_PREMULT, 32-bit image with colors scaled by alpha channel

  • ARGB_PREMULT, 32-bit image with colors scaled by alpha channel, alpha channel first

Note

this function is an alias for tostring(). The use of this function is recommended over tostring() as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.

New in pygame 2.1.3.

pygame.image.fromstring()
create new Surface from a byte buffer
fromstring(bytes, size, format, flipped=False) -> Surface

This function takes arguments similar to pygame.image.tostring()transfer image to byte buffer. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.

The bytes and format passed must compute to the exact size of image specified. Otherwise a ValueError will be raised.

See the pygame.image.frombuffer()create a new Surface that shares data inside a bytes buffer method for a potentially faster way to transfer images into pygame.

Note

it is preferred to use frombytes() as of pygame 2.1.3

pygame.image.frombytes()
create new Surface from a byte buffer
frombytes(bytes, size, format, flipped=False) -> Surface

This function takes arguments similar to pygame.image.tobytes()transfer image to byte buffer. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in.

The bytes and format passed must compute to the exact size of image specified. Otherwise a ValueError will be raised.

See the pygame.image.frombuffer()create a new Surface that shares data inside a bytes buffer method for a potentially faster way to transfer images into pygame.

Note

this function is an alias for fromstring(). The use of this function is recommended over fromstring() as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations.

New in pygame 2.1.3.

pygame.image.frombuffer()
create a new Surface that shares data inside a bytes buffer
frombuffer(buffer, size, format) -> Surface

Create a new Surface that shares pixel data directly from a buffer. This buffer can be bytes, a bytearray, a memoryview, a pygame.BufferProxypygame object to export a surface buffer through an array protocol, or any object that supports the buffer protocol. This method takes similar arguments to pygame.image.fromstring()create new Surface from a byte buffer, but is unable to vertically flip the source data.

This will run much faster than pygame.image.fromstring()create new Surface from a byte buffer, since no pixel data must be allocated and copied.

It accepts the following 'format' arguments:

  • P, 8-bit palettized Surfaces

  • RGB, 24-bit image

  • BGR, 24-bit image, red and blue channels swapped.

  • RGBX, 32-bit image with unused space

  • RGBA, 32-bit image with an alpha channel

  • ARGB, 32-bit image with alpha channel first

  • BGRA, 32-bit image with alpha channel, red and blue channels swapped

New in pygame 2.1.3: BGRA format

pygame.image.load_basic()
load new BMP image from a file (or file-like object)
load_basic(file) -> Surface

Load an image from a file source. You can pass either a filename or a Python file-like object, or a pathlib.Path.

This function only supports loading "basic" image format, ie BMP format. This function is always available, no matter how pygame was built.

pygame.image.load_extended()
load an image from a file (or file-like object)
load_extended(filename) -> Surface
load_extended(fileobj, namehint="") -> Surface

This function is similar to pygame.image.load()load new image from a file (or file-like object), except that this function can only be used if pygame was built with extended image format support.

Changed in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.

pygame.image.save_extended()
save a png/jpg image to file (or file-like object)
save_extended(Surface, filename) -> None
save_extended(Surface, fileobj, namehint="") -> None

This will save your Surface as either a PNG or JPEG image.

In case the image is being saved to a file-like object, this function uses the namehint argument to determine the format of the file being saved. Saves to JPEG in case the namehint was not specified while saving to a file-like object.

Changed in pygame 2.0.1: This function is always available, but raises an NotImplementedError if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.37814 pygame-2.6.1/docs/generated/ref/joystick.html0000644000175100001770000027136014676242423020621 0ustar00runnerdocker pygame.joystick — pygame v2.6.1 documentation
pygame.joystick
Pygame module for interacting with joysticks, gamepads, and trackballs.
Initialize the joystick module.
Uninitialize the joystick module.
Returns True if the joystick module is initialized.
Returns the number of joysticks.
Create a new Joystick object.

The joystick module manages the joystick devices on a computer. Joystick devices include trackballs and video-game-style gamepads, and the module allows the use of multiple buttons and "hats". Computers may manage multiple joysticks at a time.

Each instance of the Joystick class represents one gaming device plugged into the computer. If a gaming pad has multiple joysticks on it, then the joystick object can actually represent multiple joysticks on that single game device.

For a quick way to initialise the joystick module and get a list of Joystick instances use the following code:

pygame.joystick.init()
joysticks = [pygame.joystick.Joystick(x) for x in range(pygame.joystick.get_count())]

The following event types will be generated by the joysticks

JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION

And in pygame 2, which supports hotplugging:

JOYDEVICEADDED JOYDEVICEREMOVED

Note that in pygame 2, joysticks events use a unique "instance ID". The device index passed in the constructor to a Joystick object is not unique after devices have been added and removed. You must call Joystick.get_instance_id() to find the instance ID that was assigned to a Joystick on opening.

The event queue needs to be pumped frequently for some of the methods to work. So call one of pygame.event.get, pygame.event.wait, or pygame.event.pump regularly.

To be able to get joystick events and update the joystick objects while the window is not in focus, you may set the SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS environment variable. See environment variables for more details.

pygame.joystick.init()
Initialize the joystick module.
init() -> None

This function is called automatically by pygame.init().

It initializes the joystick module. The module must be initialized before any other functions will work.

It is safe to call this function more than once.

pygame.joystick.quit()
Uninitialize the joystick module.
quit() -> None

Uninitialize the joystick module. After you call this any existing joystick objects will no longer work.

It is safe to call this function more than once.

pygame.joystick.get_init()
Returns True if the joystick module is initialized.
get_init() -> bool

Test if the pygame.joystick.init() function has been called.

pygame.joystick.get_count()
Returns the number of joysticks.
get_count() -> count

Return the number of joystick devices on the system. The count will be 0 if there are no joysticks on the system.

When you create Joystick objects using Joystick(id), you pass an integer that must be lower than this count.

pygame.joystick.Joystick
Create a new Joystick object.
Joystick(id) -> Joystick
initialize the Joystick
uninitialize the Joystick
check if the Joystick is initialized
get the device index (deprecated)
get the joystick instance id
get the joystick GUID
get the approximate power status of the device
get the Joystick system name
get the number of axes on a Joystick
get the current position of an axis
get the number of trackballs on a Joystick
get the relative position of a trackball
get the number of buttons on a Joystick
get the current button state
get the number of hat controls on a Joystick
get the position of a joystick hat
Start a rumbling effect
Stop any rumble effect playing

Create a new joystick to access a physical device. The id argument must be a value from 0 to pygame.joystick.get_count() - 1.

Joysticks are initialised on creation and are shut down when deallocated. Once the device is initialized the pygame event queue will start receiving events about its input.

Changed in pygame 2.0.0: Joystick objects are now opened immediately on creation.

init()
initialize the Joystick
init() -> None

Initialize the joystick, if it has been closed. It is safe to call this even if the joystick is already initialized.

Deprecated since pygame 2.0.0: In future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1.

quit()
uninitialize the Joystick
quit() -> None

Close a Joystick object. After this the pygame event queue will no longer receive events from the device.

It is safe to call this more than once.

get_init()
check if the Joystick is initialized
get_init() -> bool

Return True if the Joystick object is currently initialised.

get_id()
get the device index (deprecated)
get_id() -> int

Returns the original device index for this device. This is the same value that was passed to the Joystick() constructor. This method can safely be called while the Joystick is not initialized.

Deprecated since pygame 2.0.0: The original device index is not useful in pygame 2. Use get_instance_id() instead. Will be removed in Pygame 2.1.

get_instance_id() int
get the joystick instance id
get_instance_id() -> int

Get the joystick instance ID. This matches the instance_id field that is given in joystick events.

New in pygame 2.0.0dev11.

get_guid() str
get the joystick GUID
get_guid() -> str

Get the GUID string. This identifies the exact hardware of the joystick device.

New in pygame 2.0.0dev11.

get_power_level() str
get the approximate power status of the device
get_power_level() -> str

Get a string giving the power status of the device.

One of: empty, low, medium, full, wired, max, or unknown.

New in pygame 2.0.0dev11.

get_name()
get the Joystick system name
get_name() -> string

Returns the system name for this joystick device. It is unknown what name the system will give to the Joystick, but it should be a unique name that identifies the device. This method can safely be called while the Joystick is not initialized.

get_numaxes()
get the number of axes on a Joystick
get_numaxes() -> int

Returns the number of input axes are on a Joystick. There will usually be two for the position. Controls like rudders and throttles are treated as additional axes.

The pygame.JOYAXISMOTION events will be in the range from -1.0 to 1.0. A value of 0.0 means the axis is centered. Gamepad devices will usually be -1, 0, or 1 with no values in between. Older analog joystick axes will not always use the full -1 to 1 range, and the centered value will be some area around 0.

Analog joysticks usually have a bit of noise in their axis, which will generate a lot of rapid small motion events.

get_axis()
get the current position of an axis
get_axis(axis_number) -> float

Returns the current position of a joystick axis. The value will range from -1 to 1 with a value of 0 being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at 0 or using the full range of position values.

The axis number must be an integer from 0 to get_numaxes() - 1.

When using gamepads both the control sticks and the analog triggers are usually reported as axes.

get_numballs()
get the number of trackballs on a Joystick
get_numballs() -> int

Returns the number of trackball devices on a Joystick. These devices work similar to a mouse but they have no absolute position; they only have relative amounts of movement.

The pygame.JOYBALLMOTION event will be sent when the trackball is rolled. It will report the amount of movement on the trackball.

get_ball()
get the relative position of a trackball
get_ball(ball_number) -> x, y

Returns the relative movement of a joystick button. The value is a x, y pair holding the relative movement since the last call to get_ball.

The ball number must be an integer from 0 to get_numballs() - 1.

get_numbuttons()
get the number of buttons on a Joystick
get_numbuttons() -> int

Returns the number of pushable buttons on the joystick. These buttons have a boolean (on or off) state.

Buttons generate a pygame.JOYBUTTONDOWN and pygame.JOYBUTTONUP event when they are pressed and released.

get_button()
get the current button state
get_button(button) -> bool

Returns the current state of a joystick button.

get_numhats()
get the number of hat controls on a Joystick
get_numhats() -> int

Returns the number of joystick hats on a Joystick. Hat devices are like miniature digital joysticks on a joystick. Each hat has two axes of input.

The pygame.JOYHATMOTION event is generated when the hat changes position. The position attribute for the event contains a pair of values that are either -1, 0, or 1. A position of (0, 0) means the hat is centered.

get_hat()
get the position of a joystick hat
get_hat(hat_number) -> x, y

Returns the current position of a position hat. The position is given as two values representing the x and y position for the hat. (0, 0) means centered. A value of -1 means left/down and a value of 1 means right/up: so (-1, 0) means left; (1, 0) means right; (0, 1) means up; (1, 1) means upper-right; etc.

This value is digital, i.e., each coordinate can be -1, 0 or 1 but never in-between.

The hat number must be between 0 and get_numhats() - 1.

rumble()
Start a rumbling effect
rumble(low_frequency, high_frequency, duration) -> bool

Start a rumble effect on the joystick, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or Joystick.stop_rumble() is called. If an effect is already playing, then it will be overwritten.

Returns True if the rumble was played successfully or False if the joystick does not support it or pygame.version.SDL()tupled integers of the SDL library version is below 2.0.9.

New in pygame 2.0.2.

stop_rumble()
Stop any rumble effect playing
stop_rumble() -> None

Stops any rumble effect playing on the joystick. See Joystick.rumble() for more information.

New in pygame 2.0.2.

joystick module example

Example code for joystick module.

import pygame

pygame.init()


# This is a simple class that will help us print to the screen.
# It has nothing to do with the joysticks, just outputting the
# information.
class TextPrint:
    def __init__(self):
        self.reset()
        self.font = pygame.font.Font(None, 25)

    def tprint(self, screen, text):
        text_bitmap = self.font.render(text, True, (0, 0, 0))
        screen.blit(text_bitmap, (self.x, self.y))
        self.y += self.line_height

    def reset(self):
        self.x = 10
        self.y = 10
        self.line_height = 15

    def indent(self):
        self.x += 10

    def unindent(self):
        self.x -= 10


def main():
    # Set the width and height of the screen (width, height), and name the window.
    screen = pygame.display.set_mode((500, 700))
    pygame.display.set_caption("Joystick example")

    # Used to manage how fast the screen updates.
    clock = pygame.time.Clock()

    # Get ready to print.
    text_print = TextPrint()

    # This dict can be left as-is, since pygame will generate a
    # pygame.JOYDEVICEADDED event for every joystick connected
    # at the start of the program.
    joysticks = {}

    done = False
    while not done:
        # Event processing step.
        # Possible joystick events: JOYAXISMOTION, JOYBALLMOTION, JOYBUTTONDOWN,
        # JOYBUTTONUP, JOYHATMOTION, JOYDEVICEADDED, JOYDEVICEREMOVED
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                done = True  # Flag that we are done so we exit this loop.

            if event.type == pygame.JOYBUTTONDOWN:
                print("Joystick button pressed.")
                if event.button == 0:
                    joystick = joysticks[event.instance_id]
                    if joystick.rumble(0, 0.7, 500):
                        print(f"Rumble effect played on joystick {event.instance_id}")

            if event.type == pygame.JOYBUTTONUP:
                print("Joystick button released.")

            # Handle hotplugging
            if event.type == pygame.JOYDEVICEADDED:
                # This event will be generated when the program starts for every
                # joystick, filling up the list without needing to create them manually.
                joy = pygame.joystick.Joystick(event.device_index)
                joysticks[joy.get_instance_id()] = joy
                print(f"Joystick {joy.get_instance_id()} connencted")

            if event.type == pygame.JOYDEVICEREMOVED:
                del joysticks[event.instance_id]
                print(f"Joystick {event.instance_id} disconnected")

        # Drawing step
        # First, clear the screen to white. Don't put other drawing commands
        # above this, or they will be erased with this command.
        screen.fill((255, 255, 255))
        text_print.reset()

        # Get count of joysticks.
        joystick_count = pygame.joystick.get_count()

        text_print.tprint(screen, f"Number of joysticks: {joystick_count}")
        text_print.indent()

        # For each joystick:
        for joystick in joysticks.values():
            jid = joystick.get_instance_id()

            text_print.tprint(screen, f"Joystick {jid}")
            text_print.indent()

            # Get the name from the OS for the controller/joystick.
            name = joystick.get_name()
            text_print.tprint(screen, f"Joystick name: {name}")

            guid = joystick.get_guid()
            text_print.tprint(screen, f"GUID: {guid}")

            power_level = joystick.get_power_level()
            text_print.tprint(screen, f"Joystick's power level: {power_level}")

            # Usually axis run in pairs, up/down for one, and left/right for
            # the other. Triggers count as axes.
            axes = joystick.get_numaxes()
            text_print.tprint(screen, f"Number of axes: {axes}")
            text_print.indent()

            for i in range(axes):
                axis = joystick.get_axis(i)
                text_print.tprint(screen, f"Axis {i} value: {axis:>6.3f}")
            text_print.unindent()

            buttons = joystick.get_numbuttons()
            text_print.tprint(screen, f"Number of buttons: {buttons}")
            text_print.indent()

            for i in range(buttons):
                button = joystick.get_button(i)
                text_print.tprint(screen, f"Button {i:>2} value: {button}")
            text_print.unindent()

            hats = joystick.get_numhats()
            text_print.tprint(screen, f"Number of hats: {hats}")
            text_print.indent()

            # Hat position. All or nothing for direction, not a float like
            # get_axis(). Position is a tuple of int values (x, y).
            for i in range(hats):
                hat = joystick.get_hat(i)
                text_print.tprint(screen, f"Hat {i} value: {str(hat)}")
            text_print.unindent()

            text_print.unindent()

        # Go ahead and update the screen with what we've drawn.
        pygame.display.flip()

        # Limit to 30 frames per second.
        clock.tick(30)


if __name__ == "__main__":
    main()
    # If you forget this line, the program will 'hang'
    # on exit if running from IDLE.
    pygame.quit()

Controller mappings are drawn from the underlying SDL library which pygame uses and they differ between pygame 1 and pygame 2. Below are a couple of mappings for three popular controllers.

Axis and hat mappings are listed from -1 to +1.

Nintendo Switch Left Joy-Con (pygame 2.x)

The Nintendo Switch Left Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"

  • Buttons:

    D-pad Up        - Button 0
    D-pad Down      - Button 1
    D-pad Left      - Button 2
    D-pad Right     - Button 3
    SL              - Button 4
    SR              - Button 5
    -               - Button 8
    Stick In        - Button 10
    Capture         - Button 13
    L               - Button 14
    ZL              - Button 15
    
  • Hat/JoyStick:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    

Nintendo Switch Right Joy-Con (pygame 2.x)

The Nintendo Switch Right Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad"

  • Buttons:

    A Button        - Button 0
    B Button        - Button 1
    X Button        - Button 2
    Y Button        - Button 3
    SL              - Button 4
    SR              - Button 5
    +               - Button 9
    Stick In        - Button 11
    Home            - Button 12
    R               - Button 14
    ZR              - Button 15
    
  • Hat/JoyStick:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    

Nintendo Switch Pro Controller (pygame 2.x)

The Nintendo Switch Pro Controller has 6 axes, 16 buttons, and 0 hats. The controller is recognized as "Nintendo Switch Pro Controller".

  • Left Stick:

    Left -> Right   - Axis 0
    Up -> Down      - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 2
    Up -> Down      - Axis 3
    
  • Left Trigger:

    Out -> In       - Axis 4
    
  • Right Trigger:

    Out -> In       - Axis 5
    
  • Buttons:

    A Button        - Button 0
    B Button        - Button 1
    X Button        - Button 2
    Y Button        - Button 3
    - Button        - Button 4
    Home Button     - Button 5
    + Button        - Button 6
    L. Stick In     - Button 7
    R. Stick In     - Button 8
    Left Bumper     - Button 9
    Right Bumper    - Button 10
    D-pad Up        - Button 11
    D-pad Down      - Button 12
    D-pad Left      - Button 13
    D-pad Right     - Button 14
    Capture Button  - Button 15
    

XBox 360 Controller (pygame 2.x)

The Xbox 360 controller mapping has 6 axes, 11 buttons and 1 hat. The controller is recognized as "Xbox 360 Controller".

  • Left Stick:

    Left -> Right   - Axis 0
    Up   -> Down    - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 3
    Up   -> Down    - Axis 4
    
  • Left Trigger:

    Out -> In       - Axis 2
    
  • Right Trigger:

    Out -> In       - Axis 5
    
  • Buttons:

    A Button        - Button 0
    B Button        - Button 1
    X Button        - Button 2
    Y Button        - Button 3
    Left Bumper     - Button 4
    Right Bumper    - Button 5
    Back Button     - Button 6
    Start Button    - Button 7
    L. Stick In     - Button 8
    R. Stick In     - Button 9
    Guide Button    - Button 10
    
  • Hat/D-pad:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    

Playstation 4 Controller (pygame 2.x)

The PlayStation 4 controller mapping has 6 axes and 16 buttons. The controller is recognized as "PS4 Controller".

  • Left Stick:

    Left -> Right   - Axis 0
    Up   -> Down    - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 2
    Up   -> Down    - Axis 3
    
  • Left Trigger:

    Out -> In       - Axis 4
    
  • Right Trigger:

    Out -> In       - Axis 5
    
  • Buttons:

    Cross Button    - Button 0
    Circle Button   - Button 1
    Square Button   - Button 2
    Triangle Button - Button 3
    Share Button    - Button 4
    PS Button       - Button 5
    Options Button  - Button 6
    L. Stick In     - Button 7
    R. Stick In     - Button 8
    Left Bumper     - Button 9
    Right Bumper    - Button 10
    D-pad Up        - Button 11
    D-pad Down      - Button 12
    D-pad Left      - Button 13
    D-pad Right     - Button 14
    Touch Pad Click - Button 15
    

Playstation 5 Controller (pygame 2.x)

The PlayStation 5 controller mapping has 6 axes, 13 buttons, and 1 hat. The controller is recognized as "Sony Interactive Entertainment Wireless Controller".

  • Left Stick:

    Left -> Right   - Axis 0
    Up   -> Down    - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 3
    Up   -> Down    - Axis 4
    
  • Left Trigger:

    Out -> In       - Axis 2
    
  • Right Trigger:

    Out -> In       - Axis 5
    
  • Buttons:

    Cross Button    - Button 0
    Circle Button   - Button 1
    Square Button   - Button 2
    Triangle Button - Button 3
    Left Bumper     - Button 4
    Right Bumper    - Button 5
    Left Trigger    - Button 6
    Right Trigger   - Button 7
    Share Button    - Button 8
    Options Button  - Button 9
    PS Button       - Button 10
    Left Stick in   - Button 11
    Right Stick in  - Button 12
    
  • Hat/D-pad:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    

XBox 360 Controller (pygame 1.x)

The Xbox 360 controller mapping has 5 axes, 10 buttons, and 1 hat. The controller is recognized as "Controller (XBOX 360 For Windows)".

  • Left Stick:

    Left -> Right   - Axis 0
    Up   -> Down    - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 4
    Up   -> Down    - Axis 3
    
  • Left Trigger & Right Trigger:

    RT -> LT        - Axis 2
    
  • Buttons:

    A Button        - Button 0
    B Button        - Button 1
    X Button        - Button 2
    Y Button        - Button 3
    Left Bumper     - Button 4
    Right Bumper    - Button 5
    Back Button     - Button 6
    Start Button    - Button 7
    L. Stick In     - Button 8
    R. Stick In     - Button 9
    
  • Hat/D-pad:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    

Playstation 4 Controller (pygame 1.x)

The PlayStation 4 controller mapping has 6 axes, 14 buttons, and 1 hat. The controller is recognized as "Wireless Controller".

  • Left Stick:

    Left -> Right   - Axis 0
    Up   -> Down    - Axis 1
    
  • Right Stick:

    Left -> Right   - Axis 2
    Up   -> Down    - Axis 3
    
  • Left Trigger:

    Out -> In       - Axis 5
    
  • Right Trigger:

    Out -> In       - Axis 4
    
  • Buttons:

    Cross Button    - Button 0
    Circle Button   - Button 1
    Square Button   - Button 2
    Triangle Button - Button 3
    Left Bumper     - Button 4
    Right Bumper    - Button 5
    L. Trigger(Full)- Button 6
    R. Trigger(Full)- Button 7
    Share Button    - Button 8
    Options Button  - Button 9
    L. Stick In     - Button 10
    R. Stick In     - Button 11
    PS Button       - Button 12
    Touch Pad Click - Button 13
    
  • Hat/D-pad:

    Down -> Up      - Y Axis
    Left -> Right   - X Axis
    



Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.43414 pygame-2.6.1/docs/generated/ref/key.html0000644000175100001770000012170614676242423017550 0ustar00runnerdocker pygame.key — pygame v2.6.1 documentation
pygame.key
pygame module to work with the keyboard
true if the display is receiving keyboard input from the system
get the state of all keyboard buttons
determine which modifier keys are being held
temporarily set which modifier keys are pressed
control how held keys are repeated
see how held keys are repeated
get the name of a key identifier
get the key identifier from a key name
start handling Unicode text input events
stop handling Unicode text input events
controls the position of the candidate list

This module contains functions for dealing with the keyboard.

The pygame.eventpygame module for interacting with events and queues queue gets pygame.KEYDOWN and pygame.KEYUP events when the keyboard buttons are pressed and released. Both events have key and mod attributes.

  • key: an integer ID representing every key on the keyboard

  • mod: a bitmask of all the modifier keys that were in a pressed state when the event occurred

The pygame.KEYDOWN event has the additional attributes unicode and scancode.

  • unicode: a single character string that is the fully translated character entered, this takes into account the shift and composition keys

  • scancode: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys

New in pygame 2.0.0: The pygame.TEXTINPUT event is preferred to the unicode attribute of pygame.KEYDOWN. The attribute text contains the input.

The following is a list of all the constants (from pygame.localspygame constants) used to represent keyboard keys.

Portability note: The integers for key constants differ between pygame 1 and 2. Always use key constants (K_a) rather than integers directly (97) so that your key handling code works well on both pygame 1 and pygame 2.

pygame
Constant      ASCII   Description
---------------------------------
K_BACKSPACE   \b      backspace
K_TAB         \t      tab
K_CLEAR               clear
K_RETURN      \r      return
K_PAUSE               pause
K_ESCAPE      ^[      escape
K_SPACE               space
K_EXCLAIM     !       exclaim
K_QUOTEDBL    "       quotedbl
K_HASH        #       hash
K_DOLLAR      $       dollar
K_AMPERSAND   &       ampersand
K_QUOTE               quote
K_LEFTPAREN   (       left parenthesis
K_RIGHTPAREN  )       right parenthesis
K_ASTERISK    *       asterisk
K_PLUS        +       plus sign
K_COMMA       ,       comma
K_MINUS       -       minus sign
K_PERIOD      .       period
K_SLASH       /       forward slash
K_0           0       0
K_1           1       1
K_2           2       2
K_3           3       3
K_4           4       4
K_5           5       5
K_6           6       6
K_7           7       7
K_8           8       8
K_9           9       9
K_COLON       :       colon
K_SEMICOLON   ;       semicolon
K_LESS        <       less-than sign
K_EQUALS      =       equals sign
K_GREATER     >       greater-than sign
K_QUESTION    ?       question mark
K_AT          @       at
K_LEFTBRACKET [       left bracket
K_BACKSLASH   \       backslash
K_RIGHTBRACKET ]      right bracket
K_CARET       ^       caret
K_UNDERSCORE  _       underscore
K_BACKQUOTE   `       grave
K_a           a       a
K_b           b       b
K_c           c       c
K_d           d       d
K_e           e       e
K_f           f       f
K_g           g       g
K_h           h       h
K_i           i       i
K_j           j       j
K_k           k       k
K_l           l       l
K_m           m       m
K_n           n       n
K_o           o       o
K_p           p       p
K_q           q       q
K_r           r       r
K_s           s       s
K_t           t       t
K_u           u       u
K_v           v       v
K_w           w       w
K_x           x       x
K_y           y       y
K_z           z       z
K_DELETE              delete
K_KP0                 keypad 0
K_KP1                 keypad 1
K_KP2                 keypad 2
K_KP3                 keypad 3
K_KP4                 keypad 4
K_KP5                 keypad 5
K_KP6                 keypad 6
K_KP7                 keypad 7
K_KP8                 keypad 8
K_KP9                 keypad 9
K_KP_PERIOD   .       keypad period
K_KP_DIVIDE   /       keypad divide
K_KP_MULTIPLY *       keypad multiply
K_KP_MINUS    -       keypad minus
K_KP_PLUS     +       keypad plus
K_KP_ENTER    \r      keypad enter
K_KP_EQUALS   =       keypad equals
K_UP                  up arrow
K_DOWN                down arrow
K_RIGHT               right arrow
K_LEFT                left arrow
K_INSERT              insert
K_HOME                home
K_END                 end
K_PAGEUP              page up
K_PAGEDOWN            page down
K_F1                  F1
K_F2                  F2
K_F3                  F3
K_F4                  F4
K_F5                  F5
K_F6                  F6
K_F7                  F7
K_F8                  F8
K_F9                  F9
K_F10                 F10
K_F11                 F11
K_F12                 F12
K_F13                 F13
K_F14                 F14
K_F15                 F15
K_NUMLOCK             numlock
K_CAPSLOCK            capslock
K_SCROLLOCK           scrollock
K_RSHIFT              right shift
K_LSHIFT              left shift
K_RCTRL               right control
K_LCTRL               left control
K_RALT                right alt
K_LALT                left alt
K_RMETA               right meta
K_LMETA               left meta
K_LSUPER              left Windows key
K_RSUPER              right Windows key
K_MODE                mode shift
K_HELP                help
K_PRINT               print screen
K_SYSREQ              sysrq
K_BREAK               break
K_MENU                menu
K_POWER               power
K_EURO                Euro
K_AC_BACK             Android back button

The keyboard also has a list of modifier states (from pygame.localspygame constants) that can be assembled by bitwise-ORing them together.

pygame
Constant      Description
-------------------------
KMOD_NONE     no modifier keys pressed
KMOD_LSHIFT   left shift
KMOD_RSHIFT   right shift
KMOD_SHIFT    left shift or right shift or both
KMOD_LCTRL    left control
KMOD_RCTRL    right control
KMOD_CTRL     left control or right control or both
KMOD_LALT     left alt
KMOD_RALT     right alt
KMOD_ALT      left alt or right alt or both
KMOD_LMETA    left meta
KMOD_RMETA    right meta
KMOD_META     left meta or right meta or both
KMOD_CAPS     caps lock
KMOD_NUM      num lock
KMOD_MODE     AltGr

The modifier information is contained in the mod attribute of the pygame.KEYDOWN and pygame.KEYUP events. The mod attribute is a bitmask of all the modifier keys that were in a pressed state when the event occurred. The modifier information can be decoded using a bitwise AND (except for KMOD_NONE, which should be compared using equals ==). For example:

for event in pygame.event.get():
    if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP:
        if event.mod == pygame.KMOD_NONE:
            print('No modifier keys were in a pressed state when this '
                  'event occurred.')
        else:
            if event.mod & pygame.KMOD_LSHIFT:
                print('Left shift was in a pressed state when this event '
                      'occurred.')
            if event.mod & pygame.KMOD_RSHIFT:
                print('Right shift was in a pressed state when this event '
                      'occurred.')
            if event.mod & pygame.KMOD_SHIFT:
                print('Left shift or right shift or both were in a '
                      'pressed state when this event occurred.')
pygame.key.get_focused()
true if the display is receiving keyboard input from the system
get_focused() -> bool

Returns True when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use pygame.event.set_grab()control the sharing of input devices with other applications to grab all input.

pygame.key.get_pressed()
get the state of all keyboard buttons
get_pressed() -> bools

Returns a sequence of boolean values representing the state of every key on the keyboard. Use the key constant values to index the array. A True value means that the button is pressed.

Note

Getting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to pygame.key.get_pressed(). There is also no way to translate these pushed keys into a fully translated character value. See the pygame.KEYDOWN events on the pygame.eventpygame module for interacting with events and queues queue for this functionality.

New in pygame 2.2.0: The collection of bools returned by get_pressed can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes.

New in pygame 2.5.0: Iteration over the collection of bools returned by get_pressed is now restored. However it still does not make sense to iterate over it. Currently.

pygame.key.get_mods()
determine which modifier keys are being held
get_mods() -> int

Returns a single integer representing a bitmask of all the modifier keys being held. Using bitwise operators you can test if specific modifier keys are pressed.

pygame.key.set_mods()
temporarily set which modifier keys are pressed
set_mods(int) -> None

Create a bitmask of the modifier key constants you want to impose on your program.

pygame.key.set_repeat()
control how held keys are repeated
set_repeat() -> None
set_repeat(delay) -> None
set_repeat(delay, interval) -> None

When the keyboard repeat is enabled, keys that are held down will generate multiple pygame.KEYDOWN events. The delay parameter is the number of milliseconds before the first repeated pygame.KEYDOWN event will be sent. After that, another pygame.KEYDOWN event will be sent every interval milliseconds. If a delay value is provided and an interval value is not provided or is 0, then the interval will be set to the same value as delay.

To disable key repeat call this function with no arguments or with delay set to 0.

When pygame is initialized the key repeat is disabled.

Raises:

ValueError -- if delay or interval is < 0

Changed in pygame 2.0.0: A ValueError is now raised (instead of a pygame.error) if delay or interval is < 0.

pygame.key.get_repeat()
see how held keys are repeated
get_repeat() -> (delay, interval)

Get the delay and interval keyboard repeat values. Refer to pygame.key.set_repeat()control how held keys are repeated for a description of these values.

New in pygame 1.8.

pygame.key.name()
get the name of a key identifier
name(key, use_compat=True) -> str

Get the descriptive name of the button from a keyboard button id constant. Returns an empty string ("") if the key is not found.

If use_compat argument is True (which is the default), this function returns the legacy name of a key where applicable. The return value is expected to be the same across different pygame versions (provided the corresponding key constant exists and is unique). If the return value is passed to the key_code function, the original constant will be returned.

Experimental: use_compat parameter still in development for testing and feedback. It may change. Please leave use_compat feedback with authors

If this argument is False, the returned name may be prettier to display and may cover a wider range of keys than with use_compat, but there are no guarantees that this name will be the same across different pygame versions. If the name returned is passed to the key_code function, the original constant is returned back (this is an implementation detail which may change later, do not rely on this)

Changed in pygame 2.1.3: Added use_compat argument and guaranteed API stability for it

pygame.key.key_code()
get the key identifier from a key name
key_code(name=string) -> int

Get the key identifier code from the descriptive name of the key. This returns an integer matching one of the K_* keycodes. For example:

>>> pygame.key.key_code("return") == pygame.K_RETURN
True
>>> pygame.key.key_code("0") == pygame.K_0
True
>>> pygame.key.key_code("space") == pygame.K_SPACE
True
Raises:

ValueError -- if the key name is not known.

New in pygame 2.0.0.

pygame.key.start_text_input()
start handling Unicode text input events
start_text_input() -> None

Start receiving pygame.TEXTEDITING and pygame.TEXTINPUT events. If applicable, show the on-screen keyboard or IME editor.

For many languages, key presses will automatically generate a corresponding pygame.TEXTINPUT event. Special keys like escape or function keys, and certain key combinations will not generate pygame.TEXTINPUT events.

In other languages, entering a single symbol may require multiple key presses, or a language-specific user interface. In this case, pygame.TEXTINPUT events are preferable to pygame.KEYDOWN events for text input.

A pygame.TEXTEDITING event is received when an IME composition is started or changed. It contains the composition text, length, and editing start position within the composition (attributes text, length, and start, respectively). When the composition is committed (or non-IME input is received), a pygame.TEXTINPUT event is generated.

Text input events handling is on by default.

New in pygame 2.0.0.

pygame.key.stop_text_input()
stop handling Unicode text input events
stop_text_input() -> None

Stop receiving pygame.TEXTEDITING and pygame.TEXTINPUT events. If an on-screen keyboard or IME editor was shown with pygame.key.start_text_input(), hide it again.

Text input events handling is on by default.

To avoid triggering the IME editor or the on-screen keyboard when the user is holding down a key during gameplay, text input should be disabled once text entry is finished, or when the user clicks outside of a text box.

New in pygame 2.0.0.

pygame.key.set_text_input_rect()
controls the position of the candidate list
set_text_input_rect(Rect) -> None

This sets the rectangle used for typing with an IME. It controls where the candidate list will open, if supported.

New in pygame 2.0.0.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.44614 pygame-2.6.1/docs/generated/ref/locals.html0000644000175100001770000002036214676242423020231 0ustar00runnerdocker pygame.locals — pygame v2.6.1 documentation
pygame.locals
pygame constants

This module contains various constants used by pygame. Its contents are automatically placed in the pygame module namespace. However, an application can use pygame.locals to include only the pygame constants with a from pygame.locals import *.

Detailed descriptions of the various constants can be found throughout the pygame documentation. Here are the locations of some of them.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.55614 pygame-2.6.1/docs/generated/ref/mask.html0000644000175100001770000023626214676242424017720 0ustar00runnerdocker pygame.mask — pygame v2.6.1 documentation
pygame.mask
pygame module for image masks.
Creates a Mask from the given surface
Creates a mask by thresholding Surfaces
pygame object for representing 2D bitmasks

Useful for fast pixel perfect collision detection. A mask uses 1 bit per-pixel to store which parts collide.

New in pygame 1.8.

Changed in pygame 2.0.2: Mask functions now support keyword arguments.

Changed in pygame 2.0.2: Mask functions that take positions or offsets now support pygame.math.Vector2a 2-Dimensional Vector arguments.

pygame.mask.from_surface()
Creates a Mask from the given surface
from_surface(surface) -> Mask
from_surface(surface, threshold=127) -> Mask

Creates a Mask object from the given surface by setting all the opaque pixels and not setting the transparent pixels.

If the surface uses a color-key, then it is used to decide which bits in the resulting mask are set. All the pixels that are not equal to the color-key are set and the pixels equal to the color-key are not set.

If a color-key is not used, then the alpha value of each pixel is used to decide which bits in the resulting mask are set. All the pixels that have an alpha value greater than the threshold parameter are set and the pixels with an alpha value less than or equal to the threshold are not set.

Parameters:
  • surface (Surface) -- the surface to create the mask from

  • threshold (int) -- (optional) the alpha threshold (default is 127) to compare with each surface pixel's alpha value, if the surface is color-keyed this parameter is ignored

Returns:

a newly created Mask object from the given surface

Return type:

Mask

Note

This function is used to create the masks for pygame.sprite.collide_mask()Collision detection between two sprites, using masks..

pygame.mask.from_threshold()
Creates a mask by thresholding Surfaces
from_threshold(surface, color) -> Mask
from_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask

This is a more featureful method of getting a Mask from a surface.

If the optional othersurface is not used, all the pixels within the threshold of the color parameter are set in the resulting mask.

If the optional othersurface is used, every pixel in the first surface that is within the threshold of the corresponding pixel in othersurface is set in the resulting mask.

Parameters:
  • surface (Surface) -- the surface to create the mask from

  • color (Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]]) -- color used to check if the surface's pixels are within the given threshold range, this parameter is ignored if the optional othersurface parameter is supplied

  • threshold (Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]]) -- (optional) the threshold range used to check the difference between two colors (default is (0, 0, 0, 255))

  • othersurface (Surface) -- (optional) used to check whether the pixels of the first surface are within the given threshold range of the pixels from this surface (default is None)

  • palette_colors (int) -- (optional) indicates whether to use the palette colors or not, a nonzero value causes the palette colors to be used and a 0 causes them not to be used (default is 1)

Returns:

a newly created Mask object from the given surface

Return type:

Mask

pygame.mask.Mask
pygame object for representing 2D bitmasks
Mask(size=(width, height)) -> Mask
Mask(size=(width, height), fill=False) -> Mask
Returns a new copy of the mask
Returns the size of the mask
Returns a Rect based on the size of the mask
Gets the bit at the given position
Sets the bit at the given position
Returns the point of intersection
Returns the number of overlapping set bits
Returns a mask of the overlapping set bits
Sets all bits to 1
Sets all bits to 0
Flips all the bits
Resizes a mask
Draws a mask onto another
Erases a mask from another
Returns the number of set bits
Returns the centroid of the set bits
Returns the orientation of the set bits
Returns a list of points outlining an object
Returns the convolution of this mask with another mask
Returns a mask containing a connected component
Returns a list of masks of connected components
Returns a list of bounding rects of connected components
Returns a surface with the mask drawn on it

A Mask object is used to represent a 2D bitmask. Each bit in the mask represents a pixel. 1 is used to indicate a set bit and 0 is used to indicate an unset bit. Set bits in a mask can be used to detect collisions with other masks and their set bits.

A filled mask has all of its bits set to 1, conversely an unfilled/cleared/empty mask has all of its bits set to 0. Masks can be created unfilled (default) or filled by using the fill parameter. Masks can also be cleared or filled using the pygame.mask.Mask.clear()Sets all bits to 0 and pygame.mask.Mask.fill()Sets all bits to 1 methods respectively.

A mask's coordinates start in the top left corner at (0, 0) just like pygame.Surfacepygame object for representing images. Individual bits can be accessed using the pygame.mask.Mask.get_at()Gets the bit at the given position and pygame.mask.Mask.set_at()Sets the bit at the given position methods.

The methods overlap(), overlap_area(), overlap_mask(), draw(), erase(), and convolve() use an offset parameter to indicate the offset of another mask's top left corner from the calling mask's top left corner. The calling mask's top left corner is considered to be the origin (0, 0). Offsets are a sequence of two values (x_offset, y_offset). Positive and negative offset values are supported.

           0 to x (x_offset)
           :    :
   0 ..... +----:---------+
   to      |    :         |
   y .......... +-----------+
(y_offset) |    | othermask |
           |    +-----------+
           | calling_mask |
           +--------------+
Parameters:
  • size -- the dimensions of the mask (width and height)

  • fill (bool) -- (optional) create an unfilled mask (default: False) or filled mask (True)

Returns:

a newly created Mask object

Return type:

Mask

Changed in pygame 2.0.0: Shallow copy support added. The Mask class supports the special method __copy__() and shallow copying via copy.copy(mask).

Changed in pygame 2.0.0: Subclassing support added. The Mask class can be used as a base class.

Changed in pygame 1.9.5: Added support for keyword arguments.

Changed in pygame 1.9.5: Added the optional keyword parameter fill.

Changed in pygame 1.9.5: Added support for masks with a width and/or a height of 0.

copy()
Returns a new copy of the mask
copy() -> Mask
Returns:

a new copy of this mask, the new mask will have the same width, height, and set/unset bits as the original

Return type:

Mask

Note

If a mask subclass needs to copy any instance specific attributes then it should override the __copy__() method. The overridden __copy__() method needs to call super().__copy__() and then copy the required data as in the following example code.

class SubMask(pygame.mask.Mask):
    def __copy__(self):
        new_mask = super().__copy__()
        # Do any SubMask attribute copying here.
        return new_mask

New in pygame 2.0.0.

get_size()
Returns the size of the mask
get_size() -> (width, height)
Returns:

the size of the mask, (width, height)

Return type:

tuple(int, int)

get_rect()
Returns a Rect based on the size of the mask
get_rect(**kwargs) -> Rect

Returns a new pygame.Rect()pygame object for storing rectangular coordinates object based on the size of this mask. The rect's default position will be (0, 0) and its default width and height will be the same as this mask's. The rect's attributes can be altered via pygame.Rect()pygame object for storing rectangular coordinates attribute keyword arguments/values passed into this method. As an example, a_mask.get_rect(center=(10, 5)) would create a pygame.Rect()pygame object for storing rectangular coordinates based on the mask's size centered at the given position.

Parameters:

kwargs (dict) -- pygame.Rect()pygame object for storing rectangular coordinates attribute keyword arguments/values that will be applied to the rect

Returns:

a new pygame.Rect()pygame object for storing rectangular coordinates object based on the size of this mask with any pygame.Rect()pygame object for storing rectangular coordinates attribute keyword arguments/values applied to it

Return type:

Rect

New in pygame 2.0.0.

get_at()
Gets the bit at the given position
get_at(pos) -> int
Parameters:

pos -- the position of the bit to get (x, y)

Returns:

1 if the bit is set, 0 if the bit is not set

Return type:

int

Raises:

IndexError -- if the position is outside of the mask's bounds

set_at()
Sets the bit at the given position
set_at(pos) -> None
set_at(pos, value=1) -> None
Parameters:
  • pos -- the position of the bit to set (x, y)

  • value (int) -- any nonzero int will set the bit to 1, 0 will set the bit to 0 (default is 1)

Returns:

None

Return type:

NoneType

Raises:

IndexError -- if the position is outside of the mask's bounds

overlap()
Returns the point of intersection
overlap(other, offset) -> (x, y)
overlap(other, offset) -> None

Returns the first point of intersection encountered between this mask and other. A point of intersection is 2 overlapping set bits.

The current algorithm searches the overlapping area in sizeof(unsigned long int) * CHAR_BIT bit wide column blocks (the value of sizeof(unsigned long int) * CHAR_BIT is platform dependent, for clarity it will be referred to as W). Starting at the top left corner it checks bits 0 to W - 1 of the first row ((0, 0) to (W - 1, 0)) then continues to the next row ((0, 1) to (W - 1, 1)). Once this entire column block is checked, it continues to the next one (W to 2 * W - 1). This is repeated until it finds a point of intersection or the entire overlapping area is checked.

Parameters:
  • other (Mask) -- the other mask to overlap with this mask

  • offset -- the offset of other from this mask, for more details refer to the Mask offset notes

Returns:

point of intersection or None if no intersection

Return type:

tuple(int, int) or NoneType

overlap_area()
Returns the number of overlapping set bits
overlap_area(other, offset) -> numbits

Returns the number of overlapping set bits between between this mask and other.

This can be useful for collision detection. An approximate collision normal can be found by calculating the gradient of the overlapping area through the finite difference.

dx = mask.overlap_area(other, (x + 1, y)) - mask.overlap_area(other, (x - 1, y))
dy = mask.overlap_area(other, (x, y + 1)) - mask.overlap_area(other, (x, y - 1))
Parameters:
  • other (Mask) -- the other mask to overlap with this mask

  • offset -- the offset of other from this mask, for more details refer to the Mask offset notes

Returns:

the number of overlapping set bits

Return type:

int

overlap_mask()
Returns a mask of the overlapping set bits
overlap_mask(other, offset) -> Mask

Returns a Mask, the same size as this mask, containing the overlapping set bits between this mask and other.

Parameters:
  • other (Mask) -- the other mask to overlap with this mask

  • offset -- the offset of other from this mask, for more details refer to the Mask offset notes

Returns:

a newly created Mask with the overlapping bits set

Return type:

Mask

fill()
Sets all bits to 1
fill() -> None

Sets all bits in the mask to 1.

Returns:

None

Return type:

NoneType

clear()
Sets all bits to 0
clear() -> None

Sets all bits in the mask to 0.

Returns:

None

Return type:

NoneType

invert()
Flips all the bits
invert() -> None

Flips all of the bits in the mask. All the set bits are cleared to 0 and all the unset bits are set to 1.

Returns:

None

Return type:

NoneType

scale()
Resizes a mask
scale((width, height)) -> Mask

Creates a new Mask of the requested size with its bits scaled from this mask.

Parameters:

size -- the width and height (size) of the mask to create

Returns:

a new Mask object with its bits scaled from this mask

Return type:

Mask

Raises:

ValueError -- if width < 0 or height < 0

draw()
Draws a mask onto another
draw(other, offset) -> None

Performs a bitwise OR, drawing othermask onto this mask.

Parameters:
  • other (Mask) -- the mask to draw onto this mask

  • offset -- the offset of other from this mask, for more details refer to the Mask offset notes

Returns:

None

Return type:

NoneType

erase()
Erases a mask from another
erase(other, offset) -> None

Erases (clears) all bits set in other from this mask.

Parameters:
  • other (Mask) -- the mask to erase from this mask

  • offset -- the offset of other from this mask, for more details refer to the Mask offset notes

Returns:

None

Return type:

NoneType

count()
Returns the number of set bits
count() -> bits
Returns:

the number of set bits in the mask

Return type:

int

centroid()
Returns the centroid of the set bits
centroid() -> (x, y)

Finds the centroid (the center mass of the set bits) for this mask.

Returns:

a coordinate tuple indicating the centroid of the mask, it will return (0, 0) if the mask has no bits set

Return type:

tuple(int, int)

angle()
Returns the orientation of the set bits
angle() -> theta

Finds the approximate orientation (from -90 to 90 degrees) of the set bits in the mask. This works best if performed on a mask with only one connected component.

Returns:

the orientation of the set bits in the mask, it will return 0.0 if the mask has no bits set

Return type:

float

Note

See connected_component() for details on how a connected component is calculated.

outline()
Returns a list of points outlining an object
outline() -> [(x, y), ...]
outline(every=1) -> [(x, y), ...]

Returns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner.

The every optional parameter skips set bits in the outline. For example, setting it to 10 would return a list of every 10th set bit in the outline.

Parameters:

every (int) -- (optional) indicates the number of bits to skip over in the outline (default is 1)

Returns:

a list of points outlining the first connected component encountered, an empty list is returned if the mask has no bits set

Return type:

list[tuple(int, int)]

Note

See connected_component() for details on how a connected component is calculated.

convolve()
Returns the convolution of this mask with another mask
convolve(other) -> Mask
convolve(other, output=None, offset=(0, 0)) -> Mask

Convolve this mask with the given other Mask.

Parameters:
  • other (Mask) -- mask to convolve this mask with

  • output (Mask or NoneType) -- (optional) mask for output (default is None)

  • offset -- the offset of other from this mask, (default is (0, 0))

Returns:

a Mask with the (i - offset[0], j - offset[1]) bit set, if shifting other (such that its bottom right corner is at (i, j)) causes it to overlap with this mask

If an output Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size (MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1)) is created and returned.

Return type:

Mask

connected_component()
Returns a mask containing a connected component
connected_component() -> Mask
connected_component(pos) -> Mask

A connected component is a group (1 or more) of connected set bits (orthogonally and diagonally). The SAUF algorithm, which checks 8 point connectivity, is used to find a connected component in the mask.

By default this method will return a Mask containing the largest connected component in the mask. Optionally, a bit coordinate can be specified and the connected component containing it will be returned. If the bit at the given location is not set, the returned Mask will be empty (no bits set).

Parameters:

pos -- (optional) selects the connected component that contains the bit at this position

Returns:

a Mask object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returned

If the pos parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the pos parameter selects an unset bit.

Return type:

Mask

Raises:

IndexError -- if the optional pos parameter is outside of the mask's bounds

connected_components()
Returns a list of masks of connected components
connected_components() -> [Mask, ...]
connected_components(minimum=0) -> [Mask, ...]

Provides a list containing a Mask object for each connected component.

Parameters:

minimum (int) -- (optional) indicates the minimum number of bits (to filter out noise) per connected component (default is 0, which equates to no minimum and is equivalent to setting it to 1, as a connected component must have at least 1 bit set)

Returns:

a list containing a Mask object for each connected component, an empty list is returned if the mask has no bits set

Return type:

list[Mask]

Note

See connected_component() for details on how a connected component is calculated.

get_bounding_rects()
Returns a list of bounding rects of connected components
get_bounding_rects() -> [Rect, ...]

Provides a list containing a bounding rect for each connected component.

Returns:

a list containing a bounding rect for each connected component, an empty list is returned if the mask has no bits set

Return type:

list[Rect]

Note

See connected_component() for details on how a connected component is calculated.

to_surface()
Returns a surface with the mask drawn on it
to_surface() -> Surface
to_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface

Draws this mask on the given surface. Set bits (bits set to 1) and unset bits (bits set to 0) can be drawn onto a surface.

Parameters:
  • surface (Surface or None) -- (optional) Surface to draw mask onto, if no surface is provided one will be created (default is None, which will cause a surface with the parameters Surface(size=mask.get_size(), flags=SRCALPHA, depth=32) to be created, drawn on, and returned)

  • setsurface (Surface or None) -- (optional) use this surface's color values to draw set bits (default is None), if this surface is smaller than the mask any bits outside its bounds will use the setcolor value

  • unsetsurface (Surface or None) -- (optional) use this surface's color values to draw unset bits (default is None), if this surface is smaller than the mask any bits outside its bounds will use the unsetcolor value

  • setcolor (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None) -- (optional) color to draw set bits (default is (255, 255, 255, 255), white), use None to skip drawing the set bits, the setsurface parameter (if set) will takes precedence over this parameter

  • unsetcolor (Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None) -- (optional) color to draw unset bits (default is (0, 0, 0, 255), black), use None to skip drawing the unset bits, the unsetsurface parameter (if set) will takes precedence over this parameter

  • dest (Rect or tuple(int, int) or list(int, int) or Vector2(int, int)) -- (optional) surface destination of where to position the topleft corner of the mask being drawn (default is (0, 0)), if a Rect is used as the dest parameter, its x and y attributes will be used as the destination, NOTE1: rects with a negative width or height value will not be normalized before using their x and y values, NOTE2: this destination value is only used to position the mask on the surface, it does not offset the setsurface and unsetsurface from the mask, they are always aligned with the mask (i.e. position (0, 0) on the mask always corresponds to position (0, 0) on the setsurface and unsetsurface)

Returns:

the surface parameter (or a newly created surface if no surface parameter was provided) with this mask drawn on it

Return type:

Surface

Raises:

ValueError -- if the setsurface parameter or unsetsurface parameter does not have the same format (bytesize/bitsize/alpha) as the surface parameter

Note

To skip drawing the set bits, both setsurface and setcolor must be None. The setsurface parameter defaults to None, but setcolor defaults to a color value and therefore must be set to None.

Note

To skip drawing the unset bits, both unsetsurface and unsetcolor must be None. The unsetsurface parameter defaults to None, but unsetcolor defaults to a color value and therefore must be set to None.

New in pygame 2.0.0.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.66614 pygame-2.6.1/docs/generated/ref/math.html0000644000175100001770000035464614676242424017725 0ustar00runnerdocker pygame.math — pygame v2.6.1 documentation
pygame.math
pygame module for vector classes
returns value clamped to min and max.
interpolates between two values by a weight.
a 2-Dimensional Vector
a 3-Dimensional Vector

The pygame math module currently provides Vector classes in two and three dimensions, Vector2 and Vector3 respectively.

They support the following numerical operations: vec + vec, vec - vec, vec * number, number * vec, vec / number, vec // number, vec += vec, vec -= vec, vec *= number, vec /= number, vec //= number, round(vec, ndigits=0).

All these operations will be performed elementwise. In addition vec * vec will perform a scalar-product (a.k.a. dot-product). If you want to multiply every element from vector v with every element from vector w you can use the elementwise method: v.elementwise() * w

The coordinates of a vector can be retrieved or set using attributes or subscripts

v = pygame.Vector3()

v.x = 5
v[1] = 2 * v.x
print(v[1]) # 10

v.x == v[0]
v.y == v[1]
v.z == v[2]

Multiple coordinates can be set using slices or swizzling

v = pygame.Vector2()
v.xy = 1, 2
v[:] = 1, 2

New in pygame 1.9.2pre.

Changed in pygame 1.9.4: Removed experimental notice.

Changed in pygame 1.9.4: Allow scalar construction like GLSL Vector2(2) == Vector2(2.0, 2.0)

Changed in pygame 1.9.4: pygame.mathpygame module for vector classes import not required. More convenient pygame.Vector2 and pygame.Vector3.

Changed in pygame 2.2.0: round returns a new vector with components rounded to the specified digits.

pygame.math.clamp()
returns value clamped to min and max.
clamp(value, min, max) -> float

Experimental: feature still in development available for testing and feedback. It may change. Please leave clamp feedback with authors

Clamps a numeric value so that it's no lower than min, and no higher than max.

New in pygame 2.1.3.

pygame.math.lerp()
interpolates between two values by a weight.
lerp(a, b, weight) -> float

Linearly interpolates between a and b by weight using the formula a + (b-a) * weight.

If weight is 0.5, lerp will return the value half-way between a and b. When a = 10 and b = 20, lerp(a, b, 0.5) will return 15. You can think of weight as the percentage of interpolation from a to b, 0.0 being 0% and 1.0 being 100%.

lerp can be used for many things. You could rotate a sprite by a weight with angle = lerp(0, 360, weight). You could even scale an enemy's attack value based on the level you're playing:

FINAL_LEVEL = 10
current_level = 2

attack = lerp(10, 50, current_level/MAX_LEVEL) # 18

If you're on level 0, attack will be 10, if you're on level 10, attack will be 50. If you're on level 5, the result of current_level/MAX_LEVEL will be 0.5 which represents 50%, therefore attack will be 30, which is the midpoint of 10 and 50.

Raises a ValueError if weight is outside the range of [0, 1].

New in pygame 2.1.3.

pygame.math.Vector2
a 2-Dimensional Vector
Vector2() -> Vector2(0, 0)
Vector2(int) -> Vector2
Vector2(float) -> Vector2
Vector2(Vector2) -> Vector2
Vector2(x, y) -> Vector2
Vector2((x, y)) -> Vector2
calculates the dot- or scalar-product with the other vector
calculates the cross- or vector-product
returns the Euclidean magnitude of the vector.
returns the squared magnitude of the vector.
returns the Euclidean length of the vector.
returns the squared Euclidean length of the vector.
returns a vector with the same direction but length 1.
normalizes the vector in place so that its length is 1.
tests if the vector is normalized i.e. has length == 1.
scales the vector to a given length.
returns a vector reflected of a given normal.
reflect the vector of a given normal in place.
calculates the Euclidean distance to a given vector.
calculates the squared Euclidean distance to a given vector.
returns a vector moved toward the target by a given distance.
moves the vector toward its target at a given distance.
returns a linear interpolation to the given vector.
returns a spherical interpolation to the given vector.
The next operation will be performed elementwise.
rotates a vector by a given angle in degrees.
rotates a vector by a given angle in radians.
rotates the vector by a given angle in degrees in place.
rotates the vector by a given angle in radians in place.
rotates the vector by a given angle in radians in place.
calculates the angle to a given vector in degrees.
returns a tuple with radial distance and azimuthal angle.
Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple.
projects a vector onto another.
Returns a copy of itself.
Returns a copy of a vector with the magnitude clamped between max_length and min_length.
Clamps the vector's magnitude between max_length and min_length
Sets the coordinates of the vector.
Determines the tolerance of vector calculations.

Some general information about the Vector2 class.

Changed in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass

dot()
calculates the dot- or scalar-product with the other vector
dot(Vector2) -> float
cross()
calculates the cross- or vector-product
cross(Vector2) -> float

calculates the third component of the cross-product.

magnitude()
returns the Euclidean magnitude of the vector.
magnitude() -> float

calculates the magnitude of the vector which follows from the theorem: vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)

magnitude_squared()
returns the squared magnitude of the vector.
magnitude_squared() -> float

calculates the magnitude of the vector which follows from the theorem: vec.magnitude_squared() == vec.x**2 + vec.y**2. This is faster than vec.magnitude() because it avoids the square root.

length()
returns the Euclidean length of the vector.
length() -> float

calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length() == math.sqrt(vec.x**2 + vec.y**2)

length_squared()
returns the squared Euclidean length of the vector.
length_squared() -> float

calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length_squared() == vec.x**2 + vec.y**2. This is faster than vec.length() because it avoids the square root.

normalize()
returns a vector with the same direction but length 1.
normalize() -> Vector2

Returns a new vector that has length equal to 1 and the same direction as self.

normalize_ip()
normalizes the vector in place so that its length is 1.
normalize_ip() -> None

Normalizes the vector so that it has length equal to 1. The direction of the vector is not changed.

is_normalized()
tests if the vector is normalized i.e. has length == 1.
is_normalized() -> Bool

Returns True if the vector has length equal to 1. Otherwise it returns False.

scale_to_length()
scales the vector to a given length.
scale_to_length(float) -> None

Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length 0. If the vector is the zero vector (i.e. has length 0 thus no direction) a ValueError is raised.

reflect()
returns a vector reflected of a given normal.
reflect(Vector2) -> Vector2

Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.

reflect_ip()
reflect the vector of a given normal in place.
reflect_ip(Vector2) -> None

Changes the direction of self as if it would have been reflected of a surface with the given surface normal.

distance_to()
calculates the Euclidean distance to a given vector.
distance_to(Vector2) -> float
distance_squared_to()
calculates the squared Euclidean distance to a given vector.
distance_squared_to(Vector2) -> float
move_towards()
returns a vector moved toward the target by a given distance.
move_towards(Vector2, float) -> Vector2

Experimental: feature still in development available for testing and feedback. It may change. Please leave move_towards feedback with authors

Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.

New in pygame 2.1.3.

move_towards_ip()
moves the vector toward its target at a given distance.
move_towards_ip(Vector2, float) -> None

Experimental: feature still in development available for testing and feedback. It may change. Please leave move_towards_ip feedback with authors

Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.

New in pygame 2.1.3.

lerp()
returns a linear interpolation to the given vector.
lerp(Vector2, float) -> Vector2

Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned.

slerp()
returns a spherical interpolation to the given vector.
slerp(Vector2, float) -> Vector2

Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range [-1, 1]. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.

elementwise()
The next operation will be performed elementwise.
elementwise() -> VectorElementwiseProxy

Applies the following operation to each element of the vector.

rotate()
rotates a vector by a given angle in degrees.
rotate(angle) -> Vector2

Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_rad()
rotates a vector by a given angle in radians.
rotate_rad(angle) -> Vector2

Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.0.0.

rotate_ip()
rotates the vector by a given angle in degrees in place.
rotate_ip(angle) -> None

Rotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_ip_rad()
rotates the vector by a given angle in radians in place.
rotate_ip_rad(angle) -> None

DEPRECATED: Use rotate_rad_ip() instead.

New in pygame 2.0.0.

Deprecated since pygame 2.1.1.

rotate_rad_ip()
rotates the vector by a given angle in radians in place.
rotate_rad_ip(angle) -> None

Rotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.1.1.

angle_to()
calculates the angle to a given vector in degrees.
angle_to(Vector2) -> float

Returns the angle from self to the passed Vector2 that would rotate self to be aligned with the passed Vector2 without crossing over the negative x-axis.

angle_to image

Example demonstrating the angle returned

as_polar()
returns a tuple with radial distance and azimuthal angle.
as_polar() -> (r, phi)

Returns a tuple (r, phi) where r is the radial distance, and phi is the azimuthal angle.

from_polar()
Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple.
Vector2.from_polar((r, phi)) -> Vector2
Vector2().from_polar((r, phi)) -> None

If used from the class creates a Vector2(x,y), else sets x and y. The values of x and y are defined from a tuple (r, phi) where r is the radial distance, and phi is the azimuthal angle.

project()
projects a vector onto another.
project(Vector2) -> Vector2

Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see Wikipedia.

New in pygame 2.0.2.

copy()
Returns a copy of itself.
copy() -> Vector2

Returns a new Vector2 having the same dimensions.

New in pygame 2.1.1.

clamp_magnitude()
Returns a copy of a vector with the magnitude clamped between max_length and min_length.
clamp_magnitude(max_length) -> Vector2
clamp_magnitude(min_length, max_length) -> Vector2

Experimental: feature still in development available for testing and feedback. It may change. Please leave clamp_magnitude feedback with authors

Returns a new copy of a vector with the magnitude clamped between max_length and min_length. If only one argument is passed, it is taken to be the max_length

This function raises ValueError if min_length is greater than max_length, or if either of these values are negative.

New in pygame 2.1.3.

clamp_magnitude_ip()
Clamps the vector's magnitude between max_length and min_length
clamp_magnitude_ip(max_length) -> None
clamp_magnitude_ip(min_length, max_length) -> None

Experimental: feature still in development available for testing and feedback. It may change. Please leave clamp_magnitude_ip feedback with authors

Clamps the vector's magnitude between max_length and min_length. If only one argument is passed, it is taken to be the max_length

This function raises ValueError if min_length is greater than max_length, or if either of these values are negative.

New in pygame 2.1.3.

update()
Sets the coordinates of the vector.
update() -> None
update(int) -> None
update(float) -> None
update(Vector2) -> None
update(x, y) -> None
update((x, y)) -> None

Sets coordinates x and y in place.

New in pygame 1.9.5.

epsilon
Determines the tolerance of vector calculations.

Both Vector classes have a value named epsilon that defaults to 1e-6. This value acts as a numerical margin in various methods to account for floating point arithmetic errors. Specifically, epsilon is used in the following places:

  • comparing Vectors (== and !=)

  • the is_normalized method (if the square of the length is within epsilon of 1, it's normalized)

  • slerping (a Vector with a length of <epsilon is considered a zero vector, and can't slerp with that)

  • reflection (can't reflect over the zero vector)

  • projection (can't project onto the zero vector)

  • rotation (only used when rotating by a multiple of 90 degrees)

While it's possible to change epsilon for a specific instance of a Vector, all the other Vectors will retain the default value. Changing epsilon on a specific instance however could lead to some asymmetric behavior where symmetry would be expected, such as

u = pygame.Vector2(0, 1)
v = pygame.Vector2(0, 1.2)
u.epsilon = 0.5 # don't set it nearly this large

print(u == v) # >> True
print(v == u) # >> False

You'll probably never have to change epsilon from the default value, but in rare situations you might find that either the margin is too large or too small, in which case changing epsilon slightly might help you out.

pygame.math.Vector3
a 3-Dimensional Vector
Vector3() -> Vector3(0, 0, 0)
Vector3(int) -> Vector3
Vector3(float) -> Vector3
Vector3(Vector3) -> Vector3
Vector3(x, y, z) -> Vector3
Vector3((x, y, z)) -> Vector3
calculates the dot- or scalar-product with the other vector
calculates the cross- or vector-product
returns the Euclidean magnitude of the vector.
returns the squared Euclidean magnitude of the vector.
returns the Euclidean length of the vector.
returns the squared Euclidean length of the vector.
returns a vector with the same direction but length 1.
normalizes the vector in place so that its length is 1.
tests if the vector is normalized i.e. has length == 1.
scales the vector to a given length.
returns a vector reflected of a given normal.
reflect the vector of a given normal in place.
calculates the Euclidean distance to a given vector.
calculates the squared Euclidean distance to a given vector.
returns a vector moved toward the target by a given distance.
moves the vector toward its target at a given distance.
returns a linear interpolation to the given vector.
returns a spherical interpolation to the given vector.
The next operation will be performed elementwise.
rotates a vector by a given angle in degrees.
rotates a vector by a given angle in radians.
rotates the vector by a given angle in degrees in place.
rotates the vector by a given angle in radians in place.
rotates the vector by a given angle in radians in place.
rotates a vector around the x-axis by the angle in degrees.
rotates a vector around the x-axis by the angle in radians.
rotates the vector around the x-axis by the angle in degrees in place.
rotates the vector around the x-axis by the angle in radians in place.
rotates the vector around the x-axis by the angle in radians in place.
rotates a vector around the y-axis by the angle in degrees.
rotates a vector around the y-axis by the angle in radians.
rotates the vector around the y-axis by the angle in degrees in place.
rotates the vector around the y-axis by the angle in radians in place.
rotates the vector around the y-axis by the angle in radians in place.
rotates a vector around the z-axis by the angle in degrees.
rotates a vector around the z-axis by the angle in radians.
rotates the vector around the z-axis by the angle in degrees in place.
rotates the vector around the z-axis by the angle in radians in place.
rotates the vector around the z-axis by the angle in radians in place.
calculates the angle to a given vector in degrees.
returns a tuple with radial distance, inclination and azimuthal angle.
Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.
projects a vector onto another.
Returns a copy of itself.
Returns a copy of a vector with the magnitude clamped between max_length and min_length.
Clamps the vector's magnitude between max_length and min_length
Sets the coordinates of the vector.
Determines the tolerance of vector calculations.

Some general information about the Vector3 class.

Changed in pygame 2.1.3: Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass

dot()
calculates the dot- or scalar-product with the other vector
dot(Vector3) -> float
cross()
calculates the cross- or vector-product
cross(Vector3) -> Vector3

calculates the cross-product.

magnitude()
returns the Euclidean magnitude of the vector.
magnitude() -> float

calculates the magnitude of the vector which follows from the theorem: vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)

magnitude_squared()
returns the squared Euclidean magnitude of the vector.
magnitude_squared() -> float

calculates the magnitude of the vector which follows from the theorem: vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2. This is faster than vec.magnitude() because it avoids the square root.

length()
returns the Euclidean length of the vector.
length() -> float

calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)

length_squared()
returns the squared Euclidean length of the vector.
length_squared() -> float

calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2. This is faster than vec.length() because it avoids the square root.

normalize()
returns a vector with the same direction but length 1.
normalize() -> Vector3

Returns a new vector that has length equal to 1 and the same direction as self.

normalize_ip()
normalizes the vector in place so that its length is 1.
normalize_ip() -> None

Normalizes the vector so that it has length equal to 1. The direction of the vector is not changed.

is_normalized()
tests if the vector is normalized i.e. has length == 1.
is_normalized() -> Bool

Returns True if the vector has length equal to 1. Otherwise it returns False.

scale_to_length()
scales the vector to a given length.
scale_to_length(float) -> None

Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length 0. If the vector is the zero vector (i.e. has length 0 thus no direction) a ValueError is raised.

reflect()
returns a vector reflected of a given normal.
reflect(Vector3) -> Vector3

Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's.

reflect_ip()
reflect the vector of a given normal in place.
reflect_ip(Vector3) -> None

Changes the direction of self as if it would have been reflected of a surface with the given surface normal.

distance_to()
calculates the Euclidean distance to a given vector.
distance_to(Vector3) -> float
distance_squared_to()
calculates the squared Euclidean distance to a given vector.
distance_squared_to(Vector3) -> float
move_towards()
returns a vector moved toward the target by a given distance.
move_towards(Vector3, float) -> Vector3

Experimental: feature still in development available for testing and feedback. It may change. Please leave move_towards feedback with authors

Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.

New in pygame 2.1.3.

move_towards_ip()
moves the vector toward its target at a given distance.
move_towards_ip(Vector3, float) -> None

Experimental: feature still in development available for testing and feedback. It may change. Please leave move_towards_ip feedback with authors

Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector.

New in pygame 2.1.3.

lerp()
returns a linear interpolation to the given vector.
lerp(Vector3, float) -> Vector3

Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between 0 and 1, where 0 means self and 1 means other will be returned.

slerp()
returns a spherical interpolation to the given vector.
slerp(Vector3, float) -> Vector3

Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range [-1, 1]. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path.

elementwise()
The next operation will be performed elementwise.
elementwise() -> VectorElementwiseProxy

Applies the following operation to each element of the vector.

rotate()
rotates a vector by a given angle in degrees.
rotate(angle, Vector3) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_rad()
rotates a vector by a given angle in radians.
rotate_rad(angle, Vector3) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.0.0.

rotate_ip()
rotates the vector by a given angle in degrees in place.
rotate_ip(angle, Vector3) -> None

Rotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_ip_rad()
rotates the vector by a given angle in radians in place.
rotate_ip_rad(angle, Vector3) -> None

DEPRECATED: Use rotate_rad_ip() instead.

New in pygame 2.0.0.

Deprecated since pygame 2.1.1.

rotate_rad_ip()
rotates the vector by a given angle in radians in place.
rotate_rad_ip(angle, Vector3) -> None

Rotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.1.1.

rotate_x()
rotates a vector around the x-axis by the angle in degrees.
rotate_x(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_x_rad()
rotates a vector around the x-axis by the angle in radians.
rotate_x_rad(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.0.0.

rotate_x_ip()
rotates the vector around the x-axis by the angle in degrees in place.
rotate_x_ip(angle) -> None

Rotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_x_ip_rad()
rotates the vector around the x-axis by the angle in radians in place.
rotate_x_ip_rad(angle) -> None

DEPRECATED: Use rotate_x_rad_ip() instead.

New in pygame 2.0.0.

Deprecated since pygame 2.1.1.

rotate_x_rad_ip()
rotates the vector around the x-axis by the angle in radians in place.
rotate_x_rad_ip(angle) -> None

Rotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.1.1.

rotate_y()
rotates a vector around the y-axis by the angle in degrees.
rotate_y(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_y_rad()
rotates a vector around the y-axis by the angle in radians.
rotate_y_rad(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.0.0.

rotate_y_ip()
rotates the vector around the y-axis by the angle in degrees in place.
rotate_y_ip(angle) -> None

Rotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_y_ip_rad()
rotates the vector around the y-axis by the angle in radians in place.
rotate_y_ip_rad(angle) -> None

DEPRECATED: Use rotate_y_rad_ip() instead.

New in pygame 2.0.0.

Deprecated since pygame 2.1.1.

rotate_y_rad_ip()
rotates the vector around the y-axis by the angle in radians in place.
rotate_y_rad_ip(angle) -> None

Rotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.1.1.

rotate_z()
rotates a vector around the z-axis by the angle in degrees.
rotate_z(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_z_rad()
rotates a vector around the z-axis by the angle in radians.
rotate_z_rad(angle) -> Vector3

Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.0.0.

rotate_z_ip()
rotates the vector around the z-axis by the angle in degrees in place.
rotate_z_ip(angle) -> None

Rotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

rotate_z_ip_rad()
rotates the vector around the z-axis by the angle in radians in place.
rotate_z_ip_rad(angle) -> None

DEPRECATED: Use rotate_z_rad_ip() instead.

Deprecated since pygame 2.1.1.

rotate_z_rad_ip()
rotates the vector around the z-axis by the angle in radians in place.
rotate_z_rad_ip(angle) -> None

Rotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed).

New in pygame 2.1.1.

angle_to()
calculates the angle to a given vector in degrees.
angle_to(Vector3) -> float

Returns the angle between self and the given vector.

as_spherical()
returns a tuple with radial distance, inclination and azimuthal angle.
as_spherical() -> (r, theta, phi)

Returns a tuple (r, theta, phi) where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.

from_spherical()
Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.
Vector3.from_spherical((r, theta, phi)) -> Vector3
Vector3().from_spherical((r, theta, phi)) -> None

If used from the class creates a Vector3(x, y, z), else sets x, y, and z. The values of x, y, and z are from a tuple (r, theta, phi) where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle.

project()
projects a vector onto another.
project(Vector3) -> Vector3

Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see Wikipedia.

New in pygame 2.0.2.

copy()
Returns a copy of itself.
copy() -> Vector3

Returns a new Vector3 having the same dimensions.

New in pygame 2.1.1.

clamp_magnitude()
Returns a copy of a vector with the magnitude clamped between max_length and min_length.
clamp_magnitude(max_length) -> Vector3
clamp_magnitude(min_length, max_length) -> Vector3

Experimental: feature still in development available for testing and feedback. It may change. Please leave clamp_magnitude feedback with authors

Returns a new copy of a vector with the magnitude clamped between max_length and min_length. If only one argument is passed, it is taken to be the max_length

This function raises ValueError if min_length is greater than max_length, or if either of these values are negative.

New in pygame 2.1.3.

clamp_magnitude_ip()
Clamps the vector's magnitude between max_length and min_length
clamp_magnitude_ip(max_length) -> None
clamp_magnitude_ip(min_length, max_length) -> None

Experimental: feature still in development available for testing and feedback. It may change. Please leave clamp_magnitude_ip feedback with authors

Clamps the vector's magnitude between max_length and min_length. If only one argument is passed, it is taken to be the max_length

This function raises ValueError if min_length is greater than max_length, or if either of these values are negative.

New in pygame 2.1.3.

update()
Sets the coordinates of the vector.
update() -> None
update(int) -> None
update(float) -> None
update(Vector3) -> None
update(x, y, z) -> None
update((x, y, z)) -> None

Sets coordinates x, y, and z in place.

New in pygame 1.9.5.

epsilon
Determines the tolerance of vector calculations.

With lengths within this number, vectors are considered equal. For more information see pygame.math.Vector2.epsilonDetermines the tolerance of vector calculations.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.73414 pygame-2.6.1/docs/generated/ref/midi.html0000644000175100001770000014506014676242424017702 0ustar00runnerdocker pygame.midi — pygame v2.6.1 documentation
pygame.midi
pygame module for interacting with midi input and output.
initialize the midi module
uninitialize the midi module
returns True if the midi module is currently initialized
Input is used to get midi input from midi devices.
Output is used to send midi to an output device
gets the number of devices.
gets default input device number
gets default output device number
returns information about a midi device
converts midi events to pygame events
returns the current time in ms of the PortMidi timer
Converts a frequency into a MIDI note. Rounds to the closest midi note.
Converts a midi note to a frequency.
Returns the Ansi Note name for a midi number.
exception that pygame.midi functions and classes can raise

New in pygame 1.9.0.

The midi module can send output to midi devices and get input from midi devices. It can also list midi devices on the system.

The midi module supports real and virtual midi devices.

It uses the portmidi library. Is portable to which ever platforms portmidi supports (currently Windows, Mac OS X, and Linux).

This uses pyportmidi for now, but may use its own bindings at some point in the future. The pyportmidi bindings are included with pygame.


New in pygame 2.0.0.

These are pygame events (pygame.eventpygame module for interacting with events and queues) reserved for midi use. The MIDIIN event is used by pygame.midi.midis2events()converts midi events to pygame events when converting midi events to pygame events.

MIDIIN
MIDIOUT

pygame.midi.init()
initialize the midi module
init() -> None

Initializes the pygame.midipygame module for interacting with midi input and output. module. Must be called before using the pygame.midipygame module for interacting with midi input and output. module.

It is safe to call this more than once.

pygame.midi.quit()
uninitialize the midi module
quit() -> None

Uninitializes the pygame.midipygame module for interacting with midi input and output. module. If pygame.midi.init()initialize the midi module was called to initialize the pygame.midipygame module for interacting with midi input and output. module, then this function will be called automatically when your program exits.

It is safe to call this function more than once.

pygame.midi.get_init()
returns True if the midi module is currently initialized
get_init() -> bool

Gets the initialization state of the pygame.midipygame module for interacting with midi input and output. module.

Returns:

True if the pygame.midipygame module for interacting with midi input and output. module is currently initialized.

Return type:

bool

New in pygame 1.9.5.

pygame.midi.Input
Input is used to get midi input from midi devices.
Input(device_id) -> None
Input(device_id, buffer_size) -> None
closes a midi stream, flushing any pending buffers.
returns True if there's data, or False if not.
reads num_events midi events from the buffer.
Parameters:
  • device_id (int) -- midi device id

  • buffer_size (int) -- (optional) the number of input events to be buffered

close()
closes a midi stream, flushing any pending buffers.
close() -> None

PortMidi attempts to close open streams when the application exits.

Note

This is particularly difficult under Windows.

poll()
returns True if there's data, or False if not.
poll() -> bool

Used to indicate if any data exists.

Returns:

True if there is data, False otherwise

Return type:

bool

Raises:

MidiException -- on error

read()
reads num_events midi events from the buffer.
read(num_events) -> midi_event_list

Reads from the input buffer and gives back midi events.

Parameters:

num_events (int) -- number of input events to read

Returns:

the format for midi_event_list is [[[status, data1, data2, data3], timestamp], ...]

Return type:

list

pygame.midi.Output
Output is used to send midi to an output device
Output(device_id) -> None
Output(device_id, latency=0) -> None
Output(device_id, buffer_size=256) -> None
Output(device_id, latency, buffer_size) -> None
terminates outgoing messages immediately
closes a midi stream, flushing any pending buffers.
turns a midi note off (note must be on)
turns a midi note on (note must be off)
select an instrument, with a value between 0 and 127
modify the pitch of a channel.
writes a list of midi data to the Output
writes up to 3 bytes of midi data to the Output
writes a timestamped system-exclusive midi message.

The buffer_size specifies the number of output events to be buffered waiting for output. In some cases (see below) PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored.

latency is the delay in milliseconds applied to timestamps to determine when the output should actually occur. If latency is <<0, 0 is assumed.

If latency is zero, timestamps are ignored and all output is delivered immediately. If latency is greater than zero, output is delayed until the message timestamp plus the latency. In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency.

Note

Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.

abort()
terminates outgoing messages immediately
abort() -> None

The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time.

close()
closes a midi stream, flushing any pending buffers.
close() -> None

PortMidi attempts to close open streams when the application exits.

Note

This is particularly difficult under Windows.

note_off()
turns a midi note off (note must be on)
note_off(note, velocity=None, channel=0) -> None

Turn a note off in the output stream. The note must already be on for this to work correctly.

note_on()
turns a midi note on (note must be off)
note_on(note, velocity=None, channel=0) -> None

Turn a note on in the output stream. The note must already be off for this to work correctly.

set_instrument()
select an instrument, with a value between 0 and 127
set_instrument(instrument_id, channel=0) -> None

Select an instrument.

pitch_bend()
modify the pitch of a channel.
set_instrument(value=0, channel=0) -> None

Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers).

If no value is given, the pitch bend is returned to "no change".

New in pygame 1.9.4.

write()
writes a list of midi data to the Output
write(data) -> None

Writes series of MIDI information in the form of a list.

Parameters:

data (list) -- data to write, the expected format is [[[status, data1=0, data2=0, ...], timestamp], ...] with the data# fields being optional

Raises:

IndexError -- if more than 1024 elements in the data list

Example:

# Program change at time 20000 and 500ms later send note 65 with
# velocity 100.
write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]])

Note

  • Timestamps will be ignored if latency = 0

  • To get a note to play immediately, send MIDI info with timestamp read from function Time

  • Optional data fields: write([[[0xc0, 0, 0], 20000]]) is equivalent to write([[[0xc0], 20000]])

write_short()
writes up to 3 bytes of midi data to the Output
write_short(status) -> None
write_short(status, data1=0, data2=0) -> None

Output MIDI information of 3 bytes or less. The data fields are optional and assumed to be 0 if omitted.

Examples of status byte values:

0xc0  # program change
0x90  # note on
# etc.

Example:

# note 65 on with velocity 100
write_short(0x90, 65, 100)
write_sys_ex()
writes a timestamped system-exclusive midi message.
write_sys_ex(when, msg) -> None

Writes a timestamped system-exclusive midi message.

Parameters:
  • msg (list[int] or str) -- midi message

  • when -- timestamp in milliseconds

Example:

midi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7')

# is equivalent to

midi_output.write_sys_ex(pygame.midi.time(),
                         [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7])
pygame.midi.get_count()
gets the number of devices.
get_count() -> num_devices

Device ids range from 0 to get_count() - 1

pygame.midi.get_default_input_id()
gets default input device number
get_default_input_id() -> default_id

The following describes the usage details for this function and the get_default_output_id() function.

Return the default device ID or -1 if there are no devices. The result can be passed to the Input/Output class.

On a PC the user can specify a default device by setting an environment variable. To use device #1, for example:

set PM_RECOMMENDED_INPUT_DEVICE=1
or
set PM_RECOMMENDED_OUTPUT_DEVICE=1

The user should first determine the available device ID by using the supplied application "testin" or "testout".

In general, the registry is a better place for this kind of info. With USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if PM_RECOMMENDED_INPUT_DEVICE (or PM_RECOMMENDED_OUTPUT_DEVICE) is NOT found in the environment, then the default device is obtained by looking for a string in the registry under:

HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device
or
HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device

The number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB" and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB".

In addition to the name, get_device_info() returns "interf", which is the interface name. The "interface" is the underlying software system or API used by PortMidi to access devices. Supported interfaces:

MMSystem   # the only Win32 interface currently supported
ALSA       # the only Linux interface currently supported
CoreMIDI   # the only Mac OS X interface currently supported
# DirectX - not implemented
# OSS     - not implemented

To specify both the interface and the device name in the registry, separate the two with a comma and a space. The string before the comma must be a substring of the "interf" string and the string after the space must be a substring of the "name" name string in order to match the device. e.g.:

MMSystem, In USB MidiSport 1x1

Note

In the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID).

pygame.midi.get_default_output_id()
gets default output device number
get_default_output_id() -> default_id

See get_default_input_id() for usage details.

pygame.midi.get_device_info()
returns information about a midi device
get_device_info(an_id) -> (interf, name, input, output, opened)
get_device_info(an_id) -> None

Gets the device info for a given id.

Parameters:

an_id (int) -- id of the midi device being queried

Returns:

if the id is out of range None is returned, otherwise a tuple of (interf, name, input, output, opened) is returned.

  • interf: string describing the device interface (e.g. 'ALSA')

  • name: string name of the device (e.g. 'Midi Through Port-0')

  • input: 1 if the device is an input device, otherwise 0

  • output: 1 if the device is an output device, otherwise 0

  • opened: 1 if the device is opened, otherwise 0

Return type:

tuple or None

pygame.midi.midis2events()
converts midi events to pygame events
midis2events(midi_events, device_id) -> [Event, ...]

Takes a sequence of midi events and returns list of pygame events.

The midi_events data is expected to be a sequence of ((status, data1, data2, data3), timestamp) midi events (all values required).

Returns:

a list of pygame events of event type MIDIIN

Return type:

list

pygame.midi.time()
returns the current time in ms of the PortMidi timer
time() -> time

The time is reset to 0 when the pygame.midipygame module for interacting with midi input and output. module is initialized.

pygame.midi.frequency_to_midi()
Converts a frequency into a MIDI note. Rounds to the closest midi note.
frequency_to_midi(midi_note) -> midi_note

example:

frequency_to_midi(27.5) == 21

New in pygame 1.9.5.

pygame.midi.midi_to_frequency()
Converts a midi note to a frequency.
midi_to_frequency(midi_note) -> frequency

example:

midi_to_frequency(21) == 27.5

New in pygame 1.9.5.

pygame.midi.midi_to_ansi_note()
Returns the Ansi Note name for a midi number.
midi_to_ansi_note(midi_note) -> ansi_note

example:

midi_to_ansi_note(21) == 'A0'

New in pygame 1.9.5.

exception pygame.midi.MidiException
exception that pygame.midi functions and classes can raise
MidiException(errno) -> None



Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.80714 pygame-2.6.1/docs/generated/ref/mixer.html0000644000175100001770000017241514676242424020110 0ustar00runnerdocker pygame.mixer — pygame v2.6.1 documentation
pygame.mixer
pygame module for loading and playing sounds
initialize the mixer module
preset the mixer init arguments
uninitialize the mixer
test if the mixer is initialized
stop playback of all sound channels
temporarily stop playback of all sound channels
resume paused playback of sound channels
fade out the volume on all sounds before stopping
set the total number of playback channels
get the total number of playback channels
reserve channels from being automatically used
find an unused channel
test if any sound is being mixed
get the mixer's SDL version
Create a new Sound object from a file or buffer object
Create a Channel object for controlling playback

This module contains classes for loading Sound objects and controlling playback. The mixer module is optional and depends on SDL_mixer. Your program should test that pygame.mixerpygame module for loading and playing sounds is available and initialized before using it.

The mixer module has a limited number of channels for playback of sounds. Usually programs tell pygame to start playing audio and it selects an available channel automatically. The default is 8 simultaneous channels, but complex programs can get more precise control over the number of channels and their use.

All sound playback is mixed in background threads. When you begin to play a Sound object, it will return immediately while the sound continues to play. A single Sound object can also be actively played back multiple times.

The mixer also has a special streaming channel. This is for music playback and is accessed through the pygame.mixer.musicpygame module for controlling streamed audio module. Consider using this module for playing long running music. Unlike mixer module, the music module streams the music from the files without loading music at once into memory.

The mixer module must be initialized like other pygame modules, but it has some extra conditions. The pygame.mixer.init() function takes several optional arguments to control the playback rate and sample size. Pygame will default to reasonable values, but pygame cannot perform Sound resampling, so the mixer should be initialized to match the values of your audio resources.

NOTE: For less laggy sound use a smaller buffer size. The default is set to reduce the chance of scratchy sounds on some computers. You can change the default buffer by calling pygame.mixer.pre_init()preset the mixer init arguments before pygame.mixer.init()initialize the mixer module or pygame.init()initialize all imported pygame modules is called. For example: pygame.mixer.pre_init(44100,-16,2, 1024)

pygame.mixer.init()
initialize the mixer module
init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None

Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for allowedchanges, where -1 is used. (startup defaults may be changed by a pre_init() call).

The size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception.

The channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo.

The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger values to ensure playback never skips, but it will impose latency on sound playback. The buffer size must be a power of two (if not it is rounded up to the next nearest power of 2).

Some platforms require the pygame.mixerpygame module for loading and playing sounds module to be initialized after the display modules have initialized. The top level pygame.init() takes care of this automatically, but cannot pass any arguments to the mixer init. To solve this, mixer has a function pygame.mixer.pre_init() to set the proper defaults before the toplevel init is used.

When using allowedchanges=0 it will convert the samples at runtime to match what the hardware supports. For example a sound card may not support 16bit sound samples, so instead it will use 8bit samples internally. If AUDIO_ALLOW_FORMAT_CHANGE is supplied, then the requested format will change to the closest that SDL2 supports.

Apart from 0, allowedchanged accepts the following constants ORed together:

  • AUDIO_ALLOW_FREQUENCY_CHANGE

  • AUDIO_ALLOW_FORMAT_CHANGE

  • AUDIO_ALLOW_CHANNELS_CHANGE

  • AUDIO_ALLOW_ANY_CHANGE

It is safe to call this more than once, but after the mixer is initialized you cannot change the playback arguments without first calling pygame.mixer.quit().

Changed in pygame 1.8: The default buffersize changed from 1024 to 3072.

Changed in pygame 1.9.1: The default buffersize changed from 3072 to 4096.

Changed in pygame 2.0.0: The default buffersize changed from 4096 to 512.

Changed in pygame 2.0.0: The default frequency changed from 22050 to 44100.

Changed in pygame 2.0.0: size can be 32 (32-bit floats).

Changed in pygame 2.0.0: channels can also be 4 or 6.

New in pygame 2.0.0: allowedchanges, devicename arguments added

pygame.mixer.pre_init()
preset the mixer init arguments
pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None

Call pre_init to change the defaults used when the real pygame.mixer.init() is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call pygame.mixer.pre_init() before calling the top level pygame.init(). For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for allowedchanges, where -1 is used.

Changed in pygame 1.8: The default buffersize changed from 1024 to 3072.

Changed in pygame 1.9.1: The default buffersize changed from 3072 to 4096.

Changed in pygame 2.0.0: The default buffersize changed from 4096 to 512.

Changed in pygame 2.0.0: The default frequency changed from 22050 to 44100.

New in pygame 2.0.0: allowedchanges, devicename arguments added

pygame.mixer.quit()
uninitialize the mixer
quit() -> None

This will uninitialize pygame.mixerpygame module for loading and playing sounds. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later.

pygame.mixer.get_init()
test if the mixer is initialized
get_init() -> (frequency, format, channels)

If the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns None.

pygame.mixer.stop()
stop playback of all sound channels
stop() -> None

This will stop all playback of all active mixer channels.

pygame.mixer.pause()
temporarily stop playback of all sound channels
pause() -> None

This will temporarily stop all playback on the active mixer channels. The playback can later be resumed with pygame.mixer.unpause()

pygame.mixer.unpause()
resume paused playback of sound channels
unpause() -> None

This will resume all active sound channels after they have been paused.

pygame.mixer.fadeout()
fade out the volume on all sounds before stopping
fadeout(time) -> None

This will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop.

pygame.mixer.set_num_channels()
set the total number of playback channels
set_num_channels(count) -> None

Sets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped.

pygame.mixer.get_num_channels()
get the total number of playback channels
get_num_channels() -> count

Returns the number of currently active playback channels.

pygame.mixer.set_reserved()
reserve channels from being automatically used
set_reserved(count) -> count

The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. This means that whenever you play a Sound without specifying a channel, a reserved channel will never be used. If sounds are currently playing on the reserved channels they will not be stopped.

This allows the application to reserve a specific number of channels for important sounds that must not be dropped or have a guaranteed channel to play on.

Will return number of channels actually reserved, this may be less than requested depending on the number of channels previously allocated.

pygame.mixer.find_channel()
find an unused channel
find_channel(force=False) -> Channel

This will find and return an inactive Channel object. If there are no inactive Channels this function will return None. If there are no inactive channels and the force argument is True, this will find the Channel with the longest running Sound and return it.

pygame.mixer.get_busy()
test if any sound is being mixed
get_busy() -> bool

Returns True if the mixer is busy mixing any channels. If the mixer is idle then this return False.

pygame.mixer.get_sdl_mixer_version()
get the mixer's SDL version
get_sdl_mixer_version() -> (major, minor, patch)
get_sdl_mixer_version(linked=True) -> (major, minor, patch)
Parameters:

linked (bool) -- if True (default) the linked version number is returned, otherwise the compiled version number is returned

Returns:

the mixer's SDL library version number (linked or compiled depending on the linked parameter) as a tuple of 3 integers (major, minor, patch)

Return type:

tuple

Note

The linked and compile version numbers should be the same.

New in pygame 2.0.0.

pygame.mixer.Sound
Create a new Sound object from a file or buffer object
Sound(filename) -> Sound
Sound(file=filename) -> Sound
Sound(file=pathlib_path) -> Sound
Sound(buffer) -> Sound
Sound(buffer=buffer) -> Sound
Sound(object) -> Sound
Sound(file=object) -> Sound
Sound(array=object) -> Sound
begin sound playback
stop sound playback
stop sound playback after fading out
set the playback volume for this Sound
get the playback volume
count how many times this Sound is playing
get the length of the Sound
return a bytestring copy of the Sound samples.

Load a new sound buffer from a filename, a python file object or a readable buffer object. Limited resampling will be performed to help the sample match the initialize arguments for the mixer. A Unicode string can only be a file pathname. A bytes object can be either a pathname or a buffer object. Use the 'file' or 'buffer' keywords to avoid ambiguity; otherwise Sound may guess wrong. If the array keyword is used, the object is expected to export a new buffer interface (The object is checked for a buffer interface first.)

The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback. A Sound object also exports a new buffer interface.

The Sound can be loaded from an OGG audio file or from an uncompressed WAV.

Note: The buffer will be copied internally, no data will be shared between it and the Sound object.

For now buffer and array support is consistent with sndarray.make_sound for NumPy arrays, in that sample sign and byte order are ignored. This will change, either by correctly handling sign and byte order, or by raising an exception when different. Also, source samples are truncated to fit the audio sample size. This will not change.

New in pygame 1.8: pygame.mixer.Sound(buffer)

New in pygame 1.9.2: pygame.mixer.SoundCreate a new Sound object from a file or buffer object keyword arguments and array interface support

New in pygame 2.0.1: pathlib.Path support on Python 3.

play()
begin sound playback
play(loops=0, maxtime=0, fade_ms=0) -> Channel

Begin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary.

The loops argument controls how many times the sample will be repeated after being played the first time. A value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call stop() to stop it).

The maxtime argument can be used to stop playback after a given number of milliseconds.

The fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete.

This returns the Channel object for the channel that was selected.

stop()
stop sound playback
stop() -> None

This will stop the playback of this Sound on any active Channels.

fadeout()
stop sound playback after fading out
fadeout(time) -> None

This will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels.

set_volume()
set the playback volume for this Sound
set_volume(value) -> None

This will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound.

Parameters:

value (float) --

volume in the range of 0.0 to 1.0 (inclusive)

If value < 0.0, the volume will not be changed
If value > 1.0, the volume will be set to 1.0

get_volume()
get the playback volume
get_volume() -> value

Return a value from 0.0 to 1.0 representing the volume for this Sound.

get_num_channels()
count how many times this Sound is playing
get_num_channels() -> count

Return the number of active channels this sound is playing on.

get_length()
get the length of the Sound
get_length() -> seconds

Return the length of this Sound in seconds.

get_raw()
return a bytestring copy of the Sound samples.
get_raw() -> bytes

Return a copy of the Sound object buffer as a bytes.

New in pygame 1.9.2.

pygame.mixer.Channel
Create a Channel object for controlling playback
Channel(id) -> Channel
play a Sound on a specific Channel
stop playback on a Channel
temporarily stop playback of a channel
resume pause playback of a channel
stop playback after fading channel out
set the volume of a playing channel
get the volume of the playing channel
check if the channel is active
get the currently playing Sound
queue a Sound object to follow the current
return any Sound that is queued
have the channel send an event when playback stops
get the event a channel sends when playback stops

Return a Channel object for one of the current channels. The id must be a value from 0 to the value of pygame.mixer.get_num_channels().

The Channel object can be used to get fine control over the playback of Sounds. A channel can only playback a single Sound at time. Using channels is entirely optional since pygame can manage them by default.

play()
play a Sound on a specific Channel
play(Sound, loops=0, maxtime=0, fade_ms=0) -> None

This will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped.

The loops argument has the same meaning as in Sound.play(): it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely.

As in Sound.play(), the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds.

As in Sound.play(), the fade_ms argument can be used fade in the sound.

stop()
stop playback on a Channel
stop() -> None

Stop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it.

pause()
temporarily stop playback of a channel
pause() -> None

Temporarily stop the playback of sound on a channel. It can be resumed at a later time with Channel.unpause()

unpause()
resume pause playback of a channel
unpause() -> None

Resume the playback on a paused channel.

fadeout()
stop playback after fading channel out
fadeout(time) -> None

Stop playback of a channel after fading out the sound over the given time argument in milliseconds.

set_volume()
set the volume of a playing channel
set_volume(value) -> None
set_volume(left, right) -> None

Set the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0.

If one argument is passed, it will be the volume of both speakers. If two arguments are passed and the mixer is in stereo mode, the first argument will be the volume of the left speaker and the second will be the volume of the right speaker. (If the second argument is None, the first argument will be the volume of both speakers.)

If the channel is playing a Sound on which set_volume() has also been called, both calls are taken into account. For example:

sound = pygame.mixer.Sound("s.wav")
channel = s.play()      # Sound plays at full volume by default
sound.set_volume(0.9)   # Now plays at 90% of full volume.
sound.set_volume(0.6)   # Now plays at 60% (previous value replaced).
channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5).
get_volume()
get the volume of the playing channel
get_volume() -> value

Return the volume of the channel for the current playing sound. This does not take into account stereo separation used by Channel.set_volume(). The Sound object also has its own volume which is mixed with the channel.

get_busy()
check if the channel is active
get_busy() -> bool

Returns True if the channel is actively mixing sound. If the channel is idle this returns False.

get_sound()
get the currently playing Sound
get_sound() -> Sound

Return the actual Sound object currently playing on this channel. If the channel is idle None is returned.

queue()
queue a Sound object to follow the current
queue(Sound) -> None

When a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automatically. It is cleared on any other call to Channel.stop() or Channel.play().

If there is no sound actively playing on the Channel then the Sound will begin playing immediately.

get_queue()
return any Sound that is queued
get_queue() -> Sound

If a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue.

set_endevent()
have the channel send an event when playback stops
set_endevent() -> None
set_endevent(type) -> None

When an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use pygame.event.get() to retrieve the endevent once it's sent.

Note that if you called Sound.play(n) or Channel.play(sound,n), the end event is sent only once: after the sound has been played "n+1" times (see the documentation of Sound.play).

If Channel.stop() or Channel.play() is called while the sound was still playing, the event will be posted immediately.

The type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between pygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no type argument is given then the Channel will stop sending endevents.

get_endevent()
get the event a channel sends when playback stops
get_endevent() -> type

Returns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns pygame.NOEVENT.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.84214 pygame-2.6.1/docs/generated/ref/mouse.html0000644000175100001770000006443514676242424020116 0ustar00runnerdocker pygame.mouse — pygame v2.6.1 documentation
pygame.mouse
pygame module to work with the mouse
get the state of the mouse buttons
get the mouse cursor position
get the amount of mouse movement
set the mouse cursor position
hide or show the mouse cursor
get the current visibility state of the mouse cursor
check if the display is receiving mouse input
set the mouse cursor to a new cursor
get the current mouse cursor

The mouse functions can be used to get the current state of the mouse device. These functions can also alter the system cursor for the mouse.

When the display mode is set, the event queue will start receiving mouse events. The mouse buttons generate pygame.MOUSEBUTTONDOWN and pygame.MOUSEBUTTONUP events when they are pressed and released. These events contain a button attribute representing which button was pressed. The mouse wheel will generate pygame.MOUSEBUTTONDOWN and pygame.MOUSEBUTTONUP events when rolled. The button will be set to 4 when the wheel is rolled up, and to button 5 when the wheel is rolled down. Whenever the mouse is moved it generates a pygame.MOUSEMOTION event. The mouse movement is broken into small and accurate motion events. As the mouse is moving many motion events will be placed on the queue. Mouse motion events that are not properly cleaned from the event queue are the primary reason the event queue fills up.

If the mouse cursor is hidden, and input is grabbed to the current display the mouse will enter a virtual input mode, where the relative movements of the mouse will never be stopped by the borders of the screen. See the functions pygame.mouse.set_visible() and pygame.event.set_grab() to get this configured.

Mouse Wheel Behavior in pygame 2

There is proper functionality for mouse wheel behaviour with pygame 2 supporting pygame.MOUSEWHEEL events. The new events support horizontal and vertical scroll movements, with signed integer values representing the amount scrolled (x and y), as well as flipped direction (the set positive and negative values for each axis is flipped). Read more about SDL2 input-related changes here https://wiki.libsdl.org/MigrationGuide#input

In pygame 2, the mouse wheel functionality can be used by listening for the pygame.MOUSEWHEEL type of an event (Bear in mind they still emit pygame.MOUSEBUTTONDOWN events like in pygame 1.x, as well). When this event is triggered, a developer can access the appropriate Event object with pygame.event.get(). The object can be used to access data about the mouse scroll, such as which (it will tell you what exact mouse device trigger the event).

Code example of mouse scroll (tested on 2.0.0.dev7)
# Taken from husano896's PR thread (slightly modified)
import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((640, 480))
clock = pygame.time.Clock()

def main():
   while True:
      for event in pygame.event.get():
            if event.type == QUIT:
               pygame.quit()
               return
            elif event.type == MOUSEWHEEL:
               print(event)
               print(event.x, event.y)
               print(event.flipped)
               print(event.which)
               # can access properties with
               # proper notation(ex: event.y)
      clock.tick(60)

# Execute game:
main()
pygame.mouse.get_pressed()
get the state of the mouse buttons
get_pressed(num_buttons=3) -> (button1, button2, button3)
get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)

Returns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently being pressed at the time of the call.

Note, to get all of the mouse events it is better to use either pygame.event.wait() or pygame.event.get() and check all of those events to see if they are MOUSEBUTTONDOWN, MOUSEBUTTONUP, or MOUSEMOTION.

Note, that on X11 some X servers use middle button emulation. When you click both buttons 1 and 3 at the same time a 2 button event can be emitted.

Note, remember to call pygame.event.get() before this function. Otherwise it will not work as expected.

To support five button mice, an optional parameter num_buttons has been added in pygame 2. When this is set to 5, button4 and button5 are added to the returned tuple. Only 3 and 5 are valid values for this parameter.

Changed in pygame 2.0.0: num_buttons argument added

pygame.mouse.get_pos()
get the mouse cursor position
get_pos() -> (x, y)

Returns the x and y position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen.

pygame.mouse.get_rel()
get the amount of mouse movement
get_rel() -> (x, y)

Returns the amount of movement in x and y since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual input mode is described at the top of the page.

pygame.mouse.set_pos()
set the mouse cursor position
set_pos([x, y]) -> None

Set the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new pygame.MOUSEMOTION event.

pygame.mouse.set_visible()
hide or show the mouse cursor
set_visible(bool) -> bool

If the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor.

pygame.mouse.get_visible()
get the current visibility state of the mouse cursor
get_visible() -> bool

Get the current visibility state of the mouse cursor. True if the mouse is visible, False otherwise.

New in pygame 2.0.0.

pygame.mouse.get_focused()
check if the display is receiving mouse input
get_focused() -> bool

Returns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus").

This method is most useful when working in a window. By contrast, in full-screen mode, this method always returns true.

Note: under MS Windows, the window that has the mouse focus also has the keyboard focus. But under X-Windows, one window can receive mouse events and another receive keyboard events. pygame.mouse.get_focused() indicates whether the pygame window receives mouse events.

pygame.mouse.set_cursor()
set the mouse cursor to a new cursor
set_cursor(pygame.cursors.Cursor) -> None
set_cursor(size, hotspot, xormasks, andmasks) -> None
set_cursor(hotspot, surface) -> None
set_cursor(constant) -> None

Set the mouse cursor to something new. This function accepts either an explicit Cursor object or arguments to create a Cursor object.

See pygame.cursors.Cursorpygame object representing a cursor for help creating cursors and for examples.

Changed in pygame 2.0.1.

pygame.mouse.get_cursor()
get the current mouse cursor
get_cursor() -> pygame.cursors.Cursor

Get the information about the mouse system cursor. The return value contains the same data as the arguments passed into pygame.mouse.set_cursor()set the mouse cursor to a new cursor.

Note

Code that unpacked a get_cursor() call into size, hotspot, xormasks, andmasks will still work, assuming the call returns an old school type cursor.

Changed in pygame 2.0.1.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.88214 pygame-2.6.1/docs/generated/ref/music.html0000644000175100001770000010024014676242424020067 0ustar00runnerdocker pygame.mixer.music — pygame v2.6.1 documentation
pygame.mixer.music
pygame module for controlling streamed audio
Load a music file for playback
Unload the currently loaded music to free up resources
Start the playback of the music stream
restart music
stop the music playback
temporarily stop music playback
resume paused music
stop music playback after fading out
set the music volume
get the music volume
check if the music stream is playing
set position to play from
get the music play time
queue a sound file to follow the current
have the music send an event when playback stops
get the event a channel sends when playback stops

The music module is closely tied to pygame.mixerpygame module for loading and playing sounds. Use the music module to control the playback of music in the sound mixer.

The difference between the music playback and regular Sound playback is that the music is streamed, and never actually loaded all at once. The mixer system only supports a single music stream at once.

On older pygame versions, MP3 support was limited under Mac and Linux. This changed in pygame v2.0.2 which got improved MP3 support. Consider using OGG file format for music as that can give slightly better compression than MP3 in most cases.

pygame.mixer.music.load()
Load a music file for playback
load(filename) -> None
load(fileobj, namehint="") -> None

This will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing.

If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: load(fileobj, "ogg").

Changed in pygame 2.0.2: Added optional namehint argument

pygame.mixer.music.unload()
Unload the currently loaded music to free up resources
unload() -> None

This closes resources like files for any music that may be loaded.

New in pygame 2.0.0.

pygame.mixer.music.play()
Start the playback of the music stream
play(loops=0, start=0.0, fade_ms=0) -> None

This will play the loaded music stream. If the music is already playing it will be restarted.

loops is an optional integer argument, which is 0 by default, which indicates how many times to repeat the music. The music repeats indefinitely if this argument is set to -1.

start is an optional float argument, which is 0.0 by default, which denotes the position in time from which the music starts playing. The starting position depends on the format of the music played. MP3 and OGG use the position as time in seconds. For MP3 files the start time position selected may not be accurate as things like variable bit rate encoding and ID3 tags can throw off the timing calculations. For MOD music it is the pattern order number. Passing a start position will raise a NotImplementedError if the start position cannot be set.

fade_ms is an optional integer argument, which is 0 by default, which denotes the period of time (in milliseconds) over which the music will fade up from volume level 0.0 to full volume (or the volume level previously set by set_volume()). The sample may end before the fade-in is complete. If the music is already streaming fade_ms is ignored.

Changed in pygame 2.0.0: Added optional fade_ms argument

pygame.mixer.music.rewind()
restart music
rewind() -> None

Resets playback of the current music to the beginning. If pause() has previously been used to pause the music, the music will remain paused.

Note

rewind() supports a limited number of file types and notably WAV files are NOT supported. For unsupported file types use play() which will restart the music that's already playing (note that this will start the music playing again even if previously paused).

pygame.mixer.music.stop()
stop the music playback
stop() -> None

Stops the music playback if it is currently playing. endevent will be triggered, if set. It won't unload the music.

pygame.mixer.music.pause()
temporarily stop music playback
pause() -> None

Temporarily stop playback of the music stream. It can be resumed with the unpause() function.

pygame.mixer.music.unpause()
resume paused music
unpause() -> None

This will resume the playback of a music stream after it has been paused.

pygame.mixer.music.fadeout()
stop music playback after fading out
fadeout(time) -> None

Fade out and stop the currently playing music.

The time argument denotes the integer milliseconds for which the fading effect is generated.

Note, that this function blocks until the music has faded out. Calls to fadeout() and set_volume() will have no effect during this time. If an event was set using set_endevent() it will be called after the music has faded.

pygame.mixer.music.set_volume()
set the music volume
set_volume(volume) -> None

Set the volume of the music playback.

The volume argument is a float between 0.0 and 1.0 that sets the volume level. When new music is loaded the volume is reset to full volume. If volume is a negative value it will be ignored and the volume will remain set at the current level. If the volume argument is greater than 1.0, the volume will be set to 1.0.

pygame.mixer.music.get_volume()
get the music volume
get_volume() -> value

Returns the current volume for the mixer. The value will be between 0.0 and 1.0.

pygame.mixer.music.get_busy()
check if the music stream is playing
get_busy() -> bool

Returns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused.

Changed in pygame 2.0.1: Returns False when music paused.

pygame.mixer.music.set_pos()
set position to play from
set_pos(pos) -> None

This sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format.

For MOD files, pos is the integer pattern number in the module. For OGG it is the absolute position, in seconds, from the beginning of the sound. For MP3 files, it is the relative position, in seconds, from the current position. For absolute positioning in an MP3 file, first call rewind().

Other file formats are unsupported. Newer versions of SDL_mixer have better positioning support than earlier ones. An SDLError is raised if a particular format does not support positioning.

Function set_pos() calls underlining SDL_mixer function Mix_SetMusicPosition.

New in pygame 1.9.2.

pygame.mixer.music.get_pos()
get the music play time
get_pos() -> time

This gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets.

pygame.mixer.music.queue()
queue a sound file to follow the current
queue(filename) -> None
queue(fileobj, namehint="", loops=0) -> None

This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in the new sound becoming the queued sound. Also, if the current sound is ever stopped or changed, the queued sound will be lost.

If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: queue(fileobj, "ogg").

The following example will play music by Bach six times, then play music by Mozart once:

pygame.mixer.music.load('bach.ogg')
pygame.mixer.music.play(5)        # Plays six times, not five!
pygame.mixer.music.queue('mozart.ogg')

Changed in pygame 2.0.2: Added optional namehint argument

pygame.mixer.music.set_endevent()
have the music send an event when playback stops
set_endevent() -> None
set_endevent(type) -> None

This causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued.

The event will be queued every time the music finishes, not just the first time. To stop the event from being queued, call this method with no argument.

pygame.mixer.music.get_endevent()
get the event a channel sends when playback stops
get_endevent() -> type

Returns the event type to be sent every time the music finishes playback. If there is no endevent the function returns pygame.NOEVENT.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.89914 pygame-2.6.1/docs/generated/ref/overlay.html0000644000175100001770000002461314676242424020441 0ustar00runnerdocker pygame.Overlay — pygame v2.6.1 documentation

Warning

This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future.

pygame.Overlay
pygame object for video overlay graphics
Overlay(format, (width, height)) -> Overlay
set the overlay pixel data
control where the overlay is displayed
test if the Overlay is hardware accelerated

The Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard RGB pixel formats, and can use multiple resolutions of data to create a single image.

The Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays.

The Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types:

YV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAY

The width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay.

The overlay objects are always visible, and always show above the regular display contents.

display()
set the overlay pixel data
display((y, u, v)) -> None
display() -> None

Display the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay.

If no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated.

The strings are not validated, and improperly sized strings could crash the program.

set_location()
control where the overlay is displayed
set_location(rect) -> None

Set the location for the overlay. The overlay will always be shown relative to the main display Surface. This does not actually redraw the overlay, it will be updated on the next call to Overlay.display().

get_hardware()
test if the Overlay is hardware accelerated
get_hardware(rect) -> int

Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.93914 pygame-2.6.1/docs/generated/ref/pixelarray.html0000644000175100001770000007412314676242424021141 0ustar00runnerdocker pygame.PixelArray — pygame v2.6.1 documentation
pygame.PixelArray
pygame object for direct pixel access of surfaces
PixelArray(Surface) -> PixelArray
Gets the Surface the PixelArray uses.
Returns the byte size of a pixel array item
Returns the number of dimensions.
Returns the array size.
Returns byte offsets for each array dimension.
Creates a new Surface from the current PixelArray.
Replaces the passed color in the PixelArray with another one.
Extracts the passed color from the PixelArray.
Compares the PixelArray with another one.
Exchanges the x and y axis.
Closes the PixelArray, and releases Surface lock.

The PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays support slicing, both for returning a subarray or for assignment. A pixel array sliced on a single column or row returns a one dimensional pixel array. Arithmetic and other operations are not supported. A pixel array can be safely assigned to itself. Finally, pixel arrays export an array struct interface, allowing them to interact with pygame.pixelcopypygame module for general pixel array copying methods and NumPy arrays.

A PixelArray pixel item can be assigned a raw integer values, a pygame.Colorpygame object for color representations instance, or a (r, g, b[, a]) tuple.

pxarray[x, y] = 0xFF00FF
pxarray[x, y] = pygame.Color(255, 0, 255)
pxarray[x, y] = (255, 0, 255)

However, only a pixel's integer value is returned. So, to compare a pixel to a particular color the color needs to be first mapped using the Surface.map_rgb() method of the Surface object for which the PixelArray was created.

pxarray = pygame.PixelArray(surface)
# Check, if the first pixel at the topleft corner is blue
if pxarray[0, 0] == surface.map_rgb((0, 0, 255)):
    ...

When assigning to a range of of pixels, a non tuple sequence of colors or a PixelArray can be used as the value. For a sequence, the length must match the PixelArray width.

pxarray[a:b] = 0xFF00FF                   # set all pixels to 0xFF00FF
pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF,
                                          # second pixel  = 0xAACCEE, ...
pxarray[a:b] = [(255, 0, 255), (170, 204, 238), ...] # same as above
pxarray[a:b] = [(255, 0, 255), 0xAACCEE, ...]        # same as above
pxarray[a:b] = otherarray[x:y]            # slice sizes must match

For PixelArray assignment, if the right hand side array has a row length of 1, then the column is broadcast over the target array's rows. An array of height 1 is broadcast over the target's columns, and is equivalent to assigning a 1D PixelArray.

Subscript slices can also be used to assign to a rectangular subview of the target PixelArray.

# Create some new PixelArray objects providing a different view
# of the original array/surface.
newarray = pxarray[2:4, 3:5]
otherarray = pxarray[::2, ::2]

Subscript slices can also be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis. The

pxarray[::2, :] = (0, 0, 0)               # Make even columns black.
pxarray[::2] = (0, 0, 0)                  # Same as [::2, :]

During its lifetime, the PixelArray locks the surface, thus you explicitly have to close() it once its not used any more and the surface should perform operations in the same scope. It is best to use it as a context manager using the with PixelArray(surf) as pixel_array: style. So it works on pypy too.

A simple : slice index for the column can be omitted.

pxarray[::2, ...] = (0, 0, 0)             # Same as pxarray[::2, :]
pxarray[...] = (255, 0, 0)                # Same as pxarray[:]

A note about PixelArray to PixelArray assignment, for arrays with an item size of 3 (created from 24 bit surfaces) pixel values are translated from the source to the destinations format. The red, green, and blue color elements of each pixel are shifted to match the format of the target surface. For all other pixel sizes no such remapping occurs. This should change in later pygame releases, where format conversions are performed for all pixel sizes. To avoid code breakage when full mapped copying is implemented it is suggested PixelArray to PixelArray copies be only between surfaces of identical format.

New in pygame 1.9.4:

  • close() method was added. For explicitly cleaning up.

  • being able to use PixelArray as a context manager for cleanup.

  • both of these are useful for when working without reference counting (pypy).

New in pygame 1.9.2:

  • array struct interface

  • transpose method

  • broadcasting for a length 1 dimension

Changed in pygame 1.9.2:

  • A 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array.

  • For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors.

surface
Gets the Surface the PixelArray uses.
surface -> Surface

The Surface the PixelArray was created for.

itemsize
Returns the byte size of a pixel array item
itemsize -> int

This is the same as Surface.get_bytesize() for the pixel array's surface.

New in pygame 1.9.2.

ndim
Returns the number of dimensions.
ndim -> int

A pixel array can be 1 or 2 dimensional.

New in pygame 1.9.2.

shape
Returns the array size.
shape -> tuple of int's

A tuple or length ndim giving the length of each dimension. Analogous to Surface.get_size().

New in pygame 1.9.2.

strides
Returns byte offsets for each array dimension.
strides -> tuple of int's

A tuple or length ndim byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step).

New in pygame 1.9.2.

make_surface()
Creates a new Surface from the current PixelArray.
make_surface() -> Surface

Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface.

# Create a new surface flipped around the vertical axis.
sf = pxarray[:,::-1].make_surface ()

New in pygame 1.8.1.

replace()
Replaces the passed color in the PixelArray with another one.
replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None

Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color.

It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well.

This is an in place operation that directly affects the pixels of the PixelArray.

New in pygame 1.8.1.

extract()
Extracts the passed color from the PixelArray.
extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray

Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask.

It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well.

New in pygame 1.8.1.

compare()
Compares the PixelArray with another one.
compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray

Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays. Both PixelArray objects must have identical bit depths and dimensions.

It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as a threshold for the color detection. This causes the comparison to mark pixels with a similar, but not exactly identical color, as white.

New in pygame 1.8.1.

transpose()
Exchanges the x and y axis.
transpose() -> PixelArray

This method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array.

New in pygame 1.9.2.

close()
Closes the PixelArray, and releases Surface lock.
close() -> PixelArray

This method is for explicitly closing the PixelArray, and releasing a lock on the Surface.

New in pygame 1.9.4.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.96114 pygame-2.6.1/docs/generated/ref/pixelcopy.html0000644000175100001770000003456714676242424021005 0ustar00runnerdocker pygame.pixelcopy — pygame v2.6.1 documentation
pygame.pixelcopy
pygame module for general pixel array copying
copy surface pixels to an array object
copy an array object to a surface
copy an array to another array, using surface format
Copy an array to a new surface

The pygame.pixelcopy module contains functions for copying between surfaces and objects exporting an array structure interface. It is a backend for pygame.surfarraypygame module for accessing surface pixel data using array interfaces, adding NumPy support. But pixelcopy is more general, and intended for direct use.

The array struct interface exposes an array's data in a standard way. It was introduced in NumPy. In Python 2.7 and above it is replaced by the new buffer protocol, though the buffer protocol is still a work in progress. The array struct interface, on the other hand, is stable and works with earlier Python versions. So for now the array struct interface is the predominate way pygame handles array introspection.

For 2d arrays of integer pixel values, the values are mapped to the pixel format of the related surface. To get the actual color of a pixel value use pygame.Surface.unmap_rgb()convert a mapped integer color value into a Color. 2d arrays can only be used directly between surfaces having the same pixel layout.

New in pygame 1.9.2.

pygame.pixelcopy.surface_to_array()
copy surface pixels to an array object
surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None

The surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument kind and the target array dimension, a copy may be raw pixel value, RGB, a color component slice, or colorkey alpha transparency value. Recognized kind values are the single character codes 'P', 'R', 'G', 'B', 'A', and 'C'. Kind codes are case insensitive, so 'p' is equivalent to 'P'. The first two dimensions of the target must be the surface size (w, h).

The default 'P' kind code does a direct raw integer pixel (mapped) value copy to a 2D array and a 'RGB' pixel component (unmapped) copy to a 3D array having shape (w, h, 3). For an 8 bit colormap surface this means the table index is copied to a 2D array, not the table value itself. A 2D array's item size must be at least as large as the surface's pixel byte size. The item size of a 3D array must be at least one byte.

For the 'R', 'G', 'B', and 'A' copy kinds a single color component of the unmapped surface pixels are copied to the target 2D array. For kind 'A' and surfaces with source alpha (the surface was created with the SRCALPHA flag), has a colorkey (set with Surface.set_colorkey()), or has a blanket alpha (set with Surface.set_alpha()) then the alpha values are those expected for a SDL surface. If a surface has no explicit alpha value, then the target array is filled with the value of the optional opaque surface_to_array argument (default 255: not transparent).

Copy kind 'C' is a special case for alpha copy of a source surface with colorkey. Unlike the 'A' color component copy, the clear argument value is used for colorkey matches, opaque otherwise. By default, a match has alpha 0 (totally transparent), while everything else is alpha 255 (totally opaque). It is a more general implementation of pygame.surfarray.array_colorkey()Copy the colorkey values into a 2d array.

Specific to surface_to_array, a ValueError is raised for target arrays with incorrect shape or item size. A TypeError is raised for an incorrect kind code. Surface specific problems, such as locking, raise a pygame.error.

pygame.pixelcopy.array_to_surface()
copy an array object to a surface
array_to_surface(<surface>, <array>) -> None

See pygame.surfarray.blit_array()Blit directly from a array values.

pygame.pixelcopy.map_array()
copy an array to another array, using surface format
map_array(<array>, <array>, <surface>) -> None

Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of <surface>.

pygame.pixelcopy.make_surface()
Copy an array to a new surface
pygame.pixelcopy.make_surface(array) -> Surface

Create a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.02914 pygame-2.6.1/docs/generated/ref/pygame.html0000644000175100001770000013770414676242424020250 0ustar00runnerdocker pygame — pygame v2.6.1 documentation
pygame
the top level pygame package
initialize all imported pygame modules
uninitialize all pygame modules
returns True if pygame is currently initialized
standard pygame exception
get the current error message
set the current error message
get the version number of SDL
get the byte order of SDL
register a function to be called when pygame quits
Encode a Unicode or bytes object
Encode a Unicode or bytes object as a file system path

The pygame package represents the top-level package for others to use. Pygame itself is broken into many submodules, but this does not affect programs that use pygame.

As a convenience, most of the top-level variables in pygame have been placed inside a module named pygame.localspygame constants. This is meant to be used with from pygame.locals import *, in addition to import pygame.

When you import pygame all available pygame submodules are automatically imported. Be aware that some of the pygame modules are considered optional, and may not be available. In that case, pygame will provide a placeholder object instead of the module, which can be used to test for availability.

pygame.init()
initialize all imported pygame modules
init() -> (numpass, numfail)

Initialize all imported pygame modules. No exceptions will be raised if a module fails, but the total number if successful and failed inits will be returned as a tuple. You can always initialize individual modules manually, but pygame.init()initialize all imported pygame modules is a convenient way to get everything started. The init() functions for individual modules will raise exceptions when they fail.

You may want to initialize the different modules separately to speed up your program or remove the modules your game does not require.

It is safe to call this init() more than once as repeated calls will have no effect. This is true even if you have pygame.quit() all the modules.

pygame.quit()
uninitialize all pygame modules
quit() -> None

Uninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is safe to call this function more than once as repeated calls have no effect.

Note

Calling pygame.quit()uninitialize all pygame modules will not exit your program. Consider letting your program end in the same way a normal Python program will end.

pygame.get_init()
returns True if pygame is currently initialized
get_init() -> bool

Returns True if pygame is currently initialized.

New in pygame 1.9.5.

exception pygame.error
standard pygame exception
raise pygame.error(message)

This exception is raised whenever a pygame or SDL operation fails. You can catch any anticipated problems and deal with the error. The exception is always raised with a descriptive message about the problem.

Derived from the RuntimeError exception, which can also be used to catch these raised errors.

pygame.get_error()
get the current error message
get_error() -> errorstr

SDL maintains an internal error message. This message will usually be given to you when pygame.error()standard pygame exception is raised, so this function will rarely be needed.

pygame.set_error()
set the current error message
set_error(error_msg) -> None

SDL maintains an internal error message. This message will usually be given to you when pygame.error()standard pygame exception is raised, so this function will rarely be needed.

pygame.get_sdl_version()
get the version number of SDL
get_sdl_version(linked=True) -> major, minor, patch

Returns the three version numbers of the SDL library. linked=True will cause the function to return the version of the library that pygame is linked against while linked=False will cause the function to return the version of the library that pygame is compiled against. It can be used to detect which features may or may not be available through pygame.

New in pygame 1.7.0.

Changed in pygame 2.2.0: linked keyword argument added

pygame.get_sdl_byteorder()
get the byte order of SDL
get_sdl_byteorder() -> int

Returns the byte order of the SDL library. It returns 1234 for little endian byte order and 4321 for big endian byte order.

New in pygame 1.8.

pygame.register_quit()
register a function to be called when pygame quits
register_quit(callable) -> None

When pygame.quit()uninitialize all pygame modules is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed.

pygame.encode_string()
Encode a Unicode or bytes object
encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None

obj: If Unicode, encode; if bytes, return unaltered; if anything else, return None; if not given, raise SyntaxError.

encoding (string): If present, encoding to use. The default is 'unicode_escape'.

errors (string): If given, how to handle unencodable characters. The default is 'backslashreplace'.

etype (exception type): If given, the exception type to raise for an encoding error. The default is UnicodeEncodeError, as returned by PyUnicode_AsEncodedString(). For the default encoding and errors values there should be no encoding errors.

This function is used in encoding file paths. Keyword arguments are supported.

New in pygame 1.9.2: (primarily for use in unit tests)

pygame.encode_file_path()
Encode a Unicode or bytes object as a file system path
encode_file_path([obj [, etype]]) -> bytes or None

obj: If Unicode, encode; if bytes, return unaltered; if anything else, return None; if not given, raise SyntaxError.

etype (exception type): If given, the exception type to raise for an encoding error. The default is UnicodeEncodeError, as returned by PyUnicode_AsEncodedString().

This function is used to encode file paths in pygame. Encoding is to the codec as returned by sys.getfilesystemencoding(). Keyword arguments are supported.

New in pygame 1.9.2: (primarily for use in unit tests)

pygame.version
small module containing version information
version number as a string
tupled integers of the version
repository revision of the build
tupled integers of the SDL library version

This module is automatically imported into the pygame package and can be used to check which version of pygame has been imported.

pygame.version.ver
version number as a string
ver = '1.2'

This is the version represented as a string. It can contain a micro release number as well, e.g. '1.5.2'

pygame.version.vernum
tupled integers of the version
vernum = (1, 5, 3)

This version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this:

if pygame.version.vernum < (1, 5):
    print('Warning, older version of pygame (%s)' %  pygame.version.ver)
    disable_advanced_features = True

New in pygame 1.9.6: Attributes major, minor, and patch.

vernum.major == vernum[0]
vernum.minor == vernum[1]
vernum.patch == vernum[2]

Changed in pygame 1.9.6: str(pygame.version.vernum) returns a string like "2.0.0" instead of "(2, 0, 0)".

Changed in pygame 1.9.6: repr(pygame.version.vernum) returns a string like "PygameVersion(major=2, minor=0, patch=0)" instead of "(2, 0, 0)".

pygame.version.rev
repository revision of the build
rev = 'a6f89747b551+'

The Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds.

Important note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string "". It has always been returning an empty string since v1.9.5.

Changed in pygame 1.9.5: Always returns an empty string "".

pygame.version.SDL
tupled integers of the SDL library version
SDL = '(2, 0, 12)'

This is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this:

>>> pygame.version.SDL.major
2

printing the whole thing returns a string like this:

>>> pygame.version.SDL
SDLVersion(major=2, minor=0, patch=12)

New in pygame 2.0.0.

Setting Environment Variables

Some aspects of pygame's behaviour can be controlled by setting environment variables, they cover a wide range of the library's functionality. Some of the variables are from pygame itself, while others come from the underlying C SDL library that pygame uses.

In python, environment variables are usually set in code like this:

import os
os.environ['NAME_OF_ENVIRONMENT_VARIABLE'] = 'value_to_set'

Or to preserve users ability to override the variable:

import os
os.environ['ENV_VAR'] = os.environ.get('ENV_VAR', 'value')

If the variable is more useful for users of an app to set than the developer then they can set it like this:

Windows:

set NAME_OF_ENVIRONMENT_VARIABLE=value_to_set
python my_application.py

Linux/Mac:

ENV_VAR=value python my_application.py

For some variables they need to be set before initialising pygame, some must be set before even importing pygame, and others can simply be set right before the area of code they control is run.

Below is a list of environment variables, their settable values, and a brief description of what they do.


Pygame Environment Variables

These variables are defined by pygame itself.


PYGAME_DISPLAY - Experimental (subject to change)
Set index of the display to use, "0" is the default.

This sets the display where pygame will open its window or screen. The value set here will be used if set before calling pygame.display.set_mode()Initialize a window or screen for display, and as long as no 'display' parameter is passed into pygame.display.set_mode()Initialize a window or screen for display.


PYGAME_FORCE_SCALE -
Set to "photo" or "default".

This forces set_mode() to use the SCALED display mode and, if "photo" is set, makes the scaling use the slowest, but highest quality anisotropic scaling algorithm, if it is available. Must be set before calling pygame.display.set_mode()Initialize a window or screen for display.


PYGAME_BLEND_ALPHA_SDL2 - New in pygame 2.0.0
Set to "1" to enable the SDL2 blitter.

This makes pygame use the SDL2 blitter for all alpha blending. The SDL2 blitter is sometimes faster than the default blitter but uses a different formula so the final colours may differ. Must be set before pygame.init()initialize all imported pygame modules is called.


PYGAME_HIDE_SUPPORT_PROMPT -
Set to "1" to hide the prompt.

This stops the welcome message popping up in the console that tells you which version of python, pygame & SDL you are using. Must be set before importing pygame.


PYGAME_FREETYPE -
Set to "1" to enable.

This switches the pygame.font module to a pure freetype implementation that bypasses SDL_ttf. See the font module for why you might want to do this. Must be set before importing pygame.


PYGAME_CAMERA -
Set to "opencv" or "vidcapture"

Forces the library backend used in the camera module, overriding the platform defaults. Must be set before calling pygame.camera.init()Module init.

In pygame 2.0.3, backends can be set programmatically instead, and the old OpenCV backend has been replaced with one on top of "opencv-python," rather than the old "highgui" OpenCV port. Also, there is a new native Windows backend available.



SDL Environment Variables

These variables are defined by SDL.

For documentation on the environment variables available in pygame 1 try here. For Pygame 2, some selected environment variables are listed below.


SDL_VIDEO_CENTERED -
Set to "1" to enable centering the window.

This will make the pygame window open in the centre of the display. Must be set before calling pygame.display.set_mode()Initialize a window or screen for display.


SDL_VIDEO_WINDOW_POS -
Set to "x,y" to position the top left corner of the window.

This allows control over the placement of the pygame window within the display. Must be set before calling pygame.display.set_mode()Initialize a window or screen for display.


SDL_VIDEODRIVER -
Set to "drivername" to change the video driver used.

On some platforms there are multiple video drivers available and this allows users to pick between them. More information is available here. Must be set before calling pygame.init()initialize all imported pygame modules or pygame.display.init()Initialize the display module.


SDL_AUDIODRIVER -
Set to "drivername" to change the audio driver used.

On some platforms there are multiple audio drivers available and this allows users to pick between them. More information is available here. Must be set before calling pygame.init()initialize all imported pygame modules or pygame.mixer.init()initialize the mixer module.


SDL_VIDEO_ALLOW_SCREENSAVER
Set to "1" to allow screensavers while pygame apps are running.

By default pygame apps disable screensavers while they are running. Setting this environment variable allows users or developers to change that and make screensavers run again.


SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR
Set to "0" to re-enable the compositor.

By default SDL tries to disable the X11 compositor for all pygame apps. This is usually a good thing as it's faster, however if you have an app which doesn't update every frame and are using linux you may want to disable this bypass. The bypass has reported problems on KDE linux. This variable is only used on x11/linux platforms.


SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS
Set to "1" to allow joysticks to be updated even when the window is out of focus

By default, when the window is not in focus, input devices do not get updated. However, using this environment variable it is possible to get joystick updates even when the window is in the background. Must be set before calling pygame.init()initialize all imported pygame modules or pygame.joystick.init()Initialize the joystick module..




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.09914 pygame-2.6.1/docs/generated/ref/rect.html0000644000175100001770000020653414676242424017721 0ustar00runnerdocker pygame.Rect — pygame v2.6.1 documentation
pygame.Rect
pygame object for storing rectangular coordinates
Rect(left, top, width, height) -> Rect
Rect((left, top), (width, height)) -> Rect
Rect(object) -> Rect
copy the rectangle
moves the rectangle
moves the rectangle, in place
grow or shrink the rectangle size
grow or shrink the rectangle size, in place
scale the rectangle by given a multiplier
grow or shrink the rectangle size, in place
sets the position and size of the rectangle
moves the rectangle inside another
moves the rectangle inside another, in place
crops a rectangle inside another
crops a line inside a rectangle
joins two rectangles into one
joins two rectangles into one, in place
the union of many rectangles
the union of many rectangles, in place
resize and move a rectangle with aspect ratio
correct negative sizes
test if one rectangle is inside another
test if a point is inside a rectangle
test if two rectangles overlap
test if one rectangle in a list intersects
test if all rectangles in a list intersect
test if any object in a list intersects
test if all objects in a list intersect
test if one rectangle in a dictionary intersects
test if all rectangles in a dictionary intersect

Pygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. Rects can also be created from Python objects that are already a Rect or have an attribute named "rect".

Any Pygame function that requires a Rect argument also accepts any of these values to construct a Rect. This makes it easier to create Rects on the fly as arguments for functions.

The Rect functions that change the position or size of a Rect return a new copy of the Rect with the affected changes. The original Rect is not modified. Some methods have an alternate "in-place" version that returns None but affects the original Rect. These "in-place" methods are denoted with the "ip" suffix.

The Rect object has several virtual attributes which can be used to move and align the Rect:

x,y
top, left, bottom, right
topleft, bottomleft, topright, bottomright
midtop, midleft, midbottom, midright
center, centerx, centery
size, width, height
w,h

All of these attributes can be assigned to:

rect1.right = 10
rect2.center = (20,30)

Assigning to size, width or height changes the dimensions of the rectangle; all other assignments move the rectangle without resizing it. Notice that some attributes are integers and others are pairs of integers.

If a Rect has a nonzero width or height, it will return True for a nonzero test. Some methods return a Rect with 0 size to represent an invalid rectangle. A Rect with a 0 size will not collide when using collision detection methods (e.g. collidepoint(), colliderect(), etc.).

The coordinates for Rect objects are all integers. The size values can be programmed to have negative values, but these are considered illegal Rects for most operations.

There are several collision tests between other rectangles. Most python containers can be searched for collisions against a single Rect.

The area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and rect1.colliderect(rect2) returns false.

The Rect object is also iterable:

r = Rect(0, 1, 2, 3)
x, y, w, h = r

New in pygame 1.9.2: The Rect class can be subclassed. Methods such as copy() and move() will recognize this and return instances of the subclass. However, the subclass's __init__() method is not called, and __new__() is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied.

copy()
copy the rectangle
copy() -> Rect

Returns a new rectangle having the same position and size as the original.

New in pygame 1.9

move()
moves the rectangle
move(x, y) -> Rect

Returns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative.

move_ip()
moves the rectangle, in place
move_ip(x, y) -> None

Same as the Rect.move() method, but operates in place.

inflate()
grow or shrink the rectangle size
inflate(x, y) -> Rect

Returns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off.

inflate_ip()
grow or shrink the rectangle size, in place
inflate_ip(x, y) -> None

Same as the Rect.inflate() method, but operates in place.

scale_by()
scale the rectangle by given a multiplier
scale_by(scalar) -> Rect
scale_by(scalex, scaley) -> Rect

Returns a new rectangle with the size scaled by the given multipliers. The rectangle remains centered around its current center. A single scalar or separate width and height scalars are allowed. Values above one will increase the size of the rectangle, whereas values between zero and one will decrease the size of the rectangle.

Changed in pygame 2.5.0: Added support for keyword arguments.

scale_by_ip()
grow or shrink the rectangle size, in place
scale_by_ip(scalar) -> None
scale_by_ip(scalex, scaley) -> None

Same as the Rect.scale_by() method, but operates in place.

Changed in pygame 2.5.0: Added support for keyword arguments.

update()
sets the position and size of the rectangle
update(left, top, width, height) -> None
update((left, top), (width, height)) -> None
update(object) -> None

Sets the position and size of the rectangle, in place. See parameters for pygame.Rect()pygame object for storing rectangular coordinates for the parameters of this function.

New in pygame 2.0.1.

clamp()
moves the rectangle inside another
clamp(Rect) -> Rect

Returns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed.

clamp_ip()
moves the rectangle inside another, in place
clamp_ip(Rect) -> None

Same as the Rect.clamp() method, but operates in place.

clip()
crops a rectangle inside another
clip(Rect) -> Rect

Returns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned.

clipline()
crops a line inside a rectangle
clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))
clipline(x1, y1, x2, y2) -> ()
clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))
clipline((x1, y1), (x2, y2)) -> ()
clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))
clipline((x1, y1, x2, y2)) -> ()
clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))
clipline(((x1, y1), (x2, y2))) -> ()

Returns the coordinates of a line that is cropped to be completely inside the rectangle. If the line does not overlap the rectangle, then an empty tuple is returned.

The line to crop can be any of the following formats (floats can be used in place of ints, but they will be truncated):

  • four ints

  • 2 lists/tuples/Vector2s of 2 ints

  • a list/tuple of four ints

  • a list/tuple of 2 lists/tuples/Vector2s of 2 ints

Returns:

a tuple with the coordinates of the given line cropped to be completely inside the rectangle is returned, if the given line does not overlap the rectangle, an empty tuple is returned

Return type:

tuple(tuple(int, int), tuple(int, int)) or ()

Raises:

TypeError -- if the line coordinates are not given as one of the above described line formats

Note

This method can be used for collision detection between a rect and a line. See example code below.

Note

The rect.bottom and rect.right attributes of a pygame.Rectpygame object for storing rectangular coordinates always lie one pixel outside of its actual border.

# Example using clipline().
clipped_line = rect.clipline(line)

if clipped_line:
    # If clipped_line is not an empty tuple then the line
    # collides/overlaps with the rect. The returned value contains
    # the endpoints of the clipped line.
    start, end = clipped_line
    x1, y1 = start
    x2, y2 = end
else:
    print("No clipping. The line is fully outside the rect.")

Changed in pygame 2.5.0: Added support for keyword arguments.

New in pygame 2.0.0.

union()
joins two rectangles into one
union(Rect) -> Rect

Returns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals.

union_ip()
joins two rectangles into one, in place
union_ip(Rect) -> None

Same as the Rect.union() method, but operates in place.

unionall()
the union of many rectangles
unionall(Rect_sequence) -> Rect

Returns the union of one rectangle with a sequence of many rectangles.

Changed in pygame 2.5.0: Added support for keyword arguments.

unionall_ip()
the union of many rectangles, in place
unionall_ip(Rect_sequence) -> None

The same as the Rect.unionall() method, but operates in place.

Changed in pygame 2.5.0: Added support for keyword arguments.

fit()
resize and move a rectangle with aspect ratio
fit(Rect) -> Rect

Returns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height.

normalize()
correct negative sizes
normalize() -> None

This will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped.

contains()
test if one rectangle is inside another
contains(Rect) -> bool

Returns true when the argument is completely inside the Rect.

collidepoint()
test if a point is inside a rectangle
collidepoint(x, y) -> bool
collidepoint((x,y)) -> bool

Returns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle.

Note

For collision detection between a rect and a line the clipline() method can be used.

colliderect()
test if two rectangles overlap
colliderect(Rect) -> bool

Returns true if any portion of either rectangle overlap (except the top+bottom or left+right edges).

Note

For collision detection between a rect and a line the clipline() method can be used.

collidelist()
test if one rectangle in a list intersects
collidelist(list) -> index

Test whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned.

Changed in pygame 2.5.0: Added support for keyword arguments.

collidelistall()
test if all rectangles in a list intersect
collidelistall(list) -> indices

Returns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned.

Not only Rects are valid arguments, but these are all valid calls:

Rect = pygame.Rect
r = Rect(0, 0, 10, 10)

list_of_rects = [Rect(1, 1, 1, 1), Rect(2, 2, 2, 2)]
indices0 = r.collidelistall(list_of_rects)

list_of_lists = [[1, 1, 1, 1], [2, 2, 2, 2]]
indices1 = r.collidelistall(list_of_lists)

list_of_tuples = [(1, 1, 1, 1), (2, 2, 2, 2)]
indices2 = r.collidelistall(list_of_tuples)

list_of_double_tuples = [((1, 1), (1, 1)), ((2, 2), (2, 2))]
indices3 = r.collidelistall(list_of_double_tuples)

class ObjectWithRectAttribute(object):
    def __init__(self, r):
        self.rect = r

list_of_object_with_rect_attribute = [
    ObjectWithRectAttribute(Rect(1, 1, 1, 1)),
    ObjectWithRectAttribute(Rect(2, 2, 2, 2)),
]
indices4 = r.collidelistall(list_of_object_with_rect_attribute)

class ObjectWithCallableRectAttribute(object):
    def __init__(self, r):
        self._rect = r

    def rect(self):
        return self._rect

list_of_object_with_callable_rect = [
    ObjectWithCallableRectAttribute(Rect(1, 1, 1, 1)),
    ObjectWithCallableRectAttribute(Rect(2, 2, 2, 2)),
]
indices5 = r.collidelistall(list_of_object_with_callable_rect)

Changed in pygame 2.5.0: Added support for keyword arguments.

collideobjects()
test if any object in a list intersects
collideobjects(rect_list) -> object
collideobjects(obj_list, key=func) -> object

Experimental: feature still in development available for testing and feedback. It may change. Please leave collideobjects feedback with authors

Test whether the rectangle collides with any object in the sequence. The object of the first collision found is returned. If no collisions are found then None is returned

If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. lambda obj: obj.rectangle. If an object has multiple attributes of type Rect then key could return one of them.

r = Rect(1, 1, 10, 10)

rects = [
    Rect(1, 1, 10, 10),
    Rect(5, 5, 10, 10),
    Rect(15, 15, 1, 1),
    Rect(2, 2, 1, 1),
]

result = r.collideobjects(rects)  # -> <rect(1, 1, 10, 10)>
print(result)

class ObjectWithSomRectAttribute:
    def __init__(self, name, collision_box, draw_rect):
        self.name = name
        self.draw_rect = draw_rect
        self.collision_box = collision_box

    def __repr__(self):
        return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>'

objects = [
    ObjectWithSomRectAttribute("A", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)),
    ObjectWithSomRectAttribute("B", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)),
    ObjectWithSomRectAttribute("C", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)),
]

# collision = r.collideobjects(objects) # this does not work because the items in the list are no Rect like object
collision = r.collideobjects(
    objects, key=lambda o: o.collision_box
)  # -> <ObjectWithSomRectAttribute("B", [1, 1, 10, 10], [300, 300, 50, 50])>
print(collision)

screen_rect = r.collideobjects(objects, key=lambda o: o.draw_rect)  # -> None
print(screen_rect)

New in pygame 2.1.3.

collideobjectsall()
test if all objects in a list intersect
collideobjectsall(rect_list) -> objects
collideobjectsall(obj_list, key=func) -> objects

Experimental: feature still in development available for testing and feedback. It may change. Please leave collideobjectsall feedback with authors

Returns a list of all the objects that contain rectangles that collide with the Rect. If no intersecting objects are found, an empty list is returned.

If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. lambda obj: obj.rectangle. If an object has multiple attributes of type Rect then key could return one of them.

r = Rect(1, 1, 10, 10)

rects = [
    Rect(1, 1, 10, 10),
    Rect(5, 5, 10, 10),
    Rect(15, 15, 1, 1),
    Rect(2, 2, 1, 1),
]

result = r.collideobjectsall(
    rects
)  # -> [<rect(1, 1, 10, 10)>, <rect(5, 5, 10, 10)>, <rect(2, 2, 1, 1)>]
print(result)

class ObjectWithSomRectAttribute:
    def __init__(self, name, collision_box, draw_rect):
        self.name = name
        self.draw_rect = draw_rect
        self.collision_box = collision_box

    def __repr__(self):
        return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>'

objects = [
    ObjectWithSomRectAttribute("A", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)),
    ObjectWithSomRectAttribute("B", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)),
    ObjectWithSomRectAttribute("C", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)),
]

# collisions = r.collideobjectsall(objects) # this does not work because ObjectWithSomRectAttribute is not a Rect like object
collisions = r.collideobjectsall(
    objects, key=lambda o: o.collision_box
)  # -> [<ObjectWithSomRectAttribute("A", [1, 1, 10, 10], [300, 300, 50, 50])>, <ObjectWithSomRectAttribute("B", [5, 5, 10, 10], [200, 500, 50, 50])>]
print(collisions)

screen_rects = r.collideobjectsall(objects, key=lambda o: o.draw_rect)  # -> []
print(screen_rects)

New in pygame 2.1.3.

collidedict()
test if one rectangle in a dictionary intersects
collidedict(dict) -> (key, value)
collidedict(dict) -> None
collidedict(dict, use_values=0) -> (key, value)
collidedict(dict, use_values=0) -> None

Returns the first key and value pair that intersects with the calling Rect object. If no collisions are found, None is returned. If use_values is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.

Note

Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. rect.collidedict({tuple(key_rect) : value})

Changed in pygame 2.5.0: Added support for keyword arguments.

collidedictall()
test if all rectangles in a dictionary intersect
collidedictall(dict) -> [(key, value), ...]
collidedictall(dict, use_values=0) -> [(key, value), ...]

Returns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If use_values is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used.

Note

Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. rect.collidedictall({tuple(key_rect) : value})

Changed in pygame 2.5.0: Added support for keyword arguments.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.14014 pygame-2.6.1/docs/generated/ref/scrap.html0000644000175100001770000007332314676242424020072 0ustar00runnerdocker pygame.scrap — pygame v2.6.1 documentation
pygame.scrap
pygame module for clipboard support.
Initializes the scrap module.
Returns True if the scrap module is currently initialized.
Gets the data for the specified type from the clipboard.
Gets a list of the available clipboard types.
Places data into the clipboard.
Checks whether data for a given type is available in the clipboard.
Indicates if the clipboard ownership has been lost by the pygame application.
Sets the clipboard access mode.

EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release.

The scrap module is for transferring data to/from the clipboard. This allows for cutting and pasting data between pygame and other applications. Some basic data (MIME) types are defined and registered:

 pygame         string
constant        value        description
--------------------------------------------------
SCRAP_TEXT   "text/plain"    plain text
SCRAP_BMP    "image/bmp"     BMP encoded image data
SCRAP_PBM    "image/pbm"     PBM encoded image data
SCRAP_PPM    "image/ppm"     PPM encoded image data

pygame.SCRAP_PPM, pygame.SCRAP_PBM and pygame.SCRAP_BMP are suitable for surface buffers to be shared with other applications. pygame.SCRAP_TEXT is an alias for the plain text clipboard type.

Depending on the platform, additional types are automatically registered when data is placed into the clipboard to guarantee a consistent sharing behaviour with other applications. The following listed types can be used as strings to be passed to the respective pygame.scrappygame module for clipboard support. module functions.

For Windows platforms, these additional types are supported automatically and resolve to their internal definitions:

"text/plain;charset=utf-8"   UTF-8 encoded text
"audio/wav"                  WAV encoded audio
"image/tiff"                 TIFF encoded image data

For X11 platforms, these additional types are supported automatically and resolve to their internal definitions:

"text/plain;charset=utf-8"   UTF-8 encoded text
"UTF8_STRING"                UTF-8 encoded text
"COMPOUND_TEXT"              COMPOUND text

User defined types can be used, but the data might not be accessible by other applications unless they know what data type to look for. Example: Data placed into the clipboard by pygame.scrap.put("my_data_type", byte_data) can only be accessed by applications which query the clipboard for the "my_data_type" data type.

For an example of how the scrap module works refer to the examples page (pygame.examples.scrap_clipboard.main()access the clipboard) or the code directly in GitHub (pygame/examples/scrap_clipboard.py).

New in pygame 1.8.

Note

The scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases.

pygame.scrap.init()
Initializes the scrap module.
init() -> None

Initialize the scrap module.

Raises:

pygame.errorstandard pygame exception -- if unable to initialize scrap module

Note

The scrap module requires pygame.display.set_mode()Initialize a window or screen for display be called before being initialized.

pygame.scrap.get_init()
Returns True if the scrap module is currently initialized.
get_init() -> bool

Gets the scrap module's initialization state.

Returns:

True if the pygame.scrappygame module for clipboard support. module is currently initialized, False otherwise

Return type:

bool

New in pygame 1.9.5.

pygame.scrap.get()
Gets the data for the specified type from the clipboard.
get(type) -> bytes | None

Retrieves the data for the specified type from the clipboard. The data is returned as a byte string and might need further processing (such as decoding to Unicode).

Parameters:

type (string) -- data type to retrieve from the clipboard

Returns:

data (bytes object) for the given type identifier or None if no data for the given type is available

Return type:

bytes | None

text = pygame.scrap.get(pygame.SCRAP_TEXT)
if text:
    print("There is text in the clipboard.")
else:
    print("There does not seem to be text in the clipboard.")
pygame.scrap.get_types()
Gets a list of the available clipboard types.
get_types() -> list

Gets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the pygame.scrap.get()Gets the data for the specified type from the clipboard. method to get the clipboard content of the specific type.

Returns:

list of strings of the available clipboard data types, if there is no data in the clipboard an empty list is returned

Return type:

list

for t in pygame.scrap.get_types():
    if "text" in t:
        # There is some content with the word "text" in its type string.
        print(pygame.scrap.get(t))
pygame.scrap.put()
Places data into the clipboard.
put(type, data) -> None

Places data for a given clipboard type into the clipboard. The data must be a string buffer. The type is a string identifying the type of data to be placed into the clipboard. This can be one of the predefined pygame.SCRAP_PBM, pygame.SCRAP_PPM, pygame.SCRAP_BMP or pygame.SCRAP_TEXT values or a user defined string identifier.

Parameters:
  • type (string) -- type identifier of the data to be placed into the clipboard

  • data (bytes) -- data to be place into the clipboard, a bytes object

Raises:

pygame.errorstandard pygame exception -- if unable to put the data into the clipboard

with open("example.bmp", "rb") as fp:
    pygame.scrap.put(pygame.SCRAP_BMP, fp.read())
# The image data is now on the clipboard for other applications to access
# it.
pygame.scrap.put(pygame.SCRAP_TEXT, b"A text to copy")
pygame.scrap.put("Plain text", b"Data for user defined type 'Plain text'")
pygame.scrap.contains()
Checks whether data for a given type is available in the clipboard.
contains(type) -> bool

Checks whether data for the given type is currently available in the clipboard.

Parameters:

type (string) -- data type to check availability of

Returns:

True if data for the passed type is available in the clipboard, False otherwise

Return type:

bool

if pygame.scrap.contains(pygame.SCRAP_TEXT):
    print("There is text in the clipboard.")
if pygame.scrap.contains("own_data_type"):
    print("There is stuff in the clipboard.")
pygame.scrap.lost()
Indicates if the clipboard ownership has been lost by the pygame application.
lost() -> bool

Indicates if the clipboard ownership has been lost by the pygame application.

Returns:

True, if the clipboard ownership has been lost by the pygame application, False if the pygame application still owns the clipboard

Return type:

bool

if pygame.scrap.lost():
    print("The clipboard is in use by another application.")
pygame.scrap.set_mode()
Sets the clipboard access mode.
set_mode(mode) -> None

Sets the access mode for the clipboard. This is only of interest for X11 environments where clipboard modes pygame.SCRAP_SELECTION (for mouse selections) and pygame.SCRAP_CLIPBOARD (for the clipboard) are available. Setting the mode to pygame.SCRAP_SELECTION in other environments will not change the mode from pygame.SCRAP_CLIPBOARD.

Parameters:

mode -- access mode, supported values are pygame.SCRAP_CLIPBOARD and pygame.SCRAP_SELECTION (pygame.SCRAP_SELECTION only has an effect when used on X11 platforms)

Raises:

ValueError -- if the mode parameter is not pygame.SCRAP_CLIPBOARD or pygame.SCRAP_SELECTION




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.18414 pygame-2.6.1/docs/generated/ref/sdl2_controller.html0000644000175100001770000010616514676242424022072 0ustar00runnerdocker pygame._sdl2.controller — pygame v2.6.1 documentation
pygame._sdl2.controller
Pygame module to work with controllers.
initialize the controller module
Uninitialize the controller module.
Returns True if the controller module is initialized.
Sets the current state of events related to controllers
Gets the current state of events related to controllers
Get the number of joysticks connected
Check if the given joystick is supported by the game controller interface
Get the name of the controller
Create a new Controller object.

Note

Use import pygame._sdl2.controller before using this module.

This module offers control over common controller types like the dualshock 4 or the xbox 360 controllers: They have two analog sticks, two triggers, two shoulder buttons, a dpad, 4 buttons on the side, 2 (or 3) buttons in the middle.

Pygame uses xbox controllers naming conventions (like a, b, x, y for buttons) but they always refer to the same buttons. For example CONTROLLER_BUTTON_X is always the leftmost button of the 4 buttons on the right.

Controllers can generate the following events:

CONTROLLERAXISMOTION, CONTROLLERBUTTONDOWN, CONTROLLERBUTTONUP,
CONTROLLERDEVICEREMAPPED, CONTROLLERDEVICEADDED, CONTROLLERDEVICEREMOVED

Additionally if pygame is built with SDL 2.0.14 or higher the following events can also be generated (to get the version of sdl pygame is built with use pygame.version.SDL()tupled integers of the SDL library version):

CONTROLLERTOUCHPADDOWN, CONTROLLERTOUCHPADMOTION, CONTROLLERTOUCHPADUP

These events can be enabled/disabled by pygame._sdl2.controller.set_eventstate()Sets the current state of events related to controllers Note that controllers can generate joystick events as well. This function only toggles events related to controllers.

Note

See the pygame.joystickPygame module for interacting with joysticks, gamepads, and trackballs. for a more versatile but more advanced api.

New in pygame 2: This module requires SDL2.

pygame._sdl2.controller.init()
initialize the controller module
init() -> None

Initialize the controller module.

pygame._sdl2.controller.quit()
Uninitialize the controller module.
quit() -> None

Uninitialize the controller module.

pygame._sdl2.controller.get_init()
Returns True if the controller module is initialized.
get_init() -> bool

Test if pygame._sdl2.controller.init() was called.

pygame._sdl2.controller.set_eventstate()
Sets the current state of events related to controllers
set_eventstate(state) -> None

Enable or disable events connected to controllers.

Note

Controllers can still generate joystick events, which will not be toggled by this function.

Changed in pygame 2.0.2:: Changed return type from int to None

pygame._sdl2.controller.get_eventstate()
Gets the current state of events related to controllers
get_eventstate() -> bool

Returns the current state of events related to controllers, True meaning events will be posted.

New in pygame 2.0.2.

pygame._sdl2.controller.get_count()
Get the number of joysticks connected
get_count() -> int

Get the number of joysticks connected.

pygame._sdl2.controller.is_controller()
Check if the given joystick is supported by the game controller interface
is_controller(index) -> bool

Returns True if the index given can be used to create a controller object.

pygame._sdl2.controller.name_forindex()
Get the name of the controller
name_forindex(index) -> name or None

Returns the name of controller, or None if there's no name or the index is invalid.

pygame._sdl2.controller.Controller
Create a new Controller object.
Controller(index) -> Controller

Create a new Controller object. Index should be integer between 0 and pygame._sdl2.controller.get_count(). Controllers also can be created from a pygame.joystick.Joystick using pygame._sdl2.controller.from_joystick. Controllers are initialized on creation.

uninitialize the Controller
check if the Controller is initialized
Create a Controller from a pygame.joystick.Joystick object
Check if the Controller has been opened and is currently connected.
Returns a pygame.joystick.Joystick() object
Get the current state of a joystick axis
Get the current state of a button
Get the mapping assigned to the controller
Assign a mapping to the controller
Start a rumbling effect
Stop any rumble effect playing
quit()
uninitialize the Controller
quit() -> None

Close a Controller object. After this the pygame event queue will no longer receive events from the device.

It is safe to call this more than once.

get_init()
check if the Controller is initialized
get_init() -> bool

Returns True if the Controller object is currently initialised.

static from_joystick()
Create a Controller from a pygame.joystick.Joystick object
from_joystick(joystick) -> Controller

Create a Controller object from a pygame.joystick.Joystick object

attached()
Check if the Controller has been opened and is currently connected.
attached() -> bool

Returns True if the Controller object is opened and connected.

as_joystick()
Returns a pygame.joystick.Joystick() object
as_joystick() -> Joystick object

Returns a pygame.joystick.Joystick() object created from this controller's index

get_axis()
Get the current state of a joystick axis
get_axis(axis) -> int

Get the current state of a trigger or joystick axis. The axis argument must be one of the following constants:

CONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY,
CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY,
CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHT

Joysticks can return a value between -32768 and 32767. Triggers however can only return a value between 0 and 32768.

get_button()
Get the current state of a button
get_button(button) -> bool

Get the current state of a button, True meaning it is pressed down. The button argument must be one of the following constants:

CONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B,
CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y
CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_DPAD_DOWN,
CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT,
CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_RIGHTSHOULDER,
CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_RIGHTSTICK,
CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_GUIDE,
CONTROLLER_BUTTON_START
get_mapping()
Get the mapping assigned to the controller
get_mapping() -> mapping

Returns a dict containing the mapping of the Controller. For more information see Controller.set_mapping()

Changed in pygame 2.0.2:: Return type changed from str to dict

set_mapping()
Assign a mapping to the controller
set_mapping(mapping) -> int

Rebind buttons, axes, triggers and dpads. The mapping should be a dict containing all buttons, hats and axes. The easiest way to get this is to use the dict returned by Controller.get_mapping(). To edit this mapping assign a value to the original button. The value of the dictionary must be a button, hat or axis represented in the following way:

  • For a button use: bX where X is the index of the button.

  • For a hat use: hX.Y where X is the index and the Y is the direction (up: 1, right: 2, down: 3, left: 4).

  • For an axis use: aX where x is the index of the axis.

An example of mapping:

mapping = controller.get_mapping() # Get current mapping
mapping["a"] = "b3" # Remap button a to y
mapping["y"] = "b0" # Remap button y to a
controller.set_mapping(mapping) # Set the mapping

The function will return 1 if a new mapping is added or 0 if an existing one is updated.

Changed in pygame 2.0.2:: Renamed from add_mapping to set_mapping

Changed in pygame 2.0.2:: Argument type changed from str to dict

rumble()
Start a rumbling effect
rumble(low_frequency, high_frequency, duration) -> bool

Start a rumble effect on the controller, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or Controller.stop_rumble() is called. If an effect is already playing, then it will be overwritten.

Returns True if the rumble was played successfully or False if the controller does not support it or pygame.version.SDL()tupled integers of the SDL library version is below 2.0.9.

New in pygame 2.0.2.

stop_rumble()
Stop any rumble effect playing
stop_rumble() -> None

Stops any rumble effect playing on the controller. See Controller.rumble() for more information.

New in pygame 2.0.2.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.24314 pygame-2.6.1/docs/generated/ref/sdl2_video.html0000644000175100001770000016517614676242424021024 0ustar00runnerdocker pygame.sdl2_video — pygame v2.6.1 documentation
pygame.sdl2_video

Warning

This module isn't ready for prime time yet, it's still in development. These docs are primarily meant to help the pygame developers and super-early adopters who are in communication with the developers. This API will change.

pygame object that represents a window
pygame object that representing a Texture.
Easy way to use a portion of a Texture without worrying about srcrect all the time.
Create a 2D rendering context for a window.
Experimental pygame module for porting new SDL video systems
pygame._sdl2.video.Window
pygame object that represents a window
Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window
Creates window using window created by pygame.display.set_mode().
Create Window from another window. Could be from another UI toolkit.
Gets or sets whether the mouse is confined to the window.
Gets or sets the window's relative mouse motion state.
Enable windowed mode (exit fullscreen).
Enter fullscreen.
Gets or sets whether the window title.
Destroys the window.
Hide the window.
Show the window.
Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.
Restore the size and position of a minimized or maximized window.
Maximize the window.
Minimize the window.
Gets and sets whether the window is resizable.
Add or remove the border from the window.
Set the icon for the window.
Get the unique window ID. *Read-only*
Gets and sets the window size.
Gets and sets the window position.
Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).
Get the index of the display that owns the window. *Read-only*
Set the window as a modal for a parent window. This function is only supported on X11.
classmethod from_display_module()
Creates window using window created by pygame.display.set_mode().
from_display_module() -> Window
classmethod from_window()
Create Window from another window. Could be from another UI toolkit.
from_window(other) -> Window
grab
Gets or sets whether the mouse is confined to the window.
grab -> bool
relative_mouse
Gets or sets the window's relative mouse motion state.
relative_mouse -> bool
set_windowed()
Enable windowed mode (exit fullscreen).
set_windowed() -> None
set_fullscreen()
Enter fullscreen.
set_fullscreen(desktop=False) -> None
title
Gets or sets whether the window title.
title -> string
destroy()
Destroys the window.
destroy() -> None
hide()
Hide the window.
hide() -> None
show()
Show the window.
show() -> None
focus()
Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.
focus(input_only=False) -> None
restore()
Restore the size and position of a minimized or maximized window.
restore() -> None
maximize()
Maximize the window.
maximize() -> None
minimize()
Minimize the window.
maximize() -> None
resizable
Gets and sets whether the window is resizable.
resizable -> bool
borderless
Add or remove the border from the window.
borderless -> bool
set_icon()
Set the icon for the window.
set_icon(surface) -> None
id
Get the unique window ID. *Read-only*
id -> int
size
Gets and sets the window size.
size -> (int, int)
position
Gets and sets the window position.
position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED
opacity
Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).
opacity -> float
display_index
Get the index of the display that owns the window. *Read-only*
display_index -> int
set_modal_for()
Set the window as a modal for a parent window. This function is only supported on X11.
set_modal_for(Window) -> None
pygame._sdl2.video.Texture
pygame object that representing a Texture.
Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture
Create a texture from an existing surface.
Gets the renderer associated with the Texture. *Read-only*
Gets the width of the Texture. *Read-only*
Gets the height of the Texture. *Read-only*
Gets and sets an additional alpha value multiplied into render copy operations.
Gets and sets the blend mode for the Texture.
Gets and sets an additional color value multiplied into render copy operations.
Get the rectangular area of the texture.
Copy a portion of the texture to the rendering target.
Update the texture with a Surface. WARNING: Slow operation, use sparingly.
static from_surface()
Create a texture from an existing surface.
from_surface(renderer, surface) -> Texture
renderer
Gets the renderer associated with the Texture. *Read-only*
renderer -> Renderer
width
Gets the width of the Texture. *Read-only*
width -> int
height
Gets the height of the Texture. *Read-only*
height -> int
alpha
Gets and sets an additional alpha value multiplied into render copy operations.
alpha -> int
blend_mode
Gets and sets the blend mode for the Texture.
blend_mode -> int
color
Gets and sets an additional color value multiplied into render copy operations.
color -> color
get_rect()
Get the rectangular area of the texture.
get_rect(**kwargs) -> Rect
draw()
Copy a portion of the texture to the rendering target.
draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None
update()
Update the texture with a Surface. WARNING: Slow operation, use sparingly.
update(surface, area=None) -> None
pygame._sdl2.video.Image
Easy way to use a portion of a Texture without worrying about srcrect all the time.
Image(textureOrImage, srcrect=None) -> Image
Get the rectangular area of the Image.
Copy a portion of the Image to the rendering target.
Gets and sets the angle the Image draws itself with.
Gets and sets the origin. Origin=None means the Image will be rotated around its center.
Gets and sets whether the Image is flipped on the x axis.
Gets and sets whether the Image is flipped on the y axis.
Gets and sets the Image color modifier.
Gets and sets the Image alpha modifier.
Gets and sets the blend mode for the Image.
Gets and sets the Texture the Image is based on.
Gets and sets the Rect the Image is based on.
get_rect()
Get the rectangular area of the Image.
get_rect() -> Rect
draw()
Copy a portion of the Image to the rendering target.
draw(srcrect=None, dstrect=None) -> None
angle
Gets and sets the angle the Image draws itself with.
angle -> float
origin
Gets and sets the origin. Origin=None means the Image will be rotated around its center.
origin -> (float, float) or None.
flip_x
Gets and sets whether the Image is flipped on the x axis.
flip_x -> bool
flip_y
Gets and sets whether the Image is flipped on the y axis.
flip_y -> bool
color
Gets and sets the Image color modifier.
color -> Color
alpha
Gets and sets the Image alpha modifier.
alpha -> float
blend_mode
Gets and sets the blend mode for the Image.
blend_mode -> int
texture
Gets and sets the Texture the Image is based on.
texture -> Texture
srcrect
Gets and sets the Rect the Image is based on.
srcrect -> Rect
pygame._sdl2.video.Renderer
Create a 2D rendering context for a window.
Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer
Easy way to create a Renderer.
Gets and sets the blend mode used by the drawing functions.
Gets and sets the color used by the drawing functions.
Clear the current rendering target with the drawing color.
Updates the screen with any new rendering since previous call.
Returns the drawing area on the target.
Set the drawing area on the target. If area is None, the entire target will be used.
Gets and sets the logical size.
Gets and sets the scale.
Gets and sets the render target. None represents the default target (the renderer).
For compatibility purposes. Textures created by different Renderers cannot be shared!
Draws a line.
Draws a point.
Draws a rectangle.
Fills a rectangle.
Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.
classmethod from_window()
Easy way to create a Renderer.
from_window(window) -> Renderer
draw_blend_mode
Gets and sets the blend mode used by the drawing functions.
draw_blend_mode -> int
draw_color
Gets and sets the color used by the drawing functions.
draw_color -> Color
clear()
Clear the current rendering target with the drawing color.
clear() -> None
present()
Updates the screen with any new rendering since previous call.
present() -> None
get_viewport()
Returns the drawing area on the target.
get_viewport() -> Rect
set_viewport()
Set the drawing area on the target. If area is None, the entire target will be used.
set_viewport(area) -> None
logical_size
Gets and sets the logical size.
logical_size -> (int width, int height)
scale
Gets and sets the scale.
scale -> (float x_scale, float y_scale)
target
Gets and sets the render target. None represents the default target (the renderer).
target -> Texture or None
blit()
For compatibility purposes. Textures created by different Renderers cannot be shared!
blit(source, dest, area=None, special_flags=0)-> Rect
draw_line()
Draws a line.
draw_line(p1, p2) -> None
draw_point()
Draws a point.
draw_point(point) -> None
draw_rect()
Draws a rectangle.
draw_rect(rect)-> None
fill_rect()
Fills a rectangle.
fill_rect(rect)-> None
to_surface()
Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.
to_surface(surface=None, area=None)-> Surface



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.2621398 pygame-2.6.1/docs/generated/ref/sndarray.html0000644000175100001770000003372214676242424020604 0ustar00runnerdocker pygame.sndarray — pygame v2.6.1 documentation
pygame.sndarray
pygame module for accessing sound sample data
copy Sound samples into an array
reference Sound samples into an array
convert an array into a Sound object
Sets the array system to be used for sound arrays
Gets the currently active array type.
Gets the array system types currently supported.

Functions to convert between NumPy arrays and Sound objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, surfarray becomes a MissingModule object.

Sound data is made of thousands of samples per second, and each sample is the amplitude of the wave at a particular moment in time. For example, in 22-kHz format, element number 5 of the array is the amplitude of the wave after 5/22000 seconds.

The arrays are indexed by the X axis first, followed by the Y axis. Each sample is an 8-bit or 16-bit integer, depending on the data format. A stereo sound file has two values per sample, while a mono sound file only has one.

pygame.sndarray.array()
copy Sound samples into an array
array(Sound) -> array

Creates a new array for the sound data and copies the samples. The array will always be in the format returned from pygame.mixer.get_init().

pygame.sndarray.samples()
reference Sound samples into an array
samples(Sound) -> array

Creates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from pygame.mixer.get_init().

pygame.sndarray.make_sound()
convert an array into a Sound object
make_sound(array) -> Sound

Create a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format.

pygame.sndarray.use_arraytype()
Sets the array system to be used for sound arrays
use_arraytype (arraytype) -> None

DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is 'numpy'. Other values will raise ValueError. Using this function will raise a DeprecationWarning. .. ## pygame.sndarray.use_arraytype ##

pygame.sndarray.get_arraytype()
Gets the currently active array type.
get_arraytype () -> str

DEPRECATED: Returns the currently active array type. This will be a value of the get_arraytypes() tuple and indicates which type of array module is used for the array creation. Using this function will raise a DeprecationWarning.

New in pygame 1.8.

pygame.sndarray.get_arraytypes()
Gets the array system types currently supported.
get_arraytypes () -> tuple

DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the pygame.sndarray.use_arraytype()Sets the array system to be used for sound arrays () method. If no supported array system could be found, None will be returned. Using this function will raise a DeprecationWarning.

New in pygame 1.8.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.3641398 pygame-2.6.1/docs/generated/ref/sprite.html0000644000175100001770000026735414676242424020301 0ustar00runnerdocker pygame.sprite — pygame v2.6.1 documentation
pygame.sprite
pygame module with basic game object classes
Simple base class for visible game objects.
A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.
A subclass of Sprite with more attributes and features.
A container class to hold and manage multiple Sprite objects.
A subclass of WeakSprite and DirtySprite that combines the benefits of both classes.
Same as pygame.sprite.Group
Same as pygame.sprite.Group
Group sub-class that tracks dirty updates.
RenderUpdates sub-class that draws Sprites in order of addition.
LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.
LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.
Group container that holds a single sprite.
Find sprites in a group that intersect another sprite.
Collision detection between two sprites, using rects.
Collision detection between two sprites, using rects scaled to a ratio.
Collision detection between two sprites, using circles.
Collision detection between two sprites, using circles scaled to a ratio.
Collision detection between two sprites, using masks.
Find all sprites that collide between two groups.
Simple test if a sprite intersects anything in a group.

This module contains several simple classes to be used within games. There is the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games.

The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain.

The basic Group class can draw the Sprites it contains to a Surface. The Group.draw() method requires that each Sprite have a Surface.image attribute and a Surface.rect. The Group.clear() method requires these same attributes, and can be used to erase all the Sprites with background. There are also more advanced Groups: pygame.sprite.RenderUpdates() and pygame.sprite.OrderedUpdates().

Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a Surface.rect attribute assigned.

The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game.

Sprites and Groups manage their relationships with the add() and remove() methods. These methods can accept a single or multiple targets for membership. The default initializers for these classes also takes a single or list of targets for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group.

While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you add a Sprite or Group class.

Sprites are not thread safe. So lock them yourself if using threads.

pygame.sprite.Sprite
Simple base class for visible game objects.
Sprite(*groups) -> Sprite
method to control sprite behavior
add the sprite to groups
remove the sprite from groups
remove the Sprite from all Groups
does the sprite belong to any groups
list of Groups that contain this Sprite

The base class for visible game objects. Derived classes will want to override the Sprite.update() and assign a Sprite.image and Sprite.rect attributes. The initializer can accept any number of Group instances to be added to.

When subclassing the Sprite, be sure to call the base initializer before adding the Sprite to Groups. For example:

class Block(pygame.sprite.Sprite):

    # Constructor. Pass in the color of the block,
    # and its x and y position
    def __init__(self, color, width, height):
       # Call the parent class (Sprite) constructor
       pygame.sprite.Sprite.__init__(self)

       # Create an image of the block, and fill it with a color.
       # This could also be an image loaded from the disk.
       self.image = pygame.Surface([width, height])
       self.image.fill(color)

       # Fetch the rectangle object that has the dimensions of the image
       # Update the position of this object by setting the values of rect.x and rect.y
       self.rect = self.image.get_rect()
update()
method to control sprite behavior
update(*args, **kwargs) -> None

The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by Group.update() with whatever arguments you give it.

It is not necessary to use this method if not using the convenience method by the same name in the Group class.

add()
add the sprite to groups
add(*groups) -> None

Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of.

remove()
remove the sprite from groups
remove(*groups) -> None

Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of.

kill()
remove the Sprite from all Groups
kill() -> None

The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups.

alive()
does the sprite belong to any groups
alive() -> bool

Returns True when the Sprite belongs to one or more Groups.

groups()
list of Groups that contain this Sprite
groups() -> group_list

Return a list of all the Groups that contain this Sprite.

pygame.sprite.WeakSprite
A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.
WeakSprite(*groups) -> WeakSprite
pygame.sprite.DirtySprite
A subclass of Sprite with more attributes and features.
DirtySprite(*groups) -> DirtySprite

Extra DirtySprite attributes with their default values:

dirty = 1

if set to 1, it is repainted and then set to 0 again
if set to 2 then it is always dirty ( repainted each frame,
flag is not reset)
0 means that it is not dirty and therefore not repainted again

blendmode = 0

its the special_flags argument of blit, blendmodes

source_rect = None

source rect to use, remember that it is relative to
topleft (0,0) of self.image

visible = 1

normally 1, if set to 0 it will not be repainted
(you must set it dirty too to be erased from screen)

layer = 0

(READONLY value, it is read when adding it to the
LayeredDirty, for details see doc of LayeredDirty)
pygame.sprite.Group
A container class to hold and manage multiple Sprite objects.
Group(*sprites) -> Group
list of the Sprites this Group contains
duplicate the Group
add Sprites to this Group
remove Sprites from the Group
test if a Group contains Sprites
call the update method on contained Sprites
blit the Sprite images
draw a background over the Sprites
remove all Sprites

A simple container for Sprite objects. This class can be inherited to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations:

in      test if a Sprite is contained
len     the number of Sprites contained
bool    test if any Sprites are contained
iter    iterate through all the Sprites

The Sprites in the Group are ordered only on python 3.6 and higher. Below python 3.6 drawing and iterating over the Sprites is in no particular order.

sprites()
list of the Sprites this Group contains
sprites() -> sprite_list

Return a list of all the Sprites this group contains. You can also get an iterator from the group, but you cannot iterate over a Group while modifying it.

copy()
duplicate the Group
copy() -> Group

Creates a new Group with all the same Sprites as the original. If you have subclassed Group, the new object will have the same (sub-)class as the original. This only works if the derived class's constructor takes the same arguments as the Group class's.

add()
add Sprites to this Group
add(*sprites) -> None

Add any number of Sprites to this Group. This will only add Sprites that are not already members of the Group.

Each sprite argument can also be a iterator containing Sprites.

remove()
remove Sprites from the Group
remove(*sprites) -> None

Remove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group.

Each sprite argument can also be a iterator containing Sprites.

has()
test if a Group contains Sprites
has(*sprites) -> bool

Return True if the Group contains all of the given sprites. This is similar to using the "in" operator on the Group ("if sprite in group: ..."), which tests if a single Sprite belongs to a Group.

Each sprite argument can also be a iterator containing Sprites.

update()
call the update method on contained Sprites
update(*args, **kwargs) -> None

Calls the update() method on all Sprites in the Group. The base Sprite class has an update method that takes any number of arguments and does nothing. The arguments passed to Group.update() will be passed to each Sprite.

There is no way to get the return value from the Sprite.update() methods.

draw()
blit the Sprite images
draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]

Draws the contained Sprites to the Surface argument. This uses the Sprite.image attribute for the source surface, and Sprite.rect for the position. special_flags is passed to Surface.blit(). bgsurf is unused in this method but LayeredDirty.draw() uses it.

The Group does not keep sprites in any order, so the draw order is arbitrary.

clear()
draw a background over the Sprites
clear(Surface_dest, background) -> None

Erases the Sprites used in the last Group.draw() call. The destination Surface is cleared by filling the drawn Sprite positions with the background.

The background is usually a Surface image the same dimensions as the destination Surface. However, it can also be a callback function that takes two arguments; the destination Surface and an area to clear. The background callback function will be called several times each clear.

Here is an example callback that will clear the Sprites with solid red:

def clear_callback(surf, rect):
    color = 255, 0, 0
    surf.fill(color, rect)
empty()
remove all Sprites
empty() -> None

Removes all Sprites from this Group.

pygame.sprite.WeakDirtySprite
A subclass of WeakSprite and DirtySprite that combines the benefits of both classes.
WeakDirtySprite(*groups) -> WeakDirtySprite
pygame.sprite.RenderPlain
Same as pygame.sprite.Group

This class is an alias to pygame.sprite.Group(). It has no additional functionality.

pygame.sprite.RenderClear
Same as pygame.sprite.Group

This class is an alias to pygame.sprite.Group(). It has no additional functionality.

pygame.sprite.RenderUpdates
Group sub-class that tracks dirty updates.
RenderUpdates(*sprites) -> RenderUpdates
blit the Sprite images and track changed areas

This class is derived from pygame.sprite.Group(). It has an extended draw() method that tracks the changed areas of the screen.

draw()
blit the Sprite images and track changed areas
draw(surface, bgsurf=None, special_flags=0) -> Rect_list

Draws all the Sprites to the surface, the same as Group.draw(). This method also returns a list of Rectangular areas on the screen that have been changed. The returned changes include areas of the screen that have been affected by previous Group.clear() calls. special_flags is passed to Surface.blit().

The returned Rect list should be passed to pygame.display.update(). This will help performance on software driven display modes. This type of updating is usually only helpful on destinations with non-animating backgrounds.

pygame.sprite.OrderedUpdates()
RenderUpdates sub-class that draws Sprites in order of addition.
OrderedUpdates(*sprites) -> OrderedUpdates

This class derives from pygame.sprite.RenderUpdates(). It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups.

pygame.sprite.LayeredUpdates
LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.
LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates
add a sprite or sequence of sprites to a group
returns a ordered list of sprites (first back, last top).
draw all sprites in the right order onto the passed surface.
returns a list with all sprites at that position.
returns the sprite at the index idx from the groups sprites
removes all sprites from a layer and returns them as a list.
returns a list of layers defined (unique), sorted from bottom up.
changes the layer of the sprite
returns the layer that sprite is currently in.
returns the top layer
returns the bottom layer
brings the sprite to front layer
moves the sprite to the bottom layer
returns the topmost sprite
returns all sprites from a layer, ordered by how they where added
switches the sprites from layer1 to layer2

This group is fully compatible with pygame.sprite.SpriteSimple base class for visible game objects..

You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0.

If the sprite you add has an attribute _layer then that layer will be used. If the **kwarg contains 'layer' then the sprites passed will be added to that layer (overriding the sprite.layer attribute). If neither sprite has attribute layer nor **kwarg then the default layer is used to add the sprites.

New in pygame 1.8.

add()
add a sprite or sequence of sprites to a group
add(*sprites, **kwargs) -> None

If the sprite(s) have an attribute layer then that is used for the layer. If **kwargs contains 'layer' then the sprite(s) will be added to that argument (overriding the sprite layer attribute). If neither is passed then the sprite(s) will be added to the default layer.

sprites()
returns a ordered list of sprites (first back, last top).
sprites() -> sprites
draw()
draw all sprites in the right order onto the passed surface.
draw(surface, bgsurf=None, special_flags=0) -> Rect_list
get_sprites_at()
returns a list with all sprites at that position.
get_sprites_at(pos) -> colliding_sprites

Bottom sprites first, top last.

get_sprite()
returns the sprite at the index idx from the groups sprites
get_sprite(idx) -> sprite

Raises IndexOutOfBounds if the idx is not within range.

remove_sprites_of_layer()
removes all sprites from a layer and returns them as a list.
remove_sprites_of_layer(layer_nr) -> sprites
layers()
returns a list of layers defined (unique), sorted from bottom up.
layers() -> layers
change_layer()
changes the layer of the sprite
change_layer(sprite, new_layer) -> None

sprite must have been added to the renderer. It is not checked.

get_layer_of_sprite()
returns the layer that sprite is currently in.
get_layer_of_sprite(sprite) -> layer

If the sprite is not found then it will return the default layer.

get_top_layer()
returns the top layer
get_top_layer() -> layer
get_bottom_layer()
returns the bottom layer
get_bottom_layer() -> layer
move_to_front()
brings the sprite to front layer
move_to_front(sprite) -> None

Brings the sprite to front, changing sprite layer to topmost layer (added at the end of that layer).

move_to_back()
moves the sprite to the bottom layer
move_to_back(sprite) -> None

Moves the sprite to the bottom layer, moving it behind all other layers and adding one additional layer.

get_top_sprite()
returns the topmost sprite
get_top_sprite() -> Sprite
get_sprites_from_layer()
returns all sprites from a layer, ordered by how they where added
get_sprites_from_layer(layer) -> sprites

Returns all sprites from a layer, ordered by how they where added. It uses linear search and the sprites are not removed from layer.

switch_layer()
switches the sprites from layer1 to layer2
switch_layer(layer1_nr, layer2_nr) -> None

The layers number must exist, it is not checked.

pygame.sprite.LayeredDirty
LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.
LayeredDirty(*sprites, **kwargs) -> LayeredDirty
draw all sprites in the right order onto the passed surface.
used to set background
repaints the given area
clip the area where to draw. Just pass None (default) to reset the clip
clip the area where to draw. Just pass None (default) to reset the clip
changes the layer of the sprite
sets the threshold in milliseconds
sets the threshold in milliseconds

This group requires pygame.sprite.DirtySpriteA subclass of Sprite with more attributes and features. or any sprite that has the following attributes:

image, rect, dirty, visible, blendmode (see doc of DirtySprite).

It uses the dirty flag technique and is therefore faster than the pygame.sprite.RenderUpdatesGroup sub-class that tracks dirty updates. if you have many static sprites. It also switches automatically between dirty rect update and full screen drawing, so you do not have to worry what would be faster.

Same as for the pygame.sprite.GroupA container class to hold and manage multiple Sprite objects.. You can specify some additional attributes through kwargs:

_use_update: True/False   default is False
_default_layer: default layer where sprites without a layer are added.
_time_threshold: threshold time for switching between dirty rect mode
    and fullscreen mode, defaults to 1000./80  == 1000./fps

New in pygame 1.8.

draw()
draw all sprites in the right order onto the passed surface.
draw(surface, bgsurf=None, special_flags=None) -> Rect_list

You can pass the background too. If a background is already set, then the bgsurf argument has no effect. If present, the special_flags argument is always passed to Surface.blit(), overriding DirtySprite.blendmode. If special_flags is not present, DirtySprite.blendmode is passed to the Surface.blit() instead.

clear()
used to set background
clear(surface, bgd) -> None
repaint_rect()
repaints the given area
repaint_rect(screen_rect) -> None

screen_rect is in screen coordinates.

set_clip()
clip the area where to draw. Just pass None (default) to reset the clip
set_clip(screen_rect=None) -> None
get_clip()
clip the area where to draw. Just pass None (default) to reset the clip
get_clip() -> Rect
change_layer()
changes the layer of the sprite
change_layer(sprite, new_layer) -> None

sprite must have been added to the renderer. It is not checked.

set_timing_treshold()
sets the threshold in milliseconds
set_timing_treshold(time_ms) -> None

DEPRECATED: Use set_timing_threshold() instead.

Deprecated since pygame 2.1.1.

set_timing_threshold()
sets the threshold in milliseconds
set_timing_threshold(time_ms) -> None

Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second.

New in pygame 2.1.1.

Raises:

TypeError -- if time_ms is not int or float

pygame.sprite.GroupSingle()
Group container that holds a single sprite.
GroupSingle(sprite=None) -> GroupSingle

The GroupSingle container only holds a single Sprite. When a new Sprite is added, the old one is removed.

There is a special property, GroupSingle.sprite, that accesses the Sprite that this Group contains. It can be None when the Group is empty. The property can also be assigned to add a Sprite into the GroupSingle container.

pygame.sprite.spritecollide()
Find sprites in a group that intersect another sprite.
spritecollide(sprite, group, dokill, collided = None) -> Sprite_list

Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the Sprite.rect attribute of each Sprite.

The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group.

The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.

collided callables:

collide_rect, collide_rect_ratio, collide_circle,
collide_circle_ratio, collide_mask

Example:

# See if the Sprite block has collided with anything in the Group block_list
# The True flag will remove the sprite in block_list
blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True)

# Check the list of colliding sprites, and add one to the score for each one
for block in blocks_hit_list:
    score +=1
pygame.sprite.collide_rect()
Collision detection between two sprites, using rects.
collide_rect(left, right) -> bool

Tests for collision between two sprites. Uses the pygame rect colliderect function to calculate the collision. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" attributes.

New in pygame 1.8.

pygame.sprite.collide_rect_ratio()
Collision detection between two sprites, using rects scaled to a ratio.
collide_rect_ratio(ratio) -> collided_callable

A callable class that checks for collisions between two sprites, using a scaled version of the sprites rects.

Is created with a ratio, the instance is then intended to be passed as a collided callback function to the *collide functions.

A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.

New in pygame 1.8.1.

pygame.sprite.collide_circle()
Collision detection between two sprites, using circles.
collide_circle(left, right) -> bool

Tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute.

New in pygame 1.8.1.

pygame.sprite.collide_circle_ratio()
Collision detection between two sprites, using circles scaled to a ratio.
collide_circle_ratio(ratio) -> collided_callable

A callable class that checks for collisions between two sprites, using a scaled version of the sprites radius.

Is created with a floating point ratio, the instance is then intended to be passed as a collided callback function to the *collide functions.

A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size.

The created callable tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap, after scaling the circles radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute.

New in pygame 1.8.1.

pygame.sprite.collide_mask()
Collision detection between two sprites, using masks.
collide_mask(sprite1, sprite2) -> (int, int)
collide_mask(sprite1, sprite2) -> None

Tests for collision between two sprites, by testing if their bitmasks overlap (uses pygame.mask.Mask.overlap()Returns the point of intersection). If the sprites have a mask attribute, it is used as the mask, otherwise a mask is created from the sprite's image (uses pygame.mask.from_surface()Creates a Mask from the given surface). Sprites must have a rect attribute; the mask attribute is optional.

The first point of collision between the masks is returned. The collision point is offset from sprite1's mask's topleft corner (which is always (0, 0)). The collision point is a position within the mask and is not related to the actual screen position of sprite1.

This function is intended to be passed as a collided callback function to the group collide functions (see spritecollide(), groupcollide(), spritecollideany()).

Note

To increase performance, create and set a mask attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks.

Note

A new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated).

# Example of mask creation for a sprite.
sprite.mask = pygame.mask.from_surface(sprite.image)
Returns:

first point of collision between the masks or None if no collision

Return type:

tuple(int, int) or NoneType

New in pygame 1.8.0.

pygame.sprite.groupcollide()
Find all sprites that collide between two groups.
groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict

This will find collisions between all the Sprites in two groups. Collision is determined by comparing the Sprite.rect attribute of each Sprite or by using the collided function if it is not None.

Every Sprite inside group1 is added to the return dictionary. The value for each item is the list of Sprites in group2 that intersect.

If either dokill argument is True, the colliding Sprites will be removed from their respective Group.

The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.

pygame.sprite.spritecollideany()
Simple test if a sprite intersects anything in a group.
spritecollideany(sprite, group, collided = None) -> Sprite Collision with the returned sprite.
spritecollideany(sprite, group, collided = None) -> None No collision

If the sprite collides with any single sprite in the group, a single sprite from the group is returned. On no collision None is returned.

If you don't need all the features of the pygame.sprite.spritecollide() function, this function will be a bit quicker.

The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.4621398 pygame-2.6.1/docs/generated/ref/surface.html0000644000175100001770000025441714676242424020417 0ustar00runnerdocker pygame.Surface — pygame v2.6.1 documentation
pygame.Surface
pygame object for representing images
Surface((width, height), flags=0, depth=0, masks=None) -> Surface
Surface((width, height), flags=0, Surface) -> Surface
draw one image onto another
draw many images onto another
change the pixel format of an image
change the pixel format of an image including per pixel alphas
create a new copy of a Surface
fill Surface with a solid color
Shift the surface image in place
Set the transparent colorkey
Get the current transparent colorkey
set the alpha value for the full Surface image
get the current Surface transparency value
lock the Surface memory for pixel access
unlock the Surface memory from pixel access
test if the Surface requires locking
test if the Surface is current locked
Gets the locks for the Surface
get the color value at a single pixel
set the color value for a single pixel
get the mapped color value at a single pixel
get the color index palette for an 8-bit Surface
get the color for a single entry in a palette
set the color palette for an 8-bit Surface
set the color for a single index in an 8-bit Surface palette
convert a color into a mapped color value
convert a mapped integer color value into a Color
set the current clipping area of the Surface
get the current clipping area of the Surface
create a new surface that references its parent
find the parent of a subsurface
find the top level parent of a subsurface
find the position of a child subsurface inside a parent
find the absolute position of a child subsurface inside its top level parent
get the dimensions of the Surface
get the width of the Surface
get the height of the Surface
get the rectangular area of the Surface
get the bit depth of the Surface pixel format
get the bytes used per Surface pixel
get the additional flags used for the Surface
get the number of bytes used per Surface row
the bitmasks needed to convert between a color and a mapped integer
set the bitmasks needed to convert between a color and a mapped integer
the bit shifts needed to convert between a color and a mapped integer
sets the bit shifts needed to convert between a color and a mapped integer
the significant bits used to convert between a color and a mapped integer
find the smallest rect containing data
return a buffer view of the Surface's pixels.
acquires a buffer object for the pixels of the Surface.
pixel buffer address
returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.

A pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color.

Call pygame.Surface()pygame object for representing images to create a new image object. The Surface will be cleared to all black. The only required arguments are the sizes. With no additional arguments, the Surface will be created in a format that best matches the display Surface.

The pixel format can be controlled by passing the bit depth or an existing Surface. The flags argument is a bitmask of additional features for the surface. You can pass any combination of these flags:

HWSURFACE    (obsolete in pygame 2) creates the image in video memory
SRCALPHA     the pixel format will include a per-pixel alpha

Both flags are only a request, and may not be possible for all displays and formats.

Advance users can combine a set of bitmasks with a depth value. The masks are a set of 4 integers representing which bits in a pixel will represent each color. Normal Surfaces should not require the masks argument.

Surfaces can have many extra attributes like alpha planes, colorkeys, source rectangle clipping. These functions mainly effect how the Surface is blitted to other Surfaces. The blit routines will attempt to use hardware acceleration when possible, otherwise they will use highly optimized software blitting methods.

There are three types of transparency supported in pygame: colorkeys, surface alphas, and pixel alphas. Surface alphas can be mixed with colorkeys, but an image with per pixel alphas cannot use the other modes. Colorkey transparency makes a single color value transparent. Any pixels matching the colorkey will not be drawn. The surface alpha value is a single value that changes the transparency for the entire image. A surface alpha of 255 is opaque, and a value of 0 is completely transparent.

Per pixel alphas are different because they store a transparency value for every pixel. This allows for the most precise transparency effects, but it also the slowest. Per pixel alphas cannot be mixed with surface alpha and colorkeys.

There is support for pixel access for the Surfaces. Pixel access on hardware surfaces is slow and not recommended. Pixels can be accessed using the get_at() and set_at() functions. These methods are fine for simple access, but will be considerably slow when doing of pixel work with them. If you plan on doing a lot of pixel level work, it is recommended to use a pygame.PixelArraypygame object for direct pixel access of surfaces, which gives an array like view of the surface. For involved mathematical manipulations try the pygame.surfarraypygame module for accessing surface pixel data using array interfaces module (It's quite quick, but requires NumPy.)

Any functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can lock() and unlock() the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs. Remember to leave the Surface locked only while necessary.

Surface pixels are stored internally as a single number that has all the colors encoded into it. Use the map_rgb() and unmap_rgb() to convert between individual red, green, and blue values into a packed integer for that Surface.

Surfaces can also reference sections of other Surfaces. These are created with the subsurface() method. Any change to either Surface will effect the other.

Each Surface contains a clipping area. By default the clip area covers the entire Surface. If it is changed, all drawing operations will only effect the smaller area.

blit()
draw one image onto another
blit(source, dest, area=None, special_flags=0) -> Rect

Draws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit.

An optional area rectangle can be passed as well. This represents a smaller portion of the source Surface to draw.

New in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.

New in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.

New in pygame 1.9.2: Optional special_flags: BLEND_PREMULTIPLIED

New in pygame 2.0.0: Optional special_flags: BLEND_ALPHA_SDL2 - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not.

The return rectangle is the area of the affected pixels, excluding any pixels outside the destination Surface, or outside the clipping area.

Pixel alphas will be ignored when blitting to an 8 bit Surface.

For a surface with colorkey or blanket alpha, a blit to self may give slightly different colors than a non self-blit.

blits()
draw many images onto another
blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None
blits(((source, dest, area), ...)) -> [Rect, ...]
blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]

Draws many surfaces onto this Surface. It takes a sequence as input, with each of the elements corresponding to the ones of blit(). It needs at minimum a sequence of (source, dest).

Parameters:
  • blit_sequence -- a sequence of surfaces and arguments to blit them, they correspond to the blit() arguments

  • doreturn -- if True, return a list of rects of the areas changed, otherwise return None

Returns:

a list of rects of the areas changed if doreturn is True, otherwise None

Return type:

list or None

New in pygame 1.9.4.

convert()
change the pixel format of an image
convert(Surface=None) -> Surface
convert(depth, flags=0) -> Surface
convert(masks, flags=0) -> Surface

Creates a new copy of the Surface with the pixel format changed. The new pixel format can be determined from another existing Surface. Otherwise depth, flags, and masks arguments can be used, similar to the pygame.Surface()pygame object for representing images call.

If no arguments are passed the new Surface will have the same pixel format as the display Surface. This is always the fastest format for blitting. It is a good idea to convert all Surfaces before they are blitted many times.

The converted Surface will have no pixel alphas. They will be stripped if the original had them. See convert_alpha() for preserving or creating per-pixel alphas.

The new copy will have the same class as the copied surface. This lets as Surface subclass inherit this method without the need to override, unless subclass specific instance attributes also need copying.

convert_alpha()
change the pixel format of an image including per pixel alphas
convert_alpha(Surface) -> Surface
convert_alpha() -> Surface

Creates a new copy of the surface with the desired pixel format. The new surface will be in a format suited for quick blitting to the given format with per pixel alpha. If no surface is given, the new surface will be optimized for blitting to the current display.

Unlike the convert() method, the pixel format for the new image will not be exactly the same as the requested source, but it will be optimized for fast alpha blitting to the destination.

As with convert() the returned surface has the same class as the converted surface.

copy()
create a new copy of a Surface
copy() -> Surface

Makes a duplicate copy of a Surface. The new surface will have the same pixel formats, color palettes, transparency settings, and class as the original. If a Surface subclass also needs to copy any instance specific attributes then it should override copy().

fill()
fill Surface with a solid color
fill(color, rect=None, special_flags=0) -> Rect

Fill the Surface with a solid color. If no rect argument is given the entire Surface will be filled. The rect argument will limit the fill to a specific area. The fill will also be contained by the Surface clip area.

The color argument can be either a RGB sequence, a RGBA sequence or a mapped color index. If using RGBA, the Alpha (A part of RGBA) is ignored unless the surface uses per pixel alpha (Surface has the SRCALPHA flag).

New in pygame 1.8: Optional special_flags: BLEND_ADD, BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX.

New in pygame 1.8.1: Optional special_flags: BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, BLEND_RGB_MIN, BLEND_RGB_MAX.

This will return the affected Surface area.

scroll()
Shift the surface image in place
scroll(dx=0, dy=0) -> None

Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is safe to have dx and dy values that exceed the surface size.

New in pygame 1.9.

set_colorkey()
Set the transparent colorkey
set_colorkey(Color, flags=0) -> None
set_colorkey(None) -> None

Set the current color key for the Surface. When blitting this Surface onto a destination, any pixels that have the same color as the colorkey will be transparent. The color can be an RGB color or a mapped color integer. If None is passed, the colorkey will be unset.

The colorkey will be ignored if the Surface is formatted to use per pixel alpha values. The colorkey can be mixed with the full Surface alpha value.

The optional flags argument can be set to pygame.RLEACCEL to provide better performance on non accelerated displays. An RLEACCEL Surface will be slower to modify, but quicker to blit as a source.

get_colorkey()
Get the current transparent colorkey
get_colorkey() -> RGB or None

Return the current colorkey value for the Surface. If the colorkey is not set then None is returned.

set_alpha()
set the alpha value for the full Surface image
set_alpha(value, flags=0) -> None
set_alpha(None) -> None

Set the current alpha value for the Surface. When blitting this Surface onto a destination, the pixels will be drawn slightly transparent. The alpha value is an integer from 0 to 255, 0 is fully transparent and 255 is fully opaque. If None is passed for the alpha value, then alpha blending will be disabled, including per-pixel alpha.

This value is different than the per pixel Surface alpha. For a surface with per pixel alpha, blanket alpha is ignored and None is returned.

Changed in pygame 2.0: per-surface alpha can be combined with per-pixel alpha.

The optional flags argument can be set to pygame.RLEACCEL to provide better performance on non accelerated displays. An RLEACCEL Surface will be slower to modify, but quicker to blit as a source.

get_alpha()
get the current Surface transparency value
get_alpha() -> int_value

Return the current alpha value for the Surface.

lock()
lock the Surface memory for pixel access
lock() -> None

Lock the pixel data of a Surface for access. On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked.

Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame.

Not all Surfaces require locking. The mustlock() method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it.

All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.

It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.

unlock()
unlock the Surface memory from pixel access
unlock() -> None

Unlock the Surface pixel data after it has been locked. The unlocked Surface can once again be drawn and managed by pygame. See the lock() documentation for more details.

All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.

It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released.

mustlock()
test if the Surface requires locking
mustlock() -> bool

Returns True if the Surface is required to be locked to access pixel data. Usually pure software Surfaces do not require locking. This method is rarely needed, since it is safe and quickest to just lock all Surfaces as needed.

All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair.

get_locked()
test if the Surface is current locked
get_locked() -> bool

Returns True when the Surface is locked. It doesn't matter how many times the Surface is locked.

get_locks()
Gets the locks for the Surface
get_locks() -> tuple

Returns the currently existing locks for the Surface.

get_at()
get the color value at a single pixel
get_at((x, y)) -> Color

Return a copy of the RGBA Color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an IndexError exception will be raised.

Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using pygame.surfarraypygame module for accessing surface pixel data using array interfaces/pygame.PixelArraypygame object for direct pixel access of surfaces.

This function will temporarily lock and unlock the Surface as needed.

New in pygame 1.9: Returning a Color instead of tuple. Use tuple(surf.get_at((x,y))) if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict.

set_at()
set the color value for a single pixel
set_at((x, y), Color) -> None

Set the RGBA or mapped integer color value for a single pixel. If the Surface does not have per pixel alphas, the alpha value is ignored. Setting pixels outside the Surface area or outside the Surface clipping will have no effect.

Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation.

This function will temporarily lock and unlock the Surface as needed.

Note

If the surface is palettized, the pixel color will be set to the most similar color in the palette.

get_at_mapped()
get the mapped color value at a single pixel
get_at_mapped((x, y)) -> Color

Return the integer value of the given pixel. If the pixel position is outside the area of the Surface an IndexError exception will be raised.

This method is intended for pygame unit testing. It unlikely has any use in an application.

This function will temporarily lock and unlock the Surface as needed.

New in pygame 1.9.2.

get_palette()
get the color index palette for an 8-bit Surface
get_palette() -> [RGB, RGB, RGB, ...]

Return a list of up to 256 color elements that represent the indexed colors used in an 8-bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface.

Returning a list of Color(with length 3) instances instead of tuples.

New in pygame 1.9.

get_palette_at()
get the color for a single entry in a palette
get_palette_at(index) -> RGB

Returns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255.

New in pygame 1.9: Returning Color(with length 3) instance instead of a tuple.

set_palette()
set the color palette for an 8-bit Surface
set_palette([RGB, RGB, RGB, ...]) -> None

Set the full palette for an 8-bit Surface. This will replace the colors in the existing palette. A partial palette can be passed and only the first colors in the original palette will be changed.

This function has no effect on a Surface with more than 8-bits per pixel.

set_palette_at()
set the color for a single index in an 8-bit Surface palette
set_palette_at(index, RGB) -> None

Set the palette value for a single entry in a Surface palette. The index should be a value from 0 to 255.

This function has no effect on a Surface with more than 8-bits per pixel.

map_rgb()
convert a color into a mapped color value
map_rgb(Color) -> mapped_int

Convert an RGBA color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.

See the Surface object documentation for more information about colors and pixel formats.

unmap_rgb()
convert a mapped integer color value into a Color
unmap_rgb(mapped_int) -> Color

Convert an mapped integer color into the RGB color components for this Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color.

See the Surface object documentation for more information about colors and pixel formats.

set_clip()
set the current clipping area of the Surface
set_clip(rect) -> None
set_clip(None) -> None

Each Surface has an active clipping area. This is a rectangle that represents the only pixels on the Surface that can be modified. If None is passed for the rectangle the full Surface will be available for changes.

The clipping area is always restricted to the area of the Surface itself. If the clip rectangle is too large it will be shrunk to fit inside the Surface.

get_clip()
get the current clipping area of the Surface
get_clip() -> Rect

Return a rectangle of the current clipping area. The Surface will always return a valid rectangle that will never be outside the bounds of the image. If the Surface has had None set for the clipping area, the Surface will return a rectangle with the full area of the Surface.

subsurface()
create a new surface that references its parent
subsurface(Rect) -> Surface

Returns a new Surface that shares its pixels with its new parent. The new Surface is considered a child of the original. Modifications to either Surface pixels will effect each other. Surface information like clipping area and color keys are unique to each Surface.

The new Surface will inherit the palette, color key, and alpha settings from its parent.

It is possible to have any number of subsurfaces and subsubsurfaces on the parent. It is also possible to subsurface the display Surface if the display mode is not hardware accelerated.

See get_offset() and get_parent() to learn more about the state of a subsurface.

A subsurface will have the same class as the parent surface.

get_parent()
find the parent of a subsurface
get_parent() -> Surface

Returns the parent Surface of a subsurface. If this is not a subsurface then None will be returned.

get_abs_parent()
find the top level parent of a subsurface
get_abs_parent() -> Surface

Returns the parent Surface of a subsurface. If this is not a subsurface then this surface will be returned.

get_offset()
find the position of a child subsurface inside a parent
get_offset() -> (x, y)

Get the offset position of a child subsurface inside of a parent. If the Surface is not a subsurface this will return (0, 0).

get_abs_offset()
find the absolute position of a child subsurface inside its top level parent
get_abs_offset() -> (x, y)

Get the offset position of a child subsurface inside of its top level parent Surface. If the Surface is not a subsurface this will return (0, 0).

get_size()
get the dimensions of the Surface
get_size() -> (width, height)

Return the width and height of the Surface in pixels.

get_width()
get the width of the Surface
get_width() -> width

Return the width of the Surface in pixels.

get_height()
get the height of the Surface
get_height() -> height

Return the height of the Surface in pixels.

get_rect()
get the rectangular area of the Surface
get_rect(**kwargs) -> Rect

Returns a new rectangle covering the entire surface. This rectangle will always start at (0, 0) with a width and height the same size as the image.

You can pass keyword argument values to this function. These named values will be applied to the attributes of the Rect before it is returned. An example would be mysurf.get_rect(center=(100, 100)) to create a rectangle for the Surface centered at a given position.

get_bitsize()
get the bit depth of the Surface pixel format
get_bitsize() -> int

Returns the number of bits used to represent each pixel. This value may not exactly fill the number of bytes used per pixel. For example a 15 bit Surface still requires a full 2 bytes.

get_bytesize()
get the bytes used per Surface pixel
get_bytesize() -> int

Return the number of bytes used per pixel.

get_flags()
get the additional flags used for the Surface
get_flags() -> int

Returns a set of current Surface features. Each feature is a bit in the flags bitmask. Typical flags are RLEACCEL, SRCALPHA, and SRCCOLORKEY.

Here is a more complete list of flags. A full list can be found in SDL_video.h

SWSURFACE      0x00000000    # Surface is in system memory
HWSURFACE      0x00000001    # (obsolete in pygame 2) Surface is in video memory
ASYNCBLIT      0x00000004    # (obsolete in pygame 2) Use asynchronous blits if possible

See pygame.display.set_mode()Initialize a window or screen for display for flags exclusive to the display surface.

Used internally (read-only)

HWACCEL        0x00000100    # Blit uses hardware acceleration
SRCCOLORKEY    0x00001000    # Blit uses a source color key
RLEACCELOK     0x00002000    # Private flag
RLEACCEL       0x00004000    # Surface is RLE encoded
SRCALPHA       0x00010000    # Blit uses source alpha blending
PREALLOC       0x01000000    # Surface uses preallocated memory
get_pitch()
get the number of bytes used per Surface row
get_pitch() -> int

Return the number of bytes separating each row in the Surface. Surfaces in video memory are not always linearly packed. Subsurfaces will also have a larger pitch than their real width.

This value is not needed for normal pygame usage.

get_masks()
the bitmasks needed to convert between a color and a mapped integer
get_masks() -> (R, G, B, A)

Returns the bitmasks used to isolate each color in a mapped integer.

This value is not needed for normal pygame usage.

set_masks()
set the bitmasks needed to convert between a color and a mapped integer
set_masks((r,g,b,a)) -> None

This is not needed for normal pygame usage.

Note

Starting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called.

Deprecated since pygame 2.0.0.

New in pygame 1.8.1.

get_shifts()
the bit shifts needed to convert between a color and a mapped integer
get_shifts() -> (R, G, B, A)

Returns the pixel shifts need to convert between each color and a mapped integer.

This value is not needed for normal pygame usage.

set_shifts()
sets the bit shifts needed to convert between a color and a mapped integer
set_shifts((r,g,b,a)) -> None

This is not needed for normal pygame usage.

Note

Starting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called.

Deprecated since pygame 2.0.0.

New in pygame 1.8.1.

get_losses()
the significant bits used to convert between a color and a mapped integer
get_losses() -> (R, G, B, A)

Return the least significant number of bits stripped from each color in a mapped integer.

This value is not needed for normal pygame usage.

get_bounding_rect()
find the smallest rect containing data
get_bounding_rect(min_alpha = 1) -> Rect

Returns the smallest rectangular region that contains all the pixels in the surface that have an alpha value greater than or equal to the minimum alpha value.

This function will temporarily lock and unlock the Surface as needed.

New in pygame 1.8.

get_view()
return a buffer view of the Surface's pixels.
get_view(<kind>='2') -> BufferProxy

Return an object which exports a surface's internal pixel buffer as a C level array struct, Python level array interface or a C level buffer interface. The new buffer protocol is supported.

The kind argument is the length 1 string '0', '1', '2', '3', 'r', 'g', 'b', or 'a'. The letters are case insensitive; 'A' will work as well. The argument can be either a Unicode or byte (char) string. The default is '2'.

'0' returns a contiguous unstructured bytes view. No surface shape information is given. A ValueError is raised if the surface's pixels are discontinuous.

'1' returns a (surface-width * surface-height) array of continuous pixels. A ValueError is raised if the surface pixels are discontinuous.

'2' returns a (surface-width, surface-height) array of raw pixels. The pixels are surface-bytesize-d unsigned integers. The pixel format is surface specific. The 3 byte unsigned integers of 24 bit surfaces are unlikely accepted by anything other than other pygame functions.

'3' returns a (surface-width, surface-height, 3) array of RGB color components. Each of the red, green, and blue components are unsigned bytes. Only 24-bit and 32-bit surfaces are supported. The color components must be in either RGB or BGR order within the pixel.

'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a (surface-width, surface-height) view of a single color component within a surface: a color plane. Color components are unsigned bytes. Both 24-bit and 32-bit surfaces support 'r', 'g', and 'b'. Only 32-bit surfaces with SRCALPHA support 'a'.

The surface is locked only when an exposed interface is accessed. For new buffer interface accesses, the surface is unlocked once the last buffer view is released. For array interface and old buffer interface accesses, the surface remains locked until the BufferProxy object is released.

New in pygame 1.9.2.

get_buffer()
acquires a buffer object for the pixels of the Surface.
get_buffer() -> BufferProxy

Return a buffer object for the pixels of the Surface. The buffer can be used for direct pixel access and manipulation. Surface pixel data is represented as an unstructured block of memory, with a start address and length in bytes. The data need not be contiguous. Any gaps are included in the length, but otherwise ignored.

This method implicitly locks the Surface. The lock will be released when the returned pygame.BufferProxypygame object to export a surface buffer through an array protocol object is garbage collected.

New in pygame 1.8.

_pixels_address
pixel buffer address
_pixels_address -> int

The starting address of the surface's raw pixel bytes.

New in pygame 1.9.2.

premul_alpha()
returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.
premul_alpha() -> Surface

Experimental: feature still in development available for testing and feedback. It may change. Please leave premul_alpha feedback with authors

Returns a copy of the initial surface with the red, green and blue color channels multiplied by the alpha channel. This is intended to make it easier to work with the BLEND_PREMULTIPLED blend mode flag of the blit() method. Surfaces which have called this method will only look correct after blitting if the BLEND_PREMULTIPLED special flag is used.

It is worth noting that after calling this method, methods that return the colour of a pixel such as get_at() will return the alpha multiplied colour values. It is not possible to fully reverse an alpha multiplication of the colours in a surface as integer colour channel data is generally reduced by the operation (e.g. 255 x 0 = 0, from there it is not possible to reconstruct the original 255 from just the two remaining zeros in the colour and alpha channels).

If you call this method, and then call it again, it will multiply the colour channels by the alpha channel twice. There are many possible ways to obtain a surface with the colour channels pre-multiplied by the alpha channel in pygame, and it is not possible to tell the difference just from the information in the pixels. It is completely possible to have two identical surfaces - one intended for pre-multiplied alpha blending and one intended for normal blending. For this reason we do not store state on surfaces intended for pre-multiplied alpha blending.

Surfaces without an alpha channel cannot use this method and will return an error if you use it on them. It is best used on 32 bit surfaces (the default on most platforms) as the blitting on these surfaces can be accelerated by SIMD versions of the pre-multiplied blitter.

In general pre-multiplied alpha blitting is faster then 'straight alpha' blitting and produces superior results when blitting an alpha surface onto another surface with alpha - assuming both surfaces contain pre-multiplied alpha colours.

New in pygame 2.2.0.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.7521396 pygame-2.6.1/docs/generated/ref/surfarray.html0000644000175100001770000011123114676242425020770 0ustar00runnerdocker pygame.surfarray — pygame v2.6.1 documentation
pygame.surfarray
pygame module for accessing surface pixel data using array interfaces
Copy pixels into a 2d array
Reference pixels into a 2d array
Copy pixels into a 3d array
Reference pixels into a 3d array
Copy pixel alphas into a 2d array
Reference pixel alphas into a 2d array
Copy red pixels into a 2d array
Reference pixel red into a 2d array.
Copy green pixels into a 2d array
Reference pixel green into a 2d array.
Copy blue pixels into a 2d array
Reference pixel blue into a 2d array.
Copy the colorkey values into a 2d array
Copy an array to a new surface
Blit directly from a array values
Map a 3d array into a 2d array
Sets the array system to be used for surface arrays
Gets the currently active array type.
Gets the array system types currently supported.

Functions to convert between NumPy arrays and Surface objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, surfarray becomes a MissingModule object.

Every pixel is stored as a single integer value to represent the red, green, and blue colors. The 8-bit images use a value that looks into a colormap. Pixels with higher depth use a bit packing process to place three or four values into a single number.

The arrays are indexed by the X axis first, followed by the Y axis. Arrays that treat the pixels as a single integer are referred to as 2D arrays. This module can also separate the red, green, and blue color values into separate indices. These types of arrays are referred to as 3D arrays, and the last index is 0 for red, 1 for green, and 2 for blue.

The pixels of a 2D array as returned by array2d() and pixels2d() are mapped to the specific surface. Use pygame.Surface.unmap_rgb()convert a mapped integer color value into a Color to convert to a color, and pygame.Surface.map_rgb()convert a color into a mapped color value to get the surface specific pixel value of a color. Integer pixel values can only be used directly between surfaces with matching pixel layouts (see pygame.Surfacepygame object for representing images).

All functions that refer to "array" will copy the surface information to a new numpy array. All functions that refer to "pixels" will directly reference the pixels from the surface and any changes performed to the array will make changes in the surface. As this last functions share memory with the surface, this one will be locked during the lifetime of the array.

pygame.surfarray.array2d()
Copy pixels into a 2d array
array2d(Surface) -> array

Copy the mapped (raw) pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

pygame.surfarray.pixels2d()
Reference pixels into a 2d array
pixels2d(Surface) -> array

Create a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

Pixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array3d()
Copy pixels into a 3d array
array3d(Surface) -> array

Copy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

pygame.surfarray.pixels3d()
Reference pixels into a 3d array
pixels3d(Surface) -> array

Create a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

This will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array_alpha()
Copy pixel alphas into a 2d array
array_alpha(Surface) -> array

Copy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

pygame.surfarray.pixels_alpha()
Reference pixel alphas into a 2d array
pixels_alpha(Surface) -> array

Create a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

This can only work on 32-bit Surfaces with a per-pixel alpha value.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array_red()
Copy red pixels into a 2d array
array_red(Surface) -> array

Copy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

New in pygame 2.0.2.

pygame.surfarray.pixels_red()
Reference pixel red into a 2d array.
pixels_red (Surface) -> array

Create a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

This can only work on 24-bit or 32-bit Surfaces.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array_green()
Copy green pixels into a 2d array
array_green(Surface) -> array

Copy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

New in pygame 2.0.2.

pygame.surfarray.pixels_green()
Reference pixel green into a 2d array.
pixels_green (Surface) -> array

Create a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

This can only work on 24-bit or 32-bit Surfaces.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array_blue()
Copy blue pixels into a 2d array
array_blue(Surface) -> array

Copy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format.

This function will temporarily lock the Surface as pixels are copied (see the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method).

New in pygame 2.0.2.

pygame.surfarray.pixels_blue()
Reference pixel blue into a 2d array.
pixels_blue (Surface) -> array

Create a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied.

This can only work on 24-bit or 32-bit Surfaces.

The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the pygame.Surface.lock()lock the Surface memory for pixel access - lock the Surface memory for pixel access method.

pygame.surfarray.array_colorkey()
Copy the colorkey values into a 2d array
array_colorkey(Surface) -> array

Create a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque.

This will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned.

This function will temporarily lock the Surface as pixels are copied.

pygame.surfarray.make_surface()
Copy an array to a new surface
make_surface(array) -> Surface

Create a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. Function make_surface uses the array struct interface to acquire array properties, so is not limited to just NumPy arrays. See pygame.pixelcopypygame module for general pixel array copying.

New in pygame 1.9.2: array struct interface support.

pygame.surfarray.blit_array()
Blit directly from a array values
blit_array(Surface, array) -> None

Directly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ASCII character and record arrays are accepted.

This function will temporarily lock the Surface as the new values are copied.

pygame.surfarray.map_array()
Map a 3d array into a 2d array
map_array(Surface, array3d) -> array2d

Convert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Palette surface formats are supported for NumPy arrays.

pygame.surfarray.use_arraytype()
Sets the array system to be used for surface arrays
use_arraytype (arraytype) -> None

DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is 'numpy'. Other values will raise ValueError. Using this function will raise a DeprecationWarning.

pygame.surfarray.get_arraytype()
Gets the currently active array type.
get_arraytype () -> str

DEPRECATED: Returns the currently active array type. This will be a value of the get_arraytypes() tuple and indicates which type of array module is used for the array creation. Using this function will raise a DeprecationWarning.

New in pygame 1.8.

pygame.surfarray.get_arraytypes()
Gets the array system types currently supported.
get_arraytypes () -> tuple

DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the pygame.surfarray.use_arraytype()Sets the array system to be used for surface arrays () method. If no supported array system could be found, None will be returned. Using this function will raise a DeprecationWarning.

New in pygame 1.8.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.7781394 pygame-2.6.1/docs/generated/ref/tests.html0000644000175100001770000004343314676242425020124 0ustar00runnerdocker pygame.tests — pygame v2.6.1 documentation
pygame.tests
Pygame unit test suite package
Run the pygame unit test suite

A quick way to run the test suite package from the command line is to import the go submodule with the Python -m option:

python -m pygame.tests [<test options>]

Command line option --help displays a usage message. Available options correspond to the pygame.tests.run()Run the pygame unit test suite arguments.

The xxxx_test submodules of the tests package are unit test suites for individual parts of pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive.

For pygame development the test suite can be run from a pygame distribution root directory. Program run_tests.py is provided for convenience, though test/go.py can be run directly.

Module level tags control which modules are included in a unit test run. Tags are assigned to a unit test module with a corresponding <name>_tags.py module. The tags module has the global __tags__, a list of tag names. For example, cdrom_test.py has a tag file cdrom_tags.py containing a tags list that has the 'interactive' string. The 'interactive' tag indicates cdrom_test.py expects user input. It is excluded from a run_tests.py or pygame.tests.go run.

Two other tags that are excluded are 'ignore' and 'subprocess_ignore'. These two tags indicate unit tests that will not run on a particular platform, or for which no corresponding pygame module is available.

The test runner will list each excluded module along with the tag responsible.

pygame.tests.run()
Run the pygame unit test suite
run(*args, **kwds) -> tuple

Positional arguments (optional):

The names of tests to include. If omitted then all tests are run. Test names
need not include the trailing '_test'.

Keyword arguments:

incomplete - fail incomplete tests (default False)
nosubprocess - run all test suites in the current process
               (default False, use separate subprocesses)
dump - dump failures/errors as dict ready to eval (default False)
file - if provided, the name of a file into which to dump failures/errors
timings - if provided, the number of times to run each individual test to
          get an average run time (default is run each test once)
exclude - A list of TAG names to exclude from the run
show_output - show silenced stderr/stdout on errors (default False)
all - dump all results, not just errors (default False)
randomize - randomize order of tests (default False)
seed - if provided, a seed randomizer integer
multi_thread - if provided, the number of THREADS in which to run
               subprocessed tests
time_out - if subprocess is True then the time limit in seconds before
           killing a test (default 30)
fake - if provided, the name of the fake tests package in the
       run_tests__tests subpackage to run instead of the normal
       pygame tests
python - the path to a python executable to run subprocessed tests
         (default sys.executable)

Return value:

A tuple of total number of tests run, dictionary of error information.
The dictionary is empty if no errors were recorded.

By default individual test modules are run in separate subprocesses. This recreates normal pygame usage where pygame.init() and pygame.quit() are called only once per program execution, and avoids unfortunate interactions between test modules.

A time limit is placed on test execution ensuring that any frozen tests processes are killed when their time allotment is expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode.

Tests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used for the randomization seed value.

Individual test modules may have a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only 'interactive' modules such as cdrom_test are ignored. An interactive module must be run from the console as a Python program.

This function can only be called once per Python session. It is not reentrant.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8041394 pygame-2.6.1/docs/generated/ref/time.html0000644000175100001770000004570414676242425017723 0ustar00runnerdocker pygame.time — pygame v2.6.1 documentation
pygame.time
pygame module for monitoring time
get the time in milliseconds
pause the program for an amount of time
pause the program for an amount of time
repeatedly create an event on the event queue
create an object to help track time

Times in pygame are represented in milliseconds (1/1000 seconds). Most platforms have a limited time resolution of around 10 milliseconds. This resolution, in milliseconds, is given in the TIMER_RESOLUTION constant.

pygame.time.get_ticks()
get the time in milliseconds
get_ticks() -> milliseconds

Return the number of milliseconds since pygame.init() was called. Before pygame is initialized this will always be 0.

pygame.time.wait()
pause the program for an amount of time
wait(milliseconds) -> time

Will pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the pygame.time.delay() function.

This returns the actual number of milliseconds used.

pygame.time.delay()
pause the program for an amount of time
delay(milliseconds) -> time

Will pause for a given number of milliseconds. This function will use the processor (rather than sleeping) in order to make the delay more accurate than pygame.time.wait().

This returns the actual number of milliseconds used.

pygame.time.set_timer()
repeatedly create an event on the event queue
set_timer(event, millis) -> None
set_timer(event, millis, loops=0) -> None

Set an event to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed.

The event attribute can be a pygame.event.Event object or an integer type that denotes an event.

loops is an integer that denotes the number of events posted. If 0 (default) then the events will keep getting posted, unless explicitly stopped.

To disable the timer for such an event, call the function again with the same event argument with millis argument set to 0.

It is also worth mentioning that a particular event type can only be put on a timer once. In other words, there cannot be two timers for the same event type. Setting an event timer for a particular event discards the old one for that event type.

loops replaces the once argument, and this does not break backward compatibility

New in pygame 2.0.0.dev3: once argument added.

Changed in pygame 2.0.1: event argument supports pygame.event.Event object

New in pygame 2.0.1: added loops argument to replace once argument

pygame.time.Clock
create an object to help track time
Clock() -> Clock
update the clock
update the clock
time used in the previous tick
actual time used in the previous tick
compute the clock framerate

Creates a new Clock object that can be used to track an amount of time. The clock also provides several functions to help control a game's framerate.

tick()
update the clock
tick(framerate=0) -> milliseconds

This method should be called once per frame. It will compute how many milliseconds have passed since the previous call.

If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling Clock.tick(40) once per frame, the program will never run at more than 40 frames per second.

Note that this function uses SDL_Delay function which is not accurate on every platform, but does not use much CPU. Use tick_busy_loop if you want an accurate timer, and don't mind chewing CPU.

tick_busy_loop()
update the clock
tick_busy_loop(framerate=0) -> milliseconds

This method should be called once per frame. It will compute how many milliseconds have passed since the previous call.

If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling Clock.tick_busy_loop(40) once per frame, the program will never run at more than 40 frames per second.

Note that this function uses pygame.time.delay()pause the program for an amount of time, which uses lots of CPU in a busy loop to make sure that timing is more accurate.

New in pygame 1.8.

get_time()
time used in the previous tick
get_time() -> milliseconds

The number of milliseconds that passed between the previous two calls to Clock.tick().

get_rawtime()
actual time used in the previous tick
get_rawtime() -> milliseconds

Similar to Clock.get_time(), but does not include any time used while Clock.tick() was delaying to limit the framerate.

get_fps()
compute the clock framerate
get_fps() -> float

Compute your game's framerate (in frames per second). It is computed by averaging the last ten calls to Clock.tick().




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8201394 pygame-2.6.1/docs/generated/ref/touch.html0000644000175100001770000003057414676242425020106 0ustar00runnerdocker pygame._sdl2.touch — pygame v2.6.1 documentation
pygame._sdl2.touch
pygame module to work with touch input
get the number of touch devices
get the a touch device id for a given index
the number of active fingers for a given touch device
get information about an active finger

New in pygame 2: This module requires SDL2.

pygame._sdl2.touch.get_num_devices()
get the number of touch devices
get_num_devices() -> int

Return the number of available touch devices.

pygame._sdl2.touch.get_device()
get the a touch device id for a given index
get_device(index) -> touchid
Parameters:

index (int) -- This number is at least 0 and less than the number of devices.

Return an integer id associated with the given index.

pygame._sdl2.touch.get_num_fingers()
the number of active fingers for a given touch device
get_num_fingers(touchid) -> int

Return the number of fingers active for the touch device whose id is touchid.

pygame._sdl2.touch.get_finger()
get information about an active finger
get_finger(touchid, index) -> int
Parameters:
  • touchid (int) -- The touch device id.

  • index (int) -- The index of the finger to return information about, between 0 and the number of active fingers.

Return a dict for the finger index active on touchid. The dict contains these keys:

id         the id of the finger (an integer).
x          the normalized x position of the finger, between 0 and 1.
y          the normalized y position of the finger, between 0 and 1.
pressure   the amount of pressure applied by the finger, between 0 and 1.



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8731391 pygame-2.6.1/docs/generated/ref/transform.html0000644000175100001770000012240214676242425020767 0ustar00runnerdocker pygame.transform — pygame v2.6.1 documentation
pygame.transform
pygame module to transform surfaces
flip vertically and horizontally
resize to new resolution
resize to new resolution, using scalar(s)
rotate an image
filtered scale and rotation
specialized image doubler
scale a surface to an arbitrary size smoothly
resize to new resolution, using scalar(s)
return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'
set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'
gets a copy of an image with an interior area removed
find edges in a surface
find the average surface from many surfaces.
finds the average color of a surface
grayscale a surface
finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.

A Surface transform is an operation that moves or resizes the pixels. All these functions take a Surface to operate on and return a new Surface with the results.

Some of the transforms are considered destructive. These means every time they are performed they lose pixel data. Common examples of this are resizing and rotating. For this reason, it is better to re-transform the original surface than to keep transforming an image multiple times. (For example, suppose you are animating a bouncing spring which expands and contracts. If you applied the size changes incrementally to the previous images, you would lose detail. Instead, always begin with the original image and scale to the desired size.)

Changed in pygame 2.0.2: transform functions now support keyword arguments.

pygame.transform.flip()
flip vertically and horizontally
flip(surface, flip_x, flip_y) -> Surface

This can flip a Surface either vertically, horizontally, or both. The arguments flip_x and flip_y are booleans that control whether to flip each axis. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions.

pygame.transform.scale()
resize to new resolution
scale(surface, size, dest_surface=None) -> Surface

Resizes the Surface to a new size, given as (width, height). This is a fast scale operation that does not sample the results.

An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the size (width, height) passed in. Also the destination surface must be the same format.

pygame.transform.scale_by()
resize to new resolution, using scalar(s)
scale_by(surface, factor, dest_surface=None) -> Surface

Experimental: feature still in development available for testing and feedback. It may change. Please leave scale_by feedback with authors

Same as scale(), but scales by some factor, rather than taking the new size explicitly. For example, transform.scale_by(surf, 3) will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, transform.scale_by(surf, (2, 1)) doubles the image width but keeps the height the same.

New in pygame 2.1.3.

pygame.transform.rotate()
rotate an image
rotate(surface, angle) -> Surface

Unfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise.

Unless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value.

pygame.transform.rotozoom()
filtered scale and rotation
rotozoom(surface, angle, scale) -> Surface

This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise.

pygame.transform.scale2x()
specialized image doubler
scale2x(surface, dest_surface=None) -> Surface

This will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics.

This really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale.

An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format.

pygame.transform.smoothscale()
scale a surface to an arbitrary size smoothly
smoothscale(surface, size, dest_surface=None) -> Surface

Uses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized MMX routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24.

New in pygame 1.8.

pygame.transform.smoothscale_by()
resize to new resolution, using scalar(s)
smoothscale_by(surface, factor, dest_surface=None) -> Surface

Experimental: feature still in development available for testing and feedback. It may change. Please leave smoothscale_by feedback with authors

Same as smoothscale(), but scales by some factor, rather than taking the new size explicitly. For example, transform.smoothscale_by(surf, 3) will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, transform.smoothscale_by(surf, (2, 1)) doubles the image width but keeps the height the same.

New in pygame 2.1.3.

pygame.transform.get_smoothscale_backend()
return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'
get_smoothscale_backend() -> string

Shows whether or not smoothscale is using MMX or SSE acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime.

This function is provided for pygame testing and debugging.

pygame.transform.set_smoothscale_backend()
set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'
set_smoothscale_backend(backend) -> None

Sets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses MMX instructions only. 'SSE' allows SSE extensions as well. A value error is raised if type is not recognized or not supported by the current processor.

This function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only.

pygame.transform.chop()
gets a copy of an image with an interior area removed
chop(surface, rect) -> Surface

Extracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.)

NOTE: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface.

pygame.transform.laplacian()
find edges in a surface
laplacian(surface, dest_surface=None) -> Surface

Finds the edges in a surface using the laplacian algorithm.

New in pygame 1.8.

pygame.transform.average_surfaces()
find the average surface from many surfaces.
average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface

Takes a sequence of surfaces and returns a surface with average colors from each of the surfaces.

palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors.

Note, this function currently does not handle palette using surfaces correctly.

New in pygame 1.8.

New in pygame 1.9: palette_colors argument

pygame.transform.average_color()
finds the average color of a surface
average_color(surface, rect=None, consider_alpha=False) -> Color

Finds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. If consider_alpha is set to True, then alpha is taken into account (removing the black artifacts).

New in pygame 2.1.2: consider_alpha argument

pygame.transform.grayscale()
grayscale a surface
grayscale(surface, dest_surface=None) -> Surface

Returns a grayscaled version of the original surface using the luminosity formula which weights red, green and blue according to their wavelengths.

An optional destination surface can be passed which is faster than creating a new Surface. This destination surface must have the same dimensions (width, height) and depth as the source Surface.

pygame.transform.threshold()
finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.
threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels

This versatile function can be used for find colors in a 'surf' close to a 'search_color' or close to colors in a separate 'search_surf'.

It can also be used to transfer pixels into a 'dest_surf' that match or don't match.

By default it sets pixels in the 'dest_surf' where all of the pixels NOT within the threshold are changed to set_color. If inverse_set is optionally set to True, the pixels that ARE within the threshold are changed to set_color.

If the optional 'search_surf' surface is given, it is used to threshold against rather than the specified 'set_color'. That is, it will find each pixel in the 'surf' that is within the 'threshold' of the pixel at the same coordinates of the 'search_surf'.

Parameters:
Return type:

int

Returns:

The number of pixels that are within the 'threshold' in 'surf' compared to either 'search_color' or search_surf.

Examples:

See the threshold tests for a full of examples: https://github.com/pygame/pygame/blob/main/test/transform_test.py

    def test_threshold_dest_surf_not_change(self):
        """the pixels within the threshold.

        All pixels not within threshold are changed to set_color.
        So there should be none changed in this test.
        """
        (w, h) = size = (32, 32)
        threshold = (20, 20, 20, 20)
        original_color = (25, 25, 25, 25)
        original_dest_color = (65, 65, 65, 55)
        threshold_color = (10, 10, 10, 10)
        set_color = (255, 10, 10, 10)

        surf = pygame.Surface(size, pygame.SRCALPHA, 32)
        dest_surf = pygame.Surface(size, pygame.SRCALPHA, 32)
        search_surf = pygame.Surface(size, pygame.SRCALPHA, 32)

        surf.fill(original_color)
        search_surf.fill(threshold_color)
        dest_surf.fill(original_dest_color)

        # set_behavior=1, set dest_surface from set_color.
        # all within threshold of third_surface, so no color is set.

        THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1
        pixels_within_threshold = pygame.transform.threshold(
            dest_surface=dest_surf,
            surface=surf,
            search_color=None,
            threshold=threshold,
            set_color=set_color,
            set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR,
            search_surf=search_surf,
        )

        # # Return, of pixels within threshold is correct
        self.assertEqual(w * h, pixels_within_threshold)

        # # Size of dest surface is correct
        dest_rect = dest_surf.get_rect()
        dest_size = dest_rect.size
        self.assertEqual(size, dest_size)

        # The color is not the change_color specified for every pixel As all
        # pixels are within threshold

        for pt in test_utils.rect_area_pts(dest_rect):
            self.assertNotEqual(dest_surf.get_at(pt), set_color)
            self.assertEqual(dest_surf.get_at(pt), original_dest_color)

New in pygame 1.8.

Changed in pygame 1.9.4: Fixed a lot of bugs and added keyword arguments. Test your code.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612182.0751367 pygame-2.6.1/docs/generated/search.html0000644000175100001770000000612514676242426017451 0ustar00runnerdocker Search — pygame v2.6.1 documentation

Search

Searching for multiple words only shows matches that contain all words.

././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612182.1431365 pygame-2.6.1/docs/generated/searchindex.js0000644000175100001770000126213714676242426020161 0ustar00runnerdockerSearch.setIndex({"alltitles": {"-New Input is new Event": [[70, "new-input-is-new-event"]], "-Setting for Animation": [[69, "setting-for-animation"]], "-\uc0c8\ub85c\uc6b4 \uc785\ub825\uc740 \uc0c8\ub85c\uc6b4 \uc774\ubca4\ud2b8": [[78, "id2"]], "-\ud654\uba74\uc774 \uc6c0\uc9c1\uc774\uae30 \uc704\ud55c \uc870\uac74": [[77, "id2"]], "1. Introduction": [[61, "introduction"]], "1.1. A note on coding styles": [[61, "a-note-on-coding-styles"]], "2. Revision: Pygame fundamentals": [[85, "makegames-2"]], "2.1. The basic Pygame game": [[85, "the-basic-pygame-game"]], "2.2. Basic Pygame objects": [[85, "basic-pygame-objects"]], "2.3. Blitting": [[85, "blitting"]], "2.4. The event loop": [[85, "the-event-loop"]], "2.5. Ta-da!": [[85, "ta-da"]], "3. Kicking things off": [[86, "makegames-3"]], "3.1. The first lines, and loading modules": [[86, "the-first-lines-and-loading-modules"]], "3.2. Resource handling functions": [[86, "resource-handling-functions"]], "4. Game object classes": [[87, "makegames-4"]], "4.1. A simple ball class": [[87, "a-simple-ball-class"]], "4.1.1. Diversion 1: Sprites": [[87, "diversion-1-sprites"]], "4.1.2. Diversion 2: Vector physics": [[87, "diversion-2-vector-physics"]], "5. User-controllable objects": [[88, "makegames-5"]], "5.1. A simple bat class": [[88, "a-simple-bat-class"]], "5.1.1. Diversion 3: Pygame events": [[88, "diversion-3-pygame-events"]], "6. Putting it all together": [[89, "makegames-6"]], "6.1. Let the ball hit sides": [[89, "let-the-ball-hit-sides"]], "6.2. Let the ball hit bats": [[89, "let-the-ball-hit-bats"]], "6.3. The Finished product": [[89, "the-finished-product"]], "A Newbie Guide to pygame": [[84, "a-newbie-guide-to-pygame"]], "API exported by pygame._freetype": [[6, null]], "API exported by pygame.display": [[4, null]], "API exported by pygame.event": [[5, null]], "API exported by pygame.mixer": [[7, null]], "API exported by pygame.rwobject": [[9, null]], "API exported by pygame.surflock": [[12, null]], "API exported by pygame.version": [[13, null]], "Adding the User Input": [[62, "adding-the-user-input"]], "Author: Youngwook Kim (Korean)": [[67, null], [68, null], [69, null], [70, null], [71, null], [72, null], [73, null], [74, null], [75, null], [76, null], [77, null], [78, null], [79, null], [80, null], [81, null], [82, null]], "Basic Computer Vision": [[57, "basic-computer-vision"]], "Basic INPUT": [[70, "basic-input"]], "Basic PROCESS": [[69, "basic-process"]], "Basic TEMPLATE and OUTPUT": [[68, "basic-template-and-output"]], "Be wary of outdated, obsolete, and optional advice.": [[84, "be-wary-of-outdated-obsolete-and-optional-advice"]], "CLOSING": [[63, "closing"]], "Camera Module Introduction": [[57, "camera-module-introduction"]], "Capturing a Live Stream": [[57, "capturing-a-live-stream"]], "Capturing a Single Image": [[57, "capturing-a-single-image"]], "Changing The Background": [[62, "changing-the-background"]], "Class BufferProxy API exported by pygame.bufferproxy": [[2, null]], "Class Color API exported by pygame.color": [[3, null]], "Class Rect API exported by pygame.rect": [[8, null]], "Class Surface API exported by pygame.surface": [[11, null]], "Collision Detection": [[64, "collision-detection"]], "Colorkey vs. Alpha.": [[84, "colorkey-vs-alpha"]], "Colorspaces": [[57, "colorspaces"]], "Common Controller Axis Mappings": [[32, "common-controller-axis-mappings"]], "Common Problems": [[64, "common-problems"]], "Contact: rumia0601@gmail.com": [[67, "contact-rumia0601-gmail-com"], [68, "contact-rumia0601-gmail-com"], [69, "contact-rumia0601-gmail-com"], [70, "contact-rumia0601-gmail-com"], [71, "contact-rumia0601-gmail-com"], [72, "contact-rumia0601-gmail-com"], [73, "contact-rumia0601-gmail-com"], [74, "contact-rumia0601-gmail-com"], [75, "contact-rumia0601-gmail-com"], [76, "contact-rumia0601-gmail-com"], [77, "contact-rumia0601-gmail-com"], [78, "contact-rumia0601-gmail-com"], [79, "contact-rumia0601-gmail-com"], [80, "contact-rumia0601-gmail-com"], [81, "contact-rumia0601-gmail-com"], [82, "contact-rumia0601-gmail-com"]], "Create The Background": [[58, "create-the-background"]], "Creating A Map": [[62, "creating-a-map"]], "Definition: \"blit\"": [[62, "definition-blit"]], "Display The Background While Setup Finishes": [[58, "display-the-background-while-setup-finishes"]], "Do things the pythony way.": [[84, "do-things-the-pythony-way"]], "Documents": [[15, "documents"]], "Don't bother with pixel-perfect collision detection.": [[84, "don-t-bother-with-pixel-perfect-collision-detection"]], "Don't get distracted by side issues.": [[84, "don-t-get-distracted-by-side-issues"]], "Draw The Entire Scene": [[58, "draw-the-entire-scene"]], "Epilog": [[74, "epilog"]], "Examples": [[59, "examples"], [65, "examples"]], "Extending Your Own Classes (Advanced)": [[64, "extending-your-own-classes-advanced"]], "File Path Function Arguments": [[14, null]], "First, The Mystery Functions": [[62, "first-the-mystery-functions"]], "Functions": [[59, "functions"]], "Game Object Classes": [[58, "game-object-classes"]], "Game Over": [[58, "game-over"]], "Game object classes": [[87, null]], "Get comfortable working in Python.": [[84, "get-comfortable-working-in-python"]], "Going From The List To The Screen": [[62, "going-from-the-list-to-the-screen"]], "Graduation": [[65, "graduation"]], "HISTORY": [[63, "history"]], "Handle All Input Events": [[58, "handle-all-input-events"]], "Handling Some Input": [[62, "handling-some-input"]], "Help! How Do I Move An Image?": [[62, "help-how-do-i-move-an-image"]], "High level API exported by pygame.base": [[1, null]], "History Lesson": [[64, "history-lesson"]], "How to Decide": [[59, "how-to-decide"]], "Import": [[60, "import"]], "Import Modules": [[58, "import-modules"]], "Import Surfarray": [[65, "import-surfarray"]], "Import and Init": [[57, "import-and-init"]], "Import and Initialize": [[60, "import-and-initialize"]], "Init": [[60, "init"]], "Initialize Everything": [[58, "initialize-everything"]], "Introduction": [[58, "introduction"], [59, "introduction"], [65, "introduction"]], "Just Pixels On The Screen": [[62, "just-pixels-on-the-screen"]], "Kicking things off": [[86, null]], "Know what a surface is.": [[84, "know-what-a-surface-is"]], "Legacy logos": [[16, "legacy-logos"]], "Let's Go Back A Step": [[62, "let-s-go-back-a-step"]], "Line By Line Chimp": [[58, "line-by-line-chimp"]], "Listing Connected Cameras": [[57, "listing-connected-cameras"]], "Loading Resources": [[58, "loading-resources"]], "Main Loop": [[58, "main-loop"]], "Making Games With Pygame": [[61, null], [61, "id1"]], "Making The Hero Move": [[62, "making-the-hero-move"]], "Making The Hero Move (Take 2)": [[62, "making-the-hero-move-take-2"]], "Managing the event subsystem.": [[84, "managing-the-event-subsystem"]], "Mixing Them Together": [[64, "mixing-them-together"]], "More Advanced NumPy": [[65, "more-advanced-numpy"]], "Moving Multiple Images": [[62, "moving-multiple-images"]], "Named Colors": [[21, null]], "Newbie Guide to Pygame": [[84, null]], "Nintendo Switch Left Joy-Con (pygame 2.x)": [[32, "nintendo-switch-left-joy-con-pygame-2-x"]], "Nintendo Switch Pro Controller (pygame 2.x)": [[32, "nintendo-switch-pro-controller-pygame-2-x"]], "Nintendo Switch Right Joy-Con (pygame 2.x)": [[32, "nintendo-switch-right-joy-con-pygame-2-x"]], "NumPy": [[65, "numpy"]], "Other Surfarray Functions": [[65, "other-surfarray-functions"]], "PYTHON AND GAMING": [[63, "python-and-gaming"]], "Playstation 4 Controller (pygame 1.x)": [[32, "playstation-4-controller-pygame-1-x"]], "Playstation 4 Controller (pygame 2.x)": [[32, "playstation-4-controller-pygame-2-x"]], "Playstation 5 Controller (pygame 2.x)": [[32, "playstation-5-controller-pygame-2-x"]], "Prepare Game Object": [[58, "prepare-game-object"]], "Preparing for Improved User Input": [[62, "preparing-for-improved-user-input"]], "Prolog? Why Pygame?": [[67, "prolog-why-pygame"]], "Put Text On The Background, Centered": [[58, "put-text-on-the-background-centered"]], "Putting It All Together": [[62, "putting-it-all-together"]], "Putting it all Together One More time": [[62, "putting-it-all-together-one-more-time"]], "Putting it all together": [[89, null]], "Pygame Front Page": [[15, null]], "Pygame Intro": [[63, null]], "Pygame Logos": [[16, "pygame-logos"]], "Pygame Logos Page": [[16, null]], "Pygame Modules Overview": [[63, "pygame-modules-overview"]], "Pygame Tutorials - Camera Module Introduction": [[57, null]], "Pygame Tutorials - Help! How Do I Move An Image?": [[62, null]], "Pygame Tutorials - Import and Initialize": [[60, null]], "Pygame Tutorials - Line By Line Chimp Example": [[58, null]], "Pygame Tutorials - Setting Display Modes": [[59, null]], "Pygame Tutorials - Sprite Module Introduction": [[64, null]], "Pygame Tutorials - Surfarray Introduction": [[65, null]], "Python Pygame Introduction": [[63, "python-pygame-introduction"]], "Quick start": [[15, "quick-start"]], "Quit": [[60, "quit"]], "Recognize which parts of pygame you really need.": [[84, "recognize-which-parts-of-pygame-you-really-need"]], "Rects are your friends.": [[84, "rects-are-your-friends"]], "Reference": [[15, "reference"]], "Revision: Pygame fundamentals": [[85, null]], "Screen Coordinates": [[62, "screen-coordinates"]], "Setting Basics": [[59, "setting-basics"]], "Setting Display Modes": [[59, "setting-display-modes"]], "Slots and c_api - Making functions and data available from other modules": [[10, null]], "Smooth Movement": [[62, "smooth-movement"]], "So, What Next?": [[62, "so-what-next"]], "Software architecture, design patterns, and games.": [[84, "software-architecture-design-patterns-and-games"]], "Sprite Module Introduction": [[64, "sprite-module-introduction"]], "Surface Locking": [[65, "surface-locking"]], "Surfarray Introduction": [[65, "surfarray-introduction"], [65, "id1"]], "TASTE": [[63, "taste"]], "Table of Contents": [[61, "table-of-contents"]], "The Classes": [[64, "the-classes"]], "The Group Class": [[64, "the-group-class"]], "The Many Group Types": [[64, "the-many-group-types"]], "The Rendering Groups": [[64, "the-rendering-groups"]], "The Sprite Class": [[64, "the-sprite-class"]], "There is NO rule six.": [[84, "there-is-no-rule-six"]], "Thresholding": [[57, "thresholding"]], "Transparency": [[65, "transparency"]], "Tutorials": [[15, "tutorials"]], "Update the Sprites": [[58, "update-the-sprites"]], "Use Surface.convert().": [[84, "use-surface-convert"]], "User-controllable objects": [[88, null]], "Using Camera Controls": [[57, "using-camera-controls"]], "Using the Mask Module": [[57, "using-the-mask-module"]], "XBox 360 Controller (pygame 1.x)": [[32, "xbox-360-controller-pygame-1-x"]], "XBox 360 Controller (pygame 2.x)": [[32, "xbox-360-controller-pygame-2-x"]], "You Are On Your Own From Here": [[62, "you-are-on-your-own-from-here"]], "and plus alpha": [[73, "and-plus-alpha"]], "pygame C API": [[0, null]], "pygame.BufferProxypygame object to export a surface buffer through an array protocol": [[17, null]], "pygame.Colorpygame object for color representations": [[20, null]], "pygame.Overlaypygame object for video overlay graphics": [[41, null]], "pygame.PixelArraypygame object for direct pixel access of surfaces": [[42, null]], "pygame.Rectpygame object for storing rectangular coordinates": [[45, null]], "pygame.Surfacepygame object for representing images": [[51, null]], "pygame._sdl2.controllerPygame module to work with controllers.": [[47, null]], "pygame._sdl2.touchpygame module to work with touch input": [[55, null]], "pygame.camerapygame module for camera use": [[18, null]], "pygame.cdrompygame module for audio cdrom control": [[19, null]], "pygame.cursorspygame module for cursor resources": [[22, null]], "pygame.displaypygame module to control the display window and screen": [[23, null]], "pygame.drawpygame module for drawing shapes": [[24, null]], "pygame.eventpygame module for interacting with events and queues": [[25, null]], "pygame.examplesmodule of example programs": [[26, null]], "pygame.fasteventpygame module for interacting with events and queues": [[27, null]], "pygame.fontpygame module for loading and rendering fonts": [[28, null]], "pygame.freetypeEnhanced pygame module for loading and rendering computer fonts": [[29, null]], "pygame.gfxdrawpygame module for drawing shapes": [[30, null]], "pygame.imagepygame module for image transfer": [[31, null]], "pygame.joystickPygame module for interacting with joysticks, gamepads, and trackballs.": [[32, null]], "pygame.keypygame module to work with the keyboard": [[33, null]], "pygame.localspygame constants": [[34, null]], "pygame.maskpygame module for image masks.": [[35, null]], "pygame.mathpygame module for vector classes": [[36, null]], "pygame.midipygame module for interacting with midi input and output.": [[37, null]], "pygame.mixer.musicpygame module for controlling streamed audio": [[40, null]], "pygame.mixerpygame module for loading and playing sounds": [[38, null]], "pygame.mousepygame module to work with the mouse": [[39, null]], "pygame.pixelcopypygame module for general pixel array copying": [[43, null]], "pygame.scrappygame module for clipboard support.": [[46, null]], "pygame.sdl2_video": [[48, null]], "pygame.sndarraypygame module for accessing sound sample data": [[49, null]], "pygame.spritepygame module with basic game object classes": [[50, null]], "pygame.surfarraypygame module for accessing surface pixel data using array interfaces": [[52, null]], "pygame.testsPygame unit test suite package": [[53, null]], "pygame.timepygame module for monitoring time": [[54, null]], "pygame.transformpygame module to transform surfaces": [[56, null]], "pygame.versionsmall module containing version information": [[44, "module-pygame.version"]], "pygame/examples/chimp.py": [[66, null]], "pygamethe top level pygame package": [[44, null]], "src_c/_freetype.c": [[6, "src-c-freetype-c"]], "src_c/base.c": [[1, "src-c-base-c"]], "src_c/bufferproxy.c": [[2, "src-c-bufferproxy-c"]], "src_c/color.c": [[3, "src-c-color-c"]], "src_c/display.c": [[4, "src-c-display-c"]], "src_c/event.c": [[5, "src-c-event-c"]], "src_c/mixer.c": [[7, "src-c-mixer-c"]], "src_c/rect.c": [[8, "src-c-rect-c"]], "src_c/rwobject.c": [[9, "src-c-rwobject-c"]], "src_c/surface.c": [[11, "src-c-surface-c"]], "src_c/surflock.c": [[12, "src-c-surflock-c"]], "src_py/version.py": [[13, "src-py-version-py"]], "with Advanced OUTPUT \u2013 Buttons": [[72, "with-advanced-output-buttons"]], "with Advanced PROCESS - Functionalization": [[71, "with-advanced-process-functionalization"]], "\u2013 \uc65c \ud558\ud544 \ud30c\uc774\uac8c\uc784?": [[75, "id2"]], "\u2013Into Event-driven and GUI": [[68, "into-event-driven-and-gui"]], "\u2013\uc774\ubca4\ud2b8 \uae30\ubc18\uacfc GUI \uae30\ubc18\uc73c\ub85c\uc758 \uc785\ubb38": [[76, "gui"]], "\uadf8\ub9ac\uace0 \uc2ec\ud654 \ucc98\ub9ac - \ud568\uc218\ud654": [[79, "id1"]], "\uadf8\ub9ac\uace0 \uc2ec\ud654 \ucd9c\ub825 \u2013 \ubc84\ud2bc": [[80, "id1"]], "\uadf8\ub9ac\uace0 \uc870\uae08 \ub354!": [[81, "id1"]], "\uae30\ubcf8 \ud615\uc2dd\uacfc \uae30\ucd08 \ucd9c\ub825": [[76, "id1"]], "\uae30\ucd08 \uc785\ub825": [[78, "id1"]], "\uae30\ucd08 \ucc98\ub9ac": [[77, "id1"]], "\uc5d0\ud544\ub85c\uadf8": [[82, "id1"]], "\ud504\ub864\ub85c\uadf8": [[75, "id1"]], "\ud55c\uad6d\uc5b4 \ud29c\ud1a0\ub9ac\uc5bc": [[83, null], [83, "id2"]]}, "docnames": ["c_api", "c_api/base", "c_api/bufferproxy", "c_api/color", "c_api/display", "c_api/event", "c_api/freetype", "c_api/mixer", "c_api/rect", "c_api/rwobject", "c_api/slots", "c_api/surface", "c_api/surflock", "c_api/version", "filepaths", "index", "logos", "ref/bufferproxy", "ref/camera", "ref/cdrom", "ref/color", "ref/color_list", "ref/cursors", "ref/display", "ref/draw", "ref/event", "ref/examples", "ref/fastevent", "ref/font", "ref/freetype", "ref/gfxdraw", "ref/image", "ref/joystick", "ref/key", "ref/locals", "ref/mask", "ref/math", "ref/midi", "ref/mixer", "ref/mouse", "ref/music", "ref/overlay", "ref/pixelarray", "ref/pixelcopy", "ref/pygame", "ref/rect", "ref/scrap", "ref/sdl2_controller", "ref/sdl2_video", "ref/sndarray", "ref/sprite", "ref/surface", "ref/surfarray", "ref/tests", "ref/time", "ref/touch", "ref/transform", "tut/CameraIntro", "tut/ChimpLineByLine", "tut/DisplayModes", "tut/ImportInit", "tut/MakeGames", "tut/MoveIt", "tut/PygameIntro", "tut/SpriteIntro", "tut/SurfarrayIntro", "tut/chimp.py", "tut/en/Red_or_Black/1.Prolog/introduction", "tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT", "tut/en/Red_or_Black/3.Move_text/Basic PROCESS", "tut/en/Red_or_Black/4.Control_text/Basic INPUT", "tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS", "tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT", "tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha", "tut/en/Red_or_Black/8.Epilog/Epilog", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/1.\ud504\ub864\ub85c\uadf8/\uc18c\uac1c", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/2.\ud14d\uc2a4\ud2b8 \ucd9c\ub825/\uae30\ucd08 \ud15c\ud50c\ub9bf\uacfc \ucd9c\ub825", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/3.\ud14d\uc2a4\ud2b8 \uc774\ub3d9/\uae30\ucd08 \ucc98\ub9ac", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/4.\ud14d\uc2a4\ud2b8 \uc870\uc885/\uae30\ucd08 \uc785\ub825", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/5.HP\ubc14/\uc2ec\ud654 \ucd9c\ub825 \uadf8\ub9ac\uace0 \uc2ec\ud654 \ucc98\ub9ac", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/6.\ubc84\ud2bc\ub4e4/\uc2ec\ud654 \uc785\ub825 \uadf8\ub9ac\uace0 \uc2ec\ud654 \ucd9c\ub825", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/7.\uac8c\uc784\ud310/\uc2ec\ud654 \ucd9c\ub825 \uadf8\ub9ac\uace0 \uc870\uae08 \ub354", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/8.\uc5d0\ud544\ub85c\uadf8/\uc5d0\ud544\ub85c\uadf8", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/\uac1c\uc694", "tut/newbieguide", "tut/tom_games2", "tut/tom_games3", "tut/tom_games4", "tut/tom_games5", "tut/tom_games6"], "envversion": {"sphinx": 63, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["c_api.rst", "c_api/base.rst", "c_api/bufferproxy.rst", "c_api/color.rst", "c_api/display.rst", "c_api/event.rst", "c_api/freetype.rst", "c_api/mixer.rst", "c_api/rect.rst", "c_api/rwobject.rst", "c_api/slots.rst", "c_api/surface.rst", "c_api/surflock.rst", "c_api/version.rst", "filepaths.rst", "index.rst", "logos.rst", "ref/bufferproxy.rst", "ref/camera.rst", "ref/cdrom.rst", "ref/color.rst", "ref/color_list.rst", "ref/cursors.rst", "ref/display.rst", "ref/draw.rst", "ref/event.rst", "ref/examples.rst", "ref/fastevent.rst", "ref/font.rst", "ref/freetype.rst", "ref/gfxdraw.rst", "ref/image.rst", "ref/joystick.rst", "ref/key.rst", "ref/locals.rst", "ref/mask.rst", "ref/math.rst", "ref/midi.rst", "ref/mixer.rst", "ref/mouse.rst", "ref/music.rst", "ref/overlay.rst", "ref/pixelarray.rst", "ref/pixelcopy.rst", "ref/pygame.rst", "ref/rect.rst", "ref/scrap.rst", "ref/sdl2_controller.rst", "ref/sdl2_video.rst", "ref/sndarray.rst", "ref/sprite.rst", "ref/surface.rst", "ref/surfarray.rst", "ref/tests.rst", "ref/time.rst", "ref/touch.rst", "ref/transform.rst", "tut/CameraIntro.rst", "tut/ChimpLineByLine.rst", "tut/DisplayModes.rst", "tut/ImportInit.rst", "tut/MakeGames.rst", "tut/MoveIt.rst", "tut/PygameIntro.rst", "tut/SpriteIntro.rst", "tut/SurfarrayIntro.rst", "tut/chimp.py.rst", "tut/en/Red_or_Black/1.Prolog/introduction.rst", "tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.rst", "tut/en/Red_or_Black/3.Move_text/Basic PROCESS.rst", "tut/en/Red_or_Black/4.Control_text/Basic INPUT.rst", "tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.rst", "tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT.rst", "tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.rst", "tut/en/Red_or_Black/8.Epilog/Epilog.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/1.\ud504\ub864\ub85c\uadf8/\uc18c\uac1c.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/2.\ud14d\uc2a4\ud2b8 \ucd9c\ub825/\uae30\ucd08 \ud15c\ud50c\ub9bf\uacfc \ucd9c\ub825.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/3.\ud14d\uc2a4\ud2b8 \uc774\ub3d9/\uae30\ucd08 \ucc98\ub9ac.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/4.\ud14d\uc2a4\ud2b8 \uc870\uc885/\uae30\ucd08 \uc785\ub825.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/5.HP\ubc14/\uc2ec\ud654 \ucd9c\ub825 \uadf8\ub9ac\uace0 \uc2ec\ud654 \ucc98\ub9ac.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/6.\ubc84\ud2bc\ub4e4/\uc2ec\ud654 \uc785\ub825 \uadf8\ub9ac\uace0 \uc2ec\ud654 \ucd9c\ub825.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/7.\uac8c\uc784\ud310/\uc2ec\ud654 \ucd9c\ub825 \uadf8\ub9ac\uace0 \uc870\uae08 \ub354.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/8.\uc5d0\ud544\ub85c\uadf8/\uc5d0\ud544\ub85c\uadf8.rst", "tut/ko/\ube68\uac04\ube14\ub85d \uac80\uc740\ube14\ub85d/\uac1c\uc694.rst", "tut/newbieguide.rst", "tut/tom_games2.rst", "tut/tom_games3.rst", "tut/tom_games4.rst", "tut/tom_games5.rst", "tut/tom_games6.rst"], "indexentries": {"__dict__ (pygame.event.event attribute)": [[25, "pygame.event.Event.__dict__", false]], "_pixels_address (pygame.surface attribute)": [[51, "pygame.Surface._pixels_address", false]], "a (pygame.color attribute)": [[20, "pygame.Color.a", false]], "aacircle() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.aacircle", false]], "aaellipse() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.aaellipse", false]], "aaline() (in module pygame.draw)": [[24, "pygame.draw.aaline", false]], "aalines() (in module pygame.draw)": [[24, "pygame.draw.aalines", false]], "aapolygon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.aapolygon", false]], "aatrigon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.aatrigon", false]], "abort() (pygame.midi.output method)": [[37, "pygame.midi.Output.abort", false]], "add() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.add", false]], "add() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.add", false]], "add() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.add", false]], "aliens.main() (in module pygame.examples)": [[26, "pygame.examples.aliens.main", false]], "alive() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.alive", false]], "alpha (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.alpha", false]], "alpha (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.alpha", false]], "angle (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.angle", false]], "angle() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.angle", false]], "angle_to() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.angle_to", false]], "angle_to() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.angle_to", false]], "antialiased (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.antialiased", false]], "arc() (in module pygame.draw)": [[24, "pygame.draw.arc", false]], "arc() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.arc", false]], "array() (in module pygame.sndarray)": [[49, "pygame.sndarray.array", false]], "array2d() (in module pygame.surfarray)": [[52, "pygame.surfarray.array2d", false]], "array3d() (in module pygame.surfarray)": [[52, "pygame.surfarray.array3d", false]], "array_alpha() (in module pygame.surfarray)": [[52, "pygame.surfarray.array_alpha", false]], "array_blue() (in module pygame.surfarray)": [[52, "pygame.surfarray.array_blue", false]], "array_colorkey() (in module pygame.surfarray)": [[52, "pygame.surfarray.array_colorkey", false]], "array_green() (in module pygame.surfarray)": [[52, "pygame.surfarray.array_green", false]], "array_red() (in module pygame.surfarray)": [[52, "pygame.surfarray.array_red", false]], "array_to_surface() (in module pygame.pixelcopy)": [[43, "pygame.pixelcopy.array_to_surface", false]], "arraydemo.main() (in module pygame.examples)": [[26, "pygame.examples.arraydemo.main", false]], "as_joystick() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.as_joystick", false]], "as_polar() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.as_polar", false]], "as_spherical() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.as_spherical", false]], "ascender (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.ascender", false]], "attached() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.attached", false]], "average_color() (in module pygame.transform)": [[56, "pygame.transform.average_color", false]], "average_surfaces() (in module pygame.transform)": [[56, "pygame.transform.average_surfaces", false]], "b (pygame.color attribute)": [[20, "pygame.Color.b", false]], "bezier() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.bezier", false]], "bgcolor (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.bgcolor", false]], "blend_fill.main() (in module pygame.examples)": [[26, "pygame.examples.blend_fill.main", false]], "blend_mode (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.blend_mode", false]], "blend_mode (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.blend_mode", false]], "blit() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.blit", false]], "blit() (pygame.surface method)": [[51, "pygame.Surface.blit", false]], "blit_array() (in module pygame.surfarray)": [[52, "pygame.surfarray.blit_array", false]], "blit_blends.main() (in module pygame.examples)": [[26, "pygame.examples.blit_blends.main", false]], "blits() (pygame.surface method)": [[51, "pygame.Surface.blits", false]], "bold (pygame.font.font attribute)": [[28, "pygame.font.Font.bold", false]], "borderless (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.borderless", false]], "box() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.box", false]], "bufferproxy (class in pygame)": [[17, "pygame.BufferProxy", false]], "camera (class in pygame.camera)": [[18, "pygame.camera.Camera", false]], "camera.main() (in module pygame.examples)": [[26, "pygame.examples.camera.main", false]], "cd (class in pygame.cdrom)": [[19, "pygame.cdrom.CD", false]], "centroid() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.centroid", false]], "change_layer() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.change_layer", false]], "change_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.change_layer", false]], "channel (class in pygame.mixer)": [[38, "pygame.mixer.Channel", false]], "chimp.main() (in module pygame.examples)": [[26, "pygame.examples.chimp.main", false]], "chop() (in module pygame.transform)": [[56, "pygame.transform.chop", false]], "circle() (in module pygame.draw)": [[24, "pygame.draw.circle", false]], "circle() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.circle", false]], "clamp() (in module pygame.math)": [[36, "pygame.math.clamp", false]], "clamp() (pygame.rect method)": [[45, "pygame.Rect.clamp", false]], "clamp_ip() (pygame.rect method)": [[45, "pygame.Rect.clamp_ip", false]], "clamp_magnitude() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.clamp_magnitude", false]], "clamp_magnitude() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.clamp_magnitude", false]], "clamp_magnitude_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.clamp_magnitude_ip", false]], "clamp_magnitude_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.clamp_magnitude_ip", false]], "clear() (in module pygame.event)": [[25, "pygame.event.clear", false]], "clear() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.clear", false]], "clear() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.clear", false]], "clear() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.clear", false]], "clear() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.clear", false]], "clip() (pygame.rect method)": [[45, "pygame.Rect.clip", false]], "clipline() (pygame.rect method)": [[45, "pygame.Rect.clipline", false]], "clock (class in pygame.time)": [[54, "pygame.time.Clock", false]], "close() (pygame.midi.input method)": [[37, "pygame.midi.Input.close", false]], "close() (pygame.midi.output method)": [[37, "pygame.midi.Output.close", false]], "close() (pygame.pixelarray method)": [[42, "pygame.PixelArray.close", false]], "cmy (pygame.color attribute)": [[20, "pygame.Color.cmy", false]], "collide_circle() (in module pygame.sprite)": [[50, "pygame.sprite.collide_circle", false]], "collide_circle_ratio() (in module pygame.sprite)": [[50, "pygame.sprite.collide_circle_ratio", false]], "collide_mask() (in module pygame.sprite)": [[50, "pygame.sprite.collide_mask", false]], "collide_rect() (in module pygame.sprite)": [[50, "pygame.sprite.collide_rect", false]], "collide_rect_ratio() (in module pygame.sprite)": [[50, "pygame.sprite.collide_rect_ratio", false]], "collidedict() (pygame.rect method)": [[45, "pygame.Rect.collidedict", false]], "collidedictall() (pygame.rect method)": [[45, "pygame.Rect.collidedictall", false]], "collidelist() (pygame.rect method)": [[45, "pygame.Rect.collidelist", false]], "collidelistall() (pygame.rect method)": [[45, "pygame.Rect.collidelistall", false]], "collideobjects() (pygame.rect method)": [[45, "pygame.Rect.collideobjects", false]], "collideobjectsall() (pygame.rect method)": [[45, "pygame.Rect.collideobjectsall", false]], "collidepoint() (pygame.rect method)": [[45, "pygame.Rect.collidepoint", false]], "colliderect() (pygame.rect method)": [[45, "pygame.Rect.colliderect", false]], "color (class in pygame)": [[20, "pygame.Color", false]], "color (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.color", false]], "color (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.color", false]], "colorspace() (in module pygame.camera)": [[18, "pygame.camera.colorspace", false]], "compare() (pygame.pixelarray method)": [[42, "pygame.PixelArray.compare", false]], "compile() (in module pygame.cursors)": [[22, "pygame.cursors.compile", false]], "connected_component() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.connected_component", false]], "connected_components() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.connected_components", false]], "contains() (in module pygame.scrap)": [[46, "pygame.scrap.contains", false]], "contains() (pygame.rect method)": [[45, "pygame.Rect.contains", false]], "controller (class in pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.Controller", false]], "convert() (pygame.surface method)": [[51, "pygame.Surface.convert", false]], "convert_alpha() (pygame.surface method)": [[51, "pygame.Surface.convert_alpha", false]], "convolve() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.convolve", false]], "copy() (pygame.cursors.cursor method)": [[22, "pygame.cursors.Cursor.copy", false]], "copy() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.copy", false]], "copy() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.copy", false]], "copy() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.copy", false]], "copy() (pygame.rect method)": [[45, "pygame.Rect.copy", false]], "copy() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.copy", false]], "copy() (pygame.surface method)": [[51, "pygame.Surface.copy", false]], "correct_gamma() (pygame.color method)": [[20, "pygame.Color.correct_gamma", false]], "count() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.count", false]], "cross() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.cross", false]], "cross() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.cross", false]], "cursor (class in pygame.cursors)": [[22, "pygame.cursors.Cursor", false]], "cursors.main() (in module pygame.examples)": [[26, "pygame.examples.cursors.main", false]], "custom_type() (in module pygame.event)": [[25, "pygame.event.custom_type", false]], "data (pygame.cursors.cursor attribute)": [[22, "pygame.cursors.Cursor.data", false]], "delay() (in module pygame.time)": [[54, "pygame.time.delay", false]], "descender (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.descender", false]], "destroy() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.destroy", false]], "dirtysprite (class in pygame.sprite)": [[50, "pygame.sprite.DirtySprite", false]], "display() (pygame.overlay method)": [[41, "pygame.Overlay.display", false]], "display_index (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.display_index", false]], "distance_squared_to() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.distance_squared_to", false]], "distance_squared_to() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.distance_squared_to", false]], "distance_to() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.distance_to", false]], "distance_to() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.distance_to", false]], "dot() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.dot", false]], "dot() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.dot", false]], "draw() (pygame._sdl2.video.image method)": [[48, "pygame._sdl2.video.Image.draw", false]], "draw() (pygame._sdl2.video.texture method)": [[48, "pygame._sdl2.video.Texture.draw", false]], "draw() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.draw", false]], "draw() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.draw", false]], "draw() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.draw", false]], "draw() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.draw", false]], "draw() (pygame.sprite.renderupdates method)": [[50, "pygame.sprite.RenderUpdates.draw", false]], "draw_blend_mode (pygame._sdl2.video.renderer attribute)": [[48, "pygame._sdl2.video.Renderer.draw_blend_mode", false]], "draw_color (pygame._sdl2.video.renderer attribute)": [[48, "pygame._sdl2.video.Renderer.draw_color", false]], "draw_line() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.draw_line", false]], "draw_point() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.draw_point", false]], "draw_rect() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.draw_rect", false]], "eject() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.eject", false]], "elementwise() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.elementwise", false]], "elementwise() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.elementwise", false]], "ellipse() (in module pygame.draw)": [[24, "pygame.draw.ellipse", false]], "ellipse() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.ellipse", false]], "empty() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.empty", false]], "encode_file_path() (in module pygame)": [[44, "pygame.encode_file_path", false]], "encode_string() (in module pygame)": [[44, "pygame.encode_string", false]], "epsilon (pygame.math.vector2 attribute)": [[36, "pygame.math.Vector2.epsilon", false]], "epsilon (pygame.math.vector3 attribute)": [[36, "pygame.math.Vector3.epsilon", false]], "erase() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.erase", false]], "error": [[44, "pygame.error", false]], "event (class in pygame.event)": [[25, "pygame.event.Event", false]], "event_name() (in module pygame.event)": [[25, "pygame.event.event_name", false]], "eventlist.main() (in module pygame.examples)": [[26, "pygame.examples.eventlist.main", false]], "extract() (pygame.pixelarray method)": [[42, "pygame.PixelArray.extract", false]], "fadeout() (in module pygame.mixer)": [[38, "pygame.mixer.fadeout", false]], "fadeout() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.fadeout", false]], "fadeout() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.fadeout", false]], "fadeout() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.fadeout", false]], "fgcolor (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.fgcolor", false]], "fill() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.fill", false]], "fill() (pygame.surface method)": [[51, "pygame.Surface.fill", false]], "fill_rect() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.fill_rect", false]], "filled_circle() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.filled_circle", false]], "filled_ellipse() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.filled_ellipse", false]], "filled_polygon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.filled_polygon", false]], "filled_trigon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.filled_trigon", false]], "find_channel() (in module pygame.mixer)": [[38, "pygame.mixer.find_channel", false]], "fit() (pygame.rect method)": [[45, "pygame.Rect.fit", false]], "fixed_sizes (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.fixed_sizes", false]], "fixed_width (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.fixed_width", false]], "flip() (in module pygame.display)": [[23, "pygame.display.flip", false]], "flip() (in module pygame.transform)": [[56, "pygame.transform.flip", false]], "flip_x (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.flip_x", false]], "flip_y (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.flip_y", false]], "focus() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.focus", false]], "font (class in pygame.font)": [[28, "pygame.font.Font", false]], "font (class in pygame.freetype)": [[29, "pygame.freetype.Font", false]], "fonty.main() (in module pygame.examples)": [[26, "pygame.examples.fonty.main", false]], "freetype_misc.main() (in module pygame.examples)": [[26, "pygame.examples.freetype_misc.main", false]], "frequency_to_midi() (in module pygame.midi)": [[37, "pygame.midi.frequency_to_midi", false]], "from_display_module() (pygame._sdl2.video.window class method)": [[48, "pygame._sdl2.video.Window.from_display_module", false]], "from_joystick() (pygame._sdl2.controller.controller static method)": [[47, "pygame._sdl2.controller.Controller.from_joystick", false]], "from_polar() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.from_polar", false]], "from_spherical() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.from_spherical", false]], "from_surface() (in module pygame.mask)": [[35, "pygame.mask.from_surface", false]], "from_surface() (pygame._sdl2.video.texture static method)": [[48, "pygame._sdl2.video.Texture.from_surface", false]], "from_threshold() (in module pygame.mask)": [[35, "pygame.mask.from_threshold", false]], "from_window() (pygame._sdl2.video.renderer class method)": [[48, "pygame._sdl2.video.Renderer.from_window", false]], "from_window() (pygame._sdl2.video.window class method)": [[48, "pygame._sdl2.video.Window.from_window", false]], "frombuffer() (in module pygame.image)": [[31, "pygame.image.frombuffer", false]], "frombytes() (in module pygame.image)": [[31, "pygame.image.frombytes", false]], "fromstring() (in module pygame.image)": [[31, "pygame.image.fromstring", false]], "g (pygame.color attribute)": [[20, "pygame.Color.g", false]], "get() (in module pygame.event)": [[25, "pygame.event.get", false]], "get() (in module pygame.fastevent)": [[27, "pygame.fastevent.get", false]], "get() (in module pygame.scrap)": [[46, "pygame.scrap.get", false]], "get_abs_offset() (pygame.surface method)": [[51, "pygame.Surface.get_abs_offset", false]], "get_abs_parent() (pygame.surface method)": [[51, "pygame.Surface.get_abs_parent", false]], "get_active() (in module pygame.display)": [[23, "pygame.display.get_active", false]], "get_all() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_all", false]], "get_allow_screensaver() (in module pygame.display)": [[23, "pygame.display.get_allow_screensaver", false]], "get_alpha() (pygame.surface method)": [[51, "pygame.Surface.get_alpha", false]], "get_arraytype() (in module pygame.sndarray)": [[49, "pygame.sndarray.get_arraytype", false]], "get_arraytype() (in module pygame.surfarray)": [[52, "pygame.surfarray.get_arraytype", false]], "get_arraytypes() (in module pygame.sndarray)": [[49, "pygame.sndarray.get_arraytypes", false]], "get_arraytypes() (in module pygame.surfarray)": [[52, "pygame.surfarray.get_arraytypes", false]], "get_ascent() (pygame.font.font method)": [[28, "pygame.font.Font.get_ascent", false]], "get_at() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.get_at", false]], "get_at() (pygame.surface method)": [[51, "pygame.Surface.get_at", false]], "get_at_mapped() (pygame.surface method)": [[51, "pygame.Surface.get_at_mapped", false]], "get_axis() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.get_axis", false]], "get_axis() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_axis", false]], "get_backends() (in module pygame.camera)": [[18, "pygame.camera.get_backends", false]], "get_ball() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_ball", false]], "get_bitsize() (pygame.surface method)": [[51, "pygame.Surface.get_bitsize", false]], "get_blocked() (in module pygame.event)": [[25, "pygame.event.get_blocked", false]], "get_bold() (pygame.font.font method)": [[28, "pygame.font.Font.get_bold", false]], "get_bottom_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_bottom_layer", false]], "get_bounding_rect() (pygame.surface method)": [[51, "pygame.Surface.get_bounding_rect", false]], "get_bounding_rects() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.get_bounding_rects", false]], "get_buffer() (pygame.surface method)": [[51, "pygame.Surface.get_buffer", false]], "get_busy() (in module pygame.mixer)": [[38, "pygame.mixer.get_busy", false]], "get_busy() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.get_busy", false]], "get_busy() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_busy", false]], "get_busy() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.get_busy", false]], "get_button() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.get_button", false]], "get_button() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_button", false]], "get_bytesize() (pygame.surface method)": [[51, "pygame.Surface.get_bytesize", false]], "get_cache_size() (in module pygame.freetype)": [[29, "pygame.freetype.get_cache_size", false]], "get_caption() (in module pygame.display)": [[23, "pygame.display.get_caption", false]], "get_clip() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.get_clip", false]], "get_clip() (pygame.surface method)": [[51, "pygame.Surface.get_clip", false]], "get_colorkey() (pygame.surface method)": [[51, "pygame.Surface.get_colorkey", false]], "get_controls() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.get_controls", false]], "get_count() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.get_count", false]], "get_count() (in module pygame.cdrom)": [[19, "pygame.cdrom.get_count", false]], "get_count() (in module pygame.joystick)": [[32, "pygame.joystick.get_count", false]], "get_count() (in module pygame.midi)": [[37, "pygame.midi.get_count", false]], "get_current() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_current", false]], "get_cursor() (in module pygame.mouse)": [[39, "pygame.mouse.get_cursor", false]], "get_default_font() (in module pygame.font)": [[28, "pygame.font.get_default_font", false]], "get_default_font() (in module pygame.freetype)": [[29, "pygame.freetype.get_default_font", false]], "get_default_input_id() (in module pygame.midi)": [[37, "pygame.midi.get_default_input_id", false]], "get_default_output_id() (in module pygame.midi)": [[37, "pygame.midi.get_default_output_id", false]], "get_default_resolution() (in module pygame.freetype)": [[29, "pygame.freetype.get_default_resolution", false]], "get_descent() (pygame.font.font method)": [[28, "pygame.font.Font.get_descent", false]], "get_desktop_sizes() (in module pygame.display)": [[23, "pygame.display.get_desktop_sizes", false]], "get_device() (in module pygame._sdl2.touch)": [[55, "pygame._sdl2.touch.get_device", false]], "get_device_info() (in module pygame.midi)": [[37, "pygame.midi.get_device_info", false]], "get_driver() (in module pygame.display)": [[23, "pygame.display.get_driver", false]], "get_empty() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_empty", false]], "get_endevent() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.get_endevent", false]], "get_endevent() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.get_endevent", false]], "get_error() (in module pygame)": [[44, "pygame.get_error", false]], "get_error() (in module pygame.freetype)": [[29, "pygame.freetype.get_error", false]], "get_eventstate() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.get_eventstate", false]], "get_extended() (in module pygame.image)": [[31, "pygame.image.get_extended", false]], "get_finger() (in module pygame._sdl2.touch)": [[55, "pygame._sdl2.touch.get_finger", false]], "get_flags() (pygame.surface method)": [[51, "pygame.Surface.get_flags", false]], "get_focused() (in module pygame.key)": [[33, "pygame.key.get_focused", false]], "get_focused() (in module pygame.mouse)": [[39, "pygame.mouse.get_focused", false]], "get_fonts() (in module pygame.font)": [[28, "pygame.font.get_fonts", false]], "get_fps() (pygame.time.clock method)": [[54, "pygame.time.Clock.get_fps", false]], "get_grab() (in module pygame.event)": [[25, "pygame.event.get_grab", false]], "get_guid() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_guid", false]], "get_hardware() (pygame.overlay method)": [[41, "pygame.Overlay.get_hardware", false]], "get_hat() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_hat", false]], "get_height() (pygame.font.font method)": [[28, "pygame.font.Font.get_height", false]], "get_height() (pygame.surface method)": [[51, "pygame.Surface.get_height", false]], "get_id() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_id", false]], "get_id() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_id", false]], "get_image() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.get_image", false]], "get_init() (in module pygame)": [[44, "pygame.get_init", false]], "get_init() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.get_init", false]], "get_init() (in module pygame.cdrom)": [[19, "pygame.cdrom.get_init", false]], "get_init() (in module pygame.display)": [[23, "pygame.display.get_init", false]], "get_init() (in module pygame.fastevent)": [[27, "pygame.fastevent.get_init", false]], "get_init() (in module pygame.font)": [[28, "pygame.font.get_init", false]], "get_init() (in module pygame.freetype)": [[29, "pygame.freetype.get_init", false]], "get_init() (in module pygame.joystick)": [[32, "pygame.joystick.get_init", false]], "get_init() (in module pygame.midi)": [[37, "pygame.midi.get_init", false]], "get_init() (in module pygame.mixer)": [[38, "pygame.mixer.get_init", false]], "get_init() (in module pygame.scrap)": [[46, "pygame.scrap.get_init", false]], "get_init() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.get_init", false]], "get_init() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_init", false]], "get_init() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_init", false]], "get_instance_id() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_instance_id", false]], "get_italic() (pygame.font.font method)": [[28, "pygame.font.Font.get_italic", false]], "get_keyboard_grab() (in module pygame.event)": [[25, "pygame.event.get_keyboard_grab", false]], "get_layer_of_sprite() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_layer_of_sprite", false]], "get_length() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.get_length", false]], "get_linesize() (pygame.font.font method)": [[28, "pygame.font.Font.get_linesize", false]], "get_locked() (pygame.surface method)": [[51, "pygame.Surface.get_locked", false]], "get_locks() (pygame.surface method)": [[51, "pygame.Surface.get_locks", false]], "get_losses() (pygame.surface method)": [[51, "pygame.Surface.get_losses", false]], "get_mapping() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.get_mapping", false]], "get_masks() (pygame.surface method)": [[51, "pygame.Surface.get_masks", false]], "get_metrics() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_metrics", false]], "get_mods() (in module pygame.key)": [[33, "pygame.key.get_mods", false]], "get_name() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_name", false]], "get_name() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_name", false]], "get_num_channels() (in module pygame.mixer)": [[38, "pygame.mixer.get_num_channels", false]], "get_num_channels() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.get_num_channels", false]], "get_num_devices() (in module pygame._sdl2.touch)": [[55, "pygame._sdl2.touch.get_num_devices", false]], "get_num_displays() (in module pygame.display)": [[23, "pygame.display.get_num_displays", false]], "get_num_fingers() (in module pygame._sdl2.touch)": [[55, "pygame._sdl2.touch.get_num_fingers", false]], "get_numaxes() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_numaxes", false]], "get_numballs() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_numballs", false]], "get_numbuttons() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_numbuttons", false]], "get_numhats() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_numhats", false]], "get_numtracks() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_numtracks", false]], "get_offset() (pygame.surface method)": [[51, "pygame.Surface.get_offset", false]], "get_palette() (pygame.surface method)": [[51, "pygame.Surface.get_palette", false]], "get_palette_at() (pygame.surface method)": [[51, "pygame.Surface.get_palette_at", false]], "get_parent() (pygame.surface method)": [[51, "pygame.Surface.get_parent", false]], "get_paused() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_paused", false]], "get_pitch() (pygame.surface method)": [[51, "pygame.Surface.get_pitch", false]], "get_pos() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.get_pos", false]], "get_pos() (in module pygame.mouse)": [[39, "pygame.mouse.get_pos", false]], "get_power_level() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.get_power_level", false]], "get_pressed() (in module pygame.key)": [[33, "pygame.key.get_pressed", false]], "get_pressed() (in module pygame.mouse)": [[39, "pygame.mouse.get_pressed", false]], "get_queue() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.get_queue", false]], "get_raw() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.get_raw", false]], "get_raw() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.get_raw", false]], "get_rawtime() (pygame.time.clock method)": [[54, "pygame.time.Clock.get_rawtime", false]], "get_rect() (pygame._sdl2.video.image method)": [[48, "pygame._sdl2.video.Image.get_rect", false]], "get_rect() (pygame._sdl2.video.texture method)": [[48, "pygame._sdl2.video.Texture.get_rect", false]], "get_rect() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_rect", false]], "get_rect() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.get_rect", false]], "get_rect() (pygame.surface method)": [[51, "pygame.Surface.get_rect", false]], "get_rel() (in module pygame.mouse)": [[39, "pygame.mouse.get_rel", false]], "get_repeat() (in module pygame.key)": [[33, "pygame.key.get_repeat", false]], "get_sdl_byteorder() (in module pygame)": [[44, "pygame.get_sdl_byteorder", false]], "get_sdl_image_version() (in module pygame.image)": [[31, "pygame.image.get_sdl_image_version", false]], "get_sdl_mixer_version() (in module pygame.mixer)": [[38, "pygame.mixer.get_sdl_mixer_version", false]], "get_sdl_ttf_version() (in module pygame.font)": [[28, "pygame.font.get_sdl_ttf_version", false]], "get_sdl_version() (in module pygame)": [[44, "pygame.get_sdl_version", false]], "get_shifts() (pygame.surface method)": [[51, "pygame.Surface.get_shifts", false]], "get_size() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.get_size", false]], "get_size() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.get_size", false]], "get_size() (pygame.surface method)": [[51, "pygame.Surface.get_size", false]], "get_sized_ascender() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_sized_ascender", false]], "get_sized_descender() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_sized_descender", false]], "get_sized_glyph_height() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_sized_glyph_height", false]], "get_sized_height() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_sized_height", false]], "get_sizes() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.get_sizes", false]], "get_smoothscale_backend() (in module pygame.transform)": [[56, "pygame.transform.get_smoothscale_backend", false]], "get_sound() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.get_sound", false]], "get_sprite() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_sprite", false]], "get_sprites_at() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_sprites_at", false]], "get_sprites_from_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_sprites_from_layer", false]], "get_strikethrough() (pygame.font.font method)": [[28, "pygame.font.Font.get_strikethrough", false]], "get_surface() (in module pygame.display)": [[23, "pygame.display.get_surface", false]], "get_ticks() (in module pygame.time)": [[54, "pygame.time.get_ticks", false]], "get_time() (pygame.time.clock method)": [[54, "pygame.time.Clock.get_time", false]], "get_top_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_top_layer", false]], "get_top_sprite() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.get_top_sprite", false]], "get_track_audio() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_track_audio", false]], "get_track_length() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_track_length", false]], "get_track_start() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.get_track_start", false]], "get_types() (in module pygame.scrap)": [[46, "pygame.scrap.get_types", false]], "get_underline() (pygame.font.font method)": [[28, "pygame.font.Font.get_underline", false]], "get_version() (in module pygame.freetype)": [[29, "pygame.freetype.get_version", false]], "get_view() (pygame.surface method)": [[51, "pygame.Surface.get_view", false]], "get_viewport() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.get_viewport", false]], "get_visible() (in module pygame.mouse)": [[39, "pygame.mouse.get_visible", false]], "get_volume() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.get_volume", false]], "get_volume() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.get_volume", false]], "get_volume() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.get_volume", false]], "get_width() (pygame.surface method)": [[51, "pygame.Surface.get_width", false]], "get_window_size() (in module pygame.display)": [[23, "pygame.display.get_window_size", false]], "get_wm_info() (in module pygame.display)": [[23, "pygame.display.get_wm_info", false]], "gl_get_attribute() (in module pygame.display)": [[23, "pygame.display.gl_get_attribute", false]], "gl_set_attribute() (in module pygame.display)": [[23, "pygame.display.gl_set_attribute", false]], "glcube.main() (in module pygame.examples)": [[26, "pygame.examples.glcube.main", false]], "grab (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.grab", false]], "grayscale() (in module pygame.transform)": [[56, "pygame.transform.grayscale", false]], "grayscale() (pygame.color method)": [[20, "pygame.Color.grayscale", false]], "group (class in pygame.sprite)": [[50, "pygame.sprite.Group", false]], "groupcollide() (in module pygame.sprite)": [[50, "pygame.sprite.groupcollide", false]], "groups() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.groups", false]], "groupsingle() (in module pygame.sprite)": [[50, "pygame.sprite.GroupSingle", false]], "has() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.has", false]], "headless_no_windows_needed.main() (in module pygame.examples)": [[26, "pygame.examples.headless_no_windows_needed.main", false]], "height (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.height", false]], "height (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.height", false]], "hide() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.hide", false]], "hline() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.hline", false]], "hsla (pygame.color attribute)": [[20, "pygame.Color.hsla", false]], "hsva (pygame.color attribute)": [[20, "pygame.Color.hsva", false]], "i1i2i3 (pygame.color attribute)": [[20, "pygame.Color.i1i2i3", false]], "iconify() (in module pygame.display)": [[23, "pygame.display.iconify", false]], "id (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.id", false]], "image (class in pygame._sdl2.video)": [[48, "pygame._sdl2.video.Image", false]], "import_pygame_base (c function)": [[1, "c.import_pygame_base", false]], "inflate() (pygame.rect method)": [[45, "pygame.Rect.inflate", false]], "inflate_ip() (pygame.rect method)": [[45, "pygame.Rect.inflate_ip", false]], "info() (in module pygame.display)": [[23, "pygame.display.Info", false]], "init() (in module pygame)": [[44, "pygame.init", false]], "init() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.init", false]], "init() (in module pygame.camera)": [[18, "pygame.camera.init", false]], "init() (in module pygame.cdrom)": [[19, "pygame.cdrom.init", false]], "init() (in module pygame.display)": [[23, "pygame.display.init", false]], "init() (in module pygame.fastevent)": [[27, "pygame.fastevent.init", false]], "init() (in module pygame.font)": [[28, "pygame.font.init", false]], "init() (in module pygame.freetype)": [[29, "pygame.freetype.init", false]], "init() (in module pygame.joystick)": [[32, "pygame.joystick.init", false]], "init() (in module pygame.midi)": [[37, "pygame.midi.init", false]], "init() (in module pygame.mixer)": [[38, "pygame.mixer.init", false]], "init() (in module pygame.scrap)": [[46, "pygame.scrap.init", false]], "init() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.init", false]], "init() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.init", false]], "input (class in pygame.midi)": [[37, "pygame.midi.Input", false]], "invert() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.invert", false]], "is_controller() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.is_controller", false]], "is_normalized() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.is_normalized", false]], "is_normalized() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.is_normalized", false]], "italic (pygame.font.font attribute)": [[28, "pygame.font.Font.italic", false]], "itemsize (pygame.pixelarray attribute)": [[42, "pygame.PixelArray.itemsize", false]], "joystick (class in pygame.joystick)": [[32, "pygame.joystick.Joystick", false]], "joystick.main() (in module pygame.examples)": [[26, "pygame.examples.joystick.main", false]], "kerning (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.kerning", false]], "key_code() (in module pygame.key)": [[33, "pygame.key.key_code", false]], "kill() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.kill", false]], "laplacian() (in module pygame.transform)": [[56, "pygame.transform.laplacian", false]], "layereddirty (class in pygame.sprite)": [[50, "pygame.sprite.LayeredDirty", false]], "layeredupdates (class in pygame.sprite)": [[50, "pygame.sprite.LayeredUpdates", false]], "layers() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.layers", false]], "length (pygame.bufferproxy attribute)": [[17, "pygame.BufferProxy.length", false]], "length() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.length", false]], "length() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.length", false]], "length_squared() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.length_squared", false]], "length_squared() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.length_squared", false]], "lerp() (in module pygame.math)": [[36, "pygame.math.lerp", false]], "lerp() (pygame.color method)": [[20, "pygame.Color.lerp", false]], "lerp() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.lerp", false]], "lerp() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.lerp", false]], "line() (in module pygame.draw)": [[24, "pygame.draw.line", false]], "line() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.line", false]], "lines() (in module pygame.draw)": [[24, "pygame.draw.lines", false]], "liquid.main() (in module pygame.examples)": [[26, "pygame.examples.liquid.main", false]], "list_cameras() (in module pygame.camera)": [[18, "pygame.camera.list_cameras", false]], "list_modes() (in module pygame.display)": [[23, "pygame.display.list_modes", false]], "load() (in module pygame.image)": [[31, "pygame.image.load", false]], "load() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.load", false]], "load_basic() (in module pygame.image)": [[31, "pygame.image.load_basic", false]], "load_extended() (in module pygame.image)": [[31, "pygame.image.load_extended", false]], "load_xbm() (in module pygame.cursors)": [[22, "pygame.cursors.load_xbm", false]], "lock() (pygame.surface method)": [[51, "pygame.Surface.lock", false]], "logical_size (pygame._sdl2.video.renderer attribute)": [[48, "pygame._sdl2.video.Renderer.logical_size", false]], "lost() (in module pygame.scrap)": [[46, "pygame.scrap.lost", false]], "magnitude() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.magnitude", false]], "magnitude() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.magnitude", false]], "magnitude_squared() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.magnitude_squared", false]], "magnitude_squared() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.magnitude_squared", false]], "make_sound() (in module pygame.sndarray)": [[49, "pygame.sndarray.make_sound", false]], "make_surface() (in module pygame.pixelcopy)": [[43, "pygame.pixelcopy.make_surface", false]], "make_surface() (in module pygame.surfarray)": [[52, "pygame.surfarray.make_surface", false]], "make_surface() (pygame.pixelarray method)": [[42, "pygame.PixelArray.make_surface", false]], "map_array() (in module pygame.pixelcopy)": [[43, "pygame.pixelcopy.map_array", false]], "map_array() (in module pygame.surfarray)": [[52, "pygame.surfarray.map_array", false]], "map_rgb() (pygame.surface method)": [[51, "pygame.Surface.map_rgb", false]], "mask (class in pygame.mask)": [[35, "pygame.mask.Mask", false]], "mask.main() (in module pygame.examples)": [[26, "pygame.examples.mask.main", false]], "match_font() (in module pygame.font)": [[28, "pygame.font.match_font", false]], "maximize() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.maximize", false]], "metrics() (pygame.font.font method)": [[28, "pygame.font.Font.metrics", false]], "midi.main() (in module pygame.examples)": [[26, "pygame.examples.midi.main", false]], "midi_to_ansi_note() (in module pygame.midi)": [[37, "pygame.midi.midi_to_ansi_note", false]], "midi_to_frequency() (in module pygame.midi)": [[37, "pygame.midi.midi_to_frequency", false]], "midiexception": [[37, "pygame.midi.MidiException", false]], "midis2events() (in module pygame.midi)": [[37, "pygame.midi.midis2events", false]], "minimize() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.minimize", false]], "mode_ok() (in module pygame.display)": [[23, "pygame.display.mode_ok", false]], "module": [[18, "module-pygame.camera", false], [19, "module-pygame.cdrom", false], [22, "module-pygame.cursors", false], [23, "module-pygame.display", false], [24, "module-pygame.draw", false], [25, "module-pygame.event", false], [26, "module-pygame.examples", false], [27, "module-pygame.fastevent", false], [28, "module-pygame.font", false], [29, "module-pygame.freetype", false], [30, "module-pygame.gfxdraw", false], [31, "module-pygame.image", false], [32, "module-pygame.joystick", false], [33, "module-pygame.key", false], [34, "module-pygame.locals", false], [35, "module-pygame.mask", false], [36, "module-pygame.math", false], [37, "module-pygame.midi", false], [38, "module-pygame.mixer", false], [39, "module-pygame.mouse", false], [40, "module-pygame.mixer.music", false], [43, "module-pygame.pixelcopy", false], [44, "module-pygame", false], [44, "module-pygame.version", false], [46, "module-pygame.scrap", false], [47, "module-pygame._sdl2.controller", false], [48, "module-pygame._sdl2.video", false], [49, "module-pygame.sndarray", false], [50, "module-pygame.sprite", false], [52, "module-pygame.surfarray", false], [53, "module-pygame.tests", false], [54, "module-pygame.time", false], [55, "module-pygame._sdl2.touch", false], [56, "module-pygame.transform", false]], "move() (pygame.rect method)": [[45, "pygame.Rect.move", false]], "move_ip() (pygame.rect method)": [[45, "pygame.Rect.move_ip", false]], "move_to_back() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.move_to_back", false]], "move_to_front() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.move_to_front", false]], "move_towards() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.move_towards", false]], "move_towards() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.move_towards", false]], "move_towards_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.move_towards_ip", false]], "move_towards_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.move_towards_ip", false]], "moveit.main() (in module pygame.examples)": [[26, "pygame.examples.moveit.main", false]], "mustlock() (pygame.surface method)": [[51, "pygame.Surface.mustlock", false]], "name (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.name", false]], "name() (in module pygame.key)": [[33, "pygame.key.name", false]], "name_forindex() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.name_forindex", false]], "ndim (pygame.pixelarray attribute)": [[42, "pygame.PixelArray.ndim", false]], "normalize() (pygame.color method)": [[20, "pygame.Color.normalize", false]], "normalize() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.normalize", false]], "normalize() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.normalize", false]], "normalize() (pygame.rect method)": [[45, "pygame.Rect.normalize", false]], "normalize_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.normalize_ip", false]], "normalize_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.normalize_ip", false]], "note_off() (pygame.midi.output method)": [[37, "pygame.midi.Output.note_off", false]], "note_on() (pygame.midi.output method)": [[37, "pygame.midi.Output.note_on", false]], "oblique (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.oblique", false]], "opacity (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.opacity", false]], "orderedupdates() (in module pygame.sprite)": [[50, "pygame.sprite.OrderedUpdates", false]], "origin (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.origin", false]], "origin (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.origin", false]], "outline() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.outline", false]], "output (class in pygame.midi)": [[37, "pygame.midi.Output", false]], "overlap() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.overlap", false]], "overlap_area() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.overlap_area", false]], "overlap_mask() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.overlap_mask", false]], "overlay (class in pygame)": [[41, "pygame.Overlay", false]], "pad (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.pad", false]], "parent (pygame.bufferproxy attribute)": [[17, "pygame.BufferProxy.parent", false]], "path (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.path", false]], "pause() (in module pygame.mixer)": [[38, "pygame.mixer.pause", false]], "pause() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.pause", false]], "pause() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.pause", false]], "pause() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.pause", false]], "peek() (in module pygame.event)": [[25, "pygame.event.peek", false]], "pg_buffer (c type)": [[1, "c.pg_buffer", false]], "pg_buffer.consumer (c member)": [[1, "c.pg_buffer.consumer", false]], "pg_buffer.release_buffer (c member)": [[1, "c.pg_buffer.release_buffer", false]], "pg_buffer.view (c member)": [[1, "c.pg_buffer.view", false]], "pg_encodefilepath (c function)": [[9, "c.pg_EncodeFilePath", false]], "pg_encodestring (c function)": [[9, "c.pg_EncodeString", false]], "pg_floatfromobj (c function)": [[1, "c.pg_FloatFromObj", false]], "pg_floatfromobjindex (c function)": [[1, "c.pg_FloatFromObjIndex", false]], "pg_getdefaultwindow (c function)": [[1, "c.pg_GetDefaultWindow", false]], "pg_getdefaultwindowsurface (c function)": [[1, "c.pg_GetDefaultWindowSurface", false]], "pg_intfromobj (c function)": [[1, "c.pg_IntFromObj", false]], "pg_intfromobjindex (c function)": [[1, "c.pg_IntFromObjIndex", false]], "pg_major_version (c macro)": [[13, "c.PG_MAJOR_VERSION", false]], "pg_minor_version (c macro)": [[13, "c.PG_MINOR_VERSION", false]], "pg_mod_autoinit (c function)": [[1, "c.pg_mod_autoinit", false]], "pg_mod_autoquit (c function)": [[1, "c.pg_mod_autoquit", false]], "pg_patch_version (c macro)": [[13, "c.PG_PATCH_VERSION", false]], "pg_registerquit (c function)": [[1, "c.pg_RegisterQuit", false]], "pg_rgbafromobj (c function)": [[1, "c.pg_RGBAFromObj", false]], "pg_setdefaultwindow (c function)": [[1, "c.pg_SetDefaultWindow", false]], "pg_setdefaultwindowsurface (c function)": [[1, "c.pg_SetDefaultWindowSurface", false]], "pg_twofloatsfromobj (c function)": [[1, "c.pg_TwoFloatsFromObj", false]], "pg_twointsfromobj (c function)": [[1, "c.pg_TwoIntsFromObj", false]], "pg_uintfromobj (c function)": [[1, "c.pg_UintFromObj", false]], "pg_uintfromobjindex (c function)": [[1, "c.pg_UintFromObjIndex", false]], "pg_version_atleast (c macro)": [[13, "c.PG_VERSION_ATLEAST", false]], "pg_versionnum (c macro)": [[13, "c.PG_VERSIONNUM", false]], "pgbuffer_asarrayinterface (c function)": [[1, "c.pgBuffer_AsArrayInterface", false]], "pgbuffer_asarraystruct (c function)": [[1, "c.pgBuffer_AsArrayStruct", false]], "pgbuffer_release (c function)": [[1, "c.pgBuffer_Release", false]], "pgbufproxy_check (c function)": [[2, "c.pgBufproxy_Check", false]], "pgbufproxy_getparent (c function)": [[2, "c.pgBufproxy_GetParent", false]], "pgbufproxy_new (c function)": [[2, "c.pgBufproxy_New", false]], "pgbufproxy_trip (c function)": [[2, "c.pgBufproxy_Trip", false]], "pgbufproxy_type (c var)": [[2, "c.pgBufproxy_Type", false]], "pgchannel_asint (c function)": [[7, "c.pgChannel_AsInt", false]], "pgchannel_check (c function)": [[7, "c.pgChannel_Check", false]], "pgchannel_new (c function)": [[7, "c.pgChannel_New", false]], "pgchannel_type (c var)": [[7, "c.pgChannel_Type", false]], "pgchannelobject (c type)": [[7, "c.pgChannelObject", false]], "pgcolor_check (c function)": [[3, "c.pgColor_Check", false]], "pgcolor_new (c function)": [[3, "c.pgColor_New", false]], "pgcolor_newlength (c function)": [[3, "c.pgColor_NewLength", false]], "pgcolor_type (c var)": [[3, "c.pgColor_Type", false]], "pgdict_asbuffer (c function)": [[1, "c.pgDict_AsBuffer", false]], "pgevent_check (c function)": [[5, "c.pgEvent_Check", false]], "pgevent_filluserevent (c function)": [[5, "c.pgEvent_FillUserEvent", false]], "pgevent_new (c function)": [[5, "c.pgEvent_New", false]], "pgevent_new2 (c function)": [[5, "c.pgEvent_New2", false]], "pgevent_type (c type)": [[5, "c.pgEvent_Type", false]], "pgeventobject (c type)": [[5, "c.pgEventObject", false]], "pgeventobject.type (c member)": [[5, "c.pgEventObject.type", false]], "pgexc_buffererror (c var)": [[1, "c.pgExc_BufferError", false]], "pgexc_sdlerror (c var)": [[1, "c.pgExc_SDLError", false]], "pgfont_check (c function)": [[6, "c.pgFont_Check", false]], "pgfont_is_alive (c function)": [[6, "c.pgFont_IS_ALIVE", false]], "pgfont_new (c function)": [[6, "c.pgFont_New", false]], "pgfont_type (c type)": [[6, "c.pgFont_Type", false]], "pgfontobject (c type)": [[6, "c.pgFontObject", false]], "pglifetimelock_check (c function)": [[12, "c.pgLifetimeLock_Check", false]], "pglifetimelock_type (c var)": [[12, "c.pgLifetimeLock_Type", false]], "pglifetimelockobject (c type)": [[12, "c.pgLifetimeLockObject", false]], "pglifetimelockobject.lockobj (c member)": [[12, "c.pgLifetimeLockObject.lockobj", false]], "pglifetimelockobject.surface (c member)": [[12, "c.pgLifetimeLockObject.surface", false]], "pgobject_getbuffer (c function)": [[1, "c.pgObject_GetBuffer", false]], "pgrect_asrect (c function)": [[8, "c.pgRect_AsRect", false]], "pgrect_check (c function)": [[8, "c.pgRect_Check", false]], "pgrect_fromobject (c function)": [[8, "c.pgRect_FromObject", false]], "pgrect_new (c function)": [[8, "c.pgRect_New", false]], "pgrect_new4 (c function)": [[8, "c.pgRect_New4", false]], "pgrect_normalize (c function)": [[8, "c.pgRect_Normalize", false]], "pgrect_type (c var)": [[8, "c.pgRect_Type", false]], "pgrectobject (c type)": [[8, "c.pgRectObject", false]], "pgrectobject.r (c member)": [[8, "c.pgRectObject.r", false]], "pgrwops_fromfileobject (c function)": [[9, "c.pgRWops_FromFileObject", false]], "pgrwops_fromobject (c function)": [[9, "c.pgRWops_FromObject", false]], "pgrwops_isfileobject (c function)": [[9, "c.pgRWops_IsFileObject", false]], "pgrwops_releaseobject (c function)": [[9, "c.pgRWops_ReleaseObject", false]], "pgsound_aschunk (c function)": [[7, "c.pgSound_AsChunk", false]], "pgsound_check (c function)": [[7, "c.pgSound_Check", false]], "pgsound_new (c function)": [[7, "c.pgSound_New", false]], "pgsound_type (c var)": [[7, "c.pgSound_Type", false]], "pgsoundobject (c type)": [[7, "c.pgSoundObject", false]], "pgsurface_assurface (c function)": [[11, "c.pgSurface_AsSurface", false]], "pgsurface_blit (c function)": [[11, "c.pgSurface_Blit", false]], "pgsurface_check (c function)": [[11, "c.pgSurface_Check", false]], "pgsurface_lock (c function)": [[12, "c.pgSurface_Lock", false]], "pgsurface_lockby (c function)": [[12, "c.pgSurface_LockBy", false]], "pgsurface_locklifetime (c function)": [[12, "c.pgSurface_LockLifetime", false]], "pgsurface_new (c function)": [[11, "c.pgSurface_New", false]], "pgsurface_new2 (c function)": [[11, "c.pgSurface_New2", false]], "pgsurface_prep (c function)": [[12, "c.pgSurface_Prep", false]], "pgsurface_type (c var)": [[11, "c.pgSurface_Type", false]], "pgsurface_unlock (c function)": [[12, "c.pgSurface_UnLock", false]], "pgsurface_unlockby (c function)": [[12, "c.pgSurface_UnLockBy", false]], "pgsurface_unprep (c function)": [[12, "c.pgSurface_Unprep", false]], "pgsurfaceobject (c type)": [[11, "c.pgSurfaceObject", false]], "pgvidinfo_asvidinfo (c function)": [[4, "c.pgVidInfo_AsVidInfo", false]], "pgvidinfo_check (c function)": [[4, "c.pgVidInfo_Check", false]], "pgvidinfo_new (c function)": [[4, "c.pgVidInfo_New", false]], "pgvidinfo_type (c var)": [[4, "c.pgVidInfo_Type", false]], "pgvidinfoobject (c type)": [[4, "c.pgVidInfoObject", false]], "pie() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.pie", false]], "pitch_bend() (pygame.midi.output method)": [[37, "pygame.midi.Output.pitch_bend", false]], "pixel() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.pixel", false]], "pixelarray (class in pygame)": [[42, "pygame.PixelArray", false]], "pixelarray.main() (in module pygame.examples)": [[26, "pygame.examples.pixelarray.main", false]], "pixels2d() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels2d", false]], "pixels3d() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels3d", false]], "pixels_alpha() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels_alpha", false]], "pixels_blue() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels_blue", false]], "pixels_green() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels_green", false]], "pixels_red() (in module pygame.surfarray)": [[52, "pygame.surfarray.pixels_red", false]], "play() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.play", false]], "play() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.play", false]], "play() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.play", false]], "play() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.play", false]], "playmus.main() (in module pygame.examples)": [[26, "pygame.examples.playmus.main", false]], "poll() (in module pygame.event)": [[25, "pygame.event.poll", false]], "poll() (in module pygame.fastevent)": [[27, "pygame.fastevent.poll", false]], "poll() (pygame.midi.input method)": [[37, "pygame.midi.Input.poll", false]], "polygon() (in module pygame.draw)": [[24, "pygame.draw.polygon", false]], "polygon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.polygon", false]], "position (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.position", false]], "post() (in module pygame.event)": [[25, "pygame.event.post", false]], "post() (in module pygame.fastevent)": [[27, "pygame.fastevent.post", false]], "pre_init() (in module pygame.mixer)": [[38, "pygame.mixer.pre_init", false]], "premul_alpha() (pygame.color method)": [[20, "pygame.Color.premul_alpha", false]], "premul_alpha() (pygame.surface method)": [[51, "pygame.Surface.premul_alpha", false]], "present() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.present", false]], "project() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.project", false]], "project() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.project", false]], "pump() (in module pygame.event)": [[25, "pygame.event.pump", false]], "pump() (in module pygame.fastevent)": [[27, "pygame.fastevent.pump", false]], "put() (in module pygame.scrap)": [[46, "pygame.scrap.put", false]], "pygame": [[44, "module-pygame", false]], "pygame._sdl2.controller": [[47, "module-pygame._sdl2.controller", false]], "pygame._sdl2.touch": [[55, "module-pygame._sdl2.touch", false]], "pygame._sdl2.video": [[48, "module-pygame._sdl2.video", false]], "pygame.camera": [[18, "module-pygame.camera", false]], "pygame.cdrom": [[19, "module-pygame.cdrom", false]], "pygame.cursors": [[22, "module-pygame.cursors", false]], "pygame.display": [[23, "module-pygame.display", false]], "pygame.draw": [[24, "module-pygame.draw", false]], "pygame.event": [[25, "module-pygame.event", false]], "pygame.examples": [[26, "module-pygame.examples", false]], "pygame.fastevent": [[27, "module-pygame.fastevent", false]], "pygame.font": [[28, "module-pygame.font", false]], "pygame.freetype": [[29, "module-pygame.freetype", false]], "pygame.gfxdraw": [[30, "module-pygame.gfxdraw", false]], "pygame.image": [[31, "module-pygame.image", false]], "pygame.joystick": [[32, "module-pygame.joystick", false]], "pygame.key": [[33, "module-pygame.key", false]], "pygame.locals": [[34, "module-pygame.locals", false]], "pygame.mask": [[35, "module-pygame.mask", false]], "pygame.math": [[36, "module-pygame.math", false]], "pygame.midi": [[37, "module-pygame.midi", false]], "pygame.mixer": [[38, "module-pygame.mixer", false]], "pygame.mixer.music": [[40, "module-pygame.mixer.music", false]], "pygame.mouse": [[39, "module-pygame.mouse", false]], "pygame.pixelcopy": [[43, "module-pygame.pixelcopy", false]], "pygame.scrap": [[46, "module-pygame.scrap", false]], "pygame.sndarray": [[49, "module-pygame.sndarray", false]], "pygame.sprite": [[50, "module-pygame.sprite", false]], "pygame.surfarray": [[52, "module-pygame.surfarray", false]], "pygame.tests": [[53, "module-pygame.tests", false]], "pygame.time": [[54, "module-pygame.time", false]], "pygame.transform": [[56, "module-pygame.transform", false]], "pygame.version": [[44, "module-pygame.version", false]], "query_image() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.query_image", false]], "queue() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.queue", false]], "queue() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.queue", false]], "quit() (in module pygame)": [[44, "pygame.quit", false]], "quit() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.quit", false]], "quit() (in module pygame.cdrom)": [[19, "pygame.cdrom.quit", false]], "quit() (in module pygame.display)": [[23, "pygame.display.quit", false]], "quit() (in module pygame.font)": [[28, "pygame.font.quit", false]], "quit() (in module pygame.freetype)": [[29, "pygame.freetype.quit", false]], "quit() (in module pygame.joystick)": [[32, "pygame.joystick.quit", false]], "quit() (in module pygame.midi)": [[37, "pygame.midi.quit", false]], "quit() (in module pygame.mixer)": [[38, "pygame.mixer.quit", false]], "quit() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.quit", false]], "quit() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.quit", false]], "quit() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.quit", false]], "r (pygame.color attribute)": [[20, "pygame.Color.r", false]], "raw (pygame.bufferproxy attribute)": [[17, "pygame.BufferProxy.raw", false]], "read() (pygame.midi.input method)": [[37, "pygame.midi.Input.read", false]], "rect (class in pygame)": [[45, "pygame.Rect", false]], "rect() (in module pygame.draw)": [[24, "pygame.draw.rect", false]], "rectangle() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.rectangle", false]], "reflect() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.reflect", false]], "reflect() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.reflect", false]], "reflect_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.reflect_ip", false]], "reflect_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.reflect_ip", false]], "register_quit() (in module pygame)": [[44, "pygame.register_quit", false]], "relative_mouse (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.relative_mouse", false]], "remove() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.remove", false]], "remove() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.remove", false]], "remove_sprites_of_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.remove_sprites_of_layer", false]], "render() (pygame.font.font method)": [[28, "pygame.font.Font.render", false]], "render() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.render", false]], "render_raw() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.render_raw", false]], "render_raw_to() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.render_raw_to", false]], "render_to() (pygame.freetype.font method)": [[29, "pygame.freetype.Font.render_to", false]], "renderclear (class in pygame.sprite)": [[50, "pygame.sprite.RenderClear", false]], "renderer (class in pygame._sdl2.video)": [[48, "pygame._sdl2.video.Renderer", false]], "renderer (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.renderer", false]], "renderplain (class in pygame.sprite)": [[50, "pygame.sprite.RenderPlain", false]], "renderupdates (class in pygame.sprite)": [[50, "pygame.sprite.RenderUpdates", false]], "repaint_rect() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.repaint_rect", false]], "replace() (pygame.pixelarray method)": [[42, "pygame.PixelArray.replace", false]], "resizable (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.resizable", false]], "resolution (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.resolution", false]], "restore() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.restore", false]], "resume() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.resume", false]], "rev (in module pygame.version)": [[44, "pygame.version.rev", false]], "rewind() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.rewind", false]], "rotate() (in module pygame.transform)": [[56, "pygame.transform.rotate", false]], "rotate() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.rotate", false]], "rotate() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate", false]], "rotate_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.rotate_ip", false]], "rotate_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_ip", false]], "rotate_ip_rad() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.rotate_ip_rad", false]], "rotate_ip_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_ip_rad", false]], "rotate_rad() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.rotate_rad", false]], "rotate_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_rad", false]], "rotate_rad_ip() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.rotate_rad_ip", false]], "rotate_rad_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_rad_ip", false]], "rotate_x() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_x", false]], "rotate_x_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_x_ip", false]], "rotate_x_ip_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_x_ip_rad", false]], "rotate_x_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_x_rad", false]], "rotate_x_rad_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_x_rad_ip", false]], "rotate_y() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_y", false]], "rotate_y_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_y_ip", false]], "rotate_y_ip_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_y_ip_rad", false]], "rotate_y_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_y_rad", false]], "rotate_y_rad_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_y_rad_ip", false]], "rotate_z() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_z", false]], "rotate_z_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_z_ip", false]], "rotate_z_ip_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_z_ip_rad", false]], "rotate_z_rad() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_z_rad", false]], "rotate_z_rad_ip() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.rotate_z_rad_ip", false]], "rotation (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.rotation", false]], "rotozoom() (in module pygame.transform)": [[56, "pygame.transform.rotozoom", false]], "rumble() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.rumble", false]], "rumble() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.rumble", false]], "run() (in module pygame.tests)": [[53, "pygame.tests.run", false]], "samples() (in module pygame.sndarray)": [[49, "pygame.sndarray.samples", false]], "save() (in module pygame.image)": [[31, "pygame.image.save", false]], "save_extended() (in module pygame.image)": [[31, "pygame.image.save_extended", false]], "scalable (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.scalable", false]], "scale (pygame._sdl2.video.renderer attribute)": [[48, "pygame._sdl2.video.Renderer.scale", false]], "scale() (in module pygame.transform)": [[56, "pygame.transform.scale", false]], "scale() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.scale", false]], "scale2x() (in module pygame.transform)": [[56, "pygame.transform.scale2x", false]], "scale_by() (in module pygame.transform)": [[56, "pygame.transform.scale_by", false]], "scale_by() (pygame.rect method)": [[45, "pygame.Rect.scale_by", false]], "scale_by_ip() (pygame.rect method)": [[45, "pygame.Rect.scale_by_ip", false]], "scale_to_length() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.scale_to_length", false]], "scale_to_length() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.scale_to_length", false]], "scaletest.main() (in module pygame.examples)": [[26, "pygame.examples.scaletest.main", false]], "scrap_clipboard.main() (in module pygame.examples)": [[26, "pygame.examples.scrap_clipboard.main", false]], "scroll() (pygame.surface method)": [[51, "pygame.Surface.scroll", false]], "scroll.main() (in module pygame.examples)": [[26, "pygame.examples.scroll.main", false]], "sdl (in module pygame.version)": [[44, "pygame.version.SDL", false]], "set_allow_screensaver() (in module pygame.display)": [[23, "pygame.display.set_allow_screensaver", false]], "set_allowed() (in module pygame.event)": [[25, "pygame.event.set_allowed", false]], "set_alpha() (pygame.surface method)": [[51, "pygame.Surface.set_alpha", false]], "set_at() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.set_at", false]], "set_at() (pygame.surface method)": [[51, "pygame.Surface.set_at", false]], "set_blocked() (in module pygame.event)": [[25, "pygame.event.set_blocked", false]], "set_bold() (pygame.font.font method)": [[28, "pygame.font.Font.set_bold", false]], "set_caption() (in module pygame.display)": [[23, "pygame.display.set_caption", false]], "set_clip() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.set_clip", false]], "set_clip() (pygame.surface method)": [[51, "pygame.Surface.set_clip", false]], "set_colorkey() (pygame.surface method)": [[51, "pygame.Surface.set_colorkey", false]], "set_controls() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.set_controls", false]], "set_cursor() (in module pygame.mouse)": [[39, "pygame.mouse.set_cursor", false]], "set_default_resolution() (in module pygame.freetype)": [[29, "pygame.freetype.set_default_resolution", false]], "set_endevent() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.set_endevent", false]], "set_endevent() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.set_endevent", false]], "set_error() (in module pygame)": [[44, "pygame.set_error", false]], "set_eventstate() (in module pygame._sdl2.controller)": [[47, "pygame._sdl2.controller.set_eventstate", false]], "set_fullscreen() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.set_fullscreen", false]], "set_gamma() (in module pygame.display)": [[23, "pygame.display.set_gamma", false]], "set_gamma_ramp() (in module pygame.display)": [[23, "pygame.display.set_gamma_ramp", false]], "set_grab() (in module pygame.event)": [[25, "pygame.event.set_grab", false]], "set_icon() (in module pygame.display)": [[23, "pygame.display.set_icon", false]], "set_icon() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.set_icon", false]], "set_instrument() (pygame.midi.output method)": [[37, "pygame.midi.Output.set_instrument", false]], "set_italic() (pygame.font.font method)": [[28, "pygame.font.Font.set_italic", false]], "set_keyboard_grab() (in module pygame.event)": [[25, "pygame.event.set_keyboard_grab", false]], "set_length() (pygame.color method)": [[20, "pygame.Color.set_length", false]], "set_location() (pygame.overlay method)": [[41, "pygame.Overlay.set_location", false]], "set_mapping() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.set_mapping", false]], "set_masks() (pygame.surface method)": [[51, "pygame.Surface.set_masks", false]], "set_modal_for() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.set_modal_for", false]], "set_mode() (in module pygame.display)": [[23, "pygame.display.set_mode", false]], "set_mode() (in module pygame.scrap)": [[46, "pygame.scrap.set_mode", false]], "set_mods() (in module pygame.key)": [[33, "pygame.key.set_mods", false]], "set_num_channels() (in module pygame.mixer)": [[38, "pygame.mixer.set_num_channels", false]], "set_palette() (in module pygame.display)": [[23, "pygame.display.set_palette", false]], "set_palette() (pygame.surface method)": [[51, "pygame.Surface.set_palette", false]], "set_palette_at() (pygame.surface method)": [[51, "pygame.Surface.set_palette_at", false]], "set_pos() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.set_pos", false]], "set_pos() (in module pygame.mouse)": [[39, "pygame.mouse.set_pos", false]], "set_repeat() (in module pygame.key)": [[33, "pygame.key.set_repeat", false]], "set_reserved() (in module pygame.mixer)": [[38, "pygame.mixer.set_reserved", false]], "set_script() (pygame.font.font method)": [[28, "pygame.font.Font.set_script", false]], "set_shifts() (pygame.surface method)": [[51, "pygame.Surface.set_shifts", false]], "set_smoothscale_backend() (in module pygame.transform)": [[56, "pygame.transform.set_smoothscale_backend", false]], "set_strikethrough() (pygame.font.font method)": [[28, "pygame.font.Font.set_strikethrough", false]], "set_text_input_rect() (in module pygame.key)": [[33, "pygame.key.set_text_input_rect", false]], "set_timer() (in module pygame.time)": [[54, "pygame.time.set_timer", false]], "set_timing_threshold() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.set_timing_threshold", false]], "set_timing_treshold() (pygame.sprite.layereddirty method)": [[50, "pygame.sprite.LayeredDirty.set_timing_treshold", false]], "set_underline() (pygame.font.font method)": [[28, "pygame.font.Font.set_underline", false]], "set_viewport() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.set_viewport", false]], "set_visible() (in module pygame.mouse)": [[39, "pygame.mouse.set_visible", false]], "set_volume() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.set_volume", false]], "set_volume() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.set_volume", false]], "set_volume() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.set_volume", false]], "set_windowed() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.set_windowed", false]], "shape (pygame.pixelarray attribute)": [[42, "pygame.PixelArray.shape", false]], "show() (pygame._sdl2.video.window method)": [[48, "pygame._sdl2.video.Window.show", false]], "size (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.size", false]], "size (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.size", false]], "size() (pygame.font.font method)": [[28, "pygame.font.Font.size", false]], "slerp() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.slerp", false]], "slerp() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.slerp", false]], "smoothscale() (in module pygame.transform)": [[56, "pygame.transform.smoothscale", false]], "smoothscale_by() (in module pygame.transform)": [[56, "pygame.transform.smoothscale_by", false]], "sound (class in pygame.mixer)": [[38, "pygame.mixer.Sound", false]], "sound.main() (in module pygame.examples)": [[26, "pygame.examples.sound.main", false]], "sound_array_demos.main() (in module pygame.examples)": [[26, "pygame.examples.sound_array_demos.main", false]], "sprite (class in pygame.sprite)": [[50, "pygame.sprite.Sprite", false]], "spritecollide() (in module pygame.sprite)": [[50, "pygame.sprite.spritecollide", false]], "spritecollideany() (in module pygame.sprite)": [[50, "pygame.sprite.spritecollideany", false]], "sprites() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.sprites", false]], "sprites() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.sprites", false]], "srcrect (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.srcrect", false]], "stars.main() (in module pygame.examples)": [[26, "pygame.examples.stars.main", false]], "start() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.start", false]], "start_text_input() (in module pygame.key)": [[33, "pygame.key.start_text_input", false]], "stop() (in module pygame.mixer)": [[38, "pygame.mixer.stop", false]], "stop() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.stop", false]], "stop() (pygame.camera.camera method)": [[18, "pygame.camera.Camera.stop", false]], "stop() (pygame.cdrom.cd method)": [[19, "pygame.cdrom.CD.stop", false]], "stop() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.stop", false]], "stop() (pygame.mixer.sound method)": [[38, "pygame.mixer.Sound.stop", false]], "stop_rumble() (pygame._sdl2.controller.controller method)": [[47, "pygame._sdl2.controller.Controller.stop_rumble", false]], "stop_rumble() (pygame.joystick.joystick method)": [[32, "pygame.joystick.Joystick.stop_rumble", false]], "stop_text_input() (in module pygame.key)": [[33, "pygame.key.stop_text_input", false]], "strength (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.strength", false]], "strides (pygame.pixelarray attribute)": [[42, "pygame.PixelArray.strides", false]], "strikethrough (pygame.font.font attribute)": [[28, "pygame.font.Font.strikethrough", false]], "strong (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.strong", false]], "style (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.style", false]], "subsurface() (pygame.surface method)": [[51, "pygame.Surface.subsurface", false]], "surface (class in pygame)": [[51, "pygame.Surface", false]], "surface (pygame.pixelarray attribute)": [[42, "pygame.PixelArray.surface", false]], "surface_to_array() (in module pygame.pixelcopy)": [[43, "pygame.pixelcopy.surface_to_array", false]], "switch_layer() (pygame.sprite.layeredupdates method)": [[50, "pygame.sprite.LayeredUpdates.switch_layer", false]], "sysfont() (in module pygame.font)": [[28, "pygame.font.SysFont", false]], "sysfont() (in module pygame.freetype)": [[29, "pygame.freetype.SysFont", false]], "target (pygame._sdl2.video.renderer attribute)": [[48, "pygame._sdl2.video.Renderer.target", false]], "testsprite.main() (in module pygame.examples)": [[26, "pygame.examples.testsprite.main", false]], "texture (class in pygame._sdl2.video)": [[48, "pygame._sdl2.video.Texture", false]], "texture (pygame._sdl2.video.image attribute)": [[48, "pygame._sdl2.video.Image.texture", false]], "textured_polygon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.textured_polygon", false]], "threshold() (in module pygame.transform)": [[56, "pygame.transform.threshold", false]], "tick() (pygame.time.clock method)": [[54, "pygame.time.Clock.tick", false]], "tick_busy_loop() (pygame.time.clock method)": [[54, "pygame.time.Clock.tick_busy_loop", false]], "time() (in module pygame.midi)": [[37, "pygame.midi.time", false]], "title (pygame._sdl2.video.window attribute)": [[48, "pygame._sdl2.video.Window.title", false]], "to_surface() (pygame._sdl2.video.renderer method)": [[48, "pygame._sdl2.video.Renderer.to_surface", false]], "to_surface() (pygame.mask.mask method)": [[35, "pygame.mask.Mask.to_surface", false]], "tobytes() (in module pygame.image)": [[31, "pygame.image.tobytes", false]], "toggle_fullscreen() (in module pygame.display)": [[23, "pygame.display.toggle_fullscreen", false]], "tostring() (in module pygame.image)": [[31, "pygame.image.tostring", false]], "transpose() (pygame.pixelarray method)": [[42, "pygame.PixelArray.transpose", false]], "trigon() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.trigon", false]], "type (pygame.cursors.cursor attribute)": [[22, "pygame.cursors.Cursor.type", false]], "type (pygame.event.event attribute)": [[25, "pygame.event.Event.type", false]], "ucs4 (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.ucs4", false]], "underline (pygame.font.font attribute)": [[28, "pygame.font.Font.underline", false]], "underline (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.underline", false]], "underline_adjustment (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.underline_adjustment", false]], "union() (pygame.rect method)": [[45, "pygame.Rect.union", false]], "union_ip() (pygame.rect method)": [[45, "pygame.Rect.union_ip", false]], "unionall() (pygame.rect method)": [[45, "pygame.Rect.unionall", false]], "unionall_ip() (pygame.rect method)": [[45, "pygame.Rect.unionall_ip", false]], "unload() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.unload", false]], "unlock() (pygame.surface method)": [[51, "pygame.Surface.unlock", false]], "unmap_rgb() (pygame.surface method)": [[51, "pygame.Surface.unmap_rgb", false]], "unpause() (in module pygame.mixer)": [[38, "pygame.mixer.unpause", false]], "unpause() (in module pygame.mixer.music)": [[40, "pygame.mixer.music.unpause", false]], "unpause() (pygame.mixer.channel method)": [[38, "pygame.mixer.Channel.unpause", false]], "update() (in module pygame.display)": [[23, "pygame.display.update", false]], "update() (pygame._sdl2.video.texture method)": [[48, "pygame._sdl2.video.Texture.update", false]], "update() (pygame.color method)": [[20, "pygame.Color.update", false]], "update() (pygame.math.vector2 method)": [[36, "pygame.math.Vector2.update", false]], "update() (pygame.math.vector3 method)": [[36, "pygame.math.Vector3.update", false]], "update() (pygame.rect method)": [[45, "pygame.Rect.update", false]], "update() (pygame.sprite.group method)": [[50, "pygame.sprite.Group.update", false]], "update() (pygame.sprite.sprite method)": [[50, "pygame.sprite.Sprite.update", false]], "use_arraytype() (in module pygame.sndarray)": [[49, "pygame.sndarray.use_arraytype", false]], "use_arraytype() (in module pygame.surfarray)": [[52, "pygame.surfarray.use_arraytype", false]], "use_bitmap_strikes (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.use_bitmap_strikes", false]], "vector2 (class in pygame.math)": [[36, "pygame.math.Vector2", false]], "vector3 (class in pygame.math)": [[36, "pygame.math.Vector3", false]], "ver (in module pygame.version)": [[44, "pygame.version.ver", false]], "vernum (in module pygame.version)": [[44, "pygame.version.vernum", false]], "vertical (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.vertical", false]], "vgrade.main() (in module pygame.examples)": [[26, "pygame.examples.vgrade.main", false]], "vline() (in module pygame.gfxdraw)": [[30, "pygame.gfxdraw.vline", false]], "wait() (in module pygame.event)": [[25, "pygame.event.wait", false]], "wait() (in module pygame.fastevent)": [[27, "pygame.fastevent.wait", false]], "wait() (in module pygame.time)": [[54, "pygame.time.wait", false]], "was_init() (in module pygame.freetype)": [[29, "pygame.freetype.was_init", false]], "weakdirtysprite (class in pygame.sprite)": [[50, "pygame.sprite.WeakDirtySprite", false]], "weaksprite (class in pygame.sprite)": [[50, "pygame.sprite.WeakSprite", false]], "wide (pygame.freetype.font attribute)": [[29, "pygame.freetype.Font.wide", false]], "width (pygame._sdl2.video.texture attribute)": [[48, "pygame._sdl2.video.Texture.width", false]], "window (class in pygame._sdl2.video)": [[48, "pygame._sdl2.video.Window", false]], "write() (pygame.bufferproxy method)": [[17, "pygame.BufferProxy.write", false]], "write() (pygame.midi.output method)": [[37, "pygame.midi.Output.write", false]], "write_short() (pygame.midi.output method)": [[37, "pygame.midi.Output.write_short", false]], "write_sys_ex() (pygame.midi.output method)": [[37, "pygame.midi.Output.write_sys_ex", false]]}, "objects": {"": [[13, 0, 1, "c.PG_MAJOR_VERSION", "PG_MAJOR_VERSION"], [13, 0, 1, "c.PG_MINOR_VERSION", "PG_MINOR_VERSION"], [13, 0, 1, "c.PG_PATCH_VERSION", "PG_PATCH_VERSION"], [13, 0, 1, "c.PG_VERSIONNUM", "PG_VERSIONNUM"], [13, 0, 1, "c.PG_VERSION_ATLEAST", "PG_VERSION_ATLEAST"], [1, 1, 1, "c.import_pygame_base", "import_pygame_base"], [1, 1, 1, "c.pgBuffer_AsArrayInterface", "pgBuffer_AsArrayInterface"], [1, 1, 1, "c.pgBuffer_AsArrayStruct", "pgBuffer_AsArrayStruct"], [1, 1, 1, "c.pgBuffer_Release", "pgBuffer_Release"], [2, 1, 1, "c.pgBufproxy_Check", "pgBufproxy_Check"], [2, 1, 1, "c.pgBufproxy_GetParent", "pgBufproxy_GetParent"], [2, 1, 1, "c.pgBufproxy_New", "pgBufproxy_New"], [2, 1, 1, "c.pgBufproxy_Trip", "pgBufproxy_Trip"], [2, 3, 1, "c.pgBufproxy_Type", "pgBufproxy_Type"], [7, 4, 1, "c.pgChannelObject", "pgChannelObject"], [7, 1, 1, "c.pgChannel_AsInt", "pgChannel_AsInt"], [7, 1, 1, "c.pgChannel_Check", "pgChannel_Check"], [7, 1, 1, "c.pgChannel_New", "pgChannel_New"], [7, 3, 1, "c.pgChannel_Type", "pgChannel_Type"], [3, 1, 1, "c.pgColor_Check", "pgColor_Check"], [3, 1, 1, "c.pgColor_New", "pgColor_New"], [3, 1, 1, "c.pgColor_NewLength", "pgColor_NewLength"], [3, 3, 1, "c.pgColor_Type", "pgColor_Type"], [1, 1, 1, "c.pgDict_AsBuffer", "pgDict_AsBuffer"], [5, 4, 1, "c.pgEventObject", "pgEventObject"], [5, 1, 1, "c.pgEvent_Check", "pgEvent_Check"], [5, 1, 1, "c.pgEvent_FillUserEvent", "pgEvent_FillUserEvent"], [5, 1, 1, "c.pgEvent_New", "pgEvent_New"], [5, 1, 1, "c.pgEvent_New2", "pgEvent_New2"], [5, 4, 1, "c.pgEvent_Type", "pgEvent_Type"], [1, 3, 1, "c.pgExc_BufferError", "pgExc_BufferError"], [1, 3, 1, "c.pgExc_SDLError", "pgExc_SDLError"], [6, 4, 1, "c.pgFontObject", "pgFontObject"], [6, 1, 1, "c.pgFont_Check", "pgFont_Check"], [6, 1, 1, "c.pgFont_IS_ALIVE", "pgFont_IS_ALIVE"], [6, 1, 1, "c.pgFont_New", "pgFont_New"], [6, 4, 1, "c.pgFont_Type", "pgFont_Type"], [12, 4, 1, "c.pgLifetimeLockObject", "pgLifetimeLockObject"], [12, 1, 1, "c.pgLifetimeLock_Check", "pgLifetimeLock_Check"], [12, 3, 1, "c.pgLifetimeLock_Type", "pgLifetimeLock_Type"], [1, 1, 1, "c.pgObject_GetBuffer", "pgObject_GetBuffer"], [9, 1, 1, "c.pgRWops_FromFileObject", "pgRWops_FromFileObject"], [9, 1, 1, "c.pgRWops_FromObject", "pgRWops_FromObject"], [9, 1, 1, "c.pgRWops_IsFileObject", "pgRWops_IsFileObject"], [9, 1, 1, "c.pgRWops_ReleaseObject", "pgRWops_ReleaseObject"], [8, 4, 1, "c.pgRectObject", "pgRectObject"], [8, 1, 1, "c.pgRect_AsRect", "pgRect_AsRect"], [8, 1, 1, "c.pgRect_Check", "pgRect_Check"], [8, 1, 1, "c.pgRect_FromObject", "pgRect_FromObject"], [8, 1, 1, "c.pgRect_New", "pgRect_New"], [8, 1, 1, "c.pgRect_New4", "pgRect_New4"], [8, 1, 1, "c.pgRect_Normalize", "pgRect_Normalize"], [8, 3, 1, "c.pgRect_Type", "pgRect_Type"], [7, 4, 1, "c.pgSoundObject", "pgSoundObject"], [7, 1, 1, "c.pgSound_AsChunk", "pgSound_AsChunk"], [7, 1, 1, "c.pgSound_Check", "pgSound_Check"], [7, 1, 1, "c.pgSound_New", "pgSound_New"], [7, 3, 1, "c.pgSound_Type", "pgSound_Type"], [11, 4, 1, "c.pgSurfaceObject", "pgSurfaceObject"], [11, 1, 1, "c.pgSurface_AsSurface", "pgSurface_AsSurface"], [11, 1, 1, "c.pgSurface_Blit", "pgSurface_Blit"], [11, 1, 1, "c.pgSurface_Check", "pgSurface_Check"], [12, 1, 1, "c.pgSurface_Lock", "pgSurface_Lock"], [12, 1, 1, "c.pgSurface_LockBy", "pgSurface_LockBy"], [12, 1, 1, "c.pgSurface_LockLifetime", "pgSurface_LockLifetime"], [11, 1, 1, "c.pgSurface_New", "pgSurface_New"], [11, 1, 1, "c.pgSurface_New2", "pgSurface_New2"], [12, 1, 1, "c.pgSurface_Prep", "pgSurface_Prep"], [11, 3, 1, "c.pgSurface_Type", "pgSurface_Type"], [12, 1, 1, "c.pgSurface_UnLock", "pgSurface_UnLock"], [12, 1, 1, "c.pgSurface_UnLockBy", "pgSurface_UnLockBy"], [12, 1, 1, "c.pgSurface_Unprep", "pgSurface_Unprep"], [4, 4, 1, "c.pgVidInfoObject", "pgVidInfoObject"], [4, 1, 1, "c.pgVidInfo_AsVidInfo", "pgVidInfo_AsVidInfo"], [4, 1, 1, "c.pgVidInfo_Check", "pgVidInfo_Check"], [4, 1, 1, "c.pgVidInfo_New", "pgVidInfo_New"], [4, 3, 1, "c.pgVidInfo_Type", "pgVidInfo_Type"], [9, 1, 1, "c.pg_EncodeFilePath", "pg_EncodeFilePath"], [9, 1, 1, "c.pg_EncodeString", "pg_EncodeString"], [1, 1, 1, "c.pg_FloatFromObj", "pg_FloatFromObj"], [1, 1, 1, "c.pg_FloatFromObjIndex", "pg_FloatFromObjIndex"], [1, 1, 1, "c.pg_GetDefaultWindow", "pg_GetDefaultWindow"], [1, 1, 1, "c.pg_GetDefaultWindowSurface", "pg_GetDefaultWindowSurface"], [1, 1, 1, "c.pg_IntFromObj", "pg_IntFromObj"], [1, 1, 1, "c.pg_IntFromObjIndex", "pg_IntFromObjIndex"], [1, 1, 1, "c.pg_RGBAFromObj", "pg_RGBAFromObj"], [1, 1, 1, "c.pg_RegisterQuit", "pg_RegisterQuit"], [1, 1, 1, "c.pg_SetDefaultWindow", "pg_SetDefaultWindow"], [1, 1, 1, "c.pg_SetDefaultWindowSurface", "pg_SetDefaultWindowSurface"], [1, 1, 1, "c.pg_TwoFloatsFromObj", "pg_TwoFloatsFromObj"], [1, 1, 1, "c.pg_TwoIntsFromObj", "pg_TwoIntsFromObj"], [1, 1, 1, "c.pg_UintFromObj", "pg_UintFromObj"], [1, 1, 1, "c.pg_UintFromObjIndex", "pg_UintFromObjIndex"], [1, 4, 1, "c.pg_buffer", "pg_buffer"], [1, 1, 1, "c.pg_mod_autoinit", "pg_mod_autoinit"], [1, 1, 1, "c.pg_mod_autoquit", "pg_mod_autoquit"], [44, 5, 0, "-", "pygame"]], "pgBuffer_AsArrayInterface": [[1, 2, 1, "c.pgBuffer_AsArrayInterface", "view_p"]], "pgBuffer_AsArrayStruct": [[1, 2, 1, "c.pgBuffer_AsArrayStruct", "view_p"]], "pgBuffer_Release": [[1, 2, 1, "c.pgBuffer_Release", "pg_view_p"]], "pgBufproxy_Check": [[2, 2, 1, "c.pgBufproxy_Check", "x"]], "pgBufproxy_GetParent": [[2, 2, 1, "c.pgBufproxy_GetParent", "obj"]], "pgBufproxy_New": [[2, 2, 1, "c.pgBufproxy_New", "get_buffer"], [2, 2, 1, "c.pgBufproxy_New", "obj"]], "pgBufproxy_Trip": [[2, 2, 1, "c.pgBufproxy_Trip", "obj"]], "pgChannel_AsInt": [[7, 2, 1, "c.pgChannel_AsInt", "x"]], "pgChannel_Check": [[7, 2, 1, "c.pgChannel_Check", "obj"]], "pgChannel_New": [[7, 2, 1, "c.pgChannel_New", "channelnum"]], "pgColor_Check": [[3, 2, 1, "c.pgColor_Check", "obj"]], "pgColor_New": [[3, 2, 1, "c.pgColor_New", "rgba"]], "pgColor_NewLength": [[3, 2, 1, "c.pgColor_NewLength", "length"], [3, 2, 1, "c.pgColor_NewLength", "rgba"]], "pgDict_AsBuffer": [[1, 2, 1, "c.pgDict_AsBuffer", "dict"], [1, 2, 1, "c.pgDict_AsBuffer", "flags"], [1, 2, 1, "c.pgDict_AsBuffer", "pg_view_p"]], "pgEventObject": [[5, 3, 1, "c.pgEventObject.type", "type"]], "pgEvent_Check": [[5, 2, 1, "c.pgEvent_Check", "x"]], "pgEvent_FillUserEvent": [[5, 2, 1, "c.pgEvent_FillUserEvent", "e"], [5, 2, 1, "c.pgEvent_FillUserEvent", "event"]], "pgEvent_New": [[5, 2, 1, "c.pgEvent_New", "event"]], "pgEvent_New2": [[5, 2, 1, "c.pgEvent_New2", "dict"], [5, 2, 1, "c.pgEvent_New2", "type"]], "pgFont_Check": [[6, 2, 1, "c.pgFont_Check", "x"]], "pgFont_IS_ALIVE": [[6, 2, 1, "c.pgFont_IS_ALIVE", "o"]], "pgFont_New": [[6, 2, 1, "c.pgFont_New", "filename"], [6, 2, 1, "c.pgFont_New", "font_index"]], "pgLifetimeLockObject": [[12, 3, 1, "c.pgLifetimeLockObject.lockobj", "lockobj"], [12, 3, 1, "c.pgLifetimeLockObject.surface", "surface"]], "pgLifetimeLock_Check": [[12, 2, 1, "c.pgLifetimeLock_Check", "x"]], "pgObject_GetBuffer": [[1, 2, 1, "c.pgObject_GetBuffer", "flags"], [1, 2, 1, "c.pgObject_GetBuffer", "obj"], [1, 2, 1, "c.pgObject_GetBuffer", "pg_view_p"]], "pgRWops_FromFileObject": [[9, 2, 1, "c.pgRWops_FromFileObject", "obj"]], "pgRWops_FromObject": [[9, 2, 1, "c.pgRWops_FromObject", "extptr"], [9, 2, 1, "c.pgRWops_FromObject", "obj"]], "pgRWops_IsFileObject": [[9, 2, 1, "c.pgRWops_IsFileObject", "rw"]], "pgRWops_ReleaseObject": [[9, 2, 1, "c.pgRWops_ReleaseObject", "context"]], "pgRectObject": [[8, 3, 1, "c.pgRectObject.r", "r"]], "pgRect_AsRect": [[8, 2, 1, "c.pgRect_AsRect", "obj"]], "pgRect_Check": [[8, 2, 1, "c.pgRect_Check", "obj"]], "pgRect_FromObject": [[8, 2, 1, "c.pgRect_FromObject", "obj"], [8, 2, 1, "c.pgRect_FromObject", "temp"]], "pgRect_New": [[8, 2, 1, "c.pgRect_New", "r"]], "pgRect_New4": [[8, 2, 1, "c.pgRect_New4", "h"], [8, 2, 1, "c.pgRect_New4", "w"], [8, 2, 1, "c.pgRect_New4", "x"], [8, 2, 1, "c.pgRect_New4", "y"]], "pgRect_Normalize": [[8, 2, 1, "c.pgRect_Normalize", "rect"]], "pgSound_AsChunk": [[7, 2, 1, "c.pgSound_AsChunk", "x"]], "pgSound_Check": [[7, 2, 1, "c.pgSound_Check", "obj"]], "pgSound_New": [[7, 2, 1, "c.pgSound_New", "chunk"]], "pgSurface_AsSurface": [[11, 2, 1, "c.pgSurface_AsSurface", "x"]], "pgSurface_Blit": [[11, 2, 1, "c.pgSurface_Blit", "dstobj"], [11, 2, 1, "c.pgSurface_Blit", "dstrect"], [11, 2, 1, "c.pgSurface_Blit", "srcobj"], [11, 2, 1, "c.pgSurface_Blit", "srcrect"], [11, 2, 1, "c.pgSurface_Blit", "the_args"]], "pgSurface_Check": [[11, 2, 1, "c.pgSurface_Check", "x"]], "pgSurface_Lock": [[12, 2, 1, "c.pgSurface_Lock", "surfobj"]], "pgSurface_LockBy": [[12, 2, 1, "c.pgSurface_LockBy", "lockobj"], [12, 2, 1, "c.pgSurface_LockBy", "surfobj"]], "pgSurface_LockLifetime": [[12, 2, 1, "c.pgSurface_LockLifetime", "lockobj"], [12, 2, 1, "c.pgSurface_LockLifetime", "surfobj"]], "pgSurface_New": [[11, 2, 1, "c.pgSurface_New", "s"]], "pgSurface_New2": [[11, 2, 1, "c.pgSurface_New2", "owner"], [11, 2, 1, "c.pgSurface_New2", "s"]], "pgSurface_Prep": [[12, 2, 1, "c.pgSurface_Prep", "surfobj"]], "pgSurface_UnLock": [[12, 2, 1, "c.pgSurface_UnLock", "surfobj"]], "pgSurface_UnLockBy": [[12, 2, 1, "c.pgSurface_UnLockBy", "lockobj"], [12, 2, 1, "c.pgSurface_UnLockBy", "surfobj"]], "pgSurface_Unprep": [[12, 2, 1, "c.pgSurface_Unprep", "surfobj"]], "pgVidInfo_AsVidInfo": [[4, 2, 1, "c.pgVidInfo_AsVidInfo", "obj"]], "pgVidInfo_Check": [[4, 2, 1, "c.pgVidInfo_Check", "x"]], "pgVidInfo_New": [[4, 2, 1, "c.pgVidInfo_New", "i"]], "pg_EncodeFilePath": [[9, 2, 1, "c.pg_EncodeFilePath", "eclass"], [9, 2, 1, "c.pg_EncodeFilePath", "obj"]], "pg_EncodeString": [[9, 2, 1, "c.pg_EncodeString", "eclass"], [9, 2, 1, "c.pg_EncodeString", "encoding"], [9, 2, 1, "c.pg_EncodeString", "errors"], [9, 2, 1, "c.pg_EncodeString", "obj"]], "pg_FloatFromObj": [[1, 2, 1, "c.pg_FloatFromObj", "obj"], [1, 2, 1, "c.pg_FloatFromObj", "val"]], "pg_FloatFromObjIndex": [[1, 2, 1, "c.pg_FloatFromObjIndex", "index"], [1, 2, 1, "c.pg_FloatFromObjIndex", "obj"], [1, 2, 1, "c.pg_FloatFromObjIndex", "val"]], "pg_IntFromObj": [[1, 2, 1, "c.pg_IntFromObj", "obj"], [1, 2, 1, "c.pg_IntFromObj", "val"]], "pg_IntFromObjIndex": [[1, 2, 1, "c.pg_IntFromObjIndex", "index"], [1, 2, 1, "c.pg_IntFromObjIndex", "obj"], [1, 2, 1, "c.pg_IntFromObjIndex", "val"]], "pg_RGBAFromObj": [[1, 2, 1, "c.pg_RGBAFromObj", "RGBA"], [1, 2, 1, "c.pg_RGBAFromObj", "obj"]], "pg_RegisterQuit": [[1, 2, 1, "c.pg_RegisterQuit", "f"]], "pg_SetDefaultWindow": [[1, 2, 1, "c.pg_SetDefaultWindow", "win"]], "pg_SetDefaultWindowSurface": [[1, 2, 1, "c.pg_SetDefaultWindowSurface", "screen"]], "pg_TwoFloatsFromObj": [[1, 2, 1, "c.pg_TwoFloatsFromObj", "obj"], [1, 2, 1, "c.pg_TwoFloatsFromObj", "val1"], [1, 2, 1, "c.pg_TwoFloatsFromObj", "val2"]], "pg_TwoIntsFromObj": [[1, 2, 1, "c.pg_TwoIntsFromObj", "obj"], [1, 2, 1, "c.pg_TwoIntsFromObj", "v2"], [1, 2, 1, "c.pg_TwoIntsFromObj", "val1"]], "pg_UintFromObj": [[1, 2, 1, "c.pg_UintFromObj", "obj"], [1, 2, 1, "c.pg_UintFromObj", "val"]], "pg_UintFromObjIndex": [[1, 2, 1, "c.pg_UintFromObjIndex", "_index"], [1, 2, 1, "c.pg_UintFromObjIndex", "obj"], [1, 2, 1, "c.pg_UintFromObjIndex", "val"]], "pg_buffer": [[1, 3, 1, "c.pg_buffer.consumer", "consumer"], [1, 3, 1, "c.pg_buffer.release_buffer", "release_buffer"], [1, 3, 1, "c.pg_buffer.view", "view"]], "pg_mod_autoinit": [[1, 2, 1, "c.pg_mod_autoinit", "modname"]], "pg_mod_autoquit": [[1, 2, 1, "c.pg_mod_autoquit", "modname"]], "pygame": [[17, 6, 1, "", "BufferProxy"], [20, 6, 1, "", "Color"], [41, 6, 1, "", "Overlay"], [42, 6, 1, "", "PixelArray"], [45, 6, 1, "", "Rect"], [51, 6, 1, "", "Surface"], [18, 5, 0, "-", "camera"], [19, 5, 0, "-", "cdrom"], [22, 5, 0, "-", "cursors"], [23, 5, 0, "-", "display"], [24, 5, 0, "-", "draw"], [44, 9, 1, "", "encode_file_path"], [44, 9, 1, "", "encode_string"], [44, 10, 1, "", "error"], [25, 5, 0, "-", "event"], [26, 5, 0, "-", "examples"], [27, 5, 0, "-", "fastevent"], [28, 5, 0, "-", "font"], [29, 5, 0, "-", "freetype"], [44, 9, 1, "", "get_error"], [44, 9, 1, "", "get_init"], [44, 9, 1, "", "get_sdl_byteorder"], [44, 9, 1, "", "get_sdl_version"], [30, 5, 0, "-", "gfxdraw"], [31, 5, 0, "-", "image"], [44, 9, 1, "", "init"], [32, 5, 0, "-", "joystick"], [33, 5, 0, "-", "key"], [34, 5, 0, "-", "locals"], [35, 5, 0, "-", "mask"], [36, 5, 0, "-", "math"], [37, 5, 0, "-", "midi"], [38, 5, 0, "-", "mixer"], [39, 5, 0, "-", "mouse"], [43, 5, 0, "-", "pixelcopy"], [44, 9, 1, "", "quit"], [44, 9, 1, "", "register_quit"], [46, 5, 0, "-", "scrap"], [44, 9, 1, "", "set_error"], [49, 5, 0, "-", "sndarray"], [50, 5, 0, "-", "sprite"], [52, 5, 0, "-", "surfarray"], [53, 5, 0, "-", "tests"], [54, 5, 0, "-", "time"], [56, 5, 0, "-", "transform"], [44, 5, 0, "-", "version"]], "pygame.BufferProxy": [[17, 7, 1, "", "length"], [17, 7, 1, "", "parent"], [17, 7, 1, "", "raw"], [17, 8, 1, "", "write"]], "pygame.Color": [[20, 7, 1, "", "a"], [20, 7, 1, "", "b"], [20, 7, 1, "", "cmy"], [20, 8, 1, "", "correct_gamma"], [20, 7, 1, "", "g"], [20, 8, 1, "", "grayscale"], [20, 7, 1, "", "hsla"], [20, 7, 1, "", "hsva"], [20, 7, 1, "", "i1i2i3"], [20, 8, 1, "", "lerp"], [20, 8, 1, "", "normalize"], [20, 8, 1, "", "premul_alpha"], [20, 7, 1, "", "r"], [20, 8, 1, "", "set_length"], [20, 8, 1, "", "update"]], "pygame.Overlay": [[41, 8, 1, "", "display"], [41, 8, 1, "", "get_hardware"], [41, 8, 1, "", "set_location"]], "pygame.PixelArray": [[42, 8, 1, "", "close"], [42, 8, 1, "", "compare"], [42, 8, 1, "", "extract"], [42, 7, 1, "", "itemsize"], [42, 8, 1, "", "make_surface"], [42, 7, 1, "", "ndim"], [42, 8, 1, "", "replace"], [42, 7, 1, "", "shape"], [42, 7, 1, "", "strides"], [42, 7, 1, "", "surface"], [42, 8, 1, "", "transpose"]], "pygame.Rect": [[45, 8, 1, "", "clamp"], [45, 8, 1, "", "clamp_ip"], [45, 8, 1, "", "clip"], [45, 8, 1, "", "clipline"], [45, 8, 1, "", "collidedict"], [45, 8, 1, "", "collidedictall"], [45, 8, 1, "", "collidelist"], [45, 8, 1, "", "collidelistall"], [45, 8, 1, "", "collideobjects"], [45, 8, 1, "", "collideobjectsall"], [45, 8, 1, "", "collidepoint"], [45, 8, 1, "", "colliderect"], [45, 8, 1, "", "contains"], [45, 8, 1, "", "copy"], [45, 8, 1, "", "fit"], [45, 8, 1, "", "inflate"], [45, 8, 1, "", "inflate_ip"], [45, 8, 1, "", "move"], [45, 8, 1, "", "move_ip"], [45, 8, 1, "", "normalize"], [45, 8, 1, "", "scale_by"], [45, 8, 1, "", "scale_by_ip"], [45, 8, 1, "", "union"], [45, 8, 1, "", "union_ip"], [45, 8, 1, "", "unionall"], [45, 8, 1, "", "unionall_ip"], [45, 8, 1, "", "update"]], "pygame.Surface": [[51, 7, 1, "", "_pixels_address"], [51, 8, 1, "", "blit"], [51, 8, 1, "", "blits"], [51, 8, 1, "", "convert"], [51, 8, 1, "", "convert_alpha"], [51, 8, 1, "", "copy"], [51, 8, 1, "", "fill"], [51, 8, 1, "", "get_abs_offset"], [51, 8, 1, "", "get_abs_parent"], [51, 8, 1, "", "get_alpha"], [51, 8, 1, "", "get_at"], [51, 8, 1, "", "get_at_mapped"], [51, 8, 1, "", "get_bitsize"], [51, 8, 1, "", "get_bounding_rect"], [51, 8, 1, "", "get_buffer"], [51, 8, 1, "", "get_bytesize"], [51, 8, 1, "", "get_clip"], [51, 8, 1, "", "get_colorkey"], [51, 8, 1, "", "get_flags"], [51, 8, 1, "", "get_height"], [51, 8, 1, "", "get_locked"], [51, 8, 1, "", "get_locks"], [51, 8, 1, "", "get_losses"], [51, 8, 1, "", "get_masks"], [51, 8, 1, "", "get_offset"], [51, 8, 1, "", "get_palette"], [51, 8, 1, "", "get_palette_at"], [51, 8, 1, "", "get_parent"], [51, 8, 1, "", "get_pitch"], [51, 8, 1, "", "get_rect"], [51, 8, 1, "", "get_shifts"], [51, 8, 1, "", "get_size"], [51, 8, 1, "", "get_view"], [51, 8, 1, "", "get_width"], [51, 8, 1, "", "lock"], [51, 8, 1, "", "map_rgb"], [51, 8, 1, "", "mustlock"], [51, 8, 1, "", "premul_alpha"], [51, 8, 1, "", "scroll"], [51, 8, 1, "", "set_alpha"], [51, 8, 1, "", "set_at"], [51, 8, 1, "", "set_clip"], [51, 8, 1, "", "set_colorkey"], [51, 8, 1, "", "set_masks"], [51, 8, 1, "", "set_palette"], [51, 8, 1, "", "set_palette_at"], [51, 8, 1, "", "set_shifts"], [51, 8, 1, "", "subsurface"], [51, 8, 1, "", "unlock"], [51, 8, 1, "", "unmap_rgb"]], "pygame._sdl2": [[47, 5, 0, "-", "controller"], [55, 5, 0, "-", "touch"], [48, 5, 0, "-", "video"]], "pygame._sdl2.controller": [[47, 6, 1, "", "Controller"], [47, 9, 1, "", "get_count"], [47, 9, 1, "", "get_eventstate"], [47, 9, 1, "", "get_init"], [47, 9, 1, "", "init"], [47, 9, 1, "", "is_controller"], [47, 9, 1, "", "name_forindex"], [47, 9, 1, "", "quit"], [47, 9, 1, "", "set_eventstate"]], "pygame._sdl2.controller.Controller": [[47, 8, 1, "", "as_joystick"], [47, 8, 1, "", "attached"], [47, 8, 1, "", "from_joystick"], [47, 8, 1, "", "get_axis"], [47, 8, 1, "", "get_button"], [47, 8, 1, "", "get_init"], [47, 8, 1, "", "get_mapping"], [47, 8, 1, "", "quit"], [47, 8, 1, "", "rumble"], [47, 8, 1, "", "set_mapping"], [47, 8, 1, "", "stop_rumble"]], "pygame._sdl2.touch": [[55, 9, 1, "", "get_device"], [55, 9, 1, "", "get_finger"], [55, 9, 1, "", "get_num_devices"], [55, 9, 1, "", "get_num_fingers"]], "pygame._sdl2.video": [[48, 6, 1, "", "Image"], [48, 6, 1, "", "Renderer"], [48, 6, 1, "", "Texture"], [48, 6, 1, "", "Window"]], "pygame._sdl2.video.Image": [[48, 7, 1, "", "alpha"], [48, 7, 1, "", "angle"], [48, 7, 1, "", "blend_mode"], [48, 7, 1, "", "color"], [48, 8, 1, "", "draw"], [48, 7, 1, "", "flip_x"], [48, 7, 1, "", "flip_y"], [48, 8, 1, "", "get_rect"], [48, 7, 1, "", "origin"], [48, 7, 1, "", "srcrect"], [48, 7, 1, "", "texture"]], "pygame._sdl2.video.Renderer": [[48, 8, 1, "", "blit"], [48, 8, 1, "", "clear"], [48, 7, 1, "", "draw_blend_mode"], [48, 7, 1, "", "draw_color"], [48, 8, 1, "", "draw_line"], [48, 8, 1, "", "draw_point"], [48, 8, 1, "", "draw_rect"], [48, 8, 1, "", "fill_rect"], [48, 8, 1, "", "from_window"], [48, 8, 1, "", "get_viewport"], [48, 7, 1, "", "logical_size"], [48, 8, 1, "", "present"], [48, 7, 1, "", "scale"], [48, 8, 1, "", "set_viewport"], [48, 7, 1, "", "target"], [48, 8, 1, "", "to_surface"]], "pygame._sdl2.video.Texture": [[48, 7, 1, "", "alpha"], [48, 7, 1, "", "blend_mode"], [48, 7, 1, "", "color"], [48, 8, 1, "", "draw"], [48, 8, 1, "", "from_surface"], [48, 8, 1, "", "get_rect"], [48, 7, 1, "", "height"], [48, 7, 1, "", "renderer"], [48, 8, 1, "", "update"], [48, 7, 1, "", "width"]], "pygame._sdl2.video.Window": [[48, 7, 1, "", "borderless"], [48, 8, 1, "", "destroy"], [48, 7, 1, "", "display_index"], [48, 8, 1, "", "focus"], [48, 8, 1, "", "from_display_module"], [48, 8, 1, "", "from_window"], [48, 7, 1, "", "grab"], [48, 8, 1, "", "hide"], [48, 7, 1, "", "id"], [48, 8, 1, "", "maximize"], [48, 8, 1, "", "minimize"], [48, 7, 1, "", "opacity"], [48, 7, 1, "", "position"], [48, 7, 1, "", "relative_mouse"], [48, 7, 1, "", "resizable"], [48, 8, 1, "", "restore"], [48, 8, 1, "", "set_fullscreen"], [48, 8, 1, "", "set_icon"], [48, 8, 1, "", "set_modal_for"], [48, 8, 1, "", "set_windowed"], [48, 8, 1, "", "show"], [48, 7, 1, "", "size"], [48, 7, 1, "", "title"]], "pygame.camera": [[18, 6, 1, "", "Camera"], [18, 9, 1, "", "colorspace"], [18, 9, 1, "", "get_backends"], [18, 9, 1, "", "init"], [18, 9, 1, "", "list_cameras"]], "pygame.camera.Camera": [[18, 8, 1, "", "get_controls"], [18, 8, 1, "", "get_image"], [18, 8, 1, "", "get_raw"], [18, 8, 1, "", "get_size"], [18, 8, 1, "", "query_image"], [18, 8, 1, "", "set_controls"], [18, 8, 1, "", "start"], [18, 8, 1, "", "stop"]], "pygame.cdrom": [[19, 6, 1, "", "CD"], [19, 9, 1, "", "get_count"], [19, 9, 1, "", "get_init"], [19, 9, 1, "", "init"], [19, 9, 1, "", "quit"]], "pygame.cdrom.CD": [[19, 8, 1, "", "eject"], [19, 8, 1, "", "get_all"], [19, 8, 1, "", "get_busy"], [19, 8, 1, "", "get_current"], [19, 8, 1, "", "get_empty"], [19, 8, 1, "", "get_id"], [19, 8, 1, "", "get_init"], [19, 8, 1, "", "get_name"], [19, 8, 1, "", "get_numtracks"], [19, 8, 1, "", "get_paused"], [19, 8, 1, "", "get_track_audio"], [19, 8, 1, "", "get_track_length"], [19, 8, 1, "", "get_track_start"], [19, 8, 1, "", "init"], [19, 8, 1, "", "pause"], [19, 8, 1, "", "play"], [19, 8, 1, "", "quit"], [19, 8, 1, "", "resume"], [19, 8, 1, "", "stop"]], "pygame.cursors": [[22, 6, 1, "", "Cursor"], [22, 9, 1, "", "compile"], [22, 9, 1, "", "load_xbm"]], "pygame.cursors.Cursor": [[22, 8, 1, "", "copy"], [22, 7, 1, "", "data"], [22, 7, 1, "", "type"]], "pygame.display": [[23, 9, 1, "", "Info"], [23, 9, 1, "", "flip"], [23, 9, 1, "", "get_active"], [23, 9, 1, "", "get_allow_screensaver"], [23, 9, 1, "", "get_caption"], [23, 9, 1, "", "get_desktop_sizes"], [23, 9, 1, "", "get_driver"], [23, 9, 1, "", "get_init"], [23, 9, 1, "", "get_num_displays"], [23, 9, 1, "", "get_surface"], [23, 9, 1, "", "get_window_size"], [23, 9, 1, "", "get_wm_info"], [23, 9, 1, "", "gl_get_attribute"], [23, 9, 1, "", "gl_set_attribute"], [23, 9, 1, "", "iconify"], [23, 9, 1, "", "init"], [23, 9, 1, "", "list_modes"], [23, 9, 1, "", "mode_ok"], [23, 9, 1, "", "quit"], [23, 9, 1, "", "set_allow_screensaver"], [23, 9, 1, "", "set_caption"], [23, 9, 1, "", "set_gamma"], [23, 9, 1, "", "set_gamma_ramp"], [23, 9, 1, "", "set_icon"], [23, 9, 1, "", "set_mode"], [23, 9, 1, "", "set_palette"], [23, 9, 1, "", "toggle_fullscreen"], [23, 9, 1, "", "update"]], "pygame.draw": [[24, 9, 1, "", "aaline"], [24, 9, 1, "", "aalines"], [24, 9, 1, "", "arc"], [24, 9, 1, "", "circle"], [24, 9, 1, "", "ellipse"], [24, 9, 1, "", "line"], [24, 9, 1, "", "lines"], [24, 9, 1, "", "polygon"], [24, 9, 1, "", "rect"]], "pygame.event": [[25, 6, 1, "", "Event"], [25, 9, 1, "", "clear"], [25, 9, 1, "", "custom_type"], [25, 9, 1, "", "event_name"], [25, 9, 1, "", "get"], [25, 9, 1, "", "get_blocked"], [25, 9, 1, "", "get_grab"], [25, 9, 1, "", "get_keyboard_grab"], [25, 9, 1, "", "peek"], [25, 9, 1, "", "poll"], [25, 9, 1, "", "post"], [25, 9, 1, "", "pump"], [25, 9, 1, "", "set_allowed"], [25, 9, 1, "", "set_blocked"], [25, 9, 1, "", "set_grab"], [25, 9, 1, "", "set_keyboard_grab"], [25, 9, 1, "", "wait"]], "pygame.event.Event": [[25, 7, 1, "", "__dict__"], [25, 7, 1, "", "type"]], "pygame.examples.aliens": [[26, 9, 1, "", "main"]], "pygame.examples.arraydemo": [[26, 9, 1, "", "main"]], "pygame.examples.blend_fill": [[26, 9, 1, "", "main"]], "pygame.examples.blit_blends": [[26, 9, 1, "", "main"]], "pygame.examples.camera": [[26, 9, 1, "", "main"]], "pygame.examples.chimp": [[26, 9, 1, "", "main"]], "pygame.examples.cursors": [[26, 9, 1, "", "main"]], "pygame.examples.eventlist": [[26, 9, 1, "", "main"]], "pygame.examples.fonty": [[26, 9, 1, "", "main"]], "pygame.examples.freetype_misc": [[26, 9, 1, "", "main"]], "pygame.examples.glcube": [[26, 9, 1, "", "main"]], "pygame.examples.headless_no_windows_needed": [[26, 9, 1, "", "main"]], "pygame.examples.joystick": [[26, 9, 1, "", "main"]], "pygame.examples.liquid": [[26, 9, 1, "", "main"]], "pygame.examples.mask": [[26, 9, 1, "", "main"]], "pygame.examples.midi": [[26, 9, 1, "", "main"]], "pygame.examples.moveit": [[26, 9, 1, "", "main"]], "pygame.examples.pixelarray": [[26, 9, 1, "", "main"]], "pygame.examples.playmus": [[26, 9, 1, "", "main"]], "pygame.examples.scaletest": [[26, 9, 1, "", "main"]], "pygame.examples.scrap_clipboard": [[26, 9, 1, "", "main"]], "pygame.examples.scroll": [[26, 9, 1, "", "main"]], "pygame.examples.sound": [[26, 9, 1, "", "main"]], "pygame.examples.sound_array_demos": [[26, 9, 1, "", "main"]], "pygame.examples.stars": [[26, 9, 1, "", "main"]], "pygame.examples.testsprite": [[26, 9, 1, "", "main"]], "pygame.examples.vgrade": [[26, 9, 1, "", "main"]], "pygame.fastevent": [[27, 9, 1, "", "get"], [27, 9, 1, "", "get_init"], [27, 9, 1, "", "init"], [27, 9, 1, "", "poll"], [27, 9, 1, "", "post"], [27, 9, 1, "", "pump"], [27, 9, 1, "", "wait"]], "pygame.font": [[28, 6, 1, "", "Font"], [28, 9, 1, "", "SysFont"], [28, 9, 1, "", "get_default_font"], [28, 9, 1, "", "get_fonts"], [28, 9, 1, "", "get_init"], [28, 9, 1, "", "get_sdl_ttf_version"], [28, 9, 1, "", "init"], [28, 9, 1, "", "match_font"], [28, 9, 1, "", "quit"]], "pygame.font.Font": [[28, 7, 1, "", "bold"], [28, 8, 1, "", "get_ascent"], [28, 8, 1, "", "get_bold"], [28, 8, 1, "", "get_descent"], [28, 8, 1, "", "get_height"], [28, 8, 1, "", "get_italic"], [28, 8, 1, "", "get_linesize"], [28, 8, 1, "", "get_strikethrough"], [28, 8, 1, "", "get_underline"], [28, 7, 1, "", "italic"], [28, 8, 1, "", "metrics"], [28, 8, 1, "", "render"], [28, 8, 1, "", "set_bold"], [28, 8, 1, "", "set_italic"], [28, 8, 1, "", "set_script"], [28, 8, 1, "", "set_strikethrough"], [28, 8, 1, "", "set_underline"], [28, 8, 1, "", "size"], [28, 7, 1, "", "strikethrough"], [28, 7, 1, "", "underline"]], "pygame.freetype": [[29, 6, 1, "", "Font"], [29, 9, 1, "", "SysFont"], [29, 9, 1, "", "get_cache_size"], [29, 9, 1, "", "get_default_font"], [29, 9, 1, "", "get_default_resolution"], [29, 9, 1, "", "get_error"], [29, 9, 1, "", "get_init"], [29, 9, 1, "", "get_version"], [29, 9, 1, "", "init"], [29, 9, 1, "", "quit"], [29, 9, 1, "", "set_default_resolution"], [29, 9, 1, "", "was_init"]], "pygame.freetype.Font": [[29, 7, 1, "", "antialiased"], [29, 7, 1, "", "ascender"], [29, 7, 1, "", "bgcolor"], [29, 7, 1, "", "descender"], [29, 7, 1, "", "fgcolor"], [29, 7, 1, "", "fixed_sizes"], [29, 7, 1, "", "fixed_width"], [29, 8, 1, "", "get_metrics"], [29, 8, 1, "", "get_rect"], [29, 8, 1, "", "get_sized_ascender"], [29, 8, 1, "", "get_sized_descender"], [29, 8, 1, "", "get_sized_glyph_height"], [29, 8, 1, "", "get_sized_height"], [29, 8, 1, "", "get_sizes"], [29, 7, 1, "", "height"], [29, 7, 1, "", "kerning"], [29, 7, 1, "", "name"], [29, 7, 1, "", "oblique"], [29, 7, 1, "", "origin"], [29, 7, 1, "", "pad"], [29, 7, 1, "", "path"], [29, 8, 1, "", "render"], [29, 8, 1, "", "render_raw"], [29, 8, 1, "", "render_raw_to"], [29, 8, 1, "", "render_to"], [29, 7, 1, "", "resolution"], [29, 7, 1, "", "rotation"], [29, 7, 1, "", "scalable"], [29, 7, 1, "", "size"], [29, 7, 1, "", "strength"], [29, 7, 1, "", "strong"], [29, 7, 1, "", "style"], [29, 7, 1, "", "ucs4"], [29, 7, 1, "", "underline"], [29, 7, 1, "", "underline_adjustment"], [29, 7, 1, "", "use_bitmap_strikes"], [29, 7, 1, "", "vertical"], [29, 7, 1, "", "wide"]], "pygame.gfxdraw": [[30, 9, 1, "", "aacircle"], [30, 9, 1, "", "aaellipse"], [30, 9, 1, "", "aapolygon"], [30, 9, 1, "", "aatrigon"], [30, 9, 1, "", "arc"], [30, 9, 1, "", "bezier"], [30, 9, 1, "", "box"], [30, 9, 1, "", "circle"], [30, 9, 1, "", "ellipse"], [30, 9, 1, "", "filled_circle"], [30, 9, 1, "", "filled_ellipse"], [30, 9, 1, "", "filled_polygon"], [30, 9, 1, "", "filled_trigon"], [30, 9, 1, "", "hline"], [30, 9, 1, "", "line"], [30, 9, 1, "", "pie"], [30, 9, 1, "", "pixel"], [30, 9, 1, "", "polygon"], [30, 9, 1, "", "rectangle"], [30, 9, 1, "", "textured_polygon"], [30, 9, 1, "", "trigon"], [30, 9, 1, "", "vline"]], "pygame.image": [[31, 9, 1, "", "frombuffer"], [31, 9, 1, "", "frombytes"], [31, 9, 1, "", "fromstring"], [31, 9, 1, "", "get_extended"], [31, 9, 1, "", "get_sdl_image_version"], [31, 9, 1, "", "load"], [31, 9, 1, "", "load_basic"], [31, 9, 1, "", "load_extended"], [31, 9, 1, "", "save"], [31, 9, 1, "", "save_extended"], [31, 9, 1, "", "tobytes"], [31, 9, 1, "", "tostring"]], "pygame.joystick": [[32, 6, 1, "", "Joystick"], [32, 9, 1, "", "get_count"], [32, 9, 1, "", "get_init"], [32, 9, 1, "", "init"], [32, 9, 1, "", "quit"]], "pygame.joystick.Joystick": [[32, 8, 1, "", "get_axis"], [32, 8, 1, "", "get_ball"], [32, 8, 1, "", "get_button"], [32, 8, 1, "", "get_guid"], [32, 8, 1, "", "get_hat"], [32, 8, 1, "", "get_id"], [32, 8, 1, "", "get_init"], [32, 8, 1, "", "get_instance_id"], [32, 8, 1, "", "get_name"], [32, 8, 1, "", "get_numaxes"], [32, 8, 1, "", "get_numballs"], [32, 8, 1, "", "get_numbuttons"], [32, 8, 1, "", "get_numhats"], [32, 8, 1, "", "get_power_level"], [32, 8, 1, "", "init"], [32, 8, 1, "", "quit"], [32, 8, 1, "", "rumble"], [32, 8, 1, "", "stop_rumble"]], "pygame.key": [[33, 9, 1, "", "get_focused"], [33, 9, 1, "", "get_mods"], [33, 9, 1, "", "get_pressed"], [33, 9, 1, "", "get_repeat"], [33, 9, 1, "", "key_code"], [33, 9, 1, "", "name"], [33, 9, 1, "", "set_mods"], [33, 9, 1, "", "set_repeat"], [33, 9, 1, "", "set_text_input_rect"], [33, 9, 1, "", "start_text_input"], [33, 9, 1, "", "stop_text_input"]], "pygame.mask": [[35, 6, 1, "", "Mask"], [35, 9, 1, "", "from_surface"], [35, 9, 1, "", "from_threshold"]], "pygame.mask.Mask": [[35, 8, 1, "", "angle"], [35, 8, 1, "", "centroid"], [35, 8, 1, "", "clear"], [35, 8, 1, "", "connected_component"], [35, 8, 1, "", "connected_components"], [35, 8, 1, "", "convolve"], [35, 8, 1, "", "copy"], [35, 8, 1, "", "count"], [35, 8, 1, "", "draw"], [35, 8, 1, "", "erase"], [35, 8, 1, "", "fill"], [35, 8, 1, "", "get_at"], [35, 8, 1, "", "get_bounding_rects"], [35, 8, 1, "", "get_rect"], [35, 8, 1, "", "get_size"], [35, 8, 1, "", "invert"], [35, 8, 1, "", "outline"], [35, 8, 1, "", "overlap"], [35, 8, 1, "", "overlap_area"], [35, 8, 1, "", "overlap_mask"], [35, 8, 1, "", "scale"], [35, 8, 1, "", "set_at"], [35, 8, 1, "", "to_surface"]], "pygame.math": [[36, 6, 1, "", "Vector2"], [36, 6, 1, "", "Vector3"], [36, 9, 1, "", "clamp"], [36, 9, 1, "", "lerp"]], "pygame.math.Vector2": [[36, 8, 1, "", "angle_to"], [36, 8, 1, "", "as_polar"], [36, 8, 1, "", "clamp_magnitude"], [36, 8, 1, "", "clamp_magnitude_ip"], [36, 8, 1, "", "copy"], [36, 8, 1, "", "cross"], [36, 8, 1, "", "distance_squared_to"], [36, 8, 1, "", "distance_to"], [36, 8, 1, "", "dot"], [36, 8, 1, "", "elementwise"], [36, 7, 1, "", "epsilon"], [36, 8, 1, "", "from_polar"], [36, 8, 1, "", "is_normalized"], [36, 8, 1, "", "length"], [36, 8, 1, "", "length_squared"], [36, 8, 1, "", "lerp"], [36, 8, 1, "", "magnitude"], [36, 8, 1, "", "magnitude_squared"], [36, 8, 1, "", "move_towards"], [36, 8, 1, "", "move_towards_ip"], [36, 8, 1, "", "normalize"], [36, 8, 1, "", "normalize_ip"], [36, 8, 1, "", "project"], [36, 8, 1, "", "reflect"], [36, 8, 1, "", "reflect_ip"], [36, 8, 1, "", "rotate"], [36, 8, 1, "", "rotate_ip"], [36, 8, 1, "", "rotate_ip_rad"], [36, 8, 1, "", "rotate_rad"], [36, 8, 1, "", "rotate_rad_ip"], [36, 8, 1, "", "scale_to_length"], [36, 8, 1, "", "slerp"], [36, 8, 1, "", "update"]], "pygame.math.Vector3": [[36, 8, 1, "", "angle_to"], [36, 8, 1, "", "as_spherical"], [36, 8, 1, "", "clamp_magnitude"], [36, 8, 1, "", "clamp_magnitude_ip"], [36, 8, 1, "", "copy"], [36, 8, 1, "", "cross"], [36, 8, 1, "", "distance_squared_to"], [36, 8, 1, "", "distance_to"], [36, 8, 1, "", "dot"], [36, 8, 1, "", "elementwise"], [36, 7, 1, "", "epsilon"], [36, 8, 1, "", "from_spherical"], [36, 8, 1, "", "is_normalized"], [36, 8, 1, "", "length"], [36, 8, 1, "", "length_squared"], [36, 8, 1, "", "lerp"], [36, 8, 1, "", "magnitude"], [36, 8, 1, "", "magnitude_squared"], [36, 8, 1, "", "move_towards"], [36, 8, 1, "", "move_towards_ip"], [36, 8, 1, "", "normalize"], [36, 8, 1, "", "normalize_ip"], [36, 8, 1, "", "project"], [36, 8, 1, "", "reflect"], [36, 8, 1, "", "reflect_ip"], [36, 8, 1, "", "rotate"], [36, 8, 1, "", "rotate_ip"], [36, 8, 1, "", "rotate_ip_rad"], [36, 8, 1, "", "rotate_rad"], [36, 8, 1, "", "rotate_rad_ip"], [36, 8, 1, "", "rotate_x"], [36, 8, 1, "", "rotate_x_ip"], [36, 8, 1, "", "rotate_x_ip_rad"], [36, 8, 1, "", "rotate_x_rad"], [36, 8, 1, "", "rotate_x_rad_ip"], [36, 8, 1, "", "rotate_y"], [36, 8, 1, "", "rotate_y_ip"], [36, 8, 1, "", "rotate_y_ip_rad"], [36, 8, 1, "", "rotate_y_rad"], [36, 8, 1, "", "rotate_y_rad_ip"], [36, 8, 1, "", "rotate_z"], [36, 8, 1, "", "rotate_z_ip"], [36, 8, 1, "", "rotate_z_ip_rad"], [36, 8, 1, "", "rotate_z_rad"], [36, 8, 1, "", "rotate_z_rad_ip"], [36, 8, 1, "", "scale_to_length"], [36, 8, 1, "", "slerp"], [36, 8, 1, "", "update"]], "pygame.midi": [[37, 6, 1, "", "Input"], [37, 10, 1, "", "MidiException"], [37, 6, 1, "", "Output"], [37, 9, 1, "", "frequency_to_midi"], [37, 9, 1, "", "get_count"], [37, 9, 1, "", "get_default_input_id"], [37, 9, 1, "", "get_default_output_id"], [37, 9, 1, "", "get_device_info"], [37, 9, 1, "", "get_init"], [37, 9, 1, "", "init"], [37, 9, 1, "", "midi_to_ansi_note"], [37, 9, 1, "", "midi_to_frequency"], [37, 9, 1, "", "midis2events"], [37, 9, 1, "", "quit"], [37, 9, 1, "", "time"]], "pygame.midi.Input": [[37, 8, 1, "", "close"], [37, 8, 1, "", "poll"], [37, 8, 1, "", "read"]], "pygame.midi.Output": [[37, 8, 1, "", "abort"], [37, 8, 1, "", "close"], [37, 8, 1, "", "note_off"], [37, 8, 1, "", "note_on"], [37, 8, 1, "", "pitch_bend"], [37, 8, 1, "", "set_instrument"], [37, 8, 1, "", "write"], [37, 8, 1, "", "write_short"], [37, 8, 1, "", "write_sys_ex"]], "pygame.mixer": [[38, 6, 1, "", "Channel"], [38, 6, 1, "", "Sound"], [38, 9, 1, "", "fadeout"], [38, 9, 1, "", "find_channel"], [38, 9, 1, "", "get_busy"], [38, 9, 1, "", "get_init"], [38, 9, 1, "", "get_num_channels"], [38, 9, 1, "", "get_sdl_mixer_version"], [38, 9, 1, "", "init"], [40, 5, 0, "-", "music"], [38, 9, 1, "", "pause"], [38, 9, 1, "", "pre_init"], [38, 9, 1, "", "quit"], [38, 9, 1, "", "set_num_channels"], [38, 9, 1, "", "set_reserved"], [38, 9, 1, "", "stop"], [38, 9, 1, "", "unpause"]], "pygame.mixer.Channel": [[38, 8, 1, "", "fadeout"], [38, 8, 1, "", "get_busy"], [38, 8, 1, "", "get_endevent"], [38, 8, 1, "", "get_queue"], [38, 8, 1, "", "get_sound"], [38, 8, 1, "", "get_volume"], [38, 8, 1, "", "pause"], [38, 8, 1, "", "play"], [38, 8, 1, "", "queue"], [38, 8, 1, "", "set_endevent"], [38, 8, 1, "", "set_volume"], [38, 8, 1, "", "stop"], [38, 8, 1, "", "unpause"]], "pygame.mixer.Sound": [[38, 8, 1, "", "fadeout"], [38, 8, 1, "", "get_length"], [38, 8, 1, "", "get_num_channels"], [38, 8, 1, "", "get_raw"], [38, 8, 1, "", "get_volume"], [38, 8, 1, "", "play"], [38, 8, 1, "", "set_volume"], [38, 8, 1, "", "stop"]], "pygame.mixer.music": [[40, 9, 1, "", "fadeout"], [40, 9, 1, "", "get_busy"], [40, 9, 1, "", "get_endevent"], [40, 9, 1, "", "get_pos"], [40, 9, 1, "", "get_volume"], [40, 9, 1, "", "load"], [40, 9, 1, "", "pause"], [40, 9, 1, "", "play"], [40, 9, 1, "", "queue"], [40, 9, 1, "", "rewind"], [40, 9, 1, "", "set_endevent"], [40, 9, 1, "", "set_pos"], [40, 9, 1, "", "set_volume"], [40, 9, 1, "", "stop"], [40, 9, 1, "", "unload"], [40, 9, 1, "", "unpause"]], "pygame.mouse": [[39, 9, 1, "", "get_cursor"], [39, 9, 1, "", "get_focused"], [39, 9, 1, "", "get_pos"], [39, 9, 1, "", "get_pressed"], [39, 9, 1, "", "get_rel"], [39, 9, 1, "", "get_visible"], [39, 9, 1, "", "set_cursor"], [39, 9, 1, "", "set_pos"], [39, 9, 1, "", "set_visible"]], "pygame.pixelcopy": [[43, 9, 1, "", "array_to_surface"], [43, 9, 1, "", "make_surface"], [43, 9, 1, "", "map_array"], [43, 9, 1, "", "surface_to_array"]], "pygame.scrap": [[46, 9, 1, "", "contains"], [46, 9, 1, "", "get"], [46, 9, 1, "", "get_init"], [46, 9, 1, "", "get_types"], [46, 9, 1, "", "init"], [46, 9, 1, "", "lost"], [46, 9, 1, "", "put"], [46, 9, 1, "", "set_mode"]], "pygame.sndarray": [[49, 9, 1, "", "array"], [49, 9, 1, "", "get_arraytype"], [49, 9, 1, "", "get_arraytypes"], [49, 9, 1, "", "make_sound"], [49, 9, 1, "", "samples"], [49, 9, 1, "", "use_arraytype"]], "pygame.sprite": [[50, 6, 1, "", "DirtySprite"], [50, 6, 1, "", "Group"], [50, 9, 1, "", "GroupSingle"], [50, 6, 1, "", "LayeredDirty"], [50, 6, 1, "", "LayeredUpdates"], [50, 9, 1, "", "OrderedUpdates"], [50, 6, 1, "", "RenderClear"], [50, 6, 1, "", "RenderPlain"], [50, 6, 1, "", "RenderUpdates"], [50, 6, 1, "", "Sprite"], [50, 6, 1, "", "WeakDirtySprite"], [50, 6, 1, "", "WeakSprite"], [50, 9, 1, "", "collide_circle"], [50, 9, 1, "", "collide_circle_ratio"], [50, 9, 1, "", "collide_mask"], [50, 9, 1, "", "collide_rect"], [50, 9, 1, "", "collide_rect_ratio"], [50, 9, 1, "", "groupcollide"], [50, 9, 1, "", "spritecollide"], [50, 9, 1, "", "spritecollideany"]], "pygame.sprite.Group": [[50, 8, 1, "", "add"], [50, 8, 1, "", "clear"], [50, 8, 1, "", "copy"], [50, 8, 1, "", "draw"], [50, 8, 1, "", "empty"], [50, 8, 1, "", "has"], [50, 8, 1, "", "remove"], [50, 8, 1, "", "sprites"], [50, 8, 1, "", "update"]], "pygame.sprite.LayeredDirty": [[50, 8, 1, "", "change_layer"], [50, 8, 1, "", "clear"], [50, 8, 1, "", "draw"], [50, 8, 1, "", "get_clip"], [50, 8, 1, "", "repaint_rect"], [50, 8, 1, "", "set_clip"], [50, 8, 1, "", "set_timing_threshold"], [50, 8, 1, "", "set_timing_treshold"]], "pygame.sprite.LayeredUpdates": [[50, 8, 1, "", "add"], [50, 8, 1, "", "change_layer"], [50, 8, 1, "", "draw"], [50, 8, 1, "", "get_bottom_layer"], [50, 8, 1, "", "get_layer_of_sprite"], [50, 8, 1, "", "get_sprite"], [50, 8, 1, "", "get_sprites_at"], [50, 8, 1, "", "get_sprites_from_layer"], [50, 8, 1, "", "get_top_layer"], [50, 8, 1, "", "get_top_sprite"], [50, 8, 1, "", "layers"], [50, 8, 1, "", "move_to_back"], [50, 8, 1, "", "move_to_front"], [50, 8, 1, "", "remove_sprites_of_layer"], [50, 8, 1, "", "sprites"], [50, 8, 1, "", "switch_layer"]], "pygame.sprite.RenderUpdates": [[50, 8, 1, "", "draw"]], "pygame.sprite.Sprite": [[50, 8, 1, "", "add"], [50, 8, 1, "", "alive"], [50, 8, 1, "", "groups"], [50, 8, 1, "", "kill"], [50, 8, 1, "", "remove"], [50, 8, 1, "", "update"]], "pygame.surfarray": [[52, 9, 1, "", "array2d"], [52, 9, 1, "", "array3d"], [52, 9, 1, "", "array_alpha"], [52, 9, 1, "", "array_blue"], [52, 9, 1, "", "array_colorkey"], [52, 9, 1, "", "array_green"], [52, 9, 1, "", "array_red"], [52, 9, 1, "", "blit_array"], [52, 9, 1, "", "get_arraytype"], [52, 9, 1, "", "get_arraytypes"], [52, 9, 1, "", "make_surface"], [52, 9, 1, "", "map_array"], [52, 9, 1, "", "pixels2d"], [52, 9, 1, "", "pixels3d"], [52, 9, 1, "", "pixels_alpha"], [52, 9, 1, "", "pixels_blue"], [52, 9, 1, "", "pixels_green"], [52, 9, 1, "", "pixels_red"], [52, 9, 1, "", "use_arraytype"]], "pygame.tests": [[53, 9, 1, "", "run"]], "pygame.time": [[54, 6, 1, "", "Clock"], [54, 9, 1, "", "delay"], [54, 9, 1, "", "get_ticks"], [54, 9, 1, "", "set_timer"], [54, 9, 1, "", "wait"]], "pygame.time.Clock": [[54, 8, 1, "", "get_fps"], [54, 8, 1, "", "get_rawtime"], [54, 8, 1, "", "get_time"], [54, 8, 1, "", "tick"], [54, 8, 1, "", "tick_busy_loop"]], "pygame.transform": [[56, 9, 1, "", "average_color"], [56, 9, 1, "", "average_surfaces"], [56, 9, 1, "", "chop"], [56, 9, 1, "", "flip"], [56, 9, 1, "", "get_smoothscale_backend"], [56, 9, 1, "", "grayscale"], [56, 9, 1, "", "laplacian"], [56, 9, 1, "", "rotate"], [56, 9, 1, "", "rotozoom"], [56, 9, 1, "", "scale"], [56, 9, 1, "", "scale2x"], [56, 9, 1, "", "scale_by"], [56, 9, 1, "", "set_smoothscale_backend"], [56, 9, 1, "", "smoothscale"], [56, 9, 1, "", "smoothscale_by"], [56, 9, 1, "", "threshold"]], "pygame.version": [[44, 11, 1, "", "SDL"], [44, 11, 1, "", "rev"], [44, 11, 1, "", "ver"], [44, 11, 1, "", "vernum"]]}, "objnames": {"0": ["c", "macro", "C macro"], "1": ["c", "function", "C function"], "2": ["c", "functionParam", "C function parameter"], "3": ["c", "member", "C member"], "4": ["c", "type", "C type"], "5": ["py", "module", "Python module"], "6": ["py", "class", "Python class"], "7": ["py", "attribute", "Python attribute"], "8": ["py", "method", "Python method"], "9": ["py", "function", "Python function"], "10": ["py", "exception", "Python exception"], "11": ["py", "data", "Python data"]}, "objtypes": {"0": "c:macro", "1": "c:function", "2": "c:functionParam", "3": "c:member", "4": "c:type", "5": "py:module", "6": "py:class", "7": "py:attribute", "8": "py:method", "9": "py:function", "10": "py:exception", "11": "py:data"}, "terms": {"": [8, 11, 12, 14, 17, 20, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 54, 56, 58, 59, 61, 63, 64, 65, 67, 68, 69, 70, 71, 74, 84, 85, 86, 87, 88, 89], "0": [1, 2, 5, 6, 9, 11, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 52, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 88, 89], "02778": 29, "08333": 29, "0d": 73, "0dev11": 32, "0x00": 20, "0x00000000": 51, "0x00000001": 51, "0x00000004": 51, "0x00000100": 51, "0x00001000": 51, "0x00002000": 51, "0x00004000": 51, "0x00010000": 51, "0x01000000": 51, "0x10": 37, "0x10000": 29, "0x10ffff": 29, "0x11": 37, "0x12": 37, "0x13": 37, "0x7d": 37, "0x90": 37, "0xaacce": 42, "0xc0": 37, "0xd800": 29, "0xdfff": 29, "0xf0": 37, "0xf7": 37, "0xff": 20, "0xff00ff": 42, "0xffff": 23, "0xrrggbb": 20, "0xrrggbbaa": 20, "0\uac1c": [78, 79], "0\ucc28\uc6d0": 81, "1": [1, 2, 3, 5, 8, 11, 13, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84], "10": [23, 24, 26, 32, 35, 36, 45, 54, 56, 58, 59, 62, 63, 65, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85, 88, 89], "100": [20, 24, 36, 37, 51, 57, 62, 65, 84], "1000": [15, 50, 54], "101": 16, "1024": [37, 38], "105": 57, "1080": [23, 59], "1080p": 23, "10th": 35, "10\ub610\ub294": 79, "10\uc758": 76, "10\uc774": 77, "11": [32, 68, 69, 76, 77], "113": 24, "114": 42, "115": 24, "117": 26, "11\uc744": 77, "11\uc758": 76, "11\uc774": 77, "12": [10, 28, 29, 32, 44, 58, 66, 68, 76], "120": 22, "1234": 44, "125": 24, "127": [35, 37, 71, 72, 73, 79, 80, 81], "128": 65, "1280": [15, 58, 66, 84], "13": [32, 63, 65, 68, 76, 89], "135": 24, "14": [25, 32, 47, 68, 76], "140": [75, 76, 77, 78], "145": 57, "14\uc758": 76, "15": [24, 28, 32, 36, 45, 51, 58, 66, 68, 69, 76, 77], "150": [24, 45, 85], "1561": 16, "15924": 28, "15\uc758": 76, "16": [14, 22, 23, 25, 28, 29, 32, 38, 49, 59, 65, 68, 76], "1617": 16, "16711680": 59, "16bit": 38, "17": [63, 68, 76], "170": [42, 57, 58, 66], "179": 24, "17\uc5d0\uc11c\uc758": 76, "18": [24, 25, 36, 58, 63, 66, 68, 76], "187": [58, 66], "19": [68, 76], "192": 84, "1920": [23, 59], "19\ub294": 76, "19\uc5d0\uc11c": 76, "1d": [42, 73], "1e": 36, "1x1": 37, "1\uac1c": 78, "1\uac1c\uc758": 76, "1\uacfc": 77, "1\uc778": 75, "1\uc778\uc9c0": 81, "1\uc904\uc9dc\ub9ac": 76, "1\ucc28\uc6d0": 81, "1\ucd08\uc5d0": 77, "2": [1, 8, 11, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 50, 51, 52, 54, 55, 56, 57, 58, 59, 61, 63, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84], "20": [22, 24, 28, 36, 45, 56, 65, 68, 71, 72, 73, 76, 79, 80, 81, 84], "200": [24, 45, 63], "2000": [15, 63, 84], "20000": 37, "2001": [16, 63], "2004": 18, "2021": 16, "2022": 84, "204": 42, "20500": 37, "20\uc77c": 79, "20\uc904\uc9dc\ub9ac": 76, "21": [37, 63], "210": 24, "214": 16, "22": 49, "220": [24, 75, 76, 77, 78], "22000": 49, "22050": 38, "225": 24, "23": 63, "235": [58, 66], "238": [42, 58, 66], "2380": 23, "24": [17, 18, 22, 24, 28, 31, 42, 51, 52, 56, 63, 65], "240": [63, 68, 69, 70, 76, 77, 78, 79, 80, 81], "24x24": 22, "25": [32, 56, 58, 66], "250": [24, 85], "255": [1, 20, 28, 29, 30, 32, 35, 42, 43, 50, 51, 56, 57, 58, 59, 65, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85], "256": [23, 37, 51], "260": 24, "27": 37, "270": [72, 73, 80, 81], "29": 16, "299": 42, "2d": [15, 35, 42, 43, 48, 52, 63, 64, 65, 68, 73, 76, 84], "2d\uc6a9": 76, "2pre": 36, "2x2": 65, "2\uac1c\ub97c": 80, "2\uac1c\uc758": 78, "2\ucc28\uc6d0": 81, "3": [1, 16, 17, 18, 20, 22, 23, 24, 25, 28, 30, 31, 32, 33, 36, 37, 38, 39, 42, 43, 44, 45, 47, 50, 51, 56, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 76, 77, 78, 79, 81, 83, 84], "30": [22, 24, 29, 30, 32, 36, 38, 45, 53, 57, 63, 71, 84], "300": [15, 24, 45], "3072": 38, "30\uc73c\ub85c": 79, "315": 29, "32": [1, 14, 17, 18, 28, 29, 31, 35, 38, 51, 52, 56, 59, 65, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "320": [63, 68, 69, 70, 76, 77, 78, 79, 80, 81], "325": [72, 73, 80, 81], "32767": 47, "32768": 47, "32x32": 23, "33": 65, "35": 74, "359": 29, "35\ub144": 82, "36": [29, 85], "360": [20, 29, 36, 47, 58, 66], "390": 29, "3d": [23, 26, 43, 52, 63, 65, 67], "3f": 32, "3rd": 63, "3x3": 65, "3\uac1c\uc758": [76, 79], "4": [1, 3, 8, 17, 20, 24, 25, 28, 29, 33, 36, 37, 38, 39, 42, 47, 51, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 83, 84, 86, 89], "40": [15, 16, 22, 24, 54, 56, 62, 63, 71, 72, 73, 79, 80, 81, 84], "400": [22, 23, 24, 57], "4096": [37, 38], "42": 24, "425": [72, 73, 80, 81], "4321": 44, "438": 16, "44100": 38, "45": [29, 72, 73, 80, 81], "47": 89, "480": [18, 26, 39, 48, 57, 58, 59, 62, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 89], "480\uc73c\ub85c": 76, "4k": 23, "4th": 65, "4\uac1c\uc758": [76, 79], "5": [13, 20, 23, 24, 25, 29, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 49, 50, 57, 58, 61, 62, 63, 65, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 83, 89], "50": [16, 22, 24, 26, 36, 45, 57, 65, 73, 81, 84, 85], "500": [32, 45], "500m": 37, "512": 38, "55": 56, "56": 24, "587": 42, "5x5": [73, 81], "5\uac00": 77, "5\uac1c\uc758": 76, "5\uc5d0": 78, "6": [24, 26, 32, 33, 36, 38, 44, 50, 61, 62, 65, 68, 69, 70, 71, 73, 76, 77, 78, 79, 81, 83], "60": [15, 16, 22, 24, 37, 38, 39, 58, 62, 66, 69, 71, 72, 73, 77, 79, 80, 81, 84, 89], "600": [22, 59, 62], "60\uc774\ub77c\ub294": 77, "63": 20, "64": [20, 29, 56, 58, 66], "640": [16, 18, 26, 39, 48, 57, 59, 62, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 89], "640x480": [23, 62, 65], "65": [37, 56], "65280": 59, "6x": 84, "6\uc744": 79, "7": [23, 32, 33, 43, 44, 63, 65, 68, 69, 70, 71, 76, 77, 78, 79, 83], "70": 24, "700": [23, 32], "72": 29, "720": [15, 29, 84], "75": [22, 24, 69, 77], "7\uc5d0\uc11c": 79, "7\uc758": 76, "8": [14, 17, 18, 20, 22, 23, 24, 26, 28, 29, 30, 31, 32, 33, 35, 38, 42, 43, 44, 46, 49, 50, 51, 52, 54, 56, 59, 62, 63, 65, 68, 69, 70, 76, 77, 78, 83, 89], "80": [24, 50, 58, 66], "800": 59, "8191": 37, "8192": 37, "8bit": 38, "8\uc758": 76, "9": [13, 15, 17, 18, 20, 23, 25, 26, 29, 30, 32, 33, 35, 36, 37, 38, 40, 42, 43, 44, 45, 46, 47, 51, 52, 56, 57, 65, 68, 69, 70, 76, 77, 78], "90": [24, 35, 36, 38, 56, 57, 58, 66, 89], "97": 33, "9\uc758": 76, "A": [1, 4, 7, 8, 11, 12, 14, 15, 17, 18, 20, 22, 23, 24, 25, 26, 29, 30, 32, 33, 35, 38, 39, 40, 42, 43, 45, 46, 49, 50, 51, 53, 54, 56, 58, 63, 64, 85, 86, 89], "AND": [18, 33], "ANDing": 84, "AS": 18, "And": [22, 32, 58, 62, 66, 68, 69, 71, 74, 84, 85, 89], "As": [24, 29, 35, 38, 39, 44, 51, 52, 56, 57, 58, 64, 65, 67, 68, 84, 85, 86, 88, 89], "At": [26, 31, 63, 64, 65], "BE": 18, "BUT": 18, "BY": 18, "Be": [22, 23, 24, 28, 44, 65], "Being": [63, 84], "But": [26, 39, 43, 51, 58, 62, 64, 65, 68, 69, 71, 72, 74, 85, 87, 88], "By": [23, 25, 29, 35, 39, 43, 44, 51, 53, 54, 56, 57, 61, 62, 64, 85, 86], "FOR": 18, "For": [1, 15, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 56, 57, 60, 61, 62, 63, 64, 65, 67, 68, 71, 84, 85, 86, 88], "IF": 18, "IN": [18, 27], "If": [5, 9, 11, 12, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 84, 85, 87, 88, 89], "In": [17, 18, 22, 23, 27, 29, 30, 31, 32, 33, 36, 37, 39, 40, 43, 44, 51, 54, 57, 58, 59, 61, 62, 63, 64, 65, 68, 70, 72, 84, 85, 86, 87, 88, 89], "It": [2, 9, 12, 15, 17, 18, 19, 20, 23, 25, 26, 28, 29, 31, 32, 33, 36, 37, 38, 40, 42, 43, 44, 45, 47, 50, 51, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 68, 69, 72, 73, 84, 86, 87, 88, 89], "Its": 34, "NO": 18, "NOT": [18, 37, 40, 56], "No": [1, 5, 6, 8, 11, 33, 44, 45, 50, 51, 67, 70], "Not": [23, 25, 41, 45, 51, 60, 63, 64, 65, 69, 70], "OF": 18, "ON": 18, "OR": [18, 29, 35], "ORed": 38, "ORing": 33, "Of": [57, 69, 70, 71], "On": [1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 23, 25, 26, 37, 40, 44, 46, 50, 51, 56, 63, 66, 84], "One": [10, 19, 32, 63, 65, 84], "Or": [20, 26, 44, 64, 74], "SUCH": 18, "THE": 18, "TO": 18, "That": [15, 29, 56, 58, 62, 63, 64, 67, 68, 69, 70, 71, 73, 74, 84], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 63, 65, 66, 68, 71, 84, 87, 88], "Then": [10, 22, 24, 58, 62, 64, 65, 68, 71, 73, 85, 86, 88, 89], "There": [16, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 37, 39, 45, 46, 50, 51, 57, 58, 59, 60, 62, 64, 65, 69, 70, 72, 73, 85], "These": [16, 20, 22, 23, 24, 26, 29, 32, 37, 39, 44, 45, 47, 48, 50, 51, 52, 53, 56, 58, 59, 62, 64, 65, 84, 85, 87], "To": [22, 23, 25, 30, 32, 33, 35, 37, 38, 39, 40, 41, 42, 43, 47, 50, 54, 57, 58, 65, 87, 88], "Will": [4, 5, 6, 11, 32, 38, 54], "With": [26, 31, 36, 37, 51, 62, 63, 65, 85, 87, 88], "_": [20, 33], "__class__": 45, "__copy__": 35, "__dict__": 25, "__file__": [26, 58, 66], "__init__": [32, 45, 50, 57, 58, 62, 64, 66, 86, 87, 88, 89], "__main__": [32, 66, 71, 72, 73, 79, 80, 81, 85, 89], "__name__": [32, 45, 66, 71, 72, 73, 79, 80, 81, 85, 89], "__new__": [29, 45], "__repr__": 45, "__tags__": 53, "_camera": 18, "_default_lay": 50, "_freetyp": [0, 10], "_index": 1, "_layer": 50, "_pixels_address": 51, "_pygam": 10, "_rect": 45, "_sdl2": 48, "_spin": [58, 66], "_sprite__g": 64, "_spritegroup": 64, "_tag": 53, "_test": 53, "_time_threshold": 50, "_use_upd": 50, "_walk": [58, 66], "a0": 37, "a6f89747b551": 44, "a_mask": 35, "aa": [20, 30, 65], "aaa": 65, "aacircl": 30, "aaellips": 30, "aalib": 23, "aalin": 24, "aapolygon": [24, 30], "aatrigon": 30, "abandon": 18, "abil": [44, 58, 63], "abl": [31, 32, 42, 58, 63, 84, 89], "abnorm": 89, "abort": 37, "about": [9, 15, 18, 19, 23, 25, 26, 28, 32, 36, 37, 39, 42, 44, 48, 50, 51, 55, 58, 59, 61, 62, 63, 64, 65, 67, 68, 70, 71, 72, 73, 74, 84, 85, 87, 88], "abov": [14, 18, 19, 22, 23, 24, 28, 29, 32, 40, 41, 42, 43, 45, 48, 57, 58, 62, 64, 65, 74, 84, 87], "absent": 23, "absolut": [19, 20, 29, 32, 37, 40, 51, 84], "abspath": [58, 66], "abstractgroup": 50, "acceler": [23, 24, 30, 41, 48, 51, 56, 63, 69], "accept": [14, 24, 26, 28, 29, 30, 31, 38, 39, 45, 50, 51, 52, 62], "access": [8, 9, 15, 17, 19, 24, 25, 26, 28, 29, 32, 35, 37, 38, 39, 41, 43, 44, 46, 50, 51, 59, 64, 65, 67, 84], "accident": 84, "accommod": 62, "accord": [20, 43, 56, 69], "accordingli": 51, "account": [32, 33, 36, 38, 40, 42, 56, 68], "accur": [39, 40, 54], "achiev": [62, 86], "acolor": 20, "acquir": [9, 51, 52], "across": [22, 23, 33, 58, 62, 65, 66, 84, 87, 88, 89], "act": [36, 58, 63, 70], "action": [25, 63, 65, 88], "activ": [23, 25, 38, 39, 40, 49, 51, 52, 55, 59, 72, 74], "activeev": [23, 25], "actual": [4, 11, 18, 19, 22, 23, 25, 28, 30, 32, 37, 38, 40, 41, 43, 45, 50, 51, 54, 56, 58, 59, 62, 63, 64, 65, 73, 84, 85, 88], "ad": [10, 23, 24, 25, 29, 31, 32, 33, 35, 38, 39, 40, 42, 43, 44, 45, 47, 50, 54, 56, 58, 64, 65, 68, 69, 70, 72, 73, 84, 87, 89], "add": [23, 29, 48, 50, 57, 58, 61, 62, 63, 64, 65, 68, 69, 70, 89], "add_intern": 64, "add_map": 47, "addit": [22, 23, 24, 25, 26, 32, 33, 36, 37, 44, 46, 48, 50, 51, 84], "addition": [23, 24, 47, 62], "address": [17, 51, 84, 86], "adequ": 72, "adjac": [24, 30], "adjust": [8, 20, 23, 28, 29, 37, 71, 89], "admit": 84, "adopt": [48, 61], "advanc": [15, 28, 29, 47, 50, 51, 58, 62, 63, 67, 70], "advancedinputoutput1": 80, "advancedinputoutput2": 80, "advancedinputoutput3": 80, "advancedinputoutput4": 80, "advancedinputoutput5": 80, "advancedoutputalpha1": 81, "advancedoutputalpha2": 81, "advancedoutputalpha3": 81, "advancedoutputprocess1": 79, "advancedoutputprocess2": 79, "advancedoutputprocess3": 79, "advancedoutputprocess4": 79, "advancedoutputprocess5": 79, "advancedoutputprocess6": 79, "advancemam": 56, "advantag": [59, 63, 64, 67, 84, 87], "advic": 63, "advis": [18, 22, 23], "ae": 28, "affect": [11, 23, 24, 29, 38, 42, 44, 45, 50, 51, 52, 65, 74], "afraid": 65, "after": [17, 19, 23, 24, 28, 29, 31, 32, 33, 37, 38, 40, 47, 49, 50, 51, 57, 58, 59, 62, 63, 65, 68, 69, 70, 84, 89], "again": [18, 33, 40, 44, 50, 51, 54, 59, 61, 62, 64, 65, 84, 85, 88, 89], "against": [29, 31, 44, 45, 56, 57, 64], "ago": 63, "agp": 65, "ahead": [24, 32], "ai": [86, 89], "aid": 29, "aim": 61, "alexei": 74, "algorithm": [24, 35, 44, 56, 67, 70, 84], "alia": [25, 31, 46, 50], "alias": [15, 23, 28, 29, 85], "aliceblu": 21, "alien": [26, 64], "alien1": 62, "align": [29, 35, 36, 45], "aliv": [17, 50, 64], "all": [15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 47, 48, 50, 51, 52, 53, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 84, 85, 86, 87, 88], "all_my_sprites_list": 84, "allblack": 65, "alloc": [9, 31, 38, 68], "allot": 53, "allow": [15, 18, 20, 22, 23, 25, 27, 28, 29, 31, 32, 36, 38, 42, 44, 45, 46, 50, 51, 56, 57, 58, 59, 62, 64, 65, 87, 89], "allowedchang": 38, "allsprit": [58, 66], "almost": [15, 58, 61, 63, 64, 65, 67, 86], "alon": [26, 84], "along": [24, 25, 26, 29, 37, 45, 53, 62, 63, 64, 65, 66, 74, 87], "alpha": [1, 20, 23, 24, 26, 28, 29, 30, 31, 35, 43, 44, 48, 51, 52, 56, 63, 65, 86], "alreadi": [9, 19, 23, 25, 29, 32, 37, 38, 40, 45, 47, 50, 57, 62, 63, 64, 65, 84, 88], "alsa": 37, "also": [10, 12, 14, 15, 17, 19, 20, 22, 23, 25, 26, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 47, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 72, 73, 84, 85, 86, 87, 88, 89], "alt": [25, 33], "alter": [35, 39, 56], "altern": [19, 23, 24, 26, 28, 29, 30, 45], "altgr": 33, "although": [58, 68, 86], "alwai": [18, 23, 25, 26, 28, 29, 30, 31, 32, 33, 35, 39, 41, 44, 45, 47, 49, 50, 51, 54, 56, 58, 59, 60, 62, 63, 64, 65, 68, 69, 70, 71, 77, 84, 86, 87, 89], "always\ubb38": [76, 77], "always\ubb38\uacfc": 79, "always\ubb38\uc5d0": [76, 77], "always\ubb38\uc5d0\uc11c": 76, "always\ubb38\uc758": 77, "always\ubb38\uc774": 77, "ambigu": 38, "among": 18, "amongst": 15, "amount": [23, 25, 28, 29, 32, 39, 54, 55, 56, 58, 63], "ampersand": 33, "amplitud": 49, "an": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 67, 69, 84, 85, 86, 87, 88, 89], "an_id": 37, "analog": [32, 42, 47], "andal": 29, "andmask": [22, 39], "android": [25, 33], "angl": [24, 29, 30, 35, 36, 48, 56, 57, 87, 89], "angle_to": 36, "angular": 87, "ani": [1, 9, 15, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 37, 38, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 74, 84, 85, 86, 87, 88], "anim": [15, 26, 31, 50, 56, 62, 63, 64, 67], "anisotrop": 44, "annoi": [15, 61, 73], "anoth": [10, 20, 23, 24, 26, 28, 29, 30, 32, 33, 35, 36, 39, 40, 42, 43, 45, 46, 47, 48, 50, 51, 62, 63, 64, 65, 73, 74, 84, 86, 89], "ansi": 37, "ansi_not": 37, "answer": [63, 84], "anti": [15, 23, 29, 85], "antialia": 28, "antialias": [24, 28, 29, 30, 56, 58], "anticip": [44, 69], "antiquewhit": 21, "antiquewhite1": 21, "antiquewhite2": 21, "antiquewhite3": 21, "antiquewhite4": 21, "anymor": 84, "anyon": 64, "anyth": [15, 19, 23, 27, 44, 50, 51, 58, 62, 63, 64, 65, 74, 84], "anywai": [65, 70, 85], "anywher": [12, 50, 62], "apart": 38, "api": [15, 18, 23, 25, 30, 33, 37, 46, 47, 48, 57, 84], "app": [23, 26, 44, 57], "app_didenterbackground": 25, "app_didenterforeground": 25, "app_lowmemori": 25, "app_termin": 25, "app_willenterbackground": 25, "app_willenterforeground": 25, "appear": [15, 23, 25, 54, 62, 63, 64, 70, 84], "append": [27, 57, 62, 64, 69, 73, 81, 84], "appli": [20, 24, 26, 29, 35, 36, 37, 51, 55, 56, 65, 84], "applic": [0, 17, 23, 25, 26, 27, 33, 34, 37, 38, 46, 51, 59, 84, 88], "approach": 61, "appropri": [23, 25, 39, 58, 59, 64, 69, 88], "approxim": [32, 35, 51, 57], "aptitud": 74, "aqua": 21, "aquamarin": 21, "aquamarine1": 21, "aquamarine2": 21, "aquamarine3": 21, "aquamarine4": 21, "ar": [1, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 85, 86, 87, 88, 89], "arang": 65, "arbitrari": [50, 56, 62], "arbitrarili": 23, "arc": [24, 30], "arcad": [63, 84], "architectur": 56, "archiv": [28, 29, 84], "area": [11, 23, 24, 26, 28, 29, 32, 35, 44, 45, 48, 50, 51, 56, 57, 58, 62, 63, 64, 66, 68, 72, 84, 85, 87, 88, 89], "aren": [58, 62, 84], "arg": [26, 50, 53], "argb": 31, "argb_premult": 31, "argument": [1, 2, 3, 9, 11, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 38, 39, 40, 41, 43, 44, 45, 47, 48, 50, 51, 53, 54, 56, 58, 59, 62, 64, 84, 85], "aris": 18, "arithmet": [20, 36, 42, 65], "arkanoid": 69, "arm": 84, "around": [15, 23, 24, 26, 32, 36, 39, 42, 45, 48, 54, 57, 58, 59, 62, 63, 65, 84, 85, 86, 89], "arrai": [1, 2, 3, 15, 20, 22, 26, 29, 31, 33, 38, 42, 49, 51, 62, 63, 65, 72, 73, 80], "arrang": [65, 68], "array2d": [52, 65], "array3d": [52, 65], "array_alpha": [52, 65], "array_blu": 52, "array_colorkei": [43, 52, 65], "array_green": 52, "array_r": 52, "array_to_surfac": 43, "arraydemo": [15, 26, 65], "arraytyp": [26, 49, 52], "arrayxd": 65, "arriv": 84, "arrow": [22, 26, 33, 62, 70], "art": [67, 74], "articl": [62, 63], "artifact": 56, "as_joystick": 47, "as_polar": 36, "as_spher": 36, "ascend": 29, "ascent": [28, 29], "ascii": [14, 22, 33, 52, 67], "asid": 67, "ask": [23, 28, 29, 57, 58, 59, 62, 63, 84], "aspect": [44, 45], "assembl": 33, "assembli": 63, "assert": 62, "assertequ": 56, "assertnotequ": 56, "asset": 84, "assign": [20, 25, 29, 32, 42, 45, 47, 50, 53, 58, 62, 65, 88], "assist": [51, 84], "associ": [7, 29, 48, 55], "assum": [1, 9, 11, 20, 28, 29, 37, 39, 45, 51, 57, 61, 64, 86, 88], "asterisk": 33, "asteroid": 84, "astyp": 65, "asurf": 31, "asymmetr": 36, "asyncblit": 51, "asynchron": 51, "attach": [9, 23, 26, 47, 57], "attack": [36, 63], "attempt": [18, 28, 29, 37, 51, 58, 60, 65], "attent": [63, 70], "attract": 70, "attribut": [5, 23, 25, 27, 28, 29, 30, 32, 33, 34, 35, 36, 39, 44, 45, 50, 51, 53, 54, 58, 64, 85, 87, 88, 89], "attributeerror": [29, 64], "audio": [25, 26, 37, 38, 44, 46, 49, 63], "audio_allow_any_chang": 38, "audio_allow_channels_chang": 38, "audio_allow_format_chang": 38, "audio_allow_frequency_chang": 38, "audiodevic": 25, "audiodevicead": 25, "audiodeviceremov": 25, "august": 16, "author": [18, 28, 33, 36, 45, 51, 56, 57, 58, 59, 60, 62, 63, 64, 65, 84], "automat": [12, 19, 23, 28, 29, 30, 31, 32, 33, 34, 37, 38, 44, 46, 50, 51, 58, 60, 65, 68, 69], "avail": [0, 9, 16, 18, 20, 22, 23, 26, 27, 28, 29, 30, 31, 36, 37, 38, 41, 44, 45, 46, 49, 51, 52, 53, 55, 56, 58, 59, 60, 62, 63, 64, 65, 84], "avalanch": 74, "averag": [28, 29, 53, 54, 56, 57, 65, 84], "average_color": [56, 57], "average_surfac": [56, 57], "avid": 84, "avoid": [19, 23, 28, 33, 36, 38, 42, 53, 65, 84, 89], "awai": [15, 23, 25, 36, 64, 71, 89], "awar": [23, 25, 28, 44, 65, 84], "awhil": 19, "awkward": [62, 84], "ax": [23, 29, 32, 47, 87], "axi": [24, 25, 29, 36, 39, 42, 47, 48, 49, 52, 56, 85, 87], "axis_numb": 32, "azimuth": 36, "azur": 21, "azure1": 21, "azure2": 21, "azure3": 21, "azure4": 21, "b": [20, 24, 26, 32, 33, 36, 42, 43, 45, 46, 47, 51, 56, 65], "b0": 47, "b3": 47, "b_black": [73, 81], "b_height": [73, 81], "b_red": [73, 81], "b_width": [73, 81], "bach": 40, "back": [19, 28, 29, 32, 33, 37, 38, 50, 57, 58, 59, 66, 68, 88, 89], "backend": [18, 23, 25, 43, 44, 56, 59], "background": [24, 25, 26, 28, 29, 38, 44, 50, 57, 61, 64, 66, 84, 85, 87, 89], "backslash": 33, "backslashreplac": 44, "backspac": 33, "backward": [23, 25, 29, 38, 54], "backyard": 63, "bad": 84, "bagic": [76, 77, 78], "baker": 63, "ball": [25, 32, 61, 63, 69, 75, 76, 77, 78, 79, 80, 81, 85, 86, 88], "ball_numb": 32, "ballrect": [63, 75, 76, 77, 78, 79, 80, 81], "ballsprit": 89, "banner": [15, 26, 58, 66], "bar": [71, 79], "barrier": 67, "base": [0, 10, 17, 18, 24, 25, 26, 28, 29, 35, 36, 48, 50, 57, 58, 62, 64, 65, 66, 67, 68, 84, 87, 89], "baselin": [28, 29], "basic": [15, 18, 20, 23, 26, 31, 46, 58, 61, 62, 63, 64, 65, 76, 84, 86, 87, 88, 89], "bat": 61, "battleship": [67, 75], "bayer": 18, "bb": 20, "bdf": 29, "beam": 22, "bear": [28, 29, 39], "beauti": 62, "becam": 25, "becaus": [24, 27, 29, 33, 36, 37, 45, 51, 58, 61, 64, 65, 67, 68, 69, 70, 72, 73, 84, 85, 86, 87, 88, 89], "becom": [23, 25, 29, 38, 40, 49, 51, 52, 62, 63, 64, 65, 68, 73, 84], "been": [19, 20, 22, 23, 24, 25, 29, 32, 36, 38, 39, 40, 44, 46, 47, 50, 51, 59, 60, 62, 63, 64, 84, 88, 89], "befor": [9, 17, 18, 19, 22, 23, 27, 28, 29, 32, 33, 35, 37, 38, 39, 40, 44, 46, 47, 50, 51, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 70, 71, 84, 87, 88], "beforehand": 25, "begin": [15, 17, 18, 26, 38, 40, 45, 56, 62, 63, 65, 69, 87], "beginn": 65, "behalf": 17, "behavior": [29, 31, 36, 39, 50], "behaviour": [23, 39, 44, 46, 89], "behind": [15, 23, 31, 50, 87, 88, 89], "beig": 21, "being": [8, 18, 23, 24, 25, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 46, 62, 63, 64, 69, 84, 88], "believ": 84, "belong": [50, 58, 64, 85], "below": [15, 18, 20, 23, 24, 26, 27, 32, 37, 44, 45, 47, 50, 57, 62, 71], "bend": 37, "benefit": [50, 62, 64], "besid": [19, 26, 65], "best": [12, 18, 23, 25, 26, 35, 38, 42, 43, 51, 52, 59, 62, 63, 64, 65, 72, 86], "bet": 59, "better": [23, 28, 30, 37, 39, 40, 51, 56, 62, 63, 64, 65, 71, 84, 85], "between": [1, 3, 20, 23, 24, 25, 28, 29, 32, 33, 35, 36, 37, 38, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 64, 65, 67, 70, 84], "beyond": 84, "bezier": 30, "bg": 57, "bgcolor": 29, "bgd": 50, "bgr": [31, 51, 65], "bgra": 31, "bgsurf": 50, "bid": 58, "big": [17, 18, 44, 50, 57, 62, 64, 65, 70, 71, 72], "bigger": [15, 23, 58, 73], "biggest": [23, 59], "bilinear": 56, "bin": [66, 85, 86, 87], "binari": [15, 18, 20, 22, 41], "bind": [37, 59], "bisqu": 21, "bisque1": 21, "bisque2": 21, "bisque3": 21, "bisque4": 21, "bit": [1, 14, 15, 17, 18, 22, 23, 25, 26, 28, 29, 30, 31, 32, 35, 38, 40, 42, 43, 49, 50, 51, 52, 56, 57, 58, 59, 61, 62, 64, 65, 84, 87, 89], "bitblt": 62, "bitmap": [22, 29, 31, 56, 62], "bitmap_1": 22, "bitmap_2": 22, "bitmask": [22, 33, 35, 50, 51], "bitsiz": [23, 35, 59], "bitstream": [28, 29], "bitstreamverasan": 28, "bitwis": [23, 33, 35], "bl": 89, "bla": 31, "black": [21, 22, 23, 24, 26, 29, 35, 42, 51, 56, 57, 58, 63, 65, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84], "blade": 63, "blanchedalmond": 21, "blank": [28, 57, 62, 84, 85], "blanket": [43, 51], "blend": [20, 24, 26, 29, 44, 48, 51], "blend_add": 51, "blend_alpha_sdl2": 51, "blend_fil": 26, "blend_max": 51, "blend_min": 51, "blend_mod": 48, "blend_mult": 51, "blend_premultipl": 51, "blend_premultipli": [20, 51], "blend_rgb_add": 51, "blend_rgb_max": 51, "blend_rgb_min": 51, "blend_rgb_mult": 51, "blend_rgb_sub": 51, "blend_rgba_add": 51, "blend_rgba_max": 51, "blend_rgba_min": 51, "blend_rgba_mult": 51, "blend_rgba_sub": 51, "blend_sub": 51, "blend_xxx": 26, "blendmod": 50, "blink": 67, "blit": [11, 20, 23, 26, 28, 29, 30, 32, 43, 48, 50, 51, 52, 56, 57, 58, 61, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 89], "blit_arrai": [43, 52, 65], "blit_blend": 26, "blit_hw": [23, 59], "blit_hw_a": [23, 59], "blit_hw_cc": [23, 59], "blit_sequ": 51, "blit_sw": [23, 59], "blit_sw_a": [23, 59], "blit_sw_cc": [23, 59], "blitter": [44, 51, 62], "blitzbas": 26, "blit\uc774": 76, "blit\ud568\uc218\ub294": 76, "blob": [56, 57], "block": [17, 18, 25, 35, 40, 50, 51, 57, 58, 63, 73, 84], "block_list": 50, "blocks_hit_list": 50, "bloodi": 63, "blt": 62, "blue": [1, 18, 20, 21, 23, 24, 28, 31, 42, 51, 52, 56, 57, 65, 68, 71, 72, 73, 79, 80, 81, 85, 87], "blue1": 21, "blue2": 21, "blue3": 21, "blue4": 21, "blueviolet": 21, "bluish": 65, "bmp": [31, 46, 62, 63], "board": [73, 81], "bodi": 70, "bold": [28, 29], "bomb": 64, "bonu": 62, "book": 84, "bool": [17, 18, 19, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 50, 51, 56], "boolean": [25, 28, 32, 33, 39, 56, 62, 64], "boom": 64, "boom_sound": 64, "border": [23, 24, 30, 39, 45, 48], "border_bottom_left_radiu": 24, "border_bottom_right_radiu": 24, "border_radiu": 24, "border_top_left_radiu": 24, "border_top_right_radiu": 24, "borderless": 48, "bore": [67, 86], "borrow": [1, 63, 86], "both": [19, 23, 24, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 42, 50, 51, 56, 57, 62, 63, 64, 65, 67, 71, 74, 84, 87, 89], "bother": [58, 61, 86], "bottleneck": 84, "bottom": [23, 24, 26, 28, 29, 30, 31, 35, 45, 50, 63, 75, 76, 77, 78, 79, 80, 81, 89], "bottomleft": [45, 89], "bottomright": [45, 89], "bounc": [26, 36, 56, 63, 89], "bound": [22, 24, 29, 35, 50, 51], "boundari": [24, 29], "box": [24, 29, 30, 33, 57, 64, 88], "br": 89, "bracket": [33, 87], "break": [18, 30, 33, 46, 54, 62, 88], "breakag": 42, "breakdown": 63, "brief": [19, 26, 44, 61, 62], "briefli": 85, "bright": [18, 57], "brighten": 23, "brightmap": 65, "bring": [50, 63, 84], "broadcast": [42, 65], "broader": 84, "broken": [39, 44], "broken_x": 22, "brought": 56, "brown": 21, "brown1": 21, "brown2": 21, "brown3": 21, "brown4": 21, "bu": 65, "buffer": [1, 2, 18, 20, 23, 31, 37, 38, 43, 46, 51, 58, 63, 64], "buffer_s": 37, "bufferproxi": [0, 15, 17, 31, 51], "buffers": [37, 38], "bug": [20, 44, 56, 63, 84, 89], "build": [44, 64, 65, 85, 89], "built": [14, 18, 28, 29, 31, 44, 47, 84, 85], "builtin": [18, 28, 64], "bullet": [64, 84], "bump": 84, "bumper": 32, "bunch": [57, 64, 84], "bundl": [28, 29], "burlywood": 21, "burlywood1": 21, "burlywood2": 21, "burlywood3": 21, "burlywood4": 21, "busi": [18, 19, 38, 54, 62], "button": [24, 25, 26, 27, 32, 33, 39, 47, 58, 61, 62, 69, 73, 80, 84, 85, 88], "button1": 39, "button2": 39, "button3": 39, "button4": 39, "button5": 39, "bx": 47, "bye": 68, "bypass": 44, "byte": [9, 14, 17, 18, 20, 22, 23, 28, 29, 31, 37, 38, 42, 43, 44, 46, 51], "byte_data": 46, "bytearrai": 31, "bytecod": 63, "byteord": 17, "bytes": [17, 23, 35, 51, 59], "bytestr": 38, "b\u00e9zier": 30, "b\uac12": 76, "c": [10, 15, 17, 18, 20, 26, 28, 30, 33, 43, 44, 45, 51, 60, 63, 65, 67, 75], "c_api": 0, "cach": 29, "cache_s": 29, "cadetblu": 21, "cadetblue1": 21, "cadetblue2": 21, "cadetblue3": 21, "cadetblue4": 21, "cadillac": 64, "calcnewpo": [87, 89], "calcul": [24, 29, 35, 36, 40, 42, 50, 68, 69, 72, 73, 87, 88], "calibr": 57, "call": [1, 9, 12, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 50, 51, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 84, 85, 86, 87, 88, 89], "callabl": [17, 44, 50], "callback": [1, 2, 17, 50], "caller": [9, 37], "calling_mask": 35, "cam": 57, "came": [26, 31], "camera": [15, 26, 44, 84], "camlist": 57, "can": [1, 8, 9, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 84, 85, 86, 87, 88, 89], "candid": [12, 33], "cannot": [14, 18, 23, 25, 28, 30, 38, 40, 45, 48, 50, 51, 52, 54, 62, 63, 64, 69, 84, 86, 89], "canva": [68, 71], "cap": 33, "capabl": [23, 59, 63, 86, 87], "capslock": 33, "caption": [23, 68], "captur": [15, 18, 25, 26, 31, 32], "capword": 25, "card": [23, 38, 65], "care": [9, 27, 38, 58, 65, 72, 85], "caret": 33, "carri": 89, "case": [15, 18, 20, 23, 24, 28, 29, 31, 33, 36, 37, 38, 40, 43, 44, 51, 57, 58, 59, 62, 64, 68, 70, 72, 73, 74, 84, 85, 87, 88], "castl": 63, "catch": [44, 64, 89], "categor": 64, "categori": 84, "caught": 63, "caus": [2, 18, 20, 25, 28, 35, 40, 42, 44, 56, 58, 64, 65, 66, 68, 84, 88], "caveat": 23, "cc": 57, "ccolor": 57, "cd": 19, "cdrom": 63, "cdrom_tag": 53, "cdrom_test": 53, "ceil": 63, "center": [24, 26, 30, 32, 35, 44, 45, 48, 50, 51, 57, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85], "centeri": 45, "centerx": [45, 58, 66, 85], "center\ub77c\ub294": 76, "centr": 44, "centroid": [35, 57], "certain": [20, 25, 33, 36, 57, 58, 61, 67, 68, 69, 70, 71, 72, 84], "certainli": [62, 65], "cff": 29, "challeng": [63, 84], "chanc": [38, 65, 84], "chang": [15, 18, 20, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 57, 58, 59, 61, 63, 64, 65, 68, 69, 70, 71, 73, 84, 87, 88, 89], "change_color": 56, "change_lay": 50, "channel": [7, 20, 31, 37, 38, 40, 51, 65, 84], "channelnum": 7, "char": [1, 6, 9, 28, 29, 51], "char_bit": 35, "charact": [14, 17, 23, 28, 29, 33, 43, 44, 52, 62, 84, 88], "character": 36, "characterist": [20, 74], "charset": 46, "chart": 65, "chartreus": 21, "chartreuse1": 21, "chartreuse2": 21, "chartreuse3": 21, "chartreuse4": 21, "chase": 64, "chaser": 64, "chatroom": 62, "cheap": [50, 64], "check": [3, 4, 5, 6, 7, 8, 11, 15, 18, 23, 25, 26, 28, 32, 35, 38, 39, 40, 42, 44, 46, 47, 49, 50, 52, 57, 58, 60, 62, 63, 64, 67, 68, 70, 71, 72, 84, 85, 86, 87, 88, 89], "checkout": 44, "chew": 54, "chief": 86, "child": 51, "chimp": [15, 26, 61, 64, 86], "chimpanze": 15, "chocol": 21, "chocolate1": 21, "chocolate2": 21, "chocolate3": 21, "chocolate4": 21, "choic": [18, 23, 38, 57], "choos": [18, 22, 23, 26, 59, 61, 65, 73, 84], "chop": 56, "choppi": 62, "chord": 84, "chore": 84, "chose": 73, "chosen": [18, 23, 29], "chromin": 18, "chunk": [7, 17, 89], "circl": [15, 22, 24, 26, 30, 32, 50, 57], "circular": 64, "circumst": 89, "claim": 18, "clamp": [26, 36, 45], "clamp_ip": 45, "clamp_magnitud": 36, "clamp_magnitude_ip": 36, "clariti": 35, "clark": 84, "class": [0, 15, 17, 19, 20, 26, 29, 31, 32, 35, 37, 38, 45, 51, 57, 61, 62, 66, 84, 86, 89], "classless": [86, 87], "classmethod": 48, "claus": 89, "clean": [39, 42, 58, 60, 62, 63, 64, 84], "cleaner": [62, 63], "cleanli": [60, 62, 63, 64, 89], "cleanup": 42, "clear": [15, 23, 24, 25, 32, 33, 35, 38, 43, 48, 50, 51, 62, 63, 64, 67, 75, 84], "clear_callback": 50, "clearer": 60, "clench": [58, 66], "click": [15, 22, 24, 26, 32, 33, 39, 69, 72, 84, 85], "client": 25, "clip": [24, 26, 45, 50, 51, 62], "clipboard": [15, 25, 26], "clipboardupd": 25, "cliplin": 45, "clipped_lin": 45, "clist": 57, "clock": [15, 22, 24, 32, 39, 54, 58, 62, 66, 69, 70, 71, 72, 73, 77, 78, 79, 80, 81, 84, 89], "clockwis": [29, 30, 36, 56, 87], "clone": 20, "close": [9, 15, 18, 22, 23, 24, 25, 26, 29, 32, 37, 40, 42, 47, 56, 57, 62, 65, 85, 86], "close_to_play": 64, "close_to_player2": 64, "close_to_player3": 64, "closest": [23, 37, 38, 59], "cmy": 20, "co": [87, 89], "cocoa": 23, "code": [5, 14, 15, 17, 18, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 35, 39, 42, 43, 44, 45, 46, 50, 51, 56, 57, 58, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 84, 85, 86, 87, 88, 89], "codec": 44, "codepoint": 28, "coder": 84, "coercion": 65, "col": 30, "collect": [12, 23, 33, 50, 51, 60, 84], "collid": [35, 45, 50, 58, 64, 66, 87, 89], "collide_circl": 50, "collide_circle_ratio": 50, "collide_mask": [35, 50], "collide_rect": 50, "collide_rect_ratio": 50, "collided_cal": 50, "collidedict": 45, "collidedictal": 45, "collidelist": 45, "collidelistal": 45, "collideobject": 45, "collideobjectsal": 45, "collidepoint": [45, 72, 73, 80, 81, 84, 89], "collidepoint\ub97c": 80, "colliderect": [45, 50, 58, 66, 89], "colliding_sprit": 50, "collis": [26, 35, 36, 45, 50, 57, 67, 89], "collision_box": 45, "colon": 33, "color": [0, 1, 10, 15, 22, 23, 24, 28, 29, 30, 31, 35, 42, 43, 48, 50, 51, 52, 56, 57, 58, 59, 62, 63, 65, 67, 68, 71, 72, 73, 80, 81, 84, 85], "color_valu": 20, "colordict": 21, "colorkei": [23, 26, 28, 29, 31, 43, 51, 52, 56, 58, 63, 65, 66], "colormap": [26, 43, 52], "colorspac": 18, "colour": [20, 44, 51], "column": [35, 42, 65, 73, 81], "com": 56, "combin": [23, 29, 33, 45, 50, 51, 56, 63, 64, 84, 89], "come": [25, 26, 28, 29, 37, 44, 57, 62, 63, 64, 65, 66, 84, 87, 88, 89], "comfort": [15, 87], "comma": [28, 29, 33, 37, 65], "command": [24, 25, 26, 32, 53, 65, 67, 68, 69, 70], "comment": [26, 61, 64, 66, 87, 89], "commerci": [15, 63], "commit": [33, 63], "common": [23, 28, 29, 47, 50, 56, 60, 61, 62, 63, 84], "commun": [25, 48, 84], "compani": 63, "compar": [33, 35, 36, 42, 44, 50, 56, 63, 68, 84], "comparison": [20, 25, 26, 42, 65, 70, 74], "compat": [23, 25, 29, 31, 38, 48, 50, 54, 67, 86], "compens": 63, "compil": [13, 15, 19, 22, 25, 28, 29, 31, 38, 41, 44], "complement": 36, "complet": [24, 33, 38, 40, 45, 50, 51, 52, 63, 64, 84, 89], "complex": [38, 58, 63, 64, 67, 69, 84, 86, 87, 88], "complic": [68, 84], "compon": [20, 35, 36, 43, 51, 65, 68], "composit": 33, "compositor": 44, "compound": 46, "compound_text": 46, "compress": [40, 51], "comput": [15, 18, 19, 26, 28, 31, 32, 38, 54, 58, 62, 63, 64, 69, 74, 84], "concept": [15, 61, 62, 63, 65, 69, 74, 84], "concern": [64, 74], "conclud": 63, "conclus": 74, "concret": 84, "concurr": 84, "condit": [18, 22, 38, 68, 89], "confid": 84, "configur": [15, 23, 29, 39, 59, 65], "confin": [48, 62], "confus": [24, 62, 68, 84], "connect": [24, 26, 30, 32, 35, 47, 61, 62, 74, 86], "connected_compon": [35, 57], "connenct": 32, "consequ": 86, "consequenti": 18, "consid": [23, 24, 25, 29, 35, 36, 38, 40, 44, 45, 50, 51, 56, 84, 89], "consider": 51, "consider_alpha": 56, "consist": [19, 24, 25, 27, 38, 46, 61, 65, 85, 86], "consol": [26, 44, 53, 67], "const": [1, 6, 9, 70], "constant": [15, 22, 25, 29, 33, 38, 39, 44, 46, 47, 54, 57, 60, 62, 68, 72], "constrain": [24, 39, 70], "construct": [36, 45, 62], "constructor": [29, 32, 50, 58, 64], "consum": [1, 54, 65, 84], "contact": [57, 58, 59, 60, 62, 63, 64, 65], "contain": [0, 6, 8, 15, 19, 22, 23, 24, 25, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 43, 45, 46, 47, 50, 51, 53, 55, 58, 62, 63, 64, 66, 84, 86, 88, 89], "content": [23, 34, 41, 42, 46, 58, 59, 68, 70], "context": [9, 23, 42, 48, 84], "contigu": [17, 24, 51], "continu": [35, 38, 44, 50, 51, 63, 85], "contract": [18, 56], "contrast": [39, 70, 87], "contribut": 64, "contributor": 18, "control": [4, 15, 18, 22, 25, 26, 28, 29, 33, 34, 38, 41, 44, 50, 51, 52, 53, 54, 56, 58, 59, 60, 61, 62, 63, 69, 70, 78, 84, 86], "controller_axis_lefti": 47, "controller_axis_leftx": 47, "controller_axis_righti": 47, "controller_axis_rightx": 47, "controller_axis_triggerleft": 47, "controller_axis_triggerright": 47, "controller_button_a": 47, "controller_button_b": 47, "controller_button_back": 47, "controller_button_dpad_down": 47, "controller_button_dpad_left": 47, "controller_button_dpad_right": 47, "controller_button_dpad_up": 47, "controller_button_guid": 47, "controller_button_i": 47, "controller_button_leftshould": 47, "controller_button_leftstick": 47, "controller_button_rightshould": 47, "controller_button_rightstick": 47, "controller_button_start": 47, "controller_button_x": 47, "controlleraxismot": 47, "controllerbuttondown": 47, "controllerbuttonup": 47, "controllerdevicead": [25, 47], "controllerdeviceremap": [25, 47], "controllerdeviceremov": [25, 47], "controllertouchpaddown": 47, "controllertouchpadmot": 47, "controllertouchpadup": 47, "convei": 22, "conveni": [36, 44, 50, 53, 62, 63, 84], "convent": 47, "convers": [1, 18, 20, 35, 42, 52, 84], "convert": [1, 18, 20, 22, 24, 29, 31, 37, 38, 40, 43, 45, 49, 51, 52, 58, 59, 62, 65, 66, 85, 86, 89], "convert_alpha": [26, 31, 51, 86, 89], "convolut": [35, 65], "convolv": 35, "cool": 84, "cooper": 19, "coord": 57, "coordin": [8, 22, 24, 29, 30, 32, 35, 36, 39, 50, 51, 56, 85, 89], "copi": [17, 22, 26, 31, 35, 36, 38, 42, 45, 46, 48, 49, 50, 51, 52, 56, 58, 62, 63, 64, 65, 84, 85], "copyright": 18, "coral": 21, "coral1": 21, "coral2": 21, "coral3": 21, "coral4": 21, "cord": 26, "core": 84, "coremidi": 37, "corner": [24, 29, 30, 35, 39, 42, 44, 50, 51, 56, 57, 58, 62, 84, 89], "cornflowerblu": 21, "cornsilk": 21, "cornsilk1": 21, "cornsilk2": 21, "cornsilk3": 21, "cornsilk4": 21, "correct": [18, 22, 28, 41, 45, 51, 56, 62, 65, 68, 73], "correct_gamma": 20, "correctli": [24, 36, 37, 38, 56, 57, 58, 62, 65], "correspond": [29, 33, 35, 37, 42, 51, 53, 68, 84, 89], "could": [22, 25, 33, 36, 41, 45, 48, 49, 50, 52, 56, 57, 58, 61, 62, 64, 65, 85, 86, 87], "couldn": [86, 89], "count": [17, 19, 32, 35, 38, 42, 56, 57, 69, 73], "counterclockwis": [24, 29, 36, 56], "coupl": [32, 58, 62, 64, 65], "courier": 29, "cours": [57, 69, 70, 71, 85, 86, 87, 89], "cover": [15, 24, 33, 44, 45, 51, 56, 57, 59, 62, 74, 84, 85], "coverag": 24, "cprofil": 84, "cpu": [24, 54, 67, 75, 84], "crash": [41, 64], "creat": [1, 2, 5, 6, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 31, 32, 33, 35, 36, 38, 39, 41, 42, 43, 45, 47, 48, 49, 50, 51, 52, 54, 56, 57, 59, 63, 64, 65, 66, 74, 84, 85, 86, 87, 88, 89], "create_graphics_screen": 62, "create_screen": 62, "creation": [28, 29, 32, 47, 49, 50, 52, 62], "creativ": 74, "crect": 57, "crimson": 21, "critic": 84, "critter": [58, 66], "crop": [45, 56], "cross": [32, 36, 58, 63, 65, 86], "crossbar": 26, "crossbon": 22, "crossfad": 65, "crosshair": 22, "crt": 23, "crucial": 84, "crude": [26, 58, 62], "cryptic": 64, "ctrl": 25, "cube": 26, "cui": [67, 68, 73, 81], "cui\uac00": 75, "cui\uace0": 75, "cui\ud658\uacbd\uc5d0\uc11c\ub9cc": 76, "current": [13, 18, 19, 22, 23, 25, 26, 27, 28, 29, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 58, 59, 62, 63, 64, 67, 68, 69, 71, 84, 87, 88, 89], "current_h": [23, 59], "current_level": 36, "current_w": [23, 59], "cursor": [15, 26, 39, 58, 63, 84], "cursor_arg": 22, "cursor_index": 22, "cursorfil": 22, "curv": 30, "custom": [15, 23, 25, 26, 38, 50, 63], "custom_typ": 25, "customis": 86, "cut": [38, 46, 84], "cutout": 62, "cx1": 45, "cx2": 45, "cy1": 45, "cy2": 45, "cyan": 21, "cyan1": 21, "cyan2": 21, "cyan3": 21, "cyan4": 21, "c\ub85c": 75, "d": [32, 33, 51, 62, 84, 85, 87], "da": 61, "dai": [63, 64, 84], "damag": 18, "dark": [58, 63], "darkblu": 21, "darkcyan": 21, "darken": 23, "darkgoldenrod": 21, "darkgoldenrod1": 21, "darkgoldenrod2": 21, "darkgoldenrod3": 21, "darkgoldenrod4": 21, "darkgrai": 21, "darkgreen": 21, "darkgrei": 21, "darkkhaki": 21, "darkmagenta": 21, "darkolivegreen": 21, "darkolivegreen1": 21, "darkolivegreen2": 21, "darkolivegreen3": 21, "darkolivegreen4": 21, "darkorang": 21, "darkorange1": 21, "darkorange2": 21, "darkorange3": 21, "darkorange4": 21, "darkorchid": 21, "darkorchid1": 21, "darkorchid2": 21, "darkorchid3": 21, "darkorchid4": 21, "darkr": 21, "darksalmon": 21, "darkseagreen": 21, "darkseagreen1": 21, "darkseagreen2": 21, "darkseagreen3": 21, "darkseagreen4": 21, "darkslateblu": 21, "darkslategrai": 21, "darkslategray1": 21, "darkslategray2": 21, "darkslategray3": 21, "darkslategray4": 21, "darkslategrei": 21, "darkturquois": 21, "darkviolet": 21, "data": [0, 2, 15, 17, 18, 19, 22, 26, 31, 35, 37, 38, 39, 40, 41, 43, 46, 51, 56, 58, 62, 63, 65, 66, 68, 70, 71, 72, 73, 84, 86, 89], "data1": 37, "data2": 37, "data3": 37, "data_dir": [58, 66], "datatyp": 65, "date": 84, "david": 84, "dead": 27, "deal": [33, 44, 65, 68, 84, 88], "dealloc": 32, "dealt": [25, 27, 88], "death": 63, "debat": 84, "debug": [25, 56, 84, 88], "decapit": 63, "decept": 72, "decid": [25, 27, 35, 58, 61, 64, 68, 84], "decim": 24, "decis": 84, "declar": [8, 62, 65], "decod": [22, 29, 33, 46, 63], "decor": 85, "decreas": [38, 45, 72], "decrement": 9, "dedic": 64, "deeper": 84, "deeppink": 21, "deeppink1": 21, "deeppink2": 21, "deeppink3": 21, "deeppink4": 21, "deepskyblu": 21, "deepskyblue1": 21, "deepskyblue2": 21, "deepskyblue3": 21, "deepskyblue4": 21, "def": [29, 32, 35, 39, 45, 50, 56, 57, 58, 62, 64, 66, 71, 72, 73, 79, 80, 81, 85, 86, 87, 88, 89], "default": [1, 14, 18, 20, 22, 23, 24, 25, 26, 28, 29, 31, 33, 35, 36, 37, 38, 40, 43, 44, 45, 48, 50, 51, 53, 54, 56, 58, 59, 62, 63], "default_id": 37, "default_lay": 50, "defin": [1, 2, 3, 6, 7, 8, 10, 11, 25, 28, 29, 34, 36, 44, 46, 50, 58, 61, 62, 84, 85, 88], "definit": [46, 60, 64, 65, 70], "deflat": 89, "degre": [29, 30, 35, 36, 52, 56, 58, 87, 89], "del": [25, 32, 65], "delai": [26, 33, 37, 54, 69, 84], "delet": [25, 33, 62, 64, 84], "deliv": 37, "delta": [15, 36], "demo": [26, 58, 65], "demonstr": [15, 26, 36, 58, 65], "denot": [40, 45, 54], "depend": [14, 23, 25, 28, 29, 31, 35, 38, 40, 42, 43, 46, 49, 58, 63, 66, 69, 71, 84], "deprec": [20, 23, 24, 25, 26, 27, 29, 32, 36, 49, 50, 51, 52], "deprecationwarn": [49, 52], "depth": [15, 18, 23, 35, 42, 48, 51, 52, 56, 57, 58, 59, 62], "deriv": [26, 44, 50, 58, 64, 84], "descend": 29, "descent": [28, 29], "describ": [1, 17, 22, 23, 37, 39, 45, 57, 59, 86], "descript": [1, 18, 22, 25, 29, 33, 34, 44, 46, 62, 64], "design": [17, 50, 61, 62, 63, 64, 68, 71, 88], "desir": [18, 51, 56, 58, 59, 84], "desktop": [23, 48, 59, 84], "desper": 62, "dest": [29, 35, 48, 51, 56, 65], "dest_rect": 56, "dest_siz": 56, "dest_surf": 56, "dest_surfac": 56, "destin": [18, 28, 29, 30, 35, 42, 50, 51, 56, 62, 63, 85], "destroi": [1, 11, 48, 64], "destruct": [56, 58], "destsurfac": 18, "detail": [15, 23, 24, 29, 32, 33, 34, 35, 36, 37, 41, 50, 51, 56, 57, 61, 71, 84], "detect": [23, 26, 35, 36, 42, 44, 45, 50, 57], "determin": [19, 20, 22, 23, 24, 25, 28, 29, 31, 33, 36, 37, 40, 41, 50, 51, 56, 59, 64, 65, 68, 69, 72, 87], "dev": [18, 57], "dev13": 25, "dev3": [25, 54], "dev7": 39, "dev8": 24, "deva": 28, "devanagari": 28, "develop": [23, 28, 33, 36, 39, 44, 45, 48, 51, 53, 56, 63, 67, 84, 86], "devic": [15, 18, 19, 25, 26, 32, 33, 37, 39, 44, 47, 55, 57, 59, 63, 84], "device_id": [26, 37], "device_index": [25, 32], "devicenam": 38, "dga": 23, "diagon": [35, 56], "diagram": [87, 88], "diamond": 22, "dict": [1, 5, 17, 20, 23, 25, 32, 35, 45, 47, 51, 53, 55], "dictionari": [1, 5, 23, 25, 45, 47, 50, 53, 64, 84], "did": [18, 24, 62, 63, 64], "didn": [84, 85], "diff": 65, "differ": [15, 18, 19, 20, 22, 23, 25, 26, 27, 28, 29, 30, 32, 33, 35, 38, 40, 42, 44, 48, 50, 51, 56, 57, 58, 59, 60, 62, 63, 64, 65, 68, 69, 70, 84, 85, 87, 88], "difficult": [37, 61, 63], "digit": [20, 32, 36], "dilemma": 67, "dimens": [17, 18, 23, 24, 26, 28, 29, 30, 35, 36, 42, 43, 45, 50, 51, 52, 56, 58, 65, 89], "dimension": [20, 24, 29, 30, 35, 36, 42, 62, 65], "dimgrai": 21, "dimgrei": 21, "direct": [18, 23, 24, 25, 26, 29, 30, 32, 36, 39, 43, 47, 51, 58, 62, 65, 70, 84, 87, 89], "directfb": 23, "directli": [14, 17, 22, 24, 25, 28, 29, 31, 33, 42, 43, 46, 49, 51, 52, 53, 62, 64, 65, 67, 84], "directmedia": 63, "directori": [23, 28, 29, 53, 58, 62, 67, 68, 86], "directx": [23, 37, 63], "dirti": [50, 64, 84], "dirty_rect": 84, "dirtysprit": 50, "disabl": [23, 25, 29, 33, 44, 47, 51, 54, 58, 66], "disable_advanced_featur": 44, "disadvantag": [59, 84], "disallow": 23, "disappear": [18, 30, 46], "disc": 19, "discard": 54, "disclaim": 18, "disconnect": [32, 61], "discontinu": [17, 51, 67], "discourag": 27, "discov": [63, 84], "discret": 71, "discuss": [64, 84], "disk": [50, 84], "displac": 69, "displai": [0, 1, 15, 22, 24, 25, 26, 30, 32, 33, 34, 36, 38, 39, 41, 44, 46, 48, 50, 51, 53, 57, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "display_index": [25, 48], "distanc": [36, 42, 56], "distance_squared_to": 36, "distance_to": 36, "distil": 84, "distort": 23, "distribut": [15, 18, 53, 58], "dive": 68, "divers": 61, "divid": [33, 61], "divis": [20, 22, 84], "dizzi": [58, 66], "do": [8, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 32, 33, 35, 41, 42, 44, 45, 50, 51, 56, 57, 58, 59, 60, 61, 63, 64, 65, 67, 68, 69, 74, 85, 86, 87, 88, 89], "doc": [23, 27, 48, 50, 51, 70, 78, 84], "document": [18, 34, 38, 44, 51, 57, 59, 61, 62, 63, 64, 65, 84, 86, 87], "dodgerblu": 21, "dodgerblue1": 21, "dodgerblue2": 21, "dodgerblue3": 21, "dodgerblue4": 21, "doe": [3, 4, 7, 12, 19, 22, 23, 24, 25, 26, 28, 29, 30, 32, 33, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 50, 51, 54, 56, 57, 58, 62, 64, 65, 68, 84, 86, 88], "doesn": [18, 23, 26, 28, 29, 44, 51, 58, 62, 64, 72, 73, 84, 86, 87, 88, 89], "dokil": [50, 64], "dokill1": [50, 64], "dokill2": [50, 64], "dollar": 33, "domain": 26, "don": [9, 18, 24, 26, 29, 32, 36, 50, 54, 56, 57, 58, 61, 62, 63, 64, 65, 68, 70, 74, 85, 86, 87, 89], "done": [24, 28, 29, 32, 40, 58, 62, 63, 65, 68, 70, 71, 84, 87], "doreturn": 51, "dot": [29, 36], "doubl": [9, 22, 23, 56, 58, 63, 65], "doublebuf": [23, 84], "doubler": 56, "down": [23, 29, 32, 33, 39, 44, 47, 51, 57, 59, 62, 63, 65, 68, 69, 71, 72, 84, 88], "download": [63, 89], "down\ub41c": 80, "dpad": 47, "dpi": 29, "drastic": 85, "draw": [15, 20, 23, 28, 29, 31, 32, 35, 48, 50, 51, 57, 62, 63, 64, 66, 67, 68, 71, 72, 73, 79, 80, 81, 84, 85, 89], "draw_blend_mod": 48, "draw_bottom_left": 24, "draw_bottom_right": 24, "draw_circle_part": 24, "draw_color": 48, "draw_lin": 48, "draw_point": 48, "draw_rect": [45, 48], "draw_top_left": 24, "draw_top_right": 24, "drawboard": [73, 81], "drawbutton": [72, 73, 80, 81], "drawbuttons\uc5d0": 80, "drawhp": [71, 72, 73, 79, 80, 81], "drawhp\ub77c\ub294": 79, "drawn": [23, 24, 30, 32, 35, 50, 51, 58, 62, 63, 64, 68, 84, 85], "dream": 67, "drew": 62, "drift": 32, "drive": 19, "driven": [23, 50, 67], "driver": [23, 37, 44, 59], "drivernam": 44, "drop": [25, 29, 38], "dropbegin": 25, "dropcomplet": 25, "dropfil": 25, "dropout": 38, "droptext": 25, "dstobj": 11, "dstrect": [11, 48], "dt": 15, "dualshock": 47, "due": [20, 23, 25, 36, 51, 84], "dull": 84, "dummi": [58, 64, 88], "dump": 53, "dungeon": 63, "duplic": [50, 51], "durat": [32, 47], "dure": [18, 23, 29, 30, 33, 40, 42, 52, 65], "dvd": [19, 69, 77], "dx": [25, 35, 51, 87, 89], "dy": [25, 35, 51, 87, 89], "dynam": [9, 69, 84], "e": [5, 20, 23, 24, 28, 30, 31, 32, 33, 35, 36, 37, 38, 44, 45, 50, 51, 57, 61, 84, 85, 87, 88], "each": [17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 32, 35, 36, 38, 39, 42, 46, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 63, 64, 65, 71, 84, 85, 87, 88, 89], "earli": [15, 48, 63, 84], "earlier": [26, 40, 43, 62], "easi": [15, 26, 48, 59, 60, 61, 62, 63, 64, 65, 70, 84, 88, 89], "easier": [45, 50, 51, 59, 60, 62, 87], "easiest": [26, 47, 62, 71, 85], "easili": [22, 44, 57, 58, 60, 62, 64, 65, 69, 74, 84, 87], "east": 22, "eat": 64, "echo": 26, "eclass": 9, "eclecti": 57, "ed": [51, 64], "edg": [24, 28, 39, 45, 56, 89], "edit": [33, 47], "editbox": 84, "editor": [33, 84], "effect": [15, 23, 25, 26, 28, 32, 40, 44, 46, 47, 50, 51, 56, 57, 58, 62, 63, 64, 65, 73, 84, 86], "effici": [15, 23, 25, 28, 50, 62, 64, 84], "effort": 74, "eg": [26, 29, 31], "eight": 26, "either": [14, 17, 19, 22, 23, 29, 31, 32, 36, 38, 39, 45, 50, 51, 56, 58, 59, 89], "eject": 19, "element": [3, 17, 20, 29, 36, 37, 42, 43, 49, 51, 62, 64, 65], "elementari": 87, "elementwis": 36, "elif": [39, 58, 66, 69, 70, 71, 72, 73, 77, 78, 79, 80, 81, 88, 89], "ellips": [15, 24, 30], "ellipt": [24, 30], "els": [1, 8, 33, 36, 43, 44, 45, 46, 50, 58, 59, 64, 66, 69, 86, 89], "elsewher": [1, 84], "else\ubb38\uc740": 77, "emb": 23, "embed": [23, 29], "emit": 39, "emoji": 28, "emphasi": 84, "emploi": 84, "empti": [5, 19, 23, 25, 27, 28, 29, 32, 33, 35, 44, 45, 46, 50, 53, 59, 64], "emul": [23, 28, 39, 59], "enabl": [23, 25, 28, 29, 33, 44, 47, 48, 63, 67], "encapsul": 88, "enclos": [24, 50, 68], "encod": [9, 14, 22, 28, 29, 40, 44, 46, 51], "encode_file_path": 44, "encode_str": 44, "encount": 35, "end": [19, 24, 25, 30, 31, 33, 38, 40, 44, 45, 50, 58, 61, 62, 63, 66, 69, 74, 84, 85, 88], "end_index": 65, "end_po": 24, "endcap": [24, 30], "endev": [38, 40], "endian": [17, 44], "endpoint": [24, 30, 45], "enemi": [36, 64], "engin": [63, 67, 84], "enhanc": [15, 28, 29], "enjoy": 70, "enlarg": 29, "enough": [29, 50, 57, 58, 60, 62, 63, 64, 65, 67, 71, 84], "ensur": [23, 25, 27, 33, 38, 53, 62, 63, 84, 85, 86], "entail": 84, "enter": [25, 28, 33, 39, 48, 58, 67], "entertain": 32, "entir": [15, 19, 23, 24, 35, 38, 48, 50, 51, 62, 63, 64, 68, 69, 70, 72, 84], "entiti": 62, "entri": [17, 33, 51, 84], "enumer": 18, "env": [66, 86], "env_var": 44, "environ": [23, 25, 28, 32, 37, 44, 46, 63, 67, 68, 86, 87], "epsilon": 36, "equal": [13, 17, 20, 22, 24, 25, 29, 33, 35, 36, 51, 67, 73], "equat": [35, 69], "equip": 65, "equival": [17, 29, 35, 37, 42, 43, 84], "eras": [32, 35, 50, 58, 62, 63, 64, 84], "err": [86, 89], "errno": 37, "error": [1, 2, 6, 9, 11, 20, 23, 25, 26, 28, 29, 33, 36, 37, 43, 44, 46, 51, 53, 56, 58, 60, 64, 65, 74, 84, 86], "error_msg": 44, "errorstr": 44, "esc": 26, "escap": [14, 29, 33, 58, 84, 89], "especi": [25, 29, 44, 64, 65, 86], "essenti": 65, "etc": [25, 31, 32, 37, 42, 45, 61, 65, 67, 84], "etyp": 44, "euclidean": [36, 42], "euro": 33, "eval": 53, "evalu": 58, "even": [14, 18, 19, 23, 24, 26, 28, 29, 32, 36, 40, 42, 44, 54, 57, 62, 63, 64, 65, 67, 68, 72, 84], "event": [0, 15, 18, 22, 23, 24, 26, 32, 33, 34, 37, 38, 39, 40, 47, 54, 57, 61, 62, 63, 66, 67, 69, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 89], "event_nam": 25, "eventlist": [25, 26], "eventtyp": [5, 25], "eventu": [12, 23, 25], "event\ubb38": [76, 78], "event\ubb38\uc5d0": 80, "event\ubb38\uc5d0\uc11c": 79, "event\ubb38\uc744": 79, "event\ubb38\uc774": 78, "ever": [37, 40, 59], "everi": [15, 18, 19, 22, 25, 26, 32, 33, 35, 36, 38, 40, 44, 50, 51, 52, 54, 56, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 74, 84, 85, 86, 88], "everyth": [25, 43, 44, 62, 63, 64, 65, 66, 67, 68, 73, 84, 85, 89], "evil": 84, "evolv": 26, "ex": [39, 70], "exact": [20, 22, 23, 24, 31, 32, 39, 57, 72, 73], "exactli": [37, 42, 45, 51, 58, 62, 63, 64, 65, 68, 84], "examin": 15, "exampl": [10, 15, 17, 20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 49, 50, 51, 53, 56, 57, 60, 61, 62, 63, 64, 67, 68, 70, 71, 74, 84, 85, 86, 87, 88], "exce": 51, "exceedingli": 29, "excel": [58, 62, 63], "except": [1, 3, 4, 5, 6, 7, 8, 9, 11, 14, 20, 22, 23, 24, 25, 28, 29, 31, 33, 37, 38, 44, 45, 46, 51, 56, 59, 60, 61, 65, 69, 86, 89], "exchang": 42, "excit": [58, 62, 63, 65], "exclaim": 33, "exclud": [17, 25, 51, 53], "exclus": [37, 51, 59], "execut": [15, 39, 53, 66, 67, 68, 69, 70, 71, 73, 84], "exemplari": 18, "exist": [18, 19, 22, 23, 24, 25, 28, 29, 32, 33, 37, 47, 48, 50, 51, 64], "exit": [23, 24, 32, 37, 44, 48, 62, 63, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 85, 86, 89], "expand": [56, 61], "expans": 56, "expect": [20, 27, 31, 33, 36, 37, 38, 39, 43, 53, 57, 62], "expens": 65, "experi": [25, 63, 64, 70], "experiment": [18, 23, 25, 28, 30, 33, 36, 44, 45, 46, 48, 51, 56, 57], "expir": 53, "explain": [58, 62, 64, 68, 71, 73, 86, 87, 89], "explan": [26, 36, 60, 64, 66, 68, 70, 84], "explanatori": 58, "explicit": [23, 39, 43], "explicitli": [18, 23, 29, 30, 42, 54, 56, 58, 60], "explor": 63, "explos": 64, "export": [0, 10, 20, 31, 38, 42, 43, 51], "expos": [2, 10, 29, 43, 51], "express": [18, 20], "extend": [17, 24, 31, 44, 50], "extens": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 31, 56, 63], "extern": [22, 25, 49, 52, 67], "extptr": 9, "extra": [22, 29, 38, 45, 50, 51, 58, 59, 62, 63, 64, 65, 70, 84, 89], "extract": [42, 56, 58], "extrem": [26, 58, 62, 65], "ey": 63, "f": [1, 17, 18, 32, 33, 45, 84, 86, 89], "f1": 33, "f10": 33, "f11": 33, "f12": 33, "f13": 33, "f14": 33, "f15": 33, "f2": 33, "f3": 33, "f4": 33, "f5": 33, "f6": 33, "f7": 33, "f8": 33, "f9": 33, "face": 15, "fact": [30, 64, 84], "factor": [26, 29, 56, 65], "fade": [26, 38, 40, 65], "fade_m": [38, 40], "fadeout": [38, 40], "fail": [23, 25, 27, 29, 44, 53, 58, 60, 84], "failur": [1, 2, 3, 4, 5, 7, 8, 53], "fairli": [50, 60, 63, 84, 86, 87], "fake": [26, 28, 53], "fall": [28, 29, 50], "fals": [2, 4, 5, 6, 11, 12, 15, 17, 18, 19, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 50, 53, 56, 57, 58, 62, 66, 89], "famili": 28, "familiar": [62, 63, 64, 84, 85, 88], "fan": 15, "fantast": 62, "far": [20, 36, 58, 62, 71, 84, 87, 88, 89], "farther": [58, 62], "fast": [32, 35, 42, 51, 52, 56, 58, 62, 63, 64, 65, 69, 84], "faster": [31, 36, 44, 50, 51, 52, 56, 58, 64, 65, 67, 84], "fastest": [23, 51, 58, 63], "fastev": 27, "fastrendergroup": 26, "favorit": 84, "favour": 27, "fbcon": 23, "fear": 84, "featur": [15, 23, 25, 26, 27, 28, 29, 35, 36, 44, 45, 50, 51, 56, 59, 64, 65, 84, 87], "fed": 18, "feed": 89, "feedback": [23, 28, 33, 36, 45, 51, 56], "feel": [26, 62, 64, 84], "felt": 63, "fetch": 50, "fever": [58, 66], "few": [22, 28, 54, 62, 63, 64, 65, 74, 84, 86], "ffff": 14, "fgcolor": 29, "field": [4, 8, 12, 17, 32, 37], "fighter": 63, "figur": [62, 84], "file": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 22, 23, 25, 26, 28, 29, 31, 38, 40, 44, 49, 53, 58, 61, 63, 65, 67, 68, 73, 84, 86], "file_path": [26, 28], "filenam": [6, 22, 28, 29, 31, 38, 40, 62, 86], "filenotfounderror": [86, 89], "fileobj": [31, 40], "filesystem": 14, "fill": [5, 8, 9, 15, 22, 23, 24, 25, 26, 29, 30, 32, 35, 39, 43, 48, 50, 51, 56, 57, 58, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 89], "fill_rect": 48, "filled_": 30, "filled_circl": 30, "filled_ellips": 30, "filled_polygon": 30, "filled_trigon": 30, "fill\ud568\uc218\ub098": 76, "filter": [15, 25, 35, 56, 65], "fin": 26, "final": [22, 26, 28, 29, 42, 44, 51, 58, 61, 62, 71, 84, 85, 86, 89], "final_level": 36, "find": [15, 18, 19, 23, 24, 25, 26, 28, 32, 35, 36, 38, 50, 51, 56, 57, 58, 59, 62, 63, 64, 65, 69, 71, 84, 87, 89], "find_channel": 38, "fine": [38, 51, 59, 64, 84], "finer": 57, "finger": [55, 70, 86], "finger_id": 25, "fingerdown": 25, "fingermot": 25, "fingerup": 25, "finish": [12, 33, 38, 40, 51, 60, 61, 62, 63, 65, 84], "finit": 35, "fire": [65, 84], "firebrick": 21, "firebrick1": 21, "firebrick2": 21, "firebrick3": 21, "firebrick4": 21, "firmer": [61, 63], "first": [3, 17, 19, 24, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 42, 43, 45, 49, 50, 51, 52, 54, 57, 58, 59, 60, 61, 63, 64, 65, 68, 69, 70, 71, 72, 73, 84, 85, 87, 88, 89], "firstli": 70, "fist": [15, 58, 66], "fist_offset": [58, 66], "fit": [16, 18, 23, 29, 38, 45, 51, 85], "five": [38, 39, 40], "fix": [25, 29, 51, 56, 63, 65, 68, 69, 71, 84, 89], "fixed_s": 29, "fixed_width": 29, "flag": [1, 17, 20, 23, 24, 26, 28, 29, 32, 34, 35, 43, 50, 51, 58, 59, 64, 84], "flame": 65, "flash": 15, "flavor": 84, "flesh": 15, "flexibl": [15, 60, 64, 86, 87], "flip": [15, 18, 22, 23, 24, 25, 31, 32, 35, 39, 42, 45, 48, 50, 56, 57, 58, 63, 65, 66, 75, 76, 77, 78, 79, 80, 81, 84, 85, 89], "flip_i": [48, 56], "flip_x": [48, 56], "float": [1, 17, 19, 20, 24, 25, 29, 30, 32, 35, 36, 38, 40, 45, 48, 50, 54, 56, 65], "flood": [73, 81], "floor": 20, "floralwhit": 21, "flourish": 70, "flush": [31, 37], "fly": [45, 84, 85, 88], "fnt": 29, "focu": [23, 25, 32, 33, 39, 44, 48, 57, 67], "folder": [58, 63], "folk": 62, "follow": [17, 18, 22, 24, 25, 26, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 45, 46, 47, 49, 50, 52, 58, 61, 63, 64, 65, 66, 67, 84], "font": [6, 15, 26, 32, 44, 58, 60, 63, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85], "font_index": [6, 29], "fonti": 26, "foo": 84, "fool": [63, 65], "forbidden": 9, "forc": [23, 26, 38, 44, 63], "forcibli": 38, "forego": 25, "foreground": [25, 29], "foreign": 62, "forestgreen": 21, "forev": [62, 84], "forget": [32, 64, 87], "form": [18, 22, 25, 30, 37, 51, 84, 85], "formal": 62, "format": [18, 20, 22, 23, 24, 29, 30, 31, 35, 37, 38, 40, 41, 42, 43, 44, 45, 49, 51, 52, 56, 58, 59, 62, 63, 65, 68, 84, 85], "formula": [20, 36, 42, 44, 51, 56, 87], "forth": 58, "fortun": [26, 62, 65], "forward": 33, "found": [15, 20, 26, 28, 29, 33, 34, 35, 37, 45, 49, 50, 51, 52, 58, 59, 62, 65, 70, 85, 88], "four": [3, 19, 22, 23, 24, 29, 45, 52, 70, 89], "fourth": [22, 71], "fout": 26, "fp": [15, 46, 50, 69, 77, 84], "fpsclock": [69, 70, 71, 72, 73, 77, 78, 79, 80, 81], "fps\uac00": 77, "fps\uac12\uc774": 77, "fps\ub294": 77, "fps\ub300\ub85c": 77, "fraction": 29, "frame": [15, 18, 23, 25, 27, 32, 44, 50, 54, 57, 58, 62, 63, 64, 69, 77, 84, 85, 88, 89], "framebuff": 23, "framer": [15, 18, 54, 57, 58, 62], "framework": [26, 63, 84], "free": [9, 25, 26, 40, 62, 64, 84], "freed": 11, "freedom": [15, 63], "freesansbold": 28, "freetyp": [6, 15, 26, 28, 29, 44], "freetype2": 29, "freetype_misc": [26, 29], "frequenc": [37, 38], "frequency_to_midi": 37, "frequent": [32, 62, 64, 69, 84], "fresh": 84, "friendli": [24, 68], "friendlier": 63, "frill": 64, "from": [0, 3, 5, 6, 8, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85, 86, 87, 88, 89], "from_display_modul": 48, "from_joystick": 47, "from_polar": 36, "from_spher": 36, "from_surfac": [35, 48, 50], "from_threshold": [35, 57], "from_window": 48, "frombuff": 31, "frombyt": 31, "fromstr": 31, "front": 50, "frontend": 25, "frozen": [53, 84], "frustrat": 84, "ftfont": [28, 29], "fuchsia": 21, "full": [15, 23, 25, 26, 27, 28, 29, 31, 32, 38, 39, 40, 42, 50, 51, 56, 57, 58, 59, 62, 63, 64, 66, 70, 84, 85, 86, 89], "fulli": [20, 23, 33, 45, 48, 50, 51, 52, 58, 62, 65, 84], "fullnam": [58, 66, 86, 89], "fullscreen": [23, 34, 48, 50, 59], "fullscreen_desktop": 48, "fun": [26, 57, 62, 63, 65, 84], "func": 45, "function": [0, 1, 7, 8, 9, 12, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 60, 61, 63, 64, 66, 67, 68, 69, 70, 72, 73, 84, 85, 87, 88, 89], "fundament": [61, 84], "funni": 64, "further": 46, "furthermor": [68, 70, 71], "futur": [18, 19, 23, 25, 27, 28, 29, 32, 37, 38, 41, 46, 64], "g": [20, 23, 24, 26, 28, 30, 31, 33, 36, 37, 42, 43, 44, 45, 50, 51, 56, 84, 87, 88], "gain": [23, 25, 29, 57, 84], "gainsboro": 21, "game": [15, 16, 18, 22, 23, 25, 26, 27, 32, 39, 44, 47, 51, 54, 57, 59, 60, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 86, 88, 89], "gameobject": [62, 84], "gamepad": [25, 47], "gameplai": [33, 64, 89], "gamma": [20, 23], "gap": [17, 51], "garbag": [12, 50, 51], "gather": 59, "gaussian": 65, "gener": [1, 15, 23, 25, 26, 31, 32, 33, 36, 37, 39, 40, 42, 47, 51, 52, 56, 57, 58, 63, 64, 65, 68, 73, 84, 86, 89], "generateboard": [73, 81], "geniu": 74, "geometri": [67, 71], "get": [2, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 37, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 85, 86, 87, 88, 89], "get_abs_offset": 51, "get_abs_par": 51, "get_act": 23, "get_al": 19, "get_allow_screensav": 23, "get_alpha": [51, 86, 89], "get_and_flip": 57, "get_arraytyp": [49, 52], "get_asc": 28, "get_at": [35, 51, 56, 58, 65, 66, 84], "get_at_map": [20, 51], "get_axi": [32, 47], "get_backend": 18, "get_bal": 32, "get_bits": 51, "get_block": 25, "get_bold": 28, "get_bottom_lay": 50, "get_bounding_rect": [35, 51], "get_buff": [2, 17, 51], "get_busi": [19, 38, 40], "get_button": [32, 47], "get_bytes": [42, 51], "get_cache_s": 29, "get_capt": 23, "get_clip": [50, 51], "get_colorkei": 51, "get_control": [18, 57], "get_count": [19, 32, 37, 47], "get_curr": 19, "get_cursor": 39, "get_default_font": [28, 29], "get_default_input_id": 37, "get_default_output_id": 37, "get_default_resolut": 29, "get_desc": 28, "get_desktop_s": [23, 59], "get_devic": 55, "get_device_info": 37, "get_driv": [23, 59], "get_empti": 19, "get_endev": [38, 40], "get_error": [29, 44], "get_eventst": 47, "get_extend": 31, "get_fing": 55, "get_flag": 51, "get_focus": [23, 33, 39], "get_font": 28, "get_fp": 54, "get_grab": 25, "get_guid": 32, "get_hardwar": 41, "get_hat": 32, "get_height": [15, 28, 51], "get_id": [19, 32], "get_imag": [18, 57], "get_init": [19, 23, 27, 28, 29, 32, 37, 38, 44, 46, 47, 49, 58, 60, 66], "get_instance_id": 32, "get_ital": 28, "get_keyboard_grab": 25, "get_layer_of_sprit": 50, "get_length": 38, "get_lines": 28, "get_lock": 51, "get_loss": 51, "get_map": 47, "get_mask": 51, "get_metr": 29, "get_mod": 33, "get_nam": [19, 32], "get_num_channel": 38, "get_num_devic": 55, "get_num_displai": 23, "get_num_fing": 55, "get_numax": 32, "get_numbal": 32, "get_numbutton": 32, "get_numhat": 32, "get_numtrack": 19, "get_offset": 51, "get_palett": 51, "get_palette_at": 51, "get_par": 51, "get_paus": 19, "get_pitch": 51, "get_po": [39, 40, 58, 66, 84], "get_power_level": 32, "get_press": [15, 33, 39, 62, 84], "get_queu": 38, "get_raw": [18, 38], "get_rawtim": 54, "get_rect": [29, 35, 48, 50, 51, 56, 58, 62, 63, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 85, 86, 87, 88, 89], "get_rel": 39, "get_repeat": 33, "get_sdl_byteord": 44, "get_sdl_image_vers": 31, "get_sdl_mixer_vers": 38, "get_sdl_ttf_vers": 28, "get_sdl_vers": [23, 44], "get_shift": 51, "get_siz": [18, 29, 35, 42, 51, 58, 66, 85, 89], "get_sized_ascend": 29, "get_sized_descend": 29, "get_sized_glyph_height": 29, "get_sized_height": 29, "get_smoothscale_backend": 56, "get_sound": 38, "get_sprit": 50, "get_sprites_at": 50, "get_sprites_from_lay": 50, "get_strikethrough": 28, "get_surfac": [23, 58, 66, 87, 88, 89], "get_tick": 54, "get_tim": 54, "get_top_lay": 50, "get_top_sprit": 50, "get_track_audio": 19, "get_track_length": 19, "get_track_start": 19, "get_typ": 46, "get_underlin": 28, "get_vers": 29, "get_view": [17, 51], "get_viewport": 48, "get_vis": 39, "get_volum": [38, 40], "get_width": [15, 51, 58, 66], "get_window_s": 23, "get_wm_info": 23, "getbufferproc": 2, "getch": [67, 75], "getfilesystemencod": [14, 44], "getopt": [86, 89], "gfxdraw": [10, 15, 24, 30], "gg": 20, "ggi": 23, "ghost": 64, "ghostwhit": 21, "gif": [31, 63, 79, 80, 81, 84], "gil": [9, 30], "github": [44, 46, 56], "give": [15, 17, 22, 23, 29, 32, 37, 40, 42, 50, 51, 58, 59, 60, 61, 65, 74, 84, 85, 86, 87], "given": [8, 13, 17, 20, 22, 23, 24, 25, 28, 29, 30, 32, 35, 36, 37, 38, 39, 44, 45, 46, 47, 50, 51, 52, 54, 55, 56, 58, 59, 64, 68, 70, 73, 84], "gl": 23, "gl_accelerated_visu": 23, "gl_accum_alpha_s": 23, "gl_accum_blue_s": 23, "gl_accum_green_s": 23, "gl_accum_red_s": 23, "gl_alpha_s": 23, "gl_buffer_s": 23, "gl_context_flag": 23, "gl_context_major_vers": 23, "gl_context_minor_vers": 23, "gl_context_profile_": 23, "gl_context_profile_compat": 23, "gl_context_profile_cor": 23, "gl_context_profile_mask": 23, "gl_context_release_behavior": 23, "gl_depth_siz": 23, "gl_framebuffer_srgb_cap": 23, "gl_get_attribut": 23, "gl_multisamplebuff": 23, "gl_multisamplesampl": 23, "gl_set_attribut": 23, "gl_share_with_current_context": 23, "gl_stencil_s": 23, "gl_stereo": 23, "glcube": 26, "glitch": 89, "global": [28, 53, 60, 68, 86, 89], "glsl": 36, "glue": 89, "glyph": [28, 29], "gnu": [86, 89], "go": [20, 22, 23, 24, 32, 36, 37, 51, 53, 57, 58, 59, 60, 61, 64, 65, 66, 68, 70, 74, 84, 85, 86, 88, 89], "goal": 63, "goe": [58, 62, 64, 68, 84, 89], "gold": 21, "gold1": 21, "gold2": 21, "gold3": 21, "gold4": 21, "golden": 59, "goldenrod": 21, "goldenrod1": 21, "goldenrod2": 21, "goldenrod3": 21, "goldenrod4": 21, "gone": [62, 89], "good": [15, 18, 22, 23, 26, 28, 38, 44, 51, 58, 61, 62, 63, 64, 65, 67, 68, 84, 85, 86, 87, 89], "goodluck": 26, "googl": 84, "got": [15, 25, 40, 57, 62, 64, 84], "gotten": 62, "grab": [25, 33, 39, 48, 62, 64, 89], "grace": 89, "gradient": [26, 35, 65], "grai": [21, 29, 71, 72, 73, 79, 80, 81], "grain": 84, "graphic": [23, 26, 56, 58, 59, 62, 63, 64, 65, 67, 68, 84], "grasp": [61, 89], "grave": 33, "gray0": 21, "gray1": 21, "gray10": 21, "gray100": 21, "gray11": 21, "gray12": 21, "gray13": 21, "gray14": 21, "gray15": 21, "gray16": 21, "gray17": 21, "gray18": 21, "gray19": 21, "gray2": 21, "gray20": 21, "gray21": 21, "gray22": 21, "gray23": 21, "gray24": 21, "gray25": 21, "gray26": 21, "gray27": 21, "gray28": 21, "gray29": 21, "gray3": 21, "gray30": 21, "gray31": 21, "gray32": 21, "gray33": 21, "gray34": 21, "gray35": 21, "gray36": 21, "gray37": 21, "gray38": 21, "gray39": 21, "gray4": 21, "gray40": 21, "gray41": 21, "gray42": 21, "gray43": 21, "gray44": 21, "gray45": 21, "gray46": 21, "gray47": 21, "gray48": 21, "gray49": 21, "gray5": 21, "gray50": 21, "gray51": 21, "gray52": 21, "gray53": 21, "gray54": 21, "gray55": 21, "gray56": 21, "gray57": 21, "gray58": 21, "gray59": 21, "gray6": 21, "gray60": 21, "gray61": 21, "gray62": 21, "gray63": 21, "gray64": 21, "gray65": 21, "gray66": 21, "gray67": 21, "gray68": 21, "gray69": 21, "gray7": 21, "gray70": 21, "gray71": 21, "gray72": 21, "gray73": 21, "gray74": 21, "gray75": 21, "gray76": 21, "gray77": 21, "gray78": 21, "gray79": 21, "gray8": 21, "gray80": 21, "gray81": 21, "gray82": 21, "gray83": 21, "gray84": 21, "gray85": 21, "gray86": 21, "gray87": 21, "gray88": 21, "gray89": 21, "gray9": 21, "gray90": 21, "gray91": 21, "gray92": 21, "gray93": 21, "gray94": 21, "gray95": 21, "gray96": 21, "gray97": 21, "gray98": 21, "gray99": 21, "grayscal": [20, 56], "great": [23, 57, 63, 65, 84], "greater": [17, 24, 28, 29, 33, 35, 36, 37, 40, 51, 74], "green": [1, 18, 20, 21, 23, 24, 42, 51, 52, 56, 57, 58, 65, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85], "green1": 21, "green2": 21, "green3": 21, "green4": 21, "greenyellow": 21, "grei": [21, 58], "grey0": 21, "grey1": 21, "grey10": 21, "grey100": 21, "grey11": 21, "grey12": 21, "grey13": 21, "grey14": 21, "grey15": 21, "grey16": 21, "grey17": 21, "grey18": 21, "grey19": 21, "grey2": 21, "grey20": 21, "grey21": 21, "grey22": 21, "grey23": 21, "grey24": 21, "grey25": 21, "grey26": 21, "grey27": 21, "grey28": 21, "grey29": 21, "grey3": 21, "grey30": 21, "grey31": 21, "grey32": 21, "grey33": 21, "grey34": 21, "grey35": 21, "grey36": 21, "grey37": 21, "grey38": 21, "grey39": 21, "grey4": 21, "grey40": 21, "grey41": 21, "grey42": 21, "grey43": 21, "grey44": 21, "grey45": 21, "grey46": 21, "grey47": 21, "grey48": 21, "grey49": 21, "grey5": 21, "grey50": 21, "grey51": 21, "grey52": 21, "grey53": 21, "grey54": 21, "grey55": 21, "grey56": 21, "grey57": 21, "grey58": 21, "grey59": 21, "grey6": 21, "grey60": 21, "grey61": 21, "grey62": 21, "grey63": 21, "grey64": 21, "grey65": 21, "grey66": 21, "grey67": 21, "grey68": 21, "grey69": 21, "grey7": 21, "grey70": 21, "grey71": 21, "grey72": 21, "grey73": 21, "grey74": 21, "grey75": 21, "grey76": 21, "grey77": 21, "grey78": 21, "grey79": 21, "grey8": 21, "grey80": 21, "grey81": 21, "grey82": 21, "grey83": 21, "grey84": 21, "grey85": 21, "grey86": 21, "grey87": 21, "grey88": 21, "grey89": 21, "grey9": 21, "grey90": 21, "grey91": 21, "grey92": 21, "grey93": 21, "grey94": 21, "grey95": 21, "grey96": 21, "grey97": 21, "grey98": 21, "grey99": 21, "greyscal": 56, "grid": 29, "ground": 62, "group": [26, 35, 50, 58, 63, 84, 86], "group1": [50, 64], "group2": [50, 64], "group_list": 50, "groupcollid": [50, 64, 87], "groupmulti": 64, "groupsingl": [50, 64], "grow": [24, 45, 84], "guarante": [18, 23, 25, 33, 38, 46, 53], "guess": [38, 84], "gui": [25, 63, 67, 71, 72, 73, 75, 79], "guid": [15, 32, 57, 65, 85], "gui\uac00": 80, "gui\ub97c": 76, "gui\uc5d0\uc11c\uc758": 80, "gui\uc774\ubbc0\ub85c": 76, "gui\uc774\uc9c0\ub9cc": 81, "gui\uc784\uc744": 76, "gui\ud658\uacbd\uc5d0\uc11c": 76, "gun": 71, "g\uac12": 76, "h": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 25, 26, 30, 33, 42, 43, 45, 51, 56], "ha": [1, 2, 10, 15, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 84, 86, 87, 89], "habit": [84, 87], "had": [24, 51, 63, 64, 84], "hadn": 84, "half": [24, 26, 36, 50, 63], "hand": [20, 22, 42, 43, 58, 60, 62, 84, 87], "handi": [26, 61, 84, 86, 87, 88, 89], "handili": 89, "handl": [9, 14, 15, 23, 25, 28, 29, 32, 33, 38, 43, 44, 50, 56, 59, 61, 63, 64, 65, 66, 70, 84, 87, 89], "handler": [25, 27], "hang": 32, "happen": [19, 24, 58, 60, 62, 63, 64, 84, 85, 88, 89], "hard": [62, 63, 65, 68], "hardcod": 26, "harder": [61, 65, 84], "hardest": 64, "hardwar": [22, 23, 24, 30, 32, 37, 38, 41, 51, 63, 64, 65, 84], "harfbuzz": 28, "harmless": 23, "hasattr": 28, "hash": 33, "hashabl": 45, "hasn": 29, "hat": [25, 32, 47], "hat_numb": 32, "have": [1, 3, 8, 10, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 38, 40, 41, 42, 43, 44, 45, 47, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 72, 73, 84, 85, 86, 87, 88, 89], "haven": 84, "he": [58, 84, 85], "header": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 68, 70, 76], "header\uc5d0\uc120": 76, "header\uc758": 78, "headless": 26, "headless_no_windows_need": 26, "heavili": 25, "height": [8, 18, 22, 23, 24, 26, 28, 29, 31, 32, 35, 41, 42, 45, 48, 50, 51, 56, 59, 62, 63, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84], "held": [33, 62, 88], "hello": [68, 69, 70, 76, 77, 78, 85], "help": [15, 22, 25, 26, 28, 32, 33, 36, 37, 38, 39, 48, 50, 51, 53, 54, 58, 59, 61, 64, 65, 70, 84, 86, 87, 88], "helper": 63, "henc": 29, "here": [15, 16, 18, 23, 25, 26, 34, 35, 39, 41, 44, 50, 51, 58, 59, 60, 64, 65, 66, 68, 70, 84, 85, 86, 87, 88, 89], "hex": 20, "hflip": [18, 57], "hi": [58, 62], "hidden": [23, 25, 39], "hide": [33, 39, 44, 48, 58], "high": [0, 23, 26, 50, 67, 69], "high_frequ": [32, 47], "higher": [15, 16, 23, 36, 37, 47, 50, 52, 59, 63, 64], "highest": 44, "highgui": 44, "highli": [27, 51, 84], "him": [58, 62], "hindi": 28, "hint": [23, 84], "hit": [25, 26, 58, 61, 84, 85, 87, 88], "hitbox": [58, 66], "hkey_local_machin": 37, "hline": 30, "hmm": 62, "hold": [1, 25, 28, 32, 33, 50, 56, 64, 65, 70], "holdov": 64, "home": [32, 33], "honeydew": 21, "honeydew1": 21, "honeydew2": 21, "honeydew3": 21, "honeydew4": 21, "hook": 50, "hoonwhitecatr": [68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "hope": 64, "hopefulli": [62, 65, 87], "horizont": [18, 24, 25, 26, 29, 30, 39, 56, 58, 62, 65], "horizontal_advance_i": 29, "horizontal_advance_x": 29, "hot": 25, "hotkei": 25, "hotpink": 21, "hotpink1": 21, "hotpink2": 21, "hotpink3": 21, "hotpink4": 21, "hotplug": 32, "hotspot": [22, 39], "hour": 84, "how": [14, 15, 19, 20, 23, 24, 26, 29, 31, 32, 33, 35, 36, 38, 40, 44, 46, 50, 51, 54, 56, 58, 61, 63, 64, 65, 68, 69, 70, 71, 72, 73, 74, 84, 87, 88, 89], "howev": [12, 18, 29, 31, 33, 34, 36, 42, 44, 45, 47, 50, 56, 62, 67, 68, 69, 70, 74, 84], "hp": [70, 71, 72, 73, 78, 79, 80, 81], "hp\ub294": [79, 81], "hp\ub97c": [79, 80], "hp\ubc14": 83, "hp\uc744": 79, "hp\uc758": 79, "hsl": 20, "hsla": 20, "hsv": [18, 20, 57], "hsva": 20, "html": [20, 70, 78], "http": [39, 56, 70, 78, 86, 89], "hue": 18, "human": [63, 74, 86], "humung": 63, "hundr": 63, "husano896": 39, "hw": [23, 59], "hwaccel": 51, "hwsurfac": [23, 51, 65, 84], "hx": 47, "i": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 79, 80, 81, 85, 86, 87, 88, 89], "i1": 20, "i1i2i3": 20, "i2": 20, "i3": 20, "i686": 56, "icc": 25, "iceberg": 64, "icon": [23, 48], "iconifi": 23, "icontitl": 23, "id": [19, 23, 25, 32, 33, 37, 38, 48, 55], "id3": 40, "idea": [23, 51, 57, 59, 61, 63, 65, 70, 71, 72, 73, 86, 87], "ident": [25, 42, 51, 72], "identif": 37, "identifi": [25, 28, 32, 33, 44, 46, 57, 84], "idiom": [58, 84], "idl": [24, 25, 27, 32, 38, 40], "idx": 50, "ie": [31, 65], "ignor": [25, 29, 35, 37, 38, 40, 51, 53, 84], "illeg": 45, "illus": 62, "illustr": [62, 65, 87], "im": 33, "imag": [11, 12, 15, 16, 18, 20, 22, 23, 26, 28, 29, 30, 41, 46, 48, 50, 52, 56, 58, 59, 61, 63, 64, 65, 66, 67, 69, 70, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 87, 88, 89], "image_fil": 26, "imagefil": 26, "imagin": [62, 85, 89], "imgsurfac": 65, "immanuel": 74, "immedi": [23, 25, 32, 37, 38, 58], "immut": 20, "implement": [9, 10, 12, 17, 18, 20, 23, 26, 29, 33, 37, 42, 43, 44, 50, 61, 63, 64, 73, 74, 84, 89], "impli": [18, 29], "implicitli": [23, 51], "import": [1, 10, 15, 18, 22, 24, 25, 26, 27, 28, 29, 30, 32, 34, 36, 38, 39, 44, 47, 49, 52, 53, 59, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 89], "import_pygame_bas": [1, 10], "importantli": 62, "importerror": [65, 86, 89], "import\ud558\ub294": 76, "impos": [33, 38], "imprecis": 84, "impress": 63, "improperli": 41, "improv": [24, 28, 40, 58, 73, 84], "inact": [29, 38], "inch": 29, "incident": 18, "inclin": 36, "includ": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 18, 22, 23, 26, 28, 29, 30, 31, 32, 34, 37, 44, 45, 50, 51, 53, 54, 56, 58, 61, 63, 64, 65, 67, 70, 74, 84, 86, 87], "inclus": [1, 3, 20, 25, 29, 38], "incom": 15, "incomplet": 53, "incorrect": 43, "increas": [23, 29, 38, 45, 50, 68, 72, 74, 84], "incredibli": [74, 84], "increment": [10, 56, 65], "inde": 3, "indefinit": [38, 40], "indent": [32, 61], "independ": [15, 31, 58, 86], "index": [1, 6, 15, 18, 19, 23, 25, 29, 32, 33, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 55, 59, 62, 65, 84], "indexerror": [30, 35, 37, 51], "indexexcept": 17, "indexoutofbound": 50, "indianr": 21, "indianred1": 21, "indianred2": 21, "indianred3": 21, "indianred4": 21, "indic": [11, 23, 24, 25, 30, 35, 37, 39, 40, 42, 45, 46, 49, 50, 52, 53, 65], "indices0": 45, "indices1": 45, "indices2": 45, "indices3": 45, "indices4": 45, "indices5": 45, "indigo": 21, "indirect": 18, "individu": [15, 19, 29, 35, 44, 51, 53, 58, 84], "ineffici": 58, "inequ": 25, "infinit": [58, 63, 68], "inflat": [29, 45, 58, 66, 84, 89], "inflate_ip": 45, "influenc": 23, "info": [4, 23, 37, 59, 86], "inform": [5, 13, 15, 17, 18, 19, 23, 25, 28, 32, 33, 36, 37, 39, 47, 51, 52, 53, 55, 59, 62, 64, 65, 68], "inherit": [36, 50, 51, 64, 86, 87], "init": [1, 15, 18, 19, 22, 23, 24, 27, 28, 29, 32, 37, 38, 39, 44, 46, 47, 53, 54, 58, 59, 62, 63, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 89], "initi": [15, 18, 19, 23, 24, 25, 27, 28, 29, 32, 33, 34, 37, 38, 44, 46, 47, 49, 50, 51, 54, 57, 59, 63, 64, 66, 68, 69, 77, 84, 87], "initialis": [32, 44, 47, 61, 85, 88, 89], "initial\ubb38": 76, "initial\ubb38\uc5d0": 76, "initial\ubb38\uc758": 77, "innat": 74, "inner": 72, "input": [15, 18, 23, 25, 26, 28, 32, 33, 39, 44, 45, 48, 51, 53, 56, 57, 61, 63, 66, 67, 68, 69, 72, 73, 74, 78, 84, 87], "input_onli": 48, "inputimag": 26, "input\ud568\uc218\ub97c": 76, "input\ud568\uc218\uc640\ub294": 76, "insensit": [43, 51], "insert": [33, 69, 73], "insid": [22, 24, 26, 31, 44, 45, 50, 51, 57, 58, 63, 65, 71, 72, 89], "insight": 84, "inspir": 15, "instal": [15, 18, 26, 28, 31, 58, 65], "instanc": [2, 3, 4, 5, 6, 7, 8, 11, 12, 17, 19, 25, 26, 29, 30, 32, 35, 36, 38, 42, 45, 50, 51, 58, 61, 64, 85, 87, 88], "instance_id": [25, 32], "instantli": 84, "instead": [8, 14, 20, 22, 23, 24, 25, 26, 28, 29, 32, 33, 36, 38, 42, 44, 50, 51, 53, 56, 62, 64, 65, 69, 84, 87], "instruct": 56, "instrument": 37, "instrument_id": 37, "int": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 17, 18, 20, 23, 24, 25, 28, 29, 30, 32, 33, 35, 36, 37, 41, 42, 44, 45, 47, 48, 50, 51, 55, 56, 71, 72, 73, 79, 80, 81], "int32": 65, "int8": 65, "int_valu": 51, "integ": [1, 8, 13, 17, 19, 20, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 37, 38, 39, 40, 42, 43, 44, 45, 47, 49, 50, 51, 52, 53, 54, 55, 59, 65, 71, 73], "integr": 18, "intend": [25, 43, 50, 51], "interact": [5, 15, 26, 33, 34, 42, 47, 50, 53, 62, 63, 65, 70, 87], "interest": [25, 46, 63, 67, 74, 84], "interf": 37, "interfac": [1, 17, 20, 29, 33, 37, 38, 42, 43, 47, 51, 57, 63, 70, 73], "interior": 56, "intern": [0, 12, 23, 24, 25, 27, 33, 38, 44, 46, 51, 58, 68, 70, 84, 89], "internet": 84, "interpol": [20, 30, 36], "interpret": [14, 26, 29, 44, 61, 84], "interrupt": 18, "intersect": [35, 45, 50, 64, 67], "interv": 33, "intimid": 65, "intric": 63, "intro_bal": 63, "introduc": [23, 25, 31, 43, 61, 62, 65, 87, 89], "introduct": [15, 60, 75], "introspect": 43, "intuit": [70, 84], "invad": 84, "invalid": [1, 23, 38, 45, 47, 56], "invalu": 87, "inverse_set": 56, "invert": [29, 35, 36, 42], "invis": 85, "invok": [17, 29, 88], "involv": [15, 26, 29, 51, 64, 84, 87, 89], "inward": 24, "in\ubb38\uc744": 76, "ip": 45, "is_control": 47, "is_norm": 36, "iscaptur": 25, "ish": 24, "isn": [19, 27, 48, 57, 61, 62, 64, 69, 71, 84, 88], "iso": 28, "isol": [51, 57], "issu": [23, 62, 63], "ital": [28, 29], "item": [29, 30, 42, 43, 45, 50, 62, 64], "items": 42, "iter": [28, 29, 33, 42, 45, 50, 64, 84, 85, 88, 89], "its": [2, 9, 12, 17, 18, 23, 24, 25, 29, 30, 32, 35, 36, 37, 38, 42, 44, 45, 46, 48, 50, 51, 58, 59, 61, 62, 63, 64, 68, 69, 70, 84, 85, 86, 87, 88, 89], "itself": [12, 18, 28, 29, 36, 42, 43, 44, 48, 51, 58, 61, 62, 63, 64, 84, 87, 88, 89], "it\uc744": 81, "ivori": 21, "ivory1": 21, "ivory2": 21, "ivory3": 21, "ivory4": 21, "iyuv_overlai": 41, "j": [33, 35, 73, 81], "jaggi": 56, "jid": 32, "jitter": 32, "job": [63, 64], "joi": 25, "join": [31, 45, 58, 66, 86, 89], "joint": 24, "journal": 84, "joyaxismot": [25, 32], "joyballmot": [25, 32], "joybuttondown": [25, 32], "joybuttonup": [25, 32], "joydevicead": [25, 32], "joydeviceremov": [25, 32], "joyhatmot": [25, 32], "joystick": [15, 25, 26, 44, 47, 63, 84, 85, 88], "joystick_count": 32, "jp": 18, "jpeg": [31, 84], "jpg": [31, 63], "juli": 16, "jumbl": 84, "jump": [39, 62, 63, 65], "just": [24, 26, 28, 29, 30, 32, 35, 38, 40, 41, 50, 51, 52, 53, 56, 57, 58, 59, 60, 63, 64, 65, 67, 68, 69, 70, 71, 73, 84, 85, 87, 88, 89], "k": [33, 36], "k_": [15, 33, 34, 70], "k_0": 33, "k_1": 33, "k_2": 33, "k_3": 33, "k_4": 33, "k_5": 33, "k_6": 33, "k_7": 33, "k_8": [33, 70, 78], "k_9": 33, "k_a": [15, 33, 70, 78, 89], "k_ac_back": 33, "k_ampersand": 33, "k_asterisk": 33, "k_at": 33, "k_b": 33, "k_backquot": 33, "k_backslash": 33, "k_backspac": 33, "k_break": 33, "k_c": 33, "k_capslock": 33, "k_caret": 33, "k_clear": 33, "k_colon": 33, "k_comma": 33, "k_d": [15, 33], "k_delet": [33, 70, 78], "k_dollar": 33, "k_down": [33, 62, 70, 71, 72, 73, 78, 79, 80, 81, 88, 89], "k_e": 33, "k_end": 33, "k_equal": 33, "k_escap": [22, 33, 57, 58, 66], "k_euro": 33, "k_exclaim": 33, "k_f": [33, 84], "k_f1": 33, "k_f10": 33, "k_f11": 33, "k_f12": 33, "k_f13": 33, "k_f14": 33, "k_f15": 33, "k_f2": 33, "k_f3": 33, "k_f4": [33, 70], "k_f5": 33, "k_f6": 33, "k_f7": 33, "k_f8": 33, "k_f9": 33, "k_g": 33, "k_greater": 33, "k_h": 33, "k_hash": 33, "k_help": 33, "k_home": 33, "k_i": 33, "k_insert": 33, "k_j": 33, "k_k": 33, "k_kp0": 33, "k_kp1": 33, "k_kp2": 33, "k_kp3": 33, "k_kp4": 33, "k_kp5": 33, "k_kp6": 33, "k_kp7": 33, "k_kp8": 33, "k_kp9": 33, "k_kp_divid": 33, "k_kp_enter": 33, "k_kp_equal": 33, "k_kp_minu": 33, "k_kp_multipli": 33, "k_kp_period": 33, "k_kp_plu": 33, "k_l": [33, 70, 78], "k_lalt": 33, "k_lctrl": [33, 70, 78], "k_left": [33, 62, 70, 78], "k_leftbracket": 33, "k_leftparen": 33, "k_less": 33, "k_lmeta": 33, "k_lshift": 33, "k_lsuper": 33, "k_m": 33, "k_menu": 33, "k_minu": 33, "k_mode": 33, "k_n": 33, "k_numlock": 33, "k_o": 33, "k_p": 33, "k_pagedown": 33, "k_pageup": 33, "k_paus": 33, "k_period": 33, "k_plu": 33, "k_power": 33, "k_print": 33, "k_q": 33, "k_question": 33, "k_quot": 33, "k_quotedbl": 33, "k_r": 33, "k_ralt": 33, "k_rctrl": 33, "k_return": 33, "k_right": [33, 62, 70, 78], "k_rightbracket": 33, "k_rightparen": 33, "k_rmeta": 33, "k_rshift": 33, "k_rsuper": 33, "k_scrollock": 33, "k_semicolon": 33, "k_slash": 33, "k_space": 33, "k_sysreq": 33, "k_t": [33, 84], "k_tab": 33, "k_u": 33, "k_underscor": 33, "k_up": [33, 62, 70, 71, 72, 73, 78, 79, 80, 81, 88, 89], "k_v": 33, "k_w": [15, 33], "k_x": 33, "k_y": 33, "k_z": [33, 89], "k_\uc2dc\ub9ac\uc988\uc774\ub2e4": 78, "kanji": 29, "kant": 74, "kb": 16, "kde": 44, "keep": [12, 17, 25, 32, 50, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 84, 88], "kei": [15, 17, 20, 22, 23, 25, 26, 33, 34, 35, 45, 51, 55, 57, 58, 61, 62, 63, 64, 66, 70, 71, 72, 73, 74, 78, 79, 80, 81, 84, 88, 89], "kern": [28, 29], "key_cod": 33, "key_rect": 45, "keyboard": [15, 25, 26, 34, 39, 62, 63, 67, 70, 84, 85], "keycod": 33, "keydown": [22, 25, 33, 34, 57, 58, 62, 66, 70, 71, 72, 73, 78, 79, 80, 81, 88, 89], "keydown\uc740": 78, "keydown\uc774": 80, "keymap": 25, "keymapchang": 25, "keypad": 33, "keypress": 84, "keyup": [25, 33, 34, 70, 88, 89], "keyup\uc774\ub77c\ub294": 78, "keyword": [15, 18, 23, 24, 25, 26, 29, 31, 35, 38, 44, 45, 48, 51, 53, 56], "key\ub294": 78, "khaki": 21, "khaki1": 21, "khaki2": 21, "khaki3": 21, "khaki4": 21, "khz": 49, "kick": 61, "kill": [50, 53, 64], "kind": [25, 37, 43, 51, 61, 65, 67, 84], "kmod_alt": 33, "kmod_cap": 33, "kmod_ctrl": 33, "kmod_lalt": 33, "kmod_lctrl": 33, "kmod_lmeta": 33, "kmod_lshift": 33, "kmod_meta": 33, "kmod_mod": 33, "kmod_non": 33, "kmod_num": 33, "kmod_ralt": 33, "kmod_rctrl": 33, "kmod_rmeta": 33, "kmod_rshift": 33, "kmod_shift": 33, "know": [18, 28, 31, 33, 46, 57, 58, 62, 64, 65, 67, 68, 69, 70, 73, 87, 88, 89], "knowledg": [74, 84], "known": [33, 84], "korean": 15, "kwarg": [35, 48, 50, 51], "kwd": 53, "l": [18, 20, 32, 33], "l_f4\ub4f1\uc774": 78, "l_margin": [73, 81], "lack": 23, "laggi": 38, "laid": [29, 61], "lambda": 45, "landscap": [62, 84], "languag": [25, 26, 28, 33, 62, 63, 84], "lantinga": 63, "laplacian": 56, "larg": [15, 29, 36, 43, 45, 51, 61, 64, 65, 84, 87], "larger": [23, 38, 51, 56, 58, 65, 67, 84], "largest": [35, 57, 59, 63, 65], "last": [15, 24, 29, 30, 32, 50, 51, 52, 54, 58, 62, 63, 64, 65, 68, 84], "lastli": [22, 50, 58, 59, 62, 64, 65], "late": 84, "latenc": [37, 38, 84], "later": [18, 23, 30, 33, 37, 38, 42, 46, 50, 57, 58, 59, 60, 62, 63, 64, 65, 68, 84, 86, 89], "latest": [29, 70], "latin1": [28, 29], "latter": 25, "lavend": 21, "lavenderblush": 21, "lavenderblush1": 21, "lavenderblush2": 21, "lavenderblush3": 21, "lavenderblush4": 21, "lawngreen": 21, "layer": [16, 50, 63, 64], "layer1": 50, "layer1_nr": 50, "layer2": 50, "layer2_nr": 50, "layer_nr": 50, "layereddirti": 50, "layeredupd": 50, "layout": [17, 25, 28, 29, 43, 52, 88], "lbm": 31, "lead": 36, "leak": 62, "learn": [26, 51, 59, 62, 63, 65, 67, 68, 69, 70, 73, 74, 84], "learnt": 89, "least": [13, 24, 30, 35, 43, 51, 55, 61, 65, 67, 70, 84], "leav": [24, 28, 29, 33, 36, 45, 51, 56, 65], "left": [20, 23, 24, 25, 29, 33, 35, 38, 39, 44, 45, 47, 50, 51, 57, 58, 62, 63, 66, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 87, 88, 89], "leftclick": 26, "leftmost": 47, "legaci": [25, 27, 33, 67, 75], "legacy_logo": 16, "lemonchiffon": 21, "lemonchiffon1": 21, "lemonchiffon2": 21, "lemonchiffon3": 21, "lemonchiffon4": 21, "len": [17, 20, 22, 24, 30, 50, 64, 65], "length": [1, 3, 8, 17, 19, 20, 23, 24, 25, 30, 32, 33, 36, 38, 42, 47, 51, 58, 68, 87], "length_squar": 36, "leonidovich": 74, "lerp": [20, 36], "less": [24, 27, 28, 33, 35, 37, 38, 54, 55, 56, 67, 85], "lesson": 84, "let": [9, 20, 21, 26, 44, 51, 58, 59, 61, 63, 65, 69, 70, 71, 84, 88], "letter": [19, 28, 51], "level": [0, 15, 17, 20, 23, 28, 32, 36, 37, 38, 40, 41, 51, 53, 56, 63, 64, 65, 67, 70], "lgpl": 15, "li": 84, "liabil": 18, "liabl": 18, "lib": 26, "librari": [15, 18, 26, 28, 29, 30, 31, 32, 37, 38, 44, 47, 59, 62, 63, 67], "libsdl": 39, "licens": [15, 86, 89], "lie": [30, 45], "life": [57, 59], "lifetim": [12, 42, 52, 65], "lightblu": 21, "lightblue1": 21, "lightblue2": 21, "lightblue3": 21, "lightblue4": 21, "lightcor": 21, "lightcyan": 21, "lightcyan1": 21, "lightcyan2": 21, "lightcyan3": 21, "lightcyan4": 21, "lightgoldenrod": 21, "lightgoldenrod1": 21, "lightgoldenrod2": 21, "lightgoldenrod3": 21, "lightgoldenrod4": 21, "lightgoldenrodyellow": 21, "lightgrai": 21, "lightgreen": 21, "lightgrei": 21, "lightpink": 21, "lightpink1": 21, "lightpink2": 21, "lightpink3": 21, "lightpink4": 21, "lightsalmon": 21, "lightsalmon1": 21, "lightsalmon2": 21, "lightsalmon3": 21, "lightsalmon4": 21, "lightseagreen": 21, "lightskyblu": 21, "lightskyblue1": 21, "lightskyblue2": 21, "lightskyblue3": 21, "lightskyblue4": 21, "lightslateblu": 21, "lightslategrai": 21, "lightslategrei": 21, "lightsteelblu": 21, "lightsteelblue1": 21, "lightsteelblue2": 21, "lightsteelblue3": 21, "lightsteelblue4": 21, "lightweight": [50, 84], "lightyellow": 21, "lightyellow1": 21, "lightyellow2": 21, "lightyellow3": 21, "lightyellow4": 21, "like": [1, 9, 15, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 47, 50, 51, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 70, 72, 73, 74, 84, 85, 86, 87, 88, 89], "lime": 21, "limegreen": 21, "limit": [15, 18, 19, 23, 24, 25, 29, 31, 32, 38, 40, 51, 52, 53, 54, 60, 63, 64, 65, 73], "line": [15, 24, 26, 28, 30, 31, 32, 45, 48, 53, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 84, 87, 89], "line_height": 32, "line_spac": 29, "linear": [20, 23, 36, 50, 65], "linearli": [36, 51], "linen": 21, "link": [28, 29, 31, 38, 44], "linux": [18, 23, 37, 40, 44, 57, 63, 84], "liquid": [26, 62], "list": [15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 37, 41, 44, 45, 46, 50, 51, 53, 58, 59, 64, 65, 68, 70, 84], "list_camera": [18, 57], "list_mod": [23, 59], "list_of_double_tupl": 45, "list_of_list": 45, "list_of_object_with_callable_rect": 45, "list_of_object_with_rect_attribut": 45, "list_of_rect": 45, "list_of_tupl": 45, "listen": 39, "littl": [17, 22, 26, 44, 50, 54, 58, 59, 61, 62, 64, 65, 68, 84, 87, 88], "live": [15, 26, 65], "ll": [22, 36, 58, 61, 62, 63, 64, 65, 84, 85, 87, 88, 89], "load": [7, 15, 18, 22, 26, 30, 31, 40, 50, 59, 61, 62, 63, 65, 66, 75, 76, 77, 78, 79, 80, 81, 84, 87, 89], "load_background_imag": 62, "load_bas": 31, "load_extend": 31, "load_imag": [58, 66], "load_player_imag": 62, "load_png": [86, 87, 88, 89], "load_sound": [58, 66, 86], "load_xbm": 22, "local": [8, 15, 25, 33, 34, 38, 39, 44, 57, 58, 60, 61, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85, 86, 89], "localechang": 25, "locals\ub85c\ubd80\ud130": 78, "locat": [25, 26, 34, 35, 39, 41, 58, 68, 69, 70, 71, 72, 73, 84], "lock": [12, 17, 24, 25, 27, 33, 42, 43, 50, 51, 52], "lockobj": 12, "logger": 26, "logic": [48, 58, 61, 63, 65, 68, 69, 70, 71, 84, 86], "logical_s": 48, "logo": [15, 23], "loki": 63, "long": [6, 25, 27, 29, 35, 38, 40, 44, 50, 53, 63, 64, 84, 88], "longer": [19, 28, 32, 38, 47, 87, 88], "longest": [38, 84], "look": [22, 24, 28, 36, 37, 44, 46, 51, 52, 56, 57, 58, 62, 63, 64, 65, 68, 69, 70, 72, 84, 85, 86, 87, 88, 89], "lookout": 26, "lookup": [23, 25, 50, 58, 65], "loop": [15, 24, 25, 32, 38, 40, 54, 57, 61, 62, 63, 64, 66, 68, 84, 86, 87, 88, 89], "lose": [19, 23, 25, 33, 56], "loss": [18, 23, 58, 59, 84], "lost": [25, 40, 46, 62], "lostsprit": 64, "lot": [26, 32, 51, 54, 56, 58, 59, 61, 62, 63, 64, 65, 67, 73, 84, 85, 87, 89], "loud": 38, "love": 84, "low": [25, 32, 63, 67], "low_frequ": [32, 47], "lower": [19, 23, 32, 36, 37, 38, 41, 52, 84], "lowercas": 28, "lowest": 37, "lowli": 84, "lt": 32, "luck": 65, "luckili": 84, "luma": 18, "luminos": [20, 56], "m": [15, 20, 26, 32, 33, 37, 39, 47, 53, 58, 65], "mac": [18, 23, 26, 37, 40, 44, 46, 63, 84], "machin": [26, 56, 64, 65], "maco": 22, "macro": [3, 4, 5, 6, 7, 8, 11, 13], "made": [5, 6, 11, 15, 23, 25, 49, 62, 71, 73, 74, 84, 87], "magazin": [15, 71], "magenta": 21, "magenta1": 21, "magenta2": 21, "magenta3": 21, "magenta4": 21, "magic": [62, 84, 87], "magnifi": 26, "magnitud": 36, "magnitude_squar": 36, "mai": [1, 2, 18, 19, 20, 22, 23, 25, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 40, 43, 44, 45, 46, 51, 53, 56, 57, 59, 62, 63, 64, 65, 84], "mail": [62, 84], "main": [18, 25, 26, 27, 32, 39, 41, 46, 50, 53, 56, 57, 61, 62, 64, 65, 66, 71, 72, 73, 79, 80, 81, 85, 86, 87, 88, 89], "main_dir": [58, 66], "mainli": [28, 51, 62, 64, 65], "maintain": [28, 44, 50, 61, 62, 84], "main\ud568\uc218\ub97c": 79, "main\ud568\uc218\uc5d0": 79, "major": [13, 23, 28, 31, 38, 44, 63], "make": [0, 15, 20, 22, 24, 25, 26, 27, 31, 33, 38, 42, 44, 45, 50, 51, 52, 54, 56, 57, 58, 59, 60, 63, 64, 65, 67, 68, 70, 71, 72, 73, 74, 84, 85, 86, 87, 88, 89], "make_sound": [38, 49], "make_surfac": [42, 43, 52], "maker": [67, 74], "malform": 29, "man": 67, "manag": [15, 19, 25, 32, 38, 42, 50, 51, 59, 63, 64], "mani": [19, 23, 24, 25, 28, 29, 33, 36, 38, 39, 40, 44, 45, 50, 51, 54, 56, 58, 59, 62, 63, 84], "manifest": 84, "manipul": [15, 31, 42, 45, 51, 63, 65, 84, 87], "manner": [59, 87], "manual": [19, 28, 29, 32, 41, 44, 51, 57, 64], "map": [17, 20, 24, 42, 43, 47, 51, 52, 59, 65], "map_arrai": [43, 52], "map_rgb": [20, 24, 42, 51, 52], "mapped_int": 51, "margin": [26, 36, 68, 71, 72, 73, 80, 81], "mario": 88, "mark": [33, 42, 57, 63], "maroon": 21, "maroon1": 21, "maroon2": 21, "maroon3": 21, "maroon4": 21, "mask": [22, 23, 26, 29, 42, 50, 51, 59, 84], "maskfil": 22, "mass": 35, "master": [65, 67], "match": [17, 23, 28, 29, 31, 32, 33, 37, 38, 42, 43, 51, 52, 56, 58, 59, 62, 63, 64, 65, 68], "match_font": 28, "materi": [18, 84], "math": [24, 30, 35, 36, 86, 87, 89], "mathemat": [51, 61, 65], "matter": [31, 51, 62, 64, 84, 87], "max": [24, 32, 35, 36, 57, 71], "max_i": 29, "max_length": 36, "max_level": 36, "max_x": 29, "maxhp": [71, 72, 73, 79, 80, 81], "maxi": 28, "maxim": [25, 48], "maximum": [23, 28, 29], "maxtim": 38, "maxx": 28, "mayb": [62, 64, 70, 84, 86], "mb": 16, "me": [59, 63, 65, 84], "mean": [15, 20, 22, 23, 24, 29, 32, 33, 36, 37, 38, 39, 40, 43, 47, 48, 50, 56, 57, 58, 59, 62, 63, 64, 68, 69, 70, 71, 72, 84, 88], "meant": [44, 48, 64], "measur": [24, 37, 84, 87], "mechanim": 67, "mechanin": 75, "mediev": 63, "medium": [24, 32], "mediumaquamarin": 21, "mediumblu": 21, "mediumorchid": 21, "mediumorchid1": 21, "mediumorchid2": 21, "mediumorchid3": 21, "mediumorchid4": 21, "mediumpurpl": 21, "mediumpurple1": 21, "mediumpurple2": 21, "mediumpurple3": 21, "mediumpurple4": 21, "mediumseagreen": 21, "mediumslateblu": 21, "mediumspringgreen": 21, "mediumturquois": 21, "mediumvioletr": 21, "meet": [45, 84], "mega_jc": 16, "megabyt": 23, "member": [25, 50, 59, 64, 68, 84], "membership": [50, 64], "memori": [9, 17, 23, 24, 25, 29, 31, 38, 51, 52, 62, 67], "memoryview": 31, "mental": 74, "mention": [54, 58, 62, 64, 68, 70, 84], "menu": [23, 33, 61], "merchant": 18, "mercuri": 44, "mere": [37, 84], "merg": 64, "merrili": 89, "mess": 15, "messag": [25, 27, 37, 44, 53, 58, 84], "messi": 64, "messier": 84, "met": [18, 22], "meta": [25, 33], "method": [8, 9, 11, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 35, 36, 38, 39, 40, 42, 44, 45, 46, 49, 50, 51, 52, 54, 58, 59, 61, 62, 63, 64, 65, 71, 73, 84, 85, 86, 87, 89], "metric": [28, 29], "mice": 39, "micro": 44, "microsoft": 23, "midbottom": 45, "middl": [39, 47, 57, 62, 65], "midi": [25, 26], "midi_ev": 37, "midi_event_list": 37, "midi_not": 37, "midi_output": 37, "midi_to_ansi_not": 37, "midi_to_frequ": 37, "midiexcept": 37, "midiin": [25, 37], "midiout": [25, 37], "midis2ev": 37, "midisport": 37, "midleft": [45, 88, 89], "midnightblu": 21, "midpoint": 36, "midright": [45, 88, 89], "midtop": 45, "might": [20, 23, 25, 26, 29, 36, 44, 46, 60, 61, 62, 64, 65, 84, 86, 87, 89], "mighti": 62, "migrationguid": 39, "milli": 54, "millisecond": [25, 33, 37, 38, 40, 50, 54, 63], "mime": 46, "mimic": 29, "min": [24, 36, 57], "min_alpha": 51, "min_i": 29, "min_length": 36, "min_x": 29, "mind": [39, 54, 60, 65, 84], "minhp": 73, "mini": 28, "miniatur": 32, "minim": [23, 25, 48, 64], "minimum": [23, 24, 28, 30, 31, 35, 51], "minor": [13, 28, 31, 38, 44, 63], "mintcream": 21, "minu": 33, "minx": 28, "mirror": [23, 58], "miss": [58, 66, 84], "missingmodul": [49, 52], "mistyros": 21, "mistyrose1": 21, "mistyrose2": 21, "mistyrose3": 21, "mistyrose4": 21, "misunderstand": 84, "misunderstood": 84, "miter": 24, "mix": [28, 38, 51, 63, 65, 84], "mix_chunk": 7, "mix_setmusicposit": 40, "mixer": [0, 15, 26, 38, 44, 49, 58, 66], "mizuno": 18, "mmsystem": 37, "mmx": [26, 56], "moccasin": 21, "mod": [25, 33, 34, 40, 67], "mod_": 34, "modal": 48, "mode": [15, 20, 23, 25, 26, 28, 29, 30, 33, 38, 39, 44, 46, 48, 50, 51, 53, 58, 63, 65], "mode_ok": [23, 59], "model": 51, "modern": 84, "modest": 84, "modif": [12, 18, 51, 86], "modifi": [25, 29, 30, 33, 34, 37, 39, 45, 48, 49, 50, 51, 64, 65, 85], "modnam": 1, "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 17, 21, 26, 34, 41, 42, 48, 51, 53, 59, 60, 61, 62, 65, 66, 68, 84, 87, 89], "modulu": 20, "moment": [46, 49, 84, 87], "momma": 62, "monitor": [23, 34, 59, 63, 68], "monkei": [58, 63, 66], "mono": [29, 38, 49], "monochrom": 29, "monster": 64, "month": 63, "more": [15, 18, 19, 20, 23, 24, 25, 26, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 42, 43, 44, 47, 50, 51, 54, 57, 58, 59, 60, 61, 63, 64, 70, 71, 73, 74, 84, 85, 86, 87, 88, 89], "most": [15, 19, 23, 24, 26, 28, 29, 31, 38, 39, 40, 44, 45, 50, 51, 54, 57, 59, 60, 61, 63, 64, 65, 74, 84, 85], "mostli": 70, "motion": [32, 39, 48, 63, 87, 89], "motiv": 70, "mous": [15, 22, 23, 25, 26, 32, 46, 48, 58, 61, 62, 63, 66, 67, 70, 72, 84, 85, 88], "mousebuttondown": [22, 25, 27, 39, 58, 66, 84], "mousebuttonup": [25, 39, 58, 66, 72, 73, 80, 81, 84], "mousebuttonup\uc774": 80, "mousemot": [25, 39], "mousewheel": [25, 39], "movabl": [62, 88, 89], "move": [15, 25, 26, 36, 39, 44, 45, 50, 51, 56, 58, 61, 63, 65, 66, 69, 70, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "move_and_draw_all_game_object": 62, "move_ip": [45, 58, 66], "move_to_back": 50, "move_to_front": 50, "move_toward": 36, "move_towards_ip": 36, "movedown": [70, 78, 88, 89], "moveit": [26, 62], "movement": [32, 39, 50, 58, 87, 88], "movepo": [88, 89], "moveright": [69, 70, 77, 78], "moveup": [69, 77, 88, 89], "movi": 74, "mozart": 40, "mp3": 40, "msg": 37, "msmf": 18, "much": [18, 24, 26, 28, 31, 54, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 71, 73, 74, 84, 85, 87, 89], "multi_thread": 53, "multicolor": 26, "multidimension": 65, "multigestur": 25, "multimedia": [33, 63, 84], "multipl": [1, 6, 18, 19, 22, 23, 24, 25, 26, 28, 32, 33, 36, 38, 41, 44, 45, 50, 51, 56, 57, 61, 63, 64, 65, 69], "multipli": [20, 24, 29, 33, 36, 42, 45, 48, 51, 56, 65], "multisampl": 23, "multithread": 27, "music": [7, 15, 26, 37, 38, 40, 63, 74, 86], "must": [1, 2, 3, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 56, 58, 59, 60, 63, 64, 65, 68, 72, 84], "mustlock": 51, "mutabl": 25, "mute": 38, "my": [26, 61, 62, 63, 65, 84, 86, 89], "my_appl": 44, "my_data_typ": 46, "mygroup": 64, "myscreen": [68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "mysprit": 64, "mysurf": 51, "mytext": [68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "mytextarea": [68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "mytextarea\ub294": 76, "mytextarea\ub77c\ub294": 76, "mytextfont": [68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "mytextfont\uac1d\uccb4\uc758": 76, "mytextfont\ub77c\ub294": 76, "mytext\uac1d\uccb4\uc758": 76, "mytext\ub77c\ub294": 76, "n": [28, 33, 38, 65], "name": [1, 9, 18, 19, 20, 23, 25, 26, 28, 29, 32, 33, 36, 37, 44, 45, 47, 50, 51, 53, 58, 59, 61, 62, 63, 64, 65, 66, 68, 70, 78, 86, 88, 89], "name_forindex": 47, "name_of_environment_vari": 44, "namehint": [31, 40], "namespac": [34, 58, 60], "nano": 31, "nasti": 86, "nativ": [15, 18, 22, 44, 57, 84], "natur": [40, 65, 74, 84, 86], "navajowhit": 21, "navajowhite1": 21, "navajowhite2": 21, "navajowhite3": 21, "navajowhite4": 21, "navi": 21, "navyblu": 21, "ndigit": 36, "ndim": 42, "nearest": [24, 38], "nearli": [36, 64, 67], "neat": 84, "neater": 88, "nebul": 84, "necessari": [9, 23, 25, 27, 29, 38, 50, 51, 60, 61, 64, 68, 84, 85, 87, 88, 89], "necessarili": 63, "need": [10, 15, 18, 19, 20, 22, 23, 25, 26, 27, 28, 31, 32, 33, 35, 42, 44, 45, 46, 50, 51, 53, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 85, 86, 87, 88, 89], "needless": [68, 71, 73, 84], "needn": [26, 61, 89], "neg": [8, 9, 17, 25, 29, 35, 36, 38, 39, 40, 42, 45, 51, 56, 65, 89], "neglig": 18, "neither": [50, 69, 70], "nest": 51, "network": [61, 86], "never": [29, 32, 36, 38, 39, 40, 51, 54, 57, 63, 65, 84], "new": [2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 58, 59, 61, 62, 63, 64, 65, 69, 71, 72, 73, 74, 84, 85, 86, 87, 89], "new_height": 26, "new_lay": 50, "new_mask": 35, "new_width": 26, "newarrai": 42, "newbi": 15, "newcom": 84, "newer": [23, 40], "newest": 68, "newli": [20, 35], "newlin": 28, "newpo": [58, 66, 87, 88, 89], "newrect": 64, "newtonian": 63, "next": [15, 18, 27, 29, 30, 35, 36, 38, 41, 46, 58, 64, 68, 73, 84, 85, 88, 89], "nice": [31, 58, 61, 62, 65, 84, 87], "nirav": 57, "node": 44, "noevent": [25, 27, 38, 40, 84], "nofram": 23, "nois": [32, 35, 57], "nomin": 29, "non": [17, 19, 23, 24, 26, 29, 31, 33, 41, 42, 44, 50, 51, 56, 58, 64, 84, 86], "none": [17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 58, 60, 64, 65, 66, 85, 86, 87, 89], "nonesound": [58, 66], "nonetheless": 26, "nonetyp": [30, 35, 50], "nonlinear": 51, "nonzero": [35, 45], "nor": [50, 70], "normal": [8, 11, 19, 20, 25, 28, 29, 35, 36, 44, 45, 50, 51, 53, 55, 58, 64, 65, 71, 87, 89], "normalize_ip": 36, "north": 22, "northeast": 22, "northwest": 22, "nosubprocess": 53, "notabl": [23, 40, 87], "notat": 39, "notdef": 29, "note": [18, 19, 20, 23, 24, 25, 26, 27, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 47, 51, 54, 56, 57, 58, 59, 60, 62, 64, 66, 84, 86, 87, 89], "note1": 35, "note2": 35, "note_off": 37, "note_on": 37, "noteworthi": 63, "noth": [19, 23, 24, 30, 32, 50, 58, 59, 63, 64, 84, 85, 86], "notic": [18, 36, 45, 62, 68, 69, 70, 72, 84, 87, 88, 89], "notifi": 64, "notimplementederror": [31, 40], "novel": 74, "now": [23, 24, 26, 27, 28, 29, 32, 33, 35, 36, 37, 38, 43, 44, 46, 56, 57, 58, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 84, 85, 87, 89], "nowadai": [63, 84], "nrp": 57, "nuanc": 84, "null": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 28], "num": [33, 72, 73, 80, 81], "num_button": 39, "num_devic": 37, "num_ev": 37, "num_fing": 25, "num_threshold_pixel": 56, "num_track": 19, "number": [1, 7, 10, 17, 18, 19, 20, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 42, 44, 47, 49, 50, 51, 52, 53, 54, 55, 56, 62, 63, 64, 65, 69, 73, 74, 84], "numbit": 35, "numer": [36, 65], "numev": [25, 38], "numfail": 44, "numlock": 33, "numpass": 44, "numpi": [1, 15, 26, 31, 38, 42, 43, 49, 51, 52, 63], "o": [6, 9, 18, 22, 23, 25, 26, 31, 32, 33, 37, 44, 45, 46, 58, 62, 66, 84, 86, 89], "obj": [1, 2, 3, 4, 7, 8, 9, 44, 45], "obj_list": 45, "object": [1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 15, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 38, 39, 40, 43, 44, 46, 47, 48, 49, 52, 54, 56, 57, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 84, 86, 89], "objectwithcallablerectattribut": 45, "objectwithrectattribut": 45, "objectwithsomrectattribut": 45, "obliqu": 29, "obscur": [61, 84], "obsolet": [23, 44, 51], "obtain": [29, 37, 51], "obviou": 61, "obvious": [64, 85], "occasion": 64, "occupi": 85, "occur": [25, 29, 33, 37, 38, 42, 62, 68], "octob": 63, "odd": [24, 65, 89], "ofcod": 89, "off": [18, 24, 25, 26, 29, 32, 37, 38, 40, 45, 56, 58, 61, 62, 64, 84, 89], "offcourt": 89, "offer": [22, 23, 25, 47, 57], "offici": [62, 84], "offset": [17, 24, 26, 28, 29, 30, 35, 37, 40, 42, 45, 50, 51, 58], "often": [19, 31, 36, 51, 61, 63, 65, 69, 84, 86], "ogg": [38, 40], "oh": 89, "ok": [65, 84, 85, 87], "okai": [69, 72], "old": [23, 39, 44, 50, 51, 54, 58, 62, 64, 74, 84, 88], "older": [23, 25, 27, 32, 40, 44, 59, 64, 84], "oldest": 68, "oldlac": 21, "oliv": 21, "olivedrab": 21, "olivedrab1": 21, "olivedrab2": 21, "olivedrab3": 21, "olivedrab4": 21, "omit": [29, 37, 42, 53], "onc": [15, 18, 19, 23, 25, 28, 29, 31, 32, 33, 35, 37, 38, 40, 42, 44, 47, 51, 53, 54, 58, 60, 62, 63, 64, 65, 84, 85, 86, 87, 89], "one": [15, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 84, 85, 86, 87, 88, 89], "ones": [29, 40, 51, 60, 64, 87, 88], "onli": [17, 18, 19, 20, 23, 24, 25, 28, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 72, 73, 74, 84, 85, 86, 87, 89], "onlin": 84, "ons": 63, "onscreen": 23, "onto": [11, 20, 27, 28, 29, 30, 35, 36, 50, 51, 58, 62, 63, 65, 68, 84, 85, 87], "opac": [48, 84], "opaqu": [20, 26, 29, 35, 43, 48, 51, 52, 65, 84], "open": [1, 6, 9, 15, 18, 19, 23, 32, 33, 37, 44, 46, 47, 57, 58, 63, 85, 86], "opencv": [18, 44, 57], "opengl": [23, 26], "opentyp": 29, "oper": [14, 20, 22, 23, 24, 25, 27, 33, 36, 42, 44, 45, 48, 50, 51, 52, 56, 64, 65, 84, 85], "operand": 65, "oppos": 29, "opposit": 25, "optim": [23, 26, 28, 51, 56, 64, 65, 84], "optimis": 84, "option": [1, 17, 18, 20, 23, 24, 26, 28, 29, 30, 32, 35, 37, 38, 39, 40, 43, 44, 50, 51, 53, 54, 56, 57, 58, 60, 62, 65], "orang": 21, "orange1": 21, "orange2": 21, "orange3": 21, "orange4": 21, "orangered1": 21, "orangered2": 21, "orangered3": 21, "orangered4": 21, "orchid": 21, "orchid1": 21, "orchid2": 21, "orchid3": 21, "orchid4": 21, "order": [1, 18, 23, 28, 29, 33, 37, 38, 40, 42, 44, 50, 51, 53, 54, 58, 62, 65, 68, 84, 89], "orderedupd": 50, "ordinari": 64, "org": [39, 58, 59, 60, 62, 63, 64, 65, 70, 78, 86, 89], "organ": [15, 50, 64, 84], "organis": 61, "organiz": 84, "orient": [29, 35, 62], "origin": [20, 22, 23, 24, 26, 29, 31, 32, 33, 35, 42, 45, 47, 48, 50, 51, 56, 58, 62, 63, 64, 65, 66], "original_color": 56, "original_dest_color": 56, "orthogon": 35, "oss": 37, "osx": [23, 63], "other": [0, 15, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 38, 40, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 61, 62, 63, 64, 68, 70, 71, 84, 85, 86, 87, 88, 89], "otherarrai": 42, "othermask": 35, "othersurfac": 35, "otherwis": [1, 2, 5, 9, 12, 17, 18, 22, 23, 24, 25, 26, 28, 29, 31, 35, 36, 37, 38, 39, 43, 45, 46, 50, 51, 52, 56, 62, 72, 73, 89], "ouput": 76, "our": [58, 62, 63, 65, 66, 74, 85], "out": [15, 18, 24, 29, 32, 35, 36, 37, 38, 40, 44, 57, 58, 59, 61, 62, 64, 65, 84, 85, 86, 87, 88, 89], "outdat": 67, "outer": 72, "outgo": 37, "outlin": [24, 29, 35, 57], "outpng": 26, "output": [18, 25, 26, 28, 32, 35, 56, 67, 69, 70, 73, 74, 84, 88], "outputimag": 26, "outsid": [24, 28, 30, 33, 35, 36, 39, 45, 51, 56, 58, 62, 63, 68], "over": [22, 23, 25, 29, 31, 33, 35, 36, 38, 40, 42, 44, 47, 50, 57, 60, 62, 63, 64, 65, 66, 84, 86], "overal": 65, "overboard": 86, "overcom": 67, "overflow": 65, "overhead": [51, 64], "overlai": 64, "overlap": [35, 45, 50, 62, 64, 84, 87, 89], "overlap_area": 35, "overlap_mask": 35, "overlin": 29, "overrid": [18, 29, 35, 44, 50, 51, 63, 84], "overridden": [23, 29, 35, 38, 45], "overshoot": 36, "overwrit": [17, 24, 26, 32, 47], "overwritten": [24, 32, 47, 51], "own": [12, 16, 22, 25, 26, 27, 37, 38, 46, 48, 59, 61, 63, 65, 84, 86], "own_data_typ": 46, "owner": [11, 12], "ownership": 46, "p": [26, 31, 32, 33, 43, 62], "p1": 48, "p2": 48, "pac": 64, "pack": [23, 51, 52, 59], "packag": [15, 26, 28, 29, 30, 31, 49, 52, 58, 60, 63, 65], "pacman": 64, "pad": [29, 32, 56], "page": [33, 39, 46, 65], "pai": 70, "painless": 86, "paint": [50, 85], "pair": [12, 23, 24, 28, 29, 31, 32, 45, 51], "pajitnov": 74, "palegoldenrod": 21, "palegreen": 21, "palegreen1": 21, "palegreen2": 21, "palegreen3": 21, "palegreen4": 21, "palett": [23, 28, 31, 35, 51, 52, 56], "palette_color": [35, 56], "paleturquois": 21, "paleturquoise1": 21, "paleturquoise2": 21, "paleturquoise3": 21, "paleturquoise4": 21, "palevioletr": 21, "palevioletred1": 21, "palevioletred2": 21, "palevioletred3": 21, "palevioletred4": 21, "papayawhip": 21, "paper": 84, "paradigm": 84, "param": 24, "paramet": [18, 20, 23, 24, 25, 26, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 44, 45, 46, 51, 55, 56, 57, 70, 71], "parametr": 36, "parent": [2, 12, 17, 48, 50, 51], "parenthesi": 33, "pars": [84, 87], "part": [23, 24, 25, 29, 30, 35, 51, 53, 56, 62, 63, 64, 65, 68, 69, 70, 72, 86], "parti": [18, 63], "partial": [23, 24, 37, 51, 84], "particular": [18, 29, 40, 42, 49, 50, 53, 54, 59, 84], "particularli": 37, "pass": [8, 9, 14, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 50, 51, 53, 54, 56, 58, 59, 62, 63, 64, 66, 84, 86], "past": [24, 36, 46, 58, 63, 84], "patch": [13, 26, 28, 31, 38, 44, 63], "patel": 57, "path": [6, 9, 15, 25, 26, 28, 29, 31, 36, 38, 44, 53, 57, 58, 66, 84, 86, 89], "pathlib": [28, 29, 31, 38], "pathlib_path": 38, "pathnam": [38, 58, 86], "pattern": [29, 40], "paus": [19, 26, 33, 38, 40, 54, 86], "pbm": [31, 46], "pc": [17, 37], "pcf": 29, "pci": 65, "pcx": 31, "peachpuff": 21, "peachpuff1": 21, "peachpuff2": 21, "peachpuff3": 21, "peachpuff4": 21, "peek": 25, "pellet": 64, "penalti": [51, 59, 64], "pend": 37, "peopl": [15, 31, 58, 61, 62, 63], "per": [15, 24, 25, 29, 30, 31, 32, 35, 49, 50, 51, 52, 53, 54, 58, 59, 62, 63, 65, 69, 77, 84, 88, 89], "percentag": 36, "perfect": 35, "perform": [11, 23, 25, 26, 28, 29, 30, 35, 36, 38, 42, 50, 51, 52, 56, 57, 59, 64, 65, 84, 85, 88], "perhap": [62, 64, 84, 86], "period": [33, 40, 84], "permiss": 23, "permit": [14, 18, 29], "person": [62, 63, 88], "perspect": [26, 63], "peru": 21, "pete": [58, 59, 60, 62, 63, 64, 65, 84], "pfr": 29, "pg": [22, 58, 66], "pg_buffer": [1, 2], "pg_encodefilepath": 9, "pg_encodestr": 9, "pg_floatfromobj": 1, "pg_floatfromobjindex": 1, "pg_getdefaultwindow": 1, "pg_getdefaultwindowsurfac": 1, "pg_intfromobj": 1, "pg_intfromobjindex": 1, "pg_major_vers": 13, "pg_minor_vers": 13, "pg_mod_autoinit": 1, "pg_mod_autoquit": 1, "pg_patch_vers": 13, "pg_registerquit": 1, "pg_rgbafromobj": [1, 10], "pg_setdefaultwindow": 1, "pg_setdefaultwindowsurfac": 1, "pg_twofloatsfromobj": 1, "pg_twointsfromobj": 1, "pg_uintfromobj": 1, "pg_uintfromobjindex": 1, "pg_version_atleast": 13, "pg_versionnum": 13, "pg_view_p": 1, "pgbuffer_asarrayinterfac": 1, "pgbuffer_asarraystruct": 1, "pgbuffer_releas": 1, "pgbufproxy_check": 2, "pgbufproxy_getpar": 2, "pgbufproxy_new": 2, "pgbufproxy_trip": 2, "pgbufproxy_typ": 2, "pgchannel_asint": 7, "pgchannel_check": 7, "pgchannel_new": 7, "pgchannel_typ": 7, "pgchannelobject": 7, "pgcolor_check": 3, "pgcolor_new": 3, "pgcolor_newlength": 3, "pgcolor_typ": 3, "pgdict_asbuff": 1, "pgevent_check": 5, "pgevent_filluserev": 5, "pgevent_new": 5, "pgevent_new2": 5, "pgevent_typ": 5, "pgeventobject": 5, "pgexc_buffererror": 1, "pgexc_sdlerror": 1, "pgfont_check": 6, "pgfont_is_al": 6, "pgfont_new": 6, "pgfont_typ": 6, "pgfontobject": 6, "pglifetimelock_check": 12, "pglifetimelock_typ": 12, "pglifetimelockobject": 12, "pgm": 31, "pgobject_getbuff": 1, "pgrect_asrect": 8, "pgrect_check": 8, "pgrect_fromobject": 8, "pgrect_new": 8, "pgrect_new4": 8, "pgrect_norm": 8, "pgrect_typ": 8, "pgrectobject": 8, "pgrwops_fromfileobject": 9, "pgrwops_fromobject": 9, "pgrwops_isfileobject": 9, "pgrwops_releaseobject": 9, "pgsound_aschunk": 7, "pgsound_check": 7, "pgsound_new": 7, "pgsound_typ": 7, "pgsoundobject": 7, "pgsurface_assurfac": 11, "pgsurface_blit": 11, "pgsurface_check": 11, "pgsurface_lock": 12, "pgsurface_lockbi": 12, "pgsurface_locklifetim": 12, "pgsurface_new": 11, "pgsurface_new2": 11, "pgsurface_prep": 12, "pgsurface_typ": 11, "pgsurface_unlock": 12, "pgsurface_unlockbi": 12, "pgsurface_unprep": 12, "pgsurfaceobject": [1, 11, 12], "pgvidinfo_asvidinfo": 4, "pgvidinfo_check": 4, "pgvidinfo_new": 4, "pgvidinfo_typ": 4, "pgvidinfoobject": 4, "phase": [69, 70], "phi": 36, "photo": 44, "photograph": 56, "photoshop": 16, "physic": [15, 17, 23, 25, 32, 61, 63, 86, 88, 89], "pi": [24, 89], "pick": [23, 44, 56, 59, 62, 64], "pictur": [31, 63], "pie": 30, "piec": [29, 84], "pil": 31, "pile": 26, "pinch": 25, "pink": 21, "pink1": 21, "pink2": 21, "pink3": 21, "pink4": 21, "pip": 15, "pip3": 15, "pipe": 23, "pitch": [37, 51, 62], "pitch_bend": 37, "pixel": [15, 17, 18, 20, 22, 23, 24, 26, 28, 29, 30, 31, 35, 41, 45, 48, 51, 56, 58, 59, 63, 65, 85, 88, 89], "pixel2d": 65, "pixel3d": 65, "pixel_arrai": 42, "pixelarrai": [15, 26, 42, 51], "pixelcopi": [26, 42, 43, 52], "pixelformat": 18, "pixels2d": [52, 65], "pixels3d": [52, 65], "pixels_alpha": [52, 65], "pixels_blu": 52, "pixels_green": 52, "pixels_r": 52, "pixels_within_threshold": 56, "place": [1, 23, 25, 27, 29, 34, 36, 37, 39, 42, 44, 45, 46, 50, 51, 52, 53, 58, 62, 63, 64, 65, 68, 84, 87, 88], "placehold": 44, "placement": 44, "plai": [7, 15, 19, 23, 26, 32, 36, 37, 40, 47, 58, 62, 63, 64, 66, 70, 74, 84, 86], "plain": 46, "plan": [51, 63], "plane": [41, 51], "plant": 65, "plateau": 84, "platform": [15, 18, 23, 24, 25, 30, 33, 35, 37, 38, 41, 44, 46, 51, 53, 54, 57, 58, 59, 63, 84, 86, 88], "playabl": 49, "playback": [19, 26, 38, 40, 63], "player": [26, 50, 58, 61, 62, 64, 68, 70, 73, 74, 84, 88, 89], "player1": [61, 89], "player2": 89, "player_po": 15, "playerimag": 62, "playerpo": 62, "playersprit": 89, "playmu": 26, "play\ub77c\ub294": 78, "play\ud55c\ub2e4": 78, "pleas": [16, 23, 28, 33, 36, 44, 45, 51, 56, 84], "plenti": [61, 84], "plot": 61, "plu": [28, 29, 33, 37, 44, 64], "plug": [25, 32], "plum": 21, "plum1": 21, "plum2": 21, "plum3": 21, "plum4": 21, "pm_recommended_input_devic": 37, "pm_recommended_output_devic": 37, "pmdeviceid": 37, "png": [16, 26, 31, 58, 63, 65, 66, 75, 76, 77, 78, 84, 86, 87, 88, 89], "pnm": 31, "po": [25, 27, 35, 40, 50, 58, 62, 66, 72, 73, 80, 81], "point": [14, 17, 19, 20, 22, 24, 26, 29, 30, 35, 36, 37, 45, 48, 50, 56, 57, 62, 63, 64, 65, 67, 72, 84, 89], "pointer": [8, 9, 11, 58], "polar": 36, "polish": [22, 63], "poll": [15, 25, 27, 37, 84], "polygon": [24, 30], "pong": [61, 86, 89], "poor": 61, "poorli": [61, 84], "pop": 44, "popul": 9, "popular": [26, 32, 66], "port": [18, 26, 37, 44, 48], "portabl": [33, 37, 63], "portion": [11, 23, 45, 48, 51, 56, 63, 64, 84], "portmidi": 37, "posit": [1, 8, 17, 19, 22, 23, 24, 25, 26, 28, 29, 30, 32, 33, 35, 38, 39, 40, 44, 45, 48, 50, 51, 53, 55, 57, 58, 62, 63, 64, 66, 68, 69, 84, 85, 87, 88, 89], "possibl": [18, 23, 25, 28, 29, 31, 32, 36, 44, 50, 51, 57, 58, 63, 65, 67, 68], "possibli": 61, "post": [25, 27, 38, 47, 54], "pos\ub294": 80, "potenti": [31, 64, 84, 88], "powderblu": 21, "power": [18, 32, 33, 38, 64, 74, 84], "power_level": 32, "ppem": 29, "ppm": [31, 46], "pr": 39, "practic": [84, 86], "pre": [20, 29, 51], "pre_init": 38, "prealloc": 51, "prebuilt": 15, "preced": [35, 68], "precis": [23, 38, 51, 65, 84], "precise_i": 25, "precise_x": 25, "precisei": 25, "precisex": 25, "predecessor": 84, "predefin": [25, 46], "predomin": 43, "prefer": [23, 25, 30, 31, 33], "prefix": 58, "prematur": 84, "premul_alpha": [20, 51], "prepar": [26, 40, 66], "present": [44, 48, 50, 60, 62, 63, 64, 84], "preserv": [20, 44, 45, 51], "preset": [22, 38], "press": [25, 26, 32, 33, 39, 47, 57, 58, 62, 70, 71, 84], "pressur": 55, "pretend": 62, "pretti": [59, 62, 64, 65, 84, 85, 88, 89], "prettier": 33, "prevar": 84, "prevent": [25, 84, 89], "prevent_display_stretch": 23, "previou": [1, 23, 29, 38, 39, 48, 50, 54, 56, 58, 62, 64, 65, 69, 70, 72, 73, 84, 85, 89], "previous": [18, 20, 25, 28, 29, 31, 38, 40, 44, 59, 62, 85], "primari": 39, "primarili": [25, 29, 44, 48], "prime": 48, "primer": 65, "primit": 30, "principl": [88, 89], "print": [25, 28, 32, 33, 36, 39, 44, 45, 46, 57, 58, 59, 62, 66, 68, 70, 71, 72, 73, 76, 84, 86, 89], "printboard": [73, 81], "printf": [67, 75], "print\ud568\uc218\ub098": 76, "prior": [23, 59], "prioriti": 18, "privat": [51, 58], "probabl": [26, 36, 62, 64, 68, 84, 85], "problem": [28, 43, 44, 58, 61, 69, 84, 86], "proce": 84, "procedur": [67, 68], "process": [18, 25, 26, 27, 32, 46, 52, 53, 54, 60, 62, 67, 68, 70, 72, 73, 77, 84], "processor": [54, 56], "procur": 18, "produc": [29, 51, 84], "product": [36, 61], "profil": [23, 25, 84], "profit": 18, "program": [15, 19, 23, 25, 27, 32, 33, 37, 38, 41, 44, 45, 53, 54, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 84, 85, 86, 87, 88], "programm": [63, 64, 84, 86, 87], "programmat": 44, "progress": 43, "project": [16, 26, 36, 61, 63, 67, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 86, 87, 89], "prolif": 84, "prolog": 73, "promis": [58, 62], "prompt": [44, 63, 65], "proper": [29, 33, 38, 39, 64, 65], "properli": [9, 15, 25, 39, 53, 58, 62, 64, 65, 84], "properti": [17, 25, 29, 39, 50, 52], "propos": 63, "protect": [26, 58], "protocol": [2, 15, 31, 43, 51], "proud": 62, "provid": [15, 18, 20, 23, 26, 27, 28, 29, 33, 35, 36, 38, 41, 42, 44, 45, 50, 51, 53, 54, 56, 57, 58, 67, 86, 87], "proxi": [2, 17], "ps4": 32, "pseudo": 87, "pt": 56, "public": [26, 86, 89], "pull": [18, 58, 66], "pummel": [58, 66], "pump": [25, 27, 32, 88, 89], "punch": [58, 63, 66], "punch_sound": [58, 66], "punchabl": 58, "punctuat": 28, "pure": [44, 51], "purpl": [15, 21, 84], "purple1": 21, "purple2": 21, "purple3": 21, "purple4": 21, "purpos": [1, 18, 48, 57, 61], "push": [33, 71, 88], "pushabl": 32, "put": [15, 16, 32, 46, 54, 60, 61, 63, 64, 66, 68, 85, 86, 87], "puyopuyo": [67, 75], "pxarrai": 42, "py": [15, 23, 26, 44, 46, 53, 56, 61, 62, 65], "py_buff": [1, 17], "pybuf": 1, "pybuffer_releaseproc": 1, "pycdio": 19, "pygam": [10, 14, 21, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 89], "pygame2": 25, "pygame_blend_add": 11, "pygame_blend_alpha_sdl2": [11, 44], "pygame_blend_max": 11, "pygame_blend_min": 11, "pygame_blend_mult": 11, "pygame_blend_premultipli": 11, "pygame_blend_rgba_add": 11, "pygame_blend_rgba_max": 11, "pygame_blend_rgba_min": 11, "pygame_blend_rgba_mult": 11, "pygame_blend_rgba_sub": 11, "pygame_blend_sub": 11, "pygame_bufferproxi": 2, "pygame_camera": 44, "pygame_displai": 44, "pygame_force_scal": 44, "pygame_freetyp": [6, 28, 44], "pygame_hide_support_prompt": 44, "pygame_lofi": 16, "pygame_logo": 16, "pygame_mix": 7, "pygame_pow": 16, "pygame_powered_lowr": 16, "pygame_tini": 16, "pygameapi_base_numslot": 10, "pygamevers": 44, "pyobject": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12], "pyopengl": [26, 31, 63], "pypi": 42, "pyportmidi": 37, "pysdl": [63, 84], "pythagorean": [36, 69], "python": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18, 19, 22, 26, 28, 29, 31, 38, 43, 44, 45, 50, 51, 53, 58, 60, 61, 62, 64, 65, 66, 67, 68, 85, 86, 87], "python2": 26, "python26": 26, "python3": 18, "pytypeobject": [2, 3, 4, 7, 8, 11, 12], "pyunicode_asencodedstr": [9, 44], "pyzin": 63, "q": 33, "qce": 18, "quadrant": 24, "quadruplet": [24, 30], "quake3": 63, "qualiti": [26, 44, 58, 63], "quaternion": 67, "queri": [23, 37, 46, 59], "query_imag": [18, 57], "question": [15, 33, 62, 84], "queu": [25, 38, 40], "queue": [5, 18, 23, 32, 33, 34, 37, 38, 39, 40, 47, 54, 58, 63, 84, 88], "quick": [25, 26, 32, 51, 53, 60, 64, 65, 88], "quicker": [50, 51, 56, 64], "quickest": 51, "quickli": [31, 58, 59, 62, 63, 64, 65], "quietli": 25, "quit": [1, 15, 19, 22, 23, 24, 25, 26, 28, 29, 32, 37, 38, 39, 44, 47, 51, 53, 57, 58, 62, 63, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 88, 89], "quit\uac19\uc740": 76, "quit\ub77c\ub294": 76, "quiz": 73, "quot": 33, "quotedbl": 33, "r": [8, 20, 24, 26, 30, 32, 33, 36, 42, 43, 45, 51, 56, 64, 65, 71, 72, 73, 79, 80, 81], "r_margin": [72, 73, 80, 81], "radial": [36, 65], "radian": [24, 30, 36, 87, 89], "radii": [24, 30], "radiu": [24, 30, 50], "radom": 74, "rais": [1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 17, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 35, 36, 37, 38, 40, 43, 44, 45, 46, 48, 49, 50, 51, 52, 56, 57, 59, 60, 65, 84, 86, 89], "ramp": 23, "ran": 85, "rand": 89, "randint": [73, 81, 89], "random": [53, 61, 73, 74, 81, 86, 89], "randomli": 73, "rang": [20, 23, 24, 25, 28, 29, 32, 33, 35, 36, 37, 38, 42, 44, 47, 50, 57, 62, 63, 65, 68, 71, 72, 73, 79, 80, 81], "rank": 84, "rapid": 32, "rapidli": [33, 62], "rare": [36, 44, 51, 84], "rate": [38, 40, 50, 69, 84], "rather": [24, 28, 29, 30, 33, 44, 50, 54, 56, 69, 85, 87], "ratio": [45, 50], "raw": [17, 31, 42, 43, 51, 52, 65], "rb": 46, "re": [22, 26, 29, 36, 44, 56, 59, 61, 62, 64, 71, 84, 85, 87, 88], "reach": [63, 84], "read": [9, 17, 20, 25, 26, 29, 37, 39, 46, 48, 50, 51, 61, 62, 65, 84], "readabl": [20, 38, 68, 86], "readi": [18, 22, 32, 48, 53, 57, 58, 62, 63], "readlin": 22, "readm": 15, "readonli": 50, "real": [25, 28, 29, 37, 38, 51, 57, 59, 62, 64, 70, 84], "realist": [86, 89], "realiti": [59, 84], "realiz": [63, 84], "realli": [23, 41, 56, 58, 59, 62, 63, 64, 65, 70, 85, 87, 88], "realtim": [51, 63, 65], "reason": [23, 27, 28, 29, 38, 39, 51, 56, 57, 61, 62, 64, 84, 87], "rebel": 63, "rebind": 47, "recalcul": 29, "recap": 61, "receiv": [23, 27, 32, 33, 39, 47, 84], "recent": [58, 63, 64, 65], "recogn": [17, 25, 29, 32, 43, 45, 56], "recogniz": 31, "recommend": [25, 27, 28, 31, 50, 51, 62, 84], "recommended_input_devic": 37, "recommended_output_devic": 37, "recompil": 89, "reconstruct": 51, "record": [18, 29, 52, 53, 72, 84], "recreat": [26, 50, 53], "rect": [0, 15, 24, 29, 30, 33, 35, 41, 45, 48, 50, 51, 56, 57, 58, 62, 63, 64, 66, 71, 72, 73, 79, 80, 81, 86, 87, 88, 89], "rect1": 45, "rect2": 45, "rect_area_pt": 56, "rect_list": [45, 50], "rect_sequ": 45, "rectangl": [8, 15, 23, 24, 26, 28, 29, 30, 33, 45, 48, 50, 51, 56, 64, 68, 84, 85, 87, 89], "rectangle_list": 23, "rectangular": [8, 29, 30, 35, 42, 48, 50, 51, 62, 63, 71, 84], "rectstyl": 84, "red": [1, 15, 18, 20, 21, 23, 24, 31, 42, 50, 51, 52, 56, 65, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85], "red1": 21, "red2": 21, "red3": 21, "red4": 21, "redimg": 65, "redistribut": 18, "redraw": [41, 62], "redrawn": [23, 41], "reduc": [29, 38, 51, 64, 88], "reentrant": 53, "ref": [70, 78], "refcount": 9, "refer": [1, 12, 17, 23, 24, 31, 33, 35, 42, 46, 47, 49, 50, 51, 52, 57, 58, 59, 62, 63, 64, 65, 68, 69, 70, 71, 72, 73, 84, 88], "referenc": [50, 52, 58, 64, 65], "reflect": 36, "reflect_ip": 36, "refresh": 84, "regard": [24, 68], "regardless": [28, 44], "region": [31, 51, 56, 84, 86], "regist": [1, 44, 46, 87], "register_quit": 44, "registri": 37, "regular": [15, 23, 40, 41, 50, 51, 56, 64], "regularli": 32, "reinit": [88, 89], "reiniti": 38, "reinitialis": 32, "rel": [25, 32, 37, 39, 40, 41, 48, 50, 61, 86], "relat": [1, 23, 25, 29, 34, 39, 43, 47, 50, 84], "relationship": 50, "relative_mous": 48, "releas": [1, 12, 17, 18, 23, 25, 29, 30, 32, 33, 37, 39, 42, 44, 46, 51, 58, 63, 84, 86, 88, 89], "release_buff": 1, "relev": [29, 84], "reli": [8, 33, 88], "reliabl": [18, 23, 37], "remain": [20, 40, 45, 51, 52, 85], "remap": [42, 47], "rememb": [25, 39, 50, 51, 59, 61, 63, 64, 65, 68, 73, 84, 86, 87], "remind": 68, "remov": [12, 17, 18, 25, 27, 28, 32, 36, 44, 48, 50, 56, 58, 62, 64, 89], "remove_intern": 64, "remove_sprites_of_lay": 50, "renam": 47, "render": [15, 23, 24, 26, 32, 41, 48, 50, 58, 63, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88], "render_device_reset": 25, "render_raw": 29, "render_raw_to": 29, "render_targets_reset": 25, "render_to": 29, "renderclear": [50, 64], "renderplain": [50, 58, 64, 66, 89], "renderupd": [26, 50, 64, 84], "renderupdatesdraw": 64, "repaint": [25, 27, 50], "repaint_rect": 50, "repcolor": 42, "repeat": [23, 33, 35, 38, 40, 44, 61, 62], "repeatedli": [50, 51, 54, 56, 58, 84], "replac": [1, 23, 27, 29, 38, 42, 43, 44, 51, 52, 54, 59, 62, 65, 68], "report": [26, 32, 44, 56, 84], "repositori": [44, 84], "repr": 44, "repres": [1, 11, 12, 13, 15, 17, 19, 20, 22, 23, 24, 25, 29, 31, 32, 33, 35, 36, 38, 39, 40, 41, 44, 45, 47, 48, 52, 54, 56, 58, 62, 63, 64, 65, 84, 87], "represent": [1, 3, 8, 15, 21, 24, 30, 42, 56, 58], "reproduc": 18, "request": [1, 23, 26, 28, 29, 35, 38, 49, 51, 52, 59], "requir": [17, 18, 23, 25, 26, 28, 33, 35, 36, 37, 38, 44, 45, 46, 47, 50, 51, 55, 56, 59, 61, 62, 63, 64, 65, 68, 70, 84, 85, 86, 88], "resampl": 38, "rescal": 26, "resembl": [26, 43, 52], "reserv": [25, 37, 38], "reset": [29, 32, 37, 38, 40, 50, 58, 89], "resist": 84, "resiz": [15, 23, 25, 26, 35, 45, 48, 56, 58, 85], "resolut": [15, 16, 23, 29, 41, 51, 54, 56, 58, 59, 63], "resolv": [46, 68, 87], "resourc": [26, 38, 40, 44, 59, 61, 66, 84, 87], "respect": [1, 22, 23, 24, 33, 35, 36, 46, 50, 51, 59], "respond": [25, 27, 62, 84], "respons": [9, 53], "rest": [19, 25, 27, 57, 58, 62, 63, 65, 84], "restart": [40, 86], "restor": [23, 25, 33, 48], "restrict": [28, 51], "result": [20, 24, 28, 29, 35, 36, 37, 40, 42, 45, 51, 53, 56, 58, 62, 63, 64, 65, 68, 69, 70, 73, 76, 84, 89], "resultscreen": [77, 78], "resum": [19, 38, 40], "retail": 63, "retain": [18, 36, 51], "retrac": 23, "retriev": [13, 36, 38, 46, 84, 88], "return": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 71, 72, 73, 79, 80, 81, 84, 85, 86, 87, 88, 89], "reus": [18, 86], "reusabl": 86, "rev": 44, "revamp": 62, "revers": [1, 51, 58, 63, 65, 89], "revis": [44, 61, 63], "reward": [58, 63], "rewind": 40, "rewound": 26, "rewrit": 84, "rgb": [18, 20, 23, 24, 28, 30, 31, 41, 43, 51, 57, 58, 63, 65, 84, 85], "rgba": [1, 3, 20, 23, 24, 30, 31, 51], "rgba_premult": 31, "rgbarrai": 65, "rgbx": 31, "rich": 58, "rid": 57, "ridicul": 61, "right": [20, 23, 24, 25, 29, 30, 33, 35, 38, 42, 44, 45, 47, 50, 51, 58, 62, 63, 64, 65, 66, 67, 68, 69, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 89], "rins": 62, "rle": 51, "rleaccel": [51, 58, 66], "rleaccelok": 51, "road": 62, "roll": [32, 39, 64], "root": [36, 53, 84], "rosybrown": 21, "rosybrown1": 21, "rosybrown2": 21, "rosybrown3": 21, "rosybrown4": 21, "rotat": [25, 26, 29, 36, 48, 50, 56, 58, 63, 66], "rotate_i": 36, "rotate_ip": 36, "rotate_ip_rad": 36, "rotate_rad": 36, "rotate_rad_ip": 36, "rotate_x": 36, "rotate_x_ip": 36, "rotate_x_ip_rad": 36, "rotate_x_rad": 36, "rotate_x_rad_ip": 36, "rotate_y_ip": 36, "rotate_y_ip_rad": 36, "rotate_y_rad": 36, "rotate_y_rad_ip": 36, "rotate_z": 36, "rotate_z_ip": 36, "rotate_z_ip_rad": 36, "rotate_z_rad": 36, "rotate_z_rad_ip": 36, "rotozoom": 56, "rough": 84, "round": [20, 24, 36, 37, 38, 88], "routin": [1, 18, 25, 28, 29, 51, 56, 58, 59, 68, 84], "row": [35, 42, 51, 65], "row1": 65, "row2": 65, "royalblu": 21, "royalblue1": 21, "royalblue2": 21, "royalblue3": 21, "royalblue4": 21, "rr": 20, "rrggbb": 20, "rrggbbaa": 20, "rt": 32, "rudder": 32, "rudimentari": 26, "ruin": 65, "rule": [59, 70, 73, 74, 89], "rumbl": [32, 47], "run": [15, 23, 25, 26, 31, 32, 38, 44, 53, 54, 56, 58, 59, 62, 63, 64, 65, 66, 67, 84, 85, 89], "run_speed_test": 26, "run_test": 53, "run_tests__test": 53, "rundown": 26, "runner": 53, "runtim": [23, 38, 54, 56, 63], "runtimeerror": [29, 44], "rw": 9, "rwobject": 0, "rx": 30, "ry": 30, "r\uac12": 76, "saddlebrown": 21, "safe": [9, 19, 23, 25, 28, 29, 32, 37, 38, 42, 44, 47, 50, 51, 57, 60], "sai": [51, 61, 62, 64, 68, 84], "said": [24, 61, 68, 70, 74, 84, 85], "sake": [84, 85], "salmon": 21, "salmon1": 21, "salmon2": 21, "salmon3": 21, "salmon4": 21, "salt": 84, "sam": 63, "same": [9, 18, 19, 20, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 35, 36, 38, 39, 42, 43, 44, 45, 47, 50, 51, 52, 54, 56, 57, 58, 59, 62, 63, 64, 65, 67, 68, 70, 71, 72, 73, 84, 85, 89], "sampl": [15, 20, 38, 40, 56, 57, 62, 64, 65, 88], "san": 29, "sandybrown": 21, "satisfactori": 86, "satisfi": 23, "satur": 18, "sauf": 35, "save": [15, 18, 31, 61, 63, 84], "save_extend": 31, "saw": [57, 58, 62], "scalabl": 29, "scalar": [36, 45, 56, 58], "scale": [18, 23, 24, 26, 29, 31, 35, 36, 44, 45, 48, 50, 56, 58, 63, 65, 66], "scale2x": 56, "scale_bi": [45, 56], "scale_by_ip": 45, "scale_to_length": 36, "scaledown": 65, "scalei": 45, "scaler": 26, "scaletest": 26, "scaleup": 65, "scalex": 45, "scan": 19, "scancod": [25, 33], "scanf": [67, 75], "scanlin": 62, "scant": 26, "scene": [31, 57], "school": 39, "scope": [42, 65], "score": [26, 50, 61, 70, 89], "scoreboard": 61, "scoreup": 61, "scrap": [15, 46], "scrap_bmp": 46, "scrap_clipboard": [26, 46], "scrap_pbm": 46, "scrap_ppm": 46, "scrap_select": 46, "scrap_text": 46, "scratch": [64, 84], "scratchi": 38, "screen": [1, 4, 15, 22, 24, 25, 26, 28, 31, 32, 33, 34, 39, 44, 45, 46, 48, 50, 51, 57, 58, 59, 61, 63, 64, 65, 66, 68, 69, 70, 71, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "screen_dim": 26, "screen_height": 23, "screen_rect": [45, 50], "screen_width": 23, "screensav": [23, 44, 69], "screenshot": 58, "script": [28, 29, 60, 63, 66], "scroll": [25, 26, 39, 51, 62, 63, 64, 84], "scrollabl": 26, "scrollock": 33, "sdl": [1, 5, 7, 9, 11, 12, 23, 25, 26, 27, 32, 38, 41, 43, 44, 47, 48, 56, 59, 63, 84], "sdl1": [19, 23, 41, 51], "sdl2": [25, 38, 39, 44, 47, 51, 55], "sdl3": 23, "sdl_appact": 25, "sdl_appinputfocu": 25, "sdl_appmousefocu": 25, "sdl_audiodriv": 44, "sdl_delai": 54, "sdl_event": 5, "sdl_gfx": 30, "sdl_hint_video_allow_screensav": 23, "sdl_imag": [31, 63], "sdl_joystick_allow_background_ev": [32, 44], "sdl_mixer": [38, 40], "sdl_mousewheel_flip": 25, "sdl_rect": [8, 11], "sdl_rwop": 9, "sdl_surfac": 11, "sdl_ttf": [28, 29, 44], "sdl_video": 51, "sdl_video_allow_screensav": 44, "sdl_video_cent": 44, "sdl_video_window_po": 44, "sdl_video_x11_net_wm_bypass_compositor": 44, "sdl_videodriv": [23, 44], "sdl_videoinfo": 4, "sdl_window": 1, "sdl_windowid": 23, "sdlerror": 40, "sdlversion": 44, "sea": 24, "seagreen": 21, "seagreen1": 21, "seagreen2": 21, "seagreen3": 21, "seagreen4": 21, "search": [15, 28, 29, 35, 45, 50, 56], "search_color": 56, "search_surf": 56, "seashel": 21, "seashell1": 21, "seashell2": 21, "seashell3": 21, "seashell4": 21, "second": [15, 17, 19, 20, 22, 24, 26, 30, 32, 36, 38, 40, 42, 49, 50, 53, 54, 58, 60, 62, 63, 65, 69, 70, 71, 72, 77, 84, 88, 89], "secondari": 84, "section": [15, 19, 51, 58, 61, 62, 64, 65, 67, 68, 86, 89], "secur": 86, "see": [9, 16, 18, 19, 20, 23, 24, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 43, 44, 45, 47, 50, 51, 52, 56, 57, 58, 60, 61, 62, 63, 64, 65, 84, 85, 87, 88, 89], "seed": [53, 65], "seek": 9, "seem": [31, 46, 61, 62, 63, 64, 68, 72, 73, 84, 85, 87], "seemingli": 61, "seen": [23, 61, 62, 65, 88, 89], "segment": [24, 30], "select": [18, 23, 25, 29, 33, 35, 37, 38, 40, 44, 46, 53, 59, 62, 67, 69, 73, 84], "self": [20, 32, 35, 36, 45, 50, 51, 56, 57, 58, 62, 64, 66, 87, 88, 89], "sell": 62, "semi": [26, 84], "semicolon": 33, "semiton": 37, "send": [25, 37, 38, 40, 89], "sens": [33, 62, 84, 87, 88, 89], "sent": [23, 25, 32, 33, 38, 40], "separ": [18, 22, 26, 28, 29, 37, 38, 44, 45, 50, 51, 52, 53, 56, 57, 61, 62, 64, 65, 72, 84, 86], "sequenc": [1, 8, 14, 22, 23, 24, 25, 29, 30, 33, 35, 37, 39, 42, 45, 50, 51, 56, 63, 64, 84, 88], "sequenti": 24, "seri": [37, 63, 70], "serv": [27, 63, 84], "server": [26, 39], "servic": 18, "session": 53, "set": [1, 6, 17, 18, 20, 22, 23, 24, 25, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 58, 60, 62, 63, 65, 67, 68, 70, 71, 72, 73, 84, 85, 86, 87, 88, 89], "set_allow": 25, "set_allow_screensav": 23, "set_alpha": [43, 51], "set_at": [35, 51, 65, 84], "set_behavior": 56, "set_block": [25, 84], "set_bold": 28, "set_capt": [22, 23, 24, 32, 58, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85, 89], "set_clip": [50, 51], "set_color": 56, "set_colorkei": [43, 51, 58, 66, 84], "set_control": [18, 57], "set_cursor": [22, 39], "set_default_resolut": 29, "set_endev": [38, 40], "set_error": 44, "set_eventst": 47, "set_fullscreen": 48, "set_gamma": 23, "set_gamma_ramp": 23, "set_grab": [25, 33, 39], "set_icon": [23, 48], "set_instru": 37, "set_ital": 28, "set_keyboard_grab": 25, "set_length": 20, "set_loc": 41, "set_map": 47, "set_mask": 51, "set_mod": [1, 15, 22, 23, 24, 32, 33, 34, 39, 44, 46, 48, 51, 57, 58, 59, 62, 63, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 89], "set_modal_for": 48, "set_num_channel": 38, "set_palett": [23, 51], "set_palette_at": 51, "set_po": [39, 40], "set_repeat": 33, "set_reserv": 38, "set_script": 28, "set_shift": 51, "set_smoothscale_backend": 56, "set_strikethrough": 28, "set_text_input_rect": 33, "set_tim": 54, "set_timing_threshold": 50, "set_timing_treshold": 50, "set_underlin": 28, "set_viewport": 48, "set_vis": [39, 58, 66], "set_volum": [38, 40], "set_window": 48, "setcolor": 35, "setsurfac": 35, "settabl": 44, "setup": [15, 22, 26, 84], "sever": [15, 22, 23, 24, 26, 29, 38, 45, 50, 54, 59, 60, 62, 63, 64, 65, 84, 85, 89], "sf": 42, "sfnt": 29, "shade": 24, "shall": 18, "shallow": 35, "shape": [15, 17, 28, 42, 43, 51, 63, 65, 72, 84], "share": [15, 25, 28, 31, 32, 33, 38, 46, 48, 51, 52, 54], "sharp": 24, "she": 85, "shell": 26, "shift": [23, 25, 26, 33, 35, 42, 44, 51, 59, 65], "shinner": [58, 59, 60, 62, 63, 64, 65, 84], "shoot": 63, "short": [25, 63, 65, 84], "shortcut": [25, 64], "shorter": [23, 58, 65], "shortest": 36, "shot": 64, "should": [18, 19, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 42, 44, 45, 47, 50, 51, 54, 56, 58, 59, 61, 62, 63, 64, 65, 68, 69, 84, 85, 86, 87, 89], "shoulder": 47, "shouldn": 88, "show": [15, 22, 23, 26, 29, 33, 39, 41, 48, 53, 56, 57, 58, 59, 62, 65, 84, 88, 89], "show_output": 53, "showcas": [26, 84], "shown": [23, 25, 33, 41, 57, 62, 84, 87], "shrink": [45, 84, 89], "shrinkag": 56, "shrunk": 51, "shut": [23, 29, 32, 44, 69], "shutdown": [7, 63], "side": [23, 24, 42, 45, 47, 58, 61, 63, 87, 88], "sienna": 21, "sienna1": 21, "sienna2": 21, "sienna3": 21, "sienna4": 21, "sign": [17, 33, 37, 38, 39, 44], "signal": [25, 40, 85], "signific": 51, "silenc": 53, "silent": [23, 60], "silver": 21, "simd": 51, "similar": [29, 31, 32, 42, 49, 50, 51, 54, 58, 62, 64, 65, 85, 86, 88, 89], "simpl": [15, 22, 23, 24, 25, 26, 32, 42, 50, 51, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 84, 85, 86, 89], "simpler": [62, 63, 64], "simplest": [57, 71], "simpli": [22, 25, 37, 41, 44, 50, 57, 58, 59, 62, 63, 65, 67, 84, 85, 87, 89], "simul": [58, 67], "simultan": [38, 67], "sin": [87, 89], "sinc": [15, 19, 20, 23, 25, 28, 31, 32, 36, 38, 39, 44, 48, 50, 51, 52, 54, 57, 58, 59, 60, 62, 63, 64, 65, 84], "singl": [17, 20, 22, 23, 24, 25, 28, 29, 30, 32, 33, 38, 40, 41, 42, 43, 45, 50, 51, 52, 53, 58, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 84, 85], "sit": 84, "site": 26, "situat": [23, 36, 51, 58, 64, 65, 84], "six": [38, 40, 61, 63], "sizabl": 84, "size": [8, 17, 18, 22, 23, 24, 25, 26, 28, 29, 31, 35, 38, 39, 41, 42, 43, 45, 48, 50, 51, 52, 56, 57, 58, 59, 61, 62, 63, 65, 66, 68, 75, 76, 77, 78, 79, 80, 81, 84, 85], "sizeal": 22, "sizenesw": 22, "sizenws": 22, "sizeof": 35, "sizer_x_str": 22, "sizer_xy_str": 22, "sizer_y_str": 22, "skeleton": 84, "skew": 28, "skill": 84, "skip": [23, 35, 38, 58], "skyblu": 21, "skyblue1": 21, "skyblue2": 21, "skyblue3": 21, "skyblue4": 21, "sl": 32, "slash": [22, 33], "slateblu": 21, "slateblue1": 21, "slateblue2": 21, "slateblue3": 21, "slateblue4": 21, "slategrai": 21, "slategray1": 21, "slategray2": 21, "slategray3": 21, "slategray4": 21, "slategrei": 21, "sleep": [25, 54], "slerp": 36, "slice": [36, 42, 43, 65, 84], "slight": [58, 64], "slightli": [15, 20, 25, 26, 36, 39, 40, 51, 54, 58, 64, 84, 85], "slope": 24, "sloppi": 26, "slot": 0, "slow": [23, 48, 51, 57, 59, 62, 65, 84, 85], "slower": [50, 51, 54, 62, 84], "slowest": [44, 51, 85], "small": [18, 22, 23, 28, 29, 32, 36, 39, 44, 45, 58, 62, 63, 65, 71, 72, 84, 85, 87], "smaller": [18, 23, 35, 38, 45, 51, 71, 72, 84], "smallest": [23, 51, 59], "smart": [62, 64], "smooth": [28, 58], "smoother": 62, "smoothli": [56, 62], "smoothscal": [26, 56], "smoothscale_bi": 56, "sn9c101": 18, "snakeviz": 84, "snapshot": 57, "sndarrai": [15, 26, 38, 49, 63], "snow": 21, "snow1": 21, "snow2": 21, "snow3": 21, "snow4": 21, "so": [10, 17, 18, 20, 22, 23, 24, 26, 29, 30, 31, 32, 33, 36, 38, 42, 43, 44, 45, 50, 51, 52, 56, 58, 59, 61, 63, 64, 65, 67, 68, 69, 70, 71, 72, 74, 84, 85, 86, 87, 88, 89], "socket": [86, 89], "soften": 65, "softwar": [15, 18, 23, 30, 37, 41, 50, 51, 58, 63], "solarwolf": 63, "solid": [24, 28, 30, 50, 51, 52, 56, 65, 84], "solut": [84, 85], "solv": [28, 38, 61, 67, 84], "some": [15, 18, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 34, 36, 37, 38, 39, 42, 44, 45, 46, 50, 56, 57, 58, 59, 60, 61, 63, 64, 65, 67, 68, 69, 70, 72, 84, 85, 86, 87, 88, 89], "someimag": 26, "someth": [15, 18, 24, 26, 39, 56, 57, 59, 62, 63, 64, 65, 68, 69, 70, 84, 85], "sometim": [22, 23, 27, 44, 64, 84], "somewhat": [26, 64, 84], "somewher": [64, 68], "soni": 32, "sonix": 18, "soon": [40, 44, 64, 88], "sophist": [86, 87], "sorri": [57, 59], "sort": [23, 25, 26, 27, 50, 58, 59, 62, 64, 84, 89], "sound": [7, 15, 26, 40, 58, 61, 63, 64, 66, 67, 70, 73, 84, 86], "sound_array_demo": 26, "sourc": [15, 18, 26, 31, 37, 38, 42, 43, 48, 50, 51, 56, 58, 61, 62, 63, 64, 67, 68, 69, 70, 84, 86, 89], "source_rect": 50, "sourcecod": [76, 77, 78], "south": 22, "southeast": 22, "southwest": 22, "space": [20, 28, 29, 31, 33, 37, 42, 62, 84], "sparingli": 48, "speak": [85, 86], "speaker": 38, "special": [18, 22, 23, 25, 33, 35, 38, 43, 50, 51, 56, 58, 59, 62, 64, 65, 68, 84, 85], "special_flag": [48, 50, 51], "specif": [23, 25, 28, 29, 33, 35, 36, 38, 43, 46, 50, 51, 52, 57, 58, 59, 62, 64, 65, 68, 70, 71, 72, 84], "specifi": [13, 18, 21, 23, 24, 28, 29, 31, 32, 35, 36, 37, 38, 40, 46, 47, 50, 56, 59, 65, 89], "sped": 24, "speed": [25, 26, 29, 44, 54, 62, 63, 64, 69, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "spend": 84, "spent": [63, 74, 84], "spheric": 36, "spill": 24, "spin": [26, 58, 66, 88, 89], "split": [22, 29, 58, 63, 64, 66, 84], "sport": 63, "spot": 84, "spread": 84, "spring": 56, "springgreen": 21, "springgreen1": 21, "springgreen2": 21, "springgreen3": 21, "springgreen4": 21, "sprite": [15, 26, 35, 36, 50, 61, 66, 84, 88, 89], "sprite1": 50, "sprite2": 50, "sprite_dict": 50, "sprite_height": 62, "sprite_list": 50, "sprite_width": 62, "spritecollid": [50, 64, 87], "spritecollideani": 50, "spritedict": 64, "sprites_click": 84, "sqrt": [36, 69], "squar": [24, 32, 36, 72], "squeez": 84, "sr": 32, "src": 65, "src_c": [0, 10, 13], "srcalpha": [35, 43, 51, 56], "srccolorkei": 51, "srcobj": 11, "srcrect": [11, 48], "sse": [26, 56], "stabil": 33, "stabl": 43, "stack": 25, "stage": 57, "stai": [61, 65, 70], "stand": 26, "standard": [1, 22, 25, 27, 41, 43, 44, 46, 50, 57, 58, 59, 61, 63, 64, 65, 68, 84], "star": 26, "starfield": 26, "start": [1, 17, 18, 19, 24, 25, 26, 29, 30, 32, 33, 35, 38, 39, 40, 42, 44, 45, 47, 50, 51, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 69, 74, 84, 85, 86, 88, 89], "start_angl": [24, 30], "start_index": 65, "start_po": 24, "start_text_input": 33, "startup": [7, 38], "state": [23, 25, 26, 29, 31, 32, 33, 37, 38, 39, 46, 47, 48, 50, 51, 58, 64, 66, 67, 84, 88, 89], "statement": [68, 69, 70, 71, 72, 84, 89], "statement\uc5d0": 77, "statement\uc5d0\uc11c": 77, "static": [47, 48, 50, 69], "stationari": 64, "statu": [26, 32, 37, 70], "stderr": 53, "stdin": 65, "stdout": 53, "steelblu": 21, "steelblue1": 21, "steelblue2": 21, "steelblue3": 21, "steelblue4": 21, "steep": 24, "stencil": 23, "step": [15, 30, 32, 42, 58, 65, 68, 70, 73, 88], "stereo": [23, 38, 49], "stick": [32, 47, 62, 65, 84], "still": [23, 25, 28, 31, 33, 36, 38, 39, 43, 45, 46, 47, 48, 51, 56, 57, 58, 61, 62, 63, 64, 65, 71, 72, 73, 84, 85, 88, 89], "stop": [1, 18, 19, 24, 30, 32, 33, 38, 39, 40, 44, 47, 54, 57, 62, 64, 84, 88, 89], "stop_angl": [24, 30], "stop_rumbl": [32, 47], "stop_text_input": 33, "store": [8, 22, 23, 25, 29, 30, 35, 50, 51, 52, 58, 62, 64, 68], "str": [17, 18, 20, 28, 29, 32, 33, 35, 37, 44, 47, 49, 52, 71, 72, 73, 79, 80, 81], "straight": [24, 30, 51, 62, 63, 65, 86], "straighten": 62, "straightforward": [62, 63], "strang": [23, 63], "stream": [15, 37, 38, 48, 63], "strength": [29, 32, 47], "stress": [63, 84], "stretch": [23, 26, 28, 29], "strict": [18, 61, 84], "strictli": [30, 85], "stride": [17, 42], "strike": 29, "strikethrough": 28, "string": [9, 14, 17, 18, 19, 20, 22, 23, 25, 28, 29, 31, 32, 33, 37, 38, 41, 44, 46, 48, 49, 51, 52, 53, 56, 68, 84, 86, 87], "strip": 51, "stripe": 65, "stroke": 24, "strong": 29, "strongli": [23, 50], "struct": [1, 4, 5, 6, 7, 9, 17, 29, 42, 43, 51, 52], "structur": [7, 10, 43, 85, 87, 88], "stuck": 62, "studi": [65, 87], "studio": 63, "stuff": [46, 57, 61, 62, 65], "stump": 84, "style": [25, 26, 29, 32, 42, 63, 86], "style_default": 29, "style_norm": 29, "style_obliqu": 29, "style_strong": 29, "style_underlin": 29, "style_wid": 29, "sub": [50, 84], "subarrai": 42, "subclass": [2, 3, 4, 5, 6, 7, 11, 12, 17, 20, 35, 36, 45, 50, 51], "subdirectori": [26, 58], "subgroup": 67, "subject": [23, 44], "submask": 35, "submit": 84, "submodul": [44, 53], "subpackag": 53, "subprocess": 53, "subprocess_ignor": 53, "subscript": [36, 42], "subsect": 62, "subsequ": [23, 57], "subset": [22, 23, 84], "substanti": 84, "substitut": [18, 22], "substr": 37, "subsubsurfac": 51, "subsurfac": [12, 51, 56], "subtract": 89, "subview": 42, "succe": [18, 23], "succeed": 18, "success": [1, 2, 5, 8, 9, 11, 23, 44, 84], "successfulli": [32, 47], "sudden": 63, "suffix": 45, "suggest": [42, 58, 84], "suit": [27, 51, 59], "suitabl": [23, 28, 29, 46, 63, 68, 86], "sum": [24, 74], "summari": 64, "summer": 63, "super": [25, 26, 35, 48, 64], "superclass": 36, "superior": 51, "suppli": [18, 35, 37, 38, 57, 58, 65, 85], "support": [1, 6, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 56, 57, 58, 59, 63, 84, 87], "suppos": [56, 84], "supposedli": 84, "sure": [10, 50, 54, 57, 58, 62, 63, 64, 65, 69, 70, 84, 89], "surf": [22, 26, 29, 30, 42, 50, 51, 56], "surfac": [0, 1, 2, 10, 12, 15, 18, 20, 22, 23, 24, 26, 28, 29, 30, 31, 35, 36, 39, 41, 43, 46, 48, 50, 51, 57, 58, 59, 62, 63, 64, 66, 85, 89], "surface_dest": 50, "surface_to_arrai": 43, "surfarrai": [15, 17, 26, 43, 49, 51, 52, 63, 84], "surfdemo_show": 65, "surflock": 0, "surfobj": 12, "surpris": [62, 63], "surrog": [14, 29], "surround": [56, 85], "suspend": 84, "svg": [16, 31], "svgalib": 23, "swap": [23, 31, 42, 45], "swatch": 20, "swig": 63, "switch": [22, 23, 29, 44, 50, 59, 89], "switch_lay": 50, "swizzl": 36, "swsurfac": 51, "sy": [14, 44, 53, 62, 63, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 86, 89], "symbol": 33, "symmetri": 36, "sync": [23, 25], "synchron": 37, "synonym": 25, "syntax": [65, 84], "syntaxerror": 44, "synthes": 37, "sysfont": [28, 29], "sysrq": 33, "system": [14, 15, 18, 19, 22, 23, 25, 26, 27, 28, 29, 32, 33, 36, 37, 39, 40, 44, 48, 49, 51, 52, 53, 59, 68, 70, 84, 85, 88], "system_cursor_arrow": 22, "system_cursor_crosshair": 22, "system_cursor_hand": 22, "system_cursor_ibeam": 22, "system_cursor_no": 22, "system_cursor_sizeal": 22, "system_cursor_sizen": 22, "system_cursor_sizenesw": 22, "system_cursor_sizenws": 22, "system_cursor_sizew": 22, "system_cursor_wait": 22, "system_cursor_waitarrow": 22, "systemexit": [84, 86, 89], "sys\ub294": 76, "t": [9, 18, 19, 23, 24, 26, 27, 28, 29, 32, 33, 36, 40, 44, 46, 48, 49, 50, 51, 52, 54, 56, 57, 58, 61, 62, 63, 64, 65, 68, 69, 70, 71, 72, 73, 74, 85, 86, 87, 88, 89], "ta": 61, "tab": [25, 33], "tabl": [23, 43], "tackl": 84, "tag": [40, 53], "taka": 18, "takafumi": 18, "take": [14, 22, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 40, 42, 45, 50, 51, 53, 56, 57, 58, 59, 63, 64, 65, 68, 84, 85, 86, 88, 89], "taken": [3, 21, 23, 26, 27, 36, 38, 39, 56, 87], "talk": 62, "tan": 21, "tan1": 21, "tan2": 21, "tan3": 21, "tan4": 21, "tango": 29, "tank": 84, "target": [29, 36, 42, 43, 45, 48, 50, 58, 64, 66], "target_textur": 48, "task": [59, 86], "tau": 24, "teach": 62, "teal": 21, "technic": 41, "techniqu": [50, 84], "tell": [9, 38, 39, 44, 51, 58, 59, 62, 64, 84, 88], "temp": 8, "templat": 84, "temporari": [56, 65], "temporarili": [19, 24, 33, 38, 40, 51, 52], "tempt": 84, "temptat": 84, "ten": 54, "tenni": [88, 89], "term": [62, 64, 85], "termin": [1, 25, 37, 44, 58, 62, 68], "terminologi": [39, 84], "terrain1": 62, "terrain2": 62, "test": [15, 19, 23, 25, 26, 28, 29, 31, 32, 33, 36, 38, 39, 41, 44, 45, 47, 50, 51, 56, 58, 59, 60, 65], "test_threshold_dest_surf_not_chang": 56, "test_util": 56, "testin": 37, "testout": 37, "testsprit": 26, "tetri": 74, "text": [25, 26, 28, 29, 32, 33, 46, 66, 68, 69, 70, 71, 84, 85, 87], "text_bitmap": 32, "text_print": 32, "textedit": [25, 33], "textinput": [25, 33], "textmarker_str": 22, "textpo": [58, 66, 85], "textprint": 32, "textur": [30, 48], "textured_polygon": 30, "textureorimag": 48, "tga": [31, 63], "than": [15, 18, 19, 23, 24, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 44, 45, 47, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 69, 70, 74, 84, 85, 86, 87, 88, 89], "thank": 88, "the_arg": 11, "the_dirty_rectangl": 84, "thecorruptor": 16, "thei": [1, 10, 18, 19, 22, 23, 24, 25, 26, 28, 29, 32, 35, 36, 38, 39, 44, 45, 46, 47, 50, 51, 56, 58, 59, 62, 63, 64, 65, 68, 69, 71, 72, 84, 86, 87, 88, 89], "them": [15, 16, 22, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 38, 42, 44, 45, 49, 50, 51, 52, 57, 58, 59, 62, 63, 65, 71, 84, 85, 86, 87, 88, 89], "themselv": [51, 61, 64, 85], "theorem": 36, "theori": [18, 84], "therefor": [24, 30, 35, 36, 50, 62, 64, 84, 87], "theta": [35, 36], "thi": [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 84, 85, 86, 87, 88, 89], "thick": [24, 28], "thickarrow_str": 22, "thin": 58, "thing": [19, 25, 27, 36, 40, 44, 57, 58, 59, 60, 61, 62, 63, 64, 65, 85, 87], "think": [18, 23, 36, 62, 64, 65, 70, 74, 84, 89], "third": [17, 18, 22, 30, 36, 62, 63, 65, 71, 85], "third_surfac": 56, "thirteen": 15, "thistl": 21, "thistle1": 21, "thistle2": 21, "thistle3": 21, "thistle4": 21, "thorough": 89, "those": [15, 18, 22, 23, 24, 25, 26, 28, 29, 39, 42, 43, 50, 57, 61, 62, 64, 65, 84, 86, 87, 88, 89], "though": [18, 23, 30, 37, 38, 43, 53, 61, 65, 84, 85, 86, 87, 88, 89], "thought": 84, "thousand": 49, "thread": [9, 18, 25, 26, 27, 28, 30, 38, 39, 50, 53, 57], "three": [32, 36, 38, 44, 51, 52, 64, 65, 68, 84, 85, 88], "threshold": [35, 42, 50, 56], "threshold_behavior_from_search_color": 56, "threshold_color": 56, "throttl": 32, "through": [2, 18, 25, 27, 28, 29, 31, 35, 37, 38, 44, 50, 51, 58, 61, 62, 63, 64, 74, 84, 85, 88], "throughout": 34, "throw": [40, 62, 64], "thrown": [56, 89], "thru": 63, "thu": [36, 42, 87], "thumbnail": 26, "ti": 40, "tick": [15, 22, 24, 32, 39, 54, 58, 62, 66, 69, 71, 72, 73, 77, 79, 80, 81, 84, 89], "tick_busy_loop": 54, "tick\ud568\uc218\ub294": 77, "tie": [57, 72], "tif": 31, "tiff": [31, 46], "tile": 62, "time": [13, 15, 18, 19, 22, 23, 24, 25, 26, 28, 29, 32, 34, 37, 38, 39, 40, 48, 49, 50, 51, 53, 56, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 77, 78, 79, 80, 81, 84, 85, 86, 87, 89], "time_m": 50, "time_out": 53, "time_proc": 37, "timeout": 25, "timer": [37, 54], "timer_resolut": [34, 54], "timestamp": 37, "tini": [23, 84], "tip": [15, 64, 84], "titl": [23, 48, 58, 63, 68], "tl": 89, "to_surfac": [35, 48], "tobyt": 31, "todo": 64, "togeth": [33, 38, 56, 61, 63, 65, 86], "toggl": [22, 47], "toggle_fullscreen": 23, "toler": [32, 36], "tom": [86, 89], "tomato": 21, "tomato1": 21, "tomato2": 21, "tomato3": 21, "tomato4": 21, "tomchanc": [86, 89], "tompong": [61, 89], "tone": 37, "too": [25, 27, 29, 36, 42, 45, 50, 51, 53, 58, 62, 65, 67, 68, 69, 73, 84, 85], "took": 63, "tool": [26, 64, 67, 84, 87], "toolkit": 48, "top": [15, 23, 24, 26, 28, 29, 31, 35, 38, 39, 45, 50, 51, 62, 63, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 89], "topic": [15, 84], "topleft": [35, 42, 45, 50, 56, 58, 62, 66, 89], "toplevel": 38, "topmost": 50, "topright": [45, 89], "tort": 18, "tortur": 84, "tostr": 31, "total": [38, 43, 44, 53, 62, 68, 84, 86], "touch": [25, 32, 84], "touch_id": 25, "touchid": 55, "toward": [23, 25, 36, 61, 63, 84], "tp": [67, 75], "tprint": 32, "tr": 89, "traceback": [65, 86], "track": [15, 19, 50, 54, 57, 62, 64, 84], "trackbal": [25, 47], "tradition": 22, "trail": [53, 63], "trait": [68, 74], "transfer": [15, 46, 56, 61, 65], "transform": [15, 18, 29, 57, 58, 62, 63, 65, 66], "transform_test": 56, "translat": [8, 14, 26, 29, 33, 42], "transluc": 84, "transmiss": 37, "transpar": [23, 24, 26, 28, 29, 31, 35, 43, 48, 51, 52, 56, 58, 62, 63, 84, 86], "transpos": 42, "travel": 89, "treat": [23, 29, 32, 52, 65], "tree": 57, "trend": 63, "tri": [44, 62, 63, 84, 86], "tri_left": 22, "tri_right": 22, "trial": [74, 84], "triangl": [24, 26, 30, 32], "trick": [84, 89], "tricki": [64, 65, 84], "trickier": 65, "trigger": [25, 32, 33, 39, 40, 47, 68, 70], "trigon": 30, "trigonometri": 87, "tripl": 56, "triplet": [23, 24, 30, 58], "troubl": 84, "true": [2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 50, 51, 53, 56, 57, 58, 60, 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 89], "truetyp": [15, 28, 58, 63], "truli": 84, "truncat": [24, 30, 38, 45, 65], "truth": 64, "try": [25, 27, 29, 44, 51, 58, 61, 62, 63, 64, 65, 67, 84, 85, 86, 89], "ttf": [28, 29, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81], "ttf\ud30c\uc77c\ub85c": 76, "ttf\ud655\uc7a5\uc790\ub97c": 76, "tune": [29, 64], "tupl": [8, 17, 19, 20, 22, 23, 24, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 42, 44, 45, 47, 49, 50, 51, 52, 53, 59, 62, 65, 84], "turn": [29, 37, 56, 58, 62, 64, 66, 84], "turquois": 21, "turquoise1": 21, "turquoise2": 21, "turquoise3": 21, "turquoise4": 21, "turtl": 68, "tutori": [26, 61, 63, 66, 73, 74, 84, 85, 89], "tweak": 64, "twice": [50, 51, 56, 65], "twitch": 84, "two": [1, 15, 18, 19, 22, 23, 24, 25, 26, 28, 29, 30, 32, 33, 35, 36, 37, 38, 42, 43, 45, 47, 49, 50, 51, 53, 54, 56, 58, 62, 63, 64, 65, 70, 71, 72, 73, 84, 85, 87], "tx": 30, "ty": 30, "type": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 49, 50, 51, 52, 54, 56, 57, 58, 59, 62, 63, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "type1": 29, "type42": 29, "typeerror": [24, 28, 43, 45, 50, 51], "typelist": 25, "typestr": 17, "typic": [18, 23, 37, 51, 58], "u": [14, 17, 32, 33, 36, 41, 58, 62, 63, 65, 84], "u00000001": 28, "u0001": 28, "u0010ffff": 28, "u4": 17, "u_margin": [73, 81], "uc": [14, 28, 29], "ucs4": [28, 29], "uffff": [14, 28], "ufo": 63, "ufunc": 65, "ui": [26, 48], "uint": 65, "uint32": 1, "uint8": [1, 3], "uk": [86, 89], "ultim": 74, "unabl": [31, 46, 64], "unalt": [44, 84], "unari": 20, "unavail": [23, 58], "unchang": [14, 20, 23, 29], "uncommit": 44, "uncommon": 58, "uncompress": [31, 38], "undefin": [29, 65], "under": [15, 37, 39, 40, 62, 63, 86, 89], "underli": [28, 29, 32, 37, 44, 84], "underlin": [28, 29, 40], "underline_adjust": 29, "underneath": 65, "underscor": [33, 58], "understand": [15, 41, 59, 61, 62, 63, 64, 65, 68, 69, 70, 71, 84, 85, 86, 88, 89], "understood": 71, "undesir": 24, "unencod": 44, "unfamiliar": [62, 84], "unfil": [30, 35], "unfilt": 56, "unfortun": [53, 84], "unicod": [14, 25, 28, 29, 33, 38, 44, 46, 51], "unicode_escap": 44, "unicodeencodeerror": [29, 44], "unicodeerror": 28, "unind": 32, "uniniti": [18, 19, 23, 28, 32, 37, 38, 44, 47], "union": [45, 64, 84], "union_ip": 45, "unional": 45, "unionall_ip": 45, "uniqu": [32, 33, 48, 50, 51, 62, 67, 72, 74], "unit": [29, 44, 51], "uniti": [67, 75], "unix": [22, 23, 63], "unknown": [23, 25, 28, 32], "unless": [6, 19, 23, 29, 31, 41, 46, 51, 54, 56, 58, 62, 64, 68, 69, 87, 88], "unlik": [15, 38, 43, 51, 65, 88], "unload": 40, "unlock": [24, 51], "unmap": 43, "unmap_rgb": [20, 24, 43, 51, 52], "unmodifi": 18, "unnorm": 67, "unnot": 33, "unpack": [20, 39], "unpaus": [19, 38, 40], "unplay": [23, 63], "unpleas": 62, "unpredict": 29, "unpunch": [58, 66], "unreal": [63, 67, 75], "unrealist": 89, "unrecogn": [28, 31], "unrel": 23, "unscal": 29, "unset": [29, 35, 51, 89], "unsetcolor": 35, "unsetsurfac": 35, "unsign": [1, 17, 20, 35, 38, 51, 65], "unspecifi": 29, "unstructur": 51, "unsupport": [18, 40], "until": [18, 23, 24, 25, 27, 32, 35, 37, 40, 47, 51, 54, 57, 62, 64, 66, 84, 85, 88], "untransform": 29, "unus": [31, 38, 50], "unwieldi": 84, "up": [15, 16, 18, 22, 23, 24, 25, 27, 28, 32, 33, 37, 38, 39, 40, 42, 44, 47, 50, 51, 58, 60, 62, 64, 65, 71, 72, 73, 80, 81, 84, 85, 86, 87, 88], "updat": [11, 15, 20, 23, 24, 25, 32, 36, 41, 44, 45, 47, 48, 50, 54, 59, 60, 61, 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89], "update_rect": 26, "update\ud568\uc218\uac00": 76, "upon": 89, "upper": [25, 29, 32, 51, 57], "upscal": 16, "us": [0, 1, 8, 9, 10, 13, 14, 15, 16, 17, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 56, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 85, 86, 87, 88, 89], "usabl": [20, 31, 57], "usag": [23, 27, 37, 51, 53], "usb": 37, "use_alpha": 26, "use_arraytyp": [49, 52], "use_bitmap_strik": 29, "use_compat": 33, "use_fastrendergroup": 26, "use_stat": 26, "use_valu": 45, "user": [5, 15, 18, 23, 24, 25, 27, 28, 33, 37, 44, 46, 51, 53, 58, 61, 63, 64, 65, 67, 72, 84, 85, 87], "userev": [25, 38], "usr": [26, 28, 66, 85, 86, 87], "usual": [23, 25, 28, 29, 32, 38, 44, 50, 51, 58, 59, 60, 62, 63, 64, 65, 70, 86], "utf": [14, 28, 29, 46], "utf8_str": 46, "util": [63, 74, 84], "uxxxxxxxx": [14, 29], "uyvy_overlai": 41, "v": [17, 20, 25, 33, 36, 41], "v1": 44, "v2": [1, 40], "v3": 17, "v4l2": [18, 57], "val": [1, 65], "val1": 1, "val2": 1, "valid": [17, 23, 28, 38, 39, 41, 45, 51, 57, 64], "valu": [1, 3, 8, 9, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 58, 59, 62, 64, 65, 68, 69, 71, 72, 84, 85, 88, 89], "value_to_set": 44, "valueerror": [17, 22, 24, 26, 29, 30, 31, 33, 35, 36, 43, 46, 49, 51, 52, 57, 65], "vari": 71, "variabl": [17, 22, 23, 28, 32, 37, 40, 44, 57, 58, 62, 63, 64, 65, 69, 70, 71, 74, 89], "variant": 22, "variat": 84, "varieti": [25, 63, 70, 84], "variou": [1, 15, 22, 25, 26, 34, 36, 89], "vast": 31, "ve": [15, 24, 32, 58, 61, 62, 63, 64, 65, 84, 85, 87, 88, 89], "vec": 36, "vector": [24, 30, 35, 61, 89], "vector2": [15, 24, 30, 35, 36, 45], "vector3": 36, "vectorelementwiseproxi": 36, "veloc": [37, 69], "ver": 44, "vera": [28, 29], "veri": [18, 23, 26, 37, 54, 58, 60, 62, 63, 64, 65, 70, 84, 87, 88, 89], "verifi": 23, "vernum": 44, "versatil": [47, 56], "version": [0, 11, 17, 20, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 38, 40, 43, 45, 47, 50, 51, 56, 57, 58, 59, 60, 61, 62, 63, 64, 84, 86, 89], "vertic": [18, 23, 24, 25, 26, 29, 30, 31, 39, 42, 56, 58, 62, 65], "vflip": [18, 57], "vgl": 23, "vgrade": [26, 65], "via": [18, 23, 25, 29, 35, 57, 84], "vidcaptur": 44, "video": [15, 23, 25, 26, 32, 44, 48, 51, 57, 59, 64], "video0": [18, 57], "video_mem": [23, 59], "videocaptur": [18, 57], "videoexpos": [23, 25], "videoinfo": [23, 59], "videores": [23, 25], "vidinfo": [23, 59], "view": [1, 2, 15, 42, 51], "view_p": 1, "violet": 21, "violetr": 21, "violetred1": 21, "violetred2": 21, "violetred3": 21, "violetred4": 21, "virtual": [23, 26, 37, 39, 45, 59], "visibl": [17, 22, 23, 39, 41, 50, 58, 59, 62, 63], "vision": [15, 18], "visit": 63, "vista": 23, "visual": [70, 71, 72, 73, 84], "visualis": 87, "vline": 30, "vm": 25, "vnc": 25, "void": [1, 8, 12], "volatil": 51, "volum": [15, 38, 40, 63], "vsync": [23, 48, 59], "w": [8, 25, 26, 30, 33, 35, 36, 42, 43, 45, 56], "wa": [9, 15, 16, 19, 20, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 35, 37, 38, 39, 40, 42, 43, 44, 47, 54, 57, 58, 62, 63, 64, 65, 68, 70, 73, 84, 86, 88], "wai": [18, 23, 24, 25, 26, 28, 29, 31, 32, 33, 36, 38, 39, 43, 44, 47, 48, 50, 51, 53, 58, 60, 61, 62, 63, 64, 65, 71, 85, 87, 88, 89], "wait": [22, 23, 25, 27, 32, 37, 39, 54, 58, 84], "waitarrow": 22, "walk": [58, 66], "wall": [36, 57, 89], "want": [9, 18, 20, 23, 25, 27, 31, 32, 33, 36, 44, 50, 51, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 84, 85, 86, 87, 88, 89], "warn": [44, 48, 58, 66], "warranti": 18, "warrior": 63, "was_init": 29, "wasn": 63, "wast": [84, 87], "watch": [15, 57, 61, 85], "wav": [38, 40, 46, 58, 66], "wave": 49, "wavelength": [20, 56], "wayland": [22, 23], "we": [22, 24, 26, 32, 51, 56, 57, 58, 60, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 84, 85, 86, 87, 88, 89], "weak": [12, 17, 84], "weakdirtysprit": 50, "weakli": 50, "weaksprit": 50, "web": [26, 66], "webcam": 18, "webp": 31, "websit": 63, "week": 63, "weight": [20, 36, 42, 56, 65], "weird": 33, "welcom": [15, 44], "well": [1, 2, 12, 22, 24, 27, 30, 31, 33, 39, 42, 44, 47, 51, 56, 61, 62, 63, 64, 65, 84, 89], "were": [1, 10, 23, 25, 28, 33, 50, 53, 62, 63, 64, 69, 84, 86, 89], "west": 22, "what": [15, 20, 22, 23, 24, 25, 26, 28, 32, 38, 39, 44, 46, 50, 57, 58, 59, 60, 61, 63, 64, 65, 68, 69, 71, 74, 85, 86, 88, 89], "whatev": [50, 57, 58, 61, 64, 84], "wheat": 21, "wheat1": 21, "wheat2": 21, "wheat3": 21, "wheat4": 21, "wheel": [25, 39], "when": [11, 12, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 49, 50, 51, 52, 53, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 84, 85, 87, 88, 89], "whenev": [23, 25, 38, 39, 44, 59, 65], "where": [10, 15, 17, 19, 20, 22, 23, 24, 26, 29, 30, 33, 35, 36, 38, 39, 40, 41, 42, 44, 46, 47, 50, 51, 53, 56, 57, 58, 62, 64, 65, 68, 84, 85, 88, 89], "wherea": [23, 45, 87], "wherev": [16, 25, 65], "whether": [18, 23, 25, 26, 28, 29, 35, 38, 39, 45, 46, 48, 56, 61, 62, 71, 72, 84, 85], "which": [1, 12, 14, 15, 17, 18, 20, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 85, 86, 87, 88, 89], "whiff": [58, 66], "whiff_sound": [58, 66], "while": [0, 15, 17, 19, 22, 24, 25, 28, 30, 31, 32, 36, 38, 39, 40, 42, 43, 44, 49, 50, 51, 54, 57, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 87, 89], "whilst": 23, "white": [21, 22, 24, 32, 35, 42, 57, 58, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 85], "whitesmok": 21, "whitespac": 61, "who": [15, 48, 61, 62, 64, 86, 89], "whole": [23, 24, 37, 44, 62, 84, 87], "whoop": 62, "whose": [24, 55], "why": [44, 63, 70, 74, 84, 87], "wide": [24, 28, 29, 35, 44, 62, 63], "wider": [18, 33], "widget": 26, "width": [8, 18, 22, 23, 24, 26, 28, 29, 31, 32, 35, 41, 42, 45, 48, 50, 51, 56, 59, 62, 63, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 84], "wiki": 39, "wikipedia": 36, "win": [1, 58, 66, 73], "win32": 37, "windib": 23, "window": [1, 4, 15, 18, 25, 26, 27, 28, 29, 32, 33, 34, 37, 39, 44, 46, 48, 51, 58, 59, 62, 63, 68, 69, 84, 85, 88], "window_surfac": 23, "windowclos": 25, "windowdisplaychang": 25, "windowent": 25, "windowev": [23, 25], "windowevent_minim": 23, "windowexpos": 25, "windowfocusgain": 25, "windowfocuslost": 25, "windowhidden": 25, "windowhittest": 25, "windowiccprofchang": 25, "windowleav": 25, "windowmaxim": 25, "windowminim": 25, "windowmov": 25, "windowpos_cent": 48, "windowpos_undefin": 48, "windowres": 25, "windowrestor": 25, "windowshown": 25, "windowsizechang": 25, "windowtakefocu": 25, "wipe": 15, "wire": 32, "wireless": 32, "wisdom": 65, "wise": [29, 65], "wish": 86, "within": [12, 17, 22, 29, 33, 35, 36, 44, 50, 51, 56, 62, 68, 74, 84], "without": [18, 22, 23, 24, 29, 32, 36, 38, 42, 45, 48, 50, 51, 52, 58, 59, 62, 63, 64, 65, 69, 70, 72, 84, 88, 89], "wm": [23, 59], "won": [40, 50, 58, 61, 62, 64, 65, 84, 86, 87, 88], "wonder": [57, 84], "word": [28, 29, 46, 54, 62, 64, 88], "word_wrap": 29, "work": [15, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 37, 38, 42, 43, 45, 46, 50, 51, 52, 53, 56, 57, 58, 59, 61, 62, 63, 64, 65, 68, 69, 85, 87, 89], "world": [57, 68, 69, 70, 74, 76, 77, 78, 84], "world\uac00": [77, 78], "world\ub294": 77, "world\uc758": 77, "worri": [26, 48, 50, 64, 65, 74, 84], "wors": 58, "worst": 61, "worth": [51, 54], "would": [17, 22, 24, 25, 28, 35, 36, 38, 44, 50, 51, 56, 57, 58, 60, 61, 62, 63, 64, 65, 84, 85, 87, 88, 89], "wow": 68, "wrap": [2, 4, 9, 17, 22, 28, 30, 42, 51, 63], "wrapper": [9, 84], "wrestl": 26, "writabl": 17, "write": [1, 9, 17, 26, 37, 51, 61, 63, 67, 84, 86, 87], "write_short": 37, "write_sys_ex": 37, "written": [15, 24, 28, 60, 61, 63, 64, 84, 86, 87], "wrong": [38, 65, 84], "wrote": 84, "www": [70, 78], "x": [2, 4, 5, 6, 7, 8, 11, 12, 15, 16, 22, 23, 24, 25, 26, 28, 29, 30, 33, 35, 36, 37, 39, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55, 56, 58, 59, 62, 68, 69, 70, 72, 73, 76, 77, 78, 80, 81, 84, 85, 87, 89], "x00": [14, 28], "x1": [24, 30, 45], "x10": 37, "x11": [23, 25, 37, 39, 44, 46, 48], "x12": 37, "x13": 37, "x2": [24, 30, 45], "x3": [24, 30], "x7d": 37, "x86": 56, "x_offset": 35, "x_scale": 48, "xbm": 22, "xbox": 47, "xf0": 37, "xf7": 37, "xfade": 65, "xor": 22, "xormask": [22, 39], "xpm": 31, "xx": 22, "xxx": 22, "xxxx": 22, "xxxx_test": 53, "xxxxx": 22, "xy": [36, 89], "x\uac12\uacfc": 80, "x\uc88c\ud45c\uac00": 76, "y": [8, 15, 20, 22, 23, 24, 25, 28, 29, 30, 32, 33, 35, 36, 39, 41, 42, 44, 45, 47, 48, 49, 50, 51, 52, 55, 56, 58, 59, 62, 66, 68, 69, 70, 72, 73, 77, 78, 80, 81, 84, 85, 87, 88, 89], "y1": [24, 30, 45], "y2": [24, 30, 45], "y3": [24, 30], "y_offset": 35, "y_scale": 48, "ye": [65, 67, 85], "yeah": 71, "year": [63, 74, 84], "yellow": 21, "yellow1": 21, "yellow2": 21, "yellow3": 21, "yellow4": 21, "yellowgreen": 21, "yet": [29, 48, 65, 84, 88], "you": [9, 10, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 44, 46, 50, 51, 54, 56, 57, 58, 59, 60, 61, 63, 64, 65, 67, 68, 71, 72, 74, 85, 86, 87, 88, 89], "your": [15, 16, 18, 19, 22, 23, 25, 26, 27, 28, 30, 31, 33, 37, 38, 44, 46, 54, 56, 57, 58, 59, 60, 61, 63, 65, 67, 70, 85, 86, 87, 88, 89], "yourself": [28, 50, 58, 63, 65, 86, 87], "yup": 84, "yuv": [18, 41, 57], "yuy2_overlai": 41, "yv12_overlai": 41, "yvyu_overlai": 41, "y\uac12\uc744": 80, "y\uc131\ubd84\uc744": 76, "y\uc88c\ud45c\uac00": 76, "z": [33, 36, 87, 89], "zero": [19, 20, 24, 28, 29, 36, 37, 38, 45, 51, 59, 64, 65, 89], "zip": [16, 84], "zl": 32, "zoom": 26, "zr": 32, "\uac00": [76, 77, 81], "\uac00\ub2a5": 80, "\uac00\ub3c5\uc131\uc744": 76, "\uac00\ubcf4\uc790": 78, "\uac00\uc18d": 77, "\uac00\uc7a5": [76, 79, 82], "\uac00\uc815\ud558\uba74": 76, "\uac00\uc815\ud574": 75, "\uac00\uc9c0\uace0": [75, 78, 81], "\uac00\uc9c0\uae30": 76, "\uac00\uc9c0\ub294": 76, "\uac00\uc9c0\ubbc0\ub85c": [76, 79], "\uac00\uc9c4\ub2e4": [76, 80], "\uac00\uc9c4\ub2e4\ub294": 75, "\uac00\uc9c8": 82, "\uac01\uac01": 79, "\uac01\uac01\uc758": 79, "\uac04\ub2e8\ud558\ub2e4": 81, "\uac10\uc18c\uc2dc\ud0a4\ub294": 80, "\uac10\uc18c\ud55c\ub2e4": 81, "\uac12": 79, "\uac12\ub9cc\uc774": 79, "\uac12\uc740": [76, 79], "\uac12\uc744": [76, 79, 80], "\uac12\uc774": 79, "\uac12\uc774\uace0": 79, "\uac16\ub294": [81, 82], "\uac19\ub2e4": [75, 76, 82], "\uac19\uc544": [77, 81], "\uac19\uc740": [76, 77, 82], "\uac19\uc74c": 81, "\uac19\uc774": [76, 79], "\uac1c\ub150\uc740": 82, "\uac1c\ub150\uc744": 77, "\uac1c\ub150\uc774\ub2e4": 82, "\uac1c\ubc1c\uc790\uac00": 75, "\uac1c\uc120\uc758": 81, "\uac1c\uc218\ub97c": 81, "\uac1c\uc218\ub9cc\ud07c": 79, "\uac1d\uccb4": [76, 78], "\uac1d\uccb4\uc5d0": 76, "\uac1d\uccb4\uc758": 76, "\uac70\uc758": [75, 76], "\uac71\uc815\ud558\uc9c0": 82, "\uac78\ub9ac\ub294": 76, "\uac80\uc740": [79, 81], "\uac80\uc740\ube14\ub85d": 15, "\uac83": [75, 76, 78], "\uac83\uacfc": [80, 82], "\uac83\ub4e4\uc774": 81, "\uac83\ub4e4\uc774\ub2e4": 76, "\uac83\ubcf4\ub2e4": 79, "\uac83\uc5d0": [75, 77, 78], "\uac83\uc5d0\ub9cc": 75, "\uac83\uc740": [76, 77, 78, 79, 80, 82], "\uac83\uc744": 79, "\uac83\uc774": [75, 76, 79, 80], "\uac83\uc774\uae30": 78, "\uac83\uc774\ub2e4": [75, 76, 77, 78, 79, 80, 81, 82], "\uac83\uc778\uac00": 80, "\uac83\ucc98\ub7fc": [77, 80], "\uac8c\uc784": [75, 76, 77, 78, 81, 82], "\uac8c\uc784\ub3c4": [75, 82], "\uac8c\uc784\ub9cc\uc758": 82, "\uac8c\uc784\uc5d0\uc11c\uc758": 79, "\uac8c\uc784\uc5d0\uc120": 77, "\uac8c\uc784\uc5d4\uc9c4": 75, "\uac8c\uc784\uc5d4\uc9c4\uc774\ub098": 75, "\uac8c\uc784\uc740": [75, 78, 81], "\uac8c\uc784\uc744": [75, 78, 82], "\uac8c\uc784\uc758": [75, 78], "\uac8c\uc784\uc774": [75, 77, 78, 80, 81, 82], "\uac8c\uc784\uc774\ub098": 82, "\uac8c\uc784\uc774\ub2e4": 81, "\uac8c\uc784\uc774\ub77c\uace0": 78, "\uac8c\uc784\uc774\ubbc0\ub85c": 76, "\uac8c\uc784\ud310": 83, "\uac8c\uc784\ud310\uc740": 81, "\uac8c\uc784\ud310\uc744": 81, "\uacaa\uc5b4": 82, "\uacb0\uacfc": [76, 77, 78], "\uacb0\uacfc\uac00": 77, "\uacb0\uacfc\ub294": [78, 81], "\uacb0\uacfc\ub97c": 77, "\uacb0\uacfc\ubb3c\ub4e4\uc744": 76, "\uacb0\uacfc\ubb3c\uc740": 76, "\uacb0\ub860\uc774": 82, "\uacb0\uc815\ud560": 76, "\uacbd\uc6b0": [76, 78, 79, 80], "\uacbd\uc6b0\ub97c": 78, "\uacbd\uc6b0\uc758": 82, "\uacbd\ud5d8\uc774": 78, "\uacc4\uc0b0\ub9cc": 76, "\uacc4\uc0b0\uc744": 80, "\uacc4\uc0b0\ud558\uae30": 77, "\uacc4\uc0b0\ud574\uc57c": 81, "\uacc4\uc18d": [75, 76, 78], "\uace0": 81, "\uace0\uae09": 75, "\uace0\ub824\ub418\uc5c8\uc744": 82, "\uace0\ub824\ub418\uc9c0": 77, "\uace0\ub824\ud558\uc5ec": 76, "\uace0\ub974\ub294": 81, "\uace0\uc815": 77, "\uace0\uc815\ub418\uc5b4": [76, 79], "\uace0\uc815\ub41c": 76, "\uace0\uc815\ub420": 77, "\uace0\uc815\uc2dc\ucf1c": 77, "\uace0\uc815\uc2dc\ud0a4\ub294": 77, "\uace0\uc815\uc2dc\ud0a8\ub2e4": 76, "\uace0\uc815\ud558\ub294": 77, "\uacf5\uac04": 76, "\uacf5\uac04\uc0c1\uc5d0\uc11c\uc758": 75, "\uacf5\uac04\uc744": [76, 80], "\uacf5\uc774\ub098": 77, "\uacfc": [76, 80], "\uad00\ub828": 75, "\uad6c\uc131": 76, "\uad6c\uc131\ub41c\ub2e4": 75, "\uad6c\uc131\ud560": 75, "\uad6c\uc2dd\uc774\uace0": 75, "\uad6c\uc5ed\uc744": 76, "\uad6c\uc5ed\uc758": 76, "\uad6c\uccb4\uc801\uc778": [78, 80], "\uad6c\ud604\ud55c": [81, 82], "\uad6c\ud604\ud55c\ub2e4\uba74": 81, "\uad6c\ud604\ud560": 82, "\uaddc\uce59": [78, 82], "\uaddc\uce59\uc740": 81, "\uaddc\uce59\uc744": [81, 82], "\uaddc\uce59\uc774": 82, "\uadf8": [75, 76, 77, 79, 80, 81], "\uadf8\uac83\uc740": 79, "\uadf8\uac83\uc774": [78, 82], "\uadf8\uac83\uc774\ub2e4": 76, "\uadf8\ub2e4\uc9c0": 76, "\uadf8\ub798\uc11c": [75, 76, 77], "\uadf8\ub798\ud53d": 75, "\uadf8\ub798\ud53d\uc744": 75, "\uadf8\ub7ec\ub098": [77, 78, 82], "\uadf8\ub7ec\uba74": [75, 77, 81], "\uadf8\ub7ec\ubbc0\ub85c": [76, 77, 80, 82], "\uadf8\ub7f0\uac00": 78, "\uadf8\ub807\ub2e4\uba74": [76, 77], "\uadf8\ub807\uc9c0": 80, "\uadf8\ub824\uc9c0\uace0": 76, "\uadf8\ub824\uc9c0\ub294": 76, "\uadf8\ub824\uc9c4\ub2e4": 81, "\uadf8\ub9ac\uace0": [75, 76, 77], "\uadf8\ub9ac\uae30": 75, "\uadf8\ub9ac\ub294": [76, 79], "\uadf8\ub9b0\ub2e4": [79, 80], "\uadf9\uc18c\uc218\ub9cc\uc744": 82, "\uae30\ub2a5": 77, "\uae30\ub2a5\uc744": [76, 77], "\uae30\ub85d\ud574\uc57c": 80, "\uae30\ubc18": 76, "\uae30\ubc18\uc73c\ub85c": 76, "\uae30\ubc18\ud558\uc600\uae30": 75, "\uae30\uc874\uc758": 82, "\uae38\uc774\ub97c": 76, "\uae4c\uba39\uc5b4\uc120": 76, "\uae5c\ube61\uac70\ub9ac\ub294": 75, "\uaf64": 76, "\ub049\uaca8": 75, "\ub05d\ub09c": 76, "\ub05d\uc774": 82, "\ub098": 81, "\ub098\uac8c": 82, "\ub098\ub220\uc9c8": 76, "\ub098\ub294": 78, "\ub098\uba74": 76, "\ub098\uc544\uc84c\ub2e4": 79, "\ub098\uc911\uc5d0": [76, 77, 78], "\ub098\ud0c0\ub0b8\ub2e4": 80, "\ub09c\ub2e4": 82, "\ub09c\uc218": 82, "\ub09c\uc218\uac00": 82, "\ub09c\uc218\uae4c\uc9c0": 82, "\ub0ab\ub2e4": 75, "\ub0b4\ubd80": [76, 78], "\ub0b4\ubd80\ub97c": 80, "\ub0b4\ubd80\uc5d0\uc11c": 80, "\ub0b4\ubd80\uc600\ub2e4\uba74": 80, "\ub0b4\uc5d0\uc11c": [77, 81, 82], "\ub0b4\uc6a9": 76, "\ub0b4\uc6a9\uacfc": 76, "\ub0b4\uc6a9\uc740": 80, "\ub108\ubb34": 77, "\ub118\uac8c": 82, "\ub123\ub294\ub2e4\uba74": 81, "\ub123\uc73c\uba74": 81, "\ub124\ubc88\uc9f8": 79, "\ub192\ub2e4\ub294": 75, "\ub192\uc774\uae30": 76, "\ub204\ub974\ub294": 77, "\ub204\ub974\uba74": 78, "\ub208\uc0ac\ud0dc": 82, "\ub208\uc0ac\ud0dc\ub97c": 82, "\ub20c\ub7ec": 79, "\ub20c\ub824\uc788\ub294": 78, "\ub20c\ub838\ub2e4": 78, "\ub20c\ub9ac\uc9c0": 78, "\ub20c\ub9b0": 78, "\ub294": 76, "\ub2a5\ub825\uc774\ub2e4": 82, "\ub2e4\ub8e8\uaca0\ub2e4": 78, "\ub2e4\ub8e8\uae30": 78, "\ub2e4\ub918\ub2e4": 82, "\ub2e4\ub974\uac8c": 78, "\ub2e4\ub974\ub2e4": 77, "\ub2e4\ub974\uc9c0": 79, "\ub2e4\ub978": [76, 78, 82], "\ub2e4\uc2dc": 79, "\ub2e4\uc591\uc131": 78, "\ub2e4\uc591\ud788": 81, "\ub2e4\uc74c": [76, 79, 80, 81], "\ub2e4\uc911": 77, "\ub2e4\ud589\ud788": 75, "\ub2e8": 77, "\ub2e8\uacc4\ub85c": 78, "\ub2e8\uacc4\ub97c": 76, "\ub2e8\uacc4\uc5d0\uc11c\uc758": 78, "\ub2e8\uc0c9": 76, "\ub2e8\uc21c\ud558\uae30": 81, "\ub2e8\uc21c\ud558\ub2e4": [79, 80], "\ub2e8\uc21c\ud558\uc9c0\ub9cc": 81, "\ub2e8\uc21c\ud788": [78, 81], "\ub2e8\uc5b4\ub294": 78, "\ub2e8\uc810\uc740": 77, "\ub2e8\uc810\uc774": 75, "\ub2ec\ub77c\uc9c0\ubbc0\ub85c": 77, "\ub2ec\ub77c\uc9c4\ub2e4": 81, "\ub2ec\ub77c\uc9c8": 78, "\ub2f4\uc558\ub294\ub370": 79, "\ub2f9\uc5f0\ud55c": 76, "\ub300\ub2e8\ud788": [81, 82], "\ub300\ub85c": 81, "\ub300\ubcf4\uac8c": 75, "\ub300\uc0c1\uc5d0": 82, "\ub300\uccb4\ud558\ub294\uac00": 76, "\ub300\ud55c": 76, "\ub354": [75, 78, 79, 82], "\ub370": 76, "\ub370\uc5d0\ub9cc": 80, "\ub370\uc774\ud130": [78, 81], "\ub370\uc774\ud130\uac00": 76, "\ub370\uc774\ud130\ub4e4\uc744": 79, "\ub370\uc774\ud130\ub97c": 79, "\ub3c4": [76, 78], "\ub3c4\uc6c0": 78, "\ub3c4\uc6c0\uc774": 78, "\ub3c4\uc911": 76, "\ub3c4\ud615": 75, "\ub3c4\ud615\uc744": 79, "\ub3d9\uae30\ubd80\uc5ec": 78, "\ub3d9\uc2dc\uc5d0": 75, "\ub3d9\uc77c\ud55c": [76, 79, 80], "\ub3d9\uc77c\ud574\uc57c": 80, "\ub3d9\uc791\ud558\ub3c4\ub85d": 78, "\ub3d9\uce58\uad00\uacc4\ub77c\ub294": 75, "\ub418\uae30": 78, "\ub418\ub3cc\uc544\uac00\uc57c": 76, "\ub418\uc5b4\uc57c\ub9cc": 77, "\ub418\uc5c8\ub294\uc9c0": 78, "\ub418\uc9c0": 79, "\ub41c": [78, 80], "\ub41c\ub2e4": [75, 76, 77, 78, 79, 80, 81, 82], "\ub41c\ub2e4\uba74": 82, "\ub420": [75, 77, 79, 80], "\ub450": [79, 80, 81, 82], "\ub450\uaed8": 79, "\ub450\uaed8\ub9cc": 80, "\ub450\ub294": [79, 80], "\ub450\ub294\ub370": 76, "\ub450\uba74": 77, "\ub450\ubc88\uc9f8": [78, 79], "\ub450\uc5c8\ub2e4": 76, "\ub458": 75, "\ub458\uc9f8": [75, 80], "\ub4a4\uc5d0": 78, "\ub4b7\ubd80\ubd84\uc5d0": 77, "\ub4e4\uba74": 79, "\ub4e4\uc5b4\uc11c": 76, "\ub4e4\uc744": 80, "\ub4f1": [75, 78], "\ub4f1\uc740": 82, "\ub4f1\uc758": 75, "\ub514\ub809\ud1a0\ub9ac\uc5d0": 76, "\ub514\uc2a4\ud50c\ub808\uc774": 75, "\ub514\uc790\uc778\ud560": 79, "\ub51c\ub808\ub9c8\uac00": 75, "\ub51c\ub808\ub9c8\ub97c": 75, "\ub51c\ub808\uc774": 77, "\ub530\ub77c": [77, 81], "\ub530\uc62c": 79, "\ub530\uc838\uc11c": 79, "\ub54c": [76, 77, 79, 81, 82], "\ub54c\ub9c8\ub2e4": 79, "\ub54c\ub9cc": 76, "\ub54c\ubb38\uc5d0": [75, 76, 77, 78, 81], "\ub54c\ubb38\uc774\ub2e4": [76, 77, 78, 80, 81], "\ub54c\uc758": 79, "\ub610\ub294": [75, 79, 82], "\ub610\ud55c": [77, 81], "\ub611\uac19\uc740": 78, "\ub73b\uc774\ub2e4": 78, "\ub77c\uace0": [78, 82], "\ub77c\ub294": [76, 82], "\ub77c\uc774\ube0c\ub7ec\ub9ac\uc774\uae30": 75, "\ub77c\uc774\ube0c\ub7ec\ub9ac\uc774\ub2e4": 75, "\ub80c\ub354\ub9c1": 79, "\ub85c\uc9c1\uc740": 79, "\ub85c\uc9c1\uc744": [76, 78], "\ub85c\uc9c1\uc774": 77, "\ub8e8\ud2b82": 77, "\ub97c": [76, 77, 78, 80], "\ub9c8\ub77c": 82, "\ub9c8\uc6b0\uc2a4": [75, 78, 80], "\ub9c8\uc6b0\uc2a4\uac00": 80, "\ub9c8\uc9c0\ub9c9\uc5d0": 76, "\ub9c8\uc9c0\ub9c9\uc73c\ub85c": [78, 79], "\ub9c8\ucc2c\uac00\uc9c0\uc774\ub2e4": 82, "\ub9cc": 75, "\ub9cc\ub4dc\ub294": [75, 80, 82], "\ub9cc\ub4e0": 75, "\ub9cc\ub4e0\ub2e4\uace0": 75, "\ub9cc\ub4e4": [75, 79, 82], "\ub9cc\ub4e4\uace0": 81, "\ub9cc\ub4e4\uc5b4": [79, 81], "\ub9cc\ub4e4\uc5b4\uc11c": 82, "\ub9cc\ub4e4\uc5b4\uc57c": 80, "\ub9cc\ub4e4\uc5b4\uc9c4": 81, "\ub9cc\ub4e4\uc5b4\uc9c4\ub2e4\uba74": 82, "\ub9cc\ub4e4\uc5c8\ub2e4": 79, "\ub9cc\uc57d": [76, 79, 80, 82], "\ub9cc\uc744": [76, 79], "\ub9ce\ub2e4": 81, "\ub9ce\uc73c\ubbc0\ub85c": 77, "\ub9ce\uc740": 81, "\ub9d0\uc774\ub2e4": 76, "\ub9d0\ud558\ub294": 78, "\ub9d0\ud55c": 76, "\ub9d0\ud588\ub2e4": 82, "\ub9d0\ud588\ub4ef": 76, "\ub9de\ub294\uac00": 78, "\ub9de\uc744": 76, "\ub9e4\uac1c": 79, "\ub9e4\uc6b0": [78, 82], "\uba39\ud788\ub294": 76, "\uba3c\uc800": [78, 79], "\uba54\ubaa8\ub9ac": 75, "\uba64\ubc84": 76, "\uba85\ub839\uc5b4\uac00": 78, "\uba87": 77, "\uba87\uba87": [76, 78], "\ubaa8\ub2c8\ud130": 76, "\ubaa8\ub450": [75, 76], "\ubaa8\ub4c8\ub4e4\uc744": 76, "\ubaa8\ub4e0": [75, 76, 78, 81, 82], "\ubaa9\ub85d\uc740": 78, "\ubaa9\ud45c\uac00": 75, "\ubab8\uc758": 78, "\ubb34\uc5b8\uac00\ub97c": [76, 78], "\ubb34\uc5c7\uc744": 77, "\ubb34\uc5c7\uc774\ub4e0\uc9c0": 82, "\ubb34\uc5c7\uc778\uac00": [77, 79, 82], "\ubb34\uc5c7\uc778\uc9c0\ub294": 79, "\ubb34\uc791\uc704\ub85c": 81, "\ubb34\ud55c": 76, "\ubb36\uc744": 80, "\ubb38\uad6c\uc774\ub2e4": 76, "\ubb38\uc790\uc5f4\uc740": 76, "\ubb38\uc790\uc5f4\uc774\ub2e4": 76, "\ubb38\uc7a5\ub4e4": 76, "\ubb38\uc81c\uac00": [76, 77], "\ubb38\uc81c\ub97c": 81, "\ubb3c\ub860": [75, 76, 77, 78, 79], "\ubb54\uac00": 80, "\ubbf8\uce58\uac8c": 82, "\ubc0f": 78, "\ubc14\uafb8\uace0": 77, "\ubc14\uafb8\ub294": 77, "\ubc14\uafb8\ub294\uac00": 79, "\ubc14\uafb8\uba74": 81, "\ubc14\uafbc": 78, "\ubc14\uafc0": 77, "\ubc14\uafd4": 79, "\ubc14\ub00c\ub294\uac00": 77, "\ubc14\ub00c\ub294\uc9c0\ub97c": 77, "\ubc14\ub294": 79, "\ubc14\ub85c": [77, 82], "\ubc18\ub4dc\uc2dc": [77, 78], "\ubc18\ubcf5\ubb38": 76, "\ubc18\uc601": 78, "\ubc18\ud544\uc218\uc801\uc73c\ub85c": 76, "\ubc18\ud658": 76, "\ubc18\ud658\ud55c\ub2e4": [76, 81], "\ubc1c\uc0dd": 76, "\ubc1c\uc0dd\ud558\uba74": 76, "\ubc1c\uc0dd\ud55c": 76, "\ubc1c\uc804\ub41c": 75, "\ubc1c\ud718\ub41c": 82, "\ubc29\ubc95": 78, "\ubc29\ubc95\uc740": [78, 79], "\ubc29\ubc95\uc744": [77, 78], "\ubc29\ubc95\uc774\ub2e4": 79, "\ubc29\uc2dd": 75, "\ubc29\ud5a5\uc73c\ub85c": 78, "\ubc29\ud5a5\ud0a4\ub97c": 78, "\ubc30\uc5f4\uacfc": 81, "\ubc30\uc5f4\uc5d0\uc11c": 81, "\ubc30\uc5f4\uc740": 81, "\ubc30\uc5f4\uc744": [76, 81], "\ubc30\uc5f4\uc774": 81, "\ubc30\uc5f4\ucc98\ub7fc": 81, "\ubc30\uc6b0\uace0": [78, 82], "\ubc30\uc6b0\ub294": [75, 76], "\ubc30\uc6b4\ub2e4": 78, "\ubc30\ud2c0\uc2ed": 75, "\ubc84\ud2bc": 81, "\ubc84\ud2bc\ub4e4": 83, "\ubc84\ud2bc\ub4e4\uc740": 80, "\ubc84\ud2bc\ub4e4\uc744": 80, "\ubc84\ud2bc\uc744": [77, 80, 81], "\ubc84\ud2bc\uc758": 80, "\ubc88": 77, "\ubc94\uc704\ub294": 80, "\ubc95\uc744": 81, "\ubcc0\uacbd\ud558\uba74\uc11c": 79, "\ubcc0\uc218": [76, 79, 80], "\ubcc0\uc218\uac00": [76, 77, 79, 80], "\ubcc0\uc218\ub294": [76, 79], "\ubcc0\uc218\ub3c4": 80, "\ubcc0\uc218\ub4e4\uc744": 80, "\ubcc0\uc218\ub4e4\uc774": 76, "\ubcc0\uc218\ub85c": [79, 80], "\ubcc0\uc218\ub97c": [76, 77, 79, 80], "\ubcc0\uc218\uc640": 78, "\ubcc0\uc218\uc758": 79, "\ubcc0\uc218\uc774\uace0": 79, "\ubcc0\uc218\uc774\ub2e4": 79, "\ubcc0\uc704\uac00": 77, "\ubcc0\uc704\ub294": 77, "\ubcc0\uc704\ub9cc": 77, "\ubcc0\ud55c\ub2e4\uba74": 79, "\ubcc0\ud560": 79, "\ubcf4\uace0": 75, "\ubcf4\ub2e4": 77, "\ubcf4\uba74": [77, 80], "\ubcf4\uc544\ub77c": [78, 79, 82], "\ubcf4\uc774\ub294": 80, "\ubcf4\uc774\uc9c4": 81, "\ubcf4\uc778\ub2e4": 77, "\ubcf4\uc778\ub2e4\ub294": [75, 77], "\ubcf4\uc77c": 77, "\ubcf4\uc790": [75, 82], "\ubcf4\ud1b5": 75, "\ubcf5\uc18c\uc218\uc88c\ud45c\ub97c": 75, "\ubcf5\uc7a1\ub3c4\ub294": 77, "\ubcf5\uc7a1\ub3c4\ub97c": 77, "\ubcf5\uc7a1\ud558\ub2e4": 76, "\ubcf5\uc7a1\ud55c": 75, "\ubcf8\uaca9\uc801\uc73c\ub85c": 79, "\ubcfc\ub9cc": 75, "\ubd80": 83, "\ubd80\ubd84\uc5d0\uc11c": 78, "\ubd80\ubd84\uc73c\ub85c": 76, "\ubd80\ubd84\uc758": 81, "\ubd80\uc5ec\ud560": 82, "\ubd84\uc11d\ud558\uc9c0": 77, "\ubd88\uacfc\ud558\ub2e4": 78, "\ubd88\uacfc\ud558\ubbc0\ub85c": 77, "\ubd88\ub9b4": 78, "\ubd88\uc5f0\uc18d\uc801": 79, "\ube14\ub85d": 81, "\ube14\ub85d\uc744": 81, "\ube14\ub85d\uc758": 81, "\ube44\uad50\ud558\uc5ec": 78, "\ube44\ud45c\uc900": 75, "\ube44\ud558\uba74": 76, "\ube48\ub3c4\uc5d0": 77, "\ube60\ub978": 75, "\ube60\ub97c\uae4c": 77, "\ube60\uc9c0\uba74": 75, "\ube68\uac04": [76, 79, 81], "\ube68\uac04\ube14\ub85d": 15, "\ube68\ub9ac": 75, "\ubfcc\uc694\ubfcc\uc694": 75, "\uc0ac\ub78c\ub4e4\uc774": 82, "\uc0ac\ub78c\uc774": 82, "\uc0ac\uc2e4": 81, "\uc0ac\uc6a9\ub418\uc5c8\uae30": 80, "\uc0ac\uc6a9\ub418\uc5c8\uc9c0\ub9cc": 80, "\uc0ac\uc6a9\ub41c": 79, "\uc0ac\uc6a9\uc790\uac00": [76, 80], "\uc0ac\uc6a9\ud558\uae30": 76, "\uc0ac\uc6a9\ud558\ub294": 76, "\uc0ac\uc6a9\ud558\uc5ec": 76, "\uc0ac\uc6a9\ud560": 76, "\uc0ac\uc774\uc5d0\ub294": 75, "\uc0ac\uc774\uc758": 75, "\uc0ac\uc9c4": 75, "\uc0b4\ud3b4\ubcf4\uc790": 76, "\uc0bd\uc785\ud558\uba74": 76, "\uc0c1\uc138\ud558\uac8c": 79, "\uc0c1\uc218": 80, "\uc0c1\uc218\ub4e4\uc744": 76, "\uc0c1\ud0dc": 78, "\uc0c1\ud0dc\ub97c": 75, "\uc0c1\ud638\uc791\uc6a9\uc774": 78, "\uc0c8\ub85c\uc6b4": [79, 81, 82], "\uc0c9": [75, 76, 79], "\uc0c9\uc0c1": [76, 79], "\uc0c9\uc0c1\uacfc": 76, "\uc0c9\uc0c1\uc740": [76, 81], "\uc0c9\uc0c1\uc744": [76, 81], "\uc0c9\uc0c1\uc758": 81, "\uc0c9\uc774": 76, "\uc0dd\uac01\uc77c": 80, "\uc0dd\uac01\ud574": 82, "\uc0dd\uac01\ud574\ubcf4\uba74": 78, "\uc0dd\uac01\ud574\ubd10\ub77c": 78, "\uc0dd\uacbc\ub2e4": 78, "\uc0dd\uae38": 76, "\uc0dd\uc131\ud558\uace0": 76, "\uc11c\ub85c": 76, "\uc120\uc5b8": 76, "\uc120\uc5b8\ub418\uc5b4\uc57c": 76, "\uc120\ud0dd\uc801\uc73c\ub85c": 75, "\uc120\ud0dd\uc801\uc778": 77, "\uc120\ud0dd\uc9c0\ub294": 81, "\uc120\ud589\ub418\uc5b4\uc57c": 79, "\uc124\uba85\uc774": 76, "\uc124\uba85\uc774\uc5c8\ub2e4": 76, "\uc124\uba85\ud558\ub294": 79, "\uc124\uba85\ud560": 81, "\uc124\uc815": 75, "\uc131\ubd84": 76, "\uc131\ubd84\uc774": 76, "\uc138\uace0": 81, "\uc138\ud305": 78, "\uc148\uc774\ub2e4": 76, "\uc18c\uac1c": 83, "\uc18c\ub9ac": [75, 78], "\uc18c\uc124": 82, "\uc18c\uc2a4": [75, 76, 77, 78], "\uc18c\uc2a4\ucf54\ub4dc": 76, "\uc18c\uc2a4\ucf54\ub4dc\uac00": 76, "\uc18c\uc2a4\ucf54\ub4dc\ub294": 76, "\uc18c\uc2a4\ucf54\ub4dc\ub97c": [75, 76], "\uc18c\uc2a4\ucf54\ub4dc\uc5d0": 76, "\uc18c\uc2a4\ucf54\ub4dc\uc640": 75, "\uc18c\uc2a4\ucf54\ub4dc\uc758": 76, "\uc18c\uc2a4\ud30c\uc77c\uc5d0": 75, "\uc18c\uc2a4\ud30c\uc77c\uc740": 75, "\uc18c\uc9c0\uac00": 80, "\uc18d": 76, "\uc18d\ub3c4\ub77c\ub294": 77, "\uc18d\ub3c4\ub97c": 77, "\uc18d\ub3c4\uc5d0": 77, "\uc18d\uc5d0\ub294": 77, "\uc190\uac00\ub77d": 78, "\uc190\uc744": 75, "\uc218": [75, 76, 77, 78, 79, 80, 81, 82], "\uc218\uac00": 82, "\uc218\ub294": [77, 82], "\uc218\ub3c4": 82, "\uc218\ub97c": 81, "\uc218\ub9ce\uc740": 75, "\uc218\uc815\ud558\ub294": 76, "\uc218\uc815\ud55c\ub2e4\uba74": 76, "\uc218\uc900": 75, "\uc218\ud589\ub418\uc5b4\uc57c": 76, "\uc218\ud589\ud55c\ub2e4": 76, "\uc21c\ucc28\uc801\uc73c\ub85c": 76, "\uc26c\uc6b4": 79, "\uc27d\uac8c": [77, 79], "\uc27d\ub2e4": [77, 78, 80], "\uc2a4\ud06c\ub9b0": 76, "\uc2b5\ub4dd\ud560": 82, "\uc2dc\uac01\uc801": 81, "\uc2dc\uac01\ud654": [78, 79], "\uc2dc\uac04": [77, 78, 81], "\uc2dc\uac04\ubcf4\ub2e4": 82, "\uc2dc\uac04\uc21c\uc73c\ub85c": 76, "\uc2dc\uac04\uc740": 77, "\uc2dc\uac04\uc744": [77, 82], "\uc2dc\uac04\uc774": [76, 82], "\uc2dc\uac04\uc774\ub2e4": 82, "\uc2dc\ub3c4\ud574": 75, "\uc2dc\uc2a4\ud15c\uc744": 78, "\uc2dc\uc2a4\ud15c\uc774": 76, "\uc2dc\uc791\ub418\uae30": 77, "\uc2dc\uc791\ub420": 77, "\uc2dc\uc791\ud558\ub294": 77, "\uc2dc\ud589": 82, "\uc2dd\uc758": 75, "\uc2e0\uacbd": 80, "\uc2e4\uc81c\ub85c": 76, "\uc2e4\ud589": [76, 77, 78, 81], "\uc2e4\ud589\ub418\uac70\ub098": 75, "\uc2e4\ud589\ub418\ub294": [75, 77], "\uc2e4\ud589\ub418\uba74": 76, "\uc2e4\ud589\ub418\uc57c": 77, "\uc2e4\ud589\ub418\uc5b4\uc57c": 76, "\uc2e4\ud589\ub418\uc9c0": 76, "\uc2e4\ud589\ub41c\ub2e4": 76, "\uc2e4\ud589\ub41c\ub2e4\ub294": 75, "\uc2e4\ud589\ub428": 75, "\uc2e4\ud589\ud558\ub294": 75, "\uc2eb\ub2e4\uba74": 80, "\uc2ec\ud654": 78, "\uc2ec\ud654\ub41c": 78, "\uc2f6\ub2e4\uba74": 75, "\uc2f6\uc744": 76, "\uc368\uc57c": 80, "\uc4f0\uba74": 76, "\uc4f8": 75, "\uc544\ub2c8\ub2e4": 78, "\uc544\ub2c8\ub77c": 77, "\uc544\ub2c8\ubbc0\ub85c": 77, "\uc544\ub2c8\uc9c0\ub9cc": 78, "\uc544\ub2cc": [75, 76, 77, 79, 80, 81], "\uc544\ub2cc\uc9c0\ub97c": 78, "\uc544\ub798\ub97c": 79, "\uc544\ub798\uc640": 79, "\uc544\ub798\ucabd\uc774": 76, "\uc544\ub9c8\ub3c4": 78, "\uc544\ubb34": 82, "\uc544\ubb34\ub798\ub3c4": 75, "\uc544\uc2a4\ud0a4\uc544\ud2b8\ub97c": 75, "\uc544\uc774\ub514\uc5b4\ub294": 79, "\uc544\uc774\ub514\uc5b4\ub97c": 79, "\uc544\uc774\ub514\uc5b4\uc640": 79, "\uc544\uc774\ub514\uc5b4\ucc98\ub7fc": 80, "\uc544\uc9c1": [79, 80], "\uc544\uc9c1\ub3c4": [77, 80], "\uc548\ub418\ub294": 77, "\uc548\ub41c\ub2e4": 76, "\uc54a\ub294": [76, 77], "\uc54a\ub294\ub2e4": [77, 78, 79, 81], "\uc54a\ub2e4": 79, "\uc54a\ub2e4\uba74": 80, "\uc54a\uc558\uc9c0\ub9cc": 78, "\uc54a\uc73c\uba74": 76, "\uc54a\uc744": [76, 77], "\uc54c": [76, 80, 81], "\uc54c\uace0": [77, 78], "\uc54c\uace0\ub9ac\uc998\uc73c\ub85c": 75, "\uc54c\uace0\ub9ac\uc998\uc758": 78, "\uc54c\uace0\ub9ac\uc998\uc774": 78, "\uc54c\ub809\uc138\uc774": 82, "\uc54c\uc544\ub0b4\uae30": 80, "\uc54c\uc544\ub0bc": [76, 77], "\uc54c\uc544\uc57c": 78, "\uc54c\uc558\ub2e4": 77, "\uc54c\uce74\ub178\uc774\ub4dc\uc758": 77, "\uc55e\ubd80\ubd84\uc5d0": 77, "\uc55e\uc11c": 76, "\uc55e\uc11c\uc11c": 76, "\uc55e\uc5d0": 78, "\uc560\ub2c8\uba54\uc774\uc158": [75, 77], "\uc57d\uac04": 78, "\uc57d\uac04\uc758": 76, "\uc5b4\ub5a4": [76, 82], "\uc5b4\ub5a4\uac00": 79, "\uc5b4\ub5a8\uae4c": [76, 80], "\uc5b4\ub5bb\uac8c": [76, 77, 79, 80, 81], "\uc5b4\ub835\uc9c0": 76, "\uc5b4\uca0c\ub4e0": 78, "\uc5b4\ucc0c\ub410\ub4e0": 76, "\uc5b8\uae09\ud558\uaca0\ub2e4": 76, "\uc5b8\uae09\ud55c": 81, "\uc5b8\uc5b4\uc758": 76, "\uc5bc\ub9c8\ub098": 77, "\uc5bc\ub9cc\ud07c\uc758": 82, "\uc5c5\ub370\uc774\ud2b8": 77, "\uc5c5\ub370\uc774\ud2b8\uac00": 76, "\uc5c5\ub370\uc774\ud2b8\ub418\uac70\ub098": 76, "\uc5c5\ub370\uc774\ud2b8\ub418\uac8c": 77, "\uc5c5\ub370\uc774\ud2b8\ub418\uc5c8\ub294\uc9c0\ub97c": 77, "\uc5c5\ub370\uc774\ud2b8\ub41c\ub2e4": 78, "\uc5c5\ub370\uc774\ud2b8\ud558\ub294": [77, 78, 80], "\uc5c6\uace0": [78, 80], "\uc5c6\uae30": [76, 77, 78], "\uc5c6\ub294": [75, 76, 82], "\uc5c6\ub2e4": [77, 78, 81], "\uc5c6\uc73c\ubbc0\ub85c": [77, 80], "\uc5c6\uc774": [76, 78], "\uc5d0": 76, "\uc5d0\uc11c": [78, 82], "\uc5d0\uc120": 76, "\uc5d0\ud544\ub85c\uadf8": 83, "\uc5d4\uc9c4": 75, "\uc5d4\uc9c4\uc5d0\ub3c4": 75, "\uc5d4\uc9c4\uc740": 75, "\uc5d4\uc9c4\uc744": 75, "\uc5d4\uc9c4\uc758": 75, "\uc5d4\ud130": 75, "\uc5ec\uae30\uc11c": 77, "\uc5ec\uae30\uc5d0": 76, "\uc5ec\uae30\uc5d0\uc11c": 82, "\uc5ec\ub7ec": 75, "\uc5ec\ub7ec\uac00\uc9c0": 76, "\uc5ec\uc804\ud788": 79, "\uc5ec\uc9c0\uac00": 81, "\uc5f0\uacb0\uc2dc\ud0a4\uba74\uc11c": 82, "\uc5f0\uacb0\uc810\uc774": 75, "\uc601\uc5ed": 80, "\uc601\uc5ed\uacfc": 80, "\uc601\uc5ed\uc744": 80, "\uc601\uc5ed\uc774": 80, "\uc601\ud5a5\uc744": 82, "\uc601\ud654": 82, "\uc608\ub97c": [76, 79], "\uc608\uc2dc": 75, "\uc608\uc2dc\uc774\ub2e4": 82, "\uc608\uc678\uc801\uc73c\ub85c": 76, "\uc608\uc81c\uc778": 76, "\uc608\uce21\ub418\uae30": 77, "\uc624\uac8c": 76, "\uc624\uac8c\ub054": 76, "\uc624\ub2f5\uc774\ub77c\uba74": 81, "\uc624\ub2f5\uc77c": 81, "\uc624\ub798": 76, "\uc624\ub978\ucabd\uc774": 76, "\uc624\ube0c\uc81d\ud2b8\uac04": 78, "\uc624\ube0c\uc81d\ud2b8\uc758": 77, "\uc624\uc9c1": [79, 80], "\uc624\ud574\uc758": 80, "\uc640": [76, 77, 78, 80, 82], "\uc640\uc57c": 77, "\uc644\ubcbd\ud788": 82, "\uc644\uc131\ub418\uc5c8\ub2e4": 78, "\uc644\uc804\ud55c": 80, "\uc644\uc804\ud788": 78, "\uc65c": 78, "\uc65c\ub098\ud558\uba74": 76, "\uc65c\ub0d0\uba74": 78, "\uc65c\ub0d0\ud558\uba74": [77, 78], "\uc678\ubd80": 75, "\uc678\uc758": 76, "\uc694\uc18c": [78, 81], "\uc694\uc18c\ub97c": 76, "\uc694\uc57d\ud558\uc790\uba74": 75, "\uc6a9": 80, "\uc6a9\ub3c4\uac00": 79, "\uc6a9\uc774\ub2e4": 81, "\uc6b0\ub9ac\uac00": 77, "\uc6b0\ub9ac\ub294": [77, 78, 81, 82], "\uc6b0\ub9ac\uc758": 82, "\uc6b0\uc120": [76, 77, 78, 79, 81], "\uc6c0\uc9c1\uc774\uac8c": 77, "\uc6c0\uc9c1\uc774\ub294": 77, "\uc6c0\uc9c1\uc778\ub2e4": [77, 78], "\uc6c0\uc9c1\uc778\ub2e4\ub294": 78, "\uc6c0\uc9c1\uc77c\uae4c": 77, "\uc6d0\ub9ac\ub97c": 76, "\uc704": 79, "\uc704\uce58": [76, 79], "\uc704\uce58\uac00": 77, "\uc704\uce58\ub97c": 76, "\uc704\uce58\uc5d0\uc11c\uc758": 80, "\uc704\ud55c": [75, 76, 80, 81], "\uc704\ud574": [76, 78, 82], "\uc704\ud574\uc11c\ub294": 78, "\uc704\ud574\uc120": 76, "\uc708\ub3c4\uc6b0": 76, "\uc708\ub3c4\uc6b0\uc758": 77, "\uc720\ub2c8\ud2f0": 75, "\uc720\uc6a9\ud55c": 76, "\uc73c\ub85c": [75, 76], "\uc740": 77, "\uc744": [77, 78, 81], "\uc74c\uc545": 82, "\uc758": 75, "\uc758\ubbf8\ub97c": 80, "\uc758\ubbf8\ud558\uac8c": [77, 80], "\uc758\ubbf8\ud558\uace0": 78, "\uc758\ubbf8\ud558\uc9c0\ub294": 78, "\uc758\ubbf8\ud55c\ub2e4": [76, 77, 78], "\uc774": [75, 76, 77, 78, 79, 80, 81, 82], "\uc774\uac83\ub4e4\uc740": 79, "\uc774\uac83\uc740": [76, 77, 81], "\uc774\uac83\uc774": [75, 76, 82], "\uc774\ub294": [77, 78], "\uc774\ub2e4": 76, "\uc774\ub3d9": 83, "\uc774\ub780": 75, "\uc774\ub7f0": [75, 78], "\uc774\ub807\uac8c": 75, "\uc774\ub8e8\uc5b4\uc9c4\ub2e4": [76, 79], "\uc774\ub8e8\uc5b4\uc9d0\uc5d0": 78, "\uc774\ub97c": 77, "\uc774\ub984": 78, "\uc774\ub984\uc73c\ub85c\ub294": 78, "\uc774\ub984\uc744": 78, "\uc774\ub984\uc758": 76, "\uc774\ubbf8": 82, "\uc774\ubbf8\uc9c0": [77, 78, 81], "\uc774\ubca4\ud2b8\uac00": [76, 78], "\uc774\ubca4\ud2b8\ub4e4\uc740": 76, "\uc774\ubca4\ud2b8\ub4e4\uc744": 76, "\uc774\ubca4\ud2b8\ub4e4\uc758": 76, "\uc774\ubca4\ud2b8\ub97c": [76, 78, 80], "\uc774\ubca4\ud2b8\uc801": 75, "\uc774\ubcc4\uc744": 76, "\uc774\uc0c1": [75, 77], "\uc774\uc0c1\uc758": 78, "\uc774\uc5d0": 76, "\uc774\uc6a9\ud558\uba74": 77, "\uc774\uc6a9\ud55c": 75, "\uc774\uc6a9\ud560": 78, "\uc774\uc720\ub294": 80, "\uc774\uc720\uc774\ub2e4": [75, 78, 82], "\uc774\uc804": [77, 78], "\uc774\uc804\uacfc": 79, "\uc774\uc804\ubd80\ud130": 78, "\uc774\uc804\uc5d0\ub294": 78, "\uc774\uc804\uc758": [76, 78, 80], "\uc774\uc81c": [77, 78, 80, 81, 82], "\uc774\uc81c\ub294": 79, "\uc774\uc820": 77, "\uc774\ud574\ud558\ub294": 76, "\uc774\ud574\ud560": [78, 79], "\uc774\ud574\ud588\ub2e4\uba74": 76, "\uc774\ud6c4": 76, "\uc774\ud6c4\uc5d0": 76, "\uc778\uc790\ub97c": 78, "\uc778\ud130\ud398\uc774\uc2a4": 78, "\uc778\ud130\ud398\uc774\uc2a4\ub97c": 81, "\uc77c\ubc18\uc801\uc73c\ub85c": 76, "\uc77c\ubd80": [76, 77, 78], "\uc77c\ubd80\ubd84": 78, "\uc77c\ubd80\uc774\uae30": 75, "\uc77c\uc5b4\ub0ac\ub294\uc9c0": 80, "\uc77c\uc73c\ud0a4\ub294": 82, "\uc77c\uc885\uc758": 77, "\uc77c\uce58\ud558\uc9c0": 76, "\uc784\ub9c8\ub204\uc5d8": 82, "\uc784\uc740": 77, "\uc785\ub825": [75, 76, 77, 80], "\uc785\ub825\ubcf4\ub2e4": 82, "\uc785\ub825\uc2dc\ud0a4\ub294": 82, "\uc785\ub825\uc740": [75, 80], "\uc785\ub825\uc744": [78, 80], "\uc785\ub825\uc774": [77, 78], "\uc785\ub825\uc774\ub098": 77, "\uc785\ub825\uc774\ub780": 80, "\uc785\ub825\ud558\ub294": 78, "\uc785\ubb38\uc7a5\ubcbd\uc774": 75, "\uc788\uac8c": [75, 76], "\uc788\uace0": 79, "\uc788\uae30": 78, "\uc788\ub290\ub0d0": 78, "\uc788\ub294": [75, 76, 80, 81, 82], "\uc788\ub294\ub370": 79, "\uc788\ub2e4": [75, 76, 77, 78, 79, 80, 81, 82], "\uc788\ub2e4\uace0": 76, "\uc788\ub3c4\ub85d": 79, "\uc788\uc5b4\uc57c": 77, "\uc788\uc73c\uba74": 75, "\uc788\uc744\uae4c": [75, 76], "\uc788\uc74c": 80, "\uc788\uc74c\uc744": [77, 78, 80], "\uc790\ub3d9\uc801\uc73c\ub85c": [76, 77], "\uc790\uc8fc": 77, "\uc791\ub3d9": 76, "\uc791\ub3d9\ud558\uc9c0": 77, "\uc791\uc131\ub418\uc5b4\uc57c": 76, "\uc791\uc131\uc740": 81, "\uc791\uc131\ud558\ub294": 75, "\uc791\uc131\ud55c": 75, "\uc791\uc5c5\uc774": 76, "\uc791\uc740": [79, 80], "\uc7a5": 77, "\uc7a5\uc774": 77, "\uc7a5\uc810\ub3c4": 75, "\uc7a5\uc810\uc740": 75, "\uc7a5\uc810\uc744": 75, "\uc800\uae09": 75, "\uc800\uc7a5\ud574": 76, "\uc801\uc6a9\ub418\uc5b4": 80, "\uc801\uc808\ud55c": [76, 77, 78, 80], "\uc801\uc808\ud788": 76, "\uc804\uc138\uacc4": 82, "\uc804\uc5ed": 76, "\uc804\uccb4": [76, 81], "\uc804\uccb4\ub97c": 79, "\uc804\ud600": 78, "\uc808\ucc28\uc801\uc73c\ub85c": 75, "\uc808\ucc28\uc801\uc774": 75, "\uc810\uc218\ub3c4": 78, "\uc810\uc740": 80, "\uc811\uadfc\uc131\uc774": 75, "\uc811\uadfc\ud560": 75, "\uc815\ub2f5\uc774\uac70\ub098": 81, "\uc815\ub2f5\uc774\ub77c\uba74": 81, "\uc815\ub82c\ub41c\ub2e4": 76, "\uc815\ub9ac\ub97c": 77, "\uc815\ubcf4\ub4e4\uc740": 76, "\uc815\ubcf4\ub97c": 76, "\uc815\uc0ac\uac01\ud615": 80, "\uc815\uc0ac\uac01\ud615\uc744": 80, "\uc815\uc218": [79, 81], "\uc815\uc2e0\uc5c6\uc774": 77, "\uc815\uc758": 78, "\uc815\uc911\uc559\uc5d0": 76, "\uc815\uc911\uc559\uc73c\ub85c": 76, "\uc815\uc911\uc559\uc740": 76, "\uc815\uc911\uc559\uc744": 76, "\uc815\uc9c0\ub41c": 77, "\uc815\ud558\uace0": 76, "\uc815\ud558\ub294": 79, "\uc815\ud55c\ub2e4": 76, "\uc815\ud560": [76, 77], "\uc815\ud574\uc57c": 76, "\uc815\ud574\uc838\uc57c": 76, "\uc815\ud655\ud788\ub294": 76, "\uc81c\uacf5\ud558\uae30": 75, "\uc81c\uc57d\uc870\uac74": 78, "\uc81c\uc678\ud654\uba74": 75, "\uc81c\uc791": 75, "\uc81c\ud55c\uc744": 81, "\uc870\uac74\ubb38\uc774": 76, "\uc870\uac74\uc774": 76, "\uc870\uc808\ud558\uac8c": 79, "\uc870\uc885": 83, "\uc874\uc7ac\ud558\uace0": 80, "\uc874\uc7ac\ud558\uae30": 77, "\uc874\uc7ac\ud568\uc744": 80, "\uc885\ub8cc": 77, "\uc885\ub8cc\ub418\uac8c": 76, "\uc885\ub8cc\ub418\uace0": 78, "\uc885\ub8cc\ub418\uc5b4\uc57c": 76, "\uc885\ub8cc\ub41c": 76, "\uc885\ub8cc\ud558\uace0": 76, "\uc885\ub8cc\ud558\ub294": 77, "\uc885\ub958\uc758": 76, "\uc88b\ub2e4\ub294": 75, "\uc88b\uc740": [75, 80], "\uc88b\uc744": 79, "\uc88c\ud45c": 76, "\uc88c\ud45c\ub97c": [78, 79], "\uc88c\ud45c\uc5d0": 77, "\uc8fc\ub294": 75, "\uc8fc\ub85c": 76, "\uc8fc\ubaa9\ud574\ub77c": 78, "\uc8fc\uc5b4\uc9c4": 76, "\uc904\ub4e4\uc740": 78, "\uc911": [75, 77], "\uc911\uc694\ud55c": 82, "\uc990\uae38": 78, "\uc99d\uac00\uc2dc\ud0a4\uac70\ub098": 80, "\uc99d\uac00\ud558\uace0": 81, "\uc9c0\uae08\uae4c\uc9c0": 78, "\uc9c0\uae08\uc740": 78, "\uc9c0\ub294": 80, "\uc9c0\uc2dd\ub9cc\uc73c\ub85c": 82, "\uc9c0\uc2dd\ubcf4\ub2e4": 82, "\uc9c0\uc2dd\uc5d0": 82, "\uc9c0\uc2dd\uc744": 82, "\uc9c0\uc5d0": 81, "\uc9c0\uc6b0\ub294": 75, "\uc9c0\uc810\uc744": 80, "\uc9c1\uad00\uc801\uc73c\ub85c": 78, "\uc9c1\uad00\uc801\uc778": 78, "\uc9c1\uc0ac\uac01\ud615": 76, "\uc9c1\uc0ac\uac01\ud615\ub4e4\uc5d0": 79, "\uc9c1\uc0ac\uac01\ud615\ub4e4\uc744": 79, "\uc9c1\uc0ac\uac01\ud615\uc744": 79, "\uc9c1\uc811": 79, "\uc9c4\uc9dc": 78, "\uc9c4\ud589\ub420": 76, "\uc9c8": 81, "\uc9c8\ub9b0\ub2e4\uba74": 75, "\uc9d1\uc911\ud558\uba74": 75, "\uc9dc\uc99d\ub0a0": 81, "\ucc28\uc774\uc810\uc774": 78, "\ucc28\uc774\uc810\uc774\ub2e4": 78, "\ucc29\uc624\ub97c": 82, "\ucc38\uace0": [76, 77, 78, 79, 80, 81], "\ucc3d\uc758\uc801\uc778": 82, "\ucc3e\uc544\ub0b4\uba74": 77, "\ucc3e\uc744": 79, "\ucc44\ub85c": 78, "\ucc44\uc6b0\ub294": 76, "\ucc98\ub9ac": [75, 76, 78], "\ucc98\ub9ac\uac00": [76, 77], "\ucc98\ub9ac\ub294": 75, "\ucc98\ub9ac\ub97c": 79, "\ucc98\ub9ac\ub9cc\uc774": 80, "\ucc98\ub9ac\uc758": 76, "\ucc98\ub9ac\ud558\uace0": 76, "\ucc98\ub9ac\ud558\ub294": 80, "\ucc98\ub9ac\ud558\ub294\uc9c0\ub294": 77, "\ucc98\ub9ac\ud558\ub824\uba74": 81, "\ucc98\ub9ac\ud560": 76, "\ucc9c\uc7ac\uc131\uc774\ub780": 82, "\uccab\ubc88\uc9f8": 79, "\uccab\uc9f8": [75, 80], "\uccab\uc9f8\ub294": 78, "\uccab\uc9f8\ub85c": 76, "\uccb4\ud06c\ud558\ub294": 76, "\ucd08\uae30\ud654\ub418\uac70\ub098": 76, "\ucd08\uae30\ud654\ub41c\ub2e4": 76, "\ucd08\uae30\ud654\ub428\uc744": 77, "\ucd08\ub85d": 76, "\ucd1d": 79, "\ucd5c\ub300": 79, "\ucd5c\ub300\uac12\uc774": 79, "\ucd5c\ub300\ud55c": 75, "\ucd5c\uc18c": 76, "\ucd94\uac00": 77, "\ucd94\uac00\ub418\uba74": 81, "\ucd94\uac00\ub418\uc5c8\uace0": 77, "\ucd94\uac00\ub418\uc5c8\ub2e4": [77, 80], "\ucd94\uac00\ub41c": 76, "\ucd94\uac00\ub41c\ub2e4": 78, "\ucd94\uac00\uc801\uc73c\ub85c": 78, "\ucd94\uac00\uc801\uc778": [76, 77, 78, 79], "\ucd94\uac00\ud558\uac70\ub098": 76, "\ucd94\uac00\ud558\ub294": [76, 78], "\ucd94\uac00\ud558\ub824": 81, "\ucd94\uac00\ud574\ubcf4\uc790": 78, "\ucd94\uac00\ud574\uc57c": 77, "\ucd9c\ub825": [75, 78, 79, 81, 83], "\ucd9c\ub825\ub418\uac8c": 76, "\ucd9c\ub825\ub418\ub294": 76, "\ucd9c\ub825\ub420": 79, "\ucd9c\ub825\uc6a9\uc774\ub2e4": 80, "\ucd9c\ub825\uc73c\ub85c": 75, "\ucd9c\ub825\uc740": [75, 78], "\ucd9c\ub825\uc744": [76, 77, 80], "\ucd9c\ub825\uc758": 78, "\ucd9c\ub825\uc774": 82, "\ucd9c\ub825\ud558\uae30": 76, "\ucd9c\ub825\ud558\ub294": [76, 78, 79, 81], "\ucd9c\ub825\ud55c\ub2e4": 81, "\ucd9c\ub825\ud574\uc57c": 81, "\ucda9\ub3cc": 75, "\ucda9\ubd84\ud788": 79, "\uce58\uace4": 76, "\uce5c\uc219\ud55c": 76, "\uce60\ud558\uae30": 75, "\uce78\ud2b8\ub294": 82, "\uce94\ubc84\uc2a4": [76, 79], "\uce94\ubc84\uc2a4\ub97c": 76, "\uce94\ubc84\uc2a4\uc5d0": 76, "\uce94\ubc84\uc2a4\uc758": 76, "\ucea1\uc158\uc5d0": 76, "\ucee4\uc9c0\uac8c": 82, "\ucee8\ud150\uce20": 78, "\ucef4\ud4e8\ud130\ub294": 82, "\ucef4\ud4e8\ud130\ub9c8\ub2e4": 77, "\ucef4\ud4e8\ud130\uc5d0\uac8c": 82, "\ucf54\ub4dc": [76, 77, 78, 79, 80, 81], "\ucf54\ub4dc\uac00": 76, "\ucf54\ub4dc\ub97c": 75, "\ucf54\ub4dc\uc640": 76, "\ucf54\ub529\ud558\uac8c": 75, "\ucf54\ub529\ud574": 75, "\ucf58\uc194": 75, "\ucf58\uc194\uc5d0\uc11c": 75, "\ud06c\uac8c": [79, 81], "\ud06c\uace0": 76, "\ud06c\uae30": 76, "\ud06c\uae30\uac00": 76, "\ud06c\uae30\ub97c": [76, 81], "\ud06c\uae30\uc640": 76, "\ud06c\ub2e4\ub294": 82, "\ud06c\uba74": 77, "\ud070": [75, 78, 79, 80], "\ud074\uae4c": 82, "\ud074\ub9ad": 80, "\ud074\ub9ad\uc774": 80, "\ud074\ub9ad\ud588\ub2e4": 80, "\ud07c\uc744": 76, "\ud0a4": 78, "\ud0a4\ub294": 78, "\ud0a4\ub4e4\ub3c4": 78, "\ud0a4\ub97c": 78, "\ud0a4\ubcf4\ub4dc": [75, 78, 79], "\ud0a4\ubcf4\ub4dc\uac00": 80, "\ud0a4\ubcf4\ub4dc\uc5d0": 78, "\ud0a4\uc758": 78, "\ud0c4\ucc3d\uc5d0\uc11c": 79, "\ud14c\ub450\ub9ac\ub97c": [79, 81], "\ud14c\ud2b8\ub9ac\uc2a4\ub97c": 82, "\ud14d\uc2a4\ud2b8": [76, 83], "\ud14d\uc2a4\ud2b8\uac00": [76, 79], "\ud14d\uc2a4\ud2b8\ub294": 76, "\ud14d\uc2a4\ud2b8\ub97c": [76, 77, 79], "\ud14d\uc2a4\ud2b8\uc758": [76, 77], "\ud14d\uc2a4\ud2b8\uc774\ub2e4": 79, "\ud1b5\ud574": 80, "\ud22c\uc790\ud588\uc744\uae4c": 82, "\ud234\uc774": 75, "\ud29c\ud1a0\ub9ac\uc5bc": [15, 81], "\ud29c\ud1a0\ub9ac\uc5bc\uc740": 82, "\ud2b8\ub9ac\uac70": 78, "\ud2b8\ub9ac\uac70\ub418\uba74": 76, "\ud2b9\uc131": [76, 81], "\ud2b9\uc131\uc774": 82, "\ud2b9\uc131\uc774\ub2e4": 82, "\ud2b9\uc774\ud55c": 80, "\ud2b9\uc815": [76, 77, 80], "\ud2b9\uc815\ud55c": 80, "\ud30c\uc774\uac8c\uc784": [76, 81], "\ud30c\uc774\uac8c\uc784\uc740": [75, 76], "\ud30c\uc774\uac8c\uc784\uc744": 75, "\ud30c\uc774\uac8c\uc784\uc758": [75, 76, 77, 82], "\ud30c\uc774\uac8c\uc784\uc774": [75, 76], "\ud30c\uc774\uc36c\uc5d0": 75, "\ud30c\uc774\uc36c\uc758": [75, 76], "\ud30c\uc77c": 75, "\ud30c\uc77c\ub85c": 81, "\ud30c\uc77c\uc744": [75, 76], "\ud30c\uc77c\uc774\ub098": 75, "\ud30c\uc9c0\ud2b8\ub178\ud504\uac00": 82, "\ud310\ub2e8\ud558\ub294": 78, "\ud310\uc815": 80, "\ud3ec\ud568": 82, "\ud3ed\ub113\uc740": 82, "\ud3f0\ud2b8": 76, "\ud3f0\ud2b8\ub97c": 76, "\ud3f0\ud2b8\uc640": 76, "\ud479": 75, "\ud48d\uc131\ud558\uac8c": 78, "\ud504\ub85c\uadf8\ub798\uba38\uac00": 75, "\ud504\ub85c\uadf8\ub798\uba38\ub294": 75, "\ud504\ub85c\uadf8\ub798\ubc0d": 76, "\ud504\ub85c\uadf8\ub798\ubc0d\uacfc": 82, "\ud504\ub85c\uadf8\ub798\ubc0d\uc740": 82, "\ud504\ub85c\uadf8\ub798\ubc0d\uc758": 82, "\ud504\ub85c\uadf8\ub7a8": [76, 77], "\ud504\ub85c\uadf8\ub7a8\uacfc": 75, "\ud504\ub85c\uadf8\ub7a8\uc5d0": 81, "\ud504\ub85c\uadf8\ub7a8\uc5d0\uc120": 78, "\ud504\ub85c\uadf8\ub7a8\uc740": [81, 82], "\ud504\ub85c\uadf8\ub7a8\uc744": [76, 77, 79, 82], "\ud504\ub85c\uadf8\ub7a8\uc758": [75, 76, 78], "\ud504\ub85c\uadf8\ub7a8\uc774": 79, "\ud504\ub85c\uc81d\ud2b8": 77, "\ud504\ub85c\uc81d\ud2b8\uac00": [76, 78], "\ud504\ub85c\uc81d\ud2b8\ub294": [76, 77, 78], "\ud504\ub85c\uc81d\ud2b8\ub85c": 76, "\ud504\ub85c\uc81d\ud2b8\uc5d0": 77, "\ud504\ub85c\uc81d\ud2b8\uc5d0\uc11c": 76, "\ud504\ub85c\uc81d\ud2b8\uc640": 78, "\ud504\ub85c\uc81d\ud2b8\uc740": 75, "\ud504\ub85c\uc81d\ud2b8\uc758": [76, 77, 78], "\ud504\ub85c\uc81d\ud2b8\uc774\uba70": 76, "\ud504\ub864\ub85c\uadf8": 83, "\ud504\ub864\ub85c\uadf8\uc5d0\uc11c": 81, "\ud504\ub9b0\ud2b8": 80, "\ud50c\ub808\uc774": [78, 82], "\ud53c\ud0c0\uace0\ub77c\uc2a4": 77, "\ud544\uc218\uc870\uac74\uc774": 78, "\ud544\uc218\uc870\uac74\uc774\uae30": 78, "\ud544\uc694": [75, 76], "\ud544\uc694\ub3c4": 81, "\ud544\uc694\ub85c": 76, "\ud544\uc694\ud558\uac8c": 80, "\ud544\uc694\ud558\ub2e4": [76, 78], "\ud544\uc694\ud560": 77, "\ud558\uaca0\ub2e4": 79, "\ud558\uace0": 81, "\ud558\uae30": [76, 78], "\ud558\uae30\ub9cc": 79, "\ud558\ub098": 75, "\ud558\ub098\ub85c": 80, "\ud558\ub098\ub9cc": 81, "\ud558\ub098\uc758": [75, 76, 77, 79, 82], "\ud558\ub098\uc774\ub2e4": 77, "\ud558\ub294": [76, 77, 80], "\ud558\ub294\ub370": 80, "\ud558\ub294\uc9c0": 76, "\ud558\ub2e4": 75, "\ud558\uba74": [76, 77, 79], "\ud558\uc580": 79, "\ud558\uc580\uc0c9": 76, "\ud558\uc600\ub2e4": 79, "\ud558\uc9c0\ub9cc": [75, 76, 77, 79, 80, 82], "\ud55c": [77, 80, 82], "\ud55c\uad6d\uc5b4": 15, "\ud55c\ub2e4": [76, 77, 78, 79, 80, 81], "\ud55c\ubc88\ub9cc": 76, "\ud55c\ubc88\ucbe4\uc740": 75, "\ud560": [76, 77, 79, 82], "\ud560\uae4c": 79, "\ud560\ub2f9\ub41c": 76, "\ud568\uc218": [76, 77], "\ud568\uc218\uac00": [76, 77], "\ud568\uc218\ub294": [76, 77, 80, 81], "\ud568\uc218\ub4e4\uacfc": 75, "\ud568\uc218\ub4e4\uc740": [75, 76], "\ud568\uc218\ub4e4\uc744": [75, 76], "\ud568\uc218\ub4e4\uc774": 75, "\ud568\uc218\ub85c": 75, "\ud568\uc218\ub97c": [76, 79], "\ud568\uc218\ubcf4\ub2e4": 77, "\ud568\uc218\uc5d0\uc120": 79, "\ud568\uc218\uc640": [76, 77], "\ud568\uc218\uc758": 76, "\ud568\uc218\uc774\uae30": 76, "\ud568\uc218\uc774\ub2e4": 77, "\ud568\uc218\ud654": 78, "\ud568\uc218\ud654\ub97c": 79, "\ud56d\uc0c1": [75, 76, 78, 80], "\ud574": 75, "\ud574\uacb0\ud560": 75, "\ud574\ub2f9": 78, "\ud574\ub2f9\ub418\ub294": 77, "\ud574\uc11c": 81, "\ud574\uc57c": [76, 79], "\ud5f7\uac08\ub9ac\uba74": 76, "\ud604\uc7ac": 79, "\ud615\uc2dd\uc5d0": 76, "\ud615\uc2dd\uc744": 76, "\ud615\uc2dd\uc774": 76, "\ud638\ucd9c\ub418\ub294\ub370": 76, "\ud638\ucd9c\ub418\uba74": 76, "\ud638\ucd9c\ub418\uc5b4\uc57c": 76, "\ud638\ucd9c\ub41c\ub2e4": 76, "\ud638\ud658\uc131": 75, "\ud654\ub824\ud55c": 76, "\ud654\uba74": [76, 79], "\ud654\uba74\uacfc": 76, "\ud654\uba74\ubcf4\ub2e4\ub294": 77, "\ud654\uba74\ubcf4\ud638\uae30\ucc98\ub7fc": 77, "\ud654\uba74\uc744": [75, 77], "\ud654\uba74\uc758": 76, "\ud655\uc2e4\ud558\ub2e4": 77, "\ud655\uc778\ud558\ub294": [75, 79], "\ud655\uc778\ud558\ub77c": 80, "\ud655\uc778\ud558\uba74": [79, 80], "\ud655\uc778\ud560": [77, 78, 79], "\ud655\uc778\ud574\uc57c": 78, "\ud655\uc815\ub41c\ub2e4\uba74": 76, "\ud658\uacbd": 75, "\ud658\uacbd\uacfc": 75, "\ud658\uacbd\uc5d0\uc11c": 75, "\ud658\uacbd\uc5d0\uc11c\uc758": 75, "\ud658\uacbd\uc6a9": 75, "\ud658\uacbd\uc740": 75, "\ud65c\ub3d9\uc774\ub2e4": 82, "\ud65c\uc131\ud654\ub418\uba74": 80, "\ud65c\uc6a9\ud558\uace0": 82, "\ud65c\uc6a9\ud55c": 75, "\ud65c\uc6a9\ud574": 75, "\ud69f\uc218\ub97c": 77, "\ud6a8\uacfc\uac00": [80, 82], "\ud6a8\uacfc\ub97c": 81, "\ud6a8\uacfc\uc74c\uc744": 81, "\ud6c4": [75, 78], "\ud6e8\uc52c": 79, "\ud765\ubbf8\ub85c\uc6b4": 82}, "titles": ["pygame C API", "High level API exported by pygame.base", "Class BufferProxy API exported by pygame.bufferproxy", "Class Color API exported by pygame.color", "API exported by pygame.display", "API exported by pygame.event", "API exported by pygame._freetype", "API exported by pygame.mixer", "Class Rect API exported by pygame.rect", "API exported by pygame.rwobject", "Slots and c_api - Making functions and data available from other modules", "Class Surface API exported by pygame.surface", "API exported by pygame.surflock", "API exported by pygame.version", "File Path Function Arguments", "Pygame Front Page", "Pygame Logos Page", "pygame.BufferProxy", "pygame.camera", "pygame.cdrom", "pygame.Color", "Named Colors", "pygame.cursors", "pygame.display", "pygame.draw", "pygame.event", "pygame.examples", "pygame.fastevent", "pygame.font", "pygame.freetype", "pygame.gfxdraw", "pygame.image", "pygame.joystick", "pygame.key", "pygame.locals", "pygame.mask", "pygame.math", "pygame.midi", "pygame.mixer", "pygame.mouse", "pygame.mixer.music", "pygame.Overlay", "pygame.PixelArray", "pygame.pixelcopy", "pygame", "pygame.Rect", "pygame.scrap", "pygame._sdl2.controller", "pygame.sdl2_video", "pygame.sndarray", "pygame.sprite", "pygame.Surface", "pygame.surfarray", "pygame.tests", "pygame.time", "pygame._sdl2.touch", "pygame.transform", "Pygame Tutorials - Camera Module Introduction", "Pygame Tutorials - Line By Line Chimp Example", "Pygame Tutorials - Setting Display Modes", "Pygame Tutorials - Import and Initialize", "Making Games With Pygame", "Pygame Tutorials - Help! How Do I Move An Image?", "Pygame Intro", "Pygame Tutorials - Sprite Module Introduction", "Pygame Tutorials - Surfarray Introduction", "pygame/examples/chimp.py", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "Author: Youngwook Kim (Korean)", "\ud55c\uad6d\uc5b4 \ud29c\ud1a0\ub9ac\uc5bc", "A Newbie Guide to pygame", "Revision: Pygame fundamentals", "Kicking things off", "Game object classes", "User-controllable objects", "Putting it all together"], "titleterms": {"": 62, "1": [32, 61, 85, 86, 87, 88, 89], "2": [32, 62, 85, 86, 87, 89], "3": [85, 86, 88, 89], "360": 32, "4": [32, 85, 87], "5": [32, 85, 88], "6": 89, "A": [61, 62, 84, 87, 88], "AND": 63, "Be": 84, "By": 58, "Into": 68, "It": 62, "NO": 84, "On": [58, 62], "One": 62, "The": [58, 62, 64, 85, 86, 89], "There": 84, "To": 62, "With": 61, "_freetyp": 6, "_sdl2": [47, 55], "access": [42, 49, 52], "ad": 62, "advanc": [64, 65, 71, 72], "advic": 84, "all": [58, 62, 89], "alpha": [73, 84], "an": [17, 62], "anim": 69, "api": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13], "ar": [62, 84], "architectur": 84, "argument": 14, "arrai": [17, 43, 52], "audio": [19, 40], "author": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "avail": 10, "axi": 32, "back": 62, "background": [58, 62], "ball": [87, 89], "base": 1, "basic": [50, 57, 59, 68, 69, 70, 85], "bat": [88, 89], "blit": [62, 85], "bother": 84, "buffer": 17, "bufferproxi": 2, "bufferproxypygam": 17, "button": 72, "c": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12], "c_api": 10, "camera": [18, 57], "camerapygam": 18, "captur": 57, "cdrom": 19, "cdrompygam": 19, "center": 58, "chang": 62, "chimp": [58, 66], "class": [2, 3, 8, 11, 36, 50, 58, 64, 87, 88], "clipboard": 46, "close": 63, "code": 61, "collis": [64, 84], "color": [3, 20, 21], "colorkei": 84, "colorpygam": 20, "colorspac": 57, "com": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "comfort": 84, "common": [32, 64], "comput": [29, 57], "con": 32, "connect": 57, "constant": 34, "contact": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "contain": 44, "content": 61, "control": [19, 23, 32, 40, 47, 57, 88], "controllerpygam": 47, "convert": 84, "coordin": [45, 62], "copi": 43, "creat": [58, 62], "cursor": 22, "cursorspygam": 22, "da": 85, "data": [10, 49, 52], "decid": 59, "definit": 62, "design": 84, "detect": [64, 84], "direct": 42, "displai": [4, 23, 58, 59], "displaypygam": 23, "distract": 84, "divers": [87, 88], "do": [62, 84], "document": 15, "don": 84, "draw": [24, 30, 58], "drawpygam": 24, "driven": 68, "entir": 58, "epilog": 74, "event": [5, 25, 27, 58, 68, 70, 84, 85, 88], "eventpygam": 25, "everyth": 58, "exampl": [26, 58, 59, 65, 66], "examplesmodul": 26, "export": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 17], "extend": 64, "fasteventpygam": 27, "file": 14, "finish": [58, 89], "first": [62, 86], "font": [28, 29], "fontpygam": 28, "freetypeenhanc": 29, "friend": 84, "from": [10, 62], "front": 15, "function": [10, 14, 59, 62, 65, 71, 86], "fundament": 85, "game": [50, 58, 61, 63, 84, 85, 87], "gamepad": 32, "gener": 43, "get": 84, "gfxdrawpygam": 30, "gmail": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "go": 62, "graduat": 65, "graphic": 41, "group": 64, "gui": [68, 76], "guid": 84, "handl": [58, 62, 86], "help": 62, "here": 62, "hero": 62, "high": 1, "histori": [63, 64], "hit": 89, "how": [59, 62], "i": [62, 70, 84], "imag": [31, 35, 51, 57, 62], "imagepygam": 31, "import": [57, 58, 60, 65], "improv": 62, "inform": 44, "init": [57, 60], "initi": [58, 60], "input": [37, 55, 58, 62, 70], "interact": [25, 27, 32, 37], "interfac": 52, "intro": 63, "introduct": [57, 58, 59, 61, 63, 64, 65], "issu": 84, "joi": 32, "joystick": 32, "joystickpygam": 32, "just": 62, "keyboard": 33, "keypygam": 33, "kick": 86, "kim": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "know": 84, "korean": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "left": 32, "legaci": 16, "lesson": 64, "let": [62, 89], "level": [1, 44], "line": [58, 86], "list": [57, 62], "live": 57, "load": [28, 29, 38, 58, 86], "localspygam": 34, "lock": 65, "logo": 16, "loop": [58, 85], "main": 58, "make": [10, 61, 62], "manag": 84, "mani": 64, "map": [32, 62], "mask": [35, 57], "maskpygam": 35, "mathpygam": 36, "midi": 37, "midipygam": 37, "mix": 64, "mixer": [7, 40], "mixerpygam": 38, "mode": 59, "modul": [10, 18, 19, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 49, 50, 52, 54, 55, 56, 57, 58, 63, 64, 86], "monitor": 54, "more": [62, 65], "mous": 39, "mousepygam": 39, "move": 62, "movement": 62, "multipl": 62, "musicpygam": 40, "mysteri": 62, "name": 21, "need": 84, "new": 70, "newbi": 84, "next": 62, "nintendo": 32, "note": 61, "numpi": 65, "object": [17, 20, 41, 42, 45, 50, 51, 58, 85, 87, 88], "obsolet": 84, "off": 86, "option": 84, "other": [10, 65], "outdat": 84, "output": [37, 68, 72], "over": 58, "overlai": 41, "overlaypygam": 41, "overview": 63, "own": [62, 64], "packag": [44, 53], "page": [15, 16], "part": 84, "path": 14, "pattern": 84, "perfect": 84, "physic": 87, "pixel": [42, 43, 52, 62, 84], "pixelarraypygam": 42, "pixelcopypygam": 43, "plai": 38, "playstat": 32, "plu": 73, "prepar": [58, 62], "pro": 32, "problem": 64, "process": [69, 71], "product": 89, "program": 26, "prolog": 67, "protocol": 17, "put": [58, 62, 89], "py": [13, 66], "pygam": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 84, 85, 88], "pygameth": 44, "python": [63, 84], "pythoni": 84, "queue": [25, 27], "quick": 15, "quit": 60, "realli": 84, "recogn": 84, "rect": [8, 84], "rectangular": 45, "rectpygam": 45, "refer": 15, "render": [28, 29, 64], "repres": 51, "represent": 20, "resourc": [22, 58, 86], "revis": 85, "right": 32, "rule": 84, "rumia0601": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "rwobject": 9, "sampl": 49, "scene": 58, "scrappygam": 46, "screen": [23, 62], "sdl2_video": 48, "set": [59, 69], "setup": 58, "shape": [24, 30], "side": [84, 89], "simpl": [87, 88], "singl": 57, "six": 84, "slot": 10, "smooth": 62, "sndarraypygam": 49, "so": 62, "softwar": 84, "some": 62, "sound": [38, 49], "sprite": [58, 64, 87], "spritepygam": 50, "src_c": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12], "src_py": 13, "start": 15, "step": 62, "store": 45, "stream": [40, 57], "style": 61, "subsystem": 84, "suit": 53, "support": 46, "surfac": [11, 17, 42, 52, 56, 65, 84], "surfacepygam": 51, "surfarrai": 65, "surfarraypygam": 52, "surflock": 12, "switch": 32, "t": 84, "ta": 85, "tabl": 61, "take": 62, "tast": 63, "templat": 68, "test": 53, "testspygam": 53, "text": 58, "them": 64, "thing": [84, 86], "threshold": 57, "through": 17, "time": [54, 62], "timepygam": 54, "togeth": [62, 64, 89], "top": 44, "touch": 55, "touchpygam": 55, "trackbal": 32, "transfer": 31, "transform": 56, "transformpygam": 56, "transpar": 65, "tutori": [15, 57, 58, 59, 60, 62, 64, 65], "type": 64, "unit": 53, "updat": 58, "us": [18, 52, 57, 84], "user": [62, 88], "v": 84, "vector": [36, 87], "version": [13, 44], "versionsmal": 44, "video": 41, "vision": 57, "wai": 84, "wari": 84, "what": [62, 84], "which": 84, "while": 58, "why": 67, "window": 23, "work": [33, 39, 47, 55, 84], "x": 32, "xbox": 32, "you": [62, 84], "youngwook": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82], "your": [62, 64, 84], "\uadf8\ub9ac\uace0": [79, 80, 81], "\uae30\ubc18\uacfc": 76, "\uae30\ubc18\uc73c\ub85c\uc758": 76, "\uae30\ubcf8": 76, "\uae30\ucd08": [76, 77, 78], "\ub354": 81, "\ubc84\ud2bc": 80, "\uc0c8\ub85c\uc6b4": 78, "\uc2ec\ud654": [79, 80], "\uc5d0\ud544\ub85c\uadf8": 82, "\uc65c": 75, "\uc6c0\uc9c1\uc774\uae30": 77, "\uc704\ud55c": 77, "\uc774\ubca4\ud2b8": [76, 78], "\uc785\ub825": 78, "\uc785\ub825\uc740": 78, "\uc785\ubb38": 76, "\uc870\uac74": 77, "\uc870\uae08": 81, "\ucc98\ub9ac": [77, 79], "\ucd9c\ub825": [76, 80], "\ud29c\ud1a0\ub9ac\uc5bc": 83, "\ud30c\uc774\uac8c\uc784": 75, "\ud504\ub864\ub85c\uadf8": 75, "\ud558\ud544": 75, "\ud55c\uad6d\uc5b4": 83, "\ud568\uc218\ud654": 79, "\ud615\uc2dd\uacfc": 76, "\ud654\uba74\uc774": 77}})././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/0000755000175100001770000000000014676242436016127 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.9161391 pygame-2.6.1/docs/generated/tut/CameraIntro.html0000644000175100001770000011223514676242425021223 0ustar00runnerdocker Pygame Tutorials - Camera Module Introduction — pygame v2.6.1 documentation

Camera Module Introduction

Author:

by Nirav Patel

Contact:

nrp@eclecti.cc

Pygame 1.9 comes with support for interfacing cameras, allowing you to capture still images, watch live streams, and do some simple computer vision. This tutorial will cover all of those use cases, providing code samples you can base your app or game on. You can refer to the reference documentation for the full API.

Note

As of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as EXPERIMENTAL, meaning the API could change in subsequent versions.

Import and Init

import pygame
import pygame.camera
from pygame.locals import *

pygame.init()
pygame.camera.init()

As the camera module is optional, it needs to be imported and initialized manually as shown above.

Capturing a Single Image

Now we will go over the simplest case of opening a camera and capturing a frame as a surface. In the below example, we assume that there is a camera at /dev/video0 on the computer, and initialize it with a size of 640 by 480. The surface called image is whatever the camera was seeing when get_image() was called.

cam = pygame.camera.Camera("/dev/video0",(640,480))
cam.start()
image = cam.get_image()

Listing Connected Cameras

You may be wondering, what if we don't know the exact path of the camera? We can ask the module to provide a list of cameras attached to the computer and initialize the first camera in the list.

camlist = pygame.camera.list_cameras()
if camlist:
    cam = pygame.camera.Camera(camlist[0],(640,480))

Using Camera Controls

Most cameras support controls like flipping the image and changing brightness. set_controls() and get_controls() can be used at any point after using start().

cam.set_controls(hflip = True, vflip = False)
print camera.get_controls()

Capturing a Live Stream

The rest of this tutorial will be based around capturing a live stream of images. For this, we will be using the class below. As described, it will simply blit a constant stream of camera frames to the screen, effectively showing live video. It is basically what you would expect, looping get_image(), blitting to the display surface, and flipping it. For performance reasons, we will be supplying the camera with the same surface to use each time.

class Capture:
    def __init__(self):
        self.size = (640,480)
        # create a display surface. standard pygame stuff
        self.display = pygame.display.set_mode(self.size, 0)

        # this is the same as what we saw before
        self.clist = pygame.camera.list_cameras()
        if not self.clist:
            raise ValueError("Sorry, no cameras detected.")
        self.cam = pygame.camera.Camera(self.clist[0], self.size)
        self.cam.start()

        # create a surface to capture to.  for performance purposes
        # bit depth is the same as that of the display surface.
        self.snapshot = pygame.surface.Surface(self.size, 0, self.display)

    def get_and_flip(self):
        # if you don't want to tie the framerate to the camera, you can check
        # if the camera has an image ready.  note that while this works
        # on most cameras, some will never return true.
        if self.cam.query_image():
            self.snapshot = self.cam.get_image(self.snapshot)

        # blit it to the display surface.  simple!
        self.display.blit(self.snapshot, (0,0))
        pygame.display.flip()

    def main(self):
        going = True
        while going:
            events = pygame.event.get()
            for e in events:
                if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE):
                    # close the camera safely
                    self.cam.stop()
                    going = False

            self.get_and_flip()

Since get_image() is a blocking call that could take quite a bit of time on a slow camera, this example uses query_image() to see if the camera is ready. This allows you to separate the framerate of your game from that of your camera. It is also possible to have the camera capturing images in a separate thread, for approximately the same performance gain, if you find that your camera does not support the query_image() function correctly.

Basic Computer Vision

By using the camera, transform, and mask modules, pygame can do some basic computer vision.

Colorspaces

When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial.

self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB")
../_images/camera_rgb.jpg
self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV")
../_images/camera_yuv.jpg
self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV")
../_images/camera_hsv.jpg

Thresholding

Using the threshold() function from the transform module, one can do simple green screen like effects, or isolate specifically colored objects in a scene. In the below example, we threshold out just the green tree and make the rest of the image black. Check the reference documentation for details on the threshold function.

self.thresholded = pygame.surface.Surface(self.size, 0, self.display)
self.snapshot = self.cam.get_image(self.snapshot)
pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2)
../_images/camera_thresholded.jpg

Of course, this is only useful if you already know the exact color of the object you are looking for. To get around this and make thresholding usable in the real world, we need to add a calibration stage where we identify the color of an object and use it to threshold against. We will be using the average_color() function of the transform module to do this. Below is an example calibration function that you could loop until an event like a key press, and an image of what it would look like. The color inside the box will be the one that is used for the threshold. Note that we are using the HSV colorspace in the below images.

def calibrate(self):
    # capture the image
    self.snapshot = self.cam.get_image(self.snapshot)
    # blit it to the display surface
    self.display.blit(self.snapshot, (0,0))
    # make a rect in the middle of the screen
    crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4)
    # get the average color of the area inside the rect
    self.ccolor = pygame.transform.average_color(self.snapshot, crect)
    # fill the upper left corner with that color
    self.display.fill(self.ccolor, (0,0,50,50))
    pygame.display.flip()
../_images/camera_average.jpg
pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2)
../_images/camera_thresh.jpg

You can use the same idea to do a simple green screen/blue screen, by first getting a background image and then thresholding against it. The below example just has the camera pointed at a blank white wall in HSV colorspace.

def calibrate(self):
    # capture a bunch of background images
    bg = []
    for i in range(0,5):
      bg.append(self.cam.get_image(self.background))
    # average them down to one to get rid of some noise
    pygame.transform.average_surfaces(bg,self.background)
    # blit it to the display surface
    self.display.blit(self.background, (0,0))
    pygame.display.flip()
../_images/camera_background.jpg
pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background)
../_images/camera_green.jpg

Using the Mask Module

The stuff above is great if you just want to display images, but with the mask module, you can also use a camera as an input device for a game. For example, going back to the example of thresholding out a specific object, we can find the position of that object and use it to control an on screen object.

def get_and_flip(self):
    self.snapshot = self.cam.get_image(self.snapshot)
    # threshold against the color we got before
    mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30))
    self.display.blit(self.snapshot,(0,0))
    # keep only the largest blob of that color
    connected = mask.connected_component()
    # make sure the blob is big enough that it isn't just noise
    if mask.count() > 100:
        # find the center of the blob
        coord = mask.centroid()
        # draw a circle with size variable on the size of the blob
        pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5))
    pygame.display.flip()
../_images/camera_mask.jpg

This is just the most basic example. You can track multiple different colored blobs, find the outlines of objects, have collision detection between real life and in game objects, get the angle of an object to allow for even finer control, and more. Have fun!




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612180.984139 pygame-2.6.1/docs/generated/tut/ChimpLineByLine.html0000644000175100001770000016165014676242425021777 0ustar00runnerdocker Pygame Tutorials - Line By Line Chimp Example — pygame v2.6.1 documentation

Line By Line Chimp

Author:

Pete Shinners

Contact:

pete@shinners.org

Introduction

In the pygame examples there is a simple example named "chimp". This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame's abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling.

The program and images can be found inside the standard source distribution of pygame. You can run it by running python -m pygame.examples.chimp in your terminal.

This tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out.

This is an excellent tutorial for people getting their first look at the pygame code. Once pygame is fully installed, you can find and run the chimp demo for yourself in the examples directory.

(no, this is not a banner ad, it's the screenshot)

chimp game banner

Full Source

Import Modules

This is the code that imports all the needed modules into your program. It also checks for the availability of some of the optional pygame modules.

# Import Modules
import os
import pygame as pg

if not pg.font:
    print("Warning, fonts disabled")
if not pg.mixer:
    print("Warning, sound disabled")

main_dir = os.path.split(os.path.abspath(__file__))[0]
data_dir = os.path.join(main_dir, "data")

First, we import the standard "os" python module. This allow us to do things like create platform independent file paths.

In the next line, we import the pygame package. In our case, we import pygame as pg, so that all of the functionality of pygame is able to be referenced from the namespace pg.

Some pygame modules are optional, and if they aren't found, they evaluate to False. Because of that, we decide to print a nice warning message if the font or mixer modules in pygame are not available. (Although they will only be unavailable in very uncommon situations).

Lastly, we prepare two paths for the rest of the code to use. main_dir uses the os.path module and the __file__ variable provided by Python to locate the game's python file, and extract the folder from that path. It then prepares the variable data_dir to tell the loading functions exactly where to look.

Loading Resources

Here we have two functions we can use to load images and sounds. We will look at each function individually in this section.

def load_image(name, colorkey=None, scale=1):
    fullname = os.path.join(data_dir, name)
    image = pg.image.load(fullname)

    size = image.get_size()
    size = (size[0] * scale, size[1] * scale)
    image = pg.transform.scale(image, size)

    image = image.convert()
    if colorkey is not None:
        if colorkey == -1:
            colorkey = image.get_at((0, 0))
        image.set_colorkey(colorkey, pg.RLEACCEL)
    return image, image.get_rect()

This function takes the name of an image to load. It also optionally takes an argument it can use to set a colorkey for the image, and an argument to scale the image. A colorkey is used in graphics to represent a color of the image that is transparent.

The first thing this function does is create a full pathname to the file. In this example all the resources are in a "data" subdirectory. By using the os.path.join function, a pathname will be created that works for whatever platform the game is running on.

Next we load the image using the pygame.image.load()load new image from a file (or file-like object) function. After the image is loaded, we make an important call to the convert() function. This makes a new copy of a Surface and converts its color format and depth to match the display. This means blitting the image to the screen will happen as quickly as possible.

We then scale the image, using the pygame.transform.scale()resize to new resolution function. This function takes a Surface and the size it should be scaled to. To scale by a scalar, we can get the size and scale the x and y by the scalar.

Last, we set the colorkey for the image. If the user supplied an argument for the colorkey argument we use that value as the colorkey for the image. This would usually just be a color RGB value, like (255, 255, 255) for white. You can also pass a value of -1 as the colorkey. In this case the function will lookup the color at the topleft pixel of the image, and use that color for the colorkey.

def load_sound(name):
    class NoneSound:
        def play(self):
            pass

    if not pg.mixer or not pg.mixer.get_init():
        return NoneSound()

    fullname = os.path.join(data_dir, name)
    sound = pg.mixer.Sound(fullname)

    return sound

Next is the function to load a sound file. The first thing this function does is check to see if the pygame.mixerpygame module for loading and playing sounds module was imported correctly. If not, it returns a small class instance that has a dummy play method. This will act enough like a normal Sound object for this game to run without any extra error checking.

This function is similar to the image loading function, but handles some different problems. First we create a full path to the sound image, and load the sound file. Then we simply return the loaded Sound object.

Game Object Classes

Here we create two classes to represent the objects in our game. Almost all the logic for the game goes into these two classes. We will look over them one at a time here.

class Fist(pg.sprite.Sprite):
    """moves a clenched fist on the screen, following the mouse"""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("fist.png", -1)
        self.fist_offset = (-235, -80)
        self.punching = False

    def update(self):
        """move the fist based on the mouse position"""
        pos = pg.mouse.get_pos()
        self.rect.topleft = pos
        self.rect.move_ip(self.fist_offset)
        if self.punching:
            self.rect.move_ip(15, 25)

    def punch(self, target):
        """returns true if the fist collides with the target"""
        if not self.punching:
            self.punching = True
            hitbox = self.rect.inflate(-5, -5)
            return hitbox.colliderect(target.rect)

    def unpunch(self):
        """called to pull the fist back"""
        self.punching = False

Here we create a class to represent the players fist. It is derived from the Sprite class included in the pygame.spritepygame module with basic game object classes module. The __init__ function is called when new instances of this class are created. The first thing we do is be sure to call the __init__ function for our base class. This allows the Sprite's __init__ function to prepare our object for use as a sprite. This game uses one of the sprite drawing Group classes. These classes can draw sprites that have an "image" and "rect" attribute. By simply changing these two attributes, the renderer will draw the current image at the current position.

All sprites have an update() method. This function is typically called once per frame. It is where you should put code that moves and updates the variables for the sprite. The update() method for the fist moves the fist to the location of the mouse pointer. It also offsets the fist position slightly if the fist is in the "punching" state.

The following two functions punch() and unpunch() change the punching state for the fist. The punch() method also returns a true value if the fist is colliding with the given target sprite.

class Chimp(pg.sprite.Sprite):
    """moves a monkey critter across the screen. it can spin the
    monkey when it is punched."""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("chimp.png", -1, 4)
        screen = pg.display.get_surface()
        self.area = screen.get_rect()
        self.rect.topleft = 10, 90
        self.move = 18
        self.dizzy = False

    def update(self):
        """walk or spin, depending on the monkeys state"""
        if self.dizzy:
            self._spin()
        else:
            self._walk()

    def _walk(self):
        """move the monkey across the screen, and turn at the ends"""
        newpos = self.rect.move((self.move, 0))
        if not self.area.contains(newpos):
            if self.rect.left < self.area.left or self.rect.right > self.area.right:
                self.move = -self.move
                newpos = self.rect.move((self.move, 0))
                self.image = pg.transform.flip(self.image, True, False)
        self.rect = newpos

    def _spin(self):
        """spin the monkey image"""
        center = self.rect.center
        self.dizzy = self.dizzy + 12
        if self.dizzy >= 360:
            self.dizzy = False
            self.image = self.original
        else:
            rotate = pg.transform.rotate
            self.image = rotate(self.original, self.dizzy)
        self.rect = self.image.get_rect(center=center)

    def punched(self):
        """this will cause the monkey to start spinning"""
        if not self.dizzy:
            self.dizzy = True
            self.original = self.image

The Chimp class is doing a little more work than the fist, but nothing more complex. This class will move the chimp back and forth across the screen. When the monkey is punched, he will spin around to exciting effect. This class is also derived from the base Sprite class, and is initialized the same as the fist. While initializing, the class also sets the attribute "area" to be the size of the display screen.

The update function for the chimp simply looks at the current "dizzy" state, which is true when the monkey is spinning from a punch. It calls either the _spin or _walk method. These functions are prefixed with an underscore. This is just a standard python idiom which suggests these methods should only be used by the Chimp class. We could go so far as to give them a double underscore, which would tell python to really try to make them private methods, but we don't need such protection. :)

The _walk method creates a new position for the monkey by moving the current rect by a given offset. If this new position crosses outside the display area of the screen, it reverses the movement offset. It also mirrors the image using the pygame.transform.flip()flip vertically and horizontally function. This is a crude effect that makes the monkey look like he's turning the direction he is moving.

The _spin method is called when the monkey is currently "dizzy". The dizzy attribute is used to store the current amount of rotation. When the monkey has rotated all the way around (360 degrees) it resets the monkey image back to the original, non-rotated version. Before calling the pygame.transform.rotate()rotate an image function, you'll see the code makes a local reference to the function simply named "rotate". There is no need to do that for this example, it is just done here to keep the following line's length a little shorter. Note that when calling the rotate function, we are always rotating from the original monkey image. When rotating, there is a slight loss of quality. Repeatedly rotating the same image and the quality would get worse each time. Also, when rotating an image, the size of the image will actually change. This is because the corners of the image will be rotated out, making the image bigger. We make sure the center of the new image matches the center of the old image, so it rotates without moving.

The last method is punched() which tells the sprite to enter its dizzy state. This will cause the image to start spinning. It also makes a copy of the current image named "original".

Initialize Everything

Before we can do much with pygame, we need to make sure its modules are initialized. In this case we will also open a simple graphics window. Now we are in the main() function of the program, which actually runs everything.

pg.init()
screen = pg.display.set_mode((1280, 480), pg.SCALED)
pg.display.set_caption("Monkey Fever")
pg.mouse.set_visible(False)

The first line to initialize pygame takes care of a bit of work for us. It checks through the imported pygame modules and attempts to initialize each one of them. It is possible to go back and check if modules failed to initialize, but we won't bother here. It is also possible to take a lot more control and initialize each specific module by hand. That type of control is generally not needed, but is available if you desire.

Next we set up the display graphics mode. Note that the pygame.displaypygame module to control the display window and screen module is used to control all the display settings. In this case we are asking for a 1280 by 480 window, with the SCALED display flag. This automatically scales up the window for displays much larger than the window.

Last we set the window title and turn off the mouse cursor for our window. Very basic to do, and now we have a small black window ready to do our bidding. Usually the cursor defaults to visible, so there is no need to really set the state unless we want to hide it.

Create The Background

Our program is going to have text message in the background. It would be nice for us to create a single surface to represent the background and repeatedly use that. The first step is to create the surface.

background = pg.Surface(screen.get_size())
background = background.convert()
background.fill((170, 238, 187))

This creates a new surface for us that is the same size as the display window. Note the extra call to convert() after creating the Surface. The convert with no arguments will make sure our background is the same format as the display window, which will give us the fastest results.

We also fill the entire background with a certain green color. The fill() function usually takes an RGB triplet as arguments, but supports many input formats. See the pygame.Colorpygame object for color representations for all the color formats.

Put Text On The Background, Centered

Now that we have a background surface, lets get the text rendered to it. We only do this if we see the pygame.fontpygame module for loading and rendering fonts module has imported properly. If not, we just skip this section.

if pg.font:
    font = pg.font.Font(None, 64)
    text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10))
    textpos = text.get_rect(centerx=background.get_width() / 2, y=10)
    background.blit(text, textpos)

As you see, there are a couple steps to getting this done. First we must create the font object and render it into a new surface. We then find the center of that new surface and blit (paste) it onto the background.

The font is created with the font module's Font() constructor. Usually you will pass the name of a TrueType font file to this function, but we can also pass None, which will use a default font. The Font constructor also needs to know the size of font we want to create.

We then render that font into a new surface. The render function creates a new surface that is the appropriate size for our text. In this case we are also telling render to create antialiased text (for a nice smooth look) and to use a dark grey color.

Next we need to find the centered position of the text on our display. We create a "Rect" object from the text dimensions, which allows us to easily assign it to the screen center.

Finally we blit (blit is like a copy or paste) the text onto the background image.

Display The Background While Setup Finishes

We still have a black window on the screen. Lets show our background while we wait for the other resources to load.

screen.blit(background, (0, 0))
pg.display.flip()

This will blit our entire background onto the display window. The blit is self explanatory, but what about this flip routine?

In pygame, changes to the display surface are not immediately visible. Normally, a display must be updated in areas that have changed for them to be visible to the user. In this case the flip() function works nicely because it simply handles the entire window area.

Prepare Game Object

Here we create all the objects that the game is going to need.

whiff_sound = load_sound("whiff.wav")
punch_sound = load_sound("punch.wav")
chimp = Chimp()
fist = Fist()
allsprites = pg.sprite.RenderPlain((chimp, fist))
clock = pg.time.Clock()

First we load two sound effects using the load_sound function we defined above. Then we create an instance of each of our sprite classes. And lastly we create a sprite Group which will contain all our sprites.

We actually use a special sprite group named RenderPlain. This sprite group can draw all the sprites it contains to the screen. It is called RenderPlain because there are actually more advanced Render groups. But for our game, we just need simple drawing. We create the group named "allsprites" by passing a list with all the sprites that should belong in the group. We could later on add or remove sprites from this group, but in this game we won't need to.

The clock object we create will be used to help control our game's framerate. we will use it in the main loop of our game to make sure it doesn't run too fast.

Main Loop

Nothing much here, just an infinite loop.

going = True
while going:
    clock.tick(60)

All games run in some sort of loop. The usual order of things is to check on the state of the computer and user input, move and update the state of all the objects, and then draw them to the screen. You'll see that this example is no different.

We also make a call to our clock object, which will make sure our game doesn't run faster than 60 frames per second.

Handle All Input Events

This is an extremely simple case of working the event queue.

for event in pg.event.get():
    if event.type == pg.QUIT:
        going = False
    elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE:
        going = False
    elif event.type == pg.MOUSEBUTTONDOWN:
        if fist.punch(chimp):
            punch_sound.play()  # punch
            chimp.punched()
        else:
            whiff_sound.play()  # miss
    elif event.type == pg.MOUSEBUTTONUP:
        fist.unpunch()

First we get all the available Events from pygame and loop through each of them. The first two tests see if the user has quit our game, or pressed the escape key. In these cases we just set going to False, allowing us out of the infinite loop.

Next we just check to see if the mouse button was pressed or released. If the button was pressed, we ask the fist object if it has collided with the chimp. We play the appropriate sound effect, and if the monkey was hit, we tell him to start spinning (by calling his punched() method).

Update the Sprites

allsprites.update()

Sprite groups have an update() method, which simply calls the update method for all the sprites it contains. Each of the objects will move around, depending on which state they are in. This is where the chimp will move one step side to side, or spin a little farther if he was recently punched.

Draw The Entire Scene

Now that all the objects are in the right place, time to draw them.

screen.blit(background, (0, 0))
allsprites.draw(screen)
pg.display.flip()

The first blit call will draw the background onto the entire screen. This erases everything we saw from the previous frame (slightly inefficient, but good enough for this game). Next we call the draw() method of the sprite container. Since this sprite container is really an instance of the "RenderPlain" sprite group, it knows how to draw our sprites. Lastly, we flip() the contents of pygame's software double buffer to the screen. This makes everything we've drawn visible all at once.

Game Over

User has quit, time to clean up.

pg.quit()

Cleaning up the running game in pygame is extremely simple. Since all variables are automatically destructed, we don't really have to do anything, but calling pg.quit() explicitly cleans up pygame's internals.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.018139 pygame-2.6.1/docs/generated/tut/DisplayModes.html0000644000175100001770000005504314676242425021417 0ustar00runnerdocker Pygame Tutorials - Setting Display Modes — pygame v2.6.1 documentation

Setting Display Modes

Author:

Pete Shinners

Contact:

pete@shinners.org

Introduction

Setting the display mode in pygame creates a visible image surface on the monitor. This surface can either cover the full screen, or be windowed on platforms that support a window manager. The display surface is nothing more than a standard pygame surface object. There are special functions needed in the pygame.displaypygame module to control the display window and screen module to keep the image surface contents updated on the monitor.

Setting the display mode in pygame is an easier task than with most graphic libraries. The advantage is if your display mode is not available, pygame will emulate the display mode that you asked for. Pygame will select a display resolution and color depth that best matches the settings you have requested, then allow you to access the display with the format you have requested. In reality, since the pygame.displaypygame module to control the display window and screen module is a binding around the SDL library, SDL is really doing all this work.

There are advantages and disadvantages to setting the display mode in this manner. The advantage is that if your game requires a specific display mode, your game will run on platforms that do not support your requirements. It also makes life easier when you're getting something started, it is always easy to go back later and make the mode selection a little more particular. The disadvantage is that what you request is not always what you will get. There is also a performance penalty when the display mode must be emulated. This tutorial will help you understand the different methods for querying the platforms display capabilities, and setting the display mode for your game.

Setting Basics

The first thing to learn about is how to actually set the current display mode. The display mode may be set at any time after the pygame.displaypygame module to control the display window and screen module has been initialized. If you have previously set the display mode, setting it again will change the current mode. Setting the display mode is handled with the function pygame.display.set_mode((width, height), flags, depth)Initialize a window or screen for display. If the width and height of the new display mode is not passed, the created surface will have the same size as the current screen resolution. If only the width or height is set to 0, the surface will have the same respective width or height as the screen resolution. Note that in older versions of Pygame using a SDL version prior to 1.2.10, not passing in the width and height will raise an exception. The depth flag is the requested bits per pixel for the surface. If the given depth is 8, pygame will create a color-mapped surface. When given a higher bit depth, pygame will use a packed color mode. Much more information about depths and color modes can be found in the documentation for the display and surface modules. The default value for depth is 0. When given an argument of 0, pygame will select the best bit depth to use, usually the same as the system's current bit depth. The flags argument lets you control extra features for the display mode. Again, more information about this is found in the pygame reference documents.

How to Decide

So how do you select a display mode that is going to work best with your graphic resources and the platform your game is running on? There are several methods for gathering information about the display device. All of these methods must be called after the display module has been initialized, but you likely want to call them before setting the display mode. First, pygame.display.Info()Create a video display information object will return a special object type of VidInfo, which can tell you a lot about the graphics driver capabilities. The function pygame.display.list_modes(depth, flags, display)Get list of available fullscreen modes can be used to find the supported graphic modes by the system. pygame.display.mode_ok((width, height), flags, depth, display)Pick the best color depth for a display mode takes the same arguments as set_mode(), but returns the closest matching bit depth to the one you request. Lastly, pygame.display.get_driver()Get the name of the pygame display backend will return the name of the graphics driver selected by pygame.

Just remember the golden rule. Pygame will work with pretty much any display mode you request. Some display modes will need to be emulated, which will slow your game down, since pygame will need to convert every update you make to the "real" display mode. The best bet is to always let pygame choose the best bit depth, and convert all your graphic resources to that format when they are loaded. You let pygame choose its bit depth by calling set_mode() with no depth argument or a depth of 0, or you can call mode_ok() to find a closest matching bit depth to what you need.

When your display mode is windowed, you usually must match the same bit depth as the desktop. When you are fullscreen, some platforms can switch to any bit depth that best suits your needs. You can find the depth of the current desktop if you get a VidInfo object before ever setting your display mode.

After setting the display mode, you can find out information about its settings by getting a VidInfo object, or by calling any of the Surface.get* methods on the display surface.

Functions

These are the routines you can use to determine the most appropriate display mode. You can find more information about these functions in the display module documentation.

pygame.display.mode_ok(size, flags, depth, display)Pick the best color depth for a display mode

This function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation.

pygame.display.list_modes(depth, flags, display)Get list of available fullscreen modes

Returns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to FULLSCREEN. If you specify your own flags without FULLSCREEN, you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used.

pygame.display.get_desktop_sizes()Get sizes of active desktops

This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable.

pygame.display.Info()Create a video display information object

This function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object.

>>> import pygame.display
>>> pygame.display.init()
>>> info = pygame.display.Info()
>>> print(info)
<VideoInfo(hw = 0, wm = 1,video_mem = 0
        blit_hw = 0, blit_hw_CC = 0, blit_hw_A = 0,
        blit_sw = 0, blit_sw_CC = 0, blit_sw_A = 0,
        bitsize  = 32, bytesize = 4,
        masks =  (16711680, 65280, 255, 0),
        shifts = (16, 8, 0, 0),
        losses =  (0, 0, 0, 8),
        current_w = 1920, current_h = 1080
>

You can test all these flags as simply members of the VidInfo object.

Examples

Here are some examples of different methods to init the graphics display. They should help you get an idea of how to go about setting your display mode.

>>> # give me the best depth with a 640 x 480 windowed display
>>> pygame.display.set_mode((640, 480))

>>> # give me the biggest 16-bit display available
>>> modes = pygame.display.list_modes(16)
>>> if not modes:
...     print('16-bit not supported')
... else:
...     print('Found Resolution:', modes[0])
...     pygame.display.set_mode(modes[0], FULLSCREEN, 16)

>>> # need an 8-bit surface, nothing else will do
>>> if pygame.display.mode_ok((800, 600), 0, 8) != 8:
...     print('Can only work with an 8-bit display, sorry')
... else:
...     pygame.display.set_mode((800, 600), 0, 8)



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.0351388 pygame-2.6.1/docs/generated/tut/ImportInit.html0000644000175100001770000002253314676242425021116 0ustar00runnerdocker Pygame Tutorials - Import and Initialize — pygame v2.6.1 documentation

Import and Initialize

Author:

Pete Shinners

Contact:

pete@shinners.org

Getting pygame imported and initialized is a very simple process. It is also flexible enough to give you control over what is happening. Pygame is a collection of different modules in a single python package. Some of the modules are written in C, and some are written in python. Some modules are also optional, and might not always be present.

This is just a quick introduction on what is going on when you import pygame. For a clearer explanation definitely see the pygame examples.

Import

First we must import the pygame package. Since pygame version 1.4 this has been updated to be much easier. Most games will import all of pygame like this.

import pygame
from pygame.locals import *

The first line here is the only necessary one. It imports all the available pygame modules into the pygame package. The second line is optional, and puts a limited set of constants and functions into the global namespace of your script.

An important thing to keep in mind is that several pygame modules are optional. For example, one of these is the font module. When you "import pygame", pygame will check to see if the font module is available. If the font module is available it will be imported as "pygame.font". If the module is not available, "pygame.font" will be set to None. This makes it fairly easy to later on test if the font module is available.

Init

Before you can do much with pygame, you will need to initialize it. The most common way to do this is just make one call.

pygame.init()

This will attempt to initialize all the pygame modules for you. Not all pygame modules need to be initialized, but this will automatically initialize the ones that do. You can also easily initialize each pygame module by hand. For example to only initialize the font module you would just call.

pygame.font.init()

Note that if there is an error when you initialize with "pygame.init()", it will silently fail. When hand initializing modules like this, any errors will raise an exception. Any modules that must be initialized also have a "get_init()" function, which will return true if the module has been initialized.

It is safe to call the init() function for any module more than once.

Quit

Modules that are initialized also usually have a quit() function that will clean up. There is no need to explicitly call these, as pygame will cleanly quit all the initialized modules when python finishes.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.0621388 pygame-2.6.1/docs/generated/tut/MakeGames.html0000644000175100001770000003446514676242425020661 0ustar00runnerdocker Making Games With Pygame — pygame v2.6.1 documentation

Making Games With Pygame

Table of Contents

1. Introduction

2. Revision: Pygame fundamentals

3. Kicking things off

4. Game object classes

5. User-controllable objects

6. Putting it all together

1. Introduction

First of all, I will assume you have read the Line By Line Chimp tutorial, which introduces the basics of Python and pygame. Give it a read before reading this tutorial, as I won't bother repeating what that tutorial says (or at least not in as much detail). This tutorial is aimed at those who understand how to make a ridiculously simple little "game", and who would like to make a relatively simple game like Pong. It introduces you to some concepts of game design, some simple mathematics to work out ball physics, and some ways to keep your game easy to maintain and expand.

All the code in this tutorial works toward implementing TomPong, a game I've written. By the end of the tutorial, you should not only have a firmer grasp of pygame, but you should also understand how TomPong works, and how to make your own version.

Now, for a brief recap of the basics of pygame. A common method of organising the code for a game is to divide it into the following six sections:

  • Load modules which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself

  • Resource handling classes; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have.

  • Game object classes; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class.

  • Any other game functions; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function.

  • Initialise the game, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in.

  • The main loop, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen.

Every game you make will have some or all of those sections, possibly with more of your own. For the purposes of this tutorial, I will write about how TomPong is laid out, and the ideas I write about can be transferred to almost any kind of game you might make. I will also assume that you want to keep all of the code in a single file, but if you're making a reasonably large game, it's often a good idea to source certain sections into module files. Putting the game object classes into a file called objects.py, for example, can help you keep game logic separate from game objects. If you have a lot of resource handling code, it can also be handy to put that into resources.py. You can then from objects,resources import * to import all of the classes and functions.

1.1. A note on coding styles

The first thing to remember when approaching any programming project is to decide on a coding style, and stay consistent. Python solves a lot of the problems because of its strict interpretation of whitespace and indentation, but you can still choose the size of your indentations, whether you put each module import on a new line, how you comment code, etc. You'll see how I do all of this in the code examples; you needn't use my style, but whatever style you adopt, use it all the way through the program code. Also try to document all of your classes, and comment on any bits of code that seem obscure, though don't start commenting the obvious. I've seen plenty of people do the following:

player1.score += scoreup        # Add scoreup to player1 score

The worst code is poorly laid out, with seemingly random changes in style, and poor documentation. Poor code is not only annoying for other people, but it also makes it difficult for you to maintain.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.1361387 pygame-2.6.1/docs/generated/tut/MoveIt.html0000644000175100001770000020221214676242425020215 0ustar00runnerdocker Pygame Tutorials - Help! How Do I Move An Image? — pygame v2.6.1 documentation

Help! How Do I Move An Image?

Author:

Pete Shinners

Contact:

pete@shinners.org

Many people new to programming and graphics have a hard time figuring out how to make an image move around the screen. Without understanding all the concepts, it can be very confusing. You're not the first person to be stuck here, I'll do my best to take things step by step. We'll even try to end with methods of keeping your animations efficient.

Note that we won't be teaching you to program with python in this article, just introduce you to some of the basics with pygame.

Just Pixels On The Screen

Pygame has a display Surface. This is basically an image that is visible on the screen, and the image is made up of pixels. The main way you change these pixels is by calling the blit() function. This copies the pixels from one image onto another.

This is the first thing to understand. When you blit an image onto the screen, you are simply changing the color of the pixels on the screen. Pixels aren't added or moved, we just change the colors of the pixels already on the screen. These images you blit to the screen are also Surfaces in pygame, but they are in no way connected to the display Surface. When they are blitted to the screen they are copied into the display, but you still have a unique copy of the original.

With this brief description. Perhaps you can already understand what is needed to "move" an image. We don't actually move anything at all. We simply blit the image in a new position. But before we draw the image in the new position, we'll need to "erase" the old one. Otherwise the image will be visible in two places on the screen. By rapidly erasing the image and redrawing it in a new place, we achieve the "illusion" of movement.

Through the rest of this tutorial we will break this process down into simpler steps. Even explaining the best ways to have multiple images moving around the screen. You probably already have questions. Like, how do we "erase" the image before drawing it in a new position? Perhaps you're still totally lost? Well hopefully the rest of this tutorial can straighten things out for you.

Let's Go Back A Step

Perhaps the concept of pixels and images is still a little foreign to you? Well good news, for the next few sections we are going to use code that does everything we want, it just doesn't use pixels. We're going to create a small python list of 6 numbers, and imagine it represents some fantastic graphics we could see on the screen. It might actually be surprising how closely this represents exactly what we'll later be doing with real graphics.

So let's begin by creating our screen list and fill it with a beautiful landscape of 1s and 2s.

>>> screen = [1, 1, 2, 2, 2, 1]
>>> print(screen)
[1, 1, 2, 2, 2, 1]

Now we've created our background. It's not going to be very exciting unless we also draw a player on the screen. We'll create a mighty hero that looks like the number 8. Let's stick him near the middle of the map and see what it looks like.

>>> screen[3] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

This might have been as far as you've gotten if you jumped right in doing some graphics programming with pygame. You've got some nice looking stuff on the screen, but it cannot move anywhere. Perhaps now that our screen is just a list of numbers, it's easier to see how to move him?

Making The Hero Move

Before we can start moving the character. We need to keep track of some sort of position for him. In the last section when we drew him, we just picked an arbitrary position. Let's do it a little more officially this time.

>>> playerpos = 3
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

Now it is pretty easy to move him to a new position. We simply change the value of playerpos, and draw him on the screen again.

>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 8, 8, 2, 1]

Whoops. Now we can see two heroes. One in the old position, and one in his new position. This is exactly the reason we need to "erase" the hero in his old position before we draw him in the new position. To erase him, we need to change that value in the list back to what it was before the hero was there. That means we need to keep track of the values on the screen before the hero replaced them. There's several ways you could do this, but the easiest is usually to keep a separate copy of the screen background. This means we need to make some changes to our little game.

Creating A Map

What we want to do is create a separate list we will call our background. We will create the background so it looks like our original screen did, with 1s and 2s. Then we will copy each item from the background to the screen. After that we can finally draw our hero back onto the screen.

>>> background = [1, 1, 2, 2, 2, 1]
>>> screen = [0]*6                         #a new blank screen
>>> for i in range(6):
...     screen[i] = background[i]
>>> print(screen)
[1, 1, 2, 2, 2, 1]
>>> playerpos = 3
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 2, 8, 2, 1]

It may seem like a lot of extra work. We're no farther off than we were before the last time we tried to make him move. But this time we have the extra information we need to move him properly.

Making The Hero Move (Take 2)

This time it will be easy to move the hero around. First we will erase the hero from his old position. We do this by copying the correct value from the background onto the screen. Then we will draw the character in his new position on the screen

>>> print(screen)
[1, 1, 2, 8, 2, 1]
>>> screen[playerpos] = background[playerpos]
>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 1, 8, 2, 2, 1]

There it is. The hero has moved one space to the left. We can use this same code to move him to the left again.

>>> screen[playerpos] = background[playerpos]
>>> playerpos = playerpos - 1
>>> screen[playerpos] = 8
>>> print(screen)
[1, 8, 2, 2, 2, 1]

Excellent! This isn't exactly what you'd call smooth animation. But with a couple small changes, we'll make this work directly with graphics on the screen.

Definition: "blit"

In the next sections we will transform our program from using lists to using real graphics on the screen. When displaying the graphics we will use the term blit frequently. If you are new to doing graphics work, you are probably unfamiliar with this common term.

BLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just "assigning" pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image.

Other graphics libraries will use the word bitblt, or just blt, but they are talking about the same thing. It is basically copying memory from one place to another. Actually, it is a bit more advanced than straight copying of memory, since it needs to handle things like pixel formats, clipping, and scanline pitches. Advanced blitters can also handle things like transparency and other special effects.

Going From The List To The Screen

To take the code we see in the above to examples and make them work with pygame is very straightforward. We'll pretend we have loaded some pretty graphics and named them "terrain1", "terrain2", and "hero". Where before we assigned numbers to a list, we now blit graphics to the screen. Another big change, instead of using positions as a single index (0 through 5), we now need a two dimensional coordinate. We'll pretend each of the graphics in our game is 10 pixels wide.

>>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1]
>>> screen = create_graphics_screen()
>>> for i in range(6):
...     screen.blit(background[i], (i*10, 0))
>>> playerpos = 3
>>> screen.blit(playerimage, (playerpos*10, 0))

Hmm, that code should seem very familiar, and hopefully more importantly; the code above should make a little sense. Hopefully my illustration of setting simple values in a list shows the similarity of setting pixels on the screen (with blit). The only part that's really extra work is converting the player position into coordinates on the screen. For now we just use a crude (playerpos*10, 0) , but we can certainly do better than that. Now let's move the player image over a space. This code should have no surprises.

>>> screen.blit(background[playerpos], (playerpos*10, 0))
>>> playerpos = playerpos - 1
>>> screen.blit(playerimage, (playerpos*10, 0))

There you have it. With this code we've shown how to display a simple background with a hero's image on it. Then we've properly moved that hero one space to the left. So where do we go from here? Well for one the code is still a little awkward. First thing we'll want to do is find a cleaner way to represent the background and player position. Then perhaps a bit of smoother, real animation.

Screen Coordinates

To position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination.

Pygame comes with a convenient container for these coordinates, it is a Rect. The Rect basically represents a rectangular area in these coordinates. It has topleft corner and a size. The Rect comes with a lot of convenient methods which help you move and position them. In our next examples we will represent the positions of our objects with the Rects.

Also know that many functions in pygame expect Rect arguments. All of these functions can also accept a simple tuple of 4 elements (left, top, width, height). You aren't always required to use these Rect objects, but you will mainly want to. Also, the blit() function can accept a Rect as its position argument, it simply uses the topleft corner of the Rect as the real position.

Changing The Background

In all our previous sections, we've been storing the background as a list of different types of ground. That is a good way to create a tile-based game, but we want smooth scrolling. To make that a little easier, we're going to change the background into a single image that covers the whole screen. This way, when we want to "erase" our objects (before redrawing them) we only need to blit the section of the erased background onto the screen.

By passing an optional third Rect argument to blit, we tell blit to only use that subsection of the source image. You'll see that in use below as we erase the player image.

Also note, now when we finish drawing to the screen, we call pygame.display.update() which will show everything we've drawn onto the screen.

Smooth Movement

To make something appear to move smoothly, we only want to move it a couple pixels at a time. Here is the code to make an object move smoothly across the screen. Based on what we already now know, this should look pretty simple.

>>> screen = create_screen()
>>> clock = pygame.time.Clock()            #get a pygame clock object
>>> player = load_player_image()
>>> background = load_background_image()
>>> screen.blit(background, (0, 0))        #draw the background
>>> position = player.get_rect()
>>> screen.blit(player, position)          #draw the player
>>> pygame.display.update()                #and show it all
>>> for x in range(100):                   #animate 100 frames
...     screen.blit(background, position, position) #erase
...     position = position.move(2, 0)     #move player
...     screen.blit(player, position)      #draw new player
...     pygame.display.update()            #and show it all
...     clock.tick(60)                     #update 60 times per second

There you have it. This is all the code that is needed to smoothly animate an object across the screen. We can even use a pretty background character. Another benefit of doing the background this way, the image for the player can have transparency or cutout sections and it will still draw correctly over the background (a free bonus).

We also throw in a call to pygame.time.Clock() to grab the clock element. With it, we can call clock.tick() to set the framerate in frames per second. This slows down our program a little, otherwise it might run so fast you might not see it.

So, What Next?

Well there we have it. Hopefully this article has done everything it promised to do. But, at this point the code really isn't ready for the next best-selling game. How do we easily have multiple moving objects? What exactly are those mysterious functions like load_player_image()? We also need a way to get simple user input, and loop for more than 100 frames. We'll take the example we have here, and turn it into an object oriented creation that would make momma proud.

First, The Mystery Functions

Full information on these types of functions can be found in other tutorials and reference. The pygame.image module has a load() function which will do what we want. The lines to load the images should become this.

>>> player = pygame.image.load('player.bmp').convert()
>>> background = pygame.image.load('liquid.bmp').convert()

We can see that's pretty simple, the load function just takes a filename and returns a new Surface with the loaded image. After loading we make a call to the Surface method, convert(). Convert returns us a new Surface of the image, but now converted to the same pixel format as our display. Since the images will be the same format at the screen, they will blit very quickly. If we did not convert, the blit() function is slower, since it has to convert from one type of pixel to another as it goes.

You may also have noticed that both the load() and convert() return new Surfaces. This means we're really creating two Surfaces on each of these lines. In other programming languages, this results in a memory leak (not a good thing). Fortunately Python is smart enough to handle this, and pygame will properly clean up the Surface we end up not using.

The other mystery function we saw in the above example was create_screen(). In pygame it is simple to create a new window for graphics. The code to create a 640x480 surface is below. By passing no other arguments, pygame will just pick the best color depth and pixel format for us.

>>> screen = pygame.display.set_mode((640, 480))

Handling Some Input

We desperately need to change the main loop to look for any user input, (like when the user closes the window). We need to add "event handling" to our program. All graphical programs use this Event Based design. The program gets events like "keyboard pressed" or "mouse moved" from the computer. Then the program responds to the different events. Here's what the code should look like. Instead of looping for 100 frames, we'll keep looping until the user asks us to stop.

>>> while True:
...     for event in pygame.event.get():
...         if event.type == pygame.QUIT:
...             sys.exit()
...     move_and_draw_all_game_objects()

What this code simply does is, first loop forever, then check if there are any events from the user. We exit the program if the user presses the close button on the window. After we've checked all the events we move and draw our game objects. (We'll also erase them before they move, too)

Moving Multiple Images

Here's the part where we're really going to change things around. Let's say we want 10 different images moving around on the screen. A good way to handle this is to use python's classes. We'll create a class that represents our game object. This object will have a function to move itself, and then we can create as many as we like. The functions to draw and move the object need to work in a way where they only move one frame (or one step) at a time. Here's the python code to create our class.

>>> class GameObject:
...     def __init__(self, image, height, speed):
...         self.speed = speed
...         self.image = image
...         self.pos = image.get_rect().move(0, height)
...     def move(self):
...         self.pos = self.pos.move(self.speed, 0)
...         if self.pos.right > 600:
...             self.pos.left = 0

So we have two functions in our class. The init function constructs our object. It positions the object and sets its speed. The move method moves the object one step. If it's gone too far, it moves the object back to the left.

Putting It All Together

Now with our new object class, we can put together the entire game. Here is what the main function for our program will look like.

>>> screen = pygame.display.set_mode((640, 480))
>>> clock = pygame.time.Clock()            #get a pygame clock object
>>> player = pygame.image.load('player.bmp').convert()
>>> background = pygame.image.load('background.bmp').convert()
>>> screen.blit(background, (0, 0))
>>> objects = []
>>> for x in range(10):                    #create 10 objects</i>
...     o = GameObject(player, x*40, x)
...     objects.append(o)
>>> while True:
...     for event in pygame.event.get():
...         if event.type == pygame.QUIT:
...             sys.exit()
...     for o in objects:
...         screen.blit(background, o.pos, o.pos)
...     for o in objects:
...         o.move()
...         screen.blit(o.image, o.pos)
...     pygame.display.update()
...     clock.tick(60)

And there it is. This is the code we need to animate 10 objects on the screen. The only point that might need explaining is the two loops we use to clear all the objects and draw all the objects. In order to do things properly, we need to erase all the objects before drawing any of them. In our sample here it may not matter, but when objects are overlapping, using two loops like this becomes important.

Preparing for Improved User Input

With all keyboard input terminating the program, that's not very interactive. Let's add some extra user input!

First we should create a unique character that the player will control. We can do that in much the same way we created the other movable entities. Let's call the player object p. We can already move any object, but, a player should have more input than simply moving right. To accommodate this, let's revamp our move function under our GameObject class.

>>> def move(self, up=False, down=False, left=False, right=False):
...   if right:
...       self.pos.right += self.speed
...   if left:
...       self.pos.right -= self.speed
...   if down:
...       self.pos.top += self.speed
...   if up:
...       self.pos.top -= self.speed
...   if self.pos.right > WIDTH:
...       self.pos.left = 0
...   if self.pos.top > HEIGHT-SPRITE_HEIGHT:
...       self.pos.top = 0
...   if self.pos.right < SPRITE_WIDTH:
...       self.pos.right = WIDTH
...   if self.pos.top < 0:
...       self.pos.top = HEIGHT-SPRITE_HEIGHT

There's certainly a lot more going on here, so let's take it one step at a time. First, we've added some default values into the move function, declared as up, down, left, and right. These booleans will allow us to specifically select a direction that the object is moving in. The first part, where we go through and check True for each variable, is where we will add to the position of the object, much like before. Right controls horizontal, and top controls vertical positions.

Additionally, we've removed the magic number present previously, and replaced it with the constants WIDTH, HEIGHT, SPRITE_WIDTH, and SPRITE_HEIGHT. These values represent the screen width and height, along with the width and height of the object displayed on the screen.

The second part, where the position is being checked, ensures that the position is within the confines of our screen. With this in place, we need to make sure that when one of our other objects calls move, we set right to true.

Adding the User Input

We've already seen that pygame has event handling, and we know that KEYDOWN is an event in this loop. We could, under KEYDOWN, assert the key press matches an arrow key, where we would then call move. However, this movement will only occur once every time a key is pressed, and it therefore will be extremely choppy and unpleasant.

For this, we can use pygame.key.get_pressed(), which returns a list of all keys, and whether or not they are currently pressed. Since we want these key presses to be maintained whether an event is currently happening or not, we should put it outside of the main event handling loop, but still within our game loop. Our functionality will look like this.

>>> keys = pygame.key.get_pressed()
>>> if keys[pygame.K_UP]:
...     p.move(up=True)
>>> if keys[pygame.K_DOWN]:
...     p.move(down=True)
>>> if keys[pygame.K_LEFT]:
...     p.move(left=True)
>>> if keys[pygame.K_RIGHT]:
...     p.move(right=True)

We simply get our list of keys pressed, called keys. We can then check the index at the key code position to see if it is held down. For more key codes, I recommend checking out the documentation on pygame.key.

When up is held, we move our object, p, up. When down is held, we move down. Rinse and repeat for all cases, and we're good to go!

Putting it all Together One More time

Now that we're finished with the player functionality, let's take one last look to make sure we understand everything.

>>> screen = pygame.display.set_mode((640, 480))
>>> clock = pygame.time.Clock()            #get a pygame clock object
>>> player = pygame.image.load('player.bmp').convert()
>>> entity = pygame.image.load('alien1.bmp').convert()
>>> background = pygame.image.load('background.bmp').convert()
>>> screen.blit(background, (0, 0))
>>> objects = []
>>> p = GameObject(player, 10, 3)          #create the player object
>>> for x in range(10):                    #create 10 objects</i>
...     o = GameObject(entity, x*40, x)
...     objects.append(o)
>>> while True:
...     screen.blit(background, p.pos, p.pos)
...     for o in objects:
...         screen.blit(background, o.pos, o.pos)
...     keys = pygame.key.get_pressed()
...     if keys[pygame.K_UP]:
...         p.move(up=True)
...     if keys[pygame.K_DOWN]:
...         p.move(down=True)
...     if keys[pygame.K_LEFT]:
...         p.move(left=True)
...     if keys[pygame.K_RIGHT]:
...         p.move(right=True)
...     for event in pygame.event.get():
...         if event.type == pygame.QUIT:
...             sys.exit()
...     screen.blit(p.image, p.pos)
...     for o in objects:
...         o.move()
...         screen.blit(o.image, o.pos)
...     pygame.display.update()
...     clock.tick(60)

A few things not mentioned earlier: we load in a second image and call it entity, and we use that for all objects that aren't the player, which uses the player image defined earlier.

And that's all there is to it! Now we have a fully functional player object that is controlled using the arrow keys!

You Are On Your Own From Here

So what would be next on your road to learning? Well first playing around with this example a bit. The full running version of this example is available in the pygame examples directory. It is the example named moveit.py . Take a look at the code and play with it, run it, learn it.

Things you may want to work on is maybe having more than one type of object. Finding a way to cleanly "delete" objects when you don't want to show them any more. Also updating the display.update() call to pass a list of the areas on-screen that have changed.

There are also other tutorials and examples in pygame that cover these issues. So when you're ready to keep learning, keep on reading. :-)

Lastly, you can feel free to come to the pygame mailing list or chatroom with any questions on this stuff. There's always folks on hand who can help you out with this sort of business.

Lastly, have fun, that's what games are for!




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.1871386 pygame-2.6.1/docs/generated/tut/PygameIntro.html0000644000175100001770000007037514676242425021265 0ustar00runnerdocker Pygame Intro — pygame v2.6.1 documentation

Python Pygame Introduction

Author:

Pete Shinners

Contact:

pete@shinners.org

This article is an introduction to the pygame library for Python programmers. The original version appeared in the PyZine volume 1 issue 3. This version contains minor revisions, to create an all-around better article. Pygame is a Python extension library that wraps the SDL library and its helpers.

HISTORY

Pygame started in the summer of 2000. Being a C programmer of many years, I discovered both Python and SDL at about the same time. You are already familiar with Python, which was at version 1.5.2. You may need an introduction to SDL, which is the Simple DirectMedia Layer. Created by Sam Lantinga, SDL is a cross-platform C library for controlling multimedia, comparable to DirectX. It has been used for hundreds of commercial and open source games. I was impressed at how clean and straightforward both projects were and it wasn't long before I realized mixing Python and SDL was an interesting proposal.

I discovered a small project already under-way with exactly the same idea, PySDL. Created by Mark Baker, PySDL was a straightforward implementation of SDL as a Python extension. The interface was cleaner than a generic SWIG wrapping, but I felt it forced a "C style" of code. The sudden death of PySDL prompted me to take on a new project of my own.

I wanted to put together a project that really took advantage of Python. My goal was to make it easy to do the simple things, and straightforward to do the difficult things. Pygame was started in October, 2000. Six months later pygame version 1.0 was released.

TASTE

I find the best way to understand a new library is to jump straight into an example. In the early days of pygame, I created a bouncing ball animation with 7 lines of code. Let's take a look at a friendlier version of that same thing. This should be simple enough to follow along, and a complete breakdown follows.

../_images/intro_ball.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("intro_ball.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill("black")
    screen.blit(ball, ballrect)
    pygame.display.flip()

This is as simple as you can get for a bouncing animation. First we see importing and initializing pygame is nothing noteworthy. The import pygame imports the package with all the available pygame modules. The call to pygame.init() initializes each of these modules. Make sure the gif file of the bouncing ball is in the same folder as the code block. On line 4 we set the size of the display window, for best results you can change these numbers to match your own monitor's resolution. On line 8 we create a graphical window with the call to pygame.display.set_mode(). Pygame and SDL make this easy by defaulting to the best graphics modes for the graphics hardware. You can override the mode and SDL will compensate for anything the hardware cannot do. Pygame represents images as Surface objects. The display.set_mode() function creates a new Surface object that represents the actual displayed graphics. Any drawing you do to this Surface will become visible on the monitor.

At line 10 we load our ball image. Pygame supports a variety of image formats through the SDL_image library, including BMP, JPG, PNG, TGA, and GIF. The pygame.image.load() function returns us a Surface with the ball data. The Surface will keep any colorkey or alpha transparency from the file. After loading the ball image we create a variable named ballrect. Pygame comes with a convenient utility object type named Rect, which represents a rectangular area. Later, in the animation part of the code, we will see what the Rect objects can do.

At this point, line 13, our program is initialized and ready to run. Inside an infinite loop we check for user input, move the ball, and then draw the ball. If you are familiar with GUI programming, you have had experience with events and event loops. In pygame this is no different, we check if a QUIT event has happened. If so we simply exit the program, pygame will ensure everything is cleanly shutdown.

It is time to update our position for the ball. Lines 17 moves the ballrect variable by the current speed. Lines 18 thru 21 reverse the speed if the ball has moved outside the screen. Not exactly Newtonian physics, but it is all we need.

On line 23 we erase the screen by filling it with a black RGB color. If you have never worked with animations this may seem strange. You may be asking "Why do we need to erase anything, why don't we just move the ball on the screen?" That is not quite the way computer animation works. Animation is nothing more than a series of single images, which when displayed in sequence do a very good job of fooling the human eye into seeing motion. The screen is just a single image that the user sees. If we did not take the time to erase the ball from the screen, we would actually see a "trail" of the ball as we continuously draw the ball in its new positions.

On line 24 we draw the ball image onto the screen. Drawing of images is handled by the Surface.blit() method. A blit basically means copying pixel colors from one image to another. We pass the blit method a source Surface to copy from, and a position to place the source onto the destination.

The last thing we need to do is actually update the visible display. Pygame manages the display with a double buffer. When we are finished drawing we call the pygame.display.flip()Update the full display Surface to the screen method. This makes everything we have drawn on the screen Surface become visible. This buffering makes sure we only see completely drawn frames on the screen. Without it, the user would see the half completed parts of the screen as they are being created.

That concludes this short introduction to pygame. Pygame also has modules to do things like input handling for the keyboard, mouse, and joystick. It can mix audio and decode streaming music. With the Surfaces you can draw simple shapes, rotate and scale the picture, and even manipulate the pixels of an image in realtime as numpy arrays. Pygame also has the ability to act as a cross platform display layer for PyOpenGL. Most of the pygame modules are written in C, few are actually done in Python.

The pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting.

PYTHON AND GAMING

"Is Python suitable for gaming?" The answer is, "It depends on the game."

Python is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer.

../_images/intro_blade.jpg

Over the past several years there has been an interesting trend in game development, the move towards higher level languages. Usually a game is split into two major parts. The game engine, which must be as fast as possible, and the game logic, which makes the engine actually do something. It wasn't long ago when the engine of a game was written in assembly, with portions written in C. Nowadays, C has moved to the game engine, while often the game itself is written in higher level scripting languages. Games like Quake3 and Unreal run these scripts as portable bytecode.

In early 2001, developer Rebel Act Studios finished their game, Severance: Blade of Darkness. Using their own custom 3D engine, the rest of the game is written with Python. The game is a bloody action 3rd person perspective fighter. You control medieval warriors into intricate decapitating combination attacks while exploring dungeons and castles. You can download third party add-ons for this game, and find they are nothing more than Python source files.

More recently, Python has been used in a variety of games like Freedom Force, and Humungous' Backyard Sports Series.

../_images/intro_freedom.jpg

Pygame and SDL serve as an excellent C engine for 2D games. Games will still find the largest part of their runtime is spent inside SDL handling the graphics. SDL can take advantage of graphics hardware acceleration. Enabling this can change a game from running around 40 frames per second to over 200 frames per second. When you see your Python game running at 200 frames per second, you realize that Python and games can work together.

It is impressive how well both Python and SDL work on multiple platforms. For example, in May of 2001 I released my own full pygame project, SolarWolf, an arcade style action game. One thing that has surprised me is that one year later there has been no need for any patches, bug fixes, or updates. The game was developed entirely on windows, but runs on Linux, Mac OSX, and many Unixes without any extra work on my end.

Still, there are very clear limitations. The best way to manage hardware accelerated graphics is not always the way to get fastest results from software rendering. Hardware support is not available on all platforms. When a game gets more complex, it often must commit to one or the other. SDL has some other design limitations, things like full screen scrolling graphics can quickly bring your game down to unplayable speeds. While SDL is not suitable for all types of games, remember companies like Loki have used SDL to run a wide variety of retail quality titles.

Pygame is fairly low-level when it comes to writing games. You'll quickly find yourself needing to wrap common functions into your own game environment. The great thing about this is there is nothing inside pygame to get in your way. Your program is in full control of everything. The side effect of that is you will find yourself borrowing a lot of code to get a more advanced framework put together. You'll need a better understanding of what you are doing.

CLOSING

Developing games is very rewarding, there is something exciting about being able to see and interact with the code you've written. Pygame currently has almost 30 other projects using it. Several of them are ready to play now. You may be surprised to visit the pygame website, and see what other users have been able to do with Python.

One thing that has caught my attention is the amount of people coming to Python for the first time to try game development. I can see why games are a draw for new programmers, but it can be difficult since creating games requires a firmer understanding of the language. I've tried to support this group of users by writing many examples and pygame tutorials for people new to these concepts.

In the end, my advice is to keep it simple. I cannot stress this enough. If you are planning to create your first game, there is a lot to learn. Even a simpler game will challenge your designs, and complex games don't necessarily mean fun games. When you understand Python, you can use pygame to create a simple game in only one or two weeks. From there you'll need a surprising amount of time to add the polish to make that into a full presentable game.

Pygame Modules Overview

cdrom

playback

cursors

load cursor images, includes standard cursors

display

control the display window or screen

draw

draw simple shapes onto a Surface

event

manage events and the event queue

font

create and render TrueType fonts

image

save and load images

joystick

manage joystick devices

key

manage the keyboard

mouse

manage the mouse

sndarray

manipulate sounds with numpy

surfarray

manipulate images with numpy

time

control timing

transform

scale, rotate, and flip images




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.2451384 pygame-2.6.1/docs/generated/tut/SpriteIntro.html0000644000175100001770000012606514676242425021307 0ustar00runnerdocker Pygame Tutorials - Sprite Module Introduction — pygame v2.6.1 documentation

Sprite Module Introduction

Author:

Pete Shinners

Contact:

pete@shinners.org

Pygame version 1.3 comes with a new module, pygame.sprite. This module is written in Python and includes some higher-level classes to manage your game objects. By using this module to its full potential, you can easily manage and draw your game objects. The sprite classes are very optimized, so it's likely your game will run faster with the sprite module than without.

The sprite module is also meant to be very generic. It turns out you can use it with nearly any type of gameplay. All this flexibility comes with a slight penalty, it needs a little understanding to properly use it. The reference documentation for the sprite module can keep you running, but you'll probably need a bit more explanation of how to use pygame.sprite in your own game.

Several of the pygame examples (like "chimp" and "aliens") have been updated to use the sprite module. You may want to look into those first to see what this sprite module is all about. The chimp module even has its own line-by-line tutorial, which may help get more understanding of programming with python and pygame.

Note that this introduction will assume you have a bit of experience programming with python, and are somewhat familiar with the different parts of creating a simple game. In this tutorial the word "reference" is occasionally used. This represents a python variable. Variables in python are references, so you can have several variables all pointing to the same object.

History Lesson

The term "sprite" is a holdover from older computer and game machines. These older boxes were unable to draw and erase normal graphics fast enough for them to work as games. These machines had special hardware to handle game like objects that needed to animate very quickly. These objects were called "sprites" and had special limitations, but could be drawn and updated very fast. They usually existed in special overlay buffers in the video. These days computers have become generally fast enough to handle sprite like objects without dedicated hardware. The term sprite is still used to represent just about anything in a 2D game that is animated.

The Classes

The sprite module comes with two main classes. The first is Sprite, which should be used as a base class for all your game objects. This class doesn't really do anything on its own, it just includes several functions to help manage the game object. The other type of class is Group. The Group class is a container for different Sprite objects. There are actually several different types of group classes. Some of the Groups can draw all the elements they contain, for example.

This is all there really is to it. We'll start with a description of what each type of class does, and then discuss the proper ways to use these two classes.

The Sprite Class

As mentioned before, the Sprite class is designed to be a base class for all your game objects. You cannot really use it on its own, as it only has several methods to help it work with the different Group classes. The sprite keeps track of which groups it belongs to. The class constructor (__init__ method) takes an argument of a Group (or list of Groups) the Sprite instance should belong to. You can also change the Group membership for the Sprite with the add() and remove() methods. There is also a groups() method, which returns a list of the current groups containing the sprite.

When using your Sprite classes it's best to think of them as "valid" or "alive" when they are belonging to one or more Groups. When you remove the instance from all groups pygame will clean up the object. (Unless you have your own references to the instance somewhere else.) The kill() method removes the sprite from all groups it belongs to. This will cleanly delete the sprite object. If you've put some little games together, you'll know sometimes cleanly deleting a game object can be tricky. The sprite also comes with an alive() method, which returns true if it is still a member of any groups.

The Group Class

The Group class is just a simple container. Similar to the sprite, it has an add() and remove() method which can change which sprites belong to the group. You also can pass a sprite or list of sprites to the constructor (__init__() method) to create a Group instance that contains some initial sprites.

The Group has a few other methods like empty() to remove all sprites from the group and copy() which will return a copy of the group with all the same members. Also the has() method will quickly check if the Group contains a sprite or list of sprites.

The other function you will use frequently is the sprites() method. This returns an object that can be looped on to access every sprite the group contains. Currently this is just a list of the sprites, but in later version of python this will likely use iterators for better performance.

As a shortcut, the Group also has an update() method, which will call an update() method on every sprite in the group. Passing the same arguments to each one. Usually in a game you need some function that updates the state of a game object. It's very easy to call your own methods using the Group.sprites() method, but this is a shortcut that's used enough to be included. Also note that the base Sprite class has a "dummy" update() method that takes any sort of arguments and does nothing.

Lastly, the Group has a couple other methods that allow you to use it with the builtin len() function, getting the number of sprites it contains, and the "truth" operator, which allows you to do "if mygroup:" to check if the group has any sprites.

Mixing Them Together

At this point the two classes seem pretty basic. Not doing a lot more than you can do with a simple list and your own class of game objects. But there are some big advantages to using the Sprite and Group together. A sprite can belong to as many groups as you want. Remember as soon as it belongs to no groups, it will usually be cleared up (unless you have other "non-group" references to that object).

The first big thing is a fast simple way to categorize sprites. For example, say we had a Pacman-like game. We could make separate groups for the different types of objects in the game. Ghosts, Pac, and Pellets. When Pac eats a power pellet, we can change the state for all ghost objects by effecting everything in the Ghost group. This is quicker and simpler than looping through a list of all the game objects and checking which ones are ghosts.

Adding and removing groups and sprites from each other is a very fast operation, quicker than using lists to store everything. Therefore you can very efficiently change group memberships. Groups can be used to work like simple attributes for each game object. Instead of tracking some attribute like "close_to_player" for a bunch of enemy objects, you could add them to a separate group. Then when you need to access all the enemies that are near the player, you already have a list of them, instead of going through a list of all the enemies, checking for the "close_to_player" flag. Later on your game could add multiple players, and instead of adding more "close_to_player2", "close_to_player3" attributes, you can easily add them to different groups for each player.

Another important benefit of using the Sprites and Groups is that the groups cleanly handle the deleting (or killing) of game objects. In a game where many objects are referencing other objects, sometimes deleting an object can be the hardest part, since it can't go away until it is not referenced by anyone. Say we have an object that is "chasing" another object. The chaser can keep a simple Group that references the object (or objects) it is chasing. If the object being chased happens to be destroyed, we don't need to worry about notifying the chaser to stop chasing. The chaser can see for itself that its group is now empty, and perhaps find a new target.

Again, the thing to remember is that adding and removing sprites from groups is a very cheap/fast operation. You may be best off by adding many groups to contain and organize your game objects. Some could even be empty for large portions of the game, there isn't any penalties for managing your game like this.

The Many Group Types

The above examples and reasons to use Sprites and Groups are only a tip of the iceberg. Another advantage is that the sprite module comes with several different types of Groups. These groups all work just like a regular old Group, but they also have added functionality (or slightly different functionality). Here's a list of the Group classes included with the sprite module.

Group

This is the standard "no frills" group mainly explained above. Most of the other Groups are derived from this one, but not all.

GroupSingle

This works exactly like the regular Group class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites.

RenderPlain

This is a standard group derived from Group. It has a draw() method that draws all the sprites it contains to the screen (or any Surface). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it.

RenderClear

This is derived from the RenderPlain group, and adds a method named clear(). This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the clear() method is called.

RenderUpdates

This is the Cadillac of rendering Groups. It is inherited from RenderClear, but changes the draw() method to also return a list of pygame Rects, which represent all the areas on screen that have been changed.

That is the list of different groups available We'll discuss more about these rendering groups in the next section. There's nothing stopping you from creating your own Group classes as well. They are just python code, so you can inherit from one of these and add/change whatever you want. In the future I hope we can add a couple more Groups to this list. A GroupMulti which is like the GroupSingle, but can hold up to a given number of sprites (in some sort of circular buffer?). Also a super-render group that can clear the position of the old sprites without needing a background image to do it (by grabbing a copy of the screen before blitting). Who knows really, but in the future we can add more useful classes to this list.

The Rendering Groups

From above we can see there are three different rendering groups. We could probably just get away with the RenderUpdates one, but it adds overhead not really needed for something like a scrolling game. So we have a couple tools here, pick the right one for the right job.

For a scrolling type game, where the background completely changes every frame, we obviously don't need to worry about python's update rectangles in the call to display.update(). You should definitely go with the RenderPlain group here to manage your rendering.

For games where the background is more stationary, you definitely don't want pygame updating the entire screen (since it doesn't need to). This type of game usually involves erasing the old position of each object, then drawing it in a new place for each frame. This way we are only changing what is necessary. Most of the time you will just want to use the RenderUpdates class here. Since you will also want to pass this list of changes to the display.update() function.

The RenderUpdates class also does a good job at minimizing overlapping areas in the list of updated rectangles. If the previous position and current position of an object overlap, it will merge them into a single rectangle. Combined with the fact that it properly handles deleted objects, this is one powerful Group class. If you've written a game that manages the changed rectangles for the objects in a game, you know this is the cause for a lot of messy code in your game. Especially once you start to throw in objects that can be deleted at any time. All this work is reduced to a clear() and draw() method with this monster class. Plus with the overlap checking, it is likely faster than when you did it manually.

Also note that there's nothing stopping you from mixing and matching these render groups in your game. You should definitely use multiple rendering groups when you want to do layering with your sprites. Also if the screen is split into multiple sections, perhaps each section of the screen should use an appropriate render group?

Collision Detection

The sprite module also comes with two very generic collision detection functions. For more complex games, these really won't work for you, but you can easily grab the source code for them, and modify them as needed.

Here's a summary of what they are, and what they do.

spritecollide(sprite, group, dokill, collided = None) -> list

This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the kill() method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop

>>> for bomb in sprite.spritecollide(player, bombs, 1):
...     boom_sound.play()
...     Explosion(bomb, 0)

This finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new Explosion where the bomb was. (Note, the Explosion class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.)

groupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary

This is similar to the spritecollide function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a dokill argument for the sprites in each list. When dokill1 is true, the colliding sprites in group1 will be kill()``ed. When ``dokill2 is true, we get the same results for group2. The dictionary it returns works like this; each key in the dictionary is a sprite from group1 that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best

>>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys():
...     boom_sound.play()
...     Explosion(alien, 0)
...     kills += 1

This code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the values() or items() if we wanted to do something to the specific shots that collided with aliens. If we did loop over the values() we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens".

Those are the basic collision functions that come with pygame. It should be easy to roll your own that perhaps use something different than the "rect" attribute. Or maybe try to fine-tweak your code a little more by directly effecting the collision object, instead of building a list of the collision? The code in the sprite collision functions is very optimized, but you could speed it up slightly by taking out some functionality you don't need.

Common Problems

Currently there is one main problem that catches new users. When you derive your new sprite class with the Sprite base, you must call the Sprite.__init__() method from your own class __init__() method. If you forget to call the Sprite.__init__() method, you get a cryptic error, like this

AttributeError: 'mysprite' instance has no attribute '_Sprite__g'

Extending Your Own Classes (Advanced)

Because of speed concerns, the current Group classes try to only do exactly what they need, and not handle a lot of general situations. If you decide you need extra features, you may want to create your own Group class.

The Sprite and Group classes were designed to be extended, so feel free to create your own Group classes to do specialized things. The best place to start is probably the actual python source code for the sprite module. Looking at the current Sprite groups should be enough example on how to create your own.

For example, here is the source code for a rendering Group that calls a render() method for each sprite, instead of just blitting an "image" variable from it. Since we want it to also handle updated areas, we will start with a copy of the original RenderUpdates group, here is the code:

class RenderUpdatesDraw(RenderClear):
    """call sprite.draw(screen) to render sprites"""
    def draw(self, surface):
        dirty = self.lostsprites
        self.lostsprites = []
        for s, r in self.spritedict.items():
            newrect = s.draw(screen) #Here's the big change
            if r is 0:
                dirty.append(newrect)
            else:
                dirty.append(newrect.union(r))
            self.spritedict[s] = newrect
        return dirty

Following is more information on how you could create your own Sprite and Group objects from scratch.

The Sprite objects only "require" two methods. "add_internal()" and "remove_internal()". These are called by the Group classes when they are removing a sprite from themselves. The add_internal() and remove_internal() have a single argument which is a group. Your Sprite will need some way to also keep track of the Groups it belongs to. You will likely want to try to match the other methods and arguments to the real Sprite class, but if you're not going to use those methods, you sure don't need them.

It is almost the same requirements for creating your own Group. In fact, if you look at the source you'll see the GroupSingle isn't derived from the Group class, it just implements the same methods so you can't really tell the difference. Again you need an "add_internal()" and "remove_internal()" method that the sprites call when they want to belong or remove themselves from the group. The add_internal() and remove_internal() have a single argument which is a sprite. The only other requirement for the Group classes is they have a dummy attribute named "_spritegroup". It doesn't matter what the value is, as long as the attribute is present. The Sprite classes can look for this attribute to determine the difference between a "group" and any ordinary python container. (This is important, because several sprite methods can take an argument of a single group, or a sequence of groups. Since they both look similar, this is the most flexible way to "see" the difference.)

You should go through the code for the sprite module. While the code is a bit "tuned", it's got enough comments to help you follow along. There's even a TODO section in the source if you feel like contributing.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.3101382 pygame-2.6.1/docs/generated/tut/SurfarrayIntro.html0000644000175100001770000014233614676242425022016 0ustar00runnerdocker Pygame Tutorials - Surfarray Introduction — pygame v2.6.1 documentation

Surfarray Introduction

Author:

Pete Shinners

Contact:

pete@shinners.org

Introduction

This tutorial will attempt to introduce users to both NumPy and the pygame surfarray module. To beginners, the code that uses surfarray can be quite intimidating. But actually there are only a few concepts to understand and you will be up and running. Using the surfarray module, it becomes possible to perform pixel level operations from straight python code. The performance can become quite close to the level of doing the code in C.

You may just want to jump down to the "Examples" section to get an idea of what is possible with this module, then start at the beginning here to work your way up.

Now I won't try to fool you into thinking everything is very easy. To get more advanced effects by modifying pixel values is very tricky. Just mastering NumPy takes a lot of learning. In this tutorial I'll be sticking with the basics and using a lot of examples in an attempt to plant seeds of wisdom. After finishing the tutorial you should have a basic handle on how the surfarray works.

NumPy

If you do not have the python NumPy package installed, you will need to do that now, by following the NumPy Installation Guide. To make sure NumPy is working for you, you should get something like this from the interactive python prompt.

>>> from numpy import *                    #import numeric
>>> a = array((1,2,3,4,5))                 #create an array
>>> a                                      #display the array
array([1, 2, 3, 4, 5])
>>> a[2]                                   #index into the array
3
>>> a*2                                    #new array with twiced values
array([ 2,  4,  6,  8, 10])

As you can see, the NumPy module gives us a new data type, the array. This object holds an array of fixed size, and all values inside are of the same type. The arrays can also be multidimensional, which is how we will use them with images. There's a bit more to it than this, but it is enough to get us started.

If you look at the last command above, you'll see that mathematical operations on NumPy arrays apply to all values in the array. This is called "element-wise operations". These arrays can also be sliced like normal lists. The slicing syntax is the same as used on standard python objects. (so study up if you need to :] ). Here are some more examples of working with arrays.

>>> len(a)                                 #get array size
5
>>> a[2:]                                  #elements 2 and up
array([3, 4, 5])
>>> a[:-2]                                 #all except last 2
array([1, 2, 3])
>>> a[2:] + a[:-2]                         #add first and last
array([4, 6, 8])
>>> array((1,2,3)) + array((3,4))          #add arrays of wrong sizes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: operands could not be broadcast together with shapes (3,) (2,)

We get an error on the last command, because we try add together two arrays that are different sizes. In order for two arrays two operate with each other, including comparisons and assignment, they must have the same dimensions. It is very important to know that the new arrays created from slicing the original all reference the same values. So changing the values in a slice also changes the original values. It is important how this is done.

>>> a                                      #show our starting array
array([1, 2, 3, 4, 5])
>>> aa = a[1:3]                            #slice middle 2 elements
>>> aa                                     #show the slice
array([2, 3])
>>> aa[1] = 13                             #chance value in slice
>>> a                                      #show change in original
array([ 1, 2, 13,  4,  5])
>>> aaa = array(a)                         #make copy of array
>>> aaa                                    #show copy
array([ 1, 2, 13,  4,  5])
>>> aaa[1:4] = 0                           #set middle values to 0
>>> aaa                                    #show copy
array([1, 0, 0, 0, 5])
>>> a                                      #show original again
array([ 1, 2, 13,  4,  5])

Now we will look at small arrays with two dimensions. Don't be too worried, getting started it is the same as having a two dimensional tuple (a tuple inside a tuple). Let's get started with two dimensional arrays.

>>> row1 = (1,2,3)                         #create a tuple of vals
>>> row2 = (3,4,5)                         #another tuple
>>> (row1,row2)                            #show as a 2D tuple
((1, 2, 3), (3, 4, 5))
>>> b = array((row1, row2))                #create a 2D array
>>> b                                      #show the array
array([[1, 2, 3],
       [3, 4, 5]])
>>> array(((1,2),(3,4),(5,6)))             #show a new 2D array
array([[1, 2],
       [3, 4],
       [5, 6]])

Now with this two dimensional array (from now on as "2D") we can index specific values and do slicing on both dimensions. Simply using a comma to separate the indices allows us to lookup/slice in multiple dimensions. Just using ":" as an index (or not supplying enough indices) gives us all the values in that dimension. Let's see how this works.

>>> b                                      #show our array from above
array([[1, 2, 3],
       [3, 4, 5]])
>>> b[0,1]                                 #index a single value
2
>>> b[1,:]                                 #slice second row
array([3, 4, 5])
>>> b[1]                                   #slice second row (same as above)
array([3, 4, 5])
>>> b[:,2]                                 #slice last column
array([3, 5])
>>> b[:,:2]                                #slice into a 2x2 array
array([[1, 2],
       [3, 4]])

Ok, stay with me here, this is about as hard as it gets. When using NumPy there is one more feature to slicing. Slicing arrays also allow you to specify a slice increment. The syntax for a slice with increment is start_index : end_index : increment.

>>> c = arange(10)                         #like range, but makes an array
>>> c                                      #show the array
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> c[1:6:2]                               #slice odd values from 1 to 6
array([1, 3, 5])
>>> c[4::4]                                #slice every 4th val starting at 4
array([4, 8])
>>> c[8:1:-1]                              #slice 1 to 8, reversed
array([8, 7, 6, 5, 4, 3, 2])

Well that is it. There's enough information there to get you started using NumPy with the surfarray module. There's certainly a lot more to NumPy, but this is only an introduction. Besides, we want to get on to the fun stuff, correct?

Import Surfarray

In order to use the surfarray module we need to import it. Since both surfarray and NumPy are optional components for pygame, it is nice to make sure they import correctly before using them. In these examples I'm going to import NumPy into a variable named N. This will let you know which functions I'm using are from the NumPy package. (and is a lot shorter than typing NumPy before each function)

try:
    import numpy as N
    import pygame.surfarray as surfarray
except ImportError:
    raise ImportError, "NumPy and Surfarray are required."

Surfarray Introduction

There are two main types of functions in surfarray. One set of functions for creating an array that is a copy of a surface pixel data. The other functions create a referenced copy of the array pixel data, so that changes to the array directly affect the original surface. There are other functions that allow you to access any per-pixel alpha values as arrays along with a few other helpful functions. We will look at these other functions later on.

When working with these surface arrays, there are two ways of representing the pixel values. First, they can be represented as mapped integers. This type of array is a simple 2D array with a single integer representing the surface's mapped color value. This type of array is good for moving parts of an image around. The other type of array uses three RGB values to represent each pixel color. This type of array makes it extremely simple to do types of effects that change the color of each pixel. This type of array is also a little trickier to deal with, since it is essentially a 3D numeric array. Still, once you get your mind into the right mode, it is not much harder than using the normal 2D arrays.

The NumPy module uses a machine's natural number types to represent the data values, so a NumPy array can consist of integers that are 8-bits, 16-bits, and 32-bits. (the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types). Because of this limitation of integer sizes, you must take a little extra care that the type of arrays that reference pixel data can be properly mapped to a proper type of data. The functions create these arrays from surfaces are:

surfarray.pixels2d(surface)

Creates a 2D array (integer pixel values) that reference the original surface data. This will work for all surface formats except 24-bit.

surfarray.array2d(surface)

Creates a 2D array (integer pixel values) that is copied from any type of surface.

surfarray.pixels3d(surface)

Creates a 3D array (RGB pixel values) that reference the original surface data. This will only work on 24-bit and 32-bit surfaces that have RGB or BGR formatting.

surfarray.array3d(surface)

Creates a 3D array (RGB pixel values) that is copied from any type of surface.

Here is a small chart that might better illustrate what types of functions should be used on which surfaces. As you can see, both the arrayXD functions will work with any type of surface.

32-bit

24-bit

16-bit

8-bit(c-map)

pixel2d

yes

yes

yes

array2d

yes

yes

yes

yes

pixel3d

yes

yes

array3d

yes

yes

yes

yes

Examples

With this information, we are equipped to start trying things with surface arrays. The following are short little demonstrations that create a NumPy array and display them in pygame. These different tests are found in the arraydemo.py example. There is a simple function named surfdemo_show that displays an array on the screen.

allblack
allblack = N.zeros((128, 128))
surfdemo_show(allblack, 'allblack')

Our first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the zeros function. Here we create a 2D array of all zeros and display it.

striped
striped = N.zeros((128, 128, 3))
striped[:] = (255, 0, 0)
striped[:,::3] = (0, 255, 255)
surfdemo_show(striped, 'striped')

Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer.

rgbarray
imgsurface = pygame.image.load('surfarray.png')
rgbarray = surfarray.array3d(imgsurface)
surfdemo_show(rgbarray, 'rgbarray')

Here we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the mapped (raw) surface pixels. We will use this image in the rest of the samples.

flipped
flipped = rgbarray[:,::-1]
surfdemo_show(flipped, 'flipped')

Here we flip the image vertically. All we need to do is take the original image array and slice it using a negative increment.

scaledown
scaledown = rgbarray[::2,::2]
surfdemo_show(scaledown, 'scaledown')

Based on the last example, scaling an image down is pretty logical. We just slice out all the pixels using an increment of 2 vertically and horizontally.

scaleup
shape = rgbarray.shape
scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2]))
scaleup[::2,::2,:] = rgbarray
scaleup[1::2,::2,:] = rgbarray
scaleup[:,1::2] = scaleup[:,::2]
surfdemo_show(scaleup, 'scaleup')

Scaling the image up is a little more work, but is similar to the previous scaling down, we do it all with slicing. First we create an array that is double the size of our original. First we copy the original array into every other pixel of the new array. Then we do it again for every other pixel doing the odd columns. At this point we have the image scaled properly going across, but every other row is black, so we simply need to copy each row to the one underneath it. Then we have an image doubled in size.

redimg
redimg = N.array(rgbarray)
redimg[:,:,1:] = 0
surfdemo_show(redimg, 'redimg')

Now we are using 3D arrays to change the colors. Here we set all the values in green and blue to zero. This leaves us with just the red channel.

soften
factor = N.array((8,), N.int32)
soften = N.array(rgbarray, N.int32)
soften[1:,:]  += rgbarray[:-1,:] * factor
soften[:-1,:] += rgbarray[1:,:] * factor
soften[:,1:]  += rgbarray[:,:-1] * factor
soften[:,:-1] += rgbarray[:,1:] * factor
soften //= 33
surfdemo_show(soften, 'soften')

Here we perform a 3x3 convolution filter that will soften our image. It looks like a lot of steps here, but what we are doing is shifting the image 1 pixel in each direction and adding them all together (with some multiplication for weighting). Then average all the values. It's no Gaussian, but it's fast. One point with NumPy arrays, the precision of arithmetic operations is determined by the array with the largest data type. So if factor was not declared as a 1 element array of type numpy.int32, the multiplications would be performed using numpy.int8, the 8 bit integer type of each rgbarray element. This will cause value truncation. The soften array must also be declared to have a larger integer size than rgbarray to avoid truncation.

xfade
src = N.array(rgbarray)
dest = N.zeros(rgbarray.shape)
dest[:] = 20, 50, 100
diff = (dest - src) * 0.50
xfade = src + diff.astype(N.uint)
surfdemo_show(xfade, 'xfade')

Lastly, we are cross fading between the original image and a solid bluish image. Not exciting, but the dest image could be anything, and changing the 0.50 multiplier will let you choose any step in a linear crossfade between two images.

Hopefully by this point you are starting to see how surfarray can be used to perform special effects and transformations that are only possible at the pixel level. At the very least, you can use the surfarray to do a lot of Surface.set_at() Surface.get_at() type operations very quickly. But don't think you are finished yet, there is still much to learn.

Surface Locking

Like the rest of pygame, surfarray will lock any Surfaces it needs to automatically when accessing pixel data. There is one extra thing to be aware of though. When creating the pixel arrays, the original surface will be locked during the lifetime of that pixel array. This is important to remember. Be sure to "del" the pixel array or let it go out of scope (ie, when the function returns, etc).

Also be aware that you really don't want to be doing much (if any) direct pixel access on hardware surfaces (HWSURFACE). This is because the actual surface data lives on the graphics card, and transferring pixel changes over the PCI/AGP bus is not fast.

Transparency

The surfarray module has several methods for accessing a Surface's alpha/colorkey values. None of the alpha functions are affected by overall transparency of a Surface, just the pixel alpha values. Here's the list of those functions.

surfarray.pixels_alpha(surface)

Creates a 2D array (integer pixel values) that references the original surface alpha data. This will only work on 32-bit images with an 8-bit alpha component.

surfarray.array_alpha(surface)

Creates a 2D array (integer pixel values) that is copied from any type of surface. If the surface has no alpha values, the array will be fully opaque values (255).

surfarray.array_colorkey(surface)

Creates a 2D array (integer pixel values) that is set to transparent (0) wherever that pixel color matches the Surface colorkey.

Other Surfarray Functions

There are only a few other functions available in surfarray. You can get a better list with more documentation on the surfarray reference page. There is one very useful function though.

surfarray.blit_array(surface, array)

This will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized.

More Advanced NumPy

There's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation "in place". For example, you would want to replace screen[:] = screen + brightmap with the much faster add(screen, brightmap, screen). Anyway, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays.

Another thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8-bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8-bit numbers and 32-bit numbers will give a result as 32-bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception.

Lastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating.

Graduation

Well there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some "flame" demos floating around that use surfarray to create a realtime fire effect.

Best of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.3411381 pygame-2.6.1/docs/generated/tut/chimp.py.html0000644000175100001770000010642014676242425020545 0ustar00runnerdocker pygame/examples/chimp.py — pygame v2.6.1 documentation
#!/usr/bin/env python
""" pygame.examples.chimp

This simple example is used for the line-by-line tutorial
that comes with pygame. It is based on a 'popular' web banner.
Note there are comments here, but for the full explanation,
follow along in the tutorial.
"""


# Import Modules
import os
import pygame as pg

if not pg.font:
    print("Warning, fonts disabled")
if not pg.mixer:
    print("Warning, sound disabled")

main_dir = os.path.split(os.path.abspath(__file__))[0]
data_dir = os.path.join(main_dir, "data")


# functions to create our resources
def load_image(name, colorkey=None, scale=1):
    fullname = os.path.join(data_dir, name)
    image = pg.image.load(fullname)
    image = image.convert()

    size = image.get_size()
    size = (size[0] * scale, size[1] * scale)
    image = pg.transform.scale(image, size)

    if colorkey is not None:
        if colorkey == -1:
            colorkey = image.get_at((0, 0))
        image.set_colorkey(colorkey, pg.RLEACCEL)
    return image, image.get_rect()


def load_sound(name):
    class NoneSound:
        def play(self):
            pass

    if not pg.mixer or not pg.mixer.get_init():
        return NoneSound()

    fullname = os.path.join(data_dir, name)
    sound = pg.mixer.Sound(fullname)

    return sound


# classes for our game objects
class Fist(pg.sprite.Sprite):
    """moves a clenched fist on the screen, following the mouse"""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("fist.png", -1)
        self.fist_offset = (-235, -80)
        self.punching = False

    def update(self):
        """move the fist based on the mouse position"""
        pos = pg.mouse.get_pos()
        self.rect.topleft = pos
        self.rect.move_ip(self.fist_offset)
        if self.punching:
            self.rect.move_ip(15, 25)

    def punch(self, target):
        """returns true if the fist collides with the target"""
        if not self.punching:
            self.punching = True
            hitbox = self.rect.inflate(-5, -5)
            return hitbox.colliderect(target.rect)

    def unpunch(self):
        """called to pull the fist back"""
        self.punching = False


class Chimp(pg.sprite.Sprite):
    """moves a monkey critter across the screen. it can spin the
    monkey when it is punched."""

    def __init__(self):
        pg.sprite.Sprite.__init__(self)  # call Sprite initializer
        self.image, self.rect = load_image("chimp.png", -1, 4)
        screen = pg.display.get_surface()
        self.area = screen.get_rect()
        self.rect.topleft = 10, 90
        self.move = 18
        self.dizzy = False

    def update(self):
        """walk or spin, depending on the monkeys state"""
        if self.dizzy:
            self._spin()
        else:
            self._walk()

    def _walk(self):
        """move the monkey across the screen, and turn at the ends"""
        newpos = self.rect.move((self.move, 0))
        if not self.area.contains(newpos):
            if self.rect.left < self.area.left or self.rect.right > self.area.right:
                self.move = -self.move
                newpos = self.rect.move((self.move, 0))
                self.image = pg.transform.flip(self.image, True, False)
        self.rect = newpos

    def _spin(self):
        """spin the monkey image"""
        center = self.rect.center
        self.dizzy = self.dizzy + 12
        if self.dizzy >= 360:
            self.dizzy = False
            self.image = self.original
        else:
            rotate = pg.transform.rotate
            self.image = rotate(self.original, self.dizzy)
        self.rect = self.image.get_rect(center=center)

    def punched(self):
        """this will cause the monkey to start spinning"""
        if not self.dizzy:
            self.dizzy = True
            self.original = self.image


def main():
    """this function is called when the program starts.
    it initializes everything it needs, then runs in
    a loop until the function returns."""
    # Initialize Everything
    pg.init()
    screen = pg.display.set_mode((1280, 480), pg.SCALED)
    pg.display.set_caption("Monkey Fever")
    pg.mouse.set_visible(False)

    # Create The Background
    background = pg.Surface(screen.get_size())
    background = background.convert()
    background.fill((170, 238, 187))

    # Put Text On The Background, Centered
    if pg.font:
        font = pg.font.Font(None, 64)
        text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10))
        textpos = text.get_rect(centerx=background.get_width() / 2, y=10)
        background.blit(text, textpos)

    # Display The Background
    screen.blit(background, (0, 0))
    pg.display.flip()

    # Prepare Game Objects
    whiff_sound = load_sound("whiff.wav")
    punch_sound = load_sound("punch.wav")
    chimp = Chimp()
    fist = Fist()
    allsprites = pg.sprite.RenderPlain((chimp, fist))
    clock = pg.time.Clock()

    # Main Loop
    going = True
    while going:
        clock.tick(60)

        # Handle Input Events
        for event in pg.event.get():
            if event.type == pg.QUIT:
                going = False
            elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE:
                going = False
            elif event.type == pg.MOUSEBUTTONDOWN:
                if fist.punch(chimp):
                    punch_sound.play()  # punch
                    chimp.punched()
                else:
                    whiff_sound.play()  # miss
            elif event.type == pg.MOUSEBUTTONUP:
                fist.unpunch()

        allsprites.update()

        # Draw Everything
        screen.blit(background, (0, 0))
        allsprites.draw(screen)
        pg.display.flip()

    pg.quit()


# Game Over


# this calls the 'main' function when this script is executed
if __name__ == "__main__":
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9781258 pygame-2.6.1/docs/generated/tut/en/0000755000175100001770000000000014676242436016531 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9791257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/0000755000175100001770000000000014676242436021037 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/1.Prolog/0000755000175100001770000000000014676242436022440 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.3571382 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/1.Prolog/introduction.html0000644000175100001770000002175114676242425026053 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

As we know, every kind of game has 3 sections (Because game is a subgroup of program): input, process and output. If you want to make a game in C console environment (Write C source code then execute that on the console) simply, all you have to do is just using lots of scanf(or unnormalized getch function) functions and procedural complex algorithm followed by printf(with blinking clear function) functions with ASCII arts! However, when you get bored of making outdated, graphic-less CUI, discontinuous game, now it’s time to learn GUI based game making tool. You can directly enter into Unity game engine or Unreal game engine. However, there are too much barrier to overcome. Quaternion for 3D collision, Mechanim/Legacy animation compatibility, Larger memory/Faster CPU for simulate in high-graphic mod, and etc! So, there is a dilemma between console environment and game engine. Can this dilemma to be solved?

../../../../_images/introduction-PuyoPuyo.png

Example of C console game - PuyoPuyo

../../../../_images/introduction-TPS.png

Example of Unity Engine game - TPS

Yes. Pygame can solve that. Pygame is an external library of Python which enables you to make a game. Pygame has advantages of console environment. For example, single pygame project nearly equals single source code, so we have to focus on writing source code only. (with some sound file or some image file in the same directory). Because Pygame is not a tool but a library, single command “import pygame” makes current source code to use pygame’s everything. That is, Pygame is simple to access. Pygame has advantages of game engine, too. For example, Pygame provide input functions (which check every possible state of keyboard, mouse and even files) and output functions (drawing geometry, fill certain colors or set display) to user. That is, user can run the program on the GUI environment if it based on Pygame. Because Pygame is based on Python, functions in Pygame project can be executed selectively, even almost simultaneously. That is, Pygame is event-driven.

../../../../_images/introduction-Battleship.png

Example of Pygame - Battleship

So, Pygame has both good point of console environment (example of low-level game maker) and game engine (example of high-level game maker). Pygame is good intersection between console environment to game engine. That’s enough to use Pygame. No need to master it (if your dream is one-man game developer in advanced game engine, start to learn about that game engine right now!), but at least, try Pygame. (if you are interested in any kind of unique program including game maker or if you want to code any game on advanced environment aside from console environment)




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/2.Print_text/0000755000175100001770000000000014676242436023337 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.385138 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.html0000644000175100001770000004521314676242425030211 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

As I said, Pygame is based on GUI environment. Furthermore, Pygame is good for making 2D game because of its input/output format. So, you have to say good-bye for print or input standard function of Python (Because they work only on CUI environment). Then, what functions in Pygame replace these functions? First, we have to go back to friendly “Hello World!” project, which is learning about basic template and output. (Requiring any font file(.ttf) in the same project directory)

../../../../_images/Basic-ouput-sourcecode.png ../../../../_images/Bagic-ouput-result-screen.png

Source Code for Hello World Project and its result screen

Wow, it’s complicated in compare to python’s print(“Hello World”) (Just a single line command). It’s because text in GUI environment has 5 components: text contents, font, size, color and location. If you want to print any text into screen, you have to set other 4 components, not only string (unless when it is in GUI environment). Only pygame.display.set_caption(“Hello World Project”) function in #7 do the same function as python’s print(“Hello World Project”). The only difference is that output string is always on window caption (title of current program)

First, look at the template of source code before understanding how to output something, source code can be dived into 4 sections: Header(#1-#2), Initial statement(#3-#12), Always statement(#13-#20) and Event statement(#16-#19).

In Header, importing modules will be executed. import pygame, sys is always needed. Needless to say, because this is pygame project and game has to be terminated when player want to exit(sys.exit() at #19). from pygame.locals import* is also necessary to use useful constants just like QUIT at #17. In Initial statement (commands before infinite loop), some global values will be initialized and some functions will be called for one time. Global values just like colors has to be initialized here in order to increase readability. Remember, this is GUI which is colorful. Color has three components: red, green and blue. So, color value has to be initialized just like red = (255, 0, 0). Function named pygame.init() must be called preceding to other pygame functions. Then other pygame functions can be executed. (Other pygame functions will be explained later.)

In Always statement (commands within infinite loop), some global values will be updated routinely and some functions will be called routinely unless they are enclosed into conditional statement. Function named pygame.display.update() should be called after every processes are done. Because this function is printing the results of processes onto screen(=monitor). If this function is not executed in the last part of Always statement, there will be a probability that current screen and internal data does not match. (Other pygame functions will be explained later.)

In Event statement (commands within loop which check every possible events), there will be suitable conditional statements when certain event is triggered. pygame.event.get() function returns a list of events occurred by processes in Always statement. And this list is automatically arranged by time (oldest to newest). So, using for-in statement, every triggered event caused by Always statement can be resolved procedurally. (Remind that this is the trait of event-driven.) For example, commands in #17-#19 will deal with QUIT event. In this case, pygame will be terminated then system will be terminated because system must be terminated after pygame is terminated! (Other events will be explained later.)

Regarding this template is fixed, then we can add special functions in correct place to print “Hello World!”. First, we need to set font and size. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) function at #9 will set not only font by ttf file but also size (32). Return value of this function need to be stored into object(= myTextFont). Then member function of myTextFont named render(“Hello World!”, True, red, green) at #10 will return a value(= myText). render function can set text contents and color**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location will be center of the screen.

But how to determine where is the center of screen? First, we have to decide the range of screen, by using pygame.display.set_mode((640,480)) in #8, canvas(where all values which has size, color, position will be drawn when display.update is called) will be generated and its size becomes 640 x 480. Then, its center is exactly (320,240). If the total size is given, we can decide any position even accounting some margin with little calculation (Remind that in 2D GUI, everything has x and y which has to be printed) (Just like turtle graphic, if it goes right, x increases, if it goes down, y increase. Don’t confused!). And we know that all functions I mentioned will be putted into Initial statement, because this information are fixed while the program go on. Although everything is fixed, we have to design that fill and blit functions to be putted into Always statement, because of these functions’ trait. fill(white) function in #14 means filling canvas by single color(white). blit(myText, myTextArea) function in #15 means drawing specific object(= myText) on specific location(= myTextArea) of canvas. Notice that drawing(blit) has to be done after filling(fill). When everything is drawn on canvas, result of canvas will be display onto window when display.update is executed.

That was the explanation of the entire source code, which has 20 lines. It seems it takes too much time to understand source code with only 20 lines. However, adding or changing from this source code is not that hard because we understand the template of this source code and step of printing. What about adding process logic in this source code? That will be next project.

<Reference Code>

import pygame, sys #1
from pygame.locals import* #2

white = (255,255,255) #3
red = (255,0,0) #4
green = (0,255,0) #5
pygame.init() #6
pygame.display.set_caption("Hello World Project") #7
myScreen = pygame.display.set_mode((640, 480)) #8
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9
myText = myTextFont.render("Hello World!", True, red, green) #10
myTextArea = myText.get_rect() #11
myTextArea.center = (320, 240) #12

while True: #13
    myScreen.fill(white) #14
    myScreen.blit(myText, myTextArea) #15

    for event in pygame.event.get(): #16
        if event.type == QUIT: #17
            pygame.quit() #18
            sys.exit() #19

    pygame.display.update() #20



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/3.Move_text/0000755000175100001770000000000014676242436023152 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.408138 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/3.Move_text/Basic PROCESS.html0000644000175100001770000004260114676242425026161 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

Previous project looks like a single image instead of game. Because there is no input neither process to control output. Of course, clicking exit button on window is not counted because it is just shutting down the entire program. First, we will let text “Hello World!” to move automatically (and now project will be looks like an animation rather than single image), which means adding first processing logic on this project. How to move text? We know that location of text is initialized in Initial statement. So, location of text should be updated in Always statement, with adding some variable to process something.

../../../../_images/Bagic-PROCESS-sourcecode.png ../../../../_images/Bagic-PROCESS-resultscreen.png

(Source Code for Moving World Project and its result screen)

(Not the entire source code of Moving World Project, but part)

(Moving World! moves automatically just like Arkanoid ball or DVD screensaver.)

New line #1 - #5 were appended at the end of Initial statement. Also, multiple if-else phases (#6 - #9) were inserted at the beginning of Always statement, with line #11 at the end of always statements. We can understand what commands of #2 - #10 do. They just change variables for position of “Moving World” when Always statement being started. But there is a problem. How fast is “Moving World?” It is sure that displacement of “Moving World” is sqrt(2) (simple Pythagorean equation). But how often displacement of “Moving World” is changed? It can’t be determined without calculating time complexity of Always statement! (Because it depends on how often Always statement being started) And time complex will be differ to computer to computer, so can’t be fixed.

We need to add the conception of fixed speed into this project. How? Look at #1 and #11. There is pygame.time.Clock() on Initial statement and tick(60) on Always statement. 60 means FPS (frame rate per second). We know that FPS means how often display is changed in 1 second. What function means change (= update) display in pygame? That’s right. Pygame.display.update() function. So, FPS means how often Always statement being executed in 1 second. Because there is 1 Pygame.display.update() function in 1 always statements. (So, FPS means selective delay according to current program’s process speed, not selective acceleration, so FPS cannot work if FPS is too high.) If we let fps(= time) to be fixed in this project, we can change velocity of certain game object by finding appropriate value for displacement. pygame.time.Clock() is needed to fix the speed of project before game started. Notice that tick function has to be called when Pygame.display.update() is called. Because tick counts the number of update function. It is one of the exception of function that can be executed after Pygame.display.update().

Okay, we learn that “Fixing time” is needed when screen is updated. Every screen of dynamic game is frequently changed unless it is static game. So, we have to know that. However, this project isn’t look like a game because its result can be anticipated easily (there is no input to change result) Now, input logic will be inserted.

<Reference Code>

import pygame, sys
from pygame.locals import*

white = (255,255,255)
red = (255,0,0)
green = (0,255,0)
pygame.init()
pygame.display.set_caption("Moving World Project")
myScreen = pygame.display.set_mode((640, 480))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render("Moving World!", True, red, green)
myTextArea = myText.get_rect()
myTextArea.center = (320, 240)
fpsClock = pygame.time.Clock() #1
x = 0 #2
y = 0 #3
moveRight = 1 #4
moveUp= 1 #5

while True:
    if (moveRight == 1): #6
        x = x + 1
        if (x >= 320 - 75):
            moveRight = 0
    elif (moveRight == 0): #7
        x = x - 1
        if (x <= -320 + 75):
            moveRight = 1

    if (moveUp == 1): #8
        y = y + 1
        if (y >= 240 - 15):
            moveUp = 0
    elif (moveUp == 0): #9
        y = y - 1
        if (y <= -240 + 15):
            moveUp = 1



myTextArea.center = (320 + x, 240 + y) #10

myScreen.fill(white)
myScreen.blit(myText, myTextArea)

for event in pygame.event.get():
    if event.type == QUIT:
        pygame.quit()
        sys.exit()

pygame.display.update()
fpsClock.tick(60) #11



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/4.Control_text/0000755000175100001770000000000014676242436023665 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.4331381 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/4.Control_text/Basic INPUT.html0000644000175100001770000004400014676242425026450 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

Usually, we learn how to output something first (Think about Hello World!), learning how to input something is always second. Why? Because input is not the requirement for some program in contrast to output is the requirement for every program. (That’s definition of program. more than or same as 0 input, more than or same as 1 output.) However, every game needs input. That’s why we said “I like playing games”. Playing means moving your part of body (maybe your finger). Anyway, let’s add input logic to make this project into real game.

../../../../_images/Bagic-INPUT-sourcecode.png ../../../../_images/Bagic-INPUT-resultscreen.png

(Source Code for Controlling World Project and its result screen)

(Not the entire source code of Controlling World Project, but part)

(Controlling World! moves when player press one of four direction arrow of keyboard)

There are 2 big difference in comparison to before project. First big difference is line #5, which adds checking KEYDOWN event is triggered or not. Other lines are just changing previous algorithm to act differently. We know that same command can make big difference in entire program when it is executed before Event statement of after Event statement. Pay attention that process about changing location appear after Event statement. (Update after set. That is second big difference). Variable event.key means latest pressed key on keyboard. Look at the specific key name. K_UP, K_LEFT, K_DOWN, K_RIGHT. Very intuitive K_ series. (Given by pygame.locals which we added at the Header) Furthermore, there are other key named K_8, K_a, K_L, K_LCTRL, K_DELETE, or K_F4. We can understand meaning of these keys without extra explanation. Full key list can be found in https://www.pygame.org/docs/ref/key.html#pygame.key.name.

Notice that KEYDOWN means “this key was not pressed before, but now is pressed” and meaning of “hold” is not included here. In the case of hold, new event-handling about checking KEYUP (it means “this key was pressed before, but now is not pressed”) is needed with some processing (which needs extra variable and algorithm). This will be mentioned at advanced part.

Adding input was easy because it’s just adding if phase with certain event parameter. Now game project is done because project has output, process and input step-by-step! Really? No. This project can’t be called as a game because there is no interaction between at least two game objects, no rule for playing this (neither constrains (ex. HP, time) nor score). Mostly, not enjoyable (no motivation, no variety of input and output, no attractive contents) Firstly, we have to learn more advanced input (for example, handling for mouse status), process (for example, idea for functionalization) and output (for example, printing image/sound or visualizing internal data) to flourish game interface/system. Don’t stay in the level of printing const text or inputting single pressed key. Of course, experiences of this level are surely helpful for advanced level. So, let’s go to advanced level!

<Reference Code>

import pygame, sys
from pygame.locals import*

white = (255,255,255)
red = (255,0,0)
green = (0,255,0)
pygame.init()
pygame.display.set_caption("Controlling World Project")
myScreen = pygame.display.set_mode((640, 480))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render("Controlling World!", True, red, green)
myTextArea = myText.get_rect()
myTextArea.center = (320, 240)
fpsClock = pygame.time.Clock()
x = 0
y = 0
moveRight = 0 #1
moveDown = 0 #2

while True:
    moveRight = 0 #3
    moveDown = 0 #4
    myTextArea.center = (320 + x, 240 + y)
    myScreen.fill(white)
    myScreen.blit(myText, myTextArea)

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()
        elif event.type == KEYDOWN: #5
            if event.key == K_UP:
                moveDown = -1
                moveRight = 0
            elif event.key == K_LEFT:
                moveDown = 0
                moveRight = -1
            elif event.key == K_DOWN:
                moveDown = 1
                moveRight = 0
            elif event.key == K_RIGHT:
                moveDown = 0
                moveRight = 1

    if(moveRight == 1): #6
        x = x + 10
    elif(moveRight == -1): #7
        x = x - 10
    if(moveDown == 1): #8
        y = y + 10
    elif(moveDown == -1): #9
        y = y - 10

    pygame.display.update()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/5.HP_bar/0000755000175100001770000000000014676242436022335 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.455138 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.html0000644000175100001770000004714014676242425031476 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

First, Let’s print visualized geometry, not text. How about HP bar? If max HP of game is fixed and current HP of game can vary from 0 to max HP, what will be simplest way to print both two data?

../../../../_images/AdvancedOutputProcess1.gif ../../../../_images/AdvancedOutputProcess2.gif ../../../../_images/AdvancedOutputProcess3.gif

Yeah, just re-rendering text when certain variable is changed. How to change variable? That logic is inside of Event statement. (Pressing up or down to adjust HP.) Same method as before. But they are still text, which means they are not visualized enough. How to visualize these two data more detail (max HP, current HP)? We can use idea of magazine (gun’s magazine). HP is integer value, which is discrete. So, it can be printed as below:

../../../../_images/AdvancedOutputProcess4.gif ../../../../_images/AdvancedOutputProcess5.gif ../../../../_images/AdvancedOutputProcess6.gif

Much better, isn’t it? Drawing logic is inside of #6. Logic is simple, first, draw a big rectangular which color is black. Then, check whether draw a smaller rectangular which color is red or not depending on current HP. Finally, draw margin of current small rectangular. Margin of color is white. We can find there are 4 parameters for location data in pygame.draw.rect (I mean, third data. First data is canvas data, second data is color data and fourth data is width.) The easiest way to understand 4 parameters is change them. Change one value into 10 or 30 while others are 20! Then it can be understood. Needless to explain.

Furthermore, now it’s time to functionalize specifically. I push Always statement and Event statement into main function. (#7 is needed to find main function and execute it.) And made new function for drawHP. Functionalization idea for game is not far away from that of normal GUI program. For example, it is better to make single print function for every single value which has to be displayed. Of course, setting location for each value has to be done while you are designing the screen.

<Reference Code>

import pygame, sys
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("HP bar Project")
width = 640 #1
height = 480 #2
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2) #3
fpsClock = pygame.time.Clock()

def main(): #4
    HP = 5

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP) #5

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP): #6
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

if __name__ == '__main__': #7
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/6.Buttons/0000755000175100001770000000000014676242436022641 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.481138 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT.html0000644000175100001770000006142314676242425031563 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

Even if KEYDOWN event is used, it seems like this is not entirely GUI game because GUI of this game is only used for output(=print), not input. Input for GUI means caring mouse event for specific location. How about making two buttons to increase or decrease HP?

../../../../_images/AdvancedInputOutput1.gif ../../../../_images/AdvancedInputOutput2.gif

Okay, making two buttons is simple. Look at the button, they have unique visual shape. How can it be? Simple as previous idea: First, draw big square. Second, draw smaller square which has small width (this square doesn’t have inner color so color of big square can be displayed) so inner square and outer square seems like separated. But these buttons are still for output only. We need to make click area for this.

../../../../_images/AdvancedInputOutput3.gif ../../../../_images/AdvancedInputOutput4.gif ../../../../_images/AdvancedInputOutput5.gif

Now new event MOUSEBUTTONUP is added at Event statement. Notice that up of mouse is same as down of key. If MOUSEBUTTONUP is activated, event.pos will be recorded as x and y. Which means, clicked point. So, determining clicked point is whether inside of certain Rect area or not is needed by checking collidepoint. If inside, it means “user clicked some point which is part of certain area” then, adequate process (updating value) is needed. Notice that there are two area for input: (270, 425, 45, 45) and (325, 425, 45, 45) at Event Statement. Notice that also there are two area for output. (margin, height - r -10 , r, r) and (margin + r + r_margin, height - r - 10, r, r) at drawButtons. In the case of button, input and output area for button must be identical. (Otherwise, this button will be deceptive!) It will be best idea to set this data as same value without calculating exact location of function (for output) into constant (for input). There is no specific function to tie this area, so you have to care about this.

<Reference Code>

import pygame, sys
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("Array buttons Project")
width = 640
height = 480
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2)
fpsClock = pygame.time.Clock()

def main():
    HP = 5

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP)
        drawButtons()

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1
            elif event.type == MOUSEBUTTONUP: #1
                x, y = event.pos
                if pygame.Rect(270, 425, 45, 45).collidepoint(x, y):
                    if HP != 10:
                        HP = HP + 1
                elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y):
                    if HP != 0:
                        HP = HP - 1

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP):
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

def drawButtons():
    r = 45
    r_margin = 10
    colors = [red, black]

    num = 2
    margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2)
    for i in range(0, num):
        left = margin + (i * r) + (i * r_margin)
        up = height - r - 10
        pygame.draw.rect(myScreen, colors[i], (left, up, r, r))
        pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2)

if __name__ == '__main__':
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/7.Game_board/0000755000175100001770000000000014676242436023224 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.5131378 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.html0000644000175100001770000010403314676242426031375 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

Actually, everything doesn’t seem like a game. Now, we will insert a rule into this program. Then. It will become game. Rule is simple: counting red or black from 5x5 2D array and choose the color which has much more number! If correct, HP++, otherwise, HP--. Then new array will be set for next quiz! too simple but game which can be made in this tutorial. First, we need to generate 2D array and print it. How? We learned how to print integer data (which equals single data (0D array)) and two buttons (which equals single array (1D array). Case of 2D array just needs one-more step.

../../../../_images/AdvancedOutputAlpha1.gif ../../../../_images/AdvancedOutputAlpha2.gif ../../../../_images/AdvancedOutputAlpha3.gif

generateboard function returns randomly generated 2D board with the number of red block and black block. Needless to explain. Also, printboard function prints 2D board by same method as 1D array. Output color will be changed by data of board[i][j] is 1 or not. This board is for output only. Processing about margin seems to be annoying because we have to know exact location by calculating. Remember prolog. Output (executing result) of Pygame is GUI but input(coding) of Pygame is CUI. That is Pygame.

Actually, there are a lot of idea for improving this game. How about changing button into image file? How about adding sound effect when previous chose was correct or not? How about setting time limit? How about adding visual effect when player win(maxHP) or not(minHP)? How about make the board bigger with another colors? How about implement Flood-it game by given interface? There are still lots of selection because this game is simple.

<Reference Code>

import pygame, sys, random
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("Red or Black Project")
width = 640
height = 480
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2)
fpsClock = pygame.time.Clock()

def main():
    HP = 5
    board, b_red, b_black = generateBoard(5,5) #1

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP)
        drawButtons()
        drawBoard(board) #2

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()

            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1
            elif event.type == MOUSEBUTTONUP:
                x, y = event.pos

                if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3
                    if b_red >= b_black:
                        if HP != 10:
                            HP = HP + 1
                        board, b_red, b_black = generateBoard(5,5)
                    elif b_red < b_black:
                        if HP != 0:
                            HP = HP - 1
                        board, b_red, b_black = generateBoard(5,5)

                elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4
                    if b_red <= b_black:
                        if HP != 10:
                            HP = HP + 1
                        board, b_red, b_black = generateBoard(5,5)
                    elif b_red > b_black:
                        if HP != 0:
                            HP = HP - 1
                        board, b_red, b_black = generateBoard(5,5)

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP):
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

def drawButtons():
    r = 45
    r_margin = 10
    colors = [red, black]

    num = 2
    margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2)

    for i in range(0, num):
        left = margin + (i * r) + (i * r_margin)
        up = height - r - 10
        pygame.draw.rect(myScreen, colors[i], (left, up, r, r))
        pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2)

def generateBoard(width, height): #5
    board = []
    b_red = 0
    b_black = 0

    for x in range(width):
        column = []
        for y in range(height):
            column.append(random.randint(0, 1))
        board.append(column)

    for x in range(width):
        for y in range(height):
            if(board[x][y] == 1):
                 b_red = b_red + 1
            elif(board[x][y] == 0):
                b_black = b_black + 1

    return board, b_red, b_black

def drawBoard(board): #6
    r = 50
    b_width = 5
    b_height = 5
    l_margin = int((width - (b_width * r)) / 2)
    u_margin = int((height - (b_height * r)) / 2)

    for x in range(5):
        for y in range(5):
            left = x * r + l_margin
            up = y * r + u_margin
            if board[x][y] == 1:
                color = red;
            elif board[x][y] == 0:
                color = black
            pygame.draw.rect(myScreen, color, (left, up, r, r))

    left = l_margin
    up = u_margin
    pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1)

if __name__ == '__main__':
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/8.Epilog/0000755000175100001770000000000014676242436022424 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.5271378 pygame-2.6.1/docs/generated/tut/en/Red_or_Black/8.Epilog/Epilog.html0000644000175100001770000001721514676242426024536 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

However, this is end of tutorial. This tutorial covers only a few of Pygame. But don’t worry. Programming is the most creative activity human can do. Immanuel Kant said “Genius is the innate mental aptitude through which nature gives the rule to art”. Programming is making a rule and give it to computer. If rule is made, computer can do anything within rule. So, number of cases incredibly increase.

What is conclusion? Output is greater than input. We can implement much more program within our knowledge. Or, we can learn new knowledge easily by connecting it to old knowledge. That’s trait of programming. And so is game. “Radom” is the key concept for every game. (including simple game made on this tutorial!) number of cases is much greater when random variable is concerned. If random variable starts to affect another random variable and so on, output will be greater like Avalanche. That’s why game is interesting. Concept of “Random” is the only unique characteristic for game in comparison to novel, music or movie. Think about Tetris. How much effort Alexey Leonidovich Pajitnov spent? Do you think it is greater than sum of Tetris player’s playing time above the world, along 35 years? That’s ultimate example of both power of programming and game.

So, game makers are Avalanche makers. Now it’s time to create any game! Learn! Utilize! Go through trial and errors!




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9791257 pygame-2.6.1/docs/generated/tut/ko/0000755000175100001770000000000014676242436016540 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000014200000000000010212 xustar0070 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/ 28 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/ko/???? ????/0000755000175100001770000000000014676242436017647 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000016100000000000010213 xustar0085 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/1.프롤로그/ 28 mtime=1727612190.0291257 pygame-2.6.1/docs/generated/tut/ko/???? ????/1.????/0000755000175100001770000000000014676242436020461 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000017400000000000010217 xustar0096 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/1.프롤로그/소개.html 28 mtime=1727612181.5511377 pygame-2.6.1/docs/generated/tut/ko/???? ????/1.????/??.html0000644000175100001770000005536114676242426021635 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

게임도 프로그램의 일부이기 때문에, 게임은 입력, 처리 그리고 출력으로 구성된다. C 콘솔 환경에서 게임을 만든다고 가정해 보자(C로 소스코드를 작성한 후 콘솔에서 실행하는 방식). 그러면 입력은 수많은 scanf(또는 엔터 입력 필요 없는 비표준 getch) 함수로, 처리는 항상 절차적으로 실행되는 복잡한 알고리즘으로, 출력은 아스키아트를 이용한 printf(그리고 화면을 지우는 깜빡거리는 clear)함수로 구성할 수 있다. 하지만 이렇게 만든 게임은 구식이고, 그래픽 없는 CUI고, 끉겨 보인다는 단점이 있다. 이런 식의 게임을 만드는 것이 질린다면, 보통 Unity 게임엔진이나 Unreal 게임엔진 등 게임 엔진에도 손을 대보게 된다. 하지만, 게임 엔진은 입문장벽이 높다는 단점이 있다. 복소수좌표를 활용한 공간상에서의 충돌, Mechanin/Legacy 애니메이션 호환성, 더 좋은 그래픽을 위한 더 큰 메모리/더 빠른 CPU… 아무래도 콘솔 환경과 게임 엔진 사이에는 딜레마가 있는 것 같다. 이 딜레마를 해결할 수 있을까?

../../../../_images/introduction-PuyoPuyo1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("introduction-PuyoPuyo.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(C 콘솔 환경 게임의 예시 - 뿌요뿌요)

../../../../_images/introduction-TPS1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("introduction-TPS.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(유니티 게임 엔진 게임의 예시- TPS)

다행히 파이게임은 그 딜레마를 해결할 수 있다. 파이게임 이란 프로그래머가 게임을 만들 수 있게 해 주는 파이썬의 외부 라이브러리이다. 파이게임은 콘솔 환경에서의 장점을 가지고 있다. 그 첫째 장점은 하나의 파이게임 프로젝트은 하나의 소스코드와 거의 동치관계라는 것이다. (외부 소리 파일이나 외부 사진 파일을 제외화면) 그래서 프로그래머는 소스 코드를 작성하는 것에만 집중하면 된다. 그리고 둘째 장점은 파이게임은 툴이 아닌 라이브러리이기 때문에, 소스파일에 “import pygame”만 있으면 그 소스파일은 파이게임의 모든 것에 접근할 수 있게 된다. 접근성이 좋다는 것이다. 파이게임은 게임 엔진의 장점도 가지고 있다. 그 첫째 장점은 파이게임이 키보드, 마우스, 파일 등의 상태를 확인하는 입력 관련 함수들과, 도형 그리기, 색 칠하기, 디스플레이 설정 등의 출력 관련 함수들을 제공하기 때문에, CUI가 아닌 GUI 환경에서 실행된다는 것이다. 그리고 둘째 장점은 파이게임이 파이썬에 기반하였기 때문에, 파이게임의 함수들은 절차적이 아닌 이벤트적(여러 함수들이 선택적으로 실행되거나 거의 동시에 실행됨)으로 실행된다는 것이다.

../../../../_images/introduction-Battleship1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("introduction-Battleship.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(파이게임 게임의 예시- 배틀십)

요약하자면, 파이게임은 저급 수준(콘솔 환경은 예시 중 하나)의 게임 제작 프로그램과 고급 수준(게임 엔진은 예시 중 하나)의 게임 제작 프로그램의 장점을 모두 가진다는 것이다. 파이게임은 이 둘 사이의 좋은 연결점이 된다. 이것이 파이게임을 쓸 이유이다. 더 복잡한 게임 엔진을 최대한 활용해 게임을 만드는 1인 개발자가 목표가 아닌 이상 (빨리 그 게임 엔진을 배우는 것이 낫다!), 콘솔 환경용 게임이 아닌 더 발전된 환경에서 게임을 한번쯤은 코딩해 보고 싶다면 (물론, 푹 빠지면 계속 코딩하게 될 것이다!), 한번쯤은 파이게임을 시도해 볼만 하다.




Edit on GitHub
././@PaxHeader0000000000000000000000000000016500000000000010217 xustar0089 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/2.텍스트 출력/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/2.??? ??/0000755000175100001770000000000014676242436020621 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022500000000000010214 xustar00121 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력.html 28 mtime=1727612181.5831378 pygame-2.6.1/docs/generated/tut/ko/???? ????/2.??? ??/?? ???? ??.html0000644000175100001770000006537614676242426022676 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

앞서 말했듯, 파이게임은 GUI를 기반으로 한다. 정확히는, 파이게임은 2D용 입력, 출력 함수를 사용하여 2D GUI를 기반으로 한다. 어찌됐든, CUI환경에서만 먹히는 파이썬의 print함수나 input함수와는 이별을 해야 한다. 그렇다면, 파이게임의 어떤 함수가 print/input함수를 대체하는가? 우선, 프로그래밍 언어의 기본 형식과 출력을 배우는 친숙한 예제인 “Hello World!”프로젝트로 되돌아가야 한다. (이 프로젝트는 같은 디렉토리에 .ttf확장자를 가지는 폰트 파일을 필요로 한다.)

../../../../_images/Basic-ouput-sourcecode1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Basic-ouput-sourcecode.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/Bagic-ouput-result-screen1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Bagic-ouput-result-screen.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(Hello World 프로젝트의 소스 코드와 실행 결과)

1줄짜리 print(“Hello World!”)에 비하면 소스 코드가 꽤 복잡하다. 이것은 GUI환경에서 텍스트는 최소 5개의 구성 성분(텍스트 내용, 폰트, 크기, 색상, 좌표)를 가지기 때문이다. GUI환경에서 텍스트는 1개의 구성 성분(텍스트 내용)만을 가지므로, 4개의 구성 성분이 추가된 셈이다. 예외적으로, #7의 pygame.display.set_caption(“Hello World Project”)함수는 print(“Hello World Project”)함수와 동일한 기능을 한다. 하지만, 이 함수 속 문자열은 프로그램의 윈도우 캡션에 고정된 문자열이다.

우선, 무언가를 출력하기 위해선 소스코드가 어떻게 작성되어야 하는지 그 형식을 살펴보자. 소스코드는 4개의 부분으로 나눠질 수 있다. Header(#1-#2), Initial문(#3-#12), Always문(#13-#20), Event문(#16-#19)가 그것이다.

Header에선, 모듈들을 import하는 작업이 실행된다. 여기에 import pygame, sys는 항상 필요하다. 이 프로젝트가 파이게임 프로젝트이며, 사용자가 프로그램을 종료하고 싶을 때 종료되어야 하기 때문에(실제로 #19에서 sys.exit()가 실행된다) 추가적인 설명이 필요 없는 당연한 문구이다. from pygame.locals import*는 #17에서의 QUIT같은 유용한 상수들을 선언 없이 사용하기 위해 거의 반필수적으로 필요하다.

Initial문(무한 반복문 이전의 문장들)에선, 전역 변수가 한번만 초기화되거나 몇몇 함수가 한번만 호출된다. 주로 색상과 같은 전역 변수들이 가독성을 높이기 위해 초기화된다. 파이게임은 여러가지 색상을 사용하는 화려한 GUI임을 까먹어선 안된다. (게임이므로) 하나의 색상은 R값, G값, B값 3개의 구성 요소를 가진다. 그래서 색상 변수는 red = (255, 0, 0)와 같이 선언되어야 한다. pygame.init()과 같은 함수는 나중에 사용할 함수를 위해선 가장 앞서서 호출되어야 한다. (이 외의 함수들은 나중에 언급하겠다.)

Always문(무한 반복문)에선, 전역 변수가 계속 업데이트되거나 몇몇 함수가 계속 호출된다. (물론, 조건문이 있는 경우 조건이 맞을 때만) pygame.display.update() 라는 함수는 일반적으로 다른 변수/함수의 처리가 끝난 이후에 호출되는데, 이 함수는 처리의 결과물들을 스크린(= 모니터)에 출력하는 함수이기 때문이다. 이 함수가 Always문 마지막에 실행되지 않으면, 출력되는 화면과 게임 내부 데이터가 서로 일치하지 않는 문제가 생길 수 있다. (이 외의 함수들은 나중에 언급하겠다.)

Event문(모든 이벤트를 체크하는 반복문)에선, 특정 이벤트가 발생하면 이에 대한 처리가 이루어진다. pygame.event.get() 함수는 Always문에서 발생한 이벤트들의 배열을 반환한다. 그리고 이 이벤트들은 자동적으로 발생 시간순으로 정렬된다. 그러므로, for-in문을 쓰면, Always문에서 발생한 모든 이벤트들을 순차적으로 처리할 수 있다 (이벤트 기반). 예를 들어서, #17-#19는 QUIT라는 이벤트를 처리하고 있다. 이 이벤트가 트리거되면, 파이게임이 종료된 이후 시스템이 종료되게 된다. (이 외의 함수들은 나중에 언급하겠다.)

기본 형식이 고정되어 있다고 가정하면, 이 형식에 일부 함수들을 적절히 삽입하면 “Hello World!”가 출력되게 할 수 있다. 첫째로, 텍스트의 폰트와 크기가 정해져야 한다. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) 라는 #9의 함수는 주어진 이름의 ttf파일로 폰트를 정하고 크기 (이 경우 32)도 정한다. 이 함수의 반환 값은 myTextFont라는 객체에 저장해 두었다. 그리고 myTextFont객체의 render(“Hello World!”, True, red, green)라는 #10의 함수의 반환 값을 myText라는 객체에 저장해 두었다. render 함수는 텍스트 내용과 색상을 정할 수 있다. 이 경우, 텍스트의 색상은 빨간 색, 텍스트가 아닌 구역의 색상은 초록 색이 된다. myText객체의 get_rect() 라는 #11의 함수의 반환 값을 myTextArea라는 객체에 저장해 두는데, myTextArea는 텍스트를 출력하기 위해 할당된 구역을 의미한다. get_rect()라는 함수는 텍스트의 폰트 크기와 텍스트의 길이를 고려하여 적절한 직사각형 공간을 반환한다. 만약 myTextArea라는 객체의 center라는 멤버 변수를 텍스트가 화면 정중앙에 오게끔 수정한다면, (#12) 텍스트의 위치를 화면 정중앙으로 오게 알 수 있다.

하지만 화면 정중앙을 어떻게 알아낼 수 있을까? 우선, 화면의 전체 크기를 정해야 한다. #8의 pygame.display.set_mode((640,480)) 함수는 캔버스 (크기, 색상, 위치 정보를 가지는 변수들이 display.update함수가 호출되면 그려지는 공간)를 생성하고 그 크기를 640 x 480으로 고정시킨다. 그렇다면, 화면의 정중앙은 (320, 240)이다. 화면의 전체 크기가 확정된다면, 약간의 계산만 하면 모든 종류의 위치를 결정할 수 있게 된다. (2D GUI이므로 출력되는 모든 것은 x, y성분을 가진다) (오른쪽이 x좌표가 크고, 아래쪽이 y좌표가 큼을 헷갈리면 안된다. 앞서서 말한 함수들은 모두 Initial문에 실행되어야 하는 것들이다, 왜나하면 이 정보들은 프로그램 도중 업데이트가 필요 없기 때문이다.

물론, fill함수나 blit함수는 함수의 특성 때문에 Always문에 실행된다. #14의 fill(white) 함수는 캔버스를 단색(하얀색)으로 채우는 기능을 수행한다. #15의 blit(myText, myTextArea)는 특정 객체(myText)를 특정 위치(myTextArea)에 그리는 기능을 수행한다. blit이 fill 이후에 수행되어야 한다. 모든 것이 캔버스에 그려지고 나면, 캔버스의 결과물은 display.update함수가 실행되면 출력되게 된다.

이것이 20줄짜리 소스코드를 위한 설명이었다. 20줄짜리 소스코드 치곤 작동 원리를 이해하는 데 시간이 오래 걸리는 것 같다. 하지만, 이 소스코드에 무언가를 추가하거나 수정하는 것은 그다지 어렵지 않을 것이다. 이 소스코드의 기본 형식과 출력을 위한 기본 단계를 이해했다면 말이다. 여기에 처리 로직을 추가하는 것은 어떨까? 다음 프로젝트에서 진행될 것이다.

<참고 코드>

import pygame, sys #1
from pygame.locals import* #2

white = (255,255,255) #3
red = (255,0,0) #4
green = (0,255,0) #5
pygame.init() #6
pygame.display.set_caption("Hello World Project") #7
myScreen = pygame.display.set_mode((640, 480)) #8
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9
myText = myTextFont.render("Hello World!", True, red, green) #10
myTextArea = myText.get_rect() #11
myTextArea.center = (320, 240) #12

while True: #13
    myScreen.fill(white) #14
    myScreen.blit(myText, myTextArea) #15

    for event in pygame.event.get(): #16
        if event.type == QUIT: #17
            pygame.quit() #18
            sys.exit() #19

    pygame.display.update() #20



Edit on GitHub
././@PaxHeader0000000000000000000000000000016500000000000010217 xustar0089 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/3.텍스트 이동/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/3.??? ??/0000755000175100001770000000000014676242436020622 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021000000000000010206 xustar00108 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리.html 28 mtime=1727612181.6101377 pygame-2.6.1/docs/generated/tut/ko/???? ????/3.??? ??/?? ??.html0000644000175100001770000006467314676242426022242 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

이전 프로젝트는 게임이 아니라 이미지 한 장 같아 보인다. 출력을 바꾸는 입력이나 처리가 없기 때문이다. 물론, 윈도우의 종료 버튼을 누르는 것은 고려되지 않는다 (프로그램을 종료하는 것에 불과하므로). 우선, 우리는 “Hello World!”가 자동적으로 움직이게 할 것이다. 그러면 이제 프로젝트는 이미지 한 장이 아닌 애니메이션 같아 보일 것이다. 어떻게 텍스트를 움직일까? 우리는 텍스트의 위치가 Initial statement에서 초기화됨을 알고 있다. 그렇다면, 이 위치가 Always statement에서 업데이트되게 하면 된다. 물론, 추가적인 변수가 필요할 것이다.

../../../../_images/Bagic-PROCESS-sourcecode1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Bagic-PROCESS-sourcecode.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/Bagic-PROCESS-resultscreen1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Bagic-PROCESS-resultscreen.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(Moving World 프로젝트의 소스 코드 일부 와 실행 결과)

(Moving World가 알카노이드의 공이나 DVD 화면보호기처럼 움직인다.)

#1 - #5가 Initial문의 뒷부분에 추가되었다. 또한, 다중 if-else문은 Always문의 앞부분에 추가되었고, #11이 Always문의 뒷부분에 추가되었다. #2 - #10이 무엇을 처리하는지는 쉽다. Always문이 시작될 때 Moving World의 좌표에 해당되는 변수를 바꾸고 있다. 하지만 문제가 있다. Moving World는 얼마나 빠를까? Moving World의 변위는 루트2 임은 확실하다. (피타고라스 정리를 이용하면) 하지만 얼마나 자주 Moving World의 변위가 바뀌는가? 이것은 Always문의 시간 복잡도를 분석하지 않는 이상 알아낼 수 없다. (이것은 Always문이 시작하는 빈도에 따라 달라지므로) 그리고 시간 복잡도는 컴퓨터마다 다르다. 그래서 이 시간은 고정될 수 없다.

우리는 이 프로젝트에 고정 속도라는 개념을 추가해야 한다. 어떻게? #1과 #11을 보면, Initial statement에 pygame.time.Clock()함수가, Always문에 tick(60)함수가 있음을 확인할 수 있다. 60이라는 수는 여기서 FPS(Frame Per Second)를 의미한다. FPS가 1초에 화면이 얼마나 자주 바뀌는지를 의미한다. 화면을 바꾸는(업데이트하는) 파이게임의 함수는 무엇인가? 바로 Pygame.display.update() 함수이다. 그러므로, FPS는 1초에 Always문이 실행되는 횟수를 의미하게 된다. 이는 Always문 속에는 단 하나의 Pygame.display.update() 함수가 존재하기 때문이다. FPS는 일종의 선택적인 딜레이 함수와 같은 기능(프로그램 처리 속도에 따라)을 한다, 선택적인 가속 함수가 아니므로, FPS값이 너무 크면 FPS대로 작동하지 않을 수 있다. 우리가 프로젝트 내에서 시간(FPS)을 고정시켜 두면, 특정 게임 오브젝트의 적절한 변위만 찾아내면 그 오브젝트의 속도를 정할 수 있다. pygame.time.Clock()은 게임이 시작되기 이전 속도를 고정시키는 기능을 한다. tick함수는 Pygame.display.update()보다 나중에 와야 한다. 왜냐하면 tick함수는 화면이 몇 번 업데이트되었는지를 계산하기 때문이다. Pygame.display.update() 함수보다 나중에 실행되야 하는 몇 안되는 함수 중 하나이다.

화면이 업데이트 될 때, 시간을 고정하는 방법을 알았다. 정지된 화면보다는 정신없이 움직이는 화면이 게임에선 많으므로, 이를 반드시 알고 있어야 한다. 그러나, 이 프로젝트는 결과가 너무 쉽게 예측되기 때문에 게임이 아닌 것처럼 보인다는 단점은 아직도 있다. (결과를 바꿀 입력이 없으므로) 이젠, 입력 로직이 추가 되어야만 한다.

<참고 코드>

import pygame, sys
from pygame.locals import*

white = (255,255,255)
red = (255,0,0)
green = (0,255,0)
pygame.init()
pygame.display.set_caption("Moving World Project")
myScreen = pygame.display.set_mode((640, 480))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render("Moving World!", True, red, green)
myTextArea = myText.get_rect()
myTextArea.center = (320, 240)
fpsClock = pygame.time.Clock() #1
x = 0 #2
y = 0 #3
moveRight = 1 #4
moveUp= 1 #5

while True:
    if (moveRight == 1): #6
        x = x + 1
        if (x >= 320 - 75):
            moveRight = 0
    elif (moveRight == 0): #7
        x = x - 1
        if (x <= -320 + 75):
            moveRight = 1

    if (moveUp == 1): #8
        y = y + 1
        if (y >= 240 - 15):
            moveUp = 0
    elif (moveUp == 0): #9
        y = y - 1
        if (y <= -240 + 15):
            moveUp = 1



myTextArea.center = (320 + x, 240 + y) #10

myScreen.fill(white)
myScreen.blit(myText, myTextArea)

for event in pygame.event.get():
    if event.type == QUIT:
        pygame.quit()
        sys.exit()

pygame.display.update()
fpsClock.tick(60) #11



Edit on GitHub
././@PaxHeader0000000000000000000000000000016500000000000010217 xustar0089 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/4.텍스트 조종/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/4.??? ??/0000755000175100001770000000000014676242436020623 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021000000000000010206 xustar00108 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력.html 28 mtime=1727612181.6381376 pygame-2.6.1/docs/generated/tut/ko/???? ????/4.??? ??/?? ??.html0000644000175100001770000006542114676242426022233 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

생각해보면, 우리는 무언가를 출력하는 방법을 먼저 배우고(“Hello World”를 생각해봐라) 무언가를 입력하는 방법은 나중에 배운다. 왜 그런가? 왜냐면 입력은 몇몇 프로그램에선 필수조건이 아니지만, 출력은 모든 프로그램에선 항상 필수조건이기 때문이다. (프로그램의 정의: 0개 이상의 입력, 1개 이상의 출력) 그러나, 모든 게임은 입력이 필요하다. 그것이 우리는 “나는 게임을 Play한다”라고 말하는 이유이다. Play라는 단어는 몸의 일부분(아마도 손가락)을 움직인다는 뜻이다. 어쨌든, 이 프로젝트가 진짜 게임이 되기 위해 입력 로직을 추가해보자.

../../../../_images/Bagic-INPUT-sourcecode1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Bagic-INPUT-sourcecode.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/Bagic-INPUT-resultscreen1.png
import sys, pygame
pygame.init()

size = width, height = 220, 140
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("Bagic-INPUT-resultscreen.png")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

(Controlling World 프로젝트의 소스 코드 일부 와 실행 결과)

(Controlling World가 키보드 방향키를 누르면 해당 방향으로 움직인다.)

이전 프로젝트와 비교하여 2개의 큰 차이점이 생겼다. 첫째는 #5에 KEYDOWN 이벤트가 트리거 되었는지 아닌지를 판단하는 것이다. 다른 줄들은 이전의 알고리즘의 약간 다르게 동작하도록 바꾼 것에 불과하다. 똑같은 명령어가 Event문 앞에 있느냐 뒤에 있느냐 결과는 완전히 달라질 수 있음을 우리는 알고 있다. 좌표를 업데이트하는 경우, Event문이 종료되고 이루어짐에 주목해라. (세팅 된 후 업데이트된다. 그것이 두번째 차이점이다.) 객체 event.key는 키보드에 마지막으로 눌린 키를 의미한다. 구체적인 키의 이름을 보아라. K_UP, K_LEFT, K_DOWN, K_RIGHT. 매우 직관적인 K_시리즈이다. (Header의 pygame.locals로부터 이용할 수 있다.) 다른 키의 이름으로는 K_8, K_a, K_L, K_LCTRL, K_DELETE, L_F4등이 있다. 이런 키들도 추가적인 도움 없이 직관적으로 이해할 수 있다. 모든 키 이름 목록은 https://www.pygame.org/docs/ref/key.html#pygame.key.name 에서 확인할 수 있다.

KEYDOWN은 “이 키는 이전에는 눌리지 않았지만, 지금은 눌렸다.”를 의미하고, “이전부터 지금까지 계속 눌린 채로 있다.”를 의미하지는 않는다. 눌려있는 경우를 다루기 위해서는, KEYUP이라는 이벤트를 추가적으로 확인해야 한다. (변수와 알고리즘이 더 추가된다) 이는 심화 부분에서 다루겠다.

입력을 추가하는 것은 단순히 이벤트 인자를 추가하는 것이기 때문에 쉽다. 이제 게임 프로젝트는 완성되었다. 왜냐하면 프로젝트가 출력, 처리, 입력을 가지고 있기 때문이다. 맞는가? 아니다. 이 프로젝트는 게임 오브젝트간 상호작용이 전혀 없고, 플레이 규칙(제약조건(HP, 시간 등)도 없고 점수도 없다)이 없고, 즐길 것(동기부여 요소, 입력 출력의 다양성, 컨텐츠)이 없기 때문에 게임이라고 불릴 수 없다. 우선, 게임의 인터페이스/시스템을 풍성하게 하기 위해 우리는 심화된 입력(마우스 상태 반영), 처리(적절한 함수화), 출력(이미지, 소리 및 내부 데이터 시각화 방법)을 알아야 한다. 물론, 기초 단계에서의 경험이 반드시 도움이 된다. 심화 단계로 가보자!

<참고 코드>

import pygame, sys
from pygame.locals import*

white = (255,255,255)
red = (255,0,0)
green = (0,255,0)
pygame.init()
pygame.display.set_caption("Controlling World Project")
myScreen = pygame.display.set_mode((640, 480))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render("Controlling World!", True, red, green)
myTextArea = myText.get_rect()
myTextArea.center = (320, 240)
fpsClock = pygame.time.Clock()
x = 0
y = 0
moveRight = 0 #1
moveDown = 0 #2

while True:
    moveRight = 0 #3
    moveDown = 0 #4
    myTextArea.center = (320 + x, 240 + y)
    myScreen.fill(white)
    myScreen.blit(myText, myTextArea)

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()
        elif event.type == KEYDOWN: #5
            if event.key == K_UP:
                moveDown = -1
                moveRight = 0
            elif event.key == K_LEFT:
                moveDown = 0
                moveRight = -1
            elif event.key == K_DOWN:
                moveDown = 1
                moveRight = 0
            elif event.key == K_RIGHT:
                moveDown = 0
                moveRight = 1

    if(moveRight == 1): #6
        x = x + 10
    elif(moveRight == -1): #7
        x = x - 10
    if(moveDown == 1): #8
        y = y + 10
    elif(moveDown == -1): #9
        y = y - 10

    pygame.display.update()



Edit on GitHub
././@PaxHeader0000000000000000000000000000015200000000000010213 xustar0078 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/5.HP바/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/5.HP?/0000755000175100001770000000000014676242436020420 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022500000000000010214 xustar00121 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리.html 28 mtime=1727612181.6751375 pygame-2.6.1/docs/generated/tut/ko/???? ????/5.HP?/?? ?? ??? ?? ??.html0000644000175100001770000013346314676242426023063 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

우선, 텍스트가 아닌, 도형을 시각화 하겠다. HP 바는 어떤가? 만약 HP의 최대값이 고정되어 있고 오직 현재 HP 값만이 변한다면, 이 두 데이터를 출력하는 가장 쉬운 방법은 무엇인가?

../../../../_images/AdvancedOutputProcess11.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess1.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputProcess21.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess2.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputProcess31.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess3.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

변수의 값이 변할 때마다 텍스트를 다시 렌더링 하기만 하면 된다. 변수의 값은 어떻게 바꾸는가? 그것은 Event문에서 이루어진다. (키보드 위 또는 아래를 눌러 HP를 조절하게 하였다.) 이전과 동일한 방법이다. 하지만, 이것들은 여전히 텍스트이다. 아직 충분히 시각화 되지 않는다. 이 데이터들을 어떻게 더 상세하게 시각화 할까? 총 탄창에서 아이디어를 따올 수 있다. HP는 정수 값이고, 불연속적 값을 가지므로, 아래와 같이 출력될 수 있다.

../../../../_images/AdvancedOutputProcess41.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess4.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputProcess51.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess5.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputProcess61.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputProcess6.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

훨씬 나아졌다. 그리는 로직은 #6을 확인하면 된다. 로직은 단순하다. 먼저, 큰 검은 색 직사각형을 그린다. 그 다음, 현재 HP을 따져서 작은 빨간 색 직사각형들을 0개 또는 최대 개수만큼 그린다. 마지막으로, 작은 직사각형들에 하얀 테두리를 그린다. pygame.draw.rect 함수에선 위치 변수로 4개의 매개 변수가 사용된 것을 확인할 수 있는데 (첫번째 변수는 캔버스 변수이고, 두번째 변수는 색상 변수, 네번째 변수는 두께 변수이다.) 이 4개의 매개 변수의 용도가 무엇인지는 직접 설명하는 것보다, 직접 값을 변경하면서 확인하는 것이 가장 쉽게 이해할 수 있다. 3개의 값이 20일 때 하나의 값 만을 10또는 30으로 바꿔 보아라!

그리고, 이제는 본격적으로 함수화를 해야 한다. Always문과 Event문을 main함수에 담았는데, 이 경우 main함수를 프로그램이 찾을 수 있도록 #7에서 추가적인 처리를 해야 한다. 그 다음 drawHP라는 새로운 함수를 만들었다. 게임에서의 함수화 아이디어는 GUI 프로그램을 만들 때의 함수화 아이디어와 크게 다르지 않다. 예를 들면, 하나의 변수를 출력하는 하나의 출력 함수를 각각 만들어 두는 것이 좋을 것이다. 물론, 각각의 변수가 출력 될 좌표를 정하는 것은 화면 전체를 디자인할 때 선행되어야 할 것이다.

<참고 코드>

import pygame, sys
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("HP bar Project")
width = 640 #1
height = 480 #2
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2) #3
fpsClock = pygame.time.Clock()

def main(): #4
    HP = 5

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP) #5

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP): #6
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

if __name__ == '__main__': #7
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000015600000000000010217 xustar0082 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/6.버튼들/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/6.???/0000755000175100001770000000000014676242436020367 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000023100000000000010211 xustar00125 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력.html 28 mtime=1727612181.7111375 pygame-2.6.1/docs/generated/tut/ko/???? ????/6.???/?? ?? ??? ?? ??.html0000644000175100001770000013457714676242426023041 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

KEYDOWN이 사용되었지만, 아직도 이 게임이 완전한 GUI가 아닌 것처럼 보이는 이유는 GUI가 입력은 없고 오직 출력(프린트)하는 데에만 사용되었기 때문이다. GUI에서의 입력이란 특정한 위치에서의 마우스 이벤트를 처리하는 것이다. HP를 증가시키거나 감소시키는 버튼 2개를 만드는 것은 어떨까?

../../../../_images/AdvancedInputOutput11.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedInputOutput1.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedInputOutput21.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedInputOutput2.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

버튼 2개를 만드는 것은 쉽다. 버튼을 보면, 뭔가 특이한 효과가 적용되어 있음을 알 수 있다. 어떻게 한 것인가? 이전의 아이디어처럼 단순하다. 첫째, 큰 정사각형을 그린다. 둘째, 내용은 없고 두께만 있는 작은 정사각형을 그린다. 하지만 이 버튼들은 아직 출력용이다. 이 버튼들을 위한 클릭 가능 공간을 만들어야 한다.

../../../../_images/AdvancedInputOutput31.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedInputOutput3.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedInputOutput41.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedInputOutput4.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedInputOutput51.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedInputOutput5.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

이제 Event문에 MOUSEBUTTONUP이 추가되었다. 마우스가 UP 된 것은 키보드가 DOWN된 것과 동일한 의미를 가진다. 만약 MOUSEBUTTONUP이 활성화되면, event.pos는 x값과 y값을 기록해야 하는데, 이 것은 클릭 지점을 나타낸다. 그러므로, 클릭이 특정 정사각형 내부에서 일어났는지 아닌 지는 collidepoint를 확인하면 된다. 만약 내부였다면, “사용자가 특정 영역 내부를 클릭했다”를 의미하게 된다. 그 다음, 변수를 업데이트하는 적절한 처리만이 필요하게 된다. 입력을 위한 두 변수가 존재하고, (Event문에 있음) (270, 425, 45, 45)와 (325, 425, 45, 45). 출력을 위한 두 변수도 존재함을 확인하라. (drawButtons에 있음) (margin, height - r -10 , r, r)과 (margin + r + r_margin, height - r - 10, r, r). 버튼의 경우, 입력 영역과 출력 영역이 동일해야 한다. 그렇지 않다면, 버튼의 판정 범위는 오해의 소지가 될 수 있다! 변수(출력 용)들을 구체적인 계산을 통해 상수(입력 용) 값을 알아내기 싫다면, 이 변수들을 동일한 변수로 두는 것이 좋은 생각일 것이다. 두 영역을 하나로 묶을 수 있는 함수는 없으므로, 이 점은 항상 신경 써야 한다.

<참고 코드>

import pygame, sys
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("Array buttons Project")
width = 640
height = 480
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2)
fpsClock = pygame.time.Clock()

def main():
    HP = 5

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP)
        drawButtons()

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1
            elif event.type == MOUSEBUTTONUP: #1
                x, y = event.pos
                if pygame.Rect(270, 425, 45, 45).collidepoint(x, y):
                    if HP != 10:
                        HP = HP + 1
                elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y):
                    if HP != 0:
                        HP = HP - 1

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP):
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

def drawButtons():
    r = 45
    r_margin = 10
    colors = [red, black]

    num = 2
    margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2)
    for i in range(0, num):
        left = margin + (i * r) + (i * r_margin)
        up = height - r - 10
        pygame.draw.rect(myScreen, colors[i], (left, up, r, r))
        pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2)

if __name__ == '__main__':
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000015600000000000010217 xustar0082 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/7.게임판/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/7.???/0000755000175100001770000000000014676242436020370 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022600000000000010215 xustar00122 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/7.게임판/심화 출력 그리고 조금 더.html 28 mtime=1727612181.7471373 pygame-2.6.1/docs/generated/tut/ko/???? ????/7.???/?? ?? ??? ?? ?.html0000644000175100001770000013665314676242426022740 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

사실, 모든 것들이 게임 같아 보이진 않는다. 이제, 이 프로그램에 규칙을 추가하려 한다. 그러면, 이 프로그램은 게임이 된다. 규칙은 간단하다: 5x5 2차원 배열에서 빨간 블록, 검은 블록의 수를 세고, 더 많은 색상의 블록을 고르는 것이다! 정답이라면 HP는 증가하고 오답이라면, HP는 감소한다. 그 다음, 다음 문제를 위한 새로운 2차원 배열이 그려진다! 대단히 단순하지만 이 튜토리얼 내에서 만들어 질 수 있는 게임이다. 우선, 2차원 배열을 만들고 출력해야 한다. 어떻게? 우리는 정수 데이터(0차원 배열과 같음)나 두 버튼(1차원 배열과 같음)을 출력하는 법을 알 고 있다. 2차원 배열은 요소 하나만 더 추가되면 된다.

../../../../_images/AdvancedOutputAlpha11.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputAlpha1.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputAlpha21.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputAlpha2.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()
../../../../_images/AdvancedOutputAlpha31.gif
import sys, pygame
pygame.init()

size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("AdvancedOutputAlpha3.gif")
ballrect = ball.get_rect()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    ballrect = ballrect.move(speed)
    if ballrect.left < 0 or ballrect.right > width:
        speed[0] = -speed[0]
    if ballrect.top < 0 or ballrect.bottom > height:
        speed[1] = -speed[1]

    screen.fill(black)
    screen.blit(ball, ballrect)
    pygame.display.flip()

generateboard 함수는 무작위로 만들어진 2차원 배열과 빨간 블록, 검은 블록의 개수를 반환한다. 더 설명할 필요도 없다. 또한, printboard 함수는 1차원 배열처럼 2차원 배열을 출력한다. 출력 색상은 board[i][j]가 1인지 아닌 지에 따라 달라진다. 이 게임판은 단순히 출력 용이다. 테두리를 처리하려면 부분의 크기를 가지고 전체 크기를 계산해야 해서 짜증날 수 있다. 이것은 프롤로그에서 언급한 대로, 파이게임 갖는 특성 (실행 결과는 GUI이지만 코드 작성은 CUI) 때문이다.

사실, 이 구현한 게임은 개선의 여지가 많다. 버튼을 이미지 파일로 바꾸면? 정답이거나 오답일 때 효과음을 넣으면? 시간 제한을 넣으면? 정답이거나 오답일 때 시각적 효과를 넣으면? 게임판을 더 크게 하고 색상을 더 다양히 넣는다면? 이 인터페이스를 가지고 Flood-it을 구현한다면? 구현한 게임이 단순하기 때문에 선택지는 많다.

<참고 코드>

import pygame, sys, random
from pygame.locals import*

maxHP = 10
white = (255,255,255)
gray = (127,127,127)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)
pygame.init()
pygame.display.set_caption("Red or Black Project")
width = 640
height = 480
myScreen = pygame.display.set_mode((width, height))
myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32)
myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray)
myTextArea = myText.get_rect()
myTextArea.center = (width/2, height/2)
fpsClock = pygame.time.Clock()

def main():
    HP = 5
    board, b_red, b_black = generateBoard(5,5) #1

    while True:
        myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray)

        myScreen.fill(gray)

        myScreen.blit(myText, myTextArea)
        drawHP(HP)
        drawButtons()
        drawBoard(board) #2

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()

            elif event.type == KEYDOWN:
                if event.key == K_UP:
                    if HP != 10:
                        HP = HP + 1
                elif event.key == K_DOWN:
                    if HP != 0:
                        HP = HP - 1
            elif event.type == MOUSEBUTTONUP:
                x, y = event.pos

                if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3
                    if b_red >= b_black:
                        if HP != 10:
                            HP = HP + 1
                        board, b_red, b_black = generateBoard(5,5)
                    elif b_red < b_black:
                        if HP != 0:
                            HP = HP - 1
                        board, b_red, b_black = generateBoard(5,5)

                elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4
                    if b_red <= b_black:
                        if HP != 10:
                            HP = HP + 1
                        board, b_red, b_black = generateBoard(5,5)
                    elif b_red > b_black:
                        if HP != 0:
                            HP = HP - 1
                        board, b_red, b_black = generateBoard(5,5)

        pygame.display.update()
        fpsClock.tick(60)

def drawHP(HP):
    r = int((height - 40) / maxHP)

    pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r)))

    for i in range(maxHP):
        if HP >= (maxHP - i):
            pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r))
        pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1)

    return

def drawButtons():
    r = 45
    r_margin = 10
    colors = [red, black]

    num = 2
    margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2)

    for i in range(0, num):
        left = margin + (i * r) + (i * r_margin)
        up = height - r - 10
        pygame.draw.rect(myScreen, colors[i], (left, up, r, r))
        pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2)

def generateBoard(width, height): #5
    board = []
    b_red = 0
    b_black = 0

    for x in range(width):
        column = []
        for y in range(height):
            column.append(random.randint(0, 1))
        board.append(column)

    for x in range(width):
        for y in range(height):
            if(board[x][y] == 1):
                 b_red = b_red + 1
            elif(board[x][y] == 0):
                b_black = b_black + 1

    return board, b_red, b_black

def drawBoard(board): #6
    r = 50
    b_width = 5
    b_height = 5
    l_margin = int((width - (b_width * r)) / 2)
    u_margin = int((height - (b_height * r)) / 2)

    for x in range(5):
        for y in range(5):
            left = x * r + l_margin
            up = y * r + u_margin
            if board[x][y] == 1:
                color = red;
            elif board[x][y] == 0:
                color = black
            pygame.draw.rect(myScreen, color, (left, up, r, r))

    left = l_margin
    up = u_margin
    pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1)

if __name__ == '__main__':
    main()



Edit on GitHub
././@PaxHeader0000000000000000000000000000016100000000000010213 xustar0085 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/8.에필로그/ 28 mtime=1727612190.0301256 pygame-2.6.1/docs/generated/tut/ko/???? ????/8.????/0000755000175100001770000000000014676242436020470 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000020300000000000010210 xustar00103 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/8.에필로그/에필로그.html 28 mtime=1727612181.7591374 pygame-2.6.1/docs/generated/tut/ko/???? ????/8.????/????.html0000644000175100001770000002003514676242426022030 0ustar00runnerdocker Author: Youngwook Kim (Korean) — pygame v2.6.1 documentation

그러나, 튜토리얼은 여기에서 끝이 난다. 이 튜토리얼은 파이게임의 극소수만을 다뤘다. 하지만 걱정하지 마라. 프로그램은 사람이 할 수 있는 가장 창의적인 활동이다. 임마누엘 칸트는 “천재성이란 어떤 대상에 규칙을 부여할 수 있는 능력이다”라고 말했다. 프로그래밍은 규칙을 만들어서 컴퓨터에게 입력시키는 것이다. 규칙이 만들어진다면, 컴퓨터는 규칙 내에서 무엇이든지 할 수 있다. 그러므로, 경우의 수가 매우 커지게 된다.

결론이 무엇인가? 출력이 입력보다 크다는 것이다. 우리는 우리의 지식만으로 지식보다 더 폭넓은 프로그램을 구현할 수 있다. 또는 우리는 새로운 지식을 기존의 지식에 연결시키면서 습득할 수도 있다. 그것이 프로그래밍의 특성이다. 게임도 마찬가지이다. “난수”라는 개념은 모든 게임(이미 구현한 게임도 포함!)에서 대단히 중요한 개념이다. 난수까지 고려되었을 때 경우의 수는 매우 커지게 된다. 만약 하나의 난수가 다른 난수까지 영향을 미치게 된다면, “눈사태”와 같은 효과가 나게 된다. 그것이 게임이 흥미로운 이유이다. “난수”라는 개념은 소설, 음악, 영화 등은 가질 수 없는 게임만의 특성이다. 테트리스를 생각해 보아라. 알렉세이 파지트노프가 테트리스를 위해 얼만큼의 시간을 투자했을까? 이 시간이 35년 넘게 전세계 사람들이 플레이 한 시간보다 클까? 이것이 바로 프로그래밍과 게임이 갖는 두 특성이 완벽히 발휘된 예시이다.

그러므로, 게임을 만드는 것은 눈사태를 일으키는 것과 같다. 이제 아무 게임이나 만들 시간이다! 배우고, 활용하고, 시행 착오를 겪어 보자!




Edit on GitHub
././@PaxHeader0000000000000000000000000000015500000000000010216 xustar0081 path=pygame-2.6.1/docs/generated/tut/ko/빨간블록 검은블록/개요.html 28 mtime=1727612181.7681375 pygame-2.6.1/docs/generated/tut/ko/???? ????/??.html0000644000175100001770000001723114676242426021015 0ustar00runnerdocker 한국어 튜토리얼 — pygame v2.6.1 documentation

한국어 튜토리얼


1 부

프롤로그/소개

2 부

텍스트 출력

3 부

텍스트 이동

4 부

텍스트 조종

5 부

HP바

6 부

버튼들

7 부

게임판

8 부

에필로그




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.8431373 pygame-2.6.1/docs/generated/tut/newbieguide.html0000644000175100001770000013043414676242426021310 0ustar00runnerdocker A Newbie Guide to pygame — pygame v2.6.1 documentation

A Newbie Guide to pygame

or Things I learned by trial and error so you don't have to,

or How I learned to stop worrying and love the blit.

Pygame is a python wrapper for SDL, written by Pete Shinners. What this means is that, using pygame, you can write games or other multimedia applications in Python that will run unaltered on any of SDL's supported platforms (Windows, Linux, Mac, and others).

Pygame may be easy to learn, but the world of graphics programming can be pretty confusing to the newcomer. I wrote this to try to distill the practical knowledge I've gained over the past year or so of working with pygame, and its predecessor, PySDL. I've tried to rank these suggestions in order of importance, but how relevant any particular hint is will depend on your own background and the details of your project.

Get comfortable working in Python.

The most important thing is to feel confident using python. Learning something as potentially complicated as graphics programming will be a real chore if you're also unfamiliar with the language you're using. Write a few sizable non-graphical programs in python -- parse some text files, write a guessing game or a journal-entry program or something. Get comfortable with string and list manipulation -- know how to split, slice and combine strings and lists. Know how import works -- try writing a program that is spread across several source files. Write your own functions, and practice manipulating numbers and characters; know how to convert between the two. Get to the point where the syntax for using lists and dictionaries is second-nature -- you don't want to have to run to the documentation every time you need to slice a list or sort a set of keys. Get comfortable using file paths -- this will come in handy later when you start loading assets and creating save files.

Resist the temptation to ask for direct help online when you run into trouble. Instead, fire up the interpreter and play with the problem for a few hours, or use print statements and debugging tools to find out what's going wrong in your code. Get into the habit of looking things up in the official Python documentation, and Googling error messages to figure out what they mean.

This may sound incredibly dull, but the confidence you'll gain through your familiarity with python will work wonders when it comes time to write your game. The time you spend making python code second-nature will be nothing compared to the time you'll save when you're writing real code.

Recognize which parts of pygame you really need.

Looking at the jumble of classes at the top of the pygame documentation index may be confusing. The important thing is to realize that you can do a great deal with only a tiny subset of functions. Many classes you'll probably never use -- in a year, I haven't touched the Channel, Joystick, cursors, surfarray or version functions.

Know what a surface is.

The most important part of pygame is the surface. Just think of a surface as a blank piece of paper. You can do a lot of things with a surface -- you can draw lines on it, fill parts of it with color, copy images to and from it, and set or read individual pixel colors on it. A surface can be any size (within reason) and you can have as many of them as you like (again, within reason). One surface is special -- the one you create with pygame.display.set_mode()Initialize a window or screen for display. This 'display surface' represents the screen; whatever you do to it will appear on the user's screen.

So how do you create surfaces? As mentioned above, you create the special 'display surface' with pygame.display.set_mode(). You can create a surface that contains an image by using pygame.image.load()load new image from a file (or file-like object), or you can make a surface that contains text with pygame.font.Font.render()draw text on a new Surface. You can even create a surface that contains nothing at all with pygame.Surface()pygame object for representing images.

Most of the surface functions are not critical. Just learn Surface.blit(), Surface.fill(), Surface.set_at() and Surface.get_at(), and you'll be fine.

Use Surface.convert().

When I first read the documentation for Surface.convert(), I didn't think it was something I had to worry about. 'I only use PNGs, therefore everything I do will be in the same format. So I don't need convert()';. It turns out I was very, very wrong.

The 'format' that convert() refers to isn't the file format (i.e. PNG, JPEG, GIF), it's what's called the 'pixel format'. This refers to the particular way that a surface records individual colors in a specific pixel. If the surface format isn't the same as the display format, SDL will have to convert it on-the-fly for every blit -- a fairly time-consuming process. Don't worry too much about the explanation; just note that convert() is necessary if you want to get any kind of speed out of your blits.

How do you use convert? Just call it after creating a surface with the image.load() function. Instead of just doing:

surface = pygame.image.load('foo.png')

Do:

surface = pygame.image.load('foo.png').convert()

It's that easy. You just need to call it once per surface, when you load an image off the disk. You'll be pleased with the results; I see about a 6x increase in blitting speed by calling convert().

The only times you don't want to use convert() is when you really need to have absolute control over an image's internal format -- say you were writing an image conversion program or something, and you needed to ensure that the output file had the same pixel format as the input file. If you're writing a game, you need speed. Use convert().

Be wary of outdated, obsolete, and optional advice.

Pygame has been around since the early 2000s, and a lot has changed since then -- both within the framework itself and within the broader computing landscape as a whole. Make sure to check the dates on materials you read (including this guide!), and take older advice with a grain of salt. Here are some common things that stick out to me:

Dirty Rects & performance 'tricks'

When you read older bits of pygame documentation or guides online, you may see some emphasis on only updating portions of the screen that are dirty, for the sake of performance (in this context, "dirty" means the region has changed since the previous frame was drawn).

Generally this entails calling pygame.display.update()Update portions of the screen for software displays (with a list of rects) instead of pygame.display.flip()Update the full display Surface to the screen, not having scrolling backgrounds, or even not filling the screen with a background color every frame because pygame supposedly can't handle it. Some of pygame's API is designed to support this paradigm as well (e.g. pygame.sprite.RenderUpdates()Group sub-class that tracks dirty updates.), which made a lot of sense in the early years of pygame.

In the present day (2022) though, most modest desktop computers are powerful enough to refresh the entire display once per frame at 60 FPS and beyond. You can have a moving camera, or dynamic backgrounds and your game should run totally fine at 60 FPS. CPUs are more powerful nowadays, and you can use display.flip() without fear.

That being said there are still some times when this old technique is still useful for squeezing out a few extra FPS. For example, with a single screen game like an Asteroids or Space Invaders. Here is the rough process for how it works:

Instead of updating the whole screen every frame, only the parts that changed since the last frame are updated. You do this by keeping track of those rectangles in a list, then calling update(the_dirty_rectangles) at the end of the frame. In detail for a moving sprite:

  • Blit a piece of the background over the sprite's current location, erasing it.

  • Append the sprite's current location rectangle to a list called dirty_rects.

  • Move the sprite.

  • Draw the sprite at its new location.

  • Append the sprite's new location to my dirty_rects list.

  • Call display.update(dirty_rects)

Even though this technique is not required for making performant 2D games with modern CPUs, it is still useful to be aware of. There are also still plenty of other ways to accidentally tank your game's performance with poorly optimized rendering logic. For example, even on modern hardware it's probably too slow to call set_at once per pixel on the display surface. Being mindful of performance is still something you'll have to do.

There just aren't that many 'one neat trick to fix your code performance' tips. Every game is different and there are different problems and different algorithms to solve them efficiently in each type of game. Pretty much every time your 2D game code is failing to hit a reasonable frame rate the underlying cause turns out to be bad algorithm or a misunderstanding of fundamental game design patterns.

If you are having performance problems, first make sure you aren't loading files repeatedly in your game loop, then use one of the many options for profiling your code to find out what is taking up the most time. Once you are armed with at least some knowledge on why your game is slow, try asking the internet (via google), or the pygame community if they've got some better algorithms to help you out.

HWSURFACE and DOUBLEBUF

The HWSURFACE display.set_mode() flag does nothing in pygame versions 2.0.0 and later (you can check the docs if you don't believe me)! There's no reason to use it anymore. Even in pygame 1, its effect is pretty nuanced and generally misunderstood by most pygame users. It was never a magic speed-up flag, unfortunately.

DOUBLEBUF still has some use, but is also not a magic speed up flag.

The Sprite class

You don't need to use the built-in Sprite or Group classes if you don't want to. In a lot of tutorials, it may seem like Sprite is the fundamental "GameObject" of pygame, from which all other objects must derive, but in reality it's pretty much just a wrapper around a Rect and a Surface, with some additional convenience methods. You may find it more intuitive (and fun) to write your game's core logic and classes from scratch.

There is NO rule six.

Don't get distracted by side issues.

Sometimes, new game programmers spend too much time worrying about issues that aren't really critical to their game's success. The desire to get secondary issues 'right' is understandable, but early in the process of creating a game, you cannot even know what the important questions are, let alone what answers you should choose. The result can be a lot of needless prevarication.

For example, consider the question of how to organize your graphics files. Should each frame have its own graphics file, or each sprite? Perhaps all the graphics should be zipped up into one archive? A great deal of time has been wasted on a lot of projects, asking these questions on mailing lists, debating the answers, profiling, etc, etc. This is a secondary issue; any time spent discussing it should have been spent coding the actual game.

The insight here is that it is far better to have a 'pretty good' solution that was actually implemented, than a perfect solution that you never got around to writing.

Rects are your friends.

Pete Shinners' wrapper may have cool alpha effects and fast blitting speeds, but I have to admit my favorite part of pygame is the lowly Rect class. A rect is simply a rectangle -- defined only by the position of its top left corner, its width, and its height. Many pygame functions take rects as arguments, and they also take 'rectstyles', a sequence that has the same values as a rect. So if I need a rectangle that defines the area between 10, 20 and 40, 50, I can do any of the following:

rect = pygame.Rect(10, 20, 30, 30)
rect = pygame.Rect((10, 20, 30, 30))
rect = pygame.Rect((10, 20), (30, 30))
rect = (10, 20, 30, 30)
rect = ((10, 20, 30, 30))

If you use any of the first three versions, however, you get access to Rect's utility functions. These include functions to move, shrink and inflate rects, find the union of two rects, and a variety of collision-detection functions.

For example, suppose I'd like to get a list of all the sprites that contain a point (x, y) -- maybe the player clicked there, or maybe that's the current location of a bullet. It's simple if each sprite has a .rect member -- I just do:

sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)]

Rects have no other relation to surfaces or graphics functions, other than the fact that you can use them as arguments. You can also use them in places that have nothing to do with graphics, but still need to be defined as rectangles. Every project I discover a few new places to use rects where I never thought I'd need them.

Don't bother with pixel-perfect collision detection.

So you've got your sprites moving around, and you need to know whether or not they're bumping into one another. It's tempting to write something like the following:

  • Check to see if the rects are in collision. If they aren't, ignore them.

  • For each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision.

There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision.

Managing the event subsystem.

Pygame's event system is kind of tricky. There are actually two different ways to find out what an input device (keyboard, mouse or joystick) is doing.

The first is by directly checking the state of the device. You do this by calling, say, pygame.mouse.get_pos()get the mouse cursor position or pygame.key.get_pressed()get the state of all keyboard buttons. This will tell you the state of that device at the moment you call the function.

The second method uses the SDL event queue. This queue is a list of events -- events are added to the list as they're detected, and they're deleted from the queue as they're read off.

There are advantages and disadvantages to each system. State-checking (system 1) gives you precision -- you know exactly when a given input was made -- if mouse.get_pressed([0]) is 1, that means that the left mouse button is down right at this moment. The event queue merely reports that the mouse was down at some time in the past; if you check the queue fairly often, that can be ok, but if you're delayed from checking it by other code, input latency can grow. Another advantage of the state-checking system is that it detects "chording" easily; that is, several states at the same time. If you want to know whether the t and f keys are down at the same time, just check:

if key.get_pressed[K_t] and key.get_pressed[K_f]:
    print("Yup!")

In the queue system, however, each keypress arrives in the queue as a completely separate event, so you'd need to remember that the t key was down, and hadn't come up yet, while checking for the f key. A little more complicated.

The state system has one great weakness, however. It only reports what the state of the device is at the moment it's called; if the user hits a mouse button then releases it just before a call to mouse.get_pressed(), the mouse button will return 0 -- get_pressed() missed the mouse button press completely. The two events, MOUSEBUTTONDOWN and MOUSEBUTTONUP, will still be sitting in the event queue, however, waiting to be retrieved and processed.

The lesson is: choose the system that meets your requirements. If you don't have much going on in your loop -- say you're just sitting in a while True loop, waiting for input, use get_pressed() or another state function; the latency will be lower. On the other hand, if every keypress is crucial, but latency isn't as important -- say your user is typing something in an editbox, use the event queue. Some key presses may be slightly late, but at least you'll get them all.

A note about event.poll() vs. wait() -- poll() may seem better, since it doesn't block your program from doing anything while it's waiting for input -- wait() suspends the program until an event is received. However, poll() will consume 100% of available CPU time while it runs, and it will fill the event queue with NOEVENTS. Use set_blocked() to select just those event types you're interested in -- your queue will be much more manageable.

Another note about the event queue -- even if you don't want to use it, you must still clear it periodically because it's still going to be filling up with events in the background as the user presses keys and mouses over the window. On Windows, if your game goes too long without clearing the queue, the operating system will think it has frozen and show a "The application is not responding" message. Iterating over event.get() or simply calling event.clear() once per frame will avoid this.

Colorkey vs. Alpha.

There's a lot of confusion around these two techniques, and much of it comes from the terminology used.

'Colorkey blitting' involves telling pygame that all pixels of a certain color in a certain image are transparent instead of whatever color they happen to be. These transparent pixels are not blitted when the rest of the image is blitted, and so don't obscure the background. This is how we make sprites that aren't rectangular in shape. Simply call Surface.set_colorkey(), and pass in an RGB tuple -- say (0,0,0). This would make every pixel in the source image transparent instead of black.

'Alpha' is different, and it comes in two flavors. 'Image alpha' applies to the whole image, and is probably what you want. Properly known as 'translucency', alpha causes each pixel in the source image to be only partially opaque. For example, if you set a surface's alpha to 192 and then blitted it onto a background, 3/4 of each pixel's color would come from the source image, and 1/4 from the background. Alpha is measured from 255 to 0, where 0 is completely transparent, and 255 is completely opaque. Note that colorkey and alpha blitting can be combined -- this produces an image that is fully transparent in some spots, and semi-transparent in others.

'Per-pixel alpha' is the other flavor of alpha, and it's more complicated. Basically, each pixel in the source image has its own alpha value, from 0 to 255. Each pixel, therefore, can have a different opacity when blitted onto a background. This type of alpha can't be mixed with colorkey blitting, and it overrides per-image alpha. Per-pixel alpha is rarely used in games, and to use it you have to save your source image in a graphic editor with a special alpha channel. It's complicated -- don't use it yet.

Software architecture, design patterns, and games.

You may reach a point where you're comfortable writing code, you're able to solve complex problems without assistance, you understand how to use most of pygame's modules, and yet, as you work on larger projects they always seem to get messier and harder to maintain as time goes on. This can manifest in many ways -- for example, fixing bugs in one place might always seem to create new bugs elsewhere, figuring out where code should go might become a challenge, adding new things might frequently require you to rewrite many other things, and so on. Finally, you decide to cut your losses and start fresh on something new.

This is a common issue and it can be frustrating -- on the one hand, your programming skills are improving, and yet you aren't able to finish the games you start due to somewhat nebulous organizational problems.

This brings us to the concept of software architecture and design patterns. You may be familiar with pygame's "standard" base template (there are many equivalent variations of this, so don't stress about the small details too much):

import pygame

pygame.init()

screen = pygame.display.set_mode((1280,720))

clock = pygame.time.Clock()

while True:
    # Process player inputs.
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            raise SystemExit

    # Do logical updates here.
    # ...

    screen.fill("purple")  # Fill the display with a solid color

    # Render the graphics here.
    # ...

    pygame.display.flip()  # Refresh on-screen display
    clock.tick(60)         # wait until next frame (at 60 FPS)

It does some initial setup, starts a loop, and then proceeds to repeatedly collect input, handle the game's logic, and draw the current frame forever until the program ends. The update, render, wait loop shown here is actually a design pattern that serves as the skeleton of most games -- it's prolific because it's clean, it's organized, and it works. (There's also an important but easy-to-miss design feature here in the form of a strict division between the game's logic and rendering routines. This decision alone prevents a whole category of potential bugs related to objects updating and rendering concurrently, which is nice).

It turns out that there are many design patterns like this that are used frequently in games and in software development at large. For a great resource on this specifically for games, I highly recommend Game Programming Patterns, a short free, e-book on the topic. It covers a bunch of useful patterns and concrete situations where you might want to employ them. It won't instantly make you a better coder, but learning some theory about software architecture can go a long way towards helping you escape plateaus and tackle larger projects more confidently.

Do things the pythony way.

A final note (this isn't the least important one; it just comes at the end). Pygame is a pretty lightweight wrapper around SDL, which is in turn a pretty lightweight wrapper around your native OS graphics calls. Chances are pretty good that if your code is still slow, and you've done the things I've mentioned above, then the problem lies in the way you're addressing your data in python. Certain idioms are just going to be slow in python no matter what you do. Luckily, python is a very clear language -- if a piece of code looks awkward or unwieldy, chances are its speed can be improved, too. Read over Why Pygame is Slow for some deeper insight into why pygame might be considered slower than other frameworks/engines, and what that actually means in practice. And if you're truly stumped by performance problems, profilers like cProfile (or SnakeViz, a visualizer for cProfile) can help identify bottlenecks (they'll tell you which parts of the code are taking the longest to execute). That said, premature optimisation is the root of all evil; if it's already fast enough, don't torture the code trying to make it faster. If it's fast enough, let it be :)

There you go. Now you know practically everything I know about using pygame. Now, go write that game!


David Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game.

This guide was substantially updated in 2022.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.869137 pygame-2.6.1/docs/generated/tut/tom_games2.html0000644000175100001770000004211414676242426021053 0ustar00runnerdocker Revision: Pygame fundamentals — pygame v2.6.1 documentation

2. Revision: Pygame fundamentals

2.1. The basic Pygame game

For the sake of revision, and to ensure that you are familiar with the basic structure of a Pygame program, I'll briefly run through a basic Pygame program, which will display no more than a window with some text in it, that should, by the end, look something like this (though of course the window decoration will probably be different on your system):

../_images/tom_basic.png

The full code for this example looks like this:

#!/usr/bin/python

import pygame
from pygame.locals import *

def main():
    # Initialise screen
    pygame.init()
    screen = pygame.display.set_mode((150, 50))
    pygame.display.set_caption('Basic Pygame program')

    # Fill background
    background = pygame.Surface(screen.get_size())
    background = background.convert()
    background.fill((250, 250, 250))

    # Display some text
    font = pygame.font.Font(None, 36)
    text = font.render("Hello There", 1, (10, 10, 10))
    textpos = text.get_rect()
    textpos.centerx = background.get_rect().centerx
    background.blit(text, textpos)

    # Blit everything to the screen
    screen.blit(background, (0, 0))
    pygame.display.flip()

    # Event loop
    while True:
        for event in pygame.event.get():
            if event.type == QUIT:
                return

        screen.blit(background, (0, 0))
        pygame.display.flip()


if __name__ == '__main__': main()

2.2. Basic Pygame objects

As you can see, the code consists of three main objects: the screen, the background, and the text. Each of these objects is created by first calling an instance of an in-built Pygame object, and then modifying it to fit our needs. The screen is a slightly special case, because we still modify the display through Pygame calls, rather than calling methods belonging to the screen object. But for all other Pygame objects, we first create the object as a copy of a Pygame object, giving it some attributes, and build our game objects from them.

With the background, we first create a Pygame Surface object, and make it the size of the screen. We then perform the convert() operation to convert the Surface to a single pixel format. This is more obviously necessary when we have several images and surfaces, all of different pixel formats, which makes rendering them quite slow. By converting all the surfaces, we can drastically speed up rendering times. Finally, we fill the background surface with white (255, 255, 255). These values are RGB (Red Green Blue), and can be worked out from any good paint program.

With the text, we require more than one object. First, we create a font object, which defines which font to use, and the size of the font. Then we create a text object, by using the render method that belongs to our font object, supplying three arguments: the text to be rendered, whether or not it should be anti-aliased (1=yes, 0=no), and the color of the text (again in RGB format). Next we create a third text object, which gets the rectangle for the text. The easiest way to understand this is to imagine drawing a rectangle that will surround all of the text; you can then use this rectangle to get/set the position of the text on the screen. So in this example we get the rectangle, set its centerx attribute to be the centerx attribute of the background (so the text's center will be the same as the background's center, i.e. the text will be centered on the screen on the x axis). We could also set the y coordinate, but it's not any different so I left the text at the top of the screen. As the screen is small anyway, it didn't seem necessary.

2.3. Blitting

Now we have created our game objects, we need to actually render them. If we didn't and we ran the program, we'd just see a blank window, and the objects would remain invisible. The term used for rendering objects is blitting, which is where you copy the pixels belonging to said object onto the destination object. So to render the background object, you blit it onto the screen. In this example, to make things simple, we blit the text onto the background (so the background will now have a copy of the text on it), and then blit the background onto the screen.

Blitting is one of the slowest operations in any game, so you need to be careful not to blit too much onto the screen in every frame. If you have a background image, and a ball flying around the screen, then you could blit the background and then the ball in every frame, which would cover up the ball's previous position and render the new ball, but this would be pretty slow. A better solution is to blit the background onto the area that the ball previously occupied, which can be found by the ball's previous rectangle, and then blitting the ball, so that you are only blitting two small areas.

2.4. The event loop

Once you've set the game up, you need to put it into a loop so that it will continuously run until the user signals that he/she wants to exit. So you start an open while loop, and then for each iteration of the loop, which will be each frame of the game, update the game. The first thing is to check for any Pygame events, which will be the user hitting the keyboard, clicking a mouse button, moving a joystick, resizing the window, or trying to close it. In this case, we simply want to watch out for for user trying to quit the game by closing the window, in which case the game should return, which will end the while loop. Then we simply need to re-blit the background, and flip (update) the display to have everything drawn. OK, as nothing moves or happens in this example, we don't strictly speaking need to re-blit the background in every iteration, but I put it in because when things are moving around on the screen, you will need to do all your blitting here.

2.5. Ta-da!

And that's it - your most basic Pygame game! All games will take a form similar to this, but with lots more code for the actual game functions themselves, which are more to do your with programming, and less guided in structure by the workings of Pygame. This is what this tutorial is really about, and will now go onto.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612181.8941371 pygame-2.6.1/docs/generated/tut/tom_games3.html0000644000175100001770000003543614676242426021065 0ustar00runnerdocker Kicking things off — pygame v2.6.1 documentation

3. Kicking things off

The first sections of code are relatively simple, and, once written, can usually be reused in every game you consequently make. They will do all of the boring, generic tasks like loading modules, loading images, opening networking connections, playing music, and so on. They will also include some simple but effective error handling, and any customisation you wish to provide on top of functions provided by modules like sys and pygame.

3.1. The first lines, and loading modules

First off, you need to start off your game and load up your modules. It's always a good idea to set a few things straight at the top of the main source file, such as the name of the file, what it contains, the license it is under, and any other helpful info you might want to give those who will be looking at it. Then you can load modules, with some error checking so that Python doesn't print out a nasty traceback, which non-programmers won't understand. The code is fairly simple, so I won't bother explaining any of it:

#!/usr/bin/env python
#
# Tom's Pong
# A simple pong game with realistic physics and AI
# http://tomchance.org.uk/projects/pong
#
# Released under the GNU General Public License

VERSION = "0.4"

try:
    import sys
    import random
    import math
    import os
    import getopt
    import pygame
    from socket import *
    from pygame.locals import *
except ImportError as err:
    print(f"couldn't load module. {err}")
    sys.exit(2)

3.2. Resource handling functions

In the Line By Line Chimp example, the first code to be written was for loading images and sounds. As these were totally independent of any game logic or game objects, they were written as separate functions, and were written first so that later code could make use of them. I generally put all my code of this nature first, in their own, classless functions; these will, generally speaking, be resource handling functions. You can of course create classes for these, so that you can group them together, and maybe have an object with which you can control all of your resources. As with any good programming environment, it's up to you to develop your own best practice and style.

It's always a good idea to write your own resource handling functions, because although Pygame has methods for opening images and sounds, and other modules will have their methods of opening other resources, those methods can take up more than one line, they can require consistent modification by yourself, and they often don't provide satisfactory error handling. Writing resource handling functions gives you sophisticated, reusable code, and gives you more control over your resources. Take this example of an image loading function:

def load_png(name):
    """ Load image and return image object"""
    fullname = os.path.join("data", name)
    try:
        image = pygame.image.load(fullname)
        if image.get_alpha() is None:
            image = image.convert()
        else:
            image = image.convert_alpha()
    except FileNotFoundError:
        print(f"Cannot load image: {fullname}")
        raise SystemExit
    return image, image.get_rect()

Here we make a more sophisticated image loading function than the one provided by pygame.image.load()load new image from a file (or file-like object). Note that the first line of the function is a documentation string describing what the function does, and what object(s) it returns. The function assumes that all of your images are in a directory called data, and so it takes the filename and creates the full pathname, for example data/ball.png, using the os module to ensure cross-platform compatibility. Then it tries to load the image, and convert any alpha regions so you can achieve transparency, and it returns a more human-readable error if there's a problem. Finally it returns the image object, and its rect.

You can make similar functions for loading any other resources, such as loading sounds. You can also make resource handling classes, to give you more flexibility with more complex resources. For example, you could make a music class, with an __init__ function that loads the sound (perhaps borrowing from a load_sound() function), a function to pause the music, and a function to restart. Another handy resource handling class is for network connections. Functions to open sockets, pass data with suitable security and error checking, close sockets, finger addresses, and other network tasks, can make writing a game with network capabilities relatively painless.

Remember the chief task of these functions/classes is to ensure that by the time you get around to writing game object classes, and the main loop, there's almost nothing left to do. Class inheritance can make these basic classes especially handy. Don't go overboard though; functions which will only be used by one class should be written as part of that class, not as a global function.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.921137 pygame-2.6.1/docs/generated/tut/tom_games4.html0000644000175100001770000004506214676242426021062 0ustar00runnerdocker Game object classes — pygame v2.6.1 documentation

4. Game object classes

Once you've loaded your modules, and written your resource handling functions, you'll want to get on to writing some game objects. The way this is done is fairly simple, though it can seem complex at first. You write a class for each type of object in the game, and then create an instance of those classes for the objects. You can then use those classes' methods to manipulate the objects, giving objects some motion and interactive capabilities. So your game, in pseudo-code, will look like this:

#!/usr/bin/python

# [load modules here]

# [resource handling functions here]

class Ball:
    # [ball functions (methods) here]
    # [e.g. a function to calculate new position]
    # [and a function to check if it hits the side]

def main:
    # [initiate game environment here]

    # [create new object as instance of ball class]
    ball = Ball()

    while True:
        # [check for user input]

        # [call ball's update function]
        ball.update()

This is, of course, a very simple example, and you'd need to put in all the code, instead of those little bracketed comments. But you should get the basic idea. You create a class, into which you put all the functions for a ball, including __init__, which would create all the ball's attributes, and update, which would move the ball to its new position, before blitting it onto the screen in this position.

You can then create more classes for all of your other game objects, and then create instances of them so that you can handle them easily in the main function and the main program loop. Contrast this with initiating the ball in the main function, and then having lots of classless functions to manipulate a set ball object, and you'll hopefully see why using classes is an advantage: It allows you to put all of the code for each object in one place; it makes using objects easier; it makes adding new objects, and manipulating them, more flexible. Rather than adding more code for each new ball object, you could simply create new instances of the Ball class for each new ball object. Magic!

4.1. A simple ball class

Here is a simple class with the functions necessary for creating a ball object that will, if the update function is called in the main loop, move across the screen:

class Ball(pygame.sprite.Sprite):
    """A ball that will move across the screen
    Returns: ball object
    Functions: update, calcnewpos
    Attributes: area, vector"""

    def __init__(self, vector):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png('ball.png')
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.vector = vector

    def update(self):
        newpos = self.calcnewpos(self.rect,self.vector)
        self.rect = newpos

    def calcnewpos(self,rect,vector):
        (angle,z) = vector
        (dx,dy) = (z*math.cos(angle),z*math.sin(angle))
        return rect.move(dx,dy)

Here we have the Ball class, with an __init__ function that sets the ball up, an update function that changes the ball's rectangle to be in the new position, and a calcnewpos function to calculate the ball's new position based on its current position, and the vector by which it is moving. I'll explain the physics in a moment. The one other thing to note is the documentation string, which is a little bit longer this time, and explains the basics of the class. These strings are handy not only to yourself and other programmers looking at the code, but also for tools to parse your code and document it. They won't make much of a difference in small programs, but with large ones they're invaluable, so it's a good habit to get into.

4.1.1. Diversion 1: Sprites

The other reason for creating a class for each object is sprites. Each image you render in your game will be a sprite object, and so to begin with, the class for each object should inherit the Sprite class. This is a really nice feature of Python - class inheritance. Now the Ball class has all of the functions that come with the Sprite class, and any object instances of the Ball class will be registered by Pygame as sprites. Whereas with text and the background, which don't move, it's OK to blit the object onto the background, Pygame handles sprite objects in a different manner, which you'll see when we look at the whole program's code.

Basically, you create both a ball object, and a sprite object for that ball, and you then call the ball's update function on the sprite object, thus updating the sprite. Sprites also give you sophisticated ways of determining if two objects have collided. Normally you might just check in the main loop to see if their rectangles overlap, but that would involve a lot of code, which would be a waste because the Sprite class provides two functions (spritecollide and groupcollide) to do this for you.

4.1.2. Diversion 2: Vector physics

Other than the structure of the Ball class, the notable thing about this code is the vector physics, used to calculate the ball's movement. With any game involving angular movement, you won't get very far unless you're comfortable with trigonometry, so I'll just introduce the basics you need to know to make sense of the calcnewpos function.

To begin with, you'll notice that the ball has an attribute vector, which is made up of angle and z. The angle is measured in radians, and will give you the direction in which the ball is moving. Z is the speed at which the ball moves. So by using this vector, we can determine the direction and speed of the ball, and therefore how much it will move on the x and y axes:

../_images/tom_radians.png

The diagram above illustrates the basic maths behind vectors. In the left hand diagram, you can see the ball's projected movement represented by the blue line. The length of that line (z) represents its speed, and the angle is the direction in which it will move. The angle for the ball's movement will always be taken from the x axis on the right, and it is measured clockwise from that line, as shown in the diagram.

From the angle and speed of the ball, we can then work out how much it has moved along the x and y axes. We need to do this because Pygame doesn't support vectors itself, and we can only move the ball by moving its rectangle along the two axes. So we need to resolve the angle and speed into its movement on the x axis (dx) and on the y axis (dy). This is a simple matter of trigonometry, and can be done with the formulae shown in the diagram.

If you've studied elementary trigonometry before, none of this should be news to you. But just in case you're forgetful, here are some useful formulae to remember, that will help you visualise the angles (I find it easier to visualise angles in degrees than in radians!)

../_images/tom_formulae.png



Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.949137 pygame-2.6.1/docs/generated/tut/tom_games5.html0000644000175100001770000005143014676242426021057 0ustar00runnerdocker User-controllable objects — pygame v2.6.1 documentation

5. User-controllable objects

So far you can create a Pygame window, and render a ball that will fly across the screen. The next step is to make some bats which the user can control. This is potentially far more simple than the ball, because it requires no physics (unless your user-controlled object will move in ways more complex than up and down, e.g. a platform character like Mario, in which case you'll need more physics). User-controllable objects are pretty easy to create, thanks to Pygame's event queue system, as you'll see.

5.1. A simple bat class

The principle behind the bat class is similar to that of the ball class. You need an __init__ function to initialise the ball (so you can create object instances for each bat), an update function to perform per-frame changes on the bat before it is blitted the bat to the screen, and the functions that will define what this class will actually do. Here's some sample code:

class Bat(pygame.sprite.Sprite):
    """Movable tennis 'bat' with which one hits the ball
    Returns: bat object
    Functions: reinit, update, moveup, movedown
    Attributes: which, speed"""

    def __init__(self, side):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("bat.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.side = side
        self.speed = 10
        self.state = "still"
        self.reinit()

    def reinit(self):
        self.state = "still"
        self.movepos = [0,0]
        if self.side == "left":
            self.rect.midleft = self.area.midleft
        elif self.side == "right":
            self.rect.midright = self.area.midright

    def update(self):
        newpos = self.rect.move(self.movepos)
        if self.area.contains(newpos):
            self.rect = newpos
        pygame.event.pump()

    def moveup(self):
        self.movepos[1] = self.movepos[1] - (self.speed)
        self.state = "moveup"

    def movedown(self):
        self.movepos[1] = self.movepos[1] + (self.speed)
        self.state = "movedown"

As you can see, this class is very similar to the ball class in its structure. But there are differences in what each function does. First of all, there is a reinit function, which is used when a round ends, and the bat needs to be set back in its starting place, with any attributes set back to their necessary values. Next, the way in which the bat is moved is a little more complex than with the ball, because here its movement is simple (up/down), but it relies on the user telling it to move, unlike the ball which just keeps moving in every frame. To make sense of how the bat moves, it is helpful to look at a quick diagram to show the sequence of events:

../_images/tom_event-flowchart.png

What happens here is that the person controlling the bat pushes down on the key that moves the bat up. For each iteration of the main game loop (for every frame), if the key is still held down, then the state attribute of that bat object will be set to "moving", and the moveup function will be called, causing the ball's y position to be reduced by the value of the speed attribute (in this example, 10). In other words, so long as the key is held down, the bat will move up the screen by 10 pixels per frame. The state attribute isn't used here yet, but it's useful to know if you're dealing with spin, or would like some useful debugging output.

As soon as the player lets go of that key, the second set of boxes is invoked, and the state attribute of the bat object will be set back to "still", and the movepos attribute will be set back to [0,0], meaning that when the update function is called, it won't move the bat any more. So when the player lets go of the key, the bat stops moving. Simple!

5.1.1. Diversion 3: Pygame events

So how do we know when the player is pushing keys down, and then releasing them? With the Pygame event queue system, dummy! It's a really easy system to use and understand, so this shouldn't take long :) You've already seen the event queue in action in the basic Pygame program, where it was used to check if the user was quitting the application. The code for moving the bat is about as simple as that:

for event in pygame.event.get():
    if event.type == QUIT:
        return
    elif event.type == KEYDOWN:
        if event.key == K_UP:
            player.moveup()
        if event.key == K_DOWN:
            player.movedown()
    elif event.type == KEYUP:
        if event.key == K_UP or event.key == K_DOWN:
            player.movepos = [0,0]
            player.state = "still"

Here assume that you've already created an instance of a bat, and called the object player. You can see the familiar layout of the for structure, which iterates through each event found in the Pygame event queue, which is retrieved with the event.get() function. As the user hits keys, pushes mouse buttons and moves the joystick about, those actions are pumped into the Pygame event queue, and left there until dealt with. So in each iteration of the main game loop, you go through these events, checking if they're ones you want to deal with, and then dealing with them appropriately. The event.pump() function that was in the Bat.update function is then called in every iteration to pump out old events, and keep the queue current.

First we check if the user is quitting the program, and quit it if they are. Then we check if any keys are being pushed down, and if they are, we check if they're the designated keys for moving the bat up and down. If they are, then we call the appropriate moving function, and set the player state appropriately (though the states moveup and movedown and changed in the moveup() and movedown() functions, which makes for neater code, and doesn't break encapsulation, which means that you assign attributes to the object itself, without referring to the name of the instance of that object). Notice here we have three states: still, moveup, and movedown. Again, these come in handy if you want to debug or calculate spin. We also check if any keys have been "let go" (i.e. are no longer being held down), and again if they're the right keys, we stop the bat from moving.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612181.996137 pygame-2.6.1/docs/generated/tut/tom_games6.html0000644000175100001770000014714414676242426021070 0ustar00runnerdocker Putting it all together — pygame v2.6.1 documentation

6. Putting it all together

So far you've learnt all the basics necessary to build a simple game. You should understand how to create Pygame objects, how Pygame displays objects, how it handles events, and how you can use physics to introduce some motion into your game. Now I'll just show how you can take all those chunks of code and put them together into a working game. What we need first is to let the ball hit the sides of the screen, and for the bat to be able to hit the ball, otherwise there's not going to be much gameplay involved. We do this using Pygame's collision methods.

6.1. Let the ball hit sides

The basic principle behind making it bounce of the sides is easy to grasp. You grab the coordinates of the four corners of the ball, and check to see if they correspond with the x or y coordinate of the edge of the screen. So if the top right and top left corners both have a y coordinate of zero, you know that the ball is currently on the top edge of the screen. We do all this in the update function, after we've worked out the new position of the ball.

if not self.area.contains(newpos):
      tl = not self.area.collidepoint(newpos.topleft)
      tr = not self.area.collidepoint(newpos.topright)
      bl = not self.area.collidepoint(newpos.bottomleft)
      br = not self.area.collidepoint(newpos.bottomright)
      if tr and tl or (br and bl):
              angle = -angle
      if tl and bl:
              self.offcourt(player=2)
      if tr and br:
              self.offcourt(player=1)

self.vector = (angle,z)

Here we check to see if the area contains the new position of the ball (it always should, so we needn't have an else clause, though in other circumstances you might want to consider it). We then check if the coordinates for the four corners are colliding with the area's edges, and create objects for each result. If they are, the objects will have a value of 1, or True. If they don't, then the value will be None, or False. We then see if it has hit the top or bottom, and if it has we change the ball's direction. Handily, using radians we can do this by simply reversing its positive/negative value. We also check to see if the ball has gone off the sides, and if it has we call the offcourt function. This, in my game, resets the ball, adds 1 point to the score of the player specified when calling the function, and displays the new score.

Finally, we recompile the vector based on the new angle. And that is it. The ball will now merrily bounce off the walls and go offcourt with good grace.

6.2. Let the ball hit bats

Making the ball hit the bats is very similar to making it hit the sides of the screen. We still use the collide method, but this time we check to see if the rectangles for the ball and either bat collide. In this code I've also put in some extra code to avoid various glitches. You'll find that you'll have to put all sorts of extra code in to avoid glitches and bugs, so it's good to get used to seeing it.

else:
    # Deflate the rectangles so you can't catch a ball behind the bat
    player1.rect.inflate(-3, -3)
    player2.rect.inflate(-3, -3)

    # Do ball and bat collide?
    # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next
    # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the
    # bat, the ball reverses, and is still inside the bat, so bounces around inside.
    # This way, the ball can always escape and bounce away cleanly
    if self.rect.colliderect(player1.rect) == 1 and not self.hit:
        angle = math.pi - angle
        self.hit = not self.hit
    elif self.rect.colliderect(player2.rect) == 1 and not self.hit:
        angle = math.pi - angle
        self.hit = not self.hit
    elif self.hit:
        self.hit = not self.hit
self.vector = (angle,z)

We start this section with an else statement, because this carries on from the previous chunk of code to check if the ball hits the sides. It makes sense that if it doesn't hit the sides, it might hit a bat, so we carry on the conditional statement. The first glitch to fix is to shrink the players' rectangles by 3 pixels in both dimensions, to stop the bat catching a ball that goes behind them (if you imagine you just move the bat so that as the ball travels behind it, the rectangles overlap, and so normally the ball would then have been "hit" - this prevents that).

Next we check if the rectangles collide, with one more glitch fix. Notice that I've commented on these odd bits of code - it's always good to explain bits of code that are abnormal, both for others who look at your code, and so you understand it when you come back to it. The without the fix, the ball might hit a corner of the bat, change direction, and one frame later still find itself inside the bat. Then it would again think it has been hit, and change its direction. This can happen several times, making the ball's motion completely unrealistic. So we have a variable, self.hit, which we set to True when it has been hit, and False one frame later. When we check if the rectangles have collided, we also check if self.hit is True/False, to stop internal bouncing.

The important code here is pretty easy to understand. All rectangles have a colliderect function, into which you feed the rectangle of another object, which returns True if the rectangles do overlap, and False if not. If they do, we can change the direction by subtracting the current angle from pi (again, a handy trick you can do with radians, which will adjust the angle by 90 degrees and send it off in the right direction; you might find at this point that a thorough understanding of radians is in order!). Just to finish the glitch checking, we switch self.hit back to False if it's the frame after they were hit.

We also then recompile the vector. You would of course want to remove the same line in the previous chunk of code, so that you only do this once after the if-else conditional statement. And that's it! The combined code will now allow the ball to hit sides and bats.

6.3. The Finished product

The final product, with all the bits of code thrown together, as well as some other bits ofcode to glue it all together, will look like this:

#
# Tom's Pong
# A simple pong game with realistic physics and AI
# http://tomchance.org.uk/projects/pong
#
# Released under the GNU General Public License

VERSION = "0.4"

try:
    import sys
    import random
    import math
    import os
    import getopt
    import pygame
    from socket import *
    from pygame.locals import *
except ImportError, err:
    print(f"couldn't load module. {err}")
    sys.exit(2)

def load_png(name):
    """ Load image and return image object"""
    fullname = os.path.join("data", name)
    try:
        image = pygame.image.load(fullname)
        if image.get_alpha is None:
            image = image.convert()
        else:
            image = image.convert_alpha()
    except FileNotFoundError:
        print(f"Cannot load image: {fullname}")
        raise SystemExit
    return image, image.get_rect()

class Ball(pygame.sprite.Sprite):
    """A ball that will move across the screen
    Returns: ball object
    Functions: update, calcnewpos
    Attributes: area, vector"""

    def __init__(self, (xy), vector):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("ball.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.vector = vector
        self.hit = 0

    def update(self):
        newpos = self.calcnewpos(self.rect,self.vector)
        self.rect = newpos
        (angle,z) = self.vector

        if not self.area.contains(newpos):
            tl = not self.area.collidepoint(newpos.topleft)
            tr = not self.area.collidepoint(newpos.topright)
            bl = not self.area.collidepoint(newpos.bottomleft)
            br = not self.area.collidepoint(newpos.bottomright)
            if tr and tl or (br and bl):
                angle = -angle
            if tl and bl:
                #self.offcourt()
                angle = math.pi - angle
            if tr and br:
                angle = math.pi - angle
                #self.offcourt()
        else:
            # Deflate the rectangles so you can't catch a ball behind the bat
            player1.rect.inflate(-3, -3)
            player2.rect.inflate(-3, -3)

            # Do ball and bat collide?
            # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next
            # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the
            # bat, the ball reverses, and is still inside the bat, so bounces around inside.
            # This way, the ball can always escape and bounce away cleanly
            if self.rect.colliderect(player1.rect) == 1 and not self.hit:
                angle = math.pi - angle
                self.hit = not self.hit
            elif self.rect.colliderect(player2.rect) == 1 and not self.hit:
                angle = math.pi - angle
                self.hit = not self.hit
            elif self.hit:
                self.hit = not self.hit
        self.vector = (angle,z)

    def calcnewpos(self,rect,vector):
        (angle,z) = vector
        (dx,dy) = (z*math.cos(angle),z*math.sin(angle))
        return rect.move(dx,dy)

class Bat(pygame.sprite.Sprite):
    """Movable tennis 'bat' with which one hits the ball
    Returns: bat object
    Functions: reinit, update, moveup, movedown
    Attributes: which, speed"""

    def __init__(self, side):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png("bat.png")
        screen = pygame.display.get_surface()
        self.area = screen.get_rect()
        self.side = side
        self.speed = 10
        self.state = "still"
        self.reinit()

    def reinit(self):
        self.state = "still"
        self.movepos = [0,0]
        if self.side == "left":
            self.rect.midleft = self.area.midleft
        elif self.side == "right":
            self.rect.midright = self.area.midright

    def update(self):
        newpos = self.rect.move(self.movepos)
        if self.area.contains(newpos):
            self.rect = newpos
        pygame.event.pump()

    def moveup(self):
        self.movepos[1] = self.movepos[1] - (self.speed)
        self.state = "moveup"

    def movedown(self):
        self.movepos[1] = self.movepos[1] + (self.speed)
        self.state = "movedown"


def main():
    # Initialise screen
    pygame.init()
    screen = pygame.display.set_mode((640, 480))
    pygame.display.set_caption("Basic Pong")

    # Fill background
    background = pygame.Surface(screen.get_size())
    background = background.convert()
    background.fill((0, 0, 0))

    # Initialise players
    global player1
    global player2
    player1 = Bat("left")
    player2 = Bat("right")

    # Initialise ball
    speed = 13
    rand = ((0.1 * (random.randint(5,8))))
    ball = Ball((0,0),(0.47,speed))

    # Initialise sprites
    playersprites = pygame.sprite.RenderPlain((player1, player2))
    ballsprite = pygame.sprite.RenderPlain(ball)

    # Blit everything to the screen
    screen.blit(background, (0, 0))
    pygame.display.flip()

    # Initialise clock
    clock = pygame.time.Clock()

    # Event loop
    while True:
        # Make sure game doesn't run at more than 60 frames per second
        clock.tick(60)

        for event in pygame.event.get():
            if event.type == QUIT:
                return
            elif event.type == KEYDOWN:
                if event.key == K_a:
                    player1.moveup()
                if event.key == K_z:
                    player1.movedown()
                if event.key == K_UP:
                    player2.moveup()
                if event.key == K_DOWN:
                    player2.movedown()
            elif event.type == KEYUP:
                if event.key == K_a or event.key == K_z:
                    player1.movepos = [0,0]
                    player1.state = "still"
                if event.key == K_UP or event.key == K_DOWN:
                    player2.movepos = [0,0]
                    player2.state = "still"

        screen.blit(background, ball.rect, ball.rect)
        screen.blit(background, player1.rect, player1.rect)
        screen.blit(background, player2.rect, player2.rect)
        ballsprite.update()
        playersprites.update()
        ballsprite.draw(screen)
        playersprites.draw(screen)
        pygame.display.flip()


if __name__ == "__main__":
    main()

As well as showing you the final product, I'll point you back to TomPong, upon which all of this is based. Download it, have a look at the source code, and you'll see a full implementation of pong using all of the code you've seen in this tutorial, as well as lots of other code I've added in various versions, such as some extra physics for spinning, and various other bug and glitch fixes.

Oh, find TomPong at http://tomchance.org.uk/projects/pong.




Edit on GitHub
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0311258 pygame-2.6.1/docs/licenses/0000755000175100001770000000000014676242436015162 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.FLAC.txt0000644000175100001770000000276214676242340017512 0ustar00runnerdockerCopyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.fluidsynth.txt0000644000175100001770000006353514676242340021203 0ustar00runnerdocker GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. (This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.) Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {description} Copyright (C) {year} {fullname} This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. {signature of Ty Coon}, 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.freetype.txt0000644000175100001770000001540014676242340020621 0ustar00runnerdocker The FreeType Project LICENSE ---------------------------- 2006-Jan-27 Copyright 1996-2002, 2006 by David Turner, Robert Wilhelm, and Werner Lemberg Introduction ============ The FreeType Project is distributed in several archive packages; some of them may contain, in addition to the FreeType font engine, various tools and contributions which rely on, or relate to, the FreeType Project. This license applies to all files found in such packages, and which do not fall under their own explicit license. The license affects thus the FreeType font engine, the test programs, documentation and makefiles, at the very least. This license was inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses, which all encourage inclusion and use of free software in commercial and freeware products alike. As a consequence, its main points are that: o We don't promise that this software works. However, we will be interested in any kind of bug reports. (`as is' distribution) o You can use this software for whatever you want, in parts or full form, without having to pay us. (`royalty-free' usage) o You may not pretend that you wrote this software. If you use it, or only parts of it, in a program, you must acknowledge somewhere in your documentation that you have used the FreeType code. (`credits') We specifically permit and encourage the inclusion of this software, with or without modifications, in commercial products. We disclaim all warranties covering The FreeType Project and assume no liability related to The FreeType Project. Finally, many people asked us for a preferred form for a credit/disclaimer to use in compliance with this license. We thus encourage you to use the following text: """ Portions of this software are copyright © The FreeType Project (www.freetype.org). All rights reserved. """ Please replace with the value from the FreeType version you actually use. Legal Terms =========== 0. Definitions -------------- Throughout this license, the terms `package', `FreeType Project', and `FreeType archive' refer to the set of files originally distributed by the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be they named as alpha, beta or final release. `You' refers to the licensee, or person using the project, where `using' is a generic term including compiling the project's source code as well as linking it to form a `program' or `executable'. This program is referred to as `a program using the FreeType engine'. This license applies to all files distributed in the original FreeType Project, including all source code, binaries and documentation, unless otherwise stated in the file in its original, unmodified form as distributed in the original archive. If you are unsure whether or not a particular file is covered by this license, you must contact us to verify this. The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. All rights reserved except as specified below. 1. No Warranty -------------- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. 2. Redistribution ----------------- This license grants a worldwide, royalty-free, perpetual and irrevocable right and license to use, execute, perform, compile, display, copy, create derivative works of, distribute and sublicense the FreeType Project (in both source and object code forms) and derivative works thereof for any purpose; and to authorize others to exercise some or all of the rights granted herein, subject to the following conditions: o Redistribution of source code must retain this license file (`FTL.TXT') unaltered; any additions, deletions or changes to the original files must be clearly indicated in accompanying documentation. The copyright notices of the unaltered, original files must be preserved in all copies of source files. o Redistribution in binary form must provide a disclaimer that states that the software is based in part of the work of the FreeType Team, in the distribution documentation. We also encourage you to put an URL to the FreeType web page in your documentation, though this isn't mandatory. These conditions apply to any software derived from or based on the FreeType Project, not just the unmodified files. If you use our work, you must acknowledge us. However, no fee need be paid to us. 3. Advertising -------------- Neither the FreeType authors and contributors nor you shall use the name of the other for commercial, advertising, or promotional purposes without specific prior written permission. We suggest, but do not require, that you use one or more of the following phrases to refer to this software in your documentation or advertising materials: `FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. As you have not signed this license, you are not required to accept it. However, as the FreeType Project is copyrighted material, only this license, or another one contracted with the authors, grants you the right to use, distribute, and modify it. Therefore, by using, distributing, or modifying the FreeType Project, you indicate that you understand and accept all the terms of this license. 4. Contacts ----------- There are two mailing lists related to FreeType: o freetype@nongnu.org Discusses general use and applications of FreeType, as well as future and wanted additions to the library and distribution. If you are looking for support, start in this list if you haven't found anything to help you in the documentation. o freetype-devel@nongnu.org Discusses bugs, as well as engine internals, design issues, specific licenses, porting, etc. Our home page can be found at https://www.freetype.org --- end of FTL.TXT --- ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.jpeg.txt0000644000175100001770000000571514676242340017733 0ustar00runnerdockerLEGAL ISSUES ============ In plain English: 1. We don't promise that this software works. (But if you find any bugs, please let us know!) 2. You can use this software for whatever you want. You don't have to pay us. 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. In legalese: The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltmain.sh). Another support script, install-sh, is copyright by X Consortium but is also freely distributable. The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW patent (now expired), GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by all standard GIF decoders. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.modplug.txt0000644000175100001770000000007314676242340020445 0ustar00runnerdockerModPlug-XMMS and libmodplug are now in the public domain. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.mpg123.txt0000644000175100001770000012102014676242340020003 0ustar00runnerdockerThis is the file that contains the terms of use, copying, etc. for the mpg123 distribution package. Main message, to include in "About ..." boxes, etc: Copyright (c) 1995-2013 by Michael Hipp and others, free software under the terms of the LGPL v2.1 There is an attempt to cover the actual list of authors in the AUTHORS file. Project maintainer since 2006 is Thomas Orgis and many people have contributed since the Michael Hipp era, but he stays the initial source and it would be impractical to count them all individually, so it's "and others". Source files contain the phrase "the mpg123 project" to the same effect in their license boilerplate; especially those that were added after maintainership changed. The person mainly responsible for the first version is usually named in the phrase "initially written by ...". All files in the distribution that don't carry a license note on their own are licensed under the terms of the LGPL 2.1; exceptions may apply, especially to files not in the official distribution but in the revision control repository. The formal license text follows. ======================= 1. The LGPL version 2.1 ======================= GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ==================== 2. The GPL version 2 ==================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.numpy.txt0000644000175100001770000000300714676242340020146 0ustar00runnerdockerCopyright (c) 2005-2020, NumPy Developers. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the NumPy Developers nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.ogg-vorbis.txt0000644000175100001770000000273214676242340021060 0ustar00runnerdockerCopyright (c) 2002-2008 Xiph.org Foundation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.opus.txt0000644000175100001770000000366414676242340017775 0ustar00runnerdockerCopyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Opus is subject to the royalty-free patent licenses which are specified at: Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/ Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/ Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.opusfile.txt0000644000175100001770000000275314676242340020633 0ustar00runnerdockerCopyright (c) 1994-2013 Xiph.Org Foundation and contributors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Xiph.Org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/licenses/LICENSE.png.txt0000644000175100001770000001254714676242340017573 0ustar00runnerdockerCOPYRIGHT NOTICE, DISCLAIMER, and LICENSE ========================================= PNG Reference Library License version 2 --------------------------------------- * Copyright (c) 1995-2019 The PNG Reference Library Authors. * Copyright (c) 2018-2019 Cosmin Truta. * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. * Copyright (c) 1996-1997 Andreas Dilger. * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. The software is supplied "as is", without warranty of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose, title, and non-infringement. In no event shall the Copyright owners, or anyone distributing the software, be liable for any damages or other liability, whether in contract, tort or otherwise, arising from, out of, or in connection with the software, or the use or other dealings in the software, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this software, or portions hereof, for any purpose, without fee, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated, but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) ----------------------------------------------------------------------- libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors: Simon-Pierre Cadieux Eric S. Raymond Mans Rullgard Cosmin Truta Gilles Vollant James Yu Mandar Sahastrabuddhe Google Inc. Vadim Barkov and with the following additions to the disclaimer: There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. Some files in the "contrib" directory and some configure-generated files that are distributed with libpng have other copyright owners, and are released under other open source licenses. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from libpng-0.96, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, and are distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner Some files in the "scripts" directory have other copyright owners, but are released under this license. libpng versions 0.5, May 1995, through 0.88, January 1996, are Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals: Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.portmidi.txt0000644000175100001770000002611614676242340020633 0ustar00runnerdocker Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2013 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.sdl2.txt0000644000175100001770000000164214676242340017645 0ustar00runnerdocker Simple DirectMedia Layer Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.sdl2_image.txt0000644000175100001770000000174414676242340021012 0ustar00runnerdocker/* SDL_image: An example image loading library for use with SDL Copyright (C) 1997-2019 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.sdl2_mixer.txt0000644000175100001770000000174214676242340021052 0ustar00runnerdocker/* SDL_mixer: An audio mixer library based on the SDL library Copyright (C) 1997-2018 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.sdl_gfx.txt0000755000175100001770000000027714676242340020435 0ustar00runnerdockerSDL_gfx COPYING Library is governed under the ZLib license. http://www.zlib.net/zlib_license.html (C) A. Schiffler, aschiffler [at] ferzkopp.net 2012-2018, licensed under the zlib license ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.sse2neon-h.txt0000644000175100001770000000345014676242340020761 0ustar00runnerdocker// This header file provides a simple API translation layer // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions // // This header file does not yet translate all of the SSE intrinsics. // // Contributors to this work are: // John W. Ratcliff // Brandon Rowlett // Ken Fast // Eric van Beurden // Alexander Potylitsin // Hasindu Gamaarachchi // Jim Huang // Mark Cheng // Malcolm James MacLeod // Devin Hussey (easyaspi314) // Sebastian Pop /* * The MIT license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.tiff.txt0000644000175100001770000000221014676242340017721 0ustar00runnerdockerCopyright (c) 1988-1997 Sam Leffler Copyright (c) 1991-1997 Silicon Graphics, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.webp.txt0000644000175100001770000000276614676242340017746 0ustar00runnerdockerCopyright (c) 2010, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/licenses/LICENSE.zlib.txt0000644000175100001770000000303214676242340017734 0ustar00runnerdockerCopyright notice: (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu If you use the zlib library in a product, we would appreciate *not* receiving lengthy legal documents to sign. The sources are provided for free but without warranty of any kind. The library has been entirely written by Jean-loup Gailly and Mark Adler; it does not include third-party code. If you redistribute modified sources, we would appreciate that you include in the file ChangeLog history information documenting your changes. Please read the FAQ for more information on the distribution of modified source versions. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0321257 pygame-2.6.1/docs/reST/0000755000175100001770000000000014676242436014232 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0321257 pygame-2.6.1/docs/reST/_static/0000755000175100001770000000000014676242436015660 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/reST/_static/legacy_logos.zip0000644000175100001770000014416314676242340021056 0ustar00runnerdockerPK[(S`ablegacy_logos/pygame_logo.gifWw<ԏ6gee[g8DOCF 9d"TH e4$$׿^|^/ :^o b@0 Acy&6wrPo\kI~w[)/VoXn\Wh$}qk$ "uHg745#-)7/NVfQaqNN^n^AafqIqaEeieYiu;z 2:KP{[-M:--}Z`鱧ӳ/i.j_oF ={>888jzbfjbv~fŕOKKV?9;=0[̂T`8r8 #nQf^5U ^oe ^x@ƮEG]e j_jGm/xT"d~ڼ@cqlڢܢqQDgBq<f߶1^G imBQbN`$ /2]^N{/uӤÏHk%~N1qShRi4SYv}{}ΪrfGswp(T IךO=_ CpNJCy'.>~ٖ9LٮyB|!j8 E-W`1 DU !%R-Kc# , BQVh5d1 ͸A9g#G/ X殥;\V#Lޤ͖$/K@6(8)SZ7J<+mowgʞ¼E~ZV)uTu&yWjhUj(E ta9%*e[!ɂtFFE'O UƓe=bDa4Z' VX-j9U֙[EҦޜUБ )­FpOe'^?oU|1x940t2 HR"=_\:8!+Cd)L@%uw_h7V߱-LCz q4jK-e n v'417,NbPo{eʮ'ǔ&$xOj.[J^e9][2(]HMԫ'Ez?#0(]aW'FVIAg[$iQN9IluDb(HYiZ:^oNU4'TEVatnŦ" %#ڦ*8 A=.Ps*$GvAn[ÐIrH^ w^1$gZ^#(%v]0y8wJJ-W-.Hb-k: 1*&#v! bϟ 9h2k,ٖIY'ie2 Dܞ[c\ыQ7`Yl'tIu_ѳea[ G*%p}]<=A0bH1KnqAag,CXYZsacۋ/>bGLl9b6S}$:\~,DBI6B`'/d^̼ȫ*Zo5Te~gf! LϹ O*%+s^N7TtCGd?| UicIHb{AybmVh V3T6I_Dkϕ'k,J)~$йϳ6)YT?veL1gmRb._ h/*nLgؒ*7Leِ!;Ό9r8{Wpt箙}FBP/Z3 ߷_EC=謺_1%۫K^lE7^e['H3i1=E$J^|Å_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ǓDv,a_ͰQD˥r=$LzBգ1)GK D"JTpcM=.(IԲx:GRrN@D!Qf"^z-L hѠFSec~3Z[Ӗ[qDm[6Hr͵jRK0.KVFfH2uD:B)wn_k#PաaO]f7$;&2o2R1tHHksml˙nø5&wὫ<5z^mkk:Q h>k+T*4=`#/gL /Y$Sh5A .e##XjXϲ_6Ϳ+&-vzv?z;ir7g?WBbMPfKA A@]#UEu7#-蕕OCj 1-D{Ȥun~R=kᵪ~WmDaǖI),)G`I=%$ ͖+,Rz mH $jؽbg:UK$a>yLP=4%:ӦdwԗiݏuR@>!ܾ G( _{y= }T {o<)&euU kC~g ']o:PBAw> DM05" T!Ri{4*@ sE3#5Doy%e{HW o!btWFh5c""L&U}՜,<T6adh:~~쿛"0M8BrD5fgV/cٺ؀ [z2ξ8XwAYq/d0g("6_D 5I/5[Py0$I~سB Y֨ŧ 0,(j;/I{f{O׃e`už_0ܩz;bWH+Qg)-o)}-T6@aK)Uq {yRL}FZ[⿋&(qݘ v ]2뵜; yR85Wfkӕ:r{D^$ȿ PK[(S`ab legacy_logos/pygame_logo.gifPK[(S1&X'' blegacy_logos/pygame_powered.gifPK[(Ss!'.( legacy_logos/pygame_small.gifPK[(S%ύ7m legacy_logos/pygame_tiny.gifPK,1././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/reST/_static/pygame.ico0000644000175100001770000000206614676242340017634 0ustar00runnerdocker &(( @33333;033333333;38xww8wwwwwxwwpwpwwxwwwxx;3xp30;0;03;3;;33;;33x338p0?px;0;?;0;?;??3󻳳; 8x;03;30?(  wp   0 0 ;  c././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/reST/_static/pygame_lofi.png0000644000175100001770000040614214676242340020662 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h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w1MȓBV4a\5=o ۅPMD*M544=doe -rD)gh/^)}T}v\ع c19f 1.T(6sQmn敜 .790 0 øYXPO:RCiLfgaǤ>)K#!B(5[Yl)D(#iAHq@q-Rym!6Z0tF(rXWzB*K難Y!BžBJ *SB(=_ aTȩMqd4)k9'pJkL/Ri{(laa7ƘL/)n7!4  J +'\eb$ChE $.iQ%dXd%)5VO,qda=):@BsRw L #q]Zo(6yQR5WYrN4`aa?Dܤfl-v3F!!X+Dcg@ݥMRCY 9 Jwh=VGGy&aƹ(JF5(g$ q4>MHc2Ro{}aZM(Qv1 0 09iYPVHBOY]gaat2 @NRCv>JBiJ2_GgaaSR;KNt# Q*^NiʊrBpzNaaat?qIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/reST/_static/pygame_lofi.svg0000644000175100001770000016362114676242340020677 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/reST/_static/pygame_logo.png0000644000175100001770000040174414676242340020674 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace {AIDATx^Ggn]-H bF݈}qwww}N=D Azpu?gp{]U/rbcUQaWQںn U4  DDDDDDDDDD}$Qq*Fp_"ph`򁈈 ! !;>Pq*dgQwQqUc!5ņ㰎 c7ʅÝpuWQ]@M ڏEK={ae岙Se*>W7TxTiL2.2o{Td6eg$cM~o-3Wq)0.W̄ztuN] k[QX*w$Q!͛R>Rv#qv Z p%[w.'_W/YJ@Ż*S )D DDDDDDDDDD*V=wpkmwHv'Fp[gUK168C<}D DDDDDDDDDD=Ki/Qq>Rlxl^%M;HHOd o^qkUT400@DDDDDDDDDsdkc*Gɛp`NABP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^eڊޞk#9AAAU&QvIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/reST/_static/pygame_logo.svg0000644000175100001770000016357614676242340020717 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/reST/_static/pygame_powered.png0000644000175100001770000053730714676242340021406 0ustar00runnerdockerPNG  IHDRQ ^{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace DIDATx^xoa6eL6effffefff& fٖ3 4V=3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""a=$y*Z1FE:VԴKXEPQ$ $N<*"QX"( xFE Y=ҝ!ɕ7Tb O}\"""""""""mWWHoF scHƌG7rhh.ڶQo>X?s1Q2ZOU IH"(1BDDDDDDDDD?嫸[Łzb#0vITH6$0zٝ vg'v6l^N<,^o?^ϕ;**zW]GxS&wND(=5{(P!*ĕ(DDDDDDDDDD}~*^Voy^ clFđDO T]}RCN[ڀ*S?l*b*d^ٴ Ac*X]3=&QmT|!nN@T6fs].)?fۀ=Y=ڍ*.Wђ]cC<4BDB*HB*sTȊ)&F1$ QQ7I'<4;9WEڐ܇NZ/k'mG[M7U ILV*U|+Qa짰1BDDDDDDDDD78U|blo Kd3,6IiCc=?>wԡ!Yƌpa<~LH͈Wθ {9NH2%)"?ڮa⓯eANGT3;I"""""""""/e s|0Cu=~'kL W*m.Lx yݭTzҝwީ{5;,qeA$Rڒf5/c ._U]@U_?vCcN )tbG(#Te;2]OXhNU9hy'ιz{R8K=pa(~TL N'U#Iyb 8[_}J\}*k 8spm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v,:1S},dZ5PM|BD/ OJYVXA;X  pe#g,Apݠv踋F&)`ى#Ybh '3*HP&u Y VCg静62=3bG= =DeYpa }D eRNAAfƂc Ʊ3=Vc/ _(ݢwhcV%_u.fY5\+Xf~x3g208oF[S7e7u +wuˮa[,AAA*GMP.Rn8ǰd92e^Z@H ,T y8 pJYVzNðE2K @P8 6sP _a!M SYBB迃0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/reST/_static/pygame_powered.svg0000644000175100001770000031064314676242340021411 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/reST/_static/pygame_powered_lowres.png0000644000175100001770000053730714676242340023001 0ustar00runnerdockerPNG  IHDRe(4} pHYs.#.#x?vIIDATh[[h\EfIf5mMe[RPQЇ(X/Rԇo/mQJQTФ^bm^6p?;g̹593\& pαa~HW&v6}Kf󣌟o$Oa(py 1.WJc0qq+7 Zq_ÚB13!3f/'*4kƘr=q55*%ՇųYhXwI(.mԹnʵ}7ϗtb+\ۇٙ_1% U/a{0f.4mc/W>`<2ٍE޴C(Yzx3Q3yP2,,ٗM;sQydE[doqaC.@qV 8 d@N8]wu%n`8I9[1VYnˍgQλ|cטz «ǘKe;BMU~%2]xt>;4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0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/reST/_static/pygame_tiny.png0000644000175100001770000003571614676242340020721 0ustar00runnerdockerPNG  IHDR<BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs.!.![NiTXtXML:com.adobe.xmp Pygame Logo Trace {A4IDATx^|TU>ܹ{!@BRHQTPQDֲv׮ꢋETl(*""H*IHH/L=w& <={F45w\y>5YE8tmY`ghD#BELi\%$r_:^q8OtTnoe ,sF]KԖH&:S\5{fQny$* l*q)5H O3wKC%Ek9ZذJ.$р\ﵝ}Vۭ98F`5 xT;hcZ]y.6Cɱq@E{ pe+@ΊIsaB3 7{_hEmшt tfl],i{E]N4h>]|kG|Egш?(:Sw+nqJNѣň4̗80{`5 iyʀNM%8sb̙7o{9̞1¥1k,7G|ᶟ|u4 QV HpA3֪k׮5jsFej~a!\o8fֹsth̤Včâ/OxxΐkhKNbl[`М@x &jS`!Tv9v3`-[>r&B3 B?'X &^6iGiWR]_O-[(0[nk{,_ rM-2^EVTF&,9א-Q_[d0HM69.;_YHɸtWL  PNeba2Hƚt-$֊up@ L9J! azW(7@O2I7ݔKensIDPzYlޜ_.|$r4iXr/gH6c)(·CkΫh cA2" zt8"s8{6-2mT`>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". html_title = f"{project} v{version} documentation" # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. html_logo = '_static/pygame_tiny.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. html_favicon = '_static/pygame.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra files that should be included in the build. html_extra_path = ['../LGPL.txt'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. html_use_modindex = False # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = False # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'Pygamedoc' # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Pygame.tex', 'Pygame Documentation', 'Pygame Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_use_modindex = True #-- Options for C header output ------------------------------------------------ # Target directory for header files (default: current working directory). headers_dest = './_headers' # Whether or not to create target directory tree if it does not exist # (default: no directory creation). headers_mkdirs = True # Suffix to add for header file names before the '.h' extension # (default: no suffix). headers_filename_sfx = '_doc' smartquotes = False edit_on_github_project = 'pygame/pygame' edit_on_github_branch = 'main' ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0341258 pygame-2.6.1/docs/reST/ext/0000755000175100001770000000000014676242436015032 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0341258 pygame-2.6.1/docs/reST/ext/__pycache__/0000755000175100001770000000000014676242436017242 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2931414 pygame-2.6.1/docs/reST/ext/__pycache__/boilerplate.cpython-310.pyc0000644000175100001770000002472314676242415024252 0ustar00runnerdockero Df9(@sdZddlmZmZmZmZmZmZddlm Z m Z ddl m Z m Z mZmZmZddl mZddlmZddlmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'ddl(Z(ddl)Z)dd l*m+Z+Gd d d eZ,d d Z-GdddeZ.ddZ/ddZ0ddZ1GdddeZ2ddZ3ddZ4ddZ5e0Z6GdddeZ7e5Z8dZ9d d!Z:d"d#Z;d$d%Zd:d*d+Z?d,d-Z@d;d.d/ZAd0d1ZBd2d3ZCd4d5ZDd6d7ZEd8d9ZFdS)Zs r>c@rM)rBNrNr*r*r*r+rBcrOrBcCrPrQ) visit_tablerSr*r*r+rCgrUrCcCrPrQ) depart_tablerSr*r*r+rDkrUrDcCstrQ)r!rSr*r*r+rEosrEc@rM)rFNrNr*r*r*r+rFvrOrFcCrPrQ) visit_titlerSr*r*r+rI~rUrIcCrPrQ) depart_titlerSr*r*r+rJrUrJcCs&||jdvr dS|t||dS)Nr1)config walkaboutDocumentTransformer)rKdoctreerXr*r*r+r:sr:csZeZdZdZeeZfddZddZddZ dd Z d d Z d d Z ddZ ZS)rgz:(?P[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*)cs"t||t|_t|_dSrQ)super__init__r#Z module_stack title_stack)r(rK document_node __class__r*r+rjs zDocumentTransformer.__init__cCs|jddSrQ)rkappendrSr*r*r+ visit_sectionz!DocumentTransformer.visit_sectioncCs2|j}|dddrt|||jdSdS)Nidsrzmodule-)rkpop startswithtransform_module_sectionrZ)r(rT title_noder*r*r+depart_sections z"DocumentTransformer.depart_sectioncCs|ddkr |jdS)Ndomainr2) skip_noderSr*r*r+ visit_descs zDocumentTransformer.visit_desccCs>|dd|ddd|jdst||jdSdS)Nclasses definitionrrnoindex)ro attributesadd_tocrZrSr*r*r+ depart_descs  zDocumentTransformer.depart_desccCst|jjtr t|_dSdSrQ) isinstanceparentrrFrnrSr*r*r+rcs zDocumentTransformer.visit_titlecCsd|dvrdSz|d}Wn tyYdSwt|ts dS|}|j|}|dur0dS|d}z t||jd}Wn t yIYdSw|rfd|d<|d dt d|d gd }| |dSdS) Ntocr{rkeysummaryr&reftitleZtooltipztooltip-contentr{) IndexErrorrrastextkey_patmatchgroupr rZrror)r(rTchildnamemrrZ inline_noder*r*r+rRs2       z#DocumentTransformer.visit_reference)r-r.r/Z_key_rerecompilerrjrprwrzrrcrR __classcell__r*r*rmr+rgs  rgc Cs|dd}|t}tt||d}|durtd|g}ntt|}tddg|Rddg|gd}tdg|R}td||dddgd } || t | ||dS) Nnamesrr&rmodule)r{rr|)desctyper'r{) first_child_matching_classsection_prelude_end_classlist ipop_childrrr r ror) section_nodervrZZ fullmodnamewherecontent_childrenZsignature_childrenZsignature_node content_node desc_noder*r*r+rus0     ruccs.t||kr||Vt||ksdSdSrQ)lenrs)rTstartr*r*r+rs  rcCs,z t|d|dWStytdw)Nr`rzreference has no refid)r KeyErrorr)reference_noderZr*r*r+get_target_summarys  rcCsf|dur t|}nt|}t||}t||}|durdS|d}d}|dr+|d7}|||dS)z&Add a table of contents to a desc nodeNrrr)rr build_tocinsert)rrZrr`descinforrZ insert_atr*r*r+rs   rcCsd}|d}|s dSd}d}g}t||D]=\}}} t|t|}t|t| }t||} tdtdd| } tdt|d} tdt| d} td| | | }||q|d}t|}|d}t dg|R}t |d}t |d}t |d}t d||||d d }t d|d gd S) z)Return a desc table of contents node treeu—childrenNrr& )colwidth)colsrr) ichild_idsmaxrtoc_refrr"rrrorrrrB)rrZ separator child_idsZmax_fullname_lenZmax_summary_lenrowsfullnamer`rrZref_entry_nodeZsep_entry_nodeZsum_entry_noderow_nodeZcol0_lenZcol1_lenZcol2_lenZ tbody_nodeZcol0_colspec_nodeZcol1_colspec_nodeZcol2_colspec_nodeZ tgroup_noder*r*r+rs6      rccs2|D]}|j|}|d|d|dfVqdS)Nrr`r)pyg_descinfo_tbl)rrZr`rr*r*r+r s  rcCs"t|f}td||t|dgdS)Nr&r)rrWr{)r r=r)rr`rr*r*r+r&s rcCsF|d}|jD]}t|tr t|dtr td|}|d|qdS)N.rr&)rrrr r r)r classnameprefixrZnew_desc_classnamer*r*r+decorate_signatures+s   rc sdd}|jj}z|j}Wn tyg}Ynwt||d}gd}dd|D}dd} d d |Dd d|D} | | |} fd d| D}||d <dS)NcSst|dS)Nr)rlower)dr*r*r+lowercase_name4rqz/inject_template_globals..lowercase_name)r)ZColorZcursorsdisplayZdraweventfontimageZjoystickrlocalsmaskZmixerZmouseZmusicpygameZRectZSurfaceZspritetime transformZ BufferProxyZfreetypeZgfxdrawmidiZOverlayZ PixelArrayZ pixelcopyZsndarrayZ surfarraycSsg|]}d|qS)zpygame.r*.0xr*r*r+ _z+inject_template_globals..csfdd|DS)Ncsg|]}|vr|qSr*r*rexisting_orderr*r+rbszBinject_template_globals..sort_by_order..r*)sequencerr*rr+ sort_by_orderasz.inject_template_globals..sort_by_ordercSsi|]}|d|qSrr*rr*r*r+ dsz+inject_template_globals..cSsg|]}|dqSrr*rr*r*r+rercsg|] }|vr|qSr*r*)rrZfull_name_sectionr*r+rhs pyg_sections)r[rZrAttributeErrorsorted) rKpagename templatenamecontextrhrrZsectionsrrZ full_namesZ sorted_namesr*rr+r;3s$      r;)rrQ)Gr0 ext.utilsrrrrrr ext.indexerrr Zsphinx.addnodesr r r r rrrsphinx.domains.pythonrZdocutils.nodesrrrrrrrrrrrrrrrr r!r"r]r collectionsr#r$rLr=r@rAr>rBrCrDrEr?rFrGrHrIrJr:rgrurrrrrrrr;r*r*r*r+sJ   P  " <    ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2941413 pygame-2.6.1/docs/reST/ext/__pycache__/customversion.cpython-310.pyc0000644000175100001770000000200014676242415024650 0ustar00runnerdockero Df@s`ddlmZmZddlmZzddlmZWn ey!dZYnwdZdZddZ d d Z d S) ) versionlabels VersionChange)_)versionlabel_classesFT versionaddedversionchanged deprecatedversionextendedcCs&tD]}tt||dt|<qdS)N_format)labelsrgetattrr)appconfiglabelr>/home/runner/work/pygame/pygame/docs/reST/ext/customversion.pyset_version_formatssrcCsV|dtdtd<trdtd<dD]}||dtt|dq|dtdS)Nr zExtended in pygame %sextendedrr envz config-inited) add_directiverrUPDATE_VERIONLABEL_CLASSESradd_config_valuestrconnectr)rrrrrsetups rN) sphinx.domains.changesetrr sphinx.localerr ImportErrorrr rrrrrrs   ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2941413 pygame-2.6.1/docs/reST/ext/__pycache__/edit_on_github.cpython-310.pyc0000644000175100001770000000261514676242415024727 0ustar00runnerdockero Df@s4dZddlZddlZdZddZddZdd ZdS) z from: https://gist.github.com/mgedmin/6052926 Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the sidebar. Loosely based on https://github.com/astropy/astropy/pull/347 NzBSD (3 clause)cCsdj|jj||jj|dS)Nz=https://github.com/{project}/{view}/{branch}/docs/reST/{path})projectviewbranchpath)formatconfigedit_on_github_projectedit_on_github_branch)apprrr ?/home/runner/work/pygame/pygame/docs/reST/ext/edit_on_github.pyget_github_urls r cCsf|dkrdS|jjstddStj|d|jj }t |d|}t |d|}||d<||d<dS)Nz page.htmlz$edit_on_github_project not specifiedsourceZblobeditZshow_on_github_urlZedit_on_github_url) rrwarningswarnosrrelpathgetbuildersrcdirr )r pagename templatenamecontextdoctreerZshow_urlZedit_urlr r r html_page_contexts    rcCs,|ddd|ddd|dtdS)NrTr mainzhtml-page-context)add_config_valueconnectr)r r r r setup(sr )__doc__rr __license__r rr r r r r s ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2881413 pygame-2.6.1/docs/reST/ext/__pycache__/headers.cpython-310.pyc0000644000175100001770000000251614676242415023357 0ustar00runnerdockero Df_@s8ddlmZmZddlmZddlZddZddZdS))get_sectionname isections) tour_descinfoNcCsR|d|ddd|ddd|ddd|d d d|d tdS) Nz ext.indexer headers_dest.htmlheaders_mkdirsFheaders_filename_sfxheaders_templatezheader.hzhtml-page-context)setup_extensionadd_config_valueconnectwriter)appr8/home/runner/work/pygame/pygame/docs/reST/ext/headers.pysetups rcCs|durdS|jj}tj|jd}|jdr#tj|s#t||jd}g}t|D] } t |j | |q.|ss   ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2901413 pygame-2.6.1/docs/reST/ext/__pycache__/indexer.cpython-310.pyc0000644000175100001770000001717614676242415023412 0ustar00runnerdockero Df@sdZddlmZmZmZmZmZddlmZddl Z dZ ddZ dd Z d d ZGd d d eZddZddZddZddZdS)aQCollect information on document sections and Pygame API objects The following persistent Pygame specific environment structures are built: pyg_sections: [{'docname': , 'fullname': , 'refid': }, ...] all Pygame api sections in the documents in order processed. pyg_descinfo_tbl: {: {'fullname': , 'desctype': , 'summary':

, 'signatures': , 'children': , 'refid': , 'docname': }, ...} object specific information, including a list of direct children, if any. : (str) the simple document name without path or extension. : (str) a fully qualified object name. It is a unique identifier. : (str) an id usable as local uri reference. : (str) unique desc id, the first entry in the ids attribute list. : (str) an object's type: the desctype attribute. : (str) a summary line as identified by a :summaryline: role. This corresponds to the first line of a docstring. : (list of str) an object's signatures, in document order. : (list of str) refids of an object's children, in document order. )Visitor get_fullname get_refidas_refidGetError)dequeNzmodule-cCs|dt|dtdS)Nz env-purge-docz doctree-read)connectprep_document_infocollect_document_info)appr 8/home/runner/work/pygame/pygame/docs/reST/ext/indexer.pysetup)s rcsz fdd|jD|_WntyYn tyYnwz|j}Wn ty.YdSwfdd|D}|D]}||=q0sz&prep_document_info..cs g|] \}}|dkr|qSrr )rkvrr r r:s ) pyg_sectionsAttributeErrorKeyErrorpyg_descinfo_tblitems)r envrZ descinfo_tbl to_removerr rr r .s     r cCs|t||dSN) walkabout CollectInfo)r doctreer r r r ?r cseZdZdZhdZfddZddZddZd d Zd d Z d dZ ddZ ddZ ddZ ddZddZddZddZddZdd ZZS)!rz&Records the information for a document> exceptionmethod classmethodfunctionclass attribute staticmethoddatacst|||jj|_t|_t|_t|_z|jjWn t y+g|j_Ynwz|jj WdSt yAi|j_ YdSwr) super__init__rrr summary_stack sig_stack desc_stackrrr)selfr document_node __class__r r r+Rs     zCollectInfo.__init__cCs|d}tj|\}}|s|jtj|\}}|dvr |jtj|\}}|dvr/|jtj|\}}|dkr>|jdS)Nsource>Z referenciasref>reSTesdocs)ospathsplit skip_node)r/noder3head file_namedir_namer r r visit_documentaszCollectInfo.visit_documentcCs|ds|j|dS)Nnames)r;_pushr/r<r r r visit_sectionrs zCollectInfo.visit_sectioncCs|\}}}|js dS|ddtr$|||||||dS|rE|d}t||jdd}||| |t||jdSdS)zRecord section infoNidsrsummary) _popchildren startswithMODULE_ID_PREFIX _add_section _add_descinfo get_descinforget_add_descinfo_entry)r/r<rFsigs child_descs desc_noder r r depart_sectionws  zCollectInfo.depart_sectioncCs$|dd|jvr |j|dS)z9Prepare to collect a summary and toc for this descriptiondesctyperGN)rO desctypesr;rBrCr r r visit_descs zCollectInfo.visit_desccCs$|j|g|R||dS)z.)r`rUrF signaturesrIrar)rrOrrrP)r/r<rFrQrRrcr r r rMs   zCollectInfo._add_descinfocCs2t|}|tr|ttd}||jj|<dSr)rrJrKlenrr)r/r<rckeyr r r rPs zCollectInfo._add_descinfo_entrycCs(|jd|jg|jgdS)NrG)r,rbr-r.r/r r r rBs  zCollectInfo._pushcCs|j|j|jfSr)r,popr-r.rir r r rHzCollectInfo._popcCs|jd|dS)N)r.rb)r/rSr r r rXr!zCollectInfo._add_desccCs|d|jd<dS)Nrrl)astextr,r/Ztext_element_noder r r r\szCollectInfo._add_summarycCs|jd|ddS)Nrlr)r-rbrmrnr r r r]rkzCollectInfo._add_sig)__name__ __module__ __qualname____doc__rVr+r@rDrTrWrYr_rLrMrPrBrHrXr\r] __classcell__r r r1r rCs$   rcCsJzt||}Wn tyYdSw|||dD]}t|||qdSNrI)rNrtour_descinfo_refid)fnr<rdescinforar r r tour_descinfos  rxcCs0|j|}|||dD]}t|||q dSrt)rru)rvrarrwr r r rus  rucCstt||Sr)get_descinfo_refidr)r<rr r r rNsrNcCs>|tr |ttd}z|j|WStytdw)Nz Not found)rJrKrgrrr)rarr r r rys   ry)rr ext.utilsrrrrr collectionsros.pathr8rKrr r rrxrurNryr r r r s   ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612173.2891412 pygame-2.6.1/docs/reST/ext/__pycache__/utils.cpython-310.pyc0000644000175100001770000000664114676242415023107 0ustar00runnerdockero Df @sddlZddlZddlZGdddeZddZddZdd Z d d Z d d Z ddZ ddZ ddZddZddZGdddejjZdS)Nc@s eZdZdS)GetErrorN)__name__ __module__ __qualname__rr6/home/runner/work/pygame/pygame/docs/reST/ext/utils.pyrsrcCs>t|tjjr t|St|tjjrt|St d|j d)NUnrecognized node type '') isinstancedocutilsnodessectionget_sectionnamesphinxaddnodesdesc get_descname TypeError __class__noderrr get_fullname s rcCsjz|d}Wn tytdwz|d}Wn ty#tdwz|dWSty4tdw)Nrz%No fullname: missing children in descidsz2No fullname: missing ids attribute in desc's childz.No fullname: desc's child has empty names list) IndexErrorrKeyError)rsignamesrrrrs      rcCsFz|d}Wn tytdwz|dWSty"tdw)Nrz/No fullname: missing names attribute in sectionrz)No fullname: section has empty names list)rrr)r rrrrr"s    rcCs tt|SN) as_refuri get_refidrrrr get_refuri- r cCs&zt|dWStytdw)NrzNode has empty ids list)get_idsrrrrrrr1s  rcCs |ddS)Nr)refurirrras_refid8r!r%cCsd|S)N#r)refidrrrr<srcCst|tjjrz|dWStytdwt|tjjrBz|d}Wn t y0tdwz|dWStyAtdwt d|j d)Nrz%No ids: section missing ids attributerzNo ids: missing desc childrenz*No ids: desc's child missing ids attributerr ) r r r r rrrrrrrr)rrrrrr"@s$      r"ccs$|D] }t|tjjr|VqdSr)r r r r )doctreerrrr isectionsRs r)cCs|ddS)N.)split)fullnamerrrget_nameXsr.c@s8eZdZejZejZddZ ddZ ddZ dS)VisitorcCs$tjj||||_|jj|_dSr)r r SparseNodeVisitor__init__appbuilderenv)selfr2Z document_noderrrr1`szVisitor.__init__cCdSrrr5rrrr unknown_visitezVisitor.unknown_visitcCr6rrr7rrrunknown_departurehr9zVisitor.unknown_departureN) rrrr r SkipNodeZ skip_node SkipDepartureZskip_departurer1r8r:rrrrr/\s    r/)Zdocutils.nodesr Zsphinx.addnodesrsys LookupErrorrrrrr rr%rr"r)r.r r0r/rrrrs ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/boilerplate.py0000644000175100001770000002407114676242340017704 0ustar00runnerdocker"""Add the generic fixed and derived content to a Classic Pygame document""" from ext.utils import Visitor, get_name, GetError, get_refid, as_refid, as_refuri from ext.indexer import get_descinfo, get_descinfo_refid from sphinx.addnodes import desc, desc_content, desc_classname, desc_name, desc_signature from sphinx.addnodes import index as section_prelude_end_class from sphinx.domains.python import PyClasslike from docutils.nodes import ( section, literal, reference, paragraph, title, document, Text, TextElement, inline, table, tgroup, colspec, tbody, row, entry, whitespace_normalize_name, SkipNode, line, ) import os import re from collections import deque class PyGameClasslike(PyClasslike): """ No signature prefix for classes. """ def get_signature_prefix(self, sig): return "" if self.objtype == "class" else PyClasslike(self, sig) def setup(app): # This extension uses indexer collected tables. app.setup_extension("ext.indexer") # Documents to leave untransformed by boilerplate app.add_config_value("boilerplate_skip_transform", [], "") # Custom class directive signature app.add_directive_to_domain("py", "class", PyGameClasslike) # The stages of adding boilerplate markup. app.connect("doctree-resolved", transform_document) app.connect("html-page-context", inject_template_globals) # Internal nodes. app.add_node( TocRef, html=(visit_toc_ref_html, depart_toc_ref_html), latex=(visit_toc_ref, depart_toc_ref), text=(visit_toc_ref, depart_toc_ref), ) app.add_node( TocTable, html=(visit_toc_table_html, depart_toc_table_html), latex=(visit_skip, None), text=(visit_skip, None), ) app.add_node( DocTitle, html=(visit_doc_title_html, depart_doc_title_html), latex=(visit_doc_title, depart_doc_title), ) class TocRef(reference): pass def visit_toc_ref(self, node): self.visit_reference(node) def depart_toc_ref(self, node): self.depart_reference(node) def visit_toc_ref_html(self, node): refuri = node["refuri"] refid = as_refid(refuri) docname = get_descinfo_refid(refid, self.settings.env)["docname"] link_suffix = self.builder.link_suffix node["refuri"] = f"{os.path.basename(docname)}{link_suffix}{refuri}" visit_toc_ref(self, node) class TocTable(table): pass def visit_toc_table_html(self, node): self.visit_table(node) def depart_toc_table_html(self, node): self.depart_table(node) def visit_skip(self, node): raise SkipNode() depart_toc_ref_html = depart_toc_ref class DocTitle(title): pass visit_doc_title_html = visit_skip depart_doc_title_html = None def visit_doc_title(self, node): self.visit_title(node) def depart_doc_title(self, node): self.depart_title(node) def transform_document(app, doctree, docname): if docname in app.config["boilerplate_skip_transform"]: return doctree.walkabout(DocumentTransformer(app, doctree)) class DocumentTransformer(Visitor): _key_re = r"(?P[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*)" key_pat = re.compile(_key_re) def __init__(self, app, document_node): super().__init__(app, document_node) self.module_stack = deque() self.title_stack = deque() def visit_section(self, node): self.title_stack.append(None) def depart_section(self, node): title_node = self.title_stack.pop() if node["ids"][0].startswith("module-"): transform_module_section(node, title_node, self.env) def visit_desc(self, node): # Only want to do special processing on pygame's Python api. # Other stuff, like C code, get no special treatment. if node["domain"] != "py": raise self.skip_node def depart_desc(self, node): node["classes"].append("definition") node[0]["classes"].append("title") if not node.attributes["noindex"]: add_toc(node, self.env) def visit_title(self, node): if isinstance(node.parent.parent, document): # Make title node a DocTitle instance. This works because DocTitle # simply subclasses title. node.__class__ = DocTitle def visit_reference(self, node): if "toc" in node["classes"]: return try: child = node[0] except IndexError: return if not isinstance(child, TextElement): return name = child.astext() m = self.key_pat.match(name) if m is None: return key = m.group("key") try: summary = get_descinfo_refid(key, self.env)["summary"] except GetError: return if summary: node["reftitle"] = "" node["classes"].append("tooltip") inline_node = inline("", summary, classes=["tooltip-content"]) node.append(inline_node) def transform_module_section(section_node, title_node, env): fullmodname = section_node["names"][0] where = section_node.first_child_matching_class(section_prelude_end_class) content_children = list(ipop_child(section_node, where + 1)) if title_node is None: signature_children = [literal("", fullmodname)] else: signature_children = list(ipop_child(title_node)) signature_node = desc_signature( "", "", *signature_children, classes=["title", "module"], names=[fullmodname] ) content_node = desc_content("", *content_children) desc_node = desc( "", signature_node, content_node, desctype="module", objtype="module", classes=["definition"], ) section_node.append(desc_node) add_toc(desc_node, env, section_node) def ipop_child(node, start=0): while len(node) > start: yield node.pop(start) def get_target_summary(reference_node, env): try: return get_descinfo_refid(reference_node["refid"], env)["summary"] except KeyError: raise GetError("reference has no refid") # Calls build_toc, which builds the section at the top where it lists the functions def add_toc(desc_node, env, section_node=None): """Add a table of contents to a desc node""" if section_node is not None: refid = get_refid(section_node) else: refid = get_refid(desc_node) descinfo = get_descinfo_refid(refid, env) toc = build_toc(descinfo, env) if toc is None: return content_node = desc_node[-1] insert_at = 0 if descinfo["summary"]: # if have a summary insert_at += 1 content_node.insert(insert_at, toc) # Builds the section at the top of the module where it lists the functions def build_toc(descinfo, env): """Return a desc table of contents node tree""" separator = "—" child_ids = descinfo["children"] if not child_ids: return None max_fullname_len = 0 max_summary_len = 0 rows = [] for fullname, refid, summary in ichild_ids(child_ids, env): max_fullname_len = max(max_fullname_len, len(fullname)) max_summary_len = max(max_summary_len, len(summary)) reference_node = toc_ref(fullname, refid) ref_entry_node = entry("", line("", "", reference_node)) sep_entry_node = entry("", Text(separator, "")) sum_entry_node = entry("", Text(summary, "")) row_node = row("", ref_entry_node, sep_entry_node, sum_entry_node) rows.append(row_node) col0_len = max_fullname_len + 2 # add error margin col1_len = len(separator) # no padding col2_len = max_summary_len + 10 # add error margin tbody_node = tbody("", *rows) col0_colspec_node = colspec(colwidth=col0_len) col1_colspec_node = colspec(colwidth=col1_len) col2_colspec_node = colspec(colwidth=col2_len) tgroup_node = tgroup( "", col0_colspec_node, col1_colspec_node, col2_colspec_node, tbody_node, cols=3 ) return TocTable("", tgroup_node, classes=["toc"]) def ichild_ids(child_ids, env): for refid in child_ids: descinfo = env.pyg_descinfo_tbl[refid] # A KeyError would mean a bug. yield descinfo["fullname"], descinfo["refid"], descinfo["summary"] def toc_ref(fullname, refid): name = (whitespace_normalize_name(fullname),) return TocRef("", fullname, name=name, refuri=as_refuri(refid), classes=["toc"]) def decorate_signatures(desc, classname): prefix = classname + "." for child in desc.children: if isinstance(child, desc_signature) and isinstance(child[0], desc_name): new_desc_classname = desc_classname("", prefix) child.insert(0, new_desc_classname) def inject_template_globals(app, pagename, templatename, context, doctree): def lowercase_name(d): return get_name(d["fullname"]).lower() env = app.builder.env try: sections = env.pyg_sections except AttributeError: sections = [] else: sections = sorted(sections, key=lowercase_name) # Sort them in this existing order. existing_order = [ "Color", "cursors", "display", "draw", "event", "font", "image", "joystick", "key", "locals", "mask", "mixer", "mouse", "music", "pygame", "Rect", "Surface", "sprite", "time", "transform", "BufferProxy", "freetype", "gfxdraw", "midi", "Overlay", "PixelArray", "pixelcopy", "sndarray", "surfarray", ] existing_order = ["pygame." + x for x in existing_order] def sort_by_order(sequence, existing_order): return existing_order + [x for x in sequence if x not in existing_order] full_name_section = {x["fullname"]: x for x in sections} full_names = [x["fullname"] for x in sections] sorted_names = sort_by_order(full_names, existing_order) sections = [ full_name_section[name] for name in sorted_names if name in full_name_section ] context["pyg_sections"] = sections ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/customversion.py0000644000175100001770000000203414676242340020315 0ustar00runnerdockerfrom sphinx.domains.changeset import versionlabels, VersionChange from sphinx.locale import _ # just to suppress warnings try: from sphinx.domains.changeset import versionlabel_classes except ImportError: # versionlabel_classes doesn't exist in old Sphinx versions. UPDATE_VERIONLABEL_CLASSES = False else: UPDATE_VERIONLABEL_CLASSES = True labels = ("versionadded", "versionchanged", "deprecated", "versionextended") def set_version_formats(app, config): for label in labels: versionlabels[label] = _(getattr(config, f"{label}_format")) def setup(app): app.add_directive("versionextended", VersionChange) versionlabels["versionextended"] = "Extended in pygame %s" if UPDATE_VERIONLABEL_CLASSES: versionlabel_classes["versionextended"] = "extended" for label in ("versionadded", "versionchanged", "deprecated", "versionextended"): app.add_config_value( f"{label}_format", str(versionlabels[label]), "env" ) app.connect("config-inited", set_version_formats) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/edit_on_github.py0000644000175100001770000000231414676242340020361 0ustar00runnerdocker""" from: https://gist.github.com/mgedmin/6052926 Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the sidebar. Loosely based on https://github.com/astropy/astropy/pull/347 """ import os import warnings __license__ = "BSD (3 clause)" def get_github_url(app, view, path): return "https://github.com/{project}/{view}/{branch}/docs/reST/{path}".format( project=app.config.edit_on_github_project, view=view, branch=app.config.edit_on_github_branch, path=path, ) def html_page_context(app, pagename, templatename, context, doctree): if templatename != "page.html": return if not app.config.edit_on_github_project: warnings.warn("edit_on_github_project not specified") return path = os.path.relpath(doctree.get("source"), app.builder.srcdir) show_url = get_github_url(app, "blob", path) edit_url = get_github_url(app, "edit", path) context["show_on_github_url"] = show_url context["edit_on_github_url"] = edit_url def setup(app): app.add_config_value("edit_on_github_project", "", True) app.add_config_value("edit_on_github_branch", "main", True) app.connect("html-page-context", html_page_context) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/headers.py0000644000175100001770000000313714676242340017015 0ustar00runnerdockerfrom ext.utils import get_sectionname, isections from ext.indexer import tour_descinfo import os def setup(app): # This extension uses indexer collected tables. app.setup_extension("ext.indexer") # The target directory for the header files. app.add_config_value("headers_dest", ".", "html") # Create directory tree if missing? app.add_config_value("headers_mkdirs", False, "") # Suffix to tag onto file name before the '.h' extension app.add_config_value("headers_filename_sfx", "", "html") # Header template to use app.add_config_value("headers_template", "header.h", "html") # Write a header when its corresponding HTML page is written. app.connect("html-page-context", writer) def writer(app, pagename, templatename, context, doctree): if doctree is None: return env = app.builder.env dirpath = os.path.abspath(app.config["headers_dest"]) if app.config["headers_mkdirs"] and not os.path.lexists(dirpath): os.makedirs(dirpath) filename_suffix = app.config["headers_filename_sfx"] items = [] for section in isections(doctree): tour_descinfo(items.append, section, env) if not items: return templates = app.builder.templates filename = f"{os.path.basename(pagename)}{filename_suffix}.h" filepath = os.path.join(dirpath, filename) template = app.config["headers_template"] header = open(filepath, "w", encoding="utf-8") context["hdr_items"] = items try: header.write(templates.render(template, context)) finally: header.close() del context["hdr_items"] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/indexer.py0000644000175100001770000001620414676242340017037 0ustar00runnerdocker"""Collect information on document sections and Pygame API objects The following persistent Pygame specific environment structures are built: pyg_sections: [{'docname': , 'fullname': , 'refid': }, ...] all Pygame api sections in the documents in order processed. pyg_descinfo_tbl: {: {'fullname': , 'desctype': , 'summary': , 'signatures': , 'children': , 'refid': , 'docname': }, ...} object specific information, including a list of direct children, if any. : (str) the simple document name without path or extension. : (str) a fully qualified object name. It is a unique identifier. : (str) an id usable as local uri reference. : (str) unique desc id, the first entry in the ids attribute list. : (str) an object's type: the desctype attribute. : (str) a summary line as identified by a :summaryline: role. This corresponds to the first line of a docstring. : (list of str) an object's signatures, in document order. : (list of str) refids of an object's children, in document order. """ from ext.utils import Visitor, get_fullname, get_refid, as_refid, GetError from collections import deque import os.path MODULE_ID_PREFIX = "module-" def setup(app): app.connect("env-purge-doc", prep_document_info) app.connect("doctree-read", collect_document_info) def prep_document_info(app, env, docname): try: env.pyg_sections = [e for e in env.pyg_sections if e["docname"] != docname] except AttributeError: pass except KeyError: pass try: descinfo_tbl = env.pyg_descinfo_tbl except AttributeError: pass else: to_remove = [k for k, v in descinfo_tbl.items() if v["docname"] == docname] for k in to_remove: del descinfo_tbl[k] def collect_document_info(app, doctree): doctree.walkabout(CollectInfo(app, doctree)) class CollectInfo(Visitor): """Records the information for a document""" desctypes = { "data", "function", "exception", "class", "attribute", "method", "staticmethod", "classmethod", } def __init__(self, app, document_node): super().__init__(app, document_node) self.docname = self.env.docname self.summary_stack = deque() self.sig_stack = deque() self.desc_stack = deque() try: self.env.pyg_sections except AttributeError: self.env.pyg_sections = [] try: self.env.pyg_descinfo_tbl except AttributeError: self.env.pyg_descinfo_tbl = {} def visit_document(self, node): # Only index pygame Python API documents, found in the docs/reST/ref # subdirectory. Thus the tutorials and the C API documents are skipped. source = node["source"] head, file_name = os.path.split(source) if not file_name: raise self.skip_node head, dir_name = os.path.split(head) if dir_name not in {"ref", "referencias"}: raise self.skip_node head, dir_name = os.path.split(head) if dir_name not in {"reST", "es"}: raise self.skip_node head, dir_name = os.path.split(head) if dir_name != "docs": raise self.skip_node def visit_section(self, node): if not node["names"]: raise self.skip_node self._push() def depart_section(self, node): """Record section info""" summary, sigs, child_descs = self._pop() if not node.children: return if node["ids"][0].startswith(MODULE_ID_PREFIX): self._add_section(node) self._add_descinfo(node, summary, sigs, child_descs) elif child_descs: # No section level introduction: use the first toplevel directive # instead. desc_node = child_descs[0] summary = get_descinfo(desc_node, self.env).get("summary", "") self._add_section(desc_node) self._add_descinfo_entry(node, get_descinfo(desc_node, self.env)) def visit_desc(self, node): """Prepare to collect a summary and toc for this description""" if node.get("desctype", "") not in self.desctypes: raise self.skip_node self._push() def depart_desc(self, node): """Record descinfo information and add descinfo to parent's toc""" self._add_descinfo(node, *self._pop()) self._add_desc(node) def visit_inline(self, node): """Collect a summary or signature""" if "summaryline" in node["classes"]: self._add_summary(node) elif "signature" in node["classes"]: self._add_sig(node) raise self.skip_departure def _add_section(self, node): entry = { "docname": self.docname, "fullname": get_fullname(node), "refid": get_refid(node), } self.env.pyg_sections.append(entry) def _add_descinfo(self, node, summary, sigs, child_descs): entry = { "fullname": get_fullname(node), "desctype": node.get("desctype", "module"), "summary": summary, "signatures": sigs, "children": [get_refid(n) for n in child_descs], "refid": get_refid(node), "docname": self.docname, } self._add_descinfo_entry(node, entry) def _add_descinfo_entry(self, node, entry): key = get_refid(node) if key.startswith(MODULE_ID_PREFIX): key = key[len(MODULE_ID_PREFIX) :] self.env.pyg_descinfo_tbl[key] = entry def _push(self): self.summary_stack.append("") self.sig_stack.append([]) self.desc_stack.append([]) def _pop(self): return (self.summary_stack.pop(), self.sig_stack.pop(), self.desc_stack.pop()) def _add_desc(self, desc_node): self.desc_stack[-1].append(desc_node) def _add_summary(self, text_element_node): self.summary_stack[-1] = text_element_node[0].astext() def _add_sig(self, text_element_node): self.sig_stack[-1].append(text_element_node[0].astext()) def tour_descinfo(fn, node, env): try: descinfo = get_descinfo(node, env) except GetError: return fn(descinfo) for refid in descinfo["children"]: tour_descinfo_refid(fn, refid, env) def tour_descinfo_refid(fn, refid, env): descinfo = env.pyg_descinfo_tbl[refid] # A KeyError would mean a bug. fn(descinfo) for refid in descinfo["children"]: tour_descinfo_refid(fn, refid, env) def get_descinfo(node, env): return get_descinfo_refid(get_refid(node), env) def get_descinfo_refid(refid, env): if refid.startswith(MODULE_ID_PREFIX): refid = refid[len(MODULE_ID_PREFIX) :] try: return env.pyg_descinfo_tbl[refid] except KeyError: raise GetError("Not found") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/ext/utils.py0000644000175100001770000000476414676242340016551 0ustar00runnerdockerimport docutils.nodes import sphinx.addnodes import sys class GetError(LookupError): pass def get_fullname(node): if isinstance(node, docutils.nodes.section): return get_sectionname(node) if isinstance(node, sphinx.addnodes.desc): return get_descname(node) raise TypeError(f"Unrecognized node type '{node.__class__}'") def get_descname(desc): try: sig = desc[0] except IndexError: raise GetError("No fullname: missing children in desc") try: names = sig["ids"] except KeyError: raise GetError("No fullname: missing ids attribute in desc's child") try: return names[0] except IndexError: raise GetError("No fullname: desc's child has empty names list") def get_sectionname(section): try: names = section["names"] except KeyError: raise GetError("No fullname: missing names attribute in section") try: return names[0] except IndexError: raise GetError("No fullname: section has empty names list") def get_refuri(node): return as_refuri(get_refid(node)) def get_refid(node): try: return get_ids(node)[0] except IndexError: raise GetError("Node has empty ids list") def as_refid(refuri): return refuri[1:] def as_refuri(refid): return "#" + refid def get_ids(node): if isinstance(node, docutils.nodes.section): try: return node["ids"] except KeyError: raise GetError("No ids: section missing ids attribute") if isinstance(node, sphinx.addnodes.desc): try: sig = node[0] except IndexError: raise GetError("No ids: missing desc children") try: return sig["ids"] except KeyError: raise GetError("No ids: desc's child missing ids attribute") raise TypeError(f"Unrecognized node type '{node.__class__}'") def isections(doctree): for node in doctree: if isinstance(node, docutils.nodes.section): yield node def get_name(fullname): return fullname.split(".")[-1] class Visitor(docutils.nodes.SparseNodeVisitor): skip_node = docutils.nodes.SkipNode() skip_departure = docutils.nodes.SkipDeparture() def __init__(self, app, document_node): docutils.nodes.SparseNodeVisitor.__init__(self, document_node) self.app = app self.env = app.builder.env def unknown_visit(self, node): return def unknown_departure(self, node): return ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.978112 pygame-2.6.1/docs/reST/filepaths.rst0000644000175100001770000000160314676242340016735 0ustar00runnerdockerFile Path Function Arguments ============================ A pygame function or method which takes a file path argument will accept either a Unicode or a byte (8-bit or ASCII character) string. Unicode strings are translated to Python's default filesystem encoding, as returned by sys.getfilesystemencoding(). A Unicode code point above U+FFFF (``\uFFFF``) can be coded directly with a 32-bit escape sequences (``\Uxxxxxxxx``), even for Python interpreters built with an UCS-2 (16-bit character) Unicode type. Byte strings are passed to the operating system unchanged. Null characters (``\x00``) are not permitted in the path, raising an exception. An exception is also raised if an Unicode file path cannot be encoded. How UTF-16 surrogate codes are handled is Python-interpreter-dependent. Use UTF-32 code points and 32-bit escape sequences instead. The exception types are function-dependent. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/index.rst0000644000175100001770000001351514676242340016072 0ustar00runnerdockerPygame Front Page ================= .. toctree:: :maxdepth: 2 :glob: :hidden: ref/* tut/* tut/en/**/* tut/ko/**/* c_api filepaths logos Quick start ----------- Welcome to pygame! Once you've got pygame installed (:code:`pip install pygame` or :code:`pip3 install pygame` for most people), the next question is how to get a game loop running. Pygame, unlike some other libraries, gives you full control of program execution. That freedom means it is easy to mess up in your initial steps. Here is a good example of a basic setup (opens the window, updates the screen, and handles events)-- .. literalinclude:: ref/code_examples/base_script.py Here is a slightly more fleshed out example, which shows you how to move something (a circle in this case) around on screen-- .. literalinclude:: ref/code_examples/base_script_example.py For more in depth reference, check out the :ref:`tutorials-reference-label` section below, check out a video tutorial (`I'm a fan of this one `_), or reference the API documentation by module. Documents --------- `Readme`_ Basic information about pygame: what it is, who is involved, and where to find it. `Install`_ Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system. :doc:`filepaths` How pygame handles file system paths. :doc:`Pygame Logos ` The logos of Pygame in different resolutions. `LGPL License`_ This is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program. .. _tutorials-reference-label: Tutorials --------- :doc:`Introduction to Pygame ` An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine. :doc:`Import and Initialize ` The beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms. :doc:`How do I move an Image? ` A basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated. :doc:`Chimp Tutorial, Line by Line ` The pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example. :doc:`Sprite Module Introduction ` Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used. :doc:`Surfarray Introduction ` Pygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py. :doc:`Camera Module Introduction ` Pygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases. :doc:`Newbie Guide ` A list of thirteen helpful tips for people to get comfortable using pygame. :doc:`Making Games Tutorial ` A large tutorial that covers the bigger topics needed to create an entire game. :doc:`Display Modes ` Getting a display surface for the screen. :doc:`한국어 튜토리얼 (Korean Tutorial) ` 빨간블록 검은블록 Reference --------- :ref:`genindex` A list of all functions, classes, and methods in the pygame package. :doc:`ref/bufferproxy` An array protocol view of surface pixels :doc:`ref/color` Color representation. :doc:`ref/cursors` Loading and compiling cursor images. :doc:`ref/display` Configure the display surface. :doc:`ref/draw` Drawing simple shapes like lines and ellipses to surfaces. :doc:`ref/event` Manage the incoming events from various input devices and the windowing platform. :doc:`ref/examples` Various programs demonstrating the use of individual pygame modules. :doc:`ref/font` Loading and rendering TrueType fonts. :doc:`ref/freetype` Enhanced pygame module for loading and rendering font faces. :doc:`ref/gfxdraw` Anti-aliasing draw functions. :doc:`ref/image` Loading, saving, and transferring of surfaces. :doc:`ref/joystick` Manage the joystick devices. :doc:`ref/key` Manage the keyboard device. :doc:`ref/locals` Pygame constants. :doc:`ref/mixer` Load and play sounds :doc:`ref/mouse` Manage the mouse device and display. :doc:`ref/music` Play streaming music tracks. :doc:`ref/pygame` Top level functions to manage pygame. :doc:`ref/pixelarray` Manipulate image pixel data. :doc:`ref/rect` Flexible container for a rectangle. :doc:`ref/scrap` Native clipboard access. :doc:`ref/sndarray` Manipulate sound sample data. :doc:`ref/sprite` Higher level objects to represent game images. :doc:`ref/surface` Objects for images and the screen. :doc:`ref/surfarray` Manipulate image pixel data. :doc:`ref/tests` Test pygame. :doc:`ref/time` Manage timing and framerate. :doc:`ref/transform` Resize and move images. :doc:`pygame C API ` The C api shared amongst pygame extension modules. :ref:`search` Search pygame documents by keyword. .. _Readme: ../wiki/about .. _Install: ../wiki/GettingStarted#Pygame%20Installation .. _LGPL License: LGPL.txt ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/logos.rst0000644000175100001770000000247114676242340016105 0ustar00runnerdocker************************************************* Pygame Logos Page ************************************************* Pygame Logos ============ These logos are available for use in your own game projects. Please put them up wherever you see fit. The logo was created by TheCorruptor on July 29, 2001 and upscaled by Mega_JC on August 29, 2021. .. container:: fullwidth .. image:: _static/pygame_logo.png | `pygame_logo.svg <_static/pygame_logo.svg>`_ | `pygame_logo.png <_static/pygame_logo.png>`_ - 1561 x 438 .. image:: _static/pygame_lofi.png | `pygame_lofi.svg <_static/pygame_lofi.svg>`_ | `pygame_lofi.png <_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: _static/pygame_powered.png | `pygame_powered.svg <_static/pygame_powered.svg>`_ | `pygame_powered.png <_static/pygame_powered.png>`_ - 1617 x 640 .. image:: _static/pygame_tiny.png | `pygame_tiny.png <_static/pygame_tiny.png>`_ - 214 x 60 .. image:: _static/pygame_powered_lowres.png | `pygame_powered_lowres.png <_static/pygame_powered_lowres.png>`_ - 101 x 40 There is a higher resolution layered photoshop image available `here `_. *(1.3 MB)* Legacy logos ------------ .. container:: fullwidth `legacy_logos.zip <_static/legacy_logos.zip>`_ - 50.1 KB././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0371256 pygame-2.6.1/docs/reST/ref/0000755000175100001770000000000014676242436015006 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/bufferproxy.rst0000644000175100001770000001114414676242340020106 0ustar00runnerdocker.. include:: common.txt .. default-domain:: py :class:`pygame.BufferProxy` =========================== .. currentmodule:: pygame .. class:: BufferProxy | :sl:`pygame object to export a surface buffer through an array protocol` | :sg:`BufferProxy() -> BufferProxy` :class:`BufferProxy` is a pygame support type, designed as the return value of the :meth:`Surface.get_buffer` and :meth:`Surface.get_view` methods. For all Python versions a :class:`BufferProxy` object exports a C struct and Python level array interface on behalf of its parent object's buffer. A new buffer interface is also exported. In pygame, :class:`BufferProxy` is key to implementing the :mod:`pygame.surfarray` module. :class:`BufferProxy` instances can be created directly from Python code, either for a parent that exports an interface, or from a Python ``dict`` describing an object's buffer layout. The dict entries are based on the Python level array interface mapping. The following keys are recognized: ``"shape"`` : tuple The length of each array dimension as a tuple of integers. The length of the tuple is the number of dimensions in the array. ``"typestr"`` : string The array element type as a length 3 string. The first character gives byteorder, '<' for little-endian, '>' for big-endian, and '\|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, " Surface` | :sg:`parent -> ` The :class:`Surface` which returned the :class:`BufferProxy` object or the object passed to a :class:`BufferProxy` call. .. attribute:: length | :sl:`The size, in bytes, of the exported buffer.` | :sg:`length -> int` The number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the ``Py_buffer`` C struct ``len`` field. .. attribute:: raw | :sl:`A copy of the exported buffer as a single block of bytes.` | :sg:`raw -> bytes` The buffer data as a ``str``/``bytes`` object. Any gaps in the exported data are removed. .. method:: write | :sl:`Write raw bytes to object buffer.` | :sg:`write(buffer, offset=0)` Overwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument `buffer` is a ``str``/``bytes`` object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's :attr:`length` value, an ``IndexException`` is raised. If ``len(buffer) > proxy.length + offset``, a ``ValueError`` is raised. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/camera.rst0000644000175100001770000002263414676242340016771 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.camera` ==================== .. module:: pygame.camera :synopsis: pygame module for camera use | :sl:`pygame module for camera use` .. note:: Use import pygame.camera before using this module. Pygame currently supports Linux (V4L2) and Windows (MSMF) cameras natively, with wider platform support available via an integrated OpenCV backend. .. versionadded:: 2.0.2 Windows native camera support .. versionadded:: 2.0.3 New OpenCV backends EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code will very likely break with the next pygame release. The Bayer to ``RGB`` function is based on: :: Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. New in pygame 1.9.0. .. function:: init | :sl:`Module init` | :sg:`init(backend = None) -> None` This function starts up the camera module, choosing the best webcam backend it can find for your system. This is not guaranteed to succeed, and may even attempt to import third party modules, like `OpenCV`. If you want to override its backend choice, you can call pass the name of the backend you want into this function. More about backends in :func:`get_backends()`. .. versionchanged:: 2.0.3 Option to explicitly select backend .. ## pygame.camera.init ## .. function:: get_backends | :sl:`Get the backends supported on this system` | :sg:`get_backends() -> [str]` This function returns every backend it thinks has a possibility of working on your system, in order of priority. pygame.camera Backends: :: Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future There are two main differences among backends. The _camera backends are built in to pygame itself, and require no third party imports. All the other backends do. For the OpenCV and VideoCapture backends, those modules need to be installed on your system. The other big difference is "camera enumeration." Some backends don't have a way to list out camera names, or even the number of cameras on the system. In these cases, :func:`list_cameras()` will return something like ``[0]``. If you know you have multiple cameras on the system, these backend ports will pass through a "camera index number" through if you use that as the ``device`` parameter. .. versionadded:: 2.0.3 .. ## pygame.camera.get_backends ## .. function:: colorspace | :sl:`Surface colorspace conversion` | :sg:`colorspace(Surface, format, DestSurface = None) -> Surface` Allows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, ``transform.scale()`` it even smaller, and then convert the colorspace to ``YUV`` or ``HSV`` before doing any processing on it. .. ## pygame.camera.colorspace ## .. function:: list_cameras | :sl:`returns a list of available cameras` | :sg:`list_cameras() -> [cameras]` Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into :class:`pygame.camera.Camera`. If the camera backend doesn't support webcam enumeration, this will return something like ``[0]``. See :func:`get_backends()` for much more information. .. ## pygame.camera.list_cameras ## .. class:: Camera | :sl:`load a camera` | :sg:`Camera(device, (width, height), format) -> Camera` Loads a camera. On Linux, the device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is ``RGB``. The following are supported: * ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value .. method:: start | :sl:`opens, initializes, and starts capturing` | :sg:`start() -> None` Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used. .. ## Camera.start ## .. method:: stop | :sl:`stops, uninitializes, and closes the camera` | :sg:`stop() -> None` Stops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again. .. ## Camera.stop ## .. method:: get_controls | :sl:`gets current values of user controls` | :sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)` If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. .. ## Camera.get_controls ## .. method:: set_controls | :sl:`changes camera settings if supported by the camera` | :sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)` Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. On Windows, :code:`hflip` and :code:`vflip` are implemented by pygame, not by the Camera, so they should always work, but :code:`brightness` is unsupported. .. ## Camera.set_controls ## .. method:: get_size | :sl:`returns the dimensions of the images being recorded` | :sg:`get_size() -> (width, height)` Returns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size. .. ## Camera.get_size ## .. method:: query_image | :sl:`checks if a frame is ready` | :sg:`query_image() -> bool` If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like :func:`get_image()`. On Windows (MSMF), and the OpenCV backends, :func:`query_image()` should be reliable, though. This is useful to separate the framerate of the game from that of the camera without having to use threading. .. ## Camera.query_image ## .. method:: get_image | :sl:`captures an image as a Surface` | :sg:`get_image(Surface = None) -> Surface` Pulls an image off of the buffer as an ``RGB`` Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is 24 bits on Linux, 32 bits on Windows, or the same as the optionally supplied Surface. .. ## Camera.get_image ## .. method:: get_raw | :sl:`returns an unmodified image as bytes` | :sg:`get_raw() -> bytes` Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. This returns a bytes object .. ## Camera.get_raw ## .. ## pygame.camera.Camera ## .. ## pygame.camera ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/cdrom.rst0000644000175100001770000002155414676242340016645 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.cdrom` =================== .. module:: pygame.cdrom :synopsis: pygame module for audio cdrom control | :sl:`pygame module for audio cdrom control` .. warning:: This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. One alternative for python cdrom functionality is `pycdio `_. The cdrom module manages the ``CD`` and ``DVD`` drives on a computer. It can also control the playback of audio CDs. This module needs to be initialized before it can do anything. Each ``CD`` object you create represents a cdrom drive and must also be initialized individually before it can do most things. .. function:: init | :sl:`initialize the cdrom module` | :sg:`init() -> None` Initialize the cdrom module. This will scan the system for all ``CD`` devices. The module must be initialized before any other functions will work. This automatically happens when you call ``pygame.init()``. It is safe to call this function more than once. .. ## pygame.cdrom.init ## .. function:: quit | :sl:`uninitialize the cdrom module` | :sg:`quit() -> None` Uninitialize the cdrom module. After you call this any existing ``CD`` objects will no longer work. It is safe to call this function more than once. .. ## pygame.cdrom.quit ## .. function:: get_init | :sl:`true if the cdrom module is initialized` | :sg:`get_init() -> bool` Test if the cdrom module is initialized or not. This is different than the ``CD.init()`` since each drive must also be initialized individually. .. ## pygame.cdrom.get_init ## .. function:: get_count | :sl:`number of cd drives on the system` | :sg:`get_count() -> count` Return the number of cd drives on the system. When you create ``CD`` objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system. .. ## pygame.cdrom.get_count ## .. class:: CD | :sl:`class to manage a cdrom drive` | :sg:`CD(id) -> CD` You can create a ``CD`` object for each cdrom on the system. Use ``pygame.cdrom.get_count()`` to determine how many drives actually exist. The id argument is an integer of the drive, starting at zero. The ``CD`` object is not initialized, you can only call ``CD.get_id()`` and ``CD.get_name()`` on an uninitialized drive. It is safe to create multiple ``CD`` objects for the same drive, they will all cooperate normally. .. method:: init | :sl:`initialize a cdrom drive for use` | :sg:`init() -> None` Initialize the cdrom drive for use. The drive must be initialized for most ``CD`` methods to work. Even if the rest of pygame has been initialized. There may be a brief pause while the drive is initialized. Avoid ``CD.init()`` if the program should not stop for a second or two. .. ## CD.init ## .. method:: quit | :sl:`uninitialize a cdrom drive for use` | :sg:`quit() -> None` Uninitialize a drive for use. Call this when your program will not be accessing the drive for awhile. .. ## CD.quit ## .. method:: get_init | :sl:`true if this cd device initialized` | :sg:`get_init() -> bool` Test if this ``CDROM`` device is initialized. This is different than the ``pygame.cdrom.init()`` since each drive must also be initialized individually. .. ## CD.get_init ## .. method:: play | :sl:`start playing audio` | :sg:`play(track, start=None, end=None) -> None` Playback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played. If you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc. See the ``CD.get_numtracks()`` and ``CD.get_track_audio()`` to find tracks to playback. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.play ## .. method:: stop | :sl:`stop audio playback` | :sg:`stop() -> None` Stops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio. .. ## CD.stop ## .. method:: pause | :sl:`temporarily stop audio playback` | :sg:`pause() -> None` Temporarily stop audio playback on the ``CD``. The playback can be resumed at the same point with the ``CD.resume()`` method. If the ``CD`` is not playing this method does nothing. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.pause ## .. method:: resume | :sl:`unpause audio playback` | :sg:`resume() -> None` Unpause a paused ``CD``. If the ``CD`` is not paused or already playing, this method does nothing. .. ## CD.resume ## .. method:: eject | :sl:`eject or open the cdrom drive` | :sg:`eject() -> None` This will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped. .. ## CD.eject ## .. method:: get_id | :sl:`the index of the cdrom drive` | :sg:`get_id() -> id` Returns the integer id that was used to create the ``CD`` instance. This method can work on an uninitialized ``CD``. .. ## CD.get_id ## .. method:: get_name | :sl:`the system name of the cdrom drive` | :sg:`get_name() -> name` Return the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized ``CD``. .. ## CD.get_name ## .. method:: get_busy | :sl:`true if the drive is playing audio` | :sg:`get_busy() -> bool` Returns True if the drive busy playing back audio. .. ## CD.get_busy ## .. method:: get_paused | :sl:`true if the drive is paused` | :sg:`get_paused() -> bool` Returns True if the drive is currently paused. .. ## CD.get_paused ## .. method:: get_current | :sl:`the current audio playback position` | :sg:`get_current() -> track, seconds` Returns both the current track and time of that track. This method works when the drive is either playing or paused. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_current ## .. method:: get_empty | :sl:`False if a cdrom is in the drive` | :sg:`get_empty() -> bool` Return False if there is a cdrom currently in the drive. If the drive is empty this will return True. .. ## CD.get_empty ## .. method:: get_numtracks | :sl:`the number of tracks on the cdrom` | :sg:`get_numtracks() -> count` Return the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks. .. ## CD.get_numtracks ## .. method:: get_track_audio | :sl:`true if the cdrom track has audio data` | :sg:`get_track_audio(track) -> bool` Determine if a track on a cdrom contains audio data. You can also call ``CD.num_tracks()`` and ``CD.get_all()`` to determine more information about the cdrom. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_audio ## .. method:: get_all | :sl:`get all track information` | :sg:`get_all() -> [(audio, start, end, length), ...]` Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc. .. ## CD.get_all ## .. method:: get_track_start | :sl:`start time of a cdrom track` | :sg:`get_track_start(track) -> seconds` Return the absolute time in seconds where at start of the cdrom track. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_start ## .. method:: get_track_length | :sl:`length of a cdrom track` | :sg:`get_track_length(track) -> seconds` Return a floating point value in seconds of the length of the cdrom track. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_length ## .. ## pygame.cdrom.CD ## .. ## pygame.cdrom ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0371256 pygame-2.6.1/docs/reST/ref/code_examples/0000755000175100001770000000000014676242436017616 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/code_examples/angle_to.png0000644000175100001770000006140514676242340022114 0ustar00runnerdockerPNG  IHDRCndsRGB IDATx^ y *! CڎsD%CIJ )) :B"Z2 >RD~jmkzz}ﵞ^y]T P*@ZrzvtnVgT P*y3u*@anGfA+*=_"- ('o\C/'Y 1wn,%ST P*P6 1,gT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 '56)CІ`EKexqFNcgx`?X 6F^wFk + /r9N VbOZǚKBѰ$_Ux!ţqh V¯'Te @4hXVS_;gx IV1rEOOBg4Kt(gwg83,Cgwa92*1  !XHJr+IV@R*XS;u\m롣VL\cCbnm']QO *OD VLF2!P[.#XHTuA&Z}{šm@UO G%Tܙ-, D`Bda8]FEթwyԢN}[ aUY @4gX>FΗw!S/;2:J[F}b2"TBa3h缝Իl5f&a5AjY#Uv̗ISOڐ ̰PO  ,?bz`%rkֿuԊ#̰&ɖr1 f{Q5߳}j֊;gXɜ)gJMjKB`2VJV/0FvUVL\s2Ê1R,j%a!fTQ+mx (Q?Ua{5R,U0 +Ȑ߬' ?"y"kuCN! qPZy#XBg7U`3[TMw!WW#{U(^PYfEDUU@EaW!7e+TZif9od)>d Z~#p 3Y15I6*{y&2؂4+cW\E\4Y $Oi\iN,D*. Dokh, XAD`   @$zeȄIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/code_examples/draw_module_example.py0000644000175100001770000000663114676242340024205 0ustar00runnerdockerimport pygame from math import pi # Initialize pygame pygame.init() # Set the height and width of the screen size = [400, 300] screen = pygame.display.set_mode(size) pygame.display.set_caption("Example code for the draw module") # Loop until the user clicks the close button. done = False clock = pygame.time.Clock() while not done: # This limits the while loop to a max of 60 times per second. # Leave this out and we will use all CPU we can. clock.tick(60) for event in pygame.event.get(): # User did something if event.type == pygame.QUIT: # If user clicked close done = True # Flag that we are done so we exit this loop # Clear the screen and set the screen background screen.fill("white") # Draw on the screen a green line from (0, 0) to (50, 30) # 5 pixels wide. Uses (r, g, b) color - medium sea green. pygame.draw.line(screen, (60, 179, 113), [0, 0], [50, 30], 5) # Draw on the screen a green line from (0, 50) to (50, 80) # Because it is an antialiased line, it is 1 pixel wide. # Uses (r, g, b) color - medium sea green. pygame.draw.aaline(screen, (60, 179, 113), [0, 50], [50, 80], True) # Draw on the screen 3 black lines, each 5 pixels wide. # The 'False' means the first and last points are not connected. pygame.draw.lines( screen, "black", False, [[0, 80], [50, 90], [200, 80], [220, 30]], 5 ) # Draw a rectangle outline pygame.draw.rect(screen, "black", [75, 10, 50, 20], 2) # Draw a solid rectangle. Same color as "black" above, specified in a new way pygame.draw.rect(screen, (0, 0, 0), [150, 10, 50, 20]) # Draw a rectangle with rounded corners pygame.draw.rect(screen, "green", [115, 210, 70, 40], 10, border_radius=15) pygame.draw.rect( screen, "red", [135, 260, 50, 30], 0, border_radius=10, border_top_left_radius=0, border_bottom_right_radius=15, ) # Draw an ellipse outline, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [225, 10, 50, 20], 2) # Draw an solid ellipse, using a rectangle as the outside boundaries pygame.draw.ellipse(screen, "red", [300, 10, 50, 20]) # This draws a triangle using the polygon command pygame.draw.polygon(screen, "black", [[100, 100], [0, 200], [200, 200]], 5) # Draw an arc as part of an ellipse. # Use radians to determine what angle to draw. pygame.draw.arc(screen, "black", [210, 75, 150, 125], 0, pi / 2, 2) pygame.draw.arc(screen, "green", [210, 75, 150, 125], pi / 2, pi, 2) pygame.draw.arc(screen, "blue", [210, 75, 150, 125], pi, 3 * pi / 2, 2) pygame.draw.arc(screen, "red", [210, 75, 150, 125], 3 * pi / 2, 2 * pi, 2) # Draw a circle pygame.draw.circle(screen, "blue", [60, 250], 40) # Draw only one circle quadrant pygame.draw.circle(screen, "blue", [250, 250], 40, 0, draw_top_right=True) pygame.draw.circle(screen, "red", [250, 250], 40, 30, draw_top_left=True) pygame.draw.circle(screen, "green", [250, 250], 40, 20, draw_bottom_left=True) pygame.draw.circle(screen, "black", [250, 250], 40, 10, draw_bottom_right=True) # Go ahead and update the screen with what we've drawn. # This MUST happen after all the other drawing commands. pygame.display.flip() # Be IDLE friendly pygame.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/code_examples/joystick_calls.png0000644000175100001770000007246414676242340023350 0ustar00runnerdocker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027 mtime=1727612127.979112 pygame-2.6.1/docs/reST/ref/color.rst0000644000175100001770000002505614676242340016660 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Color` =================== .. currentmodule:: pygame .. class:: Color | :sl:`pygame object for color representations` | :sg:`Color(r, g, b) -> Color` | :sg:`Color(r, g, b, a=255) -> Color` | :sg:`Color(color_value) -> Color` The ``Color`` class represents ``RGBA`` color values using a value range of 0 to 255 inclusive. It allows basic arithmetic operations — binary operations ``+``, ``-``, ``*``, ``//``, ``%``, and unary operation ``~`` — to create new colors, supports conversions to other color spaces such as ``HSV`` or ``HSL`` and lets you adjust single color channels. Alpha defaults to 255 (fully opaque) when not given. The arithmetic operations and ``correct_gamma()`` method preserve subclasses. For the binary operators, the class of the returned color is that of the left hand color object of the operator. Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers. There was a bug in pygame 1.8.1 where the default alpha was 0, not 255 like previously. Color objects export the C level array interface. The interface exports a read-only one dimensional unsigned byte array of the same assigned length as the color. The new buffer interface is also exported, with the same characteristics as the array interface. The floor division, ``//``, and modulus, ``%``, operators do not raise an exception for division by zero. Instead, if a color, or alpha, channel in the right hand color is 0, then the result is 0. For example: :: # These expressions are True Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0) Use ``int(color)`` to return the immutable integer value of the color, usable as a ``dict`` key. This integer value differs from the mapped pixel values of :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` and :meth:`pygame.Surface.unmap_rgb`. It can be passed as a ``color_value`` argument to :class:`Color` (useful with sets). See :doc:`color_list` for samples of the available named colors. :param int r: red value in the range of 0 to 255 inclusive :param int g: green value in the range of 0 to 255 inclusive :param int b: blue value in the range of 0 to 255 inclusive :param int a: (optional) alpha value in the range of 0 to 255 inclusive, default is 255 :param color_value: color value (see note below for the supported formats) .. note:: Supported ``color_value`` formats: | - **Color object:** clones the given :class:`Color` object | - **Color name: str:** name of the color to use, e.g. ``'red'`` (all the supported name strings can be found in the :doc:`color_list`, with sample swatches) | - **HTML color format str:** ``'#rrggbbaa'`` or ``'#rrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **hex number str:** ``'0xrrggbbaa'`` or ``'0xrrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **int:** int value of the color to use, using hex numbers can make this parameter more readable, e.g. ``0xrrggbbaa``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided | - **tuple/list of int color values:** ``(R, G, B, A)`` or ``(R, G, B)``, where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not provided :type color_value: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) :returns: a newly created :class:`Color` object :rtype: Color .. versionchanged:: 2.0.0 Support for tuples, lists, and :class:`Color` objects when creating :class:`Color` objects. .. versionchanged:: 1.9.2 Color objects export the C level array interface. .. versionchanged:: 1.9.0 Color objects support 4-element tuples of integers. .. versionchanged:: 1.8.1 New implementation of the class. .. attribute:: r | :sl:`Gets or sets the red value of the Color.` | :sg:`r -> int` The red value of the Color. .. ## Color.r ## .. attribute:: g | :sl:`Gets or sets the green value of the Color.` | :sg:`g -> int` The green value of the Color. .. ## Color.g ## .. attribute:: b | :sl:`Gets or sets the blue value of the Color.` | :sg:`b -> int` The blue value of the Color. .. ## Color.b ## .. attribute:: a | :sl:`Gets or sets the alpha value of the Color.` | :sg:`a -> int` The alpha value of the Color. .. ## Color.a ## .. attribute:: cmy | :sl:`Gets or sets the CMY representation of the Color.` | :sg:`cmy -> tuple` The ``CMY`` representation of the Color. The ``CMY`` components are in the ranges ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Note that this will not return the absolutely exact ``CMY`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``CMY`` mapping from 0-1 rounding errors may cause the ``CMY`` values to differ slightly from what you might expect. .. ## Color.cmy ## .. attribute:: hsva | :sl:`Gets or sets the HSVA representation of the Color.` | :sg:`hsva -> tuple` The ``HSVA`` representation of the Color. The ``HSVA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSV`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSV`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSV`` values to differ slightly from what you might expect. .. ## Color.hsva ## .. attribute:: hsla | :sl:`Gets or sets the HSLA representation of the Color.` | :sg:`hsla -> tuple` The ``HSLA`` representation of the Color. The ``HSLA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSL`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSL`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSL`` values to differ slightly from what you might expect. .. ## Color.hsla ## .. attribute:: i1i2i3 | :sl:`Gets or sets the I1I2I3 representation of the Color.` | :sg:`i1i2i3 -> tuple` The ``I1I2I3`` representation of the Color. The ``I1I2I3`` components are in the ranges ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Note that this will not return the absolutely exact ``I1I2I3`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``I1I2I3`` mapping from 0-1 rounding errors may cause the ``I1I2I3`` values to differ slightly from what you might expect. .. ## Color.i1i2i3 ## .. method:: normalize | :sl:`Returns the normalized RGBA values of the Color.` | :sg:`normalize() -> tuple` Returns the normalized ``RGBA`` values of the Color as floating point values. .. ## Color.normalize ## .. method:: correct_gamma | :sl:`Applies a certain gamma value to the Color.` | :sg:`correct_gamma (gamma) -> Color` Applies a certain gamma value to the Color and returns a new Color with the adjusted ``RGBA`` values. .. ## Color.correct_gamma ## .. method:: set_length | :sl:`Set the number of elements in the Color to 1,2,3, or 4.` | :sg:`set_length(len) -> None` DEPRECATED: You may unpack the values you need like so, ``r, g, b, _ = pygame.Color(100, 100, 100)`` If you only want r, g and b Or ``r, g, *_ = pygame.Color(100, 100, 100)`` if you only want r and g The default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do ``len(acolor)``. .. deprecated:: 2.1.3 .. versionadded:: 1.9.0 .. ## Color.set_length ## .. method:: grayscale | :sl:`returns the grayscale of a Color` | :sg:`grayscale() -> Color` Returns a Color which represents the grayscaled version of self using the luminosity formula which weights red, green and blue according to their wavelengths.. .. ## Color.grayscale ## .. method:: lerp | :sl:`returns a linear interpolation to the given Color.` | :sg:`lerp(Color, float) -> Color` Returns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned. .. versionadded:: 2.0.1 .. ## Color.lerp ## .. method:: premul_alpha | :sl:`returns a Color where the r,g,b components have been multiplied by the alpha.` | :sg:`premul_alpha() -> Color` Returns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged. This is useful when working with the ``BLEND_PREMULTIPLIED`` blending mode flag for :meth:`pygame.Surface.blit()`, which assumes that all surfaces using it are using pre-multiplied alpha colors. .. versionadded:: 2.0.0 .. ## Color.premul_alpha ## .. method:: update | :sl:`Sets the elements of the color` | :sg:`update(r, g, b) -> None` | :sg:`update(r, g, b, a=255) -> None` | :sg:`update(color_value) -> None` Sets the elements of the color. See parameters for :meth:`pygame.Color` for the parameters of this function. If the alpha value was not set it will not change. .. versionadded:: 2.0.1 .. ## Color.update ## .. ## pygame.Color ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/color_list.rst0000644000175100001770000027414114676242340017714 0ustar00runnerdocker.. include:: common.txt Named Colors ============ .. raw:: html :doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_). .. role:: aliceblue .. role:: antiquewhite .. role:: antiquewhite1 .. role:: antiquewhite2 .. role:: antiquewhite3 .. role:: antiquewhite4 .. role:: aqua .. role:: aquamarine .. role:: aquamarine1 .. role:: aquamarine2 .. role:: aquamarine3 .. role:: aquamarine4 .. role:: azure .. role:: azure1 .. role:: azure2 .. role:: azure3 .. role:: azure4 .. role:: beige .. role:: bisque .. role:: bisque1 .. role:: bisque2 .. role:: bisque3 .. role:: bisque4 .. role:: black .. role:: blanchedalmond .. role:: blue .. role:: blue1 .. role:: blue2 .. role:: blue3 .. role:: blue4 .. role:: blueviolet .. role:: brown .. role:: brown1 .. role:: brown2 .. role:: brown3 .. role:: brown4 .. role:: burlywood .. role:: burlywood1 .. role:: burlywood2 .. role:: burlywood3 .. role:: burlywood4 .. role:: cadetblue .. role:: cadetblue1 .. role:: cadetblue2 .. role:: cadetblue3 .. role:: cadetblue4 .. role:: chartreuse .. role:: chartreuse1 .. role:: chartreuse2 .. role:: chartreuse3 .. role:: chartreuse4 .. role:: chocolate .. role:: chocolate1 .. role:: chocolate2 .. role:: chocolate3 .. role:: chocolate4 .. role:: coral .. role:: coral1 .. role:: coral2 .. role:: coral3 .. role:: coral4 .. role:: cornflowerblue .. role:: cornsilk .. role:: cornsilk1 .. role:: cornsilk2 .. role:: cornsilk3 .. role:: cornsilk4 .. role:: crimson .. role:: cyan .. role:: cyan1 .. role:: cyan2 .. role:: cyan3 .. role:: cyan4 .. role:: darkblue .. role:: darkcyan .. role:: darkgoldenrod .. role:: darkgoldenrod1 .. role:: darkgoldenrod2 .. role:: darkgoldenrod3 .. role:: darkgoldenrod4 .. role:: darkgray .. role:: darkgreen .. role:: darkgrey .. role:: darkkhaki .. role:: darkmagenta .. role:: darkolivegreen .. role:: darkolivegreen1 .. role:: darkolivegreen2 .. role:: darkolivegreen3 .. role:: darkolivegreen4 .. role:: darkorange .. role:: darkorange1 .. role:: darkorange2 .. role:: darkorange3 .. role:: darkorange4 .. role:: darkorchid .. role:: darkorchid1 .. role:: darkorchid2 .. role:: darkorchid3 .. role:: darkorchid4 .. role:: darkred .. role:: darksalmon .. role:: darkseagreen .. role:: darkseagreen1 .. role:: darkseagreen2 .. role:: darkseagreen3 .. role:: darkseagreen4 .. role:: darkslateblue .. role:: darkslategray .. role:: darkslategray1 .. role:: darkslategray2 .. role:: darkslategray3 .. role:: darkslategray4 .. role:: darkslategrey .. role:: darkturquoise .. role:: darkviolet .. role:: deeppink .. role:: deeppink1 .. role:: deeppink2 .. role:: deeppink3 .. role:: deeppink4 .. role:: deepskyblue .. role:: deepskyblue1 .. role:: deepskyblue2 .. role:: deepskyblue3 .. role:: deepskyblue4 .. role:: dimgray .. role:: dimgrey .. role:: dodgerblue .. role:: dodgerblue1 .. role:: dodgerblue2 .. role:: dodgerblue3 .. role:: dodgerblue4 .. role:: firebrick .. role:: firebrick1 .. role:: firebrick2 .. role:: firebrick3 .. role:: firebrick4 .. role:: floralwhite .. role:: forestgreen .. role:: fuchsia .. role:: gainsboro .. role:: ghostwhite .. role:: gold .. role:: gold1 .. role:: gold2 .. role:: gold3 .. role:: gold4 .. role:: goldenrod .. role:: goldenrod1 .. role:: goldenrod2 .. role:: goldenrod3 .. role:: goldenrod4 .. role:: gray .. role:: gray0 .. role:: gray1 .. role:: gray2 .. role:: gray3 .. role:: gray4 .. role:: gray5 .. role:: gray6 .. role:: gray7 .. role:: gray8 .. role:: gray9 .. role:: gray10 .. role:: gray11 .. role:: gray12 .. role:: gray13 .. role:: gray14 .. role:: gray15 .. role:: gray16 .. role:: gray17 .. role:: gray18 .. role:: gray19 .. role:: gray20 .. role:: gray21 .. role:: gray22 .. role:: gray23 .. role:: gray24 .. role:: gray25 .. role:: gray26 .. role:: gray27 .. role:: gray28 .. role:: gray29 .. role:: gray30 .. role:: gray31 .. role:: gray32 .. role:: gray33 .. role:: gray34 .. role:: gray35 .. role:: gray36 .. role:: gray37 .. role:: gray38 .. role:: gray39 .. role:: gray40 .. role:: gray41 .. role:: gray42 .. role:: gray43 .. role:: gray44 .. role:: gray45 .. role:: gray46 .. role:: gray47 .. role:: gray48 .. role:: gray49 .. role:: gray50 .. role:: gray51 .. role:: gray52 .. role:: gray53 .. role:: gray54 .. role:: gray55 .. role:: gray56 .. role:: gray57 .. role:: gray58 .. role:: gray59 .. role:: gray60 .. role:: gray61 .. role:: gray62 .. role:: gray63 .. role:: gray64 .. role:: gray65 .. role:: gray66 .. role:: gray67 .. role:: gray68 .. role:: gray69 .. role:: gray70 .. role:: gray71 .. role:: gray72 .. role:: gray73 .. role:: gray74 .. role:: gray75 .. role:: gray76 .. role:: gray77 .. role:: gray78 .. role:: gray79 .. role:: gray80 .. role:: gray81 .. role:: gray82 .. role:: gray83 .. role:: gray84 .. role:: gray85 .. role:: gray86 .. role:: gray87 .. role:: gray88 .. role:: gray89 .. role:: gray90 .. role:: gray91 .. role:: gray92 .. role:: gray93 .. role:: gray94 .. role:: gray95 .. role:: gray96 .. role:: gray97 .. role:: gray98 .. role:: gray99 .. role:: gray100 .. role:: green .. role:: green1 .. role:: green2 .. role:: green3 .. role:: green4 .. role:: greenyellow .. role:: grey .. role:: grey0 .. role:: grey1 .. role:: grey2 .. role:: grey3 .. role:: grey4 .. role:: grey5 .. role:: grey6 .. role:: grey7 .. role:: grey8 .. role:: grey9 .. role:: grey10 .. role:: grey11 .. role:: grey12 .. role:: grey13 .. role:: grey14 .. role:: grey15 .. role:: grey16 .. role:: grey17 .. role:: grey18 .. role:: grey19 .. role:: grey20 .. role:: grey21 .. role:: grey22 .. role:: grey23 .. role:: grey24 .. role:: grey25 .. role:: grey26 .. role:: grey27 .. role:: grey28 .. role:: grey29 .. role:: grey30 .. role:: grey31 .. role:: grey32 .. role:: grey33 .. role:: grey34 .. role:: grey35 .. role:: grey36 .. role:: grey37 .. role:: grey38 .. role:: grey39 .. role:: grey40 .. role:: grey41 .. role:: grey42 .. role:: grey43 .. role:: grey44 .. role:: grey45 .. role:: grey46 .. role:: grey47 .. role:: grey48 .. role:: grey49 .. role:: grey50 .. role:: grey51 .. role:: grey52 .. role:: grey53 .. role:: grey54 .. role:: grey55 .. role:: grey56 .. role:: grey57 .. role:: grey58 .. role:: grey59 .. role:: grey60 .. role:: grey61 .. role:: grey62 .. role:: grey63 .. role:: grey64 .. role:: grey65 .. role:: grey66 .. role:: grey67 .. role:: grey68 .. role:: grey69 .. role:: grey70 .. role:: grey71 .. role:: grey72 .. role:: grey73 .. role:: grey74 .. role:: grey75 .. role:: grey76 .. role:: grey77 .. role:: grey78 .. role:: grey79 .. role:: grey80 .. role:: grey81 .. role:: grey82 .. role:: grey83 .. role:: grey84 .. role:: grey85 .. role:: grey86 .. role:: grey87 .. role:: grey88 .. role:: grey89 .. role:: grey90 .. role:: grey91 .. role:: grey92 .. role:: grey93 .. role:: grey94 .. role:: grey95 .. role:: grey96 .. role:: grey97 .. role:: grey98 .. role:: grey99 .. role:: grey100 .. role:: honeydew .. role:: honeydew1 .. role:: honeydew2 .. role:: honeydew3 .. role:: honeydew4 .. role:: hotpink .. role:: hotpink1 .. role:: hotpink2 .. role:: hotpink3 .. role:: hotpink4 .. role:: indianred .. role:: indianred1 .. role:: indianred2 .. role:: indianred3 .. role:: indianred4 .. role:: indigo .. role:: ivory .. role:: ivory1 .. role:: ivory2 .. role:: ivory3 .. role:: ivory4 .. role:: khaki .. role:: khaki1 .. role:: khaki2 .. role:: khaki3 .. role:: khaki4 .. role:: lavender .. role:: lavenderblush .. role:: lavenderblush1 .. role:: lavenderblush2 .. role:: lavenderblush3 .. role:: lavenderblush4 .. role:: lawngreen .. role:: lemonchiffon .. role:: lemonchiffon1 .. role:: lemonchiffon2 .. role:: lemonchiffon3 .. role:: lemonchiffon4 .. role:: lightblue .. role:: lightblue1 .. role:: lightblue2 .. role:: lightblue3 .. role:: lightblue4 .. role:: lightcoral .. role:: lightcyan .. role:: lightcyan1 .. role:: lightcyan2 .. role:: lightcyan3 .. role:: lightcyan4 .. role:: lightgoldenrod .. role:: lightgoldenrod1 .. role:: lightgoldenrod2 .. role:: lightgoldenrod3 .. role:: lightgoldenrod4 .. role:: lightgoldenrodyellow .. role:: lightgray .. role:: lightgreen .. role:: lightgrey .. role:: lightpink .. role:: lightpink1 .. role:: lightpink2 .. role:: lightpink3 .. role:: lightpink4 .. role:: lightsalmon .. role:: lightsalmon1 .. role:: lightsalmon2 .. role:: lightsalmon3 .. role:: lightsalmon4 .. role:: lightseagreen .. role:: lightskyblue .. role:: lightskyblue1 .. role:: lightskyblue2 .. role:: lightskyblue3 .. role:: lightskyblue4 .. role:: lightslateblue .. role:: lightslategray .. role:: lightslategrey .. role:: lightsteelblue .. role:: lightsteelblue1 .. role:: lightsteelblue2 .. role:: lightsteelblue3 .. role:: lightsteelblue4 .. role:: lightyellow .. role:: lightyellow1 .. role:: lightyellow2 .. role:: lightyellow3 .. role:: lightyellow4 .. role:: limegreen .. role:: lime .. role:: linen .. role:: magenta .. role:: magenta1 .. role:: magenta2 .. role:: magenta3 .. role:: magenta4 .. role:: maroon .. role:: maroon1 .. role:: maroon2 .. role:: maroon3 .. role:: maroon4 .. role:: mediumaquamarine .. role:: mediumblue .. role:: mediumorchid .. role:: mediumorchid1 .. role:: mediumorchid2 .. role:: mediumorchid3 .. role:: mediumorchid4 .. role:: mediumpurple .. role:: mediumpurple1 .. role:: mediumpurple2 .. role:: mediumpurple3 .. role:: mediumpurple4 .. role:: mediumseagreen .. role:: mediumslateblue .. role:: mediumspringgreen .. role:: mediumturquoise .. role:: mediumvioletred .. role:: midnightblue .. role:: mintcream .. role:: mistyrose .. role:: mistyrose1 .. role:: mistyrose2 .. role:: mistyrose3 .. role:: mistyrose4 .. role:: moccasin .. role:: navajowhite .. role:: navajowhite1 .. role:: navajowhite2 .. role:: navajowhite3 .. role:: navajowhite4 .. role:: navy .. role:: navyblue .. role:: oldlace .. role:: olive .. role:: olivedrab .. role:: olivedrab1 .. role:: olivedrab2 .. role:: olivedrab3 .. role:: olivedrab4 .. role:: orange .. role:: orange1 .. role:: orange2 .. role:: orange3 .. role:: orange4 .. role:: orangered .. role:: orangered1 .. role:: orangered2 .. role:: orangered3 .. role:: orangered4 .. role:: orchid .. role:: orchid1 .. role:: orchid2 .. role:: orchid3 .. role:: orchid4 .. role:: palegoldenrod .. role:: palegreen .. role:: palegreen1 .. role:: palegreen2 .. role:: palegreen3 .. role:: palegreen4 .. role:: paleturquoise .. role:: paleturquoise1 .. role:: paleturquoise2 .. role:: paleturquoise3 .. role:: paleturquoise4 .. role:: palevioletred .. role:: palevioletred1 .. role:: palevioletred2 .. role:: palevioletred3 .. role:: palevioletred4 .. role:: papayawhip .. role:: peachpuff .. role:: peachpuff1 .. role:: peachpuff2 .. role:: peachpuff3 .. role:: peachpuff4 .. role:: peru .. role:: pink .. role:: pink1 .. role:: pink2 .. role:: pink3 .. role:: pink4 .. role:: plum .. role:: plum1 .. role:: plum2 .. role:: plum3 .. role:: plum4 .. role:: powderblue .. role:: purple .. role:: purple1 .. role:: purple2 .. role:: purple3 .. role:: purple4 .. role:: red .. role:: red1 .. role:: red2 .. role:: red3 .. role:: red4 .. role:: rosybrown .. role:: rosybrown1 .. role:: rosybrown2 .. role:: rosybrown3 .. role:: rosybrown4 .. role:: royalblue .. role:: royalblue1 .. role:: royalblue2 .. role:: royalblue3 .. role:: royalblue4 .. role:: saddlebrown .. role:: salmon .. role:: salmon1 .. role:: salmon2 .. role:: salmon3 .. role:: salmon4 .. role:: sandybrown .. role:: seagreen .. role:: seagreen1 .. role:: seagreen2 .. role:: seagreen3 .. role:: seagreen4 .. role:: seashell .. role:: seashell1 .. role:: seashell2 .. role:: seashell3 .. role:: seashell4 .. role:: sienna .. role:: sienna1 .. role:: sienna2 .. role:: sienna3 .. role:: sienna4 .. role:: silver .. role:: skyblue .. role:: skyblue1 .. role:: skyblue2 .. role:: skyblue3 .. role:: skyblue4 .. role:: slateblue .. role:: slateblue1 .. role:: slateblue2 .. role:: slateblue3 .. role:: slateblue4 .. role:: slategray .. role:: slategray1 .. role:: slategray2 .. role:: slategray3 .. role:: slategray4 .. role:: slategrey .. role:: snow .. role:: snow1 .. role:: snow2 .. role:: snow3 .. role:: snow4 .. role:: springgreen .. role:: springgreen1 .. role:: springgreen2 .. role:: springgreen3 .. role:: springgreen4 .. role:: steelblue .. role:: steelblue1 .. role:: steelblue2 .. role:: steelblue3 .. role:: steelblue4 .. role:: tan .. role:: tan1 .. role:: tan2 .. role:: tan3 .. role:: tan4 .. role:: teal .. role:: thistle .. role:: thistle1 .. role:: thistle2 .. role:: thistle3 .. role:: thistle4 .. role:: tomato .. role:: tomato1 .. role:: tomato2 .. role:: tomato3 .. role:: tomato4 .. role:: turquoise .. role:: turquoise1 .. role:: turquoise2 .. role:: turquoise3 .. role:: turquoise4 .. role:: violet .. role:: violetred .. role:: violetred1 .. role:: violetred2 .. role:: violetred3 .. role:: violetred4 .. role:: wheat .. role:: wheat1 .. role:: wheat2 .. role:: wheat3 .. role:: wheat4 .. role:: white .. role:: whitesmoke .. role:: yellow .. role:: yellow1 .. role:: yellow2 .. role:: yellow3 .. role:: yellow4 .. role:: yellowgreen ========================== ====================================================================================================== Name Color ========================== ====================================================================================================== ``aliceblue`` :aliceblue:`████████` ``antiquewhite`` :antiquewhite:`████████` ``antiquewhite1`` :antiquewhite1:`████████` ``antiquewhite2`` :antiquewhite2:`████████` ``antiquewhite3`` :antiquewhite3:`████████` ``antiquewhite4`` :antiquewhite4:`████████` ``aqua`` :aqua:`████████` ``aquamarine`` :aquamarine:`████████` ``aquamarine1`` :aquamarine1:`████████` ``aquamarine2`` :aquamarine2:`████████` ``aquamarine3`` :aquamarine3:`████████` ``aquamarine4`` :aquamarine4:`████████` ``azure`` :azure:`████████` ``azure1`` :azure1:`████████` ``azure2`` :azure2:`████████` ``azure3`` :azure3:`████████` ``azure4`` :azure4:`████████` ``beige`` :beige:`████████` ``bisque`` :bisque:`████████` ``bisque1`` :bisque1:`████████` ``bisque2`` :bisque2:`████████` ``bisque3`` :bisque3:`████████` ``bisque4`` :bisque4:`████████` ``black`` :black:`████████` ``blanchedalmond`` :blanchedalmond:`████████` ``blue`` :blue:`████████` ``blue1`` :blue1:`████████` ``blue2`` :blue2:`████████` ``blue3`` :blue3:`████████` ``blue4`` :blue4:`████████` ``blueviolet`` :blueviolet:`████████` ``brown`` :brown:`████████` ``brown1`` :brown1:`████████` ``brown2`` :brown2:`████████` ``brown3`` :brown3:`████████` ``brown4`` :brown4:`████████` ``burlywood`` :burlywood:`████████` ``burlywood1`` :burlywood1:`████████` ``burlywood2`` :burlywood2:`████████` ``burlywood3`` :burlywood3:`████████` ``burlywood4`` :burlywood4:`████████` ``cadetblue`` :cadetblue:`████████` ``cadetblue1`` :cadetblue1:`████████` ``cadetblue2`` :cadetblue2:`████████` ``cadetblue3`` :cadetblue3:`████████` ``cadetblue4`` :cadetblue4:`████████` ``chartreuse`` :chartreuse:`████████` ``chartreuse1`` :chartreuse1:`████████` ``chartreuse2`` :chartreuse2:`████████` ``chartreuse3`` :chartreuse3:`████████` ``chartreuse4`` :chartreuse4:`████████` ``chocolate`` :chocolate:`████████` ``chocolate1`` :chocolate1:`████████` ``chocolate2`` :chocolate2:`████████` ``chocolate3`` :chocolate3:`████████` ``chocolate4`` :chocolate4:`████████` ``coral`` :coral:`████████` ``coral1`` :coral1:`████████` ``coral2`` :coral2:`████████` ``coral3`` :coral3:`████████` ``coral4`` :coral4:`████████` ``cornflowerblue`` :cornflowerblue:`████████` ``cornsilk`` :cornsilk:`████████` ``cornsilk1`` :cornsilk1:`████████` ``cornsilk2`` :cornsilk2:`████████` ``cornsilk3`` :cornsilk3:`████████` ``cornsilk4`` :cornsilk4:`████████` ``crimson`` :crimson:`████████` ``cyan`` :cyan:`████████` ``cyan1`` :cyan1:`████████` ``cyan2`` :cyan2:`████████` ``cyan3`` :cyan3:`████████` ``cyan4`` :cyan4:`████████` ``darkblue`` :darkblue:`████████` ``darkcyan`` :darkcyan:`████████` ``darkgoldenrod`` :darkgoldenrod:`████████` ``darkgoldenrod1`` :darkgoldenrod1:`████████` ``darkgoldenrod2`` :darkgoldenrod2:`████████` ``darkgoldenrod3`` :darkgoldenrod3:`████████` ``darkgoldenrod4`` :darkgoldenrod4:`████████` ``darkgray`` :darkgray:`████████` ``darkgreen`` :darkgreen:`████████` ``darkgrey`` :darkgrey:`████████` ``darkkhaki`` :darkkhaki:`████████` ``darkmagenta`` :darkmagenta:`████████` ``darkolivegreen`` :darkolivegreen:`████████` ``darkolivegreen1`` :darkolivegreen1:`████████` ``darkolivegreen2`` :darkolivegreen2:`████████` ``darkolivegreen3`` :darkolivegreen3:`████████` ``darkolivegreen4`` :darkolivegreen4:`████████` ``darkorange`` :darkorange:`████████` ``darkorange1`` :darkorange1:`████████` ``darkorange2`` :darkorange2:`████████` ``darkorange3`` :darkorange3:`████████` ``darkorange4`` :darkorange4:`████████` ``darkorchid`` :darkorchid:`████████` ``darkorchid1`` :darkorchid1:`████████` ``darkorchid2`` :darkorchid2:`████████` ``darkorchid3`` :darkorchid3:`████████` ``darkorchid4`` :darkorchid4:`████████` ``darkred`` :darkred:`████████` ``darksalmon`` :darksalmon:`████████` ``darkseagreen`` :darkseagreen:`████████` ``darkseagreen1`` :darkseagreen1:`████████` ``darkseagreen2`` :darkseagreen2:`████████` ``darkseagreen3`` :darkseagreen3:`████████` ``darkseagreen4`` :darkseagreen4:`████████` ``darkslateblue`` :darkslateblue:`████████` ``darkslategray`` :darkslategray:`████████` ``darkslategray1`` :darkslategray1:`████████` ``darkslategray2`` :darkslategray2:`████████` ``darkslategray3`` :darkslategray3:`████████` ``darkslategray4`` :darkslategray4:`████████` ``darkslategrey`` :darkslategrey:`████████` ``darkturquoise`` :darkturquoise:`████████` ``darkviolet`` :darkviolet:`████████` ``deeppink`` :deeppink:`████████` ``deeppink1`` :deeppink1:`████████` ``deeppink2`` :deeppink2:`████████` ``deeppink3`` :deeppink3:`████████` ``deeppink4`` :deeppink4:`████████` ``deepskyblue`` :deepskyblue:`████████` ``deepskyblue1`` :deepskyblue1:`████████` ``deepskyblue2`` :deepskyblue2:`████████` ``deepskyblue3`` :deepskyblue3:`████████` ``deepskyblue4`` :deepskyblue4:`████████` ``dimgray`` :dimgray:`████████` ``dimgrey`` :dimgrey:`████████` ``dodgerblue`` :dodgerblue:`████████` ``dodgerblue1`` :dodgerblue1:`████████` ``dodgerblue2`` :dodgerblue2:`████████` ``dodgerblue3`` :dodgerblue3:`████████` ``dodgerblue4`` :dodgerblue4:`████████` ``firebrick`` :firebrick:`████████` ``firebrick1`` :firebrick1:`████████` ``firebrick2`` :firebrick2:`████████` ``firebrick3`` :firebrick3:`████████` ``firebrick4`` :firebrick4:`████████` ``floralwhite`` :floralwhite:`████████` ``forestgreen`` :forestgreen:`████████` ``fuchsia`` :fuchsia:`████████` ``gainsboro`` :gainsboro:`████████` ``ghostwhite`` :ghostwhite:`████████` ``gold`` :gold:`████████` ``gold1`` :gold1:`████████` ``gold2`` :gold2:`████████` ``gold3`` :gold3:`████████` ``gold4`` :gold4:`████████` ``goldenrod`` :goldenrod:`████████` ``goldenrod1`` :goldenrod1:`████████` ``goldenrod2`` :goldenrod2:`████████` ``goldenrod3`` :goldenrod3:`████████` ``goldenrod4`` :goldenrod4:`████████` ``gray`` :gray:`████████` ``gray0`` :gray0:`████████` ``gray1`` :gray1:`████████` ``gray2`` :gray2:`████████` ``gray3`` :gray3:`████████` ``gray4`` :gray4:`████████` ``gray5`` :gray5:`████████` ``gray6`` :gray6:`████████` ``gray7`` :gray7:`████████` ``gray8`` :gray8:`████████` ``gray9`` :gray9:`████████` ``gray10`` :gray10:`████████` ``gray11`` :gray11:`████████` ``gray12`` :gray12:`████████` ``gray13`` :gray13:`████████` ``gray14`` :gray14:`████████` ``gray15`` :gray15:`████████` ``gray16`` :gray16:`████████` ``gray17`` :gray17:`████████` ``gray18`` :gray18:`████████` ``gray19`` :gray19:`████████` ``gray20`` :gray20:`████████` ``gray21`` :gray21:`████████` ``gray22`` :gray22:`████████` ``gray23`` :gray23:`████████` ``gray24`` :gray24:`████████` ``gray25`` :gray25:`████████` ``gray26`` :gray26:`████████` ``gray27`` :gray27:`████████` ``gray28`` :gray28:`████████` ``gray29`` :gray29:`████████` ``gray30`` :gray30:`████████` ``gray31`` :gray31:`████████` ``gray32`` :gray32:`████████` ``gray33`` :gray33:`████████` ``gray34`` :gray34:`████████` ``gray35`` :gray35:`████████` ``gray36`` :gray36:`████████` ``gray37`` :gray37:`████████` ``gray38`` :gray38:`████████` ``gray39`` :gray39:`████████` ``gray40`` :gray40:`████████` ``gray41`` :gray41:`████████` ``gray42`` :gray42:`████████` ``gray43`` :gray43:`████████` ``gray44`` :gray44:`████████` ``gray45`` :gray45:`████████` ``gray46`` :gray46:`████████` ``gray47`` :gray47:`████████` ``gray48`` :gray48:`████████` ``gray49`` :gray49:`████████` ``gray50`` :gray50:`████████` ``gray51`` :gray51:`████████` ``gray52`` :gray52:`████████` ``gray53`` :gray53:`████████` ``gray54`` :gray54:`████████` ``gray55`` :gray55:`████████` ``gray56`` :gray56:`████████` ``gray57`` :gray57:`████████` ``gray58`` :gray58:`████████` ``gray59`` :gray59:`████████` ``gray60`` :gray60:`████████` ``gray61`` :gray61:`████████` ``gray62`` :gray62:`████████` ``gray63`` :gray63:`████████` ``gray64`` :gray64:`████████` ``gray65`` :gray65:`████████` ``gray66`` :gray66:`████████` ``gray67`` :gray67:`████████` ``gray68`` :gray68:`████████` ``gray69`` :gray69:`████████` ``gray70`` :gray70:`████████` ``gray71`` :gray71:`████████` ``gray72`` :gray72:`████████` ``gray73`` :gray73:`████████` ``gray74`` :gray74:`████████` ``gray75`` :gray75:`████████` ``gray76`` :gray76:`████████` ``gray77`` :gray77:`████████` ``gray78`` :gray78:`████████` ``gray79`` :gray79:`████████` ``gray80`` :gray80:`████████` ``gray81`` :gray81:`████████` ``gray82`` :gray82:`████████` ``gray83`` :gray83:`████████` ``gray84`` :gray84:`████████` ``gray85`` :gray85:`████████` ``gray86`` :gray86:`████████` ``gray87`` :gray87:`████████` ``gray88`` :gray88:`████████` ``gray89`` :gray89:`████████` ``gray90`` :gray90:`████████` ``gray91`` :gray91:`████████` ``gray92`` :gray92:`████████` ``gray93`` :gray93:`████████` ``gray94`` :gray94:`████████` ``gray95`` :gray95:`████████` ``gray96`` :gray96:`████████` ``gray97`` :gray97:`████████` ``gray98`` :gray98:`████████` ``gray99`` :gray99:`████████` ``gray100`` :gray100:`████████` ``green`` :green:`████████` ``green1`` :green1:`████████` ``green2`` :green2:`████████` ``green3`` :green3:`████████` ``green4`` :green4:`████████` ``greenyellow`` :greenyellow:`████████` ``grey`` :grey:`████████` ``grey0`` :grey0:`████████` ``grey1`` :grey1:`████████` ``grey2`` :grey2:`████████` ``grey3`` :grey3:`████████` ``grey4`` :grey4:`████████` ``grey5`` :grey5:`████████` ``grey6`` :grey6:`████████` ``grey7`` :grey7:`████████` ``grey8`` :grey8:`████████` ``grey9`` :grey9:`████████` ``grey10`` :grey10:`████████` ``grey11`` :grey11:`████████` ``grey12`` :grey12:`████████` ``grey13`` :grey13:`████████` ``grey14`` :grey14:`████████` ``grey15`` :grey15:`████████` ``grey16`` :grey16:`████████` ``grey17`` :grey17:`████████` ``grey18`` :grey18:`████████` ``grey19`` :grey19:`████████` ``grey20`` :grey20:`████████` ``grey21`` :grey21:`████████` ``grey22`` :grey22:`████████` ``grey23`` :grey23:`████████` ``grey24`` :grey24:`████████` ``grey25`` :grey25:`████████` ``grey26`` :grey26:`████████` ``grey27`` :grey27:`████████` ``grey28`` :grey28:`████████` ``grey29`` :grey29:`████████` ``grey30`` :grey30:`████████` ``grey31`` :grey31:`████████` ``grey32`` :grey32:`████████` ``grey33`` :grey33:`████████` ``grey34`` :grey34:`████████` ``grey35`` :grey35:`████████` ``grey36`` :grey36:`████████` ``grey37`` :grey37:`████████` ``grey38`` :grey38:`████████` ``grey39`` :grey39:`████████` ``grey40`` :grey40:`████████` ``grey41`` :grey41:`████████` ``grey42`` :grey42:`████████` ``grey43`` :grey43:`████████` ``grey44`` :grey44:`████████` ``grey45`` :grey45:`████████` ``grey46`` :grey46:`████████` ``grey47`` :grey47:`████████` ``grey48`` :grey48:`████████` ``grey49`` :grey49:`████████` ``grey50`` :grey50:`████████` ``grey51`` :grey51:`████████` ``grey52`` :grey52:`████████` ``grey53`` :grey53:`████████` ``grey54`` :grey54:`████████` ``grey55`` :grey55:`████████` ``grey56`` :grey56:`████████` ``grey57`` :grey57:`████████` ``grey58`` :grey58:`████████` ``grey59`` :grey59:`████████` ``grey60`` :grey60:`████████` ``grey61`` :grey61:`████████` ``grey62`` :grey62:`████████` ``grey63`` :grey63:`████████` ``grey64`` :grey64:`████████` ``grey65`` :grey65:`████████` ``grey66`` :grey66:`████████` ``grey67`` :grey67:`████████` ``grey68`` :grey68:`████████` ``grey69`` :grey69:`████████` ``grey70`` :grey70:`████████` ``grey71`` :grey71:`████████` ``grey72`` :grey72:`████████` ``grey73`` :grey73:`████████` ``grey74`` :grey74:`████████` ``grey75`` :grey75:`████████` ``grey76`` :grey76:`████████` ``grey77`` :grey77:`████████` ``grey78`` :grey78:`████████` ``grey79`` :grey79:`████████` ``grey80`` :grey80:`████████` ``grey81`` :grey81:`████████` ``grey82`` :grey82:`████████` ``grey83`` :grey83:`████████` ``grey84`` :grey84:`████████` ``grey85`` :grey85:`████████` ``grey86`` :grey86:`████████` ``grey87`` :grey87:`████████` ``grey88`` :grey88:`████████` ``grey89`` :grey89:`████████` ``grey90`` :grey90:`████████` ``grey91`` :grey91:`████████` ``grey92`` :grey92:`████████` ``grey93`` :grey93:`████████` ``grey94`` :grey94:`████████` ``grey95`` :grey95:`████████` ``grey96`` :grey96:`████████` ``grey97`` :grey97:`████████` ``grey98`` :grey98:`████████` ``grey99`` :grey99:`████████` ``grey100`` :grey100:`████████` ``honeydew`` :honeydew:`████████` ``honeydew1`` :honeydew1:`████████` ``honeydew2`` :honeydew2:`████████` ``honeydew3`` :honeydew3:`████████` ``honeydew4`` :honeydew4:`████████` ``hotpink`` :hotpink:`████████` ``hotpink1`` :hotpink1:`████████` ``hotpink2`` :hotpink2:`████████` ``hotpink3`` :hotpink3:`████████` ``hotpink4`` :hotpink4:`████████` ``indianred`` :indianred:`████████` ``indianred1`` :indianred1:`████████` ``indianred2`` :indianred2:`████████` ``indianred3`` :indianred3:`████████` ``indianred4`` :indianred4:`████████` ``indigo`` :indigo:`████████` ``ivory`` :ivory:`████████` ``ivory1`` :ivory1:`████████` ``ivory2`` :ivory2:`████████` ``ivory3`` :ivory3:`████████` ``ivory4`` :ivory4:`████████` ``khaki`` :khaki:`████████` ``khaki1`` :khaki1:`████████` ``khaki2`` :khaki2:`████████` ``khaki3`` :khaki3:`████████` ``khaki4`` :khaki4:`████████` ``lavender`` :lavender:`████████` ``lavenderblush`` :lavenderblush:`████████` ``lavenderblush1`` :lavenderblush1:`████████` ``lavenderblush2`` :lavenderblush2:`████████` ``lavenderblush3`` :lavenderblush3:`████████` ``lavenderblush4`` :lavenderblush4:`████████` ``lawngreen`` :lawngreen:`████████` ``lemonchiffon`` :lemonchiffon:`████████` ``lemonchiffon1`` :lemonchiffon1:`████████` ``lemonchiffon2`` :lemonchiffon2:`████████` ``lemonchiffon3`` :lemonchiffon3:`████████` ``lemonchiffon4`` :lemonchiffon4:`████████` ``lightblue`` :lightblue:`████████` ``lightblue1`` :lightblue1:`████████` ``lightblue2`` :lightblue2:`████████` ``lightblue3`` :lightblue3:`████████` ``lightblue4`` :lightblue4:`████████` ``lightcoral`` :lightcoral:`████████` ``lightcyan`` :lightcyan:`████████` ``lightcyan1`` :lightcyan1:`████████` ``lightcyan2`` :lightcyan2:`████████` ``lightcyan3`` :lightcyan3:`████████` ``lightcyan4`` :lightcyan4:`████████` ``lightgoldenrod`` :lightgoldenrod:`████████` ``lightgoldenrod1`` :lightgoldenrod1:`████████` ``lightgoldenrod2`` :lightgoldenrod2:`████████` ``lightgoldenrod3`` :lightgoldenrod3:`████████` ``lightgoldenrod4`` :lightgoldenrod4:`████████` ``lightgoldenrodyellow`` :lightgoldenrodyellow:`████████` ``lightgray`` :lightgray:`████████` ``lightgreen`` :lightgreen:`████████` ``lightgrey`` :lightgrey:`████████` ``lightpink`` :lightpink:`████████` ``lightpink1`` :lightpink1:`████████` ``lightpink2`` :lightpink2:`████████` ``lightpink3`` :lightpink3:`████████` ``lightpink4`` :lightpink4:`████████` ``lightsalmon`` :lightsalmon:`████████` ``lightsalmon1`` :lightsalmon1:`████████` ``lightsalmon2`` :lightsalmon2:`████████` ``lightsalmon3`` :lightsalmon3:`████████` ``lightsalmon4`` :lightsalmon4:`████████` ``lightseagreen`` :lightseagreen:`████████` ``lightskyblue`` :lightskyblue:`████████` ``lightskyblue1`` :lightskyblue1:`████████` ``lightskyblue2`` :lightskyblue2:`████████` ``lightskyblue3`` :lightskyblue3:`████████` ``lightskyblue4`` :lightskyblue4:`████████` ``lightslateblue`` :lightslateblue:`████████` ``lightslategray`` :lightslategray:`████████` ``lightslategrey`` :lightslategrey:`████████` ``lightsteelblue`` :lightsteelblue:`████████` ``lightsteelblue1`` :lightsteelblue1:`████████` ``lightsteelblue2`` :lightsteelblue2:`████████` ``lightsteelblue3`` :lightsteelblue3:`████████` ``lightsteelblue4`` :lightsteelblue4:`████████` ``lightyellow`` :lightyellow:`████████` ``lightyellow1`` :lightyellow1:`████████` ``lightyellow2`` :lightyellow2:`████████` ``lightyellow3`` :lightyellow3:`████████` ``lightyellow4`` :lightyellow4:`████████` ``lime`` :lime:`████████` ``limegreen`` :limegreen:`████████` ``linen`` :linen:`████████` ``magenta`` :magenta:`████████` ``magenta1`` :magenta1:`████████` ``magenta2`` :magenta2:`████████` ``magenta3`` :magenta3:`████████` ``magenta4`` :magenta4:`████████` ``maroon`` :maroon:`████████` ``maroon1`` :maroon1:`████████` ``maroon2`` :maroon2:`████████` ``maroon3`` :maroon3:`████████` ``maroon4`` :maroon4:`████████` ``mediumaquamarine`` :mediumaquamarine:`████████` ``mediumblue`` :mediumblue:`████████` ``mediumorchid`` :mediumorchid:`████████` ``mediumorchid1`` :mediumorchid1:`████████` ``mediumorchid2`` :mediumorchid2:`████████` ``mediumorchid3`` :mediumorchid3:`████████` ``mediumorchid4`` :mediumorchid4:`████████` ``mediumpurple`` :mediumpurple:`████████` ``mediumpurple1`` :mediumpurple1:`████████` ``mediumpurple2`` :mediumpurple2:`████████` ``mediumpurple3`` :mediumpurple3:`████████` ``mediumpurple4`` :mediumpurple4:`████████` ``mediumseagreen`` :mediumseagreen:`████████` ``mediumslateblue`` :mediumslateblue:`████████` ``mediumspringgreen`` :mediumspringgreen:`████████` ``mediumturquoise`` :mediumturquoise:`████████` ``mediumvioletred`` :mediumvioletred:`████████` ``midnightblue`` :midnightblue:`████████` ``mintcream`` :mintcream:`████████` ``mistyrose`` :mistyrose:`████████` ``mistyrose1`` :mistyrose1:`████████` ``mistyrose2`` :mistyrose2:`████████` ``mistyrose3`` :mistyrose3:`████████` ``mistyrose4`` :mistyrose4:`████████` ``moccasin`` :moccasin:`████████` ``navajowhite`` :navajowhite:`████████` ``navajowhite1`` :navajowhite1:`████████` ``navajowhite2`` :navajowhite2:`████████` ``navajowhite3`` :navajowhite3:`████████` ``navajowhite4`` :navajowhite4:`████████` ``navy`` :navy:`████████` ``navyblue`` :navyblue:`████████` ``oldlace`` :oldlace:`████████` ``olive`` :olive:`████████` ``olivedrab`` :olivedrab:`████████` ``olivedrab1`` :olivedrab1:`████████` ``olivedrab2`` :olivedrab2:`████████` ``olivedrab3`` :olivedrab3:`████████` ``olivedrab4`` :olivedrab4:`████████` ``orange`` :orange:`████████` ``orange1`` :orange1:`████████` ``orange2`` :orange2:`████████` ``orange3`` :orange3:`████████` ``orange4`` :orange4:`████████` ``orangered`` :orangered:`████████` ``orangered1`` :orangered1:`████████` ``orangered2`` :orangered2:`████████` ``orangered3`` :orangered3:`████████` ``orangered4`` :orangered4:`████████` ``orchid`` :orchid:`████████` ``orchid1`` :orchid1:`████████` ``orchid2`` :orchid2:`████████` ``orchid3`` :orchid3:`████████` ``orchid4`` :orchid4:`████████` ``palegoldenrod`` :palegoldenrod:`████████` ``palegreen`` :palegreen:`████████` ``palegreen1`` :palegreen1:`████████` ``palegreen2`` :palegreen2:`████████` ``palegreen3`` :palegreen3:`████████` ``palegreen4`` :palegreen4:`████████` ``paleturquoise`` :paleturquoise:`████████` ``paleturquoise1`` :paleturquoise1:`████████` ``paleturquoise2`` :paleturquoise2:`████████` ``paleturquoise3`` :paleturquoise3:`████████` ``paleturquoise4`` :paleturquoise4:`████████` ``palevioletred`` :palevioletred:`████████` ``palevioletred1`` :palevioletred1:`████████` ``palevioletred2`` :palevioletred2:`████████` ``palevioletred3`` :palevioletred3:`████████` ``palevioletred4`` :palevioletred4:`████████` ``papayawhip`` :papayawhip:`████████` ``peachpuff`` :peachpuff:`████████` ``peachpuff1`` :peachpuff1:`████████` ``peachpuff2`` :peachpuff2:`████████` ``peachpuff3`` :peachpuff3:`████████` ``peachpuff4`` :peachpuff4:`████████` ``peru`` :peru:`████████` ``pink`` :pink:`████████` ``pink1`` :pink1:`████████` ``pink2`` :pink2:`████████` ``pink3`` :pink3:`████████` ``pink4`` :pink4:`████████` ``plum`` :plum:`████████` ``plum1`` :plum1:`████████` ``plum2`` :plum2:`████████` ``plum3`` :plum3:`████████` ``plum4`` :plum4:`████████` ``powderblue`` :powderblue:`████████` ``purple`` :purple:`████████` ``purple1`` :purple1:`████████` ``purple2`` :purple2:`████████` ``purple3`` :purple3:`████████` ``purple4`` :purple4:`████████` ``red`` :red:`████████` ``red1`` :red1:`████████` ``red2`` :red2:`████████` ``red3`` :red3:`████████` ``red4`` :red4:`████████` ``rosybrown`` :rosybrown:`████████` ``rosybrown1`` :rosybrown1:`████████` ``rosybrown2`` :rosybrown2:`████████` ``rosybrown3`` :rosybrown3:`████████` ``rosybrown4`` :rosybrown4:`████████` ``royalblue`` :royalblue:`████████` ``royalblue1`` :royalblue1:`████████` ``royalblue2`` :royalblue2:`████████` ``royalblue3`` :royalblue3:`████████` ``royalblue4`` :royalblue4:`████████` ``saddlebrown`` :saddlebrown:`████████` ``salmon`` :salmon:`████████` ``salmon1`` :salmon1:`████████` ``salmon2`` :salmon2:`████████` ``salmon3`` :salmon3:`████████` ``salmon4`` :salmon4:`████████` ``sandybrown`` :sandybrown:`████████` ``seagreen`` :seagreen:`████████` ``seagreen1`` :seagreen1:`████████` ``seagreen2`` :seagreen2:`████████` ``seagreen3`` :seagreen3:`████████` ``seagreen4`` :seagreen4:`████████` ``seashell`` :seashell:`████████` ``seashell1`` :seashell1:`████████` ``seashell2`` :seashell2:`████████` ``seashell3`` :seashell3:`████████` ``seashell4`` :seashell4:`████████` ``sienna`` :sienna:`████████` ``sienna1`` :sienna1:`████████` ``sienna2`` :sienna2:`████████` ``sienna3`` :sienna3:`████████` ``sienna4`` :sienna4:`████████` ``silver`` :silver:`████████` ``skyblue`` :skyblue:`████████` ``skyblue1`` :skyblue1:`████████` ``skyblue2`` :skyblue2:`████████` ``skyblue3`` :skyblue3:`████████` ``skyblue4`` :skyblue4:`████████` ``slateblue`` :slateblue:`████████` ``slateblue1`` :slateblue1:`████████` ``slateblue2`` :slateblue2:`████████` ``slateblue3`` :slateblue3:`████████` ``slateblue4`` :slateblue4:`████████` ``slategray`` :slategray:`████████` ``slategray1`` :slategray1:`████████` ``slategray2`` :slategray2:`████████` ``slategray3`` :slategray3:`████████` ``slategray4`` :slategray4:`████████` ``slategrey`` :slategrey:`████████` ``snow`` :snow:`████████` ``snow1`` :snow1:`████████` ``snow2`` :snow2:`████████` ``snow3`` :snow3:`████████` ``snow4`` :snow4:`████████` ``springgreen`` :springgreen:`████████` ``springgreen1`` :springgreen1:`████████` ``springgreen2`` :springgreen2:`████████` ``springgreen3`` :springgreen3:`████████` ``springgreen4`` :springgreen4:`████████` ``steelblue`` :steelblue:`████████` ``steelblue1`` :steelblue1:`████████` ``steelblue2`` :steelblue2:`████████` ``steelblue3`` :steelblue3:`████████` ``steelblue4`` :steelblue4:`████████` ``tan`` :tan:`████████` ``tan1`` :tan1:`████████` ``tan2`` :tan2:`████████` ``tan3`` :tan3:`████████` ``tan4`` :tan4:`████████` ``teal`` :teal:`████████` ``thistle`` :thistle:`████████` ``thistle1`` :thistle1:`████████` ``thistle2`` :thistle2:`████████` ``thistle3`` :thistle3:`████████` ``thistle4`` :thistle4:`████████` ``tomato`` :tomato:`████████` ``tomato1`` :tomato1:`████████` ``tomato2`` :tomato2:`████████` ``tomato3`` :tomato3:`████████` ``tomato4`` :tomato4:`████████` ``turquoise`` :turquoise:`████████` ``turquoise1`` :turquoise1:`████████` ``turquoise2`` :turquoise2:`████████` ``turquoise3`` :turquoise3:`████████` ``turquoise4`` :turquoise4:`████████` ``violet`` :violet:`████████` ``violetred`` :violetred:`████████` ``violetred1`` :violetred1:`████████` ``violetred2`` :violetred2:`████████` ``violetred3`` :violetred3:`████████` ``violetred4`` :violetred4:`████████` ``wheat`` :wheat:`████████` ``wheat1`` :wheat1:`████████` ``wheat2`` :wheat2:`████████` ``wheat3`` :wheat3:`████████` ``wheat4`` :wheat4:`████████` ``white`` :white:`████████` ``whitesmoke`` :whitesmoke:`████████` ``yellow`` :yellow:`████████` ``yellow1`` :yellow1:`████████` ``yellow2`` :yellow2:`████████` ``yellow3`` :yellow3:`████████` ``yellow4`` :yellow4:`████████` ``yellowgreen`` :yellowgreen:`████████` ========================== ====================================================================================================== ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/common.txt0000644000175100001770000000003414676242340017026 0ustar00runnerdocker.. include:: ../common.txt ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/cursors.rst0000644000175100001770000002230714676242340017236 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.cursors` ===================== .. module:: pygame.cursors :synopsis: pygame module for cursor resources | :sl:`pygame module for cursor resources` Pygame offers control over the system hardware cursor. Pygame supports black and white cursors (bitmap cursors), as well as system variant cursors and color cursors. You control the cursor with functions inside :mod:`pygame.mouse`. This cursors module contains functions for loading and decoding various cursor formats. These allow you to easily store your cursors in external files or directly as encoded python strings. The module includes several standard cursors. The :func:`pygame.mouse.set_cursor()` function takes several arguments. All those arguments have been stored in a single tuple you can call like this: :: >>> pygame.mouse.set_cursor(*pygame.cursors.arrow) The following variables can be passed to ``pygame.mouse.set_cursor`` function: * ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` This module also contains a few cursors as formatted strings. You'll need to pass these to ``pygame.cursors.compile()`` function before you can use them. The example call would look like this: :: >>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor) The following strings can be converted into cursor bitmaps with ``pygame.cursors.compile()`` : * ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` .. function:: compile | :sl:`create binary cursor data from simple strings` | :sg:`compile(strings, black='X', white='.', xor='o') -> data, mask` A sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the :func:`pygame.mouse.set_cursor()` function. If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black. The height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, ``ValueError`` is raised. An example set of cursor strings looks like this :: thickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ") .. ## pygame.cursors.compile ## .. function:: load_xbm | :sl:`load cursor data from an XBM file` | :sg:`load_xbm(cursorfile) -> cursor_args` | :sg:`load_xbm(cursorfile, maskfile) -> cursor_args` This loads cursors for a simple subset of ``XBM`` files. ``XBM`` files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images. Sometimes the black and white color values will be split into two separate ``XBM`` files. You can pass a second maskfile argument to load the two images into a single cursor. The cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method. The return value cursor_args can be passed directly to the ``pygame.mouse.set_cursor()`` function. .. ## pygame.cursors.load_xbm ## .. class:: Cursor | :sl:`pygame object representing a cursor` | :sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor` | :sg:`Cursor(hotspot, surface) -> Cursor` | :sg:`Cursor(constant) -> Cursor` | :sg:`Cursor(Cursor) -> Cursor` | :sg:`Cursor() -> Cursor` In pygame 2, there are 3 types of cursors you can create to give your game that little bit of extra polish. There's **bitmap** type cursors, which existed in pygame 1.x, and are compiled from a string or load from an xbm file. Then there are **system** type cursors, where you choose a preset that will convey the same meaning but look native across different operating systems. Finally you can create a **color** cursor, which displays a pygame surface as the cursor. **Creating a system cursor** Choose a constant from this list, pass it into ``pygame.cursors.Cursor(constant)``, and you're good to go. Be advised that not all systems support every system cursor, and you may get a substitution instead. For example, on MacOS, WAIT/WAITARROW should show up as an arrow, and SIZENWSE/SIZENESW/SIZEALL should show up as a closed hand. And on Wayland, every SIZE cursor should show up as a hand. :: Pygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow pygame.SYSTEM_CURSOR_IBEAM i-beam pygame.SYSTEM_CURSOR_WAIT wait pygame.SYSTEM_CURSOR_CROSSHAIR crosshair pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (or wait if not available) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones pygame.SYSTEM_CURSOR_HAND hand **Creating a cursor without passing arguments** In addition to the cursor constants available and described above, you can also call ``pygame.cursors.Cursor()``, and your cursor is ready (doing that is the same as calling ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``. Doing one of those calls actually creates a system cursor using the default native image. **Creating a color cursor** To create a color cursor, create a ``Cursor`` from a ``hotspot`` and a ``surface``. ``hotspot`` is an (x,y) coordinate that determines where in the cursor the exact point is. The hotspot position must be within the bounds of the ``surface``. **Creating a bitmap cursor** When the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The ``size`` is a sequence containing the cursor width and height. ``hotspot`` is a sequence containing the cursor hotspot position. A cursor has a width and height, but a mouse position is represented by a set of point coordinates. So the value passed into the cursor ``hotspot`` variable helps pygame to actually determine at what exact point the cursor is at. ``xormasks`` is a sequence of bytes containing the cursor xor data masks. Lastly ``andmasks``, a sequence of bytes containing the cursor bitmask data. To create these variables, we can make use of the :func:`pygame.cursors.compile()` function. Width and height must be a multiple of 8, and the mask arrays must be the correct size for the given width and height. Otherwise an exception is raised. .. method:: copy | :sl:`copy the current cursor` | :sg:`copy() -> Cursor` Returns a new Cursor object with the same data and hotspot as the original. .. ## pygame.cursors.Cursor.copy ## .. attribute:: type | :sl:`Gets the cursor type` | :sg:`type -> string` The type will be ``"system"``, ``"bitmap"``, or ``"color"``. .. ## pygame.cursors.Cursor.type ## .. attribute:: data | :sl:`Gets the cursor data` | :sg:`data -> tuple` Returns the data that was used to create this cursor object, wrapped up in a tuple. .. ## pygame.cursors.Cursor.data ## .. versionadded:: 2.0.1 .. ## pygame.cursors.Cursor ## .. ## pygame.cursors ## Example code for creating and settings cursors. (Click the mouse to switch cursor) .. literalinclude:: code_examples/cursors_module_example.py ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/display.rst0000644000175100001770000007100614676242340017203 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.display` ===================== .. module:: pygame.display :synopsis: pygame module to control the display window and screen | :sl:`pygame module to control the display window and screen` This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs full screen. Once you create the display you treat it as a regular Surface. Changes are not immediately visible onscreen; you must choose one of the two flipping functions to update the actual display. The origin of the display, where x = 0 and y = 0, is the top left of the screen. Both axes increase positively towards the bottom right of the screen. The pygame display can actually be initialized in one of several modes. By default, the display is a basic software driven framebuffer. You can request special modules like automatic scaling or OpenGL support. These are controlled by flags passed to ``pygame.display.set_mode()``. Pygame can only have a single display active at any time. Creating a new one with ``pygame.display.set_mode()`` will close the previous display. To detect the number and size of attached screens, you can use ``pygame.display.get_desktop_sizes`` and then select appropriate window size and display index to pass to ``pygame.display.set_mode()``. For backward compatibility ``pygame.display`` allows precise control over the pixel format or display resolutions. This used to be necessary with old graphics cards and CRT screens, but is usually not needed any more. Use the functions ``pygame.display.mode_ok()``, ``pygame.display.list_modes()``, and ``pygame.display.Info()`` to query detailed information about the display. Once the display Surface is created, the functions from this module affect the single existing display. The Surface becomes invalid if the module is uninitialized. If a new display mode is set, the existing Surface will automatically switch to operate on the new display. When the display mode is set, several events are placed on the pygame event queue. ``pygame.QUIT`` is sent when the user has requested the program to shut down. The window will receive ``pygame.ACTIVEEVENT`` events as the display gains and loses input focus. If the display is set with the ``pygame.RESIZABLE`` flag, ``pygame.VIDEORESIZE`` events will be sent when the user adjusts the window dimensions. Hardware displays that draw direct to the screen will get ``pygame.VIDEOEXPOSE`` events when portions of the window must be redrawn. A new windowevent API was introduced in pygame 2.0.1. Check event module docs for more information on that Some display environments have an option for automatically stretching all windows. When this option is enabled, this automatic stretching distorts the appearance of the pygame window. In the pygame examples directory, there is example code (prevent_display_stretching.py) which shows how to disable this automatic stretching of the pygame display on Microsoft Windows (Vista or newer required). .. function:: init | :sl:`Initialize the display module` | :sg:`init() -> None` Initializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level ``pygame.init()``. Pygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable ``SDL_VIDEODRIVER`` can be set to control which backend is used. The systems with multiple choices are listed here. :: Windows : windib, directx Unix : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib On some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable ``SDL_WINDOWID`` must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display. It is harmless to call this more than once, repeated calls have no effect. .. ## pygame.display.init ## .. function:: quit | :sl:`Uninitialize the display module` | :sg:`quit() -> None` This will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits. It is harmless to call this more than once, repeated calls have no effect. .. ## pygame.display.quit ## .. function:: get_init | :sl:`Returns True if the display module has been initialized` | :sg:`get_init() -> bool` Returns True if the :mod:`pygame.display` module is currently initialized. .. ## pygame.display.get_init ## .. function:: set_mode | :sl:`Initialize a window or screen for display` | :sg:`set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface` This function will create a display Surface. The arguments passed in are requests for a display type. The actual created display will be the best possible match supported by the system. Note that calling this function implicitly initializes ``pygame.display``, if it was not initialized before. The size argument is a pair of numbers representing the width and height. The flags argument is a collection of additional options. The depth argument represents the number of bits to use for color. The Surface that gets returned can be drawn to like a regular Surface but changes will eventually be seen on the monitor. If no size is passed or is set to ``(0, 0)`` and pygame uses ``SDL`` version 1.2.10 or above, the created Surface will have the same size as the current screen resolution. If only the width or height are set to ``0``, the Surface will have the same width or height as the screen resolution. Using a ``SDL`` version prior to 1.2.10 will raise an exception. It is usually best to not pass the depth argument. It will default to the best and fastest color depth for the system. If your game requires a specific color format you can control the depth with this argument. Pygame will emulate an unavailable color depth which can be slow. When requesting fullscreen display modes, sometimes an exact match for the requested size cannot be made. In these situations pygame will select the closest compatible match. The returned surface will still always match the requested size. On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Note that SCALED is considered an experimental API and may change in future releases. The flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). Here are the display flags you will want to choose from: :: pygame.FULLSCREEN create a fullscreen display pygame.DOUBLEBUF only applicable with OPENGL pygame.HWSURFACE (obsolete in pygame 2) hardware accelerated, only in FULLSCREEN pygame.OPENGL create an OpenGL-renderable display pygame.RESIZABLE display window should be resizeable pygame.NOFRAME display window will have no border or controls pygame.SCALED resolution depends on desktop size and scale graphics pygame.SHOWN window is opened in visible mode (default) pygame.HIDDEN window is opened in hidden mode .. versionadded:: 2.0.0 ``SCALED``, ``SHOWN`` and ``HIDDEN`` By setting the ``vsync`` parameter to ``1``, it is possible to get a display with vertical sync, but you are not guaranteed to get one. The request only works at all for calls to ``set_mode()`` with the ``pygame.OPENGL`` or ``pygame.SCALED`` flags set, and is still not guaranteed even with one of those set. What you get depends on the hardware and driver configuration of the system pygame is running on. Here is an example usage of a call to ``set_mode()`` that may give you a display with vsync: :: flags = pygame.OPENGL | pygame.FULLSCREEN window_surface = pygame.display.set_mode((1920, 1080), flags, vsync=1) Vsync behaviour is considered experimental, and may change in future releases. .. versionadded:: 2.0.0 ``vsync`` Basic example: :: # Open a window on the screen screen_width=700 screen_height=400 screen=pygame.display.set_mode([screen_width, screen_height]) The display index ``0`` means the default display is used. If no display index argument is provided, the default display can be overridden with an environment variable. .. versionchanged:: 1.9.5 ``display`` argument added .. versionchanged:: 2.1.3 pygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with. .. ## pygame.display.set_mode ## .. function:: get_surface | :sl:`Get a reference to the currently set display surface` | :sg:`get_surface() -> Surface` Return a reference to the currently set display Surface. If no display mode has been set this will return None. .. ## pygame.display.get_surface ## .. function:: flip | :sl:`Update the full display Surface to the screen` | :sg:`flip() -> None` This will update the contents of the entire display. If your display mode is using the flags ``pygame.HWSURFACE`` and ``pygame.DOUBLEBUF`` on pygame 1, this will wait for a vertical retrace and swap the surfaces. When using an ``pygame.OPENGL`` display mode this will perform a gl buffer swap. .. ## pygame.display.flip ## .. function:: update | :sl:`Update portions of the screen for software displays` | :sg:`update(rectangle=None) -> None` | :sg:`update(rectangle_list) -> None` This function is like an optimized version of ``pygame.display.flip()`` for software displays. It allows only a portion of the screen to be updated, instead of the entire area. If no argument is passed it updates the entire Surface area like ``pygame.display.flip()``. Note that calling ``display.update(None)`` means no part of the window is updated. Whereas ``display.update()`` means the whole window is updated. You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped. This call cannot be used on ``pygame.OPENGL`` displays and will generate an exception. .. ## pygame.display.update ## .. function:: get_driver | :sl:`Get the name of the pygame display backend` | :sg:`get_driver() -> name` Pygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the ``SDL_VIDEODRIVER`` flags in ``pygame.display.set_mode()`` to see some of the common options. .. ## pygame.display.get_driver ## .. function:: Info | :sl:`Create a video display information object` | :sg:`Info() -> VideoInfo` Creates a simple object containing several attributes to describe the current graphics environment. If this is called before ``pygame.display.set_mode()`` some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes: :: hw: 1 if the display is hardware accelerated wm: 1 if windowed display modes can be used video_mem: The megabytes of video memory on the display. This is 0 if unknown bitsize: Number of bits used to store each pixel bytesize: Number of bytes used to store each pixel masks: Four values used to pack RGBA values into pixels shifts: Four values used to pack RGBA values into pixels losses: Four values used to pack RGBA values into pixels blit_hw: 1 if hardware Surface blitting is accelerated blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated blit_hw_A: 1 if hardware Surface pixel alpha blitting is accelerated blit_sw: 1 if software Surface blitting is accelerated blit_sw_CC: 1 if software Surface colorkey blitting is accelerated blit_sw_A: 1 if software Surface pixel alpha blitting is accelerated current_h, current_w: Height and width of the current video mode, or of the desktop mode if called before the display.set_mode is called. (current_h, current_w are available since SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if an old SDL is being used. .. ## pygame.display.Info ## .. function:: get_wm_info | :sl:`Get information about the current windowing system` | :sg:`get_wm_info() -> dict` Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display. .. versionadded:: 1.7.1 .. ## pygame.display.get_wm_info ## .. function:: get_desktop_sizes | :sl:`Get sizes of active desktops` | :sg:`get_desktop_sizes() -> list` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers. The length of the list is not the same as the number of attached monitors, as a desktop can be mirrored across multiple monitors. The desktop sizes do not indicate the maximum monitor resolutions supported by the hardware, but the desktop size configured in the operating system. In order to fit windows into the desktop as it is currently configured, and to respect the resolution configured by the operating system in fullscreen mode, this function *should* be used to replace many use cases of ``pygame.display.list_modes()`` whenever applicable. .. versionadded:: 2.0.0 .. function:: list_modes | :sl:`Get list of available fullscreen modes` | :sg:`list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list` This function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of ``-1`` means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest. If depth is ``0``, the current/best color depth for the display is used. The flags defaults to ``pygame.FULLSCREEN``, but you may need to add additional flags for specific fullscreen modes. The display index ``0`` means the default display is used. Since pygame 2.0, ``pygame.display.get_desktop_sizes()`` has taken over some use cases from ``pygame.display.list_modes()``: To find a suitable size for non-fullscreen windows, it is preferable to use ``pygame.display.get_desktop_sizes()`` to get the size of the *current* desktop, and to then choose a smaller window size. This way, the window is guaranteed to fit, even when the monitor is configured to a lower resolution than the maximum supported by the hardware. To avoid changing the physical monitor resolution, it is also preferable to use ``pygame.display.get_desktop_sizes()`` to determine the fullscreen resolution. Developers are strongly advised to default to the current physical monitor resolution unless the user explicitly requests a different one (e.g. in an options menu or configuration file). .. versionchanged:: 1.9.5 ``display`` argument added .. ## pygame.display.list_modes ## .. function:: mode_ok | :sl:`Pick the best color depth for a display mode` | :sg:`mode_ok(size, flags=0, depth=0, display=0) -> depth` This function uses the same arguments as ``pygame.display.set_mode()``. It is used to determine if a requested display mode is available. It will return ``0`` if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for. Usually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match. The function will return ``0`` if the passed display flags cannot be set. The display index ``0`` means the default display is used. .. versionchanged:: 1.9.5 ``display`` argument added .. ## pygame.display.mode_ok ## .. function:: gl_get_attribute | :sl:`Get the value for an OpenGL flag for the current display` | :sg:`gl_get_attribute(flag) -> value` After calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, it is a good idea to check the value of any requested OpenGL attributes. See ``pygame.display.gl_set_attribute()`` for a list of valid flags. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.gl_get_attribute ## .. function:: gl_set_attribute | :sl:`Request an OpenGL display attribute for the display mode` | :sg:`gl_set_attribute(flag, value) -> None` When calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before ``pygame.display.set_mode()``. Many settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested. The ``OPENGL`` flags are: :: GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO :const:`GL_MULTISAMPLEBUFFERS` Whether to enable multisampling anti-aliasing. Defaults to 0 (disabled). Set ``GL_MULTISAMPLESAMPLES`` to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3. :const:`GL_STENCIL_SIZE` Minimum bit size of the stencil buffer. Defaults to 0. :const:`GL_DEPTH_SIZE` Minimum bit size of the depth buffer. Defaults to 16. :const:`GL_STEREO` 1 enables stereo 3D. Defaults to 0. :const:`GL_BUFFER_SIZE` Minimum bit size of the frame buffer. Defaults to 0. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. versionadded:: 2.0.0 Additional attributes: :: GL_ACCELERATED_VISUAL, GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION, GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK, GL_SHARE_WITH_CURRENT_CONTEXT, GL_CONTEXT_RELEASE_BEHAVIOR, GL_FRAMEBUFFER_SRGB_CAPABLE :const:`GL_CONTEXT_PROFILE_MASK` Sets the OpenGL profile to one of these values: :: GL_CONTEXT_PROFILE_CORE disable deprecated features GL_CONTEXT_PROFILE_COMPATIBILITY allow deprecated features GL_CONTEXT_PROFILE_ES allow only the ES feature subset of OpenGL :const:`GL_ACCELERATED_VISUAL` Set to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed. .. ## pygame.display.gl_set_attribute ## .. function:: get_active | :sl:`Returns True when the display is active on the screen` | :sg:`get_active() -> bool` Returns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after ``pygame.display.set_mode()``. This method may return True even if the application is fully hidden behind another application window. This will return False if the display Surface has been iconified or minimized (either via ``pygame.display.iconify()`` or via an OS specific method such as the minimize-icon available on most desktops). The method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop. .. note:: This function returning True is unrelated to whether the application has input focus. Please see ``pygame.key.get_focused()`` and ``pygame.mouse.get_focused()`` for APIs related to input focus. .. ## pygame.display.get_active ## .. function:: iconify | :sl:`Iconify the display surface` | :sg:`iconify() -> bool` Request the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful. When the display is iconified ``pygame.display.get_active()`` will return ``False``. The event queue should receive an ``ACTIVEEVENT`` event when the window has been iconified. Additionally, the event queue also receives a ``WINDOWEVENT_MINIMIZED`` event when the window has been iconified on pygame 2. .. ## pygame.display.iconify ## .. function:: toggle_fullscreen | :sl:`Switch between fullscreen and windowed displays` | :sg:`toggle_fullscreen() -> int` Switches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen. Supported display drivers in pygame 1: * x11 (Linux/Unix) * wayland (Linux/Unix) Supported display drivers in pygame 2: * windows (Windows) * x11 (Linux/Unix) * wayland (Linux/Unix) * cocoa (OSX/Mac) .. Note:: :func:`toggle_fullscreen` doesn't work on Windows unless the window size is in :func:`pygame.display.list_modes()` or the window is created with the flag ``pygame.SCALED``. See `issue #2380 `_. .. ## pygame.display.toggle_fullscreen ## .. function:: set_gamma | :sl:`Change the hardware gamma ramps` | :sg:`set_gamma(red, green=None, blue=None) -> bool` DEPRECATED: This functionality will go away in SDL3. Set the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``. A gamma value of ``1.0`` creates a linear color table. Lower values will darken the display and higher values will brighten. .. deprecated:: 2.2.0 .. ## pygame.display.set_gamma ## .. function:: set_gamma_ramp | :sl:`Change the hardware gamma ramps with a custom lookup` | :sg:`set_gamma_ramp(red, green, blue) -> bool` DEPRECATED: This functionality will go away in SDL3. Set the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between ``0`` and ``0xffff``. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``. .. deprecated:: 2.2.0 .. ## pygame.display.set_gamma_ramp ## .. function:: set_icon | :sl:`Change the system image for the display window` | :sg:`set_icon(Surface) -> None` Sets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon. Note that calling this function implicitly initializes ``pygame.display``, if it was not initialized before. You can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system. Some systems do not allow the window icon to change after it has been shown. This function can be called before ``pygame.display.set_mode()`` to create the icon before the display mode is set. .. ## pygame.display.set_icon ## .. function:: set_caption | :sl:`Set the current window caption` | :sg:`set_caption(title, icontitle=None) -> None` If the display has a window title, this function will change the name on the window. In pygame 1.x, some systems supported an alternate shorter title to be used for minimized displays, but in pygame 2 ``icontitle`` does nothing. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.set_caption ## .. function:: get_caption | :sl:`Get the current window caption` | :sg:`get_caption() -> (title, icontitle)` Returns the title and icontitle for the display window. In pygame 2.x these will always be the same value. .. ## pygame.display.get_caption ## .. function:: set_palette | :sl:`Set the display color palette for indexed displays` | :sg:`set_palette(palette=None) -> None` This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of ``RGB`` triplets. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.set_palette ## .. function:: get_num_displays | :sl:`Return the number of displays` | :sg:`get_num_displays() -> int` Returns the number of available displays. This is always 1 if :func:`pygame.get_sdl_version()` returns a major version number below 2. .. versionadded:: 1.9.5 .. ## pygame.display.get_num_displays ## .. function:: get_window_size | :sl:`Return the size of the window or screen` | :sg:`get_window_size() -> tuple` Returns the size of the window initialized with :func:`pygame.display.set_mode()`. This may differ from the size of the display surface if ``SCALED`` is used. .. versionadded:: 2.0.0 .. ## pygame.display.get_window_size ## .. function:: get_allow_screensaver | :sl:`Return whether the screensaver is allowed to run.` | :sg:`get_allow_screensaver() -> bool` Return whether screensaver is allowed to run whilst the app is running. Default is ``False``. By default pygame does not allow the screensaver during game play. .. note:: Some platforms do not have a screensaver or support disabling the screensaver. Please see :func:`pygame.display.set_allow_screensaver()` for caveats with screensaver support. .. versionadded:: 2.0.0 .. ## pygame.display.get_allow_screensaver ## .. function:: set_allow_screensaver | :sl:`Set whether the screensaver may run` | :sg:`set_allow_screensaver(bool) -> None` Change whether screensavers should be allowed whilst the app is running. The default value of the argument to the function is True. By default pygame does not allow the screensaver during game play. If the screensaver has been disallowed due to this function, it will automatically be allowed to run when :func:`pygame.quit()` is called. It is possible to influence the default value via the environment variable ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER``, which can be set to either ``0`` (disable) or ``1`` (enable). .. note:: Disabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER`` is available in SDL 2.0.2 or later. SDL1.2 does not implement this. .. versionadded:: 2.0.0 .. ## pygame.display.set_allow_screensaver ## .. ## pygame.display ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/draw.rst0000644000175100001770000006012114676242340016467 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.draw` ================== .. module:: pygame.draw :synopsis: pygame module for drawing shapes | :sl:`pygame module for drawing shapes` Draw several simple shapes to a surface. These functions will work for rendering to any format of surface. Most of the functions take a width argument to represent the size of stroke (thickness) around the edge of the shape. If a width of 0 is passed the shape will be filled (solid). All the drawing functions respect the clip area for the surface and will be constrained to that area. The functions return a rectangle representing the bounding area of changed pixels. This bounding rectangle is the 'minimum' bounding box that encloses the affected area. All the drawing functions accept a color argument that can be one of the following formats: - a :mod:`pygame.Color` object - an ``(RGB)`` triplet (tuple/list) - an ``(RGBA)`` quadruplet (tuple/list) - an integer value that has been mapped to the surface's pixel format (see :func:`pygame.Surface.map_rgb` and :func:`pygame.Surface.unmap_rgb`) A color's alpha value will be written directly into the surface (if the surface contains pixel alphas), but the draw function will not draw transparently. These functions temporarily lock the surface they are operating on. Many sequential drawing calls can be sped up by locking and unlocking the surface object around the draw calls (see :func:`pygame.Surface.lock` and :func:`pygame.Surface.unlock`). .. note :: See the :mod:`pygame.gfxdraw` module for alternative draw methods. .. function:: rect | :sl:`draw a rectangle` | :sg:`rect(surface, color, rect) -> Rect` | :sg:`rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect` Draws a rectangle on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to draw, position and dimensions :param int width: (optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, (default) fill the rectangle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. versionchanged:: 2.1.1 Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area. :param int border_radius: (optional) used for drawing rectangle with rounded corners. The supported range is [0, min(height, width) / 2], with 0 representing a rectangle without rounded corners. :param int border_top_left_radius: (optional) used for setting the value of top left border. If you don't set this value, it will use the border_radius value. :param int border_top_right_radius: (optional) used for setting the value of top right border. If you don't set this value, it will use the border_radius value. :param int border_bottom_left_radius: (optional) used for setting the value of bottom left border. If you don't set this value, it will use the border_radius value. :param int border_bottom_right_radius: (optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value. | if ``border_radius < 1`` it will draw rectangle without rounded corners | if any of border radii has the value ``< 0`` it will use value of the border_radius | If sum of radii on the same side of the rectangle is greater than the rect size the radii | will get scaled :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. note:: The :func:`pygame.Surface.fill()` method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms. .. versionchanged:: 2.0.0 Added support for keyword arguments. .. versionchanged:: 2.0.0.dev8 Added support for border radius. .. ## pygame.draw.rect ## .. function:: polygon | :sl:`draw a polygon` | :sg:`polygon(surface, color, points) -> Rect` | :sg:`polygon(surface, color, points, width=0) -> Rect` Draws a polygon on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param points: a sequence of 3 or more (x, y) coordinates that make up the vertices of the polygon, each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats, e.g. ``[(x1, y1), (x2, y2), (x3, y3)]`` :type points: tuple(coordinate) or list(coordinate) :param int width: (optional) used for line thickness or to indicate that the polygon is to be filled | if width == 0, (default) fill the polygon | if width > 0, used for line thickness | if width < 0, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the ``width`` notes of the :func:`pygame.draw.line` function. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. note:: For an aapolygon, use :func:`aalines()` with ``closed=True``. .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.polygon ## .. function:: circle | :sl:`draw a circle` | :sg:`circle(surface, color, center, radius) -> Rect` | :sg:`circle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect` Draws a circle on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param center: center point of the circle as a sequence of 2 ints/floats, e.g. ``(x, y)`` :type center: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param radius: radius of the circle, measured from the ``center`` parameter, nothing will be drawn if the ``radius`` is less than 1 :type radius: int or float :param int width: (optional) used for line thickness or to indicate that the circle is to be filled | if ``width == 0``, (default) fill the circle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward. :param bool draw_top_right: (optional) if this is set to True then the top right corner of the circle will be drawn :param bool draw_top_left: (optional) if this is set to True then the top left corner of the circle will be drawn :param bool draw_bottom_left: (optional) if this is set to True then the bottom left corner of the circle will be drawn :param bool draw_bottom_right: (optional) if this is set to True then the bottom right corner of the circle will be drawn | if any of the draw_circle_part is True then it will draw all circle parts that have the True | value, otherwise it will draw the entire circle. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``center`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``center`` is not a sequence of two numbers :raises TypeError: if ``radius`` is not a number .. versionchanged:: 2.0.0 Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the ``center`` coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the ``center`` param. The drawing algorithm was improved to look more like a circle. .. versionchanged:: 2.0.0.dev8 Added support for drawing circle quadrants. .. ## pygame.draw.circle ## .. function:: ellipse | :sl:`draw an ellipse` | :sg:`ellipse(surface, color, rect) -> Rect` | :sg:`ellipse(surface, color, rect, width=0) -> Rect` Draws an ellipse on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to indicate the position and dimensions of the ellipse, the ellipse will be centered inside the rectangle and bounded by it :param int width: (optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, (default) fill the ellipse | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.ellipse ## .. function:: arc | :sl:`draw an elliptical arc` | :sg:`arc(surface, color, rect, start_angle, stop_angle) -> Rect` | :sg:`arc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect` Draws an elliptical arc on the given surface. The two angle arguments are given in radians and indicate the start and stop positions of the arc. The arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle``. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to indicate the position and dimensions of the ellipse which the arc will be based on, the ellipse will be centered inside the rectangle :param float start_angle: start angle of the arc in radians :param float stop_angle: stop angle of the arc in radians | if ``start_angle < stop_angle``, the arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle`` | if ``start_angle > stop_angle``, tau (tau == 2 * pi) will be added to the ``stop_angle``, if the resulting stop angle value is greater than the ``start_angle`` the above ``start_angle < stop_angle`` case applies, otherwise nothing will be drawn | if ``start_angle == stop_angle``, nothing will be drawn | :param int width: (optional) used for line thickness (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, nothing will be drawn | if ``width > 0``, (default is 1) used for line thickness | if ``width < 0``, same as ``width == 0`` .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.arc ## .. function:: line | :sl:`draw a straight line` | :sg:`line(surface, color, start_pos, end_pos) -> Rect` | :sg:`line(surface, color, start_pos, end_pos, width=1) -> Rect` Draws a straight line on the given surface. There are no endcaps. For thick lines the ends are squared off. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param start_pos: start position of the line, (x, y) :type start_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param end_pos: end position of the line, (x, y) :type end_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param int width: (optional) used for line thickness | if width >= 1, used for line thickness (default is 1) | if width < 1, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, lines will grow as follows. For odd ``width`` values, the thickness of each line grows with the original line being in the center. For even ``width`` values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction). :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``start_pos`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``start_pos`` or ``end_pos`` is not a sequence of two numbers .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.line ## .. function:: lines | :sl:`draw multiple contiguous straight line segments` | :sg:`lines(surface, color, closed, points) -> Rect` | :sg:`lines(surface, color, closed, points, width=1) -> Rect` Draws a sequence of contiguous straight lines on the given surface. There are no endcaps or miter joints. For thick lines the ends are squared off. Drawing thick lines with sharp corners can have undesired looking results. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param bool closed: if ``True`` an additional line segment is drawn between the first and last points in the ``points`` sequence :param points: a sequence of 2 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)`` and from ``(x2, y2)`` to ``(x3, y3)``, additionally if the ``closed`` parameter is ``True`` another line segment will be drawn from ``(x3, y3)`` to ``(x1, y1)`` :type points: tuple(coordinate) or list(coordinate) :param int width: (optional) used for line thickness | if width >= 1, used for line thickness (default is 1) | if width < 1, nothing will be drawn | .. note:: When using ``width`` values ``> 1`` refer to the ``width`` notes of :func:`line` for details on how thick lines grow. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 2`` (must have at least 2 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.lines ## .. function:: aaline | :sl:`draw a straight antialiased line` | :sg:`aaline(surface, color, start_pos, end_pos) -> Rect` | :sg:`aaline(surface, color, start_pos, end_pos, blend=1) -> Rect` Draws a straight antialiased line on the given surface. The line has a thickness of one pixel and the endpoints have a height and width of one pixel each. The way a line and its endpoints are drawn: If both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer). Otherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis): For each endpoint: If ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them. Otherwise: Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right Then for each point between the endpoints, along the line, whose x-coordinate is a whole number: Find which pixels would be covered and how much by that point and draw them. *e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) Otherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using ``y`` instead of ``x``, top instead of left and bottom instead of right). .. note:: Regarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, *e.g.* the point ``(1.4, 2)`` covers 60% of the pixel ``(1, 2)`` and 40% of the pixel ``(2,2)``. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param start_pos: start position of the line, (x, y) :type start_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param end_pos: end position of the line, (x, y) :type end_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param int blend: (optional) (deprecated) if non-zero (default) the line will be blended with the surface's existing pixel shades, otherwise it will overwrite them :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``start_pos`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``start_pos`` or ``end_pos`` is not a sequence of two numbers .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.aaline ## .. function:: aalines | :sl:`draw multiple contiguous straight antialiased line segments` | :sg:`aalines(surface, color, closed, points) -> Rect` | :sg:`aalines(surface, color, closed, points, blend=1) -> Rect` Draws a sequence of contiguous straight antialiased lines on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param bool closed: if ``True`` an additional line segment is drawn between the first and last points in the ``points`` sequence :param points: a sequence of 2 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)`` and from ``(x2, y2)`` to ``(x3, y3)``, additionally if the ``closed`` parameter is ``True`` another line segment will be drawn from ``(x3, y3)`` to ``(x1, y1)`` :type points: tuple(coordinate) or list(coordinate) :param int blend: (optional) (deprecated) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwritten :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 2`` (must have at least 2 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.aalines ## .. ## pygame.draw ## .. figure:: code_examples/draw_module_example.png :alt: draw module example Example code for draw module. .. literalinclude:: code_examples/draw_module_example.py ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/event.rst0000644000175100001770000005330314676242340016657 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.event` =================== .. module:: pygame.event :synopsis: pygame module for interacting with events and queues | :sl:`pygame module for interacting with events and queues` Pygame handles all its event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the :mod:`pygame.display` module. If the display has not been initialized and a video mode not set, the event queue may not work properly. The event queue has an upper limit on the number of events it can hold. When the queue becomes full new events are quietly dropped. To prevent lost events, especially input events which signal a quit command, your program must handle events every frame (with ``pygame.event.get()``, ``pygame.event.pump()``, ``pygame.event.wait()``, ``pygame.event.peek()`` or ``pygame.event.clear()``) and process them. Not handling events may cause your system to decide your program has locked up. To speed up queue processing use :func:`pygame.event.set_blocked()` to limit which events get queued. To get the state of various input devices, you can forego the event queue and access the input devices directly with their appropriate modules: :mod:`pygame.mouse`, :mod:`pygame.key`, and :mod:`pygame.joystick`. If you use this method, remember that pygame requires some form of communication with the system window manager and other parts of the platform. To keep pygame in sync with the system, you will need to call :func:`pygame.event.pump()` to keep everything current. Usually, this should be called once per game loop. Note: Joysticks will not send any events until the device has been initialized. The event queue contains :class:`pygame.event.Event` event objects. There are a variety of ways to access the queued events, from simply checking for the existence of events, to grabbing them directly off the stack. The event queue also offers some simple filtering which can slightly help performance by blocking certain event types from the queue. Use :func:`pygame.event.set_allowed()` and :func:`pygame.event.set_blocked()` to change this filtering. By default, all event types can be placed on the queue. All :class:`pygame.event.Event` instances contain an event type identifier and attributes specific to that event type. The event type identifier is accessible as the :attr:`pygame.event.Event.type` property. Any of the event specific attributes can be accessed through the :attr:`pygame.event.Event.__dict__` attribute or directly as an attribute of the event object (as member lookups are passed through to the object's dictionary values). The event object has no method functions. Users can create their own new events with the :func:`pygame.event.Event()` function. The event type identifier is in between the values of ``NOEVENT`` and ``NUMEVENTS``. User defined events should have a value in the inclusive range of ``USEREVENT`` to ``NUMEVENTS - 1``. User defined events can get a custom event number with :func:`pygame.event.custom_type()`. It is recommended all user events follow this system. Events support equality and inequality comparisons. Two events are equal if they are the same type and have identical attribute values. While debugging and experimenting, you can print an event object for a quick display of its type and members. The function :func:`pygame.event.event_name()` can be used to get a string representing the name of the event type. Events that come from the system will have a guaranteed set of member attributes based on the type. The following is a list of event types with their specific attributes. :: QUIT none ACTIVEEVENT gain, state KEYDOWN key, mod, unicode, scancode KEYUP key, mod, unicode, scancode MOUSEMOTION pos, rel, buttons, touch MOUSEBUTTONUP pos, button, touch MOUSEBUTTONDOWN pos, button, touch JOYAXISMOTION joy (deprecated), instance_id, axis, value JOYBALLMOTION joy (deprecated), instance_id, ball, rel JOYHATMOTION joy (deprecated), instance_id, hat, value JOYBUTTONUP joy (deprecated), instance_id, button JOYBUTTONDOWN joy (deprecated), instance_id, button VIDEORESIZE size, w, h VIDEOEXPOSE none USEREVENT code .. versionchanged:: 2.0.0 The ``joy`` attribute was deprecated, ``instance_id`` was added. .. versionchanged:: 2.0.1 The ``unicode`` attribute was added to ``KEYUP`` event. Note that ``ACTIVEEVENT``, ``VIDEORESIZE`` and ``VIDEOEXPOSE`` are considered as "legacy" events, the use of pygame2 ``WINDOWEVENT`` API is recommended over the use of this older API. You can also find a list of constants for keyboard keys :ref:`here `. A keyboard event occurs when a key is pressed (``KEYDOWN``) and when a key is released (``KEYUP``) The ``key`` attribute of keyboard events contains the value of what key was pressed or released. The ``mod`` attribute contains information about the state of keyboard modifiers (SHIFT, CTRL, ALT, etc.). The ``unicode`` attribute stores the 16-bit unicode value of the key that was pressed or released. The ``scancode`` attribute represents the physical location of a key on the keyboard. The ``ACTIVEEVENT`` contains information about the application gaining or losing focus. The ``gain`` attribute will be 1 if the mouse enters the window, otherwise ``gain`` will be 0. The ``state`` attribute will have a value of ``SDL_APPMOUSEFOCUS`` if mouse focus was gained/lost, ``SDL_APPINPUTFOCUS`` if the application loses or gains keyboard focus, or ``SDL_APPACTIVE`` if the application is minimized (``gain`` will be 0) or restored. | When compiled with SDL2, pygame has these additional events and their attributes. :: AUDIODEVICEADDED which, iscapture (SDL backend >= 2.0.4) AUDIODEVICEREMOVED which, iscapture (SDL backend >= 2.0.4) FINGERMOTION touch_id, finger_id, x, y, dx, dy FINGERDOWN touch_id, finger_id, x, y, dx, dy FINGERUP touch_id, finger_id, x, y, dx, dy MOUSEWHEEL which, flipped, x, y, touch, precise_x, precise_y MULTIGESTURE touch_id, x, y, pinched, rotated, num_fingers TEXTEDITING text, start, length TEXTINPUT text .. versionadded:: 1.9.5 .. versionchanged:: 2.0.2 Fixed amount horizontal scroll (x, positive to the right and negative to the left). .. versionchanged:: 2.0.2 The ``touch`` attribute was added to all the ``MOUSE`` events. The ``touch`` attribute of ``MOUSE`` events indicates whether or not the events were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles ``FINGERMOTION``, ``FINGERDOWN`` and ``FINGERUP`` events. .. versionadded:: 2.1.3 Added ``precise_x`` and ``precise_y`` to ``MOUSEWHEEL`` events ``MOUSEWHEEL`` event occurs whenever the mouse wheel is moved. The ``which`` attribute determines if the event was generated from a touch input device vs an actual mousewheel. The ``preciseX`` attribute contains a float with the amount scrolled horizontally (positive to the right, negative to the left). The ``preciseY`` attribute contains a float with the amount scrolled vertically (positive away from user, negative towards user). The ``flipped`` attribute determines if the values in x and y will be opposite or not. If ``SDL_MOUSEWHEEL_FLIPPED`` is defined, the direction of x and y will be opposite. ``TEXTEDITING`` event is triggered when a user activates an input method via hotkey or selecting an input method in a GUI and starts typing The ``which`` attribute for ``AUDIODEVICE*`` events is an integer representing the index for new audio devices that are added. ``AUDIODEVICE*`` events are used to update audio settings or device list. | Many new events were introduced in pygame 2. pygame can recognize text or files dropped in its window. If a file is dropped, ``DROPFILE`` event will be sent, ``file`` will be its path. The ``DROPTEXT`` event is only supported on X11. ``MIDIIN`` and ``MIDIOUT`` are events reserved for :mod:`pygame.midi` use. ``MIDI*`` events differ from ``AUDIODEVICE*`` events in that AUDIODEVICE events are triggered when there is a state change related to an audio input/output device. pygame 2 also supports controller hot-plugging :: Event name Attributes and notes DROPFILE file DROPBEGIN (SDL backend >= 2.0.5) DROPCOMPLETE (SDL backend >= 2.0.5) DROPTEXT text (SDL backend >= 2.0.5) MIDIIN MIDIOUT CONTROLLERDEVICEADDED device_index JOYDEVICEADDED device_index CONTROLLERDEVICEREMOVED instance_id JOYDEVICEREMOVED instance_id CONTROLLERDEVICEREMAPPED instance_id KEYMAPCHANGED (SDL backend >= 2.0.4) CLIPBOARDUPDATE RENDER_TARGETS_RESET (SDL backend >= 2.0.2) RENDER_DEVICE_RESET (SDL backend >= 2.0.4) LOCALECHANGED (SDL backend >= 2.0.14) Also in this version, ``instance_id`` attributes were added to joystick events, and the ``joy`` attribute was deprecated. ``KEYMAPCHANGED`` is a type of an event sent when keymap changes due to a system event such as an input language or keyboard layout change. ``CLIPBOARDUPDATE`` is an event sent when clipboard changes. This can still be considered as an experimental feature, some kinds of clipboard changes might not trigger this event. ``LOCALECHANGED`` is an event sent when user locale changes .. versionadded:: 2.0.0 .. versionadded:: 2.1.3 ``KEYMAPCHANGED``, ``CLIPBOARDUPDATE``, ``RENDER_TARGETS_RESET``, ``RENDER_DEVICE_RESET`` and ``LOCALECHANGED`` | Since pygame 2.0.1, there are a new set of events, called window events. Here is a list of all window events, along with a short description :: Event type Short description WINDOWSHOWN Window became shown WINDOWHIDDEN Window became hidden WINDOWEXPOSED Window got updated by some external event WINDOWMOVED Window got moved WINDOWRESIZED Window got resized WINDOWSIZECHANGED Window changed its size WINDOWMINIMIZED Window was minimized WINDOWMAXIMIZED Window was maximized WINDOWRESTORED Window was restored WINDOWENTER Mouse entered the window WINDOWLEAVE Mouse left the window WINDOWFOCUSGAINED Window gained focus WINDOWFOCUSLOST Window lost focus WINDOWCLOSE Window was closed WINDOWTAKEFOCUS Window was offered focus (SDL backend >= 2.0.5) WINDOWHITTEST Window has a special hit test (SDL backend >= 2.0.5) WINDOWICCPROFCHANGED Window ICC profile changed (SDL backend >= 2.0.18) WINDOWDISPLAYCHANGED Window moved on a new display (SDL backend >= 2.0.18) ``WINDOWMOVED``, ``WINDOWRESIZED`` and ``WINDOWSIZECHANGED`` have ``x`` and ``y`` attributes, ``WINDOWDISPLAYCHANGED`` has a ``display_index`` attribute. All windowevents have a ``window`` attribute. .. versionadded:: 2.0.1 .. versionadded:: 2.1.3 ``WINDOWICCPROFCHANGED`` and ``WINDOWDISPLAYCHANGED`` | On Android, the following events can be generated :: Event type Short description APP_TERMINATING OS is terminating the application APP_LOWMEMORY OS is low on memory, try to free memory if possible APP_WILLENTERBACKGROUND Application is entering background APP_DIDENTERBACKGROUND Application entered background APP_WILLENTERFOREGROUND Application is entering foreground APP_DIDENTERFOREGROUND Application entered foreground .. versionadded:: 2.1.3 | .. function:: pump | :sl:`internally process pygame event handlers` | :sg:`pump() -> None` For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call ``pygame.event.pump()`` to allow pygame to handle internal actions. This function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.event` functions. There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up. .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.pump ## .. function:: get | :sl:`get events from the queue` | :sg:`get(eventtype=None) -> Eventlist` | :sg:`get(eventtype=None, pump=True) -> Eventlist` | :sg:`get(eventtype=None, pump=True, exclude=None) -> Eventlist` This will get all the messages and remove them from the queue. If a type or sequence of types is given only those messages will be removed from the queue and returned. If a type or sequence of types is passed in the ``exclude`` argument instead, then all only *other* messages will be removed from the queue. If an ``exclude`` parameter is passed, the ``eventtype`` parameter *must* be None. If you are only taking specific events from the queue, be aware that the queue could eventually fill up with the events you are not interested. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. versionchanged:: 2.0.2 Added ``exclude`` argument .. ## pygame.event.get ## .. function:: poll | :sl:`get a single event from the queue` | :sg:`poll() -> Event instance` Returns a single event from the queue. If the event queue is empty an event of type ``pygame.NOEVENT`` will be returned immediately. The returned event is removed from the queue. .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.poll ## .. function:: wait | :sl:`wait for a single event from the queue` | :sg:`wait() -> Event instance` | :sg:`wait(timeout) -> Event instance` Returns a single event from the queue. If the queue is empty this function will wait until one is created. From pygame 2.0.0, if a ``timeout`` argument is given, the function will return an event of type ``pygame.NOEVENT`` if no events enter the queue in ``timeout`` milliseconds. The event is removed from the queue once it has been returned. While the program is waiting it will sleep in an idle state. This is important for programs that want to share the system with other applications. .. versionchanged:: 2.0.0.dev13 Added ``timeout`` argument .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.wait ## .. function:: peek | :sl:`test if event types are waiting on the queue` | :sg:`peek(eventtype=None) -> bool` | :sg:`peek(eventtype=None, pump=True) -> bool` Returns ``True`` if there are any events of the given type waiting on the queue. If a sequence of event types is passed, this will return ``True`` if any of those events are on the queue. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. ## pygame.event.peek ## .. function:: clear | :sl:`remove all events from the queue` | :sg:`clear(eventtype=None) -> None` | :sg:`clear(eventtype=None, pump=True) -> None` Removes all events from the queue. If ``eventtype`` is given, removes the given event or sequence of events. This has the same effect as :func:`pygame.event.get()` except ``None`` is returned. It can be slightly more efficient when clearing a full event queue. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. ## pygame.event.clear ## .. function:: event_name | :sl:`get the string name from an event id` | :sg:`event_name(type) -> string` Returns a string representing the name (in CapWords style) of the given event type. "UserEvent" is returned for all values in the user event id range. "Unknown" is returned when the event type does not exist. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.event.event_name ## .. function:: set_blocked | :sl:`control which events are allowed on the queue` | :sg:`set_blocked(type) -> None` | :sg:`set_blocked(typelist) -> None` | :sg:`set_blocked(None) -> None` The given event types are not allowed to appear on the event queue. By default all events can be placed on the queue. It is safe to disable an event type multiple times. If ``None`` is passed as the argument, ALL of the event types are blocked from being placed on the queue. .. ## pygame.event.set_blocked ## .. function:: set_allowed | :sl:`control which events are allowed on the queue` | :sg:`set_allowed(type) -> None` | :sg:`set_allowed(typelist) -> None` | :sg:`set_allowed(None) -> None` The given event types are allowed to appear on the event queue. By default, all event types can be placed on the queue. It is safe to enable an event type multiple times. If ``None`` is passed as the argument, ALL of the event types are allowed to be placed on the queue. .. ## pygame.event.set_allowed ## .. function:: get_blocked | :sl:`test if a type of event is blocked from the queue` | :sg:`get_blocked(type) -> bool` | :sg:`get_blocked(typelist) -> bool` Returns ``True`` if the given event type is blocked from the queue. If a sequence of event types is passed, this will return ``True`` if any of those event types are blocked. .. ## pygame.event.get_blocked ## .. function:: set_grab | :sl:`control the sharing of input devices with other applications` | :sg:`set_grab(bool) -> None` When your program runs in a windowed environment, it will share the mouse and keyboard devices with other applications that have focus. If your program sets the event grab to ``True``, it will lock all input into your program. It is best to not always grab the input, since it prevents the user from doing other things on their system. .. ## pygame.event.set_grab ## .. function:: get_grab | :sl:`test if the program is sharing input devices` | :sg:`get_grab() -> bool` Returns ``True`` when the input events are grabbed for this application. .. ## pygame.event.get_grab ## .. function:: set_keyboard_grab | :sl:`grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.` | :sg:`set_keyboard_grab(bool) -> None` Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows). This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab. .. versionadded:: 2.5.0 .. ## pygame.event.set_keyboard_grab ## .. function:: get_keyboard_grab | :sl:`get the current keyboard grab state` | :sg:`get_keyboard_grab() -> bool` Returns ``True`` when keyboard grab is enabled. .. versionadded:: 2.5.0 .. ## pygame.event.get_keyboard_grab ## .. function:: post | :sl:`place a new event on the queue` | :sg:`post(Event) -> bool` Places the given event at the end of the event queue. This is usually used for placing custom events on the event queue. Any type of event can be posted, and the events posted can have any attributes. This returns a boolean on whether the event was posted or not. Blocked events cannot be posted, and this function returns ``False`` if you try to post them. .. versionchanged:: 2.0.1 returns a boolean, previously returned ``None`` .. ## pygame.event.post ## .. function:: custom_type | :sl:`make custom user event type` | :sg:`custom_type() -> int` Reserves a ``pygame.USEREVENT`` for a custom use. If too many events are made a :exc:`pygame.error` is raised. .. versionadded:: 2.0.0.dev3 .. ## pygame.event.custom_type ## .. class:: Event | :sl:`pygame object for representing events` | :sg:`Event(type, dict) -> Event` | :sg:`Event(type, \**attributes) -> Event` A pygame object used for representing an event. ``Event`` instances support attribute assignment and deletion. When creating the object, the attributes may come from a dictionary argument with string keys or from keyword arguments. .. note:: From version 2.1.3 ``EventType`` is an alias for ``Event``. Beforehand, ``Event`` was a function that returned ``EventType`` instances. Use of ``Event`` is preferred over ``EventType`` wherever it is possible, as the latter could be deprecated in a future version. .. attribute:: type | :sl:`event type identifier.` | :sg:`type -> int` Read-only. The event type identifier. For user created event objects, this is the ``type`` argument passed to :func:`pygame.event.Event()`. For example, some predefined event identifiers are ``QUIT`` and ``MOUSEMOTION``. .. ## pygame.event.Event.type ## .. attribute:: __dict__ | :sl:`event attribute dictionary` | :sg:`__dict__ -> dict` Read-only. The event type specific attributes of an event. The ``dict`` attribute is a synonym for backward compatibility. For example, the attributes of a ``KEYDOWN`` event would be ``unicode``, ``key``, and ``mod`` .. ## pygame.event.Event.__dict__ ## .. versionadded:: 1.9.2 Mutable attributes. .. ## pygame.event.Event ## .. ## pygame.event ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/examples.rst0000644000175100001770000003341714676242340017360 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.examples` ====================== .. module:: pygame.examples :synopsis: module of example programs | :sl:`module of example programs` These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. There are several ways to run the examples. First they can be run as stand-alone programs. Second they can be imported and their ``main()`` methods called (see below). Finally, the easiest way is to use the python -m option: :: python -m pygame.examples. eg: :: python -m pygame.examples.scaletest someimage.png Resources such as images and sounds for the examples are found in the pygame/examples/data subdirectory. You can find where the example files are installed by using the following commands inside the python interpreter. :: >>> import pygame.examples.scaletest >>> pygame.examples.scaletest.__file__ '/usr/lib/python2.6/site-packages/pygame/examples/scaletest.py' On each OS and version of Python the location will be slightly different. For example on Windows it might be in 'C:/Python26/Lib/site-packages/pygame/examples/' On Mac OS X it might be in '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/examples/' You can also run the examples in the python interpreter by calling each modules main() function. :: >>> import pygame.examples.scaletest >>> pygame.examples.scaletest.main() We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. examples as a package is new to pygame 1.9.0. But most of the examples came with pygame much earlier. .. function:: aliens.main | :sl:`play the full aliens example` | :sg:`aliens.main() -> None` This started off as a port of the ``SDL`` demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck) .. ## pygame.examples.aliens.main ## .. function:: stars.main | :sl:`run a simple starfield example` | :sg:`stars.main() -> None` A simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. .. ## pygame.examples.stars.main ## .. function:: chimp.main | :sl:`hit the moving chimp` | :sg:`chimp.main() -> None` This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. .. ## pygame.examples.chimp.main ## .. function:: moveit.main | :sl:`display animated objects on the screen` | :sg:`moveit.main() -> None` This is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen. Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. .. ## pygame.examples.moveit.main ## .. function:: fonty.main | :sl:`run a font rendering example` | :sg:`fonty.main() -> None` Super quick, super simple application demonstrating the different ways to render fonts with the font module .. ## pygame.examples.fonty.main ## .. function:: freetype_misc.main | :sl:`run a FreeType rendering example` | :sg:`freetype_misc.main() -> None` A showcase of rendering features the :class:`pygame.freetype.Font` class provides in addition to those available with :class:`pygame.font.Font`. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text, horizontally stretched text and vertically stretched text. .. ## pygame.examples.fonty.main ## .. function:: vgrade.main | :sl:`display a vertical gradient` | :sg:`vgrade.main() -> None` Demonstrates creating a vertical gradient with pixelcopy and NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :] .. ## pygame.examples.vgrade.main ## .. function:: eventlist.main | :sl:`display pygame events` | :sg:`eventlist.main() -> None` Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control. .. ## pygame.examples.eventlist.main ## .. function:: arraydemo.main | :sl:`show various surfarray effects` | :sg:`arraydemo.main(arraytype=None) -> None` Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray The ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError. .. ## pygame.examples.arraydemo.main ## .. function:: sound.main | :sl:`load and play a sound` | :sg:`sound.main(file_path=None) -> None` Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. If provided, use the audio file 'file_path', otherwise use a default file. ``sound.py`` optional command line argument: an audio file .. ## pygame.examples.sound.main ## .. function:: sound_array_demos.main | :sl:`play various sndarray effects` | :sg:`sound_array_demos.main(arraytype=None) -> None` Uses sndarray and NumPy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echoes and the delay. Easy for you to recreate as needed. The ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError. .. ## pygame.examples.sound_array_demos.main ## .. function:: liquid.main | :sl:`display an animated liquid effect` | :sg:`liquid.main() -> None` This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). .. ## pygame.examples.liquid.main ## .. function:: glcube.main | :sl:`display an animated 3D cube using OpenGL` | :sg:`glcube.main() -> None` Using PyOpenGL and pygame, this creates a spinning 3D multicolored cube. .. ## pygame.examples.glcube.main ## .. function:: scrap_clipboard.main | :sl:`access the clipboard` | :sg:`scrap_clipboard.main() -> None` A simple demonstration example for the clipboard support. .. ## pygame.examples.scrap_clipboard.main ## .. function:: mask.main | :sl:`display multiple images bounce off each other using collision detection` | :sg:`mask.main(*args) -> None` Positional arguments: :: one or more image file names. This ``pygame.masks`` demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. If run as a program then ``mask.py`` takes one or more image files as command line arguments. .. ## pygame.examples.mask.main ## .. function:: testsprite.main | :sl:`show lots of sprites moving around` | :sg:`testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None` Optional keyword arguments: :: update_rects - use the RenderUpdate sprite group class use_static - include non-moving images use_FastRenderGroup - Use the FastRenderGroup sprite group screen_dims - pygame window dimensions use_alpha - use alpha blending flags - additional display mode flags Like the ``testsprite.c`` that comes with SDL, this pygame version shows lots of sprites moving around. If run as a stand-alone program then no command line arguments are taken. .. ## pygame.examples.testsprite.main ## .. function:: headless_no_windows_needed.main | :sl:`write an image file that is smoothscaled copy of an input file` | :sg:`headless_no_windows_needed.main(fin, fout, w, h) -> None` arguments: :: fin - name of an input image file fout - name of the output file to create/overwrite w, h - size of the rescaled image, as integer width and height How to use pygame with no windowing system, like on headless servers. Thumbnail generation with scaling is an example of what you can do with pygame. ``NOTE``: the pygame scale function uses MMX/SSE if available, and can be run in multiple threads. If ``headless_no_windows_needed.py`` is run as a program it takes the following command line arguments: :: -scale inputimage outputimage new_width new_height eg. -scale in.png outpng 50 50 .. ## pygame.examples.headless_no_windows_needed.main ## .. function:: joystick.main | :sl:`demonstrate joystick functionality` | :sg:`joystick.main() -> None` A demo showing full joystick support. .. versionadded:: 2.0.2 .. ## pygame.examples.joystick.main ## .. function:: blend_fill.main | :sl:`demonstrate the various surface.fill method blend options` | :sg:`blend_fill.main() -> None` A interactive demo that lets one choose which BLEND_xxx option to apply to a surface. .. ## pygame.examples.blend_fill.main ## .. function:: blit_blends.main | :sl:`uses alternative additive fill to that of surface.fill` | :sg:`blit_blends.main() -> None` Fake additive blending. Using NumPy. it doesn't clamp. Press r,g,b Somewhat like blend_fill. .. ## pygame.examples.blit_blends.main ## .. function:: cursors.main | :sl:`display two different custom cursors` | :sg:`cursors.main() -> None` Display an arrow or circle with crossbar cursor. .. ## pygame.examples.cursors.main ## .. function:: pixelarray.main | :sl:`display various pixelarray generated effects` | :sg:`pixelarray.main() -> None` Display various pixelarray generated effects. .. ## pygame.examples.pixelarray.main ## .. function:: scaletest.main | :sl:`interactively scale an image using smoothscale` | :sg:`scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None` arguments: :: imagefile - file name of source image (required) convert_alpha - use convert_alpha() on the surf (default False) run_speed_test - (default False) A smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. If ``scaletest.py`` is run as a program then the command line options are: :: ImageFile [-t] [-convert_alpha] [-t] = Run Speed Test [-convert_alpha] = Use convert_alpha() on the surf. .. ## pygame.examples.scaletest.main ## .. function:: midi.main | :sl:`run a midi example` | :sg:`midi.main(mode='output', device_id=None) -> None` Arguments: :: mode - if 'output' run a midi keyboard output example 'input' run a midi event logger input example 'list' list available midi devices (default 'output') device_id - midi device number; if None then use the default midi input or output device for the system The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. The input example shows how to translate midi input to pygame events. With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. new to pygame 1.9.0 .. ## pygame.examples.midi.main ## .. function:: scroll.main | :sl:`run a Surface.scroll example that shows a magnified image` | :sg:`scroll.main(image_file=None) -> None` This example shows a scrollable image that has a zoom factor of eight. It uses the :meth:`Surface.scroll() ` function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used. When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press ``ESC`` to quit. .. ## pygame.examples.scroll.main ## .. function:: camera.main | :sl:`display video captured live from an attached camera` | :sg:`camera.main() -> None` A simple live video player, it uses the first available camera it finds on the system. .. ## pygame.examples.camera.main ## .. function:: playmus.main | :sl:`play an audio file` | :sg:`playmus.main(file_path) -> None` A simple music player with window and keyboard playback control. Playback can be paused and rewound to the beginning. .. ## pygame.examples.playmus.main ## .. ## pygame.examples ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/fastevent.rst0000644000175100001770000000673114676242340017540 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.fastevent` ======================= .. module:: pygame.fastevent :synopsis: pygame module for interacting with events and queues from multiple threads. | :sl:`pygame module for interacting with events and queues` IMPORTANT NOTE: THIS MODULE IS DEPRECATED IN PYGAME 2.2 In older pygame versions before pygame 2, :mod:`pygame.event` was not well suited for posting events from different threads. This module served as a replacement (with less features) for multithreaded use. Now, the usage of this module is highly discouraged in favour of use of the main :mod:`pygame.event` module. This module will be removed in a future pygame version. Below, the legacy docs of the module is provided .. function:: init | :sl:`initialize pygame.fastevent` | :sg:`init() -> None` Initialize the pygame.fastevent module. .. ## pygame.fastevent.init ## .. function:: get_init | :sl:`returns True if the fastevent module is currently initialized` | :sg:`get_init() -> bool` Returns True if the pygame.fastevent module is currently initialized. .. ## pygame.fastevent.get_init ## .. function:: pump | :sl:`internally process pygame event handlers` | :sg:`pump() -> None` For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. This function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.fastevent` functions. There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up. .. ## pygame.fastevent.pump ## .. function:: wait | :sl:`wait for an event` | :sg:`wait() -> Event` Returns the current event on the queue. If there are no messages waiting on the queue, this will not return until one is available. Sometimes it is important to use this wait to get events from the queue, it will allow your application to idle when the user isn't doing anything with it. .. ## pygame.fastevent.wait ## .. function:: poll | :sl:`get an available event` | :sg:`poll() -> Event` Returns next event on queue. If there is no event waiting on the queue, this will return an event with type NOEVENT. .. ## pygame.fastevent.poll ## .. function:: get | :sl:`get all events from the queue` | :sg:`get() -> list of Events` This will get all the messages and remove them from the queue. .. ## pygame.fastevent.get ## .. function:: post | :sl:`place an event on the queue` | :sg:`post(Event) -> None` This will post your own event objects onto the event queue. You can post any event type you want, but some care must be taken. For example, if you post a MOUSEBUTTONDOWN event to the queue, it is likely any code receiving the event will expect the standard MOUSEBUTTONDOWN attributes to be available, like 'pos' and 'button'. Because pygame.fastevent.post() may have to wait for the queue to empty, you can get into a dead lock if you try to append an event on to a full queue from the thread that processes events. For that reason I do not recommend using this function in the main thread of an SDL program. .. ## pygame.fastevent.post ## .. ## pygame.fastevent ##././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/reST/ref/font.rst0000644000175100001770000004345114676242340016507 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.font` ================== .. module:: pygame.font :synopsis: pygame module for loading and rendering fonts | :sl:`pygame module for loading and rendering fonts` The font module allows for rendering TrueType fonts into Surface objects. This module is built on top of the SDL_ttf library, which comes with all normal pygame installations. Most of the work done with fonts are done by using the actual Font objects. The module by itself only has routines to support the creation of Font objects with :func:`pygame.font.Font`. You can load fonts from the system by using the :func:`pygame.font.SysFont` function. There are a few other functions to help look up the system fonts. Pygame comes with a builtin default font, freesansbold. This can always be accessed by passing ``None`` as the font name. Before pygame 2.0.3, pygame.font accepts any UCS-2 / UTF-16 character ('\\u0001' to '\\uFFFF'). After 2.0.3, pygame.font built with SDL_ttf 2.0.15 accepts any valid UCS-4 / UTF-32 character (like emojis, if the font has them) ('\\U00000001' to '\\U0010FFFF')). More about this in :func:`Font.render`. Before pygame 2.0.3, this character space restriction can be avoided by using the :mod:`pygame.freetype` based ``pygame.ftfont`` to emulate the Font module. This can be used by defining the environment variable PYGAME_FREETYPE before the first import of :mod:`pygame`. Since the problem ``pygame.ftfont`` solves no longer exists, it will likely be removed in the future. .. function:: init | :sl:`initialize the font module` | :sg:`init() -> None` This method is called automatically by ``pygame.init()``. It initializes the font module. The module must be initialized before any other functions will work. It is safe to call this function more than once. .. ## pygame.font.init ## .. function:: quit | :sl:`uninitialize the font module` | :sg:`quit() -> None` Manually uninitialize SDL_ttf's font system. This is called automatically by ``pygame.quit()``. It is safe to call this function even if font is currently not initialized. .. ## pygame.font.quit ## .. function:: get_init | :sl:`true if the font module is initialized` | :sg:`get_init() -> bool` Test if the font module is initialized or not. .. ## pygame.font.get_init ## .. function:: get_default_font | :sl:`get the filename of the default font` | :sg:`get_default_font() -> string` Return the filename of the system font. This is not the full path to the file. This file can usually be found in the same directory as the font module, but it can also be bundled in separate archives. .. ## pygame.font.get_default_font ## .. function:: get_sdl_ttf_version | :sl:`gets SDL_ttf version` | :sg:`get_sdl_ttf_version(linked=True) -> (major, minor, patch)` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave get_sdl_ttf_version feedback with authors `_ Returns a tuple of integers that identify SDL_ttf's version. SDL_ttf is the underlying font rendering library, written in C, on which pygame's font module depends. If 'linked' is True (the default), the function returns the version of the linked TTF library. Otherwise this function returns the version of TTF pygame was compiled with .. versionadded:: 2.1.3 .. ## pygame.font.get_sdl_ttf_version ## .. function:: get_fonts | :sl:`get all available fonts` | :sg:`get_fonts() -> list of strings` Returns a list of all the fonts available on the system. The names of the fonts will be set to lowercase with all spaces and punctuation removed. This works on most systems, but some will return an empty list if they cannot find fonts. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. .. ## pygame.font.get_fonts ## .. function:: match_font | :sl:`find a specific font on the system` | :sg:`match_font(name, bold=False, italic=False) -> path` Returns the full path to a font file on the system. If bold or italic are set to true, this will attempt to find the correct family of font. The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. If none of the given names are found, None is returned. .. versionadded:: 2.0.1 Accept an iterable of font names. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. Example: :: print pygame.font.match_font('bitstreamverasans') # output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf # (but only if you have Vera on your system) .. ## pygame.font.match_font ## .. function:: SysFont | :sl:`create a Font object from the system fonts` | :sg:`SysFont(name, size, bold=False, italic=False) -> Font` Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font. The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. .. versionadded:: 2.0.1 Accept an iterable of font names. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. .. ## pygame.font.SysFont ## .. class:: Font | :sl:`create a new Font object from a file` | :sg:`Font(file_path=None, size=12) -> Font` | :sg:`Font(file_path, size) -> Font` | :sg:`Font(pathlib.Path, size) -> Font` | :sg:`Font(object, size) -> Font` Load a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is ``None`` the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. If no arguments are given then the default font will be used and a font size of 12 is used. Font objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs. .. attribute:: bold | :sl:`Gets or sets whether the font should be rendered in (faked) bold.` | :sg:`bold -> bool` Whether the font should be rendered in bold. When set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.bold ## .. attribute:: italic | :sl:`Gets or sets whether the font should be rendered in (faked) italics.` | :sg:`italic -> bool` Whether the font should be rendered in italic. When set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.italic ## .. attribute:: underline | :sl:`Gets or sets whether the font should be rendered with an underline.` | :sg:`underline -> bool` Whether the font should be rendered in underline. When set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.underline ## .. attribute:: strikethrough | :sl:`Gets or sets whether the font should be rendered with a strikethrough.` | :sg:`strikethrough -> bool` Whether the font should be rendered with a strikethrough. When set to True, all rendered fonts will include an strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes. .. versionadded:: 2.1.3 .. ## Font.strikethrough ## .. method:: render | :sl:`draw text on a new Surface` | :sg:`render(text, antialias, color, background=None) -> Surface` This creates a new Surface with the specified text rendered on it. :mod:`pygame.font` provides no way to directly draw text on an existing Surface: instead you must use :func:`Font.render` to create an image (Surface) of the text, then blit this image onto another Surface. The text can only be a single line: newline characters are not rendered. Null characters ('\x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('\\u0001' to '\\uFFFF') were previously supported and any greater unicode codepoint would raise a UnicodeError. Now, characters in the UCS-4 range are supported. For char strings a ``LATIN1`` encoding is assumed. The antialias argument is a boolean: if True the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent. The Surface returned will be of the dimensions required to hold the text. (the same as those returned by :func:`Font.size`). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font. Depending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit ``RGB`` images. If the background is transparent a pixel alpha will be included. Optimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values. If you render '\\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle newlines yourself. Font rendering is not thread safe: only a single thread can render text at any time. .. versionchanged:: 2.0.3 Rendering UCS4 unicode works and does not raise an exception. Use `if hasattr(pygame.font, "UCS4"):` to see if pygame supports rendering UCS4 unicode including more languages and emoji. .. ## Font.render ## .. method:: size | :sl:`determine the amount of space needed to render text` | :sg:`size(text) -> (width, height)` Returns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for word wrapping and other layout effects. Be aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e". .. ## Font.size ## .. method:: set_underline | :sl:`control if text is rendered with an underline` | :sg:`set_underline(bool) -> None` When enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes. .. note:: This is the same as the :attr:`underline` attribute. .. ## Font.set_underline ## .. method:: get_underline | :sl:`check if text will be rendered with an underline` | :sg:`get_underline() -> bool` Return True when the font underline is enabled. .. note:: This is the same as the :attr:`underline` attribute. .. ## Font.get_underline ## .. method:: set_strikethrough | :sl:`control if text is rendered with a strikethrough` | :sg:`set_strikethrough(bool) -> None` When enabled, all rendered fonts will include a strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes. .. note:: This is the same as the :attr:`strikethrough` attribute. .. versionadded:: 2.1.3 .. ## Font.set_strikethrough ## .. method:: get_strikethrough | :sl:`check if text will be rendered with a strikethrough` | :sg:`get_strikethrough() -> bool` Return True when the font strikethrough is enabled. .. note:: This is the same as the :attr:`strikethrough` attribute. .. versionadded:: 2.1.3 .. ## Font.get_strikethrough ## .. method:: set_bold | :sl:`enable fake rendering of bold text` | :sg:`set_bold(bool) -> None` Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes. .. note:: This is the same as the :attr:`bold` attribute. .. ## Font.set_bold ## .. method:: get_bold | :sl:`check if text will be rendered bold` | :sg:`get_bold() -> bool` Return True when the font bold rendering mode is enabled. .. note:: This is the same as the :attr:`bold` attribute. .. ## Font.get_bold ## .. method:: set_italic | :sl:`enable fake rendering of italic text` | :sg:`set_italic(bool) -> None` Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes. .. note:: This is the same as the :attr:`italic` attribute. .. ## Font.set_italic ## .. method:: metrics | :sl:`gets the metrics for each character in the passed string` | :sg:`metrics(text) -> list` The list contains tuples for each character, which contain the minimum ``X`` offset, the maximum ``X`` offset, the minimum ``Y`` offset, the maximum ``Y`` offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character. .. ## Font.metrics ## .. method:: get_italic | :sl:`check if the text will be rendered italic` | :sg:`get_italic() -> bool` Return True when the font italic rendering mode is enabled. .. note:: This is the same as the :attr:`italic` attribute. .. ## Font.get_italic ## .. method:: get_linesize | :sl:`get the line space of the font text` | :sg:`get_linesize() -> int` Return the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines. .. ## Font.get_linesize ## .. method:: get_height | :sl:`get the height of the font` | :sg:`get_height() -> int` Return the height in pixels of the actual rendered text. This is the average size for each glyph in the font. .. ## Font.get_height ## .. method:: get_ascent | :sl:`get the ascent of the font` | :sg:`get_ascent() -> int` Return the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font. .. ## Font.get_ascent ## .. method:: get_descent | :sl:`get the descent of the font` | :sg:`get_descent() -> int` Return the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font. .. ## Font.get_descent ## .. method:: set_script | :sl:`set the script code for text shaping` | :sg:`set_script(str) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave feedback with authors `_ Sets the script used by harfbuzz text shaping, taking a 4 character script code as input. For example, Hindi is written in the Devanagari script, for which the script code is `"Deva"`. See the full list of script codes in `ISO 15924 `_. This method requires pygame built with SDL_ttf 2.20.0 or above. Otherwise the method will raise a pygame.error. .. versionadded:: 2.2.0 .. ## Font.set_script ## .. ## pygame.font.Font ## .. ## pygame.font ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/freetype.rst0000644000175100001770000007523214676242340017366 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.freetype` ====================== .. module:: pygame.freetype :synopsis: Enhanced pygame module for loading and rendering computer fonts | :sl:`Enhanced pygame module for loading and rendering computer fonts` The ``pygame.freetype`` module is a replacement for :mod:`pygame.font`. It has all of the functionality of the original, plus many new features. Yet is has absolutely no dependencies on the SDL_ttf library. It is implemented directly on the FreeType 2 library. The ``pygame.freetype`` module is not itself backward compatible with :mod:`pygame.font`. Instead, use the ``pygame.ftfont`` module as a drop-in replacement for :mod:`pygame.font`. All font file formats supported by FreeType can be rendered by ``pygame.freetype``, namely ``TTF``, Type1, ``CFF``, OpenType, ``SFNT``, ``PCF``, ``FNT``, ``BDF``, ``PFR`` and Type42 fonts. All glyphs having UTF-32 code points are accessible (see :attr:`Font.ucs4`). Most work on fonts is done using :class:`Font` instances. The module itself only has routines for initialization and creation of :class:`Font` objects. You can load fonts from the system using the :func:`SysFont` function. Extra support of bitmap fonts is available. Available bitmap sizes can be listed (see :meth:`Font.get_sizes`). For bitmap only fonts :class:`Font` can set the size for you (see the :attr:`Font.size` property). For now undefined character codes are replaced with the ``.notdef`` (not defined) character. How undefined codes are handled may become configurable in a future release. Pygame comes with a built-in default font. This can always be accessed by passing None as the font name to the :class:`Font` constructor. Extra rendering features available to :class:`pygame.freetype.Font` are direct to surface rendering (see :meth:`Font.render_to`), character kerning (see :attr:`Font.kerning`), vertical layout (see :attr:`Font.vertical`), rotation of rendered text (see :attr:`Font.rotation`), and the strong style (see :attr:`Font.strong`). Some properties are configurable, such as strong style strength (see :attr:`Font.strength`) and underline positioning (see :attr:`Font.underline_adjustment`). Text can be positioned by the upper right corner of the text box or by the text baseline (see :attr:`Font.origin`). Finally, a font's vertical and horizontal size can be adjusted separately (see :attr:`Font.size`). The :any:`pygame.examples.freetype_misc ` example shows these features in use. The pygame package does not import ``freetype`` automatically when loaded. This module must be imported explicitly to be used. :: import pygame import pygame.freetype .. versionadded:: 1.9.2 :mod:`freetype` .. function:: get_error | :sl:`Return the latest FreeType error` | :sg:`get_error() -> str` | :sg:`get_error() -> None` Return a description of the last error which occurred in the FreeType2 library, or ``None`` if no errors have occurred. .. function:: get_version | :sl:`Return the FreeType version` | :sg:`get_version(linked=True) -> (int, int, int)` Returns the version of the FreeType library in use by this module. ``linked=True`` is the default behavior and returns the linked version of FreeType and ``linked=False`` returns the compiled version of FreeType. Note that the ``freetype`` module depends on the FreeType 2 library. It will not compile with the original FreeType 1.0. Hence, the first element of the tuple will always be "2". .. versionchanged:: 2.2.0 ``linked`` keyword argument added and default behavior changed from returning compiled version to returning linked version .. function:: init | :sl:`Initialize the underlying FreeType library.` | :sg:`init(cache_size=64, resolution=72) -> None` This function initializes the underlying FreeType library and must be called before trying to use any of the functionality of the ``freetype`` module. However, :func:`pygame.init()` will automatically call this function if the ``freetype`` module is already imported. It is safe to call this function more than once. Optionally, you may specify a default *cache_size* for the Glyph cache: the maximum number of glyphs that will be cached at any given time by the module. Exceedingly small values will be automatically tuned for performance. Also a default pixel *resolution*, in dots per inch, can be given to adjust font scaling. .. function:: quit | :sl:`Shut down the underlying FreeType library.` | :sg:`quit() -> None` This function closes the ``freetype`` module. After calling this function, you should not invoke any class, method or function related to the ``freetype`` module as they are likely to fail or might give unpredictable results. It is safe to call this function even if the module hasn't been initialized yet. .. function:: get_init | :sl:`Returns True if the FreeType module is currently initialized.` | :sg:`get_init() -> bool` Returns ``True`` if the ``pygame.freetype`` module is currently initialized. .. versionadded:: 1.9.5 .. function:: was_init | :sl:`DEPRECATED: Use get_init() instead.` | :sg:`was_init() -> bool` DEPRECATED: Returns ``True`` if the ``pygame.freetype`` module is currently initialized. Use ``get_init()`` instead. .. function:: get_cache_size | :sl:`Return the glyph case size` | :sg:`get_cache_size() -> long` See :func:`pygame.freetype.init()`. .. function:: get_default_resolution | :sl:`Return the default pixel size in dots per inch` | :sg:`get_default_resolution() -> long` Returns the default pixel size, in dots per inch, for the module. The default is 72 DPI. .. function:: set_default_resolution | :sl:`Set the default pixel size in dots per inch for the module` | :sg:`set_default_resolution([resolution])` Set the default pixel size, in dots per inch, for the module. If the optional argument is omitted or zero the resolution is reset to 72 DPI. .. function:: SysFont | :sl:`create a Font object from the system fonts` | :sg:`SysFont(name, size, bold=False, italic=False) -> Font` Return a new Font object that is loaded from the system fonts. The font will match the requested *bold* and *italic* flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font. The font *name* can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. .. versionadded:: 2.0.1 Accept an iterable of font names. .. function:: get_default_font | :sl:`Get the filename of the default font` | :sg:`get_default_font() -> string` Return the filename of the default pygame font. This is not the full path to the file. The file is usually in the same directory as the font module, but can also be bundled in a separate archive. .. class:: Font | :sl:`Create a new Font instance from a supported font file.` | :sg:`Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font` | :sg:`Font(pathlib.Path) -> Font` Argument *file* can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used. .. _freetype-font-size-argument: Optionally, a *size* argument may be specified to set the default size in points, which determines the size of the rendered characters. The size can also be passed explicitly to each method call. Because of the way the caching system works, specifying a default size on the constructor doesn't imply a performance gain over manually passing the size on each function call. If the font is bitmap and no *size* is given, the default size is set to the first available size for the font. If the font file has more than one font, the font to load can be chosen with the *index* argument. An exception is raised for an out-of-range font index value. The optional *resolution* argument sets the pixel size, in dots per inch, for use in scaling glyphs for this Font instance. If 0 then the default module value, set by :func:`init`, is used. The Font object's resolution can only be changed by re-initializing the Font instance. The optional *ucs4* argument, an integer, sets the default text translation mode: 0 (False) recognize UTF-16 surrogate pairs, any other value (True), to treat Unicode text as UCS-4, with no surrogate pairs. See :attr:`Font.ucs4`. .. attribute:: name | :sl:`Proper font name.` | :sg:`name -> string` Read only. Returns the real (long) name of the font, as recorded in the font file. .. attribute:: path | :sl:`Font file path` | :sg:`path -> unicode` Read only. Returns the path of the loaded font file .. attribute:: size | :sl:`The default point size used in rendering` | :sg:`size -> float` | :sg:`size -> (float, float)` Get or set the default size for text metrics and rendering. It can be a single point size, given as a Python ``int`` or ``float``, or a font ppem (width, height) ``tuple``. Size values are non-negative. A zero size or width represents an undefined size. In this case the size must be given as a method argument, or an exception is raised. A zero width but non-zero height is a ValueError. For a scalable font, a single number value is equivalent to a tuple with width equal height. A font can be stretched vertically with height set greater than width, or horizontally with width set greater than height. For embedded bitmaps, as listed by :meth:`get_sizes`, use the nominal width and height to select an available size. Font size differs for a non-scalable, bitmap, font. During a method call it must match one of the available sizes returned by method :meth:`get_sizes`. If not, an exception is raised. If the size is a single number, the size is first matched against the point size value. If no match, then the available size with the same nominal width and height is chosen. .. method:: get_rect | :sl:`Return the size and offset of rendered text` | :sg:`get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect` Gets the final dimensions and origin, in pixels, of *text* using the optional *size* in points, *style*, and *rotation*. For other relevant render properties, and for any optional argument not given, the default values set for the :class:`Font` instance are used. Returns a :class:`Rect ` instance containing the width and height of the text's bounding box and the position of the text's origin. The origin is useful in aligning separately rendered pieces of text. It gives the baseline position and bearing at the start of the text. See the :meth:`render_to` method for an example. If *text* is a char (byte) string, its encoding is assumed to be ``LATIN1``. Optionally, *text* can be ``None``, which will return the bounding rectangle for the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for more details. .. method:: get_metrics | :sl:`Return the glyph metrics for the given text` | :sg:`get_metrics(text, size=0) -> [(...), ...]` Returns the glyph metrics for each character in *text*. The glyph metrics are returned as a list of tuples. Each tuple gives metrics of a single character glyph. The glyph metrics are: :: (min_x, max_x, min_y, max_y, horizontal_advance_x, horizontal_advance_y) The bounding box min_x, max_x, min_y, and max_y values are returned as grid-fitted pixel coordinates of type int. The advance values are float values. The calculations are done using the font's default size in points. Optionally you may specify another point size with the *size* argument. The metrics are adjusted for the current rotation, strong, and oblique settings. If text is a char (byte) string, then its encoding is assumed to be ``LATIN1``. .. attribute:: height | :sl:`The unscaled height of the font in font units` | :sg:`height -> int` Read only. Gets the height of the font. This is the average value of all glyphs in the font. .. attribute:: ascender | :sl:`The unscaled ascent of the font in font units` | :sg:`ascender -> int` Read only. Return the number of units from the font's baseline to the top of the bounding box. .. attribute:: descender | :sl:`The unscaled descent of the font in font units` | :sg:`descender -> int` Read only. Return the height in font units for the font descent. The descent is the number of units from the font's baseline to the bottom of the bounding box. .. method:: get_sized_ascender | :sl:`The scaled ascent of the font in pixels` | :sg:`get_sized_ascender(=0) -> int` Return the number of units from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation. .. method:: get_sized_descender | :sl:`The scaled descent of the font in pixels` | :sg:`get_sized_descender(=0) -> int` Return the number of pixels from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation. .. method:: get_sized_height | :sl:`The scaled height of the font in pixels` | :sg:`get_sized_height(=0) -> int` Returns the height of the font. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation. .. method:: get_sized_glyph_height | :sl:`The scaled bounding box height of the font in pixels` | :sg:`get_sized_glyph_height(=0) -> int` Return the glyph bounding box height of the font in pixels. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation. .. method:: get_sizes | :sl:`return the available sizes of embedded bitmaps` | :sg:`get_sizes() -> [(int, int, int, float, float), ...]` | :sg:`get_sizes() -> []` Returns a list of tuple records, one for each point size supported. Each tuple containing the point size, the height in pixels, width in pixels, horizontal ppem (nominal width) in fractional pixels, and vertical ppem (nominal height) in fractional pixels. .. method:: render | :sl:`Return rendered text as a surface` | :sg:`render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)` Returns a new :class:`Surface `, with the text rendered to it in the color given by 'fgcolor'. If no foreground color is given, the default foreground color, :attr:`fgcolor ` is used. If ``bgcolor`` is given, the surface will be filled with this color. When no background color is given, the surface background is transparent, zero alpha. Normally the returned surface has a 32 bit pixel size. However, if ``bgcolor`` is ``None`` and anti-aliasing is disabled a monochrome 8 bit colorkey surface, with colorkey set for the background color, is returned. The return value is a tuple: the new surface and the bounding rectangle giving the size and origin of the rendered text. If an empty string is passed for text then the returned Rect is zero width and the height of the font. Optional *fgcolor*, *style*, *rotation*, and *size* arguments override the default values set for the :class:`Font` instance. If *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``. Optionally, *text* can be ``None``, which will render the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for details. .. method:: render_to | :sl:`Render text onto an existing surface` | :sg:`render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect` Renders the string *text* to the :mod:`pygame.Surface` *surf*, at position *dest*, a (x, y) surface coordinate pair. If either x or y is not an integer it is converted to one if possible. Any sequence where the first two items are x and y positional elements is accepted, including a :class:`Rect ` instance. As with :meth:`render`, optional *fgcolor*, *style*, *rotation*, and *size* argument are available. If a background color *bgcolor* is given, the text bounding box is first filled with that color. The text is blitted next. Both the background fill and text rendering involve full alpha blits. That is, the alpha values of the foreground, background, and destination target surface all affect the blit. The return value is a rectangle giving the size and position of the rendered text within the surface. If an empty string is passed for text then the returned :class:`Rect ` is zero width and the height of the font. The rect will test False. Optionally, *text* can be set ``None``, which will re-render text passed to a previous :meth:`render_to`, :meth:`get_rect`, :meth:`render`, :meth:`render_raw`, or :meth:`render_raw_to` call. Primarily, this feature is an aid to using :meth:`render_to` in combination with :meth:`get_rect`. An example: :: def word_wrap(surf, text, font, color=(0, 0, 0)): font.origin = True words = text.split(' ') width, height = surf.get_size() line_spacing = font.get_sized_height() + 2 x, y = 0, line_spacing space = font.get_rect(' ') for word in words: bounds = font.get_rect(word) if x + bounds.width + bounds.x >= width: x, y = 0, y + line_spacing if x + bounds.width + bounds.x >= width: raise ValueError("word too wide for the surface") if y + bounds.height - bounds.y >= height: raise ValueError("text to long for the surface") font.render_to(surf, (x, y), None, color) x += bounds.width + space.width return x, y When :meth:`render_to` is called with the same font properties ― :attr:`size`, :attr:`style`, :attr:`strength`, :attr:`wide`, :attr:`antialiased`, :attr:`vertical`, :attr:`rotation`, :attr:`kerning`, and :attr:`use_bitmap_strikes` ― as :meth:`get_rect`, :meth:`render_to` will use the layout calculated by :meth:`get_rect`. Otherwise, :meth:`render_to` will recalculate the layout if called with a text string or one of the above properties has changed after the :meth:`get_rect` call. If *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``. .. method:: render_raw | :sl:`Return rendered text as a string of bytes` | :sg:`render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))` Like :meth:`render` but with the pixels returned as a byte string of 8-bit gray-scale values. The foreground color is 255, the background 0, useful as an alpha mask for a foreground pattern. .. method:: render_raw_to | :sl:`Render text into an array of ints` | :sg:`render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect` Render to an array object exposing an array struct interface. The array must be two dimensional with integer items. The default *dest* value, ``None``, is equivalent to position (0, 0). See :meth:`render_to`. As with the other render methods, *text* can be ``None`` to render a text string passed previously to another method. The return value is a :func:`pygame.Rect` giving the size and position of the rendered text. .. attribute:: style | :sl:`The font's style flags` | :sg:`style -> int` Gets or sets the default style of the Font. This default style will be used for all text rendering and size calculations unless overridden specifically a render or :meth:`get_rect` call. The style value may be a bit-wise OR of one or more of the following constants: :: STYLE_NORMAL STYLE_UNDERLINE STYLE_OBLIQUE STYLE_STRONG STYLE_WIDE STYLE_DEFAULT These constants may be found on the FreeType constants module. Optionally, the default style can be modified or obtained accessing the individual style attributes (underline, oblique, strong). The ``STYLE_OBLIQUE`` and ``STYLE_STRONG`` styles are for scalable fonts only. An attempt to set either for a bitmap font raises an AttributeError. An attempt to set either for an inactive font, as returned by ``Font.__new__()``, raises a RuntimeError. Assigning ``STYLE_DEFAULT`` to the :attr:`style` property leaves the property unchanged, as this property defines the default. The :attr:`style` property will never return ``STYLE_DEFAULT``. .. attribute:: underline | :sl:`The state of the font's underline style flag` | :sg:`underline -> bool` Gets or sets whether the font will be underlined when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter. .. attribute:: strong | :sl:`The state of the font's strong style flag` | :sg:`strong -> bool` Gets or sets whether the font will be bold when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter. .. attribute:: oblique | :sl:`The state of the font's oblique style flag` | :sg:`oblique -> bool` Gets or sets whether the font will be rendered as oblique. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the *style* parameter. The oblique style is only supported for scalable (outline) fonts. An attempt to set this style on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, setting this property raises a RuntimeError. .. attribute:: wide | :sl:`The state of the font's wide style flag` | :sg:`wide -> bool` Gets or sets whether the font will be stretched horizontally when drawing text. It produces a result similar to :class:`pygame.font.Font`'s bold. This style not available for rotated text. .. attribute:: strength | :sl:`The strength associated with the strong or wide font styles` | :sg:`strength -> float` The amount by which a font glyph's size is enlarged for the strong or wide transformations, as a fraction of the untransformed size. For the wide style only the horizontal dimension is increased. For strong text both the horizontal and vertical dimensions are enlarged. A wide style of strength 0.08333 ( 1/12 ) is equivalent to the :class:`pygame.font.Font` bold style. The default is 0.02778 ( 1/36 ). The strength style is only supported for scalable (outline) fonts. An attempt to set this property on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, assignment to this property raises a RuntimeError. .. attribute:: underline_adjustment | :sl:`Adjustment factor for the underline position` | :sg:`underline_adjustment -> float` Gets or sets a factor which, when positive, is multiplied with the font's underline offset to adjust the underline position. A negative value turns an underline into a strike-through or overline. It is multiplied with the ascender. Accepted values range between -2.0 and 2.0 inclusive. A value of 0.5 closely matches Tango underlining. A value of 1.0 mimics :class:`pygame.font.Font` underlining. .. attribute:: fixed_width | :sl:`Gets whether the font is fixed-width` | :sg:`fixed_width -> bool` Read only. Returns ``True`` if the font contains fixed-width characters (for example Courier, Bitstream Vera Sans Mono, Andale Mono). .. attribute:: fixed_sizes | :sl:`the number of available bitmap sizes for the font` | :sg:`fixed_sizes -> int` Read only. Returns the number of point sizes for which the font contains bitmap character images. If zero then the font is not a bitmap font. A scalable font may contain pre-rendered point sizes as strikes. .. attribute:: scalable | :sl:`Gets whether the font is scalable` | :sg:`scalable -> bool` Read only. Returns ``True`` if the font contains outline glyphs. If so, the point size is not limited to available bitmap sizes. .. attribute:: use_bitmap_strikes | :sl:`allow the use of embedded bitmaps in an outline font file` | :sg:`use_bitmap_strikes -> bool` Some scalable fonts include embedded bitmaps for particular point sizes. This property controls whether or not those bitmap strikes are used. Set it ``False`` to disable the loading of any bitmap strike. Set it ``True``, the default, to permit bitmap strikes for a non-rotated render with no style other than :attr:`wide` or :attr:`underline`. This property is ignored for bitmap fonts. See also :attr:`fixed_sizes` and :meth:`get_sizes`. .. attribute:: antialiased | :sl:`Font anti-aliasing mode` | :sg:`antialiased -> bool` Gets or sets the font's anti-aliasing mode. This defaults to ``True`` on all fonts, which are rendered with full 8 bit blending. Set to ``False`` to do monochrome rendering. This should provide a small speed gain and reduce cache memory size. .. attribute:: kerning | :sl:`Character kerning mode` | :sg:`kerning -> bool` Gets or sets the font's kerning mode. This defaults to ``False`` on all fonts, which will be rendered without kerning. Set to ``True`` to add kerning between character pairs, if supported by the font, when positioning glyphs. .. attribute:: vertical | :sl:`Font vertical mode` | :sg:`vertical -> bool` Gets or sets whether the characters are laid out vertically rather than horizontally. May be useful when rendering Kanji or some other vertical script. Set to ``True`` to switch to a vertical text layout. The default is ``False``, place horizontally. Note that the :class:`Font` class does not automatically determine script orientation. Vertical layout must be selected explicitly. Also note that several font formats (especially bitmap based ones) don't contain the necessary metrics to draw glyphs vertically, so drawing in those cases will give unspecified results. .. attribute:: rotation | :sl:`text rotation in degrees counterclockwise` | :sg:`rotation -> int` Gets or sets the baseline angle of the rendered text. The angle is represented as integer degrees. The default angle is 0, with horizontal text rendered along the X-axis, and vertical text along the Y-axis. A positive value rotates these axes counterclockwise that many degrees. A negative angle corresponds to a clockwise rotation. The rotation value is normalized to a value within the range 0 to 359 inclusive (eg. 390 -> 390 - 360 -> 30, -45 -> 360 + -45 -> 315, 720 -> 720 - (2 * 360) -> 0). Only scalable (outline) fonts can be rotated. An attempt to change the rotation of a bitmap font raises an AttributeError. An attempt to change the rotation of an inactive font instance, as returned by ``Font.__new__()``, raises a RuntimeError. .. attribute:: fgcolor | :sl:`default foreground color` | :sg:`fgcolor -> Color` Gets or sets the default glyph rendering color. It is initially opaque black ― (0, 0, 0, 255). Applies to :meth:`render` and :meth:`render_to`. .. attribute:: bgcolor | :sl:`default background color` | :sg:`bgcolor -> Color` Gets or sets the default background rendering color. Initially it is unset and text will render with a transparent background by default. Applies to :meth:`render` and :meth:`render_to`. .. versionadded:: 2.0.0 .. attribute:: origin | :sl:`Font render to text origin mode` | :sg:`origin -> bool` If set ``True``, :meth:`render_to` and :meth:`render_raw_to` will take the *dest* position to be that of the text origin, as opposed to the top-left corner of the bounding box. See :meth:`get_rect` for details. .. attribute:: pad | :sl:`padded boundary mode` | :sg:`pad -> bool` If set ``True``, then the text boundary rectangle will be inflated to match that of :class:`font.Font `. Otherwise, the boundary rectangle is just large enough for the text. .. attribute:: ucs4 | :sl:`Enable UCS-4 mode` | :sg:`ucs4 -> bool` Gets or sets the decoding of Unicode text. By default, the freetype module performs UTF-16 surrogate pair decoding on Unicode text. This allows 32-bit escape sequences ('\Uxxxxxxxx') between 0x10000 and 0x10FFFF to represent their corresponding UTF-32 code points on Python interpreters built with a UCS-2 Unicode type (on Windows, for instance). It also means character values within the UTF-16 surrogate area (0xD800 to 0xDFFF) are considered part of a surrogate pair. A malformed surrogate pair will raise a UnicodeEncodeError. Setting ucs4 ``True`` turns surrogate pair decoding off, allowing access the full UCS-4 character range to a Python interpreter built with four-byte Unicode character support. .. attribute:: resolution | :sl:`Pixel resolution in dots per inch` | :sg:`resolution -> int` Read only. Gets pixel size used in scaling font glyphs for this :class:`Font` instance. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/gfxdraw.rst0000644000175100001770000005252214676242340017202 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.gfxdraw` ===================== .. module:: pygame.gfxdraw :synopsis: pygame module for drawing shapes | :sl:`pygame module for drawing shapes` **EXPERIMENTAL!**: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release. The pygame package does not import gfxdraw automatically when loaded, so it must imported explicitly to be used. :: import pygame import pygame.gfxdraw For all functions the arguments are strictly positional and integers are accepted for coordinates and radii. The ``color`` argument can be one of the following formats: - a :mod:`pygame.Color` object - an ``(RGB)`` triplet (tuple/list) - an ``(RGBA)`` quadruplet (tuple/list) The functions :meth:`rectangle` and :meth:`box` will accept any ``(x, y, w, h)`` sequence for their ``rect`` argument, though :mod:`pygame.Rect` instances are preferred. To draw a filled antialiased shape, first use the antialiased (aa*) version of the function, and then use the filled (filled_*) version. For example: :: col = (255, 0, 0) surf.fill((255, 255, 255)) pygame.gfxdraw.aacircle(surf, x, y, 30, col) pygame.gfxdraw.filled_circle(surf, x, y, 30, col) .. note:: For threading, each of the functions releases the GIL during the C part of the call. .. note:: See the :mod:`pygame.draw` module for alternative draw methods. The ``pygame.gfxdraw`` module differs from the :mod:`pygame.draw` module in the API it uses and the different draw functions available. ``pygame.gfxdraw`` wraps the primitives from the library called SDL_gfx, rather than using modified versions. .. versionadded:: 1.9.0 .. function:: pixel | :sl:`draw a pixel` | :sg:`pixel(surface, x, y, color) -> None` Draws a single pixel, at position (x ,y), on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the pixel :param int y: y coordinate of the pixel :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.pixel ## .. function:: hline | :sl:`draw a horizontal line` | :sg:`hline(surface, x1, x2, y, color) -> None` Draws a straight horizontal line (``(x1, y)`` to ``(x2, y)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x1: x coordinate of one end of the line :param int x2: x coordinate of the other end of the line :param int y: y coordinate of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.hline ## .. function:: vline | :sl:`draw a vertical line` | :sg:`vline(surface, x, y1, y2, color) -> None` Draws a straight vertical line (``(x, y1)`` to ``(x, y2)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x: x coordinate of the line :param int y1: y coordinate of one end of the line :param int y2: y coordinate of the other end of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.vline ## .. function:: line | :sl:`draw a line` | :sg:`line(surface, x1, y1, x2, y2, color) -> None` Draws a straight line (``(x1, y1)`` to ``(x2, y2)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x1: x coordinate of one end of the line :param int y1: y coordinate of one end of the line :param int x2: x coordinate of the other end of the line :param int y2: y coordinate of the other end of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.line ## .. function:: rectangle | :sl:`draw a rectangle` | :sg:`rectangle(surface, rect, color) -> None` Draws an unfilled rectangle on the given surface. For a filled rectangle use :meth:`box`. :param Surface surface: surface to draw on :param Rect rect: rectangle to draw, position and dimensions :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing. .. ## pygame.gfxdraw.rectangle ## .. function:: box | :sl:`draw a filled rectangle` | :sg:`box(surface, rect, color) -> None` Draws a filled rectangle on the given surface. For an unfilled rectangle use :meth:`rectangle`. :param Surface surface: surface to draw on :param Rect rect: rectangle to draw, position and dimensions :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing. .. note:: The :func:`pygame.Surface.fill` method works just as well for drawing filled rectangles. In fact :func:`pygame.Surface.fill` can be hardware accelerated on some platforms with both software and hardware display modes. .. ## pygame.gfxdraw.box ## .. function:: circle | :sl:`draw a circle` | :sg:`circle(surface, x, y, r, color) -> None` Draws an unfilled circle on the given surface. For a filled circle use :meth:`filled_circle`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.circle ## .. function:: aacircle | :sl:`draw an antialiased circle` | :sg:`aacircle(surface, x, y, r, color) -> None` Draws an unfilled antialiased circle on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aacircle ## .. function:: filled_circle | :sl:`draw a filled circle` | :sg:`filled_circle(surface, x, y, r, color) -> None` Draws a filled circle on the given surface. For an unfilled circle use :meth:`circle`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_circle ## .. function:: ellipse | :sl:`draw an ellipse` | :sg:`ellipse(surface, x, y, rx, ry, color) -> None` Draws an unfilled ellipse on the given surface. For a filled ellipse use :meth:`filled_ellipse`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.ellipse ## .. function:: aaellipse | :sl:`draw an antialiased ellipse` | :sg:`aaellipse(surface, x, y, rx, ry, color) -> None` Draws an unfilled antialiased ellipse on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aaellipse ## .. function:: filled_ellipse | :sl:`draw a filled ellipse` | :sg:`filled_ellipse(surface, x, y, rx, ry, color) -> None` Draws a filled ellipse on the given surface. For an unfilled ellipse use :meth:`ellipse`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_ellipse ## .. function:: arc | :sl:`draw an arc` | :sg:`arc(surface, x, y, r, start_angle, stop_angle, color) -> None` Draws an arc on the given surface. For an arc with its endpoints connected to its center use :meth:`pie`. The two angle arguments are given in degrees and indicate the start and stop positions of the arc. The arc is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, nothing will be drawn :param Surface surface: surface to draw on :param int x: x coordinate of the center of the arc :param int y: y coordinate of the center of the arc :param int r: radius of the arc :param int start_angle: start angle in degrees :param int stop_angle: stop angle in degrees :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: This function uses *degrees* while the :func:`pygame.draw.arc` function uses *radians*. .. ## pygame.gfxdraw.arc ## .. function:: pie | :sl:`draw a pie` | :sg:`pie(surface, x, y, r, start_angle, stop_angle, color) -> None` Draws an unfilled pie on the given surface. A pie is an :meth:`arc` with its endpoints connected to its center. The two angle arguments are given in degrees and indicate the start and stop positions of the pie. The pie is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, a straight line will be drawn from the center position at the given angle, to a length of the radius. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the pie :param int y: y coordinate of the center of the pie :param int r: radius of the pie :param int start_angle: start angle in degrees :param int stop_angle: stop angle in degrees :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.pie ## .. function:: trigon | :sl:`draw a trigon/triangle` | :sg:`trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws an unfilled trigon (triangle) on the given surface. For a filled trigon use :meth:`filled_trigon`. A trigon can also be drawn using :meth:`polygon` e.g. ``polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.trigon ## .. function:: aatrigon | :sl:`draw an antialiased trigon/triangle` | :sg:`aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws an unfilled antialiased trigon (triangle) on the given surface. An aatrigon can also be drawn using :meth:`aapolygon` e.g. ``aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aatrigon ## .. function:: filled_trigon | :sl:`draw a filled trigon/triangle` | :sg:`filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws a filled trigon (triangle) on the given surface. For an unfilled trigon use :meth:`trigon`. A filled_trigon can also be drawn using :meth:`filled_polygon` e.g. ``filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_trigon ## .. function:: polygon | :sl:`draw a polygon` | :sg:`polygon(surface, points, color) -> None` Draws an unfilled polygon on the given surface. For a filled polygon use :meth:`filled_polygon`. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.polygon ## .. function:: aapolygon | :sl:`draw an antialiased polygon` | :sg:`aapolygon(surface, points, color) -> None` Draws an unfilled antialiased polygon on the given surface. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.aapolygon ## .. function:: filled_polygon | :sl:`draw a filled polygon` | :sg:`filled_polygon(surface, points, color) -> None` Draws a filled polygon on the given surface. For an unfilled polygon use :meth:`polygon`. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated)` :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.filled_polygon ## .. function:: textured_polygon | :sl:`draw a textured polygon` | :sg:`textured_polygon(surface, points, texture, tx, ty) -> None` Draws a textured polygon on the given surface. For better performance, the surface and the texture should have the same format. A per-pixel alpha texture blit to a per-pixel alpha surface will differ from a :func:`pygame.Surface.blit` blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param Surface texture: texture to draw on the polygon :param int tx: x offset of the texture :param int ty: y offset of the texture :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.textured_polygon ## .. function:: bezier | :sl:`draw a Bezier curve` | :sg:`bezier(surface, points, steps, color) -> None` Draws a Bézier curve on the given surface. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates used to form a curve, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param int steps: number of steps for the interpolation, the minimum is 2 :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``steps < 2`` :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.bezier ## .. ## pygame.gfxdraw ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/image.rst0000644000175100001770000003212314676242340016615 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.image` =================== .. module:: pygame.image :synopsis: pygame module for loading and saving images | :sl:`pygame module for image transfer` The image module contains functions for loading and saving pictures, as well as transferring Surfaces to formats usable by other packages. Note that there is no Image class; an image is loaded as a Surface object. The Surface class allows manipulation (drawing lines, setting pixels, capturing regions, etc.). In the vast majority of installations, pygame is built to support extended formats, using the SDL_Image library behind the scenes. However, some installations may only support uncompressed ``BMP`` images. With full image support, the :func:`pygame.image.load()` function can load the following formats. * ``BMP`` * ``GIF`` (non-animated) * ``JPEG`` * ``LBM`` (and ``PBM``, ``PGM``, ``PPM``) * ``PCX`` * ``PNG`` * ``PNM`` * ``SVG`` (limited support, using Nano SVG) * ``TGA`` (uncompressed) * ``TIFF`` * ``WEBP`` * ``XPM`` .. versionadded:: 2.0 Loading SVG, WebP, PNM Saving images only supports a limited set of formats. You can save to the following formats. * ``BMP`` * ``JPEG`` * ``PNG`` * ``TGA`` ``JPEG`` and ``JPG``, as well as ``TIF`` and ``TIFF`` refer to the same file format .. versionadded:: 1.8 Saving PNG and JPEG files. .. function:: load | :sl:`load new image from a file (or file-like object)` | :sg:`load(filename) -> Surface` | :sg:`load(fileobj, namehint="") -> Surface` Load an image from a file source. You can pass either a filename, a Python file-like object, or a pathlib.Path. Pygame will automatically determine the image type (e.g., ``GIF`` or bitmap) and create a new Surface object from the data. In some cases it will need to know the file extension (e.g., ``GIF`` images should end in ".gif"). If you pass a raw file-like object, you may also want to pass the original filename as the namehint argument. The returned Surface will contain the same color format, colorkey and alpha transparency as the file it came from. You will often want to call :func:`pygame.Surface.convert()` with no arguments, to create a copy that will draw more quickly on the screen. For alpha transparency, like in .png images, use the :func:`pygame.Surface.convert_alpha()` method after loading so that the image has per pixel transparency. Pygame may not always be built to support all image formats. At minimum it will support uncompressed ``BMP``. If :func:`pygame.image.get_extended()` returns ``True``, you should be able to load most images (including PNG, JPG and GIF). You should use :func:`os.path.join()` for compatibility. :: eg. asurf = pygame.image.load(os.path.join('data', 'bla.png')) .. ## pygame.image.load ## .. function:: save | :sl:`save an image to file (or file-like object)` | :sg:`save(Surface, filename) -> None` | :sg:`save(Surface, fileobj, namehint="") -> None` This will save your Surface as either a ``BMP``, ``TGA``, ``PNG``, or ``JPEG`` image. If the filename extension is unrecognized it will default to ``TGA``. Both ``TGA``, and ``BMP`` file formats create uncompressed files. You can pass a filename, a pathlib.Path or a Python file-like object. For file-like object, the image is saved to ``TGA`` format unless a namehint with a recognizable extension is passed in. .. note:: When saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible. .. versionchanged:: 1.8 Saving PNG and JPEG files. .. versionchanged:: 2.0.0 The ``namehint`` parameter was added to make it possible to save other formats than ``TGA`` to a file-like object. Saving to a file-like object with JPEG is possible. .. ## pygame.image.save ## .. function:: get_sdl_image_version | :sl:`get version number of the SDL_Image library being used` | :sg:`get_sdl_image_version(linked=True) -> None` | :sg:`get_sdl_image_version(linked=True) -> (major, minor, patch)` If pygame is built with extended image formats, then this function will return the SDL_Image library's version number as a tuple of 3 integers ``(major, minor, patch)``. If not, then it will return ``None``. ``linked=True`` is the default behavior and the function will return the version of the library that Pygame is linked against, while ``linked=False`` will return the version of the library that Pygame is compiled against. .. versionadded:: 2.0.0 .. versionchanged:: 2.2.0 ``linked`` keyword argument added and default behavior changed from returning compiled version to returning linked version .. ## pygame.image.get_sdl_image_version ## .. function:: get_extended | :sl:`test if extended image formats can be loaded` | :sg:`get_extended() -> bool` If pygame is built with extended image formats this function will return True. It is still not possible to determine which formats will be available, but generally you will be able to load them all. .. ## pygame.image.get_extended ## .. function:: tostring | :sl:`transfer image to byte buffer` | :sg:`tostring(Surface, format, flipped=False) -> bytes` Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped. The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame. * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first .. note:: it is preferred to use :func:`tobytes` as of pygame 2.1.3 .. versionadded:: 2.1.3 BGRA format .. ## pygame.image.tostring ## .. function:: tobytes | :sl:`transfer image to byte buffer` | :sg:`tobytes(Surface, format, flipped=False) -> bytes` Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped. The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame. * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first .. note:: this function is an alias for :func:`tostring`. The use of this function is recommended over :func:`tostring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations. .. versionadded:: 2.1.3 .. ## pygame.image.tobytes ## .. function:: fromstring | :sl:`create new Surface from a byte buffer` | :sg:`fromstring(bytes, size, format, flipped=False) -> Surface` This function takes arguments similar to :func:`pygame.image.tostring()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in. The bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised. See the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame. .. note:: it is preferred to use :func:`frombytes` as of pygame 2.1.3 .. ## pygame.image.fromstring ## .. function:: frombytes | :sl:`create new Surface from a byte buffer` | :sg:`frombytes(bytes, size, format, flipped=False) -> Surface` This function takes arguments similar to :func:`pygame.image.tobytes()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in. The bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised. See the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame. .. note:: this function is an alias for :func:`fromstring`. The use of this function is recommended over :func:`fromstring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations. .. versionadded:: 2.1.3 .. ## pygame.image.frombytes ## .. function:: frombuffer | :sl:`create a new Surface that shares data inside a bytes buffer` | :sg:`frombuffer(buffer, size, format) -> Surface` Create a new Surface that shares pixel data directly from a buffer. This buffer can be bytes, a bytearray, a memoryview, a :class:`pygame.BufferProxy`, or any object that supports the buffer protocol. This method takes similar arguments to :func:`pygame.image.fromstring()`, but is unable to vertically flip the source data. This will run much faster than :func:`pygame.image.fromstring`, since no pixel data must be allocated and copied. It accepts the following 'format' arguments: * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``BGR``, 24-bit image, red and blue channels swapped. * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped .. versionadded:: 2.1.3 BGRA format .. ## pygame.image.frombuffer ## .. function:: load_basic | :sl:`load new BMP image from a file (or file-like object)` | :sg:`load_basic(file) -> Surface` Load an image from a file source. You can pass either a filename or a Python file-like object, or a pathlib.Path. This function only supports loading "basic" image format, ie ``BMP`` format. This function is always available, no matter how pygame was built. .. ## pygame.image.load_basic ## .. function:: load_extended | :sl:`load an image from a file (or file-like object)` | :sg:`load_extended(filename) -> Surface` | :sg:`load_extended(fileobj, namehint="") -> Surface` This function is similar to :func:`pygame.image.load()`, except that this function can only be used if pygame was built with extended image format support. .. versionchanged:: 2.0.1 This function is always available, but raises an ``NotImplementedError`` if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support. .. ## pygame.image.load_extended ## .. function:: save_extended | :sl:`save a png/jpg image to file (or file-like object)` | :sg:`save_extended(Surface, filename) -> None` | :sg:`save_extended(Surface, fileobj, namehint="") -> None` This will save your Surface as either a ``PNG`` or ``JPEG`` image. In case the image is being saved to a file-like object, this function uses the namehint argument to determine the format of the file being saved. Saves to ``JPEG`` in case the namehint was not specified while saving to a file-like object. .. versionchanged:: 2.0.1 This function is always available, but raises an ``NotImplementedError`` if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support. .. ## pygame.image.save_extended ## .. ## pygame.image ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/joystick.rst0000644000175100001770000004567514676242340017412 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.joystick` ====================== .. module:: pygame.joystick :synopsis: Pygame module for interacting with joysticks, gamepads, and trackballs. | :sl:`Pygame module for interacting with joysticks, gamepads, and trackballs.` The joystick module manages the joystick devices on a computer. Joystick devices include trackballs and video-game-style gamepads, and the module allows the use of multiple buttons and "hats". Computers may manage multiple joysticks at a time. Each instance of the Joystick class represents one gaming device plugged into the computer. If a gaming pad has multiple joysticks on it, then the joystick object can actually represent multiple joysticks on that single game device. For a quick way to initialise the joystick module and get a list of Joystick instances use the following code:: pygame.joystick.init() joysticks = [pygame.joystick.Joystick(x) for x in range(pygame.joystick.get_count())] The following event types will be generated by the joysticks :: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION And in pygame 2, which supports hotplugging:: JOYDEVICEADDED JOYDEVICEREMOVED Note that in pygame 2, joysticks events use a unique "instance ID". The device index passed in the constructor to a Joystick object is not unique after devices have been added and removed. You must call :meth:`Joystick.get_instance_id()` to find the instance ID that was assigned to a Joystick on opening. The event queue needs to be pumped frequently for some of the methods to work. So call one of pygame.event.get, pygame.event.wait, or pygame.event.pump regularly. To be able to get joystick events and update the joystick objects while the window is not in focus, you may set the ``SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS`` environment variable. See :ref:`environment variables ` for more details. .. function:: init | :sl:`Initialize the joystick module.` | :sg:`init() -> None` This function is called automatically by ``pygame.init()``. It initializes the joystick module. The module must be initialized before any other functions will work. It is safe to call this function more than once. .. ## pygame.joystick.init ## .. function:: quit | :sl:`Uninitialize the joystick module.` | :sg:`quit() -> None` Uninitialize the joystick module. After you call this any existing joystick objects will no longer work. It is safe to call this function more than once. .. ## pygame.joystick.quit ## .. function:: get_init | :sl:`Returns True if the joystick module is initialized.` | :sg:`get_init() -> bool` Test if the ``pygame.joystick.init()`` function has been called. .. ## pygame.joystick.get_init ## .. function:: get_count | :sl:`Returns the number of joysticks.` | :sg:`get_count() -> count` Return the number of joystick devices on the system. The count will be ``0`` if there are no joysticks on the system. When you create Joystick objects using ``Joystick(id)``, you pass an integer that must be lower than this count. .. ## pygame.joystick.get_count ## .. class:: Joystick | :sl:`Create a new Joystick object.` | :sg:`Joystick(id) -> Joystick` Create a new joystick to access a physical device. The id argument must be a value from ``0`` to ``pygame.joystick.get_count() - 1``. Joysticks are initialised on creation and are shut down when deallocated. Once the device is initialized the pygame event queue will start receiving events about its input. .. versionchanged:: 2.0.0 Joystick objects are now opened immediately on creation. .. method:: init | :sl:`initialize the Joystick` | :sg:`init() -> None` Initialize the joystick, if it has been closed. It is safe to call this even if the joystick is already initialized. .. deprecated:: 2.0.0 In future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1. .. ## Joystick.init ## .. method:: quit | :sl:`uninitialize the Joystick` | :sg:`quit() -> None` Close a Joystick object. After this the pygame event queue will no longer receive events from the device. It is safe to call this more than once. .. ## Joystick.quit ## .. method:: get_init | :sl:`check if the Joystick is initialized` | :sg:`get_init() -> bool` Return True if the Joystick object is currently initialised. .. ## Joystick.get_init ## .. method:: get_id | :sl:`get the device index (deprecated)` | :sg:`get_id() -> int` Returns the original device index for this device. This is the same value that was passed to the ``Joystick()`` constructor. This method can safely be called while the Joystick is not initialized. .. deprecated:: 2.0.0 The original device index is not useful in pygame 2. Use :meth:`.get_instance_id` instead. Will be removed in Pygame 2.1. .. method:: get_instance_id() -> int | :sl:`get the joystick instance id` | :sg:`get_instance_id() -> int` Get the joystick instance ID. This matches the ``instance_id`` field that is given in joystick events. .. versionadded:: 2.0.0dev11 .. method:: get_guid() -> str | :sl:`get the joystick GUID` | :sg:`get_guid() -> str` Get the GUID string. This identifies the exact hardware of the joystick device. .. versionadded:: 2.0.0dev11 .. method:: get_power_level() -> str | :sl:`get the approximate power status of the device` | :sg:`get_power_level() -> str` Get a string giving the power status of the device. One of: ``empty``, ``low``, ``medium``, ``full``, ``wired``, ``max``, or ``unknown``. .. versionadded:: 2.0.0dev11 .. ## Joystick.get_id ## .. method:: get_name | :sl:`get the Joystick system name` | :sg:`get_name() -> string` Returns the system name for this joystick device. It is unknown what name the system will give to the Joystick, but it should be a unique name that identifies the device. This method can safely be called while the Joystick is not initialized. .. ## Joystick.get_name ## .. method:: get_numaxes | :sl:`get the number of axes on a Joystick` | :sg:`get_numaxes() -> int` Returns the number of input axes are on a Joystick. There will usually be two for the position. Controls like rudders and throttles are treated as additional axes. The ``pygame.JOYAXISMOTION`` events will be in the range from ``-1.0`` to ``1.0``. A value of ``0.0`` means the axis is centered. Gamepad devices will usually be ``-1``, ``0``, or ``1`` with no values in between. Older analog joystick axes will not always use the full ``-1`` to ``1`` range, and the centered value will be some area around ``0``. Analog joysticks usually have a bit of noise in their axis, which will generate a lot of rapid small motion events. .. ## Joystick.get_numaxes ## .. method:: get_axis | :sl:`get the current position of an axis` | :sg:`get_axis(axis_number) -> float` Returns the current position of a joystick axis. The value will range from ``-1`` to ``1`` with a value of ``0`` being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at ``0`` or using the full range of position values. The axis number must be an integer from ``0`` to ``get_numaxes() - 1``. When using gamepads both the control sticks and the analog triggers are usually reported as axes. .. ## Joystick.get_axis ## .. method:: get_numballs | :sl:`get the number of trackballs on a Joystick` | :sg:`get_numballs() -> int` Returns the number of trackball devices on a Joystick. These devices work similar to a mouse but they have no absolute position; they only have relative amounts of movement. The ``pygame.JOYBALLMOTION`` event will be sent when the trackball is rolled. It will report the amount of movement on the trackball. .. ## Joystick.get_numballs ## .. method:: get_ball | :sl:`get the relative position of a trackball` | :sg:`get_ball(ball_number) -> x, y` Returns the relative movement of a joystick button. The value is a ``x, y`` pair holding the relative movement since the last call to get_ball. The ball number must be an integer from ``0`` to ``get_numballs() - 1``. .. ## Joystick.get_ball ## .. method:: get_numbuttons | :sl:`get the number of buttons on a Joystick` | :sg:`get_numbuttons() -> int` Returns the number of pushable buttons on the joystick. These buttons have a boolean (on or off) state. Buttons generate a ``pygame.JOYBUTTONDOWN`` and ``pygame.JOYBUTTONUP`` event when they are pressed and released. .. ## Joystick.get_numbuttons ## .. method:: get_button | :sl:`get the current button state` | :sg:`get_button(button) -> bool` Returns the current state of a joystick button. .. ## Joystick.get_button ## .. method:: get_numhats | :sl:`get the number of hat controls on a Joystick` | :sg:`get_numhats() -> int` Returns the number of joystick hats on a Joystick. Hat devices are like miniature digital joysticks on a joystick. Each hat has two axes of input. The ``pygame.JOYHATMOTION`` event is generated when the hat changes position. The ``position`` attribute for the event contains a pair of values that are either ``-1``, ``0``, or ``1``. A position of ``(0, 0)`` means the hat is centered. .. ## Joystick.get_numhats ## .. method:: get_hat | :sl:`get the position of a joystick hat` | :sg:`get_hat(hat_number) -> x, y` Returns the current position of a position hat. The position is given as two values representing the ``x`` and ``y`` position for the hat. ``(0, 0)`` means centered. A value of ``-1`` means left/down and a value of ``1`` means right/up: so ``(-1, 0)`` means left; ``(1, 0)`` means right; ``(0, 1)`` means up; ``(1, 1)`` means upper-right; etc. This value is digital, ``i.e.``, each coordinate can be ``-1``, ``0`` or ``1`` but never in-between. The hat number must be between ``0`` and ``get_numhats() - 1``. .. ## Joystick.get_hat ## .. method:: rumble | :sl:`Start a rumbling effect` | :sg:`rumble(low_frequency, high_frequency, duration) -> bool` Start a rumble effect on the joystick, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Joystick.stop_rumble` is called. If an effect is already playing, then it will be overwritten. Returns True if the rumble was played successfully or False if the joystick does not support it or :meth:`pygame.version.SDL` is below 2.0.9. .. versionadded:: 2.0.2 .. ## Joystick.rumble ## .. method:: stop_rumble | :sl:`Stop any rumble effect playing` | :sg:`stop_rumble() -> None` Stops any rumble effect playing on the joystick. See :meth:`Joystick.rumble` for more information. .. versionadded:: 2.0.2 .. ## Joystick.stop_rumble ## .. ## pygame.joystick.Joystick ## .. ## pygame.joystick ## .. figure:: code_examples/joystick_calls.png :scale: 100 % :alt: joystick module example Example code for joystick module. .. literalinclude:: ../../../examples/joystick.py .. _controller-mappings: Common Controller Axis Mappings =============================== Controller mappings are drawn from the underlying SDL library which pygame uses and they differ between pygame 1 and pygame 2. Below are a couple of mappings for three popular controllers. Axis and hat mappings are listed from -1 to +1. Nintendo Switch Left Joy-Con (pygame 2.x) ***************************************** The Nintendo Switch Left Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad" * **Buttons**:: D-pad Up - Button 0 D-pad Down - Button 1 D-pad Left - Button 2 D-pad Right - Button 3 SL - Button 4 SR - Button 5 - - Button 8 Stick In - Button 10 Capture - Button 13 L - Button 14 ZL - Button 15 * **Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis Nintendo Switch Right Joy-Con (pygame 2.x) ****************************************** The Nintendo Switch Right Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad" * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 SL - Button 4 SR - Button 5 + - Button 9 Stick In - Button 11 Home - Button 12 R - Button 14 ZR - Button 15 * **Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis Nintendo Switch Pro Controller (pygame 2.x) ******************************************* The Nintendo Switch Pro Controller has 6 axes, 16 buttons, and 0 hats. The controller is recognized as "Nintendo Switch Pro Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 4 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 - Button - Button 4 Home Button - Button 5 + Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Capture Button - Button 15 XBox 360 Controller (pygame 2.x) ******************************** The Xbox 360 controller mapping has 6 axes, 11 buttons and 1 hat. The controller is recognized as "Xbox 360 Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 * **Left Trigger**:: Out -> In - Axis 2 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 Guide Button - Button 10 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis Playstation 4 Controller (pygame 2.x) ************************************* The PlayStation 4 controller mapping has 6 axes and 16 buttons. The controller is recognized as "PS4 Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 4 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Share Button - Button 4 PS Button - Button 5 Options Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Touch Pad Click - Button 15 Playstation 5 Controller (pygame 2.x) ************************************* The PlayStation 5 controller mapping has 6 axes, 13 buttons, and 1 hat. The controller is recognized as "Sony Interactive Entertainment Wireless Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 * **Left Trigger**:: Out -> In - Axis 2 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Left Trigger - Button 6 Right Trigger - Button 7 Share Button - Button 8 Options Button - Button 9 PS Button - Button 10 Left Stick in - Button 11 Right Stick in - Button 12 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis XBox 360 Controller (pygame 1.x) ******************************** The Xbox 360 controller mapping has 5 axes, 10 buttons, and 1 hat. The controller is recognized as "Controller (XBOX 360 For Windows)". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 4 Up -> Down - Axis 3 * **Left Trigger & Right Trigger**:: RT -> LT - Axis 2 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis Playstation 4 Controller (pygame 1.x) ************************************* The PlayStation 4 controller mapping has 6 axes, 14 buttons, and 1 hat. The controller is recognized as "Wireless Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 5 * **Right Trigger**:: Out -> In - Axis 4 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 L. Trigger(Full)- Button 6 R. Trigger(Full)- Button 7 Share Button - Button 8 Options Button - Button 9 L. Stick In - Button 10 R. Stick In - Button 11 PS Button - Button 12 Touch Pad Click - Button 13 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/key.rst0000644000175100001770000003770714676242340016340 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.key` ================= .. module:: pygame.key :synopsis: pygame module to work with the keyboard | :sl:`pygame module to work with the keyboard` This module contains functions for dealing with the keyboard. The :mod:`pygame.event` queue gets ``pygame.KEYDOWN`` and ``pygame.KEYUP`` events when the keyboard buttons are pressed and released. Both events have ``key`` and ``mod`` attributes. * ``key``: an :ref:`integer ID ` representing every key on the keyboard * ``mod``: a bitmask of all the :ref:`modifier keys ` that were in a pressed state when the event occurred The ``pygame.KEYDOWN`` event has the additional attributes ``unicode`` and ``scancode``. * ``unicode``: a single character string that is the fully translated character entered, this takes into account the shift and composition keys * ``scancode``: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys .. versionadded:: 2.0.0 The ``pygame.TEXTINPUT`` event is preferred to the ``unicode`` attribute of ``pygame.KEYDOWN``. The attribute ``text`` contains the input. .. _key-constants-label: The following is a list of all the constants (from :mod:`pygame.locals`) used to represent keyboard keys. Portability note: The integers for key constants differ between pygame 1 and 2. Always use key constants (``K_a``) rather than integers directly (``97``) so that your key handling code works well on both pygame 1 and pygame 2. :: pygame Constant ASCII Description --------------------------------- K_BACKSPACE \b backspace K_TAB \t tab K_CLEAR clear K_RETURN \r return K_PAUSE pause K_ESCAPE ^[ escape K_SPACE space K_EXCLAIM ! exclaim K_QUOTEDBL " quotedbl K_HASH # hash K_DOLLAR $ dollar K_AMPERSAND & ampersand K_QUOTE quote K_LEFTPAREN ( left parenthesis K_RIGHTPAREN ) right parenthesis K_ASTERISK * asterisk K_PLUS + plus sign K_COMMA , comma K_MINUS - minus sign K_PERIOD . period K_SLASH / forward slash K_0 0 0 K_1 1 1 K_2 2 2 K_3 3 3 K_4 4 4 K_5 5 5 K_6 6 6 K_7 7 7 K_8 8 8 K_9 9 9 K_COLON : colon K_SEMICOLON ; semicolon K_LESS < less-than sign K_EQUALS = equals sign K_GREATER > greater-than sign K_QUESTION ? question mark K_AT @ at K_LEFTBRACKET [ left bracket K_BACKSLASH \ backslash K_RIGHTBRACKET ] right bracket K_CARET ^ caret K_UNDERSCORE _ underscore K_BACKQUOTE ` grave K_a a a K_b b b K_c c c K_d d d K_e e e K_f f f K_g g g K_h h h K_i i i K_j j j K_k k k K_l l l K_m m m K_n n n K_o o o K_p p p K_q q q K_r r r K_s s s K_t t t K_u u u K_v v v K_w w w K_x x x K_y y y K_z z z K_DELETE delete K_KP0 keypad 0 K_KP1 keypad 1 K_KP2 keypad 2 K_KP3 keypad 3 K_KP4 keypad 4 K_KP5 keypad 5 K_KP6 keypad 6 K_KP7 keypad 7 K_KP8 keypad 8 K_KP9 keypad 9 K_KP_PERIOD . keypad period K_KP_DIVIDE / keypad divide K_KP_MULTIPLY * keypad multiply K_KP_MINUS - keypad minus K_KP_PLUS + keypad plus K_KP_ENTER \r keypad enter K_KP_EQUALS = keypad equals K_UP up arrow K_DOWN down arrow K_RIGHT right arrow K_LEFT left arrow K_INSERT insert K_HOME home K_END end K_PAGEUP page up K_PAGEDOWN page down K_F1 F1 K_F2 F2 K_F3 F3 K_F4 F4 K_F5 F5 K_F6 F6 K_F7 F7 K_F8 F8 K_F9 F9 K_F10 F10 K_F11 F11 K_F12 F12 K_F13 F13 K_F14 F14 K_F15 F15 K_NUMLOCK numlock K_CAPSLOCK capslock K_SCROLLOCK scrollock K_RSHIFT right shift K_LSHIFT left shift K_RCTRL right control K_LCTRL left control K_RALT right alt K_LALT left alt K_RMETA right meta K_LMETA left meta K_LSUPER left Windows key K_RSUPER right Windows key K_MODE mode shift K_HELP help K_PRINT print screen K_SYSREQ sysrq K_BREAK break K_MENU menu K_POWER power K_EURO Euro K_AC_BACK Android back button .. _key-modifiers-label: The keyboard also has a list of modifier states (from :mod:`pygame.locals`) that can be assembled by bitwise-ORing them together. :: pygame Constant Description ------------------------- KMOD_NONE no modifier keys pressed KMOD_LSHIFT left shift KMOD_RSHIFT right shift KMOD_SHIFT left shift or right shift or both KMOD_LCTRL left control KMOD_RCTRL right control KMOD_CTRL left control or right control or both KMOD_LALT left alt KMOD_RALT right alt KMOD_ALT left alt or right alt or both KMOD_LMETA left meta KMOD_RMETA right meta KMOD_META left meta or right meta or both KMOD_CAPS caps lock KMOD_NUM num lock KMOD_MODE AltGr The modifier information is contained in the ``mod`` attribute of the ``pygame.KEYDOWN`` and ``pygame.KEYUP`` events. The ``mod`` attribute is a bitmask of all the modifier keys that were in a pressed state when the event occurred. The modifier information can be decoded using a bitwise AND (except for ``KMOD_NONE``, which should be compared using equals ``==``). For example: :: for event in pygame.event.get(): if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP: if event.mod == pygame.KMOD_NONE: print('No modifier keys were in a pressed state when this ' 'event occurred.') else: if event.mod & pygame.KMOD_LSHIFT: print('Left shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_RSHIFT: print('Right shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_SHIFT: print('Left shift or right shift or both were in a ' 'pressed state when this event occurred.') .. function:: get_focused | :sl:`true if the display is receiving keyboard input from the system` | :sg:`get_focused() -> bool` Returns ``True`` when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use :func:`pygame.event.set_grab()` to grab all input. .. ## pygame.key.get_focused ## .. function:: get_pressed | :sl:`get the state of all keyboard buttons` | :sg:`get_pressed() -> bools` Returns a sequence of boolean values representing the state of every key on the keyboard. Use the key constant values to index the array. A ``True`` value means that the button is pressed. .. note:: Getting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to ``pygame.key.get_pressed()``. There is also no way to translate these pushed keys into a fully translated character value. See the ``pygame.KEYDOWN`` events on the :mod:`pygame.event` queue for this functionality. .. versionadded:: 2.2.0 The collection of bools returned by ``get_pressed`` can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes. .. versionadded:: 2.5.0 Iteration over the collection of bools returned by ``get_pressed`` is now restored. However it still does not make sense to iterate over it. Currently. .. ## pygame.key.get_pressed ## .. function:: get_mods | :sl:`determine which modifier keys are being held` | :sg:`get_mods() -> int` Returns a single integer representing a bitmask of all the modifier keys being held. Using bitwise operators you can test if specific :ref:`modifier keys ` are pressed. .. ## pygame.key.get_mods ## .. function:: set_mods | :sl:`temporarily set which modifier keys are pressed` | :sg:`set_mods(int) -> None` Create a bitmask of the :ref:`modifier key constants ` you want to impose on your program. .. ## pygame.key.set_mods ## .. function:: set_repeat | :sl:`control how held keys are repeated` | :sg:`set_repeat() -> None` | :sg:`set_repeat(delay) -> None` | :sg:`set_repeat(delay, interval) -> None` When the keyboard repeat is enabled, keys that are held down will generate multiple ``pygame.KEYDOWN`` events. The ``delay`` parameter is the number of milliseconds before the first repeated ``pygame.KEYDOWN`` event will be sent. After that, another ``pygame.KEYDOWN`` event will be sent every ``interval`` milliseconds. If a ``delay`` value is provided and an ``interval`` value is not provided or is 0, then the ``interval`` will be set to the same value as ``delay``. To disable key repeat call this function with no arguments or with ``delay`` set to 0. When pygame is initialized the key repeat is disabled. :raises ValueError: if ``delay`` or ``interval`` is < 0 .. versionchanged:: 2.0.0 A ``ValueError`` is now raised (instead of a ``pygame.error``) if ``delay`` or ``interval`` is < 0. .. ## pygame.key.set_repeat ## .. function:: get_repeat | :sl:`see how held keys are repeated` | :sg:`get_repeat() -> (delay, interval)` Get the ``delay`` and ``interval`` keyboard repeat values. Refer to :func:`pygame.key.set_repeat()` for a description of these values. .. versionadded:: 1.8 .. ## pygame.key.get_repeat ## .. function:: name | :sl:`get the name of a key identifier` | :sg:`name(key, use_compat=True) -> str` Get the descriptive name of the button from a keyboard button id constant. Returns an empty string (``""``) if the key is not found. If ``use_compat`` argument is ``True`` (which is the default), this function returns the legacy name of a key where applicable. The return value is expected to be the same across different pygame versions (provided the corresponding key constant exists and is unique). If the return value is passed to the ``key_code`` function, the original constant will be returned. **Experimental:** ``use_compat`` parameter still in development for testing and feedback. It may change. `Please leave use_compat feedback with authors `_ If this argument is ``False``, the returned name may be prettier to display and may cover a wider range of keys than with ``use_compat``, but there are no guarantees that this name will be the same across different pygame versions. If the name returned is passed to the ``key_code`` function, the original constant is returned back (this is an implementation detail which may change later, do not rely on this) .. versionchanged:: 2.1.3 Added ``use_compat`` argument and guaranteed API stability for it .. ## pygame.key.name ## .. function:: key_code | :sl:`get the key identifier from a key name` | :sg:`key_code(name=string) -> int` Get the key identifier code from the descriptive name of the key. This returns an integer matching one of the K_* keycodes. For example: :: >>> pygame.key.key_code("return") == pygame.K_RETURN True >>> pygame.key.key_code("0") == pygame.K_0 True >>> pygame.key.key_code("space") == pygame.K_SPACE True :raises ValueError: if the key name is not known. .. versionadded:: 2.0.0 .. ## pygame.key.key_code ## .. function:: start_text_input | :sl:`start handling Unicode text input events` | :sg:`start_text_input() -> None` Start receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If applicable, show the on-screen keyboard or IME editor. For many languages, key presses will automatically generate a corresponding ``pygame.TEXTINPUT`` event. Special keys like escape or function keys, and certain key combinations will not generate ``pygame.TEXTINPUT`` events. In other languages, entering a single symbol may require multiple key presses, or a language-specific user interface. In this case, ``pygame.TEXTINPUT`` events are preferable to ``pygame.KEYDOWN`` events for text input. A ``pygame.TEXTEDITING`` event is received when an IME composition is started or changed. It contains the composition ``text``, ``length``, and editing ``start`` position within the composition (attributes ``text``, ``length``, and ``start``, respectively). When the composition is committed (or non-IME input is received), a ``pygame.TEXTINPUT`` event is generated. Text input events handling is on by default. .. versionadded:: 2.0.0 .. ## pygame.key.start_text_input ## .. function:: stop_text_input | :sl:`stop handling Unicode text input events` | :sg:`stop_text_input() -> None` Stop receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If an on-screen keyboard or IME editor was shown with ``pygame.key.start_text_input()``, hide it again. Text input events handling is on by default. To avoid triggering the IME editor or the on-screen keyboard when the user is holding down a key during gameplay, text input should be disabled once text entry is finished, or when the user clicks outside of a text box. .. versionadded:: 2.0.0 .. ## pygame.key.stop_text_input ## .. function:: set_text_input_rect | :sl:`controls the position of the candidate list` | :sg:`set_text_input_rect(Rect) -> None` This sets the rectangle used for typing with an IME. It controls where the candidate list will open, if supported. .. versionadded:: 2.0.0 .. ## pygame.key.set_text_input_rect ## .. ## pygame.key ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/locals.rst0000644000175100001770000000177614676242340017022 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.locals` ==================== .. module:: pygame.locals :synopsis: pygame constants | :sl:`pygame constants` This module contains various constants used by pygame. Its contents are automatically placed in the pygame module namespace. However, an application can use ``pygame.locals`` to include only the pygame constants with a ``from pygame.locals import *``. Detailed descriptions of the various constants can be found throughout the pygame documentation. Here are the locations of some of them. - The :mod:`pygame.display` module contains flags like ``FULLSCREEN`` used by :func:`pygame.display.set_mode`. - The :mod:`pygame.event` module contains the various event types. - The :mod:`pygame.key` module lists the keyboard constants and modifiers (``K_``\* and ``MOD_``\*) relating to the ``key`` and ``mod`` attributes of the ``KEYDOWN`` and ``KEYUP`` events. - The :mod:`pygame.time` module defines ``TIMER_RESOLUTION``. .. ## pygame.locals ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/mask.rst0000644000175100001770000005723414676242340016500 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mask` ================== .. module:: pygame.mask :synopsis: pygame module for image masks. | :sl:`pygame module for image masks.` Useful for fast pixel perfect collision detection. A mask uses 1 bit per-pixel to store which parts collide. .. versionadded:: 1.8 .. versionchanged:: 2.0.2 Mask functions now support keyword arguments. .. versionchanged:: 2.0.2 Mask functions that take positions or offsets now support :class:`pygame.math.Vector2` arguments. .. function:: from_surface | :sl:`Creates a Mask from the given surface` | :sg:`from_surface(surface) -> Mask` | :sg:`from_surface(surface, threshold=127) -> Mask` Creates a :class:`Mask` object from the given surface by setting all the opaque pixels and not setting the transparent pixels. If the surface uses a color-key, then it is used to decide which bits in the resulting mask are set. All the pixels that are **not** equal to the color-key are **set** and the pixels equal to the color-key are not set. If a color-key is not used, then the alpha value of each pixel is used to decide which bits in the resulting mask are set. All the pixels that have an alpha value **greater than** the ``threshold`` parameter are **set** and the pixels with an alpha value less than or equal to the ``threshold`` are not set. :param Surface surface: the surface to create the mask from :param int threshold: (optional) the alpha threshold (default is 127) to compare with each surface pixel's alpha value, if the ``surface`` is color-keyed this parameter is ignored :returns: a newly created :class:`Mask` object from the given surface :rtype: Mask .. note:: This function is used to create the masks for :func:`pygame.sprite.collide_mask`. .. ## pygame.mask.from_surface ## .. function:: from_threshold | :sl:`Creates a mask by thresholding Surfaces` | :sg:`from_threshold(surface, color) -> Mask` | :sg:`from_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask` This is a more featureful method of getting a :class:`Mask` from a surface. If the optional ``othersurface`` is not used, all the pixels **within** the ``threshold`` of the ``color`` parameter are **set** in the resulting mask. If the optional ``othersurface`` is used, every pixel in the first surface that is **within** the ``threshold`` of the corresponding pixel in ``othersurface`` is **set** in the resulting mask. :param Surface surface: the surface to create the mask from :param color: color used to check if the surface's pixels are within the given ``threshold`` range, this parameter is ignored if the optional ``othersurface`` parameter is supplied :type color: Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]] :param threshold: (optional) the threshold range used to check the difference between two colors (default is ``(0, 0, 0, 255)``) :type threshold: Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]] :param Surface othersurface: (optional) used to check whether the pixels of the first surface are within the given ``threshold`` range of the pixels from this surface (default is ``None``) :param int palette_colors: (optional) indicates whether to use the palette colors or not, a nonzero value causes the palette colors to be used and a 0 causes them not to be used (default is 1) :returns: a newly created :class:`Mask` object from the given surface :rtype: Mask .. ## pygame.mask.from_threshold ## .. class:: Mask | :sl:`pygame object for representing 2D bitmasks` | :sg:`Mask(size=(width, height)) -> Mask` | :sg:`Mask(size=(width, height), fill=False) -> Mask` A ``Mask`` object is used to represent a 2D bitmask. Each bit in the mask represents a pixel. 1 is used to indicate a set bit and 0 is used to indicate an unset bit. Set bits in a mask can be used to detect collisions with other masks and their set bits. A filled mask has all of its bits set to 1, conversely an unfilled/cleared/empty mask has all of its bits set to 0. Masks can be created unfilled (default) or filled by using the ``fill`` parameter. Masks can also be cleared or filled using the :func:`pygame.mask.Mask.clear()` and :func:`pygame.mask.Mask.fill()` methods respectively. A mask's coordinates start in the top left corner at ``(0, 0)`` just like :mod:`pygame.Surface`. Individual bits can be accessed using the :func:`pygame.mask.Mask.get_at()` and :func:`pygame.mask.Mask.set_at()` methods. .. _mask-offset-label: The methods :meth:`overlap`, :meth:`overlap_area`, :meth:`overlap_mask`, :meth:`draw`, :meth:`erase`, and :meth:`convolve` use an offset parameter to indicate the offset of another mask's top left corner from the calling mask's top left corner. The calling mask's top left corner is considered to be the origin ``(0, 0)``. Offsets are a sequence of two values ``(x_offset, y_offset)``. Positive and negative offset values are supported. :: 0 to x (x_offset) : : 0 ..... +----:---------+ to | : | y .......... +-----------+ (y_offset) | | othermask | | +-----------+ | calling_mask | +--------------+ :param size: the dimensions of the mask (width and height) :param bool fill: (optional) create an unfilled mask (default: ``False``) or filled mask (``True``) :returns: a newly created :class:`Mask` object :rtype: Mask .. versionchanged:: 2.0.0 Shallow copy support added. The :class:`Mask` class supports the special method ``__copy__()`` and shallow copying via ``copy.copy(mask)``. .. versionchanged:: 2.0.0 Subclassing support added. The :class:`Mask` class can be used as a base class. .. versionchanged:: 1.9.5 Added support for keyword arguments. .. versionchanged:: 1.9.5 Added the optional keyword parameter ``fill``. .. versionchanged:: 1.9.5 Added support for masks with a width and/or a height of 0. .. method:: copy | :sl:`Returns a new copy of the mask` | :sg:`copy() -> Mask` :returns: a new copy of this mask, the new mask will have the same width, height, and set/unset bits as the original :rtype: Mask .. note:: If a mask subclass needs to copy any instance specific attributes then it should override the ``__copy__()`` method. The overridden ``__copy__()`` method needs to call ``super().__copy__()`` and then copy the required data as in the following example code. :: class SubMask(pygame.mask.Mask): def __copy__(self): new_mask = super().__copy__() # Do any SubMask attribute copying here. return new_mask .. versionadded:: 2.0.0 .. ## Mask.copy ## .. method:: get_size | :sl:`Returns the size of the mask` | :sg:`get_size() -> (width, height)` :returns: the size of the mask, (width, height) :rtype: tuple(int, int) .. ## Mask.get_size ## .. method:: get_rect | :sl:`Returns a Rect based on the size of the mask` | :sg:`get_rect(\**kwargs) -> Rect` Returns a new :func:`pygame.Rect` object based on the size of this mask. The rect's default position will be ``(0, 0)`` and its default width and height will be the same as this mask's. The rect's attributes can be altered via :func:`pygame.Rect` attribute keyword arguments/values passed into this method. As an example, ``a_mask.get_rect(center=(10, 5))`` would create a :func:`pygame.Rect` based on the mask's size centered at the given position. :param dict kwargs: :func:`pygame.Rect` attribute keyword arguments/values that will be applied to the rect :returns: a new :func:`pygame.Rect` object based on the size of this mask with any :func:`pygame.Rect` attribute keyword arguments/values applied to it :rtype: Rect .. versionadded:: 2.0.0 .. ## Mask.get_rect ## .. method:: get_at | :sl:`Gets the bit at the given position` | :sg:`get_at(pos) -> int` :param pos: the position of the bit to get (x, y) :returns: 1 if the bit is set, 0 if the bit is not set :rtype: int :raises IndexError: if the position is outside of the mask's bounds .. ## Mask.get_at ## .. method:: set_at | :sl:`Sets the bit at the given position` | :sg:`set_at(pos) -> None` | :sg:`set_at(pos, value=1) -> None` :param pos: the position of the bit to set (x, y) :param int value: any nonzero int will set the bit to 1, 0 will set the bit to 0 (default is 1) :returns: ``None`` :rtype: NoneType :raises IndexError: if the position is outside of the mask's bounds .. ## Mask.set_at ## .. method:: overlap | :sl:`Returns the point of intersection` | :sg:`overlap(other, offset) -> (x, y)` | :sg:`overlap(other, offset) -> None` Returns the first point of intersection encountered between this mask and ``other``. A point of intersection is 2 overlapping set bits. The current algorithm searches the overlapping area in ``sizeof(unsigned long int) * CHAR_BIT`` bit wide column blocks (the value of ``sizeof(unsigned long int) * CHAR_BIT`` is platform dependent, for clarity it will be referred to as ``W``). Starting at the top left corner it checks bits 0 to ``W - 1`` of the first row (``(0, 0)`` to ``(W - 1, 0)``) then continues to the next row (``(0, 1)`` to ``(W - 1, 1)``). Once this entire column block is checked, it continues to the next one (``W`` to ``2 * W - 1``). This is repeated until it finds a point of intersection or the entire overlapping area is checked. :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: point of intersection or ``None`` if no intersection :rtype: tuple(int, int) or NoneType .. ## Mask.overlap ## .. method:: overlap_area | :sl:`Returns the number of overlapping set bits` | :sg:`overlap_area(other, offset) -> numbits` Returns the number of overlapping set bits between between this mask and ``other``. This can be useful for collision detection. An approximate collision normal can be found by calculating the gradient of the overlapping area through the finite difference. :: dx = mask.overlap_area(other, (x + 1, y)) - mask.overlap_area(other, (x - 1, y)) dy = mask.overlap_area(other, (x, y + 1)) - mask.overlap_area(other, (x, y - 1)) :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: the number of overlapping set bits :rtype: int .. ## Mask.overlap_area ## .. method:: overlap_mask | :sl:`Returns a mask of the overlapping set bits` | :sg:`overlap_mask(other, offset) -> Mask` Returns a :class:`Mask`, the same size as this mask, containing the overlapping set bits between this mask and ``other``. :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: a newly created :class:`Mask` with the overlapping bits set :rtype: Mask .. ## Mask.overlap_mask ## .. method:: fill | :sl:`Sets all bits to 1` | :sg:`fill() -> None` Sets all bits in the mask to 1. :returns: ``None`` :rtype: NoneType .. ## Mask.fill ## .. method:: clear | :sl:`Sets all bits to 0` | :sg:`clear() -> None` Sets all bits in the mask to 0. :returns: ``None`` :rtype: NoneType .. ## Mask.clear ## .. method:: invert | :sl:`Flips all the bits` | :sg:`invert() -> None` Flips all of the bits in the mask. All the set bits are cleared to 0 and all the unset bits are set to 1. :returns: ``None`` :rtype: NoneType .. ## Mask.invert ## .. method:: scale | :sl:`Resizes a mask` | :sg:`scale((width, height)) -> Mask` Creates a new :class:`Mask` of the requested size with its bits scaled from this mask. :param size: the width and height (size) of the mask to create :returns: a new :class:`Mask` object with its bits scaled from this mask :rtype: Mask :raises ValueError: if ``width < 0`` or ``height < 0`` .. ## Mask.scale ## .. method:: draw | :sl:`Draws a mask onto another` | :sg:`draw(other, offset) -> None` Performs a bitwise OR, drawing ``othermask`` onto this mask. :param Mask other: the mask to draw onto this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: ``None`` :rtype: NoneType .. ## Mask.draw ## .. method:: erase | :sl:`Erases a mask from another` | :sg:`erase(other, offset) -> None` Erases (clears) all bits set in ``other`` from this mask. :param Mask other: the mask to erase from this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: ``None`` :rtype: NoneType .. ## Mask.erase ## .. method:: count | :sl:`Returns the number of set bits` | :sg:`count() -> bits` :returns: the number of set bits in the mask :rtype: int .. ## Mask.count ## .. method:: centroid | :sl:`Returns the centroid of the set bits` | :sg:`centroid() -> (x, y)` Finds the centroid (the center mass of the set bits) for this mask. :returns: a coordinate tuple indicating the centroid of the mask, it will return ``(0, 0)`` if the mask has no bits set :rtype: tuple(int, int) .. ## Mask.centroid ## .. method:: angle | :sl:`Returns the orientation of the set bits` | :sg:`angle() -> theta` Finds the approximate orientation (from -90 to 90 degrees) of the set bits in the mask. This works best if performed on a mask with only one connected component. :returns: the orientation of the set bits in the mask, it will return ``0.0`` if the mask has no bits set :rtype: float .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.angle ## .. method:: outline | :sl:`Returns a list of points outlining an object` | :sg:`outline() -> [(x, y), ...]` | :sg:`outline(every=1) -> [(x, y), ...]` Returns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner. The ``every`` optional parameter skips set bits in the outline. For example, setting it to 10 would return a list of every 10th set bit in the outline. :param int every: (optional) indicates the number of bits to skip over in the outline (default is 1) :returns: a list of points outlining the first connected component encountered, an empty list is returned if the mask has no bits set :rtype: list[tuple(int, int)] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.outline ## .. method:: convolve | :sl:`Returns the convolution of this mask with another mask` | :sg:`convolve(other) -> Mask` | :sg:`convolve(other, output=None, offset=(0, 0)) -> Mask` Convolve this mask with the given ``other`` Mask. :param Mask other: mask to convolve this mask with :param output: (optional) mask for output (default is ``None``) :type output: Mask or NoneType :param offset: the offset of ``other`` from this mask, (default is ``(0, 0)``) :returns: a :class:`Mask` with the ``(i - offset[0], j - offset[1])`` bit set, if shifting ``other`` (such that its bottom right corner is at ``(i, j)``) causes it to overlap with this mask If an ``output`` Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size ``(MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1))`` is created and returned. :rtype: Mask .. ## Mask.convolve ## .. method:: connected_component | :sl:`Returns a mask containing a connected component` | :sg:`connected_component() -> Mask` | :sg:`connected_component(pos) -> Mask` A connected component is a group (1 or more) of connected set bits (orthogonally and diagonally). The SAUF algorithm, which checks 8 point connectivity, is used to find a connected component in the mask. By default this method will return a :class:`Mask` containing the largest connected component in the mask. Optionally, a bit coordinate can be specified and the connected component containing it will be returned. If the bit at the given location is not set, the returned :class:`Mask` will be empty (no bits set). :param pos: (optional) selects the connected component that contains the bit at this position :returns: a :class:`Mask` object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returned If the ``pos`` parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the ``pos`` parameter selects an unset bit. :rtype: Mask :raises IndexError: if the optional ``pos`` parameter is outside of the mask's bounds .. ## Mask.connected_component ## .. method:: connected_components | :sl:`Returns a list of masks of connected components` | :sg:`connected_components() -> [Mask, ...]` | :sg:`connected_components(minimum=0) -> [Mask, ...]` Provides a list containing a :class:`Mask` object for each connected component. :param int minimum: (optional) indicates the minimum number of bits (to filter out noise) per connected component (default is 0, which equates to no minimum and is equivalent to setting it to 1, as a connected component must have at least 1 bit set) :returns: a list containing a :class:`Mask` object for each connected component, an empty list is returned if the mask has no bits set :rtype: list[Mask] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.connected_components ## .. method:: get_bounding_rects | :sl:`Returns a list of bounding rects of connected components` | :sg:`get_bounding_rects() -> [Rect, ...]` Provides a list containing a bounding rect for each connected component. :returns: a list containing a bounding rect for each connected component, an empty list is returned if the mask has no bits set :rtype: list[Rect] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.get_bounding_rects ## .. method:: to_surface | :sl:`Returns a surface with the mask drawn on it` | :sg:`to_surface() -> Surface` | :sg:`to_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface` Draws this mask on the given surface. Set bits (bits set to 1) and unset bits (bits set to 0) can be drawn onto a surface. :param surface: (optional) Surface to draw mask onto, if no surface is provided one will be created (default is ``None``, which will cause a surface with the parameters ``Surface(size=mask.get_size(), flags=SRCALPHA, depth=32)`` to be created, drawn on, and returned) :type surface: Surface or None :param setsurface: (optional) use this surface's color values to draw set bits (default is ``None``), if this surface is smaller than the mask any bits outside its bounds will use the ``setcolor`` value :type setsurface: Surface or None :param unsetsurface: (optional) use this surface's color values to draw unset bits (default is ``None``), if this surface is smaller than the mask any bits outside its bounds will use the ``unsetcolor`` value :type unsetsurface: Surface or None :param setcolor: (optional) color to draw set bits (default is ``(255, 255, 255, 255)``, white), use ``None`` to skip drawing the set bits, the ``setsurface`` parameter (if set) will takes precedence over this parameter :type setcolor: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None :param unsetcolor: (optional) color to draw unset bits (default is ``(0, 0, 0, 255)``, black), use ``None`` to skip drawing the unset bits, the ``unsetsurface`` parameter (if set) will takes precedence over this parameter :type unsetcolor: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None :param dest: (optional) surface destination of where to position the topleft corner of the mask being drawn (default is ``(0, 0)``), if a Rect is used as the ``dest`` parameter, its ``x`` and ``y`` attributes will be used as the destination, **NOTE1:** rects with a negative width or height value will not be normalized before using their ``x`` and ``y`` values, **NOTE2:** this destination value is only used to position the mask on the surface, it does not offset the ``setsurface`` and ``unsetsurface`` from the mask, they are always aligned with the mask (i.e. position ``(0, 0)`` on the mask always corresponds to position ``(0, 0)`` on the ``setsurface`` and ``unsetsurface``) :type dest: Rect or tuple(int, int) or list(int, int) or Vector2(int, int) :returns: the ``surface`` parameter (or a newly created surface if no ``surface`` parameter was provided) with this mask drawn on it :rtype: Surface :raises ValueError: if the ``setsurface`` parameter or ``unsetsurface`` parameter does not have the same format (bytesize/bitsize/alpha) as the ``surface`` parameter .. note :: To skip drawing the set bits, both ``setsurface`` and ``setcolor`` must be ``None``. The ``setsurface`` parameter defaults to ``None``, but ``setcolor`` defaults to a color value and therefore must be set to ``None``. .. note :: To skip drawing the unset bits, both ``unsetsurface`` and ``unsetcolor`` must be ``None``. The ``unsetsurface`` parameter defaults to ``None``, but ``unsetcolor`` defaults to a color value and therefore must be set to ``None``. .. versionadded:: 2.0.0 .. ## Mask.to_surface ## .. ## pygame.mask.Mask ## .. ## pygame.mask ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/math.rst0000644000175100001770000011276014676242340016472 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.math` ================== .. module:: pygame.math :synopsis: pygame module for vector classes | :sl:`pygame module for vector classes` The pygame math module currently provides Vector classes in two and three dimensions, ``Vector2`` and ``Vector3`` respectively. They support the following numerical operations: ``vec + vec``, ``vec - vec``, ``vec * number``, ``number * vec``, ``vec / number``, ``vec // number``, ``vec += vec``, ``vec -= vec``, ``vec *= number``, ``vec /= number``, ``vec //= number``, ``round(vec, ndigits=0)``. All these operations will be performed elementwise. In addition ``vec * vec`` will perform a scalar-product (a.k.a. dot-product). If you want to multiply every element from vector v with every element from vector w you can use the elementwise method: ``v.elementwise() * w`` The coordinates of a vector can be retrieved or set using attributes or subscripts :: v = pygame.Vector3() v.x = 5 v[1] = 2 * v.x print(v[1]) # 10 v.x == v[0] v.y == v[1] v.z == v[2] Multiple coordinates can be set using slices or swizzling :: v = pygame.Vector2() v.xy = 1, 2 v[:] = 1, 2 .. versionadded:: 1.9.2pre .. versionchanged:: 1.9.4 Removed experimental notice. .. versionchanged:: 1.9.4 Allow scalar construction like GLSL Vector2(2) == Vector2(2.0, 2.0) .. versionchanged:: 1.9.4 :mod:`pygame.math` import not required. More convenient ``pygame.Vector2`` and ``pygame.Vector3``. .. versionchanged:: 2.2.0 `round` returns a new vector with components rounded to the specified digits. .. function:: clamp | :sl:`returns value clamped to min and max.` | :sg:`clamp(value, min, max) -> float` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp feedback with authors `_ Clamps a numeric ``value`` so that it's no lower than ``min``, and no higher than ``max``. .. versionadded:: 2.1.3 .. ## math.clamp ## .. function:: lerp | :sl:`interpolates between two values by a weight.` | :sg:`lerp(a, b, weight) -> float` Linearly interpolates between ``a`` and ``b`` by ``weight`` using the formula ``a + (b-a) * weight``. If ``weight`` is ``0.5``, ``lerp`` will return the value half-way between ``a`` and ``b``. When ``a = 10`` and ``b = 20``, ``lerp(a, b, 0.5)`` will return ``15``. You can think of weight as the percentage of interpolation from ``a`` to ``b``, ``0.0`` being 0% and ``1.0`` being 100%. ``lerp`` can be used for many things. You could rotate a sprite by a weight with ``angle = lerp(0, 360, weight)``. You could even scale an enemy's attack value based on the level you're playing: :: FINAL_LEVEL = 10 current_level = 2 attack = lerp(10, 50, current_level/MAX_LEVEL) # 18 If you're on level 0, ``attack`` will be ``10``, if you're on level 10, ``attack`` will be ``50``. If you're on level 5, the result of ``current_level/MAX_LEVEL`` will be ``0.5`` which represents 50%, therefore ``attack`` will be ``30``, which is the midpoint of ``10`` and ``50``. Raises a ValueError if ``weight`` is outside the range of ``[0, 1]``. .. versionadded:: 2.1.3 .. ## math.lerp ## .. class:: Vector2 | :sl:`a 2-Dimensional Vector` | :sg:`Vector2() -> Vector2(0, 0)` | :sg:`Vector2(int) -> Vector2` | :sg:`Vector2(float) -> Vector2` | :sg:`Vector2(Vector2) -> Vector2` | :sg:`Vector2(x, y) -> Vector2` | :sg:`Vector2((x, y)) -> Vector2` Some general information about the ``Vector2`` class. .. versionchanged:: 2.1.3 Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass .. method:: dot | :sl:`calculates the dot- or scalar-product with the other vector` | :sg:`dot(Vector2) -> float` .. ## Vector2.dot ## .. method:: cross | :sl:`calculates the cross- or vector-product` | :sg:`cross(Vector2) -> float` calculates the third component of the cross-product. .. ## Vector2.cross ## .. method:: magnitude | :sl:`returns the Euclidean magnitude of the vector.` | :sg:`magnitude() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)`` .. ## Vector2.magnitude ## .. method:: magnitude_squared | :sl:`returns the squared magnitude of the vector.` | :sg:`magnitude_squared() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.magnitude()`` because it avoids the square root. .. ## Vector2.magnitude_squared ## .. method:: length | :sl:`returns the Euclidean length of the vector.` | :sg:`length() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2)`` .. ## Vector2.length ## .. method:: length_squared | :sl:`returns the squared Euclidean length of the vector.` | :sg:`length_squared() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.length()`` because it avoids the square root. .. ## Vector2.length_squared ## .. method:: normalize | :sl:`returns a vector with the same direction but length 1.` | :sg:`normalize() -> Vector2` Returns a new vector that has ``length`` equal to ``1`` and the same direction as self. .. ## Vector2.normalize ## .. method:: normalize_ip | :sl:`normalizes the vector in place so that its length is 1.` | :sg:`normalize_ip() -> None` Normalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed. .. ## Vector2.normalize_ip ## .. method:: is_normalized | :sl:`tests if the vector is normalized i.e. has length == 1.` | :sg:`is_normalized() -> Bool` Returns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``. .. ## Vector2.is_normalized ## .. method:: scale_to_length | :sl:`scales the vector to a given length.` | :sg:`scale_to_length(float) -> None` Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised. .. ## Vector2.scale_to_length ## .. method:: reflect | :sl:`returns a vector reflected of a given normal.` | :sg:`reflect(Vector2) -> Vector2` Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. .. ## Vector2.reflect ## .. method:: reflect_ip | :sl:`reflect the vector of a given normal in place.` | :sg:`reflect_ip(Vector2) -> None` Changes the direction of self as if it would have been reflected of a surface with the given surface normal. .. ## Vector2.reflect_ip ## .. method:: distance_to | :sl:`calculates the Euclidean distance to a given vector.` | :sg:`distance_to(Vector2) -> float` .. ## Vector2.distance_to ## .. method:: distance_squared_to | :sl:`calculates the squared Euclidean distance to a given vector.` | :sg:`distance_squared_to(Vector2) -> float` .. ## Vector2.distance_squared_to ## .. method:: move_towards | :sl:`returns a vector moved toward the target by a given distance.` | :sg:`move_towards(Vector2, float) -> Vector2` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_ Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector2.move_towards ## .. method:: move_towards_ip | :sl:`moves the vector toward its target at a given distance.` | :sg:`move_towards_ip(Vector2, float) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_ Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector2.move_towards_ip ## .. method:: lerp | :sl:`returns a linear interpolation to the given vector.` | :sg:`lerp(Vector2, float) -> Vector2` Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self and other the result is going to be. It must be a value between ``0`` and ``1`` where ``0`` means self and ``1`` means other will be returned. .. ## Vector2.lerp ## .. method:: slerp | :sl:`returns a spherical interpolation to the given vector.` | :sg:`slerp(Vector2, float) -> Vector2` Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path. .. ## Vector2.slerp ## .. method:: elementwise | :sl:`The next operation will be performed elementwise.` | :sg:`elementwise() -> VectorElementwiseProxy` Applies the following operation to each element of the vector. .. ## Vector2.elementwise ## .. method:: rotate | :sl:`rotates a vector by a given angle in degrees.` | :sg:`rotate(angle) -> Vector2` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector2.rotate ## .. method:: rotate_rad | :sl:`rotates a vector by a given angle in radians.` | :sg:`rotate_rad(angle) -> Vector2` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector2.rotate_rad ## .. method:: rotate_ip | :sl:`rotates the vector by a given angle in degrees in place.` | :sg:`rotate_ip(angle) -> None` Rotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector2.rotate_ip ## .. method:: rotate_ip_rad | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_ip_rad(angle) -> None` DEPRECATED: Use rotate_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector2.rotate_rad_ip ## .. method:: rotate_rad_ip | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_rad_ip(angle) -> None` Rotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector2.rotate_rad_ip ## .. method:: angle_to | :sl:`calculates the angle to a given vector in degrees.` | :sg:`angle_to(Vector2) -> float` Returns the angle from self to the passed ``Vector2`` that would rotate self to be aligned with the passed ``Vector2`` without crossing over the negative x-axis. .. figure:: code_examples/angle_to.png :alt: angle_to image Example demonstrating the angle returned .. ## Vector2.angle_to ## .. method:: as_polar | :sl:`returns a tuple with radial distance and azimuthal angle.` | :sg:`as_polar() -> (r, phi)` Returns a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle. .. ## Vector2.as_polar ## .. method:: from_polar | :sl:`Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple.` | :sg:`Vector2.from_polar((r, phi)) -> Vector2` | :sg:`Vector2().from_polar((r, phi)) -> None` If used from the class creates a Vector2(x,y), else sets x and y. The values of x and y are defined from a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle. .. ## Vector2.from_polar ## .. method:: project | :sl:`projects a vector onto another.` | :sg:`project(Vector2) -> Vector2` Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_. .. versionadded:: 2.0.2 .. ## Vector2.project ## .. method:: copy | :sl:`Returns a copy of itself.` | :sg:`copy() -> Vector2` Returns a new Vector2 having the same dimensions. .. versionadded:: 2.1.1 .. ## Vector2.copy ## .. method:: clamp_magnitude | :sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.` | :sg:`clamp_magnitude(max_length) -> Vector2` | :sg:`clamp_magnitude(min_length, max_length) -> Vector2` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_ Returns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector2.clamp_magnitude ## .. method:: clamp_magnitude_ip | :sl:`Clamps the vector's magnitude between max_length and min_length` | :sg:`clamp_magnitude_ip(max_length) -> None` | :sg:`clamp_magnitude_ip(min_length, max_length) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_ Clamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector2.clamp_magnitude_ip ## .. method:: update | :sl:`Sets the coordinates of the vector.` | :sg:`update() -> None` | :sg:`update(int) -> None` | :sg:`update(float) -> None` | :sg:`update(Vector2) -> None` | :sg:`update(x, y) -> None` | :sg:`update((x, y)) -> None` Sets coordinates x and y in place. .. versionadded:: 1.9.5 .. ## Vector2.update ## .. attribute:: epsilon | :sl:`Determines the tolerance of vector calculations.` Both Vector classes have a value named ``epsilon`` that defaults to ``1e-6``. This value acts as a numerical margin in various methods to account for floating point arithmetic errors. Specifically, ``epsilon`` is used in the following places: * comparing Vectors (``==`` and ``!=``) * the ``is_normalized`` method (if the square of the length is within ``epsilon`` of 1, it's normalized) * slerping (a Vector with a length of ``> True print(v == u) # >> False You'll probably never have to change ``epsilon`` from the default value, but in rare situations you might find that either the margin is too large or too small, in which case changing ``epsilon`` slightly might help you out. .. ## pygame.math.Vector2 ## .. class:: Vector3 | :sl:`a 3-Dimensional Vector` | :sg:`Vector3() -> Vector3(0, 0, 0)` | :sg:`Vector3(int) -> Vector3` | :sg:`Vector3(float) -> Vector3` | :sg:`Vector3(Vector3) -> Vector3` | :sg:`Vector3(x, y, z) -> Vector3` | :sg:`Vector3((x, y, z)) -> Vector3` Some general information about the Vector3 class. .. versionchanged:: 2.1.3 Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass .. method:: dot | :sl:`calculates the dot- or scalar-product with the other vector` | :sg:`dot(Vector3) -> float` .. ## Vector3.dot ## .. method:: cross | :sl:`calculates the cross- or vector-product` | :sg:`cross(Vector3) -> Vector3` calculates the cross-product. .. ## Vector3.cross ## .. method:: magnitude | :sl:`returns the Euclidean magnitude of the vector.` | :sg:`magnitude() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)`` .. ## Vector3.magnitude ## .. method:: magnitude_squared | :sl:`returns the squared Euclidean magnitude of the vector.` | :sg:`magnitude_squared() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.magnitude()`` because it avoids the square root. .. ## Vector3.magnitude_squared ## .. method:: length | :sl:`returns the Euclidean length of the vector.` | :sg:`length() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)`` .. ## Vector3.length ## .. method:: length_squared | :sl:`returns the squared Euclidean length of the vector.` | :sg:`length_squared() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.length()`` because it avoids the square root. .. ## Vector3.length_squared ## .. method:: normalize | :sl:`returns a vector with the same direction but length 1.` | :sg:`normalize() -> Vector3` Returns a new vector that has ``length`` equal to ``1`` and the same direction as self. .. ## Vector3.normalize ## .. method:: normalize_ip | :sl:`normalizes the vector in place so that its length is 1.` | :sg:`normalize_ip() -> None` Normalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed. .. ## Vector3.normalize_ip ## .. method:: is_normalized | :sl:`tests if the vector is normalized i.e. has length == 1.` | :sg:`is_normalized() -> Bool` Returns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``. .. ## Vector3.is_normalized ## .. method:: scale_to_length | :sl:`scales the vector to a given length.` | :sg:`scale_to_length(float) -> None` Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised. .. ## Vector3.scale_to_length ## .. method:: reflect | :sl:`returns a vector reflected of a given normal.` | :sg:`reflect(Vector3) -> Vector3` Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. .. ## Vector3.reflect ## .. method:: reflect_ip | :sl:`reflect the vector of a given normal in place.` | :sg:`reflect_ip(Vector3) -> None` Changes the direction of self as if it would have been reflected of a surface with the given surface normal. .. ## Vector3.reflect_ip ## .. method:: distance_to | :sl:`calculates the Euclidean distance to a given vector.` | :sg:`distance_to(Vector3) -> float` .. ## Vector3.distance_to ## .. method:: distance_squared_to | :sl:`calculates the squared Euclidean distance to a given vector.` | :sg:`distance_squared_to(Vector3) -> float` .. ## Vector3.distance_squared_to ## .. method:: move_towards | :sl:`returns a vector moved toward the target by a given distance.` | :sg:`move_towards(Vector3, float) -> Vector3` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_ Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector3.move_towards ## .. method:: move_towards_ip | :sl:`moves the vector toward its target at a given distance.` | :sg:`move_towards_ip(Vector3, float) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_ Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector3.move_towards_ip ## .. method:: lerp | :sl:`returns a linear interpolation to the given vector.` | :sg:`lerp(Vector3, float) -> Vector3` Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between ``0`` and ``1``, where ``0`` means self and ``1`` means other will be returned. .. ## Vector3.lerp ## .. method:: slerp | :sl:`returns a spherical interpolation to the given vector.` | :sg:`slerp(Vector3, float) -> Vector3` Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path. .. ## Vector3.slerp ## .. method:: elementwise | :sl:`The next operation will be performed elementwise.` | :sg:`elementwise() -> VectorElementwiseProxy` Applies the following operation to each element of the vector. .. ## Vector3.elementwise ## .. method:: rotate | :sl:`rotates a vector by a given angle in degrees.` | :sg:`rotate(angle, Vector3) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate ## .. method:: rotate_rad | :sl:`rotates a vector by a given angle in radians.` | :sg:`rotate_rad(angle, Vector3) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_rad ## .. method:: rotate_ip | :sl:`rotates the vector by a given angle in degrees in place.` | :sg:`rotate_ip(angle, Vector3) -> None` Rotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_ip ## .. method:: rotate_ip_rad | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_ip_rad(angle, Vector3) -> None` DEPRECATED: Use rotate_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_ip_rad ## .. method:: rotate_rad_ip | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_rad_ip(angle, Vector3) -> None` Rotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_rad_ip ## .. method:: rotate_x | :sl:`rotates a vector around the x-axis by the angle in degrees.` | :sg:`rotate_x(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_x ## .. method:: rotate_x_rad | :sl:`rotates a vector around the x-axis by the angle in radians.` | :sg:`rotate_x_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_x_rad ## .. method:: rotate_x_ip | :sl:`rotates the vector around the x-axis by the angle in degrees in place.` | :sg:`rotate_x_ip(angle) -> None` Rotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_x_ip ## .. method:: rotate_x_ip_rad | :sl:`rotates the vector around the x-axis by the angle in radians in place.` | :sg:`rotate_x_ip_rad(angle) -> None` DEPRECATED: Use rotate_x_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_x_ip_rad ## .. method:: rotate_x_rad_ip | :sl:`rotates the vector around the x-axis by the angle in radians in place.` | :sg:`rotate_x_rad_ip(angle) -> None` Rotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_x_rad_ip ## .. method:: rotate_y | :sl:`rotates a vector around the y-axis by the angle in degrees.` | :sg:`rotate_y(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_y ## .. method:: rotate_y_rad | :sl:`rotates a vector around the y-axis by the angle in radians.` | :sg:`rotate_y_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_y_rad ## .. method:: rotate_y_ip | :sl:`rotates the vector around the y-axis by the angle in degrees in place.` | :sg:`rotate_y_ip(angle) -> None` Rotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_y_ip ## .. method:: rotate_y_ip_rad | :sl:`rotates the vector around the y-axis by the angle in radians in place.` | :sg:`rotate_y_ip_rad(angle) -> None` DEPRECATED: Use rotate_y_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_y_ip_rad ## .. method:: rotate_y_rad_ip | :sl:`rotates the vector around the y-axis by the angle in radians in place.` | :sg:`rotate_y_rad_ip(angle) -> None` Rotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_y_rad_ip ## .. method:: rotate_z | :sl:`rotates a vector around the z-axis by the angle in degrees.` | :sg:`rotate_z(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_z ## .. method:: rotate_z_rad | :sl:`rotates a vector around the z-axis by the angle in radians.` | :sg:`rotate_z_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_z_rad ## .. method:: rotate_z_ip | :sl:`rotates the vector around the z-axis by the angle in degrees in place.` | :sg:`rotate_z_ip(angle) -> None` Rotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_z_ip ## .. method:: rotate_z_ip_rad | :sl:`rotates the vector around the z-axis by the angle in radians in place.` | :sg:`rotate_z_ip_rad(angle) -> None` DEPRECATED: Use rotate_z_rad_ip() instead. .. deprecated:: 2.1.1 .. ## Vector3.rotate_z_ip_rad ## .. method:: rotate_z_rad_ip | :sl:`rotates the vector around the z-axis by the angle in radians in place.` | :sg:`rotate_z_rad_ip(angle) -> None` Rotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_z_rad_ip ## .. method:: angle_to | :sl:`calculates the angle to a given vector in degrees.` | :sg:`angle_to(Vector3) -> float` Returns the angle between self and the given vector. .. ## Vector3.angle_to ## .. method:: as_spherical | :sl:`returns a tuple with radial distance, inclination and azimuthal angle.` | :sg:`as_spherical() -> (r, theta, phi)` Returns a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. .. ## Vector3.as_spherical ## .. method:: from_spherical | :sl:`Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.` | :sg:`Vector3.from_spherical((r, theta, phi)) -> Vector3` | :sg:`Vector3().from_spherical((r, theta, phi)) -> None` If used from the class creates a Vector3(x, y, z), else sets x, y, and z. The values of x, y, and z are from a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. .. ## Vector3.from_spherical ## .. method:: project | :sl:`projects a vector onto another.` | :sg:`project(Vector3) -> Vector3` Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_. .. versionadded:: 2.0.2 .. ## Vector3.project ## .. method:: copy | :sl:`Returns a copy of itself.` | :sg:`copy() -> Vector3` Returns a new Vector3 having the same dimensions. .. versionadded:: 2.1.1 .. ## Vector3.copy ## .. method:: clamp_magnitude | :sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.` | :sg:`clamp_magnitude(max_length) -> Vector3` | :sg:`clamp_magnitude(min_length, max_length) -> Vector3` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_ Returns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector3.clamp_magnitude ## .. method:: clamp_magnitude_ip | :sl:`Clamps the vector's magnitude between max_length and min_length` | :sg:`clamp_magnitude_ip(max_length) -> None` | :sg:`clamp_magnitude_ip(min_length, max_length) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_ Clamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector3.clamp_magnitude_ip ## .. method:: update | :sl:`Sets the coordinates of the vector.` | :sg:`update() -> None` | :sg:`update(int) -> None` | :sg:`update(float) -> None` | :sg:`update(Vector3) -> None` | :sg:`update(x, y, z) -> None` | :sg:`update((x, y, z)) -> None` Sets coordinates x, y, and z in place. .. versionadded:: 1.9.5 .. ## Vector3.update ## .. attribute:: epsilon | :sl:`Determines the tolerance of vector calculations.` With lengths within this number, vectors are considered equal. For more information see :attr:`pygame.math.Vector2.epsilon` .. ## ## .. ## pygame.math.Vector3 ## .. ## pygame.math ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/midi.rst0000644000175100001770000003402614676242340016461 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.midi` ================== .. module:: pygame.midi :synopsis: pygame module for interacting with midi input and output. | :sl:`pygame module for interacting with midi input and output.` .. versionadded:: 1.9.0 The midi module can send output to midi devices and get input from midi devices. It can also list midi devices on the system. The midi module supports real and virtual midi devices. It uses the portmidi library. Is portable to which ever platforms portmidi supports (currently Windows, Mac OS X, and Linux). This uses pyportmidi for now, but may use its own bindings at some point in the future. The pyportmidi bindings are included with pygame. | .. versionadded:: 2.0.0 These are pygame events (:mod:`pygame.event`) reserved for midi use. The ``MIDIIN`` event is used by :func:`pygame.midi.midis2events` when converting midi events to pygame events. :: MIDIIN MIDIOUT | .. function:: init | :sl:`initialize the midi module` | :sg:`init() -> None` Initializes the :mod:`pygame.midi` module. Must be called before using the :mod:`pygame.midi` module. It is safe to call this more than once. .. ## pygame.midi.init ## .. function:: quit | :sl:`uninitialize the midi module` | :sg:`quit() -> None` Uninitializes the :mod:`pygame.midi` module. If :func:`pygame.midi.init` was called to initialize the :mod:`pygame.midi` module, then this function will be called automatically when your program exits. It is safe to call this function more than once. .. ## pygame.midi.quit ## .. function:: get_init | :sl:`returns True if the midi module is currently initialized` | :sg:`get_init() -> bool` Gets the initialization state of the :mod:`pygame.midi` module. :returns: ``True`` if the :mod:`pygame.midi` module is currently initialized. :rtype: bool .. versionadded:: 1.9.5 .. ## pygame.midi.get_init ## .. class:: Input | :sl:`Input is used to get midi input from midi devices.` | :sg:`Input(device_id) -> None` | :sg:`Input(device_id, buffer_size) -> None` :param int device_id: midi device id :param int buffer_size: (optional) the number of input events to be buffered .. method:: close | :sl:`closes a midi stream, flushing any pending buffers.` | :sg:`close() -> None` PortMidi attempts to close open streams when the application exits. .. note:: This is particularly difficult under Windows. .. ## Input.close ## .. method:: poll | :sl:`returns True if there's data, or False if not.` | :sg:`poll() -> bool` Used to indicate if any data exists. :returns: ``True`` if there is data, ``False`` otherwise :rtype: bool :raises MidiException: on error .. ## Input.poll ## .. method:: read | :sl:`reads num_events midi events from the buffer.` | :sg:`read(num_events) -> midi_event_list` Reads from the input buffer and gives back midi events. :param int num_events: number of input events to read :returns: the format for midi_event_list is ``[[[status, data1, data2, data3], timestamp], ...]`` :rtype: list .. ## Input.read ## .. ## pygame.midi.Input ## .. class:: Output | :sl:`Output is used to send midi to an output device` | :sg:`Output(device_id) -> None` | :sg:`Output(device_id, latency=0) -> None` | :sg:`Output(device_id, buffer_size=256) -> None` | :sg:`Output(device_id, latency, buffer_size) -> None` The ``buffer_size`` specifies the number of output events to be buffered waiting for output. In some cases (see below) PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored. ``latency`` is the delay in milliseconds applied to timestamps to determine when the output should actually occur. If ``latency`` is <<0, 0 is assumed. If ``latency`` is zero, timestamps are ignored and all output is delivered immediately. If ``latency`` is greater than zero, output is delayed until the message timestamp plus the ``latency``. In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency. .. note:: Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets. .. method:: abort | :sl:`terminates outgoing messages immediately` | :sg:`abort() -> None` The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. .. ## Output.abort ## .. method:: close | :sl:`closes a midi stream, flushing any pending buffers.` | :sg:`close() -> None` PortMidi attempts to close open streams when the application exits. .. note:: This is particularly difficult under Windows. .. ## Output.close ## .. method:: note_off | :sl:`turns a midi note off (note must be on)` | :sg:`note_off(note, velocity=None, channel=0) -> None` Turn a note off in the output stream. The note must already be on for this to work correctly. .. ## Output.note_off ## .. method:: note_on | :sl:`turns a midi note on (note must be off)` | :sg:`note_on(note, velocity=None, channel=0) -> None` Turn a note on in the output stream. The note must already be off for this to work correctly. .. ## Output.note_on ## .. method:: set_instrument | :sl:`select an instrument, with a value between 0 and 127` | :sg:`set_instrument(instrument_id, channel=0) -> None` Select an instrument. .. ## Output.set_instrument ## .. method:: pitch_bend | :sl:`modify the pitch of a channel.` | :sg:`set_instrument(value=0, channel=0) -> None` Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers). If no value is given, the pitch bend is returned to "no change". .. versionadded:: 1.9.4 .. method:: write | :sl:`writes a list of midi data to the Output` | :sg:`write(data) -> None` Writes series of MIDI information in the form of a list. :param list data: data to write, the expected format is ``[[[status, data1=0, data2=0, ...], timestamp], ...]`` with the ``data#`` fields being optional :raises IndexError: if more than 1024 elements in the data list Example: :: # Program change at time 20000 and 500ms later send note 65 with # velocity 100. write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]]) .. note:: - Timestamps will be ignored if latency = 0 - To get a note to play immediately, send MIDI info with timestamp read from function Time - Optional data fields: ``write([[[0xc0, 0, 0], 20000]])`` is equivalent to ``write([[[0xc0], 20000]])`` .. ## Output.write ## .. method:: write_short | :sl:`writes up to 3 bytes of midi data to the Output` | :sg:`write_short(status) -> None` | :sg:`write_short(status, data1=0, data2=0) -> None` Output MIDI information of 3 bytes or less. The ``data`` fields are optional and assumed to be 0 if omitted. Examples of status byte values: :: 0xc0 # program change 0x90 # note on # etc. Example: :: # note 65 on with velocity 100 write_short(0x90, 65, 100) .. ## Output.write_short ## .. method:: write_sys_ex | :sl:`writes a timestamped system-exclusive midi message.` | :sg:`write_sys_ex(when, msg) -> None` Writes a timestamped system-exclusive midi message. :param msg: midi message :type msg: list[int] or str :param when: timestamp in milliseconds Example: :: midi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7') # is equivalent to midi_output.write_sys_ex(pygame.midi.time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7]) .. ## Output.write_sys_ex ## .. ## pygame.midi.Output ## .. function:: get_count | :sl:`gets the number of devices.` | :sg:`get_count() -> num_devices` Device ids range from 0 to ``get_count() - 1`` .. ## pygame.midi.get_count ## .. function:: get_default_input_id | :sl:`gets default input device number` | :sg:`get_default_input_id() -> default_id` The following describes the usage details for this function and the :func:`get_default_output_id` function. Return the default device ID or ``-1`` if there are no devices. The result can be passed to the :class:`Input`/:class:`Output` class. On a PC the user can specify a default device by setting an environment variable. To use device #1, for example: :: set PM_RECOMMENDED_INPUT_DEVICE=1 or set PM_RECOMMENDED_OUTPUT_DEVICE=1 The user should first determine the available device ID by using the supplied application "testin" or "testout". In general, the registry is a better place for this kind of info. With USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if ``PM_RECOMMENDED_INPUT_DEVICE`` (or ``PM_RECOMMENDED_OUTPUT_DEVICE``) is NOT found in the environment, then the default device is obtained by looking for a string in the registry under: :: HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device or HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device The number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB" and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB". In addition to the name, :func:`get_device_info()` returns "interf", which is the interface name. The "interface" is the underlying software system or API used by PortMidi to access devices. Supported interfaces: :: MMSystem # the only Win32 interface currently supported ALSA # the only Linux interface currently supported CoreMIDI # the only Mac OS X interface currently supported # DirectX - not implemented # OSS - not implemented To specify both the interface and the device name in the registry, separate the two with a comma and a space. The string before the comma must be a substring of the "interf" string and the string after the space must be a substring of the "name" name string in order to match the device. e.g.: :: MMSystem, In USB MidiSport 1x1 .. note:: In the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID). .. ## pygame.midi.get_default_input_id ## .. function:: get_default_output_id | :sl:`gets default output device number` | :sg:`get_default_output_id() -> default_id` See :func:`get_default_input_id` for usage details. .. ## pygame.midi.get_default_output_id ## .. function:: get_device_info | :sl:`returns information about a midi device` | :sg:`get_device_info(an_id) -> (interf, name, input, output, opened)` | :sg:`get_device_info(an_id) -> None` Gets the device info for a given id. :param int an_id: id of the midi device being queried :returns: if the id is out of range ``None`` is returned, otherwise a tuple of (interf, name, input, output, opened) is returned. - interf: string describing the device interface (e.g. 'ALSA') - name: string name of the device (e.g. 'Midi Through Port-0') - input: 1 if the device is an input device, otherwise 0 - output: 1 if the device is an output device, otherwise 0 - opened: 1 if the device is opened, otherwise 0 :rtype: tuple or None .. ## pygame.midi.get_device_info ## .. function:: midis2events | :sl:`converts midi events to pygame events` | :sg:`midis2events(midi_events, device_id) -> [Event, ...]` Takes a sequence of midi events and returns list of pygame events. The ``midi_events`` data is expected to be a sequence of ``((status, data1, data2, data3), timestamp)`` midi events (all values required). :returns: a list of pygame events of event type ``MIDIIN`` :rtype: list .. ## pygame.midi.midis2events ## .. function:: time | :sl:`returns the current time in ms of the PortMidi timer` | :sg:`time() -> time` The time is reset to 0 when the :mod:`pygame.midi` module is initialized. .. ## pygame.midi.time ## .. function:: frequency_to_midi | :sl:`Converts a frequency into a MIDI note. Rounds to the closest midi note.` | :sg:`frequency_to_midi(midi_note) -> midi_note` example: :: frequency_to_midi(27.5) == 21 .. versionadded:: 1.9.5 .. ## pygame.midi.frequency_to_midi ## .. function:: midi_to_frequency | :sl:`Converts a midi note to a frequency.` | :sg:`midi_to_frequency(midi_note) -> frequency` example: :: midi_to_frequency(21) == 27.5 .. versionadded:: 1.9.5 .. ## pygame.midi.midi_to_frequency ## .. function:: midi_to_ansi_note | :sl:`Returns the Ansi Note name for a midi number.` | :sg:`midi_to_ansi_note(midi_note) -> ansi_note` example: :: midi_to_ansi_note(21) == 'A0' .. versionadded:: 1.9.5 .. ## pygame.midi.midi_to_ansi_note ## .. exception:: MidiException | :sl:`exception that pygame.midi functions and classes can raise` | :sg:`MidiException(errno) -> None` .. ## pygame.midi.MidiException ## .. ## pygame.midi ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/mixer.rst0000644000175100001770000005367314676242340016674 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mixer` =================== .. module:: pygame.mixer :synopsis: pygame module for loading and playing sounds | :sl:`pygame module for loading and playing sounds` This module contains classes for loading Sound objects and controlling playback. The mixer module is optional and depends on SDL_mixer. Your program should test that :mod:`pygame.mixer` is available and initialized before using it. The mixer module has a limited number of channels for playback of sounds. Usually programs tell pygame to start playing audio and it selects an available channel automatically. The default is 8 simultaneous channels, but complex programs can get more precise control over the number of channels and their use. All sound playback is mixed in background threads. When you begin to play a Sound object, it will return immediately while the sound continues to play. A single Sound object can also be actively played back multiple times. The mixer also has a special streaming channel. This is for music playback and is accessed through the :mod:`pygame.mixer.music` module. Consider using this module for playing long running music. Unlike mixer module, the music module streams the music from the files without loading music at once into memory. The mixer module must be initialized like other pygame modules, but it has some extra conditions. The ``pygame.mixer.init()`` function takes several optional arguments to control the playback rate and sample size. Pygame will default to reasonable values, but pygame cannot perform Sound resampling, so the mixer should be initialized to match the values of your audio resources. ``NOTE``: For less laggy sound use a smaller buffer size. The default is set to reduce the chance of scratchy sounds on some computers. You can change the default buffer by calling :func:`pygame.mixer.pre_init` before :func:`pygame.mixer.init` or :func:`pygame.init` is called. For example: ``pygame.mixer.pre_init(44100,-16,2, 1024)`` .. function:: init | :sl:`initialize the mixer module` | :sg:`init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None` Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used. (startup defaults may be changed by a :func:`pre_init` call). The size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception. The channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo. The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger values to ensure playback never skips, but it will impose latency on sound playback. The buffer size must be a power of two (if not it is rounded up to the next nearest power of 2). Some platforms require the :mod:`pygame.mixer` module to be initialized after the display modules have initialized. The top level ``pygame.init()`` takes care of this automatically, but cannot pass any arguments to the mixer init. To solve this, mixer has a function ``pygame.mixer.pre_init()`` to set the proper defaults before the toplevel init is used. When using allowedchanges=0 it will convert the samples at runtime to match what the hardware supports. For example a sound card may not support 16bit sound samples, so instead it will use 8bit samples internally. If AUDIO_ALLOW_FORMAT_CHANGE is supplied, then the requested format will change to the closest that SDL2 supports. Apart from 0, allowedchanged accepts the following constants ORed together: - AUDIO_ALLOW_FREQUENCY_CHANGE - AUDIO_ALLOW_FORMAT_CHANGE - AUDIO_ALLOW_CHANNELS_CHANGE - AUDIO_ALLOW_ANY_CHANGE It is safe to call this more than once, but after the mixer is initialized you cannot change the playback arguments without first calling ``pygame.mixer.quit()``. .. versionchanged:: 1.8 The default ``buffersize`` changed from 1024 to 3072. .. versionchanged:: 1.9.1 The default ``buffersize`` changed from 3072 to 4096. .. versionchanged:: 2.0.0 The default ``buffersize`` changed from 4096 to 512. .. versionchanged:: 2.0.0 The default ``frequency`` changed from 22050 to 44100. .. versionchanged:: 2.0.0 ``size`` can be 32 (32-bit floats). .. versionchanged:: 2.0.0 ``channels`` can also be 4 or 6. .. versionadded:: 2.0.0 ``allowedchanges``, ``devicename`` arguments added .. ## pygame.mixer.init ## .. function:: pre_init | :sl:`preset the mixer init arguments` | :sg:`pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None` Call pre_init to change the defaults used when the real ``pygame.mixer.init()`` is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call ``pygame.mixer.pre_init()`` before calling the top level ``pygame.init()``. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used. .. versionchanged:: 1.8 The default ``buffersize`` changed from 1024 to 3072. .. versionchanged:: 1.9.1 The default ``buffersize`` changed from 3072 to 4096. .. versionchanged:: 2.0.0 The default ``buffersize`` changed from 4096 to 512. .. versionchanged:: 2.0.0 The default ``frequency`` changed from 22050 to 44100. .. versionadded:: 2.0.0 ``allowedchanges``, ``devicename`` arguments added .. ## pygame.mixer.pre_init ## .. function:: quit | :sl:`uninitialize the mixer` | :sg:`quit() -> None` This will uninitialize :mod:`pygame.mixer`. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later. .. ## pygame.mixer.quit ## .. function:: get_init | :sl:`test if the mixer is initialized` | :sg:`get_init() -> (frequency, format, channels)` If the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns ``None``. .. ## pygame.mixer.get_init ## .. function:: stop | :sl:`stop playback of all sound channels` | :sg:`stop() -> None` This will stop all playback of all active mixer channels. .. ## pygame.mixer.stop ## .. function:: pause | :sl:`temporarily stop playback of all sound channels` | :sg:`pause() -> None` This will temporarily stop all playback on the active mixer channels. The playback can later be resumed with ``pygame.mixer.unpause()`` .. ## pygame.mixer.pause ## .. function:: unpause | :sl:`resume paused playback of sound channels` | :sg:`unpause() -> None` This will resume all active sound channels after they have been paused. .. ## pygame.mixer.unpause ## .. function:: fadeout | :sl:`fade out the volume on all sounds before stopping` | :sg:`fadeout(time) -> None` This will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop. .. ## pygame.mixer.fadeout ## .. function:: set_num_channels | :sl:`set the total number of playback channels` | :sg:`set_num_channels(count) -> None` Sets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped. .. ## pygame.mixer.set_num_channels ## .. function:: get_num_channels | :sl:`get the total number of playback channels` | :sg:`get_num_channels() -> count` Returns the number of currently active playback channels. .. ## pygame.mixer.get_num_channels ## .. function:: set_reserved | :sl:`reserve channels from being automatically used` | :sg:`set_reserved(count) -> count` The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. This means that whenever you play a Sound without specifying a channel, a reserved channel will never be used. If sounds are currently playing on the reserved channels they will not be stopped. This allows the application to reserve a specific number of channels for important sounds that must not be dropped or have a guaranteed channel to play on. Will return number of channels actually reserved, this may be less than requested depending on the number of channels previously allocated. .. ## pygame.mixer.set_reserved ## .. function:: find_channel | :sl:`find an unused channel` | :sg:`find_channel(force=False) -> Channel` This will find and return an inactive Channel object. If there are no inactive Channels this function will return ``None``. If there are no inactive channels and the force argument is ``True``, this will find the Channel with the longest running Sound and return it. .. ## pygame.mixer.find_channel ## .. function:: get_busy | :sl:`test if any sound is being mixed` | :sg:`get_busy() -> bool` Returns ``True`` if the mixer is busy mixing any channels. If the mixer is idle then this return ``False``. .. ## pygame.mixer.get_busy ## .. function:: get_sdl_mixer_version | :sl:`get the mixer's SDL version` | :sg:`get_sdl_mixer_version() -> (major, minor, patch)` | :sg:`get_sdl_mixer_version(linked=True) -> (major, minor, patch)` :param bool linked: if ``True`` (default) the linked version number is returned, otherwise the compiled version number is returned :returns: the mixer's SDL library version number (linked or compiled depending on the ``linked`` parameter) as a tuple of 3 integers ``(major, minor, patch)`` :rtype: tuple .. note:: The linked and compile version numbers should be the same. .. versionadded:: 2.0.0 .. ## pygame.mixer.get_sdl_mixer_version ## .. class:: Sound | :sl:`Create a new Sound object from a file or buffer object` | :sg:`Sound(filename) -> Sound` | :sg:`Sound(file=filename) -> Sound` | :sg:`Sound(file=pathlib_path) -> Sound` | :sg:`Sound(buffer) -> Sound` | :sg:`Sound(buffer=buffer) -> Sound` | :sg:`Sound(object) -> Sound` | :sg:`Sound(file=object) -> Sound` | :sg:`Sound(array=object) -> Sound` Load a new sound buffer from a filename, a python file object or a readable buffer object. Limited resampling will be performed to help the sample match the initialize arguments for the mixer. A Unicode string can only be a file pathname. A bytes object can be either a pathname or a buffer object. Use the 'file' or 'buffer' keywords to avoid ambiguity; otherwise Sound may guess wrong. If the array keyword is used, the object is expected to export a new buffer interface (The object is checked for a buffer interface first.) The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback. A Sound object also exports a new buffer interface. The Sound can be loaded from an ``OGG`` audio file or from an uncompressed ``WAV``. Note: The buffer will be copied internally, no data will be shared between it and the Sound object. For now buffer and array support is consistent with ``sndarray.make_sound`` for NumPy arrays, in that sample sign and byte order are ignored. This will change, either by correctly handling sign and byte order, or by raising an exception when different. Also, source samples are truncated to fit the audio sample size. This will not change. .. versionadded:: 1.8 ``pygame.mixer.Sound(buffer)`` .. versionadded:: 1.9.2 :class:`pygame.mixer.Sound` keyword arguments and array interface support .. versionadded:: 2.0.1 pathlib.Path support on Python 3. .. method:: play | :sl:`begin sound playback` | :sg:`play(loops=0, maxtime=0, fade_ms=0) -> Channel` Begin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary. The loops argument controls how many times the sample will be repeated after being played the first time. A value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call ``stop()`` to stop it). The maxtime argument can be used to stop playback after a given number of milliseconds. The fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete. This returns the Channel object for the channel that was selected. .. ## Sound.play ## .. method:: stop | :sl:`stop sound playback` | :sg:`stop() -> None` This will stop the playback of this Sound on any active Channels. .. ## Sound.stop ## .. method:: fadeout | :sl:`stop sound playback after fading out` | :sg:`fadeout(time) -> None` This will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels. .. ## Sound.fadeout ## .. method:: set_volume | :sl:`set the playback volume for this Sound` | :sg:`set_volume(value) -> None` This will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound. :param float value: volume in the range of 0.0 to 1.0 (inclusive) | If value < 0.0, the volume will not be changed | If value > 1.0, the volume will be set to 1.0 .. ## Sound.set_volume ## .. method:: get_volume | :sl:`get the playback volume` | :sg:`get_volume() -> value` Return a value from 0.0 to 1.0 representing the volume for this Sound. .. ## Sound.get_volume ## .. method:: get_num_channels | :sl:`count how many times this Sound is playing` | :sg:`get_num_channels() -> count` Return the number of active channels this sound is playing on. .. ## Sound.get_num_channels ## .. method:: get_length | :sl:`get the length of the Sound` | :sg:`get_length() -> seconds` Return the length of this Sound in seconds. .. ## Sound.get_length ## .. method:: get_raw | :sl:`return a bytestring copy of the Sound samples.` | :sg:`get_raw() -> bytes` Return a copy of the Sound object buffer as a bytes. .. versionadded:: 1.9.2 .. ## Sound.get_raw ## .. ## pygame.mixer.Sound ## .. class:: Channel | :sl:`Create a Channel object for controlling playback` | :sg:`Channel(id) -> Channel` Return a Channel object for one of the current channels. The id must be a value from 0 to the value of ``pygame.mixer.get_num_channels()``. The Channel object can be used to get fine control over the playback of Sounds. A channel can only playback a single Sound at time. Using channels is entirely optional since pygame can manage them by default. .. method:: play | :sl:`play a Sound on a specific Channel` | :sg:`play(Sound, loops=0, maxtime=0, fade_ms=0) -> None` This will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped. The loops argument has the same meaning as in ``Sound.play()``: it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely. As in ``Sound.play()``, the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds. As in ``Sound.play()``, the fade_ms argument can be used fade in the sound. .. ## Channel.play ## .. method:: stop | :sl:`stop playback on a Channel` | :sg:`stop() -> None` Stop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it. .. ## Channel.stop ## .. method:: pause | :sl:`temporarily stop playback of a channel` | :sg:`pause() -> None` Temporarily stop the playback of sound on a channel. It can be resumed at a later time with ``Channel.unpause()`` .. ## Channel.pause ## .. method:: unpause | :sl:`resume pause playback of a channel` | :sg:`unpause() -> None` Resume the playback on a paused channel. .. ## Channel.unpause ## .. method:: fadeout | :sl:`stop playback after fading channel out` | :sg:`fadeout(time) -> None` Stop playback of a channel after fading out the sound over the given time argument in milliseconds. .. ## Channel.fadeout ## .. method:: set_volume | :sl:`set the volume of a playing channel` | :sg:`set_volume(value) -> None` | :sg:`set_volume(left, right) -> None` Set the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0. If one argument is passed, it will be the volume of both speakers. If two arguments are passed and the mixer is in stereo mode, the first argument will be the volume of the left speaker and the second will be the volume of the right speaker. (If the second argument is ``None``, the first argument will be the volume of both speakers.) If the channel is playing a Sound on which ``set_volume()`` has also been called, both calls are taken into account. For example: :: sound = pygame.mixer.Sound("s.wav") channel = s.play() # Sound plays at full volume by default sound.set_volume(0.9) # Now plays at 90% of full volume. sound.set_volume(0.6) # Now plays at 60% (previous value replaced). channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5). .. ## Channel.set_volume ## .. method:: get_volume | :sl:`get the volume of the playing channel` | :sg:`get_volume() -> value` Return the volume of the channel for the current playing sound. This does not take into account stereo separation used by :meth:`Channel.set_volume`. The Sound object also has its own volume which is mixed with the channel. .. ## Channel.get_volume ## .. method:: get_busy | :sl:`check if the channel is active` | :sg:`get_busy() -> bool` Returns ``True`` if the channel is actively mixing sound. If the channel is idle this returns ``False``. .. ## Channel.get_busy ## .. method:: get_sound | :sl:`get the currently playing Sound` | :sg:`get_sound() -> Sound` Return the actual Sound object currently playing on this channel. If the channel is idle ``None`` is returned. .. ## Channel.get_sound ## .. method:: queue | :sl:`queue a Sound object to follow the current` | :sg:`queue(Sound) -> None` When a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automatically. It is cleared on any other call to ``Channel.stop()`` or ``Channel.play()``. If there is no sound actively playing on the Channel then the Sound will begin playing immediately. .. ## Channel.queue ## .. method:: get_queue | :sl:`return any Sound that is queued` | :sg:`get_queue() -> Sound` If a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue. .. ## Channel.get_queue ## .. method:: set_endevent | :sl:`have the channel send an event when playback stops` | :sg:`set_endevent() -> None` | :sg:`set_endevent(type) -> None` When an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use ``pygame.event.get()`` to retrieve the endevent once it's sent. Note that if you called ``Sound.play(n)`` or ``Channel.play(sound,n)``, the end event is sent only once: after the sound has been played "n+1" times (see the documentation of Sound.play). If ``Channel.stop()`` or ``Channel.play()`` is called while the sound was still playing, the event will be posted immediately. The type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between ``pygame.locals.USEREVENT`` and ``pygame.locals.NUMEVENTS``. If no type argument is given then the Channel will stop sending endevents. .. ## Channel.set_endevent ## .. method:: get_endevent | :sl:`get the event a channel sends when playback stops` | :sg:`get_endevent() -> type` Returns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns ``pygame.NOEVENT``. .. ## Channel.get_endevent ## .. ## pygame.mixer.Channel ## .. ## pygame.mixer ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/reST/ref/mouse.rst0000644000175100001770000001770114676242340016670 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mouse` =================== .. module:: pygame.mouse :synopsis: pygame module to work with the mouse | :sl:`pygame module to work with the mouse` The mouse functions can be used to get the current state of the mouse device. These functions can also alter the system cursor for the mouse. When the display mode is set, the event queue will start receiving mouse events. The mouse buttons generate ``pygame.MOUSEBUTTONDOWN`` and ``pygame.MOUSEBUTTONUP`` events when they are pressed and released. These events contain a button attribute representing which button was pressed. The mouse wheel will generate ``pygame.MOUSEBUTTONDOWN`` and ``pygame.MOUSEBUTTONUP`` events when rolled. The button will be set to 4 when the wheel is rolled up, and to button 5 when the wheel is rolled down. Whenever the mouse is moved it generates a ``pygame.MOUSEMOTION`` event. The mouse movement is broken into small and accurate motion events. As the mouse is moving many motion events will be placed on the queue. Mouse motion events that are not properly cleaned from the event queue are the primary reason the event queue fills up. If the mouse cursor is hidden, and input is grabbed to the current display the mouse will enter a virtual input mode, where the relative movements of the mouse will never be stopped by the borders of the screen. See the functions ``pygame.mouse.set_visible()`` and ``pygame.event.set_grab()`` to get this configured. **Mouse Wheel Behavior in pygame 2** There is proper functionality for mouse wheel behaviour with pygame 2 supporting ``pygame.MOUSEWHEEL`` events. The new events support horizontal and vertical scroll movements, with signed integer values representing the amount scrolled (``x`` and ``y``), as well as ``flipped`` direction (the set positive and negative values for each axis is flipped). Read more about SDL2 input-related changes here ``_ In pygame 2, the mouse wheel functionality can be used by listening for the ``pygame.MOUSEWHEEL`` type of an event (Bear in mind they still emit ``pygame.MOUSEBUTTONDOWN`` events like in pygame 1.x, as well). When this event is triggered, a developer can access the appropriate ``Event`` object with ``pygame.event.get()``. The object can be used to access data about the mouse scroll, such as ``which`` (it will tell you what exact mouse device trigger the event). .. code-block:: python :caption: Code example of mouse scroll (tested on 2.0.0.dev7) :name: test.py # Taken from husano896's PR thread (slightly modified) import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() def main(): while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() return elif event.type == MOUSEWHEEL: print(event) print(event.x, event.y) print(event.flipped) print(event.which) # can access properties with # proper notation(ex: event.y) clock.tick(60) # Execute game: main() .. function:: get_pressed | :sl:`get the state of the mouse buttons` | :sg:`get_pressed(num_buttons=3) -> (button1, button2, button3)` | :sg:`get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)` Returns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently being pressed at the time of the call. Note, to get all of the mouse events it is better to use either ``pygame.event.wait()`` or ``pygame.event.get()`` and check all of those events to see if they are ``MOUSEBUTTONDOWN``, ``MOUSEBUTTONUP``, or ``MOUSEMOTION``. Note, that on ``X11`` some X servers use middle button emulation. When you click both buttons ``1`` and ``3`` at the same time a ``2`` button event can be emitted. Note, remember to call ``pygame.event.get()`` before this function. Otherwise it will not work as expected. To support five button mice, an optional parameter ``num_buttons`` has been added in pygame 2. When this is set to ``5``, ``button4`` and ``button5`` are added to the returned tuple. Only ``3`` and ``5`` are valid values for this parameter. .. versionchanged:: 2.0.0 ``num_buttons`` argument added .. ## pygame.mouse.get_pressed ## .. function:: get_pos | :sl:`get the mouse cursor position` | :sg:`get_pos() -> (x, y)` Returns the ``x`` and ``y`` position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen. .. ## pygame.mouse.get_pos ## .. function:: get_rel | :sl:`get the amount of mouse movement` | :sg:`get_rel() -> (x, y)` Returns the amount of movement in ``x`` and ``y`` since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual input mode is described at the top of the page. .. ## pygame.mouse.get_rel ## .. function:: set_pos | :sl:`set the mouse cursor position` | :sg:`set_pos([x, y]) -> None` Set the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new ``pygame.MOUSEMOTION`` event. .. ## pygame.mouse.set_pos ## .. function:: set_visible | :sl:`hide or show the mouse cursor` | :sg:`set_visible(bool) -> bool` If the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor. .. ## pygame.mouse.set_visible ## .. function:: get_visible | :sl:`get the current visibility state of the mouse cursor` | :sg:`get_visible() -> bool` Get the current visibility state of the mouse cursor. ``True`` if the mouse is visible, ``False`` otherwise. .. versionadded:: 2.0.0 .. ## pygame.mouse.get_visible ## .. function:: get_focused | :sl:`check if the display is receiving mouse input` | :sg:`get_focused() -> bool` Returns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus"). This method is most useful when working in a window. By contrast, in full-screen mode, this method always returns true. Note: under ``MS`` Windows, the window that has the mouse focus also has the keyboard focus. But under X-Windows, one window can receive mouse events and another receive keyboard events. ``pygame.mouse.get_focused()`` indicates whether the pygame window receives mouse events. .. ## pygame.mouse.get_focused ## .. function:: set_cursor | :sl:`set the mouse cursor to a new cursor` | :sg:`set_cursor(pygame.cursors.Cursor) -> None` | :sg:`set_cursor(size, hotspot, xormasks, andmasks) -> None` | :sg:`set_cursor(hotspot, surface) -> None` | :sg:`set_cursor(constant) -> None` Set the mouse cursor to something new. This function accepts either an explicit ``Cursor`` object or arguments to create a ``Cursor`` object. See :class:`pygame.cursors.Cursor` for help creating cursors and for examples. .. versionchanged:: 2.0.1 .. ## pygame.mouse.set_cursor ## .. function:: get_cursor | :sl:`get the current mouse cursor` | :sg:`get_cursor() -> pygame.cursors.Cursor` Get the information about the mouse system cursor. The return value contains the same data as the arguments passed into :func:`pygame.mouse.set_cursor()`. .. note:: Code that unpacked a get_cursor() call into ``size, hotspot, xormasks, andmasks`` will still work, assuming the call returns an old school type cursor. .. versionchanged:: 2.0.1 .. ## pygame.mouse.get_cursor ## .. ## pygame.mouse ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/music.rst0000644000175100001770000002247314676242340016662 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mixer.music` ========================= .. module:: pygame.mixer.music :synopsis: pygame module for controlling streamed audio | :sl:`pygame module for controlling streamed audio` The music module is closely tied to :mod:`pygame.mixer`. Use the music module to control the playback of music in the sound mixer. The difference between the music playback and regular Sound playback is that the music is streamed, and never actually loaded all at once. The mixer system only supports a single music stream at once. On older pygame versions, ``MP3`` support was limited under Mac and Linux. This changed in pygame ``v2.0.2`` which got improved MP3 support. Consider using ``OGG`` file format for music as that can give slightly better compression than MP3 in most cases. .. function:: load | :sl:`Load a music file for playback` | :sg:`load(filename) -> None` | :sg:`load(fileobj, namehint="") -> None` This will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing. If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`load(fileobj, "ogg")`. .. versionchanged:: 2.0.2 Added optional ``namehint`` argument .. ## pygame.mixer.music.load ## .. function:: unload | :sl:`Unload the currently loaded music to free up resources` | :sg:`unload() -> None` This closes resources like files for any music that may be loaded. .. versionadded:: 2.0.0 .. ## pygame.mixer.music.load ## .. function:: play | :sl:`Start the playback of the music stream` | :sg:`play(loops=0, start=0.0, fade_ms=0) -> None` This will play the loaded music stream. If the music is already playing it will be restarted. ``loops`` is an optional integer argument, which is ``0`` by default, which indicates how many times to repeat the music. The music repeats indefinitely if this argument is set to ``-1``. ``start`` is an optional float argument, which is ``0.0`` by default, which denotes the position in time from which the music starts playing. The starting position depends on the format of the music played. ``MP3`` and ``OGG`` use the position as time in seconds. For ``MP3`` files the start time position selected may not be accurate as things like variable bit rate encoding and ID3 tags can throw off the timing calculations. For ``MOD`` music it is the pattern order number. Passing a start position will raise a NotImplementedError if the start position cannot be set. ``fade_ms`` is an optional integer argument, which is ``0`` by default, which denotes the period of time (in milliseconds) over which the music will fade up from volume level ``0.0`` to full volume (or the volume level previously set by :func:`set_volume`). The sample may end before the fade-in is complete. If the music is already streaming ``fade_ms`` is ignored. .. versionchanged:: 2.0.0 Added optional ``fade_ms`` argument .. ## pygame.mixer.music.play ## .. function:: rewind | :sl:`restart music` | :sg:`rewind() -> None` Resets playback of the current music to the beginning. If :func:`pause` has previously been used to pause the music, the music will remain paused. .. note:: :func:`rewind` supports a limited number of file types and notably ``WAV`` files are NOT supported. For unsupported file types use :func:`play` which will restart the music that's already playing (note that this will start the music playing again even if previously paused). .. ## pygame.mixer.music.rewind ## .. function:: stop | :sl:`stop the music playback` | :sg:`stop() -> None` Stops the music playback if it is currently playing. endevent will be triggered, if set. It won't unload the music. .. ## pygame.mixer.music.stop ## .. function:: pause | :sl:`temporarily stop music playback` | :sg:`pause() -> None` Temporarily stop playback of the music stream. It can be resumed with the :func:`unpause` function. .. ## pygame.mixer.music.pause ## .. function:: unpause | :sl:`resume paused music` | :sg:`unpause() -> None` This will resume the playback of a music stream after it has been paused. .. ## pygame.mixer.music.unpause ## .. function:: fadeout | :sl:`stop music playback after fading out` | :sg:`fadeout(time) -> None` Fade out and stop the currently playing music. The ``time`` argument denotes the integer milliseconds for which the fading effect is generated. Note, that this function blocks until the music has faded out. Calls to :func:`fadeout` and :func:`set_volume` will have no effect during this time. If an event was set using :func:`set_endevent` it will be called after the music has faded. .. ## pygame.mixer.music.fadeout ## .. function:: set_volume | :sl:`set the music volume` | :sg:`set_volume(volume) -> None` Set the volume of the music playback. The ``volume`` argument is a float between ``0.0`` and ``1.0`` that sets the volume level. When new music is loaded the volume is reset to full volume. If ``volume`` is a negative value it will be ignored and the volume will remain set at the current level. If the ``volume`` argument is greater than ``1.0``, the volume will be set to ``1.0``. .. ## pygame.mixer.music.set_volume ## .. function:: get_volume | :sl:`get the music volume` | :sg:`get_volume() -> value` Returns the current volume for the mixer. The value will be between ``0.0`` and ``1.0``. .. ## pygame.mixer.music.get_volume ## .. function:: get_busy | :sl:`check if the music stream is playing` | :sg:`get_busy() -> bool` Returns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused. .. versionchanged:: 2.0.1 Returns False when music paused. .. ## pygame.mixer.music.get_busy ## .. function:: set_pos | :sl:`set position to play from` | :sg:`set_pos(pos) -> None` This sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format. For ``MOD`` files, pos is the integer pattern number in the module. For ``OGG`` it is the absolute position, in seconds, from the beginning of the sound. For ``MP3`` files, it is the relative position, in seconds, from the current position. For absolute positioning in an ``MP3`` file, first call :func:`rewind`. Other file formats are unsupported. Newer versions of SDL_mixer have better positioning support than earlier ones. An SDLError is raised if a particular format does not support positioning. Function :func:`set_pos` calls underlining SDL_mixer function ``Mix_SetMusicPosition``. .. versionadded:: 1.9.2 .. ## pygame.mixer.music.set_pos ## .. function:: get_pos | :sl:`get the music play time` | :sg:`get_pos() -> time` This gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets. .. ## pygame.mixer.music.get_pos ## .. function:: queue | :sl:`queue a sound file to follow the current` | :sg:`queue(filename) -> None` | :sg:`queue(fileobj, namehint="", loops=0) -> None` This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in the new sound becoming the queued sound. Also, if the current sound is ever stopped or changed, the queued sound will be lost. If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`queue(fileobj, "ogg")`. The following example will play music by Bach six times, then play music by Mozart once: :: pygame.mixer.music.load('bach.ogg') pygame.mixer.music.play(5) # Plays six times, not five! pygame.mixer.music.queue('mozart.ogg') .. versionchanged:: 2.0.2 Added optional ``namehint`` argument .. ## pygame.mixer.music.queue ## .. function:: set_endevent | :sl:`have the music send an event when playback stops` | :sg:`set_endevent() -> None` | :sg:`set_endevent(type) -> None` This causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued. The event will be queued every time the music finishes, not just the first time. To stop the event from being queued, call this method with no argument. .. ## pygame.mixer.music.set_endevent ## .. function:: get_endevent | :sl:`get the event a channel sends when playback stops` | :sg:`get_endevent() -> type` Returns the event type to be sent every time the music finishes playback. If there is no endevent the function returns ``pygame.NOEVENT``. .. ## pygame.mixer.music.get_endevent ## .. ## pygame.mixer.music ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/overlay.rst0000644000175100001770000000514314676242340017216 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Overlay` ===================== .. currentmodule:: pygame .. warning:: This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. .. class:: Overlay | :sl:`pygame object for video overlay graphics` | :sg:`Overlay(format, (width, height)) -> Overlay` The Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard ``RGB`` pixel formats, and can use multiple resolutions of data to create a single image. The Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays. The Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types: :: YV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAY The width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay. The overlay objects are always visible, and always show above the regular display contents. .. method:: display | :sl:`set the overlay pixel data` | :sg:`display((y, u, v)) -> None` | :sg:`display() -> None` Display the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay. If no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated. The strings are not validated, and improperly sized strings could crash the program. .. ## Overlay.display ## .. method:: set_location | :sl:`control where the overlay is displayed` | :sg:`set_location(rect) -> None` Set the location for the overlay. The overlay will always be shown relative to the main display Surface. This does not actually redraw the overlay, it will be updated on the next call to ``Overlay.display()``. .. ## Overlay.set_location ## .. method:: get_hardware | :sl:`test if the Overlay is hardware accelerated` | :sg:`get_hardware(rect) -> int` Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used. .. ## Overlay.get_hardware ## .. ## pygame.Overlay ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/pixelarray.rst0000644000175100001770000002373414676242340017723 0ustar00runnerdocker.. include:: common.txt :class:`pygame.PixelArray` ========================== .. currentmodule:: pygame .. class:: PixelArray | :sl:`pygame object for direct pixel access of surfaces` | :sg:`PixelArray(Surface) -> PixelArray` The PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays support slicing, both for returning a subarray or for assignment. A pixel array sliced on a single column or row returns a one dimensional pixel array. Arithmetic and other operations are not supported. A pixel array can be safely assigned to itself. Finally, pixel arrays export an array struct interface, allowing them to interact with :mod:`pygame.pixelcopy` methods and NumPy arrays. A PixelArray pixel item can be assigned a raw integer values, a :class:`pygame.Color` instance, or a (r, g, b[, a]) tuple. :: pxarray[x, y] = 0xFF00FF pxarray[x, y] = pygame.Color(255, 0, 255) pxarray[x, y] = (255, 0, 255) However, only a pixel's integer value is returned. So, to compare a pixel to a particular color the color needs to be first mapped using the :meth:`Surface.map_rgb()` method of the Surface object for which the PixelArray was created. :: pxarray = pygame.PixelArray(surface) # Check, if the first pixel at the topleft corner is blue if pxarray[0, 0] == surface.map_rgb((0, 0, 255)): ... When assigning to a range of of pixels, a non tuple sequence of colors or a PixelArray can be used as the value. For a sequence, the length must match the PixelArray width. :: pxarray[a:b] = 0xFF00FF # set all pixels to 0xFF00FF pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF, # second pixel = 0xAACCEE, ... pxarray[a:b] = [(255, 0, 255), (170, 204, 238), ...] # same as above pxarray[a:b] = [(255, 0, 255), 0xAACCEE, ...] # same as above pxarray[a:b] = otherarray[x:y] # slice sizes must match For PixelArray assignment, if the right hand side array has a row length of 1, then the column is broadcast over the target array's rows. An array of height 1 is broadcast over the target's columns, and is equivalent to assigning a 1D PixelArray. Subscript slices can also be used to assign to a rectangular subview of the target PixelArray. :: # Create some new PixelArray objects providing a different view # of the original array/surface. newarray = pxarray[2:4, 3:5] otherarray = pxarray[::2, ::2] Subscript slices can also be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis. The :: pxarray[::2, :] = (0, 0, 0) # Make even columns black. pxarray[::2] = (0, 0, 0) # Same as [::2, :] During its lifetime, the PixelArray locks the surface, thus you explicitly have to close() it once its not used any more and the surface should perform operations in the same scope. It is best to use it as a context manager using the with PixelArray(surf) as pixel_array: style. So it works on pypy too. A simple ``:`` slice index for the column can be omitted. :: pxarray[::2, ...] = (0, 0, 0) # Same as pxarray[::2, :] pxarray[...] = (255, 0, 0) # Same as pxarray[:] A note about PixelArray to PixelArray assignment, for arrays with an item size of 3 (created from 24 bit surfaces) pixel values are translated from the source to the destinations format. The red, green, and blue color elements of each pixel are shifted to match the format of the target surface. For all other pixel sizes no such remapping occurs. This should change in later pygame releases, where format conversions are performed for all pixel sizes. To avoid code breakage when full mapped copying is implemented it is suggested PixelArray to PixelArray copies be only between surfaces of identical format. .. versionadded:: 1.9.4 - close() method was added. For explicitly cleaning up. - being able to use PixelArray as a context manager for cleanup. - both of these are useful for when working without reference counting (pypy). .. versionadded:: 1.9.2 - array struct interface - transpose method - broadcasting for a length 1 dimension .. versionchanged:: 1.9.2 - A 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array. - For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors. .. versionadded: 1.8.0 Subscript support .. versionadded: 1.8.1 Methods :meth:`make_surface`, :meth:`replace`, :meth:`extract`, and :meth:`compare` .. versionadded: 1.9.2 Properties :attr:`itemsize`, :attr:`ndim`, :attr:`shape`, and :attr:`strides` .. versionadded: 1.9.2 Array struct interface .. versionadded: 1.9.4 Methods :meth:`close` .. attribute:: surface | :sl:`Gets the Surface the PixelArray uses.` | :sg:`surface -> Surface` The Surface the PixelArray was created for. .. ## PixelArray.surface ## .. attribute:: itemsize | :sl:`Returns the byte size of a pixel array item` | :sg:`itemsize -> int` This is the same as :meth:`Surface.get_bytesize` for the pixel array's surface. .. versionadded:: 1.9.2 .. attribute:: ndim | :sl:`Returns the number of dimensions.` | :sg:`ndim -> int` A pixel array can be 1 or 2 dimensional. .. versionadded:: 1.9.2 .. attribute:: shape | :sl:`Returns the array size.` | :sg:`shape -> tuple of int's` A tuple or length :attr:`ndim` giving the length of each dimension. Analogous to :meth:`Surface.get_size`. .. versionadded:: 1.9.2 .. attribute:: strides | :sl:`Returns byte offsets for each array dimension.` | :sg:`strides -> tuple of int's` A tuple or length :attr:`ndim` byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step). .. versionadded:: 1.9.2 .. method:: make_surface | :sl:`Creates a new Surface from the current PixelArray.` | :sg:`make_surface() -> Surface` Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface. :: # Create a new surface flipped around the vertical axis. sf = pxarray[:,::-1].make_surface () .. versionadded:: 1.8.1 .. ## PixelArray.make_surface ## .. method:: replace | :sl:`Replaces the passed color in the PixelArray with another one.` | :sg:`replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None` Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well. This is an in place operation that directly affects the pixels of the PixelArray. .. versionadded:: 1.8.1 .. ## PixelArray.replace ## .. method:: extract | :sl:`Extracts the passed color from the PixelArray.` | :sg:`extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray` Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well. .. versionadded:: 1.8.1 .. ## PixelArray.extract ## .. method:: compare | :sl:`Compares the PixelArray with another one.` | :sg:`compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray` Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays. Both PixelArray objects must have identical bit depths and dimensions. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as a threshold for the color detection. This causes the comparison to mark pixels with a similar, but not exactly identical color, as white. .. versionadded:: 1.8.1 .. ## PixelArray.compare ## .. method:: transpose | :sl:`Exchanges the x and y axis.` | :sg:`transpose() -> PixelArray` This method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array. .. versionadded:: 1.9.2 .. ## PixelArray.transpose ## .. method:: close | :sl:`Closes the PixelArray, and releases Surface lock.` | :sg:`close() -> PixelArray` This method is for explicitly closing the PixelArray, and releasing a lock on the Surface. .. versionadded:: 1.9.4 .. ## PixelArray.close ## .. ## pygame.PixelArray ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/pixelcopy.rst0000644000175100001770000001066314676242340017554 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.pixelcopy` ======================= .. module:: pygame.pixelcopy :synopsis: pygame module for general pixel array copying | :sl:`pygame module for general pixel array copying` The ``pygame.pixelcopy`` module contains functions for copying between surfaces and objects exporting an array structure interface. It is a backend for :mod:`pygame.surfarray`, adding NumPy support. But pixelcopy is more general, and intended for direct use. The array struct interface exposes an array's data in a standard way. It was introduced in NumPy. In Python 2.7 and above it is replaced by the new buffer protocol, though the buffer protocol is still a work in progress. The array struct interface, on the other hand, is stable and works with earlier Python versions. So for now the array struct interface is the predominate way pygame handles array introspection. For 2d arrays of integer pixel values, the values are mapped to the pixel format of the related surface. To get the actual color of a pixel value use :meth:`pygame.Surface.unmap_rgb`. 2d arrays can only be used directly between surfaces having the same pixel layout. New in pygame 1.9.2. .. function:: surface_to_array | :sl:`copy surface pixels to an array object` | :sg:`surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None` The surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument ``kind`` and the target array dimension, a copy may be raw pixel value, RGB, a color component slice, or colorkey alpha transparency value. Recognized ``kind`` values are the single character codes 'P', 'R', 'G', 'B', 'A', and 'C'. Kind codes are case insensitive, so 'p' is equivalent to 'P'. The first two dimensions of the target must be the surface size (w, h). The default 'P' kind code does a direct raw integer pixel (mapped) value copy to a 2D array and a 'RGB' pixel component (unmapped) copy to a 3D array having shape (w, h, 3). For an 8 bit colormap surface this means the table index is copied to a 2D array, not the table value itself. A 2D array's item size must be at least as large as the surface's pixel byte size. The item size of a 3D array must be at least one byte. For the 'R', 'G', 'B', and 'A' copy kinds a single color component of the unmapped surface pixels are copied to the target 2D array. For kind 'A' and surfaces with source alpha (the surface was created with the SRCALPHA flag), has a colorkey (set with :meth:`Surface.set_colorkey() `), or has a blanket alpha (set with :meth:`Surface.set_alpha() `) then the alpha values are those expected for a SDL surface. If a surface has no explicit alpha value, then the target array is filled with the value of the optional ``opaque`` surface_to_array argument (default 255: not transparent). Copy kind 'C' is a special case for alpha copy of a source surface with colorkey. Unlike the 'A' color component copy, the ``clear`` argument value is used for colorkey matches, ``opaque`` otherwise. By default, a match has alpha 0 (totally transparent), while everything else is alpha 255 (totally opaque). It is a more general implementation of :meth:`pygame.surfarray.array_colorkey`. Specific to surface_to_array, a ValueError is raised for target arrays with incorrect shape or item size. A TypeError is raised for an incorrect kind code. Surface specific problems, such as locking, raise a pygame.error. .. ## pygame.pixelcopy.surface_to_array ## .. function:: array_to_surface | :sl:`copy an array object to a surface` | :sg:`array_to_surface(, ) -> None` See :func:`pygame.surfarray.blit_array`. .. ## pygame.pixelcopy.array_to_surface ## .. function:: map_array | :sl:`copy an array to another array, using surface format` | :sg:`map_array(, , ) -> None` Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of . .. ## pygame.pixelcopy.map_array ## .. function:: make_surface | :sl:`Copy an array to a new surface` | :sg:`pygame.pixelcopy.make_surface(array) -> Surface` Create a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values. .. ## pygame.pixelcopy.make_surface ## .. ## pygame.pixelcopy ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/pygame.rst0000644000175100001770000003543114676242340017022 0ustar00runnerdocker.. include:: common.txt :mod:`pygame` ============= .. module:: pygame :synopsis: the top level pygame package | :sl:`the top level pygame package` The pygame package represents the top-level package for others to use. Pygame itself is broken into many submodules, but this does not affect programs that use pygame. As a convenience, most of the top-level variables in pygame have been placed inside a module named :mod:`pygame.locals`. This is meant to be used with ``from pygame.locals import *``, in addition to ``import pygame``. When you ``import pygame`` all available pygame submodules are automatically imported. Be aware that some of the pygame modules are considered *optional*, and may not be available. In that case, pygame will provide a placeholder object instead of the module, which can be used to test for availability. .. function:: init | :sl:`initialize all imported pygame modules` | :sg:`init() -> (numpass, numfail)` Initialize all imported pygame modules. No exceptions will be raised if a module fails, but the total number if successful and failed inits will be returned as a tuple. You can always initialize individual modules manually, but :func:`pygame.init` is a convenient way to get everything started. The ``init()`` functions for individual modules will raise exceptions when they fail. You may want to initialize the different modules separately to speed up your program or remove the modules your game does not require. It is safe to call this ``init()`` more than once as repeated calls will have no effect. This is true even if you have ``pygame.quit()`` all the modules. .. ## pygame.init ## .. function:: quit | :sl:`uninitialize all pygame modules` | :sg:`quit() -> None` Uninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is safe to call this function more than once as repeated calls have no effect. .. note:: Calling :func:`pygame.quit` will not exit your program. Consider letting your program end in the same way a normal Python program will end. .. ## pygame.quit ## .. function:: get_init | :sl:`returns True if pygame is currently initialized` | :sg:`get_init() -> bool` Returns ``True`` if pygame is currently initialized. .. versionadded:: 1.9.5 .. ## pygame.get_init ## .. exception:: error | :sl:`standard pygame exception` | :sg:`raise pygame.error(message)` This exception is raised whenever a pygame or SDL operation fails. You can catch any anticipated problems and deal with the error. The exception is always raised with a descriptive message about the problem. Derived from the ``RuntimeError`` exception, which can also be used to catch these raised errors. .. ## pygame.error ## .. function:: get_error | :sl:`get the current error message` | :sg:`get_error() -> errorstr` SDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed. .. ## pygame.get_error ## .. function:: set_error | :sl:`set the current error message` | :sg:`set_error(error_msg) -> None` SDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed. .. ## pygame.set_error ## .. function:: get_sdl_version | :sl:`get the version number of SDL` | :sg:`get_sdl_version(linked=True) -> major, minor, patch` Returns the three version numbers of the SDL library. ``linked=True`` will cause the function to return the version of the library that pygame is linked against while ``linked=False`` will cause the function to return the version of the library that pygame is compiled against. It can be used to detect which features may or may not be available through pygame. .. versionadded:: 1.7.0 .. versionchanged:: 2.2.0 ``linked`` keyword argument added .. ## pygame.get_sdl_version ## .. function:: get_sdl_byteorder | :sl:`get the byte order of SDL` | :sg:`get_sdl_byteorder() -> int` Returns the byte order of the SDL library. It returns ``1234`` for little endian byte order and ``4321`` for big endian byte order. .. versionadded:: 1.8 .. ## pygame.get_sdl_byteorder ## .. function:: register_quit | :sl:`register a function to be called when pygame quits` | :sg:`register_quit(callable) -> None` When :func:`pygame.quit` is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed. .. ## pygame.register_quit ## .. function:: encode_string | :sl:`Encode a Unicode or bytes object` | :sg:`encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None` obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``. encoding (string): If present, encoding to use. The default is ``'unicode_escape'``. errors (string): If given, how to handle unencodable characters. The default is ``'backslashreplace'``. etype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``. For the default encoding and errors values there should be no encoding errors. This function is used in encoding file paths. Keyword arguments are supported. .. versionadded:: 1.9.2 (primarily for use in unit tests) .. ## pygame.encode_string ## .. function:: encode_file_path | :sl:`Encode a Unicode or bytes object as a file system path` | :sg:`encode_file_path([obj [, etype]]) -> bytes or None` obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``. etype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``. This function is used to encode file paths in pygame. Encoding is to the codec as returned by ``sys.getfilesystemencoding()``. Keyword arguments are supported. .. versionadded:: 1.9.2 (primarily for use in unit tests) .. ## pygame.encode_file_path ## :mod:`pygame.version` ===================== .. module:: pygame.version :synopsis: small module containing version information | :sl:`small module containing version information` This module is automatically imported into the pygame package and can be used to check which version of pygame has been imported. .. data:: ver | :sl:`version number as a string` | :sg:`ver = '1.2'` This is the version represented as a string. It can contain a micro release number as well, e.g. ``'1.5.2'`` .. ## pygame.version.ver ## .. data:: vernum | :sl:`tupled integers of the version` | :sg:`vernum = (1, 5, 3)` This version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this: :: if pygame.version.vernum < (1, 5): print('Warning, older version of pygame (%s)' % pygame.version.ver) disable_advanced_features = True .. versionadded:: 1.9.6 Attributes ``major``, ``minor``, and ``patch``. :: vernum.major == vernum[0] vernum.minor == vernum[1] vernum.patch == vernum[2] .. versionchanged:: 1.9.6 ``str(pygame.version.vernum)`` returns a string like ``"2.0.0"`` instead of ``"(2, 0, 0)"``. .. versionchanged:: 1.9.6 ``repr(pygame.version.vernum)`` returns a string like ``"PygameVersion(major=2, minor=0, patch=0)"`` instead of ``"(2, 0, 0)"``. .. ## pygame.version.vernum ## .. data:: rev | :sl:`repository revision of the build` | :sg:`rev = 'a6f89747b551+'` The Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds. Important note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string ``""``. It has always been returning an empty string since ``v1.9.5``. .. versionchanged:: 1.9.5 Always returns an empty string ``""``. .. ## pygame.version.rev ## .. data:: SDL | :sl:`tupled integers of the SDL library version` | :sg:`SDL = '(2, 0, 12)'` This is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this: :: >>> pygame.version.SDL.major 2 printing the whole thing returns a string like this: :: >>> pygame.version.SDL SDLVersion(major=2, minor=0, patch=12) .. versionadded:: 2.0.0 .. ## pygame.version.SDL ## .. ## pygame.version ## .. ## pygame ## .. _environment-variables: **Setting Environment Variables** Some aspects of pygame's behaviour can be controlled by setting environment variables, they cover a wide range of the library's functionality. Some of the variables are from pygame itself, while others come from the underlying C SDL library that pygame uses. In python, environment variables are usually set in code like this:: import os os.environ['NAME_OF_ENVIRONMENT_VARIABLE'] = 'value_to_set' Or to preserve users ability to override the variable:: import os os.environ['ENV_VAR'] = os.environ.get('ENV_VAR', 'value') If the variable is more useful for users of an app to set than the developer then they can set it like this: **Windows**:: set NAME_OF_ENVIRONMENT_VARIABLE=value_to_set python my_application.py **Linux/Mac**:: ENV_VAR=value python my_application.py For some variables they need to be set before initialising pygame, some must be set before even importing pygame, and others can simply be set right before the area of code they control is run. Below is a list of environment variables, their settable values, and a brief description of what they do. | **Pygame Environment Variables** These variables are defined by pygame itself. | :: PYGAME_DISPLAY - Experimental (subject to change) Set index of the display to use, "0" is the default. This sets the display where pygame will open its window or screen. The value set here will be used if set before calling :func:`pygame.display.set_mode()`, and as long as no 'display' parameter is passed into :func:`pygame.display.set_mode()`. | :: PYGAME_FORCE_SCALE - Set to "photo" or "default". This forces set_mode() to use the SCALED display mode and, if "photo" is set, makes the scaling use the slowest, but highest quality anisotropic scaling algorithm, if it is available. Must be set before calling :func:`pygame.display.set_mode()`. | :: PYGAME_BLEND_ALPHA_SDL2 - New in pygame 2.0.0 Set to "1" to enable the SDL2 blitter. This makes pygame use the SDL2 blitter for all alpha blending. The SDL2 blitter is sometimes faster than the default blitter but uses a different formula so the final colours may differ. Must be set before :func:`pygame.init()` is called. | :: PYGAME_HIDE_SUPPORT_PROMPT - Set to "1" to hide the prompt. This stops the welcome message popping up in the console that tells you which version of python, pygame & SDL you are using. Must be set before importing pygame. | :: PYGAME_FREETYPE - Set to "1" to enable. This switches the pygame.font module to a pure freetype implementation that bypasses SDL_ttf. See the font module for why you might want to do this. Must be set before importing pygame. | :: PYGAME_CAMERA - Set to "opencv" or "vidcapture" Forces the library backend used in the camera module, overriding the platform defaults. Must be set before calling :func:`pygame.camera.init()`. In pygame 2.0.3, backends can be set programmatically instead, and the old OpenCV backend has been replaced with one on top of "opencv-python," rather than the old "highgui" OpenCV port. Also, there is a new native Windows backend available. | | **SDL Environment Variables** These variables are defined by SDL. For documentation on the environment variables available in pygame 1 try `here `__. For Pygame 2, some selected environment variables are listed below. | :: SDL_VIDEO_CENTERED - Set to "1" to enable centering the window. This will make the pygame window open in the centre of the display. Must be set before calling :func:`pygame.display.set_mode()`. | :: SDL_VIDEO_WINDOW_POS - Set to "x,y" to position the top left corner of the window. This allows control over the placement of the pygame window within the display. Must be set before calling :func:`pygame.display.set_mode()`. | :: SDL_VIDEODRIVER - Set to "drivername" to change the video driver used. On some platforms there are multiple video drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.display.init()`. | :: SDL_AUDIODRIVER - Set to "drivername" to change the audio driver used. On some platforms there are multiple audio drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.mixer.init()`. | :: SDL_VIDEO_ALLOW_SCREENSAVER Set to "1" to allow screensavers while pygame apps are running. By default pygame apps disable screensavers while they are running. Setting this environment variable allows users or developers to change that and make screensavers run again. | :: SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR Set to "0" to re-enable the compositor. By default SDL tries to disable the X11 compositor for all pygame apps. This is usually a good thing as it's faster, however if you have an app which *doesn't* update every frame and are using linux you may want to disable this bypass. The bypass has reported problems on KDE linux. This variable is only used on x11/linux platforms. | :: SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS Set to "1" to allow joysticks to be updated even when the window is out of focus By default, when the window is not in focus, input devices do not get updated. However, using this environment variable it is possible to get joystick updates even when the window is in the background. Must be set before calling :func:`pygame.init()` or :func:`pygame.joystick.init()`. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/rect.rst0000644000175100001770000005123314676242340016473 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Rect` ================== .. currentmodule:: pygame .. class:: Rect | :sl:`pygame object for storing rectangular coordinates` | :sg:`Rect(left, top, width, height) -> Rect` | :sg:`Rect((left, top), (width, height)) -> Rect` | :sg:`Rect(object) -> Rect` Pygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. Rects can also be created from Python objects that are already a Rect or have an attribute named "rect". Any Pygame function that requires a Rect argument also accepts any of these values to construct a Rect. This makes it easier to create Rects on the fly as arguments for functions. The Rect functions that change the position or size of a Rect return a new copy of the Rect with the affected changes. The original Rect is not modified. Some methods have an alternate "in-place" version that returns None but affects the original Rect. These "in-place" methods are denoted with the "ip" suffix. The Rect object has several virtual attributes which can be used to move and align the Rect: :: x,y top, left, bottom, right topleft, bottomleft, topright, bottomright midtop, midleft, midbottom, midright center, centerx, centery size, width, height w,h All of these attributes can be assigned to: :: rect1.right = 10 rect2.center = (20,30) Assigning to size, width or height changes the dimensions of the rectangle; all other assignments move the rectangle without resizing it. Notice that some attributes are integers and others are pairs of integers. If a Rect has a nonzero width or height, it will return ``True`` for a nonzero test. Some methods return a Rect with 0 size to represent an invalid rectangle. A Rect with a 0 size will not collide when using collision detection methods (e.g. :meth:`collidepoint`, :meth:`colliderect`, etc.). The coordinates for Rect objects are all integers. The size values can be programmed to have negative values, but these are considered illegal Rects for most operations. There are several collision tests between other rectangles. Most python containers can be searched for collisions against a single Rect. The area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and ``rect1.colliderect(rect2)`` returns false. The Rect object is also iterable: :: r = Rect(0, 1, 2, 3) x, y, w, h = r .. versionadded:: 1.9.2 The Rect class can be subclassed. Methods such as ``copy()`` and ``move()`` will recognize this and return instances of the subclass. However, the subclass's ``__init__()`` method is not called, and ``__new__()`` is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied. .. method:: copy | :sl:`copy the rectangle` | :sg:`copy() -> Rect` Returns a new rectangle having the same position and size as the original. New in pygame 1.9 .. ## Rect.copy ## .. method:: move | :sl:`moves the rectangle` | :sg:`move(x, y) -> Rect` Returns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative. .. ## Rect.move ## .. method:: move_ip | :sl:`moves the rectangle, in place` | :sg:`move_ip(x, y) -> None` Same as the ``Rect.move()`` method, but operates in place. .. ## Rect.move_ip ## .. method:: inflate | :sl:`grow or shrink the rectangle size` | :sg:`inflate(x, y) -> Rect` Returns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off. .. ## Rect.inflate ## .. method:: inflate_ip | :sl:`grow or shrink the rectangle size, in place` | :sg:`inflate_ip(x, y) -> None` Same as the ``Rect.inflate()`` method, but operates in place. .. ## Rect.inflate_ip ## .. method:: scale_by | :sl:`scale the rectangle by given a multiplier` | :sg:`scale_by(scalar) -> Rect` | :sg:`scale_by(scalex, scaley) -> Rect` Returns a new rectangle with the size scaled by the given multipliers. The rectangle remains centered around its current center. A single scalar or separate width and height scalars are allowed. Values above one will increase the size of the rectangle, whereas values between zero and one will decrease the size of the rectangle. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.scale_by ## .. method:: scale_by_ip | :sl:`grow or shrink the rectangle size, in place` | :sg:`scale_by_ip(scalar) -> None` | :sg:`scale_by_ip(scalex, scaley) -> None` Same as the ``Rect.scale_by()`` method, but operates in place. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.scale_by_ip ## .. method:: update | :sl:`sets the position and size of the rectangle` | :sg:`update(left, top, width, height) -> None` | :sg:`update((left, top), (width, height)) -> None` | :sg:`update(object) -> None` Sets the position and size of the rectangle, in place. See parameters for :meth:`pygame.Rect` for the parameters of this function. .. versionadded:: 2.0.1 .. ## Rect.update ## .. method:: clamp | :sl:`moves the rectangle inside another` | :sg:`clamp(Rect) -> Rect` Returns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed. .. ## Rect.clamp ## .. method:: clamp_ip | :sl:`moves the rectangle inside another, in place` | :sg:`clamp_ip(Rect) -> None` Same as the ``Rect.clamp()`` method, but operates in place. .. ## Rect.clamp_ip ## .. method:: clip | :sl:`crops a rectangle inside another` | :sg:`clip(Rect) -> Rect` Returns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned. .. ## Rect.clip ## .. method:: clipline | :sl:`crops a line inside a rectangle` | :sg:`clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline(x1, y1, x2, y2) -> ()` | :sg:`clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline((x1, y1), (x2, y2)) -> ()` | :sg:`clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline((x1, y1, x2, y2)) -> ()` | :sg:`clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline(((x1, y1), (x2, y2))) -> ()` Returns the coordinates of a line that is cropped to be completely inside the rectangle. If the line does not overlap the rectangle, then an empty tuple is returned. The line to crop can be any of the following formats (floats can be used in place of ints, but they will be truncated): - four ints - 2 lists/tuples/Vector2s of 2 ints - a list/tuple of four ints - a list/tuple of 2 lists/tuples/Vector2s of 2 ints :returns: a tuple with the coordinates of the given line cropped to be completely inside the rectangle is returned, if the given line does not overlap the rectangle, an empty tuple is returned :rtype: tuple(tuple(int, int), tuple(int, int)) or () :raises TypeError: if the line coordinates are not given as one of the above described line formats .. note :: This method can be used for collision detection between a rect and a line. See example code below. .. note :: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. :: # Example using clipline(). clipped_line = rect.clipline(line) if clipped_line: # If clipped_line is not an empty tuple then the line # collides/overlaps with the rect. The returned value contains # the endpoints of the clipped line. start, end = clipped_line x1, y1 = start x2, y2 = end else: print("No clipping. The line is fully outside the rect.") .. versionchanged:: 2.5.0 Added support for keyword arguments. .. versionadded:: 2.0.0 .. ## Rect.clipline ## .. method:: union | :sl:`joins two rectangles into one` | :sg:`union(Rect) -> Rect` Returns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals. .. ## Rect.union ## .. method:: union_ip | :sl:`joins two rectangles into one, in place` | :sg:`union_ip(Rect) -> None` Same as the ``Rect.union()`` method, but operates in place. .. ## Rect.union_ip ## .. method:: unionall | :sl:`the union of many rectangles` | :sg:`unionall(Rect_sequence) -> Rect` Returns the union of one rectangle with a sequence of many rectangles. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.unionall ## .. method:: unionall_ip | :sl:`the union of many rectangles, in place` | :sg:`unionall_ip(Rect_sequence) -> None` The same as the ``Rect.unionall()`` method, but operates in place. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.unionall_ip ## .. method:: fit | :sl:`resize and move a rectangle with aspect ratio` | :sg:`fit(Rect) -> Rect` Returns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height. .. ## Rect.fit ## .. method:: normalize | :sl:`correct negative sizes` | :sg:`normalize() -> None` This will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped. .. ## Rect.normalize ## .. method:: contains | :sl:`test if one rectangle is inside another` | :sg:`contains(Rect) -> bool` Returns true when the argument is completely inside the Rect. .. ## Rect.contains ## .. method:: collidepoint | :sl:`test if a point is inside a rectangle` | :sg:`collidepoint(x, y) -> bool` | :sg:`collidepoint((x,y)) -> bool` Returns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle. .. note :: For collision detection between a rect and a line the :meth:`clipline` method can be used. .. ## Rect.collidepoint ## .. method:: colliderect | :sl:`test if two rectangles overlap` | :sg:`colliderect(Rect) -> bool` Returns true if any portion of either rectangle overlap (except the top+bottom or left+right edges). .. note :: For collision detection between a rect and a line the :meth:`clipline` method can be used. .. ## Rect.colliderect ## .. method:: collidelist | :sl:`test if one rectangle in a list intersects` | :sg:`collidelist(list) -> index` Test whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidelist ## .. method:: collidelistall | :sl:`test if all rectangles in a list intersect` | :sg:`collidelistall(list) -> indices` Returns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned. Not only Rects are valid arguments, but these are all valid calls: .. code-block:: python Rect = pygame.Rect r = Rect(0, 0, 10, 10) list_of_rects = [Rect(1, 1, 1, 1), Rect(2, 2, 2, 2)] indices0 = r.collidelistall(list_of_rects) list_of_lists = [[1, 1, 1, 1], [2, 2, 2, 2]] indices1 = r.collidelistall(list_of_lists) list_of_tuples = [(1, 1, 1, 1), (2, 2, 2, 2)] indices2 = r.collidelistall(list_of_tuples) list_of_double_tuples = [((1, 1), (1, 1)), ((2, 2), (2, 2))] indices3 = r.collidelistall(list_of_double_tuples) class ObjectWithRectAttribute(object): def __init__(self, r): self.rect = r list_of_object_with_rect_attribute = [ ObjectWithRectAttribute(Rect(1, 1, 1, 1)), ObjectWithRectAttribute(Rect(2, 2, 2, 2)), ] indices4 = r.collidelistall(list_of_object_with_rect_attribute) class ObjectWithCallableRectAttribute(object): def __init__(self, r): self._rect = r def rect(self): return self._rect list_of_object_with_callable_rect = [ ObjectWithCallableRectAttribute(Rect(1, 1, 1, 1)), ObjectWithCallableRectAttribute(Rect(2, 2, 2, 2)), ] indices5 = r.collidelistall(list_of_object_with_callable_rect) .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidelistall ## .. method:: collideobjects | :sl:`test if any object in a list intersects` | :sg:`collideobjects(rect_list) -> object` | :sg:`collideobjects(obj_list, key=func) -> object` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjects feedback with authors `_ Test whether the rectangle collides with any object in the sequence. The object of the first collision found is returned. If no collisions are found then ``None`` is returned If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them. .. code-block:: python r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjects(rects) # -> print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ObjectWithSomRectAttribute("B", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("C", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ] # collision = r.collideobjects(objects) # this does not work because the items in the list are no Rect like object collision = r.collideobjects( objects, key=lambda o: o.collision_box ) # -> print(collision) screen_rect = r.collideobjects(objects, key=lambda o: o.draw_rect) # -> None print(screen_rect) .. versionadded:: 2.1.3 .. ## Rect.collideobjects ## .. method:: collideobjectsall | :sl:`test if all objects in a list intersect` | :sg:`collideobjectsall(rect_list) -> objects` | :sg:`collideobjectsall(obj_list, key=func) -> objects` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjectsall feedback with authors `_ Returns a list of all the objects that contain rectangles that collide with the Rect. If no intersecting objects are found, an empty list is returned. If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them. .. code-block:: python r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjectsall( rects ) # -> [, , ] print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("B", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ObjectWithSomRectAttribute("C", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ] # collisions = r.collideobjectsall(objects) # this does not work because ObjectWithSomRectAttribute is not a Rect like object collisions = r.collideobjectsall( objects, key=lambda o: o.collision_box ) # -> [, ] print(collisions) screen_rects = r.collideobjectsall(objects, key=lambda o: o.draw_rect) # -> [] print(screen_rects) .. versionadded:: 2.1.3 .. ## Rect.collideobjectsall ## .. method:: collidedict | :sl:`test if one rectangle in a dictionary intersects` | :sg:`collidedict(dict) -> (key, value)` | :sg:`collidedict(dict) -> None` | :sg:`collidedict(dict, use_values=0) -> (key, value)` | :sg:`collidedict(dict, use_values=0) -> None` Returns the first key and value pair that intersects with the calling Rect object. If no collisions are found, ``None`` is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used. .. note :: Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedict({tuple(key_rect) : value})`` .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidedict ## .. method:: collidedictall | :sl:`test if all rectangles in a dictionary intersect` | :sg:`collidedictall(dict) -> [(key, value), ...]` | :sg:`collidedictall(dict, use_values=0) -> [(key, value), ...]` Returns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used. .. note :: Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedictall({tuple(key_rect) : value})`` .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidedictall ## .. ## pygame.Rect ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/scrap.rst0000644000175100001770000001746414676242340016656 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.scrap` =================== .. module:: pygame.scrap :synopsis: pygame module for clipboard support. | :sl:`pygame module for clipboard support.` **EXPERIMENTAL!**: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release. The scrap module is for transferring data to/from the clipboard. This allows for cutting and pasting data between pygame and other applications. Some basic data (MIME) types are defined and registered: :: pygame string constant value description -------------------------------------------------- SCRAP_TEXT "text/plain" plain text SCRAP_BMP "image/bmp" BMP encoded image data SCRAP_PBM "image/pbm" PBM encoded image data SCRAP_PPM "image/ppm" PPM encoded image data ``pygame.SCRAP_PPM``, ``pygame.SCRAP_PBM`` and ``pygame.SCRAP_BMP`` are suitable for surface buffers to be shared with other applications. ``pygame.SCRAP_TEXT`` is an alias for the plain text clipboard type. Depending on the platform, additional types are automatically registered when data is placed into the clipboard to guarantee a consistent sharing behaviour with other applications. The following listed types can be used as strings to be passed to the respective :mod:`pygame.scrap` module functions. For **Windows** platforms, these additional types are supported automatically and resolve to their internal definitions: :: "text/plain;charset=utf-8" UTF-8 encoded text "audio/wav" WAV encoded audio "image/tiff" TIFF encoded image data For **X11** platforms, these additional types are supported automatically and resolve to their internal definitions: :: "text/plain;charset=utf-8" UTF-8 encoded text "UTF8_STRING" UTF-8 encoded text "COMPOUND_TEXT" COMPOUND text User defined types can be used, but the data might not be accessible by other applications unless they know what data type to look for. Example: Data placed into the clipboard by ``pygame.scrap.put("my_data_type", byte_data)`` can only be accessed by applications which query the clipboard for the ``"my_data_type"`` data type. For an example of how the scrap module works refer to the examples page (:func:`pygame.examples.scrap_clipboard.main`) or the code directly in GitHub (`pygame/examples/scrap_clipboard.py `_). .. versionadded:: 1.8 .. note:: The scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases. .. function:: init | :sl:`Initializes the scrap module.` | :sg:`init() -> None` Initialize the scrap module. :raises pygame.error: if unable to initialize scrap module .. note:: The scrap module requires :func:`pygame.display.set_mode()` be called before being initialized. .. ## pygame.scrap.init ## .. function:: get_init | :sl:`Returns True if the scrap module is currently initialized.` | :sg:`get_init() -> bool` Gets the scrap module's initialization state. :returns: ``True`` if the :mod:`pygame.scrap` module is currently initialized, ``False`` otherwise :rtype: bool .. versionadded:: 1.9.5 .. ## pygame.scrap.get_init ## .. function:: get | :sl:`Gets the data for the specified type from the clipboard.` | :sg:`get(type) -> bytes | None` Retrieves the data for the specified type from the clipboard. The data is returned as a byte string and might need further processing (such as decoding to Unicode). :param string type: data type to retrieve from the clipboard :returns: data (bytes object) for the given type identifier or ``None`` if no data for the given type is available :rtype: bytes | None :: text = pygame.scrap.get(pygame.SCRAP_TEXT) if text: print("There is text in the clipboard.") else: print("There does not seem to be text in the clipboard.") .. ## pygame.scrap.get ## .. function:: get_types | :sl:`Gets a list of the available clipboard types.` | :sg:`get_types() -> list` Gets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the :func:`pygame.scrap.get()` method to get the clipboard content of the specific type. :returns: list of strings of the available clipboard data types, if there is no data in the clipboard an empty list is returned :rtype: list :: for t in pygame.scrap.get_types(): if "text" in t: # There is some content with the word "text" in its type string. print(pygame.scrap.get(t)) .. ## pygame.scrap.get_types ## .. function:: put | :sl:`Places data into the clipboard.` | :sg:`put(type, data) -> None` Places data for a given clipboard type into the clipboard. The data must be a string buffer. The type is a string identifying the type of data to be placed into the clipboard. This can be one of the predefined ``pygame.SCRAP_PBM``, ``pygame.SCRAP_PPM``, ``pygame.SCRAP_BMP`` or ``pygame.SCRAP_TEXT`` values or a user defined string identifier. :param string type: type identifier of the data to be placed into the clipboard :param data: data to be place into the clipboard, a bytes object :type data: bytes :raises pygame.error: if unable to put the data into the clipboard :: with open("example.bmp", "rb") as fp: pygame.scrap.put(pygame.SCRAP_BMP, fp.read()) # The image data is now on the clipboard for other applications to access # it. pygame.scrap.put(pygame.SCRAP_TEXT, b"A text to copy") pygame.scrap.put("Plain text", b"Data for user defined type 'Plain text'") .. ## pygame.scrap.put ## .. function:: contains | :sl:`Checks whether data for a given type is available in the clipboard.` | :sg:`contains(type) -> bool` Checks whether data for the given type is currently available in the clipboard. :param string type: data type to check availability of :returns: ``True`` if data for the passed type is available in the clipboard, ``False`` otherwise :rtype: bool :: if pygame.scrap.contains(pygame.SCRAP_TEXT): print("There is text in the clipboard.") if pygame.scrap.contains("own_data_type"): print("There is stuff in the clipboard.") .. ## pygame.scrap.contains ## .. function:: lost | :sl:`Indicates if the clipboard ownership has been lost by the pygame application.` | :sg:`lost() -> bool` Indicates if the clipboard ownership has been lost by the pygame application. :returns: ``True``, if the clipboard ownership has been lost by the pygame application, ``False`` if the pygame application still owns the clipboard :rtype: bool :: if pygame.scrap.lost(): print("The clipboard is in use by another application.") .. ## pygame.scrap.lost ## .. function:: set_mode | :sl:`Sets the clipboard access mode.` | :sg:`set_mode(mode) -> None` Sets the access mode for the clipboard. This is only of interest for X11 environments where clipboard modes ``pygame.SCRAP_SELECTION`` (for mouse selections) and ``pygame.SCRAP_CLIPBOARD`` (for the clipboard) are available. Setting the mode to ``pygame.SCRAP_SELECTION`` in other environments will not change the mode from ``pygame.SCRAP_CLIPBOARD``. :param mode: access mode, supported values are ``pygame.SCRAP_CLIPBOARD`` and ``pygame.SCRAP_SELECTION`` (``pygame.SCRAP_SELECTION`` only has an effect when used on X11 platforms) :raises ValueError: if the ``mode`` parameter is not ``pygame.SCRAP_CLIPBOARD`` or ``pygame.SCRAP_SELECTION`` .. ## pygame.scrap.set_mode ## .. ## pygame.scrap ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/sdl2_controller.rst0000644000175100001770000002227114676242340020645 0ustar00runnerdocker.. include:: common.txt :mod:`pygame._sdl2.controller` ============================== .. module:: pygame._sdl2.controller :synopsis: pygame module to work with controllers | :sl:`Pygame module to work with controllers.` .. note:: Use import pygame._sdl2.controller before using this module. This module offers control over common controller types like the dualshock 4 or the xbox 360 controllers: They have two analog sticks, two triggers, two shoulder buttons, a dpad, 4 buttons on the side, 2 (or 3) buttons in the middle. Pygame uses xbox controllers naming conventions (like a, b, x, y for buttons) but they always refer to the same buttons. For example ``CONTROLLER_BUTTON_X`` is always the leftmost button of the 4 buttons on the right. Controllers can generate the following events:: CONTROLLERAXISMOTION, CONTROLLERBUTTONDOWN, CONTROLLERBUTTONUP, CONTROLLERDEVICEREMAPPED, CONTROLLERDEVICEADDED, CONTROLLERDEVICEREMOVED Additionally if pygame is built with SDL 2.0.14 or higher the following events can also be generated (to get the version of sdl pygame is built with use :meth:`pygame.version.SDL`):: CONTROLLERTOUCHPADDOWN, CONTROLLERTOUCHPADMOTION, CONTROLLERTOUCHPADUP These events can be enabled/disabled by :meth:`pygame._sdl2.controller.set_eventstate` Note that controllers can generate joystick events as well. This function only toggles events related to controllers. .. note:: See the :mod:`pygame.joystick` for a more versatile but more advanced api. .. versionadded:: 2 This module requires SDL2. .. function:: init | :sl:`initialize the controller module` | :sg:`init() -> None` Initialize the controller module. .. ## pygame._sdl2.controller.init ## .. function:: quit | :sl:`Uninitialize the controller module.` | :sg:`quit() -> None` Uninitialize the controller module. .. ## pygame._sdl2.controller.quit ## .. function:: get_init | :sl:`Returns True if the controller module is initialized.` | :sg:`get_init() -> bool` Test if ``pygame._sdl2.controller.init()`` was called. .. ## pygame._sdl2.controller.get_init ## .. function:: set_eventstate | :sl:`Sets the current state of events related to controllers` | :sg:`set_eventstate(state) -> None` Enable or disable events connected to controllers. .. note:: Controllers can still generate joystick events, which will not be toggled by this function. .. versionchanged:: 2.0.2: Changed return type from int to None .. ## pygame._sdl2.controller.set_eventstate ## .. function:: get_eventstate | :sl:`Gets the current state of events related to controllers` | :sg:`get_eventstate() -> bool` Returns the current state of events related to controllers, True meaning events will be posted. .. versionadded:: 2.0.2 .. ## pygame._sdl2.controller.get_eventstate ## .. function:: get_count | :sl:`Get the number of joysticks connected` | :sg:`get_count() -> int` Get the number of joysticks connected. .. ## pygame._sdl2.controller.get_count ## .. function:: is_controller | :sl:`Check if the given joystick is supported by the game controller interface` | :sg:`is_controller(index) -> bool` Returns True if the index given can be used to create a controller object. .. ## pygame._sdl2.controller.is_controller ## .. function:: name_forindex | :sl:`Get the name of the controller` | :sg:`name_forindex(index) -> name or None` Returns the name of controller, or None if there's no name or the index is invalid. .. ## pygame._sdl2.controller.name_forindex ## .. class:: Controller | :sl:`Create a new Controller object.` | :sg:`Controller(index) -> Controller` Create a new Controller object. Index should be integer between 0 and ``pygame._sdl2.controller.get_count()``. Controllers also can be created from a ``pygame.joystick.Joystick`` using ``pygame._sdl2.controller.from_joystick``. Controllers are initialized on creation. .. method:: quit | :sl:`uninitialize the Controller` | :sg:`quit() -> None` Close a Controller object. After this the pygame event queue will no longer receive events from the device. It is safe to call this more than once. .. ## Controller.quit ## .. method:: get_init | :sl:`check if the Controller is initialized` | :sg:`get_init() -> bool` Returns True if the Controller object is currently initialised. .. ## Controller.get_init ## .. staticmethod:: from_joystick | :sl:`Create a Controller from a pygame.joystick.Joystick object` | :sg:`from_joystick(joystick) -> Controller` Create a Controller object from a ``pygame.joystick.Joystick`` object .. ## Controller.from_joystick ## .. method:: attached | :sl:`Check if the Controller has been opened and is currently connected.` | :sg:`attached() -> bool` Returns True if the Controller object is opened and connected. .. ## Controller.attached ## .. method:: as_joystick | :sl:`Returns a pygame.joystick.Joystick() object` | :sg:`as_joystick() -> Joystick object` Returns a pygame.joystick.Joystick() object created from this controller's index .. ## Controller.as_joystick ## .. method:: get_axis | :sl:`Get the current state of a joystick axis` | :sg:`get_axis(axis) -> int` Get the current state of a trigger or joystick axis. The axis argument must be one of the following constants:: CONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY, CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY, CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHT Joysticks can return a value between -32768 and 32767. Triggers however can only return a value between 0 and 32768. .. ## Controller.get_axis ## .. method:: get_button | :sl:`Get the current state of a button` | :sg:`get_button(button) -> bool` Get the current state of a button, True meaning it is pressed down. The button argument must be one of the following constants:: CONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B, CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_DPAD_DOWN, CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT, CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_RIGHTSHOULDER, CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_RIGHTSTICK, CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_GUIDE, CONTROLLER_BUTTON_START .. ## Controller.get_button ## .. method:: get_mapping | :sl:`Get the mapping assigned to the controller` | :sg:`get_mapping() -> mapping` Returns a dict containing the mapping of the Controller. For more information see :meth:`Controller.set_mapping()` .. versionchanged:: 2.0.2: Return type changed from ``str`` to ``dict`` .. ## Controller.get_mapping ## .. method:: set_mapping | :sl:`Assign a mapping to the controller` | :sg:`set_mapping(mapping) -> int` Rebind buttons, axes, triggers and dpads. The mapping should be a dict containing all buttons, hats and axes. The easiest way to get this is to use the dict returned by :meth:`Controller.get_mapping`. To edit this mapping assign a value to the original button. The value of the dictionary must be a button, hat or axis represented in the following way: * For a button use: bX where X is the index of the button. * For a hat use: hX.Y where X is the index and the Y is the direction (up: 1, right: 2, down: 3, left: 4). * For an axis use: aX where x is the index of the axis. An example of mapping:: mapping = controller.get_mapping() # Get current mapping mapping["a"] = "b3" # Remap button a to y mapping["y"] = "b0" # Remap button y to a controller.set_mapping(mapping) # Set the mapping The function will return 1 if a new mapping is added or 0 if an existing one is updated. .. versionchanged:: 2.0.2: Renamed from ``add_mapping`` to ``set_mapping`` .. versionchanged:: 2.0.2: Argument type changed from ``str`` to ``dict`` .. ## Controller.set_mapping ## .. method:: rumble | :sl:`Start a rumbling effect` | :sg:`rumble(low_frequency, high_frequency, duration) -> bool` Start a rumble effect on the controller, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Controller.stop_rumble` is called. If an effect is already playing, then it will be overwritten. Returns True if the rumble was played successfully or False if the controller does not support it or :meth:`pygame.version.SDL` is below 2.0.9. .. versionadded:: 2.0.2 .. ## Controller.rumble ## .. method:: stop_rumble | :sl:`Stop any rumble effect playing` | :sg:`stop_rumble() -> None` Stops any rumble effect playing on the controller. See :meth:`Controller.rumble` for more information. .. versionadded:: 2.0.2 .. ## Controller.stop_rumble ## .. ## pygame._sdl2.controller ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/sdl2_video.rst0000644000175100001770000002163514676242340017573 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sdl2_video` ======================== .. module:: pygame._sdl2.video :synopsis: Experimental pygame module for porting new SDL video systems .. warning:: This module isn't ready for prime time yet, it's still in development. These docs are primarily meant to help the pygame developers and super-early adopters who are in communication with the developers. This API will change. | :sl:`Experimental pygame module for porting new SDL video systems` .. class:: Window | :sl:`pygame object that represents a window` | :sg:`Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window` .. classmethod:: from_display_module | :sl:`Creates window using window created by pygame.display.set_mode().` | :sg:`from_display_module() -> Window` .. classmethod:: from_window | :sl:`Create Window from another window. Could be from another UI toolkit.` | :sg:`from_window(other) -> Window` .. attribute:: grab | :sl:`Gets or sets whether the mouse is confined to the window.` | :sg:`grab -> bool` .. attribute:: relative_mouse | :sl:`Gets or sets the window's relative mouse motion state.` | :sg:`relative_mouse -> bool` .. method:: set_windowed | :sl:`Enable windowed mode (exit fullscreen).` | :sg:`set_windowed() -> None` .. method:: set_fullscreen | :sl:`Enter fullscreen.` | :sg:`set_fullscreen(desktop=False) -> None` .. attribute:: title | :sl:`Gets or sets whether the window title.` | :sg:`title -> string` .. method:: destroy | :sl:`Destroys the window.` | :sg:`destroy() -> None` .. method:: hide | :sl:`Hide the window.` | :sg:`hide() -> None` .. method:: show | :sl:`Show the window.` | :sg:`show() -> None` .. method:: focus | :sl:`Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.` | :sg:`focus(input_only=False) -> None` .. method:: restore | :sl:`Restore the size and position of a minimized or maximized window.` | :sg:`restore() -> None` .. method:: maximize | :sl:`Maximize the window.` | :sg:`maximize() -> None` .. method:: minimize | :sl:`Minimize the window.` | :sg:`maximize() -> None` .. attribute:: resizable | :sl:`Gets and sets whether the window is resizable.` | :sg:`resizable -> bool` .. attribute:: borderless | :sl:`Add or remove the border from the window.` | :sg:`borderless -> bool` .. method:: set_icon | :sl:`Set the icon for the window.` | :sg:`set_icon(surface) -> None` .. attribute:: id | :sl:`Get the unique window ID. *Read-only*` | :sg:`id -> int` .. attribute:: size | :sl:`Gets and sets the window size.` | :sg:`size -> (int, int)` .. attribute:: position | :sl:`Gets and sets the window position.` | :sg:`position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED` .. attribute:: opacity | :sl:`Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).` | :sg:`opacity -> float` .. attribute:: display_index | :sl:`Get the index of the display that owns the window. *Read-only*` | :sg:`display_index -> int` .. method:: set_modal_for | :sl:`Set the window as a modal for a parent window. This function is only supported on X11.` | :sg:`set_modal_for(Window) -> None` .. class:: Texture | :sl:`pygame object that representing a Texture.` | :sg:`Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture` .. staticmethod:: from_surface | :sl:`Create a texture from an existing surface.` | :sg:`from_surface(renderer, surface) -> Texture` .. attribute:: renderer | :sl:`Gets the renderer associated with the Texture. *Read-only*` | :sg:`renderer -> Renderer` .. attribute:: width | :sl:`Gets the width of the Texture. *Read-only*` | :sg:`width -> int` .. attribute:: height | :sl:`Gets the height of the Texture. *Read-only*` | :sg:`height -> int` .. attribute:: alpha | :sl:`Gets and sets an additional alpha value multiplied into render copy operations.` | :sg:`alpha -> int` .. attribute:: blend_mode | :sl:`Gets and sets the blend mode for the Texture.` | :sg:`blend_mode -> int` .. attribute:: color | :sl:`Gets and sets an additional color value multiplied into render copy operations.` | :sg:`color -> color` .. method:: get_rect | :sl:`Get the rectangular area of the texture.` | :sg:`get_rect(**kwargs) -> Rect` .. method:: draw | :sl:`Copy a portion of the texture to the rendering target.` | :sg:`draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None` .. method:: update | :sl:`Update the texture with a Surface. WARNING: Slow operation, use sparingly.` | :sg:`update(surface, area=None) -> None` .. class:: Image | :sl:`Easy way to use a portion of a Texture without worrying about srcrect all the time.` | :sg:`Image(textureOrImage, srcrect=None) -> Image` .. method:: get_rect | :sl:`Get the rectangular area of the Image.` | :sg:`get_rect() -> Rect` .. method:: draw | :sl:`Copy a portion of the Image to the rendering target.` | :sg:`draw(srcrect=None, dstrect=None) -> None` .. attribute:: angle | :sl:`Gets and sets the angle the Image draws itself with.` | :sg:`angle -> float` .. attribute:: origin | :sl:`Gets and sets the origin. Origin=None means the Image will be rotated around its center.` | :sg:`origin -> (float, float) or None.` .. attribute:: flip_x | :sl:`Gets and sets whether the Image is flipped on the x axis.` | :sg:`flip_x -> bool` .. attribute:: flip_y | :sl:`Gets and sets whether the Image is flipped on the y axis.` | :sg:`flip_y -> bool` .. attribute:: color | :sl:`Gets and sets the Image color modifier.` | :sg:`color -> Color` .. attribute:: alpha | :sl:`Gets and sets the Image alpha modifier.` | :sg:`alpha -> float` .. attribute:: blend_mode | :sl:`Gets and sets the blend mode for the Image.` | :sg:`blend_mode -> int` .. attribute:: texture | :sl:`Gets and sets the Texture the Image is based on.` | :sg:`texture -> Texture` .. attribute:: srcrect | :sl:`Gets and sets the Rect the Image is based on.` | :sg:`srcrect -> Rect` .. class:: Renderer | :sl:`Create a 2D rendering context for a window.` | :sg:`Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer` .. classmethod:: from_window | :sl:`Easy way to create a Renderer.` | :sg:`from_window(window) -> Renderer` .. attribute:: draw_blend_mode | :sl:`Gets and sets the blend mode used by the drawing functions.` | :sg:`draw_blend_mode -> int` .. attribute:: draw_color | :sl:`Gets and sets the color used by the drawing functions.` | :sg:`draw_color -> Color` .. method:: clear | :sl:`Clear the current rendering target with the drawing color.` | :sg:`clear() -> None` .. method:: present | :sl:`Updates the screen with any new rendering since previous call.` | :sg:`present() -> None` .. method:: get_viewport | :sl:`Returns the drawing area on the target.` | :sg:`get_viewport() -> Rect` .. method:: set_viewport | :sl:`Set the drawing area on the target. If area is None, the entire target will be used.` | :sg:`set_viewport(area) -> None` .. attribute:: logical_size | :sl:`Gets and sets the logical size.` | :sg:`logical_size -> (int width, int height)` .. attribute:: scale | :sl:`Gets and sets the scale.` | :sg:`scale -> (float x_scale, float y_scale)` .. attribute:: target | :sl:`Gets and sets the render target. None represents the default target (the renderer).` | :sg:`target -> Texture or None` .. method:: blit | :sl:`For compatibility purposes. Textures created by different Renderers cannot be shared!` | :sg:`blit(source, dest, area=None, special_flags=0)-> Rect` .. method:: draw_line | :sl:`Draws a line.` | :sg:`draw_line(p1, p2) -> None` .. method:: draw_point | :sl:`Draws a point.` | :sg:`draw_point(point) -> None` .. method:: draw_rect | :sl:`Draws a rectangle.` | :sg:`draw_rect(rect)-> None` .. method:: fill_rect | :sl:`Fills a rectangle.` | :sg:`fill_rect(rect)-> None` .. method:: to_surface | :sl:`Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.` | :sg:`to_surface(surface=None, area=None)-> Surface`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/sndarray.rst0000644000175100001770000000627414676242340017366 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sndarray` ====================== .. module:: pygame.sndarray :synopsis: pygame module for accessing sound sample data | :sl:`pygame module for accessing sound sample data` Functions to convert between NumPy arrays and Sound objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, ``surfarray`` becomes a ``MissingModule`` object. Sound data is made of thousands of samples per second, and each sample is the amplitude of the wave at a particular moment in time. For example, in 22-kHz format, element number 5 of the array is the amplitude of the wave after 5/22000 seconds. The arrays are indexed by the ``X`` axis first, followed by the ``Y`` axis. Each sample is an 8-bit or 16-bit integer, depending on the data format. A stereo sound file has two values per sample, while a mono sound file only has one. .. function:: array | :sl:`copy Sound samples into an array` | :sg:`array(Sound) -> array` Creates a new array for the sound data and copies the samples. The array will always be in the format returned from ``pygame.mixer.get_init()``. .. ## pygame.sndarray.array ## .. function:: samples | :sl:`reference Sound samples into an array` | :sg:`samples(Sound) -> array` Creates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from ``pygame.mixer.get_init()``. .. ## pygame.sndarray.samples ## .. function:: make_sound | :sl:`convert an array into a Sound object` | :sg:`make_sound(array) -> Sound` Create a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format. .. ## pygame.sndarray.make_sound ## .. function:: use_arraytype | :sl:`Sets the array system to be used for sound arrays` | :sg:`use_arraytype (arraytype) -> None` DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is ``'numpy'``. Other values will raise ValueError. Using this function will raise a ``DeprecationWarning``. .. ## pygame.sndarray.use_arraytype ## .. function:: get_arraytype | :sl:`Gets the currently active array type.` | :sg:`get_arraytype () -> str` DEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.sndarray.get_arraytype ## .. function:: get_arraytypes | :sl:`Gets the array system types currently supported.` | :sg:`get_arraytypes () -> tuple` DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.sndarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.sndarray.get_arraytypes ## .. ## pygame.sndarray ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/sprite.rst0000644000175100001770000007356214676242340017055 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sprite` ==================== .. module:: pygame.sprite :synopsis: pygame module with basic game object classes | :sl:`pygame module with basic game object classes` This module contains several simple classes to be used within games. There is the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games. The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain. The basic Group class can draw the Sprites it contains to a Surface. The ``Group.draw()`` method requires that each Sprite have a ``Surface.image`` attribute and a ``Surface.rect``. The ``Group.clear()`` method requires these same attributes, and can be used to erase all the Sprites with background. There are also more advanced Groups: ``pygame.sprite.RenderUpdates()`` and ``pygame.sprite.OrderedUpdates()``. Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a ``Surface.rect`` attribute assigned. The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game. Sprites and Groups manage their relationships with the ``add()`` and ``remove()`` methods. These methods can accept a single or multiple targets for membership. The default initializers for these classes also takes a single or list of targets for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group. While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you add a Sprite or Group class. Sprites are not thread safe. So lock them yourself if using threads. .. class:: Sprite | :sl:`Simple base class for visible game objects.` | :sg:`Sprite(*groups) -> Sprite` The base class for visible game objects. Derived classes will want to override the ``Sprite.update()`` and assign a ``Sprite.image`` and ``Sprite.rect`` attributes. The initializer can accept any number of Group instances to be added to. When subclassing the Sprite, be sure to call the base initializer before adding the Sprite to Groups. For example: .. code-block:: python class Block(pygame.sprite.Sprite): # Constructor. Pass in the color of the block, # and its x and y position def __init__(self, color, width, height): # Call the parent class (Sprite) constructor pygame.sprite.Sprite.__init__(self) # Create an image of the block, and fill it with a color. # This could also be an image loaded from the disk. self.image = pygame.Surface([width, height]) self.image.fill(color) # Fetch the rectangle object that has the dimensions of the image # Update the position of this object by setting the values of rect.x and rect.y self.rect = self.image.get_rect() .. method:: update | :sl:`method to control sprite behavior` | :sg:`update(*args, **kwargs) -> None` The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by ``Group.update()`` with whatever arguments you give it. It is not necessary to use this method if not using the convenience method by the same name in the Group class. .. ## Sprite.update ## .. method:: add | :sl:`add the sprite to groups` | :sg:`add(*groups) -> None` Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of. .. ## Sprite.add ## .. method:: remove | :sl:`remove the sprite from groups` | :sg:`remove(*groups) -> None` Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of. .. ## Sprite.remove ## .. method:: kill | :sl:`remove the Sprite from all Groups` | :sg:`kill() -> None` The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups. .. ## Sprite.kill ## .. method:: alive | :sl:`does the sprite belong to any groups` | :sg:`alive() -> bool` Returns True when the Sprite belongs to one or more Groups. .. ## Sprite.alive ## .. method:: groups | :sl:`list of Groups that contain this Sprite` | :sg:`groups() -> group_list` Return a list of all the Groups that contain this Sprite. .. ## Sprite.groups ## .. ## pygame.sprite.Sprite ## .. class:: WeakSprite | :sl:`A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.` | :sg:`WeakSprite(*groups) -> WeakSprite` .. class:: DirtySprite | :sl:`A subclass of Sprite with more attributes and features.` | :sg:`DirtySprite(*groups) -> DirtySprite` Extra DirtySprite attributes with their default values: dirty = 1 :: if set to 1, it is repainted and then set to 0 again if set to 2 then it is always dirty ( repainted each frame, flag is not reset) 0 means that it is not dirty and therefore not repainted again blendmode = 0 :: its the special_flags argument of blit, blendmodes source_rect = None :: source rect to use, remember that it is relative to topleft (0,0) of self.image visible = 1 :: normally 1, if set to 0 it will not be repainted (you must set it dirty too to be erased from screen) layer = 0 :: (READONLY value, it is read when adding it to the LayeredDirty, for details see doc of LayeredDirty) .. ## ## .. ## pygame.sprite.DirtySprite ## .. class:: Group | :sl:`A container class to hold and manage multiple Sprite objects.` | :sg:`Group(*sprites) -> Group` A simple container for Sprite objects. This class can be inherited to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations: :: in test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites The Sprites in the Group are ordered only on python 3.6 and higher. Below python 3.6 drawing and iterating over the Sprites is in no particular order. .. method:: sprites | :sl:`list of the Sprites this Group contains` | :sg:`sprites() -> sprite_list` Return a list of all the Sprites this group contains. You can also get an iterator from the group, but you cannot iterate over a Group while modifying it. .. ## Group.sprites ## .. method:: copy | :sl:`duplicate the Group` | :sg:`copy() -> Group` Creates a new Group with all the same Sprites as the original. If you have subclassed Group, the new object will have the same (sub-)class as the original. This only works if the derived class's constructor takes the same arguments as the Group class's. .. ## Group.copy ## .. method:: add | :sl:`add Sprites to this Group` | :sg:`add(*sprites) -> None` Add any number of Sprites to this Group. This will only add Sprites that are not already members of the Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.add ## .. method:: remove | :sl:`remove Sprites from the Group` | :sg:`remove(*sprites) -> None` Remove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.remove ## .. method:: has | :sl:`test if a Group contains Sprites` | :sg:`has(*sprites) -> bool` Return True if the Group contains all of the given sprites. This is similar to using the "in" operator on the Group ("if sprite in group: ..."), which tests if a single Sprite belongs to a Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.has ## .. method:: update | :sl:`call the update method on contained Sprites` | :sg:`update(*args, **kwargs) -> None` Calls the ``update()`` method on all Sprites in the Group. The base Sprite class has an update method that takes any number of arguments and does nothing. The arguments passed to ``Group.update()`` will be passed to each Sprite. There is no way to get the return value from the ``Sprite.update()`` methods. .. ## Group.update ## .. method:: draw | :sl:`blit the Sprite images` | :sg:`draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]` Draws the contained Sprites to the Surface argument. This uses the ``Sprite.image`` attribute for the source surface, and ``Sprite.rect`` for the position. ``special_flags`` is passed to ``Surface.blit()``. ``bgsurf`` is unused in this method but ``LayeredDirty.draw()`` uses it. The Group does not keep sprites in any order, so the draw order is arbitrary. .. ## Group.draw ## .. method:: clear | :sl:`draw a background over the Sprites` | :sg:`clear(Surface_dest, background) -> None` Erases the Sprites used in the last ``Group.draw()`` call. The destination Surface is cleared by filling the drawn Sprite positions with the background. The background is usually a Surface image the same dimensions as the destination Surface. However, it can also be a callback function that takes two arguments; the destination Surface and an area to clear. The background callback function will be called several times each clear. Here is an example callback that will clear the Sprites with solid red: :: def clear_callback(surf, rect): color = 255, 0, 0 surf.fill(color, rect) .. ## Group.clear ## .. method:: empty | :sl:`remove all Sprites` | :sg:`empty() -> None` Removes all Sprites from this Group. .. ## Group.empty ## .. ## pygame.sprite.Group ## .. class:: WeakDirtySprite | :sl:`A subclass of WeakSprite and DirtySprite that combines the benefits of both classes.` | :sg:`WeakDirtySprite(*groups) -> WeakDirtySprite` .. class:: RenderPlain | :sl:`Same as pygame.sprite.Group` This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality. .. ## pygame.sprite.RenderClear ## .. class:: RenderClear | :sl:`Same as pygame.sprite.Group` This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality. .. ## pygame.sprite.RenderClear ## .. class:: RenderUpdates | :sl:`Group sub-class that tracks dirty updates.` | :sg:`RenderUpdates(*sprites) -> RenderUpdates` This class is derived from ``pygame.sprite.Group()``. It has an extended ``draw()`` method that tracks the changed areas of the screen. .. method:: draw | :sl:`blit the Sprite images and track changed areas` | :sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list` Draws all the Sprites to the surface, the same as ``Group.draw()``. This method also returns a list of Rectangular areas on the screen that have been changed. The returned changes include areas of the screen that have been affected by previous ``Group.clear()`` calls. ``special_flags`` is passed to ``Surface.blit()``. The returned Rect list should be passed to ``pygame.display.update()``. This will help performance on software driven display modes. This type of updating is usually only helpful on destinations with non-animating backgrounds. .. ## RenderUpdates.draw ## .. ## pygame.sprite.RenderUpdates ## .. function:: OrderedUpdates | :sl:`RenderUpdates sub-class that draws Sprites in order of addition.` | :sg:`OrderedUpdates(*sprites) -> OrderedUpdates` This class derives from ``pygame.sprite.RenderUpdates()``. It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups. .. ## pygame.sprite.OrderedUpdates ## .. class:: LayeredUpdates | :sl:`LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.` | :sg:`LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates` This group is fully compatible with :class:`pygame.sprite.Sprite`. You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0. If the sprite you add has an attribute _layer then that layer will be used. If the \**kwarg contains 'layer' then the sprites passed will be added to that layer (overriding the ``sprite.layer`` attribute). If neither sprite has attribute layer nor \**kwarg then the default layer is used to add the sprites. .. versionadded:: 1.8 .. method:: add | :sl:`add a sprite or sequence of sprites to a group` | :sg:`add(*sprites, **kwargs) -> None` If the ``sprite(s)`` have an attribute layer then that is used for the layer. If \**kwargs contains 'layer' then the ``sprite(s)`` will be added to that argument (overriding the sprite layer attribute). If neither is passed then the ``sprite(s)`` will be added to the default layer. .. ## LayeredUpdates.add ## .. method:: sprites | :sl:`returns a ordered list of sprites (first back, last top).` | :sg:`sprites() -> sprites` .. ## LayeredUpdates.sprites ## .. method:: draw | :sl:`draw all sprites in the right order onto the passed surface.` | :sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list` .. ## LayeredUpdates.draw ## .. method:: get_sprites_at | :sl:`returns a list with all sprites at that position.` | :sg:`get_sprites_at(pos) -> colliding_sprites` Bottom sprites first, top last. .. ## LayeredUpdates.get_sprites_at ## .. method:: get_sprite | :sl:`returns the sprite at the index idx from the groups sprites` | :sg:`get_sprite(idx) -> sprite` Raises IndexOutOfBounds if the idx is not within range. .. ## LayeredUpdates.get_sprite ## .. method:: remove_sprites_of_layer | :sl:`removes all sprites from a layer and returns them as a list.` | :sg:`remove_sprites_of_layer(layer_nr) -> sprites` .. ## LayeredUpdates.remove_sprites_of_layer ## .. method:: layers | :sl:`returns a list of layers defined (unique), sorted from bottom up.` | :sg:`layers() -> layers` .. ## LayeredUpdates.layers ## .. method:: change_layer | :sl:`changes the layer of the sprite` | :sg:`change_layer(sprite, new_layer) -> None` sprite must have been added to the renderer. It is not checked. .. ## LayeredUpdates.change_layer ## .. method:: get_layer_of_sprite | :sl:`returns the layer that sprite is currently in.` | :sg:`get_layer_of_sprite(sprite) -> layer` If the sprite is not found then it will return the default layer. .. ## LayeredUpdates.get_layer_of_sprite ## .. method:: get_top_layer | :sl:`returns the top layer` | :sg:`get_top_layer() -> layer` .. ## LayeredUpdates.get_top_layer ## .. method:: get_bottom_layer | :sl:`returns the bottom layer` | :sg:`get_bottom_layer() -> layer` .. ## LayeredUpdates.get_bottom_layer ## .. method:: move_to_front | :sl:`brings the sprite to front layer` | :sg:`move_to_front(sprite) -> None` Brings the sprite to front, changing sprite layer to topmost layer (added at the end of that layer). .. ## LayeredUpdates.move_to_front ## .. method:: move_to_back | :sl:`moves the sprite to the bottom layer` | :sg:`move_to_back(sprite) -> None` Moves the sprite to the bottom layer, moving it behind all other layers and adding one additional layer. .. ## LayeredUpdates.move_to_back ## .. method:: get_top_sprite | :sl:`returns the topmost sprite` | :sg:`get_top_sprite() -> Sprite` .. ## LayeredUpdates.get_top_sprite ## .. method:: get_sprites_from_layer | :sl:`returns all sprites from a layer, ordered by how they where added` | :sg:`get_sprites_from_layer(layer) -> sprites` Returns all sprites from a layer, ordered by how they where added. It uses linear search and the sprites are not removed from layer. .. ## LayeredUpdates.get_sprites_from_layer ## .. method:: switch_layer | :sl:`switches the sprites from layer1 to layer2` | :sg:`switch_layer(layer1_nr, layer2_nr) -> None` The layers number must exist, it is not checked. .. ## LayeredUpdates.switch_layer ## .. ## pygame.sprite.LayeredUpdates ## .. class:: LayeredDirty | :sl:`LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.` | :sg:`LayeredDirty(*sprites, **kwargs) -> LayeredDirty` This group requires :class:`pygame.sprite.DirtySprite` or any sprite that has the following attributes: :: image, rect, dirty, visible, blendmode (see doc of DirtySprite). It uses the dirty flag technique and is therefore faster than the :class:`pygame.sprite.RenderUpdates` if you have many static sprites. It also switches automatically between dirty rect update and full screen drawing, so you do not have to worry what would be faster. Same as for the :class:`pygame.sprite.Group`. You can specify some additional attributes through kwargs: :: _use_update: True/False default is False _default_layer: default layer where sprites without a layer are added. _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode, defaults to 1000./80 == 1000./fps .. versionadded:: 1.8 .. method:: draw | :sl:`draw all sprites in the right order onto the passed surface.` | :sg:`draw(surface, bgsurf=None, special_flags=None) -> Rect_list` You can pass the background too. If a background is already set, then the bgsurf argument has no effect. If present, the ``special_flags`` argument is always passed to ``Surface.blit()``, overriding ``DirtySprite.blendmode``. If ``special_flags`` is not present, ``DirtySprite.blendmode`` is passed to the ``Surface.blit()`` instead. .. ## LayeredDirty.draw ## .. method:: clear | :sl:`used to set background` | :sg:`clear(surface, bgd) -> None` .. ## LayeredDirty.clear ## .. method:: repaint_rect | :sl:`repaints the given area` | :sg:`repaint_rect(screen_rect) -> None` screen_rect is in screen coordinates. .. ## LayeredDirty.repaint_rect ## .. method:: set_clip | :sl:`clip the area where to draw. Just pass None (default) to reset the clip` | :sg:`set_clip(screen_rect=None) -> None` .. ## LayeredDirty.set_clip ## .. method:: get_clip | :sl:`clip the area where to draw. Just pass None (default) to reset the clip` | :sg:`get_clip() -> Rect` .. ## LayeredDirty.get_clip ## .. method:: change_layer | :sl:`changes the layer of the sprite` | :sg:`change_layer(sprite, new_layer) -> None` sprite must have been added to the renderer. It is not checked. .. ## LayeredDirty.change_layer ## .. method:: set_timing_treshold | :sl:`sets the threshold in milliseconds` | :sg:`set_timing_treshold(time_ms) -> None` DEPRECATED: Use set_timing_threshold() instead. .. deprecated:: 2.1.1 .. ## LayeredDirty.set_timing_treshold ## .. method:: set_timing_threshold | :sl:`sets the threshold in milliseconds` | :sg:`set_timing_threshold(time_ms) -> None` Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. .. versionadded:: 2.1.1 :raises TypeError: if ``time_ms`` is not int or float .. ## LayeredDirty.set_timing_threshold ## .. ## pygame.sprite.LayeredDirty ## .. function:: GroupSingle | :sl:`Group container that holds a single sprite.` | :sg:`GroupSingle(sprite=None) -> GroupSingle` The GroupSingle container only holds a single Sprite. When a new Sprite is added, the old one is removed. There is a special property, ``GroupSingle.sprite``, that accesses the Sprite that this Group contains. It can be None when the Group is empty. The property can also be assigned to add a Sprite into the GroupSingle container. .. ## pygame.sprite.GroupSingle ## .. function:: spritecollide | :sl:`Find sprites in a group that intersect another sprite.` | :sg:`spritecollide(sprite, group, dokill, collided = None) -> Sprite_list` Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the ``Sprite.rect`` attribute of each Sprite. The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group. The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. collided callables: :: collide_rect, collide_rect_ratio, collide_circle, collide_circle_ratio, collide_mask Example: .. code-block:: python # See if the Sprite block has collided with anything in the Group block_list # The True flag will remove the sprite in block_list blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True) # Check the list of colliding sprites, and add one to the score for each one for block in blocks_hit_list: score +=1 .. ## pygame.sprite.spritecollide ## .. function:: collide_rect | :sl:`Collision detection between two sprites, using rects.` | :sg:`collide_rect(left, right) -> bool` Tests for collision between two sprites. Uses the pygame rect colliderect function to calculate the collision. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" attributes. .. versionadded:: 1.8 .. ## pygame.sprite.collide_rect ## .. function:: collide_rect_ratio | :sl:`Collision detection between two sprites, using rects scaled to a ratio.` | :sg:`collide_rect_ratio(ratio) -> collided_callable` A callable class that checks for collisions between two sprites, using a scaled version of the sprites rects. Is created with a ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions. A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_rect_ratio ## .. function:: collide_circle | :sl:`Collision detection between two sprites, using circles.` | :sg:`collide_circle(left, right) -> bool` Tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_circle ## .. function:: collide_circle_ratio | :sl:`Collision detection between two sprites, using circles scaled to a ratio.` | :sg:`collide_circle_ratio(ratio) -> collided_callable` A callable class that checks for collisions between two sprites, using a scaled version of the sprites radius. Is created with a floating point ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions. A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size. The created callable tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap, after scaling the circles radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_circle_ratio ## .. function:: collide_mask | :sl:`Collision detection between two sprites, using masks.` | :sg:`collide_mask(sprite1, sprite2) -> (int, int)` | :sg:`collide_mask(sprite1, sprite2) -> None` Tests for collision between two sprites, by testing if their bitmasks overlap (uses :func:`pygame.mask.Mask.overlap`). If the sprites have a ``mask`` attribute, it is used as the mask, otherwise a mask is created from the sprite's ``image`` (uses :func:`pygame.mask.from_surface`). Sprites must have a ``rect`` attribute; the ``mask`` attribute is optional. The first point of collision between the masks is returned. The collision point is offset from ``sprite1``'s mask's topleft corner (which is always (0, 0)). The collision point is a position within the mask and is not related to the actual screen position of ``sprite1``. This function is intended to be passed as a ``collided`` callback function to the group collide functions (see :meth:`spritecollide`, :meth:`groupcollide`, :meth:`spritecollideany`). .. note:: To increase performance, create and set a ``mask`` attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks. .. note:: A new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated). :: # Example of mask creation for a sprite. sprite.mask = pygame.mask.from_surface(sprite.image) :returns: first point of collision between the masks or ``None`` if no collision :rtype: tuple(int, int) or NoneType .. versionadded:: 1.8.0 .. ## pygame.sprite.collide_mask ## .. function:: groupcollide | :sl:`Find all sprites that collide between two groups.` | :sg:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict` This will find collisions between all the Sprites in two groups. Collision is determined by comparing the ``Sprite.rect`` attribute of each Sprite or by using the collided function if it is not None. Every Sprite inside group1 is added to the return dictionary. The value for each item is the list of Sprites in group2 that intersect. If either dokill argument is True, the colliding Sprites will be removed from their respective Group. The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. .. ## pygame.sprite.groupcollide ## .. function:: spritecollideany | :sl:`Simple test if a sprite intersects anything in a group.` | :sg:`spritecollideany(sprite, group, collided = None) -> Sprite` Collision with the returned sprite. | :sg:`spritecollideany(sprite, group, collided = None) -> None` No collision If the sprite collides with any single sprite in the group, a single sprite from the group is returned. On no collision None is returned. If you don't need all the features of the ``pygame.sprite.spritecollide()`` function, this function will be a bit quicker. The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. .. ## pygame.sprite.spritecollideany ## .. ## ## .. ## pygame.sprite ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/reST/ref/surface.rst0000644000175100001770000010777314676242340017201 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Surface` ===================== .. currentmodule:: pygame .. class:: Surface | :sl:`pygame object for representing images` | :sg:`Surface((width, height), flags=0, depth=0, masks=None) -> Surface` | :sg:`Surface((width, height), flags=0, Surface) -> Surface` A pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color. Call :meth:`pygame.Surface()` to create a new image object. The Surface will be cleared to all black. The only required arguments are the sizes. With no additional arguments, the Surface will be created in a format that best matches the display Surface. The pixel format can be controlled by passing the bit depth or an existing Surface. The flags argument is a bitmask of additional features for the surface. You can pass any combination of these flags: :: HWSURFACE (obsolete in pygame 2) creates the image in video memory SRCALPHA the pixel format will include a per-pixel alpha Both flags are only a request, and may not be possible for all displays and formats. Advance users can combine a set of bitmasks with a depth value. The masks are a set of 4 integers representing which bits in a pixel will represent each color. Normal Surfaces should not require the masks argument. Surfaces can have many extra attributes like alpha planes, colorkeys, source rectangle clipping. These functions mainly effect how the Surface is blitted to other Surfaces. The blit routines will attempt to use hardware acceleration when possible, otherwise they will use highly optimized software blitting methods. There are three types of transparency supported in pygame: colorkeys, surface alphas, and pixel alphas. Surface alphas can be mixed with colorkeys, but an image with per pixel alphas cannot use the other modes. Colorkey transparency makes a single color value transparent. Any pixels matching the colorkey will not be drawn. The surface alpha value is a single value that changes the transparency for the entire image. A surface alpha of 255 is opaque, and a value of 0 is completely transparent. Per pixel alphas are different because they store a transparency value for every pixel. This allows for the most precise transparency effects, but it also the slowest. Per pixel alphas cannot be mixed with surface alpha and colorkeys. There is support for pixel access for the Surfaces. Pixel access on hardware surfaces is slow and not recommended. Pixels can be accessed using the :meth:`get_at()` and :meth:`set_at()` functions. These methods are fine for simple access, but will be considerably slow when doing of pixel work with them. If you plan on doing a lot of pixel level work, it is recommended to use a :class:`pygame.PixelArray`, which gives an array like view of the surface. For involved mathematical manipulations try the :mod:`pygame.surfarray` module (It's quite quick, but requires NumPy.) Any functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can :meth:`lock()` and :meth:`unlock()` the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs. Remember to leave the Surface locked only while necessary. Surface pixels are stored internally as a single number that has all the colors encoded into it. Use the :meth:`map_rgb()` and :meth:`unmap_rgb()` to convert between individual red, green, and blue values into a packed integer for that Surface. Surfaces can also reference sections of other Surfaces. These are created with the :meth:`subsurface()` method. Any change to either Surface will effect the other. Each Surface contains a clipping area. By default the clip area covers the entire Surface. If it is changed, all drawing operations will only effect the smaller area. .. method:: blit | :sl:`draw one image onto another` | :sg:`blit(source, dest, area=None, special_flags=0) -> Rect` Draws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit. An optional area rectangle can be passed as well. This represents a smaller portion of the source Surface to draw. .. versionadded:: 1.8 Optional ``special_flags``: ``BLEND_ADD``, ``BLEND_SUB``, ``BLEND_MULT``, ``BLEND_MIN``, ``BLEND_MAX``. .. versionadded:: 1.8.1 Optional ``special_flags``: ``BLEND_RGBA_ADD``, ``BLEND_RGBA_SUB``, ``BLEND_RGBA_MULT``, ``BLEND_RGBA_MIN``, ``BLEND_RGBA_MAX`` ``BLEND_RGB_ADD``, ``BLEND_RGB_SUB``, ``BLEND_RGB_MULT``, ``BLEND_RGB_MIN``, ``BLEND_RGB_MAX``. .. versionadded:: 1.9.2 Optional ``special_flags``: ``BLEND_PREMULTIPLIED`` .. versionadded:: 2.0.0 Optional ``special_flags``: ``BLEND_ALPHA_SDL2`` - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not. The return rectangle is the area of the affected pixels, excluding any pixels outside the destination Surface, or outside the clipping area. Pixel alphas will be ignored when blitting to an 8 bit Surface. For a surface with colorkey or blanket alpha, a blit to self may give slightly different colors than a non self-blit. .. ## Surface.blit ## .. method:: blits | :sl:`draw many images onto another` | :sg:`blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None` | :sg:`blits(((source, dest, area), ...)) -> [Rect, ...]` | :sg:`blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]` Draws many surfaces onto this Surface. It takes a sequence as input, with each of the elements corresponding to the ones of :meth:`blit()`. It needs at minimum a sequence of (source, dest). :param blit_sequence: a sequence of surfaces and arguments to blit them, they correspond to the :meth:`blit()` arguments :param doreturn: if ``True``, return a list of rects of the areas changed, otherwise return ``None`` :returns: a list of rects of the areas changed if ``doreturn`` is ``True``, otherwise ``None`` :rtype: list or None New in pygame 1.9.4. .. ## Surface.blits ## .. method:: convert | :sl:`change the pixel format of an image` | :sg:`convert(Surface=None) -> Surface` | :sg:`convert(depth, flags=0) -> Surface` | :sg:`convert(masks, flags=0) -> Surface` Creates a new copy of the Surface with the pixel format changed. The new pixel format can be determined from another existing Surface. Otherwise depth, flags, and masks arguments can be used, similar to the :meth:`pygame.Surface()` call. If no arguments are passed the new Surface will have the same pixel format as the display Surface. This is always the fastest format for blitting. It is a good idea to convert all Surfaces before they are blitted many times. The converted Surface will have no pixel alphas. They will be stripped if the original had them. See :meth:`convert_alpha()` for preserving or creating per-pixel alphas. The new copy will have the same class as the copied surface. This lets as Surface subclass inherit this method without the need to override, unless subclass specific instance attributes also need copying. .. ## Surface.convert ## .. method:: convert_alpha | :sl:`change the pixel format of an image including per pixel alphas` | :sg:`convert_alpha(Surface) -> Surface` | :sg:`convert_alpha() -> Surface` Creates a new copy of the surface with the desired pixel format. The new surface will be in a format suited for quick blitting to the given format with per pixel alpha. If no surface is given, the new surface will be optimized for blitting to the current display. Unlike the :meth:`convert()` method, the pixel format for the new image will not be exactly the same as the requested source, but it will be optimized for fast alpha blitting to the destination. As with :meth:`convert()` the returned surface has the same class as the converted surface. .. ## Surface.convert_alpha ## .. method:: copy | :sl:`create a new copy of a Surface` | :sg:`copy() -> Surface` Makes a duplicate copy of a Surface. The new surface will have the same pixel formats, color palettes, transparency settings, and class as the original. If a Surface subclass also needs to copy any instance specific attributes then it should override ``copy()``. .. ## Surface.copy ## .. method:: fill | :sl:`fill Surface with a solid color` | :sg:`fill(color, rect=None, special_flags=0) -> Rect` Fill the Surface with a solid color. If no rect argument is given the entire Surface will be filled. The rect argument will limit the fill to a specific area. The fill will also be contained by the Surface clip area. The color argument can be either a ``RGB`` sequence, a ``RGBA`` sequence or a mapped color index. If using ``RGBA``, the Alpha (A part of ``RGBA``) is ignored unless the surface uses per pixel alpha (Surface has the ``SRCALPHA`` flag). .. versionadded:: 1.8 Optional ``special_flags``: ``BLEND_ADD``, ``BLEND_SUB``, ``BLEND_MULT``, ``BLEND_MIN``, ``BLEND_MAX``. .. versionadded:: 1.8.1 Optional ``special_flags``: ``BLEND_RGBA_ADD``, ``BLEND_RGBA_SUB``, ``BLEND_RGBA_MULT``, ``BLEND_RGBA_MIN``, ``BLEND_RGBA_MAX`` ``BLEND_RGB_ADD``, ``BLEND_RGB_SUB``, ``BLEND_RGB_MULT``, ``BLEND_RGB_MIN``, ``BLEND_RGB_MAX``. This will return the affected Surface area. .. ## Surface.fill ## .. method:: scroll | :sl:`Shift the surface image in place` | :sg:`scroll(dx=0, dy=0) -> None` Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is safe to have dx and dy values that exceed the surface size. .. versionadded:: 1.9 .. ## Surface.scroll ## .. method:: set_colorkey | :sl:`Set the transparent colorkey` | :sg:`set_colorkey(Color, flags=0) -> None` | :sg:`set_colorkey(None) -> None` Set the current color key for the Surface. When blitting this Surface onto a destination, any pixels that have the same color as the colorkey will be transparent. The color can be an ``RGB`` color or a mapped color integer. If ``None`` is passed, the colorkey will be unset. The colorkey will be ignored if the Surface is formatted to use per pixel alpha values. The colorkey can be mixed with the full Surface alpha value. The optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source. .. ## Surface.set_colorkey ## .. method:: get_colorkey | :sl:`Get the current transparent colorkey` | :sg:`get_colorkey() -> RGB or None` Return the current colorkey value for the Surface. If the colorkey is not set then ``None`` is returned. .. ## Surface.get_colorkey ## .. method:: set_alpha | :sl:`set the alpha value for the full Surface image` | :sg:`set_alpha(value, flags=0) -> None` | :sg:`set_alpha(None) -> None` Set the current alpha value for the Surface. When blitting this Surface onto a destination, the pixels will be drawn slightly transparent. The alpha value is an integer from 0 to 255, 0 is fully transparent and 255 is fully opaque. If ``None`` is passed for the alpha value, then alpha blending will be disabled, including per-pixel alpha. This value is different than the per pixel Surface alpha. For a surface with per pixel alpha, blanket alpha is ignored and ``None`` is returned. .. versionchanged:: 2.0 per-surface alpha can be combined with per-pixel alpha. The optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source. .. ## Surface.set_alpha ## .. method:: get_alpha | :sl:`get the current Surface transparency value` | :sg:`get_alpha() -> int_value` Return the current alpha value for the Surface. .. ## Surface.get_alpha ## .. method:: lock | :sl:`lock the Surface memory for pixel access` | :sg:`lock() -> None` Lock the pixel data of a Surface for access. On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked. Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame. Not all Surfaces require locking. The :meth:`mustlock()` method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released. .. ## Surface.lock ## .. method:: unlock | :sl:`unlock the Surface memory from pixel access` | :sg:`unlock() -> None` Unlock the Surface pixel data after it has been locked. The unlocked Surface can once again be drawn and managed by pygame. See the :meth:`lock()` documentation for more details. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released. .. ## Surface.unlock ## .. method:: mustlock | :sl:`test if the Surface requires locking` | :sg:`mustlock() -> bool` Returns ``True`` if the Surface is required to be locked to access pixel data. Usually pure software Surfaces do not require locking. This method is rarely needed, since it is safe and quickest to just lock all Surfaces as needed. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. .. ## Surface.mustlock ## .. method:: get_locked | :sl:`test if the Surface is current locked` | :sg:`get_locked() -> bool` Returns ``True`` when the Surface is locked. It doesn't matter how many times the Surface is locked. .. ## Surface.get_locked ## .. method:: get_locks | :sl:`Gets the locks for the Surface` | :sg:`get_locks() -> tuple` Returns the currently existing locks for the Surface. .. ## Surface.get_locks ## .. method:: get_at | :sl:`get the color value at a single pixel` | :sg:`get_at((x, y)) -> Color` Return a copy of the ``RGBA`` Color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised. Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using :mod:`pygame.surfarray`/:mod:`pygame.PixelArray`. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.9 Returning a Color instead of tuple. Use ``tuple(surf.get_at((x,y)))`` if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict. .. ## Surface.get_at ## .. method:: set_at | :sl:`set the color value for a single pixel` | :sg:`set_at((x, y), Color) -> None` Set the ``RGBA`` or mapped integer color value for a single pixel. If the Surface does not have per pixel alphas, the alpha value is ignored. Setting pixels outside the Surface area or outside the Surface clipping will have no effect. Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. This function will temporarily lock and unlock the Surface as needed. .. note:: If the surface is palettized, the pixel color will be set to the most similar color in the palette. .. ## Surface.set_at ## .. method:: get_at_mapped | :sl:`get the mapped color value at a single pixel` | :sg:`get_at_mapped((x, y)) -> Color` Return the integer value of the given pixel. If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised. This method is intended for pygame unit testing. It unlikely has any use in an application. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.9.2 .. ## Surface.get_at_mapped ## .. method:: get_palette | :sl:`get the color index palette for an 8-bit Surface` | :sg:`get_palette() -> [RGB, RGB, RGB, ...]` Return a list of up to 256 color elements that represent the indexed colors used in an 8-bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface. Returning a list of ``Color(with length 3)`` instances instead of tuples. .. versionadded:: 1.9 .. ## Surface.get_palette ## .. method:: get_palette_at | :sl:`get the color for a single entry in a palette` | :sg:`get_palette_at(index) -> RGB` Returns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255. .. versionadded:: 1.9 Returning ``Color(with length 3)`` instance instead of a tuple. .. ## Surface.get_palette_at ## .. method:: set_palette | :sl:`set the color palette for an 8-bit Surface` | :sg:`set_palette([RGB, RGB, RGB, ...]) -> None` Set the full palette for an 8-bit Surface. This will replace the colors in the existing palette. A partial palette can be passed and only the first colors in the original palette will be changed. This function has no effect on a Surface with more than 8-bits per pixel. .. ## Surface.set_palette ## .. method:: set_palette_at | :sl:`set the color for a single index in an 8-bit Surface palette` | :sg:`set_palette_at(index, RGB) -> None` Set the palette value for a single entry in a Surface palette. The index should be a value from 0 to 255. This function has no effect on a Surface with more than 8-bits per pixel. .. ## Surface.set_palette_at ## .. method:: map_rgb | :sl:`convert a color into a mapped color value` | :sg:`map_rgb(Color) -> mapped_int` Convert an ``RGBA`` color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color. See the Surface object documentation for more information about colors and pixel formats. .. ## Surface.map_rgb ## .. method:: unmap_rgb | :sl:`convert a mapped integer color value into a Color` | :sg:`unmap_rgb(mapped_int) -> Color` Convert an mapped integer color into the ``RGB`` color components for this Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color. See the Surface object documentation for more information about colors and pixel formats. .. ## Surface.unmap_rgb ## .. method:: set_clip | :sl:`set the current clipping area of the Surface` | :sg:`set_clip(rect) -> None` | :sg:`set_clip(None) -> None` Each Surface has an active clipping area. This is a rectangle that represents the only pixels on the Surface that can be modified. If ``None`` is passed for the rectangle the full Surface will be available for changes. The clipping area is always restricted to the area of the Surface itself. If the clip rectangle is too large it will be shrunk to fit inside the Surface. .. ## Surface.set_clip ## .. method:: get_clip | :sl:`get the current clipping area of the Surface` | :sg:`get_clip() -> Rect` Return a rectangle of the current clipping area. The Surface will always return a valid rectangle that will never be outside the bounds of the image. If the Surface has had ``None`` set for the clipping area, the Surface will return a rectangle with the full area of the Surface. .. ## Surface.get_clip ## .. method:: subsurface | :sl:`create a new surface that references its parent` | :sg:`subsurface(Rect) -> Surface` Returns a new Surface that shares its pixels with its new parent. The new Surface is considered a child of the original. Modifications to either Surface pixels will effect each other. Surface information like clipping area and color keys are unique to each Surface. The new Surface will inherit the palette, color key, and alpha settings from its parent. It is possible to have any number of subsurfaces and subsubsurfaces on the parent. It is also possible to subsurface the display Surface if the display mode is not hardware accelerated. See :meth:`get_offset()` and :meth:`get_parent()` to learn more about the state of a subsurface. A subsurface will have the same class as the parent surface. .. ## Surface.subsurface ## .. method:: get_parent | :sl:`find the parent of a subsurface` | :sg:`get_parent() -> Surface` Returns the parent Surface of a subsurface. If this is not a subsurface then ``None`` will be returned. .. ## Surface.get_parent ## .. method:: get_abs_parent | :sl:`find the top level parent of a subsurface` | :sg:`get_abs_parent() -> Surface` Returns the parent Surface of a subsurface. If this is not a subsurface then this surface will be returned. .. ## Surface.get_abs_parent ## .. method:: get_offset | :sl:`find the position of a child subsurface inside a parent` | :sg:`get_offset() -> (x, y)` Get the offset position of a child subsurface inside of a parent. If the Surface is not a subsurface this will return (0, 0). .. ## Surface.get_offset ## .. method:: get_abs_offset | :sl:`find the absolute position of a child subsurface inside its top level parent` | :sg:`get_abs_offset() -> (x, y)` Get the offset position of a child subsurface inside of its top level parent Surface. If the Surface is not a subsurface this will return (0, 0). .. ## Surface.get_abs_offset ## .. method:: get_size | :sl:`get the dimensions of the Surface` | :sg:`get_size() -> (width, height)` Return the width and height of the Surface in pixels. .. ## Surface.get_size ## .. method:: get_width | :sl:`get the width of the Surface` | :sg:`get_width() -> width` Return the width of the Surface in pixels. .. ## Surface.get_width ## .. method:: get_height | :sl:`get the height of the Surface` | :sg:`get_height() -> height` Return the height of the Surface in pixels. .. ## Surface.get_height ## .. method:: get_rect | :sl:`get the rectangular area of the Surface` | :sg:`get_rect(\**kwargs) -> Rect` Returns a new rectangle covering the entire surface. This rectangle will always start at (0, 0) with a width and height the same size as the image. You can pass keyword argument values to this function. These named values will be applied to the attributes of the Rect before it is returned. An example would be ``mysurf.get_rect(center=(100, 100))`` to create a rectangle for the Surface centered at a given position. .. ## Surface.get_rect ## .. method:: get_bitsize | :sl:`get the bit depth of the Surface pixel format` | :sg:`get_bitsize() -> int` Returns the number of bits used to represent each pixel. This value may not exactly fill the number of bytes used per pixel. For example a 15 bit Surface still requires a full 2 bytes. .. ## Surface.get_bitsize ## .. method:: get_bytesize | :sl:`get the bytes used per Surface pixel` | :sg:`get_bytesize() -> int` Return the number of bytes used per pixel. .. ## Surface.get_bytesize ## .. method:: get_flags | :sl:`get the additional flags used for the Surface` | :sg:`get_flags() -> int` Returns a set of current Surface features. Each feature is a bit in the flags bitmask. Typical flags are ``RLEACCEL``, ``SRCALPHA``, and ``SRCCOLORKEY``. Here is a more complete list of flags. A full list can be found in ``SDL_video.h`` :: SWSURFACE 0x00000000 # Surface is in system memory HWSURFACE 0x00000001 # (obsolete in pygame 2) Surface is in video memory ASYNCBLIT 0x00000004 # (obsolete in pygame 2) Use asynchronous blits if possible See :func:`pygame.display.set_mode()` for flags exclusive to the display surface. Used internally (read-only) :: HWACCEL 0x00000100 # Blit uses hardware acceleration SRCCOLORKEY 0x00001000 # Blit uses a source color key RLEACCELOK 0x00002000 # Private flag RLEACCEL 0x00004000 # Surface is RLE encoded SRCALPHA 0x00010000 # Blit uses source alpha blending PREALLOC 0x01000000 # Surface uses preallocated memory .. ## Surface.get_flags ## .. method:: get_pitch | :sl:`get the number of bytes used per Surface row` | :sg:`get_pitch() -> int` Return the number of bytes separating each row in the Surface. Surfaces in video memory are not always linearly packed. Subsurfaces will also have a larger pitch than their real width. This value is not needed for normal pygame usage. .. ## Surface.get_pitch ## .. method:: get_masks | :sl:`the bitmasks needed to convert between a color and a mapped integer` | :sg:`get_masks() -> (R, G, B, A)` Returns the bitmasks used to isolate each color in a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_masks ## .. method:: set_masks | :sl:`set the bitmasks needed to convert between a color and a mapped integer` | :sg:`set_masks((r,g,b,a)) -> None` This is not needed for normal pygame usage. .. note:: Starting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called. .. deprecated:: 2.0.0 .. versionadded:: 1.8.1 .. ## Surface.set_masks ## .. method:: get_shifts | :sl:`the bit shifts needed to convert between a color and a mapped integer` | :sg:`get_shifts() -> (R, G, B, A)` Returns the pixel shifts need to convert between each color and a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_shifts ## .. method:: set_shifts | :sl:`sets the bit shifts needed to convert between a color and a mapped integer` | :sg:`set_shifts((r,g,b,a)) -> None` This is not needed for normal pygame usage. .. note:: Starting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called. .. deprecated:: 2.0.0 .. versionadded:: 1.8.1 .. ## Surface.set_shifts ## .. method:: get_losses | :sl:`the significant bits used to convert between a color and a mapped integer` | :sg:`get_losses() -> (R, G, B, A)` Return the least significant number of bits stripped from each color in a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_losses ## .. method:: get_bounding_rect | :sl:`find the smallest rect containing data` | :sg:`get_bounding_rect(min_alpha = 1) -> Rect` Returns the smallest rectangular region that contains all the pixels in the surface that have an alpha value greater than or equal to the minimum alpha value. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.8 .. ## Surface.get_bounding_rect ## .. method:: get_view | :sl:`return a buffer view of the Surface's pixels.` | :sg:`get_view(='2') -> BufferProxy` Return an object which exports a surface's internal pixel buffer as a C level array struct, Python level array interface or a C level buffer interface. The new buffer protocol is supported. The kind argument is the length 1 string '0', '1', '2', '3', 'r', 'g', 'b', or 'a'. The letters are case insensitive; 'A' will work as well. The argument can be either a Unicode or byte (char) string. The default is '2'. '0' returns a contiguous unstructured bytes view. No surface shape information is given. A ``ValueError`` is raised if the surface's pixels are discontinuous. '1' returns a (surface-width * surface-height) array of continuous pixels. A ``ValueError`` is raised if the surface pixels are discontinuous. '2' returns a (surface-width, surface-height) array of raw pixels. The pixels are surface-bytesize-d unsigned integers. The pixel format is surface specific. The 3 byte unsigned integers of 24 bit surfaces are unlikely accepted by anything other than other pygame functions. '3' returns a (surface-width, surface-height, 3) array of ``RGB`` color components. Each of the red, green, and blue components are unsigned bytes. Only 24-bit and 32-bit surfaces are supported. The color components must be in either ``RGB`` or ``BGR`` order within the pixel. 'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a (surface-width, surface-height) view of a single color component within a surface: a color plane. Color components are unsigned bytes. Both 24-bit and 32-bit surfaces support 'r', 'g', and 'b'. Only 32-bit surfaces with ``SRCALPHA`` support 'a'. The surface is locked only when an exposed interface is accessed. For new buffer interface accesses, the surface is unlocked once the last buffer view is released. For array interface and old buffer interface accesses, the surface remains locked until the BufferProxy object is released. .. versionadded:: 1.9.2 .. method:: get_buffer | :sl:`acquires a buffer object for the pixels of the Surface.` | :sg:`get_buffer() -> BufferProxy` Return a buffer object for the pixels of the Surface. The buffer can be used for direct pixel access and manipulation. Surface pixel data is represented as an unstructured block of memory, with a start address and length in bytes. The data need not be contiguous. Any gaps are included in the length, but otherwise ignored. This method implicitly locks the Surface. The lock will be released when the returned :mod:`pygame.BufferProxy` object is garbage collected. .. versionadded:: 1.8 .. ## Surface.get_buffer ## .. attribute:: _pixels_address | :sl:`pixel buffer address` | :sg:`_pixels_address -> int` The starting address of the surface's raw pixel bytes. .. versionadded:: 1.9.2 .. method:: premul_alpha | :sl:`returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.` | :sg:`premul_alpha() -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave premul_alpha feedback with authors `_ Returns a copy of the initial surface with the red, green and blue color channels multiplied by the alpha channel. This is intended to make it easier to work with the BLEND_PREMULTIPLED blend mode flag of the blit() method. Surfaces which have called this method will only look correct after blitting if the BLEND_PREMULTIPLED special flag is used. It is worth noting that after calling this method, methods that return the colour of a pixel such as get_at() will return the alpha multiplied colour values. It is not possible to fully reverse an alpha multiplication of the colours in a surface as integer colour channel data is generally reduced by the operation (e.g. 255 x 0 = 0, from there it is not possible to reconstruct the original 255 from just the two remaining zeros in the colour and alpha channels). If you call this method, and then call it again, it will multiply the colour channels by the alpha channel twice. There are many possible ways to obtain a surface with the colour channels pre-multiplied by the alpha channel in pygame, and it is not possible to tell the difference just from the information in the pixels. It is completely possible to have two identical surfaces - one intended for pre-multiplied alpha blending and one intended for normal blending. For this reason we do not store state on surfaces intended for pre-multiplied alpha blending. Surfaces without an alpha channel cannot use this method and will return an error if you use it on them. It is best used on 32 bit surfaces (the default on most platforms) as the blitting on these surfaces can be accelerated by SIMD versions of the pre-multiplied blitter. In general pre-multiplied alpha blitting is faster then 'straight alpha' blitting and produces superior results when blitting an alpha surface onto another surface with alpha - assuming both surfaces contain pre-multiplied alpha colours. .. versionadded:: 2.2.0 .. ## Surface.premul_alpha ## .. ## pygame.Surface ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/ref/surfarray.rst0000644000175100001770000002773314676242340017564 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.surfarray` ======================= .. module:: pygame.surfarray :synopsis: pygame module for accessing surface pixel data using array interfaces | :sl:`pygame module for accessing surface pixel data using array interfaces` Functions to convert between NumPy arrays and Surface objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, ``surfarray`` becomes a ``MissingModule`` object. Every pixel is stored as a single integer value to represent the red, green, and blue colors. The 8-bit images use a value that looks into a colormap. Pixels with higher depth use a bit packing process to place three or four values into a single number. The arrays are indexed by the ``X`` axis first, followed by the ``Y`` axis. Arrays that treat the pixels as a single integer are referred to as 2D arrays. This module can also separate the red, green, and blue color values into separate indices. These types of arrays are referred to as 3D arrays, and the last index is 0 for red, 1 for green, and 2 for blue. The pixels of a 2D array as returned by :func:`array2d` and :func:`pixels2d` are mapped to the specific surface. Use :meth:`pygame.Surface.unmap_rgb` to convert to a color, and :meth:`pygame.Surface.map_rgb` to get the surface specific pixel value of a color. Integer pixel values can only be used directly between surfaces with matching pixel layouts (see :class:`pygame.Surface`). All functions that refer to "array" will copy the surface information to a new numpy array. All functions that refer to "pixels" will directly reference the pixels from the surface and any changes performed to the array will make changes in the surface. As this last functions share memory with the surface, this one will be locked during the lifetime of the array. .. function:: array2d | :sl:`Copy pixels into a 2d array` | :sg:`array2d(Surface) -> array` Copy the :meth:`mapped ` (raw) pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array2d ## .. function:: pixels2d | :sl:`Reference pixels into a 2d array` | :sg:`pixels2d(Surface) -> array` Create a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. Pixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels2d ## .. function:: array3d | :sl:`Copy pixels into a 3d array` | :sg:`array3d(Surface) -> array` Copy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array3d ## .. function:: pixels3d | :sl:`Reference pixels into a 3d array` | :sg:`pixels3d(Surface) -> array` Create a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels3d ## .. function:: array_alpha | :sl:`Copy pixel alphas into a 2d array` | :sg:`array_alpha(Surface) -> array` Copy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array_alpha ## .. function:: pixels_alpha | :sl:`Reference pixel alphas into a 2d array` | :sg:`pixels_alpha(Surface) -> array` Create a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 32-bit Surfaces with a per-pixel alpha value. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_alpha ## .. function:: array_red | :sl:`Copy red pixels into a 2d array` | :sg:`array_red(Surface) -> array` Copy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_red ## .. function:: pixels_red | :sl:`Reference pixel red into a 2d array.` | :sg:`pixels_red (Surface) -> array` Create a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_red ## .. function:: array_green | :sl:`Copy green pixels into a 2d array` | :sg:`array_green(Surface) -> array` Copy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_green ## .. function:: pixels_green | :sl:`Reference pixel green into a 2d array.` | :sg:`pixels_green (Surface) -> array` Create a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_green ## .. function:: array_blue | :sl:`Copy blue pixels into a 2d array` | :sg:`array_blue(Surface) -> array` Copy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_blue ## .. function:: pixels_blue | :sl:`Reference pixel blue into a 2d array.` | :sg:`pixels_blue (Surface) -> array` Create a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_blue ## .. function:: array_colorkey | :sl:`Copy the colorkey values into a 2d array` | :sg:`array_colorkey(Surface) -> array` Create a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque. This will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned. This function will temporarily lock the Surface as pixels are copied. .. ## pygame.surfarray.array_colorkey ## .. function:: make_surface | :sl:`Copy an array to a new surface` | :sg:`make_surface(array) -> Surface` Create a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. Function make_surface uses the array struct interface to acquire array properties, so is not limited to just NumPy arrays. See :mod:`pygame.pixelcopy`. New in pygame 1.9.2: array struct interface support. .. ## pygame.surfarray.make_surface ## .. function:: blit_array | :sl:`Blit directly from a array values` | :sg:`blit_array(Surface, array) -> None` Directly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ASCII character and record arrays are accepted. This function will temporarily lock the Surface as the new values are copied. .. ## pygame.surfarray.blit_array ## .. function:: map_array | :sl:`Map a 3d array into a 2d array` | :sg:`map_array(Surface, array3d) -> array2d` Convert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Palette surface formats are supported for NumPy arrays. .. ## pygame.surfarray.map_array ## .. function:: use_arraytype | :sl:`Sets the array system to be used for surface arrays` | :sg:`use_arraytype (arraytype) -> None` DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is ``'numpy'``. Other values will raise ValueError. Using this function will raise a ``DeprecationWarning``. .. ## pygame.surfarray.use_arraytype ## .. function:: get_arraytype | :sl:`Gets the currently active array type.` | :sg:`get_arraytype () -> str` DEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.surfarray.get_arraytype ## .. function:: get_arraytypes | :sl:`Gets the array system types currently supported.` | :sg:`get_arraytypes () -> tuple` DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.surfarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.surfarray.get_arraytypes ## .. ## pygame.surfarray ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/ref/tests.rst0000644000175100001770000001103414676242340016673 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.tests` =================== .. module:: pygame.tests :synopsis: Pygame unit test suite package | :sl:`Pygame unit test suite package` A quick way to run the test suite package from the command line is to import the go submodule with the Python -m option: :: python -m pygame.tests [] Command line option --help displays a usage message. Available options correspond to the :func:`pygame.tests.run` arguments. The xxxx_test submodules of the tests package are unit test suites for individual parts of pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive. For pygame development the test suite can be run from a pygame distribution root directory. Program ``run_tests.py`` is provided for convenience, though test/go.py can be run directly. Module level tags control which modules are included in a unit test run. Tags are assigned to a unit test module with a corresponding _tags.py module. The tags module has the global __tags__, a list of tag names. For example, ``cdrom_test.py`` has a tag file ``cdrom_tags.py`` containing a tags list that has the 'interactive' string. The 'interactive' tag indicates ``cdrom_test.py`` expects user input. It is excluded from a ``run_tests.py`` or ``pygame.tests.go`` run. Two other tags that are excluded are 'ignore' and 'subprocess_ignore'. These two tags indicate unit tests that will not run on a particular platform, or for which no corresponding pygame module is available. The test runner will list each excluded module along with the tag responsible. .. function:: run | :sl:`Run the pygame unit test suite` | :sg:`run(*args, **kwds) -> tuple` Positional arguments (optional): :: The names of tests to include. If omitted then all tests are run. Test names need not include the trailing '_test'. Keyword arguments: :: incomplete - fail incomplete tests (default False) nosubprocess - run all test suites in the current process (default False, use separate subprocesses) dump - dump failures/errors as dict ready to eval (default False) file - if provided, the name of a file into which to dump failures/errors timings - if provided, the number of times to run each individual test to get an average run time (default is run each test once) exclude - A list of TAG names to exclude from the run show_output - show silenced stderr/stdout on errors (default False) all - dump all results, not just errors (default False) randomize - randomize order of tests (default False) seed - if provided, a seed randomizer integer multi_thread - if provided, the number of THREADS in which to run subprocessed tests time_out - if subprocess is True then the time limit in seconds before killing a test (default 30) fake - if provided, the name of the fake tests package in the run_tests__tests subpackage to run instead of the normal pygame tests python - the path to a python executable to run subprocessed tests (default sys.executable) Return value: :: A tuple of total number of tests run, dictionary of error information. The dictionary is empty if no errors were recorded. By default individual test modules are run in separate subprocesses. This recreates normal pygame usage where ``pygame.init()`` and ``pygame.quit()`` are called only once per program execution, and avoids unfortunate interactions between test modules. A time limit is placed on test execution ensuring that any frozen tests processes are killed when their time allotment is expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode. Tests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used for the randomization seed value. Individual test modules may have a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only 'interactive' modules such as cdrom_test are ignored. An interactive module must be run from the console as a Python program. This function can only be called once per Python session. It is not reentrant. .. ## pygame.tests.run ## .. ## pygame.tests ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/ref/time.rst0000644000175100001770000001277014676242340016477 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.time` ================== .. module:: pygame.time :synopsis: pygame module for monitoring time | :sl:`pygame module for monitoring time` Times in pygame are represented in milliseconds (1/1000 seconds). Most platforms have a limited time resolution of around 10 milliseconds. This resolution, in milliseconds, is given in the ``TIMER_RESOLUTION`` constant. .. function:: get_ticks | :sl:`get the time in milliseconds` | :sg:`get_ticks() -> milliseconds` Return the number of milliseconds since ``pygame.init()`` was called. Before pygame is initialized this will always be 0. .. ## pygame.time.get_ticks ## .. function:: wait | :sl:`pause the program for an amount of time` | :sg:`wait(milliseconds) -> time` Will pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the ``pygame.time.delay()`` function. This returns the actual number of milliseconds used. .. ## pygame.time.wait ## .. function:: delay | :sl:`pause the program for an amount of time` | :sg:`delay(milliseconds) -> time` Will pause for a given number of milliseconds. This function will use the processor (rather than sleeping) in order to make the delay more accurate than ``pygame.time.wait()``. This returns the actual number of milliseconds used. .. ## pygame.time.delay ## .. function:: set_timer | :sl:`repeatedly create an event on the event queue` | :sg:`set_timer(event, millis) -> None` | :sg:`set_timer(event, millis, loops=0) -> None` Set an event to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed. The ``event`` attribute can be a ``pygame.event.Event`` object or an integer type that denotes an event. ``loops`` is an integer that denotes the number of events posted. If 0 (default) then the events will keep getting posted, unless explicitly stopped. To disable the timer for such an event, call the function again with the same event argument with ``millis`` argument set to 0. It is also worth mentioning that a particular event type can only be put on a timer once. In other words, there cannot be two timers for the same event type. Setting an event timer for a particular event discards the old one for that event type. ``loops`` replaces the ``once`` argument, and this does not break backward compatibility .. versionadded:: 2.0.0.dev3 once argument added. .. versionchanged:: 2.0.1 event argument supports ``pygame.event.Event`` object .. versionadded:: 2.0.1 added loops argument to replace once argument .. ## pygame.time.set_timer ## .. class:: Clock | :sl:`create an object to help track time` | :sg:`Clock() -> Clock` Creates a new Clock object that can be used to track an amount of time. The clock also provides several functions to help control a game's framerate. .. method:: tick | :sl:`update the clock` | :sg:`tick(framerate=0) -> milliseconds` This method should be called once per frame. It will compute how many milliseconds have passed since the previous call. If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick(40)`` once per frame, the program will never run at more than 40 frames per second. Note that this function uses SDL_Delay function which is not accurate on every platform, but does not use much CPU. Use tick_busy_loop if you want an accurate timer, and don't mind chewing CPU. .. ## Clock.tick ## .. method:: tick_busy_loop | :sl:`update the clock` | :sg:`tick_busy_loop(framerate=0) -> milliseconds` This method should be called once per frame. It will compute how many milliseconds have passed since the previous call. If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick_busy_loop(40)`` once per frame, the program will never run at more than 40 frames per second. Note that this function uses :func:`pygame.time.delay`, which uses lots of CPU in a busy loop to make sure that timing is more accurate. .. versionadded:: 1.8 .. ## Clock.tick_busy_loop ## .. method:: get_time | :sl:`time used in the previous tick` | :sg:`get_time() -> milliseconds` The number of milliseconds that passed between the previous two calls to ``Clock.tick()``. .. ## Clock.get_time ## .. method:: get_rawtime | :sl:`actual time used in the previous tick` | :sg:`get_rawtime() -> milliseconds` Similar to ``Clock.get_time()``, but does not include any time used while ``Clock.tick()`` was delaying to limit the framerate. .. ## Clock.get_rawtime ## .. method:: get_fps | :sl:`compute the clock framerate` | :sg:`get_fps() -> float` Compute your game's framerate (in frames per second). It is computed by averaging the last ten calls to ``Clock.tick()``. .. ## Clock.get_fps ## .. ## pygame.time.Clock ## .. ## pygame.time ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/ref/touch.rst0000644000175100001770000000364514676242340016664 0ustar00runnerdocker.. include:: common.txt :mod:`pygame._sdl2.touch` ========================= .. module:: pygame._sdl2.touch :synopsis: pygame module to work with touch input | :sl:`pygame module to work with touch input` .. versionadded:: 2 This module requires SDL2. .. function:: get_num_devices | :sl:`get the number of touch devices` | :sg:`get_num_devices() -> int` Return the number of available touch devices. .. ## pygame._sdl2.touch.get_num_devices ## .. function:: get_device | :sl:`get the a touch device id for a given index` | :sg:`get_device(index) -> touchid` :param int index: This number is at least 0 and less than the :func:`number of devices `. Return an integer id associated with the given ``index``. .. ## pygame._sdl2.touch.get_device ## .. function:: get_num_fingers | :sl:`the number of active fingers for a given touch device` | :sg:`get_num_fingers(touchid) -> int` Return the number of fingers active for the touch device whose id is `touchid`. .. ## pygame._sdl2.touch.get_num_fingers ## .. function:: get_finger | :sl:`get information about an active finger` | :sg:`get_finger(touchid, index) -> int` :param int touchid: The touch device id. :param int index: The index of the finger to return information about, between 0 and the :func:`number of active fingers `. Return a dict for the finger ``index`` active on ``touchid``. The dict contains these keys: :: id the id of the finger (an integer). x the normalized x position of the finger, between 0 and 1. y the normalized y position of the finger, between 0 and 1. pressure the amount of pressure applied by the finger, between 0 and 1. .. ## pygame._sdl2.touch.get_finger ## .. ## pygame._sdl2.touch ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/ref/transform.rst0000644000175100001770000003137714676242340017560 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.transform` ======================= .. module:: pygame.transform :synopsis: pygame module to transform surfaces | :sl:`pygame module to transform surfaces` A Surface transform is an operation that moves or resizes the pixels. All these functions take a Surface to operate on and return a new Surface with the results. Some of the transforms are considered destructive. These means every time they are performed they lose pixel data. Common examples of this are resizing and rotating. For this reason, it is better to re-transform the original surface than to keep transforming an image multiple times. (For example, suppose you are animating a bouncing spring which expands and contracts. If you applied the size changes incrementally to the previous images, you would lose detail. Instead, always begin with the original image and scale to the desired size.) .. versionchanged:: 2.0.2 transform functions now support keyword arguments. .. function:: flip | :sl:`flip vertically and horizontally` | :sg:`flip(surface, flip_x, flip_y) -> Surface` This can flip a Surface either vertically, horizontally, or both. The arguments ``flip_x`` and ``flip_y`` are booleans that control whether to flip each axis. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions. .. ## pygame.transform.flip ## .. function:: scale | :sl:`resize to new resolution` | :sg:`scale(surface, size, dest_surface=None) -> Surface` Resizes the Surface to a new size, given as (width, height). This is a fast scale operation that does not sample the results. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the size (width, height) passed in. Also the destination surface must be the same format. .. ## pygame.transform.scale ## .. function:: scale_by | :sl:`resize to new resolution, using scalar(s)` | :sg:`scale_by(surface, factor, dest_surface=None) -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave scale_by feedback with authors `_ Same as :func:`scale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.scale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.scale_by(surf, (2, 1))` doubles the image width but keeps the height the same. .. versionadded:: 2.1.3 .. ## pygame.transform.scale_by ## .. function:: rotate | :sl:`rotate an image` | :sg:`rotate(surface, angle) -> Surface` Unfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise. Unless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value. .. ## pygame.transform.rotate ## .. function:: rotozoom | :sl:`filtered scale and rotation` | :sg:`rotozoom(surface, angle, scale) -> Surface` This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise. .. ## pygame.transform.rotozoom ## .. function:: scale2x | :sl:`specialized image doubler` | :sg:`scale2x(surface, dest_surface=None) -> Surface` This will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics. This really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format. .. ## pygame.transform.scale2x ## .. function:: smoothscale | :sl:`scale a surface to an arbitrary size smoothly` | :sg:`smoothscale(surface, size, dest_surface=None) -> Surface` Uses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized ``MMX`` routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24. .. versionadded:: 1.8 .. ## pygame.transform.smoothscale ## .. function:: smoothscale_by | :sl:`resize to new resolution, using scalar(s)` | :sg:`smoothscale_by(surface, factor, dest_surface=None) -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave smoothscale_by feedback with authors `_ Same as :func:`smoothscale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.smoothscale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.smoothscale_by(surf, (2, 1))` doubles the image width but keeps the height the same. .. versionadded:: 2.1.3 .. ## pygame.transform.smoothscale_by ## .. function:: get_smoothscale_backend | :sl:`return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'` | :sg:`get_smoothscale_backend() -> string` Shows whether or not smoothscale is using ``MMX`` or ``SSE`` acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime. This function is provided for pygame testing and debugging. .. ## pygame.transform.get_smoothscale_backend ## .. function:: set_smoothscale_backend | :sl:`set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'` | :sg:`set_smoothscale_backend(backend) -> None` Sets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses ``MMX`` instructions only. 'SSE' allows ``SSE`` extensions as well. A value error is raised if type is not recognized or not supported by the current processor. This function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only. .. ## pygame.transform.set_smoothscale_backend ## .. function:: chop | :sl:`gets a copy of an image with an interior area removed` | :sg:`chop(surface, rect) -> Surface` Extracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.) ``NOTE``: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface. .. ## pygame.transform.chop ## .. function:: laplacian | :sl:`find edges in a surface` | :sg:`laplacian(surface, dest_surface=None) -> Surface` Finds the edges in a surface using the laplacian algorithm. .. versionadded:: 1.8 .. ## pygame.transform.laplacian ## .. function:: average_surfaces | :sl:`find the average surface from many surfaces.` | :sg:`average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface` Takes a sequence of surfaces and returns a surface with average colors from each of the surfaces. palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. Note, this function currently does not handle palette using surfaces correctly. .. versionadded:: 1.8 .. versionadded:: 1.9 ``palette_colors`` argument .. ## pygame.transform.average_surfaces ## .. function:: average_color | :sl:`finds the average color of a surface` | :sg:`average_color(surface, rect=None, consider_alpha=False) -> Color` Finds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. If consider_alpha is set to True, then alpha is taken into account (removing the black artifacts). .. versionadded:: 2.1.2 ``consider_alpha`` argument .. ## pygame.transform.average_color ## .. function:: grayscale | :sl:`grayscale a surface` | :sg:`grayscale(surface, dest_surface=None) -> Surface` Returns a grayscaled version of the original surface using the luminosity formula which weights red, green and blue according to their wavelengths. An optional destination surface can be passed which is faster than creating a new Surface. This destination surface must have the same dimensions (width, height) and depth as the source Surface. .. ## pygame.transform.grayscale ## .. function:: threshold | :sl:`finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.` | :sg:`threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels` This versatile function can be used for find colors in a 'surf' close to a 'search_color' or close to colors in a separate 'search_surf'. It can also be used to transfer pixels into a 'dest_surf' that match or don't match. By default it sets pixels in the 'dest_surf' where all of the pixels NOT within the threshold are changed to set_color. If inverse_set is optionally set to True, the pixels that ARE within the threshold are changed to set_color. If the optional 'search_surf' surface is given, it is used to threshold against rather than the specified 'set_color'. That is, it will find each pixel in the 'surf' that is within the 'threshold' of the pixel at the same coordinates of the 'search_surf'. :param dest_surf: Surface we are changing. See 'set_behavior'. Should be None if counting (set_behavior is 0). :type dest_surf: pygame.Surface or None :param pygame.Surface surf: Surface we are looking at. :param pygame.Color search_color: Color we are searching for. :param pygame.Color threshold: Within this distance from search_color (or search_surf). You can use a threshold of (r,g,b,a) where the r,g,b can have different thresholds. So you could use an r threshold of 40 and a blue threshold of 2 if you like. :param set_color: Color we set in dest_surf. :type set_color: pygame.Color or None :param int set_behavior: - set_behavior=1 (default). Pixels in dest_surface will be changed to 'set_color'. - set_behavior=0 we do not change 'dest_surf', just count. Make dest_surf=None. - set_behavior=2 pixels set in 'dest_surf' will be from 'surf'. :param search_surf: - search_surf=None (default). Search against 'search_color' instead. - search_surf=Surface. Look at the color in 'search_surf' rather than using 'search_color'. :type search_surf: pygame.Surface or None :param bool inverse_set: - False, default. Pixels outside of threshold are changed. - True, Pixels within threshold are changed. :rtype: int :returns: The number of pixels that are within the 'threshold' in 'surf' compared to either 'search_color' or `search_surf`. :Examples: See the threshold tests for a full of examples: https://github.com/pygame/pygame/blob/main/test/transform_test.py .. literalinclude:: ../../../test/transform_test.py :pyobject: TransformModuleTest.test_threshold_dest_surf_not_change .. versionadded:: 1.8 .. versionchanged:: 1.9.4 Fixed a lot of bugs and added keyword arguments. Test your code. .. ## pygame.transform.threshold ## .. ## pygame.transform ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9811258 pygame-2.6.1/docs/reST/themes/0000755000175100001770000000000014676242436015517 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0381258 pygame-2.6.1/docs/reST/themes/classic/0000755000175100001770000000000014676242436017140 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/themes/classic/elements.html0000644000175100001770000000716414676242340021644 0ustar00runnerdocker{%- extends "!layout.html" %} {%- if not theme_relbar %} {%- block relbar1 %}{# Do not want bar across the top #}{% endblock %} {%- endif %} {#- Classic header with Snakey on the left, page links on the right. #} {%- macro header() %}
{%- endmacro %} {%- block body %} {%- block section %}{% endblock %}


{{ _('Edit on GitHub') }} {%- endblock %} {%- block relbaritems %} {% endblock %} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/themes/classic/page.html0000644000175100001770000000023514676242340020734 0ustar00runnerdocker{%- extends "elements.html" %} {%- block document %} {{ header() }} {{ super() }} {%- endblock %} {%- block section %} {{ body }} {%- endblock %} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0381258 pygame-2.6.1/docs/reST/themes/classic/static/0000755000175100001770000000000014676242436020427 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/themes/classic/static/pygame.css_t0000644000175100001770000003134714676242340022750 0ustar00runnerdocker/** * Pygame stylesheet -- original theme * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @import url("reset.css"); @import url("tooltip.css"); @import url("basic.css"); /* -- index page ------------------------------------------------------------ */ #pygame-front-page h2 { margin-top: 2em; } #pygame-front-page dt { padding-top: 1em; } #pygame-front-page dl { padding-left: 1em; } /* -- tutorial page --------------------------------------------------------- */ div.body table.docinfo { font-size: 0.9em; margin-left: 3em; } div.body table.docinfo th { text-align: left; font-weight: bolder; } div.body table.docinfo td { padding-left: 1em; } div.body table.matrix th, div.body table.matrix td { border-right: 0.1em solid black; } div.body table.matrix th:last-child, div.body table.matrix td:last-child { border-right-style: none; } div.body table.matrix th { font-weight: bolder; } div.body table.matrix th.head { text-align: center; border-bottom: 0.2em double black; } div.body table.matrix td { text-align: center; } div.body table.matrix th.stub { text-align: left; } /* Let a float element be beside a code block */ div.highlight-python.notranslate { display: inline-block; } /* -- page layout ----------------------------------------------------------- */ body { font-family: {{ theme_bodyfont }}; color: {{ theme_textcolor }}; font-style: normal; text-decoration: none; text-align: left; border-style: none; } div.header { padding: 0.5em; line-height: 1.2em; } div.header > div { border: {{ theme_headerborder }}; border-collapse: collapse; background-color: {{ theme_headerbgcolor }}; } div.header .logo { background-color: {{ theme_logobgcolor }}; padding: 0.3em; border-right: 3px solid black; display: flex; align-items: center; justify-content: center; flex-direction: column; } div.header .logo img { min-width: 200px; min-height: 60px; border-style: none; } div.header .pagelinks { padding: 0.3em; text-align: center; vertical-align: middle; flex-grow: 1; } div.header p.top { margin-top: 0; margin-bottom: 1em; } div.header p.bottom { margin-bottom: 0; text-align: left; } div.header .pagelinks a { text-decoration: underline; } div.header .pagelinks a:hover { text-decoration: none; } div.document { background-color: {{ theme_bgcolor }}; } .flex-container { display: flex; flex-direction: row; } @media only screen and (max-width: 680px) { .flex-container { flex-direction: column; } div.header .logo { border-right: none; border-bottom: 3px solid black; } } /* on wide screens center text, and max width for readable area. */ @media only screen and (min-width: 680px) { div.documentwrapper { float: initial; width: 100%; max-width: 700px; margin: 0 auto; } } .toc td { display:block; width: min(200%, 100vw - 132px); } .toc td:last-child { padding-bottom: 20px; } table.toc td:nth-child(2) { display: none; } div.bodywrapper { margin: 0 0 0 230px; } div.body { min-width: auto; padding: 0.5em; } div.heading { padding: 0 0 0 0.5em; } {% if theme_rightsidebar|tobool %} div.bodywrapper { margin: 0 230px 0 0; } {% endif -%} div.footer { {%- if theme_nofooter %} display: none; {%- endif %} color: {{ theme_footertextcolor }}; width: 100%; padding: 9px 0; text-align: center; font-size: 75%; } div.footer a { background-color: {{ theme_footerbgcolor }}; color: {{ theme_footertextcolor }}; text-decoration: underline; } div.related { background-color: {{ theme_relbarbgcolor }}; line-height: 30px; color: {{ theme_relbartextcolor }}; border-top: 3px solid black; border-bottom: 3px solid black; } div.related a { color: {{ theme_relbarlinkcolor }}; } div.sphinxsidebar { {%- if theme_stickysidebar|tobool %} top: 30px; bottom: 0; margin: 0; position: fixed; overflow: auto; height: auto; {%- endif %} {%- if theme_rightsidebar|tobool %} float: right; {%- if theme_stickysidebar|tobool %} right: 0; {%- endif %} {%- endif %} } div.sphinxsidebar h3 { font-family: {{ theme_headfont }}; color: {{ theme_sidebartextcolor }}; font-size: 1.4em; font-weight: normal; margin: 0; padding: 0; } div.sphinxsidebar h3 a { color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar h4 { font-family: {{ theme_headfont }}; color: {{ theme_sidebartextcolor }}; font-size: 1.3em; font-weight: normal; margin: 5px 0 0 0; padding: 0; } div.sphinxsidebar p { color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; padding: 0; color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar a { color: {{ theme_sidebarlinkcolor }}; } div.sphinxsidebar input { border: 1px solid {{ theme_sidebarlinkcolor }}; font-family: sans-serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: {{ theme_linkcolor }}; background-color: transparent; text-decoration: underline; } a:hover { color: {{ theme_linkcolor }}; background-color: transparent; text-decoration: none; } p { margin: 0.5em 0; } strong { font-weight: bold; } em { font-style: italic; } dl.definition { padding-top: 0.7em; padding-bottom: 0.7em; } dt.title { font-family: monospace; } dt tt { font-weight: bold; font-size: 1.1em; } dt.module { margin-bottom: 1em; } table.toc { margin-left: 2em; margin-bottom: 0.5em; } table.toc td { border-style: none; padding-right: 10px; } span.summaryline { font-style: italic; } span.signature { font-family: {{ theme_sigfont }}; margin-bottom: 0.5em; } span.pre { font-family: monospace; } code.download span.pre { font-family: inherit; font-weight: normal; } table.docutils td.toc { border-style: none; } div.body p, div.body dd, div.body li { text-align: left; line-height: 130%; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: {{ theme_headfont }}; font-weight: bold; margin: 1em 0 0.5em; text-align: left; } div.body h6 { font-weight: normal; font-style: italic; margin: 0; padding: 0; line-height: 130%; } div.body h1 { font-size: 1.5em; } div.body h2 { font-size: 1.4em; } div.body h3 { font-size: 1.3em; } div.body h4 { font-size: 1.2em; } div.body h5 { font-size: 1.1em; } div.body h6 { font-size: 1.0em; } a.headerlink { color: {{ theme_headlinkcolor }}; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } a.headerlink:hover { background-color: {{ theme_headlinkcolor }}; color: white; } blockquote { margin-left: 2em; } div.admonition p.admonition-title + p { display: inline; } div.admonition p, div.admonition pre, div.admonition ul, div.admonition ol { margin-bottom: 5px; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } dl.definition div.note, dl.definition div.seealso { background: none; border: none; } dl.definition div.admonition { margin-bottom: 0.5em; } dl.definition .admonition-title { font-weight: bold; } div.note { background-color: {{ theme_notebgcolor }}; border: 1px solid #ccc; } .note tt { background: #d6d6d6; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } div.caution { background-color: {{ theme_cautionbgcolor }}; border: 1px solid #aabb88; } div.warning { background-color: #ffe4e4; border: 1px solid #f66; } .warning tt { background: #efc2c2; } p.linklist { text-align: center; } .section:target > h2, .section:target > h3, .section:target > h4, dt:target, span.highlighted { background-color: {{ theme_highlightbgcolor }}; } pre { background-color: {{ theme_codebgcolor }}; border: 1px solid #ac9; border-left: none; border-right: none; color: #333333; display: block; font-family: monospace; line-height: 120%; margin-bottom: 1em; padding: 5px 5px 5px 15px; text-align: justify; } div.highlight pre { border: none; } ul.simple { list-style-type: circle; margin-bottom: 1em; } code.descclassname, code.descname { font-size: 1.3em; font-weight: bold; } /* Top level section title format section tag has been introduced in docutils 0.17 as a replacement for div.section Both rule variations are kept to support old versions of docutils */ div.body > section > dl > dt.title, div.body > div.section > dl > dt.title { font-size: 120%; font-weight: bold; margin-bottom: 1em; } /* Visually separate an element from previous content in a section */ div.body .leading { margin-top: 0.5em; } /* Visually separate an element from following content in a section */ div.body .trailing { margin-bottom: 0.75em; } /* An element that spans the width of its section */ div.body div.fullwidth div, div.body div.fullwidth img { display: block; margin-left: auto; margin-right: auto; } div.body div.fullwidth p { text-align: center; } /* A two column table with link, description pairs. */ table.more-to-explore, table.more-to-explore th, table.more-to-explore td { border: 0.2em double black; border-collapse: collapse; background-color: inherit; } table.more-to-explore caption { text-align: left; font-size: larger; background-color: inherit; } table.more-to-explore th, table.more-to-explore td { padding: 0.2em 2em 0.3em 0.5em; } div.body p.small-heading { margin-bottom: 0.2em; font-size: small; } /* Inlined element float right */ div.body div.inlined, div.body img.inlined-right { float: right; margin: 1em 0; } div.body .inset { margin-left: 2em; } /* Code line reference text style */ div.body span.codelineref { text-decoration: underline; } /* Highlight Code types and functions. */ .py-class .pre, .reference.internal em { font-weight: bold; background-color: {{ theme_keywordbgcolor }}; } span.linenos { margin-right: 15px; } /* Examples section: contains one or more example subsections */ div.examples > div.example { clear: both; margin-top: 0.2em; border: 0.1em solid teal; padding: 0.2em; } div.example img { float: left; padding-right: 0.3em; padding-bottom: 0.1em; } div.example p, div.example pre { margin-top: 0; margin-bottom: 0.4em; } div.example div.break { clear: both; height: 0; } /* -- tooltip style --------------------------------------------------------- */ a.tooltip { text-decoration: underline; } a.tooltip:hover { text-decoration: none; } .tooltip-content { width: 250px; background-color: {{ theme_tooltipbgcolor }}; border: 1px solid {{ theme_tooltipbdrcolor }}; padding: 3px; border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); } /* -- comments style --------------------------------------------------------- */ form.addcomment { display:inline; } .addcomment input, a.commentButton { background-color: {{ theme_examplebgcolor }}; border: 1px solid #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; padding: 6px; margin-right: 4px; } article.commentsArticle { background: none repeat scroll 0 0 #FEF790; border: 1px solid black; margin-bottom: 12px; margin-top: 12px; padding: 4px; } article.hidden { display:none; } header.commentHeading { background: none repeat scroll 0 0 #FDE42D; text-align: center; } pre.commentContent { overflow: auto; max-width: 800px; margin-left:0; border: 0; white-space: pre-wrap; } /* -- logos page ---------------------------------------------------------------- */ .fullwidth .line-block { text-align: center; } /* -- responsive design --------------------------------------------------------- */ @media only screen and (max-width: 680px) { /* Make tables be responsive-ish. */ table, thead, tbody, th, td, tr { display: block; } div.body img.inlined-right { float: none; display: block; margin: auto } span.linenos { margin-right: 10px; } .addcomment input, a.commentButton { font-size: 10px; } pre { white-space: pre-wrap; word-wrap: break-word; } .toc td { width: 100%; } } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/themes/classic/theme.conf0000644000175100001770000000235014676242340021103 0ustar00runnerdocker[theme] inherit = basic stylesheet = pygame.css pygments_style = sphinx [options] home_uri = '' embedded = true nosidebar = true nofooter = true relbar = false noheader = false noheading = false notableofcontents = false footerbgcolor = #11303d footertextcolor = #000000 sidebarbgcolor = #1c4e63 sidebartextcolor = #ffffff sidebarlinkcolor = #98dbcc relbarbgcolor = #6aee28 relbartextcolor = #000000 relbarlinkcolor = #000000 bgcolor = #aaeebb textcolor = #000000 headbgcolor = #f2f2f2 headtextcolor = #20435c headlinkcolor = #68698b linkcolor = #000000 codebgcolor = #eeffcc codetextcolor = #333333 cautionbgcolor = #eeffcc notebgcolor = #eeeeee highlightbgcolor = #c7c695 headerbgcolor = #6aee28 logobgcolor = #c2fc20 keywordbgcolor = #90ee90 examplebgcolor = #6aee28 tooltipbgcolor = #c2fc20 tooltipbdrcolor = #ace01C headerborder = 3px solid black bodyfont = sans-serif headfont = sans-serif sigfont = monospace ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0411258 pygame-2.6.1/docs/reST/tut/0000755000175100001770000000000014676242436015046 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/tut/CameraIntro.rst0000644000175100001770000002370614676242340020006 0ustar00runnerdocker.. TUTORIAL:Camera Module Introduction .. include:: common.txt ************************************************* Pygame Tutorials - Camera Module Introduction ************************************************* Camera Module Introduction ========================== .. rst-class:: docinfo :Author: by Nirav Patel :Contact: nrp@eclecti.cc Pygame 1.9 comes with support for interfacing cameras, allowing you to capture still images, watch live streams, and do some simple computer vision. This tutorial will cover all of those use cases, providing code samples you can base your app or game on. You can refer to the :mod:`reference documentation ` for the full API. .. note:: As of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as **EXPERIMENTAL**, meaning the API could change in subsequent versions. Import and Init --------------- :: import pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init() As the camera module is optional, it needs to be imported and initialized manually as shown above. Capturing a Single Image ------------------------ Now we will go over the simplest case of opening a camera and capturing a frame as a surface. In the below example, we assume that there is a camera at /dev/video0 on the computer, and initialize it with a size of 640 by 480. The surface called image is whatever the camera was seeing when get_image() was called. :: cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() Listing Connected Cameras ^^^^^^^^^^^^^^^^^^^^^^^^^ You may be wondering, what if we don't know the exact path of the camera? We can ask the module to provide a list of cameras attached to the computer and initialize the first camera in the list. :: camlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480)) Using Camera Controls ^^^^^^^^^^^^^^^^^^^^^ Most cameras support controls like flipping the image and changing brightness. set_controls() and get_controls() can be used at any point after using start(). :: cam.set_controls(hflip = True, vflip = False) print camera.get_controls() Capturing a Live Stream ----------------------- The rest of this tutorial will be based around capturing a live stream of images. For this, we will be using the class below. As described, it will simply blit a constant stream of camera frames to the screen, effectively showing live video. It is basically what you would expect, looping get_image(), blitting to the display surface, and flipping it. For performance reasons, we will be supplying the camera with the same surface to use each time. :: class Capture: def __init__(self): self.size = (640,480) # create a display surface. standard pygame stuff self.display = pygame.display.set_mode(self.size, 0) # this is the same as what we saw before self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no cameras detected.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # create a surface to capture to. for performance purposes # bit depth is the same as that of the display surface. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # if you don't want to tie the framerate to the camera, you can check # if the camera has an image ready. note that while this works # on most cameras, some will never return true. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface. simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # close the camera safely self.cam.stop() going = False self.get_and_flip() Since get_image() is a blocking call that could take quite a bit of time on a slow camera, this example uses query_image() to see if the camera is ready. This allows you to separate the framerate of your game from that of your camera. It is also possible to have the camera capturing images in a separate thread, for approximately the same performance gain, if you find that your camera does not support the query_image() function correctly. Basic Computer Vision --------------------- By using the camera, transform, and mask modules, pygame can do some basic computer vision. Colorspaces ^^^^^^^^^^^ When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial. :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB") .. image:: camera_rgb.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV") .. image:: camera_yuv.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV") .. image:: camera_hsv.jpg :class: trailing Thresholding ^^^^^^^^^^^^ Using the threshold() function from the transform module, one can do simple green screen like effects, or isolate specifically colored objects in a scene. In the below example, we threshold out just the green tree and make the rest of the image black. Check the reference documentation for details on the :func:`threshold function `\ . :: self.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2) .. image:: camera_thresholded.jpg :class: trailing Of course, this is only useful if you already know the exact color of the object you are looking for. To get around this and make thresholding usable in the real world, we need to add a calibration stage where we identify the color of an object and use it to threshold against. We will be using the average_color() function of the transform module to do this. Below is an example calibration function that you could loop until an event like a key press, and an image of what it would look like. The color inside the box will be the one that is used for the threshold. Note that we are using the HSV colorspace in the below images. :: def calibrate(self): # capture the image self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface self.display.blit(self.snapshot, (0,0)) # make a rect in the middle of the screen crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # get the average color of the area inside the rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # fill the upper left corner with that color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip() .. image:: camera_average.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2) .. image:: camera_thresh.jpg :class: trailing You can use the same idea to do a simple green screen/blue screen, by first getting a background image and then thresholding against it. The below example just has the camera pointed at a blank white wall in HSV colorspace. :: def calibrate(self): # capture a bunch of background images bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # average them down to one to get rid of some noise pygame.transform.average_surfaces(bg,self.background) # blit it to the display surface self.display.blit(self.background, (0,0)) pygame.display.flip() .. image:: camera_background.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background) .. image:: camera_green.jpg :class: trailing Using the Mask Module ^^^^^^^^^^^^^^^^^^^^^ The stuff above is great if you just want to display images, but with the :mod:`mask module `, you can also use a camera as an input device for a game. For example, going back to the example of thresholding out a specific object, we can find the position of that object and use it to control an on screen object. :: def get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # threshold against the color we got before mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # keep only the largest blob of that color connected = mask.connected_component() # make sure the blob is big enough that it isn't just noise if mask.count() > 100: # find the center of the blob coord = mask.centroid() # draw a circle with size variable on the size of the blob pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip() .. image:: camera_mask.jpg :class: trailing This is just the most basic example. You can track multiple different colored blobs, find the outlines of objects, have collision detection between real life and in game objects, get the angle of an object to allow for even finer control, and more. Have fun! ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/tut/ChimpLineByLine.rst0000644000175100001770000005175214676242340020557 0ustar00runnerdocker.. TUTORIAL:Line by Line Descriptions of the Chimp Example .. include:: common.txt ************************************************* Pygame Tutorials - Line By Line Chimp Example ************************************************* Line By Line Chimp ================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org .. toctree:: :hidden: chimp.py Introduction ------------ In the *pygame* examples there is a simple example named "chimp". This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame's abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling. The program and images can be found inside the standard source distribution of pygame. You can run it by running `python -m pygame.examples.chimp` in your terminal. This tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out. This is an excellent tutorial for people getting their first look at the *pygame* code. Once *pygame* is fully installed, you can find and run the chimp demo for yourself in the examples directory. .. container:: fullwidth leading trailing .. rst-class:: small-heading (no, this is not a banner ad, it's the screenshot) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source ` Import Modules -------------- This is the code that imports all the needed modules into your program. It also checks for the availability of some of the optional pygame modules. :: # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") First, we import the standard "os" python module. This allow us to do things like create platform independent file paths. In the next line, we import the pygame package. In our case, we import pygame as ``pg``, so that all of the functionality of pygame is able to be referenced from the namespace ``pg``. Some pygame modules are optional, and if they aren't found, they evaluate to ``False``. Because of that, we decide to print a nice warning message if the :mod:`font` or :mod:`mixer ` modules in pygame are not available. (Although they will only be unavailable in very uncommon situations). Lastly, we prepare two paths for the rest of the code to use. ``main_dir`` uses the `os.path` module and the `__file__` variable provided by Python to locate the game's python file, and extract the folder from that path. It then prepares the variable ``data_dir`` to tell the loading functions exactly where to look. Loading Resources ----------------- Here we have two functions we can use to load images and sounds. We will look at each function individually in this section. :: def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() This function takes the name of an image to load. It also optionally takes an argument it can use to set a colorkey for the image, and an argument to scale the image. A colorkey is used in graphics to represent a color of the image that is transparent. The first thing this function does is create a full pathname to the file. In this example all the resources are in a "data" subdirectory. By using the `os.path.join` function, a pathname will be created that works for whatever platform the game is running on. Next we load the image using the :func:`pygame.image.load` function. After the image is loaded, we make an important call to the `convert()` function. This makes a new copy of a Surface and converts its color format and depth to match the display. This means blitting the image to the screen will happen as quickly as possible. We then scale the image, using the :func:`pygame.transform.scale` function. This function takes a Surface and the size it should be scaled to. To scale by a scalar, we can get the size and scale the x and y by the scalar. Last, we set the colorkey for the image. If the user supplied an argument for the colorkey argument we use that value as the colorkey for the image. This would usually just be a color RGB value, like (255, 255, 255) for white. You can also pass a value of -1 as the colorkey. In this case the function will lookup the color at the topleft pixel of the image, and use that color for the colorkey. :: def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound Next is the function to load a sound file. The first thing this function does is check to see if the :mod:`pygame.mixer` module was imported correctly. If not, it returns a small class instance that has a dummy play method. This will act enough like a normal Sound object for this game to run without any extra error checking. This function is similar to the image loading function, but handles some different problems. First we create a full path to the sound image, and load the sound file. Then we simply return the loaded Sound object. Game Object Classes ------------------- Here we create two classes to represent the objects in our game. Almost all the logic for the game goes into these two classes. We will look over them one at a time here. :: class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False Here we create a class to represent the players fist. It is derived from the `Sprite` class included in the :mod:`pygame.sprite` module. The `__init__` function is called when new instances of this class are created. The first thing we do is be sure to call the `__init__` function for our base class. This allows the Sprite's `__init__` function to prepare our object for use as a sprite. This game uses one of the sprite drawing Group classes. These classes can draw sprites that have an "image" and "rect" attribute. By simply changing these two attributes, the renderer will draw the current image at the current position. All sprites have an `update()` method. This function is typically called once per frame. It is where you should put code that moves and updates the variables for the sprite. The `update()` method for the fist moves the fist to the location of the mouse pointer. It also offsets the fist position slightly if the fist is in the "punching" state. The following two functions `punch()` and `unpunch()` change the punching state for the fist. The `punch()` method also returns a true value if the fist is colliding with the given target sprite. :: class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image The `Chimp` class is doing a little more work than the fist, but nothing more complex. This class will move the chimp back and forth across the screen. When the monkey is punched, he will spin around to exciting effect. This class is also derived from the base :class:`Sprite ` class, and is initialized the same as the fist. While initializing, the class also sets the attribute "area" to be the size of the display screen. The `update` function for the chimp simply looks at the current "dizzy" state, which is true when the monkey is spinning from a punch. It calls either the `_spin` or `_walk` method. These functions are prefixed with an underscore. This is just a standard python idiom which suggests these methods should only be used by the `Chimp` class. We could go so far as to give them a double underscore, which would tell python to really try to make them private methods, but we don't need such protection. :) The `_walk` method creates a new position for the monkey by moving the current rect by a given offset. If this new position crosses outside the display area of the screen, it reverses the movement offset. It also mirrors the image using the :func:`pygame.transform.flip` function. This is a crude effect that makes the monkey look like he's turning the direction he is moving. The `_spin` method is called when the monkey is currently "dizzy". The dizzy attribute is used to store the current amount of rotation. When the monkey has rotated all the way around (360 degrees) it resets the monkey image back to the original, non-rotated version. Before calling the :func:`pygame.transform.rotate` function, you'll see the code makes a local reference to the function simply named "rotate". There is no need to do that for this example, it is just done here to keep the following line's length a little shorter. Note that when calling the `rotate` function, we are always rotating from the original monkey image. When rotating, there is a slight loss of quality. Repeatedly rotating the same image and the quality would get worse each time. Also, when rotating an image, the size of the image will actually change. This is because the corners of the image will be rotated out, making the image bigger. We make sure the center of the new image matches the center of the old image, so it rotates without moving. The last method is `punched()` which tells the sprite to enter its dizzy state. This will cause the image to start spinning. It also makes a copy of the current image named "original". Initialize Everything --------------------- Before we can do much with pygame, we need to make sure its modules are initialized. In this case we will also open a simple graphics window. Now we are in the `main()` function of the program, which actually runs everything. :: pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) The first line to initialize *pygame* takes care of a bit of work for us. It checks through the imported *pygame* modules and attempts to initialize each one of them. It is possible to go back and check if modules failed to initialize, but we won't bother here. It is also possible to take a lot more control and initialize each specific module by hand. That type of control is generally not needed, but is available if you desire. Next we set up the display graphics mode. Note that the :mod:`pygame.display` module is used to control all the display settings. In this case we are asking for a 1280 by 480 window, with the ``SCALED`` display flag. This automatically scales up the window for displays much larger than the window. Last we set the window title and turn off the mouse cursor for our window. Very basic to do, and now we have a small black window ready to do our bidding. Usually the cursor defaults to visible, so there is no need to really set the state unless we want to hide it. Create The Background --------------------- Our program is going to have text message in the background. It would be nice for us to create a single surface to represent the background and repeatedly use that. The first step is to create the surface. :: background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) This creates a new surface for us that is the same size as the display window. Note the extra call to `convert()` after creating the Surface. The convert with no arguments will make sure our background is the same format as the display window, which will give us the fastest results. We also fill the entire background with a certain green color. The fill() function usually takes an RGB triplet as arguments, but supports many input formats. See the :mod:`pygame.Color` for all the color formats. Put Text On The Background, Centered ------------------------------------ Now that we have a background surface, lets get the text rendered to it. We only do this if we see the :mod:`pygame.font` module has imported properly. If not, we just skip this section. :: if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) As you see, there are a couple steps to getting this done. First we must create the font object and render it into a new surface. We then find the center of that new surface and blit (paste) it onto the background. The font is created with the `font` module's `Font()` constructor. Usually you will pass the name of a TrueType font file to this function, but we can also pass `None`, which will use a default font. The `Font` constructor also needs to know the size of font we want to create. We then render that font into a new surface. The `render` function creates a new surface that is the appropriate size for our text. In this case we are also telling render to create antialiased text (for a nice smooth look) and to use a dark grey color. Next we need to find the centered position of the text on our display. We create a "Rect" object from the text dimensions, which allows us to easily assign it to the screen center. Finally we blit (blit is like a copy or paste) the text onto the background image. Display The Background While Setup Finishes ------------------------------------------- We still have a black window on the screen. Lets show our background while we wait for the other resources to load. :: screen.blit(background, (0, 0)) pg.display.flip() This will blit our entire background onto the display window. The blit is self explanatory, but what about this flip routine? In pygame, changes to the display surface are not immediately visible. Normally, a display must be updated in areas that have changed for them to be visible to the user. In this case the `flip()` function works nicely because it simply handles the entire window area. Prepare Game Object ------------------- Here we create all the objects that the game is going to need. :: whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() First we load two sound effects using the `load_sound` function we defined above. Then we create an instance of each of our sprite classes. And lastly we create a sprite :class:`Group ` which will contain all our sprites. We actually use a special sprite group named :class:`RenderPlain `. This sprite group can draw all the sprites it contains to the screen. It is called `RenderPlain` because there are actually more advanced Render groups. But for our game, we just need simple drawing. We create the group named "allsprites" by passing a list with all the sprites that should belong in the group. We could later on add or remove sprites from this group, but in this game we won't need to. The `clock` object we create will be used to help control our game's framerate. we will use it in the main loop of our game to make sure it doesn't run too fast. Main Loop --------- Nothing much here, just an infinite loop. :: going = True while going: clock.tick(60) All games run in some sort of loop. The usual order of things is to check on the state of the computer and user input, move and update the state of all the objects, and then draw them to the screen. You'll see that this example is no different. We also make a call to our `clock` object, which will make sure our game doesn't run faster than 60 frames per second. Handle All Input Events ----------------------- This is an extremely simple case of working the event queue. :: for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() First we get all the available Events from pygame and loop through each of them. The first two tests see if the user has quit our game, or pressed the escape key. In these cases we just set ``going`` to ``False``, allowing us out of the infinite loop. Next we just check to see if the mouse button was pressed or released. If the button was pressed, we ask the fist object if it has collided with the chimp. We play the appropriate sound effect, and if the monkey was hit, we tell him to start spinning (by calling his `punched()` method). Update the Sprites ------------------ :: allsprites.update() Sprite groups have an `update()` method, which simply calls the update method for all the sprites it contains. Each of the objects will move around, depending on which state they are in. This is where the chimp will move one step side to side, or spin a little farther if he was recently punched. Draw The Entire Scene --------------------- Now that all the objects are in the right place, time to draw them. :: screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() The first blit call will draw the background onto the entire screen. This erases everything we saw from the previous frame (slightly inefficient, but good enough for this game). Next we call the `draw()` method of the sprite container. Since this sprite container is really an instance of the "RenderPlain" sprite group, it knows how to draw our sprites. Lastly, we `flip()` the contents of pygame's software double buffer to the screen. This makes everything we've drawn visible all at once. Game Over --------- User has quit, time to clean up. :: pg.quit() Cleaning up the running game in *pygame* is extremely simple. Since all variables are automatically destructed, we don't really have to do anything, but calling `pg.quit()` explicitly cleans up pygame's internals. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/tut/DisplayModes.rst0000644000175100001770000002122014676242340020164 0ustar00runnerdocker.. TUTORIAL: Choosing and Configuring Display Modes .. include:: common.txt ******************************************** Pygame Tutorials - Setting Display Modes ******************************************** Setting Display Modes ===================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Introduction ------------ Setting the display mode in *pygame* creates a visible image surface on the monitor. This surface can either cover the full screen, or be windowed on platforms that support a window manager. The display surface is nothing more than a standard *pygame* surface object. There are special functions needed in the :mod:`pygame.display` module to keep the image surface contents updated on the monitor. Setting the display mode in *pygame* is an easier task than with most graphic libraries. The advantage is if your display mode is not available, *pygame* will emulate the display mode that you asked for. *Pygame* will select a display resolution and color depth that best matches the settings you have requested, then allow you to access the display with the format you have requested. In reality, since the :mod:`pygame.display` module is a binding around the SDL library, SDL is really doing all this work. There are advantages and disadvantages to setting the display mode in this manner. The advantage is that if your game requires a specific display mode, your game will run on platforms that do not support your requirements. It also makes life easier when you're getting something started, it is always easy to go back later and make the mode selection a little more particular. The disadvantage is that what you request is not always what you will get. There is also a performance penalty when the display mode must be emulated. This tutorial will help you understand the different methods for querying the platforms display capabilities, and setting the display mode for your game. Setting Basics -------------- The first thing to learn about is how to actually set the current display mode. The display mode may be set at any time after the :mod:`pygame.display` module has been initialized. If you have previously set the display mode, setting it again will change the current mode. Setting the display mode is handled with the function :func:`pygame.display.set_mode((width, height), flags, depth) `. If the width and height of the new display mode is not passed, the created surface will have the same size as the current screen resolution. If only the width or height is set to 0, the surface will have the same respective width or height as the screen resolution. Note that in older versions of Pygame using a SDL version prior to 1.2.10, not passing in the width and height will raise an exception. The depth flag is the requested bits per pixel for the surface. If the given depth is 8, *pygame* will create a color-mapped surface. When given a higher bit depth, *pygame* will use a packed color mode. Much more information about depths and color modes can be found in the documentation for the display and surface modules. The default value for depth is 0. When given an argument of 0, *pygame* will select the best bit depth to use, usually the same as the system's current bit depth. The flags argument lets you control extra features for the display mode. Again, more information about this is found in the *pygame* reference documents. How to Decide ------------- So how do you select a display mode that is going to work best with your graphic resources and the platform your game is running on? There are several methods for gathering information about the display device. All of these methods must be called after the display module has been initialized, but you likely want to call them before setting the display mode. First, :func:`pygame.display.Info() ` will return a special object type of VidInfo, which can tell you a lot about the graphics driver capabilities. The function :func:`pygame.display.list_modes(depth, flags, display) ` can be used to find the supported graphic modes by the system. :func:`pygame.display.mode_ok((width, height), flags, depth, display) ` takes the same arguments as :func:`set_mode() `, but returns the closest matching bit depth to the one you request. Lastly, :func:`pygame.display.get_driver() ` will return the name of the graphics driver selected by *pygame*. Just remember the golden rule. *Pygame* will work with pretty much any display mode you request. Some display modes will need to be emulated, which will slow your game down, since *pygame* will need to convert every update you make to the "real" display mode. The best bet is to always let *pygame* choose the best bit depth, and convert all your graphic resources to that format when they are loaded. You let *pygame* choose its bit depth by calling :func:`set_mode() ` with no depth argument or a depth of 0, or you can call :func:`mode_ok() ` to find a closest matching bit depth to what you need. When your display mode is windowed, you usually must match the same bit depth as the desktop. When you are fullscreen, some platforms can switch to any bit depth that best suits your needs. You can find the depth of the current desktop if you get a VidInfo object before ever setting your display mode. After setting the display mode, you can find out information about its settings by getting a VidInfo object, or by calling any of the Surface.get* methods on the display surface. Functions --------- These are the routines you can use to determine the most appropriate display mode. You can find more information about these functions in the display module documentation. :func:`pygame.display.mode_ok(size, flags, depth, display) ` This function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation. :func:`pygame.display.list_modes(depth, flags, display) ` Returns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to :any:`FULLSCREEN `\ . If you specify your own flags without :any:`FULLSCREEN `\ , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used. :func:`pygame.display.get_desktop_sizes() ` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable. :func:`pygame.display.Info() ` This function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) You can test all these flags as simply members of the VidInfo object. Examples -------- Here are some examples of different methods to init the graphics display. They should help you get an idea of how to go about setting your display mode. :: >>> # give me the best depth with a 640 x 480 windowed display >>> pygame.display.set_mode((640, 480)) >>> # give me the biggest 16-bit display available >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit not supported') ... else: ... print('Found Resolution:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> # need an 8-bit surface, nothing else will do >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Can only work with an 8-bit display, sorry') ... else: ... pygame.display.set_mode((800, 600), 0, 8) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/tut/ImportInit.rst0000644000175100001770000000530714676242340017675 0ustar00runnerdocker.. TUTORIAL:Import and Initialize .. include:: common.txt ******************************************** Pygame Tutorials - Import and Initialize ******************************************** Import and Initialize ===================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Getting pygame imported and initialized is a very simple process. It is also flexible enough to give you control over what is happening. Pygame is a collection of different modules in a single python package. Some of the modules are written in C, and some are written in python. Some modules are also optional, and might not always be present. This is just a quick introduction on what is going on when you import pygame. For a clearer explanation definitely see the pygame examples. Import ------ First we must import the pygame package. Since pygame version 1.4 this has been updated to be much easier. Most games will import all of pygame like this. :: import pygame from pygame.locals import * The first line here is the only necessary one. It imports all the available pygame modules into the pygame package. The second line is optional, and puts a limited set of constants and functions into the global namespace of your script. An important thing to keep in mind is that several pygame modules are optional. For example, one of these is the font module. When you "import pygame", pygame will check to see if the font module is available. If the font module is available it will be imported as "pygame.font". If the module is not available, "pygame.font" will be set to None. This makes it fairly easy to later on test if the font module is available. Init ---- Before you can do much with pygame, you will need to initialize it. The most common way to do this is just make one call. :: pygame.init() This will attempt to initialize all the pygame modules for you. Not all pygame modules need to be initialized, but this will automatically initialize the ones that do. You can also easily initialize each pygame module by hand. For example to only initialize the font module you would just call. :: pygame.font.init() Note that if there is an error when you initialize with "pygame.init()", it will silently fail. When hand initializing modules like this, any errors will raise an exception. Any modules that must be initialized also have a "get_init()" function, which will return true if the module has been initialized. It is safe to call the init() function for any module more than once. Quit ---- Modules that are initialized also usually have a quit() function that will clean up. There is no need to explicitly call these, as pygame will cleanly quit all the initialized modules when python finishes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/reST/tut/MakeGames.rst0000644000175100001770000001357414676242340017436 0ustar00runnerdocker.. TUTORIAL:Tom Chance's Making Games Tutorial .. include:: common.txt **************************** Making Games With Pygame **************************** Making Games With Pygame ======================== .. toctree:: :hidden: :glob: tom_games2 tom_games3 tom_games4 tom_games5 tom_games6 Table of Contents ----------------- \1. :ref:`Introduction ` \1.1. :ref:`A note on coding styles ` \2. :ref:`Revision: Pygame fundamentals ` \2.1. :ref:`The basic pygame game ` \2.2. :ref:`Basic pygame objects ` \2.3. :ref:`Blitting ` \2.4. :ref:`The event loop ` \2.5. :ref:`Ta-da! ` \3. :ref:`Kicking things off ` \3.1. :ref:`The first lines, and loading modules ` \3.2. :ref:`Resource handling functions ` \4. :ref:`Game object classes ` \4.1. :ref:`A simple ball class ` \4.1.1. :ref:`Diversion 1: Sprites ` \4.1.2. :ref:`Diversion 2: Vector physics ` \5. :ref:`User-controllable objects ` \5.1. :ref:`A simple bat class ` \5.1.1. :ref:`Diversion 3: Pygame events ` \6. :ref:`Putting it all together ` \6.1. :ref:`Let the ball hit sides ` \6.2. :ref:`Let the ball hit bats ` \6.3. :ref:`The Finished product ` .. _makegames-1: 1. Introduction --------------- First of all, I will assume you have read the :doc:`Line By Line Chimp ` tutorial, which introduces the basics of Python and pygame. Give it a read before reading this tutorial, as I won't bother repeating what that tutorial says (or at least not in as much detail). This tutorial is aimed at those who understand how to make a ridiculously simple little "game", and who would like to make a relatively simple game like Pong. It introduces you to some concepts of game design, some simple mathematics to work out ball physics, and some ways to keep your game easy to maintain and expand. All the code in this tutorial works toward implementing `TomPong `_, a game I've written. By the end of the tutorial, you should not only have a firmer grasp of pygame, but you should also understand how TomPong works, and how to make your own version. Now, for a brief recap of the basics of pygame. A common method of organising the code for a game is to divide it into the following six sections: - **Load modules** which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself - **Resource handling classes**; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have. - **Game object classes**; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class. - **Any other game functions**; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function. - **Initialise the game**, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in. - **The main loop**, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen. Every game you make will have some or all of those sections, possibly with more of your own. For the purposes of this tutorial, I will write about how TomPong is laid out, and the ideas I write about can be transferred to almost any kind of game you might make. I will also assume that you want to keep all of the code in a single file, but if you're making a reasonably large game, it's often a good idea to source certain sections into module files. Putting the game object classes into a file called ``objects.py``, for example, can help you keep game logic separate from game objects. If you have a lot of resource handling code, it can also be handy to put that into ``resources.py``. You can then :code:`from objects,resources import *` to import all of the classes and functions. .. _makegames-1-1: 1.1. A note on coding styles ---------------------------- The first thing to remember when approaching any programming project is to decide on a coding style, and stay consistent. Python solves a lot of the problems because of its strict interpretation of whitespace and indentation, but you can still choose the size of your indentations, whether you put each module import on a new line, how you comment code, etc. You'll see how I do all of this in the code examples; you needn't use my style, but whatever style you adopt, use it all the way through the program code. Also try to document all of your classes, and comment on any bits of code that seem obscure, though don't start commenting the obvious. I've seen plenty of people do the following:: player1.score += scoreup # Add scoreup to player1 score The worst code is poorly laid out, with seemingly random changes in style, and poor documentation. Poor code is not only annoying for other people, but it also makes it difficult for you to maintain. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/MoveIt.rst0000644000175100001770000006125114676242340017002 0ustar00runnerdocker.. TUTORIAL:Help! How Do I Move An Image? .. include:: common.txt **************************************************** Pygame Tutorials - Help! How Do I Move An Image? **************************************************** Help! How Do I Move An Image? ============================= .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Many people new to programming and graphics have a hard time figuring out how to make an image move around the screen. Without understanding all the concepts, it can be very confusing. You're not the first person to be stuck here, I'll do my best to take things step by step. We'll even try to end with methods of keeping your animations efficient. Note that we won't be teaching you to program with python in this article, just introduce you to some of the basics with pygame. Just Pixels On The Screen ------------------------- Pygame has a display Surface. This is basically an image that is visible on the screen, and the image is made up of pixels. The main way you change these pixels is by calling the blit() function. This copies the pixels from one image onto another. This is the first thing to understand. When you blit an image onto the screen, you are simply changing the color of the pixels on the screen. Pixels aren't added or moved, we just change the colors of the pixels already on the screen. These images you blit to the screen are also Surfaces in pygame, but they are in no way connected to the display Surface. When they are blitted to the screen they are copied into the display, but you still have a unique copy of the original. With this brief description. Perhaps you can already understand what is needed to "move" an image. We don't actually move anything at all. We simply blit the image in a new position. But before we draw the image in the new position, we'll need to "erase" the old one. Otherwise the image will be visible in two places on the screen. By rapidly erasing the image and redrawing it in a new place, we achieve the "illusion" of movement. Through the rest of this tutorial we will break this process down into simpler steps. Even explaining the best ways to have multiple images moving around the screen. You probably already have questions. Like, how do we "erase" the image before drawing it in a new position? Perhaps you're still totally lost? Well hopefully the rest of this tutorial can straighten things out for you. Let's Go Back A Step -------------------- Perhaps the concept of pixels and images is still a little foreign to you? Well good news, for the next few sections we are going to use code that does everything we want, it just doesn't use pixels. We're going to create a small python list of 6 numbers, and imagine it represents some fantastic graphics we could see on the screen. It might actually be surprising how closely this represents exactly what we'll later be doing with real graphics. So let's begin by creating our screen list and fill it with a beautiful landscape of 1s and 2s. :: >>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1] Now we've created our background. It's not going to be very exciting unless we also draw a player on the screen. We'll create a mighty hero that looks like the number 8. Let's stick him near the middle of the map and see what it looks like. :: >>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] This might have been as far as you've gotten if you jumped right in doing some graphics programming with pygame. You've got some nice looking stuff on the screen, but it cannot move anywhere. Perhaps now that our screen is just a list of numbers, it's easier to see how to move him? Making The Hero Move -------------------- Before we can start moving the character. We need to keep track of some sort of position for him. In the last section when we drew him, we just picked an arbitrary position. Let's do it a little more officially this time. :: >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Now it is pretty easy to move him to a new position. We simply change the value of playerpos, and draw him on the screen again. :: >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1] Whoops. Now we can see two heroes. One in the old position, and one in his new position. This is exactly the reason we need to "erase" the hero in his old position before we draw him in the new position. To erase him, we need to change that value in the list back to what it was before the hero was there. That means we need to keep track of the values on the screen before the hero replaced them. There's several ways you could do this, but the easiest is usually to keep a separate copy of the screen background. This means we need to make some changes to our little game. Creating A Map -------------- What we want to do is create a separate list we will call our background. We will create the background so it looks like our original screen did, with 1s and 2s. Then we will copy each item from the background to the screen. After that we can finally draw our hero back onto the screen. :: >>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #a new blank screen >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] It may seem like a lot of extra work. We're no farther off than we were before the last time we tried to make him move. But this time we have the extra information we need to move him properly. Making The Hero Move (Take 2) ----------------------------- This time it will be easy to move the hero around. First we will erase the hero from his old position. We do this by copying the correct value from the background onto the screen. Then we will draw the character in his new position on the screen >>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1] There it is. The hero has moved one space to the left. We can use this same code to move him to the left again. :: >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1] Excellent! This isn't exactly what you'd call smooth animation. But with a couple small changes, we'll make this work directly with graphics on the screen. Definition: "blit" ------------------ In the next sections we will transform our program from using lists to using real graphics on the screen. When displaying the graphics we will use the term **blit** frequently. If you are new to doing graphics work, you are probably unfamiliar with this common term. BLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just *"assigning"* pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image. Other graphics libraries will use the word *bitblt*, or just *blt*, but they are talking about the same thing. It is basically copying memory from one place to another. Actually, it is a bit more advanced than straight copying of memory, since it needs to handle things like pixel formats, clipping, and scanline pitches. Advanced blitters can also handle things like transparency and other special effects. Going From The List To The Screen --------------------------------- To take the code we see in the above to examples and make them work with pygame is very straightforward. We'll pretend we have loaded some pretty graphics and named them "terrain1", "terrain2", and "hero". Where before we assigned numbers to a list, we now blit graphics to the screen. Another big change, instead of using positions as a single index (0 through 5), we now need a two dimensional coordinate. We'll pretend each of the graphics in our game is 10 pixels wide. :: >>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0)) Hmm, that code should seem very familiar, and hopefully more importantly; the code above should make a little sense. Hopefully my illustration of setting simple values in a list shows the similarity of setting pixels on the screen (with blit). The only part that's really extra work is converting the player position into coordinates on the screen. For now we just use a crude :code:`(playerpos*10, 0)` , but we can certainly do better than that. Now let's move the player image over a space. This code should have no surprises. :: >>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0)) There you have it. With this code we've shown how to display a simple background with a hero's image on it. Then we've properly moved that hero one space to the left. So where do we go from here? Well for one the code is still a little awkward. First thing we'll want to do is find a cleaner way to represent the background and player position. Then perhaps a bit of smoother, real animation. Screen Coordinates ------------------ To position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination. Pygame comes with a convenient container for these coordinates, it is a Rect. The Rect basically represents a rectangular area in these coordinates. It has topleft corner and a size. The Rect comes with a lot of convenient methods which help you move and position them. In our next examples we will represent the positions of our objects with the Rects. Also know that many functions in pygame expect Rect arguments. All of these functions can also accept a simple tuple of 4 elements (left, top, width, height). You aren't always required to use these Rect objects, but you will mainly want to. Also, the blit() function can accept a Rect as its position argument, it simply uses the topleft corner of the Rect as the real position. Changing The Background ----------------------- In all our previous sections, we've been storing the background as a list of different types of ground. That is a good way to create a tile-based game, but we want smooth scrolling. To make that a little easier, we're going to change the background into a single image that covers the whole screen. This way, when we want to "erase" our objects (before redrawing them) we only need to blit the section of the erased background onto the screen. By passing an optional third Rect argument to blit, we tell blit to only use that subsection of the source image. You'll see that in use below as we erase the player image. Also note, now when we finish drawing to the screen, we call pygame.display.update() which will show everything we've drawn onto the screen. Smooth Movement --------------- To make something appear to move smoothly, we only want to move it a couple pixels at a time. Here is the code to make an object move smoothly across the screen. Based on what we already now know, this should look pretty simple. :: >>> screen = create_screen() >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #draw the background >>> position = player.get_rect() >>> screen.blit(player, position) #draw the player >>> pygame.display.update() #and show it all >>> for x in range(100): #animate 100 frames ... screen.blit(background, position, position) #erase ... position = position.move(2, 0) #move player ... screen.blit(player, position) #draw new player ... pygame.display.update() #and show it all ... clock.tick(60) #update 60 times per second There you have it. This is all the code that is needed to smoothly animate an object across the screen. We can even use a pretty background character. Another benefit of doing the background this way, the image for the player can have transparency or cutout sections and it will still draw correctly over the background (a free bonus). We also throw in a call to pygame.time.Clock() to grab the clock element. With it, we can call clock.tick() to set the framerate in frames per second. This slows down our program a little, otherwise it might run so fast you might not see it. So, What Next? -------------- Well there we have it. Hopefully this article has done everything it promised to do. But, at this point the code really isn't ready for the next best-selling game. How do we easily have multiple moving objects? What exactly are those mysterious functions like load_player_image()? We also need a way to get simple user input, and loop for more than 100 frames. We'll take the example we have here, and turn it into an object oriented creation that would make momma proud. First, The Mystery Functions ---------------------------- Full information on these types of functions can be found in other tutorials and reference. The pygame.image module has a load() function which will do what we want. The lines to load the images should become this. :: >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert() We can see that's pretty simple, the load function just takes a filename and returns a new Surface with the loaded image. After loading we make a call to the Surface method, convert(). Convert returns us a new Surface of the image, but now converted to the same pixel format as our display. Since the images will be the same format at the screen, they will blit very quickly. If we did not convert, the blit() function is slower, since it has to convert from one type of pixel to another as it goes. You may also have noticed that both the load() and convert() return new Surfaces. This means we're really creating two Surfaces on each of these lines. In other programming languages, this results in a memory leak (not a good thing). Fortunately Python is smart enough to handle this, and pygame will properly clean up the Surface we end up not using. The other mystery function we saw in the above example was create_screen(). In pygame it is simple to create a new window for graphics. The code to create a 640x480 surface is below. By passing no other arguments, pygame will just pick the best color depth and pixel format for us. :: >>> screen = pygame.display.set_mode((640, 480)) Handling Some Input ------------------- We desperately need to change the main loop to look for any user input, (like when the user closes the window). We need to add "event handling" to our program. All graphical programs use this Event Based design. The program gets events like "keyboard pressed" or "mouse moved" from the computer. Then the program responds to the different events. Here's what the code should look like. Instead of looping for 100 frames, we'll keep looping until the user asks us to stop. :: >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... move_and_draw_all_game_objects() What this code simply does is, first loop forever, then check if there are any events from the user. We exit the program if the user presses the close button on the window. After we've checked all the events we move and draw our game objects. (We'll also erase them before they move, too) Moving Multiple Images ---------------------- Here's the part where we're really going to change things around. Let's say we want 10 different images moving around on the screen. A good way to handle this is to use python's classes. We'll create a class that represents our game object. This object will have a function to move itself, and then we can create as many as we like. The functions to draw and move the object need to work in a way where they only move one frame (or one step) at a time. Here's the python code to create our class. :: >>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(self.speed, 0) ... if self.pos.right > 600: ... self.pos.left = 0 So we have two functions in our class. The init function constructs our object. It positions the object and sets its speed. The move method moves the object one step. If it's gone too far, it moves the object back to the left. Putting It All Together ----------------------- Now with our new object class, we can put together the entire game. Here is what the main function for our program will look like. :: >>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #create 10 objects
... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60) And there it is. This is the code we need to animate 10 objects on the screen. The only point that might need explaining is the two loops we use to clear all the objects and draw all the objects. In order to do things properly, we need to erase all the objects before drawing any of them. In our sample here it may not matter, but when objects are overlapping, using two loops like this becomes important. Preparing for Improved User Input --------------------------------- With all keyboard input terminating the program, that's not very interactive. Let's add some extra user input! First we should create a unique character that the player will control. We can do that in much the same way we created the other movable entities. Let's call the player object p. We can already move any object, but, a player should have more input than simply moving right. To accommodate this, let's revamp our move function under our GameObject class. :: >>> def move(self, up=False, down=False, left=False, right=False): ... if right: ... self.pos.right += self.speed ... if left: ... self.pos.right -= self.speed ... if down: ... self.pos.top += self.speed ... if up: ... self.pos.top -= self.speed ... if self.pos.right > WIDTH: ... self.pos.left = 0 ... if self.pos.top > HEIGHT-SPRITE_HEIGHT: ... self.pos.top = 0 ... if self.pos.right < SPRITE_WIDTH: ... self.pos.right = WIDTH ... if self.pos.top < 0: ... self.pos.top = HEIGHT-SPRITE_HEIGHT There's certainly a lot more going on here, so let's take it one step at a time. First, we've added some default values into the move function, declared as up, down, left, and right. These booleans will allow us to specifically select a direction that the object is moving in. The first part, where we go through and check True for each variable, is where we will add to the position of the object, much like before. Right controls horizontal, and top controls vertical positions. Additionally, we've removed the magic number present previously, and replaced it with the constants WIDTH, HEIGHT, SPRITE_WIDTH, and SPRITE_HEIGHT. These values represent the screen width and height, along with the width and height of the object displayed on the screen. The second part, where the position is being checked, ensures that the position is within the confines of our screen. With this in place, we need to make sure that when one of our other objects calls move, we set right to true. Adding the User Input --------------------- We've already seen that pygame has event handling, and we know that KEYDOWN is an event in this loop. We could, under KEYDOWN, assert the key press matches an arrow key, where we would then call move. However, this movement will only occur once every time a key is pressed, and it therefore will be extremely choppy and unpleasant. For this, we can use pygame.key.get_pressed(), which returns a list of all keys, and whether or not they are currently pressed. Since we want these key presses to be maintained whether an event is currently happening or not, we should put it outside of the main event handling loop, but still within our game loop. Our functionality will look like this. :: >>> keys = pygame.key.get_pressed() >>> if keys[pygame.K_UP]: ... p.move(up=True) >>> if keys[pygame.K_DOWN]: ... p.move(down=True) >>> if keys[pygame.K_LEFT]: ... p.move(left=True) >>> if keys[pygame.K_RIGHT]: ... p.move(right=True) We simply get our list of keys pressed, called keys. We can then check the index at the key code position to see if it is held down. For more key codes, I recommend checking out the documentation on pygame.key. When up is held, we move our object, p, up. When down is held, we move down. Rinse and repeat for all cases, and we're good to go! Putting it all Together One More time ------------------------------------- Now that we're finished with the player functionality, let's take one last look to make sure we understand everything. :: >>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> entity = pygame.image.load('alien1.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> p = GameObject(player, 10, 3) #create the player object >>> for x in range(10): #create 10 objects
... o = GameObject(entity, x*40, x) ... objects.append(o) >>> while True: ... screen.blit(background, p.pos, p.pos) ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... keys = pygame.key.get_pressed() ... if keys[pygame.K_UP]: ... p.move(up=True) ... if keys[pygame.K_DOWN]: ... p.move(down=True) ... if keys[pygame.K_LEFT]: ... p.move(left=True) ... if keys[pygame.K_RIGHT]: ... p.move(right=True) ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... screen.blit(p.image, p.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60) A few things not mentioned earlier: we load in a second image and call it entity, and we use that for all objects that aren't the player, which uses the player image defined earlier. And that's all there is to it! Now we have a fully functional player object that is controlled using the arrow keys! You Are On Your Own From Here ----------------------------- So what would be next on your road to learning? Well first playing around with this example a bit. The full running version of this example is available in the pygame examples directory. It is the example named :func:`moveit.py ` . Take a look at the code and play with it, run it, learn it. Things you may want to work on is maybe having more than one type of object. Finding a way to cleanly "delete" objects when you don't want to show them any more. Also updating the display.update() call to pass a list of the areas on-screen that have changed. There are also other tutorials and examples in pygame that cover these issues. So when you're ready to keep learning, keep on reading. :-) Lastly, you can feel free to come to the pygame mailing list or chatroom with any questions on this stuff. There's always folks on hand who can help you out with this sort of business. Lastly, have fun, that's what games are for! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/PygameIntro.rst0000644000175100001770000003167014676242340020037 0ustar00runnerdocker.. TUTORIAL:Pygame Python Introduction .. include:: common.txt **************** Pygame Intro **************** Python Pygame Introduction ========================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org This article is an introduction to the `pygame library `_ for `Python programmers `_. The original version appeared in the `PyZine volume 1 issue 3 `_. This version contains minor revisions, to create an all-around better article. Pygame is a Python extension library that wraps the `SDL `_ library and its helpers. HISTORY ------- Pygame started in the summer of 2000. Being a C programmer of many years, I discovered both Python and SDL at about the same time. You are already familiar with Python, which was at version 1.5.2. You may need an introduction to SDL, which is the Simple DirectMedia Layer. Created by Sam Lantinga, SDL is a cross-platform C library for controlling multimedia, comparable to DirectX. It has been used for hundreds of commercial and open source games. I was impressed at how clean and straightforward both projects were and it wasn't long before I realized mixing Python and SDL was an interesting proposal. I discovered a small project already under-way with exactly the same idea, PySDL. Created by Mark Baker, PySDL was a straightforward implementation of SDL as a Python extension. The interface was cleaner than a generic SWIG wrapping, but I felt it forced a "C style" of code. The sudden death of PySDL prompted me to take on a new project of my own. I wanted to put together a project that really took advantage of Python. My goal was to make it easy to do the simple things, and straightforward to do the difficult things. Pygame was started in October, 2000. Six months later pygame version 1.0 was released. TASTE ----- I find the best way to understand a new library is to jump straight into an example. In the early days of pygame, I created a bouncing ball animation with 7 lines of code. Let's take a look at a friendlier version of that same thing. This should be simple enough to follow along, and a complete breakdown follows. .. image:: intro_ball.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("intro_ball.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill("black") screen.blit(ball, ballrect) pygame.display.flip() This is as simple as you can get for a bouncing animation. First we see importing and initializing pygame is nothing noteworthy. The ``import pygame`` imports the package with all the available pygame modules. The call to ``pygame.init()`` initializes each of these modules. Make sure the gif file of the bouncing ball is in the same folder as the code block. On :clr:`line 4` we set the size of the display window, for best results you can change these numbers to match your own monitor's resolution. On :clr:`line 8` we create a graphical window with the call to ``pygame.display.set_mode()``. Pygame and SDL make this easy by defaulting to the best graphics modes for the graphics hardware. You can override the mode and SDL will compensate for anything the hardware cannot do. Pygame represents images as *Surface* objects. The ``display.set_mode()`` function creates a new *Surface* object that represents the actual displayed graphics. Any drawing you do to this Surface will become visible on the monitor. At :clr:`line 10` we load our ball image. Pygame supports a variety of image formats through the SDL_image library, including BMP, JPG, PNG, TGA, and GIF. The ``pygame.image.load()`` function returns us a Surface with the ball data. The Surface will keep any colorkey or alpha transparency from the file. After loading the ball image we create a variable named ballrect. Pygame comes with a convenient utility object type named :class:`Rect `, which represents a rectangular area. Later, in the animation part of the code, we will see what the *Rect* objects can do. At this point, :clr:`line 13`, our program is initialized and ready to run. Inside an infinite loop we check for user input, move the ball, and then draw the ball. If you are familiar with GUI programming, you have had experience with events and event loops. In pygame this is no different, we check if a *QUIT* event has happened. If so we simply exit the program, pygame will ensure everything is cleanly shutdown. It is time to update our position for the ball. :clr:`Lines 17` moves the ballrect variable by the current speed. :clr:`Lines 18 thru 21` reverse the speed if the ball has moved outside the screen. Not exactly Newtonian physics, but it is all we need. On :clr:`line 23` we erase the screen by filling it with a black RGB color. If you have never worked with animations this may seem strange. You may be asking "Why do we need to erase anything, why don't we just move the ball on the screen?" That is not quite the way computer animation works. Animation is nothing more than a series of single images, which when displayed in sequence do a very good job of fooling the human eye into seeing motion. The screen is just a single image that the user sees. If we did not take the time to erase the ball from the screen, we would actually see a "trail" of the ball as we continuously draw the ball in its new positions. On :clr:`line 24` we draw the ball image onto the screen. Drawing of images is handled by the :meth:`Surface.blit() ` method. A blit basically means copying pixel colors from one image to another. We pass the blit method a source :class:`Surface ` to copy from, and a position to place the source onto the destination. The last thing we need to do is actually update the visible display. Pygame manages the display with a double buffer. When we are finished drawing we call the :func:`pygame.display.flip()` method. This makes everything we have drawn on the screen Surface become visible. This buffering makes sure we only see completely drawn frames on the screen. Without it, the user would see the half completed parts of the screen as they are being created. That concludes this short introduction to pygame. Pygame also has modules to do things like input handling for the keyboard, mouse, and joystick. It can mix audio and decode streaming music. With the *Surfaces* you can draw simple shapes, rotate and scale the picture, and even manipulate the pixels of an image in realtime as numpy arrays. Pygame also has the ability to act as a cross platform display layer for PyOpenGL. Most of the pygame modules are written in C, few are actually done in Python. The pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting. PYTHON AND GAMING ----------------- "Is Python suitable for gaming?" The answer is, "It depends on the game." Python is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer. .. image:: intro_blade.jpg :class: inlined-right Over the past several years there has been an interesting trend in game development, the move towards higher level languages. Usually a game is split into two major parts. The game engine, which must be as fast as possible, and the game logic, which makes the engine actually do something. It wasn't long ago when the engine of a game was written in assembly, with portions written in C. Nowadays, C has moved to the game engine, while often the game itself is written in higher level scripting languages. Games like Quake3 and Unreal run these scripts as portable bytecode. In early 2001, developer Rebel Act Studios finished their game, Severance: Blade of Darkness. Using their own custom 3D engine, the rest of the game is written with Python. The game is a bloody action 3rd person perspective fighter. You control medieval warriors into intricate decapitating combination attacks while exploring dungeons and castles. You can download third party add-ons for this game, and find they are nothing more than Python source files. More recently, Python has been used in a variety of games like Freedom Force, and Humungous' Backyard Sports Series. .. image:: intro_freedom.jpg :class: inlined-right Pygame and SDL serve as an excellent C engine for 2D games. Games will still find the largest part of their runtime is spent inside SDL handling the graphics. SDL can take advantage of graphics hardware acceleration. Enabling this can change a game from running around 40 frames per second to over 200 frames per second. When you see your Python game running at 200 frames per second, you realize that Python and games can work together. It is impressive how well both Python and SDL work on multiple platforms. For example, in May of 2001 I released my own full pygame project, SolarWolf, an arcade style action game. One thing that has surprised me is that one year later there has been no need for any patches, bug fixes, or updates. The game was developed entirely on windows, but runs on Linux, Mac OSX, and many Unixes without any extra work on my end. Still, there are very clear limitations. The best way to manage hardware accelerated graphics is not always the way to get fastest results from software rendering. Hardware support is not available on all platforms. When a game gets more complex, it often must commit to one or the other. SDL has some other design limitations, things like full screen scrolling graphics can quickly bring your game down to unplayable speeds. While SDL is not suitable for all types of games, remember companies like Loki have used SDL to run a wide variety of retail quality titles. Pygame is fairly low-level when it comes to writing games. You'll quickly find yourself needing to wrap common functions into your own game environment. The great thing about this is there is nothing inside pygame to get in your way. Your program is in full control of everything. The side effect of that is you will find yourself borrowing a lot of code to get a more advanced framework put together. You'll need a better understanding of what you are doing. CLOSING ------- Developing games is very rewarding, there is something exciting about being able to see and interact with the code you've written. Pygame currently has almost 30 other projects using it. Several of them are ready to play now. You may be surprised to visit the pygame website, and see what other users have been able to do with Python. One thing that has caught my attention is the amount of people coming to Python for the first time to try game development. I can see why games are a draw for new programmers, but it can be difficult since creating games requires a firmer understanding of the language. I've tried to support this group of users by writing many examples and pygame tutorials for people new to these concepts. In the end, my advice is to keep it simple. I cannot stress this enough. If you are planning to create your first game, there is a lot to learn. Even a simpler game will challenge your designs, and complex games don't necessarily mean fun games. When you understand Python, you can use pygame to create a simple game in only one or two weeks. From there you'll need a surprising amount of time to add the polish to make that into a full presentable game. Pygame Modules Overview ^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: :class: more-to-explore :widths: 20, 50 :mod:`cdrom `, "playback" :mod:`cursors `, "load cursor images, includes standard cursors" :mod:`display `, "control the display window or screen" :mod:`draw `, "draw simple shapes onto a Surface" :mod:`event `, "manage events and the event queue" :mod:`font `, "create and render TrueType fonts" :mod:`image `, "save and load images" :mod:`joystick `, "manage joystick devices" :mod:`key `, "manage the keyboard" :mod:`mouse `, "manage the mouse" :mod:`sndarray `, "manipulate sounds with numpy" :mod:`surfarray `, "manipulate images with numpy" :mod:`time `, "control timing" :mod:`transform `, "scale, rotate, and flip images" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/SpriteIntro.rst0000644000175100001770000005166714676242340020073 0ustar00runnerdocker.. TUTORIAL: Sprite Module Introduction .. include:: common.txt ************************************************* Pygame Tutorials - Sprite Module Introduction ************************************************* Sprite Module Introduction ========================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Pygame version 1.3 comes with a new module, ``pygame.sprite``. This module is written in Python and includes some higher-level classes to manage your game objects. By using this module to its full potential, you can easily manage and draw your game objects. The sprite classes are very optimized, so it's likely your game will run faster with the sprite module than without. The sprite module is also meant to be very generic. It turns out you can use it with nearly any type of gameplay. All this flexibility comes with a slight penalty, it needs a little understanding to properly use it. The :mod:`reference documentation ` for the sprite module can keep you running, but you'll probably need a bit more explanation of how to use ``pygame.sprite`` in your own game. Several of the pygame examples (like "chimp" and "aliens") have been updated to use the sprite module. You may want to look into those first to see what this sprite module is all about. The chimp module even has its own line-by-line tutorial, which may help get more understanding of programming with python and pygame. Note that this introduction will assume you have a bit of experience programming with python, and are somewhat familiar with the different parts of creating a simple game. In this tutorial the word "reference" is occasionally used. This represents a python variable. Variables in python are references, so you can have several variables all pointing to the same object. History Lesson -------------- The term "sprite" is a holdover from older computer and game machines. These older boxes were unable to draw and erase normal graphics fast enough for them to work as games. These machines had special hardware to handle game like objects that needed to animate very quickly. These objects were called "sprites" and had special limitations, but could be drawn and updated very fast. They usually existed in special overlay buffers in the video. These days computers have become generally fast enough to handle sprite like objects without dedicated hardware. The term sprite is still used to represent just about anything in a 2D game that is animated. The Classes ----------- The sprite module comes with two main classes. The first is :class:`Sprite `, which should be used as a base class for all your game objects. This class doesn't really do anything on its own, it just includes several functions to help manage the game object. The other type of class is :class:`Group `. The ``Group`` class is a container for different ``Sprite`` objects. There are actually several different types of group classes. Some of the ``Groups`` can draw all the elements they contain, for example. This is all there really is to it. We'll start with a description of what each type of class does, and then discuss the proper ways to use these two classes. The Sprite Class ---------------- As mentioned before, the Sprite class is designed to be a base class for all your game objects. You cannot really use it on its own, as it only has several methods to help it work with the different ``Group`` classes. The sprite keeps track of which groups it belongs to. The class constructor (``__init__`` method) takes an argument of a ``Group`` (or list of ``Groups``) the ``Sprite`` instance should belong to. You can also change the ``Group`` membership for the ``Sprite`` with the :meth:`add() ` and :meth:`remove() ` methods. There is also a :meth:`groups() ` method, which returns a list of the current groups containing the sprite. When using your Sprite classes it's best to think of them as "valid" or "alive" when they are belonging to one or more ``Groups``. When you remove the instance from all groups pygame will clean up the object. (Unless you have your own references to the instance somewhere else.) The :meth:`kill() ` method removes the sprite from all groups it belongs to. This will cleanly delete the sprite object. If you've put some little games together, you'll know sometimes cleanly deleting a game object can be tricky. The sprite also comes with an :meth:`alive() ` method, which returns true if it is still a member of any groups. The Group Class --------------- The ``Group`` class is just a simple container. Similar to the sprite, it has an :meth:`add() ` and :meth:`remove() ` method which can change which sprites belong to the group. You also can pass a sprite or list of sprites to the constructor (``__init__()`` method) to create a ``Group`` instance that contains some initial sprites. The ``Group`` has a few other methods like :meth:`empty() ` to remove all sprites from the group and :meth:`copy() ` which will return a copy of the group with all the same members. Also the :meth:`has() ` method will quickly check if the ``Group`` contains a sprite or list of sprites. The other function you will use frequently is the :meth:`sprites() ` method. This returns an object that can be looped on to access every sprite the group contains. Currently this is just a list of the sprites, but in later version of python this will likely use iterators for better performance. As a shortcut, the ``Group`` also has an :meth:`update() ` method, which will call an ``update()`` method on every sprite in the group. Passing the same arguments to each one. Usually in a game you need some function that updates the state of a game object. It's very easy to call your own methods using the ``Group.sprites()`` method, but this is a shortcut that's used enough to be included. Also note that the base ``Sprite`` class has a "dummy" ``update()`` method that takes any sort of arguments and does nothing. Lastly, the Group has a couple other methods that allow you to use it with the builtin ``len()`` function, getting the number of sprites it contains, and the "truth" operator, which allows you to do "if mygroup:" to check if the group has any sprites. Mixing Them Together -------------------- At this point the two classes seem pretty basic. Not doing a lot more than you can do with a simple list and your own class of game objects. But there are some big advantages to using the ``Sprite`` and ``Group`` together. A sprite can belong to as many groups as you want. Remember as soon as it belongs to no groups, it will usually be cleared up (unless you have other "non-group" references to that object). The first big thing is a fast simple way to categorize sprites. For example, say we had a Pacman-like game. We could make separate groups for the different types of objects in the game. Ghosts, Pac, and Pellets. When Pac eats a power pellet, we can change the state for all ghost objects by effecting everything in the Ghost group. This is quicker and simpler than looping through a list of all the game objects and checking which ones are ghosts. Adding and removing groups and sprites from each other is a very fast operation, quicker than using lists to store everything. Therefore you can very efficiently change group memberships. Groups can be used to work like simple attributes for each game object. Instead of tracking some attribute like "close_to_player" for a bunch of enemy objects, you could add them to a separate group. Then when you need to access all the enemies that are near the player, you already have a list of them, instead of going through a list of all the enemies, checking for the "close_to_player" flag. Later on your game could add multiple players, and instead of adding more "close_to_player2", "close_to_player3" attributes, you can easily add them to different groups for each player. Another important benefit of using the ``Sprites`` and ``Groups`` is that the groups cleanly handle the deleting (or killing) of game objects. In a game where many objects are referencing other objects, sometimes deleting an object can be the hardest part, since it can't go away until it is not referenced by anyone. Say we have an object that is "chasing" another object. The chaser can keep a simple Group that references the object (or objects) it is chasing. If the object being chased happens to be destroyed, we don't need to worry about notifying the chaser to stop chasing. The chaser can see for itself that its group is now empty, and perhaps find a new target. Again, the thing to remember is that adding and removing sprites from groups is a very cheap/fast operation. You may be best off by adding many groups to contain and organize your game objects. Some could even be empty for large portions of the game, there isn't any penalties for managing your game like this. The Many Group Types -------------------- The above examples and reasons to use ``Sprites`` and ``Groups`` are only a tip of the iceberg. Another advantage is that the sprite module comes with several different types of ``Groups``. These groups all work just like a regular old ``Group``, but they also have added functionality (or slightly different functionality). Here's a list of the ``Group`` classes included with the sprite module. :class:`Group ` This is the standard "no frills" group mainly explained above. Most of the other ``Groups`` are derived from this one, but not all. :class:`GroupSingle ` This works exactly like the regular ``Group`` class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites. :class:`RenderPlain ` This is a standard group derived from ``Group``. It has a draw() method that draws all the sprites it contains to the screen (or any ``Surface``). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it. :class:`RenderClear ` This is derived from the ``RenderPlain`` group, and adds a method named ``clear()``. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the ``clear()`` method is called. :class:`RenderUpdates ` This is the Cadillac of rendering ``Groups``. It is inherited from ``RenderClear``, but changes the ``draw()`` method to also return a list of pygame ``Rects``, which represent all the areas on screen that have been changed. That is the list of different groups available We'll discuss more about these rendering groups in the next section. There's nothing stopping you from creating your own Group classes as well. They are just python code, so you can inherit from one of these and add/change whatever you want. In the future I hope we can add a couple more ``Groups`` to this list. A ``GroupMulti`` which is like the ``GroupSingle``, but can hold up to a given number of sprites (in some sort of circular buffer?). Also a super-render group that can clear the position of the old sprites without needing a background image to do it (by grabbing a copy of the screen before blitting). Who knows really, but in the future we can add more useful classes to this list. The Rendering Groups -------------------- From above we can see there are three different rendering groups. We could probably just get away with the ``RenderUpdates`` one, but it adds overhead not really needed for something like a scrolling game. So we have a couple tools here, pick the right one for the right job. For a scrolling type game, where the background completely changes every frame, we obviously don't need to worry about python's update rectangles in the call to ``display.update()``. You should definitely go with the ``RenderPlain`` group here to manage your rendering. For games where the background is more stationary, you definitely don't want pygame updating the entire screen (since it doesn't need to). This type of game usually involves erasing the old position of each object, then drawing it in a new place for each frame. This way we are only changing what is necessary. Most of the time you will just want to use the ``RenderUpdates`` class here. Since you will also want to pass this list of changes to the ``display.update()`` function. The ``RenderUpdates`` class also does a good job at minimizing overlapping areas in the list of updated rectangles. If the previous position and current position of an object overlap, it will merge them into a single rectangle. Combined with the fact that it properly handles deleted objects, this is one powerful ``Group`` class. If you've written a game that manages the changed rectangles for the objects in a game, you know this is the cause for a lot of messy code in your game. Especially once you start to throw in objects that can be deleted at any time. All this work is reduced to a ``clear()`` and ``draw()`` method with this monster class. Plus with the overlap checking, it is likely faster than when you did it manually. Also note that there's nothing stopping you from mixing and matching these render groups in your game. You should definitely use multiple rendering groups when you want to do layering with your sprites. Also if the screen is split into multiple sections, perhaps each section of the screen should use an appropriate render group? Collision Detection ------------------- The sprite module also comes with two very generic collision detection functions. For more complex games, these really won't work for you, but you can easily grab the source code for them, and modify them as needed. Here's a summary of what they are, and what they do. :func:`spritecollide(sprite, group, dokill, collided = None) -> list ` This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the ``kill()`` method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) This finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new ``Explosion`` where the bomb was. (Note, the ``Explosion`` class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.) :func:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary ` This is similar to the ``spritecollide`` function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a ``dokill`` argument for the sprites in each list. When ``dokill1`` is true, the colliding sprites in ``group1`` will be ``kill()``ed. When ``dokill2`` is true, we get the same results for ``group2``. The dictionary it returns works like this; each key in the dictionary is a sprite from ``group1`` that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 This code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the ``values()`` or ``items()`` if we wanted to do something to the specific shots that collided with aliens. If we did loop over the ``values()`` we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens". Those are the basic collision functions that come with pygame. It should be easy to roll your own that perhaps use something different than the "rect" attribute. Or maybe try to fine-tweak your code a little more by directly effecting the collision object, instead of building a list of the collision? The code in the sprite collision functions is very optimized, but you could speed it up slightly by taking out some functionality you don't need. Common Problems --------------- Currently there is one main problem that catches new users. When you derive your new sprite class with the Sprite base, you **must** call the ``Sprite.__init__()`` method from your own class ``__init__()`` method. If you forget to call the ``Sprite.__init__()`` method, you get a cryptic error, like this :: AttributeError: 'mysprite' instance has no attribute '_Sprite__g' Extending Your Own Classes *(Advanced)* --------------------------------------- Because of speed concerns, the current ``Group`` classes try to only do exactly what they need, and not handle a lot of general situations. If you decide you need extra features, you may want to create your own ``Group`` class. The ``Sprite`` and ``Group`` classes were designed to be extended, so feel free to create your own ``Group`` classes to do specialized things. The best place to start is probably the actual python source code for the sprite module. Looking at the current ``Sprite`` groups should be enough example on how to create your own. For example, here is the source code for a rendering ``Group`` that calls a ``render()`` method for each sprite, instead of just blitting an "image" variable from it. Since we want it to also handle updated areas, we will start with a copy of the original ``RenderUpdates`` group, here is the code:: class RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty Following is more information on how you could create your own ``Sprite`` and ``Group`` objects from scratch. The ``Sprite`` objects only "require" two methods. "add_internal()" and "remove_internal()". These are called by the ``Group`` classes when they are removing a sprite from themselves. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a group. Your ``Sprite`` will need some way to also keep track of the ``Groups`` it belongs to. You will likely want to try to match the other methods and arguments to the real ``Sprite`` class, but if you're not going to use those methods, you sure don't need them. It is almost the same requirements for creating your own ``Group``. In fact, if you look at the source you'll see the ``GroupSingle`` isn't derived from the ``Group`` class, it just implements the same methods so you can't really tell the difference. Again you need an "add_internal()" and "remove_internal()" method that the sprites call when they want to belong or remove themselves from the group. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a sprite. The only other requirement for the ``Group`` classes is they have a dummy attribute named "_spritegroup". It doesn't matter what the value is, as long as the attribute is present. The Sprite classes can look for this attribute to determine the difference between a "group" and any ordinary python container. (This is important, because several sprite methods can take an argument of a single group, or a sequence of groups. Since they both look similar, this is the most flexible way to "see" the difference.) You should go through the code for the sprite module. While the code is a bit "tuned", it's got enough comments to help you follow along. There's even a TODO section in the source if you feel like contributing. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/SurfarrayIntro-rest0000644000175100001770000001170714676242340020736 0ustar00runnerdocker Hopefully by this point you are starting to see how surfarray can be used to perform special effects and transformations that are only possible at the pixel level. At the very least, you can use the surfarray to do a lot of Surface.set_at() Surface.get_at() type operations very quickly. But don't think you are finished yet, there is still much to learn. Surface Locking =============== Like the rest of pygame, surfarray will lock any Surfaces it needs to automatically when accessing pixel data. There is one extra thing to be aware of though. When creating the *pixel* arrays, the original surface will be locked during the lifetime of that pixel array. This is important to remember. Be sure to *"del"* the pixel array or let it go out of scope *(ie, when the function returns, etc)*. Also be aware that you really don't want to be doing much *(if any)* direct pixel access on hardware surfaces *(HWSURFACE)*. This is because the actual surface data lives on the graphics card, and transferring pixel changes over the PCI/AGP bus is not fast. Transparency ============ .. comment out The surfarray module has several methods for accessing a Surface's alpha/colorkey values. None of the alpha functions are effected by overall transparency of a Surface, just the pixel alpha values. Here's the list of those functions.
``surfarray.pixels_alpha(surface)``
Creates a 2D array *(integer pixel values)* that references the original surface alpha data. This will only work on 32bit images with an 8bit alpha component.
``surfarray.array_alpha(surface)``
Creates a 2D array *(integer pixel values)* that is copied from any type of surface. If the surface has no alpha values, the array will be fully opaque values *(255)*.
``surfarray.array_colorkey(surface)``
Creates a 2D array *(integer pixel values)* that is set to transparent *(0)* wherever that pixel color matches the Surface colorkey.
Other Surfarray Functions ========================= .. comment out There are only a few other functions available in surfarray. You can get a better list with more documentation on the :mod:`surfarray reference page `. There is one very useful function though.
``surfarray.blit_array(surface, array)``
This will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized.
More Advanced NumPy ===================== There's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation *"in place"*. For example, you would want to replace ``screen[:] = screen + brightmap`` with the much faster ``add(screen, brightmap, screen)``. Anyways, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays. When dealing with the 16bit pixel arrays, NumPy doesn't offer an unsigned 16bit datatype, so some values will be treated as signed. Hopefully this does not present a problem. Another thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8bit numbers and 32bit numbers will give a result as 32bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception. Lastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating. Graduation ========== Well there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some *"flame"* demos floating around that use surfarray to create a realtime fire effect. Best of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/SurfarrayIntro.rst0000644000175100001770000005244414676242340020575 0ustar00runnerdocker.. TUTORIAL:Introduction to the surfarray module .. include:: common.txt ********************************************* Pygame Tutorials - Surfarray Introduction ********************************************* .. currentmodule:: surfarray Surfarray Introduction ====================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Introduction ------------ This tutorial will attempt to introduce users to both NumPy and the pygame surfarray module. To beginners, the code that uses surfarray can be quite intimidating. But actually there are only a few concepts to understand and you will be up and running. Using the surfarray module, it becomes possible to perform pixel level operations from straight python code. The performance can become quite close to the level of doing the code in C. You may just want to jump down to the *"Examples"* section to get an idea of what is possible with this module, then start at the beginning here to work your way up. Now I won't try to fool you into thinking everything is very easy. To get more advanced effects by modifying pixel values is very tricky. Just mastering NumPy takes a lot of learning. In this tutorial I'll be sticking with the basics and using a lot of examples in an attempt to plant seeds of wisdom. After finishing the tutorial you should have a basic handle on how the surfarray works. NumPy -------------- If you do not have the python NumPy package installed, you will need to do that now, by following the `NumPy Installation Guide `_. To make sure NumPy is working for you, you should get something like this from the interactive python prompt. :: >>> from numpy import * #import numeric >>> a = array((1,2,3,4,5)) #create an array >>> a #display the array array([1, 2, 3, 4, 5]) >>> a[2] #index into the array 3 >>> a*2 #new array with twiced values array([ 2, 4, 6, 8, 10]) As you can see, the NumPy module gives us a new data type, the *array*. This object holds an array of fixed size, and all values inside are of the same type. The arrays can also be multidimensional, which is how we will use them with images. There's a bit more to it than this, but it is enough to get us started. If you look at the last command above, you'll see that mathematical operations on NumPy arrays apply to all values in the array. This is called "element-wise operations". These arrays can also be sliced like normal lists. The slicing syntax is the same as used on standard python objects. *(so study up if you need to :] )*. Here are some more examples of working with arrays. :: >>> len(a) #get array size 5 >>> a[2:] #elements 2 and up array([3, 4, 5]) >>> a[:-2] #all except last 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #add first and last array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #add arrays of wrong sizes Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,) We get an error on the last command, because we try add together two arrays that are different sizes. In order for two arrays two operate with each other, including comparisons and assignment, they must have the same dimensions. It is very important to know that the new arrays created from slicing the original all reference the same values. So changing the values in a slice also changes the original values. It is important how this is done. :: >>> a #show our starting array array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #slice middle 2 elements >>> aa #show the slice array([2, 3]) >>> aa[1] = 13 #chance value in slice >>> a #show change in original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #make copy of array >>> aaa #show copy array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #set middle values to 0 >>> aaa #show copy array([1, 0, 0, 0, 5]) >>> a #show original again array([ 1, 2, 13, 4, 5]) Now we will look at small arrays with two dimensions. Don't be too worried, getting started it is the same as having a two dimensional tuple *(a tuple inside a tuple)*. Let's get started with two dimensional arrays. :: >>> row1 = (1,2,3) #create a tuple of vals >>> row2 = (3,4,5) #another tuple >>> (row1,row2) #show as a 2D tuple ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #create a 2D array >>> b #show the array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #show a new 2D array array([[1, 2], [3, 4], [5, 6]]) Now with this two dimensional array *(from now on as "2D")* we can index specific values and do slicing on both dimensions. Simply using a comma to separate the indices allows us to lookup/slice in multiple dimensions. Just using "``:``" as an index *(or not supplying enough indices)* gives us all the values in that dimension. Let's see how this works. :: >>> b #show our array from above array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #index a single value 2 >>> b[1,:] #slice second row array([3, 4, 5]) >>> b[1] #slice second row (same as above) array([3, 4, 5]) >>> b[:,2] #slice last column array([3, 5]) >>> b[:,:2] #slice into a 2x2 array array([[1, 2], [3, 4]]) Ok, stay with me here, this is about as hard as it gets. When using NumPy there is one more feature to slicing. Slicing arrays also allow you to specify a *slice increment*. The syntax for a slice with increment is ``start_index : end_index : increment``. :: >>> c = arange(10) #like range, but makes an array >>> c #show the array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #slice odd values from 1 to 6 array([1, 3, 5]) >>> c[4::4] #slice every 4th val starting at 4 array([4, 8]) >>> c[8:1:-1] #slice 1 to 8, reversed array([8, 7, 6, 5, 4, 3, 2]) Well that is it. There's enough information there to get you started using NumPy with the surfarray module. There's certainly a lot more to NumPy, but this is only an introduction. Besides, we want to get on to the fun stuff, correct? Import Surfarray ---------------- In order to use the surfarray module we need to import it. Since both surfarray and NumPy are optional components for pygame, it is nice to make sure they import correctly before using them. In these examples I'm going to import NumPy into a variable named *N*. This will let you know which functions I'm using are from the NumPy package. *(and is a lot shorter than typing NumPy before each function)* :: try: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required." Surfarray Introduction ---------------------- There are two main types of functions in surfarray. One set of functions for creating an array that is a copy of a surface pixel data. The other functions create a referenced copy of the array pixel data, so that changes to the array directly affect the original surface. There are other functions that allow you to access any per-pixel alpha values as arrays along with a few other helpful functions. We will look at these other functions later on. When working with these surface arrays, there are two ways of representing the pixel values. First, they can be represented as mapped integers. This type of array is a simple 2D array with a single integer representing the surface's mapped color value. This type of array is good for moving parts of an image around. The other type of array uses three RGB values to represent each pixel color. This type of array makes it extremely simple to do types of effects that change the color of each pixel. This type of array is also a little trickier to deal with, since it is essentially a 3D numeric array. Still, once you get your mind into the right mode, it is not much harder than using the normal 2D arrays. The NumPy module uses a machine's natural number types to represent the data values, so a NumPy array can consist of integers that are 8-bits, 16-bits, and 32-bits. *(the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types)*. Because of this limitation of integer sizes, you must take a little extra care that the type of arrays that reference pixel data can be properly mapped to a proper type of data. The functions create these arrays from surfaces are: .. function:: pixels2d(surface) :noindex: Creates a 2D array *(integer pixel values)* that reference the original surface data. This will work for all surface formats except 24-bit. .. function:: array2d(surface) :noindex: Creates a 2D array *(integer pixel values)* that is copied from any type of surface. .. function:: pixels3d(surface) :noindex: Creates a 3D array *(RGB pixel values)* that reference the original surface data. This will only work on 24-bit and 32-bit surfaces that have RGB or BGR formatting. .. function:: array3d(surface) :noindex: Creates a 3D array *(RGB pixel values)* that is copied from any type of surface. Here is a small chart that might better illustrate what types of functions should be used on which surfaces. As you can see, both the arrayXD functions will work with any type of surface. .. csv-table:: :class: matrix :header: , "32-bit", "24-bit", "16-bit", "8-bit(c-map)" :widths: 15, 15, 15, 15, 15 :stub-columns: 1 "pixel2d", "yes", , "yes", "yes" "array2d", "yes", "yes", "yes", "yes" "pixel3d", "yes", "yes", , "array3d", "yes", "yes", "yes", "yes" Examples -------- With this information, we are equipped to start trying things with surface arrays. The following are short little demonstrations that create a NumPy array and display them in pygame. These different tests are found in the *arraydemo.py* example. There is a simple function named *surfdemo_show* that displays an array on the screen. .. container:: examples .. container:: example .. image:: surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Our first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the ``zeros`` function. Here we create a 2D array of all zeros and display it. .. container:: break .. .. container:: example .. image:: surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer. .. container:: break .. .. container:: example .. image:: surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Here we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the :meth:`mapped ` (raw) surface pixels. We will use this image in the rest of the samples. .. container:: break .. .. container:: example .. image:: surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Here we flip the image vertically. All we need to do is take the original image array and slice it using a negative increment. .. container:: break .. .. container:: example .. image:: surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Based on the last example, scaling an image down is pretty logical. We just slice out all the pixels using an increment of 2 vertically and horizontally. .. container:: break .. .. container:: example .. image:: surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Scaling the image up is a little more work, but is similar to the previous scaling down, we do it all with slicing. First we create an array that is double the size of our original. First we copy the original array into every other pixel of the new array. Then we do it again for every other pixel doing the odd columns. At this point we have the image scaled properly going across, but every other row is black, so we simply need to copy each row to the one underneath it. Then we have an image doubled in size. .. container:: break .. .. container:: example .. image:: surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Now we are using 3D arrays to change the colors. Here we set all the values in green and blue to zero. This leaves us with just the red channel. .. container:: break .. .. container:: example .. image:: surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Here we perform a 3x3 convolution filter that will soften our image. It looks like a lot of steps here, but what we are doing is shifting the image 1 pixel in each direction and adding them all together (with some multiplication for weighting). Then average all the values. It's no Gaussian, but it's fast. One point with NumPy arrays, the precision of arithmetic operations is determined by the array with the largest data type. So if factor was not declared as a 1 element array of type numpy.int32, the multiplications would be performed using numpy.int8, the 8 bit integer type of each rgbarray element. This will cause value truncation. The soften array must also be declared to have a larger integer size than rgbarray to avoid truncation. .. container:: break .. .. container:: example .. image:: surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Lastly, we are cross fading between the original image and a solid bluish image. Not exciting, but the dest image could be anything, and changing the 0.50 multiplier will let you choose any step in a linear crossfade between two images. .. container:: break .. Hopefully by this point you are starting to see how surfarray can be used to perform special effects and transformations that are only possible at the pixel level. At the very least, you can use the surfarray to do a lot of Surface.set_at() Surface.get_at() type operations very quickly. But don't think you are finished yet, there is still much to learn. Surface Locking --------------- Like the rest of pygame, surfarray will lock any Surfaces it needs to automatically when accessing pixel data. There is one extra thing to be aware of though. When creating the *pixel* arrays, the original surface will be locked during the lifetime of that pixel array. This is important to remember. Be sure to *"del"* the pixel array or let it go out of scope *(ie, when the function returns, etc)*. Also be aware that you really don't want to be doing much *(if any)* direct pixel access on hardware surfaces *(HWSURFACE)*. This is because the actual surface data lives on the graphics card, and transferring pixel changes over the PCI/AGP bus is not fast. Transparency ------------ The surfarray module has several methods for accessing a Surface's alpha/colorkey values. None of the alpha functions are affected by overall transparency of a Surface, just the pixel alpha values. Here's the list of those functions. .. function:: pixels_alpha(surface) :noindex: Creates a 2D array *(integer pixel values)* that references the original surface alpha data. This will only work on 32-bit images with an 8-bit alpha component. .. function:: array_alpha(surface) :noindex: Creates a 2D array *(integer pixel values)* that is copied from any type of surface. If the surface has no alpha values, the array will be fully opaque values *(255)*. .. function:: array_colorkey(surface) :noindex: Creates a 2D array *(integer pixel values)* that is set to transparent *(0)* wherever that pixel color matches the Surface colorkey. Other Surfarray Functions ------------------------- There are only a few other functions available in surfarray. You can get a better list with more documentation on the :mod:`surfarray reference page `. There is one very useful function though. .. function:: surfarray.blit_array(surface, array) :noindex: This will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized. More Advanced NumPy ------------------- There's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation *"in place"*. For example, you would want to replace ``screen[:] = screen + brightmap`` with the much faster ``add(screen, brightmap, screen)``. Anyway, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays. Another thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8-bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8-bit numbers and 32-bit numbers will give a result as 32-bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception. Lastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating. Graduation ---------- Well there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some *"flame"* demos floating around that use surfarray to create a realtime fire effect. Best of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/camera_average.jpg0000644000175100001770000005062114676242340020470 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?먢 ( (8q??Ȭ$F?\JS__daSͪg)q;_`?JI (ADͱwmcg bn"X>46tPlR҉/;#.]g CYٗ_XW/%ȑXmG[5yޘ"vEY8]ڽ@6)_g?ָQuA%A~|e2_}_Srk/E>Y}3Iq Wc*)SsomaObN6a'.:6%$KUtkmcC)xPx 䐏N+gFUjJ.M^F,s$}8tZKX4n=Wf?s#%O銣q"c?V {*>_M?#iUH).^{ZtԮU; ;ϵYԼKI5 Rc=:V<,7u hN7Drpr2:ugkJWqA 9(K"KTnϣׯ|A (U1/ua҄8}v3`ˉ?H{G*@H5\mu9EaOcL}*9n1^.#ztG㠩S'ew@}WQ bCz7x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jXvg:MN3W-f?EZir0gpl ۲toU@;OpRݞN'.;H z1WTvmcu":Vv~=Xoȋ'^wT+Uv EL]f^|:u37 epKҴ! i[$is>'0@o~Ʋ]ƿ;/#ͫs}*hv q~8-Fc sÁj1ϩo?dz5}_Ô$e:еw‚>ʳ.λd ;dUQ_]Ҧt(*ǔ#[6RYpbr@cǁuu)[y>ۭ:[ƽgq30 1?F 'ҳӫZcko穙5sGw{ɽ[~~X m+/÷i_jS~7dE^ T-(hVldZ,8vAPކ7g1'مDќ֜ D$Kz}9n6$o&[o+7fs润H#v})|/׊Z1,vHFlvxqv9G{FPH/=9>Rs۽hK fӮd>B[_n<{+Ǐk*8;F79u ~;dLy=ƶԮfot zzjlL21Hc+ji븎>4fYߥKZO`utq sJCAoZ|SFy*8+y6U+G["㷨XO4="?'?=jy屎Ծwd o<9.Wr XӜwU|?67ɟF㿷ҩK;n=bn&$^y51pouH-,R8sƇ䃐+,ݲ9>A%y#> aD,,-M+e* .Qe0jzq^ְ(Yqi0eTUΜg=U!9#nGBYGCc$gӽ!ve>H+HT././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/camera_background.jpg0000644000175100001770000001650514676242340021200 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?n͑3>‘ZǴ9sC3)Ґ rFxANw'Tl n͡Į357IdQc Ls mϵ5ӱ8@1L Jւp>P}?TBh%ɽg)Gx;$3gGlR'GEoKA=:d=6gڃ 94uf]./Nz)2޴dVM* ^s/=Hn{RD]7'4ޗю3fخ4= /=q~FcR֤Qv)NHR*?lq`zzt.7xq&~q.AyP(QXy2HK£+ *xlpn6yM8ߑQ*$gJI3 FM4Z 9ޛߚ}5AaAƘq#)MG1H= @U`se$nɥ'j3TQc'+{>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?4F0CcB;JG4n"C+Q@vi 2Lz~5.*l(9{r0x N,!'qFw.>SaWݐ$l8qnIK1sSy=?4z0xHF'ڗ֎a ?:18Nޗ0pi8iyIz8.I~8 ~I1J܄)OҀuh <)8?PKx ~ۑJiU2ӡ'޳mt!@4\B7ԀたƳrz q#Pތq9+Ns#nϭ5p42@" ` ) aaM1zYZӗP?#r4Wd_w8 򁟥f؝7#КpspAߥCdCМsڑ33FTl0=T};nrjUnb@:MS#Kd~& =0xn]AJq2}q}YHoCP5HFcG ,$֏ZX N ľ\ ʃV ̧L9*:#:8aPG/܊FK+[šSK)[<|})pǨCF 8/gsG1/Qlg/)PCa<{SFcA`[~4JA 9܀$eO>RaG$+{ӈOCS m?JR@\)6O"IJɺd!}0<gWy~aCd;v!,|SC'q@5f0w$3$b_n}UnF>ݩ@ۓG3GH13Yإa_ 9r{74#S>Jv2~}ne p)6r)cM4rϸx_zR{rg=pM=Q>ךR6Z=5_N=i#8&@ S,?VM $; 4;Or0G*e@o>Ƥi'4쎥u+ciGКR*0SkSF 1N}zjvΐ͓LҶ}R0ĜAnQ9jU$ld:RG>~8 U)4#6OzGlx>?JA'8ZjZ! WG(܃;7"nxQ G٤:l T\k0:6LןpF? %cT6O4A ~ zc((͎}qRrnǟ1p>A€OG@&쑋~=3ʕS#֢;푊 z(~I)V5-q\ѵ.HSpr3 R8²o(qVoz@۷>nѱb? I1l7q7>NJH%Ay` 6TlEzq򢒾3`ݣ˻?J[,=: =ș#"WkǠ8 T F)ɍU$v 1s})Ĭ [" ]BAXI4vHk8lcrœn>Sʎ!ORE[{cY;aM OK֬6}:ZNJ858F<=#e"h././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/camera_green.jpg0000644000175100001770000002375314676242340020164 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%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-| xfVml$O^A%ZdIldS ,- u̼OЊMKK.7Snnϻ]N3 HrdRB.x _ZD&Ks܊]LqWŚutmGdAQݐy׌ҫx_`y QYȉz`瞟p\Ul*kmկx,lsYzKo:yuk

^wM`\`RvJFn>.K{T_XIcӜCJjWM+ZFlhVQE~qiyy$1;@ @ <`A[piU?omXTI6N'o\™L-͡.$;#+W9:]]I$1SE7$CH}+泜Gқ\.O:]rqOBM/PLB$n1o#<=G;:.Z@C$a W1ְto۔TM(kpQp#zWI<s68PIPXFOOZ嬨UnMNw1MGwk[/˽RK"? ݌*ij JʲFnqӏƲ_SQ-EdeW%g[>8y9+,'R{-Dޛ`*Tkm,į%ߟ=ۂv839m%:wvd* ;68޸~!˪Opmci9A21W׹K&խs4Z3l6ɴ?P}+rW8^׷cЭb0t-,shLsC##pn5iWNhlaYħozU3Ŀƕ9$CӟAҫkvhV,rW8^˲eT4Ҋ#_pn.r!{I7o+k+KK,:%5qjtzz3<1X&y37HD"`MqZQJiѲMw<;5\d2zҧ}-Ź#80sׯa9YuƥG RTZR8M?Q6{^'`?ji.Nw)*׮O zi4+c+{θ'sߵB)n'JF=f'G^R?}%3iog''K?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/reST/tut/camera_mask.jpg0000644000175100001770000004453314676242340020016 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?}iea9w&d'uwYAGS+|:-LQn0:j$X9GKES: JGr> ӭ$ Yߧ}Gly\co.ync=+8^mϑz7[ӐE韙J+Xt7w dWϦ>PG&'[I6Fq}58c_Z/]/QNOͳ\z׿cVͳxsU?[y{?C^r;Fۑޣ:WW;31<;N_4ptg6ۈ^/'a}M?.@sGZ)711֟chtS^Z?p#ˎuR7S؟,xjY Yǡ}+=xN/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 e(*>{0t!3VAX /,u``TvnqIjֈ>RfF3L:?Un}jR![q&X~͎YEKބ""k0݇Yq@j BO ~zeTSh=WPӜyQ 9l5 .OPS`--[`>s([=>le8Gqz8'TMY"HRU;ju $nlm.3^IRvw}x(|QSo_Kt쭮 I;o\{R_\nx3Հ5wdǴ_EK<[í5UɧoS?)MMI%F+ 9$ `2UzTEopK%[$gxAhnWWj?wz~}aқҚ c$?*-n.pX#Sa_-|cnOfEKm6Vizz֙F4kFb3Ko$|?Z2G'ۭEfvۘ?֬»P{F"z;'-QJ9P<QmgwA%M򫚵vr~aߧWy2;SKޤ}B-wp'5 C.%S[ F"Gshjͬ-vBe:s 4yV ' my 5 M$I}03[Īv$`~dTrZ=r6ccU`C4<\Uԋ ȋN`e#]$*H G8eE<,$ q+P٥Y)G(s{ֿ-uKadUAwΖb U ,*vM2H0'JhBZlm&`1IXSWgʩ1"bϯZ{,@c\.zuU (Uky^dRqU=K-Fݲ2DOھd{[$Q#a&x)~OlkOHk^y=Ͻ]ǸsGMUt$\f~ckyTH#d{psOmNG9Ү8)ֺ++*n<ՃM9\ȸI,B2qRi~}t@=3޺hmV"v84PGb}2EtR{R0pѐ[ڄ>#Z*mǾ4Fp?:p1K Cϔ܉#fг9n>* FS^sf A]nX α5[/ 5/m%e}qxsH]۫OpG+vFi;a5|h@BfSß|&wZ~'././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/camera_rgb.jpg0000644000175100001770000007735014676242340017640 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?__ ZeYiȤN__igɻ]o ȸ =+ny3чnSgI$Z͢m{N;}K9܆p~P0G?&[\Ԇ'=C/֢k !irжzA8(od /S(-ݥȉY-x=韄:>%Hfh]# [+_85n˷''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&Rq$5s.T0Fr)Öir>PǦ9㫲箒,ɞIbpZ}@}QCl<÷^zx=B/ $~ZiJlwh|;fg3 pO .p\pGP+S>2l?LïZH,晠Z6xHNyʷx9I3\_|+ . m#JxDiXIEx 4jBʔt_ՄE/wk1--tPoltlqR]YZv g&LԾ0O&hqPGo/AԞ?zzE]ȳ{F8 I?t>]: yF;9&G7^8y5fM %&Wno< 7*y_ō BƥVWmxIozR0Mw8!~皧qjZ}@^qqڙCE̓ _;qMN3V9@iIRݻS]Rz{Ϲ-ҮWEԿgxy ǩ5V<"Dj$g"QKc쐳@åa;ZV85D+=ϵsnKe߅z;A֢i4O9]b| }FW >WY~xq΁$4k5goʣk1=@<=[ G 4k3ꨰlc~lWcz莿g}QWwtn|Rӎ >ϨŻ:pARvS9[۾ofVZ+esوgI =p9%%\[ d Na}A89⾀Ծ-.M.[l g;35ZςX=ͮp d$a# nTPjn"tw*obF_FkZ=6\nI#GSs{h1j CY-!W،#_h#././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/camera_thresh.jpg0000644000175100001770000001037214676242340020352 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ʊ(((((((((((((((((((((((((((((((((((((((((((((((((*}K_4oϻʋzXmB4HFnYc̖ Sr9aA%|RFte$D*Fj (,(((((((((((((((((+뿁 oa=j?nwIba}y֐];es#Y7#( X;I Tӊ\/tv#K?Fem\B*999IS! 0zf# W8M'ƛwfk%)*#ďΙ,7GoP0eՓ'`}O*ŦoyfN`qx;Wѯu9(Š(((((((((((((((/éUX Ϛ%2") ]Fcߥ`|>&bmo4~BU^o^4-:;=6<"p$׵e^ҢW1SD[\??4=qԘ⾞Lb{lSY~TX2"sT|Ki^"fOϷM*Ajۜp),1Sљ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EQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/camera_thresholded.jpg0000644000175100001770000005617614676242340021376 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?L +X.dI_p]Xrx5_^Im{ ~fMLAp~R#FX%C|`N4)(FdYr#8GOÌhQEQEQEQEQExh5M*3m#M>T+ (pϥrkL/t˵e̍2Oa5tz1k60{;WDeь˱A +ϓ RKCt#mp䜎8QՖ'3Zn)]zإPd 5u]ҍm\RyD\JvF"f`l7`<13] c:b;8>?ZcKdX4V=A\g~;sR4dXLH¬>[@,@99{ˍ1Ǵ~nJ?7~GN1KHJ1F&O;p٦#Ē&7'kzp}4\\\G<1/}pijq= |n9e,NPF $ą̈̄eR @<HϨlI+Fv 98>(g1آSHn\G>)bjK(储<簨i.>f5a"`%qyus{r7\$]$xRZȑHYx(: AL-̱yvA0>awgr(".T198( ( ( ( ( )ƱbKd~B@Cʈ,jv4(((((({k$/ɱ 88 -m'fD9S0y=H9ȵ^[C^,v`#0U<$ygqc#ٔވHulsq:A}V\Ӎ\+X4u+z),Vlm [q+2$g LLb NrA#``w#l SEJ)0f P*'fLA"慥 VYcl5 >18㎾ÛL|@H,/m2aNn4աUYK JހS2/̧ X+c޳nٴL@IGLDvy⹪U&fS$k]n9F,m;pUݰܭeڬ&4RI ʤ##eV$C&'Û&lXk3$F??͵ۗc4'żwpCeo5g>RϖT!6잕q#Rg~&xI(}d^\Au#Wx r3ׄ~bL$I#BJ''ܓWwA,r90cA 8']{)Y]X1 .pH<UGv@d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K{{cG`:62INJR}%( A.pI@ hi%rRKn-qq?m[\Gn`!*'J2][GQOeG-wݜm@$>wb{sq1hn0Tݼa[wj=][ى#'nYZpbA2yVwmin\Ev|w{I'IF&Tl\/7$IYBpo>GY{ m49>o Fw0dO{M"bPJ4*#F2*iI'Ams-Rܒp0-Uvl(;(((((7 EUjHyExuzf\xfD;'/cKsfGiڽ8ũ8{׏2IQ7H@@=rB܁X^,xFEI2';n)yX KqgY2 -H.JKdO Zm[T&oy 3rWxf*]8{Z}7Ut$\aX^XJc\E{jDH \Mk>(_,\Ǖ8䑊ƌ 2pI +%մ+uc7*"pˀrs8 )U׉;%s^ܰ OM½hmNuyq)m!PK)J [ dS隊ThxةdbpGn$bQ< r#tj:Բ 08준ylEZVV5Ѝf#CvԜwLhsZ]nH2Ek#t;Bi^Z㳶6fTRq}MMJˁ-0,nb݋V 66 ܌Y𥦁F+ZB]Xbx!˸8+K#+K+YKԓ94kw&5șSmP1<@㡨5Z:z K"Q[QEQEQEQEQE\M%+<I",YqWI[DE4YFrr mVu#̉='bt 9mR+\F˰nUNvwGP}چ22\yva͸dT 'ުI\gr o*)s6Q/5d5p$ q87X'dJsAf yWa-QNXx u oKk$1`q*q\xI'wW/rULB%03K นdb@G.:$>wy8nrBm\p =:E0]PF*@rzjajyjOCiASNmXDJ'AU`~88#X6֡Ӂ^^r^çG{eM*mp(Ey8X]mol,9D> s;g ȫWRۭP~fm&t-\D1 Px!I! Yծt&+7ٻC+mq8l"Aq&wFG90O+Ղt*(E+K#%X0#=CEP././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/camera_yuv.jpg0000644000175100001770000004721114676242340017702 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ԟ2qH3 yiZ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t:&v'nvtO&JV)&f7 `!WTf䐽ẻDvʍ(+wgO<.g qzGbrğzmmbayFQ@IwҜ £,^wlLW8~{ \v^M6irrGIkisp d/U'(ͤ5)r-AґV?ңivڙP{(X61PqIvE5޸52¯j'rح&?4"\_˭Jf~Ly~T杼T 3~rDk Pk+?=_zviqf#SGd皷_%w/S Z'@633zy.]9Fy9([qh΀:隵> D?7N:QSݓ}n.:<n)V;fV집ӨCOPC知S TykF8jN1r]]bzr!(":n5d9?ʕFROZ( hcwrzL gޏ^w$2#ޭ!y68OU}b2YTRڕzcx={yP>LCҭY^̄T2Lt; R28$ k!mҰ>.*TQgUW쐷ڲ}:޴f6QM92Gt-ۢ6vo #}Assǧ,ݹN+m3*ެI|ę' =ԗZOMSgIV4oNZ3N|cVXUְQ[[KK=Hƪg1sBujkh/hm ƺvq#` jZ(LuOyX/G9`ߺ?7:v]npZw1cSd֦Eev*Th ȍL>m-_d^J_$NϸƝ"9sQORO${™g!QjVW℺(dkrz9NPNmPpP# x5{:5OpZ t!=iqsJFIsސ h{lJy'l6$3S].z0mtȍTI,eb O\c?Җ/-#qӰP|*' ?ZWg^j̈ aߊ'ML(wG.'eWVm|Au ̑`Ƣxj#Wyn^h$!%B$xv|OݏS~Ra΅l?6@b#]|D1gv?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/chimp.py.rst0000644000175100001770000000026314676242340017322 0ustar00runnerdocker.. include:: common.txt **************************** pygame/examples/chimp.py **************************** .. literalinclude:: ../../../examples/chimp.py :language: python ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/chimpshot.gif0000644000175100001770000013167214676242340017537 0ustar00runnerdockerGIF89a(&p,(&Ɉ{V˩P+õOǴ+ćnƸ1#Ե˦­#fѽ+uwyjfffې::f::!ɾa/:::Y.ff:fffF۶ff::ې:ffې::w{vʴf::::ۧ||.˺0mkM:f::f:W\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JN]9N,Vn3 F#f({0lhP1I]rڔVpp3a NP!4%,QM=S`<*e-KZ!M?eDV5Gq9,VNV~c֨I*R WwwwpK\ެ$-F_L bE!<*0OX5Vջ""~E^E0~C'SAZJAA+w~wiN Bˍ&DD22 d-b3Ldң2F6rX(a Veĉ|{D8Y(`eHa!#d"a ~[؅ 7iw0҈0AluN<70Ԕ4*g6l0 M'Mi$iA=W-˼a%6zc#zD#k#^ֈk#l`~8xV*̇VJ:vJ> AYBEeaw2F2&z[_`R!&TZu#c1Xed6UDd(MY0wP+k|GPf^˘30B- *%!EFzO(oːm(@L7#n2E#F!=/kCFmSfa*Fl=Bd]UNקEH6Sc:љd/WlX{Xs=QwqLԈ #!wS$5)a=>7ga~xр4HE(\lE0Q|BFm&."铧Tsjr* %8 9z'\%}*ÌG44#XF3ffЂ: U< S\#xJ:[hs5i41#i Eq|b$T>JԢ᧗9KbEcL:,Bϐ~Apl CZSTEDBHG)hA rxuRTRPEBSA UG4q*P.0Il#stE:dZͬf7z hGKҚMjWֺlgKͭnw pKMr:ЍtKZͮvz xKMz|Kͯ~LN;'L [ΰ7T{ GL(NW0gL8αw@L"HN&;PL*[Xβ .{G;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/common.txt0000644000175100001770000000021214676242340017064 0ustar00runnerdocker.. Common definitions for tutorials .. include:: ../common.txt .. role:: codelineref .. role:: clr(codelineref) :class: codelineref ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9811258 pygame-2.6.1/docs/reST/tut/en/0000755000175100001770000000000014676242436015450 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9821258 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/0000755000175100001770000000000014676242436017756 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0411258 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/1.Prolog/0000755000175100001770000000000014676242436021357 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/1.Prolog/introduction-Battleship.png0000644000175100001770000050332214676242340026702 0ustar00runnerdockerPNG  IHDR#غIDATx ]e}>~s:3J$@HHH}D7\Тj֭OZTmU*E+l laMd33w?9w&~t#̝{^,gzL=S3/|uzfl-8ݻgz7߀K-_WëV)\8]zgy1K_}7a롤y;=y/ƆS3L=yt]w5$I&ך}={ԯjݻwK_ˎs'j ʅA'Kr-)*i䏎DdbeϬ]/nZFwe 0\h號z` FQi&nOBם5O>tTzys=Ϭ][ǟs84C~|뉧xY_d87_nھygo;ODbXizg3M$QjW`+fәtf|ٯ|ᇖ/[޷jo~?WbQk>~_ok=>fS<7~nxɲlxK~vco9_y勴xɇ6t /6yͫ| ֝T_`%y4]gz^O%KlG'xbxxxMޱϡ ^r7?`k\|`Z7woY寒k~4bްr[>xu[GC,;#}Oߙ{ВJ{no<%{~qz竿oWv iY_qkqyz3L=/DzrT\k[vo g}V=;}|?v}ԙkoyO~.s+psGGwnZa+> OOlXp+g6po.;~޸08L=S vLy&h5~[j[oݰaËbK=;̴҃>~l#kc;i\i`^)M/YyԦghY60w4Xbu<4c0{s7;oo%ٹăS~wOg=? )0kw}œ9s6lܘ)~m7n[_8PM]SK} Z'hT-Hu0 -Ks4iY%I+9"7;='߿rgM=S  zrle75L=Sy L=S3)lzg?[,$z_Wf_e-njӸ9xc.\}\|x-:+MՋwz}oϾ?N`cd&SؼzEu8w;6ޞƷa 9~@ڱN-;A-~XJ9F ñk{Q0'n_O;cФ?+Y翞~. GM> '|Q5#c-Żt{}cmN܁ͼ8^P5awB_SO[~ᗼyJ^Q۷cjzNxTy|쐎 ;kC;Q)w۱m)ߗQkL3񚉗u{Ҵ,JO6zrPv\p ̵lہaXKŲna/ԲNF*qq}ǯeI&) n.f%<ŒW_h5]3(ICNǺ'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JY P+E @`lH0sNeIғb5!e"1YS㶬'0qVg+Hl@hq" /)=IN0`&Qe V7Z#N>ӄEW1i`V{*WzQR;n-\ڙas1:m-Xqe%~Q:+԰+ =kqh+O萃JPm*& ޣpi43u<5t2-$(@;gX[;^ fNnZVl:Q"M G}vDOv֎&^-N |5tv3uB+;X =ОŤ>Ag&)HK3q%peر .8_L^^Kr&u,:VlZʨ9u+JUca"n Db cP#d$FEBi*W䫻0B )B8Cb{ld0(`_ "0JGiO z+HEE@qo14\jgJtCƶa(94gje1h;Q 7!:";o $GK)N8:cjd2G2X͍#R*]k&@vMF9iga_ 5V+W3 (/5r=fPVKkCd=RPɁ,﬉*U,Jo|\lē(!m规<=9Fh L!6T rJq٬ b0B˱=x_Uò=.'P)FCpCv y~#:n\UJ^994$& 3M6>$*ZL[Fr_廬[- xlF+6DئZC9UlTe_\nU*k  R3bOVS;QWX@ gq`}6iW bWɹ_C {/5>>>:6&i)RfVx J$c%N? tlij9eh 57c|bQ29TL~ `lLjvp="Ҹ"PR#s Rp*ٌ"t2r<6:m" :)Q= ZwHQъ|.*XLuLqkf:/*M%~m<W^O6Fhm:~K^m'" drb4̪$S`-\ Db|W@REjue+b:߆kptpunF"賐=a1P s9[dp ,Uwmhjђ #6haVib Ei>IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/1.Prolog/introduction-PuyoPuyo.png0000644000175100001770000007523414676242340026422 0ustar00runnerdockerPNG  IHDR'dSzcIDATx\TgYz"EA@DEb[5j,؍]TbCTP{F&|_~ֽs޽yι3g 5ھ _HsAs4ѱ_*YEe%S^^p =|盷nnlԮLXP$GWO';+TRE[:/)D8;%YQM-=>i,_UXQےQTWeY:FfIRfj}\F ^# TRUJdIedZF+Q0;=#gXUk^://0UDk;yViYq]^߼I;9R Â߭bb?ޡKQM|rDRI/ FJsr%d3Rc+bfq\9 hgf6kd^A]Jtr {YH(*kWV(*(%h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ezmɁ5AO3nz1s b3ٱzđB`G JZ˶l|u]mB] :̖uaFMiK;͘`N~yzbGW5I{w5{izmY55mZSͧM)}fְxj@}r`);N3=3+b5M%4Ux7͵؉B@>x6jq?47e5\*Dcj9nW3'_&>s~v.1{%=o6Jfkix3^3cmw!FQYf?Q9i@9ub1a:5Fך}̮գ"WU9g>qxrtefv0jG`٥QM2uuN\;ߜrVK>NZpi? 7_(r,b`wka6Ɋˠ75|V?]X/Gne׿sm ǁSf߃XL6kVWx}Ձc_`N;GGD!#;sWQPð> {YU>Z@ j]B! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@~AeJON!IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.rst0000644000175100001770000001666514676242340027001 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Basic TEMPLATE and OUTPUT ==================================== ==================================== –Into Event-driven and GUI ==================================== As I said, Pygame is based on GUI environment. Furthermore, Pygame is good for making 2D game because of its input/output format. So, you have to say good-bye for print or input standard function of Python (Because they work only on CUI environment). Then, what functions in Pygame replace these functions? First, we have to go back to friendly “Hello World!” project, which is learning about basic template and output. **(Requiring any font file(.ttf) in the same project directory)** .. image:: Basic-ouput-sourcecode.png .. image:: Bagic-ouput-result-screen.png Source Code for Hello World Project and its result screen Wow, it’s complicated in compare to python’s print(“Hello World”) (Just a single line command). It’s because text in GUI environment has 5 components: text contents, font, size, color and location. If you want to print any text into screen, you have to set other 4 components, not only string (unless when it is in GUI environment). Only ``pygame.display.set_caption(“Hello World Project”)`` function in #7 do the same function as python’s print(“Hello World Project”). The only difference is that output string is always on window caption (title of current program) First, look at the template of source code before understanding how to output something, source code can be dived into 4 sections: Header(#1-#2), Initial statement(#3-#12), Always statement(#13-#20) and Event statement(#16-#19). In **Header**, importing modules will be executed. ``import pygame, sys`` is always needed. Needless to say, because this is pygame project and game has to be terminated when player want to exit(``sys.exit()`` at #19). ``from pygame.locals import*`` is also necessary to use useful constants just like ``QUIT`` at #17. In **Initial statement** (commands before infinite loop), some global values will be initialized and some functions will be called for one time. Global values just like colors has to be initialized here in order to increase readability. Remember, this is GUI which is colorful. Color has three components: red, green and blue. So, color value has to be initialized just like ``red = (255, 0, 0)``. Function named ``pygame.init()`` must be called preceding to other pygame functions. Then other pygame functions can be executed. (Other pygame functions will be explained later.) In **Always statement** (commands within infinite loop), some global values will be updated routinely and some functions will be called routinely unless they are enclosed into conditional statement. Function named ``pygame.display.update()`` should be called after every processes are done. Because this function is printing the results of processes onto screen(=monitor). If this function is not executed in the last part of Always statement, there will be a probability that current screen and internal data does not match. (Other pygame functions will be explained later.) In **Event statement** (commands within loop which check every possible events), there will be suitable conditional statements when certain event is triggered. ``pygame.event.get()`` function returns a list of events occurred by processes in Always statement. And this list is automatically arranged by time (oldest to newest). So, using for-in statement, every triggered event caused by Always statement can be resolved procedurally. (Remind that this is the trait of event-driven.) For example, commands in #17-#19 will deal with QUIT event. In this case, pygame will be terminated then system will be terminated because system must be terminated after pygame is terminated! (Other events will be explained later.) Regarding this template is fixed, then we can add special functions in correct place to print “Hello World!”. First, we need to set **font** and **size**. ``pygame.font.Font(“HoonWhiteCatR,ttf”, 32)`` function at #9 will set not only font by ttf file but also size (32). Return value of this function need to be stored into object(= myTextFont). Then member function of myTextFont named ``render(“Hello World!”, True, red, green)`` at #10 will return a value(= myText). render function can set **text contents** and **color**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location** will be center of the screen. But how to determine where is the center of screen? First, we have to decide the range of screen, by using ``pygame.display.set_mode((640,480))`` in #8, canvas(where all values which has size, color, position will be drawn when display.update is called) will be generated and its size becomes 640 x 480. Then, its center is exactly (320,240). If the total size is given, we can decide any position even accounting some margin with little calculation (Remind that in 2D GUI, everything has x and y which has to be printed) (Just like turtle graphic, if it goes **right, x increases**, if it goes **down**, **y increase**. Don’t confused!). And we know that all functions I mentioned will be putted into Initial statement, because this information are fixed while the program go on. Although everything is fixed, we have to design that fill and blit functions to be putted into Always statement, because of these functions’ trait. ``fill(white)`` function in #14 means filling canvas by single color(white). ``blit(myText, myTextArea)`` function in #15 means drawing specific object(= myText) on specific location(= myTextArea) of canvas. Notice that drawing(blit) has to be done after filling(fill). When everything is drawn on canvas, result of canvas will be display onto window when display.update is executed. That was the explanation of the entire source code, which has 20 lines. It seems it takes too much time to understand source code with only 20 lines. However, adding or changing from this source code is not that hard because we understand the template of this source code and step of printing. What about adding process logic in this source code? That will be next project. :: import pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/2.Print_text/Basic-ouput-sourcecode.png0000644000175100001770000016017214676242340027311 0ustar00runnerdockerPNG  IHDR*b)KAIDATxtG'.D$[K8- xpwwwwww'H?s#*vߓwvvfvwovĠјcB *>{V;G~ "^S'߆ʗtɴdIKK.yxccܹ?uTxdlⲸ]q丈E~Թ4}4d32 n=…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ց#GG [n]\ٱc*!_7oZ#pG+|(h$2D 6ufІm ͊+f̘ 6lqiʿ\2e ΂zNKKvځ;hE4iӦ7n8|pU0.\ʲ2֭}k/^,uKښhhajA )_B+D,  DݺukmmMn@r02͛(zjd.۷oG{@ #᧟~6mZUp.vN ο[]c8 +?q}]8X$x* 9Z Ō?a/*DE~z>5DP%6mDJ2...ėc!$jժ`mԆ>U:}4С¯ VWD_((O/ `ߋw†K06Ҋ?Q̙3p?l#BX"ڻw/@k. &ooo9/ȇ$;v a Twpzr aİBBd^H`H&(O+;1c cݽ{73"DͿT-q, ¸mrrrPXO^V.TB`k8^zH߿ĉ -^ ynt̙ׯ_N+^ O^  7o(((ڶiRP(UHB'gAiEh.f;b-BVVV"zy9.٢͛7A1D@F׃cxVVQBTh"$** UR'dLΝ;tCzoU 1oz+x=v<غpBi&u,L"? AJvaEOOOЊe18!O7n۷oFF #^zOMRQZO= IHH@V`1}HNʰ "677>@(%s}9̬ߓn'N֭ ;֡C 52 `jj*ZEENK2<PKLL$,;rHVV !0&& 6 Oo߾SNijj#wEpj 1qHiACT 4X?ᾅcPCUҐꂿH~ `v" pu@<bXH0‘np'O< 1ytpp SuK: EM$?`Ǘ0UcQ 8'#CbD/"a : p1-(C4#PlZpAx+Fς]---'iݻQeȑjH`Gƌ0[[2T>pDB$< ܅nAPiT'(!n߾}Q8#0I2$>^}&::8M6H*KKɧȺTJM bCeoT/Jy!-BbB25NظEVȺS .yVUzx7w #CB>TTT(((^]7:_IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0411258 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/3.Move_text/0000755000175100001770000000000014676242436022071 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/3.Move_text/Bagic-PROCESS-resultscreen.png0000644000175100001770000001234414676242340027432 0ustar00runnerdockerPNG  IHDRZai=IDAT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eBQ1-[5J͛7/ur&M̙3GN fW7iܸqoԩS$ISG=zJq(zѢX3>xzʕg_xu뤃? |BRe͚:%u &XEYƍ. 0R__R5/RU^=5&ڶm[D 5ֆUB`%Ƒ젧3gD^z5^ʔ)#sՕ3ftg].U*9ribӕwŊ'Of0WPxoߍ]Nvm:54ƒȧ*Nl {F%K^n޼9v # ,:x!{Ο?D Xj'~?ߢ.ըZ|Ë/C- 8rHuD{%?cFٳw'LHܡ aÆ=<#/eϞ3i$Zݺ۵kYKC5">} <~ѣi.v%"G!}(+V#8p,VBUZ:GN РA0>E6/tOlnuwE%XSFD!@Y"THr0"E),ZCJU ^UJ*,6y۷S[ZF%+nfΝ;:u*VIw֍%n:nRӉԩSN(mӦ *2sdy…ցN8_rڢE ={Y8`ĊuIk7MUȧ*`VƎVpN􁠸{.̿*777udJ𤠪=zXP ĀTBc٨4 6̺VWƈ&Rw}Jܾ}FS#$F ScǖΝ;,YRz\֭{bE?[o=駘iҤݴ)ZBSF!R ΖSY|W^/am۶yzz.]TP!£֭ڨӦMĒDU,* ܸqn5#&`/whhh7AHmӦMNóQiPBrKYpa8qTygRzժUQ ,RWf4Gc_sVZ F+VHո*Bpa47AŋWʕK>fL̔)͝K!&j9'i҈@D>UA=-Z/}MV!2 DԩNTٟ4i,nǑv)˩f(gϞꛆk\^5IDAT.Y2ٱ{WIg3ez٠*UxHrOU3fȐ!CYGc2cnMl s'gǶ' eVtUVGQFQ="SRP%0޻w$)z.Ik\uM]Nm%eS#V !!QVBqD92e PO!zYo d.ɓzؙ39Jf|ٳmۦso+nǯQ-sFxT, F?:.Y4< :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0421257 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/4.Control_text/0000755000175100001770000000000014676242436022604 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/4.Control_text/Bagic-INPUT-resultscreen.png0000644000175100001770000001352514676242340027730 0ustar00runnerdockerPNG  IHDRS9c IDATxw|+I6tep ȐQv Y"GGeVQ**@ZJ t9 "w~?4}Ǔp1|ygqt^PܧADU='8Yc<3iΆ#S_ڲ"*M}Z[66{9{GxSnoq&fw..~{\`v{k=[#[tfGHv}ZˇuĆ&=NАPأ۾>pۑ[?˯||__Rwjj͛&5++ގЧwWY~mZ?z>+1wz3\]Czdy%L!CB~IX:=:TٰVGnts>e ̺r"RFվ\JwhKEJZޞpg{Jٸ.]QC^Ȱ1'>_~ܤn~dž xyv]*lݲ7i^Zv8~k QkG .]t+ݷe6E5iqܫ6ek`PrwhQm[?-3X^OrrZqПI*UZlYtSMPm;99sĄW-̸ FCZY+Ǡ)y9zۖ#965hM~Z=^vب1G4hw[f;s4 Fn1;w}$QҧOW-&֕MUWOT@>NGʹkV_t:rꔲ%Ƨ;Zy].g *<YXIn>jSkZ م K֎R'&dZ|۝/]~ͺgl?p,~#]ss7〯}Mw?ܠ}5/~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ґN{*1z[ιhQdT]'wթnxfAB_3V_wtŠPTY?q=M;\^ җL9k@W#I*B1xeA䰏7 stG8xm}1}:P4\7Y{c'amyF|<7ǫ7Ћz"V;{%u/}Ax]@X=)VϨj5Va ݶ{8#\oB*^Bȍ7J0a%j? LZzߍ{O{{>NP}nܟWۇO{'v)z{SY_hxH_J6uyJOͪk ]HL|{?Dw|6`C!6~\ύTczҙŅyU^C ^ WCPoSQCI-^ T*qgN |FT'^r *ZzzQYz鴿yqO%=zWM۪U@t~Wl?nP30o .-%ݾ3w˧+D/Yܣ_o|FEWbt8\.\0ovID,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$ѭ4O1k*!IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/4.Control_text/Bagic-INPUT-sourcecode.png0000644000175100001770000022640514676242340027350 0ustar00runnerdockerPNG  IHDRRIDATxu|9C;wwwYYYXVw/kBK ӛev{{) 9L&dw&=BAAA!#lU#!ի7j?BܹSfÇG] ,TШQJ(4ǏH"Y AG9 ܹs_|{={]v;w-}ѶmԩcuT;f8 oooWWK?<`ɒ.BȢƐSZju-v={,P Ul0aK.%w˖-cǎݷo}ѡ/[uԩ>mcgDZkʔy.fM "((,B5[?~C'O Xa+HٳgA]:ggmۮ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|!ĉ***&Lu3)FAmՖyI loo?k,YBy5Vme˖x۷o *,,,..OCCyҒyBg,^^^ǏE`` ;`  gu{)W@mՖA&hmm}}Vtȿ6fgg{{{(o>}/^}Zz;wۋfX#2IDLLLbbb>v_mii9uTv(ԩSQQQVyFmڵk߽{7 ? OH| w̯h'OZ=۠rqqqttDXk׮ ĉQ]ll[ h+OOO !!!/^ܱc (rۊ"x**i@&==ѓAUZZZ:uuUUZv-z,3i l2uuul /^,iչg˖-TUVחjPEZZ"8SSSӷ4By% jǏgddP-]#""a[fϞM@ j+ ꠶P(j+ :P(u3( $BfXIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/4.Control_text/Basic INPUT.rst0000644000175100001770000001203214676242340025227 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Basic INPUT ==================================== ==================================== -New Input is new Event ==================================== Usually, we learn how to output something first (Think about Hello World!), learning how to input something is always second. Why? Because input is not the requirement for some program in contrast to output is the requirement for every program. (That’s definition of program. more than or same as 0 input, more than or same as 1 output.) However, every game needs input. That’s why we said “I like playing games”. Playing means moving your part of body (maybe your finger). Anyway, let’s add input logic to make this project into real game. .. image:: Bagic-INPUT-sourcecode.png .. image:: Bagic-INPUT-resultscreen.png (Source Code for Controlling World Project and its result screen) (Not the entire source code of Controlling World Project, but part) (Controlling World! moves when player press one of four direction arrow of keyboard) There are 2 big difference in comparison to before project. First big difference is line #5, which adds checking ``KEYDOWN`` **event** is triggered or not. Other lines are just changing previous algorithm to act differently. We know that same command can make big difference in entire program when it is executed before Event statement of after Event statement. Pay attention that process about changing location appear after Event statement. (**Update after set**. That is second big difference). Variable ``event.key`` means latest pressed key on keyboard. Look at the specific key name. K_UP, K_LEFT, K_DOWN, K_RIGHT. Very intuitive **K_ series**. (Given by pygame.locals which we added at the Header) Furthermore, there are other key named K_8, K_a, K_L, K_LCTRL, K_DELETE, or K_F4. We can understand meaning of these keys without extra explanation. Full key list can be found in `https://www.pygame.org/docs/ref/key.html#pygame.key.name.` Notice that KEYDOWN means “this key was not pressed before, but **now is pressed**” and meaning of **“hold” is not included** here. In the case of hold, new event-handling about checking ``KEYUP`` (it means “this key was pressed before, but now is not pressed”) is needed with some processing (which needs extra variable and algorithm). This will be mentioned at advanced part. Adding input was easy because it’s just adding if phase with certain event parameter. Now game project is done because project has output, process and input step-by-step! Really? No. This project can’t be called as a game because there is no **interaction** between at least two **game objects**, no **rule** for playing this (neither constrains (ex. HP, time) nor score). Mostly, not **enjoyable** (no motivation, no variety of input and output, no attractive contents) Firstly, we have to learn more advanced input (for example, handling for mouse status), process (for example, idea for functionalization) and output (for example, printing image/sound or visualizing internal data) to flourish game interface/system. Don’t stay in the level of printing const text or inputting single pressed key. Of course, experiences of this level are surely helpful for advanced level. So, let’s go to advanced level! :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0421257 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/0000755000175100001770000000000014676242436021254 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.rst0000644000175100001770000001023014676242340030243 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ========================================= with Advanced PROCESS - Functionalization ========================================= First, Let’s print visualized geometry, not text. How about HP bar? If max HP of game is fixed and current HP of game can vary from 0 to max HP, what will be simplest way to print both two data? .. image:: AdvancedOutputProcess1.gif .. image:: AdvancedOutputProcess2.gif .. image:: AdvancedOutputProcess3.gif Yeah, just re-rendering text when certain variable is changed. How to change variable? That logic is inside of Event statement. (Pressing up or down to adjust HP.) Same method as before. But they are still text, which means they are not visualized enough. How to visualize these two data more detail (max HP, current HP)? We can use idea of magazine (gun’s magazine). HP is integer value, which is discrete. So, it can be printed as below: .. image:: AdvancedOutputProcess4.gif .. image:: AdvancedOutputProcess5.gif .. image:: AdvancedOutputProcess6.gif Much better, isn’t it? Drawing logic is inside of #6. Logic is simple, first, draw a **big rectangular** which color is black. Then, check whether draw a **smaller rectangular** which color is red or not depending on current HP. Finally, draw **margin** of current small rectangular. Margin of color is white. We can find there are 4 parameters for location data in ``pygame.draw.rect`` (I mean, third data. First data is canvas data, second data is color data and fourth data is width.) The easiest way to understand 4 parameters is change them. Change one value into 10 or 30 while others are 20! Then it can be understood. Needless to explain. Furthermore, now it’s time to functionalize specifically. I push Always statement and Event statement into main function. (#7 is needed to find main function and execute it.) And made new function for drawHP. Functionalization idea for game is not far away from that of normal GUI program. For example, it is better to make **single print function for every single value** which has to be displayed. Of course, setting location for each value has to be done while you are designing the screen. :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess1.gif0000644000175100001770000003711714676242340026314 0ustar00runnerdockerGIF89a1p! NETSCAPE2.0!,1𙙙wI8ͻ`(dihlp,tm߶:G $ryl*̧4JZ*vf\7Lrn[x8 H*O@E\Hŋ3j4É҂@nIɓ(u|hMdʗ0cʜI3Jm.kɳO|7'XhрT4рLsZGCYo?Tv \˶hARx:ܻB+< ٬0aϞPXpo#KLC\z"m9f }N5x4dib b5iԦ+˞M塟ZY.ֱYs7pj%Xn_3wlcdSgDxG_Ͼ=x=tؤş_{yh[^v 7wU4H v([]UQl5ig~\1& 8 " H@>X"u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Kt"|U Pǔ[ejBq<0-%Sc2UL#KY 6.P.ۧ# n#K#v墢1ʠ[[ueU>Z"?YTq5*.A2D6C:B7"W7ՕרZ Y*.`dGZ=H>NVYɪ AuTݵ#n NHH"$PD QbV@Zi"eF&D0*ZR%XD$eEfZUE ]g-Oee[ D"#ar-9Pra"%[0f[Z\g IxAjWB^TV#fffHfU4zR&&prcphq^ J2bqVl6LF&g82'9fWjL'=h%>cJxV' [@zᴤg |nwK^w "wv&(SB>(g^I`|2 M&KhJ.(:~jF(hm$ng}ryAz h6}=)ƗNzU `XZ) !Mb : RaScᅆԙiqru~]ũN*<`iY))&!ZRRՎriʅPzaVDovDP ~6jiy⢪ŨRNxX-}a説Zª".j*+F>a~Ų^+!ev}+<~+ūV+bR%rR¨$.,9,>6,NNT6Be.{yFjA'VV\BMkm nQ$z@ :.m2UNHnW%9M鈦rnnB?9amYnbeVݨn]vMn. 5oJ/V[*":/+`NԬ^Zn/Y\9rMA2.(ںzY8mv0מK&fn.=NcCK+h,~06o1Y΢0=l, 7 [k0 0q0p nl=*~ 'xhz.1R$+'b*mZ傞~1c,1mΖq3V\.S^:pqn"ϭso;9pW!Gg2ovu#Or1@@bDog&(+1)3f[:dz+_,;Z2/b$Kr/F%/:Qn'?.r232VFJJf#Wݯ^3ݎ# "_639!K4w}ܳ3wl<&!Y&:q@1tAAcHC^ ?DDc EW4D;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess2.gif0000644000175100001770000000351414676242340026307 0ustar00runnerdockerGIF89aGp! NETSCAPE2.0!,GJJBkRBJJJRJRk{RkRRBJRJB{RRkRJRŵsJŔBRJBZRJ攌Zk)kRB攭)BkkRZZkBJZZ!!!BRBRJk)﵄έkkk)έ))εΌJJJΌRRsR:sRRssRs:ssRRsss{ﵜJk{kJ)J{JJkJk)JέJ)J)εJJJ{JJJJJJΌJJ!!{J{k{{{εפּkkk))){){εJJJ!B)RB)R)R)RkRZR)R)RsZsR)RŔs)潭{Jk{{)ޭŭB)J{JJ{{εεk潌JJεJJJJkkJk)JJ)J)c)Z{)k))){{{kތŌBJJJJJJJJc)J))BH*\ȰÇ#JHŋ3|Q@Ǐ CIɉCɗ0cʜIfA=%@+l͟@ ϟ>F dp"g(P01>n`*0Bb^,vгhH 52/F +>J>hC J:c۷p&|/FAV2pk`^ Yh&9b#P>F1cmQL .t <01CH@_>H |&n `s7XG&^h@ 0djx 'ix0CqcϿCmPUI‚>@Vi)BX84@78>, Y`#Y'$6 (D+&`/h8<@)DiHL6PF)TViXf\v`)dihlp)tix|矀*蠄j衈&袌6裐F*餔Vj饘f馜v駠*ꨤjꩨꪬ꫰*무j뭸뮼^+k&6F+Vkfv+k覫+k,l'D 7G,Wlgw ,$l(,0,4l8<Ϗ@-DmH'L7PG-TWmXg\w`-dj %cs 4Op’&k KL*P7 ., 'SOaL?%@ C$jp݁o^ &_L ' $^椧.8a`8h{Ks<]z 4I =$N@ $@/s;'d?{_= HL:'H Z/7z GH(L W0 gH8̡w+@ H"HL&:PH*ZX̢.z` H2hL~;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess4.gif0000644000175100001770000003424414676242340026315 0ustar00runnerdockerGIF89a4(p! NETSCAPE2.0!,4(wI8ͻ`(dihlp,tm8.|pH,Ȥr91ШtJZ,֩zxL.znp*.~nwv~,!6$*<7#(5!-nHQEݴ3a+La qx۬ iȱcFI3U>1w=XԄѣ͛8v+'dIԂʗbvYfΧPI2ϑ N-AW0e*ٳ{:Ȭ[O.lը]r)+#ڿQUZZwkb֔,rл]A7n!y0CzCbEޭRӔ/M vtsvL޽ν~*ws y3V ˟O?3c\hw&FVhJP+uhbTa{0L.2樣NA؈I(؂$L6, "NVie"P0",NYږ$N4dG*H^c[$x))Ýz* |`)6"r& >j!J霕z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BYA V1uBN4 H g:RTiR\ G$A~??Idx\*FdoULM䋡@i%P %QeP RR60:%T C;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess5.gif0000644000175100001770000004100014676242340026302 0ustar00runnerdockerGIF89azp! NETSCAPE2.0!,z{{{Ž111::B::Z:Z1Z1kZZZZZRRJcRZZkZkZZZR1RZRZ)ޔZJZZkZZ)Z)RZZkZ)))RZZZZZJZZZZZJZRZZεJބތc)RZJJ)ZZޥ))έZ)ZZŜZZބތZތcRZJR1Z))JZZZ)ZBZZR:JZZZZZ)kZ)ZZνRZ΄ZkZZJJkZZΥZZ挌Z{kΥZZޭZ)1Z΄Z΄ZZ1歭Z{)1Ό1c挭1)1cZZ)1Z1Z{Z1Z1ZcZ)kkkk)!BcΌ))Όε)))k)))k))))k)))Z))Z歌)))J))J))))J))Z)Z1:Z:1{Z{Z{{!޽{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜIB"A0b@ JQtJt R-LGJJU# IIkH?KL 1AA${T`S#\H`߿0# GMzbH_9 !8B6 FhBx˞M"- #F@ DLR"$~my9rb ,yـͽwowa1  73Lt H 7`NCl@= ?vFd>A# veaK 0,E4F` E 0@$@ 'E$igX[kA a!j0@!`ubm[>E 1>jl'A7gґ@iPd@Jsgц,pI06ʄiQ9И)a!@E|G^! ? y]dO$!g%6[OЦiE[dPbB# fim``Pйyj?@sl!p%hr 貤+Wl3sw ,$l(,0,sּO7Ov]DmH}L7PG-TWmXg\w`{- Pf6lp-tmx7exv߀iN߈x/x?.yOny_yoy.z褏nz餷8n ζn׎Nϻo7OCϼGoWw눃7䯟n>秏_ߏ]π`20%R$`'@>p =xAfwt0>׹p` ʰ3_apIx8шBL"mHC%"q@|uD#vE8E-n_"YF2qr]4XF6umD:R4kC>}8H?Аz$$HF&Pd#:*P$y(jҒ'JH2D%MJV2+7Q0̣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C2.h[NxIPϣ*.6y:^% >p uvvw멣d[z%oF浏J/3GasO%:S2wqwK7 -j:z|SgZn't'kS9oMC#tJ-kIFjO&I60w0n蘳TMkk+Yt["ӎ콃E[6\˟|pk7B9ӅK#]u!f|ja4gƨRϰ5E.\-S#ū%+}. Y7=;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/5.HP_bar/AdvancedOutputProcess6.gif0000644000175100001770000010241214676242340026310 0ustar00runnerdockerGIF89aop! NETSCAPE2.0!,o{{{!!!{!1B:ZZk1!BcZccZZZZsZRc))BZZkZ)Z)ZZcZkZ)ZcZZJZZZcZJZޔޔέZZ)Z)))))Z)sŌsޭZZΌZZZsΌތZZckJBZkZZJZR)cB޵J)BZBBJZZZ!1sZZ)Z{cZZZkc:{ZZZZ)c:ZsZZc{c!{ZZZZZJB:{ZZB:ZB{B:޵JBZB:BZZcBΥZ)ZΥZޭZ΄Z΄έތZBc1cB:c:Bc:cBc!BB:BBBkBkk:{s):)B)JB)))s)ŌέŌΌsŌΌ)ck)c))c)))k))))cJ)c))c))J)Ŕ!{Z{Z{{!{)!{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(SS+\pZI͛8s % @DѣH*]4!.N.D`Xj〯`l`O7.yέNb!׵ݻxM17 -]TjDgZ7RiS3ZE@n'N >LӨS[F9)ӋLqlK`Z<P&\ m62Kҵ@YPMNLxa Tcޑ' 7f 9; gmeY 7(@ @2`G݄.&J8kih-8D_( E.mW! @i`QaV2hd-f@@R@ʸPTVIyHljP..A0.0_Xdt(Al13'tʌb-mCU@ʈb墌J Q&C_lfoFA6X-ʸ<=6h@K?9@Ôϡ+lWjb Bs 3Mz12 (4{Sݦ+kloXl' 7G,Wlgw V,r$lr(r%!ü,ls8߬s@Rq)A3f `@ct mhDP>ԡ (D+ыj(H-Q~&MGUZҕ0 KeS6iGkST#|rT.oYRԟF7UsjU&juw]jXձnhkZɪֶguk\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Da˾`}cA.>\ޅ_>XIʁ%yTư^#yAR,-">E7\Ljpwozr ۓK1Y&0C'H{j4+vy A)Ґ1d?ǀ%>|= QgT5iϞp_@WWxq/"K֓`VfcQxш<LJp1VEbKދ]35nf' y  gRk|#jsͱa+/莸8U([C2M>Miӭa~z55~ެ.ޔO*6T|bK%x|q0 8P`† .TDy )*LD]0ĒIJXRƆCfDx M0nC"7z1(KZ$P5u2$IQ$0Iq:YU(dR,EamtjX)EiRVt;˱C5Y̓&#NLxX]y%7x`mSaFtu,s*B"*tɻvv@)c[Сf.ۮu6㕛i;old%OA%z. :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput1.gif0000644000175100001770000001302114676242340026265 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihl뾰tmx|04Ȥrl:P\1JZجv5NxL.϶/*h|NǪʷ(w)Oz" G'  + ) "'% Ҿ 0 ѹ|  .ԡ ]޽ǰC0!&bEDHr+mT?GQ:j#HU/Q(x]sܹEnHdɣ#Kdr㚞l4 4-|ׯ`s6 8|zզiJwգW%dAװ >1VhA};Ԏ"J]\ CP*#ˑ\.fa</8jrͼuskK^^4/ޖ Ν;qM>1sNiGo={u0 D?lQVmatE|zeoE(a6>S E!U1etyxۈj"lY}LD$̘aFLHJ%k@XJFZΧ PFI=Ţ-J@PY\)W^ihRflk)tjWa݉`jA蒈6(XZFVjWv<0,駨^竮$ j+=$}Q:B!&Šl^Bl*gѢX"q-Ϻm=A(֫&ہXI*'L 7 G܋Wl_=qdd .(&r$뭬) \ɛJ"dni<:HC.3 {T]*\'5Ks٢œ$ݢx^FwܫUb}{+ K=SxKkz/nsi.'c8ҺkܑO.zBx}/k6o>rTޠ阳޶8w. NkخxB/=(~ګ9ͼ,a9K6&G>/?oG 'LH@[ C 8b CMu,ρ` $ȴa΂`ɢ~D2nЄ)DT(:L( <CJ \삸 1_W#mjR;YC90ZS7וm\`EaP6;nouZƯqt Gᵱq7q9p"'"2}noL > z$:Rb;HF6wt\%s&IQz|\_ײB4$C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E-p"џ$#q6>xu6߫kա%|4Q7--JӧOVx4x*ƾO:[;*(=FKBe5'cδ'*l4 D F"3jOqlS3NE̱RѶQG I=._ +j VߊMB8uPE gL7cZm U(k7>!{E}WĶ쫕Y8ly&Ha\@ T\ҠvÖ"9چ,ycjN;T5c:%7sվ v֢@NgtkZõJX3+UJU'ԚA+ϣk5? ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/6.Buttons/AdvancedInputOutput3.gif0000644000175100001770000001422614676242340026277 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihlp,tmx|pH,Ȥrl:ШtJZجvzxL.zn|N~X NDi1 8V) 0T%ƾ(Rʢ"$Qҝ  﫷t= wԵB@"L` Ub8r MhF Ph HcUM/kNwSM*{yCU Tu2$% tjzF`K`s ʕה]4kQumKm^}sY u~wY} Voc~Ky ^7B?O,lTV}+O`$ZEfXl^YOsv5a Ԏ_p db}6e雇w6οU'3Cn;t^yf_fʥrIdXv-%TywHiP{ SU3tWܹd#q$.ȝwlT]G2%YѸX-rASJd`3[fy#`p聄a 2GfL ~tix|'% h&۟&ɂ&*i h0Bzؤ.^N]D;|C偼!tI3%Z Eq ,:Ҫl e[ոXJf̱34Kܳ=I6'."! v>8۹u!|ٮ+ rۣymYY0pW\+tWNۡb -n"7A{s @NUE$D]$`GvC ]Tj DgRZ;6pxha8:nю6DE}XdlmvJFVkdM3?z~&~%7JV{#*V@]D(ip`^1f:Ќ!\b*$֯rOQm2fAaT(TApA>9 dz;@Χ`xrkr,gȱaC 23~G=Cѭ3u'tO~u,&c Ϣb?AZD=Îֆd[6#f^$if)j툊T`*U Luj<$v[N'+ЎMV3cmfZujK1 vmpڶ]nN)TÌd+n߼>-]<ػ餵W+~ Pq]=}q)|;Ӄ$|{]3k}q_w^ORd.g^s؍r6PN_׀Va!ӨkeĘ6udv]?(~u}rW~vFd~|oW@ǂ-8~V\UU4b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Щm*e] ~"DIZe(.]+hUfŸ%RL(N, nn.B@^"o** ] QїhrFrEg+X D.U-b=keq]TP4bZe~eѡǩ4= 8Ҙ\Fl;e40'(qPUHn{ѦF?~1PG9\S;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0431256 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/7.Game_board/0000755000175100001770000000000014676242436022143 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.rst0000644000175100001770000001522114676242340030153 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== and plus alpha ==================================== Actually, everything doesn’t seem like a game. Now, we will insert a rule into this program. Then. It will become game. Rule is simple: counting red or black from 5x5 2D array and choose the color which has much more number! If correct, HP++, otherwise, HP--. Then new array will be set for next quiz! too simple but game which can be made in this tutorial. First, we need to generate 2D array and print it. How? We learned how to print integer data (which equals single data (0D array)) and two buttons (which equals single array (1D array). Case of 2D array just needs one-more step. .. image:: AdvancedOutputAlpha1.gif .. image:: AdvancedOutputAlpha2.gif .. image:: AdvancedOutputAlpha3.gif generateboard function returns randomly generated 2D board with the number of red block and black block. Needless to explain. Also, printboard function prints 2D board by same method as 1D array. Output color will be changed by data of board[i][j] is 1 or not. This board is for output only. Processing about margin seems to be annoying because we have to know exact location by calculating. Remember prolog. Output (executing result) of Pygame is GUI but input(coding) of Pygame is CUI. That is Pygame. Actually, there are a lot of idea for improving this game. How about changing button into image file? How about adding sound effect when previous chose was correct or not? How about setting time limit? How about adding visual effect when player win(maxHP) or not(minHP)? How about make the board bigger with another colors? How about implement Flood-it game by given interface? There are still lots of selection because this game is simple. :: import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.988112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha1.gif0000644000175100001770000003510314676242340026603 0ustar00runnerdockerGIF89aa*p! NETSCAPE2.0!,a*w0I8ͻ`(dihlp,3lx|pH,ZjƤrl:ШtJ ؕ rx</ڧ^d 2A 1m {*uw`|0 \( &i%X&*Ճ0`5HgG^–A4z/ ӥo3jȤX=>g 82ɕ^.h*(aPf**0X]`REJtS/NN{}8Kv BӀ̔.MܻxMt;oN1!JQæ[Y-cƐY%X`-+˹g:k-8 ;ι`Ԫcm 5յ [6lYr螺s;aăУKwPi3ƭWڧN.^xx{:DU]h$}$M3)(K8q n(}PbNmx~Ar\i!n\$M_08΀ c}#vKad3ˇXf-JXf ]G6lIP)zG.iߜiؓ!R$$`%.j)蠜pyu]uRhdg]lj)`FbLr]uˇuVXk5)jAwwݺ.Q%Ᵽ'be+)eTb?WjQxdH%j>6_A(+4NkO< [հV!%JO&r,"\gׂ 0H7U&l /tq>$S(r+0K!gRQp83D DZ3LPtC/ާ~U׼ZwI?5HmL:8k 'HIPm*J-30h4*D&MJQJѽFkUz!4P:*Mv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xmi7P^HP:N3!|[´h7A8'N S⏰8y1hNj򎏼(GW^axF,?IX!,M;\}e*s߷>zw:;nŶ-']K4xYlm5]?0գ9s:SmmGyJ7J Rhv {/?mi~Mn-dzРEƉvg GLz@^^x[u>IR5trE[ Y$A^X+P7w= gקׯGR>/_͌^5A_c?9U]5{|חE?b? g~SQ|hi xyD~7k57v,_.sWW|68~<(!];WDDBE5hJxK37zlFaDU&[c\h4|awWdXNp}v8Gdh%hVt!9.Ry6z;e yRW`4n7Z<ȆF%Zz`t燉~Z98F9U5{yywFWcYXPĈIh"]gٟ_' Jr4ʛ% D<Оd.HHX~I i:G_!:@z{VZ (xZY^]b:a:fezcjlڦ[;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha2.gif0000644000175100001770000021421314676242340026605 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,{{{{111kkksRkkkcRkZkRZ:ZZ挌RR111skR1:!R:!!R:ZZ):){ZkZZsRZZ:RRZZc:ckRkZc1R:νZkR!)ZRsZRZZZ歭RZZZZ:ZRZZZZ歄)cR1R)cRRccRR1J)Z1ZscckZZR:R:s!RZZZZBsZJZ11:csR)c:)挌R)k){B:挌RkέέZZZZ{ΌZZZZ))ZΜΌZ)){)1Z)11{攭1Bk޽޽csB:)k)k)歭R)Z)Z)k)s)R)c:)Jk歭R)Z)Zk)s)R1)c:Jk浥֔sνsB1)sc:ŭ{s1{{s1!1{{s{H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ Jѣ%C@&JJիXC3ӦyE.ٳhӪ][ܼa"u  X˷߿A "2ðND\ Aǐ#KjBE˖U`ѹD=L5@DSɰc˞A#40Xn ,6hХKvHA\(p0MO3 #4F^Ͼ=CI@%BK}Ix"`^ FABiCEi "P;)K- `BpaBFދ0Ƹ_e(Q@T|Cn ׇ)?%! y^DFs"˓ wLA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V2ldO @$).꾑CH*%c(;.܎;K MK;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/reST/tut/en/Red_or_Black/7.Game_board/AdvancedOutputAlpha3.gif0000644000175100001770000007325414676242340026616 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,{{{ŽB!{sc)1ZJcc)潄k1ZZZJJZJJJJB:BB:ckc)cJcZJcZZs!B)J1kk{RZ{R{{k1ccJJJJZk!sc޵1::{1{c{{c{νRkcJJJ1{{cJJJ{Rε޵kRR)k)ތk)kŜ)Ŝ޵{R1{1{޵JRJތJJŜŜνk1{1)JR)Jޜ)JZkތRRsZck))Zck){ZέZJJcRB)!1ŜRkZ)Z1kZ)Z1k)k)k)JJZZJZZJJJ)JkZ)ZkZ)Zk)k)kJJZZJZZJJJJ{B1cRR)Ŝ1R)޵RRBRJss{1JZBJJR1){s:s1ބ{k{H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cԸ`VY͛ɳϟ@ J(y…'B&3JիXjzR^Z|dw%Zvr]˶۷p㒌άy|x3 LA#f^D1 3k̹j=dk8RLʣIFPVQ= NCMyI@1QFz4~!7p@:vQt]~|4<9WH~8 Ωf`C^& 0E} %DoS},44 E08樣F5,Wr(A7N4 䑇#K*9vD跐<q9@AV~yFظlPs-8R (`8L@AnTчBh<T"(((@,.P~." }  ,^ 5 RhR DQ P@>afͲ:"g'7'O}(к5kPOP),OJ@V(.j5YNjG' ,pߨzegLt_J<ij أI8Ģ :P@rylНMl"3ģ _L`TƃZZ_ tKj< *F_ H"zJ6rsc)WI C٠&b-@ZfSլ CB2 = =^AX.-|ZԩBg`S((p(_, !8$ IKPC"Ѝ =%zF뀝H2 {26pH:x̣> IBLU F:򑐌$Y뒌Ĥ%3Mvr(=IOL*WV򕰌,gIZ̥.wY 0Ib%2f*x& McZSԜ4)kz 8IrL:v|'=JЂMBІ:Ԙ'7ъJ(F7юJԣ (?GJQ{M)JWҖ.)L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{n9R;y1z0r0g[t^9jfl 1G#qu1  !p16R)a2ɏ8P11!\"y4&bYEYx8ŠtiW/5@iAc8Rmvi虒D!鑎@ԕ+p? KKFY?Ʋ*1Fڱ!z!YB?(ۭr| .[DŽ#Iz'P/s;zZYz1a{W @ty$jRh?b`pvi[I;s @z1, kDn{[zV{Xg;i+7+@ \wYGxń(5#Q 0:S)+u !BZL3Q;&ؠɻü^pY"cW $yڱ 6+w qP^ҋ1fw>:{; b$Ĺ n`H% cFq]WK7g8#B@K@HR=I5?!DD`Y-B0fX sśkDQ 3CDRPlB+w %փMp mAVlHsX 1%c;+l F'RZPK0{>˰b m<Tp:l 1 VLL`H60#6kHdHdHp dʦ =:|qɌ  <\Y;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/reST/tut/intro_blade.jpg0000644000175100001770000000510714676242340020027 0ustar00runnerdockerJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222": !1AQa"2q#BR$4br+1!q23A"#BQ ?SQ¡'Md8zy0)dQk{f7_#xrVOHԪRoy2~^(wYx"%rF-/M9'.cRCө?zьu:8EnO"?3`Nsko)MjFR\n"::y3ˬw=^K,|~"€@0 HH(:XaNKcL^t¯Vs5ۭo!К:9PRTĢteshEJ'N՗BT@0CHt:CHbHШDP*DB@4:t\QZ+uۦ0y TӣCQ3 ;VDQT( ttP) Ht (@Z@4KF&3hZ%T[B"6Hv_;9m 5MZ1z~2-]ho"XoHz(Uv$c%+mwjmVAB* *>}[6gphԢQSAEP ti*(I !RA * hTh-DiBh+&F TiBh =%rH4Q4EBtPT\#Q// 5K3.EE$VI!T4&E$4@Z@ѫMѭ d4lK vhШ҃h1rI%mƔt%Ԭ<7R{Uz.Jͭ2Z,:o3M `ln5i=5>n*_~+_.[Zڗ>*ֱ5vGEQžLܲYs.cǦ|<q|CP,:/e>,c6/^+bxIXVo:tE/h"RE$RD@mDkBm6mШė.W[EFEAvj8tX%%SY(kQ/X)JjxSo;NIi}G=9OiUb7RQK*Scϊ2P޾7Wt+I; wiZ9xN(䃆I\_ʎiqVb3 imɞѦSltij BMFh@ 6e'$>.u|7 uy2-)㶾NLf!8L.!(dJ2]-;>süQO&=Ten}}OK>,CጥVZ1&m+I/z-m[N>mc8,=7uR߶n)J0D rp_)jbi|x Ùbpnj)Ԓi}KY͟K]R>!]x\>KgQIW3x,QOx%Tq:g'̸8=p RM6[nQ_[\i Rtǟz}Ƕ}<6HN& CiliV/s]>gŷYKK)+ԗ׺3yX3 jE|>--6<~G#O8'Ze>u'zۗO?_0Dw@NxiNH̗(j :P((-Qi2xA$I%$bm/hYepɚw<<KzO<9VzxM_˩d?Zbb8DRfrZ=J"и$>zO^/] :6(t././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/reST/tut/intro_freedom.jpg0000644000175100001770000001561214676242340020403 0ustar00runnerdockerJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"9!1AQa"q2#RbB$r3-!1A"Q2aq$ ?Luޝ0+2vqMd;޽Xl+`e[mJQ s۟B*`v*m>M(+1ǻ>e\Ďv8t~s]v^&[k[s3+C}ZY!KkTR&$|Mey ,rd- {LVa3Rb4u#l) ,xqZuK}F:3UH7s8nPA%]r=pj MF`$i$$G&5kPZ) 0q"+iTx$XGPC7C O.=yGoZ4obC1'pہ~&hb^_잙hMR<r:sR;nԒ(*N@Uu/'ɅמK }OA+3p3/jKKycP 9^ï=+eZCn5Դ 4k#Y#9+si+01AQ3H˙$y N(մPp ȥKXr7 B6ݢ$-Wj:Wi4I^|'mKOW,:3<ײ9??:J:x)ZƒhtXd {x9xbuVsB"vU,ʤϥyS!矌c>82g7r\s4JY躅uf%|Ӡk3\"1F*\!Ux}7ЭEzB:09㯿4ڶ7 䫐x0GұxֿOE]c #ןҦCU:i g֔6 pONs[좋ne /$qR/T,Dٕ -OJXu+8[v:e8O[:ij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@}f68v7/J*[[[aO)$榆iblOH,:}XtAylH=;}gl_ڭ-Da#CSn#~|{$V_J'|k)WKXHO2z}lj4 hwa@8~^z ە"Fm5'|1KYZAo$p?il~A{q=JHب<yR躆ui4<h>8m>!r'=~CZj76eGH7Ԑ w6z6~.u;}pӧ~u"}喊.%KrHS9?^+ේ*UL6UϿZ1T7bF8 P"zEYˈgjW)"0WB+ώ2WjJSR (a*vI-}u@sJW6c(ϭ*6xS# u*U&iI$6eéR{SCq'lЃS/NmyUPssv5(De%cR@g@mfy}k-i$ vglQ8t875iN?԰sQC4R.3~U0UC`7aJXq֜䃀)`Z%+vF[cpGr0rOji5v2 ?Ķj֣:~Hyn1 sڈ=X^o4h=0VR 4.XUxL  %xdX7bx]^bbMe:'$gQ{m񖟣^g4 [C0~388Ru$bqoQMo~#m^oz^LK v5g`=[ goJQ: )ceNqK~K @5s&886r(DqMu"xwZU-*@y\\]\,W#gqqMefq45qeJ {VIW7p’4/Şr#zHMu79|aVSZx_fN{?()-Cu,sc5}pzJ6McnҼk2 qԀ{ԗWE0I/ qi&ѻFiPTʰ8"JOsOJ1>UύyfVU_=JMVpX-S:DK,gÂ9 r8֏ K3}ýܻ2^*HN\ʛs ^Fx r{v}.]J--" w}j;*j IǔFN:QU^TW۶PF~!s>sϭ,z |~UP }~IW8YVbIDcWeKI؆d@Sڕ*7n:[؋XE?*-AK!u! dΕ*KeH'sNX.thĒr!9)Rg(; sJZ ۷OZTvŜ$f*W{ BB QT 8^~uk vM^^iwRqyr *U q&V&%4\ Wۥjȶu&R3a<9!uKS""GyoBM*Uۯ&ņ Vַ/yAE<ˌg'Uo *UB0U$`mlkkۛCLɞi/CJbFW;HzRHbą0W9JjTP././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9821258 pygame-2.6.1/docs/reST/tut/ko/0000755000175100001770000000000014676242436015457 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000013500000000000010214 xustar0065 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/ 28 mtime=1727612190.0431256 pygame-2.6.1/docs/reST/tut/ko/???? ????/0000755000175100001770000000000014676242436016566 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000015400000000000010215 xustar0080 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/1.프롤로그/ 28 mtime=1727612190.0431256 pygame-2.6.1/docs/reST/tut/ko/???? ????/1.????/0000755000175100001770000000000014676242436017400 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000020700000000000010214 xustar00108 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/1.프롤로그/introduction-Battleship.png 27 mtime=1727612127.989112 pygame-2.6.1/docs/reST/tut/ko/???? ????/1.????/introduction-Battleship.png0000644000175100001770000050332214676242340024723 0ustar00runnerdockerPNG  IHDR#غIDATx ]e}>~s:3J$@HHH}D7\Тj֭OZTmU*E+l laMd33w?9w&~t#̝{^,gzL=S3/|uzfl-8ݻgz7߀K-_WëV)\8]zgy1K_}7a롤y;=y/ƆS3L=yt]w5$I&ך}={ԯjݻwK_ˎs'j ʅA'Kr-)*i䏎DdbeϬ]/nZFwe 0\h號z` FQi&nOBם5O>tTzys=Ϭ][ǟs84C~|뉧xY_d87_nھygo;ODbXizg3M$QjW`+fәtf|ٯ|ᇖ/[޷jo~?WbQk>~_ok=>fS<7~nxɲlxK~vco9_y勴xɇ6t /6yͫ| ֝T_`%y4]gz^O%KlG'xbxxxMޱϡ ^r7?`k\|`Z7woY寒k~4bްr[>xu[GC,;#}Oߙ{ВJ{no<%{~qz竿oWv iY_qkqyz3L=/DzrT\k[vo g}V=;}|?v}ԙkoyO~.s+psGGwnZa+> OOlXp+g6po.;~޸08L=S vLy&h5~[j[oݰaËbK=;̴҃>~l#kc;i\i`^)M/YyԦghY60w4Xbu<4c0{s7;oo%ٹăS~wOg=? )0kw}œ9s6lܘ)~m7n[_8PM]SK} Z'hT-Hu0 -Ks4iY%I+9"7;='߿rgM=S  zrle75L=Sy L=S3)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li~Ą(Rd6q/9E=G{Wg66Qڳr| q꾶w#O,Sm;)reSiۅc@ۂЮ Jʼn<) np$΅l^ޟW0wfh46#9D:ZRLQ/-mwm )M۪H9"rU'~|d0Utp:|)SIv=.6<8vSێ  n6cak )Ʒlhr>UNqR@Z[#&dɲ6j*05@L Ⱳh&'Rb2ddmrE)_ a֜62cH*nU#$;DÅ=z=tکa )!`ÁmcL,4bC-7}F* YLj5܊ `͢-Zkí  $"kgB)|QBTAcփqg@?,Rv{NJY P+E @`lH0sNeIғb5!e"1YS㶬'0qVg+Hl@hq" /)=IN0`&Qe V7Z#N>ӄEW1i`V{*WzQR;n-\ڙas1:m-Xqe%~Q:+԰+ =kqh+O萃JPm*& ޣpi43u<5t2-$(@;gX[;^ fNnZVl:Q"M G}vDOv֎&^-N |5tv3uB+;X =ОŤ>Ag&)HK3q%peر .8_L^^Kr&u,:VlZʨ9u+JUca"n Db cP#d$FEBi*W䫻0B )B8Cb{ld0(`_ "0JGiO z+HEE@qo14\jgJtCƶa(94gje1h;Q 7!:";o $GK)N8:cjd2G2X͍#R*]k&@vMF9iga_ 5V+W3 (/5r=fPVKkCd=RPɁ,﬉*U,Jo|\lē(!m规<=9Fh L!6T rJq٬ b0B˱=x_Uò=.'P)FCpCv y~#:n\UJ^994$& 3M6>$*ZL[Fr_廬[- xlF+6DئZC9UlTe_\nU*k  R3bOVS;QWX@ gq`}6iW bWɹ_C {/5>>>:6&i)RfVx J$c%N? tlij9eh 57c|bQ29TL~ `lLjvp="Ҹ"PR#s Rp*ٌ"t2r<6:m" :)Q= ZwHQъ|.*XLuLqkf:/*M%~m<W^O6Fhm:~K^m'" drb4̪$S`-\ Db|W@REjue+b:߆kptpunF"賐=a1P s9[dp ,Uwmhjђ #6haVib Ei>IENDB`././@PaxHeader0000000000000000000000000000020500000000000010212 xustar00106 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/1.프롤로그/introduction-PuyoPuyo.png 27 mtime=1727612127.989112 pygame-2.6.1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JrdB ݧnzȴ `Ey@vajA'|4G[ O^" l%f@ %A4 { og v>"7`!%g"w7FDc(]EyC\dRۨ $9Cd?S4^""oCg)YX ["+W4mٍJ@Ii,@IiL-a9({p\9sTDX`@ h#nj!\^`hh chhUx`Njegn.\ } (RiLj-|`,\2bF<-́'Z8A5T 'sr.^<4:[EOcH&Jh\G- -R.f l,)C jZ+40`X*Rf'ܤl̀2C2EVF5vA*th nчJ: /rR dx"_!g4Y+( JCk_ S} ,F:S&i 8\ 879}(ZLTu sIQ`4- Jw 3DPLyvTڥUРux8X~8P<<- K[C&e!"r%Tqdn_s0ʼn=%xz6X; !C5 NX width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (C 콘솔 환경 게임의 예시 - 뿌요뿌요) .. image:: introduction-TPS.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-TPS.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (유니티 게임 엔진 게임의 예시- TPS) 다행히 파이게임은 그 딜레마를 해결할 수 있다. 파이게임 이란 프로그래머가 게임을 만들 수 있게 해 주는 파이썬의 외부 라이브러리이다. 파이게임은 콘솔 환경에서의 장점을 가지고 있다. 그 첫째 장점은 하나의 파이게임 프로젝트은 하나의 소스코드와 거의 동치관계라는 것이다. (외부 소리 파일이나 외부 사진 파일을 제외화면) 그래서 프로그래머는 소스 코드를 작성하는 것에만 집중하면 된다. 그리고 둘째 장점은 파이게임은 툴이 아닌 라이브러리이기 때문에, 소스파일에 “import pygame”만 있으면 그 소스파일은 파이게임의 모든 것에 접근할 수 있게 된다. 접근성이 좋다는 것이다. 파이게임은 게임 엔진의 장점도 가지고 있다. 그 첫째 장점은 파이게임이 키보드, 마우스, 파일 등의 상태를 확인하는 입력 관련 함수들과, 도형 그리기, 색 칠하기, 디스플레이 설정 등의 출력 관련 함수들을 제공하기 때문에, CUI가 아닌 GUI 환경에서 실행된다는 것이다. 그리고 둘째 장점은 파이게임이 파이썬에 기반하였기 때문에, 파이게임의 함수들은 절차적이 아닌 이벤트적(여러 함수들이 선택적으로 실행되거나 거의 동시에 실행됨)으로 실행된다는 것이다. .. image:: introduction-Battleship.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-Battleship.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (파이게임 게임의 예시- 배틀십) 요약하자면, 파이게임은 저급 수준(콘솔 환경은 예시 중 하나)의 게임 제작 프로그램과 고급 수준(게임 엔진은 예시 중 하나)의 게임 제작 프로그램의 장점을 모두 가진다는 것이다. 파이게임은 이 둘 사이의 좋은 연결점이 된다. 이것이 파이게임을 쓸 이유이다. 더 복잡한 게임 엔진을 최대한 활용해 게임을 만드는 1인 개발자가 목표가 아닌 이상 (빨리 그 게임 엔진을 배우는 것이 낫다!), 콘솔 환경용 게임이 아닌 더 발전된 환경에서 게임을 한번쯤은 코딩해 보고 싶다면 (물론, 푹 빠지면 계속 코딩하게 될 것이다!), 한번쯤은 파이게임을 시도해 볼만 하다. ././@PaxHeader0000000000000000000000000000016000000000000010212 xustar0084 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/2.텍스트 출력/ 28 mtime=1727612190.0431256 pygame-2.6.1/docs/reST/tut/ko/???? ????/2.??? ??/0000755000175100001770000000000014676242436017540 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021600000000000010214 xustar00114 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/2.텍스트 출력/Bagic-ouput-result-screen.png 28 mtime=1727612127.9901118 pygame-2.6.1/docs/reST/tut/ko/???? ????/2.??? ??/Bagic-ouput-result-screen.png0000644000175100001770000001132314676242340025210 0ustar00runnerdockerPNG  IHDRXIDATx Te**bN:ifZY:YiNe62Ze֔[% ((j (EyEsοȝ9>s/]$mVCeJcEuBPϩa=䣅'3]]U\>LIWIcG#צ m|V 888pmM2)oGxS[ae ~~~eee"\K쎏x޽;''珼"VSeC3nvͱծ`IGmMm[7ɷIډ{J+-{ctJ_WwoW"V{ԺE?4EoyoMŢ2y2ow(h:4:_|>VHk66g>vfwZ.'7ΎImRX ˉΩ"؟e<tJ>﹐Y?<>%j|BV߶i{gGq1뚵ѽsM}u? SvBv=;kX/ݿ9{v55]ZOO~s$[q/0 ۜk-v ŧ`+z>2!훕q֌%zSw;)E@ .7y}k~:3u²Oz ˀ1>tB_\Annng\\\uVhm޲_߾w튽#}kZr߮mY;۲myOFij#>=E5h~^Ƴߴpȁz5-Ե03w?qOa9֬,_洸}'AþSJ2M CX_ʷTqHMIߟѫOqq: }/J?`'KJJ*.[]ƍcN:PzAB U}xqϞ}NnÃ9gҠ> {bMڨE])_oX%C4 X!RꌠuYWG[}^_R-}DT+mURdJ/zQ53u2XeNUϚlxRѭU66ޫb_[ȩTUnjѸy֌`B`13 {}/X?Ik O\4qIル|lJ\UӅj& 5WCˏ_}{tݵYgғf0a6!Tll;Ь o[-QicPʪ=MUfnls_O{h_߻S3z'Z 4ϵFi@d;[:6W:N׫cR"jg^WƚyOVwWҵ|n: :P_jXxj7^XZg&30fł B`G+GMB3#:Mwֽ4 {7k}ӢaפzZ9 +4n.L -HkzjTO4 \ bmoR|3soq3#xu7ԌL64QeѹjY;nWM&m!o5yV5l;w_cf9T3L%v+El2Ja55ׇ!~[mP:lvTęcu՚SaZ+"R0CǙ/T-ˬ)lSY [mwhpgw]WUS4MyB5MMGl5sX)4W]J}Ět^&vQtŶzfJZIZ]VfjaS9-l[S?ل`MW5̘`C+tݼ!&_CӴ~4,%nٯ͉ds4uܨ4T)zLFWǘC/\`#f?f-akbYU6UJfjN v KK.- *XS跣͹~'Ӵ)r+2S6[ͬ!Z0\*ӈf`M7}lm*R3C|O[5e.B$*<^: g.QJ2zfZ4#:=1Ǭ*6-ezmɁ5AO3nz1s b3ٱzđB`G JZ˶l|u]mB] :̖uaFMiK;͘`N~yzbGW5I{w5{izmY55mZSͧM)}fְxj@}r`);N3=3+b5M%4Ux7͵؉B@>x6jq?47e5\*Dcj9nW3'_&>s~v.1{%=o6Jfkix3^3cmw!FQYf?Q9i@9ub1a:5Fך}̮գ"WU9g>qxrtefv0jG`٥QM2uuN\;ߜrVK>NZpi? 7_(r,b`wka6Ɋˠ75|V?]X/Gne׿sm ǁSf߃XL6kVWx}Ձc_`N;GGD!#;sWQPð> {YU>Z@ j]B! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@"D! B@~AeJON!IENDB`././@PaxHeader0000000000000000000000000000021300000000000010211 xustar00111 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/2.텍스트 출력/Basic-ouput-sourcecode.png 28 mtime=1727612127.9901118 pygame-2.6.1/docs/reST/tut/ko/???? ????/2.??? ??/Basic-ouput-sourcecode.png0000644000175100001770000016017214676242340024573 0ustar00runnerdockerPNG  IHDR*b)KAIDATxtG'.D$[K8- xpwwwwww'H?s#*vߓwvvfvwovĠјcB *>{V;G~ "^S'߆ʗtɴdIKK.yxccܹ?uTxdlⲸ]q丈E~Թ4}4d32 n=…UZ6hSB玔 m%rvo~ԹH?t..f8и`cǂ/?uUܑ[EpaWHsP$&wDQbl EzAs%>F ED<+qQy)^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Ӧ7n8|pU0.\ʲ2֭}k/^,uKښhhajA )_B+D,  DݺukmmMn@r02͛(zjd.۷oG{@ #᧟~6mZUp.vN ο[]c8 +?q}]8X$x* 9Z Ō?a/*DE~z>5DP%6mDJ2...ėc!$jժ`mԆ>U:}4С¯ VWD_((O/ `ߋw†K06Ҋ?Q̙3p?l#BX"ڻw/@k. &ooo9/ȇ$;v a Twpzr aİBBd^H`H&(O+;1c cݽ{73"DͿT-q, ¸mrrrPXO^V.TB`k8^zH߿ĉ -^ ynt̙ׯ_N+^ O^  7o(((ڶiRP(UHB'gAiEh.f;b-BVVV"zy9.٢͛7A1D@F׃cxVVQBTh"$** UR'dLΝ;tCzoU 1oz+x=v<غpBi&u,L"? AJvaEOOOЊe18!O7n۷oFF #^zOMRQZO= IHH@V`1}HNʰ "677>@(%s}9̬ߓn'N֭ ;֡C 52 `jj*ZEENK2<PKLL$,;rHVV !0&& 6 Oo߾SNijj#wEpj 1qHiACT 4X?ᾅcPCUҐꂿH~ `v" pu@<bXH0‘np'O< 1ytpp SuK: EM$?`Ǘ0UcQ 8'#CbD/"a : p1-(C4#PlZpAx+Fς]---'iݻQeȑjH`Gƌ0[[2T>pDB$< ܅nAPiT'(!n߾}Q8#0I2$>^}&::8M6H*KKɧȺTJM bCeoT/Jy!-BbB25NظEVȺS .yVUzx7w #CB>TTT(((^]7:_IENDB`././@PaxHeader0000000000000000000000000000021700000000000010215 xustar00115 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력.rst 28 mtime=1727612127.9901118 pygame-2.6.1/docs/reST/tut/ko/???? ????/2.??? ??/?? ???? ??.rst0000644000175100001770000002342414676242340021440 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 기본 형식과 기초 출력 ==================================== ==================================== –이벤트 기반과 GUI 기반으로의 입문 ==================================== 앞서 말했듯, 파이게임은 GUI를 기반으로 한다. 정확히는, 파이게임은 2D용 입력, 출력 함수를 사용하여 2D GUI를 기반으로 한다. 어찌됐든, CUI환경에서만 먹히는 파이썬의 print함수나 input함수와는 이별을 해야 한다. 그렇다면, 파이게임의 어떤 함수가 print/input함수를 대체하는가? 우선, 프로그래밍 언어의 기본 형식과 출력을 배우는 친숙한 예제인 “Hello World!”프로젝트로 되돌아가야 한다. (이 프로젝트는 같은 디렉토리에 .ttf확장자를 가지는 폰트 파일을 필요로 한다.) .. image:: Basic-ouput-sourcecode.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Basic-ouput-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-ouput-result-screen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-ouput-result-screen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Hello World 프로젝트의 소스 코드와 실행 결과) 1줄짜리 print(“Hello World!”)에 비하면 소스 코드가 꽤 복잡하다. 이것은 GUI환경에서 텍스트는 최소 5개의 구성 성분(텍스트 내용, 폰트, 크기, 색상, 좌표)를 가지기 때문이다. GUI환경에서 텍스트는 1개의 구성 성분(텍스트 내용)만을 가지므로, 4개의 구성 성분이 추가된 셈이다. 예외적으로, #7의 pygame.display.set_caption(“Hello World Project”)함수는 print(“Hello World Project”)함수와 동일한 기능을 한다. 하지만, 이 함수 속 문자열은 프로그램의 윈도우 캡션에 고정된 문자열이다. 우선, 무언가를 출력하기 위해선 소스코드가 어떻게 작성되어야 하는지 그 형식을 살펴보자. 소스코드는 4개의 부분으로 나눠질 수 있다. Header(#1-#2), Initial문(#3-#12), Always문(#13-#20), Event문(#16-#19)가 그것이다. Header에선, 모듈들을 import하는 작업이 실행된다. 여기에 import pygame, sys는 항상 필요하다. 이 프로젝트가 파이게임 프로젝트이며, 사용자가 프로그램을 종료하고 싶을 때 종료되어야 하기 때문에(실제로 #19에서 sys.exit()가 실행된다) 추가적인 설명이 필요 없는 당연한 문구이다. from pygame.locals import*는 #17에서의 QUIT같은 유용한 상수들을 선언 없이 사용하기 위해 거의 반필수적으로 필요하다. Initial문(무한 반복문 이전의 문장들)에선, 전역 변수가 한번만 초기화되거나 몇몇 함수가 한번만 호출된다. 주로 색상과 같은 전역 변수들이 가독성을 높이기 위해 초기화된다. 파이게임은 여러가지 색상을 사용하는 화려한 GUI임을 까먹어선 안된다. (게임이므로) 하나의 색상은 R값, G값, B값 3개의 구성 요소를 가진다. 그래서 색상 변수는 red = (255, 0, 0)와 같이 선언되어야 한다. pygame.init()과 같은 함수는 나중에 사용할 함수를 위해선 가장 앞서서 호출되어야 한다. (이 외의 함수들은 나중에 언급하겠다.) Always문(무한 반복문)에선, 전역 변수가 계속 업데이트되거나 몇몇 함수가 계속 호출된다. (물론, 조건문이 있는 경우 조건이 맞을 때만) pygame.display.update() 라는 함수는 일반적으로 다른 변수/함수의 처리가 끝난 이후에 호출되는데, 이 함수는 처리의 결과물들을 스크린(= 모니터)에 출력하는 함수이기 때문이다. 이 함수가 Always문 마지막에 실행되지 않으면, 출력되는 화면과 게임 내부 데이터가 서로 일치하지 않는 문제가 생길 수 있다. (이 외의 함수들은 나중에 언급하겠다.) Event문(모든 이벤트를 체크하는 반복문)에선, 특정 이벤트가 발생하면 이에 대한 처리가 이루어진다. pygame.event.get() 함수는 Always문에서 발생한 이벤트들의 배열을 반환한다. 그리고 이 이벤트들은 자동적으로 발생 시간순으로 정렬된다. 그러므로, for-in문을 쓰면, Always문에서 발생한 모든 이벤트들을 순차적으로 처리할 수 있다 (이벤트 기반). 예를 들어서, #17-#19는 QUIT라는 이벤트를 처리하고 있다. 이 이벤트가 트리거되면, 파이게임이 종료된 이후 시스템이 종료되게 된다. (이 외의 함수들은 나중에 언급하겠다.) 기본 형식이 고정되어 있다고 가정하면, 이 형식에 일부 함수들을 적절히 삽입하면 “Hello World!”가 출력되게 할 수 있다. 첫째로, 텍스트의 폰트와 크기가 정해져야 한다. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) 라는 #9의 함수는 주어진 이름의 ttf파일로 폰트를 정하고 크기 (이 경우 32)도 정한다. 이 함수의 반환 값은 myTextFont라는 객체에 저장해 두었다. 그리고 myTextFont객체의 render(“Hello World!”, True, red, green)라는 #10의 함수의 반환 값을 myText라는 객체에 저장해 두었다. render 함수는 텍스트 내용과 색상을 정할 수 있다. 이 경우, 텍스트의 색상은 빨간 색, 텍스트가 아닌 구역의 색상은 초록 색이 된다. myText객체의 get_rect() 라는 #11의 함수의 반환 값을 myTextArea라는 객체에 저장해 두는데, myTextArea는 텍스트를 출력하기 위해 할당된 구역을 의미한다. get_rect()라는 함수는 텍스트의 폰트 크기와 텍스트의 길이를 고려하여 적절한 직사각형 공간을 반환한다. 만약 myTextArea라는 객체의 center라는 멤버 변수를 텍스트가 화면 정중앙에 오게끔 수정한다면, (#12) 텍스트의 위치를 화면 정중앙으로 오게 알 수 있다. 하지만 화면 정중앙을 어떻게 알아낼 수 있을까? 우선, 화면의 전체 크기를 정해야 한다. #8의 pygame.display.set_mode((640,480)) 함수는 캔버스 (크기, 색상, 위치 정보를 가지는 변수들이 display.update함수가 호출되면 그려지는 공간)를 생성하고 그 크기를 640 x 480으로 고정시킨다. 그렇다면, 화면의 정중앙은 (320, 240)이다. 화면의 전체 크기가 확정된다면, 약간의 계산만 하면 모든 종류의 위치를 결정할 수 있게 된다. (2D GUI이므로 출력되는 모든 것은 x, y성분을 가진다) (오른쪽이 x좌표가 크고, 아래쪽이 y좌표가 큼을 헷갈리면 안된다. 앞서서 말한 함수들은 모두 Initial문에 실행되어야 하는 것들이다, 왜나하면 이 정보들은 프로그램 도중 업데이트가 필요 없기 때문이다. 물론, fill함수나 blit함수는 함수의 특성 때문에 Always문에 실행된다. #14의 fill(white) 함수는 캔버스를 단색(하얀색)으로 채우는 기능을 수행한다. #15의 blit(myText, myTextArea)는 특정 객체(myText)를 특정 위치(myTextArea)에 그리는 기능을 수행한다. blit이 fill 이후에 수행되어야 한다. 모든 것이 캔버스에 그려지고 나면, 캔버스의 결과물은 display.update함수가 실행되면 출력되게 된다. 이것이 20줄짜리 소스코드를 위한 설명이었다. 20줄짜리 소스코드 치곤 작동 원리를 이해하는 데 시간이 오래 걸리는 것 같다. 하지만, 이 소스코드에 무언가를 추가하거나 수정하는 것은 그다지 어렵지 않을 것이다. 이 소스코드의 기본 형식과 출력을 위한 기본 단계를 이해했다면 말이다. 여기에 처리 로직을 추가하는 것은 어떨까? 다음 프로젝트에서 진행될 것이다. <참고 코드> :: import pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20 ././@PaxHeader0000000000000000000000000000016000000000000010212 xustar0084 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/3.텍스트 이동/ 28 mtime=1727612190.0441258 pygame-2.6.1/docs/reST/tut/ko/???? ????/3.??? ??/0000755000175100001770000000000014676242436017541 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021700000000000010215 xustar00115 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/3.텍스트 이동/Bagic-PROCESS-resultscreen.png 28 mtime=1727612127.9901118 pygame-2.6.1/docs/reST/tut/ko/???? ????/3.??? ??/Bagic-PROCESS-resultscreen.png0000644000175100001770000001234414676242340025102 0ustar00runnerdockerPNG  IHDRZai=IDATx xMg_I"}VLUKұԾMUڢEJUkڥJ5BDH"{7Ii ~?O>ޜ{BysnjrVgw3ߌiG 7xk 9`f\ X^cPg/v?|꛰Ssh<@9iÂ&Mq+WHgs}B|ܬyERRRFF=ήLQϧӹsemGrVn]".8r}c֮cS|W)wތ,spZ#XP8xVPđXk-y<,o)笸󗒫9~TXN_qlԡ}ؖ/ŦX_WӠj1x={-pWVl=̴ނʔ)Kuqv֜$搃.zwlZ9++r繳]゛z1bK۫[t[13?_'qsJ7~[/U_L}y~'VbОf̚yǮ{:!.Z]:czȴ¯sW )UԊsSCoXvcۿYgwx4zD!V@bb͇NNNVԯ_x1𢣣7l[/!{ܢsg*wȗ&,bMLFFVaӦ ܷle[x |Qy"']?#jωDԺq\e}t^jW@`xYz,zoks@ЙߜQqBГ[?YX7*ϩn =(aE{t1{;x:]ܽTAO,;ڕ+&%\~&<"/p#B7ol۶-22vus0fhoo!CrAglj\d ivOx̲5XUۣmK‹:g_p-yq֒Q(`" e+N:y9&'Goܶ,]ԦN;v_ǥƯ6u,~bigf-4| ￶5q*4p$k-N)vd:#?F=( .6/Wvƅ+ܽUs#?B 8:8v1***%%|˖/KKyCWؚ&Ĥ:|6۱0٢Ur29ƈ.ƾut+nlyA{x\ dm+^=r4ʹ{{ory}YٕGV6y|p7hڴ{۝T5_tn ]G79E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9E(r@P"9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)z.Ik\uM]Nm%eS#V !!QVBqD92e PO!zYo d.ɓzؙ39Jf|ٳmۦso+nǯQ-sFxT, F?:.Y4< width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-PROCESS-resultscreen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Moving World 프로젝트의 소스 코드 일부 와 실행 결과) (Moving World가 알카노이드의 공이나 DVD 화면보호기처럼 움직인다.) #1 - #5가 Initial문의 뒷부분에 추가되었다. 또한, 다중 if-else문은 Always문의 앞부분에 추가되었고, #11이 Always문의 뒷부분에 추가되었다. #2 - #10이 무엇을 처리하는지는 쉽다. Always문이 시작될 때 Moving World의 좌표에 해당되는 변수를 바꾸고 있다. 하지만 문제가 있다. Moving World는 얼마나 빠를까? Moving World의 변위는 루트2 임은 확실하다. (피타고라스 정리를 이용하면) 하지만 얼마나 자주 Moving World의 변위가 바뀌는가? 이것은 Always문의 시간 복잡도를 분석하지 않는 이상 알아낼 수 없다. (이것은 Always문이 시작하는 빈도에 따라 달라지므로) 그리고 시간 복잡도는 컴퓨터마다 다르다. 그래서 이 시간은 고정될 수 없다. 우리는 이 프로젝트에 고정 속도라는 개념을 추가해야 한다. 어떻게? #1과 #11을 보면, Initial statement에 pygame.time.Clock()함수가, Always문에 tick(60)함수가 있음을 확인할 수 있다. 60이라는 수는 여기서 FPS(Frame Per Second)를 의미한다. FPS가 1초에 화면이 얼마나 자주 바뀌는지를 의미한다. 화면을 바꾸는(업데이트하는) 파이게임의 함수는 무엇인가? 바로 Pygame.display.update() 함수이다. 그러므로, FPS는 1초에 Always문이 실행되는 횟수를 의미하게 된다. 이는 Always문 속에는 단 하나의 Pygame.display.update() 함수가 존재하기 때문이다. FPS는 일종의 선택적인 딜레이 함수와 같은 기능(프로그램 처리 속도에 따라)을 한다, 선택적인 가속 함수가 아니므로, FPS값이 너무 크면 FPS대로 작동하지 않을 수 있다. 우리가 프로젝트 내에서 시간(FPS)을 고정시켜 두면, 특정 게임 오브젝트의 적절한 변위만 찾아내면 그 오브젝트의 속도를 정할 수 있다. pygame.time.Clock()은 게임이 시작되기 이전 속도를 고정시키는 기능을 한다. tick함수는 Pygame.display.update()보다 나중에 와야 한다. 왜냐하면 tick함수는 화면이 몇 번 업데이트되었는지를 계산하기 때문이다. Pygame.display.update() 함수보다 나중에 실행되야 하는 몇 안되는 함수 중 하나이다. 화면이 업데이트 될 때, 시간을 고정하는 방법을 알았다. 정지된 화면보다는 정신없이 움직이는 화면이 게임에선 많으므로, 이를 반드시 알고 있어야 한다. 그러나, 이 프로젝트는 결과가 너무 쉽게 예측되기 때문에 게임이 아닌 것처럼 보인다는 단점은 아직도 있다. (결과를 바꿀 입력이 없으므로) 이젠, 입력 로직이 추가 되어야만 한다. <참고 코드> :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11 ././@PaxHeader0000000000000000000000000000016000000000000010212 xustar0084 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/4.텍스트 조종/ 28 mtime=1727612190.0441258 pygame-2.6.1/docs/reST/tut/ko/???? ????/4.??? ??/0000755000175100001770000000000014676242436017542 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021400000000000010212 xustar00113 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/4.텍스트 조종/Bagic-INPUT-resultscreen.png 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/4.??? ??/Bagic-INPUT-resultscreen.png0000644000175100001770000001352514676242340024666 0ustar00runnerdockerPNG  IHDRS9c IDATxw|+I6tep ȐQv Y"GGeVQ**@ZJ t9 "w~?4}Ǔp1|ygqt^PܧADU='8Yc<3iΆ#S_ڲ"*M}Z[66{9{GxSnoq&fw..~{\`v{k=[#[tfGHv}ZˇuĆ&=NАPأ۾>pۑ[?˯||__Rwjj͛&5++ގЧwWY~mZ?z>+1wz3\]Czdy%L!CB~IX:=:TٰVGnts>e ̺r"RFվ\JwhKEJZޞpg{Jٸ.]QC^Ȱ1'>_~ܤn~dž xyv]*lݲ7i^Zv8~k QkG .]t+ݷe6E5iqܫ6ek`PrwhQm[?-3X^OrrZqПI*UZlYtSMPm;99sĄW-̸ FCZY+Ǡ)y9zۖ#965hM~Z=^vب1G4hw[f;s4 Fn1;w}$QҧOW-&֕MUWOT@>NGʹkV_t:rꔲ%Ƨ;Zy].g *<YXIn>jSkZ م K֎R'&dZ|۝/]~ͺgl?p,~#]ss7〯}Mw?ܠ}5/~H4UOJJ͛f˯W^۶m#|y>F?`VSƞ9lz]8y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=M;\^ җL9k@W#I*B1xeA䰏7 stG8xm}1}:P4\7Y{c'amyF|<7ǫ7Ћz"V;{%u/}Ax]@X=)VϨj5Va ݶ{8#\oB*^Bȍ7J0a%j? LZzߍ{O{{>NP}nܟWۇO{'v)z{SY_hxH_J6uyJOͪk ]HL|{?Dw|6`C!6~\ύTczҙŅyU^C ^ WCPoSQCI-^ T*qgN |FT'^r *ZzzQYz鴿yqO%=zWM۪U@t~Wl?nP30o .-%ݾ3w˧+D/Yܣ_o|FEWbt8\.\0ovID,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$'I$bD|"X>D,H"O$ѭ4O1k*!IENDB`././@PaxHeader0000000000000000000000000000021200000000000010210 xustar00111 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/4.텍스트 조종/Bagic-INPUT-sourcecode.png 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/4.??? ??/Bagic-INPUT-sourcecode.png0000644000175100001770000022640514676242340024306 0ustar00runnerdockerPNG  IHDRRIDATxu|9C;wwwYYYXVw/kBK ӛev{{) 9L&dw&=BAAA!#lU#!ի7j?BܹSfÇG] ,TШQJ(4ǏH"Y AG9 ܹs_|{={]v;w-}ѶmԩcuT;f8 oooWWK?<`ɒ.BȢƐSZju-v={,P Ul0aK.%w˖-cǎݷo}ѡ/[uԩ>mcgDZkʔy.f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ȥ9HKKCN P^mSN )jXE("P[Q(U[ _|!ĉ***&Lu3)FAmՖyI loo?k,YBy5Vme˖x۷o *,,,..OCCyҒyBg,^^^ǏE`` ;`  gu{)W@mՖA&hmm}}Vtȿ6fgg{{{(o>}/^}Zz;wۋfX#2IDLLLbbb>v_mii9uTv(ԩSQQQVyFmڵk߽{7 ? OH| w̯h'OZ=۠rqqqttDXk׮ ĉQ]ll[ h+OOO !!!/^ܱc (rۊ"x**i@&==ѓAUZZZ:uuUUZv-z,3i l2uuul /^,iչg˖-TUVחjPEZZ"8SSSӷ4By% jǏgddP-]#""a[fϞM@ j+ ꠶P(j+ :P(u3( $BfXIENDB`././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력.rst 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/4.??? ??/?? ??.rst0000644000175100001770000001525314676242340021007 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 기초 입력 ==================================== ==================================== -새로운 입력은 새로운 이벤트 ==================================== 생각해보면, 우리는 무언가를 출력하는 방법을 먼저 배우고(“Hello World”를 생각해봐라) 무언가를 입력하는 방법은 나중에 배운다. 왜 그런가? 왜냐면 입력은 몇몇 프로그램에선 필수조건이 아니지만, 출력은 모든 프로그램에선 항상 필수조건이기 때문이다. (프로그램의 정의: 0개 이상의 입력, 1개 이상의 출력) 그러나, 모든 게임은 입력이 필요하다. 그것이 우리는 “나는 게임을 Play한다”라고 말하는 이유이다. Play라는 단어는 몸의 일부분(아마도 손가락)을 움직인다는 뜻이다. 어쨌든, 이 프로젝트가 진짜 게임이 되기 위해 입력 로직을 추가해보자. .. image:: Bagic-INPUT-sourcecode.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-INPUT-resultscreen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Controlling World 프로젝트의 소스 코드 일부 와 실행 결과) (Controlling World가 키보드 방향키를 누르면 해당 방향으로 움직인다.) 이전 프로젝트와 비교하여 2개의 큰 차이점이 생겼다. 첫째는 #5에 KEYDOWN 이벤트가 트리거 되었는지 아닌지를 판단하는 것이다. 다른 줄들은 이전의 알고리즘의 약간 다르게 동작하도록 바꾼 것에 불과하다. 똑같은 명령어가 Event문 앞에 있느냐 뒤에 있느냐 결과는 완전히 달라질 수 있음을 우리는 알고 있다. 좌표를 업데이트하는 경우, Event문이 종료되고 이루어짐에 주목해라. (세팅 된 후 업데이트된다. 그것이 두번째 차이점이다.) 객체 event.key는 키보드에 마지막으로 눌린 키를 의미한다. 구체적인 키의 이름을 보아라. K_UP, K_LEFT, K_DOWN, K_RIGHT. 매우 직관적인 K_시리즈이다. (Header의 pygame.locals로부터 이용할 수 있다.) 다른 키의 이름으로는 K_8, K_a, K_L, K_LCTRL, K_DELETE, L_F4등이 있다. 이런 키들도 추가적인 도움 없이 직관적으로 이해할 수 있다. 모든 키 이름 목록은 https://www.pygame.org/docs/ref/key.html#pygame.key.name 에서 확인할 수 있다. KEYDOWN은 “이 키는 이전에는 눌리지 않았지만, 지금은 눌렸다.”를 의미하고, “이전부터 지금까지 계속 눌린 채로 있다.”를 의미하지는 않는다. 눌려있는 경우를 다루기 위해서는, KEYUP이라는 이벤트를 추가적으로 확인해야 한다. (변수와 알고리즘이 더 추가된다) 이는 심화 부분에서 다루겠다. 입력을 추가하는 것은 단순히 이벤트 인자를 추가하는 것이기 때문에 쉽다. 이제 게임 프로젝트는 완성되었다. 왜냐하면 프로젝트가 출력, 처리, 입력을 가지고 있기 때문이다. 맞는가? 아니다. 이 프로젝트는 게임 오브젝트간 상호작용이 전혀 없고, 플레이 규칙(제약조건(HP, 시간 등)도 없고 점수도 없다)이 없고, 즐길 것(동기부여 요소, 입력 출력의 다양성, 컨텐츠)이 없기 때문에 게임이라고 불릴 수 없다. 우선, 게임의 인터페이스/시스템을 풍성하게 하기 위해 우리는 심화된 입력(마우스 상태 반영), 처리(적절한 함수화), 출력(이미지, 소리 및 내부 데이터 시각화 방법)을 알아야 한다. 물론, 기초 단계에서의 경험이 반드시 도움이 된다. 심화 단계로 가보자! <참고 코드> :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update() ././@PaxHeader0000000000000000000000000000014500000000000010215 xustar0073 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/ 28 mtime=1727612190.0441258 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.HP?/0000755000175100001770000000000014676242436017337 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0099 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess1.gif 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.HP?/AdvancedOutputProcess1.gif0000644000175100001770000003711714676242340024377 0ustar00runnerdockerGIF89a1p! NETSCAPE2.0!,1𙙙wI8ͻ`(dihlp,tm߶:G $ryl*̧4JZ*vf\7Lrn[x8 H*O@E\Hŋ3j4É҂@nIɓ(u|hMdʗ0cʜI3Jm.kɳO|7'XhрT4рLsZGCYo?Tv \˶hARx:ܻB+< ٬0aϞPXpo#KLC\z"m9f }N5x4dib b5iԦ+˞M塟ZY.ֱYs7pj%Xn_3wlcdSgDxG_Ͼ=x=tؤş_{yh[^v 7wU4H v([]UQl5ig~\1& 8 " H@>X"uuڑ]bw߉!z46TVB$nRJ9^e$)sdV p)b fc n7矀jAܙamj5& }FJ%Vju馜vJ*;*<5ZV :dOPkƐ+zt,낱& +n >*+̶, ׎ZvQjLuTq.uXTm;Gڋkfҵnpkzk ሼ}czKv#٨q0TÛ$cD:la瘅0)e.g1E"u$6H}'ߖxe9+L&6O;%8$1dCʲi}H!yQoPgx>A׽> š\r/{M7n 3+@3J)8f8⤃tq*_RW֬ny݀lL?Mz9~1d+"1PZ8>_ӹGҧ.6_yo >c/~*nܔSx&v]0Uj`dE<s374n4Go9HB+Q(LaN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Mb : RaScᅆԙiqru~]ũN*<`iY))&!ZRRՎriʅPzaVDovDP ~6jiy⢪ŨRNxX-}a説Zª".j*+F>a~Ų^+!ev}+<~+ūV+bR%rR¨$.,9,>6,NNT6Be.{yFjA'VV\BMkm nQ$z@ :.m2UNHnW%9M鈦rnnB?9amYnbeVݨn]vMn. 5oJ/V[*":/+`NԬ^Zn/Y\9rMA2.(ںzY8mv0מK&fn.=NcCK+h,~06o1Y΢0=l, 7 [k0 0q0p nl=*~ 'xhz.1R$+'b*mZ傞~1c,1mΖq3V\.S^:pqn"ϭso;9pW!Gg2ovu#Or1@@bDog&(+1)3f[:dz+_,;Z2/b$Kr/F%/:Qn'?.r232VFJJf#Wݯ^3ݎ# "_639!K4w}ܳ3wl<&!Y&:q@1tAAcHC^ ?DDc EW4D;././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0099 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess2.gif 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.HP?/AdvancedOutputProcess2.gif0000644000175100001770000000351414676242340024372 0ustar00runnerdockerGIF89aGp! NETSCAPE2.0!,GJJBkRBJJJRJRk{RkRRBJRJB{RRkRJRŵsJŔBRJBZRJ攌Zk)kRB攭)BkkRZZkBJZZ!!!BRBRJk)﵄έkkk)έ))εΌJJJΌRRsR:sRRssRs:ssRRsss{ﵜJk{kJ)J{JJkJk)JέJ)J)εJJJ{JJJJJJΌJJ!!{J{k{{{εפּkkk))){){εJJJ!B)RB)R)R)RkRZR)R)RsZsR)RŔs)潭{Jk{{)ޭŭB)J{JJ{{εεk潌JJεJJJJkkJk)JJ)J)c)Z{)k))){{{kތŌBJJJJJJJJc)J))BH*\ȰÇ#JHŋ3|Q@Ǐ CIɉCɗ0cʜIfA=%@+l͟@ ϟ>F dp"g(P01>n`*0Bb^,vгhH 52/F +>J>hC J:c۷p&|/FAV2pk`^ Yh&9b#P>F1cmQL .t <01CH@_>H |&n `s7XG&^h@ 0djx 'ix0CqcϿCmPUI‚>@Vi)BX84@78>, Y`#Y'$6 (D+&`/h8<@)DiHL6PF)TViXf\v`)dihlp)tix|矀*蠄j衈&袌6裐F*餔Vj饘f馜v駠*ꨤjꩨꪬ꫰*무j뭸뮼^+k&6F+Vkfv+k覫+k,l'D 7G,Wlgw ,$l(,0,4l8<Ϗ@-DmH'L7PG-TWmXg\w`-dj %cs 4Op’&k KL*P7 ., 'SOaL?%@ C$jp݁o^ &_L ' $^椧.8a`8h{Ks<]z 4I =$N@ $@/s;'d?{_= HL:'H Z/7z GH(L W0 gH8̡w+@ H"HL&:PH*ZX̢.z` H2hL~;././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0099 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess4.gif 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.HP?/AdvancedOutputProcess4.gif0000644000175100001770000003424414676242340024400 0ustar00runnerdockerGIF89a4(p! NETSCAPE2.0!,4(wI8ͻ`(dihlp,tm8.|pH,Ȥr91ШtJZ,֩zxL.znp*.~nwv~,!6$*<7#(5!-nHQEݴ3a+La qx۬ iȱcFI3U>1w=XԄѣ͛8v+'dIԂʗbvYfΧPI2ϑ N-AW0e*ٳ{:Ȭ[O.lը]r)+#ڿQUZZwkb֔,rл]A7n!y0CzCbEޭRӔ/M vtsvL޽ν~*ws y3V ˟O?3c\hw&FVhJP+uhbTa{0L.2樣NA؈I(؂$L6, "NVie"P0",NYږ$N4dG*H^c[$x))Ýz* |`)6"r& >j!J霕z*&JC%j`*M%J뭸akJƮ+k&l.:@+PkF4rmk䖋 ·k,[+{+*{)<(''\& 7$G,$W#g!w!xa ($O0 -,!+#20Ϭs(57B̏D8tE7 8"ͭ %mיHEtym m1O@vhsmst\ݛY 16l]uwO{ K-~^K+^yژ?yOg[>xS{ !y2"^1>{>>4ʃ߸촇|H/7g@ao =~3TO\3f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?,>KOE;} WuK^_ ?}xu9V#Q >z|ѿB`b>I\lĺC5K򚌾ЃT;'MlF\pH%B)pfr(Af`) 50&d1PUFe*9$Sר#TSفcqגhS_/*j ABrmy ,$" !i^6Tأ>Vҁ!z1"d8Jr-?FD#6nQ> %J!Z$/Mu2h) ȱ]q6Y9ma,ێ+3k^Z:U$\PF63}h0Dv0YDAG@dBY^b0M3lS U)̑rSh;h>*%ftiD:Nu.$5wFJr[%>RX)Ť;`wRbl95K(F4[PN/V]Mt~*K?z!TDsQCMSIH:O-!bc\k2 -Ek)@PqlHAVoD)F)R}oFS~(ҪYD͈tboU۹ޏI6P+&[UiܮbeּvrUcI K[ږJ=uj^/'Sϯb-({Hu[Fck4w!/>ABs/DZsN~0#J0A s0&6 &vOHc,_41s9>y,! u<.2cZyN~2)Sʽh-#\2ì/f2Ϭ5/9l~3}8ӹ.gy~ AZv.4=C+ю#-i343mJҚ4-x:Ԧ>uFRծBC0Ysր+ Zֺ5_-aK ֗v@~cebɮ mZ ^@>wl\znt=nOߺNx 7x x.qxs unZfuSMeUfcm˼毦sm<σh &ѓg+ufӣfKeճekUdH&d9f.c˽+Nboa &?>+KHC`W| PtX<˜饐z#ph yyXX}Z >z^e{_ @}g;}~ݸI .7o?)q|O_8>" ,SP~[?Ua_ O(1Ӯ-_|^@.40=/@ Z ^\UE= x  _E`  i) W9Oܟ`Ba $_ !`78!`*`<!ڙxMhT !ǽ _1aF!#AZqHN0 "~"(^<"J1ޙ)a-av1av"- ܢ'"."/0#0c \!#3^u54ZVzM#6F3ZXe762V1~#3##9 QUӀU:ƣ#!rԁɣ>:zat|@Jt?V>BYA V1uBN4 H g:RTiR\ G$A~??Idx\*FdoULM䋡@i%P %QeP RR60:%T C;././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0099 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess5.gif 27 mtime=1727612127.991112 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.H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ϰ5E.\-S#ū%+}. Y7=;././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0099 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/5.HP바/AdvancedOutputProcess6.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/5.HP?/AdvancedOutputProcess6.gif0000644000175100001770000010241214676242340024373 0ustar00runnerdockerGIF89aop! NETSCAPE2.0!,o{{{!!!{!1B:ZZk1!BcZccZZZZsZRc))BZZkZ)Z)ZZcZkZ)ZcZZJZZZcZJZޔޔέZZ)Z)))))Z)sŌsޭZZΌZZZsΌތZZckJBZkZZJZR)cB޵J)BZBBJZZZ!1sZZ)Z{cZZZkc:{ZZZZ)c:ZsZZc{c!{ZZZZZJB:{ZZB:ZB{B:޵JBZB:BZZcBΥZ)ZΥZޭZ΄Z΄έތZBc1cB:c:Bc:cBc!BB:BBBkBkk:{s):)B)JB)))s)ŌέŌΌsŌΌ)ck)c))c)))k))))cJ)c))c))J)Ŕ!{Z{Z{{!{)!{{:H*\ȰÇ#JHŋ3jȱǏ CIɓ(SS+\pZI͛8s % @DѣH*]4!.N.D`Xj〯`l`O7.yέNb!׵ݻxM17 -]TjDgZ7RiS3ZE@n'N >LӨS[F9)ӋLqlK`Z<P&\ m62Kҵ@YPMNLxa Tcޑ' 7f 9; gmeY 7(@ @2`G݄.&J8kih-8D_( E.mW! @i`QaV2hd-f@@R@ʸPTVIyHljP..A0.0_Xdt(Al13'tʌb-mCU@ʈb墌J Q&C_lfoFA6X-ʸ<=6h@K?9@Ôϡ+lWjb Bs 3Mz12 (4{Sݦ+kloXl' 7G,Wlgw V,r$lr(r%!ü,ls8߬s@Rq)A3f `@ct mhDP>ԡ (D+ыj(H-Q~&MGUZҕ0 KeS6iGkST#|rT.oYRԟF7UsjU&juw]jXձnhkZɪֶguk\ ֵuk^7}k`!pXp=tQD?og=?vmiQӆִmkcZ/yœmѦ"PtaÙQ5X\Ѓs\Z̽nuz7ܕw 񊷼%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>|= QgT5iϞp_@WWxq/"K֓`VfcQxш<LJp1VEbKދ]35nf' y  gRk|#jsͱa+/莸8U([C2M>Miӭa~z55~ެ.ޔO*6T|bK%x|q0 8P`† .TDy )*LD]0ĒIJXRƆCfDx M0nC"7z1(KZ$P5u2$IQ$0Iq:YU(dR,EamtjX)EiRVt;˱C5Y̓&#NLxX]y%7x`mSaFtu,s*B"*tɻvv@)c[Сf.ۮu6㕛i;old%OA%z. width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 변수의 값이 변할 때마다 텍스트를 다시 렌더링 하기만 하면 된다. 변수의 값은 어떻게 바꾸는가? 그것은 Event문에서 이루어진다. (키보드 위 또는 아래를 눌러 HP를 조절하게 하였다.) 이전과 동일한 방법이다. 하지만, 이것들은 여전히 텍스트이다. 아직 충분히 시각화 되지 않는다. 이 데이터들을 어떻게 더 상세하게 시각화 할까? 총 탄창에서 아이디어를 따올 수 있다. HP는 정수 값이고, 불연속적 값을 가지므로, 아래와 같이 출력될 수 있다. .. image:: AdvancedOutputProcess4.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess5.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess6.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess6.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 훨씬 나아졌다. 그리는 로직은 #6을 확인하면 된다. 로직은 단순하다. 먼저, 큰 검은 색 직사각형을 그린다. 그 다음, 현재 HP을 따져서 작은 빨간 색 직사각형들을 0개 또는 최대 개수만큼 그린다. 마지막으로, 작은 직사각형들에 하얀 테두리를 그린다. pygame.draw.rect 함수에선 위치 변수로 4개의 매개 변수가 사용된 것을 확인할 수 있는데 (첫번째 변수는 캔버스 변수이고, 두번째 변수는 색상 변수, 네번째 변수는 두께 변수이다.) 이 4개의 매개 변수의 용도가 무엇인지는 직접 설명하는 것보다, 직접 값을 변경하면서 확인하는 것이 가장 쉽게 이해할 수 있다. 3개의 값이 20일 때 하나의 값 만을 10또는 30으로 바꿔 보아라! 그리고, 이제는 본격적으로 함수화를 해야 한다. Always문과 Event문을 main함수에 담았는데, 이 경우 main함수를 프로그램이 찾을 수 있도록 #7에서 추가적인 처리를 해야 한다. 그 다음 drawHP라는 새로운 함수를 만들었다. 게임에서의 함수화 아이디어는 GUI 프로그램을 만들 때의 함수화 아이디어와 크게 다르지 않다. 예를 들면, 하나의 변수를 출력하는 하나의 출력 함수를 각각 만들어 두는 것이 좋을 것이다. 물론, 각각의 변수가 출력 될 좌표를 정하는 것은 화면 전체를 디자인할 때 선행되어야 할 것이다. <참고 코드> :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main() ././@PaxHeader0000000000000000000000000000015100000000000010212 xustar0077 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/ 28 mtime=1727612190.0451257 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/0000755000175100001770000000000014676242436017306 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput1.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/AdvancedInputOutput1.gif0000644000175100001770000001302114676242340024013 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihl뾰tmx|04Ȥrl:P\1JZجv5NxL.϶/*h|NǪʷ(w)Oz" G'  + ) "'% Ҿ 0 ѹ|  .ԡ ]޽ǰC0!&bEDHr+mT?GQ:j#HU/Q(x]sܹEnHdɣ#Kdr㚞l4 4-|ׯ`s6 8|zզiJwգW%dAװ >1VhA};Ԏ"J]\ CP*#ˑ\.fa</8jrͼuskK^^4/ޖ Ν;qM>1sNiGo={u0 D?lQVmatE|zeoE(a6>S E!U1etyxۈj"lY}LD$̘aFLHJ%k@XJFZΧ PFI=Ţ-J@PY\)W^ihRflk)tjWa݉`jA蒈6(XZFVjWv<0,駨^竮$ j+=$}Q:B!&Šl^Bl*gѢX"q-Ϻm=A(֫&ہXI*'L 7 G܋Wl_=qdd .(&r$뭬) \ɛJ"dni<:HC.3 {T]*\'5Ks٢œ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9c6c\֒酕Qf YqIfRiHwe'ب(iG΢QXuИBdD&2Tk =$Dَ-y7ifOf%eDN6d\4G*xՉ?Xr*} í09C*)⚃,D:[٬rj:خ5ƠZ7P]ꃶ8vxDcDti7鰪ؤ ;% {Yi {~SV*ˮUtlH ֧)+e˲j/+1 eղe*4KkaDkFKT;e c8;x'&B{w`b˳겵j{?۳:ڶ/Wշvnu^|HK{q(uc9˫ڸ{\˖%)۹M % # Eۇ& kQ\nZr9@ r^qd3+_&ʛlj ͻ'tIx2TYJw +&滽+kۢw۽۾kUˣzĀ<ڜVnGΙ#E8ƐDD OrRJ'ODygC `;Uf󞧂wRF2~!+ئF;-{F@,[Wnɴػ-T|/ˏjK}Z{ést(CVk%::~mǫ^Ll |Npδ {ӍmݳLڋt t=|+ g nlDz[ 933ՍdڋЙ!|Dr˸P|Cg)Ĭj_gχ/2.F&鷵;XDn"ک:.}=8OBEN.ͬKc-lr 8]lK~k_l|F^j\]x%8}ݪݓ$Mɭ,q虡{#NiɬHeNα'͵P#[^GdYFV忼O8ڣ* ܋͍~v)I,J'Y]4γy; {>rvGic,MR-/8 v G,\_m n,邏kM{-gw~op^ޏQߗ@_??S>ҳ?<+$Ҙ;././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput2.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/AdvancedInputOutput2.gif0000644000175100001770000021505114676242340024023 0ustar00runnerdockerGIF89a}p! NETSCAPE2.0!,}{{{B:B{{)))))kccckRJJ!JZ{ZZ{{Z{ZΌZZZJΌZJkZkcRRBZB:ZZccZ)ZZZ))ZZ)ZZZZZZZJZJZBJBB{))sJcJsJέ{Z{1c)ZZΥތB)JZs)Z{ZsZ)sZZ楔ZJZZZsZZޥRBޔZZJ)ZZZR:1c1cZRJŜZZc:)JZֵkZkZcccZZZBBBZZ:):JZťZťńZ!!Zń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|#iJ+R0M|3G3_5ZT. ߔ57]СRYΨԌq{MݒKѐMXN&ÎJNr(43Q2[]zml)^e5\"k.].zhhyyw͹4jh"%x}nigH8DUO]f&诪Kk]~s;[N4L פQFd\9<鲦үY4tie~&e2H tbD' u"bθ5;?4ݱ1nY/y$bUm &dLW~e _]㤷mF=wDD`@ A*ta l!ȁK"$Zt)aF+e|hbF+nD%Ž-KIjFnՊ3N^#zZV٭?fIԍê<$BR{vqfӈ:?JHS͛#s]v'k+ErY1Hw>M|FenJO-'Tvn]f E-p"џ$#q6>xu6߫kա%|4Q7--JӧOVx4x*ƾO:[;*(=FKBe5'cδ'*l4 D F"3jOqlS3NE̱RѶQG I=._ +j VߊMB8uPE gL7cZm U(k7>!{E}WĶ쫕Y8ly&Ha\@ T\ҠvÖ"9چ,ycjN;T5c:%7sվ v֢@NgtkZõJX3+UJU'ԚA+ϣk5? ;././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput3.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/AdvancedInputOutput3.gif0000644000175100001770000001422614676242340024025 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,w0I8ͻ`(dihlp,tmx|pH,Ȥrl:ШtJZجvzxL.zn|N~X NDi1 8V) 0T%ƾ(Rʢ"$Qҝ  﫷t= wԵB@"L` Ub8r MhF Ph HcUM/kNwSM*{yCU Tu2$% tjzF`K`s ʕה]4kQumKm^}sY u~wY} Voc~Ky ^7B?O,lTV}+O`$ZEfXl^YOsv5a Ԏ_p db}6e雇w6οU'3Cn;t^yf_fʥrIdXv-%TywHiP{ SU3tWܹd#q$.ȝwlT]G2%YѸX-rASJd`3[fy#`p聄a 2GfL ~tix|'% h&۟&ɂ&*i h0Bzؤ.^N]D;|C偼!tI3%Z Eq ,:Ҫl e[ոXJf̱34Kܳ=I6'."! v>8۹u!|ٮ+ rۣ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" rj< Y=Z0]ШWb+cݽpׂȻ݌ʷ+O^oKJ. Qܮx}֝ڽ ‡MN 孄DUMnJމԽh]+M%:a`_ۡ>9hyw)-vjؑj ~ݽn!.M}l\M7.2"mF~HCN-ELMQ* ᭡j!:^ލvܾ1Ky,WkaKGh5 3.Ϭ.k[rMJ܀^z Lr{^|.>snn骤e XV~. %~[R/KgjI8!> xnv$ 2VV&qWxтXB+@5ރy>CrV4rW"Ai O̞} xh jÃS8L`$1;%ˌ|k#f˜LyȏO`Cdj?BNۄIE,|NҎܗ>M"9mvL䞷̬?Mp gzv?1#3z)]Й2oL蘎]1,ZE>1?Эo=F܌}rKܾjd4H}OFծ+BM^EMHqRΗ [kԵ;ϣ9 kͻ`(difDg+ʰJ[<GȤr~'sJ:֨+Mb^w,}zn|N~z 6 QU:QAf*c7a<f!E(ӽ$3"Mɿ΅Yö2g(׳W' C FJԹ\*\+Ar*ưŋBCGc5]2+3ɗ0c1i eM{,<ѣHcm2h-ʒJ4.^`IׯmKٳhӪ]˶۷pʝK.b+Dݿq +H+iaz[LPÇM &lɲY7Ռ3iШS_L1}U˞=a$*M wgS7n)|k_^y<aN)W81DcN饩-y謵=KO'h& 6F(Vhfv ސ;././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput4.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/AdvancedInputOutput4.gif0000644000175100001770000007100114676242340024020 0ustar00runnerdockerGIF89ayp! NETSCAPE2.0!,y{{{{ス::B:::ZZJZ:ZZZZc)c))Z))cބZccZcccΥZcZR:R1ބZZZZkZZ)ZZZcZZkZZ)΄ZZJZZcZZJZZ)c!Z)ZZ{c!)ZZ))))Z))ΔZRcZZZZkcRΥRZ!:sc:B:ccBBBBBZZ)cRcRRcZZZZZkc:{ZZZ)):Zc{)!{ZZJB:{ZZ:B{:J:JccBZZΥZZΥZZZZ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#.s YL%IF7[һ]޸P|۾ !MltY'Έ8'g-z6,7(gZi?vꓗgG5f6xw(\/*LԜv*9^;jp*ֈXXH}ˈ9]?*ˉ}OTcjM&CR\k`*qdL8*S1|nlZ[c/][/0Y;߈mm챸 Xϖ|ɒ}gTZ5uxA.(Ł66D~ϣ4VH|f7YVmuS ']ܨ+5гKw81?o䃶BB%晢tFP9 qQ$%m$v3rtB]וVML4o]{y\6̑XxSJagO ߨrxW`$㧪EX}4Q|ƍjsj&sH<6gb]5kȻ S;4i%o 2HpIOnI]Iǵn9LqUy\- A2v6#MIbQ7h~=Iwhx fO2$P/ѕhDHun;]>_Mܘ=LJ4"QkE)eXg, $X,B!N\ŇZ\("G!/6xQ!F ;NT)reKa2XR͘8sdAMiQNJ%2\iqkH^H&JborrZ8=Tuҭ^XxY"gz>{`?C+.<=k[޸+/,omB JWqq5Rrמr'-m[4! ,S@-xA f0P aM(BP)UؕYj q&ӁOzT NQHG&D 4ՌƮi(rSbR5ϋJd2B-2i<#<'ihF1{Tr, e;h#հ#iE U2TRC WH 1~h"/mFELN^TLlyK;.RHb6F+9vq[*WԱ'$ ;././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/AdvancedInputOutput5.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/AdvancedInputOutput5.gif0000644000175100001770000011074514676242340024032 0ustar00runnerdockerGIF89azp! NETSCAPE2.0!,z{{{cZc歭{Zc1kZ1楔RcZ))Z)Z1)ZZZZZR)RcRZZε))))cs!)ޔZcZZkZcZ1ZZ)1cZZkZ)ZZތZZZJZZZZJZZZ΄Z1RZRR)ބ{kBZ1Z)ŌŜŌބZZBJcRŭR)JZ)RZRcZZR1))Z޵R1ބ)ZZ)RcZ1)RZZZck)Z!kRZZZΌZZRZBkZcRJ:::ZZkc1ΥΥZŭZ1΄΄ZZZ)1ZZ1JRZ)1Rc1111c1)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WuYN* AJzy!ȴ0hQ_5PIo! @Ae5^I* U9 9>ܚ%[e\%g^UrZ}ua)/*]E ZBF!"\p5%qq;dU= GBeױF.*F^~CHʼn`ȶ=ljRVVYPU J[!Cd8ddVFZ6:D}%Skⷐz! i d=쭍\a h gZ%Rp}jP9MQZ)d)LuۧaYV3j(%)f>O$'y*QaW}ȟp;gAź<^"ШXZa1s X}$^0![8I&Iт?y^7r9؎?SDN'xf%ENh,Je@:^gI]M2MiRߥʃ M "@"a 5*ߪM"ZR[@F =%1Byd z#|e*mSFdy"j3Mj^[]Es!],ZH fVD=Mmz͓4gz%\֧{Œ&JD8WҜBʡm&!=Ξ2AHRlZPl 4xǂlȊ= QO- " +jPfmYѪ|.Pɵԋ ͎m1p_pUWWṁ%Jnk DSz2@lؚؒm*Ǣ0{p''mm Ü ꗎ">qVBߘЩm*e] ~"DIZe(.]+hUfŸ%RL(N, nn.B@^"o** ] QїhrFrEg+X D.U-b=keq]TP4bZe~eѡǩ4= 8Ҙ\Fl;e40'(qPUHn{ѦF?~1PG9\S;././@PaxHeader0000000000000000000000000000022200000000000010211 xustar00119 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력.rst 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/6.???/?? ?? ??? ?? ??.rst0000644000175100001770000002132614676242340021602 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 그리고 심화 출력 – 버튼 ==================================== KEYDOWN이 사용되었지만, 아직도 이 게임이 완전한 GUI가 아닌 것처럼 보이는 이유는 GUI가 입력은 없고 오직 출력(프린트)하는 데에만 사용되었기 때문이다. GUI에서의 입력이란 특정한 위치에서의 마우스 이벤트를 처리하는 것이다. HP를 증가시키거나 감소시키는 버튼 2개를 만드는 것은 어떨까? .. image:: AdvancedInputOutput1.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 버튼 2개를 만드는 것은 쉽다. 버튼을 보면, 뭔가 특이한 효과가 적용되어 있음을 알 수 있다. 어떻게 한 것인가? 이전의 아이디어처럼 단순하다. 첫째, 큰 정사각형을 그린다. 둘째, 내용은 없고 두께만 있는 작은 정사각형을 그린다. 하지만 이 버튼들은 아직 출력용이다. 이 버튼들을 위한 클릭 가능 공간을 만들어야 한다. .. image:: AdvancedInputOutput3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput4.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput5.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 이제 Event문에 MOUSEBUTTONUP이 추가되었다. 마우스가 UP 된 것은 키보드가 DOWN된 것과 동일한 의미를 가진다. 만약 MOUSEBUTTONUP이 활성화되면, event.pos는 x값과 y값을 기록해야 하는데, 이 것은 클릭 지점을 나타낸다. 그러므로, 클릭이 특정 정사각형 내부에서 일어났는지 아닌 지는 collidepoint를 확인하면 된다. 만약 내부였다면, “사용자가 특정 영역 내부를 클릭했다”를 의미하게 된다. 그 다음, 변수를 업데이트하는 적절한 처리만이 필요하게 된다. 입력을 위한 두 변수가 존재하고, (Event문에 있음) (270, 425, 45, 45)와 (325, 425, 45, 45). 출력을 위한 두 변수도 존재함을 확인하라. (drawButtons에 있음) (margin, height - r -10 , r, r)과 (margin + r + r_margin, height - r - 10, r, r). 버튼의 경우, 입력 영역과 출력 영역이 동일해야 한다. 그렇지 않다면, 버튼의 판정 범위는 오해의 소지가 될 수 있다! 변수(출력 용)들을 구체적인 계산을 통해 상수(입력 용) 값을 알아내기 싫다면, 이 변수들을 동일한 변수로 두는 것이 좋은 생각일 것이다. 두 영역을 하나로 묶을 수 있는 함수는 없으므로, 이 점은 항상 신경 써야 한다. <참고 코드> :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000015100000000000010212 xustar0077 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/7.게임판/ 28 mtime=1727612190.0451257 pygame-2.6.1/docs/reST/tut/ko/???? ????/7.???/0000755000175100001770000000000014676242436017307 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/7.게임판/AdvancedOutputAlpha1.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/7.???/AdvancedOutputAlpha1.gif0000644000175100001770000003510314676242340023747 0ustar00runnerdockerGIF89aa*p! NETSCAPE2.0!,a*w0I8ͻ`(dihlp,3lx|pH,ZjƤrl:ШtJ ؕ rx</ڧ^d 2A 1m {*uw`|0 \( &i%X&*Ճ0`5HgG^–A4z/ ӥo3jȤX=>g 82ɕ^.h*(aPf**0X]`REJtS/NN{}8Kv BӀ̔.MܻxMt;oN1!JQæ[Y-cƐY%X`-+˹g:k-8 ;ι`Ԫcm 5յ [6lYr螺s;aăУKwPi3ƭWڧN.^xx{:DU]h$}$M3)(K8q n(}PbNmx~Ar\i!n\$M_08΀ c}#vKad3ˇXf-JXf ]G6lIP)zG.iߜiؓ!R$$`%.j)蠜pyu]uRhdg]lj)`FbLr]uˇuVXk5)jAwwݺ.Q%Ᵽ'be+)eTb?WjQxdH%j>6_A(+4NkO< [հV!%JO&r,"\gׂ 0H7U&l /tq>$S(r+0K!gRQp83D DZ3LPtC/ާ~U׼ZwI?5HmL:8k 'HIPm*J-30h4*D&MJQJѽFkUz!4P:*Mv$: ` O0)lad "*{DyDy)-} T1sa8#.~CiRwkodHQL@7a*Sy:r!ӗXH&e2 e6YorWyav"Ҭ&pi6/pPr 8IMjgD9s5=AOW~}Tu*'19-6oNIPGCY=ݑY:W[thfʸ&tGPuSvpM΍Yӥ57{N4u^{UMok,#ftSLw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5A_c?9U]5{|חE?b? g~SQ|hi xyD~7k57v,_.sWW|68~<(!];WDDBE5hJxK37zlFaDU&[c\h4|awWdXNp}v8Gdh%hVt!9.Ry6z;e yRW`4n7Z<ȆF%Zz`t燉~Z98F9U5{yywFWcYXPĈIh"]gٟ_' Jr4ʛ% D<Оd.HHX~I i:G_!:@z{VZ (xZY^]b:a:fezcjlڦ[;././@PaxHeader0000000000000000000000000000020100000000000010206 xustar00102 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/7.게임판/AdvancedOutputAlpha2.gif 27 mtime=1727612127.992112 pygame-2.6.1/docs/reST/tut/ko/???? ????/7.???/AdvancedOutputAlpha2.gif0000644000175100001770000021421314676242340023751 0ustar00runnerdockerGIF89ap! NETSCAPE2.0!,{{{{111kkksRkkkcRkZkRZ:ZZ挌RR111skR1:!R:!!R:ZZ):){ZkZZsRZZ:RRZZc:ckRkZc1R:νZkR!)ZRsZRZZZ歭RZZZZ:ZRZZZZ歄)cR1R)cRRccRR1J)Z1ZscckZZR:R:s!RZZZZBsZJZ11:csR)c:)挌R)k){B:挌RkέέZZZZ{ΌZZZZ))ZΜΌZ)){)1Z)11{攭1Bk޽޽csB:)k)k)歭R)Z)Z)k)s)R)c:)Jk歭R)Z)Zk)s)R1)c:Jk浥֔sνsB1)sc:ŭ{s1{{s1!1{{s{H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ Jѣ%C@&JJիXC3ӦyE.ٳhӪ][ܼa"u  X˷߿A "2ðND\ Aǐ#KjBE˖U`ѹD=L5@DSɰc˞A#40Xn ,6hХKvHA\(p0MO3 #4F^Ͼ=CI@%BK}Ix"`^ FABiCEi "P;)K- `BpaBFދ0Ƹ_e(Q@T|Cn ׇ)?%! y^DFs"˓ wLA h晲cH鶦C&2lr@h! tB;Ӽ3P0 tLSdЃ@ &t%;p0"De'0A]dDaB\%L1 B *`![|,6'\'d°z^bb{ǰ7NՎ'DHe8Cc9kPp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`Z&]l@/,>*<;Жv}igvM k0jReeꙹѼuWR&1 ӇԜtEo\К2 \ . /W13HMDbIVmawgΜ淭mY94| kNs;ys.s(X1 ~HWҍt7]o!;~Z5'\&tZ޷nm2(ںz镰pw_={{5֊;m' P<C>gYmc1q->ouWlSIX D|$@W_g}`-vRP|VzOraGg]VtcwJ%ۻOb3Jr C cr3  D5C+=+C{۲ width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputAlpha2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputAlpha3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() generateboard 함수는 무작위로 만들어진 2차원 배열과 빨간 블록, 검은 블록의 개수를 반환한다. 더 설명할 필요도 없다. 또한, printboard 함수는 1차원 배열처럼 2차원 배열을 출력한다. 출력 색상은 board[i][j]가 1인지 아닌 지에 따라 달라진다. 이 게임판은 단순히 출력 용이다. 테두리를 처리하려면 부분의 크기를 가지고 전체 크기를 계산해야 해서 짜증날 수 있다. 이것은 프롤로그에서 언급한 대로, 파이게임 갖는 특성 (실행 결과는 GUI이지만 코드 작성은 CUI) 때문이다. 사실, 이 구현한 게임은 개선의 여지가 많다. 버튼을 이미지 파일로 바꾸면? 정답이거나 오답일 때 효과음을 넣으면? 시간 제한을 넣으면? 정답이거나 오답일 때 시각적 효과를 넣으면? 게임판을 더 크게 하고 색상을 더 다양히 넣는다면? 이 인터페이스를 가지고 Flood-it을 구현한다면? 구현한 게임이 단순하기 때문에 선택지는 많다. <참고 코드> :: import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000015400000000000010215 xustar0080 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/8.에필로그/ 28 mtime=1727612190.0451257 pygame-2.6.1/docs/reST/tut/ko/???? ????/8.????/0000755000175100001770000000000014676242436017407 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000017400000000000010217 xustar0096 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/8.에필로그/에필로그.rst 28 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/ko/???? ????/8.????/????.rst0000644000175100001770000000423314676242340020610 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 에필로그 ==================================== 그러나, 튜토리얼은 여기에서 끝이 난다. 이 튜토리얼은 파이게임의 극소수만을 다뤘다. 하지만 걱정하지 마라. 프로그램은 사람이 할 수 있는 가장 창의적인 활동이다. 임마누엘 칸트는 “천재성이란 어떤 대상에 규칙을 부여할 수 있는 능력이다”라고 말했다. 프로그래밍은 규칙을 만들어서 컴퓨터에게 입력시키는 것이다. 규칙이 만들어진다면, 컴퓨터는 규칙 내에서 무엇이든지 할 수 있다. 그러므로, 경우의 수가 매우 커지게 된다. 결론이 무엇인가? 출력이 입력보다 크다는 것이다. 우리는 우리의 지식만으로 지식보다 더 폭넓은 프로그램을 구현할 수 있다. 또는 우리는 새로운 지식을 기존의 지식에 연결시키면서 습득할 수도 있다. 그것이 프로그래밍의 특성이다. 게임도 마찬가지이다. “난수”라는 개념은 모든 게임(이미 구현한 게임도 포함!)에서 대단히 중요한 개념이다. 난수까지 고려되었을 때 경우의 수는 매우 커지게 된다. 만약 하나의 난수가 다른 난수까지 영향을 미치게 된다면, “눈사태”와 같은 효과가 나게 된다. 그것이 게임이 흥미로운 이유이다. “난수”라는 개념은 소설, 음악, 영화 등은 가질 수 없는 게임만의 특성이다. 테트리스를 생각해 보아라. 알렉세이 파지트노프가 테트리스를 위해 얼만큼의 시간을 투자했을까? 이 시간이 35년 넘게 전세계 사람들이 플레이 한 시간보다 클까? 이것이 바로 프로그래밍과 게임이 갖는 두 특성이 완벽히 발휘된 예시이다. 그러므로, 게임을 만드는 것은 눈사태를 일으키는 것과 같다. 이제 아무 게임이나 만들 시간이다! 배우고, 활용하고, 시행 착오를 겪어 보자! ././@PaxHeader0000000000000000000000000000014700000000000010217 xustar0075 path=pygame-2.6.1/docs/reST/tut/ko/빨간블록 검은블록/개요.rst 28 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/ko/???? ????/??.rst0000644000175100001770000000123314676242340017566 0ustar00runnerdocker한국어 튜토리얼 ============================= 한국어 튜토리얼 ----------------------------- | :doc:`1 부 <1.프롤로그/소개>` 프롤로그/소개 :doc:`2 부 <2.텍스트 출력/기초 템플릿과 출력>` 텍스트 출력 :doc:`3 부 <3.텍스트 이동/기초 처리>` 텍스트 이동 :doc:`4 부 <4.텍스트 조종/기초 입력>` 텍스트 조종 :doc:`5 부 <5.HP바/심화 출력 그리고 심화 처리>` HP바 :doc:`6 부 <6.버튼들/심화 입력 그리고 심화 출력>` 버튼들 :doc:`7 부 <7.게임판/심화 출력 그리고 조금 더>` 게임판 :doc:`8 부 <8.에필로그/에필로그>` 에필로그././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/newbieguide.rst0000644000175100001770000006020014676242340020057 0ustar00runnerdocker.. TUTORIAL: David Clark's Newbie Guide To Pygame .. include:: common.txt ************************** Newbie Guide to Pygame ************************** .. title:: A Newbie Guide to pygame A Newbie Guide to pygame ======================== or **Things I learned by trial and error so you don't have to,** or **How I learned to stop worrying and love the blit.** Pygame_ is a python wrapper for SDL_, written by Pete Shinners. What this means is that, using pygame, you can write games or other multimedia applications in Python that will run unaltered on any of SDL's supported platforms (Windows, Linux, Mac, and others). Pygame may be easy to learn, but the world of graphics programming can be pretty confusing to the newcomer. I wrote this to try to distill the practical knowledge I've gained over the past year or so of working with pygame, and its predecessor, PySDL. I've tried to rank these suggestions in order of importance, but how relevant any particular hint is will depend on your own background and the details of your project. Get comfortable working in Python. ---------------------------------- The most important thing is to feel confident using python. Learning something as potentially complicated as graphics programming will be a real chore if you're also unfamiliar with the language you're using. Write a few sizable non-graphical programs in python -- parse some text files, write a guessing game or a journal-entry program or something. Get comfortable with string and list manipulation -- know how to split, slice and combine strings and lists. Know how ``import`` works -- try writing a program that is spread across several source files. Write your own functions, and practice manipulating numbers and characters; know how to convert between the two. Get to the point where the syntax for using lists and dictionaries is second-nature -- you don't want to have to run to the documentation every time you need to slice a list or sort a set of keys. Get comfortable using file paths -- this will come in handy later when you start loading assets and creating save files. Resist the temptation to ask for direct help online when you run into trouble. Instead, fire up the interpreter and play with the problem for a few hours, or use print statements and debugging tools to find out what's going wrong in your code. Get into the habit of looking things up in the official `Python documentation`_, and Googling error messages to figure out what they mean. This may sound incredibly dull, but the confidence you'll gain through your familiarity with python will work wonders when it comes time to write your game. The time you spend making python code second-nature will be nothing compared to the time you'll save when you're writing real code. Recognize which parts of pygame you really need. ------------------------------------------------ Looking at the jumble of classes at the top of the pygame documentation index may be confusing. The important thing is to realize that you can do a great deal with only a tiny subset of functions. Many classes you'll probably never use -- in a year, I haven't touched the ``Channel``, ``Joystick``, ``cursors``, ``surfarray`` or ``version`` functions. Know what a surface is. ----------------------- The most important part of pygame is the surface. Just think of a surface as a blank piece of paper. You can do a lot of things with a surface -- you can draw lines on it, fill parts of it with color, copy images to and from it, and set or read individual pixel colors on it. A surface can be any size (within reason) and you can have as many of them as you like (again, within reason). One surface is special -- the one you create with :func:`pygame.display.set_mode()`. This 'display surface' represents the screen; whatever you do to it will appear on the user's screen. So how do you create surfaces? As mentioned above, you create the special 'display surface' with ``pygame.display.set_mode()``. You can create a surface that contains an image by using :func:`pygame.image.load()`, or you can make a surface that contains text with :func:`pygame.font.Font.render()`. You can even create a surface that contains nothing at all with :func:`pygame.Surface()`. Most of the surface functions are not critical. Just learn :meth:`.Surface.blit()`, :meth:`.Surface.fill()`, :meth:`.Surface.set_at()` and :meth:`.Surface.get_at()`, and you'll be fine. Use Surface.convert(). ---------------------- When I first read the documentation for :meth:`.Surface.convert()`, I didn't think it was something I had to worry about. 'I only use PNGs, therefore everything I do will be in the same format. So I don't need ``convert()``';. It turns out I was very, very wrong. The 'format' that ``convert()`` refers to isn't the *file* format (i.e. PNG, JPEG, GIF), it's what's called the 'pixel format'. This refers to the particular way that a surface records individual colors in a specific pixel. If the surface format isn't the same as the display format, SDL will have to convert it on-the-fly for every blit -- a fairly time-consuming process. Don't worry too much about the explanation; just note that ``convert()`` is necessary if you want to get any kind of speed out of your blits. How do you use convert? Just call it after creating a surface with the :func:`.image.load()` function. Instead of just doing:: surface = pygame.image.load('foo.png') Do:: surface = pygame.image.load('foo.png').convert() It's that easy. You just need to call it once per surface, when you load an image off the disk. You'll be pleased with the results; I see about a 6x increase in blitting speed by calling ``convert()``. The only times you don't want to use ``convert()`` is when you really need to have absolute control over an image's internal format -- say you were writing an image conversion program or something, and you needed to ensure that the output file had the same pixel format as the input file. If you're writing a game, you need speed. Use ``convert()``. Be wary of outdated, obsolete, and optional advice. --------------------------------------------------- Pygame has been around since the early 2000s, and a lot has changed since then -- both within the framework itself and within the broader computing landscape as a whole. Make sure to check the dates on materials you read (including this guide!), and take older advice with a grain of salt. Here are some common things that stick out to me: **Dirty Rects & performance 'tricks'** When you read older bits of pygame documentation or guides online, you may see some emphasis on only updating portions of the screen that are dirty, for the sake of performance (in this context, "dirty" means the region has changed since the previous frame was drawn). Generally this entails calling :func:`pygame.display.update()` (with a list of rects) instead of :func:`pygame.display.flip()`, not having scrolling backgrounds, or even not filling the screen with a background color every frame because pygame supposedly can't handle it. Some of pygame's API is designed to support this paradigm as well (e.g. :func:`pygame.sprite.RenderUpdates`), which made a lot of sense in the early years of pygame. In the present day (2022) though, most modest desktop computers are powerful enough to refresh the entire display once per frame at 60 FPS and beyond. You can have a moving camera, or dynamic backgrounds and your game should run totally fine at 60 FPS. CPUs are more powerful nowadays, and you can use ``display.flip()`` without fear. That being said there are still some times when this old technique is still useful for squeezing out a few extra FPS. For example, with a single screen game like an Asteroids or Space Invaders. Here is the rough process for how it works: Instead of updating the whole screen every frame, only the parts that changed since the last frame are updated. You do this by keeping track of those rectangles in a list, then calling ``update(the_dirty_rectangles)`` at the end of the frame. In detail for a moving sprite: * Blit a piece of the background over the sprite's current location, erasing it. * Append the sprite's current location rectangle to a list called dirty_rects. * Move the sprite. * Draw the sprite at its new location. * Append the sprite's new location to my dirty_rects list. * Call ``display.update(dirty_rects)`` Even though this technique is not required for making performant 2D games with modern CPUs, it is still useful to be aware of. There are also still plenty of other ways to accidentally tank your game's performance with poorly optimized rendering logic. For example, even on modern hardware it's probably too slow to call ``set_at`` once per pixel on the display surface. Being mindful of performance is still something you'll have to do. There just aren't that many 'one neat trick to fix your code performance' tips. Every game is different and there are different problems and different algorithms to solve them efficiently in each type of game. Pretty much every time your 2D game code is failing to hit a reasonable frame rate the underlying cause turns out to be bad algorithm or a misunderstanding of fundamental game design patterns. If you are having performance problems, first make sure you aren't loading files repeatedly in your game loop, then use one of the many options for profiling your code to find out what is taking up the most time. Once you are armed with at least some knowledge on why your game is slow, try asking the internet (via google), or the pygame community if they've got some better algorithms to help you out. **HWSURFACE and DOUBLEBUF** The HWSURFACE :func:`.display.set_mode()` flag does nothing in pygame versions 2.0.0 and later (you can check the docs if you don't believe me)! There's no reason to use it anymore. Even in pygame 1, its effect is pretty nuanced and generally misunderstood by most pygame users. It was never a magic speed-up flag, unfortunately. DOUBLEBUF still has some use, but is also not a magic speed up flag. **The Sprite class** You don't need to use the built-in :class:`.Sprite` or :class:`.Group` classes if you don't want to. In a lot of tutorials, it may seem like ``Sprite`` is the fundamental "GameObject" of pygame, from which all other objects must derive, but in reality it's pretty much just a wrapper around a ``Rect`` and a ``Surface``, with some additional convenience methods. You may find it more intuitive (and fun) to write your game's core logic and classes from scratch. There is NO rule six. --------------------- Don't get distracted by side issues. ------------------------------------ Sometimes, new game programmers spend too much time worrying about issues that aren't really critical to their game's success. The desire to get secondary issues 'right' is understandable, but early in the process of creating a game, you cannot even know what the important questions are, let alone what answers you should choose. The result can be a lot of needless prevarication. For example, consider the question of how to organize your graphics files. Should each frame have its own graphics file, or each sprite? Perhaps all the graphics should be zipped up into one archive? A great deal of time has been wasted on a lot of projects, asking these questions on mailing lists, debating the answers, profiling, etc, etc. This is a secondary issue; any time spent discussing it should have been spent coding the actual game. The insight here is that it is far better to have a 'pretty good' solution that was actually implemented, than a perfect solution that you never got around to writing. Rects are your friends. ----------------------- Pete Shinners' wrapper may have cool alpha effects and fast blitting speeds, but I have to admit my favorite part of pygame is the lowly :class:`.Rect` class. A rect is simply a rectangle -- defined only by the position of its top left corner, its width, and its height. Many pygame functions take rects as arguments, and they also take 'rectstyles', a sequence that has the same values as a rect. So if I need a rectangle that defines the area between 10, 20 and 40, 50, I can do any of the following:: rect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30)) If you use any of the first three versions, however, you get access to Rect's utility functions. These include functions to move, shrink and inflate rects, find the union of two rects, and a variety of collision-detection functions. For example, suppose I'd like to get a list of all the sprites that contain a point (x, y) -- maybe the player clicked there, or maybe that's the current location of a bullet. It's simple if each sprite has a .rect member -- I just do:: sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)] Rects have no other relation to surfaces or graphics functions, other than the fact that you can use them as arguments. You can also use them in places that have nothing to do with graphics, but still need to be defined as rectangles. Every project I discover a few new places to use rects where I never thought I'd need them. Don't bother with pixel-perfect collision detection. ---------------------------------------------------- So you've got your sprites moving around, and you need to know whether or not they're bumping into one another. It's tempting to write something like the following: * Check to see if the rects are in collision. If they aren't, ignore them. * For each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision. Managing the event subsystem. ----------------------------- Pygame's event system is kind of tricky. There are actually two different ways to find out what an input device (keyboard, mouse or joystick) is doing. The first is by directly checking the state of the device. You do this by calling, say, :func:`pygame.mouse.get_pos()` or :func:`pygame.key.get_pressed()`. This will tell you the state of that device *at the moment you call the function.* The second method uses the SDL event queue. This queue is a list of events -- events are added to the list as they're detected, and they're deleted from the queue as they're read off. There are advantages and disadvantages to each system. State-checking (system 1) gives you precision -- you know exactly when a given input was made -- if ``mouse.get_pressed([0])`` is 1, that means that the left mouse button is down *right at this moment*. The event queue merely reports that the mouse was down at some time in the past; if you check the queue fairly often, that can be ok, but if you're delayed from checking it by other code, input latency can grow. Another advantage of the state-checking system is that it detects "chording" easily; that is, several states at the same time. If you want to know whether the ``t`` and ``f`` keys are down at the same time, just check:: if key.get_pressed[K_t] and key.get_pressed[K_f]: print("Yup!") In the queue system, however, each keypress arrives in the queue as a completely separate event, so you'd need to remember that the ``t`` key was down, and hadn't come up yet, while checking for the ``f`` key. A little more complicated. The state system has one great weakness, however. It only reports what the state of the device is at the moment it's called; if the user hits a mouse button then releases it just before a call to ``mouse.get_pressed()``, the mouse button will return 0 -- ``get_pressed()`` missed the mouse button press completely. The two events, ``MOUSEBUTTONDOWN`` and ``MOUSEBUTTONUP``, will still be sitting in the event queue, however, waiting to be retrieved and processed. The lesson is: choose the system that meets your requirements. If you don't have much going on in your loop -- say you're just sitting in a ``while True`` loop, waiting for input, use ``get_pressed()`` or another state function; the latency will be lower. On the other hand, if every keypress is crucial, but latency isn't as important -- say your user is typing something in an editbox, use the event queue. Some key presses may be slightly late, but at least you'll get them all. A note about ``event.poll()`` vs. ``wait()`` -- ``poll()`` may seem better, since it doesn't block your program from doing anything while it's waiting for input -- ``wait()`` suspends the program until an event is received. However, ``poll()`` will consume 100% of available CPU time while it runs, and it will fill the event queue with ``NOEVENTS``. Use ``set_blocked()`` to select just those event types you're interested in -- your queue will be much more manageable. Another note about the event queue -- even if you don't want to use it, you must still clear it periodically because it's still going to be filling up with events in the background as the user presses keys and mouses over the window. On Windows, if your game goes too long without clearing the queue, the operating system will think it has frozen and show a "The application is not responding" message. Iterating over ``event.get()`` or simply calling ``event.clear()`` once per frame will avoid this. Colorkey vs. Alpha. ------------------- There's a lot of confusion around these two techniques, and much of it comes from the terminology used. 'Colorkey blitting' involves telling pygame that all pixels of a certain color in a certain image are transparent instead of whatever color they happen to be. These transparent pixels are not blitted when the rest of the image is blitted, and so don't obscure the background. This is how we make sprites that aren't rectangular in shape. Simply call :meth:`.Surface.set_colorkey()`, and pass in an RGB tuple -- say (0,0,0). This would make every pixel in the source image transparent instead of black. 'Alpha' is different, and it comes in two flavors. 'Image alpha' applies to the whole image, and is probably what you want. Properly known as 'translucency', alpha causes each pixel in the source image to be only *partially* opaque. For example, if you set a surface's alpha to 192 and then blitted it onto a background, 3/4 of each pixel's color would come from the source image, and 1/4 from the background. Alpha is measured from 255 to 0, where 0 is completely transparent, and 255 is completely opaque. Note that colorkey and alpha blitting can be combined -- this produces an image that is fully transparent in some spots, and semi-transparent in others. 'Per-pixel alpha' is the other flavor of alpha, and it's more complicated. Basically, each pixel in the source image has its own alpha value, from 0 to 255. Each pixel, therefore, can have a different opacity when blitted onto a background. This type of alpha can't be mixed with colorkey blitting, and it overrides per-image alpha. Per-pixel alpha is rarely used in games, and to use it you have to save your source image in a graphic editor with a special *alpha channel*. It's complicated -- don't use it yet. Software architecture, design patterns, and games. -------------------------------------------------- You may reach a point where you're comfortable writing code, you're able to solve complex problems without assistance, you understand how to use most of pygame's modules, and yet, as you work on larger projects they always seem to get messier and harder to maintain as time goes on. This can manifest in many ways -- for example, fixing bugs in one place might always seem to create new bugs elsewhere, figuring out *where* code should go might become a challenge, adding new things might frequently require you to rewrite many other things, and so on. Finally, you decide to cut your losses and start fresh on something new. This is a common issue and it can be frustrating -- on the one hand, your programming skills are improving, and yet you aren't able to finish the games you start due to somewhat nebulous organizational problems. This brings us to the concept of software architecture and design patterns. You may be familiar with pygame's "standard" base template (there are many equivalent variations of this, so don't stress about the small details too much):: import pygame pygame.init() screen = pygame.display.set_mode((1280,720)) clock = pygame.time.Clock() while True: # Process player inputs. for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() raise SystemExit # Do logical updates here. # ... screen.fill("purple") # Fill the display with a solid color # Render the graphics here. # ... pygame.display.flip() # Refresh on-screen display clock.tick(60) # wait until next frame (at 60 FPS) It does some initial setup, starts a loop, and then proceeds to repeatedly collect input, handle the game's logic, and draw the current frame forever until the program ends. The update, render, wait loop shown here is actually a design pattern that serves as the skeleton of most games -- it's prolific because it's clean, it's organized, and it works. (There's also an important but easy-to-miss design feature here in the form of a strict division between the game's logic and rendering routines. This decision alone prevents a whole category of potential bugs related to objects updating and rendering concurrently, which is nice). It turns out that there are many design patterns like this that are used frequently in games and in software development at large. For a great resource on this specifically for games, I highly recommend `Game Programming Patterns`_, a short free, e-book on the topic. It covers a bunch of useful patterns and concrete situations where you might want to employ them. It won't instantly make you a better coder, but learning some theory about software architecture can go a long way towards helping you escape plateaus and tackle larger projects more confidently. Do things the pythony way. -------------------------- A final note (this isn't the least important one; it just comes at the end). Pygame is a pretty lightweight wrapper around SDL, which is in turn a pretty lightweight wrapper around your native OS graphics calls. Chances are pretty good that if your code is still slow, and you've done the things I've mentioned above, then the problem lies in the way you're addressing your data in python. Certain idioms are just going to be slow in python no matter what you do. Luckily, python is a very clear language -- if a piece of code looks awkward or unwieldy, chances are its speed can be improved, too. Read over `Why Pygame is Slow`_ for some deeper insight into why pygame might be considered slower than other frameworks/engines, and what that actually means in practice. And if you're truly stumped by performance problems, profilers like cProfile_ (or SnakeViz_, a visualizer for cProfile) can help identify bottlenecks (they'll tell you which parts of the code are taking the longest to execute). That said, premature optimisation is the root of all evil; if it's already fast enough, don't torture the code trying to make it faster. If it's fast enough, let it be :) There you go. Now you know practically everything I know about using pygame. Now, go write that game! ---- *David Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game.* *This guide was substantially updated in 2022.* .. _Pygame: https://www.pygame.org/ .. _SDL: http://libsdl.org .. _Python documentation: https://docs.python.org/3/ .. _Game Programming Patterns: https://gameprogrammingpatterns.com/contents.html .. _Why Pygame is Slow: https://blubberquark.tumblr.com/post/630054903238262784/why-pygame-is-slow .. _cProfile: https://docs.python.org/3/library/profile.html .. _SnakeViz: https://jiffyclub.github.io/snakeviz/././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/surfarray.png0000644000175100001770000014322414676242340017572 0ustar00runnerdockerPNG  IHDR1 pHYs  IDATxdeYr2ZMj333   D#{!=AP(!D=$Ax`{/_uۮ2aj·[Ε?HB0tō_ٿTUOΫ'yW&cmU%}C<5Vg|{O쓟}ԋj(lǻx:-c4 . ZŪ^,h-FQ΅ӪxPo`oo_7~u^}0D>4eIٔuS9y?O/7o|oz_]~:|(c zYlGb4z`{+76/ܸj??_yw_y}q"0;>ywy{vLs|L "FqlGMU%i􍧟~;?|7R74dz&4H\T+(iZSO=U~>Hl\',oݺ~LM% fbf"` zסmguZBij(''o|.\雏0_9AT*%B$xOUĦ.XUl AUggggy=kcaCA4y 30-Vl6GMے5Mݶ&,wΡ gbmѣGE]c66`u:3Ƙá Xf2c9IQ5l^SUxiӐ:"zilK6z *u'6oa|TZf{Cz붩]jcc۪$7I'aڹ[nF3TA (DYi?M'gOC._}|pzۋjU&3޸xaPYuE!D{_K?VNw63`Dd DUc!Ʊ1ĉMoLڷ;Y/VmO~_}~?.n Ӻu fVDU͍^'+.]~"&7Rj%jo6I Ǔhضm6m+B@hRcܻzO?}6fUbnlmXDbRHš]J|KU=lO ˵6A4j/Fڇfb^8FN7C"uZ-#R 2ϊY EQJUF0mY2'|T·?"X "($guéj=Xlu],׳SE ư6un89`Z(އz5 rek7qƝݯշݽ$1BXE$K3޷:U`m6}{?L66?Ϊ:qnAZv}xkR6M@Q M^Q6߂d~އv7a>L%ѦGc&.O3hM [:8z԰NGh|6?sk PE]W!uSZ͛ HӴm@ػt_K{,d.78NF#ٌ˳^!0HL>cM6^8mBYxWrޮ iD6zb%1bvRU)jj^mSYo3ネ]sqM'xugG%1"2pfUYfnܟnlL('%yJ ڶ29(Ozm޷m*DW<.UՔlpv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000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/surfarray_allblack.png0000644000175100001770000000017514676242340021414 0ustar00runnerdockerPNG  IHDRL\DIDATx cuIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/surfarray_flipped.png0000644000175100001770000014322314676242340021274 0ustar00runnerdockerPNG  IHDR1 IDATx|דnu[k}—;&f3 ( RU-L"We0]*\.E @!`07t/Z~wHTWNX{kዿw4 p` PC`0A  Pus !6 3x. 3.1Zh )Ds d za9w>?[>Q@ Hd@tIx ("D1|9a@@{Rz0PZO;.>c,D-Qh>\xiE\:_3%ϥ&+gO`O vz gBx˞g 1|z/˜OPpdԲB!"8eIѰ)D4K/H*_3 #>~ Cw2=fKԕ%oO`}<*_㱈|!jA3>)z*KOKr]Z]@ JP6Հ'd L}r>It@ˢDg5@P9`3\H C  Df _4OF 0))Q\g132 E}`3L9ti}/Qb<6* .LQ \y#g?Ywfu! j'D0tޜgHtN97-D -C(}"|ey>29s]Du)%iPO`yRbz _O9֋΅J<:.ؘ=b8ZcO[;9W'%%(/BeB GP̅o L\I@b%1eF4z1zx̒s]DLPtdAzOrze3^ |!_@+I͓Y?S<~fi51\ r32_0#]Po?K`)ߊWIq=Cq>x>e,2w9 %Yb19%$e6Q  -X<]F_J8^H0.rGDPK*Jxkɯϡ)][=} &Qr& LB/cNZ$Dd8 R0dx PeI/I,8穉!Hs;,"֋t^jV5UH@ PTRQR -,"Dۏdޑm !E^QK$dD~S0DHBr "ìA1HY׆ƤYhaTT a22!NT d(@P"2iHDdXH-A%0B4!!%cRJ6HNcmJ²pDJbYK@[PNIfN))C$.,aP1ETZ$U%f!bZ,1K2%`D &b5L"nY`f$D&J\D0/ |6H)s4Ψ6p|zR%NeXeٟMwu!误l00G!j6ٝ?4flgDuUUn{ʕ)b?tPl e v8hpܷ?$i?O6&XTɒaٴLǾׅ+/6yڬ[t5DH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;oU.ptrR#eX/?e!om0\Nab܈$Crb13g{5nwMэ˗7קÃhiU6 ?ͮᖰX@ P PHAHzse DEDjTq]lLJV+g= @J! "QB&I#3TB(cd$ILU{xW2ʠ"a!H`f$=<I )TI)Y#9*F0d,, GA%Rت$frJl9 , Uұ592J0 ܓPIDATw *KlR2Ƶ"J)bPz<ܚ! F4DmAё(:EJJ"Գ#7F#W ,%ީ *5pb 6I(+iM}0T @Xb,§X*}1LF su2PS7R{<@Ԯr"9 YB|O>C-ʥ}Jl*}OTh6J`!rI RJ&ҳ`IG#[y0 J_m) CaBÜn8:}{, "wN-mb=둫 si 8EпkFPTRZaNCUa Qxc%fmi9H ഺ9>i`'ϋE U )υxYVU^V)+;U@UHqyi8m&)+Sp* 0=CJ>m ~é{꫞ -YAJ;•|\]DXoQ:}y[/z'j }tОs*PZz$<^>Gjxi[\|~ST@>:_:mo^Oy&>}%s IlV"&a ݪ- mZJ`@oLh9fũSu^]UW> ݫO*kѳjID&Uԯ箾=əU@jxR@tDWc?'*(>Q9u=yE"XB* =u@+-yҢsӇs_SK>JΩV}a}f)WM-tzЧ ) 1 ]Y_?I珳+w¾̞qsT^Oku;ajgSJz\sNa3X"rۆ@?>;>xviu/qpz1itSQG@\qBrtyQX1j(@)d_4D۞y:g7r0|B1Ozj"|Jq^znl|g,i[sU8wau] zr ~k؟;ENKWΓ|N>U'[QB  (EE/םyVs?ad46ITI2=}תy%P]9ǫE!;}YgzpOOVKp[<ߜq]bΛ(^'G ]vׯYz MgM(#@ˆ&3CVO4OωZڻgC{G4})IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/reST/tut/surfarray_scaledown.png0000644000175100001770000003540514676242340021632 0ustar00runnerdockerPNG  IHDRd@cE# IDATxDWy.|?kަkF4꒛{mlSCO$81! &mqlY-Y}﷮ 8<"`{cCQy X uOMgK?T3#gN^rCλǿ쭟!W,sk܊$k< X&Q;T?w7|?r,IOX[}wS?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Z]6|C#Ljr-ԞlygrD\rFd(6~v:XXֻa{Pw9ayg{ONpy,siH[dZEdojz|v}Ϗ9'm!=8_`ўE-_ ^5Lr;vt|z6$Plma9??lh|U Eږb3A/,l0Z5:}|T^ŶUEqdRpXA[&eq״3sTuY}Y\{&G;ϯ|{8s0;_χiյvOڝP(L$秓9-liX \騸"nP*tιx=Y]1m>~OvFIlD-9&-Jn\!_pZ׏(vU2^_}Iң'6F@UOeL8CL~'\JEჟp5?[3Xύ9Tɀx4RuW3gW7az=rlA[w;s૬vQe^\+Ky4 ,ppZQ^'OWE ,[1`X8#fY g?&WS3?jpx|?$)?81ԐIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/surfarray_scaleup.png0000644000175100001770000020425714676242340021312 0ustar00runnerdockerPNG  IHDR IDATx%_,w7ڷ^9$CJ3̈cmKMAd`0 }2l2 [`dYZ<,J"3l&=76xodm !+Y7"n=<牚mwʯ*/~O |x*u^"hI eSX78Oq~1  S|?/Od~]d+Lޟcf' EQ *4 :ue,7l2I8:í{1;Yaq/%ۻx;='?ß{.·O,*$u(D2x0D2_"WD"WG5st{>bkwηpW[ܹo|_"7=A>_bg{ryQJ].e%n~:M~Ifko_w;?|o|۸8:j9E7pp7n '5^ rJG8:|~ygIGx'K?}d=}pɠPnnrtcbJMhMb0t:C3@5:xz 2CK%pcgz7mz( N2p*!a0a``{S<|{Xs Tp1=k뺮Ty~E巛F'I| oO~o]S4?Ɲ}$QxC]ȳH>hb,V{l^{ Y6h0F7a:{c4Mrx-c5ϑ߹hNq~6brBQՈ(8Ѳ]aϗW_wś{ OW{N0?)Q&Qa]@@Q)ѮFweX V9zQ{{89? ƭ{.ObuCivoowϿe<|>|Yb]A/<]'Cb..N+T;[&<'x1(A$/vpZH[]dRG^/[%<pFB؜`^!P%)Oxqz~ӳ3|{ZδX飏>+ [^ Rhq /M`-1BQQKgvnbg{w_t>8BY64P {c(PLF[Xd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tIsUe_ 'nc p HH$M1KVQɪVս/%d:qb7[QmLr 9UsfD0LXR =rS]_t*l9!9Ou~WgӢ՝wP)ٹ(Ʒ71Wd6w!=9꺘ܯa}X}O?EsQPD0 28*"̞, GSq !hd'530 ɡ91fα#dfgvLHr7U$gBrγ#"TcH\M8ID "CLMsb%'&bi35UC P "&!PA\N8)vx( ǃ qNחQN=8 |7x J FSmD-:sk9&>D?waҍyQO9I0R: JH?A 3F# ; #D>H#AnCQ:V9I죵"Cp0ԍV[?:ϩ|쌝%lG{ć_7[aGF@Ot?l\!XQS`? D3!-ipF:~4gx;TzGvQ_##FR| '/Zvh4g{i4Ɏ|S蔓8w qruwn8IʿMC'/|uf<]W3W+.~z߇%'׿9M; (R@132WvѕG" p< >cgNL;]}<XzI8)-xhS8&a>Hz;gi\{zypq>GO}k[ز\!f#խ8múp\&p~W<m t4 @0nYIKUu4'Mu}p7XW-zeGAh&qɏyH=j>VOw; l72Mmzk=@9=xίxأo>YpOb#0x|vc2}L#[4ǙОc?O 6'wi>i-4pM@@/0\cIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/surfarray_striped.png0000644000175100001770000000061014676242340021313 0ustar00runnerdockerPNG  IHDRL\OIDATxԱ 1;1T8~7%*AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV^* IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/surfarray_xfade.png0000644000175100001770000012155214676242340020741 0ustar00runnerdockerPNG  IHDR1 IDATxTْ%ɑ%vT7̬Dhts'R>a#B4zQhTBVKDtG$+!!"jG9z3 mů>*ۧ/s\Dxwث+%a'i%qTEKimJ.uU7ާiH 5D//./w^|Ͱ"p.%EMӄZE...TkIE8u?No=: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pm`اĝD.:PQcD-]tQͦRʥ޼{x tB' !؝⪐`caJȍ9< CI\ vafiG"97AraڔU<)v!v"T UTs 5rL"5w"]N8C`SQ8Mwn=qGn4}ƟG{ %\&U͹tm6(N>1k?7.-"lA(:ɍۥׄ#D֮- gE՝(q^~k ռANW倠7@G'{hvEe  V.\AV3LNӹygTJ 9FoB]o#C݅y3 [2OOn(bn 1T܄nS`qVaNPL0Hv*NuDnR!X3XM'5o9NdPtjfوMhst"p-v?Xw]ɚjAgi%gٍ_>C;a3+ Lm\@Ď50$[h:|Jx̎ c1C=8mdk`^q˻klj5|ypeVAόbT> n5zf qwc#d]0IYff~Zl羟kASgެa3TtճY>c{~\2tQv5eΠiŎ4IDATlo]Imۖ<]qչ> |2 \ˇcWЫ*lɢٲLJaR<g+4PQ<K3O_vu-" go*]Ћ[̥ Ю̾ʵnǙ֐,Bu.(5Ee? ևe®:Xud`&gUeVmYOyaO~Pcz J&ujK dmve]|U_=BIgropS \2jY\ m9u[4:ԕv\ڿ6zq=Q.dbݪ,[kE׵MWg_Γ.N1&/yY/T<_훿٥^0y $.ۋpT,D>_k.^ ԮK=+|u}t^kzdrgKaI0oo ͷz5sR|uZ/迤/8//#|^K RE_YG`}\Īr\ts[d M:@VCiQ-Mz^]h̯MEWf]K"^*̪-/]ެ53'ߜK_)|k_8WF>l]xQz$k}lIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_basic.png0000644000175100001770000001202314676242340017504 0ustar00runnerdockerPNG  IHDRS EIDATx]oluo+PƭC\G| *8E6A +F"A"j9PAPHFJ 4gD*A&nʁ`~(z?̛yglG5[>qS  ˂6)s{!J(#)r6G6Fe @CJ؏>5R@iHAJ,N\ܱ+mw>Wu*gآ,A ,:%ALqۖ6}о(Gm(\.@57?7%0v~{˃greZhK}&1?@:ȼF)SCQ^05)ےv'swڶeA܎O< !Dܨ{G /5[k״Q6@ |cwڞ OBIt_ktyG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6Ҹꓒw ҕng,4wm(,W-,]jNN}¬XB(gsQY@J7w[nl pnt|=ɗ:N8rĹsD6חCQZBKN" V ;fB`!5-޻/=bB`AZ`4CXvaAt׎DьXGUUvz @׾iȆ ̞par=P1pɆ&: nkT*th%9 9T-He Y_:,³mmsKA3C|oGTȇtߗ偑a 38'kr>sx,r,*<:cp3=W#_J@K}tW,Nkyslĩ3|qsؽ3sq$/:$ɂ$Rj͚}V!Q鱵ilf;]X o@b;/{*+%祝yr^^Kce:Yjٖ=LtNH@io,c>ā4\3naRf}ޘ~eb+C4*,Q&k2ǥ*$'P `t!A6^ cLéл08*Uhq6'pFh@r,) COyC]bDJsupVSHqxf9UN~u|XUլu|Fڕ-:>XhkFx=.k 9FeWyB6uQPܾe˷$VM\ oN-f_kZHx_Eٽu"ˇkbcois#o]/?Sk1of[mR&پoy _4w&YNeMP|&5k!b~~~~~>7PfVzT jd-6nNזSe֨"d+V}~w6ٲ;nGVO{1#-_]/{jlk)\)ܤvWQts:y[x$nכ_O<u}k uUM9{L ?xags\:^.\)k[]{el!ш7O{J˶W3d=~4^˶l?#+_XYQ=x;>>6~}AVQ6QQ6Qz|%ֱZE}Z_kkm_kZZD=&VQz|Ekm_kDQ?MTe9J$$u&J~:j qQCв-a^*\2Q OIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_event-flowchart.png0000644000175100001770000001263014676242340021537 0ustar00runnerdockerPNG  IHDR%vjsBIT|dtEXtTitleMade with Sodipodi/'tEXtAuthorUnknown! zTXtDescriptionxKT(L.)-J_~ ,IDATx{U}?7 yBx%@(ՀW"AHP("U ZQ,B,Dj @  A1Р<B1 3wf眙suֽ3gcf~{~E " - @YU"Q<pPՅt@ (EPuNU"zi~V Á1h>8p(z)g~ JchP})x`p;ѺVtz:1>D`v'Fu)jMBm}79SG_u!s#pnՅ]B[`;'0 8j˺  q xӤ9X:8/}6x{"8)\y lIH ]| \l~i +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zii骪*<̗KeeDkkxK`0`0ff0~  Oa`0)L@3 F? sIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_games2.rst0000644000175100001770000001500214676242340017625 0ustar00runnerdocker.. include:: common.txt ********************************* Revision: Pygame fundamentals ********************************* .. role:: firstterm(emphasis) .. _makegames-2: 2. Revision: Pygame fundamentals ================================ .. _makegames-2-1: 2.1. The basic Pygame game -------------------------- For the sake of revision, and to ensure that you are familiar with the basic structure of a Pygame program, I'll briefly run through a basic Pygame program, which will display no more than a window with some text in it, that should, by the end, look something like this (though of course the window decoration will probably be different on your system): .. image:: tom_basic.png The full code for this example looks like this:: #!/usr/bin/python import pygame from pygame.locals import * def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Display some text font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Event loop while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main() .. _makegames-2-2: 2.2. Basic Pygame objects ------------------------- As you can see, the code consists of three main objects: the screen, the background, and the text. Each of these objects is created by first calling an instance of an in-built Pygame object, and then modifying it to fit our needs. The screen is a slightly special case, because we still modify the display through Pygame calls, rather than calling methods belonging to the screen object. But for all other Pygame objects, we first create the object as a copy of a Pygame object, giving it some attributes, and build our game objects from them. With the background, we first create a Pygame Surface object, and make it the size of the screen. We then perform the convert() operation to convert the Surface to a single pixel format. This is more obviously necessary when we have several images and surfaces, all of different pixel formats, which makes rendering them quite slow. By converting all the surfaces, we can drastically speed up rendering times. Finally, we fill the background surface with white (255, 255, 255). These values are :firstterm:`RGB` (Red Green Blue), and can be worked out from any good paint program. With the text, we require more than one object. First, we create a font object, which defines which font to use, and the size of the font. Then we create a text object, by using the ``render`` method that belongs to our font object, supplying three arguments: the text to be rendered, whether or not it should be anti-aliased (1=yes, 0=no), and the color of the text (again in RGB format). Next we create a third text object, which gets the rectangle for the text. The easiest way to understand this is to imagine drawing a rectangle that will surround all of the text; you can then use this rectangle to get/set the position of the text on the screen. So in this example we get the rectangle, set its ``centerx`` attribute to be the ``centerx`` attribute of the background (so the text's center will be the same as the background's center, i.e. the text will be centered on the screen on the x axis). We could also set the y coordinate, but it's not any different so I left the text at the top of the screen. As the screen is small anyway, it didn't seem necessary. .. _makegames-2-3: 2.3. Blitting ------------- Now we have created our game objects, we need to actually render them. If we didn't and we ran the program, we'd just see a blank window, and the objects would remain invisible. The term used for rendering objects is :firstterm:`blitting`, which is where you copy the pixels belonging to said object onto the destination object. So to render the background object, you blit it onto the screen. In this example, to make things simple, we blit the text onto the background (so the background will now have a copy of the text on it), and then blit the background onto the screen. Blitting is one of the slowest operations in any game, so you need to be careful not to blit too much onto the screen in every frame. If you have a background image, and a ball flying around the screen, then you could blit the background and then the ball in every frame, which would cover up the ball's previous position and render the new ball, but this would be pretty slow. A better solution is to blit the background onto the area that the ball previously occupied, which can be found by the ball's previous rectangle, and then blitting the ball, so that you are only blitting two small areas. .. _makegames-2-4: 2.4. The event loop ------------------- Once you've set the game up, you need to put it into a loop so that it will continuously run until the user signals that he/she wants to exit. So you start an open ``while`` loop, and then for each iteration of the loop, which will be each frame of the game, update the game. The first thing is to check for any Pygame events, which will be the user hitting the keyboard, clicking a mouse button, moving a joystick, resizing the window, or trying to close it. In this case, we simply want to watch out for for user trying to quit the game by closing the window, in which case the game should ``return``, which will end the ``while`` loop. Then we simply need to re-blit the background, and flip (update) the display to have everything drawn. OK, as nothing moves or happens in this example, we don't strictly speaking need to re-blit the background in every iteration, but I put it in because when things are moving around on the screen, you will need to do all your blitting here. .. _makegames-2-5: 2.5. Ta-da! ----------- And that's it - your most basic Pygame game! All games will take a form similar to this, but with lots more code for the actual game functions themselves, which are more to do your with programming, and less guided in structure by the workings of Pygame. This is what this tutorial is really about, and will now go onto. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_games3.rst0000644000175100001770000001231214676242340017627 0ustar00runnerdocker.. include:: common.txt ********************** Kicking things off ********************** .. role:: citetitle(emphasis) .. _makegames-3: 3. Kicking things off ===================== The first sections of code are relatively simple, and, once written, can usually be reused in every game you consequently make. They will do all of the boring, generic tasks like loading modules, loading images, opening networking connections, playing music, and so on. They will also include some simple but effective error handling, and any customisation you wish to provide on top of functions provided by modules like ``sys`` and ``pygame``. .. _makegames-3-1: 3.1. The first lines, and loading modules ----------------------------------------- First off, you need to start off your game and load up your modules. It's always a good idea to set a few things straight at the top of the main source file, such as the name of the file, what it contains, the license it is under, and any other helpful info you might want to give those who will be looking at it. Then you can load modules, with some error checking so that Python doesn't print out a nasty traceback, which non-programmers won't understand. The code is fairly simple, so I won't bother explaining any of it:: #!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError as err: print(f"couldn't load module. {err}") sys.exit(2) .. _makegames-3-2: 3.2. Resource handling functions -------------------------------- In the :doc:`Line By Line Chimp ` example, the first code to be written was for loading images and sounds. As these were totally independent of any game logic or game objects, they were written as separate functions, and were written first so that later code could make use of them. I generally put all my code of this nature first, in their own, classless functions; these will, generally speaking, be resource handling functions. You can of course create classes for these, so that you can group them together, and maybe have an object with which you can control all of your resources. As with any good programming environment, it's up to you to develop your own best practice and style. It's always a good idea to write your own resource handling functions, because although Pygame has methods for opening images and sounds, and other modules will have their methods of opening other resources, those methods can take up more than one line, they can require consistent modification by yourself, and they often don't provide satisfactory error handling. Writing resource handling functions gives you sophisticated, reusable code, and gives you more control over your resources. Take this example of an image loading function:: def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() Here we make a more sophisticated image loading function than the one provided by :func:`pygame.image.load`. Note that the first line of the function is a documentation string describing what the function does, and what object(s) it returns. The function assumes that all of your images are in a directory called data, and so it takes the filename and creates the full pathname, for example ``data/ball.png``, using the :citetitle:`os` module to ensure cross-platform compatibility. Then it tries to load the image, and convert any alpha regions so you can achieve transparency, and it returns a more human-readable error if there's a problem. Finally it returns the image object, and its :class:`rect `. You can make similar functions for loading any other resources, such as loading sounds. You can also make resource handling classes, to give you more flexibility with more complex resources. For example, you could make a music class, with an ``__init__`` function that loads the sound (perhaps borrowing from a ``load_sound()`` function), a function to pause the music, and a function to restart. Another handy resource handling class is for network connections. Functions to open sockets, pass data with suitable security and error checking, close sockets, finger addresses, and other network tasks, can make writing a game with network capabilities relatively painless. Remember the chief task of these functions/classes is to ensure that by the time you get around to writing game object classes, and the main loop, there's almost nothing left to do. Class inheritance can make these basic classes especially handy. Don't go overboard though; functions which will only be used by one class should be written as part of that class, not as a global function. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_games4.rst0000644000175100001770000001626214676242340017640 0ustar00runnerdocker.. include:: common.txt *********************** Game object classes *********************** .. role:: firstterm(emphasis) .. _makegames-4: 4. Game object classes ====================== Once you've loaded your modules, and written your resource handling functions, you'll want to get on to writing some game objects. The way this is done is fairly simple, though it can seem complex at first. You write a class for each type of object in the game, and then create an instance of those classes for the objects. You can then use those classes' methods to manipulate the objects, giving objects some motion and interactive capabilities. So your game, in pseudo-code, will look like this:: #!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update() This is, of course, a very simple example, and you'd need to put in all the code, instead of those little bracketed comments. But you should get the basic idea. You create a class, into which you put all the functions for a ball, including ``__init__``, which would create all the ball's attributes, and ``update``, which would move the ball to its new position, before blitting it onto the screen in this position. You can then create more classes for all of your other game objects, and then create instances of them so that you can handle them easily in the ``main`` function and the main program loop. Contrast this with initiating the ball in the ``main`` function, and then having lots of classless functions to manipulate a set ball object, and you'll hopefully see why using classes is an advantage: It allows you to put all of the code for each object in one place; it makes using objects easier; it makes adding new objects, and manipulating them, more flexible. Rather than adding more code for each new ball object, you could simply create new instances of the ``Ball`` class for each new ball object. Magic! .. _makegames-4-1: 4.1. A simple ball class ------------------------ Here is a simple class with the functions necessary for creating a ball object that will, if the ``update`` function is called in the main loop, move across the screen:: class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) Here we have the ``Ball`` class, with an ``__init__`` function that sets the ball up, an ``update`` function that changes the ball's rectangle to be in the new position, and a ``calcnewpos`` function to calculate the ball's new position based on its current position, and the vector by which it is moving. I'll explain the physics in a moment. The one other thing to note is the documentation string, which is a little bit longer this time, and explains the basics of the class. These strings are handy not only to yourself and other programmers looking at the code, but also for tools to parse your code and document it. They won't make much of a difference in small programs, but with large ones they're invaluable, so it's a good habit to get into. .. _makegames-4-1-1: 4.1.1. Diversion 1: Sprites ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The other reason for creating a class for each object is sprites. Each image you render in your game will be a sprite object, and so to begin with, the class for each object should inherit the :class:`Sprite ` class. This is a really nice feature of Python - class inheritance. Now the ``Ball`` class has all of the functions that come with the ``Sprite`` class, and any object instances of the ``Ball`` class will be registered by Pygame as sprites. Whereas with text and the background, which don't move, it's OK to blit the object onto the background, Pygame handles sprite objects in a different manner, which you'll see when we look at the whole program's code. Basically, you create both a ball object, and a sprite object for that ball, and you then call the ball's update function on the sprite object, thus updating the sprite. Sprites also give you sophisticated ways of determining if two objects have collided. Normally you might just check in the main loop to see if their rectangles overlap, but that would involve a lot of code, which would be a waste because the ``Sprite`` class provides two functions (``spritecollide`` and ``groupcollide``) to do this for you. .. _makegames-4-1-2: 4.1.2. Diversion 2: Vector physics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Other than the structure of the ``Ball`` class, the notable thing about this code is the vector physics, used to calculate the ball's movement. With any game involving angular movement, you won't get very far unless you're comfortable with trigonometry, so I'll just introduce the basics you need to know to make sense of the ``calcnewpos`` function. To begin with, you'll notice that the ball has an attribute ``vector``, which is made up of ``angle`` and ``z``. The angle is measured in radians, and will give you the direction in which the ball is moving. Z is the speed at which the ball moves. So by using this vector, we can determine the direction and speed of the ball, and therefore how much it will move on the x and y axes: .. image:: tom_radians.png The diagram above illustrates the basic maths behind vectors. In the left hand diagram, you can see the ball's projected movement represented by the blue line. The length of that line (z) represents its speed, and the angle is the direction in which it will move. The angle for the ball's movement will always be taken from the x axis on the right, and it is measured clockwise from that line, as shown in the diagram. From the angle and speed of the ball, we can then work out how much it has moved along the x and y axes. We need to do this because Pygame doesn't support vectors itself, and we can only move the ball by moving its rectangle along the two axes. So we need to :firstterm:`resolve` the angle and speed into its movement on the x axis (dx) and on the y axis (dy). This is a simple matter of trigonometry, and can be done with the formulae shown in the diagram. If you've studied elementary trigonometry before, none of this should be news to you. But just in case you're forgetful, here are some useful formulae to remember, that will help you visualise the angles (I find it easier to visualise angles in degrees than in radians!) .. image:: tom_formulae.png ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_games5.rst0000644000175100001770000001503514676242340017636 0ustar00runnerdocker.. include:: common.txt ***************************** User-controllable objects ***************************** .. _makegames-5: 5. User-controllable objects ============================ So far you can create a Pygame window, and render a ball that will fly across the screen. The next step is to make some bats which the user can control. This is potentially far more simple than the ball, because it requires no physics (unless your user-controlled object will move in ways more complex than up and down, e.g. a platform character like Mario, in which case you'll need more physics). User-controllable objects are pretty easy to create, thanks to Pygame's event queue system, as you'll see. .. _makegames-5-1: 5.1. A simple bat class ----------------------- The principle behind the bat class is similar to that of the ball class. You need an ``__init__`` function to initialise the ball (so you can create object instances for each bat), an ``update`` function to perform per-frame changes on the bat before it is blitted the bat to the screen, and the functions that will define what this class will actually do. Here's some sample code:: class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" As you can see, this class is very similar to the ball class in its structure. But there are differences in what each function does. First of all, there is a reinit function, which is used when a round ends, and the bat needs to be set back in its starting place, with any attributes set back to their necessary values. Next, the way in which the bat is moved is a little more complex than with the ball, because here its movement is simple (up/down), but it relies on the user telling it to move, unlike the ball which just keeps moving in every frame. To make sense of how the bat moves, it is helpful to look at a quick diagram to show the sequence of events: .. image:: tom_event-flowchart.png What happens here is that the person controlling the bat pushes down on the key that moves the bat up. For each iteration of the main game loop (for every frame), if the key is still held down, then the ``state`` attribute of that bat object will be set to "moving", and the ``moveup`` function will be called, causing the ball's y position to be reduced by the value of the ``speed`` attribute (in this example, 10). In other words, so long as the key is held down, the bat will move up the screen by 10 pixels per frame. The ``state`` attribute isn't used here yet, but it's useful to know if you're dealing with spin, or would like some useful debugging output. As soon as the player lets go of that key, the second set of boxes is invoked, and the ``state`` attribute of the bat object will be set back to "still", and the ``movepos`` attribute will be set back to [0,0], meaning that when the ``update`` function is called, it won't move the bat any more. So when the player lets go of the key, the bat stops moving. Simple! .. _makegames-5-1-1: 5.1.1. Diversion 3: Pygame events ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So how do we know when the player is pushing keys down, and then releasing them? With the Pygame event queue system, dummy! It's a really easy system to use and understand, so this shouldn't take long :) You've already seen the event queue in action in the basic Pygame program, where it was used to check if the user was quitting the application. The code for moving the bat is about as simple as that:: for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still" Here assume that you've already created an instance of a bat, and called the object ``player``. You can see the familiar layout of the ``for`` structure, which iterates through each event found in the Pygame event queue, which is retrieved with the :mod:`event.get() ` function. As the user hits keys, pushes mouse buttons and moves the joystick about, those actions are pumped into the Pygame event queue, and left there until dealt with. So in each iteration of the main game loop, you go through these events, checking if they're ones you want to deal with, and then dealing with them appropriately. The :func:`event.pump() ` function that was in the ``Bat.update`` function is then called in every iteration to pump out old events, and keep the queue current. First we check if the user is quitting the program, and quit it if they are. Then we check if any keys are being pushed down, and if they are, we check if they're the designated keys for moving the bat up and down. If they are, then we call the appropriate moving function, and set the player state appropriately (though the states moveup and movedown and changed in the ``moveup()`` and ``movedown()`` functions, which makes for neater code, and doesn't break *encapsulation*, which means that you assign attributes to the object itself, without referring to the name of the instance of that object). Notice here we have three states: still, moveup, and movedown. Again, these come in handy if you want to debug or calculate spin. We also check if any keys have been "let go" (i.e. are no longer being held down), and again if they're the right keys, we stop the bat from moving. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/reST/tut/tom_games6.rst0000644000175100001770000003307114676242340017637 0ustar00runnerdocker.. include:: common.txt *************************** Putting it all together *************************** .. _makegames-6: 6. Putting it all together ============================ So far you've learnt all the basics necessary to build a simple game. You should understand how to create Pygame objects, how Pygame displays objects, how it handles events, and how you can use physics to introduce some motion into your game. Now I'll just show how you can take all those chunks of code and put them together into a working game. What we need first is to let the ball hit the sides of the screen, and for the bat to be able to hit the ball, otherwise there's not going to be much gameplay involved. We do this using Pygame's :meth:`collision ` methods. .. _makegames-6-1: 6.1. Let the ball hit sides --------------------------- The basic principle behind making it bounce of the sides is easy to grasp. You grab the coordinates of the four corners of the ball, and check to see if they correspond with the x or y coordinate of the edge of the screen. So if the top right and top left corners both have a y coordinate of zero, you know that the ball is currently on the top edge of the screen. We do all this in the ``update`` function, after we've worked out the new position of the ball. :: if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z) Here we check to see if the ``area`` contains the new position of the ball (it always should, so we needn't have an ``else`` clause, though in other circumstances you might want to consider it). We then check if the coordinates for the four corners are *colliding* with the area's edges, and create objects for each result. If they are, the objects will have a value of 1, or ``True``. If they don't, then the value will be ``None``, or ``False``. We then see if it has hit the top or bottom, and if it has we change the ball's direction. Handily, using radians we can do this by simply reversing its positive/negative value. We also check to see if the ball has gone off the sides, and if it has we call the ``offcourt`` function. This, in my game, resets the ball, adds 1 point to the score of the player specified when calling the function, and displays the new score. Finally, we recompile the vector based on the new angle. And that is it. The ball will now merrily bounce off the walls and go offcourt with good grace. .. _makegames-6-2: 6.2. Let the ball hit bats -------------------------- Making the ball hit the bats is very similar to making it hit the sides of the screen. We still use the collide method, but this time we check to see if the rectangles for the ball and either bat collide. In this code I've also put in some extra code to avoid various glitches. You'll find that you'll have to put all sorts of extra code in to avoid glitches and bugs, so it's good to get used to seeing it. :: else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) We start this section with an ``else`` statement, because this carries on from the previous chunk of code to check if the ball hits the sides. It makes sense that if it doesn't hit the sides, it might hit a bat, so we carry on the conditional statement. The first glitch to fix is to shrink the players' rectangles by 3 pixels in both dimensions, to stop the bat catching a ball that goes behind them (if you imagine you just move the bat so that as the ball travels behind it, the rectangles overlap, and so normally the ball would then have been "hit" - this prevents that). Next we check if the rectangles collide, with one more glitch fix. Notice that I've commented on these odd bits of code - it's always good to explain bits of code that are abnormal, both for others who look at your code, and so you understand it when you come back to it. The without the fix, the ball might hit a corner of the bat, change direction, and one frame later still find itself inside the bat. Then it would again think it has been hit, and change its direction. This can happen several times, making the ball's motion completely unrealistic. So we have a variable, ``self.hit``, which we set to ``True`` when it has been hit, and ``False`` one frame later. When we check if the rectangles have collided, we also check if ``self.hit`` is ``True``/``False``, to stop internal bouncing. The important code here is pretty easy to understand. All rectangles have a :meth:`colliderect ` function, into which you feed the rectangle of another object, which returns ``True`` if the rectangles do overlap, and ``False`` if not. If they do, we can change the direction by subtracting the current angle from ``pi`` (again, a handy trick you can do with radians, which will adjust the angle by 90 degrees and send it off in the right direction; you might find at this point that a thorough understanding of radians is in order!). Just to finish the glitch checking, we switch ``self.hit`` back to ``False`` if it's the frame after they were hit. We also then recompile the vector. You would of course want to remove the same line in the previous chunk of code, so that you only do this once after the ``if-else`` conditional statement. And that's it! The combined code will now allow the ball to hit sides and bats. .. _makegames-6-3: 6.3. The Finished product ------------------------- The final product, with all the bits of code thrown together, as well as some other bits ofcode to glue it all together, will look like this:: # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initialise players global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initialise ball speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initialise sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Initialise clock clock = pygame.time.Clock() # Event loop while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main() As well as showing you the final product, I'll point you back to TomPong, upon which all of this is based. Download it, have a look at the source code, and you'll see a full implementation of pong using all of the code you've seen in this tutorial, as well as lots of other code I've added in various versions, such as some extra physics for spinning, and various other bug and glitch fixes. Oh, find TomPong at http://tomchance.org.uk/projects/pong. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/docs/reST/tut/tom_radians.png0000644000175100001770000004200114676242340020043 0ustar00runnerdockerPNG  IHDRB8:sBIT|dtEXtTitleMade with Sodipodi/'tEXtAuthorUnknown! zTXtDescriptionxKT(L.)-J_~ , IDATxw\UϤ@ PB HiAzQҥ"H&;"t 0i=?Ͻwgwfggܙ_ye3{wٽg>ss:`۹c_DDDDbQ"$d Ѣ)R"$"""K4zDD$WHR"$ͤ!%B"""ұI,I3YCDDDGĢ!n@m ͟zkM-0)ыHGҧr4R 0qmi:!A=hsHS"$%#H';++!ĀIׯ%4? YSxҳX3sJVv,$ ӒԱ x mHΰ)%K0"=UmOpP]rqpIKT3ڣIZ ܅'F/gEDͨX= 6"$>P\C!) x}Ù^^E݋7񄨔Mk"""p{OnӀ4wD T8{zp17hb >x-^#Cp$p=>=w_&LDDDǧwwX0J]@7qC?>lx,p ^t*p%ωH,ߍRP A~W"5 hޅ'֯k SDD >\ OY65f@ҸTe |w=EGDDD_'{t_`Oa9_&aFk$""">p yhLD貸l^p~ 0j"p80_EDDZfmNkQV]}O'BI 3ẫzZӌ3m)?||vbI&BGF˲]䷈]DD)_*WsDڏMJG[+n? -:O8X.Zt P `|ے9dDDD'@zcE|~+",:J'o -NDDDʦ}oi:1*)[d d4LDDOvdSC{\9kB4.b\"""5|@;w:%Bi[d뀥#%""+S~&J&mK^'T8ZDD$.0Pةx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8j{""do wDu&KmoqHCگJ*[ Vh-)""6]W6`q]2RyZ75|ņ"""A?+t]qhFJctM ,1.Fҵ9`qQ2Z4r,y#""mcR"""mg1hʯV]8fzc` ?4Hd &BoM|h+|6 3;M4QfnB!R6_']ӀDD$G5lJ*T>zPj"aeWJ8{ 3wDs,x_Jz; ,!Az|\6OʙHωxS% !*ϥ \DD:5 =)%0O 0: self.image = self.images[1] self.rect.top = self.origtop - (self.rect.left // self.bounce % 2) def gunpos(self): pos = self.facing * self.gun_offset + self.rect.centerx return pos, self.rect.top class Alien(pg.sprite.Sprite): """An alien space ship. That slowly moves down the screen.""" speed = 13 animcycle = 12 images: List[pg.Surface] = [] def __init__(self, *groups): pg.sprite.Sprite.__init__(self, *groups) self.image = self.images[0] self.rect = self.image.get_rect() self.facing = random.choice((-1, 1)) * Alien.speed self.frame = 0 if self.facing < 0: self.rect.right = SCREENRECT.right def update(self, *args, **kwargs): self.rect.move_ip(self.facing, 0) if not SCREENRECT.contains(self.rect): self.facing = -self.facing self.rect.top = self.rect.bottom + 1 self.rect = self.rect.clamp(SCREENRECT) self.frame = self.frame + 1 self.image = self.images[self.frame // self.animcycle % 3] class Explosion(pg.sprite.Sprite): """An explosion. Hopefully the Alien and not the player!""" defaultlife = 12 animcycle = 3 images: List[pg.Surface] = [] def __init__(self, actor, *groups): pg.sprite.Sprite.__init__(self, *groups) self.image = self.images[0] self.rect = self.image.get_rect(center=actor.rect.center) self.life = self.defaultlife def update(self, *args, **kwargs): """called every time around the game loop. Show the explosion surface for 'defaultlife'. Every game tick(update), we decrease the 'life'. Also we animate the explosion. """ self.life = self.life - 1 self.image = self.images[self.life // self.animcycle % 2] if self.life <= 0: self.kill() class Shot(pg.sprite.Sprite): """a bullet the Player sprite fires.""" speed = -11 images: List[pg.Surface] = [] def __init__(self, pos, *groups): pg.sprite.Sprite.__init__(self, *groups) self.image = self.images[0] self.rect = self.image.get_rect(midbottom=pos) def update(self, *args, **kwargs): """called every time around the game loop. Every tick we move the shot upwards. """ self.rect.move_ip(0, self.speed) if self.rect.top <= 0: self.kill() class Bomb(pg.sprite.Sprite): """A bomb the aliens drop.""" speed = 9 images: List[pg.Surface] = [] def __init__(self, alien, explosion_group, *groups): pg.sprite.Sprite.__init__(self, *groups) self.image = self.images[0] self.rect = self.image.get_rect(midbottom=alien.rect.move(0, 5).midbottom) self.explosion_group = explosion_group def update(self, *args, **kwargs): """called every time around the game loop. Every frame we move the sprite 'rect' down. When it reaches the bottom we: - make an explosion. - remove the Bomb. """ self.rect.move_ip(0, self.speed) if self.rect.bottom >= 470: Explosion(self, self.explosion_group) self.kill() class Score(pg.sprite.Sprite): """to keep track of the score.""" def __init__(self, *groups): pg.sprite.Sprite.__init__(self, *groups) self.font = pg.font.Font(None, 20) self.font.set_italic(1) self.color = "white" self.lastscore = -1 self.update() self.rect = self.image.get_rect().move(10, 450) def update(self, *args, **kwargs): """We only update the score in update() when it has changed.""" if SCORE != self.lastscore: self.lastscore = SCORE msg = f"Score: {SCORE}" self.image = self.font.render(msg, 0, self.color) def main(winstyle=0): # Initialize pygame if pg.get_sdl_version()[0] == 2: pg.mixer.pre_init(44100, 32, 2, 1024) pg.init() if pg.mixer and not pg.mixer.get_init(): print("Warning, no sound") pg.mixer = None fullscreen = False # Set the display mode winstyle = 0 # |FULLSCREEN bestdepth = pg.display.mode_ok(SCREENRECT.size, winstyle, 32) screen = pg.display.set_mode(SCREENRECT.size, winstyle, bestdepth) # Load images, assign to sprite classes # (do this before the classes are used, after screen setup) img = load_image("player1.gif") Player.images = [img, pg.transform.flip(img, 1, 0)] img = load_image("explosion1.gif") Explosion.images = [img, pg.transform.flip(img, 1, 1)] Alien.images = [load_image(im) for im in ("alien1.gif", "alien2.gif", "alien3.gif")] Bomb.images = [load_image("bomb.gif")] Shot.images = [load_image("shot.gif")] # decorate the game window icon = pg.transform.scale(Alien.images[0], (32, 32)) pg.display.set_icon(icon) pg.display.set_caption("Pygame Aliens") pg.mouse.set_visible(0) # create the background, tile the bgd image bgdtile = load_image("background.gif") background = pg.Surface(SCREENRECT.size) for x in range(0, SCREENRECT.width, bgdtile.get_width()): background.blit(bgdtile, (x, 0)) screen.blit(background, (0, 0)) pg.display.flip() # load the sound effects boom_sound = load_sound("boom.wav") shoot_sound = load_sound("car_door.wav") if pg.mixer: music = os.path.join(main_dir, "data", "house_lo.wav") pg.mixer.music.load(music) pg.mixer.music.play(-1) # Initialize Game Groups aliens = pg.sprite.Group() shots = pg.sprite.Group() bombs = pg.sprite.Group() all = pg.sprite.RenderUpdates() lastalien = pg.sprite.GroupSingle() # Create Some Starting Values alienreload = ALIEN_RELOAD clock = pg.time.Clock() # initialize our starting sprites global SCORE player = Player(all) Alien( aliens, all, lastalien ) # note, this 'lives' because it goes into a sprite group if pg.font: all.add(Score(all)) # Run our main loop whilst the player is alive. while player.alive(): # get input for event in pg.event.get(): if event.type == pg.QUIT: return if event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: return if event.type == pg.KEYDOWN: if event.key == pg.K_f: if not fullscreen: print("Changing to FULLSCREEN") screen_backup = screen.copy() screen = pg.display.set_mode( SCREENRECT.size, winstyle | pg.FULLSCREEN, bestdepth ) screen.blit(screen_backup, (0, 0)) else: print("Changing to windowed mode") screen_backup = screen.copy() screen = pg.display.set_mode( SCREENRECT.size, winstyle, bestdepth ) screen.blit(screen_backup, (0, 0)) pg.display.flip() fullscreen = not fullscreen keystate = pg.key.get_pressed() # clear/erase the last drawn sprites all.clear(screen, background) # update all the sprites all.update() # handle player input direction = keystate[pg.K_RIGHT] - keystate[pg.K_LEFT] player.move(direction) firing = keystate[pg.K_SPACE] if not player.reloading and firing and len(shots) < MAX_SHOTS: Shot(player.gunpos(), shots, all) if pg.mixer and shoot_sound is not None: shoot_sound.play() player.reloading = firing # Create new alien if alienreload: alienreload = alienreload - 1 elif not int(random.random() * ALIEN_ODDS): Alien(aliens, all, lastalien) alienreload = ALIEN_RELOAD # Drop bombs if lastalien and not int(random.random() * BOMB_ODDS): Bomb(lastalien.sprite, all, bombs, all) # Detect collisions between aliens and players. for alien in pg.sprite.spritecollide(player, aliens, 1): if pg.mixer and boom_sound is not None: boom_sound.play() Explosion(alien, all) Explosion(player, all) SCORE = SCORE + 1 player.kill() # See if shots hit the aliens. for alien in pg.sprite.groupcollide(aliens, shots, 1, 1).keys(): if pg.mixer and boom_sound is not None: boom_sound.play() Explosion(alien, all) SCORE = SCORE + 1 # See if alien bombs hit the player. for bomb in pg.sprite.spritecollide(player, bombs, 1): if pg.mixer and boom_sound is not None: boom_sound.play() Explosion(player, all) Explosion(bomb, all) player.kill() # draw the scene dirty = all.draw(screen) pg.display.update(dirty) # cap the framerate at 40fps. Also called 40HZ or 40 times per second. clock.tick(40) if pg.mixer: pg.mixer.music.fadeout(1000) pg.time.wait(1000) # call the "main" function if running this script if __name__ == "__main__": main() pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/arraydemo.py0000644000175100001770000000626714676242340016605 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.arraydemo Welcome to the arraydemo! Use the numpy array package to manipulate pixels. This demo will show you a few things: * scale up, scale down, flip, * cross fade * soften * put stripes on it! """ import os import pygame as pg from pygame import surfarray main_dir = os.path.split(os.path.abspath(__file__))[0] def surfdemo_show(array_img, name): "displays a surface, waits for user to continue" screen = pg.display.set_mode(array_img.shape[:2], 0, 32) surfarray.blit_array(screen, array_img) pg.display.flip() pg.display.set_caption(name) while True: e = pg.event.wait() # Force application to only advance when main button is released if e.type == pg.MOUSEBUTTONUP and e.button == pg.BUTTON_LEFT: break elif e.type == pg.KEYDOWN and e.key == pg.K_s: pg.image.save(screen, name + ".png") elif e.type == pg.QUIT: pg.quit() raise SystemExit() def main(): """show various surfarray effects""" import numpy as np from numpy import int32, uint pg.init() print("Using Numpy") print("Press the left mouse button to advance image.") print('Press the "s" key to save the current image.') # allblack allblack = np.zeros((128, 128), int32) surfdemo_show(allblack, "allblack") # striped # the element type is required for np.zeros in numpy else # an array of float is returned. striped = np.zeros((128, 128, 3), int32) striped[:] = (255, 0, 0) striped[:, ::3] = (0, 255, 255) surfdemo_show(striped, "striped") # rgbarray imagename = os.path.join(main_dir, "data", "arraydemo.bmp") imgsurface = pg.image.load(imagename) rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, "rgbarray") # flipped flipped = rgbarray[:, ::-1] surfdemo_show(flipped, "flipped") # scaledown scaledown = rgbarray[::2, ::2] surfdemo_show(scaledown, "scaledown") # scaleup # the element type is required for np.zeros in numpy else # an #array of floats is returned. shape = rgbarray.shape scaleup = np.zeros((shape[0] * 2, shape[1] * 2, shape[2]), int32) scaleup[::2, ::2, :] = rgbarray scaleup[1::2, ::2, :] = rgbarray scaleup[:, 1::2] = scaleup[:, ::2] surfdemo_show(scaleup, "scaleup") # redimg redimg = np.array(rgbarray) redimg[:, :, 1:] = 0 surfdemo_show(redimg, "redimg") # soften # having factor as an array forces integer upgrade during multiplication # of rgbarray, even for numpy. factor = np.array((8,), int32) soften = np.array(rgbarray, int32) soften[1:, :] += rgbarray[:-1, :] * factor soften[:-1, :] += rgbarray[1:, :] * factor soften[:, 1:] += rgbarray[:, :-1] * factor soften[:, :-1] += rgbarray[:, 1:] * factor soften //= 33 surfdemo_show(soften, "soften") # crossfade (50%) src = np.array(rgbarray) dest = np.zeros(rgbarray.shape) # dest is float64 by default. dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(uint) surfdemo_show(xfade, "xfade") # all done pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/audiocapture.py0000644000175100001770000000303114676242340017271 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.audiocapture A pygame 2 experiment. * record sound from a microphone * play back the recorded sound """ import pygame as pg import time from pygame._sdl2 import ( get_audio_device_names, AudioDevice, AUDIO_F32, AUDIO_ALLOW_FORMAT_CHANGE, ) from pygame._sdl2.mixer import set_post_mix pg.mixer.pre_init(44100, 32, 2, 512) pg.init() # init_subsystem(INIT_AUDIO) names = get_audio_device_names(True) print(names) sounds = [] sound_chunks = [] def callback(audiodevice, audiomemoryview): """This is called in the sound thread. Note, that the frequency and such you request may not be what you get. """ # print(type(audiomemoryview), len(audiomemoryview)) # print(audiodevice) sound_chunks.append(bytes(audiomemoryview)) def postmix_callback(postmix, audiomemoryview): """This is called in the sound thread. At the end of mixing we get this data. """ print(type(audiomemoryview), len(audiomemoryview)) print(postmix) set_post_mix(postmix_callback) audio = AudioDevice( devicename=names[0], iscapture=True, frequency=44100, audioformat=AUDIO_F32, numchannels=2, chunksize=512, allowed_changes=AUDIO_ALLOW_FORMAT_CHANGE, callback=callback, ) # start recording. audio.pause(0) print(audio) print(f"recording with '{names[0]}'") time.sleep(5) print("Turning data into a pg.mixer.Sound") sound = pg.mixer.Sound(buffer=b"".join(sound_chunks)) print("playing back recorded sound") sound.play() time.sleep(5) pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/blend_fill.py0000644000175100001770000000650714676242340016711 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.blend_fill BLEND_ing colors in different ways with Surface.fill(). Keyboard Controls: * Press R, G, B to increase the color channel values, * 1-9 to set the step range for the increment, * A - ADD, S- SUB, M- MULT, - MIN, + MAX to change the blend modes """ import os import pygame as pg from pygame import K_1, K_2, K_3, K_4, K_5, K_6, K_7, K_8, K_9 def usage(): print("Press R, G, B to increase the color channel values,") print("1-9 to set the step range for the increment,") print("A - ADD, S- SUB, M- MULT, - MIN, + MAX") print(" to change the blend modes") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") def main(): color = [0, 0, 0] changed = False blendtype = 0 step = 5 pg.init() screen = pg.display.set_mode((640, 480), 0, 32) screen.fill((100, 100, 100)) image = pg.image.load(os.path.join(data_dir, "liquid.bmp")).convert() blendimage = pg.image.load(os.path.join(data_dir, "liquid.bmp")).convert() screen.blit(image, (10, 10)) screen.blit(blendimage, (200, 10)) pg.display.flip() pg.key.set_repeat(500, 30) usage() going = True while going: for event in pg.event.get(): if event.type == pg.QUIT: going = False if event.type == pg.KEYDOWN: usage() if event.key == pg.K_ESCAPE: going = False if event.key == pg.K_r: color[0] += step if color[0] > 255: color[0] = 0 changed = True elif event.key == pg.K_g: color[1] += step if color[1] > 255: color[1] = 0 changed = True elif event.key == pg.K_b: color[2] += step if color[2] > 255: color[2] = 0 changed = True elif event.key == pg.K_a: blendtype = pg.BLEND_ADD changed = True elif event.key == pg.K_s: blendtype = pg.BLEND_SUB changed = True elif event.key == pg.K_m: blendtype = pg.BLEND_MULT changed = True elif event.key == pg.K_PLUS: blendtype = pg.BLEND_MAX changed = True elif event.key == pg.K_MINUS: blendtype = pg.BLEND_MIN changed = True elif event.key in (K_1, K_2, K_3, K_4, K_5, K_6, K_7, K_8, K_9): step = int(event.unicode) if changed: screen.fill((100, 100, 100)) screen.blit(image, (10, 10)) blendimage.blit(image, (0, 0)) # blendimage.fill (color, (0, 0, 20, 20), blendtype) blendimage.fill(color, None, blendtype) screen.blit(blendimage, (200, 10)) print( f"Color: {tuple(color)}, Pixel (0,0): {[blendimage.get_at((0, 0))]}" ) changed = False pg.display.flip() pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/blit_blends.py0000644000175100001770000001425614676242340017100 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.blit_blends Blending colors in different ways with different blend modes. It also shows some tricks with the surfarray. Including how to do additive blending. Keyboard Controls ----------------- * R, G, B - add a bit of Red, Green, or Blue. * A - Add blend mode * S - Subtractive blend mode * M - Multiply blend mode * = key BLEND_MAX blend mode. * - key BLEND_MIN blend mode. * 1, 2, 3, 4 - use different images. """ import os import pygame as pg import time main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") try: import pygame.surfarray import numpy except ImportError: print("no surfarray for you! install numpy") def main(): pg.init() pg.mixer.quit() # remove ALSA underflow messages for Debian squeeze screen = pg.display.set_mode((640, 480)) im1 = pg.Surface(screen.get_size()) # im1= im1.convert() im1.fill((100, 0, 0)) im2 = pg.Surface(screen.get_size()) im2.fill((0, 50, 0)) # we make a srcalpha copy of it. # im3= im2.convert(SRCALPHA) im3 = im2 im3.set_alpha(127) images = {} images[pg.K_1] = im2 images[pg.K_2] = pg.image.load(os.path.join(data_dir, "chimp.png")) images[pg.K_3] = pg.image.load(os.path.join(data_dir, "alien3.gif")) images[pg.K_4] = pg.image.load(os.path.join(data_dir, "liquid.bmp")) img_to_blit = im2.convert() iaa = img_to_blit.convert_alpha() blits = {} blits[pg.K_a] = pg.BLEND_ADD blits[pg.K_s] = pg.BLEND_SUB blits[pg.K_m] = pg.BLEND_MULT blits[pg.K_EQUALS] = pg.BLEND_MAX blits[pg.K_MINUS] = pg.BLEND_MIN blitsn = {} blitsn[pg.K_a] = "BLEND_ADD" blitsn[pg.K_s] = "BLEND_SUB" blitsn[pg.K_m] = "BLEND_MULT" blitsn[pg.K_EQUALS] = "BLEND_MAX" blitsn[pg.K_MINUS] = "BLEND_MIN" screen.blit(im1, (0, 0)) pg.display.flip() clock = pg.time.Clock() print("one pixel is:%s:" % [im1.get_at((0, 0))]) going = True while going: clock.tick(60) for event in pg.event.get(): if event.type == pg.QUIT: going = False if event.type == pg.KEYDOWN: usage() if event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.KEYDOWN and event.key in images.keys(): img_to_blit = images[event.key] iaa = img_to_blit.convert_alpha() elif event.type == pg.KEYDOWN and event.key in blits.keys(): t1 = time.time() # blits is a dict keyed with key -> blit flag. eg BLEND_ADD. im1.blit(img_to_blit, (0, 0), None, blits[event.key]) t2 = time.time() print("one pixel is:%s:" % [im1.get_at((0, 0))]) print(f"time to do:{t2 - t1}:") elif event.type == pg.KEYDOWN and event.key in [pg.K_t]: for bkey in blits.keys(): t1 = time.time() for x in range(300): im1.blit(img_to_blit, (0, 0), None, blits[bkey]) t2 = time.time() # show which key we're doing... onedoing = blitsn[bkey] print(f"time to do :{onedoing}: is :{t2 - t1}:") elif event.type == pg.KEYDOWN and event.key in [pg.K_o]: t1 = time.time() # blits is a dict keyed with key -> blit flag. eg BLEND_ADD. im1.blit(iaa, (0, 0)) t2 = time.time() print("one pixel is:%s:" % [im1.get_at((0, 0))]) print(f"time to do:{t2 - t1}:") elif event.type == pg.KEYDOWN and event.key == pg.K_SPACE: # this additive blend without clamp two surfaces. # im1.set_alpha(127) # im1.blit(im1, (0,0)) # im1.set_alpha(255) t1 = time.time() im1p = pygame.surfarray.pixels2d(im1) im2p = pygame.surfarray.pixels2d(im2) im1p += im2p del im1p del im2p t2 = time.time() print("one pixel is:%s:" % [im1.get_at((0, 0))]) print(f"time to do:{t2 - t1}:") elif event.type == pg.KEYDOWN and event.key in [pg.K_z]: t1 = time.time() im1p = pygame.surfarray.pixels3d(im1) im2p = pygame.surfarray.pixels3d(im2) im1p16 = im1p.astype(numpy.uint16) im2p16 = im1p.astype(numpy.uint16) im1p16 += im2p16 im1p16 = numpy.minimum(im1p16, 255) pygame.surfarray.blit_array(im1, im1p16) del im1p del im2p t2 = time.time() print("one pixel is:%s:" % [im1.get_at((0, 0))]) print(f"time to do:{t2 - t1}:") elif event.type == pg.KEYDOWN and event.key in [pg.K_r, pg.K_g, pg.K_b]: # this adds one to each pixel. colmap = {} colmap[pg.K_r] = 0x10000 colmap[pg.K_g] = 0x00100 colmap[pg.K_b] = 0x00001 im1p = pygame.surfarray.pixels2d(im1) im1p += colmap[event.key] del im1p print("one pixel is:%s:" % [im1.get_at((0, 0))]) elif event.type == pg.KEYDOWN and event.key == pg.K_p: print("one pixel is:%s:" % [im1.get_at((0, 0))]) elif event.type == pg.KEYDOWN and event.key == pg.K_f: # this additive blend without clamp two surfaces. t1 = time.time() im1.set_alpha(127) im1.blit(im2, (0, 0)) im1.set_alpha(255) t2 = time.time() print("one pixel is:%s:" % [im1.get_at((0, 0))]) print(f"time to do:{t2 - t1}:") screen.blit(im1, (0, 0)) pg.display.flip() pg.quit() def usage(): print("press keys 1-5 to change image to blit.") print("A - ADD, S- SUB, M- MULT, - MIN, + MAX") print("T - timing test for special blend modes.") if __name__ == "__main__": usage() main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/camera.py0000644000175100001770000000750114676242340016042 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.camera Basic image capturing and display using pygame.camera Keyboard controls ----------------- - 0, start camera 0. - 1, start camera 1. - 9, start camera 9. - 10, start camera... wait a minute! There's not 10 key! """ import pygame as pg import pygame.camera class VideoCapturePlayer: size = (640, 480) def __init__(self, **argd): self.__dict__.update(**argd) super().__init__(**argd) # create a display surface. standard pygame stuff self.display = pg.display.set_mode(self.size) self.init_cams(0) def init_cams(self, which_cam_idx): # gets a list of available cameras. self.clist = pygame.camera.list_cameras() # ensure a camera exists if not self.clist: raise ValueError("Sorry, no cameras detected.") # check to see if the camera id exists. If not, default to the first one in the list. try: cam_id = self.clist[which_cam_idx] except IndexError: cam_id = self.clist[0] # creates the camera of the specified size and in RGB colorspace self.camera = pygame.camera.Camera(cam_id, self.size, "RGB") # starts the camera self.camera.start() self.clock = pg.time.Clock() # create a surface to capture to. for performance purposes, you want the # bit depth to be the same as that of the display surface. self.snapshot = pg.surface.Surface(self.size, 0, self.display) # return the name of the camera being used, to be included in the window name return cam_id def get_and_flip(self): # if you don't want to tie the framerate to the camera, you can check and # see if the camera has an image ready. note that while this works # on most cameras, some will never return true. self.snapshot = self.camera.get_image(self.display) # if 0 and self.camera.query_image(): # # capture an image # self.snapshot = self.camera.get_image(self.snapshot) # if 0: # self.snapshot = self.camera.get_image(self.snapshot) # # self.snapshot = self.camera.get_image() # # blit it to the display surface. simple! # self.display.blit(self.snapshot, (0, 0)) # else: # self.snapshot = self.camera.get_image(self.display) # # self.display.blit(self.snapshot, (0,0)) pg.display.flip() def main(self): # get the camera list. If there are no cameras, raise a value error. clist = pygame.camera.list_cameras() if not clist: raise ValueError("Sorry, no cameras detected.") # get the first camera, as this is the default. We want the display to contain the name of the camera. camera = clist[0] # create a list of options for the user to easily understand. print( "\nPress the associated number for the desired camera to see that display!" ) print("(Selecting a camera that does not exist will default to camera 0)") for index, cam in enumerate(clist): print(f"[{index}]: {cam}") going = True while going: events = pg.event.get() for e in events: if e.type == pg.QUIT or (e.type == pg.KEYDOWN and e.key == pg.K_ESCAPE): going = False if e.type == pg.KEYDOWN: if e.key in range(pg.K_0, pg.K_0 + 10): camera = self.init_cams(e.key - pg.K_0) self.get_and_flip() self.clock.tick() pygame.display.set_caption(f"{camera} ({self.clock.get_fps():.2f} FPS)") def main(): pg.init() pygame.camera.init() VideoCapturePlayer().main() pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/chimp.py0000644000175100001770000001343014676242340015710 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.chimp This simple example is used for the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. """ # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") # functions to create our resources def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) image = image.convert() size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound # classes for our game objects class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" # Initialize Everything pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) # Create The Background background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) # Put Text On The Background, Centered if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) # Display The Background screen.blit(background, (0, 0)) pg.display.flip() # Prepare Game Objects whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() # Main Loop going = True while going: clock.tick(60) # Handle Input Events for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() allsprites.update() # Draw Everything screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() pg.quit() # Game Over # this calls the 'main' function when this script is executed if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/cursors.py0000644000175100001770000001740214676242340016313 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.cursors Click a button and the cursor will change. This example will show you: *The different types of cursors that exist *How to create a cursor *How to set a cursor *How to make a simple button """ import pygame as pg import os # Create a system cursor system_cursor1 = pg.SYSTEM_CURSOR_CROSSHAIR system_cursor2 = pg.SYSTEM_CURSOR_HAND system_cursor3 = pg.SYSTEM_CURSOR_IBEAM # Create a color cursor surf = pg.Surface((40, 40)) surf.fill((120, 50, 50)) color_cursor = pg.cursors.Cursor((20, 20), surf) # Create a color cursor with an image surface main_dir = os.path.split(os.path.abspath(__file__))[0] image_name = os.path.join(main_dir, "data", "cursor.png") image = pg.image.load(image_name) image_cursor = pg.cursors.Cursor( (image.get_width() // 2, image.get_height() // 2), image ) # Create a bitmap cursor from simple strings # sized 24x24 thickarrow_strings = ( "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ", ) bitmap_cursor1 = pg.cursors.Cursor( (24, 24), (0, 0), *pg.cursors.compile(thickarrow_strings, black="X", white=".", xor="o"), ) # Create a bitmap cursor from premade simple strings bitmap_cursor2 = pg.cursors.diamond # Calculate if mouse position is inside circle def check_circle(mouse_pos_x, mouse_pos_y, center_x, center_y, radius): return (mouse_pos_x - center_x) ** 2 + (mouse_pos_y - center_y) ** 2 < radius**2 def main(): pg.init() pg.display.set_caption("Cursors Example") pg.font.init() font = pg.font.Font(None, 30) font1 = pg.font.Font(None, 24) bg = pg.display.set_mode((500, 400)) bg.fill((183, 201, 226)) # Initialize circles radius1 = 40 radius2 = 40 radius3 = 40 radius4 = 40 radius5 = 40 radius6 = 40 radius7 = 40 pos_x1 = 82 pos_x2 = 138 pos_x3 = 194 pos_x4 = 250 pos_x5 = 306 pos_x6 = 362 pos_x7 = 418 pos_y1 = 140 pos_y2 = 220 pos_y3 = 140 pos_y4 = 220 pos_y5 = 140 pos_y6 = 220 pos_y7 = 140 circle1 = pg.draw.circle(bg, (255, 255, 255), (pos_x1, pos_y1), radius1) circle2 = pg.draw.circle(bg, (255, 255, 255), (pos_x2, pos_y2), radius2) circle3 = pg.draw.circle(bg, (255, 255, 255), (pos_x3, pos_y3), radius3) circle4 = pg.draw.circle(bg, (255, 255, 255), (pos_x4, pos_y4), radius4) circle5 = pg.draw.circle(bg, (255, 255, 255), (pos_x5, pos_y5), radius5) circle6 = pg.draw.circle(bg, (255, 255, 255), (pos_x6, pos_y6), radius6) circle7 = pg.draw.circle(bg, (255, 255, 255), (pos_x7, pos_y7), radius7) # Initialize button button_text = font1.render("Click here to change cursor", True, (0, 0, 0)) button = pg.draw.rect( bg, (180, 180, 180), (139, 300, button_text.get_width() + 5, button_text.get_height() + 50), ) button_text_rect = button_text.get_rect(center=button.center) bg.blit(button_text, button_text_rect) pg.display.update() cursors = [ system_cursor1, color_cursor, system_cursor2, image_cursor, system_cursor3, bitmap_cursor1, bitmap_cursor2, ] index = 0 pg.mouse.set_cursor(cursors[index]) pressed = False clock = pg.time.Clock() while True: clock.tick(50) mouse_x, mouse_y = pg.mouse.get_pos() # Check if mouse is inside a circle to change its color if check_circle(mouse_x, mouse_y, circle1.centerx, circle1.centery, radius1): circle1 = pg.draw.circle(bg, (255, 0, 0), (pos_x1, pos_y1), radius1) else: circle1 = pg.draw.circle(bg, (255, 255, 255), (pos_x1, pos_y1), radius1) if check_circle(mouse_x, mouse_y, circle2.centerx, circle2.centery, radius2): circle2 = pg.draw.circle(bg, (255, 127, 0), (pos_x2, pos_y2), radius2) else: circle2 = pg.draw.circle(bg, (255, 255, 255), (pos_x2, pos_y2), radius2) if check_circle(mouse_x, mouse_y, circle3.centerx, circle3.centery, radius3): circle3 = pg.draw.circle(bg, (255, 255, 0), (pos_x3, pos_y3), radius3) else: circle3 = pg.draw.circle(bg, (255, 255, 255), (pos_x3, pos_y3), radius3) if check_circle(mouse_x, mouse_y, circle4.centerx, circle4.centery, radius3): circle4 = pg.draw.circle(bg, (0, 255, 0), (pos_x4, pos_y4), radius4) else: circle4 = pg.draw.circle(bg, (255, 255, 255), (pos_x4, pos_y4), radius4) if check_circle(mouse_x, mouse_y, circle5.centerx, circle5.centery, radius4): circle5 = pg.draw.circle(bg, (0, 0, 255), (pos_x5, pos_y5), radius5) else: circle5 = pg.draw.circle(bg, (255, 255, 255), (pos_x5, pos_y5), radius5) if check_circle(mouse_x, mouse_y, circle6.centerx, circle6.centery, radius6): circle6 = pg.draw.circle(bg, (75, 0, 130), (pos_x6, pos_y6), radius6) else: circle6 = pg.draw.circle(bg, (255, 255, 255), (pos_x6, pos_y6), radius6) if check_circle(mouse_x, mouse_y, circle7.centerx, circle7.centery, radius7): circle7 = pg.draw.circle(bg, (148, 0, 211), (pos_x7, pos_y7), radius7) else: circle7 = pg.draw.circle(bg, (255, 255, 255), (pos_x7, pos_y7), radius7) bg.fill((183, 201, 226), (0, 15, bg.get_width(), 50)) text1 = font.render( (f"This is a {pg.mouse.get_cursor().type} cursor"), True, (0, 0, 0) ) text_rect1 = text1.get_rect(center=(bg.get_width() / 2, 40)) bg.blit(text1, text_rect1) button = pg.draw.rect( bg, (100, 149, 240), (139, 300, button_text.get_width() + 5, button_text.get_height() + 50), ) bg.blit(button_text, button_text_rect) # Check if button was clicked and change cursor if button.collidepoint(mouse_x, mouse_y): button = pg.draw.rect( bg, (60, 100, 255), ( 139, 300, button_text.get_width() + 5, button_text.get_height() + 50, ), ) bg.blit(button_text, button_text_rect) if pg.mouse.get_pressed()[0] == 1 and pressed is False: button = pg.draw.rect( bg, (0, 0, 139), ( 139, 300, button_text.get_width() + 5, button_text.get_height() + 50, ), ) bg.blit(button_text, button_text_rect) index += 1 index %= len(cursors) pg.mouse.set_cursor(cursors[index]) pg.display.update() pg.time.delay(40) if pg.mouse.get_pressed()[0] == 1: pressed = True elif pg.mouse.get_pressed()[0] == 0: pressed = False for event in pg.event.get(): if event.type == pg.QUIT: pg.quit() raise SystemExit pg.display.update() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0511258 pygame-2.6.1/examples/data/0000755000175100001770000000000014676242436015154 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/BGR.png0000644000175100001770000000036414676242340016271 0ustar00runnerdockerPNG  IHDR22]bKGD pHYs  tIME WiTXtCommentCreated with GIMPd.eXIDATXֱ 0 DQQe4ZLji'y'?N%UXXXXXXXXMXzY'baaaaaa53/ف&Ն3b_IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien1.gif0000644000175100001770000000736214676242340017016 0ustar00runnerdockerGIF89aPG ,&$+(-10,-*1R m r&Q'r'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P^l d `p ! &^;{p3|> Du#@ pXH 'x( ._V@I_6c<@[mHK:|A@@LG=0y0P ofP pŰ ؖ?``l@ "mG^@3pgG`H16mguZIP|K& uXK@hI`F">KFrfZaAXVW!Z&vK =iZUMY!%mla&lc"&bt+ qo') ٔqaQiȗ`_i`TIU˜vY#ifsљ"&shI>1%?9#ٛ;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien1.jpg0000644000175100001770000000603714676242340017027 0ustar00runnerdockerJFIFHHExifMM*C  !"$"$CGP" .!"1A#2QaBq3/!1AQaq"2Rb ?غ4hҨѣQ_+)g&TIY /*@i yQPvviPQ7<5T11NIJH1E6fb]jL+EMTp46LGY9:ӧdEzzz뙌4[-tA TnyS"q"qD lEuW*[*rIUp4T(U(߸\?nE^%IIGvGhSW[橠`G&CaȨlG:AXm1rqݮ(('Z /9Gxr0c_pXB_Ϻy3'ڌK{A3ZQO8p0c'=%w~~3gnj=Lue,1r)PM*DJ<6e<ԔB _?? *栦л7]=O^A-EFC19)S YQnk}mƑjttX,H*0A[ۑfJى`,IO&! &$WHC4kNc,Jh2G9F'>ddlE^HrVq74W_4#_o8ѩه.NUUZ6KCOqbj%P%z8J+.-nÿ-m Nk$/ӪͽzIn*-WhS5I N#B${KW`|Sۇ~Qگۃk_mQ$HUK VFËyV[%y6x>5{+cYq5-0\r-q,WT\ tUޥ"!$18< ϤM.&aZ8p^;,,~߸v<5uO[sK R. r {d:J/W_[g{=hვ*Oqw tWlgiJ0usor 90 Koݶ)+i-q\~fu/| 18[KNh1*k~k5U% [᧘t(^e sDlOL7.آR$KF$^@HbD.Vp9r0Bcʏ^0_zV%]*jIjU)*rag8+BqBS,\Fө% "x:'0vO=V4o=᠅֮Sp #/*].m[᧨yFGO}.эԠ'ۥ*nT- si̗3pٮorۓ),\M g䡂@F#93Rg:E!r@0!rC}֯)v`e@ט! LЩ܀/R[l[Үѥ폰x_$3 #܌M6 8IWˉ7ދnT te*q9uVVWGS TI'/4tO=0njg% ͎5kǻMYN% 9#`:l|CtMtjZ(_'$]Q0 y-q878|.}0\ EY=:VUƌcO5gVGWM+E<FRHI ##ZSқNzo\-Q m"Β`@}/I403T1J7FJa+ !!LP73(98;鋤5])1vA]xNT1"GF211' B,]ϲGej;Mx=h` ,p2Nu竱)צ1 ;bThѣYѣF^l[xm+`GQuQ ݌˱99@:hѫQgn}*Ρ[mW&t"*It/4" ppfWB:]j&;jqMeUEHU;G9EQC),F|ѣV\H+5ʵ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien1.png0000644000175100001770000000670214676242340017032 0ustar00runnerdockerPNG  IHDRPG0PLTE ,&$+(-10,-*1R m r&Q'r'J./N(4q Rlq%~?8A;G.By9AU/FrL_7M.5rq'n6.GGG4LK5kPGTM3dIrK5~kpk&NKPNQmYdqnQOjXhogXqop /)49.DAn/L4M6l9d?UHWISOhRjeZlrcv (/ @]I0R-N4a /EW+Q;{+ePqJzLztuizGs/: ORLunnw3: 4433)=q/O3Em5P6DHT0vb3LP,f5VN^jfTuoVMZglUvj=- ,?8I7T0LNT2k o0~KOKW[beOpPmu|~{nr.0<0-)(7OKytNLuQnwʐό-Ϙ-џ3Щ3/ϔRЎkҪKԿLʫpʲp]xQyӀK8d~Wc#cyxrɑaǢ#a:?ü+`=z$:|eܒ}$p#[bII(Q}J%))&X8%IS賗1GJJH,~PT2߽D-Ű$){ndqIJ$rp]>@H %[Z~ZKZ$  D!ll* EDdHrVJG*K$gdB@*V8x  4"!t$~i>B@2 Y!Ⳃ@]'09䗏eK?wͷ"{HPWW7%2R`$$dپFGznyhjMf"++\VK=&Y%𯃃ov`0,# FDxϒ ]]6M,dXCP(#fo|W@Kx} EM9: erT*@bd&64MύFGxitt?X $6D"$ @bDk:>~d ?](-:AX,63,D^VXWزa r8e &&4$>p W]`RYg6 "b,Yyxqy9,iV&'T0KX >0}\oj^^ H[-&EQhZۻ3 F=Gqߣ)dz@f"oڬ-2pP8H$8=g޹# T){lf "Vz&<~~{Rvyw04s *,8э bBZK:bVdo"筿A(>ܑ8vX1;1zp&eFIk"Դ<7t5gn1X)>xg}D,*\&ܛ-SOu>" J10溎oRiuZ;yzk=py l9i$Lɘ%L"%7'o 3Y:z4h7+m{l,Q;qmsy{l}ZkkkǘƜΖk8c6yC||_D\p,׽czǑ9\;,D7F3s-l dˎudQMmmk> [NhU;zptl6U[{z/` _8吔q5s `'jj { <\[S{s1f~q A] 䯪|VtsY,YYkbY*2 ylV2<+o{I>U{+%n'1 *WU*ƙ1X4.Ċ5jL͝ cփFhnV(l;s 5;"5R!,OVX脛mMI 8{a#F;WK^6kerL0e&ǬjDk0q3r4>!ZQ$m"Bh`OlWS+7*ni|LZ;t7)kTPRZuɪmv ?؜ugd] x(Dx;eڠX ok_jΑ2ͮ*IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien2.gif0000644000175100001770000000737214676242340017020 0ustar00runnerdockerGIF89aPG ,&$+(-10,-*1R m&Q'r'J*q./N(4q r8A;G..n6By9AU/FrL_7M.5q/ n7.GGD~G4LK5kPGTM3dIrK5~kpk&NKPNQmYdqnQOjXhogXqop //6)49.7 DAn/L3N6l9d?UF OW/S&g4NY+`m+HWISOhRjeZLlrcvzH-64,6)t47,H4H7PqJztuizN8C0QKOkum~o/:.)6-ϔ3Ѧ ;,W\vA3#dtE]hxYh$=]&sK2tBޙ3>xh.'錓ޠӎ8^YdG 2hh'3=@CLI'v(yBx^:e #&fgKcI&6sO:GS Gs&3`&2PJO G!M9LA88@ BN;؃5IB3 10%t'HwOU`C+!åPt,! @ɾ5=,lJL N 0( }< W 1@AGrA ,4'*ؠ5>C8Bf8q2CL6`øh ~  ur4 yxK0m ޑ>4=|@C ԰s.4 8h !(7D`}Bo-P"&L! (tt4GVn>6`=6`¶!n^1E `G PόL7hJ7 W`h@̱mQ2wx KQdO9< Ha؀h`7>C%Ib2P: Ȁ0.G7i$eU`!=Gxb_8 "`=#0?` .Tщ/=@* p!/ @?| #nXY 0 j%p0 b@Xyb6 | 6 A"QHLQ2 % 0I"HIJ x z7JF0V D! z - D傜`` B8R76 j,T: r$&щ D@Ep @A08,`Yra H$$k@K23 !8 T`I@di l<z[@ ap^4! kȂp\.ɹfK /'ȁ6L#(+Z`A)\_ @+ĀEYh`A ] 9edBXN-]#\@n` WCdݱIZ TGUJA4YOP' i @KvR O@L8Ax<$0a KL&$,fQ`CH`j;hLha c@OLЭ$&La P Ɓr%}6?q4l?+yKStp<@\ G<  X("A)5_2Y A ,U(+{ D0-)|[cX j#;@ &+ !\Yq X. pm6`gEw` `]O"~aewOM|P&y(y8@v?hV @ Ђ  aN " 2 (ahK[ Gb77|A @ \؅,؂. dDfhV;|%$+MxDd|G c @g[( p X P m%@V6wXF|8Z &[77PvV@;(dž8`8&  8jց ](|7`V e8;\0VyegD&xb8e xgX Z"fzEByXwW^P^ueVaP HF 0 ZqXsw؏x !iqxR@ X)e!#/ `!%(mm菖a7iVd!B1A(ؓLٔNyg9N%(BNYnHlP Zf!Z6wnYVldžSyb'f'vi @Si!ȒRidia{iYCIkYx%)69>yyb9;ٚq)YZI9Y9);././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien2.png0000644000175100001770000000670614676242340017037 0ustar00runnerdockerPNG  IHDRPG0PLTE ,&$+(-10,-*1R m&Q'r'J*q./N(4q r8A;G..n6By9AU/FrL_7M.5q/ n7.GGD~G4LK5kPGTM3dIrK5~kpk&NKPNQmYdqnQOjXhogXqop //6)49.7 DAn/L3N6l9d?UF OW/S&g4NY+`m+HWISOhRjeZLlrcvzH-64,6)t47,H4H7PqJztuizN8C0QKOkum~o/:.)6-ϔ3Ѧ )˃GۣW/;-a:?ݼe{zdt5?87ã}()'熆~?44KJBuo:-II1)"XL(IZ*@_|HI)E#oJ搲;7[@$9)iN^I(h@Z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000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien3.gif0000644000175100001770000000736514676242340017023 0ustar00runnerdockerGIF89aPG ,&$+(-10,-*1R m r&Q'r'J./N(4q4.n8A;G.By9AU/FrLR _7M.5lq'n7.GGG4LK5kPGTM3dI~ArK5~kpk&NKPNQmYdqnQOjXhogXqop /0/)449)99. 9,;DAn/L5K4M6l9d?U7Q0GuHWISOhRjeZlrcvKThOmwPqJztuiz/: ORLunnwn ,: 4333q3Em6DC HT0v b3LP,`f5d4VN^jfTuoVMZglU}Lvj- 3 8INJT+T2k o0~;[~i+KO[bvGpPmt0/;)7-ϣ3ћOM|Q~wJԭp<{rLNqne哋.-(KytLuRnʐϘ-Щ3/ϔRЎkҭLʲp]xQynԘ̶ĵķȹǼŒȚ̨ķnjڅüɍŷ݆ȳ𠠤!p,PGHԫN=S JHE N4CZ=xXɗ0).0YܷykG/b̟@̫7; KEqKOX/.軤]JV"uk]oQAʆc7._udžk.3eƈKw11c|`Z.cƆ!F,LX0a (W 0R+{1ÙyV&ue #X1@ Dnpx񲥜Wp횥0?8;Y4]Ev@Gz.sjGul+Z/]gg± ԄՑ6C.pG |P ,@B@ J6 5L唧N9t4=Fh3<>3 4PsO4=$=Ԅs7ѣ3 ͤ3Id3혂C 4M2y4ABY:DIFAe34c!Yᣎ!b4M; 둅[ GvT=PL3IH \s>7؀d3Bȫ$:^(NpX1 )HbE;hjꨃH "ȫ6~X1m˺5U [5 ( 5؀ChD= \ * bȑc3)ePiE22 (:LΚ#J7=,kJK 2$j}4J[ 3@ +x*<5&p&5>B0O]Hq3<ß$4 4C)$*hI(@4P3^4R *rA3wTd3ハ 8=|` ܰs/D#M8p+(7(H`'2.XЌ"| TA )uۃ6tqϾ9-2x&h br.4E7b|P4XppC2X lp9%pN`'|A)0Q(`4gb 6i;BT*{!C Ȁ+6 H q2XA f0@$hwHc}5L4f@pd0!4 uĉMxPڻ+f$.TK4aod5 , BB(Ch0 \ 4' NxAR 2TAbi8L8yxU~ NP|N,8 fo✂V,PK[Z,ÁV\LCAЋ a @H ["A @\4a=| <yxD&AxzgӖ@ GiG C0S0`h'`A )>8C#`A3B&``< j&@^CH\(Ei@F( p)LA b@]" a= <AG4dp@Ef?gdY)`[QS 80L (GW=Hn8p0 0` jp 4x4;. 4@ -@Zp:+4(#o Bzae+x! :@ۃ5@s'LaXk@<d=+!-/ Gp< sABAa+'%lW/P^ 砼de7K@&Ѓl8c:;G;0, T$q&O 0D'`xs-N h ; .KF06f ‚- y @Lf3(A B`kz'N8 MJHnX A 0g# ` m@D0%xq emn\'@N@B XujpҦ@9hnayhD"mpYEz0T E@B `]TCl | t(A͈K&8hC(ԁ"8S >paA|?xd}m؁ &`Ha B40a ,@ɣxW W)8La$ 3yL|F} vJ+y,X`$x}9CXR/ +=@_ vsڵ+@.xDX*:\ޫT8;sf/^@`mF@fwPܠ P]N!e`aWQL{Ox)@y;vFpXV@ w`M !r aXK[!0W^G9P|H Z*, vc4fXV>{,KÇLp4|g 0gY ym' 6v8D{;Z$[9 9vW`>8`;@; 6 6j׶ Y)`{9`W@ȷ>\@WxaGf}Fhb(hgX Z!FxM`JpyXsG^@^5aFaR (f 2 Zo(s嘏XIoT 8(U!#/P!݇OVVH6Ns6 n Ўы:Jvf@W"X!8ZVvV ?ZUOY!emoHafle &fbt+ 9sq "(Y scSb ab9VyV☈9ٗxY#!h٘ə瓙&Fvy>19EAY#;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/examples/data/alien3.png0000644000175100001770000000667614676242340017046 0ustar00runnerdockerPNG  IHDRPG0PLTE ,&$+(-10,-*1R m r&Q'r'J./N(4q4.n8A;G.By9AU/FrLR _7M.5lq'n7.GGG4LK5kPGTM3dI~ArK5~kpk&NKPNQmYdqnQOjXhogXqop /0/)449)99. 9,;DAn/L5K4M6l9d?U7Q0GuHWISOhRjeZlrcvKThOmwPqJztuiz/: ORLunnwn ,: 4333q3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F RLfp1ScYU`XsoiS:3/ ɴ.xՊ߂gܐt_^Goev>4%8n&8> m^Z|*09{k{`];i0o#{`x g~ipK{Bޫ WK8A5+,A=D`]}0Vp>[lo_ub (+n5ph.ܩQz^aX"OFZn&}Xa!Ϡ u'VJبV`<8rFևkv_>h |!ct\p_UcԄ6FhQ)𻇳 iu;":- "OQ/*&jtiՒנ:0h S߄&[`} ѥEt3h7G#pyZEr6P~=RxI+l0Xoo, TvF5zFh)4Cwi*I Ֆ*U5wy߶HP3|ߎ~?Hdm܎r@C&gPmJy*0iċ# IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/arraydemo.bmp0000644000175100001770000022606614676242340017645 0ustar00runnerdockerBM6,6(                                         $              &      &    ()1& #!##!#!!!!!!!#$#!!!!!!!!!##!!##!!!!!!!!!!!!!!!!!!!!!!!!#####!!!#!###!!!!##!!!!!$(*-/--+*($#######!B6/-,545877558885565646506443161412121101331242328:6610151.1.443434333355878457661322000210103040///3/.15774365533041354796621137:<:73/2323032355113224164685330.0201669@GRXX[VNJHA<9=:43558561,.#',)('e #@=FGC?=>=783/ý-'*8GTIC<@@@?CAFBEGGMMPLIHBBCOZSLE65=7;8.6998:<8366<<<6/ƽ',BMPG>?@?=CEDEB@@DFFHGEJI=3DYcaWE831Ƽ.ɻ1469?C<:5534994.ż78AGIACADAHFFHIIGHFA>BGK_XS@81ȿ-4534A: Kgu~~tX0!>?3%">NPJ=%   "%(&'4 >=tB}MMD|C|>y?xA|A~D<x2rl-ih!Z[OR TZbȁeZLR]YVaeaggkzt|xro_SUʁ|r^K}{E~{?zIEEDCBK?M:7898;TG=,spXY?E*^kmyt_VTU\aZ_d``cgflqjqos]G]Ԣ·jF~7sr/tj3}q6y>FDASIC:}9|%js"ks7RK1zr$`_']^C\i89&MHPPMLOLNKLJED# 95ABFG%%, LTTLY[GVY@OR2@F.9AGUśwv||}țƛÓv|ʫow~dvubytc{`{abfjynh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{tsqsk}Xqs2XRk{FOuPW~LUcNZ\UacR_aO`cAUZ]fNtydj`Jji@\] &(5Ԉagj_r{LjŒrsn嵿l~}.SKeդ͉d|LbnG]iB[e:Yb9\iXX`h^VWptGqj>:!=RZ2CPzyWdlnnotxvzv~{wsnaoz}s~n|lby{Ryi> V`qsq}{xwksto~e}}0RLsQ^lKQvHKqKRaIRUQZ]Q]_O\^ARURej>S[4LX=]hRyinQvr8XW/4br~؜ƿpeoel~y~ɉȕƐgkexu5ZR᝺vUjrGXeJ[h+COGep8[h6]kY[[geYO|mg]>^]F\b&3CScz»x^`hbSgjrrr{}~~|vkfnzӔ~nPwh7|J*$  !"Bv-K>=+/^NQdgomkf^^__^~QpyOlsHej?]b>^d2V\WhAa`#:<"+EJ_|os~xvpuxbu%==`x^moQ]_SYdPSaLRWIPSOX[T]`Q]_DSUARU7JQ9O[/JX6YcMuze5WV 79*2ѡodigmsxƍpo䃔=3cڠqTbnIYfJ`l6Q_2Xd3]jYY[ifVWba\Fki1LP##:Iz^ciVjjn{}{yntlpr|Р̔nRti0oE#1#+ $?qOf^8*=jW_njjf`acnp_^\[yMmsA^c@^c:@DIKyzzUqq&;=,5(*B|p|vz}|t|tssk}ur%=;pR`_O[USYXOTSPUVIQQSZ]YbeO[[FTSFUXCV[AWc1KY2R_Mt|vGih.0 {afggruÅχ̗Ǔxp!D:}בeu{T`lFVcGZi)DR3Xf1[hWY]{ccVRhrRzu*HI $+~Ӗu_g_ZmtmqqsopumppƝ̠ǘoHh] [5*  ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/asprite.bmp0000644000175100001770000000110214676242340017307 0ustar00runnerdockerBMBB( m m """""!"!!""!""""!""""""""!""""""""""""""!""""""""!""""""""""""""""""""""""""""""""""""""""!""""""""!""""""""""""""!""""""""""././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/background.gif0000644000175100001770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ӭzj򎰇ʢ6]#ӮWLN"lʘmVlZ6B~SYd֋lM?[ٵMZƅ042cD^;,eíߜvl$)喧H2Ic9a1_yDȖ 8`V ~/(5szVp㏖]!-\IYP`:#Yٌu+2, &Dt&{KAi`fjt5 옲DN3*#zBE"Y|҉SlMfӝH'VA$"CD78 o!22S\ 0Rv&Jg>Rq8T)XLt,3IA\q Z* è/wR/vpIhaj@RJ$#g*x#%XbZT?K.R\J"zF*PЂN/)X_V#'_ysJƊW=SQ lC͌Nw>ΨvN(:L f=Hbc+vX( 2_QB"ŪiPlrJ: GA%*Sb&SNmlc**T1N8 }:jjRSbY$%Z^=.vQt1-kgВO}d(DO!͵F)ќJDGC$UcE. j# RtFYeW5yD}ELMXQKY 0Jg4hMC 针wydkzd,[6~(2zI%>IY5$XjdLzG̐Zj]WnyLpR2tDLF(>217 3,c`}R:mcئ})!Q+8O2rcj,R#El0sھf&YSбZ!2' -xV{~7dM$\HxO&__@0S 5DL^PN-Dq,L+MהZ0x@Kcv0Dl1QaDnK:b*h+JK13 C)6eeq y"${ @j /թK *Bz+/6338#w9"QG4X ĈX,2 Ky#0T'جS$ڎYpy:'3oX:'$1_9H\-+b;=Cؗx6;3a␥x9ܪGA@:*Z6u 094* 090&P. ո3a E<,ӳ(?|H$.2&! `2mQq!أR!8;ӊ eyBO;+" ;NdZB/e$C|{A JC4p@8`,`bϠ 2)w#!Z+ jܟ\z6#-ɉ`,O򢿐ʛ/!;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/black.ppm0000644000175100001770000001407314676242340016745 0ustar00runnerdockerP3 # Created by GIMP version 2.10.20 PNM plug-in 32 32 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/blue.gif0000644000175100001770000000012414676242340016561 0ustar00runnerdockerGIF89a !Created with GIMP, ڋ޼H扦ʶ ;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/blue.mpg0000644000175100001770000001400014676242340016575 0ustar00runnerdockerDFS #)!.DyFS#E)KϹJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" Wp@ p@ p@ p@ Wp@ p@ p@ p@ Wp@ p@ p@ p@ Wp@ p@ p@ p@ Wp@ p@ p@ p@ Wp@ p@ p@ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9961119 pygame-2.6.1/examples/data/bomb.gif0000644000175100001770000000222214676242340016552 0ustar00runnerdockerGIF89ap!,[eai^]XɽYYRMrzzpnqspƺh_Zûszтmm^eV\NJkzľvkXQüOǽSMHAFFtjWRQCB:6;ſ[ɿQ»PJ6wfYH>ҔeMCٱܔiWD?fGLQaOEMT֯xVMĽJEJUڬߣ}jUJBJöGNYϒީޑIH?ɽAHOՑޠݏgJʿDDɾ?Ĺ@ķJM]m؍ׂi[FHǹ?FSe~ւSBFùGMYyu_ND>KJTvrA>HȽ`pUKŽCAA>G[mdTGɻAHɽIÿE̾Hº>;>FQlľ^WûAǼADA@?=6:Ef\úSECA9@AAA@üm[MGECEDCH9 ` 8 s0h H@Ds.`Ƞa:xc#H0qE +Xhŋ0bȘA@*d"s%YĨG8z)$s(U%=w0 M8u,w@ݹJ(RJo #C !PTVyb Aܸq V,YR-. . 03 1cL. 20ӌ3<M4H3 5`5dGpӍ7߀K8CN9;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/boom.wav0000644000175100001770000003042214676242340016622 0ustar00runnerdockerRIFF 1WAVEfmt ++fact0data0¾}vngaZWUMKFB>:9833333338:ABFGKKMUX_jt~xvqaUj}xxxºƿ~vnjaZWQMFA>83/.(&#  #&&()./2389:>>>:2((:MZjq}º~tqnnljgea``_ZXXa`K:AN`_UMKGA>KXgq}~}vnja_XUNKFBA>::>>AAABGKNW_nten}¿~xvqnjjgeaaa`_U:BZq~~xvqnjga_ZUUUUUQMF>3(  (3>GQZalv~¿ƾ~}>&3B/&(((((&&&##   (&3FXjv}vqjejxeMA)3KA8/.(/BU_gqx}xtvtqqqqt}~v}Ɗ}U&3Ma`>&:`lNXXB)(2. /8 9XF/:.8A_FGWZG88FU_jxxjU)&FUgaaB9Wn²”ѳȳdzݡ”¹׿ҾѳΩ}anljx¹ºjW`_gvvgeeK3KKB.)/:>)(Kjvtqv`Xn`ZNAKlnqnQQQ//9QWWA :K9):99/# )8FB>9FZ_KKanlegK:a}ƨ~taeja`_Za```a~e`jxtW83G`eWa}~tZAUZZXUXUNAWx~XG`qƯnZNMB8)   &Zjagnlx}ǫqaa_qxqZ. &KUNN>.2꺃DzƾΡȹnxv}}vlqqjjxxXNKU_ZWM92:AUajqte9 #&3BGBABWUBQj}jajjlgWNQG:2))(&&&& &(&&&().2:>A9339:>Mjlaqκ}gqeUeq¾ƺ¯~x}xjUN`ZUA33>B3:B39NWnxڲȹxjgt~xt~xnqjgxvj_KFXjaenn~~xqljnvnjjgjaUZZWQUaUUZXjqqXQennq~jqveQQMFGF>:8/  (()3 :A# .8AA9FGG`xxlqvjnnj~~nqͳ}v}v_MZjg`aljnqnv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lgeegaaaaeggjnqqqtx}¹xxvtnjje`ZWUNKFBBBBB>83222222/)(...((((&().)&      #(/338:>BFGKMNNNQUWXZZZZ_aaaegjjjjjgggggjjjjjnqqqnnqx}~¿¿¿~xvtqlga_ZXUNKFBB>:988833333333338833:>BFGKMUWXWWX`aeegjljlnqtvxxvx}}xxxxxtqqqnjjgeggeaa_ZZXWWXXXXWWWWXZ_`_ZWUUXZXUNKGGKGGBBBBBBBBBBBBFKNUWXZZ`ejjlqqtx~ƿxqjjjjje`ZZZWUUNF:3......)()../239:AA>:9::93..)(((&# ##&()...)./33389::BGMUZa`XQNQQUWZ_``ZXZajllgaaglqnlqqtvxxxvxx~~xtqljlljga```_XWWWZZZXXZZZZXXXXXZ`agggjjnvx}}}}xxxx~~~}~}vqqnqqqqqqnjeaaaaaeeaeaaaaZZXWUUXZZZZZXXWWZ_`aa_ZXUUWZ__ZWUUUUXZZXXXWUUMKMMMMMMMKKKKKKKKKKGFFFFFFFFGKKGKKKMNQUUWZ_`agjntxx}~}}xtnljjlljgjjjgggjjjjjjjljjjllnnnqqqtttqnllnqttttvxx~º~~xvqljgge`WNKGBA:8332////28::::>>>:::>BFGGGKMMKKMNNKFBFMUWXXZaagjlnqqnjjjljjea__`agjjlnqxx}xtqqv}~~}xxxtqqnllnqqvxx~~~~~~~~}xvx~~~~}~~~}xtlgggjllnljeea`_ZWUQQQUWZ_`aaeeggggea`aegjlllllnnqqtttvx}~~}vvvx~}xtqljjlllgeaaaa_XWXZ_``_ZZZXWQMKGFBAAAA:989AFMNQQUUXZ`egge`___ejnqqqqqqtx}ƾxqjeaaaaege`ZXWUNMMMKF>9389999:AFGKKKKMUZ_aagnvx}xtqlnqlgeaaaaaagjlnqvxvtqqtvxx}xxxvtqjjjjgeaa`ZWUUUUUUQQNNNUWWXXXXZZZZZ___ZZZ_ZZZZ_aejgeaaaegjlqtx}~~~}xtqqx}~~~~~}}~~}}}xvxx~~~~~~xvxxxxvtvx~xvx}~}}}}xxxvvttttttqqqnnnqqqnnntx~~~}xqnjg`ZWUUQQQQUUUNKGFFGGGGGGGFB>>AFKKFA:3/22//../2//..///239:>ABFFFFGKQX`eeggjllnnqtx}~¿~}vqjaZWUQNMGB:999832//2222/.........///////2338:>BFGKMNUZajjllnqvx}~}}}~}}}~~~}}~~~~~~~~~}xxxxxxxxtqjgaaagjnqqttqnnqqqqqqnnllllljjjjjjjjjgggjlnnnnnnqqqqtttqqttvx}~}xx}~}xxx}}}xvvxxxxxtqtvvttttvxxxxxxxvtvvvvvvttvxxxxvttv}~}xxxxxvvvvvxx}}xxtqqqqqnllnnqtvvxx}~~xtnjjjjlljjjjjjnqqqqqqqvx}~~~~~~}}}~~~}vtqnnqttqqnnnlljgeeaaaa``ZXWUWWWWWWXXWWXWWWWWWXZZ__Z_Z___`````aaa```aaaaegggeeeglqv}~~}}x}}~~}}xxxxxvqnnlljjgea```````__ZZZXXXZZ__ZZZZZZ___`___````aaeejlntttttqqqqtvxxx}~~xvqqqnnnnlljgeeaaaaZXWWXZZZZXWWUUQNNNQUUUQQQQQNNNMMNQUUUUUUUUUUWXXZZ_``aaaegjnnnllllnqqtvx}~~~}xvvxx~~~}}}~~~~~~~~~~}xvtqqqqnljjjjjjjjjgeeaa`__````_ZZZZZZZXZZZZZZZZ__```aaaaegjjjllllnqqqtttttqttxx~~}}xxxxxxx}}}}}}}}}}}}}xvvvvvvvttqqqqqnnllllllnlllllnnnqnnlllljjgeeeeeeeeeeeeeeeeeeggggjjjljjllllljjjjlllnqqttvvvvx}}}}}}}xxxxx}}}}}xxxxxxx}}~~~}}x}}}}}}xvvvtvvvttqqqnnnlllnnllljjjjjjjjjgggjjllnnnqqvvvvvvvvvvvvvvxxxxvvvvxxx}~~~}}xxxvvvvvtqnljjggeggjjjjjgaa_ZZXXXXXXXWWWWUUQQQQQQNMMMMMMMNNNQQQUUUUUUUUUQQUUWWUUUUWXZZZZZ_`aaaaaaaaegjlnqqqqqtttvxx}~~}xvtqnlllllllnqqqqnljjjjjjjjjjjjlnnqqqqqqtttttvxx}~~~~~~~~}xxxxxxxtqqqnnqqqnljjjjjjjjjjjllnnnnnnnnnnnnnnnnnqqqqqtttttqqqqqqnnqqqttvvvvvxxxxxxxxxx}}}~~~~}}}}}}}}}~~~~~~~~~~~~~~~~~~~~}}}xxvvvvvvvttvvvxvtttqqnqnnnnnnnnnnnnnlljjjljljjjjjjjjjjjjlllllljjjjjjjjjjjlllnnnqqqnnqqqqtttvvvxxx}}}}}~~~~~~~~~~}~~~~~~~~~~~~~}}xxxvvtttqqqqqqqqqqqnnllllljjjgeeeeeeeaaaaaaaaaaaaaaa``__ZZZZZZZZZ__```aaaaaaaaaaaaeeaaeeeeeeeeeegggggggggggggjjjjjjjjjjjlnqqqqqqqttvxxxxxx}}}~~~~}xxxvvvvvvttqqqnnljjgeeaaaaaa``_______ZZZXWWWWWWWWUUUUUUUUUUUUUUUUUWWXXXXXZZZ_______``aaeggjjjllnnnnnqqqttvxxxxxxxxxxxxxx}}~~~}}xxxxxxxxvvvvvttqqqnnnllljjjggeeeeeeeaaaaaaaaaeeggggggeeeegjjlllllllllnnnnqqttvvxxxx}~~~~~~}}}}}}}xxx}x}}}}xxxxxxxxxx}}x}}}}}}~}}}}}}}}}~~~~~~~~~~~~~~~}}}}xxxxxvtqqqqqqqqqqqqqqqqqqnnnnllllllllljjggeeeeeeeeeaaaaaaaaaaaaaaeeeeeeeeeggggjjjjjllllllnnnqqqtvvxxxxxx}~~~~~~~}}xxxxxxvvvttqqqqqqqnnllllllllllllnnnnnnnqqqqqqqqqqqnnllllllllljjjlllljjjjlllllllnqqqqtqqtttvxxxx}}~~~~~~~}}}xxxxxxxvvvxxxxxxxxvttttttqqqqqqqqnnnnnnnnnnnnnnnlllllllllllllnnnqqqqqqqtttvvxxxxxxx}}}~~~~}xxvtqqqqnnljjjggeeaaaa`````___________```````aaaaaaaeeegggjjjjllnnqqqqqtttvvvxxxx}}}}~~~~~~~~}}xxvvtttttttqqqnnnnnnnlllllllllllljjjgjggggggegggggjjllllllllllnnnqnnnqqqqqttttttvvvvvxxx}}}xxxxxxxxxx}}}}}}}}}~~~~~~~~~~~~~}}}}}}~~~~}}}~LISTBINFOICRD 1995-09-25IENGMichael BrossISFT Sound Forge././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/brick.png0000644000175100001770000000025214676242340016745 0ustar00runnerdockerPNG  IHDR@L0sRGBPLTEgtRNS@fEIDAThС!Pex4&g3k}iƲ,˲,˲,˲lZu.eYeYeYe=%OSCIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/car_door.wav0000644000175100001770000000750614676242340017465 0ustar00runnerdockerRIFF>WAVEfmt ++factdata(m}iql=WxkEa]J|isvwu~tzu}sphfmwcz`rq{txyyzrekרܺЯӲĝnkdbe`fb_C>>?PCI:HX:$%8L>=7) 1PZC.*!)@WN~{xwlWhmvkhnfhUZw~ryn{~r}ttsjuyvnkpn^_qtsmgXqVYZorXTW[POYgpu}tqyy|k{ysq}}wkffvszszjrhv~UYasvī͵Ƿ¶߷ӵ~mr{wpmkbV?&",12:A6,+ +S`$'D'-/3jG-f9 ,+5BM><97?P9F9#0WEeXKEI!->4IV7;Fvgw`eZrtj^tg¨Ȥ|~|_\S:VUySb?3,8BBQad[RLD`OOnicI;:5=Z`N( @5:3  0( (<985/+HOfcqaj]Ghm}hSoemq``V\et{~y||tnpcoq{ncgafnmhmpp|v`k}sy~xmjppr~viSWks\NRWdXYSQP\jmvvgYXmytnox|n|{}fhtxpqʾ˷ø{|x~zm{ww|~~~zx{uwx{}{wr{{vot}xttqkirwyxpfhmvxteggiepplrtuxkh`dqorqomlggs|vujbaaegi][hpof[[blliplh``adkkgpqkfhcfoslegkmsokjdhmkeinrw{lgihgjow}|rpkx~{|x}}}ts~}uvxqvrv{sontnejy~ob\kofc]elhqum[^X][kojomdcirihiin{qhhedfirppnnxsnjms|tieeptw}wxxywrryvsx{r]n~}min|zyljnpjbe`]bgd[TRXXZ]^YURQU\cb`aj`aV[dfg\[ejma]]ahmkkgLmla[cbvz_Slmgwup}}p[v|~l]bjnroqzsdi~ywxxndmxsv|z}|{}u|spvy}~zwtwyy|wvx{}y{|xz}{zt|zuw}~}v}~uz|~wrstttnlgr}sust}{wxtsqry|~zy~|}~xuvw~yustz{rprvuqprppnrwvrpklllpw}vuqrruyyolmuyyzwrov~|wz|~qsy}|~{z|{~}~}}~~~~y|yz}utw}}yysrqsywvrvvxspkkmvwwspuyvpijllnopnijnlnnijmnjkhjplhhlmospgbdhjkknnjhfefhikkmkfgijfiqrpprqoqtuvwustswuvz}wuwzwtsvvqtwttsvvvsnqvyzwtqrrtuywspqpsstttxxxvuvzzwvsqtuwttx}vprpqy~xux|}{~zx|~~|~|~}{~~}}zzzxy{z|}zzywxvx{}{zxuwz}{z{xy{y||||}xyz}}{zy}~yz}}}}}{|{}}~{{zz~~}}{|}}z|}|{ywy||}}|{z|~|xy|z~}~}{~~~~~~~}}}}~~~smpl$'JLIST@INFOICOP"Copyright 1999 Sonic Network Inc.INAM Car Door././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/chimp.png0000644000175100001770000000147214676242340016760 0ustar00runnerdockerPNG  IHDR=Y)1sRGBgAMA aPLTEPPPj pHYskIDATHǝq @ ҀX N!_3;K>[ܺ.)'Y}C{ pᄛ|y,O %! KIOYBD( =,1̀QY<1̜3C<ʼ}?I/uNMW^Zp-|ߌAsK0@f^|O.sC 6[$H˻=v8}] ȩuj2)ˌ0_ &n7Gø9qϝniי<5$󚇮9U\ʳCԧ=孇gn8^8 ݿ˾qnnyO<5QiwΖw>)n8 qߚ-@Uӣ]fQ=y~։jSQrMf 0~?8r+zD֪n"mt;5;_6W!H}LJ) "%G7;n#{0ADH-(ឞ w^l_myŔl9?)C6 (. ezgO x'ۗ^|p?#?A;6"#j*u¢a B*::`Yo+IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/city.png0000644000175100001770000000021714676242340016624 0ustar00runnerdockerPNG  IHDRڹsRGBPLTEٟtRNS@f*IDATc`F fn```?A?h?R0Z(=eqIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/crimson.pnm0000644000175100001770000000606414676242340017342 0ustar00runnerdockerP6 # CREATOR: GIMP PNM Filter Version 1.1 32 32 255 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/cursor.png0000644000175100001770000000522414676242340017174 0ustar00runnerdockerPNG  IHDR}{2 pHYsodtEXtSoftwarewww.inkscape.org< !IDAThXiPW=@$lI & Fqhj4'Fd$fd*'AETIXtР"h9H`m₢tsO8QR5W}yn^ % _22‹/8X}J%NݩRvM6$g͚mI;vdvvΝ; dtt,oݺ%Н8OdVѣ,zh{ +ȸ}vtt{7Q K.H>$IL&~Gފ+-{Fo7D\jH`I/;,!a&Ir?̲Ç3 HhQfh_NN/0"bnz…ٸqSt\qfΝk+LWWwff!I ;.\HHVKGG'Q oA:8 N`r^^>IrmRG쳿@Ϟ=KN'tqqȣcE!y5jZ; CXSSÊ ̙3$ɐ'*~D(5}92$YTT$ujŊ?纂{_(,ĩSBpp0 wCd2 d0Xl)fϞ;;GΝܽۈ2C.#66QQQ(++Ä |KPGNRL\ Jf!Hp#Fz$D'?(=*;+9-7%B.503113.4,5*7(7M44Ч`}^DL}^7D 4p4p`p@@. 7@X@@. 7@X 7spu޹l 7puާ`Թ\@-<7dhtР"htР!$wu",tР!t|I ` IF I" `I? dvB4m `/v F)(oWd|W'#cd.xPP9w/` x.xPw/`bȹ/`/`bȹ/`z84p(̱ ̤14p0?04p4p,j2P4p784pD4pcc𠠤,FH*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ Jѣ>hXʴӦ zӫXׯ`ÆؠA*ճ.3bpv.q^ _,Rf)r=|Cb5dG|_ |1c̹y?\D-Ӱ^[rkbNٯoCYppƵ!6x`)ӯkd@]4lеg%^.Pa<| vtÆ , ayPA~5 bypA^ A̶AuLay 8py^i@ppfQ5ZY@AIp~}B(45rk-Ysyp 9c7%\ 8d^!1zŁBgps}L~q\[ZV=@kE,Ь-ňYL/Akz#^-K{"r^&a؍J*pֳ+Z`5<%!\:q\H Re]]u^Ԇ,֛$AtsfVy;AXÕ_piq]`t t&vyUom'_+@r`td\ta@@lwD6AǨDkhlX 4_"=Asb=#AIdzyYAw*hr APa 8un-v4O!^DX/ƽ+ \Q[uQAZTB/,fYS\2BL^5 {[ۨo8u@4JaqQPniBbƉq-1c̰5T@ Ư/~İlPp1B )<"|H6)_ ŌKFƨ! E;aXø\*han75,iR"5 _ [LlHVId~%cw$)y-IL0@@"K`J$F3T_ +fiq ,گ6YU*7zct( X]I8ʌ^cW ~yE_ަi %޳㞏Bˆ 7bJ!d~L'. Pp0O$`-*bYgByZp)A E5~142p@9jf-9dT&{$Ufb RԔ3Eu-= ifz^W3TN6Pρ^ suBJԋ4^6j܂5!v|@*9m d^*ʶm\ў D!@kjs hEfǠSYp*E27R8Wܼ LCjY6Uk'[(ľ̬eǵaDnXǍ3Ar%8=@:ZNa"eY%0Iߥ[x3 !eL `:ZňETDH&6IZKγ.%Tt" 1U@@s# 'v;X R(JԞ(@6G VQCBf꘹ *=ש@($##~za@2[d01{Rh9CߦGMNNGΪs\ Z_ýw-ͺW׼|/ of;$ 6`j^蠩in3Nfj_zNo;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/explosion1.gif0000644000175100001770000001456114676242340017745 0ustar00runnerdockerGIF89aZZ #,=,B8B7N@>8`G$b  hHB2 7¡ $<aK_d0 ?R pKEH9-R P"' NϢ.V̠\ .nXh`PpdpPb%D0Ep p"$0 ApEZp0` *t mB#BF( #HA1L0.$q3. b`@; `dCFv,@FaxB!h 0x@DMC.°'(ƒX#(j}c/bT D@shhE s#A%! D! dܠ2q _ %׆O2HY8hIaJ:[H9j \D泺)\$M(B IOQ &B DxR&) B&0=l.dpE( _@#@*A 9dAxE@d" C 0 b8^ 0@ /( N[t 8Aia vD8P S#"!_<˸/l`)31=| LPk \0EtHڐ% _s p @pL` dr 0 e VW " >Rdb,Z@ `50 ` g` g p O - |%#% -D&8  gmT gPDCנ. 5 J p πpfBr kPQ(pɧ p(- Xs9n rP 0 @ נ 3Y1 ׀ R\P M#݀ih)ȰeMi9(X0 iP;Aa a$ w P 0) M UZ&  B &6`MP.%L J ` v P/@ 3J, 2(R0#SX 2-T+ p6 p 0` հa p c`)B'V b@ 0dq O^|r 0]w  p p ] P p (E[28(V @dppb- XP(@WLPn{0z06 ` REPb c0\*X%N fYZ)@XX@DC ! @ w ' f   T;YD c`P, 0*}p/1b ?4&pP9p &7 p F #U0]f1\- [;' *0^r@ ݠ:v(0"{   xD man$_ *!l;P 4pL `%| % АzQ`n R ?:ĒE)P@Ȱ %_$Zp4+A]6#0 /Sg vN H! tOC Z(7pOj* LFOBJ{!' 3! 1p Jsm{\7p^Y9Qp(bM >p.X95 V j pi    -$ 0,Q~lWb NUQY`Jn j 6 @ @ "Y R"aP$1# 7 , i;jP 0fTM V  AC PSC ~uE@`-EQ+e@aY0R0a |p 0 " X,P 3 v9 CpPT ! r |HH) M2)6)7n >1 (4ю L2DE{(kFҀ t!P - 9OSJdpۍ }FY  : A`9j:ePiP h@ P0݀ @_R0#wP Hӏ!$)]VN- h c. ˕ D= ~ ϫPqU0 5PJؕ-  sָ km /7 ɭv qc F%QX鲹 T@Tm8 A)0 \%s' I H K p >I Ak1 PB ! zXpZ0쒐 2 Sd @ #$   ʕb '0+ 3b  4Kc10@u0 aR 6o_ pA'  Ҁ #DCIgn tPn qnr ᶸq ଱@ & /Iы< aO}p_:Y< n sᶃ0t/a  @ K @p , 1Ι94 V bJ""/ 0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TrT=iASImd.B]IZEOa̋[<9 ۉz:9Vr}K $̕𭆳pC~C! 24'G,]6Oٲu>x (ؽsRoyK2,UۻRb`8)Dkkȿܿ>&Q)2 [~ ZIHc8/߽X@mj&󍑔(ල1'%OU:<;B/`"FUT9w[@Q=?t"C[]ZaI''4u ΙVOꩦ^6 LyEv0z %q0 jN7Ś8_jc5U⼐%pp2߻w\Y h&A.: CU $8$7"!t x3^<9&i`PF( BS.Th*“b{ucZv^ 6XPxw7 ~¥xuF@&'U_TрrIڅ"HvSZp2/mo0wJ΄ubشvF|V_DfB p//vc$$藓҆Mi0Aue91ǃޗ^zXקM6Ϊ~ڈͱyi,^^V;Vo7l,p~}eoǃ:?ndE3LIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/green.pcx0000644000175100001770000000050014676242340016755 0ustar00runnerdocker HH ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9971118 pygame-2.6.1/examples/data/grey.pgm0000644000175100001770000001007314676242340016622 0ustar00runnerdockerP2 # Created by GIMP version 2.10.20 PNM plug-in 32 32 255 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/house_lo.mp30000644000175100001770000034314014676242340017411 0ustar00runnerdockerwj@\Ar3QxB`|ʨ3UM58NJ1Iσ< ~1`,%"AB`Pyæl.a0H%e͙&D `A\uk>9rlT&DH`7iq4gHq&m1AR똡F(AY8wm˖YsǏ3ƌ5):6LŅ.:9p6a@ jw+τL}Lt$ED!2MtA\LV,qnq gssP9W6cq y2_DfJfHb^qaaF FBe^C9`+3wN)ŘZ L $Ctä >\ )\LwH&LȠLY(X[ 0k9ᆀ4фq `|L0tt 6ønjP$sLE(T@`Ja(f ~`*'fٗu?Y?Xo"5t:ߵҢ⩈)e&UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU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G ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/house_lo.ogg0000644000175100001770000007514614676242340017476 0ustar00runnerdockerOggS?BH:Zvorbis+HqOggS?BH; -vorbisXiph.Org libVorbis I 20070622vorbisBCV R!%SJcRR)cP[Gc9F!dSI{O*XJRX)ESLSIR)EcSH!S1esKI %lMtKc1FcZJc1EcRRIs:f%d:Fb|0:B(R-[S-KiasJjc1S(АU@BCV P EQАU@EqqG$BCV@((#IdYeYy/.!I̐SI&)U99dRƘbQΐS 11)N9 "CHd K=b8"A!Ɛs J!rI D9)LJ(I -"眔NJ&RˤB+8XRH)ĔbN1R)ǐR9Řr1 T1H)sN9 d * 2B!+8$iihi(z(y陦zlyiz)k늪j˦ڶ骶ʲn۞ʶnml,ۺyꙦz麪ڲ꺲홦늪+ۦʲʶʲk麢ڮʮmʺʲ۶ 躶ʮ-lBT3MLuU׵mum[3M5]WEueՕu]ue[LuMWeUeYeveWE׵mU}]ue_meY}uu[eWeYe]Y}SU[7]WM}[}am]WUօUu}eu0,뾮00m ëƱ뾮ܾj۾1nƱm+loq,ʾo/ *˺ڲ˺. jںp̲. +ǯ Cնuo 7v@!+8!c* R !T1!cJJI!* dIJhJ(PJKRj-Z JiZj)Rlc2dI(VJi)sLJƠB*JIeIɠ9HRIPJkJJJmJi-ZIRmZ# dAɜRJIZ朔:*J)RA(%JIJ+JJRZk՘RK5ZIPJkS+5PR JiVkj-PBkK*1cmJi[)[XSK5blJ-9ZkJ-R[LXk %JiZJZJ*ZlZ5b))JlX[l5blXR1XsKՔZXK+5kn5R@ eА@` cAhr9)R9'%sB)eA!99B))[(%Z, M Y D ( c*sBcAsA)cA'%B)B( lДXА@` b 1 tR:)LJ'Z )eJ%ZH 2k%bFXb*B(4d%@c9gb9!41*ƜsBc9!9 BsBBA!RJ B)tBR *pQdsBCVy1J9'%F) [cRjb BJX1!b ZvRj-ZCJXk!b5Z{j-ZsιE6' *4d%@ c9b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rk^XYYSQTWVTVZ^`abceiptrrx|yy{{{}|}utyyttz||~{{~||~~~yzyfdw~qeq|t{}z{||{{ztsyyohsu]YfkcY_w}hTYltg\ewuc[cllgeinmc_dlmiiotvx|{|~~~~}}{yxwwsnr~|{uv}tvzyrpty|~~zwvwxyy||}y|}xssvz{zzzwrooolhjmkffhhgjoolknpqruwwz}~~~}~|}|}{vutrrssqsvy{~yxzwz}~~~w|zto~nxv~polvyjx]pssn}|{o_sv~{pyucu|y}{xwn{u~heslzveupr}vuez{|xi~|{owssvtggsfl|cohuwrhbh{{~}mhouo}pnux{rr{rpsu|u~{~t{fwy}xk~gus~tqu|ztd|t|wt{~~z}tyurt}zupzvmen[jn_qcuqoo|dvara{sX~qsg~iq}jwlwwxlyco]zsqfy^qxfmjxpsosznxuq|~nry|uv}px|tvswmzssz|{xvovus|{z|yswumqxo{so}}cb^saflfamh`slfwvhnwstxusuk`ljjvvyly|ywzsy~}~zzxww|ywyqvsy{vpbuzzy~~}{{}uuurwxy|lq}xssd__ui]\eidvovvsltntksksrr|sjoglmohmgoqotkdenevqwttptjupmmtq~}z|y~{u~{{}po~z{mu}|vx|v|xyzzw}|}uyqsrnq}~|~~~{yuvy{y}zyrunmkhml~pqrtsrqxqpvr|xntppmro~z~z}}ytywvs}{{~|y~{|}xv{yzutyxtuojzzvv~wvw{}|~~}|{}z{v{{|~||{yyxxwxxwslrsrrpvxsqpq}jm~rbjwq^cqolqzxnuyxpt|xpvtsswvrtt}}}{|vqkruorsxzsvvyxukmorq|jU`vjdnuhfxuivsjelsealnhacrh[ktmt}{~y{{~yw}utz}y~y~zjbtyh^`h`V`nkbjuqjt{vt{y||{uy~z}yv|z{y}xzv{}}{xpquskgvvV]mpegmomqzo{q}zs{~z{~xtsnponkiedltsjoxhvwuvunnzveboohcfmkqsqoosvqlnilnurmhpmouy~z||zwuyzyvvzvwv}wt{zlv~c]n~qnq|wwmqvsi\befigd`_ennnnqw{|}z|}{ywuttwrt{}z~selquqe\Xbfj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umhe`iUZTUb`dahtyptlcds{jnustaUonqxxr}w|muoeigaifaeiy{nmrx~}stdbbgvx|{w}|~~yutjhgjmqneoniheacc`goz~}voninqrvyzyyisabVO\aPNPUet{spda_dbadcbUPUWZ`kbgmnvz}w~uz}vttsggf^b_ppo}|}y~yr{{~xvuxx|{|vxxzmlfk~{|zwmlgfhivv|~zrqllf___]\^cnq~~x|u|}wnvz}rlgmonqnyzzwyuy{znjdch_^mms}~~}|z~qrmcbYZetx}{~ystqik_\eedqx{utfj^t~d}{sq[ngp~ne|b\bhjmajGYbbemb~wurzzTu`iT`f\CR69aVdjevtl|mt\vjdam{vwrk}u~vztp[}dh~}{yijPxuo}mxxnp|stZiqSKklosZxey{potYogbkm}yxwugXbisixpm}euvde~l}~w{yqquwvXscdMdQOfpc`rgpp}s`lX||t`ncrw]`Px{bmvyfxo|wguqnl~bJt^nsbzzx{ygfrxr{}ne{bwfwpy~|y{|}omuicadhYZ_lc}mestumimyTa\`fXPWVa_c]pgbysgyyupn~qwjj~dzoxvyzomcijs~szv}mzlrttspx}s{xli]ejdh{hkctz|vvjiup~}~pdyiz|vw|{|zvfwkrotr~}{{px}rwx{|w|sad^RY_U\TY[cY[fgklju||~psjvoofmda^ffkfonsw~uomrvmoplchgkqmxnuysrlhtrxs|zv{umtolziytq|{~y~sroikujfihnultnoolrpjiha]]]glnfb`lglgphsp~}wtyvvtys}y{wpuq}ozyyxz~}yznqrwzrrxq}z}xnuqnoiminnlioknrqwzpzompfcqlrwoswpvt{z}~yvuyvy|{~vqss~|tw|suoiifgminhjplhppx|zwy|}w{ws{zvv~zodihosmgjksvmgjfvz|~|}}{zw||pdagcjjag`huv~tt|}~~|wonotxxzttyu~yvwrr}tokhlmhilhpnnkjlvyTKOgtlYXYjrkf[MXaij``inw|yrv|wuqmiglwuqn|w^U[t~ubZbo~vp]]]llk_X[`rqsc]chstvjmltuxqmux{{szwxyyvu}z|~jfiyz}nferz|mabeow{tldnvz{mirwz||{{|wx~zyrrptvvw|wyzxsovtuorswxtywx|{|{sxwf_dpw{vf]fv|yrmrz~~xvvvustppppprru}}~{|z}xtooqspngemrvrr{wqdVZiprj_[aktobXTVfmnj``lv|{tuvwwqmqsx}zywupg_ailmaXV]hsolc]gmnneadegkllmmklmnmonquzzz}|ywy~}vssuwokkmrpstv{{xtnmppsyvsrtqqnonu{~{vz|~xutuwwumiijkkortw|{{wx{wtux}||ywwsvty~}x{~urpqtturz~~}}~|||vtprutsrstpliijjkpy}yxrqruvtoqswyvrmlovvslnruokiiopppljijigdhot||{z~vkloofYOTY^WMJO\iqtyÿ}sib`\[^^]YWX]cgkr½xplfea_ZTOMLILKKQ]hptwxy|Ž~{wmeZSOIC@@@EHJHEB??@FLTZbhlnppsv{ynlv}s[GGR_`RB:=FJD4-/9BFIMVcmsxſxspmif`TICAA=:89;?<8988556:=CFKMLJKKOTW\fr}|rhb]XSRUVXX\]\ZVSTUWYXWWWRPNMKJLPTY^^YTUY[\^dks{Ƶ·{wyyvruy~zohb^XVVUPJFFC<62211489:=>>>@BCGKPVXYXSMKKNOPT\djlqz{ywsmkkjfa^\ZVROMMMNKHB=74/)%%&'+1662/14569=ADDCDFEBDNVTMB98964225CEGV<*2IEg`_egienyɾ̷y|ztxx_``Q[^TCDHGU>5:BF(!$#DRN>@/*0BD[gbUH_WRNe`fpcfo}r~|³̻~zqaxsosd[L@?S]E\N7=@-DKJ=IK3719-7=04@G.0:8EUG:?B@P=`JbOY@RKUaWWpqnw{ot}t||Ȭǹȶ˰vvxlmm_QSXLE;HP60?27DJ-@AF8B@8,,<;=570$:=:;!5*D:;@;1/<;L?29%0E?4ENUbMMSnlbqjpzj{|xx~òƷѻwvkrltnrwo~x}ony`e~r}j`an_Wh_aglMPWSIIOHJI==%8.<;)1/%=D9N:@?DLP;PPH?KRQOMEJTTZei`]\]Xdy{m{pgjfxlhu}{tpzkltproimbWiwsel]QfmksgcZTHbbPbZBOXScf]^QS_^gZ\NL[WYDCC>I[[\Vb_`gqafscgmkk|ni_VbZdiqmqpovrssyyp|y|mpewlnnss~mot~s|y}}{jmkcjrw{vuwx~}zzfflmmmgQOOab``k\LOQUYYXSTWYVPTVFNCJTPkcUarhnmmnqu|vjk^jrw~{hfdjxurwcajjuzfeeYcZTXbidssqoplxxw~zy~{}|ws|||}wqu}x~{~wus~zz{{sqrlvkolurvyz{t{~vicbgfPLGJNGPPZ[_ZMWWY[VZ[hhidicg`defojlp{x|kzxlwtopx|o|}w|}vzyx{}}~zxywttvoxu}|ws{{~y|yt|{yysqokgdq}zxr|ztlsxtoZ]`js|u^`^ij{mT^U_u~plbYQ[clneqnju{zzulk}t~tryupo_mrrqn]cjnv{qvz|wsr||~|x|~ss}xfdhmq~{z{tux~|vw{{}loslrrxzuzx~wohfeqb]OHX`mrwkh`Tjh|wrruflrquxunrswz}{vywqsv|y{z}y}z|yxljpz~xytiwu}votvt~|{|~}|tz~|~{x}~{{mot{y}}tt}~~}|rx~tpmzuupibc_ftxxsjt}|yqwx|wzz~{z{wxrmlwmooprw~{|y{w}x{||w|~}x}~zzz|~~y{xuhnoc]|v|Uiyxutzztj~sw{}xtxdy}kexgxpizovVue\^joebz|yyo|txvvdqugfoi}ywsr|]nsrrxd^a~tclxp\njt}vywyrtr{{{t~zww|quzap}momo|zviĚ~zou|sgq`lumwt}{xp{kc~hfqWmujkvbou~th~ioz]g]Nifl[qZhwrjtjulsnydsWuxznl}lvoweis}hup{gx|s~s~jrrxxqsemvxss|oqy}}}~x|ytl~~oqn{{}{~~upkrpevv|xpyxszv~jmc|nuylbvgyfsunwwgjppkfhkpm`jimvnjdmmtvvwortx~}z{x{v~|{unvqesry|wzvt}tuovkvouwtwkw|tmlkjrmonuuhzhs|v~quknjmkjm^ba`gdiadeisokggjsjtpqilsumqvsnwpxtstsq|y~{}~vwsqyuxiqsvyzqunvy{}z{|~{{{tyxu~u{{~{z{xxw|zsysstz{ywvnokkniscbguz|z{prtoxxswljlso}rxqnkwpx{rutxq~~{|~xpwvx}y}omqwz}~|}|~}|xxvwxvxrovzzzvy{{~z~w~|~vwsyveZeprc[Vbpsrdabmu{shilwz}z|}|z{w|~~|twtussw{pXTWhur^XOZornaTTUisotkbw~{s||~xxsu{uy}}{|nmj}wh_^lzyka[^dkqnhjmpvxuvrvv{~}~||vxwwuuxvmihmquymbelsqh`\gn{zunmpvz|~vuxxzvuqtpquvu}~~~|tts{~sjpuyqoty{uqkdhikjjosolfhnmtstqy}}}~~{vyv}|qmnr|tf]dnvmha[bghc`WZ\_glu{xwvqpv{z{{~}}|{~omp{~xqqornsmkjhfgiqvqlfdfju|~|}vx{}{y{}{|{y{wurjkntzwmc^afjlnnmidfkqtxxyxz~{xuvvrplnprv}|yxy~}uspv|{vtusqoprtutqokhilpvxxy{z|{wyv{|~}||~~|yvopw~{slfdinspnea`bddgiov|}|xvtvz~}~~~}~~~}y|~~{}zxww~xuux{}xtrrtwyvrmkkpu|~zxuwz|{zxwuqpqswy{~sprsrj`VSUWUPE<;BQ_knmms}þ{yvpkfhmv|uslgaZULG@94248?=><;:84337>ELNNMNNRSUWY_dkouw|~xwtrplgd^YUQQONKJHJIGD?<898856:=BGLNPSVWY]^adgikjklot|ſ¸~wqnkgbZSLGDCDHJJGB>=@CHIFB@@ADEFGFDDGMSV[[ZZYXY_hsz|zwuvz}zy~zsnkkihgggffhihd_ZSNLLJGB=;9<>@CEGFFFFGHHIHD@>?BGNT\cd`XPLKTds}|q`TR^owonu}{yvrmfa]]\[YQLKPX_b^WNHFFEB=720135433568:<;98532344210138;>@AABDJQZ^][Y[`dgggghimptvyz~Ŀ~|uuzztqptx{|{ywurnhb\XVVUSOKGFFILMMIFDBBBCDC>;7669;=<:89<@DEDDIPZac`[WVX[^^[YVX\aehlpuy}}zurooqtwwuph`ZVX]`_[UNLMS[aeghfc^ZXXXXUROMMNNLKIILQX]`a_]]_aba_]YWVWYYYbknh`\^eltyuj^VV\beea\XWZ^acglruwy~|vw|zh[Yaltxxtomortqnllljgedfjpttqnlmqw|~}zvtsrpnlifcaaa`adimprstvutronmljgb_]^^^]]^agntvtqooqsrplgcaadfgntqg\VX_hs{wiXLLWbikdZSRYagijmqvz~}yz}}m_Y_m{}slkqx|ysmihjkmmljjkmoponoqsuvvspmmmnomieccdgknqstwz|{ywusrssrnidbbcdedehmsxywuuvyzzxtmgfkqvyojkqzsc\`kw{vi[TWbqz|xtsxvmjlt~r`RNWgw~|rf_bmx}yqiddgmrsrnmpu|{wuvxyxwusuz}yvurpnopqrsv{}}~~vnkoty|pe__fsq_PKSalqndWNNWdntvvtqqu}rgadnzveVS\l}|rnorvy|}|yslgfjtwqqw|vrqqtwyzzwronsz~}~}zwtrrtvxwusrty}xuvxxvuuwx|ysons|sgaadinrtsqpomlovyx}}z|{tmjjow||wnebdkry|}~{vpmou|~vqt{}{{|}}{ywuux|}zxwxz|}~~{wrmkknsy}{sjb_`cfhhhiloqqonmou|~~}wrmlnrw{|zwttw|}wkx{{ux~nzuarntdqcmqfngyrdu{{sxl}s}hq~ievwxhdpxwyxap{x~p|rs~|i{txq}pluelw~}{|xtv|v{utodeyYjv[wqi|{piuu{VZtxprwbpcs{um}~y{|wy|}{}}~xiykt|uvytpysp|~kfpt{{h{rxkt~dzqqwvfin|myyvot~iqtj|twq~}v{pmvnzw~|qz}vXte_romfd}|t|k|~y{v|~zky}j{yqew~uslvyru{tmex{qxzw{ox{y{p}w|~}urxzmro~r|||z|iwz{wiativqlw`ialapkpeur{knospv}zyvxx|{gi|osw~zq|pxuzu~y~~~~{txwxmmvhmeoxy|zv|~}zw|n{zvu|~r||x~vr{z|yk{kkvxrxzz{}}yuxvnuzvx{x~xwyvz}}svrurrplekmoux{~yw}w|w|uoqsy~uvr|wzt|ssxn{{surr{}~~q|~{wyxv{}v}p|z~~~{|||}uturxpldaddlfmkgimuzz|oplu}z}vwqzpvu}rzz~wtusz~}|}w{vuxz}uqmoowszzx}}x}t}~}t}{{{rimoptiglx}ztmsw{zwq{v}|{z~}|x{}|{vxv}{txpkrjnmjopk{{|}kkpy{|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V]_[WZYltqrumeflww~pcijbrvzyyrz}}qyw}}ny{~|ldfkc_bZKNScdmklaF]^joofOPIagcdcdVRijkysimq{vthd`blxszYhty{}oqrxobas{uxfPVNcgtedf_Tclv~hqdghpk^ceabkhp|xiutqtvxopfv~x{}zz|urdnlhhc`ceoqqkfbYfrsm^X_ee`fW^cfaentywz|z~vioq}rqekmgnsxyviqsuxqhuuhqpec``nmfeedfoortxptnnnshincllx{umlk~ulyy{zvvop{rwuw|yyv~mlhl`c\b]]Zbj}skg_cdddfvptfd`e\clbgjomyt}~}|sxw~y~ykmpohqw~|{}}~~xvxvwtsf`gezujms|uuuzyupiddkrxxjegkfphbbmquuuohgemo{ulpajcddmnnkkp{}wxnqqnpz{{|x{~qpnqopysopztx||yy}{x}ytxsihlonrzzy|}~vrt{}}vyw|||{{~rnrsuqy{x|}~v|trlvstimissz|{{knmlqx|yuhhhbefkrkhx|~z||vxvtwwswvx{x{yplhpp{}|y{wtt{~omb`gtv|~ukr`or}w|p}otx~iz~w|vps|v{r}xap`qO}Wmzycyuxvuitpzielk{`vZchkp}{lpujnjkihXseY\}awbodsastYvqhhs~{r}s~~wvxunxzn^oalpnzq|{|u|k~utw~hnxiz|~z}q}~{prlwydqecfnywtc{n|o|btqngoz\]]nqmifqvq|wz~~tp{gfckp_lYmjoro[zmyok~s}|w}hv}{~sq}yu|w|~~x~~wry~vvoyxso{|r}~ut~zzysy^poayfetg{nkdviw|{cwbghphkq\egtfy`kkqpulyaysz~wypzy|~~x{x{{}}{vwxpsj{xwrlqxp}zy|tqysx}nmyzrzphlntkds_vwvvpfxkr|z|qihntlipkgpmguhooz{u}wtqqtwgnblix{pniiqpyvuuzuzzyx|y{rw|{{to}}|zwx{z~w~z|{{zzz||ywuqov{ttxw|y{xvuvoqhopwzwyqxosn|qzoysrpoghoq|wwkbhkpnvstwz~|}z{x|~{|{|}~wzux}}}vsprrxu|}w||~}}|xuz}~wzz~z}|}~~||}xyy~yrmifpouvzzuwuv{|}~~||~{~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ehhhgeeeghjif`XTYPQ\`c`bdhsy|yxw~|zqx}xû¼~~}{z}~~}iqflkrxyuuifojkkjedjnYS>4?HQ\SIE/-;I`n`ZU@IOWllXSWONV`c__SSeovwunqbmuhumkefjnoqikpty}{z{xv}~psdk`un|x|w}}yztw|~y}{rplifka^_[_fgtpomfc__kips~sdWGNKT]gmfYPMO\fpskd^SS_dfec^YR[^hnljijv{}szz{xx{utrmrvuzx|{|z{ljlq}||sp}|}}xyywyyuwwy{umorvysiXTLT[bjibSLHU[jqsonfhahkjhmlmqikjou||~{|usrttruxwv{}}{}uvuv}~~|utuy~xllqxyxqooojnjnmorxtwuuolmptwzqf_Y\`lt{|vne`bcjosvwuqlc\Z\cnv~xpmnw}|{}}vtnloswyyz~{vqnmmnpuy}~~|y}}~}|zrmfdbfiossollmrv{}|zzz}~}ytqqv~~zxvrnifgglqvx{ywsrppruw{~||{zyzy|~|yxxttuux|}{yy}~yyyuvnt}~{uxjkkoprnxixwy|z~bewtr~vwlyrw}Z|zu~s|}pkmwg~n}qjyq{\kmfszqfk|l|ujzzartzyz~tsz~hkblbr^ye^p^fly^z|tnqrr~twtjmzizxkwzztzvpzu|rwkvm||ubkdubymz~wq|{hf|lnd~zozhrpnurt}|wr}p~nw~ntsfvi}hqUlihhz|infsswjtoqutmyuw}{z{~g|}zti|nx||y|tukqwwvm}hwny}~z}koozvy{zq|x||}l||skfujquto|cyzossy|myk~v|rqr~tknkxg~elkkmi`n]go|xvutuoy}xuzmzy}~z|up|w||s~xtxyt{v~}t{vxxprkkqqw}~{}~rnrtqzy}qyqoquvq|wvp}sy}v{u|szpmwgsusprdpbkisuvijcqpqrsnfinjxkmmwxrztuy}zz}wx}yu|wzz}z||w{{xv}quuyu{}~~ukpgvpvv}||zzx|w|w|qqs|rp{qvqswyyw|tur{u~|yzuu|yyxqplllntuuustswz{|~ywvpstw|{wv{ywusq~uw{wvzytv~}xtu|sw}~{{{}{~~}vtvw{uwvtx|zzyxrupmxtrvutqpormtrtv|{}ztwswv}z|ystqsu}zuoturplhhjnmnpmhsqz~|}~ytqvqoskprpvrpoghtlnphjhgt|}gfiq~~}unty|~usuuwxyqqotrw|{{{}|~~||}w}}{yurvux}{xzw|y~~|szv|zqld\behhab^\fcgkhioqyuu{xy~}~}|}zt{|}wzz~~~zrrpwx~{}y||~|ylklw}|zpkdkkssvrrruyvzuxw}y{~~~~~}zvz}z|~vvstusvqnlns}qickqtxogc_bielkfkjiqpqy{}zxtwyxytvttoquswtrnnptyyqnrz||}zzvttrurqojoqswxrrpmvz~~~~|~~{y|}{}yxyvyx{~~z}y|~|vrususrkmfc`_^abceaebglsv|zwzuxz~{{z{{}|||z{zzvuqssw{~~y{x~~zppqprrrrqqttwvtwvv|{|~~~~{wvuvy|}}|z~|{}~~|ywuustqronoqux}~~{ysnmnnnqpommmprturrrrqy}~|zyz|}zysrmnpsy|||~|z{{}{xvvwvxzyxwtsportw{~~~}}~~}zwvwxz{{y{||~~~~{wy}|{wtqpprpomgecgnu}~yusu{losmq}gn|U|gr^tmiyuba28Ljeun60NfPKbO:Tjб¶ίwnzNkjOb}{Ovs~xulVX^VbwYT3M?2<>?VYCBN`}^^elɯsbzrkk`^BG?QTsGJA;TUJVY7]OEMMhbold辰ܼζɏl|vpUVAPacCC7035&=9<43@69H12>PLOJBEfTCfXLaetvvtżǮzzicpShdQ_\LI@aWSO,GC.RbD@OB6U?PK6KGTRcT=>TIjo`n^ULemVxgƴ̸ѶĽz|l}nrjtdigPZXLJ:A>VK=FMYC$622^c_QB0&(86N\VOEMSII\YiqZai}{Źëzrwg`vp~|oe^UetjxnRLJ7ELPFLL1,014BF6FJTEGM>YbRLIKIXIi_z}|qmi]iZSrkxqkZehjutpx|~yӿ·ĺ̺ʾ·~vbnofdebf[ZYcUSNQkSPZJIOK0>7A*-% +<@C;C=0@>UD:995$>ZXOd_llOKMflYndf|wgɻwdvdfsj_i|wjhujjdynkvkP[TSPGPSPRRLINI`[FVEAD7;?%;=5IB5G==CGW[MPBQ\[iwsdUVOPcjql]safsrnx~|}uupvtyx{ȿ|~w{xvqkcTsrb`aOMZZTQLQ`a[wnasWX^c`f^YJOUPWUQMNRWa\LNRH\b[WXPPC\NHHW;BGMPY[UZ]^fmsqkojpunqxrpdkfvklqxmt{|v˷z}w|~wptp__gdZUJNFHOVX>FASZhj`ZLY`gmu|bR]V\noe]X]fjvz|nqpvz~poptafiXZ]kpuogaadhmhyzxrlj\bmrwlqetk~xlqwwqzqjus|}rwkWdkqspunx|}{}}~ntqu|swzwqrz|}wki\[X`_[gqso_`hrsgqbmouldhfeeiifjlp}}u{yz~wwptrtpbhumcori{}rsvsdil}usjh_dcb`dkqjgopqvv{{rww|}rk]qvxsv~u{~~v~vunornooyzz~jj]heiac`i^MJ@NTX_`soukhlojs{woomnw~paqkoz~sbfo{~}{{vstu|xyrz|tnut~xcb]itrx|~{{trmrosw~}|~txt}~trpttrqzzuyy~||unjec``cmow{tpxxwwxzvxso~vys|sdoy{|p{z|wpooqsuoxyrzzzz~}|u~zuuztnnihnp}{x~|v}zsvvx}y{xsnidl{{|}~{{~~|w|}tspqrz|uqjnjhfkeg\efhktv{}t{{zqormev}splovzz|{xyzvvw}~wyv{|juww}|{uvnptx}}{wsrmq{~{z~~z~|||tpsovarsjqsivtqkstmt|]jjwqyolyxn|syy|qygakdqjfnYUjc}^e~wna|wwrpbq_rfotmls~mwymkyktmb|vnkyu}ztzrjux}t}uwrxy~qgowg{rrgmUrr~qu{{nvru~~{~x|wu`fpzhcw_j~i~wuwtugmZkqTpcYxwwrxbloolcfeoqnckih]{qnagwr~jdzzo~tqb}vm|yx}~{{z{w~}~|wxrts{bpy{smohrnunid^hjskrlt_ijmtijot}zr|nlyf`rnrvwp`hb}u~psovmzrikty}v}~}{{|z~~}}{v}vvx}{{{}zkrelw|rqcos}|yy}y{}{{x{mt|}qi{ceoyszxyyux~xstkrovlkpqqclqox|rqjhhnjkknkrgsomkhjgpqtrvu{y|~pqt{zttw~xxy}|}z|}w}v{|}{y{xzyt}o|}~zwwtvypkiik{yv|xttqsplrmlropstoqqw}}~xw{{wo|xzoyzvxzxtqnutz~}}ttx{||z~~|~}~{x~{~}}wz|y}~sy||rxuqxu}~{zuwpz}y{~wvvz~{~wpxzytzxssrqrrpuw}~|~~}~~{yux~~yt{y}~~z~x|yxvwnupnrpmtooupnswznc`ahrvwplgjjgvruzoy~{~{y~~}|}{}uwrsrsty{yxllijrop|yz}mcZZ^fpozyskb^\_ckplsnllkiop~~|{~}~~}{w{rrty~ticblsuxyolegbcdchintvrrljint{|yynrrx{{y~uulqysifdp}~vodbcjlvy}~zsnllpt||{vzy~xv~}{}{{z~~z{{vsjgikx|vh[^^hr}~vrf_Z\djt~zprsy~}||{zvsvw}}~ywtngfirzzqc\TZ^kw~~xpd[SV\`lruusie_^aiq}zvy{~~|}rplsx~vn_ZZ`hu{{vj`VQS^cotzzsopgghjsyyyzwtvsv|~}|~}z~}vqknu{{wponmottvzx{ywumkmsy~}~{z{~|z}}||xyz|{yz|{}xzw|ywpllpv~ysljktuy~}}vokjorz~~~{|~}ytrtxyy|xwurssuvsrrrv{~ztnlmnqrxz{{wtwrqsonlknvy{uomhkpv}{|~~wlc^afmvvn_L=48?ISXZYYU[dp}ÿ~~}}||}|uoke`[URMGEA@ADIOUWVTRQTY_iqzztle_[WVUVTRMGEB??AEIMQVXZ_dlt}ƿ|g[Z`iqxxkYF927DR\]WK?9:EUdnrnhcaix÷ule`^][UOGA;86631/+("!#'*+,,/4:AFINT[ahloporv{}yttqolhc]XUQNMKLNV^_]TJB?BL[hnlaSB89DVhvxncYV[jy̿ǽ~wojda^\ZUSOLIHHHEC=84112455689=?@@?@@CCEEHKRW[[]_``_^_bgow|}~upr{}m]NHIMTXYWRKD?=>@DHKMLIC=8336=ELMLGDCFKPTY\^``aabcegijjjmptxz|}}|||}~ÿ|xvvyyxskc\VTROMHEBA@?=<;::8766888642.)'%%$%'+.49;;9531027>FLOOKFBACHPW]`dgjnruy}~zyxxxwutttutrokiijlmnlga[VRQRUWWUQMIFEEFFEB>:76668999886788889:>BFHIHGFFEFHKNQTVY\aeilnqqrtvx|}{yxwz}~yuqomlkkjihgfedcc`]YVUVXZ\]]\[YVROLLNRX]aba^[ZYZ\]^\ZXVUUUWYZ[[ZXXYZ]ekkeYNFDJUbklfXKDFP^jqrle`_dlrwxxvutstuy}zpow~|zyz{||{zxvwxz}~~}~~}{yxxyzywsokjjkmnnmjfb_]]\ZWRNKJKMNMKIFEGKQUXY]ab^VLC>@IUage[MDAENYbggd_[Z\ahmqrqnlmpu{}~zvvx||vokilqw{|{ywusqomkjihgfeeefgggggfhlookbXNKNV`inmf]TNNU`n{|rhbcgow~ytstx}~zxx}xssw}{yz}{vuw|}z{|y{{tprw{wvx|}vqnmpt}teZUW]fotsng^WRRV^hputph`XQNRZfqy|yrib_clyumjls||uqopu{~zxwxz||{xtrqqqqpooqsvwwtrputjeekuzqlmt~zwvwz}~}yurqrtvy}|ungb`_`chmruuqja[Y]fr~ulggmv|zz{~~yvuuwy|~|yxxz{||{ywuttsrqrtzyqmklotx{|||{zwtrru{uljmv{z}~|{|~~{z|yvvy|~|{|}|zyyyxwvutssttvwyzzywsrrtx}|vqmkjjkmnnnnoonmlklnqux{{xtpoptx}~~}}|||y{~kmqg~svs}|v|u{xzkoqiqhqovsjuunvqm|`p~`x{{s~swp|{wq|zqZiqjezmepqdn}~o{kxuqxuesdq|nprliij[zhw]sj{^q~fxm^ty{~p|x~fqfzh}t~~{zwthx\nyqdufzehp~^f{s_enqfkqgNgoh|pt_uz`pbw{qm{cgvjkf^tclum~tmsl|vkupesju~~|}ru~wxus}uly~v~y~}{{~z{|otnzrsckzg}uqvq}~vms}qj~yvuosz|aitsotrvvrvgtjk|x{rxtm}{yxx}snvlw||tpwz{qusyn}x{{swqwns{~{{zyyyy{{hpquywtst}~}qu~}zsrvqr|qultxqtxfhhqnsu~njsfrqjuszuqdpgcji}gs~}jtzvup|m{vntvzulpxt{nxus{oozjmss~}}x}}t|u~ypldnplvusmtmnsqhkjlqrprjyxq~{wsernv}~|phomsuuq~yuvnwppyorxsr|{|}~{u~~zp~y~|x{uv~{y~~}z|t~|}~tz}}{||{{~|sywy}}w{xsspronssrtsu~z{xszuz|||z{~v~|z}|lknmz|}}{xysrzwwyvt}}wogjliooooqq{svurw|xywxvw{wyv{~~~|~|}|~w{zzyigWagszytnihjdejdgmn}~||xww~{{zz{}y}vszv{vwspyy}|}~{uynprrjqkoy}xpgomuzytttruqrotu{y{uw{}xuppmnotx{vjc^]]`ekns|zxxposnnqotrrvx{||~~{tpnv~|~yy~~ywnrtzwonort{|w{v}}~ww{{w{wxz||ywxwyyzx|xwz{}|}wtnklmsz}snhfhqux|vtronqqw|}uvt{~zwyvvtuqqposuvuwzwsg^UUU`mu||wpnmorxy{|x{{{z|}~y|}yuoprxz||z}|snkfiotzyrjhdejnw}~}srpwx~yqninnx{{z{vwwwxxuooijhgijq~~umhginsw|~}~yxwuz~~{{z}}zwsqnhhffkqvz{{xuwxxtqkf`_[\cjrx}}|umiihjmquyxzyx{||}~}||xxuxy}~}}~~}|}~}{wussv{}{z|~}{zupmkmsyzyvvw|~|xurqqrrrqnkhikpu|}~{vqnmortwwwwwy||}~}|zy|~{wusqtty|}~|{{{|~|{wrnlknqw~{vutstursrpstx~~|{{||{xvqqqswzYuicxrhyyrrveX5>Kdjx^9*aZVH`CPNgxؼ⮹áufveM/N=M^zi[jLq{k~ϯk\Fd_bgrWP6FJ>2D?SdDLOvZstɻպ̦ܿ|piuoL]Fih[R9E=<8PW[zUc\_[nmepxʖmf[|jV49B6/=NY\o]DM^]zv|}wrֽŽz{ycRVS^\[aDD=FQEA=+(7)"$8%#0@A#*GSTB?+#5ALojWM>WOR[hikiWco{³ӵŽǬ¶ɵs~{pqzpoXarinK_[EgoUSZM,B5>@DA;>GN9CFITbP7B94K7]Uq_jR_Nbp[fqre`_TYjcjqfzltp}y|nu~ǸǮk}yx|s{oukecVhmVRaU\b]?VOA<<4636EE9-&(34.4;:B8/51$':HS^^RU?Pi^`fkmpTW_|sr~xǫŶɮû˯ѽ|{}{v{ira_pSBRXYZPPhVWR]VO\C9G=6067MJQMEFEWQ[Vde_cgomfZ^nZ^fnu||uz~txytlktw}u}|peqw}zt|}ow~~x{|qmgooqnstx|usuzqnda_ergprur{ubgqty{yq{xzt|~}ssgmu}ruwvzvyprrnhsyshginqooq}qsswkeRR[[moxt{{zzutme`anmspinptwz|z~ojmq|yvvseojlprnmlnonmiln|wrq]f^bgsxyunsttxvwpgjhpsxvvwtxruuy{vtopqhhppox{}qqjjhgliimupx}~qnu|}yywrvwsst~~}wrt~}ys{}vogonvxzw{spttwyryxrdfjpwwu}~srnt~wy|qvrjmkkspxsytwrwospfoxuvsorrw}y{}|~yhspt~z~x~syurr}rw~txjo}}y|oyrq]kF`O`ziksllcbW~rfgxdkv`Ztfgssil`VuiglpcaW~zmg^n]vdqnktz}k}vugzny|{uiow}{vvfoqzri{nslhomqy|khu~zgra}uirsy|lv~xy{emy~xpxrs^`|rtfhz]kriqyh{~dnWp~`yfxqkxeiunU`T`fd\rdma~||pi{nnldqhpy}n{e~uv~xxq{}w{vqwnry}qouj{ynrTmivTqXS]_baV__Y_uqj[Qf_j|rhm]lrrsrlonik}gyz|pug{zvqwruketjqw}v|{nsorum}{{su{qgxvw~y{v{tqw{klqjz~{zw|{~z}}ty~qvxwx~rwrvzhieqlqswcggpr{p{~t{wqm{o}p}rzw{r~yqusjtqwx~~~uu{~{jleUb]eit}rvo}n}x{y||~}u}~|}{t{|}vy{}xwsvjnoxww|yn{mlouv|wsrxpfjeae`cY_]efnpsitkjohhbdcolmw|xvwy~zw}zoqmv{||~}~~~z{~{uuz|wy}xvnqcgdhriek`ifjpw}~xrfgdirzztyw}~}tus|}}~{|}xzyoxvy{|yvssozu~{yqszxptt{{}utwz~xqxx{~uqxuvwtutrvwnqtuov{|x{|{wsuuyth[ns~vxkhZefokhfhpyxq~|}z~zwstrvuz{|~wspjfotvohVV[kv~sodZ[aisgae_jwtytlvt}uzzvmpv~ynieoxy|pj^cqt{spltx~rumr}yqst{yx{uzsvu||uzy|||pprw||xyy~|~vworsz|~y}{pcilxjb^iw~vu}|~uupowwwyvrreafjyvmi]UX\ktssfWVQ\lopjea_gtv}xqkhnxy|~}}|{|m`_jvs`^arvrrsyvv~~{zw{||}{xwsnuxy||usmmuy}wrqu{~~xrq|le`itvdXV]gx~zuz|~|wvtvxspomkqrvtppos{}kaTT\l|~pb`alt}~ypjiir|||z}~{|{~~yvv{|qlhmywnnqz{uwzvqpou||wtvxz~{{|zsqnmpqty~xrmmopprtwyzyvqttu{yzvsuy|~~zsmw~snkpu}zwsuz}tpnquwxspnorttuttrprrvwwsnfdglry~{vsoonrxzyustsuuwy|~~wqquv}~}{~zqnprvpaXQQSUUXXUSPTX^aiszvld`[[\]```]`dnv~ü}vpkkkihc^[XWVTUVY]ehlty~xrg_XQKIFB>;<;?ACJLPSWZ\^cfknr|~zwutuxxwqidbbdfd_VQPSZagknruzzspkga]XURONMJHC>92/.../.,.0569:>BDEEDDFJSZdjnqu{}wy{uhTF>CO^jiZF64=IYa_UG@CN\hlha[Z_gnojc^bmz¿|vvusqpmjgecca]VNB9200///-+)'(*,-01/+))08=>?ADMUYYTMILQWYWRPPXbmx}~qffmuzti^XX\dgd^VPONOOLHA=;=BFHIGEDDFFFDA<98;AHORTRQRTX[^_``bdfjmrwy{|{yyz|~~wqlfa]YVUTTSTTTRQMJC=978:<=<>CFE?70-0:EJH;,+8ENOKC>>DMV[^^^`bgms{}~~{wuvy|~~zumgca_^\\\\\[YYYWTSRPNKGDA><;:=ACDCB@><;;;=?BDFGIKLLKJIJLMLIFEGJNRSUW[`flqrqlhdchp}~~~~}~zvuvvvuvxz|}}{yvromjgda^ZWWY\accb`^^^_`_\WRPPSX[^^[WRONOQSTUSRRSUVVVTUWZ]]\ZZ[]_`abcccdfimiljr^lgmuvoqlippv}{}~~¿}zytowrxuy{o`cTgmnf[OPS\fWWJACRXjXL<;S\EGIk{G_eõ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OKJHHGGEFLU]diknqx~|vqljfd`^ZUPKGIMSSOJGHPZekppszļwplhcaabec^VOMNPTWVSRSX]bfjklnrx~zuspojbWPKIJHFB@??=;744789:877;>CIPTZ^`abciov||vtv|}ueTKLR]_\QC9789CMRQHABLXbeaYVZaltzz|~ztpomibZSPPQQKFA<830.-.010-**,//01334469=BEGHIIKMPSWZ\aegjiimqyxyzojmsxwoeZVZbijg`[YXWVSNIDBCGKLGB>?FMSTQJEELTXVQNOU\bca`aeillljimqvxxyzz{|~ytrwyywqmkmmib]YZ[[ZWUUWYZYWROLILSVTK>4/4?IMJ@725=BB>75;DMQPMJMU^dffbachoruvx|}{yvuwy|~~}{zyyyxtoifeca\VSRRQOKHHILNMID?=>@CDEEFFEB@@ADDCA???ADFGHHIIJNSXZZWRNQYckmjgefikmnprwyywvuw}{z|~xroljjlnppnjfcdeggfb]YXZ[ZWRNMMMMLLNOPQQQPPPONNOQSTTQMJILPRRQPPSVXXWUUWXZ[^chjjfa`djoqqnllkkkmptwxwuttw|z{~yvs{tf`fu~weTTbsufQDGWgi^RMPWZWPJKQX\]\[\_aa_]]ahmle^[_flomihkorrolihgecdfijhd``cimooligfffhkmmljjkmpztc]duo][lnacszooy|z{xnvwd]ftzsf_blsri^Zboz{wrrw}zxz}vrrtvvtpnmnprqpmjgeehkmmjfcejptttsstsronoqqmiffjrzhZWewwfWZk{}qbZ`lvvmgjryyrgaft|wr}~rpu}yx|~xx~~~}yursw{~}xqnnswyxwtstsromllljhggjv|k\Zdpwrf\^gnmf_[\_aa_`eiigb\[akuzzz{~~~}~|}}zwz~~}|{{|}~|zyxyzzywtsw}ocbgosrmhhjklmnmkgcabfmqpmfbclx~|xvuvvusqppruy{{yvttvyz{{|~}zxy|~~~~xvy~zyy{}~{xwy}{upnoqsroiegmu|~{xwwxy|{xwvvtrolllmpsuutronprtttuvy|}|ywvwxyxwwy|~}||}}~}}}~~}|{{}}{z|xw{vfnp~u`xert}jeovxcyt\spxz{rm|ww~~~{{tc|thjqr|jzvvtj}~yryZwYoZ^qkcuU`v{|lpqq{ztzgvwouioyceyx}z|vs}|}ww}y||~oq{{prxr~~tzyvypyon~pgv{vfhsz[z|ercUa`Sodbsnqkrx|sydzqyod{gsfx}ln}gyrkvwf_zczt}fz~rstvu~k|~yn\z^v|}n~t{suxytvysz|ppporzi~~wpglg}uhq`kswcuxox~d{~xqewq{|bdfjswmwyvy|ttemfy{{s~{qvzw{~{svvuw{yxirrwvu{}t}|xr}{ylts||xmcetkpksi_jpurydno{~~yxxz~wnqknznamddtptnvdndllqwjyqtzovnoswdvl|ryuqyz}wz{}yz|z|~|z}~{viwwwz~sp{qlnvpoirnslroqqqw{z~}xv{uywx{soqxty}volgzz|~zv{vxxw}}|{x|~}{|z|zz~yws}~{sqqlwt{~yzvv~~}z~~~~~}|z{w{}}w{|~}~~zzxxx}|{|}|}}}srokrwv|pljwxwtwussv}z}v|y{}|yz{ywxz~zoowtuomifehhqvpnhjr{~}||yvz|{x|oijjpnaaaZa_^ffdfecprwvx~|zy}}~|yxw|u|xryruw~wwtvuuy|xuxpuuxswvu||urpwmjecegjnvxytwx}}{{|~|{|~{xurwst{sc_egkfa`\]c`fmeeiekrqxtu|}|y}z~~pkdigg^\Z\ddotwonqt|zvxu|ywrty{vtvwx|yyw|zzwsvx|}vnmnpnnf_`]cnuzzprv~}~{}{}}{||{|}|{}~}}yrqqquu||og]]_da`\UTXalurjeemy}y~~}zvtuxxzsf]Y_^cbZTSW`pxztkho{y||~|yxwttsqptv|zzuptxy{yxy{{zzutuv{|xpihlpnkc_`fry{}|}}{zyw}~~~ytppqsquxtmga]]bcde_[Y[`nuvrolnw{yy~~xy}~|}vqmhdeejmnmnmt{}~}z{}z}yzy||xuuuw{{}z{y{}|||}}zxy|{zz~}~zxxvtsqstsqmmowyux~~||}{yz}zy||}~~|xvvxyvsqpnpnkggchRget}kntdm~ixappizzHJXzkxu<2JjVYcO.FSqı´ȼڴ|{lsVa6Q]BZtw@^\atǝ˼Ƕ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ryeNzxpjvvnjd|ocz_z~wISvdqVncrusku[~kl}c|qk|kuppypvxtwuyvfx}{kxwyn_xwzxvhovnxhvkjqfdxURrleZ{lsnm~x~e~lt~xjz}w||gqys{r}hxxwzuluz|yx|~lsq{muwsh{wucwezx^eoal_QY^jhleugnNkgntct{`}e}xxwurh~{hzWl~[kylnuhtv~xs||\zj}v}t|}z||n~dw}u|sktzky|ytu{}wfqtjlnpnbpmw}hz{rshnyug_xxfiwvryz||s}mv}t|~xyxywtukl|lnuxz|mwtwx}xlj``qn~ydruysopth{p|w{}{x~yytpdz|t~|}drzwpveoiquclmsu~tqwzywzketxpfyjdwdmah`lcxpr{wtuv{{y{x|kzppwvikcpugutsp~y{w~|~}wxv|y}r|ur~zmujsoyvtkyxu|smtqrw{plbfceY^W\c`ji`cohzoinytzy{ryzukptuwph{qrpjozw}{{xvtmrqyytx}ztsyrrv~wsqsszsywxyynpz~~wxtslrx}nrjnx{|zy~yw{~~ozrp|zxw{yy}}~}ywsojkh{zkagvvkp~zeg||tkirtpgcgqkiacfnjmqrrmnz|}~}{~~tproZ`pyqw|kmy}{pq~~{plknikhwtyp|~|roqxuz{oonx}x{y|zt{qrsdeccpq\_qoggvibk{vmfw{wnou|{zu{sqsx|xwtlhlx`Veqpom{|m`dluigoohd`fkhie`WPUgjlgjtz}xwts{~{yzy}~tqwn`ht{ou|w}~~odfq|{xtwstpvuuoqlluzy{{~{xsuvtqlhk}l][hvuqyzwogjrqsyyxrpru{~wffpzy}|}wqnku{k[dgomqqsqimiimorpgdbbilpkh\U\hrwvs{}}}wxuvvwxuryx~{yvuzj_Yex||z~zxmdev~}}wysqpnopkjnlopwy||}~|ywx}tsrqrponq{xfcgtyz~zxuwwz|yx{~}}wz~xqrwyxtxvplltsf]bjqxxusnlppsrrmpqqmhimpph^[Zhrtxu{{{z}xwqrpnrrsw|}}z{|voov}~wpqy|sustogehjmoklklouxzwwxy|}zvsw|~~yqqprqqoopy|sljov}}~~~|{uvz}yz~~{zyxxyyuuz~~ztqnt{{{{}}vpjie`VNLJG;32>INJLXdprx²~ywvvupmt|xrlh`VLBADEHGHLRVZ[^bhs{~snie_YVVUROGDAA>><;;7427BKH>>GSVTOQ^jle`dlttrsw~~{uqomkic]WUUTLA62256567788982/5?ECCFKOOOQWZ[YYY\\[[_ehjjmsy{{}Ƕtqx~zxutsvwwqmlnrqjc_^aa_YSPPNKD?<=AEHIKMOPPPSX\^\Z[ZZ[_bdcbbdca_`bdinpsuxz}|zyxxtplhghihd`^]ZVRMJHFHJKJIGFGIKJIKTYRD::DPRH:6?MRI9-/=LRMFEKU]a^YZairwxwx{~y{|{|~}yurpolg`[WXZ[[YVVUUVVUSQQQQOMIFEGIIHEB?<<<<=?AEHJKKKJLOUXX]cfb[VU]dfb\Y^fie]WYcnspjfjt~}|{|}urw|y{}xtqnmlheccddc`\YVTTTTRPOOOOMKHGHJLLKJHEA@?@ACFGFGIKKIHKQSTVYZXSPSY_aZSSeYe\\^bcoolnhixy}zyzú}vx|wptxuipf{~k^^sjeVHR[^\MGPHTE6=KMXLLJHGHDOYKS\Qa[R\QH[TScZfe`_][i^fhghparjboensprndnejplivswsslhhvqy|wz{zxypw|zeis~imlyqm[bowwwlswigksy~usv{vyty}~u|wxt|yxy}vrunnpuqqff_hgfbgdlphgbab_`iklgbhghlisngfxzse^ev}shddmrh^[iquqppsvlo{}~}xxzqoxvwswz~}~~vwz~~wqptrprmrlpifegfehejioijadaddiikehdilip|pgnvzoc]dovyqccionfhkrsw{ynjny}|}wqvrklpwwtosxyprz{~|ztvwwxvx}}~|}~ux{snqrw|~viedjmlhffmpupkdjt~yqqx}|}ytvvxzvsvvy{|}yuxwwyvtux|}zywtwwx{{|~|~{~z~}{zxwy|{|y|{}{|{{~}wutrssvvrkeceimljffjprmils{{vqs~~{y|zxvvwzyy{}~}~}}yvx|~z{}{wwz}xvx~|z{yxulg~zsjvmkxxjyxoxb}zzz~n|{}x}ukbhojn\skxm~mo|xqkj}zowsjgfOlczWXeca}Xkuhmoh`_icrf~{{x~lp|q|dyvtp~zvqko`tn}{ouw}{r|~vz{o`rxftuys^srtoep{zglosqqvqbgyow}{^hnpnowsquqz{}zzvmlzi~u{~qxt}{}wkv\~{uy~}zx|vysxzwkq}qwz{Wc|yk{{vwvqw{m{touu|ukx^spsgigescjesnpiejllytcxyvxnwt}wsiuv{q{v}jnpzwkol{{tnwydmi|noz{}j|w{}zz|xs~}x{}v}z{~{}z~lsn{{|wxpwmyrytsnypiln}rrqsaieksjiYbdgfkjhhjsr|}qqu}zwzwyvyxwvztxzzvy|r|xs|~|vzx||zpx~xuqsvw{x|z~u{wxsr{{~|xwyx~wz|uuqtss|v|}||{ttyv~~{~|w}xvvxxwivswqwjtyvwrturntqsvquwxw{}|}o}~z|z{uuxtyqjpnlmunuqw~~~zz{~w{|{}xousjrssyvyuzyy|y|z~rvuoxrusvwnswssrmyrttltts{yqyxwyz{{|y}~}||}~|~~~~}|{{|~z}{{}xyx|t|xs{urqnprmjokifdtoqyrddknihkttv~wvt{uwzwwux~{{|zy{{|{|yzrupmmkp~uro|tehegkekxruwxuzzzvvz{xx}||~xy|y}~~}xxy||}uuzzxw{|~z{z}wt}ywppoy{z{{z}|z|}~||ywvzwvwuuqnmiehrpgnuspfiljmwv~yz|v{{}z}~}~}~{}z}{x|zzvqoqpwxlqy|rmippnrptvqox~}qsy|wtmsytu{~|}~{vvwyvxyuropvttw~wuzyxz}zqs}~st|}|z|z}~~zx{|~z|z~~wrtrvsrpqpmlhklx}oopturnloouuq|vw}w~~|~zzvz}~}yuyxxzvttprqppr~tnmmornmifltuxzyyxvxyzyz{yyyvxxytrt{|y|~~~}{{{{~{yw}~z~}}vrxy|yuw}~|{y{z{zz|~|{|}}~wxuyyyustssrsswyxtrqpttwvusz~~~||}{|}||{|~|zyz|z{z{z{{{xvwuwwuwyxtqquwwvwwxyz{~{zy||xvttwyz|zz}{}~wyvv{|xplwy|nrgui_tspNLQhv~G39uS]SL?Ju`ź³Ӵ~tUpI]sL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pffxj|qo~gg|yzk|rycxvas|~}e^shn]n||~x~}|~zxslcyk}kYzlx}eatuo{|zqfiq[Wvwtk[d[qpgoftflmaq|mgq{vq|zvtp{jy^{mp{xqtqz~zn}lyuvqZgl}{~w|lrx{qtqyx{|l~q}}g{rs~}xmgmkmieWpcy^|goqusyv|pt~}|qz~ziz|rn|gt||s{vmxm~omru}tnrlmfukoo}}wz}|y}|wvxru}wt{w}u~}}u{q}}owjnxemhfhvkomptgomvpy{pmpws~tnvqjc~|rpxtpy{ts~wwyrv{tr|n~isvzgl^sohuxp|xwu|||z~{roxwwmy{~xxvwyw|}}u}x~{|yxwvtw|nrwuhppx|s}{{}syx{~rzuzx~~y|ry~zsjzy{|vvu}}qq{|vpyorpptxu}xqv|~xxx}|sz~nns|v~}yzqz}x{v{}z~z}zu|{spttotzr}wy~x||}yt~zy{{xvsurjjnjwwrhjqolpstzrz|}ywuz{{|tqpstu~ukt}{vtzxww{~{zxtou}vyZprYYldm}g[toWknorqbnnmiporspsuxrwy~||{xz{}y{~}}}zxvtmupltrgqurynywjhxw{svxw{}{z~~{wx}}~{}uv}{rj}qchpu~wpmrjfo{xsspsnmwv|x}uw{z{~xz|{vp{}ujx|chusw{sprhhkwvjopknuvqpp|tt{{||~}y~~||wwwuoprr~iozcs{y|wmqljrz~uyxp}}~~~~}}y{{}}|}zxzy}w|}~wv|pmzljywwwuljlzxssxqknqw~}y}}~|~{{{vxxuvsssgqzkagyoiolj`grtgjuribsxslxvosvryz{}~~xvxztuuyxuwwnw}mpvvzpooyxs{zrx~z}~|{xwyx{||||yyxvwxxz{y||~}~{}vu}}urv|wtrrnswyxutxwprvzx{~xvwv~~}|x{~|{~|zzwzuqy~uqvwtqttrrxwwtswsvwwu{z|wu~~v||zy|~~xuwyzzz{z{~|~|{wvzxrt{||}~}}}}}~~z|{~}LISTBINFOICRD 1999-11-04IENG Deepz0neISFTSound Forge 4.5././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/laplacian.png0000644000175100001770000000037514676242340017605 0ustar00runnerdockerPNG  IHDR  pHYs  tIME/iTXtCommentCreated with GIMPd.esIDATH10^jW\+ y9[rj+}Tn<Ȗ-j+&45Yϸ^d4p&Ѵ0WrN\( \[&TSwIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/liquid.bmp0000644000175100001770000002672614676242340017152 0ustar00runnerdockerBM-v(`-  ,<-u_LLr H{N߯źwwwr""""""""""""""""""""""""""""""""""""""""""""""""""wwr""""""""""""""""""""""""""""""""""""""""""""""""""wwr""""""""""""""""""""""""""""""""""""""""""""""""""www""""""""""""""""""""""""""""""""""""""""""""""""""www"""""""""""""""""""""""""""""""""""""""""""""""""" wwwr""""""""""""""""""""""""""""""""""""""""""""""""" wwwr""""""""""""""""""""""""""""""""""""""""""""""""" wwwr""""""""""""""""""""""""""""""""""""""""""""""""""www""""""""""""""""""""""""""""""""""""""""""""""""""www""""""""""""""""""""""""""""""""""""""""""""""""""www"""""""""""""""""""""""""""""""""""""""""""""""""www""""""""""""""""""""""""""""""""""""""""""""""""wwwr""""""""""""""""""""""""""""""""""""""""""""""wwwr"""""""""""""""""""""""""""""""""""""""""""""wwr""""""""""""""""""""""""""""""""""""""""""""wwr"""""""""""""""""""""""""""""""""""""""""""wwr""""""""""""""""""""""""""""""""""""""""""www"""""""""""""""""""""""""""""""""""""""""ywww"""""""""""""""""""""""""""""""""""""""""w"'ywww"""""""""""""""""""""""""""""""""""""""""wq)ywwwr""""""""""""""""""""""""""""""""""""""""'DDDDDDDD@wwwr""""""""""""""""""""""""""""""""""""""""'yDDDDDfdfd@)wwwr""""""""""""""""""""""""""""""""""""""""'yFffdfdFfd@wwr"""""""""""""""""""""""""""""""""""""""""yFffdfd@9DffDywww"""""""""""""""""""""""""""""""""""""""""vFffdFf@)ffd@)www""""""""""""""""""""""""""""""""""""""""&FffdFf@fff@ wywww""""""""""""""""""""""""""""""""""""""$Fffd""yFfDr"$fff@""yr "w""""r""""""""""""" """""""""""""""""""""$Fffd9dfdpfdDDr""""""""""""""""""""""""""$FffdDDD@fDyDDDDDFdDDD@DD@$DDD@$DDD@$DDD@""$DDDD"""""""""""""""""$FffdD@FD)D@F@tFfDDFffdFdDDDff@$fff@$ffd@$fff@""DD@FfD""""""""""""" """$FfdDDfff@Dff@ DdDFffffdD@FfFff@$fff@$fDD@$fff@"$Dfffd@""""""""""""" "$FDDfdFffDFffDDDfdFfffdDfdFfff@$ffd@tDDf@$fff@"DfffDDF@"""""""""""""$DFff@DffdyFffdFff@Dfffd Fff@Tfff@$ffd@tfff@$fff@$FffdB"dB"""""""""""""Fffd@$fff@)fffdfff@fffdFff@4fff@$fDD@tfff@tfff@$fffD"""b"""""""""""""Fffd$fff@tfffd@ydffdAfffdFff@$fff@tDf@tfff@tfff@$fff@"""""""""""""""""Fffd$fff@'Dffff@Fffdfffd Fff@fff@tFff@tfff@tfff@Dffd@"""""""""""""""""Fffd$fff@"Fffff@ Fffdfffd Fff@fff@tfff@tfff@tfff@Fffd""""""""""""Fffd$FffD"FffffdFffdfffd ffdDfff@tfff@tfff@tffd@Fffd""""""""""""FffdFffD$fffdfdFffdfffd FffDfff@tfff@tfff@tffd@FffdDDDDD""""""""""""FffdFff@$fffDfdyFffdfffd DFfffff@tfff@tfff@tffd@Ffffffffd""""""""""""Fffdfff@$fffDff@)Fffdfffd DDDfff@tfff@tfff@tffd@FffdDDffd""""""""""""Fffdfff@Ffff@Ff@Dffdfffd dfff@tfff@tfff@tffd@DffdDDffd""""""""""""Fffdfff@FffdFf@tffd@tfffd fff@fff@fff@ffd@tffdDffdw"""""""""""Fffd@tfff@FffdDfd$fff@$fffd dfffBfff@Dfff@DffdBffd@FffD'ww""""""""""Ffff@Dffd$fffD$fd$Fff@Dfffd DFffdCfffDFfffDFffdFff@Fff@'www"""""""""FfffDFffd~fff@$fd@"FffDFfffd D@Fffd ffffffffffffdFffDFfdBywwwr"""""""FfffffffEfff@$Ff@$fffffffd FdDfffDyffffffffffffd)dfffffd'wwwr""""""FffDfffdnFffd@"Ff@$FfffFffd DffffdGffdFfffDffffBFffffBywwwr"""""FfDDfdKDDDDDDD"$DfD$DfD)DffdDfdDdFfDiDFfDYDfdDywwr""""DDDK""""DDB"dDGDDDٙDFDDIDDIDDywww""" """"""""""ywww"""""""""""ywww""""""""""wwww"""""""""'ww"""""""""'"""""""""'"""""""""'y """"""""""y"""""""""y"""""""""w"""""""""'"""""""""'"""""""""'y """"""""""y""""""""""yꪪ"""""""""'"""""""""'"""""""""'yDDDD@""""""""""yFfff@ """"""""""yFfff@"""""""""wFfff@"""""""""wFffd@"""""""""'s3Fffd@s3zw7|"""""""'0zqFdD@q:q 0""""""""'yDDDDTDDD@:DDDD@Ff@DDD@DDD DDDD@DDDDDD"""""""""yFffdTfff@:4FdDFfff@tFdDDFfdFfff@DffdDFfd"""""""""yFffdTfff@:DDDfffff@DD@FfFffdFfff@FfffDffd"""""""""wFffdTfff@:@FfDffff@DFffFfffdFfff@ffdFfffd"""""""""'FffdTfff@:Dffdffff@fffdfffdFfff@FffdTfffd"""""""""'FffdTfff@:FffdFfff@fff@4fffdFfff@Fff@tFffd"""""""""'yFfDDTfff@9k_w2dl6 L&}TWo~4wke֭ *n\l6l6~azzz{q>_7|JJ"6/ l4+W;_277LMض:\ux^?㉦;v쉿~gq? ovǎ=Q>= /|G91/!e( \$ĴgjdMsfHP$@s)*~S\׍ ٛ R>8)th+ ayxxh|v!8]ױNw!fq/]oB IMRYSDLi >_'o۷$9VRwi| k}HN"9<<WMh qP:L+HfckXPG8m> |'yi qA {A:ࠍ?L ]&)u!I% LM8"ruQH2IkGHxCH$d Tq t.ELSgI1]S1\>$ y(+l3ܼ6ΤPXI v BMN.­. _P8I%xHU$)Vu#r,ӕb-WKXuV4{m>a [;#E ? *P TB+EvR( :7䆋8CBr7AWI;"=-.>[azZ&r1&:NnUeM#@WLl)*UZAH/NB "5%> $|W!|^x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p0o{M5ϫP6 ˓U ]ZNCq> T1R)"bU/\f?Z =E *\prs9R>1=}7bD[>ڐOBlA?WQ*RO=AJCŢ\Sl$7::t %x (&re<*LAǁ:.j:4#9 w_?*TxͨT*#qohSBS=3T= b~/177On>UPl3#GPٌi28ɘڙk~.x{:$sfT*I@|`~dAC"0RT6!vAOO}π#GmhHUOrCᑫ+G<*Sg|*8~>X>B /M kt|;Jb# q cjB8Ć5W,wRVZ4pxpOrd֧K 8z42%c.9/s cZ,, dQ({XMJ`S>>b]Ϛ\'ORfm 9\N࡙f ErcpȑGMO"9wRWj?s)8b @wcm'@p{yo*+r;yď|rȚ(K+G}'Uwr]ȑGΝ=;Ggqq.+I@dUɌI?Oc]ZӰ/D?۵ϟFm>7o8!X57fQ= f6Ar;HhOvq<[8S  ˹E|> | g2ݟ"kӵN}.G@>?ytϠv.s();qspw'%@L_H˯ @sO2?˯*F`-tLpFL{_ U2ݧ :~K{TT_ޟv99 xPrK;"ۜ@WVEϋ_ jۍչ~(vs,j; ?jgld٭Y/aN޻jhs7 rdi.=l{Hr' 5ϦSJoO??g^{!vf .E { E󙢗t}B8PJJ3(gHJXR!._~}֬-Fl'moHCRϣװ&x>&4{Iק^|TP3`<)z9G>wLyIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/player1.gif0000644000175100001770000000661614676242340017223 0ustar00runnerdockerGIF89aZ=             +"1'.#!7# *%#####,%+* *$//*+,2:*7,35)*#,3#2-#0-*=/)24$44)49%5:*93%96+:<%;:,<<1&N<;A+=A4aEGG"@/%D;+A>3S7-P?.Q<2EF,BA4DC9DJ3EK:KB3JE9JK3JK;HS-KT;VG6PE;SI3QL<[D4\K:SW;Wa<`O7bS=fX>kVћ p3 OeK5iAĸF4v82 &AP #dS.  #84VIkaGlrtd /K R4b 5 -&| [QG(]E:CF<DpÝ-aE}6`s pXupe8$ Lԅh+tE(WBg 6nP(@,Ppcp$Xذ4AbH&xK8$<dXh2!uVQ/Y"xnP !7qx8 I`B{,DB D (U䌏  WJ֪|zJXCCbwӀ,!q1lGrEށ zXVа 'F$ /b#` P$m@de y"hF⪱ ixa9a]?5D#ʲ#H IAAX4$AGHsZr2`>bfR!W%:K0Pِ_!6Dbs 8?)LaRH4C T:a OD,pRB6Pŝ%3D|QTㇹCp"t`A0Vv S";k @-Db$ !D%19+% %UF/4z"iBC%Xa VB`f#ki@@?C&̡ dE[ 79|vZ[LUCp%pv IP]%$AA`ِҚW B -ф' }<ЅhC#܉$P}{w6 HPAA!YinyS $Z DVVy[.(G VX†{V&Tȣm 9B+vIQ5СdЅ*d[><)s@ 8BEy@BIPZ@᳠mh?˅-c4(&@p@2.<*aPs& K@A niOE @:X}DٍN4`.?XxQjn7a4hu@s4"@ D`Ml(V@-04OecR-еyv'@V.3CP@P`g΀ʋ]{x@=v/&H@%9ϬBh pi$pAo  M# AL'> T d-(=g 9x{~6 g@g0h. `P"Ё#Pހ<Pd G ϖN[1`PoB --AM0[:by d />rt~ %h-r h(-w N8`0ڙ l!ڛ}| A*'' Y}eYLu`[Pq # | @l6lr ~Ϧ*Xw v&@H@Z}LdF0Z݅v} * |p0}Ė|*o"xy# .w vBpQfD]BUq (vh *6y[glB M{K|k0u &vd#'paZW}Uww~*Xi1GlxXo8x"!EH0%T0-l@c nFU )#،;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.998112 pygame-2.6.1/examples/data/punch.wav0000644000175100001770000001012014676242340016774 0ustar00runnerdockerRIFFHWAVEfmt ++factdata}|~|}}}{ywusstuvux}~}}|xwutvusrrvxvxzzu{{y||~}||uspqlpnxwuzywvwssx~{yyxojrtooxqmnosr|}{~uphY]]UNSUOUV[fgctwȾ}sb\f[RLNNDDOMZfko{{wzƿjTf\Scbcabb_psvwrnkjruz}}{zsv|~xuqok_OT^c^agepnyŮnfge`NE.//9:ESc`qz~^ލ[jqrUW''-JUQ.3MiAʿ||_Y|er\n[7T78Vm3tϿ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zxy{u~xy|xzzkzz}}}}~~}}|}}|y~{}~~}{}}~y}~yy|~w}}x||x|{}|z}}|{}}~}~|~~}}|}~zwz~|}~~~|}~~~|~z~{|||~~{||~z}}}~}~}}~xy|}~~~~}}~~}}~}}~}}}}~~~~}}~~~~~~LISTDINFOICRD 1994-01-07INAM Punch FaceISFTSound Forge 2.0././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.999112 pygame-2.6.1/examples/data/purple.xpm0000644000175100001770000000234114676242340017203 0ustar00runnerdocker/* XPM */ static char * C:\Users\Kristof\Documents\purple_xpm[] = { "32 32 1 1", " c #FF00FF", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.999112 pygame-2.6.1/examples/data/red.jpg0000644000175100001770000000234314676242340016424 0ustar00runnerdockerJFIFCreated with GIMPICC_PROFILElcms0mntrRGB XYZ  + acspMSFT-lcms desc @cprt`6wtptchad,rXYZbXYZgXYZrTRC gTRC bTRC chrm4$dmndX$dmdd|$mluc enUS$GIMP built-in sRGBmluc enUSPublic DomainXYZ -sf32 B%nXYZ o8XYZ $XYZ bparaff Y [chrmT|L&g\mluc enUSGIMPmluc enUSsRGBC     C     @@?@?@?@?! @?@?@?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.999112 pygame-2.6.1/examples/data/sans.ttf0000644000175100001770000040374014676242340016641 0ustar00runnerdocker FFTMGGDEF'GPOSGSUBpfpgms#gasp glyf#$head8',6hheaKd$hmtxA  loca).vHmaxp  nameñvpost,(P>prepz^ =r_<ğO ğO `gH>NC`gRT/Z33f Px1ASC@ Q3>`: 999Ws sIVHh !d9[99sPssgsNs/sRshsisYs`99edesTVVhV9g9 Vs9aV9aV].V  V.V-A999 sjsWsWsVsW9sVsssVssV99s1""\ss:sqsss-sSdk3zdA)HLP9wPsS88IVVVVVVhVVVV9 9999a9a9a9a9a9GV-VsWsWsWsWsWsWBWsWsWsWsW9 999sVssVsVsVsVsVdA,sssssVsWVsWVsWhWhWhWhWVsVVsWVsWVsWVsWVsW9gsV9gsV9gsV9gsVss 999 9 999\99 Vs[s~sUssssss9asV9asV9asVaV8V]9V]9V]9V]9.9..9ssssss V-V-A1A1A1sVsWB9G,V]9.933PW9F2AVVhX=VA9a9VX 3Z9aVl.V-buV.W9V-VFsj`VtVFVsjsjVsVOVV)`0U3?S`sV`?SW.UhV]99 u.7V@VUkVcC@9aVh.7vV.UUU.@i`sWx@sWZ1xx ksVUsW#V+zk-+7UsWs W99@ s kJ   V-[[[sk~KKKssQ7UUXYV`ess:sE%lXP=]8ed3W1d8dAdd?dAd"g{mm))s+kUFQ@;@<fBw5+-|ZjZH-/ H@~~ O\_   " & 0 3 : < > D  !!!!"!&!.!^!!"""""""")"+"H"a"e###!%%% %%%%%$%,%4%<%l%%%%%%%%%%%%%%%&<&@&B&`&c&f&k ~Q^   & 0 2 9 < > D  !!!!"!&!.![!!"""""""")"+"H"`"d### %%% %%%%%$%,%4%<%P%%%%%%%%%%%%%%%&:&@&B&`&c&e&jG/vhzzxt 0-%$?2#ED;852/(!ܹܴܱܩܝJGF)'&# bcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?w7   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`apcdhvnj$ti=8q?@fu254;kzvbm7@<3l{   ~8 w KRoNOPxSQL@EYXUTSRQPONMLKJIHGFEDCBA@?>=<;:9876510/.-,('&%$#"! ,E#F` &`&#HH-,E#F#a &a&#HH-,E#F` a F`&#HH-,E#F#a ` &a a&#HH-,E#F`@a f`&#HH-,E#F#a@` &a@a&#HH-, <<-, E# D# ZQX# D#Y QX# MD#Y &QX# D#Y!!-, EhD ` EFvhE`D-, C#Ce -, C#C -,(#p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""O|bN !Na_O""OH69IY@I${**bRrRRfGN[NI+Y+i+600%(,#|##,<\  *  *@8 H *0)&E6BI!I:-,JJM:,P,:,,: 666@= H6PH? O  MbErE6EFEJ0)M,&E ?Q?UQ3P??/]]q9]]]]/]/+]q9///]]99]910]+]]]]]]]]]]]]]]"&'#".54>7.54>32>732674.#">.'32>`:L]m@un53[~K (U]I{Z2BpS>U=Q#kF5j1 ;K0E*`d%AtV2JYBq{#HmI,OD7 B=0&73#.5*Za^X++X^aZ*iiii X+H@  WWHH@  ??/]]8210++]]]]#>54.'3+*Za^X++X^aZ*iiii!k@KM]mK[kBRCS  _ 0/ ?     ?]]]/]]3]]3qr910]]]]% '7%73-ww- ZgIHHIk)dG G@.    8 7?3]]322]]/]3210]]]]#!5!3!X`TT N H @ H @ P   @&)H @ H  //++]qr3+10+%#>5#5 {-1Xۨ5WKB AA[Op!@@p//]q//]105![Р~.@ @P@ H//+]qr1035393@y H) ??/8]810]+]3i P#'p@PY%i%F!V!f!VfYivy   yvn@)n?  s#s??/]]10^]]]]]]]]]]]]#".54>324.#"32>#MfgKKjeL(NqHLtO()OrIGrO+JJCCը߅78ߧއ;; ^@  n/@HDTdHt?2?33+/3]+/^]3/]/]2/]1035!5%3!gMW<g (@Muuze%V%)!Y!i!i##u'n@@&*H@*nt&&& @&H&\l|  s&t?9?3]]]9/+]33]/]q+210]]]]]]]]]]]35>54.#"'>32!g3O$D_:6_J/ Btkiq<3Upz|mVu||V<[>54&#"'>32?yst: +JlJEgy3fb3n[;w P{Yvl3"HoNU~R)ai7AkI8\B$N_57^Iqzo][-;eM>lV> ;Xp/7 u@Pvv@ H[ k {  op0Ps ??39/32/^]qr3322]/+3]q10]]]]]#!533!qh??Lw$% R,@V f UeZjU+e+U*e*&@YH $$$$D!# H# n@/.$%n! n ?  s(($t!ss g   ?3]]]?9//]q3/322]qr9+10_q_qr]]+]]]]]#".'732>54.#"#!!>32@~{orC (EeHFrQ,*NqH-LA5/!0civ@jF4[zF(K;#+TzOAmO,%A%5@uh$8@0zYiZjzTdT#d#t#T"d"t"5E22@- H%5Euon@/%%%%:/n  @&H *u 4s4s??3]9/2/+]2]q2/10]]]+]]]]]]]]]#".54>32.#">324.#"32>;so{z=EvH~gN{QJxT-1s`o=$HjF1dQ3(KjBAgH&jG^`CnP[QFҌ[_>upIvS-AjLNd:-Uzi D@-z i nP   _ @` t ??2/]q3/]q9/10]] #47!5! jGPe E9.Y)=Q@u((u!!uuuzzz zzzuUEeEUKeKZAjA4n*n$O n@>>>/>>>>SHn  $Cu99M/uMu??9/99/q]qr99//q9910]]]]]]]]]]]]]]]#".54>75.54>324.#"32>4.#"32>9u||w9/Oe6;]?!9pmso6!?]==hL,>dIGb?:fPUg7#DsVOoE FrQRpDZn>>mYMxW5 >Wj;Jc9:cJ:jW=  5WxL5X?##?X5*XH..HX3_I--Ja4AkM**Mm`$8@i'  t##t zz{Z(j(Yi H6%n/?O 0@: o /n @ &H4s_o*s"s  ?3]?9/]2/+]3/^]qr310]+]]]]]]]]]]]]#".'732>7#".54>324.#"32>GvQfHw[IyU0I]l7`l;?xo%IkFAhH'#FhE2gS5ݼ^!FpOEЌ/J3E|km{BNf;.UzKGzY3"Fk~:6@$@P@ H?//+]qr32105353k: Y@ H @ H @ P   @&)H @ H  /?/++]qr3+3310+%#>5#553 {-1XϜ5WKB AAeHj@H(H(H@3H Pp ?0p?o/]33]]/]/]310]+]+++5 eZ;dXGF@1@` p /_oP/]]]/]]3/]q3105!5!dXeHj@H(H(H@3H Pp 0p??o/]]]33/]3/]10]+]+++75 5eZ㚙on^T'%)@Du$$u##ZjZZzZ z :J H )))&&FF @@&,H!_  '&L_!?3]/]9/+]/9/q3/10]]]]]]]#>54.#"'>3253'%>ORO?''>NPM<%*MmC Cyzr{@GlUC<:DS7EhP?99FX;;\? z TpA8gn]re@zuuy//t&&f&cFVEfE{IJ8Z8j8;fR?6?F?R@&@6@F@%5E%5E9   H\f\\P:`:::5:E:9]9 99 }44 4K4 *h%) p"HH 1PP  R@_1o1111t=RR RR,kc$/?O 0@M6YGGBM/3]?99//]]33//]]q99//]r9]22210]]]]]]]]]]+]]]]]]]]]]]]]]]]]]]]]]#".5467##".54>3237332>54.#"32>7#"$&54>$324.#"32>7>nCva8O2E]uGT}Q(Gr<`I6't+&>kO-S㸋^0Vix,72oi?v$\"?Y8VW-_cEx`F `/@&+ -YE+:gSxݩf0C(Tx10.Qpޢ\@ts`!09p?4!sܴFv2TfG$PR@fvfviyiyse|jz9Yiu6VfZHUG%5*:  *:  0 %5P0`/_v  ?2?3]9/32]]q/]3]qq3/]q3]qq9=/33]qq]qq999910]]]]]]]]]]]]]]]]!!#3 .'!~?6d(RC-.DR(1!.@l  -u--z$$$  % &k{ Z@ H)Z@"/"""0)Z@(_)_)_??9/q9/^]2]q9/+9]]]10]]]]]]]]#!!24&#!!2>4.#!!2>ThuC!CeCUX.ATtH Q1\PsI{Y2k_,'TZ;hU= :ZwBrbB!=VC^<7#"$&546$32.x}@EuRmV!&pvV[.GDfPӘT+NkANOd9m  e<2[F*e d@F{+;{+;{{yZ@/  @Z@__??/^]]q10]]]]]]]]]#!!24.#!!2>ejңoR{:oNϰ]Q˂=H M @% H  Z@ _ _ _??9/q]/^]23/+99//103!!!!!-2< i H@: H Z@0 _?o@H_??9/+^]q]/^]23/+9/+10!!#!gg-@+j+B%R%UVVUz Y i jjI%Y%5{ @  $\@!!/ /`//[ !_"""_)_0 @   ?3/]q?9/]/]]]]]9/2/]10]]]]]]]]]]]]]]46$32.#"32>75!5!#"$&gYĐd#IhX|=BSqV[U/kYǥ e.V{M64U? @gfdk{YV  $  j    Z@ ?3?39/^]223/]839/]93q310]]]]]]]]]]]]]!#33 R͸>/8@(0 @`Z@_??/^]/]q1033!,,@ ) H H @H(   H* !%H* H* H!%HH@ H $$,\*$4..t.;... .ϫ.4. .......t...`.T.@.4........t..P.D.0..$.......p.4.D.d. ....t....`.4.T...gt.....P..$.D..4.D.d..........4.T.t.7@S..$.D.t... ....d..K..4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zIYiuGWg-[-k-{-dtU H @ HuDTd6zK[k H*:  % 5    *: %5*: %5'{'t''-*-:-----......{.o.[.O.O....@H .0.. .8x @@&Hw00060F0V00'0070g0w000000&000000x0000i0(080X000000000X0h0I0700000000(0H000X0h0000I0(0 0000000000|H90*00 000000000x0i0:0J0Z0)00 0h0000@0000|0k0\0K0<0+00 0000000000m0_0M0/0?00000000000m0}0[0M0;0-00 0800000000{0m0K0[090+00 000000000}0k0]0K0=0+00_0000000DT-'@{ H?33+]3?3]^]]_qq_qqqqqqqqqqqqqrrrrrrrrrrrrrrr^]]]]]]]]]]]]]]]qqqqqqqq_qqqqqqqrrrrrrrrrrrrrrrr^]]]]]]]]]]]]qqqq+qqqqrrrrr^]]]]qqqqqqqqqrrrrrr^]]]qqqq/+^]3_]]q/^]]+]_qqqqqqqqqq3]q_q9=///]]33]qq]qq33]qq]qq33]qq]qq10+]]]]]]]++]]]]]]]]]]]]]]]!#.'&'#367>732>73   a &h/79:70f&?|1:4EC><7m7;>CFEhy4.+ w@\I;& K[)9DT&6 )Q E 3   ]L+; RC&6     ` T 0 $       p d @ 4        t P D   $ T  4 d 4 d   K {    4 D jT d @ ; $       { d 0 $       p d @ 4   9      D t $ T T d @  0        @H     H @) r4DT ?2?39]]/]]q83/+]]]]+]8399//923]_]]qrrrrrr^]]]]]]]]]]]qqqqqqqqqqrrrr^]]qrr^]qrrrrrrrrrr^]]]]]]]]]]]qqqqqqqqqq10^]]_]]]]]]]]]]]]]]]]]]]! # 3 3 XYP} h)b-)S@  H@ Hi6FZ&Vv9I V  9  Y       Y y 6 ) 9        t V f B $ 4         v b T 6 F $        p d @  $ 4  i  @  t P ` D        T d t 0 @ $      $ D T t 9  p  $ 4 T d       4 T    p 0 `  / ;K{??39]3]]_]]]]qqqqqrrrr^]]]qqqqqqqqrrrrrrrrr^]]]]]]]]]_]qqqqqqqqqqqqqrrrrrrrrrrrr^]]qqqrrr^]]qqq/^]]]q9^]]2+M210+_^]]+]]#3 3 HH9aA z@#dtm}[)9IrTd@ H @ H@ H @ H__?2?22+/+]33/+]3310+]]]]]])5!5!!ZVW)1@0? ??/]]q]q210!#3Wu9G@(x H IF * ??/]8]810]]]+]3i W1@?@P??/]q]q21053#5!Ws HH@/HvHy6Ffv&FVf0AH@9H9Iiy )Yi @H9&6FH"8d@P$4tK4 `p@P"/2/?3]]^]_]]]]]]qqqqqqrrrrrr^]_]+]]+]+qqqq+rrrrrrr^]]]]]]]]]qqqqqqqqqrrrrrrrrr^]]]]]qqqrr^]]]]qqqqr/^]]qqq+q+qr^]+^]qr33++]qr10_]+]+++ #3΢pry i#@``///]q105!ij/@u@@/?/]/]]10] 53WsN2A@2y==y ( H + H%%F@. o8888CG@H?G0CCCC@ #H!Q(9Q 3_/P.3P?2?3/]q9/?+]q/]3/+]222/10]+]+]]"&54>?54.#"'>323267#".'#'2>=QW:W;4T>& 8gn*;"C&3I.E\u#VU*BwZ5_kN;C^:'C3@kN+.PQp7Q64T; ?bt5Y2ZIX`3@ i1y1y#@ HIYIY@? HG@  5*F05?5p555555%P /P?2???2]]qqrr/^]22]10+]]]]+]]!"&'##>533>324.#"32>r{32z>`EGmI&&IlFB`@"Yc80" +32.#"@iM` hl C|^9Vxm}U32WvDZj3gV3{@WU"e"Z2j29I6 F  yvF@*5 Gp555555 /P%P?2?2??]]qq/]]2210]]]]]]%#"!234.453#.532>54.#"52z{2>`EGmI&&JkFB`@hZ6Zb +/* 'H<+ %05ppg0.gxsb+.fWN%k@.Z#j#ZjUeI G@'%G0''''@#HP%% PP??9/9/+q/]2]q2/10]]]3267#"4>32'.#"#IrPu=flLdo/-cT:Ug9^H--[I/ӄ;XzJb<@   3 C  @j HF/O_?;_@VdH@',H 0`@/P P??32?]]]q++qr^]q/^]322/^]310+^]##5354>32.#"3i;fQ E-(3 Iz;eK+)<'aVWK1E@Hz11ve>U e Z:j:&6&)! yv /F@2"0GF@QH=##".54>3234>734.#"32>$]f@{d=dF&;UpHg]++aos.,1Pg6EcA@bD6gR2W&Gb<KQ"KxV)K:#E͇БMia>7( +32#4.#"#3=FTd>hM0XF@gI(7M28eT/EhE#.TxK~!B8'=s@ F0@*H     p      @"%HO  S???]q+qqrrrrrrrr9/+^]3210533 :W=3@ H( HF  @?@H@P_oO??O_ o?o@TORH/?O=@58Hp@#&HOpP S???]]]qq+qrr+^]]]]+qrrr^]]qqqqr^]]]qrrr+^]]]9/^]33/210++53#"&'532>536]H"A $ &1  Z>jN-+C. @T|zvV f Yiyt D  * t  T t t 0  @i H F0 ?  ? _   ? _  9 @SVH`   `   0 @  ????9^]qqr+^]qr/^]2/+_]]q833/]83_r9310]]]]]]]]!#33 0Ima />o@4F0p@"%HOp??]]]q+qqrrrrrr/^]qr10334#N;¹* H @ H";F .F///)/Y////////v/Y///F// F   6  =======i=y=[=I=+=;========i=[=)=9== ===i=====[=M=)=9=========}=+=K=[=k=========+=K=[=k== ===@======[=k=O=;=$= ========d=K=?=+====={====o=;== =j======[=O========d===+=K=======k=4===9====t==+=K=[== ======K=[={===`====O=0=/=@="5P(P/ ?22??2?2^]]]]]_]]qqqrrrrrr^]]]]]]]qqqqqqqrrrrrrr^]]]]]]]qqqqqqqqqqqrrrrrrrrrrrr^]]]]]]]qqq_qqqqqqqrrrrrr^]]]]]]]]]]]]qqqqqqqqq/^]q2/^]]]]]qqqq9/910++!4.#"#4.'33>323>32#4.#"/L79\A#8Ka@{3294U?@gI(>RjFZT'OjA-U}QS"KC0,9;/L5,\d/VN"t@;y tvy      G@$0$$@#H$GP P??/]]+q]10^]]]]]]]]]#".5!24.#"32>q{A~u8'KlDEoN),Mi>EpN*Dӏ0FҌ~b')c{~b('bWM&:@i8y8i*y*$$$@ HIYIY@? HG@''<1F0<?<p<<<<<<,P"6P?2???2]]qqrr/^]22]10+]]]+]]]#"&'##4.'33>324.#"32>(]pt.@Re?p](;bJ73#46767#4.#"32>CgQ=?Rg)KkBEb==aFv`)3inlh3%aN>@(0! F0(H ???3+/^]q23/]1034.'33>32.#"+:P9( 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]]qqqqqqqq/^]83/^]]]]]]]]qqqqqqqrrr+839=///qr33333310+_q+q+q+q+]q+]q]q]qq!#.'&'#367>7367>73ѭ Ѳ P&,/-,&RJ:!C %'&$@B"#&$C: @Hyvy7 w  zx  @;   ) 9        & F f  H @  9  @tHv d V D 6 $        v d V D 6 $          F V  @H V f v D & 6  & 6 f v  v D T d 6 $         v d   & F V g F V  d V D 6 $      & 6 F 7f  @6=BH9 "       t ` T @ 4   @"H   P p  ?3?393^]_]+qqqqqqqqqqr_rr+r^]]]qqqqqqqqr^]]]]]]]]]qqqqqqqqr^]]]]]+]qrrrrrr^]]]]]]]]]]]]]qqqqqqqq+/^]r83/+^]qqqqrr8399//8892310]]_]]]]]]]]]]]]! # 3 3 ! D,[W: !#"&'5326?3>73\&ObxN": 0O3S   Ծbo;v+5-Z-H APRj1:  @NYitFVf({$ ;[ @'7H@H @(\dH     t ` T @ 4 D d  @ IRH   ?D d  $ D d  3>H @'H  P p  @ HPP?2?2+^]_]++qr^]]]+]qqqqqqqqq+/++^]33/^]q33_q10]]]]]]35!5!!18j&ڋ"W-`@A H H-!( ?@! / o  O / O o  +??9/]qr9/]]q3322210++".54.'5>546;#";AcB"7P33P7?[M4G)+G3M[?W)LlDi?X88X>jkl2T@,  ,AT3jmN]@ H@ HH@Hp@H@+H0@P$$HH@Hp@ H@H0$@z}H$n@ ruHTfiH@ [^HP`@ORH@ DGH>@8=H`p@H@H@p//?^]]++qrrrr+^]+_]]+q+r+rr+^]]+qqq+q+qr+++^]]]]qq+qqqr+r_rr++^]++]]9/^]103N~"W-b( H@7 H, & 0 /oO/Oo-,??9/]qr9/]q3322210++2654>75.54&+532+5^[O3G+*F4O[<7Q44Q7"BcAmje3TA,  ,@T2dlk>X88X?DlL)\)P' @Z)90 H 0 H г H@ H p  @ &323267LEIX&A<82Q(PMK%233E{4 ;=D),-  &.  2*:@[iFV9@HIYi6  y F  9   i y &    I Y y    t V f D  & 6  @H   @H$     @@Hf   @Hb r @ P " 2   @u|H  @@ nsH  l @@>ekH   v R b $ 4 D      d t  @GKH   @=;@H  7  T d t     T d  @H@  /]?^]_]+]qqrrrrr^]]+]]+qq_qqrrrrrrr+^]+]+qqqq+qr+r^]]+]]+qqqqqqrrrr^]]]]]qqq/^]]]]+qqqq3/103##5  +@XhWg   'G@8 HFF"P|`p peP /3]]]3?]q22]]]/3//+9/q3210]]]]]267#5.54>753.#"T`3X~S|o_+BoP|NxV6 riMg@@ihl >t\> ]q΃?7Um?Zj3gi]q>:P2@SF6F%5$' o',n#'n_  O_o2o  0Pp0@@H& Q#?o@%*H@ H,s,t2v222?3]2?39/++^]q32/+]qr/]9/q329/3910]]]#!5>=#534>32.#"!!!2>7P 9YsCFYV0cgF{cG '5A$rph,?(&C5%7PuM%.y\f7:V994$s}~8j\G*C0qs#7@wJZj,<JZj,<E U e # 3 EUe#3J"Z"j"-"="EUe#3EUe#3JZj-=.$/9)3 /]/]]10]]]]]]]]]]]]]]]]467'7>327'#"&''7.732>54.#")%dhc6IG~6ah`%+,&dfe6~GH4iff%),Mf:9fM,,Mf9:fM,G6dge'+*&ai`6GG5die%)*&iif6I:fL,,Lf::fL--Lfv@IFJjzEeuO @\  @  Q Q/  @)-H   ??39/^]q33]+q222/^]33229]2]210]]]]]]]]!!!!#!5!7!5!3 3A}@[sw}/}yN]@    H @ H   H @H  p  @H     @+H0 @ P   $      $  H H @Hp   @ H  @H0  $   @z}H   $ n @ ruH T  fiH  @ [^HP `  @ORH   @ DGH  > @8=H ` p     @!H @H@ p   / ?/99//^]]++qrrrr+^]+_]]+q+r+rr+^]]+qqq+q+qr+++^]]]]qq+qqqr+r_rr++^]++]]9/^]321033  sTMaO@u//zdU+UkU-QmQ-9m9}99U`u``S>s>>SZsZZyPPoPZP-Pt6F*I%*%-+$$ LLIK"I7KK7K7NFAIINN N@NNN!HN@HN-I,,XIA AAA@D"&HA7777ySjSSSwhS]72Q-' Q?2/39]]]]]]qq]]]]]]]/+]3//++]q29999//r10]]]]]]]]]]]]]]]]]]]]]]]2.#"#".'732>54.'.54>7.5464.'>LOlI.DT.}2Sm;DpF7R61O7:pk]uO 6Nd9:fL-9_{AAhA ;T5*K9!5Xq=:Y<1Rl<6]D'?bE-:" OG-@. .IjL-WI7 3@Q3IuS,@hM7C% (A/6H3$.IiJ-SG5.@P00E3#!4E'.B0"/F-Z{H@ H@H@H;- 9,0H+{o[O;/?@H@H/++]_qqqqqqqqqqrr+_rrrrrrr^]]]32/++++1053!53ӥø1[@oQ II*I EE*EL<9/I/6(F(6$F$9IZZ5QEQ:=446.F.6)F)9#I#9I2Q=_GoGG=G=0@ @@DH&o<7BWLRLBBBBBBBBLLLpLLLLBLBL!+??99//]q]q33/q/+]q99//]310]]]]]]]]]]]]q]]q#".54>324.#"32>%32>7#".54>32.#"4^dc^44^dq\-RtWccWtR-!CdC1K8's:RoKeb00abKpP7r &7H/Ec@d^44^dd^4rVsR-c䂃b-QsYHxV0-7#+Q?&@r^ao;$;K'!2&.Sv2A@-( H.( H( H H@ H3'' / 88@H8d8t88P88@ H8?@&HCC@3 H9 99 H   #33** P?3/]3/]29/]]3+]]]+]/+3//+_]]]+q332/]10+++++".54>?54.#"'>323267#".'#'2>=5V>!3Vq>'8#CQ +KlGDmM*#  *)9&&30P9 )J7 :8R4E\8<.<#;L /R>#<_B:2h'3MFo"7G%A 4+8AS q@Tj z j z jzjz_  @ `   _ ` /o/]32/]qq/]]q10]]]]%53 !53 vRTPQm?sm?sdG3@ P@ H?/+]]]/]]10%!5!1?H==$=:@^ H9/I/6(F(6$F$9I= H6.F.6)F)9#I#9IEE3>>E?E56@;;2??6?6?0@ @@<H&o226>4E DDD7666777p76E77E6!+??9///]q]]23//q/+]q99//833/293]10]]]]+]]]]+]#".54>324.#"32>##!24&+3264^dc^44^dq\-RtWccWtR-Rǡ3hUݟ_QPTd^44^dd^4rVsR-c䂃b-QsP?~of{PEHU| ///10!5!|s^z\'B H @! H H H   #?/]10++++#".54>324.#"32>-Ni;;hN..Nh;;iN-m0A&%A00A%&A0y;hM--Mh;54&#"'>32!+XdgR4GJDX.LkDAgG%6Sf_N3g=`QHIP1>KID3W@%!dVKIJ*q'5@ffV f Y"i"*@P H H0--- ` `"### @%H1 i"H"X""( G  ?3]?3]]9/9/+]3/q/]q2/9/910++]]]]#".'732654.+532>54&#"'>32WtI$ XUMS%8C=9=2 JGDT2Of;EhF#VZ4K0t'@Q+ CEHL-6 m 5(3!tpqP`52_W3#-XYT]2f~&@@&H/+]/^]1053wN~@ H HFV H@> H 0/o@ H P`p/]/9/+/]^]qr9/3]210++]++#"&'532>54&#*73AhK-1%)8#=HAk'^^)C0b %(dQP3} K@, 0`   0o ?2?33/3/]3/]/]2/]10]535733P{3klxk#  H @+ H  H  H$4d@& H@!H%p%%/% P ?3/]]]]/+/+]_]]q10++++#"&54>324.#"32>Ӱ+WX]T'2H00K33F+1K4ɾ[e55d\SnABnRTnBBnS @deue u eueu   p  ? o    p?  /o/]32/]]]q/]]]qqr10]]]]%#5 53#5 53ΨRRݪROot?ot?8N&y'@ p `   ?55]]]]58u&y'r/@o/ p `   3@ H?5+]]]]5]]5IN' 's.!@p`S@ H?55+]]]5V:%)@pyz##z$$Td:Jz H '''((F_@733267#".#5%>ORO?''>NPM<%*MmC Cyzr{@q2GlUC<:DS7EhP?99FX;;\? z TpA8gdR&$N&%+5+5R&$@ &L%+5+5R&$`@ &%+5+5R&$^@ &,%+5+5R&$l@ &%+55+55R&$P@ 8%+55?55@VtrVfsUem\)    Z_ _ _ _???29/9//3323/399/]99//q10]]]]]]]]]!!#!!!!!#! E !d<#2:3&3hNy&&x :0(%+5&(? &  %+5+5&(@  &(  %+5+5&(w & %+5+5&(y & %+55+55 &,&%+5+56&,F@ &E%+5+5h&,@ & %+5+54&,@ &%+55+55e!p@Eu [ [Z[  Z@#Z___??9/q32/33/2q9/10]]]]]]]3!2#!#%4.#!!!!2>ңojR{j:oN!`Q]H˂=9H &1@ & +%+5+5a&2(&ش), %+5+5a&2%@ (&%(+ %+5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 &%+5+5l&,@ & %+5+5l&N@ & %+5+5\U&,Q %+5U}&LQ@ %+5]|&,O'%@ &%+5+5v:@F$ 4 @7H@4 t`@H$4HHH@&Hdt uy|HnqH@cfH0$CFH >@ 8;H@*-0H+k{@ 0 @@ H??^]+]]q_qqqr+r+^]+qqqq+++^]qqqq+r++^]+]]]]+qqqqrrrrrrr+^]]9/^]1033´:I&,-W&LM@o0]55]]]55 &-7@ &%+5+5W/@ H( H@1 H;@ H$F   $ D  @ H@H@3H@P_o 0@O@9H_ /?o?o@eORH/?O=@58Hp@#&HOp@/? P??/]3/]]]qq+qrr+^]]]]+qrrr^]]qqqq+r^]]]qqrr+++^]_]9/^]3//]+]q+]10++_]]"&'532>53#'##53M"A $ &1 6]ihW+C.@>jN-nN?&.ʹ  %+5N&NN  %+5: @H{tV f {YiC :* z,  p  P   @( H F0 ?  ?2?39]]/^]2/+]q839/]893310]]]]]]]]]]]!#33 0Il~: //&/&^ %+5+5[>&ON@ &K%+5+5N/&/ %+5~NG&O%+5/&/@  %+5?5i&O$KA@@H@H@HH@ H@ H  %+5?5++++++/&/O _%+5&OOBT%+5/ w@1ydtVV Z  @` H @H    _??9/]]9++/]q/3210qrqr]]!!573%hyUU f@*'' F @ p  @H H O??9/]9++]]]9/^]332210qq35737zz||DDXHGz &1@ &I%+5+5&Qt@ &&a&)$%+5+5N &1%+5NN&Q[ *&$%+5 &1&%+5+5&QL&&(.$%+5+5P&Qb 47@5)))0 H/@[ H*6:6663'Z@3Z@Pp0P0'_-! _?2/???2/^]]]qr/]29/]310]++]]]".'732>54.#"#4.'33>328`O?%d;@N) 'QW^yF"gV|p5V(6s-A:k_Blb.>iMD%\ZL?EE=eF'@̋ВNWN5@y44Z4j4+4;4K4.@J H..1F@ `    7%F @%P+P????2/^]qr2]qqr9/10]+]]]"&'532>54.#"#4.'33>32"A $ &1 4U?@gI(>RjFZT'6]W+C.OjA-U}QS"KC0,9;/L5,\d>jN-a&2MN@ (&)( %+5+5VS&RM@ #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H++++5U:&XQW 22%+5 &:y0&5/.%+5+5&ZK,&1+*%+5+5-)&<[ & %+5+5W&\K@ !&& %+5+5-)&<h@  & %+55+55A&=@  &J %+5+51&]t5@  &] %+5+5A&=O|%@  & %+5+51&]O  %+5A&=8@  & %+5+51&]L & %+5+5}س H@8 Ho  F0p@"%HOpP??]]q+qqrrrrrrrr/^]2/]10++!#4>32.#">;fQ E-(3 ;eK+)<'N@kzYiy U e u 6 &&"2r%5P&6F  _ P  Q //]9/32/q333qqq/10]]]]]]]]]]].#"3###737>32>.!  (GmQ R#  (@--;fL+ R>'=C$@z@@fvVf@ H H H  & '  (DBBB>2>>>/ >>  Zjz 0 EPEE0E`EEEE/E U e u  >>-p9@@@@@@ H@ '&&  9?999 /3//]]]39/32/+]9/]3//3]]]]q3/]q3]]939///]q]q]]310]+++]]]#!#&'.54>32.'!4.#"32>573&!á~$!&&BX22XB&$11$$ 1$p-O Ds O--O;"";O$J<))>I$_w,!!,,# #,#Ws>&D'PUtcZ#@e&jm$%ԴLB$%+55+5+55&& %+5+5B&t@ Y&IY\=%+5+5G&K@ 4&I47 %+5+5,&t@ .&^.1%+5+5]N'69NK'V.N'7N*,&sW B@v x@ H@/?/]3/]+]10]]#'##53ih B@vx@ H@/?/]2/]+]10]]#53373hi3XSQ@;[k4D H@!H/?@H@H/++]_q++/]]]/]q10!5!X%wI@3O@@73)JtT2u'8H**G8&u 2St3Up=+;$$;*=pU3 P@ @HS?/+1053 3s'Y@ H  H H@* H@_  #/?O/]]/]10++++#".54>324.#"32>&BX22XB&&BX22XB&l$11$$11$2XB&&BX22XA&&AX21$$11&&1PUL@7 H  H H _ @ H  P`p/]q/+/]q210+++#"&54>733267G(ij"054+1-:p fU/O=* -;F'*0 M@ H  H))9Yi@H@H Щ 9@H{I@H6}o-=M H[k{H &fvn@@`emHpRb@"2Rbr$4Ddt@ <@H;@95:Hdt0@P$p@HTdt@ H@ $'H@!HD0 @+ H @@H/?/]2+]q3//]+]q_qq+q++]]+]q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77H@66H@33H22H11H@00H@**H@))H@((H$$H##H@""H@H@H@HHH@H@ H@H@ H&ܴ %+555+555++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++R$%/8@(Z@0P @`_??/^]q/]10!#/8=@jzeuYV H@@ HFfvIiy _O0@H0/_ H  ?3]+?2]]/+]3/]]]]qqq39=/3310]]]]++]]]]1073!%.'># ^(RE01FR((A= +a'+@i fYV VZU *+ %%Z%!!U! +*[;o0 @P[     +_((#_#_- -]]??9//]]]/^]qqqqqrr^]9910^]]]]]]]]]]]#"$&546$324.#"32>%!!_X\\A{~?A{{;Kǥhm  efДPPәUVР|,?. N@ t{ H6  @ H HH9o0/%5*:  % 5    *:  0o0v?2?3]/]]q2]qq/]3]qq9=/3]qq3]qq]]]]10]+++]+]]%#.'&'#3N|   z?/Y#)%')#Y- 0 1Z K@1R _0 @p _ __??9//]q3/]q39910q!!!5!5}9\a2 O@(Z@Z@o   @ H_?2?+]q/]/^]10!!#!ax 3l @i t WgTd t F V f 9ggd'   0 P `  F   _  _?2?92/]]]33/3qq/^]]99//]qq3qqqqr10]]]]]]]]q]35 5!!!lmCC|.7-)<u(3 H H H@H H)Z {Zt#Z/$Dt5D555555p5`55@ H#.`  "1`  ??99//3232+]_]]qq/]q3322]]10+++++#5#".54>;53324&+32>%;#"@ŅSSŃ@CɇHGʅC08\Y++Y\84iTTiqHHu5bXXb5.+;#@ZjUeZjZjJE Zd#Z Zkd4Dd%$%4%D%%%%%%%%%`%p%T%@%%@ H"`??339/]32+_]]]]]]q/^]]qq3]q2]q10_]]]]]]!#".53;332>53+SɆC/]\88_[-DɄSTh-Pd9I9dP1hTUW9@[e$e111 H    Ht66v68v8t7767** )50( `(p((o(("[P55@EH55055[O_o 0_; '0*_)_??32]/^]]]qqr/]]+r99//]]3310]]]]]]]]+]]+]]]]267>;!5>54.#"!532.54>Z;mc*'!G`Y*=tlmt=*Y`G!'*cm;ZVj63~Ut|AA|tU~36jV4&,@ &%+55+55-) r@  H@ H @ i6FZ&Vv9IV 9Y Yy6)9 tVfB$4vbT6F$pd@$4i@tP`D Tdt0@$$DTt9p$4Td4Tp0`/  _  @ H ;K{??39]3/+]32]]_]]]]qqqqqrrrr^]]]qqqqqqqqrrrrrrrrr^]]]]]]]]]_]qqqqqqqqqqqqqrrrrrrrrrrrr^]]qqqrrr^]]qqq/^]]]q9^]]2+M2/10+_^]]+]]#3 3%53!53 ӥHH9ayVe&~T!@ <&73#.'32>7.#"KAWoFEpV? .'$  ;]B6dR= -GfFB`@8^E&'E]68?A/:gn'BA:1pg04klVsD.fWI >@D{z<<jzfvJ2Z2j2%eu%0H400@0`00@:H0404H@0+@++++++@! F00P11&9P !&P ?32??9/9/^]2]q99//+]q910]]]]]]]]]]#"&'##463232>54.#5>54.#"I5oxf8cf5#=Q.9r[8GQW+HnI&&QYq9W73#>7z0:]?C?>C?-o|A[V2@Qsjv..j.ZjZjU e r&r3C22G@.//)4 G))/P@HHoZ.0P$??99]]++2/]]q9/9932/10]]]]]]]]]]]]4.'32>".'#".54>75!`1ELIf<#IoMQpE *-) <6fO1@{sr}BI`UsVQr[L`76_7tanHDspa!SwFjN9@1%5$E$7"*% H **F000##@%0HH@B H;5G?O_@%+H;;_;0P//O/_////////'P$ P ?3?39/]q9]q/+]+++2/99//910]+]]]]]]%2>7#".54>75.54>32.#"3"6`O?i TjN`\-*H`63U="2_WvC/}K[`7aKHmB4Jr08d'G5 .TtE:_E*(@V3>jM,VcXGDUJ9F% (PE-E.V`8@u&77'|'''usd$$$$9,,<Ld666&6V6///G!(22 O@!H @2/P@H!!!!!!!0/?9]]]]+32/^]+]q2/3/9/q10]]]]]]]]]]]]]]'>54.'.54>75#!5!+Jd96oZ: ~  $B^9*YRI61Uq@ "$" >{lQ/{@O1"9XD"D>38 !&'"-! $2JdCSDFjXN#d @. H#F@P% F   0  %%p%%@H#P ???2?+]]q/^]q2]q10+4.#"#4&'33>3294U?@gI(  >RjFZT'XVOjA-U}QSDy*01//L5,\dj %@l |$$sUe|JZjsEUe     !G@@-0H' G #H0''@#H'P P P??9/]+q/+]2+q310^]]]]]]]]]]]]]]]]]#".5322>7!"!. lv>yp6*>dI*,G^B>cH*#(Ea\uy]4ؤׁ43~ԡ~3:  @ F  _o o `@P`p?p?Oj`p?`7/?o???^]]]qqrrr^]]qqqrrr^]]]]qqrrr^]]]qqrr^]]]qq9/^]q2103.53 5@F!N @<4: @r f v iyV  T F      @  F0 ?  ?2?39]]/^]2/^]q839/893q310]]]]]]]]]!#33 0Im: /!<@esjz  e u fv~lTeuVT@; HTdt]mIeu&V*:Jz  !@E!??__@#0#`### !P ??399]/^]]]]qr83/839/9910]]]]]]]]]]+]]]_]]]]]_]]_]]_]]]]]]]]]]]]'.#"'>32#.'#$*-9( #H 7WIC$cIiC $Q_A8;8<>7w:*!./&5##"&'##332>53^8EV9Rx ;bJCdC!.:3O5@: ?|EtU/4[~Ki"LC1:#@OWgw H F@[ k { [    ; [ k  @  K[`DT DTDT[D K[`DT `DTgDT[D K[@]7K[? `DT `P/ ?3?3^]]]_]]]]qqqqqqqqrrrr^]]]qqqqqqqqr^]]]]]]qqqqqqr^]]]]]]]]qqqrrrr^]]]]]]]]qr/83^]]qr239=/+3310]_]]]#3654&'3?jMz7|Nc^:`VQw--qVjJ@}zGGe!u!!i'U2S,9nB~BBB*B , ( H II,IlI|II _%O%p%%%_o%4?F   ???O?o?????? ????@ H?*G%P *@ H*H4*9 $$$9P?22/9/]9]+]+999/]/+]q99//]22/]r3/]qr910]+]]]]]]]]]4>75.54>75+5!'>54.'.V3n}DvW32Oa/ DPLJzMpD@]@( } ";ZC?Q1 6YT@O1"9XD"D>38 !&'"-! $2JdVNRO+:0s@#5 u (H(H.P ` . #F@oP@& H22/2 HO_o"P(P???22/22]2]+]q22]/10++]".5!#>="5>3!#32>7f;R4n$' 'OE5 +36% #E;^BHJL}P  S,8  W;O/@@zeujzj-z-K[k}kJZG@1&F0011@#H1`11 P+P???]]+q/^]q2]10]]]]]]]]#".'##4>324.#"32>;?sb>bPB54.'.54>32.F6XC1  L|\5r_= ~  #Da?Bq^H2.KnaDcI6t*191Phlj*D`H9%;YD"D>38 !&',$(3D]zQ/lB",w$V:/@^ z .e.u.d*t**|!!Z!j!&l&|&J&Z&oG@ @1(G  #P+P??2/]]q^]10]]]]]]]]]]#".54>3!#".'4.'#"32>0={{{|?V~9 #+,7+"-YSk=NuL&pLJʁҊB*csNJtc*2in4a:#c@2#  H - F" """$%O%%%%%@ HP#P ?2?+]]]q9/]]33/10]+]"5>3!!32>7#".5'OE5 +36D #E+;R4  S,8  ;^B:q@>jzV)G@/! F  0  !!p!!@ H! P??3]+]]q/^]]qr210]]]]]#".5332>54.'35q{mh3uIhA!(( ;ښR2ktc2lxDx)(qUWR#-@e"e!u!!JZEU- H@6 H @PG $G+H@@/P'P+P??32?3/q/]32q2/]10]++]]]]#.54>746324&#">Jnr}C1gmE`<T\1WPDL5׌GiHύfgMrPDLyӁXP@3{T{Zj)9 H@c HtEUe&6'7GeuV'7;[{D $ @)HF5}K[k? P?3??9]]_]]]]+]]/833//^]]q833/3910]]]_]]]]]]]]++]]]]]]]]]]]%#.#"'>323 #,(* "> 0F<;$i9W6R7 >fKGW,<@Zy Hyy   Hy FFH!!!o! !!P!!!!P ??32?33/]]qqq/^]3210]+]]+]%>53#.533.W|P%;||;&O|WwIy[|zn5k5nzzZyI SO?@S!!wz:: %%*%%% *I==(. . 3G@A3G?((A0AAA@ #HAAA A@A#>>8P#. P-?32?329/9]]+]qr/]^]]99//9/910]]]]]]32>54.'7#".'##".54>732>=3srfAW5=aCmg15e_DhM44MiC_e51gmD`>4VA3R98fZRyTpeȉH$Dc@@cD$HȀe¡pTyRZf8-T{N{&i&ٴ %+55+55{&i &$" %+55+55V&RT)@ #&F#&%+5+5&T@  & # %+5+5S&T@ @&7@C(%+5+5&(yHHHHHHHHHHHHH@ H & %+55+55++++++++++++++.O-@ e%u%%@G H H* : $4 *'Z-((( Z*_+&!_(+(_??3/]??9/322/^]/]]29/10]]++]]>32#".'7326=4&#"#!5!!m5)V\5XK@o)08!TP3{xi! ]d5 .{!eowz  圜/&aq@ &! %+5+5hy*@''')))u u IF % 5 *:D,[tD+%dt@0_ "O&&&_" _ 0@p?3/]q?3/]9/q/^]_]]q3/]]]q29/]10_]]]]]]]]]]]]]]"!!32>7#"$&546$32.o|I r MmZlO(l{V[.GDfD~npH2Ri7MOd9m  e<2[F*]6|,4&,@ &%+55+55 h- &/@b9   :  y t///{(((e  H+{*zZ0'''' $ 4  @HI$4@'H I !,Z+_!!__,_???9//2/]3q+qq+q/^]q10]]+]]]]]]]]]]]]]#!!#"&'532>7!!24&#!!26 =yy`1+1oWp@ljU%>k:i\yn@t{&6Z@+ H Z  @  Z__   _???39/3//^]32/^]2/+]10]]]#!!#3!3!24&#!!26=yy¿>V}|>GWp@sT:i\y./@ eu@L H%5E Z  0  Z0p _ _ ?2?29/32]]qr/^]/]]310]+]]!4&#"#!5!!>32q5tnb#$bpv8?zm  圜 &@ &% %+5+57:&^J@ &'%+5+5h ^@@ \ Z0@@Z@    _/?3?3/]]q/^]/]]qq9/10!3!3!""hhR$@Ft{& ZP @ Z@0@#H_@    __??9/]q]+q/^]2/]]]]qqq2/10]]]]#!!!!24&#!!26=yy!~}|>oWp@H:i\y%/ahE@_ srfU e ZjaS5E\Z_$4@ H$4@H \/__/3?22?]/3+q+q/^]]]]2/10]]]]]]]]_]_]]]]]]%3#!#3>7!!2)B7,CԺ1(.6 h83Aݲ3(G)H@)uucl|l|e u !(H@#H:J)5Eu'0H(8H @ H' 7 G H@I H H H" (Z) ) 4)t))))!  @ H  D t  +  @3D+t+++/++"'`/ )!?33?339/]q329933]_]]/]83/]]]]+83/]q39/93329/93310++++]+]+]_]]]++]]]]]]]".'#&'3332>73###R-0.U0BZLQ99QLZB0U.0- U#c{DkD{c1f# {Cp<@3!|pp`eu"e"u"| Z j ;K!@z H+3Z.@%H..8Z$$$_o$$pOo0@ -H@ H3_ )#@ H##_) _ 0p H?2/+]q?3/+9/q9/++]/]]]]qq99//]_]q2/+910_]+]]]]]]]_]]_]]]".'732>54&+532654.#"'>32mv^$B[yPMzU-GG'HhAMrS8!`ilx@(Ih?CuW3E2[OM7bK,%Ed@vw{7V;(DZ1=RW-5`SDkP7 2RsI_q>{@@A H  H \)  @ P    0  \/   ?22/?33/]/^]2q/]]]q3q10++]]]]333#46767ުd3b'.('Y&,,Z:&J@ &! %+5+5@hT t TzYi H:d t P 5 E    `  Z    /  / `/ ?2?39/]29]/]q83/]29/]893310]]]]+]]]]]]32>73###9QLZB0U.0-D{c1f# {@#uUsUe@. H%5jzZ @_$4@HI$4@H I __ ???]/3q+qq+q/^]]]q10]]]+]]]]]]]]!#"&'532>7!#^1+1k0 +a2nX H H H H H H H H H @ H++++++++++3hy&.77@oZjz)UeFdtVyTdFqVf:J  ?Oo@ _?2?3/99/8]22/8]39910]]]]]]]]]]]]]]]]]]]]]]#".'732>?3 3/QZmK B@:Q#S0%:59&1>XR( %4ZDYv(3@\FVfIYi;3;5+&+5'&')ZZ#Z.O  5p555O55$/`  "1`  ??99//3232]]]q/]]]332210]]]]]]]]+#5#".54>;53324&+32>%;#"@Ņ((Ń@CɇʅC \Y+W+Y\ iTTiqHHu5bXXb5.+;h J@/\ Z@pZ@   _/?2/?3/]/^]/]]q2/10%#!3!3Ŵ@F( H H*:JZ0@po@ Z   @   @H_/  ?3/?9/]32+]q/^]]/]]]]qqq310]++]#".5332>73#$^ks8rl45nh\# /\YR{l  r@LZ Z$ {dZD    p @   _?2/?33]]_]]]]]/^]/]]]]]qq9/1033!3!3h/}@T{T\Z Z ; K [ {     o   Z   _/?2/2/?33/]/^]]]]_]]q9/2/]]]10%#!3!3!3/-ӺҺ.d@Dt{&@Z/ @Z  _ __ ??9//]2/^]]]q]10]]]]!2#!!5!4&#!!26B}|>=yy5s3-:iZWp@ym@Lt{ & Z@PpZ @ Z@@ H_ _?3/?3/9/+]/^]2/]]]q/]]10]]]]#!3!24&#!!263=yy~}|>oWp@:i\yk@Lt{ & Z @` Z@_ _??9/]]/^]2/]]]q10]]]]#!3!24&#!!26=yy~}|>oWp@:i`yiy*@Qssesesee e jZ!!  Z  (($$&[ #p####@##@? H#P` #_&&&& _ 0@pO_ ?3/]?3/]q9/q/]]q3/+]]]q39/10]]]]]]]]]]]]]]"'6$32#".'732>7!5!.XfEG.[Vvq)QmWmM r I|*F[2324.#"32>ZZٿ* c蒟W3!#!3!!"`[T'B~xI%MwS;LxT,_NlC^h7I9bH)?^WsNDx?84.#"32>2#".54>7>?>'IhAErQ,,Mi>EpN*q{A:Γ9d[+VV[N|^C,Ca~r[%'\prY$$XFs  !2Ile7aH):$/@ *%*@! H  &,GG@/1@11@2#H1?11&F0 $Q&&&&&%PP??9/q9/^]q2]+q]q9/9]10+]]]2#!32>54.+32>54&#4LpD#hQ5Q:% #=Z=NuN':K,C/2F,'=+RL:6@#@'H0F0P??/^]q3/]+10!#:I:h:@A f"r"""yfv""b$DTI @*H F@o @ I PP  /3?22?/3333]]2/+10]]]]]]]]]]]]]]]]!!#!#3>7!3B100Fңw::9ˆ2h2;IWNHS:'a@X"  ZjzUeuJ!!!E*:% 5 " &F'  ' @1 ''!     P ?    _  0  @@/?)))o))P)?) ))))O)_)0)"@% H%PO_O '!?33?339/^]q3299+33]]]]qqqqqqr/]qr83/]]]]qqqqqqr839/39/8933]29/893]310]]]]]]]]]]]]]]"&'#.'3332>?3###SAaB-ؼ0A4004A0-BaA PUBEM\2&2\MBU #1^N7@55&&%&--F((3G I@@V$H    99I@ H-P#P#P`p ?2/]]q?3/]q9/q9/+]]]q99//]+2/9q10]]"&'732654.#52>54&#"'>32ʧ-~g`q7\x@@rV1c]#F<* >aNUb5,GX-8dK+1e},NV^[;N-&C4JV!7*Db?*Lh?9X=$)C]:EwW1:@  @k7#<Ŭ:MRJe9<9:&@ &!%+5+5:@u9y @{ H x /OI8 yG 6   F09I  O0/ P?O??2/?3/9/^]q2/8]]]]]qr3q/]29/89qq3]3qq]10]]]+]]32>?3###04A0-BaA:&2\MBU # :@*tUeu&frdV@= Ht HF@@`p6@H  PP ???/]3]]+3q3]]qr]10+]]+]]]]]]]]]]]!!#"&'532>7!h*,3G^A0 &#3(!"&ؕ]**^:@ k{d t @z7!#4>7% # <=9,:k?HH?<@<: @0F@O9/o    @1H F   0  P? ?2?39/^]qr/]q2+]qr]qr^]210!3#!#B紴:6:VNR:m@PF@O9/o   / F0P?3?/^]q]]qr]qr^]10#!#Ǵ/:I:WMSWNF#:H@+F _ 0 @ / P?2?]]]]9/^]]+M10!!#!#d:IW:\VW>5J_@ ]]]NHHH9HmR3@K H/  H 6G@ KG$DU' HA&$Dd4aa@4#HaTadaaa@a a0aaa&-PFP1[;P ??32?32?]]]_]]]+q/^]q3322]+M10_^]+]+]+++]#"&'##467##"3234.533>3232>754.#"4.#"32>>&Vei*.op-.reV&8U<<^A""@^=9V9n4X@5\F(#A\54&+ 4hggE`;tpJvR,61G.^W2: i H@: HG F@ F @  Q   O    Q ?3?39/^]q/]2]9/10++2#!332>54&+3&4hggE`;t<pJvR,:61G.^W ::  H@V HG@//?_@#'H F  @  Q   O   Q ??9/^]q/]q2+]qr]10++2#!332>54&+84hgUE`;tpJvR,:61G.^W7N(@Wv"vkk  G@    *FF@ H P  P$ `p@"H$/@ HP?3/+]?3/+]9/q/+qr3/]q29/]10]]]]]732>7!5!.#"'>32#".7dIgD"c"CgImv Bi]ZQ3rcj=; lh5aRZX,i[DtT05أx͗V6\zN'@Uy%%t!!vyG G@) F   0  P P/  #P???9/]?/^]q2]9/^]310]]]]]#".'##33!24.#"32>fsA޴!׽#Ca=?cF%'F^8>dF&>:6~b')c{~b('b: @Du H (+H %H4+)0 H  HG  F@   @[kQ/Q  ?3?9/]2/]83]q39/9310++]]q+q++] #.5463!##";Xvxk|6z\]^]W{&Hi@ &&*(%+55+55 W9@ 1 H@V H$$9F@P---; 9F0;;;;;;p;;;9(P!3P Q H??+9/322??]]qr/^]q3322]q9/10^]++]3#5353!!3>32#"&'532>54.#",FTd>hM6]H"A $ &1 0XF@gI(!B8'7M28eT>jN-+C.EhE#.TxK&t@ &U %+5+5WN(@qtt/*?$F#F$ $$@$`$$$$$$GP P /@ H  P## #`#p#####"H##?2/+]?3/+]9/q/]2/^]q3/9/]]10]]]]".54>32.#"!!32674r3QZ]iB vmIgC"c#DgJd =jVx؀50TtD[i,XZRa5gm Cz\69KV=&OԵ @88H @ 77H @66H 55H @ 44H @22H 11H @ 00H @**H ))H @ ((H @&&H %%H $$H ##H @""H @H @ H11H@ ()H@HH@ H%+5+]++++55++++++++++++++++++%{&i&%+55+55W=M :"-*@Ruj9Huj 9  H W g w  Hm Hu6F H@ H"#F@  G))@  H)/P//@]#H/0/m  ?       ?  j )  5   -Q"""""O""" P P#Q ???9/^]q/3]]qq]q]]]]]qq]]+q+]9/]210++]]]+q+]]+qq]]+qq]]]2#!!#"&'532>7!32>54&+M4hg>e*,3G^A0 &#3(!"&E`;tpJvR,ؕ]**^61G.^W,: H@ HF G@!P!!@2#H!F @Q POQ ?2??9/^]q3//]2]+q]9/3210++32#!!#3!32>54&+4hgfNE`;t:6JvR,:6E1G.^W )@U H! F@P   +# F0++++++p+++#Q  P H?+2?3?9/32]]qr/^]q3322]q910^]+>32#4.#"##5353!!=FTd>hM0XF@gI(,Y7M28eTWEhE#.TxK!B8'&t?@ &Q%+5+5W&\@  & %-%+5+5h: }@Y I O & F@O9/o F0  p  P/3?3/]qr/^]q]qr^]9/^]1033!3!#:Ih7@%Z@F@_??3/^]]/]103!# 8@$I0 F0P???/^]q3/]10!#!3!B٣8: &:A/&03.%+5+5&ZCH+&,/*%+5+5 &:@ /&K/2.%+5+5&Zt&@ +&]+.*%+5+5 &:@ /&31.%+55+55{&Zi@ +&/-*%+55+55-)&<" & %+5+5W&\Ci &!$%+5+5[Op5![Р[Op5![Р[Op5![РrL+@?O/?o@&+H/+]q//105!rÉL+@?O/?o@&+H/+]q//105!ÉL+@?O/?o@&+H/+]q//105!ÉN&BBH /@ H@ H @  H ?/+2+10+54>733 y-2Y4VKB AAH 4 H  H @  H  ?/+3+10+#>5#53H {-1X5VKB A?H 3 H  H @  H  //+3+10+%#>5#53H {-1X35WKB AA~G /@ H@ H @  H  ?/+2+10+##.=AX1-{ ?A BKV5K_ Y@: H H@ H @ H    ?32/2]/^]]2+2+10++54>733!54>733 z-1X y-2Y4VKB AAÒ4VKB AAK_ k H@ H  @ H    @ H?  ?32/2]/]3+^]]2+10++#>5#53#>5#53_ y-1X {-1X5VKB AAÑ5VKB AAK_ h H@ H  @ H    @ H  /32/2/]/3+^]]2+10++%#>5#53#>5#53_ y-1X {-1X35WKB AAÐ5WKB AAv @@%  /o  /?/]q33/22/10#53%s`arxsV@2      ?//]3/3322/21053%%%%#5hihixxGQ|I H @' H H H?  0/]]]/]]]10++++#".54>32|-Lf:9cK++Kc9:fL-:fM,,Mf:9dJ++Jd V@= 0`0@`/ /3322/]]/^]q9/10!53!53!53(7+?Sg{@ vyf@ H` H\ HV H>@ H8 H4 H. H@ H H  H@  HJ;1@v y 1f@&@@@@@@rcYihh&hhhhvhYhFh)hhhhhyhkhVh9hhh&h h " )IYy"@-1H@H}}}}y}k}]}I};}-} }}}}}}}}}}}i}[}M}6})} }}}}}}}}}{}f}K}=} }}}}}}k}}]}9}+}} }}}}}}{}}Y} };}K}}}}}}{}}f};}K} }}}}}}}}i}y}]}9}I}+}}}}}@}}{}f}I}6} }}i}}}}}y}k}I};}} }}}}}}}y}[}k}9}}+}}}}}}y}k}9}&} }8}}}}}}Y}F})}}}}}}}}{}d}K}?}}}}}}}}p}_}@}}}mTw^E,O6'?????^]]]]]]]_]]]qqqqqqq_qqqqqrrrrrrrrrr^]]]]]]]]]qqqqqqqqqqrrrrrrrrrrr^]]]]]]]]]]qqqqqqqqqqrrrrrrrrr^]]]]]qqqqqqqqqrrrrrrrrrr^]]]]]]]]]]]]]qqqqqqqqqqq/++^]/^]]]]]]]qqqqqqqrr9/]q99//^]]883310++++++++++++_]]!#3%2#".54>4.#"32>2#".54>4.#"32>2#".54>4.#"32>0?lP..Qn%7#&:''8%"6'?lP..Qn%7#&:''8%"6'?lP..Qn%7#&:''8%"6' !SjfV&%VgjS!Ib:;aIGa;;a!SjfV&%VgjS!Ib:;aIGa;;a!SjfV&%VgjS!Ib:;aIGa;;aUzY(@ H H/0?/]]10++3U@ĞzUz&V `]5XQH@7jzjzO_0@`p/o/]/]q10]]%53 PQm?sYRB@0eueupo/o/]/]]q10]]%#5 53RQot?G&@ //]55]55T ///10!5!+u`b-o@@ H@ H??/++]8/]810!#3qe!o@ H $  !$ @& HK[@H@H/?/_]]]++]3/]+]22/]/]210+4.#"#4.533>32 /#HUw&1@*na.=%d^.("# . lyO.j@E  0Pp \  Q   _?O? _ ??9/^]]q]q22/3322/]q99//10!!!!##53!gQn{$Ձ:P:@Q::%5(,0 o4n+'0n O_o:o  0Pp0@FH*Q. Q+  @*-H   'o/_o4#s)4t%:::?3]]2?3]9/]q3]+]222/+^]qr/]9/33229/339910]]#!5>=#535#5354>32.#"!!!!!2>7P 9YsCFYV0cgF{cG '5A$rphh,?(&C5%7PuM%.y\f7:V994$s}8j\G*C0g/b@Gu[[[IkIIDmD[DiRiP}[k}[kT9d969F9%a5aEaL H1@^ H H -RIQQ0HAF'K%)H" 9I8f888YHK_?K_KKK@'H_KK@APA`AAAA@ HAF d[_HdPXHdFJHd;>Hd05Hd@ HOd_dodd HY@GHAHYAN54.'.54632.#"=yy+}|>iq{#J0i]ho5n)7(跪Ky\=cX(D1">W41`M/-6 9P00dR4\uD=oaԒ {zŃbNIbx6X@=: () 5O;pwit& U$ 6WV=@DIj&:+J+z++$;4;D;t;;.779-3n%n$$n@`@^H0Q9Q6@'/H-/?/?/(s%|%%%*%%ss% ?3]]?3]]]9/]qr3]+q222/+]q3//3/229/10]]]+%267#".'#73.5467#73>32.#"!!!!dx ?gaxyE (x(I{sag? yjDjO2 (c(l *Mr~d[DvW2Mr.5zC2WvD[d'Wc/%Qd9E+O@vy/B@  H< H H @ H H HJII45?@>,?@ H?"  P`&441:MJD'????33]/]/+99//883/3310++++++]]]#".54>32#34.#"32>3267#".54>32.#"3WtBBsU10VuDBsU2;+?(*@,+?)'?,/K6E^ -MoH^R&;a|ADjL0 SKlW}i--h~g))g1cN !Nb_O""O|K|Z2RW 6cL-Ey`g*(F^7 HU~'7@ 5(HH@CH H H( (`(p((((((333##  "&H @ H O93- "-/?9/9/9999]/++]3]2^]3/]]q2/310]]+++++]%2673#"&=5>74>324.#">3DExmo B"#B;bH4O5,OnB *s( '1M6Nhm IK;lS1*NoEcv&9S64U=!$=Q.!h.#7;@| H= r E U e  & !!%!  /=:I$I9.I$$$/$$$ I0@P )$H@H 3999@#,H98 @$H @H 8?3++/+]?33++?/]q22/]]]99//]]332]10]]]]]]]]]]+]!#3&'.53#"&54>324.#"32>5!&06+WX]T'/E-.G00C).H2{,,&Y'XR(.'b3ɾ[e55d\Qk@@kPRl??lz'/@ H @HYiy% H@I H,)*@@//**@*P**'%o(, * *P***%-?33]22/]3/]]9/]210++]+]+5#.'&'#367>53##5!l (z @&,7  3)"hool9@_e$e111 H    Ht66v68v8t7767** )50(  (`(p((/o(("[55@AH555055[?Oo0 '0*_)_??32/^]]q/]]+r99//]]3310]]]]]]]]+]]+]]]]267>;!5>54.#"!532.54>Z;mc*'!G`Y*=tlmt=*Y`G!'*cm;ZVj63~Ut|AA|tU~36jVX|H -R@2Z @!!_!P!`!p!!/ /---' ?2]]?9//]2]]qq210]".54>32!32>7.#"kƆE__pŽQ@NX.Kt]L#H$Tm;M\53WJ<"]oՋBO҂-#73!;H:RR:H;)"bADp*$*pDAb"V@ @ /299/105>73.'#"bADp*$*pDAb"V;H:RR:H;#d^D@  //29910.'3#>7!5;H:RR:H;#"bADp*$*pDAb"V@ @ /299/10%>7#.'53+"bADp*$*pDAb"V;H:RR:H;d^D$@@ //29929910#.'5>73!.'3#>7;H:RR:H;;H:RR:H;)"bADp*$*pDAb""bADp*$*pDAb"&@@@ /299299/105>73.'>7#.'5"bADp*$*pDAb""bADp*$*pDAb";H:RR:H;;H:RR:H;H#(@#  /299299/3210!!5>73.'>7#.'5 "bADp*$*pDAb""bADp*$*pDAb"hPX;H:RR:H;;H:RR:H;8/E@]z!!DHUeJZzJ8Z8C8 H:C* : J %-5--- '0'''00(00F@`@@H@ HG323>54&#"7>32.#"32>  `a]N#/IfS*M@2;:7$*tCq^)$3@$5VC1 *A,BlS8.hjj0ΐM?kK32>32%"32>54..#"326],RsFaF KTZ.EsS.,RtG^CKT^3ErQ-Fw83wM+G33G]3wN+F10G/FxNNj>?fH'7dYQh<>fI(7e~(F^66\E'(F^63]E)~` //103!!^j8^#@K[K[ //3//10]]4>32#4.#"Dzbc{Fg5_NN^4tLLtbl98ldN#@ ""*"% %%%%%%@HL%/%?% %%@H%@H%%)%9% %%%%@Hk%{%%]%K%)%9%% %%%Hm%%H %%H%y%%%K%[%k%%H%%%}%%k%]%&%6%F%%%%%%p%@nwzH%@ekH%v%% %%)%%%@ORH%JNH%)% %%%%%%%%%54>32.#"$$K>#3B'2Z}K"K=$3B'2Y|N %@T0^V( (AT,B^V)8P,!C@$ H HA HB0 H=0 H*г H0@ H H 0 H0 H Hг HгH@) H?0P@`- @ H /E;@-#@)(1 1011@ '323267"&'.#"5>323267(EIAk-&A<82Q(PMK%233E{4 ;=D(EIAk-&A<82Q(PMK%233E{4 ;=D+ !%/  3+Z,  &.  2* A7$@l5: < *      dtP0 `o  _ o   /_o P   /]]3]22222/]q3/]q_qq3910_]]]]##5!!5!3!!!7 =X!l$ܔdGP 1@  ??/]/]9//33/33105!5!5!d8d?$ {@H(H(H@?H 0P @`@ HO_@PP/]33]]//+3//]q310]+]+++5 5!AZw쑑A$ y@H(H(H@>H 0P @`@ H@PO_P/]]]33//+3/]q310]+]+++75 55!AZXXu7 #@i y iy///10]]3 %! {RVdG////107!!d>T"  H  ///10+#47632#"'.'&#"TR?K3% !$ V{{?0(4 ''#i  H ///10+3#".54>3232765"Z(g>2%!%}86'"%)j%?33105! %iH??103#ؑHK"??310!!#(in"??3105!# (%%H"??3103!!Hn%H"??3105!3 %H' ???23103!!#iHnnH'???33105!3# %K( ?2?33105!!# i%n%H( ?3?33105!3! %nH 3  @  ?32??3223105!3!!# i%nnqj% ??3233105!5! AّH*A ?2?3103#3#ّhHK Kj 1  ???23310!!!!#(iijב" 3     ?3?2310!###בnn#j ? A    ??3?3310!!#!!#htjo"j 1    ???333105!5!5!# i(qב) 4A    ?2?33105!### ܑב%nj ? A    ??3?3310#!5#!5!ґttj)F)ޑqH 1   ???233103!!!!iH"ב%H 4 A    ?3?33103!!33A$Hn#nqH ?  A    ?2??33103!!3!!ّK$hH"qH 2    ???332105!5!5!3 iqב)%H 4A    ?3?3310!5!333$ב%nqH ?A      ??3?3310!5!3!3!5!$KqFH 6    ????2233103!!!!#iiH"ב"H 8     ??3?323103!!#3#AHnn KH I A     ?3?3??223310#3!!#3!!jt " "H 8  @   ????3322105!5!5!3# iqבKH ;A   @ ??3?332105!3#3# 㑑h%K#KH I  A     ?3??3?2233103#3!5!#!5!A㑑tHK )ޑj 9     ?2??3333105!!#5! iiq"h :   @  ?22?333105!!### ב%nnj J    ?3?32?333310#!5!3!!#!5jtttAޑ"בqH :@     ?3??3333105!3!5! Aّ"%H :  @  ?33?333105!333! ב%nnqH L@  A      ?3?32?3333103!!3!5!5!AH"oHL  @    ?32?32??33222233105!5!5!3!!!!# iiiqב"ב"HM  @     ?3?3322?3322223103!!###!5!33AבHnnnnH ]     ?3?32?3?3222332233103!!#!5!3!!#3!5!AבttH"ޑ" mH/?3310!!Umm?/3310!!UH??3310!!U H??/310!!* H??/310!!* *g #'+/37;?CGKOSW[_cgkosw{1mUE- y@ xlTD, xeM5@ dL4qYA)}@ |pX@(|aQ9 @ `P8u]=%@!t\<$x||xiI1!@hH0 gckhd`h_[WT\XTSOKHPLHC?GD@.)'.@D%T%K![!K[DT #//10]]]]4>32#".732>54.#"Fz^^{GG{^^zFV9bLLc::cLLb9d^{GG{^^zFFz^Lc99cLLc::c# /]/102#"'&5467>76jnk5RS4l9R46n9:m64R9) //103!32>54.#")Ex[[xEEx[[xE}A[xEEx[[xEEx)+"@" '//103!4>32#".'32>54.#")Q:cKKc::cKKc:MEx[[xEEx[[xE}AKc::cKKc::cK[xEEx[[xEExscu" //10#"'.5476324'&#"3276c%%%V3eK#%HJfgGJL33FF3331HH13}5V%#%H%V5fHJJGgF3333FE6116y!-9D@] $ t $t+{+{D"(?4.(.(.1%+7+>:h:Y:G:::b^0H[[׀ؙٙW .. -- .. --#_[)4`@7*/$'!04h4Y4K4=442-_oO-_--- /99//]^]3]]]]332/99//3310#"'&54676324&#"326%4&#"326327'#"'ZZZZ. -- ., // ,0^b>LLH[[ -- .. -- ..[_#Fs;3F/@ H4.4$w##@M H H;;  H;/4#4;B p ?   9+>0/43?3O33/^]]]]]/]]]]10]]]]+]]++]]]+373#'#5.''7.'#5367'7>7"327654'.B 965--,,(17:"B?n0+(. P(9p6Eu0bb0uE`cc1u;  -;q9>_1(,=20db2/aac02P&/b@>++++""""P'''@%(H /+^]2qr/]32/qr]qr9/3210.'&547>32!!#!5!"327654&'&7Z#GS,e>SW;=>B.*PlzS++VSzmQR FF;G,+G>>=T,G;QAQF@(1A;NN?  33FF;A1?J777B??/^]]]99/r]]r9910.'.'.547>323267632#"'.'#"'&547632"327654'&6%( ? .@$    TVWvvWTTUzGSZ>==@XY<>><      "O-@" '*R*Qm}VXTTuuWV+ >=X[===>ZW>>;/(@& 0 ` p  "@ H"O_/]//+3/]/10#"'!727>'#"'&547>7>76 (_E#%?BXc$&}V+B,-SZB?N9En&86_,+i?~BCF_?BWVc %%1E[wK`_B?[J;*U/;q9S<K/@9M?4=C /)//99//]923/]10)7>7>7654&5#"&'&547632.'.547>3267>32#"&'.'FTl)@4:Z+X-;a)OII]P3N(a2+C.=#!K2dmy;*&StsOP"4&sN&(PNmVb(%)LtvSP<3=-Q}.-L'fZy'&@) @ P p  ///]10^]].'.'.'.547632>32b*gL8E+%DFfbN/"X2U#F)N7>-qEEt/'xSEj( #&b<^Q2P;`N]]5(o]H: 9Pwc;kM;!0@! @O_o! //]9/9/]2103#>54&'&'#"&547632L3:0./9@%%Hl9:Q0*%#Jj9:;b&J5-L9<guv#dC  @; H#F/  O o  O_Fo"SP P ?3?32???/]]2/]/]q3210+]##5354>32.#"3533i;fQ E-(3 ӆIz;eK+)<'ai:wZC  @5 HF/OoO_FoP P?3?32??/]]2/]/]q10+]##5354>32.#"33i;fQ E-(3 ӇIz;eK+)<'aI4wNK H@( H_?O  P`p/]/]/]q9/10++#"&'532>54&#*732AhK-1%)8#=H>4T< )C0b %(`)?w8@ o_]]]5NH K H@ H  `@ !H   /]+]q/310++#>5#53H,(u-1XWk/0V.3 #5!533!4=46'jo岲o-q %'# !&"5(|&@%%$5$E$ H"" @5H ` `""D T d 5   &  ?2]]]?9//]q2/+]33_q22_]]10+]#".'732654&#"#!!>32|&IlFBeJ, '6$GVQK3M!r[6CgE$CAhJ(!;Q0/$U]QU%q!'Gf+4x6@!  `` ??2/]]q3/]9/10#4>7!5!x@jM+/Pk<4MalfXq-('QD H@@R H/ H+ HL7G H===222FGGG( ` `L8# B#-??]]9/99/]q2/q/]]3/q99]10++++4.#"32>4.#"32>7#".54>75.54>32 5)'5 6-06 #=1-;$$=..="#IqMMqJ#/= $7&#FhDHiE!&8$$?.0""0/''04()5#;**<6[B%%BZ6.H4 %4@#-O;"#@)u u I  I@  /?/]2/]10]]".'332673ToQ h]]h Q9[s9g``g9s[9|E $@ P` ?]q/310#>5#53E,(u-1XWu/0`.K /@  _oP  ?   /]q]q/21046733#,(u-1X%Wu/0`.j0@u@@@H_@ H/+]+/]]10]%53H4@"z@@O@H_@ H/+]+/]]10]573H A@v x@ H@@H_@ H/+]3+/+]10]]#'##573ih A@vx@ H@@H_@ H/+]+2/+]10]]#'53373hi-Z#@_@ H/+]32/1053!53ӥDYi@" H  H@ @_@ H/+]23/]]10++]".#"#>3232673*TNG76 [-J;,TNE67\+J%-%>9-_N2%-%?8,_N3  X@<f bb @@ H@H_@ H/+]2+2/+^]q10]]]]]5733573 7@  d @ @H _@ H/+]+2/^]10^]]".'3326734JtT2um[[ku 2St)EZ15<=41ZE)V@3s  DzQ ) r . +    f  .  , [ (   88 \  VDigitized data 2007 Ascender Corporation. All rights reserved.Digitized data 2007 Ascender Corporation. All rights reserved.Liberation SansLiberation SansRegularRegularFontForge 2.0 : Liberation Sans Regular : 13-7-2008FontForge 2.0 : Liberation Sans Regular : 13-7-2008Liberation Sans RegularLiberation Sans RegularVersion 1.04Version 1.04LiberationSans-RegularLiberationSans-RegularLiberation is a trademark of Red Ht, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions.Liberation is a trademark of Red Ht, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions.Ascender CorporationAscender CorporationSteve MattesonSteve Mattesonhttp://www.ascendercorp.com/http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlhttp://www.ascendercorp.com/typedesigners.htmlUse of this Liberation font software is subject to the license agreement under which you accepted the Liberation font software.Use of this Liberation font software is subject to the license agreement under which you accepted the Liberation font software.http://www.ascendercorp.com/liberation.htmlhttp://www.ascendercorp.com/liberation.html  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjikmlnoqprsutvwxzy{}|~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~uni00B2uni00B3u00B5uni00B9AmacronamacronAbreveabreveAogonekaogonek Ccircumflex ccircumflex Cdotaccent cdotaccentDcarondcaronDcroatEmacronemacronEbreveebreve Edotaccent edotaccentEogonekeogonekEcaronecaron Gcircumflex gcircumflex Gdotaccent gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonekIJij Jcircumflex jcircumflex Kcommaaccent kcommaaccent kgreenlandicLacutelacute Lcommaaccent lcommaaccentLcaronlcaronLdotldotNacutenacute Ncommaaccent ncommaaccentNcaronncaron napostropheEngengOmacronomacronObreveobreve Ohungarumlaut ohungarumlautRacuteracute Rcommaaccent rcommaaccentRcaronrcaronSacutesacute Scircumflex scircumflex Tcommaaccent tcommaaccentTcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring Uhungarumlaut uhungarumlautUogonekuogonek Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentlongs Aringacute aringacuteAEacuteaeacute Oslashacute oslashacute Scommaaccent scommaaccentuni021Auni021Buni02C9tonos dieresistonos Alphatonos anoteleia EpsilontonosEtatonos Iotatonos Omicrontonos Upsilontonos OmegatonosiotadieresistonosAlphaBetaGammaEpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsi IotadieresisUpsilondieresis alphatonos epsilontonosetatonos iotatonosupsilondieresistonosalphabetagammadeltaepsilonzetaetathetaiotakappalambdanuxiomicronrhosigma1sigmatauupsilonphichipsiomega iotadieresisupsilondieresis omicrontonos upsilontonos omegatonos afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061 afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109 afii10110 afii10193 afii10050 afii10098WgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveuni2010uni2011 figuredash afii00208 underscoredbl quotereversedminutesecond exclamdbluni203Euni207FlirapesetaEuro afii61248 afii61289 afii61352u2126 estimated oneeighth threeeighths fiveeighths seveneighths arrowleftarrowup arrowright arrowdown arrowboth arrowupdn arrowupdnbseu2206 orthogonal intersection equivalencehouse revlogicalnot integraltp integralbtSF100000SF110000SF010000SF030000SF020000SF040000SF080000SF090000SF060000SF070000SF050000SF430000SF240000SF510000SF520000SF390000SF220000SF210000SF250000SF500000SF490000SF380000SF280000SF270000SF260000SF360000SF370000SF420000SF190000SF200000SF230000SF470000SF480000SF410000SF450000SF460000SF400000SF540000SF530000SF440000upblockdnblockblocklfblockrtblockltshadeshadedkshade filledboxH22073H18543H18551 filledrecttriaguptriagrttriagdntriaglfcircleH18533 invbullet invcircle openbullet smileface invsmilefacesunfemalemalespadeclubheartdiamond musicalnotemusicalnotedbluniF001uniF002uniF005middotuniF004uni2074uni2075uni2077uni2078glyph571glyph572glyph573glyph574glyph575glyph576glyph577glyph578glyph579glyph580glyph581  LNDFLTcyrl$grek.latn8 TbDFLTcyrl&grek2latn>kernpi 2@^p4r|&Tv.8,:dR>TZ`6  . < b 0 H j  @ R  , > l .p(FLZ $7<V_biqrxh 7h9h:vZG././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.999112 pygame-2.6.1/examples/data/scarlet.webp0000644000175100001770000000012214676242340017455 0ustar00runnerdockerRIFFJWEBPVP8 >0* >1C! ;~AiUbz>././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/secosmic_lo.wav0000644000175100001770000004441414676242340020173 0ustar00runnerdockerRIFFIWAVEfmt 2+  @0factd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u2 w"4 "20A u$! B20a'N1 2! $@""b1 't v#qB #!# w !"0p_ܽή3d4$"B$#35#S4344RB3޽ͭ$3""#5$CE#C4C643R3RA3$##24#0 '`! 1 6%""3BAB3CDD$#bB23 ܾݿ5B3!#65453DC54C4524"#"33 T# H @44"234#4D4CCcCS4430ݮr"6D54CRC44CCB4#335!̾O!ͮ@뽮4Q2!1""CbRCCRE42BR";̾ο"'%3bBR3C43r"2C#3%"34 %b3b  ݼ 2 """cSSD4BSCB433@23A33 0ۯ ݾ̿J1""$"AA2rD#B$$"33F@OpQ2!#"#" G E 2#A#472#3"1!J.ݟp0@""23F11#4#BB3C4$"5 A r !!0Y?G{! #2"0AB3""+ݽ ݾ p !""#$Bq2#BB3C43B3#TS@8 !!  ~  !!5#2B1AN<p_ !DE##53BBB33B2#c(A}/0"22# !o/ݿݾ  t?00$$Ap012#"!1! ܯ U@  "`23BC$$"3##2tP{!p.q=33@TBA#34#$!!!^ ޟ p0##`233RB2C3C44#2B"7_. E #4D432D!!r #3T43CD3#CD3433C3"" ޭr0##D4CCb33443CCC43443C432""ܾ""4CD3D""q"#C4453343CC43C3C4"! r ##CD4E"333C443CC4344s H."/44332"ͻ/244CDB"""ͽt 34C3Cr#C2$"3CC43C33"p"C44c#3C33D3C43D3443CC333#8͎a"#D3T23""(;@"345BC442#3CCC4333"#Iݽ~2D3J-$B43C433C443CCC3CCC33""3͎p#43T23##4.۞ 2435R443C33B443433""#E8ܾ~$3R3r#CC4334443C4443CCB"#4ݭp3C5B"""4C.0243c5#C4343$3C3C32"#D3;S ]t"3G"3D3C3443CC43CCCC42!"448ϯ""6"!#DC;: !"5B3CCCC3C4#3C3B"""33Bܮ""b344CC3C3CC43C44CC33"#C3?22Cr"#T32̾?#6#43CD3C344"33C"!"" ` {RQ2#3CC443C3C443CCCC4332!3C3123E#3!U32̾'C4C4443C4344"#3B 38rB3a"#3B3CD3C3C4444C43433!vD"432으D" %4"$D43s &!B O!! 100 a ND1t!2p B"@ A"v4$QA1R #L%#f&! !!Q D1 5 -" 23# rA/w; 3 t#'.@w~!S#1'0"ECC$#43C43SD2B$4CB@ͼݽ#4CQ"1AAB4BBB3CE44%#AB$##3ۼw #$ Ƞ3bR"##BB2BBB5B4#s#3@޽ݾ`#2!"$36#CCC4CCRD4$C42Q222C#ݼt"0/ݽ 4CB23BB#44BBBr3S5"B ݽ;"A2"RCD3RQB3CD6#$$#$2B301 0C3! 8  ο#c$##$"4$4BR35F236$ݾAB234cCRBR3CC45R"434#4343# n$;qA0/32$32BA35BR3R4D5#$4# ݾݼ3#1BCD%#52QA2CBD#B4#3BC$0AͽO5"P"#Kݭp`""2D5$#C5512c!"CνA$#25$3D45#$26#2p4R#R#$$32ap$!0 3p!#25$3C44%3"%2C%-@ݞ_!3R#45#BC$233c"%#3c#D3C443 6E "B$1#.61DBBB3A21E1b1E!#a?;[yvsD#$4$#34#23u3C$$D#$C#4$"PsD#43AA2 @""5"24!!!G@b!2C4C.0 ۰ޝ13A242A3"B#3w#33CR#b4##C20p5330@ 0B B!"C7QR!#4#T/  =̾޿@3"3"3QA2BG!#R"$##BCa"BA#2@αt""2#/<` #s6 "21C$6 03"$$#3R5a434$34B61"!2Aߡq1"0##2 @"1GM5333B-o μ 1 2##BCsq1343CBBDC".- 03B1232HO ݀ vA1##2s7""33"2 ܠ*01"$"G41%"#4#C3R#3F%0(O!1" i$_'!24!$"#37C#C3D"32""""/0R"3433CUB#C4434443433C4S"@3433333} `1B#S!2#U!$33CC3"""""8ݻ˾q23$B#3C3t25"43C3CCC433C33s"P 353322&R=I!ͭsQ3D431"c#CCC33C3"""32rA2"3D33FB#B3C443C443C3C334s0 #3S433#s"ݼq@3DD33!SC4C433B"33#3; ͮݫp "3CB3EB#B3C4443C3CCC3C333E!t35443#r=?"#CCC4R2$3CC3C3C3"32(ܮܞ_"3CCDR33CC443CC3CC43C333@7!"3D43c"2< O243CCF""##C43C4343328p!3D4T"333CCC43CC3CCC43C uC3/ܬ#4B7""" ݮp243C5R#414"3C43C43333!5 #$3CEB4#3C#C43C4C3CCC3CC333ˮP"353c#343ݽ0"#3CF"C3C24#44343C3"348ݽwC2D2!ڻC 532"DD3C3DDC Yq 20B0$B/# r""!w@ 7o2p" $""RrBS( 2r&`u! "B?$"201r@"!p"c  ۊ#!w# Q/!S 4!Sݏ""sCC#C44$#46$24D43?͞;1CCB""$3CRR3C443cR3CCa22C#4" ̭u1B0SC$35"A3BBSC3TCB3?ܾݽABR3$453R4$4455#53C3R#3$$P#4-Pͽ>$BR"1A3"BB5#4'2S4C%" ͎$""3$D543SCCR3SD3CBB23BB3- 7/R1 4 1D6"2$"4%#CD$3v"43=0ͫp!""264CD46#F"2C4#35#333 O'p2"cnޮ B6"3$3SRC4CCcC3D4ݾͽ2B2%3S46#443CS3SB4$"3=A3"#%N"4#3bCBCC5D"4";޿ Q23#5444CCBB3DA#6#UCB443OP 4B!51 K` 43D5$"B37"%23T #ݾ;307"#4C5#BB$"qA4B44B3C5B r%3$4!4" ώP5$#5"222c1bS!1ξݾ"D"C3R$"$"$a!CB2RR#%##3C> NQ0"#B#01͞2!"424#""wB3R%" ݺ ΏP&3"Q2"2A237a%#B4!1C#$3LOr2A1BQ>Q!2BG1Q!#22Cb) ڿb޾R5A!1$"3C5c"6#3C$3F!$3$$/}P"  2""34C6RD 33$3B#  1!"4#447@2#%"$#3CT!4A"0? :0A"""@ ݾ V'?1#3Ct5"2B286R8 qA#33R37PA"2B3C3DRQ!' $1"B"2A28; `1234rq"113"2RA!2#%rq""$3C43B5@Q b"! ݏl& $ @"ra"#13""(Mϟq@1!#sr22BB$#4$#2B7% #ߍp? "! ܾ 'A!P!Ap"13$! ݾ  !PP@2#3CBBB2B23'0 '1"12!W  C(P 453C!bC44334""""#8ݻp@2#4434F14343CCC3CC43C333EA"#C432&B.ܽO#4D433q34C4333432#38 ܭ>##C434F!#3CC44434443C3C333pݽq!4443&2#(ܽC353D3DA2443C43433#3""!#44CE2#3C443CCC3CC43C43338ͽp "4CC4b"ͽ23C4C4S#2C43C43C4343!ݺ"!#4CCr#3343CC43CC3CCC43433<YjoܞR ##CD3d"""9/"243C7243"C#C43C43C2""(p"$3CF2343B#C443CC43CC43C333"3CD4S#33Cq2#43d#C432C#C43C433#3Cp#$3CU"3C4334x443CCC3D3C3334<"#44b##34>ܹݿo""34E#C44334#C43433344C 7P243G"3CC3C3C443C4443CC33344;޾"#F"""3C@^##C72C43C441##C3C334442̾o0P1#4r#443C343CCC43CCC43333D43 ` "#b""3D43 "3T$#C44343A#4342"3424(b!"'"3CCC3C3C443C444433334443:ݾp&"""3DC38R3b3C4443C3CB"#3333"C4>LISTBINFOICRD 2000-05-10IENG Deepz0neISFTSound Forge 4.5cue dataLIST<adtlltxtrgn lablRecord Take 001././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/shot.gif0000644000175100001770000000020114676242340016603 0ustar00runnerdockerGIF89a u^`qrtM@77`70M@7E!, .0@7A[I@iFɝH+36X#q;././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/static.png0000644000175100001770000000226214676242340017145 0ustar00runnerdockerPNG  IHDRD3!gAMA aiIDATx^u0 ERP H٤M. F-y3 .^NtHH1rÁ*b8C}i)1T.?9p S b\:Z?8}2}uS.lIpxN 8aͩ3ʜpt"*LӈVrnW#Lᬩ] pM*9fB/Ή,ַp!V_Af ]t_7nضX4x>a"'G@v(niϦkL skO.hƛA8KzM$ h 0qIN|:6h|Q:z3'c&Վ]糉x D8'nM1`Xω7uSdڭvܔ& 'RG^EJM޴781,P0"pj>?i 0t5NT15b_.w/v+'hm"$'jՁ{^kA2PcI'1@"5#x}y ͙ϿGZuoΌ®Gجz$rʷ,kq"2v&>S܃@[9!>8Kn:aTxݰ35p$OЦD|Obڑ7dy,zE*|V\o>Թb_nAHaT9cީ:dZwd:`|[` A6Y|[Gtm%/nd)cSt ^)}@W3uت uﲄjdRcqlo5-:f\z/o`yoGV9 E@ aU89 @?8D`Ve(SDg((̩w ,]{}tS}n$(W`iiLXc\p<> 4r#"G@r@ j)1Tf>%Pb8CeSr@ O)1Tf>%Pb8CeSr@ ϧ#{S;/]yIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/teal.svg0000644000175100001770000000047114676242340016616 0ustar00runnerdocker teal Layer 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/turquoise.tif0000644000175100001770000000224214676242340017712 0ustar00runnerdockerII*0 P8$ BaPd6DbQ8V-FcQv=@@   )2\ 'nv~(1=@0SsC:\Users\Kristof\Documents\turquoise.tifCreated with GIMPIIArrière-planpaint.net 4.3.2lcms0mntrRGB XYZ  + acspMSFT-lcms desc @cprt`6wtptchad,rXYZbXYZgXYZrTRC gTRC bTRC chrm4$dmndX$dmdd|$mluc enUS$GIMP built-in sRGBmluc enUSPublic DomainXYZ -sf32 B%nXYZ o8XYZ $XYZ bparaff Y [chrmT|L&g\mluc enUSGIMPmluc enUSsRGB././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/whiff.wav0000644000175100001770000001333214676242340016772 0ustar00runnerdockerRIFFWAVEfmt ++factdata~~~}}~~~}~}~~}}~}~}}}~}}}}}~~~}~}~~}~~}}}~~~}}}{{{}}}}}{}}}}}}}}}}}~~~}}}~~}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}~~~~~~~~}}}}}}}~~~~~~~~}}}}}}~~~~~}~}}}}}}}~}}~}~}~~~~~~}~~}~~~~~}}{~zyxuvy}~~~{uvstpxu{yzyusspquvz}{{sqlnntv~}~xuqkonu{}~{xpqnuu~}}~}~~}zz{yzyuststyuunloqp}y}yxqvlopstxy{{x{yuq{xqzyyyyy~{}zz}vusn{}jqtu{yjtlux}{tttvzxy{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keod}snt{tlonjokkntqtdtigidjkskqnssog\ija\kjosfnnnjb][dbjijfzze]XfWfXVeoopubos_[`]_knjttnopfb]obennxuunslpbgvvlvpuysjjglpuz}{tuuyxl~zyxysy{zq{~}zty{{}x~vvtzz{z~tqx{zq~sz{uzqvxy}{~~}vuy}vx{yz}{{x~ypu{x}z}{yyy~pvzxvy}{{zp{unlttplvtvvsvupfsukoktpveopqliqolfnsnjoqninskfltiionlnokiokgnongqoppjongkjklojnknolkglgiieojfqikkijdidgfbbekfedggdjgifjinofgjnkgenolkntptuxsnyvutxz}zy}}}z{~~}}~}{xyy{y{z{{{zzzxyuz}z}z~~{~~yyzxuzzvvvzuvuvqpkssonpnnqtllolplifljjkjlnlonlknpnplnpnllkfiead`]\_ZSQPNFB<9950--)%((      $(&)--/032320-.)$     %(+024478599:<<==?CCHIILNSVWWWVWWWWW\`dfgilpuyy{~¼¿~}~~~~~~~{}~}~{zy{yx{xyxvvuvtstspsppnlnknjnleijgieiddedba`a__Z\\\[[[ZX[ZZZZXWZ[Z[ZW\X[\X\WXZ\[W[ZZ[XZ[ZZ\Z[[][]_\]]]_aa_ababbebddefefgefggfiegfiifkgejiliijijjjlijkjkkklkllkkkllnolklkklolkkjonlllllnlollnnlonnoopnoonlnonnqpjlnoppnlnnlknonknlkllnlkkknkkljlkljkljllkjjikkkjjkkkkiillikljjkkillkjllkkljlkjllklnkknnknqnnlolpppqqqostssqsuttuvuuuuxvvvvvxyxvvvyyvyxvxyxyzvvzyzyzyx{zyzzzzz{{}{y{z}}}{z{{}z{}y{}}z{}z}~{}}{}}~~}~~~~}~~~~~~~~~~~././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/data/yellow.tga0000644000175100001770000000605414676242340017163 0ustar00runnerdocker TRUEVISION-XFILE.././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/dropevent.py0000644000175100001770000000421314676242340016615 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.dropfile Drag and drop an image on here. Uses these events: * DROPBEGIN * DROPCOMPLETE * DROPTEXT * DROPFILE """ import pygame as pg def main(): pg.init() going = True surf = pg.display.set_mode((640, 480)) font = pg.font.SysFont("Arial", 24) clock = pg.time.Clock() spr_file_text = font.render("Drag and drop a file or image!", 1, (255, 255, 255)) spr_file_text_rect = spr_file_text.get_rect() spr_file_text_rect.center = surf.get_rect().center spr_file_image = None spr_file_image_rect = None while going: for ev in pg.event.get(): if ev.type == pg.QUIT: going = False elif ev.type == pg.DROPBEGIN: print(ev) print("File drop begin!") elif ev.type == pg.DROPCOMPLETE: print(ev) print("File drop complete!") elif ev.type == pg.DROPTEXT: print(ev) spr_file_text = font.render(ev.text, 1, (255, 255, 255)) spr_file_text_rect = spr_file_text.get_rect() spr_file_text_rect.center = surf.get_rect().center elif ev.type == pg.DROPFILE: print(ev) spr_file_text = font.render(ev.file, 1, (255, 255, 255)) spr_file_text_rect = spr_file_text.get_rect() spr_file_text_rect.center = surf.get_rect().center # Try to open the file if it's an image filetype = ev.file[-3:] if filetype in ["png", "bmp", "jpg"]: spr_file_image = pg.image.load(ev.file).convert() spr_file_image.set_alpha(127) spr_file_image_rect = spr_file_image.get_rect() spr_file_image_rect.center = surf.get_rect().center surf.fill((0, 0, 0)) surf.blit(spr_file_text, spr_file_text_rect) if spr_file_image and spr_file_image_rect is not None: surf.blit(spr_file_image, spr_file_image_rect) pg.display.flip() clock.tick(30) pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/eventlist.py0000644000175100001770000001343014676242340016625 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.eventlist Learn about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. """ usage = """ Mouse Controls ============== - 1st button on mouse (left click) to toggle events 'grabed'. - 3rd button on mouse (right click) to toggle mouse visible. - The window can be resized. - Mouse the mouse around to see mouse events. - If events grabbed and mouse invisible show virtual mouse coords. Keyboard Joystick Controls ========================== - press keys up an down to see events. - you can see joystick events if any are plugged in. - press "c" to toggle events generated by controllers. """ from typing import List import pygame as pg import pygame._sdl2.controller img_on_off: List[pg.Surface] = [] font: pg.font.Font last_key = None # these are a running counter of mouse.get_rel() calls. virtual_x = 0 virtual_y = 0 def showtext(win, pos, text, color, bgcolor): textimg = font.render(text, 1, color, bgcolor) win.blit(textimg, pos) return pos[0] + textimg.get_width() + 5, pos[1] def drawstatus(win): global virtual_x, virtual_y bgcolor = 50, 50, 50 win.fill(bgcolor, (0, 0, 640, 120)) win.blit(font.render("Status Area", 1, (155, 155, 155), bgcolor), (2, 2)) pos = showtext(win, (10, 30), "Mouse Focus", (255, 255, 255), bgcolor) win.blit(img_on_off[pg.mouse.get_focused()], pos) pos = showtext( win, (pos[0] + 50, pos[1]), "Mouse visible", (255, 255, 255), bgcolor ) win.blit(img_on_off[pg.mouse.get_visible()], pos) pos = showtext(win, (330, 30), "Keyboard Focus", (255, 255, 255), bgcolor) win.blit(img_on_off[pg.key.get_focused()], pos) pos = showtext(win, (10, 60), "Mouse Position(rel)", (255, 255, 255), bgcolor) rel = pg.mouse.get_rel() virtual_x += rel[0] virtual_y += rel[1] mouse_data = tuple(list(pg.mouse.get_pos()) + list(rel)) p = "%s, %s (%s, %s)" % mouse_data showtext(win, pos, p, bgcolor, (255, 255, 55)) pos = showtext(win, (330, 60), "Last Keypress", (255, 255, 255), bgcolor) if last_key: p = "%d, %s" % (last_key, pg.key.name(last_key)) else: p = "None" showtext(win, pos, p, bgcolor, (255, 255, 55)) pos = showtext(win, (10, 90), "Input Grabbed", (255, 255, 255), bgcolor) win.blit(img_on_off[pg.event.get_grab()], pos) is_virtual_mouse = pg.event.get_grab() and not pg.mouse.get_visible() pos = showtext(win, (330, 90), "Virtual Mouse", (255, 255, 255), bgcolor) win.blit(img_on_off[is_virtual_mouse], pos) if is_virtual_mouse: p = f"{virtual_x}, {virtual_y}" showtext(win, (pos[0] + 50, pos[1]), p, bgcolor, (255, 255, 55)) def drawhistory(win, history): img = font.render("Event History Area", 1, (155, 155, 155), (0, 0, 0)) win.blit(img, (2, 132)) ypos = 450 h = list(history) h.reverse() for line in h: r = win.blit(line, (10, ypos)) win.fill(0, (r.right, r.top, 620, r.height)) ypos -= font.get_height() def draw_usage_in_history(history, text): lines = text.split("\n") for line in lines: if line == "" or "===" in line: continue img = font.render(line, 1, (50, 200, 50), (0, 0, 0)) history.append(img) def main(): pg.init() pygame._sdl2.controller.init() print(usage) win = pg.display.set_mode((640, 480), pg.RESIZABLE) pg.display.set_caption("Mouse Focus Workout. h key for help") global font font = pg.font.Font(None, 26) global img_on_off img_on_off.append(font.render("Off", 1, (0, 0, 0), (255, 50, 50))) img_on_off.append(font.render("On", 1, (0, 0, 0), (50, 255, 50))) # stores surfaces of text representing what has gone through the event queue history = [] # let's turn on the joysticks just so we can play with em for x in range(pg.joystick.get_count()): if pygame._sdl2.controller.is_controller(x): c = pygame._sdl2.controller.Controller(x) txt = "Enabled controller: " + c.name else: j = pg.joystick.Joystick(x) txt = "Enabled joystick: " + j.get_name() img = font.render(txt, 1, (50, 200, 50), (0, 0, 0)) history.append(img) if not pg.joystick.get_count(): img = font.render("No Joysticks to Initialize", 1, (50, 200, 50), (0, 0, 0)) history.append(img) going = True while going: for e in pg.event.get(): if e.type == pg.KEYDOWN: if e.key == pg.K_ESCAPE: going = False else: global last_key last_key = e.key if e.key == pg.K_h: draw_usage_in_history(history, usage) if e.key == pg.K_c: current_state = pygame._sdl2.controller.get_eventstate() pygame._sdl2.controller.set_eventstate(not current_state) if e.type == pg.MOUSEBUTTONDOWN and e.button == 1: pg.event.set_grab(not pg.event.get_grab()) if e.type == pg.MOUSEBUTTONDOWN and e.button == 3: pg.mouse.set_visible(not pg.mouse.get_visible()) if e.type != pg.MOUSEMOTION: txt = f"{pg.event.event_name(e.type)}: {e.dict}" img = font.render(txt, 1, (50, 200, 50), (0, 0, 0)) history.append(img) history = history[-13:] if e.type == pg.VIDEORESIZE: win = pg.display.set_mode(e.size, pg.RESIZABLE) if e.type == pg.QUIT: going = False drawstatus(win) drawhistory(win, history) pg.display.flip() pg.time.wait(10) pg.quit() raise SystemExit if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/font_viewer.py0000644000175100001770000002266014676242340017144 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.font_viewer Scroll through your system fonts from a list of surfaces or one huge buffer. This example exhibits: * iterate over available fonts using font.get_fonts and font.SysFont() * click and drag using mouse input * scrolling with the scroll wheel * save a surface to disk * work with a very large surface * simple mouse and keyboard scroll speed acceleration By default this example uses the fonts returned by pygame.font.get_fonts() and opens them using pygame.font.SysFont(). Alternatively, you may pass a path to the command line. The TTF files found in that directory will be used instead. Mouse Controls: * Use the mouse wheel or click and drag to scroll Keyboard Controls: * Press up or down to scroll * Press escape to exit """ import sys import os import pygame as pg use_big_surface = False # draw into large buffer and save png file class FontViewer: """ This example is encapsulated by the fontviewer class It initializes the pygame window, handles input, and draws itself to the screen. """ KEY_SCROLL_SPEED = 10 MOUSE_SCROLL_SPEED = 50 def __init__(self): pg.init() # create a window that uses 80 percent of the screen info = pg.display.Info() w = info.current_w h = info.current_h pg.display.set_mode((int(w * 0.8), int(h * 0.8))) self.font_size = h // 20 self.clock = pg.time.Clock() self.y_offset = 0 self.grabbed = False self.render_fonts("&N abcDEF789") if use_big_surface or "big" in sys.argv: self.render_surface() self.display_surface() self.save_png() else: self.display_fonts() def get_font_list(self): """ Generate a font list using font.get_fonts() for system fonts or from a path from the command line. """ path = "" if len(sys.argv) > 1 and os.path.exists(sys.argv[1]): path = os.path.join(sys.argv[1], "") if os.path.exists(path): fonts = [font for font in os.listdir(path) if font.endswith(".ttf")] else: fonts = pg.font.get_fonts() return fonts, path def render_fonts(self, text="A display of font &N"): """ Build a list that includes a surface and the running total of their height for each font in the font list. Store the largest width and other variables for later use. """ font_size = self.font_size color = (255, 255, 255) instruction_color = (255, 255, 0) self.back_color = (0, 0, 0) fonts, path = self.get_font_list() font_surfaces = [] total_height = 0 max_width = 0 load_font = pg.font.Font if path else pg.font.SysFont # display instructions at the top of the display font = pg.font.SysFont(pg.font.get_default_font(), font_size) lines = ( "Use the scroll wheel or click and drag", "to scroll up and down.", "Fonts that don't use the Latin Alphabet", "might render incorrectly.", f"Here are your {len(fonts)} fonts", "", ) for line in lines: surf = font.render(line, 1, instruction_color, self.back_color) font_surfaces.append((surf, total_height)) total_height += surf.get_height() max_width = max(max_width, surf.get_width()) # render all the fonts and store them with the total height for name in sorted(fonts): try: font = load_font(path + name, font_size) except OSError: continue line = text.replace("&N", name) try: surf = font.render(line, 1, color, self.back_color) except pg.error as e: print(e) break max_width = max(max_width, surf.get_width()) font_surfaces.append((surf, total_height)) total_height += surf.get_height() # store variables for later usage self.total_height = total_height self.max_width = max_width self.font_surfaces = font_surfaces self.max_y = total_height - pg.display.get_surface().get_height() def display_fonts(self): """ Display the visible fonts based on the y_offset value(updated in handle_events) and the height of the pygame window. """ pg.display.set_caption("Font Viewer") display = pg.display.get_surface() clock = pg.time.Clock() center = display.get_width() // 2 while True: # draw visible surfaces display.fill(self.back_color) for surface, top in self.font_surfaces: bottom = top + surface.get_height() if ( bottom >= self.y_offset and top <= self.y_offset + display.get_height() ): x = center - surface.get_width() // 2 display.blit(surface, (x, top - self.y_offset)) # get input and update the screen if not self.handle_events(): break pg.display.flip() clock.tick(30) def render_surface(self): """ Note: this method uses twice the memory and is only called if big_surface is set to true or big is added to the command line. Optionally generates one large buffer to draw all the font surfaces into. This is necessary to save the display to a png file and may be useful for testing large surfaces. """ large_surface = pg.surface.Surface( (self.max_width, self.total_height) ).convert() large_surface.fill(self.back_color) print("scrolling surface created") # display the surface size and memory usage byte_size = large_surface.get_bytesize() total_size = byte_size * (self.max_width * self.total_height) print( "Surface Size = {}x{} @ {}bpp: {:,.3f}mb".format( self.max_width, self.total_height, byte_size, total_size / 1000000.0 ) ) y = 0 center = int(self.max_width / 2) for surface, top in self.font_surfaces: w = surface.get_width() x = center - int(w / 2) large_surface.blit(surface, (x, y)) y += surface.get_height() self.max_y = large_surface.get_height() - pg.display.get_surface().get_height() self.surface = large_surface def display_surface(self, time=10): """ Display the large surface created by the render_surface method. Scrolls based on the y_offset value(set in handle_events) and the height of the pygame window. """ screen = pg.display.get_surface() # Create a Rect equal to size of screen. Then we can just change its # top attribute to draw the desired part of the rendered font surface # to the display surface rect = pg.rect.Rect( 0, 0, self.surface.get_width(), min(self.surface.get_height(), screen.get_height()), ) x = int((screen.get_width() - self.surface.get_width()) / 2) going = True while going: if not self.handle_events(): going = False screen.fill(self.back_color) rect.top = self.y_offset screen.blit(self.surface, (x, 0), rect) pg.display.flip() self.clock.tick(20) def save_png(self, name="font_viewer.png"): pg.image.save(self.surface, name) file_size = os.path.getsize(name) // 1024 print(f"font surface saved to {name}\nsize: {file_size:,}Kb") def handle_events(self): """ This method handles user input. It returns False when it receives a pygame.QUIT event or the user presses escape. The y_offset is changed based on mouse and keyboard input. display_fonts() and display_surface() use the y_offset to scroll display. """ events = pg.event.get() for e in events: if e.type == pg.QUIT: return False elif e.type == pg.KEYDOWN: if e.key == pg.K_ESCAPE: return False elif e.type == pg.MOUSEWHEEL: self.y_offset += e.y * self.MOUSE_SCROLL_SPEED * -1 elif e.type == pg.MOUSEBUTTONDOWN: # enter dragging mode on mouse down self.grabbed = True pg.event.set_grab(True) elif e.type == pg.MOUSEBUTTONUP: # exit drag mode on mouse up self.grabbed = False pg.event.set_grab(False) # allow simple accelerated scrolling with the keyboard keys = pg.key.get_pressed() if keys[pg.K_UP]: self.key_held += 1 self.y_offset -= int(self.KEY_SCROLL_SPEED * (self.key_held // 10)) elif keys[pg.K_DOWN]: self.key_held += 1 self.y_offset += int(self.KEY_SCROLL_SPEED * (self.key_held // 10)) else: self.key_held = 20 # set the y_offset for scrolling and keep it between 0 and max_y y = pg.mouse.get_rel()[1] if y and self.grabbed: self.y_offset -= y self.y_offset = min((max(self.y_offset, 0), self.max_y)) return True viewer = FontViewer() pg.quit() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/fonty.py0000644000175100001770000000403114676242340015744 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.fonty Here we load a .TTF True Type font file, and display it in a basic pygame window. Demonstrating several Font object attributes. - basic window, event, and font management. """ import pygame as pg def main(): # initialize pg.init() resolution = 400, 200 screen = pg.display.set_mode(resolution) ## pg.mouse.set_cursor(*pg.cursors.diamond) fg = 250, 240, 230 bg = 5, 5, 5 wincolor = 40, 40, 90 # fill background screen.fill(wincolor) # load font, prepare values font = pg.font.Font(None, 80) text = "Fonty" size = font.size(text) # no AA, no transparency, normal ren = font.render(text, 0, fg, bg) screen.blit(ren, (10, 10)) # no AA, transparency, underline font.set_underline(1) ren = font.render(text, 0, fg) screen.blit(ren, (10, 40 + size[1])) font.set_underline(0) a_sys_font = pg.font.SysFont("Arial", 60) # AA, no transparency, bold a_sys_font.set_bold(1) ren = a_sys_font.render(text, 1, fg, bg) screen.blit(ren, (30 + size[0], 10)) a_sys_font.set_bold(0) # AA, transparency, italic a_sys_font.set_italic(1) ren = a_sys_font.render(text, 1, fg) screen.blit(ren, (30 + size[0], 40 + size[1])) a_sys_font.set_italic(0) # Get some metrics. print(f"Font metrics for 'Fonty': {a_sys_font.metrics(text)}") ch = "\u3060" msg = f"Font metrics for '{ch}': {a_sys_font.metrics(ch)}" print(msg) ## #some_japanese_unicode = u"\u304b\u3070\u306b" ##some_japanese_unicode = unicode_('%c%c%c') % (0x304b, 0x3070, 0x306b) # AA, transparency, italic ##ren = a_sys_font.render(some_japanese_unicode, 1, fg) ##screen.blit(ren, (30 + size[0], 40 + size[1])) # show the surface and await user quit pg.display.flip() while True: # use event.wait to keep from polling 100% cpu if pg.event.wait().type in (pg.QUIT, pg.KEYDOWN, pg.MOUSEBUTTONDOWN): break pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/freetype_misc.py0000644000175100001770000000711314676242340017447 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.freetype_misc Miscellaneous (or misc) means: "consisting of a mixture of various things that are not usually connected with each other" Adjective All those words you read on computers, magazines, books, and such over the years? Probably a lot of them were constructed with... The FreeType Project: a free, high-quality and portable Font engine. https://freetype.org Next time you're reading something. Think of them. Herein lies a *BOLD* demo consisting of a mixture of various things. Not only is it a *BOLD* demo, it's an italics demo, a rotated demo, it's a blend, and is sized to go nicely with a cup of tea*. * also goes well with coffee. Enjoy! """ import os import pygame as pg import pygame.freetype as freetype def run(): pg.init() fontdir = os.path.dirname(os.path.abspath(__file__)) font = freetype.Font(os.path.join(fontdir, "data", "sans.ttf")) screen = pg.display.set_mode((800, 600)) screen.fill("gray") font.underline_adjustment = 0.5 font.pad = True font.render_to( screen, (32, 32), "Hello World", "red3", "dimgray", size=64, style=freetype.STYLE_UNDERLINE | freetype.STYLE_OBLIQUE, ) font.pad = False font.render_to( screen, (32, 128), "abcdefghijklm", "dimgray", "green3", size=64, ) font.vertical = True font.render_to(screen, (32, 200), "Vertical?", "blue3", None, size=32) font.vertical = False font.render_to(screen, (64, 190), "Let's spin!", "red3", None, size=48, rotation=55) font.render_to( screen, (160, 290), "All around!", "green3", None, size=48, rotation=-55 ) font.render_to(screen, (250, 220), "and BLEND", (255, 0, 0, 128), None, size=64) font.render_to(screen, (265, 237), "or BLAND!", (0, 0xCC, 28, 128), None, size=64) # Some pinwheels font.origin = True for angle in range(0, 360, 45): font.render_to(screen, (150, 420), ")", "black", size=48, rotation=angle) font.vertical = True for angle in range(15, 375, 30): font.render_to(screen, (600, 400), "|^*", "orange", size=48, rotation=angle) font.vertical = False font.origin = False utext = "I \u2665 Unicode" font.render_to(screen, (298, 320), utext, (0, 0xCC, 0xDD), None, size=64) utext = "\u2665" font.render_to(screen, (480, 32), utext, "gray", "red3", size=148) font.render_to( screen, (380, 380), "...yes, this is an SDL surface", "black", None, size=24, style=freetype.STYLE_STRONG, ) font.origin = True r = font.render_to( screen, (100, 530), "stretch", "red3", None, size=(24, 24), style=freetype.STYLE_NORMAL, ) font.render_to( screen, (100 + r.width, 530), " VERTICAL", "red3", None, size=(24, 48), style=freetype.STYLE_NORMAL, ) r = font.render_to( screen, (100, 580), "stretch", "blue3", None, size=(24, 24), style=freetype.STYLE_NORMAL, ) font.render_to( screen, (100 + r.width, 580), " HORIZONTAL", "blue3", None, size=(48, 24), style=freetype.STYLE_NORMAL, ) pg.display.flip() while True: if pg.event.wait().type in (pg.QUIT, pg.KEYDOWN, pg.MOUSEBUTTONDOWN): break pg.quit() if __name__ == "__main__": run() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/glcube.py0000644000175100001770000004073414676242340016060 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.glcube Draw a cube on the screen. Amazing. Every frame we orbit the camera around a small amount creating the illusion of a spinning object. First we setup some points of a multicolored cube. Then we then go through a semi-unoptimized loop to draw the cube points onto the screen. OpenGL does all the hard work for us. :] Keyboard Controls ----------------- * ESCAPE key to quit * f key to toggle fullscreen. """ import math import ctypes import pygame as pg try: import OpenGL.GL as GL import OpenGL.GLU as GLU except ImportError: print("pyopengl missing. The GLCUBE example requires: pyopengl numpy") raise SystemExit try: from numpy import array, dot, eye, zeros, float32, uint32 except ImportError: print("numpy missing. The GLCUBE example requires: pyopengl numpy") raise SystemExit # do we want to use the 'modern' OpenGL API or the old one? # This example shows you how to do both. USE_MODERN_GL = True # Some simple data for a colored cube here we have the 3D point position # and color for each corner. A list of indices describes each face, and a # list of indices describes each edge. CUBE_POINTS = ( (0.5, -0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), ) # colors are 0-1 floating values CUBE_COLORS = ( (1, 0, 0), (1, 1, 0), (0, 1, 0), (0, 0, 0), (1, 0, 1), (1, 1, 1), (0, 0, 1), (0, 1, 1), ) CUBE_QUAD_VERTS = ( (0, 1, 2, 3), (3, 2, 7, 6), (6, 7, 5, 4), (4, 5, 1, 0), (1, 5, 7, 2), (4, 0, 3, 6), ) CUBE_EDGES = ( (0, 1), (0, 3), (0, 4), (2, 1), (2, 3), (2, 7), (6, 3), (6, 4), (6, 7), (5, 1), (5, 4), (5, 7), ) def translate(matrix, x=0.0, y=0.0, z=0.0): """ Translate (move) a matrix in the x, y and z axes. :param matrix: Matrix to translate. :param x: direction and magnitude to translate in x axis. Defaults to 0. :param y: direction and magnitude to translate in y axis. Defaults to 0. :param z: direction and magnitude to translate in z axis. Defaults to 0. :return: The translated matrix. """ translation_matrix = array( [ [1.0, 0.0, 0.0, x], [0.0, 1.0, 0.0, y], [0.0, 0.0, 1.0, z], [0.0, 0.0, 0.0, 1.0], ], dtype=matrix.dtype, ).T matrix[...] = dot(matrix, translation_matrix) return matrix def frustum(left, right, bottom, top, znear, zfar): """ Build a perspective matrix from the clipping planes, or camera 'frustrum' volume. :param left: left position of the near clipping plane. :param right: right position of the near clipping plane. :param bottom: bottom position of the near clipping plane. :param top: top position of the near clipping plane. :param znear: z depth of the near clipping plane. :param zfar: z depth of the far clipping plane. :return: A perspective matrix. """ perspective_matrix = zeros((4, 4), dtype=float32) perspective_matrix[0, 0] = +2.0 * znear / (right - left) perspective_matrix[2, 0] = (right + left) / (right - left) perspective_matrix[1, 1] = +2.0 * znear / (top - bottom) perspective_matrix[3, 1] = (top + bottom) / (top - bottom) perspective_matrix[2, 2] = -(zfar + znear) / (zfar - znear) perspective_matrix[3, 2] = -2.0 * znear * zfar / (zfar - znear) perspective_matrix[2, 3] = -1.0 return perspective_matrix def perspective(fovy, aspect, znear, zfar): """ Build a perspective matrix from field of view, aspect ratio and depth planes. :param fovy: the field of view angle in the y axis. :param aspect: aspect ratio of our view port. :param znear: z depth of the near clipping plane. :param zfar: z depth of the far clipping plane. :return: A perspective matrix. """ h = math.tan(fovy / 360.0 * math.pi) * znear w = h * aspect return frustum(-w, w, -h, h, znear, zfar) def rotate(matrix, angle, x, y, z): """ Rotate a matrix around an axis. :param matrix: The matrix to rotate. :param angle: The angle to rotate by. :param x: x of axis to rotate around. :param y: y of axis to rotate around. :param z: z of axis to rotate around. :return: The rotated matrix """ angle = math.pi * angle / 180 c, s = math.cos(angle), math.sin(angle) n = math.sqrt(x * x + y * y + z * z) x, y, z = x / n, y / n, z / n cx, cy, cz = (1 - c) * x, (1 - c) * y, (1 - c) * z rotation_matrix = array( [ [cx * x + c, cy * x - z * s, cz * x + y * s, 0], [cx * y + z * s, cy * y + c, cz * y - x * s, 0], [cx * z - y * s, cy * z + x * s, cz * z + c, 0], [0, 0, 0, 1], ], dtype=matrix.dtype, ).T matrix[...] = dot(matrix, rotation_matrix) return matrix class Rotation: """ Data class that stores rotation angles in three axes. """ def __init__(self): self.theta = 20 self.phi = 40 self.psi = 25 def drawcube_old(): """ Draw the cube using the old open GL methods pre 3.2 core context. """ allpoints = list(zip(CUBE_POINTS, CUBE_COLORS)) GL.glBegin(GL.GL_QUADS) for face in CUBE_QUAD_VERTS: for vert in face: pos, color = allpoints[vert] GL.glColor3fv(color) GL.glVertex3fv(pos) GL.glEnd() GL.glColor3f(1.0, 1.0, 1.0) GL.glBegin(GL.GL_LINES) for line in CUBE_EDGES: for vert in line: pos, color = allpoints[vert] GL.glVertex3fv(pos) GL.glEnd() def init_gl_stuff_old(): """ Initialise open GL, prior to core context 3.2 """ GL.glEnable(GL.GL_DEPTH_TEST) # use our zbuffer # setup the camera GL.glMatrixMode(GL.GL_PROJECTION) GL.glLoadIdentity() GLU.gluPerspective(45.0, 640 / 480.0, 0.1, 100.0) # setup lens GL.glTranslatef(0.0, 0.0, -3.0) # move back GL.glRotatef(25, 1, 0, 0) # orbit higher def init_gl_modern(display_size): """ Initialise open GL in the 'modern' open GL style for open GL versions greater than 3.1. :param display_size: Size of the window/viewport. """ # Create shaders # -------------------------------------- vertex_code = """ #version 150 uniform mat4 model; uniform mat4 view; uniform mat4 projection; uniform vec4 colour_mul; uniform vec4 colour_add; in vec4 vertex_colour; // vertex colour in in vec3 vertex_position; out vec4 vertex_color_out; // vertex colour out void main() { vertex_color_out = (colour_mul * vertex_colour) + colour_add; gl_Position = projection * view * model * vec4(vertex_position, 1.0); } """ fragment_code = """ #version 150 in vec4 vertex_color_out; // vertex colour from vertex shader out vec4 fragColor; void main() { fragColor = vertex_color_out; } """ program = GL.glCreateProgram() vertex = GL.glCreateShader(GL.GL_VERTEX_SHADER) fragment = GL.glCreateShader(GL.GL_FRAGMENT_SHADER) GL.glShaderSource(vertex, vertex_code) GL.glCompileShader(vertex) # this logs issues the shader compiler finds. log = GL.glGetShaderInfoLog(vertex) if isinstance(log, bytes): log = log.decode() for line in log.split("\n"): print(line) GL.glAttachShader(program, vertex) GL.glShaderSource(fragment, fragment_code) GL.glCompileShader(fragment) # this logs issues the shader compiler finds. log = GL.glGetShaderInfoLog(fragment) if isinstance(log, bytes): log = log.decode() for line in log.split("\n"): print(line) GL.glAttachShader(program, fragment) GL.glValidateProgram(program) GL.glLinkProgram(program) GL.glDetachShader(program, vertex) GL.glDetachShader(program, fragment) GL.glUseProgram(program) # Create vertex buffers and shader constants # ------------------------------------------ # Cube Data vertices = zeros( 8, [("vertex_position", float32, 3), ("vertex_colour", float32, 4)] ) vertices["vertex_position"] = [ [1, 1, 1], [-1, 1, 1], [-1, -1, 1], [1, -1, 1], [1, -1, -1], [1, 1, -1], [-1, 1, -1], [-1, -1, -1], ] vertices["vertex_colour"] = [ [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1], [0, 1, 0, 1], [1, 1, 0, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 0, 1], ] filled_cube_indices = array( [ 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6, 0, 6, 1, 1, 6, 7, 1, 7, 2, 7, 4, 3, 7, 3, 2, 4, 7, 6, 4, 6, 5, ], dtype=uint32, ) outline_cube_indices = array( [0, 1, 1, 2, 2, 3, 3, 0, 4, 7, 7, 6, 6, 5, 5, 4, 0, 5, 1, 6, 2, 7, 3, 4], dtype=uint32, ) shader_data = {"buffer": {}, "constants": {}} GL.glBindVertexArray(GL.glGenVertexArrays(1)) # Have to do this first shader_data["buffer"]["vertices"] = GL.glGenBuffers(1) GL.glBindBuffer(GL.GL_ARRAY_BUFFER, shader_data["buffer"]["vertices"]) GL.glBufferData(GL.GL_ARRAY_BUFFER, vertices.nbytes, vertices, GL.GL_DYNAMIC_DRAW) stride = vertices.strides[0] offset = ctypes.c_void_p(0) loc = GL.glGetAttribLocation(program, "vertex_position") GL.glEnableVertexAttribArray(loc) GL.glVertexAttribPointer(loc, 3, GL.GL_FLOAT, False, stride, offset) offset = ctypes.c_void_p(vertices.dtype["vertex_position"].itemsize) loc = GL.glGetAttribLocation(program, "vertex_colour") GL.glEnableVertexAttribArray(loc) GL.glVertexAttribPointer(loc, 4, GL.GL_FLOAT, False, stride, offset) shader_data["buffer"]["filled"] = GL.glGenBuffers(1) GL.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, shader_data["buffer"]["filled"]) GL.glBufferData( GL.GL_ELEMENT_ARRAY_BUFFER, filled_cube_indices.nbytes, filled_cube_indices, GL.GL_STATIC_DRAW, ) shader_data["buffer"]["outline"] = GL.glGenBuffers(1) GL.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, shader_data["buffer"]["outline"]) GL.glBufferData( GL.GL_ELEMENT_ARRAY_BUFFER, outline_cube_indices.nbytes, outline_cube_indices, GL.GL_STATIC_DRAW, ) shader_data["constants"]["model"] = GL.glGetUniformLocation(program, "model") GL.glUniformMatrix4fv(shader_data["constants"]["model"], 1, False, eye(4)) shader_data["constants"]["view"] = GL.glGetUniformLocation(program, "view") view = translate(eye(4), z=-6) GL.glUniformMatrix4fv(shader_data["constants"]["view"], 1, False, view) shader_data["constants"]["projection"] = GL.glGetUniformLocation( program, "projection" ) GL.glUniformMatrix4fv(shader_data["constants"]["projection"], 1, False, eye(4)) # This colour is multiplied with the base vertex colour in producing # the final output shader_data["constants"]["colour_mul"] = GL.glGetUniformLocation( program, "colour_mul" ) GL.glUniform4f(shader_data["constants"]["colour_mul"], 1, 1, 1, 1) # This colour is added on to the base vertex colour in producing # the final output shader_data["constants"]["colour_add"] = GL.glGetUniformLocation( program, "colour_add" ) GL.glUniform4f(shader_data["constants"]["colour_add"], 0, 0, 0, 0) # Set GL drawing data # ------------------- GL.glClearColor(0, 0, 0, 0) GL.glPolygonOffset(1, 1) GL.glEnable(GL.GL_LINE_SMOOTH) GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA) GL.glDepthFunc(GL.GL_LESS) GL.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST) GL.glLineWidth(1.0) projection = perspective(45.0, display_size[0] / float(display_size[1]), 2.0, 100.0) GL.glUniformMatrix4fv(shader_data["constants"]["projection"], 1, False, projection) return shader_data, filled_cube_indices, outline_cube_indices def draw_cube_modern(shader_data, filled_cube_indices, outline_cube_indices, rotation): """ Draw a cube in the 'modern' Open GL style, for post 3.1 versions of open GL. :param shader_data: compile vertex & pixel shader data for drawing a cube. :param filled_cube_indices: the indices to draw the 'filled' cube. :param outline_cube_indices: the indices to draw the 'outline' cube. :param rotation: the current rotations to apply. """ GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT) # Filled cube GL.glDisable(GL.GL_BLEND) GL.glEnable(GL.GL_DEPTH_TEST) GL.glEnable(GL.GL_POLYGON_OFFSET_FILL) GL.glUniform4f(shader_data["constants"]["colour_mul"], 1, 1, 1, 1) GL.glUniform4f(shader_data["constants"]["colour_add"], 0, 0, 0, 0.0) GL.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, shader_data["buffer"]["filled"]) GL.glDrawElements( GL.GL_TRIANGLES, len(filled_cube_indices), GL.GL_UNSIGNED_INT, None ) # Outlined cube GL.glDisable(GL.GL_POLYGON_OFFSET_FILL) GL.glEnable(GL.GL_BLEND) GL.glUniform4f(shader_data["constants"]["colour_mul"], 0, 0, 0, 0.0) GL.glUniform4f(shader_data["constants"]["colour_add"], 1, 1, 1, 1.0) GL.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, shader_data["buffer"]["outline"]) GL.glDrawElements(GL.GL_LINES, len(outline_cube_indices), GL.GL_UNSIGNED_INT, None) # Rotate cube # rotation.theta += 1.0 # degrees rotation.phi += 1.0 # degrees # rotation.psi += 1.0 # degrees model = eye(4, dtype=float32) # rotate(model, rotation.theta, 0, 0, 1) rotate(model, rotation.phi, 0, 1, 0) rotate(model, rotation.psi, 1, 0, 0) GL.glUniformMatrix4fv(shader_data["constants"]["model"], 1, False, model) def main(): """run the demo""" # initialize pygame and setup an opengl display pg.init() gl_version = (3, 0) # GL Version number (Major, Minor) if USE_MODERN_GL: gl_version = (3, 2) # GL Version number (Major, Minor) # By setting these attributes we can choose which Open GL Profile # to use, profiles greater than 3.2 use a different rendering path pg.display.gl_set_attribute(pg.GL_CONTEXT_MAJOR_VERSION, gl_version[0]) pg.display.gl_set_attribute(pg.GL_CONTEXT_MINOR_VERSION, gl_version[1]) pg.display.gl_set_attribute( pg.GL_CONTEXT_PROFILE_MASK, pg.GL_CONTEXT_PROFILE_CORE ) fullscreen = False # start in windowed mode display_size = (640, 480) pg.display.set_mode(display_size, pg.OPENGL | pg.DOUBLEBUF | pg.RESIZABLE) if USE_MODERN_GL: gpu, f_indices, o_indices = init_gl_modern(display_size) rotation = Rotation() else: init_gl_stuff_old() going = True while going: # check for quit'n events events = pg.event.get() for event in events: if event.type == pg.QUIT or ( event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE ): going = False elif event.type == pg.KEYDOWN and event.key == pg.K_f: if not fullscreen: print("Changing to FULLSCREEN") pg.display.set_mode( (640, 480), pg.OPENGL | pg.DOUBLEBUF | pg.FULLSCREEN ) else: print("Changing to windowed mode") pg.display.set_mode((640, 480), pg.OPENGL | pg.DOUBLEBUF) fullscreen = not fullscreen if gl_version[0] >= 4 or (gl_version[0] == 3 and gl_version[1] >= 2): gpu, f_indices, o_indices = init_gl_modern(display_size) rotation = Rotation() else: init_gl_stuff_old() if USE_MODERN_GL: draw_cube_modern(gpu, f_indices, o_indices, rotation) else: # clear screen and move camera GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT) # orbit camera around by 1 degree GL.glRotatef(1, 0, 1, 0) drawcube_old() pg.display.flip() pg.time.wait(10) pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/go_over_there.py0000644000175100001770000000414614676242340017443 0ustar00runnerdocker""" pg.examples.go_over_there This simple tech demo is showcasing the use of Vector2.move_towards() using multiple circles to represent Vectors. Each circle will have a random position and speed once the demo starts. Mouse Controls: * Use the mouse to click on a new target position Keyboard Controls: * Press R to restart the demo """ import pygame as pg import random MIN_SPEED = 0.25 MAX_SPEED = 5 MAX_BALLS = 1600 SCREEN_SIZE = pg.Vector2(1000, 600) CIRCLE_RADIUS = 5 pg.init() screen = pg.display.set_mode(SCREEN_SIZE) clock = pg.time.Clock() target_position = None balls = [] class Ball: def __init__(self, position, speed): self.position = position self.speed = speed def reset(): global balls global target_position target_position = None balls = [] for x in range(MAX_BALLS): pos = pg.Vector2( random.randint(0, int(SCREEN_SIZE.x)), random.randint(0, int(SCREEN_SIZE.y)) ) speed = random.uniform(MIN_SPEED, MAX_SPEED) b = Ball(pos, speed) balls.append(b) reset() delta_time = 0 running = True while running: for event in pg.event.get(): if event.type == pg.QUIT: running = False if event.type == pg.MOUSEBUTTONUP: target_position = pg.mouse.get_pos() if event.type == pg.KEYUP: if event.key == pg.K_ESCAPE: running = False if event.key == pg.K_r: reset() screen.fill((31, 143, 65)) for o in balls: if target_position is not None: try: o.position.move_towards_ip(target_position, o.speed * delta_time) except AttributeError: raise RuntimeError( f"""Version {pg.__version__} doesn't have Vector.move_towards_ip function. Please update to >=2.1.3""" ) pg.draw.circle(screen, (118, 207, 145), o.position, CIRCLE_RADIUS) pg.display.flip() delta_time = clock.tick(60) pg.display.set_caption( f"fps: {round(clock.get_fps(), 2)}, ball count: {len(balls)}" ) pg.quit() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/grid.py0000644000175100001770000000332114676242340015533 0ustar00runnerdockerimport pygame as pg TITLE = "Grid" TILES_HORIZONTAL = 10 TILES_VERTICAL = 10 TILE_SIZE = 80 WINDOW_WIDTH = 800 WINDOW_HEIGHT = 800 class Player: def __init__(self, surface): self.surface = surface self.pos = (40, 40) def draw(self): pg.draw.circle(self.surface, (255, 255, 255), self.pos, 40) def move(self, target): x = (80 * (target[0] // 80)) + 40 y = (80 * (target[1] // 80)) + 40 self.pos = (x, y) class Game: def __init__(self): pg.init() self.clock = pg.time.Clock() pg.display.set_caption(TITLE) self.surface = pg.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT)) self.loop = True self.player = Player(self.surface) def main(self): while self.loop: self.grid_loop() pg.quit() def grid_loop(self): self.surface.fill((0, 0, 0)) for row in range(TILES_HORIZONTAL): for col in range(row % 2, TILES_HORIZONTAL, 2): pg.draw.rect( self.surface, (40, 40, 40), (row * TILE_SIZE, col * TILE_SIZE, TILE_SIZE, TILE_SIZE), ) self.player.draw() for event in pg.event.get(): if event.type == pg.QUIT: self.loop = False elif event.type == pg.KEYDOWN: if event.key == pg.K_ESCAPE: self.loop = False elif event.type == pg.MOUSEBUTTONUP: pos = pg.mouse.get_pos() self.player.move(pos) pg.display.update() if __name__ == "__main__": mygame = Game() mygame.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/headless_no_windows_needed.py0000644000175100001770000000242314676242340022152 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.headless_no_windows_needed How to use pygame with no windowing system, like on headless servers. Thumbnail generation with scaling is an example of what you can do with pygame. NOTE: the pygame scale function uses mmx/sse if available, and can be run in multiple threads. """ usage = """-scale inputimage outputimage new_width new_height eg. -scale in.png out.png 50 50 """ import os import sys # set SDL to use the dummy NULL video driver, # so it doesn't need a windowing system. os.environ["SDL_VIDEODRIVER"] = "dummy" import pygame as pg # Some platforms need to init the display for some parts of pg. pg.display.init() screen = pg.display.set_mode((1, 1)) def scaleit(fin, fout, w, h): i = pg.image.load(fin) if hasattr(pg.transform, "smoothscale"): scaled_image = pg.transform.smoothscale(i, (w, h)) else: scaled_image = pg.transform.scale(i, (w, h)) pg.image.save(scaled_image, fout) def main(fin, fout, w, h): """smoothscale image file named fin as fout with new size (w,h)""" scaleit(fin, fout, w, h) if __name__ == "__main__": if "-scale" in sys.argv: fin, fout, w, h = sys.argv[2:] w, h = map(int, [w, h]) main(fin, fout, w, h) else: print(usage) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/joystick.py0000644000175100001770000001220414676242340016445 0ustar00runnerdockerimport pygame pygame.init() # This is a simple class that will help us print to the screen. # It has nothing to do with the joysticks, just outputting the # information. class TextPrint: def __init__(self): self.reset() self.font = pygame.font.Font(None, 25) def tprint(self, screen, text): text_bitmap = self.font.render(text, True, (0, 0, 0)) screen.blit(text_bitmap, (self.x, self.y)) self.y += self.line_height def reset(self): self.x = 10 self.y = 10 self.line_height = 15 def indent(self): self.x += 10 def unindent(self): self.x -= 10 def main(): # Set the width and height of the screen (width, height), and name the window. screen = pygame.display.set_mode((500, 700)) pygame.display.set_caption("Joystick example") # Used to manage how fast the screen updates. clock = pygame.time.Clock() # Get ready to print. text_print = TextPrint() # This dict can be left as-is, since pygame will generate a # pygame.JOYDEVICEADDED event for every joystick connected # at the start of the program. joysticks = {} done = False while not done: # Event processing step. # Possible joystick events: JOYAXISMOTION, JOYBALLMOTION, JOYBUTTONDOWN, # JOYBUTTONUP, JOYHATMOTION, JOYDEVICEADDED, JOYDEVICEREMOVED for event in pygame.event.get(): if event.type == pygame.QUIT: done = True # Flag that we are done so we exit this loop. if event.type == pygame.JOYBUTTONDOWN: print("Joystick button pressed.") if event.button == 0: joystick = joysticks[event.instance_id] if joystick.rumble(0, 0.7, 500): print(f"Rumble effect played on joystick {event.instance_id}") if event.type == pygame.JOYBUTTONUP: print("Joystick button released.") # Handle hotplugging if event.type == pygame.JOYDEVICEADDED: # This event will be generated when the program starts for every # joystick, filling up the list without needing to create them manually. joy = pygame.joystick.Joystick(event.device_index) joysticks[joy.get_instance_id()] = joy print(f"Joystick {joy.get_instance_id()} connencted") if event.type == pygame.JOYDEVICEREMOVED: del joysticks[event.instance_id] print(f"Joystick {event.instance_id} disconnected") # Drawing step # First, clear the screen to white. Don't put other drawing commands # above this, or they will be erased with this command. screen.fill((255, 255, 255)) text_print.reset() # Get count of joysticks. joystick_count = pygame.joystick.get_count() text_print.tprint(screen, f"Number of joysticks: {joystick_count}") text_print.indent() # For each joystick: for joystick in joysticks.values(): jid = joystick.get_instance_id() text_print.tprint(screen, f"Joystick {jid}") text_print.indent() # Get the name from the OS for the controller/joystick. name = joystick.get_name() text_print.tprint(screen, f"Joystick name: {name}") guid = joystick.get_guid() text_print.tprint(screen, f"GUID: {guid}") power_level = joystick.get_power_level() text_print.tprint(screen, f"Joystick's power level: {power_level}") # Usually axis run in pairs, up/down for one, and left/right for # the other. Triggers count as axes. axes = joystick.get_numaxes() text_print.tprint(screen, f"Number of axes: {axes}") text_print.indent() for i in range(axes): axis = joystick.get_axis(i) text_print.tprint(screen, f"Axis {i} value: {axis:>6.3f}") text_print.unindent() buttons = joystick.get_numbuttons() text_print.tprint(screen, f"Number of buttons: {buttons}") text_print.indent() for i in range(buttons): button = joystick.get_button(i) text_print.tprint(screen, f"Button {i:>2} value: {button}") text_print.unindent() hats = joystick.get_numhats() text_print.tprint(screen, f"Number of hats: {hats}") text_print.indent() # Hat position. All or nothing for direction, not a float like # get_axis(). Position is a tuple of int values (x, y). for i in range(hats): hat = joystick.get_hat(i) text_print.tprint(screen, f"Hat {i} value: {str(hat)}") text_print.unindent() text_print.unindent() # Go ahead and update the screen with what we've drawn. pygame.display.flip() # Limit to 30 frames per second. clock.tick(30) if __name__ == "__main__": main() # If you forget this line, the program will 'hang' # on exit if running from IDLE. pygame.quit() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/liquid.py0000644000175100001770000000476014676242340016105 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.liquid This example demonstrates a simplish water effect of an image. It attempts to create a hardware display surface that can use pageflipping for faster updates. Note that the colormap from the loaded GIF image is copied to the colormap for the display surface. This is based on the demo named F2KWarp by Brad Graham of Freedom2000 done in BlitzBasic. I was just translating the BlitzBasic code to pygame to compare the results. I didn't bother porting the text and sound stuff, that's an easy enough challenge for the reader :] """ import pygame as pg import os from math import sin import time main_dir = os.path.split(os.path.abspath(__file__))[0] def main(): # initialize and setup screen pg.init() screen = pg.display.set_mode((640, 480), pg.HWSURFACE | pg.DOUBLEBUF) # load image and quadruple imagename = os.path.join(main_dir, "data", "liquid.bmp") bitmap = pg.image.load(imagename) bitmap = pg.transform.scale2x(bitmap) bitmap = pg.transform.scale2x(bitmap) # get the image and screen in the same format if screen.get_bitsize() == 8: screen.set_palette(bitmap.get_palette()) else: bitmap = bitmap.convert() # prep some variables anim = 0.0 # mainloop xblocks = range(0, 640, 20) yblocks = range(0, 480, 20) stopevents = pg.QUIT, pg.KEYDOWN, pg.MOUSEBUTTONDOWN while True: for e in pg.event.get(): if e.type in stopevents: return anim = anim + 0.02 for x in xblocks: xpos = (x + (sin(anim + x * 0.01) * 15)) + 20 for y in yblocks: ypos = (y + (sin(anim + y * 0.01) * 15)) + 20 screen.blit(bitmap, (x, y), (xpos, ypos, 20, 20)) pg.display.flip() time.sleep(0.01) if __name__ == "__main__": main() pg.quit() """BTW, here is the code from the BlitzBasic example this was derived from. i've snipped the sound and text stuff out. ----------------------------------------------------------------- ; Brad@freedom2000.com ; Load a bmp pic (800x600) and slice it into 1600 squares Graphics 640,480 SetBuffer BackBuffer() bitmap$="f2kwarp.bmp" pic=LoadAnimImage(bitmap$,20,15,0,1600) ; use SIN to move all 1600 squares around to give liquid effect Repeat f=0:w=w+10:If w=360 Then w=0 For y=0 To 599 Step 15 For x = 0 To 799 Step 20 f=f+1:If f=1600 Then f=0 DrawBlock pic,(x+(Sin(w+x)*40))/1.7+80,(y+(Sin(w+y)*40))/1.7+60,f Next:Next:Flip:Cls Until KeyDown(1) """ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/mask.py0000644000175100001770000001313514676242340015545 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.mask A pygame.mask collision detection production. Brought to you by the pixels 0000000000000 and 111111 This is 32 bits: 11111111111111111111111111111111 There are 32 or 64 bits in a computer 'word'. Rather than using one word for a pixel, the mask module represents 32 or 64 pixels in one word. As you can imagine, this makes things fast, and saves memory. Compute intensive things like collision detection, and computer vision benefit greatly from this. This module can also be run as a stand-alone program, excepting one or more image file names as command line arguments. """ import os import random import sys import pygame as pg class Sprite: """ Moving Sprite demonstrating pixel-perfect collisions between pg.mask.Mask objects """ def __init__(self, pos, vel, surface, mask=None): """ Positional arguments: pos: Position of the sprite (sequence of 2 integers) vel: Movement velocity of the sprite (sequence of 2 integers) surface: Image (as a pg.Surface) of the sprite mask: pg.mask.Mask object (optional) """ self.surface = surface self.width, self.height = self.surface.get_size() if mask is not None: self.mask = mask else: self.mask = pg.mask.from_surface(self.surface) self.pos = pg.Vector2(pos) self.vel = pg.Vector2(vel) def collide(self, sprite): """ Test if the sprites are colliding and resolve the collision in this case. Positional arguments: sprite: other sprite to test for collisions """ offset = [int(x) for x in sprite.pos - self.pos] overlap = self.mask.overlap_area(sprite.mask, offset) if overlap == 0: return # Calculate collision normal # Number of collisions n_collisions = pg.Vector2( # x axis self.mask.overlap_area(sprite.mask, (offset[0] + 1, offset[1])) - self.mask.overlap_area(sprite.mask, (offset[0] - 1, offset[1])), # y axis self.mask.overlap_area(sprite.mask, (offset[0], offset[1] + 1)) - self.mask.overlap_area(sprite.mask, (offset[0], offset[1] - 1)), ) if n_collisions.x == 0 and n_collisions.y == 0: # One sprite is inside another return delta_vel = sprite.vel - self.vel j = delta_vel * n_collisions / (2 * n_collisions * n_collisions) if j > 0: # Can scale up to 2*j here to get bouncy collisions j *= 1.9 self.vel += [n_collisions.x * j, n_collisions.y * j] sprite.vel += [-j * n_collisions.x, -j * n_collisions.y] # # Separate the sprites # c1 = -overlap / (n_collisions * n_collisions) # c2 = -c1 / 2 # self.pos += [c2 * n_collisions.x, c2 * n_collisions.y] # sprite.pos += [(c1 + c2) * n_collisions.x, (c1 + c2) * n_collisions.y] def update(self): """ Move the sprite """ self.pos += self.vel def main(*args): """ Display multiple images bounce off each other using collision detection Positional arguments: one or more image file names. This pg.masks demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. """ if len(args) == 0: raise ValueError("Require at least one image file name: non given") pg.init() screen_size = (640, 480) screen = pg.display.set_mode(screen_size) clock = pg.time.Clock() images = [] masks = [] for image_path in args: images.append(pg.image.load(image_path).convert_alpha()) masks.append(pg.mask.from_surface(images[-1])) sprites = [] for i in range(20): j = i % len(images) sprite = Sprite( pos=( random.uniform(0, screen_size[0]), random.uniform(0, screen_size[1]), ), vel=( random.uniform(-5, 5), random.uniform(-5, 5), ), surface=images[j], mask=masks[j], ) sprites.append(sprite) while True: for event in pg.event.get(): if event.type in (pg.QUIT, pg.KEYDOWN): return screen.fill((240, 220, 100)) for sprite_index, sprite in enumerate(sprites): for other_sprite in sprites[sprite_index + 1 :]: sprite.collide(other_sprite) sprite.update() # If the sprite is outside of the screen on the left if sprite.pos.x < -sprite.width: sprite.pos.x = screen_size[0] # right elif sprite.pos.x > screen_size[0]: sprite.pos.x = -sprite.width # top if sprite.pos.y < -sprite.height: sprite.pos.y = screen_size[1] # down elif sprite.pos.y > screen_size[1]: sprite.pos.y = -sprite.height screen.blit(sprite.surface, sprite.pos) clock.tick(30) pg.display.flip() if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: mask.py [ ...]") print("Let many copies of IMAGE(s) bounce against each other") print("Press any key to quit") main_dir = os.path.split(os.path.abspath(__file__))[0] main(os.path.join(main_dir, "data", "alien1.png")) else: main(*sys.argv[1:]) pg.quit() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0001118 pygame-2.6.1/examples/midi.py0000644000175100001770000007504314676242340015542 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.midi midi input, and a separate example of midi output. By default it runs the output example. python -m pygame.examples.midi --output python -m pygame.examples.midi --input python -m pygame.examples.midi --input """ from dataclasses import dataclass import sys import os from typing import Any, Dict, List, Literal, Optional, Set, Tuple, Union import pygame as pg import pygame.midi # black and white piano keys use b/w color values directly BACKGROUNDCOLOR = "slategray" def print_device_info(): pygame.midi.init() _print_device_info() pygame.midi.quit() def _print_device_info(): for i in range(pygame.midi.get_count()): r = pygame.midi.get_device_info(i) (interf, name, input, output, opened) = r in_out = "" if input: in_out = "(input)" if output: in_out = "(output)" print( "%2i: interface :%s:, name :%s:, opened :%s: %s" % (i, interf, name, opened, in_out) ) def input_main(device_id=None): pg.init() pygame.midi.init() _print_device_info() if device_id is None: input_id = pygame.midi.get_default_input_id() else: input_id = device_id print(f"using input_id :{input_id}:") i = pygame.midi.Input(input_id) pg.display.set_mode((1, 1)) going = True while going: events = pygame.event.get() for e in events: if e.type in [pg.QUIT]: going = False if e.type in [pg.KEYDOWN]: going = False if e.type in [pygame.midi.MIDIIN]: print(e) if i.poll(): midi_events = i.read(10) # convert them into pygame events. midi_evs = pygame.midi.midis2events(midi_events, i.device_id) for m_e in midi_evs: pygame.event.post(m_e) del i pygame.midi.quit() def output_main(device_id=None): """Execute a musical keyboard example for the Church Organ instrument This is a piano keyboard example, with a two octave keyboard, starting at note F3. Left mouse down over a key starts a note, left up stops it. The notes are also mapped to the computer keyboard keys, assuming an American English PC keyboard (sorry everyone else, but I don't know if I can map to absolute key position instead of value.) The white keys are on the second row, TAB to BACKSLASH, starting with note F3. The black keys map to the top row, '1' to BACKSPACE, starting with F#3. 'r' is middle C. Close the window or press ESCAPE to quit the program. Key velocity (note amplitude) varies vertically on the keyboard image, with minimum velocity at the top of a key and maximum velocity at bottom. Default Midi output, no device_id given, is to the default output device for the computer. """ # A note to new pygamers: # # All the midi module stuff is in this function. It is unnecessary to # understand how the keyboard display works to appreciate how midi # messages are sent. # The keyboard is drawn by a Keyboard instance. This instance maps Midi # notes to musical keyboard keys. A regions surface maps window position # to (Midi note, velocity) pairs. A key_mapping dictionary does the same # for computer keyboard keys. Midi sound is controlled with direct method # calls to a pygame.midi.Output instance. # # Things to consider when using pygame.midi: # # 1) Initialize the midi module with a to pygame.midi.init(). # 2) Create a midi.Output instance for the desired output device port. # 3) Select instruments with set_instrument() method calls. # 4) Play notes with note_on() and note_off() method calls. # 5) Call pygame.midi.Quit() when finished. Though the midi module tries # to ensure that midi is properly shut down, it is best to do it # explicitly. A try/finally statement is the safest way to do this. # # GRAND_PIANO = 0 CHURCH_ORGAN = 19 instrument = CHURCH_ORGAN # instrument = GRAND_PIANO start_note = 53 # F3 (white key note), start_note != 0 n_notes = 24 # Two octaves (14 white keys) key_mapping = make_key_mapping( [ pg.K_TAB, pg.K_1, pg.K_q, pg.K_2, pg.K_w, pg.K_3, pg.K_e, pg.K_r, pg.K_5, pg.K_t, pg.K_6, pg.K_y, pg.K_u, pg.K_8, pg.K_i, pg.K_9, pg.K_o, pg.K_0, pg.K_p, pg.K_LEFTBRACKET, pg.K_EQUALS, pg.K_RIGHTBRACKET, pg.K_BACKSPACE, pg.K_BACKSLASH, ], start_note, ) pg.init() pygame.midi.init() _print_device_info() if device_id is None: port = pygame.midi.get_default_output_id() else: port = device_id print(f"using output_id :{port}:") midi_out = pygame.midi.Output(port, 0) try: midi_out.set_instrument(instrument) keyboard = Keyboard(start_note, n_notes) screen = pg.display.set_mode(keyboard.rect.size) screen.fill(BACKGROUNDCOLOR) pg.display.flip() background = pg.Surface(screen.get_size()) background.fill(BACKGROUNDCOLOR) dirty_rects = [] keyboard.draw(screen, background, dirty_rects) pg.display.update(dirty_rects) regions = pg.Surface(screen.get_size()) # initial color (0,0,0) keyboard.map_regions(regions) pg.event.set_blocked(pg.MOUSEMOTION) mouse_note = 0 on_notes = set() while True: e = pg.event.wait() if e.type == pg.MOUSEBUTTONDOWN: mouse_note, velocity, __, __ = regions.get_at(e.pos) if mouse_note and mouse_note not in on_notes: keyboard.key_down(mouse_note) midi_out.note_on(mouse_note, velocity) on_notes.add(mouse_note) else: mouse_note = 0 elif e.type == pg.MOUSEBUTTONUP: if mouse_note: midi_out.note_off(mouse_note) keyboard.key_up(mouse_note) on_notes.remove(mouse_note) mouse_note = 0 elif e.type == pg.QUIT: break elif e.type == pg.KEYDOWN: if e.key == pg.K_ESCAPE: break try: note, velocity = key_mapping[e.key] except KeyError: pass else: if note not in on_notes: keyboard.key_down(note) midi_out.note_on(note, velocity) on_notes.add(note) elif e.type == pg.KEYUP: try: note, __ = key_mapping[e.key] except KeyError: pass else: if note in on_notes and note != mouse_note: keyboard.key_up(note) midi_out.note_off(note, 0) on_notes.remove(note) dirty_rects = [] keyboard.draw(screen, background, dirty_rects) pg.display.update(dirty_rects) finally: del midi_out pygame.midi.quit() def make_key_mapping(keys, start_note): """Return a dictionary of (note, velocity) by computer keyboard key code""" mapping = {} for i, key in enumerate(keys): mapping[key] = (start_note + i, 127) return mapping class NullKey: """A dummy key that ignores events passed to it by other keys A NullKey instance is the left key instance used by default for the left most keyboard key. """ def _right_white_down(self): pass def _right_white_up(self): pass def _right_black_down(self): pass def _right_black_up(self): pass null_key = NullKey() @dataclass class KeyData: """Used for passing in data to subclasses of the Key class.""" is_white_key: bool c_width: int c_height: int c_down_state_initial: int c_down_state_rect_initial: pg.Rect c_notify_down_method: str c_notify_up_method: str c_updates: Set[Any] c_event_down: Dict[int, Tuple[int, pg.Rect]] c_event_up: Dict[int, Tuple[int, pg.Rect]] c_image_strip: pg.Surface c_event_right_white_down: Dict[int, Tuple[int, Union[pg.Rect, None]]] c_event_right_white_up: Dict[int, Tuple[int, Union[pg.Rect, None]]] c_event_right_black_down: Dict[int, Tuple[int, Union[pg.Rect, None]]] c_event_right_black_up: Dict[int, Tuple[int, Union[pg.Rect, None]]] class Key: """A key widget, maintains key state and draws the key's image Constructor arguments: ident - A unique key identifier. Any immutable type suitable as a key. posn - The location of the key on the display surface. key_left - Optional, the adjacent white key to the left. Changes in up and down state are propagated to that key. A key has an associated position and state. Related to state is the image drawn. State changes are managed with method calls, one method per event type. The up and down event methods are public. Other internal methods are for passing on state changes to the key_left key instance. """ key_data: KeyData def __init__(self, ident, posn, key_left=None): """Return a new Key instance The initial state is up, with all adjacent keys to the right also up. """ if key_left is None: key_left = null_key rect = pg.Rect(posn[0], posn[1], self.key_data.c_width, self.key_data.c_height) self.rect = rect self._state = self.key_data.c_down_state_initial self._source_rect = self.key_data.c_down_state_rect_initial self._ident = ident self._hash = hash(ident) self._notify_down = getattr(key_left, self.key_data.c_notify_down_method) self._notify_up = getattr(key_left, self.key_data.c_notify_up_method) self._key_left = key_left self._background_rect = pg.Rect( rect.left, rect.bottom - 10, self.key_data.c_width, 10 ) self.key_data.c_updates.add(self) self.is_white = self.key_data.is_white_key def down(self): """Signal that this key has been depressed (is down)""" self._state, source_rect = self.key_data.c_event_down[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) self._notify_down() def up(self): """Signal that this key has been released (is up)""" self._state, source_rect = self.key_data.c_event_up[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) self._notify_up() def _right_white_down(self): """Signal that the adjacent white key has been depressed This method is for internal propagation of events between key instances. """ self._state, source_rect = self.key_data.c_event_right_white_down[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) def _right_white_up(self): """Signal that the adjacent white key has been released This method is for internal propagation of events between key instances. """ self._state, source_rect = self.key_data.c_event_right_white_up[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) def _right_black_down(self): """Signal that the adjacent black key has been depressed This method is for internal propagation of events between key instances. """ self._state, source_rect = self.key_data.c_event_right_black_down[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) def _right_black_up(self): """Signal that the adjacent black key has been released This method is for internal propagation of events between key instances. """ self._state, source_rect = self.key_data.c_event_right_black_up[self._state] if source_rect is not None: self._source_rect = source_rect self.key_data.c_updates.add(self) def __eq__(self, other): """True if same identifiers""" return self._ident == other._ident def __hash__(self): """Return the immutable hash value""" return self._hash def __str__(self): """Return the key's identifier and position as a string""" return "" % (self._ident, self.rect.top, self.rect.left) def draw(self, surf, background, dirty_rects): """Redraw the key on the surface surf The background is redrawn. The altered region is added to the dirty_rects list. """ surf.blit(background, self._background_rect, self._background_rect) surf.blit(self.key_data.c_image_strip, self.rect, self._source_rect) dirty_rects.append(self.rect) def key_class(updates, image_strip, image_rects: List[pg.Rect], is_white_key=True): """Return a keyboard key widget class Arguments: updates - a set into which a key instance adds itself if it needs redrawing. image_strip - The surface containing the images of all key states. image_rects - A list of Rects giving the regions within image_strip that are relevant to this key class. is_white_key (default True) - Set false if this is a black key. This function automates the creation of a key widget class for the three basic key types. A key has two basic states, up or down ( depressed). Corresponding up and down images are drawn for each of these two states. But to give the illusion of depth, a key may have shadows cast upon it by the adjacent keys to its right. These shadows change depending on the up/down state of the key and its neighbors. So a key may support multiple images and states depending on the shadows. A key type is determined by the length of image_rects and the value of is_white. """ # Naming convention: Variables used by the Key class as part of a # closure start with 'c_'. # State logic and shadows: # # A key may cast a shadow upon the key to its left. A black key casts a # shadow on an adjacent white key. The shadow changes depending of whether # the black or white key is depressed. A white key casts a shadow on the # white key to its left if it is up and the left key is down. Therefore # a keys state, and image it will draw, is determined entirely by its # itself and the key immediately adjacent to it on the right. A white key # is always assumed to have an adjacent white key. # # There can be up to eight key states, representing all permutations # of the three fundamental states of self up/down, adjacent white # right up/down, adjacent black up/down. # down_state_none = 0 down_state_self = 1 down_state_white = down_state_self << 1 down_state_self_white = down_state_self | down_state_white down_state_black = down_state_white << 1 down_state_self_black = down_state_self | down_state_black down_state_white_black = down_state_white | down_state_black down_state_all = down_state_self | down_state_white_black # Some values used in the class. # c_down_state_initial = down_state_none c_down_state_rect_initial = image_rects[0] c_updates = updates c_image_strip = image_strip c_width, c_height = image_rects[0].size # A key propagates its up/down state change to the adjacent white key on # the left by calling the adjacent key's _right_black_down or # _right_white_down method. # if is_white_key: key_color = "white" else: key_color = "black" c_notify_down_method = f"_right_{key_color}_down" c_notify_up_method = f"_right_{key_color}_up" # Images: # # A black key only needs two images, for the up and down states. Its # appearance is unaffected by the adjacent keys to its right, which cast no # shadows upon it. # # A white key with a no adjacent black to its right only needs three # images, for self up, self down, and both self and adjacent white down. # # A white key with both a black and white key to its right needs six # images: self up, self up and adjacent black down, self down, self and # adjacent white down, self and adjacent black down, and all three down. # # Each 'c_event' dictionary maps the current key state to a new key state, # along with corresponding image, for the related event. If no redrawing # is required for the state change then the image rect is simply None. # c_event_down: Dict[int, Tuple[int, pygame.Rect]] = { down_state_none: (down_state_self, image_rects[1]) } c_event_up: Dict[int, Tuple[int, pygame.Rect]] = { down_state_self: (down_state_none, image_rects[0]) } c_event_right_white_down: Dict[int, Tuple[int, Union[pygame.Rect, None]]] = { down_state_none: (down_state_none, None), down_state_self: (down_state_self, None), } c_event_right_white_up = c_event_right_white_down.copy() c_event_right_black_down = c_event_right_white_down.copy() c_event_right_black_up = c_event_right_white_down.copy() if len(image_rects) > 2: c_event_down[down_state_white] = (down_state_self_white, image_rects[2]) c_event_up[down_state_self_white] = (down_state_white, image_rects[0]) c_event_right_white_down[down_state_none] = (down_state_white, None) c_event_right_white_down[down_state_self] = ( down_state_self_white, image_rects[2], ) c_event_right_white_up[down_state_white] = (down_state_none, None) c_event_right_white_up[down_state_self_white] = ( down_state_self, image_rects[1], ) c_event_right_black_down[down_state_white] = (down_state_white, None) c_event_right_black_down[down_state_self_white] = (down_state_self_white, None) c_event_right_black_up[down_state_white] = (down_state_white, None) c_event_right_black_up[down_state_self_white] = (down_state_self_white, None) if len(image_rects) > 3: c_event_down[down_state_black] = (down_state_self_black, image_rects[4]) c_event_down[down_state_white_black] = (down_state_all, image_rects[5]) c_event_up[down_state_self_black] = (down_state_black, image_rects[3]) c_event_up[down_state_all] = (down_state_white_black, image_rects[3]) c_event_right_white_down[down_state_black] = (down_state_white_black, None) c_event_right_white_down[down_state_self_black] = ( down_state_all, image_rects[5], ) c_event_right_white_up[down_state_white_black] = (down_state_black, None) c_event_right_white_up[down_state_all] = (down_state_self_black, image_rects[4]) c_event_right_black_down[down_state_none] = (down_state_black, image_rects[3]) c_event_right_black_down[down_state_self] = ( down_state_self_black, image_rects[4], ) c_event_right_black_down[down_state_white] = ( down_state_white_black, image_rects[3], ) c_event_right_black_down[down_state_self_white] = ( down_state_all, image_rects[5], ) c_event_right_black_up[down_state_black] = (down_state_none, image_rects[0]) c_event_right_black_up[down_state_self_black] = ( down_state_self, image_rects[1], ) c_event_right_black_up[down_state_white_black] = ( down_state_white, image_rects[0], ) c_event_right_black_up[down_state_all] = (down_state_self_white, image_rects[2]) class OurKey(Key): key_data = KeyData( is_white_key, c_width, c_height, c_down_state_initial, c_down_state_rect_initial, c_notify_down_method, c_notify_up_method, c_updates, c_event_down, c_event_up, c_image_strip, c_event_right_white_down, c_event_right_white_up, c_event_right_black_down, c_event_right_black_up, ) return OurKey def key_images() -> Tuple[pg.Surface, Dict[str, pg.Rect]]: """Return a keyboard keys image strip and a mapping of image locations The return tuple is a pygame.Surface and a dictionary keyed by key name and valued by a pygame.Rect. This function encapsulates the constants relevant to the keyboard image file. There are five key types. One is the black key. The other four white keys are determined by the proximity of the black keys. The plain white key has no black key adjacent to it. A white-left and white-right key has a black key to the left or right of it respectively. A white-center key has a black key on both sides. A key may have up to six related images depending on the state of adjacent keys to its right. """ my_dir = os.path.split(os.path.abspath(__file__))[0] strip_file = os.path.join(my_dir, "data", "midikeys.png") white_key_width = 42 white_key_height = 160 black_key_width = 22 black_key_height = 94 strip = pg.image.load(strip_file) names = [ "black none", "black self", "white none", "white self", "white self-white", "white-left none", "white-left self", "white-left black", "white-left self-black", "white-left self-white", "white-left all", "white-center none", "white-center self", "white-center black", "white-center self-black", "white-center self-white", "white-center all", "white-right none", "white-right self", "white-right self-white", ] rects = {} for i in range(2): rects[names[i]] = pg.Rect( i * white_key_width, 0, black_key_width, black_key_height ) for i in range(2, len(names)): rects[names[i]] = pg.Rect( i * white_key_width, 0, white_key_width, white_key_height ) return strip, rects class Keyboard: """Musical keyboard widget Constructor arguments: start_note: midi note value of the starting note on the keyboard. n_notes: number of notes (keys) on the keyboard. A Keyboard instance draws the musical keyboard and maintains the state of all the keyboard keys. Individual keys can be in a down (depressed) or up (released) state. """ _image_strip, _rects = key_images() white_key_width, white_key_height = _rects["white none"].size black_key_width, black_key_height = _rects["black none"].size _updates: Set[Any] = set() # There are five key classes, representing key shape: # black key (BlackKey), plain white key (WhiteKey), white key to the left # of a black key (WhiteKeyLeft), white key between two black keys # (WhiteKeyCenter), and white key to the right of a black key # (WhiteKeyRight). BlackKey = key_class( _updates, _image_strip, [_rects["black none"], _rects["black self"]], False ) WhiteKey = key_class( _updates, _image_strip, [_rects["white none"], _rects["white self"], _rects["white self-white"]], ) WhiteKeyLeft = key_class( _updates, _image_strip, [ _rects["white-left none"], _rects["white-left self"], _rects["white-left self-white"], _rects["white-left black"], _rects["white-left self-black"], _rects["white-left all"], ], ) WhiteKeyCenter = key_class( _updates, _image_strip, [ _rects["white-center none"], _rects["white-center self"], _rects["white-center self-white"], _rects["white-center black"], _rects["white-center self-black"], _rects["white-center all"], ], ) WhiteKeyRight = key_class( _updates, _image_strip, [ _rects["white-right none"], _rects["white-right self"], _rects["white-right self-white"], ], ) def __init__(self, start_note: int, n_notes: int): """Return a new Keyboard instance with n_note keys""" self._start_note = start_note self._end_note = start_note + n_notes - 1 self._add_keys() def _add_keys(self) -> None: """Populate the keyboard with key instances Set the _keys and rect attributes. """ # Keys are entered in a list, where index is Midi note. Since there are # only 128 possible Midi notes the list length is manageable. Unassigned # note positions should never be accessed, so are set None to ensure # the bug is quickly detected. # key_map: list[Key | Literal[None]] = [None] * 128 start_note = self._start_note end_note = self._end_note black_offset = self.black_key_width // 2 prev_white_key = None x = y = 0 if is_white_key(start_note): is_prev_white = True else: x += black_offset is_prev_white = False for note in range(start_note, end_note + 1): ident = note # For now notes uniquely identify keyboard keys. if is_white_key(note): if is_prev_white: if note == end_note or is_white_key(note + 1): key = self.WhiteKey(ident, (x, y), prev_white_key) else: key = self.WhiteKeyLeft(ident, (x, y), prev_white_key) else: if note == end_note or is_white_key(note + 1): key = self.WhiteKeyRight(ident, (x, y), prev_white_key) else: key = self.WhiteKeyCenter(ident, (x, y), prev_white_key) is_prev_white = True x += self.white_key_width prev_white_key = key else: key = self.BlackKey(ident, (x - black_offset, y), prev_white_key) is_prev_white = False key_map[note] = key self._keys = key_map the_key = key_map[self._end_note] if the_key is None: kb_width = 0 else: kb_width = the_key.rect.right kb_height = self.white_key_height self.rect = pg.Rect(0, 0, kb_width, kb_height) def map_regions(self, regions): """Draw the key regions onto surface regions. Regions must have at least 3 byte pixels. Each pixel of the keyboard rectangle is set to the color (note, velocity, 0). The regions surface must be at least as large as (0, 0, self.rect.left, self.rect.bottom) """ # First draw the white key regions. Then add the overlapping # black key regions. # cutoff = self.black_key_height black_keys = [] for note in range(self._start_note, self._end_note + 1): key = self._keys[note] if key is not None and key.is_white: fill_region(regions, note, key.rect, cutoff) else: black_keys.append((note, key)) for note, key in black_keys: if key is not None: fill_region(regions, note, key.rect, cutoff) def draw(self, surf, background, dirty_rects): """Redraw all altered keyboard keys""" changed_keys = self._updates while changed_keys: changed_keys.pop().draw(surf, background, dirty_rects) def key_down(self, note): """Signal a key down event for note""" key = self._keys[note] if key is not None: key.down() def key_up(self, note): """Signal a key up event for note""" key = self._keys[note] if key is not None: key.up() def fill_region(regions, note, rect, cutoff): """Fill the region defined by rect with a (note, velocity, 0) color The velocity varies from a small value at the top of the region to 127 at the bottom. The vertical region 0 to cutoff is split into three parts, with velocities 42, 84 and 127. Everything below cutoff has velocity 127. """ x, y, width, height = rect if cutoff is None: cutoff = height delta_height = cutoff // 3 regions.fill((note, 42, 0), (x, y, width, delta_height)) regions.fill((note, 84, 0), (x, y + delta_height, width, delta_height)) regions.fill( (note, 127, 0), (x, y + 2 * delta_height, width, height - 2 * delta_height) ) def is_white_key(note): """True if note is represented by a white key""" key_pattern = [ True, False, True, True, False, True, False, True, True, False, True, False, ] return key_pattern[(note - 21) % len(key_pattern)] def usage(): print("--input [device_id] : Midi message logger") print("--output [device_id] : Midi piano keyboard") print("--list : list available midi devices") def main(mode="output", device_id=None): """Run a Midi example Arguments: mode - if 'output' run a midi keyboard output example 'input' run a midi event logger input example 'list' list available midi devices (default 'output') device_id - midi device number; if None then use the default midi input or output device for the system """ if mode == "input": input_main(device_id) elif mode == "output": output_main(device_id) elif mode == "list": print_device_info() else: raise ValueError(f"Unknown mode option '{mode}'") if __name__ == "__main__": device_id: Optional[int] = None try: device_id = int(sys.argv[-1]) except ValueError: device_id = None if "--input" in sys.argv or "-i" in sys.argv: input_main(device_id) elif "--output" in sys.argv or "-o" in sys.argv: output_main(device_id) elif "--list" in sys.argv or "-l" in sys.argv: print_device_info() else: usage() pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/moveit.py0000644000175100001770000000640214676242340016114 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.moveit This is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen. It also has a separate player character that can be controlled with arrow keys. Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. """ import os import pygame as pg main_dir = os.path.split(os.path.abspath(__file__))[0] # Height and Width of screen WIDTH = 640 HEIGHT = 480 # Height and width of the sprite SPRITE_WIDTH = 80 SPRITE_HEIGHT = 60 # our game object class class GameObject: def __init__(self, image, height, speed): self.speed = speed self.image = image self.pos = image.get_rect().move(0, height) # move the object. def move(self, up=False, down=False, left=False, right=False): if right: self.pos.right += self.speed if left: self.pos.right -= self.speed if down: self.pos.top += self.speed if up: self.pos.top -= self.speed # controls the object such that it cannot leave the screen's viewpoint if self.pos.right > WIDTH: self.pos.left = 0 if self.pos.top > HEIGHT - SPRITE_HEIGHT: self.pos.top = 0 if self.pos.right < SPRITE_WIDTH: self.pos.right = WIDTH if self.pos.top < 0: self.pos.top = HEIGHT - SPRITE_HEIGHT # quick function to load an image def load_image(name): path = os.path.join(main_dir, "data", name) return pg.image.load(path).convert() # here's the full code def main(): pg.init() clock = pg.time.Clock() screen = pg.display.set_mode((WIDTH, HEIGHT)) player = load_image("player1.gif") entity = load_image("alien1.gif") background = load_image("liquid.bmp") # scale the background image so that it fills the window and # successfully overwrites the old sprite position. background = pg.transform.scale2x(background) background = pg.transform.scale2x(background) screen.blit(background, (0, 0)) objects = [] p = GameObject(player, 10, 3) for x in range(10): o = GameObject(entity, x * 40, x) objects.append(o) pg.display.set_caption("Move It!") # This is a simple event handler that enables player input. while True: # Get all keys currently pressed, and move when an arrow key is held. keys = pg.key.get_pressed() if keys[pg.K_UP]: p.move(up=True) if keys[pg.K_DOWN]: p.move(down=True) if keys[pg.K_LEFT]: p.move(left=True) if keys[pg.K_RIGHT]: p.move(right=True) # Draw the background screen.blit(background, (0, 0)) for e in pg.event.get(): # quit upon screen exit if e.type == pg.QUIT: return for o in objects: screen.blit(background, o.pos, o.pos) for o in objects: o.move(right=True) screen.blit(o.image, o.pos) screen.blit(p.image, p.pos) clock.tick(60) pg.display.update() pg.time.delay(100) if __name__ == "__main__": main() pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/music_drop_fade.py0000644000175100001770000002162614676242340017741 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.music_drop_fade Fade in and play music from a list while observing several events Adds music files to a playlist whenever played by one of the following methods Music files passed from the commandline are played Music files and filenames are played when drag and dropped onto the pygame window Polls the clipboard and plays music files if it finds one there Keyboard Controls: * Press space or enter to pause music playback * Press up or down to change the music volume * Press left or right to seek 5 seconds into the track * Press escape to quit * Press any other button to skip to the next music file in the list """ from typing import List import pygame as pg import os, sys VOLUME_CHANGE_AMOUNT = 0.02 # how fast should up and down arrows change the volume? def add_file(filename): """ This function will check if filename exists and is a music file If it is the file will be added to a list of music files(even if already there) Type checking is by the extension of the file, not by its contents We can only discover if the file is valid when we mixer.music.load() it later It looks in the file directory and its data subdirectory """ if filename.rpartition(".")[2].lower() not in music_file_types: print(f"{filename} not added to file list") print("only these files types are allowed: ", music_file_types) return False elif os.path.exists(filename): music_file_list.append(filename) elif os.path.exists(os.path.join(main_dir, filename)): music_file_list.append(os.path.join(main_dir, filename)) elif os.path.exists(os.path.join(data_dir, filename)): music_file_list.append(os.path.join(data_dir, filename)) else: print("file not found") return False print(f"{filename} added to file list") return True def play_file(filename): """ This function will call add_file and play it if successful The music will fade in during the first 4 seconds set_endevent is used to post a MUSIC_DONE event when the song finishes The main loop will call play_next() when the MUSIC_DONE event is received """ global starting_pos if add_file(filename): try: # we must do this in case the file is not a valid audio file pg.mixer.music.load(music_file_list[-1]) except pg.error as e: print(e) # print description such as 'Not an Ogg Vorbis audio stream' if filename in music_file_list: music_file_list.remove(filename) print(f"{filename} removed from file list") return pg.mixer.music.play(fade_ms=4000) pg.mixer.music.set_volume(volume) if filename.rpartition(".")[2].lower() in music_can_seek: print("file supports seeking") starting_pos = 0 else: print("file does not support seeking") starting_pos = -1 pg.mixer.music.set_endevent(MUSIC_DONE) def play_next(): """ This function will play the next song in music_file_list It uses pop(0) to get the next song and then appends it to the end of the list The song will fade in during the first 4 seconds """ global starting_pos if len(music_file_list) > 1: nxt = music_file_list.pop(0) try: pg.mixer.music.load(nxt) except pg.error as e: print(e) print(f"{nxt} removed from file list") music_file_list.append(nxt) print("starting next song: ", nxt) else: nxt = music_file_list[0] pg.mixer.music.play(fade_ms=4000) pg.mixer.music.set_volume(volume) pg.mixer.music.set_endevent(MUSIC_DONE) if nxt.rpartition(".")[2].lower() in music_can_seek: starting_pos = 0 else: starting_pos = -1 def draw_text_line(text, y=0): """ Draws a line of text onto the display surface The text will be centered horizontally at the given y position The text's height is added to y and returned to the caller """ screen = pg.display.get_surface() surf = font.render(text, 1, (255, 255, 255)) y += surf.get_height() x = (screen.get_width() - surf.get_width()) / 2 screen.blit(surf, (x, y)) return y def change_music_position(amount): """ Changes current playback position by amount seconds. This only works with OGG and MP3 files. music.get_pos() returns how many milliseconds the song has played, not the current position in the file. We must track the starting position ourselves. music.set_pos() will set the position in seconds. """ global starting_pos if starting_pos >= 0: # will be -1 unless play_file() was OGG or MP3 played_for = pg.mixer.music.get_pos() / 1000.0 old_pos = starting_pos + played_for starting_pos = old_pos + amount pg.mixer.music.play(start=starting_pos) print(f"jumped from {old_pos} to {starting_pos}") MUSIC_DONE = pg.event.custom_type() # event to be set as mixer.music.set_endevent() main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") starting_pos = 0 # needed to fast forward and rewind volume = 0.75 music_file_list: List[str] = [] music_file_types = ("mp3", "ogg", "mid", "mod", "it", "xm", "wav") music_can_seek = ("mp3", "ogg", "mod", "it", "xm") def main(): global font # this will be used by the draw_text_line function global volume, starting_pos running = True paused = False # we will be polling for key up and key down events # users should be able to change the volume by holding the up and down arrows # the change_volume variable will be set by key down events and cleared by key up events change_volume = 0 pg.init() pg.display.set_mode((640, 480)) font = pg.font.SysFont("Arial", 24) clock = pg.time.Clock() pg.scrap.init() pg.SCRAP_TEXT = pg.scrap.get_types()[0] # TODO remove when scrap module is fixed scrap_get = pg.scrap.get(pg.SCRAP_TEXT) clipped = "" if scrap_get is None else scrap_get.decode("UTF-8") # store the current text from the clipboard TODO remove decode # add the command line arguments to the music_file_list for arg in sys.argv[1:]: add_file(arg) play_file("house_lo.ogg") # play default music included with pygame # draw instructions on screen y = draw_text_line("Drop music files or path names onto this window", 20) y = draw_text_line("Copy file names into the clipboard", y) y = draw_text_line("Or feed them from the command line", y) y = draw_text_line("If it's music it will play!", y) y = draw_text_line("SPACE to pause or UP/DOWN to change volume", y) y = draw_text_line("LEFT and RIGHT will skip around the track", y) draw_text_line("Other keys will start the next track", y) """ This is the main loop It will respond to drag and drop, clipboard changes, and key presses """ while running: for ev in pg.event.get(): if ev.type == pg.QUIT: running = False elif ev.type == pg.DROPTEXT: play_file(ev.text) elif ev.type == pg.DROPFILE: play_file(ev.file) elif ev.type == MUSIC_DONE: play_next() elif ev.type == pg.KEYDOWN: if ev.key == pg.K_ESCAPE: running = False # exit loop elif ev.key in (pg.K_SPACE, pg.K_RETURN): if paused: pg.mixer.music.unpause() paused = False else: pg.mixer.music.pause() paused = True elif ev.key == pg.K_UP: change_volume = VOLUME_CHANGE_AMOUNT elif ev.key == pg.K_DOWN: change_volume = -VOLUME_CHANGE_AMOUNT elif ev.key == pg.K_RIGHT: change_music_position(+5) elif ev.key == pg.K_LEFT: change_music_position(-5) else: play_next() elif ev.type == pg.KEYUP: if ev.key in (pg.K_UP, pg.K_DOWN): change_volume = 0 # is the user holding up or down? if change_volume: volume += change_volume volume = min(max(0, volume), 1) # volume should be between 0 and 1 pg.mixer.music.set_volume(volume) print("volume:", volume) # TODO remove decode when SDL2 scrap is fixed scrap_get = pg.scrap.get(pg.SCRAP_TEXT) new_text = "" if scrap_get is None else scrap_get.decode("UTF-8") if new_text != clipped: # has the clipboard changed? clipped = new_text play_file(clipped) # try to play the file if it has pg.display.flip() clock.tick(9) # keep CPU use down by updating screen less often pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/pixelarray.py0000644000175100001770000000657514676242340017004 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.pixelarray PixelArray does array processing of pixels. Sort of like another array processor called 'numpy' - But for pixels. Flip it, stripe it, rotate it. Controls -------- To see different effects - press a key or click a mouse. """ import os import pygame as pg main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") def show(image): screen = pg.display.get_surface() screen.fill((255, 255, 255)) screen.blit(image, (0, 0)) pg.display.flip() while True: event = pg.event.wait() if event.type == pg.QUIT: pg.quit() raise SystemExit if event.type in [pg.MOUSEBUTTONDOWN, pg.KEYDOWN]: break def main(): pg.init() pg.display.set_mode((255, 255)) surface = pg.Surface((255, 255)) pg.display.flip() # Create the PixelArray. ar = pg.PixelArray(surface) # Do some easy gradient effect. for y in range(255): r, g, b = y, y, y ar[:, y] = (r, g, b) del ar show(surface) # We have made some gradient effect, now flip it. ar = pg.PixelArray(surface) ar[:] = ar[:, ::-1] del ar show(surface) # Every second column will be made blue ar = pg.PixelArray(surface) ar[::2] = (0, 0, 255) del ar show(surface) # Every second row will be made green ar = pg.PixelArray(surface) ar[:, ::2] = (0, 255, 0) del ar show(surface) # Manipulate the image. Flip it around the y axis. surface = pg.image.load(os.path.join(data_dir, "arraydemo.bmp")) ar = pg.PixelArray(surface) ar[:] = ar[:, ::-1] del ar show(surface) # Flip the image around the x axis. ar = pg.PixelArray(surface) ar[:] = ar[::-1, :] del ar show(surface) # Every second column will be made white. ar = pg.PixelArray(surface) ar[::2] = (255, 255, 255) del ar show(surface) # Flip the image around both axes, restoring its original layout. ar = pg.PixelArray(surface) ar[:] = ar[::-1, ::-1] del ar show(surface) # Rotate 90 degrees clockwise. w, h = surface.get_size() surface2 = pg.Surface((h, w), surface.get_flags(), surface) ar = pg.PixelArray(surface) ar2 = pg.PixelArray(surface2) ar2[...] = ar.transpose()[::-1, :] del ar, ar2 show(surface2) # Scale it by throwing each second pixel away. surface = pg.image.load(os.path.join(data_dir, "arraydemo.bmp")) ar = pg.PixelArray(surface) sf2 = ar[::2, ::2].make_surface() del ar show(sf2) # Replace anything looking like the blue color from the text. ar = pg.PixelArray(surface) ar.replace((60, 60, 255), (0, 255, 0), 0.06) del ar show(surface) # Extract anything which might be somewhat black. surface = pg.image.load(os.path.join(data_dir, "arraydemo.bmp")) ar = pg.PixelArray(surface) ar2 = ar.extract((0, 0, 0), 0.07) sf2 = ar2.surface del ar, ar2 show(sf2) # Compare two images. surface = pg.image.load(os.path.join(data_dir, "alien1.gif")) surface2 = pg.image.load(os.path.join(data_dir, "alien2.gif")) ar1 = pg.PixelArray(surface) ar2 = pg.PixelArray(surface2) ar3 = ar1.compare(ar2, 0.07) sf3 = ar3.surface del ar1, ar2, ar3 show(sf3) if __name__ == "__main__": main() pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/playmus.py0000644000175100001770000001213714676242340016305 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.playmus A simple music player. Use pygame.mixer.music to play an audio file. A window is created to handle keyboard events for playback commands. Keyboard Controls ----------------- space - play/pause toggle r - rewind f - fade out q - stop """ import sys import pygame as pg import pygame.freetype class Window: """The application's Pygame window A Window instance manages the creation of and drawing to a window. It is a singleton class. Only one instance can exist. """ instance = None def __new__(cls, *args, **kwds): """Return an open Pygame window""" if Window.instance is not None: return Window.instance self = object.__new__(cls) pg.display.init() self.screen = pg.display.set_mode((600, 400)) Window.instance = self return self def __init__(self, title): pg.display.set_caption(title) self.text_color = (254, 231, 21, 255) self.background_color = (16, 24, 32, 255) self.screen.fill(self.background_color) pg.display.flip() pygame.freetype.init() self.font = pygame.freetype.Font(None, 20) self.font.origin = True self.ascender = int(self.font.get_sized_ascender() * 1.5) self.descender = int(self.font.get_sized_descender() * 1.5) self.line_height = self.ascender - self.descender self.write_lines( "\nPress 'q' or 'ESCAPE' or close this window to quit\n" "Press 'SPACE' to play / pause\n" "Press 'r' to rewind to the beginning (restart)\n" "Press 'f' to fade music out over 5 seconds\n\n" "Window will quit automatically when music ends\n", 0, ) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): self.close() return False def close(self): pg.display.quit() Window.instance = None def write_lines(self, text, line=0): w, h = self.screen.get_size() line_height = self.line_height nlines = h // line_height if line < 0: line = nlines + line for i, text_line in enumerate(text.split("\n"), line): y = i * line_height + self.ascender # Clear the line first. self.screen.fill( self.background_color, (0, i * line_height, w, line_height) ) # Write new text. self.font.render_to(self.screen, (15, y), text_line, self.text_color) pg.display.flip() def show_usage_message(): print("Usage: python playmus.py ") print(" python -m pygame.examples.playmus ") def main(file_path): """Play an audio file with pg.mixer.music""" with Window(file_path) as win: win.write_lines("Loading ...", -1) pg.mixer.init(frequency=44100) try: paused = False pg.mixer.music.load(file_path) # Make sure the event loop ticks over at least every 0.5 seconds. pg.time.set_timer(pg.USEREVENT, 500) pg.mixer.music.play() win.write_lines("Playing ...\n", -1) while pg.mixer.music.get_busy() or paused: e = pg.event.wait() if e.type == pg.KEYDOWN: key = e.key if key == pg.K_SPACE: if paused: pg.mixer.music.unpause() paused = False win.write_lines("Playing ...\n", -1) else: pg.mixer.music.pause() paused = True win.write_lines("Paused ...\n", -1) elif key == pg.K_r: if file_path[-3:].lower() in ("ogg", "mp3", "mod"): status = "Rewound." pg.mixer.music.rewind() else: status = "Restarted." pg.mixer.music.play() if paused: pg.mixer.music.pause() win.write_lines(status, -1) elif key == pg.K_f: win.write_lines("Fading out ...\n", -1) pg.mixer.music.fadeout(5000) # when finished get_busy() will return False. elif key in [pg.K_q, pg.K_ESCAPE]: paused = False pg.mixer.music.stop() # get_busy() will now return False. elif e.type == pg.QUIT: paused = False pg.mixer.music.stop() # get_busy() will now return False. pg.time.set_timer(pg.USEREVENT, 0) finally: pg.mixer.quit() pg.quit() if __name__ == "__main__": # Check the only command line argument, a file path if len(sys.argv) != 2: show_usage_message() else: main(sys.argv[1]) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/resizing_new.py0000644000175100001770000000202614676242340017312 0ustar00runnerdocker#!/usr/bin/env python import pygame as pg pg.init() RES = (160, 120) FPS = 30 clock = pg.time.Clock() screen = pg.display.set_mode(RES, pg.RESIZABLE) pg.display._set_autoresize(False) # MAIN LOOP done = False i = 0 j = 0 while not done: for event in pg.event.get(): if event.type == pg.KEYDOWN and event.key == pg.K_q: done = True if event.type == pg.QUIT: done = True # if event.type==pg.WINDOWRESIZED: # screen=pg.display.get_surface() if event.type == pg.VIDEORESIZE: screen = pg.display.get_surface() i += 1 i = i % screen.get_width() j += i % 2 j = j % screen.get_height() screen.fill((255, 0, 255)) pg.draw.circle(screen, (0, 0, 0), (100, 100), 20) pg.draw.circle(screen, (0, 0, 200), (0, 0), 10) pg.draw.circle(screen, (200, 0, 0), (160, 120), 30) pg.draw.line(screen, (250, 250, 0), (0, 120), (160, 0)) pg.draw.circle(screen, (255, 255, 255), (i, j), 5) pg.display.flip() clock.tick(FPS) pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/scaletest.py0000644000175100001770000001133214676242340016576 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.scaletest Shows an interactive image scaler. """ import sys import time import pygame as pg def main(imagefile, convert_alpha=False, run_speed_test=False): """show an interactive image scaler Args: imagefile - name of source image (required) convert_alpha - use convert_alpha() on the surf (default False) run_speed_test - (default False) """ # initialize display pg.display.init() # load background image background = pg.image.load(imagefile) if run_speed_test: if convert_alpha: # convert_alpha() requires the display mode to be set pg.display.set_mode((1, 1)) background = background.convert_alpha() SpeedTest(background) return # start fullscreen mode screen = pg.display.set_mode((1024, 768), pg.FULLSCREEN) if convert_alpha: background = background.convert_alpha() # turn off the mouse pointer pg.mouse.set_visible(0) # main loop bRunning = True bUp = False bDown = False bLeft = False bRight = False cursize = [background.get_width(), background.get_height()] while bRunning: image = pg.transform.smoothscale(background, cursize) imgpos = image.get_rect(centerx=512, centery=384) screen.fill((255, 255, 255)) screen.blit(image, imgpos) pg.display.flip() for event in pg.event.get(): if event.type == pg.QUIT or ( event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE ): bRunning = False if event.type == pg.KEYDOWN: if event.key == pg.K_UP: bUp = True if event.key == pg.K_DOWN: bDown = True if event.key == pg.K_LEFT: bLeft = True if event.key == pg.K_RIGHT: bRight = True if event.type == pg.KEYUP: if event.key == pg.K_UP: bUp = False if event.key == pg.K_DOWN: bDown = False if event.key == pg.K_LEFT: bLeft = False if event.key == pg.K_RIGHT: bRight = False if bUp: cursize[1] -= 2 if cursize[1] < 1: cursize[1] = 1 if bDown: cursize[1] += 2 if bLeft: cursize[0] -= 2 if cursize[0] < 1: cursize[0] = 1 if bRight: cursize[0] += 2 pg.quit() def SpeedTest(image): print(f"\nImage Scaling Speed Test - Image Size {str(image.get_size())}\n") imgsize = [image.get_width(), image.get_height()] duration = 0.0 for i in range(128): shrinkx = (imgsize[0] * i) // 128 shrinky = (imgsize[1] * i) // 128 start = time.time() tempimg = pg.transform.smoothscale(image, (shrinkx, shrinky)) duration += time.time() - start del tempimg print(f"Average transform.smoothscale shrink time: {duration / 128 * 1000:.4f} ms.") duration = 0.0 for i in range(128): expandx = (imgsize[0] * (i + 129)) // 128 expandy = (imgsize[1] * (i + 129)) // 128 start = time.time() tempimg = pg.transform.smoothscale(image, (expandx, expandy)) duration += time.time() - start del tempimg print(f"Average transform.smoothscale expand time: {duration / 128 * 1000:.4f} ms.") duration = 0.0 for i in range(128): shrinkx = (imgsize[0] * i) // 128 shrinky = (imgsize[1] * i) // 128 start = time.time() tempimg = pg.transform.scale(image, (shrinkx, shrinky)) duration += time.time() - start del tempimg print(f"Average transform.scale shrink time: {duration / 128 * 1000:.4f} ms.") duration = 0.0 for i in range(128): expandx = (imgsize[0] * (i + 129)) // 128 expandy = (imgsize[1] * (i + 129)) // 128 start = time.time() tempimg = pg.transform.scale(image, (expandx, expandy)) duration += time.time() - start del tempimg print(f"Average transform.scale expand time: {duration / 128 * 1000:.4f} ms.") if __name__ == "__main__": # check input parameters if len(sys.argv) < 2: print(f"\nUsage: {sys.argv[0]} imagefile [-t] [-convert_alpha]") print(" imagefile image filename (required)") print(" -t run speed test") print(" -convert_alpha use convert_alpha() on the image's " "surface\n") else: main( sys.argv[1], convert_alpha="-convert_alpha" in sys.argv, run_speed_test="-t" in sys.argv, ) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/scrap_clipboard.py0000644000175100001770000000573114676242340017744 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.scrap_clipboard Demonstrates the clipboard capabilities of pygame. Copy/paste! Keyboard Controls ----------------- g - get and print types in clipboard. If, image blit to screen. p - place some text into clipboard a - print types available in the clipboard i - put image into the clipboard """ import os import pygame as pg import pygame.scrap as scrap from io import BytesIO def usage(): print("Press the 'g' key to get all of the current clipboard data") print("Press the 'p' key to put a string into the clipboard") print("Press the 'a' key to get a list of the currently available types") print("Press the 'i' key to put an image into the clipboard") main_dir = os.path.split(os.path.abspath(__file__))[0] pg.init() screen = pg.display.set_mode((200, 200)) c = pg.time.Clock() going = True # Initialize the scrap module and use the clipboard mode. scrap.init() scrap.set_mode(pg.SCRAP_CLIPBOARD) usage() while going: for e in pg.event.get(): if e.type == pg.QUIT or (e.type == pg.KEYDOWN and e.key == pg.K_ESCAPE): going = False elif e.type == pg.KEYDOWN and e.key == pg.K_g: # This means to look for data. print("Getting the different clipboard data..") for t in scrap.get_types(): r = scrap.get(t) if r and len(r) > 500: print(f"Type {t} : (large {len(r)} byte buffer)") elif r is None: print(f"Type {t} : None") else: print(f"Type {t} : '{r.decode('ascii', 'ignore')}'") if "image" in t: namehint = t.split("/")[1] if namehint in ["bmp", "png", "jpg"]: f = BytesIO(r) loaded_surf = pg.image.load(f, "." + namehint) screen.blit(loaded_surf, (0, 0)) elif e.type == pg.KEYDOWN and e.key == pg.K_p: # Place some text into the selection. print("Placing clipboard text.") scrap.put(pg.SCRAP_TEXT, b"Hello. This is a message from scrap.") elif e.type == pg.KEYDOWN and e.key == pg.K_a: # Get all available types. print("Getting the available types from the clipboard.") types = scrap.get_types() print(types) if len(types) > 0: print(f"Contains {types[0]}: {scrap.contains(types[0])}") print("Contains _INVALID_: ", scrap.contains("_INVALID_")) elif e.type == pg.KEYDOWN and e.key == pg.K_i: print("Putting image into the clipboard.") scrap.set_mode(pg.SCRAP_CLIPBOARD) fp = open(os.path.join(main_dir, "data", "liquid.bmp"), "rb") buf = fp.read() scrap.put("image/bmp", buf) fp.close() elif e.type in (pg.KEYDOWN, pg.MOUSEBUTTONDOWN): usage() pg.display.flip() c.tick(40) pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/scroll.py0000644000175100001770000001476214676242340016117 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.scroll An zoomed image viewer that demonstrates Surface.scroll This example shows a scrollable image that has a zoom factor of eight. It uses the Surface.scroll function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used. When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press ESC to quit. """ import sys import os import pygame as pg from pygame.transform import scale main_dir = os.path.dirname(os.path.abspath(__file__)) DIR_UP = 1 DIR_DOWN = 2 DIR_LEFT = 3 DIR_RIGHT = 4 zoom_factor = 8 def draw_arrow(surf, color, posn, direction: int): x, y = posn if direction == DIR_UP: pointlist = ((x - 29, y + 30), (x + 30, y + 30), (x + 1, y - 29), (x, y - 29)) elif direction == DIR_DOWN: pointlist = ((x - 29, y - 29), (x + 30, y - 29), (x + 1, y + 30), (x, y + 30)) elif direction == DIR_LEFT: pointlist = ((x + 30, y - 29), (x + 30, y + 30), (x - 29, y + 1), (x - 29, y)) else: pointlist = ((x - 29, y - 29), (x - 29, y + 30), (x + 30, y + 1), (x + 30, y)) pg.draw.polygon(surf, color, pointlist) def add_arrow_button(screen, regions, posn, direction): draw_arrow(screen, "black", posn, direction) draw_arrow(regions, (direction, 0, 0), posn, direction) def scroll_view(screen, image: pg.Surface, direction: int, view_rect): src_rect = None dst_rect = None zoom_view_rect = screen.get_clip() image_w, image_h = image.get_size() if direction == DIR_UP: if view_rect.top > 0: screen.scroll(dy=zoom_factor) view_rect.move_ip(0, -1) src_rect = view_rect.copy() src_rect.h = 1 dst_rect = zoom_view_rect.copy() dst_rect.h = zoom_factor elif direction == DIR_DOWN: if view_rect.bottom < image_h: screen.scroll(dy=-zoom_factor) view_rect.move_ip(0, 1) src_rect = view_rect.copy() src_rect.h = 1 src_rect.bottom = view_rect.bottom dst_rect = zoom_view_rect.copy() dst_rect.h = zoom_factor dst_rect.bottom = zoom_view_rect.bottom elif direction == DIR_LEFT: if view_rect.left > 0: screen.scroll(dx=zoom_factor) view_rect.move_ip(-1, 0) src_rect = view_rect.copy() src_rect.w = 1 dst_rect = zoom_view_rect.copy() dst_rect.w = zoom_factor elif direction == DIR_RIGHT: if view_rect.right < image_w: screen.scroll(dx=-zoom_factor) view_rect.move_ip(1, 0) src_rect = view_rect.copy() src_rect.w = 1 src_rect.right = view_rect.right dst_rect = zoom_view_rect.copy() dst_rect.w = zoom_factor dst_rect.right = zoom_view_rect.right if src_rect is not None and dst_rect is not None: scale(image.subsurface(src_rect), dst_rect.size, screen.subsurface(dst_rect)) pg.display.update(zoom_view_rect) def main(image_file=None): if image_file is None: image_file = os.path.join(main_dir, "data", "arraydemo.bmp") margin = 80 view_size = (30, 20) zoom_view_size = (view_size[0] * zoom_factor, view_size[1] * zoom_factor) win_size = (zoom_view_size[0] + 2 * margin, zoom_view_size[1] + 2 * margin) background_color = pg.Color("beige") pg.init() pg.display.set_caption("Scroll Example") # set up key repeating so we can hold down the key to scroll. old_k_delay, old_k_interval = pg.key.get_repeat() pg.key.set_repeat(500, 30) try: screen = pg.display.set_mode(win_size) screen.fill(background_color) pg.display.flip() image = pg.image.load(image_file).convert() image_w, image_h = image.get_size() if image_w < view_size[0] or image_h < view_size[1]: print("The source image is too small for this example.") print("A %i by %i or larger image is required." % zoom_view_size) return regions = pg.Surface(win_size, 0, 24) add_arrow_button(screen, regions, (40, win_size[1] // 2), DIR_LEFT) add_arrow_button( screen, regions, (win_size[0] - 40, win_size[1] // 2), DIR_RIGHT ) add_arrow_button(screen, regions, (win_size[0] // 2, 40), DIR_UP) add_arrow_button( screen, regions, (win_size[0] // 2, win_size[1] - 40), DIR_DOWN ) pg.display.flip() screen.set_clip((margin, margin, zoom_view_size[0], zoom_view_size[1])) view_rect = pg.Rect(0, 0, view_size[0], view_size[1]) scale( image.subsurface(view_rect), zoom_view_size, screen.subsurface(screen.get_clip()), ) pg.display.flip() # the direction we will scroll in. direction = None clock = pg.time.Clock() clock.tick() going = True while going: # wait for events before doing anything. # events = [pg.event.wait()] + pg.event.get() events = pg.event.get() # During the loop, if a key is held, scroll the view. keys = pg.key.get_pressed() if keys[pg.K_UP]: scroll_view(screen, image, DIR_UP, view_rect) if keys[pg.K_DOWN]: scroll_view(screen, image, DIR_DOWN, view_rect) if keys[pg.K_LEFT]: scroll_view(screen, image, DIR_LEFT, view_rect) if keys[pg.K_RIGHT]: scroll_view(screen, image, DIR_RIGHT, view_rect) for e in events: # quit if the event is quit. if e.type == pg.QUIT: going = False # handle mouse button presses on arrows. elif e.type == pg.MOUSEBUTTONDOWN: direction = regions.get_at(e.pos)[0] elif e.type == pg.MOUSEBUTTONUP: direction = None if direction: scroll_view(screen, image, direction, view_rect) clock.tick(30) finally: pg.key.set_repeat(old_k_delay, old_k_interval) pg.quit() if __name__ == "__main__": image_file = sys.argv[1] if len(sys.argv) > 1 else None main(image_file) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/setmodescale.py0000644000175100001770000000341114676242340017256 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.setmodescale On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Passing SCALED to pygame.display.set_mode means the resolution depends on desktop size and the graphics are scaled. """ import pygame as pg pg.init() RES = (160, 120) FPS = 30 clock = pg.time.Clock() print("desktops", pg.display.get_desktop_sizes()) screen = pg.display.set_mode(RES, pg.SCALED | pg.RESIZABLE) # MAIN LOOP done = False i = 0 j = 0 r_name, r_flags = pg.display._get_renderer_info() print("renderer:", r_name, "flags:", bin(r_flags)) for flag, name in [ (1, "software"), (2, "accelerated"), (4, "VSync"), (8, "render to texture"), ]: if flag & r_flags: print(name) while not done: for event in pg.event.get(): if event.type == pg.KEYDOWN and event.key == pg.K_q: done = True if event.type == pg.QUIT: done = True if event.type == pg.KEYDOWN and event.key == pg.K_f: pg.display.toggle_fullscreen() if event.type == pg.VIDEORESIZE: pg.display._resize_event(event) i += 1 i = i % screen.get_width() j += i % 2 j = j % screen.get_height() screen.fill((255, 0, 255)) pg.draw.circle(screen, (0, 0, 0), (100, 100), 20) pg.draw.circle(screen, (0, 0, 200), (0, 0), 10) pg.draw.circle(screen, (200, 0, 0), (160, 120), 30) pg.draw.line(screen, (250, 250, 0), (0, 120), (160, 0)) pg.draw.circle(screen, (255, 255, 255), (i, j), 5) pg.display.flip() clock.tick(FPS) pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/sound.py0000644000175100001770000000222414676242340015737 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.sound Playing a soundfile and waiting for it to finish. You'll need the pygame.mixer module for this to work. Note how in this simple example we don't even bother loading all of the pygame package. Just pick the mixer for sound and time for the delay function. Optional command line argument: audio file name """ import os import sys import pygame as pg main_dir = os.path.split(os.path.abspath(__file__))[0] def main(file_path=None): """Play an audio file as a buffered sound sample :param str file_path: audio file (default data/secosmic_low.wav) """ # choose a desired audio format pg.mixer.init(11025) # raises exception on fail # load the sound sound = pg.mixer.Sound(file_path) # start playing print("Playing Sound...") channel = sound.play() # poll until finished while channel.get_busy(): # still playing print(" ...still going...") pg.time.wait(1000) print("...Finished") pg.quit() if __name__ == "__main__": if len(sys.argv) > 1: main(sys.argv[1]) else: main(os.path.join(main_dir, "data", "secosmic_lo.wav")) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/sound_array_demos.py0000644000175100001770000001317414676242340020332 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.sound_array_demos Creates an echo effect on any Sound object. Uses sndarray and numpy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echos and the delay. Easy for you to recreate as needed. version 2. changes: - Should work with different sample rates now. - put into a function. - Uses numpy by default, but falls back on Numeric. """ import os import pygame as pg from numpy import zeros, int32, int16 import time # pg.mixer.init(44100, -16, 0) pg.mixer.init() # pg.mixer.init(11025, -16, 0) # pg.mixer.init(11025) def make_echo(sound, samples_per_second, mydebug=True): """returns a sound which is echoed of the last one.""" echo_length = 3.5 a1 = pg.sndarray.array(sound) if mydebug: print(f"SHAPE1: {a1.shape}") length = a1.shape[0] # myarr = zeros(length+12000) myarr = zeros(a1.shape, int32) if len(a1.shape) > 1: # mult = a1.shape[1] size = (a1.shape[0] + int(echo_length * a1.shape[0]), a1.shape[1]) # size = (a1.shape[0] + int(a1.shape[0] + (echo_length * 3000)), a1.shape[1]) else: # mult = 1 size = (a1.shape[0] + int(echo_length * a1.shape[0]),) # size = (a1.shape[0] + int(a1.shape[0] + (echo_length * 3000)),) if mydebug: print(int(echo_length * a1.shape[0])) myarr = zeros(size, int32) if mydebug: print(f"size {size}") print(myarr.shape) myarr[:length] = a1 # print(myarr[3000:length+3000]) # print(a1 >> 1) # print("a1.shape %s" % (a1.shape,)) # c = myarr[3000:length+(3000*mult)] # print("c.shape %s" % (c.shape,)) incr = int(samples_per_second / echo_length) gap = length myarr[incr : gap + incr] += a1 >> 1 myarr[incr * 2 : gap + (incr * 2)] += a1 >> 2 myarr[incr * 3 : gap + (incr * 3)] += a1 >> 3 myarr[incr * 4 : gap + (incr * 4)] += a1 >> 4 if mydebug: print(f"SHAPE2: {myarr.shape}") sound2 = pg.sndarray.make_sound(myarr.astype(int16)) return sound2 def slow_down_sound(sound, rate): """returns a sound which is a slowed down version of the original. rate - at which the sound should be slowed down. eg. 0.5 would be half speed. """ raise NotImplementedError() # grow_rate = 1 / rate # make it 1/rate times longer. # a1 = pg.sndarray.array(sound) # surf = pg.surfarray.make_surface(a1) # print(a1.shape[0] * grow_rate) # scaled_surf = pg.transform.scale(surf, (int(a1.shape[0] * grow_rate), a1.shape[1])) # print(scaled_surf) # print(surf) # a2 = a1 * rate # print(a1.shape) # print(a2.shape) # print(a2) # sound2 = pg.sndarray.make_sound(a2.astype(int16)) # return sound2 def sound_from_pos(sound, start_pos, samples_per_second=None, inplace=1): """returns a sound which begins at the start_pos. start_pos - in seconds from the beginning. samples_per_second - """ # see if we want to reuse the sound data or not. if inplace: a1 = pg.sndarray.samples(sound) else: a1 = pg.sndarray.array(sound) # see if samples per second has been given. If not, query the pg.mixer. # eg. it might be set to 22050 if samples_per_second is None: samples_per_second = pg.mixer.get_init()[0] # figure out the start position in terms of samples. start_pos_in_samples = int(start_pos * samples_per_second) # cut the beginning off the sound at the start position. a2 = a1[start_pos_in_samples:] # make the Sound instance from the array. sound2 = pg.sndarray.make_sound(a2) return sound2 def main(): """play various sndarray effects""" main_dir = os.path.split(os.path.abspath(__file__))[0] print(f"mixer.get_init {pg.mixer.get_init()}") samples_per_second = pg.mixer.get_init()[0] print(("-" * 30) + "\n") print("loading sound") sound = pg.mixer.Sound(os.path.join(main_dir, "data", "car_door.wav")) print("-" * 30) print("start positions") print("-" * 30) start_pos = 0.1 sound2 = sound_from_pos(sound, start_pos, samples_per_second) print(f"sound.get_length {sound.get_length()}") print(f"sound2.get_length {sound2.get_length()}") sound2.play() while pg.mixer.get_busy(): pg.time.wait(200) print("waiting 2 seconds") pg.time.wait(2000) print("playing original sound") sound.play() while pg.mixer.get_busy(): pg.time.wait(200) print("waiting 2 seconds") pg.time.wait(2000) # if 0: # #TODO: this is broken. # print(("-" * 30) + "\n") # print("Slow down the original sound.") # rate = 0.2 # slowed_sound = slow_down_sound(sound, rate) # slowed_sound.play() # while pg.mixer.get_busy(): # pg.time.wait(200) print("-" * 30) print("echoing") print("-" * 30) t1 = time.time() sound2 = make_echo(sound, samples_per_second) print("time to make echo %i" % (time.time() - t1,)) print("original sound") sound.play() while pg.mixer.get_busy(): pg.time.wait(200) print("echoed sound") sound2.play() while pg.mixer.get_busy(): pg.time.wait(200) sound = pg.mixer.Sound(os.path.join(main_dir, "data", "secosmic_lo.wav")) t1 = time.time() sound3 = make_echo(sound, samples_per_second) print("time to make echo %i" % (time.time() - t1,)) print("original sound") sound.play() while pg.mixer.get_busy(): pg.time.wait(200) print("echoed sound") sound3.play() while pg.mixer.get_busy(): pg.time.wait(200) pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/sprite_texture.py0000644000175100001770000000515314676242340017701 0ustar00runnerdocker#!/usr/bin/env python """ pygame.examples.sprite_texture Experimental! Uses APIs which may disappear in the next release (_sdl2 is private). Hardware accelerated Image objects with pygame.sprite. _sdl2.video.Image is a backwards compatible way with to use Texture with pygame.sprite groups. """ import os import pygame as pg if pg.get_sdl_version()[0] < 2: raise SystemExit("This example requires pygame 2 and SDL2.") from pygame._sdl2 import Window, Texture, Image, Renderer data_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], "data") def load_img(file): return pg.image.load(os.path.join(data_dir, file)) pg.display.init() pg.key.set_repeat(10, 10) win = Window("asdf", resizable=True) renderer = Renderer(win) tex = Texture.from_surface(renderer, load_img("alien1.gif")) class Something(pg.sprite.Sprite): def __init__(self, img): pg.sprite.Sprite.__init__(self) self.rect = img.get_rect() self.image = img self.rect.w *= 5 self.rect.h *= 5 img.origin = self.rect.w / 2, self.rect.h / 2 sprite = Something(Image(tex, (0, 0, tex.width / 2, tex.height / 2))) sprite.rect.x = 250 sprite.rect.y = 50 # sprite2 = Something(Image(sprite.image)) sprite2 = Something(Image(tex)) sprite2.rect.x = 250 sprite2.rect.y = 250 sprite2.rect.w /= 2 sprite2.rect.h /= 2 group = pg.sprite.Group() group.add(sprite2) group.add(sprite) import math t = 0 running = True clock = pg.time.Clock() renderer.draw_color = (255, 0, 0, 255) while running: for event in pg.event.get(): if event.type == pg.QUIT: running = False elif event.type == pg.KEYDOWN: if event.key == pg.K_ESCAPE: running = False elif event.key == pg.K_LEFT: sprite.rect.x -= 5 elif event.key == pg.K_RIGHT: sprite.rect.x += 5 elif event.key == pg.K_DOWN: sprite.rect.y += 5 elif event.key == pg.K_UP: sprite.rect.y -= 5 renderer.clear() t += 1 img = sprite.image img.angle += 1 try: img.flip_x = t % 50 < 25 img.flip_y = t % 100 < 50 except AttributeError: # backwards compatibility for <=2.1.2 img.flipX = t % 50 < 25 img.flipY = t % 100 < 50 img.color[0] = int(255.0 * (0.5 + math.sin(0.5 * t + 10.0) / 2.0)) img.alpha = int(255.0 * (0.5 + math.sin(0.1 * t) / 2.0)) # img.draw(dstrect=(x, y, 5 * img.srcrect['w'], 5 * img.srcrect['h'])) group.draw(renderer) renderer.present() clock.tick(60) win.title = str(f"FPS: {clock.get_fps()}") pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/stars.py0000644000175100001770000000523214676242340015745 0ustar00runnerdocker#!/usr/bin/env python """ pg.examples.stars We are all in the gutter, but some of us are looking at the stars. -- Oscar Wilde A simple starfield example. Note you can move the 'center' of the starfield by leftclicking in the window. This example show the basics of creating a window, simple pixel plotting, and input event management. """ import random import math import pygame as pg # constants WINSIZE = [640, 480] WINCENTER = [320, 240] NUMSTARS = 150 def init_star(steps=-1): "creates new star values" dir = random.randrange(100000) steps_velocity = 1 if steps == -1 else steps * 0.09 velmult = steps_velocity * (random.random() * 0.6 + 0.4) vel = [math.sin(dir) * velmult, math.cos(dir) * velmult] if steps is None: return [vel, [WINCENTER[0] + (vel[0] * steps), WINCENTER[1] + (vel[1] * steps)]] return [vel, WINCENTER[:]] def initialize_stars(): "creates a new starfield" random.seed() stars = [init_star(steps=random.randint(0, WINCENTER[0])) for _ in range(NUMSTARS)] move_stars(stars) return stars def draw_stars(surface, stars, color): "used to draw (and clear) the stars" for _, pos in stars: pos = (int(pos[0]), int(pos[1])) surface.set_at(pos, color) def move_stars(stars): "animate the star values" for vel, pos in stars: pos[0] = pos[0] + vel[0] pos[1] = pos[1] + vel[1] if not 0 <= pos[0] <= WINSIZE[0] or not 0 <= pos[1] <= WINSIZE[1]: vel[:], pos[:] = init_star() else: vel[0] = vel[0] * 1.05 vel[1] = vel[1] * 1.05 def main(): "This is the starfield code" # create our starfield stars = initialize_stars() # initialize and prepare screen pg.init() screen = pg.display.set_mode(WINSIZE) pg.display.set_caption("pygame Stars Example") white = 255, 240, 200 black = 20, 20, 40 screen.fill(black) clock = pg.time.Clock() # main game loop done = 0 while not done: draw_stars(screen, stars, black) move_stars(stars) draw_stars(screen, stars, white) pg.display.update() for e in pg.event.get(): if e.type == pg.QUIT or (e.type == pg.KEYUP and e.key == pg.K_ESCAPE): done = 1 break if e.type == pg.MOUSEBUTTONDOWN and e.button == 1: WINCENTER[:] = list(e.pos) clock.tick(50) pg.quit() # So `python -m pygame.example.stars` will work. if __name__ == "__main__": main() # I prefer the time of insects to the time of stars. # # -- Wisława Szymborska ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/testsprite.py0000644000175100001770000001531614676242340017023 0ustar00runnerdocker#!/usr/bin/env python """ pg.examples.testsprite Like the testsprite.c that comes with libsdl, this pygame version shows lots of sprites moving around. It is an abomination of ugly code, and mostly used for testing. See pg.examples.aliens for some prettyier code. """ import sys import os from random import randint from time import time from typing import List import pygame as pg main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") # use this to use update rects or not. # If the screen is mostly full, then update rects are not useful. update_rects = True if "-update_rects" in sys.argv: update_rects = True if "-noupdate_rects" in sys.argv: update_rects = False use_static = False if "-static" in sys.argv: use_static = True use_layered_dirty = False if "-layered_dirty" in sys.argv: update_rects = True use_layered_dirty = True flags = 0 if "-flip" in sys.argv: flags ^= pg.DOUBLEBUF if "-fullscreen" in sys.argv: flags ^= pg.FULLSCREEN if "-sw" in sys.argv: flags ^= pg.SWSURFACE use_rle = True if "-hw" in sys.argv: flags ^= pg.HWSURFACE use_rle = False if "-scaled" in sys.argv: flags ^= pg.SCALED screen_dims = [640, 480] if "-height" in sys.argv: i = sys.argv.index("-height") screen_dims[1] = int(sys.argv[i + 1]) if "-width" in sys.argv: i = sys.argv.index("-width") screen_dims[0] = int(sys.argv[i + 1]) use_alpha = "-alpha" in sys.argv print(screen_dims) ##class Thingy(pg.sprite.Sprite): ## images = None ## def __init__(self): ## pg.sprite.Sprite.__init__(self) ## self.image = Thingy.images[0] ## self.rect = self.image.get_rect() ## self.rect.x = randint(0, screen_dims[0]) ## self.rect.y = randint(0, screen_dims[1]) ## #self.vel = [randint(-10, 10), randint(-10, 10)] ## self.vel = [randint(-1, 1), randint(-1, 1)] ## ## def move(self): ## for i in [0, 1]: ## nv = self.rect[i] + self.vel[i] ## if nv >= screen_dims[i] or nv < 0: ## self.vel[i] = -self.vel[i] ## nv = self.rect[i] + self.vel[i] ## self.rect[i] = nv class Thingy(pg.sprite.DirtySprite): images: List[pg.Surface] = [] def __init__(self): ## pg.sprite.Sprite.__init__(self) pg.sprite.DirtySprite.__init__(self) self.image = Thingy.images[0] self.rect = self.image.get_rect() self.rect.x = randint(0, screen_dims[0]) self.rect.y = randint(0, screen_dims[1]) # self.vel = [randint(-10, 10), randint(-10, 10)] self.vel = [randint(-1, 1), randint(-1, 1)] self.dirty = 2 def update(self, *args, **kwargs): for i in [0, 1]: nv = self.rect[i] + self.vel[i] if nv >= screen_dims[i] or nv < 0: self.vel[i] = -self.vel[i] nv = self.rect[i] + self.vel[i] self.rect[i] = nv class Static(pg.sprite.DirtySprite): images: List[pg.Surface] = [] def __init__(self): pg.sprite.DirtySprite.__init__(self) self.image = Static.images[0] self.rect = self.image.get_rect() self.rect.x = randint(0, 3 * screen_dims[0] // 4) self.rect.y = randint(0, 3 * screen_dims[1] // 4) def main( update_rects=True, use_static=False, use_layered_dirty=False, screen_dims=(640, 480), use_alpha=False, flags=0, ): """Show lots of sprites moving around Optional keyword arguments: update_rects - use the RenderUpdate sprite group class (default True) use_static - include non-moving images (default False) use_layered_dirty - Use the FastRenderGroup sprite group (default False) screen_dims - Pygame window dimensions (default [640, 480]) use_alpha - use alpha blending (default False) flags - additional display mode flags (default no additional flags) """ if use_layered_dirty: update_rects = True pg.init() # needed to initialise time module for get_ticks() pg.display.init() # if "-fast" in sys.argv: screen = pg.display.set_mode(screen_dims, flags, vsync="-vsync" in sys.argv) # this is mainly for GP2X, so it can quit. pg.joystick.init() num_joysticks = pg.joystick.get_count() if num_joysticks > 0: stick = pg.joystick.Joystick(0) stick.init() # now we will receive events for the joystick screen.fill([0, 0, 0]) pg.display.flip() sprite_surface = pg.image.load(os.path.join(data_dir, "asprite.bmp")) sprite_surface2 = pg.image.load(os.path.join(data_dir, "static.png")) if use_rle: sprite_surface.set_colorkey([0xFF, 0xFF, 0xFF], pg.SRCCOLORKEY | pg.RLEACCEL) sprite_surface2.set_colorkey([0xFF, 0xFF, 0xFF], pg.SRCCOLORKEY | pg.RLEACCEL) else: sprite_surface.set_colorkey([0xFF, 0xFF, 0xFF], pg.SRCCOLORKEY) sprite_surface2.set_colorkey([0xFF, 0xFF, 0xFF], pg.SRCCOLORKEY) if use_alpha: sprite_surface = sprite_surface.convert_alpha() sprite_surface2 = sprite_surface2.convert_alpha() else: sprite_surface = sprite_surface.convert() sprite_surface2 = sprite_surface2.convert() Thingy.images = [sprite_surface] if use_static: Static.images = [sprite_surface2] if len(sys.argv) > 1: try: numsprites = int(sys.argv[-1]) except Exception: numsprites = 100 else: numsprites = 100 sprites = None if use_layered_dirty: ## sprites = pg.sprite.FastRenderGroup() sprites = pg.sprite.LayeredDirty() else: if update_rects: sprites = pg.sprite.RenderUpdates() else: sprites = pg.sprite.Group() for i in range(0, numsprites): if use_static and i % 2 == 0: sprites.add(Static()) sprites.add(Thingy()) frames = 0 start = time() background = pg.Surface(screen.get_size()) background = background.convert() background.fill([0, 0, 0]) going = True while going: if not update_rects: screen.fill([0, 0, 0]) ## for sprite in sprites: ## sprite.move() if update_rects: sprites.clear(screen, background) sprites.update() rects = sprites.draw(screen) if update_rects: pg.display.update(rects) else: pg.display.flip() for event in pg.event.get(): if event.type in [pg.QUIT, pg.KEYDOWN, pg.QUIT, pg.JOYBUTTONDOWN]: going = False frames += 1 end = time() print(f"FPS: {frames / (end - start):f}") pg.quit() if __name__ == "__main__": main(update_rects, use_static, use_layered_dirty, screen_dims, use_alpha, flags) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/textinput.py0000644000175100001770000001663314676242340016664 0ustar00runnerdocker#!/usr/bin/env python """ pg.examples.textinput A little "console" where you can write in text. Shows how to use the TEXTEDITING and TEXTINPUT events. """ import sys import os from typing import List import pygame import pygame as pg import pygame.freetype as freetype # This environment variable is important # If not added the candidate list will not show os.environ["SDL_IME_SHOW_UI"] = "1" class TextInput: """ A simple TextInput class that allows you to receive inputs in pygame. """ # Add font name for each language, # otherwise some text can't be correctly displayed. FONT_NAMES = ",".join( str(x) for x in [ "notosanscjktcregular", "notosansmonocjktcregular", "notosansregular,", "microsoftjhengheimicrosoftjhengheiuilight", "microsoftyaheimicrosoftyaheiuilight", "msgothicmsuigothicmspgothic", "msmincho", "Arial", ] ) def __init__( self, prompt: str, pos, screen_dimensions, print_event: bool, text_color="white" ) -> None: self.prompt = prompt self.print_event = print_event # position of chatlist and chatbox self.CHAT_LIST_POS = pg.Rect((pos[0], pos[1] + 50), (screen_dimensions[0], 400)) self.CHAT_BOX_POS = pg.Rect(pos, (screen_dimensions[1], 40)) self.CHAT_LIST_MAXSIZE = 20 self._ime_editing = False self._ime_text = "" self._ime_text_pos = 0 self._ime_editing_text = "" self._ime_editing_pos = 0 self.chat_list: List[str] = [] # Freetype # The font name can be a comma separated list # of font names to search for. self.font = freetype.SysFont(self.FONT_NAMES, 24) self.font_small = freetype.SysFont(self.FONT_NAMES, 16) self.text_color = text_color print("Using font: " + self.font.name) def update(self, events) -> None: """ Updates the text input widget """ for event in events: if event.type == pg.KEYDOWN: if self.print_event: print(event) if self._ime_editing: if len(self._ime_editing_text) == 0: self._ime_editing = False continue if event.key == pg.K_BACKSPACE: if len(self._ime_text) > 0 and self._ime_text_pos > 0: self._ime_text = ( self._ime_text[0 : self._ime_text_pos - 1] + self._ime_text[self._ime_text_pos :] ) self._ime_text_pos = max(0, self._ime_text_pos - 1) elif event.key == pg.K_DELETE: self._ime_text = ( self._ime_text[0 : self._ime_text_pos] + self._ime_text[self._ime_text_pos + 1 :] ) elif event.key == pg.K_LEFT: self._ime_text_pos = max(0, self._ime_text_pos - 1) elif event.key == pg.K_RIGHT: self._ime_text_pos = min( len(self._ime_text), self._ime_text_pos + 1 ) # Handle ENTER key elif event.key in [pg.K_RETURN, pg.K_KP_ENTER]: # Block if we have no text to append if len(self._ime_text) == 0: continue # Append chat list self.chat_list.append(self._ime_text) if len(self.chat_list) > self.CHAT_LIST_MAXSIZE: self.chat_list.pop(0) self._ime_text = "" self._ime_text_pos = 0 elif event.type == pg.TEXTEDITING: if self.print_event: print(event) self._ime_editing = True self._ime_editing_text = event.text self._ime_editing_pos = event.start elif event.type == pg.TEXTINPUT: if self.print_event: print(event) self._ime_editing = False self._ime_editing_text = "" self._ime_text = ( self._ime_text[0 : self._ime_text_pos] + event.text + self._ime_text[self._ime_text_pos :] ) self._ime_text_pos += len(event.text) def draw(self, screen: pygame.Surface) -> None: """ Draws the text input widget onto the provided surface """ # Chat List updates chat_height = self.CHAT_LIST_POS.height / self.CHAT_LIST_MAXSIZE for i, chat in enumerate(self.chat_list): self.font_small.render_to( screen, (self.CHAT_LIST_POS.x, self.CHAT_LIST_POS.y + i * chat_height), chat, self.text_color, ) # Chat box updates start_pos = self.CHAT_BOX_POS.copy() ime_text_l = self.prompt + self._ime_text[0 : self._ime_text_pos] ime_text_m = ( self._ime_editing_text[0 : self._ime_editing_pos] + "|" + self._ime_editing_text[self._ime_editing_pos :] ) ime_text_r = self._ime_text[self._ime_text_pos :] rect_text_l = self.font.render_to( screen, start_pos, ime_text_l, self.text_color ) start_pos.x += rect_text_l.width # Editing texts should be underlined rect_text_m = self.font.render_to( screen, start_pos, ime_text_m, self.text_color, None, freetype.STYLE_UNDERLINE, ) start_pos.x += rect_text_m.width self.font.render_to(screen, start_pos, ime_text_r, self.text_color) class Game: """ A class that handles the game's events, mainloop etc. """ # CONSTANTS # Frames per second, the general speed of the program FPS = 50 # Size of window SCREEN_WIDTH, SCREEN_HEIGHT = 640, 480 BG_COLOR = "black" def __init__(self, caption: str) -> None: # Initialize pg.init() self.screen = pg.display.set_mode((self.SCREEN_WIDTH, self.SCREEN_HEIGHT)) pg.display.set_caption(caption) self.clock = pg.time.Clock() # Text input # Set to true or add 'showevent' in argv to see IME and KEYDOWN events self.print_event = "showevent" in sys.argv self.text_input = TextInput( prompt="> ", pos=(0, 20), screen_dimensions=(self.SCREEN_WIDTH, self.SCREEN_HEIGHT), print_event=self.print_event, text_color="green", ) def main_loop(self) -> None: pg.key.start_text_input() input_rect = pg.Rect(80, 80, 320, 40) pg.key.set_text_input_rect(input_rect) while True: events = pg.event.get() for event in events: if event.type == pg.QUIT: pg.quit() return self.text_input.update(events) # Screen updates self.screen.fill(self.BG_COLOR) self.text_input.draw(self.screen) pg.display.update() self.clock.tick(self.FPS) # Main loop process def main(): game = Game("Text Input Example") game.main_loop() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/vgrade.py0000644000175100001770000000627714676242340016073 0ustar00runnerdocker#!/usr/bin/env python """ pg.examples.vgrade This example demonstrates creating an image with numpy python, and displaying that through SDL. You can look at the method of importing numpy and pg.surfarray. This method will fail 'gracefully' if it is not available. I've tried mixing in a lot of comments where the code might not be self explanatory, nonetheless it may still seem a bit strange. Learning to use numpy for images like this takes a bit of learning, but the payoff is extremely fast image manipulation in python. For Pygame 1.9.2 and up, this example also showcases a new feature of surfarray.blit_surface: array broadcasting. If a source array has either a width or height of 1, the array is repeatedly blitted to the surface along that dimension to fill the surface. In fact, a (1, 1) or (1, 1, 3) array results in a simple surface color fill. Just so you know how this breaks down. For each sampling of time, 30% goes to each creating the gradient and blitting the array. The final 40% goes to flipping/updating the display surface The window will have no border decorations. The code also demonstrates use of the timer events. """ import os import pygame as pg try: import numpy as np import numpy.random as np_random except ImportError: raise SystemExit("This example requires numpy and the pygame surfarray module") timer = 0 def stopwatch(message=None): "simple routine to time python code" global timer if not message: timer = pg.time.get_ticks() return now = pg.time.get_ticks() runtime = (now - timer) / 1000.0 + 0.001 print(f"{message} {runtime} seconds\t{(1.0 / runtime):.2f}fps") timer = now def VertGradientColumn(surf, topcolor, bottomcolor): "creates a new 3d vertical gradient array" topcolor = np.array(topcolor, copy=False) bottomcolor = np.array(bottomcolor, copy=False) diff = bottomcolor - topcolor width, height = surf.get_size() # create array from 0.0 to 1.0 triplets column = np.arange(height, dtype="float") / height column = np.repeat(column[:, np.newaxis], [3], 1) # create a single column of gradient column = topcolor + (diff * column).astype("int") # make the column a 3d image column by adding X column = column.astype("uint8")[np.newaxis, :, :] # 3d array into 2d array return pg.surfarray.map_array(surf, column) def DisplayGradient(surf): "choose random colors and show them" stopwatch() colors = np_random.randint(0, 255, (2, 3)) column = VertGradientColumn(surf, colors[0], colors[1]) pg.surfarray.blit_array(surf, column) pg.display.flip() stopwatch("Gradient:") def main(): pg.init() pg.mixer.quit() # remove ALSA underflow messages for Debian squeeze size = 600, 400 os.environ["SDL_VIDEO_CENTERED"] = "1" screen = pg.display.set_mode(size, pg.NOFRAME, 0) pg.event.set_blocked(pg.MOUSEMOTION) # keep our queue cleaner pg.time.set_timer(pg.USEREVENT, 500) while True: event = pg.event.wait() if event.type in (pg.QUIT, pg.KEYDOWN, pg.MOUSEBUTTONDOWN): break elif event.type == pg.USEREVENT: DisplayGradient(screen) pg.quit() if __name__ == "__main__": main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/examples/video.py0000644000175100001770000001040514676242340015715 0ustar00runnerdocker#!/usr/bin/env python """ pg.examples.video Experimental! * dialog message boxes with messagebox. * multiple windows with Window * driver selection * Renderer, Texture, and Image classes * Drawing lines, rects, and such onto Renderers. """ import os import pygame as pg from pygame._sdl2 import Window, Texture, Image, Renderer, get_drivers, messagebox data_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], "data") def load_img(file): return pg.image.load(os.path.join(data_dir, file)) pg.display.init() pg.key.set_repeat(1000, 10) for driver in get_drivers(): print(driver) import random try: answer = messagebox( "I will open two windows! Continue?", "Hello!", info=True, buttons=("Yes", "No", "Chance"), return_button=0, escape_button=1, ) if answer == 1 or (answer == 2 and random.random() < 0.5): import sys sys.exit(0) except: pass win = Window("asdf", resizable=True) renderer = Renderer(win) tex = Texture.from_surface(renderer, load_img("alien1.gif")) img = Image(tex) running = True x, y = 250, 50 clock = pg.time.Clock() backgrounds = [(255, 0, 0, 255), (0, 255, 0, 255), (0, 0, 255, 255)] bg_index = 0 renderer.draw_color = backgrounds[bg_index] win2 = Window("2nd window", size=(256, 256), always_on_top=True) win2.opacity = 0.5 win2.set_icon(load_img("bomb.gif")) renderer2 = Renderer(win2) tex2 = Texture.from_surface(renderer2, load_img("asprite.bmp")) renderer2.clear() tex2.draw() renderer2.present() del tex2 full = 0 surf = pg.Surface((64, 64)) streamtex = Texture(renderer, (64, 64), streaming=True) tex_update_interval = 1000 next_tex_update = pg.time.get_ticks() while running: for event in pg.event.get(): if event.type == pg.QUIT: running = False elif getattr(event, "window", None) == win2: if ( event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE or event.type == pg.WINDOWCLOSE ): win2.destroy() elif event.type == pg.KEYDOWN: if event.key == pg.K_ESCAPE: running = False elif event.key == pg.K_LEFT: x -= 5 elif event.key == pg.K_RIGHT: x += 5 elif event.key == pg.K_DOWN: y += 5 elif event.key == pg.K_UP: y -= 5 elif event.key == pg.K_f: if full == 0: win.set_fullscreen(True) full = 1 else: win.set_windowed() full = 0 elif event.key == pg.K_s: readsurf = renderer.to_surface() pg.image.save(readsurf, "test.png") elif event.key == pg.K_SPACE: bg_index = (bg_index + 1) % len(backgrounds) renderer.draw_color = backgrounds[bg_index] renderer.clear() # update texture curtime = pg.time.get_ticks() if curtime >= next_tex_update: for x_ in range(streamtex.width // 4): for y_ in range(streamtex.height // 4): newcol = ( random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 255, ) area = (4 * x_, 4 * y_, 4, 4) surf.fill(newcol, area) streamtex.update(surf) next_tex_update = curtime + tex_update_interval streamtex.draw(dstrect=pg.Rect(64, 128, 64, 64)) img.draw(dstrect=(x, y)) # TODO: should these be? # - line instead of draw_line # - point instead of draw_point # - rect(rect, width=1)->draw 1 pixel, instead of draw_rect # - rect(rect, width=0)->filled ? , instead of fill_rect # # TODO: should these work with pg.draw.line(renderer, ...) functions? renderer.draw_color = (255, 255, 255, 255) renderer.draw_line((0, 0), (64, 64)) renderer.draw_line((64, 64), (128, 0)) renderer.draw_point((72, 32)) renderer.draw_rect(pg.Rect(0, 64, 64, 64)) renderer.fill_rect(pg.Rect(0, 128, 64, 64)) renderer.draw_color = backgrounds[bg_index] renderer.present() clock.tick(60) win.title = str(f"FPS: {clock.get_fps()}") pg.quit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/setup.cfg0000644000175100001770000000345514676242340014247 0ustar00runnerdocker[tox:tox] envlist = py{36,37,38,39,310,311,312} skip_missing_interpreters = True skipsdist = True [testenv] deps = numpy setenv = SDL_AUDIODRIVER=disk SDL_VIDEODRIVER=dummy passenv = PORTMIDI_INC_PORTTIME commands = python -m buildconfig -auto pip install . python -m pygame.tests [options.entry_points] pyinstaller40 = hook-dirs = pygame.__pyinstaller:get_hook_dirs # ignore-words-list is a comma-separated list of lowercase words to be # ignored by codespell. Typos should be fixed but for instance Mechanim # is the name of a software product so we want codespell to ignore that. [codespell] skip = ./docs/es/*,./src_c/*,setup.py,*.json ignore-words-list = ags,ans,appen,datas,fo,likey,mechanim,nd,nin,nnumber,paeth,pevents,rocess,statics,testin quiet-level = 35 [isort] include_trailing_comma = True known_first_party = pygame known_third_party = numpy, distutils, setuptools, sphinx line_length = 88 multi_line_output = 3 src_paths = src_py [pylint.MESSAGES CONTROL] extension-pkg-whitelist=pygame enable= use-symbolic-message-instead, disable= attribute-defined-outside-init, broad-except, duplicate-code, empty-docstring, fixme, global-statement, global-variable-undefined, import-error, import-outside-toplevel, invalid-name, missing-docstring, no-member, protected-access, raise-missing-from, redefined-builtin, redefined-outer-name, super-with-arguments, too-few-public-methods, too-many-arguments, too-many-branches, too-many-instance-attributes, too-many-lines, too-many-locals, undefined-all-variable, undefined-variable, unused-import, # False positive because there are no __all__ sometime. useless-object-inheritance, wrong-import-order, wrong-import-position, ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.001112 pygame-2.6.1/setup.py0000644000175100001770000010376014676242340014140 0ustar00runnerdocker#!/usr/bin/env python # # This is the distutils setup script for pygame. # Full instructions are in https://www.pygame.org/wiki/GettingStarted # # To configure, compile, install, just run this script. # python setup.py install import glob import platform import sysconfig import warnings warnings.filterwarnings("ignore") with open('README.rst', encoding='utf-8') as readme: LONG_DESCRIPTION = readme.read() EXTRAS = {} METADATA = { "name": "pygame", "version": "2.6.1", "license": "LGPL", "url": "https://www.pygame.org", "author": "A community project.", "author_email": "pygame@pygame.org", "description": "Python Game Development", "long_description": LONG_DESCRIPTION, "long_description_content_type": "text/x-rst", "project_urls": { "Documentation": "https://pygame.org/docs", "Bug Tracker": "https://github.com/pygame/pygame/issues", "Source": "https://github.com/pygame/pygame", "Twitter": "https://twitter.com/pygame_org", }, "classifiers": [ "Development Status :: 6 - Mature", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Assembly", "Programming Language :: C", "Programming Language :: Cython", "Programming Language :: Objective C", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Games/Entertainment", "Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio :: MIDI", "Topic :: Multimedia :: Sound/Audio :: Players", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Multimedia :: Graphics :: Viewers", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Operating System :: MacOS", ], "python_requires": '>=3.6', } import re import sys import os # just import these always and fail early if not present from setuptools import setup import distutils if os.environ.get('PYGAME_DETECT_AVX2', '') != '': import distutils.ccompiler avx2_filenames = ['simd_blitters_avx2'] compiler_options = { 'unix': ('-mavx2',), 'msvc': ('/arch:AVX2',) } def spawn(self, cmd, **kwargs): should_use_avx2 = False # try to be thorough in detecting that we are on a platform that potentially supports AVX2 machine_name = platform.machine() if ((machine_name.startswith(("x86", "i686")) or machine_name.lower() == "amd64") and os.environ.get("MAC_ARCH") != "arm64"): should_use_avx2 = True if should_use_avx2: extra_options = compiler_options.get(self.compiler_type) if extra_options is not None: # filenames are closer to the end of command line for argument in reversed(cmd): # Check if argument contains a filename. We must check for all # possible extensions; checking for target extension is faster. if not argument.endswith(self.obj_extension): continue # check for a filename only to avoid building a new string # with variable extension for filename in avx2_filenames: off_end = -len(self.obj_extension) off_start = -len(filename) + off_end if argument.endswith(filename, off_start, off_end): if self.compiler_type == 'bcpp': # Borland accepts a source file name at the end, # insert the options before it cmd[-1:-1] = extra_options else: cmd += extra_options # filename is found, no need to search any further break distutils.ccompiler.spawn(cmd, dry_run=self.dry_run, **kwargs) distutils.ccompiler.CCompiler.__spawn = distutils.ccompiler.CCompiler.spawn distutils.ccompiler.CCompiler.spawn = spawn # A (bit hacky) fix for https://github.com/pygame/pygame/issues/2613 # This is due to the fact that distutils uses command line args to # export PyInit_* functions on windows, but those functions are already exported # and that is why compiler gives warnings from distutils.command.build_ext import build_ext build_ext.get_export_symbols = lambda self, ext: [] IS_PYPY = '__pypy__' in sys.builtin_module_names IS_MSC = sys.platform == "win32" and "MSC" in sys.version def compilation_help(): """ On failure point people to a web page for help. """ the_system = platform.system() if the_system == 'Linux': distro_name = '' try: import distro distro_name = distro.id() except ImportError: if hasattr(platform, 'linux_distribution'): distro_name = platform.linux_distribution()[0].lower() if distro_name != '': distro_mapping = { 'ubuntu': 'Ubuntu', 'debian': 'Debian', 'slackware': 'Slackware', 'fedora': 'Fedora', } the_system = distro_mapping.get(distro_name, the_system) help_urls = { 'Linux': 'https://www.pygame.org/wiki/Compilation', 'Ubuntu': 'https://www.pygame.org/wiki/CompileUbuntu', 'Windows': 'https://www.pygame.org/wiki/CompileWindows', 'Darwin': 'https://www.pygame.org/wiki/MacCompile', 'RedHat': 'https://www.pygame.org/wiki/CompileRedHat', 'Fedora': 'https://www.pygame.org/wiki/CompileFedora', # TODO There is nothing in the following pages yet 'Suse': 'https://www.pygame.org/wiki/CompileSuse', 'Python (from pypy.org)': 'https://www.pygame.org/wiki/CompilePyPy', 'Free BSD': 'https://www.pygame.org/wiki/CompileFreeBSD', 'Debian': 'https://www.pygame.org/wiki/CompileDebian', 'Slackware': 'https://www.pygame.org/wiki/CompileSlackware', } default = 'https://www.pygame.org/wiki/Compilation' url = help_urls.get(the_system, default) if IS_PYPY: url += '\n https://www.pygame.org/wiki/CompilePyPy' print('\n---') print('For help with compilation see:') print(f' {url}') print('To contribute to pygame development see:') print(' https://www.pygame.org/contribute.html') print('---\n') if not hasattr(sys, 'version_info') or sys.version_info < (3, 6): compilation_help() raise SystemExit("Pygame requires Python3 version 3.6 or above.") if IS_PYPY and sys.pypy_version_info < (7,): raise SystemExit("Pygame requires PyPy version 7.0.0 above, compatible with CPython >= 3.6") def consume_arg(name): if name in sys.argv: sys.argv.remove(name) return True return False # get us to the correct directory path = os.path.split(os.path.abspath(sys.argv[0]))[0] os.chdir(path) STRIPPED = False # STRIPPED builds don't have developer resources like docs or tests if "PYGAME_ANDROID" in os.environ: # test cases and docs are useless inside an APK STRIPPED = True if consume_arg('-stripped'): STRIPPED = True enable_arm_neon = False if consume_arg('-enable-arm-neon'): enable_arm_neon = True cflags = os.environ.get('CFLAGS', '') if cflags: cflags += ' ' cflags += '-mfpu=neon' os.environ['CFLAGS'] = cflags compile_cython = False cython_only = False if consume_arg('cython'): compile_cython = True if consume_arg('cython_only'): compile_cython = True cython_only = True # If there is no generated C code, compile the cython/.pyx files if any(x in ["build_ext", "build", "sdist", "bdist_wheel", "install"] for x in sys.argv) and ( not glob.glob(os.path.join("src_c", "_sdl2", "audio.c")) or not glob.glob(os.path.join("src_c", "pypm.c")) ): compile_cython = True print ("Compiling Cython files") else: print ("Skipping Cython compilation") if compile_cython: if "setup_requires" not in METADATA: METADATA["setup_requires"] = [] # We require Cython if there is no generated source code. METADATA["setup_requires"].append('cython>=3.0') if compile_cython: # compile .pyx files # So you can `setup.py cython` or `setup.py cython install` try: from Cython.Build.Dependencies import cythonize_one except ImportError: print("You need cython. https://cython.org/, python -m pip install cython --user") sys.exit(1) from Cython.Build.Dependencies import create_extension_list from Cython.Build.Dependencies import create_dependency_tree try: from Cython.Compiler.Main import Context from Cython.Compiler.Options import CompilationOptions, default_options c_options = CompilationOptions(default_options) ctx = Context.from_options(c_options) except ImportError: from Cython.Compiler.Main import Context, CompilationOptions, default_options c_options = CompilationOptions(default_options) ctx = c_options.create_context() pyx_files = glob.glob(os.path.join('src_c', 'cython', 'pygame', '*.pyx')) + \ glob.glob(os.path.join('src_c', 'cython', 'pygame', '**', '*.pyx')) pyx_files, pyx_meta = create_extension_list(pyx_files, ctx=ctx) deps = create_dependency_tree(ctx) queue = [] for ext in pyx_files: pyx_file = ext.sources[0] # TODO: check all sources, extension c_file = os.path.splitext(pyx_file)[0].split(os.path.sep) del c_file[1:3] # output in src_c/ c_file = os.path.sep.join(c_file) + '.c' # update outdated .c files if os.path.isfile(c_file): c_timestamp = os.path.getmtime(c_file) if c_timestamp < deps.timestamp(pyx_file): dep_timestamp, dep = deps.timestamp(pyx_file), pyx_file priority = 0 else: dep_timestamp, dep = deps.newest_dependency(pyx_file) priority = 2 - (dep in deps.immediate_dependencies(pyx_file)) if dep_timestamp > c_timestamp: outdated = True else: outdated = False else: outdated = True priority = 0 if outdated: print(f'Compiling {pyx_file} because it changed.') queue.append((priority, dict(pyx_file=pyx_file, c_file=c_file, fingerprint=None, quiet=False, options=c_options, full_module_name=ext.name, embedded_metadata=pyx_meta.get(ext.name)))) # compile in right order queue.sort(key=lambda a: a[0]) queue = [pair[1] for pair in queue] count = len(queue) for i, kwargs in enumerate(queue): kwargs['progress'] = f'[{i + 1}/{count}] ' cythonize_one(**kwargs) if cython_only: sys.exit(0) no_compilation = 'docs' in sys.argv AUTO_CONFIG = not os.path.isfile('Setup') and not no_compilation if consume_arg('-auto'): AUTO_CONFIG = True import os.path, glob, stat, shutil import distutils.sysconfig from distutils.core import setup, Command from distutils.extension import read_setup_file from distutils.command.install_data import install_data from distutils.command.sdist import sdist revision = '' def add_datafiles(data_files, dest_dir, pattern): """Add directory structures to data files according to a pattern""" src_dir, elements = pattern def do_directory(root_dest_path, root_src_path, elements): files = [] for e in elements: if isinstance(e, list): src_dir, elems = e dest_path = '/'.join([root_dest_path, src_dir]) src_path = os.path.join(root_src_path, src_dir) do_directory(dest_path, src_path, elems) else: files.extend(glob.glob(os.path.join(root_src_path, e))) if files: data_files.append((root_dest_path, files)) do_directory(dest_dir, src_dir, elements) # # allow optionally using setuptools for bdist_egg. # if consume_arg("-setuptools") in sys.argv: # from setuptools import setup # sys.argv.remove ("-setuptools") # we need to eat this argument in to distutils doesn't trip over it consume_arg("-setuptools") # NOTE: the bdist_mpkg_support is for darwin. try: import bdist_mpkg_support except ImportError: pass else: EXTRAS.update({ 'options': bdist_mpkg_support.options, 'setup_requires': ['bdist_mpkg>=0.4.2'], # 'install_requires': ['pyobjc'], # 'dependency_links': ['http://rene.f0o.com/~rene/stuff/macosx/'] }) # headers to install headers = glob.glob(os.path.join('src_c', '*.h')) headers.remove(os.path.join('src_c', 'scale.h')) headers.append(os.path.join('src_c', 'include')) import distutils.command.install_headers # monkey patch distutils header install to copy over directories def run_install_headers(self): headers = self.distribution.headers if not headers: return self.mkpath(self.install_dir) for header in headers: if os.path.isdir(header): destdir = os.path.join(self.install_dir, os.path.basename(header)) self.mkpath(destdir) for entry in os.listdir(header): header1 = os.path.join(header, entry) if not os.path.isdir(header1): (out, _) = self.copy_file(header1, destdir) self.outfiles.append(out) else: (out, _) = self.copy_file(header, self.install_dir) self.outfiles.append(out) distutils.command.install_headers.install_headers.run = run_install_headers # option for not installing the headers. if consume_arg("-noheaders"): headers = [] # sanity check for any arguments if len(sys.argv) == 1 and sys.stdout.isatty(): reply = input('\nNo Arguments Given, Perform Default Install? [Y/n]') if not reply or reply[0].lower() != 'n': sys.argv.append('install') # make sure there is a Setup file if AUTO_CONFIG: print('\n\nWARNING, No "Setup" File Exists, Running "buildconfig/config.py"') import buildconfig.config try: buildconfig.config.main(AUTO_CONFIG) except: compilation_help() raise if '-config' in sys.argv: sys.exit(0) print('\nContinuing With "setup.py"') try: s_mtime = os.stat("Setup")[stat.ST_MTIME] sin_mtime = os.stat(os.path.join('buildconfig', 'Setup.SDL2.in'))[stat.ST_MTIME] if sin_mtime > s_mtime: print('\n\nWARNING, "buildconfig/Setup.SDL2.in" newer than "Setup",' 'you might need to modify "Setup".') except OSError: pass if no_compilation: extensions = [] else: # get compile info for all extensions try: extensions = read_setup_file('Setup') except: print("""Error with the "Setup" file, perhaps make a clean copy from "Setup.in".""") compilation_help() raise for e in extensions: # Only define the ARM_NEON defines if they have been enabled at build time. if enable_arm_neon: e.define_macros.append(('PG_ENABLE_ARM_NEON', '1')) e.extra_compile_args.extend( # some warnings are skipped here ("/W3", "/wd4142", "/wd4996") if IS_MSC else ("-Wall", "-Wno-error=unknown-pragmas") ) if "surface" in e.name and sys.platform == "darwin": # skip -Werror on alphablit because sse2neon is used on arm mac continue if "rwobject" in e.name and not IS_MSC: # because Py_FileSystemDefaultEncoding is deprecated in 3.12.0a7 e.extra_compile_args.append("-Wno-error=deprecated-declarations") if "freetype" in e.name and sys.platform not in ("darwin", "win32"): # TODO: fix freetype issues here if sysconfig.get_config_var("MAINCC") != "clang": e.extra_compile_args.append("-Wno-error=unused-but-set-variable") if "mask" in e.name and IS_MSC: # skip analyze warnings that pop up a lot in mask for now. TODO fix e.extra_compile_args.extend(("/wd6385", "/wd6386")) if ( "CI" in os.environ and not e.name.startswith("_sdl2") and e.name not in ("pypm", "_sprite", "gfxdraw") ): # Do -Werror only on CI, and exclude -Werror on Cython C files and gfxdraw e.extra_compile_args.append("/WX" if IS_MSC else "-Wundef") # if not building font, try replacing with ftfont alternate_font = os.path.join('src_py', 'font.py') if os.path.exists(alternate_font): os.remove(alternate_font) have_font = False have_freetype = False for e in extensions: if e.name == 'font': have_font = True if e.name == '_freetype': have_freetype = True if not have_font and have_freetype: shutil.copyfile(os.path.join('src_py', 'ftfont.py'), alternate_font) # extra files to install data_path = os.path.join(distutils.sysconfig.get_python_lib(), 'pygame') pygame_data_files = [] data_files = [('pygame', pygame_data_files)] # add *.pyi files into distribution directory stub_dir = os.path.join('buildconfig', 'stubs', 'pygame') pygame_data_files.append(os.path.join(stub_dir, 'py.typed')) type_files = glob.glob(os.path.join(stub_dir, '*.pyi')) for type_file in type_files: pygame_data_files.append(type_file) _sdl2 = glob.glob(os.path.join(stub_dir, '_sdl2', '*.pyi')) if _sdl2: _sdl2_data_files = [] data_files.append(('pygame/_sdl2', _sdl2_data_files)) for type_file in _sdl2: _sdl2_data_files.append(type_file) # add non .py files in lib directory for f in glob.glob(os.path.join('src_py', '*')): if not f[-3:] == '.py' and not f[-4:] == '.doc' and os.path.isfile(f): pygame_data_files.append(f) # We don't need to deploy tests, example code, or docs inside a game # tests/fixtures add_datafiles(data_files, 'pygame/tests', ['test', [['fixtures', [['xbm_cursors', ['*.xbm']], ['fonts', ['*.ttf', '*.otf', '*.bdf', '*.png']]]]]]) # examples add_datafiles(data_files, 'pygame/examples', ['examples', ['README.rst', ['data', ['*']]]]) # docs add_datafiles(data_files, 'pygame/docs/generated', ['docs/generated', ['*.html', # Navigation and help pages '*.txt', # License text '*.js', # For doc search 'LGPL.txt', # pygame license ['ref', # pygame reference ['*.html', # Reference pages '*.js', # Comments script '*.json']], # Comment data ['c_api', # pygame C API ['*.html']], ['tut', # Tutorials ['*.html', ['tom', ['*.html', '*.png']]]], ['_static', # Sphinx added support files ['*.css', '*.png', '*.ico', '*.js', '*.zip', '*.svg']], ['_images', # Sphinx added reST ".. image::" refs ['*.jpg', '*.png', '*.gif']], ['_sources', # Used for ref search ['*.txt', ['ref', ['*.txt']]]]]]) # generate the version module def parse_version(ver): return ', '.join(s for s in re.findall(r'\d+', ver)[0:3]) def parse_source_version(): pgh_major = -1 pgh_minor = -1 pgh_patch = -1 major_exp_search = re.compile(r'define\s+PG_MAJOR_VERSION\s+([0-9]+)').search minor_exp_search = re.compile(r'define\s+PG_MINOR_VERSION\s+([0-9]+)').search patch_exp_search = re.compile(r'define\s+PG_PATCH_VERSION\s+([0-9]+)').search pg_header = os.path.join('src_c', 'include', '_pygame.h') with open(pg_header) as f: for line in f: if pgh_major == -1: m = major_exp_search(line) if m: pgh_major = int(m.group(1)) if pgh_minor == -1: m = minor_exp_search(line) if m: pgh_minor = int(m.group(1)) if pgh_patch == -1: m = patch_exp_search(line) if m: pgh_patch = int(m.group(1)) if pgh_major == -1: raise SystemExit("_pygame.h: cannot find PG_MAJOR_VERSION") if pgh_minor == -1: raise SystemExit("_pygame.h: cannot find PG_MINOR_VERSION") if pgh_patch == -1: raise SystemExit("_pygame.h: cannot find PG_PATCH_VERSION") return (pgh_major, pgh_minor, pgh_patch) def write_version_module(pygame_version, revision): vernum = parse_version(pygame_version) src_vernum = parse_source_version() if vernum != ', '.join(str(e) for e in src_vernum): raise SystemExit("_pygame.h version differs from 'METADATA' version" ": %s vs %s" % (vernum, src_vernum)) with open(os.path.join('buildconfig', 'version.py.in')) as header_file: header = header_file.read() with open(os.path.join('src_py', 'version.py'), 'w') as version_file: version_file.write(header) version_file.write('ver = "' + pygame_version + '" # pylint: disable=invalid-name\n') version_file.write(f'vernum = PygameVersion({vernum})\n') version_file.write('rev = "' + revision + '" # pylint: disable=invalid-name\n') version_file.write('\n__all__ = ["SDL", "ver", "vernum", "rev"]\n') write_version_module(METADATA['version'], revision) # required. This will be filled if doing a Windows build. cmdclass = {} def add_command(name): def decorator(command): assert issubclass(command, distutils.cmd.Command) cmdclass[name] = command return command return decorator # try to find DLLs and copy them too (only on windows) if sys.platform == 'win32' and not 'WIN32_DO_NOT_INCLUDE_DEPS' in os.environ: from distutils.command.build_ext import build_ext # add dependency DLLs to the project lib_dependencies = {} for e in extensions: if e.name.startswith('COPYLIB_'): lib_dependencies[e.name[8:]] = e.libraries def dependencies(roots): """Return a set of dependencies for the list of library file roots The return set is a dictionary keyed on library root name with values of 1. """ root_set = {} for root in roots: try: deps = lib_dependencies[root] except KeyError: pass else: root_set[root] = 1 root_set.update(dependencies(deps)) return root_set the_dlls = {} required_dlls = {} for e in extensions: if e.name.startswith('COPYLIB_'): the_dlls[e.name[8:]] = e.library_dirs[0] else: required_dlls.update(dependencies(e.libraries)) # join the required_dlls and the_dlls keys together. lib_names = {} for lib in list(required_dlls.keys()) + list(the_dlls.keys()): lib_names[lib] = 1 for lib in lib_names.keys(): # next DLL; a distutils bug requires the paths to have Windows separators f = the_dlls[lib].replace('/', os.sep) if f == '_': print(f"WARNING, DLL for {lib} library not found.") else: pygame_data_files.append(f) if '-enable-msvc-analyze' in sys.argv: # calculate the MSVC compiler version as an int msc_pos = sys.version.find('MSC v.') msc_ver = 1900 if msc_pos != -1: msc_ver = int(sys.version[msc_pos + 6:msc_pos + 10]) print('Analyzing with MSC_VER =', msc_ver) # excluding system headers from analyze out put was only added after MSCV_VER 1913 if msc_ver >= 1913: os.environ['CAExcludePath'] = 'C:\\Program Files (x86)\\' for e in extensions: e.extra_compile_args.extend( ( "/analyze", "/wd28251", "/wd28301", ) ) if msc_ver >= 1913: e.extra_compile_args.extend( ( "/experimental:external", "/external:W0", "/external:env:CAExcludePath", ) ) def has_flag(compiler, flagname): """ Adapted from here: https://github.com/pybind/python_example/blob/master/setup.py#L37 """ from distutils.errors import CompileError import tempfile root_drive = os.path.splitdrive(sys.executable)[0] + '\\' with tempfile.NamedTemporaryFile('w', suffix='.cpp', delete=False) as f: f.write('int main (int argc, char **argv) { return 0; }') fname = f.name try: compiler.compile([fname], output_dir=root_drive, extra_postargs=[flagname]) except CompileError: return False else: try: base_file = os.path.splitext(fname)[0] obj_file = base_file + '.obj' os.remove(obj_file) except OSError: pass finally: try: os.remove(fname) except OSError: pass return True # filter flags, returns list of accepted flags def flag_filter(compiler, *flags): return [flag for flag in flags if has_flag(compiler, flag)] if IS_MSC: @add_command('build_ext') class WinBuildExt(build_ext): """This build_ext sets necessary environment variables for MinGW""" # __sdl_lib_dir is possible location of msvcrt replacement import # libraries, if they exist. Pygame module base only links to SDL so # should have the SDL library directory as its only -L option. for e in extensions: if e.name == 'base': __sdl_lib_dir = e.library_dirs[0].replace('/', os.sep) break def build_extensions(self): # Add supported optimisations flags to reduce code size with MSVC opts = flag_filter(self.compiler, "/GF", "/Gy") for extension in extensions: extension.extra_compile_args += opts build_ext.build_extensions(self) # Add the precompiled smooth scale MMX functions to transform. def replace_scale_mmx(): for e in extensions: if e.name == 'transform': if '64 bit' in sys.version: e.extra_objects.append( os.path.join('buildconfig', 'obj', 'win64', 'scale_mmx.obj')) else: e.extra_objects.append( os.path.join('buildconfig', 'obj', 'win32', 'scale_mmx.obj')) for i in range(len(e.sources)): if e.sources[i].endswith('scale_mmx.c'): del e.sources[i] return if not 'ARM64' in sys.version: replace_scale_mmx() # clean up the list of extensions for e in extensions[:]: if e.name.startswith('COPYLIB_'): extensions.remove(e) # don't compile the COPYLIBs, just clean them else: e.name = 'pygame.' + e.name # prepend package name on modules # data installer with improved intelligence over distutils # data files are copied into the project directory instead # of willy-nilly @add_command('install_data') class smart_install_data(install_data): def run(self): # need to change self.install_dir to the actual library dir install_cmd = self.get_finalized_command('install') self.install_dir = getattr(install_cmd, 'install_lib') return install_data.run(self) @add_command('sdist') class OurSdist(sdist): def initialize_options(self): sdist.initialize_options(self) # we do not want MANIFEST.in to appear in the root cluttering up things. self.template = os.path.join('buildconfig', 'MANIFEST.in') if "bdist_msi" in sys.argv: # if you are making an msi, we want it to overwrite files # we also want to include the repository revision in the file name from distutils.command import bdist_msi import msilib @add_command('bdist_msi') class bdist_msi_overwrite_on_install(bdist_msi.bdist_msi): def run(self): bdist_msi.bdist_msi.run(self) # Remove obsolete files. comp = "pygame1" # Pygame component prop = comp # Directory property records = [("surfarray.pyd", comp, "SURFAR~1.PYD|surfarray.pyd", prop, 1), ("sndarray.pyd", comp, "SNDARRAY.PYD|sndarray.pyd", prop, 1), ("camera.pyd", comp, "CAMERA.PYD|camera.pyd", prop, 1), ("color.py", comp, "COLOR.PY|color.py", prop, 1), ("color.pyc", comp, "COLOR.PYC|color.pyc", prop, 1), ("color.pyo", comp, "COLOR.PYO|color.pyo", prop, 1)] msilib.add_data(self.db, "RemoveFile", records) # Overwrite outdated files. fullname = self.distribution.get_fullname() installer_name = self.get_installer_filename(fullname) print(f"changing {installer_name} to overwrite files on install") msilib.add_data(self.db, "Property", [("REINSTALLMODE", "amus")]) self.db.Commit() def get_installer_filename(self, fullname): if revision: fullname += '-hg_' + revision return bdist_msi.bdist_msi.get_installer_filename(self, fullname) # test command. For doing 'python setup.py test' @add_command('test') class TestCommand(Command): user_options = [] def initialize_options(self): self._dir = os.getcwd() def finalize_options(self): pass def run(self): ''' runs the tests with default options. ''' import subprocess return subprocess.call([sys.executable, os.path.join('test', '__main__.py')]) @add_command('docs') class DocsCommand(Command): """ For building the pygame documentation with `python setup.py docs`. This generates html, and documentation .h header files. """ user_options = [ ( 'fullgeneration', 'f', 'Full generation. Do not use a saved environment, always read all files.' ) ] boolean_options = ['fullgeneration'] def initialize_options(self): self._dir = os.getcwd() self.fullgeneration = None def finalize_options(self): pass def run(self): ''' runs Sphinx to build the docs. ''' import subprocess print("Using python:", sys.executable) command_line = [ sys.executable, os.path.join('buildconfig', 'makeref.py') ] if self.fullgeneration: command_line.append('full_generation') if subprocess.call(command_line) != 0: raise SystemExit("Failed to build documentation") # Prune empty file lists. data_files = [(path, files) for path, files in data_files if files] # finally, # call distutils with all needed info PACKAGEDATA = { "cmdclass": cmdclass, "packages": ['pygame', 'pygame.threads', 'pygame._sdl2', 'pygame.tests', 'pygame.tests.test_utils', 'pygame.tests.run_tests__tests', 'pygame.tests.run_tests__tests.all_ok', 'pygame.tests.run_tests__tests.failures1', 'pygame.tests.run_tests__tests.incomplete', 'pygame.tests.run_tests__tests.infinite_loop', 'pygame.tests.run_tests__tests.print_stderr', 'pygame.tests.run_tests__tests.print_stdout', 'pygame.tests.run_tests__tests.incomplete_todo', 'pygame.tests.run_tests__tests.exclude', 'pygame.tests.run_tests__tests.timeout', 'pygame.tests.run_tests__tests.everything', 'pygame.docs', 'pygame.examples', 'pygame.__pyinstaller'], "package_dir": {'pygame': 'src_py', 'pygame._sdl2': 'src_py/_sdl2', 'pygame.threads': 'src_py/threads', 'pygame.tests': 'test', 'pygame.docs': 'docs', 'pygame.examples': 'examples', 'pygame.__pyinstaller': 'src_py/__pyinstaller'}, "headers": headers, "ext_modules": extensions, "data_files": data_files, "zip_safe": False, } if STRIPPED: pygame_data_files = [] data_files = [('pygame', ["src_py/freesansbold.ttf", "src_py/pygame.ico", "src_py/pygame_icon.icns", "src_py/pygame_icon.bmp", "src_py/pygame_icon_mac.bmp"])] PACKAGEDATA = { "cmdclass": cmdclass, "packages": ['pygame', 'pygame.threads', 'pygame._sdl2'], "package_dir": {'pygame': 'src_py', 'pygame._sdl2': 'src_py/_sdl2', 'pygame.threads': 'src_py/threads'}, "ext_modules": extensions, "zip_safe": False, "data_files": data_files } PACKAGEDATA.update(METADATA) PACKAGEDATA.update(EXTRAS) try: setup(**PACKAGEDATA) except: compilation_help() raise ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0561256 pygame-2.6.1/src_c/0000755000175100001770000000000014676242436013516 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/.clang-format0000644000175100001770000000076114676242340016067 0ustar00runnerdocker# PEP 7 BasedOnStyle: Google AllowShortLoopsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AlwaysBreakAfterReturnType: All AlignAfterOpenBracket: Align BreakBeforeBraces: Stroustrup ColumnLimit: 79 DerivePointerAlignment: false # These settings are mirrored in .editorconfig. Keep them in sync. IndentWidth: 4 Language: Cpp PointerAlignment: Right ReflowComments: true SpaceBeforeParens: ControlStatements SpacesInParentheses: false SortIncludes: false TabWidth: 4 UseTab: Never ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/.editorconfig0000644000175100001770000000064314676242340016170 0ustar00runnerdockerroot=true [*] end_of_line = lf insert_final_newline = true # The settings for C (*.c and *.h) files are mirrored in src_c/.clang-format. # Keep them in sync. [*.{c,h}] indent_style = space indent_size = 4 tab_width = 4 trim_trailing_whitespace = true max_line_length = 79 [*.{py,pyx}] indent_style = space indent_size = 4 charset = utf-8 file_type_emacs = python trim_trailing_whitespace = true max_line_length = 79 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0561256 pygame-2.6.1/src_c/SDL_gfx/0000755000175100001770000000000014676242436015004 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/SDL_gfx/SDL_gfxPrimitives.c0000644000175100001770000047443114676242340020521 0ustar00runnerdocker/* SDL_gfxPrimitives - Graphics primitives for SDL surfaces LGPL (c) A. Schiffler */ #include #include #include #include #include "SDL_gfxPrimitives.h" //#include "SDL_rotozoom.h" #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ #include "SDL_gfxPrimitives_font.h" #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* -===================- */ #define DEFAULT_ALPHA_PIXEL_ROUTINE #undef EXPERIMENTAL_ALPHA_PIXEL_ROUTINE /* ---- Structures */ #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief The structure passed to the internal Bresenham iterator. */ typedef struct { Sint16 x, y; int dx, dy, s1, s2, swapdir, error; Uint32 count; } SDL_gfxBresenhamIterator; /*! \brief The structure passed to the internal Murphy iterator. */ typedef struct { Uint32 color; SDL_Surface *dst; int u, v; /* delta x , delta y */ int ku, kt, kv, kd; /* loop constants */ int oct2; int quad4; Sint16 last1x, last1y, last2x, last2y, first1x, first1y, first2x, first2y, tempx, tempy; } SDL_gfxMurphyIterator; #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* ----- Defines for pixel clipping tests */ #define clip_xmin(surface) surface->clip_rect.x #define clip_xmax(surface) surface->clip_rect.x+surface->clip_rect.w-1 #define clip_ymin(surface) surface->clip_rect.y #define clip_ymax(surface) surface->clip_rect.y+surface->clip_rect.h-1 /*! \brief Internal pixel drawing - fast, no blending, no locking, clipping. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int fastPixelColorNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int bpp; Uint8 *p; /* * Honor clipping setup at pixel level */ if ((x >= clip_xmin(dst)) && (x <= clip_xmax(dst)) && (y >= clip_ymin(dst)) && (y <= clip_ymax(dst))) { /* * Get destination format */ bpp = dst->format->BytesPerPixel; p = (Uint8 *) dst->pixels + y * dst->pitch + x * bpp; switch (bpp) { case 1: *p = color; break; case 2: *(Uint16 *) p = color; break; case 3: if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { p[0] = (color >> 16) & 0xff; p[1] = (color >> 8) & 0xff; p[2] = color & 0xff; } else { p[0] = color & 0xff; p[1] = (color >> 8) & 0xff; p[2] = (color >> 16) & 0xff; } break; case 4: *(Uint32 *) p = color; break; } /* switch */ } return (0); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Internal pixel drawing - fast, no blending, no locking, no clipping. Function is faster but dangerous since no clipping check is done. Code needs to make sure we stay in surface bounds before calling. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int fastPixelColorNolockNoclip(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int bpp; Uint8 *p; /* * Get destination format */ bpp = dst->format->BytesPerPixel; p = (Uint8 *) dst->pixels + y * dst->pitch + x * bpp; switch (bpp) { case 1: *p = color; break; case 2: *(Uint16 *) p = color; break; case 3: if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { p[0] = (color >> 16) & 0xff; p[1] = (color >> 8) & 0xff; p[2] = color & 0xff; } else { p[0] = color & 0xff; p[1] = (color >> 8) & 0xff; p[2] = (color >> 16) & 0xff; } break; case 4: *(Uint32 *) p = color; break; } /* switch */ return (0); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Internal pixel drawing - fast, no blending, locking, clipping. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int fastPixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int result; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } result = fastPixelColorNolock(dst, x, y, color); /* * Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Internal pixel drawing - fast, no blending, locking, RGB input. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param r The red value of the pixel to draw. \param g The green value of the pixel to draw. \param b The blue value of the pixel to draw. \param a The alpha value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int fastPixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColor(dst, x, y, color)); } /*! \brief Internal pixel drawing - fast, no blending, no locking RGB input. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param r The red value of the pixel to draw. \param g The green value of the pixel to draw. \param b The blue value of the pixel to draw. \param a The alpha value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int fastPixelRGBANolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColorNolock(dst, x, y, color)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Internal pixel drawing function with alpha blending where input color in in destination format. Contains two alternative 32 bit alpha blending routines which can be enabled at the source level with the defines DEFAULT_ALPHA_PIXEL_ROUTINE or EXPERIMENTAL_ALPHA_PIXEL_ROUTINE. Only the bits up to the surface depth are significant in the color value. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw. \param alpha The blend factor to apply while drawing. \returns Returns 0 on success, -1 on failure. */ int _putPixelAlpha(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha) { SDL_PixelFormat *format; Uint32 Rmask, Gmask, Bmask, Amask; Uint32 Rshift, Gshift, Bshift, Ashift; Uint32 R, G, B, A; if (dst == NULL) { return (-1); } if (x >= clip_xmin(dst) && x <= clip_xmax(dst) && y >= clip_ymin(dst) && y <= clip_ymax(dst)) { format = dst->format; switch (format->BytesPerPixel) { case 1: { /* Assuming 8-bpp */ if (alpha == 255) { *((Uint8 *) dst->pixels + y * dst->pitch + x) = color; } else { Uint8 *pixel = (Uint8 *) dst->pixels + y * dst->pitch + x; SDL_Palette *palette = format->palette; SDL_Color *colors = palette->colors; SDL_Color dColor = colors[*pixel]; SDL_Color sColor = colors[color]; Uint8 dR = dColor.r; Uint8 dG = dColor.g; Uint8 dB = dColor.b; Uint8 sR = sColor.r; Uint8 sG = sColor.g; Uint8 sB = sColor.b; dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); *pixel = SDL_MapRGB(format, dR, dG, dB); } } break; case 2: { /* Probably 15-bpp or 16-bpp */ if (alpha == 255) { *((Uint16 *) dst->pixels + y * dst->pitch / 2 + x) = color; } else { Uint16 *pixel = (Uint16 *) dst->pixels + y * dst->pitch / 2 + x; Uint32 dc = *pixel; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; R = ((dc & Rmask) + (((color & Rmask) - (dc & Rmask)) * alpha >> 8)) & Rmask; G = ((dc & Gmask) + (((color & Gmask) - (dc & Gmask)) * alpha >> 8)) & Gmask; B = ((dc & Bmask) + (((color & Bmask) - (dc & Bmask)) * alpha >> 8)) & Bmask; *pixel = R | G | B; if (Amask!=0) { A = ((dc & Amask) + (((color & Amask) - (dc & Amask)) * alpha >> 8)) & Amask; *pixel |= A; } } } break; case 3: { /* Slow 24-bpp mode. This is patched on the pygame end because the * original code failed on big endian */ Uint8 *pixel = (Uint8 *) dst->pixels + y * dst->pitch + x * 3; Uint8 *dR, *dG, *dB; Uint8 sR, sG, sB; SDL_GetRGB(color, format, &sR, &sG, &sB); #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) dR = pixel + (format->Rshift >> 3); dG = pixel + (format->Gshift >> 3); dB = pixel + (format->Bshift >> 3); #else dR = pixel + 2 - (format->Rshift >> 3); dG = pixel + 2 - (format->Gshift >> 3); dB = pixel + 2 - (format->Bshift >> 3); #endif if (alpha == 255) { *dR = sR; *dG = sG; *dB = sB; } else { *dR = *dR + ((sR - *dR) * alpha >> 8); *dG = *dG + ((sG - *dG) * alpha >> 8); *dB = *dB + ((sB - *dB) * alpha >> 8); } } break; #ifdef DEFAULT_ALPHA_PIXEL_ROUTINE case 4: { /* Probably :-) 32-bpp */ if (alpha == 255) { *((Uint32 *) dst->pixels + y * dst->pitch / 4 + x) = color; } else { Uint32 *pixel = (Uint32 *) dst->pixels + y * dst->pitch / 4 + x; Uint32 dc = *pixel; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; Rshift = format->Rshift; Gshift = format->Gshift; Bshift = format->Bshift; Ashift = format->Ashift; R = ((dc & Rmask) + (((((color & Rmask) - (dc & Rmask)) >> Rshift) * alpha >> 8) << Rshift)) & Rmask; G = ((dc & Gmask) + (((((color & Gmask) - (dc & Gmask)) >> Gshift) * alpha >> 8) << Gshift)) & Gmask; B = ((dc & Bmask) + (((((color & Bmask) - (dc & Bmask)) >> Bshift) * alpha >> 8) << Bshift)) & Bmask; *pixel = R | G | B; if (Amask!=0) { A = ((dc & Amask) + (((((color & Amask) - (dc & Amask)) >> Ashift) * alpha >> 8) << Ashift)) & Amask; *pixel |= A; } } } break; #endif #ifdef EXPERIMENTAL_ALPHA_PIXEL_ROUTINE case 4:{ /* Probably :-) 32-bpp */ if (alpha == 255) { *((Uint32 *) dst->pixels + y * dst->pitch / 4 + x) = color; } else { Uint32 *pixel = (Uint32 *) dst->pixels + y * dst->pitch / 4 + x; Uint32 dR, dG, dB, dA; Uint32 dc = *pixel; Uint32 surfaceAlpha, preMultR, preMultG, preMultB; Uint32 aTmp; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; dR = (color & Rmask); dG = (color & Gmask); dB = (color & Bmask); dA = (color & Amask); Rshift = format->Rshift; Gshift = format->Gshift; Bshift = format->Bshift; Ashift = format->Ashift; preMultR = (alpha * (dR >> Rshift)); preMultG = (alpha * (dG >> Gshift)); preMultB = (alpha * (dB >> Bshift)); surfaceAlpha = ((dc & Amask) >> Ashift); aTmp = (255 - alpha); if (A = 255 - ((aTmp * (255 - surfaceAlpha)) >> 8 )) { aTmp *= surfaceAlpha; R = (preMultR + ((aTmp * ((dc & Rmask) >> Rshift)) >> 8)) / A << Rshift & Rmask; G = (preMultG + ((aTmp * ((dc & Gmask) >> Gshift)) >> 8)) / A << Gshift & Gmask; B = (preMultB + ((aTmp * ((dc & Bmask) >> Bshift)) >> 8)) / A << Bshift & Bmask; } *pixel = R | G | B | (A << Ashift & Amask); } } break; #endif } } return (0); } /*! \brief Pixel draw with blending enabled if a<255. \param dst The surface to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \param color The color value of the pixel to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _putPixelAlpha(dst, x, y, mcolor, alpha); /* * Unlock the surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Pixel draw with blending enabled if a<255 - no surface locking. \param dst The surface to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \param color The color value of the pixel to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int pixelColorNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _putPixelAlpha(dst, x, y, mcolor, alpha); return (result); } /*! \brief Internal function to draw filled rectangle with alpha blending. Assumes color is in destination format. \param dst The surface to draw on. \param x1 X coordinate of the first corner (upper left) of the rectangle. \param y1 Y coordinate of the first corner (upper left) of the rectangle. \param x2 X coordinate of the second corner (lower right) of the rectangle. \param y2 Y coordinate of the second corner (lower right) of the rectangle. \param color The color value of the rectangle to draw (0xRRGGBBAA). \param alpha Alpha blending amount for pixels. \returns Returns 0 on success, -1 on failure. */ int _filledRectAlpha(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha) { SDL_PixelFormat *format; Uint32 Rmask, Bmask, Gmask, Amask; Uint32 Rshift, Bshift, Gshift, Ashift; Uint8 sR, sG, sB, sA; Uint32 R, G, B, A; Sint16 x, y; format = dst->format; switch (format->BytesPerPixel) { case 1: { /* Assuming 8-bpp */ Uint8 *row, *pixel; Uint8 dR, dG, dB; SDL_Palette *palette = format->palette; SDL_Color *colors = palette->colors; sR = colors[color].r; sG = colors[color].g; sB = colors[color].b; for (y = y1; y <= y2; y++) { row = (Uint8 *) dst->pixels + y * dst->pitch; for (x = x1; x <= x2; x++) { pixel = row + x; dR = colors[*pixel].r; dG = colors[*pixel].g; dB = colors[*pixel].b; dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); *pixel = SDL_MapRGB(format, dR, dG, dB); } } } break; case 2: { /* Probably 15-bpp or 16-bpp */ Uint16 *row, *pixel; Uint32 dR, dG, dB, dA; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; dR = (color & Rmask); dG = (color & Gmask); dB = (color & Bmask); dA = (color & Amask); for (y = y1; y <= y2; y++) { row = (Uint16 *) dst->pixels + y * dst->pitch / 2; for (x = x1; x <= x2; x++) { pixel = row + x; R = ((*pixel & Rmask) + ((dR - (*pixel & Rmask)) * alpha >> 8)) & Rmask; G = ((*pixel & Gmask) + ((dG - (*pixel & Gmask)) * alpha >> 8)) & Gmask; B = ((*pixel & Bmask) + ((dB - (*pixel & Bmask)) * alpha >> 8)) & Bmask; *pixel = R | G | B; if (Amask!=0) { A = ((*pixel & Amask) + ((dA - (*pixel & Amask)) * alpha >> 8)) & Amask; *pixel |= A; } } } } break; case 3: { /* Slow 24-bpp mode. This is patched on the pygame end because the * original code failed on big endian */ Uint8 *row, *pix; Uint8 *dR, *dG, *dB; Uint8 sR, sG, sB; SDL_GetRGB(color, format, &sR, &sG, &sB); for (y = y1; y <= y2; y++) { row = (Uint8 *) dst->pixels + y * dst->pitch; for (x = x1; x <= x2; x++) { pix = row + x * 3; #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) dR = pix + (format->Rshift >> 3); dG = pix + (format->Gshift >> 3); dB = pix + (format->Bshift >> 3); #else dR = pix + 2 - (format->Rshift >> 3); dG = pix + 2 - (format->Gshift >> 3); dB = pix + 2 - (format->Bshift >> 3); #endif *dR = *dR + ((sR - *dR) * alpha >> 8); *dG = *dG + ((sG - *dG) * alpha >> 8); *dB = *dB + ((sB - *dB) * alpha >> 8); } } } break; #ifdef DEFAULT_ALPHA_PIXEL_ROUTINE case 4: { /* Probably :-) 32-bpp */ Uint32 *row, *pixel; Uint32 dR, dG, dB, dA; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; Rshift = format->Rshift; Gshift = format->Gshift; Bshift = format->Bshift; Ashift = format->Ashift; dR = (color & Rmask); dG = (color & Gmask); dB = (color & Bmask); dA = (color & Amask); for (y = y1; y <= y2; y++) { row = (Uint32 *) dst->pixels + y * dst->pitch / 4; for (x = x1; x <= x2; x++) { pixel = row + x; R = ((*pixel & Rmask) + ((((dR - (*pixel & Rmask)) >> Rshift) * alpha >> 8) << Rshift)) & Rmask; G = ((*pixel & Gmask) + ((((dG - (*pixel & Gmask)) >> Gshift) * alpha >> 8) << Gshift)) & Gmask; B = ((*pixel & Bmask) + ((((dB - (*pixel & Bmask)) >> Bshift) * alpha >> 8) << Bshift)) & Bmask; *pixel = R | G | B; if (Amask!=0) { A = ((*pixel & Amask) + ((((dA - (*pixel & Amask)) >> Ashift) * alpha >> 8) << Ashift)) & Amask; *pixel |= A; } } } } break; #endif #ifdef EXPERIMENTAL_ALPHA_PIXEL_ROUTINE case 4:{ /* Probably :-) 32-bpp */ Uint32 *row, *pixel; Uint32 dR, dG, dB, dA; Uint32 dc; Uint32 surfaceAlpha, preMultR, preMultG, preMultB; Uint32 aTmp; Rmask = format->Rmask; Gmask = format->Gmask; Bmask = format->Bmask; Amask = format->Amask; dR = (color & Rmask); dG = (color & Gmask); dB = (color & Bmask); dA = (color & Amask); Rshift = format->Rshift; Gshift = format->Gshift; Bshift = format->Bshift; Ashift = format->Ashift; preMultR = (alpha * (dR >> Rshift)); preMultG = (alpha * (dG >> Gshift)); preMultB = (alpha * (dB >> Bshift)); for (y = y1; y <= y2; y++) { row = (Uint32 *) dst->pixels + y * dst->pitch / 4; for (x = x1; x <= x2; x++) { pixel = row + x; dc = *pixel; surfaceAlpha = ((dc & Amask) >> Ashift); aTmp = (255 - alpha); if (A = 255 - ((aTmp * (255 - surfaceAlpha)) >> 8 )) { aTmp *= surfaceAlpha; R = (preMultR + ((aTmp * ((dc & Rmask) >> Rshift)) >> 8)) / A << Rshift & Rmask; G = (preMultG + ((aTmp * ((dc & Gmask) >> Gshift)) >> 8)) / A << Gshift & Gmask; B = (preMultB + ((aTmp * ((dc & Bmask) >> Bshift)) >> 8)) / A << Bshift & Bmask; } *pixel = R | G | B | (A << Ashift & Amask); } } } break; #endif } return (0); } /*! \brief Draw filled rectangle of RGBA color with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first corner (upper left) of the rectangle. \param y1 Y coordinate of the first corner (upper left) of the rectangle. \param x2 X coordinate of the second corner (lower right) of the rectangle. \param y2 Y coordinate of the second corner (lower right) of the rectangle. \param color The color value of the rectangle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledRectAlpha(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _filledRectAlpha(dst, x1, y1, x2, y2, mcolor, alpha); /* * Unlock the surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Internal function to draw horizontal line of RGBA color with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int _HLineAlpha(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { return (filledRectAlpha(dst, x1, y, x2, y, color)); } /*! \brief Internal function to draw vertical line of RGBA color with alpha blending. \param dst The surface to draw on. \param x X coordinate of the points of the line. \param y1 Y coordinate of the first point (top) of the line. \param y2 Y coordinate of the second point (bottom) of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int _VLineAlpha(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) { return (filledRectAlpha(dst, x, y1, x, y2, color)); } /*! \brief Pixel draw with blending enabled and using alpha weight on color. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw (0xRRGGBBAA). \param weight The weight multiplied into the alpha value of the pixel. \returns Returns 0 on success, -1 on failure. */ int pixelColorWeight(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) { Uint32 a; /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Modify Alpha by weight */ a = ((a * weight) >> 8); return (pixelColor(dst, x, y, (color & (Uint32) 0xffffff00) | (Uint32) a)); } /*! \brief Pixel draw with blending enabled and using alpha weight on color - no locking. \param dst The surface to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param color The color value of the pixel to draw (0xRRGGBBAA). \param weight The weight multiplied into the alpha value of the pixel. \returns Returns 0 on success, -1 on failure. */ int pixelColorWeightNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) { Uint32 a; /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Modify Alpha by weight */ a = ((a * weight) >> 8); return (pixelColorNolock(dst, x, y, (color & (Uint32) 0xffffff00) | (Uint32) a)); } /*! \brief Pixel draw with blending enabled if a<255. \param dst The surface to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \param r The red color value of the pixel to draw. \param g The green color value of the pixel to draw. \param b The blue color value of the pixel to draw. \param a The alpha value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Check Alpha */ if (a == 255) { /* * No alpha blending required */ /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColor(dst, x, y, color)); } else { /* * Alpha blending required */ /* * Draw */ return (pixelColor(dst, x, y, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } } /*! \brief Draw horizontal line without blending; Just stores the color value (including the alpha component) without blending. Only the same number of bits of the destination surface are transferred from the input color value. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param color The color value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int hlineColorStore(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int dx; int pixx, pixy; Sint16 w; Sint16 xtmp; int result = -1; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Swap x1, x2 if required to ensure x1<=x2 */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Get clipping boundary and * check visibility of hline */ left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; if ((ybottom)) { return (0); } /* * Clip x */ if (x1 < left) { x1 = left; } if (x2 > right) { x2 = right; } /* * Calculate width */ w = x2 - x1; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * More variable setup */ dx = w; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: memset(pixel, color, dx+1); break; case 2: pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint16 *) pixel = color; } break; case 3: pixellast = pixel + dx + dx + dx; for (; pixel <= pixellast; pixel += pixx) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } } break; default: /* case 4 */ dx = dx + dx; pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint32 *) pixel = color; } break; } /* * Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } /* * Set result code */ result = 0; return (result); } /*! \brief Draw horizontal line without blending Just stores the color value (including the alpha component) without blending. Function should only be used for 32 bit target surfaces. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int hlineRGBAStore(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (hlineColorStore(dst, x1, x2, y, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /*! \brief Draw horizontal line with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int dx; int pixx, pixy; Sint16 xtmp; int result = -1; Uint8 *colorptr; Uint8 color3[3]; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Swap x1, x2 if required to ensure x1<=x2 */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Get clipping boundary and * check visibility of hline */ left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; if ((ybottom)) { return (0); } /* * Clip x */ if (x1 < left) { x1 = left; } if (x2 > right) { x2 = right; } /* * Calculate width difference */ dx = x2 - x1; /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * More variable setup */ pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: memset(pixel, color, dx + 1); break; case 2: pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint16 *) pixel = color; } break; case 3: pixellast = pixel + dx + dx + dx; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color3[0] = (color >> 16) & 0xff; color3[1] = (color >> 8) & 0xff; color3[2] = color & 0xff; } else { color3[0] = color & 0xff; color3[1] = (color >> 8) & 0xff; color3[2] = (color >> 16) & 0xff; } for (; pixel <= pixellast; pixel += pixx) { memcpy(pixel, color3, 3); } break; default: /* case 4 */ dx = dx + dx; pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint32 *) pixel = color; } break; } /* * Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } /* * Set result code */ result = 0; } else { /* * Alpha blending blit */ result = _HLineAlpha(dst, x1, x1 + dx, y, color); } return (result); } /*! \brief Draw horizontal line with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (hlineColor(dst, x1, x2, y, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /*! \brief Draw vertical line with blending. \param dst The surface to draw on. \param x X coordinate of the points of the line. \param y1 Y coordinate of the first point (i.e. top) of the line. \param y2 Y coordinate of the second point (i.e. bottom) of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int dy; int pixx, pixy; Sint16 h; Sint16 ytmp; int result = -1; Uint8 *colorptr; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Swap y1, y2 if required to ensure y1<=y2 */ if (y1 > y2) { ytmp = y1; y1 = y2; y2 = ytmp; } /* * Get clipping boundary and * check visibility of vline */ left = dst->clip_rect.x; right = dst->clip_rect.x + dst->clip_rect.w - 1; if ((xright)) { return (0); } top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Clip x */ if (y1 < top) { y1 = top; } if (y2 > bottom) { y2 = bottom; } /* * Calculate height */ h = y2 - y1; /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * More variable setup */ dy = h; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x + pixy * (int) y1; pixellast = pixel + pixy * dy; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: for (; pixel <= pixellast; pixel += pixy) { *(Uint8 *) pixel = color; } break; case 2: for (; pixel <= pixellast; pixel += pixy) { *(Uint16 *) pixel = color; } break; case 3: for (; pixel <= pixellast; pixel += pixy) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } } break; default: /* case 4 */ for (; pixel <= pixellast; pixel += pixy) { *(Uint32 *) pixel = color; } break; } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } /* * Set result code */ result = 0; } else { /* * Alpha blending blit */ result = _VLineAlpha(dst, x, y1, y1 + h, color); } return (result); } /*! \brief Draw vertical line with blending. \param dst The surface to draw on. \param x X coordinate of the points of the line. \param y1 Y coordinate of the first point (i.e. top) of the line. \param y2 Y coordinate of the second point (i.e. bottom) of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (vlineColor(dst, x, y1, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /*! \brief Draw rectangle with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param color The color value of the rectangle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { int result; Sint16 tmp; /* Check destination surface */ if (dst == NULL) { return -1; } /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return 0; } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelColor(dst, x1, y1, color)); } else { return (vlineColor(dst, x1, y1, y2, color)); } } else { if (y1 == y2) { return (hlineColor(dst, x1, x2, y1, color)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Draw rectangle */ result = 0; result |= hlineColor(dst, x1, x2, y1, color); result |= hlineColor(dst, x1, x2, y2, color); y1 += 1; y2 -= 1; if (y1 <= y2) { result |= vlineColor(dst, x1, y1, y2, color); result |= vlineColor(dst, x2, y1, y2, color); } return (result); } /*! \brief Draw rectangle with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param r The red value of the rectangle to draw. \param g The green value of the rectangle to draw. \param b The blue value of the rectangle to draw. \param a The alpha value of the rectangle to draw. \returns Returns 0 on success, -1 on failure. */ int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (rectangleColor (dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Draw rounded-corner rectangle with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param rad The radius of the corner arc. \param color The color value of the rectangle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int roundedRectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color) { int result; Sint16 w, h, tmp; Sint16 xx1, xx2, yy1, yy2; /* * Check destination surface */ if (dst == NULL) { return -1; } /* * Check radius vor valid range */ if (rad < 0) { return -1; } /* * Special case - no rounding */ if (rad == 0) { return rectangleColor(dst, x1, y1, x2, y2, color); } /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return 0; } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelColor(dst, x1, y1, color)); } else { return (vlineColor(dst, x1, y1, y2, color)); } } else { if (y1 == y2) { return (hlineColor(dst, x1, x2, y1, color)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Maybe adjust radius */ if ((rad * 2) > w) { rad = w / 2; } if ((rad * 2) > h) { rad = h / 2; } /* * Draw corners */ result = 0; xx1 = x1 + rad; xx2 = x2 - rad; yy1 = y1 + rad; yy2 = y2 - rad; result |= arcColor(dst, xx1, yy1, rad, 180, 270, color); result |= arcColor(dst, xx2, yy1, rad, 270, 360, color); result |= arcColor(dst, xx1, yy2, rad, 90, 180, color); result |= arcColor(dst, xx2, yy2, rad, 0, 90, color); /* * Draw lines */ if (xx1 <= xx2) { result |= hlineColor(dst, xx1, xx2, y1, color); result |= hlineColor(dst, xx1, xx2, y2, color); } if (yy1 <= yy2) { result |= vlineColor(dst, x1, yy1, yy2, color); result |= vlineColor(dst, x2, yy1, yy2, color); } return result; } /*! \brief Draw rounded-corner rectangle with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param rad The radius of the corner arc. \param r The red value of the rectangle to draw. \param g The green value of the rectangle to draw. \param b The blue value of the rectangle to draw. \param a The alpha value of the rectangle to draw. \returns Returns 0 on success, -1 on failure. */ int roundedRectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (roundedRectangleColor (dst, x1, y1, x2, y2, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /*! \brief Draw rounded-corner box (filled rectangle) with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param rad The radius of the corner arcs of the box. \param color The color value of the box to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int roundedBoxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color) { int result; Sint16 w, h, tmp; Sint16 xx1, xx2, yy1, yy2; /* * Check destination surface */ if (dst == NULL) { return -1; } /* * Check radius vor valid range */ if (rad < 0) { return -1; } /* * Special case - no rounding */ if (rad == 0) { return rectangleColor(dst, x1, y1, x2, y2, color); } /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return 0; } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelColor(dst, x1, y1, color)); } else { return (vlineColor(dst, x1, y1, y2, color)); } } else { if (y1 == y2) { return (hlineColor(dst, x1, x2, y1, color)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Maybe adjust radius */ if ((rad * 2) > w) { rad = w / 2; } if ((rad * 2) > h) { rad = h / 2; } /* * Draw corners */ result = 0; xx1 = x1 + rad; xx2 = x2 - rad; yy1 = y1 + rad; yy2 = y2 - rad; result |= filledPieColor(dst, xx1, yy1, rad, 180, 270, color); result |= filledPieColor(dst, xx2, yy1, rad, 270, 360, color); result |= filledPieColor(dst, xx1, yy2, rad, 90, 180, color); result |= filledPieColor(dst, xx2, yy2, rad, 0, 90, color); /* * Draw body */ xx1++; xx2--; yy1++; yy2--; if (xx1 <= xx2) { result |= boxColor(dst, xx1, y1, xx2, y2, color); } if (yy1 <= yy2) { result |= boxColor(dst, x1, yy1, xx1-1, yy2, color); result |= boxColor(dst, xx2+1, yy1, x2, yy2, color); } return result; } /*! \brief Draw rounded-corner box (filled rectangle) with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param rad The radius of the corner arcs of the box. \param r The red value of the box to draw. \param g The green value of the box to draw. \param b The blue value of the box to draw. \param a The alpha value of the box to draw. \returns Returns 0 on success, -1 on failure. */ int roundedBoxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (roundedBoxColor (dst, x1, y1, x2, y2, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* --------- Clipping routines for line */ /* Clipping based heavily on code from */ /* http://www.ncsa.uiuc.edu/Vis/Graphics/src/clipCohSuth.c */ #define CLIP_LEFT_EDGE 0x1 #define CLIP_RIGHT_EDGE 0x2 #define CLIP_BOTTOM_EDGE 0x4 #define CLIP_TOP_EDGE 0x8 #define CLIP_INSIDE(a) (!a) #define CLIP_REJECT(a,b) (a&b) #define CLIP_ACCEPT(a,b) (!(a|b)) /*! \brief Internal clip-encoding routine. Calculates a segement-based clipping encoding for a point against a rectangle. \param x X coordinate of point. \param y Y coordinate of point. \param left X coordinate of left edge of the rectangle. \param top Y coordinate of top edge of the rectangle. \param right X coordinate of right edge of the rectangle. \param bottom Y coordinate of bottom edge of the rectangle. */ static int _clipEncode(Sint16 x, Sint16 y, Sint16 left, Sint16 top, Sint16 right, Sint16 bottom) { int code = 0; if (x < left) { code |= CLIP_LEFT_EDGE; } else if (x > right) { code |= CLIP_RIGHT_EDGE; } if (y < top) { code |= CLIP_TOP_EDGE; } else if (y > bottom) { code |= CLIP_BOTTOM_EDGE; } return code; } /*! \brief Clip line to a the clipping rectangle of a surface. \param dst Target surface to draw on. \param x1 Pointer to X coordinate of first point of line. \param y1 Pointer to Y coordinate of first point of line. \param x2 Pointer to X coordinate of second point of line. \param y2 Pointer to Y coordinate of second point of line. */ static int _clipLine(SDL_Surface * dst, Sint16 * x1, Sint16 * y1, Sint16 * x2, Sint16 * y2) { Sint16 left, right, top, bottom; int code1, code2; int draw = 0; Sint16 swaptmp; float m; /* * Get clipping boundary */ left = dst->clip_rect.x; right = dst->clip_rect.x + dst->clip_rect.w - 1; top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; while (1) { code1 = _clipEncode(*x1, *y1, left, top, right, bottom); code2 = _clipEncode(*x2, *y2, left, top, right, bottom); if (CLIP_ACCEPT(code1, code2)) { draw = 1; break; } else if (CLIP_REJECT(code1, code2)) break; else { if (CLIP_INSIDE(code1)) { swaptmp = *x2; *x2 = *x1; *x1 = swaptmp; swaptmp = *y2; *y2 = *y1; *y1 = swaptmp; swaptmp = code2; code2 = code1; code1 = swaptmp; } if (*x2 != *x1) { m = (float)(*y2 - *y1) / (float)(*x2 - *x1); } else { m = 1.0f; } if (code1 & CLIP_LEFT_EDGE) { *y1 += (Sint16) ((left - *x1) * m); *x1 = left; } else if (code1 & CLIP_RIGHT_EDGE) { *y1 += (Sint16) ((right - *x1) * m); *x1 = right; } else if (code1 & CLIP_BOTTOM_EDGE) { if (*x2 != *x1) { *x1 += (Sint16) ((bottom - *y1) / m); } *y1 = bottom; } else if (code1 & CLIP_TOP_EDGE) { if (*x2 != *x1) { *x1 += (Sint16) ((top - *y1) / m); } *y1 = top; } } } return draw; } /*! \brief Draw box (filled rectangle) with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param color The color value of the box to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int x, dx; int dy; int pixx, pixy; Sint16 w, h, tmp; int result; Uint8 *colorptr; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Order coordinates to ensure that * x1<=x2 and y1<=y2 */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Get clipping boundary and * check visibility */ left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* Clip all points */ if (x1right) { x1=right; } if (x2right) { x2=right; } if (y1bottom) { y1=bottom; } if (y2bottom) { y2=bottom; } /* * Test for special cases of straight line or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelColor(dst, x1, y1, color)); } else { return (vlineColor(dst, x1, y1, y2, color)); } } if (y1 == y2) { return (hlineColor(dst, x1, x2, y1, color)); } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * More variable setup */ dx = w; dy = h; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y1; pixellast = pixel + pixx * dx + pixy * dy; dx++; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: for (; pixel <= pixellast; pixel += pixy) { memset(pixel, (Uint8) color, dx); } break; case 2: pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { *(Uint16*) pixel = color; pixel += pixx; } } break; case 3: pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } pixel += pixx; } } break; default: /* case 4 */ pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { *(Uint32 *) pixel = color; pixel += pixx; } } break; } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } result = 0; } else { result = filledRectAlpha(dst, x1, y1, x1 + w, y1 + h, color); } return (result); } /*! \brief Draw box (filled rectangle) with blending. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param r The red value of the box to draw. \param g The green value of the box to draw. \param b The blue value of the box to draw. \param a The alpha value of the box to draw. \returns Returns 0 on success, -1 on failure. */ int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (boxColor(dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Line */ /* Non-alpha line drawing code adapted from routine */ /* by Pete Shinners, pete@shinners.org */ /* Originally from pygame, http://pygame.seul.org */ #define ABS(a) (((a)<0) ? -(a) : (a)) /*! \brief Draw line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { int pixx, pixy; int x, y; int dx, dy; int ax, ay; int sx, sy; int swaptmp; Uint8 *pixel; Uint8 *colorptr; /* * Clip line and test if we have to draw */ if (!(_clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 < y2) { return (vlineColor(dst, x1, y1, y2, color)); } else if (y1 > y2) { return (vlineColor(dst, x1, y2, y1, color)); } else { return (pixelColor(dst, x1, y1, color)); } } if (y1 == y2) { if (x1 < x2) { return (hlineColor(dst, x1, x2, y1, color)); } else if (x1 > x2) { return (hlineColor(dst, x2, x1, y1, color)); } } /* * Variable setup */ dx = x2 - x1; dy = y2 - y1; sx = (dx >= 0) ? 1 : -1; sy = (dy >= 0) ? 1 : -1; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Check for alpha blending */ if ((color & 255) == 255) { /* * No alpha blending - use fast pixel routines */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * More variable setup */ dx = sx * dx + 1; dy = sy * dy + 1; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y1; pixx *= sx; pixy *= sy; if (dx < dy) { swaptmp = dx; dx = dy; dy = swaptmp; swaptmp = pixx; pixx = pixy; pixy = swaptmp; } /* * Draw */ x = 0; y = 0; switch (dst->format->BytesPerPixel) { case 1: for (; x < dx; x++, pixel += pixx) { *pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; case 2: for (; x < dx; x++, pixel += pixx) { *(Uint16 *) pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; case 3: for (; x < dx; x++, pixel += pixx) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; default: /* case 4 */ for (; x < dx; x++, pixel += pixx) { *(Uint32 *) pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; } } else { /* * Alpha blending required - use single-pixel blits */ ax = ABS(dx) << 1; ay = ABS(dy) << 1; x = x1; y = y1; if (ax > ay) { int d = ay - (ax >> 1); while (x != x2) { pixelColorNolock (dst, x, y, color); if (d > 0 || (d == 0 && sx == 1)) { y += sy; d -= ax; } x += sx; d += ay; } } else { int d = ax - (ay >> 1); while (y != y2) { pixelColorNolock (dst, x, y, color); if (d > 0 || ((d == 0) && (sy == 1))) { x += sx; d -= ay; } y += sy; d += ax; } } pixelColorNolock (dst, x, y, color); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (0); } /*! \brief Draw line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (lineColor(dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* AA Line */ #define AAlevels 256 #define AAbits 8 /*! \brief Internal function to draw anti-aliased line with alpha blending and endpoint control. This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic by A. Schiffler. The endpoint control allows the suppression to draw the last pixel useful for rendering continuous aa-lines with alpha<255. \param dst The surface to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param color The color value of the aa-line to draw (0xRRGGBBAA). \param draw_endpoint Flag indicating if the endpoint should be drawn; draw if non-zero. \returns Returns 0 on success, -1 on failure. */ int _aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint) { Sint32 xx0, yy0, xx1, yy1; int result; Uint32 intshift, erracc, erradj; Uint32 erracctmp, wgt, wgtcompmask; int dx, dy, tmp, xdir, y0p1, x0pxdir; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Clip line and test if we have to draw */ if (!(_clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Keep on working with 32bit numbers */ xx0 = x1; yy0 = y1; xx1 = x2; yy1 = y2; /* * Reorder points if required */ if (yy0 > yy1) { tmp = yy0; yy0 = yy1; yy1 = tmp; tmp = xx0; xx0 = xx1; xx1 = tmp; } /* * Calculate distance */ dx = xx1 - xx0; dy = yy1 - yy0; /* * Check for special cases */ if (dx == 0) { /* * Vertical line */ if (draw_endpoint) { return (vlineColor(dst, x1, y1, y2, color)); } else { if (dy>0) { return (vlineColor(dst, x1, yy0, yy0+dy, color)); } else { return (pixelColor(dst, x1, y1, color)); } } } else if (dy == 0) { /* * Horizontal line */ if (draw_endpoint) { return (hlineColor(dst, x1, x2, y1, color)); } else { if (dx!=0) { return (hlineColor(dst, xx0, xx0+dx, y1, color)); } else { return (pixelColor(dst, x1, y1, color)); } } } else if ((dx == dy) && (draw_endpoint)) { /* * Diagonal line (with endpoint) */ return (lineColor(dst, x1, y1, x2, y2, color)); } /* * Adjust for negative dx and set xdir */ if (dx >= 0) { xdir = 1; } else { xdir = -1; dx = (-dx); } /* * Line is not horizontal, vertical or diagonal (with endpoint) */ result = 0; /* * Zero accumulator */ erracc = 0; /* * # of bits by which to shift erracc to get intensity level */ intshift = 32 - AAbits; /* * Mask used to flip all bits in an intensity weighting */ wgtcompmask = AAlevels - 1; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Draw the initial pixel in the foreground color */ result |= pixelColorNolock(dst, x1, y1, color); /* * x-major or y-major? */ if (dy > dx) { /* * y-major. Calculate 16-bit fixed point fractional part of a pixel that * X advances every time Y advances 1 pixel, truncating the result so that * we won't overrun the endpoint along the X axis */ /* * Not-so-portable version: erradj = ((Uint64)dx << 32) / (Uint64)dy; */ erradj = ((dx << 16) / dy) << 16; /* * draw all pixels other than the first and last */ x0pxdir = xx0 + xdir; while (--dy) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * rollover in error accumulator, x coord advances */ xx0 = x0pxdir; x0pxdir += xdir; } yy0++; /* y-major so always advance Y */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelColorWeightNolock (dst, xx0, yy0, color, 255 - wgt); result |= pixelColorWeightNolock (dst, x0pxdir, yy0, color, wgt); } } else { /* * x-major line. Calculate 16-bit fixed-point fractional part of a pixel * that Y advances each time X advances 1 pixel, truncating the result so * that we won't overrun the endpoint along the X axis. */ /* * Not-so-portable version: erradj = ((Uint64)dy << 32) / (Uint64)dx; */ erradj = ((dy << 16) / dx) << 16; /* * draw all pixels other than the first and last */ y0p1 = yy0 + 1; while (--dx) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * Accumulator turned over, advance y */ yy0 = y0p1; y0p1++; } xx0 += xdir; /* x-major so always advance X */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelColorWeightNolock (dst, xx0, yy0, color, 255 - wgt); result |= pixelColorWeightNolock (dst, xx0, y0p1, color, wgt); } } /* * Do we have to draw the endpoint */ if (draw_endpoint) { /* * Draw final pixel, always exactly intersected by the line and doesn't * need to be weighted. */ result |= pixelColorNolock (dst, x2, y2, color); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Ddraw anti-aliased line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param color The color value of the aa-line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { return (_aalineColor(dst, x1, y1, x2, y2, color, 1)); } /*! \brief Draw anti-aliased line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param r The red value of the aa-line to draw. \param g The green value of the aa-line to draw. \param b The blue value of the aa-line to draw. \param a The alpha value of the aa-line to draw. \returns Returns 0 on success, -1 on failure. */ int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (_aalineColor (dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, 1)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* ----- Circle */ /*! \brief Draw circle with blending. Note: Circle drawing routine is based on an algorithms from the sge library, but modified by A. Schiffler for multiple pixel-draw removal and other minor speedup changes. \param dst The surface to draw on. \param x X coordinate of the center of the circle. \param y Y coordinate of the center of the circle. \param rad Radius in pixels of the circle. \param color The color value of the circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { Sint16 left, right, top, bottom; int result; Sint16 x1, y1, x2, y2; Sint16 cx = 0; Sint16 cy = rad; Sint16 df = 1 - rad; Sint16 d_e = 3; Sint16 d_se = -2 * rad + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; Uint8 *colorptr; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radius */ if (rad < 0) { return (-1); } /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelColor(dst, x, y, color)); } /* * Get circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rad; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + rad; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Draw circle */ result = 0; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Alpha Check */ if ((color & 255) == 255) { /* * No Alpha - direct memory writes */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Draw */ do { ypcy = y + cy; ymcy = y - cy; if (cx > 0) { xpcx = x + cx; xmcx = x - cx; result |= fastPixelColorNolock(dst, xmcx, ypcy, color); result |= fastPixelColorNolock(dst, xpcx, ypcy, color); result |= fastPixelColorNolock(dst, xmcx, ymcy, color); result |= fastPixelColorNolock(dst, xpcx, ymcy, color); } else { result |= fastPixelColorNolock(dst, x, ymcy, color); result |= fastPixelColorNolock(dst, x, ypcy, color); } xpcy = x + cy; xmcy = x - cy; if ((cx > 0) && (cx != cy)) { ypcx = y + cx; ymcx = y - cx; result |= fastPixelColorNolock(dst, xmcy, ypcx, color); result |= fastPixelColorNolock(dst, xpcy, ypcx, color); result |= fastPixelColorNolock(dst, xmcy, ymcx, color); result |= fastPixelColorNolock(dst, xpcy, ymcx, color); } else if (cx == 0) { result |= fastPixelColorNolock(dst, xmcy, y, color); result |= fastPixelColorNolock(dst, xpcy, y, color); } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); /* * Unlock surface */ SDL_UnlockSurface(dst); } else { /* * Using Alpha - blended pixel blits */ do { /* * Draw */ ypcy = y + cy; ymcy = y - cy; if (cx > 0) { xpcx = x + cx; xmcx = x - cx; result |= pixelColorNolock (dst, xmcx, ypcy, color); result |= pixelColorNolock (dst, xpcx, ypcy, color); result |= pixelColorNolock (dst, xmcx, ymcy, color); result |= pixelColorNolock (dst, xpcx, ymcy, color); } else { result |= pixelColorNolock (dst, x, ymcy, color); result |= pixelColorNolock (dst, x, ypcy, color); } xpcy = x + cy; xmcy = x - cy; if ((cx > 0) && (cx != cy)) { ypcx = y + cx; ymcx = y - cx; result |= pixelColorNolock (dst, xmcy, ypcx, color); result |= pixelColorNolock (dst, xpcy, ypcx, color); result |= pixelColorNolock (dst, xmcy, ymcx, color); result |= pixelColorNolock (dst, xpcy, ymcx, color); } else if (cx == 0) { result |= pixelColorNolock (dst, xmcy, y, color); result |= pixelColorNolock (dst, xpcy, y, color); } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); } /* Alpha check */ /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Draw circle with blending. \param dst The surface to draw on. \param x X coordinate of the center of the circle. \param y Y coordinate of the center of the circle. \param rad Radius in pixels of the circle. \param r The red value of the circle to draw. \param g The green value of the circle to draw. \param b The blue value of the circle to draw. \param a The alpha value of the circle to draw. \returns Returns 0 on success, -1 on failure. */ int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (circleColor(dst, x, y, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Arc */ /*! \brief Arc with blending. Note Arc drawing is based on circle algorithm by A. Schiffler and written by D. Raber. Calculates which octants arc goes through and renders pixels accordingly. \param dst The surface to draw on. \param x X coordinate of the center of the arc. \param y Y coordinate of the center of the arc. \param rad Radius in pixels of the arc. \param start Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param end Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param color The color value of the arc to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int arcColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { Sint16 left, right, top, bottom; int result; Sint16 x1, y1, x2, y2; Sint16 cx = 0; Sint16 cy = rad; Sint16 df = 1 - rad; Sint16 d_e = 3; Sint16 d_se = -2 * rad + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; Uint8 *colorptr; Uint8 drawoct; int startoct, endoct, oct, stopval_start = 0, stopval_end = 0; double dstart, dend, temp = 0.; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radius */ if (rad < 0) { return (-1); } /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelColor(dst, x, y, color)); } /* * Get arc's circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rad; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + rad; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } // Octant labelling // // \ 5 | 6 / // \ | / // 4 \ | / 7 // \|/ //------+------ +x // /|\ // 3 / | \ 0 // / | \ // / 2 | 1 \ // +y // Initially reset bitmask to 0x00000000 // the set whether or not to keep drawing a given octant. // For example: 0x00111100 means we're drawing in octants 2-5 drawoct = 0; /* * Fixup angles */ start %= 360; end %= 360; // 0 <= start & end < 360; note that sometimes start > end - if so, arc goes back through 0. while (start < 0) start += 360; while (end < 0) end += 360; start %= 360; end %= 360; // now, we find which octants we're drawing in. startoct = start / 45; endoct = end / 45; oct = startoct - 1; // we increment as first step in loop // stopval_start, stopval_end; // what values of cx to stop at. do { oct = (oct + 1) % 8; if (oct == startoct) { // need to compute stopval_start for this octant. Look at picture above if this is unclear dstart = (double)start; switch (oct) { case 0: case 3: temp = sin(dstart * M_PI / 180.); break; case 1: case 6: temp = cos(dstart * M_PI / 180.); break; case 2: case 5: temp = -cos(dstart * M_PI / 180.); break; case 4: case 7: temp = -sin(dstart * M_PI / 180.); break; } temp *= rad; stopval_start = (int)temp; // always round down. // This isn't arbitrary, but requires graph paper to explain well. // The basic idea is that we're always changing drawoct after we draw, so we // stop immediately after we render the last sensible pixel at x = ((int)temp). // and whether to draw in this octant initially if (oct % 2) drawoct |= (1 << oct); // this is basically like saying drawoct[oct] = true, if drawoct were a bool array else drawoct &= 255 - (1 << oct); // this is basically like saying drawoct[oct] = false } if (oct == endoct) { // need to compute stopval_end for this octant dend = (double)end; switch (oct) { case 0: case 3: temp = sin(dend * M_PI / 180); break; case 1: case 6: temp = cos(dend * M_PI / 180); break; case 2: case 5: temp = -cos(dend * M_PI / 180); break; case 4: case 7: temp = -sin(dend * M_PI / 180); break; } temp *= rad; stopval_end = (int)temp; // and whether to draw in this octant initially if (startoct == endoct) { // note: we start drawing, stop, then start again in this case // otherwise: we only draw in this octant, so initialize it to false, it will get set back to true if (start > end) { // unfortunately, if we're in the same octant and need to draw over the whole circle, // we need to set the rest to true, because the while loop will end at the bottom. drawoct = 255; } else { drawoct &= 255 - (1 << oct); } } else if (oct % 2) drawoct &= 255 - (1 << oct); else drawoct |= (1 << oct); } else if (oct != startoct) { // already verified that it's != endoct drawoct |= (1 << oct); // draw this entire segment } } while (oct != endoct); // so now we have what octants to draw and when to draw them. all that's left is the actual raster code. /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Draw arc */ result = 0; /* * Alpha Check */ if ((color & 255) == 255) { /* * No Alpha - direct memory writes */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Draw */ do { ypcy = y + cy; ymcy = y - cy; if (cx > 0) { xpcx = x + cx; xmcx = x - cx; // always check if we're drawing a certain octant before adding a pixel to that octant. if (drawoct & 4) result |= fastPixelColorNolock(dst, xmcx, ypcy, color); // drawoct & 4 = 22; drawoct[2] if (drawoct & 2) result |= fastPixelColorNolock(dst, xpcx, ypcy, color); if (drawoct & 32) result |= fastPixelColorNolock(dst, xmcx, ymcy, color); if (drawoct & 64) result |= fastPixelColorNolock(dst, xpcx, ymcy, color); } else { if (drawoct & 6) result |= fastPixelColorNolock(dst, x, ypcy, color); // 4 + 2; drawoct[2] || drawoct[1] if (drawoct & 96) result |= fastPixelColorNolock(dst, x, ymcy, color); // 32 + 64 } xpcy = x + cy; xmcy = x - cy; if (cx > 0 && cx != cy) { ypcx = y + cx; ymcx = y - cx; if (drawoct & 8) result |= fastPixelColorNolock(dst, xmcy, ypcx, color); if (drawoct & 1) result |= fastPixelColorNolock(dst, xpcy, ypcx, color); if (drawoct & 16) result |= fastPixelColorNolock(dst, xmcy, ymcx, color); if (drawoct & 128) result |= fastPixelColorNolock(dst, xpcy, ymcx, color); } else if (cx == 0) { if (drawoct & 24) result |= fastPixelColorNolock(dst, xmcy, y, color); // 8 + 16 if (drawoct & 129) result |= fastPixelColorNolock(dst, xpcy, y, color); // 1 + 128 } /* * Update whether we're drawing an octant */ if (stopval_start == cx) { // works like an on-off switch because start & end may be in the same octant. if (drawoct & (1 << startoct)) drawoct &= 255 - (1 << startoct); else drawoct |= (1 << startoct); } if (stopval_end == cx) { if (drawoct & (1 << endoct)) drawoct &= 255 - (1 << endoct); else drawoct |= (1 << endoct); } /* * Update pixels */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); /* * Unlock surface */ SDL_UnlockSurface(dst); } else { /* * Using Alpha - blended pixel blits */ do { ypcy = y + cy; ymcy = y - cy; if (cx > 0) { xpcx = x + cx; xmcx = x - cx; // always check if we're drawing a certain octant before adding a pixel to that octant. if (drawoct & 4) result |= pixelColorNolock(dst, xmcx, ypcy, color); if (drawoct & 2) result |= pixelColorNolock(dst, xpcx, ypcy, color); if (drawoct & 32) result |= pixelColorNolock(dst, xmcx, ymcy, color); if (drawoct & 64) result |= pixelColorNolock(dst, xpcx, ymcy, color); } else { if (drawoct & 96) result |= pixelColorNolock(dst, x, ymcy, color); if (drawoct & 6) result |= pixelColorNolock(dst, x, ypcy, color); } xpcy = x + cy; xmcy = x - cy; if (cx > 0 && cx != cy) { ypcx = y + cx; ymcx = y - cx; if (drawoct & 8) result |= pixelColorNolock(dst, xmcy, ypcx, color); if (drawoct & 1) result |= pixelColorNolock(dst, xpcy, ypcx, color); if (drawoct & 16) result |= pixelColorNolock(dst, xmcy, ymcx, color); if (drawoct & 128) result |= pixelColorNolock(dst, xpcy, ymcx, color); } else if (cx == 0) { if (drawoct & 24) result |= pixelColorNolock(dst, xmcy, y, color); if (drawoct & 129) result |= pixelColorNolock(dst, xpcy, y, color); } /* * Update whether we're drawing an octant */ if (stopval_start == cx) { // works like an on-off switch. // This is just in case start & end are in the same octant. if (drawoct & (1 << startoct)) drawoct &= 255 - (1 << startoct); else drawoct |= (1 << startoct); } if (stopval_end == cx) { if (drawoct & (1 << endoct)) drawoct &= 255 - (1 << endoct); else drawoct |= (1 << endoct); } /* * Update pixels */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); } /* Alpha check */ /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Arc with blending. \param dst The surface to draw on. \param x X coordinate of the center of the arc. \param y Y coordinate of the center of the arc. \param rad Radius in pixels of the arc. \param start Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param end Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param r The red value of the arc to draw. \param g The green value of the arc to draw. \param b The blue value of the arc to draw. \param a The alpha value of the arc to draw. \returns Returns 0 on success, -1 on failure. */ int arcRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (arcColor(dst, x, y, rad, start, end, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- AA Circle */ /*! \brief Draw anti-aliased circle with blending. Note: The AA-circle routine is based on AA-ellipse with identical radii. \param dst The surface to draw on. \param x X coordinate of the center of the aa-circle. \param y Y coordinate of the center of the aa-circle. \param rad Radius in pixels of the aa-circle. \param color The color value of the aa-circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { return (aaellipseColor(dst, x, y, rad, rad, color)); } /*! \brief Draw anti-aliased circle with blending. \param dst The surface to draw on. \param x X coordinate of the center of the aa-circle. \param y Y coordinate of the center of the aa-circle. \param rad Radius in pixels of the aa-circle. \param r The red value of the aa-circle to draw. \param g The green value of the aa-circle to draw. \param b The blue value of the aa-circle to draw. \param a The alpha value of the aa-circle to draw. \returns Returns 0 on success, -1 on failure. */ int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aaellipseColor (dst, x, y, rad, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Filled Circle */ /*! \brief Draw filled circle with blending. Note: Based on algorithms from sge library with modifications by A. Schiffler for multiple-hline draw removal and other minor speedup changes. \param dst The surface to draw on. \param x X coordinate of the center of the filled circle. \param y Y coordinate of the center of the filled circle. \param rad Radius in pixels of the filled circle. \param color The color value of the filled circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { Sint16 left, right, top, bottom; int result; Sint16 x1, y1, x2, y2; Sint16 cx = 0; Sint16 cy = rad; Sint16 ocx = (Sint16) 0xffff; Sint16 ocy = (Sint16) 0xffff; Sint16 df = 1 - rad; Sint16 d_e = 3; Sint16 d_se = -2 * rad + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radius */ if (rad < 0) { return (-1); } /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelColor(dst, x, y, color)); } /* * Get circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rad; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + rad; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Draw */ result = 0; do { xpcx = x + cx; xmcx = x - cx; xpcy = x + cy; xmcy = x - cy; if (ocy != cy) { if (cy > 0) { ypcy = y + cy; ymcy = y - cy; result |= hlineColor(dst, xmcx, xpcx, ypcy, color); result |= hlineColor(dst, xmcx, xpcx, ymcy, color); } else { result |= hlineColor(dst, xmcx, xpcx, y, color); } ocy = cy; } if (ocx != cx) { if (cx != cy) { if (cx > 0) { ypcx = y + cx; ymcx = y - cx; result |= hlineColor(dst, xmcy, xpcy, ymcx, color); result |= hlineColor(dst, xmcy, xpcy, ypcx, color); } else { result |= hlineColor(dst, xmcy, xpcy, y, color); } } ocx = cx; } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); return (result); } /*! \brief Draw filled circle with blending. \param dst The surface to draw on. \param x X coordinate of the center of the filled circle. \param y Y coordinate of the center of the filled circle. \param rad Radius in pixels of the filled circle. \param r The red value of the filled circle to draw. \param g The green value of the filled circle to draw. \param b The blue value of the filled circle to draw. \param a The alpha value of the filled circle to draw. \returns Returns 0 on success, -1 on failure. */ int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledCircleColor (dst, x, y, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Ellipse */ /*! \brief Draw ellipse with blending. Note: Based on algorithms from sge library with modifications by A. Schiffler for multiple-pixel draw removal and other minor speedup changes. \param dst The surface to draw on. \param x X coordinate of the center of the ellipse. \param y Y coordinate of the center of the ellipse. \param rx Horizontal radius in pixels of the ellipse. \param ry Vertical radius in pixels of the ellipse. \param color The color value of the ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Sint16 left, right, top, bottom; int result; Sint16 x1, y1, x2, y2; int ix, iy; int h, i, j, k; int oh, oi, oj, ok; int xmh, xph, ypk, ymk; int xmi, xpi, ymj, ypj; int xmj, xpj, ymi, ypi; int xmk, xpk, ymh, yph; Uint8 *colorptr; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special case for rx=0 - draw a vline */ if (rx == 0) { return (vlineColor(dst, x, y - ry, y + ry, color)); } /* * Special case for ry=0 - draw a hline */ if (ry == 0) { return (hlineColor(dst, x - rx, x + rx, y, color)); } /* * Get circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rx; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + ry; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Init vars */ oh = oi = oj = ok = 0xFFFF; /* * Draw */ result = 0; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Check alpha */ if ((color & 255) == 255) { /* * No Alpha - direct memory writes */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if (((ok != k) && (oj != k)) || ((oj != j) && (ok != j)) || (k != j)) { xph = x + h; xmh = x - h; if (k > 0) { ypk = y + k; ymk = y - k; result |= fastPixelColorNolock(dst, xmh, ypk, color); result |= fastPixelColorNolock(dst, xph, ypk, color); result |= fastPixelColorNolock(dst, xmh, ymk, color); result |= fastPixelColorNolock(dst, xph, ymk, color); } else { result |= fastPixelColorNolock(dst, xmh, y, color); result |= fastPixelColorNolock(dst, xph, y, color); } ok = k; xpi = x + i; xmi = x - i; if (j > 0) { ypj = y + j; ymj = y - j; result |= fastPixelColorNolock(dst, xmi, ypj, color); result |= fastPixelColorNolock(dst, xpi, ypj, color); result |= fastPixelColorNolock(dst, xmi, ymj, color); result |= fastPixelColorNolock(dst, xpi, ymj, color); } else { result |= fastPixelColorNolock(dst, xmi, y, color); result |= fastPixelColorNolock(dst, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if (((oi != i) && (oh != i)) || ((oh != h) && (oi != h) && (i != h))) { xmj = x - j; xpj = x + j; if (i > 0) { ypi = y + i; ymi = y - i; result |= fastPixelColorNolock(dst, xmj, ypi, color); result |= fastPixelColorNolock(dst, xpj, ypi, color); result |= fastPixelColorNolock(dst, xmj, ymi, color); result |= fastPixelColorNolock(dst, xpj, ymi, color); } else { result |= fastPixelColorNolock(dst, xmj, y, color); result |= fastPixelColorNolock(dst, xpj, y, color); } oi = i; xmk = x - k; xpk = x + k; if (h > 0) { yph = y + h; ymh = y - h; result |= fastPixelColorNolock(dst, xmk, yph, color); result |= fastPixelColorNolock(dst, xpk, yph, color); result |= fastPixelColorNolock(dst, xmk, ymh, color); result |= fastPixelColorNolock(dst, xpk, ymh, color); } else { result |= fastPixelColorNolock(dst, xmk, y, color); result |= fastPixelColorNolock(dst, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } } else { if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if (((ok != k) && (oj != k)) || ((oj != j) && (ok != j)) || (k != j)) { xph = x + h; xmh = x - h; if (k > 0) { ypk = y + k; ymk = y - k; result |= pixelColorNolock (dst, xmh, ypk, color); result |= pixelColorNolock (dst, xph, ypk, color); result |= pixelColorNolock (dst, xmh, ymk, color); result |= pixelColorNolock (dst, xph, ymk, color); } else { result |= pixelColorNolock (dst, xmh, y, color); result |= pixelColorNolock (dst, xph, y, color); } ok = k; xpi = x + i; xmi = x - i; if (j > 0) { ypj = y + j; ymj = y - j; result |= pixelColorNolock (dst, xmi, ypj, color); result |= pixelColorNolock (dst, xpi, ypj, color); result |= pixelColorNolock (dst, xmi, ymj, color); result |= pixelColor(dst, xpi, ymj, color); } else { result |= pixelColorNolock (dst, xmi, y, color); result |= pixelColorNolock (dst, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if (((oi != i) && (oh != i)) || ((oh != h) && (oi != h) && (i != h))) { xmj = x - j; xpj = x + j; if (i > 0) { ypi = y + i; ymi = y - i; result |= pixelColorNolock (dst, xmj, ypi, color); result |= pixelColorNolock (dst, xpj, ypi, color); result |= pixelColorNolock (dst, xmj, ymi, color); result |= pixelColorNolock (dst, xpj, ymi, color); } else { result |= pixelColorNolock (dst, xmj, y, color); result |= pixelColorNolock (dst, xpj, y, color); } oi = i; xmk = x - k; xpk = x + k; if (h > 0) { yph = y + h; ymh = y - h; result |= pixelColorNolock (dst, xmk, yph, color); result |= pixelColorNolock (dst, xpk, yph, color); result |= pixelColorNolock (dst, xmk, ymh, color); result |= pixelColorNolock (dst, xpk, ymh, color); } else { result |= pixelColorNolock (dst, xmk, y, color); result |= pixelColorNolock (dst, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } } /* Alpha check */ /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Draw ellipse with blending. \param dst The surface to draw on. \param x X coordinate of the center of the ellipse. \param y Y coordinate of the center of the ellipse. \param rx Horizontal radius in pixels of the ellipse. \param ry Vertical radius in pixels of the ellipse. \param r The red value of the ellipse to draw. \param g The green value of the ellipse to draw. \param b The blue value of the ellipse to draw. \param a The alpha value of the ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (ellipseColor(dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- AA Ellipse */ /* Visual Studio 2015 and above define the lrint intristic function, but for * compatibility with older windows compilers, we need to define it ourselves */ #if defined(_MSC_VER) #if _MSC_VER < 1900 /* Detect 64bit and use intrinsic version */ #ifdef _M_X64 #include static __inline long lrint(float f) { return _mm_cvtss_si32(_mm_load_ss(&f)); } #elif defined(_M_IX86) __inline long int lrint (double flt) { int intgr; _asm { fld flt fistp intgr }; return intgr; } #elif defined(_M_ARM) #include #pragma warning(push) #pragma warning(disable: 4716) __declspec(naked) long int lrint (double flt) { __emit(0xEC410B10); // fmdrr d0, r0, r1 __emit(0xEEBD0B40); // ftosid s0, d0 __emit(0xEE100A10); // fmrs r0, s0 __emit(0xE12FFF1E); // bx lr } #pragma warning(pop) #else #error lrint needed for MSVC on non X86/AMD64/ARM targets. #endif #endif #endif /*! \brief Draw anti-aliased ellipse with blending. Note: Based on code from Anders Lindstroem, which is based on code from sge library, which is based on code from TwinLib. \param dst The surface to draw on. \param x X coordinate of the center of the aa-ellipse. \param y Y coordinate of the center of the aa-ellipse. \param rx Horizontal radius in pixels of the aa-ellipse. \param ry Vertical radius in pixels of the aa-ellipse. \param color The color value of the aa-ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aaellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Sint16 left, right, top, bottom; Sint16 x1,y1,x2,y2; int i; int a2, b2, ds, dt, dxt, t, s, d; Sint16 xp, yp, xs, ys, dyt, xx, yy, xc2, yc2; float cp; double sab; Uint8 weight, iweight; int result; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special case for rx=0 - draw a vline */ if (rx == 0) { return (vlineColor(dst, x, y - ry, y + ry, color)); } /* * Special case for ry=0 - draw an hline */ if (ry == 0) { return (hlineColor(dst, x - rx, x + rx, y, color)); } /* * Get circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rx; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + ry; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* Variable setup */ a2 = rx * rx; b2 = ry * ry; ds = 2 * a2; dt = 2 * b2; xc2 = 2 * x; yc2 = 2 * y; sab = sqrt((double)(a2 + b2)); dxt = (Sint16)lrint((double)a2 / sab); t = 0; s = -2 * a2 * ry; d = 0; xp = x; yp = y - ry; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* Draw */ result = 0; /* "End points" */ result |= pixelColorNolock(dst, xp, yp, color); result |= pixelColorNolock(dst, xc2 - xp, yp, color); result |= pixelColorNolock(dst, xp, yc2 - yp, color); result |= pixelColorNolock(dst, xc2 - xp, yc2 - yp, color); for (i = 1; i <= dxt; i++) { xp--; d += t - b2; if (d >= 0) ys = yp - 1; else if ((d - s - a2) > 0) { if ((2 * d - s - a2) >= 0) ys = yp + 1; else { ys = yp; yp++; d -= s + a2; s += ds; } } else { yp++; ys = yp + 1; d -= s + a2; s += ds; } t -= dt; /* Calculate alpha */ if (s != 0) { cp = (float) abs(d) / (float) abs(s); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weights */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Upper half */ xx = xc2 - xp; result |= pixelColorWeightNolock(dst, xp, yp, color, iweight); result |= pixelColorWeightNolock(dst, xx, yp, color, iweight); result |= pixelColorWeightNolock(dst, xp, ys, color, weight); result |= pixelColorWeightNolock(dst, xx, ys, color, weight); /* Lower half */ yy = yc2 - yp; result |= pixelColorWeightNolock(dst, xp, yy, color, iweight); result |= pixelColorWeightNolock(dst, xx, yy, color, iweight); yy = yc2 - ys; result |= pixelColorWeightNolock(dst, xp, yy, color, weight); result |= pixelColorWeightNolock(dst, xx, yy, color, weight); } /* Replaces original approximation code dyt = abs(yp - yc); */ dyt = (Sint16)lrint((double)b2 / sab ); for (i = 1; i <= dyt; i++) { yp++; d -= s + a2; if (d <= 0) xs = xp + 1; else if ((d + t - b2) < 0) { if ((2 * d + t - b2) <= 0) xs = xp - 1; else { xs = xp; xp--; d += t - b2; t -= dt; } } else { xp--; xs = xp - 1; d += t - b2; t -= dt; } s += ds; /* Calculate alpha */ if (t != 0) { cp = (float) abs(d) / (float) abs(t); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weight */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Left half */ xx = xc2 - xp; yy = yc2 - yp; result |= pixelColorWeightNolock(dst, xp, yp, color, iweight); result |= pixelColorWeightNolock(dst, xx, yp, color, iweight); result |= pixelColorWeightNolock(dst, xp, yy, color, iweight); result |= pixelColorWeightNolock(dst, xx, yy, color, iweight); /* Right half */ xx = xc2 - xs; result |= pixelColorWeightNolock(dst, xs, yp, color, weight); result |= pixelColorWeightNolock(dst, xx, yp, color, weight); result |= pixelColorWeightNolock(dst, xs, yy, color, weight); result |= pixelColorWeightNolock(dst, xx, yy, color, weight); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /*! \brief Draw anti-aliased ellipse with blending. \param dst The surface to draw on. \param x X coordinate of the center of the aa-ellipse. \param y Y coordinate of the center of the aa-ellipse. \param rx Horizontal radius in pixels of the aa-ellipse. \param ry Vertical radius in pixels of the aa-ellipse. \param r The red value of the aa-ellipse to draw. \param g The green value of the aa-ellipse to draw. \param b The blue value of the aa-ellipse to draw. \param a The alpha value of the aa-ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aaellipseColor (dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- Filled Ellipse */ /* Note: */ /* Based on algorithm from sge library with multiple-hline draw removal */ /* and other speedup changes. */ /*! \brief Draw filled ellipse with blending. Note: Based on algorithm from sge library with multiple-hline draw removal and other speedup changes. \param dst The surface to draw on. \param x X coordinate of the center of the filled ellipse. \param y Y coordinate of the center of the filled ellipse. \param rx Horizontal radius in pixels of the filled ellipse. \param ry Vertical radius in pixels of the filled ellipse. \param color The color value of the filled ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Sint16 left, right, top, bottom; int result; Sint16 x1, y1, x2, y2; int ix, iy; int h, i, j, k; int oh, oi, oj, ok; int xmh, xph; int xmi, xpi; int xmj, xpj; int xmk, xpk; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special case for rx=0 - draw a vline */ if (rx == 0) { return (vlineColor(dst, x, y - ry, y + ry, color)); } /* * Special case for ry=0 - draw a hline */ if (ry == 0) { return (hlineColor(dst, x - rx, x + rx, y, color)); } /* * Get circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rx; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + ry; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Init vars */ oh = oi = oj = ok = 0xFFFF; /* * Draw */ result = 0; if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if ((ok != k) && (oj != k)) { xph = x + h; xmh = x - h; if (k > 0) { result |= hlineColor(dst, xmh, xph, y + k, color); result |= hlineColor(dst, xmh, xph, y - k, color); } else { result |= hlineColor(dst, xmh, xph, y, color); } ok = k; } if ((oj != j) && (ok != j) && (k != j)) { xmi = x - i; xpi = x + i; if (j > 0) { result |= hlineColor(dst, xmi, xpi, y + j, color); result |= hlineColor(dst, xmi, xpi, y - j, color); } else { result |= hlineColor(dst, xmi, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if ((oi != i) && (oh != i)) { xmj = x - j; xpj = x + j; if (i > 0) { result |= hlineColor(dst, xmj, xpj, y + i, color); result |= hlineColor(dst, xmj, xpj, y - i, color); } else { result |= hlineColor(dst, xmj, xpj, y, color); } oi = i; } if ((oh != h) && (oi != h) && (i != h)) { xmk = x - k; xpk = x + k; if (h > 0) { result |= hlineColor(dst, xmk, xpk, y + h, color); result |= hlineColor(dst, xmk, xpk, y - h, color); } else { result |= hlineColor(dst, xmk, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } return (result); } /*! \brief Draw filled ellipse with blending. \param dst The surface to draw on. \param x X coordinate of the center of the filled ellipse. \param y Y coordinate of the center of the filled ellipse. \param rx Horizontal radius in pixels of the filled ellipse. \param ry Vertical radius in pixels of the filled ellipse. \param r The red value of the filled ellipse to draw. \param g The green value of the filled ellipse to draw. \param b The blue value of the filled ellipse to draw. \param a The alpha value of the filled ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledEllipseColor (dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- pie */ /*! \brief Internal float (low-speed) pie-calc implementation by drawing polygons. Note: Determines vertex array and uses polygon or filledPolygon drawing routines to render. \param dst The surface to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param color The color value of the pie to draw (0xRRGGBBAA). \param filled Flag indicating if the pie should be filled (=1) or not (=0). \returns Returns 0 on success, -1 on failure. */ int _pieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color, Uint8 filled) { Sint16 left, right, top, bottom; Sint16 x1, y1, x2, y2; int result; double angle, start_angle, end_angle; double deltaAngle; double dr; int numpoints, i; Sint16 *vx, *vy; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check radii */ if (rad < 0) { return (-1); } /* * Fixup angles */ start = start % 360; end = end % 360; /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelColor(dst, x, y, color)); } /* * Clip against circle, not pie (not 100% optimal). * Get pie's circle and clipping boundary and * test if bounding box of circle is visible */ x2 = x + rad; left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } y2 = y + rad; top = dst->clip_rect.y; if (y2clip_rect.y + dst->clip_rect.h - 1; if (y1>bottom) { return(0); } /* * Variable setup */ dr = (double) rad; deltaAngle = 3.0 / dr; start_angle = (double) start *(2.0 * M_PI / 360.0); end_angle = (double) end *(2.0 * M_PI / 360.0); if (start > end) { end_angle += (2.0 * M_PI); } /* We will always have at least 2 points */ numpoints = 2; /* Count points (rather than calculating it) */ angle = start_angle; while (angle < end_angle) { angle += deltaAngle; numpoints++; } /* Allocate combined vertex array */ vx = vy = (Sint16 *) malloc(2 * sizeof(Uint16) * numpoints); if (vx == NULL) { return (-1); } /* Update point to start of vy */ vy += numpoints; /* Center */ vx[0] = x; vy[0] = y; /* First vertex */ angle = start_angle; vx[1] = x + (int) (dr * cos(angle)); vy[1] = y + (int) (dr * sin(angle)); if (numpoints<3) { result = lineColor(dst, vx[0], vy[0], vx[1], vy[1], color); } else { /* Calculate other vertices */ i = 2; angle = start_angle; while (angle < end_angle) { angle += deltaAngle; if (angle>end_angle) { angle = end_angle; } vx[i] = x + (int) (dr * cos(angle)); vy[i] = y + (int) (dr * sin(angle)); i++; } /* Draw */ if (filled) { result = filledPolygonColor(dst, vx, vy, numpoints, color); } else { result = polygonColor(dst, vx, vy, numpoints, color); } } /* Free combined vertex array */ free(vx); return (result); } /*! \brief Draw pie (outline) with alpha blending. \param dst The surface to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param color The color value of the pie to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int pieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { return (_pieColor(dst, x, y, rad, start, end, color, 0)); } /*! \brief Draw pie (outline) with alpha blending. \param dst The surface to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param r The red value of the pie to draw. \param g The green value of the pie to draw. \param b The blue value of the pie to draw. \param a The alpha value of the pie to draw. \returns Returns 0 on success, -1 on failure. */ int pieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (_pieColor(dst, x, y, rad, start, end, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, 0)); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /*! \brief Draw filled pie with alpha blending. \param dst The surface to draw on. \param x X coordinate of the center of the filled pie. \param y Y coordinate of the center of the filled pie. \param rad Radius in pixels of the filled pie. \param start Starting radius in degrees of the filled pie. \param end Ending radius in degrees of the filled pie. \param color The color value of the filled pie to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledPieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { return (_pieColor(dst, x, y, rad, start, end, color, 1)); } /*! \brief Draw filled pie with alpha blending. \param dst The surface to draw on. \param x X coordinate of the center of the filled pie. \param y Y coordinate of the center of the filled pie. \param rad Radius in pixels of the filled pie. \param start Starting radius in degrees of the filled pie. \param end Ending radius in degrees of the filled pie. \param r The red value of the filled pie to draw. \param g The green value of the filled pie to draw. \param b The blue value of the filled pie to draw. \param a The alpha value of the filled pie to draw. \returns Returns 0 on success, -1 on failure. */ int filledPieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (_pieColor(dst, x, y, rad, start, end, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, 1)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* ------ Trigon */ /*! \brief Draw trigon (triangle outline) with alpha blending. Note: Creates vertex array and uses polygon routine to render. \param dst The surface to draw on. \param x1 X coordinate of the first point of the trigon. \param y1 Y coordinate of the first point of the trigon. \param x2 X coordinate of the second point of the trigon. \param y2 Y coordinate of the second point of the trigon. \param x3 X coordinate of the third point of the trigon. \param y3 Y coordinate of the third point of the trigon. \param color The color value of the trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int trigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(polygonColor(dst,vx,vy,3,color)); } /*! \brief Draw trigon (triangle outline) with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the trigon. \param y1 Y coordinate of the first point of the trigon. \param x2 X coordinate of the second point of the trigon. \param y2 Y coordinate of the second point of the trigon. \param x3 X coordinate of the third point of the trigon. \param y3 Y coordinate of the third point of the trigon. \param r The red value of the trigon to draw. \param g The green value of the trigon to draw. \param b The blue value of the trigon to draw. \param a The alpha value of the trigon to draw. \returns Returns 0 on success, -1 on failure. */ int trigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(polygonRGBA(dst,vx,vy,3,r,g,b,a)); } /* ------ AA-Trigon */ /*! \brief Draw anti-aliased trigon (triangle outline) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param dst The surface to draw on. \param x1 X coordinate of the first point of the aa-trigon. \param y1 Y coordinate of the first point of the aa-trigon. \param x2 X coordinate of the second point of the aa-trigon. \param y2 Y coordinate of the second point of the aa-trigon. \param x3 X coordinate of the third point of the aa-trigon. \param y3 Y coordinate of the third point of the aa-trigon. \param color The color value of the aa-trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aatrigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(aapolygonColor(dst,vx,vy,3,color)); } /*! \brief Draw anti-aliased trigon (triangle outline) with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the aa-trigon. \param y1 Y coordinate of the first point of the aa-trigon. \param x2 X coordinate of the second point of the aa-trigon. \param y2 Y coordinate of the second point of the aa-trigon. \param x3 X coordinate of the third point of the aa-trigon. \param y3 Y coordinate of the third point of the aa-trigon. \param r The red value of the aa-trigon to draw. \param g The green value of the aa-trigon to draw. \param b The blue value of the aa-trigon to draw. \param a The alpha value of the aa-trigon to draw. \returns Returns 0 on success, -1 on failure. */ int aatrigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(aapolygonRGBA(dst,vx,vy,3,r,g,b,a)); } /* ------ Filled Trigon */ /*! \brief Draw filled trigon (triangle) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param dst The surface to draw on. \param x1 X coordinate of the first point of the filled trigon. \param y1 Y coordinate of the first point of the filled trigon. \param x2 X coordinate of the second point of the filled trigon. \param y2 Y coordinate of the second point of the filled trigon. \param x3 X coordinate of the third point of the filled trigon. \param y3 Y coordinate of the third point of the filled trigon. \param color The color value of the filled trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledTrigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(filledPolygonColor(dst,vx,vy,3,color)); } /*! \brief Draw filled trigon (triangle) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param dst The surface to draw on. \param x1 X coordinate of the first point of the filled trigon. \param y1 Y coordinate of the first point of the filled trigon. \param x2 X coordinate of the second point of the filled trigon. \param y2 Y coordinate of the second point of the filled trigon. \param x3 X coordinate of the third point of the filled trigon. \param y3 Y coordinate of the third point of the filled trigon. \param r The red value of the filled trigon to draw. \param g The green value of the filled trigon to draw. \param b The blue value of the filled trigon to draw. \param a The alpha value of the filled trigon to draw. \returns Returns 0 on success, -1 on failure. */ int filledTrigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(filledPolygonRGBA(dst,vx,vy,3,r,g,b,a)); } /* ---- Polygon */ /*! \brief Draw polygon with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the polygon. \param vy Vertex array containing Y coordinates of the points of the polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the polygon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int polygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color) { int result; int i; const Sint16 *x1, *y1, *x2, *y2; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Vertex array NULL check */ if (vx == NULL) { return (-1); } if (vy == NULL) { return (-1); } /* * Sanity check */ if (n < 3) { return (-1); } /* * Pointer setup */ x1 = x2 = vx; y1 = y2 = vy; x2++; y2++; /* * Draw */ result = 0; for (i = 1; i < n; i++) { result |= lineColor(dst, *x1, *y1, *x2, *y2, color); x1 = x2; y1 = y2; x2++; y2++; } result |= lineColor(dst, *x1, *y1, *vx, *vy, color); return (result); } /*! \brief Draw polygon with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the polygon. \param vy Vertex array containing Y coordinates of the points of the polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the polygon to draw. \param g The green value of the polygon to draw. \param b The blue value of the polygon to draw. \param a The alpha value of the polygon to draw. \returns Returns 0 on success, -1 on failure. */ int polygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (polygonColor(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- AA-Polygon */ /*! \brief Draw anti-aliased polygon with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the aa-polygon. \param vy Vertex array containing Y coordinates of the points of the aa-polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the aa-polygon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aapolygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color) { int result; int i; const Sint16 *x1, *y1, *x2, *y2; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Vertex array NULL check */ if (vx == NULL) { return (-1); } if (vy == NULL) { return (-1); } /* * Sanity check */ if (n < 3) { return (-1); } /* * Pointer setup */ x1 = x2 = vx; y1 = y2 = vy; x2++; y2++; /* * Draw */ result = 0; for (i = 1; i < n; i++) { result |= _aalineColor(dst, *x1, *y1, *x2, *y2, color, 0); x1 = x2; y1 = y2; x2++; y2++; } result |= _aalineColor(dst, *x1, *y1, *vx, *vy, color, 0); return (result); } /*! \brief Draw anti-aliased polygon with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the aa-polygon. \param vy Vertex array containing Y coordinates of the points of the aa-polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the aa-polygon to draw. \param g The green value of the aa-polygon to draw. \param b The blue value of the aa-polygon to draw. \param a The alpha value of the aa-polygon to draw. \returns Returns 0 on success, -1 on failure. */ int aapolygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aapolygonColor(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- Filled Polygon */ /*! \brief Internal helper qsort callback functions used in filled polygon drawing. \param a The surface to draw on. \param b Vertex array containing X coordinates of the points of the polygon. \returns Returns 0 if a==b, a negative number if ab. */ int _gfxPrimitivesCompareInt(const void *a, const void *b) { return (*(const int *) a) - (*(const int *) b); } /*! \brief Global vertex array to use if optional parameters are not given in filledPolygonMT calls. Note: Used for non-multithreaded (default) operation of filledPolygonMT. */ static int *gfxPrimitivesPolyIntsGlobal = NULL; /*! \brief Flag indicating if global vertex array was already allocated. Note: Used for non-multithreaded (default) operation of filledPolygonMT. */ static int gfxPrimitivesPolyAllocatedGlobal = 0; /*! \brief Draw filled polygon with alpha blending (multi-threaded capable). Note: The last two parameters are optional; but are required for multithreaded operation. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the filled polygon to draw (0xRRGGBBAA). \param polyInts Preallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise. \param polyAllocated Flag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise. \returns Returns 0 on success, -1 on failure. */ int filledPolygonColorMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color, int **polyInts, int *polyAllocated) { int result; int i; int y, xa, xb; int miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int *gfxPrimitivesPolyInts = NULL; int *gfxPrimitivesPolyIntsNew = NULL; int gfxPrimitivesPolyAllocated = 0; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Vertex array NULL check */ if (vx == NULL) { return (-1); } if (vy == NULL) { return (-1); } /* * Sanity check number of edges */ if (n < 3) { return -1; } /* * Map polygon cache */ if ((polyInts==NULL) || (polyAllocated==NULL)) { /* Use global cache */ gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal; gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal; } else { /* Use local cache */ gfxPrimitivesPolyInts = *polyInts; gfxPrimitivesPolyAllocated = *polyAllocated; } /* * Allocate temp array, only grow array */ if (!gfxPrimitivesPolyAllocated) { gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } else { if (gfxPrimitivesPolyAllocated < n) { gfxPrimitivesPolyIntsNew = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n); if (!gfxPrimitivesPolyIntsNew) { if (!gfxPrimitivesPolyInts) { free(gfxPrimitivesPolyInts); gfxPrimitivesPolyInts = NULL; } gfxPrimitivesPolyAllocated = 0; } else { gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsNew; gfxPrimitivesPolyAllocated = n; } } } /* * Check temp array */ if (gfxPrimitivesPolyInts==NULL) { gfxPrimitivesPolyAllocated = 0; } /* * Update cache variables */ if ((polyInts==NULL) || (polyAllocated==NULL)) { gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts; gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated; } else { *polyInts = gfxPrimitivesPolyInts; *polyAllocated = gfxPrimitivesPolyAllocated; } /* * Check temp array again */ if (gfxPrimitivesPolyInts==NULL) { return(-1); } /* * Determine Y maxima */ miny = vy[0]; maxy = vy[0]; for (i = 1; (i < n); i++) { if (vy[i] < miny) { miny = vy[i]; } else if (vy[i] > maxy) { maxy = vy[i]; } } /* * Draw, scanning y */ result = 0; for (y = miny; (y <= maxy); y++) { ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = vy[ind1]; y2 = vy[ind2]; if (y1 < y2) { x1 = vx[ind1]; x2 = vx[ind2]; } else if (y1 > y2) { y2 = vy[ind1]; y1 = vy[ind2]; x2 = vx[ind1]; x1 = vx[ind2]; } else { continue; } if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) { gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1); } } qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt); for (i = 0; (i < ints); i += 2) { xa = gfxPrimitivesPolyInts[i] + 1; xa = (xa >> 16) + ((xa & 32768) >> 15); xb = gfxPrimitivesPolyInts[i+1] - 1; xb = (xb >> 16) + ((xb & 32768) >> 15); result |= hlineColor(dst, xa, xb, y, color); } } return (result); } /*! \brief Draw filled polygon with alpha blending (multi-threaded capable). Note: The last two parameters are optional; but are required for multithreaded operation. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the filled polygon to draw. \param g The green value of the filled polygon to draw. \param b The blue value of the filed polygon to draw. \param a The alpha value of the filled polygon to draw. \param polyInts Preallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise. \param polyAllocated Flag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise. \returns Returns 0 on success, -1 on failure. */ int filledPolygonRGBAMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated) { /* * Draw */ return (filledPolygonColorMT(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, polyInts, polyAllocated)); } /*! \brief Draw filled polygon with alpha blending. Note: Standard filledPolygon function is calling multithreaded version with NULL parameters to use the global vertex cache. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the filled polygon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledPolygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color) { /* * Draw */ return (filledPolygonColorMT(dst, vx, vy, n, color, NULL, NULL)); } /*! \brief Draw filled polygon with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the filled polygon to draw. \param g The green value of the filled polygon to draw. \param b The blue value of the filed polygon to draw. \param a The alpha value of the filled polygon to draw. \returns Returns 0 on success, -1 on failure. */ int filledPolygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledPolygonColorMT(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, NULL, NULL)); } /*! \brief Internal function to draw a textured horizontal line. \param dst The surface to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param texture The texture surface to retrieve color information from. \param texture_dx The X offset for the texture lookup. \param texture_dy The Y offset for the textured lookup. \returns Returns 0 on success, -1 on failure. */ int _HLineTextured(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, SDL_Surface *texture, int texture_dx, int texture_dy) { Sint16 left, right, top, bottom; Sint16 w; Sint16 xtmp; int result = 0; int texture_x_walker; int texture_y_start; SDL_Rect source_rect,dst_rect; int pixels_written,write_width; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Swap x1, x2 if required to ensure x1<=x2 */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Get clipping boundary and * check visibility of hline */ left = dst->clip_rect.x; if (x2clip_rect.x + dst->clip_rect.w - 1; if (x1>right) { return(0); } top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; if ((ybottom)) { return (0); } /* * Clip x */ if (x1 < left) { x1 = left; } if (x2 > right) { x2 = right; } /* * Calculate width to draw */ w = x2 - x1 + 1; /* * Determine where in the texture we start drawing */ texture_x_walker = (x1 - texture_dx) % texture->w; if (texture_x_walker < 0){ texture_x_walker = texture->w + texture_x_walker ; } texture_y_start = (y + texture_dy) % texture->h; if (texture_y_start < 0){ texture_y_start = texture->h + texture_y_start; } // setup the source rectangle; we are only drawing one horizontal line source_rect.y = texture_y_start; source_rect.x = texture_x_walker; source_rect.h = 1; // we will draw to the current y dst_rect.y = y; // if there are enough pixels left in the current row of the texture // draw it all at once if (w <= texture->w -texture_x_walker){ source_rect.w = w; source_rect.x = texture_x_walker; dst_rect.x= x1; result = (SDL_BlitSurface (texture, &source_rect , dst, &dst_rect) == 0); } else { // we need to draw multiple times // draw the first segment pixels_written = texture->w - texture_x_walker; source_rect.w = pixels_written; source_rect.x = texture_x_walker; dst_rect.x= x1; result |= (SDL_BlitSurface (texture, &source_rect , dst, &dst_rect) == 0); write_width = texture->w; // now draw the rest // set the source x to 0 source_rect.x = 0; while (pixels_written < w){ if (write_width >= w - pixels_written) { write_width = w - pixels_written; } source_rect.w = write_width; dst_rect.x = x1 + pixels_written; result |= (SDL_BlitSurface (texture,&source_rect , dst, &dst_rect) == 0); pixels_written += write_width; } } return result; } /*! \brief Draws a polygon filled with the given texture (Multi-Threading Capable). This operation use internally SDL_BlitSurface for lines of the source texture. It supports alpha drawing. To get the best performance of this operation you need to make sure the texture and the dst surface have the same format (see http://docs.mandragor.org/files/Common_libs_documentation/SDL/SDL_Documentation_project_en/sdlblitsurface.html). The last two parameters are optional, but required for multithreaded operation. When set to NULL, uses global static temp array. \param dst the destination surface, \param vx array of x vector components \param vy array of x vector components \param n the amount of vectors in the vx and vy array \param texture the sdl surface to use to fill the polygon \param texture_dx the offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to appear the same you need to increase the texture_dx value \param texture_dy see texture_dx \param polyInts preallocated temp array storage for vertex sorting (used for multi-threaded operation) \param polyAllocated flag indicating oif the temp array was allocated (used for multi-threaded operation) \returns Returns 0 on success, -1 on failure. */ int texturedPolygonMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated) { int result; int i; int y, xa, xb; int minx,maxx,miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int *gfxPrimitivesPolyInts = NULL; int gfxPrimitivesPolyAllocated = 0; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Sanity check number of edges */ if (n < 3) { return -1; } /* * Map polygon cache */ if ((polyInts==NULL) || (polyAllocated==NULL)) { /* Use global cache */ gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal; gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal; } else { /* Use local cache */ gfxPrimitivesPolyInts = *polyInts; gfxPrimitivesPolyAllocated = *polyAllocated; } /* * Allocate temp array, only grow array */ if (!gfxPrimitivesPolyAllocated) { gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } else { if (gfxPrimitivesPolyAllocated < n) { gfxPrimitivesPolyInts = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } } /* * Check temp array */ if (gfxPrimitivesPolyInts==NULL) { gfxPrimitivesPolyAllocated = 0; } /* * Update cache variables */ if ((polyInts==NULL) || (polyAllocated==NULL)) { gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts; gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated; } else { *polyInts = gfxPrimitivesPolyInts; *polyAllocated = gfxPrimitivesPolyAllocated; } /* * Check temp array again */ if (gfxPrimitivesPolyInts==NULL) { return(-1); } /* * Determine X,Y minima,maxima */ miny = vy[0]; maxy = vy[0]; minx = vx[0]; maxx = vx[0]; for (i = 1; (i < n); i++) { if (vy[i] < miny) { miny = vy[i]; } else if (vy[i] > maxy) { maxy = vy[i]; } if (vx[i] < minx) { minx = vx[i]; } else if (vx[i] > maxx) { maxx = vx[i]; } } if (maxx <0 || minx > dst->w){ return -1; } if (maxy <0 || miny > dst->h){ return -1; } /* * Draw, scanning y */ result = 0; for (y = miny; (y <= maxy); y++) { ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = vy[ind1]; y2 = vy[ind2]; if (y1 < y2) { x1 = vx[ind1]; x2 = vx[ind2]; } else if (y1 > y2) { y2 = vy[ind1]; y1 = vy[ind2]; x2 = vx[ind1]; x1 = vx[ind2]; } else { continue; } if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) { gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1); } } qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt); for (i = 0; (i < ints); i += 2) { xa = gfxPrimitivesPolyInts[i] + 1; xa = (xa >> 16) + ((xa & 32768) >> 15); xb = gfxPrimitivesPolyInts[i+1] - 1; xb = (xb >> 16) + ((xb & 32768) >> 15); result |= _HLineTextured(dst, xa, xb, y, texture, texture_dx, texture_dy); } } return (result); } /*! \brief Draws a polygon filled with the given texture. This standard version is calling multithreaded versions with NULL cache parameters. \param dst the destination surface, \param vx array of x vector components \param vy array of x vector components \param n the amount of vectors in the vx and vy array \param texture the sdl surface to use to fill the polygon \param texture_dx the offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to appear the same you need to increase the texture_dx value \param texture_dy see texture_dx \returns Returns 0 on success, -1 on failure. */ int texturedPolygon(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy) { /* * Draw */ return (texturedPolygonMT(dst, vx, vy, n, texture, texture_dx, texture_dy, NULL, NULL)); } #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* ---- Character */ /*! \brief Global cache for NxM pixel font surfaces created at runtime. */ static SDL_Surface *gfxPrimitivesFont[256]; /*! \brief Global cache of the color used for the font surfaces created at runtime. */ // static Uint32 gfxPrimitivesFontColor[256]; /*! \brief Pointer to the current font data. Default is a 8x8 pixel internal font. */ static const unsigned char *currentFontdata = gfxPrimitivesFontdata; /*! \brief Width of the current font. Default is 8. */ static Uint32 charWidth = 8; /*! \brief Height of the current font. Default is 8. */ static Uint32 charHeight = 8; /*! \brief Width for rendering. Autocalculated. */ static Uint32 charWidthLocal = 8; /*! \brief Height for rendering. Autocalculated. */ static Uint32 charHeightLocal = 8; /*! \brief Pitch of the current font in bytes. Default is 1. */ static Uint32 charPitch = 1; /*! \brief Characters 90deg clockwise rotations. Default is 0. Max is 3. */ static Uint32 charRotation = 0; /*! \brief Character data size in bytes of the current font. Default is 8. */ static Uint32 charSize = 8; /*! \brief Sets or resets the current global font data. The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel] \param fontdata Pointer to array of font data. Set to NULL, to reset global font to the default 8x8 font. \param cw Width of character in bytes. Ignored if fontdata==NULL. \param ch Height of character in bytes. Ignored if fontdata==NULL. */ void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch) { int i; if ((fontdata) && (cw) && (ch)) { currentFontdata = fontdata; charWidth = cw; charHeight = ch; } else { currentFontdata = gfxPrimitivesFontdata; charWidth = 8; charHeight = 8; } charPitch = (charWidth+7)/8; charSize = charPitch * charHeight; /* Maybe flip width/height for rendering */ if ((charRotation==1) || (charRotation==3)) { charWidthLocal = charHeight; charHeightLocal = charWidth; } else { charWidthLocal = charWidth; charHeightLocal = charHeight; } /* Clear character cache */ for (i = 0; i < 256; i++) { if (gfxPrimitivesFont[i]) { SDL_FreeSurface(gfxPrimitivesFont[i]); gfxPrimitivesFont[i] = NULL; } } } /*! \brief Sets current global font character rotation steps. Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache. \param rotation Number of 90deg clockwise steps to rotate */ void gfxPrimitivesSetFontRotation(Uint32 rotation) { int i; rotation = rotation & 3; if (charRotation != rotation) { /* Store rotation */ charRotation = rotation; /* Maybe flip width/height for rendering */ if ((charRotation==1) || (charRotation==3)) { charWidthLocal = charHeight; charHeightLocal = charWidth; } else { charWidthLocal = charWidth; charHeightLocal = charHeight; } /* Clear character cache */ for (i = 0; i < 256; i++) { if (gfxPrimitivesFont[i]) { SDL_FreeSurface(gfxPrimitivesFont[i]); gfxPrimitivesFont[i] = NULL; } } } } /*! \brief Draw a character of the currently set font. On first call for a particular character and color combination, the function needs to generate the character surface (slower. Subsequent calls blit a cached surface (fast). Uses alpha blending if A<255 in color. \param dst The surface to draw on. \param x X (horizontal) coordinate of the upper left corner of the character. \param y Y (vertical) coordinate of the upper left corner of the character. \param c The character to draw. \param color The color value of the character to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color) { Sint16 left, right, top, bottom; Sint16 x1, y1, x2, y2; SDL_Rect srect; SDL_Rect drect; int result; Uint32 ix, iy; const unsigned char *charpos; Uint8 *curpos; int forced_redraw; Uint8 patt, mask; Uint8 *linepos; Uint32 pitch; SDL_Surface *rotatedCharacter; Uint32 ci; /* * Check visibility of clipping rectangle */ if ((dst->clip_rect.w==0) || (dst->clip_rect.h==0)) { return(0); } /* * Get text and clipping boundary and * test if bounding box of character is visible */ left = dst->clip_rect.x; x2 = x + charWidthLocal; if (x2clip_rect.x + dst->clip_rect.w - 1; x1 = x; if (x1>right) { return(0); } top = dst->clip_rect.y; y2 = y + charHeightLocal; if (y2clip_rect.y + dst->clip_rect.h - 1; y1 = y; if (y1>bottom) { return(0); } /* * Setup source rectangle */ srect.x = 0; srect.y = 0; srect.w = charWidthLocal; srect.h = charHeightLocal; /* * Setup destination rectangle */ drect.x = x; drect.y = y; drect.w = charWidthLocal; drect.h = charHeightLocal; /* Character index in cache */ ci = (unsigned char) c; /* * Create new charWidth x charHeight bitmap surface if not already present. * Might get rotated later. */ if (gfxPrimitivesFont[ci] == NULL) { gfxPrimitivesFont[ci] = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, charWidth, charHeight, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); /* * Check pointer */ if (gfxPrimitivesFont[ci] == NULL) { return (-1); } /* * Definitely redraw */ forced_redraw = 1; } else { forced_redraw = 0; } /* * Check if color has changed */ if ((gfxPrimitivesFontColor[ci] != color) || (forced_redraw)) { /* * Redraw character */ SDL_SetAlpha(gfxPrimitivesFont[ci], SDL_SRCALPHA, 255); gfxPrimitivesFontColor[ci] = color; /* Lock font-surface */ if (SDL_LockSurface(gfxPrimitivesFont[ci]) != 0) return (-1); /* * Variable setup */ charpos = currentFontdata + ci * charSize; linepos = (Uint8 *) gfxPrimitivesFont[ci]->pixels; pitch = gfxPrimitivesFont[ci]->pitch; /* * Drawing loop */ patt = 0; for (iy = 0; iy < charHeight; iy++) { mask = 0x00; curpos = linepos; for (ix = 0; ix < charWidth; ix++) { if (!(mask >>= 1)) { patt = *charpos++; mask = 0x80; } if (patt & mask) *(Uint32 *)curpos = color; else *(Uint32 *)curpos = 0; curpos += 4; } linepos += pitch; } /* Unlock font-surface */ SDL_UnlockSurface(gfxPrimitivesFont[ci]); /* Maybe rotate and replace cached image */ if (charRotation>0) { // XXX: NOTE: To drop dependency on the rotateSurface90Degrees call. //rotatedCharacter = rotateSurface90Degrees(gfxPrimitivesFont[ci], charRotation); //SDL_FreeSurface(gfxPrimitivesFont[ci]); //gfxPrimitivesFont[ci] = rotatedCharacter; } } /* * Draw bitmap onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesFont[ci], &srect, dst, &drect); return (result); } /*! \brief Draw a character of the currently set font. \param dst The surface to draw on. \param x X (horizontal) coordinate of the upper left corner of the character. \param y Y (vertical) coordinate of the upper left corner of the character. \param c The character to draw. \param r The red value of the character to draw. \param g The green value of the character to draw. \param b The blue value of the character to draw. \param a The alpha value of the character to draw. \returns Returns 0 on success, -1 on failure. */ int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (characterColor(dst, x, y, c, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /*! \brief Draw a string in the currently set font. The spacing between consecutive characters in the string is the fixed number of pixels of the character width of the current global font. \param dst The surface to draw on. \param x X (horizontal) coordinate of the upper left corner of the string. \param y Y (vertical) coordinate of the upper left corner of the string. \param s The string to draw. \param color The color value of the string to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, const char *s, Uint32 color) { int result = 0; Sint16 curx = x; Sint16 cury = y; const char *curchar = s; while (*curchar && !result) { result |= characterColor(dst, curx, cury, *curchar, color); switch (charRotation) { case 0: curx += charWidthLocal; break; case 2: curx -= charWidthLocal; break; case 1: cury += charHeightLocal; break; case 3: cury -= charHeightLocal; break; } curchar++; } return (result); } /*! \brief Draw a string in the currently set font. \param dst The surface to draw on. \param x X (horizontal) coordinate of the upper left corner of the string. \param y Y (vertical) coordinate of the upper left corner of the string. \param s The string to draw. \param r The red value of the string to draw. \param g The green value of the string to draw. \param b The blue value of the string to draw. \param a The alpha value of the string to draw. \returns Returns 0 on success, -1 on failure. */ int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (stringColor(dst, x, y, s, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* ---- Bezier curve */ /*! \brief Internal function to calculate bezier interpolator of data array with ndata values at position 't'. \param data Array of values. \param ndata Size of array. \param t Position for which to calculate interpolated value. t should be between [0, ndata]. \returns Interpolated value at position t, value[0] when t<0, value[n-1] when t>n. */ double _evaluateBezier (double *data, int ndata, double t) { double mu, result; int n,k,kn,nn,nkn; double blend,muk,munk; /* Sanity check bounds */ if (t<0.0) { return(data[0]); } if (t>=(double)ndata) { return(data[ndata-1]); } /* Adjust t to the range 0.0 to 1.0 */ mu=t/(double)ndata; /* Calculate interpolate */ n=ndata-1; result=0.0; muk = 1; munk = pow(1-mu,(double)n); for (k=0;k<=n;k++) { nn = n; kn = k; nkn = n - k; blend = muk * munk; muk *= mu; munk /= (1-mu); while (nn >= 1) { blend *= nn; nn--; if (kn > 1) { blend /= (double)kn; kn--; } if (nkn > 1) { blend /= (double)nkn; nkn--; } } result += data[k] * blend; } return (result); } /*! \brief Draw a bezier curve with alpha blending. \param dst The surface to draw on. \param vx Vertex array containing X coordinates of the points of the bezier curve. \param vy Vertex array containing Y coordinates of the points of the bezier curve. \param n Number of points in the vertex array. Minimum number is 3. \param s Number of steps for the interpolation. Minimum number is 2. \param color The color value of the bezier curve to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int bezierColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color) { int result; int i; double *x, *y, t, stepsize; Sint16 x1, y1, x2, y2; /* * Sanity check */ if (n < 3) { return (-1); } if (s < 2) { return (-1); } /* * Variable setup */ stepsize=(double)1.0/(double)s; /* Transfer vertices into float arrays */ if ((x=(double *)malloc(sizeof(double)*(n+1)))==NULL) { return(-1); } if ((y=(double *)malloc(sizeof(double)*(n+1)))==NULL) { free(x); return(-1); } for (i=0; ix = x1; b->y = y1; /* dx = abs(x2-x1), s1 = sign(x2-x1) */ if ((b->dx = x2 - x1) != 0) { if (b->dx < 0) { b->dx = -b->dx; b->s1 = -1; } else { b->s1 = 1; } } else { b->s1 = 0; } /* dy = abs(y2-y1), s2 = sign(y2-y1) */ if ((b->dy = y2 - y1) != 0) { if (b->dy < 0) { b->dy = -b->dy; b->s2 = -1; } else { b->s2 = 1; } } else { b->s2 = 0; } if (b->dy > b->dx) { temp = b->dx; b->dx = b->dy; b->dy = temp; b->swapdir = 1; } else { b->swapdir = 0; } b->count = (b->dx<0) ? 0 : (unsigned int)b->dx; b->dy <<= 1; b->error = b->dy - b->dx; b->dx <<= 1; return(0); } /*! \brief Internal function to move Bresenham line iterator to the next position. Maybe updates the x and y coordinates of the iterator struct. \param b Pointer to struct for bresenham line drawing state. \returns Returns 0 on success, 1 if last point was reached, 2 if moving past end-of-line, -1 on failure. */ int _bresenhamIterate(SDL_gfxBresenhamIterator *b) { if (b==NULL) { return (-1); } /* last point check */ if (b->count==0) { return (2); } while (b->error >= 0) { if (b->swapdir) { b->x += b->s1; } else { b->y += b->s2; } b->error -= b->dx; } if (b->swapdir) { b->y += b->s2; } else { b->x += b->s1; } b->error += b->dy; b->count--; /* count==0 indicates "end-of-line" */ return ((b->count) ? 0 : 1); } /*! \brief Internal function to to draw parallel lines with Murphy algorithm. \param m Pointer to struct for murphy iterator. \param x X coordinate of point. \param y Y coordinate of point. \param d1 Direction square/diagonal. */ void _murphyParaline(SDL_gfxMurphyIterator *m, Sint16 x, Sint16 y, int d1) { int p; d1 = -d1; /* * Lock the surface */ if (SDL_MUSTLOCK(m->dst)) { SDL_LockSurface(m->dst); } for (p = 0; p <= m->u; p++) { pixelColorNolock(m->dst, x, y, m->color); if (d1 <= m->kt) { if (m->oct2 == 0) { x++; } else { if (m->quad4 == 0) { y++; } else { y--; } } d1 += m->kv; } else { x++; if (m->quad4 == 0) { y++; } else { y--; } d1 += m->kd; } } /* Unlock surface */ if (SDL_MUSTLOCK(m->dst)) { SDL_UnlockSurface(m->dst); } m->tempx = x; m->tempy = y; } /*! \brief Internal function to to draw one iteration of the Murphy algorithm. \param m Pointer to struct for murphy iterator. \param miter Iteration count. \param ml1bx X coordinate of a point. \param ml1by Y coordinate of a point. \param ml2bx X coordinate of a point. \param ml2by Y coordinate of a point. \param ml1x X coordinate of a point. \param ml1y Y coordinate of a point. \param ml2x X coordinate of a point. \param ml2y Y coordinate of a point. */ void _murphyIteration(SDL_gfxMurphyIterator *m, Uint8 miter, Uint16 ml1bx, Uint16 ml1by, Uint16 ml2bx, Uint16 ml2by, Uint16 ml1x, Uint16 ml1y, Uint16 ml2x, Uint16 ml2y) { int atemp1, atemp2; int ftmp1, ftmp2; Uint16 m1x, m1y, m2x, m2y; Uint16 fix, fiy, lax, lay, curx, cury; Sint32 px[4], py[4]; SDL_gfxBresenhamIterator b; if (miter > 1) { if (m->first1x != -32768) { fix = (m->first1x + m->first2x) / 2; fiy = (m->first1y + m->first2y) / 2; lax = (m->last1x + m->last2x) / 2; lay = (m->last1y + m->last2y) / 2; curx = (ml1x + ml2x) / 2; cury = (ml1y + ml2y) / 2; atemp1 = (fix - curx); atemp2 = (fiy - cury); ftmp1 = atemp1 * atemp1 + atemp2 * atemp2; atemp1 = (lax - curx); atemp2 = (lay - cury); ftmp2 = atemp1 * atemp1 + atemp2 * atemp2; if (ftmp1 <= ftmp2) { m1x = m->first1x; m1y = m->first1y; m2x = m->first2x; m2y = m->first2y; } else { m1x = m->last1x; m1y = m->last1y; m2x = m->last2x; m2y = m->last2y; } atemp1 = (m2x - ml2x); atemp2 = (m2y - ml2y); ftmp1 = atemp1 * atemp1 + atemp2 * atemp2; atemp1 = (m2x - ml2bx); atemp2 = (m2y - ml2by); ftmp2 = atemp1 * atemp1 + atemp2 * atemp2; if (ftmp2 >= ftmp1) { ftmp1 = ml2bx; ftmp2 = ml2by; ml2bx = ml2x; ml2by = ml2y; ml2x = ftmp1; ml2y = ftmp2; ftmp1 = ml1bx; ftmp2 = ml1by; ml1bx = ml1x; ml1by = ml1y; ml1x = ftmp1; ml1y = ftmp2; } /* * Lock the surface */ if (SDL_MUSTLOCK(m->dst)) { SDL_LockSurface(m->dst); } _bresenhamInitialize(&b, m2x, m2y, m1x, m1y); do { pixelColorNolock(m->dst, b.x, b.y, m->color); } while (_bresenhamIterate(&b)==0); _bresenhamInitialize(&b, m1x, m1y, ml1bx, ml1by); do { pixelColorNolock(m->dst, b.x, b.y, m->color); } while (_bresenhamIterate(&b)==0); _bresenhamInitialize(&b, ml1bx, ml1by, ml2bx, ml2by); do { pixelColorNolock(m->dst, b.x, b.y, m->color); } while (_bresenhamIterate(&b)==0); _bresenhamInitialize(&b, ml2bx, ml2by, m2x, m2y); do { pixelColorNolock(m->dst, b.x, b.y, m->color); } while (_bresenhamIterate(&b)==0); /* Unlock surface */ if (SDL_MUSTLOCK(m->dst)) { SDL_UnlockSurface(m->dst); } px[0] = m1x; px[1] = m2x; px[2] = ml1bx; px[3] = ml2bx; py[0] = m1y; py[1] = m2y; py[2] = ml1by; py[3] = ml2by; polygonColor(m->dst, (Sint16 *)px, (Sint16 *)py, 4, m->color); } } m->last1x = ml1x; m->last1y = ml1y; m->last2x = ml2x; m->last2y = ml2y; m->first1x = ml1bx; m->first1y = ml1by; m->first2x = ml2bx; m->first2y = ml2by; } #define HYPOT(x,y) sqrt((double)(x)*(double)(x)+(double)(y)*(double)(y)) /*! \brief Internal function to to draw wide lines with Murphy algorithm. Draws lines parallel to ideal line. \param m Pointer to struct for murphy iterator. \param x1 X coordinate of first point. \param y1 Y coordinate of first point. \param x2 X coordinate of second point. \param y2 Y coordinate of second point. \param width Width of line. \param miter Iteration count. */ void _murphyWideline(SDL_gfxMurphyIterator *m, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 miter) { float offset = (float)width / 2.f; Sint16 temp; Sint16 ptx, pty, ptxx, ptxy, ml1x, ml1y, ml2x, ml2y, ml1bx, ml1by, ml2bx, ml2by; int d0, d1; /* difference terms d0=perpendicular to line, d1=along line */ int q; /* pel counter,q=perpendicular to line */ int tmp; int dd; /* distance along line */ int tk; /* thickness threshold */ double ang; /* angle for initial point calculation */ double sang, cang; /* Initialisation */ m->u = x2 - x1; /* delta x */ m->v = y2 - y1; /* delta y */ if (m->u < 0) { /* swap to make sure we are in quadrants 1 or 4 */ temp = x1; x1 = x2; x2 = temp; temp = y1; y1 = y2; y1 = temp; m->u *= -1; m->v *= -1; } if (m->v < 0) { /* swap to 1st quadrant and flag */ m->v *= -1; m->quad4 = 1; } else { m->quad4 = 0; } if (m->v > m->u) { /* swap things if in 2 octant */ tmp = m->u; m->u = m->v; m->v = tmp; m->oct2 = 1; } else { m->oct2 = 0; } m->ku = m->u + m->u; /* change in l for square shift */ m->kv = m->v + m->v; /* change in d for square shift */ m->kd = m->kv - m->ku; /* change in d for diagonal shift */ m->kt = m->u - m->kv; /* diag/square decision threshold */ d0 = 0; d1 = 0; dd = 0; ang = atan((double) m->v / (double) m->u); /* calc new initial point - offset both sides of ideal */ sang = sin(ang); cang = cos(ang); if (m->oct2 == 0) { ptx = x1 + (Sint16)lrint(offset * sang); if (m->quad4 == 0) { pty = y1 - (Sint16)lrint(offset * cang); } else { pty = y1 + (Sint16)lrint(offset * cang); } } else { ptx = x1 - (Sint16)lrint(offset * cang); if (m->quad4 == 0) { pty = y1 + (Sint16)lrint(offset * sang); } else { pty = y1 - (Sint16)lrint(offset * sang); } } /* used here for constant thickness line */ tk = (int) (4. * HYPOT(ptx - x1, pty - y1) * HYPOT(m->u, m->v)); if (miter == 0) { m->first1x = -32768; m->first1y = -32768; m->first2x = -32768; m->first2y = -32768; m->last1x = -32768; m->last1y = -32768; m->last2x = -32768; m->last2y = -32768; } ptxx = ptx; ptxy = pty; for (q = 0; dd <= tk; q++) { /* outer loop, stepping perpendicular to line */ _murphyParaline(m, ptx, pty, d1); /* call to inner loop - right edge */ if (q == 0) { ml1x = ptx; ml1y = pty; ml1bx = m->tempx; ml1by = m->tempy; } else { ml2x = ptx; ml2y = pty; ml2bx = m->tempx; ml2by = m->tempy; } if (d0 < m->kt) { /* square move */ if (m->oct2 == 0) { if (m->quad4 == 0) { pty++; } else { pty--; } } else { ptx++; } } else { /* diagonal move */ dd += m->kv; d0 -= m->ku; if (d1 < m->kt) { /* normal diagonal */ if (m->oct2 == 0) { ptx--; if (m->quad4 == 0) { pty++; } else { pty--; } } else { ptx++; if (m->quad4 == 0) { pty--; } else { pty++; } } d1 += m->kv; } else { /* double square move, extra parallel line */ if (m->oct2 == 0) { ptx--; } else { if (m->quad4 == 0) { pty--; } else { pty++; } } d1 += m->kd; if (dd > tk) { _murphyIteration(m, miter, ml1bx, ml1by, ml2bx, ml2by, ml1x, ml1y, ml2x, ml2y); return; /* breakout on the extra line */ } _murphyParaline(m, ptx, pty, d1); if (m->oct2 == 0) { if (m->quad4 == 0) { pty++; } else { pty--; } } else { ptx++; } } } dd += m->ku; d0 += m->kv; } _murphyIteration(m, miter, ml1bx, ml1by, ml2bx, ml2by, ml1x, ml1y, ml2x, ml2y); } /*! \brief Draw a thick line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param width Width of the line in pixels. Must be >0. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int thickLineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color) { SDL_gfxMurphyIterator m; if (dst == NULL) return -1; if (width < 1) return -1; m.dst = dst; m.color = color; _murphyWideline(&m, x1, y1, x2, y2, width, 0); _murphyWideline(&m, x1, y1, x2, y2, width, 1); return(0); } /*! \brief Draw a thick line with alpha blending. \param dst The surface to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param width Width of the line in pixels. Must be >0. \param r The red value of the character to draw. \param g The green value of the character to draw. \param b The blue value of the character to draw. \param a The alpha value of the character to draw. \returns Returns 0 on success, -1 on failure. */ int thickLineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (thickLineColor(dst, x1, y1, x2, y2, width, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/SDL_gfx/SDL_gfxPrimitives.h0000644000175100001770000002500514676242340020513 0ustar00runnerdocker/* SDL_gfxPrimitives: graphics primitives for SDL LGPL (c) A. Schiffler */ #ifndef _SDL_gfxPrimitives_h #define _SDL_gfxPrimitives_h #include #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif #include "SDL.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* ----- Versioning */ #define SDL_GFXPRIMITIVES_MAJOR 2 #define SDL_GFXPRIMITIVES_MINOR 0 #define SDL_GFXPRIMITIVES_MICRO 23 /* ---- Function Prototypes */ #ifdef _MSC_VER # if defined(DLL_EXPORT) && !defined(LIBSDL_GFX_DLL_IMPORT) # define SDL_GFXPRIMITIVES_SCOPE __declspec(dllexport) # else # ifdef LIBSDL_GFX_DLL_IMPORT # define SDL_GFXPRIMITIVES_SCOPE __declspec(dllimport) # endif # endif #endif #ifndef SDL_GFXPRIMITIVES_SCOPE # define SDL_GFXPRIMITIVES_SCOPE extern #endif /* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */ /* Pixel */ SDL_GFXPRIMITIVES_SCOPE int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Horizontal line */ SDL_GFXPRIMITIVES_SCOPE int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Vertical line */ SDL_GFXPRIMITIVES_SCOPE int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Rectangle */ SDL_GFXPRIMITIVES_SCOPE int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Rounded-Corner Rectangle */ SDL_GFXPRIMITIVES_SCOPE int roundedRectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Filled rectangle (Box) */ SDL_GFXPRIMITIVES_SCOPE int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Rounded-Corner Filled rectangle (Box) */ SDL_GFXPRIMITIVES_SCOPE int roundedBoxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int roundedBoxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Line */ SDL_GFXPRIMITIVES_SCOPE int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* AA Line */ SDL_GFXPRIMITIVES_SCOPE int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Thick Line */ SDL_GFXPRIMITIVES_SCOPE int thickLineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int thickLineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Circle */ SDL_GFXPRIMITIVES_SCOPE int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Arc */ SDL_GFXPRIMITIVES_SCOPE int arcColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int arcRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Circle */ SDL_GFXPRIMITIVES_SCOPE int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Circle */ SDL_GFXPRIMITIVES_SCOPE int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Ellipse */ SDL_GFXPRIMITIVES_SCOPE int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Ellipse */ SDL_GFXPRIMITIVES_SCOPE int aaellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Ellipse */ SDL_GFXPRIMITIVES_SCOPE int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Pie */ SDL_GFXPRIMITIVES_SCOPE int pieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int pieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Filled Pie */ SDL_GFXPRIMITIVES_SCOPE int filledPieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int filledPieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Trigon */ SDL_GFXPRIMITIVES_SCOPE int trigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int trigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA-Trigon */ SDL_GFXPRIMITIVES_SCOPE int aatrigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int aatrigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Trigon */ SDL_GFXPRIMITIVES_SCOPE int filledTrigonColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int filledTrigonRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Polygon */ SDL_GFXPRIMITIVES_SCOPE int polygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int polygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA-Polygon */ SDL_GFXPRIMITIVES_SCOPE int aapolygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int aapolygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Polygon */ SDL_GFXPRIMITIVES_SCOPE int filledPolygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int filledPolygonRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); SDL_GFXPRIMITIVES_SCOPE int texturedPolygon(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture,int texture_dx,int texture_dy); /* (Note: These MT versions are required for multi-threaded operation.) */ SDL_GFXPRIMITIVES_SCOPE int filledPolygonColorMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color, int **polyInts, int *polyAllocated); SDL_GFXPRIMITIVES_SCOPE int filledPolygonRGBAMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated); SDL_GFXPRIMITIVES_SCOPE int texturedPolygonMT(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture,int texture_dx,int texture_dy, int **polyInts, int *polyAllocated); /* Bezier */ SDL_GFXPRIMITIVES_SCOPE int bezierColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int bezierRGBA(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #if 0 /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Characters/Strings */ SDL_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch); SDL_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation); SDL_GFXPRIMITIVES_SCOPE int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); SDL_GFXPRIMITIVES_SCOPE int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, const char *s, Uint32 color); SDL_GFXPRIMITIVES_SCOPE int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif /********** CURRENTLY NOT USED BY pygame.gfxdraw **********/ /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #endif /* _SDL_gfxPrimitives_h */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/SDL_gfx/SDL_gfxPrimitives_font.h0000644000175100001770000015513314676242340021547 0ustar00runnerdocker /* ---- 8x8 font definition ---- */ /* LGPL (c) A. Schiffler */ #define GFX_FONTDATAMAX (8*256) static unsigned char gfxPrimitivesFontdata[GFX_FONTDATAMAX] = { /* * 0 0x00 '^@' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 1 0x01 '^A' */ 0x7e, /* 01111110 */ 0x81, /* 10000001 */ 0xa5, /* 10100101 */ 0x81, /* 10000001 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0x81, /* 10000001 */ 0x7e, /* 01111110 */ /* * 2 0x02 '^B' */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xdb, /* 11011011 */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ /* * 3 0x03 '^C' */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 4 0x04 '^D' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 5 0x05 '^E' */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 6 0x06 '^F' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 7 0x07 '^G' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 8 0x08 '^H' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xe7, /* 11100111 */ 0xc3, /* 11000011 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 9 0x09 '^I' */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x42, /* 01000010 */ 0x42, /* 01000010 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 10 0x0a '^J' */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0x99, /* 10011001 */ 0xbd, /* 10111101 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0xc3, /* 11000011 */ 0xff, /* 11111111 */ /* * 11 0x0b '^K' */ 0x0f, /* 00001111 */ 0x07, /* 00000111 */ 0x0f, /* 00001111 */ 0x7d, /* 01111101 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ /* * 12 0x0c '^L' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ /* * 13 0x0d '^M' */ 0x3f, /* 00111111 */ 0x33, /* 00110011 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x70, /* 01110000 */ 0xf0, /* 11110000 */ 0xe0, /* 11100000 */ /* * 14 0x0e '^N' */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x63, /* 01100011 */ 0x67, /* 01100111 */ 0xe6, /* 11100110 */ 0xc0, /* 11000000 */ /* * 15 0x0f '^O' */ 0x18, /* 00011000 */ 0xdb, /* 11011011 */ 0x3c, /* 00111100 */ 0xe7, /* 11100111 */ 0xe7, /* 11100111 */ 0x3c, /* 00111100 */ 0xdb, /* 11011011 */ 0x18, /* 00011000 */ /* * 16 0x10 '^P' */ 0x80, /* 10000000 */ 0xe0, /* 11100000 */ 0xf8, /* 11111000 */ 0xfe, /* 11111110 */ 0xf8, /* 11111000 */ 0xe0, /* 11100000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 17 0x11 '^Q' */ 0x02, /* 00000010 */ 0x0e, /* 00001110 */ 0x3e, /* 00111110 */ 0xfe, /* 11111110 */ 0x3e, /* 00111110 */ 0x0e, /* 00001110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 18 0x12 '^R' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ /* * 19 0x13 '^S' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 20 0x14 '^T' */ 0x7f, /* 01111111 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7b, /* 01111011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x00, /* 00000000 */ /* * 21 0x15 '^U' */ 0x3e, /* 00111110 */ 0x61, /* 01100001 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x86, /* 10000110 */ 0x7c, /* 01111100 */ /* * 22 0x16 '^V' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 23 0x17 '^W' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ /* * 24 0x18 '^X' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 25 0x19 '^Y' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 26 0x1a '^Z' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 27 0x1b '^[' */ 0x00, /* 00000000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xfe, /* 11111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 28 0x1c '^\' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 29 0x1d '^]' */ 0x00, /* 00000000 */ 0x24, /* 00100100 */ 0x66, /* 01100110 */ 0xff, /* 11111111 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 30 0x1e '^^' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 31 0x1f '^_' */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 32 0x20 ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 33 0x21 '!' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 34 0x22 '"' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 35 0x23 '#' */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 36 0x24 '$' */ 0x18, /* 00011000 */ 0x3e, /* 00111110 */ 0x60, /* 01100000 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0x7c, /* 01111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 37 0x25 '%' */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 38 0x26 '&' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 39 0x27 ''' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 40 0x28 '(' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ /* * 41 0x29 ')' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 42 0x2a '*' */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0xff, /* 11111111 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 43 0x2b '+' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 44 0x2c ',' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 45 0x2d '-' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 46 0x2e '.' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 47 0x2f '/' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 48 0x30 '0' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 49 0x31 '1' */ 0x18, /* 00011000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 50 0x32 '2' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x1c, /* 00011100 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 51 0x33 '3' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 52 0x34 '4' */ 0x1c, /* 00011100 */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 53 0x35 '5' */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 54 0x36 '6' */ 0x38, /* 00111000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 55 0x37 '7' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 56 0x38 '8' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 57 0x39 '9' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 58 0x3a ':' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 59 0x3b ';' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 60 0x3c '<' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ /* * 61 0x3d '=' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 62 0x3e '>' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x00, /* 00000000 */ /* * 63 0x3f '?' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 64 0x40 '@' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xc0, /* 11000000 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 65 0x41 'A' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 66 0x42 'B' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 67 0x43 'C' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 68 0x44 'D' */ 0xf8, /* 11111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ /* * 69 0x45 'E' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x62, /* 01100010 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 70 0x46 'F' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 71 0x47 'G' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xce, /* 11001110 */ 0x66, /* 01100110 */ 0x3a, /* 00111010 */ 0x00, /* 00000000 */ /* * 72 0x48 'H' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 73 0x49 'I' */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 74 0x4a 'J' */ 0x1e, /* 00011110 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 75 0x4b 'K' */ 0xe6, /* 11100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 76 0x4c 'L' */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x62, /* 01100010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 77 0x4d 'M' */ 0xc6, /* 11000110 */ 0xee, /* 11101110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 78 0x4e 'N' */ 0xc6, /* 11000110 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 79 0x4f 'O' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 80 0x50 'P' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 81 0x51 'Q' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xce, /* 11001110 */ 0x7c, /* 01111100 */ 0x0e, /* 00001110 */ /* * 82 0x52 'R' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 83 0x53 'S' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 84 0x54 'T' */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x5a, /* 01011010 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 85 0x55 'U' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 86 0x56 'V' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 87 0x57 'W' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 88 0x58 'X' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 89 0x59 'Y' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 90 0x5a 'Z' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x8c, /* 10001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 91 0x5b '[' */ 0x3c, /* 00111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 92 0x5c '\' */ 0xc0, /* 11000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 93 0x5d ']' */ 0x3c, /* 00111100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 94 0x5e '^' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 95 0x5f '_' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ /* * 96 0x60 '`' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 97 0x61 'a' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 98 0x62 'b' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ /* * 99 0x63 'c' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 100 0x64 'd' */ 0x1c, /* 00011100 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 101 0x65 'e' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 102 0x66 'f' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x60, /* 01100000 */ 0xf8, /* 11111000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 103 0x67 'g' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0xf8, /* 11111000 */ /* * 104 0x68 'h' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x6c, /* 01101100 */ 0x76, /* 01110110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 105 0x69 'i' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 106 0x6a 'j' */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ /* * 107 0x6b 'k' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 108 0x6c 'l' */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 109 0x6d 'm' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xec, /* 11101100 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0x00, /* 00000000 */ /* * 110 0x6e 'n' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 111 0x6f 'o' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 112 0x70 'p' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ /* * 113 0x71 'q' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ /* * 114 0x72 'r' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 115 0x73 's' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 116 0x74 't' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0xfc, /* 11111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x36, /* 00110110 */ 0x1c, /* 00011100 */ 0x00, /* 00000000 */ /* * 117 0x75 'u' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 118 0x76 'v' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 119 0x77 'w' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 120 0x78 'x' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 121 0x79 'y' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 122 0x7a 'z' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x4c, /* 01001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 123 0x7b '{' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x00, /* 00000000 */ /* * 124 0x7c '|' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 125 0x7d '}' */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 126 0x7e '~' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 127 0x7f '' */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 128 0x80 '' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ /* * 129 0x81 '' */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 130 0x82 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 131 0x83 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 132 0x84 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 133 0x85 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 134 0x86 '' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 135 0x87 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x0c, /* 00001100 */ 0x38, /* 00111000 */ /* * 136 0x88 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 137 0x89 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 138 0x8a '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 139 0x8b '' */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 140 0x8c '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 141 0x8d '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 142 0x8e '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 143 0x8f '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 144 0x90 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xf8, /* 11111000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 145 0x91 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 146 0x92 '' */ 0x3e, /* 00111110 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 147 0x93 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 148 0x94 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 149 0x95 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 150 0x96 '' */ 0x78, /* 01111000 */ 0x84, /* 10000100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 151 0x97 '' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 152 0x98 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 153 0x99 '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 154 0x9a '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 155 0x9b '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 156 0x9c '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x64, /* 01100100 */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 157 0x9d '' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 158 0x9e '' */ 0xf8, /* 11111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xfa, /* 11111010 */ 0xc6, /* 11000110 */ 0xcf, /* 11001111 */ 0xc6, /* 11000110 */ 0xc7, /* 11000111 */ /* * 159 0x9f '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 160 0xa0 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 161 0xa1 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 162 0xa2 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 163 0xa3 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 164 0xa4 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 165 0xa5 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 166 0xa6 '' */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 167 0xa7 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 168 0xa8 '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x63, /* 01100011 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ /* * 169 0xa9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 170 0xaa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 171 0xab '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7e, /* 01111110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x0f, /* 00001111 */ /* * 172 0xac '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7a, /* 01111010 */ 0x36, /* 00110110 */ 0x6a, /* 01101010 */ 0xdf, /* 11011111 */ 0x06, /* 00000110 */ /* * 173 0xad '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 174 0xae '' */ 0x00, /* 00000000 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 175 0xaf '' */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 176 0xb0 '' */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ /* * 177 0xb1 '' */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ /* * 178 0xb2 '' */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ /* * 179 0xb3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 180 0xb4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 181 0xb5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 182 0xb6 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 183 0xb7 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 184 0xb8 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 185 0xb9 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 186 0xba '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 187 0xbb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 188 0xbc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 189 0xbd '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 190 0xbe '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 191 0xbf '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 192 0xc0 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 193 0xc1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 194 0xc2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 195 0xc3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 196 0xc4 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 197 0xc5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 198 0xc6 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 199 0xc7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 200 0xc8 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 201 0xc9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 202 0xca '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 203 0xcb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 204 0xcc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 205 0xcd '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 206 0xce '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 207 0xcf '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 208 0xd0 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 209 0xd1 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 210 0xd2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 211 0xd3 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 212 0xd4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 213 0xd5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 214 0xd6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 215 0xd7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 216 0xd8 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 217 0xd9 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 218 0xda '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 219 0xdb '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 220 0xdc '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 221 0xdd '' */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ /* * 222 0xde '' */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ /* * 223 0xdf '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 224 0xe0 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xc8, /* 11001000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 225 0xe1 '' */ 0x78, /* 01111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xd8, /* 11011000 */ 0xcc, /* 11001100 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ /* * 226 0xe2 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ /* * 227 0xe3 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 228 0xe4 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 229 0xe5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 230 0xe6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0xc0, /* 11000000 */ /* * 231 0xe7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 232 0xe8 '' */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ /* * 233 0xe9 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 234 0xea '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xee, /* 11101110 */ 0x00, /* 00000000 */ /* * 235 0xeb '' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x3e, /* 00111110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 236 0xec '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 237 0xed '' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ /* * 238 0xee '' */ 0x1e, /* 00011110 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 239 0xef '' */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 240 0xf0 '' */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 241 0xf1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 242 0xf2 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 243 0xf3 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 244 0xf4 '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 245 0xf5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ /* * 246 0xf6 '' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 247 0xf7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 248 0xf8 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 249 0xf9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 250 0xfa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 251 0xfb '' */ 0x0f, /* 00001111 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xec, /* 11101100 */ 0x6c, /* 01101100 */ 0x3c, /* 00111100 */ 0x1c, /* 00011100 */ /* * 252 0xfc '' */ 0x6c, /* 01101100 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 253 0xfd '' */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 254 0xfe '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 255 0xff ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ }; ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.002112 pygame-2.6.1/src_c/_blit_info.h0000644000175100001770000000072614676242340015772 0ustar00runnerdocker#define NO_PYGAME_C_API #include "_surface.h" /* The structure passed to the low level blit functions */ typedef struct { int width; int height; Uint8 *s_pixels; int s_pxskip; int s_skip; Uint8 *d_pixels; int d_pxskip; int d_skip; SDL_PixelFormat *src; SDL_PixelFormat *dst; Uint8 src_blanket_alpha; int src_has_colorkey; Uint32 src_colorkey; SDL_BlendMode src_blend; SDL_BlendMode dst_blend; } SDL_BlitInfo; ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_camera.c0000644000175100001770000016654214676242340015261 0ustar00runnerdocker/* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * Camera - webcam support for pygame * Author: Nirav Patel * * This module allows for use of v4l2 webcams in pygame. The code is written * such that adding support for vfw cameras should be possible without * much modification of existing functions. v4l2 functions are kept separate * from functions available to pygame users and generic functions like * colorspace conversion. * * There is currently support for cameras that support MMAP and use * pixelformats of RGB24, RGB444, YUYV, SBGGR8, and YUV420. To add support for * additional pixelformats, add them to v4l2_init_device and * v4l2_process_image, and add functions to convert the format to packed RGB, * YUV, and HSV. */ #include "camera.h" #include "pgcompat.h" /* #if defined(__unix__) || !defined(__APPLE__) #else #define V4L2_PIX_FMT_RGB24 1 #define V4L2_PIX_FMT_RGB444 1 #endif */ /* functions available to pygame users */ PyObject * surf_colorspace(PyObject *self, PyObject *arg); PyObject * list_cameras(PyObject *self, PyObject *arg); PyObject * camera_start(pgCameraObject *self, PyObject *args); PyObject * camera_stop(pgCameraObject *self, PyObject *args); PyObject * camera_get_controls(pgCameraObject *self, PyObject *args); PyObject * camera_set_controls(pgCameraObject *self, PyObject *arg, PyObject *kwds); PyObject * camera_get_size(pgCameraObject *self, PyObject *args); PyObject * camera_query_image(pgCameraObject *self, PyObject *args); PyObject * camera_get_image(pgCameraObject *self, PyObject *arg); PyObject * camera_get_raw(pgCameraObject *self, PyObject *args); /* * Functions available to pygame users. The idea is to make these as simple as * possible, and merely have them call functions specific to the type of * camera being used to do all the real work. It currently just calls v4l2_* * functions, but it could check something like self->cameratype and depending * on the result, call v4l, v4l2, vfw, or other functions. */ /* colorspace() - Surface colorspace conversion */ PyObject * surf_colorspace(PyObject *self, PyObject *arg) { pgSurfaceObject *surfobj, *surfobj2; SDL_Surface *surf, *newsurf; char *color; int cspace; surfobj2 = NULL; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure color is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(color = "inited"); #endif /*get all the arguments*/ if (!PyArg_ParseTuple(arg, "O!s|O!", &pgSurface_Type, &surfobj, &color, &pgSurface_Type, &surfobj2)) return NULL; if (!strcmp(color, "YUV")) { cspace = YUV_OUT; } else if (!strcmp(color, "HSV")) { cspace = HSV_OUT; } else { return RAISE(PyExc_ValueError, "Incorrect colorspace value"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!surfobj2) { newsurf = SDL_CreateRGBSurface( 0, surf->w, surf->h, surf->format->BitsPerPixel, surf->format->Rmask, surf->format->Gmask, surf->format->Bmask, surf->format->Amask); if (!newsurf) { return NULL; } } else { newsurf = pgSurface_AsSurface(surfobj2); if (!newsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } /* check to see if the size is the same. */ if (newsurf->w != surf->w || newsurf->h != surf->h) return RAISE(PyExc_ValueError, "Surfaces not the same width and height."); /* check to see if the format of the surface is the same. */ if (surf->format->BitsPerPixel != newsurf->format->BitsPerPixel) return RAISE(PyExc_ValueError, "Surfaces not the same depth"); SDL_LockSurface(newsurf); pgSurface_Lock(surfobj); Py_BEGIN_ALLOW_THREADS; colorspace(surf, newsurf, cspace); Py_END_ALLOW_THREADS; pgSurface_Unlock(surfobj); SDL_UnlockSurface(newsurf); if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } /* list_cameras() - lists cameras available on the computer */ PyObject * list_cameras(PyObject *self, PyObject *_null) { #if defined(__unix__) PyObject *ret_list; PyObject *string; char **devices; int j, i = 0, num_devices = 0; /* TODO for future PRs: errors in these functions are being ignored as * of now, and an empty list is being returned by this function */ #if defined(__unix__) devices = v4l2_list_cameras(&num_devices); ret_list = PyList_New(num_devices); if (!ret_list) { goto error; } for (i = 0; i < num_devices; i++) { string = PyUnicode_FromString(devices[i]); #endif if (!string) { goto error; } /* steals reference to 'string' */ PyList_SET_ITEM(ret_list, i, string); free(devices[i]); } free(devices); return ret_list; error: /* free the remaining devices */ for (j = i; j < num_devices; j++) { free(devices[j]); } free(devices); Py_XDECREF(ret_list); return NULL; #else Py_RETURN_NONE; #endif } /* start() - opens, inits, and starts capturing on the camera */ PyObject * camera_start(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) if (v4l2_open_device(self) == 0) { v4l2_close_device(self); return NULL; } else { self->camera_type = CAM_V4L2; if (v4l2_init_device(self) == 0) { v4l2_close_device(self); return NULL; } if (v4l2_start_capturing(self) == 0) { v4l2_close_device(self); return NULL; } } #endif Py_RETURN_NONE; } /* stop() - stops capturing, uninits, and closes the camera */ PyObject * camera_stop(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) if (v4l2_stop_capturing(self) == 0) return NULL; if (v4l2_uninit_device(self) == 0) return NULL; if (v4l2_close_device(self) == 0) return NULL; #endif Py_RETURN_NONE; } /* get_controls() - gets current values of user controls */ /* TODO: Support brightness, contrast, and other common controls */ PyObject * camera_get_controls(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) int value; if (v4l2_get_control(self->fd, V4L2_CID_HFLIP, &value)) self->hflip = value; if (v4l2_get_control(self->fd, V4L2_CID_VFLIP, &value)) self->vflip = value; if (v4l2_get_control(self->fd, V4L2_CID_BRIGHTNESS, &value)) self->brightness = value; return Py_BuildValue("(NNN)", PyBool_FromLong(self->hflip), PyBool_FromLong(self->vflip), PyLong_FromLong(self->brightness)); #endif Py_RETURN_NONE; } /* set_controls() - changes camera settings if supported by the camera */ PyObject * camera_set_controls(pgCameraObject *self, PyObject *arg, PyObject *kwds) { #if defined(__unix__) int hflip = 0, vflip = 0, brightness = 0; char *kwids[] = {"hflip", "vflip", "brightness", NULL}; camera_get_controls(self, NULL); hflip = self->hflip; vflip = self->vflip; brightness = self->brightness; if (!PyArg_ParseTupleAndKeywords(arg, kwds, "|iii", kwids, &hflip, &vflip, &brightness)) return NULL; /* #if defined(__unix__) */ if (v4l2_set_control(self->fd, V4L2_CID_HFLIP, hflip)) self->hflip = hflip; if (v4l2_set_control(self->fd, V4L2_CID_VFLIP, vflip)) self->vflip = vflip; if (v4l2_set_control(self->fd, V4L2_CID_BRIGHTNESS, brightness)) self->brightness = brightness; return Py_BuildValue("(NNN)", PyBool_FromLong(self->hflip), PyBool_FromLong(self->vflip), PyLong_FromLong(self->brightness)); #endif Py_RETURN_NONE; } /* get_size() - returns the dimensions of the images being recorded */ PyObject * camera_get_size(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) return Py_BuildValue("(ii)", self->width, self->height); #endif Py_RETURN_NONE; } /* query_image() - checks if a frame is ready */ PyObject * camera_query_image(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) return PyBool_FromLong(v4l2_query_buffer(self)); #endif Py_RETURN_TRUE; } /* get_image() - returns an RGB Surface */ /* code to reuse Surface from René Dudfield */ PyObject * camera_get_image(pgCameraObject *self, PyObject *arg) { #if defined(__unix__) SDL_Surface *surf = NULL; pgSurfaceObject *surfobj = NULL; int ret, errno_code = 0; if (!PyArg_ParseTuple(arg, "|O!", &pgSurface_Type, &surfobj)) return NULL; if (!surfobj) { surf = SDL_CreateRGBSurface(0, self->width, self->height, 24, 0xFF << 16, 0xFF << 8, 0xFF, 0); } else { surf = pgSurface_AsSurface(surfobj); } if (!surf) return NULL; if (surf->w != self->width || surf->h != self->height) { return RAISE(PyExc_ValueError, "Destination surface not the correct width or height."); } Py_BEGIN_ALLOW_THREADS; ret = v4l2_read_frame(self, surf, &errno_code); Py_END_ALLOW_THREADS; if (!ret) { /* error occurred */ if (errno_code) { PyErr_Format(PyExc_SystemError, "ioctl(VIDIOC_DQBUF) failure : %d, %s", errno_code, strerror(errno_code)); return NULL; } return RAISE(PyExc_SystemError, "image processing error"); } if (surfobj) { Py_INCREF(surfobj); return (PyObject *)surfobj; } else { return (PyObject *)pgSurface_New(surf); } #endif Py_RETURN_NONE; } /* get_raw() - returns an unmodified image as a string from the buffer */ PyObject * camera_get_raw(pgCameraObject *self, PyObject *_null) { #if defined(__unix__) return v4l2_read_raw(self); #endif Py_RETURN_NONE; } /* * Pixelformat conversion functions */ /* converts from rgb Surface to yuv or hsv */ /* TODO: Allow for conversion from yuv and hsv to all */ void colorspace(SDL_Surface *src, SDL_Surface *dst, int cspace) { switch (cspace) { case YUV_OUT: rgb_to_yuv(src->pixels, dst->pixels, src->h * src->w, 0, src->format); break; case HSV_OUT: rgb_to_hsv(src->pixels, dst->pixels, src->h * src->w, 0, src->format); break; } } /* converts pretty directly if its already RGB24 */ void rgb24_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s = (Uint8 *)src; Uint8 *d8; Uint16 *d16; Uint32 *d32; Uint8 r, g, b; int rshift, gshift, bshift, rloss, gloss, bloss; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; switch (format->BytesPerPixel) { case 1: d8 = (Uint8 *)dst; while (length--) { r = *s++; g = *s++; b = *s++; *d8++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 2: d16 = (Uint16 *)dst; while (length--) { r = *s++; g = *s++; b = *s++; *d16++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 3: d8 = (Uint8 *)dst; while (length--) { *d8++ = *(s + 2); /* blue */ *d8++ = *(s + 1); /* green */ *d8++ = *s; /* red */ s += 3; } break; default: d32 = (Uint32 *)dst; while (length--) { r = *s++; g = *s++; b = *s++; *d32++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; } } /* slight variation on rgb24_to_rgb, just drops the 4th byte of each pixel, * changes the R, G, B ordering. */ void bgr32_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s = (Uint8 *)src; Uint8 *d8; Uint16 *d16; Uint32 *d32; Uint8 r, g, b; int rshift, gshift, bshift, rloss, gloss, bloss; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; switch (format->BytesPerPixel) { case 1: d8 = (Uint8 *)dst; while (length--) { b = *s++; g = *s++; r = *s++; s++; *d8++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 2: d16 = (Uint16 *)dst; while (length--) { b = *s++; g = *s++; r = *s++; s++; *d16++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 3: d8 = (Uint8 *)dst; while (length--) { *d8++ = *s; /* red */ *d8++ = *(s + 1); /* green */ *d8++ = *(s + 2); /* blue */ s += 4; } break; default: d32 = (Uint32 *)dst; while (length--) { b = *s++; g = *s++; r = *s++; s++; *d32++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; } } /* converts packed rgb to packed hsv. formulas modified from wikipedia */ void rgb_to_hsv(const void *src, void *dst, int length, unsigned long source, SDL_PixelFormat *format) { Uint8 *s8, *d8; Uint16 *s16, *d16; Uint32 *s32, *d32; Uint8 r, g, b, p1, p2, h, s, v, max, min, delta; int rshift, gshift, bshift, rloss, gloss, bloss; s8 = (Uint8 *)src; s16 = (Uint16 *)src; s32 = (Uint32 *)src; d8 = (Uint8 *)dst; d16 = (Uint16 *)dst; d32 = (Uint32 *)dst; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; /* you could stick the if statement inside the loop, but I'm sacrificing a a few hundred bytes for a little performance */ /* 10 yrs later... about that... */ if (source == V4L2_PIX_FMT_RGB444 || source == V4L2_PIX_FMT_RGB24 || source == V4L2_PIX_FMT_XBGR32) { while (length--) { if (source == V4L2_PIX_FMT_RGB444) { p1 = *s8++; p2 = *s8++; b = p2 << 4; g = p1 & 0xF0; r = p1 << 4; } else if (source == V4L2_PIX_FMT_RGB24) { r = *s8++; g = *s8++; b = *s8++; } else { b = *s8++; g = *s8++; r = *s8++; s8++; } max = MAX(MAX(r, g), b); min = MIN(MIN(r, g), b); delta = max - min; v = max; /* value (similar to luminosity) */ if (!delta) { /* grey, zero hue and saturation */ s = 0; h = 0; } else { s = 255 * delta / max; /* saturation */ if (r == max) { /* set hue based on max color */ h = 43 * (g - b) / delta; } else if (g == max) { h = 85 + 43 * (b - r) / delta; } else { h = 170 + 43 * (r - g) / delta; } } switch (format->BytesPerPixel) { case 1: *d8++ = ((h >> rloss) << rshift) | ((s >> gloss) << gshift) | ((v >> bloss) << bshift); break; case 2: *d16++ = ((h >> rloss) << rshift) | ((s >> gloss) << gshift) | ((v >> bloss) << bshift); break; case 3: *d8++ = v; *d8++ = s; *d8++ = h; break; default: *d32++ = ((h >> rloss) << rshift) | ((s >> gloss) << gshift) | ((v >> bloss) << bshift); break; } } } else { /* for use as stage 2 in yuv or bayer to hsv, r and b switched */ while (length--) { switch (format->BytesPerPixel) { case 1: r = *s8 >> rshift << rloss; g = *s8 >> gshift << gloss; b = *s8++ >> bshift << bloss; break; case 2: r = *s16 >> rshift << rloss; g = *s16 >> gshift << gloss; b = *s16++ >> bshift << bloss; break; case 3: b = *s8++; g = *s8++; r = *s8++; break; default: r = *s32 >> rshift << rloss; g = *s32 >> gshift << gloss; b = *s32++ >> bshift << bloss; break; } max = MAX(MAX(r, g), b); min = MIN(MIN(r, g), b); delta = max - min; v = max; /* value (similar to luminosity) */ if (!delta) { /* grey, zero hue and saturation */ s = 0; h = 0; } else { s = 255 * delta / max; /* saturation */ if (r == max) { /* set hue based on max color */ h = 43 * (g - b) / delta; } else if (g == max) { h = 85 + 43 * (b - r) / delta; } else { h = 170 + 43 * (r - g) / delta; } } switch (format->BytesPerPixel) { case 1: *d8++ = ((h >> rloss) << rshift) | ((s >> gloss) << gshift) | ((v >> bloss) << bshift); break; case 2: *d16++ = ((h >> rloss) << rshift) + ((s >> gloss) << gshift) + ((v >> bloss) << bshift); break; case 3: *d8++ = v; *d8++ = s; *d8++ = h; break; default: *d32++ = ((h >> rloss) << rshift) | ((s >> gloss) << gshift) | ((v >> bloss) << bshift); break; } } } } /* convert packed rgb to yuv. Note that unlike many implementations of YUV, this has a full range of 0-255 for Y, not 16-235. Formulas from wikipedia */ void rgb_to_yuv(const void *src, void *dst, int length, unsigned long source, SDL_PixelFormat *format) { Uint8 *s8, *d8; Uint16 *s16, *d16; Uint32 *s32, *d32; Uint8 r, g, b, y, u, v; Uint8 p1, p2; int rshift, gshift, bshift, rloss, gloss, bloss; s8 = (Uint8 *)src; s16 = (Uint16 *)src; s32 = (Uint32 *)src; d8 = (Uint8 *)dst; d16 = (Uint16 *)dst; d32 = (Uint32 *)dst; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; if (source == V4L2_PIX_FMT_RGB444 || source == V4L2_PIX_FMT_RGB24 || source == V4L2_PIX_FMT_XBGR32) { while (length--) { if (source == V4L2_PIX_FMT_RGB444) { p1 = *s8++; p2 = *s8++; b = p2 << 4; g = p1 & 0xF0; r = p1 << 4; } else if (source == V4L2_PIX_FMT_RGB24) { r = *s8++; g = *s8++; b = *s8++; } else { b = *s8++; g = *s8++; r = *s8++; s8++; } v = ((112 * r - 94 * g - 18 * b + 128) >> 8) + 128; /* V */ u = ((-38 * r - 74 * g + 112 * b + 128) >> 8) + 128; /* U */ y = (77 * r + 150 * g + 29 * b + 128) >> 8; /* Y */ switch (format->BytesPerPixel) { case 1: *d8++ = ((y >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); break; case 2: *d16++ = ((y >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); break; case 3: *d8++ = v; *d8++ = u; *d8++ = y; break; default: *d32++ = ((y >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); break; } } } else { /* for use as stage 2 in bayer to yuv, r and b switched */ switch (format->BytesPerPixel) { case 1: while (length--) { r = *s8 >> rshift << rloss; g = *s8 >> gshift << gloss; b = *s8++ >> bshift << bloss; *d8++ = ((((77 * r + 150 * g + 29 * b + 128) >> 8) >> rloss) << rshift) | (((((-38 * r - 74 * g + 112 * b + 128) >> 8) + 128) >> gloss) << gshift) | (((((112 * r - 94 * g - 18 * b + 128) >> 8) + 128) >> bloss) << bshift); } break; case 2: while (length--) { r = *s16 >> rshift << rloss; g = *s16 >> gshift << gloss; b = *s16++ >> bshift << bloss; *d16++ = ((((77 * r + 150 * g + 29 * b + 128) >> 8) >> rloss) << rshift) | (((((-38 * r - 74 * g + 112 * b + 128) >> 8) + 128) >> gloss) << gshift) | (((((112 * r - 94 * g - 18 * b + 128) >> 8) + 128) >> bloss) << bshift); } break; case 3: while (length--) { b = *s8++; g = *s8++; r = *s8++; *d8++ = ((112 * r - 94 * g - 18 * b + 128) >> 8) + 128; *d8++ = ((-38 * r - 74 * g + 112 * b + 128) >> 8) + 128; *d8++ = (77 * r + 150 * g + 29 * b + 128) >> 8; } break; default: while (length--) { r = *s32 >> rshift << rloss; g = *s32 >> gshift << gloss; b = *s32++ >> bshift << bloss; *d32++ = ((((77 * r + 150 * g + 29 * b + 128) >> 8) >> rloss) << rshift) | (((((-38 * r - 74 * g + 112 * b + 128) >> 8) + 128) >> gloss) << gshift) | (((((112 * r - 94 * g - 18 * b + 128) >> 8) + 128) >> bloss) << bshift); } break; } } } /* Converts from rgb444 (R444) to rgb24 (RGB3) */ void rgb444_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s, *d8; Uint16 *d16; Uint32 *d32; Uint8 p1, p2, r, g, b; int rshift, gshift, bshift, rloss, gloss, bloss; s = (Uint8 *)src; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; switch (format->BytesPerPixel) { case 1: d8 = (Uint8 *)dst; while (length--) { r = *s << 4; g = *s++ & 0xF0; b = *s++ << 4; *d8++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 2: d16 = (Uint16 *)dst; while (length--) { r = *s << 4; g = *s++ & 0xF0; b = *s++ << 4; *d16++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; case 3: d8 = (Uint8 *)dst; while (length--) { p1 = *s++; p2 = *s++; *d8++ = p2 << 4; /* blue */ *d8++ = p1 & 0xF0; /* green */ *d8++ = p1 << 4; /* red */ } break; default: d32 = (Uint32 *)dst; while (length--) { r = *s << 4; g = *s++ & 0xF0; b = *s++ << 4; *d32++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); } break; } } /* convert from 4:2:2 YUYV interlaced to RGB */ /* colorspace conversion routine from libv4l. Licensed LGPL 2.1 (C) 2008 Hans de Goede */ void yuyv_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s, *d8; Uint16 *d16; Uint32 *d32; int i; int r1, g1, b1, r2, b2, g2; int rshift, gshift, bshift, rloss, gloss, bloss, y1, y2, u, v, u1, rg, v1; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; d8 = (Uint8 *)dst; d16 = (Uint16 *)dst; d32 = (Uint32 *)dst; i = length >> 1; s = (Uint8 *)src; /* yuyv packs 2 pixels into every 4 bytes, sharing the u and v color terms between the 2, with each pixel having a unique y luminance term. Thus, we will operate on 2 pixels at a time. */ while (i--) { y1 = *s++; u = *s++; y2 = *s++; v = *s++; /* The lines from here to the switch statement are from libv4l */ u1 = (((u - 128) << 7) + (u - 128)) >> 6; rg = (((u - 128) << 1) + (u - 128) + ((v - 128) << 2) + ((v - 128) << 1)) >> 3; v1 = (((v - 128) << 1) + (v - 128)) >> 1; r1 = SAT2(y1 + v1); g1 = SAT2(y1 - rg); b1 = SAT2(y1 + u1); r2 = SAT2(y2 + v1); g2 = SAT2(y2 - rg); b2 = SAT2(y2 + u1); /* choose the right pixel packing for the destination surface depth */ switch (format->BytesPerPixel) { case 1: *d8++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d8++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; case 2: *d16++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d16++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; case 3: *d8++ = b1; *d8++ = g1; *d8++ = r1; *d8++ = b2; *d8++ = g2; *d8++ = r2; break; default: *d32++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d32++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; } } } /* turn yuyv into packed yuv. */ void yuyv_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s, *d8; Uint8 y1, u, y2, v; Uint16 *d16; Uint32 *d32; int i = length >> 1; int rshift, gshift, bshift, rloss, gloss, bloss; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; s = (Uint8 *)src; switch (format->BytesPerPixel) { case 1: d8 = (Uint8 *)dst; while (i--) { y1 = *s++; u = *s++; y2 = *s++; v = *s++; *d8++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d8++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; case 2: d16 = (Uint16 *)dst; while (i--) { y1 = *s++; u = *s++; y2 = *s++; v = *s++; *d16++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d16++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; case 3: d8 = (Uint8 *)dst; while (i--) { *d8++ = *(s + 3); /* v */ *d8++ = *(s + 1); /* u */ *d8++ = *s; /* y1 */ *d8++ = *(s + 3); /* v */ *d8++ = *(s + 1); /* u */ *d8++ = *(s + 2); /* y2 */ s += 4; } break; default: d32 = (Uint32 *)dst; while (i--) { y1 = *s++; u = *s++; y2 = *s++; v = *s++; *d32++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d32++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; } } /* cribbed from above, but modified for uyvy ordering */ void uyvy_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s, *d8; Uint16 *d16; Uint32 *d32; int i; int r1, g1, b1, r2, b2, g2; int rshift, gshift, bshift, rloss, gloss, bloss, y1, y2, u, v, u1, rg, v1; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; d8 = (Uint8 *)dst; d16 = (Uint16 *)dst; d32 = (Uint32 *)dst; i = length >> 1; s = (Uint8 *)src; /* yuyv packs 2 pixels into every 4 bytes, sharing the u and v color terms between the 2, with each pixel having a unique y luminance term. Thus, we will operate on 2 pixels at a time. */ while (i--) { u = *s++; y1 = *s++; v = *s++; y2 = *s++; /* The lines from here to the switch statement are from libv4l */ u1 = (((u - 128) << 7) + (u - 128)) >> 6; rg = (((u - 128) << 1) + (u - 128) + ((v - 128) << 2) + ((v - 128) << 1)) >> 3; v1 = (((v - 128) << 1) + (v - 128)) >> 1; r1 = SAT2(y1 + v1); g1 = SAT2(y1 - rg); b1 = SAT2(y1 + u1); r2 = SAT2(y2 + v1); g2 = SAT2(y2 - rg); b2 = SAT2(y2 + u1); /* choose the right pixel packing for the destination surface depth */ switch (format->BytesPerPixel) { case 1: *d8++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d8++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; case 2: *d16++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d16++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; case 3: *d8++ = b1; *d8++ = g1; *d8++ = r1; *d8++ = b2; *d8++ = g2; *d8++ = r2; break; default: *d32++ = ((r1 >> rloss) << rshift) | ((g1 >> gloss) << gshift) | ((b1 >> bloss) << bshift); *d32++ = ((r2 >> rloss) << rshift) | ((g2 >> gloss) << gshift) | ((b2 >> bloss) << bshift); break; } } } /* turn uyvy into packed yuv. */ void uyvy_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format) { Uint8 *s, *d8; Uint8 y1, u, y2, v; Uint16 *d16; Uint32 *d32; int i = length >> 1; int rshift, gshift, bshift, rloss, gloss, bloss; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; s = (Uint8 *)src; switch (format->BytesPerPixel) { case 1: d8 = (Uint8 *)dst; while (i--) { u = *s++; y1 = *s++; v = *s++; y2 = *s++; *d8++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d8++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; case 2: d16 = (Uint16 *)dst; while (i--) { u = *s++; y1 = *s++; v = *s++; y2 = *s++; *d16++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d16++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; case 3: d8 = (Uint8 *)dst; while (i--) { *d8++ = *(s + 2); /* v */ *d8++ = *s; /* u */ *d8++ = *(s + 1); /* y1 */ *d8++ = *(s + 2); /* v */ *d8++ = *s; /* u */ *d8++ = *(s + 3); /* y2 */ s += 4; } break; default: d32 = (Uint32 *)dst; while (i--) { y1 = *s++; u = *s++; y2 = *s++; v = *s++; *d32++ = ((y1 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); *d32++ = ((y2 >> rloss) << rshift) | ((u >> gloss) << gshift) | ((v >> bloss) << bshift); } break; } } /* Converts from 8 bit Bayer (BA81) to rgb24 (RGB3), based on: * Sonix SN9C101 based webcam basic I/F routines * Copyright (C) 2004 Takafumi Mizuno * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* TODO: Certainly not the most efficient way of doing this conversion. */ void sbggr8_to_rgb(const void *src, void *dst, int width, int height, SDL_PixelFormat *format) { Uint8 *rawpt, *d8; Uint16 *d16; Uint32 *d32; Uint8 r, g, b; int rshift, gshift, bshift, rloss, gloss, bloss; int i = width * height; rawpt = (Uint8 *)src; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; d8 = (Uint8 *)dst; d16 = (Uint16 *)dst; d32 = (Uint32 *)dst; while (i--) { if ((i / width) % 2 == 0) { /* even row (BGBGBGBG)*/ if ((i % 2) == 0) { /* B */ if ((i > width) && ((i % width) > 0)) { b = *rawpt; /* B */ g = (*(rawpt - 1) + *(rawpt + 1) + *(rawpt + width) + *(rawpt - width)) / 4; /* G */ r = (*(rawpt - width - 1) + *(rawpt - width + 1) + *(rawpt + width - 1) + *(rawpt + width + 1)) / 4; /* R */ } else { /* first line or left column */ b = *rawpt; /* B */ g = (*(rawpt + 1) + *(rawpt + width)) / 2; /* G */ r = *(rawpt + width + 1); /* R */ } } else { /* (B)G */ if ((i > width) && ((i % width) < (width - 1))) { b = (*(rawpt - 1) + *(rawpt + 1)) / 2; /* B */ g = *rawpt; /* G */ r = (*(rawpt + width) + *(rawpt - width)) / 2; /* R */ } else { /* first line or right column */ b = *(rawpt - 1); /* B */ g = *rawpt; /* G */ r = *(rawpt + width); /* R */ } } } else { /* odd row (GRGRGRGR) */ if ((i % 2) == 0) { /* G(R) */ if ((i < (width * (height - 1))) && ((i % width) > 0)) { b = (*(rawpt + width) + *(rawpt - width)) / 2; /* B */ g = *rawpt; /* G */ r = (*(rawpt - 1) + *(rawpt + 1)) / 2; /* R */ } else { /* bottom line or left column */ b = *(rawpt - width); /* B */ g = *rawpt; /* G */ r = *(rawpt + 1); /* R */ } } else { /* R */ if (i < (width * (height - 1)) && ((i % width) < (width - 1))) { b = (*(rawpt - width - 1) + *(rawpt - width + 1) + *(rawpt + width - 1) + *(rawpt + width + 1)) / 4; /* B */ g = (*(rawpt - 1) + *(rawpt + 1) + *(rawpt - width) + *(rawpt + width)) / 4; /* G */ r = *rawpt; /* R */ } else { /* bottom line or right column */ b = *(rawpt - width - 1); /* B */ g = (*(rawpt - 1) + *(rawpt - width)) / 2; /* G */ r = *rawpt; /* R */ } } } rawpt++; switch (format->BytesPerPixel) { case 1: *d8++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); break; case 2: *d16++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); break; case 3: *d8++ = b; *d8++ = g; *d8++ = r; break; default: *d32++ = ((r >> rloss) << rshift) | ((g >> gloss) << gshift) | ((b >> bloss) << bshift); break; } } } /* convert from YUV 4:2:0 (YU12) to RGB24 */ /* based on v4lconvert_yuv420_to_rgb24 in libv4l (C) 2008 Hans de Goede. LGPL */ void yuv420_to_rgb(const void *src, void *dst, int width, int height, SDL_PixelFormat *format) { int rshift, gshift, bshift, rloss, gloss, bloss, i, j, u1, v1, rg, y; const Uint8 *y1, *y2, *u, *v; Uint8 *d8_1, *d8_2; Uint16 *d16_1, *d16_2; Uint32 *d32_1, *d32_2; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; /* see http://en.wikipedia.org/wiki/YUV for an explanation of YUV420 */ y1 = (Uint8 *)src; y2 = y1 + width; u = y1 + width * height; v = u + (width * height) / 4; j = height / 2; /* prepare the destination pointers for different surface depths. */ d8_1 = (Uint8 *)dst; /* the following is because d8 used for both 8 and 24 bit surfaces */ d8_2 = d8_1 + (format->BytesPerPixel == 3 ? width * 3 : 3); d16_1 = (Uint16 *)dst; d16_2 = d16_1 + width; d32_1 = (Uint32 *)dst; d32_2 = d32_1 + width; /* for the sake of speed, the nested while loops are inside of the switch statement for the different surface bit depths */ switch (format->BytesPerPixel) { case 1: while (j--) { i = width / 2; while (i--) { /* These formulas are from libv4l */ u1 = (((*u - 128) << 7) + (*u - 128)) >> 6; rg = (((*u - 128) << 1) + (*u - 128) + ((*v - 128) << 2) + ((*v - 128) << 1)) >> 3; v1 = (((*v - 128) << 1) + (*v - 128)) >> 1; u++; v++; /* do the pixels on row 1 */ y = *y1++; *d8_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y1++; *d8_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); /* do the pixels on row 2 */ y = *y2++; *d8_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y2++; *d8_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); } /* y2 is at the beginning of a new row, make it the new row 1 */ y1 = y2; /* and make row 2 one row further */ y2 += width; d8_1 = d8_2; d8_2 += width; } break; case 2: while (j--) { i = width / 2; while (i--) { /* These formulas are from libv4l */ u1 = (((*u - 128) << 7) + (*u - 128)) >> 6; rg = (((*u - 128) << 1) + (*u - 128) + ((*v - 128) << 2) + ((*v - 128) << 1)) >> 3; v1 = (((*v - 128) << 1) + (*v - 128)) >> 1; u++; v++; /* do the pixels on row 1 */ y = *y1++; *d16_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y1++; *d16_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); /* do the pixels on row 2 */ y = *y2++; *d16_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y2++; *d16_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); } /* y2 is at the beginning of a new row, make it the new row 1 */ y1 = y2; /* and make row 2 one row further */ y2 += width; d16_1 = d16_2; d16_2 += width; } break; case 3: while (j--) { i = width / 2; while (i--) { /* These formulas are from libv4l */ u1 = (((*u - 128) << 7) + (*u - 128)) >> 6; rg = (((*u - 128) << 1) + (*u - 128) + ((*v - 128) << 2) + ((*v - 128) << 1)) >> 3; v1 = (((*v - 128) << 1) + (*v - 128)) >> 1; u++; v++; /* do the pixels on row 1 */ y = *y1++; *d8_1++ = SAT2(y + u1); *d8_1++ = SAT2(y - rg); *d8_1++ = SAT2(y + v1); y = *y1++; *d8_1++ = SAT2(y + u1); *d8_1++ = SAT2(y - rg); *d8_1++ = SAT2(y + v1); /* do the pixels on row 2 */ y = *y2++; *d8_2++ = SAT2(y + u1); *d8_2++ = SAT2(y - rg); *d8_2++ = SAT2(y + v1); y = *y2++; *d8_2++ = SAT2(y + u1); *d8_2++ = SAT2(y - rg); *d8_2++ = SAT2(y + v1); } /* y2 is at the beginning of a new row, make it the new row 1 */ y1 = y2; /* and make row 2 one row further */ y2 += width; d8_1 = d8_2; /* since it is 3 bytes per pixel */ d8_2 += width * 3; } break; default: while (j--) { i = width / 2; while (i--) { /* These formulas are from libv4l */ u1 = (((*u - 128) << 7) + (*u - 128)) >> 6; rg = (((*u - 128) << 1) + (*u - 128) + ((*v - 128) << 2) + ((*v - 128) << 1)) >> 3; v1 = (((*v - 128) << 1) + (*v - 128)) >> 1; u++; v++; /* do the pixels on row 1 */ y = *y1++; *d32_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y1++; *d32_1++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); /* do the pixels on row 2 */ y = *y2++; *d32_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); y = *y2++; *d32_2++ = ((SAT2(y + v1) >> rloss) << rshift) | ((SAT2(y - rg) >> gloss) << gshift) | ((SAT2(y + u1) >> bloss) << bshift); } /* y2 is at the beginning of a new row, make it the new row 1 */ y1 = y2; /* and make row 2 one row further */ y2 += width; d32_1 = d32_2; d32_2 += width; } break; } } /* turn yuv420 into packed yuv. */ void yuv420_to_yuv(const void *src, void *dst, int width, int height, SDL_PixelFormat *format) { const Uint8 *y1, *y2, *u, *v; Uint8 *d8_1, *d8_2; Uint16 *d16_1, *d16_2; Uint32 *d32_1, *d32_2; int rshift, gshift, bshift, rloss, gloss, bloss, j, i; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; d8_1 = (Uint8 *)dst; d8_2 = d8_1 + (format->BytesPerPixel == 3 ? width * 3 : 3); d16_1 = (Uint16 *)dst; d16_2 = d16_1 + width; d32_1 = (Uint32 *)dst; d32_2 = d32_1 + width; y1 = (Uint8 *)src; y2 = y1 + width; u = y1 + width * height; v = u + (width * height) / 4; j = height / 2; switch (format->BytesPerPixel) { case 1: while (j--) { i = width / 2; while (i--) { *d8_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d8_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d8_2++ = ((*y2++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d8_2++ = ((*y2++ >> rloss) << rshift) | ((*u++ >> gloss) << gshift) | ((*v++ >> bloss) << bshift); } y1 = y2; y2 += width; d8_1 = d8_2; d8_2 += width; } break; case 2: while (j--) { i = width / 2; while (i--) { *d16_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d16_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d16_2++ = ((*y2++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d16_2++ = ((*y2++ >> rloss) << rshift) | ((*u++ >> gloss) << gshift) | ((*v++ >> bloss) << bshift); } y1 = y2; y2 += width; d16_1 = d16_2; d16_2 += width; } break; case 3: while (j--) { i = width / 2; while (i--) { *d8_1++ = *v; *d8_1++ = *u; *d8_1++ = *y1++; *d8_1++ = *v; *d8_1++ = *u; *d8_1++ = *y1++; *d8_2++ = *v; *d8_2++ = *u; *d8_2++ = *y2++; *d8_2++ = *v++; *d8_2++ = *u++; *d8_2++ = *y2++; } y1 = y2; y2 += width; d8_1 = d8_2; d8_2 += width * 3; } break; default: while (j--) { i = width / 2; while (i--) { *d32_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d32_1++ = ((*y1++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d32_2++ = ((*y2++ >> rloss) << rshift) | ((*u >> gloss) << gshift) | ((*v >> bloss) << bshift); *d32_2++ = ((*y2++ >> rloss) << rshift) | ((*u++ >> gloss) << gshift) | ((*v++ >> bloss) << bshift); } y1 = y2; y2 += width; d32_1 = d32_2; d32_2 += width; } break; } } /* * Python API stuff */ /* Camera class definition */ PyMethodDef cameraobj_builtins[] = { {"start", (PyCFunction)camera_start, METH_NOARGS, DOC_CAMERASTART}, {"stop", (PyCFunction)camera_stop, METH_NOARGS, DOC_CAMERASTOP}, {"get_controls", (PyCFunction)camera_get_controls, METH_NOARGS, DOC_CAMERAGETCONTROLS}, {"set_controls", (PyCFunction)camera_set_controls, METH_VARARGS | METH_KEYWORDS, DOC_CAMERASETCONTROLS}, {"get_size", (PyCFunction)camera_get_size, METH_NOARGS, DOC_CAMERAGETSIZE}, {"query_image", (PyCFunction)camera_query_image, METH_NOARGS, DOC_CAMERAQUERYIMAGE}, {"get_image", (PyCFunction)camera_get_image, METH_VARARGS, DOC_CAMERAGETIMAGE}, {"get_raw", (PyCFunction)camera_get_raw, METH_NOARGS, DOC_CAMERAGETRAW}, {NULL, NULL, 0, NULL}}; void camera_dealloc(PyObject *self) { free(((pgCameraObject *)self)->device_name); PyObject_Free(self); } /* PyObject* camera_getattr(PyObject* self, char* attrname) { return Py_FindMethod(cameraobj_builtins, self, attrname); } */ static int camera_init(pgCameraObject *self, PyObject *arg, PyObject *kwargs) { #if defined(__unix__) int w, h; char *dev_name = NULL; char *color = NULL; w = DEFAULT_WIDTH; h = DEFAULT_HEIGHT; if (!PyArg_ParseTuple(arg, "s|(ii)s", &dev_name, &w, &h, &color)) { return -1; } self->device_name = (char *)malloc((strlen(dev_name) + 1) * sizeof(char)); if (!self->device_name) { PyErr_NoMemory(); return -1; } strcpy(self->device_name, dev_name); self->camera_type = 0; self->pixelformat = 0; if (color) { if (!strcmp(color, "YUV")) { self->color_out = YUV_OUT; } else if (!strcmp(color, "HSV")) { self->color_out = HSV_OUT; } else { self->color_out = RGB_OUT; } } else { self->color_out = RGB_OUT; } self->buffers = NULL; self->n_buffers = 0; self->width = w; self->height = h; self->size = 0; self->hflip = 0; self->vflip = 0; self->brightness = 0; self->fd = -1; return 0; #else PyErr_SetString(PyExc_RuntimeError, "_camera backend not available on your platform"); return -1; #endif } PyTypeObject pgCamera_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.camera.Camera", .tp_basicsize = sizeof(pgCameraObject), .tp_dealloc = camera_dealloc, .tp_doc = DOC_PYGAMECAMERACAMERA, .tp_methods = cameraobj_builtins, .tp_init = (initproc)camera_init, .tp_new = PyType_GenericNew, }; /* Camera module definition */ PyMethodDef camera_builtins[] = { {"colorspace", surf_colorspace, METH_VARARGS, DOC_PYGAMECAMERACOLORSPACE}, {"list_cameras", list_cameras, METH_NOARGS, DOC_PYGAMECAMERALISTCAMERAS}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(_camera) { PyObject *module; /* imported needed apis; Do this first so if there is an error * the module is not loaded. */ static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "_camera", DOC_PYGAMECAMERA, -1, camera_builtins, NULL, NULL, NULL, NULL}; import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ // PyType_Init(pgCamera_Type); pgCamera_Type.tp_new = PyType_GenericNew; if (PyType_Ready(&pgCamera_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } Py_INCREF(&pgCamera_Type); if (PyModule_AddObject(module, "CameraType", (PyObject *)&pgCamera_Type)) { Py_DECREF(&pgCamera_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgCamera_Type); if (PyModule_AddObject(module, "Camera", (PyObject *)&pgCamera_Type)) { Py_DECREF(&pgCamera_Type); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_camera.h0000644000175100001770000000150714676242340015253 0ustar00runnerdocker/* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _CAMERA_H #define _CAMERA_H #include "_pygame.h" #include "camera.h" #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_freetype.c0000644000175100001770000017341614676242340015652 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #define PYGAME_FREETYPE_FONT_INTERNAL #include "freetype.h" #include "freetype/ft_wrap.h" #include "doc/freetype_doc.h" #define MODULE_NAME "_freetype" #define FONT_TYPE_NAME "Font" /* * FreeType module declarations */ static const Scale_t FACE_SIZE_NONE = {0, 0}; static int _ft_traverse(PyObject *, visitproc, void *); static int _ft_clear(PyObject *); static PyObject * _ft_quit(PyObject *, PyObject *); static PyObject * _ft_init(PyObject *, PyObject *, PyObject *); static PyObject * _ft_get_version(PyObject *, PyObject *, PyObject *); static PyObject * _ft_get_error(PyObject *, PyObject *); static PyObject * _ft_get_init(PyObject *, PyObject *); static PyObject * _ft_autoinit(PyObject *, PyObject *); static PyObject * _ft_get_cache_size(PyObject *, PyObject *); static PyObject * _ft_get_default_resolution(PyObject *, PyObject *); static PyObject * _ft_set_default_resolution(PyObject *, PyObject *); static PyObject * _ft_get_default_font(PyObject *self, PyObject *args); /* * Constructor/init/destructor */ static PyObject * _ftfont_new(PyTypeObject *, PyObject *, PyObject *); static void _ftfont_dealloc(pgFontObject *); static PyObject * _ftfont_repr(pgFontObject *); static int _ftfont_init(pgFontObject *, PyObject *, PyObject *); /* * Main methods */ static PyObject * _ftfont_getrect(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_getmetrics(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_render(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_render_to(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_render_raw(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_render_raw_to(pgFontObject *, PyObject *, PyObject *); static PyObject * _ftfont_getsizedascender(pgFontObject *, PyObject *); static PyObject * _ftfont_getsizeddescender(pgFontObject *, PyObject *); static PyObject * _ftfont_getsizedheight(pgFontObject *, PyObject *); static PyObject * _ftfont_getsizedglyphheight(pgFontObject *, PyObject *); static PyObject * _ftfont_getsizes(pgFontObject *, PyObject *); /* static PyObject *_ftfont_copy(pgFontObject *); */ /* * Getters/setters */ static PyObject * _ftfont_getsize(pgFontObject *, void *); static int _ftfont_setsize(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getstyle(pgFontObject *, void *); static int _ftfont_setstyle(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getname(pgFontObject *, void *); static PyObject * _ftfont_getpath(pgFontObject *, void *); static PyObject * _ftfont_getscalable(pgFontObject *, void *); static PyObject * _ftfont_getfixedwidth(pgFontObject *, void *); static PyObject * _ftfont_getfixedsizes(pgFontObject *, void *); static PyObject * _ftfont_getstrength(pgFontObject *, void *); static int _ftfont_setstrength(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getunderlineadjustment(pgFontObject *, void *); static int _ftfont_setunderlineadjustment(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getrotation(pgFontObject *, void *); static int _ftfont_setrotation(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getfgcolor(pgFontObject *, void *); static int _ftfont_setfgcolor(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getbgcolor(pgFontObject *, void *); static int _ftfont_setbgcolor(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getresolution(pgFontObject *, void *); static PyObject * _ftfont_getfontmetric(pgFontObject *, void *); static PyObject * _ftfont_getstyle_flag(pgFontObject *, void *); static int _ftfont_setstyle_flag(pgFontObject *, PyObject *, void *); static PyObject * _ftfont_getrender_flag(pgFontObject *, void *); static int _ftfont_setrender_flag(pgFontObject *, PyObject *, void *); #if defined(PGFT_DEBUG_CACHE) static PyObject * _ftfont_getdebugcachestats(pgFontObject *, void *); #endif /* * Internal helpers */ static PyObject * get_metrics(FontRenderMode *, pgFontObject *, PGFT_String *); static PyObject * load_font_res(const char *); static int parse_dest(PyObject *, int *, int *); static int obj_to_scale(PyObject *, void *); static int objs_to_scale(PyObject *, PyObject *, Scale_t *); static int numbers_to_scale(PyObject *, PyObject *, Scale_t *); static int build_scale(PyObject *, PyObject *, Scale_t *); static FT_UInt number_to_FX6_unsigned(PyObject *); static int obj_to_rotation(PyObject *, void *); static void free_string(PGFT_String *); /* * Auxiliary defines */ #define ASSERT_SELF_IS_ALIVE(s) \ if (!pgFont_IS_ALIVE(s)) { \ return RAISE(PyExc_RuntimeError, MODULE_NAME \ "." FONT_TYPE_NAME " instance is not initialized"); \ } #define PGFT_CHECK_BOOL(_pyobj, _var) \ if (_pyobj) { \ if (!PyBool_Check(_pyobj)) { \ PyErr_SetString(PyExc_TypeError, \ #_var " must be a boolean value"); \ return 0; \ } \ \ _var = PyObject_IsTrue(_pyobj); \ } #define DEFAULT_FONT_NAME "freesansbold.ttf" #define PKGDATA_MODULE_NAME "pygame.pkgdata" #define RESOURCE_FUNC_NAME "getResource" static PyObject * load_font_res(const char *filename) { PyObject *load_basicfunc = 0; PyObject *pkgdatamodule = 0; PyObject *resourcefunc = 0; PyObject *result = 0; PyObject *tmp; pkgdatamodule = PyImport_ImportModule(PKGDATA_MODULE_NAME); if (!pkgdatamodule) { goto font_resource_end; } resourcefunc = PyObject_GetAttrString(pkgdatamodule, RESOURCE_FUNC_NAME); if (!resourcefunc) { goto font_resource_end; } result = PyObject_CallFunction(resourcefunc, "s", filename); if (!result) { goto font_resource_end; } tmp = PyObject_GetAttrString(result, "name"); if (tmp) { PyObject *closeret; if (!(closeret = PyObject_CallMethod(result, "close", NULL))) { Py_DECREF(result); Py_DECREF(tmp); result = NULL; goto font_resource_end; } Py_DECREF(closeret); Py_DECREF(result); result = tmp; } else { PyErr_Clear(); } font_resource_end: Py_XDECREF(pkgdatamodule); Py_XDECREF(resourcefunc); Py_XDECREF(load_basicfunc); return result; } static int parse_dest(PyObject *dest, int *x, int *y) { PyObject *oi; PyObject *oj; int i, j; if (!PySequence_Check(dest) || /* conditional and */ !(PySequence_Size(dest) > 1)) { PyErr_Format(PyExc_TypeError, "Expected length 2 sequence for dest argument:" " got type %.1024s", Py_TYPE(dest)->tp_name); return -1; } oi = PySequence_GetItem(dest, 0); if (!oi) { return -1; } oj = PySequence_GetItem(dest, 1); if (!oj) { Py_DECREF(oi); return -1; } if (!PyNumber_Check(oi) || !PyNumber_Check(oj)) { PyErr_Format(PyExc_TypeError, "for dest expected a pair of numbers" "for elements 1 and 2: got types %.1024s and %1024s", Py_TYPE(oi)->tp_name, Py_TYPE(oj)->tp_name); Py_DECREF(oi); Py_DECREF(oj); return -1; } if (!pg_IntFromObj(oi, &i) || !pg_IntFromObj(oj, &j)) { Py_DECREF(oi); Py_DECREF(oj); PyErr_SetString(PyExc_TypeError, "dest expects a pair of numbers"); return -1; } Py_DECREF(oi); Py_DECREF(oj); *x = i; *y = j; return 0; } /** Point size PyArg_ParseTuple converter: int -> Scale_t */ static int obj_to_scale(PyObject *o, void *p) { if (PyTuple_Check(o)) { if (PyTuple_GET_SIZE(o) != 2) { PyErr_Format(PyExc_TypeError, "expected a 2-tuple for size, got %zd-tuple", PyTuple_GET_SIZE(o)); return 0; } return objs_to_scale(PyTuple_GET_ITEM(o, 0), PyTuple_GET_ITEM(o, 1), (Scale_t *)p); } return objs_to_scale(o, 0, (Scale_t *)p); } static int objs_to_scale(PyObject *x, PyObject *y, Scale_t *size) { PyObject *o; int do_y; for (o = x, do_y = 1; o; o = (do_y--) ? y : 0) { if (!PyLong_Check(o) && !PyFloat_Check(o)) { if (y) { PyErr_Format(PyExc_TypeError, "expected a (float, float) tuple for size" ", got (%128s, %128s)", Py_TYPE(x)->tp_name, Py_TYPE(y)->tp_name); } else { PyErr_Format(PyExc_TypeError, "expected a float for size, got %128s", Py_TYPE(o)->tp_name); } return 0; } } return numbers_to_scale(x, y, size); } static int numbers_to_scale(PyObject *x, PyObject *y, Scale_t *size) { PyObject *o; PyObject *min_obj = 0; PyObject *max_obj = 0; int do_y; int cmp_result; int rval = 0; min_obj = PyFloat_FromDouble(0.0); if (!min_obj) goto finish; max_obj = PyFloat_FromDouble(FX6_TO_DBL(FX6_MAX)); if (!max_obj) goto finish; for (o = x, do_y = 1; o; o = (do_y--) ? y : 0) { cmp_result = PyObject_RichCompareBool(o, min_obj, Py_LT); if (cmp_result == -1) goto finish; if (cmp_result == 1) { PyErr_Format(PyExc_OverflowError, "%128s value is negative" " while size value is zero or positive", Py_TYPE(o)->tp_name); goto finish; } cmp_result = PyObject_RichCompareBool(o, max_obj, Py_GT); if (cmp_result == -1) goto finish; if (cmp_result == 1) { PyErr_Format(PyExc_OverflowError, "%128s value too large to convert to a size value", Py_TYPE(o)->tp_name); goto finish; } } rval = build_scale(x, y, size); finish: Py_XDECREF(min_obj); Py_XDECREF(max_obj); return rval; } static int build_scale(PyObject *x, PyObject *y, Scale_t *size) { FT_UInt sz_x = 0, sz_y = 0; sz_x = number_to_FX6_unsigned(x); if (PyErr_Occurred()) { return 0; } if (y) { sz_y = number_to_FX6_unsigned(y); if (PyErr_Occurred()) { return 0; } } if (sz_x == 0 && sz_y != 0) { PyErr_SetString(PyExc_ValueError, "expected zero size height when width is zero"); return 0; } size->x = sz_x; size->y = sz_y; return 1; } static FT_UInt number_to_FX6_unsigned(PyObject *n) { PyObject *f_obj = PyNumber_Float(n); double f; if (!f_obj) return 0; f = PyFloat_AsDouble(f_obj); Py_XDECREF(f_obj); if (PyErr_Occurred()) return 0; return DBL_TO_FX6(f); } /** rotation: int -> Angle_t */ int obj_to_rotation(PyObject *o, void *p) { PyObject *full_circle_obj = 0; PyObject *angle_obj = 0; long angle; int rval = 0; if (PyLong_Check(o)) { ; } else { PyErr_Format(PyExc_TypeError, "integer rotation expected, got %s", Py_TYPE(o)->tp_name); goto finish; } full_circle_obj = PyLong_FromLong(360L); if (!full_circle_obj) goto finish; angle_obj = PyNumber_Remainder(o, full_circle_obj); if (!angle_obj) goto finish; angle = PyLong_AsLong(angle_obj); if (angle == -1) goto finish; *(Angle_t *)p = (Angle_t)INT_TO_FX16(angle); rval = 1; finish: Py_XDECREF(full_circle_obj); Py_XDECREF(angle_obj); return rval; } /** This accepts a NULL PGFT_String pointer */ static void free_string(PGFT_String *p) { if (p) _PGFT_FreeString(p); } /* * FREETYPE MODULE METHODS TABLE */ static PyMethodDef _ft_methods[] = { {"_internal_mod_init", (PyCFunction)_ft_autoinit, METH_NOARGS, "auto initialize function for _freetype"}, {"init", (PyCFunction)_ft_init, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEFREETYPEINIT}, {"quit", (PyCFunction)_ft_quit, METH_NOARGS, DOC_PYGAMEFREETYPEQUIT}, {"get_init", _ft_get_init, METH_NOARGS, DOC_PYGAMEFREETYPEGETINIT}, {"was_init", _ft_get_init, METH_NOARGS, DOC_PYGAMEFREETYPEWASINIT}, // DEPRECATED {"get_error", _ft_get_error, METH_NOARGS, DOC_PYGAMEFREETYPEGETERROR}, {"get_version", (PyCFunction)_ft_get_version, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEFREETYPEGETVERSION}, {"get_cache_size", _ft_get_cache_size, METH_NOARGS, DOC_PYGAMEFREETYPEGETCACHESIZE}, {"get_default_resolution", _ft_get_default_resolution, METH_NOARGS, DOC_PYGAMEFREETYPEGETDEFAULTRESOLUTION}, {"set_default_resolution", _ft_set_default_resolution, METH_VARARGS, DOC_PYGAMEFREETYPESETDEFAULTRESOLUTION}, {"get_default_font", _ft_get_default_font, METH_NOARGS, DOC_PYGAMEFREETYPEGETDEFAULTFONT}, {0, 0, 0, 0}}; /* * FREETYPE FONT METHODS TABLE */ static PyMethodDef _ftfont_methods[] = { {"get_sized_height", (PyCFunction)_ftfont_getsizedheight, METH_VARARGS, DOC_FONTGETSIZEDHEIGHT}, {"get_sized_ascender", (PyCFunction)_ftfont_getsizedascender, METH_VARARGS, DOC_FONTGETSIZEDASCENDER}, {"get_sized_descender", (PyCFunction)_ftfont_getsizeddescender, METH_VARARGS, DOC_FONTGETSIZEDDESCENDER}, {"get_sized_glyph_height", (PyCFunction)_ftfont_getsizedglyphheight, METH_VARARGS, DOC_FONTGETSIZEDGLYPHHEIGHT}, {"get_rect", (PyCFunction)_ftfont_getrect, METH_VARARGS | METH_KEYWORDS, DOC_FONTGETRECT}, {"get_metrics", (PyCFunction)_ftfont_getmetrics, METH_VARARGS | METH_KEYWORDS, DOC_FONTGETMETRICS}, {"get_sizes", (PyCFunction)_ftfont_getsizes, METH_NOARGS, DOC_FONTGETSIZES}, {"render", (PyCFunction)_ftfont_render, METH_VARARGS | METH_KEYWORDS, DOC_FONTRENDER}, {"render_to", (PyCFunction)_ftfont_render_to, METH_VARARGS | METH_KEYWORDS, DOC_FONTRENDERTO}, {"render_raw", (PyCFunction)_ftfont_render_raw, METH_VARARGS | METH_KEYWORDS, DOC_FONTRENDERRAW}, {"render_raw_to", (PyCFunction)_ftfont_render_raw_to, METH_VARARGS | METH_KEYWORDS, DOC_FONTRENDERRAWTO}, {0, 0, 0, 0}}; /* * FREETYPE FONT GETTERS/SETTERS TABLE */ static PyGetSetDef _ftfont_getsets[] = { {"size", (getter)_ftfont_getsize, (setter)_ftfont_setsize, DOC_FONTSIZE, 0}, {"style", (getter)_ftfont_getstyle, (setter)_ftfont_setstyle, DOC_FONTSTYLE, 0}, {"height", (getter)_ftfont_getfontmetric, 0, DOC_FONTHEIGHT, (void *)_PGFT_Font_GetHeight}, {"ascender", (getter)_ftfont_getfontmetric, 0, DOC_FONTASCENDER, (void *)_PGFT_Font_GetAscender}, {"descender", (getter)_ftfont_getfontmetric, 0, DOC_FONTASCENDER, (void *)_PGFT_Font_GetDescender}, {"name", (getter)_ftfont_getname, 0, DOC_FONTNAME, 0}, {"path", (getter)_ftfont_getpath, 0, DOC_FONTPATH, 0}, {"scalable", (getter)_ftfont_getscalable, 0, DOC_FONTSCALABLE, 0}, {"fixed_width", (getter)_ftfont_getfixedwidth, 0, DOC_FONTFIXEDWIDTH, 0}, {"fixed_sizes", (getter)_ftfont_getfixedsizes, 0, DOC_FONTFIXEDSIZES, 0}, {"antialiased", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTANTIALIASED, (void *)FT_RFLAG_ANTIALIAS}, {"kerning", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTKERNING, (void *)FT_RFLAG_KERNING}, {"vertical", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTVERTICAL, (void *)FT_RFLAG_VERTICAL}, {"pad", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTPAD, (void *)FT_RFLAG_PAD}, {"oblique", (getter)_ftfont_getstyle_flag, (setter)_ftfont_setstyle_flag, DOC_FONTOBLIQUE, (void *)FT_STYLE_OBLIQUE}, {"strong", (getter)_ftfont_getstyle_flag, (setter)_ftfont_setstyle_flag, DOC_FONTSTRONG, (void *)FT_STYLE_STRONG}, {"underline", (getter)_ftfont_getstyle_flag, (setter)_ftfont_setstyle_flag, DOC_FONTUNDERLINE, (void *)FT_STYLE_UNDERLINE}, {"wide", (getter)_ftfont_getstyle_flag, (setter)_ftfont_setstyle_flag, DOC_FONTWIDE, (void *)FT_STYLE_WIDE}, {"strength", (getter)_ftfont_getstrength, (setter)_ftfont_setstrength, DOC_FONTSTRENGTH, 0}, {"underline_adjustment", (getter)_ftfont_getunderlineadjustment, (setter)_ftfont_setunderlineadjustment, DOC_FONTUNDERLINEADJUSTMENT, 0}, {"ucs4", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTUCS4, (void *)FT_RFLAG_UCS4}, {"use_bitmap_strikes", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTUSEBITMAPSTRIKES, (void *)FT_RFLAG_USE_BITMAP_STRIKES}, {"resolution", (getter)_ftfont_getresolution, 0, DOC_FONTRESOLUTION, 0}, {"rotation", (getter)_ftfont_getrotation, (setter)_ftfont_setrotation, DOC_FONTROTATION, 0}, {"fgcolor", (getter)_ftfont_getfgcolor, (setter)_ftfont_setfgcolor, DOC_FONTFGCOLOR, 0}, {"bgcolor", (getter)_ftfont_getbgcolor, (setter)_ftfont_setbgcolor, DOC_FONTBGCOLOR, 0}, {"origin", (getter)_ftfont_getrender_flag, (setter)_ftfont_setrender_flag, DOC_FONTORIGIN, (void *)FT_RFLAG_ORIGIN}, #if defined(PGFT_DEBUG_CACHE) {"_debug_cache_stats", (getter)_ftfont_getdebugcachestats, 0, "_debug cache fields as a tuple", 0}, #endif {0, 0, 0, 0, 0}}; /* * FREETYPE FONT BASE TYPE TABLE */ PyTypeObject pgFont_Type = { PyVarObject_HEAD_INIT(0, 0).tp_name = "pygame.freetype.Font", .tp_basicsize = sizeof(pgFontObject), .tp_dealloc = (destructor)_ftfont_dealloc, .tp_repr = (reprfunc)_ftfont_repr, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMEFREETYPEFONT, .tp_methods = _ftfont_methods, .tp_getset = _ftfont_getsets, .tp_init = (initproc)_ftfont_init, .tp_new = (newfunc)_ftfont_new, }; /**************************************************** * CONSTRUCTOR/INIT/DESTRUCTOR ****************************************************/ static PyObject * _ftfont_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) { pgFontObject *obj = (pgFontObject *)(subtype->tp_alloc(subtype, 0)); if (obj) { obj->id.open_args.flags = 0; obj->id.open_args.pathname = 0; obj->path = 0; obj->resolution = 0; obj->is_scalable = 0; obj->freetype = 0; obj->_internals = 0; obj->face_size = FACE_SIZE_NONE; obj->style = FT_STYLE_NORMAL; obj->render_flags = FT_RFLAG_DEFAULTS; obj->strength = PGFT_DBL_DEFAULT_STRENGTH; obj->underline_adjustment = 1.0; obj->rotation = 0; obj->transform.xx = FX16_ONE; obj->transform.xy = 0; obj->transform.yx = 0; obj->transform.yy = FX16_ONE; obj->fgcolor[0] = 0; /* rgba opaque black */ obj->fgcolor[1] = 0; obj->fgcolor[2] = 0; obj->fgcolor[3] = 255; obj->is_bg_col_set = 0; obj->bgcolor[0] = 0; /* rgba transparent black */ obj->bgcolor[1] = 0; obj->bgcolor[2] = 0; obj->bgcolor[3] = 0; } return (PyObject *)obj; } static void _ftfont_dealloc(pgFontObject *self) { SDL_RWops *src = _PGFT_GetRWops(self); _PGFT_UnloadFont(self->freetype, self); if (src) { pgRWops_ReleaseObject(src); } _PGFT_Quit(self->freetype); Py_XDECREF(self->path); ((PyObject *)self)->ob_type->tp_free((PyObject *)self); } static int _ftfont_init(pgFontObject *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = {"file", "size", "font_index", "resolution", "ucs4", 0}; PyObject *file, *original_file; long font_index = 0; Scale_t face_size = self->face_size; int ucs4 = (self->render_flags & FT_RFLAG_UCS4) ? 1 : 0; unsigned resolution = 0; long size = 0; long height = 0; long width = 0; double x_ppem = 0; double y_ppem = 0; int rval = -1; SDL_RWops *source; FreeTypeInstance *ft; ASSERT_GRAB_FREETYPE(ft, -1); if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O&lIi", kwlist, &file, obj_to_scale, (void *)&face_size, &font_index, &resolution, &ucs4)) { return -1; } original_file = file; if (self->freetype) { /* Font.__init__ was previously called on this object. Reset */ _PGFT_UnloadFont(self->freetype, self); _PGFT_Quit(self->freetype); self->freetype = 0; } Py_XDECREF(self->path); self->path = 0; self->is_scalable = 0; self->face_size = face_size; if (ucs4) { self->render_flags |= FT_RFLAG_UCS4; } else { self->render_flags &= ~FT_RFLAG_UCS4; } if (resolution) { self->resolution = (FT_UInt)resolution; } else { self->resolution = FREETYPE_STATE->resolution; } if (file == Py_None) { file = load_font_res(DEFAULT_FONT_NAME); if (!file) { PyErr_SetString(PyExc_RuntimeError, "Failed to find default font"); goto end; } } #if !defined(WIN32) file = pg_EncodeString(file, "UTF-8", NULL, NULL); if (!file) { goto end; } if (PyBytes_Check(file)) { if (PyUnicode_Check(original_file)) { /* Make sure to save a pure Unicode object to prevent possible * cycles from a derived class. This means no tp_traverse or * tp_clear for the PyFreetypeFont type. */ self->path = PyObject_Str(original_file); } else { self->path = PyUnicode_FromEncodedObject(file, "UTF-8", NULL); } if (!self->path) { goto end; } if (_PGFT_TryLoadFont_Filename(ft, self, PyBytes_AS_STRING(file), font_index)) { goto end; } } else { PyObject *str = 0; PyObject *path = 0; #ifndef WITH_THREAD goto end; #endif source = pgRWops_FromFileObject(original_file); if (!source) { goto end; } path = PyObject_GetAttrString(original_file, "name"); if (!path) { PyErr_Clear(); str = PyBytes_FromFormat("<%s instance at %p>", Py_TYPE(file)->tp_name, (void *)file); if (str) { self->path = PyUnicode_FromEncodedObject(str, "ascii", "strict"); Py_DECREF(str); } } else if (PyUnicode_Check(path)) { /* Make sure to save a pure Unicode object to prevent possible * cycles from a derived class. This means no tp_traverse or * tp_clear for the PyFreetypeFont type. */ self->path = PyObject_Str(path); } else if (PyBytes_Check(path)) { self->path = PyUnicode_FromEncodedObject(path, "UTF-8", NULL); } else { self->path = PyObject_Str(path); } Py_XDECREF(path); if (!self->path) { goto end; } if (_PGFT_TryLoadFont_RWops(ft, self, source, font_index)) { goto end; } } #else /* WIN32 */ /* FT uses fopen(); as a workaround, always use RWops */ if (file == original_file) Py_INCREF(file); if (!PG_CHECK_THREADS()) goto end; source = pgRWops_FromObject(file, NULL); if (!source) { goto end; } PyObject *path = NULL; if (pgRWops_IsFileObject(source)) { path = PyObject_GetAttrString(file, "name"); if (!path) { PyObject *str; PyErr_Clear(); str = PyBytes_FromFormat("<%s instance at %p>", Py_TYPE(file)->tp_name, (void *)file); if (str) { self->path = PyUnicode_FromEncodedObject(str, "ascii", "strict"); Py_DECREF(str); } } } else { Py_INCREF(file); path = file; } if (path) { if (PyUnicode_Check(path)) { /* Make sure to save a pure Unicode object to prevent possible * cycles from a derived class. This means no tp_traverse or * tp_clear for the PyFreetypeFont type. */ self->path = PyObject_Str(path); } else if (PyBytes_Check(path)) { self->path = PyUnicode_FromEncodedObject(path, "UTF-8", NULL); } else { self->path = PyObject_Str(path); } Py_DECREF(path); } if (!self->path) { goto end; } if (_PGFT_TryLoadFont_RWops(ft, self, source, font_index)) { goto end; } #endif /* WIN32 */ if (!self->is_scalable && self->face_size.x == 0) { if (_PGFT_Font_GetAvailableSize(ft, self, 0, &size, &height, &width, &x_ppem, &y_ppem)) { self->face_size.x = DBL_TO_FX6(x_ppem); self->face_size.y = DBL_TO_FX6(y_ppem); } else { PyErr_Clear(); } } /* Keep the current freetype 2 connection open while this object exists. Otherwise, the freetype library may be closed before the object frees its local resources. See Pygame issue #187 */ self->freetype = ft; ++ft->ref_count; rval = 0; end: Py_XDECREF(file); return rval; } static PyObject * _ftfont_repr(pgFontObject *self) { if (pgFont_IS_ALIVE(self)) { return PyUnicode_FromFormat("Font('%.1024U')", self->path); } return PyUnicode_FromFormat("", (void *)self); } /**************************************************** * GETTERS/SETTERS ****************************************************/ /** Generic style attributes */ static PyObject * _ftfont_getstyle_flag(pgFontObject *self, void *closure) { const intptr_t style_flag = (intptr_t)closure; return PyBool_FromLong(self->style & (FT_UInt16)style_flag); } static int _ftfont_setstyle_flag(pgFontObject *self, PyObject *value, void *closure) { const intptr_t style_flag = (intptr_t)closure; if (!PyBool_Check(value)) { PyErr_SetString(PyExc_TypeError, "The style value must be a boolean"); return -1; } if ((style_flag & FT_STYLES_SCALABLE_ONLY) && !self->is_scalable) { if (pgFont_IS_ALIVE(self)) { PyErr_SetString(PyExc_AttributeError, "this style is unsupported for a bitmap font"); } else { PyErr_SetString(PyExc_RuntimeError, MODULE_NAME "." FONT_TYPE_NAME " instance is not initialized"); } return -1; } if (PyObject_IsTrue(value)) { self->style |= (FT_UInt16)style_flag; } else { self->style &= (FT_UInt16)(~style_flag); } return 0; } /** Style attribute */ static PyObject * _ftfont_getstyle(pgFontObject *self, void *closure) { return PyLong_FromLong(self->style); } static int _ftfont_setstyle(pgFontObject *self, PyObject *value, void *closure) { FT_UInt32 style; if (!PyLong_Check(value)) { PyErr_SetString(PyExc_TypeError, "The style value must be an integer" " from the FT constants module"); return -1; } style = (FT_UInt32)PyLong_AsLong(value); if (style == FT_STYLE_DEFAULT) { /* The Font object's style property is the Font's default style, * so leave unchanged. */ return 0; } if (_PGFT_CheckStyle(style)) { PyErr_Format(PyExc_ValueError, "Invalid style value %x", (int)style); return -1; } if ((style & FT_STYLES_SCALABLE_ONLY) && !self->is_scalable) { if (pgFont_IS_ALIVE(self)) { PyErr_SetString(PyExc_AttributeError, "this style is unsupported for a bitmap font"); } else { PyErr_SetString(PyExc_RuntimeError, MODULE_NAME "." FONT_TYPE_NAME " instance is not initialized"); } return -1; } self->style = (FT_UInt16)style; return 0; } static PyObject * _ftfont_getstrength(pgFontObject *self, void *closure) { return PyFloat_FromDouble(self->strength); } static int _ftfont_setstrength(pgFontObject *self, PyObject *value, void *closure) { PyObject *strengthobj = PyNumber_Float(value); double strength; if (!strengthobj) { return -1; } strength = PyFloat_AS_DOUBLE(strengthobj); if (strength < 0.0 || strength > 1.0) { PyErr_Format(PyExc_ValueError, "strength value '%S' is outside range [0, 1]", strengthobj); Py_DECREF(strengthobj); return -1; } Py_DECREF(strengthobj); self->strength = strength; return 0; } static PyObject * _ftfont_getsize(pgFontObject *self, void *closure) { if (self->face_size.y == 0) { return PyFloat_FromDouble(FX6_TO_DBL(self->face_size.x)); } return Py_BuildValue("dd", FX6_TO_DBL(self->face_size.x), FX6_TO_DBL(self->face_size.y)); } static int _ftfont_setsize(pgFontObject *self, PyObject *value, void *closure) { Scale_t face_size; DEL_ATTR_NOT_SUPPORTED_CHECK("size", value); if (!obj_to_scale(value, &face_size)) goto error; self->face_size = face_size; return 0; error: return -1; } static PyObject * _ftfont_getunderlineadjustment(pgFontObject *self, void *closure) { return PyFloat_FromDouble(self->underline_adjustment); } static int _ftfont_setunderlineadjustment(pgFontObject *self, PyObject *value, void *closure) { PyObject *adjustmentobj; double adjustment; DEL_ATTR_NOT_SUPPORTED_CHECK("underline_adjustment", value); adjustmentobj = PyNumber_Float(value); if (!adjustmentobj) { return -1; } adjustment = PyFloat_AS_DOUBLE(adjustmentobj); if (adjustment < -2.0 || adjustment > 2.0) { PyErr_Format( PyExc_ValueError, "underline adjustment value '%S' is outside range [-2.0, 2.0]", adjustmentobj); Py_DECREF(adjustmentobj); return -1; } Py_DECREF(adjustmentobj); self->underline_adjustment = adjustment; return 0; } /** general font attributes */ static PyObject * _ftfont_getfontmetric(pgFontObject *self, void *closure) { typedef long (*getter)(FreeTypeInstance *, pgFontObject *); long height; ASSERT_SELF_IS_ALIVE(self); height = ((getter)closure)(self->freetype, self); if (!height && PyErr_Occurred()) { return 0; } return PyLong_FromLong(height); } static PyObject * _ftfont_getname(pgFontObject *self, void *closure) { if (pgFont_IS_ALIVE(self)) { const char *name = _PGFT_Font_GetName(self->freetype, self); return name ? PyUnicode_FromString(name) : 0; } return PyObject_Repr((PyObject *)self); } static PyObject * _ftfont_getpath(pgFontObject *self, void *closure) { PyObject *path = ((pgFontObject *)self)->path; if (!path) { PyErr_SetString(PyExc_AttributeError, "path unavailable"); return 0; } Py_INCREF(path); return path; } static PyObject * _ftfont_getscalable(pgFontObject *self, void *closure) { ASSERT_SELF_IS_ALIVE(self) return PyBool_FromLong(self->is_scalable); } static PyObject * _ftfont_getfixedwidth(pgFontObject *self, void *closure) { long fixed_width; ASSERT_SELF_IS_ALIVE(self); fixed_width = _PGFT_Font_IsFixedWidth(self->freetype, (pgFontObject *)self); return fixed_width >= 0 ? PyBool_FromLong(fixed_width) : 0; } static PyObject * _ftfont_getfixedsizes(pgFontObject *self, void *closure) { long num_fixed_sizes; ASSERT_SELF_IS_ALIVE(self); num_fixed_sizes = _PGFT_Font_NumFixedSizes(self->freetype, self); return num_fixed_sizes >= 0 ? PyLong_FromLong(num_fixed_sizes) : 0; } /** Generic render flag attributes */ static PyObject * _ftfont_getrender_flag(pgFontObject *self, void *closure) { const intptr_t render_flag = (intptr_t)closure; return PyBool_FromLong(self->render_flags & (FT_UInt16)render_flag); } static int _ftfont_setrender_flag(pgFontObject *self, PyObject *value, void *closure) { const intptr_t render_flag = (intptr_t)closure; /* Generic setter; We do not know the name of the attribute */ DEL_ATTR_NOT_SUPPORTED_CHECK_NO_NAME(value); if (!PyBool_Check(value)) { PyErr_SetString(PyExc_TypeError, "The style value must be a boolean"); return -1; } if (PyObject_IsTrue(value)) { self->render_flags |= (FT_UInt16)render_flag; } else { self->render_flags &= (FT_UInt16)(~render_flag); } return 0; } /** resolution pixel size attribute */ static PyObject * _ftfont_getresolution(pgFontObject *self, void *closure) { return PyLong_FromUnsignedLong((unsigned long)self->resolution); } /** text rotation attribute */ static PyObject * _ftfont_getrotation(pgFontObject *self, void *closure) { return PyLong_FromLong((long)FX16_ROUND_TO_INT(self->rotation)); } static int _ftfont_setrotation(pgFontObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("rotation", value); if (!self->is_scalable) { if (pgFont_IS_ALIVE(self)) { PyErr_SetString(PyExc_AttributeError, "rotation is unsupported for a bitmap font"); } else { PyErr_SetString(PyExc_RuntimeError, MODULE_NAME "." FONT_TYPE_NAME " instance is not initialized"); } return -1; } return obj_to_rotation(value, &self->rotation) ? 0 : -1; } /** default glyph color */ static PyObject * _ftfont_getfgcolor(pgFontObject *self, void *closure) { return pgColor_New(self->fgcolor); } static int _ftfont_setfgcolor(pgFontObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("fgcolor", value); if (!pg_RGBAFromObj(value, self->fgcolor)) { PyErr_Format(PyExc_AttributeError, "unable to convert %128s object to a color", Py_TYPE(value)->tp_name); return -1; } return 0; } static PyObject * _ftfont_getbgcolor(pgFontObject *self, void *closure) { return pgColor_New(self->bgcolor); } static int _ftfont_setbgcolor(pgFontObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("bgcolor", value); if (!pg_RGBAFromObj(value, self->bgcolor)) { PyErr_Format(PyExc_AttributeError, "unable to convert %128s object to a color", Py_TYPE(value)->tp_name); return -1; } else { self->is_bg_col_set = 1; } return 0; } /** testing and debugging */ #if defined(PGFT_DEBUG_CACHE) static PyObject * _ftfont_getdebugcachestats(pgFontObject *self, void *closure) { /* Yes, this kind of breaches the boundary between the top level * freetype.c and the lower level ft_text.c. But it is built * conditionally, and it keeps some of the Python api out * of ft_text.c and ft_cache.c (hoping to remove the Python * api completely from ft_text.c and support C modules at some point.) */ const FontCache *cache = &PGFT_FONT_CACHE(self); return Py_BuildValue("kkkkk", (unsigned long)cache->_debug_count, (unsigned long)cache->_debug_delete_count, (unsigned long)cache->_debug_access, (unsigned long)cache->_debug_hit, (unsigned long)cache->_debug_miss); } #endif /**************************************************** * MAIN METHODS ****************************************************/ static PyObject * _ftfont_getrect(pgFontObject *self, PyObject *args, PyObject *kwds) { /* MODIFIED */ /* keyword list */ static char *kwlist[] = {"text", "style", "rotation", "size", 0}; PyObject *textobj; PGFT_String *text = 0; Scale_t face_size = FACE_SIZE_NONE; SDL_Rect r; FontRenderMode render; Angle_t rotation = self->rotation; int style = FT_STYLE_DEFAULT; if (!PyArg_ParseTupleAndKeywords( args, kwds, "O|iO&O&", kwlist, &textobj, &style, obj_to_rotation, (void *)&rotation, obj_to_scale, (void *)&face_size)) goto error; /* Encode text */ if (textobj != Py_None) { text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; } ASSERT_SELF_IS_ALIVE(self); /* Build rendering mode, always anti-aliased by default */ if (_PGFT_BuildRenderMode(self->freetype, self, &render, face_size, style, rotation)) goto error; if (_PGFT_GetTextRect(self->freetype, self, &render, text, &r)) goto error; free_string(text); return pgRect_New(&r); error: free_string(text); return 0; } static PyObject * get_metrics(FontRenderMode *render, pgFontObject *font, PGFT_String *text) { Py_ssize_t length = PGFT_String_GET_LENGTH(text); PGFT_char *data = PGFT_String_GET_DATA(text); PyObject *list, *item; FT_UInt gindex; long minx, miny; long maxx, maxy; double advance_x; double advance_y; Py_ssize_t i; if (!_PGFT_GetFontSized(font->freetype, font, render->face_size)) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(font->freetype)); return 0; } list = PyList_New(length); if (!list) { return 0; } for (i = 0; i < length; ++i) { if (_PGFT_GetMetrics(font->freetype, font, data[i], render, &gindex, &minx, &maxx, &miny, &maxy, &advance_x, &advance_y) == 0) { if (gindex == 0) { Py_INCREF(Py_None); item = Py_None; } else { item = Py_BuildValue("lllldd", minx, maxx, miny, maxy, advance_x, advance_y); } if (!item) { Py_DECREF(list); return 0; } } else { Py_INCREF(Py_None); item = Py_None; } PyList_SET_ITEM(list, i, item); } return list; } static PyObject * _ftfont_getmetrics(pgFontObject *self, PyObject *args, PyObject *kwds) { /* keyword list */ static char *kwlist[] = {"text", "size", 0}; FontRenderMode render; PyObject *list = 0; /* arguments */ PyObject *textobj; PGFT_String *text = 0; Scale_t face_size = FACE_SIZE_NONE; /* parse args */ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O&", kwlist, &textobj, obj_to_scale, (void *)&face_size)) goto error; /* Encode text */ text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; ASSERT_SELF_IS_ALIVE(self); /* * Build the render mode with the given size and support * for rotation/styles/size changes in text */ if (_PGFT_BuildRenderMode(self->freetype, self, &render, face_size, FT_STYLE_DEFAULT, self->rotation)) goto error; /* get metrics */ list = get_metrics(&render, self, text); if (!list) goto error; free_string(text); return list; error: free_string(text); Py_XDECREF(list); return 0; } static PyObject * _ftfont_getsizedascender(pgFontObject *self, PyObject *args) { Scale_t face_size = FACE_SIZE_NONE; long value; if (!PyArg_ParseTuple(args, "|O&", obj_to_scale, (void *)&face_size)) { return 0; } if (face_size.x == 0) { if (self->face_size.x == 0) { PyErr_SetString(PyExc_ValueError, "No font point size specified" " and no default font size in typefont"); return 0; } face_size = self->face_size; } value = (long)_PGFT_Font_GetAscenderSized(self->freetype, self, face_size); if (!value && PyErr_Occurred()) { return 0; } return PyLong_FromLong(value); } static PyObject * _ftfont_getsizeddescender(pgFontObject *self, PyObject *args) { Scale_t face_size = FACE_SIZE_NONE; long value; if (!PyArg_ParseTuple(args, "|O&", obj_to_scale, (void *)&face_size)) { return 0; } if (face_size.x == 0) { if (self->face_size.x == 0) { PyErr_SetString(PyExc_ValueError, "No font point size specified" " and no default font size in typefont"); return 0; } face_size = self->face_size; } value = (long)_PGFT_Font_GetDescenderSized(self->freetype, self, face_size); if (!value && PyErr_Occurred()) { return 0; } return PyLong_FromLong(value); } static PyObject * _ftfont_getsizedheight(pgFontObject *self, PyObject *args) { Scale_t face_size = FACE_SIZE_NONE; long value; if (!PyArg_ParseTuple(args, "|O&", obj_to_scale, (void *)&face_size)) { return 0; } if (face_size.x == 0) { if (self->face_size.x == 0) { PyErr_SetString(PyExc_ValueError, "No font point size specified" " and no default font size in typeface"); return 0; } face_size = self->face_size; } value = _PGFT_Font_GetHeightSized(self->freetype, self, face_size); if (!value && PyErr_Occurred()) { return 0; } return PyLong_FromLong(value); } static PyObject * _ftfont_getsizedglyphheight(pgFontObject *self, PyObject *args) { Scale_t face_size = FACE_SIZE_NONE; long value; if (!PyArg_ParseTuple(args, "|O&", obj_to_scale, (void *)&face_size)) { return 0; } if (face_size.x == 0) { if (self->face_size.x == 0) { PyErr_SetString(PyExc_ValueError, "No font point size specified" " and no default font size in typeface"); return 0; } face_size = self->face_size; } value = (long)_PGFT_Font_GetGlyphHeightSized(self->freetype, self, face_size); if (!value && PyErr_Occurred()) { return 0; } return PyLong_FromLong(value); } static PyObject * _ftfont_getsizes(pgFontObject *self, PyObject *_null) { int nsizes; int i; int rc; long size = 0; long height = 0, width = 0; double x_ppem = 0.0, y_ppem = 0.0; PyObject *size_list = 0; PyObject *size_item; nsizes = _PGFT_Font_NumFixedSizes(self->freetype, self); if (nsizes < 0) goto error; size_list = PyList_New(nsizes); if (!size_list) goto error; for (i = 0; i < nsizes; ++i) { rc = _PGFT_Font_GetAvailableSize(self->freetype, self, i, &size, &height, &width, &x_ppem, &y_ppem); if (rc < 0) goto error; assert(rc > 0); size_item = Py_BuildValue("llldd", size, height, width, x_ppem, y_ppem); if (!size_item) goto error; PyList_SET_ITEM(size_list, i, size_item); } return size_list; error: Py_XDECREF(size_list); return 0; } static PyObject * _ftfont_render_raw(pgFontObject *self, PyObject *args, PyObject *kwds) { /* keyword list */ static char *kwlist[] = {"text", "style", "rotation", "size", "invert", 0}; FontRenderMode mode; /* input arguments */ PyObject *textobj; PGFT_String *text = 0; int style = FT_STYLE_DEFAULT; Angle_t rotation = self->rotation; Scale_t face_size = FACE_SIZE_NONE; int invert = 0; /* output arguments */ PyObject *rbuffer = 0; PyObject *rtuple = 0; int width, height; if (!PyArg_ParseTupleAndKeywords( args, kwds, "O|iO&O&i", kwlist, &textobj, &style, obj_to_rotation, (void *)&rotation, obj_to_scale, (void *)&face_size, &invert)) goto error; /* Encode text */ if (textobj != Py_None) { text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; } ASSERT_SELF_IS_ALIVE(self); /* * Build the render mode with the given size and no * rotation/styles/vertical text */ if (_PGFT_BuildRenderMode(self->freetype, self, &mode, face_size, style, rotation)) goto error; rbuffer = _PGFT_Render_PixelArray(self->freetype, self, &mode, text, invert, &width, &height); if (!rbuffer) goto error; free_string(text); rtuple = Py_BuildValue("O(ii)", rbuffer, width, height); if (!rtuple) goto error; Py_DECREF(rbuffer); return rtuple; error: free_string(text); Py_XDECREF(rbuffer); Py_XDECREF(rtuple); return 0; } static PyObject * _ftfont_render_raw_to(pgFontObject *self, PyObject *args, PyObject *kwds) { /* keyword list */ static char *kwlist[] = {"array", "text", "dest", "style", "rotation", "size", "invert", 0}; FontRenderMode mode; /* input arguments */ PyObject *arrayobj; PyObject *textobj; PGFT_String *text = 0; PyObject *dest = 0; int xpos = 0; int ypos = 0; int style = FT_STYLE_DEFAULT; Angle_t rotation = self->rotation; Scale_t face_size = FACE_SIZE_NONE; int invert = 0; /* output arguments */ SDL_Rect r; ASSERT_SELF_IS_ALIVE(self); if (!PyArg_ParseTupleAndKeywords( args, kwds, "OO|OiO&O&i", kwlist, &arrayobj, &textobj, &dest, &style, obj_to_rotation, (void *)&rotation, obj_to_scale, (void *)&face_size, &invert)) goto error; if (dest && dest != Py_None) { if (parse_dest(dest, &xpos, &ypos)) goto error; } /* Encode text */ if (textobj != Py_None) { text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; } /* * Build the render mode with the given size and no * rotation/styles/vertical text */ if (_PGFT_BuildRenderMode(self->freetype, self, &mode, face_size, style, rotation)) goto error; if (_PGFT_Render_Array(self->freetype, self, &mode, arrayobj, text, invert, xpos, ypos, &r)) goto error; free_string(text); return pgRect_New(&r); error: free_string(text); return 0; } static PyObject * _ftfont_render(pgFontObject *self, PyObject *args, PyObject *kwds) { /* keyword list */ static char *kwlist[] = {"text", "fgcolor", "bgcolor", "style", "rotation", "size", 0}; /* input arguments */ PyObject *textobj = 0; PGFT_String *text = 0; Scale_t face_size = FACE_SIZE_NONE; PyObject *fg_color_obj = 0; PyObject *bg_color_obj = 0; Angle_t rotation = self->rotation; int style = FT_STYLE_DEFAULT; /* output arguments */ SDL_Surface *surface = 0; PyObject *surface_obj = 0; PyObject *rtuple = 0; SDL_Rect r; PyObject *rect_obj = 0; FontColor fg_color; FontColor bg_color; FontRenderMode render; ASSERT_SELF_IS_ALIVE(self); if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOiO&O&", kwlist, /* required */ &textobj, /* optional */ &fg_color_obj, &bg_color_obj, &style, obj_to_rotation, (void *)&rotation, obj_to_scale, (void *)&face_size)) goto error; if (fg_color_obj == Py_None) { fg_color_obj = 0; } if (bg_color_obj == Py_None) { bg_color_obj = 0; } if (fg_color_obj) { if (!pg_RGBAFromFuzzyColorObj(fg_color_obj, (Uint8 *)&fg_color)) { /* Exception already set for us */ goto error; } } else { fg_color.r = self->fgcolor[0]; fg_color.g = self->fgcolor[1]; fg_color.b = self->fgcolor[2]; fg_color.a = self->fgcolor[3]; } if (bg_color_obj) { if (!pg_RGBAFromFuzzyColorObj(bg_color_obj, (Uint8 *)&bg_color)) { /* Exception already set for us */ goto error; } } else { if (self->is_bg_col_set) { bg_color.r = self->bgcolor[0]; bg_color.g = self->bgcolor[1]; bg_color.b = self->bgcolor[2]; bg_color.a = self->bgcolor[3]; } else { bg_color_obj = 0; } } /* Encode text */ if (textobj != Py_None) { text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; } if (_PGFT_BuildRenderMode(self->freetype, self, &render, face_size, style, rotation)) goto error; surface = _PGFT_Render_NewSurface( self->freetype, self, &render, text, &fg_color, (bg_color_obj || self->is_bg_col_set) ? &bg_color : 0, &r); if (!surface) goto error; free_string(text); surface_obj = (PyObject *)pgSurface_New(surface); if (!surface_obj) goto error; rect_obj = pgRect_New(&r); if (!rect_obj) goto error; rtuple = PyTuple_Pack(2, surface_obj, rect_obj); if (!rtuple) goto error; Py_DECREF(surface_obj); Py_DECREF(rect_obj); return rtuple; error: free_string(text); if (surface_obj) { Py_DECREF(surface_obj); } else if (surface) { SDL_FreeSurface(surface); } Py_XDECREF(rect_obj); Py_XDECREF(rtuple); return 0; } static PyObject * _ftfont_render_to(pgFontObject *self, PyObject *args, PyObject *kwds) { /* keyword list */ static char *kwlist[] = {"surf", "dest", "text", "fgcolor", "bgcolor", "style", "rotation", "size", 0}; /* input arguments */ PyObject *surface_obj = 0; PyObject *textobj = 0; PGFT_String *text = 0; Scale_t face_size = FACE_SIZE_NONE; PyObject *dest = 0; int xpos = 0; int ypos = 0; PyObject *fg_color_obj = 0; PyObject *bg_color_obj = 0; Angle_t rotation = self->rotation; int style = FT_STYLE_DEFAULT; SDL_Surface *surface = 0; /* output arguments */ SDL_Rect r; FontColor fg_color; FontColor bg_color; FontRenderMode render; if (!PyArg_ParseTupleAndKeywords( args, kwds, "O!OO|OOiO&O&", kwlist, /* required */ &pgSurface_Type, &surface_obj, &dest, &textobj, &fg_color_obj, /* optional */ &bg_color_obj, &style, obj_to_rotation, (void *)&rotation, obj_to_scale, (void *)&face_size)) goto error; if (fg_color_obj == Py_None) { fg_color_obj = 0; } if (bg_color_obj == Py_None) { bg_color_obj = 0; } if (parse_dest(dest, &xpos, &ypos)) goto error; if (fg_color_obj) { if (!pg_RGBAFromFuzzyColorObj(fg_color_obj, (Uint8 *)&fg_color)) { /* Exception already set for us */ goto error; } } else { fg_color.r = self->fgcolor[0]; fg_color.g = self->fgcolor[1]; fg_color.b = self->fgcolor[2]; fg_color.a = self->fgcolor[3]; } if (bg_color_obj) { if (!pg_RGBAFromFuzzyColorObj(bg_color_obj, (Uint8 *)&bg_color)) { /* Exception already set for us */ goto error; } } else { if (self->is_bg_col_set) { bg_color.r = self->bgcolor[0]; bg_color.g = self->bgcolor[1]; bg_color.b = self->bgcolor[2]; bg_color.a = self->bgcolor[3]; } else { bg_color_obj = 0; } } ASSERT_SELF_IS_ALIVE(self); /* Encode text */ if (textobj != Py_None) { text = _PGFT_EncodePyString(textobj, self->render_flags & FT_RFLAG_UCS4); if (!text) goto error; } if (_PGFT_BuildRenderMode(self->freetype, self, &render, face_size, style, rotation)) goto error; surface = surface_obj ? pgSurface_AsSurface(surface_obj) : NULL; if (!surface) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); goto error; } if (_PGFT_Render_ExistingSurface( self->freetype, self, &render, text, surface, xpos, ypos, &fg_color, (bg_color_obj || self->is_bg_col_set) ? &bg_color : 0, &r)) goto error; free_string(text); return pgRect_New(&r); error: free_string(text); return 0; } /**************************************************** * C API CALLS ****************************************************/ static PyObject * pgFont_New(const char *filename, long font_index) { pgFontObject *font; FreeTypeInstance *ft; ASSERT_GRAB_FREETYPE(ft, 0); if (!filename) { return 0; } font = (pgFontObject *)pgFont_Type.tp_new(&pgFont_Type, 0, 0); if (!font) { return 0; } if (_PGFT_TryLoadFont_Filename(ft, font, filename, font_index)) { return 0; } return (PyObject *)font; } /**************************************************** * FREETYPE MODULE METHODS ****************************************************/ /*************************************************************** * * Bindings for initialization/cleanup functions * * Explicit init/quit functions are required to work around * some issues regarding module caching and multi-threaded apps. * It's always good to let the user choose when to initialize * the module. * * TODO: These bindings can be removed once proper threading * support is in place. * ***************************************************************/ static PyObject * _ft_autoinit(PyObject *self, PyObject *_null) { int cache_size = FREETYPE_MOD_STATE(self)->cache_size; if (!FREETYPE_MOD_STATE(self)->freetype) { if (cache_size == 0) cache_size = PGFT_DEFAULT_CACHE_SIZE; if (_PGFT_Init(&(FREETYPE_MOD_STATE(self)->freetype), cache_size)) return RAISE(PyExc_RuntimeError, "Failed to initialize freetype library"); FREETYPE_MOD_STATE(self)->cache_size = cache_size; } Py_RETURN_NONE; } static PyObject * _ft_quit(PyObject *self, PyObject *_null) { _FreeTypeState *state = FREETYPE_STATE; if (state->freetype) { _PGFT_Quit(state->freetype); state->cache_size = 0; state->freetype = 0; } Py_RETURN_NONE; } static PyObject * _ft_init(PyObject *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = {"cache_size", "resolution", 0}; unsigned cache_size = 0; unsigned resolution = 0; _FreeTypeState *state = FREETYPE_MOD_STATE(self); if (!PyArg_ParseTupleAndKeywords(args, kwds, "|II", kwlist, &cache_size, &resolution)) { return NULL; } if (!state->freetype) { state->cache_size = cache_size; state->resolution = (resolution ? (FT_UInt)resolution : PGFT_DEFAULT_RESOLUTION); return _ft_autoinit(self, NULL); } Py_RETURN_NONE; } static PyObject * _ft_get_error(PyObject *self, PyObject *_null) { FreeTypeInstance *ft; ASSERT_GRAB_FREETYPE(ft, 0); if (ft->_error_msg[0]) { return PyUnicode_FromString(ft->_error_msg); } Py_RETURN_NONE; } static PyObject * _ft_get_version(PyObject *self, PyObject *args, PyObject *kwargs) { int linked = 1; static char *keywords[] = {"linked", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) { return NULL; } if (linked) { /* * The FreeType library is being initialized here separately from the * initialization of the `pygame.freetype` module so that the linked * version can always be obtained. This does not affect the * initialization state of `pygame.freetype` itself. * * The reason this is needed is because if freetype has not been * initialized, then a segmentation fault can happen. The alternative * would be to return something predefined to mean something akin to * "Unknown", but as this function is meant for debugging purposes, it * seems like a good idea to always be able to retrieve the linked * FreeType version. */ FT_Library lib; int err = FT_Init_FreeType(&lib); if (err) { PyErr_SetString(PyExc_RuntimeError, "FreeType could not be initialized"); FT_Done_FreeType(lib); return NULL; } FT_Int major, minor, patch; FT_Library_Version(lib, &major, &minor, &patch); FT_Done_FreeType(lib); return Py_BuildValue("iii", major, minor, patch); } else { return Py_BuildValue("iii", FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); } } static PyObject * _ft_get_cache_size(PyObject *self, PyObject *_null) { return PyLong_FromUnsignedLong( (unsigned long)(FREETYPE_STATE->cache_size)); } static PyObject * _ft_get_default_resolution(PyObject *self, PyObject *_null) { return PyLong_FromUnsignedLong( (unsigned long)(FREETYPE_STATE->resolution)); } static PyObject * _ft_set_default_resolution(PyObject *self, PyObject *args) { unsigned resolution = 0; _FreeTypeState *state = FREETYPE_MOD_STATE(self); if (!PyArg_ParseTuple(args, "|I", &resolution)) { return 0; } state->resolution = (resolution ? (FT_UInt)resolution : PGFT_DEFAULT_RESOLUTION); Py_RETURN_NONE; } static PyObject * _ft_get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(FREETYPE_MOD_STATE(self)->freetype ? 1 : 0); } static PyObject * _ft_get_default_font(PyObject *self, PyObject *_null) { return PyUnicode_FromString(DEFAULT_FONT_NAME); } static int _ft_traverse(PyObject *mod, visitproc visit, void *arg) { return 0; } static int _ft_clear(PyObject *mod) { if (FREETYPE_MOD_STATE(mod)->freetype) { _PGFT_Quit(FREETYPE_MOD_STATE(mod)->freetype); FREETYPE_MOD_STATE(mod)->freetype = 0; } return 0; } /**************************************************** * FREETYPE MODULE DECLARATION ****************************************************/ #ifndef PYPY_VERSION struct PyModuleDef _freetypemodule = { PyModuleDef_HEAD_INIT, MODULE_NAME, DOC_PYGAMEFREETYPE, sizeof(_FreeTypeState), _ft_methods, 0, _ft_traverse, _ft_clear, 0}; #else /* PYPY_VERSION */ _FreeTypeState _modstate; struct PyModuleDef _freetypemodule = { PyModuleDef_HEAD_INIT, MODULE_NAME, DOC_PYGAMEFREETYPE, -1 /* PyModule_GetState() not implemented */, _ft_methods, 0, _ft_traverse, _ft_clear, 0}; #endif /* PYPY_VERSION */ MODINIT_DEFINE(_freetype) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_FREETYPE_NUMSLOTS]; import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgFont_Type) < 0) { return NULL; } module = PyModule_Create(&_freetypemodule); if (!module) { return NULL; } FREETYPE_MOD_STATE(module)->freetype = 0; FREETYPE_MOD_STATE(module)->cache_size = 0; FREETYPE_MOD_STATE(module)->resolution = PGFT_DEFAULT_RESOLUTION; Py_INCREF(&pgFont_Type); if (PyModule_AddObject(module, FONT_TYPE_NAME, (PyObject *)&pgFont_Type)) { Py_DECREF(&pgFont_Type); Py_DECREF(module); return NULL; } #define DEC_CONST(x) \ if (PyModule_AddIntConstant(module, #x, (int)FT_##x)) { \ Py_DECREF(module); \ return NULL; \ } DEC_CONST(STYLE_NORMAL); DEC_CONST(STYLE_STRONG); DEC_CONST(STYLE_OBLIQUE); DEC_CONST(STYLE_UNDERLINE); DEC_CONST(STYLE_WIDE); DEC_CONST(STYLE_DEFAULT); DEC_CONST(BBOX_EXACT); DEC_CONST(BBOX_EXACT_GRIDFIT); DEC_CONST(BBOX_PIXEL); DEC_CONST(BBOX_PIXEL_GRIDFIT); /* export the c api */ #if PYGAMEAPI_FREETYPE_NUMSLOTS != 2 #error Mismatch between number of api slots and actual exports. #endif c_api[0] = &pgFont_Type; c_api[1] = &pgFont_New; apiobj = encapsulate_api(c_api, "freetype"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_pygame.h0000644000175100001770000002671614676242340015316 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* This will use PYGAMEAPI_EXTERN_SLOTS instead * of PYGAMEAPI_DEFINE_SLOTS for base modules. */ #ifndef _PYGAME_INTERNAL_H #define _PYGAME_INTERNAL_H #include "pgplatform.h" /* If PY_SSIZE_T_CLEAN is defined before including Python.h, length is a Py_ssize_t rather than an int for all # variants of formats (s#, y#, etc.) */ #define PY_SSIZE_T_CLEAN #include /* Ensure PyPy-specific code is not in use when running on GraalPython (PR * #2580) */ #if defined(GRAALVM_PYTHON) && defined(PYPY_VERSION) #undef PYPY_VERSION #endif #include /* SDL 1.2 constants removed from SDL 2 */ typedef enum { SDL_HWSURFACE = 0, SDL_RESIZABLE = SDL_WINDOW_RESIZABLE, SDL_ASYNCBLIT = 0, SDL_OPENGL = SDL_WINDOW_OPENGL, SDL_OPENGLBLIT = 0, SDL_ANYFORMAT = 0, SDL_HWPALETTE = 0, SDL_DOUBLEBUF = 0, SDL_FULLSCREEN = SDL_WINDOW_FULLSCREEN, SDL_HWACCEL = 0, SDL_SRCCOLORKEY = 0, SDL_RLEACCELOK = 0, SDL_SRCALPHA = 0, SDL_NOFRAME = SDL_WINDOW_BORDERLESS, SDL_GL_SWAP_CONTROL = 0, TIMER_RESOLUTION = 0 } PygameVideoFlags; /* the wheel button constants were removed from SDL 2 */ typedef enum { PGM_BUTTON_LEFT = SDL_BUTTON_LEFT, PGM_BUTTON_RIGHT = SDL_BUTTON_RIGHT, PGM_BUTTON_MIDDLE = SDL_BUTTON_MIDDLE, PGM_BUTTON_WHEELUP = 4, PGM_BUTTON_WHEELDOWN = 5, PGM_BUTTON_X1 = SDL_BUTTON_X1 + 2, PGM_BUTTON_X2 = SDL_BUTTON_X2 + 2, PGM_BUTTON_KEEP = 0x80 } PygameMouseFlags; typedef enum { /* Any SDL_* events here are for backward compatibility. */ SDL_NOEVENT = 0, SDL_ACTIVEEVENT = SDL_USEREVENT, SDL_VIDEORESIZE, SDL_VIDEOEXPOSE, PGE_MIDIIN, PGE_MIDIOUT, PGE_KEYREPEAT, /* Special internal pygame event, for managing key-presses */ /* DO NOT CHANGE THE ORDER OF EVENTS HERE */ PGE_WINDOWSHOWN, PGE_WINDOWHIDDEN, PGE_WINDOWEXPOSED, PGE_WINDOWMOVED, PGE_WINDOWRESIZED, PGE_WINDOWSIZECHANGED, PGE_WINDOWMINIMIZED, PGE_WINDOWMAXIMIZED, PGE_WINDOWRESTORED, PGE_WINDOWENTER, PGE_WINDOWLEAVE, PGE_WINDOWFOCUSGAINED, PGE_WINDOWFOCUSLOST, PGE_WINDOWCLOSE, PGE_WINDOWTAKEFOCUS, PGE_WINDOWHITTEST, PGE_WINDOWICCPROFCHANGED, PGE_WINDOWDISPLAYCHANGED, /* Here we define PGPOST_* events, events that act as a one-to-one * proxy for SDL events (and some extra events too!), the proxy is used * internally when pygame users use event.post() * * At a first glance, these may look redundant, but they are really * important, especially with event blocking. If proxy events are * not there, blocked events dont make it to our event filter, and * that can break a lot of stuff. * * IMPORTANT NOTE: Do not post events directly with these proxy types, * use the appropriate functions from event.c, that handle these proxy * events for you. * Proxy events are for internal use only */ PGPOST_EVENTBEGIN, /* mark start of proxy-events */ PGPOST_ACTIVEEVENT = PGPOST_EVENTBEGIN, PGPOST_APP_TERMINATING, PGPOST_APP_LOWMEMORY, PGPOST_APP_WILLENTERBACKGROUND, PGPOST_APP_DIDENTERBACKGROUND, PGPOST_APP_WILLENTERFOREGROUND, PGPOST_APP_DIDENTERFOREGROUND, PGPOST_AUDIODEVICEADDED, PGPOST_AUDIODEVICEREMOVED, PGPOST_CLIPBOARDUPDATE, PGPOST_CONTROLLERAXISMOTION, PGPOST_CONTROLLERBUTTONDOWN, PGPOST_CONTROLLERBUTTONUP, PGPOST_CONTROLLERDEVICEADDED, PGPOST_CONTROLLERDEVICEREMOVED, PGPOST_CONTROLLERDEVICEREMAPPED, PGPOST_CONTROLLERTOUCHPADDOWN, PGPOST_CONTROLLERTOUCHPADMOTION, PGPOST_CONTROLLERTOUCHPADUP, PGPOST_CONTROLLERSENSORUPDATE, PGPOST_DOLLARGESTURE, PGPOST_DOLLARRECORD, PGPOST_DROPFILE, PGPOST_DROPTEXT, PGPOST_DROPBEGIN, PGPOST_DROPCOMPLETE, PGPOST_FINGERMOTION, PGPOST_FINGERDOWN, PGPOST_FINGERUP, PGPOST_KEYDOWN, PGPOST_KEYMAPCHANGED, PGPOST_KEYUP, PGPOST_JOYAXISMOTION, PGPOST_JOYBALLMOTION, PGPOST_JOYHATMOTION, PGPOST_JOYBUTTONDOWN, PGPOST_JOYBUTTONUP, PGPOST_JOYDEVICEADDED, PGPOST_JOYDEVICEREMOVED, PGPOST_LOCALECHANGED, PGPOST_MIDIIN, PGPOST_MIDIOUT, PGPOST_MOUSEMOTION, PGPOST_MOUSEBUTTONDOWN, PGPOST_MOUSEBUTTONUP, PGPOST_MOUSEWHEEL, PGPOST_MULTIGESTURE, PGPOST_NOEVENT, PGPOST_QUIT, PGPOST_RENDER_TARGETS_RESET, PGPOST_RENDER_DEVICE_RESET, PGPOST_SYSWMEVENT, PGPOST_TEXTEDITING, PGPOST_TEXTINPUT, PGPOST_VIDEORESIZE, PGPOST_VIDEOEXPOSE, PGPOST_WINDOWSHOWN, PGPOST_WINDOWHIDDEN, PGPOST_WINDOWEXPOSED, PGPOST_WINDOWMOVED, PGPOST_WINDOWRESIZED, PGPOST_WINDOWSIZECHANGED, PGPOST_WINDOWMINIMIZED, PGPOST_WINDOWMAXIMIZED, PGPOST_WINDOWRESTORED, PGPOST_WINDOWENTER, PGPOST_WINDOWLEAVE, PGPOST_WINDOWFOCUSGAINED, PGPOST_WINDOWFOCUSLOST, PGPOST_WINDOWCLOSE, PGPOST_WINDOWTAKEFOCUS, PGPOST_WINDOWHITTEST, PGPOST_WINDOWICCPROFCHANGED, PGPOST_WINDOWDISPLAYCHANGED, PGE_USEREVENT, /* this event must stay in this position only */ PG_NUMEVENTS = SDL_LASTEVENT /* Not an event. Indicates end of user events. */ } PygameEventCode; /* SDL1 ACTIVEEVENT state attribute can take the following values */ /* These constant values are directly picked from SDL1 source */ #define SDL_APPMOUSEFOCUS 0x01 #define SDL_APPINPUTFOCUS 0x02 #define SDL_APPACTIVE 0x04 /* Surface flags: based on SDL 1.2 flags */ typedef enum { PGS_SWSURFACE = 0x00000000, PGS_HWSURFACE = 0x00000001, PGS_ASYNCBLIT = 0x00000004, PGS_ANYFORMAT = 0x10000000, PGS_HWPALETTE = 0x20000000, PGS_DOUBLEBUF = 0x40000000, PGS_FULLSCREEN = 0x80000000, PGS_SCALED = 0x00000200, PGS_OPENGL = 0x00000002, PGS_OPENGLBLIT = 0x0000000A, PGS_RESIZABLE = 0x00000010, PGS_NOFRAME = 0x00000020, PGS_SHOWN = 0x00000040, /* Added from SDL 2 */ PGS_HIDDEN = 0x00000080, /* Added from SDL 2 */ PGS_HWACCEL = 0x00000100, PGS_SRCCOLORKEY = 0x00001000, PGS_RLEACCELOK = 0x00002000, PGS_RLEACCEL = 0x00004000, PGS_SRCALPHA = 0x00010000, PGS_PREALLOC = 0x01000000 } PygameSurfaceFlags; // TODO Implement check below in a way that does not break CI /* New buffer protocol (PEP 3118) implemented on all supported Py versions. #if !defined(Py_TPFLAGS_HAVE_NEWBUFFER) #error No support for PEP 3118/Py_TPFLAGS_HAVE_NEWBUFFER. Please use a supported Python version. #endif */ #define RAISE(x, y) (PyErr_SetString((x), (y)), NULL) #define DEL_ATTR_NOT_SUPPORTED_CHECK(name, value) \ do { \ if (!value) { \ PyErr_Format(PyExc_AttributeError, "Cannot delete attribute %s", \ name); \ return -1; \ } \ } while (0) #define DEL_ATTR_NOT_SUPPORTED_CHECK_NO_NAME(value) \ do { \ if (!value) { \ PyErr_SetString(PyExc_AttributeError, "Cannot delete attribute"); \ return -1; \ } \ } while (0) /* * Initialization checks */ #define VIDEO_INIT_CHECK() \ if (!SDL_WasInit(SDL_INIT_VIDEO)) \ return RAISE(pgExc_SDLError, "video system not initialized") #define JOYSTICK_INIT_CHECK() \ if (!SDL_WasInit(SDL_INIT_JOYSTICK)) \ return RAISE(pgExc_SDLError, "joystick system not initialized") /* thread check */ #ifdef WITH_THREAD #define PG_CHECK_THREADS() (1) #else /* ~WITH_THREAD */ #define PG_CHECK_THREADS() \ (RAISE(PyExc_NotImplementedError, "Python built without thread support")) #endif /* ~WITH_THREAD */ #define PyType_Init(x) (((x).ob_type) = &PyType_Type) /* CPython 3.6 had initial and undocumented FASTCALL support, but we play it * safe by not relying on implementation details */ #if PY_VERSION_HEX < 0x03070000 /* Macro for naming a pygame fastcall wrapper function */ #define PG_FASTCALL_NAME(func) _##func##_fastcall_wrap /* used to forward declare compat functions */ #define PG_DECLARE_FASTCALL_FUNC(func, self_type) \ static PyObject *PG_FASTCALL_NAME(func)(self_type * self, PyObject * args) /* Using this macro on a function defined with the FASTCALL calling convention * adds a wrapper definition that uses regular python VARARGS convention. * Since it is guaranteed that the 'args' object is a tuple, we can directly * call PySequence_Fast_ITEMS and PyTuple_GET_SIZE on it (which are macros that * assume the same, and don't do error checking) */ #define PG_WRAP_FASTCALL_FUNC(func, self_type) \ PG_DECLARE_FASTCALL_FUNC(func, self_type) \ { \ return func(self, (PyObject *const *)PySequence_Fast_ITEMS(args), \ PyTuple_GET_SIZE(args)); \ } #define PG_FASTCALL METH_VARARGS #else /* PY_VERSION_HEX >= 0x03070000 */ /* compat macros are no-op on python versions that support fastcall */ #define PG_FASTCALL_NAME(func) func #define PG_DECLARE_FASTCALL_FUNC(func, self_type) #define PG_WRAP_FASTCALL_FUNC(func, self_type) #define PG_FASTCALL METH_FASTCALL #endif /* PY_VERSION_HEX >= 0x03070000 */ /* * event module internals */ struct pgEventObject { PyObject_HEAD int type; PyObject *dict; }; /* * surflock module internals */ typedef struct { PyObject_HEAD PyObject *surface; PyObject *lockobj; PyObject *weakrefs; } pgLifetimeLockObject; /* * surface module internals */ struct pgSubSurface_Data { PyObject *owner; int pixeloffset; int offsetx, offsety; }; /* * color module internals */ struct pgColorObject { PyObject_HEAD Uint8 data[4]; Uint8 len; }; /* * include public API */ #include "include/_pygame.h" /* Slot counts. * Remember to keep these constants up to date. */ #define PYGAMEAPI_RECT_NUMSLOTS 5 #define PYGAMEAPI_JOYSTICK_NUMSLOTS 2 #define PYGAMEAPI_DISPLAY_NUMSLOTS 2 #define PYGAMEAPI_SURFACE_NUMSLOTS 4 #define PYGAMEAPI_SURFLOCK_NUMSLOTS 8 #define PYGAMEAPI_RWOBJECT_NUMSLOTS 6 #define PYGAMEAPI_PIXELARRAY_NUMSLOTS 2 #define PYGAMEAPI_COLOR_NUMSLOTS 5 #define PYGAMEAPI_MATH_NUMSLOTS 2 #define PYGAMEAPI_BASE_NUMSLOTS 27 #define PYGAMEAPI_EVENT_NUMSLOTS 6 #endif /* _PYGAME_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0571256 pygame-2.6.1/src_c/_sdl2/0000755000175100001770000000000014676242436014521 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612188.1951277 pygame-2.6.1/src_c/_sdl2/audio.c0000644000175100001770000445462514676242434016010 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sdl2.audio", "sources": [ "src_c/cython/pygame/_sdl2/audio.pyx" ] }, "module_name": "pygame._sdl2.audio" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sdl2__audio #define __PYX_HAVE_API__pygame___sdl2__audio /* Early includes */ #include #include #include "SDL.h" #include "pythread.h" #include #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/_sdl2/audio.pyx", "", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /* BufferFormatStructs.proto */ struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* Atomics.proto */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 #endif #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS #define __pyx_atomic_int_type int #define __pyx_nonatomic_int_type int #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__)) #include #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ (defined(_MSC_VER) && _MSC_VER >= 1700))) #include #endif #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type atomic_int #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C atomics" #endif #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ \ (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type std::atomic_int #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C++ atomics" #endif #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1) #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif #elif CYTHON_ATOMICS && defined(_MSC_VER) #include #undef __pyx_atomic_int_type #define __pyx_atomic_int_type long #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long #pragma intrinsic (_InterlockedExchangeAdd) #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1) #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif #else #undef CYTHON_ATOMICS #define CYTHON_ATOMICS 0 #ifdef __PYX_DEBUG_ATOMICS #warning "Not using atomics" #endif #endif #if CYTHON_ATOMICS #define __pyx_add_acquisition_count(memview)\ __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview)) #define __pyx_sub_acquisition_count(memview)\ __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview)) #else #define __pyx_add_acquisition_count(memview)\ __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) #define __pyx_sub_acquisition_count(memview)\ __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) #endif /* MemviewSliceStruct.proto */ struct __pyx_memoryview_obj; typedef struct { struct __pyx_memoryview_obj *memview; char *data; Py_ssize_t shape[8]; Py_ssize_t strides[8]; Py_ssize_t suboffsets[8]; } __Pyx_memviewslice; #define __Pyx_MemoryView_Len(m) (m.shape[0]) /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice; struct __pyx_array_obj; struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; /* "pygame/_sdl2/audio.pxd":60 * cdef Uint16 _AUDIO_F32 "AUDIO_F32" * * cdef class AudioDevice: # <<<<<<<<<<<<<< * cdef SDL_AudioDeviceID _deviceid * cdef SDL_AudioSpec desired */ struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice { PyObject_HEAD SDL_AudioDeviceID _deviceid; SDL_AudioSpec desired; SDL_AudioSpec obtained; int _iscapture; PyObject *_callback; PyObject *_devicename; }; /* "View.MemoryView":114 * @cython.collection_type("sequence") * @cname("__pyx_array") * cdef class array: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_array_obj { PyObject_HEAD struct __pyx_vtabstruct_array *__pyx_vtab; char *data; Py_ssize_t len; char *format; int ndim; Py_ssize_t *_shape; Py_ssize_t *_strides; Py_ssize_t itemsize; PyObject *mode; PyObject *_format; void (*callback_free_data)(void *); int free_data; int dtype_is_object; }; /* "View.MemoryView":302 * * @cname('__pyx_MemviewEnum') * cdef class Enum(object): # <<<<<<<<<<<<<< * cdef object name * def __init__(self, name): */ struct __pyx_MemviewEnum_obj { PyObject_HEAD PyObject *name; }; /* "View.MemoryView":337 * * @cname('__pyx_memoryview') * cdef class memoryview: # <<<<<<<<<<<<<< * * cdef object obj */ struct __pyx_memoryview_obj { PyObject_HEAD struct __pyx_vtabstruct_memoryview *__pyx_vtab; PyObject *obj; PyObject *_size; PyObject *_array_interface; PyThread_type_lock lock; __pyx_atomic_int_type acquisition_count; Py_buffer view; int flags; int dtype_is_object; __Pyx_TypeInfo *typeinfo; }; /* "View.MemoryView":952 * @cython.collection_type("sequence") * @cname('__pyx_memoryviewslice') * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< * "Internal class for passing memoryview slices to Python" * */ struct __pyx_memoryviewslice_obj { struct __pyx_memoryview_obj __pyx_base; __Pyx_memviewslice from_slice; PyObject *from_object; PyObject *(*to_object_func)(char *); int (*to_dtype_func)(char *, PyObject *); }; /* "View.MemoryView":114 * @cython.collection_type("sequence") * @cname("__pyx_array") * cdef class array: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_array { PyObject *(*get_memview)(struct __pyx_array_obj *); }; static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; /* "View.MemoryView":337 * * @cname('__pyx_memoryview') * cdef class memoryview: # <<<<<<<<<<<<<< * * cdef object obj */ struct __pyx_vtabstruct_memoryview { char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); PyObject *(*_get_base)(struct __pyx_memoryview_obj *); }; static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; /* "View.MemoryView":952 * @cython.collection_type("sequence") * @cname('__pyx_memoryviewslice') * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< * "Internal class for passing memoryview slices to Python" * */ struct __pyx_vtabstruct__memoryviewslice { struct __pyx_vtabstruct_memoryview __pyx_base; }; static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* RaiseUnexpectedTypeError.proto */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* BuildPyUnicode.proto */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); /* JoinPyUnicode.proto */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); /* StrEquals.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif /* PyObjectFormatSimple.proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #elif PY_MAJOR_VERSION < 3 #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\ PyObject_Format(s, f)) #elif CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ PyObject_Format(s, f)) #else #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #endif CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* DivInt[Py_ssize_t].proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* UnaryNegOverflows.proto */ #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* AssertionsEnabled.proto */ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (1) #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) static int __pyx_assertions_enabled_flag; #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) static int __Pyx_init_assertions_enabled(void) { PyObject *builtins, *debug, *debug_str; int flag; builtins = PyEval_GetBuiltins(); if (!builtins) goto bad; debug_str = PyUnicode_FromStringAndSize("__debug__", 9); if (!debug_str) goto bad; debug = PyObject_GetItem(builtins, debug_str); Py_DECREF(debug_str); if (!debug) goto bad; flag = PyObject_IsTrue(debug); Py_DECREF(debug); if (flag == -1) goto bad; __pyx_assertions_enabled_flag = flag; return 0; bad: __pyx_assertions_enabled_flag = 1; return -1; } #else #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (!Py_OptimizeFlag) #endif /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportDottedModule.proto */ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* PySequenceMultiply.proto */ #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul) static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul); /* SetItemInt.proto */ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); /* RaiseUnboundLocalError.proto */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); /* DivInt[long].proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* StringJoin.proto */ #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char); /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* SetVTable.proto */ static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); /* GetVTable.proto */ static void* __Pyx_GetVtable(PyTypeObject *type); /* MergeVTables.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type); #endif /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif /* BufferStructDeclare.proto */ typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; /* MemviewSliceIsContig.proto */ static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); /* OverlappingSlices.proto */ static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, __Pyx_memviewslice *slice2, int ndim, size_t itemsize); /* IsLittleEndian.proto */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); /* BufferFormatCheck.proto */ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type); /* TypeInfoCompare.proto */ static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); /* MemviewSliceValidateAndInit.proto */ static int __Pyx_ValidateAndInit_memviewslice( int *axes_specs, int c_or_f_flag, int buf_flags, int ndim, __Pyx_TypeInfo *dtype, __Pyx_BufFmt_StackElem stack[], __Pyx_memviewslice *memviewslice, PyObject *original_obj); /* ObjectToMemviewSlice.proto */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(PyObject *, int writable_flag); /* MemviewDtypeToObject.proto */ static CYTHON_INLINE PyObject *__pyx_memview_get_nn_Uint8(const char *itemp); static CYTHON_INLINE int __pyx_memview_set_nn_Uint8(const char *itemp, PyObject *obj); /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, const char *mode, int ndim, size_t sizeof_dtype, int contig_flag, int dtype_is_object); /* MemviewSliceInit.proto */ #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d #define __Pyx_MEMVIEW_DIRECT 1 #define __Pyx_MEMVIEW_PTR 2 #define __Pyx_MEMVIEW_FULL 4 #define __Pyx_MEMVIEW_CONTIG 8 #define __Pyx_MEMVIEW_STRIDED 16 #define __Pyx_MEMVIEW_FOLLOW 32 #define __Pyx_IS_C_CONTIG 1 #define __Pyx_IS_F_CONTIG 2 static int __Pyx_init_memviewslice( struct __pyx_memoryview_obj *memview, int ndim, __Pyx_memviewslice *memviewslice, int memview_is_new_reference); static CYTHON_INLINE int __pyx_add_acquisition_count_locked( __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count) #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__) static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int); /* TypeInfoToFormat.proto */ struct __pyx_typeinfo_string { char string[3]; }; static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint16(Uint16 value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value); /* CIntFromPy.proto */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE Uint16 __Pyx_PyInt_As_Uint16(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint32(Uint32 value); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* Module declarations from "pygame._sdl2.audio" */ static PyObject *__pyx_collections_abc_Sequence = 0; static PyObject *generic = 0; static PyObject *strided = 0; static PyObject *indirect = 0; static PyObject *contiguous = 0; static PyObject *indirect_contiguous = 0; static int __pyx_memoryview_thread_locks_used; static PyThread_type_lock __pyx_memoryview_thread_locks[8]; static void __pyx_f_6pygame_5_sdl2_5audio_recording_cb(void *, Uint8 *, int); /*proto*/ static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/ static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/ static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ static PyObject *_unellipsify(PyObject *, int); /*proto*/ static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/ static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/ static int __pyx_memoryview_err_no_memory(void); /*proto*/ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/ /* #### Code section: typeinfo ### */ static __Pyx_TypeInfo __Pyx_TypeInfo_nn_Uint8 = { "Uint8", NULL, sizeof(Uint8), { 0 }, 0, __PYX_IS_UNSIGNED(Uint8) ? 'U' : 'I', __PYX_IS_UNSIGNED(Uint8), 0 }; /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sdl2.audio" extern int __pyx_module_is_main_pygame___sdl2__audio; int __pyx_module_is_main_pygame___sdl2__audio = 0; /* Implementation of "pygame._sdl2.audio" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin___import__; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_AssertionError; static PyObject *__pyx_builtin_Ellipsis; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_IndexError; /* #### Code section: string_decls ### */ static const char __pyx_k_[] = ": "; static const char __pyx_k_O[] = "O"; static const char __pyx_k_T[] = "T{"; static const char __pyx_k_c[] = "c"; static const char __pyx_k_i[] = "i"; static const char __pyx_k__2[] = "."; static const char __pyx_k__3[] = "*"; static const char __pyx_k__6[] = "'"; static const char __pyx_k__7[] = ")"; static const char __pyx_k__9[] = "^"; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_id[] = "id"; static const char __pyx_k__10[] = ""; static const char __pyx_k__11[] = ":"; static const char __pyx_k__12[] = "}"; static const char __pyx_k__13[] = "("; static const char __pyx_k__14[] = ","; static const char __pyx_k__16[] = ")>"; static const char __pyx_k__38[] = "?"; static const char __pyx_k_abc[] = "abc"; static const char __pyx_k_and[] = " and "; static const char __pyx_k_got[] = " (got "; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_base[] = "base"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_ndim[] = "ndim"; static const char __pyx_k_pack[] = "pack"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_spec[] = "__spec__"; static const char __pyx_k_step[] = "step"; static const char __pyx_k_stop[] = "stop"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_ASCII[] = "ASCII"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_count[] = "count"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_index[] = "index"; static const char __pyx_k_names[] = "names"; static const char __pyx_k_pause[] = "pause"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_shape[] = "shape"; static const char __pyx_k_start[] = "start"; static const char __pyx_k_utf_8[] = "utf-8"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_struct[] = "struct"; static const char __pyx_k_unpack[] = "unpack"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_fortran[] = "fortran"; static const char __pyx_k_memview[] = "memview"; static const char __pyx_k_AUDIO_S8[] = "AUDIO_S8"; static const char __pyx_k_AUDIO_U8[] = "AUDIO_U8"; static const char __pyx_k_Ellipsis[] = "Ellipsis"; static const char __pyx_k_Sequence[] = "Sequence"; static const char __pyx_k_callback[] = "callback"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_itemsize[] = "itemsize"; static const char __pyx_k_pause_on[] = "pause_on"; static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_register[] = "register"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_AUDIO_F32[] = "AUDIO_F32"; static const char __pyx_k_AUDIO_S16[] = "AUDIO_S16"; static const char __pyx_k_AUDIO_S32[] = "AUDIO_S32"; static const char __pyx_k_AUDIO_U16[] = "AUDIO_U16"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_chunksize[] = "chunksize"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_frequency[] = "frequency"; static const char __pyx_k_iscapture[] = "iscapture"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_print_exc[] = "print_exc"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_traceback[] = "traceback"; static const char __pyx_k_IndexError[] = "IndexError"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_devicename[] = "devicename"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_AudioDevice[] = "__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5audio_AudioDevice); Py_CLEAR(clear_module_state->__pyx_array_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_array); Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum); Py_CLEAR(clear_module_state->__pyx_memoryview_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview); Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice); Py_CLEAR(clear_module_state->__pyx_kp_u_); Py_CLEAR(clear_module_state->__pyx_n_s_ASCII); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_ALLOW_ANY_CHANGE); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_F32); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_F32LSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_F32MSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S16); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S16LSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S16MSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S32); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S32LSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S32MSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_S8); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_U16); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_U16LSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_U16MSB); Py_CLEAR(clear_module_state->__pyx_n_s_AUDIO_U8); Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi); Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError); Py_CLEAR(clear_module_state->__pyx_kp_s_AudioDevice); Py_CLEAR(clear_module_state->__pyx_n_s_AudioDevice_2); Py_CLEAR(clear_module_state->__pyx_n_s_AudioDevice___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_AudioDevice___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_AudioDevice_close); Py_CLEAR(clear_module_state->__pyx_n_s_AudioDevice_pause); Py_CLEAR(clear_module_state->__pyx_kp_s_Audio_system_not_initialised); Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri); Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi); Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with); Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct); Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis); Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr); Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); Py_CLEAR(clear_module_state->__pyx_n_s_IndexError); Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d); Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte); Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr); Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis); Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError); Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x); Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object); Py_CLEAR(clear_module_state->__pyx_n_b_O); Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a); Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); Py_CLEAR(clear_module_state->__pyx_n_s_Sequence); Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d); Py_CLEAR(clear_module_state->__pyx_kp_b_T); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object); Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView); Py_CLEAR(clear_module_state->__pyx_kp_b__10); Py_CLEAR(clear_module_state->__pyx_kp_b__11); Py_CLEAR(clear_module_state->__pyx_kp_b__12); Py_CLEAR(clear_module_state->__pyx_kp_u__13); Py_CLEAR(clear_module_state->__pyx_kp_u__14); Py_CLEAR(clear_module_state->__pyx_kp_s__16); Py_CLEAR(clear_module_state->__pyx_kp_u__2); Py_CLEAR(clear_module_state->__pyx_n_s__3); Py_CLEAR(clear_module_state->__pyx_n_s__38); Py_CLEAR(clear_module_state->__pyx_kp_u__6); Py_CLEAR(clear_module_state->__pyx_kp_u__7); Py_CLEAR(clear_module_state->__pyx_kp_b__9); Py_CLEAR(clear_module_state->__pyx_n_s_abc); Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer); Py_CLEAR(clear_module_state->__pyx_n_s_allowed_changes); Py_CLEAR(clear_module_state->__pyx_kp_u_and); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_audio_format_str); Py_CLEAR(clear_module_state->__pyx_n_s_audioformat); Py_CLEAR(clear_module_state->__pyx_kp_s_audioformat_s); Py_CLEAR(clear_module_state->__pyx_n_s_base); Py_CLEAR(clear_module_state->__pyx_n_s_c); Py_CLEAR(clear_module_state->__pyx_n_u_c); Py_CLEAR(clear_module_state->__pyx_n_s_callback); Py_CLEAR(clear_module_state->__pyx_n_s_chunksize); Py_CLEAR(clear_module_state->__pyx_kp_s_chunksize_s); Py_CLEAR(clear_module_state->__pyx_n_s_class); Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_close); Py_CLEAR(clear_module_state->__pyx_n_s_collections); Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc); Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct); Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect); Py_CLEAR(clear_module_state->__pyx_n_s_count); Py_CLEAR(clear_module_state->__pyx_n_s_devicename); Py_CLEAR(clear_module_state->__pyx_kp_s_devicename_must_be_a_string); Py_CLEAR(clear_module_state->__pyx_kp_s_devicename_s); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_encode); Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); Py_CLEAR(clear_module_state->__pyx_n_s_error); Py_CLEAR(clear_module_state->__pyx_n_s_flags); Py_CLEAR(clear_module_state->__pyx_n_s_format); Py_CLEAR(clear_module_state->__pyx_n_s_fortran); Py_CLEAR(clear_module_state->__pyx_n_u_fortran); Py_CLEAR(clear_module_state->__pyx_n_s_frequency); Py_CLEAR(clear_module_state->__pyx_kp_s_frequency_s); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_get_audio_device_names); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_kp_u_got); Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi); Py_CLEAR(clear_module_state->__pyx_n_s_i); Py_CLEAR(clear_module_state->__pyx_n_s_id); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_index); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_n_s_iscapture); Py_CLEAR(clear_module_state->__pyx_kp_s_iscapture_s); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_itemsize); Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array); Py_CLEAR(clear_module_state->__pyx_n_s_join); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_memview); Py_CLEAR(clear_module_state->__pyx_n_s_mode); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_name_2); Py_CLEAR(clear_module_state->__pyx_n_s_names); Py_CLEAR(clear_module_state->__pyx_n_s_ndim); Py_CLEAR(clear_module_state->__pyx_n_s_new); Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_n_s_numchannels); Py_CLEAR(clear_module_state->__pyx_kp_s_numchannels_s); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pack); Py_CLEAR(clear_module_state->__pyx_n_s_pause); Py_CLEAR(clear_module_state->__pyx_n_s_pause_on); Py_CLEAR(clear_module_state->__pyx_n_s_pickle); Py_CLEAR(clear_module_state->__pyx_n_s_print_exc); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_audio); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); Py_CLEAR(clear_module_state->__pyx_n_s_range); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_register); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_shape); Py_CLEAR(clear_module_state->__pyx_n_s_size); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_audio); Py_CLEAR(clear_module_state->__pyx_n_s_start); Py_CLEAR(clear_module_state->__pyx_n_s_step); Py_CLEAR(clear_module_state->__pyx_n_s_stop); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_struct); Py_CLEAR(clear_module_state->__pyx_n_s_sys); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_traceback); Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data); Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str); Py_CLEAR(clear_module_state->__pyx_n_s_unpack); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_kp_s_utf_8); Py_CLEAR(clear_module_state->__pyx_n_s_version_info); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_3); Py_CLEAR(clear_module_state->__pyx_int_112105877); Py_CLEAR(clear_module_state->__pyx_int_136983863); Py_CLEAR(clear_module_state->__pyx_int_184977713); Py_CLEAR(clear_module_state->__pyx_int_neg_1); Py_CLEAR(clear_module_state->__pyx_slice__5); Py_CLEAR(clear_module_state->__pyx_tuple__4); Py_CLEAR(clear_module_state->__pyx_tuple__8); Py_CLEAR(clear_module_state->__pyx_tuple__15); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__18); Py_CLEAR(clear_module_state->__pyx_tuple__19); Py_CLEAR(clear_module_state->__pyx_tuple__20); Py_CLEAR(clear_module_state->__pyx_tuple__21); Py_CLEAR(clear_module_state->__pyx_tuple__22); Py_CLEAR(clear_module_state->__pyx_tuple__23); Py_CLEAR(clear_module_state->__pyx_tuple__24); Py_CLEAR(clear_module_state->__pyx_tuple__25); Py_CLEAR(clear_module_state->__pyx_tuple__26); Py_CLEAR(clear_module_state->__pyx_tuple__28); Py_CLEAR(clear_module_state->__pyx_tuple__30); Py_CLEAR(clear_module_state->__pyx_tuple__31); Py_CLEAR(clear_module_state->__pyx_tuple__33); Py_CLEAR(clear_module_state->__pyx_tuple__36); Py_CLEAR(clear_module_state->__pyx_codeobj__27); Py_CLEAR(clear_module_state->__pyx_codeobj__29); Py_CLEAR(clear_module_state->__pyx_codeobj__32); Py_CLEAR(clear_module_state->__pyx_codeobj__34); Py_CLEAR(clear_module_state->__pyx_codeobj__35); Py_CLEAR(clear_module_state->__pyx_codeobj__37); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5audio_AudioDevice); Py_VISIT(traverse_module_state->__pyx_array_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_array); Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum); Py_VISIT(traverse_module_state->__pyx_memoryview_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview); Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice); Py_VISIT(traverse_module_state->__pyx_kp_u_); Py_VISIT(traverse_module_state->__pyx_n_s_ASCII); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_ALLOW_ANY_CHANGE); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_F32); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_F32LSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_F32MSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S16); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S16LSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S16MSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S32); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S32LSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S32MSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_S8); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_U16); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_U16LSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_U16MSB); Py_VISIT(traverse_module_state->__pyx_n_s_AUDIO_U8); Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi); Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError); Py_VISIT(traverse_module_state->__pyx_kp_s_AudioDevice); Py_VISIT(traverse_module_state->__pyx_n_s_AudioDevice_2); Py_VISIT(traverse_module_state->__pyx_n_s_AudioDevice___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_AudioDevice___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_AudioDevice_close); Py_VISIT(traverse_module_state->__pyx_n_s_AudioDevice_pause); Py_VISIT(traverse_module_state->__pyx_kp_s_Audio_system_not_initialised); Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri); Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi); Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with); Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct); Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis); Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr); Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); Py_VISIT(traverse_module_state->__pyx_n_s_IndexError); Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d); Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte); Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr); Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis); Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError); Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x); Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object); Py_VISIT(traverse_module_state->__pyx_n_b_O); Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a); Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); Py_VISIT(traverse_module_state->__pyx_n_s_Sequence); Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d); Py_VISIT(traverse_module_state->__pyx_kp_b_T); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object); Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView); Py_VISIT(traverse_module_state->__pyx_kp_b__10); Py_VISIT(traverse_module_state->__pyx_kp_b__11); Py_VISIT(traverse_module_state->__pyx_kp_b__12); Py_VISIT(traverse_module_state->__pyx_kp_u__13); Py_VISIT(traverse_module_state->__pyx_kp_u__14); Py_VISIT(traverse_module_state->__pyx_kp_s__16); Py_VISIT(traverse_module_state->__pyx_kp_u__2); Py_VISIT(traverse_module_state->__pyx_n_s__3); Py_VISIT(traverse_module_state->__pyx_n_s__38); Py_VISIT(traverse_module_state->__pyx_kp_u__6); Py_VISIT(traverse_module_state->__pyx_kp_u__7); Py_VISIT(traverse_module_state->__pyx_kp_b__9); Py_VISIT(traverse_module_state->__pyx_n_s_abc); Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer); Py_VISIT(traverse_module_state->__pyx_n_s_allowed_changes); Py_VISIT(traverse_module_state->__pyx_kp_u_and); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_audio_format_str); Py_VISIT(traverse_module_state->__pyx_n_s_audioformat); Py_VISIT(traverse_module_state->__pyx_kp_s_audioformat_s); Py_VISIT(traverse_module_state->__pyx_n_s_base); Py_VISIT(traverse_module_state->__pyx_n_s_c); Py_VISIT(traverse_module_state->__pyx_n_u_c); Py_VISIT(traverse_module_state->__pyx_n_s_callback); Py_VISIT(traverse_module_state->__pyx_n_s_chunksize); Py_VISIT(traverse_module_state->__pyx_kp_s_chunksize_s); Py_VISIT(traverse_module_state->__pyx_n_s_class); Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_close); Py_VISIT(traverse_module_state->__pyx_n_s_collections); Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc); Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct); Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect); Py_VISIT(traverse_module_state->__pyx_n_s_count); Py_VISIT(traverse_module_state->__pyx_n_s_devicename); Py_VISIT(traverse_module_state->__pyx_kp_s_devicename_must_be_a_string); Py_VISIT(traverse_module_state->__pyx_kp_s_devicename_s); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_encode); Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); Py_VISIT(traverse_module_state->__pyx_n_s_error); Py_VISIT(traverse_module_state->__pyx_n_s_flags); Py_VISIT(traverse_module_state->__pyx_n_s_format); Py_VISIT(traverse_module_state->__pyx_n_s_fortran); Py_VISIT(traverse_module_state->__pyx_n_u_fortran); Py_VISIT(traverse_module_state->__pyx_n_s_frequency); Py_VISIT(traverse_module_state->__pyx_kp_s_frequency_s); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_get_audio_device_names); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_kp_u_got); Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi); Py_VISIT(traverse_module_state->__pyx_n_s_i); Py_VISIT(traverse_module_state->__pyx_n_s_id); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_index); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_n_s_iscapture); Py_VISIT(traverse_module_state->__pyx_kp_s_iscapture_s); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_itemsize); Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array); Py_VISIT(traverse_module_state->__pyx_n_s_join); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_memview); Py_VISIT(traverse_module_state->__pyx_n_s_mode); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_name_2); Py_VISIT(traverse_module_state->__pyx_n_s_names); Py_VISIT(traverse_module_state->__pyx_n_s_ndim); Py_VISIT(traverse_module_state->__pyx_n_s_new); Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_n_s_numchannels); Py_VISIT(traverse_module_state->__pyx_kp_s_numchannels_s); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pack); Py_VISIT(traverse_module_state->__pyx_n_s_pause); Py_VISIT(traverse_module_state->__pyx_n_s_pause_on); Py_VISIT(traverse_module_state->__pyx_n_s_pickle); Py_VISIT(traverse_module_state->__pyx_n_s_print_exc); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_audio); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); Py_VISIT(traverse_module_state->__pyx_n_s_range); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_register); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_shape); Py_VISIT(traverse_module_state->__pyx_n_s_size); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_audio); Py_VISIT(traverse_module_state->__pyx_n_s_start); Py_VISIT(traverse_module_state->__pyx_n_s_step); Py_VISIT(traverse_module_state->__pyx_n_s_stop); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_struct); Py_VISIT(traverse_module_state->__pyx_n_s_sys); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_traceback); Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data); Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str); Py_VISIT(traverse_module_state->__pyx_n_s_unpack); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_kp_s_utf_8); Py_VISIT(traverse_module_state->__pyx_n_s_version_info); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_3); Py_VISIT(traverse_module_state->__pyx_int_112105877); Py_VISIT(traverse_module_state->__pyx_int_136983863); Py_VISIT(traverse_module_state->__pyx_int_184977713); Py_VISIT(traverse_module_state->__pyx_int_neg_1); Py_VISIT(traverse_module_state->__pyx_slice__5); Py_VISIT(traverse_module_state->__pyx_tuple__4); Py_VISIT(traverse_module_state->__pyx_tuple__8); Py_VISIT(traverse_module_state->__pyx_tuple__15); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__18); Py_VISIT(traverse_module_state->__pyx_tuple__19); Py_VISIT(traverse_module_state->__pyx_tuple__20); Py_VISIT(traverse_module_state->__pyx_tuple__21); Py_VISIT(traverse_module_state->__pyx_tuple__22); Py_VISIT(traverse_module_state->__pyx_tuple__23); Py_VISIT(traverse_module_state->__pyx_tuple__24); Py_VISIT(traverse_module_state->__pyx_tuple__25); Py_VISIT(traverse_module_state->__pyx_tuple__26); Py_VISIT(traverse_module_state->__pyx_tuple__28); Py_VISIT(traverse_module_state->__pyx_tuple__30); Py_VISIT(traverse_module_state->__pyx_tuple__31); Py_VISIT(traverse_module_state->__pyx_tuple__33); Py_VISIT(traverse_module_state->__pyx_tuple__36); Py_VISIT(traverse_module_state->__pyx_codeobj__27); Py_VISIT(traverse_module_state->__pyx_codeobj__29); Py_VISIT(traverse_module_state->__pyx_codeobj__32); Py_VISIT(traverse_module_state->__pyx_codeobj__34); Py_VISIT(traverse_module_state->__pyx_codeobj__35); Py_VISIT(traverse_module_state->__pyx_codeobj__37); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_5_sdl2_5audio_AudioDevice __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5audio_AudioDevice #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice #endif #define __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice #define __pyx_array_type __pyx_mstate_global->__pyx_array_type #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_ #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII #define __pyx_n_s_AUDIO_ALLOW_ANY_CHANGE __pyx_mstate_global->__pyx_n_s_AUDIO_ALLOW_ANY_CHANGE #define __pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE __pyx_mstate_global->__pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE #define __pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE __pyx_mstate_global->__pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE #define __pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE __pyx_mstate_global->__pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE #define __pyx_n_s_AUDIO_F32 __pyx_mstate_global->__pyx_n_s_AUDIO_F32 #define __pyx_n_s_AUDIO_F32LSB __pyx_mstate_global->__pyx_n_s_AUDIO_F32LSB #define __pyx_n_s_AUDIO_F32MSB __pyx_mstate_global->__pyx_n_s_AUDIO_F32MSB #define __pyx_n_s_AUDIO_S16 __pyx_mstate_global->__pyx_n_s_AUDIO_S16 #define __pyx_n_s_AUDIO_S16LSB __pyx_mstate_global->__pyx_n_s_AUDIO_S16LSB #define __pyx_n_s_AUDIO_S16MSB __pyx_mstate_global->__pyx_n_s_AUDIO_S16MSB #define __pyx_n_s_AUDIO_S32 __pyx_mstate_global->__pyx_n_s_AUDIO_S32 #define __pyx_n_s_AUDIO_S32LSB __pyx_mstate_global->__pyx_n_s_AUDIO_S32LSB #define __pyx_n_s_AUDIO_S32MSB __pyx_mstate_global->__pyx_n_s_AUDIO_S32MSB #define __pyx_n_s_AUDIO_S8 __pyx_mstate_global->__pyx_n_s_AUDIO_S8 #define __pyx_n_s_AUDIO_U16 __pyx_mstate_global->__pyx_n_s_AUDIO_U16 #define __pyx_n_s_AUDIO_U16LSB __pyx_mstate_global->__pyx_n_s_AUDIO_U16LSB #define __pyx_n_s_AUDIO_U16MSB __pyx_mstate_global->__pyx_n_s_AUDIO_U16MSB #define __pyx_n_s_AUDIO_U8 __pyx_mstate_global->__pyx_n_s_AUDIO_U8 #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError #define __pyx_kp_s_AudioDevice __pyx_mstate_global->__pyx_kp_s_AudioDevice #define __pyx_n_s_AudioDevice_2 __pyx_mstate_global->__pyx_n_s_AudioDevice_2 #define __pyx_n_s_AudioDevice___reduce_cython __pyx_mstate_global->__pyx_n_s_AudioDevice___reduce_cython #define __pyx_n_s_AudioDevice___setstate_cython __pyx_mstate_global->__pyx_n_s_AudioDevice___setstate_cython #define __pyx_n_s_AudioDevice_close __pyx_mstate_global->__pyx_n_s_AudioDevice_close #define __pyx_n_s_AudioDevice_pause __pyx_mstate_global->__pyx_n_s_AudioDevice_pause #define __pyx_kp_s_Audio_system_not_initialised __pyx_mstate_global->__pyx_kp_s_Audio_system_not_initialised #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d #define __pyx_kp_b_T __pyx_mstate_global->__pyx_kp_b_T #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView #define __pyx_kp_b__10 __pyx_mstate_global->__pyx_kp_b__10 #define __pyx_kp_b__11 __pyx_mstate_global->__pyx_kp_b__11 #define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12 #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13 #define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14 #define __pyx_kp_s__16 __pyx_mstate_global->__pyx_kp_s__16 #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3 #define __pyx_n_s__38 __pyx_mstate_global->__pyx_n_s__38 #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 #define __pyx_kp_b__9 __pyx_mstate_global->__pyx_kp_b__9 #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer #define __pyx_n_s_allowed_changes __pyx_mstate_global->__pyx_n_s_allowed_changes #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_audio_format_str __pyx_mstate_global->__pyx_n_s_audio_format_str #define __pyx_n_s_audioformat __pyx_mstate_global->__pyx_n_s_audioformat #define __pyx_kp_s_audioformat_s __pyx_mstate_global->__pyx_kp_s_audioformat_s #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c #define __pyx_n_s_callback __pyx_mstate_global->__pyx_n_s_callback #define __pyx_n_s_chunksize __pyx_mstate_global->__pyx_n_s_chunksize #define __pyx_kp_s_chunksize_s __pyx_mstate_global->__pyx_kp_s_chunksize_s #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count #define __pyx_n_s_devicename __pyx_mstate_global->__pyx_n_s_devicename #define __pyx_kp_s_devicename_must_be_a_string __pyx_mstate_global->__pyx_kp_s_devicename_must_be_a_string #define __pyx_kp_s_devicename_s __pyx_mstate_global->__pyx_kp_s_devicename_s #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran #define __pyx_n_s_frequency __pyx_mstate_global->__pyx_n_s_frequency #define __pyx_kp_s_frequency_s __pyx_mstate_global->__pyx_kp_s_frequency_s #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_get_audio_device_names __pyx_mstate_global->__pyx_n_s_get_audio_device_names #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_n_s_iscapture __pyx_mstate_global->__pyx_n_s_iscapture #define __pyx_kp_s_iscapture_s __pyx_mstate_global->__pyx_kp_s_iscapture_s #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array #define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 #define __pyx_n_s_names __pyx_mstate_global->__pyx_n_s_names #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_n_s_numchannels __pyx_mstate_global->__pyx_n_s_numchannels #define __pyx_kp_s_numchannels_s __pyx_mstate_global->__pyx_kp_s_numchannels_s #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack #define __pyx_n_s_pause __pyx_mstate_global->__pyx_n_s_pause #define __pyx_n_s_pause_on __pyx_mstate_global->__pyx_n_s_pause_on #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle #define __pyx_n_s_print_exc __pyx_mstate_global->__pyx_n_s_print_exc #define __pyx_n_s_pygame__sdl2_audio __pyx_mstate_global->__pyx_n_s_pygame__sdl2_audio #define __pyx_n_s_pygame__sdl2_sdl2 __pyx_mstate_global->__pyx_n_s_pygame__sdl2_sdl2 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_kp_s_src_c_cython_pygame__sdl2_audio __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sdl2_audio #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_traceback __pyx_mstate_global->__pyx_n_s_traceback #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_kp_s_utf_8 __pyx_mstate_global->__pyx_kp_s_utf_8 #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877 #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863 #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5 #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33 #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 /* #### Code section: module_code ### */ /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* Python wrapper */ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shape = 0; Py_ssize_t __pyx_v_itemsize; PyObject *__pyx_v_format = 0; PyObject *__pyx_v_mode = 0; int __pyx_v_allocate_buffer; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0}; values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_shape = ((PyObject*)values[0]); __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error) __pyx_v_format = values[2]; __pyx_v_mode = values[3]; if (values[4]) { __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error) } else { /* "View.MemoryView":132 * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< * * cdef int idx */ __pyx_v_allocate_buffer = ((int)1); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error) } __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { int __pyx_v_idx; Py_ssize_t __pyx_v_dim; char __pyx_v_order; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; char *__pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_UCS4 __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_format); /* "View.MemoryView":137 * cdef Py_ssize_t dim * * self.ndim = len(shape) # <<<<<<<<<<<<<< * self.itemsize = itemsize * */ if (unlikely(__pyx_v_shape == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 137, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error) __pyx_v_self->ndim = ((int)__pyx_t_1); /* "View.MemoryView":138 * * self.ndim = len(shape) * self.itemsize = itemsize # <<<<<<<<<<<<<< * * if not self.ndim: */ __pyx_v_self->itemsize = __pyx_v_itemsize; /* "View.MemoryView":140 * self.itemsize = itemsize * * if not self.ndim: # <<<<<<<<<<<<<< * raise ValueError, "Empty shape tuple for cython.array" * */ __pyx_t_2 = (!(__pyx_v_self->ndim != 0)); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":141 * * if not self.ndim: * raise ValueError, "Empty shape tuple for cython.array" # <<<<<<<<<<<<<< * * if itemsize <= 0: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0); __PYX_ERR(1, 141, __pyx_L1_error) /* "View.MemoryView":140 * self.itemsize = itemsize * * if not self.ndim: # <<<<<<<<<<<<<< * raise ValueError, "Empty shape tuple for cython.array" * */ } /* "View.MemoryView":143 * raise ValueError, "Empty shape tuple for cython.array" * * if itemsize <= 0: # <<<<<<<<<<<<<< * raise ValueError, "itemsize <= 0 for cython.array" * */ __pyx_t_2 = (__pyx_v_itemsize <= 0); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":144 * * if itemsize <= 0: * raise ValueError, "itemsize <= 0 for cython.array" # <<<<<<<<<<<<<< * * if not isinstance(format, bytes): */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0); __PYX_ERR(1, 144, __pyx_L1_error) /* "View.MemoryView":143 * raise ValueError, "Empty shape tuple for cython.array" * * if itemsize <= 0: # <<<<<<<<<<<<<< * raise ValueError, "itemsize <= 0 for cython.array" * */ } /* "View.MemoryView":146 * raise ValueError, "itemsize <= 0 for cython.array" * * if not isinstance(format, bytes): # <<<<<<<<<<<<<< * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string */ __pyx_t_2 = PyBytes_Check(__pyx_v_format); __pyx_t_3 = (!__pyx_t_2); if (__pyx_t_3) { /* "View.MemoryView":147 * * if not isinstance(format, bytes): * format = format.encode('ASCII') # <<<<<<<<<<<<<< * self._format = format # keep a reference to the byte string * self.format = self._format */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":146 * raise ValueError, "itemsize <= 0 for cython.array" * * if not isinstance(format, bytes): # <<<<<<<<<<<<<< * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string */ } /* "View.MemoryView":148 * if not isinstance(format, bytes): * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< * self.format = self._format * */ if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error) __pyx_t_4 = __pyx_v_format; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_format); __Pyx_DECREF(__pyx_v_self->_format); __pyx_v_self->_format = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":149 * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string * self.format = self._format # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_self->_format == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(1, 149, __pyx_L1_error) } __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error) __pyx_v_self->format = __pyx_t_8; /* "View.MemoryView":152 * * * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< * self._strides = self._shape + self.ndim * */ __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); /* "View.MemoryView":153 * * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< * * if not self._shape: */ __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); /* "View.MemoryView":155 * self._strides = self._shape + self.ndim * * if not self._shape: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate shape and strides." * */ __pyx_t_3 = (!(__pyx_v_self->_shape != 0)); if (unlikely(__pyx_t_3)) { /* "View.MemoryView":156 * * if not self._shape: * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0); __PYX_ERR(1, 156, __pyx_L1_error) /* "View.MemoryView":155 * self._strides = self._shape + self.ndim * * if not self._shape: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate shape and strides." * */ } /* "View.MemoryView":159 * * * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ __pyx_t_9 = 0; __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_dim = __pyx_t_10; __pyx_v_idx = __pyx_t_9; __pyx_t_9 = (__pyx_t_9 + 1); /* "View.MemoryView":160 * * for idx, dim in enumerate(shape): * if dim <= 0: # <<<<<<<<<<<<<< * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim */ __pyx_t_3 = (__pyx_v_dim <= 0); if (unlikely(__pyx_t_3)) { /* "View.MemoryView":161 * for idx, dim in enumerate(shape): * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<< * self._shape[idx] = dim * */ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = 0; __pyx_t_11 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis); __pyx_t_10 += 22; __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u_); __pyx_t_10 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_); __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u__2); __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2); __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 161, __pyx_L1_error) /* "View.MemoryView":160 * * for idx, dim in enumerate(shape): * if dim <= 0: # <<<<<<<<<<<<<< * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim */ } /* "View.MemoryView":162 * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim # <<<<<<<<<<<<<< * * cdef char order */ (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; /* "View.MemoryView":159 * * * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":165 * * cdef char order * if mode == 'c': # <<<<<<<<<<<<<< * order = b'C' * self.mode = u'c' */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error) if (__pyx_t_3) { /* "View.MemoryView":166 * cdef char order * if mode == 'c': * order = b'C' # <<<<<<<<<<<<<< * self.mode = u'c' * elif mode == 'fortran': */ __pyx_v_order = 'C'; /* "View.MemoryView":167 * if mode == 'c': * order = b'C' * self.mode = u'c' # <<<<<<<<<<<<<< * elif mode == 'fortran': * order = b'F' */ __Pyx_INCREF(__pyx_n_u_c); __Pyx_GIVEREF(__pyx_n_u_c); __Pyx_GOTREF(__pyx_v_self->mode); __Pyx_DECREF(__pyx_v_self->mode); __pyx_v_self->mode = __pyx_n_u_c; /* "View.MemoryView":165 * * cdef char order * if mode == 'c': # <<<<<<<<<<<<<< * order = b'C' * self.mode = u'c' */ goto __pyx_L11; } /* "View.MemoryView":168 * order = b'C' * self.mode = u'c' * elif mode == 'fortran': # <<<<<<<<<<<<<< * order = b'F' * self.mode = u'fortran' */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error) if (likely(__pyx_t_3)) { /* "View.MemoryView":169 * self.mode = u'c' * elif mode == 'fortran': * order = b'F' # <<<<<<<<<<<<<< * self.mode = u'fortran' * else: */ __pyx_v_order = 'F'; /* "View.MemoryView":170 * elif mode == 'fortran': * order = b'F' * self.mode = u'fortran' # <<<<<<<<<<<<<< * else: * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" */ __Pyx_INCREF(__pyx_n_u_fortran); __Pyx_GIVEREF(__pyx_n_u_fortran); __Pyx_GOTREF(__pyx_v_self->mode); __Pyx_DECREF(__pyx_v_self->mode); __pyx_v_self->mode = __pyx_n_u_fortran; /* "View.MemoryView":168 * order = b'C' * self.mode = u'c' * elif mode == 'fortran': # <<<<<<<<<<<<<< * order = b'F' * self.mode = u'fortran' */ goto __pyx_L11; } /* "View.MemoryView":172 * self.mode = u'fortran' * else: * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<< * * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 172, __pyx_L1_error) } __pyx_L11:; /* "View.MemoryView":174 * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" * * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<< * * self.free_data = allocate_buffer */ __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); /* "View.MemoryView":176 * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) * * self.free_data = allocate_buffer # <<<<<<<<<<<<<< * self.dtype_is_object = format == b'O' * */ __pyx_v_self->free_data = __pyx_v_allocate_buffer; /* "View.MemoryView":177 * * self.free_data = allocate_buffer * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< * * if allocate_buffer: */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_self->dtype_is_object = __pyx_t_3; /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' * * if allocate_buffer: # <<<<<<<<<<<<<< * _allocate_buffer(self) * */ if (__pyx_v_allocate_buffer) { /* "View.MemoryView":180 * * if allocate_buffer: * _allocate_buffer(self) # <<<<<<<<<<<<<< * * @cname('getbuffer') */ __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' * * if allocate_buffer: # <<<<<<<<<<<<<< * _allocate_buffer(self) * */ } /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_format); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":182 * _allocate_buffer(self) * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_bufmode; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; char *__pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; if (unlikely(__pyx_v_info == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "View.MemoryView":184 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 # <<<<<<<<<<<<<< * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": */ __pyx_v_bufmode = -1; /* "View.MemoryView":185 * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0); if (__pyx_t_1) { /* "View.MemoryView":186 * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": # <<<<<<<<<<<<<< * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":187 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); /* "View.MemoryView":186 * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": # <<<<<<<<<<<<<< * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": */ goto __pyx_L4; } /* "View.MemoryView":188 * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": # <<<<<<<<<<<<<< * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":189 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." */ __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); /* "View.MemoryView":188 * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": # <<<<<<<<<<<<<< * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): */ } __pyx_L4:; /* "View.MemoryView":190 * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): # <<<<<<<<<<<<<< * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data */ __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0)); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":191 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." # <<<<<<<<<<<<<< * info.buf = self.data * info.len = self.len */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0); __PYX_ERR(1, 191, __pyx_L1_error) /* "View.MemoryView":190 * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): # <<<<<<<<<<<<<< * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data */ } /* "View.MemoryView":185 * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ } /* "View.MemoryView":192 * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data # <<<<<<<<<<<<<< * info.len = self.len * */ __pyx_t_2 = __pyx_v_self->data; __pyx_v_info->buf = __pyx_t_2; /* "View.MemoryView":193 * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data * info.len = self.len # <<<<<<<<<<<<<< * * if flags & PyBUF_STRIDES: */ __pyx_t_3 = __pyx_v_self->len; __pyx_v_info->len = __pyx_t_3; /* "View.MemoryView":195 * info.len = self.len * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.ndim = self.ndim * info.shape = self._shape */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); if (__pyx_t_1) { /* "View.MemoryView":196 * * if flags & PyBUF_STRIDES: * info.ndim = self.ndim # <<<<<<<<<<<<<< * info.shape = self._shape * info.strides = self._strides */ __pyx_t_4 = __pyx_v_self->ndim; __pyx_v_info->ndim = __pyx_t_4; /* "View.MemoryView":197 * if flags & PyBUF_STRIDES: * info.ndim = self.ndim * info.shape = self._shape # <<<<<<<<<<<<<< * info.strides = self._strides * else: */ __pyx_t_5 = __pyx_v_self->_shape; __pyx_v_info->shape = __pyx_t_5; /* "View.MemoryView":198 * info.ndim = self.ndim * info.shape = self._shape * info.strides = self._strides # <<<<<<<<<<<<<< * else: * info.ndim = 1 */ __pyx_t_5 = __pyx_v_self->_strides; __pyx_v_info->strides = __pyx_t_5; /* "View.MemoryView":195 * info.len = self.len * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.ndim = self.ndim * info.shape = self._shape */ goto __pyx_L6; } /* "View.MemoryView":200 * info.strides = self._strides * else: * info.ndim = 1 # <<<<<<<<<<<<<< * info.shape = &self.len if flags & PyBUF_ND else NULL * info.strides = NULL */ /*else*/ { __pyx_v_info->ndim = 1; /* "View.MemoryView":201 * else: * info.ndim = 1 * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<< * info.strides = NULL * */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); if (__pyx_t_1) { __pyx_t_5 = (&__pyx_v_self->len); } else { __pyx_t_5 = NULL; } __pyx_v_info->shape = __pyx_t_5; /* "View.MemoryView":202 * info.ndim = 1 * info.shape = &self.len if flags & PyBUF_ND else NULL * info.strides = NULL # <<<<<<<<<<<<<< * * info.suboffsets = NULL */ __pyx_v_info->strides = NULL; } __pyx_L6:; /* "View.MemoryView":204 * info.strides = NULL * * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = self.itemsize * info.readonly = 0 */ __pyx_v_info->suboffsets = NULL; /* "View.MemoryView":205 * * info.suboffsets = NULL * info.itemsize = self.itemsize # <<<<<<<<<<<<<< * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL */ __pyx_t_3 = __pyx_v_self->itemsize; __pyx_v_info->itemsize = __pyx_t_3; /* "View.MemoryView":206 * info.suboffsets = NULL * info.itemsize = self.itemsize * info.readonly = 0 # <<<<<<<<<<<<<< * info.format = self.format if flags & PyBUF_FORMAT else NULL * info.obj = self */ __pyx_v_info->readonly = 0; /* "View.MemoryView":207 * info.itemsize = self.itemsize * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<< * info.obj = self * */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_v_self->format; } else { __pyx_t_2 = NULL; } __pyx_v_info->format = __pyx_t_2; /* "View.MemoryView":208 * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL * info.obj = self # <<<<<<<<<<<<<< * * def __dealloc__(array self): */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "View.MemoryView":182 * _allocate_buffer(self) * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":210 * info.obj = self * * def __dealloc__(array self): # <<<<<<<<<<<<<< * if self.callback_free_data != NULL: * self.callback_free_data(self.data) */ /* Python wrapper */ static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { int __pyx_t_1; int __pyx_t_2; /* "View.MemoryView":211 * * def __dealloc__(array self): * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: */ __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL); if (__pyx_t_1) { /* "View.MemoryView":212 * def __dealloc__(array self): * if self.callback_free_data != NULL: * self.callback_free_data(self.data) # <<<<<<<<<<<<<< * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: */ __pyx_v_self->callback_free_data(__pyx_v_self->data); /* "View.MemoryView":211 * * def __dealloc__(array self): * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: */ goto __pyx_L3; } /* "View.MemoryView":213 * if self.callback_free_data != NULL: * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) */ if (__pyx_v_self->free_data) { } else { __pyx_t_1 = __pyx_v_self->free_data; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->data != NULL); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "View.MemoryView":214 * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":215 * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<< * free(self.data) * PyObject_Free(self._shape) */ __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); /* "View.MemoryView":214 * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) */ } /* "View.MemoryView":216 * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) # <<<<<<<<<<<<<< * PyObject_Free(self._shape) * */ free(__pyx_v_self->data); /* "View.MemoryView":213 * if self.callback_free_data != NULL: * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) */ } __pyx_L3:; /* "View.MemoryView":217 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) * PyObject_Free(self._shape) # <<<<<<<<<<<<<< * * @property */ PyObject_Free(__pyx_v_self->_shape); /* "View.MemoryView":210 * info.obj = self * * def __dealloc__(array self): # <<<<<<<<<<<<<< * if self.callback_free_data != NULL: * self.callback_free_data(self.data) */ /* function exit code */ } /* "View.MemoryView":219 * PyObject_Free(self._shape) * * @property # <<<<<<<<<<<<<< * def memview(self): * return self.get_memview() */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":221 * @property * def memview(self): * return self.get_memview() # <<<<<<<<<<<<<< * * @cname('get_memview') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":219 * PyObject_Free(self._shape) * * @property # <<<<<<<<<<<<<< * def memview(self): * return self.get_memview() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":224 * * @cname('get_memview') * cdef get_memview(self): # <<<<<<<<<<<<<< * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) */ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_memview", 1); /* "View.MemoryView":225 * @cname('get_memview') * cdef get_memview(self): * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< * return memoryview(self, flags, self.dtype_is_object) * */ __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); /* "View.MemoryView":226 * cdef get_memview(self): * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":224 * * @cname('get_memview') * cdef get_memview(self): # <<<<<<<<<<<<<< * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":228 * return memoryview(self, flags, self.dtype_is_object) * * def __len__(self): # <<<<<<<<<<<<<< * return self._shape[0] * */ /* Python wrapper */ static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { Py_ssize_t __pyx_r; /* "View.MemoryView":229 * * def __len__(self): * return self._shape[0] # <<<<<<<<<<<<<< * * def __getattr__(self, attr): */ __pyx_r = (__pyx_v_self->_shape[0]); goto __pyx_L0; /* "View.MemoryView":228 * return memoryview(self, flags, self.dtype_is_object) * * def __len__(self): # <<<<<<<<<<<<<< * return self._shape[0] * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":231 * return self._shape[0] * * def __getattr__(self, attr): # <<<<<<<<<<<<<< * return getattr(self.memview, attr) * */ /* Python wrapper */ static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 1); /* "View.MemoryView":232 * * def __getattr__(self, attr): * return getattr(self.memview, attr) # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":231 * return self._shape[0] * * def __getattr__(self, attr): # <<<<<<<<<<<<<< * return getattr(self.memview, attr) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":234 * return getattr(self.memview, attr) * * def __getitem__(self, item): # <<<<<<<<<<<<<< * return self.memview[item] * */ /* Python wrapper */ static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 1); /* "View.MemoryView":235 * * def __getitem__(self, item): * return self.memview[item] # <<<<<<<<<<<<<< * * def __setitem__(self, item, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":234 * return getattr(self.memview, attr) * * def __getitem__(self, item): # <<<<<<<<<<<<<< * return self.memview[item] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":237 * return self.memview[item] * * def __setitem__(self, item, value): # <<<<<<<<<<<<<< * self.memview[item] = value * */ /* Python wrapper */ static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 1); /* "View.MemoryView":238 * * def __setitem__(self, item, value): * self.memview[item] = value # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":237 * return self.memview[item] * * def __setitem__(self, item, value): # <<<<<<<<<<<<<< * self.memview[item] = value * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":248 * * @cname("__pyx_array_allocate_buffer") * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<< * * */ static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) { Py_ssize_t __pyx_v_i; PyObject **__pyx_v_p; int __pyx_r; int __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "View.MemoryView":254 * cdef PyObject **p * * self.free_data = True # <<<<<<<<<<<<<< * self.data = malloc(self.len) * if not self.data: */ __pyx_v_self->free_data = 1; /* "View.MemoryView":255 * * self.free_data = True * self.data = malloc(self.len) # <<<<<<<<<<<<<< * if not self.data: * raise MemoryError, "unable to allocate array data." */ __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); /* "View.MemoryView":256 * self.free_data = True * self.data = malloc(self.len) * if not self.data: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate array data." * */ __pyx_t_1 = (!(__pyx_v_self->data != 0)); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":257 * self.data = malloc(self.len) * if not self.data: * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<< * * if self.dtype_is_object: */ __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0); __PYX_ERR(1, 257, __pyx_L1_error) /* "View.MemoryView":256 * self.free_data = True * self.data = malloc(self.len) * if not self.data: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate array data." * */ } /* "View.MemoryView":259 * raise MemoryError, "unable to allocate array data." * * if self.dtype_is_object: # <<<<<<<<<<<<<< * p = self.data * for i in range(self.len // self.itemsize): */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":260 * * if self.dtype_is_object: * p = self.data # <<<<<<<<<<<<<< * for i in range(self.len // self.itemsize): * p[i] = Py_None */ __pyx_v_p = ((PyObject **)__pyx_v_self->data); /* "View.MemoryView":261 * if self.dtype_is_object: * p = self.data * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<< * p[i] = Py_None * Py_INCREF(Py_None) */ if (unlikely(__pyx_v_self->itemsize == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(1, 261, __pyx_L1_error) } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); __PYX_ERR(1, 261, __pyx_L1_error) } __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize); __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":262 * p = self.data * for i in range(self.len // self.itemsize): * p[i] = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * return 0 */ (__pyx_v_p[__pyx_v_i]) = Py_None; /* "View.MemoryView":263 * for i in range(self.len // self.itemsize): * p[i] = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(Py_None); } /* "View.MemoryView":259 * raise MemoryError, "unable to allocate array data." * * if self.dtype_is_object: # <<<<<<<<<<<<<< * p = self.data * for i in range(self.len // self.itemsize): */ } /* "View.MemoryView":264 * p[i] = Py_None * Py_INCREF(Py_None) * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":248 * * @cname("__pyx_array_allocate_buffer") * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<< * * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "View.MemoryView":268 * * @cname("__pyx_array_new") * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<< * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. */ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) { struct __pyx_array_obj *__pyx_v_result = 0; PyObject *__pyx_v_mode = 0; struct __pyx_array_obj *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_cwrapper", 1); /* "View.MemoryView":270 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<< * * if buf is NULL: */ __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f'); if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_s_fortran); __pyx_t_1 = __pyx_n_s_fortran; } else { __Pyx_INCREF(__pyx_n_s_c); __pyx_t_1 = __pyx_n_s_c; } __pyx_v_mode = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":272 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. * * if buf is NULL: # <<<<<<<<<<<<<< * result = array.__new__(array, shape, itemsize, format, mode) * else: */ __pyx_t_2 = (__pyx_v_buf == NULL); if (__pyx_t_2) { /* "View.MemoryView":273 * * if buf is NULL: * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<< * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mode); __Pyx_GIVEREF(__pyx_v_mode); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":272 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. * * if buf is NULL: # <<<<<<<<<<<<<< * result = array.__new__(array, shape, itemsize, format, mode) * else: */ goto __pyx_L3; } /* "View.MemoryView":275 * result = array.__new__(array, shape, itemsize, format, mode) * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<< * result.data = buf * */ /*else*/ { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mode); __Pyx_GIVEREF(__pyx_v_mode); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error) __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":276 * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) * result.data = buf # <<<<<<<<<<<<<< * * return result */ __pyx_v_result->data = __pyx_v_buf; } __pyx_L3:; /* "View.MemoryView":278 * result.data = buf * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "View.MemoryView":268 * * @cname("__pyx_array_new") * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<< * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_mode); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":304 * cdef class Enum(object): * cdef object name * def __init__(self, name): # <<<<<<<<<<<<<< * self.name = name * def __repr__(self): */ /* Python wrapper */ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } __pyx_v_name = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); /* "View.MemoryView":305 * cdef object name * def __init__(self, name): * self.name = name # <<<<<<<<<<<<<< * def __repr__(self): * return self.name */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; /* "View.MemoryView":304 * cdef class Enum(object): * cdef object name * def __init__(self, name): # <<<<<<<<<<<<<< * self.name = name * def __repr__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":306 * def __init__(self, name): * self.name = name * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* Python wrapper */ static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 1); /* "View.MemoryView":307 * self.name = name * def __repr__(self): * return self.name # <<<<<<<<<<<<<< * * cdef generic = Enum("") */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* "View.MemoryView":306 * def __init__(self, name): * self.name = name * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.name,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.name,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.name,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); if (__pyx_t_2) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.name,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->name != Py_None); __pyx_v_use_setstate = __pyx_t_2; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: */ if (__pyx_v_use_setstate) { /* "(tree fragment)":13 * use_setstate = self.name is not None * if use_setstate: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_int_136983863); __Pyx_GIVEREF(__pyx_int_136983863); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_int_136983863); __Pyx_GIVEREF(__pyx_int_136983863); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":17 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":349 * cdef __Pyx_TypeInfo *typeinfo * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< * self.obj = obj * self.flags = flags */ /* Python wrapper */ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_flags; int __pyx_v_dtype_is_object; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error) if (values[2]) { __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error) } else { __pyx_v_dtype_is_object = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_intptr_t __pyx_t_4; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "View.MemoryView":350 * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): * self.obj = obj # <<<<<<<<<<<<<< * self.flags = flags * if type(self) is memoryview or obj is not None: */ __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __Pyx_GOTREF(__pyx_v_self->obj); __Pyx_DECREF(__pyx_v_self->obj); __pyx_v_self->obj = __pyx_v_obj; /* "View.MemoryView":351 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): * self.obj = obj * self.flags = flags # <<<<<<<<<<<<<< * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) */ __pyx_v_self->flags = __pyx_v_flags; /* "View.MemoryView":352 * self.obj = obj * self.flags = flags * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: */ __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type)); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_obj != Py_None); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "View.MemoryView":353 * self.flags = flags * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None */ __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error) /* "View.MemoryView":354 * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: # <<<<<<<<<<<<<< * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) */ __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL); if (__pyx_t_1) { /* "View.MemoryView":355 * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; /* "View.MemoryView":356 * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * * if not __PYX_CYTHON_ATOMICS_ENABLED(): */ Py_INCREF(Py_None); /* "View.MemoryView":354 * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: # <<<<<<<<<<<<<< * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) */ } /* "View.MemoryView":352 * self.obj = obj * self.flags = flags * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: */ } /* "View.MemoryView":358 * Py_INCREF(Py_None) * * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: */ __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED()); if (__pyx_t_1) { /* "View.MemoryView":360 * if not __PYX_CYTHON_ATOMICS_ENABLED(): * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<< * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 */ __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8); if (__pyx_t_1) { /* "View.MemoryView":361 * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: */ __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); /* "View.MemoryView":362 * if __pyx_memoryview_thread_locks_used < 8: * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< * if self.lock is NULL: * self.lock = PyThread_allocate_lock() */ __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); /* "View.MemoryView":360 * if not __PYX_CYTHON_ATOMICS_ENABLED(): * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<< * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 */ } /* "View.MemoryView":363 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: # <<<<<<<<<<<<<< * self.lock = PyThread_allocate_lock() * if self.lock is NULL: */ __pyx_t_1 = (__pyx_v_self->lock == NULL); if (__pyx_t_1) { /* "View.MemoryView":364 * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< * if self.lock is NULL: * raise MemoryError */ __pyx_v_self->lock = PyThread_allocate_lock(); /* "View.MemoryView":365 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() * if self.lock is NULL: # <<<<<<<<<<<<<< * raise MemoryError * */ __pyx_t_1 = (__pyx_v_self->lock == NULL); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":366 * self.lock = PyThread_allocate_lock() * if self.lock is NULL: * raise MemoryError # <<<<<<<<<<<<<< * * if flags & PyBUF_FORMAT: */ PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error) /* "View.MemoryView":365 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() * if self.lock is NULL: # <<<<<<<<<<<<<< * raise MemoryError * */ } /* "View.MemoryView":363 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: # <<<<<<<<<<<<<< * self.lock = PyThread_allocate_lock() * if self.lock is NULL: */ } /* "View.MemoryView":358 * Py_INCREF(Py_None) * * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: */ } /* "View.MemoryView":368 * raise MemoryError * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { /* "View.MemoryView":369 * * if flags & PyBUF_FORMAT: * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< * else: * self.dtype_is_object = dtype_is_object */ __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O'); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L12_bool_binop_done; } __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00'); __pyx_t_1 = __pyx_t_2; __pyx_L12_bool_binop_done:; __pyx_v_self->dtype_is_object = __pyx_t_1; /* "View.MemoryView":368 * raise MemoryError * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: */ goto __pyx_L11; } /* "View.MemoryView":371 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 */ /*else*/ { __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; } __pyx_L11:; /* "View.MemoryView":373 * self.dtype_is_object = dtype_is_object * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<< * self.typeinfo = NULL * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count))); __pyx_t_5 = (sizeof(__pyx_atomic_int_type)); if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(1, 373, __pyx_L1_error) } __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(1, 373, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error) #endif /* "View.MemoryView":374 * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 * self.typeinfo = NULL # <<<<<<<<<<<<<< * * def __dealloc__(memoryview self): */ __pyx_v_self->typeinfo = NULL; /* "View.MemoryView":349 * cdef __Pyx_TypeInfo *typeinfo * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< * self.obj = obj * self.flags = flags */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":376 * self.typeinfo = NULL * * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) */ /* Python wrapper */ static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { int __pyx_v_i; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyThread_type_lock __pyx_t_5; PyThread_type_lock __pyx_t_6; /* "View.MemoryView":377 * * def __dealloc__(memoryview self): * if self.obj is not None: # <<<<<<<<<<<<<< * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: */ __pyx_t_1 = (__pyx_v_self->obj != Py_None); if (__pyx_t_1) { /* "View.MemoryView":378 * def __dealloc__(memoryview self): * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< * elif (<__pyx_buffer *> &self.view).obj == Py_None: * */ __Pyx_ReleaseBuffer((&__pyx_v_self->view)); /* "View.MemoryView":377 * * def __dealloc__(memoryview self): * if self.obj is not None: # <<<<<<<<<<<<<< * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: */ goto __pyx_L3; } /* "View.MemoryView":379 * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< * * (<__pyx_buffer *> &self.view).obj = NULL */ __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None); if (__pyx_t_1) { /* "View.MemoryView":381 * elif (<__pyx_buffer *> &self.view).obj == Py_None: * * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<< * Py_DECREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL; /* "View.MemoryView":382 * * (<__pyx_buffer *> &self.view).obj = NULL * Py_DECREF(Py_None) # <<<<<<<<<<<<<< * * cdef int i */ Py_DECREF(Py_None); /* "View.MemoryView":379 * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< * * (<__pyx_buffer *> &self.view).obj = NULL */ } __pyx_L3:; /* "View.MemoryView":386 * cdef int i * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: # <<<<<<<<<<<<<< * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: */ __pyx_t_1 = (__pyx_v_self->lock != NULL); if (__pyx_t_1) { /* "View.MemoryView":387 * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 */ __pyx_t_2 = __pyx_memoryview_thread_locks_used; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":388 * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: */ __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock); if (__pyx_t_1) { /* "View.MemoryView":389 * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( */ __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); /* "View.MemoryView":390 * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) */ __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used); if (__pyx_t_1) { /* "View.MemoryView":392 * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< * break * else: */ __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]); /* "View.MemoryView":391 * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) * break */ (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5; (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6; /* "View.MemoryView":390 * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) */ } /* "View.MemoryView":393 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) * break # <<<<<<<<<<<<<< * else: * PyThread_free_lock(self.lock) */ goto __pyx_L6_break; /* "View.MemoryView":388 * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: */ } } /*else*/ { /* "View.MemoryView":395 * break * else: * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< * * cdef char *get_item_pointer(memoryview self, object index) except NULL: */ PyThread_free_lock(__pyx_v_self->lock); } __pyx_L6_break:; /* "View.MemoryView":386 * cdef int i * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: # <<<<<<<<<<<<<< * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: */ } /* "View.MemoryView":376 * self.typeinfo = NULL * * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) */ /* function exit code */ } /* "View.MemoryView":397 * PyThread_free_lock(self.lock) * * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf */ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { Py_ssize_t __pyx_v_dim; char *__pyx_v_itemp; PyObject *__pyx_v_idx = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item_pointer", 1); /* "View.MemoryView":399 * cdef char *get_item_pointer(memoryview self, object index) except NULL: * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< * * for dim, idx in enumerate(index): */ __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); /* "View.MemoryView":401 * cdef char *itemp = self.view.buf * * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< * itemp = pybuffer_index(&self.view, itemp, idx, dim) * */ __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 401, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); __pyx_t_5 = 0; __pyx_v_dim = __pyx_t_1; __pyx_t_1 = (__pyx_t_1 + 1); /* "View.MemoryView":402 * * for dim, idx in enumerate(index): * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< * * return itemp */ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error) __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error) __pyx_v_itemp = __pyx_t_7; /* "View.MemoryView":401 * cdef char *itemp = self.view.buf * * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< * itemp = pybuffer_index(&self.view, itemp, idx, dim) * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":404 * itemp = pybuffer_index(&self.view, itemp, idx, dim) * * return itemp # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_itemp; goto __pyx_L0; /* "View.MemoryView":397 * PyThread_free_lock(self.lock) * * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":407 * * * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< * if index is Ellipsis: * return self */ /* Python wrapper */ static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { PyObject *__pyx_v_have_slices = NULL; PyObject *__pyx_v_indices = NULL; char *__pyx_v_itemp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 1); /* "View.MemoryView":408 * * def __getitem__(memoryview self, object index): * if index is Ellipsis: # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); if (__pyx_t_1) { /* "View.MemoryView":409 * def __getitem__(memoryview self, object index): * if index is Ellipsis: * return self # <<<<<<<<<<<<<< * * have_slices, indices = _unellipsify(index, self.view.ndim) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "View.MemoryView":408 * * def __getitem__(memoryview self, object index): * if index is Ellipsis: # <<<<<<<<<<<<<< * return self * */ } /* "View.MemoryView":411 * return self * * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< * * cdef char *itemp */ __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(__pyx_t_2 != Py_None)) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 411, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error) } __pyx_v_have_slices = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_indices = __pyx_t_4; __pyx_t_4 = 0; /* "View.MemoryView":414 * * cdef char *itemp * if have_slices: # <<<<<<<<<<<<<< * return memview_slice(self, indices) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":415 * cdef char *itemp * if have_slices: * return memview_slice(self, indices) # <<<<<<<<<<<<<< * else: * itemp = self.get_item_pointer(indices) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":414 * * cdef char *itemp * if have_slices: # <<<<<<<<<<<<<< * return memview_slice(self, indices) * else: */ } /* "View.MemoryView":417 * return memview_slice(self, indices) * else: * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< * return self.convert_item_to_object(itemp) * */ /*else*/ { __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error) __pyx_v_itemp = __pyx_t_5; /* "View.MemoryView":418 * else: * itemp = self.get_item_pointer(indices) * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< * * def __setitem__(memoryview self, object index, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":407 * * * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< * if index is Ellipsis: * return self */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_have_slices); __Pyx_XDECREF(__pyx_v_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":420 * return self.convert_item_to_object(itemp) * * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" */ /* Python wrapper */ static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { PyObject *__pyx_v_have_slices = NULL; PyObject *__pyx_v_obj = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); __Pyx_INCREF(__pyx_v_index); /* "View.MemoryView":421 * * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError, "Cannot assign to read-only memoryview" * */ if (unlikely(__pyx_v_self->view.readonly)) { /* "View.MemoryView":422 * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<< * * have_slices, index = _unellipsify(index, self.view.ndim) */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0); __PYX_ERR(1, 422, __pyx_L1_error) /* "View.MemoryView":421 * * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError, "Cannot assign to read-only memoryview" * */ } /* "View.MemoryView":424 * raise TypeError, "Cannot assign to read-only memoryview" * * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< * * if have_slices: */ __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 424, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error) } __pyx_v_have_slices = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":426 * have_slices, index = _unellipsify(index, self.view.ndim) * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) * if obj is not None: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error) if (__pyx_t_4) { /* "View.MemoryView":427 * * if have_slices: * obj = self.is_slice(value) # <<<<<<<<<<<<<< * if obj is not None: * self.setitem_slice_assignment(self[index], obj) */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ __pyx_t_4 = (__pyx_v_obj != Py_None); if (__pyx_t_4) { /* "View.MemoryView":429 * obj = self.is_slice(value) * if obj is not None: * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< * else: * self.setitem_slice_assign_scalar(self[index], value) */ __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ goto __pyx_L5; } /* "View.MemoryView":431 * self.setitem_slice_assignment(self[index], obj) * else: * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< * else: * self.setitem_indexed(index, value) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; /* "View.MemoryView":426 * have_slices, index = _unellipsify(index, self.view.ndim) * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) * if obj is not None: */ goto __pyx_L4; } /* "View.MemoryView":433 * self.setitem_slice_assign_scalar(self[index], value) * else: * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< * * cdef is_slice(self, obj): */ /*else*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; /* "View.MemoryView":420 * return self.convert_item_to_object(itemp) * * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_have_slices); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_index); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":435 * self.setitem_indexed(index, value) * * cdef is_slice(self, obj): # <<<<<<<<<<<<<< * if not isinstance(obj, memoryview): * try: */ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_slice", 0); __Pyx_INCREF(__pyx_v_obj); /* "View.MemoryView":436 * * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "View.MemoryView":438 * if not isinstance(obj, memoryview): * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< * self.dtype_is_object) * except TypeError: */ __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); /* "View.MemoryView":439 * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) # <<<<<<<<<<<<<< * except TypeError: * return None */ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); /* "View.MemoryView":438 * if not isinstance(obj, memoryview): * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< * self.dtype_is_object) * except TypeError: */ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error); __Pyx_GIVEREF(__pyx_t_6); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "View.MemoryView":440 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) * except TypeError: # <<<<<<<<<<<<<< * return None * */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_9) { __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); /* "View.MemoryView":441 * self.dtype_is_object) * except TypeError: * return None # <<<<<<<<<<<<<< * * return obj */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L9_try_end:; } /* "View.MemoryView":436 * * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, */ } /* "View.MemoryView":443 * return None * * return obj # <<<<<<<<<<<<<< * * cdef setitem_slice_assignment(self, dst, src): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; /* "View.MemoryView":435 * self.setitem_indexed(index, value) * * cdef is_slice(self, obj): # <<<<<<<<<<<<<< * if not isinstance(obj, memoryview): * try: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":445 * return obj * * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice */ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { __Pyx_memviewslice __pyx_v_dst_slice; __Pyx_memviewslice __pyx_v_src_slice; __Pyx_memviewslice __pyx_v_msrc; __Pyx_memviewslice __pyx_v_mdst; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assignment", 1); /* "View.MemoryView":448 * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] * */ if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error) __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error) __pyx_v_msrc = (__pyx_t_1[0]); /* "View.MemoryView":449 * cdef __Pyx_memviewslice src_slice * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<< * * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) */ if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error) __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error) __pyx_v_mdst = (__pyx_t_1[0]); /* "View.MemoryView":451 * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] * * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error) /* "View.MemoryView":445 * return obj * * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":453 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< * cdef int array[128] * cdef void *tmp = NULL */ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { int __pyx_v_array[0x80]; void *__pyx_v_tmp; void *__pyx_v_item; __Pyx_memviewslice *__pyx_v_dst_slice; __Pyx_memviewslice __pyx_v_tmp_slice; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; char const *__pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1); /* "View.MemoryView":455 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): * cdef int array[128] * cdef void *tmp = NULL # <<<<<<<<<<<<<< * cdef void *item * */ __pyx_v_tmp = NULL; /* "View.MemoryView":460 * cdef __Pyx_memviewslice *dst_slice * cdef __Pyx_memviewslice tmp_slice * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< * * if self.view.itemsize > sizeof(array): */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error) __pyx_v_dst_slice = __pyx_t_1; /* "View.MemoryView":462 * dst_slice = get_slice_from_memview(dst, &tmp_slice) * * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: */ __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))); if (__pyx_t_2) { /* "View.MemoryView":463 * * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< * if tmp == NULL: * raise MemoryError */ __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); /* "View.MemoryView":464 * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: # <<<<<<<<<<<<<< * raise MemoryError * item = tmp */ __pyx_t_2 = (__pyx_v_tmp == NULL); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":465 * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: * raise MemoryError # <<<<<<<<<<<<<< * item = tmp * else: */ PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error) /* "View.MemoryView":464 * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: # <<<<<<<<<<<<<< * raise MemoryError * item = tmp */ } /* "View.MemoryView":466 * if tmp == NULL: * raise MemoryError * item = tmp # <<<<<<<<<<<<<< * else: * item = array */ __pyx_v_item = __pyx_v_tmp; /* "View.MemoryView":462 * dst_slice = get_slice_from_memview(dst, &tmp_slice) * * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: */ goto __pyx_L3; } /* "View.MemoryView":468 * item = tmp * else: * item = array # <<<<<<<<<<<<<< * * try: */ /*else*/ { __pyx_v_item = ((void *)__pyx_v_array); } __pyx_L3:; /* "View.MemoryView":470 * item = array * * try: # <<<<<<<<<<<<<< * if self.dtype_is_object: * ( item)[0] = value */ /*try:*/ { /* "View.MemoryView":471 * * try: * if self.dtype_is_object: # <<<<<<<<<<<<<< * ( item)[0] = value * else: */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":472 * try: * if self.dtype_is_object: * ( item)[0] = value # <<<<<<<<<<<<<< * else: * self.assign_item_from_object( item, value) */ (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); /* "View.MemoryView":471 * * try: * if self.dtype_is_object: # <<<<<<<<<<<<<< * ( item)[0] = value * else: */ goto __pyx_L8; } /* "View.MemoryView":474 * ( item)[0] = value * else: * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L8:; /* "View.MemoryView":478 * * * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, */ __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL); if (__pyx_t_2) { /* "View.MemoryView":479 * * if self.view.suboffsets != NULL: * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, * item, self.dtype_is_object) */ __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error) /* "View.MemoryView":478 * * * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, */ } /* "View.MemoryView":480 * if self.view.suboffsets != NULL: * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< * item, self.dtype_is_object) * finally: */ __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); } /* "View.MemoryView":483 * item, self.dtype_is_object) * finally: * PyMem_Free(tmp) # <<<<<<<<<<<<<< * * cdef setitem_indexed(self, index, value): */ /*finally:*/ { /*normal exit:*/{ PyMem_Free(__pyx_v_tmp); goto __pyx_L7; } __pyx_L6_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; { PyMem_Free(__pyx_v_tmp); } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; goto __pyx_L1_error; } __pyx_L7:; } /* "View.MemoryView":453 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< * cdef int array[128] * cdef void *tmp = NULL */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":485 * PyMem_Free(tmp) * * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) */ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { char *__pyx_v_itemp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_indexed", 1); /* "View.MemoryView":486 * * cdef setitem_indexed(self, index, value): * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< * self.assign_item_from_object(itemp, value) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error) __pyx_v_itemp = __pyx_t_1; /* "View.MemoryView":487 * cdef setitem_indexed(self, index, value): * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< * * cdef convert_item_to_object(self, char *itemp): */ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":485 * PyMem_Free(tmp) * * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":489 * self.assign_item_from_object(itemp, value) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { PyObject *__pyx_v_struct = NULL; PyObject *__pyx_v_bytesitem = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 1); /* "View.MemoryView":492 * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" * import struct # <<<<<<<<<<<<<< * cdef bytes bytesitem * */ __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_struct = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":495 * cdef bytes bytesitem * * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< * try: * result = struct.unpack(self.view.format, bytesitem) */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "View.MemoryView":497 * bytesitem = itemp[:self.view.itemsize] * try: * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< * except struct.error: * raise ValueError, "Unable to convert item to object" */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ } /* "View.MemoryView":501 * raise ValueError, "Unable to convert item to object" * else: * if len(self.view.format) == 1: # <<<<<<<<<<<<<< * return result[0] * return result */ /*else:*/ { __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error) __pyx_t_10 = (__pyx_t_9 == 1); if (__pyx_t_10) { /* "View.MemoryView":502 * else: * if len(self.view.format) == 1: * return result[0] # <<<<<<<<<<<<<< * return result * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L6_except_return; /* "View.MemoryView":501 * raise ValueError, "Unable to convert item to object" * else: * if len(self.view.format) == 1: # <<<<<<<<<<<<<< * return result[0] * return result */ } /* "View.MemoryView":503 * if len(self.view.format) == 1: * return result[0] * return result # <<<<<<<<<<<<<< * * cdef assign_item_from_object(self, char *itemp, object value): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L6_except_return; } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":498 * try: * result = struct.unpack(self.view.format, bytesitem) * except struct.error: # <<<<<<<<<<<<<< * raise ValueError, "Unable to convert item to object" * else: */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); /* "View.MemoryView":499 * result = struct.unpack(self.view.format, bytesitem) * except struct.error: * raise ValueError, "Unable to convert item to object" # <<<<<<<<<<<<<< * else: * if len(self.view.format) == 1: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0); __PYX_ERR(1, 499, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; } /* "View.MemoryView":489 * self.assign_item_from_object(itemp, value) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_struct); __Pyx_XDECREF(__pyx_v_bytesitem); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":505 * return result * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { PyObject *__pyx_v_struct = NULL; char __pyx_v_c; PyObject *__pyx_v_bytesvalue = 0; Py_ssize_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; char *__pyx_t_10; char *__pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 1); /* "View.MemoryView":508 * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" * import struct # <<<<<<<<<<<<<< * cdef char c * cdef bytes bytesvalue */ __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_struct = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":513 * cdef Py_ssize_t i * * if isinstance(value, tuple): # <<<<<<<<<<<<<< * bytesvalue = struct.pack(self.view.format, *value) * else: */ __pyx_t_2 = PyTuple_Check(__pyx_v_value); if (__pyx_t_2) { /* "View.MemoryView":514 * * if isinstance(value, tuple): * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< * else: * bytesvalue = struct.pack(self.view.format, value) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error) __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":513 * cdef Py_ssize_t i * * if isinstance(value, tuple): # <<<<<<<<<<<<<< * bytesvalue = struct.pack(self.view.format, *value) * else: */ goto __pyx_L3; } /* "View.MemoryView":516 * bytesvalue = struct.pack(self.view.format, *value) * else: * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< * * for i, c in enumerate(bytesvalue): */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error) __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "View.MemoryView":518 * bytesvalue = struct.pack(self.view.format, value) * * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< * itemp[i] = c * */ __pyx_t_7 = 0; if (unlikely(__pyx_v_bytesvalue == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); __PYX_ERR(1, 518, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_bytesvalue); __pyx_t_8 = __pyx_v_bytesvalue; __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8); __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8)); for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) { __pyx_t_9 = __pyx_t_12; __pyx_v_c = (__pyx_t_9[0]); /* "View.MemoryView":519 * * for i, c in enumerate(bytesvalue): * itemp[i] = c # <<<<<<<<<<<<<< * * @cname('getbuffer') */ __pyx_v_i = __pyx_t_7; /* "View.MemoryView":518 * bytesvalue = struct.pack(self.view.format, value) * * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< * itemp[i] = c * */ __pyx_t_7 = (__pyx_t_7 + 1); /* "View.MemoryView":519 * * for i, c in enumerate(bytesvalue): * itemp[i] = c # <<<<<<<<<<<<<< * * @cname('getbuffer') */ (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "View.MemoryView":505 * return result * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_struct); __Pyx_XDECREF(__pyx_v_bytesvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":521 * itemp[i] = c * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t *__pyx_t_3; char *__pyx_t_4; void *__pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; if (unlikely(__pyx_v_info == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "View.MemoryView":523 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< * raise ValueError, "Cannot create writable memory view from read-only memoryview" * */ __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __pyx_v_self->view.readonly; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "View.MemoryView":524 * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: * raise ValueError, "Cannot create writable memory view from read-only memoryview" # <<<<<<<<<<<<<< * * if flags & PyBUF_ND: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0); __PYX_ERR(1, 524, __pyx_L1_error) /* "View.MemoryView":523 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< * raise ValueError, "Cannot create writable memory view from read-only memoryview" * */ } /* "View.MemoryView":526 * raise ValueError, "Cannot create writable memory view from read-only memoryview" * * if flags & PyBUF_ND: # <<<<<<<<<<<<<< * info.shape = self.view.shape * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); if (__pyx_t_1) { /* "View.MemoryView":527 * * if flags & PyBUF_ND: * info.shape = self.view.shape # <<<<<<<<<<<<<< * else: * info.shape = NULL */ __pyx_t_3 = __pyx_v_self->view.shape; __pyx_v_info->shape = __pyx_t_3; /* "View.MemoryView":526 * raise ValueError, "Cannot create writable memory view from read-only memoryview" * * if flags & PyBUF_ND: # <<<<<<<<<<<<<< * info.shape = self.view.shape * else: */ goto __pyx_L6; } /* "View.MemoryView":529 * info.shape = self.view.shape * else: * info.shape = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_STRIDES: */ /*else*/ { __pyx_v_info->shape = NULL; } __pyx_L6:; /* "View.MemoryView":531 * info.shape = NULL * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.strides = self.view.strides * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); if (__pyx_t_1) { /* "View.MemoryView":532 * * if flags & PyBUF_STRIDES: * info.strides = self.view.strides # <<<<<<<<<<<<<< * else: * info.strides = NULL */ __pyx_t_3 = __pyx_v_self->view.strides; __pyx_v_info->strides = __pyx_t_3; /* "View.MemoryView":531 * info.shape = NULL * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.strides = self.view.strides * else: */ goto __pyx_L7; } /* "View.MemoryView":534 * info.strides = self.view.strides * else: * info.strides = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_INDIRECT: */ /*else*/ { __pyx_v_info->strides = NULL; } __pyx_L7:; /* "View.MemoryView":536 * info.strides = NULL * * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< * info.suboffsets = self.view.suboffsets * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); if (__pyx_t_1) { /* "View.MemoryView":537 * * if flags & PyBUF_INDIRECT: * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< * else: * info.suboffsets = NULL */ __pyx_t_3 = __pyx_v_self->view.suboffsets; __pyx_v_info->suboffsets = __pyx_t_3; /* "View.MemoryView":536 * info.strides = NULL * * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< * info.suboffsets = self.view.suboffsets * else: */ goto __pyx_L8; } /* "View.MemoryView":539 * info.suboffsets = self.view.suboffsets * else: * info.suboffsets = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_FORMAT: */ /*else*/ { __pyx_v_info->suboffsets = NULL; } __pyx_L8:; /* "View.MemoryView":541 * info.suboffsets = NULL * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * info.format = self.view.format * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { /* "View.MemoryView":542 * * if flags & PyBUF_FORMAT: * info.format = self.view.format # <<<<<<<<<<<<<< * else: * info.format = NULL */ __pyx_t_4 = __pyx_v_self->view.format; __pyx_v_info->format = __pyx_t_4; /* "View.MemoryView":541 * info.suboffsets = NULL * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * info.format = self.view.format * else: */ goto __pyx_L9; } /* "View.MemoryView":544 * info.format = self.view.format * else: * info.format = NULL # <<<<<<<<<<<<<< * * info.buf = self.view.buf */ /*else*/ { __pyx_v_info->format = NULL; } __pyx_L9:; /* "View.MemoryView":546 * info.format = NULL * * info.buf = self.view.buf # <<<<<<<<<<<<<< * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize */ __pyx_t_5 = __pyx_v_self->view.buf; __pyx_v_info->buf = __pyx_t_5; /* "View.MemoryView":547 * * info.buf = self.view.buf * info.ndim = self.view.ndim # <<<<<<<<<<<<<< * info.itemsize = self.view.itemsize * info.len = self.view.len */ __pyx_t_6 = __pyx_v_self->view.ndim; __pyx_v_info->ndim = __pyx_t_6; /* "View.MemoryView":548 * info.buf = self.view.buf * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< * info.len = self.view.len * info.readonly = self.view.readonly */ __pyx_t_7 = __pyx_v_self->view.itemsize; __pyx_v_info->itemsize = __pyx_t_7; /* "View.MemoryView":549 * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize * info.len = self.view.len # <<<<<<<<<<<<<< * info.readonly = self.view.readonly * info.obj = self */ __pyx_t_7 = __pyx_v_self->view.len; __pyx_v_info->len = __pyx_t_7; /* "View.MemoryView":550 * info.itemsize = self.view.itemsize * info.len = self.view.len * info.readonly = self.view.readonly # <<<<<<<<<<<<<< * info.obj = self * */ __pyx_t_1 = __pyx_v_self->view.readonly; __pyx_v_info->readonly = __pyx_t_1; /* "View.MemoryView":551 * info.len = self.view.len * info.readonly = self.view.readonly * info.obj = self # <<<<<<<<<<<<<< * * */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "View.MemoryView":521 * itemp[i] = c * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":554 * * * @property # <<<<<<<<<<<<<< * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":556 * @property * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< * transpose_memslice(&result.from_slice) * return result */ __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error) __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":557 * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< * return result * */ __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error) /* "View.MemoryView":558 * cdef _memoryviewslice result = memoryview_copy(self) * transpose_memslice(&result.from_slice) * return result # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":554 * * * @property # <<<<<<<<<<<<<< * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":560 * return result * * @property # <<<<<<<<<<<<<< * def base(self): * return self._get_base() */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":562 * @property * def base(self): * return self._get_base() # <<<<<<<<<<<<<< * * cdef _get_base(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":560 * return result * * @property # <<<<<<<<<<<<<< * def base(self): * return self._get_base() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":564 * return self._get_base() * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.obj * */ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_base", 1); /* "View.MemoryView":565 * * cdef _get_base(self): * return self.obj # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->obj); __pyx_r = __pyx_v_self->obj; goto __pyx_L0; /* "View.MemoryView":564 * return self._get_base() * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.obj * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":567 * return self.obj * * @property # <<<<<<<<<<<<<< * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_7genexpr__pyx_v_length; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":569 * @property * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]); __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } /* exit inner scope */ __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "View.MemoryView":567 * return self.obj * * @property # <<<<<<<<<<<<<< * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":571 * return tuple([length for length in self.view.shape[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def strides(self): * if self.view.strides == NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_8genexpr1__pyx_v_stride; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":573 * @property * def strides(self): * if self.view.strides == NULL: # <<<<<<<<<<<<<< * * raise ValueError, "Buffer view does not expose strides" */ __pyx_t_1 = (__pyx_v_self->view.strides == NULL); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":575 * if self.view.strides == NULL: * * raise ValueError, "Buffer view does not expose strides" # <<<<<<<<<<<<<< * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0); __PYX_ERR(1, 575, __pyx_L1_error) /* "View.MemoryView":573 * @property * def strides(self): * if self.view.strides == NULL: # <<<<<<<<<<<<<< * * raise ValueError, "Buffer view does not expose strides" */ } /* "View.MemoryView":577 * raise ValueError, "Buffer view does not expose strides" * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { __pyx_t_3 = __pyx_t_5; __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]); __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "View.MemoryView":571 * return tuple([length for length in self.view.shape[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def strides(self): * if self.view.strides == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":579 * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def suboffsets(self): * if self.view.suboffsets == NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":581 * @property * def suboffsets(self): * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< * return (-1,) * self.view.ndim * */ __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL); if (__pyx_t_1) { /* "View.MemoryView":582 * def suboffsets(self): * if self.view.suboffsets == NULL: * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":581 * @property * def suboffsets(self): * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< * return (-1,) * self.view.ndim * */ } /* "View.MemoryView":584 * return (-1,) * self.view.ndim * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { __pyx_t_3 = __pyx_t_5; __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]); __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "View.MemoryView":579 * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def suboffsets(self): * if self.view.suboffsets == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":586 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def ndim(self): * return self.view.ndim */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":588 * @property * def ndim(self): * return self.view.ndim # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":586 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def ndim(self): * return self.view.ndim */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":590 * return self.view.ndim * * @property # <<<<<<<<<<<<<< * def itemsize(self): * return self.view.itemsize */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":592 * @property * def itemsize(self): * return self.view.itemsize # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":590 * return self.view.ndim * * @property # <<<<<<<<<<<<<< * def itemsize(self): * return self.view.itemsize */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":594 * return self.view.itemsize * * @property # <<<<<<<<<<<<<< * def nbytes(self): * return self.size * self.view.itemsize */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":596 * @property * def nbytes(self): * return self.size * self.view.itemsize # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "View.MemoryView":594 * return self.view.itemsize * * @property # <<<<<<<<<<<<<< * def nbytes(self): * return self.size * self.view.itemsize */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":598 * return self.size * self.view.itemsize * * @property # <<<<<<<<<<<<<< * def size(self): * if self._size is None: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_length = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":600 * @property * def size(self): * if self._size is None: # <<<<<<<<<<<<<< * result = 1 * */ __pyx_t_1 = (__pyx_v_self->_size == Py_None); if (__pyx_t_1) { /* "View.MemoryView":601 * def size(self): * if self._size is None: * result = 1 # <<<<<<<<<<<<<< * * for length in self.view.shape[:self.view.ndim]: */ __Pyx_INCREF(__pyx_int_1); __pyx_v_result = __pyx_int_1; /* "View.MemoryView":603 * result = 1 * * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< * result *= length * */ __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5); __pyx_t_5 = 0; /* "View.MemoryView":604 * * for length in self.view.shape[:self.view.ndim]: * result *= length # <<<<<<<<<<<<<< * * self._size = result */ __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); __pyx_t_5 = 0; } /* "View.MemoryView":606 * result *= length * * self._size = result # <<<<<<<<<<<<<< * * return self._size */ __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_GOTREF(__pyx_v_self->_size); __Pyx_DECREF(__pyx_v_self->_size); __pyx_v_self->_size = __pyx_v_result; /* "View.MemoryView":600 * @property * def size(self): * if self._size is None: # <<<<<<<<<<<<<< * result = 1 * */ } /* "View.MemoryView":608 * self._size = result * * return self._size # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_size); __pyx_r = __pyx_v_self->_size; goto __pyx_L0; /* "View.MemoryView":598 * return self.size * self.view.itemsize * * @property # <<<<<<<<<<<<<< * def size(self): * if self._size is None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_length); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":610 * return self._size * * def __len__(self): # <<<<<<<<<<<<<< * if self.view.ndim >= 1: * return self.view.shape[0] */ /* Python wrapper */ static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_r; int __pyx_t_1; /* "View.MemoryView":611 * * def __len__(self): * if self.view.ndim >= 1: # <<<<<<<<<<<<<< * return self.view.shape[0] * */ __pyx_t_1 = (__pyx_v_self->view.ndim >= 1); if (__pyx_t_1) { /* "View.MemoryView":612 * def __len__(self): * if self.view.ndim >= 1: * return self.view.shape[0] # <<<<<<<<<<<<<< * * return 0 */ __pyx_r = (__pyx_v_self->view.shape[0]); goto __pyx_L0; /* "View.MemoryView":611 * * def __len__(self): * if self.view.ndim >= 1: # <<<<<<<<<<<<<< * return self.view.shape[0] * */ } /* "View.MemoryView":614 * return self.view.shape[0] * * return 0 # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":610 * return self._size * * def __len__(self): # <<<<<<<<<<<<<< * if self.view.ndim >= 1: * return self.view.shape[0] */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":616 * return 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__, * id(self)) */ /* Python wrapper */ static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "View.MemoryView":617 * * def __repr__(self): * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< * id(self)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":618 * def __repr__(self): * return "" % (self.base.__class__.__name__, * id(self)) # <<<<<<<<<<<<<< * * def __str__(self): */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "View.MemoryView":617 * * def __repr__(self): * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< * id(self)) * */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":616 * return 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__, * id(self)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":620 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__,) * */ /* Python wrapper */ static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 1); /* "View.MemoryView":621 * * def __str__(self): * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":620 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__,) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":624 * * * def is_c_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* Python wrapper */ static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice *__pyx_v_mslice; __Pyx_memviewslice __pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_c_contig", 1); /* "View.MemoryView":627 * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< * return slice_is_contig(mslice[0], 'C', self.view.ndim) * */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":628 * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< * * def is_f_contig(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":624 * * * def is_c_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":630 * return slice_is_contig(mslice[0], 'C', self.view.ndim) * * def is_f_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* Python wrapper */ static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice *__pyx_v_mslice; __Pyx_memviewslice __pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_f_contig", 1); /* "View.MemoryView":633 * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< * return slice_is_contig(mslice[0], 'F', self.view.ndim) * */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":634 * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< * * def copy(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":630 * return slice_is_contig(mslice[0], 'C', self.view.ndim) * * def is_f_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":636 * return slice_is_contig(mslice[0], 'F', self.view.ndim) * * def copy(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS */ /* Python wrapper */ static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice __pyx_v_mslice; int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); /* "View.MemoryView":638 * def copy(self): * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< * * slice_copy(self, &mslice) */ __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); /* "View.MemoryView":640 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS * * slice_copy(self, &mslice) # <<<<<<<<<<<<<< * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, * self.view.itemsize, */ __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); /* "View.MemoryView":641 * * slice_copy(self, &mslice) * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< * self.view.itemsize, * flags|PyBUF_C_CONTIGUOUS, */ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":646 * self.dtype_is_object) * * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< * * def copy_fortran(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":636 * return slice_is_contig(mslice[0], 'F', self.view.ndim) * * def copy(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":648 * return memoryview_copy_from_slice(self, &mslice) * * def copy_fortran(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS */ /* Python wrapper */ static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice __pyx_v_src; __Pyx_memviewslice __pyx_v_dst; int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy_fortran", 1); /* "View.MemoryView":650 * def copy_fortran(self): * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< * * slice_copy(self, &src) */ __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); /* "View.MemoryView":652 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS * * slice_copy(self, &src) # <<<<<<<<<<<<<< * dst = slice_copy_contig(&src, "fortran", self.view.ndim, * self.view.itemsize, */ __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); /* "View.MemoryView":653 * * slice_copy(self, &src) * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< * self.view.itemsize, * flags|PyBUF_F_CONTIGUOUS, */ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error) __pyx_v_dst = __pyx_t_1; /* "View.MemoryView":658 * self.dtype_is_object) * * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":648 * return memoryview_copy_from_slice(self, &mslice) * * def copy_fortran(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":662 * * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo */ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) { struct __pyx_memoryview_obj *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_cwrapper", 1); /* "View.MemoryView":663 * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< * result.typeinfo = typeinfo * return result */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":664 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo # <<<<<<<<<<<<<< * return result * */ __pyx_v_result->typeinfo = __pyx_v_typeinfo; /* "View.MemoryView":665 * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo * return result # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_check') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":662 * * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":668 * * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<< * return isinstance(o, memoryview) * */ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { int __pyx_r; int __pyx_t_1; /* "View.MemoryView":669 * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: * return isinstance(o, memoryview) # <<<<<<<<<<<<<< * * cdef tuple _unellipsify(object index, int ndim): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); __pyx_r = __pyx_t_1; goto __pyx_L0; /* "View.MemoryView":668 * * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<< * return isinstance(o, memoryview) * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":671 * return isinstance(o, memoryview) * * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< * """ * Replace all ellipses with full slices and fill incomplete indices with */ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_tup = NULL; PyObject *__pyx_v_result = NULL; int __pyx_v_have_slices; int __pyx_v_seen_ellipsis; PyObject *__pyx_v_item = NULL; Py_ssize_t __pyx_v_nslices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unellipsify", 1); /* "View.MemoryView":677 * """ * cdef Py_ssize_t idx * tup = index if isinstance(index, tuple) else (index,) # <<<<<<<<<<<<<< * * result = [slice(None)] * ndim */ __pyx_t_2 = PyTuple_Check(__pyx_v_index); if (__pyx_t_2) { __Pyx_INCREF(((PyObject*)__pyx_v_index)); __pyx_t_1 = __pyx_v_index; } else { __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_tup = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":679 * tup = index if isinstance(index, tuple) else (index,) * * result = [slice(None)] * ndim # <<<<<<<<<<<<<< * have_slices = False * seen_ellipsis = False */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) { __Pyx_INCREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error); } } __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":680 * * result = [slice(None)] * ndim * have_slices = False # <<<<<<<<<<<<<< * seen_ellipsis = False * idx = 0 */ __pyx_v_have_slices = 0; /* "View.MemoryView":681 * result = [slice(None)] * ndim * have_slices = False * seen_ellipsis = False # <<<<<<<<<<<<<< * idx = 0 * for item in tup: */ __pyx_v_seen_ellipsis = 0; /* "View.MemoryView":682 * have_slices = False * seen_ellipsis = False * idx = 0 # <<<<<<<<<<<<<< * for item in tup: * if item is Ellipsis: */ __pyx_v_idx = 0; /* "View.MemoryView":683 * seen_ellipsis = False * idx = 0 * for item in tup: # <<<<<<<<<<<<<< * if item is Ellipsis: * if not seen_ellipsis: */ if (unlikely(__pyx_v_tup == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 683, __pyx_L1_error) } __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":684 * idx = 0 * for item in tup: * if item is Ellipsis: # <<<<<<<<<<<<<< * if not seen_ellipsis: * idx += ndim - len(tup) */ __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); if (__pyx_t_2) { /* "View.MemoryView":685 * for item in tup: * if item is Ellipsis: * if not seen_ellipsis: # <<<<<<<<<<<<<< * idx += ndim - len(tup) * seen_ellipsis = True */ __pyx_t_2 = (!__pyx_v_seen_ellipsis); if (__pyx_t_2) { /* "View.MemoryView":686 * if item is Ellipsis: * if not seen_ellipsis: * idx += ndim - len(tup) # <<<<<<<<<<<<<< * seen_ellipsis = True * have_slices = True */ if (unlikely(__pyx_v_tup == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 686, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error) __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5)); /* "View.MemoryView":687 * if not seen_ellipsis: * idx += ndim - len(tup) * seen_ellipsis = True # <<<<<<<<<<<<<< * have_slices = True * else: */ __pyx_v_seen_ellipsis = 1; /* "View.MemoryView":685 * for item in tup: * if item is Ellipsis: * if not seen_ellipsis: # <<<<<<<<<<<<<< * idx += ndim - len(tup) * seen_ellipsis = True */ } /* "View.MemoryView":688 * idx += ndim - len(tup) * seen_ellipsis = True * have_slices = True # <<<<<<<<<<<<<< * else: * if isinstance(item, slice): */ __pyx_v_have_slices = 1; /* "View.MemoryView":684 * idx = 0 * for item in tup: * if item is Ellipsis: # <<<<<<<<<<<<<< * if not seen_ellipsis: * idx += ndim - len(tup) */ goto __pyx_L5; } /* "View.MemoryView":690 * have_slices = True * else: * if isinstance(item, slice): # <<<<<<<<<<<<<< * have_slices = True * elif not PyIndex_Check(item): */ /*else*/ { __pyx_t_2 = PySlice_Check(__pyx_v_item); if (__pyx_t_2) { /* "View.MemoryView":691 * else: * if isinstance(item, slice): * have_slices = True # <<<<<<<<<<<<<< * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" */ __pyx_v_have_slices = 1; /* "View.MemoryView":690 * have_slices = True * else: * if isinstance(item, slice): # <<<<<<<<<<<<<< * have_slices = True * elif not PyIndex_Check(item): */ goto __pyx_L7; } /* "View.MemoryView":692 * if isinstance(item, slice): * have_slices = True * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item */ __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0)); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":693 * have_slices = True * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" # <<<<<<<<<<<<<< * result[idx] = item * idx += 1 */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = 127; __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type); __pyx_t_5 += 24; __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type); __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_kp_u__6); __pyx_t_5 += 1; __Pyx_GIVEREF(__pyx_kp_u__6); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 693, __pyx_L1_error) /* "View.MemoryView":692 * if isinstance(item, slice): * have_slices = True * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item */ } __pyx_L7:; /* "View.MemoryView":694 * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item # <<<<<<<<<<<<<< * idx += 1 * */ if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error) } __pyx_L5:; /* "View.MemoryView":695 * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item * idx += 1 # <<<<<<<<<<<<<< * * nslices = ndim - idx */ __pyx_v_idx = (__pyx_v_idx + 1); /* "View.MemoryView":683 * seen_ellipsis = False * idx = 0 * for item in tup: # <<<<<<<<<<<<<< * if item is Ellipsis: * if not seen_ellipsis: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":697 * idx += 1 * * nslices = ndim - idx # <<<<<<<<<<<<<< * return have_slices or nslices, tuple(result) * */ __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx); /* "View.MemoryView":698 * * nslices = ndim - idx * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: */ __Pyx_XDECREF(__pyx_r); if (!__pyx_v_have_slices) { } else { __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; __pyx_L9_bool_binop_done:; __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "View.MemoryView":671 * return isinstance(o, memoryview) * * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< * """ * Replace all ellipses with full slices and fill incomplete indices with */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":700 * return have_slices or nslices, tuple(result) * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: */ static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { Py_ssize_t __pyx_v_suboffset; int __pyx_r; Py_ssize_t *__pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "View.MemoryView":701 * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" */ __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { __pyx_t_1 = __pyx_t_3; __pyx_v_suboffset = (__pyx_t_1[0]); /* "View.MemoryView":702 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag */ __pyx_t_4 = (__pyx_v_suboffset >= 0); if (unlikely(__pyx_t_4)) { /* "View.MemoryView":703 * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" # <<<<<<<<<<<<<< * return 0 # return type just used as an error flag * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0); __PYX_ERR(1, 703, __pyx_L1_error) /* "View.MemoryView":702 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag */ } } /* "View.MemoryView":704 * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":700 * return have_slices or nslices, tuple(result) * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "View.MemoryView":711 * * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< * cdef int new_ndim = 0, suboffset_dim = -1, dim * cdef bint negative_step */ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { int __pyx_v_new_ndim; int __pyx_v_suboffset_dim; int __pyx_v_dim; __Pyx_memviewslice __pyx_v_src; __Pyx_memviewslice __pyx_v_dst; __Pyx_memviewslice *__pyx_v_p_src; struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; __Pyx_memviewslice *__pyx_v_p_dst; int *__pyx_v_p_suboffset_dim; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; Py_ssize_t __pyx_v_step; Py_ssize_t __pyx_v_cindex; int __pyx_v_have_start; int __pyx_v_have_stop; int __pyx_v_have_step; PyObject *__pyx_v_index = NULL; struct __pyx_memoryview_obj *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; struct __pyx_memoryview_obj *__pyx_t_3; char *__pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memview_slice", 1); /* "View.MemoryView":712 * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< * cdef bint negative_step * cdef __Pyx_memviewslice src, dst */ __pyx_v_new_ndim = 0; __pyx_v_suboffset_dim = -1; /* "View.MemoryView":719 * * * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< * * cdef _memoryviewslice memviewsliceobj */ (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); /* "View.MemoryView":723 * cdef _memoryviewslice memviewsliceobj * * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< * * if isinstance(memview, _memoryviewslice): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_memview->view.ndim > 0); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(1, 723, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error) #endif /* "View.MemoryView":725 * assert memview.view.ndim > 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":726 * * if isinstance(memview, _memoryviewslice): * memviewsliceobj = memview # <<<<<<<<<<<<<< * p_src = &memviewsliceobj.from_slice * else: */ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error) __pyx_t_2 = ((PyObject *)__pyx_v_memview); __Pyx_INCREF(__pyx_t_2); __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":727 * if isinstance(memview, _memoryviewslice): * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< * else: * slice_copy(memview, &src) */ __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); /* "View.MemoryView":725 * assert memview.view.ndim > 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice */ goto __pyx_L3; } /* "View.MemoryView":729 * p_src = &memviewsliceobj.from_slice * else: * slice_copy(memview, &src) # <<<<<<<<<<<<<< * p_src = &src * */ /*else*/ { __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); /* "View.MemoryView":730 * else: * slice_copy(memview, &src) * p_src = &src # <<<<<<<<<<<<<< * * */ __pyx_v_p_src = (&__pyx_v_src); } __pyx_L3:; /* "View.MemoryView":736 * * * dst.memview = p_src.memview # <<<<<<<<<<<<<< * dst.data = p_src.data * */ __pyx_t_3 = __pyx_v_p_src->memview; __pyx_v_dst.memview = __pyx_t_3; /* "View.MemoryView":737 * * dst.memview = p_src.memview * dst.data = p_src.data # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __pyx_v_p_src->data; __pyx_v_dst.data = __pyx_t_4; /* "View.MemoryView":742 * * * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< * cdef int *p_suboffset_dim = &suboffset_dim * cdef Py_ssize_t start, stop, step, cindex */ __pyx_v_p_dst = (&__pyx_v_dst); /* "View.MemoryView":743 * * cdef __Pyx_memviewslice *p_dst = &dst * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< * cdef Py_ssize_t start, stop, step, cindex * cdef bint have_start, have_stop, have_step */ __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); /* "View.MemoryView":747 * cdef bint have_start, have_stop, have_step * * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< * if PyIndex_Check(index): * cindex = index */ __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 747, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8); __pyx_t_8 = 0; __pyx_v_dim = __pyx_t_5; __pyx_t_5 = (__pyx_t_5 + 1); /* "View.MemoryView":748 * * for dim, index in enumerate(indices): * if PyIndex_Check(index): # <<<<<<<<<<<<<< * cindex = index * slice_memviewslice( */ __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0); if (__pyx_t_1) { /* "View.MemoryView":749 * for dim, index in enumerate(indices): * if PyIndex_Check(index): * cindex = index # <<<<<<<<<<<<<< * slice_memviewslice( * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], */ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error) __pyx_v_cindex = __pyx_t_9; /* "View.MemoryView":750 * if PyIndex_Check(index): * cindex = index * slice_memviewslice( # <<<<<<<<<<<<<< * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], * dim, new_ndim, p_suboffset_dim, */ __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error) /* "View.MemoryView":748 * * for dim, index in enumerate(indices): * if PyIndex_Check(index): # <<<<<<<<<<<<<< * cindex = index * slice_memviewslice( */ goto __pyx_L6; } /* "View.MemoryView":756 * 0, 0, 0, # have_{start,stop,step} * False) * elif index is None: # <<<<<<<<<<<<<< * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 */ __pyx_t_1 = (__pyx_v_index == Py_None); if (__pyx_t_1) { /* "View.MemoryView":757 * False) * elif index is None: * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 */ (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; /* "View.MemoryView":758 * elif index is None: * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< * p_dst.suboffsets[new_ndim] = -1 * new_ndim += 1 */ (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; /* "View.MemoryView":759 * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< * new_ndim += 1 * else: */ (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; /* "View.MemoryView":760 * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 * new_ndim += 1 # <<<<<<<<<<<<<< * else: * start = index.start or 0 */ __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); /* "View.MemoryView":756 * 0, 0, 0, # have_{start,stop,step} * False) * elif index is None: # <<<<<<<<<<<<<< * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 */ goto __pyx_L6; } /* "View.MemoryView":762 * new_ndim += 1 * else: * start = index.start or 0 # <<<<<<<<<<<<<< * stop = index.stop or 0 * step = index.step or 0 */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_bool_binop_done; } __pyx_t_9 = 0; __pyx_L7_bool_binop_done:; __pyx_v_start = __pyx_t_9; /* "View.MemoryView":763 * else: * start = index.start or 0 * stop = index.stop or 0 # <<<<<<<<<<<<<< * step = index.step or 0 * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_9 = 0; __pyx_L9_bool_binop_done:; __pyx_v_stop = __pyx_t_9; /* "View.MemoryView":764 * start = index.start or 0 * stop = index.stop or 0 * step = index.step or 0 # <<<<<<<<<<<<<< * * have_start = index.start is not None */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_bool_binop_done; } __pyx_t_9 = 0; __pyx_L11_bool_binop_done:; __pyx_v_step = __pyx_t_9; /* "View.MemoryView":766 * step = index.step or 0 * * have_start = index.start is not None # <<<<<<<<<<<<<< * have_stop = index.stop is not None * have_step = index.step is not None */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_start = __pyx_t_1; /* "View.MemoryView":767 * * have_start = index.start is not None * have_stop = index.stop is not None # <<<<<<<<<<<<<< * have_step = index.step is not None * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_stop = __pyx_t_1; /* "View.MemoryView":768 * have_start = index.start is not None * have_stop = index.stop is not None * have_step = index.step is not None # <<<<<<<<<<<<<< * * slice_memviewslice( */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_step = __pyx_t_1; /* "View.MemoryView":770 * have_step = index.step is not None * * slice_memviewslice( # <<<<<<<<<<<<<< * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], * dim, new_ndim, p_suboffset_dim, */ __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error) /* "View.MemoryView":776 * have_start, have_stop, have_step, * True) * new_ndim += 1 # <<<<<<<<<<<<<< * * if isinstance(memview, _memoryviewslice): */ __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); } __pyx_L6:; /* "View.MemoryView":747 * cdef bint have_start, have_stop, have_step * * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< * if PyIndex_Check(index): * cindex = index */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":778 * new_ndim += 1 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":779 * * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, */ __Pyx_XDECREF((PyObject *)__pyx_r); /* "View.MemoryView":780 * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< * memviewsliceobj.to_dtype_func, * memview.dtype_is_object) */ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) } /* "View.MemoryView":781 * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< * memview.dtype_is_object) * else: */ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) } /* "View.MemoryView":779 * * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, */ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error) __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":778 * new_ndim += 1 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, */ } /* "View.MemoryView":784 * memview.dtype_is_object) * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< * memview.dtype_is_object) * */ /*else*/ { __Pyx_XDECREF((PyObject *)__pyx_r); /* "View.MemoryView":785 * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, * memview.dtype_is_object) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "View.MemoryView":784 * memview.dtype_is_object) * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< * memview.dtype_is_object) * */ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error) __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":711 * * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< * cdef int new_ndim = 0, suboffset_dim = -1, dim * cdef bint negative_step */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":793 * * @cname('__pyx_memoryview_slice_memviewslice') * cdef int slice_memviewslice( # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, */ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { Py_ssize_t __pyx_v_new_shape; int __pyx_v_negative_step; int __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":813 * cdef bint negative_step * * if not is_slice: # <<<<<<<<<<<<<< * * if start < 0: */ __pyx_t_1 = (!__pyx_v_is_slice); if (__pyx_t_1) { /* "View.MemoryView":815 * if not is_slice: * * if start < 0: # <<<<<<<<<<<<<< * start += shape * if not 0 <= start < shape: */ __pyx_t_1 = (__pyx_v_start < 0); if (__pyx_t_1) { /* "View.MemoryView":816 * * if start < 0: * start += shape # <<<<<<<<<<<<<< * if not 0 <= start < shape: * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) */ __pyx_v_start = (__pyx_v_start + __pyx_v_shape); /* "View.MemoryView":815 * if not is_slice: * * if start < 0: # <<<<<<<<<<<<<< * start += shape * if not 0 <= start < shape: */ } /* "View.MemoryView":817 * if start < 0: * start += shape * if not 0 <= start < shape: # <<<<<<<<<<<<<< * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) * else: */ __pyx_t_1 = (0 <= __pyx_v_start); if (__pyx_t_1) { __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); } __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "View.MemoryView":818 * start += shape * if not 0 <= start < shape: * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< * else: * */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error) /* "View.MemoryView":817 * if start < 0: * start += shape * if not 0 <= start < shape: # <<<<<<<<<<<<<< * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) * else: */ } /* "View.MemoryView":813 * cdef bint negative_step * * if not is_slice: # <<<<<<<<<<<<<< * * if start < 0: */ goto __pyx_L3; } /* "View.MemoryView":821 * else: * * if have_step: # <<<<<<<<<<<<<< * negative_step = step < 0 * if step == 0: */ /*else*/ { __pyx_t_2 = (__pyx_v_have_step != 0); if (__pyx_t_2) { /* "View.MemoryView":822 * * if have_step: * negative_step = step < 0 # <<<<<<<<<<<<<< * if step == 0: * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) */ __pyx_v_negative_step = (__pyx_v_step < 0); /* "View.MemoryView":823 * if have_step: * negative_step = step < 0 * if step == 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: */ __pyx_t_2 = (__pyx_v_step == 0); if (__pyx_t_2) { /* "View.MemoryView":824 * negative_step = step < 0 * if step == 0: * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< * else: * negative_step = False */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error) /* "View.MemoryView":823 * if have_step: * negative_step = step < 0 * if step == 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: */ } /* "View.MemoryView":821 * else: * * if have_step: # <<<<<<<<<<<<<< * negative_step = step < 0 * if step == 0: */ goto __pyx_L6; } /* "View.MemoryView":826 * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: * negative_step = False # <<<<<<<<<<<<<< * step = 1 * */ /*else*/ { __pyx_v_negative_step = 0; /* "View.MemoryView":827 * else: * negative_step = False * step = 1 # <<<<<<<<<<<<<< * * */ __pyx_v_step = 1; } __pyx_L6:; /* "View.MemoryView":830 * * * if have_start: # <<<<<<<<<<<<<< * if start < 0: * start += shape */ __pyx_t_2 = (__pyx_v_have_start != 0); if (__pyx_t_2) { /* "View.MemoryView":831 * * if have_start: * if start < 0: # <<<<<<<<<<<<<< * start += shape * if start < 0: */ __pyx_t_2 = (__pyx_v_start < 0); if (__pyx_t_2) { /* "View.MemoryView":832 * if have_start: * if start < 0: * start += shape # <<<<<<<<<<<<<< * if start < 0: * start = 0 */ __pyx_v_start = (__pyx_v_start + __pyx_v_shape); /* "View.MemoryView":833 * if start < 0: * start += shape * if start < 0: # <<<<<<<<<<<<<< * start = 0 * elif start >= shape: */ __pyx_t_2 = (__pyx_v_start < 0); if (__pyx_t_2) { /* "View.MemoryView":834 * start += shape * if start < 0: * start = 0 # <<<<<<<<<<<<<< * elif start >= shape: * if negative_step: */ __pyx_v_start = 0; /* "View.MemoryView":833 * if start < 0: * start += shape * if start < 0: # <<<<<<<<<<<<<< * start = 0 * elif start >= shape: */ } /* "View.MemoryView":831 * * if have_start: * if start < 0: # <<<<<<<<<<<<<< * start += shape * if start < 0: */ goto __pyx_L9; } /* "View.MemoryView":835 * if start < 0: * start = 0 * elif start >= shape: # <<<<<<<<<<<<<< * if negative_step: * start = shape - 1 */ __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape); if (__pyx_t_2) { /* "View.MemoryView":836 * start = 0 * elif start >= shape: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ if (__pyx_v_negative_step) { /* "View.MemoryView":837 * elif start >= shape: * if negative_step: * start = shape - 1 # <<<<<<<<<<<<<< * else: * start = shape */ __pyx_v_start = (__pyx_v_shape - 1); /* "View.MemoryView":836 * start = 0 * elif start >= shape: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ goto __pyx_L11; } /* "View.MemoryView":839 * start = shape - 1 * else: * start = shape # <<<<<<<<<<<<<< * else: * if negative_step: */ /*else*/ { __pyx_v_start = __pyx_v_shape; } __pyx_L11:; /* "View.MemoryView":835 * if start < 0: * start = 0 * elif start >= shape: # <<<<<<<<<<<<<< * if negative_step: * start = shape - 1 */ } __pyx_L9:; /* "View.MemoryView":830 * * * if have_start: # <<<<<<<<<<<<<< * if start < 0: * start += shape */ goto __pyx_L8; } /* "View.MemoryView":841 * start = shape * else: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ /*else*/ { if (__pyx_v_negative_step) { /* "View.MemoryView":842 * else: * if negative_step: * start = shape - 1 # <<<<<<<<<<<<<< * else: * start = 0 */ __pyx_v_start = (__pyx_v_shape - 1); /* "View.MemoryView":841 * start = shape * else: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ goto __pyx_L12; } /* "View.MemoryView":844 * start = shape - 1 * else: * start = 0 # <<<<<<<<<<<<<< * * if have_stop: */ /*else*/ { __pyx_v_start = 0; } __pyx_L12:; } __pyx_L8:; /* "View.MemoryView":846 * start = 0 * * if have_stop: # <<<<<<<<<<<<<< * if stop < 0: * stop += shape */ __pyx_t_2 = (__pyx_v_have_stop != 0); if (__pyx_t_2) { /* "View.MemoryView":847 * * if have_stop: * if stop < 0: # <<<<<<<<<<<<<< * stop += shape * if stop < 0: */ __pyx_t_2 = (__pyx_v_stop < 0); if (__pyx_t_2) { /* "View.MemoryView":848 * if have_stop: * if stop < 0: * stop += shape # <<<<<<<<<<<<<< * if stop < 0: * stop = 0 */ __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); /* "View.MemoryView":849 * if stop < 0: * stop += shape * if stop < 0: # <<<<<<<<<<<<<< * stop = 0 * elif stop > shape: */ __pyx_t_2 = (__pyx_v_stop < 0); if (__pyx_t_2) { /* "View.MemoryView":850 * stop += shape * if stop < 0: * stop = 0 # <<<<<<<<<<<<<< * elif stop > shape: * stop = shape */ __pyx_v_stop = 0; /* "View.MemoryView":849 * if stop < 0: * stop += shape * if stop < 0: # <<<<<<<<<<<<<< * stop = 0 * elif stop > shape: */ } /* "View.MemoryView":847 * * if have_stop: * if stop < 0: # <<<<<<<<<<<<<< * stop += shape * if stop < 0: */ goto __pyx_L14; } /* "View.MemoryView":851 * if stop < 0: * stop = 0 * elif stop > shape: # <<<<<<<<<<<<<< * stop = shape * else: */ __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape); if (__pyx_t_2) { /* "View.MemoryView":852 * stop = 0 * elif stop > shape: * stop = shape # <<<<<<<<<<<<<< * else: * if negative_step: */ __pyx_v_stop = __pyx_v_shape; /* "View.MemoryView":851 * if stop < 0: * stop = 0 * elif stop > shape: # <<<<<<<<<<<<<< * stop = shape * else: */ } __pyx_L14:; /* "View.MemoryView":846 * start = 0 * * if have_stop: # <<<<<<<<<<<<<< * if stop < 0: * stop += shape */ goto __pyx_L13; } /* "View.MemoryView":854 * stop = shape * else: * if negative_step: # <<<<<<<<<<<<<< * stop = -1 * else: */ /*else*/ { if (__pyx_v_negative_step) { /* "View.MemoryView":855 * else: * if negative_step: * stop = -1 # <<<<<<<<<<<<<< * else: * stop = shape */ __pyx_v_stop = -1L; /* "View.MemoryView":854 * stop = shape * else: * if negative_step: # <<<<<<<<<<<<<< * stop = -1 * else: */ goto __pyx_L16; } /* "View.MemoryView":857 * stop = -1 * else: * stop = shape # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_v_stop = __pyx_v_shape; } __pyx_L16:; } __pyx_L13:; /* "View.MemoryView":861 * * with cython.cdivision(True): * new_shape = (stop - start) // step # <<<<<<<<<<<<<< * * if (stop - start) - step * new_shape: */ __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); /* "View.MemoryView":863 * new_shape = (stop - start) // step * * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< * new_shape += 1 * */ __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); if (__pyx_t_2) { /* "View.MemoryView":864 * * if (stop - start) - step * new_shape: * new_shape += 1 # <<<<<<<<<<<<<< * * if new_shape < 0: */ __pyx_v_new_shape = (__pyx_v_new_shape + 1); /* "View.MemoryView":863 * new_shape = (stop - start) // step * * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< * new_shape += 1 * */ } /* "View.MemoryView":866 * new_shape += 1 * * if new_shape < 0: # <<<<<<<<<<<<<< * new_shape = 0 * */ __pyx_t_2 = (__pyx_v_new_shape < 0); if (__pyx_t_2) { /* "View.MemoryView":867 * * if new_shape < 0: * new_shape = 0 # <<<<<<<<<<<<<< * * */ __pyx_v_new_shape = 0; /* "View.MemoryView":866 * new_shape += 1 * * if new_shape < 0: # <<<<<<<<<<<<<< * new_shape = 0 * */ } /* "View.MemoryView":870 * * * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< * dst.shape[new_ndim] = new_shape * dst.suboffsets[new_ndim] = suboffset */ (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); /* "View.MemoryView":871 * * dst.strides[new_ndim] = stride * step * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< * dst.suboffsets[new_ndim] = suboffset * */ (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; /* "View.MemoryView":872 * dst.strides[new_ndim] = stride * step * dst.shape[new_ndim] = new_shape * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< * * */ (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; } __pyx_L3:; /* "View.MemoryView":875 * * * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< * dst.data += start * stride * else: */ __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0); if (__pyx_t_2) { /* "View.MemoryView":876 * * if suboffset_dim[0] < 0: * dst.data += start * stride # <<<<<<<<<<<<<< * else: * dst.suboffsets[suboffset_dim[0]] += start * stride */ __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); /* "View.MemoryView":875 * * * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< * dst.data += start * stride * else: */ goto __pyx_L19; } /* "View.MemoryView":878 * dst.data += start * stride * else: * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< * * if suboffset >= 0: */ /*else*/ { __pyx_t_3 = (__pyx_v_suboffset_dim[0]); (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); } __pyx_L19:; /* "View.MemoryView":880 * dst.suboffsets[suboffset_dim[0]] += start * stride * * if suboffset >= 0: # <<<<<<<<<<<<<< * if not is_slice: * if new_ndim == 0: */ __pyx_t_2 = (__pyx_v_suboffset >= 0); if (__pyx_t_2) { /* "View.MemoryView":881 * * if suboffset >= 0: * if not is_slice: # <<<<<<<<<<<<<< * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset */ __pyx_t_2 = (!__pyx_v_is_slice); if (__pyx_t_2) { /* "View.MemoryView":882 * if suboffset >= 0: * if not is_slice: * if new_ndim == 0: # <<<<<<<<<<<<<< * dst.data = ( dst.data)[0] + suboffset * else: */ __pyx_t_2 = (__pyx_v_new_ndim == 0); if (__pyx_t_2) { /* "View.MemoryView":883 * if not is_slice: * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " */ __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); /* "View.MemoryView":882 * if suboffset >= 0: * if not is_slice: * if new_ndim == 0: # <<<<<<<<<<<<<< * dst.data = ( dst.data)[0] + suboffset * else: */ goto __pyx_L22; } /* "View.MemoryView":885 * dst.data = ( dst.data)[0] + suboffset * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< * "must be indexed and not sliced", dim) * else: */ /*else*/ { /* "View.MemoryView":886 * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< * else: * suboffset_dim[0] = new_ndim */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error) } __pyx_L22:; /* "View.MemoryView":881 * * if suboffset >= 0: * if not is_slice: # <<<<<<<<<<<<<< * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset */ goto __pyx_L21; } /* "View.MemoryView":888 * "must be indexed and not sliced", dim) * else: * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< * * return 0 */ /*else*/ { (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; } __pyx_L21:; /* "View.MemoryView":880 * dst.suboffsets[suboffset_dim[0]] += start * stride * * if suboffset >= 0: # <<<<<<<<<<<<<< * if not is_slice: * if new_ndim == 0: */ } /* "View.MemoryView":890 * suboffset_dim[0] = new_ndim * * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":793 * * @cname('__pyx_memoryview_slice_memviewslice') * cdef int slice_memviewslice( # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":896 * * @cname('__pyx_pybuffer_index') * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 */ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { Py_ssize_t __pyx_v_shape; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_v_suboffset; Py_ssize_t __pyx_v_itemsize; char *__pyx_v_resultp; char *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_UCS4 __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pybuffer_index", 1); /* "View.MemoryView":898 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< * cdef Py_ssize_t itemsize = view.itemsize * cdef char *resultp */ __pyx_v_suboffset = -1L; /* "View.MemoryView":899 * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< * cdef char *resultp * */ __pyx_t_1 = __pyx_v_view->itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":902 * cdef char *resultp * * if view.ndim == 0: # <<<<<<<<<<<<<< * shape = view.len // itemsize * stride = itemsize */ __pyx_t_2 = (__pyx_v_view->ndim == 0); if (__pyx_t_2) { /* "View.MemoryView":903 * * if view.ndim == 0: * shape = view.len // itemsize # <<<<<<<<<<<<<< * stride = itemsize * else: */ if (unlikely(__pyx_v_itemsize == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(1, 903, __pyx_L1_error) } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); __PYX_ERR(1, 903, __pyx_L1_error) } __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); /* "View.MemoryView":904 * if view.ndim == 0: * shape = view.len // itemsize * stride = itemsize # <<<<<<<<<<<<<< * else: * shape = view.shape[dim] */ __pyx_v_stride = __pyx_v_itemsize; /* "View.MemoryView":902 * cdef char *resultp * * if view.ndim == 0: # <<<<<<<<<<<<<< * shape = view.len // itemsize * stride = itemsize */ goto __pyx_L3; } /* "View.MemoryView":906 * stride = itemsize * else: * shape = view.shape[dim] # <<<<<<<<<<<<<< * stride = view.strides[dim] * if view.suboffsets != NULL: */ /*else*/ { __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); /* "View.MemoryView":907 * else: * shape = view.shape[dim] * stride = view.strides[dim] # <<<<<<<<<<<<<< * if view.suboffsets != NULL: * suboffset = view.suboffsets[dim] */ __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); /* "View.MemoryView":908 * shape = view.shape[dim] * stride = view.strides[dim] * if view.suboffsets != NULL: # <<<<<<<<<<<<<< * suboffset = view.suboffsets[dim] * */ __pyx_t_2 = (__pyx_v_view->suboffsets != NULL); if (__pyx_t_2) { /* "View.MemoryView":909 * stride = view.strides[dim] * if view.suboffsets != NULL: * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< * * if index < 0: */ __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); /* "View.MemoryView":908 * shape = view.shape[dim] * stride = view.strides[dim] * if view.suboffsets != NULL: # <<<<<<<<<<<<<< * suboffset = view.suboffsets[dim] * */ } } __pyx_L3:; /* "View.MemoryView":911 * suboffset = view.suboffsets[dim] * * if index < 0: # <<<<<<<<<<<<<< * index += view.shape[dim] * if index < 0: */ __pyx_t_2 = (__pyx_v_index < 0); if (__pyx_t_2) { /* "View.MemoryView":912 * * if index < 0: * index += view.shape[dim] # <<<<<<<<<<<<<< * if index < 0: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" */ __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); /* "View.MemoryView":913 * if index < 0: * index += view.shape[dim] * if index < 0: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ __pyx_t_2 = (__pyx_v_index < 0); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":914 * index += view.shape[dim] * if index < 0: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< * * if index >= shape: */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 127; __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_1 += 37; __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_1 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7); __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 914, __pyx_L1_error) /* "View.MemoryView":913 * if index < 0: * index += view.shape[dim] * if index < 0: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ } /* "View.MemoryView":911 * suboffset = view.suboffsets[dim] * * if index < 0: # <<<<<<<<<<<<<< * index += view.shape[dim] * if index < 0: */ } /* "View.MemoryView":916 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * if index >= shape: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":917 * * if index >= shape: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< * * resultp = bufp + index * stride */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_4 = 127; __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_1 += 37; __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_1 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7); __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 917, __pyx_L1_error) /* "View.MemoryView":916 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * if index >= shape: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ } /* "View.MemoryView":919 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * resultp = bufp + index * stride # <<<<<<<<<<<<<< * if suboffset >= 0: * resultp = ( resultp)[0] + suboffset */ __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); /* "View.MemoryView":920 * * resultp = bufp + index * stride * if suboffset >= 0: # <<<<<<<<<<<<<< * resultp = ( resultp)[0] + suboffset * */ __pyx_t_2 = (__pyx_v_suboffset >= 0); if (__pyx_t_2) { /* "View.MemoryView":921 * resultp = bufp + index * stride * if suboffset >= 0: * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< * * return resultp */ __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); /* "View.MemoryView":920 * * resultp = bufp + index * stride * if suboffset >= 0: # <<<<<<<<<<<<<< * resultp = ( resultp)[0] + suboffset * */ } /* "View.MemoryView":923 * resultp = ( resultp)[0] + suboffset * * return resultp # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_resultp; goto __pyx_L0; /* "View.MemoryView":896 * * @cname('__pyx_pybuffer_index') * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":929 * * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<< * cdef int ndim = memslice.memview.view.ndim * */ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { int __pyx_v_ndim; Py_ssize_t *__pyx_v_shape; Py_ssize_t *__pyx_v_strides; int __pyx_v_i; int __pyx_v_j; int __pyx_r; int __pyx_t_1; Py_ssize_t *__pyx_t_2; long __pyx_t_3; long __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":930 * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< * * cdef Py_ssize_t *shape = memslice.shape */ __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; __pyx_v_ndim = __pyx_t_1; /* "View.MemoryView":932 * cdef int ndim = memslice.memview.view.ndim * * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< * cdef Py_ssize_t *strides = memslice.strides * */ __pyx_t_2 = __pyx_v_memslice->shape; __pyx_v_shape = __pyx_t_2; /* "View.MemoryView":933 * * cdef Py_ssize_t *shape = memslice.shape * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_v_memslice->strides; __pyx_v_strides = __pyx_t_2; /* "View.MemoryView":937 * * cdef int i, j * for i in range(ndim // 2): # <<<<<<<<<<<<<< * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] */ __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2); __pyx_t_4 = __pyx_t_3; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":938 * cdef int i, j * for i in range(ndim // 2): * j = ndim - 1 - i # <<<<<<<<<<<<<< * strides[i], strides[j] = strides[j], strides[i] * shape[i], shape[j] = shape[j], shape[i] */ __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); /* "View.MemoryView":939 * for i in range(ndim // 2): * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< * shape[i], shape[j] = shape[j], shape[i] * */ __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; /* "View.MemoryView":940 * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: */ __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; /* "View.MemoryView":942 * shape[i], shape[j] = shape[j], shape[i] * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * */ __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0); if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0); __pyx_t_7 = __pyx_t_8; __pyx_L6_bool_binop_done:; if (__pyx_t_7) { /* "View.MemoryView":943 * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< * * return 0 */ __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error) /* "View.MemoryView":942 * shape[i], shape[j] = shape[j], shape[i] * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * */ } } /* "View.MemoryView":945 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":929 * * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<< * cdef int ndim = memslice.memview.view.ndim * */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":963 * cdef int (*to_dtype_func)(char *, object) except 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * */ /* Python wrapper */ static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { /* "View.MemoryView":964 * * def __dealloc__(self): * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< * * cdef convert_item_to_object(self, char *itemp): */ __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1); /* "View.MemoryView":963 * cdef int (*to_dtype_func)(char *, object) except 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * */ /* function exit code */ } /* "View.MemoryView":966 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * if self.to_object_func != NULL: * return self.to_object_func(itemp) */ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 1); /* "View.MemoryView":967 * * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: # <<<<<<<<<<<<<< * return self.to_object_func(itemp) * else: */ __pyx_t_1 = (__pyx_v_self->to_object_func != NULL); if (__pyx_t_1) { /* "View.MemoryView":968 * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: * return self.to_object_func(itemp) # <<<<<<<<<<<<<< * else: * return memoryview.convert_item_to_object(self, itemp) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":967 * * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: # <<<<<<<<<<<<<< * return self.to_object_func(itemp) * else: */ } /* "View.MemoryView":970 * return self.to_object_func(itemp) * else: * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< * * cdef assign_item_from_object(self, char *itemp, object value): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":966 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * if self.to_object_func != NULL: * return self.to_object_func(itemp) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":972 * return memoryview.convert_item_to_object(self, itemp) * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) */ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 1); /* "View.MemoryView":973 * * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< * self.to_dtype_func(itemp, value) * else: */ __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL); if (__pyx_t_1) { /* "View.MemoryView":974 * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< * else: * memoryview.assign_item_from_object(self, itemp, value) */ __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error) /* "View.MemoryView":973 * * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< * self.to_dtype_func(itemp, value) * else: */ goto __pyx_L3; } /* "View.MemoryView":976 * self.to_dtype_func(itemp, value) * else: * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< * * cdef _get_base(self): */ /*else*/ { __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "View.MemoryView":972 * return memoryview.convert_item_to_object(self, itemp) * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":978 * memoryview.assign_item_from_object(self, itemp, value) * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.from_object * */ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_base", 1); /* "View.MemoryView":979 * * cdef _get_base(self): * return self.from_object # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->from_object); __pyx_r = __pyx_v_self->from_object; goto __pyx_L0; /* "View.MemoryView":978 * memoryview.assign_item_from_object(self, itemp, value) * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.from_object * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":999 * * @cname('__pyx_memoryview_fromslice') * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< * int ndim, * object (*to_object_func)(char *), */ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; Py_ssize_t __pyx_v_suboffset; PyObject *__pyx_v_length = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_TypeInfo *__pyx_t_4; Py_buffer __pyx_t_5; Py_ssize_t *__pyx_t_6; Py_ssize_t *__pyx_t_7; Py_ssize_t *__pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_fromslice", 1); /* "View.MemoryView":1007 * cdef _memoryviewslice result * * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None); if (__pyx_t_1) { /* "View.MemoryView":1008 * * if memviewslice.memview == Py_None: * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "View.MemoryView":1007 * cdef _memoryviewslice result * * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< * return None * */ } /* "View.MemoryView":1013 * * * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<< * * result.from_slice = memviewslice */ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1015 * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) * * result.from_slice = memviewslice # <<<<<<<<<<<<<< * __PYX_INC_MEMVIEW(&memviewslice, 1) * */ __pyx_v_result->from_slice = __pyx_v_memviewslice; /* "View.MemoryView":1016 * * result.from_slice = memviewslice * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< * * result.from_object = ( memviewslice.memview)._get_base() */ __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); /* "View.MemoryView":1018 * __PYX_INC_MEMVIEW(&memviewslice, 1) * * result.from_object = ( memviewslice.memview)._get_base() # <<<<<<<<<<<<<< * result.typeinfo = memviewslice.memview.typeinfo * */ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_result->from_object); __Pyx_DECREF(__pyx_v_result->from_object); __pyx_v_result->from_object = __pyx_t_2; __pyx_t_2 = 0; /* "View.MemoryView":1019 * * result.from_object = ( memviewslice.memview)._get_base() * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< * * result.view = memviewslice.memview.view */ __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; /* "View.MemoryView":1021 * result.typeinfo = memviewslice.memview.typeinfo * * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< * result.view.buf = memviewslice.data * result.view.ndim = ndim */ __pyx_t_5 = __pyx_v_memviewslice.memview->view; __pyx_v_result->__pyx_base.view = __pyx_t_5; /* "View.MemoryView":1022 * * result.view = memviewslice.memview.view * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None */ __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); /* "View.MemoryView":1023 * result.view = memviewslice.memview.view * result.view.buf = memviewslice.data * result.view.ndim = ndim # <<<<<<<<<<<<<< * (<__pyx_buffer *> &result.view).obj = Py_None * Py_INCREF(Py_None) */ __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; /* "View.MemoryView":1024 * result.view.buf = memviewslice.data * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; /* "View.MemoryView":1025 * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * * if (memviewslice.memview).flags & PyBUF_WRITABLE: */ Py_INCREF(Py_None); /* "View.MemoryView":1027 * Py_INCREF(Py_None) * * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< * result.flags = PyBUF_RECORDS * else: */ __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); if (__pyx_t_1) { /* "View.MemoryView":1028 * * if (memviewslice.memview).flags & PyBUF_WRITABLE: * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< * else: * result.flags = PyBUF_RECORDS_RO */ __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; /* "View.MemoryView":1027 * Py_INCREF(Py_None) * * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< * result.flags = PyBUF_RECORDS * else: */ goto __pyx_L4; } /* "View.MemoryView":1030 * result.flags = PyBUF_RECORDS * else: * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< * * result.view.shape = result.from_slice.shape */ /*else*/ { __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; } __pyx_L4:; /* "View.MemoryView":1032 * result.flags = PyBUF_RECORDS_RO * * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< * result.view.strides = result.from_slice.strides * */ __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); /* "View.MemoryView":1033 * * result.view.shape = result.from_slice.shape * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< * * */ __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); /* "View.MemoryView":1036 * * * result.view.suboffsets = NULL # <<<<<<<<<<<<<< * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: */ __pyx_v_result->__pyx_base.view.suboffsets = NULL; /* "View.MemoryView":1037 * * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets */ __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { __pyx_t_6 = __pyx_t_8; __pyx_v_suboffset = (__pyx_t_6[0]); /* "View.MemoryView":1038 * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * result.view.suboffsets = result.from_slice.suboffsets * break */ __pyx_t_1 = (__pyx_v_suboffset >= 0); if (__pyx_t_1) { /* "View.MemoryView":1039 * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< * break * */ __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); /* "View.MemoryView":1040 * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets * break # <<<<<<<<<<<<<< * * result.view.len = result.view.itemsize */ goto __pyx_L6_break; /* "View.MemoryView":1038 * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * result.view.suboffsets = result.from_slice.suboffsets * break */ } } __pyx_L6_break:; /* "View.MemoryView":1042 * break * * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< * for length in result.view.shape[:ndim]: * result.view.len *= length */ __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; __pyx_v_result->__pyx_base.view.len = __pyx_t_9; /* "View.MemoryView":1043 * * result.view.len = result.view.itemsize * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< * result.view.len *= length * */ __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { __pyx_t_6 = __pyx_t_8; __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1044 * result.view.len = result.view.itemsize * for length in result.view.shape[:ndim]: * result.view.len *= length # <<<<<<<<<<<<<< * * result.to_object_func = to_object_func */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result->__pyx_base.view.len = __pyx_t_9; } /* "View.MemoryView":1046 * result.view.len *= length * * result.to_object_func = to_object_func # <<<<<<<<<<<<<< * result.to_dtype_func = to_dtype_func * */ __pyx_v_result->to_object_func = __pyx_v_to_object_func; /* "View.MemoryView":1047 * * result.to_object_func = to_object_func * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< * * return result */ __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; /* "View.MemoryView":1049 * result.to_dtype_func = to_dtype_func * * return result # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_get_slice_from_memoryview') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":999 * * @cname('__pyx_memoryview_fromslice') * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< * int ndim, * object (*to_object_func)(char *), */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_length); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1052 * * @cname('__pyx_memoryview_get_slice_from_memoryview') * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj */ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; __Pyx_memviewslice *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_slice_from_memview", 1); /* "View.MemoryView":1055 * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * obj = memview * return &obj.from_slice */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":1056 * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): * obj = memview # <<<<<<<<<<<<<< * return &obj.from_slice * else: */ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error) __pyx_t_2 = ((PyObject *)__pyx_v_memview); __Pyx_INCREF(__pyx_t_2); __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1057 * if isinstance(memview, _memoryviewslice): * obj = memview * return &obj.from_slice # <<<<<<<<<<<<<< * else: * slice_copy(memview, mslice) */ __pyx_r = (&__pyx_v_obj->from_slice); goto __pyx_L0; /* "View.MemoryView":1055 * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * obj = memview * return &obj.from_slice */ } /* "View.MemoryView":1059 * return &obj.from_slice * else: * slice_copy(memview, mslice) # <<<<<<<<<<<<<< * return mslice * */ /*else*/ { __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); /* "View.MemoryView":1060 * else: * slice_copy(memview, mslice) * return mslice # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_slice_copy') */ __pyx_r = __pyx_v_mslice; goto __pyx_L0; } /* "View.MemoryView":1052 * * @cname('__pyx_memoryview_get_slice_from_memoryview') * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1063 * * @cname('__pyx_memoryview_slice_copy') * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<< * cdef int dim * cdef (Py_ssize_t*) shape, strides, suboffsets */ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { int __pyx_v_dim; Py_ssize_t *__pyx_v_shape; Py_ssize_t *__pyx_v_strides; Py_ssize_t *__pyx_v_suboffsets; Py_ssize_t *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; /* "View.MemoryView":1067 * cdef (Py_ssize_t*) shape, strides, suboffsets * * shape = memview.view.shape # <<<<<<<<<<<<<< * strides = memview.view.strides * suboffsets = memview.view.suboffsets */ __pyx_t_1 = __pyx_v_memview->view.shape; __pyx_v_shape = __pyx_t_1; /* "View.MemoryView":1068 * * shape = memview.view.shape * strides = memview.view.strides # <<<<<<<<<<<<<< * suboffsets = memview.view.suboffsets * */ __pyx_t_1 = __pyx_v_memview->view.strides; __pyx_v_strides = __pyx_t_1; /* "View.MemoryView":1069 * shape = memview.view.shape * strides = memview.view.strides * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< * * dst.memview = <__pyx_memoryview *> memview */ __pyx_t_1 = __pyx_v_memview->view.suboffsets; __pyx_v_suboffsets = __pyx_t_1; /* "View.MemoryView":1071 * suboffsets = memview.view.suboffsets * * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< * dst.data = memview.view.buf * */ __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); /* "View.MemoryView":1072 * * dst.memview = <__pyx_memoryview *> memview * dst.data = memview.view.buf # <<<<<<<<<<<<<< * * for dim in range(memview.view.ndim): */ __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); /* "View.MemoryView":1074 * dst.data = memview.view.buf * * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] */ __pyx_t_2 = __pyx_v_memview->view.ndim; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_dim = __pyx_t_4; /* "View.MemoryView":1075 * * for dim in range(memview.view.ndim): * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< * dst.strides[dim] = strides[dim] * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 */ (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); /* "View.MemoryView":1076 * for dim in range(memview.view.ndim): * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 * */ (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); /* "View.MemoryView":1077 * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_object') */ __pyx_t_6 = (__pyx_v_suboffsets != 0); if (__pyx_t_6) { __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); } else { __pyx_t_5 = -1L; } (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; } /* "View.MemoryView":1063 * * @cname('__pyx_memoryview_slice_copy') * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<< * cdef int dim * cdef (Py_ssize_t*) shape, strides, suboffsets */ /* function exit code */ } /* "View.MemoryView":1080 * * @cname('__pyx_memoryview_copy_object') * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice */ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { __Pyx_memviewslice __pyx_v_memviewslice; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy", 1); /* "View.MemoryView":1083 * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< * return memoryview_copy_from_slice(memview, &memviewslice) * */ __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); /* "View.MemoryView":1084 * cdef __Pyx_memviewslice memviewslice * slice_copy(memview, &memviewslice) * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_object_from_slice') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":1080 * * @cname('__pyx_memoryview_copy_object') * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1087 * * @cname('__pyx_memoryview_copy_object_from_slice') * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< * """ * Create a new memoryview object from a given memoryview object and slice. */ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { PyObject *(*__pyx_v_to_object_func)(char *); int (*__pyx_v_to_dtype_func)(char *, PyObject *); PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *(*__pyx_t_2)(char *); int (*__pyx_t_3)(char *, PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1); /* "View.MemoryView":1094 * cdef int (*to_dtype_func)(char *, object) except 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":1095 * * if isinstance(memview, _memoryviewslice): * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func * else: */ __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; __pyx_v_to_object_func = __pyx_t_2; /* "View.MemoryView":1096 * if isinstance(memview, _memoryviewslice): * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< * else: * to_object_func = NULL */ __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; __pyx_v_to_dtype_func = __pyx_t_3; /* "View.MemoryView":1094 * cdef int (*to_dtype_func)(char *, object) except 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func */ goto __pyx_L3; } /* "View.MemoryView":1098 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func * else: * to_object_func = NULL # <<<<<<<<<<<<<< * to_dtype_func = NULL * */ /*else*/ { __pyx_v_to_object_func = NULL; /* "View.MemoryView":1099 * else: * to_object_func = NULL * to_dtype_func = NULL # <<<<<<<<<<<<<< * * return memoryview_fromslice(memviewslice[0], memview.view.ndim, */ __pyx_v_to_dtype_func = NULL; } __pyx_L3:; /* "View.MemoryView":1101 * to_dtype_func = NULL * * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< * to_object_func, to_dtype_func, * memview.dtype_is_object) */ __Pyx_XDECREF(__pyx_r); /* "View.MemoryView":1103 * return memoryview_fromslice(memviewslice[0], memview.view.ndim, * to_object_func, to_dtype_func, * memview.dtype_is_object) # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "View.MemoryView":1087 * * @cname('__pyx_memoryview_copy_object_from_slice') * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< * """ * Create a new memoryview object from a given memoryview object and slice. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1109 * * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< * return -arg if arg < 0 else arg * */ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { Py_ssize_t __pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; /* "View.MemoryView":1110 * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: * return -arg if arg < 0 else arg # <<<<<<<<<<<<<< * * @cname('__pyx_get_best_slice_order') */ __pyx_t_2 = (__pyx_v_arg < 0); if (__pyx_t_2) { __pyx_t_1 = (-__pyx_v_arg); } else { __pyx_t_1 = __pyx_v_arg; } __pyx_r = __pyx_t_1; goto __pyx_L0; /* "View.MemoryView":1109 * * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< * return -arg if arg < 0 else arg * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1113 * * @cname('__pyx_get_best_slice_order') * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * """ * Figure out the best memory access order for a given slice. */ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { int __pyx_v_i; Py_ssize_t __pyx_v_c_stride; Py_ssize_t __pyx_v_f_stride; char __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1118 * """ * cdef int i * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t f_stride = 0 * */ __pyx_v_c_stride = 0; /* "View.MemoryView":1119 * cdef int i * cdef Py_ssize_t c_stride = 0 * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< * * for i in range(ndim - 1, -1, -1): */ __pyx_v_f_stride = 0; /* "View.MemoryView":1121 * cdef Py_ssize_t f_stride = 0 * * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] */ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":1122 * * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * c_stride = mslice.strides[i] * break */ __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); if (__pyx_t_2) { /* "View.MemoryView":1123 * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< * break * */ __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1124 * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] * break # <<<<<<<<<<<<<< * * for i in range(ndim): */ goto __pyx_L4_break; /* "View.MemoryView":1122 * * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * c_stride = mslice.strides[i] * break */ } } __pyx_L4_break:; /* "View.MemoryView":1126 * break * * for i in range(ndim): # <<<<<<<<<<<<<< * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] */ __pyx_t_1 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_1; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1127 * * for i in range(ndim): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * f_stride = mslice.strides[i] * break */ __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); if (__pyx_t_2) { /* "View.MemoryView":1128 * for i in range(ndim): * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< * break * */ __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1129 * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] * break # <<<<<<<<<<<<<< * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): */ goto __pyx_L7_break; /* "View.MemoryView":1127 * * for i in range(ndim): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * f_stride = mslice.strides[i] * break */ } } __pyx_L7_break:; /* "View.MemoryView":1131 * break * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< * return 'C' * else: */ __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)); if (__pyx_t_2) { /* "View.MemoryView":1132 * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): * return 'C' # <<<<<<<<<<<<<< * else: * return 'F' */ __pyx_r = 'C'; goto __pyx_L0; /* "View.MemoryView":1131 * break * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< * return 'C' * else: */ } /* "View.MemoryView":1134 * return 'C' * else: * return 'F' # <<<<<<<<<<<<<< * * @cython.cdivision(True) */ /*else*/ { __pyx_r = 'F'; goto __pyx_L0; } /* "View.MemoryView":1113 * * @cname('__pyx_get_best_slice_order') * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * """ * Figure out the best memory access order for a given slice. */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1137 * * @cython.cdivision(True) * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< * char *dst_data, Py_ssize_t *dst_strides, * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, */ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; Py_ssize_t __pyx_v_dst_extent; Py_ssize_t __pyx_v_src_stride; Py_ssize_t __pyx_v_dst_stride; int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; /* "View.MemoryView":1144 * * cdef Py_ssize_t i * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] */ __pyx_v_src_extent = (__pyx_v_src_shape[0]); /* "View.MemoryView":1145 * cdef Py_ssize_t i * cdef Py_ssize_t src_extent = src_shape[0] * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t src_stride = src_strides[0] * cdef Py_ssize_t dst_stride = dst_strides[0] */ __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); /* "View.MemoryView":1146 * cdef Py_ssize_t src_extent = src_shape[0] * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t dst_stride = dst_strides[0] * */ __pyx_v_src_stride = (__pyx_v_src_strides[0]); /* "View.MemoryView":1147 * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< * * if ndim == 1: */ __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); /* "View.MemoryView":1149 * cdef Py_ssize_t dst_stride = dst_strides[0] * * if ndim == 1: # <<<<<<<<<<<<<< * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): */ __pyx_t_1 = (__pyx_v_ndim == 1); if (__pyx_t_1) { /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ __pyx_t_2 = (__pyx_v_src_stride > 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = (__pyx_v_dst_stride > 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } /* "View.MemoryView":1151 * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< * memcpy(dst_data, src_data, itemsize * dst_extent) * else: */ __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); if (__pyx_t_2) { __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); } __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ if (__pyx_t_1) { /* "View.MemoryView":1152 * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< * else: * for i in range(dst_extent): */ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ goto __pyx_L4; } /* "View.MemoryView":1154 * memcpy(dst_data, src_data, itemsize * dst_extent) * else: * for i in range(dst_extent): # <<<<<<<<<<<<<< * memcpy(dst_data, src_data, itemsize) * src_data += src_stride */ /*else*/ { __pyx_t_3 = __pyx_v_dst_extent; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "View.MemoryView":1155 * else: * for i in range(dst_extent): * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< * src_data += src_stride * dst_data += dst_stride */ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); /* "View.MemoryView":1156 * for i in range(dst_extent): * memcpy(dst_data, src_data, itemsize) * src_data += src_stride # <<<<<<<<<<<<<< * dst_data += dst_stride * else: */ __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); /* "View.MemoryView":1157 * memcpy(dst_data, src_data, itemsize) * src_data += src_stride * dst_data += dst_stride # <<<<<<<<<<<<<< * else: * for i in range(dst_extent): */ __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); } } __pyx_L4:; /* "View.MemoryView":1149 * cdef Py_ssize_t dst_stride = dst_strides[0] * * if ndim == 1: # <<<<<<<<<<<<<< * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): */ goto __pyx_L3; } /* "View.MemoryView":1159 * dst_data += dst_stride * else: * for i in range(dst_extent): # <<<<<<<<<<<<<< * _copy_strided_to_strided(src_data, src_strides + 1, * dst_data, dst_strides + 1, */ /*else*/ { __pyx_t_3 = __pyx_v_dst_extent; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "View.MemoryView":1160 * else: * for i in range(dst_extent): * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< * dst_data, dst_strides + 1, * src_shape + 1, dst_shape + 1, */ _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); /* "View.MemoryView":1164 * src_shape + 1, dst_shape + 1, * ndim - 1, itemsize) * src_data += src_stride # <<<<<<<<<<<<<< * dst_data += dst_stride * */ __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); /* "View.MemoryView":1165 * ndim - 1, itemsize) * src_data += src_stride * dst_data += dst_stride # <<<<<<<<<<<<<< * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, */ __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); } } __pyx_L3:; /* "View.MemoryView":1137 * * @cython.cdivision(True) * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< * char *dst_data, Py_ssize_t *dst_strides, * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, */ /* function exit code */ } /* "View.MemoryView":1167 * dst_data += dst_stride * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: */ static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { /* "View.MemoryView":1170 * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< * src.shape, dst.shape, ndim, itemsize) * */ _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); /* "View.MemoryView":1167 * dst_data += dst_stride * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1174 * * @cname('__pyx_memoryview_slice_get_size') * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize */ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { Py_ssize_t __pyx_v_shape; Py_ssize_t __pyx_v_size; Py_ssize_t __pyx_r; Py_ssize_t __pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; /* "View.MemoryView":1176 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<< * * for shape in src.shape[:ndim]: */ __pyx_t_1 = __pyx_v_src->memview->view.itemsize; __pyx_v_size = __pyx_t_1; /* "View.MemoryView":1178 * cdef Py_ssize_t shape, size = src.memview.view.itemsize * * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<< * size *= shape * */ __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim); for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_v_shape = (__pyx_t_2[0]); /* "View.MemoryView":1179 * * for shape in src.shape[:ndim]: * size *= shape # <<<<<<<<<<<<<< * * return size */ __pyx_v_size = (__pyx_v_size * __pyx_v_shape); } /* "View.MemoryView":1181 * size *= shape * * return size # <<<<<<<<<<<<<< * * @cname('__pyx_fill_contig_strides_array') */ __pyx_r = __pyx_v_size; goto __pyx_L0; /* "View.MemoryView":1174 * * @cname('__pyx_memoryview_slice_get_size') * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1184 * * @cname('__pyx_fill_contig_strides_array') * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, * int ndim, char order) noexcept nogil: */ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { int __pyx_v_idx; Py_ssize_t __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1193 * cdef int idx * * if order == 'F': # <<<<<<<<<<<<<< * for idx in range(ndim): * strides[idx] = stride */ __pyx_t_1 = (__pyx_v_order == 'F'); if (__pyx_t_1) { /* "View.MemoryView":1194 * * if order == 'F': * for idx in range(ndim): # <<<<<<<<<<<<<< * strides[idx] = stride * stride *= shape[idx] */ __pyx_t_2 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_idx = __pyx_t_4; /* "View.MemoryView":1195 * if order == 'F': * for idx in range(ndim): * strides[idx] = stride # <<<<<<<<<<<<<< * stride *= shape[idx] * else: */ (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; /* "View.MemoryView":1196 * for idx in range(ndim): * strides[idx] = stride * stride *= shape[idx] # <<<<<<<<<<<<<< * else: * for idx in range(ndim - 1, -1, -1): */ __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); } /* "View.MemoryView":1193 * cdef int idx * * if order == 'F': # <<<<<<<<<<<<<< * for idx in range(ndim): * strides[idx] = stride */ goto __pyx_L3; } /* "View.MemoryView":1198 * stride *= shape[idx] * else: * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * strides[idx] = stride * stride *= shape[idx] */ /*else*/ { for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { __pyx_v_idx = __pyx_t_2; /* "View.MemoryView":1199 * else: * for idx in range(ndim - 1, -1, -1): * strides[idx] = stride # <<<<<<<<<<<<<< * stride *= shape[idx] * */ (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; /* "View.MemoryView":1200 * for idx in range(ndim - 1, -1, -1): * strides[idx] = stride * stride *= shape[idx] # <<<<<<<<<<<<<< * * return stride */ __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); } } __pyx_L3:; /* "View.MemoryView":1202 * stride *= shape[idx] * * return stride # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_data_to_temp') */ __pyx_r = __pyx_v_stride; goto __pyx_L0; /* "View.MemoryView":1184 * * @cname('__pyx_fill_contig_strides_array') * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, * int ndim, char order) noexcept nogil: */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1205 * * @cname('__pyx_memoryview_copy_data_to_temp') * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *tmpslice, * char order, */ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { int __pyx_v_i; void *__pyx_v_result; size_t __pyx_v_itemsize; size_t __pyx_v_size; void *__pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; struct __pyx_memoryview_obj *__pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":1216 * cdef void *result * * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< * cdef size_t size = slice_get_size(src, ndim) * */ __pyx_t_1 = __pyx_v_src->memview->view.itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":1217 * * cdef size_t itemsize = src.memview.view.itemsize * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< * * result = malloc(size) */ __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); /* "View.MemoryView":1219 * cdef size_t size = slice_get_size(src, ndim) * * result = malloc(size) # <<<<<<<<<<<<<< * if not result: * _err_no_memory() */ __pyx_v_result = malloc(__pyx_v_size); /* "View.MemoryView":1220 * * result = malloc(size) * if not result: # <<<<<<<<<<<<<< * _err_no_memory() * */ __pyx_t_2 = (!(__pyx_v_result != 0)); if (__pyx_t_2) { /* "View.MemoryView":1221 * result = malloc(size) * if not result: * _err_no_memory() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error) /* "View.MemoryView":1220 * * result = malloc(size) * if not result: # <<<<<<<<<<<<<< * _err_no_memory() * */ } /* "View.MemoryView":1224 * * * tmpslice.data = result # <<<<<<<<<<<<<< * tmpslice.memview = src.memview * for i in range(ndim): */ __pyx_v_tmpslice->data = ((char *)__pyx_v_result); /* "View.MemoryView":1225 * * tmpslice.data = result * tmpslice.memview = src.memview # <<<<<<<<<<<<<< * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] */ __pyx_t_4 = __pyx_v_src->memview; __pyx_v_tmpslice->memview = __pyx_t_4; /* "View.MemoryView":1226 * tmpslice.data = result * tmpslice.memview = src.memview * for i in range(ndim): # <<<<<<<<<<<<<< * tmpslice.shape[i] = src.shape[i] * tmpslice.suboffsets[i] = -1 */ __pyx_t_3 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_3; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "View.MemoryView":1227 * tmpslice.memview = src.memview * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< * tmpslice.suboffsets[i] = -1 * */ (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); /* "View.MemoryView":1228 * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< * * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) */ (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; } /* "View.MemoryView":1230 * tmpslice.suboffsets[i] = -1 * * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) # <<<<<<<<<<<<<< * * */ (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); /* "View.MemoryView":1233 * * * for i in range(ndim): # <<<<<<<<<<<<<< * if tmpslice.shape[i] == 1: * tmpslice.strides[i] = 0 */ __pyx_t_3 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_3; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "View.MemoryView":1234 * * for i in range(ndim): * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< * tmpslice.strides[i] = 0 * */ __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1); if (__pyx_t_2) { /* "View.MemoryView":1235 * for i in range(ndim): * if tmpslice.shape[i] == 1: * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< * * if slice_is_contig(src[0], order, ndim): */ (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; /* "View.MemoryView":1234 * * for i in range(ndim): * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< * tmpslice.strides[i] = 0 * */ } } /* "View.MemoryView":1237 * tmpslice.strides[i] = 0 * * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< * memcpy(result, src.data, size) * else: */ __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1238 * * if slice_is_contig(src[0], order, ndim): * memcpy(result, src.data, size) # <<<<<<<<<<<<<< * else: * copy_strided_to_strided(src, tmpslice, ndim, itemsize) */ (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); /* "View.MemoryView":1237 * tmpslice.strides[i] = 0 * * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< * memcpy(result, src.data, size) * else: */ goto __pyx_L9; } /* "View.MemoryView":1240 * memcpy(result, src.data, size) * else: * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< * * return result */ /*else*/ { copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); } __pyx_L9:; /* "View.MemoryView":1242 * copy_strided_to_strided(src, tmpslice, ndim, itemsize) * * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "View.MemoryView":1205 * * @cname('__pyx_memoryview_copy_data_to_temp') * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *tmpslice, * char order, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1247 * * @cname('__pyx_memoryview_err_extents') * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" */ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err_extents", 0); /* "View.MemoryView":1249 * cdef int _err_extents(int i, Py_ssize_t extent1, * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err_dim') */ __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi); __pyx_t_2 += 35; __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi); __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_got); __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_got); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got); __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_and); __pyx_t_2 += 5; __Pyx_GIVEREF(__pyx_kp_u_and); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and); __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1249, __pyx_L1_error) /* "View.MemoryView":1247 * * @cname('__pyx_memoryview_err_extents') * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1252 * * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg % dim * */ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err_dim", 0); __Pyx_INCREF(__pyx_v_msg); /* "View.MemoryView":1253 * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: * raise error, msg % dim # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err') */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1253, __pyx_L1_error) /* "View.MemoryView":1252 * * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg % dim * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1256 * * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg * */ static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err", 0); __Pyx_INCREF(__pyx_v_msg); /* "View.MemoryView":1257 * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: * raise error, msg # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err_no_memory') */ __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0); __PYX_ERR(1, 1257, __pyx_L1_error) /* "View.MemoryView":1256 * * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1260 * * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<< * raise MemoryError * */ static int __pyx_memoryview_err_no_memory(void) { int __pyx_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /* "View.MemoryView":1261 * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: * raise MemoryError # <<<<<<<<<<<<<< * * */ PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error) /* "View.MemoryView":1260 * * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<< * raise MemoryError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1265 * * @cname('__pyx_memoryview_copy_contents') * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< * __Pyx_memviewslice dst, * int src_ndim, int dst_ndim, */ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { void *__pyx_v_tmpdata; size_t __pyx_v_itemsize; int __pyx_v_i; char __pyx_v_order; int __pyx_v_broadcasting; int __pyx_v_direct_copy; __Pyx_memviewslice __pyx_v_tmp; int __pyx_v_ndim; int __pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; void *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":1273 * Check for overlapping memory and verify the shapes. * """ * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< * cdef size_t itemsize = src.memview.view.itemsize * cdef int i */ __pyx_v_tmpdata = NULL; /* "View.MemoryView":1274 * """ * cdef void *tmpdata = NULL * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< * cdef int i * cdef char order = get_best_order(&src, src_ndim) */ __pyx_t_1 = __pyx_v_src.memview->view.itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":1276 * cdef size_t itemsize = src.memview.view.itemsize * cdef int i * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< * cdef bint broadcasting = False * cdef bint direct_copy = False */ __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); /* "View.MemoryView":1277 * cdef int i * cdef char order = get_best_order(&src, src_ndim) * cdef bint broadcasting = False # <<<<<<<<<<<<<< * cdef bint direct_copy = False * cdef __Pyx_memviewslice tmp */ __pyx_v_broadcasting = 0; /* "View.MemoryView":1278 * cdef char order = get_best_order(&src, src_ndim) * cdef bint broadcasting = False * cdef bint direct_copy = False # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice tmp * */ __pyx_v_direct_copy = 0; /* "View.MemoryView":1281 * cdef __Pyx_memviewslice tmp * * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: */ __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim); if (__pyx_t_2) { /* "View.MemoryView":1282 * * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< * elif dst_ndim < src_ndim: * broadcast_leading(&dst, dst_ndim, src_ndim) */ __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); /* "View.MemoryView":1281 * cdef __Pyx_memviewslice tmp * * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: */ goto __pyx_L3; } /* "View.MemoryView":1283 * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&dst, dst_ndim, src_ndim) * */ __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim); if (__pyx_t_2) { /* "View.MemoryView":1284 * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< * * cdef int ndim = max(src_ndim, dst_ndim) */ __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); /* "View.MemoryView":1283 * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&dst, dst_ndim, src_ndim) * */ } __pyx_L3:; /* "View.MemoryView":1286 * broadcast_leading(&dst, dst_ndim, src_ndim) * * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< * * for i in range(ndim): */ __pyx_t_3 = __pyx_v_dst_ndim; __pyx_t_4 = __pyx_v_src_ndim; __pyx_t_2 = (__pyx_t_3 > __pyx_t_4); if (__pyx_t_2) { __pyx_t_5 = __pyx_t_3; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_ndim = __pyx_t_5; /* "View.MemoryView":1288 * cdef int ndim = max(src_ndim, dst_ndim) * * for i in range(ndim): # <<<<<<<<<<<<<< * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: */ __pyx_t_5 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_5; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1289 * * for i in range(ndim): * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< * if src.shape[i] == 1: * broadcasting = True */ __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])); if (__pyx_t_2) { /* "View.MemoryView":1290 * for i in range(ndim): * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: # <<<<<<<<<<<<<< * broadcasting = True * src.strides[i] = 0 */ __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1); if (__pyx_t_2) { /* "View.MemoryView":1291 * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: * broadcasting = True # <<<<<<<<<<<<<< * src.strides[i] = 0 * else: */ __pyx_v_broadcasting = 1; /* "View.MemoryView":1292 * if src.shape[i] == 1: * broadcasting = True * src.strides[i] = 0 # <<<<<<<<<<<<<< * else: * _err_extents(i, dst.shape[i], src.shape[i]) */ (__pyx_v_src.strides[__pyx_v_i]) = 0; /* "View.MemoryView":1290 * for i in range(ndim): * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: # <<<<<<<<<<<<<< * broadcasting = True * src.strides[i] = 0 */ goto __pyx_L7; } /* "View.MemoryView":1294 * src.strides[i] = 0 * else: * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< * * if src.suboffsets[i] >= 0: */ /*else*/ { __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error) } __pyx_L7:; /* "View.MemoryView":1289 * * for i in range(ndim): * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< * if src.shape[i] == 1: * broadcasting = True */ } /* "View.MemoryView":1296 * _err_extents(i, dst.shape[i], src.shape[i]) * * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * */ __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0); if (__pyx_t_2) { /* "View.MemoryView":1297 * * if src.suboffsets[i] >= 0: * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< * * if slices_overlap(&src, &dst, ndim, itemsize): */ __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error) /* "View.MemoryView":1296 * _err_extents(i, dst.shape[i], src.shape[i]) * * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * */ } } /* "View.MemoryView":1299 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< * * if not slice_is_contig(src, order, ndim): */ __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); if (__pyx_t_2) { /* "View.MemoryView":1301 * if slices_overlap(&src, &dst, ndim, itemsize): * * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< * order = get_best_order(&dst, ndim) * */ __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim)); if (__pyx_t_2) { /* "View.MemoryView":1302 * * if not slice_is_contig(src, order, ndim): * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) */ __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); /* "View.MemoryView":1301 * if slices_overlap(&src, &dst, ndim, itemsize): * * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< * order = get_best_order(&dst, ndim) * */ } /* "View.MemoryView":1304 * order = get_best_order(&dst, ndim) * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< * src = tmp * */ __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error) __pyx_v_tmpdata = __pyx_t_7; /* "View.MemoryView":1305 * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) * src = tmp # <<<<<<<<<<<<<< * * if not broadcasting: */ __pyx_v_src = __pyx_v_tmp; /* "View.MemoryView":1299 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< * * if not slice_is_contig(src, order, ndim): */ } /* "View.MemoryView":1307 * src = tmp * * if not broadcasting: # <<<<<<<<<<<<<< * * */ __pyx_t_2 = (!__pyx_v_broadcasting); if (__pyx_t_2) { /* "View.MemoryView":1310 * * * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): */ __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1311 * * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< * elif slice_is_contig(src, 'F', ndim): * direct_copy = slice_is_contig(dst, 'F', ndim) */ __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); /* "View.MemoryView":1310 * * * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): */ goto __pyx_L12; } /* "View.MemoryView":1312 * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'F', ndim) * */ __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1313 * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< * * if direct_copy: */ __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); /* "View.MemoryView":1312 * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'F', ndim) * */ } __pyx_L12:; /* "View.MemoryView":1315 * direct_copy = slice_is_contig(dst, 'F', ndim) * * if direct_copy: # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ if (__pyx_v_direct_copy) { /* "View.MemoryView":1317 * if direct_copy: * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1318 * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) */ (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); /* "View.MemoryView":1319 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * free(tmpdata) * return 0 */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1320 * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) # <<<<<<<<<<<<<< * return 0 * */ free(__pyx_v_tmpdata); /* "View.MemoryView":1321 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) * return 0 # <<<<<<<<<<<<<< * * if order == 'F' == get_best_order(&dst, ndim): */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":1315 * direct_copy = slice_is_contig(dst, 'F', ndim) * * if direct_copy: # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ } /* "View.MemoryView":1307 * src = tmp * * if not broadcasting: # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":1323 * return 0 * * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< * * */ __pyx_t_2 = (__pyx_v_order == 'F'); if (__pyx_t_2) { __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); } if (__pyx_t_2) { /* "View.MemoryView":1326 * * * transpose_memslice(&src) # <<<<<<<<<<<<<< * transpose_memslice(&dst) * */ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error) /* "View.MemoryView":1327 * * transpose_memslice(&src) * transpose_memslice(&dst) # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error) /* "View.MemoryView":1323 * return 0 * * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":1329 * transpose_memslice(&dst) * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * copy_strided_to_strided(&src, &dst, ndim, itemsize) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1330 * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * */ copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); /* "View.MemoryView":1331 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * copy_strided_to_strided(&src, &dst, ndim, itemsize) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * * free(tmpdata) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1333 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * * free(tmpdata) # <<<<<<<<<<<<<< * return 0 * */ free(__pyx_v_tmpdata); /* "View.MemoryView":1334 * * free(tmpdata) * return 0 # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_broadcast_leading') */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":1265 * * @cname('__pyx_memoryview_copy_contents') * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< * __Pyx_memviewslice dst, * int src_ndim, int dst_ndim, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1337 * * @cname('__pyx_memoryview_broadcast_leading') * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< * int ndim, * int ndim_other) noexcept nogil: */ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { int __pyx_v_i; int __pyx_v_offset; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; /* "View.MemoryView":1341 * int ndim_other) noexcept nogil: * cdef int i * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< * * for i in range(ndim - 1, -1, -1): */ __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); /* "View.MemoryView":1343 * cdef int offset = ndim_other - ndim * * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] */ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":1344 * * for i in range(ndim - 1, -1, -1): * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< * mslice.strides[i + offset] = mslice.strides[i] * mslice.suboffsets[i + offset] = mslice.suboffsets[i] */ (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); /* "View.MemoryView":1345 * for i in range(ndim - 1, -1, -1): * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< * mslice.suboffsets[i + offset] = mslice.suboffsets[i] * */ (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1346 * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< * * for i in range(offset): */ (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); } /* "View.MemoryView":1348 * mslice.suboffsets[i + offset] = mslice.suboffsets[i] * * for i in range(offset): # <<<<<<<<<<<<<< * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] */ __pyx_t_1 = __pyx_v_offset; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "View.MemoryView":1349 * * for i in range(offset): * mslice.shape[i] = 1 # <<<<<<<<<<<<<< * mslice.strides[i] = mslice.strides[0] * mslice.suboffsets[i] = -1 */ (__pyx_v_mslice->shape[__pyx_v_i]) = 1; /* "View.MemoryView":1350 * for i in range(offset): * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< * mslice.suboffsets[i] = -1 * */ (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); /* "View.MemoryView":1351 * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< * * */ (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; } /* "View.MemoryView":1337 * * @cname('__pyx_memoryview_broadcast_leading') * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< * int ndim, * int ndim_other) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1359 * * @cname('__pyx_memoryview_refcount_copying') * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<< * * if dtype_is_object: */ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { /* "View.MemoryView":1361 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: * * if dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) * */ if (__pyx_v_dtype_is_object) { /* "View.MemoryView":1362 * * if dtype_is_object: * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') */ __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); /* "View.MemoryView":1361 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: * * if dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) * */ } /* "View.MemoryView":1359 * * @cname('__pyx_memoryview_refcount_copying') * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<< * * if dtype_is_object: */ /* function exit code */ } /* "View.MemoryView":1365 * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: */ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /* "View.MemoryView":1368 * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_refcount_objects_in_slice') */ __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); /* "View.MemoryView":1365 * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: */ /* function exit code */ #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } /* "View.MemoryView":1371 * * @cname('__pyx_memoryview_refcount_objects_in_slice') * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i */ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1374 * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< * * for i in range(shape[0]): */ __pyx_v_stride = (__pyx_v_strides[0]); /* "View.MemoryView":1376 * cdef Py_ssize_t stride = strides[0] * * for i in range(shape[0]): # <<<<<<<<<<<<<< * if ndim == 1: * if inc: */ __pyx_t_1 = (__pyx_v_shape[0]); __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "View.MemoryView":1377 * * for i in range(shape[0]): * if ndim == 1: # <<<<<<<<<<<<<< * if inc: * Py_INCREF(( data)[0]) */ __pyx_t_4 = (__pyx_v_ndim == 1); if (__pyx_t_4) { /* "View.MemoryView":1378 * for i in range(shape[0]): * if ndim == 1: * if inc: # <<<<<<<<<<<<<< * Py_INCREF(( data)[0]) * else: */ if (__pyx_v_inc) { /* "View.MemoryView":1379 * if ndim == 1: * if inc: * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< * else: * Py_DECREF(( data)[0]) */ Py_INCREF((((PyObject **)__pyx_v_data)[0])); /* "View.MemoryView":1378 * for i in range(shape[0]): * if ndim == 1: * if inc: # <<<<<<<<<<<<<< * Py_INCREF(( data)[0]) * else: */ goto __pyx_L6; } /* "View.MemoryView":1381 * Py_INCREF(( data)[0]) * else: * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< * else: * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) */ /*else*/ { Py_DECREF((((PyObject **)__pyx_v_data)[0])); } __pyx_L6:; /* "View.MemoryView":1377 * * for i in range(shape[0]): * if ndim == 1: # <<<<<<<<<<<<<< * if inc: * Py_INCREF(( data)[0]) */ goto __pyx_L5; } /* "View.MemoryView":1383 * Py_DECREF(( data)[0]) * else: * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<< * * data += stride */ /*else*/ { __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); } __pyx_L5:; /* "View.MemoryView":1385 * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) * * data += stride # <<<<<<<<<<<<<< * * */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } /* "View.MemoryView":1371 * * @cname('__pyx_memoryview_refcount_objects_in_slice') * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i */ /* function exit code */ } /* "View.MemoryView":1391 * * @cname('__pyx_memoryview_slice_assign_scalar') * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: */ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { /* "View.MemoryView":1394 * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) * refcount_copying(dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1395 * bint dtype_is_object) noexcept nogil: * refcount_copying(dst, dtype_is_object, ndim, inc=False) * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<< * refcount_copying(dst, dtype_is_object, ndim, inc=True) * */ __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); /* "View.MemoryView":1396 * refcount_copying(dst, dtype_is_object, ndim, inc=False) * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * * */ __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1391 * * @cname('__pyx_memoryview_slice_assign_scalar') * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1400 * * @cname('__pyx_memoryview__slice_assign_scalar') * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * size_t itemsize, void *item) noexcept nogil: */ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_v_extent; int __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; /* "View.MemoryView":1404 * size_t itemsize, void *item) noexcept nogil: * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t extent = shape[0] * */ __pyx_v_stride = (__pyx_v_strides[0]); /* "View.MemoryView":1405 * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< * * if ndim == 1: */ __pyx_v_extent = (__pyx_v_shape[0]); /* "View.MemoryView":1407 * cdef Py_ssize_t extent = shape[0] * * if ndim == 1: # <<<<<<<<<<<<<< * for i in range(extent): * memcpy(data, item, itemsize) */ __pyx_t_1 = (__pyx_v_ndim == 1); if (__pyx_t_1) { /* "View.MemoryView":1408 * * if ndim == 1: * for i in range(extent): # <<<<<<<<<<<<<< * memcpy(data, item, itemsize) * data += stride */ __pyx_t_2 = __pyx_v_extent; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1409 * if ndim == 1: * for i in range(extent): * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< * data += stride * else: */ (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); /* "View.MemoryView":1410 * for i in range(extent): * memcpy(data, item, itemsize) * data += stride # <<<<<<<<<<<<<< * else: * for i in range(extent): */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } /* "View.MemoryView":1407 * cdef Py_ssize_t extent = shape[0] * * if ndim == 1: # <<<<<<<<<<<<<< * for i in range(extent): * memcpy(data, item, itemsize) */ goto __pyx_L3; } /* "View.MemoryView":1412 * data += stride * else: * for i in range(extent): # <<<<<<<<<<<<<< * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) * data += stride */ /*else*/ { __pyx_t_2 = __pyx_v_extent; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1413 * else: * for i in range(extent): * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<< * data += stride * */ __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); /* "View.MemoryView":1414 * for i in range(extent): * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) * data += stride # <<<<<<<<<<<<<< * * */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } } __pyx_L3:; /* "View.MemoryView":1400 * * @cname('__pyx_memoryview__slice_assign_scalar') * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * size_t itemsize, void *item) noexcept nogil: */ /* function exit code */ } /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v___pyx_PickleError = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum # <<<<<<<<<<<<<< * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v___pyx_result = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_2 = (__pyx_v___pyx_state != Py_None); if (__pyx_t_2) { /* "(tree fragment)":9 * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 > 1); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "BufferFormatFromTypeInfo":1450 * * @cname('__pyx_format_from_typeinfo') * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< * cdef __Pyx_StructField *field * cdef __pyx_typeinfo_string fmt */ static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) { __Pyx_StructField *__pyx_v_field; struct __pyx_typeinfo_string __pyx_v_fmt; PyObject *__pyx_v_part = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_alignment = NULL; PyObject *__pyx_v_parts = NULL; PyObject *__pyx_v_extents = NULL; Py_ssize_t __pyx_7genexpr__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_StructField *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_UCS4 __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("format_from_typeinfo", 1); /* "BufferFormatFromTypeInfo":1456 * cdef Py_ssize_t i * * if type.typegroup == 'S': # <<<<<<<<<<<<<< * assert type.fields != NULL * assert type.fields.type != NULL */ __pyx_t_1 = (__pyx_v_type->typegroup == 'S'); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1457 * * if type.typegroup == 'S': * assert type.fields != NULL # <<<<<<<<<<<<<< * assert type.fields.type != NULL * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_type->fields != NULL); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(1, 1457, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(1, 1457, __pyx_L1_error) #endif /* "BufferFormatFromTypeInfo":1458 * if type.typegroup == 'S': * assert type.fields != NULL * assert type.fields.type != NULL # <<<<<<<<<<<<<< * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_type->fields->type != NULL); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(1, 1458, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(1, 1458, __pyx_L1_error) #endif /* "BufferFormatFromTypeInfo":1460 * assert type.fields.type != NULL * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< * alignment = b'^' * else: */ __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1461 * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: * alignment = b'^' # <<<<<<<<<<<<<< * else: * alignment = b'' */ __Pyx_INCREF(__pyx_kp_b__9); __pyx_v_alignment = __pyx_kp_b__9; /* "BufferFormatFromTypeInfo":1460 * assert type.fields.type != NULL * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< * alignment = b'^' * else: */ goto __pyx_L4; } /* "BufferFormatFromTypeInfo":1463 * alignment = b'^' * else: * alignment = b'' # <<<<<<<<<<<<<< * * parts = [b"T{"] */ /*else*/ { __Pyx_INCREF(__pyx_kp_b__10); __pyx_v_alignment = __pyx_kp_b__10; } __pyx_L4:; /* "BufferFormatFromTypeInfo":1465 * alignment = b'' * * parts = [b"T{"] # <<<<<<<<<<<<<< * field = type.fields * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_b_T); __Pyx_GIVEREF(__pyx_kp_b_T); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_b_T)) __PYX_ERR(1, 1465, __pyx_L1_error); __pyx_v_parts = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "BufferFormatFromTypeInfo":1466 * * parts = [b"T{"] * field = type.fields # <<<<<<<<<<<<<< * * while field.type: */ __pyx_t_3 = __pyx_v_type->fields; __pyx_v_field = __pyx_t_3; /* "BufferFormatFromTypeInfo":1468 * field = type.fields * * while field.type: # <<<<<<<<<<<<<< * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') */ while (1) { __pyx_t_1 = (__pyx_v_field->type != 0); if (!__pyx_t_1) break; /* "BufferFormatFromTypeInfo":1469 * * while field.type: * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<< * parts.append(part + b':' + field.name + b':') * field += 1 */ __pyx_t_2 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "BufferFormatFromTypeInfo":1470 * while field.type: * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<< * field += 1 * */ __pyx_t_2 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__11); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__11); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "BufferFormatFromTypeInfo":1471 * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') * field += 1 # <<<<<<<<<<<<<< * * result = alignment.join(parts) + b'}' */ __pyx_v_field = (__pyx_v_field + 1); } /* "BufferFormatFromTypeInfo":1473 * field += 1 * * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<< * else: * fmt = __Pyx_TypeInfoToFormat(type) */ __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_b__12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(1, 1473, __pyx_L1_error) __pyx_v_result = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1456 * cdef Py_ssize_t i * * if type.typegroup == 'S': # <<<<<<<<<<<<<< * assert type.fields != NULL * assert type.fields.type != NULL */ goto __pyx_L3; } /* "BufferFormatFromTypeInfo":1475 * result = alignment.join(parts) + b'}' * else: * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<< * result = fmt.string * if type.arraysize[0]: */ /*else*/ { __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type); /* "BufferFormatFromTypeInfo":1476 * else: * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string # <<<<<<<<<<<<<< * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] */ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_result = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1477 * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string * if type.arraysize[0]: # <<<<<<<<<<<<<< * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result */ __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1478 * result = fmt.string * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] # <<<<<<<<<<<<<< * result = f"({u','.join(extents)})".encode('ascii') + result * */ { /* enter inner scope */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __pyx_v_type->ndim; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_7genexpr__pyx_v_i = __pyx_t_9; __pyx_t_4 = __Pyx_PyUnicode_From_size_t((__pyx_v_type->arraysize[__pyx_7genexpr__pyx_v_i]), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } /* exit inner scope */ __pyx_v_extents = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1479 * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = 127; __Pyx_INCREF(__pyx_kp_u__13); __pyx_t_9 += 1; __Pyx_GIVEREF(__pyx_kp_u__13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__13); __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_extents); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_9 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4)) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "BufferFormatFromTypeInfo":1477 * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string * if type.arraysize[0]: # <<<<<<<<<<<<<< * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result */ } } __pyx_L3:; /* "BufferFormatFromTypeInfo":1481 * result = f"({u','.join(extents)})".encode('ascii') + result * * return result # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "BufferFormatFromTypeInfo":1450 * * @cname('__pyx_format_from_typeinfo') * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< * cdef __Pyx_StructField *field * cdef __pyx_typeinfo_string fmt */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_part); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_alignment); __Pyx_XDECREF(__pyx_v_parts); __Pyx_XDECREF(__pyx_v_extents); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":46 * # https://wiki.libsdl.org/SDL_GetNumAudioDevices * # https://wiki.libsdl.org/SDL_GetAudioDeviceName * def get_audio_device_names(iscapture = False): # <<<<<<<<<<<<<< * """ Returns a list of unique devicenames for each available audio device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_1get_audio_device_names(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5audio_get_audio_device_names, " Returns a list of unique devicenames for each available audio device.\n\n :param bool iscapture: If False return devices available for playback.\n If True return devices available for capture.\n\n :return: list of devicenames.\n :rtype: List[string]\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5audio_1get_audio_device_names = {"get_audio_device_names", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_1get_audio_device_names, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5audio_get_audio_device_names}; static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_1get_audio_device_names(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_iscapture = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_audio_device_names (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iscapture,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_iscapture); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_audio_device_names") < 0)) __PYX_ERR(0, 46, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_iscapture = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_audio_device_names", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.audio.get_audio_device_names", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_get_audio_device_names(__pyx_self, __pyx_v_iscapture); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_get_audio_device_names(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_iscapture) { int __pyx_v_count; PyObject *__pyx_v_names = NULL; int __pyx_v_i; char const *__pyx_v_name; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_audio_device_names", 1); /* "pygame/_sdl2/audio.pyx":56 * """ * * cdef int count = SDL_GetNumAudioDevices(iscapture) # <<<<<<<<<<<<<< * if count == -1: * raise error('Audio system not initialised') */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_iscapture); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) __pyx_v_count = SDL_GetNumAudioDevices(__pyx_t_1); /* "pygame/_sdl2/audio.pyx":57 * * cdef int count = SDL_GetNumAudioDevices(iscapture) * if count == -1: # <<<<<<<<<<<<<< * raise error('Audio system not initialised') * */ __pyx_t_2 = (__pyx_v_count == -1L); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/audio.pyx":58 * cdef int count = SDL_GetNumAudioDevices(iscapture) * if count == -1: * raise error('Audio system not initialised') # <<<<<<<<<<<<<< * * names = [] */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_Audio_system_not_initialised}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 58, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":57 * * cdef int count = SDL_GetNumAudioDevices(iscapture) * if count == -1: # <<<<<<<<<<<<<< * raise error('Audio system not initialised') * */ } /* "pygame/_sdl2/audio.pyx":60 * raise error('Audio system not initialised') * * names = [] # <<<<<<<<<<<<<< * for i in range(count): * name = SDL_GetAudioDeviceName(i, iscapture) */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_names = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/audio.pyx":61 * * names = [] * for i in range(count): # <<<<<<<<<<<<<< * name = SDL_GetAudioDeviceName(i, iscapture) * if not name: */ __pyx_t_1 = __pyx_v_count; __pyx_t_7 = __pyx_t_1; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pygame/_sdl2/audio.pyx":62 * names = [] * for i in range(count): * name = SDL_GetAudioDeviceName(i, iscapture) # <<<<<<<<<<<<<< * if not name: * raise error() */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_iscapture); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L1_error) __pyx_v_name = SDL_GetAudioDeviceName(__pyx_v_i, __pyx_t_9); /* "pygame/_sdl2/audio.pyx":63 * for i in range(count): * name = SDL_GetAudioDeviceName(i, iscapture) * if not name: # <<<<<<<<<<<<<< * raise error() * names.append(name.decode('utf8')) */ __pyx_t_2 = (!(__pyx_v_name != 0)); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/audio.pyx":64 * name = SDL_GetAudioDeviceName(i, iscapture) * if not name: * raise error() # <<<<<<<<<<<<<< * names.append(name.decode('utf8')) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 64, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":63 * for i in range(count): * name = SDL_GetAudioDeviceName(i, iscapture) * if not name: # <<<<<<<<<<<<<< * raise error() * names.append(name.decode('utf8')) */ } /* "pygame/_sdl2/audio.pyx":65 * if not name: * raise error() * names.append(name.decode('utf8')) # <<<<<<<<<<<<<< * * return names */ __pyx_t_10 = __Pyx_ssize_strlen(__pyx_v_name); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 65, __pyx_L1_error) __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_name, 0, __pyx_t_10, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_names, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pygame/_sdl2/audio.pyx":67 * names.append(name.decode('utf8')) * * return names # <<<<<<<<<<<<<< * * import traceback */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_names); __pyx_r = __pyx_v_names; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":46 * # https://wiki.libsdl.org/SDL_GetNumAudioDevices * # https://wiki.libsdl.org/SDL_GetAudioDeviceName * def get_audio_device_names(iscapture = False): # <<<<<<<<<<<<<< * """ Returns a list of unique devicenames for each available audio device. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.audio.get_audio_device_names", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":70 * * import traceback * cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: # <<<<<<<<<<<<<< * """ This is called in a thread made by SDL. * So we need the python GIL to do python stuff. */ static void __pyx_f_6pygame_5_sdl2_5audio_recording_cb(void *__pyx_v_userdata, Uint8 *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_len) { __Pyx_memviewslice __pyx_v_a_memoryview = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_RefNannyDeclarations struct __pyx_array_obj *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } }; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; unsigned int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif __Pyx_RefNannySetupContext("recording_cb", 1); /* "pygame/_sdl2/audio.pyx":75 * """ * cdef Uint8 [:] a_memoryview * with gil: # <<<<<<<<<<<<<< * a_memoryview = stream * try: */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /*try:*/ { /* "pygame/_sdl2/audio.pyx":76 * cdef Uint8 [:] a_memoryview * with gil: * a_memoryview = stream # <<<<<<<<<<<<<< * try: * # The userdata is the audio device. */ if (!__pyx_v_stream) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); __PYX_ERR(0, 76, __pyx_L4_error) } __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_Uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_len)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_array_new(__pyx_t_2, sizeof(Uint8), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L4_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(((PyObject *)__pyx_t_1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 76, __pyx_L4_error) __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a_memoryview = __pyx_t_4; __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; /* "pygame/_sdl2/audio.pyx":77 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pygame/_sdl2/audio.pyx":80 * # The userdata is the audio device. * # The audio device is needed in some apps * (userdata).callback(userdata, a_memoryview) # <<<<<<<<<<<<<< * except: * traceback.print_exc() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_userdata), __pyx_n_s_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_a_memoryview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_Uint8, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_Uint8, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 80, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, ((PyObject *)__pyx_v_userdata), __pyx_t_8}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/audio.pyx":77 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sdl2/audio.pyx":81 * # The audio device is needed in some apps * (userdata).callback(userdata, a_memoryview) * except: # <<<<<<<<<<<<<< * traceback.print_exc() * raise */ /*except:*/ { __Pyx_AddTraceback("pygame._sdl2.audio.recording_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 81, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_8); /* "pygame/_sdl2/audio.pyx":82 * (userdata).callback(userdata, a_memoryview) * except: * traceback.print_exc() # <<<<<<<<<<<<<< * raise * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_traceback); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 82, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sdl2/audio.pyx":83 * except: * traceback.print_exc() * raise # <<<<<<<<<<<<<< * * */ __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_8); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_8 = 0; __PYX_ERR(0, 83, __pyx_L8_except_error) } /* "pygame/_sdl2/audio.pyx":77 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L4_error; __pyx_L11_try_end:; } } /* "pygame/_sdl2/audio.pyx":75 * """ * cdef Uint8 [:] a_memoryview * with gil: # <<<<<<<<<<<<<< * a_memoryview = stream * try: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "pygame/_sdl2/audio.pyx":70 * * import traceback * cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: # <<<<<<<<<<<<<< * """ This is called in a thread made by SDL. * So we need the python GIL to do python stuff. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_XDECREF((PyObject *)__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_WriteUnraisable("pygame._sdl2.audio.recording_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; __PYX_XCLEAR_MEMVIEW(&__pyx_v_a_memoryview, 0); __Pyx_RefNannyFinishContextNogil() } /* "pygame/_sdl2/audio.pyx":87 * * cdef class AudioDevice: * def __cinit__(self): # <<<<<<<<<<<<<< * self._deviceid = 0 * self._iscapture = 0 */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice___cinit__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice___cinit__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { int __pyx_r; /* "pygame/_sdl2/audio.pyx":88 * cdef class AudioDevice: * def __cinit__(self): * self._deviceid = 0 # <<<<<<<<<<<<<< * self._iscapture = 0 * */ __pyx_v_self->_deviceid = 0; /* "pygame/_sdl2/audio.pyx":89 * def __cinit__(self): * self._deviceid = 0 * self._iscapture = 0 # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->_iscapture = 0; /* "pygame/_sdl2/audio.pyx":87 * * cdef class AudioDevice: * def __cinit__(self): # <<<<<<<<<<<<<< * self._deviceid = 0 * self._iscapture = 0 */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "pygame/_sdl2/audio.pyx":91 * self._iscapture = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._deviceid: * SDL_CloseAudioDevice(self._deviceid) */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_2__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_2__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { int __pyx_t_1; /* "pygame/_sdl2/audio.pyx":92 * * def __dealloc__(self): * if self._deviceid: # <<<<<<<<<<<<<< * SDL_CloseAudioDevice(self._deviceid) * */ __pyx_t_1 = (__pyx_v_self->_deviceid != 0); if (__pyx_t_1) { /* "pygame/_sdl2/audio.pyx":93 * def __dealloc__(self): * if self._deviceid: * SDL_CloseAudioDevice(self._deviceid) # <<<<<<<<<<<<<< * * def __init__(self, */ SDL_CloseAudioDevice(__pyx_v_self->_deviceid); /* "pygame/_sdl2/audio.pyx":92 * * def __dealloc__(self): * if self._deviceid: # <<<<<<<<<<<<<< * SDL_CloseAudioDevice(self._deviceid) * */ } /* "pygame/_sdl2/audio.pyx":91 * self._iscapture = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._deviceid: * SDL_CloseAudioDevice(self._deviceid) */ /* function exit code */ } /* "pygame/_sdl2/audio.pyx":95 * SDL_CloseAudioDevice(self._deviceid) * * def __init__(self, # <<<<<<<<<<<<<< * devicename, * iscapture, */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_4__init__, " An AudioDevice is for sound playback and capture of 'sound cards'.\n\n :param string devicename: One of the device names from get_audio_device_names.\n If None is passed in, it uses the default audio device.\n :param int frequency: Number of samples per second. 44100, 22050, ...\n :param int audioformat: AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ...\n :param int numchannels: 2 if stereo, 1 if mono.\n :param int chunksize: number of samples buffered.\n\n :param allowed_changes: some drivers don't support all possible requested formats.\n So you can tell it which ones yours support.\n * AUDIO_ALLOW_FREQUENCY_CHANGE\n * AUDIO_ALLOW_FORMAT_CHANGE\n * AUDIO_ALLOW_CHANNELS_CHANGE\n * AUDIO_ALLOW_ANY_CHANGE\n\n If your application can only handle one specific data format,\n pass a zero for allowed_changes and let SDL transparently handle any differences.\n\n :callback: a function which gets called with (audiodevice, memoryview).\n memoryview is the audio data.\n Use audiodevice.iscapture to see if it is incoming audio or outgoing.\n The audiodevice also has the format of the memory.\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5audio_11AudioDevice_4__init__; #endif static int __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_devicename = 0; PyObject *__pyx_v_iscapture = 0; PyObject *__pyx_v_frequency = 0; PyObject *__pyx_v_audioformat = 0; PyObject *__pyx_v_numchannels = 0; PyObject *__pyx_v_chunksize = 0; PyObject *__pyx_v_allowed_changes = 0; PyObject *__pyx_v_callback = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[8] = {0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_devicename,&__pyx_n_s_iscapture,&__pyx_n_s_frequency,&__pyx_n_s_audioformat,&__pyx_n_s_numchannels,&__pyx_n_s_chunksize,&__pyx_n_s_allowed_changes,&__pyx_n_s_callback,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_devicename)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_iscapture)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frequency)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_audioformat)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_numchannels)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chunksize)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[5]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (likely((values[6] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allowed_changes)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[6]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); __PYX_ERR(0, 95, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (likely((values[7] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[7]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); __PYX_ERR(0, 95, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 95, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 8)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6); values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7); } __pyx_v_devicename = values[0]; __pyx_v_iscapture = values[1]; __pyx_v_frequency = values[2]; __pyx_v_audioformat = values[3]; __pyx_v_numchannels = values[4]; __pyx_v_chunksize = values[5]; __pyx_v_allowed_changes = values[6]; __pyx_v_callback = values[7]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 95, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_4__init__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self), __pyx_v_devicename, __pyx_v_iscapture, __pyx_v_frequency, __pyx_v_audioformat, __pyx_v_numchannels, __pyx_v_chunksize, __pyx_v_allowed_changes, __pyx_v_callback); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_4__init__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self, PyObject *__pyx_v_devicename, PyObject *__pyx_v_iscapture, PyObject *__pyx_v_frequency, PyObject *__pyx_v_audioformat, PyObject *__pyx_v_numchannels, PyObject *__pyx_v_chunksize, PyObject *__pyx_v_allowed_changes, PyObject *__pyx_v_callback) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; SDL_AudioFormat __pyx_t_5; Uint8 __pyx_t_6; Uint16 __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; unsigned int __pyx_t_10; char const *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/audio.pyx":128 * The audiodevice also has the format of the memory. * """ * memset(&self.desired, 0, sizeof(SDL_AudioSpec)) # <<<<<<<<<<<<<< * self._iscapture = iscapture * self._callback = callback */ (void)(memset((&__pyx_v_self->desired), 0, (sizeof(SDL_AudioSpec)))); /* "pygame/_sdl2/audio.pyx":129 * """ * memset(&self.desired, 0, sizeof(SDL_AudioSpec)) * self._iscapture = iscapture # <<<<<<<<<<<<<< * self._callback = callback * if not isinstance(devicename, str): */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_iscapture); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __pyx_v_self->_iscapture = __pyx_t_1; /* "pygame/_sdl2/audio.pyx":130 * memset(&self.desired, 0, sizeof(SDL_AudioSpec)) * self._iscapture = iscapture * self._callback = callback # <<<<<<<<<<<<<< * if not isinstance(devicename, str): * raise TypeError("devicename must be a string") */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_self->_callback); __Pyx_DECREF(__pyx_v_self->_callback); __pyx_v_self->_callback = __pyx_v_callback; /* "pygame/_sdl2/audio.pyx":131 * self._iscapture = iscapture * self._callback = callback * if not isinstance(devicename, str): # <<<<<<<<<<<<<< * raise TypeError("devicename must be a string") * self._devicename = devicename */ __pyx_t_2 = PyString_Check(__pyx_v_devicename); __pyx_t_3 = (!__pyx_t_2); if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/audio.pyx":132 * self._callback = callback * if not isinstance(devicename, str): * raise TypeError("devicename must be a string") # <<<<<<<<<<<<<< * self._devicename = devicename * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 132, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":131 * self._iscapture = iscapture * self._callback = callback * if not isinstance(devicename, str): # <<<<<<<<<<<<<< * raise TypeError("devicename must be a string") * self._devicename = devicename */ } /* "pygame/_sdl2/audio.pyx":133 * if not isinstance(devicename, str): * raise TypeError("devicename must be a string") * self._devicename = devicename # <<<<<<<<<<<<<< * * self.desired.freq = frequency; */ __Pyx_INCREF(__pyx_v_devicename); __Pyx_GIVEREF(__pyx_v_devicename); __Pyx_GOTREF(__pyx_v_self->_devicename); __Pyx_DECREF(__pyx_v_self->_devicename); __pyx_v_self->_devicename = __pyx_v_devicename; /* "pygame/_sdl2/audio.pyx":135 * self._devicename = devicename * * self.desired.freq = frequency; # <<<<<<<<<<<<<< * self.desired.format = audioformat; * self.desired.channels = numchannels; */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_frequency); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error) __pyx_v_self->desired.freq = __pyx_t_1; /* "pygame/_sdl2/audio.pyx":136 * * self.desired.freq = frequency; * self.desired.format = audioformat; # <<<<<<<<<<<<<< * self.desired.channels = numchannels; * self.desired.samples = chunksize; */ __pyx_t_5 = __Pyx_PyInt_As_Uint16(__pyx_v_audioformat); if (unlikely((__pyx_t_5 == ((SDL_AudioFormat)-1)) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) __pyx_v_self->desired.format = __pyx_t_5; /* "pygame/_sdl2/audio.pyx":137 * self.desired.freq = frequency; * self.desired.format = audioformat; * self.desired.channels = numchannels; # <<<<<<<<<<<<<< * self.desired.samples = chunksize; * self.desired.callback = recording_cb; */ __pyx_t_6 = __Pyx_PyInt_As_Uint8(__pyx_v_numchannels); if (unlikely((__pyx_t_6 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error) __pyx_v_self->desired.channels = __pyx_t_6; /* "pygame/_sdl2/audio.pyx":138 * self.desired.format = audioformat; * self.desired.channels = numchannels; * self.desired.samples = chunksize; # <<<<<<<<<<<<<< * self.desired.callback = recording_cb; * self.desired.userdata = self */ __pyx_t_7 = __Pyx_PyInt_As_Uint16(__pyx_v_chunksize); if (unlikely((__pyx_t_7 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error) __pyx_v_self->desired.samples = __pyx_t_7; /* "pygame/_sdl2/audio.pyx":139 * self.desired.channels = numchannels; * self.desired.samples = chunksize; * self.desired.callback = recording_cb; # <<<<<<<<<<<<<< * self.desired.userdata = self * */ __pyx_v_self->desired.callback = ((SDL_AudioCallback)__pyx_f_6pygame_5_sdl2_5audio_recording_cb); /* "pygame/_sdl2/audio.pyx":140 * self.desired.samples = chunksize; * self.desired.callback = recording_cb; * self.desired.userdata = self # <<<<<<<<<<<<<< * * self._deviceid = SDL_OpenAudioDevice( */ __pyx_v_self->desired.userdata = ((void *)__pyx_v_self); /* "pygame/_sdl2/audio.pyx":143 * * self._deviceid = SDL_OpenAudioDevice( * self._devicename.encode("utf-8"), # <<<<<<<<<<<<<< * self._iscapture, * &self.desired, */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_devicename, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_utf_8}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":147 * &self.desired, * &self.obtained, * allowed_changes # <<<<<<<<<<<<<< * ) * */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_allowed_changes); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":142 * self.desired.userdata = self * * self._deviceid = SDL_OpenAudioDevice( # <<<<<<<<<<<<<< * self._devicename.encode("utf-8"), * self._iscapture, */ __pyx_v_self->_deviceid = SDL_OpenAudioDevice(__pyx_t_11, __pyx_v_self->_iscapture, (&__pyx_v_self->desired), (&__pyx_v_self->obtained), __pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":150 * ) * * if self._deviceid == 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_3 = (__pyx_v_self->_deviceid == 0); if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/audio.pyx":151 * * if self._deviceid == 0: * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 151, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":150 * ) * * if self._deviceid == 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/audio.pyx":95 * SDL_CloseAudioDevice(self._deviceid) * * def __init__(self, # <<<<<<<<<<<<<< * devicename, * iscapture, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":153 * raise error() * * @property # <<<<<<<<<<<<<< * def iscapture(self): * """ is the AudioDevice for capturing audio? */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9iscapture_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9iscapture_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9iscapture___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9iscapture___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":157 * """ is the AudioDevice for capturing audio? * """ * return self._iscapture # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_iscapture); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":153 * raise error() * * @property # <<<<<<<<<<<<<< * def iscapture(self): * """ is the AudioDevice for capturing audio? */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.iscapture.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":159 * return self._iscapture * * @property # <<<<<<<<<<<<<< * def deviceid(self): * """ deviceid of the audio device relative to the devicename list. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8deviceid_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8deviceid_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8deviceid___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8deviceid___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":163 * """ deviceid of the audio device relative to the devicename list. * """ * return self._deviceid # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Uint32(__pyx_v_self->_deviceid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":159 * return self._iscapture * * @property # <<<<<<<<<<<<<< * def deviceid(self): * """ deviceid of the audio device relative to the devicename list. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.deviceid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":165 * return self._deviceid * * @property # <<<<<<<<<<<<<< * def devicename(self): * """ devicename of the audio device from the devicename list. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_10devicename_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_10devicename_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_10devicename___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_10devicename___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":169 * """ devicename of the audio device from the devicename list. * """ * return self._devicename # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_devicename); __pyx_r = __pyx_v_self->_devicename; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":165 * return self._deviceid * * @property # <<<<<<<<<<<<<< * def devicename(self): * """ devicename of the audio device from the devicename list. */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":171 * return self._devicename * * @property # <<<<<<<<<<<<<< * def callback(self): * """ called in the sound thread with (audiodevice, memoryview) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8callback_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8callback___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8callback___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":175 * """ called in the sound thread with (audiodevice, memoryview) * """ * return self._callback # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_callback); __pyx_r = __pyx_v_self->_callback; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":171 * return self._devicename * * @property # <<<<<<<<<<<<<< * def callback(self): * """ called in the sound thread with (audiodevice, memoryview) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":177 * return self._callback * * @property # <<<<<<<<<<<<<< * def frequency(self): * """ Number of samples per second. 44100, 22050, ... */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9frequency_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9frequency_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9frequency___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9frequency___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":181 * """ Number of samples per second. 44100, 22050, ... * """ * return self.obtained.freq # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->obtained.freq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":177 * return self._callback * * @property # <<<<<<<<<<<<<< * def frequency(self): * """ Number of samples per second. 44100, 22050, ... */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.frequency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":183 * return self.obtained.freq * * @property # <<<<<<<<<<<<<< * def audioformat(self): * """ AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ... */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11audioformat_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11audioformat_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_11audioformat___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_11audioformat___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":187 * """ AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ... * """ * return self.obtained.format # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Uint16(__pyx_v_self->obtained.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":183 * return self.obtained.freq * * @property # <<<<<<<<<<<<<< * def audioformat(self): * """ AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ... */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.audioformat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":189 * return self.obtained.format * * @property # <<<<<<<<<<<<<< * def numchannels(self): * """ 2 if stereo, 1 if mono. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11numchannels_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11numchannels_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_11numchannels___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_11numchannels___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":193 * """ 2 if stereo, 1 if mono. * """ * return self.obtained.channels # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Uint8(__pyx_v_self->obtained.channels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":189 * return self.obtained.format * * @property # <<<<<<<<<<<<<< * def numchannels(self): * """ 2 if stereo, 1 if mono. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.numchannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":195 * return self.obtained.channels * * @property # <<<<<<<<<<<<<< * def chunksize(self): * """ number of samples buffered. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9chunksize_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9chunksize_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9chunksize___get__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_9chunksize___get__(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/audio.pyx":199 * """ number of samples buffered. * """ * return self.obtained.samples # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Uint16(__pyx_v_self->obtained.samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/audio.pyx":195 * return self.obtained.channels * * @property # <<<<<<<<<<<<<< * def chunksize(self): * """ number of samples buffered. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.chunksize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":201 * return self.obtained.samples * * def __repr__(self): # <<<<<<<<<<<<<< * ret = " 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pause") < 0)) __PYX_ERR(0, 212, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_pause_on = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_pause_on == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pause", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 212, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.pause", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8pause(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self), __pyx_v_pause_on); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_8pause(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self, int __pyx_v_pause_on) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("pause", 1); /* "pygame/_sdl2/audio.pyx":218 * """ * # https://wiki.libsdl.org/SDL_PauseAudioDevice * if self._deviceid: # <<<<<<<<<<<<<< * SDL_PauseAudioDevice(self._deviceid, pause_on) * */ __pyx_t_1 = (__pyx_v_self->_deviceid != 0); if (__pyx_t_1) { /* "pygame/_sdl2/audio.pyx":219 * # https://wiki.libsdl.org/SDL_PauseAudioDevice * if self._deviceid: * SDL_PauseAudioDevice(self._deviceid, pause_on) # <<<<<<<<<<<<<< * * def close(self): */ SDL_PauseAudioDevice(__pyx_v_self->_deviceid, __pyx_v_pause_on); /* "pygame/_sdl2/audio.pyx":218 * """ * # https://wiki.libsdl.org/SDL_PauseAudioDevice * if self._deviceid: # <<<<<<<<<<<<<< * SDL_PauseAudioDevice(self._deviceid, pause_on) * */ } /* "pygame/_sdl2/audio.pyx":212 * return ret * * def pause(self, int pause_on): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/audio.pyx":221 * SDL_PauseAudioDevice(self._deviceid, pause_on) * * def close(self): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_10close, " Use this to pause and unpause audio playback on this device.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_11close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_10close}; static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_10close(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_10close(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("close", 1); /* "pygame/_sdl2/audio.pyx":225 * """ * # https://wiki.libsdl.org/SDL_CloseAudioDevice * if self._deviceid: # <<<<<<<<<<<<<< * SDL_CloseAudioDevice(self._deviceid) * self._deviceid = 0 */ __pyx_t_1 = (__pyx_v_self->_deviceid != 0); if (__pyx_t_1) { /* "pygame/_sdl2/audio.pyx":226 * # https://wiki.libsdl.org/SDL_CloseAudioDevice * if self._deviceid: * SDL_CloseAudioDevice(self._deviceid) # <<<<<<<<<<<<<< * self._deviceid = 0 */ SDL_CloseAudioDevice(__pyx_v_self->_deviceid); /* "pygame/_sdl2/audio.pyx":227 * if self._deviceid: * SDL_CloseAudioDevice(self._deviceid) * self._deviceid = 0 # <<<<<<<<<<<<<< */ __pyx_v_self->_deviceid = 0; /* "pygame/_sdl2/audio.pyx":225 * """ * # https://wiki.libsdl.org/SDL_CloseAudioDevice * if self._deviceid: # <<<<<<<<<<<<<< * SDL_CloseAudioDevice(self._deviceid) * self._deviceid = 0 */ } /* "pygame/_sdl2/audio.pyx":221 * SDL_PauseAudioDevice(self._deviceid, pause_on) * * def close(self): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_12__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_14__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5audio_11AudioDevice_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.audio.AudioDevice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pygame_5_sdl2_5audio_AudioDevice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)o); p->_callback = Py_None; Py_INCREF(Py_None); p->_devicename = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5audio_AudioDevice(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *p = (struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5audio_AudioDevice) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_callback); Py_CLEAR(p->_devicename); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_5_sdl2_5audio_AudioDevice(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *p = (struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)o; if (p->_callback) { e = (*v)(p->_callback, a); if (e) return e; } if (p->_devicename) { e = (*v)(p->_devicename, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_5_sdl2_5audio_AudioDevice(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *p = (struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice *)o; tmp = ((PyObject*)p->_callback); p->_callback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_devicename); p->_devicename = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_iscapture(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9iscapture_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_deviceid(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8deviceid_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_devicename(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_10devicename_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_callback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_8callback_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_frequency(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9frequency_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_audioformat(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11audioformat_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_numchannels(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11numchannels_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_chunksize(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9chunksize_1__get__(o); } static PyObject *__pyx_specialmethod___pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_7__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_7__repr__(self); } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5audio_AudioDevice[] = { {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_7__repr__, METH_NOARGS|METH_COEXIST, 0}, {"pause", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_9pause, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_8pause}, {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_11close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_10close}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5audio_AudioDevice[] = { {(char *)"iscapture", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_iscapture, 0, (char *)PyDoc_STR(" is the AudioDevice for capturing audio?\n "), 0}, {(char *)"deviceid", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_deviceid, 0, (char *)PyDoc_STR(" deviceid of the audio device relative to the devicename list.\n "), 0}, {(char *)"devicename", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_devicename, 0, (char *)PyDoc_STR(" devicename of the audio device from the devicename list.\n "), 0}, {(char *)"callback", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_callback, 0, (char *)PyDoc_STR(" called in the sound thread with (audiodevice, memoryview)\n "), 0}, {(char *)"frequency", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_frequency, 0, (char *)PyDoc_STR(" Number of samples per second. 44100, 22050, ...\n "), 0}, {(char *)"audioformat", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_audioformat, 0, (char *)PyDoc_STR(" AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ...\n "), 0}, {(char *)"numchannels", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_numchannels, 0, (char *)PyDoc_STR(" 2 if stereo, 1 if mono.\n "), 0}, {(char *)"chunksize", __pyx_getprop_6pygame_5_sdl2_5audio_11AudioDevice_chunksize, 0, (char *)PyDoc_STR(" number of samples buffered.\n "), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5audio_AudioDevice_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5audio_AudioDevice}, {Py_tp_repr, (void *)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_7__repr__}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5audio_AudioDevice}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_5_sdl2_5audio_AudioDevice}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5audio_AudioDevice}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5audio_AudioDevice}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_5__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5audio_AudioDevice}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5audio_AudioDevice_spec = { "pygame._sdl2.audio.AudioDevice", sizeof(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_5_sdl2_5audio_AudioDevice_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5audio_AudioDevice = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.audio.""AudioDevice", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5audio_AudioDevice), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5audio_AudioDevice, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_7__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5audio_AudioDevice, /*tp_traverse*/ __pyx_tp_clear_6pygame_5_sdl2_5audio_AudioDevice, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5audio_AudioDevice, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5audio_AudioDevice, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5audio_11AudioDevice_5__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5audio_AudioDevice, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_array __pyx_vtable_array; static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_array_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_array_obj *)o); p->__pyx_vtab = __pyx_vtabptr_array; p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_array(PyObject *o) { struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_array___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->mode); Py_CLEAR(p->_format); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_array___setitem__(o, i, v); } else { __Pyx_TypeName o_type_name; o_type_name = __Pyx_PyType_GetName(Py_TYPE(o)); PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); __Pyx_DECREF_TypeName(o_type_name); return -1; } } static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_array___getattr__(o, n); } return v; } static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); } static PyMethodDef __pyx_methods_array[] = { {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_array[] = { {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_array = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_array_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type___pyx_array_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array}, {Py_sq_length, (void *)__pyx_array___len__}, {Py_sq_item, (void *)__pyx_sq_item_array}, {Py_mp_length, (void *)__pyx_array___len__}, {Py_mp_subscript, (void *)__pyx_array___getitem__}, {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array}, {Py_tp_getattro, (void *)__pyx_tp_getattro_array}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_array_getbuffer}, #endif {Py_tp_methods, (void *)__pyx_methods_array}, {Py_tp_getset, (void *)__pyx_getsets_array}, {Py_tp_new, (void *)__pyx_tp_new_array}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_array_spec = { "pygame._sdl2.audio.array", sizeof(struct __pyx_array_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, __pyx_type___pyx_array_slots, }; #else static PySequenceMethods __pyx_tp_as_sequence_array = { __pyx_array___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_array, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_array = { __pyx_array___len__, /*mp_length*/ __pyx_array___getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_array = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_array_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type___pyx_array = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.audio.""array", /*tp_name*/ sizeof(struct __pyx_array_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_array, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_array, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_array, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_array, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_array, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_MemviewEnum_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_MemviewEnum_obj *)o); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_Enum(PyObject *o) { struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->name); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { int e; struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_Enum(PyObject *o) { PyObject* tmp; struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_MemviewEnum___repr__(self); } static PyMethodDef __pyx_methods_Enum[] = { {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum}, {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__}, {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum}, {Py_tp_clear, (void *)__pyx_tp_clear_Enum}, {Py_tp_methods, (void *)__pyx_methods_Enum}, {Py_tp_init, (void *)__pyx_MemviewEnum___init__}, {Py_tp_new, (void *)__pyx_tp_new_Enum}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = { "pygame._sdl2.audio.Enum", sizeof(struct __pyx_MemviewEnum_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type___pyx_MemviewEnum_slots, }; #else static PyTypeObject __pyx_type___pyx_MemviewEnum = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.audio.""Enum", /*tp_name*/ sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_Enum, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_MemviewEnum___repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_Enum, /*tp_traverse*/ __pyx_tp_clear_Enum, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_Enum, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_MemviewEnum___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_Enum, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_memoryview_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_memoryview_obj *)o); p->__pyx_vtab = __pyx_vtabptr_memoryview; p->obj = Py_None; Py_INCREF(Py_None); p->_size = Py_None; Py_INCREF(Py_None); p->_array_interface = Py_None; Py_INCREF(Py_None); p->view.obj = NULL; if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_memoryview(PyObject *o) { struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryview___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->obj); Py_CLEAR(p->_size); Py_CLEAR(p->_array_interface); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { int e; struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; if (p->obj) { e = (*v)(p->obj, a); if (e) return e; } if (p->_size) { e = (*v)(p->_size, a); if (e) return e; } if (p->_array_interface) { e = (*v)(p->_array_interface, a); if (e) return e; } if (p->view.obj) { e = (*v)(p->view.obj, a); if (e) return e; } return 0; } static int __pyx_tp_clear_memoryview(PyObject *o) { PyObject* tmp; struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; tmp = ((PyObject*)p->obj); p->obj = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_size); p->_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_array_interface); p->_array_interface = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); Py_CLEAR(p->view.obj); return 0; } static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_memoryview___setitem__(o, i, v); } else { __Pyx_TypeName o_type_name; o_type_name = __Pyx_PyType_GetName(Py_TYPE(o)); PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); __Pyx_DECREF_TypeName(o_type_name); return -1; } } static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); } static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_memoryview___repr__(self); } static PyMethodDef __pyx_methods_memoryview[] = { {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0}, {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_memoryview[] = { {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0}, {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0}, {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0}, {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0}, {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0}, {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0}, {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0}, {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0}, {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_memoryview = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_memoryview_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type___pyx_memoryview_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview}, {Py_tp_repr, (void *)__pyx_memoryview___repr__}, {Py_sq_length, (void *)__pyx_memoryview___len__}, {Py_sq_item, (void *)__pyx_sq_item_memoryview}, {Py_mp_length, (void *)__pyx_memoryview___len__}, {Py_mp_subscript, (void *)__pyx_memoryview___getitem__}, {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview}, {Py_tp_str, (void *)__pyx_memoryview___str__}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer}, #endif {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview}, {Py_tp_clear, (void *)__pyx_tp_clear_memoryview}, {Py_tp_methods, (void *)__pyx_methods_memoryview}, {Py_tp_getset, (void *)__pyx_getsets_memoryview}, {Py_tp_new, (void *)__pyx_tp_new_memoryview}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_memoryview_spec = { "pygame._sdl2.audio.memoryview", sizeof(struct __pyx_memoryview_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type___pyx_memoryview_slots, }; #else static PySequenceMethods __pyx_tp_as_sequence_memoryview = { __pyx_memoryview___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_memoryview, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_memoryview = { __pyx_memoryview___len__, /*mp_length*/ __pyx_memoryview___getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_memoryview = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_memoryview_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type___pyx_memoryview = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.audio.""memoryview", /*tp_name*/ sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_memoryview___repr__, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_memoryview___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_memoryview, /*tp_traverse*/ __pyx_tp_clear_memoryview, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_memoryview, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_memoryview, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_memoryview, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_memoryviewslice_obj *p; PyObject *o = __pyx_tp_new_memoryview(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_memoryviewslice_obj *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; p->from_object = Py_None; Py_INCREF(Py_None); p->from_slice.memview = NULL; return o; } static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryviewslice___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->from_object); PyObject_GC_Track(o); __pyx_tp_dealloc_memoryview(o); } static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { int e; struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; if (p->from_object) { e = (*v)(p->from_object, a); if (e) return e; } return 0; } static int __pyx_tp_clear__memoryviewslice(PyObject *o) { PyObject* tmp; struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; __pyx_tp_clear_memoryview(o); tmp = ((PyObject*)p->from_object); p->from_object = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1); return 0; } static PyMethodDef __pyx_methods__memoryviewslice[] = { {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice}, {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")}, {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice}, {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice}, {Py_tp_methods, (void *)__pyx_methods__memoryviewslice}, {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = { "pygame._sdl2.audio._memoryviewslice", sizeof(struct __pyx_memoryviewslice_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, __pyx_type___pyx_memoryviewslice_slots, }; #else static PyTypeObject __pyx_type___pyx_memoryviewslice = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.audio.""_memoryviewslice", /*tp_name*/ sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_memoryview___repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_memoryview___str__, /*tp_str*/ #else 0, /*tp_str*/ #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/ __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ __pyx_tp_clear__memoryviewslice, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods__memoryviewslice, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new__memoryviewslice, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_ALLOW_ANY_CHANGE, __pyx_k_AUDIO_ALLOW_ANY_CHANGE, sizeof(__pyx_k_AUDIO_ALLOW_ANY_CHANGE), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE, __pyx_k_AUDIO_ALLOW_CHANNELS_CHANGE, sizeof(__pyx_k_AUDIO_ALLOW_CHANNELS_CHANGE), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE, __pyx_k_AUDIO_ALLOW_FORMAT_CHANGE, sizeof(__pyx_k_AUDIO_ALLOW_FORMAT_CHANGE), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE, __pyx_k_AUDIO_ALLOW_FREQUENCY_CHANGE, sizeof(__pyx_k_AUDIO_ALLOW_FREQUENCY_CHANGE), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_F32, __pyx_k_AUDIO_F32, sizeof(__pyx_k_AUDIO_F32), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_F32LSB, __pyx_k_AUDIO_F32LSB, sizeof(__pyx_k_AUDIO_F32LSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_F32MSB, __pyx_k_AUDIO_F32MSB, sizeof(__pyx_k_AUDIO_F32MSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S16, __pyx_k_AUDIO_S16, sizeof(__pyx_k_AUDIO_S16), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S16LSB, __pyx_k_AUDIO_S16LSB, sizeof(__pyx_k_AUDIO_S16LSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S16MSB, __pyx_k_AUDIO_S16MSB, sizeof(__pyx_k_AUDIO_S16MSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S32, __pyx_k_AUDIO_S32, sizeof(__pyx_k_AUDIO_S32), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S32LSB, __pyx_k_AUDIO_S32LSB, sizeof(__pyx_k_AUDIO_S32LSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S32MSB, __pyx_k_AUDIO_S32MSB, sizeof(__pyx_k_AUDIO_S32MSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_S8, __pyx_k_AUDIO_S8, sizeof(__pyx_k_AUDIO_S8), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_U16, __pyx_k_AUDIO_U16, sizeof(__pyx_k_AUDIO_U16), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_U16LSB, __pyx_k_AUDIO_U16LSB, sizeof(__pyx_k_AUDIO_U16LSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_U16MSB, __pyx_k_AUDIO_U16MSB, sizeof(__pyx_k_AUDIO_U16MSB), 0, 0, 1, 1}, {&__pyx_n_s_AUDIO_U8, __pyx_k_AUDIO_U8, sizeof(__pyx_k_AUDIO_U8), 0, 0, 1, 1}, {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0}, {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, {&__pyx_kp_s_AudioDevice, __pyx_k_AudioDevice, sizeof(__pyx_k_AudioDevice), 0, 0, 1, 0}, {&__pyx_n_s_AudioDevice_2, __pyx_k_AudioDevice_2, sizeof(__pyx_k_AudioDevice_2), 0, 0, 1, 1}, {&__pyx_n_s_AudioDevice___reduce_cython, __pyx_k_AudioDevice___reduce_cython, sizeof(__pyx_k_AudioDevice___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_AudioDevice___setstate_cython, __pyx_k_AudioDevice___setstate_cython, sizeof(__pyx_k_AudioDevice___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_AudioDevice_close, __pyx_k_AudioDevice_close, sizeof(__pyx_k_AudioDevice_close), 0, 0, 1, 1}, {&__pyx_n_s_AudioDevice_pause, __pyx_k_AudioDevice_pause, sizeof(__pyx_k_AudioDevice_pause), 0, 0, 1, 1}, {&__pyx_kp_s_Audio_system_not_initialised, __pyx_k_Audio_system_not_initialised, sizeof(__pyx_k_Audio_system_not_initialised), 0, 0, 1, 0}, {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0}, {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0}, {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0}, {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0}, {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1}, {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0}, {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0}, {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0}, {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0}, {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0}, {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1}, {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0}, {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1}, {&__pyx_kp_b__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 0, 0}, {&__pyx_kp_b__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 0, 0}, {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0}, {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0}, {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0}, {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1}, {&__pyx_n_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 1}, {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, {&__pyx_kp_b__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 0, 0}, {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1}, {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, {&__pyx_n_s_allowed_changes, __pyx_k_allowed_changes, sizeof(__pyx_k_allowed_changes), 0, 0, 1, 1}, {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_audio_format_str, __pyx_k_audio_format_str, sizeof(__pyx_k_audio_format_str), 0, 0, 1, 1}, {&__pyx_n_s_audioformat, __pyx_k_audioformat, sizeof(__pyx_k_audioformat), 0, 0, 1, 1}, {&__pyx_kp_s_audioformat_s, __pyx_k_audioformat_s, sizeof(__pyx_k_audioformat_s), 0, 0, 1, 0}, {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1}, {&__pyx_n_s_chunksize, __pyx_k_chunksize, sizeof(__pyx_k_chunksize), 0, 0, 1, 1}, {&__pyx_kp_s_chunksize_s, __pyx_k_chunksize_s, sizeof(__pyx_k_chunksize_s), 0, 0, 1, 0}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0}, {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0}, {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_devicename, __pyx_k_devicename, sizeof(__pyx_k_devicename), 0, 0, 1, 1}, {&__pyx_kp_s_devicename_must_be_a_string, __pyx_k_devicename_must_be_a_string, sizeof(__pyx_k_devicename_must_be_a_string), 0, 0, 1, 0}, {&__pyx_kp_s_devicename_s, __pyx_k_devicename_s, sizeof(__pyx_k_devicename_s), 0, 0, 1, 0}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, {&__pyx_n_s_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 0, 1, 1}, {&__pyx_kp_s_frequency_s, __pyx_k_frequency_s, sizeof(__pyx_k_frequency_s), 0, 0, 1, 0}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_get_audio_device_names, __pyx_k_get_audio_device_names, sizeof(__pyx_k_get_audio_device_names), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0}, {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_n_s_iscapture, __pyx_k_iscapture, sizeof(__pyx_k_iscapture), 0, 0, 1, 1}, {&__pyx_kp_s_iscapture_s, __pyx_k_iscapture_s, sizeof(__pyx_k_iscapture_s), 0, 0, 1, 0}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1}, {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_numchannels, __pyx_k_numchannels, sizeof(__pyx_k_numchannels), 0, 0, 1, 1}, {&__pyx_kp_s_numchannels_s, __pyx_k_numchannels_s, sizeof(__pyx_k_numchannels_s), 0, 0, 1, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pause, __pyx_k_pause, sizeof(__pyx_k_pause), 0, 0, 1, 1}, {&__pyx_n_s_pause_on, __pyx_k_pause_on, sizeof(__pyx_k_pause_on), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_audio, __pyx_k_pygame__sdl2_audio, sizeof(__pyx_k_pygame__sdl2_audio), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_sdl2, __pyx_k_pygame__sdl2_sdl2, sizeof(__pyx_k_pygame__sdl2_sdl2), 0, 0, 1, 1}, {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sdl2_audio, __pyx_k_src_c_cython_pygame__sdl2_audio, sizeof(__pyx_k_src_c_cython_pygame__sdl2_audio), 0, 0, 1, 0}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0}, {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0}, {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0}, {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0}, {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 61, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 132, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 141, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error) __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "View.MemoryView":582 * def suboffsets(self): * if self.view.suboffsets == NULL: * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) */ __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error); __Pyx_GIVEREF(__pyx_tuple__4); /* "View.MemoryView":679 * tup = index if isinstance(index, tuple) else (index,) * * result = [slice(None)] * ndim # <<<<<<<<<<<<<< * have_slices = False * seen_ellipsis = False */ __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pygame/_sdl2/audio.pyx":132 * self._callback = callback * if not isinstance(devicename, str): * raise TypeError("devicename must be a string") # <<<<<<<<<<<<<< * self._devicename = devicename * */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_devicename_must_be_a_string); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_tuple__18 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "View.MemoryView":101 * try: * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "View.MemoryView":103 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<< * except: * */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "View.MemoryView":309 * return self.name * * cdef generic = Enum("") # <<<<<<<<<<<<<< * cdef strided = Enum("") # default * cdef indirect = Enum("") */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "View.MemoryView":310 * * cdef generic = Enum("") * cdef strided = Enum("") # default # <<<<<<<<<<<<<< * cdef indirect = Enum("") * */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "View.MemoryView":311 * cdef generic = Enum("") * cdef strided = Enum("") # default * cdef indirect = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "View.MemoryView":314 * * * cdef contiguous = Enum("") # <<<<<<<<<<<<<< * cdef indirect_contiguous = Enum("") * */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "View.MemoryView":315 * * cdef contiguous = Enum("") * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_tuple__26 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(1, 1, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":46 * # https://wiki.libsdl.org/SDL_GetNumAudioDevices * # https://wiki.libsdl.org/SDL_GetAudioDeviceName * def get_audio_device_names(iscapture = False): # <<<<<<<<<<<<<< * """ Returns a list of unique devicenames for each available audio device. * */ __pyx_tuple__28 = PyTuple_Pack(5, __pyx_n_s_iscapture, __pyx_n_s_count, __pyx_n_s_names, __pyx_n_s_i, __pyx_n_s_name); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_audio, __pyx_n_s_get_audio_device_names, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 46, __pyx_L1_error) __pyx_tuple__30 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pygame/_sdl2/audio.pyx":212 * return ret * * def pause(self, int pause_on): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * */ __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pause_on); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_audio, __pyx_n_s_pause, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 212, __pyx_L1_error) /* "pygame/_sdl2/audio.pyx":221 * SDL_PauseAudioDevice(self._deviceid, pause_on) * * def close(self): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * """ */ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_audio, __pyx_n_s_close, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 221, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None); generic = Py_None; Py_INCREF(Py_None); strided = Py_None; Py_INCREF(Py_None); indirect = Py_None; Py_INCREF(Py_None); contiguous = Py_None; Py_INCREF(Py_None); indirect_contiguous = Py_None; Py_INCREF(Py_None); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5audio_AudioDevice_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice)) __PYX_ERR(0, 86, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5audio_AudioDevice_spec, __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice) < 0) __PYX_ERR(0, 86, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice = &__pyx_type_6pygame_5_sdl2_5audio_AudioDevice; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice) < 0) __PYX_ERR(0, 86, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 86, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_5_sdl2_5audio_11AudioDevice_4__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_5audio_11AudioDevice_4__init__.doc = __pyx_doc_6pygame_5_sdl2_5audio_11AudioDevice_4__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5audio_11AudioDevice_4__init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AudioDevice_2, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice) < 0) __PYX_ERR(0, 86, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice) < 0) __PYX_ERR(0, 86, __pyx_L1_error) #endif __pyx_vtabptr_array = &__pyx_vtable_array; __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; #if CYTHON_USE_TYPE_SPECS __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array; if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) { __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer; } #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error) #else __pyx_array_type = &__pyx_type___pyx_array; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_array_type->tp_print = 0; #endif if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error) #else __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_MemviewEnum_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error) #endif __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base; #if CYTHON_USE_TYPE_SPECS __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview; if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) { __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer; } #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error) #else __pyx_memoryview_type = &__pyx_type___pyx_memoryview; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_memoryview_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error) #endif __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base; #if CYTHON_USE_TYPE_SPECS __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error) #else __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_memoryviewslice_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error) #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_audio(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_audio}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "audio", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initaudio(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initaudio(void) #else __Pyx_PyMODINIT_FUNC PyInit_audio(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_audio(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_audio(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; static PyThread_type_lock __pyx_t_8[8]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'audio' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("audio", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "audio" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_audio(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sdl2__audio) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sdl2.audio")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sdl2.audio", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "View.MemoryView":101 * try: * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ goto __pyx_L8; } /* "View.MemoryView":103 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<< * except: * */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L8:; /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "View.MemoryView":104 * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence * except: # <<<<<<<<<<<<<< * * __pyx_collections_abc_Sequence = None */ /*except:*/ { __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); /* "View.MemoryView":106 * except: * * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L7_try_end:; } /* "View.MemoryView":241 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "View.MemoryView":242 * * try: * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< * index = __pyx_collections_abc_Sequence.index * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_array_type); /* "View.MemoryView":243 * try: * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_array_type); /* "View.MemoryView":241 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":244 * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L12_exception_handled; } __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L16_try_end:; } /* "View.MemoryView":309 * return self.name * * cdef generic = Enum("") # <<<<<<<<<<<<<< * cdef strided = Enum("") # default * cdef indirect = Enum("") */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(generic); __Pyx_DECREF_SET(generic, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":310 * * cdef generic = Enum("") * cdef strided = Enum("") # default # <<<<<<<<<<<<<< * cdef indirect = Enum("") * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(strided); __Pyx_DECREF_SET(strided, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":311 * cdef generic = Enum("") * cdef strided = Enum("") # default * cdef indirect = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(indirect); __Pyx_DECREF_SET(indirect, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":314 * * * cdef contiguous = Enum("") # <<<<<<<<<<<<<< * cdef indirect_contiguous = Enum("") * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(contiguous); __Pyx_DECREF_SET(contiguous, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":315 * * cdef contiguous = Enum("") * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(indirect_contiguous); __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":323 * * * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ * PyThread_allocate_lock(), */ __pyx_memoryview_thread_locks_used = 0; /* "View.MemoryView":324 * * cdef int __pyx_memoryview_thread_locks_used = 0 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< * PyThread_allocate_lock(), * PyThread_allocate_lock(), */ __pyx_t_8[0] = PyThread_allocate_lock(); __pyx_t_8[1] = PyThread_allocate_lock(); __pyx_t_8[2] = PyThread_allocate_lock(); __pyx_t_8[3] = PyThread_allocate_lock(); __pyx_t_8[4] = PyThread_allocate_lock(); __pyx_t_8[5] = PyThread_allocate_lock(); __pyx_t_8[6] = PyThread_allocate_lock(); __pyx_t_8[7] = PyThread_allocate_lock(); memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); /* "View.MemoryView":982 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "View.MemoryView":983 * * try: * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< * index = __pyx_collections_abc_Sequence.index * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_memoryviewslice_type); /* "View.MemoryView":984 * try: * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_memoryviewslice_type); /* "View.MemoryView":982 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L22_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":985 * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L18_exception_handled; } __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L22_try_end:; } /* "View.MemoryView":988 * pass * * try: # <<<<<<<<<<<<<< * if __pyx_collections_abc_Sequence: * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "View.MemoryView":989 * * try: * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error) if (__pyx_t_6) { /* "View.MemoryView":993 * * * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence.register(array) * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":994 * * __pyx_collections_abc_Sequence.register(_memoryviewslice) * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<< * except: * pass # ignore failure, it's a minor issue */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":989 * * try: * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":988 * pass * * try: # <<<<<<<<<<<<<< * if __pyx_collections_abc_Sequence: * */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L28_try_end; __pyx_L23_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":995 * __pyx_collections_abc_Sequence.register(_memoryviewslice) * __pyx_collections_abc_Sequence.register(array) * except: # <<<<<<<<<<<<<< * pass # ignore failure, it's a minor issue * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L24_exception_handled; } __pyx_L24_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L28_try_end:; } /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * * */ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_error); __Pyx_GIVEREF(__pyx_n_s_error); if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_error)) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_t_4 = __Pyx_Import(__pyx_n_s_pygame__sdl2_sdl2, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":5 * * # expose constants to python. * AUDIO_U8 = _AUDIO_U8 # <<<<<<<<<<<<<< * AUDIO_S8 = _AUDIO_S8 * AUDIO_U16LSB = _AUDIO_U16LSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_U8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_U8, __pyx_t_4) < 0) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":6 * # expose constants to python. * AUDIO_U8 = _AUDIO_U8 * AUDIO_S8 = _AUDIO_S8 # <<<<<<<<<<<<<< * AUDIO_U16LSB = _AUDIO_U16LSB * AUDIO_S16LSB = _AUDIO_S16LSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S8, __pyx_t_4) < 0) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":7 * AUDIO_U8 = _AUDIO_U8 * AUDIO_S8 = _AUDIO_S8 * AUDIO_U16LSB = _AUDIO_U16LSB # <<<<<<<<<<<<<< * AUDIO_S16LSB = _AUDIO_S16LSB * AUDIO_U16MSB = _AUDIO_U16MSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_U16LSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_U16LSB, __pyx_t_4) < 0) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":8 * AUDIO_S8 = _AUDIO_S8 * AUDIO_U16LSB = _AUDIO_U16LSB * AUDIO_S16LSB = _AUDIO_S16LSB # <<<<<<<<<<<<<< * AUDIO_U16MSB = _AUDIO_U16MSB * AUDIO_S16MSB = _AUDIO_S16MSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S16LSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S16LSB, __pyx_t_4) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":9 * AUDIO_U16LSB = _AUDIO_U16LSB * AUDIO_S16LSB = _AUDIO_S16LSB * AUDIO_U16MSB = _AUDIO_U16MSB # <<<<<<<<<<<<<< * AUDIO_S16MSB = _AUDIO_S16MSB * AUDIO_U16 = _AUDIO_U16 */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_U16MSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_U16MSB, __pyx_t_4) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":10 * AUDIO_S16LSB = _AUDIO_S16LSB * AUDIO_U16MSB = _AUDIO_U16MSB * AUDIO_S16MSB = _AUDIO_S16MSB # <<<<<<<<<<<<<< * AUDIO_U16 = _AUDIO_U16 * AUDIO_S16 = _AUDIO_S16 */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S16MSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S16MSB, __pyx_t_4) < 0) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":11 * AUDIO_U16MSB = _AUDIO_U16MSB * AUDIO_S16MSB = _AUDIO_S16MSB * AUDIO_U16 = _AUDIO_U16 # <<<<<<<<<<<<<< * AUDIO_S16 = _AUDIO_S16 * AUDIO_S32LSB = _AUDIO_S32LSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_U16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_U16, __pyx_t_4) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":12 * AUDIO_S16MSB = _AUDIO_S16MSB * AUDIO_U16 = _AUDIO_U16 * AUDIO_S16 = _AUDIO_S16 # <<<<<<<<<<<<<< * AUDIO_S32LSB = _AUDIO_S32LSB * AUDIO_S32MSB = _AUDIO_S32MSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S16, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":13 * AUDIO_U16 = _AUDIO_U16 * AUDIO_S16 = _AUDIO_S16 * AUDIO_S32LSB = _AUDIO_S32LSB # <<<<<<<<<<<<<< * AUDIO_S32MSB = _AUDIO_S32MSB * AUDIO_S32 = _AUDIO_S32 */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S32LSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S32LSB, __pyx_t_4) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":14 * AUDIO_S16 = _AUDIO_S16 * AUDIO_S32LSB = _AUDIO_S32LSB * AUDIO_S32MSB = _AUDIO_S32MSB # <<<<<<<<<<<<<< * AUDIO_S32 = _AUDIO_S32 * AUDIO_F32LSB = _AUDIO_F32LSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S32MSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S32MSB, __pyx_t_4) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":15 * AUDIO_S32LSB = _AUDIO_S32LSB * AUDIO_S32MSB = _AUDIO_S32MSB * AUDIO_S32 = _AUDIO_S32 # <<<<<<<<<<<<<< * AUDIO_F32LSB = _AUDIO_F32LSB * AUDIO_F32MSB = _AUDIO_F32MSB */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_S32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_S32, __pyx_t_4) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":16 * AUDIO_S32MSB = _AUDIO_S32MSB * AUDIO_S32 = _AUDIO_S32 * AUDIO_F32LSB = _AUDIO_F32LSB # <<<<<<<<<<<<<< * AUDIO_F32MSB = _AUDIO_F32MSB * AUDIO_F32 = _AUDIO_F32 */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_F32LSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_F32LSB, __pyx_t_4) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":17 * AUDIO_S32 = _AUDIO_S32 * AUDIO_F32LSB = _AUDIO_F32LSB * AUDIO_F32MSB = _AUDIO_F32MSB # <<<<<<<<<<<<<< * AUDIO_F32 = _AUDIO_F32 * # So we can get the audio formats as string. */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_F32MSB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_F32MSB, __pyx_t_4) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":18 * AUDIO_F32LSB = _AUDIO_F32LSB * AUDIO_F32MSB = _AUDIO_F32MSB * AUDIO_F32 = _AUDIO_F32 # <<<<<<<<<<<<<< * # So we can get the audio formats as string. * _audio_format_str = { */ __pyx_t_4 = __Pyx_PyInt_From_Uint16(AUDIO_F32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_F32, __pyx_t_4) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":21 * # So we can get the audio formats as string. * _audio_format_str = { * AUDIO_U8: "AUDIO_U8", # <<<<<<<<<<<<<< * AUDIO_S8: "AUDIO_S8", * AUDIO_U16LSB: "AUDIO_U16LSB", */ __pyx_t_4 = __Pyx_PyDict_NewPresized(14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_U8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_U8) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":22 * _audio_format_str = { * AUDIO_U8: "AUDIO_U8", * AUDIO_S8: "AUDIO_S8", # <<<<<<<<<<<<<< * AUDIO_U16LSB: "AUDIO_U16LSB", * AUDIO_S16LSB: "AUDIO_S16LSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S8) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":23 * AUDIO_U8: "AUDIO_U8", * AUDIO_S8: "AUDIO_S8", * AUDIO_U16LSB: "AUDIO_U16LSB", # <<<<<<<<<<<<<< * AUDIO_S16LSB: "AUDIO_S16LSB", * AUDIO_U16MSB: "AUDIO_U16MSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_U16LSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_U16LSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":24 * AUDIO_S8: "AUDIO_S8", * AUDIO_U16LSB: "AUDIO_U16LSB", * AUDIO_S16LSB: "AUDIO_S16LSB", # <<<<<<<<<<<<<< * AUDIO_U16MSB: "AUDIO_U16MSB", * AUDIO_S16MSB: "AUDIO_S16MSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S16LSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S16LSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":25 * AUDIO_U16LSB: "AUDIO_U16LSB", * AUDIO_S16LSB: "AUDIO_S16LSB", * AUDIO_U16MSB: "AUDIO_U16MSB", # <<<<<<<<<<<<<< * AUDIO_S16MSB: "AUDIO_S16MSB", * AUDIO_U16: "AUDIO_U16", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_U16MSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_U16MSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":26 * AUDIO_S16LSB: "AUDIO_S16LSB", * AUDIO_U16MSB: "AUDIO_U16MSB", * AUDIO_S16MSB: "AUDIO_S16MSB", # <<<<<<<<<<<<<< * AUDIO_U16: "AUDIO_U16", * AUDIO_S16: "AUDIO_S16", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S16MSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S16MSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":27 * AUDIO_U16MSB: "AUDIO_U16MSB", * AUDIO_S16MSB: "AUDIO_S16MSB", * AUDIO_U16: "AUDIO_U16", # <<<<<<<<<<<<<< * AUDIO_S16: "AUDIO_S16", * AUDIO_S32LSB: "AUDIO_S32LSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_U16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_U16) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":28 * AUDIO_S16MSB: "AUDIO_S16MSB", * AUDIO_U16: "AUDIO_U16", * AUDIO_S16: "AUDIO_S16", # <<<<<<<<<<<<<< * AUDIO_S32LSB: "AUDIO_S32LSB", * AUDIO_S32MSB: "AUDIO_S32MSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S16) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":29 * AUDIO_U16: "AUDIO_U16", * AUDIO_S16: "AUDIO_S16", * AUDIO_S32LSB: "AUDIO_S32LSB", # <<<<<<<<<<<<<< * AUDIO_S32MSB: "AUDIO_S32MSB", * AUDIO_S32: "AUDIO_S32", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S32LSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S32LSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":30 * AUDIO_S16: "AUDIO_S16", * AUDIO_S32LSB: "AUDIO_S32LSB", * AUDIO_S32MSB: "AUDIO_S32MSB", # <<<<<<<<<<<<<< * AUDIO_S32: "AUDIO_S32", * AUDIO_F32LSB: "AUDIO_F32LSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S32MSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S32MSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":31 * AUDIO_S32LSB: "AUDIO_S32LSB", * AUDIO_S32MSB: "AUDIO_S32MSB", * AUDIO_S32: "AUDIO_S32", # <<<<<<<<<<<<<< * AUDIO_F32LSB: "AUDIO_F32LSB", * AUDIO_F32MSB: "AUDIO_F32MSB", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_S32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_S32) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":32 * AUDIO_S32MSB: "AUDIO_S32MSB", * AUDIO_S32: "AUDIO_S32", * AUDIO_F32LSB: "AUDIO_F32LSB", # <<<<<<<<<<<<<< * AUDIO_F32MSB: "AUDIO_F32MSB", * AUDIO_F32: "AUDIO_F32", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_F32LSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_F32LSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":33 * AUDIO_S32: "AUDIO_S32", * AUDIO_F32LSB: "AUDIO_F32LSB", * AUDIO_F32MSB: "AUDIO_F32MSB", # <<<<<<<<<<<<<< * AUDIO_F32: "AUDIO_F32", * } */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_F32MSB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_F32MSB) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/audio.pyx":34 * AUDIO_F32LSB: "AUDIO_F32LSB", * AUDIO_F32MSB: "AUDIO_F32MSB", * AUDIO_F32: "AUDIO_F32", # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_AUDIO_F32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_n_s_AUDIO_F32) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_audio_format_str, __pyx_t_4) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":39 * * # for SDL_OpenAudioDevice. * AUDIO_ALLOW_FREQUENCY_CHANGE = _SDL_AUDIO_ALLOW_FREQUENCY_CHANGE # <<<<<<<<<<<<<< * AUDIO_ALLOW_FORMAT_CHANGE = _SDL_AUDIO_ALLOW_FORMAT_CHANGE * AUDIO_ALLOW_CHANNELS_CHANGE = _SDL_AUDIO_ALLOW_CHANNELS_CHANGE */ __pyx_t_4 = __Pyx_PyInt_From_int(SDL_AUDIO_ALLOW_FREQUENCY_CHANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_ALLOW_FREQUENCY_CHANGE, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":40 * # for SDL_OpenAudioDevice. * AUDIO_ALLOW_FREQUENCY_CHANGE = _SDL_AUDIO_ALLOW_FREQUENCY_CHANGE * AUDIO_ALLOW_FORMAT_CHANGE = _SDL_AUDIO_ALLOW_FORMAT_CHANGE # <<<<<<<<<<<<<< * AUDIO_ALLOW_CHANNELS_CHANGE = _SDL_AUDIO_ALLOW_CHANNELS_CHANGE * AUDIO_ALLOW_ANY_CHANGE = _SDL_AUDIO_ALLOW_ANY_CHANGE */ __pyx_t_4 = __Pyx_PyInt_From_int(SDL_AUDIO_ALLOW_FORMAT_CHANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_ALLOW_FORMAT_CHANGE, __pyx_t_4) < 0) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":41 * AUDIO_ALLOW_FREQUENCY_CHANGE = _SDL_AUDIO_ALLOW_FREQUENCY_CHANGE * AUDIO_ALLOW_FORMAT_CHANGE = _SDL_AUDIO_ALLOW_FORMAT_CHANGE * AUDIO_ALLOW_CHANNELS_CHANGE = _SDL_AUDIO_ALLOW_CHANNELS_CHANGE # <<<<<<<<<<<<<< * AUDIO_ALLOW_ANY_CHANGE = _SDL_AUDIO_ALLOW_ANY_CHANGE * */ __pyx_t_4 = __Pyx_PyInt_From_int(SDL_AUDIO_ALLOW_CHANNELS_CHANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_ALLOW_CHANNELS_CHANGE, __pyx_t_4) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":42 * AUDIO_ALLOW_FORMAT_CHANGE = _SDL_AUDIO_ALLOW_FORMAT_CHANGE * AUDIO_ALLOW_CHANNELS_CHANGE = _SDL_AUDIO_ALLOW_CHANNELS_CHANGE * AUDIO_ALLOW_ANY_CHANGE = _SDL_AUDIO_ALLOW_ANY_CHANGE # <<<<<<<<<<<<<< * * # https://wiki.libsdl.org/SDL_GetNumAudioDevices */ __pyx_t_4 = __Pyx_PyInt_From_int(SDL_AUDIO_ALLOW_ANY_CHANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AUDIO_ALLOW_ANY_CHANGE, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":46 * # https://wiki.libsdl.org/SDL_GetNumAudioDevices * # https://wiki.libsdl.org/SDL_GetAudioDeviceName * def get_audio_device_names(iscapture = False): # <<<<<<<<<<<<<< * """ Returns a list of unique devicenames for each available audio device. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5audio_1get_audio_device_names, 0, __pyx_n_s_get_audio_device_names, NULL, __pyx_n_s_pygame__sdl2_audio, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__30); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_audio_device_names, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":69 * return names * * import traceback # <<<<<<<<<<<<<< * cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: * """ This is called in a thread made by SDL. */ __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_traceback, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":212 * return ret * * def pause(self, int pause_on): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_9pause, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AudioDevice_pause, NULL, __pyx_n_s_pygame__sdl2_audio, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice, __pyx_n_s_pause, __pyx_t_4) < 0) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice); /* "pygame/_sdl2/audio.pyx":221 * SDL_PauseAudioDevice(self._deviceid, pause_on) * * def close(self): # <<<<<<<<<<<<<< * """ Use this to pause and unpause audio playback on this device. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_11close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AudioDevice_close, NULL, __pyx_n_s_pygame__sdl2_audio, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice, __pyx_n_s_close, __pyx_t_4) < 0) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5audio_AudioDevice); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AudioDevice___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_audio, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5audio_11AudioDevice_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AudioDevice___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_audio, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/audio.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sdl2.audio", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sdl2.audio"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; __Pyx_TypeName obj_type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } type_name = __Pyx_PyType_GetName(type); obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); __Pyx_DECREF_TypeName(type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* RaiseUnexpectedTypeError */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) { __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, expected, obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* CIntToDigits */ static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" "20212223242526272829" "30313233343536373839" "40414243444546474849" "50515253545556575859" "60616263646566676869" "70717273747576777879" "80818283848586878889" "90919293949596979899" }; static const char DIGIT_PAIRS_8[2*8*8+1] = { "0001020304050607" "1011121314151617" "2021222324252627" "3031323334353637" "4041424344454647" "5051525354555657" "6061626364656667" "7071727374757677" }; static const char DIGITS_HEX[2*16+1] = { "0123456789abcdef" "0123456789ABCDEF" }; /* BuildPyUnicode */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; Py_ssize_t uoffset = ulength - clength; #if CYTHON_USE_UNICODE_INTERNALS Py_ssize_t i; #if CYTHON_PEP393_ENABLED void *udata; uval = PyUnicode_New(ulength, 127); if (unlikely(!uval)) return NULL; udata = PyUnicode_DATA(uval); #else Py_UNICODE *udata; uval = PyUnicode_FromUnicode(NULL, ulength); if (unlikely(!uval)) return NULL; udata = PyUnicode_AS_UNICODE(uval); #endif if (uoffset > 0) { i = 0; if (prepend_sign) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); i++; } for (; i < uoffset; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); } } for (i=0; i < clength; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); } #else { PyObject *sign = NULL, *padding = NULL; uval = NULL; if (uoffset > 0) { prepend_sign = !!prepend_sign; if (uoffset > prepend_sign) { padding = PyUnicode_FromOrdinal(padding_char); if (likely(padding) && uoffset > prepend_sign + 1) { PyObject *tmp; PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign); if (unlikely(!repeat)) goto done_or_error; tmp = PyNumber_Multiply(padding, repeat); Py_DECREF(repeat); Py_DECREF(padding); padding = tmp; } if (unlikely(!padding)) goto done_or_error; } if (prepend_sign) { sign = PyUnicode_FromOrdinal('-'); if (unlikely(!sign)) goto done_or_error; } } uval = PyUnicode_DecodeASCII(chars, clength, NULL); if (likely(uval) && padding) { PyObject *tmp = PyNumber_Add(padding, uval); Py_DECREF(uval); uval = tmp; } if (likely(uval) && sign) { PyObject *tmp = PyNumber_Add(sign, uval); Py_DECREF(uval); uval = tmp; } done_or_error: Py_XDECREF(padding); Py_XDECREF(sign); } #endif return uval; } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(int)*3+2]; char *dpos, *end = digits + sizeof(int)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; int remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (int) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (int) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (int) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (Py_ssize_t) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (Py_ssize_t) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (Py_ssize_t) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* JoinPyUnicode */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; int result_ukind, kind_shift; Py_ssize_t i, char_pos; void *result_udata; CYTHON_MAYBE_UNUSED_VAR(max_char); #if CYTHON_PEP393_ENABLED result_uval = PyUnicode_New(result_ulength, max_char); if (unlikely(!result_uval)) return NULL; result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; result_udata = PyUnicode_DATA(result_uval); #else result_uval = PyUnicode_FromUnicode(NULL, result_ulength); if (unlikely(!result_uval)) return NULL; result_ukind = sizeof(Py_UNICODE); kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1; result_udata = PyUnicode_AS_UNICODE(result_uval); #endif assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); char_pos = 0; for (i=0; i < value_count; i++) { int ukind; Py_ssize_t ulength; void *udata; PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); if (unlikely(__Pyx_PyUnicode_READY(uval))) goto bad; ulength = __Pyx_PyUnicode_GET_LENGTH(uval); if (unlikely(!ulength)) continue; if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) goto overflow; ukind = __Pyx_PyUnicode_KIND(uval); udata = __Pyx_PyUnicode_DATA(uval); if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); } else { #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); #else Py_ssize_t j; for (j=0; j < ulength; j++) { Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); } #endif } char_pos += ulength; } return result_uval; overflow: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); bad: Py_DECREF(result_uval); return NULL; #else CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); CYTHON_UNUSED_VAR(value_count); return PyUnicode_Join(__pyx_empty_unicode, value_tuple); #endif } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { PyObject *runerr = NULL; Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); __Pyx_DECREF_TypeName(index_type_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); if (!meth) { PyErr_Clear(); } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; } } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { PyTypeObject *tp = Py_TYPE(obj); PyMappingMethods *mm = tp->tp_as_mapping; PySequenceMethods *sm = tp->tp_as_sequence; if (likely(mm && mm->mp_subscript)) { return mm->mp_subscript(obj, key); } if (likely(sm && sm->sq_item)) { return __Pyx_PyObject_GetIndex(obj, key); } return __Pyx_PyObject_GetItem_Slow(obj, key); } #endif /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* DivInt[Py_ssize_t] */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* GetAttr3 */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 int res = PyObject_GetOptionalAttr(o, n, &r); return (res != 0) ? r : __Pyx_NewRef(d); #else #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { r = __Pyx_NewRef(d); } return r; } #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); #endif } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type = NULL, *local_value, *local_tb = NULL; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; #if PY_VERSION_HEX >= 0x030C00A6 local_value = tstate->current_exception; tstate->current_exception = 0; if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 if (unlikely(tstate->current_exception)) #elif CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; #endif } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; tmp_value = exc_info->exc_value; exc_info->exc_value = *value; if (tmp_value == NULL || tmp_value == Py_None) { Py_XDECREF(tmp_value); tmp_value = NULL; tmp_type = NULL; tmp_tb = NULL; } else { tmp_type = (PyObject*) Py_TYPE(tmp_value); Py_INCREF(tmp_type); #if CYTHON_COMPILING_IN_CPYTHON tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; Py_XINCREF(tmp_tb); #else tmp_tb = PyException_GetTraceback(tmp_value); #endif } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* ImportDottedModule */ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; if (unlikely(PyErr_Occurred())) { PyErr_Clear(); } if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { partial_name = name; } else { slice = PySequence_GetSlice(parts_tuple, 0, count); if (unlikely(!slice)) goto bad; sep = PyUnicode_FromStringAndSize(".", 1); if (unlikely(!sep)) goto bad; partial_name = PyUnicode_Join(sep, slice); } PyErr_Format( #if PY_MAJOR_VERSION < 3 PyExc_ImportError, "No module named '%s'", PyString_AS_STRING(partial_name)); #else #if PY_VERSION_HEX >= 0x030600B1 PyExc_ModuleNotFoundError, #else PyExc_ImportError, #endif "No module named '%U'", partial_name); #endif bad: Py_XDECREF(sep); Py_XDECREF(slice); Py_XDECREF(partial_name); return NULL; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { PyObject *imported_module; #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) return NULL; imported_module = __Pyx_PyDict_GetItemStr(modules, name); Py_XINCREF(imported_module); #else imported_module = PyImport_GetModule(name); #endif return imported_module; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { Py_ssize_t i, nparts; nparts = PyTuple_GET_SIZE(parts_tuple); for (i=1; i < nparts && module; i++) { PyObject *part, *submodule; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS part = PyTuple_GET_ITEM(parts_tuple, i); #else part = PySequence_ITEM(parts_tuple, i); #endif submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(part); #endif Py_DECREF(module); module = submodule; } if (unlikely(!module)) { return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); } return module; } #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 PyObject *module, *from_list, *star = __pyx_n_s__3; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); module = __Pyx_Import(name, from_list, 0); Py_DECREF(from_list); return module; #else PyObject *imported_module; PyObject *module = __Pyx_Import(name, NULL, 0); if (!parts_tuple || unlikely(!module)) return module; imported_module = __Pyx__ImportDottedModule_Lookup(name); if (likely(imported_module)) { Py_DECREF(module); return imported_module; } PyErr_Clear(); return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); #endif } static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); if (likely(module)) { PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); if (likely(spec)) { PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { Py_DECREF(spec); spec = NULL; } Py_XDECREF(unsafe); } if (likely(!spec)) { PyErr_Clear(); return module; } Py_DECREF(spec); Py_DECREF(module); } else if (PyErr_Occurred()) { PyErr_Clear(); } #endif return __Pyx__ImportDottedModule(name, parts_tuple); } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; itp_as_sequence && type->tp_as_sequence->sq_repeat)) { return type->tp_as_sequence->sq_repeat(seq, mul); } else #endif { return __Pyx_PySequence_Multiply_Generic(seq, mul); } } /* SetItemInt */ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (unlikely(!j)) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_ass_subscript) { int r; PyObject *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return -1; r = mm->mp_ass_subscript(o, key, v); Py_DECREF(key); return r; } if (likely(sm && sm->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return -1; PyErr_Clear(); } } return sm->sq_ass_item(o, i, v); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } /* RaiseUnboundLocalError */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* DivInt[long] */ static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (!r) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_GetMethod; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* StringJoin */ static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { (void) __Pyx_PyObject_CallMethod1; #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3 return _PyString_Join(sep, values); #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 return _PyBytes_Join(sep, values); #else return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values); #endif } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(size_t)*3+2]; char *dpos, *end = digits + sizeof(size_t)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; size_t remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (size_t) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (size_t) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (size_t) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* SetVTable */ static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { PyObject *ob = PyCapsule_New(vtable, 0, 0); if (unlikely(!ob)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) #else if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) #endif goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetVTable */ static void* __Pyx_GetVtable(PyTypeObject *type) { void* ptr; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); #else PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); #endif if (!ob) goto bad; ptr = PyCapsule_GetPointer(ob, 0); if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* MergeVTables */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type) { int i; void** base_vtables; __Pyx_TypeName tp_base_name; __Pyx_TypeName base_name; void* unknown = (void*)-1; PyObject* bases = type->tp_bases; int base_depth = 0; { PyTypeObject* base = type->tp_base; while (base) { base_depth += 1; base = base->tp_base; } } base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); base_vtables[0] = unknown; for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); if (base_vtable != NULL) { int j; PyTypeObject* base = type->tp_base; for (j = 0; j < base_depth; j++) { if (base_vtables[j] == unknown) { base_vtables[j] = __Pyx_GetVtable(base); base_vtables[j + 1] = unknown; } if (base_vtables[j] == base_vtable) { break; } else if (base_vtables[j] == NULL) { goto bad; } base = base->tp_base; } } } PyErr_Clear(); free(base_vtables); return 0; bad: tp_base_name = __Pyx_PyType_GetName(type->tp_base); base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); PyErr_Format(PyExc_TypeError, "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); __Pyx_DECREF_TypeName(tp_base_name); __Pyx_DECREF_TypeName(base_name); free(base_vtables); return -1; } #endif /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { __Pyx_TypeName obj_type_name; if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags); obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if ((0)) {} view->obj = NULL; Py_DECREF(obj); } #endif /* MemviewSliceIsContig */ static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) { int i, index, step, start; Py_ssize_t itemsize = mvs.memview->view.itemsize; if (order == 'F') { step = 1; start = 0; } else { step = -1; start = ndim - 1; } for (i = 0; i < ndim; i++) { index = start + step * i; if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) return 0; itemsize *= mvs.shape[index]; } return 1; } /* OverlappingSlices */ static void __pyx_get_array_memory_extents(__Pyx_memviewslice *slice, void **out_start, void **out_end, int ndim, size_t itemsize) { char *start, *end; int i; start = end = slice->data; for (i = 0; i < ndim; i++) { Py_ssize_t stride = slice->strides[i]; Py_ssize_t extent = slice->shape[i]; if (extent == 0) { *out_start = *out_end = start; return; } else { if (stride > 0) end += stride * (extent - 1); else start += stride * (extent - 1); } } *out_start = start; *out_end = end + itemsize; } static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, __Pyx_memviewslice *slice2, int ndim, size_t itemsize) { void *start1, *end1, *start2, *end2; __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); return (start1 < end2) && (start2 < end1); } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* IsLittleEndian */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; uint8_t u8[4]; } S; S.u32 = 0x01020304; return S.u8[0] == 4; } /* BufferFormatCheck */ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t <= '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case '?': return "'bool'"; case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparsable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) { CYTHON_UNUSED_VAR(is_complex); switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) { CYTHON_UNUSED_VAR(is_complex); switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static int __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number, ndim; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return -1; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1; ndim = ctx->head->field->type->ndim; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return -1; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); return -1; } if (*ts != ',' && *ts != ')') { PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); return -1; } if (*ts == ',') ts++; i++; } if (i != ndim) { PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); return -1; } if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return -1; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return 0; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } CYTHON_FALLTHROUGH; case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } CYTHON_FALLTHROUGH; case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } /* TypeInfoCompare */ static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) { int i; if (!a || !b) return 0; if (a == b) return 1; if (a->size != b->size || a->typegroup != b->typegroup || a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { if (a->typegroup == 'H' || b->typegroup == 'H') { return a->size == b->size; } else { return 0; } } if (a->ndim) { for (i = 0; i < a->ndim; i++) if (a->arraysize[i] != b->arraysize[i]) return 0; } if (a->typegroup == 'S') { if (a->flags != b->flags) return 0; if (a->fields || b->fields) { if (!(a->fields && b->fields)) return 0; for (i = 0; a->fields[i].type && b->fields[i].type; i++) { __Pyx_StructField *field_a = a->fields + i; __Pyx_StructField *field_b = b->fields + i; if (field_a->offset != field_b->offset || !__pyx_typeinfo_cmp(field_a->type, field_b->type)) return 0; } return !a->fields[i].type && !b->fields[i].type; } } return 1; } /* MemviewSliceValidateAndInit */ static int __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) { if (buf->shape[dim] <= 1) return 1; if (buf->strides) { if (spec & __Pyx_MEMVIEW_CONTIG) { if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { if (unlikely(buf->strides[dim] != sizeof(void *))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly contiguous " "in dimension %d.", dim); goto fail; } } else if (unlikely(buf->strides[dim] != buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); goto fail; } } if (spec & __Pyx_MEMVIEW_FOLLOW) { Py_ssize_t stride = buf->strides[dim]; if (stride < 0) stride = -stride; if (unlikely(stride < buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); goto fail; } } } else { if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not contiguous in " "dimension %d", dim); goto fail; } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not indirect in " "dimension %d", dim); goto fail; } else if (unlikely(buf->suboffsets)) { PyErr_SetString(PyExc_ValueError, "Buffer exposes suboffsets but no strides"); goto fail; } } return 1; fail: return 0; } static int __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec) { CYTHON_UNUSED_VAR(ndim); if (spec & __Pyx_MEMVIEW_DIRECT) { if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { PyErr_Format(PyExc_ValueError, "Buffer not compatible with direct access " "in dimension %d.", dim); goto fail; } } if (spec & __Pyx_MEMVIEW_PTR) { if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly accessible " "in dimension %d.", dim); goto fail; } } return 1; fail: return 0; } static int __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) { int i; if (c_or_f_flag & __Pyx_IS_F_CONTIG) { Py_ssize_t stride = 1; for (i = 0; i < ndim; i++) { if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not fortran contiguous."); goto fail; } stride = stride * buf->shape[i]; } } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { Py_ssize_t stride = 1; for (i = ndim - 1; i >- 1; i--) { if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not C contiguous."); goto fail; } stride = stride * buf->shape[i]; } } return 1; fail: return 0; } static int __Pyx_ValidateAndInit_memviewslice( int *axes_specs, int c_or_f_flag, int buf_flags, int ndim, __Pyx_TypeInfo *dtype, __Pyx_BufFmt_StackElem stack[], __Pyx_memviewslice *memviewslice, PyObject *original_obj) { struct __pyx_memoryview_obj *memview, *new_memview; __Pyx_RefNannyDeclarations Py_buffer *buf; int i, spec = 0, retval = -1; __Pyx_BufFmt_Context ctx; int from_memoryview = __pyx_memoryview_check(original_obj); __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) original_obj)->typeinfo)) { memview = (struct __pyx_memoryview_obj *) original_obj; new_memview = NULL; } else { memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( original_obj, buf_flags, 0, dtype); new_memview = memview; if (unlikely(!memview)) goto fail; } buf = &memview->view; if (unlikely(buf->ndim != ndim)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", ndim, buf->ndim); goto fail; } if (new_memview) { __Pyx_BufFmt_Init(&ctx, stack, dtype); if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; } if (unlikely((unsigned) buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->len > 0) { for (i = 0; i < ndim; i++) { spec = axes_specs[i]; if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) goto fail; if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) goto fail; } if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) goto fail; } if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, new_memview != NULL) == -1)) { goto fail; } retval = 0; goto no_fail; fail: Py_XDECREF(new_memview); retval = -1; no_fail: __Pyx_RefNannyFinishContext(); return retval; } /* ObjectToMemviewSlice */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(PyObject *obj, int writable_flag) { __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_BufFmt_StackElem stack[1]; int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) }; int retcode; if (obj == Py_None) { result.memview = (struct __pyx_memoryview_obj *) Py_None; return result; } retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0, PyBUF_RECORDS_RO | writable_flag, 1, &__Pyx_TypeInfo_nn_Uint8, stack, &result, obj); if (unlikely(retcode == -1)) goto __pyx_fail; return result; __pyx_fail: result.memview = NULL; result.data = NULL; return result; } /* MemviewDtypeToObject */ static CYTHON_INLINE PyObject *__pyx_memview_get_nn_Uint8(const char *itemp) { return (PyObject *) __Pyx_PyInt_From_Uint8(*(Uint8 *) itemp); } static CYTHON_INLINE int __pyx_memview_set_nn_Uint8(const char *itemp, PyObject *obj) { Uint8 value = __Pyx_PyInt_As_Uint8(obj); if (unlikely((value == ((Uint8)-1)) && PyErr_Occurred())) return 0; *(Uint8 *) itemp = value; return 1; } /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, const char *mode, int ndim, size_t sizeof_dtype, int contig_flag, int dtype_is_object) { __Pyx_RefNannyDeclarations int i; __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } }; struct __pyx_memoryview_obj *from_memview = from_mvs->memview; Py_buffer *buf = &from_memview->view; PyObject *shape_tuple = NULL; PyObject *temp_int = NULL; struct __pyx_array_obj *array_obj = NULL; struct __pyx_memoryview_obj *memview_obj = NULL; __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); for (i = 0; i < ndim; i++) { if (unlikely(from_mvs->suboffsets[i] >= 0)) { PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " "indirect dimensions (axis %d)", i); goto fail; } } shape_tuple = PyTuple_New(ndim); if (unlikely(!shape_tuple)) { goto fail; } __Pyx_GOTREF(shape_tuple); for(i = 0; i < ndim; i++) { temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); if(unlikely(!temp_int)) { goto fail; } else { PyTuple_SET_ITEM(shape_tuple, i, temp_int); temp_int = NULL; } } array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); if (unlikely(!array_obj)) { goto fail; } __Pyx_GOTREF(array_obj); memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( (PyObject *) array_obj, contig_flag, dtype_is_object, from_mvs->memview->typeinfo); if (unlikely(!memview_obj)) goto fail; if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) goto fail; if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, dtype_is_object) < 0)) goto fail; goto no_fail; fail: __Pyx_XDECREF(new_mvs.memview); new_mvs.memview = NULL; new_mvs.data = NULL; no_fail: __Pyx_XDECREF(shape_tuple); __Pyx_XDECREF(temp_int); __Pyx_XDECREF(array_obj); __Pyx_RefNannyFinishContext(); return new_mvs; } /* MemviewSliceInit */ static int __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, int ndim, __Pyx_memviewslice *memviewslice, int memview_is_new_reference) { __Pyx_RefNannyDeclarations int i, retval=-1; Py_buffer *buf = &memview->view; __Pyx_RefNannySetupContext("init_memviewslice", 0); if (unlikely(memviewslice->memview || memviewslice->data)) { PyErr_SetString(PyExc_ValueError, "memviewslice is already initialized!"); goto fail; } if (buf->strides) { for (i = 0; i < ndim; i++) { memviewslice->strides[i] = buf->strides[i]; } } else { Py_ssize_t stride = buf->itemsize; for (i = ndim - 1; i >= 0; i--) { memviewslice->strides[i] = stride; stride *= buf->shape[i]; } } for (i = 0; i < ndim; i++) { memviewslice->shape[i] = buf->shape[i]; if (buf->suboffsets) { memviewslice->suboffsets[i] = buf->suboffsets[i]; } else { memviewslice->suboffsets[i] = -1; } } memviewslice->memview = memview; memviewslice->data = (char *)buf->buf; if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { Py_INCREF(memview); } retval = 0; goto no_fail; fail: memviewslice->memview = 0; memviewslice->data = 0; retval = -1; no_fail: __Pyx_RefNannyFinishContext(); return retval; } #ifndef Py_NO_RETURN #define Py_NO_RETURN #endif static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { va_list vargs; char msg[200]; #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES) va_start(vargs, fmt); #else va_start(vargs); #endif vsnprintf(msg, 200, fmt, vargs); va_end(vargs); Py_FatalError(msg); } static CYTHON_INLINE int __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock) { int result; PyThread_acquire_lock(lock, 1); result = (*acquisition_count)++; PyThread_release_lock(lock); return result; } static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock) { int result; PyThread_acquire_lock(lock, 1); result = (*acquisition_count)--; PyThread_release_lock(lock); return result; } static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { __pyx_nonatomic_int_type old_acquisition_count; struct __pyx_memoryview_obj *memview = memslice->memview; if (unlikely(!memview || (PyObject *) memview == Py_None)) { return; } old_acquisition_count = __pyx_add_acquisition_count(memview); if (unlikely(old_acquisition_count <= 0)) { if (likely(old_acquisition_count == 0)) { if (have_gil) { Py_INCREF((PyObject *) memview); } else { PyGILState_STATE _gilstate = PyGILState_Ensure(); Py_INCREF((PyObject *) memview); PyGILState_Release(_gilstate); } } else { __pyx_fatalerror("Acquisition count is %d (line %d)", old_acquisition_count+1, lineno); } } } static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { __pyx_nonatomic_int_type old_acquisition_count; struct __pyx_memoryview_obj *memview = memslice->memview; if (unlikely(!memview || (PyObject *) memview == Py_None)) { memslice->memview = NULL; return; } old_acquisition_count = __pyx_sub_acquisition_count(memview); memslice->data = NULL; if (likely(old_acquisition_count > 1)) { memslice->memview = NULL; } else if (likely(old_acquisition_count == 1)) { if (have_gil) { Py_CLEAR(memslice->memview); } else { PyGILState_STATE _gilstate = PyGILState_Ensure(); Py_CLEAR(memslice->memview); PyGILState_Release(_gilstate); } } else { __pyx_fatalerror("Acquisition count is %d (line %d)", old_acquisition_count-1, lineno); } } /* TypeInfoToFormat */ static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { struct __pyx_typeinfo_string result = { {0} }; char *buf = (char *) result.string; size_t size = type->size; switch (type->typegroup) { case 'H': *buf = 'c'; break; case 'I': case 'U': if (size == 1) *buf = (type->is_unsigned) ? 'B' : 'b'; else if (size == 2) *buf = (type->is_unsigned) ? 'H' : 'h'; else if (size == 4) *buf = (type->is_unsigned) ? 'I' : 'i'; else if (size == 8) *buf = (type->is_unsigned) ? 'Q' : 'q'; break; case 'P': *buf = 'P'; break; case 'C': { __Pyx_TypeInfo complex_type = *type; complex_type.typegroup = 'R'; complex_type.size /= 2; *buf++ = 'Z'; *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; break; } case 'R': if (size == 4) *buf = 'f'; else if (size == 8) *buf = 'd'; else *buf = 'g'; break; } return result; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint16(Uint16 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint16 neg_one = (Uint16) -1, const_zero = (Uint16) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint16) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint16) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint16) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint16) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint16) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint16), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint16)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint8) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint8) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint8) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint8), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint8)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint8) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint8, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint8) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint8 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint8) -1; val = __Pyx_PyInt_As_Uint8(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 2 * PyLong_SHIFT)) { return (Uint8) (((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 3 * PyLong_SHIFT)) { return (Uint8) (((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 4 * PyLong_SHIFT)) { return (Uint8) (((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint8) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint8) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint8) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) ((((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) ((((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) ((((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; } } #endif if ((sizeof(Uint8) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint8 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint8) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint8) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint8) -1; } else { stepval = v; } v = NULL; val = (Uint8) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint8) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint8) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint8) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint8) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint8) 1) << (sizeof(Uint8) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint8) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint8"); return (Uint8) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint8"); return (Uint8) -1; } /* CIntFromPy */ static CYTHON_INLINE Uint16 __Pyx_PyInt_As_Uint16(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint16 neg_one = (Uint16) -1, const_zero = (Uint16) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint16) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint16, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint16) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint16 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint16) -1; val = __Pyx_PyInt_As_Uint16(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint16, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint16) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 2 * PyLong_SHIFT)) { return (Uint16) (((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; case 3: if ((8 * sizeof(Uint16) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 3 * PyLong_SHIFT)) { return (Uint16) (((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; case 4: if ((8 * sizeof(Uint16) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 4 * PyLong_SHIFT)) { return (Uint16) (((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint16) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint16) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint16) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint16, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint16) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint16) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { return (Uint16) ((((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint16) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { return (Uint16) ((((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 4 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint16) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 4 * PyLong_SHIFT)) { return (Uint16) ((((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; } } #endif if ((sizeof(Uint16) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint16) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint16 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint16) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint16) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint16) -1; } else { stepval = v; } v = NULL; val = (Uint16) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint16) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint16) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint16) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint16) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint16) 1) << (sizeof(Uint16) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint16) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint16"); return (Uint16) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint16"); return (Uint16) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint32(Uint32 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint32) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint32) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint32) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint32) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint32) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint32), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint32)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const char neg_one = (char) -1, const_zero = (char) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(char) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (char) val; } } #endif if (unlikely(!PyLong_Check(x))) { char val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (char) -1; val = __Pyx_PyInt_As_char(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 3: if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 4: if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) { return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (char) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(char) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 2: if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -3: if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 3: if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -4: if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 4: if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; } } #endif if ((sizeof(char) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { char val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (char) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (char) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (char) -1; } else { stepval = v; } v = NULL; val = (char) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((char) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((char) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (char) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to char"); return (char) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to char"); return (char) -1; } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name_2); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__38); } return name; } #endif /* CheckBinaryVersion */ static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612188.928127 pygame-2.6.1/src_c/_sdl2/controller.c0000644000175100001770000247106314676242435017064 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sdl2.controller", "sources": [ "src_c/cython/pygame/_sdl2/controller.pyx" ] }, "module_name": "pygame._sdl2.controller" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sdl2__controller #define __PYX_HAVE_API__pygame___sdl2__controller /* Early includes */ #include #include #include "SDL.h" #include "../controllercompat.c" #include "../pygame.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/_sdl2/controller.pyx", "", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_5_sdl2_10controller_Controller; /* "pygame/_sdl2/controller.pxd":107 * cdef void _controller_autoquit() noexcept * * cdef class Controller: # <<<<<<<<<<<<<< * cdef SDL_GameController* _controller * cdef int _index */ struct __pyx_obj_6pygame_5_sdl2_10controller_Controller { PyObject_HEAD SDL_GameController *_controller; int _index; }; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ (likely(is_tuple || PyTuple_Check(tuple)) ?\ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) #endif /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SDL_GameControllerAxis __Pyx_PyInt_As_SDL_GameControllerAxis(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SDL_GameControllerButton __Pyx_PyInt_As_SDL_GameControllerButton(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_bool(SDL_bool value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Sint16(Sint16 value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE Uint16 __Pyx_PyInt_As_Uint16(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* FunctionExport.proto */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* Module declarations from "pygame._sdl2.controller" */ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void); /*proto*/ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sdl2.controller" extern int __pyx_module_is_main_pygame___sdl2__controller; int __pyx_module_is_main_pygame___sdl2__controller = 0; /* Implementation of "pygame._sdl2.controller" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_staticmethod; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_zip; /* #### Code section: string_decls ### */ static const char __pyx_k_a[] = "a"; static const char __pyx_k__2[] = ","; static const char __pyx_k__4[] = ":"; static const char __pyx_k__5[] = ""; static const char __pyx_k__6[] = "{}:{},"; static const char __pyx_k__7[] = "."; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k__48[] = "?"; static const char __pyx_k_joy[] = "joy"; static const char __pyx_k_key[] = "key"; static const char __pyx_k_low[] = "low"; static const char __pyx_k_num[] = "num"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_res[] = "res"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_axis[] = "axis"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_guid[] = "guid"; static const char __pyx_k_high[] = "high"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_keys[] = "keys"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_quit[] = "quit"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_index[] = "index"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_s_s_s[] = "%s,%s,%s"; static const char __pyx_k_split[] = "split"; static const char __pyx_k_state[] = "state"; static const char __pyx_k_utf_8[] = "utf-8"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_button[] = "button"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_get_id[] = "get_id"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_init_2[] = "init"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_remove[] = "remove"; static const char __pyx_k_rumble[] = "rumble"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_mapping[] = "mapping"; static const char __pyx_k_pszGUID[] = "pszGUID"; static const char __pyx_k_str_map[] = "str_map"; static const char __pyx_k_attached[] = "attached"; static const char __pyx_k_duration[] = "duration"; static const char __pyx_k_get_axis[] = "get_axis"; static const char __pyx_k_get_init[] = "get_init"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_get_count[] = "get_count"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_mapstring[] = "mapstring"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_Controller[] = "Controller"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_get_button[] = "get_button"; static const char __pyx_k_CLOSEDCHECK[] = "_CLOSEDCHECK"; static const char __pyx_k_as_joystick[] = "as_joystick"; static const char __pyx_k_controllers[] = "_controllers"; static const char __pyx_k_get_mapping[] = "get_mapping"; static const char __pyx_k_raw_mapping[] = "raw_mapping"; static const char __pyx_k_set_mapping[] = "set_mapping"; static const char __pyx_k_stop_rumble[] = "stop_rumble"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_stringsource[] = ""; static const char __pyx_k_from_joystick[] = "from_joystick"; static const char __pyx_k_is_controller[] = "is_controller"; static const char __pyx_k_low_frequency[] = "low_frequency"; static const char __pyx_k_name_forindex[] = "name_forindex"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_get_eventstate[] = "get_eventstate"; static const char __pyx_k_high_frequency[] = "high_frequency"; static const char __pyx_k_set_eventstate[] = "set_eventstate"; static const char __pyx_k_Controller_init[] = "Controller.init"; static const char __pyx_k_Controller_quit[] = "Controller.quit"; static const char __pyx_k_max_controllers[] = "max_controllers"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_Controller_rumble[] = "Controller.rumble"; static const char __pyx_k_internal_mod_init[] = "_internal_mod_init"; static const char __pyx_k_pygame__sdl2_sdl2[] = "pygame._sdl2.sdl2"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_Controller_attached[] = "Controller.attached"; static const char __pyx_k_Controller_get_axis[] = "Controller.get_axis"; static const char __pyx_k_Controller_get_init[] = "Controller.get_init"; static const char __pyx_k_Controller_get_button[] = "Controller.get_button"; static const char __pyx_k_Controller_as_joystick[] = "Controller.as_joystick"; static const char __pyx_k_Controller_get_mapping[] = "Controller.get_mapping"; static const char __pyx_k_Controller_set_mapping[] = "Controller.set_mapping"; static const char __pyx_k_Controller_stop_rumble[] = "Controller.stop_rumble"; static const char __pyx_k_Controller__CLOSEDCHECK[] = "Controller._CLOSEDCHECK"; static const char __pyx_k_pygame__sdl2_controller[] = "pygame._sdl2.controller"; static const char __pyx_k_Controller_from_joystick[] = "Controller.from_joystick"; static const char __pyx_k_gamecontroller_init_check[] = "_gamecontroller_init_check"; static const char __pyx_k_Controller___reduce_cython[] = "Controller.__reduce_cython__"; static const char __pyx_k_Could_not_open_controller_d[] = "Could not open controller %d."; static const char __pyx_k_Controller___setstate_cython[] = "Controller.__setstate_cython__"; static const char __pyx_k_called_on_a_closed_controller[] = "called on a closed controller"; static const char __pyx_k_Index_is_invalid_or_not_a_suppor[] = "Index is invalid or not a supported joystick."; static const char __pyx_k_gamecontroller_system_not_initia[] = "gamecontroller system not initialized"; static const char __pyx_k_self__controller_cannot_be_conve[] = "self._controller cannot be converted to a Python object for pickling"; static const char __pyx_k_should_be_a_pygame_joystick_Joys[] = "should be a pygame.joystick.Joystick object."; static const char __pyx_k_src_c_cython_pygame__sdl2_contro[] = "src_c/cython/pygame/_sdl2/controller.pyx"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller__gamecontroller_init_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_2_internal_mod_init(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_6get_init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, int __pyx_v_index); /* proto */ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joystick(PyObject *__pyx_v_joy); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, SDL_GameControllerAxis __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, SDL_GameControllerButton __pyx_v_button); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, PyObject *__pyx_v_mapping); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, PyObject *__pyx_v_low_frequency, PyObject *__pyx_v_high_frequency, PyObject *__pyx_v_duration); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_28stop_rumble(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_6pygame_5_sdl2_10controller_Controller(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_6pygame_5_sdl2_10controller_Controller; #endif PyTypeObject *__pyx_ptype_6pygame_5_sdl2_10controller_Controller; PyObject *__pyx_n_s_CLOSEDCHECK; PyObject *__pyx_n_s_Controller; PyObject *__pyx_n_s_Controller__CLOSEDCHECK; PyObject *__pyx_n_s_Controller___reduce_cython; PyObject *__pyx_n_s_Controller___setstate_cython; PyObject *__pyx_n_s_Controller_as_joystick; PyObject *__pyx_n_s_Controller_attached; PyObject *__pyx_n_s_Controller_from_joystick; PyObject *__pyx_n_s_Controller_get_axis; PyObject *__pyx_n_s_Controller_get_button; PyObject *__pyx_n_s_Controller_get_init; PyObject *__pyx_n_s_Controller_get_mapping; PyObject *__pyx_n_s_Controller_init; PyObject *__pyx_n_s_Controller_quit; PyObject *__pyx_n_s_Controller_rumble; PyObject *__pyx_n_s_Controller_set_mapping; PyObject *__pyx_n_s_Controller_stop_rumble; PyObject *__pyx_kp_s_Could_not_open_controller_d; PyObject *__pyx_kp_s_Index_is_invalid_or_not_a_suppor; PyObject *__pyx_n_s_TypeError; PyObject *__pyx_n_s_ValueError; PyObject *__pyx_kp_s__2; PyObject *__pyx_kp_s__4; PyObject *__pyx_n_s__48; PyObject *__pyx_kp_s__5; PyObject *__pyx_kp_s__6; PyObject *__pyx_kp_u__7; PyObject *__pyx_n_s_a; PyObject *__pyx_n_s_append; PyObject *__pyx_n_s_as_joystick; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_attached; PyObject *__pyx_n_s_axis; PyObject *__pyx_n_s_button; PyObject *__pyx_kp_s_called_on_a_closed_controller; PyObject *__pyx_n_s_clear; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_controllers; PyObject *__pyx_n_s_dict; PyObject *__pyx_kp_u_disable; PyObject *__pyx_n_s_duration; PyObject *__pyx_kp_u_enable; PyObject *__pyx_n_s_encode; PyObject *__pyx_n_s_error; PyObject *__pyx_n_s_format; PyObject *__pyx_n_s_from_joystick; PyObject *__pyx_n_s_gamecontroller_init_check; PyObject *__pyx_kp_s_gamecontroller_system_not_initia; PyObject *__pyx_kp_u_gc; PyObject *__pyx_n_s_get_axis; PyObject *__pyx_n_s_get_button; PyObject *__pyx_n_s_get_count; PyObject *__pyx_n_s_get_eventstate; PyObject *__pyx_n_s_get_id; PyObject *__pyx_n_s_get_init; PyObject *__pyx_n_s_get_mapping; PyObject *__pyx_n_s_getstate; PyObject *__pyx_n_s_guid; PyObject *__pyx_n_s_high; PyObject *__pyx_n_s_high_frequency; PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_index; PyObject *__pyx_n_s_init; PyObject *__pyx_n_s_init_2; PyObject *__pyx_n_s_internal_mod_init; PyObject *__pyx_n_s_is_controller; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_items; PyObject *__pyx_n_s_joy; PyObject *__pyx_n_s_key; PyObject *__pyx_n_s_keys; PyObject *__pyx_n_s_kwargs; PyObject *__pyx_n_s_low; PyObject *__pyx_n_s_low_frequency; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_mapping; PyObject *__pyx_n_s_mapstring; PyObject *__pyx_n_s_max_controllers; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_name_2; PyObject *__pyx_n_s_name_forindex; PyObject *__pyx_n_s_num; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_pszGUID; PyObject *__pyx_n_s_pygame__sdl2_controller; PyObject *__pyx_n_s_pygame__sdl2_sdl2; PyObject *__pyx_n_s_pyx_state; PyObject *__pyx_n_s_quit; PyObject *__pyx_n_s_raw_mapping; PyObject *__pyx_n_s_reduce; PyObject *__pyx_n_s_reduce_cython; PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_remove; PyObject *__pyx_n_s_res; PyObject *__pyx_n_s_rumble; PyObject *__pyx_kp_b_s_s_s; PyObject *__pyx_n_s_self; PyObject *__pyx_kp_s_self__controller_cannot_be_conve; PyObject *__pyx_n_s_set_eventstate; PyObject *__pyx_n_s_set_mapping; PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_kp_s_should_be_a_pygame_joystick_Joys; PyObject *__pyx_n_s_split; PyObject *__pyx_kp_s_src_c_cython_pygame__sdl2_contro; PyObject *__pyx_n_s_state; PyObject *__pyx_n_s_staticmethod; PyObject *__pyx_n_s_stop_rumble; PyObject *__pyx_n_s_str_map; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_test; PyObject *__pyx_n_s_update; PyObject *__pyx_kp_s_utf_8; PyObject *__pyx_n_s_value; PyObject *__pyx_n_s_values; PyObject *__pyx_n_s_zip; PyObject *__pyx_int_0; PyObject *__pyx_int_2; PyObject *__pyx_int_65535; PyObject *__pyx_int_neg_1; PyObject *__pyx_tuple_; PyObject *__pyx_slice__3; PyObject *__pyx_tuple__9; PyObject *__pyx_tuple__14; PyObject *__pyx_tuple__17; PyObject *__pyx_tuple__20; PyObject *__pyx_tuple__22; PyObject *__pyx_tuple__24; PyObject *__pyx_tuple__29; PyObject *__pyx_tuple__32; PyObject *__pyx_tuple__34; PyObject *__pyx_tuple__36; PyObject *__pyx_tuple__38; PyObject *__pyx_tuple__40; PyObject *__pyx_tuple__42; PyObject *__pyx_tuple__46; PyObject *__pyx_codeobj__8; PyObject *__pyx_codeobj__10; PyObject *__pyx_codeobj__11; PyObject *__pyx_codeobj__12; PyObject *__pyx_codeobj__13; PyObject *__pyx_codeobj__15; PyObject *__pyx_codeobj__16; PyObject *__pyx_codeobj__18; PyObject *__pyx_codeobj__19; PyObject *__pyx_codeobj__21; PyObject *__pyx_codeobj__23; PyObject *__pyx_codeobj__25; PyObject *__pyx_codeobj__26; PyObject *__pyx_codeobj__27; PyObject *__pyx_codeobj__28; PyObject *__pyx_codeobj__30; PyObject *__pyx_codeobj__31; PyObject *__pyx_codeobj__33; PyObject *__pyx_codeobj__35; PyObject *__pyx_codeobj__37; PyObject *__pyx_codeobj__39; PyObject *__pyx_codeobj__41; PyObject *__pyx_codeobj__43; PyObject *__pyx_codeobj__44; PyObject *__pyx_codeobj__45; PyObject *__pyx_codeobj__47; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_10controller_Controller); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_10controller_Controller); Py_CLEAR(clear_module_state->__pyx_n_s_CLOSEDCHECK); Py_CLEAR(clear_module_state->__pyx_n_s_Controller); Py_CLEAR(clear_module_state->__pyx_n_s_Controller__CLOSEDCHECK); Py_CLEAR(clear_module_state->__pyx_n_s_Controller___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Controller___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_as_joystick); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_attached); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_from_joystick); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_get_axis); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_get_button); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_get_init); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_get_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_init); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_quit); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_rumble); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_set_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_Controller_stop_rumble); Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_open_controller_d); Py_CLEAR(clear_module_state->__pyx_kp_s_Index_is_invalid_or_not_a_suppor); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); Py_CLEAR(clear_module_state->__pyx_kp_s__2); Py_CLEAR(clear_module_state->__pyx_kp_s__4); Py_CLEAR(clear_module_state->__pyx_n_s__48); Py_CLEAR(clear_module_state->__pyx_kp_s__5); Py_CLEAR(clear_module_state->__pyx_kp_s__6); Py_CLEAR(clear_module_state->__pyx_kp_u__7); Py_CLEAR(clear_module_state->__pyx_n_s_a); Py_CLEAR(clear_module_state->__pyx_n_s_append); Py_CLEAR(clear_module_state->__pyx_n_s_as_joystick); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_attached); Py_CLEAR(clear_module_state->__pyx_n_s_axis); Py_CLEAR(clear_module_state->__pyx_n_s_button); Py_CLEAR(clear_module_state->__pyx_kp_s_called_on_a_closed_controller); Py_CLEAR(clear_module_state->__pyx_n_s_clear); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_controllers); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_duration); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_encode); Py_CLEAR(clear_module_state->__pyx_n_s_error); Py_CLEAR(clear_module_state->__pyx_n_s_format); Py_CLEAR(clear_module_state->__pyx_n_s_from_joystick); Py_CLEAR(clear_module_state->__pyx_n_s_gamecontroller_init_check); Py_CLEAR(clear_module_state->__pyx_kp_s_gamecontroller_system_not_initia); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_get_axis); Py_CLEAR(clear_module_state->__pyx_n_s_get_button); Py_CLEAR(clear_module_state->__pyx_n_s_get_count); Py_CLEAR(clear_module_state->__pyx_n_s_get_eventstate); Py_CLEAR(clear_module_state->__pyx_n_s_get_id); Py_CLEAR(clear_module_state->__pyx_n_s_get_init); Py_CLEAR(clear_module_state->__pyx_n_s_get_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_n_s_guid); Py_CLEAR(clear_module_state->__pyx_n_s_high); Py_CLEAR(clear_module_state->__pyx_n_s_high_frequency); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_index); Py_CLEAR(clear_module_state->__pyx_n_s_init); Py_CLEAR(clear_module_state->__pyx_n_s_init_2); Py_CLEAR(clear_module_state->__pyx_n_s_internal_mod_init); Py_CLEAR(clear_module_state->__pyx_n_s_is_controller); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_items); Py_CLEAR(clear_module_state->__pyx_n_s_joy); Py_CLEAR(clear_module_state->__pyx_n_s_key); Py_CLEAR(clear_module_state->__pyx_n_s_keys); Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); Py_CLEAR(clear_module_state->__pyx_n_s_low); Py_CLEAR(clear_module_state->__pyx_n_s_low_frequency); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_mapstring); Py_CLEAR(clear_module_state->__pyx_n_s_max_controllers); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_name_2); Py_CLEAR(clear_module_state->__pyx_n_s_name_forindex); Py_CLEAR(clear_module_state->__pyx_n_s_num); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pszGUID); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_controller); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_quit); Py_CLEAR(clear_module_state->__pyx_n_s_raw_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_remove); Py_CLEAR(clear_module_state->__pyx_n_s_res); Py_CLEAR(clear_module_state->__pyx_n_s_rumble); Py_CLEAR(clear_module_state->__pyx_kp_b_s_s_s); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_kp_s_self__controller_cannot_be_conve); Py_CLEAR(clear_module_state->__pyx_n_s_set_eventstate); Py_CLEAR(clear_module_state->__pyx_n_s_set_mapping); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_kp_s_should_be_a_pygame_joystick_Joys); Py_CLEAR(clear_module_state->__pyx_n_s_split); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_contro); Py_CLEAR(clear_module_state->__pyx_n_s_state); Py_CLEAR(clear_module_state->__pyx_n_s_staticmethod); Py_CLEAR(clear_module_state->__pyx_n_s_stop_rumble); Py_CLEAR(clear_module_state->__pyx_n_s_str_map); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_kp_s_utf_8); Py_CLEAR(clear_module_state->__pyx_n_s_value); Py_CLEAR(clear_module_state->__pyx_n_s_values); Py_CLEAR(clear_module_state->__pyx_n_s_zip); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_2); Py_CLEAR(clear_module_state->__pyx_int_65535); Py_CLEAR(clear_module_state->__pyx_int_neg_1); Py_CLEAR(clear_module_state->__pyx_tuple_); Py_CLEAR(clear_module_state->__pyx_slice__3); Py_CLEAR(clear_module_state->__pyx_tuple__9); Py_CLEAR(clear_module_state->__pyx_tuple__14); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__20); Py_CLEAR(clear_module_state->__pyx_tuple__22); Py_CLEAR(clear_module_state->__pyx_tuple__24); Py_CLEAR(clear_module_state->__pyx_tuple__29); Py_CLEAR(clear_module_state->__pyx_tuple__32); Py_CLEAR(clear_module_state->__pyx_tuple__34); Py_CLEAR(clear_module_state->__pyx_tuple__36); Py_CLEAR(clear_module_state->__pyx_tuple__38); Py_CLEAR(clear_module_state->__pyx_tuple__40); Py_CLEAR(clear_module_state->__pyx_tuple__42); Py_CLEAR(clear_module_state->__pyx_tuple__46); Py_CLEAR(clear_module_state->__pyx_codeobj__8); Py_CLEAR(clear_module_state->__pyx_codeobj__10); Py_CLEAR(clear_module_state->__pyx_codeobj__11); Py_CLEAR(clear_module_state->__pyx_codeobj__12); Py_CLEAR(clear_module_state->__pyx_codeobj__13); Py_CLEAR(clear_module_state->__pyx_codeobj__15); Py_CLEAR(clear_module_state->__pyx_codeobj__16); Py_CLEAR(clear_module_state->__pyx_codeobj__18); Py_CLEAR(clear_module_state->__pyx_codeobj__19); Py_CLEAR(clear_module_state->__pyx_codeobj__21); Py_CLEAR(clear_module_state->__pyx_codeobj__23); Py_CLEAR(clear_module_state->__pyx_codeobj__25); Py_CLEAR(clear_module_state->__pyx_codeobj__26); Py_CLEAR(clear_module_state->__pyx_codeobj__27); Py_CLEAR(clear_module_state->__pyx_codeobj__28); Py_CLEAR(clear_module_state->__pyx_codeobj__30); Py_CLEAR(clear_module_state->__pyx_codeobj__31); Py_CLEAR(clear_module_state->__pyx_codeobj__33); Py_CLEAR(clear_module_state->__pyx_codeobj__35); Py_CLEAR(clear_module_state->__pyx_codeobj__37); Py_CLEAR(clear_module_state->__pyx_codeobj__39); Py_CLEAR(clear_module_state->__pyx_codeobj__41); Py_CLEAR(clear_module_state->__pyx_codeobj__43); Py_CLEAR(clear_module_state->__pyx_codeobj__44); Py_CLEAR(clear_module_state->__pyx_codeobj__45); Py_CLEAR(clear_module_state->__pyx_codeobj__47); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_10controller_Controller); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_10controller_Controller); Py_VISIT(traverse_module_state->__pyx_n_s_CLOSEDCHECK); Py_VISIT(traverse_module_state->__pyx_n_s_Controller); Py_VISIT(traverse_module_state->__pyx_n_s_Controller__CLOSEDCHECK); Py_VISIT(traverse_module_state->__pyx_n_s_Controller___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Controller___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_as_joystick); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_attached); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_from_joystick); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_get_axis); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_get_button); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_get_init); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_get_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_init); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_quit); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_rumble); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_set_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_Controller_stop_rumble); Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_open_controller_d); Py_VISIT(traverse_module_state->__pyx_kp_s_Index_is_invalid_or_not_a_suppor); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); Py_VISIT(traverse_module_state->__pyx_kp_s__2); Py_VISIT(traverse_module_state->__pyx_kp_s__4); Py_VISIT(traverse_module_state->__pyx_n_s__48); Py_VISIT(traverse_module_state->__pyx_kp_s__5); Py_VISIT(traverse_module_state->__pyx_kp_s__6); Py_VISIT(traverse_module_state->__pyx_kp_u__7); Py_VISIT(traverse_module_state->__pyx_n_s_a); Py_VISIT(traverse_module_state->__pyx_n_s_append); Py_VISIT(traverse_module_state->__pyx_n_s_as_joystick); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_attached); Py_VISIT(traverse_module_state->__pyx_n_s_axis); Py_VISIT(traverse_module_state->__pyx_n_s_button); Py_VISIT(traverse_module_state->__pyx_kp_s_called_on_a_closed_controller); Py_VISIT(traverse_module_state->__pyx_n_s_clear); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_controllers); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_duration); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_encode); Py_VISIT(traverse_module_state->__pyx_n_s_error); Py_VISIT(traverse_module_state->__pyx_n_s_format); Py_VISIT(traverse_module_state->__pyx_n_s_from_joystick); Py_VISIT(traverse_module_state->__pyx_n_s_gamecontroller_init_check); Py_VISIT(traverse_module_state->__pyx_kp_s_gamecontroller_system_not_initia); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_get_axis); Py_VISIT(traverse_module_state->__pyx_n_s_get_button); Py_VISIT(traverse_module_state->__pyx_n_s_get_count); Py_VISIT(traverse_module_state->__pyx_n_s_get_eventstate); Py_VISIT(traverse_module_state->__pyx_n_s_get_id); Py_VISIT(traverse_module_state->__pyx_n_s_get_init); Py_VISIT(traverse_module_state->__pyx_n_s_get_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_n_s_guid); Py_VISIT(traverse_module_state->__pyx_n_s_high); Py_VISIT(traverse_module_state->__pyx_n_s_high_frequency); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_index); Py_VISIT(traverse_module_state->__pyx_n_s_init); Py_VISIT(traverse_module_state->__pyx_n_s_init_2); Py_VISIT(traverse_module_state->__pyx_n_s_internal_mod_init); Py_VISIT(traverse_module_state->__pyx_n_s_is_controller); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_items); Py_VISIT(traverse_module_state->__pyx_n_s_joy); Py_VISIT(traverse_module_state->__pyx_n_s_key); Py_VISIT(traverse_module_state->__pyx_n_s_keys); Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); Py_VISIT(traverse_module_state->__pyx_n_s_low); Py_VISIT(traverse_module_state->__pyx_n_s_low_frequency); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_mapstring); Py_VISIT(traverse_module_state->__pyx_n_s_max_controllers); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_name_2); Py_VISIT(traverse_module_state->__pyx_n_s_name_forindex); Py_VISIT(traverse_module_state->__pyx_n_s_num); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pszGUID); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_controller); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_quit); Py_VISIT(traverse_module_state->__pyx_n_s_raw_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_remove); Py_VISIT(traverse_module_state->__pyx_n_s_res); Py_VISIT(traverse_module_state->__pyx_n_s_rumble); Py_VISIT(traverse_module_state->__pyx_kp_b_s_s_s); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_kp_s_self__controller_cannot_be_conve); Py_VISIT(traverse_module_state->__pyx_n_s_set_eventstate); Py_VISIT(traverse_module_state->__pyx_n_s_set_mapping); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_kp_s_should_be_a_pygame_joystick_Joys); Py_VISIT(traverse_module_state->__pyx_n_s_split); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_contro); Py_VISIT(traverse_module_state->__pyx_n_s_state); Py_VISIT(traverse_module_state->__pyx_n_s_staticmethod); Py_VISIT(traverse_module_state->__pyx_n_s_stop_rumble); Py_VISIT(traverse_module_state->__pyx_n_s_str_map); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_kp_s_utf_8); Py_VISIT(traverse_module_state->__pyx_n_s_value); Py_VISIT(traverse_module_state->__pyx_n_s_values); Py_VISIT(traverse_module_state->__pyx_n_s_zip); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_2); Py_VISIT(traverse_module_state->__pyx_int_65535); Py_VISIT(traverse_module_state->__pyx_int_neg_1); Py_VISIT(traverse_module_state->__pyx_tuple_); Py_VISIT(traverse_module_state->__pyx_slice__3); Py_VISIT(traverse_module_state->__pyx_tuple__9); Py_VISIT(traverse_module_state->__pyx_tuple__14); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__20); Py_VISIT(traverse_module_state->__pyx_tuple__22); Py_VISIT(traverse_module_state->__pyx_tuple__24); Py_VISIT(traverse_module_state->__pyx_tuple__29); Py_VISIT(traverse_module_state->__pyx_tuple__32); Py_VISIT(traverse_module_state->__pyx_tuple__34); Py_VISIT(traverse_module_state->__pyx_tuple__36); Py_VISIT(traverse_module_state->__pyx_tuple__38); Py_VISIT(traverse_module_state->__pyx_tuple__40); Py_VISIT(traverse_module_state->__pyx_tuple__42); Py_VISIT(traverse_module_state->__pyx_tuple__46); Py_VISIT(traverse_module_state->__pyx_codeobj__8); Py_VISIT(traverse_module_state->__pyx_codeobj__10); Py_VISIT(traverse_module_state->__pyx_codeobj__11); Py_VISIT(traverse_module_state->__pyx_codeobj__12); Py_VISIT(traverse_module_state->__pyx_codeobj__13); Py_VISIT(traverse_module_state->__pyx_codeobj__15); Py_VISIT(traverse_module_state->__pyx_codeobj__16); Py_VISIT(traverse_module_state->__pyx_codeobj__18); Py_VISIT(traverse_module_state->__pyx_codeobj__19); Py_VISIT(traverse_module_state->__pyx_codeobj__21); Py_VISIT(traverse_module_state->__pyx_codeobj__23); Py_VISIT(traverse_module_state->__pyx_codeobj__25); Py_VISIT(traverse_module_state->__pyx_codeobj__26); Py_VISIT(traverse_module_state->__pyx_codeobj__27); Py_VISIT(traverse_module_state->__pyx_codeobj__28); Py_VISIT(traverse_module_state->__pyx_codeobj__30); Py_VISIT(traverse_module_state->__pyx_codeobj__31); Py_VISIT(traverse_module_state->__pyx_codeobj__33); Py_VISIT(traverse_module_state->__pyx_codeobj__35); Py_VISIT(traverse_module_state->__pyx_codeobj__37); Py_VISIT(traverse_module_state->__pyx_codeobj__39); Py_VISIT(traverse_module_state->__pyx_codeobj__41); Py_VISIT(traverse_module_state->__pyx_codeobj__43); Py_VISIT(traverse_module_state->__pyx_codeobj__44); Py_VISIT(traverse_module_state->__pyx_codeobj__45); Py_VISIT(traverse_module_state->__pyx_codeobj__47); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_5_sdl2_10controller_Controller __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_10controller_Controller #endif #define __pyx_ptype_6pygame_5_sdl2_10controller_Controller __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_10controller_Controller #define __pyx_n_s_CLOSEDCHECK __pyx_mstate_global->__pyx_n_s_CLOSEDCHECK #define __pyx_n_s_Controller __pyx_mstate_global->__pyx_n_s_Controller #define __pyx_n_s_Controller__CLOSEDCHECK __pyx_mstate_global->__pyx_n_s_Controller__CLOSEDCHECK #define __pyx_n_s_Controller___reduce_cython __pyx_mstate_global->__pyx_n_s_Controller___reduce_cython #define __pyx_n_s_Controller___setstate_cython __pyx_mstate_global->__pyx_n_s_Controller___setstate_cython #define __pyx_n_s_Controller_as_joystick __pyx_mstate_global->__pyx_n_s_Controller_as_joystick #define __pyx_n_s_Controller_attached __pyx_mstate_global->__pyx_n_s_Controller_attached #define __pyx_n_s_Controller_from_joystick __pyx_mstate_global->__pyx_n_s_Controller_from_joystick #define __pyx_n_s_Controller_get_axis __pyx_mstate_global->__pyx_n_s_Controller_get_axis #define __pyx_n_s_Controller_get_button __pyx_mstate_global->__pyx_n_s_Controller_get_button #define __pyx_n_s_Controller_get_init __pyx_mstate_global->__pyx_n_s_Controller_get_init #define __pyx_n_s_Controller_get_mapping __pyx_mstate_global->__pyx_n_s_Controller_get_mapping #define __pyx_n_s_Controller_init __pyx_mstate_global->__pyx_n_s_Controller_init #define __pyx_n_s_Controller_quit __pyx_mstate_global->__pyx_n_s_Controller_quit #define __pyx_n_s_Controller_rumble __pyx_mstate_global->__pyx_n_s_Controller_rumble #define __pyx_n_s_Controller_set_mapping __pyx_mstate_global->__pyx_n_s_Controller_set_mapping #define __pyx_n_s_Controller_stop_rumble __pyx_mstate_global->__pyx_n_s_Controller_stop_rumble #define __pyx_kp_s_Could_not_open_controller_d __pyx_mstate_global->__pyx_kp_s_Could_not_open_controller_d #define __pyx_kp_s_Index_is_invalid_or_not_a_suppor __pyx_mstate_global->__pyx_kp_s_Index_is_invalid_or_not_a_suppor #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError #define __pyx_kp_s__2 __pyx_mstate_global->__pyx_kp_s__2 #define __pyx_kp_s__4 __pyx_mstate_global->__pyx_kp_s__4 #define __pyx_n_s__48 __pyx_mstate_global->__pyx_n_s__48 #define __pyx_kp_s__5 __pyx_mstate_global->__pyx_kp_s__5 #define __pyx_kp_s__6 __pyx_mstate_global->__pyx_kp_s__6 #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append #define __pyx_n_s_as_joystick __pyx_mstate_global->__pyx_n_s_as_joystick #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_attached __pyx_mstate_global->__pyx_n_s_attached #define __pyx_n_s_axis __pyx_mstate_global->__pyx_n_s_axis #define __pyx_n_s_button __pyx_mstate_global->__pyx_n_s_button #define __pyx_kp_s_called_on_a_closed_controller __pyx_mstate_global->__pyx_kp_s_called_on_a_closed_controller #define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_controllers __pyx_mstate_global->__pyx_n_s_controllers #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_duration __pyx_mstate_global->__pyx_n_s_duration #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format #define __pyx_n_s_from_joystick __pyx_mstate_global->__pyx_n_s_from_joystick #define __pyx_n_s_gamecontroller_init_check __pyx_mstate_global->__pyx_n_s_gamecontroller_init_check #define __pyx_kp_s_gamecontroller_system_not_initia __pyx_mstate_global->__pyx_kp_s_gamecontroller_system_not_initia #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_get_axis __pyx_mstate_global->__pyx_n_s_get_axis #define __pyx_n_s_get_button __pyx_mstate_global->__pyx_n_s_get_button #define __pyx_n_s_get_count __pyx_mstate_global->__pyx_n_s_get_count #define __pyx_n_s_get_eventstate __pyx_mstate_global->__pyx_n_s_get_eventstate #define __pyx_n_s_get_id __pyx_mstate_global->__pyx_n_s_get_id #define __pyx_n_s_get_init __pyx_mstate_global->__pyx_n_s_get_init #define __pyx_n_s_get_mapping __pyx_mstate_global->__pyx_n_s_get_mapping #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_n_s_guid __pyx_mstate_global->__pyx_n_s_guid #define __pyx_n_s_high __pyx_mstate_global->__pyx_n_s_high #define __pyx_n_s_high_frequency __pyx_mstate_global->__pyx_n_s_high_frequency #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init #define __pyx_n_s_init_2 __pyx_mstate_global->__pyx_n_s_init_2 #define __pyx_n_s_internal_mod_init __pyx_mstate_global->__pyx_n_s_internal_mod_init #define __pyx_n_s_is_controller __pyx_mstate_global->__pyx_n_s_is_controller #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items #define __pyx_n_s_joy __pyx_mstate_global->__pyx_n_s_joy #define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs #define __pyx_n_s_low __pyx_mstate_global->__pyx_n_s_low #define __pyx_n_s_low_frequency __pyx_mstate_global->__pyx_n_s_low_frequency #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_mapping __pyx_mstate_global->__pyx_n_s_mapping #define __pyx_n_s_mapstring __pyx_mstate_global->__pyx_n_s_mapstring #define __pyx_n_s_max_controllers __pyx_mstate_global->__pyx_n_s_max_controllers #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 #define __pyx_n_s_name_forindex __pyx_mstate_global->__pyx_n_s_name_forindex #define __pyx_n_s_num __pyx_mstate_global->__pyx_n_s_num #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pszGUID __pyx_mstate_global->__pyx_n_s_pszGUID #define __pyx_n_s_pygame__sdl2_controller __pyx_mstate_global->__pyx_n_s_pygame__sdl2_controller #define __pyx_n_s_pygame__sdl2_sdl2 __pyx_mstate_global->__pyx_n_s_pygame__sdl2_sdl2 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_quit __pyx_mstate_global->__pyx_n_s_quit #define __pyx_n_s_raw_mapping __pyx_mstate_global->__pyx_n_s_raw_mapping #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove #define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res #define __pyx_n_s_rumble __pyx_mstate_global->__pyx_n_s_rumble #define __pyx_kp_b_s_s_s __pyx_mstate_global->__pyx_kp_b_s_s_s #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_kp_s_self__controller_cannot_be_conve __pyx_mstate_global->__pyx_kp_s_self__controller_cannot_be_conve #define __pyx_n_s_set_eventstate __pyx_mstate_global->__pyx_n_s_set_eventstate #define __pyx_n_s_set_mapping __pyx_mstate_global->__pyx_n_s_set_mapping #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_kp_s_should_be_a_pygame_joystick_Joys __pyx_mstate_global->__pyx_kp_s_should_be_a_pygame_joystick_Joys #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split #define __pyx_kp_s_src_c_cython_pygame__sdl2_contro __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sdl2_contro #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state #define __pyx_n_s_staticmethod __pyx_mstate_global->__pyx_n_s_staticmethod #define __pyx_n_s_stop_rumble __pyx_mstate_global->__pyx_n_s_stop_rumble #define __pyx_n_s_str_map __pyx_mstate_global->__pyx_n_s_str_map #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_kp_s_utf_8 __pyx_mstate_global->__pyx_kp_s_utf_8 #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values #define __pyx_n_s_zip __pyx_mstate_global->__pyx_n_s_zip #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 #define __pyx_int_65535 __pyx_mstate_global->__pyx_int_65535 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ #define __pyx_slice__3 __pyx_mstate_global->__pyx_slice__3 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9 #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8 #define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 #define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18 #define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 /* #### Code section: module_code ### */ /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def _gamecontroller_init_check(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_1_gamecontroller_init_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_1_gamecontroller_init_check = {"_gamecontroller_init_check", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_1_gamecontroller_init_check, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_1_gamecontroller_init_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_gamecontroller_init_check (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller__gamecontroller_init_check(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller__gamecontroller_init_check(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_gamecontroller_init_check", 1); /* "pygame/_sdl2/controller.pyx":17 * * def _gamecontroller_init_check(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * raise error("gamecontroller system not initialized") * */ __pyx_t_1 = (!(SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/controller.pyx":18 * def _gamecontroller_init_check(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") # <<<<<<<<<<<<<< * * cdef bint _controller_autoinit() noexcept: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_gamecontroller_system_not_initia}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 18, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":17 * * def _gamecontroller_init_check(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * raise error("gamecontroller system not initialized") * */ } /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def _gamecontroller_init_check(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.controller._gamecontroller_init_check", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":20 * raise error("gamecontroller system not initialized") * * cdef bint _controller_autoinit() noexcept: # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): */ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { int __pyx_r; int __pyx_t_1; /* "pygame/_sdl2/controller.pyx":21 * * cdef bint _controller_autoinit() noexcept: * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): * return False */ __pyx_t_1 = (!(SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0)); if (__pyx_t_1) { /* "pygame/_sdl2/controller.pyx":22 * cdef bint _controller_autoinit() noexcept: * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * return False * #pg_RegisterQuit(_controller_autoquit) */ __pyx_t_1 = (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_1) { /* "pygame/_sdl2/controller.pyx":23 * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): * return False # <<<<<<<<<<<<<< * #pg_RegisterQuit(_controller_autoquit) * return True */ __pyx_r = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":22 * cdef bint _controller_autoinit() noexcept: * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * return False * #pg_RegisterQuit(_controller_autoquit) */ } /* "pygame/_sdl2/controller.pyx":21 * * cdef bint _controller_autoinit() noexcept: * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): * return False */ } /* "pygame/_sdl2/controller.pyx":25 * return False * #pg_RegisterQuit(_controller_autoquit) * return True # <<<<<<<<<<<<<< * * cdef void _controller_autoquit() noexcept: */ __pyx_r = 1; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":20 * raise error("gamecontroller system not initialized") * * cdef bint _controller_autoinit() noexcept: # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/controller.pyx":27 * return True * * cdef void _controller_autoquit() noexcept: # <<<<<<<<<<<<<< * cdef Controller controller * for c in Controller._controllers: */ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_controller = 0; PyObject *__pyx_v_c = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_controller_autoquit", 1); /* "pygame/_sdl2/controller.pyx":29 * cdef void _controller_autoquit() noexcept: * cdef Controller controller * for c in Controller._controllers: # <<<<<<<<<<<<<< * controller = c * controller.quit() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 29, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 29, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 29, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 29, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 29, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":30 * cdef Controller controller * for c in Controller._controllers: * controller = c # <<<<<<<<<<<<<< * controller.quit() * controller._controller = NULL */ if (!(likely(((__pyx_v_c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_c, __pyx_ptype_6pygame_5_sdl2_10controller_Controller))))) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_t_1 = __pyx_v_c; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_controller, ((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_t_1)); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":31 * for c in Controller._controllers: * controller = c * controller.quit() # <<<<<<<<<<<<<< * controller._controller = NULL * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_controller), __pyx_n_s_quit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":32 * controller = c * controller.quit() * controller._controller = NULL # <<<<<<<<<<<<<< * * Controller._controllers.clear() */ __pyx_v_controller->_controller = NULL; /* "pygame/_sdl2/controller.pyx":29 * cdef void _controller_autoquit() noexcept: * cdef Controller controller * for c in Controller._controllers: # <<<<<<<<<<<<<< * controller = c * controller.quit() */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":34 * controller._controller = NULL * * Controller._controllers.clear() # <<<<<<<<<<<<<< * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":36 * Controller._controllers.clear() * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * */ __pyx_t_8 = (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_8) { /* "pygame/_sdl2/controller.pyx":37 * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) # <<<<<<<<<<<<<< * * # not automatically initialize controller at this moment. */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); /* "pygame/_sdl2/controller.pyx":36 * Controller._controllers.clear() * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * */ } /* "pygame/_sdl2/controller.pyx":27 * return True * * cdef void _controller_autoquit() noexcept: # <<<<<<<<<<<<<< * cdef Controller controller * for c in Controller._controllers: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pygame._sdl2.controller._controller_autoquit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_controller); __Pyx_XDECREF(__pyx_v_c); __Pyx_RefNannyFinishContext(); } /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def _internal_mod_init(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_3_internal_mod_init(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_3_internal_mod_init = {"_internal_mod_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_3_internal_mod_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_3_internal_mod_init(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_internal_mod_init (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_internal_mod_init", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_internal_mod_init", 1))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_2_internal_mod_init(__pyx_self, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_2_internal_mod_init(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_internal_mod_init", 1); /* "pygame/_sdl2/controller.pyx":42 * * def _internal_mod_init(**kwargs): * _controller_autoinit() # <<<<<<<<<<<<<< * * def init(): */ (void)(__pyx_f_6pygame_5_sdl2_10controller__controller_autoinit()); /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def _internal_mod_init(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_5init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_5init = {"init", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_5init, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_5init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_4init(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 1); /* "pygame/_sdl2/controller.pyx":45 * * def init(): * if not _controller_autoinit(): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (!__pyx_f_6pygame_5_sdl2_10controller__controller_autoinit()); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/controller.pyx":46 * def init(): * if not _controller_autoinit(): * raise error() # <<<<<<<<<<<<<< * * def get_init(): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 46, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":45 * * def init(): * if not _controller_autoinit(): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.controller.init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_7get_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_7get_init = {"get_init", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_7get_init, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_7get_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_init (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_6get_init(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_6get_init(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_init", 1); /* "pygame/_sdl2/controller.pyx":49 * * def get_init(): * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 # <<<<<<<<<<<<<< * * def quit(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((!(SDL_WasInit(SDL_INIT_GAMECONTROLLER) == 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.controller.get_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_9quit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_9quit = {"quit", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_9quit, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_9quit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quit (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_8quit(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("quit", 1); /* "pygame/_sdl2/controller.pyx":52 * * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * */ __pyx_t_1 = (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_1) { /* "pygame/_sdl2/controller.pyx":53 * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) # <<<<<<<<<<<<<< * * def set_eventstate(state): */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); /* "pygame/_sdl2/controller.pyx":52 * * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * */ } /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * SDL_GameControllerEventState(int(state)) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_11set_eventstate(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_11set_eventstate = {"set_eventstate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_11set_eventstate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_11set_eventstate(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_eventstate (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_eventstate") < 0)) __PYX_ERR(0, 55, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_eventstate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 55, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.set_eventstate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(__pyx_self, __pyx_v_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_eventstate", 1); /* "pygame/_sdl2/controller.pyx":56 * * def set_eventstate(state): * _gamecontroller_init_check() # <<<<<<<<<<<<<< * SDL_GameControllerEventState(int(state)) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":57 * def set_eventstate(state): * _gamecontroller_init_check() * SDL_GameControllerEventState(int(state)) # <<<<<<<<<<<<<< * * def get_eventstate(): */ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (void)(SDL_GameControllerEventState(__pyx_t_5)); /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * SDL_GameControllerEventState(int(state)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.set_eventstate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * return SDL_GameControllerEventState(-1) == 1 */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_13get_eventstate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_13get_eventstate = {"get_eventstate", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_13get_eventstate, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_13get_eventstate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_eventstate (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_eventstate", 1); /* "pygame/_sdl2/controller.pyx":60 * * def get_eventstate(): * _gamecontroller_init_check() # <<<<<<<<<<<<<< * return SDL_GameControllerEventState(-1) == 1 * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":61 * def get_eventstate(): * _gamecontroller_init_check() * return SDL_GameControllerEventState(-1) == 1 # <<<<<<<<<<<<<< * * def get_count(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerEventState(-1) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * return SDL_GameControllerEventState(-1) == 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.get_eventstate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_15get_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_14get_count, " Returns the number of attached joysticks.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_15get_count = {"get_count", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_15get_count, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_10controller_14get_count}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_15get_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_count (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_14get_count(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_num; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 1); /* "pygame/_sdl2/controller.pyx":66 * """ Returns the number of attached joysticks. * """ * num = SDL_NumJoysticks() # <<<<<<<<<<<<<< * if num < 0: * raise error() */ __pyx_v_num = SDL_NumJoysticks(); /* "pygame/_sdl2/controller.pyx":67 * """ * num = SDL_NumJoysticks() * if num < 0: # <<<<<<<<<<<<<< * raise error() * return num */ __pyx_t_1 = (__pyx_v_num < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/controller.pyx":68 * num = SDL_NumJoysticks() * if num < 0: * raise error() # <<<<<<<<<<<<<< * return num * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 68, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":67 * """ * num = SDL_NumJoysticks() * if num < 0: # <<<<<<<<<<<<<< * raise error() * return num */ } /* "pygame/_sdl2/controller.pyx":69 * if num < 0: * raise error() * return num # <<<<<<<<<<<<<< * * def update(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.controller.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_17update(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_16update, " Will automatically called by the event loop,\n not necessary to call this function.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_17update = {"update", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_17update, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_10controller_16update}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_17update(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_16update(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 1); /* "pygame/_sdl2/controller.pyx":75 * not necessary to call this function. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * SDL_GameControllerUpdate() * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":76 * """ * _gamecontroller_init_check() * SDL_GameControllerUpdate() # <<<<<<<<<<<<<< * * def is_controller(index): */ SDL_GameControllerUpdate(); /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_19is_controller(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_18is_controller, " Check if the given joystick is supported by the game controller interface.\n\n :param int index: Index of the joystick.\n\n :return: 1 if supported, 0 if unsupported or invalid index.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_19is_controller = {"is_controller", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_19is_controller, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_18is_controller}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_19is_controller(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_index = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_controller (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_controller") < 0)) __PYX_ERR(0, 78, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_index = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("is_controller", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 78, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.is_controller", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_18is_controller(__pyx_self, __pyx_v_index); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_controller", 1); /* "pygame/_sdl2/controller.pyx":85 * :return: 1 if supported, 0 if unsupported or invalid index. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * return SDL_IsGameController(index) == 1 * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":86 * """ * _gamecontroller_init_check() * return SDL_IsGameController(index) == 1 # <<<<<<<<<<<<<< * * def name_forindex(index): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_IsGameController(__pyx_t_5) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.is_controller", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_21name_forindex(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_20name_forindex, " Returns the name of controller,\n or NULL if there's no name or the index is invalid.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_21name_forindex = {"name_forindex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_21name_forindex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_20name_forindex}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_21name_forindex(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_index = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("name_forindex (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "name_forindex") < 0)) __PYX_ERR(0, 88, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_index = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("name_forindex", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 88, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.name_forindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(__pyx_self, __pyx_v_index); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) { int __pyx_v_max_controllers; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("name_forindex", 1); /* "pygame/_sdl2/controller.pyx":92 * or NULL if there's no name or the index is invalid. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":93 * """ * _gamecontroller_init_check() * max_controllers = SDL_NumJoysticks() # <<<<<<<<<<<<<< * if max_controllers < 0: * raise error() */ __pyx_v_max_controllers = SDL_NumJoysticks(); /* "pygame/_sdl2/controller.pyx":94 * _gamecontroller_init_check() * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_5 = (__pyx_v_max_controllers < 0); if (unlikely(__pyx_t_5)) { /* "pygame/_sdl2/controller.pyx":95 * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: * raise error() # <<<<<<<<<<<<<< * * if 0 <= index < max_controllers: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 95, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":94 * _gamecontroller_init_check() * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/controller.pyx":97 * raise error() * * if 0 <= index < max_controllers: # <<<<<<<<<<<<<< * return SDL_GameControllerNameForIndex(index).decode('utf-8') * */ __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { __Pyx_DECREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_controllers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pygame/_sdl2/controller.pyx":98 * * if 0 <= index < max_controllers: * return SDL_GameControllerNameForIndex(index).decode('utf-8') # <<<<<<<<<<<<<< * * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_7 = SDL_GameControllerNameForIndex(__pyx_t_6); __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":97 * raise error() * * if 0 <= index < max_controllers: # <<<<<<<<<<<<<< * return SDL_GameControllerNameForIndex(index).decode('utf-8') * */ } /* "pygame/_sdl2/controller.pyx":100 * return SDL_GameControllerNameForIndex(index).decode('utf-8') * * return None # <<<<<<<<<<<<<< * * cdef class Controller: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.name_forindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":105 * _controllers = [] * * def __init__(self, int index): # <<<<<<<<<<<<<< * """ Create a controller object and open it by given index. * */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_10controller_10Controller_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_10Controller___init__, " Create a controller object and open it by given index.\n\n :param int index: Index of the joystick.\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__; #endif static int __pyx_pw_6pygame_5_sdl2_10controller_10Controller_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_index; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 105, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } __pyx_v_index = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 105, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v_index); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, int __pyx_v_index) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/controller.pyx":110 * :param int index: Index of the joystick. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * if not SDL_IsGameController(index): * raise error('Index is invalid or not a supported joystick.') */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":111 * """ * _gamecontroller_init_check() * if not SDL_IsGameController(index): # <<<<<<<<<<<<<< * raise error('Index is invalid or not a supported joystick.') * */ __pyx_t_5 = (!(SDL_IsGameController(__pyx_v_index) != 0)); if (unlikely(__pyx_t_5)) { /* "pygame/_sdl2/controller.pyx":112 * _gamecontroller_init_check() * if not SDL_IsGameController(index): * raise error('Index is invalid or not a supported joystick.') # <<<<<<<<<<<<<< * * self._controller = SDL_GameControllerOpen(index) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Index_is_invalid_or_not_a_suppor}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 112, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":111 * """ * _gamecontroller_init_check() * if not SDL_IsGameController(index): # <<<<<<<<<<<<<< * raise error('Index is invalid or not a supported joystick.') * */ } /* "pygame/_sdl2/controller.pyx":114 * raise error('Index is invalid or not a supported joystick.') * * self._controller = SDL_GameControllerOpen(index) # <<<<<<<<<<<<<< * self._index = index * if not self._controller: */ __pyx_v_self->_controller = SDL_GameControllerOpen(__pyx_v_index); /* "pygame/_sdl2/controller.pyx":115 * * self._controller = SDL_GameControllerOpen(index) * self._index = index # <<<<<<<<<<<<<< * if not self._controller: * raise error('Could not open controller %d.' % index) */ __pyx_v_self->_index = __pyx_v_index; /* "pygame/_sdl2/controller.pyx":116 * self._controller = SDL_GameControllerOpen(index) * self._index = index * if not self._controller: # <<<<<<<<<<<<<< * raise error('Could not open controller %d.' % index) * */ __pyx_t_5 = (!(__pyx_v_self->_controller != 0)); if (unlikely(__pyx_t_5)) { /* "pygame/_sdl2/controller.pyx":117 * self._index = index * if not self._controller: * raise error('Could not open controller %d.' % index) # <<<<<<<<<<<<<< * * Controller._controllers.append(self) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Could_not_open_controller_d, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 117, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":116 * self._controller = SDL_GameControllerOpen(index) * self._index = index * if not self._controller: # <<<<<<<<<<<<<< * raise error('Could not open controller %d.' % index) * */ } /* "pygame/_sdl2/controller.pyx":119 * raise error('Could not open controller %d.' % index) * * Controller._controllers.append(self) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":105 * _controllers = [] * * def __init__(self, int index): # <<<<<<<<<<<<<< * """ Create a controller object and open it by given index. * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":121 * Controller._controllers.append(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< * try: * Controller._controllers.remove(self) */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_10controller_10Controller_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_10controller_10Controller_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 1); /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< * Controller._controllers.remove(self) * except ValueError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "pygame/_sdl2/controller.pyx":123 * def __dealloc__(self): * try: * Controller._controllers.remove(self) # <<<<<<<<<<<<<< * except ValueError: * pass # Controller is not in list. */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< * Controller._controllers.remove(self) * except ValueError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pygame/_sdl2/controller.pyx":124 * try: * Controller._controllers.remove(self) * except ValueError: # <<<<<<<<<<<<<< * pass # Controller is not in list. * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< * Controller._controllers.remove(self) * except ValueError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "pygame/_sdl2/controller.pyx":127 * pass # Controller is not in list. * * self.quit() # <<<<<<<<<<<<<< * * def _CLOSEDCHECK(self): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/controller.pyx":121 * Controller._controllers.append(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< * try: * Controller._controllers.remove(self) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("pygame._sdl2.controller.Controller.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< * if not self._controller: * raise error('called on a closed controller') */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK = {"_CLOSEDCHECK", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_CLOSEDCHECK (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_CLOSEDCHECK", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_CLOSEDCHECK", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_CLOSEDCHECK", 1); /* "pygame/_sdl2/controller.pyx":130 * * def _CLOSEDCHECK(self): * if not self._controller: # <<<<<<<<<<<<<< * raise error('called on a closed controller') * */ __pyx_t_1 = (!(__pyx_v_self->_controller != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/controller.pyx":131 * def _CLOSEDCHECK(self): * if not self._controller: * raise error('called on a closed controller') # <<<<<<<<<<<<<< * * def init(self): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_called_on_a_closed_controller}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 131, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":130 * * def _CLOSEDCHECK(self): * if not self._controller: # <<<<<<<<<<<<<< * raise error('called on a closed controller') * */ } /* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< * if not self._controller: * raise error('called on a closed controller') */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.controller.Controller._CLOSEDCHECK", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< * self.__init__(self._index) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_7init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_7init = {"init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_7init, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_7init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("init", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "init", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 1); /* "pygame/_sdl2/controller.pyx":134 * * def init(self): * self.__init__(self._index) # <<<<<<<<<<<<<< * * def get_init(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< * self.__init__(self._index) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< * return not self._controller == NULL * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_9get_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_9get_init = {"get_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_9get_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_9get_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_init (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_init", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_init", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_init", 1); /* "pygame/_sdl2/controller.pyx":137 * * def get_init(self): * return not self._controller == NULL # <<<<<<<<<<<<<< * * def quit(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((!(__pyx_v_self->_controller == NULL))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< * return not self._controller == NULL * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< * if self._controller: * SDL_GameControllerClose(self._controller) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_11quit(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_11quit = {"quit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_11quit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_11quit(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quit (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("quit", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "quit", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("quit", 1); /* "pygame/_sdl2/controller.pyx":140 * * def quit(self): * if self._controller: # <<<<<<<<<<<<<< * SDL_GameControllerClose(self._controller) * self._controller = NULL */ __pyx_t_1 = (__pyx_v_self->_controller != 0); if (__pyx_t_1) { /* "pygame/_sdl2/controller.pyx":141 * def quit(self): * if self._controller: * SDL_GameControllerClose(self._controller) # <<<<<<<<<<<<<< * self._controller = NULL * */ SDL_GameControllerClose(__pyx_v_self->_controller); /* "pygame/_sdl2/controller.pyx":142 * if self._controller: * SDL_GameControllerClose(self._controller) * self._controller = NULL # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->_controller = NULL; /* "pygame/_sdl2/controller.pyx":140 * * def quit(self): * if self._controller: # <<<<<<<<<<<<<< * SDL_GameControllerClose(self._controller) * self._controller = NULL */ } /* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< * if self._controller: * SDL_GameControllerClose(self._controller) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":144 * self._controller = NULL * * @staticmethod # <<<<<<<<<<<<<< * def from_joystick(joy): * """ Create a controller object from pygame.joystick.Joystick object. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joystick(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_10Controller_12from_joystick, " Create a controller object from pygame.joystick.Joystick object.\n\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_13from_joystick = {"from_joystick", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joystick, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_12from_joystick}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joystick(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_joy = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_joystick (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_joy,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_joy)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_joystick") < 0)) __PYX_ERR(0, 144, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_joy = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("from_joystick", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 144, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.from_joystick", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joystick(__pyx_v_joy); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joystick(PyObject *__pyx_v_joy) { struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_joystick", 1); /* "pygame/_sdl2/controller.pyx":150 * """ * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() # <<<<<<<<<<<<<< * if not pgJoystick_Check(joy): * raise TypeError('should be a pygame.joystick.Joystick object.') */ JOYSTICK_INIT_CHECK(); /* "pygame/_sdl2/controller.pyx":151 * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): # <<<<<<<<<<<<<< * raise TypeError('should be a pygame.joystick.Joystick object.') * */ __pyx_t_1 = (!(pgJoystick_Check(__pyx_v_joy) != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/controller.pyx":152 * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): * raise TypeError('should be a pygame.joystick.Joystick object.') # <<<<<<<<<<<<<< * * cdef Controller self = Controller.__new__(Controller) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 152, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":151 * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): # <<<<<<<<<<<<<< * raise TypeError('should be a pygame.joystick.Joystick object.') * */ } /* "pygame/_sdl2/controller.pyx":154 * raise TypeError('should be a pygame.joystick.Joystick object.') * * cdef Controller self = Controller.__new__(Controller) # <<<<<<<<<<<<<< * self.__init__(joy.get_id()) * return self */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6pygame_5_sdl2_10controller_Controller(((PyTypeObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":155 * * cdef Controller self = Controller.__new__(Controller) * self.__init__(joy.get_id()) # <<<<<<<<<<<<<< * return self * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_joy, __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_t_5 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":156 * cdef Controller self = Controller.__new__(Controller) * self.__init__(joy.get_id()) * return self # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":144 * self._controller = NULL * * @staticmethod # <<<<<<<<<<<<<< * def from_joystick(joy): * """ Create a controller object from pygame.joystick.Joystick object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.from_joystick", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":158 * return self * * @property # <<<<<<<<<<<<<< * def id(self): * return self._index */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_2id_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/controller.pyx":160 * @property * def id(self): * return self._index # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":158 * return self * * @property # <<<<<<<<<<<<<< * def id(self): * return self._index */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":162 * return self._index * * @property # <<<<<<<<<<<<<< * def name(self): * # https://wiki.libsdl.org/SDL_GameControllerName */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_4name_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; char const *__pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/controller.pyx":165 * def name(self): * # https://wiki.libsdl.org/SDL_GameControllerName * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerName(self._controller).decode('utf-8') */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":166 * # https://wiki.libsdl.org/SDL_GameControllerName * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerName(self._controller).decode('utf-8') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":167 * _gamecontroller_init_check() * self._CLOSEDCHECK() * return SDL_GameControllerName(self._controller).decode('utf-8') # <<<<<<<<<<<<<< * * def attached(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = SDL_GameControllerName(__pyx_v_self->_controller); __pyx_t_6 = __Pyx_ssize_strlen(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 167, __pyx_L1_error) __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_5, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":162 * return self._index * * @property # <<<<<<<<<<<<<< * def name(self): * # https://wiki.libsdl.org/SDL_GameControllerName */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_15attached(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_15attached = {"attached", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_15attached, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_15attached(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("attached (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("attached", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "attached", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("attached", 1); /* "pygame/_sdl2/controller.pyx":171 * def attached(self): * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetAttached(self._controller) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":172 * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetAttached(self._controller) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":173 * _gamecontroller_init_check() * self._CLOSEDCHECK() * return SDL_GameControllerGetAttached(self._controller) # <<<<<<<<<<<<<< * * def as_joystick(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GameControllerGetAttached(__pyx_v_self->_controller)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.attached", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_17as_joystick(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_17as_joystick = {"as_joystick", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_17as_joystick, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_17as_joystick(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("as_joystick (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_joystick", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "as_joystick", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_v_joy = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_joystick", 1); /* "pygame/_sdl2/controller.pyx":177 * def as_joystick(self): * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() # <<<<<<<<<<<<<< * _gamecontroller_init_check() * joy = pgJoystick_New(self._index) */ JOYSTICK_INIT_CHECK(); /* "pygame/_sdl2/controller.pyx":178 * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() * _gamecontroller_init_check() # <<<<<<<<<<<<<< * joy = pgJoystick_New(self._index) * return joy */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":179 * JOYSTICK_INIT_CHECK() * _gamecontroller_init_check() * joy = pgJoystick_New(self._index) # <<<<<<<<<<<<<< * return joy * */ __pyx_t_1 = pgJoystick_New(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_joy = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":180 * _gamecontroller_init_check() * joy = pgJoystick_New(self._index) * return joy # <<<<<<<<<<<<<< * * def get_axis(self, SDL_GameControllerAxis axis): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_joy); __pyx_r = __pyx_v_joy; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.as_joystick", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_joy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_19get_axis(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_19get_axis = {"get_axis", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_19get_axis, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_19get_axis(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { SDL_GameControllerAxis __pyx_v_axis; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_axis (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_axis,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_axis)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_axis") < 0)) __PYX_ERR(0, 182, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_axis = ((SDL_GameControllerAxis)__Pyx_PyInt_As_SDL_GameControllerAxis(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_axis", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 182, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_axis", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v_axis); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, SDL_GameControllerAxis __pyx_v_axis) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_axis", 1); /* "pygame/_sdl2/controller.pyx":184 * def get_axis(self, SDL_GameControllerAxis axis): * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetAxis(self._controller, axis) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":185 * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetAxis(self._controller, axis) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":186 * _gamecontroller_init_check() * self._CLOSEDCHECK() * return SDL_GameControllerGetAxis(self._controller, axis) # <<<<<<<<<<<<<< * * def get_button(self, SDL_GameControllerButton button): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Sint16(SDL_GameControllerGetAxis(__pyx_v_self->_controller, __pyx_v_axis)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_axis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_21get_button = {"get_button", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { SDL_GameControllerButton __pyx_v_button; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_button (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_button,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_button)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_button") < 0)) __PYX_ERR(0, 188, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_button = ((SDL_GameControllerButton)__Pyx_PyInt_As_SDL_GameControllerButton(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_button", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 188, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_button", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v_button); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, SDL_GameControllerButton __pyx_v_button) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_button", 1); /* "pygame/_sdl2/controller.pyx":190 * def get_button(self, SDL_GameControllerButton button): * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetButton(self._controller, button) == 1 */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":191 * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetButton(self._controller, button) == 1 * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":192 * _gamecontroller_init_check() * self._CLOSEDCHECK() * return SDL_GameControllerGetButton(self._controller, button) == 1 # <<<<<<<<<<<<<< * * def get_mapping(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerGetButton(__pyx_v_self->_controller, __pyx_v_button) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_button", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_23get_mapping(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_23get_mapping = {"get_mapping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_23get_mapping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_23get_mapping(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_mapping (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_mapping", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_mapping", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { char *__pyx_v_raw_mapping; PyObject *__pyx_v_mapping = NULL; PyObject *__pyx_v_keys = NULL; PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_v_a = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_mapping", 1); /* "pygame/_sdl2/controller.pyx":197 * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":198 * # TODO: mapping should be a readable dict instead of a string. * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":199 * _gamecontroller_init_check() * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) # <<<<<<<<<<<<<< * mapping = raw_mapping.decode('utf-8') * SDL_free(raw_mapping) */ __pyx_v_raw_mapping = SDL_GameControllerMapping(__pyx_v_self->_controller); /* "pygame/_sdl2/controller.pyx":200 * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') # <<<<<<<<<<<<<< * SDL_free(raw_mapping) * */ __pyx_t_5 = __Pyx_ssize_strlen(__pyx_v_raw_mapping); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 200, __pyx_L1_error) __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_raw_mapping, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mapping = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":201 * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') * SDL_free(raw_mapping) # <<<<<<<<<<<<<< * * # split mapping, cut off guid, name and last (empty) comma */ SDL_free(__pyx_v_raw_mapping); /* "pygame/_sdl2/controller.pyx":204 * * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] # <<<<<<<<<<<<<< * keys = [] * values = [] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mapping, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s__2}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, -1L, NULL, NULL, &__pyx_slice__3, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_mapping, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":205 * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] * keys = [] # <<<<<<<<<<<<<< * values = [] * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_keys = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":206 * mapping = mapping.split(",")[2:-1] * keys = [] * values = [] # <<<<<<<<<<<<<< * * for obj in mapping: */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":208 * values = [] * * for obj in mapping: # <<<<<<<<<<<<<< * a = obj.split(':') * keys.append(a[0]) */ if (likely(PyList_CheckExact(__pyx_v_mapping)) || PyTuple_CheckExact(__pyx_v_mapping)) { __pyx_t_2 = __pyx_v_mapping; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 208, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 208, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 208, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 208, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 208, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":209 * * for obj in mapping: * a = obj.split(':') # <<<<<<<<<<<<<< * keys.append(a[0]) * values.append(a[1]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_s__4}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":210 * for obj in mapping: * a = obj.split(':') * keys.append(a[0]) # <<<<<<<<<<<<<< * values.append(a[1]) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_keys, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":211 * a = obj.split(':') * keys.append(a[0]) * values.append(a[1]) # <<<<<<<<<<<<<< * * #create and return the dict */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":208 * values = [] * * for obj in mapping: # <<<<<<<<<<<<<< * a = obj.split(':') * keys.append(a[0]) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":214 * * #create and return the dict * mapping = dict(zip(keys, values)) # <<<<<<<<<<<<<< * return mapping * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_keys); __Pyx_GIVEREF(__pyx_v_keys); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_keys)) __PYX_ERR(0, 214, __pyx_L1_error); __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_values)) __PYX_ERR(0, 214, __pyx_L1_error); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_mapping, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":215 * #create and return the dict * mapping = dict(zip(keys, values)) * return mapping # <<<<<<<<<<<<<< * * def set_mapping(self, mapping): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mapping); __pyx_r = __pyx_v_mapping; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.get_mapping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mapping); __Pyx_XDECREF(__pyx_v_keys); __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_a); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_25set_mapping(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_25set_mapping = {"set_mapping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_25set_mapping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_25set_mapping(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_mapping = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_mapping (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mapping,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mapping)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_mapping") < 0)) __PYX_ERR(0, 217, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_mapping = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_mapping", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 217, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.set_mapping", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v_mapping); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, PyObject *__pyx_v_mapping) { SDL_Joystick *__pyx_v_joy; SDL_JoystickGUID __pyx_v_guid; char __pyx_v_pszGUID[64]; char const *__pyx_v_name; PyObject *__pyx_v_str_map = NULL; PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_mapstring = NULL; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; char const *__pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_mapping", 1); /* "pygame/_sdl2/controller.pyx":220 * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * cdef SDL_Joystick *joy */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":221 * # TODO: mapping should be a readable dict instead of a string. * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * cdef SDL_Joystick *joy * cdef SDL_JoystickGUID guid */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":226 * cdef char[64] pszGUID * * joy = SDL_GameControllerGetJoystick(self._controller) # <<<<<<<<<<<<<< * guid = SDL_JoystickGetGUID(joy) * name = SDL_GameControllerName(self._controller) */ __pyx_v_joy = SDL_GameControllerGetJoystick(__pyx_v_self->_controller); /* "pygame/_sdl2/controller.pyx":227 * * joy = SDL_GameControllerGetJoystick(self._controller) * guid = SDL_JoystickGetGUID(joy) # <<<<<<<<<<<<<< * name = SDL_GameControllerName(self._controller) * SDL_JoystickGetGUIDString(guid, pszGUID, 63) */ __pyx_v_guid = SDL_JoystickGetGUID(__pyx_v_joy); /* "pygame/_sdl2/controller.pyx":228 * joy = SDL_GameControllerGetJoystick(self._controller) * guid = SDL_JoystickGetGUID(joy) * name = SDL_GameControllerName(self._controller) # <<<<<<<<<<<<<< * SDL_JoystickGetGUIDString(guid, pszGUID, 63) * */ __pyx_v_name = SDL_GameControllerName(__pyx_v_self->_controller); /* "pygame/_sdl2/controller.pyx":229 * guid = SDL_JoystickGetGUID(joy) * name = SDL_GameControllerName(self._controller) * SDL_JoystickGetGUIDString(guid, pszGUID, 63) # <<<<<<<<<<<<<< * * str_map = "" */ SDL_JoystickGetGUIDString(__pyx_v_guid, __pyx_v_pszGUID, 63); /* "pygame/_sdl2/controller.pyx":231 * SDL_JoystickGetGUIDString(guid, pszGUID, 63) * * str_map = "" # <<<<<<<<<<<<<< * for key, value in mapping.items(): * str_map += "{}:{},".format(key, value) */ __Pyx_INCREF(__pyx_kp_s__5); __pyx_v_str_map = __pyx_kp_s__5; /* "pygame/_sdl2/controller.pyx":232 * * str_map = "" * for key, value in mapping.items(): # <<<<<<<<<<<<<< * str_map += "{}:{},".format(key, value) * */ __pyx_t_5 = 0; if (unlikely(__pyx_v_mapping == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 232, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_mapping, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_7); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":233 * str_map = "" * for key, value in mapping.items(): * str_map += "{}:{},".format(key, value) # <<<<<<<<<<<<<< * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s__6, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_key, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_map, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_str_map, __pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":235 * str_map += "{}:{},".format(key, value) * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) # <<<<<<<<<<<<<< * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: */ __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_pszGUID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_str_map, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s_utf_8}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(__pyx_kp_b_s_s_s, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_mapstring = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":236 * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_mapstring); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L1_error) __pyx_v_res = SDL_GameControllerAddMapping(__pyx_t_11); /* "pygame/_sdl2/controller.pyx":237 * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_12 = (__pyx_v_res < 0); if (unlikely(__pyx_t_12)) { /* "pygame/_sdl2/controller.pyx":238 * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return res */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 238, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":237 * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/controller.pyx":240 * raise error() * * return res # <<<<<<<<<<<<<< * * def rumble(self, low_frequency, high_frequency, duration): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.set_mapping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_str_map); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_mapstring); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< * """ * Play a rumble effect on the controller, with set power (0-1 range) and */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_10Controller_26rumble, "\n Play a rumble effect on the controller, with set power (0-1 range) and\n duration (in ms). Returns True if the effect was played successfully,\n False otherwise.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_27rumble = {"rumble", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_26rumble}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_low_frequency = 0; PyObject *__pyx_v_high_frequency = 0; PyObject *__pyx_v_duration = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rumble (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_low_frequency,&__pyx_n_s_high_frequency,&__pyx_n_s_duration,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_low_frequency)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_high_frequency)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 1); __PYX_ERR(0, 242, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_duration)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 2); __PYX_ERR(0, 242, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rumble") < 0)) __PYX_ERR(0, 242, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } __pyx_v_low_frequency = values[0]; __pyx_v_high_frequency = values[1]; __pyx_v_duration = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 242, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.rumble", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v_low_frequency, __pyx_v_high_frequency, __pyx_v_duration); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, PyObject *__pyx_v_low_frequency, PyObject *__pyx_v_high_frequency, PyObject *__pyx_v_duration) { PyObject *__pyx_v_low = NULL; PyObject *__pyx_v_high = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; long __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; double __pyx_t_8; double __pyx_t_9; Uint16 __pyx_t_10; Uint16 __pyx_t_11; Uint32 __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rumble", 0); __Pyx_INCREF(__pyx_v_duration); /* "pygame/_sdl2/controller.pyx":248 * False otherwise. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":249 * """ * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * * duration = max(duration, 0) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":251 * self._CLOSEDCHECK() * * duration = max(duration, 0) # <<<<<<<<<<<<<< * low = min(max(low_frequency, 0.0), 1.0) * high = min(max(high_frequency, 0.0), 1.0) */ __pyx_t_5 = 0; __Pyx_INCREF(__pyx_v_duration); __pyx_t_1 = __pyx_v_duration; __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_duration, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":252 * * duration = max(duration, 0) * low = min(max(low_frequency, 0.0), 1.0) # <<<<<<<<<<<<<< * high = min(max(high_frequency, 0.0), 1.0) * */ __pyx_t_8 = 1.0; __pyx_t_9 = 0.0; __Pyx_INCREF(__pyx_v_low_frequency); __pyx_t_1 = __pyx_v_low_frequency; __pyx_t_6 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { __pyx_t_3 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { __pyx_t_6 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_low = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":253 * duration = max(duration, 0) * low = min(max(low_frequency, 0.0), 1.0) * high = min(max(high_frequency, 0.0), 1.0) # <<<<<<<<<<<<<< * * return not PG_GameControllerRumble( */ __pyx_t_8 = 1.0; __pyx_t_9 = 0.0; __Pyx_INCREF(__pyx_v_high_frequency); __pyx_t_1 = __pyx_v_high_frequency; __pyx_t_6 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { __pyx_t_3 = PyFloat_FromDouble(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { __pyx_t_6 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_high = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":255 * high = min(max(high_frequency, 0.0), 1.0) * * return not PG_GameControllerRumble( # <<<<<<<<<<<<<< * self._controller, low * 0xFFFF, high * 0xFFFF, duration * ) */ __Pyx_XDECREF(__pyx_r); /* "pygame/_sdl2/controller.pyx":256 * * return not PG_GameControllerRumble( * self._controller, low * 0xFFFF, high * 0xFFFF, duration # <<<<<<<<<<<<<< * ) * */ __pyx_t_1 = __Pyx_PyInt_MultiplyObjC(__pyx_v_low, __pyx_int_65535, 0xFFFF, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_10 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_MultiplyObjC(__pyx_v_high, __pyx_int_65535, 0xFFFF, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_11 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyInt_As_Uint32(__pyx_v_duration); if (unlikely((__pyx_t_12 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":255 * high = min(max(high_frequency, 0.0), 1.0) * * return not PG_GameControllerRumble( # <<<<<<<<<<<<<< * self._controller, low * 0xFFFF, high * 0xFFFF, duration * ) */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PG_GameControllerRumble(__pyx_v_self->_controller, __pyx_t_10, __pyx_t_11, __pyx_t_12) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< * """ * Play a rumble effect on the controller, with set power (0-1 range) and */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.rumble", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_low); __Pyx_XDECREF(__pyx_v_high); __Pyx_XDECREF(__pyx_v_duration); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/controller.pyx":259 * ) * * def stop_rumble(self): # <<<<<<<<<<<<<< * """ * Stop any rumble effect playing on the controller. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_10controller_10Controller_28stop_rumble, "\n Stop any rumble effect playing on the controller.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_29stop_rumble = {"stop_rumble", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_28stop_rumble}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stop_rumble (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("stop_rumble", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "stop_rumble", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_28stop_rumble(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_28stop_rumble(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("stop_rumble", 1); /* "pygame/_sdl2/controller.pyx":263 * Stop any rumble effect playing on the controller. * """ * _gamecontroller_init_check() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * PG_GameControllerRumble(self._controller, 0, 0, 1) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gamecontroller_init_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":264 * """ * _gamecontroller_init_check() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * PG_GameControllerRumble(self._controller, 0, 0, 1) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/controller.pyx":265 * _gamecontroller_init_check() * self._CLOSEDCHECK() * PG_GameControllerRumble(self._controller, 0, 0, 1) # <<<<<<<<<<<<<< */ (void)(PG_GameControllerRumble(__pyx_v_self->_controller, 0, 0, 1)); /* "pygame/_sdl2/controller.pyx":259 * ) * * def stop_rumble(self): # <<<<<<<<<<<<<< * """ * Stop any rumble effect playing on the controller. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.stop_rumble", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_30__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__controller_cannot_be_conve, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_10controller_10Controller_32__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__controller_cannot_be_conve, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pygame_5_sdl2_10controller_Controller(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif return o; } static void __pyx_tp_dealloc_6pygame_5_sdl2_10controller_Controller(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_10controller_Controller) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_10controller_10Controller_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyObject *__pyx_getprop_6pygame_5_sdl2_10controller_10Controller_id(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_10controller_10Controller_2id_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_10controller_10Controller_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_10controller_10Controller_4name_1__get__(o); } static PyMethodDef __pyx_methods_6pygame_5_sdl2_10controller_Controller[] = { {"_CLOSEDCHECK", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_7init, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"get_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_9get_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"quit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_11quit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"from_joystick", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joystick, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_12from_joystick}, {"attached", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_15attached, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"as_joystick", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_17as_joystick, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"get_axis", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_19get_axis, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"get_button", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"get_mapping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_23get_mapping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"set_mapping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_25set_mapping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"rumble", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_26rumble}, {"stop_rumble", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_28stop_rumble}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_10controller_Controller[] = { {(char *)"id", __pyx_getprop_6pygame_5_sdl2_10controller_10Controller_id, 0, (char *)0, 0}, {(char *)"name", __pyx_getprop_6pygame_5_sdl2_10controller_10Controller_name, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_10controller_Controller_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_10controller_Controller}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_10controller_Controller}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_10controller_Controller}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_10controller_Controller}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_10controller_Controller_spec = { "pygame._sdl2.controller.Controller", sizeof(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_6pygame_5_sdl2_10controller_Controller_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_10controller_Controller = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.controller.""Controller", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_10controller_Controller), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_10controller_Controller, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_10controller_Controller, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_10controller_Controller, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_10controller_10Controller_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_10controller_Controller, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_CLOSEDCHECK, __pyx_k_CLOSEDCHECK, sizeof(__pyx_k_CLOSEDCHECK), 0, 0, 1, 1}, {&__pyx_n_s_Controller, __pyx_k_Controller, sizeof(__pyx_k_Controller), 0, 0, 1, 1}, {&__pyx_n_s_Controller__CLOSEDCHECK, __pyx_k_Controller__CLOSEDCHECK, sizeof(__pyx_k_Controller__CLOSEDCHECK), 0, 0, 1, 1}, {&__pyx_n_s_Controller___reduce_cython, __pyx_k_Controller___reduce_cython, sizeof(__pyx_k_Controller___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Controller___setstate_cython, __pyx_k_Controller___setstate_cython, sizeof(__pyx_k_Controller___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Controller_as_joystick, __pyx_k_Controller_as_joystick, sizeof(__pyx_k_Controller_as_joystick), 0, 0, 1, 1}, {&__pyx_n_s_Controller_attached, __pyx_k_Controller_attached, sizeof(__pyx_k_Controller_attached), 0, 0, 1, 1}, {&__pyx_n_s_Controller_from_joystick, __pyx_k_Controller_from_joystick, sizeof(__pyx_k_Controller_from_joystick), 0, 0, 1, 1}, {&__pyx_n_s_Controller_get_axis, __pyx_k_Controller_get_axis, sizeof(__pyx_k_Controller_get_axis), 0, 0, 1, 1}, {&__pyx_n_s_Controller_get_button, __pyx_k_Controller_get_button, sizeof(__pyx_k_Controller_get_button), 0, 0, 1, 1}, {&__pyx_n_s_Controller_get_init, __pyx_k_Controller_get_init, sizeof(__pyx_k_Controller_get_init), 0, 0, 1, 1}, {&__pyx_n_s_Controller_get_mapping, __pyx_k_Controller_get_mapping, sizeof(__pyx_k_Controller_get_mapping), 0, 0, 1, 1}, {&__pyx_n_s_Controller_init, __pyx_k_Controller_init, sizeof(__pyx_k_Controller_init), 0, 0, 1, 1}, {&__pyx_n_s_Controller_quit, __pyx_k_Controller_quit, sizeof(__pyx_k_Controller_quit), 0, 0, 1, 1}, {&__pyx_n_s_Controller_rumble, __pyx_k_Controller_rumble, sizeof(__pyx_k_Controller_rumble), 0, 0, 1, 1}, {&__pyx_n_s_Controller_set_mapping, __pyx_k_Controller_set_mapping, sizeof(__pyx_k_Controller_set_mapping), 0, 0, 1, 1}, {&__pyx_n_s_Controller_stop_rumble, __pyx_k_Controller_stop_rumble, sizeof(__pyx_k_Controller_stop_rumble), 0, 0, 1, 1}, {&__pyx_kp_s_Could_not_open_controller_d, __pyx_k_Could_not_open_controller_d, sizeof(__pyx_k_Could_not_open_controller_d), 0, 0, 1, 0}, {&__pyx_kp_s_Index_is_invalid_or_not_a_suppor, __pyx_k_Index_is_invalid_or_not_a_suppor, sizeof(__pyx_k_Index_is_invalid_or_not_a_suppor), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, {&__pyx_n_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 1}, {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_as_joystick, __pyx_k_as_joystick, sizeof(__pyx_k_as_joystick), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_attached, __pyx_k_attached, sizeof(__pyx_k_attached), 0, 0, 1, 1}, {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1}, {&__pyx_n_s_button, __pyx_k_button, sizeof(__pyx_k_button), 0, 0, 1, 1}, {&__pyx_kp_s_called_on_a_closed_controller, __pyx_k_called_on_a_closed_controller, sizeof(__pyx_k_called_on_a_closed_controller), 0, 0, 1, 0}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_controllers, __pyx_k_controllers, sizeof(__pyx_k_controllers), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_duration, __pyx_k_duration, sizeof(__pyx_k_duration), 0, 0, 1, 1}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_from_joystick, __pyx_k_from_joystick, sizeof(__pyx_k_from_joystick), 0, 0, 1, 1}, {&__pyx_n_s_gamecontroller_init_check, __pyx_k_gamecontroller_init_check, sizeof(__pyx_k_gamecontroller_init_check), 0, 0, 1, 1}, {&__pyx_kp_s_gamecontroller_system_not_initia, __pyx_k_gamecontroller_system_not_initia, sizeof(__pyx_k_gamecontroller_system_not_initia), 0, 0, 1, 0}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_get_axis, __pyx_k_get_axis, sizeof(__pyx_k_get_axis), 0, 0, 1, 1}, {&__pyx_n_s_get_button, __pyx_k_get_button, sizeof(__pyx_k_get_button), 0, 0, 1, 1}, {&__pyx_n_s_get_count, __pyx_k_get_count, sizeof(__pyx_k_get_count), 0, 0, 1, 1}, {&__pyx_n_s_get_eventstate, __pyx_k_get_eventstate, sizeof(__pyx_k_get_eventstate), 0, 0, 1, 1}, {&__pyx_n_s_get_id, __pyx_k_get_id, sizeof(__pyx_k_get_id), 0, 0, 1, 1}, {&__pyx_n_s_get_init, __pyx_k_get_init, sizeof(__pyx_k_get_init), 0, 0, 1, 1}, {&__pyx_n_s_get_mapping, __pyx_k_get_mapping, sizeof(__pyx_k_get_mapping), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_guid, __pyx_k_guid, sizeof(__pyx_k_guid), 0, 0, 1, 1}, {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1}, {&__pyx_n_s_high_frequency, __pyx_k_high_frequency, sizeof(__pyx_k_high_frequency), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1}, {&__pyx_n_s_internal_mod_init, __pyx_k_internal_mod_init, sizeof(__pyx_k_internal_mod_init), 0, 0, 1, 1}, {&__pyx_n_s_is_controller, __pyx_k_is_controller, sizeof(__pyx_k_is_controller), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_joy, __pyx_k_joy, sizeof(__pyx_k_joy), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1}, {&__pyx_n_s_low_frequency, __pyx_k_low_frequency, sizeof(__pyx_k_low_frequency), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mapping, __pyx_k_mapping, sizeof(__pyx_k_mapping), 0, 0, 1, 1}, {&__pyx_n_s_mapstring, __pyx_k_mapstring, sizeof(__pyx_k_mapstring), 0, 0, 1, 1}, {&__pyx_n_s_max_controllers, __pyx_k_max_controllers, sizeof(__pyx_k_max_controllers), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_name_forindex, __pyx_k_name_forindex, sizeof(__pyx_k_name_forindex), 0, 0, 1, 1}, {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pszGUID, __pyx_k_pszGUID, sizeof(__pyx_k_pszGUID), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_controller, __pyx_k_pygame__sdl2_controller, sizeof(__pyx_k_pygame__sdl2_controller), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_sdl2, __pyx_k_pygame__sdl2_sdl2, sizeof(__pyx_k_pygame__sdl2_sdl2), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1}, {&__pyx_n_s_raw_mapping, __pyx_k_raw_mapping, sizeof(__pyx_k_raw_mapping), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1}, {&__pyx_n_s_rumble, __pyx_k_rumble, sizeof(__pyx_k_rumble), 0, 0, 1, 1}, {&__pyx_kp_b_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 0, 0}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_s_self__controller_cannot_be_conve, __pyx_k_self__controller_cannot_be_conve, sizeof(__pyx_k_self__controller_cannot_be_conve), 0, 0, 1, 0}, {&__pyx_n_s_set_eventstate, __pyx_k_set_eventstate, sizeof(__pyx_k_set_eventstate), 0, 0, 1, 1}, {&__pyx_n_s_set_mapping, __pyx_k_set_mapping, sizeof(__pyx_k_set_mapping), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_kp_s_should_be_a_pygame_joystick_Joys, __pyx_k_should_be_a_pygame_joystick_Joys, sizeof(__pyx_k_should_be_a_pygame_joystick_Joys), 0, 0, 1, 0}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_k_src_c_cython_pygame__sdl2_contro, sizeof(__pyx_k_src_c_cython_pygame__sdl2_contro), 0, 0, 1, 0}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, {&__pyx_n_s_stop_rumble, __pyx_k_stop_rumble, sizeof(__pyx_k_stop_rumble), 0, 0, 1, 1}, {&__pyx_n_s_str_map, __pyx_k_str_map, sizeof(__pyx_k_str_map), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 144, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 152, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 214, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pygame/_sdl2/controller.pyx":152 * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): * raise TypeError('should be a pygame.joystick.Joystick object.') # <<<<<<<<<<<<<< * * cdef Controller self = Controller.__new__(Controller) */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_should_be_a_pygame_joystick_Joys); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pygame/_sdl2/controller.pyx":204 * * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] # <<<<<<<<<<<<<< * keys = [] * values = [] */ __pyx_slice__3 = PySlice_New(__pyx_int_2, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__3); __Pyx_GIVEREF(__pyx_slice__3); /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def _gamecontroller_init_check(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_gamecontroller_init_check, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 16, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def _internal_mod_init(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_internal_mod_init, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 41, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_init_2, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 44, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_init, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 48, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_quit, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 51, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * SDL_GameControllerEventState(int(state)) */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_set_eventstate, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 55, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * return SDL_GameControllerEventState(-1) == 1 */ __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_eventstate, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 59, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_num); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_count, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 63, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_update, 71, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 71, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_index); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_is_controller, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 78, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_max_controllers); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_name_forindex, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 88, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< * if not self._controller: * raise error('called on a closed controller') */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_CLOSEDCHECK, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 129, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< * self.__init__(self._index) * */ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_init_2, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 133, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< * return not self._controller == NULL * */ __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_init, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 136, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< * if self._controller: * SDL_GameControllerClose(self._controller) */ __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_quit, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 139, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":144 * self._controller = NULL * * @staticmethod # <<<<<<<<<<<<<< * def from_joystick(joy): * """ Create a controller object from pygame.joystick.Joystick object. */ __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_joy, __pyx_n_s_self); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_from_joystick, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 144, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() */ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_attached, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 169, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() */ __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_joy); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_as_joystick, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 175, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() */ __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_axis); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_axis, 182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 182, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() */ __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_button); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_button, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 188, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. */ __pyx_tuple__38 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_raw_mapping, __pyx_n_s_mapping, __pyx_n_s_keys, __pyx_n_s_values, __pyx_n_s_obj, __pyx_n_s_a); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_mapping, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 194, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. */ __pyx_tuple__40 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_mapping, __pyx_n_s_joy, __pyx_n_s_guid, __pyx_n_s_pszGUID, __pyx_n_s_name_2, __pyx_n_s_str_map, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_mapstring, __pyx_n_s_res); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_set_mapping, 217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 217, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< * """ * Play a rumble effect on the controller, with set power (0-1 range) and */ __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_low_frequency, __pyx_n_s_high_frequency, __pyx_n_s_duration, __pyx_n_s_low, __pyx_n_s_high); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_rumble, 242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 242, __pyx_L1_error) /* "pygame/_sdl2/controller.pyx":259 * ) * * def stop_rumble(self): # <<<<<<<<<<<<<< * """ * Stop any rumble effect playing on the controller. */ __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_stop_rumble, 259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 259, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" */ __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_65535 = PyInt_FromLong(65535L); if (unlikely(!__pyx_int_65535)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { return 0; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ if (__Pyx_ExportFunction("_controller_autoinit", (void (*)(void))__pyx_f_6pygame_5_sdl2_10controller__controller_autoinit, "int (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ExportFunction("_controller_autoquit", (void (*)(void))__pyx_f_6pygame_5_sdl2_10controller__controller_autoquit, "void (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_10controller_Controller = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_10controller_Controller_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_10controller_Controller)) __PYX_ERR(0, 102, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_10controller_Controller_spec, __pyx_ptype_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_10controller_Controller = &__pyx_type_6pygame_5_sdl2_10controller_Controller; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 102, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__.doc = __pyx_doc_6pygame_5_sdl2_10controller_10Controller___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Controller, (PyObject *) __pyx_ptype_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_controller(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_controller}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "controller", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initcontroller(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initcontroller(void) #else __Pyx_PyMODINIT_FUNC PyInit_controller(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_controller(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_controller(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'controller' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("controller", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "controller" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_controller(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sdl2__controller) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sdl2.controller")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sdl2.controller", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); if (unlikely((__Pyx_modinit_function_export_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pygame/_sdl2/controller.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * * cdef extern from "../pygame.h" nogil: */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_error); __Pyx_GIVEREF(__pyx_n_s_error); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_error)) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pygame__sdl2_sdl2, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":14 * int SDL_VERSION_ATLEAST(int major, int minor, int patch) * * import_pygame_joystick() # <<<<<<<<<<<<<< * * def _gamecontroller_init_check(): */ import_pygame_joystick(); /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def _gamecontroller_init_check(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_1_gamecontroller_init_check, 0, __pyx_n_s_gamecontroller_init_check, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_gamecontroller_init_check, __pyx_t_3) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def _internal_mod_init(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_3_internal_mod_init, 0, __pyx_n_s_internal_mod_init, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_internal_mod_init, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_5init, 0, __pyx_n_s_init_2, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_2, __pyx_t_3) < 0) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_7get_init, 0, __pyx_n_s_get_init, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_init, __pyx_t_3) < 0) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_9quit, 0, __pyx_n_s_quit, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_quit, __pyx_t_3) < 0) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * SDL_GameControllerEventState(int(state)) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_11set_eventstate, 0, __pyx_n_s_set_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_eventstate, __pyx_t_3) < 0) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * _gamecontroller_init_check() * return SDL_GameControllerEventState(-1) == 1 */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_13get_eventstate, 0, __pyx_n_s_get_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_eventstate, __pyx_t_3) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_15get_count, 0, __pyx_n_s_get_count, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_count, __pyx_t_3) < 0) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_17update, 0, __pyx_n_s_update, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_19is_controller, 0, __pyx_n_s_is_controller, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_controller, __pyx_t_3) < 0) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_21name_forindex, 0, __pyx_n_s_name_forindex, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_forindex, __pyx_t_3) < 0) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/controller.pyx":103 * * cdef class Controller: * _controllers = [] # <<<<<<<<<<<<<< * * def __init__(self, int index): */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_controllers, __pyx_t_3) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< * if not self._controller: * raise error('called on a closed controller') */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_5_CLOSEDCHECK, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller__CLOSEDCHECK, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_CLOSEDCHECK, __pyx_t_3) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< * self.__init__(self._index) * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_7init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_init, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_init_2, __pyx_t_3) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< * return not self._controller == NULL * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_9get_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_get_init, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_get_init, __pyx_t_3) < 0) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< * if self._controller: * SDL_GameControllerClose(self._controller) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_11quit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_quit, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_quit, __pyx_t_3) < 0) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":144 * self._controller = NULL * * @staticmethod # <<<<<<<<<<<<<< * def from_joystick(joy): * """ Create a controller object from pygame.joystick.Joystick object. */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_13from_joystick, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_from_joystick, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_from_joystick, __pyx_t_3) < 0) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_from_joystick); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_from_joystick, __pyx_t_2) < 0) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * _gamecontroller_init_check() */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_15attached, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_attached, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_attached, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_17as_joystick, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_as_joystick, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_as_joystick, __pyx_t_2) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * _gamecontroller_init_check() */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_19get_axis, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_get_axis, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_get_axis, __pyx_t_2) < 0) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerGetButton * _gamecontroller_init_check() */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_21get_button, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_get_button, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_get_button, __pyx_t_2) < 0) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_23get_mapping, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_get_mapping, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_get_mapping, __pyx_t_2) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_25set_mapping, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_set_mapping, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_set_mapping, __pyx_t_2) < 0) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< * """ * Play a rumble effect on the controller, with set power (0-1 range) and */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_27rumble, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_rumble, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_rumble, __pyx_t_2) < 0) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "pygame/_sdl2/controller.pyx":259 * ) * * def stop_rumble(self): # <<<<<<<<<<<<<< * """ * Stop any rumble effect playing on the controller. */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_29stop_rumble, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller_stop_rumble, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_stop_rumble, __pyx_t_2) < 0) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._controller cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._controller cannot be converted to a Python object for pickling" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Controller___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_controller, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/controller.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * * cdef extern from "../pygame.h" nogil: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sdl2.controller", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sdl2.controller"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; itp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_GetMethod; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, int wraparound) { __Pyx_TypeName obj_type_name; #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #else CYTHON_UNUSED_VAR(wraparound); #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #else CYTHON_UNUSED_VAR(wraparound); #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); bad: return NULL; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return -1; __Pyx_PyErr_Clear(); return 0; } return 0; } /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } return __Pyx_IterFinish(); } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_COMPILING_IN_PYPY bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = __Pyx_PyObject_GetIterNextFunc(iter); value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #elif PY_MAJOR_VERSION >= 3 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); #ifdef HAVE_LONG_LONG if (sizeof(PY_LONG_LONG) > sizeof(long)) { PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b; return (result >= LONG_MIN && result <= LONG_MAX) ? PyInt_FromLong((long)result) : PyLong_FromLongLong(result); } #endif #if CYTHON_USE_TYPE_SLOTS return PyInt_Type.tp_as_number->nb_multiply(op1, op2); #else return PyNumber_Multiply(op1, op2); #endif } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op1); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2); } } CYTHON_UNUSED_VAR(a); CYTHON_UNUSED_VAR(b); #ifdef HAVE_LONG_LONG lla = a; goto long_long; #else return PyLong_Type.tp_as_number->nb_multiply(op1, op2); #endif return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla * llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("multiply", return NULL) result = ((double)a) * (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); } #endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__7); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* GetNameInClass */ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; PyObject *dict; assert(PyType_Check(nmspace)); #if CYTHON_USE_TYPE_SLOTS dict = ((PyTypeObject*)nmspace)->tp_dict; Py_XINCREF(dict); #else dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict); #endif if (likely(dict)) { result = PyObject_GetItem(dict, name); Py_DECREF(dict); if (result) { return result; } } PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE SDL_GameControllerAxis __Pyx_PyInt_As_SDL_GameControllerAxis(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_GameControllerAxis neg_one = (SDL_GameControllerAxis) -1, const_zero = (SDL_GameControllerAxis) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(SDL_GameControllerAxis) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SDL_GameControllerAxis) val; } } #endif if (unlikely(!PyLong_Check(x))) { SDL_GameControllerAxis val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SDL_GameControllerAxis) -1; val = __Pyx_PyInt_As_SDL_GameControllerAxis(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(SDL_GameControllerAxis) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) >= 2 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((((SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0])); } } break; case 3: if ((8 * sizeof(SDL_GameControllerAxis) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) >= 3 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((((((SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0])); } } break; case 4: if ((8 * sizeof(SDL_GameControllerAxis) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) >= 4 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((((((((SDL_GameControllerAxis)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SDL_GameControllerAxis) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(SDL_GameControllerAxis) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerAxis, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_GameControllerAxis) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerAxis, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 2 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((SDL_GameControllerAxis)-1)*(((((SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; case 2: if ((8 * sizeof(SDL_GameControllerAxis) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 2 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) ((((((SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; case -3: if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 3 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((SDL_GameControllerAxis)-1)*(((((((SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; case 3: if ((8 * sizeof(SDL_GameControllerAxis) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 3 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) ((((((((SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; case -4: if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 4 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) (((SDL_GameControllerAxis)-1)*(((((((((SDL_GameControllerAxis)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; case 4: if ((8 * sizeof(SDL_GameControllerAxis) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerAxis, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerAxis) - 1 > 4 * PyLong_SHIFT)) { return (SDL_GameControllerAxis) ((((((((((SDL_GameControllerAxis)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerAxis)digits[0]))); } } break; } } #endif if ((sizeof(SDL_GameControllerAxis) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerAxis, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_GameControllerAxis) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerAxis, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { SDL_GameControllerAxis val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (SDL_GameControllerAxis) -1; #endif if (unlikely(ret)) return (SDL_GameControllerAxis) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SDL_GameControllerAxis"); return (SDL_GameControllerAxis) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SDL_GameControllerAxis"); return (SDL_GameControllerAxis) -1; } /* CIntFromPy */ static CYTHON_INLINE SDL_GameControllerButton __Pyx_PyInt_As_SDL_GameControllerButton(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_GameControllerButton neg_one = (SDL_GameControllerButton) -1, const_zero = (SDL_GameControllerButton) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(SDL_GameControllerButton) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SDL_GameControllerButton) val; } } #endif if (unlikely(!PyLong_Check(x))) { SDL_GameControllerButton val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SDL_GameControllerButton) -1; val = __Pyx_PyInt_As_SDL_GameControllerButton(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(SDL_GameControllerButton) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) >= 2 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((((SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0])); } } break; case 3: if ((8 * sizeof(SDL_GameControllerButton) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) >= 3 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((((((SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0])); } } break; case 4: if ((8 * sizeof(SDL_GameControllerButton) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) >= 4 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((((((((SDL_GameControllerButton)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SDL_GameControllerButton) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(SDL_GameControllerButton) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerButton, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_GameControllerButton) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerButton, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(SDL_GameControllerButton) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 2 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((SDL_GameControllerButton)-1)*(((((SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; case 2: if ((8 * sizeof(SDL_GameControllerButton) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 2 * PyLong_SHIFT)) { return (SDL_GameControllerButton) ((((((SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; case -3: if ((8 * sizeof(SDL_GameControllerButton) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 3 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((SDL_GameControllerButton)-1)*(((((((SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; case 3: if ((8 * sizeof(SDL_GameControllerButton) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 3 * PyLong_SHIFT)) { return (SDL_GameControllerButton) ((((((((SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; case -4: if ((8 * sizeof(SDL_GameControllerButton) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 4 * PyLong_SHIFT)) { return (SDL_GameControllerButton) (((SDL_GameControllerButton)-1)*(((((((((SDL_GameControllerButton)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; case 4: if ((8 * sizeof(SDL_GameControllerButton) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_GameControllerButton, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_GameControllerButton) - 1 > 4 * PyLong_SHIFT)) { return (SDL_GameControllerButton) ((((((((((SDL_GameControllerButton)digits[3]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[2]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[1]) << PyLong_SHIFT) | (SDL_GameControllerButton)digits[0]))); } } break; } } #endif if ((sizeof(SDL_GameControllerButton) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerButton, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_GameControllerButton) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_GameControllerButton, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { SDL_GameControllerButton val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (SDL_GameControllerButton) -1; #endif if (unlikely(ret)) return (SDL_GameControllerButton) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SDL_GameControllerButton"); return (SDL_GameControllerButton) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SDL_GameControllerButton"); return (SDL_GameControllerButton) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_bool(SDL_bool value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_bool neg_one = (SDL_bool) -1, const_zero = (SDL_bool) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SDL_bool) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SDL_bool) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_bool) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SDL_bool) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_bool) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(SDL_bool), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SDL_bool)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Sint16(Sint16 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Sint16 neg_one = (Sint16) -1, const_zero = (Sint16) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Sint16) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Sint16) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Sint16) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Sint16) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Sint16) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Sint16), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Sint16)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Uint16 __Pyx_PyInt_As_Uint16(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint16 neg_one = (Uint16) -1, const_zero = (Uint16) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint16) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint16, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint16) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint16 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint16) -1; val = __Pyx_PyInt_As_Uint16(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint16, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint16) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 2 * PyLong_SHIFT)) { return (Uint16) (((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; case 3: if ((8 * sizeof(Uint16) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 3 * PyLong_SHIFT)) { return (Uint16) (((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; case 4: if ((8 * sizeof(Uint16) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) >= 4 * PyLong_SHIFT)) { return (Uint16) (((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint16) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint16) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint16) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint16, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint16) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint16) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { return (Uint16) ((((((Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint16) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint16) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { return (Uint16) ((((((((Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint16) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 4 * PyLong_SHIFT)) { return (Uint16) (((Uint16)-1)*(((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint16) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint16) - 1 > 4 * PyLong_SHIFT)) { return (Uint16) ((((((((((Uint16)digits[3]) << PyLong_SHIFT) | (Uint16)digits[2]) << PyLong_SHIFT) | (Uint16)digits[1]) << PyLong_SHIFT) | (Uint16)digits[0]))); } } break; } } #endif if ((sizeof(Uint16) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint16) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint16, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint16 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint16) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint16) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint16) -1; } else { stepval = v; } v = NULL; val = (Uint16) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint16) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint16) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint16) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint16) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint16) 1) << (sizeof(Uint16) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint16) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint16"); return (Uint16) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint16"); return (Uint16) -1; } /* CIntFromPy */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint32) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint32, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint32) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint32 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint32) -1; val = __Pyx_PyInt_As_Uint32(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 2 * PyLong_SHIFT)) { return (Uint32) (((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 3 * PyLong_SHIFT)) { return (Uint32) (((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 4 * PyLong_SHIFT)) { return (Uint32) (((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint32) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint32) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint32) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) ((((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) ((((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) ((((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; } } #endif if ((sizeof(Uint32) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint32 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint32) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint32) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint32) -1; } else { stepval = v; } v = NULL; val = (Uint32) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint32) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint32) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint32) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint32) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint32) 1) << (sizeof(Uint32) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint32) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint32"); return (Uint32) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint32"); return (Uint32) -1; } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__48); } return name; } #endif /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* FunctionExport */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); if (!d) { PyErr_Clear(); d = PyDict_New(); if (!d) goto bad; Py_INCREF(d); if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) goto bad; } tmp.fp = f; cobj = PyCapsule_New(tmp.p, sig, 0); if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.3971264 pygame-2.6.1/src_c/_sdl2/mixer.c0000644000175100001770000410005414676242435016014 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sdl2.mixer", "sources": [ "src_c/cython/pygame/_sdl2/mixer.pyx" ] }, "module_name": "pygame._sdl2.mixer" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sdl2__mixer #define __PYX_HAVE_API__pygame___sdl2__mixer /* Early includes */ #include #include #include "SDL.h" #include "SDL_mixer.h" #include "pythread.h" #include #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "", "src_c/cython/pygame/_sdl2/mixer.pyx", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /* BufferFormatStructs.proto */ struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* Atomics.proto */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 #endif #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS #define __pyx_atomic_int_type int #define __pyx_nonatomic_int_type int #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__)) #include #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ (defined(_MSC_VER) && _MSC_VER >= 1700))) #include #endif #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type atomic_int #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C atomics" #endif #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ \ (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type std::atomic_int #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C++ atomics" #endif #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1) #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif #elif CYTHON_ATOMICS && defined(_MSC_VER) #include #undef __pyx_atomic_int_type #define __pyx_atomic_int_type long #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long #pragma intrinsic (_InterlockedExchangeAdd) #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1) #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif #else #undef CYTHON_ATOMICS #define CYTHON_ATOMICS 0 #ifdef __PYX_DEBUG_ATOMICS #warning "Not using atomics" #endif #endif #if CYTHON_ATOMICS #define __pyx_add_acquisition_count(memview)\ __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview)) #define __pyx_sub_acquisition_count(memview)\ __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview)) #else #define __pyx_add_acquisition_count(memview)\ __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) #define __pyx_sub_acquisition_count(memview)\ __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) #endif /* MemviewSliceStruct.proto */ struct __pyx_memoryview_obj; typedef struct { struct __pyx_memoryview_obj *memview; char *data; Py_ssize_t shape[8]; Py_ssize_t strides[8]; Py_ssize_t suboffsets[8]; } __Pyx_memviewslice; #define __Pyx_MemoryView_Len(m) (m.shape[0]) /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix; struct __pyx_array_obj; struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; /* "pygame/_sdl2/mixer.pxd":8 * #https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC79 * * ctypedef void (*mixcallback)(void *udata, Uint8 *stream, int len) noexcept nogil # <<<<<<<<<<<<<< * * cdef extern from "SDL_mixer.h" nogil: */ typedef void (*__pyx_t_6pygame_5_sdl2_5mixer_mixcallback)(void *, Uint8 *, int); /* "pygame/_sdl2/mixer.pxd":15 * * * cdef class _PostMix: # <<<<<<<<<<<<<< * cdef mixcallback callback * cdef void *userdata */ struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix { PyObject_HEAD __pyx_t_6pygame_5_sdl2_5mixer_mixcallback callback; void *userdata; PyObject *_callback; }; /* "View.MemoryView":114 * @cython.collection_type("sequence") * @cname("__pyx_array") * cdef class array: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_array_obj { PyObject_HEAD struct __pyx_vtabstruct_array *__pyx_vtab; char *data; Py_ssize_t len; char *format; int ndim; Py_ssize_t *_shape; Py_ssize_t *_strides; Py_ssize_t itemsize; PyObject *mode; PyObject *_format; void (*callback_free_data)(void *); int free_data; int dtype_is_object; }; /* "View.MemoryView":302 * * @cname('__pyx_MemviewEnum') * cdef class Enum(object): # <<<<<<<<<<<<<< * cdef object name * def __init__(self, name): */ struct __pyx_MemviewEnum_obj { PyObject_HEAD PyObject *name; }; /* "View.MemoryView":337 * * @cname('__pyx_memoryview') * cdef class memoryview: # <<<<<<<<<<<<<< * * cdef object obj */ struct __pyx_memoryview_obj { PyObject_HEAD struct __pyx_vtabstruct_memoryview *__pyx_vtab; PyObject *obj; PyObject *_size; PyObject *_array_interface; PyThread_type_lock lock; __pyx_atomic_int_type acquisition_count; Py_buffer view; int flags; int dtype_is_object; __Pyx_TypeInfo *typeinfo; }; /* "View.MemoryView":952 * @cython.collection_type("sequence") * @cname('__pyx_memoryviewslice') * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< * "Internal class for passing memoryview slices to Python" * */ struct __pyx_memoryviewslice_obj { struct __pyx_memoryview_obj __pyx_base; __Pyx_memviewslice from_slice; PyObject *from_object; PyObject *(*to_object_func)(char *); int (*to_dtype_func)(char *, PyObject *); }; /* "View.MemoryView":114 * @cython.collection_type("sequence") * @cname("__pyx_array") * cdef class array: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_array { PyObject *(*get_memview)(struct __pyx_array_obj *); }; static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; /* "View.MemoryView":337 * * @cname('__pyx_memoryview') * cdef class memoryview: # <<<<<<<<<<<<<< * * cdef object obj */ struct __pyx_vtabstruct_memoryview { char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); PyObject *(*_get_base)(struct __pyx_memoryview_obj *); }; static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; /* "View.MemoryView":952 * @cython.collection_type("sequence") * @cname('__pyx_memoryviewslice') * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< * "Internal class for passing memoryview slices to Python" * */ struct __pyx_vtabstruct__memoryviewslice { struct __pyx_vtabstruct_memoryview __pyx_base; }; static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* RaiseUnexpectedTypeError.proto */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* BuildPyUnicode.proto */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); /* JoinPyUnicode.proto */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); /* StrEquals.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif /* PyObjectFormatSimple.proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #elif PY_MAJOR_VERSION < 3 #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\ PyObject_Format(s, f)) #elif CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ PyObject_Format(s, f)) #else #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #endif CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* DivInt[Py_ssize_t].proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* UnaryNegOverflows.proto */ #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* AssertionsEnabled.proto */ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (1) #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) static int __pyx_assertions_enabled_flag; #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) static int __Pyx_init_assertions_enabled(void) { PyObject *builtins, *debug, *debug_str; int flag; builtins = PyEval_GetBuiltins(); if (!builtins) goto bad; debug_str = PyUnicode_FromStringAndSize("__debug__", 9); if (!debug_str) goto bad; debug = PyObject_GetItem(builtins, debug_str); Py_DECREF(debug_str); if (!debug) goto bad; flag = PyObject_IsTrue(debug); Py_DECREF(debug); if (flag == -1) goto bad; __pyx_assertions_enabled_flag = flag; return 0; bad: __pyx_assertions_enabled_flag = 1; return -1; } #else #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (!Py_OptimizeFlag) #endif /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportDottedModule.proto */ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* PySequenceMultiply.proto */ #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul) static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul); /* SetItemInt.proto */ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); /* RaiseUnboundLocalError.proto */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); /* DivInt[long].proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* StringJoin.proto */ #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /* CIntToPyUnicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* SetVTable.proto */ static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); /* GetVTable.proto */ static void* __Pyx_GetVtable(PyTypeObject *type); /* MergeVTables.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type); #endif /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif /* BufferStructDeclare.proto */ typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; /* MemviewSliceIsContig.proto */ static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); /* OverlappingSlices.proto */ static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, __Pyx_memviewslice *slice2, int ndim, size_t itemsize); /* IsLittleEndian.proto */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); /* BufferFormatCheck.proto */ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type); /* TypeInfoCompare.proto */ static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); /* MemviewSliceValidateAndInit.proto */ static int __Pyx_ValidateAndInit_memviewslice( int *axes_specs, int c_or_f_flag, int buf_flags, int ndim, __Pyx_TypeInfo *dtype, __Pyx_BufFmt_StackElem stack[], __Pyx_memviewslice *memviewslice, PyObject *original_obj); /* ObjectToMemviewSlice.proto */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(PyObject *, int writable_flag); /* MemviewDtypeToObject.proto */ static CYTHON_INLINE PyObject *__pyx_memview_get_nn_Uint8(const char *itemp); static CYTHON_INLINE int __pyx_memview_set_nn_Uint8(const char *itemp, PyObject *obj); /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, const char *mode, int ndim, size_t sizeof_dtype, int contig_flag, int dtype_is_object); /* MemviewSliceInit.proto */ #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d #define __Pyx_MEMVIEW_DIRECT 1 #define __Pyx_MEMVIEW_PTR 2 #define __Pyx_MEMVIEW_FULL 4 #define __Pyx_MEMVIEW_CONTIG 8 #define __Pyx_MEMVIEW_STRIDED 16 #define __Pyx_MEMVIEW_FOLLOW 32 #define __Pyx_IS_C_CONTIG 1 #define __Pyx_IS_F_CONTIG 2 static int __Pyx_init_memviewslice( struct __pyx_memoryview_obj *memview, int ndim, __Pyx_memviewslice *memviewslice, int memview_is_new_reference); static CYTHON_INLINE int __pyx_add_acquisition_count_locked( __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count) #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__) static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int); /* TypeInfoToFormat.proto */ struct __pyx_typeinfo_string { char string[3]; }; static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value); /* CIntFromPy.proto */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* Module declarations from "pygame._sdl2.mixer" */ static PyObject *__pyx_collections_abc_Sequence = 0; static PyObject *generic = 0; static PyObject *strided = 0; static PyObject *indirect = 0; static PyObject *contiguous = 0; static PyObject *indirect_contiguous = 0; static int __pyx_memoryview_thread_locks_used; static PyThread_type_lock __pyx_memoryview_thread_locks[8]; static void __pyx_f_6pygame_5_sdl2_5mixer_recording_cb(void *, Uint8 *, int); /*proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5mixer_set_post_mix(PyObject *, int __pyx_skip_dispatch); /*proto*/ static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/ static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/ static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ static PyObject *_unellipsify(PyObject *, int); /*proto*/ static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/ static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/ static int __pyx_memoryview_err_no_memory(void); /*proto*/ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/ /* #### Code section: typeinfo ### */ static __Pyx_TypeInfo __Pyx_TypeInfo_nn_Uint8 = { "Uint8", NULL, sizeof(Uint8), { 0 }, 0, __PYX_IS_UNSIGNED(Uint8) ? 'U' : 'I', __PYX_IS_UNSIGNED(Uint8), 0 }; /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sdl2.mixer" extern int __pyx_module_is_main_pygame___sdl2__mixer; int __pyx_module_is_main_pygame___sdl2__mixer = 0; /* Implementation of "pygame._sdl2.mixer" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin___import__; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_AssertionError; static PyObject *__pyx_builtin_Ellipsis; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_IndexError; /* #### Code section: string_decls ### */ static const char __pyx_k_[] = ": "; static const char __pyx_k_O[] = "O"; static const char __pyx_k_T[] = "T{"; static const char __pyx_k_c[] = "c"; static const char __pyx_k__2[] = "."; static const char __pyx_k__3[] = "*"; static const char __pyx_k__6[] = "'"; static const char __pyx_k__7[] = ")"; static const char __pyx_k__9[] = "^"; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_id[] = "id"; static const char __pyx_k__10[] = ""; static const char __pyx_k__11[] = ":"; static const char __pyx_k__12[] = "}"; static const char __pyx_k__13[] = "("; static const char __pyx_k__14[] = ","; static const char __pyx_k__32[] = "?"; static const char __pyx_k_abc[] = "abc"; static const char __pyx_k_and[] = " and "; static const char __pyx_k_got[] = " (got "; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_base[] = "base"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_ndim[] = "ndim"; static const char __pyx_k_pack[] = "pack"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_spec[] = "__spec__"; static const char __pyx_k_step[] = "step"; static const char __pyx_k_stop[] = "stop"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_ASCII[] = "ASCII"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_count[] = "count"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_index[] = "index"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_shape[] = "shape"; static const char __pyx_k_start[] = "start"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_struct[] = "struct"; static const char __pyx_k_unpack[] = "unpack"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_PostMix[] = "_PostMix"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_fortran[] = "fortran"; static const char __pyx_k_memview[] = "memview"; static const char __pyx_k_postmix[] = "_postmix"; static const char __pyx_k_Ellipsis[] = "Ellipsis"; static const char __pyx_k_Sequence[] = "Sequence"; static const char __pyx_k_callback[] = "callback"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_itemsize[] = "itemsize"; static const char __pyx_k_mix_func[] = "mix_func"; static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_register[] = "register"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_print_exc[] = "print_exc"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_traceback[] = "traceback"; static const char __pyx_k_IndexError[] = "IndexError"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_collections[] = "collections"; static const char __pyx_k_initializing[] = "_initializing"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_set_post_mix[] = "set_post_mix"; static const char __pyx_k_stringsource[] = ""; static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_class_getitem[] = "__class_getitem__"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_AssertionError[] = "AssertionError"; static const char __pyx_k_View_MemoryView[] = "View.MemoryView"; static const char __pyx_k_allocate_buffer[] = "allocate_buffer"; static const char __pyx_k_collections_abc[] = "collections.abc"; static const char __pyx_k_dtype_is_object[] = "dtype_is_object"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_pygame__sdl2_sdl2[] = "pygame._sdl2.sdl2"; static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_pygame__sdl2_mixer[] = "pygame._sdl2.mixer"; static const char __pyx_k_strided_and_direct[] = ""; static const char __pyx_k_strided_and_indirect[] = ""; static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis "; static const char __pyx_k_contiguous_and_direct[] = ""; static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '"; static const char __pyx_k_MemoryView_of_r_object[] = ""; static const char __pyx_k_MemoryView_of_r_at_0x_x[] = ""; static const char __pyx_k_PostMix___reduce_cython[] = "_PostMix.__reduce_cython__"; static const char __pyx_k_contiguous_and_indirect[] = ""; static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct"; static const char __pyx_k_PostMix___setstate_cython[] = "_PostMix.__setstate_cython__"; static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)"; static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)"; static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array"; static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; static const char __pyx_k_strided_and_direct_or_indirect[] = ""; static const char __pyx_k_src_c_cython_pygame__sdl2_mixer[] = "src_c/cython/pygame/_sdl2/mixer.pyx"; static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview"; static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview"; static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions"; static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))"; static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported"; static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got "; static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis "; static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension "; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static const char __pyx_k_self_callback_self_userdata_cann[] = "self.callback,self.userdata cannot be converted to a Python object for pickling"; static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; /* #### Code section: decls ### */ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix___init__(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */ static void __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_8callback___get__(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_set_post_mix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mix_func); /* proto */ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5mixer__PostMix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_6pygame_5_sdl2_5mixer__PostMix; PyObject *__pyx_type___pyx_array; PyObject *__pyx_type___pyx_MemviewEnum; PyObject *__pyx_type___pyx_memoryview; PyObject *__pyx_type___pyx_memoryviewslice; #endif PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix; PyTypeObject *__pyx_array_type; PyTypeObject *__pyx_MemviewEnum_type; PyTypeObject *__pyx_memoryview_type; PyTypeObject *__pyx_memoryviewslice_type; PyObject *__pyx_kp_u_; PyObject *__pyx_n_s_ASCII; PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi; PyObject *__pyx_n_s_AssertionError; PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor; PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi; PyObject *__pyx_kp_u_Cannot_index_with_type; PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with; PyObject *__pyx_kp_s_Dimension_d_is_not_direct; PyObject *__pyx_n_s_Ellipsis; PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr; PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0; PyObject *__pyx_n_s_IndexError; PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d; PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte; PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr; PyObject *__pyx_kp_u_Invalid_shape_in_axis; PyObject *__pyx_n_s_MemoryError; PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x; PyObject *__pyx_kp_s_MemoryView_of_r_object; PyObject *__pyx_n_b_O; PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a; PyObject *__pyx_n_s_PickleError; PyObject *__pyx_n_s_PostMix; PyObject *__pyx_n_s_PostMix___reduce_cython; PyObject *__pyx_n_s_PostMix___setstate_cython; PyObject *__pyx_n_s_Sequence; PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d; PyObject *__pyx_kp_b_T; PyObject *__pyx_n_s_TypeError; PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; PyObject *__pyx_n_s_ValueError; PyObject *__pyx_n_s_View_MemoryView; PyObject *__pyx_kp_b__10; PyObject *__pyx_kp_b__11; PyObject *__pyx_kp_b__12; PyObject *__pyx_kp_u__13; PyObject *__pyx_kp_u__14; PyObject *__pyx_kp_u__2; PyObject *__pyx_n_s__3; PyObject *__pyx_n_s__32; PyObject *__pyx_kp_u__6; PyObject *__pyx_kp_u__7; PyObject *__pyx_kp_b__9; PyObject *__pyx_n_s_abc; PyObject *__pyx_n_s_allocate_buffer; PyObject *__pyx_kp_u_and; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_base; PyObject *__pyx_n_s_c; PyObject *__pyx_n_u_c; PyObject *__pyx_n_s_callback; PyObject *__pyx_n_s_class; PyObject *__pyx_n_s_class_getitem; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_collections; PyObject *__pyx_kp_s_collections_abc; PyObject *__pyx_kp_s_contiguous_and_direct; PyObject *__pyx_kp_s_contiguous_and_indirect; PyObject *__pyx_n_s_count; PyObject *__pyx_n_s_dict; PyObject *__pyx_kp_u_disable; PyObject *__pyx_n_s_dtype_is_object; PyObject *__pyx_kp_u_enable; PyObject *__pyx_n_s_encode; PyObject *__pyx_n_s_enumerate; PyObject *__pyx_n_s_error; PyObject *__pyx_n_s_flags; PyObject *__pyx_n_s_format; PyObject *__pyx_n_s_fortran; PyObject *__pyx_n_u_fortran; PyObject *__pyx_kp_u_gc; PyObject *__pyx_n_s_getstate; PyObject *__pyx_kp_u_got; PyObject *__pyx_kp_u_got_differing_extents_in_dimensi; PyObject *__pyx_n_s_id; PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_index; PyObject *__pyx_n_s_initializing; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_itemsize; PyObject *__pyx_kp_s_itemsize_0_for_cython_array; PyObject *__pyx_n_s_join; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_memview; PyObject *__pyx_n_s_mix_func; PyObject *__pyx_n_s_mode; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_name_2; PyObject *__pyx_n_s_ndim; PyObject *__pyx_n_s_new; PyObject *__pyx_kp_s_no_default___reduce___due_to_non; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_pack; PyObject *__pyx_n_s_pickle; PyObject *__pyx_n_s_postmix; PyObject *__pyx_n_s_print_exc; PyObject *__pyx_n_s_pygame__sdl2_mixer; PyObject *__pyx_n_s_pygame__sdl2_sdl2; PyObject *__pyx_n_s_pyx_PickleError; PyObject *__pyx_n_s_pyx_checksum; PyObject *__pyx_n_s_pyx_result; PyObject *__pyx_n_s_pyx_state; PyObject *__pyx_n_s_pyx_type; PyObject *__pyx_n_s_pyx_unpickle_Enum; PyObject *__pyx_n_s_pyx_vtable; PyObject *__pyx_n_s_range; PyObject *__pyx_n_s_reduce; PyObject *__pyx_n_s_reduce_cython; PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_register; PyObject *__pyx_n_s_self; PyObject *__pyx_kp_s_self_callback_self_userdata_cann; PyObject *__pyx_n_s_set_post_mix; PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_shape; PyObject *__pyx_n_s_size; PyObject *__pyx_n_s_spec; PyObject *__pyx_kp_s_src_c_cython_pygame__sdl2_mixer; PyObject *__pyx_n_s_start; PyObject *__pyx_n_s_step; PyObject *__pyx_n_s_stop; PyObject *__pyx_kp_s_strided_and_direct; PyObject *__pyx_kp_s_strided_and_direct_or_indirect; PyObject *__pyx_kp_s_strided_and_indirect; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_struct; PyObject *__pyx_n_s_sys; PyObject *__pyx_n_s_test; PyObject *__pyx_n_s_traceback; PyObject *__pyx_kp_s_unable_to_allocate_array_data; PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str; PyObject *__pyx_n_s_unpack; PyObject *__pyx_n_s_update; PyObject *__pyx_n_s_version_info; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_3; PyObject *__pyx_int_112105877; PyObject *__pyx_int_136983863; PyObject *__pyx_int_184977713; PyObject *__pyx_int_neg_1; PyObject *__pyx_slice__5; PyObject *__pyx_tuple__4; PyObject *__pyx_tuple__8; PyObject *__pyx_tuple__15; PyObject *__pyx_tuple__16; PyObject *__pyx_tuple__17; PyObject *__pyx_tuple__18; PyObject *__pyx_tuple__19; PyObject *__pyx_tuple__20; PyObject *__pyx_tuple__21; PyObject *__pyx_tuple__22; PyObject *__pyx_tuple__23; PyObject *__pyx_tuple__24; PyObject *__pyx_tuple__26; PyObject *__pyx_tuple__28; PyObject *__pyx_tuple__30; PyObject *__pyx_codeobj__25; PyObject *__pyx_codeobj__27; PyObject *__pyx_codeobj__29; PyObject *__pyx_codeobj__31; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5mixer__PostMix); Py_CLEAR(clear_module_state->__pyx_array_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_array); Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum); Py_CLEAR(clear_module_state->__pyx_memoryview_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview); Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type); Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice); Py_CLEAR(clear_module_state->__pyx_kp_u_); Py_CLEAR(clear_module_state->__pyx_n_s_ASCII); Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi); Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError); Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri); Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi); Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type); Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with); Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct); Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis); Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr); Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); Py_CLEAR(clear_module_state->__pyx_n_s_IndexError); Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d); Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte); Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr); Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis); Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError); Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x); Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object); Py_CLEAR(clear_module_state->__pyx_n_b_O); Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a); Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); Py_CLEAR(clear_module_state->__pyx_n_s_PostMix); Py_CLEAR(clear_module_state->__pyx_n_s_PostMix___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_PostMix___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Sequence); Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d); Py_CLEAR(clear_module_state->__pyx_kp_b_T); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object); Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView); Py_CLEAR(clear_module_state->__pyx_kp_b__10); Py_CLEAR(clear_module_state->__pyx_kp_b__11); Py_CLEAR(clear_module_state->__pyx_kp_b__12); Py_CLEAR(clear_module_state->__pyx_kp_u__13); Py_CLEAR(clear_module_state->__pyx_kp_u__14); Py_CLEAR(clear_module_state->__pyx_kp_u__2); Py_CLEAR(clear_module_state->__pyx_n_s__3); Py_CLEAR(clear_module_state->__pyx_n_s__32); Py_CLEAR(clear_module_state->__pyx_kp_u__6); Py_CLEAR(clear_module_state->__pyx_kp_u__7); Py_CLEAR(clear_module_state->__pyx_kp_b__9); Py_CLEAR(clear_module_state->__pyx_n_s_abc); Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer); Py_CLEAR(clear_module_state->__pyx_kp_u_and); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_base); Py_CLEAR(clear_module_state->__pyx_n_s_c); Py_CLEAR(clear_module_state->__pyx_n_u_c); Py_CLEAR(clear_module_state->__pyx_n_s_callback); Py_CLEAR(clear_module_state->__pyx_n_s_class); Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_collections); Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc); Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct); Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect); Py_CLEAR(clear_module_state->__pyx_n_s_count); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_encode); Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); Py_CLEAR(clear_module_state->__pyx_n_s_error); Py_CLEAR(clear_module_state->__pyx_n_s_flags); Py_CLEAR(clear_module_state->__pyx_n_s_format); Py_CLEAR(clear_module_state->__pyx_n_s_fortran); Py_CLEAR(clear_module_state->__pyx_n_u_fortran); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_kp_u_got); Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi); Py_CLEAR(clear_module_state->__pyx_n_s_id); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_index); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_itemsize); Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array); Py_CLEAR(clear_module_state->__pyx_n_s_join); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_memview); Py_CLEAR(clear_module_state->__pyx_n_s_mix_func); Py_CLEAR(clear_module_state->__pyx_n_s_mode); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_name_2); Py_CLEAR(clear_module_state->__pyx_n_s_ndim); Py_CLEAR(clear_module_state->__pyx_n_s_new); Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pack); Py_CLEAR(clear_module_state->__pyx_n_s_pickle); Py_CLEAR(clear_module_state->__pyx_n_s_postmix); Py_CLEAR(clear_module_state->__pyx_n_s_print_exc); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_mixer); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); Py_CLEAR(clear_module_state->__pyx_n_s_range); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_register); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_kp_s_self_callback_self_userdata_cann); Py_CLEAR(clear_module_state->__pyx_n_s_set_post_mix); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_shape); Py_CLEAR(clear_module_state->__pyx_n_s_size); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_mixer); Py_CLEAR(clear_module_state->__pyx_n_s_start); Py_CLEAR(clear_module_state->__pyx_n_s_step); Py_CLEAR(clear_module_state->__pyx_n_s_stop); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect); Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_struct); Py_CLEAR(clear_module_state->__pyx_n_s_sys); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_traceback); Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data); Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str); Py_CLEAR(clear_module_state->__pyx_n_s_unpack); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_n_s_version_info); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_3); Py_CLEAR(clear_module_state->__pyx_int_112105877); Py_CLEAR(clear_module_state->__pyx_int_136983863); Py_CLEAR(clear_module_state->__pyx_int_184977713); Py_CLEAR(clear_module_state->__pyx_int_neg_1); Py_CLEAR(clear_module_state->__pyx_slice__5); Py_CLEAR(clear_module_state->__pyx_tuple__4); Py_CLEAR(clear_module_state->__pyx_tuple__8); Py_CLEAR(clear_module_state->__pyx_tuple__15); Py_CLEAR(clear_module_state->__pyx_tuple__16); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__18); Py_CLEAR(clear_module_state->__pyx_tuple__19); Py_CLEAR(clear_module_state->__pyx_tuple__20); Py_CLEAR(clear_module_state->__pyx_tuple__21); Py_CLEAR(clear_module_state->__pyx_tuple__22); Py_CLEAR(clear_module_state->__pyx_tuple__23); Py_CLEAR(clear_module_state->__pyx_tuple__24); Py_CLEAR(clear_module_state->__pyx_tuple__26); Py_CLEAR(clear_module_state->__pyx_tuple__28); Py_CLEAR(clear_module_state->__pyx_tuple__30); Py_CLEAR(clear_module_state->__pyx_codeobj__25); Py_CLEAR(clear_module_state->__pyx_codeobj__27); Py_CLEAR(clear_module_state->__pyx_codeobj__29); Py_CLEAR(clear_module_state->__pyx_codeobj__31); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5mixer__PostMix); Py_VISIT(traverse_module_state->__pyx_array_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_array); Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum); Py_VISIT(traverse_module_state->__pyx_memoryview_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview); Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type); Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice); Py_VISIT(traverse_module_state->__pyx_kp_u_); Py_VISIT(traverse_module_state->__pyx_n_s_ASCII); Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi); Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError); Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri); Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi); Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type); Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with); Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct); Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis); Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr); Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); Py_VISIT(traverse_module_state->__pyx_n_s_IndexError); Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d); Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte); Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr); Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis); Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError); Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x); Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object); Py_VISIT(traverse_module_state->__pyx_n_b_O); Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a); Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); Py_VISIT(traverse_module_state->__pyx_n_s_PostMix); Py_VISIT(traverse_module_state->__pyx_n_s_PostMix___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_PostMix___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Sequence); Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d); Py_VISIT(traverse_module_state->__pyx_kp_b_T); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object); Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView); Py_VISIT(traverse_module_state->__pyx_kp_b__10); Py_VISIT(traverse_module_state->__pyx_kp_b__11); Py_VISIT(traverse_module_state->__pyx_kp_b__12); Py_VISIT(traverse_module_state->__pyx_kp_u__13); Py_VISIT(traverse_module_state->__pyx_kp_u__14); Py_VISIT(traverse_module_state->__pyx_kp_u__2); Py_VISIT(traverse_module_state->__pyx_n_s__3); Py_VISIT(traverse_module_state->__pyx_n_s__32); Py_VISIT(traverse_module_state->__pyx_kp_u__6); Py_VISIT(traverse_module_state->__pyx_kp_u__7); Py_VISIT(traverse_module_state->__pyx_kp_b__9); Py_VISIT(traverse_module_state->__pyx_n_s_abc); Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer); Py_VISIT(traverse_module_state->__pyx_kp_u_and); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_base); Py_VISIT(traverse_module_state->__pyx_n_s_c); Py_VISIT(traverse_module_state->__pyx_n_u_c); Py_VISIT(traverse_module_state->__pyx_n_s_callback); Py_VISIT(traverse_module_state->__pyx_n_s_class); Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_collections); Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc); Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct); Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect); Py_VISIT(traverse_module_state->__pyx_n_s_count); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_encode); Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); Py_VISIT(traverse_module_state->__pyx_n_s_error); Py_VISIT(traverse_module_state->__pyx_n_s_flags); Py_VISIT(traverse_module_state->__pyx_n_s_format); Py_VISIT(traverse_module_state->__pyx_n_s_fortran); Py_VISIT(traverse_module_state->__pyx_n_u_fortran); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_kp_u_got); Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi); Py_VISIT(traverse_module_state->__pyx_n_s_id); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_index); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_itemsize); Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array); Py_VISIT(traverse_module_state->__pyx_n_s_join); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_memview); Py_VISIT(traverse_module_state->__pyx_n_s_mix_func); Py_VISIT(traverse_module_state->__pyx_n_s_mode); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_name_2); Py_VISIT(traverse_module_state->__pyx_n_s_ndim); Py_VISIT(traverse_module_state->__pyx_n_s_new); Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pack); Py_VISIT(traverse_module_state->__pyx_n_s_pickle); Py_VISIT(traverse_module_state->__pyx_n_s_postmix); Py_VISIT(traverse_module_state->__pyx_n_s_print_exc); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_mixer); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); Py_VISIT(traverse_module_state->__pyx_n_s_range); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_register); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_kp_s_self_callback_self_userdata_cann); Py_VISIT(traverse_module_state->__pyx_n_s_set_post_mix); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_shape); Py_VISIT(traverse_module_state->__pyx_n_s_size); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_mixer); Py_VISIT(traverse_module_state->__pyx_n_s_start); Py_VISIT(traverse_module_state->__pyx_n_s_step); Py_VISIT(traverse_module_state->__pyx_n_s_stop); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect); Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_struct); Py_VISIT(traverse_module_state->__pyx_n_s_sys); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_traceback); Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data); Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str); Py_VISIT(traverse_module_state->__pyx_n_s_unpack); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_n_s_version_info); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_3); Py_VISIT(traverse_module_state->__pyx_int_112105877); Py_VISIT(traverse_module_state->__pyx_int_136983863); Py_VISIT(traverse_module_state->__pyx_int_184977713); Py_VISIT(traverse_module_state->__pyx_int_neg_1); Py_VISIT(traverse_module_state->__pyx_slice__5); Py_VISIT(traverse_module_state->__pyx_tuple__4); Py_VISIT(traverse_module_state->__pyx_tuple__8); Py_VISIT(traverse_module_state->__pyx_tuple__15); Py_VISIT(traverse_module_state->__pyx_tuple__16); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__18); Py_VISIT(traverse_module_state->__pyx_tuple__19); Py_VISIT(traverse_module_state->__pyx_tuple__20); Py_VISIT(traverse_module_state->__pyx_tuple__21); Py_VISIT(traverse_module_state->__pyx_tuple__22); Py_VISIT(traverse_module_state->__pyx_tuple__23); Py_VISIT(traverse_module_state->__pyx_tuple__24); Py_VISIT(traverse_module_state->__pyx_tuple__26); Py_VISIT(traverse_module_state->__pyx_tuple__28); Py_VISIT(traverse_module_state->__pyx_tuple__30); Py_VISIT(traverse_module_state->__pyx_codeobj__25); Py_VISIT(traverse_module_state->__pyx_codeobj__27); Py_VISIT(traverse_module_state->__pyx_codeobj__29); Py_VISIT(traverse_module_state->__pyx_codeobj__31); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_5_sdl2_5mixer__PostMix __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5mixer__PostMix #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice #endif #define __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix #define __pyx_array_type __pyx_mstate_global->__pyx_array_type #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_ #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError #define __pyx_n_s_PostMix __pyx_mstate_global->__pyx_n_s_PostMix #define __pyx_n_s_PostMix___reduce_cython __pyx_mstate_global->__pyx_n_s_PostMix___reduce_cython #define __pyx_n_s_PostMix___setstate_cython __pyx_mstate_global->__pyx_n_s_PostMix___setstate_cython #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d #define __pyx_kp_b_T __pyx_mstate_global->__pyx_kp_b_T #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView #define __pyx_kp_b__10 __pyx_mstate_global->__pyx_kp_b__10 #define __pyx_kp_b__11 __pyx_mstate_global->__pyx_kp_b__11 #define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12 #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13 #define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14 #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3 #define __pyx_n_s__32 __pyx_mstate_global->__pyx_n_s__32 #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 #define __pyx_kp_b__9 __pyx_mstate_global->__pyx_kp_b__9 #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c #define __pyx_n_s_callback __pyx_mstate_global->__pyx_n_s_callback #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array #define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview #define __pyx_n_s_mix_func __pyx_mstate_global->__pyx_n_s_mix_func #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle #define __pyx_n_s_postmix __pyx_mstate_global->__pyx_n_s_postmix #define __pyx_n_s_print_exc __pyx_mstate_global->__pyx_n_s_print_exc #define __pyx_n_s_pygame__sdl2_mixer __pyx_mstate_global->__pyx_n_s_pygame__sdl2_mixer #define __pyx_n_s_pygame__sdl2_sdl2 __pyx_mstate_global->__pyx_n_s_pygame__sdl2_sdl2 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_kp_s_self_callback_self_userdata_cann __pyx_mstate_global->__pyx_kp_s_self_callback_self_userdata_cann #define __pyx_n_s_set_post_mix __pyx_mstate_global->__pyx_n_s_set_post_mix #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_kp_s_src_c_cython_pygame__sdl2_mixer __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sdl2_mixer #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_traceback __pyx_mstate_global->__pyx_n_s_traceback #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877 #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863 #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5 #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15 #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31 /* #### Code section: module_code ### */ /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* Python wrapper */ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shape = 0; Py_ssize_t __pyx_v_itemsize; PyObject *__pyx_v_format = 0; PyObject *__pyx_v_mode = 0; int __pyx_v_allocate_buffer; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0}; values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 131, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_shape = ((PyObject*)values[0]); __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) __pyx_v_format = values[2]; __pyx_v_mode = values[3]; if (values[4]) { __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) } else { /* "View.MemoryView":132 * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< * * cdef int idx */ __pyx_v_allocate_buffer = ((int)1); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 131, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(0, 131, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 131, __pyx_L1_error) } __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { int __pyx_v_idx; Py_ssize_t __pyx_v_dim; char __pyx_v_order; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; char *__pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_UCS4 __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_format); /* "View.MemoryView":137 * cdef Py_ssize_t dim * * self.ndim = len(shape) # <<<<<<<<<<<<<< * self.itemsize = itemsize * */ if (unlikely(__pyx_v_shape == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 137, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 137, __pyx_L1_error) __pyx_v_self->ndim = ((int)__pyx_t_1); /* "View.MemoryView":138 * * self.ndim = len(shape) * self.itemsize = itemsize # <<<<<<<<<<<<<< * * if not self.ndim: */ __pyx_v_self->itemsize = __pyx_v_itemsize; /* "View.MemoryView":140 * self.itemsize = itemsize * * if not self.ndim: # <<<<<<<<<<<<<< * raise ValueError, "Empty shape tuple for cython.array" * */ __pyx_t_2 = (!(__pyx_v_self->ndim != 0)); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":141 * * if not self.ndim: * raise ValueError, "Empty shape tuple for cython.array" # <<<<<<<<<<<<<< * * if itemsize <= 0: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0); __PYX_ERR(0, 141, __pyx_L1_error) /* "View.MemoryView":140 * self.itemsize = itemsize * * if not self.ndim: # <<<<<<<<<<<<<< * raise ValueError, "Empty shape tuple for cython.array" * */ } /* "View.MemoryView":143 * raise ValueError, "Empty shape tuple for cython.array" * * if itemsize <= 0: # <<<<<<<<<<<<<< * raise ValueError, "itemsize <= 0 for cython.array" * */ __pyx_t_2 = (__pyx_v_itemsize <= 0); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":144 * * if itemsize <= 0: * raise ValueError, "itemsize <= 0 for cython.array" # <<<<<<<<<<<<<< * * if not isinstance(format, bytes): */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0); __PYX_ERR(0, 144, __pyx_L1_error) /* "View.MemoryView":143 * raise ValueError, "Empty shape tuple for cython.array" * * if itemsize <= 0: # <<<<<<<<<<<<<< * raise ValueError, "itemsize <= 0 for cython.array" * */ } /* "View.MemoryView":146 * raise ValueError, "itemsize <= 0 for cython.array" * * if not isinstance(format, bytes): # <<<<<<<<<<<<<< * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string */ __pyx_t_2 = PyBytes_Check(__pyx_v_format); __pyx_t_3 = (!__pyx_t_2); if (__pyx_t_3) { /* "View.MemoryView":147 * * if not isinstance(format, bytes): * format = format.encode('ASCII') # <<<<<<<<<<<<<< * self._format = format # keep a reference to the byte string * self.format = self._format */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":146 * raise ValueError, "itemsize <= 0 for cython.array" * * if not isinstance(format, bytes): # <<<<<<<<<<<<<< * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string */ } /* "View.MemoryView":148 * if not isinstance(format, bytes): * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< * self.format = self._format * */ if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(0, 148, __pyx_L1_error) __pyx_t_4 = __pyx_v_format; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_format); __Pyx_DECREF(__pyx_v_self->_format); __pyx_v_self->_format = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":149 * format = format.encode('ASCII') * self._format = format # keep a reference to the byte string * self.format = self._format # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_self->_format == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(0, 149, __pyx_L1_error) } __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error) __pyx_v_self->format = __pyx_t_8; /* "View.MemoryView":152 * * * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< * self._strides = self._shape + self.ndim * */ __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); /* "View.MemoryView":153 * * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< * * if not self._shape: */ __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); /* "View.MemoryView":155 * self._strides = self._shape + self.ndim * * if not self._shape: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate shape and strides." * */ __pyx_t_3 = (!(__pyx_v_self->_shape != 0)); if (unlikely(__pyx_t_3)) { /* "View.MemoryView":156 * * if not self._shape: * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0); __PYX_ERR(0, 156, __pyx_L1_error) /* "View.MemoryView":155 * self._strides = self._shape + self.ndim * * if not self._shape: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate shape and strides." * */ } /* "View.MemoryView":159 * * * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ __pyx_t_9 = 0; __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 159, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 159, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_dim = __pyx_t_10; __pyx_v_idx = __pyx_t_9; __pyx_t_9 = (__pyx_t_9 + 1); /* "View.MemoryView":160 * * for idx, dim in enumerate(shape): * if dim <= 0: # <<<<<<<<<<<<<< * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim */ __pyx_t_3 = (__pyx_v_dim <= 0); if (unlikely(__pyx_t_3)) { /* "View.MemoryView":161 * for idx, dim in enumerate(shape): * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<< * self._shape[idx] = dim * */ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = 0; __pyx_t_11 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis); __pyx_t_10 += 22; __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u_); __pyx_t_10 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_); __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u__2); __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2); __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 161, __pyx_L1_error) /* "View.MemoryView":160 * * for idx, dim in enumerate(shape): * if dim <= 0: # <<<<<<<<<<<<<< * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim */ } /* "View.MemoryView":162 * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." * self._shape[idx] = dim # <<<<<<<<<<<<<< * * cdef char order */ (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; /* "View.MemoryView":159 * * * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":165 * * cdef char order * if mode == 'c': # <<<<<<<<<<<<<< * order = b'C' * self.mode = u'c' */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 165, __pyx_L1_error) if (__pyx_t_3) { /* "View.MemoryView":166 * cdef char order * if mode == 'c': * order = b'C' # <<<<<<<<<<<<<< * self.mode = u'c' * elif mode == 'fortran': */ __pyx_v_order = 'C'; /* "View.MemoryView":167 * if mode == 'c': * order = b'C' * self.mode = u'c' # <<<<<<<<<<<<<< * elif mode == 'fortran': * order = b'F' */ __Pyx_INCREF(__pyx_n_u_c); __Pyx_GIVEREF(__pyx_n_u_c); __Pyx_GOTREF(__pyx_v_self->mode); __Pyx_DECREF(__pyx_v_self->mode); __pyx_v_self->mode = __pyx_n_u_c; /* "View.MemoryView":165 * * cdef char order * if mode == 'c': # <<<<<<<<<<<<<< * order = b'C' * self.mode = u'c' */ goto __pyx_L11; } /* "View.MemoryView":168 * order = b'C' * self.mode = u'c' * elif mode == 'fortran': # <<<<<<<<<<<<<< * order = b'F' * self.mode = u'fortran' */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 168, __pyx_L1_error) if (likely(__pyx_t_3)) { /* "View.MemoryView":169 * self.mode = u'c' * elif mode == 'fortran': * order = b'F' # <<<<<<<<<<<<<< * self.mode = u'fortran' * else: */ __pyx_v_order = 'F'; /* "View.MemoryView":170 * elif mode == 'fortran': * order = b'F' * self.mode = u'fortran' # <<<<<<<<<<<<<< * else: * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" */ __Pyx_INCREF(__pyx_n_u_fortran); __Pyx_GIVEREF(__pyx_n_u_fortran); __Pyx_GOTREF(__pyx_v_self->mode); __Pyx_DECREF(__pyx_v_self->mode); __pyx_v_self->mode = __pyx_n_u_fortran; /* "View.MemoryView":168 * order = b'C' * self.mode = u'c' * elif mode == 'fortran': # <<<<<<<<<<<<<< * order = b'F' * self.mode = u'fortran' */ goto __pyx_L11; } /* "View.MemoryView":172 * self.mode = u'fortran' * else: * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<< * * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 172, __pyx_L1_error) } __pyx_L11:; /* "View.MemoryView":174 * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" * * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<< * * self.free_data = allocate_buffer */ __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); /* "View.MemoryView":176 * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) * * self.free_data = allocate_buffer # <<<<<<<<<<<<<< * self.dtype_is_object = format == b'O' * */ __pyx_v_self->free_data = __pyx_v_allocate_buffer; /* "View.MemoryView":177 * * self.free_data = allocate_buffer * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< * * if allocate_buffer: */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_self->dtype_is_object = __pyx_t_3; /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' * * if allocate_buffer: # <<<<<<<<<<<<<< * _allocate_buffer(self) * */ if (__pyx_v_allocate_buffer) { /* "View.MemoryView":180 * * if allocate_buffer: * _allocate_buffer(self) # <<<<<<<<<<<<<< * * @cname('getbuffer') */ __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' * * if allocate_buffer: # <<<<<<<<<<<<<< * _allocate_buffer(self) * */ } /* "View.MemoryView":131 * cdef bint dtype_is_object * * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< * mode="c", bint allocate_buffer=True): * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_format); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":182 * _allocate_buffer(self) * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_bufmode; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; char *__pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; if (unlikely(__pyx_v_info == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "View.MemoryView":184 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 # <<<<<<<<<<<<<< * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": */ __pyx_v_bufmode = -1; /* "View.MemoryView":185 * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0); if (__pyx_t_1) { /* "View.MemoryView":186 * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": # <<<<<<<<<<<<<< * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":187 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); /* "View.MemoryView":186 * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): * if self.mode == u"c": # <<<<<<<<<<<<<< * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": */ goto __pyx_L4; } /* "View.MemoryView":188 * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": # <<<<<<<<<<<<<< * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 188, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":189 * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." */ __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); /* "View.MemoryView":188 * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * elif self.mode == u"fortran": # <<<<<<<<<<<<<< * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): */ } __pyx_L4:; /* "View.MemoryView":190 * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): # <<<<<<<<<<<<<< * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data */ __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0)); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":191 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." # <<<<<<<<<<<<<< * info.buf = self.data * info.len = self.len */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0); __PYX_ERR(0, 191, __pyx_L1_error) /* "View.MemoryView":190 * elif self.mode == u"fortran": * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS * if not (flags & bufmode): # <<<<<<<<<<<<<< * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data */ } /* "View.MemoryView":185 * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< * if self.mode == u"c": * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS */ } /* "View.MemoryView":192 * if not (flags & bufmode): * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data # <<<<<<<<<<<<<< * info.len = self.len * */ __pyx_t_2 = __pyx_v_self->data; __pyx_v_info->buf = __pyx_t_2; /* "View.MemoryView":193 * raise ValueError, "Can only create a buffer that is contiguous in memory." * info.buf = self.data * info.len = self.len # <<<<<<<<<<<<<< * * if flags & PyBUF_STRIDES: */ __pyx_t_3 = __pyx_v_self->len; __pyx_v_info->len = __pyx_t_3; /* "View.MemoryView":195 * info.len = self.len * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.ndim = self.ndim * info.shape = self._shape */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); if (__pyx_t_1) { /* "View.MemoryView":196 * * if flags & PyBUF_STRIDES: * info.ndim = self.ndim # <<<<<<<<<<<<<< * info.shape = self._shape * info.strides = self._strides */ __pyx_t_4 = __pyx_v_self->ndim; __pyx_v_info->ndim = __pyx_t_4; /* "View.MemoryView":197 * if flags & PyBUF_STRIDES: * info.ndim = self.ndim * info.shape = self._shape # <<<<<<<<<<<<<< * info.strides = self._strides * else: */ __pyx_t_5 = __pyx_v_self->_shape; __pyx_v_info->shape = __pyx_t_5; /* "View.MemoryView":198 * info.ndim = self.ndim * info.shape = self._shape * info.strides = self._strides # <<<<<<<<<<<<<< * else: * info.ndim = 1 */ __pyx_t_5 = __pyx_v_self->_strides; __pyx_v_info->strides = __pyx_t_5; /* "View.MemoryView":195 * info.len = self.len * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.ndim = self.ndim * info.shape = self._shape */ goto __pyx_L6; } /* "View.MemoryView":200 * info.strides = self._strides * else: * info.ndim = 1 # <<<<<<<<<<<<<< * info.shape = &self.len if flags & PyBUF_ND else NULL * info.strides = NULL */ /*else*/ { __pyx_v_info->ndim = 1; /* "View.MemoryView":201 * else: * info.ndim = 1 * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<< * info.strides = NULL * */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); if (__pyx_t_1) { __pyx_t_5 = (&__pyx_v_self->len); } else { __pyx_t_5 = NULL; } __pyx_v_info->shape = __pyx_t_5; /* "View.MemoryView":202 * info.ndim = 1 * info.shape = &self.len if flags & PyBUF_ND else NULL * info.strides = NULL # <<<<<<<<<<<<<< * * info.suboffsets = NULL */ __pyx_v_info->strides = NULL; } __pyx_L6:; /* "View.MemoryView":204 * info.strides = NULL * * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = self.itemsize * info.readonly = 0 */ __pyx_v_info->suboffsets = NULL; /* "View.MemoryView":205 * * info.suboffsets = NULL * info.itemsize = self.itemsize # <<<<<<<<<<<<<< * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL */ __pyx_t_3 = __pyx_v_self->itemsize; __pyx_v_info->itemsize = __pyx_t_3; /* "View.MemoryView":206 * info.suboffsets = NULL * info.itemsize = self.itemsize * info.readonly = 0 # <<<<<<<<<<<<<< * info.format = self.format if flags & PyBUF_FORMAT else NULL * info.obj = self */ __pyx_v_info->readonly = 0; /* "View.MemoryView":207 * info.itemsize = self.itemsize * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<< * info.obj = self * */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_v_self->format; } else { __pyx_t_2 = NULL; } __pyx_v_info->format = __pyx_t_2; /* "View.MemoryView":208 * info.readonly = 0 * info.format = self.format if flags & PyBUF_FORMAT else NULL * info.obj = self # <<<<<<<<<<<<<< * * def __dealloc__(array self): */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "View.MemoryView":182 * _allocate_buffer(self) * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * cdef int bufmode = -1 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":210 * info.obj = self * * def __dealloc__(array self): # <<<<<<<<<<<<<< * if self.callback_free_data != NULL: * self.callback_free_data(self.data) */ /* Python wrapper */ static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { int __pyx_t_1; int __pyx_t_2; /* "View.MemoryView":211 * * def __dealloc__(array self): * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: */ __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL); if (__pyx_t_1) { /* "View.MemoryView":212 * def __dealloc__(array self): * if self.callback_free_data != NULL: * self.callback_free_data(self.data) # <<<<<<<<<<<<<< * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: */ __pyx_v_self->callback_free_data(__pyx_v_self->data); /* "View.MemoryView":211 * * def __dealloc__(array self): * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: */ goto __pyx_L3; } /* "View.MemoryView":213 * if self.callback_free_data != NULL: * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) */ if (__pyx_v_self->free_data) { } else { __pyx_t_1 = __pyx_v_self->free_data; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->data != NULL); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "View.MemoryView":214 * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":215 * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<< * free(self.data) * PyObject_Free(self._shape) */ __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); /* "View.MemoryView":214 * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: * if self.dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) */ } /* "View.MemoryView":216 * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) # <<<<<<<<<<<<<< * PyObject_Free(self._shape) * */ free(__pyx_v_self->data); /* "View.MemoryView":213 * if self.callback_free_data != NULL: * self.callback_free_data(self.data) * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< * if self.dtype_is_object: * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) */ } __pyx_L3:; /* "View.MemoryView":217 * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) * free(self.data) * PyObject_Free(self._shape) # <<<<<<<<<<<<<< * * @property */ PyObject_Free(__pyx_v_self->_shape); /* "View.MemoryView":210 * info.obj = self * * def __dealloc__(array self): # <<<<<<<<<<<<<< * if self.callback_free_data != NULL: * self.callback_free_data(self.data) */ /* function exit code */ } /* "View.MemoryView":219 * PyObject_Free(self._shape) * * @property # <<<<<<<<<<<<<< * def memview(self): * return self.get_memview() */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":221 * @property * def memview(self): * return self.get_memview() # <<<<<<<<<<<<<< * * @cname('get_memview') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":219 * PyObject_Free(self._shape) * * @property # <<<<<<<<<<<<<< * def memview(self): * return self.get_memview() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":224 * * @cname('get_memview') * cdef get_memview(self): # <<<<<<<<<<<<<< * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) */ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_memview", 1); /* "View.MemoryView":225 * @cname('get_memview') * cdef get_memview(self): * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< * return memoryview(self, flags, self.dtype_is_object) * */ __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); /* "View.MemoryView":226 * cdef get_memview(self): * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 226, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":224 * * @cname('get_memview') * cdef get_memview(self): # <<<<<<<<<<<<<< * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE * return memoryview(self, flags, self.dtype_is_object) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":228 * return memoryview(self, flags, self.dtype_is_object) * * def __len__(self): # <<<<<<<<<<<<<< * return self._shape[0] * */ /* Python wrapper */ static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { Py_ssize_t __pyx_r; /* "View.MemoryView":229 * * def __len__(self): * return self._shape[0] # <<<<<<<<<<<<<< * * def __getattr__(self, attr): */ __pyx_r = (__pyx_v_self->_shape[0]); goto __pyx_L0; /* "View.MemoryView":228 * return memoryview(self, flags, self.dtype_is_object) * * def __len__(self): # <<<<<<<<<<<<<< * return self._shape[0] * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":231 * return self._shape[0] * * def __getattr__(self, attr): # <<<<<<<<<<<<<< * return getattr(self.memview, attr) * */ /* Python wrapper */ static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 1); /* "View.MemoryView":232 * * def __getattr__(self, attr): * return getattr(self.memview, attr) # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":231 * return self._shape[0] * * def __getattr__(self, attr): # <<<<<<<<<<<<<< * return getattr(self.memview, attr) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":234 * return getattr(self.memview, attr) * * def __getitem__(self, item): # <<<<<<<<<<<<<< * return self.memview[item] * */ /* Python wrapper */ static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 1); /* "View.MemoryView":235 * * def __getitem__(self, item): * return self.memview[item] # <<<<<<<<<<<<<< * * def __setitem__(self, item, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":234 * return getattr(self.memview, attr) * * def __getitem__(self, item): # <<<<<<<<<<<<<< * return self.memview[item] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":237 * return self.memview[item] * * def __setitem__(self, item, value): # <<<<<<<<<<<<<< * self.memview[item] = value * */ /* Python wrapper */ static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 1); /* "View.MemoryView":238 * * def __setitem__(self, item, value): * self.memview[item] = value # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":237 * return self.memview[item] * * def __setitem__(self, item, value): # <<<<<<<<<<<<<< * self.memview[item] = value * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":248 * * @cname("__pyx_array_allocate_buffer") * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<< * * */ static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) { Py_ssize_t __pyx_v_i; PyObject **__pyx_v_p; int __pyx_r; int __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "View.MemoryView":254 * cdef PyObject **p * * self.free_data = True # <<<<<<<<<<<<<< * self.data = malloc(self.len) * if not self.data: */ __pyx_v_self->free_data = 1; /* "View.MemoryView":255 * * self.free_data = True * self.data = malloc(self.len) # <<<<<<<<<<<<<< * if not self.data: * raise MemoryError, "unable to allocate array data." */ __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); /* "View.MemoryView":256 * self.free_data = True * self.data = malloc(self.len) * if not self.data: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate array data." * */ __pyx_t_1 = (!(__pyx_v_self->data != 0)); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":257 * self.data = malloc(self.len) * if not self.data: * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<< * * if self.dtype_is_object: */ __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0); __PYX_ERR(0, 257, __pyx_L1_error) /* "View.MemoryView":256 * self.free_data = True * self.data = malloc(self.len) * if not self.data: # <<<<<<<<<<<<<< * raise MemoryError, "unable to allocate array data." * */ } /* "View.MemoryView":259 * raise MemoryError, "unable to allocate array data." * * if self.dtype_is_object: # <<<<<<<<<<<<<< * p = self.data * for i in range(self.len // self.itemsize): */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":260 * * if self.dtype_is_object: * p = self.data # <<<<<<<<<<<<<< * for i in range(self.len // self.itemsize): * p[i] = Py_None */ __pyx_v_p = ((PyObject **)__pyx_v_self->data); /* "View.MemoryView":261 * if self.dtype_is_object: * p = self.data * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<< * p[i] = Py_None * Py_INCREF(Py_None) */ if (unlikely(__pyx_v_self->itemsize == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(0, 261, __pyx_L1_error) } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); __PYX_ERR(0, 261, __pyx_L1_error) } __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize); __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":262 * p = self.data * for i in range(self.len // self.itemsize): * p[i] = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * return 0 */ (__pyx_v_p[__pyx_v_i]) = Py_None; /* "View.MemoryView":263 * for i in range(self.len // self.itemsize): * p[i] = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(Py_None); } /* "View.MemoryView":259 * raise MemoryError, "unable to allocate array data." * * if self.dtype_is_object: # <<<<<<<<<<<<<< * p = self.data * for i in range(self.len // self.itemsize): */ } /* "View.MemoryView":264 * p[i] = Py_None * Py_INCREF(Py_None) * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":248 * * @cname("__pyx_array_allocate_buffer") * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<< * * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "View.MemoryView":268 * * @cname("__pyx_array_new") * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<< * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. */ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) { struct __pyx_array_obj *__pyx_v_result = 0; PyObject *__pyx_v_mode = 0; struct __pyx_array_obj *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_cwrapper", 1); /* "View.MemoryView":270 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<< * * if buf is NULL: */ __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f'); if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_s_fortran); __pyx_t_1 = __pyx_n_s_fortran; } else { __Pyx_INCREF(__pyx_n_s_c); __pyx_t_1 = __pyx_n_s_c; } __pyx_v_mode = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":272 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. * * if buf is NULL: # <<<<<<<<<<<<<< * result = array.__new__(array, shape, itemsize, format, mode) * else: */ __pyx_t_2 = (__pyx_v_buf == NULL); if (__pyx_t_2) { /* "View.MemoryView":273 * * if buf is NULL: * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<< * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(0, 273, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mode); __Pyx_GIVEREF(__pyx_v_mode); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(0, 273, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":272 * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. * * if buf is NULL: # <<<<<<<<<<<<<< * result = array.__new__(array, shape, itemsize, format, mode) * else: */ goto __pyx_L3; } /* "View.MemoryView":275 * result = array.__new__(array, shape, itemsize, format, mode) * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<< * result.data = buf * */ /*else*/ { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(0, 275, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mode); __Pyx_GIVEREF(__pyx_v_mode); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(0, 275, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 275, __pyx_L1_error) __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":276 * else: * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) * result.data = buf # <<<<<<<<<<<<<< * * return result */ __pyx_v_result->data = __pyx_v_buf; } __pyx_L3:; /* "View.MemoryView":278 * result.data = buf * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "View.MemoryView":268 * * @cname("__pyx_array_new") * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<< * cdef array result * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_mode); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":304 * cdef class Enum(object): * cdef object name * def __init__(self, name): # <<<<<<<<<<<<<< * self.name = name * def __repr__(self): */ /* Python wrapper */ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 304, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } __pyx_v_name = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 304, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); /* "View.MemoryView":305 * cdef object name * def __init__(self, name): * self.name = name # <<<<<<<<<<<<<< * def __repr__(self): * return self.name */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; /* "View.MemoryView":304 * cdef class Enum(object): * cdef object name * def __init__(self, name): # <<<<<<<<<<<<<< * self.name = name * def __repr__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":306 * def __init__(self, name): * self.name = name * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* Python wrapper */ static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 1); /* "View.MemoryView":307 * self.name = name * def __repr__(self): * return self.name # <<<<<<<<<<<<<< * * cdef generic = Enum("") */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* "View.MemoryView":306 * def __init__(self, name): * self.name = name * def __repr__(self): # <<<<<<<<<<<<<< * return self.name * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.name,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(0, 5, __pyx_L1_error); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.name,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.name,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); if (__pyx_t_2) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(0, 8, __pyx_L1_error); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.name is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.name,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.name is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state */ /*else*/ { __pyx_t_2 = (__pyx_v_self->name != Py_None); __pyx_v_use_setstate = __pyx_t_2; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: */ if (__pyx_v_use_setstate) { /* "(tree fragment)":13 * use_setstate = self.name is not None * if use_setstate: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(0, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_int_136983863); __Pyx_GIVEREF(__pyx_int_136983863); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(0, 13, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(0, 13, __pyx_L1_error); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(0, 13, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = self.name is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(0, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_int_136983863); __Pyx_GIVEREF(__pyx_int_136983863); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(0, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(0, 15, __pyx_L1_error); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 16, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 16, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":17 * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(0, 17, __pyx_L1_error) __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":349 * cdef __Pyx_TypeInfo *typeinfo * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< * self.obj = obj * self.flags = flags */ /* Python wrapper */ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_flags; int __pyx_v_dtype_is_object; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 349, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 349, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) if (values[2]) { __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) } else { __pyx_v_dtype_is_object = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 349, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_intptr_t __pyx_t_4; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "View.MemoryView":350 * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): * self.obj = obj # <<<<<<<<<<<<<< * self.flags = flags * if type(self) is memoryview or obj is not None: */ __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __Pyx_GOTREF(__pyx_v_self->obj); __Pyx_DECREF(__pyx_v_self->obj); __pyx_v_self->obj = __pyx_v_obj; /* "View.MemoryView":351 * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): * self.obj = obj * self.flags = flags # <<<<<<<<<<<<<< * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) */ __pyx_v_self->flags = __pyx_v_flags; /* "View.MemoryView":352 * self.obj = obj * self.flags = flags * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: */ __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type)); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_obj != Py_None); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "View.MemoryView":353 * self.flags = flags * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None */ __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 353, __pyx_L1_error) /* "View.MemoryView":354 * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: # <<<<<<<<<<<<<< * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) */ __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL); if (__pyx_t_1) { /* "View.MemoryView":355 * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; /* "View.MemoryView":356 * if self.view.obj == NULL: * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * * if not __PYX_CYTHON_ATOMICS_ENABLED(): */ Py_INCREF(Py_None); /* "View.MemoryView":354 * if type(self) is memoryview or obj is not None: * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: # <<<<<<<<<<<<<< * (<__pyx_buffer *> &self.view).obj = Py_None * Py_INCREF(Py_None) */ } /* "View.MemoryView":352 * self.obj = obj * self.flags = flags * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< * __Pyx_GetBuffer(obj, &self.view, flags) * if self.view.obj == NULL: */ } /* "View.MemoryView":358 * Py_INCREF(Py_None) * * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: */ __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED()); if (__pyx_t_1) { /* "View.MemoryView":360 * if not __PYX_CYTHON_ATOMICS_ENABLED(): * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<< * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 */ __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8); if (__pyx_t_1) { /* "View.MemoryView":361 * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: */ __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); /* "View.MemoryView":362 * if __pyx_memoryview_thread_locks_used < 8: * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< * if self.lock is NULL: * self.lock = PyThread_allocate_lock() */ __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); /* "View.MemoryView":360 * if not __PYX_CYTHON_ATOMICS_ENABLED(): * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<< * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 */ } /* "View.MemoryView":363 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: # <<<<<<<<<<<<<< * self.lock = PyThread_allocate_lock() * if self.lock is NULL: */ __pyx_t_1 = (__pyx_v_self->lock == NULL); if (__pyx_t_1) { /* "View.MemoryView":364 * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< * if self.lock is NULL: * raise MemoryError */ __pyx_v_self->lock = PyThread_allocate_lock(); /* "View.MemoryView":365 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() * if self.lock is NULL: # <<<<<<<<<<<<<< * raise MemoryError * */ __pyx_t_1 = (__pyx_v_self->lock == NULL); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":366 * self.lock = PyThread_allocate_lock() * if self.lock is NULL: * raise MemoryError # <<<<<<<<<<<<<< * * if flags & PyBUF_FORMAT: */ PyErr_NoMemory(); __PYX_ERR(0, 366, __pyx_L1_error) /* "View.MemoryView":365 * if self.lock is NULL: * self.lock = PyThread_allocate_lock() * if self.lock is NULL: # <<<<<<<<<<<<<< * raise MemoryError * */ } /* "View.MemoryView":363 * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] * __pyx_memoryview_thread_locks_used += 1 * if self.lock is NULL: # <<<<<<<<<<<<<< * self.lock = PyThread_allocate_lock() * if self.lock is NULL: */ } /* "View.MemoryView":358 * Py_INCREF(Py_None) * * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< * global __pyx_memoryview_thread_locks_used * if __pyx_memoryview_thread_locks_used < 8: */ } /* "View.MemoryView":368 * raise MemoryError * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { /* "View.MemoryView":369 * * if flags & PyBUF_FORMAT: * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< * else: * self.dtype_is_object = dtype_is_object */ __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O'); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L12_bool_binop_done; } __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00'); __pyx_t_1 = __pyx_t_2; __pyx_L12_bool_binop_done:; __pyx_v_self->dtype_is_object = __pyx_t_1; /* "View.MemoryView":368 * raise MemoryError * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: */ goto __pyx_L11; } /* "View.MemoryView":371 * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') * else: * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 */ /*else*/ { __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; } __pyx_L11:; /* "View.MemoryView":373 * self.dtype_is_object = dtype_is_object * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<< * self.typeinfo = NULL * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count))); __pyx_t_5 = (sizeof(__pyx_atomic_int_type)); if (unlikely(__pyx_t_5 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(0, 373, __pyx_L1_error) } __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(0, 373, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(0, 373, __pyx_L1_error) #endif /* "View.MemoryView":374 * * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 * self.typeinfo = NULL # <<<<<<<<<<<<<< * * def __dealloc__(memoryview self): */ __pyx_v_self->typeinfo = NULL; /* "View.MemoryView":349 * cdef __Pyx_TypeInfo *typeinfo * * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< * self.obj = obj * self.flags = flags */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":376 * self.typeinfo = NULL * * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) */ /* Python wrapper */ static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { int __pyx_v_i; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyThread_type_lock __pyx_t_5; PyThread_type_lock __pyx_t_6; /* "View.MemoryView":377 * * def __dealloc__(memoryview self): * if self.obj is not None: # <<<<<<<<<<<<<< * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: */ __pyx_t_1 = (__pyx_v_self->obj != Py_None); if (__pyx_t_1) { /* "View.MemoryView":378 * def __dealloc__(memoryview self): * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< * elif (<__pyx_buffer *> &self.view).obj == Py_None: * */ __Pyx_ReleaseBuffer((&__pyx_v_self->view)); /* "View.MemoryView":377 * * def __dealloc__(memoryview self): * if self.obj is not None: # <<<<<<<<<<<<<< * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: */ goto __pyx_L3; } /* "View.MemoryView":379 * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< * * (<__pyx_buffer *> &self.view).obj = NULL */ __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None); if (__pyx_t_1) { /* "View.MemoryView":381 * elif (<__pyx_buffer *> &self.view).obj == Py_None: * * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<< * Py_DECREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL; /* "View.MemoryView":382 * * (<__pyx_buffer *> &self.view).obj = NULL * Py_DECREF(Py_None) # <<<<<<<<<<<<<< * * cdef int i */ Py_DECREF(Py_None); /* "View.MemoryView":379 * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< * * (<__pyx_buffer *> &self.view).obj = NULL */ } __pyx_L3:; /* "View.MemoryView":386 * cdef int i * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: # <<<<<<<<<<<<<< * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: */ __pyx_t_1 = (__pyx_v_self->lock != NULL); if (__pyx_t_1) { /* "View.MemoryView":387 * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 */ __pyx_t_2 = __pyx_memoryview_thread_locks_used; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":388 * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: */ __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock); if (__pyx_t_1) { /* "View.MemoryView":389 * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( */ __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); /* "View.MemoryView":390 * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) */ __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used); if (__pyx_t_1) { /* "View.MemoryView":392 * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< * break * else: */ __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]); /* "View.MemoryView":391 * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) * break */ (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5; (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6; /* "View.MemoryView":390 * if __pyx_memoryview_thread_locks[i] is self.lock: * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) */ } /* "View.MemoryView":393 * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) * break # <<<<<<<<<<<<<< * else: * PyThread_free_lock(self.lock) */ goto __pyx_L6_break; /* "View.MemoryView":388 * if self.lock != NULL: * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< * __pyx_memoryview_thread_locks_used -= 1 * if i != __pyx_memoryview_thread_locks_used: */ } } /*else*/ { /* "View.MemoryView":395 * break * else: * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< * * cdef char *get_item_pointer(memoryview self, object index) except NULL: */ PyThread_free_lock(__pyx_v_self->lock); } __pyx_L6_break:; /* "View.MemoryView":386 * cdef int i * global __pyx_memoryview_thread_locks_used * if self.lock != NULL: # <<<<<<<<<<<<<< * for i in range(__pyx_memoryview_thread_locks_used): * if __pyx_memoryview_thread_locks[i] is self.lock: */ } /* "View.MemoryView":376 * self.typeinfo = NULL * * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< * if self.obj is not None: * __Pyx_ReleaseBuffer(&self.view) */ /* function exit code */ } /* "View.MemoryView":397 * PyThread_free_lock(self.lock) * * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf */ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { Py_ssize_t __pyx_v_dim; char *__pyx_v_itemp; PyObject *__pyx_v_idx = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item_pointer", 1); /* "View.MemoryView":399 * cdef char *get_item_pointer(memoryview self, object index) except NULL: * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< * * for dim, idx in enumerate(index): */ __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); /* "View.MemoryView":401 * cdef char *itemp = self.view.buf * * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< * itemp = pybuffer_index(&self.view, itemp, idx, dim) * */ __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 401, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 401, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 401, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 401, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 401, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); __pyx_t_5 = 0; __pyx_v_dim = __pyx_t_1; __pyx_t_1 = (__pyx_t_1 + 1); /* "View.MemoryView":402 * * for dim, idx in enumerate(index): * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< * * return itemp */ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error) __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 402, __pyx_L1_error) __pyx_v_itemp = __pyx_t_7; /* "View.MemoryView":401 * cdef char *itemp = self.view.buf * * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< * itemp = pybuffer_index(&self.view, itemp, idx, dim) * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":404 * itemp = pybuffer_index(&self.view, itemp, idx, dim) * * return itemp # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_itemp; goto __pyx_L0; /* "View.MemoryView":397 * PyThread_free_lock(self.lock) * * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< * cdef Py_ssize_t dim * cdef char *itemp = self.view.buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":407 * * * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< * if index is Ellipsis: * return self */ /* Python wrapper */ static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { PyObject *__pyx_v_have_slices = NULL; PyObject *__pyx_v_indices = NULL; char *__pyx_v_itemp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 1); /* "View.MemoryView":408 * * def __getitem__(memoryview self, object index): * if index is Ellipsis: # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); if (__pyx_t_1) { /* "View.MemoryView":409 * def __getitem__(memoryview self, object index): * if index is Ellipsis: * return self # <<<<<<<<<<<<<< * * have_slices, indices = _unellipsify(index, self.view.ndim) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "View.MemoryView":408 * * def __getitem__(memoryview self, object index): * if index is Ellipsis: # <<<<<<<<<<<<<< * return self * */ } /* "View.MemoryView":411 * return self * * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< * * cdef char *itemp */ __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(__pyx_t_2 != Py_None)) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 411, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 411, __pyx_L1_error) } __pyx_v_have_slices = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_indices = __pyx_t_4; __pyx_t_4 = 0; /* "View.MemoryView":414 * * cdef char *itemp * if have_slices: # <<<<<<<<<<<<<< * return memview_slice(self, indices) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 414, __pyx_L1_error) if (__pyx_t_1) { /* "View.MemoryView":415 * cdef char *itemp * if have_slices: * return memview_slice(self, indices) # <<<<<<<<<<<<<< * else: * itemp = self.get_item_pointer(indices) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":414 * * cdef char *itemp * if have_slices: # <<<<<<<<<<<<<< * return memview_slice(self, indices) * else: */ } /* "View.MemoryView":417 * return memview_slice(self, indices) * else: * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< * return self.convert_item_to_object(itemp) * */ /*else*/ { __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(0, 417, __pyx_L1_error) __pyx_v_itemp = __pyx_t_5; /* "View.MemoryView":418 * else: * itemp = self.get_item_pointer(indices) * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< * * def __setitem__(memoryview self, object index, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":407 * * * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< * if index is Ellipsis: * return self */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_have_slices); __Pyx_XDECREF(__pyx_v_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":420 * return self.convert_item_to_object(itemp) * * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" */ /* Python wrapper */ static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { PyObject *__pyx_v_have_slices = NULL; PyObject *__pyx_v_obj = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); __Pyx_INCREF(__pyx_v_index); /* "View.MemoryView":421 * * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError, "Cannot assign to read-only memoryview" * */ if (unlikely(__pyx_v_self->view.readonly)) { /* "View.MemoryView":422 * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<< * * have_slices, index = _unellipsify(index, self.view.ndim) */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0); __PYX_ERR(0, 422, __pyx_L1_error) /* "View.MemoryView":421 * * def __setitem__(memoryview self, object index, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError, "Cannot assign to read-only memoryview" * */ } /* "View.MemoryView":424 * raise TypeError, "Cannot assign to read-only memoryview" * * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< * * if have_slices: */ __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 424, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 424, __pyx_L1_error) } __pyx_v_have_slices = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":426 * have_slices, index = _unellipsify(index, self.view.ndim) * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) * if obj is not None: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 426, __pyx_L1_error) if (__pyx_t_4) { /* "View.MemoryView":427 * * if have_slices: * obj = self.is_slice(value) # <<<<<<<<<<<<<< * if obj is not None: * self.setitem_slice_assignment(self[index], obj) */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ __pyx_t_4 = (__pyx_v_obj != Py_None); if (__pyx_t_4) { /* "View.MemoryView":429 * obj = self.is_slice(value) * if obj is not None: * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< * else: * self.setitem_slice_assign_scalar(self[index], value) */ __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ goto __pyx_L5; } /* "View.MemoryView":431 * self.setitem_slice_assignment(self[index], obj) * else: * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< * else: * self.setitem_indexed(index, value) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 431, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; /* "View.MemoryView":426 * have_slices, index = _unellipsify(index, self.view.ndim) * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) * if obj is not None: */ goto __pyx_L4; } /* "View.MemoryView":433 * self.setitem_slice_assign_scalar(self[index], value) * else: * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< * * cdef is_slice(self, obj): */ /*else*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; /* "View.MemoryView":420 * return self.convert_item_to_object(itemp) * * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError, "Cannot assign to read-only memoryview" */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_have_slices); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_index); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":435 * self.setitem_indexed(index, value) * * cdef is_slice(self, obj): # <<<<<<<<<<<<<< * if not isinstance(obj, memoryview): * try: */ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_slice", 0); __Pyx_INCREF(__pyx_v_obj); /* "View.MemoryView":436 * * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "View.MemoryView":438 * if not isinstance(obj, memoryview): * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< * self.dtype_is_object) * except TypeError: */ __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); /* "View.MemoryView":439 * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) # <<<<<<<<<<<<<< * except TypeError: * return None */ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); /* "View.MemoryView":438 * if not isinstance(obj, memoryview): * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< * self.dtype_is_object) * except TypeError: */ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(0, 438, __pyx_L4_error); __Pyx_GIVEREF(__pyx_t_6); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 438, __pyx_L4_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(0, 438, __pyx_L4_error); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 438, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "View.MemoryView":440 * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) * except TypeError: # <<<<<<<<<<<<<< * return None * */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_9) { __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 440, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); /* "View.MemoryView":441 * self.dtype_is_object) * except TypeError: * return None # <<<<<<<<<<<<<< * * return obj */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; /* "View.MemoryView":437 * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): * try: # <<<<<<<<<<<<<< * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, * self.dtype_is_object) */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L9_try_end:; } /* "View.MemoryView":436 * * cdef is_slice(self, obj): * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< * try: * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, */ } /* "View.MemoryView":443 * return None * * return obj # <<<<<<<<<<<<<< * * cdef setitem_slice_assignment(self, dst, src): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; /* "View.MemoryView":435 * self.setitem_indexed(index, value) * * cdef is_slice(self, obj): # <<<<<<<<<<<<<< * if not isinstance(obj, memoryview): * try: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":445 * return obj * * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice */ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { __Pyx_memviewslice __pyx_v_dst_slice; __Pyx_memviewslice __pyx_v_src_slice; __Pyx_memviewslice __pyx_v_msrc; __Pyx_memviewslice __pyx_v_mdst; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assignment", 1); /* "View.MemoryView":448 * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] * */ if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 448, __pyx_L1_error) __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 448, __pyx_L1_error) __pyx_v_msrc = (__pyx_t_1[0]); /* "View.MemoryView":449 * cdef __Pyx_memviewslice src_slice * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<< * * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) */ if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 449, __pyx_L1_error) __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 449, __pyx_L1_error) __pyx_v_mdst = (__pyx_t_1[0]); /* "View.MemoryView":451 * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] * * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 451, __pyx_L1_error) /* "View.MemoryView":445 * return obj * * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice dst_slice * cdef __Pyx_memviewslice src_slice */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":453 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< * cdef int array[128] * cdef void *tmp = NULL */ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { int __pyx_v_array[0x80]; void *__pyx_v_tmp; void *__pyx_v_item; __Pyx_memviewslice *__pyx_v_dst_slice; __Pyx_memviewslice __pyx_v_tmp_slice; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; char const *__pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1); /* "View.MemoryView":455 * cdef setitem_slice_assign_scalar(self, memoryview dst, value): * cdef int array[128] * cdef void *tmp = NULL # <<<<<<<<<<<<<< * cdef void *item * */ __pyx_v_tmp = NULL; /* "View.MemoryView":460 * cdef __Pyx_memviewslice *dst_slice * cdef __Pyx_memviewslice tmp_slice * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< * * if self.view.itemsize > sizeof(array): */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 460, __pyx_L1_error) __pyx_v_dst_slice = __pyx_t_1; /* "View.MemoryView":462 * dst_slice = get_slice_from_memview(dst, &tmp_slice) * * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: */ __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))); if (__pyx_t_2) { /* "View.MemoryView":463 * * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< * if tmp == NULL: * raise MemoryError */ __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); /* "View.MemoryView":464 * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: # <<<<<<<<<<<<<< * raise MemoryError * item = tmp */ __pyx_t_2 = (__pyx_v_tmp == NULL); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":465 * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: * raise MemoryError # <<<<<<<<<<<<<< * item = tmp * else: */ PyErr_NoMemory(); __PYX_ERR(0, 465, __pyx_L1_error) /* "View.MemoryView":464 * if self.view.itemsize > sizeof(array): * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: # <<<<<<<<<<<<<< * raise MemoryError * item = tmp */ } /* "View.MemoryView":466 * if tmp == NULL: * raise MemoryError * item = tmp # <<<<<<<<<<<<<< * else: * item = array */ __pyx_v_item = __pyx_v_tmp; /* "View.MemoryView":462 * dst_slice = get_slice_from_memview(dst, &tmp_slice) * * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< * tmp = PyMem_Malloc(self.view.itemsize) * if tmp == NULL: */ goto __pyx_L3; } /* "View.MemoryView":468 * item = tmp * else: * item = array # <<<<<<<<<<<<<< * * try: */ /*else*/ { __pyx_v_item = ((void *)__pyx_v_array); } __pyx_L3:; /* "View.MemoryView":470 * item = array * * try: # <<<<<<<<<<<<<< * if self.dtype_is_object: * ( item)[0] = value */ /*try:*/ { /* "View.MemoryView":471 * * try: * if self.dtype_is_object: # <<<<<<<<<<<<<< * ( item)[0] = value * else: */ if (__pyx_v_self->dtype_is_object) { /* "View.MemoryView":472 * try: * if self.dtype_is_object: * ( item)[0] = value # <<<<<<<<<<<<<< * else: * self.assign_item_from_object( item, value) */ (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); /* "View.MemoryView":471 * * try: * if self.dtype_is_object: # <<<<<<<<<<<<<< * ( item)[0] = value * else: */ goto __pyx_L8; } /* "View.MemoryView":474 * ( item)[0] = value * else: * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L8:; /* "View.MemoryView":478 * * * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, */ __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL); if (__pyx_t_2) { /* "View.MemoryView":479 * * if self.view.suboffsets != NULL: * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, * item, self.dtype_is_object) */ __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L6_error) /* "View.MemoryView":478 * * * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, */ } /* "View.MemoryView":480 * if self.view.suboffsets != NULL: * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< * item, self.dtype_is_object) * finally: */ __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); } /* "View.MemoryView":483 * item, self.dtype_is_object) * finally: * PyMem_Free(tmp) # <<<<<<<<<<<<<< * * cdef setitem_indexed(self, index, value): */ /*finally:*/ { /*normal exit:*/{ PyMem_Free(__pyx_v_tmp); goto __pyx_L7; } __pyx_L6_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; { PyMem_Free(__pyx_v_tmp); } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; goto __pyx_L1_error; } __pyx_L7:; } /* "View.MemoryView":453 * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) * * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< * cdef int array[128] * cdef void *tmp = NULL */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":485 * PyMem_Free(tmp) * * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) */ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { char *__pyx_v_itemp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_indexed", 1); /* "View.MemoryView":486 * * cdef setitem_indexed(self, index, value): * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< * self.assign_item_from_object(itemp, value) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 486, __pyx_L1_error) __pyx_v_itemp = __pyx_t_1; /* "View.MemoryView":487 * cdef setitem_indexed(self, index, value): * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< * * cdef convert_item_to_object(self, char *itemp): */ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":485 * PyMem_Free(tmp) * * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< * cdef char *itemp = self.get_item_pointer(index) * self.assign_item_from_object(itemp, value) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":489 * self.assign_item_from_object(itemp, value) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { PyObject *__pyx_v_struct = NULL; PyObject *__pyx_v_bytesitem = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 1); /* "View.MemoryView":492 * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" * import struct # <<<<<<<<<<<<<< * cdef bytes bytesitem * */ __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_struct = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":495 * cdef bytes bytesitem * * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< * try: * result = struct.unpack(self.view.format, bytesitem) */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "View.MemoryView":497 * bytesitem = itemp[:self.view.itemsize] * try: * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< * except struct.error: * raise ValueError, "Unable to convert item to object" */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ } /* "View.MemoryView":501 * raise ValueError, "Unable to convert item to object" * else: * if len(self.view.format) == 1: # <<<<<<<<<<<<<< * return result[0] * return result */ /*else:*/ { __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L5_except_error) __pyx_t_10 = (__pyx_t_9 == 1); if (__pyx_t_10) { /* "View.MemoryView":502 * else: * if len(self.view.format) == 1: * return result[0] # <<<<<<<<<<<<<< * return result * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L6_except_return; /* "View.MemoryView":501 * raise ValueError, "Unable to convert item to object" * else: * if len(self.view.format) == 1: # <<<<<<<<<<<<<< * return result[0] * return result */ } /* "View.MemoryView":503 * if len(self.view.format) == 1: * return result[0] * return result # <<<<<<<<<<<<<< * * cdef assign_item_from_object(self, char *itemp, object value): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L6_except_return; } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":498 * try: * result = struct.unpack(self.view.format, bytesitem) * except struct.error: # <<<<<<<<<<<<<< * raise ValueError, "Unable to convert item to object" * else: */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 498, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); /* "View.MemoryView":499 * result = struct.unpack(self.view.format, bytesitem) * except struct.error: * raise ValueError, "Unable to convert item to object" # <<<<<<<<<<<<<< * else: * if len(self.view.format) == 1: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0); __PYX_ERR(0, 499, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "View.MemoryView":496 * * bytesitem = itemp[:self.view.itemsize] * try: # <<<<<<<<<<<<<< * result = struct.unpack(self.view.format, bytesitem) * except struct.error: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; } /* "View.MemoryView":489 * self.assign_item_from_object(itemp, value) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_struct); __Pyx_XDECREF(__pyx_v_bytesitem); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":505 * return result * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { PyObject *__pyx_v_struct = NULL; char __pyx_v_c; PyObject *__pyx_v_bytesvalue = 0; Py_ssize_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; char *__pyx_t_10; char *__pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 1); /* "View.MemoryView":508 * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" * import struct # <<<<<<<<<<<<<< * cdef char c * cdef bytes bytesvalue */ __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_struct = __pyx_t_1; __pyx_t_1 = 0; /* "View.MemoryView":513 * cdef Py_ssize_t i * * if isinstance(value, tuple): # <<<<<<<<<<<<<< * bytesvalue = struct.pack(self.view.format, *value) * else: */ __pyx_t_2 = PyTuple_Check(__pyx_v_value); if (__pyx_t_2) { /* "View.MemoryView":514 * * if isinstance(value, tuple): * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< * else: * bytesvalue = struct.pack(self.view.format, value) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 514, __pyx_L1_error) __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":513 * cdef Py_ssize_t i * * if isinstance(value, tuple): # <<<<<<<<<<<<<< * bytesvalue = struct.pack(self.view.format, *value) * else: */ goto __pyx_L3; } /* "View.MemoryView":516 * bytesvalue = struct.pack(self.view.format, *value) * else: * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< * * for i, c in enumerate(bytesvalue): */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 516, __pyx_L1_error) __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "View.MemoryView":518 * bytesvalue = struct.pack(self.view.format, value) * * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< * itemp[i] = c * */ __pyx_t_7 = 0; if (unlikely(__pyx_v_bytesvalue == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); __PYX_ERR(0, 518, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_bytesvalue); __pyx_t_8 = __pyx_v_bytesvalue; __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8); __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8)); for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) { __pyx_t_9 = __pyx_t_12; __pyx_v_c = (__pyx_t_9[0]); /* "View.MemoryView":519 * * for i, c in enumerate(bytesvalue): * itemp[i] = c # <<<<<<<<<<<<<< * * @cname('getbuffer') */ __pyx_v_i = __pyx_t_7; /* "View.MemoryView":518 * bytesvalue = struct.pack(self.view.format, value) * * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< * itemp[i] = c * */ __pyx_t_7 = (__pyx_t_7 + 1); /* "View.MemoryView":519 * * for i, c in enumerate(bytesvalue): * itemp[i] = c # <<<<<<<<<<<<<< * * @cname('getbuffer') */ (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "View.MemoryView":505 * return result * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * """Only used if instantiated manually by the user, or if Cython doesn't * know how to convert the type""" */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_struct); __Pyx_XDECREF(__pyx_v_bytesvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":521 * itemp[i] = c * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t *__pyx_t_3; char *__pyx_t_4; void *__pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; if (unlikely(__pyx_v_info == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "View.MemoryView":523 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< * raise ValueError, "Cannot create writable memory view from read-only memoryview" * */ __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __pyx_v_self->view.readonly; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "View.MemoryView":524 * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: * raise ValueError, "Cannot create writable memory view from read-only memoryview" # <<<<<<<<<<<<<< * * if flags & PyBUF_ND: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0); __PYX_ERR(0, 524, __pyx_L1_error) /* "View.MemoryView":523 * @cname('getbuffer') * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< * raise ValueError, "Cannot create writable memory view from read-only memoryview" * */ } /* "View.MemoryView":526 * raise ValueError, "Cannot create writable memory view from read-only memoryview" * * if flags & PyBUF_ND: # <<<<<<<<<<<<<< * info.shape = self.view.shape * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); if (__pyx_t_1) { /* "View.MemoryView":527 * * if flags & PyBUF_ND: * info.shape = self.view.shape # <<<<<<<<<<<<<< * else: * info.shape = NULL */ __pyx_t_3 = __pyx_v_self->view.shape; __pyx_v_info->shape = __pyx_t_3; /* "View.MemoryView":526 * raise ValueError, "Cannot create writable memory view from read-only memoryview" * * if flags & PyBUF_ND: # <<<<<<<<<<<<<< * info.shape = self.view.shape * else: */ goto __pyx_L6; } /* "View.MemoryView":529 * info.shape = self.view.shape * else: * info.shape = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_STRIDES: */ /*else*/ { __pyx_v_info->shape = NULL; } __pyx_L6:; /* "View.MemoryView":531 * info.shape = NULL * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.strides = self.view.strides * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); if (__pyx_t_1) { /* "View.MemoryView":532 * * if flags & PyBUF_STRIDES: * info.strides = self.view.strides # <<<<<<<<<<<<<< * else: * info.strides = NULL */ __pyx_t_3 = __pyx_v_self->view.strides; __pyx_v_info->strides = __pyx_t_3; /* "View.MemoryView":531 * info.shape = NULL * * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< * info.strides = self.view.strides * else: */ goto __pyx_L7; } /* "View.MemoryView":534 * info.strides = self.view.strides * else: * info.strides = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_INDIRECT: */ /*else*/ { __pyx_v_info->strides = NULL; } __pyx_L7:; /* "View.MemoryView":536 * info.strides = NULL * * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< * info.suboffsets = self.view.suboffsets * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); if (__pyx_t_1) { /* "View.MemoryView":537 * * if flags & PyBUF_INDIRECT: * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< * else: * info.suboffsets = NULL */ __pyx_t_3 = __pyx_v_self->view.suboffsets; __pyx_v_info->suboffsets = __pyx_t_3; /* "View.MemoryView":536 * info.strides = NULL * * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< * info.suboffsets = self.view.suboffsets * else: */ goto __pyx_L8; } /* "View.MemoryView":539 * info.suboffsets = self.view.suboffsets * else: * info.suboffsets = NULL # <<<<<<<<<<<<<< * * if flags & PyBUF_FORMAT: */ /*else*/ { __pyx_v_info->suboffsets = NULL; } __pyx_L8:; /* "View.MemoryView":541 * info.suboffsets = NULL * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * info.format = self.view.format * else: */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { /* "View.MemoryView":542 * * if flags & PyBUF_FORMAT: * info.format = self.view.format # <<<<<<<<<<<<<< * else: * info.format = NULL */ __pyx_t_4 = __pyx_v_self->view.format; __pyx_v_info->format = __pyx_t_4; /* "View.MemoryView":541 * info.suboffsets = NULL * * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< * info.format = self.view.format * else: */ goto __pyx_L9; } /* "View.MemoryView":544 * info.format = self.view.format * else: * info.format = NULL # <<<<<<<<<<<<<< * * info.buf = self.view.buf */ /*else*/ { __pyx_v_info->format = NULL; } __pyx_L9:; /* "View.MemoryView":546 * info.format = NULL * * info.buf = self.view.buf # <<<<<<<<<<<<<< * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize */ __pyx_t_5 = __pyx_v_self->view.buf; __pyx_v_info->buf = __pyx_t_5; /* "View.MemoryView":547 * * info.buf = self.view.buf * info.ndim = self.view.ndim # <<<<<<<<<<<<<< * info.itemsize = self.view.itemsize * info.len = self.view.len */ __pyx_t_6 = __pyx_v_self->view.ndim; __pyx_v_info->ndim = __pyx_t_6; /* "View.MemoryView":548 * info.buf = self.view.buf * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< * info.len = self.view.len * info.readonly = self.view.readonly */ __pyx_t_7 = __pyx_v_self->view.itemsize; __pyx_v_info->itemsize = __pyx_t_7; /* "View.MemoryView":549 * info.ndim = self.view.ndim * info.itemsize = self.view.itemsize * info.len = self.view.len # <<<<<<<<<<<<<< * info.readonly = self.view.readonly * info.obj = self */ __pyx_t_7 = __pyx_v_self->view.len; __pyx_v_info->len = __pyx_t_7; /* "View.MemoryView":550 * info.itemsize = self.view.itemsize * info.len = self.view.len * info.readonly = self.view.readonly # <<<<<<<<<<<<<< * info.obj = self * */ __pyx_t_1 = __pyx_v_self->view.readonly; __pyx_v_info->readonly = __pyx_t_1; /* "View.MemoryView":551 * info.len = self.view.len * info.readonly = self.view.readonly * info.obj = self # <<<<<<<<<<<<<< * * */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "View.MemoryView":521 * itemp[i] = c * * @cname('getbuffer') # <<<<<<<<<<<<<< * def __getbuffer__(self, Py_buffer *info, int flags): * if flags & PyBUF_WRITABLE and self.view.readonly: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":554 * * * @property # <<<<<<<<<<<<<< * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":556 * @property * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< * transpose_memslice(&result.from_slice) * return result */ __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 556, __pyx_L1_error) __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":557 * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< * return result * */ __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 557, __pyx_L1_error) /* "View.MemoryView":558 * cdef _memoryviewslice result = memoryview_copy(self) * transpose_memslice(&result.from_slice) * return result # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":554 * * * @property # <<<<<<<<<<<<<< * def T(self): * cdef _memoryviewslice result = memoryview_copy(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":560 * return result * * @property # <<<<<<<<<<<<<< * def base(self): * return self._get_base() */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":562 * @property * def base(self): * return self._get_base() # <<<<<<<<<<<<<< * * cdef _get_base(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":560 * return result * * @property # <<<<<<<<<<<<<< * def base(self): * return self._get_base() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":564 * return self._get_base() * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.obj * */ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_base", 1); /* "View.MemoryView":565 * * cdef _get_base(self): * return self.obj # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->obj); __pyx_r = __pyx_v_self->obj; goto __pyx_L0; /* "View.MemoryView":564 * return self._get_base() * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.obj * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":567 * return self.obj * * @property # <<<<<<<<<<<<<< * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_7genexpr__pyx_v_length; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":569 * @property * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]); __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } /* exit inner scope */ __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "View.MemoryView":567 * return self.obj * * @property # <<<<<<<<<<<<<< * def shape(self): * return tuple([length for length in self.view.shape[:self.view.ndim]]) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":571 * return tuple([length for length in self.view.shape[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def strides(self): * if self.view.strides == NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_8genexpr1__pyx_v_stride; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":573 * @property * def strides(self): * if self.view.strides == NULL: # <<<<<<<<<<<<<< * * raise ValueError, "Buffer view does not expose strides" */ __pyx_t_1 = (__pyx_v_self->view.strides == NULL); if (unlikely(__pyx_t_1)) { /* "View.MemoryView":575 * if self.view.strides == NULL: * * raise ValueError, "Buffer view does not expose strides" # <<<<<<<<<<<<<< * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0); __PYX_ERR(0, 575, __pyx_L1_error) /* "View.MemoryView":573 * @property * def strides(self): * if self.view.strides == NULL: # <<<<<<<<<<<<<< * * raise ValueError, "Buffer view does not expose strides" */ } /* "View.MemoryView":577 * raise ValueError, "Buffer view does not expose strides" * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { __pyx_t_3 = __pyx_t_5; __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]); __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "View.MemoryView":571 * return tuple([length for length in self.view.shape[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def strides(self): * if self.view.strides == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":579 * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def suboffsets(self): * if self.view.suboffsets == NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":581 * @property * def suboffsets(self): * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< * return (-1,) * self.view.ndim * */ __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL); if (__pyx_t_1) { /* "View.MemoryView":582 * def suboffsets(self): * if self.view.suboffsets == NULL: * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":581 * @property * def suboffsets(self): * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< * return (-1,) * self.view.ndim * */ } /* "View.MemoryView":584 * return (-1,) * self.view.ndim * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { __pyx_t_3 = __pyx_t_5; __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]); __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "View.MemoryView":579 * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def suboffsets(self): * if self.view.suboffsets == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":586 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def ndim(self): * return self.view.ndim */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":588 * @property * def ndim(self): * return self.view.ndim # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":586 * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) * * @property # <<<<<<<<<<<<<< * def ndim(self): * return self.view.ndim */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":590 * return self.view.ndim * * @property # <<<<<<<<<<<<<< * def itemsize(self): * return self.view.itemsize */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":592 * @property * def itemsize(self): * return self.view.itemsize # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":590 * return self.view.ndim * * @property # <<<<<<<<<<<<<< * def itemsize(self): * return self.view.itemsize */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":594 * return self.view.itemsize * * @property # <<<<<<<<<<<<<< * def nbytes(self): * return self.size * self.view.itemsize */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":596 * @property * def nbytes(self): * return self.size * self.view.itemsize # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "View.MemoryView":594 * return self.view.itemsize * * @property # <<<<<<<<<<<<<< * def nbytes(self): * return self.size * self.view.itemsize */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":598 * return self.size * self.view.itemsize * * @property # <<<<<<<<<<<<<< * def size(self): * if self._size is None: */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_length = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "View.MemoryView":600 * @property * def size(self): * if self._size is None: # <<<<<<<<<<<<<< * result = 1 * */ __pyx_t_1 = (__pyx_v_self->_size == Py_None); if (__pyx_t_1) { /* "View.MemoryView":601 * def size(self): * if self._size is None: * result = 1 # <<<<<<<<<<<<<< * * for length in self.view.shape[:self.view.ndim]: */ __Pyx_INCREF(__pyx_int_1); __pyx_v_result = __pyx_int_1; /* "View.MemoryView":603 * result = 1 * * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< * result *= length * */ __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5); __pyx_t_5 = 0; /* "View.MemoryView":604 * * for length in self.view.shape[:self.view.ndim]: * result *= length # <<<<<<<<<<<<<< * * self._size = result */ __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); __pyx_t_5 = 0; } /* "View.MemoryView":606 * result *= length * * self._size = result # <<<<<<<<<<<<<< * * return self._size */ __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_GOTREF(__pyx_v_self->_size); __Pyx_DECREF(__pyx_v_self->_size); __pyx_v_self->_size = __pyx_v_result; /* "View.MemoryView":600 * @property * def size(self): * if self._size is None: # <<<<<<<<<<<<<< * result = 1 * */ } /* "View.MemoryView":608 * self._size = result * * return self._size # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_size); __pyx_r = __pyx_v_self->_size; goto __pyx_L0; /* "View.MemoryView":598 * return self.size * self.view.itemsize * * @property # <<<<<<<<<<<<<< * def size(self): * if self._size is None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_length); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":610 * return self._size * * def __len__(self): # <<<<<<<<<<<<<< * if self.view.ndim >= 1: * return self.view.shape[0] */ /* Python wrapper */ static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { Py_ssize_t __pyx_r; int __pyx_t_1; /* "View.MemoryView":611 * * def __len__(self): * if self.view.ndim >= 1: # <<<<<<<<<<<<<< * return self.view.shape[0] * */ __pyx_t_1 = (__pyx_v_self->view.ndim >= 1); if (__pyx_t_1) { /* "View.MemoryView":612 * def __len__(self): * if self.view.ndim >= 1: * return self.view.shape[0] # <<<<<<<<<<<<<< * * return 0 */ __pyx_r = (__pyx_v_self->view.shape[0]); goto __pyx_L0; /* "View.MemoryView":611 * * def __len__(self): * if self.view.ndim >= 1: # <<<<<<<<<<<<<< * return self.view.shape[0] * */ } /* "View.MemoryView":614 * return self.view.shape[0] * * return 0 # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":610 * return self._size * * def __len__(self): # <<<<<<<<<<<<<< * if self.view.ndim >= 1: * return self.view.shape[0] */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":616 * return 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__, * id(self)) */ /* Python wrapper */ static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "View.MemoryView":617 * * def __repr__(self): * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< * id(self)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":618 * def __repr__(self): * return "" % (self.base.__class__.__name__, * id(self)) # <<<<<<<<<<<<<< * * def __str__(self): */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "View.MemoryView":617 * * def __repr__(self): * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< * id(self)) * */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":616 * return 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__, * id(self)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":620 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__,) * */ /* Python wrapper */ static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 1); /* "View.MemoryView":621 * * def __str__(self): * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":620 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< * return "" % (self.base.__class__.__name__,) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":624 * * * def is_c_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* Python wrapper */ static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice *__pyx_v_mslice; __Pyx_memviewslice __pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_c_contig", 1); /* "View.MemoryView":627 * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< * return slice_is_contig(mslice[0], 'C', self.view.ndim) * */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 627, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":628 * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< * * def is_f_contig(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":624 * * * def is_c_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":630 * return slice_is_contig(mslice[0], 'C', self.view.ndim) * * def is_f_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* Python wrapper */ static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice *__pyx_v_mslice; __Pyx_memviewslice __pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_f_contig", 1); /* "View.MemoryView":633 * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< * return slice_is_contig(mslice[0], 'F', self.view.ndim) * */ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 633, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":634 * cdef __Pyx_memviewslice tmp * mslice = get_slice_from_memview(self, &tmp) * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< * * def copy(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":630 * return slice_is_contig(mslice[0], 'C', self.view.ndim) * * def is_f_contig(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice *mslice * cdef __Pyx_memviewslice tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":636 * return slice_is_contig(mslice[0], 'F', self.view.ndim) * * def copy(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS */ /* Python wrapper */ static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice __pyx_v_mslice; int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); /* "View.MemoryView":638 * def copy(self): * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< * * slice_copy(self, &mslice) */ __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); /* "View.MemoryView":640 * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS * * slice_copy(self, &mslice) # <<<<<<<<<<<<<< * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, * self.view.itemsize, */ __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); /* "View.MemoryView":641 * * slice_copy(self, &mslice) * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< * self.view.itemsize, * flags|PyBUF_C_CONTIGUOUS, */ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) __pyx_v_mslice = __pyx_t_1; /* "View.MemoryView":646 * self.dtype_is_object) * * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< * * def copy_fortran(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":636 * return slice_is_contig(mslice[0], 'F', self.view.ndim) * * def copy(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice mslice * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":648 * return memoryview_copy_from_slice(self, &mslice) * * def copy_fortran(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS */ /* Python wrapper */ static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL; __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { __Pyx_memviewslice __pyx_v_src; __Pyx_memviewslice __pyx_v_dst; int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy_fortran", 1); /* "View.MemoryView":650 * def copy_fortran(self): * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< * * slice_copy(self, &src) */ __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); /* "View.MemoryView":652 * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS * * slice_copy(self, &src) # <<<<<<<<<<<<<< * dst = slice_copy_contig(&src, "fortran", self.view.ndim, * self.view.itemsize, */ __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); /* "View.MemoryView":653 * * slice_copy(self, &src) * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< * self.view.itemsize, * flags|PyBUF_F_CONTIGUOUS, */ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error) __pyx_v_dst = __pyx_t_1; /* "View.MemoryView":658 * self.dtype_is_object) * * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":648 * return memoryview_copy_from_slice(self, &mslice) * * def copy_fortran(self): # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice src, dst * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":662 * * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo */ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) { struct __pyx_memoryview_obj *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_cwrapper", 1); /* "View.MemoryView":663 * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< * result.typeinfo = typeinfo * return result */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(0, 663, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":664 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo # <<<<<<<<<<<<<< * return result * */ __pyx_v_result->typeinfo = __pyx_v_typeinfo; /* "View.MemoryView":665 * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo * return result # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_check') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":662 * * @cname('__pyx_memoryview_new') * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< * cdef memoryview result = memoryview(o, flags, dtype_is_object) * result.typeinfo = typeinfo */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":668 * * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<< * return isinstance(o, memoryview) * */ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { int __pyx_r; int __pyx_t_1; /* "View.MemoryView":669 * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: * return isinstance(o, memoryview) # <<<<<<<<<<<<<< * * cdef tuple _unellipsify(object index, int ndim): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); __pyx_r = __pyx_t_1; goto __pyx_L0; /* "View.MemoryView":668 * * @cname('__pyx_memoryview_check') * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<< * return isinstance(o, memoryview) * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":671 * return isinstance(o, memoryview) * * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< * """ * Replace all ellipses with full slices and fill incomplete indices with */ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_tup = NULL; PyObject *__pyx_v_result = NULL; int __pyx_v_have_slices; int __pyx_v_seen_ellipsis; PyObject *__pyx_v_item = NULL; Py_ssize_t __pyx_v_nslices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unellipsify", 1); /* "View.MemoryView":677 * """ * cdef Py_ssize_t idx * tup = index if isinstance(index, tuple) else (index,) # <<<<<<<<<<<<<< * * result = [slice(None)] * ndim */ __pyx_t_2 = PyTuple_Check(__pyx_v_index); if (__pyx_t_2) { __Pyx_INCREF(((PyObject*)__pyx_v_index)); __pyx_t_1 = __pyx_v_index; } else { __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(0, 677, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_tup = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":679 * tup = index if isinstance(index, tuple) else (index,) * * result = [slice(None)] * ndim # <<<<<<<<<<<<<< * have_slices = False * seen_ellipsis = False */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) { __Pyx_INCREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(0, 679, __pyx_L1_error); } } __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":680 * * result = [slice(None)] * ndim * have_slices = False # <<<<<<<<<<<<<< * seen_ellipsis = False * idx = 0 */ __pyx_v_have_slices = 0; /* "View.MemoryView":681 * result = [slice(None)] * ndim * have_slices = False * seen_ellipsis = False # <<<<<<<<<<<<<< * idx = 0 * for item in tup: */ __pyx_v_seen_ellipsis = 0; /* "View.MemoryView":682 * have_slices = False * seen_ellipsis = False * idx = 0 # <<<<<<<<<<<<<< * for item in tup: * if item is Ellipsis: */ __pyx_v_idx = 0; /* "View.MemoryView":683 * seen_ellipsis = False * idx = 0 * for item in tup: # <<<<<<<<<<<<<< * if item is Ellipsis: * if not seen_ellipsis: */ if (unlikely(__pyx_v_tup == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 683, __pyx_L1_error) } __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 683, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 683, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); __pyx_t_3 = 0; /* "View.MemoryView":684 * idx = 0 * for item in tup: * if item is Ellipsis: # <<<<<<<<<<<<<< * if not seen_ellipsis: * idx += ndim - len(tup) */ __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); if (__pyx_t_2) { /* "View.MemoryView":685 * for item in tup: * if item is Ellipsis: * if not seen_ellipsis: # <<<<<<<<<<<<<< * idx += ndim - len(tup) * seen_ellipsis = True */ __pyx_t_2 = (!__pyx_v_seen_ellipsis); if (__pyx_t_2) { /* "View.MemoryView":686 * if item is Ellipsis: * if not seen_ellipsis: * idx += ndim - len(tup) # <<<<<<<<<<<<<< * seen_ellipsis = True * have_slices = True */ if (unlikely(__pyx_v_tup == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 686, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 686, __pyx_L1_error) __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5)); /* "View.MemoryView":687 * if not seen_ellipsis: * idx += ndim - len(tup) * seen_ellipsis = True # <<<<<<<<<<<<<< * have_slices = True * else: */ __pyx_v_seen_ellipsis = 1; /* "View.MemoryView":685 * for item in tup: * if item is Ellipsis: * if not seen_ellipsis: # <<<<<<<<<<<<<< * idx += ndim - len(tup) * seen_ellipsis = True */ } /* "View.MemoryView":688 * idx += ndim - len(tup) * seen_ellipsis = True * have_slices = True # <<<<<<<<<<<<<< * else: * if isinstance(item, slice): */ __pyx_v_have_slices = 1; /* "View.MemoryView":684 * idx = 0 * for item in tup: * if item is Ellipsis: # <<<<<<<<<<<<<< * if not seen_ellipsis: * idx += ndim - len(tup) */ goto __pyx_L5; } /* "View.MemoryView":690 * have_slices = True * else: * if isinstance(item, slice): # <<<<<<<<<<<<<< * have_slices = True * elif not PyIndex_Check(item): */ /*else*/ { __pyx_t_2 = PySlice_Check(__pyx_v_item); if (__pyx_t_2) { /* "View.MemoryView":691 * else: * if isinstance(item, slice): * have_slices = True # <<<<<<<<<<<<<< * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" */ __pyx_v_have_slices = 1; /* "View.MemoryView":690 * have_slices = True * else: * if isinstance(item, slice): # <<<<<<<<<<<<<< * have_slices = True * elif not PyIndex_Check(item): */ goto __pyx_L7; } /* "View.MemoryView":692 * if isinstance(item, slice): * have_slices = True * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item */ __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0)); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":693 * have_slices = True * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" # <<<<<<<<<<<<<< * result[idx] = item * idx += 1 */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = 127; __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type); __pyx_t_5 += 24; __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type); __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_kp_u__6); __pyx_t_5 += 1; __Pyx_GIVEREF(__pyx_kp_u__6); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 693, __pyx_L1_error) /* "View.MemoryView":692 * if isinstance(item, slice): * have_slices = True * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item */ } __pyx_L7:; /* "View.MemoryView":694 * elif not PyIndex_Check(item): * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item # <<<<<<<<<<<<<< * idx += 1 * */ if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(0, 694, __pyx_L1_error) } __pyx_L5:; /* "View.MemoryView":695 * raise TypeError, f"Cannot index with type '{type(item)}'" * result[idx] = item * idx += 1 # <<<<<<<<<<<<<< * * nslices = ndim - idx */ __pyx_v_idx = (__pyx_v_idx + 1); /* "View.MemoryView":683 * seen_ellipsis = False * idx = 0 * for item in tup: # <<<<<<<<<<<<<< * if item is Ellipsis: * if not seen_ellipsis: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "View.MemoryView":697 * idx += 1 * * nslices = ndim - idx # <<<<<<<<<<<<<< * return have_slices or nslices, tuple(result) * */ __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx); /* "View.MemoryView":698 * * nslices = ndim - idx * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: */ __Pyx_XDECREF(__pyx_r); if (!__pyx_v_have_slices) { } else { __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; __pyx_L9_bool_binop_done:; __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "View.MemoryView":671 * return isinstance(o, memoryview) * * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< * """ * Replace all ellipses with full slices and fill incomplete indices with */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":700 * return have_slices or nslices, tuple(result) * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: */ static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { Py_ssize_t __pyx_v_suboffset; int __pyx_r; Py_ssize_t *__pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "View.MemoryView":701 * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" */ __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { __pyx_t_1 = __pyx_t_3; __pyx_v_suboffset = (__pyx_t_1[0]); /* "View.MemoryView":702 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag */ __pyx_t_4 = (__pyx_v_suboffset >= 0); if (unlikely(__pyx_t_4)) { /* "View.MemoryView":703 * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" # <<<<<<<<<<<<<< * return 0 # return type just used as an error flag * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0); __PYX_ERR(0, 703, __pyx_L1_error) /* "View.MemoryView":702 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag */ } } /* "View.MemoryView":704 * if suboffset >= 0: * raise ValueError, "Indirect dimensions not supported" * return 0 # return type just used as an error flag # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":700 * return have_slices or nslices, tuple(result) * * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< * for suboffset in suboffsets[:ndim]: * if suboffset >= 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "View.MemoryView":711 * * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< * cdef int new_ndim = 0, suboffset_dim = -1, dim * cdef bint negative_step */ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { int __pyx_v_new_ndim; int __pyx_v_suboffset_dim; int __pyx_v_dim; __Pyx_memviewslice __pyx_v_src; __Pyx_memviewslice __pyx_v_dst; __Pyx_memviewslice *__pyx_v_p_src; struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; __Pyx_memviewslice *__pyx_v_p_dst; int *__pyx_v_p_suboffset_dim; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; Py_ssize_t __pyx_v_step; Py_ssize_t __pyx_v_cindex; int __pyx_v_have_start; int __pyx_v_have_stop; int __pyx_v_have_step; PyObject *__pyx_v_index = NULL; struct __pyx_memoryview_obj *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; struct __pyx_memoryview_obj *__pyx_t_3; char *__pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memview_slice", 1); /* "View.MemoryView":712 * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< * cdef bint negative_step * cdef __Pyx_memviewslice src, dst */ __pyx_v_new_ndim = 0; __pyx_v_suboffset_dim = -1; /* "View.MemoryView":719 * * * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< * * cdef _memoryviewslice memviewsliceobj */ (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); /* "View.MemoryView":723 * cdef _memoryviewslice memviewsliceobj * * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< * * if isinstance(memview, _memoryviewslice): */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_memview->view.ndim > 0); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(0, 723, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(0, 723, __pyx_L1_error) #endif /* "View.MemoryView":725 * assert memview.view.ndim > 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":726 * * if isinstance(memview, _memoryviewslice): * memviewsliceobj = memview # <<<<<<<<<<<<<< * p_src = &memviewsliceobj.from_slice * else: */ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 726, __pyx_L1_error) __pyx_t_2 = ((PyObject *)__pyx_v_memview); __Pyx_INCREF(__pyx_t_2); __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":727 * if isinstance(memview, _memoryviewslice): * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< * else: * slice_copy(memview, &src) */ __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); /* "View.MemoryView":725 * assert memview.view.ndim > 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * memviewsliceobj = memview * p_src = &memviewsliceobj.from_slice */ goto __pyx_L3; } /* "View.MemoryView":729 * p_src = &memviewsliceobj.from_slice * else: * slice_copy(memview, &src) # <<<<<<<<<<<<<< * p_src = &src * */ /*else*/ { __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); /* "View.MemoryView":730 * else: * slice_copy(memview, &src) * p_src = &src # <<<<<<<<<<<<<< * * */ __pyx_v_p_src = (&__pyx_v_src); } __pyx_L3:; /* "View.MemoryView":736 * * * dst.memview = p_src.memview # <<<<<<<<<<<<<< * dst.data = p_src.data * */ __pyx_t_3 = __pyx_v_p_src->memview; __pyx_v_dst.memview = __pyx_t_3; /* "View.MemoryView":737 * * dst.memview = p_src.memview * dst.data = p_src.data # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __pyx_v_p_src->data; __pyx_v_dst.data = __pyx_t_4; /* "View.MemoryView":742 * * * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< * cdef int *p_suboffset_dim = &suboffset_dim * cdef Py_ssize_t start, stop, step, cindex */ __pyx_v_p_dst = (&__pyx_v_dst); /* "View.MemoryView":743 * * cdef __Pyx_memviewslice *p_dst = &dst * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< * cdef Py_ssize_t start, stop, step, cindex * cdef bint have_start, have_stop, have_step */ __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); /* "View.MemoryView":747 * cdef bint have_start, have_stop, have_step * * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< * if PyIndex_Check(index): * cindex = index */ __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 747, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 747, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 747, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 747, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 747, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8); __pyx_t_8 = 0; __pyx_v_dim = __pyx_t_5; __pyx_t_5 = (__pyx_t_5 + 1); /* "View.MemoryView":748 * * for dim, index in enumerate(indices): * if PyIndex_Check(index): # <<<<<<<<<<<<<< * cindex = index * slice_memviewslice( */ __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0); if (__pyx_t_1) { /* "View.MemoryView":749 * for dim, index in enumerate(indices): * if PyIndex_Check(index): * cindex = index # <<<<<<<<<<<<<< * slice_memviewslice( * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], */ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) __pyx_v_cindex = __pyx_t_9; /* "View.MemoryView":750 * if PyIndex_Check(index): * cindex = index * slice_memviewslice( # <<<<<<<<<<<<<< * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], * dim, new_ndim, p_suboffset_dim, */ __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 750, __pyx_L1_error) /* "View.MemoryView":748 * * for dim, index in enumerate(indices): * if PyIndex_Check(index): # <<<<<<<<<<<<<< * cindex = index * slice_memviewslice( */ goto __pyx_L6; } /* "View.MemoryView":756 * 0, 0, 0, # have_{start,stop,step} * False) * elif index is None: # <<<<<<<<<<<<<< * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 */ __pyx_t_1 = (__pyx_v_index == Py_None); if (__pyx_t_1) { /* "View.MemoryView":757 * False) * elif index is None: * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 */ (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; /* "View.MemoryView":758 * elif index is None: * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< * p_dst.suboffsets[new_ndim] = -1 * new_ndim += 1 */ (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; /* "View.MemoryView":759 * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< * new_ndim += 1 * else: */ (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; /* "View.MemoryView":760 * p_dst.strides[new_ndim] = 0 * p_dst.suboffsets[new_ndim] = -1 * new_ndim += 1 # <<<<<<<<<<<<<< * else: * start = index.start or 0 */ __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); /* "View.MemoryView":756 * 0, 0, 0, # have_{start,stop,step} * False) * elif index is None: # <<<<<<<<<<<<<< * p_dst.shape[new_ndim] = 1 * p_dst.strides[new_ndim] = 0 */ goto __pyx_L6; } /* "View.MemoryView":762 * new_ndim += 1 * else: * start = index.start or 0 # <<<<<<<<<<<<<< * stop = index.stop or 0 * step = index.step or 0 */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 762, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_bool_binop_done; } __pyx_t_9 = 0; __pyx_L7_bool_binop_done:; __pyx_v_start = __pyx_t_9; /* "View.MemoryView":763 * else: * start = index.start or 0 * stop = index.stop or 0 # <<<<<<<<<<<<<< * step = index.step or 0 * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 763, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_9 = 0; __pyx_L9_bool_binop_done:; __pyx_v_stop = __pyx_t_9; /* "View.MemoryView":764 * start = index.start or 0 * stop = index.stop or 0 * step = index.step or 0 # <<<<<<<<<<<<<< * * have_start = index.start is not None */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 764, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_bool_binop_done; } __pyx_t_9 = 0; __pyx_L11_bool_binop_done:; __pyx_v_step = __pyx_t_9; /* "View.MemoryView":766 * step = index.step or 0 * * have_start = index.start is not None # <<<<<<<<<<<<<< * have_stop = index.stop is not None * have_step = index.step is not None */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_start = __pyx_t_1; /* "View.MemoryView":767 * * have_start = index.start is not None * have_stop = index.stop is not None # <<<<<<<<<<<<<< * have_step = index.step is not None * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_stop = __pyx_t_1; /* "View.MemoryView":768 * have_start = index.start is not None * have_stop = index.stop is not None * have_step = index.step is not None # <<<<<<<<<<<<<< * * slice_memviewslice( */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_t_8 != Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_have_step = __pyx_t_1; /* "View.MemoryView":770 * have_step = index.step is not None * * slice_memviewslice( # <<<<<<<<<<<<<< * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], * dim, new_ndim, p_suboffset_dim, */ __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 770, __pyx_L1_error) /* "View.MemoryView":776 * have_start, have_stop, have_step, * True) * new_ndim += 1 # <<<<<<<<<<<<<< * * if isinstance(memview, _memoryviewslice): */ __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); } __pyx_L6:; /* "View.MemoryView":747 * cdef bint have_start, have_stop, have_step * * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< * if PyIndex_Check(index): * cindex = index */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":778 * new_ndim += 1 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":779 * * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, */ __Pyx_XDECREF((PyObject *)__pyx_r); /* "View.MemoryView":780 * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< * memviewsliceobj.to_dtype_func, * memview.dtype_is_object) */ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 780, __pyx_L1_error) } /* "View.MemoryView":781 * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< * memview.dtype_is_object) * else: */ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 781, __pyx_L1_error) } /* "View.MemoryView":779 * * if isinstance(memview, _memoryviewslice): * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< * memviewsliceobj.to_object_func, * memviewsliceobj.to_dtype_func, */ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(0, 779, __pyx_L1_error) __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":778 * new_ndim += 1 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * return memoryview_fromslice(dst, new_ndim, * memviewsliceobj.to_object_func, */ } /* "View.MemoryView":784 * memview.dtype_is_object) * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< * memview.dtype_is_object) * */ /*else*/ { __Pyx_XDECREF((PyObject *)__pyx_r); /* "View.MemoryView":785 * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, * memview.dtype_is_object) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "View.MemoryView":784 * memview.dtype_is_object) * else: * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< * memview.dtype_is_object) * */ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(0, 784, __pyx_L1_error) __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":711 * * @cname('__pyx_memview_slice') * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< * cdef int new_ndim = 0, suboffset_dim = -1, dim * cdef bint negative_step */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":793 * * @cname('__pyx_memoryview_slice_memviewslice') * cdef int slice_memviewslice( # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, */ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { Py_ssize_t __pyx_v_new_shape; int __pyx_v_negative_step; int __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":813 * cdef bint negative_step * * if not is_slice: # <<<<<<<<<<<<<< * * if start < 0: */ __pyx_t_1 = (!__pyx_v_is_slice); if (__pyx_t_1) { /* "View.MemoryView":815 * if not is_slice: * * if start < 0: # <<<<<<<<<<<<<< * start += shape * if not 0 <= start < shape: */ __pyx_t_1 = (__pyx_v_start < 0); if (__pyx_t_1) { /* "View.MemoryView":816 * * if start < 0: * start += shape # <<<<<<<<<<<<<< * if not 0 <= start < shape: * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) */ __pyx_v_start = (__pyx_v_start + __pyx_v_shape); /* "View.MemoryView":815 * if not is_slice: * * if start < 0: # <<<<<<<<<<<<<< * start += shape * if not 0 <= start < shape: */ } /* "View.MemoryView":817 * if start < 0: * start += shape * if not 0 <= start < shape: # <<<<<<<<<<<<<< * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) * else: */ __pyx_t_1 = (0 <= __pyx_v_start); if (__pyx_t_1) { __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); } __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "View.MemoryView":818 * start += shape * if not 0 <= start < shape: * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< * else: * */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 818, __pyx_L1_error) /* "View.MemoryView":817 * if start < 0: * start += shape * if not 0 <= start < shape: # <<<<<<<<<<<<<< * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) * else: */ } /* "View.MemoryView":813 * cdef bint negative_step * * if not is_slice: # <<<<<<<<<<<<<< * * if start < 0: */ goto __pyx_L3; } /* "View.MemoryView":821 * else: * * if have_step: # <<<<<<<<<<<<<< * negative_step = step < 0 * if step == 0: */ /*else*/ { __pyx_t_2 = (__pyx_v_have_step != 0); if (__pyx_t_2) { /* "View.MemoryView":822 * * if have_step: * negative_step = step < 0 # <<<<<<<<<<<<<< * if step == 0: * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) */ __pyx_v_negative_step = (__pyx_v_step < 0); /* "View.MemoryView":823 * if have_step: * negative_step = step < 0 * if step == 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: */ __pyx_t_2 = (__pyx_v_step == 0); if (__pyx_t_2) { /* "View.MemoryView":824 * negative_step = step < 0 * if step == 0: * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< * else: * negative_step = False */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 824, __pyx_L1_error) /* "View.MemoryView":823 * if have_step: * negative_step = step < 0 * if step == 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: */ } /* "View.MemoryView":821 * else: * * if have_step: # <<<<<<<<<<<<<< * negative_step = step < 0 * if step == 0: */ goto __pyx_L6; } /* "View.MemoryView":826 * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) * else: * negative_step = False # <<<<<<<<<<<<<< * step = 1 * */ /*else*/ { __pyx_v_negative_step = 0; /* "View.MemoryView":827 * else: * negative_step = False * step = 1 # <<<<<<<<<<<<<< * * */ __pyx_v_step = 1; } __pyx_L6:; /* "View.MemoryView":830 * * * if have_start: # <<<<<<<<<<<<<< * if start < 0: * start += shape */ __pyx_t_2 = (__pyx_v_have_start != 0); if (__pyx_t_2) { /* "View.MemoryView":831 * * if have_start: * if start < 0: # <<<<<<<<<<<<<< * start += shape * if start < 0: */ __pyx_t_2 = (__pyx_v_start < 0); if (__pyx_t_2) { /* "View.MemoryView":832 * if have_start: * if start < 0: * start += shape # <<<<<<<<<<<<<< * if start < 0: * start = 0 */ __pyx_v_start = (__pyx_v_start + __pyx_v_shape); /* "View.MemoryView":833 * if start < 0: * start += shape * if start < 0: # <<<<<<<<<<<<<< * start = 0 * elif start >= shape: */ __pyx_t_2 = (__pyx_v_start < 0); if (__pyx_t_2) { /* "View.MemoryView":834 * start += shape * if start < 0: * start = 0 # <<<<<<<<<<<<<< * elif start >= shape: * if negative_step: */ __pyx_v_start = 0; /* "View.MemoryView":833 * if start < 0: * start += shape * if start < 0: # <<<<<<<<<<<<<< * start = 0 * elif start >= shape: */ } /* "View.MemoryView":831 * * if have_start: * if start < 0: # <<<<<<<<<<<<<< * start += shape * if start < 0: */ goto __pyx_L9; } /* "View.MemoryView":835 * if start < 0: * start = 0 * elif start >= shape: # <<<<<<<<<<<<<< * if negative_step: * start = shape - 1 */ __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape); if (__pyx_t_2) { /* "View.MemoryView":836 * start = 0 * elif start >= shape: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ if (__pyx_v_negative_step) { /* "View.MemoryView":837 * elif start >= shape: * if negative_step: * start = shape - 1 # <<<<<<<<<<<<<< * else: * start = shape */ __pyx_v_start = (__pyx_v_shape - 1); /* "View.MemoryView":836 * start = 0 * elif start >= shape: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ goto __pyx_L11; } /* "View.MemoryView":839 * start = shape - 1 * else: * start = shape # <<<<<<<<<<<<<< * else: * if negative_step: */ /*else*/ { __pyx_v_start = __pyx_v_shape; } __pyx_L11:; /* "View.MemoryView":835 * if start < 0: * start = 0 * elif start >= shape: # <<<<<<<<<<<<<< * if negative_step: * start = shape - 1 */ } __pyx_L9:; /* "View.MemoryView":830 * * * if have_start: # <<<<<<<<<<<<<< * if start < 0: * start += shape */ goto __pyx_L8; } /* "View.MemoryView":841 * start = shape * else: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ /*else*/ { if (__pyx_v_negative_step) { /* "View.MemoryView":842 * else: * if negative_step: * start = shape - 1 # <<<<<<<<<<<<<< * else: * start = 0 */ __pyx_v_start = (__pyx_v_shape - 1); /* "View.MemoryView":841 * start = shape * else: * if negative_step: # <<<<<<<<<<<<<< * start = shape - 1 * else: */ goto __pyx_L12; } /* "View.MemoryView":844 * start = shape - 1 * else: * start = 0 # <<<<<<<<<<<<<< * * if have_stop: */ /*else*/ { __pyx_v_start = 0; } __pyx_L12:; } __pyx_L8:; /* "View.MemoryView":846 * start = 0 * * if have_stop: # <<<<<<<<<<<<<< * if stop < 0: * stop += shape */ __pyx_t_2 = (__pyx_v_have_stop != 0); if (__pyx_t_2) { /* "View.MemoryView":847 * * if have_stop: * if stop < 0: # <<<<<<<<<<<<<< * stop += shape * if stop < 0: */ __pyx_t_2 = (__pyx_v_stop < 0); if (__pyx_t_2) { /* "View.MemoryView":848 * if have_stop: * if stop < 0: * stop += shape # <<<<<<<<<<<<<< * if stop < 0: * stop = 0 */ __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); /* "View.MemoryView":849 * if stop < 0: * stop += shape * if stop < 0: # <<<<<<<<<<<<<< * stop = 0 * elif stop > shape: */ __pyx_t_2 = (__pyx_v_stop < 0); if (__pyx_t_2) { /* "View.MemoryView":850 * stop += shape * if stop < 0: * stop = 0 # <<<<<<<<<<<<<< * elif stop > shape: * stop = shape */ __pyx_v_stop = 0; /* "View.MemoryView":849 * if stop < 0: * stop += shape * if stop < 0: # <<<<<<<<<<<<<< * stop = 0 * elif stop > shape: */ } /* "View.MemoryView":847 * * if have_stop: * if stop < 0: # <<<<<<<<<<<<<< * stop += shape * if stop < 0: */ goto __pyx_L14; } /* "View.MemoryView":851 * if stop < 0: * stop = 0 * elif stop > shape: # <<<<<<<<<<<<<< * stop = shape * else: */ __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape); if (__pyx_t_2) { /* "View.MemoryView":852 * stop = 0 * elif stop > shape: * stop = shape # <<<<<<<<<<<<<< * else: * if negative_step: */ __pyx_v_stop = __pyx_v_shape; /* "View.MemoryView":851 * if stop < 0: * stop = 0 * elif stop > shape: # <<<<<<<<<<<<<< * stop = shape * else: */ } __pyx_L14:; /* "View.MemoryView":846 * start = 0 * * if have_stop: # <<<<<<<<<<<<<< * if stop < 0: * stop += shape */ goto __pyx_L13; } /* "View.MemoryView":854 * stop = shape * else: * if negative_step: # <<<<<<<<<<<<<< * stop = -1 * else: */ /*else*/ { if (__pyx_v_negative_step) { /* "View.MemoryView":855 * else: * if negative_step: * stop = -1 # <<<<<<<<<<<<<< * else: * stop = shape */ __pyx_v_stop = -1L; /* "View.MemoryView":854 * stop = shape * else: * if negative_step: # <<<<<<<<<<<<<< * stop = -1 * else: */ goto __pyx_L16; } /* "View.MemoryView":857 * stop = -1 * else: * stop = shape # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_v_stop = __pyx_v_shape; } __pyx_L16:; } __pyx_L13:; /* "View.MemoryView":861 * * with cython.cdivision(True): * new_shape = (stop - start) // step # <<<<<<<<<<<<<< * * if (stop - start) - step * new_shape: */ __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); /* "View.MemoryView":863 * new_shape = (stop - start) // step * * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< * new_shape += 1 * */ __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); if (__pyx_t_2) { /* "View.MemoryView":864 * * if (stop - start) - step * new_shape: * new_shape += 1 # <<<<<<<<<<<<<< * * if new_shape < 0: */ __pyx_v_new_shape = (__pyx_v_new_shape + 1); /* "View.MemoryView":863 * new_shape = (stop - start) // step * * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< * new_shape += 1 * */ } /* "View.MemoryView":866 * new_shape += 1 * * if new_shape < 0: # <<<<<<<<<<<<<< * new_shape = 0 * */ __pyx_t_2 = (__pyx_v_new_shape < 0); if (__pyx_t_2) { /* "View.MemoryView":867 * * if new_shape < 0: * new_shape = 0 # <<<<<<<<<<<<<< * * */ __pyx_v_new_shape = 0; /* "View.MemoryView":866 * new_shape += 1 * * if new_shape < 0: # <<<<<<<<<<<<<< * new_shape = 0 * */ } /* "View.MemoryView":870 * * * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< * dst.shape[new_ndim] = new_shape * dst.suboffsets[new_ndim] = suboffset */ (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); /* "View.MemoryView":871 * * dst.strides[new_ndim] = stride * step * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< * dst.suboffsets[new_ndim] = suboffset * */ (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; /* "View.MemoryView":872 * dst.strides[new_ndim] = stride * step * dst.shape[new_ndim] = new_shape * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< * * */ (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; } __pyx_L3:; /* "View.MemoryView":875 * * * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< * dst.data += start * stride * else: */ __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0); if (__pyx_t_2) { /* "View.MemoryView":876 * * if suboffset_dim[0] < 0: * dst.data += start * stride # <<<<<<<<<<<<<< * else: * dst.suboffsets[suboffset_dim[0]] += start * stride */ __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); /* "View.MemoryView":875 * * * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< * dst.data += start * stride * else: */ goto __pyx_L19; } /* "View.MemoryView":878 * dst.data += start * stride * else: * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< * * if suboffset >= 0: */ /*else*/ { __pyx_t_3 = (__pyx_v_suboffset_dim[0]); (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); } __pyx_L19:; /* "View.MemoryView":880 * dst.suboffsets[suboffset_dim[0]] += start * stride * * if suboffset >= 0: # <<<<<<<<<<<<<< * if not is_slice: * if new_ndim == 0: */ __pyx_t_2 = (__pyx_v_suboffset >= 0); if (__pyx_t_2) { /* "View.MemoryView":881 * * if suboffset >= 0: * if not is_slice: # <<<<<<<<<<<<<< * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset */ __pyx_t_2 = (!__pyx_v_is_slice); if (__pyx_t_2) { /* "View.MemoryView":882 * if suboffset >= 0: * if not is_slice: * if new_ndim == 0: # <<<<<<<<<<<<<< * dst.data = ( dst.data)[0] + suboffset * else: */ __pyx_t_2 = (__pyx_v_new_ndim == 0); if (__pyx_t_2) { /* "View.MemoryView":883 * if not is_slice: * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " */ __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); /* "View.MemoryView":882 * if suboffset >= 0: * if not is_slice: * if new_ndim == 0: # <<<<<<<<<<<<<< * dst.data = ( dst.data)[0] + suboffset * else: */ goto __pyx_L22; } /* "View.MemoryView":885 * dst.data = ( dst.data)[0] + suboffset * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< * "must be indexed and not sliced", dim) * else: */ /*else*/ { /* "View.MemoryView":886 * else: * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< * else: * suboffset_dim[0] = new_ndim */ __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 885, __pyx_L1_error) } __pyx_L22:; /* "View.MemoryView":881 * * if suboffset >= 0: * if not is_slice: # <<<<<<<<<<<<<< * if new_ndim == 0: * dst.data = ( dst.data)[0] + suboffset */ goto __pyx_L21; } /* "View.MemoryView":888 * "must be indexed and not sliced", dim) * else: * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< * * return 0 */ /*else*/ { (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; } __pyx_L21:; /* "View.MemoryView":880 * dst.suboffsets[suboffset_dim[0]] += start * stride * * if suboffset >= 0: # <<<<<<<<<<<<<< * if not is_slice: * if new_ndim == 0: */ } /* "View.MemoryView":890 * suboffset_dim[0] = new_ndim * * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":793 * * @cname('__pyx_memoryview_slice_memviewslice') * cdef int slice_memviewslice( # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":896 * * @cname('__pyx_pybuffer_index') * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 */ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { Py_ssize_t __pyx_v_shape; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_v_suboffset; Py_ssize_t __pyx_v_itemsize; char *__pyx_v_resultp; char *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_UCS4 __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pybuffer_index", 1); /* "View.MemoryView":898 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< * cdef Py_ssize_t itemsize = view.itemsize * cdef char *resultp */ __pyx_v_suboffset = -1L; /* "View.MemoryView":899 * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< * cdef char *resultp * */ __pyx_t_1 = __pyx_v_view->itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":902 * cdef char *resultp * * if view.ndim == 0: # <<<<<<<<<<<<<< * shape = view.len // itemsize * stride = itemsize */ __pyx_t_2 = (__pyx_v_view->ndim == 0); if (__pyx_t_2) { /* "View.MemoryView":903 * * if view.ndim == 0: * shape = view.len // itemsize # <<<<<<<<<<<<<< * stride = itemsize * else: */ if (unlikely(__pyx_v_itemsize == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(0, 903, __pyx_L1_error) } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); __PYX_ERR(0, 903, __pyx_L1_error) } __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); /* "View.MemoryView":904 * if view.ndim == 0: * shape = view.len // itemsize * stride = itemsize # <<<<<<<<<<<<<< * else: * shape = view.shape[dim] */ __pyx_v_stride = __pyx_v_itemsize; /* "View.MemoryView":902 * cdef char *resultp * * if view.ndim == 0: # <<<<<<<<<<<<<< * shape = view.len // itemsize * stride = itemsize */ goto __pyx_L3; } /* "View.MemoryView":906 * stride = itemsize * else: * shape = view.shape[dim] # <<<<<<<<<<<<<< * stride = view.strides[dim] * if view.suboffsets != NULL: */ /*else*/ { __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); /* "View.MemoryView":907 * else: * shape = view.shape[dim] * stride = view.strides[dim] # <<<<<<<<<<<<<< * if view.suboffsets != NULL: * suboffset = view.suboffsets[dim] */ __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); /* "View.MemoryView":908 * shape = view.shape[dim] * stride = view.strides[dim] * if view.suboffsets != NULL: # <<<<<<<<<<<<<< * suboffset = view.suboffsets[dim] * */ __pyx_t_2 = (__pyx_v_view->suboffsets != NULL); if (__pyx_t_2) { /* "View.MemoryView":909 * stride = view.strides[dim] * if view.suboffsets != NULL: * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< * * if index < 0: */ __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); /* "View.MemoryView":908 * shape = view.shape[dim] * stride = view.strides[dim] * if view.suboffsets != NULL: # <<<<<<<<<<<<<< * suboffset = view.suboffsets[dim] * */ } } __pyx_L3:; /* "View.MemoryView":911 * suboffset = view.suboffsets[dim] * * if index < 0: # <<<<<<<<<<<<<< * index += view.shape[dim] * if index < 0: */ __pyx_t_2 = (__pyx_v_index < 0); if (__pyx_t_2) { /* "View.MemoryView":912 * * if index < 0: * index += view.shape[dim] # <<<<<<<<<<<<<< * if index < 0: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" */ __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); /* "View.MemoryView":913 * if index < 0: * index += view.shape[dim] * if index < 0: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ __pyx_t_2 = (__pyx_v_index < 0); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":914 * index += view.shape[dim] * if index < 0: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< * * if index >= shape: */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 127; __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_1 += 37; __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_1 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7); __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 914, __pyx_L1_error) /* "View.MemoryView":913 * if index < 0: * index += view.shape[dim] * if index < 0: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ } /* "View.MemoryView":911 * suboffset = view.suboffsets[dim] * * if index < 0: # <<<<<<<<<<<<<< * index += view.shape[dim] * if index < 0: */ } /* "View.MemoryView":916 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * if index >= shape: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape); if (unlikely(__pyx_t_2)) { /* "View.MemoryView":917 * * if index >= shape: * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< * * resultp = bufp + index * stride */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_4 = 127; __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_1 += 37; __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a); __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_1 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7); __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 917, __pyx_L1_error) /* "View.MemoryView":916 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * if index >= shape: # <<<<<<<<<<<<<< * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * */ } /* "View.MemoryView":919 * raise IndexError, f"Out of bounds on buffer access (axis {dim})" * * resultp = bufp + index * stride # <<<<<<<<<<<<<< * if suboffset >= 0: * resultp = ( resultp)[0] + suboffset */ __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); /* "View.MemoryView":920 * * resultp = bufp + index * stride * if suboffset >= 0: # <<<<<<<<<<<<<< * resultp = ( resultp)[0] + suboffset * */ __pyx_t_2 = (__pyx_v_suboffset >= 0); if (__pyx_t_2) { /* "View.MemoryView":921 * resultp = bufp + index * stride * if suboffset >= 0: * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< * * return resultp */ __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); /* "View.MemoryView":920 * * resultp = bufp + index * stride * if suboffset >= 0: # <<<<<<<<<<<<<< * resultp = ( resultp)[0] + suboffset * */ } /* "View.MemoryView":923 * resultp = ( resultp)[0] + suboffset * * return resultp # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_resultp; goto __pyx_L0; /* "View.MemoryView":896 * * @cname('__pyx_pybuffer_index') * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< * Py_ssize_t dim) except NULL: * cdef Py_ssize_t shape, stride, suboffset = -1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":929 * * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<< * cdef int ndim = memslice.memview.view.ndim * */ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { int __pyx_v_ndim; Py_ssize_t *__pyx_v_shape; Py_ssize_t *__pyx_v_strides; int __pyx_v_i; int __pyx_v_j; int __pyx_r; int __pyx_t_1; Py_ssize_t *__pyx_t_2; long __pyx_t_3; long __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":930 * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< * * cdef Py_ssize_t *shape = memslice.shape */ __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; __pyx_v_ndim = __pyx_t_1; /* "View.MemoryView":932 * cdef int ndim = memslice.memview.view.ndim * * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< * cdef Py_ssize_t *strides = memslice.strides * */ __pyx_t_2 = __pyx_v_memslice->shape; __pyx_v_shape = __pyx_t_2; /* "View.MemoryView":933 * * cdef Py_ssize_t *shape = memslice.shape * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_v_memslice->strides; __pyx_v_strides = __pyx_t_2; /* "View.MemoryView":937 * * cdef int i, j * for i in range(ndim // 2): # <<<<<<<<<<<<<< * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] */ __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2); __pyx_t_4 = __pyx_t_3; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":938 * cdef int i, j * for i in range(ndim // 2): * j = ndim - 1 - i # <<<<<<<<<<<<<< * strides[i], strides[j] = strides[j], strides[i] * shape[i], shape[j] = shape[j], shape[i] */ __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); /* "View.MemoryView":939 * for i in range(ndim // 2): * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< * shape[i], shape[j] = shape[j], shape[i] * */ __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; /* "View.MemoryView":940 * j = ndim - 1 - i * strides[i], strides[j] = strides[j], strides[i] * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: */ __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; /* "View.MemoryView":942 * shape[i], shape[j] = shape[j], shape[i] * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * */ __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0); if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0); __pyx_t_7 = __pyx_t_8; __pyx_L6_bool_binop_done:; if (__pyx_t_7) { /* "View.MemoryView":943 * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< * * return 0 */ __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 943, __pyx_L1_error) /* "View.MemoryView":942 * shape[i], shape[j] = shape[j], shape[i] * * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * */ } } /* "View.MemoryView":945 * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") * * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":929 * * @cname('__pyx_memslice_transpose') * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<< * cdef int ndim = memslice.memview.view.ndim * */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":963 * cdef int (*to_dtype_func)(char *, object) except 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * */ /* Python wrapper */ static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { /* "View.MemoryView":964 * * def __dealloc__(self): * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< * * cdef convert_item_to_object(self, char *itemp): */ __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1); /* "View.MemoryView":963 * cdef int (*to_dtype_func)(char *, object) except 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * */ /* function exit code */ } /* "View.MemoryView":966 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * if self.to_object_func != NULL: * return self.to_object_func(itemp) */ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 1); /* "View.MemoryView":967 * * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: # <<<<<<<<<<<<<< * return self.to_object_func(itemp) * else: */ __pyx_t_1 = (__pyx_v_self->to_object_func != NULL); if (__pyx_t_1) { /* "View.MemoryView":968 * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: * return self.to_object_func(itemp) # <<<<<<<<<<<<<< * else: * return memoryview.convert_item_to_object(self, itemp) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "View.MemoryView":967 * * cdef convert_item_to_object(self, char *itemp): * if self.to_object_func != NULL: # <<<<<<<<<<<<<< * return self.to_object_func(itemp) * else: */ } /* "View.MemoryView":970 * return self.to_object_func(itemp) * else: * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< * * cdef assign_item_from_object(self, char *itemp, object value): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "View.MemoryView":966 * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) * * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< * if self.to_object_func != NULL: * return self.to_object_func(itemp) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":972 * return memoryview.convert_item_to_object(self, itemp) * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) */ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 1); /* "View.MemoryView":973 * * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< * self.to_dtype_func(itemp, value) * else: */ __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL); if (__pyx_t_1) { /* "View.MemoryView":974 * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< * else: * memoryview.assign_item_from_object(self, itemp, value) */ __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 974, __pyx_L1_error) /* "View.MemoryView":973 * * cdef assign_item_from_object(self, char *itemp, object value): * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< * self.to_dtype_func(itemp, value) * else: */ goto __pyx_L3; } /* "View.MemoryView":976 * self.to_dtype_func(itemp, value) * else: * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< * * cdef _get_base(self): */ /*else*/ { __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "View.MemoryView":972 * return memoryview.convert_item_to_object(self, itemp) * * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< * if self.to_dtype_func != NULL: * self.to_dtype_func(itemp, value) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":978 * memoryview.assign_item_from_object(self, itemp, value) * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.from_object * */ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_base", 1); /* "View.MemoryView":979 * * cdef _get_base(self): * return self.from_object # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->from_object); __pyx_r = __pyx_v_self->from_object; goto __pyx_L0; /* "View.MemoryView":978 * memoryview.assign_item_from_object(self, itemp, value) * * cdef _get_base(self): # <<<<<<<<<<<<<< * return self.from_object * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(0, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":999 * * @cname('__pyx_memoryview_fromslice') * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< * int ndim, * object (*to_object_func)(char *), */ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; Py_ssize_t __pyx_v_suboffset; PyObject *__pyx_v_length = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_TypeInfo *__pyx_t_4; Py_buffer __pyx_t_5; Py_ssize_t *__pyx_t_6; Py_ssize_t *__pyx_t_7; Py_ssize_t *__pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_fromslice", 1); /* "View.MemoryView":1007 * cdef _memoryviewslice result * * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None); if (__pyx_t_1) { /* "View.MemoryView":1008 * * if memviewslice.memview == Py_None: * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "View.MemoryView":1007 * cdef _memoryviewslice result * * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< * return None * */ } /* "View.MemoryView":1013 * * * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<< * * result.from_slice = memviewslice */ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(0, 1013, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(0, 1013, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1015 * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) * * result.from_slice = memviewslice # <<<<<<<<<<<<<< * __PYX_INC_MEMVIEW(&memviewslice, 1) * */ __pyx_v_result->from_slice = __pyx_v_memviewslice; /* "View.MemoryView":1016 * * result.from_slice = memviewslice * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< * * result.from_object = ( memviewslice.memview)._get_base() */ __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); /* "View.MemoryView":1018 * __PYX_INC_MEMVIEW(&memviewslice, 1) * * result.from_object = ( memviewslice.memview)._get_base() # <<<<<<<<<<<<<< * result.typeinfo = memviewslice.memview.typeinfo * */ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_result->from_object); __Pyx_DECREF(__pyx_v_result->from_object); __pyx_v_result->from_object = __pyx_t_2; __pyx_t_2 = 0; /* "View.MemoryView":1019 * * result.from_object = ( memviewslice.memview)._get_base() * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< * * result.view = memviewslice.memview.view */ __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; /* "View.MemoryView":1021 * result.typeinfo = memviewslice.memview.typeinfo * * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< * result.view.buf = memviewslice.data * result.view.ndim = ndim */ __pyx_t_5 = __pyx_v_memviewslice.memview->view; __pyx_v_result->__pyx_base.view = __pyx_t_5; /* "View.MemoryView":1022 * * result.view = memviewslice.memview.view * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None */ __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); /* "View.MemoryView":1023 * result.view = memviewslice.memview.view * result.view.buf = memviewslice.data * result.view.ndim = ndim # <<<<<<<<<<<<<< * (<__pyx_buffer *> &result.view).obj = Py_None * Py_INCREF(Py_None) */ __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; /* "View.MemoryView":1024 * result.view.buf = memviewslice.data * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< * Py_INCREF(Py_None) * */ ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; /* "View.MemoryView":1025 * result.view.ndim = ndim * (<__pyx_buffer *> &result.view).obj = Py_None * Py_INCREF(Py_None) # <<<<<<<<<<<<<< * * if (memviewslice.memview).flags & PyBUF_WRITABLE: */ Py_INCREF(Py_None); /* "View.MemoryView":1027 * Py_INCREF(Py_None) * * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< * result.flags = PyBUF_RECORDS * else: */ __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); if (__pyx_t_1) { /* "View.MemoryView":1028 * * if (memviewslice.memview).flags & PyBUF_WRITABLE: * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< * else: * result.flags = PyBUF_RECORDS_RO */ __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; /* "View.MemoryView":1027 * Py_INCREF(Py_None) * * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< * result.flags = PyBUF_RECORDS * else: */ goto __pyx_L4; } /* "View.MemoryView":1030 * result.flags = PyBUF_RECORDS * else: * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< * * result.view.shape = result.from_slice.shape */ /*else*/ { __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; } __pyx_L4:; /* "View.MemoryView":1032 * result.flags = PyBUF_RECORDS_RO * * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< * result.view.strides = result.from_slice.strides * */ __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); /* "View.MemoryView":1033 * * result.view.shape = result.from_slice.shape * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< * * */ __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); /* "View.MemoryView":1036 * * * result.view.suboffsets = NULL # <<<<<<<<<<<<<< * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: */ __pyx_v_result->__pyx_base.view.suboffsets = NULL; /* "View.MemoryView":1037 * * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets */ __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { __pyx_t_6 = __pyx_t_8; __pyx_v_suboffset = (__pyx_t_6[0]); /* "View.MemoryView":1038 * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * result.view.suboffsets = result.from_slice.suboffsets * break */ __pyx_t_1 = (__pyx_v_suboffset >= 0); if (__pyx_t_1) { /* "View.MemoryView":1039 * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< * break * */ __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); /* "View.MemoryView":1040 * if suboffset >= 0: * result.view.suboffsets = result.from_slice.suboffsets * break # <<<<<<<<<<<<<< * * result.view.len = result.view.itemsize */ goto __pyx_L6_break; /* "View.MemoryView":1038 * result.view.suboffsets = NULL * for suboffset in result.from_slice.suboffsets[:ndim]: * if suboffset >= 0: # <<<<<<<<<<<<<< * result.view.suboffsets = result.from_slice.suboffsets * break */ } } __pyx_L6_break:; /* "View.MemoryView":1042 * break * * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< * for length in result.view.shape[:ndim]: * result.view.len *= length */ __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; __pyx_v_result->__pyx_base.view.len = __pyx_t_9; /* "View.MemoryView":1043 * * result.view.len = result.view.itemsize * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< * result.view.len *= length * */ __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { __pyx_t_6 = __pyx_t_8; __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1044 * result.view.len = result.view.itemsize * for length in result.view.shape[:ndim]: * result.view.len *= length # <<<<<<<<<<<<<< * * result.to_object_func = to_object_func */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result->__pyx_base.view.len = __pyx_t_9; } /* "View.MemoryView":1046 * result.view.len *= length * * result.to_object_func = to_object_func # <<<<<<<<<<<<<< * result.to_dtype_func = to_dtype_func * */ __pyx_v_result->to_object_func = __pyx_v_to_object_func; /* "View.MemoryView":1047 * * result.to_object_func = to_object_func * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< * * return result */ __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; /* "View.MemoryView":1049 * result.to_dtype_func = to_dtype_func * * return result # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_get_slice_from_memoryview') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_result); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "View.MemoryView":999 * * @cname('__pyx_memoryview_fromslice') * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< * int ndim, * object (*to_object_func)(char *), */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_length); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1052 * * @cname('__pyx_memoryview_get_slice_from_memoryview') * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj */ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; __Pyx_memviewslice *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_slice_from_memview", 1); /* "View.MemoryView":1055 * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * obj = memview * return &obj.from_slice */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":1056 * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): * obj = memview # <<<<<<<<<<<<<< * return &obj.from_slice * else: */ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1056, __pyx_L1_error) __pyx_t_2 = ((PyObject *)__pyx_v_memview); __Pyx_INCREF(__pyx_t_2); __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); __pyx_t_2 = 0; /* "View.MemoryView":1057 * if isinstance(memview, _memoryviewslice): * obj = memview * return &obj.from_slice # <<<<<<<<<<<<<< * else: * slice_copy(memview, mslice) */ __pyx_r = (&__pyx_v_obj->from_slice); goto __pyx_L0; /* "View.MemoryView":1055 * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * obj = memview * return &obj.from_slice */ } /* "View.MemoryView":1059 * return &obj.from_slice * else: * slice_copy(memview, mslice) # <<<<<<<<<<<<<< * return mslice * */ /*else*/ { __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); /* "View.MemoryView":1060 * else: * slice_copy(memview, mslice) * return mslice # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_slice_copy') */ __pyx_r = __pyx_v_mslice; goto __pyx_L0; } /* "View.MemoryView":1052 * * @cname('__pyx_memoryview_get_slice_from_memoryview') * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< * __Pyx_memviewslice *mslice) except NULL: * cdef _memoryviewslice obj */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1063 * * @cname('__pyx_memoryview_slice_copy') * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<< * cdef int dim * cdef (Py_ssize_t*) shape, strides, suboffsets */ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { int __pyx_v_dim; Py_ssize_t *__pyx_v_shape; Py_ssize_t *__pyx_v_strides; Py_ssize_t *__pyx_v_suboffsets; Py_ssize_t *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; /* "View.MemoryView":1067 * cdef (Py_ssize_t*) shape, strides, suboffsets * * shape = memview.view.shape # <<<<<<<<<<<<<< * strides = memview.view.strides * suboffsets = memview.view.suboffsets */ __pyx_t_1 = __pyx_v_memview->view.shape; __pyx_v_shape = __pyx_t_1; /* "View.MemoryView":1068 * * shape = memview.view.shape * strides = memview.view.strides # <<<<<<<<<<<<<< * suboffsets = memview.view.suboffsets * */ __pyx_t_1 = __pyx_v_memview->view.strides; __pyx_v_strides = __pyx_t_1; /* "View.MemoryView":1069 * shape = memview.view.shape * strides = memview.view.strides * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< * * dst.memview = <__pyx_memoryview *> memview */ __pyx_t_1 = __pyx_v_memview->view.suboffsets; __pyx_v_suboffsets = __pyx_t_1; /* "View.MemoryView":1071 * suboffsets = memview.view.suboffsets * * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< * dst.data = memview.view.buf * */ __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); /* "View.MemoryView":1072 * * dst.memview = <__pyx_memoryview *> memview * dst.data = memview.view.buf # <<<<<<<<<<<<<< * * for dim in range(memview.view.ndim): */ __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); /* "View.MemoryView":1074 * dst.data = memview.view.buf * * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] */ __pyx_t_2 = __pyx_v_memview->view.ndim; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_dim = __pyx_t_4; /* "View.MemoryView":1075 * * for dim in range(memview.view.ndim): * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< * dst.strides[dim] = strides[dim] * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 */ (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); /* "View.MemoryView":1076 * for dim in range(memview.view.ndim): * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 * */ (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); /* "View.MemoryView":1077 * dst.shape[dim] = shape[dim] * dst.strides[dim] = strides[dim] * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_object') */ __pyx_t_6 = (__pyx_v_suboffsets != 0); if (__pyx_t_6) { __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); } else { __pyx_t_5 = -1L; } (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; } /* "View.MemoryView":1063 * * @cname('__pyx_memoryview_slice_copy') * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<< * cdef int dim * cdef (Py_ssize_t*) shape, strides, suboffsets */ /* function exit code */ } /* "View.MemoryView":1080 * * @cname('__pyx_memoryview_copy_object') * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice */ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { __Pyx_memviewslice __pyx_v_memviewslice; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy", 1); /* "View.MemoryView":1083 * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< * return memoryview_copy_from_slice(memview, &memviewslice) * */ __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); /* "View.MemoryView":1084 * cdef __Pyx_memviewslice memviewslice * slice_copy(memview, &memviewslice) * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_object_from_slice') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "View.MemoryView":1080 * * @cname('__pyx_memoryview_copy_object') * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< * "Create a new memoryview object" * cdef __Pyx_memviewslice memviewslice */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1087 * * @cname('__pyx_memoryview_copy_object_from_slice') * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< * """ * Create a new memoryview object from a given memoryview object and slice. */ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { PyObject *(*__pyx_v_to_object_func)(char *); int (*__pyx_v_to_dtype_func)(char *, PyObject *); PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *(*__pyx_t_2)(char *); int (*__pyx_t_3)(char *, PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1); /* "View.MemoryView":1094 * cdef int (*to_dtype_func)(char *, object) except 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); if (__pyx_t_1) { /* "View.MemoryView":1095 * * if isinstance(memview, _memoryviewslice): * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func * else: */ __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; __pyx_v_to_object_func = __pyx_t_2; /* "View.MemoryView":1096 * if isinstance(memview, _memoryviewslice): * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< * else: * to_object_func = NULL */ __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; __pyx_v_to_dtype_func = __pyx_t_3; /* "View.MemoryView":1094 * cdef int (*to_dtype_func)(char *, object) except 0 * * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< * to_object_func = (<_memoryviewslice> memview).to_object_func * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func */ goto __pyx_L3; } /* "View.MemoryView":1098 * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func * else: * to_object_func = NULL # <<<<<<<<<<<<<< * to_dtype_func = NULL * */ /*else*/ { __pyx_v_to_object_func = NULL; /* "View.MemoryView":1099 * else: * to_object_func = NULL * to_dtype_func = NULL # <<<<<<<<<<<<<< * * return memoryview_fromslice(memviewslice[0], memview.view.ndim, */ __pyx_v_to_dtype_func = NULL; } __pyx_L3:; /* "View.MemoryView":1101 * to_dtype_func = NULL * * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< * to_object_func, to_dtype_func, * memview.dtype_is_object) */ __Pyx_XDECREF(__pyx_r); /* "View.MemoryView":1103 * return memoryview_fromslice(memviewslice[0], memview.view.ndim, * to_object_func, to_dtype_func, * memview.dtype_is_object) # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "View.MemoryView":1087 * * @cname('__pyx_memoryview_copy_object_from_slice') * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< * """ * Create a new memoryview object from a given memoryview object and slice. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "View.MemoryView":1109 * * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< * return -arg if arg < 0 else arg * */ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { Py_ssize_t __pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; /* "View.MemoryView":1110 * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: * return -arg if arg < 0 else arg # <<<<<<<<<<<<<< * * @cname('__pyx_get_best_slice_order') */ __pyx_t_2 = (__pyx_v_arg < 0); if (__pyx_t_2) { __pyx_t_1 = (-__pyx_v_arg); } else { __pyx_t_1 = __pyx_v_arg; } __pyx_r = __pyx_t_1; goto __pyx_L0; /* "View.MemoryView":1109 * * * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< * return -arg if arg < 0 else arg * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1113 * * @cname('__pyx_get_best_slice_order') * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * """ * Figure out the best memory access order for a given slice. */ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { int __pyx_v_i; Py_ssize_t __pyx_v_c_stride; Py_ssize_t __pyx_v_f_stride; char __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1118 * """ * cdef int i * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t f_stride = 0 * */ __pyx_v_c_stride = 0; /* "View.MemoryView":1119 * cdef int i * cdef Py_ssize_t c_stride = 0 * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< * * for i in range(ndim - 1, -1, -1): */ __pyx_v_f_stride = 0; /* "View.MemoryView":1121 * cdef Py_ssize_t f_stride = 0 * * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] */ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":1122 * * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * c_stride = mslice.strides[i] * break */ __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); if (__pyx_t_2) { /* "View.MemoryView":1123 * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< * break * */ __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1124 * if mslice.shape[i] > 1: * c_stride = mslice.strides[i] * break # <<<<<<<<<<<<<< * * for i in range(ndim): */ goto __pyx_L4_break; /* "View.MemoryView":1122 * * for i in range(ndim - 1, -1, -1): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * c_stride = mslice.strides[i] * break */ } } __pyx_L4_break:; /* "View.MemoryView":1126 * break * * for i in range(ndim): # <<<<<<<<<<<<<< * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] */ __pyx_t_1 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_1; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1127 * * for i in range(ndim): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * f_stride = mslice.strides[i] * break */ __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); if (__pyx_t_2) { /* "View.MemoryView":1128 * for i in range(ndim): * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< * break * */ __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1129 * if mslice.shape[i] > 1: * f_stride = mslice.strides[i] * break # <<<<<<<<<<<<<< * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): */ goto __pyx_L7_break; /* "View.MemoryView":1127 * * for i in range(ndim): * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< * f_stride = mslice.strides[i] * break */ } } __pyx_L7_break:; /* "View.MemoryView":1131 * break * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< * return 'C' * else: */ __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)); if (__pyx_t_2) { /* "View.MemoryView":1132 * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): * return 'C' # <<<<<<<<<<<<<< * else: * return 'F' */ __pyx_r = 'C'; goto __pyx_L0; /* "View.MemoryView":1131 * break * * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< * return 'C' * else: */ } /* "View.MemoryView":1134 * return 'C' * else: * return 'F' # <<<<<<<<<<<<<< * * @cython.cdivision(True) */ /*else*/ { __pyx_r = 'F'; goto __pyx_L0; } /* "View.MemoryView":1113 * * @cname('__pyx_get_best_slice_order') * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * """ * Figure out the best memory access order for a given slice. */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1137 * * @cython.cdivision(True) * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< * char *dst_data, Py_ssize_t *dst_strides, * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, */ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; Py_ssize_t __pyx_v_dst_extent; Py_ssize_t __pyx_v_src_stride; Py_ssize_t __pyx_v_dst_stride; int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; /* "View.MemoryView":1144 * * cdef Py_ssize_t i * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] */ __pyx_v_src_extent = (__pyx_v_src_shape[0]); /* "View.MemoryView":1145 * cdef Py_ssize_t i * cdef Py_ssize_t src_extent = src_shape[0] * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t src_stride = src_strides[0] * cdef Py_ssize_t dst_stride = dst_strides[0] */ __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); /* "View.MemoryView":1146 * cdef Py_ssize_t src_extent = src_shape[0] * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t dst_stride = dst_strides[0] * */ __pyx_v_src_stride = (__pyx_v_src_strides[0]); /* "View.MemoryView":1147 * cdef Py_ssize_t dst_extent = dst_shape[0] * cdef Py_ssize_t src_stride = src_strides[0] * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< * * if ndim == 1: */ __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); /* "View.MemoryView":1149 * cdef Py_ssize_t dst_stride = dst_strides[0] * * if ndim == 1: # <<<<<<<<<<<<<< * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): */ __pyx_t_1 = (__pyx_v_ndim == 1); if (__pyx_t_1) { /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ __pyx_t_2 = (__pyx_v_src_stride > 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = (__pyx_v_dst_stride > 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } /* "View.MemoryView":1151 * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< * memcpy(dst_data, src_data, itemsize * dst_extent) * else: */ __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); if (__pyx_t_2) { __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); } __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ if (__pyx_t_1) { /* "View.MemoryView":1152 * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< * else: * for i in range(dst_extent): */ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); /* "View.MemoryView":1150 * * if ndim == 1: * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< * src_stride == itemsize == dst_stride): * memcpy(dst_data, src_data, itemsize * dst_extent) */ goto __pyx_L4; } /* "View.MemoryView":1154 * memcpy(dst_data, src_data, itemsize * dst_extent) * else: * for i in range(dst_extent): # <<<<<<<<<<<<<< * memcpy(dst_data, src_data, itemsize) * src_data += src_stride */ /*else*/ { __pyx_t_3 = __pyx_v_dst_extent; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "View.MemoryView":1155 * else: * for i in range(dst_extent): * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< * src_data += src_stride * dst_data += dst_stride */ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); /* "View.MemoryView":1156 * for i in range(dst_extent): * memcpy(dst_data, src_data, itemsize) * src_data += src_stride # <<<<<<<<<<<<<< * dst_data += dst_stride * else: */ __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); /* "View.MemoryView":1157 * memcpy(dst_data, src_data, itemsize) * src_data += src_stride * dst_data += dst_stride # <<<<<<<<<<<<<< * else: * for i in range(dst_extent): */ __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); } } __pyx_L4:; /* "View.MemoryView":1149 * cdef Py_ssize_t dst_stride = dst_strides[0] * * if ndim == 1: # <<<<<<<<<<<<<< * if (src_stride > 0 and dst_stride > 0 and * src_stride == itemsize == dst_stride): */ goto __pyx_L3; } /* "View.MemoryView":1159 * dst_data += dst_stride * else: * for i in range(dst_extent): # <<<<<<<<<<<<<< * _copy_strided_to_strided(src_data, src_strides + 1, * dst_data, dst_strides + 1, */ /*else*/ { __pyx_t_3 = __pyx_v_dst_extent; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "View.MemoryView":1160 * else: * for i in range(dst_extent): * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< * dst_data, dst_strides + 1, * src_shape + 1, dst_shape + 1, */ _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); /* "View.MemoryView":1164 * src_shape + 1, dst_shape + 1, * ndim - 1, itemsize) * src_data += src_stride # <<<<<<<<<<<<<< * dst_data += dst_stride * */ __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); /* "View.MemoryView":1165 * ndim - 1, itemsize) * src_data += src_stride * dst_data += dst_stride # <<<<<<<<<<<<<< * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, */ __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); } } __pyx_L3:; /* "View.MemoryView":1137 * * @cython.cdivision(True) * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< * char *dst_data, Py_ssize_t *dst_strides, * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, */ /* function exit code */ } /* "View.MemoryView":1167 * dst_data += dst_stride * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: */ static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { /* "View.MemoryView":1170 * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< * src.shape, dst.shape, ndim, itemsize) * */ _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); /* "View.MemoryView":1167 * dst_data += dst_stride * * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *dst, * int ndim, size_t itemsize) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1174 * * @cname('__pyx_memoryview_slice_get_size') * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize */ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { Py_ssize_t __pyx_v_shape; Py_ssize_t __pyx_v_size; Py_ssize_t __pyx_r; Py_ssize_t __pyx_t_1; Py_ssize_t *__pyx_t_2; Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; /* "View.MemoryView":1176 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<< * * for shape in src.shape[:ndim]: */ __pyx_t_1 = __pyx_v_src->memview->view.itemsize; __pyx_v_size = __pyx_t_1; /* "View.MemoryView":1178 * cdef Py_ssize_t shape, size = src.memview.view.itemsize * * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<< * size *= shape * */ __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim); for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_v_shape = (__pyx_t_2[0]); /* "View.MemoryView":1179 * * for shape in src.shape[:ndim]: * size *= shape # <<<<<<<<<<<<<< * * return size */ __pyx_v_size = (__pyx_v_size * __pyx_v_shape); } /* "View.MemoryView":1181 * size *= shape * * return size # <<<<<<<<<<<<<< * * @cname('__pyx_fill_contig_strides_array') */ __pyx_r = __pyx_v_size; goto __pyx_L0; /* "View.MemoryView":1174 * * @cname('__pyx_memoryview_slice_get_size') * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<< * "Return the size of the memory occupied by the slice in number of bytes" * cdef Py_ssize_t shape, size = src.memview.view.itemsize */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1184 * * @cname('__pyx_fill_contig_strides_array') * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, * int ndim, char order) noexcept nogil: */ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { int __pyx_v_idx; Py_ssize_t __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1193 * cdef int idx * * if order == 'F': # <<<<<<<<<<<<<< * for idx in range(ndim): * strides[idx] = stride */ __pyx_t_1 = (__pyx_v_order == 'F'); if (__pyx_t_1) { /* "View.MemoryView":1194 * * if order == 'F': * for idx in range(ndim): # <<<<<<<<<<<<<< * strides[idx] = stride * stride *= shape[idx] */ __pyx_t_2 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_idx = __pyx_t_4; /* "View.MemoryView":1195 * if order == 'F': * for idx in range(ndim): * strides[idx] = stride # <<<<<<<<<<<<<< * stride *= shape[idx] * else: */ (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; /* "View.MemoryView":1196 * for idx in range(ndim): * strides[idx] = stride * stride *= shape[idx] # <<<<<<<<<<<<<< * else: * for idx in range(ndim - 1, -1, -1): */ __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); } /* "View.MemoryView":1193 * cdef int idx * * if order == 'F': # <<<<<<<<<<<<<< * for idx in range(ndim): * strides[idx] = stride */ goto __pyx_L3; } /* "View.MemoryView":1198 * stride *= shape[idx] * else: * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * strides[idx] = stride * stride *= shape[idx] */ /*else*/ { for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { __pyx_v_idx = __pyx_t_2; /* "View.MemoryView":1199 * else: * for idx in range(ndim - 1, -1, -1): * strides[idx] = stride # <<<<<<<<<<<<<< * stride *= shape[idx] * */ (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; /* "View.MemoryView":1200 * for idx in range(ndim - 1, -1, -1): * strides[idx] = stride * stride *= shape[idx] # <<<<<<<<<<<<<< * * return stride */ __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); } } __pyx_L3:; /* "View.MemoryView":1202 * stride *= shape[idx] * * return stride # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_copy_data_to_temp') */ __pyx_r = __pyx_v_stride; goto __pyx_L0; /* "View.MemoryView":1184 * * @cname('__pyx_fill_contig_strides_array') * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, * int ndim, char order) noexcept nogil: */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1205 * * @cname('__pyx_memoryview_copy_data_to_temp') * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *tmpslice, * char order, */ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { int __pyx_v_i; void *__pyx_v_result; size_t __pyx_v_itemsize; size_t __pyx_v_size; void *__pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; struct __pyx_memoryview_obj *__pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":1216 * cdef void *result * * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< * cdef size_t size = slice_get_size(src, ndim) * */ __pyx_t_1 = __pyx_v_src->memview->view.itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":1217 * * cdef size_t itemsize = src.memview.view.itemsize * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< * * result = malloc(size) */ __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); /* "View.MemoryView":1219 * cdef size_t size = slice_get_size(src, ndim) * * result = malloc(size) # <<<<<<<<<<<<<< * if not result: * _err_no_memory() */ __pyx_v_result = malloc(__pyx_v_size); /* "View.MemoryView":1220 * * result = malloc(size) * if not result: # <<<<<<<<<<<<<< * _err_no_memory() * */ __pyx_t_2 = (!(__pyx_v_result != 0)); if (__pyx_t_2) { /* "View.MemoryView":1221 * result = malloc(size) * if not result: * _err_no_memory() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1221, __pyx_L1_error) /* "View.MemoryView":1220 * * result = malloc(size) * if not result: # <<<<<<<<<<<<<< * _err_no_memory() * */ } /* "View.MemoryView":1224 * * * tmpslice.data = result # <<<<<<<<<<<<<< * tmpslice.memview = src.memview * for i in range(ndim): */ __pyx_v_tmpslice->data = ((char *)__pyx_v_result); /* "View.MemoryView":1225 * * tmpslice.data = result * tmpslice.memview = src.memview # <<<<<<<<<<<<<< * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] */ __pyx_t_4 = __pyx_v_src->memview; __pyx_v_tmpslice->memview = __pyx_t_4; /* "View.MemoryView":1226 * tmpslice.data = result * tmpslice.memview = src.memview * for i in range(ndim): # <<<<<<<<<<<<<< * tmpslice.shape[i] = src.shape[i] * tmpslice.suboffsets[i] = -1 */ __pyx_t_3 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_3; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "View.MemoryView":1227 * tmpslice.memview = src.memview * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< * tmpslice.suboffsets[i] = -1 * */ (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); /* "View.MemoryView":1228 * for i in range(ndim): * tmpslice.shape[i] = src.shape[i] * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< * * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) */ (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; } /* "View.MemoryView":1230 * tmpslice.suboffsets[i] = -1 * * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) # <<<<<<<<<<<<<< * * */ (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); /* "View.MemoryView":1233 * * * for i in range(ndim): # <<<<<<<<<<<<<< * if tmpslice.shape[i] == 1: * tmpslice.strides[i] = 0 */ __pyx_t_3 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_3; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "View.MemoryView":1234 * * for i in range(ndim): * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< * tmpslice.strides[i] = 0 * */ __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1); if (__pyx_t_2) { /* "View.MemoryView":1235 * for i in range(ndim): * if tmpslice.shape[i] == 1: * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< * * if slice_is_contig(src[0], order, ndim): */ (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; /* "View.MemoryView":1234 * * for i in range(ndim): * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< * tmpslice.strides[i] = 0 * */ } } /* "View.MemoryView":1237 * tmpslice.strides[i] = 0 * * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< * memcpy(result, src.data, size) * else: */ __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1238 * * if slice_is_contig(src[0], order, ndim): * memcpy(result, src.data, size) # <<<<<<<<<<<<<< * else: * copy_strided_to_strided(src, tmpslice, ndim, itemsize) */ (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); /* "View.MemoryView":1237 * tmpslice.strides[i] = 0 * * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< * memcpy(result, src.data, size) * else: */ goto __pyx_L9; } /* "View.MemoryView":1240 * memcpy(result, src.data, size) * else: * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< * * return result */ /*else*/ { copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); } __pyx_L9:; /* "View.MemoryView":1242 * copy_strided_to_strided(src, tmpslice, ndim, itemsize) * * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "View.MemoryView":1205 * * @cname('__pyx_memoryview_copy_data_to_temp') * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< * __Pyx_memviewslice *tmpslice, * char order, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1247 * * @cname('__pyx_memoryview_err_extents') * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" */ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err_extents", 0); /* "View.MemoryView":1249 * cdef int _err_extents(int i, Py_ssize_t extent1, * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err_dim') */ __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi); __pyx_t_2 += 35; __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi); __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_got); __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_got); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got); __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_and); __pyx_t_2 += 5; __Pyx_GIVEREF(__pyx_kp_u_and); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and); __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 1249, __pyx_L1_error) /* "View.MemoryView":1247 * * @cname('__pyx_memoryview_err_extents') * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< * Py_ssize_t extent2) except -1 with gil: * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1252 * * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg % dim * */ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err_dim", 0); __Pyx_INCREF(__pyx_v_msg); /* "View.MemoryView":1253 * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: * raise error, msg % dim # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err') */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1253, __pyx_L1_error) /* "View.MemoryView":1252 * * @cname('__pyx_memoryview_err_dim') * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg % dim * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1256 * * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg * */ static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_err", 0); __Pyx_INCREF(__pyx_v_msg); /* "View.MemoryView":1257 * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: * raise error, msg # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_err_no_memory') */ __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0); __PYX_ERR(0, 1257, __pyx_L1_error) /* "View.MemoryView":1256 * * @cname('__pyx_memoryview_err') * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<< * raise error, msg * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1260 * * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<< * raise MemoryError * */ static int __pyx_memoryview_err_no_memory(void) { int __pyx_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /* "View.MemoryView":1261 * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: * raise MemoryError # <<<<<<<<<<<<<< * * */ PyErr_NoMemory(); __PYX_ERR(0, 1261, __pyx_L1_error) /* "View.MemoryView":1260 * * @cname('__pyx_memoryview_err_no_memory') * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<< * raise MemoryError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "View.MemoryView":1265 * * @cname('__pyx_memoryview_copy_contents') * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< * __Pyx_memviewslice dst, * int src_ndim, int dst_ndim, */ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { void *__pyx_v_tmpdata; size_t __pyx_v_itemsize; int __pyx_v_i; char __pyx_v_order; int __pyx_v_broadcasting; int __pyx_v_direct_copy; __Pyx_memviewslice __pyx_v_tmp; int __pyx_v_ndim; int __pyx_r; Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; void *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif /* "View.MemoryView":1273 * Check for overlapping memory and verify the shapes. * """ * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< * cdef size_t itemsize = src.memview.view.itemsize * cdef int i */ __pyx_v_tmpdata = NULL; /* "View.MemoryView":1274 * """ * cdef void *tmpdata = NULL * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< * cdef int i * cdef char order = get_best_order(&src, src_ndim) */ __pyx_t_1 = __pyx_v_src.memview->view.itemsize; __pyx_v_itemsize = __pyx_t_1; /* "View.MemoryView":1276 * cdef size_t itemsize = src.memview.view.itemsize * cdef int i * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< * cdef bint broadcasting = False * cdef bint direct_copy = False */ __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); /* "View.MemoryView":1277 * cdef int i * cdef char order = get_best_order(&src, src_ndim) * cdef bint broadcasting = False # <<<<<<<<<<<<<< * cdef bint direct_copy = False * cdef __Pyx_memviewslice tmp */ __pyx_v_broadcasting = 0; /* "View.MemoryView":1278 * cdef char order = get_best_order(&src, src_ndim) * cdef bint broadcasting = False * cdef bint direct_copy = False # <<<<<<<<<<<<<< * cdef __Pyx_memviewslice tmp * */ __pyx_v_direct_copy = 0; /* "View.MemoryView":1281 * cdef __Pyx_memviewslice tmp * * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: */ __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim); if (__pyx_t_2) { /* "View.MemoryView":1282 * * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< * elif dst_ndim < src_ndim: * broadcast_leading(&dst, dst_ndim, src_ndim) */ __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); /* "View.MemoryView":1281 * cdef __Pyx_memviewslice tmp * * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: */ goto __pyx_L3; } /* "View.MemoryView":1283 * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&dst, dst_ndim, src_ndim) * */ __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim); if (__pyx_t_2) { /* "View.MemoryView":1284 * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< * * cdef int ndim = max(src_ndim, dst_ndim) */ __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); /* "View.MemoryView":1283 * if src_ndim < dst_ndim: * broadcast_leading(&src, src_ndim, dst_ndim) * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< * broadcast_leading(&dst, dst_ndim, src_ndim) * */ } __pyx_L3:; /* "View.MemoryView":1286 * broadcast_leading(&dst, dst_ndim, src_ndim) * * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< * * for i in range(ndim): */ __pyx_t_3 = __pyx_v_dst_ndim; __pyx_t_4 = __pyx_v_src_ndim; __pyx_t_2 = (__pyx_t_3 > __pyx_t_4); if (__pyx_t_2) { __pyx_t_5 = __pyx_t_3; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_ndim = __pyx_t_5; /* "View.MemoryView":1288 * cdef int ndim = max(src_ndim, dst_ndim) * * for i in range(ndim): # <<<<<<<<<<<<<< * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: */ __pyx_t_5 = __pyx_v_ndim; __pyx_t_3 = __pyx_t_5; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1289 * * for i in range(ndim): * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< * if src.shape[i] == 1: * broadcasting = True */ __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])); if (__pyx_t_2) { /* "View.MemoryView":1290 * for i in range(ndim): * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: # <<<<<<<<<<<<<< * broadcasting = True * src.strides[i] = 0 */ __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1); if (__pyx_t_2) { /* "View.MemoryView":1291 * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: * broadcasting = True # <<<<<<<<<<<<<< * src.strides[i] = 0 * else: */ __pyx_v_broadcasting = 1; /* "View.MemoryView":1292 * if src.shape[i] == 1: * broadcasting = True * src.strides[i] = 0 # <<<<<<<<<<<<<< * else: * _err_extents(i, dst.shape[i], src.shape[i]) */ (__pyx_v_src.strides[__pyx_v_i]) = 0; /* "View.MemoryView":1290 * for i in range(ndim): * if src.shape[i] != dst.shape[i]: * if src.shape[i] == 1: # <<<<<<<<<<<<<< * broadcasting = True * src.strides[i] = 0 */ goto __pyx_L7; } /* "View.MemoryView":1294 * src.strides[i] = 0 * else: * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< * * if src.suboffsets[i] >= 0: */ /*else*/ { __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1294, __pyx_L1_error) } __pyx_L7:; /* "View.MemoryView":1289 * * for i in range(ndim): * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< * if src.shape[i] == 1: * broadcasting = True */ } /* "View.MemoryView":1296 * _err_extents(i, dst.shape[i], src.shape[i]) * * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * */ __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0); if (__pyx_t_2) { /* "View.MemoryView":1297 * * if src.suboffsets[i] >= 0: * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< * * if slices_overlap(&src, &dst, ndim, itemsize): */ __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error) /* "View.MemoryView":1296 * _err_extents(i, dst.shape[i], src.shape[i]) * * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * */ } } /* "View.MemoryView":1299 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< * * if not slice_is_contig(src, order, ndim): */ __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); if (__pyx_t_2) { /* "View.MemoryView":1301 * if slices_overlap(&src, &dst, ndim, itemsize): * * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< * order = get_best_order(&dst, ndim) * */ __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim)); if (__pyx_t_2) { /* "View.MemoryView":1302 * * if not slice_is_contig(src, order, ndim): * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) */ __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); /* "View.MemoryView":1301 * if slices_overlap(&src, &dst, ndim, itemsize): * * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< * order = get_best_order(&dst, ndim) * */ } /* "View.MemoryView":1304 * order = get_best_order(&dst, ndim) * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< * src = tmp * */ __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1304, __pyx_L1_error) __pyx_v_tmpdata = __pyx_t_7; /* "View.MemoryView":1305 * * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) * src = tmp # <<<<<<<<<<<<<< * * if not broadcasting: */ __pyx_v_src = __pyx_v_tmp; /* "View.MemoryView":1299 * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) * * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< * * if not slice_is_contig(src, order, ndim): */ } /* "View.MemoryView":1307 * src = tmp * * if not broadcasting: # <<<<<<<<<<<<<< * * */ __pyx_t_2 = (!__pyx_v_broadcasting); if (__pyx_t_2) { /* "View.MemoryView":1310 * * * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): */ __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1311 * * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< * elif slice_is_contig(src, 'F', ndim): * direct_copy = slice_is_contig(dst, 'F', ndim) */ __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); /* "View.MemoryView":1310 * * * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): */ goto __pyx_L12; } /* "View.MemoryView":1312 * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'F', ndim) * */ __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim); if (__pyx_t_2) { /* "View.MemoryView":1313 * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< * * if direct_copy: */ __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); /* "View.MemoryView":1312 * if slice_is_contig(src, 'C', ndim): * direct_copy = slice_is_contig(dst, 'C', ndim) * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< * direct_copy = slice_is_contig(dst, 'F', ndim) * */ } __pyx_L12:; /* "View.MemoryView":1315 * direct_copy = slice_is_contig(dst, 'F', ndim) * * if direct_copy: # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ if (__pyx_v_direct_copy) { /* "View.MemoryView":1317 * if direct_copy: * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1318 * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) */ (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); /* "View.MemoryView":1319 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * free(tmpdata) * return 0 */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1320 * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) # <<<<<<<<<<<<<< * return 0 * */ free(__pyx_v_tmpdata); /* "View.MemoryView":1321 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * free(tmpdata) * return 0 # <<<<<<<<<<<<<< * * if order == 'F' == get_best_order(&dst, ndim): */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":1315 * direct_copy = slice_is_contig(dst, 'F', ndim) * * if direct_copy: # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ } /* "View.MemoryView":1307 * src = tmp * * if not broadcasting: # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":1323 * return 0 * * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< * * */ __pyx_t_2 = (__pyx_v_order == 'F'); if (__pyx_t_2) { __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); } if (__pyx_t_2) { /* "View.MemoryView":1326 * * * transpose_memslice(&src) # <<<<<<<<<<<<<< * transpose_memslice(&dst) * */ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1326, __pyx_L1_error) /* "View.MemoryView":1327 * * transpose_memslice(&src) * transpose_memslice(&dst) # <<<<<<<<<<<<<< * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) */ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1327, __pyx_L1_error) /* "View.MemoryView":1323 * return 0 * * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":1329 * transpose_memslice(&dst) * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * copy_strided_to_strided(&src, &dst, ndim, itemsize) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1330 * * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * */ copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); /* "View.MemoryView":1331 * refcount_copying(&dst, dtype_is_object, ndim, inc=False) * copy_strided_to_strided(&src, &dst, ndim, itemsize) * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * * free(tmpdata) */ __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1333 * refcount_copying(&dst, dtype_is_object, ndim, inc=True) * * free(tmpdata) # <<<<<<<<<<<<<< * return 0 * */ free(__pyx_v_tmpdata); /* "View.MemoryView":1334 * * free(tmpdata) * return 0 # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_broadcast_leading') */ __pyx_r = 0; goto __pyx_L0; /* "View.MemoryView":1265 * * @cname('__pyx_memoryview_copy_contents') * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< * __Pyx_memviewslice dst, * int src_ndim, int dst_ndim, */ /* function exit code */ __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; return __pyx_r; } /* "View.MemoryView":1337 * * @cname('__pyx_memoryview_broadcast_leading') * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< * int ndim, * int ndim_other) noexcept nogil: */ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { int __pyx_v_i; int __pyx_v_offset; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; /* "View.MemoryView":1341 * int ndim_other) noexcept nogil: * cdef int i * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< * * for i in range(ndim - 1, -1, -1): */ __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); /* "View.MemoryView":1343 * cdef int offset = ndim_other - ndim * * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] */ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { __pyx_v_i = __pyx_t_1; /* "View.MemoryView":1344 * * for i in range(ndim - 1, -1, -1): * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< * mslice.strides[i + offset] = mslice.strides[i] * mslice.suboffsets[i + offset] = mslice.suboffsets[i] */ (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); /* "View.MemoryView":1345 * for i in range(ndim - 1, -1, -1): * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< * mslice.suboffsets[i + offset] = mslice.suboffsets[i] * */ (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); /* "View.MemoryView":1346 * mslice.shape[i + offset] = mslice.shape[i] * mslice.strides[i + offset] = mslice.strides[i] * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< * * for i in range(offset): */ (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); } /* "View.MemoryView":1348 * mslice.suboffsets[i + offset] = mslice.suboffsets[i] * * for i in range(offset): # <<<<<<<<<<<<<< * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] */ __pyx_t_1 = __pyx_v_offset; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "View.MemoryView":1349 * * for i in range(offset): * mslice.shape[i] = 1 # <<<<<<<<<<<<<< * mslice.strides[i] = mslice.strides[0] * mslice.suboffsets[i] = -1 */ (__pyx_v_mslice->shape[__pyx_v_i]) = 1; /* "View.MemoryView":1350 * for i in range(offset): * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< * mslice.suboffsets[i] = -1 * */ (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); /* "View.MemoryView":1351 * mslice.shape[i] = 1 * mslice.strides[i] = mslice.strides[0] * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< * * */ (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; } /* "View.MemoryView":1337 * * @cname('__pyx_memoryview_broadcast_leading') * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< * int ndim, * int ndim_other) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1359 * * @cname('__pyx_memoryview_refcount_copying') * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<< * * if dtype_is_object: */ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { /* "View.MemoryView":1361 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: * * if dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) * */ if (__pyx_v_dtype_is_object) { /* "View.MemoryView":1362 * * if dtype_is_object: * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') */ __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); /* "View.MemoryView":1361 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: * * if dtype_is_object: # <<<<<<<<<<<<<< * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) * */ } /* "View.MemoryView":1359 * * @cname('__pyx_memoryview_refcount_copying') * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<< * * if dtype_is_object: */ /* function exit code */ } /* "View.MemoryView":1365 * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: */ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /* "View.MemoryView":1368 * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< * * @cname('__pyx_memoryview_refcount_objects_in_slice') */ __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); /* "View.MemoryView":1365 * * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * bint inc) noexcept with gil: */ /* function exit code */ #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } /* "View.MemoryView":1371 * * @cname('__pyx_memoryview_refcount_objects_in_slice') * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i */ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; /* "View.MemoryView":1374 * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< * * for i in range(shape[0]): */ __pyx_v_stride = (__pyx_v_strides[0]); /* "View.MemoryView":1376 * cdef Py_ssize_t stride = strides[0] * * for i in range(shape[0]): # <<<<<<<<<<<<<< * if ndim == 1: * if inc: */ __pyx_t_1 = (__pyx_v_shape[0]); __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "View.MemoryView":1377 * * for i in range(shape[0]): * if ndim == 1: # <<<<<<<<<<<<<< * if inc: * Py_INCREF(( data)[0]) */ __pyx_t_4 = (__pyx_v_ndim == 1); if (__pyx_t_4) { /* "View.MemoryView":1378 * for i in range(shape[0]): * if ndim == 1: * if inc: # <<<<<<<<<<<<<< * Py_INCREF(( data)[0]) * else: */ if (__pyx_v_inc) { /* "View.MemoryView":1379 * if ndim == 1: * if inc: * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< * else: * Py_DECREF(( data)[0]) */ Py_INCREF((((PyObject **)__pyx_v_data)[0])); /* "View.MemoryView":1378 * for i in range(shape[0]): * if ndim == 1: * if inc: # <<<<<<<<<<<<<< * Py_INCREF(( data)[0]) * else: */ goto __pyx_L6; } /* "View.MemoryView":1381 * Py_INCREF(( data)[0]) * else: * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< * else: * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) */ /*else*/ { Py_DECREF((((PyObject **)__pyx_v_data)[0])); } __pyx_L6:; /* "View.MemoryView":1377 * * for i in range(shape[0]): * if ndim == 1: # <<<<<<<<<<<<<< * if inc: * Py_INCREF(( data)[0]) */ goto __pyx_L5; } /* "View.MemoryView":1383 * Py_DECREF(( data)[0]) * else: * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<< * * data += stride */ /*else*/ { __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); } __pyx_L5:; /* "View.MemoryView":1385 * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) * * data += stride # <<<<<<<<<<<<<< * * */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } /* "View.MemoryView":1371 * * @cname('__pyx_memoryview_refcount_objects_in_slice') * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, bint inc) noexcept: * cdef Py_ssize_t i */ /* function exit code */ } /* "View.MemoryView":1391 * * @cname('__pyx_memoryview_slice_assign_scalar') * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: */ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { /* "View.MemoryView":1394 * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) * refcount_copying(dst, dtype_is_object, ndim, inc=True) */ __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); /* "View.MemoryView":1395 * bint dtype_is_object) noexcept nogil: * refcount_copying(dst, dtype_is_object, ndim, inc=False) * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<< * refcount_copying(dst, dtype_is_object, ndim, inc=True) * */ __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); /* "View.MemoryView":1396 * refcount_copying(dst, dtype_is_object, ndim, inc=False) * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< * * */ __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); /* "View.MemoryView":1391 * * @cname('__pyx_memoryview_slice_assign_scalar') * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< * size_t itemsize, void *item, * bint dtype_is_object) noexcept nogil: */ /* function exit code */ } /* "View.MemoryView":1400 * * @cname('__pyx_memoryview__slice_assign_scalar') * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * size_t itemsize, void *item) noexcept nogil: */ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_stride; Py_ssize_t __pyx_v_extent; int __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; /* "View.MemoryView":1404 * size_t itemsize, void *item) noexcept nogil: * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t extent = shape[0] * */ __pyx_v_stride = (__pyx_v_strides[0]); /* "View.MemoryView":1405 * cdef Py_ssize_t i * cdef Py_ssize_t stride = strides[0] * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< * * if ndim == 1: */ __pyx_v_extent = (__pyx_v_shape[0]); /* "View.MemoryView":1407 * cdef Py_ssize_t extent = shape[0] * * if ndim == 1: # <<<<<<<<<<<<<< * for i in range(extent): * memcpy(data, item, itemsize) */ __pyx_t_1 = (__pyx_v_ndim == 1); if (__pyx_t_1) { /* "View.MemoryView":1408 * * if ndim == 1: * for i in range(extent): # <<<<<<<<<<<<<< * memcpy(data, item, itemsize) * data += stride */ __pyx_t_2 = __pyx_v_extent; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1409 * if ndim == 1: * for i in range(extent): * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< * data += stride * else: */ (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); /* "View.MemoryView":1410 * for i in range(extent): * memcpy(data, item, itemsize) * data += stride # <<<<<<<<<<<<<< * else: * for i in range(extent): */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } /* "View.MemoryView":1407 * cdef Py_ssize_t extent = shape[0] * * if ndim == 1: # <<<<<<<<<<<<<< * for i in range(extent): * memcpy(data, item, itemsize) */ goto __pyx_L3; } /* "View.MemoryView":1412 * data += stride * else: * for i in range(extent): # <<<<<<<<<<<<<< * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) * data += stride */ /*else*/ { __pyx_t_2 = __pyx_v_extent; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "View.MemoryView":1413 * else: * for i in range(extent): * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<< * data += stride * */ __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); /* "View.MemoryView":1414 * for i in range(extent): * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) * data += stride # <<<<<<<<<<<<<< * * */ __pyx_v_data = (__pyx_v_data + __pyx_v_stride); } } __pyx_L3:; /* "View.MemoryView":1400 * * @cname('__pyx_memoryview__slice_assign_scalar') * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< * Py_ssize_t *strides, int ndim, * size_t itemsize, void *item) noexcept nogil: */ /* function exit code */ } /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(0, 1, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "(tree fragment)":5 * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(0, 5, __pyx_L1_error); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v___pyx_PickleError = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum # <<<<<<<<<<<<<< * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 6, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v___pyx_result = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_2 = (__pyx_v___pyx_state != Py_None); if (__pyx_t_2) { /* "(tree fragment)":9 * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(0, 9, __pyx_L1_error) __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":8 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum * __pyx_result = Enum.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->name); __Pyx_DECREF(__pyx_v___pyx_result->name); __pyx_v___pyx_result->name = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 13, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 > 1); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":14 * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 14, __pyx_L1_error) } __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.name = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "BufferFormatFromTypeInfo":1450 * * @cname('__pyx_format_from_typeinfo') * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< * cdef __Pyx_StructField *field * cdef __pyx_typeinfo_string fmt */ static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) { __Pyx_StructField *__pyx_v_field; struct __pyx_typeinfo_string __pyx_v_fmt; PyObject *__pyx_v_part = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_alignment = NULL; PyObject *__pyx_v_parts = NULL; PyObject *__pyx_v_extents = NULL; Py_ssize_t __pyx_7genexpr__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_StructField *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_UCS4 __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("format_from_typeinfo", 1); /* "BufferFormatFromTypeInfo":1456 * cdef Py_ssize_t i * * if type.typegroup == 'S': # <<<<<<<<<<<<<< * assert type.fields != NULL * assert type.fields.type != NULL */ __pyx_t_1 = (__pyx_v_type->typegroup == 'S'); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1457 * * if type.typegroup == 'S': * assert type.fields != NULL # <<<<<<<<<<<<<< * assert type.fields.type != NULL * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_type->fields != NULL); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(0, 1457, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(0, 1457, __pyx_L1_error) #endif /* "BufferFormatFromTypeInfo":1458 * if type.typegroup == 'S': * assert type.fields != NULL * assert type.fields.type != NULL # <<<<<<<<<<<<<< * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_1 = (__pyx_v_type->fields->type != NULL); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); __PYX_ERR(0, 1458, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(0, 1458, __pyx_L1_error) #endif /* "BufferFormatFromTypeInfo":1460 * assert type.fields.type != NULL * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< * alignment = b'^' * else: */ __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1461 * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: * alignment = b'^' # <<<<<<<<<<<<<< * else: * alignment = b'' */ __Pyx_INCREF(__pyx_kp_b__9); __pyx_v_alignment = __pyx_kp_b__9; /* "BufferFormatFromTypeInfo":1460 * assert type.fields.type != NULL * * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<< * alignment = b'^' * else: */ goto __pyx_L4; } /* "BufferFormatFromTypeInfo":1463 * alignment = b'^' * else: * alignment = b'' # <<<<<<<<<<<<<< * * parts = [b"T{"] */ /*else*/ { __Pyx_INCREF(__pyx_kp_b__10); __pyx_v_alignment = __pyx_kp_b__10; } __pyx_L4:; /* "BufferFormatFromTypeInfo":1465 * alignment = b'' * * parts = [b"T{"] # <<<<<<<<<<<<<< * field = type.fields * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_b_T); __Pyx_GIVEREF(__pyx_kp_b_T); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_b_T)) __PYX_ERR(0, 1465, __pyx_L1_error); __pyx_v_parts = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "BufferFormatFromTypeInfo":1466 * * parts = [b"T{"] * field = type.fields # <<<<<<<<<<<<<< * * while field.type: */ __pyx_t_3 = __pyx_v_type->fields; __pyx_v_field = __pyx_t_3; /* "BufferFormatFromTypeInfo":1468 * field = type.fields * * while field.type: # <<<<<<<<<<<<<< * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') */ while (1) { __pyx_t_1 = (__pyx_v_field->type != 0); if (!__pyx_t_1) break; /* "BufferFormatFromTypeInfo":1469 * * while field.type: * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<< * parts.append(part + b':' + field.name + b':') * field += 1 */ __pyx_t_2 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "BufferFormatFromTypeInfo":1470 * while field.type: * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<< * field += 1 * */ __pyx_t_2 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "BufferFormatFromTypeInfo":1471 * part = format_from_typeinfo(field.type) * parts.append(part + b':' + field.name + b':') * field += 1 # <<<<<<<<<<<<<< * * result = alignment.join(parts) + b'}' */ __pyx_v_field = (__pyx_v_field + 1); } /* "BufferFormatFromTypeInfo":1473 * field += 1 * * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<< * else: * fmt = __Pyx_TypeInfoToFormat(type) */ __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_b__12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(0, 1473, __pyx_L1_error) __pyx_v_result = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1456 * cdef Py_ssize_t i * * if type.typegroup == 'S': # <<<<<<<<<<<<<< * assert type.fields != NULL * assert type.fields.type != NULL */ goto __pyx_L3; } /* "BufferFormatFromTypeInfo":1475 * result = alignment.join(parts) + b'}' * else: * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<< * result = fmt.string * if type.arraysize[0]: */ /*else*/ { __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type); /* "BufferFormatFromTypeInfo":1476 * else: * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string # <<<<<<<<<<<<<< * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] */ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_result = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1477 * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string * if type.arraysize[0]: # <<<<<<<<<<<<<< * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result */ __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0); if (__pyx_t_1) { /* "BufferFormatFromTypeInfo":1478 * result = fmt.string * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] # <<<<<<<<<<<<<< * result = f"({u','.join(extents)})".encode('ascii') + result * */ { /* enter inner scope */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __pyx_v_type->ndim; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_7genexpr__pyx_v_i = __pyx_t_9; __pyx_t_4 = __Pyx_PyUnicode_From_size_t((__pyx_v_type->arraysize[__pyx_7genexpr__pyx_v_i]), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } /* exit inner scope */ __pyx_v_extents = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "BufferFormatFromTypeInfo":1479 * if type.arraysize[0]: * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = 127; __Pyx_INCREF(__pyx_kp_u__13); __pyx_t_9 += 1; __Pyx_GIVEREF(__pyx_kp_u__13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__13); __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_extents); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_9 += 1; __Pyx_GIVEREF(__pyx_kp_u__7); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4)) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "BufferFormatFromTypeInfo":1477 * fmt = __Pyx_TypeInfoToFormat(type) * result = fmt.string * if type.arraysize[0]: # <<<<<<<<<<<<<< * extents = [f"{type.arraysize[i]}" for i in range(type.ndim)] * result = f"({u','.join(extents)})".encode('ascii') + result */ } } __pyx_L3:; /* "BufferFormatFromTypeInfo":1481 * result = f"({u','.join(extents)})".encode('ascii') + result * * return result # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "BufferFormatFromTypeInfo":1450 * * @cname('__pyx_format_from_typeinfo') * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<< * cdef __Pyx_StructField *field * cdef __pyx_typeinfo_string fmt */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_part); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_alignment); __Pyx_XDECREF(__pyx_v_parts); __Pyx_XDECREF(__pyx_v_extents); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/mixer.pyx":17 * * * cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: # <<<<<<<<<<<<<< * """ This is called in a thread made by SDL. * So we need the python GIL to do python stuff. */ static void __pyx_f_6pygame_5_sdl2_5mixer_recording_cb(void *__pyx_v_userdata, Uint8 *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_len) { __Pyx_memviewslice __pyx_v_a_memoryview = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_RefNannyDeclarations struct __pyx_array_obj *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } }; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; unsigned int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif __Pyx_RefNannySetupContext("recording_cb", 1); /* "pygame/_sdl2/mixer.pyx":22 * """ * cdef Uint8 [:] a_memoryview * with gil: # <<<<<<<<<<<<<< * a_memoryview = stream * try: */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif /*try:*/ { /* "pygame/_sdl2/mixer.pyx":23 * cdef Uint8 [:] a_memoryview * with gil: * a_memoryview = stream # <<<<<<<<<<<<<< * try: * # The userdata is the audio device. */ if (!__pyx_v_stream) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); __PYX_ERR(1, 23, __pyx_L4_error) } __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_Uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 23, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_len)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 23, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_array_new(__pyx_t_2, sizeof(Uint8), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L4_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(((PyObject *)__pyx_t_1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(1, 23, __pyx_L4_error) __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a_memoryview = __pyx_t_4; __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; /* "pygame/_sdl2/mixer.pyx":24 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pygame/_sdl2/mixer.pyx":27 * # The userdata is the audio device. * # The audio device is needed in some apps * (userdata).callback(userdata, a_memoryview) # <<<<<<<<<<<<<< * except: * traceback.print_exc() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_userdata), __pyx_n_s_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_a_memoryview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_Uint8, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_Uint8, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 27, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, ((PyObject *)__pyx_v_userdata), __pyx_t_8}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 27, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/mixer.pyx":24 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sdl2/mixer.pyx":28 * # The audio device is needed in some apps * (userdata).callback(userdata, a_memoryview) * except: # <<<<<<<<<<<<<< * traceback.print_exc() * raise */ /*except:*/ { __Pyx_AddTraceback("pygame._sdl2.mixer.recording_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_8); /* "pygame/_sdl2/mixer.pyx":29 * (userdata).callback(userdata, a_memoryview) * except: * traceback.print_exc() # <<<<<<<<<<<<<< * raise * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_traceback); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 29, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 29, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; __pyx_t_10 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_10 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sdl2/mixer.pyx":30 * except: * traceback.print_exc() * raise # <<<<<<<<<<<<<< * * # ctypedef void (*cfptr)(int) */ __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_8); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_8 = 0; __PYX_ERR(1, 30, __pyx_L8_except_error) } /* "pygame/_sdl2/mixer.pyx":24 * with gil: * a_memoryview = stream * try: # <<<<<<<<<<<<<< * # The userdata is the audio device. * # The audio device is needed in some apps */ __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L4_error; __pyx_L11_try_end:; } } /* "pygame/_sdl2/mixer.pyx":22 * """ * cdef Uint8 [:] a_memoryview * with gil: # <<<<<<<<<<<<<< * a_memoryview = stream * try: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "pygame/_sdl2/mixer.pyx":17 * * * cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: # <<<<<<<<<<<<<< * """ This is called in a thread made by SDL. * So we need the python GIL to do python stuff. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; #ifdef WITH_THREAD __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_XDECREF((PyObject *)__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_WriteUnraisable("pygame._sdl2.mixer.recording_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif __pyx_L0:; __PYX_XCLEAR_MEMVIEW(&__pyx_v_a_memoryview, 0); __Pyx_RefNannyFinishContextNogil() } /* "pygame/_sdl2/mixer.pyx":41 * # def __cinit__(self): * * def __init__(self, callback): # <<<<<<<<<<<<<< * self._callback = callback * self.userdata = self */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 41, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 41, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.mixer._PostMix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix___init__(((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)__pyx_v_self), __pyx_v_callback); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix___init__(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self, PyObject *__pyx_v_callback) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/mixer.pyx":42 * * def __init__(self, callback): * self._callback = callback # <<<<<<<<<<<<<< * self.userdata = self * self.callback = recording_cb; */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_self->_callback); __Pyx_DECREF(__pyx_v_self->_callback); __pyx_v_self->_callback = __pyx_v_callback; /* "pygame/_sdl2/mixer.pyx":43 * def __init__(self, callback): * self._callback = callback * self.userdata = self # <<<<<<<<<<<<<< * self.callback = recording_cb; * Mix_SetPostMix(self.callback, self.userdata) */ __pyx_v_self->userdata = ((void *)__pyx_v_self); /* "pygame/_sdl2/mixer.pyx":44 * self._callback = callback * self.userdata = self * self.callback = recording_cb; # <<<<<<<<<<<<<< * Mix_SetPostMix(self.callback, self.userdata) * */ __pyx_v_self->callback = ((__pyx_t_6pygame_5_sdl2_5mixer_mixcallback)__pyx_f_6pygame_5_sdl2_5mixer_recording_cb); /* "pygame/_sdl2/mixer.pyx":45 * self.userdata = self * self.callback = recording_cb; * Mix_SetPostMix(self.callback, self.userdata) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ Mix_SetPostMix(__pyx_v_self->callback, __pyx_v_self->userdata); /* "pygame/_sdl2/mixer.pyx":41 * # def __cinit__(self): * * def __init__(self, callback): # <<<<<<<<<<<<<< * self._callback = callback * self.userdata = self */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/mixer.pyx":47 * Mix_SetPostMix(self.callback, self.userdata) * * def __dealloc__(self): # <<<<<<<<<<<<<< * Mix_SetPostMix(NULL, NULL) * */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_2__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self) { /* "pygame/_sdl2/mixer.pyx":48 * * def __dealloc__(self): * Mix_SetPostMix(NULL, NULL) # <<<<<<<<<<<<<< * * @property */ Mix_SetPostMix(NULL, NULL); /* "pygame/_sdl2/mixer.pyx":47 * Mix_SetPostMix(self.callback, self.userdata) * * def __dealloc__(self): # <<<<<<<<<<<<<< * Mix_SetPostMix(NULL, NULL) * */ /* function exit code */ } /* "pygame/_sdl2/mixer.pyx":50 * Mix_SetPostMix(NULL, NULL) * * @property # <<<<<<<<<<<<<< * def callback(self): * """ called in the sound thread with (audiodevice, memoryview) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_8callback_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_8callback___get__(((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_8callback___get__(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/mixer.pyx":54 * """ called in the sound thread with (audiodevice, memoryview) * """ * return self._callback # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_callback); __pyx_r = __pyx_v_self->_callback; goto __pyx_L0; /* "pygame/_sdl2/mixer.pyx":50 * Mix_SetPostMix(NULL, NULL) * * @property # <<<<<<<<<<<<<< * def callback(self): * """ called in the sound thread with (audiodevice, memoryview) */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_4__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_callback_self_userdata_cann, 0, 0); __PYX_ERR(0, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.mixer._PostMix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(0, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.mixer._PostMix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_6__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_8_PostMix_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_callback_self_userdata_cann, 0, 0); __PYX_ERR(0, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.mixer._PostMix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/mixer.pyx":58 * * _postmix = None * cpdef set_post_mix(mix_func): # <<<<<<<<<<<<<< * """ Hook a processor function mix_func to the postmix stream for * post processing effects. You may just be reading the data and displaying */ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_1set_post_mix(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5mixer_set_post_mix(PyObject *__pyx_v_mix_func, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_post_mix", 1); /* "pygame/_sdl2/mixer.pyx":66 * """ * global _postmix * if mix_func is None: # <<<<<<<<<<<<<< * _postmix = None * Mix_SetPostMix(NULL, NULL) */ __pyx_t_1 = (__pyx_v_mix_func == Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/mixer.pyx":67 * global _postmix * if mix_func is None: * _postmix = None # <<<<<<<<<<<<<< * Mix_SetPostMix(NULL, NULL) * else: */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_postmix, Py_None) < 0) __PYX_ERR(1, 67, __pyx_L1_error) /* "pygame/_sdl2/mixer.pyx":68 * if mix_func is None: * _postmix = None * Mix_SetPostMix(NULL, NULL) # <<<<<<<<<<<<<< * else: * _postmix = _PostMix(mix_func) */ Mix_SetPostMix(NULL, NULL); /* "pygame/_sdl2/mixer.pyx":66 * """ * global _postmix * if mix_func is None: # <<<<<<<<<<<<<< * _postmix = None * Mix_SetPostMix(NULL, NULL) */ goto __pyx_L3; } /* "pygame/_sdl2/mixer.pyx":70 * Mix_SetPostMix(NULL, NULL) * else: * _postmix = _PostMix(mix_func) # <<<<<<<<<<<<<< */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix), __pyx_v_mix_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_postmix, __pyx_t_2) < 0) __PYX_ERR(1, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pygame/_sdl2/mixer.pyx":58 * * _postmix = None * cpdef set_post_mix(mix_func): # <<<<<<<<<<<<<< * """ Hook a processor function mix_func to the postmix stream for * post processing effects. You may just be reading the data and displaying */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.mixer.set_post_mix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_1set_post_mix(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5mixer_set_post_mix, " Hook a processor function mix_func to the postmix stream for\n post processing effects. You may just be reading the data and displaying\n it, or you may be altering the stream to add an echo.\n\n\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5mixer_1set_post_mix = {"set_post_mix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5mixer_1set_post_mix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5mixer_set_post_mix}; static PyObject *__pyx_pw_6pygame_5_sdl2_5mixer_1set_post_mix(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_mix_func = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_post_mix (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mix_func,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mix_func)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 58, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_post_mix") < 0)) __PYX_ERR(1, 58, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_mix_func = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_post_mix", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 58, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.mixer.set_post_mix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5mixer_set_post_mix(__pyx_self, __pyx_v_mix_func); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5mixer_set_post_mix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mix_func) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_post_mix", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_5_sdl2_5mixer_set_post_mix(__pyx_v_mix_func, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.mixer.set_post_mix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pygame_5_sdl2_5mixer__PostMix(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)o); p->_callback = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5mixer__PostMix(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *p = (struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5mixer__PostMix) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_callback); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_5_sdl2_5mixer__PostMix(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *p = (struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)o; if (p->_callback) { e = (*v)(p->_callback, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_5_sdl2_5mixer__PostMix(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *p = (struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix *)o; tmp = ((PyObject*)p->_callback); p->_callback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_5_sdl2_5mixer_8_PostMix_callback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_8callback_1__get__(o); } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5mixer__PostMix[] = { {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5mixer__PostMix[] = { {(char *)"callback", __pyx_getprop_6pygame_5_sdl2_5mixer_8_PostMix_callback, 0, (char *)PyDoc_STR(" called in the sound thread with (audiodevice, memoryview)\n "), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5mixer__PostMix_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5mixer__PostMix}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5mixer__PostMix}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_5_sdl2_5mixer__PostMix}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5mixer__PostMix}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5mixer__PostMix}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5mixer__PostMix}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5mixer__PostMix_spec = { "pygame._sdl2.mixer._PostMix", sizeof(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_5_sdl2_5mixer__PostMix_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5mixer__PostMix = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.mixer.""_PostMix", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5mixer__PostMix), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5mixer__PostMix, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5mixer__PostMix, /*tp_traverse*/ __pyx_tp_clear_6pygame_5_sdl2_5mixer__PostMix, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5mixer__PostMix, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5mixer__PostMix, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5mixer_8_PostMix_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5mixer__PostMix, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_array __pyx_vtable_array; static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_array_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_array_obj *)o); p->__pyx_vtab = __pyx_vtabptr_array; p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_array(PyObject *o) { struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_array___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->mode); Py_CLEAR(p->_format); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_array___setitem__(o, i, v); } else { __Pyx_TypeName o_type_name; o_type_name = __Pyx_PyType_GetName(Py_TYPE(o)); PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); __Pyx_DECREF_TypeName(o_type_name); return -1; } } static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_array___getattr__(o, n); } return v; } static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); } static PyMethodDef __pyx_methods_array[] = { {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_array[] = { {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_array = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_array_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type___pyx_array_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array}, {Py_sq_length, (void *)__pyx_array___len__}, {Py_sq_item, (void *)__pyx_sq_item_array}, {Py_mp_length, (void *)__pyx_array___len__}, {Py_mp_subscript, (void *)__pyx_array___getitem__}, {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array}, {Py_tp_getattro, (void *)__pyx_tp_getattro_array}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_array_getbuffer}, #endif {Py_tp_methods, (void *)__pyx_methods_array}, {Py_tp_getset, (void *)__pyx_getsets_array}, {Py_tp_new, (void *)__pyx_tp_new_array}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_array_spec = { "pygame._sdl2.mixer.array", sizeof(struct __pyx_array_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, __pyx_type___pyx_array_slots, }; #else static PySequenceMethods __pyx_tp_as_sequence_array = { __pyx_array___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_array, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_array = { __pyx_array___len__, /*mp_length*/ __pyx_array___getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_array = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_array_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type___pyx_array = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.mixer.""array", /*tp_name*/ sizeof(struct __pyx_array_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_array, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_array, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_array, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_array, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_array, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_MemviewEnum_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_MemviewEnum_obj *)o); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_Enum(PyObject *o) { struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->name); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { int e; struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_Enum(PyObject *o) { PyObject* tmp; struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_MemviewEnum___repr__(self); } static PyMethodDef __pyx_methods_Enum[] = { {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum}, {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__}, {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum}, {Py_tp_clear, (void *)__pyx_tp_clear_Enum}, {Py_tp_methods, (void *)__pyx_methods_Enum}, {Py_tp_init, (void *)__pyx_MemviewEnum___init__}, {Py_tp_new, (void *)__pyx_tp_new_Enum}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = { "pygame._sdl2.mixer.Enum", sizeof(struct __pyx_MemviewEnum_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type___pyx_MemviewEnum_slots, }; #else static PyTypeObject __pyx_type___pyx_MemviewEnum = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.mixer.""Enum", /*tp_name*/ sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_Enum, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_MemviewEnum___repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_Enum, /*tp_traverse*/ __pyx_tp_clear_Enum, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_Enum, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_MemviewEnum___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_Enum, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_memoryview_obj *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_memoryview_obj *)o); p->__pyx_vtab = __pyx_vtabptr_memoryview; p->obj = Py_None; Py_INCREF(Py_None); p->_size = Py_None; Py_INCREF(Py_None); p->_array_interface = Py_None; Py_INCREF(Py_None); p->view.obj = NULL; if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_memoryview(PyObject *o) { struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryview___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->obj); Py_CLEAR(p->_size); Py_CLEAR(p->_array_interface); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { int e; struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; if (p->obj) { e = (*v)(p->obj, a); if (e) return e; } if (p->_size) { e = (*v)(p->_size, a); if (e) return e; } if (p->_array_interface) { e = (*v)(p->_array_interface, a); if (e) return e; } if (p->view.obj) { e = (*v)(p->view.obj, a); if (e) return e; } return 0; } static int __pyx_tp_clear_memoryview(PyObject *o) { PyObject* tmp; struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; tmp = ((PyObject*)p->obj); p->obj = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_size); p->_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_array_interface); p->_array_interface = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); Py_CLEAR(p->view.obj); return 0; } static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_memoryview___setitem__(o, i, v); } else { __Pyx_TypeName o_type_name; o_type_name = __Pyx_PyType_GetName(Py_TYPE(o)); PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); __Pyx_DECREF_TypeName(o_type_name); return -1; } } static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); } static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); } static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_memoryview___repr__(self); } static PyMethodDef __pyx_methods_memoryview[] = { {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0}, {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_memoryview[] = { {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0}, {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0}, {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0}, {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0}, {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0}, {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0}, {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0}, {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0}, {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_memoryview = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_memoryview_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type___pyx_memoryview_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview}, {Py_tp_repr, (void *)__pyx_memoryview___repr__}, {Py_sq_length, (void *)__pyx_memoryview___len__}, {Py_sq_item, (void *)__pyx_sq_item_memoryview}, {Py_mp_length, (void *)__pyx_memoryview___len__}, {Py_mp_subscript, (void *)__pyx_memoryview___getitem__}, {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview}, {Py_tp_str, (void *)__pyx_memoryview___str__}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer}, #endif {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview}, {Py_tp_clear, (void *)__pyx_tp_clear_memoryview}, {Py_tp_methods, (void *)__pyx_methods_memoryview}, {Py_tp_getset, (void *)__pyx_getsets_memoryview}, {Py_tp_new, (void *)__pyx_tp_new_memoryview}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_memoryview_spec = { "pygame._sdl2.mixer.memoryview", sizeof(struct __pyx_memoryview_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type___pyx_memoryview_slots, }; #else static PySequenceMethods __pyx_tp_as_sequence_memoryview = { __pyx_memoryview___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_memoryview, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_memoryview = { __pyx_memoryview___len__, /*mp_length*/ __pyx_memoryview___getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_memoryview = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_memoryview_getbuffer, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type___pyx_memoryview = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.mixer.""memoryview", /*tp_name*/ sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_memoryview___repr__, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_memoryview___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_memoryview, /*tp_traverse*/ __pyx_tp_clear_memoryview, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_memoryview, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_memoryview, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_memoryview, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_memoryviewslice_obj *p; PyObject *o = __pyx_tp_new_memoryview(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_memoryviewslice_obj *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; p->from_object = Py_None; Py_INCREF(Py_None); p->from_slice.memview = NULL; return o; } static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryviewslice___dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->from_object); PyObject_GC_Track(o); __pyx_tp_dealloc_memoryview(o); } static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { int e; struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; if (p->from_object) { e = (*v)(p->from_object, a); if (e) return e; } return 0; } static int __pyx_tp_clear__memoryviewslice(PyObject *o) { PyObject* tmp; struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; __pyx_tp_clear_memoryview(o); tmp = ((PyObject*)p->from_object); p->from_object = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1); return 0; } static PyMethodDef __pyx_methods__memoryviewslice[] = { {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice}, {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")}, {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice}, {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice}, {Py_tp_methods, (void *)__pyx_methods__memoryviewslice}, {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice}, {0, 0}, }; static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = { "pygame._sdl2.mixer._memoryviewslice", sizeof(struct __pyx_memoryviewslice_obj), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, __pyx_type___pyx_memoryviewslice_slots, }; #else static PyTypeObject __pyx_type___pyx_memoryviewslice = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.mixer.""_memoryviewslice", /*tp_name*/ sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_memoryview___repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_memoryview___str__, /*tp_str*/ #else 0, /*tp_str*/ #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/ __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ __pyx_tp_clear__memoryviewslice, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods__memoryviewslice, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new__memoryviewslice, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0}, {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0}, {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0}, {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0}, {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0}, {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1}, {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0}, {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0}, {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0}, {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0}, {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0}, {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_PostMix, __pyx_k_PostMix, sizeof(__pyx_k_PostMix), 0, 0, 1, 1}, {&__pyx_n_s_PostMix___reduce_cython, __pyx_k_PostMix___reduce_cython, sizeof(__pyx_k_PostMix___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_PostMix___setstate_cython, __pyx_k_PostMix___setstate_cython, sizeof(__pyx_k_PostMix___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1}, {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0}, {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1}, {&__pyx_kp_b__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 0, 0}, {&__pyx_kp_b__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 0, 0}, {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0}, {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0}, {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1}, {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1}, {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, {&__pyx_kp_b__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 0, 0}, {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1}, {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0}, {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0}, {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0}, {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0}, {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, {&__pyx_n_s_mix_func, __pyx_k_mix_func, sizeof(__pyx_k_mix_func), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_s_postmix, __pyx_k_postmix, sizeof(__pyx_k_postmix), 0, 0, 1, 1}, {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_mixer, __pyx_k_pygame__sdl2_mixer, sizeof(__pyx_k_pygame__sdl2_mixer), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_sdl2, __pyx_k_pygame__sdl2_sdl2, sizeof(__pyx_k_pygame__sdl2_sdl2), 0, 0, 1, 1}, {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_s_self_callback_self_userdata_cann, __pyx_k_self_callback_self_userdata_cann, sizeof(__pyx_k_self_callback_self_userdata_cann), 0, 0, 1, 0}, {&__pyx_n_s_set_post_mix, __pyx_k_set_post_mix, sizeof(__pyx_k_set_post_mix), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sdl2_mixer, __pyx_k_src_c_cython_pygame__sdl2_mixer, sizeof(__pyx_k_src_c_cython_pygame__sdl2_mixer), 0, 0, 1, 0}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0}, {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0}, {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0}, {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0}, {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(0, 100, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 141, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 156, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 159, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 373, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 408, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 618, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 914, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "View.MemoryView":582 * def suboffsets(self): * if self.view.suboffsets == NULL: * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) */ __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(0, 582, __pyx_L1_error); __Pyx_GIVEREF(__pyx_tuple__4); /* "View.MemoryView":679 * tup = index if isinstance(index, tuple) else (index,) * * result = [slice(None)] * ndim # <<<<<<<<<<<<<< * have_slices = False * seen_ellipsis = False */ __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum */ __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); __pyx_tuple__16 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "View.MemoryView":101 * try: * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "View.MemoryView":103 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<< * except: * */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "View.MemoryView":309 * return self.name * * cdef generic = Enum("") # <<<<<<<<<<<<<< * cdef strided = Enum("") # default * cdef indirect = Enum("") */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "View.MemoryView":310 * * cdef generic = Enum("") * cdef strided = Enum("") # default # <<<<<<<<<<<<<< * cdef indirect = Enum("") * */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "View.MemoryView":311 * cdef generic = Enum("") * cdef strided = Enum("") # default * cdef indirect = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "View.MemoryView":314 * * * cdef contiguous = Enum("") # <<<<<<<<<<<<<< * cdef indirect_contiguous = Enum("") * */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "View.MemoryView":315 * * cdef contiguous = Enum("") * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_tuple__24 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" */ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 3, __pyx_L1_error) /* "pygame/_sdl2/mixer.pyx":58 * * _postmix = None * cpdef set_post_mix(mix_func): # <<<<<<<<<<<<<< * """ Hook a processor function mix_func to the postmix stream for * post processing effects. You may just be reading the data and displaying */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_mix_func); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_mixer, __pyx_n_s_set_post_mix, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(1, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None); generic = Py_None; Py_INCREF(Py_None); strided = Py_None; Py_INCREF(Py_None); indirect = Py_None; Py_INCREF(Py_None); contiguous = Py_None; Py_INCREF(Py_None); indirect_contiguous = Py_None; Py_INCREF(Py_None); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5mixer__PostMix_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix)) __PYX_ERR(1, 38, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5mixer__PostMix_spec, __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix) < 0) __PYX_ERR(1, 38, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix = &__pyx_type_6pygame_5_sdl2_5mixer__PostMix; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix) < 0) __PYX_ERR(1, 38, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5mixer__PostMix->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PostMix, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix) < 0) __PYX_ERR(1, 38, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5mixer__PostMix) < 0) __PYX_ERR(1, 38, __pyx_L1_error) #endif __pyx_vtabptr_array = &__pyx_vtable_array; __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; #if CYTHON_USE_TYPE_SPECS __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(0, 114, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array; if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) { __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer; } #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(0, 114, __pyx_L1_error) #else __pyx_array_type = &__pyx_type___pyx_array; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(0, 114, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_array_type->tp_print = 0; #endif if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 114, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(0, 114, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(0, 114, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(0, 302, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(0, 302, __pyx_L1_error) #else __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(0, 302, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_MemviewEnum_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(0, 302, __pyx_L1_error) #endif __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base; #if CYTHON_USE_TYPE_SPECS __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(0, 337, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview; if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) { __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer; } #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(0, 337, __pyx_L1_error) #else __pyx_memoryview_type = &__pyx_type___pyx_memoryview; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(0, 337, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_memoryview_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(0, 337, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(0, 337, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(0, 337, __pyx_L1_error) #endif __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base; #if CYTHON_USE_TYPE_SPECS __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(0, 952, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(0, 952, __pyx_L1_error) #else __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(0, 952, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_memoryviewslice_type->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) { __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 952, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(0, 952, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(0, 952, __pyx_L1_error) #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_mixer(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_mixer}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "mixer", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initmixer(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initmixer(void) #else __Pyx_PyMODINIT_FUNC PyInit_mixer(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_mixer(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_mixer(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; static PyThread_type_lock __pyx_t_8[8]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'mixer' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("mixer", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "mixer" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(1, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mixer(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sdl2__mixer) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sdl2.mixer")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sdl2.mixer", __pyx_m) < 0))) __PYX_ERR(1, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(1, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__16, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L2_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 100, __pyx_L2_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "View.MemoryView":101 * try: * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":100 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: */ goto __pyx_L8; } /* "View.MemoryView":103 * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<< * except: * */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L8:; /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "View.MemoryView":104 * else: * __pyx_collections_abc_Sequence = __import__("collections").Sequence * except: # <<<<<<<<<<<<<< * * __pyx_collections_abc_Sequence = None */ /*except:*/ { __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 104, __pyx_L4_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); /* "View.MemoryView":106 * except: * * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_collections_abc_Sequence); __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } /* "View.MemoryView":99 * * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" * try: # <<<<<<<<<<<<<< * if __import__("sys").version_info >= (3, 3): * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence */ __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L7_try_end:; } /* "View.MemoryView":241 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "View.MemoryView":242 * * try: * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< * index = __pyx_collections_abc_Sequence.index * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(0, 242, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_array_type); /* "View.MemoryView":243 * try: * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(0, 243, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_array_type); /* "View.MemoryView":241 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":244 * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L12_exception_handled; } __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L16_try_end:; } /* "View.MemoryView":309 * return self.name * * cdef generic = Enum("") # <<<<<<<<<<<<<< * cdef strided = Enum("") # default * cdef indirect = Enum("") */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(generic); __Pyx_DECREF_SET(generic, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":310 * * cdef generic = Enum("") * cdef strided = Enum("") # default # <<<<<<<<<<<<<< * cdef indirect = Enum("") * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(strided); __Pyx_DECREF_SET(strided, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":311 * cdef generic = Enum("") * cdef strided = Enum("") # default * cdef indirect = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(indirect); __Pyx_DECREF_SET(indirect, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":314 * * * cdef contiguous = Enum("") # <<<<<<<<<<<<<< * cdef indirect_contiguous = Enum("") * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(contiguous); __Pyx_DECREF_SET(contiguous, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":315 * * cdef contiguous = Enum("") * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(indirect_contiguous); __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":323 * * * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ * PyThread_allocate_lock(), */ __pyx_memoryview_thread_locks_used = 0; /* "View.MemoryView":324 * * cdef int __pyx_memoryview_thread_locks_used = 0 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< * PyThread_allocate_lock(), * PyThread_allocate_lock(), */ __pyx_t_8[0] = PyThread_allocate_lock(); __pyx_t_8[1] = PyThread_allocate_lock(); __pyx_t_8[2] = PyThread_allocate_lock(); __pyx_t_8[3] = PyThread_allocate_lock(); __pyx_t_8[4] = PyThread_allocate_lock(); __pyx_t_8[5] = PyThread_allocate_lock(); __pyx_t_8[6] = PyThread_allocate_lock(); __pyx_t_8[7] = PyThread_allocate_lock(); memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); /* "View.MemoryView":982 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "View.MemoryView":983 * * try: * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< * index = __pyx_collections_abc_Sequence.index * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(0, 983, __pyx_L17_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_memoryviewslice_type); /* "View.MemoryView":984 * try: * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(0, 984, __pyx_L17_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_memoryviewslice_type); /* "View.MemoryView":982 * * * try: # <<<<<<<<<<<<<< * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L22_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":985 * count = __pyx_collections_abc_Sequence.count * index = __pyx_collections_abc_Sequence.index * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L18_exception_handled; } __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L22_try_end:; } /* "View.MemoryView":988 * pass * * try: # <<<<<<<<<<<<<< * if __pyx_collections_abc_Sequence: * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "View.MemoryView":989 * * try: * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 989, __pyx_L23_error) if (__pyx_t_6) { /* "View.MemoryView":993 * * * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<< * __pyx_collections_abc_Sequence.register(array) * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "View.MemoryView":994 * * __pyx_collections_abc_Sequence.register(_memoryviewslice) * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<< * except: * pass # ignore failure, it's a minor issue */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 994, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":989 * * try: * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< * * */ } /* "View.MemoryView":988 * pass * * try: # <<<<<<<<<<<<<< * if __pyx_collections_abc_Sequence: * */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L28_try_end; __pyx_L23_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "View.MemoryView":995 * __pyx_collections_abc_Sequence.register(_memoryviewslice) * __pyx_collections_abc_Sequence.register(array) * except: # <<<<<<<<<<<<<< * pass # ignore failure, it's a minor issue * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L24_exception_handled; } __pyx_L24_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L28_try_end:; } /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sdl2/mixer.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * import traceback * */ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_error); __Pyx_GIVEREF(__pyx_n_s_error); if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_error)) __PYX_ERR(1, 1, __pyx_L1_error); __pyx_t_4 = __Pyx_Import(__pyx_n_s_pygame__sdl2_sdl2, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/mixer.pyx":2 * from pygame._sdl2.sdl2 import error * import traceback # <<<<<<<<<<<<<< * * #https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC79 */ __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_traceback, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_4) < 0) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5mixer_8_PostMix_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PostMix___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_mixer, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.callback,self.userdata cannot be converted to a Python object for pickling" */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5mixer_8_PostMix_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PostMix___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_mixer, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/mixer.pyx":57 * * * _postmix = None # <<<<<<<<<<<<<< * cpdef set_post_mix(mix_func): * """ Hook a processor function mix_func to the postmix stream for */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_postmix, Py_None) < 0) __PYX_ERR(1, 57, __pyx_L1_error) /* "pygame/_sdl2/mixer.pyx":58 * * _postmix = None * cpdef set_post_mix(mix_func): # <<<<<<<<<<<<<< * """ Hook a processor function mix_func to the postmix stream for * post processing effects. You may just be reading the data and displaying */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5mixer_1set_post_mix, 0, __pyx_n_s_set_post_mix, NULL, __pyx_n_s_pygame__sdl2_mixer, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_post_mix, __pyx_t_4) < 0) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/mixer.pyx":1 * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * import traceback * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sdl2.mixer", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sdl2.mixer"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; __Pyx_TypeName obj_type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } type_name = __Pyx_PyType_GetName(type); obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); __Pyx_DECREF_TypeName(type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* RaiseUnexpectedTypeError */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) { __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, expected, obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* CIntToDigits */ static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" "20212223242526272829" "30313233343536373839" "40414243444546474849" "50515253545556575859" "60616263646566676869" "70717273747576777879" "80818283848586878889" "90919293949596979899" }; static const char DIGIT_PAIRS_8[2*8*8+1] = { "0001020304050607" "1011121314151617" "2021222324252627" "3031323334353637" "4041424344454647" "5051525354555657" "6061626364656667" "7071727374757677" }; static const char DIGITS_HEX[2*16+1] = { "0123456789abcdef" "0123456789ABCDEF" }; /* BuildPyUnicode */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; Py_ssize_t uoffset = ulength - clength; #if CYTHON_USE_UNICODE_INTERNALS Py_ssize_t i; #if CYTHON_PEP393_ENABLED void *udata; uval = PyUnicode_New(ulength, 127); if (unlikely(!uval)) return NULL; udata = PyUnicode_DATA(uval); #else Py_UNICODE *udata; uval = PyUnicode_FromUnicode(NULL, ulength); if (unlikely(!uval)) return NULL; udata = PyUnicode_AS_UNICODE(uval); #endif if (uoffset > 0) { i = 0; if (prepend_sign) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); i++; } for (; i < uoffset; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); } } for (i=0; i < clength; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); } #else { PyObject *sign = NULL, *padding = NULL; uval = NULL; if (uoffset > 0) { prepend_sign = !!prepend_sign; if (uoffset > prepend_sign) { padding = PyUnicode_FromOrdinal(padding_char); if (likely(padding) && uoffset > prepend_sign + 1) { PyObject *tmp; PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign); if (unlikely(!repeat)) goto done_or_error; tmp = PyNumber_Multiply(padding, repeat); Py_DECREF(repeat); Py_DECREF(padding); padding = tmp; } if (unlikely(!padding)) goto done_or_error; } if (prepend_sign) { sign = PyUnicode_FromOrdinal('-'); if (unlikely(!sign)) goto done_or_error; } } uval = PyUnicode_DecodeASCII(chars, clength, NULL); if (likely(uval) && padding) { PyObject *tmp = PyNumber_Add(padding, uval); Py_DECREF(uval); uval = tmp; } if (likely(uval) && sign) { PyObject *tmp = PyNumber_Add(sign, uval); Py_DECREF(uval); uval = tmp; } done_or_error: Py_XDECREF(padding); Py_XDECREF(sign); } #endif return uval; } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(int)*3+2]; char *dpos, *end = digits + sizeof(int)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; int remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (int) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (int) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (int) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (Py_ssize_t) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (Py_ssize_t) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (Py_ssize_t) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* JoinPyUnicode */ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; int result_ukind, kind_shift; Py_ssize_t i, char_pos; void *result_udata; CYTHON_MAYBE_UNUSED_VAR(max_char); #if CYTHON_PEP393_ENABLED result_uval = PyUnicode_New(result_ulength, max_char); if (unlikely(!result_uval)) return NULL; result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; result_udata = PyUnicode_DATA(result_uval); #else result_uval = PyUnicode_FromUnicode(NULL, result_ulength); if (unlikely(!result_uval)) return NULL; result_ukind = sizeof(Py_UNICODE); kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1; result_udata = PyUnicode_AS_UNICODE(result_uval); #endif assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); char_pos = 0; for (i=0; i < value_count; i++) { int ukind; Py_ssize_t ulength; void *udata; PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); if (unlikely(__Pyx_PyUnicode_READY(uval))) goto bad; ulength = __Pyx_PyUnicode_GET_LENGTH(uval); if (unlikely(!ulength)) continue; if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) goto overflow; ukind = __Pyx_PyUnicode_KIND(uval); udata = __Pyx_PyUnicode_DATA(uval); if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); } else { #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); #else Py_ssize_t j; for (j=0; j < ulength; j++) { Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); } #endif } char_pos += ulength; } return result_uval; overflow: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); bad: Py_DECREF(result_uval); return NULL; #else CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); CYTHON_UNUSED_VAR(value_count); return PyUnicode_Join(__pyx_empty_unicode, value_tuple); #endif } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { PyObject *runerr = NULL; Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); __Pyx_DECREF_TypeName(index_type_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); if (!meth) { PyErr_Clear(); } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; } } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { PyTypeObject *tp = Py_TYPE(obj); PyMappingMethods *mm = tp->tp_as_mapping; PySequenceMethods *sm = tp->tp_as_sequence; if (likely(mm && mm->mp_subscript)) { return mm->mp_subscript(obj, key); } if (likely(sm && sm->sq_item)) { return __Pyx_PyObject_GetIndex(obj, key); } return __Pyx_PyObject_GetItem_Slow(obj, key); } #endif /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* DivInt[Py_ssize_t] */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* GetAttr3 */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 int res = PyObject_GetOptionalAttr(o, n, &r); return (res != 0) ? r : __Pyx_NewRef(d); #else #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { r = __Pyx_NewRef(d); } return r; } #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); #endif } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type = NULL, *local_value, *local_tb = NULL; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; #if PY_VERSION_HEX >= 0x030C00A6 local_value = tstate->current_exception; tstate->current_exception = 0; if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 if (unlikely(tstate->current_exception)) #elif CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; #endif } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; tmp_value = exc_info->exc_value; exc_info->exc_value = *value; if (tmp_value == NULL || tmp_value == Py_None) { Py_XDECREF(tmp_value); tmp_value = NULL; tmp_type = NULL; tmp_tb = NULL; } else { tmp_type = (PyObject*) Py_TYPE(tmp_value); Py_INCREF(tmp_type); #if CYTHON_COMPILING_IN_CPYTHON tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; Py_XINCREF(tmp_tb); #else tmp_tb = PyException_GetTraceback(tmp_value); #endif } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* ImportDottedModule */ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; if (unlikely(PyErr_Occurred())) { PyErr_Clear(); } if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { partial_name = name; } else { slice = PySequence_GetSlice(parts_tuple, 0, count); if (unlikely(!slice)) goto bad; sep = PyUnicode_FromStringAndSize(".", 1); if (unlikely(!sep)) goto bad; partial_name = PyUnicode_Join(sep, slice); } PyErr_Format( #if PY_MAJOR_VERSION < 3 PyExc_ImportError, "No module named '%s'", PyString_AS_STRING(partial_name)); #else #if PY_VERSION_HEX >= 0x030600B1 PyExc_ModuleNotFoundError, #else PyExc_ImportError, #endif "No module named '%U'", partial_name); #endif bad: Py_XDECREF(sep); Py_XDECREF(slice); Py_XDECREF(partial_name); return NULL; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { PyObject *imported_module; #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) return NULL; imported_module = __Pyx_PyDict_GetItemStr(modules, name); Py_XINCREF(imported_module); #else imported_module = PyImport_GetModule(name); #endif return imported_module; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { Py_ssize_t i, nparts; nparts = PyTuple_GET_SIZE(parts_tuple); for (i=1; i < nparts && module; i++) { PyObject *part, *submodule; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS part = PyTuple_GET_ITEM(parts_tuple, i); #else part = PySequence_ITEM(parts_tuple, i); #endif submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(part); #endif Py_DECREF(module); module = submodule; } if (unlikely(!module)) { return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); } return module; } #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 PyObject *module, *from_list, *star = __pyx_n_s__3; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); module = __Pyx_Import(name, from_list, 0); Py_DECREF(from_list); return module; #else PyObject *imported_module; PyObject *module = __Pyx_Import(name, NULL, 0); if (!parts_tuple || unlikely(!module)) return module; imported_module = __Pyx__ImportDottedModule_Lookup(name); if (likely(imported_module)) { Py_DECREF(module); return imported_module; } PyErr_Clear(); return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); #endif } static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); if (likely(module)) { PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); if (likely(spec)) { PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { Py_DECREF(spec); spec = NULL; } Py_XDECREF(unsafe); } if (likely(!spec)) { PyErr_Clear(); return module; } Py_DECREF(spec); Py_DECREF(module); } else if (PyErr_Occurred()) { PyErr_Clear(); } #endif return __Pyx__ImportDottedModule(name, parts_tuple); } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; itp_as_sequence && type->tp_as_sequence->sq_repeat)) { return type->tp_as_sequence->sq_repeat(seq, mul); } else #endif { return __Pyx_PySequence_Multiply_Generic(seq, mul); } } /* SetItemInt */ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (unlikely(!j)) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_ass_subscript) { int r; PyObject *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return -1; r = mm->mp_ass_subscript(o, key, v); Py_DECREF(key); return r; } if (likely(sm && sm->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return -1; PyErr_Clear(); } } return sm->sq_ass_item(o, i, v); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } /* RaiseUnboundLocalError */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* DivInt[long] */ static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (!r) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_GetMethod; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* StringJoin */ static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { (void) __Pyx_PyObject_CallMethod1; #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3 return _PyString_Join(sep, values); #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 return _PyBytes_Join(sep, values); #else return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values); #endif } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(size_t)*3+2]; char *dpos, *end = digits + sizeof(size_t)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; size_t remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (size_t) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (size_t) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (size_t) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* SetVTable */ static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { PyObject *ob = PyCapsule_New(vtable, 0, 0); if (unlikely(!ob)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) #else if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) #endif goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetVTable */ static void* __Pyx_GetVtable(PyTypeObject *type) { void* ptr; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); #else PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); #endif if (!ob) goto bad; ptr = PyCapsule_GetPointer(ob, 0); if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* MergeVTables */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type) { int i; void** base_vtables; __Pyx_TypeName tp_base_name; __Pyx_TypeName base_name; void* unknown = (void*)-1; PyObject* bases = type->tp_bases; int base_depth = 0; { PyTypeObject* base = type->tp_base; while (base) { base_depth += 1; base = base->tp_base; } } base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); base_vtables[0] = unknown; for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); if (base_vtable != NULL) { int j; PyTypeObject* base = type->tp_base; for (j = 0; j < base_depth; j++) { if (base_vtables[j] == unknown) { base_vtables[j] = __Pyx_GetVtable(base); base_vtables[j + 1] = unknown; } if (base_vtables[j] == base_vtable) { break; } else if (base_vtables[j] == NULL) { goto bad; } base = base->tp_base; } } } PyErr_Clear(); free(base_vtables); return 0; bad: tp_base_name = __Pyx_PyType_GetName(type->tp_base); base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); PyErr_Format(PyExc_TypeError, "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); __Pyx_DECREF_TypeName(tp_base_name); __Pyx_DECREF_TypeName(base_name); free(base_vtables); return -1; } #endif /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { __Pyx_TypeName obj_type_name; if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags); obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if ((0)) {} view->obj = NULL; Py_DECREF(obj); } #endif /* MemviewSliceIsContig */ static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) { int i, index, step, start; Py_ssize_t itemsize = mvs.memview->view.itemsize; if (order == 'F') { step = 1; start = 0; } else { step = -1; start = ndim - 1; } for (i = 0; i < ndim; i++) { index = start + step * i; if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) return 0; itemsize *= mvs.shape[index]; } return 1; } /* OverlappingSlices */ static void __pyx_get_array_memory_extents(__Pyx_memviewslice *slice, void **out_start, void **out_end, int ndim, size_t itemsize) { char *start, *end; int i; start = end = slice->data; for (i = 0; i < ndim; i++) { Py_ssize_t stride = slice->strides[i]; Py_ssize_t extent = slice->shape[i]; if (extent == 0) { *out_start = *out_end = start; return; } else { if (stride > 0) end += stride * (extent - 1); else start += stride * (extent - 1); } } *out_start = start; *out_end = end + itemsize; } static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, __Pyx_memviewslice *slice2, int ndim, size_t itemsize) { void *start1, *end1, *start2, *end2; __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); return (start1 < end2) && (start2 < end1); } /* IsLittleEndian */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; uint8_t u8[4]; } S; S.u32 = 0x01020304; return S.u8[0] == 4; } /* BufferFormatCheck */ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t <= '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case '?': return "'bool'"; case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparsable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) { CYTHON_UNUSED_VAR(is_complex); switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) { CYTHON_UNUSED_VAR(is_complex); switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static int __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number, ndim; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return -1; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1; ndim = ctx->head->field->type->ndim; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return -1; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); return -1; } if (*ts != ',' && *ts != ')') { PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); return -1; } if (*ts == ',') ts++; i++; } if (i != ndim) { PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); return -1; } if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return -1; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return 0; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } CYTHON_FALLTHROUGH; case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } CYTHON_FALLTHROUGH; case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } /* TypeInfoCompare */ static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) { int i; if (!a || !b) return 0; if (a == b) return 1; if (a->size != b->size || a->typegroup != b->typegroup || a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { if (a->typegroup == 'H' || b->typegroup == 'H') { return a->size == b->size; } else { return 0; } } if (a->ndim) { for (i = 0; i < a->ndim; i++) if (a->arraysize[i] != b->arraysize[i]) return 0; } if (a->typegroup == 'S') { if (a->flags != b->flags) return 0; if (a->fields || b->fields) { if (!(a->fields && b->fields)) return 0; for (i = 0; a->fields[i].type && b->fields[i].type; i++) { __Pyx_StructField *field_a = a->fields + i; __Pyx_StructField *field_b = b->fields + i; if (field_a->offset != field_b->offset || !__pyx_typeinfo_cmp(field_a->type, field_b->type)) return 0; } return !a->fields[i].type && !b->fields[i].type; } } return 1; } /* MemviewSliceValidateAndInit */ static int __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) { if (buf->shape[dim] <= 1) return 1; if (buf->strides) { if (spec & __Pyx_MEMVIEW_CONTIG) { if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { if (unlikely(buf->strides[dim] != sizeof(void *))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly contiguous " "in dimension %d.", dim); goto fail; } } else if (unlikely(buf->strides[dim] != buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); goto fail; } } if (spec & __Pyx_MEMVIEW_FOLLOW) { Py_ssize_t stride = buf->strides[dim]; if (stride < 0) stride = -stride; if (unlikely(stride < buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); goto fail; } } } else { if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not contiguous in " "dimension %d", dim); goto fail; } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not indirect in " "dimension %d", dim); goto fail; } else if (unlikely(buf->suboffsets)) { PyErr_SetString(PyExc_ValueError, "Buffer exposes suboffsets but no strides"); goto fail; } } return 1; fail: return 0; } static int __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec) { CYTHON_UNUSED_VAR(ndim); if (spec & __Pyx_MEMVIEW_DIRECT) { if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { PyErr_Format(PyExc_ValueError, "Buffer not compatible with direct access " "in dimension %d.", dim); goto fail; } } if (spec & __Pyx_MEMVIEW_PTR) { if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly accessible " "in dimension %d.", dim); goto fail; } } return 1; fail: return 0; } static int __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) { int i; if (c_or_f_flag & __Pyx_IS_F_CONTIG) { Py_ssize_t stride = 1; for (i = 0; i < ndim; i++) { if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not fortran contiguous."); goto fail; } stride = stride * buf->shape[i]; } } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { Py_ssize_t stride = 1; for (i = ndim - 1; i >- 1; i--) { if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not C contiguous."); goto fail; } stride = stride * buf->shape[i]; } } return 1; fail: return 0; } static int __Pyx_ValidateAndInit_memviewslice( int *axes_specs, int c_or_f_flag, int buf_flags, int ndim, __Pyx_TypeInfo *dtype, __Pyx_BufFmt_StackElem stack[], __Pyx_memviewslice *memviewslice, PyObject *original_obj) { struct __pyx_memoryview_obj *memview, *new_memview; __Pyx_RefNannyDeclarations Py_buffer *buf; int i, spec = 0, retval = -1; __Pyx_BufFmt_Context ctx; int from_memoryview = __pyx_memoryview_check(original_obj); __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) original_obj)->typeinfo)) { memview = (struct __pyx_memoryview_obj *) original_obj; new_memview = NULL; } else { memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( original_obj, buf_flags, 0, dtype); new_memview = memview; if (unlikely(!memview)) goto fail; } buf = &memview->view; if (unlikely(buf->ndim != ndim)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", ndim, buf->ndim); goto fail; } if (new_memview) { __Pyx_BufFmt_Init(&ctx, stack, dtype); if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; } if (unlikely((unsigned) buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->len > 0) { for (i = 0; i < ndim; i++) { spec = axes_specs[i]; if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) goto fail; if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) goto fail; } if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) goto fail; } if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, new_memview != NULL) == -1)) { goto fail; } retval = 0; goto no_fail; fail: Py_XDECREF(new_memview); retval = -1; no_fail: __Pyx_RefNannyFinishContext(); return retval; } /* ObjectToMemviewSlice */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_Uint8(PyObject *obj, int writable_flag) { __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_BufFmt_StackElem stack[1]; int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) }; int retcode; if (obj == Py_None) { result.memview = (struct __pyx_memoryview_obj *) Py_None; return result; } retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0, PyBUF_RECORDS_RO | writable_flag, 1, &__Pyx_TypeInfo_nn_Uint8, stack, &result, obj); if (unlikely(retcode == -1)) goto __pyx_fail; return result; __pyx_fail: result.memview = NULL; result.data = NULL; return result; } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* MemviewDtypeToObject */ static CYTHON_INLINE PyObject *__pyx_memview_get_nn_Uint8(const char *itemp) { return (PyObject *) __Pyx_PyInt_From_Uint8(*(Uint8 *) itemp); } static CYTHON_INLINE int __pyx_memview_set_nn_Uint8(const char *itemp, PyObject *obj) { Uint8 value = __Pyx_PyInt_As_Uint8(obj); if (unlikely((value == ((Uint8)-1)) && PyErr_Occurred())) return 0; *(Uint8 *) itemp = value; return 1; } /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, const char *mode, int ndim, size_t sizeof_dtype, int contig_flag, int dtype_is_object) { __Pyx_RefNannyDeclarations int i; __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } }; struct __pyx_memoryview_obj *from_memview = from_mvs->memview; Py_buffer *buf = &from_memview->view; PyObject *shape_tuple = NULL; PyObject *temp_int = NULL; struct __pyx_array_obj *array_obj = NULL; struct __pyx_memoryview_obj *memview_obj = NULL; __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); for (i = 0; i < ndim; i++) { if (unlikely(from_mvs->suboffsets[i] >= 0)) { PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " "indirect dimensions (axis %d)", i); goto fail; } } shape_tuple = PyTuple_New(ndim); if (unlikely(!shape_tuple)) { goto fail; } __Pyx_GOTREF(shape_tuple); for(i = 0; i < ndim; i++) { temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); if(unlikely(!temp_int)) { goto fail; } else { PyTuple_SET_ITEM(shape_tuple, i, temp_int); temp_int = NULL; } } array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); if (unlikely(!array_obj)) { goto fail; } __Pyx_GOTREF(array_obj); memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( (PyObject *) array_obj, contig_flag, dtype_is_object, from_mvs->memview->typeinfo); if (unlikely(!memview_obj)) goto fail; if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) goto fail; if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, dtype_is_object) < 0)) goto fail; goto no_fail; fail: __Pyx_XDECREF(new_mvs.memview); new_mvs.memview = NULL; new_mvs.data = NULL; no_fail: __Pyx_XDECREF(shape_tuple); __Pyx_XDECREF(temp_int); __Pyx_XDECREF(array_obj); __Pyx_RefNannyFinishContext(); return new_mvs; } /* MemviewSliceInit */ static int __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, int ndim, __Pyx_memviewslice *memviewslice, int memview_is_new_reference) { __Pyx_RefNannyDeclarations int i, retval=-1; Py_buffer *buf = &memview->view; __Pyx_RefNannySetupContext("init_memviewslice", 0); if (unlikely(memviewslice->memview || memviewslice->data)) { PyErr_SetString(PyExc_ValueError, "memviewslice is already initialized!"); goto fail; } if (buf->strides) { for (i = 0; i < ndim; i++) { memviewslice->strides[i] = buf->strides[i]; } } else { Py_ssize_t stride = buf->itemsize; for (i = ndim - 1; i >= 0; i--) { memviewslice->strides[i] = stride; stride *= buf->shape[i]; } } for (i = 0; i < ndim; i++) { memviewslice->shape[i] = buf->shape[i]; if (buf->suboffsets) { memviewslice->suboffsets[i] = buf->suboffsets[i]; } else { memviewslice->suboffsets[i] = -1; } } memviewslice->memview = memview; memviewslice->data = (char *)buf->buf; if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { Py_INCREF(memview); } retval = 0; goto no_fail; fail: memviewslice->memview = 0; memviewslice->data = 0; retval = -1; no_fail: __Pyx_RefNannyFinishContext(); return retval; } #ifndef Py_NO_RETURN #define Py_NO_RETURN #endif static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { va_list vargs; char msg[200]; #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES) va_start(vargs, fmt); #else va_start(vargs); #endif vsnprintf(msg, 200, fmt, vargs); va_end(vargs); Py_FatalError(msg); } static CYTHON_INLINE int __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock) { int result; PyThread_acquire_lock(lock, 1); result = (*acquisition_count)++; PyThread_release_lock(lock); return result; } static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock) { int result; PyThread_acquire_lock(lock, 1); result = (*acquisition_count)--; PyThread_release_lock(lock); return result; } static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { __pyx_nonatomic_int_type old_acquisition_count; struct __pyx_memoryview_obj *memview = memslice->memview; if (unlikely(!memview || (PyObject *) memview == Py_None)) { return; } old_acquisition_count = __pyx_add_acquisition_count(memview); if (unlikely(old_acquisition_count <= 0)) { if (likely(old_acquisition_count == 0)) { if (have_gil) { Py_INCREF((PyObject *) memview); } else { PyGILState_STATE _gilstate = PyGILState_Ensure(); Py_INCREF((PyObject *) memview); PyGILState_Release(_gilstate); } } else { __pyx_fatalerror("Acquisition count is %d (line %d)", old_acquisition_count+1, lineno); } } } static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { __pyx_nonatomic_int_type old_acquisition_count; struct __pyx_memoryview_obj *memview = memslice->memview; if (unlikely(!memview || (PyObject *) memview == Py_None)) { memslice->memview = NULL; return; } old_acquisition_count = __pyx_sub_acquisition_count(memview); memslice->data = NULL; if (likely(old_acquisition_count > 1)) { memslice->memview = NULL; } else if (likely(old_acquisition_count == 1)) { if (have_gil) { Py_CLEAR(memslice->memview); } else { PyGILState_STATE _gilstate = PyGILState_Ensure(); Py_CLEAR(memslice->memview); PyGILState_Release(_gilstate); } } else { __pyx_fatalerror("Acquisition count is %d (line %d)", old_acquisition_count-1, lineno); } } /* TypeInfoToFormat */ static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { struct __pyx_typeinfo_string result = { {0} }; char *buf = (char *) result.string; size_t size = type->size; switch (type->typegroup) { case 'H': *buf = 'c'; break; case 'I': case 'U': if (size == 1) *buf = (type->is_unsigned) ? 'B' : 'b'; else if (size == 2) *buf = (type->is_unsigned) ? 'H' : 'h'; else if (size == 4) *buf = (type->is_unsigned) ? 'I' : 'i'; else if (size == 8) *buf = (type->is_unsigned) ? 'Q' : 'q'; break; case 'P': *buf = 'P'; break; case 'C': { __Pyx_TypeInfo complex_type = *type; complex_type.typegroup = 'R'; complex_type.size /= 2; *buf++ = 'Z'; *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; break; } case 'R': if (size == 4) *buf = 'f'; else if (size == 8) *buf = 'd'; else *buf = 'g'; break; } return result; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint8) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint8) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint8) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint8), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint8)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint8) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint8, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint8) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint8 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint8) -1; val = __Pyx_PyInt_As_Uint8(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 2 * PyLong_SHIFT)) { return (Uint8) (((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 3 * PyLong_SHIFT)) { return (Uint8) (((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 4 * PyLong_SHIFT)) { return (Uint8) (((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint8) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint8) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint8) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) ((((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) ((((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) ((((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; } } #endif if ((sizeof(Uint8) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint8 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint8) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint8) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint8) -1; } else { stepval = v; } v = NULL; val = (Uint8) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint8) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint8) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint8) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint8) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint8) 1) << (sizeof(Uint8) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint8) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint8"); return (Uint8) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint8"); return (Uint8) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const char neg_one = (char) -1, const_zero = (char) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(char) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (char) val; } } #endif if (unlikely(!PyLong_Check(x))) { char val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (char) -1; val = __Pyx_PyInt_As_char(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 3: if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; case 4: if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) { return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (char) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(char) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 2: if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -3: if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 3: if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case -4: if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; case 4: if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } } break; } } #endif if ((sizeof(char) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { char val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (char) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (char) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (char) -1; } else { stepval = v; } v = NULL; val = (char) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((char) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((char) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (char) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to char"); return (char) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to char"); return (char) -1; } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name_2); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__32); } return name; } #endif /* CheckBinaryVersion */ static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612187.6831279 pygame-2.6.1/src_c/_sdl2/sdl2.c0000644000175100001770000114100714676242434015533 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sdl2.sdl2", "sources": [ "src_c/cython/pygame/_sdl2/sdl2.pyx" ] }, "module_name": "pygame._sdl2.sdl2" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sdl2__sdl2 #define __PYX_HAVE_API__pygame___sdl2__sdl2 /* Early includes */ #include #include #include "SDL.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/_sdl2/sdl2.pyx", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* Py3UpdateBases.proto */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); #else #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntFromPy.proto */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sdl2.sdl2" extern int __pyx_module_is_main_pygame___sdl2__sdl2; int __pyx_module_is_main_pygame___sdl2__sdl2 = 0; /* Implementation of "pygame._sdl2.sdl2" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_RuntimeError; /* #### Code section: string_decls ### */ static const char __pyx_k__8[] = "?"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_super[] = "super"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_message[] = "message"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_set_name[] = "__set_name__"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_INIT_AUDIO[] = "INIT_AUDIO"; static const char __pyx_k_INIT_TIMER[] = "INIT_TIMER"; static const char __pyx_k_INIT_VIDEO[] = "INIT_VIDEO"; static const char __pyx_k_INIT_EVENTS[] = "INIT_EVENTS"; static const char __pyx_k_INIT_HAPTIC[] = "INIT_HAPTIC"; static const char __pyx_k_mro_entries[] = "__mro_entries__"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_error___init[] = "error.__init__"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_INIT_JOYSTICK[] = "INIT_JOYSTICK"; static const char __pyx_k_init_subclass[] = "__init_subclass__"; static const char __pyx_k_init_subsystem[] = "init_subsystem"; static const char __pyx_k_INIT_EVERYTHING[] = "INIT_EVERYTHING"; static const char __pyx_k_INIT_NOPARACHUTE[] = "INIT_NOPARACHUTE"; static const char __pyx_k_pygame__sdl2_sdl2[] = "pygame._sdl2.sdl2"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_INIT_GAMECONTROLLER[] = "INIT_GAMECONTROLLER"; static const char __pyx_k_src_c_cython_pygame__sdl2_sdl2_p[] = "src_c/cython/pygame/_sdl2/sdl2.pyx"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_5error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_init_subsystem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyObject *__pyx_n_s_INIT_AUDIO; PyObject *__pyx_n_s_INIT_EVENTS; PyObject *__pyx_n_s_INIT_EVERYTHING; PyObject *__pyx_n_s_INIT_GAMECONTROLLER; PyObject *__pyx_n_s_INIT_HAPTIC; PyObject *__pyx_n_s_INIT_JOYSTICK; PyObject *__pyx_n_s_INIT_NOPARACHUTE; PyObject *__pyx_n_s_INIT_TIMER; PyObject *__pyx_n_s_INIT_VIDEO; PyObject *__pyx_n_s_RuntimeError; PyObject *__pyx_n_s__8; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_dict; PyObject *__pyx_n_s_doc; PyObject *__pyx_n_s_error; PyObject *__pyx_n_s_error___init; PyObject *__pyx_n_s_flags; PyObject *__pyx_n_s_init; PyObject *__pyx_n_s_init_subclass; PyObject *__pyx_n_s_init_subsystem; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_message; PyObject *__pyx_n_s_metaclass; PyObject *__pyx_n_s_module; PyObject *__pyx_n_s_mro_entries; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_prepare; PyObject *__pyx_n_s_pygame__sdl2_sdl2; PyObject *__pyx_n_s_qualname; PyObject *__pyx_n_s_self; PyObject *__pyx_n_s_set_name; PyObject *__pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p; PyObject *__pyx_n_s_super; PyObject *__pyx_n_s_test; PyObject *__pyx_tuple_; PyObject *__pyx_tuple__2; PyObject *__pyx_tuple__3; PyObject *__pyx_tuple__5; PyObject *__pyx_tuple__6; PyObject *__pyx_codeobj__4; PyObject *__pyx_codeobj__7; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_n_s_INIT_AUDIO); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_EVENTS); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_EVERYTHING); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_GAMECONTROLLER); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_HAPTIC); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_JOYSTICK); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_NOPARACHUTE); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_TIMER); Py_CLEAR(clear_module_state->__pyx_n_s_INIT_VIDEO); Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError); Py_CLEAR(clear_module_state->__pyx_n_s__8); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_n_s_doc); Py_CLEAR(clear_module_state->__pyx_n_s_error); Py_CLEAR(clear_module_state->__pyx_n_s_error___init); Py_CLEAR(clear_module_state->__pyx_n_s_flags); Py_CLEAR(clear_module_state->__pyx_n_s_init); Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass); Py_CLEAR(clear_module_state->__pyx_n_s_init_subsystem); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_message); Py_CLEAR(clear_module_state->__pyx_n_s_metaclass); Py_CLEAR(clear_module_state->__pyx_n_s_module); Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_prepare); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_CLEAR(clear_module_state->__pyx_n_s_qualname); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_n_s_set_name); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p); Py_CLEAR(clear_module_state->__pyx_n_s_super); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_tuple_); Py_CLEAR(clear_module_state->__pyx_tuple__2); Py_CLEAR(clear_module_state->__pyx_tuple__3); Py_CLEAR(clear_module_state->__pyx_tuple__5); Py_CLEAR(clear_module_state->__pyx_tuple__6); Py_CLEAR(clear_module_state->__pyx_codeobj__4); Py_CLEAR(clear_module_state->__pyx_codeobj__7); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_n_s_INIT_AUDIO); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_EVENTS); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_EVERYTHING); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_GAMECONTROLLER); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_HAPTIC); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_JOYSTICK); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_NOPARACHUTE); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_TIMER); Py_VISIT(traverse_module_state->__pyx_n_s_INIT_VIDEO); Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError); Py_VISIT(traverse_module_state->__pyx_n_s__8); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_n_s_doc); Py_VISIT(traverse_module_state->__pyx_n_s_error); Py_VISIT(traverse_module_state->__pyx_n_s_error___init); Py_VISIT(traverse_module_state->__pyx_n_s_flags); Py_VISIT(traverse_module_state->__pyx_n_s_init); Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass); Py_VISIT(traverse_module_state->__pyx_n_s_init_subsystem); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_message); Py_VISIT(traverse_module_state->__pyx_n_s_metaclass); Py_VISIT(traverse_module_state->__pyx_n_s_module); Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_prepare); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_VISIT(traverse_module_state->__pyx_n_s_qualname); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_n_s_set_name); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p); Py_VISIT(traverse_module_state->__pyx_n_s_super); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_tuple_); Py_VISIT(traverse_module_state->__pyx_tuple__2); Py_VISIT(traverse_module_state->__pyx_tuple__3); Py_VISIT(traverse_module_state->__pyx_tuple__5); Py_VISIT(traverse_module_state->__pyx_tuple__6); Py_VISIT(traverse_module_state->__pyx_codeobj__4); Py_VISIT(traverse_module_state->__pyx_codeobj__7); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_n_s_INIT_AUDIO __pyx_mstate_global->__pyx_n_s_INIT_AUDIO #define __pyx_n_s_INIT_EVENTS __pyx_mstate_global->__pyx_n_s_INIT_EVENTS #define __pyx_n_s_INIT_EVERYTHING __pyx_mstate_global->__pyx_n_s_INIT_EVERYTHING #define __pyx_n_s_INIT_GAMECONTROLLER __pyx_mstate_global->__pyx_n_s_INIT_GAMECONTROLLER #define __pyx_n_s_INIT_HAPTIC __pyx_mstate_global->__pyx_n_s_INIT_HAPTIC #define __pyx_n_s_INIT_JOYSTICK __pyx_mstate_global->__pyx_n_s_INIT_JOYSTICK #define __pyx_n_s_INIT_NOPARACHUTE __pyx_mstate_global->__pyx_n_s_INIT_NOPARACHUTE #define __pyx_n_s_INIT_TIMER __pyx_mstate_global->__pyx_n_s_INIT_TIMER #define __pyx_n_s_INIT_VIDEO __pyx_mstate_global->__pyx_n_s_INIT_VIDEO #define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError #define __pyx_n_s__8 __pyx_mstate_global->__pyx_n_s__8 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error #define __pyx_n_s_error___init __pyx_mstate_global->__pyx_n_s_error___init #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass #define __pyx_n_s_init_subsystem __pyx_mstate_global->__pyx_n_s_init_subsystem #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare #define __pyx_n_s_pygame__sdl2_sdl2 __pyx_mstate_global->__pyx_n_s_pygame__sdl2_sdl2 #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name #define __pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ #define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2 #define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3 #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5 #define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 #define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4 #define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7 /* #### Code section: module_code ### */ /* "pygame/_sdl2/sdl2.pyx":6 * # pygame.error * class error(RuntimeError): * def __init__(self, message=None): # <<<<<<<<<<<<<< * if message is None: * message = SDL_GetError().decode('utf8') */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_4sdl2_5error_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_4sdl2_5error_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_4sdl2_5error_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_4sdl2_5error_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_message = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 6, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_message = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 6, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.sdl2.error.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_4sdl2_5error___init__(__pyx_self, __pyx_v_self, __pyx_v_message); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_5error___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; char const *__pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_message); /* "pygame/_sdl2/sdl2.pyx":7 * class error(RuntimeError): * def __init__(self, message=None): * if message is None: # <<<<<<<<<<<<<< * message = SDL_GetError().decode('utf8') * RuntimeError.__init__(self, message) */ __pyx_t_1 = (__pyx_v_message == Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/sdl2.pyx":8 * def __init__(self, message=None): * if message is None: * message = SDL_GetError().decode('utf8') # <<<<<<<<<<<<<< * RuntimeError.__init__(self, message) * */ __pyx_t_2 = SDL_GetError(); __pyx_t_3 = __Pyx_ssize_strlen(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8, __pyx_L1_error) __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_2, 0, __pyx_t_3, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/sdl2.pyx":7 * class error(RuntimeError): * def __init__(self, message=None): * if message is None: # <<<<<<<<<<<<<< * message = SDL_GetError().decode('utf8') * RuntimeError.__init__(self, message) */ } /* "pygame/_sdl2/sdl2.pyx":9 * if message is None: * message = SDL_GetError().decode('utf8') * RuntimeError.__init__(self, message) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_RuntimeError, __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_message}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/sdl2.pyx":6 * # pygame.error * class error(RuntimeError): * def __init__(self, message=None): # <<<<<<<<<<<<<< * if message is None: * message = SDL_GetError().decode('utf8') */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.sdl2.error.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/sdl2.pyx":31 * * # https://wiki.libsdl.org/SDL_InitSubSystem * def init_subsystem(flags): # <<<<<<<<<<<<<< * """ Use this function to initialize specific subsystems. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_4sdl2_1init_subsystem(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_4sdl2_init_subsystem, " Use this function to initialize specific subsystems.\n\n :param int flags: any of the flags used by.\n\n * INIT_TIMER timer subsystem\n * INIT_AUDIO audio subsystem\n * INIT_VIDEO video subsystem; automatically initializes the events subsystem\n * INIT_JOYSTICK joystick subsystem; automatically initializes the events subsystem\n * INIT_HAPTIC haptic (force feedback) subsystem\n * INIT_GAMECONTROLLER controller subsystem; automatically initializes the joystick subsystem\n * INIT_EVENTS events subsystem\n * INIT_EVERYTHING all of the above subsystems\n * INIT_NOPARACHUTE compatibility; this flag is ignored\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_4sdl2_1init_subsystem = {"init_subsystem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_4sdl2_1init_subsystem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_4sdl2_init_subsystem}; static PyObject *__pyx_pw_6pygame_5_sdl2_4sdl2_1init_subsystem(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_flags = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init_subsystem (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "init_subsystem") < 0)) __PYX_ERR(0, 31, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_flags = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("init_subsystem", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 31, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.sdl2.init_subsystem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_4sdl2_init_subsystem(__pyx_self, __pyx_v_flags); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_init_subsystem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Uint32 __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_subsystem", 1); /* "pygame/_sdl2/sdl2.pyx":46 * * INIT_NOPARACHUTE compatibility; this flag is ignored * """ * if (SDL_InitSubSystem(flags) == -1): # <<<<<<<<<<<<<< * raise error() */ __pyx_t_1 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_1 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error) __pyx_t_2 = (SDL_InitSubSystem(__pyx_t_1) == -1L); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/sdl2.pyx":47 * """ * if (SDL_InitSubSystem(flags) == -1): * raise error() # <<<<<<<<<<<<<< */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 47, __pyx_L1_error) /* "pygame/_sdl2/sdl2.pyx":46 * * INIT_NOPARACHUTE compatibility; this flag is ignored * """ * if (SDL_InitSubSystem(flags) == -1): # <<<<<<<<<<<<<< * raise error() */ } /* "pygame/_sdl2/sdl2.pyx":31 * * # https://wiki.libsdl.org/SDL_InitSubSystem * def init_subsystem(flags): # <<<<<<<<<<<<<< * """ Use this function to initialize specific subsystems. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.sdl2.init_subsystem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_INIT_AUDIO, __pyx_k_INIT_AUDIO, sizeof(__pyx_k_INIT_AUDIO), 0, 0, 1, 1}, {&__pyx_n_s_INIT_EVENTS, __pyx_k_INIT_EVENTS, sizeof(__pyx_k_INIT_EVENTS), 0, 0, 1, 1}, {&__pyx_n_s_INIT_EVERYTHING, __pyx_k_INIT_EVERYTHING, sizeof(__pyx_k_INIT_EVERYTHING), 0, 0, 1, 1}, {&__pyx_n_s_INIT_GAMECONTROLLER, __pyx_k_INIT_GAMECONTROLLER, sizeof(__pyx_k_INIT_GAMECONTROLLER), 0, 0, 1, 1}, {&__pyx_n_s_INIT_HAPTIC, __pyx_k_INIT_HAPTIC, sizeof(__pyx_k_INIT_HAPTIC), 0, 0, 1, 1}, {&__pyx_n_s_INIT_JOYSTICK, __pyx_k_INIT_JOYSTICK, sizeof(__pyx_k_INIT_JOYSTICK), 0, 0, 1, 1}, {&__pyx_n_s_INIT_NOPARACHUTE, __pyx_k_INIT_NOPARACHUTE, sizeof(__pyx_k_INIT_NOPARACHUTE), 0, 0, 1, 1}, {&__pyx_n_s_INIT_TIMER, __pyx_k_INIT_TIMER, sizeof(__pyx_k_INIT_TIMER), 0, 0, 1, 1}, {&__pyx_n_s_INIT_VIDEO, __pyx_k_INIT_VIDEO, sizeof(__pyx_k_INIT_VIDEO), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_error___init, __pyx_k_error___init, sizeof(__pyx_k_error___init), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1}, {&__pyx_n_s_init_subsystem, __pyx_k_init_subsystem, sizeof(__pyx_k_init_subsystem), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_sdl2, __pyx_k_pygame__sdl2_sdl2, sizeof(__pyx_k_pygame__sdl2_sdl2), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p, __pyx_k_src_c_cython_pygame__sdl2_sdl2_p, sizeof(__pyx_k_src_c_cython_pygame__sdl2_sdl2_p), 0, 0, 1, 0}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 5, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pygame/_sdl2/sdl2.pyx":5 * * # pygame.error * class error(RuntimeError): # <<<<<<<<<<<<<< * def __init__(self, message=None): * if message is None: */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); __pyx_tuple__2 = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pygame/_sdl2/sdl2.pyx":6 * # pygame.error * class error(RuntimeError): * def __init__(self, message=None): # <<<<<<<<<<<<<< * if message is None: * message = SDL_GetError().decode('utf8') */ __pyx_tuple__3 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p, __pyx_n_s_init, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 6, __pyx_L1_error) __pyx_tuple__5 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pygame/_sdl2/sdl2.pyx":31 * * # https://wiki.libsdl.org/SDL_InitSubSystem * def init_subsystem(flags): # <<<<<<<<<<<<<< * """ Use this function to initialize specific subsystems. * */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_flags); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_sdl2_p, __pyx_n_s_init_subsystem, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { return 0; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_sdl2(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_sdl2}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "sdl2", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initsdl2(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initsdl2(void) #else __Pyx_PyMODINIT_FUNC PyInit_sdl2(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_sdl2(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_sdl2(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'sdl2' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("sdl2", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "sdl2" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_sdl2(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sdl2__sdl2) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sdl2.sdl2")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sdl2.sdl2", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); (void)__Pyx_modinit_type_init_code(); (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pygame/_sdl2/sdl2.pyx":5 * * # pygame.error * class error(RuntimeError): # <<<<<<<<<<<<<< * def __init__(self, message=None): * if message is None: */ __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_tuple__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_error, __pyx_n_s_error, (PyObject *) NULL, __pyx_n_s_pygame__sdl2_sdl2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2 != __pyx_tuple__2) { if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__2) < 0))) __PYX_ERR(0, 5, __pyx_L1_error) } /* "pygame/_sdl2/sdl2.pyx":6 * # pygame.error * class error(RuntimeError): * def __init__(self, message=None): # <<<<<<<<<<<<<< * if message is None: * message = SDL_GetError().decode('utf8') */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_4sdl2_5error_1__init__, 0, __pyx_n_s_error___init, NULL, __pyx_n_s_pygame__sdl2_sdl2, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__5); if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/sdl2.pyx":5 * * # pygame.error * class error(RuntimeError): # <<<<<<<<<<<<<< * def __init__(self, message=None): * if message is None: */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_error, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":15 * * # for init_subsystem. Expose variables to python. * INIT_TIMER = _SDL_INIT_TIMER # <<<<<<<<<<<<<< * INIT_AUDIO = _SDL_INIT_AUDIO * INIT_VIDEO = _SDL_INIT_VIDEO */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_TIMER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_TIMER, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":16 * # for init_subsystem. Expose variables to python. * INIT_TIMER = _SDL_INIT_TIMER * INIT_AUDIO = _SDL_INIT_AUDIO # <<<<<<<<<<<<<< * INIT_VIDEO = _SDL_INIT_VIDEO * INIT_JOYSTICK = _SDL_INIT_JOYSTICK */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_AUDIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_AUDIO, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":17 * INIT_TIMER = _SDL_INIT_TIMER * INIT_AUDIO = _SDL_INIT_AUDIO * INIT_VIDEO = _SDL_INIT_VIDEO # <<<<<<<<<<<<<< * INIT_JOYSTICK = _SDL_INIT_JOYSTICK * INIT_HAPTIC = _SDL_INIT_HAPTIC */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_VIDEO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_VIDEO, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":18 * INIT_AUDIO = _SDL_INIT_AUDIO * INIT_VIDEO = _SDL_INIT_VIDEO * INIT_JOYSTICK = _SDL_INIT_JOYSTICK # <<<<<<<<<<<<<< * INIT_HAPTIC = _SDL_INIT_HAPTIC * INIT_GAMECONTROLLER = _SDL_INIT_GAMECONTROLLER */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_JOYSTICK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_JOYSTICK, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":19 * INIT_VIDEO = _SDL_INIT_VIDEO * INIT_JOYSTICK = _SDL_INIT_JOYSTICK * INIT_HAPTIC = _SDL_INIT_HAPTIC # <<<<<<<<<<<<<< * INIT_GAMECONTROLLER = _SDL_INIT_GAMECONTROLLER * INIT_EVENTS = _SDL_INIT_EVENTS */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_HAPTIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_HAPTIC, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":20 * INIT_JOYSTICK = _SDL_INIT_JOYSTICK * INIT_HAPTIC = _SDL_INIT_HAPTIC * INIT_GAMECONTROLLER = _SDL_INIT_GAMECONTROLLER # <<<<<<<<<<<<<< * INIT_EVENTS = _SDL_INIT_EVENTS * # INIT_SENSOR = _SDL_INIT_SENSOR */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_GAMECONTROLLER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_GAMECONTROLLER, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":21 * INIT_HAPTIC = _SDL_INIT_HAPTIC * INIT_GAMECONTROLLER = _SDL_INIT_GAMECONTROLLER * INIT_EVENTS = _SDL_INIT_EVENTS # <<<<<<<<<<<<<< * # INIT_SENSOR = _SDL_INIT_SENSOR * INIT_NOPARACHUTE = _SDL_INIT_NOPARACHUTE */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_EVENTS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_EVENTS, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":23 * INIT_EVENTS = _SDL_INIT_EVENTS * # INIT_SENSOR = _SDL_INIT_SENSOR * INIT_NOPARACHUTE = _SDL_INIT_NOPARACHUTE # <<<<<<<<<<<<<< * INIT_EVERYTHING = _SDL_INIT_EVERYTHING * */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_NOPARACHUTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_NOPARACHUTE, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":24 * # INIT_SENSOR = _SDL_INIT_SENSOR * INIT_NOPARACHUTE = _SDL_INIT_NOPARACHUTE * INIT_EVERYTHING = _SDL_INIT_EVERYTHING # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_INIT_EVERYTHING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_EVERYTHING, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":31 * * # https://wiki.libsdl.org/SDL_InitSubSystem * def init_subsystem(flags): # <<<<<<<<<<<<<< * """ Use this function to initialize specific subsystems. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_4sdl2_1init_subsystem, 0, __pyx_n_s_init_subsystem, NULL, __pyx_n_s_pygame__sdl2_sdl2, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_subsystem, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/sdl2.pyx":1 * # cython: language_level=2 # <<<<<<<<<<<<<< * # * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sdl2.sdl2", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sdl2.sdl2"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* Py3UpdateBases */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases) { Py_ssize_t i, j, size_bases; PyObject *base, *meth, *new_base, *result, *new_bases = NULL; size_bases = PyTuple_GET_SIZE(bases); for (i = 0; i < size_bases; i++) { base = PyTuple_GET_ITEM(bases, i); if (PyType_Check(base)) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries); if (!meth && PyErr_Occurred()) { goto error; } if (!meth) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } new_base = __Pyx_PyObject_CallOneArg(meth, bases); Py_DECREF(meth); if (!new_base) { goto error; } if (!PyTuple_Check(new_base)) { PyErr_SetString(PyExc_TypeError, "__mro_entries__ must return a tuple"); Py_DECREF(new_base); goto error; } if (!new_bases) { if (!(new_bases = PyList_New(i))) { goto error; } for (j = 0; j < i; j++) { base = PyTuple_GET_ITEM(bases, j); PyList_SET_ITEM(new_bases, j, base); Py_INCREF(base); } } j = PyList_GET_SIZE(new_bases); if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { goto error; } Py_DECREF(new_base); } if (!new_bases) { Py_INCREF(bases); return bases; } result = PyList_AsTuple(new_bases); Py_DECREF(new_bases); return result; error: Py_XDECREF(new_bases); return NULL; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases; #if CYTHON_ASSUME_SAFE_MACROS nbases = PyTuple_GET_SIZE(bases); #else nbases = PyTuple_Size(bases); if (nbases < 0) return NULL; #endif for (i=0; i < nbases; i++) { PyTypeObject *tmptype; #if CYTHON_ASSUME_SAFE_MACROS PyObject *tmp = PyTuple_GET_ITEM(bases, i); #else PyObject *tmp = PyTuple_GetItem(bases, i); if (!tmp) return NULL; #endif tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectLookupSpecial */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else if (with_error) { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #endif /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs[3] = {NULL, name, bases}; ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_DECREF(prep); } else { if (unlikely(PyErr_Occurred())) return NULL; ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; #if PY_VERSION_HEX >= 0x03030000 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; #else CYTHON_MAYBE_UNUSED_VAR(qualname); #endif if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS static int __Pyx_SetNamesPEP487(PyObject *type_obj) { PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *names_to_set, *key, *value, *set_name, *tmp; Py_ssize_t i = 0; #if CYTHON_USE_TYPE_SLOTS names_to_set = PyDict_Copy(type->tp_dict); #else { PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict); names_to_set = NULL; if (likely(d)) { PyObject *names_to_set = PyDict_New(); int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1; Py_DECREF(d); if (unlikely(ret < 0)) Py_CLEAR(names_to_set); } } #endif if (unlikely(names_to_set == NULL)) goto bad; while (PyDict_Next(names_to_set, &i, &key, &value)) { set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name); if (unlikely(set_name != NULL)) { tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key); Py_DECREF(set_name); if (unlikely(tmp == NULL)) { __Pyx_TypeName value_type_name = __Pyx_PyType_GetName(Py_TYPE(value)); __Pyx_TypeName type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_RuntimeError, #if PY_MAJOR_VERSION >= 3 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'", value_type_name, key, type_name); #else "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'", value_type_name, PyString_Check(key) ? PyString_AS_STRING(key) : "?", type_name); #endif goto bad; } else { Py_DECREF(tmp); } } else if (unlikely(PyErr_Occurred())) { goto bad; } } Py_DECREF(names_to_set); return 0; bad: Py_XDECREF(names_to_set); return -1; } static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) { #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *mro = type->tp_mro; Py_ssize_t i, nbases; if (unlikely(!mro)) goto done; (void) &__Pyx_GetBuiltinName; Py_INCREF(mro); nbases = PyTuple_GET_SIZE(mro); assert(PyTuple_GET_ITEM(mro, 0) == type_obj); for (i = 1; i < nbases-1; i++) { PyObject *base, *dict, *meth; base = PyTuple_GET_ITEM(mro, i); dict = ((PyTypeObject *)base)->tp_dict; meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass); if (unlikely(meth)) { descrgetfunc f = Py_TYPE(meth)->tp_descr_get; PyObject *res; Py_INCREF(meth); if (likely(f)) { res = f(meth, NULL, type_obj); Py_DECREF(meth); if (unlikely(!res)) goto bad; meth = res; } res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw); Py_DECREF(meth); if (unlikely(!res)) goto bad; Py_DECREF(res); goto done; } else if (unlikely(PyErr_Occurred())) { goto bad; } } done: Py_XDECREF(mro); return type_obj; bad: Py_XDECREF(mro); Py_DECREF(type_obj); return NULL; #else PyObject *super_type, *super, *func, *res; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) super_type = __Pyx_GetBuiltinName(__pyx_n_s_super); #else super_type = (PyObject*) &PySuper_Type; (void) &__Pyx_GetBuiltinName; #endif super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) Py_XDECREF(super_type); #endif if (unlikely(!super)) { Py_CLEAR(type_obj); goto done; } func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass); Py_DECREF(super); if (likely(!func)) { if (unlikely(PyErr_Occurred())) Py_CLEAR(type_obj); goto done; } res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw); Py_DECREF(func); if (unlikely(!res)) Py_CLEAR(type_obj); Py_XDECREF(res); done: return type_obj; #endif } #endif static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result; PyObject *owned_metaclass = NULL; PyObject *margs[4] = {NULL, name, bases, dict}; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, #if PY_VERSION_HEX < 0x030600A4 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw #else mkw #endif ); Py_XDECREF(owned_metaclass); #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS if (likely(result) && likely(PyType_Check(result))) { if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) { Py_CLEAR(result); } else { result = __Pyx_InitSubclassPEP487(result, mkw); } } #else (void) &__Pyx_GetBuiltinName; #endif return result; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint32) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint32, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint32) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint32 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint32) -1; val = __Pyx_PyInt_As_Uint32(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 2 * PyLong_SHIFT)) { return (Uint32) (((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 3 * PyLong_SHIFT)) { return (Uint32) (((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 4 * PyLong_SHIFT)) { return (Uint32) (((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint32) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint32) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint32) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) ((((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) ((((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) ((((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; } } #endif if ((sizeof(Uint32) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint32 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint32) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint32) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint32) -1; } else { stepval = v; } v = NULL; val = (Uint32) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint32) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint32) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint32) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint32) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint32) 1) << (sizeof(Uint32) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint32) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint32"); return (Uint32) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint32"); return (Uint32) -1; } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__8); } return name; } #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_sdl2/touch.c0000644000175100001770000001064114676242340016003 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2019 David Lönnhager This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "../pygame.h" #include "../pgcompat.h" #include "../doc/touch_doc.h" static PyObject * pg_touch_num_devices(PyObject *self, PyObject *_null) { return PyLong_FromLong(SDL_GetNumTouchDevices()); } static PyObject * pg_touch_get_device(PyObject *self, PyObject *index) { SDL_TouchID touchid; if (!PyLong_Check(index)) { return RAISE(PyExc_TypeError, "index must be an integer " "specifying a device to get the ID for"); } touchid = SDL_GetTouchDevice(PyLong_AsLong(index)); if (touchid == 0) { /* invalid index */ return RAISE(pgExc_SDLError, SDL_GetError()); } return PyLong_FromLongLong(touchid); } static PyObject * pg_touch_num_fingers(PyObject *self, PyObject *device_id) { int fingercount; if (!PyLong_Check(device_id)) { return RAISE(PyExc_TypeError, "device_id must be an integer " "specifying a touch device"); } VIDEO_INIT_CHECK(); fingercount = SDL_GetNumTouchFingers(PyLong_AsLongLong(device_id)); if (fingercount == 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } return PyLong_FromLong(fingercount); } #if !defined(BUILD_STATIC) /* Helper for adding objects to dictionaries. Check for errors with PyErr_Occurred() */ static void _pg_insobj(PyObject *dict, char *name, PyObject *v) { if (v) { PyDict_SetItemString(dict, name, v); Py_DECREF(v); } } #else extern void _pg_insobj(PyObject *dict, char *name, PyObject *v); #endif static PyObject * pg_touch_get_finger(PyObject *self, PyObject *args, PyObject *kwargs) { char *keywords[] = {"touchid", "index", NULL}; SDL_TouchID touchid; int index; SDL_Finger *finger; PyObject *fingerobj; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Li", keywords, &touchid, &index)) { return NULL; } VIDEO_INIT_CHECK(); if (!(finger = SDL_GetTouchFinger(touchid, index))) { Py_RETURN_NONE; } fingerobj = PyDict_New(); if (!fingerobj) return NULL; _pg_insobj(fingerobj, "id", PyLong_FromLongLong(finger->id)); _pg_insobj(fingerobj, "x", PyFloat_FromDouble(finger->x)); _pg_insobj(fingerobj, "y", PyFloat_FromDouble(finger->y)); _pg_insobj(fingerobj, "pressure", PyFloat_FromDouble(finger->pressure)); if (PyErr_Occurred()) { Py_DECREF(fingerobj); return NULL; } return fingerobj; } static PyMethodDef _touch_methods[] = { {"get_num_devices", pg_touch_num_devices, METH_NOARGS, DOC_PYGAMESDL2TOUCHGETNUMDEVICES}, {"get_device", pg_touch_get_device, METH_O, DOC_PYGAMESDL2TOUCHGETDEVICE}, {"get_num_fingers", pg_touch_num_fingers, METH_O, DOC_PYGAMESDL2TOUCHGETNUMFINGERS}, {"get_finger", (PyCFunction)pg_touch_get_finger, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMESDL2TOUCHGETFINGER}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(touch) { PyObject *module; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "touch", DOC_PYGAMESDL2TOUCH, -1, _touch_methods, NULL, NULL, NULL, NULL}; import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612188.7381272 pygame-2.6.1/src_c/_sdl2/video.c0000644000175100001770000576725014676242435016020 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sdl2.video", "sources": [ "src_c/cython/pygame/_sdl2/video.pyx" ] }, "module_name": "pygame._sdl2.video" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) #else #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) #endif #if PY_MAJOR_VERSION <= 2 #define PyDict_GetItemWithError _PyDict_GetItemWithError #endif #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get) #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) #endif #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sdl2__video #define __PYX_HAVE_API__pygame___sdl2__video /* Early includes */ #include #include #include "SDL.h" #include "pygame.h" #include #include "pythread.h" #include #include "pgcompat.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/_sdl2/video.pyx", "contextvars.pxd", "", "src_c/cython/pygame/_sdl2/video.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_5_sdl2_5video_Window; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer; struct __pyx_obj_6pygame_5_sdl2_5video_Texture; struct __pyx_obj_6pygame_5_sdl2_5video_Image; struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers; struct __pyx_opt_args_7cpython_11contextvars_get_value; struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ struct __pyx_opt_args_7cpython_11contextvars_get_value { int __pyx_n; PyObject *default_value; }; /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { int __pyx_n; PyObject *default_value; }; struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw; struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw; /* "pygame/_sdl2/video.pxd":421 * * cpdef object get_viewport(self) * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) # <<<<<<<<<<<<<< * * cdef class Texture: */ struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit { int __pyx_n; pgRectObject *dest; pgRectObject *area; int special_flags; }; /* "pygame/_sdl2/video.pxd":430 * cdef readonly int height * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, # <<<<<<<<<<<<<< * bint flip_x=*, bint flip_y=*) * cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, */ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal { int __pyx_n; float angle; SDL_Point *originptr; int flip_x; int flip_y; }; /* "pygame/_sdl2/video.pxd":432 * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, * bint flip_x=*, bint flip_y=*) * cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, # <<<<<<<<<<<<<< * bint flip_x=*, bint flip_y=*) noexcept * */ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw { int __pyx_n; PyObject *srcrect; PyObject *dstrect; float angle; PyObject *origin; int flip_x; int flip_y; }; /* "pygame/_sdl2/video.pxd":448 * cdef public Rect srcrect * * cpdef void draw(self, srcrect=*, dstrect=*) noexcept # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw { int __pyx_n; PyObject *srcrect; PyObject *dstrect; }; /* "pygame/_sdl2/video.pxd":409 * * * cdef class Window: # <<<<<<<<<<<<<< * cdef SDL_Window* _win * cdef int _is_borrowed */ struct __pyx_obj_6pygame_5_sdl2_5video_Window { PyObject_HEAD SDL_Window *_win; int _is_borrowed; }; /* "pygame/_sdl2/video.pxd":413 * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer * cdef Color _draw_color */ struct __pyx_obj_6pygame_5_sdl2_5video_Renderer { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtab; SDL_Renderer *_renderer; pgColorObject *_draw_color; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *_target; struct __pyx_obj_6pygame_5_sdl2_5video_Window *_win; int _is_borrowed; }; /* "pygame/_sdl2/video.pxd":423 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< * cdef SDL_Texture* _tex * cdef Color _color */ struct __pyx_obj_6pygame_5_sdl2_5video_Texture { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtab; SDL_Texture *_tex; pgColorObject *_color; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *renderer; int width; int height; }; /* "pygame/_sdl2/video.pxd":435 * bint flip_x=*, bint flip_y=*) noexcept * * cdef class Image: # <<<<<<<<<<<<<< * cdef Color _color * cdef public float angle */ struct __pyx_obj_6pygame_5_sdl2_5video_Image { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtab; pgColorObject *_color; float angle; SDL_Point _origin; SDL_Point *_originptr; int flip_x; int flip_y; float alpha; SDL_BlendMode blend_mode; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *texture; pgRectObject *srcrect; }; /* "pygame/_sdl2/video.pyx":83 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * cdef int num = SDL_GetNumRenderDrivers() * cdef SDL_RendererInfo info */ struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers { PyObject_HEAD int __pyx_v_ind; SDL_RendererInfo __pyx_v_info; int __pyx_v_num; PyObject *__pyx_v_ret; int __pyx_t_0; }; /* "pygame/_sdl2/video.pyx":963 * * * cdef class Renderer: # <<<<<<<<<<<<<< * * @classmethod */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer { PyObject *(*get_viewport)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, int __pyx_skip_dispatch); PyObject *(*blit)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer; /* "pygame/_sdl2/video.pyx":562 * * * cdef class Texture: # <<<<<<<<<<<<<< * def __cinit__(self): * cdef Uint8[4] defaultColor = [255, 255, 255, 255] */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture { PyObject *(*draw_internal)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, SDL_Rect *, SDL_Rect *, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal *__pyx_optional_args); void (*draw)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtabptr_6pygame_5_sdl2_5video_Texture; /* "pygame/_sdl2/video.pyx":836 * raise error() * * cdef class Image: # <<<<<<<<<<<<<< * * def __cinit__(self): */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image { void (*draw)(struct __pyx_obj_6pygame_5_sdl2_5video_Image *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtabptr_6pygame_5_sdl2_5video_Image; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* pep479.proto */ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* tp_new.proto */ #define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL) static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) { return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs)); } /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* PyObject_Str.proto */ #define __Pyx_PyObject_Str(obj)\ (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ (likely(is_tuple || PyTuple_Check(tuple)) ?\ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* SliceObject.proto */ #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 #define __PYX_HAVE_RT_ImportType_proto_3_0_11 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) #else #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) #endif enum __Pyx_ImportType_CheckSize_3_0_11 { __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 }; static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); #endif /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* SetVTable.proto */ static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); /* GetVTable.proto */ static void* __Pyx_GetVtable(PyTypeObject *type); /* MergeVTables.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type); #endif /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* ImportDottedModule.proto */ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); #endif /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); #else #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* ClassMethod.proto */ #include "descrobject.h" CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint32(Uint32 value); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_bool(SDL_bool value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_BlendMode(SDL_BlendMode value); /* CIntFromPy.proto */ static CYTHON_INLINE SDL_BlendMode __Pyx_PyInt_As_SDL_BlendMode(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SDL_BlendFactor __Pyx_PyInt_As_SDL_BlendFactor(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SDL_BlendOperation __Pyx_PyInt_As_SDL_BlendOperation(PyObject *); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* CoroutineBase.proto */ struct __pyx_CoroutineObject; typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_ExcInfoStruct _PyErr_StackItem #else typedef struct { PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; } __Pyx_ExcInfoStruct; #endif typedef struct __pyx_CoroutineObject { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; __Pyx_ExcInfoStruct gi_exc_state; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; PyObject *gi_frame; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_Coroutine_SwapException(self) #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) #else #define __Pyx_Coroutine_SwapException(self) {\ __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } #endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /* PatchModuleWithCoroutine.proto */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); /* PatchGeneratorABC.proto */ static int __Pyx_patch_abc(void); /* Generator.proto */ #define __Pyx_Generator_USED #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType) #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(PyObject *module); /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, SDL_Rect *__pyx_v_csrcrect, SDL_Rect *__pyx_v_cdstrect, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal *__pyx_optional_args); /* proto*/ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw *__pyx_optional_args); /* proto*/ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit *__pyx_optional_args); /* proto*/ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* Module declarations from "pygame" */ /* Module declarations from "cpython.version" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.type" */ /* Module declarations from "cpython.object" */ /* Module declarations from "cpython.ref" */ /* Module declarations from "cpython.exc" */ /* Module declarations from "cpython.module" */ /* Module declarations from "cpython.mem" */ /* Module declarations from "cpython.tuple" */ /* Module declarations from "cpython.list" */ /* Module declarations from "cpython.sequence" */ /* Module declarations from "cpython.mapping" */ /* Module declarations from "cpython.iterator" */ /* Module declarations from "cpython.number" */ /* Module declarations from "cpython.int" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.bool" */ /* Module declarations from "cpython.long" */ /* Module declarations from "cpython.float" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.complex" */ /* Module declarations from "cpython.string" */ /* Module declarations from "libc.stddef" */ /* Module declarations from "cpython.unicode" */ /* Module declarations from "cpython.pyport" */ /* Module declarations from "cpython.dict" */ /* Module declarations from "cpython.instance" */ /* Module declarations from "cpython.function" */ /* Module declarations from "cpython.method" */ /* Module declarations from "cpython.weakref" */ /* Module declarations from "cpython.getargs" */ /* Module declarations from "cpython.pythread" */ /* Module declarations from "cpython.pystate" */ /* Module declarations from "cpython.cobject" */ /* Module declarations from "cpython.oldbuffer" */ /* Module declarations from "cpython.set" */ /* Module declarations from "cpython.buffer" */ /* Module declarations from "cpython.bytes" */ /* Module declarations from "cpython.pycapsule" */ /* Module declarations from "cpython.contextvars" */ /* Module declarations from "cpython" */ /* Module declarations from "libc.stdlib" */ /* Module declarations from "pygame._sdl2.video" */ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int); /*proto*/ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sdl2.video" extern int __pyx_module_is_main_pygame___sdl2__video; int __pyx_module_is_main_pygame___sdl2__video = 0; /* Implementation of "pygame._sdl2.video" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_staticmethod; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_reversed; static PyObject *__pyx_builtin_hex; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_TypeError; /* #### Code section: string_decls ### */ static const char __pyx_k_h[] = "h"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_s[] = "s"; static const char __pyx_k_w[] = "w"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_y[] = "y"; static const char __pyx_k_OK[] = "OK"; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_p1[] = "p1"; static const char __pyx_k_p2[] = "p2"; static const char __pyx_k__29[] = "."; static const char __pyx_k__30[] = "*"; static const char __pyx_k_but[] = "but"; static const char __pyx_k_cls[] = "cls"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_hex[] = "hex"; static const char __pyx_k_ind[] = "ind"; static const char __pyx_k_key[] = "key"; static const char __pyx_k_num[] = "num"; static const char __pyx_k_ptr[] = "ptr"; static const char __pyx_k_res[] = "res"; static const char __pyx_k_ret[] = "ret"; static const char __pyx_k_win[] = "win"; static const char __pyx_k__104[] = "?"; static const char __pyx_k_area[] = "area"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_blit[] = "blit"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_dest[] = "dest"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_draw[] = "draw"; static const char __pyx_k_hide[] = "hide"; static const char __pyx_k_info[] = "info"; static const char __pyx_k_load[] = "load"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_rect[] = "rect"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_show[] = "show"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_spec[] = "__spec__"; static const char __pyx_k_surf[] = "surf"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_utf8[] = "utf8"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_Image[] = "Image"; static const char __pyx_k_alpha[] = "alpha"; static const char __pyx_k_angle[] = "angle"; static const char __pyx_k_blend[] = "blend"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_color[] = "color"; static const char __pyx_k_depth[] = "depth"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_focus[] = "focus"; static const char __pyx_k_image[] = "image"; static const char __pyx_k_index[] = "index"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_other[] = "other"; static const char __pyx_k_point[] = "point"; static const char __pyx_k_rarea[] = "rarea"; static const char __pyx_k_super[] = "super"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_title[] = "title"; static const char __pyx_k_vsync[] = "vsync"; static const char __pyx_k_Window[] = "Window"; static const char __pyx_k_button[] = "button"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_flip_x[] = "flip_x"; static const char __pyx_k_flip_y[] = "flip_y"; static const char __pyx_k_format[] = "format_"; static const char __pyx_k_hidden[] = "hidden"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_opengl[] = "opengl"; static const char __pyx_k_origin[] = "origin"; static const char __pyx_k_parent[] = "parent"; static const char __pyx_k_pygame[] = "pygame"; static const char __pyx_k_rect_2[] = "_rect"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_source[] = "source"; static const char __pyx_k_static[] = "static"; static const char __pyx_k_target[] = "target"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_vulkan[] = "vulkan"; static const char __pyx_k_window[] = "window"; static const char __pyx_k_Texture[] = "Texture"; static const char __pyx_k_buttons[] = "buttons"; static const char __pyx_k_desktop[] = "desktop"; static const char __pyx_k_destroy[] = "destroy"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_dstrect[] = "dstrect"; static const char __pyx_k_environ[] = "environ"; static const char __pyx_k_foreign[] = "foreign"; static const char __pyx_k_message[] = "message"; static const char __pyx_k_pkgdata[] = "pkgdata"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_present[] = "present"; static const char __pyx_k_rectptr[] = "rectptr"; static const char __pyx_k_restore[] = "restore"; static const char __pyx_k_srcrect[] = "srcrect"; static const char __pyx_k_surface[] = "surface"; static const char __pyx_k_texture[] = "texture"; static const char __pyx_k_tmprect[] = "tmprect"; static const char __pyx_k_tooltip[] = "tooltip"; static const char __pyx_k_utility[] = "utility"; static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_Renderer[] = "Renderer"; static const char __pyx_k_buttonid[] = "buttonid"; static const char __pyx_k_data_ptr[] = "data_ptr"; static const char __pyx_k_errorfnc[] = "errorfnc"; static const char __pyx_k_format_2[] = "format"; static const char __pyx_k_get_rect[] = "get_rect"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_maximize[] = "maximize"; static const char __pyx_k_minimize[] = "minimize"; static const char __pyx_k_position[] = "position"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_renderer[] = "renderer"; static const char __pyx_k_reversed[] = "reversed"; static const char __pyx_k_set_icon[] = "set_icon"; static const char __pyx_k_set_name[] = "__set_name__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_surf_ptr[] = "surf_ptr"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_areaparam[] = "areaparam"; static const char __pyx_k_c_buttons[] = "c_buttons"; static const char __pyx_k_draw_line[] = "draw_line"; static const char __pyx_k_draw_rect[] = "draw_rect"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_fill_rect[] = "fill_rect"; static const char __pyx_k_get_width[] = "get_width"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_maximized[] = "maximized"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_minimized[] = "minimized"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_resizable[] = "resizable"; static const char __pyx_k_streaming[] = "streaming"; static const char __pyx_k_Image_draw[] = "Image.draw"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_alpha_mode[] = "alpha_mode"; static const char __pyx_k_blend_mode[] = "blend_mode"; static const char __pyx_k_borderless[] = "borderless"; static const char __pyx_k_color_mode[] = "color_mode"; static const char __pyx_k_draw_point[] = "draw_point"; static const char __pyx_k_fullscreen[] = "fullscreen"; static const char __pyx_k_get_height[] = "get_height"; static const char __pyx_k_input_only[] = "input_only"; static const char __pyx_k_messagebox[] = "messagebox"; static const char __pyx_k_popup_menu[] = "popup_menu"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_renderer_2[] = "_renderer"; static const char __pyx_k_to_surface[] = "to_surface"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_Window_hide[] = "Window.hide"; static const char __pyx_k_Window_show[] = "Window.show"; static const char __pyx_k_accelerated[] = "accelerated"; static const char __pyx_k_from_window[] = "from_window"; static const char __pyx_k_getResource[] = "getResource"; static const char __pyx_k_get_drivers[] = "get_drivers"; static const char __pyx_k_input_focus[] = "input_focus"; static const char __pyx_k_mouse_focus[] = "mouse_focus"; static const char __pyx_k_DEFAULT_SIZE[] = "DEFAULT_SIZE"; static const char __pyx_k_Texture_draw[] = "Texture.draw"; static const char __pyx_k_Window_focus[] = "Window.focus"; static const char __pyx_k_buttons_utf8[] = "buttons_utf8"; static const char __pyx_k_defaultColor[] = "defaultColor"; static const char __pyx_k_from_surface[] = "from_surface"; static const char __pyx_k_get_viewport[] = "get_viewport"; static const char __pyx_k_initializing[] = "_initializing"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_pixel_format[] = "pixel_format"; static const char __pyx_k_set_colorkey[] = "set_colorkey"; static const char __pyx_k_set_viewport[] = "set_viewport"; static const char __pyx_k_set_windowed[] = "set_windowed"; static const char __pyx_k_skip_taskbar[] = "skip_taskbar"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_stringsource[] = ""; static const char __pyx_k_tempviewport[] = "tempviewport"; static const char __pyx_k_Renderer_blit[] = "Renderer.blit"; static const char __pyx_k_allow_highdpi[] = "allow_highdpi"; static const char __pyx_k_always_on_top[] = "always_on_top"; static const char __pyx_k_class_getitem[] = "__class_getitem__"; static const char __pyx_k_escape_button[] = "escape_button"; static const char __pyx_k_init_subclass[] = "__init_subclass__"; static const char __pyx_k_input_grabbed[] = "input_grabbed"; static const char __pyx_k_kwarg_to_flag[] = "_kwarg_to_flag"; static const char __pyx_k_mouse_capture[] = "mouse_capture"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_return_button[] = "return_button"; static const char __pyx_k_set_modal_for[] = "set_modal_for"; static const char __pyx_k_special_flags[] = "special_flags"; static const char __pyx_k_Image_get_rect[] = "Image.get_rect"; static const char __pyx_k_Renderer_clear[] = "Renderer.clear"; static const char __pyx_k_Texture_update[] = "Texture.update"; static const char __pyx_k_Window_destroy[] = "Window.destroy"; static const char __pyx_k_Window_restore[] = "Window.restore"; static const char __pyx_k_converted_surf[] = "converted_surf"; static const char __pyx_k_pygame_pkgdata[] = "pygame.pkgdata"; static const char __pyx_k_set_fullscreen[] = "set_fullscreen"; static const char __pyx_k_target_texture[] = "target_texture"; static const char __pyx_k_textureOrImage[] = "textureOrImage"; static const char __pyx_k_Window_maximize[] = "Window.maximize"; static const char __pyx_k_Window_minimize[] = "Window.minimize"; static const char __pyx_k_Window_set_icon[] = "Window.set_icon"; static const char __pyx_k_pygame_icon_bmp[] = "pygame_icon.bmp"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_MESSAGEBOX_ERROR[] = "MESSAGEBOX_ERROR"; static const char __pyx_k_Renderer_present[] = "Renderer.present"; static const char __pyx_k_Texture_get_rect[] = "Texture.get_rect"; static const char __pyx_k_max_texture_width[] = "max_texture_width"; static const char __pyx_k_pygame__sdl2_sdl2[] = "pygame._sdl2.sdl2"; static const char __pyx_k_MESSAGEBOX_WARNING[] = "MESSAGEBOX_WARNING"; static const char __pyx_k_RendererDriverInfo[] = "RendererDriverInfo"; static const char __pyx_k_Renderer_draw_line[] = "Renderer.draw_line"; static const char __pyx_k_Renderer_draw_rect[] = "Renderer.draw_rect"; static const char __pyx_k_Renderer_fill_rect[] = "Renderer.fill_rect"; static const char __pyx_k_WINDOWPOS_CENTERED[] = "WINDOWPOS_CENTERED"; static const char __pyx_k_Window_from_window[] = "Window.from_window"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_fullscreen_desktop[] = "fullscreen_desktop"; static const char __pyx_k_get_grabbed_window[] = "get_grabbed_window"; static const char __pyx_k_max_texture_height[] = "max_texture_height"; static const char __pyx_k_pygame__sdl2_video[] = "pygame._sdl2.video"; static const char __pyx_k_Renderer_draw_point[] = "Renderer.draw_point"; static const char __pyx_k_Renderer_to_surface[] = "Renderer.to_surface"; static const char __pyx_k_WINDOWPOS_UNDEFINED[] = "WINDOWPOS_UNDEFINED"; static const char __pyx_k_Window_set_windowed[] = "Window.set_windowed"; static const char __pyx_k_from_display_module[] = "from_display_module"; static const char __pyx_k_num_texture_formats[] = "num_texture_formats"; static const char __pyx_k_unknown_parameter_s[] = "unknown parameter: %s"; static const char __pyx_k_Renderer_from_window[] = "Renderer.from_window"; static const char __pyx_k_Texture_from_surface[] = "Texture.from_surface"; static const char __pyx_k_Window_set_modal_for[] = "Window.set_modal_for"; static const char __pyx_k_expected_a_rectangle[] = "expected a rectangle"; static const char __pyx_k_Image___reduce_cython[] = "Image.__reduce_cython__"; static const char __pyx_k_Renderer_get_viewport[] = "Renderer.get_viewport"; static const char __pyx_k_Renderer_set_viewport[] = "Renderer.set_viewport"; static const char __pyx_k_Window_set_fullscreen[] = "Window.set_fullscreen"; static const char __pyx_k_MESSAGEBOX_INFORMATION[] = "MESSAGEBOX_INFORMATION"; static const char __pyx_k_Window___reduce_cython[] = "Window.__reduce_cython__"; static const char __pyx_k_Image___setstate_cython[] = "Image.__setstate_cython__"; static const char __pyx_k_Texture___reduce_cython[] = "Texture.__reduce_cython__"; static const char __pyx_k_source_must_be_drawable[] = "source must be drawable"; static const char __pyx_k_Renderer___reduce_cython[] = "Renderer.__reduce_cython__"; static const char __pyx_k_Window___setstate_cython[] = "Window.__setstate_cython__"; static const char __pyx_k_the_surface_is_too_small[] = "the surface is too small"; static const char __pyx_k_RendererDriverInfo___repr[] = "RendererDriverInfo.__repr__"; static const char __pyx_k_Texture___setstate_cython[] = "Texture.__setstate_cython__"; static const char __pyx_k_compose_custom_blend_mode[] = "compose_custom_blend_mode"; static const char __pyx_k_Renderer___setstate_cython[] = "Renderer.__setstate_cython__"; static const char __pyx_k_Window_from_display_module[] = "Window.from_display_module"; static const char __pyx_k_area_must_be_None_or_a_rect[] = "area must be None or a rect"; static const char __pyx_k_size_must_have_two_elements[] = "size must have two elements"; static const char __pyx_k_rect_values_are_out_of_range[] = "rect values are out of range"; static const char __pyx_k_2nd_argument_must_be_a_surface[] = "2nd argument must be a surface"; static const char __pyx_k_srcrect_must_be_a_rect_or_None[] = "srcrect must be a rect or None"; static const char __pyx_k_dstrect_must_be_a_position_rect[] = "dstrect must be a position, rect, or None"; static const char __pyx_k_only_one_of_static_streaming_or[] = "only one of static, streaming, or target can be true"; static const char __pyx_k_s_name_s_flags_0x_02x_num_textu[] = "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>"; static const char __pyx_k_src_c_cython_pygame__sdl2_video[] = "src_c/cython/pygame/_sdl2/video.pyx"; static const char __pyx_k_surface_must_be_a_surface_or_No[] = "'surface' must be a surface or None"; static const char __pyx_k_the_argument_is_not_a_rectangle[] = "the argument is not a rectangle or None"; static const char __pyx_k_Renderer_compose_custom_blend_mo[] = "Renderer.compose_custom_blend_mode"; static const char __pyx_k_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE[] = "SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"; static const char __pyx_k_area_must_be_a_rectangle_or_None[] = "area must be a rectangle or None"; static const char __pyx_k_fullscreen_and_fullscreen_deskto[] = "fullscreen and fullscreen_desktop cannot be used at the same time."; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static const char __pyx_k_no_standard_masks_exist_for_give[] = "no standard masks exist for given bitdepth with alpha"; static const char __pyx_k_not_enough_memory_for_the_surfac[] = "not enough memory for the surface"; static const char __pyx_k_self__renderer_cannot_be_convert[] = "self._renderer cannot be converted to a Python object for pickling"; static const char __pyx_k_self__win_cannot_be_converted_to[] = "self._win cannot be converted to a Python object for pickling"; static const char __pyx_k_size_must_contain_two_positive_v[] = "size must contain two positive values"; static const char __pyx_k_srcrect_must_be_None_or_a_rectan[] = "srcrect must be None or a rectangle"; static const char __pyx_k_surface_must_be_a_Surface_object[] = "surface must be a Surface object"; static const char __pyx_k_target_must_be_a_Texture_or_None[] = "target must be a Texture or None"; static const char __pyx_k_update_source_should_be_a_Surfac[] = "update source should be a Surface."; /* #### Code section: decls ### */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_get_drivers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title, PyObject *__pyx_v_message, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window, int __pyx_v_info, int __pyx_v_warn, int __pyx_v_error, PyObject *__pyx_v_buttons, PyObject *__pyx_v_return_button, PyObject *__pyx_v_escape_button); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_window(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2from_display_module(PyTypeObject *__pyx_v_cls); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_size, PyObject *__pyx_v_position, int __pyx_v_fullscreen, int __pyx_v_fullscreen_desktop, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_grabbed); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_enable); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8set_fullscreen(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_desktop); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_title); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10destroy(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12hide(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14show(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_16focus(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_input_only); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18restore(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20maximize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22minimize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_icon(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_surface); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_position); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_opacity); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_26set_modal_for(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_parent); /* proto */ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_28__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer, PyObject *__pyx_v_size, int __pyx_v_depth, PyObject *__pyx_v_static, PyObject *__pyx_v_streaming, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer, PyObject *__pyx_v_surface); /* proto */ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, Uint8 __pyx_v_new_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_blendMode); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_new_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10draw(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_srcrect, PyObject *__pyx_v_dstrect, float __pyx_v_angle, PyObject *__pyx_v_origin, int __pyx_v_flip_x, int __pyx_v_flip_y); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12update(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_area); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8renderer___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5width___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_6height___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_textureOrImage, PyObject *__pyx_v_srcrect); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_new_color); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_new_origin); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6draw(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_srcrect, PyObject *__pyx_v_dstrect); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5angle___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_7texture___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_4__del__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_4__del__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObject *__pyx_v_cls, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window, int __pyx_v_index, int __pyx_v_accelerated, int __pyx_v_vsync, int __pyx_v_target_texture); /* proto */ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_blendMode); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_new_value); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10get_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_scale); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_area); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_newtarget); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_14blit(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_source, pgRectObject *__pyx_v_dest, pgRectObject *__pyx_v_area, int __pyx_v_special_flags); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_point); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_rect); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_rect); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24to_surface(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_area); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode(PyObject *__pyx_v_color_mode, PyObject *__pyx_v_alpha_mode); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Window(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Renderer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Texture(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Image(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_4type_type; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_4bool_bool; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_7complex_complex; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_6pygame_5_sdl2_5video_Window; PyObject *__pyx_type_6pygame_5_sdl2_5video_Renderer; PyObject *__pyx_type_6pygame_5_sdl2_5video_Texture; PyObject *__pyx_type_6pygame_5_sdl2_5video_Image; PyObject *__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers; #endif PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Color; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Rect; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Window; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Renderer; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Texture; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Image; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers; PyObject *__pyx_kp_s_2nd_argument_must_be_a_surface; PyObject *__pyx_n_s_DEFAULT_SIZE; PyObject *__pyx_n_s_Image; PyObject *__pyx_n_s_Image___reduce_cython; PyObject *__pyx_n_s_Image___setstate_cython; PyObject *__pyx_n_s_Image_draw; PyObject *__pyx_n_s_Image_get_rect; PyObject *__pyx_n_s_KeyError; PyObject *__pyx_n_s_MESSAGEBOX_ERROR; PyObject *__pyx_n_s_MESSAGEBOX_INFORMATION; PyObject *__pyx_n_s_MESSAGEBOX_WARNING; PyObject *__pyx_n_s_MemoryError; PyObject *__pyx_n_s_OK; PyObject *__pyx_n_s_Renderer; PyObject *__pyx_n_s_RendererDriverInfo; PyObject *__pyx_n_s_RendererDriverInfo___repr; PyObject *__pyx_n_s_Renderer___reduce_cython; PyObject *__pyx_n_s_Renderer___setstate_cython; PyObject *__pyx_n_s_Renderer_blit; PyObject *__pyx_n_s_Renderer_clear; PyObject *__pyx_n_s_Renderer_compose_custom_blend_mo; PyObject *__pyx_n_s_Renderer_draw_line; PyObject *__pyx_n_s_Renderer_draw_point; PyObject *__pyx_n_s_Renderer_draw_rect; PyObject *__pyx_n_s_Renderer_fill_rect; PyObject *__pyx_n_s_Renderer_from_window; PyObject *__pyx_n_s_Renderer_get_viewport; PyObject *__pyx_n_s_Renderer_present; PyObject *__pyx_n_s_Renderer_set_viewport; PyObject *__pyx_n_s_Renderer_to_surface; PyObject *__pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE; PyObject *__pyx_n_s_Texture; PyObject *__pyx_n_s_Texture___reduce_cython; PyObject *__pyx_n_s_Texture___setstate_cython; PyObject *__pyx_n_s_Texture_draw; PyObject *__pyx_n_s_Texture_from_surface; PyObject *__pyx_n_s_Texture_get_rect; PyObject *__pyx_n_s_Texture_update; PyObject *__pyx_n_s_TypeError; PyObject *__pyx_n_s_ValueError; PyObject *__pyx_n_s_WINDOWPOS_CENTERED; PyObject *__pyx_n_s_WINDOWPOS_UNDEFINED; PyObject *__pyx_n_s_Window; PyObject *__pyx_n_s_Window___reduce_cython; PyObject *__pyx_n_s_Window___setstate_cython; PyObject *__pyx_n_s_Window_destroy; PyObject *__pyx_n_s_Window_focus; PyObject *__pyx_n_s_Window_from_display_module; PyObject *__pyx_n_s_Window_from_window; PyObject *__pyx_n_s_Window_hide; PyObject *__pyx_n_s_Window_maximize; PyObject *__pyx_n_s_Window_minimize; PyObject *__pyx_n_s_Window_restore; PyObject *__pyx_n_s_Window_set_fullscreen; PyObject *__pyx_n_s_Window_set_icon; PyObject *__pyx_n_s_Window_set_modal_for; PyObject *__pyx_n_s_Window_set_windowed; PyObject *__pyx_n_s_Window_show; PyObject *__pyx_n_s__104; PyObject *__pyx_kp_u__29; PyObject *__pyx_n_s__30; PyObject *__pyx_n_s_accelerated; PyObject *__pyx_n_s_allow_highdpi; PyObject *__pyx_n_s_alpha; PyObject *__pyx_n_s_alpha_mode; PyObject *__pyx_n_s_always_on_top; PyObject *__pyx_n_s_angle; PyObject *__pyx_n_s_area; PyObject *__pyx_kp_s_area_must_be_None_or_a_rect; PyObject *__pyx_kp_s_area_must_be_a_rectangle_or_None; PyObject *__pyx_n_s_areaparam; PyObject *__pyx_n_s_args; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_blend; PyObject *__pyx_n_s_blend_mode; PyObject *__pyx_n_s_blit; PyObject *__pyx_n_s_borderless; PyObject *__pyx_n_s_but; PyObject *__pyx_n_s_button; PyObject *__pyx_n_s_buttonid; PyObject *__pyx_n_s_buttons; PyObject *__pyx_n_s_buttons_utf8; PyObject *__pyx_n_s_c_buttons; PyObject *__pyx_n_s_class; PyObject *__pyx_n_s_class_getitem; PyObject *__pyx_n_s_clear; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_close; PyObject *__pyx_n_s_cls; PyObject *__pyx_n_s_color; PyObject *__pyx_n_s_color_mode; PyObject *__pyx_n_s_compose_custom_blend_mode; PyObject *__pyx_n_s_converted_surf; PyObject *__pyx_n_s_data; PyObject *__pyx_n_s_data_ptr; PyObject *__pyx_n_s_defaultColor; PyObject *__pyx_n_s_depth; PyObject *__pyx_n_s_desktop; PyObject *__pyx_n_s_dest; PyObject *__pyx_n_s_destroy; PyObject *__pyx_n_s_dict; PyObject *__pyx_kp_u_disable; PyObject *__pyx_n_s_doc; PyObject *__pyx_n_s_draw; PyObject *__pyx_n_s_draw_line; PyObject *__pyx_n_s_draw_point; PyObject *__pyx_n_s_draw_rect; PyObject *__pyx_n_s_dstrect; PyObject *__pyx_kp_s_dstrect_must_be_a_position_rect; PyObject *__pyx_kp_u_enable; PyObject *__pyx_n_s_encode; PyObject *__pyx_n_s_enumerate; PyObject *__pyx_n_s_environ; PyObject *__pyx_n_s_error; PyObject *__pyx_n_s_errorfnc; PyObject *__pyx_n_s_escape_button; PyObject *__pyx_kp_s_expected_a_rectangle; PyObject *__pyx_n_s_fill_rect; PyObject *__pyx_n_s_flags; PyObject *__pyx_n_s_flip_x; PyObject *__pyx_n_s_flip_y; PyObject *__pyx_n_s_focus; PyObject *__pyx_n_s_foreign; PyObject *__pyx_n_s_format; PyObject *__pyx_n_s_format_2; PyObject *__pyx_n_s_from_display_module; PyObject *__pyx_n_s_from_surface; PyObject *__pyx_n_s_from_window; PyObject *__pyx_n_s_fullscreen; PyObject *__pyx_kp_s_fullscreen_and_fullscreen_deskto; PyObject *__pyx_n_s_fullscreen_desktop; PyObject *__pyx_kp_u_gc; PyObject *__pyx_n_s_getResource; PyObject *__pyx_n_s_get_drivers; PyObject *__pyx_n_s_get_grabbed_window; PyObject *__pyx_n_s_get_height; PyObject *__pyx_n_s_get_rect; PyObject *__pyx_n_s_get_viewport; PyObject *__pyx_n_s_get_width; PyObject *__pyx_n_s_getstate; PyObject *__pyx_n_s_h; PyObject *__pyx_n_s_hex; PyObject *__pyx_n_s_hidden; PyObject *__pyx_n_s_hide; PyObject *__pyx_n_s_i; PyObject *__pyx_n_s_image; PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_ind; PyObject *__pyx_n_s_index; PyObject *__pyx_n_s_info; PyObject *__pyx_n_s_init_subclass; PyObject *__pyx_n_s_initializing; PyObject *__pyx_n_s_input_focus; PyObject *__pyx_n_s_input_grabbed; PyObject *__pyx_n_s_input_only; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_items; PyObject *__pyx_n_s_key; PyObject *__pyx_n_s_kwarg_to_flag; PyObject *__pyx_n_s_kwargs; PyObject *__pyx_n_s_load; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_max_texture_height; PyObject *__pyx_n_s_max_texture_width; PyObject *__pyx_n_s_maximize; PyObject *__pyx_n_s_maximized; PyObject *__pyx_n_s_message; PyObject *__pyx_n_s_messagebox; PyObject *__pyx_n_s_metaclass; PyObject *__pyx_n_s_minimize; PyObject *__pyx_n_s_minimized; PyObject *__pyx_n_s_module; PyObject *__pyx_n_s_mouse_capture; PyObject *__pyx_n_s_mouse_focus; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_name_2; PyObject *__pyx_kp_s_no_default___reduce___due_to_non; PyObject *__pyx_kp_s_no_standard_masks_exist_for_give; PyObject *__pyx_kp_s_not_enough_memory_for_the_surfac; PyObject *__pyx_n_s_num; PyObject *__pyx_n_s_num_texture_formats; PyObject *__pyx_kp_s_only_one_of_static_streaming_or; PyObject *__pyx_n_s_opengl; PyObject *__pyx_n_s_origin; PyObject *__pyx_n_s_os; PyObject *__pyx_n_s_other; PyObject *__pyx_n_s_p1; PyObject *__pyx_n_s_p2; PyObject *__pyx_n_s_parent; PyObject *__pyx_n_s_pixel_format; PyObject *__pyx_n_s_pkgdata; PyObject *__pyx_n_s_point; PyObject *__pyx_n_s_popup_menu; PyObject *__pyx_n_s_position; PyObject *__pyx_n_s_prepare; PyObject *__pyx_n_s_present; PyObject *__pyx_n_s_ptr; PyObject *__pyx_n_s_pygame; PyObject *__pyx_n_s_pygame__sdl2_sdl2; PyObject *__pyx_n_s_pygame__sdl2_video; PyObject *__pyx_kp_s_pygame_icon_bmp; PyObject *__pyx_n_s_pygame_pkgdata; PyObject *__pyx_n_s_pyx_state; PyObject *__pyx_n_s_pyx_vtable; PyObject *__pyx_n_s_qualname; PyObject *__pyx_n_s_rarea; PyObject *__pyx_n_s_rect; PyObject *__pyx_n_s_rect_2; PyObject *__pyx_kp_s_rect_values_are_out_of_range; PyObject *__pyx_n_s_rectptr; PyObject *__pyx_n_s_reduce; PyObject *__pyx_n_s_reduce_cython; PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_renderer; PyObject *__pyx_n_s_renderer_2; PyObject *__pyx_n_s_repr; PyObject *__pyx_n_s_res; PyObject *__pyx_n_s_resizable; PyObject *__pyx_n_s_restore; PyObject *__pyx_n_s_ret; PyObject *__pyx_n_s_return_button; PyObject *__pyx_n_s_reversed; PyObject *__pyx_n_s_s; PyObject *__pyx_kp_s_s_name_s_flags_0x_02x_num_textu; PyObject *__pyx_n_s_self; PyObject *__pyx_kp_s_self__renderer_cannot_be_convert; PyObject *__pyx_kp_s_self__win_cannot_be_converted_to; PyObject *__pyx_n_s_send; PyObject *__pyx_n_s_set_colorkey; PyObject *__pyx_n_s_set_fullscreen; PyObject *__pyx_n_s_set_icon; PyObject *__pyx_n_s_set_modal_for; PyObject *__pyx_n_s_set_name; PyObject *__pyx_n_s_set_viewport; PyObject *__pyx_n_s_set_windowed; PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_show; PyObject *__pyx_n_s_size; PyObject *__pyx_kp_s_size_must_contain_two_positive_v; PyObject *__pyx_kp_s_size_must_have_two_elements; PyObject *__pyx_n_s_skip_taskbar; PyObject *__pyx_n_s_source; PyObject *__pyx_kp_s_source_must_be_drawable; PyObject *__pyx_n_s_spec; PyObject *__pyx_n_s_special_flags; PyObject *__pyx_kp_s_src_c_cython_pygame__sdl2_video; PyObject *__pyx_n_s_srcrect; PyObject *__pyx_kp_s_srcrect_must_be_None_or_a_rectan; PyObject *__pyx_kp_s_srcrect_must_be_a_rect_or_None; PyObject *__pyx_n_s_static; PyObject *__pyx_n_s_staticmethod; PyObject *__pyx_n_s_streaming; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_super; PyObject *__pyx_n_s_surf; PyObject *__pyx_n_s_surf_ptr; PyObject *__pyx_n_s_surface; PyObject *__pyx_kp_s_surface_must_be_a_Surface_object; PyObject *__pyx_kp_s_surface_must_be_a_surface_or_No; PyObject *__pyx_n_s_target; PyObject *__pyx_kp_s_target_must_be_a_Texture_or_None; PyObject *__pyx_n_s_target_texture; PyObject *__pyx_n_s_tempviewport; PyObject *__pyx_n_s_test; PyObject *__pyx_n_s_texture; PyObject *__pyx_n_s_textureOrImage; PyObject *__pyx_kp_s_the_argument_is_not_a_rectangle; PyObject *__pyx_kp_s_the_surface_is_too_small; PyObject *__pyx_n_s_throw; PyObject *__pyx_n_s_title; PyObject *__pyx_n_s_tmprect; PyObject *__pyx_n_s_to_surface; PyObject *__pyx_n_s_tooltip; PyObject *__pyx_kp_s_unknown_parameter_s; PyObject *__pyx_n_s_update; PyObject *__pyx_kp_s_update_source_should_be_a_Surfac; PyObject *__pyx_n_s_utf8; PyObject *__pyx_n_s_utility; PyObject *__pyx_n_s_vsync; PyObject *__pyx_n_s_vulkan; PyObject *__pyx_n_s_w; PyObject *__pyx_n_s_warn; PyObject *__pyx_n_s_win; PyObject *__pyx_n_s_window; PyObject *__pyx_n_s_x; PyObject *__pyx_n_s_y; PyObject *__pyx_float_0_0; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_3; PyObject *__pyx_int_480; PyObject *__pyx_int_640; PyObject *__pyx_k__3; PyObject *__pyx_k__4; PyObject *__pyx_codeobj_; PyObject *__pyx_tuple__2; PyObject *__pyx_tuple__5; PyObject *__pyx_tuple__6; PyObject *__pyx_tuple__7; PyObject *__pyx_tuple__8; PyObject *__pyx_tuple__9; PyObject *__pyx_slice__19; PyObject *__pyx_slice__21; PyObject *__pyx_tuple__10; PyObject *__pyx_tuple__11; PyObject *__pyx_tuple__12; PyObject *__pyx_tuple__13; PyObject *__pyx_tuple__14; PyObject *__pyx_tuple__15; PyObject *__pyx_tuple__16; PyObject *__pyx_tuple__17; PyObject *__pyx_tuple__18; PyObject *__pyx_tuple__20; PyObject *__pyx_tuple__22; PyObject *__pyx_tuple__23; PyObject *__pyx_tuple__24; PyObject *__pyx_tuple__25; PyObject *__pyx_tuple__26; PyObject *__pyx_tuple__27; PyObject *__pyx_tuple__28; PyObject *__pyx_tuple__31; PyObject *__pyx_tuple__33; PyObject *__pyx_tuple__34; PyObject *__pyx_tuple__36; PyObject *__pyx_tuple__38; PyObject *__pyx_tuple__39; PyObject *__pyx_tuple__41; PyObject *__pyx_tuple__44; PyObject *__pyx_tuple__46; PyObject *__pyx_tuple__50; PyObject *__pyx_tuple__55; PyObject *__pyx_tuple__57; PyObject *__pyx_tuple__60; PyObject *__pyx_tuple__62; PyObject *__pyx_tuple__64; PyObject *__pyx_tuple__66; PyObject *__pyx_tuple__68; PyObject *__pyx_tuple__69; PyObject *__pyx_tuple__71; PyObject *__pyx_tuple__75; PyObject *__pyx_tuple__77; PyObject *__pyx_tuple__80; PyObject *__pyx_tuple__82; PyObject *__pyx_tuple__86; PyObject *__pyx_tuple__88; PyObject *__pyx_tuple__90; PyObject *__pyx_tuple__91; PyObject *__pyx_tuple__93; PyObject *__pyx_tuple__95; PyObject *__pyx_tuple__98; PyObject *__pyx_tuple__100; PyObject *__pyx_codeobj__32; PyObject *__pyx_codeobj__35; PyObject *__pyx_codeobj__37; PyObject *__pyx_codeobj__40; PyObject *__pyx_codeobj__42; PyObject *__pyx_codeobj__43; PyObject *__pyx_codeobj__45; PyObject *__pyx_codeobj__47; PyObject *__pyx_codeobj__48; PyObject *__pyx_codeobj__49; PyObject *__pyx_codeobj__51; PyObject *__pyx_codeobj__52; PyObject *__pyx_codeobj__53; PyObject *__pyx_codeobj__54; PyObject *__pyx_codeobj__56; PyObject *__pyx_codeobj__58; PyObject *__pyx_codeobj__59; PyObject *__pyx_codeobj__61; PyObject *__pyx_codeobj__63; PyObject *__pyx_codeobj__65; PyObject *__pyx_codeobj__67; PyObject *__pyx_codeobj__70; PyObject *__pyx_codeobj__72; PyObject *__pyx_codeobj__73; PyObject *__pyx_codeobj__74; PyObject *__pyx_codeobj__76; PyObject *__pyx_codeobj__78; PyObject *__pyx_codeobj__79; PyObject *__pyx_codeobj__81; PyObject *__pyx_codeobj__83; PyObject *__pyx_codeobj__84; PyObject *__pyx_codeobj__85; PyObject *__pyx_codeobj__87; PyObject *__pyx_codeobj__89; PyObject *__pyx_codeobj__92; PyObject *__pyx_codeobj__94; PyObject *__pyx_codeobj__96; PyObject *__pyx_codeobj__97; PyObject *__pyx_codeobj__99; PyObject *__pyx_codeobj__101; PyObject *__pyx_codeobj__102; PyObject *__pyx_codeobj__103; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Color); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Rect); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Window); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5video_Window); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Renderer); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5video_Renderer); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Texture); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5video_Texture); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Image); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5video_Image); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers); Py_CLEAR(clear_module_state->__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers); Py_CLEAR(clear_module_state->__pyx_kp_s_2nd_argument_must_be_a_surface); Py_CLEAR(clear_module_state->__pyx_n_s_DEFAULT_SIZE); Py_CLEAR(clear_module_state->__pyx_n_s_Image); Py_CLEAR(clear_module_state->__pyx_n_s_Image___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Image___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Image_draw); Py_CLEAR(clear_module_state->__pyx_n_s_Image_get_rect); Py_CLEAR(clear_module_state->__pyx_n_s_KeyError); Py_CLEAR(clear_module_state->__pyx_n_s_MESSAGEBOX_ERROR); Py_CLEAR(clear_module_state->__pyx_n_s_MESSAGEBOX_INFORMATION); Py_CLEAR(clear_module_state->__pyx_n_s_MESSAGEBOX_WARNING); Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError); Py_CLEAR(clear_module_state->__pyx_n_s_OK); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer); Py_CLEAR(clear_module_state->__pyx_n_s_RendererDriverInfo); Py_CLEAR(clear_module_state->__pyx_n_s_RendererDriverInfo___repr); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_blit); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_clear); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_compose_custom_blend_mo); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_draw_line); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_draw_point); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_draw_rect); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_fill_rect); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_from_window); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_get_viewport); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_present); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_set_viewport); Py_CLEAR(clear_module_state->__pyx_n_s_Renderer_to_surface); Py_CLEAR(clear_module_state->__pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE); Py_CLEAR(clear_module_state->__pyx_n_s_Texture); Py_CLEAR(clear_module_state->__pyx_n_s_Texture___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Texture___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Texture_draw); Py_CLEAR(clear_module_state->__pyx_n_s_Texture_from_surface); Py_CLEAR(clear_module_state->__pyx_n_s_Texture_get_rect); Py_CLEAR(clear_module_state->__pyx_n_s_Texture_update); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); Py_CLEAR(clear_module_state->__pyx_n_s_WINDOWPOS_CENTERED); Py_CLEAR(clear_module_state->__pyx_n_s_WINDOWPOS_UNDEFINED); Py_CLEAR(clear_module_state->__pyx_n_s_Window); Py_CLEAR(clear_module_state->__pyx_n_s_Window___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Window___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Window_destroy); Py_CLEAR(clear_module_state->__pyx_n_s_Window_focus); Py_CLEAR(clear_module_state->__pyx_n_s_Window_from_display_module); Py_CLEAR(clear_module_state->__pyx_n_s_Window_from_window); Py_CLEAR(clear_module_state->__pyx_n_s_Window_hide); Py_CLEAR(clear_module_state->__pyx_n_s_Window_maximize); Py_CLEAR(clear_module_state->__pyx_n_s_Window_minimize); Py_CLEAR(clear_module_state->__pyx_n_s_Window_restore); Py_CLEAR(clear_module_state->__pyx_n_s_Window_set_fullscreen); Py_CLEAR(clear_module_state->__pyx_n_s_Window_set_icon); Py_CLEAR(clear_module_state->__pyx_n_s_Window_set_modal_for); Py_CLEAR(clear_module_state->__pyx_n_s_Window_set_windowed); Py_CLEAR(clear_module_state->__pyx_n_s_Window_show); Py_CLEAR(clear_module_state->__pyx_n_s__104); Py_CLEAR(clear_module_state->__pyx_kp_u__29); Py_CLEAR(clear_module_state->__pyx_n_s__30); Py_CLEAR(clear_module_state->__pyx_n_s_accelerated); Py_CLEAR(clear_module_state->__pyx_n_s_allow_highdpi); Py_CLEAR(clear_module_state->__pyx_n_s_alpha); Py_CLEAR(clear_module_state->__pyx_n_s_alpha_mode); Py_CLEAR(clear_module_state->__pyx_n_s_always_on_top); Py_CLEAR(clear_module_state->__pyx_n_s_angle); Py_CLEAR(clear_module_state->__pyx_n_s_area); Py_CLEAR(clear_module_state->__pyx_kp_s_area_must_be_None_or_a_rect); Py_CLEAR(clear_module_state->__pyx_kp_s_area_must_be_a_rectangle_or_None); Py_CLEAR(clear_module_state->__pyx_n_s_areaparam); Py_CLEAR(clear_module_state->__pyx_n_s_args); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_blend); Py_CLEAR(clear_module_state->__pyx_n_s_blend_mode); Py_CLEAR(clear_module_state->__pyx_n_s_blit); Py_CLEAR(clear_module_state->__pyx_n_s_borderless); Py_CLEAR(clear_module_state->__pyx_n_s_but); Py_CLEAR(clear_module_state->__pyx_n_s_button); Py_CLEAR(clear_module_state->__pyx_n_s_buttonid); Py_CLEAR(clear_module_state->__pyx_n_s_buttons); Py_CLEAR(clear_module_state->__pyx_n_s_buttons_utf8); Py_CLEAR(clear_module_state->__pyx_n_s_c_buttons); Py_CLEAR(clear_module_state->__pyx_n_s_class); Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); Py_CLEAR(clear_module_state->__pyx_n_s_clear); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_close); Py_CLEAR(clear_module_state->__pyx_n_s_cls); Py_CLEAR(clear_module_state->__pyx_n_s_color); Py_CLEAR(clear_module_state->__pyx_n_s_color_mode); Py_CLEAR(clear_module_state->__pyx_n_s_compose_custom_blend_mode); Py_CLEAR(clear_module_state->__pyx_n_s_converted_surf); Py_CLEAR(clear_module_state->__pyx_n_s_data); Py_CLEAR(clear_module_state->__pyx_n_s_data_ptr); Py_CLEAR(clear_module_state->__pyx_n_s_defaultColor); Py_CLEAR(clear_module_state->__pyx_n_s_depth); Py_CLEAR(clear_module_state->__pyx_n_s_desktop); Py_CLEAR(clear_module_state->__pyx_n_s_dest); Py_CLEAR(clear_module_state->__pyx_n_s_destroy); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_doc); Py_CLEAR(clear_module_state->__pyx_n_s_draw); Py_CLEAR(clear_module_state->__pyx_n_s_draw_line); Py_CLEAR(clear_module_state->__pyx_n_s_draw_point); Py_CLEAR(clear_module_state->__pyx_n_s_draw_rect); Py_CLEAR(clear_module_state->__pyx_n_s_dstrect); Py_CLEAR(clear_module_state->__pyx_kp_s_dstrect_must_be_a_position_rect); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_encode); Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); Py_CLEAR(clear_module_state->__pyx_n_s_environ); Py_CLEAR(clear_module_state->__pyx_n_s_error); Py_CLEAR(clear_module_state->__pyx_n_s_errorfnc); Py_CLEAR(clear_module_state->__pyx_n_s_escape_button); Py_CLEAR(clear_module_state->__pyx_kp_s_expected_a_rectangle); Py_CLEAR(clear_module_state->__pyx_n_s_fill_rect); Py_CLEAR(clear_module_state->__pyx_n_s_flags); Py_CLEAR(clear_module_state->__pyx_n_s_flip_x); Py_CLEAR(clear_module_state->__pyx_n_s_flip_y); Py_CLEAR(clear_module_state->__pyx_n_s_focus); Py_CLEAR(clear_module_state->__pyx_n_s_foreign); Py_CLEAR(clear_module_state->__pyx_n_s_format); Py_CLEAR(clear_module_state->__pyx_n_s_format_2); Py_CLEAR(clear_module_state->__pyx_n_s_from_display_module); Py_CLEAR(clear_module_state->__pyx_n_s_from_surface); Py_CLEAR(clear_module_state->__pyx_n_s_from_window); Py_CLEAR(clear_module_state->__pyx_n_s_fullscreen); Py_CLEAR(clear_module_state->__pyx_kp_s_fullscreen_and_fullscreen_deskto); Py_CLEAR(clear_module_state->__pyx_n_s_fullscreen_desktop); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_getResource); Py_CLEAR(clear_module_state->__pyx_n_s_get_drivers); Py_CLEAR(clear_module_state->__pyx_n_s_get_grabbed_window); Py_CLEAR(clear_module_state->__pyx_n_s_get_height); Py_CLEAR(clear_module_state->__pyx_n_s_get_rect); Py_CLEAR(clear_module_state->__pyx_n_s_get_viewport); Py_CLEAR(clear_module_state->__pyx_n_s_get_width); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_n_s_h); Py_CLEAR(clear_module_state->__pyx_n_s_hex); Py_CLEAR(clear_module_state->__pyx_n_s_hidden); Py_CLEAR(clear_module_state->__pyx_n_s_hide); Py_CLEAR(clear_module_state->__pyx_n_s_i); Py_CLEAR(clear_module_state->__pyx_n_s_image); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_ind); Py_CLEAR(clear_module_state->__pyx_n_s_index); Py_CLEAR(clear_module_state->__pyx_n_s_info); Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_n_s_input_focus); Py_CLEAR(clear_module_state->__pyx_n_s_input_grabbed); Py_CLEAR(clear_module_state->__pyx_n_s_input_only); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_items); Py_CLEAR(clear_module_state->__pyx_n_s_key); Py_CLEAR(clear_module_state->__pyx_n_s_kwarg_to_flag); Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); Py_CLEAR(clear_module_state->__pyx_n_s_load); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_max_texture_height); Py_CLEAR(clear_module_state->__pyx_n_s_max_texture_width); Py_CLEAR(clear_module_state->__pyx_n_s_maximize); Py_CLEAR(clear_module_state->__pyx_n_s_maximized); Py_CLEAR(clear_module_state->__pyx_n_s_message); Py_CLEAR(clear_module_state->__pyx_n_s_messagebox); Py_CLEAR(clear_module_state->__pyx_n_s_metaclass); Py_CLEAR(clear_module_state->__pyx_n_s_minimize); Py_CLEAR(clear_module_state->__pyx_n_s_minimized); Py_CLEAR(clear_module_state->__pyx_n_s_module); Py_CLEAR(clear_module_state->__pyx_n_s_mouse_capture); Py_CLEAR(clear_module_state->__pyx_n_s_mouse_focus); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_name_2); Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_kp_s_no_standard_masks_exist_for_give); Py_CLEAR(clear_module_state->__pyx_kp_s_not_enough_memory_for_the_surfac); Py_CLEAR(clear_module_state->__pyx_n_s_num); Py_CLEAR(clear_module_state->__pyx_n_s_num_texture_formats); Py_CLEAR(clear_module_state->__pyx_kp_s_only_one_of_static_streaming_or); Py_CLEAR(clear_module_state->__pyx_n_s_opengl); Py_CLEAR(clear_module_state->__pyx_n_s_origin); Py_CLEAR(clear_module_state->__pyx_n_s_os); Py_CLEAR(clear_module_state->__pyx_n_s_other); Py_CLEAR(clear_module_state->__pyx_n_s_p1); Py_CLEAR(clear_module_state->__pyx_n_s_p2); Py_CLEAR(clear_module_state->__pyx_n_s_parent); Py_CLEAR(clear_module_state->__pyx_n_s_pixel_format); Py_CLEAR(clear_module_state->__pyx_n_s_pkgdata); Py_CLEAR(clear_module_state->__pyx_n_s_point); Py_CLEAR(clear_module_state->__pyx_n_s_popup_menu); Py_CLEAR(clear_module_state->__pyx_n_s_position); Py_CLEAR(clear_module_state->__pyx_n_s_prepare); Py_CLEAR(clear_module_state->__pyx_n_s_present); Py_CLEAR(clear_module_state->__pyx_n_s_ptr); Py_CLEAR(clear_module_state->__pyx_n_s_pygame); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sdl2_video); Py_CLEAR(clear_module_state->__pyx_kp_s_pygame_icon_bmp); Py_CLEAR(clear_module_state->__pyx_n_s_pygame_pkgdata); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); Py_CLEAR(clear_module_state->__pyx_n_s_qualname); Py_CLEAR(clear_module_state->__pyx_n_s_rarea); Py_CLEAR(clear_module_state->__pyx_n_s_rect); Py_CLEAR(clear_module_state->__pyx_n_s_rect_2); Py_CLEAR(clear_module_state->__pyx_kp_s_rect_values_are_out_of_range); Py_CLEAR(clear_module_state->__pyx_n_s_rectptr); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_renderer); Py_CLEAR(clear_module_state->__pyx_n_s_renderer_2); Py_CLEAR(clear_module_state->__pyx_n_s_repr); Py_CLEAR(clear_module_state->__pyx_n_s_res); Py_CLEAR(clear_module_state->__pyx_n_s_resizable); Py_CLEAR(clear_module_state->__pyx_n_s_restore); Py_CLEAR(clear_module_state->__pyx_n_s_ret); Py_CLEAR(clear_module_state->__pyx_n_s_return_button); Py_CLEAR(clear_module_state->__pyx_n_s_reversed); Py_CLEAR(clear_module_state->__pyx_n_s_s); Py_CLEAR(clear_module_state->__pyx_kp_s_s_name_s_flags_0x_02x_num_textu); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_kp_s_self__renderer_cannot_be_convert); Py_CLEAR(clear_module_state->__pyx_kp_s_self__win_cannot_be_converted_to); Py_CLEAR(clear_module_state->__pyx_n_s_send); Py_CLEAR(clear_module_state->__pyx_n_s_set_colorkey); Py_CLEAR(clear_module_state->__pyx_n_s_set_fullscreen); Py_CLEAR(clear_module_state->__pyx_n_s_set_icon); Py_CLEAR(clear_module_state->__pyx_n_s_set_modal_for); Py_CLEAR(clear_module_state->__pyx_n_s_set_name); Py_CLEAR(clear_module_state->__pyx_n_s_set_viewport); Py_CLEAR(clear_module_state->__pyx_n_s_set_windowed); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_show); Py_CLEAR(clear_module_state->__pyx_n_s_size); Py_CLEAR(clear_module_state->__pyx_kp_s_size_must_contain_two_positive_v); Py_CLEAR(clear_module_state->__pyx_kp_s_size_must_have_two_elements); Py_CLEAR(clear_module_state->__pyx_n_s_skip_taskbar); Py_CLEAR(clear_module_state->__pyx_n_s_source); Py_CLEAR(clear_module_state->__pyx_kp_s_source_must_be_drawable); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_n_s_special_flags); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_video); Py_CLEAR(clear_module_state->__pyx_n_s_srcrect); Py_CLEAR(clear_module_state->__pyx_kp_s_srcrect_must_be_None_or_a_rectan); Py_CLEAR(clear_module_state->__pyx_kp_s_srcrect_must_be_a_rect_or_None); Py_CLEAR(clear_module_state->__pyx_n_s_static); Py_CLEAR(clear_module_state->__pyx_n_s_staticmethod); Py_CLEAR(clear_module_state->__pyx_n_s_streaming); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_super); Py_CLEAR(clear_module_state->__pyx_n_s_surf); Py_CLEAR(clear_module_state->__pyx_n_s_surf_ptr); Py_CLEAR(clear_module_state->__pyx_n_s_surface); Py_CLEAR(clear_module_state->__pyx_kp_s_surface_must_be_a_Surface_object); Py_CLEAR(clear_module_state->__pyx_kp_s_surface_must_be_a_surface_or_No); Py_CLEAR(clear_module_state->__pyx_n_s_target); Py_CLEAR(clear_module_state->__pyx_kp_s_target_must_be_a_Texture_or_None); Py_CLEAR(clear_module_state->__pyx_n_s_target_texture); Py_CLEAR(clear_module_state->__pyx_n_s_tempviewport); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_texture); Py_CLEAR(clear_module_state->__pyx_n_s_textureOrImage); Py_CLEAR(clear_module_state->__pyx_kp_s_the_argument_is_not_a_rectangle); Py_CLEAR(clear_module_state->__pyx_kp_s_the_surface_is_too_small); Py_CLEAR(clear_module_state->__pyx_n_s_throw); Py_CLEAR(clear_module_state->__pyx_n_s_title); Py_CLEAR(clear_module_state->__pyx_n_s_tmprect); Py_CLEAR(clear_module_state->__pyx_n_s_to_surface); Py_CLEAR(clear_module_state->__pyx_n_s_tooltip); Py_CLEAR(clear_module_state->__pyx_kp_s_unknown_parameter_s); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_kp_s_update_source_should_be_a_Surfac); Py_CLEAR(clear_module_state->__pyx_n_s_utf8); Py_CLEAR(clear_module_state->__pyx_n_s_utility); Py_CLEAR(clear_module_state->__pyx_n_s_vsync); Py_CLEAR(clear_module_state->__pyx_n_s_vulkan); Py_CLEAR(clear_module_state->__pyx_n_s_w); Py_CLEAR(clear_module_state->__pyx_n_s_warn); Py_CLEAR(clear_module_state->__pyx_n_s_win); Py_CLEAR(clear_module_state->__pyx_n_s_window); Py_CLEAR(clear_module_state->__pyx_n_s_x); Py_CLEAR(clear_module_state->__pyx_n_s_y); Py_CLEAR(clear_module_state->__pyx_float_0_0); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_3); Py_CLEAR(clear_module_state->__pyx_int_480); Py_CLEAR(clear_module_state->__pyx_int_640); Py_CLEAR(clear_module_state->__pyx_k__3); Py_CLEAR(clear_module_state->__pyx_k__4); Py_CLEAR(clear_module_state->__pyx_codeobj_); Py_CLEAR(clear_module_state->__pyx_tuple__2); Py_CLEAR(clear_module_state->__pyx_tuple__5); Py_CLEAR(clear_module_state->__pyx_tuple__6); Py_CLEAR(clear_module_state->__pyx_tuple__7); Py_CLEAR(clear_module_state->__pyx_tuple__8); Py_CLEAR(clear_module_state->__pyx_tuple__9); Py_CLEAR(clear_module_state->__pyx_slice__19); Py_CLEAR(clear_module_state->__pyx_slice__21); Py_CLEAR(clear_module_state->__pyx_tuple__10); Py_CLEAR(clear_module_state->__pyx_tuple__11); Py_CLEAR(clear_module_state->__pyx_tuple__12); Py_CLEAR(clear_module_state->__pyx_tuple__13); Py_CLEAR(clear_module_state->__pyx_tuple__14); Py_CLEAR(clear_module_state->__pyx_tuple__15); Py_CLEAR(clear_module_state->__pyx_tuple__16); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__18); Py_CLEAR(clear_module_state->__pyx_tuple__20); Py_CLEAR(clear_module_state->__pyx_tuple__22); Py_CLEAR(clear_module_state->__pyx_tuple__23); Py_CLEAR(clear_module_state->__pyx_tuple__24); Py_CLEAR(clear_module_state->__pyx_tuple__25); Py_CLEAR(clear_module_state->__pyx_tuple__26); Py_CLEAR(clear_module_state->__pyx_tuple__27); Py_CLEAR(clear_module_state->__pyx_tuple__28); Py_CLEAR(clear_module_state->__pyx_tuple__31); Py_CLEAR(clear_module_state->__pyx_tuple__33); Py_CLEAR(clear_module_state->__pyx_tuple__34); Py_CLEAR(clear_module_state->__pyx_tuple__36); Py_CLEAR(clear_module_state->__pyx_tuple__38); Py_CLEAR(clear_module_state->__pyx_tuple__39); Py_CLEAR(clear_module_state->__pyx_tuple__41); Py_CLEAR(clear_module_state->__pyx_tuple__44); Py_CLEAR(clear_module_state->__pyx_tuple__46); Py_CLEAR(clear_module_state->__pyx_tuple__50); Py_CLEAR(clear_module_state->__pyx_tuple__55); Py_CLEAR(clear_module_state->__pyx_tuple__57); Py_CLEAR(clear_module_state->__pyx_tuple__60); Py_CLEAR(clear_module_state->__pyx_tuple__62); Py_CLEAR(clear_module_state->__pyx_tuple__64); Py_CLEAR(clear_module_state->__pyx_tuple__66); Py_CLEAR(clear_module_state->__pyx_tuple__68); Py_CLEAR(clear_module_state->__pyx_tuple__69); Py_CLEAR(clear_module_state->__pyx_tuple__71); Py_CLEAR(clear_module_state->__pyx_tuple__75); Py_CLEAR(clear_module_state->__pyx_tuple__77); Py_CLEAR(clear_module_state->__pyx_tuple__80); Py_CLEAR(clear_module_state->__pyx_tuple__82); Py_CLEAR(clear_module_state->__pyx_tuple__86); Py_CLEAR(clear_module_state->__pyx_tuple__88); Py_CLEAR(clear_module_state->__pyx_tuple__90); Py_CLEAR(clear_module_state->__pyx_tuple__91); Py_CLEAR(clear_module_state->__pyx_tuple__93); Py_CLEAR(clear_module_state->__pyx_tuple__95); Py_CLEAR(clear_module_state->__pyx_tuple__98); Py_CLEAR(clear_module_state->__pyx_tuple__100); Py_CLEAR(clear_module_state->__pyx_codeobj__32); Py_CLEAR(clear_module_state->__pyx_codeobj__35); Py_CLEAR(clear_module_state->__pyx_codeobj__37); Py_CLEAR(clear_module_state->__pyx_codeobj__40); Py_CLEAR(clear_module_state->__pyx_codeobj__42); Py_CLEAR(clear_module_state->__pyx_codeobj__43); Py_CLEAR(clear_module_state->__pyx_codeobj__45); Py_CLEAR(clear_module_state->__pyx_codeobj__47); Py_CLEAR(clear_module_state->__pyx_codeobj__48); Py_CLEAR(clear_module_state->__pyx_codeobj__49); Py_CLEAR(clear_module_state->__pyx_codeobj__51); Py_CLEAR(clear_module_state->__pyx_codeobj__52); Py_CLEAR(clear_module_state->__pyx_codeobj__53); Py_CLEAR(clear_module_state->__pyx_codeobj__54); Py_CLEAR(clear_module_state->__pyx_codeobj__56); Py_CLEAR(clear_module_state->__pyx_codeobj__58); Py_CLEAR(clear_module_state->__pyx_codeobj__59); Py_CLEAR(clear_module_state->__pyx_codeobj__61); Py_CLEAR(clear_module_state->__pyx_codeobj__63); Py_CLEAR(clear_module_state->__pyx_codeobj__65); Py_CLEAR(clear_module_state->__pyx_codeobj__67); Py_CLEAR(clear_module_state->__pyx_codeobj__70); Py_CLEAR(clear_module_state->__pyx_codeobj__72); Py_CLEAR(clear_module_state->__pyx_codeobj__73); Py_CLEAR(clear_module_state->__pyx_codeobj__74); Py_CLEAR(clear_module_state->__pyx_codeobj__76); Py_CLEAR(clear_module_state->__pyx_codeobj__78); Py_CLEAR(clear_module_state->__pyx_codeobj__79); Py_CLEAR(clear_module_state->__pyx_codeobj__81); Py_CLEAR(clear_module_state->__pyx_codeobj__83); Py_CLEAR(clear_module_state->__pyx_codeobj__84); Py_CLEAR(clear_module_state->__pyx_codeobj__85); Py_CLEAR(clear_module_state->__pyx_codeobj__87); Py_CLEAR(clear_module_state->__pyx_codeobj__89); Py_CLEAR(clear_module_state->__pyx_codeobj__92); Py_CLEAR(clear_module_state->__pyx_codeobj__94); Py_CLEAR(clear_module_state->__pyx_codeobj__96); Py_CLEAR(clear_module_state->__pyx_codeobj__97); Py_CLEAR(clear_module_state->__pyx_codeobj__99); Py_CLEAR(clear_module_state->__pyx_codeobj__101); Py_CLEAR(clear_module_state->__pyx_codeobj__102); Py_CLEAR(clear_module_state->__pyx_codeobj__103); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Color); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Rect); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Window); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5video_Window); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Renderer); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5video_Renderer); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Texture); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5video_Texture); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Image); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5video_Image); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers); Py_VISIT(traverse_module_state->__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers); Py_VISIT(traverse_module_state->__pyx_kp_s_2nd_argument_must_be_a_surface); Py_VISIT(traverse_module_state->__pyx_n_s_DEFAULT_SIZE); Py_VISIT(traverse_module_state->__pyx_n_s_Image); Py_VISIT(traverse_module_state->__pyx_n_s_Image___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Image___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Image_draw); Py_VISIT(traverse_module_state->__pyx_n_s_Image_get_rect); Py_VISIT(traverse_module_state->__pyx_n_s_KeyError); Py_VISIT(traverse_module_state->__pyx_n_s_MESSAGEBOX_ERROR); Py_VISIT(traverse_module_state->__pyx_n_s_MESSAGEBOX_INFORMATION); Py_VISIT(traverse_module_state->__pyx_n_s_MESSAGEBOX_WARNING); Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError); Py_VISIT(traverse_module_state->__pyx_n_s_OK); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer); Py_VISIT(traverse_module_state->__pyx_n_s_RendererDriverInfo); Py_VISIT(traverse_module_state->__pyx_n_s_RendererDriverInfo___repr); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_blit); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_clear); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_compose_custom_blend_mo); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_draw_line); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_draw_point); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_draw_rect); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_fill_rect); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_from_window); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_get_viewport); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_present); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_set_viewport); Py_VISIT(traverse_module_state->__pyx_n_s_Renderer_to_surface); Py_VISIT(traverse_module_state->__pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE); Py_VISIT(traverse_module_state->__pyx_n_s_Texture); Py_VISIT(traverse_module_state->__pyx_n_s_Texture___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Texture___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Texture_draw); Py_VISIT(traverse_module_state->__pyx_n_s_Texture_from_surface); Py_VISIT(traverse_module_state->__pyx_n_s_Texture_get_rect); Py_VISIT(traverse_module_state->__pyx_n_s_Texture_update); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); Py_VISIT(traverse_module_state->__pyx_n_s_WINDOWPOS_CENTERED); Py_VISIT(traverse_module_state->__pyx_n_s_WINDOWPOS_UNDEFINED); Py_VISIT(traverse_module_state->__pyx_n_s_Window); Py_VISIT(traverse_module_state->__pyx_n_s_Window___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Window___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Window_destroy); Py_VISIT(traverse_module_state->__pyx_n_s_Window_focus); Py_VISIT(traverse_module_state->__pyx_n_s_Window_from_display_module); Py_VISIT(traverse_module_state->__pyx_n_s_Window_from_window); Py_VISIT(traverse_module_state->__pyx_n_s_Window_hide); Py_VISIT(traverse_module_state->__pyx_n_s_Window_maximize); Py_VISIT(traverse_module_state->__pyx_n_s_Window_minimize); Py_VISIT(traverse_module_state->__pyx_n_s_Window_restore); Py_VISIT(traverse_module_state->__pyx_n_s_Window_set_fullscreen); Py_VISIT(traverse_module_state->__pyx_n_s_Window_set_icon); Py_VISIT(traverse_module_state->__pyx_n_s_Window_set_modal_for); Py_VISIT(traverse_module_state->__pyx_n_s_Window_set_windowed); Py_VISIT(traverse_module_state->__pyx_n_s_Window_show); Py_VISIT(traverse_module_state->__pyx_n_s__104); Py_VISIT(traverse_module_state->__pyx_kp_u__29); Py_VISIT(traverse_module_state->__pyx_n_s__30); Py_VISIT(traverse_module_state->__pyx_n_s_accelerated); Py_VISIT(traverse_module_state->__pyx_n_s_allow_highdpi); Py_VISIT(traverse_module_state->__pyx_n_s_alpha); Py_VISIT(traverse_module_state->__pyx_n_s_alpha_mode); Py_VISIT(traverse_module_state->__pyx_n_s_always_on_top); Py_VISIT(traverse_module_state->__pyx_n_s_angle); Py_VISIT(traverse_module_state->__pyx_n_s_area); Py_VISIT(traverse_module_state->__pyx_kp_s_area_must_be_None_or_a_rect); Py_VISIT(traverse_module_state->__pyx_kp_s_area_must_be_a_rectangle_or_None); Py_VISIT(traverse_module_state->__pyx_n_s_areaparam); Py_VISIT(traverse_module_state->__pyx_n_s_args); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_blend); Py_VISIT(traverse_module_state->__pyx_n_s_blend_mode); Py_VISIT(traverse_module_state->__pyx_n_s_blit); Py_VISIT(traverse_module_state->__pyx_n_s_borderless); Py_VISIT(traverse_module_state->__pyx_n_s_but); Py_VISIT(traverse_module_state->__pyx_n_s_button); Py_VISIT(traverse_module_state->__pyx_n_s_buttonid); Py_VISIT(traverse_module_state->__pyx_n_s_buttons); Py_VISIT(traverse_module_state->__pyx_n_s_buttons_utf8); Py_VISIT(traverse_module_state->__pyx_n_s_c_buttons); Py_VISIT(traverse_module_state->__pyx_n_s_class); Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); Py_VISIT(traverse_module_state->__pyx_n_s_clear); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_close); Py_VISIT(traverse_module_state->__pyx_n_s_cls); Py_VISIT(traverse_module_state->__pyx_n_s_color); Py_VISIT(traverse_module_state->__pyx_n_s_color_mode); Py_VISIT(traverse_module_state->__pyx_n_s_compose_custom_blend_mode); Py_VISIT(traverse_module_state->__pyx_n_s_converted_surf); Py_VISIT(traverse_module_state->__pyx_n_s_data); Py_VISIT(traverse_module_state->__pyx_n_s_data_ptr); Py_VISIT(traverse_module_state->__pyx_n_s_defaultColor); Py_VISIT(traverse_module_state->__pyx_n_s_depth); Py_VISIT(traverse_module_state->__pyx_n_s_desktop); Py_VISIT(traverse_module_state->__pyx_n_s_dest); Py_VISIT(traverse_module_state->__pyx_n_s_destroy); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_doc); Py_VISIT(traverse_module_state->__pyx_n_s_draw); Py_VISIT(traverse_module_state->__pyx_n_s_draw_line); Py_VISIT(traverse_module_state->__pyx_n_s_draw_point); Py_VISIT(traverse_module_state->__pyx_n_s_draw_rect); Py_VISIT(traverse_module_state->__pyx_n_s_dstrect); Py_VISIT(traverse_module_state->__pyx_kp_s_dstrect_must_be_a_position_rect); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_encode); Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); Py_VISIT(traverse_module_state->__pyx_n_s_environ); Py_VISIT(traverse_module_state->__pyx_n_s_error); Py_VISIT(traverse_module_state->__pyx_n_s_errorfnc); Py_VISIT(traverse_module_state->__pyx_n_s_escape_button); Py_VISIT(traverse_module_state->__pyx_kp_s_expected_a_rectangle); Py_VISIT(traverse_module_state->__pyx_n_s_fill_rect); Py_VISIT(traverse_module_state->__pyx_n_s_flags); Py_VISIT(traverse_module_state->__pyx_n_s_flip_x); Py_VISIT(traverse_module_state->__pyx_n_s_flip_y); Py_VISIT(traverse_module_state->__pyx_n_s_focus); Py_VISIT(traverse_module_state->__pyx_n_s_foreign); Py_VISIT(traverse_module_state->__pyx_n_s_format); Py_VISIT(traverse_module_state->__pyx_n_s_format_2); Py_VISIT(traverse_module_state->__pyx_n_s_from_display_module); Py_VISIT(traverse_module_state->__pyx_n_s_from_surface); Py_VISIT(traverse_module_state->__pyx_n_s_from_window); Py_VISIT(traverse_module_state->__pyx_n_s_fullscreen); Py_VISIT(traverse_module_state->__pyx_kp_s_fullscreen_and_fullscreen_deskto); Py_VISIT(traverse_module_state->__pyx_n_s_fullscreen_desktop); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_getResource); Py_VISIT(traverse_module_state->__pyx_n_s_get_drivers); Py_VISIT(traverse_module_state->__pyx_n_s_get_grabbed_window); Py_VISIT(traverse_module_state->__pyx_n_s_get_height); Py_VISIT(traverse_module_state->__pyx_n_s_get_rect); Py_VISIT(traverse_module_state->__pyx_n_s_get_viewport); Py_VISIT(traverse_module_state->__pyx_n_s_get_width); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_n_s_h); Py_VISIT(traverse_module_state->__pyx_n_s_hex); Py_VISIT(traverse_module_state->__pyx_n_s_hidden); Py_VISIT(traverse_module_state->__pyx_n_s_hide); Py_VISIT(traverse_module_state->__pyx_n_s_i); Py_VISIT(traverse_module_state->__pyx_n_s_image); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_ind); Py_VISIT(traverse_module_state->__pyx_n_s_index); Py_VISIT(traverse_module_state->__pyx_n_s_info); Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_n_s_input_focus); Py_VISIT(traverse_module_state->__pyx_n_s_input_grabbed); Py_VISIT(traverse_module_state->__pyx_n_s_input_only); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_items); Py_VISIT(traverse_module_state->__pyx_n_s_key); Py_VISIT(traverse_module_state->__pyx_n_s_kwarg_to_flag); Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); Py_VISIT(traverse_module_state->__pyx_n_s_load); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_max_texture_height); Py_VISIT(traverse_module_state->__pyx_n_s_max_texture_width); Py_VISIT(traverse_module_state->__pyx_n_s_maximize); Py_VISIT(traverse_module_state->__pyx_n_s_maximized); Py_VISIT(traverse_module_state->__pyx_n_s_message); Py_VISIT(traverse_module_state->__pyx_n_s_messagebox); Py_VISIT(traverse_module_state->__pyx_n_s_metaclass); Py_VISIT(traverse_module_state->__pyx_n_s_minimize); Py_VISIT(traverse_module_state->__pyx_n_s_minimized); Py_VISIT(traverse_module_state->__pyx_n_s_module); Py_VISIT(traverse_module_state->__pyx_n_s_mouse_capture); Py_VISIT(traverse_module_state->__pyx_n_s_mouse_focus); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_name_2); Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_kp_s_no_standard_masks_exist_for_give); Py_VISIT(traverse_module_state->__pyx_kp_s_not_enough_memory_for_the_surfac); Py_VISIT(traverse_module_state->__pyx_n_s_num); Py_VISIT(traverse_module_state->__pyx_n_s_num_texture_formats); Py_VISIT(traverse_module_state->__pyx_kp_s_only_one_of_static_streaming_or); Py_VISIT(traverse_module_state->__pyx_n_s_opengl); Py_VISIT(traverse_module_state->__pyx_n_s_origin); Py_VISIT(traverse_module_state->__pyx_n_s_os); Py_VISIT(traverse_module_state->__pyx_n_s_other); Py_VISIT(traverse_module_state->__pyx_n_s_p1); Py_VISIT(traverse_module_state->__pyx_n_s_p2); Py_VISIT(traverse_module_state->__pyx_n_s_parent); Py_VISIT(traverse_module_state->__pyx_n_s_pixel_format); Py_VISIT(traverse_module_state->__pyx_n_s_pkgdata); Py_VISIT(traverse_module_state->__pyx_n_s_point); Py_VISIT(traverse_module_state->__pyx_n_s_popup_menu); Py_VISIT(traverse_module_state->__pyx_n_s_position); Py_VISIT(traverse_module_state->__pyx_n_s_prepare); Py_VISIT(traverse_module_state->__pyx_n_s_present); Py_VISIT(traverse_module_state->__pyx_n_s_ptr); Py_VISIT(traverse_module_state->__pyx_n_s_pygame); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_sdl2); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sdl2_video); Py_VISIT(traverse_module_state->__pyx_kp_s_pygame_icon_bmp); Py_VISIT(traverse_module_state->__pyx_n_s_pygame_pkgdata); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); Py_VISIT(traverse_module_state->__pyx_n_s_qualname); Py_VISIT(traverse_module_state->__pyx_n_s_rarea); Py_VISIT(traverse_module_state->__pyx_n_s_rect); Py_VISIT(traverse_module_state->__pyx_n_s_rect_2); Py_VISIT(traverse_module_state->__pyx_kp_s_rect_values_are_out_of_range); Py_VISIT(traverse_module_state->__pyx_n_s_rectptr); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_renderer); Py_VISIT(traverse_module_state->__pyx_n_s_renderer_2); Py_VISIT(traverse_module_state->__pyx_n_s_repr); Py_VISIT(traverse_module_state->__pyx_n_s_res); Py_VISIT(traverse_module_state->__pyx_n_s_resizable); Py_VISIT(traverse_module_state->__pyx_n_s_restore); Py_VISIT(traverse_module_state->__pyx_n_s_ret); Py_VISIT(traverse_module_state->__pyx_n_s_return_button); Py_VISIT(traverse_module_state->__pyx_n_s_reversed); Py_VISIT(traverse_module_state->__pyx_n_s_s); Py_VISIT(traverse_module_state->__pyx_kp_s_s_name_s_flags_0x_02x_num_textu); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_kp_s_self__renderer_cannot_be_convert); Py_VISIT(traverse_module_state->__pyx_kp_s_self__win_cannot_be_converted_to); Py_VISIT(traverse_module_state->__pyx_n_s_send); Py_VISIT(traverse_module_state->__pyx_n_s_set_colorkey); Py_VISIT(traverse_module_state->__pyx_n_s_set_fullscreen); Py_VISIT(traverse_module_state->__pyx_n_s_set_icon); Py_VISIT(traverse_module_state->__pyx_n_s_set_modal_for); Py_VISIT(traverse_module_state->__pyx_n_s_set_name); Py_VISIT(traverse_module_state->__pyx_n_s_set_viewport); Py_VISIT(traverse_module_state->__pyx_n_s_set_windowed); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_show); Py_VISIT(traverse_module_state->__pyx_n_s_size); Py_VISIT(traverse_module_state->__pyx_kp_s_size_must_contain_two_positive_v); Py_VISIT(traverse_module_state->__pyx_kp_s_size_must_have_two_elements); Py_VISIT(traverse_module_state->__pyx_n_s_skip_taskbar); Py_VISIT(traverse_module_state->__pyx_n_s_source); Py_VISIT(traverse_module_state->__pyx_kp_s_source_must_be_drawable); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_n_s_special_flags); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sdl2_video); Py_VISIT(traverse_module_state->__pyx_n_s_srcrect); Py_VISIT(traverse_module_state->__pyx_kp_s_srcrect_must_be_None_or_a_rectan); Py_VISIT(traverse_module_state->__pyx_kp_s_srcrect_must_be_a_rect_or_None); Py_VISIT(traverse_module_state->__pyx_n_s_static); Py_VISIT(traverse_module_state->__pyx_n_s_staticmethod); Py_VISIT(traverse_module_state->__pyx_n_s_streaming); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_super); Py_VISIT(traverse_module_state->__pyx_n_s_surf); Py_VISIT(traverse_module_state->__pyx_n_s_surf_ptr); Py_VISIT(traverse_module_state->__pyx_n_s_surface); Py_VISIT(traverse_module_state->__pyx_kp_s_surface_must_be_a_Surface_object); Py_VISIT(traverse_module_state->__pyx_kp_s_surface_must_be_a_surface_or_No); Py_VISIT(traverse_module_state->__pyx_n_s_target); Py_VISIT(traverse_module_state->__pyx_kp_s_target_must_be_a_Texture_or_None); Py_VISIT(traverse_module_state->__pyx_n_s_target_texture); Py_VISIT(traverse_module_state->__pyx_n_s_tempviewport); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_texture); Py_VISIT(traverse_module_state->__pyx_n_s_textureOrImage); Py_VISIT(traverse_module_state->__pyx_kp_s_the_argument_is_not_a_rectangle); Py_VISIT(traverse_module_state->__pyx_kp_s_the_surface_is_too_small); Py_VISIT(traverse_module_state->__pyx_n_s_throw); Py_VISIT(traverse_module_state->__pyx_n_s_title); Py_VISIT(traverse_module_state->__pyx_n_s_tmprect); Py_VISIT(traverse_module_state->__pyx_n_s_to_surface); Py_VISIT(traverse_module_state->__pyx_n_s_tooltip); Py_VISIT(traverse_module_state->__pyx_kp_s_unknown_parameter_s); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_kp_s_update_source_should_be_a_Surfac); Py_VISIT(traverse_module_state->__pyx_n_s_utf8); Py_VISIT(traverse_module_state->__pyx_n_s_utility); Py_VISIT(traverse_module_state->__pyx_n_s_vsync); Py_VISIT(traverse_module_state->__pyx_n_s_vulkan); Py_VISIT(traverse_module_state->__pyx_n_s_w); Py_VISIT(traverse_module_state->__pyx_n_s_warn); Py_VISIT(traverse_module_state->__pyx_n_s_win); Py_VISIT(traverse_module_state->__pyx_n_s_window); Py_VISIT(traverse_module_state->__pyx_n_s_x); Py_VISIT(traverse_module_state->__pyx_n_s_y); Py_VISIT(traverse_module_state->__pyx_float_0_0); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_3); Py_VISIT(traverse_module_state->__pyx_int_480); Py_VISIT(traverse_module_state->__pyx_int_640); Py_VISIT(traverse_module_state->__pyx_k__3); Py_VISIT(traverse_module_state->__pyx_k__4); Py_VISIT(traverse_module_state->__pyx_codeobj_); Py_VISIT(traverse_module_state->__pyx_tuple__2); Py_VISIT(traverse_module_state->__pyx_tuple__5); Py_VISIT(traverse_module_state->__pyx_tuple__6); Py_VISIT(traverse_module_state->__pyx_tuple__7); Py_VISIT(traverse_module_state->__pyx_tuple__8); Py_VISIT(traverse_module_state->__pyx_tuple__9); Py_VISIT(traverse_module_state->__pyx_slice__19); Py_VISIT(traverse_module_state->__pyx_slice__21); Py_VISIT(traverse_module_state->__pyx_tuple__10); Py_VISIT(traverse_module_state->__pyx_tuple__11); Py_VISIT(traverse_module_state->__pyx_tuple__12); Py_VISIT(traverse_module_state->__pyx_tuple__13); Py_VISIT(traverse_module_state->__pyx_tuple__14); Py_VISIT(traverse_module_state->__pyx_tuple__15); Py_VISIT(traverse_module_state->__pyx_tuple__16); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__18); Py_VISIT(traverse_module_state->__pyx_tuple__20); Py_VISIT(traverse_module_state->__pyx_tuple__22); Py_VISIT(traverse_module_state->__pyx_tuple__23); Py_VISIT(traverse_module_state->__pyx_tuple__24); Py_VISIT(traverse_module_state->__pyx_tuple__25); Py_VISIT(traverse_module_state->__pyx_tuple__26); Py_VISIT(traverse_module_state->__pyx_tuple__27); Py_VISIT(traverse_module_state->__pyx_tuple__28); Py_VISIT(traverse_module_state->__pyx_tuple__31); Py_VISIT(traverse_module_state->__pyx_tuple__33); Py_VISIT(traverse_module_state->__pyx_tuple__34); Py_VISIT(traverse_module_state->__pyx_tuple__36); Py_VISIT(traverse_module_state->__pyx_tuple__38); Py_VISIT(traverse_module_state->__pyx_tuple__39); Py_VISIT(traverse_module_state->__pyx_tuple__41); Py_VISIT(traverse_module_state->__pyx_tuple__44); Py_VISIT(traverse_module_state->__pyx_tuple__46); Py_VISIT(traverse_module_state->__pyx_tuple__50); Py_VISIT(traverse_module_state->__pyx_tuple__55); Py_VISIT(traverse_module_state->__pyx_tuple__57); Py_VISIT(traverse_module_state->__pyx_tuple__60); Py_VISIT(traverse_module_state->__pyx_tuple__62); Py_VISIT(traverse_module_state->__pyx_tuple__64); Py_VISIT(traverse_module_state->__pyx_tuple__66); Py_VISIT(traverse_module_state->__pyx_tuple__68); Py_VISIT(traverse_module_state->__pyx_tuple__69); Py_VISIT(traverse_module_state->__pyx_tuple__71); Py_VISIT(traverse_module_state->__pyx_tuple__75); Py_VISIT(traverse_module_state->__pyx_tuple__77); Py_VISIT(traverse_module_state->__pyx_tuple__80); Py_VISIT(traverse_module_state->__pyx_tuple__82); Py_VISIT(traverse_module_state->__pyx_tuple__86); Py_VISIT(traverse_module_state->__pyx_tuple__88); Py_VISIT(traverse_module_state->__pyx_tuple__90); Py_VISIT(traverse_module_state->__pyx_tuple__91); Py_VISIT(traverse_module_state->__pyx_tuple__93); Py_VISIT(traverse_module_state->__pyx_tuple__95); Py_VISIT(traverse_module_state->__pyx_tuple__98); Py_VISIT(traverse_module_state->__pyx_tuple__100); Py_VISIT(traverse_module_state->__pyx_codeobj__32); Py_VISIT(traverse_module_state->__pyx_codeobj__35); Py_VISIT(traverse_module_state->__pyx_codeobj__37); Py_VISIT(traverse_module_state->__pyx_codeobj__40); Py_VISIT(traverse_module_state->__pyx_codeobj__42); Py_VISIT(traverse_module_state->__pyx_codeobj__43); Py_VISIT(traverse_module_state->__pyx_codeobj__45); Py_VISIT(traverse_module_state->__pyx_codeobj__47); Py_VISIT(traverse_module_state->__pyx_codeobj__48); Py_VISIT(traverse_module_state->__pyx_codeobj__49); Py_VISIT(traverse_module_state->__pyx_codeobj__51); Py_VISIT(traverse_module_state->__pyx_codeobj__52); Py_VISIT(traverse_module_state->__pyx_codeobj__53); Py_VISIT(traverse_module_state->__pyx_codeobj__54); Py_VISIT(traverse_module_state->__pyx_codeobj__56); Py_VISIT(traverse_module_state->__pyx_codeobj__58); Py_VISIT(traverse_module_state->__pyx_codeobj__59); Py_VISIT(traverse_module_state->__pyx_codeobj__61); Py_VISIT(traverse_module_state->__pyx_codeobj__63); Py_VISIT(traverse_module_state->__pyx_codeobj__65); Py_VISIT(traverse_module_state->__pyx_codeobj__67); Py_VISIT(traverse_module_state->__pyx_codeobj__70); Py_VISIT(traverse_module_state->__pyx_codeobj__72); Py_VISIT(traverse_module_state->__pyx_codeobj__73); Py_VISIT(traverse_module_state->__pyx_codeobj__74); Py_VISIT(traverse_module_state->__pyx_codeobj__76); Py_VISIT(traverse_module_state->__pyx_codeobj__78); Py_VISIT(traverse_module_state->__pyx_codeobj__79); Py_VISIT(traverse_module_state->__pyx_codeobj__81); Py_VISIT(traverse_module_state->__pyx_codeobj__83); Py_VISIT(traverse_module_state->__pyx_codeobj__84); Py_VISIT(traverse_module_state->__pyx_codeobj__85); Py_VISIT(traverse_module_state->__pyx_codeobj__87); Py_VISIT(traverse_module_state->__pyx_codeobj__89); Py_VISIT(traverse_module_state->__pyx_codeobj__92); Py_VISIT(traverse_module_state->__pyx_codeobj__94); Py_VISIT(traverse_module_state->__pyx_codeobj__96); Py_VISIT(traverse_module_state->__pyx_codeobj__97); Py_VISIT(traverse_module_state->__pyx_codeobj__99); Py_VISIT(traverse_module_state->__pyx_codeobj__101); Py_VISIT(traverse_module_state->__pyx_codeobj__102); Py_VISIT(traverse_module_state->__pyx_codeobj__103); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_5_sdl2_5video_Window __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5video_Window #define __pyx_type_6pygame_5_sdl2_5video_Renderer __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5video_Renderer #define __pyx_type_6pygame_5_sdl2_5video_Texture __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5video_Texture #define __pyx_type_6pygame_5_sdl2_5video_Image __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5video_Image #define __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers __pyx_mstate_global->__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers #endif #define __pyx_ptype_6pygame_5_sdl2_5video_Color __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Color #define __pyx_ptype_6pygame_5_sdl2_5video_Rect __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Rect #define __pyx_ptype_6pygame_5_sdl2_5video_Window __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Window #define __pyx_ptype_6pygame_5_sdl2_5video_Renderer __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Renderer #define __pyx_ptype_6pygame_5_sdl2_5video_Texture __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Texture #define __pyx_ptype_6pygame_5_sdl2_5video_Image __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Image #define __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers #define __pyx_kp_s_2nd_argument_must_be_a_surface __pyx_mstate_global->__pyx_kp_s_2nd_argument_must_be_a_surface #define __pyx_n_s_DEFAULT_SIZE __pyx_mstate_global->__pyx_n_s_DEFAULT_SIZE #define __pyx_n_s_Image __pyx_mstate_global->__pyx_n_s_Image #define __pyx_n_s_Image___reduce_cython __pyx_mstate_global->__pyx_n_s_Image___reduce_cython #define __pyx_n_s_Image___setstate_cython __pyx_mstate_global->__pyx_n_s_Image___setstate_cython #define __pyx_n_s_Image_draw __pyx_mstate_global->__pyx_n_s_Image_draw #define __pyx_n_s_Image_get_rect __pyx_mstate_global->__pyx_n_s_Image_get_rect #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError #define __pyx_n_s_MESSAGEBOX_ERROR __pyx_mstate_global->__pyx_n_s_MESSAGEBOX_ERROR #define __pyx_n_s_MESSAGEBOX_INFORMATION __pyx_mstate_global->__pyx_n_s_MESSAGEBOX_INFORMATION #define __pyx_n_s_MESSAGEBOX_WARNING __pyx_mstate_global->__pyx_n_s_MESSAGEBOX_WARNING #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError #define __pyx_n_s_OK __pyx_mstate_global->__pyx_n_s_OK #define __pyx_n_s_Renderer __pyx_mstate_global->__pyx_n_s_Renderer #define __pyx_n_s_RendererDriverInfo __pyx_mstate_global->__pyx_n_s_RendererDriverInfo #define __pyx_n_s_RendererDriverInfo___repr __pyx_mstate_global->__pyx_n_s_RendererDriverInfo___repr #define __pyx_n_s_Renderer___reduce_cython __pyx_mstate_global->__pyx_n_s_Renderer___reduce_cython #define __pyx_n_s_Renderer___setstate_cython __pyx_mstate_global->__pyx_n_s_Renderer___setstate_cython #define __pyx_n_s_Renderer_blit __pyx_mstate_global->__pyx_n_s_Renderer_blit #define __pyx_n_s_Renderer_clear __pyx_mstate_global->__pyx_n_s_Renderer_clear #define __pyx_n_s_Renderer_compose_custom_blend_mo __pyx_mstate_global->__pyx_n_s_Renderer_compose_custom_blend_mo #define __pyx_n_s_Renderer_draw_line __pyx_mstate_global->__pyx_n_s_Renderer_draw_line #define __pyx_n_s_Renderer_draw_point __pyx_mstate_global->__pyx_n_s_Renderer_draw_point #define __pyx_n_s_Renderer_draw_rect __pyx_mstate_global->__pyx_n_s_Renderer_draw_rect #define __pyx_n_s_Renderer_fill_rect __pyx_mstate_global->__pyx_n_s_Renderer_fill_rect #define __pyx_n_s_Renderer_from_window __pyx_mstate_global->__pyx_n_s_Renderer_from_window #define __pyx_n_s_Renderer_get_viewport __pyx_mstate_global->__pyx_n_s_Renderer_get_viewport #define __pyx_n_s_Renderer_present __pyx_mstate_global->__pyx_n_s_Renderer_present #define __pyx_n_s_Renderer_set_viewport __pyx_mstate_global->__pyx_n_s_Renderer_set_viewport #define __pyx_n_s_Renderer_to_surface __pyx_mstate_global->__pyx_n_s_Renderer_to_surface #define __pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE __pyx_mstate_global->__pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE #define __pyx_n_s_Texture __pyx_mstate_global->__pyx_n_s_Texture #define __pyx_n_s_Texture___reduce_cython __pyx_mstate_global->__pyx_n_s_Texture___reduce_cython #define __pyx_n_s_Texture___setstate_cython __pyx_mstate_global->__pyx_n_s_Texture___setstate_cython #define __pyx_n_s_Texture_draw __pyx_mstate_global->__pyx_n_s_Texture_draw #define __pyx_n_s_Texture_from_surface __pyx_mstate_global->__pyx_n_s_Texture_from_surface #define __pyx_n_s_Texture_get_rect __pyx_mstate_global->__pyx_n_s_Texture_get_rect #define __pyx_n_s_Texture_update __pyx_mstate_global->__pyx_n_s_Texture_update #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError #define __pyx_n_s_WINDOWPOS_CENTERED __pyx_mstate_global->__pyx_n_s_WINDOWPOS_CENTERED #define __pyx_n_s_WINDOWPOS_UNDEFINED __pyx_mstate_global->__pyx_n_s_WINDOWPOS_UNDEFINED #define __pyx_n_s_Window __pyx_mstate_global->__pyx_n_s_Window #define __pyx_n_s_Window___reduce_cython __pyx_mstate_global->__pyx_n_s_Window___reduce_cython #define __pyx_n_s_Window___setstate_cython __pyx_mstate_global->__pyx_n_s_Window___setstate_cython #define __pyx_n_s_Window_destroy __pyx_mstate_global->__pyx_n_s_Window_destroy #define __pyx_n_s_Window_focus __pyx_mstate_global->__pyx_n_s_Window_focus #define __pyx_n_s_Window_from_display_module __pyx_mstate_global->__pyx_n_s_Window_from_display_module #define __pyx_n_s_Window_from_window __pyx_mstate_global->__pyx_n_s_Window_from_window #define __pyx_n_s_Window_hide __pyx_mstate_global->__pyx_n_s_Window_hide #define __pyx_n_s_Window_maximize __pyx_mstate_global->__pyx_n_s_Window_maximize #define __pyx_n_s_Window_minimize __pyx_mstate_global->__pyx_n_s_Window_minimize #define __pyx_n_s_Window_restore __pyx_mstate_global->__pyx_n_s_Window_restore #define __pyx_n_s_Window_set_fullscreen __pyx_mstate_global->__pyx_n_s_Window_set_fullscreen #define __pyx_n_s_Window_set_icon __pyx_mstate_global->__pyx_n_s_Window_set_icon #define __pyx_n_s_Window_set_modal_for __pyx_mstate_global->__pyx_n_s_Window_set_modal_for #define __pyx_n_s_Window_set_windowed __pyx_mstate_global->__pyx_n_s_Window_set_windowed #define __pyx_n_s_Window_show __pyx_mstate_global->__pyx_n_s_Window_show #define __pyx_n_s__104 __pyx_mstate_global->__pyx_n_s__104 #define __pyx_kp_u__29 __pyx_mstate_global->__pyx_kp_u__29 #define __pyx_n_s__30 __pyx_mstate_global->__pyx_n_s__30 #define __pyx_n_s_accelerated __pyx_mstate_global->__pyx_n_s_accelerated #define __pyx_n_s_allow_highdpi __pyx_mstate_global->__pyx_n_s_allow_highdpi #define __pyx_n_s_alpha __pyx_mstate_global->__pyx_n_s_alpha #define __pyx_n_s_alpha_mode __pyx_mstate_global->__pyx_n_s_alpha_mode #define __pyx_n_s_always_on_top __pyx_mstate_global->__pyx_n_s_always_on_top #define __pyx_n_s_angle __pyx_mstate_global->__pyx_n_s_angle #define __pyx_n_s_area __pyx_mstate_global->__pyx_n_s_area #define __pyx_kp_s_area_must_be_None_or_a_rect __pyx_mstate_global->__pyx_kp_s_area_must_be_None_or_a_rect #define __pyx_kp_s_area_must_be_a_rectangle_or_None __pyx_mstate_global->__pyx_kp_s_area_must_be_a_rectangle_or_None #define __pyx_n_s_areaparam __pyx_mstate_global->__pyx_n_s_areaparam #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_blend __pyx_mstate_global->__pyx_n_s_blend #define __pyx_n_s_blend_mode __pyx_mstate_global->__pyx_n_s_blend_mode #define __pyx_n_s_blit __pyx_mstate_global->__pyx_n_s_blit #define __pyx_n_s_borderless __pyx_mstate_global->__pyx_n_s_borderless #define __pyx_n_s_but __pyx_mstate_global->__pyx_n_s_but #define __pyx_n_s_button __pyx_mstate_global->__pyx_n_s_button #define __pyx_n_s_buttonid __pyx_mstate_global->__pyx_n_s_buttonid #define __pyx_n_s_buttons __pyx_mstate_global->__pyx_n_s_buttons #define __pyx_n_s_buttons_utf8 __pyx_mstate_global->__pyx_n_s_buttons_utf8 #define __pyx_n_s_c_buttons __pyx_mstate_global->__pyx_n_s_c_buttons #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem #define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close #define __pyx_n_s_cls __pyx_mstate_global->__pyx_n_s_cls #define __pyx_n_s_color __pyx_mstate_global->__pyx_n_s_color #define __pyx_n_s_color_mode __pyx_mstate_global->__pyx_n_s_color_mode #define __pyx_n_s_compose_custom_blend_mode __pyx_mstate_global->__pyx_n_s_compose_custom_blend_mode #define __pyx_n_s_converted_surf __pyx_mstate_global->__pyx_n_s_converted_surf #define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data #define __pyx_n_s_data_ptr __pyx_mstate_global->__pyx_n_s_data_ptr #define __pyx_n_s_defaultColor __pyx_mstate_global->__pyx_n_s_defaultColor #define __pyx_n_s_depth __pyx_mstate_global->__pyx_n_s_depth #define __pyx_n_s_desktop __pyx_mstate_global->__pyx_n_s_desktop #define __pyx_n_s_dest __pyx_mstate_global->__pyx_n_s_dest #define __pyx_n_s_destroy __pyx_mstate_global->__pyx_n_s_destroy #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc #define __pyx_n_s_draw __pyx_mstate_global->__pyx_n_s_draw #define __pyx_n_s_draw_line __pyx_mstate_global->__pyx_n_s_draw_line #define __pyx_n_s_draw_point __pyx_mstate_global->__pyx_n_s_draw_point #define __pyx_n_s_draw_rect __pyx_mstate_global->__pyx_n_s_draw_rect #define __pyx_n_s_dstrect __pyx_mstate_global->__pyx_n_s_dstrect #define __pyx_kp_s_dstrect_must_be_a_position_rect __pyx_mstate_global->__pyx_kp_s_dstrect_must_be_a_position_rect #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate #define __pyx_n_s_environ __pyx_mstate_global->__pyx_n_s_environ #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error #define __pyx_n_s_errorfnc __pyx_mstate_global->__pyx_n_s_errorfnc #define __pyx_n_s_escape_button __pyx_mstate_global->__pyx_n_s_escape_button #define __pyx_kp_s_expected_a_rectangle __pyx_mstate_global->__pyx_kp_s_expected_a_rectangle #define __pyx_n_s_fill_rect __pyx_mstate_global->__pyx_n_s_fill_rect #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags #define __pyx_n_s_flip_x __pyx_mstate_global->__pyx_n_s_flip_x #define __pyx_n_s_flip_y __pyx_mstate_global->__pyx_n_s_flip_y #define __pyx_n_s_focus __pyx_mstate_global->__pyx_n_s_focus #define __pyx_n_s_foreign __pyx_mstate_global->__pyx_n_s_foreign #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format #define __pyx_n_s_format_2 __pyx_mstate_global->__pyx_n_s_format_2 #define __pyx_n_s_from_display_module __pyx_mstate_global->__pyx_n_s_from_display_module #define __pyx_n_s_from_surface __pyx_mstate_global->__pyx_n_s_from_surface #define __pyx_n_s_from_window __pyx_mstate_global->__pyx_n_s_from_window #define __pyx_n_s_fullscreen __pyx_mstate_global->__pyx_n_s_fullscreen #define __pyx_kp_s_fullscreen_and_fullscreen_deskto __pyx_mstate_global->__pyx_kp_s_fullscreen_and_fullscreen_deskto #define __pyx_n_s_fullscreen_desktop __pyx_mstate_global->__pyx_n_s_fullscreen_desktop #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_getResource __pyx_mstate_global->__pyx_n_s_getResource #define __pyx_n_s_get_drivers __pyx_mstate_global->__pyx_n_s_get_drivers #define __pyx_n_s_get_grabbed_window __pyx_mstate_global->__pyx_n_s_get_grabbed_window #define __pyx_n_s_get_height __pyx_mstate_global->__pyx_n_s_get_height #define __pyx_n_s_get_rect __pyx_mstate_global->__pyx_n_s_get_rect #define __pyx_n_s_get_viewport __pyx_mstate_global->__pyx_n_s_get_viewport #define __pyx_n_s_get_width __pyx_mstate_global->__pyx_n_s_get_width #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_n_s_h __pyx_mstate_global->__pyx_n_s_h #define __pyx_n_s_hex __pyx_mstate_global->__pyx_n_s_hex #define __pyx_n_s_hidden __pyx_mstate_global->__pyx_n_s_hidden #define __pyx_n_s_hide __pyx_mstate_global->__pyx_n_s_hide #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i #define __pyx_n_s_image __pyx_mstate_global->__pyx_n_s_image #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_ind __pyx_mstate_global->__pyx_n_s_ind #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_n_s_input_focus __pyx_mstate_global->__pyx_n_s_input_focus #define __pyx_n_s_input_grabbed __pyx_mstate_global->__pyx_n_s_input_grabbed #define __pyx_n_s_input_only __pyx_mstate_global->__pyx_n_s_input_only #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items #define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key #define __pyx_n_s_kwarg_to_flag __pyx_mstate_global->__pyx_n_s_kwarg_to_flag #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs #define __pyx_n_s_load __pyx_mstate_global->__pyx_n_s_load #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_max_texture_height __pyx_mstate_global->__pyx_n_s_max_texture_height #define __pyx_n_s_max_texture_width __pyx_mstate_global->__pyx_n_s_max_texture_width #define __pyx_n_s_maximize __pyx_mstate_global->__pyx_n_s_maximize #define __pyx_n_s_maximized __pyx_mstate_global->__pyx_n_s_maximized #define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message #define __pyx_n_s_messagebox __pyx_mstate_global->__pyx_n_s_messagebox #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass #define __pyx_n_s_minimize __pyx_mstate_global->__pyx_n_s_minimize #define __pyx_n_s_minimized __pyx_mstate_global->__pyx_n_s_minimized #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module #define __pyx_n_s_mouse_capture __pyx_mstate_global->__pyx_n_s_mouse_capture #define __pyx_n_s_mouse_focus __pyx_mstate_global->__pyx_n_s_mouse_focus #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_kp_s_no_standard_masks_exist_for_give __pyx_mstate_global->__pyx_kp_s_no_standard_masks_exist_for_give #define __pyx_kp_s_not_enough_memory_for_the_surfac __pyx_mstate_global->__pyx_kp_s_not_enough_memory_for_the_surfac #define __pyx_n_s_num __pyx_mstate_global->__pyx_n_s_num #define __pyx_n_s_num_texture_formats __pyx_mstate_global->__pyx_n_s_num_texture_formats #define __pyx_kp_s_only_one_of_static_streaming_or __pyx_mstate_global->__pyx_kp_s_only_one_of_static_streaming_or #define __pyx_n_s_opengl __pyx_mstate_global->__pyx_n_s_opengl #define __pyx_n_s_origin __pyx_mstate_global->__pyx_n_s_origin #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os #define __pyx_n_s_other __pyx_mstate_global->__pyx_n_s_other #define __pyx_n_s_p1 __pyx_mstate_global->__pyx_n_s_p1 #define __pyx_n_s_p2 __pyx_mstate_global->__pyx_n_s_p2 #define __pyx_n_s_parent __pyx_mstate_global->__pyx_n_s_parent #define __pyx_n_s_pixel_format __pyx_mstate_global->__pyx_n_s_pixel_format #define __pyx_n_s_pkgdata __pyx_mstate_global->__pyx_n_s_pkgdata #define __pyx_n_s_point __pyx_mstate_global->__pyx_n_s_point #define __pyx_n_s_popup_menu __pyx_mstate_global->__pyx_n_s_popup_menu #define __pyx_n_s_position __pyx_mstate_global->__pyx_n_s_position #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare #define __pyx_n_s_present __pyx_mstate_global->__pyx_n_s_present #define __pyx_n_s_ptr __pyx_mstate_global->__pyx_n_s_ptr #define __pyx_n_s_pygame __pyx_mstate_global->__pyx_n_s_pygame #define __pyx_n_s_pygame__sdl2_sdl2 __pyx_mstate_global->__pyx_n_s_pygame__sdl2_sdl2 #define __pyx_n_s_pygame__sdl2_video __pyx_mstate_global->__pyx_n_s_pygame__sdl2_video #define __pyx_kp_s_pygame_icon_bmp __pyx_mstate_global->__pyx_kp_s_pygame_icon_bmp #define __pyx_n_s_pygame_pkgdata __pyx_mstate_global->__pyx_n_s_pygame_pkgdata #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname #define __pyx_n_s_rarea __pyx_mstate_global->__pyx_n_s_rarea #define __pyx_n_s_rect __pyx_mstate_global->__pyx_n_s_rect #define __pyx_n_s_rect_2 __pyx_mstate_global->__pyx_n_s_rect_2 #define __pyx_kp_s_rect_values_are_out_of_range __pyx_mstate_global->__pyx_kp_s_rect_values_are_out_of_range #define __pyx_n_s_rectptr __pyx_mstate_global->__pyx_n_s_rectptr #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_renderer __pyx_mstate_global->__pyx_n_s_renderer #define __pyx_n_s_renderer_2 __pyx_mstate_global->__pyx_n_s_renderer_2 #define __pyx_n_s_repr __pyx_mstate_global->__pyx_n_s_repr #define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res #define __pyx_n_s_resizable __pyx_mstate_global->__pyx_n_s_resizable #define __pyx_n_s_restore __pyx_mstate_global->__pyx_n_s_restore #define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret #define __pyx_n_s_return_button __pyx_mstate_global->__pyx_n_s_return_button #define __pyx_n_s_reversed __pyx_mstate_global->__pyx_n_s_reversed #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s #define __pyx_kp_s_s_name_s_flags_0x_02x_num_textu __pyx_mstate_global->__pyx_kp_s_s_name_s_flags_0x_02x_num_textu #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_kp_s_self__renderer_cannot_be_convert __pyx_mstate_global->__pyx_kp_s_self__renderer_cannot_be_convert #define __pyx_kp_s_self__win_cannot_be_converted_to __pyx_mstate_global->__pyx_kp_s_self__win_cannot_be_converted_to #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send #define __pyx_n_s_set_colorkey __pyx_mstate_global->__pyx_n_s_set_colorkey #define __pyx_n_s_set_fullscreen __pyx_mstate_global->__pyx_n_s_set_fullscreen #define __pyx_n_s_set_icon __pyx_mstate_global->__pyx_n_s_set_icon #define __pyx_n_s_set_modal_for __pyx_mstate_global->__pyx_n_s_set_modal_for #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name #define __pyx_n_s_set_viewport __pyx_mstate_global->__pyx_n_s_set_viewport #define __pyx_n_s_set_windowed __pyx_mstate_global->__pyx_n_s_set_windowed #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_show __pyx_mstate_global->__pyx_n_s_show #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size #define __pyx_kp_s_size_must_contain_two_positive_v __pyx_mstate_global->__pyx_kp_s_size_must_contain_two_positive_v #define __pyx_kp_s_size_must_have_two_elements __pyx_mstate_global->__pyx_kp_s_size_must_have_two_elements #define __pyx_n_s_skip_taskbar __pyx_mstate_global->__pyx_n_s_skip_taskbar #define __pyx_n_s_source __pyx_mstate_global->__pyx_n_s_source #define __pyx_kp_s_source_must_be_drawable __pyx_mstate_global->__pyx_kp_s_source_must_be_drawable #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_n_s_special_flags __pyx_mstate_global->__pyx_n_s_special_flags #define __pyx_kp_s_src_c_cython_pygame__sdl2_video __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sdl2_video #define __pyx_n_s_srcrect __pyx_mstate_global->__pyx_n_s_srcrect #define __pyx_kp_s_srcrect_must_be_None_or_a_rectan __pyx_mstate_global->__pyx_kp_s_srcrect_must_be_None_or_a_rectan #define __pyx_kp_s_srcrect_must_be_a_rect_or_None __pyx_mstate_global->__pyx_kp_s_srcrect_must_be_a_rect_or_None #define __pyx_n_s_static __pyx_mstate_global->__pyx_n_s_static #define __pyx_n_s_staticmethod __pyx_mstate_global->__pyx_n_s_staticmethod #define __pyx_n_s_streaming __pyx_mstate_global->__pyx_n_s_streaming #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super #define __pyx_n_s_surf __pyx_mstate_global->__pyx_n_s_surf #define __pyx_n_s_surf_ptr __pyx_mstate_global->__pyx_n_s_surf_ptr #define __pyx_n_s_surface __pyx_mstate_global->__pyx_n_s_surface #define __pyx_kp_s_surface_must_be_a_Surface_object __pyx_mstate_global->__pyx_kp_s_surface_must_be_a_Surface_object #define __pyx_kp_s_surface_must_be_a_surface_or_No __pyx_mstate_global->__pyx_kp_s_surface_must_be_a_surface_or_No #define __pyx_n_s_target __pyx_mstate_global->__pyx_n_s_target #define __pyx_kp_s_target_must_be_a_Texture_or_None __pyx_mstate_global->__pyx_kp_s_target_must_be_a_Texture_or_None #define __pyx_n_s_target_texture __pyx_mstate_global->__pyx_n_s_target_texture #define __pyx_n_s_tempviewport __pyx_mstate_global->__pyx_n_s_tempviewport #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_texture __pyx_mstate_global->__pyx_n_s_texture #define __pyx_n_s_textureOrImage __pyx_mstate_global->__pyx_n_s_textureOrImage #define __pyx_kp_s_the_argument_is_not_a_rectangle __pyx_mstate_global->__pyx_kp_s_the_argument_is_not_a_rectangle #define __pyx_kp_s_the_surface_is_too_small __pyx_mstate_global->__pyx_kp_s_the_surface_is_too_small #define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw #define __pyx_n_s_title __pyx_mstate_global->__pyx_n_s_title #define __pyx_n_s_tmprect __pyx_mstate_global->__pyx_n_s_tmprect #define __pyx_n_s_to_surface __pyx_mstate_global->__pyx_n_s_to_surface #define __pyx_n_s_tooltip __pyx_mstate_global->__pyx_n_s_tooltip #define __pyx_kp_s_unknown_parameter_s __pyx_mstate_global->__pyx_kp_s_unknown_parameter_s #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_kp_s_update_source_should_be_a_Surfac __pyx_mstate_global->__pyx_kp_s_update_source_should_be_a_Surfac #define __pyx_n_s_utf8 __pyx_mstate_global->__pyx_n_s_utf8 #define __pyx_n_s_utility __pyx_mstate_global->__pyx_n_s_utility #define __pyx_n_s_vsync __pyx_mstate_global->__pyx_n_s_vsync #define __pyx_n_s_vulkan __pyx_mstate_global->__pyx_n_s_vulkan #define __pyx_n_s_w __pyx_mstate_global->__pyx_n_s_w #define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn #define __pyx_n_s_win __pyx_mstate_global->__pyx_n_s_win #define __pyx_n_s_window __pyx_mstate_global->__pyx_n_s_window #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x #define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y #define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 #define __pyx_int_480 __pyx_mstate_global->__pyx_int_480 #define __pyx_int_640 __pyx_mstate_global->__pyx_int_640 #define __pyx_k__3 __pyx_mstate_global->__pyx_k__3 #define __pyx_k__4 __pyx_mstate_global->__pyx_k__4 #define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_ #define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2 #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5 #define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 #define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9 #define __pyx_slice__19 __pyx_mstate_global->__pyx_slice__19 #define __pyx_slice__21 __pyx_mstate_global->__pyx_slice__21 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10 #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11 #define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12 #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13 #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15 #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26 #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33 #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 #define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 #define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44 #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46 #define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50 #define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55 #define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57 #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60 #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64 #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66 #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 #define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69 #define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71 #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77 #define __pyx_tuple__80 __pyx_mstate_global->__pyx_tuple__80 #define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82 #define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86 #define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88 #define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90 #define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91 #define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93 #define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95 #define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98 #define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 #define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70 #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 #define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 #define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 #define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83 #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 #define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85 #define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 #define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 #define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 #define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94 #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 #define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97 #define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99 #define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101 #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102 #define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103 /* #### Code section: module_code ### */ /* "cpython/complex.pxd":19 * * @property * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.real * */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { double __pyx_r; /* "cpython/complex.pxd":20 * @property * cdef inline double real(self) noexcept: * return self.cval.real # <<<<<<<<<<<<<< * * @property */ __pyx_r = __pyx_v_self->cval.real; goto __pyx_L0; /* "cpython/complex.pxd":19 * * @property * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.real * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "cpython/complex.pxd":23 * * @property * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.imag * */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { double __pyx_r; /* "cpython/complex.pxd":24 * @property * cdef inline double imag(self) noexcept: * return self.cval.imag # <<<<<<<<<<<<<< * * # PyTypeObject PyComplex_Type */ __pyx_r = __pyx_v_self->cval.imag; goto __pyx_L0; /* "cpython/complex.pxd":23 * * @property * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.imag * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { PyObject *__pyx_v_default_value = ((PyObject *)Py_None); PyObject *__pyx_v_value; PyObject *__pyx_v_pyvalue = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_default_value = __pyx_optional_args->default_value; } } /* "cpython/contextvars.pxd":117 * or None if no such value or default was found. * """ * cdef PyObject *value = NULL # <<<<<<<<<<<<<< * PyContextVar_Get(var, NULL, &value) * if value is NULL: */ __pyx_v_value = NULL; /* "cpython/contextvars.pxd":118 * """ * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< * if value is NULL: * # context variable does not have a default */ __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 118, __pyx_L1_error) /* "cpython/contextvars.pxd":119 * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) * if value is NULL: # <<<<<<<<<<<<<< * # context variable does not have a default * pyvalue = default_value */ __pyx_t_2 = (__pyx_v_value == NULL); if (__pyx_t_2) { /* "cpython/contextvars.pxd":121 * if value is NULL: * # context variable does not have a default * pyvalue = default_value # <<<<<<<<<<<<<< * else: * # value or default value of context variable */ __Pyx_INCREF(__pyx_v_default_value); __pyx_v_pyvalue = __pyx_v_default_value; /* "cpython/contextvars.pxd":119 * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) * if value is NULL: # <<<<<<<<<<<<<< * # context variable does not have a default * pyvalue = default_value */ goto __pyx_L3; } /* "cpython/contextvars.pxd":124 * else: * # value or default value of context variable * pyvalue = value # <<<<<<<<<<<<<< * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_v_value); __Pyx_INCREF(__pyx_t_3); __pyx_v_pyvalue = __pyx_t_3; __pyx_t_3 = 0; /* "cpython/contextvars.pxd":125 * # value or default value of context variable * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< * return pyvalue * */ Py_XDECREF(__pyx_v_value); } __pyx_L3:; /* "cpython/contextvars.pxd":126 * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyvalue); __pyx_r = __pyx_v_pyvalue; goto __pyx_L0; /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { PyObject *__pyx_v_default_value = ((PyObject *)Py_None); PyObject *__pyx_v_value; PyObject *__pyx_v_pyvalue = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_no_default", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_default_value = __pyx_optional_args->default_value; } } /* "cpython/contextvars.pxd":135 * Ignores the default value of the context variable, if any. * """ * cdef PyObject *value = NULL # <<<<<<<<<<<<<< * PyContextVar_Get(var, default_value, &value) * # value of context variable or 'default_value' */ __pyx_v_value = NULL; /* "cpython/contextvars.pxd":136 * """ * cdef PyObject *value = NULL * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< * # value of context variable or 'default_value' * pyvalue = value */ __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 136, __pyx_L1_error) /* "cpython/contextvars.pxd":138 * PyContextVar_Get(var, default_value, &value) * # value of context variable or 'default_value' * pyvalue = value # <<<<<<<<<<<<<< * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue */ __pyx_t_2 = ((PyObject *)__pyx_v_value); __Pyx_INCREF(__pyx_t_2); __pyx_v_pyvalue = __pyx_t_2; __pyx_t_2 = 0; /* "cpython/contextvars.pxd":139 * # value of context variable or 'default_value' * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< * return pyvalue */ Py_XDECREF(__pyx_v_value); /* "cpython/contextvars.pxd":140 * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyvalue); __pyx_r = __pyx_v_pyvalue; goto __pyx_L0; /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":73 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_18RendererDriverInfo_1__repr__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_18RendererDriverInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_18RendererDriverInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_18RendererDriverInfo_1__repr__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.RendererDriverInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(__pyx_self, __pyx_v_self); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "pygame/_sdl2/video.pyx":74 * class RendererDriverInfo: * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, * self.name, */ __Pyx_XDECREF(__pyx_r); /* "pygame/_sdl2/video.pyx":75 * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, # <<<<<<<<<<<<<< * self.name, * self.flags, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":76 * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, * self.name, # <<<<<<<<<<<<<< * self.flags, * self.num_texture_formats, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pygame/_sdl2/video.pyx":77 * self.__class__.__name__, * self.name, * self.flags, # <<<<<<<<<<<<<< * self.num_texture_formats, * self.max_texture_width, */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/_sdl2/video.pyx":78 * self.name, * self.flags, * self.num_texture_formats, # <<<<<<<<<<<<<< * self.max_texture_width, * self.max_texture_height, */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_texture_formats); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "pygame/_sdl2/video.pyx":79 * self.flags, * self.num_texture_formats, * self.max_texture_width, # <<<<<<<<<<<<<< * self.max_texture_height, * ) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_texture_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "pygame/_sdl2/video.pyx":80 * self.num_texture_formats, * self.max_texture_width, * self.max_texture_height, # <<<<<<<<<<<<<< * ) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_texture_height); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "pygame/_sdl2/video.pyx":75 * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, # <<<<<<<<<<<<<< * self.name, * self.flags, */ __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; /* "pygame/_sdl2/video.pyx":74 * class RendererDriverInfo: * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, * self.name, */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_flags_0x_02x_num_textu, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":73 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sdl2.video.RendererDriverInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "pygame/_sdl2/video.pyx":83 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * cdef int num = SDL_GetNumRenderDrivers() * cdef SDL_RendererInfo info */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_1get_drivers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_1get_drivers = {"get_drivers", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_1get_drivers, METH_NOARGS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_1get_drivers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_drivers (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_get_drivers(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_get_drivers(CYTHON_UNUSED PyObject *__pyx_self) { struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_drivers", 0); __pyx_cur_scope = (struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)__pyx_tp_new_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers(__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 83, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pygame_5_sdl2_5video_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_drivers, __pyx_n_s_get_drivers, __pyx_n_s_pygame__sdl2_video); if (unlikely(!gen)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.get_drivers", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *__pyx_cur_scope = ((struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; char const *__pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_drivers", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 83, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":84 * * def get_drivers(): * cdef int num = SDL_GetNumRenderDrivers() # <<<<<<<<<<<<<< * cdef SDL_RendererInfo info * cdef int ind */ __pyx_cur_scope->__pyx_v_num = SDL_GetNumRenderDrivers(); /* "pygame/_sdl2/video.pyx":87 * cdef SDL_RendererInfo info * cdef int ind * for ind from 0 <= ind < num: # <<<<<<<<<<<<<< * SDL_GetRenderDriverInfo(ind, &info) * ret = RendererDriverInfo() */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_num; for (__pyx_cur_scope->__pyx_v_ind = 0; __pyx_cur_scope->__pyx_v_ind < __pyx_t_1; __pyx_cur_scope->__pyx_v_ind++) { /* "pygame/_sdl2/video.pyx":88 * cdef int ind * for ind from 0 <= ind < num: * SDL_GetRenderDriverInfo(ind, &info) # <<<<<<<<<<<<<< * ret = RendererDriverInfo() * ret.name = info.name.decode("utf-8") */ (void)(SDL_GetRenderDriverInfo(__pyx_cur_scope->__pyx_v_ind, (&__pyx_cur_scope->__pyx_v_info))); /* "pygame/_sdl2/video.pyx":89 * for ind from 0 <= ind < num: * SDL_GetRenderDriverInfo(ind, &info) * ret = RendererDriverInfo() # <<<<<<<<<<<<<< * ret.name = info.name.decode("utf-8") * ret.flags = info.flags */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RendererDriverInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_ret); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_ret, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":90 * SDL_GetRenderDriverInfo(ind, &info) * ret = RendererDriverInfo() * ret.name = info.name.decode("utf-8") # <<<<<<<<<<<<<< * ret.flags = info.flags * ret.num_texture_formats = info.num_texture_formats */ __pyx_t_6 = __pyx_cur_scope->__pyx_v_info.name; __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 90, __pyx_L1_error) __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":91 * ret = RendererDriverInfo() * ret.name = info.name.decode("utf-8") * ret.flags = info.flags # <<<<<<<<<<<<<< * ret.num_texture_formats = info.num_texture_formats * ret.max_texture_width = info.max_texture_width */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(__pyx_cur_scope->__pyx_v_info.flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_flags, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":92 * ret.name = info.name.decode("utf-8") * ret.flags = info.flags * ret.num_texture_formats = info.num_texture_formats # <<<<<<<<<<<<<< * ret.max_texture_width = info.max_texture_width * ret.max_texture_height = info.max_texture_height */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(__pyx_cur_scope->__pyx_v_info.num_texture_formats); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_num_texture_formats, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":93 * ret.flags = info.flags * ret.num_texture_formats = info.num_texture_formats * ret.max_texture_width = info.max_texture_width # <<<<<<<<<<<<<< * ret.max_texture_height = info.max_texture_height * yield ret */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_info.max_texture_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_max_texture_width, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":94 * ret.num_texture_formats = info.num_texture_formats * ret.max_texture_width = info.max_texture_width * ret.max_texture_height = info.max_texture_height # <<<<<<<<<<<<<< * yield ret * */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_info.max_texture_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_max_texture_height, __pyx_t_2) < 0) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":95 * ret.max_texture_width = info.max_texture_width * ret.max_texture_height = info.max_texture_height * yield ret # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ret); __pyx_r = __pyx_cur_scope->__pyx_v_ret; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 95, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "pygame/_sdl2/video.pyx":83 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * cdef int num = SDL_GetNumRenderDrivers() * cdef SDL_RendererInfo info */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_Generator_Replace_StopIteration(0); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("get_drivers", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":98 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """return the Window with input grab enabled, * or None if input isn't grabbed.""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_4get_grabbed_window(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_3get_grabbed_window, "return the Window with input grab enabled,\n or None if input isn't grabbed."); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_4get_grabbed_window = {"get_grabbed_window", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_4get_grabbed_window, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_3get_grabbed_window}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_4get_grabbed_window(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_grabbed_window (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSED PyObject *__pyx_self) { SDL_Window *__pyx_v_win; void *__pyx_v_ptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_grabbed_window", 1); /* "pygame/_sdl2/video.pyx":101 * """return the Window with input grab enabled, * or None if input isn't grabbed.""" * cdef SDL_Window *win = SDL_GetGrabbedWindow() # <<<<<<<<<<<<<< * cdef void *ptr * if win: */ __pyx_v_win = SDL_GetGrabbedWindow(); /* "pygame/_sdl2/video.pyx":103 * cdef SDL_Window *win = SDL_GetGrabbedWindow() * cdef void *ptr * if win: # <<<<<<<<<<<<<< * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: */ __pyx_t_1 = (__pyx_v_win != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":104 * cdef void *ptr * if win: * ptr = SDL_GetWindowData(win, "pg_window") # <<<<<<<<<<<<<< * if not ptr: * return None */ __pyx_v_ptr = SDL_GetWindowData(__pyx_v_win, ((char const *)"pg_window")); /* "pygame/_sdl2/video.pyx":105 * if win: * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: # <<<<<<<<<<<<<< * return None * return ptr */ __pyx_t_1 = (!(__pyx_v_ptr != 0)); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":106 * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: * return None # <<<<<<<<<<<<<< * return ptr * return None */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":105 * if win: * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: # <<<<<<<<<<<<<< * return None * return ptr */ } /* "pygame/_sdl2/video.pyx":107 * if not ptr: * return None * return ptr # <<<<<<<<<<<<<< * return None * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ptr)); __pyx_r = ((PyObject *)__pyx_v_ptr); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":103 * cdef SDL_Window *win = SDL_GetGrabbedWindow() * cdef void *ptr * if win: # <<<<<<<<<<<<<< * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: */ } /* "pygame/_sdl2/video.pyx":108 * return None * return ptr * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":98 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """return the Window with input grab enabled, * or None if input isn't grabbed.""" */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":111 * * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_5messagebox, " Display a message box.\n\n :param str title: A title string or None.\n :param str message: A message string.\n :param bool info: If ``True``, display an info message.\n :param bool warn: If ``True``, display a warning message.\n :param bool error: If ``True``, display an error message.\n :param tuple buttons: An optional sequence of buttons to show to the user (strings).\n :param int return_button: Button index to use if the return key is hit (-1 for none).\n :param int escape_button: Button index to use if the escape key is hit (-1 for none).\n :return: The index of the button that was pushed.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6messagebox = {"messagebox", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6messagebox, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_5messagebox}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_title = 0; PyObject *__pyx_v_message = 0; struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window = 0; int __pyx_v_info; int __pyx_v_warn; int __pyx_v_error; PyObject *__pyx_v_buttons = 0; PyObject *__pyx_v_return_button = 0; PyObject *__pyx_v_escape_button = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("messagebox (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_title,&__pyx_n_s_message,&__pyx_n_s_window,&__pyx_n_s_info,&__pyx_n_s_warn,&__pyx_n_s_error,&__pyx_n_s_buttons,&__pyx_n_s_return_button,&__pyx_n_s_escape_button,0}; /* "pygame/_sdl2/video.pyx":112 * * def messagebox(title, message, * Window window=None, # <<<<<<<<<<<<<< * bint info=False, * bint warn=False, */ values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)Py_None)); /* "pygame/_sdl2/video.pyx":116 * bint warn=False, * bint error=False, * buttons=('OK', ), # <<<<<<<<<<<<<< * return_button=0, * escape_button=0): */ values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_tuple__2))); values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0))); values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0))); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_title)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, 1); __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_warn); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_error); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buttons); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_button); if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_escape_button); if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "messagebox") < 0)) __PYX_ERR(0, 111, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_title = values[0]; __pyx_v_message = values[1]; __pyx_v_window = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[2]); if (values[3]) { __pyx_v_info = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_info == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":113 * def messagebox(title, message, * Window window=None, * bint info=False, # <<<<<<<<<<<<<< * bint warn=False, * bint error=False, */ __pyx_v_info = ((int)((int)0)); } if (values[4]) { __pyx_v_warn = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_warn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":114 * Window window=None, * bint info=False, * bint warn=False, # <<<<<<<<<<<<<< * bint error=False, * buttons=('OK', ), */ __pyx_v_warn = ((int)((int)0)); } if (values[5]) { __pyx_v_error = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_error == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":115 * bint info=False, * bint warn=False, * bint error=False, # <<<<<<<<<<<<<< * buttons=('OK', ), * return_button=0, */ __pyx_v_error = ((int)((int)0)); } __pyx_v_buttons = values[6]; __pyx_v_return_button = values[7]; __pyx_v_escape_button = values[8]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, __pyx_nargs); __PYX_ERR(0, 111, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.messagebox", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "window", 0))) __PYX_ERR(0, 112, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5messagebox(__pyx_self, __pyx_v_title, __pyx_v_message, __pyx_v_window, __pyx_v_info, __pyx_v_warn, __pyx_v_error, __pyx_v_buttons, __pyx_v_return_button, __pyx_v_escape_button); /* "pygame/_sdl2/video.pyx":111 * * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title, PyObject *__pyx_v_message, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window, int __pyx_v_info, int __pyx_v_warn, int __pyx_v_error, PyObject *__pyx_v_buttons, PyObject *__pyx_v_return_button, PyObject *__pyx_v_escape_button) { SDL_MessageBoxButtonData *__pyx_v_c_buttons; SDL_MessageBoxData __pyx_v_data; SDL_MessageBoxButtonData __pyx_v_button; PyObject *__pyx_v_buttons_utf8 = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_but = NULL; int __pyx_v_buttonid; PyObject *__pyx_7genexpr__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; SDL_Window *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; char const *__pyx_t_8; char const *__pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; int __pyx_t_15; char const *__pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("messagebox", 0); __Pyx_INCREF(__pyx_v_title); __Pyx_INCREF(__pyx_v_message); /* "pygame/_sdl2/video.pyx":133 * # TODO: type check * # TODO: color scheme * cdef SDL_MessageBoxButtonData* c_buttons = NULL # <<<<<<<<<<<<<< * * cdef SDL_MessageBoxData data */ __pyx_v_c_buttons = NULL; /* "pygame/_sdl2/video.pyx":136 * * cdef SDL_MessageBoxData data * data.flags = 0 # <<<<<<<<<<<<<< * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING */ __pyx_v_data.flags = 0; /* "pygame/_sdl2/video.pyx":137 * cdef SDL_MessageBoxData data * data.flags = 0 * if warn: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: */ if (__pyx_v_warn) { /* "pygame/_sdl2/video.pyx":138 * data.flags = 0 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING # <<<<<<<<<<<<<< * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_WARNING); /* "pygame/_sdl2/video.pyx":137 * cdef SDL_MessageBoxData data * data.flags = 0 * if warn: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: */ } /* "pygame/_sdl2/video.pyx":139 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: */ if (__pyx_v_error) { /* "pygame/_sdl2/video.pyx":140 * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR # <<<<<<<<<<<<<< * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_ERROR); /* "pygame/_sdl2/video.pyx":139 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: */ } /* "pygame/_sdl2/video.pyx":141 * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: */ if (__pyx_v_info) { /* "pygame/_sdl2/video.pyx":142 * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION # <<<<<<<<<<<<<< * if not window: * data.window = NULL */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_INFORMATION); /* "pygame/_sdl2/video.pyx":141 * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: # <<<<<<<<<<<<<< * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: */ } /* "pygame/_sdl2/video.pyx":143 * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: # <<<<<<<<<<<<<< * data.window = NULL * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_window)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 143, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "pygame/_sdl2/video.pyx":144 * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: * data.window = NULL # <<<<<<<<<<<<<< * else: * data.window = window._win */ __pyx_v_data.window = NULL; /* "pygame/_sdl2/video.pyx":143 * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: # <<<<<<<<<<<<<< * data.window = NULL * else: */ goto __pyx_L6; } /* "pygame/_sdl2/video.pyx":146 * data.window = NULL * else: * data.window = window._win # <<<<<<<<<<<<<< * if title is not None: * title = title.encode('utf8') */ /*else*/ { __pyx_t_3 = __pyx_v_window->_win; __pyx_v_data.window = __pyx_t_3; } __pyx_L6:; /* "pygame/_sdl2/video.pyx":147 * else: * data.window = window._win * if title is not None: # <<<<<<<<<<<<<< * title = title.encode('utf8') * data.title = title */ __pyx_t_2 = (__pyx_v_title != Py_None); if (__pyx_t_2) { /* "pygame/_sdl2/video.pyx":148 * data.window = window._win * if title is not None: * title = title.encode('utf8') # <<<<<<<<<<<<<< * data.title = title * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_utf8}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF_SET(__pyx_v_title, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":149 * if title is not None: * title = title.encode('utf8') * data.title = title # <<<<<<<<<<<<<< * else: * data.title = NULL */ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_title); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error) __pyx_v_data.title = __pyx_t_8; /* "pygame/_sdl2/video.pyx":147 * else: * data.window = window._win * if title is not None: # <<<<<<<<<<<<<< * title = title.encode('utf8') * data.title = title */ goto __pyx_L7; } /* "pygame/_sdl2/video.pyx":151 * data.title = title * else: * data.title = NULL # <<<<<<<<<<<<<< * message = message.encode('utf8') * data.message = message */ /*else*/ { __pyx_v_data.title = NULL; } __pyx_L7:; /* "pygame/_sdl2/video.pyx":152 * else: * data.title = NULL * message = message.encode('utf8') # <<<<<<<<<<<<<< * data.message = message * data.colorScheme = NULL */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_utf8}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":153 * data.title = NULL * message = message.encode('utf8') * data.message = message # <<<<<<<<<<<<<< * data.colorScheme = NULL * */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L1_error) __pyx_v_data.message = __pyx_t_9; /* "pygame/_sdl2/video.pyx":154 * message = message.encode('utf8') * data.message = message * data.colorScheme = NULL # <<<<<<<<<<<<<< * * cdef SDL_MessageBoxButtonData button */ __pyx_v_data.colorScheme = NULL; /* "pygame/_sdl2/video.pyx":157 * * cdef SDL_MessageBoxButtonData button * if not buttons: # <<<<<<<<<<<<<< * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_buttons); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 157, __pyx_L1_error) __pyx_t_1 = (!__pyx_t_2); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":158 * cdef SDL_MessageBoxButtonData button * if not buttons: * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ # <<<<<<<<<<<<<< * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * button.buttonid = 0 */ __pyx_v_button.flags = (SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT | SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT); /* "pygame/_sdl2/video.pyx":160 * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * button.buttonid = 0 # <<<<<<<<<<<<<< * button.text = "OK" * data.buttons = &button */ __pyx_v_button.buttonid = 0; /* "pygame/_sdl2/video.pyx":161 * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * button.buttonid = 0 * button.text = "OK" # <<<<<<<<<<<<<< * data.buttons = &button * data.numbuttons = 1 */ __pyx_v_button.text = ((char const *)"OK"); /* "pygame/_sdl2/video.pyx":162 * button.buttonid = 0 * button.text = "OK" * data.buttons = &button # <<<<<<<<<<<<<< * data.numbuttons = 1 * else: */ __pyx_v_data.buttons = (&__pyx_v_button); /* "pygame/_sdl2/video.pyx":163 * button.text = "OK" * data.buttons = &button * data.numbuttons = 1 # <<<<<<<<<<<<<< * else: * buttons_utf8 = [s.encode('utf8') for s in buttons] */ __pyx_v_data.numbuttons = 1; /* "pygame/_sdl2/video.pyx":157 * * cdef SDL_MessageBoxButtonData button * if not buttons: # <<<<<<<<<<<<<< * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT */ goto __pyx_L8; } /* "pygame/_sdl2/video.pyx":165 * data.numbuttons = 1 * else: * buttons_utf8 = [s.encode('utf8') for s in buttons] # <<<<<<<<<<<<<< * data.numbuttons = len(buttons) * c_buttons =\ */ /*else*/ { { /* enter inner scope */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_v_buttons)) || PyTuple_CheckExact(__pyx_v_buttons)) { __pyx_t_5 = __pyx_v_buttons; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_buttons); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 165, __pyx_L11_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_5))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 165, __pyx_L11_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 165, __pyx_L11_error) #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 165, __pyx_L11_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 165, __pyx_L11_error) #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 165, __pyx_L11_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_s, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_n_s_utf8}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 165, __pyx_L11_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_s); __pyx_7genexpr__pyx_v_s = 0; goto __pyx_L15_exit_scope; __pyx_L11_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_s); __pyx_7genexpr__pyx_v_s = 0; goto __pyx_L1_error; __pyx_L15_exit_scope:; } /* exit inner scope */ __pyx_v_buttons_utf8 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":166 * else: * buttons_utf8 = [s.encode('utf8') for s in buttons] * data.numbuttons = len(buttons) # <<<<<<<<<<<<<< * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) */ __pyx_t_10 = PyObject_Length(__pyx_v_buttons); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 166, __pyx_L1_error) __pyx_v_data.numbuttons = __pyx_t_10; /* "pygame/_sdl2/video.pyx":168 * data.numbuttons = len(buttons) * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) # <<<<<<<<<<<<<< * if not c_buttons: * raise MemoryError() */ __pyx_v_c_buttons = ((SDL_MessageBoxButtonData *)malloc((__pyx_v_data.numbuttons * (sizeof(SDL_MessageBoxButtonData))))); /* "pygame/_sdl2/video.pyx":169 * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) * if not c_buttons: # <<<<<<<<<<<<<< * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): */ __pyx_t_1 = (!(__pyx_v_c_buttons != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":170 * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) * if not c_buttons: * raise MemoryError() # <<<<<<<<<<<<<< * for i, but in enumerate(reversed(buttons_utf8)): * c_buttons[i].flags = 0 */ PyErr_NoMemory(); __PYX_ERR(0, 170, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":169 * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) * if not c_buttons: # <<<<<<<<<<<<<< * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): */ } /* "pygame/_sdl2/video.pyx":171 * if not c_buttons: * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): # <<<<<<<<<<<<<< * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 */ __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; __pyx_t_5 = __pyx_v_buttons_utf8; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) #endif --__pyx_t_10; for (;;) { if (__pyx_t_10 < 0) break; { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 171, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10--; if (unlikely((0 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10--; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_but, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; /* "pygame/_sdl2/video.pyx":172 * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): * c_buttons[i].flags = 0 # <<<<<<<<<<<<<< * c_buttons[i].buttonid = data.numbuttons - i - 1 * if c_buttons[i].buttonid == return_button: */ __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_14]).flags = 0; /* "pygame/_sdl2/video.pyx":173 * for i, but in enumerate(reversed(buttons_utf8)): * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 # <<<<<<<<<<<<<< * if c_buttons[i].buttonid == return_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_data.numbuttons); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyNumber_Subtract(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_12, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_14]).buttonid = __pyx_t_15; /* "pygame/_sdl2/video.pyx":174 * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 * if c_buttons[i].buttonid == return_button: # <<<<<<<<<<<<<< * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: */ __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error) __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_14]).buttonid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_v_return_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":175 * c_buttons[i].buttonid = data.numbuttons - i - 1 * if c_buttons[i].buttonid == return_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT # <<<<<<<<<<<<<< * if c_buttons[i].buttonid == escape_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT */ __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_14]).flags = ((__pyx_v_c_buttons[__pyx_t_14]).flags | SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT); /* "pygame/_sdl2/video.pyx":174 * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 * if c_buttons[i].buttonid == return_button: # <<<<<<<<<<<<<< * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: */ } /* "pygame/_sdl2/video.pyx":176 * if c_buttons[i].buttonid == return_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: # <<<<<<<<<<<<<< * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * c_buttons[i].text = but */ __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_14]).buttonid); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_v_escape_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":177 * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT # <<<<<<<<<<<<<< * c_buttons[i].text = but * data.buttons = c_buttons */ __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_14]).flags = ((__pyx_v_c_buttons[__pyx_t_14]).flags | SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT); /* "pygame/_sdl2/video.pyx":176 * if c_buttons[i].buttonid == return_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: # <<<<<<<<<<<<<< * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * c_buttons[i].text = but */ } /* "pygame/_sdl2/video.pyx":178 * if c_buttons[i].buttonid == escape_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * c_buttons[i].text = but # <<<<<<<<<<<<<< * data.buttons = c_buttons * */ __pyx_t_16 = __Pyx_PyObject_AsString(__pyx_v_but); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error) __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_14]).text = __pyx_t_16; /* "pygame/_sdl2/video.pyx":171 * if not c_buttons: * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): # <<<<<<<<<<<<<< * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":179 * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * c_buttons[i].text = but * data.buttons = c_buttons # <<<<<<<<<<<<<< * * cdef int buttonid */ __pyx_v_data.buttons = __pyx_v_c_buttons; } __pyx_L8:; /* "pygame/_sdl2/video.pyx":182 * * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): # <<<<<<<<<<<<<< * free(c_buttons) * raise errorfnc() */ __pyx_t_1 = (SDL_ShowMessageBox((&__pyx_v_data), (&__pyx_v_buttonid)) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":183 * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): * free(c_buttons) # <<<<<<<<<<<<<< * raise errorfnc() * */ free(__pyx_v_c_buttons); /* "pygame/_sdl2/video.pyx":184 * if SDL_ShowMessageBox(&data, &buttonid): * free(c_buttons) * raise errorfnc() # <<<<<<<<<<<<<< * * free(c_buttons) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_errorfnc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 184, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":182 * * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): # <<<<<<<<<<<<<< * free(c_buttons) * raise errorfnc() */ } /* "pygame/_sdl2/video.pyx":186 * raise errorfnc() * * free(c_buttons) # <<<<<<<<<<<<<< * return buttonid * */ free(__pyx_v_c_buttons); /* "pygame/_sdl2/video.pyx":187 * * free(c_buttons) * return buttonid # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_buttonid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":111 * * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pygame._sdl2.video.messagebox", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buttons_utf8); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_but); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_s); __Pyx_XDECREF(__pyx_v_title); __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":214 * } * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, other): * cdef Window self = cls.__new__(cls) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_window(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_1from_window = {"from_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_window(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_other = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_window (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_other)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_window") < 0)) __PYX_ERR(0, 214, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_other = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("from_window", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 214, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.from_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_from_window(((PyTypeObject*)__pyx_v_cls), __pyx_v_other); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_window(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_other) { struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self = 0; PY_LONG_LONG __pyx_v_data; void *__pyx_v_data_ptr; SDL_Window *__pyx_v_window; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PY_LONG_LONG __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_window", 1); /* "pygame/_sdl2/video.pyx":216 * @classmethod * def from_window(cls, other): * cdef Window self = cls.__new__(cls) # <<<<<<<<<<<<<< * os.environ['SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'] = str(hex(other)) * cdef long long data = other */ if (unlikely(((PyObject *)__pyx_v_cls) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(0, 216, __pyx_L1_error) } __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pygame_5_sdl2_5video_Window)))) __PYX_ERR(0, 216, __pyx_L1_error) __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":217 * def from_window(cls, other): * cdef Window self = cls.__new__(cls) * os.environ['SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'] = str(hex(other)) # <<<<<<<<<<<<<< * cdef long long data = other * cdef void* data_ptr = data */ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE, __pyx_t_2) < 0))) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":218 * cdef Window self = cls.__new__(cls) * os.environ['SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'] = str(hex(other)) * cdef long long data = other # <<<<<<<<<<<<<< * cdef void* data_ptr = data * cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) */ __pyx_t_4 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_other); if (unlikely((__pyx_t_4 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L1_error) __pyx_v_data = __pyx_t_4; /* "pygame/_sdl2/video.pyx":219 * os.environ['SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'] = str(hex(other)) * cdef long long data = other * cdef void* data_ptr = data # <<<<<<<<<<<<<< * cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) * self._win = window */ __pyx_v_data_ptr = ((void *)__pyx_v_data); /* "pygame/_sdl2/video.pyx":220 * cdef long long data = other * cdef void* data_ptr = data * cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) # <<<<<<<<<<<<<< * self._win = window * self._is_borrowed = 0 */ __pyx_v_window = SDL_CreateWindowFrom(__pyx_v_data_ptr); /* "pygame/_sdl2/video.pyx":221 * cdef void* data_ptr = data * cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) * self._win = window # <<<<<<<<<<<<<< * self._is_borrowed = 0 * SDL_SetWindowData(window, "pg_window", self) */ __pyx_v_self->_win = __pyx_v_window; /* "pygame/_sdl2/video.pyx":222 * cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) * self._win = window * self._is_borrowed = 0 # <<<<<<<<<<<<<< * SDL_SetWindowData(window, "pg_window", self) * return self */ __pyx_v_self->_is_borrowed = 0; /* "pygame/_sdl2/video.pyx":223 * self._win = window * self._is_borrowed = 0 * SDL_SetWindowData(window, "pg_window", self) # <<<<<<<<<<<<<< * return self * */ (void)(SDL_SetWindowData(__pyx_v_window, ((char const *)"pg_window"), ((PyObject *)__pyx_v_self))); /* "pygame/_sdl2/video.pyx":224 * self._is_borrowed = 0 * SDL_SetWindowData(window, "pg_window", self) * return self # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":214 * } * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, other): * cdef Window self = cls.__new__(cls) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Window.from_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":226 * return self * * @classmethod # <<<<<<<<<<<<<< * def from_display_module(cls): * cdef Window self = cls.__new__(cls) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_3from_display_module(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_3from_display_module = {"from_display_module", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_3from_display_module, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_3from_display_module(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_display_module (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("from_display_module", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "from_display_module", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_2from_display_module(((PyTypeObject*)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2from_display_module(PyTypeObject *__pyx_v_cls) { struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self = 0; SDL_Window *__pyx_v_window; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_display_module", 1); /* "pygame/_sdl2/video.pyx":228 * @classmethod * def from_display_module(cls): * cdef Window self = cls.__new__(cls) # <<<<<<<<<<<<<< * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: */ if (unlikely(((PyObject *)__pyx_v_cls) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(0, 228, __pyx_L1_error) } __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pygame_5_sdl2_5video_Window)))) __PYX_ERR(0, 228, __pyx_L1_error) __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":229 * def from_display_module(cls): * cdef Window self = cls.__new__(cls) * cdef SDL_Window* window = pg_GetDefaultWindow() # <<<<<<<<<<<<<< * if not window: * raise error() */ __pyx_v_window = pg_GetDefaultWindow(); /* "pygame/_sdl2/video.pyx":230 * cdef Window self = cls.__new__(cls) * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: # <<<<<<<<<<<<<< * raise error() * self._win=window */ __pyx_t_2 = (!(__pyx_v_window != 0)); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/video.pyx":231 * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: * raise error() # <<<<<<<<<<<<<< * self._win=window * self._is_borrowed=1 */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 231, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":230 * cdef Window self = cls.__new__(cls) * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: # <<<<<<<<<<<<<< * raise error() * self._win=window */ } /* "pygame/_sdl2/video.pyx":232 * if not window: * raise error() * self._win=window # <<<<<<<<<<<<<< * self._is_borrowed=1 * SDL_SetWindowData(window, "pg_window", self) */ __pyx_v_self->_win = __pyx_v_window; /* "pygame/_sdl2/video.pyx":233 * raise error() * self._win=window * self._is_borrowed=1 # <<<<<<<<<<<<<< * SDL_SetWindowData(window, "pg_window", self) * return self */ __pyx_v_self->_is_borrowed = 1; /* "pygame/_sdl2/video.pyx":234 * self._win=window * self._is_borrowed=1 * SDL_SetWindowData(window, "pg_window", self) # <<<<<<<<<<<<<< * return self * */ (void)(SDL_SetWindowData(__pyx_v_window, ((char const *)"pg_window"), ((PyObject *)__pyx_v_self))); /* "pygame/_sdl2/video.pyx":235 * self._is_borrowed=1 * SDL_SetWindowData(window, "pg_window", self) * return self # <<<<<<<<<<<<<< * * def __init__(self, title='pygame', */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":226 * return self * * @classmethod # <<<<<<<<<<<<<< * def from_display_module(cls): * cdef Window self = cls.__new__(cls) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.from_display_module", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":237 * return self * * def __init__(self, title='pygame', # <<<<<<<<<<<<<< * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_4__init__, " Create a window with the specified position, dimensions, and flags.\n\n :param str title: the title of the window, in UTF-8 encoding\n :param tuple size: the size of the window, in screen coordinates (width, height)\n :param position: a tuple specifying the window position, WINDOWPOS_CENTERED, or WINDOWPOS_UNDEFINED.\n :param bool fullscreen: fullscreen window using the window size as the resolution (videomode change)\n :param bool fullscreen_desktop: fullscreen window using the current desktop resolution\n :param bool opengl: Usable with OpenGL context. You will still need to create an OpenGL context.\n :param bool vulkan: usable with a Vulkan instance\n :param bool hidden: window is not visible\n :param bool borderless: no window decoration\n :param bool resizable: window can be resized\n :param bool minimized: window is minimized\n :param bool maximized: window is maximized\n :param bool input_grabbed: window has grabbed input focus\n :param bool input_focus: window has input focus\n :param bool mouse_focus: window has mouse focus\n :param bool foreign: window not created by SDL\n :param bool allow_highdpi: window should be created in high-DPI mode if supported (>= SDL 2.0.1)\n :param bool mouse_capture: window has mouse captured (unrelated to INPUT_GRABBED, >= SDL 2.0.4)\n :param bool always_on_top: window should always be above others (X11 only, >= SDL 2.0.5)\n :param bool skip_taskbar: window should not be added to the taskbar (X11 only, >= SDL 2.0.5)\n :param bool utility: window should be treated as a utility window (X11 only, >= SDL 2.0.5)\n :param bool tooltip: window should be treated as a tooltip (X11 only, >= SDL 2.0.5)\n :param bool popup_menu: window should be treated as a popup menu (X11 only, >= SDL 2.0.5)\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_4__init__; #endif static int __pyx_pw_6pygame_5_sdl2_5video_6Window_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_title = 0; PyObject *__pyx_v_size = 0; PyObject *__pyx_v_position = 0; int __pyx_v_fullscreen; int __pyx_v_fullscreen_desktop; PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_title,&__pyx_n_s_size,&__pyx_n_s_position,&__pyx_n_s_fullscreen,&__pyx_n_s_fullscreen_desktop,0}; values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_pygame)); values[1] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__3); values[2] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__4); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_title); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_position); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullscreen); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullscreen_desktop); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 237, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_title = values[0]; __pyx_v_size = values[1]; __pyx_v_position = values[2]; if (values[3]) { __pyx_v_fullscreen = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_fullscreen == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":240 * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, # <<<<<<<<<<<<<< * bint fullscreen_desktop=False, **kwargs): * """ Create a window with the specified position, dimensions, and flags. */ __pyx_v_fullscreen = ((int)0); } if (values[4]) { __pyx_v_fullscreen_desktop = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fullscreen_desktop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":241 * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, * bint fullscreen_desktop=False, **kwargs): # <<<<<<<<<<<<<< * """ Create a window with the specified position, dimensions, and flags. * */ __pyx_v_fullscreen_desktop = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 237, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4__init__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_title, __pyx_v_size, __pyx_v_position, __pyx_v_fullscreen, __pyx_v_fullscreen_desktop, __pyx_v_kwargs); /* "pygame/_sdl2/video.pyx":237 * return self * * def __init__(self, title='pygame', # <<<<<<<<<<<<<< * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, */ /* function exit code */ __Pyx_DECREF(__pyx_v_kwargs); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_size, PyObject *__pyx_v_position, int __pyx_v_fullscreen, int __pyx_v_fullscreen_desktop, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; PyObject *__pyx_v_flags = NULL; PyObject *__pyx_v__kwarg_to_flag = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_flag = NULL; PyObject *__pyx_v_pygame = NULL; PyObject *__pyx_v_surf = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; unsigned int __pyx_t_16; char const *__pyx_t_17; int __pyx_t_18; int __pyx_t_19; Uint32 __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/video.pyx":270 * # https://wiki.libsdl.org/SDL_CreateWindow * # https://wiki.libsdl.org/SDL_WindowFlags * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_position, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pygame/_sdl2/video.pyx":271 * # https://wiki.libsdl.org/SDL_WindowFlags * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED # <<<<<<<<<<<<<< * elif position == WINDOWPOS_CENTERED: * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_x = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_y = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":270 * # https://wiki.libsdl.org/SDL_CreateWindow * # https://wiki.libsdl.org/SDL_WindowFlags * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":272 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_position, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pygame/_sdl2/video.pyx":273 * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED # <<<<<<<<<<<<<< * else: * x, y = position */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_x = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_y = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":272 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":275 * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: * x, y = position # <<<<<<<<<<<<<< * * flags = 0 */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_position))) || (PyList_CheckExact(__pyx_v_position))) { PyObject* sequence = __pyx_v_position; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 275, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 275, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 275, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_x = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_y = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":277 * x, y = position * * flags = 0 # <<<<<<<<<<<<<< * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") */ __Pyx_INCREF(__pyx_int_0); __pyx_v_flags = __pyx_int_0; /* "pygame/_sdl2/video.pyx":278 * * flags = 0 * if fullscreen and fullscreen_desktop: # <<<<<<<<<<<<<< * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: */ if (__pyx_v_fullscreen) { } else { __pyx_t_3 = __pyx_v_fullscreen; goto __pyx_L7_bool_binop_done; } __pyx_t_3 = __pyx_v_fullscreen_desktop; __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/video.pyx":279 * flags = 0 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") # <<<<<<<<<<<<<< * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 279, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":278 * * flags = 0 * if fullscreen and fullscreen_desktop: # <<<<<<<<<<<<<< * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: */ } /* "pygame/_sdl2/video.pyx":280 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: # <<<<<<<<<<<<<< * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: */ if (__pyx_v_fullscreen) { /* "pygame/_sdl2/video.pyx":281 * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN # <<<<<<<<<<<<<< * elif fullscreen_desktop: * flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FULLSCREEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":280 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: # <<<<<<<<<<<<<< * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: */ goto __pyx_L9; } /* "pygame/_sdl2/video.pyx":282 * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: # <<<<<<<<<<<<<< * flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP * */ if (__pyx_v_fullscreen_desktop) { /* "pygame/_sdl2/video.pyx":283 * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: * flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP # <<<<<<<<<<<<<< * * _kwarg_to_flag = self._kwarg_to_flag */ __pyx_t_1 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FULLSCREEN_DESKTOP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":282 * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: # <<<<<<<<<<<<<< * flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP * */ } __pyx_L9:; /* "pygame/_sdl2/video.pyx":285 * flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP * * _kwarg_to_flag = self._kwarg_to_flag # <<<<<<<<<<<<<< * for k, v in kwargs.items(): * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwarg_to_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__kwarg_to_flag = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":286 * * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): # <<<<<<<<<<<<<< * try: * flag = _kwarg_to_flag[k] */ __pyx_t_6 = 0; __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_7, &__pyx_t_6, &__pyx_t_1, &__pyx_t_4, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":287 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< * flag = _kwarg_to_flag[k] * if v: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { /* "pygame/_sdl2/video.pyx":288 * for k, v in kwargs.items(): * try: * flag = _kwarg_to_flag[k] # <<<<<<<<<<<<<< * if v: * flags |= flag */ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v__kwarg_to_flag, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":289 * try: * flag = _kwarg_to_flag[k] * if v: # <<<<<<<<<<<<<< * flags |= flag * except KeyError: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 289, __pyx_L12_error) if (__pyx_t_3) { /* "pygame/_sdl2/video.pyx":290 * flag = _kwarg_to_flag[k] * if v: * flags |= flag # <<<<<<<<<<<<<< * except KeyError: * raise TypeError("unknown parameter: %s" % k) */ __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_v_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":289 * try: * flag = _kwarg_to_flag[k] * if v: # <<<<<<<<<<<<<< * flags |= flag * except KeyError: */ } /* "pygame/_sdl2/video.pyx":287 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< * flag = _kwarg_to_flag[k] * if v: */ } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L19_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":291 * if v: * flags |= flag * except KeyError: # <<<<<<<<<<<<<< * raise TypeError("unknown parameter: %s" % k) * */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 291, __pyx_L14_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); /* "pygame/_sdl2/video.pyx":292 * flags |= flag * except KeyError: * raise TypeError("unknown parameter: %s" % k) # <<<<<<<<<<<<<< * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, */ __pyx_t_14 = __Pyx_PyString_FormatSafe(__pyx_kp_s_unknown_parameter_s, __pyx_v_k); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 292, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 292, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __PYX_ERR(0, 292, __pyx_L14_except_error) } goto __pyx_L14_except_error; /* "pygame/_sdl2/video.pyx":287 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< * flag = _kwarg_to_flag[k] * if v: */ __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L1_error; __pyx_L19_try_end:; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":294 * raise TypeError("unknown parameter: %s" % k) * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, # <<<<<<<<<<<<<< * size[0], size[1], flags) * self._is_borrowed=0 */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_utf8}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_y); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":295 * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, * size[0], size[1], flags) # <<<<<<<<<<<<<< * self._is_borrowed=0 * if not self._win: */ __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_19 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_20 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_20 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":294 * raise TypeError("unknown parameter: %s" % k) * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, # <<<<<<<<<<<<<< * size[0], size[1], flags) * self._is_borrowed=0 */ __pyx_v_self->_win = SDL_CreateWindow(__pyx_t_17, __pyx_t_8, __pyx_t_9, __pyx_t_18, __pyx_t_19, __pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":296 * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, * size[0], size[1], flags) * self._is_borrowed=0 # <<<<<<<<<<<<<< * if not self._win: * raise error() */ __pyx_v_self->_is_borrowed = 0; /* "pygame/_sdl2/video.pyx":297 * size[0], size[1], flags) * self._is_borrowed=0 * if not self._win: # <<<<<<<<<<<<<< * raise error() * SDL_SetWindowData(self._win, "pg_window", self) */ __pyx_t_3 = (!(__pyx_v_self->_win != 0)); if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/video.pyx":298 * self._is_borrowed=0 * if not self._win: * raise error() # <<<<<<<<<<<<<< * SDL_SetWindowData(self._win, "pg_window", self) * */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_16, 0+__pyx_t_16); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 298, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":297 * size[0], size[1], flags) * self._is_borrowed=0 * if not self._win: # <<<<<<<<<<<<<< * raise error() * SDL_SetWindowData(self._win, "pg_window", self) */ } /* "pygame/_sdl2/video.pyx":299 * if not self._win: * raise error() * SDL_SetWindowData(self._win, "pg_window", self) # <<<<<<<<<<<<<< * * import pygame.pkgdata */ (void)(SDL_SetWindowData(__pyx_v_self->_win, ((char const *)"pg_window"), ((PyObject *)__pyx_v_self))); /* "pygame/_sdl2/video.pyx":301 * SDL_SetWindowData(self._win, "pg_window", self) * * import pygame.pkgdata # <<<<<<<<<<<<<< * surf = pygame.image.load(pygame.pkgdata.getResource( * 'pygame_icon.bmp')) */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_pkgdata, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pygame = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":302 * * import pygame.pkgdata * surf = pygame.image.load(pygame.pkgdata.getResource( # <<<<<<<<<<<<<< * 'pygame_icon.bmp')) * surf.set_colorkey(0) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_image); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_pkgdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getResource); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_15))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_15, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_pygame_icon_bmp}; __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __pyx_t_15 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_v_surf = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":304 * surf = pygame.image.load(pygame.pkgdata.getResource( * 'pygame_icon.bmp')) * surf.set_colorkey(0) # <<<<<<<<<<<<<< * self.set_icon(surf) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surf, __pyx_n_s_set_colorkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_int_0}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":305 * 'pygame_icon.bmp')) * surf.set_colorkey(0) * self.set_icon(surf) # <<<<<<<<<<<<<< * * @property */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_surf}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":237 * return self * * def __init__(self, title='pygame', # <<<<<<<<<<<<<< * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XDECREF(__pyx_v_flags); __Pyx_XDECREF(__pyx_v__kwarg_to_flag); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_flag); __Pyx_XDECREF(__pyx_v_pygame); __Pyx_XDECREF(__pyx_v_surf); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":307 * self.set_icon(surf) * * @property # <<<<<<<<<<<<<< * def grab(self): * """ Window's input grab state (``True`` or ``False``). */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":319 * :rtype: bool * """ * return SDL_GetWindowGrab(self._win) != 0 # <<<<<<<<<<<<<< * * @grab.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GetWindowGrab(__pyx_v_self->_win) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":307 * self.set_icon(surf) * * @property # <<<<<<<<<<<<<< * def grab(self): * """ Window's input grab state (``True`` or ``False``). */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.grab.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":321 * return SDL_GetWindowGrab(self._win) != 0 * * @grab.setter # <<<<<<<<<<<<<< * def grab(self, bint grabbed): * # https://wiki.libsdl.org/SDL_SetWindowGrab */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_grabbed); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_grabbed) { int __pyx_v_grabbed; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_grabbed); { __pyx_v_grabbed = __Pyx_PyObject_IsTrue(__pyx_arg_grabbed); if (unlikely((__pyx_v_grabbed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.grab.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((int)__pyx_v_grabbed)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_grabbed) { int __pyx_r; SDL_bool __pyx_t_1; /* "pygame/_sdl2/video.pyx":324 * def grab(self, bint grabbed): * # https://wiki.libsdl.org/SDL_SetWindowGrab * SDL_SetWindowGrab(self._win, 1 if grabbed else 0) # <<<<<<<<<<<<<< * * @property */ if (__pyx_v_grabbed) { __pyx_t_1 = 1; } else { __pyx_t_1 = 0; } SDL_SetWindowGrab(__pyx_v_self->_win, __pyx_t_1); /* "pygame/_sdl2/video.pyx":321 * return SDL_GetWindowGrab(self._win) != 0 * * @grab.setter # <<<<<<<<<<<<<< * def grab(self, bint grabbed): * # https://wiki.libsdl.org/SDL_SetWindowGrab */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "pygame/_sdl2/video.pyx":326 * SDL_SetWindowGrab(self._win, 1 if grabbed else 0) * * @property # <<<<<<<<<<<<<< * def relative_mouse(self): * """ Window's relative mouse motion state (``True`` or ``False``). */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":336 * :rtype: bool * """ * return SDL_GetRelativeMouseMode() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GetRelativeMouseMode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":326 * SDL_SetWindowGrab(self._win, 1 if grabbed else 0) * * @property # <<<<<<<<<<<<<< * def relative_mouse(self): * """ Window's relative mouse motion state (``True`` or ``False``). */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.relative_mouse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":339 * * * @relative_mouse.setter # <<<<<<<<<<<<<< * def relative_mouse(self, bint enable): * # https://wiki.libsdl.org/SDL_SetRelativeMouseMode */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable) { int __pyx_v_enable; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_enable); { __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.relative_mouse.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((int)__pyx_v_enable)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_enable) { int __pyx_r; SDL_bool __pyx_t_1; /* "pygame/_sdl2/video.pyx":343 * # https://wiki.libsdl.org/SDL_SetRelativeMouseMode * #SDL_SetWindowGrab(self._win, 1 if enable else 0) * SDL_SetRelativeMouseMode(1 if enable else 0) # <<<<<<<<<<<<<< * * def set_windowed(self): */ if (__pyx_v_enable) { __pyx_t_1 = 1; } else { __pyx_t_1 = 0; } (void)(SDL_SetRelativeMouseMode(__pyx_t_1)); /* "pygame/_sdl2/video.pyx":339 * * * @relative_mouse.setter # <<<<<<<<<<<<<< * def relative_mouse(self, bint enable): * # https://wiki.libsdl.org/SDL_SetRelativeMouseMode */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "pygame/_sdl2/video.pyx":345 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< * """ Enable windowed mode * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_windowed(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_6set_windowed, " Enable windowed mode\n\n .. seealso:: :func:`set_fullscreen`\n\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_7set_windowed = {"set_windowed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_windowed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_6set_windowed}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_windowed(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_windowed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("set_windowed", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_windowed", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_6set_windowed(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_windowed", 1); /* "pygame/_sdl2/video.pyx":352 * """ * # https://wiki.libsdl.org/SDL_SetWindowFullscreen * if SDL_SetWindowFullscreen(self._win, 0): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_SetWindowFullscreen(__pyx_v_self->_win, 0) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":353 * # https://wiki.libsdl.org/SDL_SetWindowFullscreen * if SDL_SetWindowFullscreen(self._win, 0): * raise error() # <<<<<<<<<<<<<< * * #TODO: not sure about this... */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 353, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":352 * """ * # https://wiki.libsdl.org/SDL_SetWindowFullscreen * if SDL_SetWindowFullscreen(self._win, 0): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":345 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< * """ Enable windowed mode * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.set_windowed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":360 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< * """ Enable fullscreen for the window * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9set_fullscreen(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_8set_fullscreen, " Enable fullscreen for the window\n\n :param bool desktop: If ``True``: use the current desktop resolution.\n If ``False``: change the fullscreen resolution to the window size.\n\n .. seealso:: :func:`set_windowed`\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_9set_fullscreen = {"set_fullscreen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_9set_fullscreen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_8set_fullscreen}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9set_fullscreen(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_desktop; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fullscreen (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_desktop,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_desktop); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_fullscreen") < 0)) __PYX_ERR(0, 360, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_desktop = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_desktop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error) } else { __pyx_v_desktop = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_fullscreen", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 360, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.set_fullscreen", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_8set_fullscreen(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_desktop); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8set_fullscreen(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_desktop) { int __pyx_v_flags; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_fullscreen", 1); /* "pygame/_sdl2/video.pyx":368 * .. seealso:: :func:`set_windowed` * """ * cdef int flags = 0 # <<<<<<<<<<<<<< * if desktop: * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP */ __pyx_v_flags = 0; /* "pygame/_sdl2/video.pyx":369 * """ * cdef int flags = 0 * if desktop: # <<<<<<<<<<<<<< * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP * else: */ if (__pyx_v_desktop) { /* "pygame/_sdl2/video.pyx":370 * cdef int flags = 0 * if desktop: * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP # <<<<<<<<<<<<<< * else: * flags = _SDL_WINDOW_FULLSCREEN */ __pyx_v_flags = SDL_WINDOW_FULLSCREEN_DESKTOP; /* "pygame/_sdl2/video.pyx":369 * """ * cdef int flags = 0 * if desktop: # <<<<<<<<<<<<<< * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP * else: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":372 * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP * else: * flags = _SDL_WINDOW_FULLSCREEN # <<<<<<<<<<<<<< * if SDL_SetWindowFullscreen(self._win, flags): * raise error() */ /*else*/ { __pyx_v_flags = SDL_WINDOW_FULLSCREEN; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":373 * else: * flags = _SDL_WINDOW_FULLSCREEN * if SDL_SetWindowFullscreen(self._win, flags): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_SetWindowFullscreen(__pyx_v_self->_win, __pyx_v_flags) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":374 * flags = _SDL_WINDOW_FULLSCREEN * if SDL_SetWindowFullscreen(self._win, flags): * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 374, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":373 * else: * flags = _SDL_WINDOW_FULLSCREEN * if SDL_SetWindowFullscreen(self._win, flags): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":360 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< * """ Enable fullscreen for the window * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.set_fullscreen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":376 * raise error() * * @property # <<<<<<<<<<<<<< * def title(self): * """ The title of the window or u"" if there is none. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_5title_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_5title_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char const *__pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":381 * """ * # https://wiki.libsdl.org/SDL_GetWindowTitle * return SDL_GetWindowTitle(self._win).decode('utf8') # <<<<<<<<<<<<<< * * @title.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = SDL_GetWindowTitle(__pyx_v_self->_win); __pyx_t_2 = __Pyx_ssize_strlen(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 381, __pyx_L1_error) __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_1, 0, __pyx_t_2, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __pyx_r = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":376 * raise error() * * @property # <<<<<<<<<<<<<< * def title(self): * """ The title of the window or u"" if there is none. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Window.title.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":383 * return SDL_GetWindowTitle(self._win).decode('utf8') * * @title.setter # <<<<<<<<<<<<<< * def title(self, title): * """ Set the window title. */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_5title_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_title); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_5title_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_title) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_title)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_title) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; char const *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":390 * """ * # https://wiki.libsdl.org/SDL_SetWindowTitle * SDL_SetWindowTitle(self._win, title.encode('utf8')) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_utf8}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 390, __pyx_L1_error) SDL_SetWindowTitle(__pyx_v_self->_win, __pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":383 * return SDL_GetWindowTitle(self._win).decode('utf8') * * @title.setter # <<<<<<<<<<<<<< * def title(self, title): * """ Set the window title. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Window.title.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":392 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< * """ Destroys the window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_11destroy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_10destroy, " Destroys the window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_11destroy = {"destroy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_11destroy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_10destroy}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_11destroy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_10destroy(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10destroy(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 1); /* "pygame/_sdl2/video.pyx":396 * """ * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: # <<<<<<<<<<<<<< * SDL_DestroyWindow(self._win) * self._win = NULL */ __pyx_t_1 = (__pyx_v_self->_win != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":397 * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: * SDL_DestroyWindow(self._win) # <<<<<<<<<<<<<< * self._win = NULL * */ SDL_DestroyWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":398 * if self._win: * SDL_DestroyWindow(self._win) * self._win = NULL # <<<<<<<<<<<<<< * * def hide(self): */ __pyx_v_self->_win = NULL; /* "pygame/_sdl2/video.pyx":396 * """ * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: # <<<<<<<<<<<<<< * SDL_DestroyWindow(self._win) * self._win = NULL */ } /* "pygame/_sdl2/video.pyx":392 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< * """ Destroys the window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":400 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< * """ Hide the window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13hide(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_12hide, " Hide the window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_13hide = {"hide", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_13hide, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_12hide}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13hide(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hide (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("hide", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "hide", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_12hide(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12hide(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hide", 1); /* "pygame/_sdl2/video.pyx":404 * """ * # https://wiki.libsdl.org/SDL_HideWindow * SDL_HideWindow(self._win) # <<<<<<<<<<<<<< * * def show(self): */ SDL_HideWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":400 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< * """ Hide the window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":406 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< * """ Show the window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15show(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_14show, " Show the window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_15show = {"show", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_15show, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_14show}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15show(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("show (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("show", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "show", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_14show(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14show(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("show", 1); /* "pygame/_sdl2/video.pyx":410 * """ * # https://wiki.libsdl.org/SDL_ShowWindow * SDL_ShowWindow(self._win) # <<<<<<<<<<<<<< * * def focus(self, input_only=False): */ SDL_ShowWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":406 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< * """ Show the window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":412 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< * """ Raise the window above other windows and set the input focus. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_17focus(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_16focus, " Raise the window above other windows and set the input focus.\n\n :param bool input_only: if ``True``, the window will be given input focus\n but may be completely obscured by other windows.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_17focus = {"focus", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_17focus, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_16focus}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_17focus(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_input_only = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("focus (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input_only,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_only); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "focus") < 0)) __PYX_ERR(0, 412, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input_only = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("focus", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 412, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.focus", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_16focus(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_input_only); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_16focus(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_input_only) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("focus", 1); /* "pygame/_sdl2/video.pyx":419 * """ * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: # <<<<<<<<<<<<<< * if SDL_SetWindowInputFocus(self._win): * raise error() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_input_only); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 419, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":420 * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: * if SDL_SetWindowInputFocus(self._win): # <<<<<<<<<<<<<< * raise error() * else: */ __pyx_t_1 = (SDL_SetWindowInputFocus(__pyx_v_self->_win) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":421 * if input_only: * if SDL_SetWindowInputFocus(self._win): * raise error() # <<<<<<<<<<<<<< * else: * SDL_RaiseWindow(self._win) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 421, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":420 * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: * if SDL_SetWindowInputFocus(self._win): # <<<<<<<<<<<<<< * raise error() * else: */ } /* "pygame/_sdl2/video.pyx":419 * """ * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: # <<<<<<<<<<<<<< * if SDL_SetWindowInputFocus(self._win): * raise error() */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":423 * raise error() * else: * SDL_RaiseWindow(self._win) # <<<<<<<<<<<<<< * * def restore(self): */ /*else*/ { SDL_RaiseWindow(__pyx_v_self->_win); } __pyx_L3:; /* "pygame/_sdl2/video.pyx":412 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< * """ Raise the window above other windows and set the input focus. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.focus", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":425 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< * """ Restore the size and position of a minimized or maximized window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_19restore(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_18restore, " Restore the size and position of a minimized or maximized window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_19restore = {"restore", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_19restore, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_18restore}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_19restore(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restore (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("restore", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "restore", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_18restore(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18restore(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restore", 1); /* "pygame/_sdl2/video.pyx":428 * """ Restore the size and position of a minimized or maximized window. * """ * SDL_RestoreWindow(self._win) # <<<<<<<<<<<<<< * * def maximize(self): */ SDL_RestoreWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":425 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< * """ Restore the size and position of a minimized or maximized window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":430 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< * """ Maximize the window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_21maximize(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_20maximize, " Maximize the window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_21maximize = {"maximize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_21maximize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_20maximize}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_21maximize(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maximize (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("maximize", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "maximize", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_20maximize(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20maximize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maximize", 1); /* "pygame/_sdl2/video.pyx":433 * """ Maximize the window. * """ * SDL_MaximizeWindow(self._win) # <<<<<<<<<<<<<< * * def minimize(self): */ SDL_MaximizeWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":430 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< * """ Maximize the window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":435 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< * """ Minimize the window. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_23minimize(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_22minimize, " Minimize the window.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_23minimize = {"minimize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_23minimize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_22minimize}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_23minimize(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("minimize (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("minimize", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "minimize", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_22minimize(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22minimize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("minimize", 1); /* "pygame/_sdl2/video.pyx":438 * """ Minimize the window. * """ * SDL_MinimizeWindow(self._win) # <<<<<<<<<<<<<< * * @property */ SDL_MinimizeWindow(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":435 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< * """ Minimize the window. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":440 * SDL_MinimizeWindow(self._win) * * @property # <<<<<<<<<<<<<< * def resizable(self): * """ Sets whether the window is resizable. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":444 * """ Sets whether the window is resizable. * """ * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_RESIZABLE != 0 # <<<<<<<<<<<<<< * * @resizable.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(((SDL_GetWindowFlags(__pyx_v_self->_win) & SDL_WINDOW_RESIZABLE) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":440 * SDL_MinimizeWindow(self._win) * * @property # <<<<<<<<<<<<<< * def resizable(self): * """ Sets whether the window is resizable. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.resizable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":446 * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_RESIZABLE != 0 * * @resizable.setter # <<<<<<<<<<<<<< * def resizable(self, enabled): * SDL_SetWindowResizable(self._win, 1 if enabled else 0) */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_enabled)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; SDL_bool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "pygame/_sdl2/video.pyx":448 * @resizable.setter * def resizable(self, enabled): * SDL_SetWindowResizable(self._win, 1 if enabled else 0) # <<<<<<<<<<<<<< * * @property */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 448, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_1 = 1; } else { __pyx_t_1 = 0; } SDL_SetWindowResizable(__pyx_v_self->_win, __pyx_t_1); /* "pygame/_sdl2/video.pyx":446 * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_RESIZABLE != 0 * * @resizable.setter # <<<<<<<<<<<<<< * def resizable(self, enabled): * SDL_SetWindowResizable(self._win, 1 if enabled else 0) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.resizable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pyx":450 * SDL_SetWindowResizable(self._win, 1 if enabled else 0) * * @property # <<<<<<<<<<<<<< * def borderless(self): * """ Add or remove the border from the actual window. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":456 * .. note:: You can't change the border state of a fullscreen window. * """ * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_BORDERLESS != 0 # <<<<<<<<<<<<<< * * @borderless.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(((SDL_GetWindowFlags(__pyx_v_self->_win) & SDL_WINDOW_BORDERLESS) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":450 * SDL_SetWindowResizable(self._win, 1 if enabled else 0) * * @property # <<<<<<<<<<<<<< * def borderless(self): * """ Add or remove the border from the actual window. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.borderless.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":458 * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_BORDERLESS != 0 * * @borderless.setter # <<<<<<<<<<<<<< * def borderless(self, enabled): * SDL_SetWindowBordered(self._win, 0 if enabled else 1) */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_enabled)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; SDL_bool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "pygame/_sdl2/video.pyx":460 * @borderless.setter * def borderless(self, enabled): * SDL_SetWindowBordered(self._win, 0 if enabled else 1) # <<<<<<<<<<<<<< * * def set_icon(self, surface): */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 460, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_1 = 0; } else { __pyx_t_1 = 1; } SDL_SetWindowBordered(__pyx_v_self->_win, __pyx_t_1); /* "pygame/_sdl2/video.pyx":458 * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_BORDERLESS != 0 * * @borderless.setter # <<<<<<<<<<<<<< * def borderless(self, enabled): * SDL_SetWindowBordered(self._win, 0 if enabled else 1) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.borderless.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pyx":462 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< * """ Set the icon for the window. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_icon(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_24set_icon, " Set the icon for the window.\n\n :param pygame.Surface surface: A Surface to use as the icon.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_25set_icon = {"set_icon", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_icon, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_24set_icon}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_icon(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_icon (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_icon") < 0)) __PYX_ERR(0, 462, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_surface = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_icon", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 462, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.set_icon", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_24set_icon(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_surface); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_icon(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_surface) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_icon", 1); /* "pygame/_sdl2/video.pyx":467 * :param pygame.Surface surface: A Surface to use as the icon. * """ * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError('surface must be a Surface object') * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) */ __pyx_t_1 = (!(pgSurface_Check(__pyx_v_surface) != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":468 * """ * if not pgSurface_Check(surface): * raise TypeError('surface must be a Surface object') # <<<<<<<<<<<<<< * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 468, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":467 * :param pygame.Surface surface: A Surface to use as the icon. * """ * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError('surface must be a Surface object') * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) */ } /* "pygame/_sdl2/video.pyx":469 * if not pgSurface_Check(surface): * raise TypeError('surface must be a Surface object') * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) # <<<<<<<<<<<<<< * * @property */ SDL_SetWindowIcon(__pyx_v_self->_win, pgSurface_AsSurface(__pyx_v_surface)); /* "pygame/_sdl2/video.pyx":462 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< * """ Set the icon for the window. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Window.set_icon", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":471 * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) * * @property # <<<<<<<<<<<<<< * def id(self): * """ A unique window ID. *Read-only*. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_2id_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":477 * :rtype: int * """ * return SDL_GetWindowID(self._win) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_Uint32(SDL_GetWindowID(__pyx_v_self->_win)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":471 * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) * * @property # <<<<<<<<<<<<<< * def id(self): * """ A unique window ID. *Read-only*. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":479 * return SDL_GetWindowID(self._win) * * @property # <<<<<<<<<<<<<< * def size(self): * """ The size of the window's client area.""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_4size_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { int __pyx_v_w; int __pyx_v_h; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":483 * """ The size of the window's client area.""" * cdef int w, h * SDL_GetWindowSize(self._win, &w, &h) # <<<<<<<<<<<<<< * return (w, h) * */ SDL_GetWindowSize(__pyx_v_self->_win, (&__pyx_v_w), (&__pyx_v_h)); /* "pygame/_sdl2/video.pyx":484 * cdef int w, h * SDL_GetWindowSize(self._win, &w, &h) * return (w, h) # <<<<<<<<<<<<<< * * @size.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":479 * return SDL_GetWindowID(self._win) * * @property # <<<<<<<<<<<<<< * def size(self): * """ The size of the window's client area.""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Window.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":486 * return (w, h) * * @size.setter # <<<<<<<<<<<<<< * def size(self, size): * SDL_SetWindowSize(self._win, size[0], size[1]) */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_size)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_size) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":488 * @size.setter * def size(self, size): * SDL_SetWindowSize(self._win, size[0], size[1]) # <<<<<<<<<<<<<< * * @property */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; SDL_SetWindowSize(__pyx_v_self->_win, __pyx_t_2, __pyx_t_3); /* "pygame/_sdl2/video.pyx":486 * return (w, h) * * @size.setter # <<<<<<<<<<<<<< * def size(self, size): * SDL_SetWindowSize(self._win, size[0], size[1]) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Window.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":490 * SDL_SetWindowSize(self._win, size[0], size[1]) * * @property # <<<<<<<<<<<<<< * def position(self): * """ Window's screen coordinates, or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_8position_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_8position_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { int __pyx_v_x; int __pyx_v_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":494 * """ Window's screen coordinates, or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED""" * cdef int x, y * SDL_GetWindowPosition(self._win, &x, &y) # <<<<<<<<<<<<<< * return (x, y) * */ SDL_GetWindowPosition(__pyx_v_self->_win, (&__pyx_v_x), (&__pyx_v_y)); /* "pygame/_sdl2/video.pyx":495 * cdef int x, y * SDL_GetWindowPosition(self._win, &x, &y) * return (x, y) # <<<<<<<<<<<<<< * * @position.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":490 * SDL_SetWindowSize(self._win, size[0], size[1]) * * @property # <<<<<<<<<<<<<< * def position(self): * """ Window's screen coordinates, or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Window.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":497 * return (x, y) * * @position.setter # <<<<<<<<<<<<<< * def position(self, position): * cdef int x, y */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_position); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_position) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_position)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_position) { int __pyx_v_x; int __pyx_v_y; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":500 * def position(self, position): * cdef int x, y * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_position, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pygame/_sdl2/video.pyx":501 * cdef int x, y * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED # <<<<<<<<<<<<<< * elif position == WINDOWPOS_CENTERED: * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_x = __pyx_t_4; __pyx_v_y = __pyx_t_5; /* "pygame/_sdl2/video.pyx":500 * def position(self, position): * cdef int x, y * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":502 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_v_position, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pygame/_sdl2/video.pyx":503 * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED # <<<<<<<<<<<<<< * else: * x, y = position */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x = __pyx_t_5; __pyx_v_y = __pyx_t_4; /* "pygame/_sdl2/video.pyx":502 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":505 * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: * x, y = position # <<<<<<<<<<<<<< * SDL_SetWindowPosition(self._win, x, y) * */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_position))) || (PyList_CheckExact(__pyx_v_position))) { PyObject* sequence = __pyx_v_position; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 505, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_position); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 505, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 505, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_x = __pyx_t_4; __pyx_v_y = __pyx_t_5; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":506 * else: * x, y = position * SDL_SetWindowPosition(self._win, x, y) # <<<<<<<<<<<<<< * * @property */ SDL_SetWindowPosition(__pyx_v_self->_win, __pyx_v_x, __pyx_v_y); /* "pygame/_sdl2/video.pyx":497 * return (x, y) * * @position.setter # <<<<<<<<<<<<<< * def position(self, position): * cdef int x, y */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.video.Window.position.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":508 * SDL_SetWindowPosition(self._win, x, y) * * @property # <<<<<<<<<<<<<< * def opacity(self): * """ Window opacity. It ranges between 0.0 (fully transparent) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { float __pyx_v_opacity; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":513 * and 1.0 (fully opaque).""" * cdef float opacity * if SDL_GetWindowOpacity(self._win, &opacity): # <<<<<<<<<<<<<< * raise error() * return opacity */ __pyx_t_1 = (SDL_GetWindowOpacity(__pyx_v_self->_win, (&__pyx_v_opacity)) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":514 * cdef float opacity * if SDL_GetWindowOpacity(self._win, &opacity): * raise error() # <<<<<<<<<<<<<< * return opacity * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 514, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":513 * and 1.0 (fully opaque).""" * cdef float opacity * if SDL_GetWindowOpacity(self._win, &opacity): # <<<<<<<<<<<<<< * raise error() * return opacity */ } /* "pygame/_sdl2/video.pyx":515 * if SDL_GetWindowOpacity(self._win, &opacity): * raise error() * return opacity # <<<<<<<<<<<<<< * * @opacity.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_opacity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":508 * SDL_SetWindowPosition(self._win, x, y) * * @property # <<<<<<<<<<<<<< * def opacity(self): * """ Window opacity. It ranges between 0.0 (fully transparent) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.opacity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":517 * return opacity * * @opacity.setter # <<<<<<<<<<<<<< * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_opacity); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_opacity) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_opacity)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_opacity) { int __pyx_r; __Pyx_RefNannyDeclarations float __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":519 * @opacity.setter * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_opacity); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) __pyx_t_2 = (SDL_SetWindowOpacity(__pyx_v_self->_win, __pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/video.pyx":520 * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 520, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":519 * @opacity.setter * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":517 * return opacity * * @opacity.setter # <<<<<<<<<<<<<< * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Window.opacity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":522 * raise error() * * @property # <<<<<<<<<<<<<< * def display_index(self): * """ The index of the display associated with the window. *Read-only*. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13display_index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13display_index_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { int __pyx_v_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":528 * :rtype: int * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) # <<<<<<<<<<<<<< * if index < 0: * raise error() */ __pyx_v_index = SDL_GetWindowDisplayIndex(__pyx_v_self->_win); /* "pygame/_sdl2/video.pyx":529 * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) * if index < 0: # <<<<<<<<<<<<<< * raise error() * return index */ __pyx_t_1 = (__pyx_v_index < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":530 * cdef int index = SDL_GetWindowDisplayIndex(self._win) * if index < 0: * raise error() # <<<<<<<<<<<<<< * return index * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 530, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":529 * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) * if index < 0: # <<<<<<<<<<<<<< * raise error() * return index */ } /* "pygame/_sdl2/video.pyx":531 * if index < 0: * raise error() * return index # <<<<<<<<<<<<<< * * def set_modal_for(self, Window parent): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":522 * raise error() * * @property # <<<<<<<<<<<<<< * def display_index(self): * """ The index of the display associated with the window. *Read-only*. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.display_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":533 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< * """set the window as a modal for a parent window * This function is only supported on X11.""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_27set_modal_for(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_6Window_26set_modal_for, "set the window as a modal for a parent window\n This function is only supported on X11."); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_27set_modal_for = {"set_modal_for", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_27set_modal_for, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_26set_modal_for}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_27set_modal_for(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_parent = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_modal_for (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_modal_for") < 0)) __PYX_ERR(0, 533, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_parent = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_modal_for", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 533, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.set_modal_for", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "parent", 0))) __PYX_ERR(0, 533, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_26set_modal_for(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_parent); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_26set_modal_for(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_parent) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_modal_for", 1); /* "pygame/_sdl2/video.pyx":536 * """set the window as a modal for a parent window * This function is only supported on X11.""" * if SDL_SetWindowModalFor(self._win, parent._win): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_SetWindowModalFor(__pyx_v_self->_win, __pyx_v_parent->_win) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":537 * This function is only supported on X11.""" * if SDL_SetWindowModalFor(self._win, parent._win): * raise error() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 537, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":536 * """set the window as a modal for a parent window * This function is only supported on X11.""" * if SDL_SetWindowModalFor(self._win, parent._win): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":533 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< * """set the window as a modal for a parent window * This function is only supported on X11.""" */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Window.set_modal_for", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":539 * raise error() * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._is_borrowed: * return */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_5video_6Window_29__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_5video_6Window_29__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_5video_6Window_28__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_5video_6Window_28__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 1); /* "pygame/_sdl2/video.pyx":540 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< * return * self.destroy() */ __pyx_t_1 = (__pyx_v_self->_is_borrowed != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":541 * def __dealloc__(self): * if self._is_borrowed: * return # <<<<<<<<<<<<<< * self.destroy() * */ goto __pyx_L0; /* "pygame/_sdl2/video.pyx":540 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< * return * self.destroy() */ } /* "pygame/_sdl2/video.pyx":542 * if self._is_borrowed: * return * self.destroy() # <<<<<<<<<<<<<< * * cdef Uint32 format_from_depth(int depth): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":539 * raise error() * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._is_borrowed: * return */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sdl2.video.Window.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_31__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_31__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_31__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_30__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self._win cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._win cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__win_cannot_be_converted_to, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_33__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6Window_33__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_33__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Window.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_32__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._win cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__win_cannot_be_converted_to, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Window.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":544 * self.destroy() * * cdef Uint32 format_from_depth(int depth): # <<<<<<<<<<<<<< * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: */ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) { Uint32 __pyx_v_Rmask; Uint32 __pyx_v_Gmask; Uint32 __pyx_v_Bmask; Uint32 __pyx_v_Amask; Uint32 __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("format_from_depth", 1); /* "pygame/_sdl2/video.pyx":546 * cdef Uint32 format_from_depth(int depth): * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: # <<<<<<<<<<<<<< * Rmask = 0xF << 8 * Gmask = 0xF << 4 */ switch (__pyx_v_depth) { case 16: /* "pygame/_sdl2/video.pyx":547 * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: * Rmask = 0xF << 8 # <<<<<<<<<<<<<< * Gmask = 0xF << 4 * Bmask = 0xF */ __pyx_v_Rmask = 0xf00; /* "pygame/_sdl2/video.pyx":548 * if depth == 16: * Rmask = 0xF << 8 * Gmask = 0xF << 4 # <<<<<<<<<<<<<< * Bmask = 0xF * Amask = 0xF << 12 */ __pyx_v_Gmask = 0xf0; /* "pygame/_sdl2/video.pyx":549 * Rmask = 0xF << 8 * Gmask = 0xF << 4 * Bmask = 0xF # <<<<<<<<<<<<<< * Amask = 0xF << 12 * elif depth in (0, 32): */ __pyx_v_Bmask = 0xF; /* "pygame/_sdl2/video.pyx":550 * Gmask = 0xF << 4 * Bmask = 0xF * Amask = 0xF << 12 # <<<<<<<<<<<<<< * elif depth in (0, 32): * Rmask = 0xFF << 16 */ __pyx_v_Amask = 0xf000; /* "pygame/_sdl2/video.pyx":546 * cdef Uint32 format_from_depth(int depth): * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: # <<<<<<<<<<<<<< * Rmask = 0xF << 8 * Gmask = 0xF << 4 */ break; case 0: /* "pygame/_sdl2/video.pyx":551 * Bmask = 0xF * Amask = 0xF << 12 * elif depth in (0, 32): # <<<<<<<<<<<<<< * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 */ case 32: /* "pygame/_sdl2/video.pyx":552 * Amask = 0xF << 12 * elif depth in (0, 32): * Rmask = 0xFF << 16 # <<<<<<<<<<<<<< * Gmask = 0xFF << 8 * Bmask = 0xFF */ __pyx_v_Rmask = 0xff0000; /* "pygame/_sdl2/video.pyx":553 * elif depth in (0, 32): * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 # <<<<<<<<<<<<<< * Bmask = 0xFF * Amask = 0xFF << 24 */ __pyx_v_Gmask = 0xff00; /* "pygame/_sdl2/video.pyx":554 * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 * Bmask = 0xFF # <<<<<<<<<<<<<< * Amask = 0xFF << 24 * else: */ __pyx_v_Bmask = 0xFF; /* "pygame/_sdl2/video.pyx":555 * Gmask = 0xFF << 8 * Bmask = 0xFF * Amask = 0xFF << 24 # <<<<<<<<<<<<<< * else: * raise ValueError("no standard masks exist for given bitdepth with alpha") */ __pyx_v_Amask = 0xff000000; /* "pygame/_sdl2/video.pyx":551 * Bmask = 0xF * Amask = 0xF << 12 * elif depth in (0, 32): # <<<<<<<<<<<<<< * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 */ break; default: /* "pygame/_sdl2/video.pyx":557 * Amask = 0xFF << 24 * else: * raise ValueError("no standard masks exist for given bitdepth with alpha") # <<<<<<<<<<<<<< * return SDL_MasksToPixelFormatEnum(depth, * Rmask, Gmask, Bmask, Amask) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 557, __pyx_L1_error) break; } /* "pygame/_sdl2/video.pyx":558 * else: * raise ValueError("no standard masks exist for given bitdepth with alpha") * return SDL_MasksToPixelFormatEnum(depth, # <<<<<<<<<<<<<< * Rmask, Gmask, Bmask, Amask) * */ __pyx_r = SDL_MasksToPixelFormatEnum(__pyx_v_depth, __pyx_v_Rmask, __pyx_v_Gmask, __pyx_v_Bmask, __pyx_v_Amask); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":544 * self.destroy() * * cdef Uint32 format_from_depth(int depth): # <<<<<<<<<<<<<< * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.format_from_depth", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":563 * * cdef class Texture: * def __cinit__(self): # <<<<<<<<<<<<<< * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { Uint8 __pyx_v_defaultColor[4]; int __pyx_r; __Pyx_RefNannyDeclarations Uint8 __pyx_t_1[4]; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "pygame/_sdl2/video.pyx":564 * cdef class Texture: * def __cinit__(self): * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._color = pgColor_NewLength(defaultColor, 3) * */ __pyx_t_1[0] = 0xFF; __pyx_t_1[1] = 0xFF; __pyx_t_1[2] = 0xFF; __pyx_t_1[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_1, sizeof(__pyx_v_defaultColor[0]) * (4)); /* "pygame/_sdl2/video.pyx":565 * def __cinit__(self): * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) # <<<<<<<<<<<<<< * * def __init__(self, */ __pyx_t_2 = pgColor_NewLength(__pyx_v_defaultColor, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->_color); __Pyx_DECREF((PyObject *)__pyx_v_self->_color); __pyx_v_self->_color = ((pgColorObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":563 * * cdef class Texture: * def __cinit__(self): # <<<<<<<<<<<<<< * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Texture.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":567 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< * Renderer renderer, * size, int depth=0, */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_7Texture_2__init__, " Create an empty texture.\n\n :param Renderer renderer: Rendering context for the texture.\n :param tuple size: The width and height of the texture.\n :param int depth: The pixel format (0 to use the default).\n\n One of ``static``, ``streaming``, or ``target`` can be set\n to ``True``. If all are ``False``, then ``static`` is used.\n\n :param bool static: Changes rarely, not lockable.\n :param bool streaming: Changes frequently, lockable.\n :param bool target: Can be used as a render target.\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5video_7Texture_2__init__; #endif static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer = 0; PyObject *__pyx_v_size = 0; int __pyx_v_depth; PyObject *__pyx_v_static = 0; PyObject *__pyx_v_streaming = 0; PyObject *__pyx_v_target = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_renderer,&__pyx_n_s_size,&__pyx_n_s_depth,&__pyx_n_s_static,&__pyx_n_s_streaming,&__pyx_n_s_target,0}; /* "pygame/_sdl2/video.pyx":570 * Renderer renderer, * size, int depth=0, * static=False, streaming=False, # <<<<<<<<<<<<<< * target=False): * """ Create an empty texture. */ values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False)); values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False)); /* "pygame/_sdl2/video.pyx":571 * size, int depth=0, * static=False, streaming=False, * target=False): # <<<<<<<<<<<<<< * """ Create an empty texture. * */ values[5] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_renderer)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, 1); __PYX_ERR(0, 567, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_depth); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_static); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_streaming); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_target); if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 567, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_renderer = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)values[0]); __pyx_v_size = values[1]; if (values[2]) { __pyx_v_depth = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_depth == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L3_error) } else { __pyx_v_depth = ((int)0); } __pyx_v_static = values[3]; __pyx_v_streaming = values[4]; __pyx_v_target = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 567, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Texture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_renderer), __pyx_ptype_6pygame_5_sdl2_5video_Renderer, 1, "renderer", 0))) __PYX_ERR(0, 568, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_renderer, __pyx_v_size, __pyx_v_depth, __pyx_v_static, __pyx_v_streaming, __pyx_v_target); /* "pygame/_sdl2/video.pyx":567 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< * Renderer renderer, * size, int depth=0, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer, PyObject *__pyx_v_size, int __pyx_v_depth, PyObject *__pyx_v_static, PyObject *__pyx_v_streaming, PyObject *__pyx_v_target) { Uint32 __pyx_v_format; PyObject *__pyx_v_e = NULL; int __pyx_v_width; int __pyx_v_height; int __pyx_v_access; SDL_Renderer *__pyx_v__renderer; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Uint32 __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; int __pyx_t_18; int __pyx_t_19; SDL_Renderer *__pyx_t_20; unsigned int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/video.pyx":588 * # TODO: masks * cdef Uint32 format * try: # <<<<<<<<<<<<<< * format = format_from_depth(depth) * except ValueError as e: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "pygame/_sdl2/video.pyx":589 * cdef Uint32 format * try: * format = format_from_depth(depth) # <<<<<<<<<<<<<< * except ValueError as e: * raise e */ __pyx_t_4 = __pyx_f_6pygame_5_sdl2_5video_format_from_depth(__pyx_v_depth); if (unlikely(__pyx_t_4 == ((Uint32)-1) && PyErr_Occurred())) __PYX_ERR(0, 589, __pyx_L3_error) __pyx_v_format = __pyx_t_4; /* "pygame/_sdl2/video.pyx":588 * # TODO: masks * cdef Uint32 format * try: # <<<<<<<<<<<<<< * format = format_from_depth(depth) * except ValueError as e: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "pygame/_sdl2/video.pyx":590 * try: * format = format_from_depth(depth) * except ValueError as e: # <<<<<<<<<<<<<< * raise e * */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_5) { __Pyx_AddTraceback("pygame._sdl2.video.Texture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 590, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; /*try:*/ { /* "pygame/_sdl2/video.pyx":591 * format = format_from_depth(depth) * except ValueError as e: * raise e # <<<<<<<<<<<<<< * * cdef int width, height */ __Pyx_Raise(__pyx_v_e, 0, 0, 0); __PYX_ERR(0, 591, __pyx_L14_error) } /* "pygame/_sdl2/video.pyx":590 * try: * format = format_from_depth(depth) * except ValueError as e: # <<<<<<<<<<<<<< * raise e * */ /*finally:*/ { __pyx_L14_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L5_except_error; } } } goto __pyx_L5_except_error; /* "pygame/_sdl2/video.pyx":588 * # TODO: masks * cdef Uint32 format * try: # <<<<<<<<<<<<<< * format = format_from_depth(depth) * except ValueError as e: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "pygame/_sdl2/video.pyx":594 * * cdef int width, height * if len(size) != 2: # <<<<<<<<<<<<<< * raise ValueError('size must have two elements') * width, height = size[0], size[1] */ __pyx_t_17 = PyObject_Length(__pyx_v_size); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 594, __pyx_L1_error) __pyx_t_18 = (__pyx_t_17 != 2); if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":595 * cdef int width, height * if len(size) != 2: * raise ValueError('size must have two elements') # <<<<<<<<<<<<<< * width, height = size[0], size[1] * if width <= 0 or height <= 0: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 595, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":594 * * cdef int width, height * if len(size) != 2: # <<<<<<<<<<<<<< * raise ValueError('size must have two elements') * width, height = size[0], size[1] */ } /* "pygame/_sdl2/video.pyx":596 * if len(size) != 2: * raise ValueError('size must have two elements') * width, height = size[0], size[1] # <<<<<<<<<<<<<< * if width <= 0 or height <= 0: * raise ValueError('size must contain two positive values') */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_width = __pyx_t_9; __pyx_v_height = __pyx_t_5; /* "pygame/_sdl2/video.pyx":597 * raise ValueError('size must have two elements') * width, height = size[0], size[1] * if width <= 0 or height <= 0: # <<<<<<<<<<<<<< * raise ValueError('size must contain two positive values') * */ __pyx_t_19 = (__pyx_v_width <= 0); if (!__pyx_t_19) { } else { __pyx_t_18 = __pyx_t_19; goto __pyx_L22_bool_binop_done; } __pyx_t_19 = (__pyx_v_height <= 0); __pyx_t_18 = __pyx_t_19; __pyx_L22_bool_binop_done:; if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":598 * width, height = size[0], size[1] * if width <= 0 or height <= 0: * raise ValueError('size must contain two positive values') # <<<<<<<<<<<<<< * * cdef int access */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 598, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":597 * raise ValueError('size must have two elements') * width, height = size[0], size[1] * if width <= 0 or height <= 0: # <<<<<<<<<<<<<< * raise ValueError('size must contain two positive values') * */ } /* "pygame/_sdl2/video.pyx":601 * * cdef int access * if static: # <<<<<<<<<<<<<< * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') */ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 601, __pyx_L1_error) if (__pyx_t_18) { /* "pygame/_sdl2/video.pyx":602 * cdef int access * if static: * if streaming or target: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 602, __pyx_L1_error) if (!__pyx_t_19) { } else { __pyx_t_18 = __pyx_t_19; goto __pyx_L26_bool_binop_done; } __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 602, __pyx_L1_error) __pyx_t_18 = __pyx_t_19; __pyx_L26_bool_binop_done:; if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":603 * if static: * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') # <<<<<<<<<<<<<< * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 603, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":602 * cdef int access * if static: * if streaming or target: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC */ } /* "pygame/_sdl2/video.pyx":604 * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC # <<<<<<<<<<<<<< * elif streaming: * if static or target: */ __pyx_v_access = SDL_TEXTUREACCESS_STATIC; /* "pygame/_sdl2/video.pyx":601 * * cdef int access * if static: # <<<<<<<<<<<<<< * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') */ goto __pyx_L24; } /* "pygame/_sdl2/video.pyx":605 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: # <<<<<<<<<<<<<< * if static or target: * raise ValueError('only one of static, streaming, or target can be true') */ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 605, __pyx_L1_error) if (__pyx_t_18) { /* "pygame/_sdl2/video.pyx":606 * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: * if static or target: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 606, __pyx_L1_error) if (!__pyx_t_19) { } else { __pyx_t_18 = __pyx_t_19; goto __pyx_L29_bool_binop_done; } __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 606, __pyx_L1_error) __pyx_t_18 = __pyx_t_19; __pyx_L29_bool_binop_done:; if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":607 * elif streaming: * if static or target: * raise ValueError('only one of static, streaming, or target can be true') # <<<<<<<<<<<<<< * access = _SDL_TEXTUREACCESS_STREAMING * elif target: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 607, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":606 * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: * if static or target: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING */ } /* "pygame/_sdl2/video.pyx":608 * if static or target: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING # <<<<<<<<<<<<<< * elif target: * if streaming or static: */ __pyx_v_access = SDL_TEXTUREACCESS_STREAMING; /* "pygame/_sdl2/video.pyx":605 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: # <<<<<<<<<<<<<< * if static or target: * raise ValueError('only one of static, streaming, or target can be true') */ goto __pyx_L24; } /* "pygame/_sdl2/video.pyx":609 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING * elif target: # <<<<<<<<<<<<<< * if streaming or static: * raise ValueError('only one of static, streaming, or target can be true') */ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 609, __pyx_L1_error) if (__pyx_t_18) { /* "pygame/_sdl2/video.pyx":610 * access = _SDL_TEXTUREACCESS_STREAMING * elif target: * if streaming or static: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_TARGET */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 610, __pyx_L1_error) if (!__pyx_t_19) { } else { __pyx_t_18 = __pyx_t_19; goto __pyx_L32_bool_binop_done; } __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 610, __pyx_L1_error) __pyx_t_18 = __pyx_t_19; __pyx_L32_bool_binop_done:; if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":611 * elif target: * if streaming or static: * raise ValueError('only one of static, streaming, or target can be true') # <<<<<<<<<<<<<< * access = _SDL_TEXTUREACCESS_TARGET * else: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 611, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":610 * access = _SDL_TEXTUREACCESS_STREAMING * elif target: * if streaming or static: # <<<<<<<<<<<<<< * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_TARGET */ } /* "pygame/_sdl2/video.pyx":612 * if streaming or static: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_TARGET # <<<<<<<<<<<<<< * else: * # Create static texture by default. */ __pyx_v_access = SDL_TEXTUREACCESS_TARGET; /* "pygame/_sdl2/video.pyx":609 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING * elif target: # <<<<<<<<<<<<<< * if streaming or static: * raise ValueError('only one of static, streaming, or target can be true') */ goto __pyx_L24; } /* "pygame/_sdl2/video.pyx":615 * else: * # Create static texture by default. * access = _SDL_TEXTUREACCESS_STATIC # <<<<<<<<<<<<<< * * self.renderer = renderer */ /*else*/ { __pyx_v_access = SDL_TEXTUREACCESS_STATIC; } __pyx_L24:; /* "pygame/_sdl2/video.pyx":617 * access = _SDL_TEXTUREACCESS_STATIC * * self.renderer = renderer # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer = renderer._renderer * self._tex = SDL_CreateTexture(_renderer, */ __Pyx_INCREF((PyObject *)__pyx_v_renderer); __Pyx_GIVEREF((PyObject *)__pyx_v_renderer); __Pyx_GOTREF((PyObject *)__pyx_v_self->renderer); __Pyx_DECREF((PyObject *)__pyx_v_self->renderer); __pyx_v_self->renderer = __pyx_v_renderer; /* "pygame/_sdl2/video.pyx":618 * * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer # <<<<<<<<<<<<<< * self._tex = SDL_CreateTexture(_renderer, * format, */ __pyx_t_20 = __pyx_v_renderer->_renderer; __pyx_v__renderer = __pyx_t_20; /* "pygame/_sdl2/video.pyx":619 * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer * self._tex = SDL_CreateTexture(_renderer, # <<<<<<<<<<<<<< * format, * access, */ __pyx_v_self->_tex = SDL_CreateTexture(__pyx_v__renderer, __pyx_v_format, __pyx_v_access, __pyx_v_width, __pyx_v_height); /* "pygame/_sdl2/video.pyx":623 * access, * width, height) * if not self._tex: # <<<<<<<<<<<<<< * raise error() * self.width, self.height = width, height */ __pyx_t_18 = (!(__pyx_v_self->_tex != 0)); if (unlikely(__pyx_t_18)) { /* "pygame/_sdl2/video.pyx":624 * width, height) * if not self._tex: * raise error() # <<<<<<<<<<<<<< * self.width, self.height = width, height * */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_21 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_21 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_21, 0+__pyx_t_21); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 624, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":623 * access, * width, height) * if not self._tex: # <<<<<<<<<<<<<< * raise error() * self.width, self.height = width, height */ } /* "pygame/_sdl2/video.pyx":625 * if not self._tex: * raise error() * self.width, self.height = width, height # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_5 = __pyx_v_width; __pyx_t_9 = __pyx_v_height; __pyx_v_self->width = __pyx_t_5; __pyx_v_self->height = __pyx_t_9; /* "pygame/_sdl2/video.pyx":567 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< * Renderer renderer, * size, int depth=0, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sdl2.video.Texture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_e); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":627 * self.width, self.height = width, height * * @staticmethod # <<<<<<<<<<<<<< * def from_surface(Renderer renderer, surface): * """ Create a texture from an existing surface. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_7Texture_4from_surface, " Create a texture from an existing surface.\n\n :param Renderer renderer: Rendering context for the texture.\n :param pygame.Surface surface: The surface to create a texture from.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_5from_surface = {"from_surface", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_4from_surface}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer = 0; PyObject *__pyx_v_surface = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_surface (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_renderer,&__pyx_n_s_surface,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_renderer)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, 1); __PYX_ERR(0, 627, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_surface") < 0)) __PYX_ERR(0, 627, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_renderer = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)values[0]); __pyx_v_surface = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 627, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Texture.from_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_renderer), __pyx_ptype_6pygame_5_sdl2_5video_Renderer, 1, "renderer", 0))) __PYX_ERR(0, 628, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(__pyx_v_renderer, __pyx_v_surface); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_renderer, PyObject *__pyx_v_surface) { struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self = 0; SDL_Renderer *__pyx_v__renderer; SDL_Surface *__pyx_v_surf_ptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; SDL_Renderer *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_surface", 1); /* "pygame/_sdl2/video.pyx":635 * """ * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError('2nd argument must be a surface') * cdef Texture self = Texture.__new__(Texture) */ __pyx_t_1 = (!(pgSurface_Check(__pyx_v_surface) != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":636 * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): * raise TypeError('2nd argument must be a surface') # <<<<<<<<<<<<<< * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 636, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":635 * """ * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError('2nd argument must be a surface') * cdef Texture self = Texture.__new__(Texture) */ } /* "pygame/_sdl2/video.pyx":637 * if not pgSurface_Check(surface): * raise TypeError('2nd argument must be a surface') * cdef Texture self = Texture.__new__(Texture) # <<<<<<<<<<<<<< * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6pygame_5_sdl2_5video_Texture(((PyTypeObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":638 * raise TypeError('2nd argument must be a surface') * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer = renderer._renderer * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) */ __Pyx_INCREF((PyObject *)__pyx_v_renderer); __Pyx_GIVEREF((PyObject *)__pyx_v_renderer); __Pyx_GOTREF((PyObject *)__pyx_v_self->renderer); __Pyx_DECREF((PyObject *)__pyx_v_self->renderer); __pyx_v_self->renderer = __pyx_v_renderer; /* "pygame/_sdl2/video.pyx":639 * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer # <<<<<<<<<<<<<< * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) * self._tex = SDL_CreateTextureFromSurface(_renderer, */ __pyx_t_3 = __pyx_v_renderer->_renderer; __pyx_v__renderer = __pyx_t_3; /* "pygame/_sdl2/video.pyx":640 * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< * self._tex = SDL_CreateTextureFromSurface(_renderer, * surf_ptr) */ __pyx_v_surf_ptr = pgSurface_AsSurface(__pyx_v_surface); /* "pygame/_sdl2/video.pyx":641 * cdef SDL_Renderer* _renderer = renderer._renderer * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) * self._tex = SDL_CreateTextureFromSurface(_renderer, # <<<<<<<<<<<<<< * surf_ptr) * if not self._tex: */ __pyx_v_self->_tex = SDL_CreateTextureFromSurface(__pyx_v__renderer, __pyx_v_surf_ptr); /* "pygame/_sdl2/video.pyx":643 * self._tex = SDL_CreateTextureFromSurface(_renderer, * surf_ptr) * if not self._tex: # <<<<<<<<<<<<<< * raise error() * self.width = surface.get_width() */ __pyx_t_1 = (!(__pyx_v_self->_tex != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":644 * surf_ptr) * if not self._tex: * raise error() # <<<<<<<<<<<<<< * self.width = surface.get_width() * self.height = surface.get_height() */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 644, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":643 * self._tex = SDL_CreateTextureFromSurface(_renderer, * surf_ptr) * if not self._tex: # <<<<<<<<<<<<<< * raise error() * self.width = surface.get_width() */ } /* "pygame/_sdl2/video.pyx":645 * if not self._tex: * raise error() * self.width = surface.get_width() # <<<<<<<<<<<<<< * self.height = surface.get_height() * return self */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->width = __pyx_t_7; /* "pygame/_sdl2/video.pyx":646 * raise error() * self.width = surface.get_width() * self.height = surface.get_height() # <<<<<<<<<<<<<< * return self * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->height = __pyx_t_7; /* "pygame/_sdl2/video.pyx":647 * self.width = surface.get_width() * self.height = surface.get_height() * return self # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":627 * self.width, self.height = width, height * * @staticmethod # <<<<<<<<<<<<<< * def from_surface(Renderer renderer, surface): * """ Create a texture from an existing surface. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Texture.from_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":649 * return self * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._tex: * SDL_DestroyTexture(self._tex) */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_5video_7Texture_7__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_5video_7Texture_7__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { int __pyx_t_1; /* "pygame/_sdl2/video.pyx":650 * * def __dealloc__(self): * if self._tex: # <<<<<<<<<<<<<< * SDL_DestroyTexture(self._tex) * */ __pyx_t_1 = (__pyx_v_self->_tex != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":651 * def __dealloc__(self): * if self._tex: * SDL_DestroyTexture(self._tex) # <<<<<<<<<<<<<< * * @property */ SDL_DestroyTexture(__pyx_v_self->_tex); /* "pygame/_sdl2/video.pyx":650 * * def __dealloc__(self): * if self._tex: # <<<<<<<<<<<<<< * SDL_DestroyTexture(self._tex) * */ } /* "pygame/_sdl2/video.pyx":649 * return self * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._tex: * SDL_DestroyTexture(self._tex) */ /* function exit code */ } /* "pygame/_sdl2/video.pyx":653 * SDL_DestroyTexture(self._tex) * * @property # <<<<<<<<<<<<<< * def alpha(self): * # https://wiki.libsdl.org/SDL_GetTextureAlphaMod */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { Uint8 __pyx_v_alpha; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":657 * # https://wiki.libsdl.org/SDL_GetTextureAlphaMod * cdef Uint8 alpha * res = SDL_GetTextureAlphaMod(self._tex, &alpha) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_GetTextureAlphaMod(__pyx_v_self->_tex, (&__pyx_v_alpha)); /* "pygame/_sdl2/video.pyx":658 * cdef Uint8 alpha * res = SDL_GetTextureAlphaMod(self._tex, &alpha) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":659 * res = SDL_GetTextureAlphaMod(self._tex, &alpha) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return alpha */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 659, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":658 * cdef Uint8 alpha * res = SDL_GetTextureAlphaMod(self._tex, &alpha) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":661 * raise error() * * return alpha # <<<<<<<<<<<<<< * * @alpha.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_Uint8(__pyx_v_alpha); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":653 * SDL_DestroyTexture(self._tex) * * @property # <<<<<<<<<<<<<< * def alpha(self): * # https://wiki.libsdl.org/SDL_GetTextureAlphaMod */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Texture.alpha.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":663 * return alpha * * @alpha.setter # <<<<<<<<<<<<<< * def alpha(self, Uint8 new_value): * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_value) { Uint8 __pyx_v_new_value; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_new_value); { __pyx_v_new_value = __Pyx_PyInt_As_Uint8(__pyx_arg_new_value); if (unlikely((__pyx_v_new_value == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.alpha.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), ((Uint8)__pyx_v_new_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, Uint8 __pyx_v_new_value) { int __pyx_v_res; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":666 * def alpha(self, Uint8 new_value): * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * res = SDL_SetTextureAlphaMod(self._tex, new_value) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_SetTextureAlphaMod(__pyx_v_self->_tex, __pyx_v_new_value); /* "pygame/_sdl2/video.pyx":667 * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * res = SDL_SetTextureAlphaMod(self._tex, new_value) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":668 * res = SDL_SetTextureAlphaMod(self._tex, new_value) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 668, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":667 * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * res = SDL_SetTextureAlphaMod(self._tex, new_value) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":663 * return alpha * * @alpha.setter # <<<<<<<<<<<<<< * def alpha(self, Uint8 new_value): * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Texture.alpha.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":670 * raise error() * * @property # <<<<<<<<<<<<<< * def blend_mode(self): * # https://wiki.libsdl.org/SDL_GetTextureBlendMode */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { SDL_BlendMode __pyx_v_blendMode; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":674 * # https://wiki.libsdl.org/SDL_GetTextureBlendMode * cdef SDL_BlendMode blendMode * res = SDL_GetTextureBlendMode(self._tex, &blendMode) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_GetTextureBlendMode(__pyx_v_self->_tex, (&__pyx_v_blendMode)); /* "pygame/_sdl2/video.pyx":675 * cdef SDL_BlendMode blendMode * res = SDL_GetTextureBlendMode(self._tex, &blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":676 * res = SDL_GetTextureBlendMode(self._tex, &blendMode) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return blendMode */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 676, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":675 * cdef SDL_BlendMode blendMode * res = SDL_GetTextureBlendMode(self._tex, &blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":678 * raise error() * * return blendMode # <<<<<<<<<<<<<< * * @blend_mode.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_blendMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":670 * raise error() * * @property # <<<<<<<<<<<<<< * def blend_mode(self): * # https://wiki.libsdl.org/SDL_GetTextureBlendMode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Texture.blend_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":680 * return blendMode * * @blend_mode.setter # <<<<<<<<<<<<<< * def blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetTextureBlendMode */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_blendMode); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_blendMode) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), ((PyObject *)__pyx_v_blendMode)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_blendMode) { int __pyx_v_res; int __pyx_r; __Pyx_RefNannyDeclarations SDL_BlendMode __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":683 * def blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * res = SDL_SetTextureBlendMode(self._tex, blendMode) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_blendMode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error) __pyx_v_res = SDL_SetTextureBlendMode(__pyx_v_self->_tex, __pyx_t_1); /* "pygame/_sdl2/video.pyx":684 * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * res = SDL_SetTextureBlendMode(self._tex, blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_2 = (__pyx_v_res < 0); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/video.pyx":685 * res = SDL_SetTextureBlendMode(self._tex, blendMode) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 685, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":684 * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * res = SDL_SetTextureBlendMode(self._tex, blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":680 * return blendMode * * @blend_mode.setter # <<<<<<<<<<<<<< * def blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetTextureBlendMode */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Texture.blend_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":687 * raise error() * * @property # <<<<<<<<<<<<<< * def color(self): * # https://wiki.libsdl.org/SDL_GetTextureColorMod */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":690 * def color(self): * # https://wiki.libsdl.org/SDL_GetTextureColorMod * res = SDL_GetTextureColorMod(self._tex, # <<<<<<<<<<<<<< * &self._color.data[0], * &self._color.data[1], */ __pyx_v_res = SDL_GetTextureColorMod(__pyx_v_self->_tex, (&(__pyx_v_self->_color->data[0])), (&(__pyx_v_self->_color->data[1])), (&(__pyx_v_self->_color->data[2]))); /* "pygame/_sdl2/video.pyx":694 * &self._color.data[1], * &self._color.data[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":695 * &self._color.data[2]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return self._color */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 695, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":694 * &self._color.data[1], * &self._color.data[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":697 * raise error() * * return self._color # <<<<<<<<<<<<<< * * @color.setter */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_color); __pyx_r = ((PyObject *)__pyx_v_self->_color); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":687 * raise error() * * @property # <<<<<<<<<<<<<< * def color(self): * # https://wiki.libsdl.org/SDL_GetTextureColorMod */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Texture.color.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":699 * return self._color * * @color.setter # <<<<<<<<<<<<<< * def color(self, new_value): * # https://wiki.libsdl.org/SDL_SetTextureColorMod */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), ((PyObject *)__pyx_v_new_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_new_value) { int __pyx_v_res; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Uint8 __pyx_t_2; Uint8 __pyx_t_3; Uint8 __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":703 * # https://wiki.libsdl.org/SDL_SetTextureColorMod * res = SDL_SetTextureColorMod(self._tex, * new_value[0], # <<<<<<<<<<<<<< * new_value[1], * new_value[2]) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":704 * res = SDL_SetTextureColorMod(self._tex, * new_value[0], * new_value[1], # <<<<<<<<<<<<<< * new_value[2]) * if res < 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":705 * new_value[0], * new_value[1], * new_value[2]) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":702 * def color(self, new_value): * # https://wiki.libsdl.org/SDL_SetTextureColorMod * res = SDL_SetTextureColorMod(self._tex, # <<<<<<<<<<<<<< * new_value[0], * new_value[1], */ __pyx_v_res = SDL_SetTextureColorMod(__pyx_v_self->_tex, __pyx_t_2, __pyx_t_3, __pyx_t_4); /* "pygame/_sdl2/video.pyx":706 * new_value[1], * new_value[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_5 = (__pyx_v_res < 0); if (unlikely(__pyx_t_5)) { /* "pygame/_sdl2/video.pyx":707 * new_value[2]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def get_rect(self, **kwargs): */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 707, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":706 * new_value[1], * new_value[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":699 * return self._color * * @color.setter # <<<<<<<<<<<<<< * def color(self, new_value): * # https://wiki.libsdl.org/SDL_SetTextureColorMod */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sdl2.video.Texture.color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":709 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * """ Get the rectangular area of the texture. * like surface.get_rect(), returns a new rectangle covering the entire surface. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_9get_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_7Texture_8get_rect, " Get the rectangular area of the texture.\n like surface.get_rect(), returns a new rectangle covering the entire surface.\n This rectangle will always start at 0, 0 with a width. and height the same size as the texture.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_9get_rect = {"get_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_9get_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_8get_rect}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_9get_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_rect", 1, 0, 0, __pyx_nargs); return NULL;} if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_rect", 1))) return NULL; if (__pyx_kwds) { __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_rect = NULL; PyObject *__pyx_v_key = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_rect", 1); /* "pygame/_sdl2/video.pyx":714 * This rectangle will always start at 0, 0 with a width. and height the same size as the texture. * """ * rect = pgRect_New4(0, 0, self.width, self.height) # <<<<<<<<<<<<<< * for key in kwargs: * setattr(rect, key, kwargs[key]) */ __pyx_t_1 = pgRect_New4(0, 0, __pyx_v_self->width, __pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":715 * """ * rect = pgRect_New4(0, 0, self.width, self.height) * for key in kwargs: # <<<<<<<<<<<<<< * setattr(rect, key, kwargs[key]) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":716 * rect = pgRect_New4(0, 0, self.width, self.height) * for key in kwargs: * setattr(rect, key, kwargs[key]) # <<<<<<<<<<<<<< * * return rect */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_SetAttr(__pyx_v_rect, __pyx_v_key, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":718 * setattr(rect, key, kwargs[key]) * * return rect # <<<<<<<<<<<<<< * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rect); __pyx_r = __pyx_v_rect; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":709 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * """ Get the rectangular area of the texture. * like surface.get_rect(), returns a new rectangle covering the entire surface. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Texture.get_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rect); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":720 * return rect * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE */ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, SDL_Rect *__pyx_v_csrcrect, SDL_Rect *__pyx_v_cdstrect, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal *__pyx_optional_args) { float __pyx_v_angle = ((float)0.0); SDL_Point *__pyx_v_originptr = ((SDL_Point *)NULL); /* "pygame/_sdl2/video.pyx":721 * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, * bint flip_x=False, bint flip_y=False): # <<<<<<<<<<<<<< * cdef int flip = SDL_FLIP_NONE * if flip_x: */ int __pyx_v_flip_x = ((int)0); int __pyx_v_flip_y = ((int)0); int __pyx_v_flip; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_internal", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_angle = __pyx_optional_args->angle; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_originptr = __pyx_optional_args->originptr; if (__pyx_optional_args->__pyx_n > 2) { __pyx_v_flip_x = __pyx_optional_args->flip_x; if (__pyx_optional_args->__pyx_n > 3) { __pyx_v_flip_y = __pyx_optional_args->flip_y; } } } } } /* "pygame/_sdl2/video.pyx":722 * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE # <<<<<<<<<<<<<< * if flip_x: * flip |= SDL_FLIP_HORIZONTAL */ __pyx_v_flip = SDL_FLIP_NONE; /* "pygame/_sdl2/video.pyx":723 * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE * if flip_x: # <<<<<<<<<<<<<< * flip |= SDL_FLIP_HORIZONTAL * if flip_y: */ if (__pyx_v_flip_x) { /* "pygame/_sdl2/video.pyx":724 * cdef int flip = SDL_FLIP_NONE * if flip_x: * flip |= SDL_FLIP_HORIZONTAL # <<<<<<<<<<<<<< * if flip_y: * flip |= SDL_FLIP_VERTICAL */ __pyx_v_flip = (__pyx_v_flip | SDL_FLIP_HORIZONTAL); /* "pygame/_sdl2/video.pyx":723 * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE * if flip_x: # <<<<<<<<<<<<<< * flip |= SDL_FLIP_HORIZONTAL * if flip_y: */ } /* "pygame/_sdl2/video.pyx":725 * if flip_x: * flip |= SDL_FLIP_HORIZONTAL * if flip_y: # <<<<<<<<<<<<<< * flip |= SDL_FLIP_VERTICAL * */ if (__pyx_v_flip_y) { /* "pygame/_sdl2/video.pyx":726 * flip |= SDL_FLIP_HORIZONTAL * if flip_y: * flip |= SDL_FLIP_VERTICAL # <<<<<<<<<<<<<< * * res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, */ __pyx_v_flip = (__pyx_v_flip | SDL_FLIP_VERTICAL); /* "pygame/_sdl2/video.pyx":725 * if flip_x: * flip |= SDL_FLIP_HORIZONTAL * if flip_y: # <<<<<<<<<<<<<< * flip |= SDL_FLIP_VERTICAL * */ } /* "pygame/_sdl2/video.pyx":728 * flip |= SDL_FLIP_VERTICAL * * res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, # <<<<<<<<<<<<<< * angle, originptr, flip) * if res < 0: */ __pyx_v_res = SDL_RenderCopyEx(__pyx_v_self->renderer->_renderer, __pyx_v_self->_tex, __pyx_v_csrcrect, __pyx_v_cdstrect, __pyx_v_angle, __pyx_v_originptr, ((SDL_RendererFlip)__pyx_v_flip)); /* "pygame/_sdl2/video.pyx":730 * res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, * angle, originptr, flip) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":731 * angle, originptr, flip) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 731, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":730 * res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, * angle, originptr, flip) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":720 * return rect * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw *__pyx_optional_args) { PyObject *__pyx_v_srcrect = ((PyObject *)Py_None); PyObject *__pyx_v_dstrect = ((PyObject *)Py_None); float __pyx_v_angle = ((float)0.0); PyObject *__pyx_v_origin = ((PyObject *)Py_None); /* "pygame/_sdl2/video.pyx":734 * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, * bint flip_x=False, bint flip_y=False) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the texture to the rendering target. * */ int __pyx_v_flip_x = ((int)0); int __pyx_v_flip_y = ((int)0); SDL_Rect __pyx_v_src; SDL_Rect __pyx_v_dst; SDL_Rect *__pyx_v_csrcrect; SDL_Rect *__pyx_v_cdstrect; SDL_Point __pyx_v_corigin; SDL_Point *__pyx_v_originptr; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_srcrect = __pyx_optional_args->srcrect; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_dstrect = __pyx_optional_args->dstrect; if (__pyx_optional_args->__pyx_n > 2) { __pyx_v_angle = __pyx_optional_args->angle; if (__pyx_optional_args->__pyx_n > 3) { __pyx_v_origin = __pyx_optional_args->origin; if (__pyx_optional_args->__pyx_n > 4) { __pyx_v_flip_x = __pyx_optional_args->flip_x; if (__pyx_optional_args->__pyx_n > 5) { __pyx_v_flip_y = __pyx_optional_args->flip_y; } } } } } } } /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_flip_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_flip_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[7] = {__pyx_t_7, __pyx_v_srcrect, __pyx_v_dstrect, __pyx_t_3, __pyx_v_origin, __pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 6+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sdl2/video.pyx":747 * """ * cdef SDL_Rect src, dst * cdef SDL_Rect *csrcrect = NULL # <<<<<<<<<<<<<< * cdef SDL_Rect *cdstrect = NULL * cdef SDL_Point corigin */ __pyx_v_csrcrect = NULL; /* "pygame/_sdl2/video.pyx":748 * cdef SDL_Rect src, dst * cdef SDL_Rect *csrcrect = NULL * cdef SDL_Rect *cdstrect = NULL # <<<<<<<<<<<<<< * cdef SDL_Point corigin * cdef SDL_Point *originptr */ __pyx_v_cdstrect = NULL; /* "pygame/_sdl2/video.pyx":752 * cdef SDL_Point *originptr * * if srcrect is not None: # <<<<<<<<<<<<<< * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: */ __pyx_t_9 = (__pyx_v_srcrect != Py_None); if (__pyx_t_9) { /* "pygame/_sdl2/video.pyx":753 * * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) # <<<<<<<<<<<<<< * if not csrcrect: * raise TypeError("the argument is not a rectangle or None") */ __pyx_v_csrcrect = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_src)); /* "pygame/_sdl2/video.pyx":754 * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: # <<<<<<<<<<<<<< * raise TypeError("the argument is not a rectangle or None") * */ __pyx_t_9 = (!(__pyx_v_csrcrect != 0)); if (unlikely(__pyx_t_9)) { /* "pygame/_sdl2/video.pyx":755 * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: * raise TypeError("the argument is not a rectangle or None") # <<<<<<<<<<<<<< * * if dstrect is not None: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 755, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":754 * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: # <<<<<<<<<<<<<< * raise TypeError("the argument is not a rectangle or None") * */ } /* "pygame/_sdl2/video.pyx":752 * cdef SDL_Point *originptr * * if srcrect is not None: # <<<<<<<<<<<<<< * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: */ } /* "pygame/_sdl2/video.pyx":757 * raise TypeError("the argument is not a rectangle or None") * * if dstrect is not None: # <<<<<<<<<<<<<< * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: */ __pyx_t_9 = (__pyx_v_dstrect != Py_None); if (__pyx_t_9) { /* "pygame/_sdl2/video.pyx":758 * * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) # <<<<<<<<<<<<<< * if cdstrect == NULL: * if len(dstrect) == 2: */ __pyx_v_cdstrect = pgRect_FromObject(__pyx_v_dstrect, (&__pyx_v_dst)); /* "pygame/_sdl2/video.pyx":759 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< * if len(dstrect) == 2: * dst.x = dstrect[0] */ __pyx_t_9 = (__pyx_v_cdstrect == NULL); if (__pyx_t_9) { /* "pygame/_sdl2/video.pyx":760 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< * dst.x = dstrect[0] * dst.y = dstrect[1] */ __pyx_t_10 = PyObject_Length(__pyx_v_dstrect); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 760, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 == 2); if (likely(__pyx_t_9)) { /* "pygame/_sdl2/video.pyx":761 * if cdstrect == NULL: * if len(dstrect) == 2: * dst.x = dstrect[0] # <<<<<<<<<<<<<< * dst.y = dstrect[1] * dst.w = self.width */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dstrect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.x = __pyx_t_11; /* "pygame/_sdl2/video.pyx":762 * if len(dstrect) == 2: * dst.x = dstrect[0] * dst.y = dstrect[1] # <<<<<<<<<<<<<< * dst.w = self.width * dst.h = self.height */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dstrect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.y = __pyx_t_11; /* "pygame/_sdl2/video.pyx":763 * dst.x = dstrect[0] * dst.y = dstrect[1] * dst.w = self.width # <<<<<<<<<<<<<< * dst.h = self.height * cdstrect = &dst */ __pyx_t_11 = __pyx_v_self->width; __pyx_v_dst.w = __pyx_t_11; /* "pygame/_sdl2/video.pyx":764 * dst.y = dstrect[1] * dst.w = self.width * dst.h = self.height # <<<<<<<<<<<<<< * cdstrect = &dst * else: */ __pyx_t_11 = __pyx_v_self->height; __pyx_v_dst.h = __pyx_t_11; /* "pygame/_sdl2/video.pyx":765 * dst.w = self.width * dst.h = self.height * cdstrect = &dst # <<<<<<<<<<<<<< * else: * raise TypeError('dstrect must be a position, rect, or None') */ __pyx_v_cdstrect = (&__pyx_v_dst); /* "pygame/_sdl2/video.pyx":760 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< * dst.x = dstrect[0] * dst.y = dstrect[1] */ goto __pyx_L7; } /* "pygame/_sdl2/video.pyx":767 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< * * if origin: */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 767, __pyx_L1_error) } __pyx_L7:; /* "pygame/_sdl2/video.pyx":759 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< * if len(dstrect) == 2: * dst.x = dstrect[0] */ } /* "pygame/_sdl2/video.pyx":757 * raise TypeError("the argument is not a rectangle or None") * * if dstrect is not None: # <<<<<<<<<<<<<< * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: */ } /* "pygame/_sdl2/video.pyx":769 * raise TypeError('dstrect must be a position, rect, or None') * * if origin: # <<<<<<<<<<<<<< * originptr = &corigin * corigin.x = origin[0] */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_origin); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 769, __pyx_L1_error) if (__pyx_t_9) { /* "pygame/_sdl2/video.pyx":770 * * if origin: * originptr = &corigin # <<<<<<<<<<<<<< * corigin.x = origin[0] * corigin.y = origin[1] */ __pyx_v_originptr = (&__pyx_v_corigin); /* "pygame/_sdl2/video.pyx":771 * if origin: * originptr = &corigin * corigin.x = origin[0] # <<<<<<<<<<<<<< * corigin.y = origin[1] * else: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_origin, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_corigin.x = __pyx_t_11; /* "pygame/_sdl2/video.pyx":772 * originptr = &corigin * corigin.x = origin[0] * corigin.y = origin[1] # <<<<<<<<<<<<<< * else: * originptr = NULL */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_origin, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_corigin.y = __pyx_t_11; /* "pygame/_sdl2/video.pyx":769 * raise TypeError('dstrect must be a position, rect, or None') * * if origin: # <<<<<<<<<<<<<< * originptr = &corigin * corigin.x = origin[0] */ goto __pyx_L8; } /* "pygame/_sdl2/video.pyx":774 * corigin.y = origin[1] * else: * originptr = NULL # <<<<<<<<<<<<<< * * self.draw_internal(csrcrect, cdstrect, angle, originptr, */ /*else*/ { __pyx_v_originptr = NULL; } __pyx_L8:; /* "pygame/_sdl2/video.pyx":776 * originptr = NULL * * self.draw_internal(csrcrect, cdstrect, angle, originptr, # <<<<<<<<<<<<<< * flip_x, flip_y) * */ __pyx_t_12.__pyx_n = 4; __pyx_t_12.angle = __pyx_v_angle; __pyx_t_12.originptr = __pyx_v_originptr; __pyx_t_12.flip_x = __pyx_v_flip_x; __pyx_t_12.flip_y = __pyx_v_flip_y; __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *)__pyx_v_self->__pyx_vtab)->draw_internal(__pyx_v_self, __pyx_v_csrcrect, __pyx_v_cdstrect, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pygame._sdl2.video.Texture.draw", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_7Texture_10draw, " Copy a portion of the texture to the rendering target.\n\n :param srcrect: source rectangle on the texture, or None for the entire texture.\n :param dstrect: destination rectangle or position on the render target, or None for entire target.\n The texture is stretched to fill dstrect.\n :param float angle: angle (in degrees) to rotate dstrect around (clockwise).\n :param origin: point around which dstrect will be rotated.\n If None, it will equal the center: (dstrect.w/2, dstrect.h/2).\n :param bool flip_x: flip horizontally.\n :param bool flip_y: flip vertically.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_11draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_10draw}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_srcrect = 0; PyObject *__pyx_v_dstrect = 0; float __pyx_v_angle; PyObject *__pyx_v_origin = 0; int __pyx_v_flip_x; int __pyx_v_flip_y; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_srcrect,&__pyx_n_s_dstrect,&__pyx_n_s_angle,&__pyx_n_s_origin,&__pyx_n_s_flip_x,&__pyx_n_s_flip_y,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_srcrect); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dstrect); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_angle); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_origin); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flip_x); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flip_y); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 733, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_srcrect = values[0]; __pyx_v_dstrect = values[1]; if (values[2]) { __pyx_v_angle = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_angle == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error) } else { __pyx_v_angle = ((float)0.0); } __pyx_v_origin = values[3]; if (values[4]) { __pyx_v_flip_x = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_flip_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":734 * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, * bint flip_x=False, bint flip_y=False) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the texture to the rendering target. * */ __pyx_v_flip_x = ((int)0); } if (values[5]) { __pyx_v_flip_y = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_flip_y == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L3_error) } else { __pyx_v_flip_y = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 733, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_10draw(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_srcrect, __pyx_v_dstrect, __pyx_v_angle, __pyx_v_origin, __pyx_v_flip_x, __pyx_v_flip_y); /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10draw(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_srcrect, PyObject *__pyx_v_dstrect, float __pyx_v_angle, PyObject *__pyx_v_origin, int __pyx_v_flip_x, int __pyx_v_flip_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 6; __pyx_t_1.srcrect = __pyx_v_srcrect; __pyx_t_1.dstrect = __pyx_v_dstrect; __pyx_t_1.angle = __pyx_v_angle; __pyx_t_1.origin = __pyx_v_origin; __pyx_t_1.flip_x = __pyx_v_flip_x; __pyx_t_1.flip_y = __pyx_v_flip_y; __pyx_vtabptr_6pygame_5_sdl2_5video_Texture->draw(__pyx_v_self, 1, &__pyx_t_1); __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":779 * flip_x, flip_y) * * def update(self, surface, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_UpdateTexture * # Should it accept a raw pixel data array too? */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13update(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_7Texture_12update, " Update the texture with Surface.\n This is a fairly slow function, intended for use with static textures that do not change often.\n\n If the texture is intended to be updated often,\n it is preferred to create the texture as streaming and use the locking functions.\n\n While this function will work with streaming textures,\n for optimization reasons you may not get the pixels back if you lock the texture afterward.\n\n :param surface: source Surface.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_13update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_13update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_12update}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13update(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_area = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,&__pyx_n_s_area,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_area); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 779, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_surface = values[0]; __pyx_v_area = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("update", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Texture.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_12update(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_surface, __pyx_v_area); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12update(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_area) { SDL_Rect __pyx_v_rect; SDL_Rect *__pyx_v_rectptr; SDL_Surface *__pyx_v_surf; SDL_Surface *__pyx_v_converted_surf; SDL_PixelFormat *__pyx_v_pixel_format; SDL_BlendMode __pyx_v_blend; Uint32 __pyx_v_format_; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 1); /* "pygame/_sdl2/video.pyx":794 * """ * * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError("update source should be a Surface.") * */ __pyx_t_1 = (!(pgSurface_Check(__pyx_v_surface) != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":795 * * if not pgSurface_Check(surface): * raise TypeError("update source should be a Surface.") # <<<<<<<<<<<<<< * * cdef SDL_Rect rect */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 795, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":794 * """ * * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< * raise TypeError("update source should be a Surface.") * */ } /* "pygame/_sdl2/video.pyx":798 * * cdef SDL_Rect rect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &rect) # <<<<<<<<<<<<<< * cdef SDL_Surface *surf = pgSurface_AsSurface(surface) * */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_rect)); /* "pygame/_sdl2/video.pyx":799 * cdef SDL_Rect rect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &rect) * cdef SDL_Surface *surf = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< * * # For converting the surface, if needed */ __pyx_v_surf = pgSurface_AsSurface(__pyx_v_surface); /* "pygame/_sdl2/video.pyx":802 * * # For converting the surface, if needed * cdef SDL_Surface *converted_surf = NULL; # <<<<<<<<<<<<<< * cdef SDL_PixelFormat *pixel_format = NULL; * cdef SDL_BlendMode blend; */ __pyx_v_converted_surf = NULL; /* "pygame/_sdl2/video.pyx":803 * # For converting the surface, if needed * cdef SDL_Surface *converted_surf = NULL; * cdef SDL_PixelFormat *pixel_format = NULL; # <<<<<<<<<<<<<< * cdef SDL_BlendMode blend; * */ __pyx_v_pixel_format = NULL; /* "pygame/_sdl2/video.pyx":806 * cdef SDL_BlendMode blend; * * if rectptr == NULL and area is not None: # <<<<<<<<<<<<<< * raise TypeError('area must be a rectangle or None') * */ __pyx_t_3 = (__pyx_v_rectptr == NULL); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (__pyx_v_area != Py_None); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":807 * * if rectptr == NULL and area is not None: * raise TypeError('area must be a rectangle or None') # <<<<<<<<<<<<<< * * cdef Uint32 format_ */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 807, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":806 * cdef SDL_BlendMode blend; * * if rectptr == NULL and area is not None: # <<<<<<<<<<<<<< * raise TypeError('area must be a rectangle or None') * */ } /* "pygame/_sdl2/video.pyx":810 * * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_QueryTexture(__pyx_v_self->_tex, (&__pyx_v_format_), NULL, NULL, NULL) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":811 * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): * raise error() # <<<<<<<<<<<<<< * * if format_ != surf.format.format: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 811, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":810 * * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":813 * raise error() * * if format_ != surf.format.format: # <<<<<<<<<<<<<< * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): * raise error() */ __pyx_t_1 = (__pyx_v_format_ != __pyx_v_surf->format->format); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":814 * * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_GetSurfaceBlendMode(__pyx_v_surf, (&__pyx_v_blend)) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":815 * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): * raise error() # <<<<<<<<<<<<<< * * pixel_format = SDL_AllocFormat(format_) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 815, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":814 * * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":817 * raise error() * * pixel_format = SDL_AllocFormat(format_) # <<<<<<<<<<<<<< * if (pixel_format == NULL): * raise error() */ __pyx_v_pixel_format = SDL_AllocFormat(__pyx_v_format_); /* "pygame/_sdl2/video.pyx":818 * * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_pixel_format == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":819 * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): * raise error() # <<<<<<<<<<<<<< * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 819, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":818 * * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":821 * raise error() * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) # <<<<<<<<<<<<<< * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): * SDL_FreeSurface(converted_surf) */ __pyx_v_converted_surf = SDL_ConvertSurface(__pyx_v_surf, __pyx_v_pixel_format, 0); /* "pygame/_sdl2/video.pyx":822 * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): # <<<<<<<<<<<<<< * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) */ __pyx_t_1 = (SDL_SetSurfaceBlendMode(__pyx_v_converted_surf, __pyx_v_blend) != 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":823 * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): * SDL_FreeSurface(converted_surf) # <<<<<<<<<<<<<< * SDL_FreeFormat(pixel_format) * raise error() */ SDL_FreeSurface(__pyx_v_converted_surf); /* "pygame/_sdl2/video.pyx":824 * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) # <<<<<<<<<<<<<< * raise error() * */ SDL_FreeFormat(__pyx_v_pixel_format); /* "pygame/_sdl2/video.pyx":825 * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) * raise error() # <<<<<<<<<<<<<< * * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 825, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":822 * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): # <<<<<<<<<<<<<< * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) */ } /* "pygame/_sdl2/video.pyx":827 * raise error() * * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) # <<<<<<<<<<<<<< * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) */ __pyx_v_res = SDL_UpdateTexture(__pyx_v_self->_tex, __pyx_v_rectptr, __pyx_v_converted_surf->pixels, __pyx_v_converted_surf->pitch); /* "pygame/_sdl2/video.pyx":828 * * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) * SDL_FreeSurface(converted_surf) # <<<<<<<<<<<<<< * SDL_FreeFormat(pixel_format) * else: */ SDL_FreeSurface(__pyx_v_converted_surf); /* "pygame/_sdl2/video.pyx":829 * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) # <<<<<<<<<<<<<< * else: * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) */ SDL_FreeFormat(__pyx_v_pixel_format); /* "pygame/_sdl2/video.pyx":813 * raise error() * * if format_ != surf.format.format: # <<<<<<<<<<<<<< * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): * raise error() */ goto __pyx_L8; } /* "pygame/_sdl2/video.pyx":831 * SDL_FreeFormat(pixel_format) * else: * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) # <<<<<<<<<<<<<< * * if res < 0: */ /*else*/ { __pyx_v_res = SDL_UpdateTexture(__pyx_v_self->_tex, __pyx_v_rectptr, __pyx_v_surf->pixels, __pyx_v_surf->pitch); } __pyx_L8:; /* "pygame/_sdl2/video.pyx":833 * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) * * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":834 * * if res < 0: * raise error() # <<<<<<<<<<<<<< * * cdef class Image: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 834, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":833 * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) * * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":779 * flip_x, flip_y) * * def update(self, surface, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_UpdateTexture * # Should it accept a raw pixel data array too? */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Texture.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pxd":426 * cdef SDL_Texture* _tex * cdef Color _color * cdef readonly Renderer renderer # <<<<<<<<<<<<<< * cdef readonly int width * cdef readonly int height */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_8renderer_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_8renderer_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_8renderer___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8renderer___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->renderer); __pyx_r = ((PyObject *)__pyx_v_self->renderer); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pxd":427 * cdef Color _color * cdef readonly Renderer renderer * cdef readonly int width # <<<<<<<<<<<<<< * cdef readonly int height * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5width_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5width_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_5width___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5width___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Texture.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pxd":428 * cdef readonly Renderer renderer * cdef readonly int width * cdef readonly int height # <<<<<<<<<<<<<< * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_6height_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_6height_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_6height___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_6height___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Texture.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_14__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Texture.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_16__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Texture *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":838 * cdef class Image: * * def __cinit__(self): # <<<<<<<<<<<<<< * self.angle = 0 * self._origin.x = 0 */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { Uint8 __pyx_v_defaultColor[4]; int __pyx_r; __Pyx_RefNannyDeclarations Uint8 __pyx_t_1[4]; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "pygame/_sdl2/video.pyx":839 * * def __cinit__(self): * self.angle = 0 # <<<<<<<<<<<<<< * self._origin.x = 0 * self._origin.y = 0 */ __pyx_v_self->angle = 0.0; /* "pygame/_sdl2/video.pyx":840 * def __cinit__(self): * self.angle = 0 * self._origin.x = 0 # <<<<<<<<<<<<<< * self._origin.y = 0 * self._originptr = NULL */ __pyx_v_self->_origin.x = 0; /* "pygame/_sdl2/video.pyx":841 * self.angle = 0 * self._origin.x = 0 * self._origin.y = 0 # <<<<<<<<<<<<<< * self._originptr = NULL * self.flip_x = False */ __pyx_v_self->_origin.y = 0; /* "pygame/_sdl2/video.pyx":842 * self._origin.x = 0 * self._origin.y = 0 * self._originptr = NULL # <<<<<<<<<<<<<< * self.flip_x = False * self.flip_y = False */ __pyx_v_self->_originptr = NULL; /* "pygame/_sdl2/video.pyx":843 * self._origin.y = 0 * self._originptr = NULL * self.flip_x = False # <<<<<<<<<<<<<< * self.flip_y = False * */ __pyx_v_self->flip_x = 0; /* "pygame/_sdl2/video.pyx":844 * self._originptr = NULL * self.flip_x = False * self.flip_y = False # <<<<<<<<<<<<<< * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] */ __pyx_v_self->flip_y = 0; /* "pygame/_sdl2/video.pyx":846 * self.flip_y = False * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._color = pgColor_NewLength(defaultColor, 3) * self.alpha = 255 */ __pyx_t_1[0] = 0xFF; __pyx_t_1[1] = 0xFF; __pyx_t_1[2] = 0xFF; __pyx_t_1[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_1, sizeof(__pyx_v_defaultColor[0]) * (4)); /* "pygame/_sdl2/video.pyx":847 * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) # <<<<<<<<<<<<<< * self.alpha = 255 * */ __pyx_t_2 = pgColor_NewLength(__pyx_v_defaultColor, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->_color); __Pyx_DECREF((PyObject *)__pyx_v_self->_color); __pyx_v_self->_color = ((pgColorObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":848 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) * self.alpha = 255 # <<<<<<<<<<<<<< * * def __init__(self, textureOrImage, srcrect=None): */ __pyx_v_self->alpha = 255.0; /* "pygame/_sdl2/video.pyx":838 * cdef class Image: * * def __cinit__(self): # <<<<<<<<<<<<<< * self.angle = 0 * self._origin.x = 0 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Image.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":850 * self.alpha = 255 * * def __init__(self, textureOrImage, srcrect=None): # <<<<<<<<<<<<<< * cdef SDL_Rect temp * cdef SDL_Rect *rectptr */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_textureOrImage = 0; PyObject *__pyx_v_srcrect = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_textureOrImage,&__pyx_n_s_srcrect,0}; values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_textureOrImage)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_srcrect); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 850, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_textureOrImage = values[0]; __pyx_v_srcrect = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 850, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Image.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), __pyx_v_textureOrImage, __pyx_v_srcrect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_textureOrImage, PyObject *__pyx_v_srcrect) { SDL_Rect __pyx_v_temp; SDL_Rect *__pyx_v_rectptr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; SDL_BlendMode __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/video.pyx":854 * cdef SDL_Rect *rectptr * * if isinstance(textureOrImage, Image): # <<<<<<<<<<<<<< * self.texture = textureOrImage.texture * self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_textureOrImage, __pyx_ptype_6pygame_5_sdl2_5video_Image); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":855 * * if isinstance(textureOrImage, Image): * self.texture = textureOrImage.texture # <<<<<<<<<<<<<< * self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_textureOrImage, __pyx_n_s_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->texture); __Pyx_DECREF((PyObject *)__pyx_v_self->texture); __pyx_v_self->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":856 * if isinstance(textureOrImage, Image): * self.texture = textureOrImage.texture * self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) # <<<<<<<<<<<<<< * else: * self.texture = textureOrImage */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_textureOrImage, __pyx_n_s_srcrect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = pgRect_New((&((pgRectObject *)__pyx_t_2)->r)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->srcrect); __Pyx_DECREF((PyObject *)__pyx_v_self->srcrect); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":854 * cdef SDL_Rect *rectptr * * if isinstance(textureOrImage, Image): # <<<<<<<<<<<<<< * self.texture = textureOrImage.texture * self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":858 * self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) * else: * self.texture = textureOrImage # <<<<<<<<<<<<<< * self.srcrect = textureOrImage.get_rect() * self.blend_mode = textureOrImage.blend_mode */ /*else*/ { if (!(likely(((__pyx_v_textureOrImage) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_textureOrImage, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 858, __pyx_L1_error) __pyx_t_3 = __pyx_v_textureOrImage; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->texture); __Pyx_DECREF((PyObject *)__pyx_v_self->texture); __pyx_v_self->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":859 * else: * self.texture = textureOrImage * self.srcrect = textureOrImage.get_rect() # <<<<<<<<<<<<<< * self.blend_mode = textureOrImage.blend_mode * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_textureOrImage, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->srcrect); __Pyx_DECREF((PyObject *)__pyx_v_self->srcrect); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":860 * self.texture = textureOrImage * self.srcrect = textureOrImage.get_rect() * self.blend_mode = textureOrImage.blend_mode # <<<<<<<<<<<<<< * * if srcrect is not None: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_textureOrImage, __pyx_n_s_blend_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->blend_mode = __pyx_t_6; /* "pygame/_sdl2/video.pyx":862 * self.blend_mode = textureOrImage.blend_mode * * if srcrect is not None: # <<<<<<<<<<<<<< * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: */ __pyx_t_1 = (__pyx_v_srcrect != Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":863 * * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('srcrect must be None or a rectangle') */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_temp)); /* "pygame/_sdl2/video.pyx":864 * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x */ __pyx_t_1 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":865 * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: * raise TypeError('srcrect must be None or a rectangle') # <<<<<<<<<<<<<< * temp.x = rectptr.x * temp.y = rectptr.y */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 865, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":864 * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x */ } /* "pygame/_sdl2/video.pyx":866 * if rectptr == NULL: * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x # <<<<<<<<<<<<<< * temp.y = rectptr.y * temp.w = rectptr.w */ __pyx_t_7 = __pyx_v_rectptr->x; __pyx_v_temp.x = __pyx_t_7; /* "pygame/_sdl2/video.pyx":867 * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x * temp.y = rectptr.y # <<<<<<<<<<<<<< * temp.w = rectptr.w * temp.h = rectptr.h */ __pyx_t_7 = __pyx_v_rectptr->y; __pyx_v_temp.y = __pyx_t_7; /* "pygame/_sdl2/video.pyx":868 * temp.x = rectptr.x * temp.y = rectptr.y * temp.w = rectptr.w # <<<<<<<<<<<<<< * temp.h = rectptr.h * */ __pyx_t_7 = __pyx_v_rectptr->w; __pyx_v_temp.w = __pyx_t_7; /* "pygame/_sdl2/video.pyx":869 * temp.y = rectptr.y * temp.w = rectptr.w * temp.h = rectptr.h # <<<<<<<<<<<<<< * * if temp.x < 0 or temp.y < 0 or \ */ __pyx_t_7 = __pyx_v_rectptr->h; __pyx_v_temp.h = __pyx_t_7; /* "pygame/_sdl2/video.pyx":871 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< * temp.w < 0 or temp.h < 0 or \ * temp.x + temp.w > self.srcrect.w or \ */ __pyx_t_8 = (__pyx_v_temp.x < 0); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } __pyx_t_8 = (__pyx_v_temp.y < 0); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } /* "pygame/_sdl2/video.pyx":872 * * if temp.x < 0 or temp.y < 0 or \ * temp.w < 0 or temp.h < 0 or \ # <<<<<<<<<<<<<< * temp.x + temp.w > self.srcrect.w or \ * temp.y + temp.h > self.srcrect.h: */ __pyx_t_8 = (__pyx_v_temp.w < 0); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } __pyx_t_8 = (__pyx_v_temp.h < 0); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } /* "pygame/_sdl2/video.pyx":873 * if temp.x < 0 or temp.y < 0 or \ * temp.w < 0 or temp.h < 0 or \ * temp.x + temp.w > self.srcrect.w or \ # <<<<<<<<<<<<<< * temp.y + temp.h > self.srcrect.h: * raise ValueError('rect values are out of range') */ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_temp.x + __pyx_v_temp.w)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } /* "pygame/_sdl2/video.pyx":874 * temp.w < 0 or temp.h < 0 or \ * temp.x + temp.w > self.srcrect.w or \ * temp.y + temp.h > self.srcrect.h: # <<<<<<<<<<<<<< * raise ValueError('rect values are out of range') * temp.x += self.srcrect.x */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_temp.y + __pyx_v_temp.h)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_8; __pyx_L7_bool_binop_done:; /* "pygame/_sdl2/video.pyx":871 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< * temp.w < 0 or temp.h < 0 or \ * temp.x + temp.w > self.srcrect.w or \ */ if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":875 * temp.x + temp.w > self.srcrect.w or \ * temp.y + temp.h > self.srcrect.h: * raise ValueError('rect values are out of range') # <<<<<<<<<<<<<< * temp.x += self.srcrect.x * temp.y += self.srcrect.y */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 875, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":871 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< * temp.w < 0 or temp.h < 0 or \ * temp.x + temp.w > self.srcrect.w or \ */ } /* "pygame/_sdl2/video.pyx":876 * temp.y + temp.h > self.srcrect.h: * raise ValueError('rect values are out of range') * temp.x += self.srcrect.x # <<<<<<<<<<<<<< * temp.y += self.srcrect.y * self.srcrect = pgRect_New(&temp) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_temp.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_temp.x = __pyx_t_7; /* "pygame/_sdl2/video.pyx":877 * raise ValueError('rect values are out of range') * temp.x += self.srcrect.x * temp.y += self.srcrect.y # <<<<<<<<<<<<<< * self.srcrect = pgRect_New(&temp) * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_temp.y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_temp.y = __pyx_t_7; /* "pygame/_sdl2/video.pyx":878 * temp.x += self.srcrect.x * temp.y += self.srcrect.y * self.srcrect = pgRect_New(&temp) # <<<<<<<<<<<<<< * * @property */ __pyx_t_3 = pgRect_New((&__pyx_v_temp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->srcrect); __Pyx_DECREF((PyObject *)__pyx_v_self->srcrect); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":862 * self.blend_mode = textureOrImage.blend_mode * * if srcrect is not None: # <<<<<<<<<<<<<< * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: */ } /* "pygame/_sdl2/video.pyx":850 * self.alpha = 255 * * def __init__(self, textureOrImage, srcrect=None): # <<<<<<<<<<<<<< * cdef SDL_Rect temp * cdef SDL_Rect *rectptr */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Image.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":880 * self.srcrect = pgRect_New(&temp) * * @property # <<<<<<<<<<<<<< * def color(self): * return self._color */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5color_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5color_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":882 * @property * def color(self): * return self._color # <<<<<<<<<<<<<< * * @color.setter */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_color); __pyx_r = ((PyObject *)__pyx_v_self->_color); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":880 * self.srcrect = pgRect_New(&temp) * * @property # <<<<<<<<<<<<<< * def color(self): * return self._color */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":884 * return self._color * * @color.setter # <<<<<<<<<<<<<< * def color(self, new_color): * self._color[:3] = new_color[:3] */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5color_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_new_color)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_new_color) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":886 * @color.setter * def color(self, new_color): * self._color[:3] = new_color[:3] # <<<<<<<<<<<<<< * * @property */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_new_color, 0, 3, NULL, NULL, &__pyx_slice__19, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_color), __pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__19, 0, 1, 1) < 0) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":884 * return self._color * * @color.setter # <<<<<<<<<<<<<< * def color(self, new_color): * self._color[:3] = new_color[:3] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":888 * self._color[:3] = new_color[:3] * * @property # <<<<<<<<<<<<<< * def origin(self): * if self._originptr == NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":890 * @property * def origin(self): * if self._originptr == NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = (__pyx_v_self->_originptr == NULL); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":891 * def origin(self): * if self._originptr == NULL: * return None # <<<<<<<<<<<<<< * else: * return (self._origin.x, self._origin.y) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":890 * @property * def origin(self): * if self._originptr == NULL: # <<<<<<<<<<<<<< * return None * else: */ } /* "pygame/_sdl2/video.pyx":893 * return None * else: * return (self._origin.x, self._origin.y) # <<<<<<<<<<<<<< * * @origin.setter */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_origin.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_origin.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pygame/_sdl2/video.pyx":888 * self._color[:3] = new_color[:3] * * @property # <<<<<<<<<<<<<< * def origin(self): * if self._originptr == NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Image.origin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":895 * return (self._origin.x, self._origin.y) * * @origin.setter # <<<<<<<<<<<<<< * def origin(self, new_origin): * if new_origin: */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_origin); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_origin) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_new_origin)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_new_origin) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":897 * @origin.setter * def origin(self, new_origin): * if new_origin: # <<<<<<<<<<<<<< * self._origin.x = new_origin[0] * self._origin.y = new_origin[1] */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_new_origin); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 897, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":898 * def origin(self, new_origin): * if new_origin: * self._origin.x = new_origin[0] # <<<<<<<<<<<<<< * self._origin.y = new_origin[1] * self._originptr = &self._origin */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_new_origin, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->_origin.x = ((int)__pyx_t_3); /* "pygame/_sdl2/video.pyx":899 * if new_origin: * self._origin.x = new_origin[0] * self._origin.y = new_origin[1] # <<<<<<<<<<<<<< * self._originptr = &self._origin * else: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_new_origin, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->_origin.y = ((int)__pyx_t_3); /* "pygame/_sdl2/video.pyx":900 * self._origin.x = new_origin[0] * self._origin.y = new_origin[1] * self._originptr = &self._origin # <<<<<<<<<<<<<< * else: * self._originptr = NULL */ __pyx_v_self->_originptr = (&__pyx_v_self->_origin); /* "pygame/_sdl2/video.pyx":897 * @origin.setter * def origin(self, new_origin): * if new_origin: # <<<<<<<<<<<<<< * self._origin.x = new_origin[0] * self._origin.y = new_origin[1] */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":902 * self._originptr = &self._origin * else: * self._originptr = NULL # <<<<<<<<<<<<<< * * def get_rect(self, **kwargs): */ /*else*/ { __pyx_v_self->_originptr = NULL; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":895 * return (self._origin.x, self._origin.y) * * @origin.setter # <<<<<<<<<<<<<< * def origin(self, new_origin): * if new_origin: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Image.origin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":904 * self._originptr = NULL * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5get_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_5Image_5get_rect = {"get_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_5get_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5get_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_rect", 1, 0, 0, __pyx_nargs); return NULL;} if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_rect", 1))) return NULL; if (__pyx_kwds) { __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_rect = NULL; PyObject *__pyx_v_key = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_rect", 1); /* "pygame/_sdl2/video.pyx":905 * * def get_rect(self, **kwargs): * rect = pgRect_New(&self.srcrect.r) # <<<<<<<<<<<<<< * for key in kwargs: * setattr(rect, key, kwargs[key]) */ __pyx_t_1 = pgRect_New((&__pyx_v_self->srcrect->r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":906 * def get_rect(self, **kwargs): * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: # <<<<<<<<<<<<<< * setattr(rect, key, kwargs[key]) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":907 * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: * setattr(rect, key, kwargs[key]) # <<<<<<<<<<<<<< * * return rect */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_SetAttr(__pyx_v_rect, __pyx_v_key, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":909 * setattr(rect, key, kwargs[key]) * * return rect # <<<<<<<<<<<<<< * * cpdef void draw(self, srcrect=None, dstrect=None) noexcept: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rect); __pyx_r = __pyx_v_rect; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":904 * self._originptr = NULL * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Image.get_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rect); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":911 * return rect * * cpdef void draw(self, srcrect=None, dstrect=None) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the image to the rendering target. * */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw *__pyx_optional_args) { PyObject *__pyx_v_srcrect = ((PyObject *)Py_None); PyObject *__pyx_v_dstrect = ((PyObject *)Py_None); SDL_Rect __pyx_v_src; SDL_Rect __pyx_v_dst; SDL_Rect *__pyx_v_csrcrect; SDL_Rect *__pyx_v_cdstrect; SDL_Rect *__pyx_v_rectptr; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; SDL_Rect __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_srcrect = __pyx_optional_args->srcrect; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_dstrect = __pyx_optional_args->dstrect; } } } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_5_sdl2_5video_5Image_7draw)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_srcrect, __pyx_v_dstrect}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sdl2/video.pyx":920 * cdef SDL_Rect src * cdef SDL_Rect dst * cdef SDL_Rect *csrcrect = NULL # <<<<<<<<<<<<<< * cdef SDL_Rect *cdstrect = NULL * cdef SDL_Rect *rectptr */ __pyx_v_csrcrect = NULL; /* "pygame/_sdl2/video.pyx":921 * cdef SDL_Rect dst * cdef SDL_Rect *csrcrect = NULL * cdef SDL_Rect *cdstrect = NULL # <<<<<<<<<<<<<< * cdef SDL_Rect *rectptr * */ __pyx_v_cdstrect = NULL; /* "pygame/_sdl2/video.pyx":924 * cdef SDL_Rect *rectptr * * if srcrect is None: # <<<<<<<<<<<<<< * csrcrect = &self.srcrect.r * else: */ __pyx_t_6 = (__pyx_v_srcrect == Py_None); if (__pyx_t_6) { /* "pygame/_sdl2/video.pyx":925 * * if srcrect is None: * csrcrect = &self.srcrect.r # <<<<<<<<<<<<<< * else: * if pgRect_Check(srcrect): */ __pyx_v_csrcrect = (&__pyx_v_self->srcrect->r); /* "pygame/_sdl2/video.pyx":924 * cdef SDL_Rect *rectptr * * if srcrect is None: # <<<<<<<<<<<<<< * csrcrect = &self.srcrect.r * else: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":927 * csrcrect = &self.srcrect.r * else: * if pgRect_Check(srcrect): # <<<<<<<<<<<<<< * src = (srcrect).r * else: */ /*else*/ { __pyx_t_6 = (pgRect_Check(__pyx_v_srcrect) != 0); if (__pyx_t_6) { /* "pygame/_sdl2/video.pyx":928 * else: * if pgRect_Check(srcrect): * src = (srcrect).r # <<<<<<<<<<<<<< * else: * */ __pyx_t_7 = ((pgRectObject *)__pyx_v_srcrect)->r; __pyx_v_src = __pyx_t_7; /* "pygame/_sdl2/video.pyx":927 * csrcrect = &self.srcrect.r * else: * if pgRect_Check(srcrect): # <<<<<<<<<<<<<< * src = (srcrect).r * else: */ goto __pyx_L4; } /* "pygame/_sdl2/video.pyx":931 * else: * * rectptr = pgRect_FromObject(srcrect, &src) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('srcrect must be a rect or None') */ /*else*/ { __pyx_v_rectptr = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_src)); /* "pygame/_sdl2/video.pyx":932 * * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x */ __pyx_t_6 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":933 * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: * raise TypeError('srcrect must be a rect or None') # <<<<<<<<<<<<<< * src.x = rectptr.x * src.y = rectptr.y */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 933, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":932 * * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x */ } /* "pygame/_sdl2/video.pyx":934 * if rectptr == NULL: * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x # <<<<<<<<<<<<<< * src.y = rectptr.y * src.w = rectptr.w */ __pyx_t_8 = __pyx_v_rectptr->x; __pyx_v_src.x = __pyx_t_8; /* "pygame/_sdl2/video.pyx":935 * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x * src.y = rectptr.y # <<<<<<<<<<<<<< * src.w = rectptr.w * src.h = rectptr.h */ __pyx_t_8 = __pyx_v_rectptr->y; __pyx_v_src.y = __pyx_t_8; /* "pygame/_sdl2/video.pyx":936 * src.x = rectptr.x * src.y = rectptr.y * src.w = rectptr.w # <<<<<<<<<<<<<< * src.h = rectptr.h * */ __pyx_t_8 = __pyx_v_rectptr->w; __pyx_v_src.w = __pyx_t_8; /* "pygame/_sdl2/video.pyx":937 * src.y = rectptr.y * src.w = rectptr.w * src.h = rectptr.h # <<<<<<<<<<<<<< * * src.x += self.srcrect.x */ __pyx_t_8 = __pyx_v_rectptr->h; __pyx_v_src.h = __pyx_t_8; } __pyx_L4:; /* "pygame/_sdl2/video.pyx":939 * src.h = rectptr.h * * src.x += self.srcrect.x # <<<<<<<<<<<<<< * src.y += self.srcrect.y * csrcrect = &src */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_src.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_src.x = __pyx_t_8; /* "pygame/_sdl2/video.pyx":940 * * src.x += self.srcrect.x * src.y += self.srcrect.y # <<<<<<<<<<<<<< * csrcrect = &src * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_src.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_src.y = __pyx_t_8; /* "pygame/_sdl2/video.pyx":941 * src.x += self.srcrect.x * src.y += self.srcrect.y * csrcrect = &src # <<<<<<<<<<<<<< * * if dstrect is not None: */ __pyx_v_csrcrect = (&__pyx_v_src); } __pyx_L3:; /* "pygame/_sdl2/video.pyx":943 * csrcrect = &src * * if dstrect is not None: # <<<<<<<<<<<<<< * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: */ __pyx_t_6 = (__pyx_v_dstrect != Py_None); if (__pyx_t_6) { /* "pygame/_sdl2/video.pyx":944 * * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) # <<<<<<<<<<<<<< * if cdstrect == NULL: * if len(dstrect) == 2: */ __pyx_v_cdstrect = pgRect_FromObject(__pyx_v_dstrect, (&__pyx_v_dst)); /* "pygame/_sdl2/video.pyx":945 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< * if len(dstrect) == 2: * dst.x = dstrect[0] */ __pyx_t_6 = (__pyx_v_cdstrect == NULL); if (__pyx_t_6) { /* "pygame/_sdl2/video.pyx":946 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< * dst.x = dstrect[0] * dst.y = dstrect[1] */ __pyx_t_9 = PyObject_Length(__pyx_v_dstrect); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 946, __pyx_L1_error) __pyx_t_6 = (__pyx_t_9 == 2); if (likely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":947 * if cdstrect == NULL: * if len(dstrect) == 2: * dst.x = dstrect[0] # <<<<<<<<<<<<<< * dst.y = dstrect[1] * dst.w = self.srcrect.w */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dstrect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.x = __pyx_t_8; /* "pygame/_sdl2/video.pyx":948 * if len(dstrect) == 2: * dst.x = dstrect[0] * dst.y = dstrect[1] # <<<<<<<<<<<<<< * dst.w = self.srcrect.w * dst.h = self.srcrect.h */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dstrect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.y = __pyx_t_8; /* "pygame/_sdl2/video.pyx":949 * dst.x = dstrect[0] * dst.y = dstrect[1] * dst.w = self.srcrect.w # <<<<<<<<<<<<<< * dst.h = self.srcrect.h * cdstrect = &dst */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.w = __pyx_t_8; /* "pygame/_sdl2/video.pyx":950 * dst.y = dstrect[1] * dst.w = self.srcrect.w * dst.h = self.srcrect.h # <<<<<<<<<<<<<< * cdstrect = &dst * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.h = __pyx_t_8; /* "pygame/_sdl2/video.pyx":951 * dst.w = self.srcrect.w * dst.h = self.srcrect.h * cdstrect = &dst # <<<<<<<<<<<<<< * else: * raise TypeError('dstrect must be a position, rect, or None') */ __pyx_v_cdstrect = (&__pyx_v_dst); /* "pygame/_sdl2/video.pyx":946 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< * dst.x = dstrect[0] * dst.y = dstrect[1] */ goto __pyx_L8; } /* "pygame/_sdl2/video.pyx":953 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< * * self.texture.color = self._color */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 953, __pyx_L1_error) } __pyx_L8:; /* "pygame/_sdl2/video.pyx":945 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< * if len(dstrect) == 2: * dst.x = dstrect[0] */ } /* "pygame/_sdl2/video.pyx":943 * csrcrect = &src * * if dstrect is not None: # <<<<<<<<<<<<<< * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: */ } /* "pygame/_sdl2/video.pyx":955 * raise TypeError('dstrect must be a position, rect, or None') * * self.texture.color = self._color # <<<<<<<<<<<<<< * self.texture.alpha = self.alpha * self.texture.blend_mode = self.blend_mode */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_color); __Pyx_INCREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_color, __pyx_t_1) < 0) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":956 * * self.texture.color = self._color * self.texture.alpha = self.alpha # <<<<<<<<<<<<<< * self.texture.blend_mode = self.blend_mode * */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_alpha, __pyx_t_1) < 0) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":957 * self.texture.color = self._color * self.texture.alpha = self.alpha * self.texture.blend_mode = self.blend_mode # <<<<<<<<<<<<<< * * self.texture.draw_internal(csrcrect, cdstrect, self.angle, */ __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_self->blend_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_blend_mode, __pyx_t_1) < 0) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":959 * self.texture.blend_mode = self.blend_mode * * self.texture.draw_internal(csrcrect, cdstrect, self.angle, # <<<<<<<<<<<<<< * self._originptr, self.flip_x, self.flip_y) * */ __pyx_t_10.__pyx_n = 4; __pyx_t_10.angle = __pyx_v_self->angle; __pyx_t_10.originptr = __pyx_v_self->_originptr; __pyx_t_10.flip_x = __pyx_v_self->flip_x; __pyx_t_10.flip_y = __pyx_v_self->flip_y; __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *)__pyx_v_self->texture->__pyx_vtab)->draw_internal(__pyx_v_self->texture, __pyx_v_csrcrect, __pyx_v_cdstrect, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":911 * return rect * * cpdef void draw(self, srcrect=None, dstrect=None) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the image to the rendering target. * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sdl2.video.Image.draw", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_5Image_6draw, " Copy a portion of the image to the rendering target.\n\n :param srcrect: source rectangle specifying a sub-image, or None for the entire image.\n :param dstrect: destination rectangle or position on the render target, or None for entire target.\n The image is stretched to fill dstrect.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_5Image_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_5Image_6draw}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_srcrect = 0; PyObject *__pyx_v_dstrect = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_srcrect,&__pyx_n_s_dstrect,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_srcrect); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dstrect); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 911, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 911, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_srcrect = values[0]; __pyx_v_dstrect = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 911, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Image.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6draw(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), __pyx_v_srcrect, __pyx_v_dstrect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6draw(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_srcrect, PyObject *__pyx_v_dstrect) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 2; __pyx_t_1.srcrect = __pyx_v_srcrect; __pyx_t_1.dstrect = __pyx_v_dstrect; __pyx_vtabptr_6pygame_5_sdl2_5video_Image->draw(__pyx_v_self, 1, &__pyx_t_1); __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sdl2.video.Image.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pxd":437 * cdef class Image: * cdef Color _color * cdef public float angle # <<<<<<<<<<<<<< * cdef SDL_Point _origin * cdef SDL_Point* _originptr */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5angle___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->angle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.angle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; float __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 437, __pyx_L1_error) __pyx_v_self->angle = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.angle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pxd":440 * cdef SDL_Point _origin * cdef SDL_Point* _originptr * cdef public bint flip_x # <<<<<<<<<<<<<< * cdef public bint flip_y * cdef public float alpha */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.flip_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 440, __pyx_L1_error) __pyx_v_self->flip_x = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.flip_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pxd":441 * cdef SDL_Point* _originptr * cdef public bint flip_x * cdef public bint flip_y # <<<<<<<<<<<<<< * cdef public float alpha * cdef public SDL_BlendMode blend_mode */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.flip_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 441, __pyx_L1_error) __pyx_v_self->flip_y = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.flip_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pxd":442 * cdef public bint flip_x * cdef public bint flip_y * cdef public float alpha # <<<<<<<<<<<<<< * cdef public SDL_BlendMode blend_mode * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.alpha.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; float __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 442, __pyx_L1_error) __pyx_v_self->alpha = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.alpha.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pxd":443 * cdef public bint flip_y * cdef public float alpha * cdef public SDL_BlendMode blend_mode # <<<<<<<<<<<<<< * * cdef public Texture texture */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_self->blend_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.blend_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; SDL_BlendMode __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 443, __pyx_L1_error) __pyx_v_self->blend_mode = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.blend_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sdl2/video.pxd":445 * cdef public SDL_BlendMode blend_mode * * cdef public Texture texture # <<<<<<<<<<<<<< * cdef public Rect srcrect * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_7texture___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->texture); __pyx_r = ((PyObject *)__pyx_v_self->texture); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(3, 445, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->texture); __Pyx_DECREF((PyObject *)__pyx_v_self->texture); __pyx_v_self->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.texture.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_4__del__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_4__del__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->texture); __Pyx_DECREF((PyObject *)__pyx_v_self->texture); __pyx_v_self->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pxd":446 * * cdef public Texture texture * cdef public Rect srcrect # <<<<<<<<<<<<<< * * cpdef void draw(self, srcrect=*, dstrect=*) noexcept */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->srcrect); __pyx_r = ((PyObject *)__pyx_v_self->srcrect); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(3, 446, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->srcrect); __Pyx_DECREF((PyObject *)__pyx_v_self->srcrect); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Image.srcrect.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_4__del__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_4__del__(struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->srcrect); __Pyx_DECREF((PyObject *)__pyx_v_self->srcrect); __pyx_v_self->srcrect = ((pgRectObject *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_9__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_5Image_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_9__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_8__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_11__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_5Image_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_11__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Image.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_5Image_10__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Image *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":965 * cdef class Renderer: * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_1from_window = {"from_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_window (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_window") < 0)) __PYX_ERR(0, 965, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_window = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("from_window", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 965, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.from_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "window", 0))) __PYX_ERR(0, 966, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(((PyTypeObject*)__pyx_v_cls), __pyx_v_window); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObject *__pyx_v_cls, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window) { struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self = 0; Uint8 __pyx_v_defaultColor[4]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; Uint8 __pyx_t_7[4]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_window", 1); /* "pygame/_sdl2/video.pyx":967 * @classmethod * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) # <<<<<<<<<<<<<< * self._win = window * if window._is_borrowed: */ if (unlikely(((PyObject *)__pyx_v_cls) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(0, 967, __pyx_L1_error) } __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pygame_5_sdl2_5video_Renderer)))) __PYX_ERR(0, 967, __pyx_L1_error) __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":968 * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) * self._win = window # <<<<<<<<<<<<<< * if window._is_borrowed: * self._is_borrowed=1 */ __Pyx_INCREF((PyObject *)__pyx_v_window); __Pyx_GIVEREF((PyObject *)__pyx_v_window); __Pyx_GOTREF((PyObject *)__pyx_v_self->_win); __Pyx_DECREF((PyObject *)__pyx_v_self->_win); __pyx_v_self->_win = __pyx_v_window; /* "pygame/_sdl2/video.pyx":969 * cdef Renderer self = cls.__new__(cls) * self._win = window * if window._is_borrowed: # <<<<<<<<<<<<<< * self._is_borrowed=1 * else: */ __pyx_t_2 = (__pyx_v_window->_is_borrowed != 0); if (likely(__pyx_t_2)) { /* "pygame/_sdl2/video.pyx":970 * self._win = window * if window._is_borrowed: * self._is_borrowed=1 # <<<<<<<<<<<<<< * else: * raise error() */ __pyx_v_self->_is_borrowed = 1; /* "pygame/_sdl2/video.pyx":969 * cdef Renderer self = cls.__new__(cls) * self._win = window * if window._is_borrowed: # <<<<<<<<<<<<<< * self._is_borrowed=1 * else: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":972 * self._is_borrowed=1 * else: * raise error() # <<<<<<<<<<<<<< * if not self._win: * raise error() */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 972, __pyx_L1_error) } __pyx_L3:; /* "pygame/_sdl2/video.pyx":973 * else: * raise error() * if not self._win: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_win)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 973, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_2); if (unlikely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":974 * raise error() * if not self._win: * raise error() # <<<<<<<<<<<<<< * * self._renderer = SDL_GetRenderer(self._win._win) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 974, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":973 * else: * raise error() * if not self._win: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":976 * raise error() * * self._renderer = SDL_GetRenderer(self._win._win) # <<<<<<<<<<<<<< * if not self._renderer: * raise error() */ __pyx_v_self->_renderer = SDL_GetRenderer(__pyx_v_self->_win->_win); /* "pygame/_sdl2/video.pyx":977 * * self._renderer = SDL_GetRenderer(self._win._win) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_6 = (!(__pyx_v_self->_renderer != 0)); if (unlikely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":978 * self._renderer = SDL_GetRenderer(self._win._win) * if not self._renderer: * raise error() # <<<<<<<<<<<<<< * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 978, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":977 * * self._renderer = SDL_GetRenderer(self._win._win) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":980 * raise error() * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None */ __pyx_t_7[0] = 0xFF; __pyx_t_7[1] = 0xFF; __pyx_t_7[2] = 0xFF; __pyx_t_7[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_7, sizeof(__pyx_v_defaultColor[0]) * (4)); /* "pygame/_sdl2/video.pyx":981 * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) # <<<<<<<<<<<<<< * self._target = None * return self */ __pyx_t_1 = pgColor_NewLength(__pyx_v_defaultColor, 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->_draw_color); __Pyx_DECREF((PyObject *)__pyx_v_self->_draw_color); __pyx_v_self->_draw_color = ((pgColorObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":982 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None # <<<<<<<<<<<<<< * return self * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->_target); __Pyx_DECREF((PyObject *)__pyx_v_self->_target); __pyx_v_self->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); /* "pygame/_sdl2/video.pyx":983 * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None * return self # <<<<<<<<<<<<<< * * def __init__(self, Window window, int index=-1, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":965 * cdef class Renderer: * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.from_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":985 * return self * * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< * int accelerated=-1, bint vsync=False, * bint target_texture=False): */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_2__init__, " Create a 2D rendering context for a window.\n\n :param Window window: where rendering is displayed.\n :param int index: index of rendering driver to initialize,\n or -1 to init the first supporting requested options.\n :param int accelerated: if 1, the renderer uses hardware acceleration.\n if 0, the renderer is a software fallback.\n -1 gives precedence to renderers using hardware acceleration.\n :param bool vsync: .present() is synchronized with the refresh rate.\n :param bool target_texture: the renderer supports rendering to texture.\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5video_8Renderer_2__init__; #endif static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window = 0; int __pyx_v_index; int __pyx_v_accelerated; int __pyx_v_vsync; int __pyx_v_target_texture; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,&__pyx_n_s_index,&__pyx_n_s_accelerated,&__pyx_n_s_vsync,&__pyx_n_s_target_texture,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_accelerated); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vsync); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_target_texture); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 985, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_window = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[0]); if (values[1]) { __pyx_v_index = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error) } else { __pyx_v_index = ((int)-1); } if (values[2]) { __pyx_v_accelerated = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_accelerated == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) } else { __pyx_v_accelerated = ((int)-1); } if (values[3]) { __pyx_v_vsync = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_vsync == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":986 * * def __init__(self, Window window, int index=-1, * int accelerated=-1, bint vsync=False, # <<<<<<<<<<<<<< * bint target_texture=False): * """ Create a 2D rendering context for a window. */ __pyx_v_vsync = ((int)0); } if (values[4]) { __pyx_v_target_texture = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_target_texture == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L3_error) } else { /* "pygame/_sdl2/video.pyx":987 * def __init__(self, Window window, int index=-1, * int accelerated=-1, bint vsync=False, * bint target_texture=False): # <<<<<<<<<<<<<< * """ Create a 2D rendering context for a window. * */ __pyx_v_target_texture = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 985, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "window", 0))) __PYX_ERR(0, 985, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_window, __pyx_v_index, __pyx_v_accelerated, __pyx_v_vsync, __pyx_v_target_texture); /* "pygame/_sdl2/video.pyx":985 * return self * * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< * int accelerated=-1, bint vsync=False, * bint target_texture=False): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window, int __pyx_v_index, int __pyx_v_accelerated, int __pyx_v_vsync, int __pyx_v_target_texture) { PyObject *__pyx_v_flags = NULL; Uint8 __pyx_v_defaultColor[4]; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Uint32 __pyx_t_4; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; Uint8 __pyx_t_7[4]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sdl2/video.pyx":1001 * # https://wiki.libsdl.org/SDL_CreateRenderer * # https://wiki.libsdl.org/SDL_RendererFlags * flags = 0 # <<<<<<<<<<<<<< * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE */ __Pyx_INCREF(__pyx_int_0); __pyx_v_flags = __pyx_int_0; /* "pygame/_sdl2/video.pyx":1002 * # https://wiki.libsdl.org/SDL_RendererFlags * flags = 0 * if accelerated >= 0: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: */ __pyx_t_1 = (__pyx_v_accelerated >= 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1003 * flags = 0 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE # <<<<<<<<<<<<<< * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC */ __pyx_t_1 = (__pyx_v_accelerated != 0); if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_ACCELERATED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_SOFTWARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_3 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":1002 * # https://wiki.libsdl.org/SDL_RendererFlags * flags = 0 * if accelerated >= 0: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: */ } /* "pygame/_sdl2/video.pyx":1004 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: */ if (__pyx_v_vsync) { /* "pygame/_sdl2/video.pyx":1005 * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC # <<<<<<<<<<<<<< * if target_texture: * flags |= _SDL_RENDERER_TARGETTEXTURE */ __pyx_t_3 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_PRESENTVSYNC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":1004 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: */ } /* "pygame/_sdl2/video.pyx":1006 * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_TARGETTEXTURE * */ if (__pyx_v_target_texture) { /* "pygame/_sdl2/video.pyx":1007 * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: * flags |= _SDL_RENDERER_TARGETTEXTURE # <<<<<<<<<<<<<< * * self._renderer = SDL_CreateRenderer(window._win, index, flags) */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_TARGETTEXTURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":1006 * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_TARGETTEXTURE * */ } /* "pygame/_sdl2/video.pyx":1009 * flags |= _SDL_RENDERER_TARGETTEXTURE * * self._renderer = SDL_CreateRenderer(window._win, index, flags) # <<<<<<<<<<<<<< * if not self._renderer: * raise error() */ __pyx_t_4 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_4 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L1_error) __pyx_v_self->_renderer = SDL_CreateRenderer(__pyx_v_window->_win, __pyx_v_index, __pyx_t_4); /* "pygame/_sdl2/video.pyx":1010 * * self._renderer = SDL_CreateRenderer(window._win, index, flags) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (!(__pyx_v_self->_renderer != 0)); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1011 * self._renderer = SDL_CreateRenderer(window._win, index, flags) * if not self._renderer: * raise error() # <<<<<<<<<<<<<< * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 1011, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1010 * * self._renderer = SDL_CreateRenderer(window._win, index, flags) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1013 * raise error() * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None */ __pyx_t_7[0] = 0xFF; __pyx_t_7[1] = 0xFF; __pyx_t_7[2] = 0xFF; __pyx_t_7[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_7, sizeof(__pyx_v_defaultColor[0]) * (4)); /* "pygame/_sdl2/video.pyx":1014 * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) # <<<<<<<<<<<<<< * self._target = None * self._win = window */ __pyx_t_3 = pgColor_NewLength(__pyx_v_defaultColor, 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 1014, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->_draw_color); __Pyx_DECREF((PyObject *)__pyx_v_self->_draw_color); __pyx_v_self->_draw_color = ((pgColorObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":1015 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None # <<<<<<<<<<<<<< * self._win = window * self._is_borrowed=0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->_target); __Pyx_DECREF((PyObject *)__pyx_v_self->_target); __pyx_v_self->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); /* "pygame/_sdl2/video.pyx":1016 * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None * self._win = window # <<<<<<<<<<<<<< * self._is_borrowed=0 * */ __Pyx_INCREF((PyObject *)__pyx_v_window); __Pyx_GIVEREF((PyObject *)__pyx_v_window); __Pyx_GOTREF((PyObject *)__pyx_v_self->_win); __Pyx_DECREF((PyObject *)__pyx_v_self->_win); __pyx_v_self->_win = __pyx_v_window; /* "pygame/_sdl2/video.pyx":1017 * self._target = None * self._win = window * self._is_borrowed=0 # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->_is_borrowed = 0; /* "pygame/_sdl2/video.pyx":985 * return self * * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< * int accelerated=-1, bint vsync=False, * bint target_texture=False): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_flags); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1019 * self._is_borrowed=0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._is_borrowed: * return */ /* Python wrapper */ static void __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { int __pyx_t_1; /* "pygame/_sdl2/video.pyx":1020 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< * return * if self._renderer: */ __pyx_t_1 = (__pyx_v_self->_is_borrowed != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1021 * def __dealloc__(self): * if self._is_borrowed: * return # <<<<<<<<<<<<<< * if self._renderer: * SDL_DestroyRenderer(self._renderer) */ goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1020 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< * return * if self._renderer: */ } /* "pygame/_sdl2/video.pyx":1022 * if self._is_borrowed: * return * if self._renderer: # <<<<<<<<<<<<<< * SDL_DestroyRenderer(self._renderer) * */ __pyx_t_1 = (__pyx_v_self->_renderer != 0); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1023 * return * if self._renderer: * SDL_DestroyRenderer(self._renderer) # <<<<<<<<<<<<<< * * @property */ SDL_DestroyRenderer(__pyx_v_self->_renderer); /* "pygame/_sdl2/video.pyx":1022 * if self._is_borrowed: * return * if self._renderer: # <<<<<<<<<<<<<< * SDL_DestroyRenderer(self._renderer) * */ } /* "pygame/_sdl2/video.pyx":1019 * self._is_borrowed=0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._is_borrowed: * return */ /* function exit code */ __pyx_L0:; } /* "pygame/_sdl2/video.pyx":1025 * SDL_DestroyRenderer(self._renderer) * * @property # <<<<<<<<<<<<<< * def draw_blend_mode(self): * # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { SDL_BlendMode __pyx_v_blendMode; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":1029 * # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode * cdef SDL_BlendMode blendMode * res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_GetRenderDrawBlendMode(__pyx_v_self->_renderer, (&__pyx_v_blendMode)); /* "pygame/_sdl2/video.pyx":1030 * cdef SDL_BlendMode blendMode * res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1031 * res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return blendMode */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1031, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1030 * cdef SDL_BlendMode blendMode * res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1033 * raise error() * * return blendMode # <<<<<<<<<<<<<< * * @draw_blend_mode.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_blendMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1025 * SDL_DestroyRenderer(self._renderer) * * @property # <<<<<<<<<<<<<< * def draw_blend_mode(self): * # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_blend_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1035 * return blendMode * * @draw_blend_mode.setter # <<<<<<<<<<<<<< * def draw_blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_blendMode); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_blendMode) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), ((PyObject *)__pyx_v_blendMode)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_blendMode) { int __pyx_v_res; int __pyx_r; __Pyx_RefNannyDeclarations SDL_BlendMode __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":1038 * def draw_blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_blendMode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error) __pyx_v_res = SDL_SetRenderDrawBlendMode(__pyx_v_self->_renderer, __pyx_t_1); /* "pygame/_sdl2/video.pyx":1039 * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_2 = (__pyx_v_res < 0); if (unlikely(__pyx_t_2)) { /* "pygame/_sdl2/video.pyx":1040 * res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 1040, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1039 * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1035 * return blendMode * * @draw_blend_mode.setter # <<<<<<<<<<<<<< * def draw_blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_blend_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1042 * raise error() * * @property # <<<<<<<<<<<<<< * def draw_color(self): * """ Color used by the drawing functions. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":1046 * """ Color used by the drawing functions. * """ * return self._draw_color # <<<<<<<<<<<<<< * * @draw_color.setter */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_draw_color); __pyx_r = ((PyObject *)__pyx_v_self->_draw_color); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1042 * raise error() * * @property # <<<<<<<<<<<<<< * def draw_color(self): * """ Color used by the drawing functions. */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1048 * return self._draw_color * * @draw_color.setter # <<<<<<<<<<<<<< * def draw_color(self, new_value): * """ color used by the drawing functions. */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_value); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), ((PyObject *)__pyx_v_new_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_new_value) { int __pyx_v_res; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Uint8 __pyx_t_2; Uint8 __pyx_t_3; Uint8 __pyx_t_4; Uint8 __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; unsigned int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":1053 * """ * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value # <<<<<<<<<<<<<< * res = SDL_SetRenderDrawColor(self._renderer, * new_value[0], */ if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_draw_color), __pyx_v_new_value, 0, 0, NULL, NULL, &__pyx_slice__21, 0, 0, 1) < 0) __PYX_ERR(0, 1053, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1055 * self._draw_color[:] = new_value * res = SDL_SetRenderDrawColor(self._renderer, * new_value[0], # <<<<<<<<<<<<<< * new_value[1], * new_value[2], */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1056 * res = SDL_SetRenderDrawColor(self._renderer, * new_value[0], * new_value[1], # <<<<<<<<<<<<<< * new_value[2], * new_value[3]) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1057 * new_value[0], * new_value[1], * new_value[2], # <<<<<<<<<<<<<< * new_value[3]) * if res < 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1058 * new_value[1], * new_value[2], * new_value[3]) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_new_value, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_5 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1054 * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value * res = SDL_SetRenderDrawColor(self._renderer, # <<<<<<<<<<<<<< * new_value[0], * new_value[1], */ __pyx_v_res = SDL_SetRenderDrawColor(__pyx_v_self->_renderer, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); /* "pygame/_sdl2/video.pyx":1059 * new_value[2], * new_value[3]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_6 = (__pyx_v_res < 0); if (unlikely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":1060 * new_value[3]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def clear(self): */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1060, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1059 * new_value[2], * new_value[3]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1048 * return self._draw_color * * @draw_color.setter # <<<<<<<<<<<<<< * def draw_color(self, new_value): * """ color used by the drawing functions. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1062 * raise error() * * def clear(self): # <<<<<<<<<<<<<< * """ Clear the current rendering target with the drawing color. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_7clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_6clear, " Clear the current rendering target with the drawing color.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_7clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_7clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_6clear}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_7clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear", 1); /* "pygame/_sdl2/video.pyx":1066 * """ * # https://wiki.libsdl.org/SDL_RenderClear * res = SDL_RenderClear(self._renderer) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_RenderClear(__pyx_v_self->_renderer); /* "pygame/_sdl2/video.pyx":1067 * # https://wiki.libsdl.org/SDL_RenderClear * res = SDL_RenderClear(self._renderer) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1068 * res = SDL_RenderClear(self._renderer) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def present(self): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1068, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1067 * # https://wiki.libsdl.org/SDL_RenderClear * res = SDL_RenderClear(self._renderer) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1062 * raise error() * * def clear(self): # <<<<<<<<<<<<<< * """ Clear the current rendering target with the drawing color. * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1070 * raise error() * * def present(self): # <<<<<<<<<<<<<< * """ Present the composed backbuffer to the screen. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_9present(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_8present, " Present the composed backbuffer to the screen.\n\n Updates the screen with any rendering performed since previous call.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_9present = {"present", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_9present, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_8present}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_9present(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("present (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("present", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "present", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("present", 1); /* "pygame/_sdl2/video.pyx":1076 * """ * # https://wiki.libsdl.org/SDL_RenderPresent * SDL_RenderPresent(self._renderer) # <<<<<<<<<<<<<< * * cpdef get_viewport(self): */ SDL_RenderPresent(__pyx_v_self->_renderer); /* "pygame/_sdl2/video.pyx":1070 * raise error() * * def present(self): # <<<<<<<<<<<<<< * """ Present the composed backbuffer to the screen. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1078 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< * """ Returns the drawing area on the target. * */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, int __pyx_skip_dispatch) { SDL_Rect __pyx_v_rect; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_viewport", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_viewport); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sdl2/video.pyx":1085 * # https://wiki.libsdl.org/SDL_RenderGetViewport * cdef SDL_Rect rect * SDL_RenderGetViewport(self._renderer, &rect) # <<<<<<<<<<<<<< * return pgRect_New(&rect) * */ SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_rect)); /* "pygame/_sdl2/video.pyx":1086 * cdef SDL_Rect rect * SDL_RenderGetViewport(self._renderer, &rect) * return pgRect_New(&rect) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = pgRect_New((&__pyx_v_rect)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1078 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< * """ Returns the drawing area on the target. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.get_viewport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_10get_viewport, " Returns the drawing area on the target.\n\n :rtype: pygame.Rect\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_11get_viewport = {"get_viewport", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_10get_viewport}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_viewport (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_viewport", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_viewport", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10get_viewport(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10get_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_viewport", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.get_viewport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1088 * return pgRect_New(&rect) * * @property # <<<<<<<<<<<<<< * def logical_size(self): * cdef int w */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { int __pyx_v_w; int __pyx_v_h; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":1092 * cdef int w * cdef int h * SDL_RenderGetLogicalSize(self._renderer, &w, &h) # <<<<<<<<<<<<<< * return (w, h) * */ SDL_RenderGetLogicalSize(__pyx_v_self->_renderer, (&__pyx_v_w), (&__pyx_v_h)); /* "pygame/_sdl2/video.pyx":1093 * cdef int h * SDL_RenderGetLogicalSize(self._renderer, &w, &h) * return (w, h) # <<<<<<<<<<<<<< * * @logical_size.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1088 * return pgRect_New(&rect) * * @property # <<<<<<<<<<<<<< * def logical_size(self): * cdef int w */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.logical_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1095 * return (w, h) * * @logical_size.setter # <<<<<<<<<<<<<< * def logical_size(self, size): * cdef int w = size[0] */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), ((PyObject *)__pyx_v_size)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_size) { int __pyx_v_w; int __pyx_v_h; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":1097 * @logical_size.setter * def logical_size(self, size): * cdef int w = size[0] # <<<<<<<<<<<<<< * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_w = __pyx_t_2; /* "pygame/_sdl2/video.pyx":1098 * def logical_size(self, size): * cdef int w = size[0] * cdef int h = size[1] # <<<<<<<<<<<<<< * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_h = __pyx_t_2; /* "pygame/_sdl2/video.pyx":1099 * cdef int w = size[0] * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_3 = (SDL_RenderSetLogicalSize(__pyx_v_self->_renderer, __pyx_v_w, __pyx_v_h) != 0); if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/video.pyx":1100 * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): * raise error() # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1100, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1099 * cdef int w = size[0] * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1095 * return (w, h) * * @logical_size.setter # <<<<<<<<<<<<<< * def logical_size(self, size): * cdef int w = size[0] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.logical_size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1102 * raise error() * * @property # <<<<<<<<<<<<<< * def scale(self): * cdef float x */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { float __pyx_v_x; float __pyx_v_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":1106 * cdef float x * cdef float y * SDL_RenderGetScale(self._renderer, &x, &y); # <<<<<<<<<<<<<< * return (x, y) * */ SDL_RenderGetScale(__pyx_v_self->_renderer, (&__pyx_v_x), (&__pyx_v_y)); /* "pygame/_sdl2/video.pyx":1107 * cdef float y * SDL_RenderGetScale(self._renderer, &x, &y); * return (x, y) # <<<<<<<<<<<<<< * * @scale.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1102 * raise error() * * @property # <<<<<<<<<<<<<< * def scale(self): * cdef float x */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1109 * return (x, y) * * @scale.setter # <<<<<<<<<<<<<< * def scale(self, scale): * cdef float x = scale[0] */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scale); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scale) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), ((PyObject *)__pyx_v_scale)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_scale) { float __pyx_v_x; float __pyx_v_y; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; float __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":1111 * @scale.setter * def scale(self, scale): * cdef float x = scale[0] # <<<<<<<<<<<<<< * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_scale, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x = __pyx_t_2; /* "pygame/_sdl2/video.pyx":1112 * def scale(self, scale): * cdef float x = scale[0] * cdef float y = scale[1] # <<<<<<<<<<<<<< * if (SDL_RenderSetScale(self._renderer, x, y) != 0): * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_scale, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_y = __pyx_t_2; /* "pygame/_sdl2/video.pyx":1113 * cdef float x = scale[0] * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_3 = (SDL_RenderSetScale(__pyx_v_self->_renderer, __pyx_v_x, __pyx_v_y) != 0); if (unlikely(__pyx_t_3)) { /* "pygame/_sdl2/video.pyx":1114 * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): * raise error() # <<<<<<<<<<<<<< * * # TODO ifdef */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1114, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1113 * cdef float x = scale[0] * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1109 * return (x, y) * * @scale.setter # <<<<<<<<<<<<<< * def scale(self, scale): * cdef float x = scale[0] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.scale.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1120 * # return SDL_RenderGetIntegerScale(self._renderer) * * def set_viewport(self, area): # <<<<<<<<<<<<<< * """ Set the drawing area on the target. * If this is set to ``None``, the entire target will be used. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_13set_viewport(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_12set_viewport, " Set the drawing area on the target.\n If this is set to ``None``, the entire target will be used.\n\n :param area: A ``pygame.Rect`` or tuple representing the\n drawing area on the target, or None.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_13set_viewport = {"set_viewport", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_13set_viewport, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_12set_viewport}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_13set_viewport(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_area = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_viewport (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_area,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_area)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_viewport") < 0)) __PYX_ERR(0, 1120, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_area = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_viewport", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1120, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.set_viewport", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_area); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_area) { SDL_Rect __pyx_v_tmprect; SDL_Rect *__pyx_v_rectptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_viewport", 1); /* "pygame/_sdl2/video.pyx":1128 * """ * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: # <<<<<<<<<<<<<< * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() */ __pyx_t_1 = (__pyx_v_area == Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1129 * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< * raise error() * return */ __pyx_t_1 = (SDL_RenderSetViewport(__pyx_v_self->_renderer, NULL) < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1130 * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() # <<<<<<<<<<<<<< * return * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1130, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1129 * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< * raise error() * return */ } /* "pygame/_sdl2/video.pyx":1131 * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() * return # <<<<<<<<<<<<<< * * cdef SDL_Rect tmprect */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1128 * """ * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: # <<<<<<<<<<<<<< * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() */ } /* "pygame/_sdl2/video.pyx":1134 * * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('expected a rectangle') */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_tmprect)); /* "pygame/_sdl2/video.pyx":1135 * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * */ __pyx_t_1 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1136 * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1136, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1135 * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * */ } /* "pygame/_sdl2/video.pyx":1138 * raise TypeError('expected a rectangle') * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (SDL_RenderSetViewport(__pyx_v_self->_renderer, __pyx_v_rectptr) < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1139 * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: * raise error() # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1139, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1138 * raise TypeError('expected a rectangle') * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1120 * # return SDL_RenderGetIntegerScale(self._renderer) * * def set_viewport(self, area): # <<<<<<<<<<<<<< * """ Set the drawing area on the target. * If this is set to ``None``, the entire target will be used. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.set_viewport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1142 * * * @property # <<<<<<<<<<<<<< * def target(self): * """ The current render target. Set to ``None`` for the default target. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); /* "pygame/_sdl2/video.pyx":1149 * """ * # https://wiki.libsdl.org/SDL_GetRenderTarget * return self._target # <<<<<<<<<<<<<< * * @target.setter */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_target); __pyx_r = ((PyObject *)__pyx_v_self->_target); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1142 * * * @property # <<<<<<<<<<<<<< * def target(self): * """ The current render target. Set to ``None`` for the default target. */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1151 * return self._target * * @target.setter # <<<<<<<<<<<<<< * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget */ /* Python wrapper */ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_newtarget); /*proto*/ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_newtarget) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), ((PyObject *)__pyx_v_newtarget)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_newtarget) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); /* "pygame/_sdl2/video.pyx":1154 * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: # <<<<<<<<<<<<<< * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: */ __pyx_t_1 = (__pyx_v_newtarget == Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1155 * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: * self._target = None # <<<<<<<<<<<<<< * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->_target); __Pyx_DECREF((PyObject *)__pyx_v_self->_target); __pyx_v_self->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); /* "pygame/_sdl2/video.pyx":1156 * if newtarget is None: * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< * raise error() * elif isinstance(newtarget, Texture): */ __pyx_t_1 = (SDL_SetRenderTarget(__pyx_v_self->_renderer, NULL) < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1157 * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() # <<<<<<<<<<<<<< * elif isinstance(newtarget, Texture): * self._target = newtarget */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1157, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1156 * if newtarget is None: * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< * raise error() * elif isinstance(newtarget, Texture): */ } /* "pygame/_sdl2/video.pyx":1154 * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: # <<<<<<<<<<<<<< * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":1158 * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() * elif isinstance(newtarget, Texture): # <<<<<<<<<<<<<< * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_newtarget, __pyx_ptype_6pygame_5_sdl2_5video_Texture); if (likely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1159 * raise error() * elif isinstance(newtarget, Texture): * self._target = newtarget # <<<<<<<<<<<<<< * if SDL_SetRenderTarget(self._renderer, * self._target._tex) < 0: */ if (!(likely(((__pyx_v_newtarget) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_newtarget, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 1159, __pyx_L1_error) __pyx_t_2 = __pyx_v_newtarget; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->_target); __Pyx_DECREF((PyObject *)__pyx_v_self->_target); __pyx_v_self->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":1161 * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, * self._target._tex) < 0: # <<<<<<<<<<<<<< * raise error() * else: */ __pyx_t_1 = (SDL_SetRenderTarget(__pyx_v_self->_renderer, __pyx_v_self->_target->_tex) < 0); /* "pygame/_sdl2/video.pyx":1160 * elif isinstance(newtarget, Texture): * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, # <<<<<<<<<<<<<< * self._target._tex) < 0: * raise error() */ if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1162 * if SDL_SetRenderTarget(self._renderer, * self._target._tex) < 0: * raise error() # <<<<<<<<<<<<<< * else: * raise TypeError('target must be a Texture or None') */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1162, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1160 * elif isinstance(newtarget, Texture): * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, # <<<<<<<<<<<<<< * self._target._tex) < 0: * raise error() */ } /* "pygame/_sdl2/video.pyx":1158 * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() * elif isinstance(newtarget, Texture): # <<<<<<<<<<<<<< * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":1164 * raise error() * else: * raise TypeError('target must be a Texture or None') # <<<<<<<<<<<<<< * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1164, __pyx_L1_error) } __pyx_L3:; /* "pygame/_sdl2/video.pyx":1151 * return self._target * * @target.setter # <<<<<<<<<<<<<< * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.target.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1166 * raise TypeError('target must be a Texture or None') * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): # <<<<<<<<<<<<<< * """ Only for compatibility. * Textures created by different Renderers cannot shared with each other! */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit *__pyx_optional_args) { pgRectObject *__pyx_v_dest = ((pgRectObject *)Py_None); pgRectObject *__pyx_v_area = ((pgRectObject *)Py_None); int __pyx_v_special_flags = ((int)0); PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_t_7; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw __pyx_t_8; struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("blit", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_dest = __pyx_optional_args->dest; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_area = __pyx_optional_args->area; if (__pyx_optional_args->__pyx_n > 2) { __pyx_v_special_flags = __pyx_optional_args->special_flags; } } } } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_special_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_source, ((PyObject *)__pyx_v_dest), ((PyObject *)__pyx_v_area), __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sdl2/video.pyx":1174 * :param special_flags: have no effect at this moment. * """ * if isinstance(source, Texture): # <<<<<<<<<<<<<< * (source).draw(area, dest) * elif isinstance(source, Image): */ __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_source, __pyx_ptype_6pygame_5_sdl2_5video_Texture); if (__pyx_t_7) { /* "pygame/_sdl2/video.pyx":1175 * """ * if isinstance(source, Texture): * (source).draw(area, dest) # <<<<<<<<<<<<<< * elif isinstance(source, Image): * (source).draw(area, dest) */ __pyx_t_8.__pyx_n = 2; __pyx_t_8.srcrect = ((PyObject *)__pyx_v_area); __pyx_t_8.dstrect = ((PyObject *)__pyx_v_dest); ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *)((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_source)->__pyx_vtab)->draw(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_source), 0, &__pyx_t_8); /* "pygame/_sdl2/video.pyx":1174 * :param special_flags: have no effect at this moment. * """ * if isinstance(source, Texture): # <<<<<<<<<<<<<< * (source).draw(area, dest) * elif isinstance(source, Image): */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":1176 * if isinstance(source, Texture): * (source).draw(area, dest) * elif isinstance(source, Image): # <<<<<<<<<<<<<< * (source).draw(area, dest) * elif not hasattr(source, 'draw'): */ __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_source, __pyx_ptype_6pygame_5_sdl2_5video_Image); if (__pyx_t_7) { /* "pygame/_sdl2/video.pyx":1177 * (source).draw(area, dest) * elif isinstance(source, Image): * (source).draw(area, dest) # <<<<<<<<<<<<<< * elif not hasattr(source, 'draw'): * raise TypeError('source must be drawable') */ __pyx_t_9.__pyx_n = 2; __pyx_t_9.srcrect = ((PyObject *)__pyx_v_area); __pyx_t_9.dstrect = ((PyObject *)__pyx_v_dest); ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *)((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_source)->__pyx_vtab)->draw(((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)__pyx_v_source), 0, &__pyx_t_9); /* "pygame/_sdl2/video.pyx":1176 * if isinstance(source, Texture): * (source).draw(area, dest) * elif isinstance(source, Image): # <<<<<<<<<<<<<< * (source).draw(area, dest) * elif not hasattr(source, 'draw'): */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":1178 * elif isinstance(source, Image): * (source).draw(area, dest) * elif not hasattr(source, 'draw'): # <<<<<<<<<<<<<< * raise TypeError('source must be drawable') * else: */ __pyx_t_7 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_s_draw); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1178, __pyx_L1_error) __pyx_t_10 = (!__pyx_t_7); if (unlikely(__pyx_t_10)) { /* "pygame/_sdl2/video.pyx":1179 * (source).draw(area, dest) * elif not hasattr(source, 'draw'): * raise TypeError('source must be drawable') # <<<<<<<<<<<<<< * else: * source.draw(area, dest) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1179, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1178 * elif isinstance(source, Image): * (source).draw(area, dest) * elif not hasattr(source, 'draw'): # <<<<<<<<<<<<<< * raise TypeError('source must be drawable') * else: */ } /* "pygame/_sdl2/video.pyx":1181 * raise TypeError('source must be drawable') * else: * source.draw(area, dest) # <<<<<<<<<<<<<< * * if not dest: */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_draw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_area), ((PyObject *)__pyx_v_dest)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":1183 * source.draw(area, dest) * * if not dest: # <<<<<<<<<<<<<< * return self.get_viewport() * return dest */ __pyx_t_10 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_dest)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1183, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_10); if (__pyx_t_7) { /* "pygame/_sdl2/video.pyx":1184 * * if not dest: * return self.get_viewport() # <<<<<<<<<<<<<< * return dest * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self->__pyx_vtab)->get_viewport(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1183 * source.draw(area, dest) * * if not dest: # <<<<<<<<<<<<<< * return self.get_viewport() * return dest */ } /* "pygame/_sdl2/video.pyx":1185 * if not dest: * return self.get_viewport() * return dest # <<<<<<<<<<<<<< * * def draw_line(self, p1, p2): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_dest); __pyx_r = ((PyObject *)__pyx_v_dest); goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1166 * raise TypeError('target must be a Texture or None') * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): # <<<<<<<<<<<<<< * """ Only for compatibility. * Textures created by different Renderers cannot shared with each other! */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.blit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_14blit, " Only for compatibility.\n Textures created by different Renderers cannot shared with each other!\n :param source: A Texture or Image to draw.\n :param dest: destination on the render target.\n :param area: the portion of source texture.\n :param special_flags: have no effect at this moment.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_15blit = {"blit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_14blit}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_source = 0; pgRectObject *__pyx_v_dest = 0; pgRectObject *__pyx_v_area = 0; int __pyx_v_special_flags; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("blit (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_dest,&__pyx_n_s_area,&__pyx_n_s_special_flags,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((pgRectObject *)Py_None)); values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((pgRectObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dest); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_area); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_special_flags); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "blit") < 0)) __PYX_ERR(0, 1166, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_source = values[0]; __pyx_v_dest = ((pgRectObject *)values[1]); __pyx_v_area = ((pgRectObject *)values[2]); if (values[3]) { __pyx_v_special_flags = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_special_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) } else { __pyx_v_special_flags = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("blit", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1166, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.blit", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), __pyx_ptype_6pygame_5_sdl2_5video_Rect, 1, "dest", 0))) __PYX_ERR(0, 1166, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_area), __pyx_ptype_6pygame_5_sdl2_5video_Rect, 1, "area", 0))) __PYX_ERR(0, 1166, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_14blit(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_source, __pyx_v_dest, __pyx_v_area, __pyx_v_special_flags); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_14blit(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_source, pgRectObject *__pyx_v_dest, pgRectObject *__pyx_v_area, int __pyx_v_special_flags) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("blit", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 3; __pyx_t_2.dest = __pyx_v_dest; __pyx_t_2.area = __pyx_v_area; __pyx_t_2.special_flags = __pyx_v_special_flags; __pyx_t_1 = __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer->blit(__pyx_v_self, __pyx_v_source, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.blit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1187 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_17draw_line = {"draw_line", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_p1 = 0; PyObject *__pyx_v_p2 = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw_line (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1,&__pyx_n_s_p2,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p1)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p2)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, 1); __PYX_ERR(0, 1187, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_line") < 0)) __PYX_ERR(0, 1187, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_p1 = values[0]; __pyx_v_p2 = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1187, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_line", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_p1, __pyx_v_p2); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2) { int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; unsigned int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_line", 1); /* "pygame/_sdl2/video.pyx":1190 * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, * p1[0], p1[1], # <<<<<<<<<<<<<< * p2[0], p2[1]) * if res < 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_p1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_p1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1191 * res = SDL_RenderDrawLine(self._renderer, * p1[0], p1[1], * p2[0], p2[1]) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_p2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_p2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1189 * def draw_line(self, p1, p2): * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, # <<<<<<<<<<<<<< * p1[0], p1[1], * p2[0], p2[1]) */ __pyx_v_res = SDL_RenderDrawLine(__pyx_v_self->_renderer, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); /* "pygame/_sdl2/video.pyx":1192 * p1[0], p1[1], * p2[0], p2[1]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_6 = (__pyx_v_res < 0); if (unlikely(__pyx_t_6)) { /* "pygame/_sdl2/video.pyx":1193 * p2[0], p2[1]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def draw_point(self, point): */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1193, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1192 * p1[0], p1[1], * p2[0], p2[1]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1187 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_line", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1195 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_19draw_point(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_19draw_point = {"draw_point", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_19draw_point, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_19draw_point(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_point = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw_point (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_point,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_point)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_point") < 0)) __PYX_ERR(0, 1195, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_point = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw_point", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1195, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_point", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_point); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_point) { int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_point", 1); /* "pygame/_sdl2/video.pyx":1198 * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, * point[0], point[1]) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_point, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_point, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1197 * def draw_point(self, point): * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, # <<<<<<<<<<<<<< * point[0], point[1]) * if res < 0: */ __pyx_v_res = SDL_RenderDrawPoint(__pyx_v_self->_renderer, __pyx_t_2, __pyx_t_3); /* "pygame/_sdl2/video.pyx":1199 * res = SDL_RenderDrawPoint(self._renderer, * point[0], point[1]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_4 = (__pyx_v_res < 0); if (unlikely(__pyx_t_4)) { /* "pygame/_sdl2/video.pyx":1200 * point[0], point[1]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def draw_rect(self, rect): */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1200, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1199 * res = SDL_RenderDrawPoint(self._renderer, * point[0], point[1]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1195 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_point", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1202 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_21draw_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_21draw_rect = {"draw_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_21draw_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_21draw_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_rect = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rect,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rect)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_rect") < 0)) __PYX_ERR(0, 1202, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_rect = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw_rect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1202, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_rect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_rect) { SDL_Rect __pyx_v__rect; SDL_Rect *__pyx_v_rectptr; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_rect", 1); /* "pygame/_sdl2/video.pyx":1205 * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('expected a rectangle') */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_rect, (&__pyx_v__rect)); /* "pygame/_sdl2/video.pyx":1206 * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * res = SDL_RenderDrawRect(self._renderer, rectptr) */ __pyx_t_1 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1207 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1207, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1206 * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * res = SDL_RenderDrawRect(self._renderer, rectptr) */ } /* "pygame/_sdl2/video.pyx":1208 * if rectptr == NULL: * raise TypeError('expected a rectangle') * res = SDL_RenderDrawRect(self._renderer, rectptr) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_v_res = SDL_RenderDrawRect(__pyx_v_self->_renderer, __pyx_v_rectptr); /* "pygame/_sdl2/video.pyx":1209 * raise TypeError('expected a rectangle') * res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1210 * res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def fill_rect(self, rect): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1210, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1209 * raise TypeError('expected a rectangle') * res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1202 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1212 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_23fill_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_23fill_rect = {"fill_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_23fill_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_23fill_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_rect = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fill_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rect,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rect)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fill_rect") < 0)) __PYX_ERR(0, 1212, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_rect = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fill_rect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1212, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.fill_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_rect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_rect) { SDL_Rect __pyx_v__rect; SDL_Rect *__pyx_v_rectptr; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fill_rect", 1); /* "pygame/_sdl2/video.pyx":1215 * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('expected a rectangle') */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_rect, (&__pyx_v__rect)); /* "pygame/_sdl2/video.pyx":1216 * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * res = SDL_RenderFillRect(self._renderer, rectptr) */ __pyx_t_1 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1217 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * res = SDL_RenderFillRect(self._renderer, rectptr) * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1217, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1216 * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('expected a rectangle') * res = SDL_RenderFillRect(self._renderer, rectptr) */ } /* "pygame/_sdl2/video.pyx":1218 * if rectptr == NULL: * raise TypeError('expected a rectangle') * res = SDL_RenderFillRect(self._renderer, rectptr) # <<<<<<<<<<<<<< * * if res < 0: */ __pyx_v_res = SDL_RenderFillRect(__pyx_v_self->_renderer, __pyx_v_rectptr); /* "pygame/_sdl2/video.pyx":1220 * res = SDL_RenderFillRect(self._renderer, rectptr) * * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_res < 0); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1221 * * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def to_surface(self, surface=None, area=None): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1221, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1220 * res = SDL_RenderFillRect(self._renderer, rectptr) * * if res < 0: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1212 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.fill_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1223 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderReadPixels * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25to_surface(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_24to_surface, "\n Read pixels from the current rendering target and create a pygame.Surface.\n WARNING: This is a very slow operation, and should not be used frequently.\n\n :param surface: A surface to read the pixel data into.\n It must be large enough to fit the area, or ``ValueError`` is\n raised.\n If ``None``, a new surface is returned.\n :param area: The area of the screen to read pixels from. The area is\n clipped to fit inside the viewport.\n If ``None``, the entire viewport is used.\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_25to_surface = {"to_surface", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25to_surface, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_24to_surface}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25to_surface(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_area = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_surface (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,&__pyx_n_s_area,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_area); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_surface") < 0)) __PYX_ERR(0, 1223, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_surface = values[0]; __pyx_v_area = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("to_surface", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1223, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.to_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_24to_surface(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v_surface, __pyx_v_area); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24to_surface(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_area) { Uint32 __pyx_v_format; SDL_Rect __pyx_v_rarea; SDL_Rect __pyx_v_tempviewport; SDL_Rect *__pyx_v_areaparam; SDL_Surface *__pyx_v_surf; SDL_Rect *__pyx_v_rectptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; pgSurfaceObject *__pyx_t_7; int __pyx_t_8; Uint32 __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_surface", 0); __Pyx_INCREF(__pyx_v_surface); /* "pygame/_sdl2/video.pyx":1245 * * # obtain area to use * if area is not None: # <<<<<<<<<<<<<< * * rectptr = pgRect_FromObject(area, &rarea) */ __pyx_t_1 = (__pyx_v_area != Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1247 * if area is not None: * * rectptr = pgRect_FromObject(area, &rarea) # <<<<<<<<<<<<<< * if rectptr == NULL: * raise TypeError('area must be None or a rect') */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_rarea)); /* "pygame/_sdl2/video.pyx":1248 * * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('area must be None or a rect') * */ __pyx_t_1 = (__pyx_v_rectptr == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1249 * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: * raise TypeError('area must be None or a rect') # <<<<<<<<<<<<<< * * # clip area */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1249, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1248 * * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: # <<<<<<<<<<<<<< * raise TypeError('area must be None or a rect') * */ } /* "pygame/_sdl2/video.pyx":1252 * * # clip area * SDL_RenderGetViewport(self._renderer, &tempviewport) # <<<<<<<<<<<<<< * SDL_IntersectRect(rectptr, &tempviewport, rectptr) * */ SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_tempviewport)); /* "pygame/_sdl2/video.pyx":1253 * # clip area * SDL_RenderGetViewport(self._renderer, &tempviewport) * SDL_IntersectRect(rectptr, &tempviewport, rectptr) # <<<<<<<<<<<<<< * * areaparam = rectptr */ (void)(SDL_IntersectRect(__pyx_v_rectptr, (&__pyx_v_tempviewport), __pyx_v_rectptr)); /* "pygame/_sdl2/video.pyx":1255 * SDL_IntersectRect(rectptr, &tempviewport, rectptr) * * areaparam = rectptr # <<<<<<<<<<<<<< * rarea.x = rectptr.x * rarea.y = rectptr.y */ __pyx_v_areaparam = __pyx_v_rectptr; /* "pygame/_sdl2/video.pyx":1256 * * areaparam = rectptr * rarea.x = rectptr.x # <<<<<<<<<<<<<< * rarea.y = rectptr.y * rarea.w = rectptr.w */ __pyx_t_3 = __pyx_v_rectptr->x; __pyx_v_rarea.x = __pyx_t_3; /* "pygame/_sdl2/video.pyx":1257 * areaparam = rectptr * rarea.x = rectptr.x * rarea.y = rectptr.y # <<<<<<<<<<<<<< * rarea.w = rectptr.w * rarea.h = rectptr.h */ __pyx_t_3 = __pyx_v_rectptr->y; __pyx_v_rarea.y = __pyx_t_3; /* "pygame/_sdl2/video.pyx":1258 * rarea.x = rectptr.x * rarea.y = rectptr.y * rarea.w = rectptr.w # <<<<<<<<<<<<<< * rarea.h = rectptr.h * else: */ __pyx_t_3 = __pyx_v_rectptr->w; __pyx_v_rarea.w = __pyx_t_3; /* "pygame/_sdl2/video.pyx":1259 * rarea.y = rectptr.y * rarea.w = rectptr.w * rarea.h = rectptr.h # <<<<<<<<<<<<<< * else: * SDL_RenderGetViewport(self._renderer, &rarea) */ __pyx_t_3 = __pyx_v_rectptr->h; __pyx_v_rarea.h = __pyx_t_3; /* "pygame/_sdl2/video.pyx":1245 * * # obtain area to use * if area is not None: # <<<<<<<<<<<<<< * * rectptr = pgRect_FromObject(area, &rarea) */ goto __pyx_L3; } /* "pygame/_sdl2/video.pyx":1261 * rarea.h = rectptr.h * else: * SDL_RenderGetViewport(self._renderer, &rarea) # <<<<<<<<<<<<<< * areaparam = NULL * */ /*else*/ { SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_rarea)); /* "pygame/_sdl2/video.pyx":1262 * else: * SDL_RenderGetViewport(self._renderer, &rarea) * areaparam = NULL # <<<<<<<<<<<<<< * * # prepare surface */ __pyx_v_areaparam = NULL; } __pyx_L3:; /* "pygame/_sdl2/video.pyx":1265 * * # prepare surface * if surface is None: # <<<<<<<<<<<<<< * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) */ __pyx_t_1 = (__pyx_v_surface == Py_None); if (__pyx_t_1) { /* "pygame/_sdl2/video.pyx":1267 * if surface is None: * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) # <<<<<<<<<<<<<< * if format == SDL_PIXELFORMAT_UNKNOWN: * raise error() */ __pyx_v_format = SDL_GetWindowPixelFormat(__pyx_v_self->_win->_win); /* "pygame/_sdl2/video.pyx":1268 * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: # <<<<<<<<<<<<<< * raise error() * */ __pyx_t_1 = (__pyx_v_format == SDL_PIXELFORMAT_UNKNOWN); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1269 * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: * raise error() # <<<<<<<<<<<<<< * * surf = SDL_CreateRGBSurfaceWithFormat( */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1269, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1268 * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: # <<<<<<<<<<<<<< * raise error() * */ } /* "pygame/_sdl2/video.pyx":1271 * raise error() * * surf = SDL_CreateRGBSurfaceWithFormat( # <<<<<<<<<<<<<< * 0, * rarea.w, rarea.h, */ __pyx_v_surf = SDL_CreateRGBSurfaceWithFormat(0, __pyx_v_rarea.w, __pyx_v_rarea.h, SDL_BITSPERPIXEL(__pyx_v_format), __pyx_v_format); /* "pygame/_sdl2/video.pyx":1276 * SDL_BITSPERPIXEL(format), * format) * if surf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("not enough memory for the surface") * */ __pyx_t_1 = (__pyx_v_surf == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1277 * format) * if surf == NULL: * raise MemoryError("not enough memory for the surface") # <<<<<<<<<<<<<< * * surface = pgSurface_New2(surf, 1) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1277, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1276 * SDL_BITSPERPIXEL(format), * format) * if surf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("not enough memory for the surface") * */ } /* "pygame/_sdl2/video.pyx":1279 * raise MemoryError("not enough memory for the surface") * * surface = pgSurface_New2(surf, 1) # <<<<<<<<<<<<<< * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) */ __pyx_t_7 = pgSurface_New2(__pyx_v_surf, 1); __pyx_t_2 = ((PyObject *)__pyx_t_7); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_surface, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":1265 * * # prepare surface * if surface is None: # <<<<<<<<<<<<<< * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) */ goto __pyx_L5; } /* "pygame/_sdl2/video.pyx":1280 * * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): # <<<<<<<<<<<<<< * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: */ __pyx_t_1 = (pgSurface_Check(__pyx_v_surface) != 0); if (likely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1281 * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< * if surf.w < rarea.w or surf.h < rarea.h: * raise ValueError("the surface is too small") */ __pyx_v_surf = pgSurface_AsSurface(__pyx_v_surface); /* "pygame/_sdl2/video.pyx":1282 * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: # <<<<<<<<<<<<<< * raise ValueError("the surface is too small") * format = surf.format.format */ __pyx_t_8 = (__pyx_v_surf->w < __pyx_v_rarea.w); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L9_bool_binop_done; } __pyx_t_8 = (__pyx_v_surf->h < __pyx_v_rarea.h); __pyx_t_1 = __pyx_t_8; __pyx_L9_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1283 * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: * raise ValueError("the surface is too small") # <<<<<<<<<<<<<< * format = surf.format.format * else: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1283, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1282 * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: # <<<<<<<<<<<<<< * raise ValueError("the surface is too small") * format = surf.format.format */ } /* "pygame/_sdl2/video.pyx":1284 * if surf.w < rarea.w or surf.h < rarea.h: * raise ValueError("the surface is too small") * format = surf.format.format # <<<<<<<<<<<<<< * else: * raise TypeError("'surface' must be a surface or None") */ __pyx_t_9 = __pyx_v_surf->format->format; __pyx_v_format = __pyx_t_9; /* "pygame/_sdl2/video.pyx":1280 * * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): # <<<<<<<<<<<<<< * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: */ goto __pyx_L5; } /* "pygame/_sdl2/video.pyx":1286 * format = surf.format.format * else: * raise TypeError("'surface' must be a surface or None") # <<<<<<<<<<<<<< * * if SDL_RenderReadPixels(self._renderer, */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1286, __pyx_L1_error) } __pyx_L5:; /* "pygame/_sdl2/video.pyx":1290 * if SDL_RenderReadPixels(self._renderer, * areaparam, * format, surf.pixels, surf.pitch) < 0: # <<<<<<<<<<<<<< * raise error() * return surface */ __pyx_t_1 = (SDL_RenderReadPixels(__pyx_v_self->_renderer, __pyx_v_areaparam, __pyx_v_format, __pyx_v_surf->pixels, __pyx_v_surf->pitch) < 0); /* "pygame/_sdl2/video.pyx":1288 * raise TypeError("'surface' must be a surface or None") * * if SDL_RenderReadPixels(self._renderer, # <<<<<<<<<<<<<< * areaparam, * format, surf.pixels, surf.pitch) < 0: */ if (unlikely(__pyx_t_1)) { /* "pygame/_sdl2/video.pyx":1291 * areaparam, * format, surf.pixels, surf.pitch) < 0: * raise error() # <<<<<<<<<<<<<< * return surface * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1291, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1288 * raise TypeError("'surface' must be a surface or None") * * if SDL_RenderReadPixels(self._renderer, # <<<<<<<<<<<<<< * areaparam, * format, surf.pixels, surf.pitch) < 0: */ } /* "pygame/_sdl2/video.pyx":1292 * format, surf.pixels, surf.pitch) < 0: * raise error() * return surface # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_surface); __pyx_r = __pyx_v_surface; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1223 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderReadPixels * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.to_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_surface); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sdl2/video.pyx":1294 * return surface * * @staticmethod # <<<<<<<<<<<<<< * def compose_custom_blend_mode(color_mode, alpha_mode): * """ Use this function to compose a custom blend mode.. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode, " Use this function to compose a custom blend mode.. \n\n :param color_mode: A tuple (srcColorFactor, dstColorFactor, colorOperation)\n :param alpha_mode: A tuple (srcAlphaFactor, dstAlphaFactor, alphaOperation)\n :return: A blend mode to be used with Renderer.draw_blend_mode and Texure.blend_mode\n "); static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode = {"compose_custom_blend_mode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode(CYTHON_UNUSED PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_color_mode = 0; PyObject *__pyx_v_alpha_mode = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compose_custom_blend_mode (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_color_mode,&__pyx_n_s_alpha_mode,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_color_mode)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alpha_mode)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, 1); __PYX_ERR(0, 1294, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compose_custom_blend_mode") < 0)) __PYX_ERR(0, 1294, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_color_mode = values[0]; __pyx_v_alpha_mode = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1294, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.compose_custom_blend_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode(__pyx_v_color_mode, __pyx_v_alpha_mode); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode(PyObject *__pyx_v_color_mode, PyObject *__pyx_v_alpha_mode) { SDL_BlendMode __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; SDL_BlendFactor __pyx_t_2; SDL_BlendFactor __pyx_t_3; SDL_BlendOperation __pyx_t_4; SDL_BlendFactor __pyx_t_5; SDL_BlendFactor __pyx_t_6; SDL_BlendOperation __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; unsigned int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compose_custom_blend_mode", 1); /* "pygame/_sdl2/video.pyx":1303 * """ * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * res = SDL_ComposeCustomBlendMode(color_mode[0], # <<<<<<<<<<<<<< * color_mode[1], * color_mode[2], */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_color_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1304 * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * res = SDL_ComposeCustomBlendMode(color_mode[0], * color_mode[1], # <<<<<<<<<<<<<< * color_mode[2], * alpha_mode[0], */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_color_mode, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1305 * res = SDL_ComposeCustomBlendMode(color_mode[0], * color_mode[1], * color_mode[2], # <<<<<<<<<<<<<< * alpha_mode[0], * alpha_mode[1], */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_color_mode, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = ((SDL_BlendOperation)__Pyx_PyInt_As_SDL_BlendOperation(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1306 * color_mode[1], * color_mode[2], * alpha_mode[0], # <<<<<<<<<<<<<< * alpha_mode[1], * alpha_mode[2]) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_alpha_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1307 * color_mode[2], * alpha_mode[0], * alpha_mode[1], # <<<<<<<<<<<<<< * alpha_mode[2]) * if res < 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_alpha_mode, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1308 * alpha_mode[0], * alpha_mode[1], * alpha_mode[2]) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_alpha_mode, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = ((SDL_BlendOperation)__Pyx_PyInt_As_SDL_BlendOperation(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sdl2/video.pyx":1303 * """ * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * res = SDL_ComposeCustomBlendMode(color_mode[0], # <<<<<<<<<<<<<< * color_mode[1], * color_mode[2], */ __pyx_v_res = SDL_ComposeCustomBlendMode(__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7); /* "pygame/_sdl2/video.pyx":1309 * alpha_mode[1], * alpha_mode[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * return res */ __pyx_t_8 = (__pyx_v_res < 0); if (unlikely(__pyx_t_8)) { /* "pygame/_sdl2/video.pyx":1310 * alpha_mode[2]) * if res < 0: * raise error() # <<<<<<<<<<<<<< * return res */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_11 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1310, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1309 * alpha_mode[1], * alpha_mode[2]) * if res < 0: # <<<<<<<<<<<<<< * raise error() * return res */ } /* "pygame/_sdl2/video.pyx":1311 * if res < 0: * raise error() * return res # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sdl2/video.pyx":1294 * return surface * * @staticmethod # <<<<<<<<<<<<<< * def compose_custom_blend_mode(color_mode, alpha_mode): * """ Use this function to compose a custom blend mode.. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.compose_custom_blend_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_28__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__renderer_cannot_be_convert, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_30__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__renderer_cannot_be_convert, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Window(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif return o; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Window(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5video_Window) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_5video_6Window_29__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_grab(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_grab(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_relative_mouse(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_relative_mouse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_title(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_5title_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_title(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_5title_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_resizable(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_resizable(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_borderless(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_borderless(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_id(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_2id_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_4size_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_4size_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_position(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_8position_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_position(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_8position_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_opacity(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_opacity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_6Window_display_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_6Window_13display_index_1__get__(o); } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video_Window[] = { {"from_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"from_display_module", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_3from_display_module, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"set_windowed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_windowed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_6set_windowed}, {"set_fullscreen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_9set_fullscreen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_8set_fullscreen}, {"destroy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_11destroy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_10destroy}, {"hide", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_13hide, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_12hide}, {"show", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_15show, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_14show}, {"focus", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_17focus, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_16focus}, {"restore", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_19restore, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_18restore}, {"maximize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_21maximize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_20maximize}, {"minimize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_23minimize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_22minimize}, {"set_icon", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_icon, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_24set_icon}, {"set_modal_for", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_27set_modal_for, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_26set_modal_for}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5video_Window[] = { {(char *)"grab", __pyx_getprop_6pygame_5_sdl2_5video_6Window_grab, __pyx_setprop_6pygame_5_sdl2_5video_6Window_grab, (char *)PyDoc_STR(" Window's input grab state (``True`` or ``False``).\n\n Set it to ``True`` to grab, ``False`` to release.\n\n When input is grabbed the mouse is confined to the window.\n If the caller enables a grab while another window is currently grabbed,\n the other window loses its grab in favor of the caller's window.\n\n :rtype: bool\n "), 0}, {(char *)"relative_mouse", __pyx_getprop_6pygame_5_sdl2_5video_6Window_relative_mouse, __pyx_setprop_6pygame_5_sdl2_5video_6Window_relative_mouse, (char *)PyDoc_STR(" Window's relative mouse motion state (``True`` or ``False``).\n\n Set it to ``True`` to enable, ``False`` to disable.\n If mouse.set_visible(True) is set the input will be grabbed,\n and the mouse will enter endless relative motion mode.\n\n :rtype: bool\n "), 0}, {(char *)"title", __pyx_getprop_6pygame_5_sdl2_5video_6Window_title, __pyx_setprop_6pygame_5_sdl2_5video_6Window_title, (char *)PyDoc_STR(" The title of the window or u\"\" if there is none.\n "), 0}, {(char *)"resizable", __pyx_getprop_6pygame_5_sdl2_5video_6Window_resizable, __pyx_setprop_6pygame_5_sdl2_5video_6Window_resizable, (char *)PyDoc_STR(" Sets whether the window is resizable.\n "), 0}, {(char *)"borderless", __pyx_getprop_6pygame_5_sdl2_5video_6Window_borderless, __pyx_setprop_6pygame_5_sdl2_5video_6Window_borderless, (char *)PyDoc_STR(" Add or remove the border from the actual window.\n\n .. note:: You can't change the border state of a fullscreen window.\n "), 0}, {(char *)"id", __pyx_getprop_6pygame_5_sdl2_5video_6Window_id, 0, (char *)PyDoc_STR(" A unique window ID. *Read-only*.\n\n :rtype: int\n "), 0}, {(char *)"size", __pyx_getprop_6pygame_5_sdl2_5video_6Window_size, __pyx_setprop_6pygame_5_sdl2_5video_6Window_size, (char *)PyDoc_STR(" The size of the window's client area."), 0}, {(char *)"position", __pyx_getprop_6pygame_5_sdl2_5video_6Window_position, __pyx_setprop_6pygame_5_sdl2_5video_6Window_position, (char *)PyDoc_STR(" Window's screen coordinates, or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED"), 0}, {(char *)"opacity", __pyx_getprop_6pygame_5_sdl2_5video_6Window_opacity, __pyx_setprop_6pygame_5_sdl2_5video_6Window_opacity, (char *)PyDoc_STR(" Window opacity. It ranges between 0.0 (fully transparent)\n and 1.0 (fully opaque)."), 0}, {(char *)"display_index", __pyx_getprop_6pygame_5_sdl2_5video_6Window_display_index, 0, (char *)PyDoc_STR(" The index of the display associated with the window. *Read-only*.\n\n :rtype: int\n "), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5video_Window_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5video_Window}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5video_Window}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5video_Window}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5video_6Window_5__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5video_Window}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5video_Window_spec = { "pygame._sdl2.video.Window", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Window), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_6pygame_5_sdl2_5video_Window_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Window = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.video.""Window", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Window), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5video_Window, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5video_Window, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5video_Window, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5video_6Window_5__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5video_Window, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer __pyx_vtable_6pygame_5_sdl2_5video_Renderer; static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Renderer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)o); p->__pyx_vtab = __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer; p->_draw_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); p->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); Py_INCREF(Py_None); p->_win = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Renderer(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5video_Renderer) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_draw_color); Py_CLEAR(p->_target); Py_CLEAR(p->_win); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_5_sdl2_5video_Renderer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)o; if (p->_draw_color) { e = (*v)(((PyObject *)p->_draw_color), a); if (e) return e; } if (p->_target) { e = (*v)(((PyObject *)p->_target), a); if (e) return e; } if (p->_win) { e = (*v)(((PyObject *)p->_win), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_5_sdl2_5video_Renderer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)o; tmp = ((PyObject*)p->_draw_color); p->_draw_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_target); p->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_win); p->_win = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_8Renderer_draw_blend_mode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_draw_blend_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_8Renderer_draw_color(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_draw_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_10draw_color_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_8Renderer_logical_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_logical_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_12logical_size_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_8Renderer_scale(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_5scale_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_8Renderer_target(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_8Renderer_6target_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video_Renderer[] = { {"from_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_7clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_6clear}, {"present", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_9present, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_8present}, {"set_viewport", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_13set_viewport, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_12set_viewport}, {"draw_line", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"draw_point", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_19draw_point, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"draw_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_21draw_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"fill_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_23fill_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"to_surface", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25to_surface, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_24to_surface}, {"compose_custom_blend_mode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_8Renderer_26compose_custom_blend_mode}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5video_Renderer[] = { {(char *)"draw_blend_mode", __pyx_getprop_6pygame_5_sdl2_5video_8Renderer_draw_blend_mode, __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_draw_blend_mode, (char *)0, 0}, {(char *)"draw_color", __pyx_getprop_6pygame_5_sdl2_5video_8Renderer_draw_color, __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_draw_color, (char *)PyDoc_STR(" Color used by the drawing functions.\n "), 0}, {(char *)"logical_size", __pyx_getprop_6pygame_5_sdl2_5video_8Renderer_logical_size, __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_logical_size, (char *)0, 0}, {(char *)"scale", __pyx_getprop_6pygame_5_sdl2_5video_8Renderer_scale, __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_scale, (char *)0, 0}, {(char *)"target", __pyx_getprop_6pygame_5_sdl2_5video_8Renderer_target, __pyx_setprop_6pygame_5_sdl2_5video_8Renderer_target, (char *)PyDoc_STR(" The current render target. Set to ``None`` for the default target.\n\n :rtype: Texture, None\n "), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5video_Renderer_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5video_Renderer}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5video_Renderer}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_5_sdl2_5video_Renderer}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5video_Renderer}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5video_Renderer}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5video_Renderer}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5video_Renderer_spec = { "pygame._sdl2.video.Renderer", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_5_sdl2_5video_Renderer_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Renderer = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.video.""Renderer", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5video_Renderer, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5video_Renderer, /*tp_traverse*/ __pyx_tp_clear_6pygame_5_sdl2_5video_Renderer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5video_Renderer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5video_Renderer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5video_Renderer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture __pyx_vtable_6pygame_5_sdl2_5video_Texture; static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Texture(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_5_sdl2_5video_Texture *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)o); p->__pyx_vtab = __pyx_vtabptr_6pygame_5_sdl2_5video_Texture; p->_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); p->renderer = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pygame_5_sdl2_5video_7Texture_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Texture(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5video_Texture *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5video_Texture) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_5_sdl2_5video_7Texture_7__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_color); Py_CLEAR(p->renderer); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_5_sdl2_5video_Texture(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)o; if (p->_color) { e = (*v)(((PyObject *)p->_color), a); if (e) return e; } if (p->renderer) { e = (*v)(((PyObject *)p->renderer), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_5_sdl2_5video_Texture(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)o; tmp = ((PyObject*)p->_color); p->_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->renderer); p->renderer = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_alpha(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_7Texture_alpha(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_blend_mode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_7Texture_blend_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_10blend_mode_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_color(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_7Texture_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_5color_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_renderer(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_8renderer_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_width(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_5width_1__get__(o); } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7Texture_height(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_7Texture_6height_1__get__(o); } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video_Texture[] = { {"from_surface", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_4from_surface}, {"get_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_9get_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_8get_rect}, {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_13update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7Texture_12update}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5video_Texture[] = { {(char *)"alpha", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_alpha, __pyx_setprop_6pygame_5_sdl2_5video_7Texture_alpha, (char *)0, 0}, {(char *)"blend_mode", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_blend_mode, __pyx_setprop_6pygame_5_sdl2_5video_7Texture_blend_mode, (char *)0, 0}, {(char *)"color", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_color, __pyx_setprop_6pygame_5_sdl2_5video_7Texture_color, (char *)0, 0}, {(char *)"renderer", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_renderer, 0, (char *)0, 0}, {(char *)"width", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_width, 0, (char *)0, 0}, {(char *)"height", __pyx_getprop_6pygame_5_sdl2_5video_7Texture_height, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5video_Texture_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5video_Texture}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5video_Texture}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_5_sdl2_5video_Texture}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5video_Texture}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5video_Texture}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5video_Texture}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5video_Texture_spec = { "pygame._sdl2.video.Texture", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Texture), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_5_sdl2_5video_Texture_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Texture = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.video.""Texture", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Texture), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5video_Texture, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5video_Texture, /*tp_traverse*/ __pyx_tp_clear_6pygame_5_sdl2_5video_Texture, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5video_Texture, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5video_Texture, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5video_Texture, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image __pyx_vtable_6pygame_5_sdl2_5video_Image; static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Image(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_5_sdl2_5video_Image *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_5_sdl2_5video_Image *)o); p->__pyx_vtab = __pyx_vtabptr_6pygame_5_sdl2_5video_Image; p->_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); p->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); Py_INCREF(Py_None); p->srcrect = ((pgRectObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pygame_5_sdl2_5video_5Image_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Image(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5video_Image *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Image *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5video_Image) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_color); Py_CLEAR(p->texture); Py_CLEAR(p->srcrect); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_5_sdl2_5video_Image(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5video_Image *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Image *)o; if (p->_color) { e = (*v)(((PyObject *)p->_color), a); if (e) return e; } if (p->texture) { e = (*v)(((PyObject *)p->texture), a); if (e) return e; } if (p->srcrect) { e = (*v)(((PyObject *)p->srcrect), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_5_sdl2_5video_Image(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_5_sdl2_5video_Image *p = (struct __pyx_obj_6pygame_5_sdl2_5video_Image *)o; tmp = ((PyObject*)p->_color); p->_color = ((pgColorObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->texture); p->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->srcrect); p->srcrect = ((pgRectObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_color(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5color_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5color_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_origin(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_origin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6origin_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_angle(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_angle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5angle_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_flip_x(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_flip_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_x_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_flip_y(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_flip_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_6flip_y_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_alpha(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_alpha(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_5alpha_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_blend_mode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_blend_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_10blend_mode_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_texture(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_texture(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_3__set__(o, v); } else { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7texture_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_5_sdl2_5video_5Image_srcrect(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_1__get__(o); } static int __pyx_setprop_6pygame_5_sdl2_5video_5Image_srcrect(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_3__set__(o, v); } else { return __pyx_pw_6pygame_5_sdl2_5video_5Image_7srcrect_5__del__(o); } } static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video_Image[] = { {"get_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_5get_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_5Image_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5video_Image[] = { {(char *)"color", __pyx_getprop_6pygame_5_sdl2_5video_5Image_color, __pyx_setprop_6pygame_5_sdl2_5video_5Image_color, (char *)0, 0}, {(char *)"origin", __pyx_getprop_6pygame_5_sdl2_5video_5Image_origin, __pyx_setprop_6pygame_5_sdl2_5video_5Image_origin, (char *)0, 0}, {(char *)"angle", __pyx_getprop_6pygame_5_sdl2_5video_5Image_angle, __pyx_setprop_6pygame_5_sdl2_5video_5Image_angle, (char *)0, 0}, {(char *)"flip_x", __pyx_getprop_6pygame_5_sdl2_5video_5Image_flip_x, __pyx_setprop_6pygame_5_sdl2_5video_5Image_flip_x, (char *)0, 0}, {(char *)"flip_y", __pyx_getprop_6pygame_5_sdl2_5video_5Image_flip_y, __pyx_setprop_6pygame_5_sdl2_5video_5Image_flip_y, (char *)0, 0}, {(char *)"alpha", __pyx_getprop_6pygame_5_sdl2_5video_5Image_alpha, __pyx_setprop_6pygame_5_sdl2_5video_5Image_alpha, (char *)0, 0}, {(char *)"blend_mode", __pyx_getprop_6pygame_5_sdl2_5video_5Image_blend_mode, __pyx_setprop_6pygame_5_sdl2_5video_5Image_blend_mode, (char *)0, 0}, {(char *)"texture", __pyx_getprop_6pygame_5_sdl2_5video_5Image_texture, __pyx_setprop_6pygame_5_sdl2_5video_5Image_texture, (char *)0, 0}, {(char *)"srcrect", __pyx_getprop_6pygame_5_sdl2_5video_5Image_srcrect, __pyx_setprop_6pygame_5_sdl2_5video_5Image_srcrect, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5video_Image_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5video_Image}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5video_Image}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_5_sdl2_5video_Image}, {Py_tp_methods, (void *)__pyx_methods_6pygame_5_sdl2_5video_Image}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_5_sdl2_5video_Image}, {Py_tp_init, (void *)__pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5video_Image}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5video_Image_spec = { "pygame._sdl2.video.Image", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Image), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_5_sdl2_5video_Image_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Image = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.video.""Image", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Image), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5video_Image, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5video_Image, /*tp_traverse*/ __pyx_tp_clear_6pygame_5_sdl2_5video_Image, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_5_sdl2_5video_Image, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_5_sdl2_5video_Image, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5video_Image, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif #if CYTHON_USE_FREELISTS static struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *__pyx_freelist_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers[8]; static int __pyx_freecount_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers = 0; #endif static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_freecount_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers)))) { o = (PyObject*)__pyx_freelist_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers[--__pyx_freecount_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers]; memset(o, 0, sizeof(struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else #endif { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } #endif return o; } static void __pyx_tp_dealloc_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers(PyObject *o) { struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *p = (struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_ret); #if CYTHON_USE_FREELISTS if (((int)(__pyx_freecount_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers)))) { __pyx_freelist_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers[__pyx_freecount_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers++] = ((struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)o); } else #endif { #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } } static int __pyx_tp_traverse_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *p = (struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers *)o; if (p->__pyx_v_ret) { e = (*v)(p->__pyx_v_ret, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers_spec = { "pygame._sdl2.video.__pyx_scope_struct__get_drivers", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers_slots, }; #else static PyTypeObject __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers = { PyVarObject_HEAD_INIT(0, 0) "pygame._sdl2.video.""__pyx_scope_struct__get_drivers", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_2nd_argument_must_be_a_surface, __pyx_k_2nd_argument_must_be_a_surface, sizeof(__pyx_k_2nd_argument_must_be_a_surface), 0, 0, 1, 0}, {&__pyx_n_s_DEFAULT_SIZE, __pyx_k_DEFAULT_SIZE, sizeof(__pyx_k_DEFAULT_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_Image, __pyx_k_Image, sizeof(__pyx_k_Image), 0, 0, 1, 1}, {&__pyx_n_s_Image___reduce_cython, __pyx_k_Image___reduce_cython, sizeof(__pyx_k_Image___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Image___setstate_cython, __pyx_k_Image___setstate_cython, sizeof(__pyx_k_Image___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Image_draw, __pyx_k_Image_draw, sizeof(__pyx_k_Image_draw), 0, 0, 1, 1}, {&__pyx_n_s_Image_get_rect, __pyx_k_Image_get_rect, sizeof(__pyx_k_Image_get_rect), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_n_s_MESSAGEBOX_ERROR, __pyx_k_MESSAGEBOX_ERROR, sizeof(__pyx_k_MESSAGEBOX_ERROR), 0, 0, 1, 1}, {&__pyx_n_s_MESSAGEBOX_INFORMATION, __pyx_k_MESSAGEBOX_INFORMATION, sizeof(__pyx_k_MESSAGEBOX_INFORMATION), 0, 0, 1, 1}, {&__pyx_n_s_MESSAGEBOX_WARNING, __pyx_k_MESSAGEBOX_WARNING, sizeof(__pyx_k_MESSAGEBOX_WARNING), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_OK, __pyx_k_OK, sizeof(__pyx_k_OK), 0, 0, 1, 1}, {&__pyx_n_s_Renderer, __pyx_k_Renderer, sizeof(__pyx_k_Renderer), 0, 0, 1, 1}, {&__pyx_n_s_RendererDriverInfo, __pyx_k_RendererDriverInfo, sizeof(__pyx_k_RendererDriverInfo), 0, 0, 1, 1}, {&__pyx_n_s_RendererDriverInfo___repr, __pyx_k_RendererDriverInfo___repr, sizeof(__pyx_k_RendererDriverInfo___repr), 0, 0, 1, 1}, {&__pyx_n_s_Renderer___reduce_cython, __pyx_k_Renderer___reduce_cython, sizeof(__pyx_k_Renderer___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Renderer___setstate_cython, __pyx_k_Renderer___setstate_cython, sizeof(__pyx_k_Renderer___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_blit, __pyx_k_Renderer_blit, sizeof(__pyx_k_Renderer_blit), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_clear, __pyx_k_Renderer_clear, sizeof(__pyx_k_Renderer_clear), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_compose_custom_blend_mo, __pyx_k_Renderer_compose_custom_blend_mo, sizeof(__pyx_k_Renderer_compose_custom_blend_mo), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_draw_line, __pyx_k_Renderer_draw_line, sizeof(__pyx_k_Renderer_draw_line), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_draw_point, __pyx_k_Renderer_draw_point, sizeof(__pyx_k_Renderer_draw_point), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_draw_rect, __pyx_k_Renderer_draw_rect, sizeof(__pyx_k_Renderer_draw_rect), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_fill_rect, __pyx_k_Renderer_fill_rect, sizeof(__pyx_k_Renderer_fill_rect), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_from_window, __pyx_k_Renderer_from_window, sizeof(__pyx_k_Renderer_from_window), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_get_viewport, __pyx_k_Renderer_get_viewport, sizeof(__pyx_k_Renderer_get_viewport), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_present, __pyx_k_Renderer_present, sizeof(__pyx_k_Renderer_present), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_set_viewport, __pyx_k_Renderer_set_viewport, sizeof(__pyx_k_Renderer_set_viewport), 0, 0, 1, 1}, {&__pyx_n_s_Renderer_to_surface, __pyx_k_Renderer_to_surface, sizeof(__pyx_k_Renderer_to_surface), 0, 0, 1, 1}, {&__pyx_n_s_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE, __pyx_k_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE, sizeof(__pyx_k_SDL_HINT_VIDEO_WINDOW_SHARE_PIXE), 0, 0, 1, 1}, {&__pyx_n_s_Texture, __pyx_k_Texture, sizeof(__pyx_k_Texture), 0, 0, 1, 1}, {&__pyx_n_s_Texture___reduce_cython, __pyx_k_Texture___reduce_cython, sizeof(__pyx_k_Texture___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Texture___setstate_cython, __pyx_k_Texture___setstate_cython, sizeof(__pyx_k_Texture___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Texture_draw, __pyx_k_Texture_draw, sizeof(__pyx_k_Texture_draw), 0, 0, 1, 1}, {&__pyx_n_s_Texture_from_surface, __pyx_k_Texture_from_surface, sizeof(__pyx_k_Texture_from_surface), 0, 0, 1, 1}, {&__pyx_n_s_Texture_get_rect, __pyx_k_Texture_get_rect, sizeof(__pyx_k_Texture_get_rect), 0, 0, 1, 1}, {&__pyx_n_s_Texture_update, __pyx_k_Texture_update, sizeof(__pyx_k_Texture_update), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_WINDOWPOS_CENTERED, __pyx_k_WINDOWPOS_CENTERED, sizeof(__pyx_k_WINDOWPOS_CENTERED), 0, 0, 1, 1}, {&__pyx_n_s_WINDOWPOS_UNDEFINED, __pyx_k_WINDOWPOS_UNDEFINED, sizeof(__pyx_k_WINDOWPOS_UNDEFINED), 0, 0, 1, 1}, {&__pyx_n_s_Window, __pyx_k_Window, sizeof(__pyx_k_Window), 0, 0, 1, 1}, {&__pyx_n_s_Window___reduce_cython, __pyx_k_Window___reduce_cython, sizeof(__pyx_k_Window___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Window___setstate_cython, __pyx_k_Window___setstate_cython, sizeof(__pyx_k_Window___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Window_destroy, __pyx_k_Window_destroy, sizeof(__pyx_k_Window_destroy), 0, 0, 1, 1}, {&__pyx_n_s_Window_focus, __pyx_k_Window_focus, sizeof(__pyx_k_Window_focus), 0, 0, 1, 1}, {&__pyx_n_s_Window_from_display_module, __pyx_k_Window_from_display_module, sizeof(__pyx_k_Window_from_display_module), 0, 0, 1, 1}, {&__pyx_n_s_Window_from_window, __pyx_k_Window_from_window, sizeof(__pyx_k_Window_from_window), 0, 0, 1, 1}, {&__pyx_n_s_Window_hide, __pyx_k_Window_hide, sizeof(__pyx_k_Window_hide), 0, 0, 1, 1}, {&__pyx_n_s_Window_maximize, __pyx_k_Window_maximize, sizeof(__pyx_k_Window_maximize), 0, 0, 1, 1}, {&__pyx_n_s_Window_minimize, __pyx_k_Window_minimize, sizeof(__pyx_k_Window_minimize), 0, 0, 1, 1}, {&__pyx_n_s_Window_restore, __pyx_k_Window_restore, sizeof(__pyx_k_Window_restore), 0, 0, 1, 1}, {&__pyx_n_s_Window_set_fullscreen, __pyx_k_Window_set_fullscreen, sizeof(__pyx_k_Window_set_fullscreen), 0, 0, 1, 1}, {&__pyx_n_s_Window_set_icon, __pyx_k_Window_set_icon, sizeof(__pyx_k_Window_set_icon), 0, 0, 1, 1}, {&__pyx_n_s_Window_set_modal_for, __pyx_k_Window_set_modal_for, sizeof(__pyx_k_Window_set_modal_for), 0, 0, 1, 1}, {&__pyx_n_s_Window_set_windowed, __pyx_k_Window_set_windowed, sizeof(__pyx_k_Window_set_windowed), 0, 0, 1, 1}, {&__pyx_n_s_Window_show, __pyx_k_Window_show, sizeof(__pyx_k_Window_show), 0, 0, 1, 1}, {&__pyx_n_s__104, __pyx_k__104, sizeof(__pyx_k__104), 0, 0, 1, 1}, {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_n_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 1}, {&__pyx_n_s_accelerated, __pyx_k_accelerated, sizeof(__pyx_k_accelerated), 0, 0, 1, 1}, {&__pyx_n_s_allow_highdpi, __pyx_k_allow_highdpi, sizeof(__pyx_k_allow_highdpi), 0, 0, 1, 1}, {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1}, {&__pyx_n_s_alpha_mode, __pyx_k_alpha_mode, sizeof(__pyx_k_alpha_mode), 0, 0, 1, 1}, {&__pyx_n_s_always_on_top, __pyx_k_always_on_top, sizeof(__pyx_k_always_on_top), 0, 0, 1, 1}, {&__pyx_n_s_angle, __pyx_k_angle, sizeof(__pyx_k_angle), 0, 0, 1, 1}, {&__pyx_n_s_area, __pyx_k_area, sizeof(__pyx_k_area), 0, 0, 1, 1}, {&__pyx_kp_s_area_must_be_None_or_a_rect, __pyx_k_area_must_be_None_or_a_rect, sizeof(__pyx_k_area_must_be_None_or_a_rect), 0, 0, 1, 0}, {&__pyx_kp_s_area_must_be_a_rectangle_or_None, __pyx_k_area_must_be_a_rectangle_or_None, sizeof(__pyx_k_area_must_be_a_rectangle_or_None), 0, 0, 1, 0}, {&__pyx_n_s_areaparam, __pyx_k_areaparam, sizeof(__pyx_k_areaparam), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_blend, __pyx_k_blend, sizeof(__pyx_k_blend), 0, 0, 1, 1}, {&__pyx_n_s_blend_mode, __pyx_k_blend_mode, sizeof(__pyx_k_blend_mode), 0, 0, 1, 1}, {&__pyx_n_s_blit, __pyx_k_blit, sizeof(__pyx_k_blit), 0, 0, 1, 1}, {&__pyx_n_s_borderless, __pyx_k_borderless, sizeof(__pyx_k_borderless), 0, 0, 1, 1}, {&__pyx_n_s_but, __pyx_k_but, sizeof(__pyx_k_but), 0, 0, 1, 1}, {&__pyx_n_s_button, __pyx_k_button, sizeof(__pyx_k_button), 0, 0, 1, 1}, {&__pyx_n_s_buttonid, __pyx_k_buttonid, sizeof(__pyx_k_buttonid), 0, 0, 1, 1}, {&__pyx_n_s_buttons, __pyx_k_buttons, sizeof(__pyx_k_buttons), 0, 0, 1, 1}, {&__pyx_n_s_buttons_utf8, __pyx_k_buttons_utf8, sizeof(__pyx_k_buttons_utf8), 0, 0, 1, 1}, {&__pyx_n_s_c_buttons, __pyx_k_c_buttons, sizeof(__pyx_k_c_buttons), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1}, {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1}, {&__pyx_n_s_color_mode, __pyx_k_color_mode, sizeof(__pyx_k_color_mode), 0, 0, 1, 1}, {&__pyx_n_s_compose_custom_blend_mode, __pyx_k_compose_custom_blend_mode, sizeof(__pyx_k_compose_custom_blend_mode), 0, 0, 1, 1}, {&__pyx_n_s_converted_surf, __pyx_k_converted_surf, sizeof(__pyx_k_converted_surf), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_data_ptr, __pyx_k_data_ptr, sizeof(__pyx_k_data_ptr), 0, 0, 1, 1}, {&__pyx_n_s_defaultColor, __pyx_k_defaultColor, sizeof(__pyx_k_defaultColor), 0, 0, 1, 1}, {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1}, {&__pyx_n_s_desktop, __pyx_k_desktop, sizeof(__pyx_k_desktop), 0, 0, 1, 1}, {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1}, {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_draw, __pyx_k_draw, sizeof(__pyx_k_draw), 0, 0, 1, 1}, {&__pyx_n_s_draw_line, __pyx_k_draw_line, sizeof(__pyx_k_draw_line), 0, 0, 1, 1}, {&__pyx_n_s_draw_point, __pyx_k_draw_point, sizeof(__pyx_k_draw_point), 0, 0, 1, 1}, {&__pyx_n_s_draw_rect, __pyx_k_draw_rect, sizeof(__pyx_k_draw_rect), 0, 0, 1, 1}, {&__pyx_n_s_dstrect, __pyx_k_dstrect, sizeof(__pyx_k_dstrect), 0, 0, 1, 1}, {&__pyx_kp_s_dstrect_must_be_a_position_rect, __pyx_k_dstrect_must_be_a_position_rect, sizeof(__pyx_k_dstrect_must_be_a_position_rect), 0, 0, 1, 0}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_errorfnc, __pyx_k_errorfnc, sizeof(__pyx_k_errorfnc), 0, 0, 1, 1}, {&__pyx_n_s_escape_button, __pyx_k_escape_button, sizeof(__pyx_k_escape_button), 0, 0, 1, 1}, {&__pyx_kp_s_expected_a_rectangle, __pyx_k_expected_a_rectangle, sizeof(__pyx_k_expected_a_rectangle), 0, 0, 1, 0}, {&__pyx_n_s_fill_rect, __pyx_k_fill_rect, sizeof(__pyx_k_fill_rect), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_flip_x, __pyx_k_flip_x, sizeof(__pyx_k_flip_x), 0, 0, 1, 1}, {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1}, {&__pyx_n_s_focus, __pyx_k_focus, sizeof(__pyx_k_focus), 0, 0, 1, 1}, {&__pyx_n_s_foreign, __pyx_k_foreign, sizeof(__pyx_k_foreign), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_format_2, __pyx_k_format_2, sizeof(__pyx_k_format_2), 0, 0, 1, 1}, {&__pyx_n_s_from_display_module, __pyx_k_from_display_module, sizeof(__pyx_k_from_display_module), 0, 0, 1, 1}, {&__pyx_n_s_from_surface, __pyx_k_from_surface, sizeof(__pyx_k_from_surface), 0, 0, 1, 1}, {&__pyx_n_s_from_window, __pyx_k_from_window, sizeof(__pyx_k_from_window), 0, 0, 1, 1}, {&__pyx_n_s_fullscreen, __pyx_k_fullscreen, sizeof(__pyx_k_fullscreen), 0, 0, 1, 1}, {&__pyx_kp_s_fullscreen_and_fullscreen_deskto, __pyx_k_fullscreen_and_fullscreen_deskto, sizeof(__pyx_k_fullscreen_and_fullscreen_deskto), 0, 0, 1, 0}, {&__pyx_n_s_fullscreen_desktop, __pyx_k_fullscreen_desktop, sizeof(__pyx_k_fullscreen_desktop), 0, 0, 1, 1}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_getResource, __pyx_k_getResource, sizeof(__pyx_k_getResource), 0, 0, 1, 1}, {&__pyx_n_s_get_drivers, __pyx_k_get_drivers, sizeof(__pyx_k_get_drivers), 0, 0, 1, 1}, {&__pyx_n_s_get_grabbed_window, __pyx_k_get_grabbed_window, sizeof(__pyx_k_get_grabbed_window), 0, 0, 1, 1}, {&__pyx_n_s_get_height, __pyx_k_get_height, sizeof(__pyx_k_get_height), 0, 0, 1, 1}, {&__pyx_n_s_get_rect, __pyx_k_get_rect, sizeof(__pyx_k_get_rect), 0, 0, 1, 1}, {&__pyx_n_s_get_viewport, __pyx_k_get_viewport, sizeof(__pyx_k_get_viewport), 0, 0, 1, 1}, {&__pyx_n_s_get_width, __pyx_k_get_width, sizeof(__pyx_k_get_width), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1}, {&__pyx_n_s_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 0, 1, 1}, {&__pyx_n_s_hide, __pyx_k_hide, sizeof(__pyx_k_hide), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_n_s_input_focus, __pyx_k_input_focus, sizeof(__pyx_k_input_focus), 0, 0, 1, 1}, {&__pyx_n_s_input_grabbed, __pyx_k_input_grabbed, sizeof(__pyx_k_input_grabbed), 0, 0, 1, 1}, {&__pyx_n_s_input_only, __pyx_k_input_only, sizeof(__pyx_k_input_only), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_kwarg_to_flag, __pyx_k_kwarg_to_flag, sizeof(__pyx_k_kwarg_to_flag), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_max_texture_height, __pyx_k_max_texture_height, sizeof(__pyx_k_max_texture_height), 0, 0, 1, 1}, {&__pyx_n_s_max_texture_width, __pyx_k_max_texture_width, sizeof(__pyx_k_max_texture_width), 0, 0, 1, 1}, {&__pyx_n_s_maximize, __pyx_k_maximize, sizeof(__pyx_k_maximize), 0, 0, 1, 1}, {&__pyx_n_s_maximized, __pyx_k_maximized, sizeof(__pyx_k_maximized), 0, 0, 1, 1}, {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1}, {&__pyx_n_s_messagebox, __pyx_k_messagebox, sizeof(__pyx_k_messagebox), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_minimize, __pyx_k_minimize, sizeof(__pyx_k_minimize), 0, 0, 1, 1}, {&__pyx_n_s_minimized, __pyx_k_minimized, sizeof(__pyx_k_minimized), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mouse_capture, __pyx_k_mouse_capture, sizeof(__pyx_k_mouse_capture), 0, 0, 1, 1}, {&__pyx_n_s_mouse_focus, __pyx_k_mouse_focus, sizeof(__pyx_k_mouse_focus), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_kp_s_no_standard_masks_exist_for_give, __pyx_k_no_standard_masks_exist_for_give, sizeof(__pyx_k_no_standard_masks_exist_for_give), 0, 0, 1, 0}, {&__pyx_kp_s_not_enough_memory_for_the_surfac, __pyx_k_not_enough_memory_for_the_surfac, sizeof(__pyx_k_not_enough_memory_for_the_surfac), 0, 0, 1, 0}, {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1}, {&__pyx_n_s_num_texture_formats, __pyx_k_num_texture_formats, sizeof(__pyx_k_num_texture_formats), 0, 0, 1, 1}, {&__pyx_kp_s_only_one_of_static_streaming_or, __pyx_k_only_one_of_static_streaming_or, sizeof(__pyx_k_only_one_of_static_streaming_or), 0, 0, 1, 0}, {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1}, {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_p1, __pyx_k_p1, sizeof(__pyx_k_p1), 0, 0, 1, 1}, {&__pyx_n_s_p2, __pyx_k_p2, sizeof(__pyx_k_p2), 0, 0, 1, 1}, {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1}, {&__pyx_n_s_pixel_format, __pyx_k_pixel_format, sizeof(__pyx_k_pixel_format), 0, 0, 1, 1}, {&__pyx_n_s_pkgdata, __pyx_k_pkgdata, sizeof(__pyx_k_pkgdata), 0, 0, 1, 1}, {&__pyx_n_s_point, __pyx_k_point, sizeof(__pyx_k_point), 0, 0, 1, 1}, {&__pyx_n_s_popup_menu, __pyx_k_popup_menu, sizeof(__pyx_k_popup_menu), 0, 0, 1, 1}, {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1}, {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1}, {&__pyx_n_s_pygame, __pyx_k_pygame, sizeof(__pyx_k_pygame), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_sdl2, __pyx_k_pygame__sdl2_sdl2, sizeof(__pyx_k_pygame__sdl2_sdl2), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sdl2_video, __pyx_k_pygame__sdl2_video, sizeof(__pyx_k_pygame__sdl2_video), 0, 0, 1, 1}, {&__pyx_kp_s_pygame_icon_bmp, __pyx_k_pygame_icon_bmp, sizeof(__pyx_k_pygame_icon_bmp), 0, 0, 1, 0}, {&__pyx_n_s_pygame_pkgdata, __pyx_k_pygame_pkgdata, sizeof(__pyx_k_pygame_pkgdata), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_rarea, __pyx_k_rarea, sizeof(__pyx_k_rarea), 0, 0, 1, 1}, {&__pyx_n_s_rect, __pyx_k_rect, sizeof(__pyx_k_rect), 0, 0, 1, 1}, {&__pyx_n_s_rect_2, __pyx_k_rect_2, sizeof(__pyx_k_rect_2), 0, 0, 1, 1}, {&__pyx_kp_s_rect_values_are_out_of_range, __pyx_k_rect_values_are_out_of_range, sizeof(__pyx_k_rect_values_are_out_of_range), 0, 0, 1, 0}, {&__pyx_n_s_rectptr, __pyx_k_rectptr, sizeof(__pyx_k_rectptr), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_renderer, __pyx_k_renderer, sizeof(__pyx_k_renderer), 0, 0, 1, 1}, {&__pyx_n_s_renderer_2, __pyx_k_renderer_2, sizeof(__pyx_k_renderer_2), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1}, {&__pyx_n_s_resizable, __pyx_k_resizable, sizeof(__pyx_k_resizable), 0, 0, 1, 1}, {&__pyx_n_s_restore, __pyx_k_restore, sizeof(__pyx_k_restore), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_return_button, __pyx_k_return_button, sizeof(__pyx_k_return_button), 0, 0, 1, 1}, {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_kp_s_s_name_s_flags_0x_02x_num_textu, __pyx_k_s_name_s_flags_0x_02x_num_textu, sizeof(__pyx_k_s_name_s_flags_0x_02x_num_textu), 0, 0, 1, 0}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_s_self__renderer_cannot_be_convert, __pyx_k_self__renderer_cannot_be_convert, sizeof(__pyx_k_self__renderer_cannot_be_convert), 0, 0, 1, 0}, {&__pyx_kp_s_self__win_cannot_be_converted_to, __pyx_k_self__win_cannot_be_converted_to, sizeof(__pyx_k_self__win_cannot_be_converted_to), 0, 0, 1, 0}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_set_colorkey, __pyx_k_set_colorkey, sizeof(__pyx_k_set_colorkey), 0, 0, 1, 1}, {&__pyx_n_s_set_fullscreen, __pyx_k_set_fullscreen, sizeof(__pyx_k_set_fullscreen), 0, 0, 1, 1}, {&__pyx_n_s_set_icon, __pyx_k_set_icon, sizeof(__pyx_k_set_icon), 0, 0, 1, 1}, {&__pyx_n_s_set_modal_for, __pyx_k_set_modal_for, sizeof(__pyx_k_set_modal_for), 0, 0, 1, 1}, {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, {&__pyx_n_s_set_viewport, __pyx_k_set_viewport, sizeof(__pyx_k_set_viewport), 0, 0, 1, 1}, {&__pyx_n_s_set_windowed, __pyx_k_set_windowed, sizeof(__pyx_k_set_windowed), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_kp_s_size_must_contain_two_positive_v, __pyx_k_size_must_contain_two_positive_v, sizeof(__pyx_k_size_must_contain_two_positive_v), 0, 0, 1, 0}, {&__pyx_kp_s_size_must_have_two_elements, __pyx_k_size_must_have_two_elements, sizeof(__pyx_k_size_must_have_two_elements), 0, 0, 1, 0}, {&__pyx_n_s_skip_taskbar, __pyx_k_skip_taskbar, sizeof(__pyx_k_skip_taskbar), 0, 0, 1, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_kp_s_source_must_be_drawable, __pyx_k_source_must_be_drawable, sizeof(__pyx_k_source_must_be_drawable), 0, 0, 1, 0}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_n_s_special_flags, __pyx_k_special_flags, sizeof(__pyx_k_special_flags), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_k_src_c_cython_pygame__sdl2_video, sizeof(__pyx_k_src_c_cython_pygame__sdl2_video), 0, 0, 1, 0}, {&__pyx_n_s_srcrect, __pyx_k_srcrect, sizeof(__pyx_k_srcrect), 0, 0, 1, 1}, {&__pyx_kp_s_srcrect_must_be_None_or_a_rectan, __pyx_k_srcrect_must_be_None_or_a_rectan, sizeof(__pyx_k_srcrect_must_be_None_or_a_rectan), 0, 0, 1, 0}, {&__pyx_kp_s_srcrect_must_be_a_rect_or_None, __pyx_k_srcrect_must_be_a_rect_or_None, sizeof(__pyx_k_srcrect_must_be_a_rect_or_None), 0, 0, 1, 0}, {&__pyx_n_s_static, __pyx_k_static, sizeof(__pyx_k_static), 0, 0, 1, 1}, {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, {&__pyx_n_s_streaming, __pyx_k_streaming, sizeof(__pyx_k_streaming), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_surf, __pyx_k_surf, sizeof(__pyx_k_surf), 0, 0, 1, 1}, {&__pyx_n_s_surf_ptr, __pyx_k_surf_ptr, sizeof(__pyx_k_surf_ptr), 0, 0, 1, 1}, {&__pyx_n_s_surface, __pyx_k_surface, sizeof(__pyx_k_surface), 0, 0, 1, 1}, {&__pyx_kp_s_surface_must_be_a_Surface_object, __pyx_k_surface_must_be_a_Surface_object, sizeof(__pyx_k_surface_must_be_a_Surface_object), 0, 0, 1, 0}, {&__pyx_kp_s_surface_must_be_a_surface_or_No, __pyx_k_surface_must_be_a_surface_or_No, sizeof(__pyx_k_surface_must_be_a_surface_or_No), 0, 0, 1, 0}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_kp_s_target_must_be_a_Texture_or_None, __pyx_k_target_must_be_a_Texture_or_None, sizeof(__pyx_k_target_must_be_a_Texture_or_None), 0, 0, 1, 0}, {&__pyx_n_s_target_texture, __pyx_k_target_texture, sizeof(__pyx_k_target_texture), 0, 0, 1, 1}, {&__pyx_n_s_tempviewport, __pyx_k_tempviewport, sizeof(__pyx_k_tempviewport), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_texture, __pyx_k_texture, sizeof(__pyx_k_texture), 0, 0, 1, 1}, {&__pyx_n_s_textureOrImage, __pyx_k_textureOrImage, sizeof(__pyx_k_textureOrImage), 0, 0, 1, 1}, {&__pyx_kp_s_the_argument_is_not_a_rectangle, __pyx_k_the_argument_is_not_a_rectangle, sizeof(__pyx_k_the_argument_is_not_a_rectangle), 0, 0, 1, 0}, {&__pyx_kp_s_the_surface_is_too_small, __pyx_k_the_surface_is_too_small, sizeof(__pyx_k_the_surface_is_too_small), 0, 0, 1, 0}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1}, {&__pyx_n_s_tmprect, __pyx_k_tmprect, sizeof(__pyx_k_tmprect), 0, 0, 1, 1}, {&__pyx_n_s_to_surface, __pyx_k_to_surface, sizeof(__pyx_k_to_surface), 0, 0, 1, 1}, {&__pyx_n_s_tooltip, __pyx_k_tooltip, sizeof(__pyx_k_tooltip), 0, 0, 1, 1}, {&__pyx_kp_s_unknown_parameter_s, __pyx_k_unknown_parameter_s, sizeof(__pyx_k_unknown_parameter_s), 0, 0, 1, 0}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_kp_s_update_source_should_be_a_Surfac, __pyx_k_update_source_should_be_a_Surfac, sizeof(__pyx_k_update_source_should_be_a_Surfac), 0, 0, 1, 0}, {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1}, {&__pyx_n_s_utility, __pyx_k_utility, sizeof(__pyx_k_utility), 0, 0, 1, 1}, {&__pyx_n_s_vsync, __pyx_k_vsync, sizeof(__pyx_k_vsync), 0, 0, 1, 1}, {&__pyx_n_s_vulkan, __pyx_k_vulkan, sizeof(__pyx_k_vulkan), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_win, __pyx_k_win, sizeof(__pyx_k_win), 0, 0, 1, 1}, {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 627, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 170, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 171, __pyx_L1_error) __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 171, __pyx_L1_error) __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 217, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 279, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 291, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 292, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pygame/_sdl2/video.pyx":116 * bint warn=False, * bint error=False, * buttons=('OK', ), # <<<<<<<<<<<<<< * return_button=0, * escape_button=0): */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_OK); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pygame/_sdl2/video.pyx":279 * flags = 0 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") # <<<<<<<<<<<<<< * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_fullscreen_and_fullscreen_deskto); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pygame/_sdl2/video.pyx":301 * SDL_SetWindowData(self._win, "pg_window", self) * * import pygame.pkgdata # <<<<<<<<<<<<<< * surf = pygame.image.load(pygame.pkgdata.getResource( * 'pygame_icon.bmp')) */ __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_pygame, __pyx_n_s_pkgdata); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pygame/_sdl2/video.pyx":468 * """ * if not pgSurface_Check(surface): * raise TypeError('surface must be a Surface object') # <<<<<<<<<<<<<< * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) * */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_Surface_object); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pygame/_sdl2/video.pyx":557 * Amask = 0xFF << 24 * else: * raise ValueError("no standard masks exist for given bitdepth with alpha") # <<<<<<<<<<<<<< * return SDL_MasksToPixelFormatEnum(depth, * Rmask, Gmask, Bmask, Amask) */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_standard_masks_exist_for_give); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pygame/_sdl2/video.pyx":595 * cdef int width, height * if len(size) != 2: * raise ValueError('size must have two elements') # <<<<<<<<<<<<<< * width, height = size[0], size[1] * if width <= 0 or height <= 0: */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_size_must_have_two_elements); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pygame/_sdl2/video.pyx":598 * width, height = size[0], size[1] * if width <= 0 or height <= 0: * raise ValueError('size must contain two positive values') # <<<<<<<<<<<<<< * * cdef int access */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_size_must_contain_two_positive_v); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pygame/_sdl2/video.pyx":603 * if static: * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') # <<<<<<<<<<<<<< * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_only_one_of_static_streaming_or); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pygame/_sdl2/video.pyx":636 * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): * raise TypeError('2nd argument must be a surface') # <<<<<<<<<<<<<< * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_2nd_argument_must_be_a_surface); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "pygame/_sdl2/video.pyx":755 * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: * raise TypeError("the argument is not a rectangle or None") # <<<<<<<<<<<<<< * * if dstrect is not None: */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_the_argument_is_not_a_rectangle); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "pygame/_sdl2/video.pyx":767 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< * * if origin: */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_dstrect_must_be_a_position_rect); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pygame/_sdl2/video.pyx":795 * * if not pgSurface_Check(surface): * raise TypeError("update source should be a Surface.") # <<<<<<<<<<<<<< * * cdef SDL_Rect rect */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_update_source_should_be_a_Surfac); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pygame/_sdl2/video.pyx":807 * * if rectptr == NULL and area is not None: * raise TypeError('area must be a rectangle or None') # <<<<<<<<<<<<<< * * cdef Uint32 format_ */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_a_rectangle_or_None); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pygame/_sdl2/video.pyx":865 * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: * raise TypeError('srcrect must be None or a rectangle') # <<<<<<<<<<<<<< * temp.x = rectptr.x * temp.y = rectptr.y */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_None_or_a_rectan); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "pygame/_sdl2/video.pyx":875 * temp.x + temp.w > self.srcrect.w or \ * temp.y + temp.h > self.srcrect.h: * raise ValueError('rect values are out of range') # <<<<<<<<<<<<<< * temp.x += self.srcrect.x * temp.y += self.srcrect.y */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_rect_values_are_out_of_range); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pygame/_sdl2/video.pyx":886 * @color.setter * def color(self, new_color): * self._color[:3] = new_color[:3] # <<<<<<<<<<<<<< * * @property */ __pyx_slice__19 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__19); __Pyx_GIVEREF(__pyx_slice__19); /* "pygame/_sdl2/video.pyx":933 * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: * raise TypeError('srcrect must be a rect or None') # <<<<<<<<<<<<<< * src.x = rectptr.x * src.y = rectptr.y */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_a_rect_or_None); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pygame/_sdl2/video.pyx":1053 * """ * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value # <<<<<<<<<<<<<< * res = SDL_SetRenderDrawColor(self._renderer, * new_value[0], */ __pyx_slice__21 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__21); __Pyx_GIVEREF(__pyx_slice__21); /* "pygame/_sdl2/video.pyx":1136 * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_expected_a_rectangle); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "pygame/_sdl2/video.pyx":1164 * raise error() * else: * raise TypeError('target must be a Texture or None') # <<<<<<<<<<<<<< * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_target_must_be_a_Texture_or_None); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "pygame/_sdl2/video.pyx":1179 * (source).draw(area, dest) * elif not hasattr(source, 'draw'): * raise TypeError('source must be drawable') # <<<<<<<<<<<<<< * else: * source.draw(area, dest) */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_source_must_be_drawable); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "pygame/_sdl2/video.pyx":1249 * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: * raise TypeError('area must be None or a rect') # <<<<<<<<<<<<<< * * # clip area */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_None_or_a_rect); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "pygame/_sdl2/video.pyx":1277 * format) * if surf == NULL: * raise MemoryError("not enough memory for the surface") # <<<<<<<<<<<<<< * * surface = pgSurface_New2(surf, 1) */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_not_enough_memory_for_the_surfac); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "pygame/_sdl2/video.pyx":1283 * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: * raise ValueError("the surface is too small") # <<<<<<<<<<<<<< * format = surf.format.format * else: */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_the_surface_is_too_small); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "pygame/_sdl2/video.pyx":1286 * format = surf.format.format * else: * raise TypeError("'surface' must be a surface or None") # <<<<<<<<<<<<<< * * if SDL_RenderReadPixels(self._renderer, */ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_surface_or_No); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pygame/_sdl2/video.pyx":73 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_repr, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 73, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":83 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * cdef int num = SDL_GetNumRenderDrivers() * cdef SDL_RendererInfo info */ __pyx_tuple__33 = PyTuple_Pack(4, __pyx_n_s_num, __pyx_n_s_info, __pyx_n_s_ind, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_get_drivers, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 83, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":98 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """return the Window with input grab enabled, * or None if input isn't grabbed.""" */ __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_win, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_get_grabbed_window, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 98, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":111 * * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ __pyx_tuple__36 = PyTuple_Pack(17, __pyx_n_s_title, __pyx_n_s_message, __pyx_n_s_window, __pyx_n_s_info, __pyx_n_s_warn, __pyx_n_s_error, __pyx_n_s_buttons, __pyx_n_s_return_button, __pyx_n_s_escape_button, __pyx_n_s_c_buttons, __pyx_n_s_data, __pyx_n_s_button, __pyx_n_s_buttons_utf8, __pyx_n_s_i, __pyx_n_s_but, __pyx_n_s_buttonid, __pyx_n_s_s); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_messagebox, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 111, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":191 * * cdef class Window: * DEFAULT_SIZE = 640, 480 # <<<<<<<<<<<<<< * * _kwarg_to_flag = { */ __pyx_tuple__38 = PyTuple_Pack(2, __pyx_int_640, __pyx_int_480); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "pygame/_sdl2/video.pyx":214 * } * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, other): * cdef Window self = cls.__new__(cls) */ __pyx_tuple__39 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_other, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_data_ptr, __pyx_n_s_window); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_from_window, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 214, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":226 * return self * * @classmethod # <<<<<<<<<<<<<< * def from_display_module(cls): * cdef Window self = cls.__new__(cls) */ __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_self, __pyx_n_s_window); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_from_display_module, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 226, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":345 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< * """ Enable windowed mode * */ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_set_windowed, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 345, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":360 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< * """ Enable fullscreen for the window * */ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_desktop, __pyx_n_s_flags); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_set_fullscreen, 360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 360, __pyx_L1_error) __pyx_tuple__46 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "pygame/_sdl2/video.pyx":392 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< * """ Destroys the window. * """ */ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_destroy, 392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 392, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":400 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< * """ Hide the window. * """ */ __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_hide, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 400, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":406 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< * """ Show the window. * """ */ __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_show, 406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 406, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":412 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< * """ Raise the window above other windows and set the input focus. * */ __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_input_only); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_focus, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 412, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":425 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< * """ Restore the size and position of a minimized or maximized window. * """ */ __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_restore, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 425, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":430 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< * """ Maximize the window. * """ */ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_maximize, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 430, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":435 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< * """ Minimize the window. * """ */ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_minimize, 435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 435, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":462 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< * """ Set the icon for the window. * */ __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_set_icon, 462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 462, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":533 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< * """set the window as a modal for a parent window * This function is only supported on X11.""" */ __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_set_modal_for, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 533, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" */ __pyx_tuple__60 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(2, 3, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":627 * self.width, self.height = width, height * * @staticmethod # <<<<<<<<<<<<<< * def from_surface(Renderer renderer, surface): * """ Create a texture from an existing surface. */ __pyx_tuple__62 = PyTuple_Pack(5, __pyx_n_s_renderer, __pyx_n_s_surface, __pyx_n_s_self, __pyx_n_s_renderer_2, __pyx_n_s_surf_ptr); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_from_surface, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 627, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":709 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * """ Get the rectangular area of the texture. * like surface.get_rect(), returns a new rectangle covering the entire surface. */ __pyx_tuple__64 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_kwargs, __pyx_n_s_rect, __pyx_n_s_key); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_get_rect, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 709, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ __pyx_tuple__66 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_srcrect, __pyx_n_s_dstrect, __pyx_n_s_angle, __pyx_n_s_origin, __pyx_n_s_flip_x, __pyx_n_s_flip_y); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_draw, 733, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 733, __pyx_L1_error) __pyx_tuple__68 = PyTuple_Pack(6, Py_None, Py_None, __pyx_float_0_0, Py_None, Py_False, Py_False); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); /* "pygame/_sdl2/video.pyx":779 * flip_x, flip_y) * * def update(self, surface, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_UpdateTexture * # Should it accept a raw pixel data array too? */ __pyx_tuple__69 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_area, __pyx_n_s_rect, __pyx_n_s_rectptr, __pyx_n_s_surf, __pyx_n_s_converted_surf, __pyx_n_s_pixel_format, __pyx_n_s_blend, __pyx_n_s_format, __pyx_n_s_res); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_update, 779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 779, __pyx_L1_error) __pyx_tuple__71 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 3, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":904 * self._originptr = NULL * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: */ __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_get_rect, 904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 904, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":911 * return rect * * cpdef void draw(self, srcrect=None, dstrect=None) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the image to the rendering target. * */ __pyx_tuple__75 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_srcrect, __pyx_n_s_dstrect); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_draw, 911, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 911, __pyx_L1_error) __pyx_tuple__77 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(2, 3, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":965 * cdef class Renderer: * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) */ __pyx_tuple__80 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_window, __pyx_n_s_self, __pyx_n_s_defaultColor); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_from_window, 965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 965, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1062 * raise error() * * def clear(self): # <<<<<<<<<<<<<< * """ Clear the current rendering target with the drawing color. * """ */ __pyx_tuple__82 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_res); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_clear, 1062, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1062, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1070 * raise error() * * def present(self): # <<<<<<<<<<<<<< * """ Present the composed backbuffer to the screen. * */ __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_present, 1070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1070, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1078 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< * """ Returns the drawing area on the target. * */ __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_get_viewport, 1078, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1078, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1120 * # return SDL_RenderGetIntegerScale(self._renderer) * * def set_viewport(self, area): # <<<<<<<<<<<<<< * """ Set the drawing area on the target. * If this is set to ``None``, the entire target will be used. */ __pyx_tuple__86 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_area, __pyx_n_s_tmprect, __pyx_n_s_rectptr); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_set_viewport, 1120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1120, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1166 * raise TypeError('target must be a Texture or None') * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): # <<<<<<<<<<<<<< * """ Only for compatibility. * Textures created by different Renderers cannot shared with each other! */ __pyx_tuple__88 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_dest, __pyx_n_s_area, __pyx_n_s_special_flags); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_blit, 1166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1166, __pyx_L1_error) __pyx_tuple__90 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_0); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); /* "pygame/_sdl2/video.pyx":1187 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, */ __pyx_tuple__91 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_res); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__91); __Pyx_GIVEREF(__pyx_tuple__91); __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_draw_line, 1187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1187, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1195 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, */ __pyx_tuple__93 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_point, __pyx_n_s_res); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_draw_point, 1195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1195, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1202 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect */ __pyx_tuple__95 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_rect, __pyx_n_s_rect_2, __pyx_n_s_rectptr, __pyx_n_s_res); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_draw_rect, 1202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1202, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1212 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect */ __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_fill_rect, 1212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1212, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1223 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderReadPixels * """ */ __pyx_tuple__98 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_area, __pyx_n_s_format_2, __pyx_n_s_rarea, __pyx_n_s_tempviewport, __pyx_n_s_areaparam, __pyx_n_s_surf, __pyx_n_s_rectptr); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_to_surface, 1223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1223, __pyx_L1_error) /* "pygame/_sdl2/video.pyx":1294 * return surface * * @staticmethod # <<<<<<<<<<<<<< * def compose_custom_blend_mode(color_mode, alpha_mode): * """ Use this function to compose a custom blend mode.. */ __pyx_tuple__100 = PyTuple_Pack(3, __pyx_n_s_color_mode, __pyx_n_s_alpha_mode, __pyx_n_s_res); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_compose_custom_blend_mode, 1294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1294, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(2, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" */ __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_480 = PyInt_FromLong(480); if (unlikely(!__pyx_int_480)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_640 = PyInt_FromLong(640); if (unlikely(!__pyx_int_640)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { return 0; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6pygame_5_sdl2_5video_Color = __Pyx_ImportType_3_0_11(__pyx_t_1, "pygame", "Color", sizeof(pgColorObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(pgColorObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Color) __PYX_ERR(3, 400, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Rect = __Pyx_ImportType_3_0_11(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(pgRectObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Rect) __PYX_ERR(3, 404, __pyx_L1_error) #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5video_Window = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5video_Window_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5video_Window)) __PYX_ERR(0, 190, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5video_Window_spec, __pyx_ptype_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 190, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5video_Window = &__pyx_type_6pygame_5_sdl2_5video_Window; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 190, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5video_Window->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5video_Window->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5video_Window->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5video_Window->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 190, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_4__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_4__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_6Window_4__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_4__init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Window, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 190, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 190, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer = &__pyx_vtable_6pygame_5_sdl2_5video_Renderer; __pyx_vtable_6pygame_5_sdl2_5video_Renderer.get_viewport = (PyObject *(*)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, int __pyx_skip_dispatch))__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport; __pyx_vtable_6pygame_5_sdl2_5video_Renderer.blit = (PyObject *(*)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit *__pyx_optional_args))__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5video_Renderer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5video_Renderer_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5video_Renderer)) __PYX_ERR(0, 963, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5video_Renderer_spec, __pyx_ptype_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5video_Renderer = &__pyx_type_6pygame_5_sdl2_5video_Renderer; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 963, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_5_sdl2_5video_8Renderer_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_5video_8Renderer_2__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_8Renderer_2__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5video_8Renderer_2__init__; } } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Renderer, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 963, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_5_sdl2_5video_Texture = &__pyx_vtable_6pygame_5_sdl2_5video_Texture; __pyx_vtable_6pygame_5_sdl2_5video_Texture.draw_internal = (PyObject *(*)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, SDL_Rect *, SDL_Rect *, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal *__pyx_optional_args))__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal; __pyx_vtable_6pygame_5_sdl2_5video_Texture.draw = (void (*)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw *__pyx_optional_args))__pyx_f_6pygame_5_sdl2_5video_7Texture_draw; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5video_Texture = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5video_Texture_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5video_Texture)) __PYX_ERR(0, 562, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5video_Texture_spec, __pyx_ptype_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5video_Texture = &__pyx_type_6pygame_5_sdl2_5video_Texture; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 562, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_5_sdl2_5video_7Texture_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_5video_7Texture_2__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_7Texture_2__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5video_7Texture_2__init__; } } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_vtabptr_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Texture, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 562, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_5_sdl2_5video_Image = &__pyx_vtable_6pygame_5_sdl2_5video_Image; __pyx_vtable_6pygame_5_sdl2_5video_Image.draw = (void (*)(struct __pyx_obj_6pygame_5_sdl2_5video_Image *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw *__pyx_optional_args))__pyx_f_6pygame_5_sdl2_5video_5Image_draw; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5video_Image = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5video_Image_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5video_Image)) __PYX_ERR(0, 836, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5video_Image_spec, __pyx_ptype_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5video_Image = &__pyx_type_6pygame_5_sdl2_5video_Image; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5video_Image->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5video_Image->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5video_Image->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5video_Image->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Image, __pyx_vtabptr_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Image, (PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 836, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers)) __PYX_ERR(0, 83, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers_spec, __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers) < 0) __PYX_ERR(0, 83, __pyx_L1_error) #else __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers = &__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers) < 0) __PYX_ERR(0, 83, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers->tp_dictoffset && __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #else sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), #endif __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(5, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_video(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_video}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "video", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initvideo(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initvideo(void) #else __Pyx_PyMODINIT_FUNC PyInit_video(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_video(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_video(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'video' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("video", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "video" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_video(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sdl2__video) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sdl2.video")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sdl2.video", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pygame/_sdl2/video.pyx":2 * from cpython cimport PyObject * from pygame._sdl2.sdl2 import error # <<<<<<<<<<<<<< * from pygame._sdl2.sdl2 import error as errorfnc * from libc.stdlib cimport free, malloc */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_error); __Pyx_GIVEREF(__pyx_n_s_error); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_error)) __PYX_ERR(0, 2, __pyx_L1_error); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pygame__sdl2_sdl2, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":3 * from cpython cimport PyObject * from pygame._sdl2.sdl2 import error * from pygame._sdl2.sdl2 import error as errorfnc # <<<<<<<<<<<<<< * from libc.stdlib cimport free, malloc * import os */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_error); __Pyx_GIVEREF(__pyx_n_s_error); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_error)) __PYX_ERR(0, 3, __pyx_L1_error); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame__sdl2_sdl2, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_errorfnc, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":5 * from pygame._sdl2.sdl2 import error as errorfnc * from libc.stdlib cimport free, malloc * import os # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":8 * * * WINDOWPOS_UNDEFINED = _SDL_WINDOWPOS_UNDEFINED # <<<<<<<<<<<<<< * WINDOWPOS_CENTERED = _SDL_WINDOWPOS_CENTERED * */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WINDOWPOS_UNDEFINED, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":9 * * WINDOWPOS_UNDEFINED = _SDL_WINDOWPOS_UNDEFINED * WINDOWPOS_CENTERED = _SDL_WINDOWPOS_CENTERED # <<<<<<<<<<<<<< * * MESSAGEBOX_ERROR = _SDL_MESSAGEBOX_ERROR */ __pyx_t_2 = __Pyx_PyInt_From_int(SDL_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WINDOWPOS_CENTERED, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":11 * WINDOWPOS_CENTERED = _SDL_WINDOWPOS_CENTERED * * MESSAGEBOX_ERROR = _SDL_MESSAGEBOX_ERROR # <<<<<<<<<<<<<< * MESSAGEBOX_WARNING = _SDL_MESSAGEBOX_WARNING * MESSAGEBOX_INFORMATION = _SDL_MESSAGEBOX_INFORMATION */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_MESSAGEBOX_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MESSAGEBOX_ERROR, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":12 * * MESSAGEBOX_ERROR = _SDL_MESSAGEBOX_ERROR * MESSAGEBOX_WARNING = _SDL_MESSAGEBOX_WARNING # <<<<<<<<<<<<<< * MESSAGEBOX_INFORMATION = _SDL_MESSAGEBOX_INFORMATION * */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_MESSAGEBOX_WARNING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MESSAGEBOX_WARNING, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":13 * MESSAGEBOX_ERROR = _SDL_MESSAGEBOX_ERROR * MESSAGEBOX_WARNING = _SDL_MESSAGEBOX_WARNING * MESSAGEBOX_INFORMATION = _SDL_MESSAGEBOX_INFORMATION # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_MESSAGEBOX_INFORMATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MESSAGEBOX_INFORMATION, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":67 * pass * * import_pygame_base() # <<<<<<<<<<<<<< * import_pygame_color() * import_pygame_surface() */ import_pygame_base(); /* "pygame/_sdl2/video.pyx":68 * * import_pygame_base() * import_pygame_color() # <<<<<<<<<<<<<< * import_pygame_surface() * import_pygame_rect() */ import_pygame_color(); /* "pygame/_sdl2/video.pyx":69 * import_pygame_base() * import_pygame_color() * import_pygame_surface() # <<<<<<<<<<<<<< * import_pygame_rect() * */ import_pygame_surface(); /* "pygame/_sdl2/video.pyx":70 * import_pygame_color() * import_pygame_surface() * import_pygame_rect() # <<<<<<<<<<<<<< * * class RendererDriverInfo: */ import_pygame_rect(); /* "pygame/_sdl2/video.pyx":72 * import_pygame_rect() * * class RendererDriverInfo: # <<<<<<<<<<<<<< * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( */ __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_RendererDriverInfo, __pyx_n_s_RendererDriverInfo, (PyObject *) NULL, __pyx_n_s_pygame__sdl2_video, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pygame/_sdl2/video.pyx":73 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( * self.__class__.__name__, */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_18RendererDriverInfo_1__repr__, 0, __pyx_n_s_RendererDriverInfo___repr, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repr, __pyx_t_3) < 0) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sdl2/video.pyx":72 * import_pygame_rect() * * class RendererDriverInfo: # <<<<<<<<<<<<<< * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( */ __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_RendererDriverInfo, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_RendererDriverInfo, __pyx_t_3) < 0) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":83 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * cdef int num = SDL_GetNumRenderDrivers() * cdef SDL_RendererInfo info */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_1get_drivers, 0, __pyx_n_s_get_drivers, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drivers, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":98 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """return the Window with input grab enabled, * or None if input isn't grabbed.""" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_4get_grabbed_window, 0, __pyx_n_s_get_grabbed_window, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_grabbed_window, __pyx_t_2) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sdl2/video.pyx":113 * def messagebox(title, message, * Window window=None, * bint info=False, # <<<<<<<<<<<<<< * bint warn=False, * bint error=False, */ __pyx_t_2 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pygame/_sdl2/video.pyx":114 * Window window=None, * bint info=False, * bint warn=False, # <<<<<<<<<<<<<< * bint error=False, * buttons=('OK', ), */ __pyx_t_3 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/_sdl2/video.pyx":115 * bint info=False, * bint warn=False, * bint error=False, # <<<<<<<<<<<<<< * buttons=('OK', ), * return_button=0, */ __pyx_t_4 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "pygame/_sdl2/video.pyx":111 * * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ __pyx_t_5 = PyTuple_New(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, Py_None)) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_tuple__2)); __Pyx_GIVEREF(((PyObject*)__pyx_tuple__2)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject*)__pyx_tuple__2))) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_INCREF(((PyObject *)__pyx_int_0)); __Pyx_GIVEREF(((PyObject *)__pyx_int_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, ((PyObject *)__pyx_int_0))) __PYX_ERR(0, 111, __pyx_L1_error); __Pyx_INCREF(((PyObject *)__pyx_int_0)); __Pyx_GIVEREF(((PyObject *)__pyx_int_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 6, ((PyObject *)__pyx_int_0))) __PYX_ERR(0, 111, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6messagebox, 0, __pyx_n_s_messagebox, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_messagebox, __pyx_t_4) < 0) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":191 * * cdef class Window: * DEFAULT_SIZE = 640, 480 # <<<<<<<<<<<<<< * * _kwarg_to_flag = { */ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_DEFAULT_SIZE, __pyx_tuple__38) < 0) __PYX_ERR(0, 191, __pyx_L1_error) PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":194 * * _kwarg_to_flag = { * 'opengl': _SDL_WINDOW_OPENGL, # <<<<<<<<<<<<<< * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, */ __pyx_t_4 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_OPENGL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_opengl, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":195 * _kwarg_to_flag = { * 'opengl': _SDL_WINDOW_OPENGL, * 'vulkan': _SDL_WINDOW_VULKAN, # <<<<<<<<<<<<<< * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_VULKAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_vulkan, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":196 * 'opengl': _SDL_WINDOW_OPENGL, * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, # <<<<<<<<<<<<<< * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_HIDDEN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_hidden, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":197 * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, # <<<<<<<<<<<<<< * 'resizable': _SDL_WINDOW_RESIZABLE, * 'minimized': _SDL_WINDOW_MINIMIZED, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_BORDERLESS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_borderless, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":198 * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, # <<<<<<<<<<<<<< * 'minimized': _SDL_WINDOW_MINIMIZED, * 'maximized': _SDL_WINDOW_MAXIMIZED, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_RESIZABLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_resizable, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":199 * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, * 'minimized': _SDL_WINDOW_MINIMIZED, # <<<<<<<<<<<<<< * 'maximized': _SDL_WINDOW_MAXIMIZED, * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MINIMIZED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_minimized, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":200 * 'resizable': _SDL_WINDOW_RESIZABLE, * 'minimized': _SDL_WINDOW_MINIMIZED, * 'maximized': _SDL_WINDOW_MAXIMIZED, # <<<<<<<<<<<<<< * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, * 'input_focus': _SDL_WINDOW_INPUT_FOCUS, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MAXIMIZED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_maximized, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":201 * 'minimized': _SDL_WINDOW_MINIMIZED, * 'maximized': _SDL_WINDOW_MAXIMIZED, * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, # <<<<<<<<<<<<<< * 'input_focus': _SDL_WINDOW_INPUT_FOCUS, * 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_GRABBED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_grabbed, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":202 * 'maximized': _SDL_WINDOW_MAXIMIZED, * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, * 'input_focus': _SDL_WINDOW_INPUT_FOCUS, # <<<<<<<<<<<<<< * 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, * 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_FOCUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_focus, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":203 * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, * 'input_focus': _SDL_WINDOW_INPUT_FOCUS, * 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, # <<<<<<<<<<<<<< * 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, * 'foreign': _SDL_WINDOW_FOREIGN, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_FOCUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mouse_focus, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":204 * 'input_focus': _SDL_WINDOW_INPUT_FOCUS, * 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, * 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, # <<<<<<<<<<<<<< * 'foreign': _SDL_WINDOW_FOREIGN, * 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALLOW_HIGHDPI); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_highdpi, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":205 * 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, * 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, * 'foreign': _SDL_WINDOW_FOREIGN, # <<<<<<<<<<<<<< * 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, * 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FOREIGN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_foreign, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":206 * 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, * 'foreign': _SDL_WINDOW_FOREIGN, * 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, # <<<<<<<<<<<<<< * 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_CAPTURE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mouse_capture, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":207 * 'foreign': _SDL_WINDOW_FOREIGN, * 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, * 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, # <<<<<<<<<<<<<< * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, * 'utility': _SDL_WINDOW_UTILITY, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALWAYS_ON_TOP); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_always_on_top, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":208 * 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, * 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, # <<<<<<<<<<<<<< * 'utility': _SDL_WINDOW_UTILITY, * 'tooltip': _SDL_WINDOW_TOOLTIP, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_SKIP_TASKBAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_skip_taskbar, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":209 * 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, * 'utility': _SDL_WINDOW_UTILITY, # <<<<<<<<<<<<<< * 'tooltip': _SDL_WINDOW_TOOLTIP, * 'popup_menu': _SDL_WINDOW_POPUP_MENU, */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_UTILITY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_utility, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":210 * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, * 'utility': _SDL_WINDOW_UTILITY, * 'tooltip': _SDL_WINDOW_TOOLTIP, # <<<<<<<<<<<<<< * 'popup_menu': _SDL_WINDOW_POPUP_MENU, * } */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_TOOLTIP); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tooltip, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":211 * 'utility': _SDL_WINDOW_UTILITY, * 'tooltip': _SDL_WINDOW_TOOLTIP, * 'popup_menu': _SDL_WINDOW_POPUP_MENU, # <<<<<<<<<<<<<< * } * */ __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_POPUP_MENU); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_popup_menu, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_kwarg_to_flag, __pyx_t_4) < 0) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":214 * } * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, other): * cdef Window self = cls.__new__(cls) */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_1from_window, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_from_window, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_window, __pyx_t_4) < 0) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_window, __pyx_t_5) < 0) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":226 * return self * * @classmethod # <<<<<<<<<<<<<< * def from_display_module(cls): * cdef Window self = cls.__new__(cls) */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_3from_display_module, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_from_display_module, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_display_module, __pyx_t_5) < 0) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_display_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_display_module, __pyx_t_4) < 0) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":238 * * def __init__(self, title='pygame', * size=DEFAULT_SIZE, # <<<<<<<<<<<<<< * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, */ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_DEFAULT_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_k__3 = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":239 * def __init__(self, title='pygame', * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, # <<<<<<<<<<<<<< * bint fullscreen=False, * bint fullscreen_desktop=False, **kwargs): */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_k__4 = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":345 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< * """ Enable windowed mode * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_7set_windowed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_set_windowed, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_set_windowed, __pyx_t_4) < 0) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":360 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< * """ Enable fullscreen for the window * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_9set_fullscreen, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_set_fullscreen, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__46); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_set_fullscreen, __pyx_t_4) < 0) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":392 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< * """ Destroys the window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_11destroy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_destroy, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_destroy, __pyx_t_4) < 0) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":400 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< * """ Hide the window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_13hide, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_hide, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_hide, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":406 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< * """ Show the window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_15show, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_show, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_show, __pyx_t_4) < 0) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":412 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< * """ Raise the window above other windows and set the input focus. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_17focus, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_focus, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__46); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_focus, __pyx_t_4) < 0) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":425 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< * """ Restore the size and position of a minimized or maximized window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_19restore, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_restore, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_restore, __pyx_t_4) < 0) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":430 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< * """ Maximize the window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_21maximize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_maximize, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_maximize, __pyx_t_4) < 0) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":435 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< * """ Minimize the window. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_23minimize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_minimize, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_minimize, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":462 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< * """ Set the icon for the window. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_25set_icon, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_set_icon, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_set_icon, __pyx_t_4) < 0) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "pygame/_sdl2/video.pyx":533 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< * """set the window as a modal for a parent window * This function is only supported on X11.""" */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_27set_modal_for, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window_set_modal_for, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_set_modal_for, __pyx_t_4) < 0) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._win cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._win cannot be converted to a Python object for pickling" */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_6Window_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Window___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sdl2/video.pyx":627 * self.width, self.height = width, height * * @staticmethod # <<<<<<<<<<<<<< * def from_surface(Renderer renderer, surface): * """ Create a texture from an existing surface. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_5from_surface, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture_from_surface, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_from_surface, __pyx_t_4) < 0) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_from_surface, __pyx_t_5) < 0) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); /* "pygame/_sdl2/video.pyx":709 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * """ Get the rectangular area of the texture. * like surface.get_rect(), returns a new rectangle covering the entire surface. */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_9get_rect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture_get_rect, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_get_rect, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); /* "pygame/_sdl2/video.pyx":733 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< * bint flip_x=False, bint flip_y=False) noexcept: * """ Copy a portion of the texture to the rendering target. */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_11draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture_draw, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__68); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_draw, __pyx_t_5) < 0) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); /* "pygame/_sdl2/video.pyx":779 * flip_x, flip_y) * * def update(self, surface, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_UpdateTexture * # Should it accept a raw pixel data array too? */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_13update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture_update, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__71); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_update, __pyx_t_5) < 0) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Texture___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":904 * self._originptr = NULL * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< * rect = pgRect_New(&self.srcrect.r) * for key in kwargs: */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_5Image_5get_rect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Image_get_rect, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Image, __pyx_n_s_get_rect, __pyx_t_5) < 0) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Image); /* "pygame/_sdl2/video.pyx":911 * return rect * * cpdef void draw(self, srcrect=None, dstrect=None) noexcept: # <<<<<<<<<<<<<< * """ Copy a portion of the image to the rendering target. * */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_5Image_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Image_draw, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__77); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Image, __pyx_n_s_draw, __pyx_t_5) < 0) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Image); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_5Image_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Image___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_5Image_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Image___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":965 * cdef class Renderer: * * @classmethod # <<<<<<<<<<<<<< * def from_window(cls, Window window): * cdef Renderer self = cls.__new__(cls) */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_1from_window, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_from_window, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_from_window, __pyx_t_5) < 0) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_from_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_from_window, __pyx_t_4) < 0) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1062 * raise error() * * def clear(self): # <<<<<<<<<<<<<< * """ Clear the current rendering target with the drawing color. * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_7clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_clear, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_clear, __pyx_t_4) < 0) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1070 * raise error() * * def present(self): # <<<<<<<<<<<<<< * """ Present the composed backbuffer to the screen. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_9present, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_present, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_present, __pyx_t_4) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1078 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< * """ Returns the drawing area on the target. * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_11get_viewport, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_get_viewport, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_get_viewport, __pyx_t_4) < 0) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1120 * # return SDL_RenderGetIntegerScale(self._renderer) * * def set_viewport(self, area): # <<<<<<<<<<<<<< * """ Set the drawing area on the target. * If this is set to ``None``, the entire target will be used. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_13set_viewport, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_set_viewport, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_set_viewport, __pyx_t_4) < 0) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1166 * raise TypeError('target must be a Texture or None') * * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): # <<<<<<<<<<<<<< * """ Only for compatibility. * Textures created by different Renderers cannot shared with each other! */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_15blit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_blit, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__90); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_blit, __pyx_t_4) < 0) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1187 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawLine * res = SDL_RenderDrawLine(self._renderer, */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_17draw_line, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_draw_line, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_draw_line, __pyx_t_4) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1195 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawPoint * res = SDL_RenderDrawPoint(self._renderer, */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_19draw_point, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_draw_point, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_draw_point, __pyx_t_4) < 0) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1202 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_21draw_rect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_draw_rect, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_draw_rect, __pyx_t_4) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1212 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_23fill_rect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_fill_rect, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_fill_rect, __pyx_t_4) < 0) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1223 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< * # https://wiki.libsdl.org/SDL_RenderReadPixels * """ */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_25to_surface, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_to_surface, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__77); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_to_surface, __pyx_t_4) < 0) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "pygame/_sdl2/video.pyx":1294 * return surface * * @staticmethod # <<<<<<<<<<<<<< * def compose_custom_blend_mode(color_mode, alpha_mode): * """ Use this function to compose a custom blend mode.. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_27compose_custom_blend_mode, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer_compose_custom_blend_mo, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_compose_custom_blend_mode, __pyx_t_4) < 0) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_compose_custom_blend_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_compose_custom_blend_mode, __pyx_t_5) < 0) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_29__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer___reduce_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._renderer cannot be converted to a Python object for pickling" */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_31__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Renderer___setstate_cython, NULL, __pyx_n_s_pygame__sdl2_video, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sdl2/video.pyx":1 * from cpython cimport PyObject # <<<<<<<<<<<<<< * from pygame._sdl2.sdl2 import error * from pygame._sdl2.sdl2 import error as errorfnc */ __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sdl2.video", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sdl2.video"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type = NULL, *local_value, *local_tb = NULL; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; #if PY_VERSION_HEX >= 0x030C00A6 local_value = tstate->current_exception; tstate->current_exception = 0; if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 if (unlikely(tstate->current_exception)) #elif CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; #endif } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* pep479 */ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { PyObject *exc, *val, *tb, *cur_exc; __Pyx_PyThreadState_declare #ifdef __Pyx_StopAsyncIteration_USED int is_async_stopiteration = 0; #endif CYTHON_MAYBE_UNUSED_VAR(in_async_gen); cur_exc = PyErr_Occurred(); if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { #ifdef __Pyx_StopAsyncIteration_USED if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) { is_async_stopiteration = 1; } else #endif return; } __Pyx_PyThreadState_assign __Pyx_GetException(&exc, &val, &tb); Py_XDECREF(exc); Py_XDECREF(val); Py_XDECREF(tb); PyErr_SetString(PyExc_RuntimeError, #ifdef __Pyx_StopAsyncIteration_USED is_async_stopiteration ? "async generator raised StopAsyncIteration" : in_async_gen ? "async generator raised StopIteration" : #endif "generator raised StopIteration"); } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; __Pyx_TypeName obj_type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } type_name = __Pyx_PyType_GetName(type); obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); __Pyx_DECREF_TypeName(type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + (unsigned long)b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op2); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - (unsigned long)b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return PyLong_FromLong(-intval); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return -1; __Pyx_PyErr_Clear(); return 0; } return 0; } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } return __Pyx_IterFinish(); } /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_COMPILING_IN_PYPY bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = __Pyx_PyObject_GetIterNextFunc(iter); value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #elif PY_MAJOR_VERSION >= 3 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { PyObject *runerr = NULL; Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); __Pyx_DECREF_TypeName(index_type_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); if (!meth) { PyErr_Clear(); } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; } } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { PyTypeObject *tp = Py_TYPE(obj); PyMappingMethods *mm = tp->tp_as_mapping; PySequenceMethods *sm = tp->tp_as_sequence; if (likely(mm && mm->mp_subscript)) { return mm->mp_subscript(obj, key); } if (likely(sm && sm->sq_item)) { return __Pyx_PyObject_GetIndex(obj, key); } return __Pyx_PyObject_GetItem_Slow(obj, key); } #endif /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; tmp_value = exc_info->exc_value; exc_info->exc_value = *value; if (tmp_value == NULL || tmp_value == Py_None) { Py_XDECREF(tmp_value); tmp_value = NULL; tmp_type = NULL; tmp_tb = NULL; } else { tmp_type = (PyObject*) Py_TYPE(tmp_value); Py_INCREF(tmp_type); #if CYTHON_COMPILING_IN_CPYTHON tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; Py_XINCREF(tmp_tb); #else tmp_tb = PyException_GetTraceback(tmp_value); #endif } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { if (unlikely(PyTuple_Check(key))) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) { PyErr_SetObject(PyExc_KeyError, args); Py_DECREF(args); } } else { PyErr_SetObject(PyExc_KeyError, key); } } return NULL; } Py_INCREF(value); return value; } #endif /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, int wraparound) { __Pyx_TypeName obj_type_name; #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #else CYTHON_UNUSED_VAR(wraparound); #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #else CYTHON_UNUSED_VAR(wraparound); #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); bad: return NULL; } /* SliceObject */ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, int wraparound) { __Pyx_TypeName obj_type_name; #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #else CYTHON_UNUSED_VAR(wraparound); #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #else CYTHON_UNUSED_VAR(wraparound); #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s", obj_type_name, value ? "assignment" : "deletion"); __Pyx_DECREF_TypeName(obj_type_name); bad: return -1; } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (!r) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType_3_0_11 #define __PYX_HAVE_RT_ImportType_3_0_11 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; Py_ssize_t itemsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; PyObject *py_itemsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #if !CYTHON_COMPILING_IN_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; itemsize = ((PyTypeObject *)result)->tp_itemsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); if (!py_itemsize) goto bad; itemsize = PyLong_AsSsize_t(py_itemsize); Py_DECREF(py_itemsize); py_itemsize = 0; if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (itemsize) { if (size % alignment) { alignment = size % alignment; } if (itemsize < (Py_ssize_t)alignment) itemsize = (Py_ssize_t)alignment; } if ((size_t)(basicsize + itemsize) < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize+itemsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd-%zd from PyObject", module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* SetVTable */ static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { PyObject *ob = PyCapsule_New(vtable, 0, 0); if (unlikely(!ob)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) #else if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) #endif goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetVTable */ static void* __Pyx_GetVtable(PyTypeObject *type) { void* ptr; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); #else PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); #endif if (!ob) goto bad; ptr = PyCapsule_GetPointer(ob, 0); if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* MergeVTables */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type) { int i; void** base_vtables; __Pyx_TypeName tp_base_name; __Pyx_TypeName base_name; void* unknown = (void*)-1; PyObject* bases = type->tp_bases; int base_depth = 0; { PyTypeObject* base = type->tp_base; while (base) { base_depth += 1; base = base->tp_base; } } base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); base_vtables[0] = unknown; for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); if (base_vtable != NULL) { int j; PyTypeObject* base = type->tp_base; for (j = 0; j < base_depth; j++) { if (base_vtables[j] == unknown) { base_vtables[j] = __Pyx_GetVtable(base); base_vtables[j + 1] = unknown; } if (base_vtables[j] == base_vtable) { break; } else if (base_vtables[j] == NULL) { goto bad; } base = base->tp_base; } } } PyErr_Clear(); free(base_vtables); return 0; bad: tp_base_name = __Pyx_PyType_GetName(type->tp_base); base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); PyErr_Format(PyExc_TypeError, "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); __Pyx_DECREF_TypeName(tp_base_name); __Pyx_DECREF_TypeName(base_name); free(base_vtables); return -1; } #endif /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__29); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* ImportDottedModule */ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; if (unlikely(PyErr_Occurred())) { PyErr_Clear(); } if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { partial_name = name; } else { slice = PySequence_GetSlice(parts_tuple, 0, count); if (unlikely(!slice)) goto bad; sep = PyUnicode_FromStringAndSize(".", 1); if (unlikely(!sep)) goto bad; partial_name = PyUnicode_Join(sep, slice); } PyErr_Format( #if PY_MAJOR_VERSION < 3 PyExc_ImportError, "No module named '%s'", PyString_AS_STRING(partial_name)); #else #if PY_VERSION_HEX >= 0x030600B1 PyExc_ModuleNotFoundError, #else PyExc_ImportError, #endif "No module named '%U'", partial_name); #endif bad: Py_XDECREF(sep); Py_XDECREF(slice); Py_XDECREF(partial_name); return NULL; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { PyObject *imported_module; #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) return NULL; imported_module = __Pyx_PyDict_GetItemStr(modules, name); Py_XINCREF(imported_module); #else imported_module = PyImport_GetModule(name); #endif return imported_module; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { Py_ssize_t i, nparts; nparts = PyTuple_GET_SIZE(parts_tuple); for (i=1; i < nparts && module; i++) { PyObject *part, *submodule; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS part = PyTuple_GET_ITEM(parts_tuple, i); #else part = PySequence_ITEM(parts_tuple, i); #endif submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(part); #endif Py_DECREF(module); module = submodule; } if (unlikely(!module)) { return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); } return module; } #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 PyObject *module, *from_list, *star = __pyx_n_s__30; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); module = __Pyx_Import(name, from_list, 0); Py_DECREF(from_list); return module; #else PyObject *imported_module; PyObject *module = __Pyx_Import(name, NULL, 0); if (!parts_tuple || unlikely(!module)) return module; imported_module = __Pyx__ImportDottedModule_Lookup(name); if (likely(imported_module)) { Py_DECREF(module); return imported_module; } PyErr_Clear(); return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); #endif } static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); if (likely(module)) { PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); if (likely(spec)) { PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { Py_DECREF(spec); spec = NULL; } Py_XDECREF(unsafe); } if (likely(!spec)) { PyErr_Clear(); return module; } Py_DECREF(spec); Py_DECREF(module); } else if (PyErr_Occurred()) { PyErr_Clear(); } #endif return __Pyx__ImportDottedModule(name, parts_tuple); } /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases; #if CYTHON_ASSUME_SAFE_MACROS nbases = PyTuple_GET_SIZE(bases); #else nbases = PyTuple_Size(bases); if (nbases < 0) return NULL; #endif for (i=0; i < nbases; i++) { PyTypeObject *tmptype; #if CYTHON_ASSUME_SAFE_MACROS PyObject *tmp = PyTuple_GET_ITEM(bases, i); #else PyObject *tmp = PyTuple_GetItem(bases, i); if (!tmp) return NULL; #endif tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectLookupSpecial */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else if (with_error) { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #endif /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs[3] = {NULL, name, bases}; ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_DECREF(prep); } else { if (unlikely(PyErr_Occurred())) return NULL; ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; #if PY_VERSION_HEX >= 0x03030000 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; #else CYTHON_MAYBE_UNUSED_VAR(qualname); #endif if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS static int __Pyx_SetNamesPEP487(PyObject *type_obj) { PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *names_to_set, *key, *value, *set_name, *tmp; Py_ssize_t i = 0; #if CYTHON_USE_TYPE_SLOTS names_to_set = PyDict_Copy(type->tp_dict); #else { PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict); names_to_set = NULL; if (likely(d)) { PyObject *names_to_set = PyDict_New(); int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1; Py_DECREF(d); if (unlikely(ret < 0)) Py_CLEAR(names_to_set); } } #endif if (unlikely(names_to_set == NULL)) goto bad; while (PyDict_Next(names_to_set, &i, &key, &value)) { set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name); if (unlikely(set_name != NULL)) { tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key); Py_DECREF(set_name); if (unlikely(tmp == NULL)) { __Pyx_TypeName value_type_name = __Pyx_PyType_GetName(Py_TYPE(value)); __Pyx_TypeName type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_RuntimeError, #if PY_MAJOR_VERSION >= 3 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'", value_type_name, key, type_name); #else "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'", value_type_name, PyString_Check(key) ? PyString_AS_STRING(key) : "?", type_name); #endif goto bad; } else { Py_DECREF(tmp); } } else if (unlikely(PyErr_Occurred())) { goto bad; } } Py_DECREF(names_to_set); return 0; bad: Py_XDECREF(names_to_set); return -1; } static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) { #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *mro = type->tp_mro; Py_ssize_t i, nbases; if (unlikely(!mro)) goto done; (void) &__Pyx_GetBuiltinName; Py_INCREF(mro); nbases = PyTuple_GET_SIZE(mro); assert(PyTuple_GET_ITEM(mro, 0) == type_obj); for (i = 1; i < nbases-1; i++) { PyObject *base, *dict, *meth; base = PyTuple_GET_ITEM(mro, i); dict = ((PyTypeObject *)base)->tp_dict; meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass); if (unlikely(meth)) { descrgetfunc f = Py_TYPE(meth)->tp_descr_get; PyObject *res; Py_INCREF(meth); if (likely(f)) { res = f(meth, NULL, type_obj); Py_DECREF(meth); if (unlikely(!res)) goto bad; meth = res; } res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw); Py_DECREF(meth); if (unlikely(!res)) goto bad; Py_DECREF(res); goto done; } else if (unlikely(PyErr_Occurred())) { goto bad; } } done: Py_XDECREF(mro); return type_obj; bad: Py_XDECREF(mro); Py_DECREF(type_obj); return NULL; #else PyObject *super_type, *super, *func, *res; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) super_type = __Pyx_GetBuiltinName(__pyx_n_s_super); #else super_type = (PyObject*) &PySuper_Type; (void) &__Pyx_GetBuiltinName; #endif super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) Py_XDECREF(super_type); #endif if (unlikely(!super)) { Py_CLEAR(type_obj); goto done; } func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass); Py_DECREF(super); if (likely(!func)) { if (unlikely(PyErr_Occurred())) Py_CLEAR(type_obj); goto done; } res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw); Py_DECREF(func); if (unlikely(!res)) Py_CLEAR(type_obj); Py_XDECREF(res); done: return type_obj; #endif } #endif static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result; PyObject *owned_metaclass = NULL; PyObject *margs[4] = {NULL, name, bases, dict}; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, #if PY_VERSION_HEX < 0x030600A4 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw #else mkw #endif ); Py_XDECREF(owned_metaclass); #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS if (likely(result) && likely(PyType_Check(result))) { if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) { Py_CLEAR(result); } else { result = __Pyx_InitSubclassPEP487(result, mkw); } } #else (void) &__Pyx_GetBuiltinName; #endif return result; } /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else #if PY_MAJOR_VERSION == 2 static PyTypeObject *methoddescr_type = NULL; if (unlikely(methoddescr_type == NULL)) { PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); if (unlikely(!meth)) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } #else PyTypeObject *methoddescr_type = &PyMethodDescr_Type; #endif if (__Pyx_TypeCheck(method, methoddescr_type)) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else { return PyClassMethod_New(method); } } /* GetNameInClass */ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; PyObject *dict; assert(PyType_Check(nmspace)); #if CYTHON_USE_TYPE_SLOTS dict = ((PyTypeObject*)nmspace)->tp_dict; Py_XINCREF(dict); #else dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict); #endif if (likely(dict)) { result = PyObject_GetItem(dict, name); Py_DECREF(dict); if (result) { return result; } } PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint32(Uint32 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint32) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint32) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint32) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint32) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint32) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint32), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint32)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE Uint8 __Pyx_PyInt_As_Uint8(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint8) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint8, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint8) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint8 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint8) -1; val = __Pyx_PyInt_As_Uint8(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 2 * PyLong_SHIFT)) { return (Uint8) (((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 3 * PyLong_SHIFT)) { return (Uint8) (((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) >= 4 * PyLong_SHIFT)) { return (Uint8) (((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint8) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint8) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint8, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint8) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint8) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { return (Uint8) ((((((Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint8) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint8) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { return (Uint8) ((((((((Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint8) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) (((Uint8)-1)*(((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint8) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint8) - 1 > 4 * PyLong_SHIFT)) { return (Uint8) ((((((((((Uint8)digits[3]) << PyLong_SHIFT) | (Uint8)digits[2]) << PyLong_SHIFT) | (Uint8)digits[1]) << PyLong_SHIFT) | (Uint8)digits[0]))); } } break; } } #endif if ((sizeof(Uint8) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint8) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint8 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint8) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint8) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint8) -1; } else { stepval = v; } v = NULL; val = (Uint8) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint8) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint8) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint8) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint8) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint8) 1) << (sizeof(Uint8) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint8) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint8"); return (Uint8) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint8"); return (Uint8) -1; } /* CIntFromPy */ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(PY_LONG_LONG) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PY_LONG_LONG) val; } } #endif if (unlikely(!PyLong_Check(x))) { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PY_LONG_LONG) -1; val = __Pyx_PyInt_As_PY_LONG_LONG(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } break; case 3: if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } break; case 4: if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PY_LONG_LONG) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; case 2: if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; case -3: if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; case 3: if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; case -4: if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; case 4: if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); } } break; } } #endif if ((sizeof(PY_LONG_LONG) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { PY_LONG_LONG val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (PY_LONG_LONG) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (PY_LONG_LONG) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (PY_LONG_LONG) -1; } else { stepval = v; } v = NULL; val = (PY_LONG_LONG) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((PY_LONG_LONG) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((PY_LONG_LONG) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((PY_LONG_LONG) 1) << (sizeof(PY_LONG_LONG) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (PY_LONG_LONG) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PY_LONG_LONG"); return (PY_LONG_LONG) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(Uint32) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(Uint32, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Uint32) val; } } #endif if (unlikely(!PyLong_Check(x))) { Uint32 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (Uint32) -1; val = __Pyx_PyInt_As_Uint32(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 2 * PyLong_SHIFT)) { return (Uint32) (((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 3 * PyLong_SHIFT)) { return (Uint32) (((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) >= 4 * PyLong_SHIFT)) { return (Uint32) (((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Uint32) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Uint32) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Uint32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Uint32) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 2: if ((8 * sizeof(Uint32) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { return (Uint32) ((((((Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -3: if ((8 * sizeof(Uint32) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 3: if ((8 * sizeof(Uint32) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { return (Uint32) ((((((((Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case -4: if ((8 * sizeof(Uint32) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) (((Uint32)-1)*(((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; case 4: if ((8 * sizeof(Uint32) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Uint32) - 1 > 4 * PyLong_SHIFT)) { return (Uint32) ((((((((((Uint32)digits[3]) << PyLong_SHIFT) | (Uint32)digits[2]) << PyLong_SHIFT) | (Uint32)digits[1]) << PyLong_SHIFT) | (Uint32)digits[0]))); } } break; } } #endif if ((sizeof(Uint32) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(Uint32) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Uint32, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { Uint32 val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Uint32) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Uint32) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Uint32) -1; } else { stepval = v; } v = NULL; val = (Uint32) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Uint32) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Uint32) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Uint32) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Uint32) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Uint32) 1) << (sizeof(Uint32) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Uint32) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Uint32"); return (Uint32) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Uint32"); return (Uint32) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_bool(SDL_bool value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_bool neg_one = (SDL_bool) -1, const_zero = (SDL_bool) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SDL_bool) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SDL_bool) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_bool) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SDL_bool) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_bool) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(SDL_bool), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SDL_bool)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Uint8(Uint8 value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Uint8 neg_one = (Uint8) -1, const_zero = (Uint8) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Uint8) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Uint8) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Uint8) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Uint8) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Uint8), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Uint8)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SDL_BlendMode(SDL_BlendMode value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_BlendMode neg_one = (SDL_BlendMode) -1, const_zero = (SDL_BlendMode) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SDL_BlendMode) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SDL_BlendMode) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_BlendMode) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SDL_BlendMode) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SDL_BlendMode) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(SDL_BlendMode), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SDL_BlendMode)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE SDL_BlendMode __Pyx_PyInt_As_SDL_BlendMode(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_BlendMode neg_one = (SDL_BlendMode) -1, const_zero = (SDL_BlendMode) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(SDL_BlendMode) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SDL_BlendMode) val; } } #endif if (unlikely(!PyLong_Check(x))) { SDL_BlendMode val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SDL_BlendMode) -1; val = __Pyx_PyInt_As_SDL_BlendMode(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(SDL_BlendMode) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) >= 2 * PyLong_SHIFT)) { return (SDL_BlendMode) (((((SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0])); } } break; case 3: if ((8 * sizeof(SDL_BlendMode) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) >= 3 * PyLong_SHIFT)) { return (SDL_BlendMode) (((((((SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0])); } } break; case 4: if ((8 * sizeof(SDL_BlendMode) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) >= 4 * PyLong_SHIFT)) { return (SDL_BlendMode) (((((((((SDL_BlendMode)digits[3]) << PyLong_SHIFT) | (SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SDL_BlendMode) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(SDL_BlendMode) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendMode, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendMode) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(SDL_BlendMode) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendMode) (((SDL_BlendMode)-1)*(((((SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; case 2: if ((8 * sizeof(SDL_BlendMode) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendMode) ((((((SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; case -3: if ((8 * sizeof(SDL_BlendMode) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendMode) (((SDL_BlendMode)-1)*(((((((SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; case 3: if ((8 * sizeof(SDL_BlendMode) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendMode) ((((((((SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; case -4: if ((8 * sizeof(SDL_BlendMode) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendMode) (((SDL_BlendMode)-1)*(((((((((SDL_BlendMode)digits[3]) << PyLong_SHIFT) | (SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; case 4: if ((8 * sizeof(SDL_BlendMode) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendMode) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendMode) ((((((((((SDL_BlendMode)digits[3]) << PyLong_SHIFT) | (SDL_BlendMode)digits[2]) << PyLong_SHIFT) | (SDL_BlendMode)digits[1]) << PyLong_SHIFT) | (SDL_BlendMode)digits[0]))); } } break; } } #endif if ((sizeof(SDL_BlendMode) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendMode, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendMode) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendMode, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { SDL_BlendMode val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (SDL_BlendMode) -1; #endif if (unlikely(ret)) return (SDL_BlendMode) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SDL_BlendMode"); return (SDL_BlendMode) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SDL_BlendMode"); return (SDL_BlendMode) -1; } /* CIntFromPy */ static CYTHON_INLINE SDL_BlendFactor __Pyx_PyInt_As_SDL_BlendFactor(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_BlendFactor neg_one = (SDL_BlendFactor) -1, const_zero = (SDL_BlendFactor) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(SDL_BlendFactor) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SDL_BlendFactor) val; } } #endif if (unlikely(!PyLong_Check(x))) { SDL_BlendFactor val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SDL_BlendFactor) -1; val = __Pyx_PyInt_As_SDL_BlendFactor(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(SDL_BlendFactor) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) >= 2 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((((SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0])); } } break; case 3: if ((8 * sizeof(SDL_BlendFactor) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) >= 3 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((((((SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0])); } } break; case 4: if ((8 * sizeof(SDL_BlendFactor) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) >= 4 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((((((((SDL_BlendFactor)digits[3]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SDL_BlendFactor) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(SDL_BlendFactor) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendFactor, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendFactor) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendFactor, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(SDL_BlendFactor) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((SDL_BlendFactor)-1)*(((((SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; case 2: if ((8 * sizeof(SDL_BlendFactor) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendFactor) ((((((SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; case -3: if ((8 * sizeof(SDL_BlendFactor) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((SDL_BlendFactor)-1)*(((((((SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; case 3: if ((8 * sizeof(SDL_BlendFactor) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendFactor) ((((((((SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; case -4: if ((8 * sizeof(SDL_BlendFactor) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendFactor) (((SDL_BlendFactor)-1)*(((((((((SDL_BlendFactor)digits[3]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; case 4: if ((8 * sizeof(SDL_BlendFactor) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendFactor, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendFactor) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendFactor) ((((((((((SDL_BlendFactor)digits[3]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[2]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[1]) << PyLong_SHIFT) | (SDL_BlendFactor)digits[0]))); } } break; } } #endif if ((sizeof(SDL_BlendFactor) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendFactor, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendFactor) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendFactor, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { SDL_BlendFactor val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (SDL_BlendFactor) -1; #endif if (unlikely(ret)) return (SDL_BlendFactor) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SDL_BlendFactor"); return (SDL_BlendFactor) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SDL_BlendFactor"); return (SDL_BlendFactor) -1; } /* CIntFromPy */ static CYTHON_INLINE SDL_BlendOperation __Pyx_PyInt_As_SDL_BlendOperation(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SDL_BlendOperation neg_one = (SDL_BlendOperation) -1, const_zero = (SDL_BlendOperation) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(SDL_BlendOperation) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SDL_BlendOperation) val; } } #endif if (unlikely(!PyLong_Check(x))) { SDL_BlendOperation val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SDL_BlendOperation) -1; val = __Pyx_PyInt_As_SDL_BlendOperation(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(SDL_BlendOperation) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) >= 2 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((((SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0])); } } break; case 3: if ((8 * sizeof(SDL_BlendOperation) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) >= 3 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((((((SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0])); } } break; case 4: if ((8 * sizeof(SDL_BlendOperation) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) >= 4 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((((((((SDL_BlendOperation)digits[3]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SDL_BlendOperation) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(SDL_BlendOperation) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendOperation, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendOperation) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendOperation, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(SDL_BlendOperation) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((SDL_BlendOperation)-1)*(((((SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; case 2: if ((8 * sizeof(SDL_BlendOperation) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 2 * PyLong_SHIFT)) { return (SDL_BlendOperation) ((((((SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; case -3: if ((8 * sizeof(SDL_BlendOperation) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((SDL_BlendOperation)-1)*(((((((SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; case 3: if ((8 * sizeof(SDL_BlendOperation) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 3 * PyLong_SHIFT)) { return (SDL_BlendOperation) ((((((((SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; case -4: if ((8 * sizeof(SDL_BlendOperation) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendOperation) (((SDL_BlendOperation)-1)*(((((((((SDL_BlendOperation)digits[3]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; case 4: if ((8 * sizeof(SDL_BlendOperation) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(SDL_BlendOperation, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(SDL_BlendOperation) - 1 > 4 * PyLong_SHIFT)) { return (SDL_BlendOperation) ((((((((((SDL_BlendOperation)digits[3]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[2]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[1]) << PyLong_SHIFT) | (SDL_BlendOperation)digits[0]))); } } break; } } #endif if ((sizeof(SDL_BlendOperation) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendOperation, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(SDL_BlendOperation) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(SDL_BlendOperation, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { SDL_BlendOperation val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (SDL_BlendOperation) -1; #endif if (unlikely(ret)) return (SDL_BlendOperation) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SDL_BlendOperation"); return (SDL_BlendOperation) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SDL_BlendOperation"); return (SDL_BlendOperation) -1; } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__104); } return name; } #endif /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_GetMethod; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* CoroutineBase */ #include #if PY_VERSION_HEX >= 0x030b00a6 #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; CYTHON_UNUSED_VAR(__pyx_tstate); __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); value = Py_None; } #if PY_VERSION_HEX >= 0x030300A0 else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); } #endif else if (unlikely(PyTuple_Check(ev))) { if (PyTuple_GET_SIZE(ev) >= 1) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #else value = PySequence_ITEM(ev, 0); #endif } else { Py_INCREF(Py_None); value = Py_None; } Py_DECREF(ev); } else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { value = ev; } if (likely(value)) { Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { #if PY_VERSION_HEX >= 0x030B00a4 Py_CLEAR(exc_state->exc_value); #else PyObject *t, *v, *tb; t = exc_state->exc_type; v = exc_state->exc_value; tb = exc_state->exc_traceback; exc_state->exc_type = NULL; exc_state->exc_value = NULL; exc_state->exc_traceback = NULL; Py_XDECREF(t); Py_XDECREF(v); Py_XDECREF(tb); #endif } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { const char *msg; CYTHON_MAYBE_UNUSED_VAR(gen); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { msg = "async generator already executing"; #endif } else { msg = "generator already executing"; } PyErr_SetString(PyExc_ValueError, msg); } #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_NotStartedError(PyObject *gen) { const char *msg; CYTHON_MAYBE_UNUSED_VAR(gen); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(gen)) { msg = "can't send non-None value to a just-started coroutine"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(gen)) { msg = "can't send non-None value to a just-started async generator"; #endif } else { msg = "can't send non-None value to a just-started generator"; } PyErr_SetString(PyExc_TypeError, msg); } #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { CYTHON_MAYBE_UNUSED_VAR(gen); CYTHON_MAYBE_UNUSED_VAR(closing); #ifdef __Pyx_Coroutine_USED if (!closing && __Pyx_Coroutine_Check(gen)) { PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); } else #endif if (value) { #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); else #endif PyErr_SetNone(PyExc_StopIteration); } } static PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { return __Pyx_Coroutine_NotStartedError((PyObject*)self); } } if (unlikely(self->resume_label == -1)) { return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign tstate = __pyx_tstate; #else tstate = __Pyx_PyThreadState_Current; #endif exc_state = &self->gi_exc_state; if (exc_state->exc_value) { #if CYTHON_COMPILING_IN_PYPY #else PyObject *exc_tb; #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON exc_tb = PyException_GetTraceback(exc_state->exc_value); #elif PY_VERSION_HEX >= 0x030B00a4 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; #else exc_tb = exc_state->exc_traceback; #endif if (exc_tb) { PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; assert(f->f_back == NULL); #if PY_VERSION_HEX >= 0x030B00A1 f->f_back = PyThreadState_GetFrame(tstate); #else Py_XINCREF(tstate->frame); f->f_back = tstate->frame; #endif #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON Py_DECREF(exc_tb); #endif } #endif } #if CYTHON_USE_EXC_INFO_STACK exc_state->previous_item = tstate->exc_info; tstate->exc_info = exc_state; #else if (exc_state->exc_type) { __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(exc_state); __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } #endif self->is_running = 1; retval = self->body(self, tstate, value); self->is_running = 0; #if CYTHON_USE_EXC_INFO_STACK exc_state = &self->gi_exc_state; tstate->exc_info = exc_state->previous_item; exc_state->previous_item = NULL; __Pyx_Coroutine_ResetFrameBackpointer(exc_state); #endif return retval; } static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { #if CYTHON_COMPILING_IN_PYPY CYTHON_UNUSED_VAR(exc_state); #else PyObject *exc_tb; #if PY_VERSION_HEX >= 0x030B00a4 if (!exc_state->exc_value) return; exc_tb = PyException_GetTraceback(exc_state->exc_value); #else exc_tb = exc_state->exc_traceback; #endif if (likely(exc_tb)) { PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #if PY_VERSION_HEX >= 0x030B00a4 Py_DECREF(exc_tb); #endif } #endif } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) { CYTHON_MAYBE_UNUSED_VAR(gen); if (unlikely(!retval)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (!__Pyx_PyErr_Occurred()) { PyObject *exc = PyExc_StopIteration; #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) exc = __Pyx_PyExc_StopAsyncIteration; #endif __Pyx_PyErr_SetNone(exc); } } return retval; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) static CYTHON_INLINE PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { #if PY_VERSION_HEX <= 0x030A00A1 return _PyGen_Send(gen, arg); #else PyObject *result; if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { if (PyAsyncGen_CheckExact(gen)) { assert(result == Py_None); PyErr_SetNone(PyExc_StopAsyncIteration); } else if (result == Py_None) { PyErr_SetNone(PyExc_StopIteration); } else { #if PY_VERSION_HEX < 0x030d00A1 _PyGen_SetStopIterationValue(result); #else if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { PyErr_SetObject(PyExc_StopIteration, result); } else { PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); if (likely(exc != NULL)) { PyErr_SetObject(PyExc_StopIteration, exc); Py_DECREF(exc); } } #endif } Py_DECREF(result); result = NULL; } return result; #endif } #endif static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); ret = __Pyx_Coroutine_SendEx(gen, val, 0); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { ret = __Pyx_async_gen_asend_send(yf, value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyCoro_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif { if (value == Py_None) ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value, 0); } return __Pyx_Coroutine_MethodReturn(self, retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); if (!retval) return -1; } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { retval = __Pyx_async_gen_asend_close(yf, NULL); } else if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { retval = __Pyx_async_gen_athrow_close(yf, NULL); } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (unlikely(PyErr_Occurred())) { PyErr_WriteUnraisable(yf); } } else { retval = __Pyx_PyObject_CallNoArg(meth); Py_DECREF(meth); if (unlikely(!retval)) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Next(yf); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, Py_None); } else #endif ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None, 0); } static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { CYTHON_UNUSED_VAR(arg); return __Pyx_Coroutine_Close(self); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); if (unlikely(retval)) { const char *msg; Py_DECREF(retval); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(self)) { msg = "coroutine ignored GeneratorExit"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(self)) { #if PY_VERSION_HEX < 0x03060000 msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; #else msg = "async generator ignored GeneratorExit"; #endif #endif } else { msg = "generator ignored GeneratorExit"; } PyErr_SetString(PyExc_RuntimeError, msg); return NULL; } raised_exception = PyErr_Occurred(); if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, PyObject *args, int close_on_genexit) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; Py_INCREF(yf); if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); goto throw_here; } gen->is_running = 1; if (0 #ifdef __Pyx_Generator_USED || __Pyx_Generator_CheckExact(yf) #endif #ifdef __Pyx_Coroutine_USED || __Pyx_Coroutine_Check(yf) #endif ) { ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); #ifdef __Pyx_Coroutine_USED } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); #endif } else { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (unlikely(PyErr_Occurred())) { gen->is_running = 0; return NULL; } __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } if (likely(args)) { ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(self, ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { PyObject *typ; PyObject *val = NULL; PyObject *tb = NULL; if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))) return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { #if PY_VERSION_HEX >= 0x030B00a4 Py_VISIT(exc_state->exc_value); #else Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); Py_VISIT(exc_state->exc_traceback); #endif return 0; } static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); } #endif Py_CLEAR(gen->gi_code); Py_CLEAR(gen->gi_frame); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label >= 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE if (unlikely(PyObject_CallFinalizerFromDealloc(self))) #else Py_TYPE(gen)->tp_del(self); if (unlikely(Py_REFCNT(self) > 0)) #endif { return; } PyObject_GC_UnTrack(self); } #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { /* We have to handle this case for asynchronous generators right here, because this code has to be between UNTRACK and GC_Del. */ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); } #endif __Pyx_Coroutine_clear(self); __Pyx_PyHeapTypeObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PyThreadState_declare if (gen->resume_label < 0) { return; } #if !CYTHON_USE_TP_FINALIZE assert(self->ob_refcnt == 0); __Pyx_SET_REFCNT(self, 1); #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; PyObject *finalizer = agen->ag_finalizer; if (finalizer && !agen->ag_closed) { PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); if (unlikely(!res)) { PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } __Pyx_ErrRestore(error_type, error_value, error_traceback); return; } } #endif if (unlikely(gen->resume_label == 0 && !error_value)) { #ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Generator_USED if (!__Pyx_Generator_CheckExact(self)) #endif { PyObject_GC_UnTrack(self); #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) PyErr_WriteUnraisable(self); #else {PyObject *msg; char *cmsg; #if CYTHON_COMPILING_IN_PYPY msg = NULL; cmsg = (char*) "coroutine was never awaited"; #else char *cname; PyObject *qualname; qualname = gen->gi_qualname; cname = PyString_AS_STRING(qualname); msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); if (unlikely(!msg)) { PyErr_Clear(); cmsg = (char*) "coroutine was never awaited"; } else { cmsg = PyString_AS_STRING(msg); } #endif if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) PyErr_WriteUnraisable(self); Py_XDECREF(msg);} #endif PyObject_GC_Track(self); } #endif } else { PyObject *res = __Pyx_Coroutine_Close(self); if (unlikely(!res)) { if (PyErr_Occurred()) PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } } __Pyx_ErrRestore(error_type, error_value, error_traceback); #if !CYTHON_USE_TP_FINALIZE assert(Py_REFCNT(self) > 0); if (likely(--self->ob_refcnt == 0)) { return; } { Py_ssize_t refcnt = Py_REFCNT(self); _Py_NewReference(self); __Pyx_SET_REFCNT(self, refcnt); } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(Py_TYPE(self)) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) { PyObject *name = self->gi_name; CYTHON_UNUSED_VAR(context); if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(self->gi_name, value); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) { PyObject *name = self->gi_qualname; CYTHON_UNUSED_VAR(context); if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } static PyObject * __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { PyObject *frame = self->gi_frame; CYTHON_UNUSED_VAR(context); if (!frame) { if (unlikely(!self->gi_code)) { Py_RETURN_NONE; } frame = (PyObject *) PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (unlikely(!frame)) return NULL; self->gi_frame = frame; } Py_INCREF(frame); return frame; } static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (unlikely(!gen)) return NULL; return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); } static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; #if PY_VERSION_HEX >= 0x030B00a4 gen->gi_exc_state.exc_value = NULL; #else gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; gen->gi_exc_state.exc_traceback = NULL; #endif #if CYTHON_USE_EXC_INFO_STACK gen->gi_exc_state.previous_item = NULL; #endif gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; Py_XINCREF(module_name); gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; gen->gi_frame = NULL; PyObject_GC_Track(gen); return gen; } /* PatchModuleWithCoroutine */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } /* PatchGeneratorABC */ #ifndef CYTHON_REGISTER_ABCS #define CYTHON_REGISTER_ABCS 1 #endif #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (CYTHON_REGISTER_ABCS && !abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); if (unlikely(!module)) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_MAJOR_VERSION >= 3) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } /* Generator */ static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, #if CYTHON_USE_TYPE_SPECS {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, #endif {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, (char*) PyDoc_STR("Frame of the generator"), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_GeneratorType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, {Py_tp_iter, (void *)PyObject_SelfIter}, {Py_tp_iternext, (void *)__Pyx_Generator_Next}, {Py_tp_methods, (void *)__pyx_Generator_methods}, {Py_tp_members, (void *)__pyx_Generator_memberlist}, {Py_tp_getset, (void *)__pyx_Generator_getsets}, {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict}, #if CYTHON_USE_TP_FINALIZE {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, #endif {0, 0}, }; static PyType_Spec __pyx_GeneratorType_spec = { __PYX_TYPE_MODULE_PREFIX "generator", sizeof(__pyx_CoroutineObject), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, __pyx_GeneratorType_slots }; #else static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if CYTHON_USE_TP_FINALIZE 0, #else __Pyx_Coroutine_del, #endif 0, #if CYTHON_USE_TP_FINALIZE __Pyx_Coroutine_del, #elif PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_Generator_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); #endif if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } /* CheckBinaryVersion */ static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612187.6481278 pygame-2.6.1/src_c/_sprite.c0000644000175100001770000737167114676242434015353 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame._sprite", "sources": [ "src_c/cython/pygame/_sprite.pyx" ] }, "module_name": "pygame._sprite" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) #else #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) #endif #if PY_MAJOR_VERSION <= 2 #define PyDict_GetItemWithError _PyDict_GetItemWithError #endif #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get) #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) #endif #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame___sprite #define __PYX_HAVE_API__pygame___sprite /* Early includes */ #include #include #include #include "pythread.h" #include "_pygame.h" #include "SDL.h" #include "pygame.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/_sprite.pyx", "", "contextvars.pxd", "type.pxd", "bool.pxd", "complex.pxd", "src_c/cython/pygame/_sdl2/video.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_5_sdl2_5video_Window; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer; struct __pyx_obj_6pygame_5_sdl2_5video_Texture; struct __pyx_obj_6pygame_5_sdl2_5video_Image; struct __pyx_obj_6pygame_7_sprite_Sprite; struct __pyx_obj_6pygame_7_sprite_AbstractGroup; struct __pyx_obj_6pygame_7_sprite_Group; struct __pyx_obj_6pygame_7_sprite_RenderUpdates; struct __pyx_obj_6pygame_7_sprite_OrderedUpdates; struct __pyx_obj_6pygame_7_sprite_LayeredUpdates; struct __pyx_obj_6pygame_7_sprite_LayeredDirty; struct __pyx_obj_6pygame_7_sprite_GroupSingle; struct __pyx_opt_args_7cpython_11contextvars_get_value; struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ struct __pyx_opt_args_7cpython_11contextvars_get_value { int __pyx_n; PyObject *default_value; }; /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { int __pyx_n; PyObject *default_value; }; struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw; struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw; /* "_sdl2/video.pxd":421 * * cpdef object get_viewport(self) * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) # <<<<<<<<<<<<<< * * cdef class Texture: */ struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit { int __pyx_n; pgRectObject *dest; pgRectObject *area; int special_flags; }; /* "_sdl2/video.pxd":430 * cdef readonly int height * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, # <<<<<<<<<<<<<< * bint flip_x=*, bint flip_y=*) * cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, */ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal { int __pyx_n; float angle; SDL_Point *originptr; int flip_x; int flip_y; }; /* "_sdl2/video.pxd":432 * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, * bint flip_x=*, bint flip_y=*) * cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, # <<<<<<<<<<<<<< * bint flip_x=*, bint flip_y=*) noexcept * */ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw { int __pyx_n; PyObject *srcrect; PyObject *dstrect; float angle; PyObject *origin; int flip_x; int flip_y; }; /* "_sdl2/video.pxd":448 * cdef public Rect srcrect * * cpdef void draw(self, srcrect=*, dstrect=*) noexcept # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw { int __pyx_n; PyObject *srcrect; PyObject *dstrect; }; struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal; struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal; /* "pygame/_sprite.pyx":700 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal { int __pyx_n; PyObject *layer; }; /* "pygame/_sprite.pyx":1062 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal { int __pyx_n; PyObject *layer; }; /* "_sdl2/video.pxd":409 * * * cdef class Window: # <<<<<<<<<<<<<< * cdef SDL_Window* _win * cdef int _is_borrowed */ struct __pyx_obj_6pygame_5_sdl2_5video_Window { PyObject_HEAD SDL_Window *_win; int _is_borrowed; }; /* "_sdl2/video.pxd":413 * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer * cdef Color _draw_color */ struct __pyx_obj_6pygame_5_sdl2_5video_Renderer { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtab; SDL_Renderer *_renderer; pgColorObject *_draw_color; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *_target; struct __pyx_obj_6pygame_5_sdl2_5video_Window *_win; int _is_borrowed; }; /* "_sdl2/video.pxd":423 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< * cdef SDL_Texture* _tex * cdef Color _color */ struct __pyx_obj_6pygame_5_sdl2_5video_Texture { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtab; SDL_Texture *_tex; pgColorObject *_color; struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *renderer; int width; int height; }; /* "_sdl2/video.pxd":435 * bint flip_x=*, bint flip_y=*) noexcept * * cdef class Image: # <<<<<<<<<<<<<< * cdef Color _color * cdef public float angle */ struct __pyx_obj_6pygame_5_sdl2_5video_Image { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtab; pgColorObject *_color; float angle; SDL_Point _origin; SDL_Point *_originptr; int flip_x; int flip_y; float alpha; SDL_BlendMode blend_mode; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *texture; pgRectObject *srcrect; }; /* "pygame/_sprite.pyx":127 * * * cdef class Sprite: # <<<<<<<<<<<<<< * """simple base class for visible game objects * */ struct __pyx_obj_6pygame_7_sprite_Sprite { PyObject_HEAD struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *__pyx_vtab; PyObject *_Sprite__g; PyObject *image; pgRectObject *rect; PyObject *__dict__; }; /* "pygame/_sprite.pyx":124 * from ._sdl2.video cimport * * * cdef class AbstractGroup # <<<<<<<<<<<<<< * * */ struct __pyx_obj_6pygame_7_sprite_AbstractGroup { PyObject_HEAD struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *__pyx_vtab; PyObject *spritedict; PyObject *lostsprites; }; /* "pygame/_sprite.pyx":577 * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * * cdef class Group(AbstractGroup): # <<<<<<<<<<<<<< * """container class for many Sprites * */ struct __pyx_obj_6pygame_7_sprite_Group { struct __pyx_obj_6pygame_7_sprite_AbstractGroup __pyx_base; }; /* "pygame/_sprite.pyx":603 * RenderClear = Group * * cdef class RenderUpdates(Group): # <<<<<<<<<<<<<< * """Group class that tracks dirty updates * */ struct __pyx_obj_6pygame_7_sprite_RenderUpdates { struct __pyx_obj_6pygame_7_sprite_Group __pyx_base; }; /* "pygame/_sprite.pyx":632 * return dirty * * cdef class OrderedUpdates(RenderUpdates): # <<<<<<<<<<<<<< * """RenderUpdates class that draws Sprites in order of addition * */ struct __pyx_obj_6pygame_7_sprite_OrderedUpdates { struct __pyx_obj_6pygame_7_sprite_RenderUpdates __pyx_base; PyObject *_spritelist; }; /* "pygame/_sprite.pyx":662 * * * cdef class LayeredUpdates(AbstractGroup): # <<<<<<<<<<<<<< * """LayeredUpdates Group handles layers, which are drawn like OrderedUpdates * */ struct __pyx_obj_6pygame_7_sprite_LayeredUpdates { struct __pyx_obj_6pygame_7_sprite_AbstractGroup __pyx_base; PyObject *_spritelayers; PyObject *_spritelist; int _default_layer; }; /* "pygame/_sprite.pyx":1003 * * * cdef class LayeredDirty(LayeredUpdates): # <<<<<<<<<<<<<< * """LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates * */ struct __pyx_obj_6pygame_7_sprite_LayeredDirty { struct __pyx_obj_6pygame_7_sprite_LayeredUpdates __pyx_base; pgRectObject *_clip; int _use_update; float _time_threshold; PyObject *_bgd; }; /* "pygame/_sprite.pyx":1307 * * * cdef class GroupSingle(AbstractGroup): # <<<<<<<<<<<<<< * """A group container that holds a single most recent item. * */ struct __pyx_obj_6pygame_7_sprite_GroupSingle { struct __pyx_obj_6pygame_7_sprite_AbstractGroup __pyx_base; PyObject *_GroupSingle__sprite; }; /* "_sdl2/video.pxd":413 * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer * cdef Color _draw_color */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer { PyObject *(*get_viewport)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, int __pyx_skip_dispatch); PyObject *(*blit)(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer; /* "_sdl2/video.pxd":423 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< * cdef SDL_Texture* _tex * cdef Color _color */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture { PyObject *(*draw_internal)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, SDL_Rect *, SDL_Rect *, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal *__pyx_optional_args); void (*draw)(struct __pyx_obj_6pygame_5_sdl2_5video_Texture *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtabptr_6pygame_5_sdl2_5video_Texture; /* "_sdl2/video.pxd":435 * bint flip_x=*, bint flip_y=*) noexcept * * cdef class Image: # <<<<<<<<<<<<<< * cdef Color _color * cdef public float angle */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image { void (*draw)(struct __pyx_obj_6pygame_5_sdl2_5video_Image *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtabptr_6pygame_5_sdl2_5video_Image; /* "pygame/_sprite.pyx":314 * * * cdef class AbstractGroup: # <<<<<<<<<<<<<< * """base class for containers of sprites * */ struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup { PyObject *(*sprites)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch); void (*add_internal)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch); void (*remove_internal)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch); int (*has_internal)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; /* "pygame/_sprite.pyx":127 * * * cdef class Sprite: # <<<<<<<<<<<<<< * """simple base class for visible game objects * */ struct __pyx_vtabstruct_6pygame_7_sprite_Sprite { void (*add_internal)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch); void (*remove_internal)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *__pyx_vtabptr_6pygame_7_sprite_Sprite; /* "pygame/_sprite.pyx":577 * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * * cdef class Group(AbstractGroup): # <<<<<<<<<<<<<< * """container class for many Sprites * */ struct __pyx_vtabstruct_6pygame_7_sprite_Group { struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup __pyx_base; }; static struct __pyx_vtabstruct_6pygame_7_sprite_Group *__pyx_vtabptr_6pygame_7_sprite_Group; /* "pygame/_sprite.pyx":603 * RenderClear = Group * * cdef class RenderUpdates(Group): # <<<<<<<<<<<<<< * """Group class that tracks dirty updates * */ struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates { struct __pyx_vtabstruct_6pygame_7_sprite_Group __pyx_base; }; static struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates *__pyx_vtabptr_6pygame_7_sprite_RenderUpdates; /* "pygame/_sprite.pyx":632 * return dirty * * cdef class OrderedUpdates(RenderUpdates): # <<<<<<<<<<<<<< * """RenderUpdates class that draws Sprites in order of addition * */ struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates { struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates __pyx_base; }; static struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates *__pyx_vtabptr_6pygame_7_sprite_OrderedUpdates; /* "pygame/_sprite.pyx":662 * * * cdef class LayeredUpdates(AbstractGroup): # <<<<<<<<<<<<<< * """LayeredUpdates Group handles layers, which are drawn like OrderedUpdates * */ struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates { struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup __pyx_base; void (*add_internal)(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *__pyx_vtabptr_6pygame_7_sprite_LayeredUpdates; /* "pygame/_sprite.pyx":1003 * * * cdef class LayeredDirty(LayeredUpdates): # <<<<<<<<<<<<<< * """LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates * */ struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty { struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates __pyx_base; }; static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty *__pyx_vtabptr_6pygame_7_sprite_LayeredDirty; /* "pygame/_sprite.pyx":1307 * * * cdef class GroupSingle(AbstractGroup): # <<<<<<<<<<<<<< * """A group container that holds a single most recent item. * */ struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle { struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup __pyx_base; }; static struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle *__pyx_vtabptr_6pygame_7_sprite_GroupSingle; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* pyfrozenset_new.proto */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); /* py_set_remove.proto */ static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* set_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, Py_ssize_t* p_orig_length, int* p_source_is_set); static CYTHON_INLINE int __Pyx_set_iter_next( PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject **value, int source_is_set); /* RaiseUnexpectedTypeError.proto */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* SliceObject.proto */ #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ (likely(is_tuple || PyTuple_Check(tuple)) ?\ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; /* CallUnboundCMethod1.proto */ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #else #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif /* CallUnboundCMethod2.proto */ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); #else #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2)) #endif /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* py_dict_values.proto */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /* CallUnboundCMethod0.proto */ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CallUnboundCMethod0(cfunc, self)\ (likely((cfunc)->func) ?\ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ (PY_VERSION_HEX >= 0x030700A0 ?\ (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif /* py_dict_pop.proto */ static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value); /* StrEquals.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif /* PyIntCompare.proto */ static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* IncludeStructmemberH.proto */ #include /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 #define __PYX_HAVE_RT_ImportType_proto_3_0_11 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) #else #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) #endif enum __Pyx_ImportType_CheckSize_3_0_11 { __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 }; static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); #endif /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetVTable.proto */ static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); /* GetVTable.proto */ static void* __Pyx_GetVtable(PyTypeObject *type); /* MergeVTables.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type); #endif /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportDottedModule.proto */ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); #endif /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* Py3UpdateBases.proto */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* PyObjectCall2Args.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); #else #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args); /* proto*/ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal__pyx_wrap_1(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal *__pyx_optional_args); /* proto*/ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal__pyx_wrap_1(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch); /* proto*/ /* Module declarations from "cpython.version" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.type" */ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "cpython.object" */ /* Module declarations from "cpython.ref" */ /* Module declarations from "cpython.exc" */ /* Module declarations from "cpython.module" */ /* Module declarations from "cpython.mem" */ /* Module declarations from "cpython.tuple" */ /* Module declarations from "cpython.list" */ /* Module declarations from "cpython.sequence" */ /* Module declarations from "cpython.mapping" */ /* Module declarations from "cpython.iterator" */ /* Module declarations from "cpython.number" */ /* Module declarations from "cpython.int" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.bool" */ /* Module declarations from "cpython.long" */ /* Module declarations from "cpython.float" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.complex" */ /* Module declarations from "cpython.string" */ /* Module declarations from "libc.stddef" */ /* Module declarations from "cpython.unicode" */ /* Module declarations from "cpython.pyport" */ /* Module declarations from "cpython.dict" */ /* Module declarations from "cpython.instance" */ /* Module declarations from "cpython.function" */ /* Module declarations from "cpython.method" */ /* Module declarations from "cpython.weakref" */ /* Module declarations from "cpython.getargs" */ /* Module declarations from "cpython.pythread" */ /* Module declarations from "cpython.pystate" */ /* Module declarations from "cpython.cobject" */ /* Module declarations from "cpython.oldbuffer" */ /* Module declarations from "cpython.set" */ /* Module declarations from "cpython.buffer" */ /* Module declarations from "cpython.bytes" */ /* Module declarations from "cpython.pycapsule" */ /* Module declarations from "cpython.contextvars" */ /* Module declarations from "cpython" */ /* Module declarations from "pygame" */ /* Module declarations from "pygame._sdl2.sdl2" */ /* Module declarations from "pygame" */ /* Module declarations from "pygame._sdl2.video" */ /* Module declarations from "pygame._sprite" */ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame._sprite" extern int __pyx_module_is_main_pygame___sprite; int __pyx_module_is_main_pygame___sprite = 0; /* Implementation of "pygame._sprite" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_AttributeError; /* #### Code section: string_decls ### */ static const char __pyx_k_c[] = "c"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_r[] = "r"; static const char __pyx_k_s[] = "s"; static const char __pyx_k_SC[] = "SC"; static const char __pyx_k__2[] = "*"; static const char __pyx_k__3[] = "."; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_add[] = "add"; static const char __pyx_k_bgd[] = "bgd"; static const char __pyx_k_doc[] = "doc"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_has[] = "has"; static const char __pyx_k_idx[] = "idx"; static const char __pyx_k_low[] = "low"; static const char __pyx_k_mid[] = "mid"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_pop[] = "pop"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_rec[] = "rec"; static const char __pyx_k_ret[] = "ret"; static const char __pyx_k_spr[] = "spr"; static const char __pyx_k_val[] = "val"; static const char __pyx_k_Rect[] = "Rect"; static const char __pyx_k__135[] = "?"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_blit[] = "blit"; static const char __pyx_k_call[] = "__call__"; static const char __pyx_k_clip[] = "clip"; static const char __pyx_k_copy[] = "copy"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_draw[] = "draw"; static const char __pyx_k_high[] = "high"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_kill[] = "kill"; static const char __pyx_k_left[] = "left"; static const char __pyx_k_leng[] = "leng"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mask[] = "mask"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_rect[] = "rect"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_spec[] = "__spec__"; static const char __pyx_k_surf[] = "_surf"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_Group[] = "Group"; static const char __pyx_k_alive[] = "alive"; static const char __pyx_k_bgd_2[] = "_bgd"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_dirty[] = "dirty"; static const char __pyx_k_doc_2[] = "__doc__"; static const char __pyx_k_empty[] = "empty"; static const char __pyx_k_group[] = "group"; static const char __pyx_k_image[] = "image"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_layer[] = "_layer"; static const char __pyx_k_ratio[] = "ratio"; static const char __pyx_k_ret_2[] = "_ret"; static const char __pyx_k_right[] = "right"; static const char __pyx_k_super[] = "super"; static const char __pyx_k_union[] = "union"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_width[] = "width"; static const char __pyx_k_Sprite[] = "Sprite"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_clip_2[] = "_clip"; static const char __pyx_k_dokill[] = "dokill"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_groupa[] = "groupa"; static const char __pyx_k_groupb[] = "groupb"; static const char __pyx_k_groups[] = "groups"; static const char __pyx_k_height[] = "height"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_lambda[] = ""; static const char __pyx_k_layers[] = "layers"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_object[] = "object"; static const char __pyx_k_pygame[] = "pygame"; static const char __pyx_k_radius[] = "radius"; static const char __pyx_k_rect_2[] = "_rect"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_remove[] = "remove"; static const char __pyx_k_sprite[] = "sprite"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_centerx[] = "centerx"; static const char __pyx_k_centery[] = "centery"; static const char __pyx_k_crashed[] = "crashed"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_display[] = "display"; static const char __pyx_k_dokilla[] = "dokilla"; static const char __pyx_k_dokillb[] = "dokillb"; static const char __pyx_k_inflate[] = "inflate"; static const char __pyx_k_layer_2[] = "layer"; static const char __pyx_k_newrect[] = "newrect"; static const char __pyx_k_overlap[] = "overlap"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_sprites[] = "sprites"; static const char __pyx_k_surface[] = "surface"; static const char __pyx_k_time_ms[] = "time_ms"; static const char __pyx_k_topleft[] = "topleft"; static const char __pyx_k_visible[] = "_visible"; static const char __pyx_k_xoffset[] = "xoffset"; static const char __pyx_k_yoffset[] = "yoffset"; static const char __pyx_k_builtins[] = "__builtins__"; static const char __pyx_k_callable[] = "callable"; static const char __pyx_k_collided[] = "collided"; static const char __pyx_k_contains[] = "__contains__"; static const char __pyx_k_end_time[] = "end_time"; static const char __pyx_k_get_clip[] = "get_clip"; static const char __pyx_k_get_rect[] = "get_rect"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_layer_nr[] = "layer_nr"; static const char __pyx_k_leftmask[] = "leftmask"; static const char __pyx_k_leftrect[] = "leftrect"; static const char __pyx_k_old_rect[] = "_old_rect"; static const char __pyx_k_property[] = "property"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_set_clip[] = "set_clip"; static const char __pyx_k_set_name[] = "__set_name__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_spr_rect[] = "_spr_rect"; static const char __pyx_k_sprites1[] = "sprites1"; static const char __pyx_k_union_ip[] = "union_ip"; static const char __pyx_k_update_2[] = "_update"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_blendmode[] = "blendmode"; static const char __pyx_k_colliding[] = "colliding"; static const char __pyx_k_get_ticks[] = "get_ticks"; static const char __pyx_k_init_rect[] = "_init_rect"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_layer1_nr[] = "layer1_nr"; static const char __pyx_k_layer2_nr[] = "layer2_nr"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_new_layer[] = "new_layer"; static const char __pyx_k_orig_clip[] = "_orig_clip"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_rightmask[] = "rightmask"; static const char __pyx_k_rightrect[] = "rightrect"; static const char __pyx_k_sprites_2[] = "_sprites"; static const char __pyx_k_surf_blit[] = "_surf_blit"; static const char __pyx_k_visible_2[] = "visible"; static const char __pyx_k_xdistance[] = "xdistance"; static const char __pyx_k_ydistance[] = "ydistance"; static const char __pyx_k_Sprite_add[] = "Sprite.add"; static const char __pyx_k_get_sprite[] = "get_sprite"; static const char __pyx_k_leftradius[] = "leftradius"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_set_sprite[] = "_set_sprite"; static const char __pyx_k_spritedict[] = "spritedict"; static const char __pyx_k_start_time[] = "start_time"; static const char __pyx_k_union_rect[] = "_union_rect"; static const char __pyx_k_use_update[] = "_use_update"; static const char __pyx_k_DirtySprite[] = "DirtySprite"; static const char __pyx_k_GroupSingle[] = "GroupSingle"; static const char __pyx_k_RenderClear[] = "RenderClear"; static const char __pyx_k_RenderPlain[] = "RenderPlain"; static const char __pyx_k_Sprite_kill[] = "Sprite.kill"; static const char __pyx_k_collidelist[] = "collidelist"; static const char __pyx_k_colliderect[] = "colliderect"; static const char __pyx_k_get_surface[] = "get_surface"; static const char __pyx_k_get_visible[] = "_get_visible"; static const char __pyx_k_init_rect_2[] = "init_rect"; static const char __pyx_k_mro_entries[] = "__mro_entries__"; static const char __pyx_k_pygame_mask[] = "pygame.mask"; static const char __pyx_k_pygame_time[] = "pygame.time"; static const char __pyx_k_rightradius[] = "rightradius"; static const char __pyx_k_s_d_sprites[] = "<%s(%d sprites)>"; static const char __pyx_k_screen_rect[] = "screen_rect"; static const char __pyx_k_set_visible[] = "_set_visible"; static const char __pyx_k_source_rect[] = "source_rect"; static const char __pyx_k_spritegroup[] = "_spritegroup"; static const char __pyx_k_LayeredDirty[] = "LayeredDirty"; static const char __pyx_k_Sprite_alive[] = "Sprite.alive"; static const char __pyx_k_add_internal[] = "add_internal"; static const char __pyx_k_change_layer[] = "change_layer"; static const char __pyx_k_collide_mask[] = "collide_mask"; static const char __pyx_k_collide_rect[] = "collide_rect"; static const char __pyx_k_dirty_append[] = "dirty_append"; static const char __pyx_k_from_surface[] = "from_surface"; static const char __pyx_k_get_sprite_2[] = "_get_sprite"; static const char __pyx_k_groupcollide[] = "groupcollide"; static const char __pyx_k_has_internal[] = "has_internal"; static const char __pyx_k_initializing[] = "_initializing"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_move_to_back[] = "move_to_back"; static const char __pyx_k_repaint_rect[] = "repaint_rect"; static const char __pyx_k_return_value[] = "return_value"; static const char __pyx_k_stringsource[] = ""; static const char __pyx_k_surface_blit[] = "surface_blit"; static const char __pyx_k_switch_layer[] = "switch_layer"; static const char __pyx_k_AbstractGroup[] = "AbstractGroup"; static const char __pyx_k_RenderUpdates[] = "RenderUpdates"; static const char __pyx_k_Sprite_groups[] = "Sprite.groups"; static const char __pyx_k_Sprite_remove[] = "Sprite.remove"; static const char __pyx_k_Sprite_update[] = "Sprite.update"; static const char __pyx_k_class_getitem[] = "__class_getitem__"; static const char __pyx_k_colliding_idx[] = "colliding_idx"; static const char __pyx_k_default_layer[] = "default_layer"; static const char __pyx_k_get_top_layer[] = "get_top_layer"; static const char __pyx_k_init_subclass[] = "__init_subclass__"; static const char __pyx_k_move_to_front[] = "move_to_front"; static const char __pyx_k_rect_offset_x[] = "rect_offset_x"; static const char __pyx_k_rect_offset_y[] = "rect_offset_y"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_spr_rect_clip[] = "_spr_rect_clip"; static const char __pyx_k_sprite_layers[] = "sprite_layers"; static const char __pyx_k_spritecollide[] = "spritecollide"; static const char __pyx_k_update_append[] = "_update_append"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_LayeredUpdates[] = "LayeredUpdates"; static const char __pyx_k_OrderedUpdates[] = "OrderedUpdates"; static const char __pyx_k_collide_circle[] = "collide_circle"; static const char __pyx_k_collidelistall[] = "collidelistall"; static const char __pyx_k_get_sprites_at[] = "get_sprites_at"; static const char __pyx_k_get_top_sprite[] = "get_top_sprite"; static const char __pyx_k_pygame__sprite[] = "pygame._sprite"; static const char __pyx_k_sprites_append[] = "sprites_append"; static const char __pyx_k_sprites_layers[] = "sprites_layers"; static const char __pyx_k_time_threshold[] = "_time_threshold"; static const char __pyx_k_default_layer_2[] = "_default_layer"; static const char __pyx_k_distancesquared[] = "distancesquared"; static const char __pyx_k_remove_internal[] = "remove_internal"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_GroupSingle_copy[] = "GroupSingle.copy"; static const char __pyx_k_get_bottom_layer[] = "get_bottom_layer"; static const char __pyx_k_spritecollideany[] = "spritecollideany"; static const char __pyx_k_AbstractGroup_add[] = "AbstractGroup.add"; static const char __pyx_k_AbstractGroup_has[] = "AbstractGroup.has"; static const char __pyx_k_LayeredDirty_draw[] = "LayeredDirty.draw"; static const char __pyx_k_AbstractGroup_copy[] = "AbstractGroup.copy"; static const char __pyx_k_AbstractGroup_draw[] = "AbstractGroup.draw"; static const char __pyx_k_DirtySprite___init[] = "DirtySprite.__init__"; static const char __pyx_k_DirtySprite___repr[] = "DirtySprite.__repr__"; static const char __pyx_k_DirtySprite_lambda[] = "DirtySprite."; static const char __pyx_k_LayeredDirty_clear[] = "LayeredDirty.clear"; static const char __pyx_k_LayeredUpdates_add[] = "LayeredUpdates.add"; static const char __pyx_k_RenderUpdates_draw[] = "RenderUpdates.draw"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_collide_rect_ratio[] = "collide_rect_ratio"; static const char __pyx_k_AbstractGroup_clear[] = "AbstractGroup.clear"; static const char __pyx_k_AbstractGroup_empty[] = "AbstractGroup.empty"; static const char __pyx_k_GroupSingle_sprites[] = "GroupSingle.sprites"; static const char __pyx_k_LayeredUpdates_draw[] = "LayeredUpdates.draw"; static const char __pyx_k_Sprite_add_internal[] = "Sprite.add_internal"; static const char __pyx_k_get_layer_of_sprite[] = "get_layer_of_sprite"; static const char __pyx_k_set_timing_treshold[] = "set_timing_treshold"; static const char __pyx_k_union_rect_union_ip[] = "_union_rect_union_ip"; static const char __pyx_k_AbstractGroup_remove[] = "AbstractGroup.remove"; static const char __pyx_k_AbstractGroup_update[] = "AbstractGroup.update"; static const char __pyx_k_collide_circle_ratio[] = "collide_circle_ratio"; static const char __pyx_k_s_sprite_in_d_groups[] = "<%s sprite(in %d groups)>"; static const char __pyx_k_set_timing_threshold[] = "set_timing_threshold"; static const char __pyx_k_AbstractGroup_sprites[] = "AbstractGroup.sprites"; static const char __pyx_k_Group___reduce_cython[] = "Group.__reduce_cython__"; static const char __pyx_k_LayeredDirty_get_clip[] = "LayeredDirty.get_clip"; static const char __pyx_k_LayeredDirty_set_clip[] = "LayeredDirty.set_clip"; static const char __pyx_k_LayeredUpdates_layers[] = "LayeredUpdates.layers"; static const char __pyx_k_LayeredUpdates_sprites[] = "LayeredUpdates.sprites"; static const char __pyx_k_OrderedUpdates_sprites[] = "OrderedUpdates.sprites"; static const char __pyx_k_Sprite___reduce_cython[] = "Sprite.__reduce_cython__"; static const char __pyx_k_Sprite_remove_internal[] = "Sprite.remove_internal"; static const char __pyx_k_get_sprites_from_layer[] = "get_sprites_from_layer"; static const char __pyx_k_union_rect_collidelist[] = "_union_rect_collidelist"; static const char __pyx_k_GroupSingle__get_sprite[] = "GroupSingle._get_sprite"; static const char __pyx_k_GroupSingle__set_sprite[] = "GroupSingle._set_sprite"; static const char __pyx_k_Group___setstate_cython[] = "Group.__setstate_cython__"; static const char __pyx_k_remove_sprites_of_layer[] = "remove_sprites_of_layer"; static const char __pyx_k_DirtySprite__get_visible[] = "DirtySprite._get_visible"; static const char __pyx_k_DirtySprite__set_visible[] = "DirtySprite._set_visible"; static const char __pyx_k_GroupSingle_add_internal[] = "GroupSingle.add_internal"; static const char __pyx_k_GroupSingle_has_internal[] = "GroupSingle.has_internal"; static const char __pyx_k_Sprite___setstate_cython[] = "Sprite.__setstate_cython__"; static const char __pyx_k_LayeredDirty_add_internal[] = "LayeredDirty.add_internal"; static const char __pyx_k_LayeredDirty_change_layer[] = "LayeredDirty.change_layer"; static const char __pyx_k_LayeredDirty_repaint_rect[] = "LayeredDirty.repaint_rect"; static const char __pyx_k_LayeredUpdates_get_sprite[] = "LayeredUpdates.get_sprite"; static const char __pyx_k_collide_rect_ratio___call[] = "collide_rect_ratio.__call__"; static const char __pyx_k_collide_rect_ratio___init[] = "collide_rect_ratio.__init__"; static const char __pyx_k_s_DirtySprite_in_d_groups[] = "<%s DirtySprite(in %d groups)>"; static const char __pyx_k_AbstractGroup_add_internal[] = "AbstractGroup.add_internal"; static const char __pyx_k_AbstractGroup_has_internal[] = "AbstractGroup.has_internal"; static const char __pyx_k_GroupSingle___reduce_cython[] = "GroupSingle.__reduce_cython__"; static const char __pyx_k_GroupSingle_remove_internal[] = "GroupSingle.remove_internal"; static const char __pyx_k_LayeredUpdates_add_internal[] = "LayeredUpdates.add_internal"; static const char __pyx_k_LayeredUpdates_change_layer[] = "LayeredUpdates.change_layer"; static const char __pyx_k_LayeredUpdates_move_to_back[] = "LayeredUpdates.move_to_back"; static const char __pyx_k_LayeredUpdates_switch_layer[] = "LayeredUpdates.switch_layer"; static const char __pyx_k_OrderedUpdates_add_internal[] = "OrderedUpdates.add_internal"; static const char __pyx_k_collide_circle_ratio___call[] = "collide_circle_ratio.__call__"; static const char __pyx_k_collide_circle_ratio___init[] = "collide_circle_ratio.__init__"; static const char __pyx_k_LayeredDirty___reduce_cython[] = "LayeredDirty.__reduce_cython__"; static const char __pyx_k_LayeredUpdates_get_top_layer[] = "LayeredUpdates.get_top_layer"; static const char __pyx_k_LayeredUpdates_move_to_front[] = "LayeredUpdates.move_to_front"; static const char __pyx_k_AbstractGroup___reduce_cython[] = "AbstractGroup.__reduce_cython__"; static const char __pyx_k_AbstractGroup_remove_internal[] = "AbstractGroup.remove_internal"; static const char __pyx_k_GroupSingle___setstate_cython[] = "GroupSingle.__setstate_cython__"; static const char __pyx_k_LayeredUpdates_get_sprites_at[] = "LayeredUpdates.get_sprites_at"; static const char __pyx_k_LayeredUpdates_get_top_sprite[] = "LayeredUpdates.get_top_sprite"; static const char __pyx_k_RenderUpdates___reduce_cython[] = "RenderUpdates.__reduce_cython__"; static const char __pyx_k_LayeredDirty___setstate_cython[] = "LayeredDirty.__setstate_cython__"; static const char __pyx_k_LayeredUpdates___reduce_cython[] = "LayeredUpdates.__reduce_cython__"; static const char __pyx_k_LayeredUpdates_remove_internal[] = "LayeredUpdates.remove_internal"; static const char __pyx_k_OrderedUpdates___reduce_cython[] = "OrderedUpdates.__reduce_cython__"; static const char __pyx_k_OrderedUpdates_remove_internal[] = "OrderedUpdates.remove_internal"; static const char __pyx_k_AbstractGroup___setstate_cython[] = "AbstractGroup.__setstate_cython__"; static const char __pyx_k_LayeredUpdates_get_bottom_layer[] = "LayeredUpdates.get_bottom_layer"; static const char __pyx_k_LayeredUpdates_get_sprites_from[] = "LayeredUpdates.get_sprites_from_layer"; static const char __pyx_k_RenderUpdates___setstate_cython[] = "RenderUpdates.__setstate_cython__"; static const char __pyx_k_src_c_cython_pygame__sprite_pyx[] = "src_c/cython/pygame/_sprite.pyx"; static const char __pyx_k_A_callable_class_that_checks_for[] = "A callable class that checks for collisions using scaled rects\n\n The class checks for collisions between two sprites using a scaled version\n of the sprites' rects. Is created with a ratio; the instance is then\n intended to be passed as a collided callback function to the *collide\n functions.\n\n New in pygame 1.8.1\n\n "; static const char __pyx_k_LayeredDirty_set_timing_threshol[] = "LayeredDirty.set_timing_threshold"; static const char __pyx_k_LayeredDirty_set_timing_treshold[] = "LayeredDirty.set_timing_treshold"; static const char __pyx_k_LayeredUpdates___setstate_cython[] = "LayeredUpdates.__setstate_cython__"; static const char __pyx_k_LayeredUpdates_get_layer_of_spri[] = "LayeredUpdates.get_layer_of_sprite"; static const char __pyx_k_LayeredUpdates_remove_sprites_of[] = "LayeredUpdates.remove_sprites_of_layer"; static const char __pyx_k_OrderedUpdates___setstate_cython[] = "OrderedUpdates.__setstate_cython__"; static const char __pyx_k_The_sprite_contained_in_this_gro[] = "The sprite contained in this group"; static const char __pyx_k_a_more_featureful_subclass_of_Sp[] = "a more featureful subclass of Sprite with more attributes\n\n pygame.sprite.DirtySprite(*groups): return DirtySprite\n\n Extra DirtySprite attributes with their default values:\n\n dirty = 1\n If set to 1, it is repainted and then set to 0 again.\n If set to 2, it is always dirty (repainted each frame;\n flag is not reset).\n If set to 0, it is not dirty and therefore not repainted again.\n\n blendmode = 0\n It's the special_flags argument of Surface.blit; see the blendmodes in\n the Surface.blit documentation\n\n source_rect = None\n This is the source rect to use. Remember that it is relative to the top\n left corner (0, 0) of self.image.\n\n visible = 1\n Normally this is 1. If set to 0, it will not be repainted. (If you\n change visible to 1, you must set dirty to 1 for it to be erased from\n the screen.)\n\n _layer = 0\n 0 is the default value but this is able to be set differently\n when subclassing.\n\n "; static const char __pyx_k_detect_collision_between_two_spr[] = "detect collision between two sprites using scaled circles\n\n This callable class checks for collisions between two sprites using a\n scaled version of a sprite's radius. It is created with a ratio as the\n argument to the constructor. The instance is then intended to be passed as\n a collided callback function to the *collide functions.\n\n New in pygame 1.8.1\n\n "; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static const char __pyx_k_pygame_module_with_basic_game_ob[] = "pygame module with basic game object classes\n\nThis module contains several simple classes to be used within games. There\nare the main Sprite class and several Group classes that contain Sprites.\nThe use of these classes is entirely optional when using Pygame. The classes\nare fairly lightweight and only provide a starting place for the code\nthat is common to most games.\n\nThe Sprite class is intended to be used as a base class for the different\ntypes of objects in the game. There is also a base Group class that simply\nstores sprites. A game could create new types of Group classes that operate\non specially customized Sprite instances they contain.\n\nThe basic Sprite class can draw the Sprites it contains to a Surface. The\nGroup.draw() method requires that each Sprite have a Surface.image attribute\nand a Surface.rect. The Group.clear() method requires these same attributes\nand can be used to erase all the Sprites with background. There are also\nmore advanced Groups: pygame.sprite.RenderUpdates() and\npygame.sprite.OrderedUpdates().\n\nLastly, this module contains several collision functions. These help find\nsprites inside multiple groups that have intersecting bounding rectangles.\nTo find the collisions, the Sprites are required to have a Surface.rect\nattribute assigned.\n\nThe groups are designed for high efficiency in removing and adding Sprites\nto them. They also allow cheap testing to see if a Sprite already exists in\na Group. A given Sprite can exist in any number of groups. A game could use\nsome groups to control object rendering, and a completely separate set of\ngroups to control interaction or player movement. Instead of adding type\nattributes or bools to a derived Sprite class, consider keeping the\nSprites inside organized Groups. This will allow for easier lookup later\nin the game.\n\nSprites and Groups manage their relationships with the add() and remove()\nmethods. These methods can accept a single or multiple group arguments for""\nmembership. The default initializers for these classes also take a\nsingle group or list of groups as arguments for initial membership. It is safe\nto repeatedly add and remove the same Sprite from a Group.\n\nWhile it is possible to design sprite and group classes that don't derive\nfrom the Sprite and AbstractGroup classes below, it is strongly recommended\nthat you extend those when you create a new Sprite or Group class.\n\nSprites are not thread safe, so lock them yourself if using threads.\n\n"; static const char __pyx_k_you_can_make_this_sprite_disappe[] = "you can make this sprite disappear without removing it from the group,\nassign 0 for invisible and 1 for visible"; /* #### Code section: decls ### */ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_8add_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10remove_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_12update(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_16groups(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_5image___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_5image_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_5image_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4rect___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_4rect_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_6Sprite_4rect_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_groups); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_2sprites(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_4add_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_6remove_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_8has_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_surface); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__bool__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pygame_7_sprite_13AbstractGroup_32__len__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict___get__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_2__set__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_4__del__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites___get__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_2__set__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_4__del__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_7_sprite_5Group___init__(struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self, PyObject *__pyx_v_sprites); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_5Group_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_5Group_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self, PyObject *__pyx_v_surface); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprites); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_2sprites(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_4add_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_6remove_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist___get__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_2__set__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_4__del__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_4add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_layer); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_8remove_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_10sprites(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_surface); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer_nr); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_new_layer); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer1_nr, PyObject *__pyx_v_layer2_nr); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_2add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_layer); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_screen_rect); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_screen_rect); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_new_layer); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_time_ms); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_time_ms); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_4sprites(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_6add_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_8__bool__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_14remove_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_16has_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite___get__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_2__set__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_4__del__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_group, PyObject *__pyx_v_dokill, PyObject *__pyx_v_collided); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_groupa, PyObject *__pyx_v_groupb, PyObject *__pyx_v_dokilla, PyObject *__pyx_v_dokillb, PyObject *__pyx_v_collided); /* proto */ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_group, PyObject *__pyx_v_collided); /* proto */ static PyObject *__pyx_tp_new_6pygame_7_sprite_AbstractGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_Sprite(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_RenderUpdates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_OrderedUpdates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_LayeredUpdates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_LayeredDirty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_7_sprite_GroupSingle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, 0, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, 0, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_remove = {0, 0, 0, 0, 0}; /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_4type_type; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_4bool_bool; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_7cpython_7complex_complex; #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Color; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Rect; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Window; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Renderer; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Texture; PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Image; #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_6pygame_7_sprite_AbstractGroup; PyObject *__pyx_type_6pygame_7_sprite_Sprite; PyObject *__pyx_type_6pygame_7_sprite_Group; PyObject *__pyx_type_6pygame_7_sprite_RenderUpdates; PyObject *__pyx_type_6pygame_7_sprite_OrderedUpdates; PyObject *__pyx_type_6pygame_7_sprite_LayeredUpdates; PyObject *__pyx_type_6pygame_7_sprite_LayeredDirty; PyObject *__pyx_type_6pygame_7_sprite_GroupSingle; #endif PyTypeObject *__pyx_ptype_6pygame_7_sprite_Rect; PyTypeObject *__pyx_ptype_6pygame_7_sprite_AbstractGroup; PyTypeObject *__pyx_ptype_6pygame_7_sprite_Sprite; PyTypeObject *__pyx_ptype_6pygame_7_sprite_Group; PyTypeObject *__pyx_ptype_6pygame_7_sprite_RenderUpdates; PyTypeObject *__pyx_ptype_6pygame_7_sprite_OrderedUpdates; PyTypeObject *__pyx_ptype_6pygame_7_sprite_LayeredUpdates; PyTypeObject *__pyx_ptype_6pygame_7_sprite_LayeredDirty; PyTypeObject *__pyx_ptype_6pygame_7_sprite_GroupSingle; PyObject *__pyx_kp_s_A_callable_class_that_checks_for; PyObject *__pyx_n_s_AbstractGroup; PyObject *__pyx_n_s_AbstractGroup___reduce_cython; PyObject *__pyx_n_s_AbstractGroup___setstate_cython; PyObject *__pyx_n_s_AbstractGroup_add; PyObject *__pyx_n_s_AbstractGroup_add_internal; PyObject *__pyx_n_s_AbstractGroup_clear; PyObject *__pyx_n_s_AbstractGroup_copy; PyObject *__pyx_n_s_AbstractGroup_draw; PyObject *__pyx_n_s_AbstractGroup_empty; PyObject *__pyx_n_s_AbstractGroup_has; PyObject *__pyx_n_s_AbstractGroup_has_internal; PyObject *__pyx_n_s_AbstractGroup_remove; PyObject *__pyx_n_s_AbstractGroup_remove_internal; PyObject *__pyx_n_s_AbstractGroup_sprites; PyObject *__pyx_n_s_AbstractGroup_update; PyObject *__pyx_n_s_AttributeError; PyObject *__pyx_n_s_DirtySprite; PyObject *__pyx_n_s_DirtySprite___init; PyObject *__pyx_n_s_DirtySprite___repr; PyObject *__pyx_n_s_DirtySprite__get_visible; PyObject *__pyx_n_s_DirtySprite__set_visible; PyObject *__pyx_n_s_DirtySprite_lambda; PyObject *__pyx_n_s_Group; PyObject *__pyx_n_s_GroupSingle; PyObject *__pyx_n_s_GroupSingle___reduce_cython; PyObject *__pyx_n_s_GroupSingle___setstate_cython; PyObject *__pyx_n_s_GroupSingle__get_sprite; PyObject *__pyx_n_s_GroupSingle__set_sprite; PyObject *__pyx_n_s_GroupSingle_add_internal; PyObject *__pyx_n_s_GroupSingle_copy; PyObject *__pyx_n_s_GroupSingle_has_internal; PyObject *__pyx_n_s_GroupSingle_remove_internal; PyObject *__pyx_n_s_GroupSingle_sprites; PyObject *__pyx_n_s_Group___reduce_cython; PyObject *__pyx_n_s_Group___setstate_cython; PyObject *__pyx_n_s_LayeredDirty; PyObject *__pyx_n_s_LayeredDirty___reduce_cython; PyObject *__pyx_n_s_LayeredDirty___setstate_cython; PyObject *__pyx_n_s_LayeredDirty_add_internal; PyObject *__pyx_n_s_LayeredDirty_change_layer; PyObject *__pyx_n_s_LayeredDirty_clear; PyObject *__pyx_n_s_LayeredDirty_draw; PyObject *__pyx_n_s_LayeredDirty_get_clip; PyObject *__pyx_n_s_LayeredDirty_repaint_rect; PyObject *__pyx_n_s_LayeredDirty_set_clip; PyObject *__pyx_n_s_LayeredDirty_set_timing_threshol; PyObject *__pyx_n_s_LayeredDirty_set_timing_treshold; PyObject *__pyx_n_s_LayeredUpdates; PyObject *__pyx_n_s_LayeredUpdates___reduce_cython; PyObject *__pyx_n_s_LayeredUpdates___setstate_cython; PyObject *__pyx_n_s_LayeredUpdates_add; PyObject *__pyx_n_s_LayeredUpdates_add_internal; PyObject *__pyx_n_s_LayeredUpdates_change_layer; PyObject *__pyx_n_s_LayeredUpdates_draw; PyObject *__pyx_n_s_LayeredUpdates_get_bottom_layer; PyObject *__pyx_n_s_LayeredUpdates_get_layer_of_spri; PyObject *__pyx_n_s_LayeredUpdates_get_sprite; PyObject *__pyx_n_s_LayeredUpdates_get_sprites_at; PyObject *__pyx_n_s_LayeredUpdates_get_sprites_from; PyObject *__pyx_n_s_LayeredUpdates_get_top_layer; PyObject *__pyx_n_s_LayeredUpdates_get_top_sprite; PyObject *__pyx_n_s_LayeredUpdates_layers; PyObject *__pyx_n_s_LayeredUpdates_move_to_back; PyObject *__pyx_n_s_LayeredUpdates_move_to_front; PyObject *__pyx_n_s_LayeredUpdates_remove_internal; PyObject *__pyx_n_s_LayeredUpdates_remove_sprites_of; PyObject *__pyx_n_s_LayeredUpdates_sprites; PyObject *__pyx_n_s_LayeredUpdates_switch_layer; PyObject *__pyx_n_s_OrderedUpdates; PyObject *__pyx_n_s_OrderedUpdates___reduce_cython; PyObject *__pyx_n_s_OrderedUpdates___setstate_cython; PyObject *__pyx_n_s_OrderedUpdates_add_internal; PyObject *__pyx_n_s_OrderedUpdates_remove_internal; PyObject *__pyx_n_s_OrderedUpdates_sprites; PyObject *__pyx_n_s_Rect; PyObject *__pyx_n_s_RenderClear; PyObject *__pyx_n_s_RenderPlain; PyObject *__pyx_n_s_RenderUpdates; PyObject *__pyx_n_s_RenderUpdates___reduce_cython; PyObject *__pyx_n_s_RenderUpdates___setstate_cython; PyObject *__pyx_n_s_RenderUpdates_draw; PyObject *__pyx_n_s_SC; PyObject *__pyx_n_s_Sprite; PyObject *__pyx_n_s_Sprite___reduce_cython; PyObject *__pyx_n_s_Sprite___setstate_cython; PyObject *__pyx_n_s_Sprite_add; PyObject *__pyx_n_s_Sprite_add_internal; PyObject *__pyx_n_s_Sprite_alive; PyObject *__pyx_n_s_Sprite_groups; PyObject *__pyx_n_s_Sprite_kill; PyObject *__pyx_n_s_Sprite_remove; PyObject *__pyx_n_s_Sprite_remove_internal; PyObject *__pyx_n_s_Sprite_update; PyObject *__pyx_kp_s_The_sprite_contained_in_this_gro; PyObject *__pyx_n_s_TypeError; PyObject *__pyx_n_s__135; PyObject *__pyx_n_s__2; PyObject *__pyx_kp_u__3; PyObject *__pyx_kp_s_a_more_featureful_subclass_of_Sp; PyObject *__pyx_n_s_add; PyObject *__pyx_n_s_add_internal; PyObject *__pyx_n_s_alive; PyObject *__pyx_n_s_append; PyObject *__pyx_n_s_args; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_bgd; PyObject *__pyx_n_s_bgd_2; PyObject *__pyx_n_s_blendmode; PyObject *__pyx_n_s_blit; PyObject *__pyx_n_s_builtins; PyObject *__pyx_n_s_c; PyObject *__pyx_n_s_call; PyObject *__pyx_n_s_callable; PyObject *__pyx_n_s_centerx; PyObject *__pyx_n_s_centery; PyObject *__pyx_n_s_change_layer; PyObject *__pyx_n_s_class; PyObject *__pyx_n_s_class_getitem; PyObject *__pyx_n_s_clear; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_clip; PyObject *__pyx_n_s_clip_2; PyObject *__pyx_n_s_collide_circle; PyObject *__pyx_n_s_collide_circle_ratio; PyObject *__pyx_n_s_collide_circle_ratio___call; PyObject *__pyx_n_s_collide_circle_ratio___init; PyObject *__pyx_n_s_collide_mask; PyObject *__pyx_n_s_collide_rect; PyObject *__pyx_n_s_collide_rect_ratio; PyObject *__pyx_n_s_collide_rect_ratio___call; PyObject *__pyx_n_s_collide_rect_ratio___init; PyObject *__pyx_n_s_collided; PyObject *__pyx_n_s_collidelist; PyObject *__pyx_n_s_collidelistall; PyObject *__pyx_n_s_colliderect; PyObject *__pyx_n_s_colliding; PyObject *__pyx_n_s_colliding_idx; PyObject *__pyx_n_s_contains; PyObject *__pyx_n_s_copy; PyObject *__pyx_n_s_crashed; PyObject *__pyx_n_s_default_layer; PyObject *__pyx_n_s_default_layer_2; PyObject *__pyx_kp_s_detect_collision_between_two_spr; PyObject *__pyx_n_s_dict; PyObject *__pyx_n_s_dirty; PyObject *__pyx_n_s_dirty_append; PyObject *__pyx_kp_u_disable; PyObject *__pyx_n_s_display; PyObject *__pyx_n_s_distancesquared; PyObject *__pyx_n_s_doc; PyObject *__pyx_n_s_doc_2; PyObject *__pyx_n_s_dokill; PyObject *__pyx_n_s_dokilla; PyObject *__pyx_n_s_dokillb; PyObject *__pyx_n_s_draw; PyObject *__pyx_n_s_empty; PyObject *__pyx_kp_u_enable; PyObject *__pyx_n_s_end_time; PyObject *__pyx_n_s_from_surface; PyObject *__pyx_kp_u_gc; PyObject *__pyx_n_s_get; PyObject *__pyx_n_s_get_bottom_layer; PyObject *__pyx_n_s_get_clip; PyObject *__pyx_n_s_get_layer_of_sprite; PyObject *__pyx_n_s_get_rect; PyObject *__pyx_n_s_get_sprite; PyObject *__pyx_n_s_get_sprite_2; PyObject *__pyx_n_s_get_sprites_at; PyObject *__pyx_n_s_get_sprites_from_layer; PyObject *__pyx_n_s_get_surface; PyObject *__pyx_n_s_get_ticks; PyObject *__pyx_n_s_get_top_layer; PyObject *__pyx_n_s_get_top_sprite; PyObject *__pyx_n_s_get_visible; PyObject *__pyx_n_s_getstate; PyObject *__pyx_n_s_group; PyObject *__pyx_n_s_groupa; PyObject *__pyx_n_s_groupb; PyObject *__pyx_n_s_groupcollide; PyObject *__pyx_n_s_groups; PyObject *__pyx_n_s_has; PyObject *__pyx_n_s_has_internal; PyObject *__pyx_n_s_height; PyObject *__pyx_n_s_high; PyObject *__pyx_n_s_i; PyObject *__pyx_n_s_idx; PyObject *__pyx_n_s_image; PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_inflate; PyObject *__pyx_n_s_init; PyObject *__pyx_n_s_init_rect; PyObject *__pyx_n_s_init_rect_2; PyObject *__pyx_n_s_init_subclass; PyObject *__pyx_n_s_initializing; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_items; PyObject *__pyx_n_s_kill; PyObject *__pyx_n_s_kwargs; PyObject *__pyx_n_s_lambda; PyObject *__pyx_n_s_layer; PyObject *__pyx_n_s_layer1_nr; PyObject *__pyx_n_s_layer2_nr; PyObject *__pyx_n_s_layer_2; PyObject *__pyx_n_s_layer_nr; PyObject *__pyx_n_s_layers; PyObject *__pyx_n_s_left; PyObject *__pyx_n_s_leftmask; PyObject *__pyx_n_s_leftradius; PyObject *__pyx_n_s_leftrect; PyObject *__pyx_n_s_leng; PyObject *__pyx_n_s_low; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_mask; PyObject *__pyx_n_s_metaclass; PyObject *__pyx_n_s_mid; PyObject *__pyx_n_s_module; PyObject *__pyx_n_s_move_to_back; PyObject *__pyx_n_s_move_to_front; PyObject *__pyx_n_s_mro_entries; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_new_layer; PyObject *__pyx_n_s_newrect; PyObject *__pyx_kp_s_no_default___reduce___due_to_non; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_object; PyObject *__pyx_n_s_old_rect; PyObject *__pyx_n_s_orig_clip; PyObject *__pyx_n_s_overlap; PyObject *__pyx_n_s_pop; PyObject *__pyx_n_s_pos; PyObject *__pyx_n_s_prepare; PyObject *__pyx_n_s_property; PyObject *__pyx_n_s_pygame; PyObject *__pyx_n_s_pygame__sprite; PyObject *__pyx_n_s_pygame_mask; PyObject *__pyx_n_s_pygame_time; PyObject *__pyx_n_s_pyx_state; PyObject *__pyx_n_s_pyx_vtable; PyObject *__pyx_n_s_qualname; PyObject *__pyx_n_s_r; PyObject *__pyx_n_s_radius; PyObject *__pyx_n_s_ratio; PyObject *__pyx_n_s_rec; PyObject *__pyx_n_s_rect; PyObject *__pyx_n_s_rect_2; PyObject *__pyx_n_s_rect_offset_x; PyObject *__pyx_n_s_rect_offset_y; PyObject *__pyx_n_s_reduce; PyObject *__pyx_n_s_reduce_cython; PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_remove; PyObject *__pyx_n_s_remove_internal; PyObject *__pyx_n_s_remove_sprites_of_layer; PyObject *__pyx_n_s_repaint_rect; PyObject *__pyx_n_s_repr; PyObject *__pyx_n_s_ret; PyObject *__pyx_n_s_ret_2; PyObject *__pyx_n_s_return_value; PyObject *__pyx_n_s_right; PyObject *__pyx_n_s_rightmask; PyObject *__pyx_n_s_rightradius; PyObject *__pyx_n_s_rightrect; PyObject *__pyx_n_s_s; PyObject *__pyx_kp_s_s_DirtySprite_in_d_groups; PyObject *__pyx_kp_s_s_d_sprites; PyObject *__pyx_kp_s_s_sprite_in_d_groups; PyObject *__pyx_n_s_screen_rect; PyObject *__pyx_n_s_self; PyObject *__pyx_n_s_set_clip; PyObject *__pyx_n_s_set_name; PyObject *__pyx_n_s_set_sprite; PyObject *__pyx_n_s_set_timing_threshold; PyObject *__pyx_n_s_set_timing_treshold; PyObject *__pyx_n_s_set_visible; PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_size; PyObject *__pyx_n_s_source_rect; PyObject *__pyx_n_s_spec; PyObject *__pyx_n_s_spr; PyObject *__pyx_n_s_spr_rect; PyObject *__pyx_n_s_spr_rect_clip; PyObject *__pyx_n_s_sprite; PyObject *__pyx_n_s_sprite_layers; PyObject *__pyx_n_s_spritecollide; PyObject *__pyx_n_s_spritecollideany; PyObject *__pyx_n_s_spritedict; PyObject *__pyx_n_s_spritegroup; PyObject *__pyx_n_s_sprites; PyObject *__pyx_n_s_sprites1; PyObject *__pyx_n_s_sprites_2; PyObject *__pyx_n_s_sprites_append; PyObject *__pyx_n_s_sprites_layers; PyObject *__pyx_kp_s_src_c_cython_pygame__sprite_pyx; PyObject *__pyx_n_s_start_time; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_super; PyObject *__pyx_n_s_surf; PyObject *__pyx_n_s_surf_blit; PyObject *__pyx_n_s_surface; PyObject *__pyx_n_s_surface_blit; PyObject *__pyx_n_s_switch_layer; PyObject *__pyx_n_s_test; PyObject *__pyx_n_s_time_ms; PyObject *__pyx_n_s_time_threshold; PyObject *__pyx_n_s_topleft; PyObject *__pyx_n_s_union; PyObject *__pyx_n_s_union_ip; PyObject *__pyx_n_s_union_rect; PyObject *__pyx_n_s_union_rect_collidelist; PyObject *__pyx_n_s_union_rect_union_ip; PyObject *__pyx_n_s_update; PyObject *__pyx_n_s_update_2; PyObject *__pyx_n_s_update_append; PyObject *__pyx_n_s_use_update; PyObject *__pyx_n_s_val; PyObject *__pyx_n_s_value; PyObject *__pyx_n_s_values; PyObject *__pyx_n_s_visible; PyObject *__pyx_n_s_visible_2; PyObject *__pyx_n_s_width; PyObject *__pyx_n_s_xdistance; PyObject *__pyx_n_s_xoffset; PyObject *__pyx_n_s_ydistance; PyObject *__pyx_n_s_yoffset; PyObject *__pyx_kp_s_you_can_make_this_sprite_disappe; PyObject *__pyx_float_0_5; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_2; PyObject *__pyx_int_neg_1; PyObject *__pyx_tuple_; PyObject *__pyx_tuple__4; PyObject *__pyx_tuple__7; PyObject *__pyx_tuple__10; PyObject *__pyx_tuple__12; PyObject *__pyx_tuple__14; PyObject *__pyx_tuple__18; PyObject *__pyx_tuple__20; PyObject *__pyx_tuple__22; PyObject *__pyx_tuple__27; PyObject *__pyx_tuple__32; PyObject *__pyx_tuple__35; PyObject *__pyx_tuple__37; PyObject *__pyx_tuple__39; PyObject *__pyx_tuple__41; PyObject *__pyx_tuple__43; PyObject *__pyx_tuple__49; PyObject *__pyx_tuple__58; PyObject *__pyx_tuple__59; PyObject *__pyx_tuple__61; PyObject *__pyx_tuple__62; PyObject *__pyx_tuple__66; PyObject *__pyx_tuple__68; PyObject *__pyx_tuple__70; PyObject *__pyx_tuple__72; PyObject *__pyx_tuple__75; PyObject *__pyx_tuple__83; PyObject *__pyx_tuple__85; PyObject *__pyx_tuple__90; PyObject *__pyx_tuple__92; PyObject *__pyx_tuple__94; PyObject *__pyx_tuple__98; PyObject *__pyx_codeobj__5; PyObject *__pyx_codeobj__6; PyObject *__pyx_codeobj__8; PyObject *__pyx_codeobj__9; PyObject *__pyx_tuple__100; PyObject *__pyx_tuple__114; PyObject *__pyx_tuple__116; PyObject *__pyx_tuple__118; PyObject *__pyx_tuple__120; PyObject *__pyx_tuple__122; PyObject *__pyx_tuple__123; PyObject *__pyx_tuple__125; PyObject *__pyx_tuple__127; PyObject *__pyx_tuple__129; PyObject *__pyx_tuple__131; PyObject *__pyx_tuple__133; PyObject *__pyx_codeobj__11; PyObject *__pyx_codeobj__13; PyObject *__pyx_codeobj__15; PyObject *__pyx_codeobj__16; PyObject *__pyx_codeobj__17; PyObject *__pyx_codeobj__19; PyObject *__pyx_codeobj__21; PyObject *__pyx_codeobj__23; PyObject *__pyx_codeobj__24; PyObject *__pyx_codeobj__25; PyObject *__pyx_codeobj__26; PyObject *__pyx_codeobj__28; PyObject *__pyx_codeobj__29; PyObject *__pyx_codeobj__30; PyObject *__pyx_codeobj__31; PyObject *__pyx_codeobj__33; PyObject *__pyx_codeobj__34; PyObject *__pyx_codeobj__36; PyObject *__pyx_codeobj__38; PyObject *__pyx_codeobj__40; PyObject *__pyx_codeobj__42; PyObject *__pyx_codeobj__44; PyObject *__pyx_codeobj__45; PyObject *__pyx_codeobj__46; PyObject *__pyx_codeobj__47; PyObject *__pyx_codeobj__48; PyObject *__pyx_codeobj__50; PyObject *__pyx_codeobj__51; PyObject *__pyx_codeobj__52; PyObject *__pyx_codeobj__53; PyObject *__pyx_codeobj__54; PyObject *__pyx_codeobj__55; PyObject *__pyx_codeobj__56; PyObject *__pyx_codeobj__57; PyObject *__pyx_codeobj__60; PyObject *__pyx_codeobj__63; PyObject *__pyx_codeobj__64; PyObject *__pyx_codeobj__65; PyObject *__pyx_codeobj__67; PyObject *__pyx_codeobj__69; PyObject *__pyx_codeobj__71; PyObject *__pyx_codeobj__73; PyObject *__pyx_codeobj__74; PyObject *__pyx_codeobj__76; PyObject *__pyx_codeobj__77; PyObject *__pyx_codeobj__78; PyObject *__pyx_codeobj__79; PyObject *__pyx_codeobj__80; PyObject *__pyx_codeobj__81; PyObject *__pyx_codeobj__82; PyObject *__pyx_codeobj__84; PyObject *__pyx_codeobj__86; PyObject *__pyx_codeobj__87; PyObject *__pyx_codeobj__88; PyObject *__pyx_codeobj__89; PyObject *__pyx_codeobj__91; PyObject *__pyx_codeobj__93; PyObject *__pyx_codeobj__95; PyObject *__pyx_codeobj__96; PyObject *__pyx_codeobj__97; PyObject *__pyx_codeobj__99; PyObject *__pyx_codeobj__101; PyObject *__pyx_codeobj__102; PyObject *__pyx_codeobj__103; PyObject *__pyx_codeobj__104; PyObject *__pyx_codeobj__105; PyObject *__pyx_codeobj__106; PyObject *__pyx_codeobj__107; PyObject *__pyx_codeobj__108; PyObject *__pyx_codeobj__109; PyObject *__pyx_codeobj__110; PyObject *__pyx_codeobj__111; PyObject *__pyx_codeobj__112; PyObject *__pyx_codeobj__113; PyObject *__pyx_codeobj__115; PyObject *__pyx_codeobj__117; PyObject *__pyx_codeobj__119; PyObject *__pyx_codeobj__121; PyObject *__pyx_codeobj__124; PyObject *__pyx_codeobj__126; PyObject *__pyx_codeobj__128; PyObject *__pyx_codeobj__130; PyObject *__pyx_codeobj__132; PyObject *__pyx_codeobj__134; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Color); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Rect); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Window); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Renderer); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Texture); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Image); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_Rect); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_AbstractGroup); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_AbstractGroup); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_Sprite); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_Sprite); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_Group); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_Group); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_RenderUpdates); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_RenderUpdates); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_OrderedUpdates); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_OrderedUpdates); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_LayeredUpdates); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_LayeredUpdates); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_LayeredDirty); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_LayeredDirty); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_7_sprite_GroupSingle); Py_CLEAR(clear_module_state->__pyx_type_6pygame_7_sprite_GroupSingle); Py_CLEAR(clear_module_state->__pyx_kp_s_A_callable_class_that_checks_for); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_add); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_clear); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_copy); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_draw); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_empty); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_has); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_has_internal); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_remove); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_sprites); Py_CLEAR(clear_module_state->__pyx_n_s_AbstractGroup_update); Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite___init); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite___repr); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite__get_visible); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite__set_visible); Py_CLEAR(clear_module_state->__pyx_n_s_DirtySprite_lambda); Py_CLEAR(clear_module_state->__pyx_n_s_Group); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle__get_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle__set_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle_copy); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle_has_internal); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_GroupSingle_sprites); Py_CLEAR(clear_module_state->__pyx_n_s_Group___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Group___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_change_layer); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_clear); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_draw); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_get_clip); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_repaint_rect); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_set_clip); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_set_timing_threshol); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredDirty_set_timing_treshold); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_add); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_change_layer); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_draw); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_bottom_layer); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_layer_of_spri); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_sprites_at); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_sprites_from); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_top_layer); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_get_top_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_layers); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_move_to_back); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_move_to_front); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_remove_sprites_of); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_sprites); Py_CLEAR(clear_module_state->__pyx_n_s_LayeredUpdates_switch_layer); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedUpdates_sprites); Py_CLEAR(clear_module_state->__pyx_n_s_Rect); Py_CLEAR(clear_module_state->__pyx_n_s_RenderClear); Py_CLEAR(clear_module_state->__pyx_n_s_RenderPlain); Py_CLEAR(clear_module_state->__pyx_n_s_RenderUpdates); Py_CLEAR(clear_module_state->__pyx_n_s_RenderUpdates___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_RenderUpdates___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_RenderUpdates_draw); Py_CLEAR(clear_module_state->__pyx_n_s_SC); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_add); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_alive); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_groups); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_kill); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_remove); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_Sprite_update); Py_CLEAR(clear_module_state->__pyx_kp_s_The_sprite_contained_in_this_gro); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_n_s__135); Py_CLEAR(clear_module_state->__pyx_n_s__2); Py_CLEAR(clear_module_state->__pyx_kp_u__3); Py_CLEAR(clear_module_state->__pyx_kp_s_a_more_featureful_subclass_of_Sp); Py_CLEAR(clear_module_state->__pyx_n_s_add); Py_CLEAR(clear_module_state->__pyx_n_s_add_internal); Py_CLEAR(clear_module_state->__pyx_n_s_alive); Py_CLEAR(clear_module_state->__pyx_n_s_append); Py_CLEAR(clear_module_state->__pyx_n_s_args); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_bgd); Py_CLEAR(clear_module_state->__pyx_n_s_bgd_2); Py_CLEAR(clear_module_state->__pyx_n_s_blendmode); Py_CLEAR(clear_module_state->__pyx_n_s_blit); Py_CLEAR(clear_module_state->__pyx_n_s_builtins); Py_CLEAR(clear_module_state->__pyx_n_s_c); Py_CLEAR(clear_module_state->__pyx_n_s_call); Py_CLEAR(clear_module_state->__pyx_n_s_callable); Py_CLEAR(clear_module_state->__pyx_n_s_centerx); Py_CLEAR(clear_module_state->__pyx_n_s_centery); Py_CLEAR(clear_module_state->__pyx_n_s_change_layer); Py_CLEAR(clear_module_state->__pyx_n_s_class); Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); Py_CLEAR(clear_module_state->__pyx_n_s_clear); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_clip); Py_CLEAR(clear_module_state->__pyx_n_s_clip_2); Py_CLEAR(clear_module_state->__pyx_n_s_collide_circle); Py_CLEAR(clear_module_state->__pyx_n_s_collide_circle_ratio); Py_CLEAR(clear_module_state->__pyx_n_s_collide_circle_ratio___call); Py_CLEAR(clear_module_state->__pyx_n_s_collide_circle_ratio___init); Py_CLEAR(clear_module_state->__pyx_n_s_collide_mask); Py_CLEAR(clear_module_state->__pyx_n_s_collide_rect); Py_CLEAR(clear_module_state->__pyx_n_s_collide_rect_ratio); Py_CLEAR(clear_module_state->__pyx_n_s_collide_rect_ratio___call); Py_CLEAR(clear_module_state->__pyx_n_s_collide_rect_ratio___init); Py_CLEAR(clear_module_state->__pyx_n_s_collided); Py_CLEAR(clear_module_state->__pyx_n_s_collidelist); Py_CLEAR(clear_module_state->__pyx_n_s_collidelistall); Py_CLEAR(clear_module_state->__pyx_n_s_colliderect); Py_CLEAR(clear_module_state->__pyx_n_s_colliding); Py_CLEAR(clear_module_state->__pyx_n_s_colliding_idx); Py_CLEAR(clear_module_state->__pyx_n_s_contains); Py_CLEAR(clear_module_state->__pyx_n_s_copy); Py_CLEAR(clear_module_state->__pyx_n_s_crashed); Py_CLEAR(clear_module_state->__pyx_n_s_default_layer); Py_CLEAR(clear_module_state->__pyx_n_s_default_layer_2); Py_CLEAR(clear_module_state->__pyx_kp_s_detect_collision_between_two_spr); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_n_s_dirty); Py_CLEAR(clear_module_state->__pyx_n_s_dirty_append); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_display); Py_CLEAR(clear_module_state->__pyx_n_s_distancesquared); Py_CLEAR(clear_module_state->__pyx_n_s_doc); Py_CLEAR(clear_module_state->__pyx_n_s_doc_2); Py_CLEAR(clear_module_state->__pyx_n_s_dokill); Py_CLEAR(clear_module_state->__pyx_n_s_dokilla); Py_CLEAR(clear_module_state->__pyx_n_s_dokillb); Py_CLEAR(clear_module_state->__pyx_n_s_draw); Py_CLEAR(clear_module_state->__pyx_n_s_empty); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_end_time); Py_CLEAR(clear_module_state->__pyx_n_s_from_surface); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_get); Py_CLEAR(clear_module_state->__pyx_n_s_get_bottom_layer); Py_CLEAR(clear_module_state->__pyx_n_s_get_clip); Py_CLEAR(clear_module_state->__pyx_n_s_get_layer_of_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_get_rect); Py_CLEAR(clear_module_state->__pyx_n_s_get_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_get_sprite_2); Py_CLEAR(clear_module_state->__pyx_n_s_get_sprites_at); Py_CLEAR(clear_module_state->__pyx_n_s_get_sprites_from_layer); Py_CLEAR(clear_module_state->__pyx_n_s_get_surface); Py_CLEAR(clear_module_state->__pyx_n_s_get_ticks); Py_CLEAR(clear_module_state->__pyx_n_s_get_top_layer); Py_CLEAR(clear_module_state->__pyx_n_s_get_top_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_get_visible); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_n_s_group); Py_CLEAR(clear_module_state->__pyx_n_s_groupa); Py_CLEAR(clear_module_state->__pyx_n_s_groupb); Py_CLEAR(clear_module_state->__pyx_n_s_groupcollide); Py_CLEAR(clear_module_state->__pyx_n_s_groups); Py_CLEAR(clear_module_state->__pyx_n_s_has); Py_CLEAR(clear_module_state->__pyx_n_s_has_internal); Py_CLEAR(clear_module_state->__pyx_n_s_height); Py_CLEAR(clear_module_state->__pyx_n_s_high); Py_CLEAR(clear_module_state->__pyx_n_s_i); Py_CLEAR(clear_module_state->__pyx_n_s_idx); Py_CLEAR(clear_module_state->__pyx_n_s_image); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_inflate); Py_CLEAR(clear_module_state->__pyx_n_s_init); Py_CLEAR(clear_module_state->__pyx_n_s_init_rect); Py_CLEAR(clear_module_state->__pyx_n_s_init_rect_2); Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_items); Py_CLEAR(clear_module_state->__pyx_n_s_kill); Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); Py_CLEAR(clear_module_state->__pyx_n_s_lambda); Py_CLEAR(clear_module_state->__pyx_n_s_layer); Py_CLEAR(clear_module_state->__pyx_n_s_layer1_nr); Py_CLEAR(clear_module_state->__pyx_n_s_layer2_nr); Py_CLEAR(clear_module_state->__pyx_n_s_layer_2); Py_CLEAR(clear_module_state->__pyx_n_s_layer_nr); Py_CLEAR(clear_module_state->__pyx_n_s_layers); Py_CLEAR(clear_module_state->__pyx_n_s_left); Py_CLEAR(clear_module_state->__pyx_n_s_leftmask); Py_CLEAR(clear_module_state->__pyx_n_s_leftradius); Py_CLEAR(clear_module_state->__pyx_n_s_leftrect); Py_CLEAR(clear_module_state->__pyx_n_s_leng); Py_CLEAR(clear_module_state->__pyx_n_s_low); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_mask); Py_CLEAR(clear_module_state->__pyx_n_s_metaclass); Py_CLEAR(clear_module_state->__pyx_n_s_mid); Py_CLEAR(clear_module_state->__pyx_n_s_module); Py_CLEAR(clear_module_state->__pyx_n_s_move_to_back); Py_CLEAR(clear_module_state->__pyx_n_s_move_to_front); Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_new_layer); Py_CLEAR(clear_module_state->__pyx_n_s_newrect); Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_object); Py_CLEAR(clear_module_state->__pyx_n_s_old_rect); Py_CLEAR(clear_module_state->__pyx_n_s_orig_clip); Py_CLEAR(clear_module_state->__pyx_n_s_overlap); Py_CLEAR(clear_module_state->__pyx_n_s_pop); Py_CLEAR(clear_module_state->__pyx_n_s_pos); Py_CLEAR(clear_module_state->__pyx_n_s_prepare); Py_CLEAR(clear_module_state->__pyx_n_s_property); Py_CLEAR(clear_module_state->__pyx_n_s_pygame); Py_CLEAR(clear_module_state->__pyx_n_s_pygame__sprite); Py_CLEAR(clear_module_state->__pyx_n_s_pygame_mask); Py_CLEAR(clear_module_state->__pyx_n_s_pygame_time); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); Py_CLEAR(clear_module_state->__pyx_n_s_qualname); Py_CLEAR(clear_module_state->__pyx_n_s_r); Py_CLEAR(clear_module_state->__pyx_n_s_radius); Py_CLEAR(clear_module_state->__pyx_n_s_ratio); Py_CLEAR(clear_module_state->__pyx_n_s_rec); Py_CLEAR(clear_module_state->__pyx_n_s_rect); Py_CLEAR(clear_module_state->__pyx_n_s_rect_2); Py_CLEAR(clear_module_state->__pyx_n_s_rect_offset_x); Py_CLEAR(clear_module_state->__pyx_n_s_rect_offset_y); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_remove); Py_CLEAR(clear_module_state->__pyx_n_s_remove_internal); Py_CLEAR(clear_module_state->__pyx_n_s_remove_sprites_of_layer); Py_CLEAR(clear_module_state->__pyx_n_s_repaint_rect); Py_CLEAR(clear_module_state->__pyx_n_s_repr); Py_CLEAR(clear_module_state->__pyx_n_s_ret); Py_CLEAR(clear_module_state->__pyx_n_s_ret_2); Py_CLEAR(clear_module_state->__pyx_n_s_return_value); Py_CLEAR(clear_module_state->__pyx_n_s_right); Py_CLEAR(clear_module_state->__pyx_n_s_rightmask); Py_CLEAR(clear_module_state->__pyx_n_s_rightradius); Py_CLEAR(clear_module_state->__pyx_n_s_rightrect); Py_CLEAR(clear_module_state->__pyx_n_s_s); Py_CLEAR(clear_module_state->__pyx_kp_s_s_DirtySprite_in_d_groups); Py_CLEAR(clear_module_state->__pyx_kp_s_s_d_sprites); Py_CLEAR(clear_module_state->__pyx_kp_s_s_sprite_in_d_groups); Py_CLEAR(clear_module_state->__pyx_n_s_screen_rect); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_n_s_set_clip); Py_CLEAR(clear_module_state->__pyx_n_s_set_name); Py_CLEAR(clear_module_state->__pyx_n_s_set_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_set_timing_threshold); Py_CLEAR(clear_module_state->__pyx_n_s_set_timing_treshold); Py_CLEAR(clear_module_state->__pyx_n_s_set_visible); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_size); Py_CLEAR(clear_module_state->__pyx_n_s_source_rect); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_n_s_spr); Py_CLEAR(clear_module_state->__pyx_n_s_spr_rect); Py_CLEAR(clear_module_state->__pyx_n_s_spr_rect_clip); Py_CLEAR(clear_module_state->__pyx_n_s_sprite); Py_CLEAR(clear_module_state->__pyx_n_s_sprite_layers); Py_CLEAR(clear_module_state->__pyx_n_s_spritecollide); Py_CLEAR(clear_module_state->__pyx_n_s_spritecollideany); Py_CLEAR(clear_module_state->__pyx_n_s_spritedict); Py_CLEAR(clear_module_state->__pyx_n_s_spritegroup); Py_CLEAR(clear_module_state->__pyx_n_s_sprites); Py_CLEAR(clear_module_state->__pyx_n_s_sprites1); Py_CLEAR(clear_module_state->__pyx_n_s_sprites_2); Py_CLEAR(clear_module_state->__pyx_n_s_sprites_append); Py_CLEAR(clear_module_state->__pyx_n_s_sprites_layers); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame__sprite_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_start_time); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_super); Py_CLEAR(clear_module_state->__pyx_n_s_surf); Py_CLEAR(clear_module_state->__pyx_n_s_surf_blit); Py_CLEAR(clear_module_state->__pyx_n_s_surface); Py_CLEAR(clear_module_state->__pyx_n_s_surface_blit); Py_CLEAR(clear_module_state->__pyx_n_s_switch_layer); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_time_ms); Py_CLEAR(clear_module_state->__pyx_n_s_time_threshold); Py_CLEAR(clear_module_state->__pyx_n_s_topleft); Py_CLEAR(clear_module_state->__pyx_n_s_union); Py_CLEAR(clear_module_state->__pyx_n_s_union_ip); Py_CLEAR(clear_module_state->__pyx_n_s_union_rect); Py_CLEAR(clear_module_state->__pyx_n_s_union_rect_collidelist); Py_CLEAR(clear_module_state->__pyx_n_s_union_rect_union_ip); Py_CLEAR(clear_module_state->__pyx_n_s_update); Py_CLEAR(clear_module_state->__pyx_n_s_update_2); Py_CLEAR(clear_module_state->__pyx_n_s_update_append); Py_CLEAR(clear_module_state->__pyx_n_s_use_update); Py_CLEAR(clear_module_state->__pyx_n_s_val); Py_CLEAR(clear_module_state->__pyx_n_s_value); Py_CLEAR(clear_module_state->__pyx_n_s_values); Py_CLEAR(clear_module_state->__pyx_n_s_visible); Py_CLEAR(clear_module_state->__pyx_n_s_visible_2); Py_CLEAR(clear_module_state->__pyx_n_s_width); Py_CLEAR(clear_module_state->__pyx_n_s_xdistance); Py_CLEAR(clear_module_state->__pyx_n_s_xoffset); Py_CLEAR(clear_module_state->__pyx_n_s_ydistance); Py_CLEAR(clear_module_state->__pyx_n_s_yoffset); Py_CLEAR(clear_module_state->__pyx_kp_s_you_can_make_this_sprite_disappe); Py_CLEAR(clear_module_state->__pyx_float_0_5); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_2); Py_CLEAR(clear_module_state->__pyx_int_neg_1); Py_CLEAR(clear_module_state->__pyx_tuple_); Py_CLEAR(clear_module_state->__pyx_tuple__4); Py_CLEAR(clear_module_state->__pyx_tuple__7); Py_CLEAR(clear_module_state->__pyx_tuple__10); Py_CLEAR(clear_module_state->__pyx_tuple__12); Py_CLEAR(clear_module_state->__pyx_tuple__14); Py_CLEAR(clear_module_state->__pyx_tuple__18); Py_CLEAR(clear_module_state->__pyx_tuple__20); Py_CLEAR(clear_module_state->__pyx_tuple__22); Py_CLEAR(clear_module_state->__pyx_tuple__27); Py_CLEAR(clear_module_state->__pyx_tuple__32); Py_CLEAR(clear_module_state->__pyx_tuple__35); Py_CLEAR(clear_module_state->__pyx_tuple__37); Py_CLEAR(clear_module_state->__pyx_tuple__39); Py_CLEAR(clear_module_state->__pyx_tuple__41); Py_CLEAR(clear_module_state->__pyx_tuple__43); Py_CLEAR(clear_module_state->__pyx_tuple__49); Py_CLEAR(clear_module_state->__pyx_tuple__58); Py_CLEAR(clear_module_state->__pyx_tuple__59); Py_CLEAR(clear_module_state->__pyx_tuple__61); Py_CLEAR(clear_module_state->__pyx_tuple__62); Py_CLEAR(clear_module_state->__pyx_tuple__66); Py_CLEAR(clear_module_state->__pyx_tuple__68); Py_CLEAR(clear_module_state->__pyx_tuple__70); Py_CLEAR(clear_module_state->__pyx_tuple__72); Py_CLEAR(clear_module_state->__pyx_tuple__75); Py_CLEAR(clear_module_state->__pyx_tuple__83); Py_CLEAR(clear_module_state->__pyx_tuple__85); Py_CLEAR(clear_module_state->__pyx_tuple__90); Py_CLEAR(clear_module_state->__pyx_tuple__92); Py_CLEAR(clear_module_state->__pyx_tuple__94); Py_CLEAR(clear_module_state->__pyx_tuple__98); Py_CLEAR(clear_module_state->__pyx_codeobj__5); Py_CLEAR(clear_module_state->__pyx_codeobj__6); Py_CLEAR(clear_module_state->__pyx_codeobj__8); Py_CLEAR(clear_module_state->__pyx_codeobj__9); Py_CLEAR(clear_module_state->__pyx_tuple__100); Py_CLEAR(clear_module_state->__pyx_tuple__114); Py_CLEAR(clear_module_state->__pyx_tuple__116); Py_CLEAR(clear_module_state->__pyx_tuple__118); Py_CLEAR(clear_module_state->__pyx_tuple__120); Py_CLEAR(clear_module_state->__pyx_tuple__122); Py_CLEAR(clear_module_state->__pyx_tuple__123); Py_CLEAR(clear_module_state->__pyx_tuple__125); Py_CLEAR(clear_module_state->__pyx_tuple__127); Py_CLEAR(clear_module_state->__pyx_tuple__129); Py_CLEAR(clear_module_state->__pyx_tuple__131); Py_CLEAR(clear_module_state->__pyx_tuple__133); Py_CLEAR(clear_module_state->__pyx_codeobj__11); Py_CLEAR(clear_module_state->__pyx_codeobj__13); Py_CLEAR(clear_module_state->__pyx_codeobj__15); Py_CLEAR(clear_module_state->__pyx_codeobj__16); Py_CLEAR(clear_module_state->__pyx_codeobj__17); Py_CLEAR(clear_module_state->__pyx_codeobj__19); Py_CLEAR(clear_module_state->__pyx_codeobj__21); Py_CLEAR(clear_module_state->__pyx_codeobj__23); Py_CLEAR(clear_module_state->__pyx_codeobj__24); Py_CLEAR(clear_module_state->__pyx_codeobj__25); Py_CLEAR(clear_module_state->__pyx_codeobj__26); Py_CLEAR(clear_module_state->__pyx_codeobj__28); Py_CLEAR(clear_module_state->__pyx_codeobj__29); Py_CLEAR(clear_module_state->__pyx_codeobj__30); Py_CLEAR(clear_module_state->__pyx_codeobj__31); Py_CLEAR(clear_module_state->__pyx_codeobj__33); Py_CLEAR(clear_module_state->__pyx_codeobj__34); Py_CLEAR(clear_module_state->__pyx_codeobj__36); Py_CLEAR(clear_module_state->__pyx_codeobj__38); Py_CLEAR(clear_module_state->__pyx_codeobj__40); Py_CLEAR(clear_module_state->__pyx_codeobj__42); Py_CLEAR(clear_module_state->__pyx_codeobj__44); Py_CLEAR(clear_module_state->__pyx_codeobj__45); Py_CLEAR(clear_module_state->__pyx_codeobj__46); Py_CLEAR(clear_module_state->__pyx_codeobj__47); Py_CLEAR(clear_module_state->__pyx_codeobj__48); Py_CLEAR(clear_module_state->__pyx_codeobj__50); Py_CLEAR(clear_module_state->__pyx_codeobj__51); Py_CLEAR(clear_module_state->__pyx_codeobj__52); Py_CLEAR(clear_module_state->__pyx_codeobj__53); Py_CLEAR(clear_module_state->__pyx_codeobj__54); Py_CLEAR(clear_module_state->__pyx_codeobj__55); Py_CLEAR(clear_module_state->__pyx_codeobj__56); Py_CLEAR(clear_module_state->__pyx_codeobj__57); Py_CLEAR(clear_module_state->__pyx_codeobj__60); Py_CLEAR(clear_module_state->__pyx_codeobj__63); Py_CLEAR(clear_module_state->__pyx_codeobj__64); Py_CLEAR(clear_module_state->__pyx_codeobj__65); Py_CLEAR(clear_module_state->__pyx_codeobj__67); Py_CLEAR(clear_module_state->__pyx_codeobj__69); Py_CLEAR(clear_module_state->__pyx_codeobj__71); Py_CLEAR(clear_module_state->__pyx_codeobj__73); Py_CLEAR(clear_module_state->__pyx_codeobj__74); Py_CLEAR(clear_module_state->__pyx_codeobj__76); Py_CLEAR(clear_module_state->__pyx_codeobj__77); Py_CLEAR(clear_module_state->__pyx_codeobj__78); Py_CLEAR(clear_module_state->__pyx_codeobj__79); Py_CLEAR(clear_module_state->__pyx_codeobj__80); Py_CLEAR(clear_module_state->__pyx_codeobj__81); Py_CLEAR(clear_module_state->__pyx_codeobj__82); Py_CLEAR(clear_module_state->__pyx_codeobj__84); Py_CLEAR(clear_module_state->__pyx_codeobj__86); Py_CLEAR(clear_module_state->__pyx_codeobj__87); Py_CLEAR(clear_module_state->__pyx_codeobj__88); Py_CLEAR(clear_module_state->__pyx_codeobj__89); Py_CLEAR(clear_module_state->__pyx_codeobj__91); Py_CLEAR(clear_module_state->__pyx_codeobj__93); Py_CLEAR(clear_module_state->__pyx_codeobj__95); Py_CLEAR(clear_module_state->__pyx_codeobj__96); Py_CLEAR(clear_module_state->__pyx_codeobj__97); Py_CLEAR(clear_module_state->__pyx_codeobj__99); Py_CLEAR(clear_module_state->__pyx_codeobj__101); Py_CLEAR(clear_module_state->__pyx_codeobj__102); Py_CLEAR(clear_module_state->__pyx_codeobj__103); Py_CLEAR(clear_module_state->__pyx_codeobj__104); Py_CLEAR(clear_module_state->__pyx_codeobj__105); Py_CLEAR(clear_module_state->__pyx_codeobj__106); Py_CLEAR(clear_module_state->__pyx_codeobj__107); Py_CLEAR(clear_module_state->__pyx_codeobj__108); Py_CLEAR(clear_module_state->__pyx_codeobj__109); Py_CLEAR(clear_module_state->__pyx_codeobj__110); Py_CLEAR(clear_module_state->__pyx_codeobj__111); Py_CLEAR(clear_module_state->__pyx_codeobj__112); Py_CLEAR(clear_module_state->__pyx_codeobj__113); Py_CLEAR(clear_module_state->__pyx_codeobj__115); Py_CLEAR(clear_module_state->__pyx_codeobj__117); Py_CLEAR(clear_module_state->__pyx_codeobj__119); Py_CLEAR(clear_module_state->__pyx_codeobj__121); Py_CLEAR(clear_module_state->__pyx_codeobj__124); Py_CLEAR(clear_module_state->__pyx_codeobj__126); Py_CLEAR(clear_module_state->__pyx_codeobj__128); Py_CLEAR(clear_module_state->__pyx_codeobj__130); Py_CLEAR(clear_module_state->__pyx_codeobj__132); Py_CLEAR(clear_module_state->__pyx_codeobj__134); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Color); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Rect); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Window); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Renderer); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Texture); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_5_sdl2_5video_Image); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_Rect); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_AbstractGroup); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_AbstractGroup); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_Sprite); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_Sprite); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_Group); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_Group); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_RenderUpdates); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_RenderUpdates); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_OrderedUpdates); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_OrderedUpdates); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_LayeredUpdates); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_LayeredUpdates); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_LayeredDirty); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_LayeredDirty); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_7_sprite_GroupSingle); Py_VISIT(traverse_module_state->__pyx_type_6pygame_7_sprite_GroupSingle); Py_VISIT(traverse_module_state->__pyx_kp_s_A_callable_class_that_checks_for); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_add); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_clear); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_copy); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_draw); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_empty); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_has); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_has_internal); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_remove); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_sprites); Py_VISIT(traverse_module_state->__pyx_n_s_AbstractGroup_update); Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite___init); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite___repr); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite__get_visible); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite__set_visible); Py_VISIT(traverse_module_state->__pyx_n_s_DirtySprite_lambda); Py_VISIT(traverse_module_state->__pyx_n_s_Group); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle__get_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle__set_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle_copy); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle_has_internal); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_GroupSingle_sprites); Py_VISIT(traverse_module_state->__pyx_n_s_Group___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Group___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_change_layer); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_clear); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_draw); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_get_clip); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_repaint_rect); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_set_clip); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_set_timing_threshol); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredDirty_set_timing_treshold); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_add); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_change_layer); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_draw); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_bottom_layer); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_layer_of_spri); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_sprites_at); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_sprites_from); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_top_layer); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_get_top_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_layers); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_move_to_back); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_move_to_front); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_remove_sprites_of); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_sprites); Py_VISIT(traverse_module_state->__pyx_n_s_LayeredUpdates_switch_layer); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedUpdates_sprites); Py_VISIT(traverse_module_state->__pyx_n_s_Rect); Py_VISIT(traverse_module_state->__pyx_n_s_RenderClear); Py_VISIT(traverse_module_state->__pyx_n_s_RenderPlain); Py_VISIT(traverse_module_state->__pyx_n_s_RenderUpdates); Py_VISIT(traverse_module_state->__pyx_n_s_RenderUpdates___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_RenderUpdates___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_RenderUpdates_draw); Py_VISIT(traverse_module_state->__pyx_n_s_SC); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_add); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_alive); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_groups); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_kill); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_remove); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_Sprite_update); Py_VISIT(traverse_module_state->__pyx_kp_s_The_sprite_contained_in_this_gro); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_n_s__135); Py_VISIT(traverse_module_state->__pyx_n_s__2); Py_VISIT(traverse_module_state->__pyx_kp_u__3); Py_VISIT(traverse_module_state->__pyx_kp_s_a_more_featureful_subclass_of_Sp); Py_VISIT(traverse_module_state->__pyx_n_s_add); Py_VISIT(traverse_module_state->__pyx_n_s_add_internal); Py_VISIT(traverse_module_state->__pyx_n_s_alive); Py_VISIT(traverse_module_state->__pyx_n_s_append); Py_VISIT(traverse_module_state->__pyx_n_s_args); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_bgd); Py_VISIT(traverse_module_state->__pyx_n_s_bgd_2); Py_VISIT(traverse_module_state->__pyx_n_s_blendmode); Py_VISIT(traverse_module_state->__pyx_n_s_blit); Py_VISIT(traverse_module_state->__pyx_n_s_builtins); Py_VISIT(traverse_module_state->__pyx_n_s_c); Py_VISIT(traverse_module_state->__pyx_n_s_call); Py_VISIT(traverse_module_state->__pyx_n_s_callable); Py_VISIT(traverse_module_state->__pyx_n_s_centerx); Py_VISIT(traverse_module_state->__pyx_n_s_centery); Py_VISIT(traverse_module_state->__pyx_n_s_change_layer); Py_VISIT(traverse_module_state->__pyx_n_s_class); Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); Py_VISIT(traverse_module_state->__pyx_n_s_clear); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_clip); Py_VISIT(traverse_module_state->__pyx_n_s_clip_2); Py_VISIT(traverse_module_state->__pyx_n_s_collide_circle); Py_VISIT(traverse_module_state->__pyx_n_s_collide_circle_ratio); Py_VISIT(traverse_module_state->__pyx_n_s_collide_circle_ratio___call); Py_VISIT(traverse_module_state->__pyx_n_s_collide_circle_ratio___init); Py_VISIT(traverse_module_state->__pyx_n_s_collide_mask); Py_VISIT(traverse_module_state->__pyx_n_s_collide_rect); Py_VISIT(traverse_module_state->__pyx_n_s_collide_rect_ratio); Py_VISIT(traverse_module_state->__pyx_n_s_collide_rect_ratio___call); Py_VISIT(traverse_module_state->__pyx_n_s_collide_rect_ratio___init); Py_VISIT(traverse_module_state->__pyx_n_s_collided); Py_VISIT(traverse_module_state->__pyx_n_s_collidelist); Py_VISIT(traverse_module_state->__pyx_n_s_collidelistall); Py_VISIT(traverse_module_state->__pyx_n_s_colliderect); Py_VISIT(traverse_module_state->__pyx_n_s_colliding); Py_VISIT(traverse_module_state->__pyx_n_s_colliding_idx); Py_VISIT(traverse_module_state->__pyx_n_s_contains); Py_VISIT(traverse_module_state->__pyx_n_s_copy); Py_VISIT(traverse_module_state->__pyx_n_s_crashed); Py_VISIT(traverse_module_state->__pyx_n_s_default_layer); Py_VISIT(traverse_module_state->__pyx_n_s_default_layer_2); Py_VISIT(traverse_module_state->__pyx_kp_s_detect_collision_between_two_spr); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_n_s_dirty); Py_VISIT(traverse_module_state->__pyx_n_s_dirty_append); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_display); Py_VISIT(traverse_module_state->__pyx_n_s_distancesquared); Py_VISIT(traverse_module_state->__pyx_n_s_doc); Py_VISIT(traverse_module_state->__pyx_n_s_doc_2); Py_VISIT(traverse_module_state->__pyx_n_s_dokill); Py_VISIT(traverse_module_state->__pyx_n_s_dokilla); Py_VISIT(traverse_module_state->__pyx_n_s_dokillb); Py_VISIT(traverse_module_state->__pyx_n_s_draw); Py_VISIT(traverse_module_state->__pyx_n_s_empty); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_end_time); Py_VISIT(traverse_module_state->__pyx_n_s_from_surface); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_get); Py_VISIT(traverse_module_state->__pyx_n_s_get_bottom_layer); Py_VISIT(traverse_module_state->__pyx_n_s_get_clip); Py_VISIT(traverse_module_state->__pyx_n_s_get_layer_of_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_get_rect); Py_VISIT(traverse_module_state->__pyx_n_s_get_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_get_sprite_2); Py_VISIT(traverse_module_state->__pyx_n_s_get_sprites_at); Py_VISIT(traverse_module_state->__pyx_n_s_get_sprites_from_layer); Py_VISIT(traverse_module_state->__pyx_n_s_get_surface); Py_VISIT(traverse_module_state->__pyx_n_s_get_ticks); Py_VISIT(traverse_module_state->__pyx_n_s_get_top_layer); Py_VISIT(traverse_module_state->__pyx_n_s_get_top_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_get_visible); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_n_s_group); Py_VISIT(traverse_module_state->__pyx_n_s_groupa); Py_VISIT(traverse_module_state->__pyx_n_s_groupb); Py_VISIT(traverse_module_state->__pyx_n_s_groupcollide); Py_VISIT(traverse_module_state->__pyx_n_s_groups); Py_VISIT(traverse_module_state->__pyx_n_s_has); Py_VISIT(traverse_module_state->__pyx_n_s_has_internal); Py_VISIT(traverse_module_state->__pyx_n_s_height); Py_VISIT(traverse_module_state->__pyx_n_s_high); Py_VISIT(traverse_module_state->__pyx_n_s_i); Py_VISIT(traverse_module_state->__pyx_n_s_idx); Py_VISIT(traverse_module_state->__pyx_n_s_image); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_inflate); Py_VISIT(traverse_module_state->__pyx_n_s_init); Py_VISIT(traverse_module_state->__pyx_n_s_init_rect); Py_VISIT(traverse_module_state->__pyx_n_s_init_rect_2); Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_items); Py_VISIT(traverse_module_state->__pyx_n_s_kill); Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); Py_VISIT(traverse_module_state->__pyx_n_s_lambda); Py_VISIT(traverse_module_state->__pyx_n_s_layer); Py_VISIT(traverse_module_state->__pyx_n_s_layer1_nr); Py_VISIT(traverse_module_state->__pyx_n_s_layer2_nr); Py_VISIT(traverse_module_state->__pyx_n_s_layer_2); Py_VISIT(traverse_module_state->__pyx_n_s_layer_nr); Py_VISIT(traverse_module_state->__pyx_n_s_layers); Py_VISIT(traverse_module_state->__pyx_n_s_left); Py_VISIT(traverse_module_state->__pyx_n_s_leftmask); Py_VISIT(traverse_module_state->__pyx_n_s_leftradius); Py_VISIT(traverse_module_state->__pyx_n_s_leftrect); Py_VISIT(traverse_module_state->__pyx_n_s_leng); Py_VISIT(traverse_module_state->__pyx_n_s_low); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_mask); Py_VISIT(traverse_module_state->__pyx_n_s_metaclass); Py_VISIT(traverse_module_state->__pyx_n_s_mid); Py_VISIT(traverse_module_state->__pyx_n_s_module); Py_VISIT(traverse_module_state->__pyx_n_s_move_to_back); Py_VISIT(traverse_module_state->__pyx_n_s_move_to_front); Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_new_layer); Py_VISIT(traverse_module_state->__pyx_n_s_newrect); Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_object); Py_VISIT(traverse_module_state->__pyx_n_s_old_rect); Py_VISIT(traverse_module_state->__pyx_n_s_orig_clip); Py_VISIT(traverse_module_state->__pyx_n_s_overlap); Py_VISIT(traverse_module_state->__pyx_n_s_pop); Py_VISIT(traverse_module_state->__pyx_n_s_pos); Py_VISIT(traverse_module_state->__pyx_n_s_prepare); Py_VISIT(traverse_module_state->__pyx_n_s_property); Py_VISIT(traverse_module_state->__pyx_n_s_pygame); Py_VISIT(traverse_module_state->__pyx_n_s_pygame__sprite); Py_VISIT(traverse_module_state->__pyx_n_s_pygame_mask); Py_VISIT(traverse_module_state->__pyx_n_s_pygame_time); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); Py_VISIT(traverse_module_state->__pyx_n_s_qualname); Py_VISIT(traverse_module_state->__pyx_n_s_r); Py_VISIT(traverse_module_state->__pyx_n_s_radius); Py_VISIT(traverse_module_state->__pyx_n_s_ratio); Py_VISIT(traverse_module_state->__pyx_n_s_rec); Py_VISIT(traverse_module_state->__pyx_n_s_rect); Py_VISIT(traverse_module_state->__pyx_n_s_rect_2); Py_VISIT(traverse_module_state->__pyx_n_s_rect_offset_x); Py_VISIT(traverse_module_state->__pyx_n_s_rect_offset_y); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_remove); Py_VISIT(traverse_module_state->__pyx_n_s_remove_internal); Py_VISIT(traverse_module_state->__pyx_n_s_remove_sprites_of_layer); Py_VISIT(traverse_module_state->__pyx_n_s_repaint_rect); Py_VISIT(traverse_module_state->__pyx_n_s_repr); Py_VISIT(traverse_module_state->__pyx_n_s_ret); Py_VISIT(traverse_module_state->__pyx_n_s_ret_2); Py_VISIT(traverse_module_state->__pyx_n_s_return_value); Py_VISIT(traverse_module_state->__pyx_n_s_right); Py_VISIT(traverse_module_state->__pyx_n_s_rightmask); Py_VISIT(traverse_module_state->__pyx_n_s_rightradius); Py_VISIT(traverse_module_state->__pyx_n_s_rightrect); Py_VISIT(traverse_module_state->__pyx_n_s_s); Py_VISIT(traverse_module_state->__pyx_kp_s_s_DirtySprite_in_d_groups); Py_VISIT(traverse_module_state->__pyx_kp_s_s_d_sprites); Py_VISIT(traverse_module_state->__pyx_kp_s_s_sprite_in_d_groups); Py_VISIT(traverse_module_state->__pyx_n_s_screen_rect); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_n_s_set_clip); Py_VISIT(traverse_module_state->__pyx_n_s_set_name); Py_VISIT(traverse_module_state->__pyx_n_s_set_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_set_timing_threshold); Py_VISIT(traverse_module_state->__pyx_n_s_set_timing_treshold); Py_VISIT(traverse_module_state->__pyx_n_s_set_visible); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_size); Py_VISIT(traverse_module_state->__pyx_n_s_source_rect); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_n_s_spr); Py_VISIT(traverse_module_state->__pyx_n_s_spr_rect); Py_VISIT(traverse_module_state->__pyx_n_s_spr_rect_clip); Py_VISIT(traverse_module_state->__pyx_n_s_sprite); Py_VISIT(traverse_module_state->__pyx_n_s_sprite_layers); Py_VISIT(traverse_module_state->__pyx_n_s_spritecollide); Py_VISIT(traverse_module_state->__pyx_n_s_spritecollideany); Py_VISIT(traverse_module_state->__pyx_n_s_spritedict); Py_VISIT(traverse_module_state->__pyx_n_s_spritegroup); Py_VISIT(traverse_module_state->__pyx_n_s_sprites); Py_VISIT(traverse_module_state->__pyx_n_s_sprites1); Py_VISIT(traverse_module_state->__pyx_n_s_sprites_2); Py_VISIT(traverse_module_state->__pyx_n_s_sprites_append); Py_VISIT(traverse_module_state->__pyx_n_s_sprites_layers); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame__sprite_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_start_time); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_super); Py_VISIT(traverse_module_state->__pyx_n_s_surf); Py_VISIT(traverse_module_state->__pyx_n_s_surf_blit); Py_VISIT(traverse_module_state->__pyx_n_s_surface); Py_VISIT(traverse_module_state->__pyx_n_s_surface_blit); Py_VISIT(traverse_module_state->__pyx_n_s_switch_layer); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_time_ms); Py_VISIT(traverse_module_state->__pyx_n_s_time_threshold); Py_VISIT(traverse_module_state->__pyx_n_s_topleft); Py_VISIT(traverse_module_state->__pyx_n_s_union); Py_VISIT(traverse_module_state->__pyx_n_s_union_ip); Py_VISIT(traverse_module_state->__pyx_n_s_union_rect); Py_VISIT(traverse_module_state->__pyx_n_s_union_rect_collidelist); Py_VISIT(traverse_module_state->__pyx_n_s_union_rect_union_ip); Py_VISIT(traverse_module_state->__pyx_n_s_update); Py_VISIT(traverse_module_state->__pyx_n_s_update_2); Py_VISIT(traverse_module_state->__pyx_n_s_update_append); Py_VISIT(traverse_module_state->__pyx_n_s_use_update); Py_VISIT(traverse_module_state->__pyx_n_s_val); Py_VISIT(traverse_module_state->__pyx_n_s_value); Py_VISIT(traverse_module_state->__pyx_n_s_values); Py_VISIT(traverse_module_state->__pyx_n_s_visible); Py_VISIT(traverse_module_state->__pyx_n_s_visible_2); Py_VISIT(traverse_module_state->__pyx_n_s_width); Py_VISIT(traverse_module_state->__pyx_n_s_xdistance); Py_VISIT(traverse_module_state->__pyx_n_s_xoffset); Py_VISIT(traverse_module_state->__pyx_n_s_ydistance); Py_VISIT(traverse_module_state->__pyx_n_s_yoffset); Py_VISIT(traverse_module_state->__pyx_kp_s_you_can_make_this_sprite_disappe); Py_VISIT(traverse_module_state->__pyx_float_0_5); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_2); Py_VISIT(traverse_module_state->__pyx_int_neg_1); Py_VISIT(traverse_module_state->__pyx_tuple_); Py_VISIT(traverse_module_state->__pyx_tuple__4); Py_VISIT(traverse_module_state->__pyx_tuple__7); Py_VISIT(traverse_module_state->__pyx_tuple__10); Py_VISIT(traverse_module_state->__pyx_tuple__12); Py_VISIT(traverse_module_state->__pyx_tuple__14); Py_VISIT(traverse_module_state->__pyx_tuple__18); Py_VISIT(traverse_module_state->__pyx_tuple__20); Py_VISIT(traverse_module_state->__pyx_tuple__22); Py_VISIT(traverse_module_state->__pyx_tuple__27); Py_VISIT(traverse_module_state->__pyx_tuple__32); Py_VISIT(traverse_module_state->__pyx_tuple__35); Py_VISIT(traverse_module_state->__pyx_tuple__37); Py_VISIT(traverse_module_state->__pyx_tuple__39); Py_VISIT(traverse_module_state->__pyx_tuple__41); Py_VISIT(traverse_module_state->__pyx_tuple__43); Py_VISIT(traverse_module_state->__pyx_tuple__49); Py_VISIT(traverse_module_state->__pyx_tuple__58); Py_VISIT(traverse_module_state->__pyx_tuple__59); Py_VISIT(traverse_module_state->__pyx_tuple__61); Py_VISIT(traverse_module_state->__pyx_tuple__62); Py_VISIT(traverse_module_state->__pyx_tuple__66); Py_VISIT(traverse_module_state->__pyx_tuple__68); Py_VISIT(traverse_module_state->__pyx_tuple__70); Py_VISIT(traverse_module_state->__pyx_tuple__72); Py_VISIT(traverse_module_state->__pyx_tuple__75); Py_VISIT(traverse_module_state->__pyx_tuple__83); Py_VISIT(traverse_module_state->__pyx_tuple__85); Py_VISIT(traverse_module_state->__pyx_tuple__90); Py_VISIT(traverse_module_state->__pyx_tuple__92); Py_VISIT(traverse_module_state->__pyx_tuple__94); Py_VISIT(traverse_module_state->__pyx_tuple__98); Py_VISIT(traverse_module_state->__pyx_codeobj__5); Py_VISIT(traverse_module_state->__pyx_codeobj__6); Py_VISIT(traverse_module_state->__pyx_codeobj__8); Py_VISIT(traverse_module_state->__pyx_codeobj__9); Py_VISIT(traverse_module_state->__pyx_tuple__100); Py_VISIT(traverse_module_state->__pyx_tuple__114); Py_VISIT(traverse_module_state->__pyx_tuple__116); Py_VISIT(traverse_module_state->__pyx_tuple__118); Py_VISIT(traverse_module_state->__pyx_tuple__120); Py_VISIT(traverse_module_state->__pyx_tuple__122); Py_VISIT(traverse_module_state->__pyx_tuple__123); Py_VISIT(traverse_module_state->__pyx_tuple__125); Py_VISIT(traverse_module_state->__pyx_tuple__127); Py_VISIT(traverse_module_state->__pyx_tuple__129); Py_VISIT(traverse_module_state->__pyx_tuple__131); Py_VISIT(traverse_module_state->__pyx_tuple__133); Py_VISIT(traverse_module_state->__pyx_codeobj__11); Py_VISIT(traverse_module_state->__pyx_codeobj__13); Py_VISIT(traverse_module_state->__pyx_codeobj__15); Py_VISIT(traverse_module_state->__pyx_codeobj__16); Py_VISIT(traverse_module_state->__pyx_codeobj__17); Py_VISIT(traverse_module_state->__pyx_codeobj__19); Py_VISIT(traverse_module_state->__pyx_codeobj__21); Py_VISIT(traverse_module_state->__pyx_codeobj__23); Py_VISIT(traverse_module_state->__pyx_codeobj__24); Py_VISIT(traverse_module_state->__pyx_codeobj__25); Py_VISIT(traverse_module_state->__pyx_codeobj__26); Py_VISIT(traverse_module_state->__pyx_codeobj__28); Py_VISIT(traverse_module_state->__pyx_codeobj__29); Py_VISIT(traverse_module_state->__pyx_codeobj__30); Py_VISIT(traverse_module_state->__pyx_codeobj__31); Py_VISIT(traverse_module_state->__pyx_codeobj__33); Py_VISIT(traverse_module_state->__pyx_codeobj__34); Py_VISIT(traverse_module_state->__pyx_codeobj__36); Py_VISIT(traverse_module_state->__pyx_codeobj__38); Py_VISIT(traverse_module_state->__pyx_codeobj__40); Py_VISIT(traverse_module_state->__pyx_codeobj__42); Py_VISIT(traverse_module_state->__pyx_codeobj__44); Py_VISIT(traverse_module_state->__pyx_codeobj__45); Py_VISIT(traverse_module_state->__pyx_codeobj__46); Py_VISIT(traverse_module_state->__pyx_codeobj__47); Py_VISIT(traverse_module_state->__pyx_codeobj__48); Py_VISIT(traverse_module_state->__pyx_codeobj__50); Py_VISIT(traverse_module_state->__pyx_codeobj__51); Py_VISIT(traverse_module_state->__pyx_codeobj__52); Py_VISIT(traverse_module_state->__pyx_codeobj__53); Py_VISIT(traverse_module_state->__pyx_codeobj__54); Py_VISIT(traverse_module_state->__pyx_codeobj__55); Py_VISIT(traverse_module_state->__pyx_codeobj__56); Py_VISIT(traverse_module_state->__pyx_codeobj__57); Py_VISIT(traverse_module_state->__pyx_codeobj__60); Py_VISIT(traverse_module_state->__pyx_codeobj__63); Py_VISIT(traverse_module_state->__pyx_codeobj__64); Py_VISIT(traverse_module_state->__pyx_codeobj__65); Py_VISIT(traverse_module_state->__pyx_codeobj__67); Py_VISIT(traverse_module_state->__pyx_codeobj__69); Py_VISIT(traverse_module_state->__pyx_codeobj__71); Py_VISIT(traverse_module_state->__pyx_codeobj__73); Py_VISIT(traverse_module_state->__pyx_codeobj__74); Py_VISIT(traverse_module_state->__pyx_codeobj__76); Py_VISIT(traverse_module_state->__pyx_codeobj__77); Py_VISIT(traverse_module_state->__pyx_codeobj__78); Py_VISIT(traverse_module_state->__pyx_codeobj__79); Py_VISIT(traverse_module_state->__pyx_codeobj__80); Py_VISIT(traverse_module_state->__pyx_codeobj__81); Py_VISIT(traverse_module_state->__pyx_codeobj__82); Py_VISIT(traverse_module_state->__pyx_codeobj__84); Py_VISIT(traverse_module_state->__pyx_codeobj__86); Py_VISIT(traverse_module_state->__pyx_codeobj__87); Py_VISIT(traverse_module_state->__pyx_codeobj__88); Py_VISIT(traverse_module_state->__pyx_codeobj__89); Py_VISIT(traverse_module_state->__pyx_codeobj__91); Py_VISIT(traverse_module_state->__pyx_codeobj__93); Py_VISIT(traverse_module_state->__pyx_codeobj__95); Py_VISIT(traverse_module_state->__pyx_codeobj__96); Py_VISIT(traverse_module_state->__pyx_codeobj__97); Py_VISIT(traverse_module_state->__pyx_codeobj__99); Py_VISIT(traverse_module_state->__pyx_codeobj__101); Py_VISIT(traverse_module_state->__pyx_codeobj__102); Py_VISIT(traverse_module_state->__pyx_codeobj__103); Py_VISIT(traverse_module_state->__pyx_codeobj__104); Py_VISIT(traverse_module_state->__pyx_codeobj__105); Py_VISIT(traverse_module_state->__pyx_codeobj__106); Py_VISIT(traverse_module_state->__pyx_codeobj__107); Py_VISIT(traverse_module_state->__pyx_codeobj__108); Py_VISIT(traverse_module_state->__pyx_codeobj__109); Py_VISIT(traverse_module_state->__pyx_codeobj__110); Py_VISIT(traverse_module_state->__pyx_codeobj__111); Py_VISIT(traverse_module_state->__pyx_codeobj__112); Py_VISIT(traverse_module_state->__pyx_codeobj__113); Py_VISIT(traverse_module_state->__pyx_codeobj__115); Py_VISIT(traverse_module_state->__pyx_codeobj__117); Py_VISIT(traverse_module_state->__pyx_codeobj__119); Py_VISIT(traverse_module_state->__pyx_codeobj__121); Py_VISIT(traverse_module_state->__pyx_codeobj__124); Py_VISIT(traverse_module_state->__pyx_codeobj__126); Py_VISIT(traverse_module_state->__pyx_codeobj__128); Py_VISIT(traverse_module_state->__pyx_codeobj__130); Py_VISIT(traverse_module_state->__pyx_codeobj__132); Py_VISIT(traverse_module_state->__pyx_codeobj__134); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE #endif #define __pyx_ptype_6pygame_5_sdl2_5video_Color __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Color #define __pyx_ptype_6pygame_5_sdl2_5video_Rect __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Rect #define __pyx_ptype_6pygame_5_sdl2_5video_Window __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Window #define __pyx_ptype_6pygame_5_sdl2_5video_Renderer __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Renderer #define __pyx_ptype_6pygame_5_sdl2_5video_Texture __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Texture #define __pyx_ptype_6pygame_5_sdl2_5video_Image __pyx_mstate_global->__pyx_ptype_6pygame_5_sdl2_5video_Image #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_7_sprite_AbstractGroup __pyx_mstate_global->__pyx_type_6pygame_7_sprite_AbstractGroup #define __pyx_type_6pygame_7_sprite_Sprite __pyx_mstate_global->__pyx_type_6pygame_7_sprite_Sprite #define __pyx_type_6pygame_7_sprite_Group __pyx_mstate_global->__pyx_type_6pygame_7_sprite_Group #define __pyx_type_6pygame_7_sprite_RenderUpdates __pyx_mstate_global->__pyx_type_6pygame_7_sprite_RenderUpdates #define __pyx_type_6pygame_7_sprite_OrderedUpdates __pyx_mstate_global->__pyx_type_6pygame_7_sprite_OrderedUpdates #define __pyx_type_6pygame_7_sprite_LayeredUpdates __pyx_mstate_global->__pyx_type_6pygame_7_sprite_LayeredUpdates #define __pyx_type_6pygame_7_sprite_LayeredDirty __pyx_mstate_global->__pyx_type_6pygame_7_sprite_LayeredDirty #define __pyx_type_6pygame_7_sprite_GroupSingle __pyx_mstate_global->__pyx_type_6pygame_7_sprite_GroupSingle #endif #define __pyx_ptype_6pygame_7_sprite_Rect __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_Rect #define __pyx_ptype_6pygame_7_sprite_AbstractGroup __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_AbstractGroup #define __pyx_ptype_6pygame_7_sprite_Sprite __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_Sprite #define __pyx_ptype_6pygame_7_sprite_Group __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_Group #define __pyx_ptype_6pygame_7_sprite_RenderUpdates __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_RenderUpdates #define __pyx_ptype_6pygame_7_sprite_OrderedUpdates __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_OrderedUpdates #define __pyx_ptype_6pygame_7_sprite_LayeredUpdates __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_LayeredUpdates #define __pyx_ptype_6pygame_7_sprite_LayeredDirty __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_LayeredDirty #define __pyx_ptype_6pygame_7_sprite_GroupSingle __pyx_mstate_global->__pyx_ptype_6pygame_7_sprite_GroupSingle #define __pyx_kp_s_A_callable_class_that_checks_for __pyx_mstate_global->__pyx_kp_s_A_callable_class_that_checks_for #define __pyx_n_s_AbstractGroup __pyx_mstate_global->__pyx_n_s_AbstractGroup #define __pyx_n_s_AbstractGroup___reduce_cython __pyx_mstate_global->__pyx_n_s_AbstractGroup___reduce_cython #define __pyx_n_s_AbstractGroup___setstate_cython __pyx_mstate_global->__pyx_n_s_AbstractGroup___setstate_cython #define __pyx_n_s_AbstractGroup_add __pyx_mstate_global->__pyx_n_s_AbstractGroup_add #define __pyx_n_s_AbstractGroup_add_internal __pyx_mstate_global->__pyx_n_s_AbstractGroup_add_internal #define __pyx_n_s_AbstractGroup_clear __pyx_mstate_global->__pyx_n_s_AbstractGroup_clear #define __pyx_n_s_AbstractGroup_copy __pyx_mstate_global->__pyx_n_s_AbstractGroup_copy #define __pyx_n_s_AbstractGroup_draw __pyx_mstate_global->__pyx_n_s_AbstractGroup_draw #define __pyx_n_s_AbstractGroup_empty __pyx_mstate_global->__pyx_n_s_AbstractGroup_empty #define __pyx_n_s_AbstractGroup_has __pyx_mstate_global->__pyx_n_s_AbstractGroup_has #define __pyx_n_s_AbstractGroup_has_internal __pyx_mstate_global->__pyx_n_s_AbstractGroup_has_internal #define __pyx_n_s_AbstractGroup_remove __pyx_mstate_global->__pyx_n_s_AbstractGroup_remove #define __pyx_n_s_AbstractGroup_remove_internal __pyx_mstate_global->__pyx_n_s_AbstractGroup_remove_internal #define __pyx_n_s_AbstractGroup_sprites __pyx_mstate_global->__pyx_n_s_AbstractGroup_sprites #define __pyx_n_s_AbstractGroup_update __pyx_mstate_global->__pyx_n_s_AbstractGroup_update #define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError #define __pyx_n_s_DirtySprite __pyx_mstate_global->__pyx_n_s_DirtySprite #define __pyx_n_s_DirtySprite___init __pyx_mstate_global->__pyx_n_s_DirtySprite___init #define __pyx_n_s_DirtySprite___repr __pyx_mstate_global->__pyx_n_s_DirtySprite___repr #define __pyx_n_s_DirtySprite__get_visible __pyx_mstate_global->__pyx_n_s_DirtySprite__get_visible #define __pyx_n_s_DirtySprite__set_visible __pyx_mstate_global->__pyx_n_s_DirtySprite__set_visible #define __pyx_n_s_DirtySprite_lambda __pyx_mstate_global->__pyx_n_s_DirtySprite_lambda #define __pyx_n_s_Group __pyx_mstate_global->__pyx_n_s_Group #define __pyx_n_s_GroupSingle __pyx_mstate_global->__pyx_n_s_GroupSingle #define __pyx_n_s_GroupSingle___reduce_cython __pyx_mstate_global->__pyx_n_s_GroupSingle___reduce_cython #define __pyx_n_s_GroupSingle___setstate_cython __pyx_mstate_global->__pyx_n_s_GroupSingle___setstate_cython #define __pyx_n_s_GroupSingle__get_sprite __pyx_mstate_global->__pyx_n_s_GroupSingle__get_sprite #define __pyx_n_s_GroupSingle__set_sprite __pyx_mstate_global->__pyx_n_s_GroupSingle__set_sprite #define __pyx_n_s_GroupSingle_add_internal __pyx_mstate_global->__pyx_n_s_GroupSingle_add_internal #define __pyx_n_s_GroupSingle_copy __pyx_mstate_global->__pyx_n_s_GroupSingle_copy #define __pyx_n_s_GroupSingle_has_internal __pyx_mstate_global->__pyx_n_s_GroupSingle_has_internal #define __pyx_n_s_GroupSingle_remove_internal __pyx_mstate_global->__pyx_n_s_GroupSingle_remove_internal #define __pyx_n_s_GroupSingle_sprites __pyx_mstate_global->__pyx_n_s_GroupSingle_sprites #define __pyx_n_s_Group___reduce_cython __pyx_mstate_global->__pyx_n_s_Group___reduce_cython #define __pyx_n_s_Group___setstate_cython __pyx_mstate_global->__pyx_n_s_Group___setstate_cython #define __pyx_n_s_LayeredDirty __pyx_mstate_global->__pyx_n_s_LayeredDirty #define __pyx_n_s_LayeredDirty___reduce_cython __pyx_mstate_global->__pyx_n_s_LayeredDirty___reduce_cython #define __pyx_n_s_LayeredDirty___setstate_cython __pyx_mstate_global->__pyx_n_s_LayeredDirty___setstate_cython #define __pyx_n_s_LayeredDirty_add_internal __pyx_mstate_global->__pyx_n_s_LayeredDirty_add_internal #define __pyx_n_s_LayeredDirty_change_layer __pyx_mstate_global->__pyx_n_s_LayeredDirty_change_layer #define __pyx_n_s_LayeredDirty_clear __pyx_mstate_global->__pyx_n_s_LayeredDirty_clear #define __pyx_n_s_LayeredDirty_draw __pyx_mstate_global->__pyx_n_s_LayeredDirty_draw #define __pyx_n_s_LayeredDirty_get_clip __pyx_mstate_global->__pyx_n_s_LayeredDirty_get_clip #define __pyx_n_s_LayeredDirty_repaint_rect __pyx_mstate_global->__pyx_n_s_LayeredDirty_repaint_rect #define __pyx_n_s_LayeredDirty_set_clip __pyx_mstate_global->__pyx_n_s_LayeredDirty_set_clip #define __pyx_n_s_LayeredDirty_set_timing_threshol __pyx_mstate_global->__pyx_n_s_LayeredDirty_set_timing_threshol #define __pyx_n_s_LayeredDirty_set_timing_treshold __pyx_mstate_global->__pyx_n_s_LayeredDirty_set_timing_treshold #define __pyx_n_s_LayeredUpdates __pyx_mstate_global->__pyx_n_s_LayeredUpdates #define __pyx_n_s_LayeredUpdates___reduce_cython __pyx_mstate_global->__pyx_n_s_LayeredUpdates___reduce_cython #define __pyx_n_s_LayeredUpdates___setstate_cython __pyx_mstate_global->__pyx_n_s_LayeredUpdates___setstate_cython #define __pyx_n_s_LayeredUpdates_add __pyx_mstate_global->__pyx_n_s_LayeredUpdates_add #define __pyx_n_s_LayeredUpdates_add_internal __pyx_mstate_global->__pyx_n_s_LayeredUpdates_add_internal #define __pyx_n_s_LayeredUpdates_change_layer __pyx_mstate_global->__pyx_n_s_LayeredUpdates_change_layer #define __pyx_n_s_LayeredUpdates_draw __pyx_mstate_global->__pyx_n_s_LayeredUpdates_draw #define __pyx_n_s_LayeredUpdates_get_bottom_layer __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_bottom_layer #define __pyx_n_s_LayeredUpdates_get_layer_of_spri __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_layer_of_spri #define __pyx_n_s_LayeredUpdates_get_sprite __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_sprite #define __pyx_n_s_LayeredUpdates_get_sprites_at __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_sprites_at #define __pyx_n_s_LayeredUpdates_get_sprites_from __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_sprites_from #define __pyx_n_s_LayeredUpdates_get_top_layer __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_top_layer #define __pyx_n_s_LayeredUpdates_get_top_sprite __pyx_mstate_global->__pyx_n_s_LayeredUpdates_get_top_sprite #define __pyx_n_s_LayeredUpdates_layers __pyx_mstate_global->__pyx_n_s_LayeredUpdates_layers #define __pyx_n_s_LayeredUpdates_move_to_back __pyx_mstate_global->__pyx_n_s_LayeredUpdates_move_to_back #define __pyx_n_s_LayeredUpdates_move_to_front __pyx_mstate_global->__pyx_n_s_LayeredUpdates_move_to_front #define __pyx_n_s_LayeredUpdates_remove_internal __pyx_mstate_global->__pyx_n_s_LayeredUpdates_remove_internal #define __pyx_n_s_LayeredUpdates_remove_sprites_of __pyx_mstate_global->__pyx_n_s_LayeredUpdates_remove_sprites_of #define __pyx_n_s_LayeredUpdates_sprites __pyx_mstate_global->__pyx_n_s_LayeredUpdates_sprites #define __pyx_n_s_LayeredUpdates_switch_layer __pyx_mstate_global->__pyx_n_s_LayeredUpdates_switch_layer #define __pyx_n_s_OrderedUpdates __pyx_mstate_global->__pyx_n_s_OrderedUpdates #define __pyx_n_s_OrderedUpdates___reduce_cython __pyx_mstate_global->__pyx_n_s_OrderedUpdates___reduce_cython #define __pyx_n_s_OrderedUpdates___setstate_cython __pyx_mstate_global->__pyx_n_s_OrderedUpdates___setstate_cython #define __pyx_n_s_OrderedUpdates_add_internal __pyx_mstate_global->__pyx_n_s_OrderedUpdates_add_internal #define __pyx_n_s_OrderedUpdates_remove_internal __pyx_mstate_global->__pyx_n_s_OrderedUpdates_remove_internal #define __pyx_n_s_OrderedUpdates_sprites __pyx_mstate_global->__pyx_n_s_OrderedUpdates_sprites #define __pyx_n_s_Rect __pyx_mstate_global->__pyx_n_s_Rect #define __pyx_n_s_RenderClear __pyx_mstate_global->__pyx_n_s_RenderClear #define __pyx_n_s_RenderPlain __pyx_mstate_global->__pyx_n_s_RenderPlain #define __pyx_n_s_RenderUpdates __pyx_mstate_global->__pyx_n_s_RenderUpdates #define __pyx_n_s_RenderUpdates___reduce_cython __pyx_mstate_global->__pyx_n_s_RenderUpdates___reduce_cython #define __pyx_n_s_RenderUpdates___setstate_cython __pyx_mstate_global->__pyx_n_s_RenderUpdates___setstate_cython #define __pyx_n_s_RenderUpdates_draw __pyx_mstate_global->__pyx_n_s_RenderUpdates_draw #define __pyx_n_s_SC __pyx_mstate_global->__pyx_n_s_SC #define __pyx_n_s_Sprite __pyx_mstate_global->__pyx_n_s_Sprite #define __pyx_n_s_Sprite___reduce_cython __pyx_mstate_global->__pyx_n_s_Sprite___reduce_cython #define __pyx_n_s_Sprite___setstate_cython __pyx_mstate_global->__pyx_n_s_Sprite___setstate_cython #define __pyx_n_s_Sprite_add __pyx_mstate_global->__pyx_n_s_Sprite_add #define __pyx_n_s_Sprite_add_internal __pyx_mstate_global->__pyx_n_s_Sprite_add_internal #define __pyx_n_s_Sprite_alive __pyx_mstate_global->__pyx_n_s_Sprite_alive #define __pyx_n_s_Sprite_groups __pyx_mstate_global->__pyx_n_s_Sprite_groups #define __pyx_n_s_Sprite_kill __pyx_mstate_global->__pyx_n_s_Sprite_kill #define __pyx_n_s_Sprite_remove __pyx_mstate_global->__pyx_n_s_Sprite_remove #define __pyx_n_s_Sprite_remove_internal __pyx_mstate_global->__pyx_n_s_Sprite_remove_internal #define __pyx_n_s_Sprite_update __pyx_mstate_global->__pyx_n_s_Sprite_update #define __pyx_kp_s_The_sprite_contained_in_this_gro __pyx_mstate_global->__pyx_kp_s_The_sprite_contained_in_this_gro #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_n_s__135 __pyx_mstate_global->__pyx_n_s__135 #define __pyx_n_s__2 __pyx_mstate_global->__pyx_n_s__2 #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 #define __pyx_kp_s_a_more_featureful_subclass_of_Sp __pyx_mstate_global->__pyx_kp_s_a_more_featureful_subclass_of_Sp #define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add #define __pyx_n_s_add_internal __pyx_mstate_global->__pyx_n_s_add_internal #define __pyx_n_s_alive __pyx_mstate_global->__pyx_n_s_alive #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_bgd __pyx_mstate_global->__pyx_n_s_bgd #define __pyx_n_s_bgd_2 __pyx_mstate_global->__pyx_n_s_bgd_2 #define __pyx_n_s_blendmode __pyx_mstate_global->__pyx_n_s_blendmode #define __pyx_n_s_blit __pyx_mstate_global->__pyx_n_s_blit #define __pyx_n_s_builtins __pyx_mstate_global->__pyx_n_s_builtins #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c #define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call #define __pyx_n_s_callable __pyx_mstate_global->__pyx_n_s_callable #define __pyx_n_s_centerx __pyx_mstate_global->__pyx_n_s_centerx #define __pyx_n_s_centery __pyx_mstate_global->__pyx_n_s_centery #define __pyx_n_s_change_layer __pyx_mstate_global->__pyx_n_s_change_layer #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem #define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_clip __pyx_mstate_global->__pyx_n_s_clip #define __pyx_n_s_clip_2 __pyx_mstate_global->__pyx_n_s_clip_2 #define __pyx_n_s_collide_circle __pyx_mstate_global->__pyx_n_s_collide_circle #define __pyx_n_s_collide_circle_ratio __pyx_mstate_global->__pyx_n_s_collide_circle_ratio #define __pyx_n_s_collide_circle_ratio___call __pyx_mstate_global->__pyx_n_s_collide_circle_ratio___call #define __pyx_n_s_collide_circle_ratio___init __pyx_mstate_global->__pyx_n_s_collide_circle_ratio___init #define __pyx_n_s_collide_mask __pyx_mstate_global->__pyx_n_s_collide_mask #define __pyx_n_s_collide_rect __pyx_mstate_global->__pyx_n_s_collide_rect #define __pyx_n_s_collide_rect_ratio __pyx_mstate_global->__pyx_n_s_collide_rect_ratio #define __pyx_n_s_collide_rect_ratio___call __pyx_mstate_global->__pyx_n_s_collide_rect_ratio___call #define __pyx_n_s_collide_rect_ratio___init __pyx_mstate_global->__pyx_n_s_collide_rect_ratio___init #define __pyx_n_s_collided __pyx_mstate_global->__pyx_n_s_collided #define __pyx_n_s_collidelist __pyx_mstate_global->__pyx_n_s_collidelist #define __pyx_n_s_collidelistall __pyx_mstate_global->__pyx_n_s_collidelistall #define __pyx_n_s_colliderect __pyx_mstate_global->__pyx_n_s_colliderect #define __pyx_n_s_colliding __pyx_mstate_global->__pyx_n_s_colliding #define __pyx_n_s_colliding_idx __pyx_mstate_global->__pyx_n_s_colliding_idx #define __pyx_n_s_contains __pyx_mstate_global->__pyx_n_s_contains #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy #define __pyx_n_s_crashed __pyx_mstate_global->__pyx_n_s_crashed #define __pyx_n_s_default_layer __pyx_mstate_global->__pyx_n_s_default_layer #define __pyx_n_s_default_layer_2 __pyx_mstate_global->__pyx_n_s_default_layer_2 #define __pyx_kp_s_detect_collision_between_two_spr __pyx_mstate_global->__pyx_kp_s_detect_collision_between_two_spr #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_n_s_dirty __pyx_mstate_global->__pyx_n_s_dirty #define __pyx_n_s_dirty_append __pyx_mstate_global->__pyx_n_s_dirty_append #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_display __pyx_mstate_global->__pyx_n_s_display #define __pyx_n_s_distancesquared __pyx_mstate_global->__pyx_n_s_distancesquared #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc #define __pyx_n_s_doc_2 __pyx_mstate_global->__pyx_n_s_doc_2 #define __pyx_n_s_dokill __pyx_mstate_global->__pyx_n_s_dokill #define __pyx_n_s_dokilla __pyx_mstate_global->__pyx_n_s_dokilla #define __pyx_n_s_dokillb __pyx_mstate_global->__pyx_n_s_dokillb #define __pyx_n_s_draw __pyx_mstate_global->__pyx_n_s_draw #define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_end_time __pyx_mstate_global->__pyx_n_s_end_time #define __pyx_n_s_from_surface __pyx_mstate_global->__pyx_n_s_from_surface #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get #define __pyx_n_s_get_bottom_layer __pyx_mstate_global->__pyx_n_s_get_bottom_layer #define __pyx_n_s_get_clip __pyx_mstate_global->__pyx_n_s_get_clip #define __pyx_n_s_get_layer_of_sprite __pyx_mstate_global->__pyx_n_s_get_layer_of_sprite #define __pyx_n_s_get_rect __pyx_mstate_global->__pyx_n_s_get_rect #define __pyx_n_s_get_sprite __pyx_mstate_global->__pyx_n_s_get_sprite #define __pyx_n_s_get_sprite_2 __pyx_mstate_global->__pyx_n_s_get_sprite_2 #define __pyx_n_s_get_sprites_at __pyx_mstate_global->__pyx_n_s_get_sprites_at #define __pyx_n_s_get_sprites_from_layer __pyx_mstate_global->__pyx_n_s_get_sprites_from_layer #define __pyx_n_s_get_surface __pyx_mstate_global->__pyx_n_s_get_surface #define __pyx_n_s_get_ticks __pyx_mstate_global->__pyx_n_s_get_ticks #define __pyx_n_s_get_top_layer __pyx_mstate_global->__pyx_n_s_get_top_layer #define __pyx_n_s_get_top_sprite __pyx_mstate_global->__pyx_n_s_get_top_sprite #define __pyx_n_s_get_visible __pyx_mstate_global->__pyx_n_s_get_visible #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_n_s_group __pyx_mstate_global->__pyx_n_s_group #define __pyx_n_s_groupa __pyx_mstate_global->__pyx_n_s_groupa #define __pyx_n_s_groupb __pyx_mstate_global->__pyx_n_s_groupb #define __pyx_n_s_groupcollide __pyx_mstate_global->__pyx_n_s_groupcollide #define __pyx_n_s_groups __pyx_mstate_global->__pyx_n_s_groups #define __pyx_n_s_has __pyx_mstate_global->__pyx_n_s_has #define __pyx_n_s_has_internal __pyx_mstate_global->__pyx_n_s_has_internal #define __pyx_n_s_height __pyx_mstate_global->__pyx_n_s_height #define __pyx_n_s_high __pyx_mstate_global->__pyx_n_s_high #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i #define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx #define __pyx_n_s_image __pyx_mstate_global->__pyx_n_s_image #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_inflate __pyx_mstate_global->__pyx_n_s_inflate #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init #define __pyx_n_s_init_rect __pyx_mstate_global->__pyx_n_s_init_rect #define __pyx_n_s_init_rect_2 __pyx_mstate_global->__pyx_n_s_init_rect_2 #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items #define __pyx_n_s_kill __pyx_mstate_global->__pyx_n_s_kill #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs #define __pyx_n_s_lambda __pyx_mstate_global->__pyx_n_s_lambda #define __pyx_n_s_layer __pyx_mstate_global->__pyx_n_s_layer #define __pyx_n_s_layer1_nr __pyx_mstate_global->__pyx_n_s_layer1_nr #define __pyx_n_s_layer2_nr __pyx_mstate_global->__pyx_n_s_layer2_nr #define __pyx_n_s_layer_2 __pyx_mstate_global->__pyx_n_s_layer_2 #define __pyx_n_s_layer_nr __pyx_mstate_global->__pyx_n_s_layer_nr #define __pyx_n_s_layers __pyx_mstate_global->__pyx_n_s_layers #define __pyx_n_s_left __pyx_mstate_global->__pyx_n_s_left #define __pyx_n_s_leftmask __pyx_mstate_global->__pyx_n_s_leftmask #define __pyx_n_s_leftradius __pyx_mstate_global->__pyx_n_s_leftradius #define __pyx_n_s_leftrect __pyx_mstate_global->__pyx_n_s_leftrect #define __pyx_n_s_leng __pyx_mstate_global->__pyx_n_s_leng #define __pyx_n_s_low __pyx_mstate_global->__pyx_n_s_low #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_mask __pyx_mstate_global->__pyx_n_s_mask #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass #define __pyx_n_s_mid __pyx_mstate_global->__pyx_n_s_mid #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module #define __pyx_n_s_move_to_back __pyx_mstate_global->__pyx_n_s_move_to_back #define __pyx_n_s_move_to_front __pyx_mstate_global->__pyx_n_s_move_to_front #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_new_layer __pyx_mstate_global->__pyx_n_s_new_layer #define __pyx_n_s_newrect __pyx_mstate_global->__pyx_n_s_newrect #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object #define __pyx_n_s_old_rect __pyx_mstate_global->__pyx_n_s_old_rect #define __pyx_n_s_orig_clip __pyx_mstate_global->__pyx_n_s_orig_clip #define __pyx_n_s_overlap __pyx_mstate_global->__pyx_n_s_overlap #define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop #define __pyx_n_s_pos __pyx_mstate_global->__pyx_n_s_pos #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare #define __pyx_n_s_property __pyx_mstate_global->__pyx_n_s_property #define __pyx_n_s_pygame __pyx_mstate_global->__pyx_n_s_pygame #define __pyx_n_s_pygame__sprite __pyx_mstate_global->__pyx_n_s_pygame__sprite #define __pyx_n_s_pygame_mask __pyx_mstate_global->__pyx_n_s_pygame_mask #define __pyx_n_s_pygame_time __pyx_mstate_global->__pyx_n_s_pygame_time #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r #define __pyx_n_s_radius __pyx_mstate_global->__pyx_n_s_radius #define __pyx_n_s_ratio __pyx_mstate_global->__pyx_n_s_ratio #define __pyx_n_s_rec __pyx_mstate_global->__pyx_n_s_rec #define __pyx_n_s_rect __pyx_mstate_global->__pyx_n_s_rect #define __pyx_n_s_rect_2 __pyx_mstate_global->__pyx_n_s_rect_2 #define __pyx_n_s_rect_offset_x __pyx_mstate_global->__pyx_n_s_rect_offset_x #define __pyx_n_s_rect_offset_y __pyx_mstate_global->__pyx_n_s_rect_offset_y #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove #define __pyx_n_s_remove_internal __pyx_mstate_global->__pyx_n_s_remove_internal #define __pyx_n_s_remove_sprites_of_layer __pyx_mstate_global->__pyx_n_s_remove_sprites_of_layer #define __pyx_n_s_repaint_rect __pyx_mstate_global->__pyx_n_s_repaint_rect #define __pyx_n_s_repr __pyx_mstate_global->__pyx_n_s_repr #define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret #define __pyx_n_s_ret_2 __pyx_mstate_global->__pyx_n_s_ret_2 #define __pyx_n_s_return_value __pyx_mstate_global->__pyx_n_s_return_value #define __pyx_n_s_right __pyx_mstate_global->__pyx_n_s_right #define __pyx_n_s_rightmask __pyx_mstate_global->__pyx_n_s_rightmask #define __pyx_n_s_rightradius __pyx_mstate_global->__pyx_n_s_rightradius #define __pyx_n_s_rightrect __pyx_mstate_global->__pyx_n_s_rightrect #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s #define __pyx_kp_s_s_DirtySprite_in_d_groups __pyx_mstate_global->__pyx_kp_s_s_DirtySprite_in_d_groups #define __pyx_kp_s_s_d_sprites __pyx_mstate_global->__pyx_kp_s_s_d_sprites #define __pyx_kp_s_s_sprite_in_d_groups __pyx_mstate_global->__pyx_kp_s_s_sprite_in_d_groups #define __pyx_n_s_screen_rect __pyx_mstate_global->__pyx_n_s_screen_rect #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_n_s_set_clip __pyx_mstate_global->__pyx_n_s_set_clip #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name #define __pyx_n_s_set_sprite __pyx_mstate_global->__pyx_n_s_set_sprite #define __pyx_n_s_set_timing_threshold __pyx_mstate_global->__pyx_n_s_set_timing_threshold #define __pyx_n_s_set_timing_treshold __pyx_mstate_global->__pyx_n_s_set_timing_treshold #define __pyx_n_s_set_visible __pyx_mstate_global->__pyx_n_s_set_visible #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size #define __pyx_n_s_source_rect __pyx_mstate_global->__pyx_n_s_source_rect #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_n_s_spr __pyx_mstate_global->__pyx_n_s_spr #define __pyx_n_s_spr_rect __pyx_mstate_global->__pyx_n_s_spr_rect #define __pyx_n_s_spr_rect_clip __pyx_mstate_global->__pyx_n_s_spr_rect_clip #define __pyx_n_s_sprite __pyx_mstate_global->__pyx_n_s_sprite #define __pyx_n_s_sprite_layers __pyx_mstate_global->__pyx_n_s_sprite_layers #define __pyx_n_s_spritecollide __pyx_mstate_global->__pyx_n_s_spritecollide #define __pyx_n_s_spritecollideany __pyx_mstate_global->__pyx_n_s_spritecollideany #define __pyx_n_s_spritedict __pyx_mstate_global->__pyx_n_s_spritedict #define __pyx_n_s_spritegroup __pyx_mstate_global->__pyx_n_s_spritegroup #define __pyx_n_s_sprites __pyx_mstate_global->__pyx_n_s_sprites #define __pyx_n_s_sprites1 __pyx_mstate_global->__pyx_n_s_sprites1 #define __pyx_n_s_sprites_2 __pyx_mstate_global->__pyx_n_s_sprites_2 #define __pyx_n_s_sprites_append __pyx_mstate_global->__pyx_n_s_sprites_append #define __pyx_n_s_sprites_layers __pyx_mstate_global->__pyx_n_s_sprites_layers #define __pyx_kp_s_src_c_cython_pygame__sprite_pyx __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame__sprite_pyx #define __pyx_n_s_start_time __pyx_mstate_global->__pyx_n_s_start_time #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super #define __pyx_n_s_surf __pyx_mstate_global->__pyx_n_s_surf #define __pyx_n_s_surf_blit __pyx_mstate_global->__pyx_n_s_surf_blit #define __pyx_n_s_surface __pyx_mstate_global->__pyx_n_s_surface #define __pyx_n_s_surface_blit __pyx_mstate_global->__pyx_n_s_surface_blit #define __pyx_n_s_switch_layer __pyx_mstate_global->__pyx_n_s_switch_layer #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_time_ms __pyx_mstate_global->__pyx_n_s_time_ms #define __pyx_n_s_time_threshold __pyx_mstate_global->__pyx_n_s_time_threshold #define __pyx_n_s_topleft __pyx_mstate_global->__pyx_n_s_topleft #define __pyx_n_s_union __pyx_mstate_global->__pyx_n_s_union #define __pyx_n_s_union_ip __pyx_mstate_global->__pyx_n_s_union_ip #define __pyx_n_s_union_rect __pyx_mstate_global->__pyx_n_s_union_rect #define __pyx_n_s_union_rect_collidelist __pyx_mstate_global->__pyx_n_s_union_rect_collidelist #define __pyx_n_s_union_rect_union_ip __pyx_mstate_global->__pyx_n_s_union_rect_union_ip #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update #define __pyx_n_s_update_2 __pyx_mstate_global->__pyx_n_s_update_2 #define __pyx_n_s_update_append __pyx_mstate_global->__pyx_n_s_update_append #define __pyx_n_s_use_update __pyx_mstate_global->__pyx_n_s_use_update #define __pyx_n_s_val __pyx_mstate_global->__pyx_n_s_val #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values #define __pyx_n_s_visible __pyx_mstate_global->__pyx_n_s_visible #define __pyx_n_s_visible_2 __pyx_mstate_global->__pyx_n_s_visible_2 #define __pyx_n_s_width __pyx_mstate_global->__pyx_n_s_width #define __pyx_n_s_xdistance __pyx_mstate_global->__pyx_n_s_xdistance #define __pyx_n_s_xoffset __pyx_mstate_global->__pyx_n_s_xoffset #define __pyx_n_s_ydistance __pyx_mstate_global->__pyx_n_s_ydistance #define __pyx_n_s_yoffset __pyx_mstate_global->__pyx_n_s_yoffset #define __pyx_kp_s_you_can_make_this_sprite_disappe __pyx_mstate_global->__pyx_kp_s_you_can_make_this_sprite_disappe #define __pyx_float_0_5 __pyx_mstate_global->__pyx_float_0_5 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4 #define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10 #define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12 #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 #define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37 #define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 #define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 #define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49 #define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58 #define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59 #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61 #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66 #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70 #define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72 #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75 #define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83 #define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85 #define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90 #define __pyx_tuple__92 __pyx_mstate_global->__pyx_tuple__92 #define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94 #define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98 #define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5 #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8 #define __pyx_codeobj__9 __pyx_mstate_global->__pyx_codeobj__9 #define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100 #define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114 #define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116 #define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118 #define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120 #define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122 #define __pyx_tuple__123 __pyx_mstate_global->__pyx_tuple__123 #define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125 #define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127 #define __pyx_tuple__129 __pyx_mstate_global->__pyx_tuple__129 #define __pyx_tuple__131 __pyx_mstate_global->__pyx_tuple__131 #define __pyx_tuple__133 __pyx_mstate_global->__pyx_tuple__133 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 #define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16 #define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17 #define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23 #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57 #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60 #define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64 #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 #define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 #define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 #define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 #define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 #define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 #define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 #define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88 #define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 #define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91 #define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93 #define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95 #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 #define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97 #define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99 #define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101 #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102 #define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103 #define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104 #define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105 #define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106 #define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107 #define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108 #define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109 #define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110 #define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111 #define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112 #define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113 #define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115 #define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117 #define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119 #define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121 #define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124 #define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126 #define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128 #define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130 #define __pyx_codeobj__132 __pyx_mstate_global->__pyx_codeobj__132 #define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134 /* #### Code section: module_code ### */ /* "pygame/_sprite.pyx":101 * # with the hasattr function. * if 'callable' not in dir(__builtins__): * callable = lambda obj: hasattr(obj, '__call__') # <<<<<<<<<<<<<< * * # Don't depend on pygame.mask if it's not there... */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12lambda(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_12lambda = {"lambda", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_12lambda(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_obj = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 101, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda") < 0)) __PYX_ERR(0, 101, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_obj = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 101, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pygame_7_sprite_lambda(__pyx_self, __pyx_v_obj); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_call); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 101, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cpython/complex.pxd":19 * * @property * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.real * */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { double __pyx_r; /* "cpython/complex.pxd":20 * @property * cdef inline double real(self) noexcept: * return self.cval.real # <<<<<<<<<<<<<< * * @property */ __pyx_r = __pyx_v_self->cval.real; goto __pyx_L0; /* "cpython/complex.pxd":19 * * @property * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.real * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "cpython/complex.pxd":23 * * @property * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.imag * */ static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { double __pyx_r; /* "cpython/complex.pxd":24 * @property * cdef inline double imag(self) noexcept: * return self.cval.imag # <<<<<<<<<<<<<< * * # PyTypeObject PyComplex_Type */ __pyx_r = __pyx_v_self->cval.imag; goto __pyx_L0; /* "cpython/complex.pxd":23 * * @property * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< * return self.cval.imag * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { PyObject *__pyx_v_default_value = ((PyObject *)Py_None); PyObject *__pyx_v_value; PyObject *__pyx_v_pyvalue = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_default_value = __pyx_optional_args->default_value; } } /* "cpython/contextvars.pxd":117 * or None if no such value or default was found. * """ * cdef PyObject *value = NULL # <<<<<<<<<<<<<< * PyContextVar_Get(var, NULL, &value) * if value is NULL: */ __pyx_v_value = NULL; /* "cpython/contextvars.pxd":118 * """ * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< * if value is NULL: * # context variable does not have a default */ __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 118, __pyx_L1_error) /* "cpython/contextvars.pxd":119 * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) * if value is NULL: # <<<<<<<<<<<<<< * # context variable does not have a default * pyvalue = default_value */ __pyx_t_2 = (__pyx_v_value == NULL); if (__pyx_t_2) { /* "cpython/contextvars.pxd":121 * if value is NULL: * # context variable does not have a default * pyvalue = default_value # <<<<<<<<<<<<<< * else: * # value or default value of context variable */ __Pyx_INCREF(__pyx_v_default_value); __pyx_v_pyvalue = __pyx_v_default_value; /* "cpython/contextvars.pxd":119 * cdef PyObject *value = NULL * PyContextVar_Get(var, NULL, &value) * if value is NULL: # <<<<<<<<<<<<<< * # context variable does not have a default * pyvalue = default_value */ goto __pyx_L3; } /* "cpython/contextvars.pxd":124 * else: * # value or default value of context variable * pyvalue = value # <<<<<<<<<<<<<< * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_v_value); __Pyx_INCREF(__pyx_t_3); __pyx_v_pyvalue = __pyx_t_3; __pyx_t_3 = 0; /* "cpython/contextvars.pxd":125 * # value or default value of context variable * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< * return pyvalue * */ Py_XDECREF(__pyx_v_value); } __pyx_L3:; /* "cpython/contextvars.pxd":126 * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyvalue); __pyx_r = __pyx_v_pyvalue; goto __pyx_L0; /* "cpython/contextvars.pxd":112 * * * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the default value of the context variable, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { PyObject *__pyx_v_default_value = ((PyObject *)Py_None); PyObject *__pyx_v_value; PyObject *__pyx_v_pyvalue = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_no_default", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_default_value = __pyx_optional_args->default_value; } } /* "cpython/contextvars.pxd":135 * Ignores the default value of the context variable, if any. * """ * cdef PyObject *value = NULL # <<<<<<<<<<<<<< * PyContextVar_Get(var, default_value, &value) * # value of context variable or 'default_value' */ __pyx_v_value = NULL; /* "cpython/contextvars.pxd":136 * """ * cdef PyObject *value = NULL * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< * # value of context variable or 'default_value' * pyvalue = value */ __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 136, __pyx_L1_error) /* "cpython/contextvars.pxd":138 * PyContextVar_Get(var, default_value, &value) * # value of context variable or 'default_value' * pyvalue = value # <<<<<<<<<<<<<< * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue */ __pyx_t_2 = ((PyObject *)__pyx_v_value); __Pyx_INCREF(__pyx_t_2); __pyx_v_pyvalue = __pyx_t_2; __pyx_t_2 = 0; /* "cpython/contextvars.pxd":139 * # value of context variable or 'default_value' * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< * return pyvalue */ Py_XDECREF(__pyx_v_value); /* "cpython/contextvars.pxd":140 * pyvalue = value * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' * return pyvalue # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyvalue); __pyx_r = __pyx_v_pyvalue; goto __pyx_L0; /* "cpython/contextvars.pxd":129 * * * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< * """Return a new reference to the value of the context variable, * or the provided default value if no such value was found. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":147 * cdef dict __dict__ * * def __cinit__(self): # <<<<<<<<<<<<<< * self.__dict__ = {} * self.__g = set() # The groups the sprite is in */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "pygame/_sprite.pyx":148 * * def __cinit__(self): * self.__dict__ = {} # <<<<<<<<<<<<<< * self.__g = set() # The groups the sprite is in * */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__dict__); __Pyx_DECREF(__pyx_v_self->__dict__); __pyx_v_self->__dict__ = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":149 * def __cinit__(self): * self.__dict__ = {} * self.__g = set() # The groups the sprite is in # <<<<<<<<<<<<<< * * def __init__(self, *groups): */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_Sprite__g); __Pyx_DECREF(__pyx_v_self->_Sprite__g); __pyx_v_self->_Sprite__g = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":147 * cdef dict __dict__ * * def __cinit__(self): # <<<<<<<<<<<<<< * self.__dict__ = {} * self.__g = set() # The groups the sprite is in */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":151 * self.__g = set() # The groups the sprite is in * * def __init__(self, *groups): # <<<<<<<<<<<<<< * if groups: * self.add(*groups) */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_groups = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __Pyx_INCREF(__pyx_args); __pyx_v_groups = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_groups); /* function exit code */ __Pyx_DECREF(__pyx_v_groups); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":152 * * def __init__(self, *groups): * if groups: # <<<<<<<<<<<<<< * self.add(*groups) * */ __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_groups) != 0); if (__pyx_t_1) { /* "pygame/_sprite.pyx":153 * def __init__(self, *groups): * if groups: * self.add(*groups) # <<<<<<<<<<<<<< * * def add(self, *groups): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_groups, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":152 * * def __init__(self, *groups): * if groups: # <<<<<<<<<<<<<< * self.add(*groups) * */ } /* "pygame/_sprite.pyx":151 * self.__g = set() # The groups the sprite is in * * def __init__(self, *groups): # <<<<<<<<<<<<<< * if groups: * self.add(*groups) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.Sprite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":155 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< * """add the sprite to groups * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_5add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_4add, "add the sprite to groups\n\n Sprite.add(*groups): return None\n\n Any number of Group instances can be passed as arguments. The\n Sprite will be added to the Groups it is not already a member of.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_5add = {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_5add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_4add}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_5add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_groups = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_groups = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_4add(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_groups); /* function exit code */ __Pyx_DECREF(__pyx_v_groups); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups) { PyObject *__pyx_v_has = NULL; PyObject *__pyx_v_group = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 1); /* "pygame/_sprite.pyx":164 * * """ * has = self.__g.__contains__ # <<<<<<<<<<<<<< * for group in groups: * if hasattr(group, '_spritegroup'): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_Sprite__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_has = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":165 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< * if hasattr(group, '_spritegroup'): * if not has(group): */ __pyx_t_1 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 165, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 165, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":166 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if not has(group): * (group).add_internal(self) */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 166, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":167 * for group in groups: * if hasattr(group, '_spritegroup'): * if not has(group): # <<<<<<<<<<<<<< * (group).add_internal(self) * self.add_internal(group) */ __Pyx_INCREF(__pyx_v_has); __pyx_t_5 = __pyx_v_has; __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_group}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (!__pyx_t_4); if (__pyx_t_8) { /* "pygame/_sprite.pyx":168 * if hasattr(group, '_spritegroup'): * if not has(group): * (group).add_internal(self) # <<<<<<<<<<<<<< * self.add_internal(group) * else: */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_group)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_group), ((PyObject *)__pyx_v_self), 0); /* "pygame/_sprite.pyx":169 * if not has(group): * (group).add_internal(self) * self.add_internal(group) # <<<<<<<<<<<<<< * else: * self.add(*group) */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_group, 0); /* "pygame/_sprite.pyx":167 * for group in groups: * if hasattr(group, '_spritegroup'): * if not has(group): # <<<<<<<<<<<<<< * (group).add_internal(self) * self.add_internal(group) */ } /* "pygame/_sprite.pyx":166 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if not has(group): * (group).add_internal(self) */ goto __pyx_L5; } /* "pygame/_sprite.pyx":171 * self.add_internal(group) * else: * self.add(*group) # <<<<<<<<<<<<<< * * def remove(self, *groups): */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L5:; /* "pygame/_sprite.pyx":165 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< * if hasattr(group, '_spritegroup'): * if not has(group): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":155 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< * """add the sprite to groups * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sprite.Sprite.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_has); __Pyx_XDECREF(__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":173 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< * """remove the sprite from groups * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_7remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_6remove, "remove the sprite from groups\n\n Sprite.remove(*groups): return None\n\n Any number of Group instances can be passed as arguments. The Sprite\n will be removed from the Groups it is currently a member of.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_7remove = {"remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_7remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_6remove}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_7remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_groups = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_groups = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_6remove(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_groups); /* function exit code */ __Pyx_DECREF(__pyx_v_groups); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_groups) { PyObject *__pyx_v_has = NULL; PyObject *__pyx_v_group = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 1); /* "pygame/_sprite.pyx":182 * * """ * has = self.__g.__contains__ # <<<<<<<<<<<<<< * for group in groups: * if hasattr(group, '_spritegroup'): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_Sprite__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_has = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":183 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< * if hasattr(group, '_spritegroup'): * if has(group): */ __pyx_t_1 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 183, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 183, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":184 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if has(group): * group.remove_internal(self) */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 184, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":185 * for group in groups: * if hasattr(group, '_spritegroup'): * if has(group): # <<<<<<<<<<<<<< * group.remove_internal(self) * self.remove_internal(group) */ __Pyx_INCREF(__pyx_v_has); __pyx_t_5 = __pyx_v_has; __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_group}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pygame/_sprite.pyx":186 * if hasattr(group, '_spritegroup'): * if has(group): * group.remove_internal(self) # <<<<<<<<<<<<<< * self.remove_internal(group) * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":187 * if has(group): * group.remove_internal(self) * self.remove_internal(group) # <<<<<<<<<<<<<< * else: * self.remove(*group) */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_group, 0); /* "pygame/_sprite.pyx":185 * for group in groups: * if hasattr(group, '_spritegroup'): * if has(group): # <<<<<<<<<<<<<< * group.remove_internal(self) * self.remove_internal(group) */ } /* "pygame/_sprite.pyx":184 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if has(group): * group.remove_internal(self) */ goto __pyx_L5; } /* "pygame/_sprite.pyx":189 * self.remove_internal(group) * else: * self.remove(*group) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, group) noexcept: */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L5:; /* "pygame/_sprite.pyx":183 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< * if hasattr(group, '_spritegroup'): * if has(group): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":173 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< * """remove the sprite from groups * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sprite.Sprite.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_has); __Pyx_XDECREF(__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":191 * self.remove(*group) * * cpdef void add_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.add(group) * */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_9add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_6Sprite_9add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_group}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":192 * * cpdef void add_internal(self, group) noexcept: * self.__g.add(group) # <<<<<<<<<<<<<< * * cpdef void remove_internal(self, group) noexcept: */ if (unlikely(__pyx_v_self->_Sprite__g == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); __PYX_ERR(0, 192, __pyx_L1_error) } __pyx_t_6 = PySet_Add(__pyx_v_self->_Sprite__g, __pyx_v_group); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error) /* "pygame/_sprite.pyx":191 * self.remove(*group) * * cpdef void add_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.add(group) * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.Sprite.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_9add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_9add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_9add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_9add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_group = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_group)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 191, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_group = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 191, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.Sprite.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_8add_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_group); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_8add_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_add_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":194 * self.__g.add(group) * * cpdef void remove_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.remove(group) * */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_group}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":195 * * cpdef void remove_internal(self, group) noexcept: * self.__g.remove(group) # <<<<<<<<<<<<<< * * def update(self, *args, **kwargs): */ if (unlikely(__pyx_v_self->_Sprite__g == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "remove"); __PYX_ERR(0, 195, __pyx_L1_error) } __pyx_t_6 = __Pyx_PySet_Remove(__pyx_v_self->_Sprite__g, __pyx_v_group); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 195, __pyx_L1_error) /* "pygame/_sprite.pyx":194 * self.__g.add(group) * * cpdef void remove_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.remove(group) * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.Sprite.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_11remove_internal = {"remove_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_group = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_group)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_internal") < 0)) __PYX_ERR(0, 194, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_group = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.Sprite.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_10remove_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_group); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10remove_internal(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_group) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_remove_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":197 * self.__g.remove(group) * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """method to control sprite behavior * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_13update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_12update, "method to control sprite behavior\n\n Sprite.update(*args, **kwargs):\n\n The default implementation of this method does nothing; it's just a\n convenient \"hook\" that you can override. This method is called by\n Group.update() with whatever arguments you give it.\n\n There is no need to use this method if not using the convenience\n method by the same name in the Group class.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_13update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_13update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_12update}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_13update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_args = 0; CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update", 1))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_12update(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_12update(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update", 1); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":212 * pass * * def kill(self): # <<<<<<<<<<<<<< * """remove the Sprite from all Groups * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_15kill(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_14kill, "remove the Sprite from all Groups\n\n Sprite.kill(): return None\n\n The Sprite is removed from all the Groups that contain it. This won't\n change anything about the state of the Sprite. It is possible to\n continue to use the Sprite after this method has been called, including\n adding it to Groups.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_15kill = {"kill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_15kill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_14kill}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_15kill(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kill (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("kill", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "kill", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_14kill(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; unsigned int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kill", 1); /* "pygame/_sprite.pyx":223 * * """ * for c in self.__g: # <<<<<<<<<<<<<< * c.remove_internal(self) * self.__g.clear() */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_set_iterator(__pyx_v_self->_Sprite__g, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_6 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":224 * """ * for c in self.__g: * c.remove_internal(self) # <<<<<<<<<<<<<< * self.__g.clear() * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_self)}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":225 * for c in self.__g: * c.remove_internal(self) * self.__g.clear() # <<<<<<<<<<<<<< * * def groups(self): */ if (unlikely(__pyx_v_self->_Sprite__g == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); __PYX_ERR(0, 225, __pyx_L1_error) } __pyx_t_10 = PySet_Clear(__pyx_v_self->_Sprite__g); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) /* "pygame/_sprite.pyx":212 * pass * * def kill(self): # <<<<<<<<<<<<<< * """remove the Sprite from all Groups * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sprite.Sprite.kill", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":227 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< * """list of Groups that contain this Sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_17groups(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_16groups, "list of Groups that contain this Sprite\n\n Sprite.groups(): return group_list\n\n Returns a list of all the Groups that contain this Sprite.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_17groups = {"groups", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_17groups, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_16groups}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_17groups(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groups (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("groups", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "groups", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_16groups(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_16groups(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groups", 1); /* "pygame/_sprite.pyx":235 * * """ * return list(self.__g) # <<<<<<<<<<<<<< * * def alive(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySequence_List(__pyx_v_self->_Sprite__g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":227 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< * """list of Groups that contain this Sprite * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite.groups", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":237 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< * """does the sprite belong to any groups * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_19alive(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6Sprite_18alive, "does the sprite belong to any groups\n\n Sprite.alive(): return bool\n\n Returns True when the Sprite belongs to one or more Groups.\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_19alive = {"alive", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_19alive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_18alive}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_19alive(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("alive (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("alive", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "alive", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_18alive(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("alive", 1); /* "pygame/_sprite.pyx":244 * Returns True when the Sprite belongs to one or more Groups. * """ * return bool(self.__g) # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (__pyx_v_self->_Sprite__g != Py_None)&&(PySet_GET_SIZE(__pyx_v_self->_Sprite__g) != 0); __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":237 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< * """does the sprite belong to any groups * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.Sprite.alive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":246 * return bool(self.__g) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_21__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_21__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "pygame/_sprite.pyx":247 * * def __repr__(self): * return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->_Sprite__g; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 247, __pyx_L1_error) } __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_sprite_in_d_groups, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":246 * return bool(self.__g) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.Sprite.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":142 * """ * * cdef public set __g # <<<<<<<<<<<<<< * cdef public object image * cdef public Rect rect */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g___get__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_Sprite__g); __pyx_r = __pyx_v_self->_Sprite__g; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_2__set__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 142, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_Sprite__g); __Pyx_DECREF(__pyx_v_self->_Sprite__g); __pyx_v_self->_Sprite__g = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite._Sprite__g.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_4__del__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_10_Sprite__g_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_Sprite__g); __Pyx_DECREF(__pyx_v_self->_Sprite__g); __pyx_v_self->_Sprite__g = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":143 * * cdef public set __g * cdef public object image # <<<<<<<<<<<<<< * cdef public Rect rect * cdef dict __dict__ */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_5image_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_5image_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_5image___get__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_5image___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->image); __pyx_r = __pyx_v_self->image; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_5image_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_5image_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_5image_2__set__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_5image_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 1); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->image); __Pyx_DECREF(__pyx_v_self->image); __pyx_v_self->image = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_5image_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_5image_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_5image_4__del__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_5image_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->image); __Pyx_DECREF(__pyx_v_self->image); __pyx_v_self->image = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":144 * cdef public set __g * cdef public object image * cdef public Rect rect # <<<<<<<<<<<<<< * cdef dict __dict__ * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_4rect_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_4rect_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_4rect___get__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4rect___get__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->rect); __pyx_r = ((PyObject *)__pyx_v_self->rect); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_4rect_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_4rect_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_4rect_2__set__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_4rect_2__set__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 144, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->rect); __Pyx_DECREF((PyObject *)__pyx_v_self->rect); __pyx_v_self->rect = ((pgRectObject *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.Sprite.rect.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_6Sprite_4rect_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_6Sprite_4rect_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_4rect_4__del__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_6Sprite_4rect_4__del__(struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->rect); __Pyx_DECREF((PyObject *)__pyx_v_self->rect); __pyx_v_self->rect = ((pgRectObject *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_23__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_23__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_23__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_23__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_22__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.Sprite.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_25__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_6Sprite_25__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_25__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_6Sprite_25__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.Sprite.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_6Sprite_24__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Sprite *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.Sprite.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":303 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_8lambda1(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_8lambda1 = {"lambda1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_8lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_8lambda1(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda1") < 0)) __PYX_ERR(0, 303, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 303, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.DirtySprite.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(__pyx_self, __pyx_v_self); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.DirtySprite.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":304 * * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), # <<<<<<<<<<<<<< * doc="you can make this sprite disappear without " * "removing it from the group,\n" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_9lambda2 = {"lambda2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_value = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); __PYX_ERR(0, 304, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda2") < 0)) __PYX_ERR(0, 304, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_value = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 304, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.DirtySprite.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(__pyx_self, __pyx_v_self, __pyx_v_value); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.DirtySprite.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":282 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_groups = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_groups = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); if (unlikely(!__pyx_v_groups)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_groups); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { default: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 282, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 282, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_DECREF(__pyx_v_groups); __pyx_v_groups = 0; __Pyx_AddTraceback("pygame._sprite.DirtySprite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11DirtySprite___init__(__pyx_self, __pyx_v_self, __pyx_v_groups); /* function exit code */ __Pyx_DECREF(__pyx_v_groups); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_groups) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":284 * def __init__(self, *groups): * * self.dirty = 1 # <<<<<<<<<<<<<< * self.blendmode = 0 # pygame 1.8, referred to as special_flags in * # the documentation of Surface.blit */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 284, __pyx_L1_error) /* "pygame/_sprite.pyx":285 * * self.dirty = 1 * self.blendmode = 0 # pygame 1.8, referred to as special_flags in # <<<<<<<<<<<<<< * # the documentation of Surface.blit * self._visible = 1 */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blendmode, __pyx_int_0) < 0) __PYX_ERR(0, 285, __pyx_L1_error) /* "pygame/_sprite.pyx":287 * self.blendmode = 0 # pygame 1.8, referred to as special_flags in * # the documentation of Surface.blit * self._visible = 1 # <<<<<<<<<<<<<< * self._layer = getattr(self, '_layer', 0) # Default 0 unless * # initialized differently. */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_int_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error) /* "pygame/_sprite.pyx":288 * # the documentation of Surface.blit * self._visible = 1 * self._layer = getattr(self, '_layer', 0) # Default 0 unless # <<<<<<<<<<<<<< * # initialized differently. * self.source_rect = None */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_self, __pyx_n_s_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_layer, __pyx_t_1) < 0) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":290 * self._layer = getattr(self, '_layer', 0) # Default 0 unless * # initialized differently. * self.source_rect = None # <<<<<<<<<<<<<< * Sprite.__init__(self, *groups) * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_source_rect, Py_None) < 0) __PYX_ERR(0, 290, __pyx_L1_error) /* "pygame/_sprite.pyx":291 * # initialized differently. * self.source_rect = None * Sprite.__init__(self, *groups) # <<<<<<<<<<<<<< * * def _set_visible(self, val): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self)) __PYX_ERR(0, 291, __pyx_L1_error); __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":282 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.DirtySprite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":293 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_11DirtySprite_2_set_visible, "set the visible value (0 or 1) and makes the sprite dirty"); static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_3_set_visible = {"_set_visible", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_11DirtySprite_2_set_visible}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_val = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_visible (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, 1); __PYX_ERR(0, 293, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_set_visible") < 0)) __PYX_ERR(0, 293, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_val = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 293, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.DirtySprite._set_visible", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(__pyx_self, __pyx_v_self, __pyx_v_val); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_visible", 1); /* "pygame/_sprite.pyx":295 * def _set_visible(self, val): * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val # <<<<<<<<<<<<<< * if self.dirty < 2: * self.dirty = 1 */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_v_val) < 0) __PYX_ERR(0, 295, __pyx_L1_error) /* "pygame/_sprite.pyx":296 * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val * if self.dirty < 2: # <<<<<<<<<<<<<< * self.dirty = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pygame/_sprite.pyx":297 * self._visible = val * if self.dirty < 2: * self.dirty = 1 # <<<<<<<<<<<<<< * * def _get_visible(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 297, __pyx_L1_error) /* "pygame/_sprite.pyx":296 * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val * if self.dirty < 2: # <<<<<<<<<<<<<< * self.dirty = 1 * */ } /* "pygame/_sprite.pyx":293 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.DirtySprite._set_visible", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":299 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_5_get_visible(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_11DirtySprite_4_get_visible, "return the visible value of that sprite"); static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_5_get_visible = {"_get_visible", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_5_get_visible, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_11DirtySprite_4_get_visible}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_5_get_visible(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_visible (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 299, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_get_visible") < 0)) __PYX_ERR(0, 299, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_visible", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 299, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.DirtySprite._get_visible", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(__pyx_self, __pyx_v_self); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_visible", 1); /* "pygame/_sprite.pyx":301 * def _get_visible(self): * """return the visible value of that sprite""" * return self._visible # <<<<<<<<<<<<<< * * visible = property(lambda self: self._get_visible(), */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":299 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.DirtySprite._get_visible", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":309 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_7__repr__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_7__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11DirtySprite_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_7__repr__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(0, 309, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 309, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.DirtySprite.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(__pyx_self, __pyx_v_self); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "pygame/_sprite.pyx":310 * * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ # <<<<<<<<<<<<<< * (self.__class__.__name__, len(self.groups())) * */ __Pyx_XDECREF(__pyx_r); /* "pygame/_sprite.pyx":311 * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":310 * * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ # <<<<<<<<<<<<<< * (self.__class__.__name__, len(self.groups())) * */ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_DirtySprite_in_d_groups, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":309 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.DirtySprite.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":332 * cdef public list lostsprites * * def __cinit__(self): # <<<<<<<<<<<<<< * self.spritedict = {} * self.lostsprites = [] */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "pygame/_sprite.pyx":333 * * def __cinit__(self): * self.spritedict = {} # <<<<<<<<<<<<<< * self.lostsprites = [] * */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->spritedict); __Pyx_DECREF(__pyx_v_self->spritedict); __pyx_v_self->spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":334 * def __cinit__(self): * self.spritedict = {} * self.lostsprites = [] # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->lostsprites); __Pyx_DECREF(__pyx_v_self->lostsprites); __pyx_v_self->lostsprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":332 * cdef public list lostsprites * * def __cinit__(self): # <<<<<<<<<<<<<< * self.spritedict = {} * self.lostsprites = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":336 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """get a list of sprites in the group * */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 336, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":347 * * """ * return list(self.spritedict) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite) noexcept: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySequence_List(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":336 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """get a list of sprites in the group * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_2sprites, "get a list of sprites in the group\n\n Group.sprite(): return list\n\n Returns an object that can be looped over with a 'for' loop. (For now,\n it is always a list, but this could change in a future version of\n pygame.) Alternatively, you can get the same information by iterating\n directly over the sprite group, e.g. 'for sprite in group'.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_3sprites = {"sprites", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_2sprites}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sprites (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sprites", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sprites", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_2sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_2sprites(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":349 * return list(self.spritedict) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * self.spritedict[sprite] = 0 * */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":350 * * cpdef void add_internal(self, sprite) noexcept: * self.spritedict[sprite] = 0 # <<<<<<<<<<<<<< * * cpdef void remove_internal(self, sprite) noexcept: */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 350, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_self->spritedict, __pyx_v_sprite, __pyx_int_0) < 0))) __PYX_ERR(0, 350, __pyx_L1_error) /* "pygame/_sprite.pyx":349 * return list(self.spritedict) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * self.spritedict[sprite] = 0 * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.AbstractGroup.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_5add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 349, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 349, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_4add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_4add_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":352 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * r = self.spritedict[sprite] * if r: */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { PyObject *__pyx_v_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":353 * * cpdef void remove_internal(self, sprite) noexcept: * r = self.spritedict[sprite] # <<<<<<<<<<<<<< * if r: * self.lostsprites.append(r) */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 353, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":354 * cpdef void remove_internal(self, sprite) noexcept: * r = self.spritedict[sprite] * if r: # <<<<<<<<<<<<<< * self.lostsprites.append(r) * del self.spritedict[sprite] */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 354, __pyx_L1_error) if (__pyx_t_6) { /* "pygame/_sprite.pyx":355 * r = self.spritedict[sprite] * if r: * self.lostsprites.append(r) # <<<<<<<<<<<<<< * del self.spritedict[sprite] * */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 355, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->lostsprites, __pyx_v_r); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 355, __pyx_L1_error) /* "pygame/_sprite.pyx":354 * cpdef void remove_internal(self, sprite) noexcept: * r = self.spritedict[sprite] * if r: # <<<<<<<<<<<<<< * self.lostsprites.append(r) * del self.spritedict[sprite] */ } /* "pygame/_sprite.pyx":356 * if r: * self.lostsprites.append(r) * del self.spritedict[sprite] # <<<<<<<<<<<<<< * * cpdef bint has_internal(self, sprite) noexcept: */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 356, __pyx_L1_error) } if (unlikely((PyDict_DelItem(__pyx_v_self->spritedict, __pyx_v_sprite) < 0))) __PYX_ERR(0, 356, __pyx_L1_error) /* "pygame/_sprite.pyx":352 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * r = self.spritedict[sprite] * if r: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.AbstractGroup.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_r); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_7remove_internal = {"remove_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_internal") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 352, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_6remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_6remove_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":358 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return sprite in self.spritedict * */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":359 * * cpdef bint has_internal(self, sprite) noexcept: * return sprite in self.spritedict # <<<<<<<<<<<<<< * * def copy(self): */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 359, __pyx_L1_error) } __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->spritedict, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; /* "pygame/_sprite.pyx":358 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return sprite in self.spritedict * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.AbstractGroup.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_9has_internal = {"has_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "has_internal") < 0)) __PYX_ERR(0, 358, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("has_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 358, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_8has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_8has_internal(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":361 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< * """copy a group with all the same sprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_11copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_10copy, "copy a group with all the same sprites\n\n Group.copy(): return Group\n\n Returns a copy of the group that is an instance of the same class\n and has the same sprites in it.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_11copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_11copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_10copy}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_11copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); /* "pygame/_sprite.pyx":370 * * """ * return self.__class__(self.sprites()) # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":361 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< * """copy a group with all the same sprites * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":372 * return self.__class__(self.sprites()) * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.sprites()) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 1); /* "pygame/_sprite.pyx":373 * * def __iter__(self): * return iter(self.sprites()) # <<<<<<<<<<<<<< * * def __contains__(self, sprite): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":372 * return self.__class__(self.sprites()) * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.sprites()) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":375 * return iter(self.sprites()) * * def __contains__(self, sprite): # <<<<<<<<<<<<<< * return self.has(sprite) * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_15__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_sprite); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_15__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_sprite) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), ((PyObject *)__pyx_v_sprite)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprite) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 1); /* "pygame/_sprite.pyx":376 * * def __contains__(self, sprite): * return self.has(sprite) # <<<<<<<<<<<<<< * * def add(self, *sprites): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sprite}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; /* "pygame/_sprite.pyx":375 * return iter(self.sprites()) * * def __contains__(self, sprite): # <<<<<<<<<<<<<< * return self.has(sprite) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":378 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< * """add sprite(s) to group * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_17add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_16add, "add sprite(s) to group\n\n Group.add(sprite, list, group, ...): return None\n\n Adds a sprite or sequence of sprites to a group.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_17add = {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_17add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_16add}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_17add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprites); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites) { PyObject *__pyx_v_sprite = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; unsigned int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 1); /* "pygame/_sprite.pyx":386 * * """ * for sprite in sprites: # <<<<<<<<<<<<<< * # It's possible that some sprite is also an iterator. * # If this is the case, we should add the sprite itself, */ __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 386, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 386, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":390 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if not self.has_internal(sprite): * self.add_internal(sprite) */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_sprite, __pyx_ptype_6pygame_7_sprite_Sprite); if (__pyx_t_4) { /* "pygame/_sprite.pyx":391 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * (sprite).add_internal(self) */ __pyx_t_4 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0)); if (__pyx_t_4) { /* "pygame/_sprite.pyx":392 * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< * (sprite).add_internal(self) * else: */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0); /* "pygame/_sprite.pyx":393 * if not self.has_internal(sprite): * self.add_internal(sprite) * (sprite).add_internal(self) # <<<<<<<<<<<<<< * else: * try: */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite), ((PyObject *)__pyx_v_self), 0); /* "pygame/_sprite.pyx":391 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * (sprite).add_internal(self) */ } /* "pygame/_sprite.pyx":390 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if not self.has_internal(sprite): * self.add_internal(sprite) */ goto __pyx_L5; } /* "pygame/_sprite.pyx":395 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pygame/_sprite.pyx":398 * # See if sprite is an iterator, like a list or sprite * # group. * self.add(*sprite) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * # Not iterable. This is probably a sprite that is not an */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 398, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 398, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sprite.pyx":395 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sprite.pyx":399 * # group. * self.add(*sprite) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< * # Not iterable. This is probably a sprite that is not an * # instance of the Sprite class or is not an instance of a */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_AttributeError); if (__pyx_t_10) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.add", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 399, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":404 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 404, __pyx_L9_except_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":405 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 405, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; __pyx_t_14 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_14 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_14, 0+__pyx_t_14); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 405, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { __pyx_t_12 = __pyx_t_11; __Pyx_INCREF(__pyx_t_12); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 405, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 405, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_12))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 405, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_11); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 405, __pyx_L9_except_error) #else __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 405, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 405, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_11); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 405, __pyx_L9_except_error) #else __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 405, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); #endif } } else { __pyx_t_11 = __pyx_t_16(__pyx_t_12); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 405, __pyx_L9_except_error) } break; } __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_11); __pyx_t_11 = 0; /* "pygame/_sprite.pyx":406 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< * self.add_internal(spr) * spr.add_internal(self) */ __pyx_t_4 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0)); if (__pyx_t_4) { /* "pygame/_sprite.pyx":407 * for spr in sprite.sprites(): * if not self.has_internal(spr): * self.add_internal(spr) # <<<<<<<<<<<<<< * spr.add_internal(self) * elif not self.has_internal(sprite): */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_spr, 0); /* "pygame/_sprite.pyx":408 * if not self.has_internal(spr): * self.add_internal(spr) * spr.add_internal(self) # <<<<<<<<<<<<<< * elif not self.has_internal(sprite): * self.add_internal(sprite) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 408, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_17 = NULL; __pyx_t_14 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_14 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, ((PyObject *)__pyx_v_self)}; __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 408, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pygame/_sprite.pyx":406 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< * self.add_internal(spr) * spr.add_internal(self) */ } /* "pygame/_sprite.pyx":405 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr) */ } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":404 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ goto __pyx_L17; } /* "pygame/_sprite.pyx":409 * self.add_internal(spr) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ __pyx_t_4 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0)); if (__pyx_t_4) { /* "pygame/_sprite.pyx":410 * spr.add_internal(self) * elif not self.has_internal(sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< * sprite.add_internal(self) * */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0); /* "pygame/_sprite.pyx":411 * elif not self.has_internal(sprite): * self.add_internal(sprite) * sprite.add_internal(self) # <<<<<<<<<<<<<< * * def remove(self, *sprites): */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 411, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = NULL; __pyx_t_14 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); __pyx_t_14 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, ((PyObject *)__pyx_v_self)}; __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 411, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":409 * self.add_internal(spr) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ } __pyx_L17:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; /* "pygame/_sprite.pyx":395 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L14_try_end:; } } __pyx_L5:; /* "pygame/_sprite.pyx":386 * * """ * for sprite in sprites: # <<<<<<<<<<<<<< * # It's possible that some sprite is also an iterator. * # If this is the case, we should add the sprite itself, */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":378 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< * """add sprite(s) to group * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_17); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprite); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":413 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< * """remove sprite(s) from group * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_19remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_18remove, "remove sprite(s) from group\n\n Group.remove(sprite, list, or group, ...): return None\n\n Removes a sprite or sequence of sprites from a group.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_19remove = {"remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_19remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_18remove}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_19remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprites); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites) { PyObject *__pyx_v_sprite = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; unsigned int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 1); /* "pygame/_sprite.pyx":427 * # old-style sprite group. Lastly, if that fails, it assumes that the * # normal Sprite methods should be used. * for sprite in sprites: # <<<<<<<<<<<<<< * if isinstance(sprite, Sprite): * if self.has_internal(sprite): */ __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 427, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 427, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":428 * # normal Sprite methods should be used. * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if self.has_internal(sprite): * self.remove_internal(sprite) */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_sprite, __pyx_ptype_6pygame_7_sprite_Sprite); if (__pyx_t_4) { /* "pygame/_sprite.pyx":429 * for sprite in sprites: * if isinstance(sprite, Sprite): * if self.has_internal(sprite): # <<<<<<<<<<<<<< * self.remove_internal(sprite) * sprite.remove_internal(self) */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":430 * if isinstance(sprite, Sprite): * if self.has_internal(sprite): * self.remove_internal(sprite) # <<<<<<<<<<<<<< * sprite.remove_internal(self) * else: */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_sprite, 0); /* "pygame/_sprite.pyx":431 * if self.has_internal(sprite): * self.remove_internal(sprite) * sprite.remove_internal(self) # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":429 * for sprite in sprites: * if isinstance(sprite, Sprite): * if self.has_internal(sprite): # <<<<<<<<<<<<<< * self.remove_internal(sprite) * sprite.remove_internal(self) */ } /* "pygame/_sprite.pyx":428 * # normal Sprite methods should be used. * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if self.has_internal(sprite): * self.remove_internal(sprite) */ goto __pyx_L5; } /* "pygame/_sprite.pyx":433 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< * self.remove(*sprite) * except (TypeError, AttributeError): */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pygame/_sprite.pyx":434 * else: * try: * self.remove(*sprite) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pygame/_sprite.pyx":433 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< * self.remove(*sprite) * except (TypeError, AttributeError): */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pygame/_sprite.pyx":435 * try: * self.remove(*sprite) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_AttributeError); if (__pyx_t_11) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 435, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":436 * self.remove(*sprite) * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 436, __pyx_L9_except_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":437 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * self.remove_internal(spr) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 437, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL}; __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 437, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 437, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 437, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_13))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 437, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 437, __pyx_L9_except_error) #else __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 437, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 437, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 437, __pyx_L9_except_error) #else __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 437, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } } else { __pyx_t_12 = __pyx_t_16(__pyx_t_13); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 437, __pyx_L9_except_error) } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":438 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< * self.remove_internal(spr) * spr.remove_internal(self) */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":439 * for spr in sprite.sprites(): * if self.has_internal(spr): * self.remove_internal(spr) # <<<<<<<<<<<<<< * spr.remove_internal(self) * elif self.has_internal(sprite): */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_spr, 0); /* "pygame/_sprite.pyx":440 * if self.has_internal(spr): * self.remove_internal(spr) * spr.remove_internal(self) # <<<<<<<<<<<<<< * elif self.has_internal(sprite): * self.remove_internal(sprite) */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 440, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, ((PyObject *)__pyx_v_self)}; __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 440, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":438 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< * self.remove_internal(spr) * spr.remove_internal(self) */ } /* "pygame/_sprite.pyx":437 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * self.remove_internal(spr) */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pygame/_sprite.pyx":436 * self.remove(*sprite) * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ goto __pyx_L17; } /* "pygame/_sprite.pyx":441 * self.remove_internal(spr) * spr.remove_internal(self) * elif self.has_internal(sprite): # <<<<<<<<<<<<<< * self.remove_internal(sprite) * sprite.remove_internal(self) */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":442 * spr.remove_internal(self) * elif self.has_internal(sprite): * self.remove_internal(sprite) # <<<<<<<<<<<<<< * sprite.remove_internal(self) * */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_sprite, 0); /* "pygame/_sprite.pyx":443 * elif self.has_internal(sprite): * self.remove_internal(sprite) * sprite.remove_internal(self) # <<<<<<<<<<<<<< * * def has(self, *sprites): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 443, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_7 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, ((PyObject *)__pyx_v_self)}; __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 443, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pygame/_sprite.pyx":441 * self.remove_internal(spr) * spr.remove_internal(self) * elif self.has_internal(sprite): # <<<<<<<<<<<<<< * self.remove_internal(sprite) * sprite.remove_internal(self) */ } __pyx_L17:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; /* "pygame/_sprite.pyx":433 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< * self.remove(*sprite) * except (TypeError, AttributeError): */ __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L14_try_end:; } } __pyx_L5:; /* "pygame/_sprite.pyx":427 * # old-style sprite group. Lastly, if that fails, it assumes that the * # normal Sprite methods should be used. * for sprite in sprites: # <<<<<<<<<<<<<< * if isinstance(sprite, Sprite): * if self.has_internal(sprite): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":413 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< * """remove sprite(s) from group * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_17); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprite); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":445 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< * """ask if group has a sprite or sprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_21has(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_20has, "ask if group has a sprite or sprites\n\n Group.has(sprite or group, ...): return bool\n\n Returns True if the given sprite or sprites are contained in the\n group. Alternatively, you can get the same information using the\n 'in' operator, e.g. 'sprite in group', 'subgroup in group'.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_21has = {"has", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_21has, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_20has}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_21has(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "has", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprites); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_sprites) { int __pyx_v_return_value; PyObject *__pyx_v_sprite = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; unsigned int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has", 1); /* "pygame/_sprite.pyx":455 * * """ * return_value = False # <<<<<<<<<<<<<< * * for sprite in sprites: */ __pyx_v_return_value = 0; /* "pygame/_sprite.pyx":457 * return_value = False * * for sprite in sprites: # <<<<<<<<<<<<<< * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group */ __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 457, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 457, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":458 * * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_sprite, __pyx_ptype_6pygame_7_sprite_Sprite); if (__pyx_t_4) { /* "pygame/_sprite.pyx":460 * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":461 * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): * return_value = True # <<<<<<<<<<<<<< * else: * return False */ __pyx_v_return_value = 1; /* "pygame/_sprite.pyx":460 * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ goto __pyx_L6; } /* "pygame/_sprite.pyx":463 * return_value = True * else: * return False # <<<<<<<<<<<<<< * else: * try: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __pyx_L6:; /* "pygame/_sprite.pyx":458 * * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): */ goto __pyx_L5; } /* "pygame/_sprite.pyx":465 * return False * else: * try: # <<<<<<<<<<<<<< * if self.has(*sprite): * return_value = True */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pygame/_sprite.pyx":466 * else: * try: * if self.has(*sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 466, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 466, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 466, __pyx_L7_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_4) { /* "pygame/_sprite.pyx":467 * try: * if self.has(*sprite): * return_value = True # <<<<<<<<<<<<<< * else: * return False */ __pyx_v_return_value = 1; /* "pygame/_sprite.pyx":466 * else: * try: * if self.has(*sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ goto __pyx_L15; } /* "pygame/_sprite.pyx":469 * return_value = True * else: * return False # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11_try_return; } __pyx_L15:; /* "pygame/_sprite.pyx":465 * return False * else: * try: # <<<<<<<<<<<<<< * if self.has(*sprite): * return_value = True */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sprite.pyx":470 * else: * return False * except (TypeError, AttributeError): # <<<<<<<<<<<<<< * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_AttributeError); if (__pyx_t_10) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.has", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 470, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":471 * return False * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 471, __pyx_L9_except_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":472 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * return_value = True */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 472, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; __pyx_t_14 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_14 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_14, 0+__pyx_t_14); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 472, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { __pyx_t_12 = __pyx_t_11; __Pyx_INCREF(__pyx_t_12); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 472, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 472, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_12))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 472, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_11); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 472, __pyx_L9_except_error) #else __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 472, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 472, __pyx_L9_except_error) #endif if (__pyx_t_15 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_11); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 472, __pyx_L9_except_error) #else __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 472, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); #endif } } else { __pyx_t_11 = __pyx_t_16(__pyx_t_12); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 472, __pyx_L9_except_error) } break; } __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_11); __pyx_t_11 = 0; /* "pygame/_sprite.pyx":473 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< * return_value = True * else: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":474 * for spr in sprite.sprites(): * if self.has_internal(spr): * return_value = True # <<<<<<<<<<<<<< * else: * return False */ __pyx_v_return_value = 1; /* "pygame/_sprite.pyx":473 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< * return_value = True * else: */ goto __pyx_L21; } /* "pygame/_sprite.pyx":476 * return_value = True * else: * return False # <<<<<<<<<<<<<< * else: * if self.has_internal(sprite): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L10_except_return; } __pyx_L21:; /* "pygame/_sprite.pyx":472 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * return_value = True */ } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":471 * return False * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ goto __pyx_L18; } /* "pygame/_sprite.pyx":478 * return False * else: * if self.has_internal(sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ /*else*/ { __pyx_t_4 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0); if (__pyx_t_4) { /* "pygame/_sprite.pyx":479 * else: * if self.has_internal(sprite): * return_value = True # <<<<<<<<<<<<<< * else: * return False */ __pyx_v_return_value = 1; /* "pygame/_sprite.pyx":478 * return False * else: * if self.has_internal(sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ goto __pyx_L23; } /* "pygame/_sprite.pyx":481 * return_value = True * else: * return False # <<<<<<<<<<<<<< * * return return_value */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_except_return; } __pyx_L23:; } __pyx_L18:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; /* "pygame/_sprite.pyx":465 * return False * else: * try: # <<<<<<<<<<<<<< * if self.has(*sprite): * return_value = True */ __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L10_except_return:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L14_try_end:; } } __pyx_L5:; /* "pygame/_sprite.pyx":457 * return_value = False * * for sprite in sprites: # <<<<<<<<<<<<<< * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":483 * return False * * return return_value # <<<<<<<<<<<<<< * * def update(self, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_return_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":445 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< * """ask if group has a sprite or sprites * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.has", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprite); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":485 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """call the update method of every member sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_23update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_22update, "call the update method of every member sprite\n\n Group.update(*args, **kwargs): return None\n\n Calls the update method of every member sprite. All arguments that\n were passed to this method are passed to the Sprite update function.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_23update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_23update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_22update}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_23update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update", 1))) return NULL; if (unlikely(__pyx_kwds)) { __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 1); /* "pygame/_sprite.pyx":494 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * s.update(*args, **kwargs) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 494, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 494, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 494, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":495 * """ * for s in self.sprites(): * s.update(*args, **kwargs) # <<<<<<<<<<<<<< * * def draw(self, surface): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":494 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * s.update(*args, **kwargs) * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":485 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """call the update method of every member sprite * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":497 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites onto the surface * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_25draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_24draw, "draw all sprites onto the surface\n\n Group.draw(surface): return None\n\n Draws all of the member sprites onto the given surface.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_25draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_25draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_24draw}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_25draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 497, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_surface = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 497, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_surface); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_surface) { PyObject *__pyx_v_sprites = 0; PyObject *__pyx_v_surface_blit = 0; PyObject *__pyx_v_spritedict = 0; PyObject *__pyx_v_ret = 0; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); /* "pygame/_sprite.pyx":505 * * """ * cdef list sprites = self.sprites() # <<<<<<<<<<<<<< * cdef object surface_blit * cdef spritedict = self.spritedict */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":507 * cdef list sprites = self.sprites() * cdef object surface_blit * cdef spritedict = self.spritedict # <<<<<<<<<<<<<< * cdef object ret * */ __pyx_t_1 = __pyx_v_self->spritedict; __Pyx_INCREF(__pyx_t_1); __pyx_v_spritedict = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":510 * cdef object ret * * if isinstance(surface, Renderer): # <<<<<<<<<<<<<< * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_surface, __pyx_ptype_6pygame_5_sdl2_5video_Renderer); if (__pyx_t_2) { /* "pygame/_sprite.pyx":511 * * if isinstance(surface, Renderer): * for spr in sprites: # <<<<<<<<<<<<<< * ret = (surface).blit(spr.image, spr.rect) * PyDict_SetItem(spritedict, spr, ret) */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 511, __pyx_L1_error) } __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 511, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 511, __pyx_L1_error) #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sprite.pyx":512 * if isinstance(surface, Renderer): * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) # <<<<<<<<<<<<<< * PyDict_SetItem(spritedict, spr, ret) * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 512, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.dest = ((pgRectObject *)__pyx_t_5); __pyx_t_6 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *)((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface)->__pyx_vtab)->blit(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface), __pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_6); __pyx_t_6 = 0; /* "pygame/_sprite.pyx":513 * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) * PyDict_SetItem(spritedict, spr, ret) # <<<<<<<<<<<<<< * else: * surface_blit = surface.blit */ __pyx_t_8 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 513, __pyx_L1_error) /* "pygame/_sprite.pyx":511 * * if isinstance(surface, Renderer): * for spr in sprites: # <<<<<<<<<<<<<< * ret = (surface).blit(spr.image, spr.rect) * PyDict_SetItem(spritedict, spr, ret) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":510 * cdef object ret * * if isinstance(surface, Renderer): # <<<<<<<<<<<<<< * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) */ goto __pyx_L3; } /* "pygame/_sprite.pyx":515 * PyDict_SetItem(spritedict, spr, ret) * else: * surface_blit = surface.blit # <<<<<<<<<<<<<< * for spr in sprites: * ret = PyObject_CallFunctionObjArgs(surface_blit, */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":516 * else: * surface_blit = surface.blit * for spr in sprites: # <<<<<<<<<<<<<< * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 516, __pyx_L1_error) } __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 516, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 516, __pyx_L1_error) #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_6); __pyx_t_6 = 0; /* "pygame/_sprite.pyx":518 * for spr in sprites: * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, # <<<<<<<<<<<<<< * spr.rect, NULL) * PyDict_SetItem(spritedict, spr, ret) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "pygame/_sprite.pyx":519 * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, * spr.rect, NULL) # <<<<<<<<<<<<<< * PyDict_SetItem(spritedict, spr, ret) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "pygame/_sprite.pyx":517 * surface_blit = surface.blit * for spr in sprites: * ret = PyObject_CallFunctionObjArgs(surface_blit, # <<<<<<<<<<<<<< * spr.image, * spr.rect, NULL) */ __pyx_t_4 = PyObject_CallFunctionObjArgs(__pyx_v_surface_blit, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sprite.pyx":520 * spr.image, * spr.rect, NULL) * PyDict_SetItem(spritedict, spr, ret) # <<<<<<<<<<<<<< * * self.lostsprites[:] = [] */ __pyx_t_8 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 520, __pyx_L1_error) /* "pygame/_sprite.pyx":516 * else: * surface_blit = surface.blit * for spr in sprites: # <<<<<<<<<<<<<< * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":522 * PyDict_SetItem(spritedict, spr, ret) * * self.lostsprites[:] = [] # <<<<<<<<<<<<<< * * def clear(self, surface, bgd): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 522, __pyx_L1_error) } if (__Pyx_PyObject_SetSlice(__pyx_v_self->lostsprites, __pyx_t_1, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":497 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites onto the surface * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites); __Pyx_XDECREF(__pyx_v_surface_blit); __Pyx_XDECREF(__pyx_v_spritedict); __Pyx_XDECREF(__pyx_v_ret); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":524 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """erase the previous position of all sprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_26clear, "erase the previous position of all sprites\n\n Group.clear(surface, bgd): return None\n\n Clears the area under every drawn sprite in the group. The bgd\n argument should be Surface which is the same dimensions as the\n screen surface. The bgd could also be a function which accepts\n the given surface and the area to be cleared as arguments.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_27clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_26clear}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,&__pyx_n_s_bgd,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 524, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bgd)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 524, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 524, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clear") < 0)) __PYX_ERR(0, 524, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_surface = values[0]; __pyx_v_bgd = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 524, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_surface, __pyx_v_bgd); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd) { PyObject *__pyx_v_r = NULL; PyObject *__pyx_v_surface_blit = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear", 1); /* "pygame/_sprite.pyx":535 * * """ * if callable(bgd): # <<<<<<<<<<<<<< * for r in self.lostsprites: * bgd(surface, r) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_bgd}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":536 * """ * if callable(bgd): * for r in self.lostsprites: # <<<<<<<<<<<<<< * bgd(surface, r) * for r in self.spritedict.values(): */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 536, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 536, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 536, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":537 * if callable(bgd): * for r in self.lostsprites: * bgd(surface, r) # <<<<<<<<<<<<<< * for r in self.spritedict.values(): * if r: */ __Pyx_INCREF(__pyx_v_bgd); __pyx_t_3 = __pyx_v_bgd; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_surface, __pyx_v_r}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":536 * """ * if callable(bgd): * for r in self.lostsprites: # <<<<<<<<<<<<<< * bgd(surface, r) * for r in self.spritedict.values(): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":538 * for r in self.lostsprites: * bgd(surface, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< * if r: * bgd(surface, r) */ __pyx_t_6 = 0; if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 538, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->spritedict, 1, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_6, NULL, &__pyx_t_2, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":539 * bgd(surface, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * bgd(surface, r) * else: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 539, __pyx_L1_error) if (__pyx_t_5) { /* "pygame/_sprite.pyx":540 * for r in self.spritedict.values(): * if r: * bgd(surface, r) # <<<<<<<<<<<<<< * else: * surface_blit = surface.blit */ __Pyx_INCREF(__pyx_v_bgd); __pyx_t_3 = __pyx_v_bgd; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_surface, __pyx_v_r}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":539 * bgd(surface, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * bgd(surface, r) * else: */ } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":535 * * """ * if callable(bgd): # <<<<<<<<<<<<<< * for r in self.lostsprites: * bgd(surface, r) */ goto __pyx_L3; } /* "pygame/_sprite.pyx":542 * bgd(surface, r) * else: * surface_blit = surface.blit # <<<<<<<<<<<<<< * for r in self.lostsprites: * surface_blit(bgd, r, r) */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":543 * else: * surface_blit = surface.blit * for r in self.lostsprites: # <<<<<<<<<<<<<< * surface_blit(bgd, r, r) * for r in self.spritedict.values(): */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 543, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 543, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 543, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":544 * surface_blit = surface.blit * for r in self.lostsprites: * surface_blit(bgd, r, r) # <<<<<<<<<<<<<< * for r in self.spritedict.values(): * if r: */ __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_3 = __pyx_v_surface_blit; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":543 * else: * surface_blit = surface.blit * for r in self.lostsprites: # <<<<<<<<<<<<<< * surface_blit(bgd, r, r) * for r in self.spritedict.values(): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":545 * for r in self.lostsprites: * surface_blit(bgd, r, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< * if r: * surface_blit(bgd, r, r) */ __pyx_t_8 = 0; if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 545, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->spritedict, 1, __pyx_n_s_values, (&__pyx_t_6), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_8, NULL, &__pyx_t_2, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":546 * surface_blit(bgd, r, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * surface_blit(bgd, r, r) * */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 546, __pyx_L1_error) if (__pyx_t_5) { /* "pygame/_sprite.pyx":547 * for r in self.spritedict.values(): * if r: * surface_blit(bgd, r, r) # <<<<<<<<<<<<<< * * def empty(self): */ __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_3 = __pyx_v_surface_blit; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":546 * surface_blit(bgd, r, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * surface_blit(bgd, r, r) * */ } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":524 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """erase the previous position of all sprites * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_r); __Pyx_XDECREF(__pyx_v_surface_blit); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":549 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< * """remove all sprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_29empty(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_28empty, "remove all sprites\n\n Group.empty(): return None\n\n Removes all the sprites from the group.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_29empty = {"empty", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_29empty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_28empty}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_29empty(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("empty (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("empty", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "empty", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("empty", 1); /* "pygame/_sprite.pyx":557 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * self.remove_internal(s) * s.remove_internal(self) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 557, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 557, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 557, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":558 * """ * for s in self.sprites(): * self.remove_internal(s) # <<<<<<<<<<<<<< * s.remove_internal(self) * */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_s, 0); /* "pygame/_sprite.pyx":559 * for s in self.sprites(): * self.remove_internal(s) * s.remove_internal(self) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":557 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * self.remove_internal(s) * s.remove_internal(self) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":549 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< * """remove all sprites * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.empty", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":561 * s.remove_internal(self) * * def __bool__(self): # <<<<<<<<<<<<<< * return bool(self.sprites()) * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_31__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_31__bool__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__bool__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__bool__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__bool__", 1); /* "pygame/_sprite.pyx":562 * * def __bool__(self): * return bool(self.sprites()) # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None)&&(PyList_GET_SIZE(__pyx_t_1) != 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = (!(!__pyx_t_2)); goto __pyx_L0; /* "pygame/_sprite.pyx":561 * s.remove_internal(self) * * def __bool__(self): # <<<<<<<<<<<<<< * return bool(self.sprites()) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":564 * return bool(self.sprites()) * * def __len__(self): # <<<<<<<<<<<<<< * """return number of sprites in group * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__(PyObject *__pyx_v_self); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_13AbstractGroup_32__len__, "return number of sprites in group\n\n Group.len(group): return int\n\n Returns the number of sprites contained in the group.\n\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__; #endif static Py_ssize_t __pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_32__len__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pygame_7_sprite_13AbstractGroup_32__len__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 1); /* "pygame/_sprite.pyx":572 * * """ * return len(self.sprites()) # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 572, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "pygame/_sprite.pyx":564 * return bool(self.sprites()) * * def __len__(self): # <<<<<<<<<<<<<< * """return number of sprites in group * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":574 * return len(self.sprites()) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); /* "pygame/_sprite.pyx":575 * * def __repr__(self): * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) # <<<<<<<<<<<<<< * * cdef class Group(AbstractGroup): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 575, __pyx_L1_error) __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_d_sprites, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":574 * return len(self.sprites()) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":329 * _spritegroup = True * * cdef public dict spritedict # <<<<<<<<<<<<<< * cdef public list lostsprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict___get__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict___get__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->spritedict); __pyx_r = __pyx_v_self->spritedict; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_2__set__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_2__set__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 329, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->spritedict); __Pyx_DECREF(__pyx_v_self->spritedict); __pyx_v_self->spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.spritedict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_4__del__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_4__del__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->spritedict); __Pyx_DECREF(__pyx_v_self->spritedict); __pyx_v_self->spritedict = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":330 * * cdef public dict spritedict * cdef public list lostsprites # <<<<<<<<<<<<<< * * def __cinit__(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites___get__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites___get__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->lostsprites); __pyx_r = __pyx_v_self->lostsprites; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_2__set__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_2__set__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 330, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->lostsprites); __Pyx_DECREF(__pyx_v_self->lostsprites); __pyx_v_self->lostsprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.lostsprites.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_4__del__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_4__del__(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->lostsprites); __Pyx_DECREF(__pyx_v_self->lostsprites); __pyx_v_self->lostsprites = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_36__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_38__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_AbstractGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.AbstractGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":596 * * """ * def __init__(self, *sprites): # <<<<<<<<<<<<<< * AbstractGroup.__init__(self) * self.add(*sprites) */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_5Group___init__(((struct __pyx_obj_6pygame_7_sprite_Group *)__pyx_v_self), __pyx_v_sprites); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_5Group___init__(struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self, PyObject *__pyx_v_sprites) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":597 * """ * def __init__(self, *sprites): * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self.add(*sprites) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":598 * def __init__(self, *sprites): * AbstractGroup.__init__(self) * self.add(*sprites) # <<<<<<<<<<<<<< * * RenderPlain = Group */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":596 * * """ * def __init__(self, *sprites): # <<<<<<<<<<<<<< * AbstractGroup.__init__(self) * self.add(*sprites) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_5Group_3__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_5Group_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_5Group_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_5Group_3__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_5Group_2__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_Group *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_5Group_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.Group.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_5Group_5__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_5Group_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_5Group_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_5Group_5__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.Group.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_5Group_4__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_Group *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_5Group_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.Group.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":612 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< * spritedict = self.spritedict * surface_blit = surface.blit */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_1draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13RenderUpdates_1draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_1draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_1draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 612, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_surface = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 612, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.RenderUpdates.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(((struct __pyx_obj_6pygame_7_sprite_RenderUpdates *)__pyx_v_self), __pyx_v_surface); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self, PyObject *__pyx_v_surface) { PyObject *__pyx_v_spritedict = NULL; PyObject *__pyx_v_surface_blit = NULL; PyObject *__pyx_v_dirty = NULL; PyObject *__pyx_v_dirty_append = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_r = NULL; PyObject *__pyx_v_newrect = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); /* "pygame/_sprite.pyx":613 * """ * def draw(self, surface): * spritedict = self.spritedict # <<<<<<<<<<<<<< * surface_blit = surface.blit * dirty = self.lostsprites */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.spritedict; __Pyx_INCREF(__pyx_t_1); __pyx_v_spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":614 * def draw(self, surface): * spritedict = self.spritedict * surface_blit = surface.blit # <<<<<<<<<<<<<< * dirty = self.lostsprites * self.lostsprites.clear() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":615 * spritedict = self.spritedict * surface_blit = surface.blit * dirty = self.lostsprites # <<<<<<<<<<<<<< * self.lostsprites.clear() * dirty_append = dirty.append */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_v_dirty = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":616 * surface_blit = surface.blit * dirty = self.lostsprites * self.lostsprites.clear() # <<<<<<<<<<<<<< * dirty_append = dirty.append * for s in self.sprites(): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":617 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dirty_append = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":618 * self.lostsprites.clear() * dirty_append = dirty.append * for s in self.sprites(): # <<<<<<<<<<<<<< * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 618, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 618, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 618, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":619 * dirty_append = dirty.append * for s in self.sprites(): * r = spritedict[s] # <<<<<<<<<<<<<< * newrect = surface_blit(s.image, s.rect) * if r: */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 619, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":620 * for s in self.sprites(): * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) # <<<<<<<<<<<<<< * if r: * if newrect.colliderect(r): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_7 = __pyx_v_surface_blit; __pyx_t_8 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF_SET(__pyx_v_newrect, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":621 * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) * if r: # <<<<<<<<<<<<<< * if newrect.colliderect(r): * dirty_append(newrect.union(r)) */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 621, __pyx_L1_error) if (__pyx_t_9) { /* "pygame/_sprite.pyx":622 * newrect = surface_blit(s.image, s.rect) * if r: * if newrect.colliderect(r): # <<<<<<<<<<<<<< * dirty_append(newrect.union(r)) * else: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_r}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pygame/_sprite.pyx":617 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 617, __pyx_L1_error) } /* "pygame/_sprite.pyx":623 * if r: * if newrect.colliderect(r): * dirty_append(newrect.union(r)) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_r}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":622 * newrect = surface_blit(s.image, s.rect) * if r: * if newrect.colliderect(r): # <<<<<<<<<<<<<< * dirty_append(newrect.union(r)) * else: */ goto __pyx_L6; } /* "pygame/_sprite.pyx":625 * dirty_append(newrect.union(r)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(r) * else: */ /*else*/ { /* "pygame/_sprite.pyx":617 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 617, __pyx_L1_error) } /* "pygame/_sprite.pyx":625 * dirty_append(newrect.union(r)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(r) * else: */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 625, __pyx_L1_error) /* "pygame/_sprite.pyx":617 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 617, __pyx_L1_error) } /* "pygame/_sprite.pyx":626 * else: * dirty_append(newrect) * dirty_append(r) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_r); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) } __pyx_L6:; /* "pygame/_sprite.pyx":621 * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) * if r: # <<<<<<<<<<<<<< * if newrect.colliderect(r): * dirty_append(newrect.union(r)) */ goto __pyx_L5; } /* "pygame/_sprite.pyx":628 * dirty_append(r) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * spritedict[s] = newrect * return dirty */ /*else*/ { /* "pygame/_sprite.pyx":617 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 617, __pyx_L1_error) } /* "pygame/_sprite.pyx":628 * dirty_append(r) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * spritedict[s] = newrect * return dirty */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 628, __pyx_L1_error) } __pyx_L5:; /* "pygame/_sprite.pyx":629 * else: * dirty_append(newrect) * spritedict[s] = newrect # <<<<<<<<<<<<<< * return dirty * */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 629, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_spritedict, __pyx_v_s, __pyx_v_newrect) < 0))) __PYX_ERR(0, 629, __pyx_L1_error) /* "pygame/_sprite.pyx":618 * self.lostsprites.clear() * dirty_append = dirty.append * for s in self.sprites(): # <<<<<<<<<<<<<< * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":630 * dirty_append(newrect) * spritedict[s] = newrect * return dirty # <<<<<<<<<<<<<< * * cdef class OrderedUpdates(RenderUpdates): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dirty); __pyx_r = __pyx_v_dirty; goto __pyx_L0; /* "pygame/_sprite.pyx":612 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< * spritedict = self.spritedict * surface_blit = surface.blit */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sprite.RenderUpdates.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_spritedict); __Pyx_XDECREF(__pyx_v_surface_blit); __Pyx_XDECREF(__pyx_v_dirty); __Pyx_XDECREF(__pyx_v_dirty_append); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_r); __Pyx_XDECREF(__pyx_v_newrect); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_13RenderUpdates_2__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_RenderUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.RenderUpdates.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.RenderUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_13RenderUpdates_4__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_RenderUpdates *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_RenderUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.RenderUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":646 * cdef public list _spritelist * * def __init__(self, *sprites): # <<<<<<<<<<<<<< * self._spritelist = [] * RenderUpdates.__init__(self, *sprites) */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self), __pyx_v_sprites); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprites) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":647 * * def __init__(self, *sprites): * self._spritelist = [] # <<<<<<<<<<<<<< * RenderUpdates.__init__(self, *sprites) * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":648 * def __init__(self, *sprites): * self._spritelist = [] * RenderUpdates.__init__(self, *sprites) # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_RenderUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 648, __pyx_L1_error); __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":646 * cdef public list _spritelist * * def __init__(self, *sprites): # <<<<<<<<<<<<<< * self._spritelist = [] * RenderUpdates.__init__(self, *sprites) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":650 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * return list(self._spritelist) * */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 650, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":651 * * cpdef list sprites(self): * return list(self._spritelist) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite) noexcept: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":650 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * return list(self._spritelist) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14OrderedUpdates_3sprites = {"sprites", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sprites (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sprites", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sprites", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_2sprites(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_2sprites(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":653 * return list(self._spritelist) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":654 * * cpdef void add_internal(self, sprite) noexcept: * RenderUpdates.add_internal(self, sprite) # <<<<<<<<<<<<<< * self._spritelist.append(sprite) * */ __pyx_vtabptr_6pygame_7_sprite_RenderUpdates->__pyx_base.__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); /* "pygame/_sprite.pyx":655 * cpdef void add_internal(self, sprite) noexcept: * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) # <<<<<<<<<<<<<< * * cpdef void remove_internal(self, sprite) noexcept: */ if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 655, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_spritelist, __pyx_v_sprite); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 655, __pyx_L1_error) /* "pygame/_sprite.pyx":653 * return list(self._spritelist) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.OrderedUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14OrderedUpdates_5add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 653, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 653, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_4add_internal(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_4add_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":657 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":658 * * cpdef void remove_internal(self, sprite) noexcept: * RenderUpdates.remove_internal(self, sprite) # <<<<<<<<<<<<<< * self._spritelist.remove(sprite) * */ __pyx_vtabptr_6pygame_7_sprite_RenderUpdates->__pyx_base.__pyx_base.remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); /* "pygame/_sprite.pyx":659 * cpdef void remove_internal(self, sprite) noexcept: * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sprite}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":657 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.OrderedUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14OrderedUpdates_7remove_internal = {"remove_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_internal") < 0)) __PYX_ERR(0, 657, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 657, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_6remove_internal(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_6remove_internal(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":644 * """ * * cdef public list _spritelist # <<<<<<<<<<<<<< * * def __init__(self, *sprites): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist___get__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist___get__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_spritelist); __pyx_r = __pyx_v_self->_spritelist; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_2__set__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_2__set__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 644, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.OrderedUpdates._spritelist.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_4__del__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_4__del__(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_8__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14OrderedUpdates_10__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.OrderedUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":678 * cdef public int _default_layer * * def __cinit__(self): # <<<<<<<<<<<<<< * self._spritelayers = {} * self._spritelist = [] */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); /* "pygame/_sprite.pyx":679 * * def __cinit__(self): * self._spritelayers = {} # <<<<<<<<<<<<<< * self._spritelist = [] * */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelayers); __Pyx_DECREF(__pyx_v_self->_spritelayers); __pyx_v_self->_spritelayers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":680 * def __cinit__(self): * self._spritelayers = {} * self._spritelist = [] # <<<<<<<<<<<<<< * * def __init__(self, *sprites, **kwargs): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":678 * cdef public int _default_layer * * def __cinit__(self): # <<<<<<<<<<<<<< * self._spritelayers = {} * self._spritelist = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":682 * self._spritelist = [] * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """initialize an instance of LayeredUpdates with the given attributes * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_2__init__, "initialize an instance of LayeredUpdates with the given attributes\n\n You can set the default layer through kwargs using 'default_layer'\n and an integer for the layer. The default layer is 0.\n\n If the sprite you add has an attribute _layer, then that layer will be\n used. If **kwarg contains 'layer', then the passed sprites will be\n added to that layer (overriding the sprite._layer attribute). If\n neither the sprite nor **kwarg has a 'layer', then the default layer is\n used to add the sprites.\n\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__; #endif static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1; if (unlikely(__pyx_kwds)) { __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); } __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprites, __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":695 * * """ * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self._default_layer = kwargs.get('default_layer', 0) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":696 * """ * AbstractGroup.__init__(self) * self._default_layer = kwargs.get('default_layer', 0) # <<<<<<<<<<<<<< * * self.add(*sprites, **kwargs) */ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_default_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_default_layer = __pyx_t_5; /* "pygame/_sprite.pyx":698 * self._default_layer = kwargs.get('default_layer', 0) * * self.add(*sprites, **kwargs) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite, layer=None) noexcept: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":682 * self._spritelist = [] * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """initialize an instance of LayeredUpdates with the given attributes * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":700 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args) { PyObject *__pyx_v_layer = ((PyObject *)Py_None); PyObject *__pyx_v_sprites = NULL; PyObject *__pyx_v_sprites_layers = NULL; PyObject *__pyx_v_leng = NULL; PyObject *__pyx_v_low = NULL; PyObject *__pyx_v_mid = NULL; PyObject *__pyx_v_high = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_layer = __pyx_optional_args->layer; } } __Pyx_INCREF(__pyx_v_layer); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":706 * * """ * self.spritedict[sprite] = self._init_rect # <<<<<<<<<<<<<< * * if layer is None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 706, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite, __pyx_t_1) < 0))) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":708 * self.spritedict[sprite] = self._init_rect * * if layer is None: # <<<<<<<<<<<<<< * try: * layer = sprite._layer */ __pyx_t_6 = (__pyx_v_layer == Py_None); if (__pyx_t_6) { /* "pygame/_sprite.pyx":709 * * if layer is None: * try: # <<<<<<<<<<<<<< * layer = sprite._layer * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pygame/_sprite.pyx":710 * if layer is None: * try: * layer = sprite._layer # <<<<<<<<<<<<<< * except AttributeError: * layer = sprite._layer = self._default_layer */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_layer, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":709 * * if layer is None: * try: # <<<<<<<<<<<<<< * layer = sprite._layer * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sprite.pyx":711 * try: * layer = sprite._layer * except AttributeError: # <<<<<<<<<<<<<< * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_10) { __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 711, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":712 * layer = sprite._layer * except AttributeError: * layer = sprite._layer = self._default_layer # <<<<<<<<<<<<<< * elif hasattr(sprite, '_layer'): * sprite._layer = layer */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_layer, __pyx_t_4); if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_t_4) < 0) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; /* "pygame/_sprite.pyx":709 * * if layer is None: * try: # <<<<<<<<<<<<<< * layer = sprite._layer * except AttributeError: */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L9_try_end:; } /* "pygame/_sprite.pyx":708 * self.spritedict[sprite] = self._init_rect * * if layer is None: # <<<<<<<<<<<<<< * try: * layer = sprite._layer */ goto __pyx_L3; } /* "pygame/_sprite.pyx":713 * except AttributeError: * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): # <<<<<<<<<<<<<< * sprite._layer = layer * */ __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 713, __pyx_L1_error) if (__pyx_t_6) { /* "pygame/_sprite.pyx":714 * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): * sprite._layer = layer # <<<<<<<<<<<<<< * * sprites = self._spritelist # speedup */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_v_layer) < 0) __PYX_ERR(0, 714, __pyx_L1_error) /* "pygame/_sprite.pyx":713 * except AttributeError: * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): # <<<<<<<<<<<<<< * sprite._layer = layer * */ } __pyx_L3:; /* "pygame/_sprite.pyx":716 * sprite._layer = layer * * sprites = self._spritelist # speedup # <<<<<<<<<<<<<< * sprites_layers = self._spritelayers * sprites_layers[sprite] = layer */ __pyx_t_3 = __pyx_v_self->_spritelist; __Pyx_INCREF(__pyx_t_3); __pyx_v_sprites = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":717 * * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers # <<<<<<<<<<<<<< * sprites_layers[sprite] = layer * */ __pyx_t_3 = __pyx_v_self->_spritelayers; __Pyx_INCREF(__pyx_t_3); __pyx_v_sprites_layers = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":718 * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers * sprites_layers[sprite] = layer # <<<<<<<<<<<<<< * * # add the sprite at the right position */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 718, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_layer) < 0))) __PYX_ERR(0, 718, __pyx_L1_error) /* "pygame/_sprite.pyx":722 * # add the sprite at the right position * # bisect algorithmus * leng = len(sprites) # <<<<<<<<<<<<<< * low = mid = 0 * high = leng - 1 */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 722, __pyx_L1_error) } __pyx_t_11 = __Pyx_PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 722, __pyx_L1_error) __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leng = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":723 * # bisect algorithmus * leng = len(sprites) * low = mid = 0 # <<<<<<<<<<<<<< * high = leng - 1 * while low <= high: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_low = __pyx_int_0; __Pyx_INCREF(__pyx_int_0); __pyx_v_mid = __pyx_int_0; /* "pygame/_sprite.pyx":724 * leng = len(sprites) * low = mid = 0 * high = leng - 1 # <<<<<<<<<<<<<< * while low <= high: * mid = low + (high - low) // 2 */ __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_high = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":725 * low = mid = 0 * high = leng - 1 * while low <= high: # <<<<<<<<<<<<<< * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: */ while (1) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "pygame/_sprite.pyx":726 * high = leng - 1 * while low <= high: * mid = low + (high - low) // 2 # <<<<<<<<<<<<<< * if sprites_layers[sprites[mid]] <= layer: * low = mid + 1 */ __pyx_t_3 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_v_low, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":727 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< * low = mid + 1 * else: */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 727, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 727, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pygame/_sprite.pyx":728 * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: * low = mid + 1 # <<<<<<<<<<<<<< * else: * high = mid - 1 */ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":727 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< * low = mid + 1 * else: */ goto __pyx_L14; } /* "pygame/_sprite.pyx":730 * low = mid + 1 * else: * high = mid - 1 # <<<<<<<<<<<<<< * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= layer: */ /*else*/ { __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L14:; } /* "pygame/_sprite.pyx":732 * high = mid - 1 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< * mid += 1 * sprites.insert(mid, sprite) */ while (1) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { } else { __pyx_t_6 = __pyx_t_12; goto __pyx_L17_bool_binop_done; } if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 732, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 732, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_12; __pyx_L17_bool_binop_done:; if (!__pyx_t_6) break; /* "pygame/_sprite.pyx":733 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= layer: * mid += 1 # <<<<<<<<<<<<<< * sprites.insert(mid, sprite) * */ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_3); __pyx_t_3 = 0; } /* "pygame/_sprite.pyx":734 * while mid < leng and sprites_layers[sprites[mid]] <= layer: * mid += 1 * sprites.insert(mid, sprite) # <<<<<<<<<<<<<< * * def add(self, *sprites, **kwargs): */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert"); __PYX_ERR(0, 734, __pyx_L1_error) } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L1_error) __pyx_t_13 = PyList_Insert(__pyx_v_sprites, __pyx_t_11, __pyx_v_sprite); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 734, __pyx_L1_error) /* "pygame/_sprite.pyx":700 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites); __Pyx_XDECREF(__pyx_v_sprites_layers); __Pyx_XDECREF(__pyx_v_leng); __Pyx_XDECREF(__pyx_v_low); __Pyx_XDECREF(__pyx_v_mid); __Pyx_XDECREF(__pyx_v_high); __Pyx_XDECREF(__pyx_v_layer); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_4add_internal, "Do not use this method directly.\n\n It is used by the group to add a sprite internally.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_5add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_4add_internal}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_layer = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_layer_2,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer_2); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 700, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sprite = values[0]; __pyx_v_layer = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_4add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, __pyx_v_layer); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_4add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_layer) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 1; __pyx_t_1.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates->add_internal(__pyx_v_self, __pyx_v_sprite, 1, &__pyx_t_1); __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal__pyx_wrap_1(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(__pyx_v_self, __pyx_v_sprite, __pyx_skip_dispatch, NULL); } /* "pygame/_sprite.pyx":736 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """add a sprite or sequence of sprites to a group * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_6add, "add a sprite or sequence of sprites to a group\n\n LayeredUpdates.add(*sprites, **kwargs): return None\n\n If the sprite you add has an attribute _layer, then that layer will be\n used. If **kwarg contains 'layer', then the passed sprites will be\n added to that layer (overriding the sprite._layer attribute). If\n neither the sprite nor **kwarg has a 'layer', then the default layer is\n used to add the sprites.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_7add = {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_7add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_6add}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 1))) return NULL; if (unlikely(__pyx_kwds)) { __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); } __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprites, __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_layer = NULL; PyObject *__pyx_v_sprite = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; unsigned int __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject *(*__pyx_t_18)(PyObject *); PyObject *__pyx_t_19 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 1); /* "pygame/_sprite.pyx":749 * """ * * if not sprites: # <<<<<<<<<<<<<< * return * if 'layer' in kwargs: */ __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_sprites) != 0); __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "pygame/_sprite.pyx":750 * * if not sprites: * return # <<<<<<<<<<<<<< * if 'layer' in kwargs: * layer = kwargs['layer'] */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sprite.pyx":749 * """ * * if not sprites: # <<<<<<<<<<<<<< * return * if 'layer' in kwargs: */ } /* "pygame/_sprite.pyx":751 * if not sprites: * return * if 'layer' in kwargs: # <<<<<<<<<<<<<< * layer = kwargs['layer'] * else: */ __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_layer_2, __pyx_v_kwargs, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 751, __pyx_L1_error) if (__pyx_t_2) { /* "pygame/_sprite.pyx":752 * return * if 'layer' in kwargs: * layer = kwargs['layer'] # <<<<<<<<<<<<<< * else: * layer = None */ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_layer_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_layer = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":751 * if not sprites: * return * if 'layer' in kwargs: # <<<<<<<<<<<<<< * layer = kwargs['layer'] * else: */ goto __pyx_L4; } /* "pygame/_sprite.pyx":754 * layer = kwargs['layer'] * else: * layer = None # <<<<<<<<<<<<<< * for sprite in sprites: * # It's possible that some sprite is also an iterator. */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_layer = Py_None; } __pyx_L4:; /* "pygame/_sprite.pyx":755 * else: * layer = None * for sprite in sprites: # <<<<<<<<<<<<<< * # It's possible that some sprite is also an iterator. * # If this is the case, we should add the sprite itself, */ __pyx_t_3 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 755, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 755, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":759 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if not self.has_internal(sprite): * self.add_internal(sprite, layer) */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_sprite, __pyx_ptype_6pygame_7_sprite_Sprite); if (__pyx_t_2) { /* "pygame/_sprite.pyx":760 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite, layer) * (sprite).add_internal(self) */ __pyx_t_2 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0)); if (__pyx_t_2) { /* "pygame/_sprite.pyx":761 * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): * self.add_internal(sprite, layer) # <<<<<<<<<<<<<< * (sprite).add_internal(self) * else: */ __pyx_t_6.__pyx_n = 1; __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0, &__pyx_t_6); /* "pygame/_sprite.pyx":762 * if not self.has_internal(sprite): * self.add_internal(sprite, layer) * (sprite).add_internal(self) # <<<<<<<<<<<<<< * else: * try: */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite), ((PyObject *)__pyx_v_self), 0); /* "pygame/_sprite.pyx":760 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite, layer) * (sprite).add_internal(self) */ } /* "pygame/_sprite.pyx":759 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< * if not self.has_internal(sprite): * self.add_internal(sprite, layer) */ goto __pyx_L7; } /* "pygame/_sprite.pyx":764 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pygame/_sprite.pyx":767 * # See if sprite is an iterator, like a list or sprite * # group. * self.add(*sprite, **kwargs) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * # Not iterable. This is probably a sprite that is not an */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 767, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 767, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pygame/_sprite.pyx":764 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L16_try_end; __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":768 * # group. * self.add(*sprite, **kwargs) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< * # Not iterable. This is probably a sprite that is not an * # instance of the Sprite class or is not an instance of a */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_AttributeError); if (__pyx_t_13) { __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(0, 768, __pyx_L11_except_error) __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); /* "pygame/_sprite.pyx":773 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ __pyx_t_2 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 773, __pyx_L11_except_error) if (__pyx_t_2) { /* "pygame/_sprite.pyx":774 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr, layer) */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 774, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_16, 0+__pyx_t_16); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_14 = __pyx_t_5; __Pyx_INCREF(__pyx_t_14); __pyx_t_17 = 0; __pyx_t_18 = NULL; } else { __pyx_t_17 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 774, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 774, __pyx_L11_except_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_18)) { if (likely(PyList_CheckExact(__pyx_t_14))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_14); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 774, __pyx_L11_except_error) #endif if (__pyx_t_17 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely((0 < 0))) __PYX_ERR(0, 774, __pyx_L11_except_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_14, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_14); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 774, __pyx_L11_except_error) #endif if (__pyx_t_17 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_17); __Pyx_INCREF(__pyx_t_5); __pyx_t_17++; if (unlikely((0 < 0))) __PYX_ERR(0, 774, __pyx_L11_except_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_14, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_18(__pyx_t_14); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 774, __pyx_L11_except_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":775 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< * self.add_internal(spr, layer) * spr.add_internal(self) */ __pyx_t_2 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_spr, 0)); if (__pyx_t_2) { /* "pygame/_sprite.pyx":776 * for spr in sprite.sprites(): * if not self.has_internal(spr): * self.add_internal(spr, layer) # <<<<<<<<<<<<<< * spr.add_internal(self) * elif not self.has_internal(sprite): */ __pyx_t_6.__pyx_n = 1; __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_spr, 0, &__pyx_t_6); /* "pygame/_sprite.pyx":777 * if not self.has_internal(spr): * self.add_internal(spr, layer) * spr.add_internal(self) # <<<<<<<<<<<<<< * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 777, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_19 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_15))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15); if (likely(__pyx_t_19)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_15, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_19, ((PyObject *)__pyx_v_self)}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":775 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< * self.add_internal(spr, layer) * spr.add_internal(self) */ } /* "pygame/_sprite.pyx":774 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr, layer) */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "pygame/_sprite.pyx":773 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ goto __pyx_L19; } /* "pygame/_sprite.pyx":778 * self.add_internal(spr, layer) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite, layer) * sprite.add_internal(self) */ __pyx_t_2 = (!((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0)); if (__pyx_t_2) { /* "pygame/_sprite.pyx":779 * spr.add_internal(self) * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) # <<<<<<<<<<<<<< * sprite.add_internal(self) * */ __pyx_t_6.__pyx_n = 1; __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0, &__pyx_t_6); /* "pygame/_sprite.pyx":780 * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) * sprite.add_internal(self) # <<<<<<<<<<<<<< * * cpdef void remove_internal(self, sprite) noexcept: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = NULL; __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, ((PyObject *)__pyx_v_self)}; __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 780, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "pygame/_sprite.pyx":778 * self.add_internal(spr, layer) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite, layer) * sprite.add_internal(self) */ } __pyx_L19:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_exception_handled; } goto __pyx_L11_except_error; /* "pygame/_sprite.pyx":764 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< * # See if sprite is an iterator, like a list or sprite * # group. */ __pyx_L11_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L10_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L16_try_end:; } } __pyx_L7:; /* "pygame/_sprite.pyx":755 * else: * layer = None * for sprite in sprites: # <<<<<<<<<<<<<< * # It's possible that some sprite is also an iterator. * # If this is the case, we should add the sprite itself, */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":736 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """add a sprite or sequence of sprites to a group * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_layer); __Pyx_XDECREF(__pyx_v_sprite); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":782 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { PyObject *__pyx_v_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":788 * * """ * self._spritelist.remove(sprite) # <<<<<<<<<<<<<< * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sprite}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":790 * self._spritelist.remove(sprite) * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] # <<<<<<<<<<<<<< * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 790, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":791 * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] * if r is not self._init_rect: # <<<<<<<<<<<<<< * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__pyx_v_r != __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pygame/_sprite.pyx":792 * r = self.spritedict[sprite] * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect # <<<<<<<<<<<<<< * if hasattr(sprite, 'rect'): * self.lostsprites.append(sprite.rect) # dirty rect */ if (unlikely(__pyx_v_self->__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 792, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_v_r); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 792, __pyx_L1_error) /* "pygame/_sprite.pyx":791 * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] * if r is not self._init_rect: # <<<<<<<<<<<<<< * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): */ } /* "pygame/_sprite.pyx":793 * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): # <<<<<<<<<<<<<< * self.lostsprites.append(sprite.rect) # dirty rect * */ __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 793, __pyx_L1_error) if (__pyx_t_6) { /* "pygame/_sprite.pyx":794 * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): * self.lostsprites.append(sprite.rect) # dirty rect # <<<<<<<<<<<<<< * * del self.spritedict[sprite] */ if (unlikely(__pyx_v_self->__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 794, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":793 * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): # <<<<<<<<<<<<<< * self.lostsprites.append(sprite.rect) # dirty rect * */ } /* "pygame/_sprite.pyx":796 * self.lostsprites.append(sprite.rect) # dirty rect * * del self.spritedict[sprite] # <<<<<<<<<<<<<< * del self._spritelayers[sprite] * */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 796, __pyx_L1_error) } if (unlikely((PyDict_DelItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite) < 0))) __PYX_ERR(0, 796, __pyx_L1_error) /* "pygame/_sprite.pyx":797 * * del self.spritedict[sprite] * del self._spritelayers[sprite] # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 797, __pyx_L1_error) } if (unlikely((PyDict_DelItem(__pyx_v_self->_spritelayers, __pyx_v_sprite) < 0))) __PYX_ERR(0, 797, __pyx_L1_error) /* "pygame/_sprite.pyx":782 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.LayeredUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_r); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_8remove_internal, "Do not use this method directly.\n\n The group uses it to add a sprite.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_9remove_internal = {"remove_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_8remove_internal}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_internal") < 0)) __PYX_ERR(0, 782, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 782, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_8remove_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_8remove_internal(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":799 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """return a ordered list of sprites (first back, last top). * */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 799, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":805 * * """ * return list(self._spritelist) # <<<<<<<<<<<<<< * * def draw(self, surface): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":799 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """return a ordered list of sprites (first back, last top). * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_10sprites, "return a ordered list of sprites (first back, last top).\n\n LayeredUpdates.sprites(): return sprites\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_11sprites = {"sprites", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_10sprites}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sprites (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sprites", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sprites", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_10sprites(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_10sprites(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":807 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the passed surface * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_12draw, "draw all sprites in the right order onto the passed surface\n\n LayeredUpdates.draw(surface): return Rect_list\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_13draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_12draw}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 807, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 807, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_surface = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 807, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_surface); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_surface) { PyObject *__pyx_v_spritedict = NULL; PyObject *__pyx_v_surface_blit = NULL; PyObject *__pyx_v_dirty = NULL; PyObject *__pyx_v_dirty_append = NULL; PyObject *__pyx_v_init_rect = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_v_rec = NULL; PyObject *__pyx_v_newrect = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); /* "pygame/_sprite.pyx":813 * * """ * spritedict = self.spritedict # <<<<<<<<<<<<<< * surface_blit = surface.blit * dirty = self.lostsprites */ __pyx_t_1 = __pyx_v_self->__pyx_base.spritedict; __Pyx_INCREF(__pyx_t_1); __pyx_v_spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":814 * """ * spritedict = self.spritedict * surface_blit = surface.blit # <<<<<<<<<<<<<< * dirty = self.lostsprites * self.lostsprites.clear() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":815 * spritedict = self.spritedict * surface_blit = surface.blit * dirty = self.lostsprites # <<<<<<<<<<<<<< * self.lostsprites.clear() * dirty_append = dirty.append */ __pyx_t_1 = __pyx_v_self->__pyx_base.lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_v_dirty = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":816 * surface_blit = surface.blit * dirty = self.lostsprites * self.lostsprites.clear() # <<<<<<<<<<<<<< * dirty_append = dirty.append * init_rect = self._init_rect */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":817 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dirty_append = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":818 * self.lostsprites.clear() * dirty_append = dirty.append * init_rect = self._init_rect # <<<<<<<<<<<<<< * for spr in self.sprites(): * rec = spritedict[spr] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_init_rect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":819 * dirty_append = dirty.append * init_rect = self._init_rect * for spr in self.sprites(): # <<<<<<<<<<<<<< * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 819, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 819, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 819, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":820 * init_rect = self._init_rect * for spr in self.sprites(): * rec = spritedict[spr] # <<<<<<<<<<<<<< * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 820, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_spr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_rec, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":821 * for spr in self.sprites(): * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) # <<<<<<<<<<<<<< * if rec is init_rect: * dirty_append(newrect) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_7 = __pyx_v_surface_blit; __pyx_t_8 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF_SET(__pyx_v_newrect, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":822 * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: # <<<<<<<<<<<<<< * dirty_append(newrect) * else: */ __pyx_t_9 = (__pyx_v_rec == __pyx_v_init_rect); if (__pyx_t_9) { /* "pygame/_sprite.pyx":817 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 817, __pyx_L1_error) } /* "pygame/_sprite.pyx":823 * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: * dirty_append(newrect) # <<<<<<<<<<<<<< * else: * if newrect.colliderect(rec): */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 823, __pyx_L1_error) /* "pygame/_sprite.pyx":822 * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: # <<<<<<<<<<<<<< * dirty_append(newrect) * else: */ goto __pyx_L5; } /* "pygame/_sprite.pyx":825 * dirty_append(newrect) * else: * if newrect.colliderect(rec): # <<<<<<<<<<<<<< * dirty_append(newrect.union(rec)) * else: */ /*else*/ { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_rec}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pygame/_sprite.pyx":817 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 817, __pyx_L1_error) } /* "pygame/_sprite.pyx":826 * else: * if newrect.colliderect(rec): * dirty_append(newrect.union(rec)) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_rec}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":825 * dirty_append(newrect) * else: * if newrect.colliderect(rec): # <<<<<<<<<<<<<< * dirty_append(newrect.union(rec)) * else: */ goto __pyx_L6; } /* "pygame/_sprite.pyx":828 * dirty_append(newrect.union(rec)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(rec) * spritedict[spr] = newrect */ /*else*/ { /* "pygame/_sprite.pyx":817 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 817, __pyx_L1_error) } /* "pygame/_sprite.pyx":828 * dirty_append(newrect.union(rec)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(rec) * spritedict[spr] = newrect */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error) /* "pygame/_sprite.pyx":817 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 817, __pyx_L1_error) } /* "pygame/_sprite.pyx":829 * else: * dirty_append(newrect) * dirty_append(rec) # <<<<<<<<<<<<<< * spritedict[spr] = newrect * return dirty */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_rec); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 829, __pyx_L1_error) } __pyx_L6:; } __pyx_L5:; /* "pygame/_sprite.pyx":830 * dirty_append(newrect) * dirty_append(rec) * spritedict[spr] = newrect # <<<<<<<<<<<<<< * return dirty * */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 830, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_newrect) < 0))) __PYX_ERR(0, 830, __pyx_L1_error) /* "pygame/_sprite.pyx":819 * dirty_append = dirty.append * init_rect = self._init_rect * for spr in self.sprites(): # <<<<<<<<<<<<<< * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":831 * dirty_append(rec) * spritedict[spr] = newrect * return dirty # <<<<<<<<<<<<<< * * def get_sprites_at(self, pos): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dirty); __pyx_r = __pyx_v_dirty; goto __pyx_L0; /* "pygame/_sprite.pyx":807 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the passed surface * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_spritedict); __Pyx_XDECREF(__pyx_v_surface_blit); __Pyx_XDECREF(__pyx_v_dirty); __Pyx_XDECREF(__pyx_v_dirty_append); __Pyx_XDECREF(__pyx_v_init_rect); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XDECREF(__pyx_v_rec); __Pyx_XDECREF(__pyx_v_newrect); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":833 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< * """return a list with all sprites at that position * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at, "return a list with all sprites at that position\n\n LayeredUpdates.get_sprites_at(pos): return colliding_sprites\n\n Bottom sprites are listed first; the top ones are listed last.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at = {"get_sprites_at", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_pos = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_sprites_at (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_sprites_at") < 0)) __PYX_ERR(0, 833, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_pos = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_sprites_at", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 833, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprites_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_pos); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_pos) { PyObject *__pyx_v__sprites = NULL; pgRectObject *__pyx_v_rect = NULL; PyObject *__pyx_v_colliding_idx = NULL; PyObject *__pyx_v_colliding = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprites_at", 1); /* "pygame/_sprite.pyx":841 * * """ * _sprites = self._spritelist # <<<<<<<<<<<<<< * rect = Rect(pos, (0, 0)) * colliding_idx = rect.collidelistall(_sprites) */ __pyx_t_1 = __pyx_v_self->_spritelist; __Pyx_INCREF(__pyx_t_1); __pyx_v__sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":842 * """ * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) # <<<<<<<<<<<<<< * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pos); __Pyx_GIVEREF(__pyx_v_pos); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pos)) __PYX_ERR(0, 842, __pyx_L1_error); __Pyx_INCREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_tuple_)) __PYX_ERR(0, 842, __pyx_L1_error); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rect = ((pgRectObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":843 * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) * colliding_idx = rect.collidelistall(_sprites) # <<<<<<<<<<<<<< * colliding = [_sprites[i] for i in colliding_idx] * return colliding */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rect), __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__sprites}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_v_colliding_idx = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":844 * rect = Rect(pos, (0, 0)) * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] # <<<<<<<<<<<<<< * return colliding * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_colliding_idx)) || PyTuple_CheckExact(__pyx_v_colliding_idx)) { __pyx_t_1 = __pyx_v_colliding_idx; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_colliding_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 844, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 844, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 844, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 844, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 844, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 844, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__sprites, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_colliding = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":845 * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] * return colliding # <<<<<<<<<<<<<< * * def get_sprite(self, idx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_colliding); __pyx_r = __pyx_v_colliding; goto __pyx_L0; /* "pygame/_sprite.pyx":833 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< * """return a list with all sprites at that position * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprites_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v__sprites); __Pyx_XDECREF((PyObject *)__pyx_v_rect); __Pyx_XDECREF(__pyx_v_colliding_idx); __Pyx_XDECREF(__pyx_v_colliding); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":847 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< * """return the sprite at the index idx from the groups sprites * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_17get_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_16get_sprite, "return the sprite at the index idx from the groups sprites\n\n LayeredUpdates.get_sprite(idx): return sprite\n\n Raises IndexOutOfBounds if the idx is not within range.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_17get_sprite = {"get_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_17get_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_16get_sprite}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_17get_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_idx = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_sprite (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idx,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idx)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_sprite") < 0)) __PYX_ERR(0, 847, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_idx = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_sprite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 847, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_idx); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_idx) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprite", 1); /* "pygame/_sprite.pyx":855 * * """ * return self._spritelist[idx] # <<<<<<<<<<<<<< * * def remove_sprites_of_layer(self, layer_nr): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 855, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_spritelist, __pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":847 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< * """return the sprite at the index idx from the groups sprites * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":857 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< * """remove all sprites from a layer and return them as a list * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer, "remove all sprites from a layer and return them as a list\n\n LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer = {"remove_sprites_of_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_layer_nr = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_sprites_of_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layer_nr,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer_nr)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 857, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_sprites_of_layer") < 0)) __PYX_ERR(0, 857, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_layer_nr = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_sprites_of_layer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 857, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.remove_sprites_of_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_layer_nr); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer_nr) { PyObject *__pyx_v_sprites = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_sprites_of_layer", 1); /* "pygame/_sprite.pyx":863 * * """ * sprites = self.get_sprites_from_layer(layer_nr) # <<<<<<<<<<<<<< * self.remove(*sprites) * return sprites */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_layer_nr}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_sprites = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":864 * """ * sprites = self.get_sprites_from_layer(layer_nr) * self.remove(*sprites) # <<<<<<<<<<<<<< * return sprites * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_sprites); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":865 * sprites = self.get_sprites_from_layer(layer_nr) * self.remove(*sprites) * return sprites # <<<<<<<<<<<<<< * * #---# layer methods */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sprites); __pyx_r = __pyx_v_sprites; goto __pyx_L0; /* "pygame/_sprite.pyx":857 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< * """remove all sprites from a layer and return them as a list * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.remove_sprites_of_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":868 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< * """return a list of unique defined layers defined. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_21layers(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_20layers, "return a list of unique defined layers defined.\n\n LayeredUpdates.layers(): return layers\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_21layers = {"layers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_21layers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_20layers}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_21layers(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("layers (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("layers", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "layers", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("layers", 1); /* "pygame/_sprite.pyx":874 * * """ * return sorted(set(self._spritelayers.values())) # <<<<<<<<<<<<<< * * def change_layer(self, sprite, new_layer): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 874, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_Values(__pyx_v_self->_spritelayers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 874, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":868 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< * """return a list of unique defined layers defined. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.layers", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":876 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_22change_layer, "change the layer of the sprite\n\n LayeredUpdates.change_layer(sprite, new_layer): return None\n\n The sprite must have been added to the renderer already. This is not\n checked.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_23change_layer = {"change_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_22change_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_new_layer = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("change_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_new_layer,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_layer)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 876, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "change_layer") < 0)) __PYX_ERR(0, 876, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_sprite = values[0]; __pyx_v_new_layer = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 876, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, __pyx_v_new_layer); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_new_layer) { PyObject *__pyx_v_sprites = NULL; PyObject *__pyx_v_sprites_layers = NULL; PyObject *__pyx_v_leng = NULL; PyObject *__pyx_v_low = NULL; PyObject *__pyx_v_mid = NULL; PyObject *__pyx_v_high = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_layer", 1); /* "pygame/_sprite.pyx":885 * * """ * sprites = self._spritelist # speedup # <<<<<<<<<<<<<< * sprites_layers = self._spritelayers # speedup * */ __pyx_t_1 = __pyx_v_self->_spritelist; __Pyx_INCREF(__pyx_t_1); __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":886 * """ * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers # speedup # <<<<<<<<<<<<<< * * sprites.remove(sprite) */ __pyx_t_1 = __pyx_v_self->_spritelayers; __Pyx_INCREF(__pyx_t_1); __pyx_v_sprites_layers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":888 * sprites_layers = self._spritelayers # speedup * * sprites.remove(sprite) # <<<<<<<<<<<<<< * sprites_layers.pop(sprite) * */ __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_sprites, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":889 * * sprites.remove(sprite) * sprites_layers.pop(sprite) # <<<<<<<<<<<<<< * * # add the sprite at the right position */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(0, 889, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_sprites_layers, __pyx_v_sprite, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":893 * # add the sprite at the right position * # bisect algorithmus * leng = len(sprites) # <<<<<<<<<<<<<< * low = mid = 0 * high = leng - 1 */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 893, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error) __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leng = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":894 * # bisect algorithmus * leng = len(sprites) * low = mid = 0 # <<<<<<<<<<<<<< * high = leng - 1 * while low <= high: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_low = __pyx_int_0; __Pyx_INCREF(__pyx_int_0); __pyx_v_mid = __pyx_int_0; /* "pygame/_sprite.pyx":895 * leng = len(sprites) * low = mid = 0 * high = leng - 1 # <<<<<<<<<<<<<< * while low <= high: * mid = low + (high - low) // 2 */ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_high = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":896 * low = mid = 0 * high = leng - 1 * while low <= high: # <<<<<<<<<<<<<< * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: */ while (1) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) break; /* "pygame/_sprite.pyx":897 * high = leng - 1 * while low <= high: * mid = low + (high - low) // 2 # <<<<<<<<<<<<<< * if sprites_layers[sprites[mid]] <= new_layer: * low = mid + 1 */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_low, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":898 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< * low = mid + 1 * else: */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 898, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 898, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pygame/_sprite.pyx":899 * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: * low = mid + 1 # <<<<<<<<<<<<<< * else: * high = mid - 1 */ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":898 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< * low = mid + 1 * else: */ goto __pyx_L5; } /* "pygame/_sprite.pyx":901 * low = mid + 1 * else: * high = mid - 1 # <<<<<<<<<<<<<< * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: */ /*else*/ { __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; } /* "pygame/_sprite.pyx":903 * high = mid - 1 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< * mid += 1 * sprites.insert(mid, sprite) */ while (1) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L8_bool_binop_done; } if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 903, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 903, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L8_bool_binop_done:; if (!__pyx_t_3) break; /* "pygame/_sprite.pyx":904 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: * mid += 1 # <<<<<<<<<<<<<< * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): */ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_1); __pyx_t_1 = 0; } /* "pygame/_sprite.pyx":905 * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: * mid += 1 * sprites.insert(mid, sprite) # <<<<<<<<<<<<<< * if hasattr(sprite, 'layer'): * sprite.layer = new_layer */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert"); __PYX_ERR(0, 905, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error) __pyx_t_6 = PyList_Insert(__pyx_v_sprites, __pyx_t_2, __pyx_v_sprite); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 905, __pyx_L1_error) /* "pygame/_sprite.pyx":906 * mid += 1 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): # <<<<<<<<<<<<<< * sprite.layer = new_layer * */ __pyx_t_3 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 906, __pyx_L1_error) if (__pyx_t_3) { /* "pygame/_sprite.pyx":907 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): * sprite.layer = new_layer # <<<<<<<<<<<<<< * * # add layer info */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer_2, __pyx_v_new_layer) < 0) __PYX_ERR(0, 907, __pyx_L1_error) /* "pygame/_sprite.pyx":906 * mid += 1 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): # <<<<<<<<<<<<<< * sprite.layer = new_layer * */ } /* "pygame/_sprite.pyx":910 * * # add layer info * sprites_layers[sprite] = new_layer # <<<<<<<<<<<<<< * * def get_layer_of_sprite(self, sprite): */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 910, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_new_layer) < 0))) __PYX_ERR(0, 910, __pyx_L1_error) /* "pygame/_sprite.pyx":876 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites); __Pyx_XDECREF(__pyx_v_sprites_layers); __Pyx_XDECREF(__pyx_v_leng); __Pyx_XDECREF(__pyx_v_low); __Pyx_XDECREF(__pyx_v_mid); __Pyx_XDECREF(__pyx_v_high); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":912 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< * """return the layer that sprite is currently in * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite, "return the layer that sprite is currently in\n\n If the sprite is not found, then it will return the default layer.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite = {"get_layer_of_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_layer_of_sprite (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 912, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_layer_of_sprite") < 0)) __PYX_ERR(0, 912, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_layer_of_sprite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 912, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_layer_of_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_layer_of_sprite", 1); /* "pygame/_sprite.pyx":918 * * """ * return self._spritelayers.get(sprite, self._default_layer) # <<<<<<<<<<<<<< * * def get_top_layer(self): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(0, 918, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_spritelayers, __pyx_v_sprite, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":912 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< * """return the layer that sprite is currently in * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_layer_of_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":920 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< * """return the top layer * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_27get_top_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_26get_top_layer, "return the top layer\n\n LayeredUpdates.get_top_layer(): return layer\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_27get_top_layer = {"get_top_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_27get_top_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_26get_top_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_27get_top_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_top_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_top_layer", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_top_layer", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_top_layer", 1); /* "pygame/_sprite.pyx":926 * * """ * return self._spritelayers[self._spritelist[-1]] # <<<<<<<<<<<<<< * * def get_bottom_layer(self): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 926, __pyx_L1_error) } if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 926, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":920 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< * """return the top layer * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_top_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":928 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< * """return the bottom layer * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer, "return the bottom layer\n\n LayeredUpdates.get_bottom_layer(): return layer\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer = {"get_bottom_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_bottom_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_bottom_layer", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_bottom_layer", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_bottom_layer", 1); /* "pygame/_sprite.pyx":934 * * """ * return self._spritelayers[self._spritelist[0]] # <<<<<<<<<<<<<< * * def move_to_front(self, sprite): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 934, __pyx_L1_error) } if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 934, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":928 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< * """return the bottom layer * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_bottom_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":936 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< * """bring the sprite to front layer * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_31move_to_front(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_30move_to_front, "bring the sprite to front layer\n\n LayeredUpdates.move_to_front(sprite): return None\n\n Brings the sprite to front by changing the sprite layer to the top-most\n layer. The sprite is added at the end of the list of sprites in that\n top-most layer.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_31move_to_front = {"move_to_front", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_31move_to_front, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_30move_to_front}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_31move_to_front(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move_to_front (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "move_to_front") < 0)) __PYX_ERR(0, 936, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("move_to_front", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 936, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.move_to_front", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move_to_front", 1); /* "pygame/_sprite.pyx":946 * * """ * self.change_layer(sprite, self.get_top_layer()) # <<<<<<<<<<<<<< * * def move_to_back(self, sprite): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_top_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_4 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":936 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< * """bring the sprite to front layer * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.move_to_front", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":948 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< * """move the sprite to the bottom layer * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_33move_to_back(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_32move_to_back, "move the sprite to the bottom layer\n\n LayeredUpdates.move_to_back(sprite): return None\n\n Moves the sprite to the bottom layer by moving it to a new layer below\n the current bottom layer.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_33move_to_back = {"move_to_back", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_33move_to_back, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_32move_to_back}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_33move_to_back(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move_to_back (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "move_to_back") < 0)) __PYX_ERR(0, 948, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("move_to_back", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 948, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.move_to_back", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move_to_back", 1); /* "pygame/_sprite.pyx":957 * * """ * self.change_layer(sprite, self.get_bottom_layer() - 1) # <<<<<<<<<<<<<< * * def get_top_sprite(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_bottom_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_sprite, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":948 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< * """move the sprite to the bottom layer * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.move_to_back", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":959 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< * """return the topmost sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite, "return the topmost sprite\n\n LayeredUpdates.get_top_sprite(): return Sprite\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite = {"get_top_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_top_sprite (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_top_sprite", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_top_sprite", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_top_sprite", 1); /* "pygame/_sprite.pyx":965 * * """ * return self._spritelist[-1] # <<<<<<<<<<<<<< * * def get_sprites_from_layer(self, layer): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 965, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":959 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< * """return the topmost sprite * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_top_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":967 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< * """return all sprites from a layer ordered as they where added * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer, "return all sprites from a layer ordered as they where added\n\n LayeredUpdates.get_sprites_from_layer(layer): return sprites\n\n Returns all sprites from a layer. The sprites are ordered in the\n sequence that they where added. (The sprites are not removed from the\n layer.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer = {"get_sprites_from_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_layer = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_sprites_from_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layer_2,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer_2)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_sprites_from_layer") < 0)) __PYX_ERR(0, 967, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_layer = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_sprites_from_layer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 967, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprites_from_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_layer); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer) { PyObject *__pyx_v_sprites = NULL; PyObject *__pyx_v_sprites_append = NULL; PyObject *__pyx_v_sprite_layers = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprites_from_layer", 1); /* "pygame/_sprite.pyx":977 * * """ * sprites = [] # <<<<<<<<<<<<<< * sprites_append = sprites.append * sprite_layers = self._spritelayers */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":978 * """ * sprites = [] * sprites_append = sprites.append # <<<<<<<<<<<<<< * sprite_layers = self._spritelayers * for spr in self._spritelist: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprites, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites_append = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":979 * sprites = [] * sprites_append = sprites.append * sprite_layers = self._spritelayers # <<<<<<<<<<<<<< * for spr in self._spritelist: * if sprite_layers[spr] == layer: */ __pyx_t_1 = __pyx_v_self->_spritelayers; __Pyx_INCREF(__pyx_t_1); __pyx_v_sprite_layers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":980 * sprites_append = sprites.append * sprite_layers = self._spritelayers * for spr in self._spritelist: # <<<<<<<<<<<<<< * if sprite_layers[spr] == layer: * sprites_append(spr) */ if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 980, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_spritelist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 980, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 980, __pyx_L1_error) #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":981 * sprite_layers = self._spritelayers * for spr in self._spritelist: * if sprite_layers[spr] == layer: # <<<<<<<<<<<<<< * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will */ if (unlikely(__pyx_v_sprite_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 981, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_layer, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":982 * for spr in self._spritelist: * if sprite_layers[spr] == layer: * sprites_append(spr) # <<<<<<<<<<<<<< * elif sprite_layers[spr] > layer:# break after because no other will * # follow with same layer */ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_sprites, __pyx_v_spr); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 982, __pyx_L1_error) /* "pygame/_sprite.pyx":981 * sprite_layers = self._spritelayers * for spr in self._spritelist: * if sprite_layers[spr] == layer: # <<<<<<<<<<<<<< * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will */ goto __pyx_L5; } /* "pygame/_sprite.pyx":983 * if sprite_layers[spr] == layer: * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will # <<<<<<<<<<<<<< * # follow with same layer * break */ if (unlikely(__pyx_v_sprite_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 983, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_layer, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":985 * elif sprite_layers[spr] > layer:# break after because no other will * # follow with same layer * break # <<<<<<<<<<<<<< * return sprites * */ goto __pyx_L4_break; /* "pygame/_sprite.pyx":983 * if sprite_layers[spr] == layer: * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will # <<<<<<<<<<<<<< * # follow with same layer * break */ } __pyx_L5:; /* "pygame/_sprite.pyx":980 * sprites_append = sprites.append * sprite_layers = self._spritelayers * for spr in self._spritelist: # <<<<<<<<<<<<<< * if sprite_layers[spr] == layer: * sprites_append(spr) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_for_end; __pyx_L4_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_for_end; __pyx_L6_for_end:; /* "pygame/_sprite.pyx":986 * # follow with same layer * break * return sprites # <<<<<<<<<<<<<< * * def switch_layer(self, layer1_nr, layer2_nr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sprites); __pyx_r = __pyx_v_sprites; goto __pyx_L0; /* "pygame/_sprite.pyx":967 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< * """return all sprites from a layer ordered as they where added * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.get_sprites_from_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites); __Pyx_XDECREF(__pyx_v_sprites_append); __Pyx_XDECREF(__pyx_v_sprite_layers); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":988 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< * """switch the sprites from layer1_nr to layer2_nr * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_14LayeredUpdates_38switch_layer, "switch the sprites from layer1_nr to layer2_nr\n\n LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None\n\n The layers number must exist. This method does not check for the\n existence of the given layers.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_39switch_layer = {"switch_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_38switch_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_layer1_nr = 0; PyObject *__pyx_v_layer2_nr = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("switch_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layer1_nr,&__pyx_n_s_layer2_nr,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer1_nr)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer2_nr)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, 1); __PYX_ERR(0, 988, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "switch_layer") < 0)) __PYX_ERR(0, 988, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_layer1_nr = values[0]; __pyx_v_layer2_nr = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 988, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.switch_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_layer1_nr, __pyx_v_layer2_nr); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_layer1_nr, PyObject *__pyx_v_layer2_nr) { PyObject *__pyx_v_sprites1 = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("switch_layer", 1); /* "pygame/_sprite.pyx":997 * * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) # <<<<<<<<<<<<<< * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_sprites_of_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_layer1_nr}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_sprites1 = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":998 * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): # <<<<<<<<<<<<<< * self.change_layer(spr, layer1_nr) * self.add(layer=layer2_nr, *sprites1) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_layer2_nr}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 998, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 998, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":999 * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) # <<<<<<<<<<<<<< * self.add(layer=layer2_nr, *sprites1) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_spr, __pyx_v_layer1_nr}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":998 * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): # <<<<<<<<<<<<<< * self.change_layer(spr, layer1_nr) * self.add(layer=layer2_nr, *sprites1) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1000 * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) * self.add(layer=layer2_nr, *sprites1) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_sprites1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_layer_2, __pyx_v_layer2_nr) < 0) __PYX_ERR(0, 1000, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":988 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< * """switch the sprites from layer1_nr to layer2_nr * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.switch_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sprites1); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":674 * _init_rect = Rect(0, 0, 0, 0) * * cdef public dict _spritelayers # <<<<<<<<<<<<<< * cdef public list _spritelist * cdef public int _default_layer */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_spritelayers); __pyx_r = __pyx_v_self->_spritelayers; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 674, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelayers); __Pyx_DECREF(__pyx_v_self->_spritelayers); __pyx_v_self->_spritelayers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates._spritelayers.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_4__del__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_spritelayers); __Pyx_DECREF(__pyx_v_self->_spritelayers); __pyx_v_self->_spritelayers = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":675 * * cdef public dict _spritelayers * cdef public list _spritelist # <<<<<<<<<<<<<< * cdef public int _default_layer * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_spritelist); __pyx_r = __pyx_v_self->_spritelist; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 675, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates._spritelist.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_4__del__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_spritelist); __Pyx_DECREF(__pyx_v_self->_spritelist); __pyx_v_self->_spritelist = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":676 * cdef public dict _spritelayers * cdef public list _spritelist * cdef public int _default_layer # <<<<<<<<<<<<<< * * def __cinit__(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer___get__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredUpdates._default_layer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 676, __pyx_L1_error) __pyx_v_self->_default_layer = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates._default_layer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_40__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_14LayeredUpdates_42__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1035 * cdef public object _bgd * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """initialize group. * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty___init__, "initialize group.\n\n pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty\n\n You can specify some additional attributes through kwargs:\n _use_update: True/False (default is False)\n _default_layer: default layer where the sprites without a layer are\n added\n _time_threshold: treshold time for switching between dirty rect\n mode and fullscreen mode; defaults to updating at 80 frames per\n second, which is equal to 1000.0 / 80.0\n\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__; #endif static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprites = 0; PyObject *__pyx_v_kwargs = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1; if (unlikely(__pyx_kwds)) { __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); } else { __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); } __Pyx_INCREF(__pyx_args); __pyx_v_sprites = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_sprites, __pyx_v_kwargs); /* function exit code */ __Pyx_DECREF(__pyx_v_sprites); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprites, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_val = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":1049 * * """ * LayeredUpdates.__init__(self, *sprites, **kwargs) # <<<<<<<<<<<<<< * self._clip = None * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 1049, __pyx_L1_error); __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sprite.pyx":1050 * """ * LayeredUpdates.__init__(self, *sprites, **kwargs) * self._clip = None # <<<<<<<<<<<<<< * * self._use_update = False */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->_clip); __Pyx_DECREF((PyObject *)__pyx_v_self->_clip); __pyx_v_self->_clip = ((pgRectObject *)Py_None); /* "pygame/_sprite.pyx":1052 * self._clip = None * * self._use_update = False # <<<<<<<<<<<<<< * * self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps */ __pyx_v_self->_use_update = 0; /* "pygame/_sprite.pyx":1054 * self._use_update = False * * self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps # <<<<<<<<<<<<<< * * self._bgd = None */ __pyx_v_self->_time_threshold = (1000.0 / 80.0); /* "pygame/_sprite.pyx":1056 * self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps * * self._bgd = None # <<<<<<<<<<<<<< * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_bgd); __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = Py_None; /* "pygame/_sprite.pyx":1057 * * self._bgd = None * for key, val in kwargs.items(): # <<<<<<<<<<<<<< * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): */ __pyx_t_5 = 0; __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_7); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1058 * self._bgd = None * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: # <<<<<<<<<<<<<< * if hasattr(self, key): * setattr(self, key, val) */ __Pyx_INCREF(__pyx_v_key); __pyx_t_3 = __pyx_v_key; __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_use_update, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1058, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L6_bool_binop_done; } __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_time_threshold, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1058, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L6_bool_binop_done; } __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_default_layer_2, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1058, __pyx_L1_error) __pyx_t_9 = __pyx_t_10; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __pyx_t_9; if (__pyx_t_10) { /* "pygame/_sprite.pyx":1059 * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): # <<<<<<<<<<<<<< * setattr(self, key, val) * */ __pyx_t_10 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1059, __pyx_L1_error) if (__pyx_t_10) { /* "pygame/_sprite.pyx":1060 * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): * setattr(self, key, val) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite, layer=None) noexcept: */ __pyx_t_11 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_key, __pyx_v_val); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1060, __pyx_L1_error) /* "pygame/_sprite.pyx":1059 * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): # <<<<<<<<<<<<<< * setattr(self, key, val) * */ } /* "pygame/_sprite.pyx":1058 * self._bgd = None * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: # <<<<<<<<<<<<<< * if hasattr(self, key): * setattr(self, key, val) */ } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pygame/_sprite.pyx":1035 * cdef public object _bgd * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """initialize group. * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1062 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal *__pyx_optional_args) { PyObject *__pyx_v_layer = ((PyObject *)Py_None); __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_layer = __pyx_optional_args->layer; } } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":1069 * """ * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'visible'): */ __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1069, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_6); if (unlikely(__pyx_t_7)) { /* "pygame/_sprite.pyx":1070 * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): * raise AttributeError() # <<<<<<<<<<<<<< * if not hasattr(sprite, 'visible'): * raise AttributeError() */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1070, __pyx_L1_error) /* "pygame/_sprite.pyx":1069 * """ * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'visible'): */ } /* "pygame/_sprite.pyx":1071 * if not hasattr(sprite, 'dirty'): * raise AttributeError() * if not hasattr(sprite, 'visible'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'blendmode'): */ __pyx_t_7 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_visible_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1071, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_7); if (unlikely(__pyx_t_6)) { /* "pygame/_sprite.pyx":1072 * raise AttributeError() * if not hasattr(sprite, 'visible'): * raise AttributeError() # <<<<<<<<<<<<<< * if not hasattr(sprite, 'blendmode'): * raise AttributeError() */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1072, __pyx_L1_error) /* "pygame/_sprite.pyx":1071 * if not hasattr(sprite, 'dirty'): * raise AttributeError() * if not hasattr(sprite, 'visible'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'blendmode'): */ } /* "pygame/_sprite.pyx":1073 * if not hasattr(sprite, 'visible'): * raise AttributeError() * if not hasattr(sprite, 'blendmode'): # <<<<<<<<<<<<<< * raise AttributeError() * */ __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_blendmode); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1073, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_6); if (unlikely(__pyx_t_7)) { /* "pygame/_sprite.pyx":1074 * raise AttributeError() * if not hasattr(sprite, 'blendmode'): * raise AttributeError() # <<<<<<<<<<<<<< * * if not isinstance(sprite, DirtySprite): */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1074, __pyx_L1_error) /* "pygame/_sprite.pyx":1073 * if not hasattr(sprite, 'visible'): * raise AttributeError() * if not hasattr(sprite, 'blendmode'): # <<<<<<<<<<<<<< * raise AttributeError() * */ } /* "pygame/_sprite.pyx":1076 * raise AttributeError() * * if not isinstance(sprite, DirtySprite): # <<<<<<<<<<<<<< * raise TypeError() * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DirtySprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_IsInstance(__pyx_v_sprite, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (!__pyx_t_7); if (unlikely(__pyx_t_6)) { /* "pygame/_sprite.pyx":1077 * * if not isinstance(sprite, DirtySprite): * raise TypeError() # <<<<<<<<<<<<<< * * if sprite.dirty == 0: # set it dirty if it is not */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_TypeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1077, __pyx_L1_error) /* "pygame/_sprite.pyx":1076 * raise AttributeError() * * if not isinstance(sprite, DirtySprite): # <<<<<<<<<<<<<< * raise TypeError() * */ } /* "pygame/_sprite.pyx":1079 * raise TypeError() * * if sprite.dirty == 0: # set it dirty if it is not # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1079, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pygame/_sprite.pyx":1080 * * if sprite.dirty == 0: # set it dirty if it is not * sprite.dirty = 1 # <<<<<<<<<<<<<< * * LayeredUpdates.add_internal(self, sprite, layer) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1080, __pyx_L1_error) /* "pygame/_sprite.pyx":1079 * raise TypeError() * * if sprite.dirty == 0: # set it dirty if it is not # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ } /* "pygame/_sprite.pyx":1082 * sprite.dirty = 1 * * LayeredUpdates.add_internal(self, sprite, layer) # <<<<<<<<<<<<<< * * def draw(self, surface, bgd=None): */ __pyx_t_8.__pyx_n = 1; __pyx_t_8.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates->add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, 1, &__pyx_t_8); /* "pygame/_sprite.pyx":1062 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.LayeredDirty.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_2add_internal, "Do not use this method directly.\n\n It is used by the group to add a sprite internally.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_3add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_2add_internal}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_layer = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_layer_2,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1062, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_layer_2); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1062, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 1062, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sprite = values[0]; __pyx_v_layer = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1062, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_2add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_sprite, __pyx_v_layer); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_2add_internal(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_layer) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 1; __pyx_t_1.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredDirty->__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, 1, &__pyx_t_1); __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal__pyx_wrap_1(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(__pyx_v_self, __pyx_v_sprite, __pyx_skip_dispatch, NULL); } /* "pygame/_sprite.pyx":1084 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the given surface * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_4draw, "draw all sprites in the right order onto the given surface\n\n LayeredDirty.draw(surface, bgd=None): return Rect_list\n\n You can pass the background too. If a self.bgd is already set to some\n value that is not None, then the bgd argument has no effect.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_4draw}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,&__pyx_n_s_bgd,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bgd); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 1084, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_surface = values[0]; __pyx_v_bgd = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1084, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_surface, __pyx_v_bgd); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd) { PyObject *__pyx_v__orig_clip = NULL; PyObject *__pyx_v__clip = NULL; PyObject *__pyx_v__surf = NULL; PyObject *__pyx_v__sprites = NULL; PyObject *__pyx_v__old_rect = NULL; PyObject *__pyx_v__update = NULL; PyObject *__pyx_v__update_append = NULL; PyObject *__pyx_v__ret = NULL; PyObject *__pyx_v__surf_blit = NULL; PyTypeObject *__pyx_v__rect = NULL; PyObject *__pyx_v__bgd = NULL; PyObject *__pyx_v_init_rect = NULL; PyObject *__pyx_v_start_time = NULL; PyObject *__pyx_v_spr = NULL; PyObject *__pyx_v__union_rect = NULL; PyObject *__pyx_v__union_rect_collidelist = NULL; PyObject *__pyx_v__union_rect_union_ip = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_rec = NULL; PyObject *__pyx_v__spr_rect = NULL; PyObject *__pyx_v_rect_offset_x = NULL; PyObject *__pyx_v_rect_offset_y = NULL; PyObject *__pyx_v__spr_rect_clip = NULL; PyObject *__pyx_v_idx = NULL; PyObject *__pyx_v_clip = NULL; PyObject *__pyx_v_end_time = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 1); /* "pygame/_sprite.pyx":1094 * """ * # speedups * _orig_clip = surface.get_clip() # <<<<<<<<<<<<<< * _clip = self._clip * if _clip is None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v__orig_clip = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1095 * # speedups * _orig_clip = surface.get_clip() * _clip = self._clip # <<<<<<<<<<<<<< * if _clip is None: * _clip = _orig_clip */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_clip); __Pyx_INCREF(__pyx_t_1); __pyx_v__clip = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1096 * _orig_clip = surface.get_clip() * _clip = self._clip * if _clip is None: # <<<<<<<<<<<<<< * _clip = _orig_clip * */ __pyx_t_5 = (__pyx_v__clip == Py_None); if (__pyx_t_5) { /* "pygame/_sprite.pyx":1097 * _clip = self._clip * if _clip is None: * _clip = _orig_clip # <<<<<<<<<<<<<< * * _surf = surface */ __Pyx_INCREF(__pyx_v__orig_clip); __Pyx_DECREF_SET(__pyx_v__clip, __pyx_v__orig_clip); /* "pygame/_sprite.pyx":1096 * _orig_clip = surface.get_clip() * _clip = self._clip * if _clip is None: # <<<<<<<<<<<<<< * _clip = _orig_clip * */ } /* "pygame/_sprite.pyx":1099 * _clip = _orig_clip * * _surf = surface # <<<<<<<<<<<<<< * _sprites = self._spritelist * _old_rect = self.spritedict */ __Pyx_INCREF(__pyx_v_surface); __pyx_v__surf = __pyx_v_surface; /* "pygame/_sprite.pyx":1100 * * _surf = surface * _sprites = self._spritelist # <<<<<<<<<<<<<< * _old_rect = self.spritedict * _update = self.lostsprites */ __pyx_t_1 = __pyx_v_self->__pyx_base._spritelist; __Pyx_INCREF(__pyx_t_1); __pyx_v__sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1101 * _surf = surface * _sprites = self._spritelist * _old_rect = self.spritedict # <<<<<<<<<<<<<< * _update = self.lostsprites * _update_append = _update.append */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.spritedict; __Pyx_INCREF(__pyx_t_1); __pyx_v__old_rect = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1102 * _sprites = self._spritelist * _old_rect = self.spritedict * _update = self.lostsprites # <<<<<<<<<<<<<< * _update_append = _update.append * _ret = None */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_v__update = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1103 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< * _ret = None * _surf_blit = _surf.blit */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__update, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__update_append = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1104 * _update = self.lostsprites * _update_append = _update.append * _ret = None # <<<<<<<<<<<<<< * _surf_blit = _surf.blit * _rect = Rect */ __Pyx_INCREF(Py_None); __pyx_v__ret = ((PyObject*)Py_None); /* "pygame/_sprite.pyx":1105 * _update_append = _update.append * _ret = None * _surf_blit = _surf.blit # <<<<<<<<<<<<<< * _rect = Rect * if bgd is not None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__surf_blit = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1106 * _ret = None * _surf_blit = _surf.blit * _rect = Rect # <<<<<<<<<<<<<< * if bgd is not None: * self._bgd = bgd */ __Pyx_INCREF((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect); __pyx_v__rect = __pyx_ptype_6pygame_5_sdl2_5video_Rect; /* "pygame/_sprite.pyx":1107 * _surf_blit = _surf.blit * _rect = Rect * if bgd is not None: # <<<<<<<<<<<<<< * self._bgd = bgd * _bgd = self._bgd */ __pyx_t_5 = (__pyx_v_bgd != Py_None); if (__pyx_t_5) { /* "pygame/_sprite.pyx":1108 * _rect = Rect * if bgd is not None: * self._bgd = bgd # <<<<<<<<<<<<<< * _bgd = self._bgd * init_rect = self._init_rect */ __Pyx_INCREF(__pyx_v_bgd); __Pyx_GIVEREF(__pyx_v_bgd); __Pyx_GOTREF(__pyx_v_self->_bgd); __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = __pyx_v_bgd; /* "pygame/_sprite.pyx":1107 * _surf_blit = _surf.blit * _rect = Rect * if bgd is not None: # <<<<<<<<<<<<<< * self._bgd = bgd * _bgd = self._bgd */ } /* "pygame/_sprite.pyx":1109 * if bgd is not None: * self._bgd = bgd * _bgd = self._bgd # <<<<<<<<<<<<<< * init_rect = self._init_rect * */ __pyx_t_1 = __pyx_v_self->_bgd; __Pyx_INCREF(__pyx_t_1); __pyx_v__bgd = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1110 * self._bgd = bgd * _bgd = self._bgd * init_rect = self._init_rect # <<<<<<<<<<<<<< * * _surf.set_clip(_clip) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_init_rect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1112 * init_rect = self._init_rect * * _surf.set_clip(_clip) # <<<<<<<<<<<<<< * # ------- * # 0. decide whether to render with update or flip */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__clip}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1115 * # ------- * # 0. decide whether to render with update or flip * start_time = get_ticks() # <<<<<<<<<<<<<< * if self._use_update: # dirty rects mode * # 1. find dirty area on screen and put the rects into _update */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_start_time = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1116 * # 0. decide whether to render with update or flip * start_time = get_ticks() * if self._use_update: # dirty rects mode # <<<<<<<<<<<<<< * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part */ if (__pyx_v_self->_use_update) { /* "pygame/_sprite.pyx":1119 * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part * for spr in _sprites: # <<<<<<<<<<<<<< * if 0 < spr.dirty: * # chose the right rect */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 1119, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1119, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1119, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1120 * # still not happy with that part * for spr in _sprites: * if 0 < spr.dirty: # <<<<<<<<<<<<<< * # chose the right rect * if spr.source_rect: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_int_0, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1122 * if 0 < spr.dirty: * # chose the right rect * if spr.source_rect: # <<<<<<<<<<<<<< * _union_rect = _rect(spr.rect.topleft, * spr.source_rect.size) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1123 * # chose the right rect * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1124 * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, * spr.source_rect.size) # <<<<<<<<<<<<<< * else: * _union_rect = _rect(spr.rect) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1123 * # chose the right rect * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * else: */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v__union_rect, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1122 * if 0 < spr.dirty: * # chose the right rect * if spr.source_rect: # <<<<<<<<<<<<<< * _union_rect = _rect(spr.rect.topleft, * spr.source_rect.size) */ goto __pyx_L9; } /* "pygame/_sprite.pyx":1126 * spr.source_rect.size) * else: * _union_rect = _rect(spr.rect) # <<<<<<<<<<<<<< * * _union_rect_collidelist = _union_rect.collidelist */ /*else*/ { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v__union_rect, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L9:; /* "pygame/_sprite.pyx":1128 * _union_rect = _rect(spr.rect) * * _union_rect_collidelist = _union_rect.collidelist # <<<<<<<<<<<<<< * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v__union_rect_collidelist, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1129 * * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * while -1 < i: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v__union_rect_union_ip, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1130 * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< * while -1 < i: * _union_rect_union_ip(_update[i]) */ __Pyx_INCREF(__pyx_v__union_rect_collidelist); __pyx_t_7 = __pyx_v__union_rect_collidelist; __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v__update}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1131 * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) * while -1 < i: # <<<<<<<<<<<<<< * _union_rect_union_ip(_update[i]) * del _update[i] */ while (1) { __pyx_t_3 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_5) break; /* "pygame/_sprite.pyx":1132 * i = _union_rect_collidelist(_update) * while -1 < i: * _union_rect_union_ip(_update[i]) # <<<<<<<<<<<<<< * del _update[i] * i = _union_rect_collidelist(_update) */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1132, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v__union_rect_union_ip); __pyx_t_2 = __pyx_v__union_rect_union_ip; __pyx_t_8 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1133 * while -1 < i: * _union_rect_union_ip(_update[i]) * del _update[i] # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1133, __pyx_L1_error) } if (unlikely((PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0))) __PYX_ERR(0, 1133, __pyx_L1_error) /* "pygame/_sprite.pyx":1134 * _union_rect_union_ip(_update[i]) * del _update[i] * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< * _update_append(_union_rect.clip(_clip)) * */ __Pyx_INCREF(__pyx_v__union_rect_collidelist); __pyx_t_2 = __pyx_v__union_rect_collidelist; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v__update}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; } /* "pygame/_sprite.pyx":1103 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< * _ret = None * _surf_blit = _surf.blit */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 1103, __pyx_L1_error) } /* "pygame/_sprite.pyx":1135 * del _update[i] * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) # <<<<<<<<<<<<<< * * if _old_rect[spr] is not init_rect: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v__clip}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1137 * _update_append(_union_rect.clip(_clip)) * * if _old_rect[spr] is not init_rect: # <<<<<<<<<<<<<< * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1137, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = (__pyx_t_3 != __pyx_v_init_rect); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1138 * * if _old_rect[spr] is not init_rect: * _union_rect = _rect(_old_rect[spr]) # <<<<<<<<<<<<<< * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1138, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v__union_rect, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1139 * if _old_rect[spr] is not init_rect: * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist # <<<<<<<<<<<<<< * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__union_rect_collidelist, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1140 * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * while -1 < i: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__union_rect_union_ip, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1141 * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< * while -1 < i: * _union_rect_union_ip(_update[i]) */ __Pyx_INCREF(__pyx_v__union_rect_collidelist); __pyx_t_3 = __pyx_v__union_rect_collidelist; __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v__update}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1142 * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) * while -1 < i: # <<<<<<<<<<<<<< * _union_rect_union_ip(_update[i]) * del _update[i] */ while (1) { __pyx_t_2 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_5) break; /* "pygame/_sprite.pyx":1143 * i = _union_rect_collidelist(_update) * while -1 < i: * _union_rect_union_ip(_update[i]) # <<<<<<<<<<<<<< * del _update[i] * i = _union_rect_collidelist(_update) */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1143, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__union_rect_union_ip); __pyx_t_7 = __pyx_v__union_rect_union_ip; __pyx_t_8 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1144 * while -1 < i: * _union_rect_union_ip(_update[i]) * del _update[i] # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1144, __pyx_L1_error) } if (unlikely((PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0))) __PYX_ERR(0, 1144, __pyx_L1_error) /* "pygame/_sprite.pyx":1145 * _union_rect_union_ip(_update[i]) * del _update[i] * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< * _update_append(_union_rect.clip(_clip)) * # can it be done better? because that is an O(n**2) algorithm in */ __Pyx_INCREF(__pyx_v__union_rect_collidelist); __pyx_t_7 = __pyx_v__union_rect_collidelist; __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__update}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; } /* "pygame/_sprite.pyx":1103 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< * _ret = None * _surf_blit = _surf.blit */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 1103, __pyx_L1_error) } /* "pygame/_sprite.pyx":1146 * del _update[i] * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) # <<<<<<<<<<<<<< * # can it be done better? because that is an O(n**2) algorithm in * # worst case */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__clip}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1137 * _update_append(_union_rect.clip(_clip)) * * if _old_rect[spr] is not init_rect: # <<<<<<<<<<<<<< * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist */ } /* "pygame/_sprite.pyx":1120 * # still not happy with that part * for spr in _sprites: * if 0 < spr.dirty: # <<<<<<<<<<<<<< * # chose the right rect * if spr.source_rect: */ } /* "pygame/_sprite.pyx":1119 * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part * for spr in _sprites: # <<<<<<<<<<<<<< * if 0 < spr.dirty: * # chose the right rect */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1151 * * # clear using background * if _bgd is not None: # <<<<<<<<<<<<<< * for rec in _update: * _surf_blit(_bgd, rec, rec) */ __pyx_t_5 = (__pyx_v__bgd != Py_None); if (__pyx_t_5) { /* "pygame/_sprite.pyx":1152 * # clear using background * if _bgd is not None: * for rec in _update: # <<<<<<<<<<<<<< * _surf_blit(_bgd, rec, rec) * */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 1152, __pyx_L1_error) } __pyx_t_1 = __pyx_v__update; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1152, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1152, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_rec, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1153 * if _bgd is not None: * for rec in _update: * _surf_blit(_bgd, rec, rec) # <<<<<<<<<<<<<< * * # 2. draw */ __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_7 = __pyx_v__surf_blit; __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v__bgd, __pyx_v_rec, __pyx_v_rec}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1152 * # clear using background * if _bgd is not None: * for rec in _update: # <<<<<<<<<<<<<< * _surf_blit(_bgd, rec, rec) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1151 * * # clear using background * if _bgd is not None: # <<<<<<<<<<<<<< * for rec in _update: * _surf_blit(_bgd, rec, rec) */ } /* "pygame/_sprite.pyx":1156 * * # 2. draw * for spr in _sprites: # <<<<<<<<<<<<<< * if 1 > spr.dirty: * if spr._visible: */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 1156, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1156, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1156, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1157 * # 2. draw * for spr in _sprites: * if 1 > spr.dirty: # <<<<<<<<<<<<<< * if spr._visible: * # sprite not dirty; blit only the intersecting part */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_int_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1158 * for spr in _sprites: * if 1 > spr.dirty: * if spr._visible: # <<<<<<<<<<<<<< * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1160 * if spr._visible: * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: # <<<<<<<<<<<<<< * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = (__pyx_t_7 != Py_None); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1163 * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1164 * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, * spr.source_rect.size) # <<<<<<<<<<<<<< * rect_offset_x = spr.source_rect[0] - _spr_rect[0] * rect_offset_y = spr.source_rect[1] - _spr_rect[1] */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1163 * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] */ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v__spr_rect, __pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1165 * _spr_rect = _rect(spr.rect.topleft, * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] # <<<<<<<<<<<<<< * rect_offset_y = spr.source_rect[1] - _spr_rect[1] * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_x, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1166 * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] * rect_offset_y = spr.source_rect[1] - _spr_rect[1] # <<<<<<<<<<<<<< * else: * _spr_rect = spr.rect */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_y, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1160 * if spr._visible: * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: # <<<<<<<<<<<<<< * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. */ goto __pyx_L24; } /* "pygame/_sprite.pyx":1168 * rect_offset_y = spr.source_rect[1] - _spr_rect[1] * else: * _spr_rect = spr.rect # <<<<<<<<<<<<<< * rect_offset_x = -_spr_rect[0] * rect_offset_y = -_spr_rect[1] */ /*else*/ { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v__spr_rect, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1169 * else: * _spr_rect = spr.rect * rect_offset_x = -_spr_rect[0] # <<<<<<<<<<<<<< * rect_offset_y = -_spr_rect[1] * */ __pyx_t_7 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_x, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1170 * _spr_rect = spr.rect * rect_offset_x = -_spr_rect[0] * rect_offset_y = -_spr_rect[1] # <<<<<<<<<<<<<< * * _spr_rect_clip = _spr_rect.clip */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_y, __pyx_t_7); __pyx_t_7 = 0; } __pyx_L24:; /* "pygame/_sprite.pyx":1172 * rect_offset_y = -_spr_rect[1] * * _spr_rect_clip = _spr_rect.clip # <<<<<<<<<<<<<< * * for idx in _spr_rect.collidelistall(_update): */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v__spr_rect_clip, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1174 * _spr_rect_clip = _spr_rect.clip * * for idx in _spr_rect.collidelistall(_update): # <<<<<<<<<<<<<< * # clip * clip = _spr_rect_clip(_update[idx]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__update}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1174, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 1174, __pyx_L1_error) #else __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 1174, __pyx_L1_error) #else __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } } else { __pyx_t_7 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1174, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1176 * for idx in _spr_rect.collidelistall(_update): * # clip * clip = _spr_rect_clip(_update[idx]) # <<<<<<<<<<<<<< * _surf_blit(spr.image, * clip, */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1176, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__spr_rect_clip); __pyx_t_8 = __pyx_v__spr_rect_clip; __pyx_t_12 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1177 * # clip * clip = _spr_rect_clip(_update[idx]) * _surf_blit(spr.image, # <<<<<<<<<<<<<< * clip, * (clip[0] + rect_offset_x, */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "pygame/_sprite.pyx":1179 * _surf_blit(spr.image, * clip, * (clip[0] + rect_offset_x, # <<<<<<<<<<<<<< * clip[1] + rect_offset_y, * clip[2], */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_clip, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyNumber_Add(__pyx_t_3, __pyx_v_rect_offset_x); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1180 * clip, * (clip[0] + rect_offset_x, * clip[1] + rect_offset_y, # <<<<<<<<<<<<<< * clip[2], * clip[3]), */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_clip, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyNumber_Add(__pyx_t_3, __pyx_v_rect_offset_y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1181 * (clip[0] + rect_offset_x, * clip[1] + rect_offset_y, * clip[2], # <<<<<<<<<<<<<< * clip[3]), * spr.blendmode) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_clip, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":1182 * clip[1] + rect_offset_y, * clip[2], * clip[3]), # <<<<<<<<<<<<<< * spr.blendmode) * else: # dirty sprite */ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_clip, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); /* "pygame/_sprite.pyx":1179 * _surf_blit(spr.image, * clip, * (clip[0] + rect_offset_x, # <<<<<<<<<<<<<< * clip[1] + rect_offset_y, * clip[2], */ __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_12); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_12)) __PYX_ERR(0, 1179, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_13); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13)) __PYX_ERR(0, 1179, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_14); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_14)) __PYX_ERR(0, 1179, __pyx_L1_error); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0; /* "pygame/_sprite.pyx":1183 * clip[2], * clip[3]), * spr.blendmode) # <<<<<<<<<<<<<< * else: # dirty sprite * if spr._visible: */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_3 = __pyx_v__surf_blit; __pyx_t_13 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_13, __pyx_t_8, __pyx_v_clip, __pyx_t_15, __pyx_t_14}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1174 * _spr_rect_clip = _spr_rect.clip * * for idx in _spr_rect.collidelistall(_update): # <<<<<<<<<<<<<< * # clip * clip = _spr_rect_clip(_update[idx]) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1158 * for spr in _sprites: * if 1 > spr.dirty: * if spr._visible: # <<<<<<<<<<<<<< * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: */ } /* "pygame/_sprite.pyx":1157 * # 2. draw * for spr in _sprites: * if 1 > spr.dirty: # <<<<<<<<<<<<<< * if spr._visible: * # sprite not dirty; blit only the intersecting part */ goto __pyx_L22; } /* "pygame/_sprite.pyx":1185 * spr.blendmode) * else: # dirty sprite * if spr._visible: # <<<<<<<<<<<<<< * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1186 * else: # dirty sprite * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "pygame/_sprite.pyx":1187 * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, # <<<<<<<<<<<<<< * spr.source_rect, * spr.blendmode) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":1188 * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, * spr.source_rect, # <<<<<<<<<<<<<< * spr.blendmode) * if spr.dirty == 1: */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); /* "pygame/_sprite.pyx":1189 * spr.rect, * spr.source_rect, * spr.blendmode) # <<<<<<<<<<<<<< * if spr.dirty == 1: * spr.dirty = 0 */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_8 = __pyx_v__surf_blit; __pyx_t_13 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_13, __pyx_t_7, __pyx_t_3, __pyx_t_14, __pyx_t_15}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } /* "pygame/_sprite.pyx":1186 * else: # dirty sprite * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1186, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_2) < 0))) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1185 * spr.blendmode) * else: # dirty sprite * if spr._visible: # <<<<<<<<<<<<<< * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, */ } /* "pygame/_sprite.pyx":1190 * spr.source_rect, * spr.blendmode) * if spr.dirty == 1: # <<<<<<<<<<<<<< * spr.dirty = 0 * _ret = list(_update) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_2, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1191 * spr.blendmode) * if spr.dirty == 1: * spr.dirty = 0 # <<<<<<<<<<<<<< * _ret = list(_update) * else: # flip, full screen mode */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_spr, __pyx_n_s_dirty, __pyx_int_0) < 0) __PYX_ERR(0, 1191, __pyx_L1_error) /* "pygame/_sprite.pyx":1190 * spr.source_rect, * spr.blendmode) * if spr.dirty == 1: # <<<<<<<<<<<<<< * spr.dirty = 0 * _ret = list(_update) */ } } __pyx_L22:; /* "pygame/_sprite.pyx":1156 * * # 2. draw * for spr in _sprites: # <<<<<<<<<<<<<< * if 1 > spr.dirty: * if spr._visible: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1192 * if spr.dirty == 1: * spr.dirty = 0 * _ret = list(_update) # <<<<<<<<<<<<<< * else: # flip, full screen mode * if _bgd is not None: */ __pyx_t_1 = PySequence_List(__pyx_v__update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__ret, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1116 * # 0. decide whether to render with update or flip * start_time = get_ticks() * if self._use_update: # dirty rects mode # <<<<<<<<<<<<<< * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part */ goto __pyx_L5; } /* "pygame/_sprite.pyx":1194 * _ret = list(_update) * else: # flip, full screen mode * if _bgd is not None: # <<<<<<<<<<<<<< * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: */ /*else*/ { __pyx_t_5 = (__pyx_v__bgd != Py_None); if (__pyx_t_5) { /* "pygame/_sprite.pyx":1195 * else: # flip, full screen mode * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) # <<<<<<<<<<<<<< * for spr in _sprites: * if spr._visible: */ __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_2 = __pyx_v__surf_blit; __pyx_t_8 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v__bgd, __pyx_tuple_}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1194 * _ret = list(_update) * else: # flip, full screen mode * if _bgd is not None: # <<<<<<<<<<<<<< * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: */ } /* "pygame/_sprite.pyx":1196 * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: # <<<<<<<<<<<<<< * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 1196, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1196, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1196, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1197 * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: * if spr._visible: # <<<<<<<<<<<<<< * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1198 * for spr in _sprites: * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "pygame/_sprite.pyx":1199 * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, # <<<<<<<<<<<<<< * spr.source_rect, * spr.blendmode) */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); /* "pygame/_sprite.pyx":1200 * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, * spr.source_rect, # <<<<<<<<<<<<<< * spr.blendmode) * _ret = [_rect(_clip)] # return only the part of the screen changed */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); /* "pygame/_sprite.pyx":1201 * spr.rect, * spr.source_rect, * spr.blendmode) # <<<<<<<<<<<<<< * _ret = [_rect(_clip)] # return only the part of the screen changed * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_7 = __pyx_v__surf_blit; __pyx_t_13 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_13, __pyx_t_8, __pyx_t_15, __pyx_t_14, __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* "pygame/_sprite.pyx":1198 * for spr in _sprites: * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1198, __pyx_L1_error) } if (unlikely((PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_2) < 0))) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1197 * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: * if spr._visible: # <<<<<<<<<<<<<< * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, */ } /* "pygame/_sprite.pyx":1196 * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: # <<<<<<<<<<<<<< * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1202 * spr.source_rect, * spr.blendmode) * _ret = [_rect(_clip)] # return only the part of the screen changed # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_v__clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v__ret, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; } __pyx_L5:; /* "pygame/_sprite.pyx":1207 * # timing for switching modes * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() # <<<<<<<<<<<<<< * if end_time-start_time > self._time_threshold: * self._use_update = False */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_v_end_time = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1208 * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() * if end_time-start_time > self._time_threshold: # <<<<<<<<<<<<<< * self._use_update = False * else: */ __pyx_t_2 = PyNumber_Subtract(__pyx_v_end_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1209 * end_time = get_ticks() * if end_time-start_time > self._time_threshold: * self._use_update = False # <<<<<<<<<<<<<< * else: * self._use_update = True */ __pyx_v_self->_use_update = 0; /* "pygame/_sprite.pyx":1208 * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() * if end_time-start_time > self._time_threshold: # <<<<<<<<<<<<<< * self._use_update = False * else: */ goto __pyx_L36; } /* "pygame/_sprite.pyx":1211 * self._use_update = False * else: * self._use_update = True # <<<<<<<<<<<<<< * * ## # debug */ /*else*/ { __pyx_v_self->_use_update = 1; } __pyx_L36:; /* "pygame/_sprite.pyx":1217 * * # empty dirty rects list * _update[:] = [] # <<<<<<<<<<<<<< * * # ------- */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1217, __pyx_L1_error) } if (__Pyx_PyObject_SetSlice(__pyx_v__update, __pyx_t_7, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1221 * # ------- * # restore original clip * _surf.set_clip(_orig_clip) # <<<<<<<<<<<<<< * return _ret * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v__orig_clip}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1222 * # restore original clip * _surf.set_clip(_orig_clip) * return _ret # <<<<<<<<<<<<<< * * def clear(self, surface, bgd): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v__ret); __pyx_r = __pyx_v__ret; goto __pyx_L0; /* "pygame/_sprite.pyx":1084 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the given surface * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v__orig_clip); __Pyx_XDECREF(__pyx_v__clip); __Pyx_XDECREF(__pyx_v__surf); __Pyx_XDECREF(__pyx_v__sprites); __Pyx_XDECREF(__pyx_v__old_rect); __Pyx_XDECREF(__pyx_v__update); __Pyx_XDECREF(__pyx_v__update_append); __Pyx_XDECREF(__pyx_v__ret); __Pyx_XDECREF(__pyx_v__surf_blit); __Pyx_XDECREF((PyObject *)__pyx_v__rect); __Pyx_XDECREF(__pyx_v__bgd); __Pyx_XDECREF(__pyx_v_init_rect); __Pyx_XDECREF(__pyx_v_start_time); __Pyx_XDECREF(__pyx_v_spr); __Pyx_XDECREF(__pyx_v__union_rect); __Pyx_XDECREF(__pyx_v__union_rect_collidelist); __Pyx_XDECREF(__pyx_v__union_rect_union_ip); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_rec); __Pyx_XDECREF(__pyx_v__spr_rect); __Pyx_XDECREF(__pyx_v_rect_offset_x); __Pyx_XDECREF(__pyx_v_rect_offset_y); __Pyx_XDECREF(__pyx_v__spr_rect_clip); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_clip); __Pyx_XDECREF(__pyx_v_end_time); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1224 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """use to set background * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_6clear, "use to set background\n\n Group.clear(surface, bgd): return None\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_7clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_6clear}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_surface,&__pyx_n_s_bgd,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_surface)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bgd)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 1224, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clear") < 0)) __PYX_ERR(0, 1224, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_surface = values[0]; __pyx_v_bgd = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1224, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_surface, __pyx_v_bgd); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_surface, PyObject *__pyx_v_bgd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear", 1); /* "pygame/_sprite.pyx":1230 * * """ * self._bgd = bgd # <<<<<<<<<<<<<< * * def repaint_rect(self, screen_rect): */ __Pyx_INCREF(__pyx_v_bgd); __Pyx_GIVEREF(__pyx_v_bgd); __Pyx_GOTREF(__pyx_v_self->_bgd); __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = __pyx_v_bgd; /* "pygame/_sprite.pyx":1224 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """use to set background * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1232 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< * """repaint the given area * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_9repaint_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_8repaint_rect, "repaint the given area\n\n LayeredDirty.repaint_rect(screen_rect): return None\n\n screen_rect is in screen coordinates.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_9repaint_rect = {"repaint_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_9repaint_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_8repaint_rect}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_9repaint_rect(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_screen_rect = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("repaint_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_screen_rect,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_screen_rect)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "repaint_rect") < 0)) __PYX_ERR(0, 1232, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_screen_rect = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("repaint_rect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1232, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.repaint_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_screen_rect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_screen_rect) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repaint_rect", 1); /* "pygame/_sprite.pyx":1240 * * """ * if self._clip: # <<<<<<<<<<<<<< * self.lostsprites.append(screen_rect.clip(self._clip)) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_clip)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1240, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sprite.pyx":1241 * """ * if self._clip: * self.lostsprites.append(screen_rect.clip(self._clip)) # <<<<<<<<<<<<<< * else: * self.lostsprites.append(Rect(screen_rect)) */ if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 1241, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_screen_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->_clip)}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1240 * * """ * if self._clip: # <<<<<<<<<<<<<< * self.lostsprites.append(screen_rect.clip(self._clip)) * else: */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1243 * self.lostsprites.append(screen_rect.clip(self._clip)) * else: * self.lostsprites.append(Rect(screen_rect)) # <<<<<<<<<<<<<< * * def set_clip(self, screen_rect=None): */ /*else*/ { if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 1243, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_v_screen_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":1232 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< * """repaint the given area * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.repaint_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1245 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< * """clip the area where to draw; pass None (default) to reset the clip * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_10set_clip, "clip the area where to draw; pass None (default) to reset the clip\n\n LayeredDirty.set_clip(screen_rect=None): return None\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_11set_clip = {"set_clip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_10set_clip}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_screen_rect = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_screen_rect,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_screen_rect); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1245, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_clip") < 0)) __PYX_ERR(0, 1245, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_screen_rect = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_clip", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1245, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_screen_rect); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_screen_rect) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 1); /* "pygame/_sprite.pyx":1251 * * """ * if screen_rect is None: # <<<<<<<<<<<<<< * self._clip = pygame.display.get_surface().get_rect() * else: */ __pyx_t_1 = (__pyx_v_screen_rect == Py_None); if (__pyx_t_1) { /* "pygame/_sprite.pyx":1252 * """ * if screen_rect is None: * self._clip = pygame.display.get_surface().get_rect() # <<<<<<<<<<<<<< * else: * self._clip = screen_rect */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pygame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_display); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get_surface); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->_clip); __Pyx_DECREF((PyObject *)__pyx_v_self->_clip); __pyx_v_self->_clip = ((pgRectObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1251 * * """ * if screen_rect is None: # <<<<<<<<<<<<<< * self._clip = pygame.display.get_surface().get_rect() * else: */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1254 * self._clip = pygame.display.get_surface().get_rect() * else: * self._clip = screen_rect # <<<<<<<<<<<<<< * self._use_update = False * */ /*else*/ { if (!(likely(((__pyx_v_screen_rect) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_screen_rect, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1254, __pyx_L1_error) __pyx_t_2 = __pyx_v_screen_rect; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF((PyObject *)__pyx_v_self->_clip); __Pyx_DECREF((PyObject *)__pyx_v_self->_clip); __pyx_v_self->_clip = ((pgRectObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":1255 * else: * self._clip = screen_rect * self._use_update = False # <<<<<<<<<<<<<< * * def get_clip(self): */ __pyx_v_self->_use_update = 0; /* "pygame/_sprite.pyx":1245 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< * """clip the area where to draw; pass None (default) to reset the clip * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1257 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< * """get the area where drawing will occur * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_13get_clip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_12get_clip, "get the area where drawing will occur\n\n LayeredDirty.get_clip(): return Rect\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_13get_clip = {"get_clip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_13get_clip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_12get_clip}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_13get_clip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_clip", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_clip", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 1); /* "pygame/_sprite.pyx":1263 * * """ * return self._clip # <<<<<<<<<<<<<< * * def change_layer(self, sprite, new_layer): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_clip); __pyx_r = ((PyObject *)__pyx_v_self->_clip); goto __pyx_L0; /* "pygame/_sprite.pyx":1257 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< * """get the area where drawing will occur * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1265 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_14change_layer, "change the layer of the sprite\n\n LayeredUpdates.change_layer(sprite, new_layer): return None\n\n The sprite must have been added to the renderer already. This is not\n checked.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_15change_layer = {"change_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_14change_layer}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_new_layer = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("change_layer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_new_layer,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_layer)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 1265, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "change_layer") < 0)) __PYX_ERR(0, 1265, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_sprite = values[0]; __pyx_v_new_layer = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1265, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_sprite, __pyx_v_new_layer); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_new_layer) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_layer", 1); /* "pygame/_sprite.pyx":1274 * * """ * LayeredUpdates.change_layer(self, sprite, new_layer) # <<<<<<<<<<<<<< * if sprite.dirty == 0: * sprite.dirty = 1 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_sprite, __pyx_v_new_layer}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1275 * """ * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pygame/_sprite.pyx":1276 * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: * sprite.dirty = 1 # <<<<<<<<<<<<<< * * def set_timing_treshold(self, time_ms): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1276, __pyx_L1_error) /* "pygame/_sprite.pyx":1275 * """ * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ } /* "pygame/_sprite.pyx":1265 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1278 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< * """set the treshold in milliseconds * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold, "set the treshold in milliseconds\n\n DEPRECATED: misspelled 'threshold'\n\n set_timing_treshold(time_ms): return None\n\n Defaults to 1000.0 / 80.0. This means that the screen will be painted\n using the flip method rather than the update method if the update\n method is taking so long to update the screen that the frame rate falls\n below 80 frames per second.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold = {"set_timing_treshold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_time_ms = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_timing_treshold (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_time_ms,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_time_ms)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1278, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_timing_treshold") < 0)) __PYX_ERR(0, 1278, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_time_ms = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_timing_treshold", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1278, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_timing_treshold", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_time_ms); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_time_ms) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations float __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_timing_treshold", 1); /* "pygame/_sprite.pyx":1291 * * """ * self._time_threshold = time_ms # <<<<<<<<<<<<<< * * def set_timing_threshold(self, time_ms): */ __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_time_ms); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L1_error) __pyx_v_self->_time_threshold = __pyx_t_1; /* "pygame/_sprite.pyx":1278 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< * """set the treshold in milliseconds * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_timing_treshold", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1293 * self._time_threshold = time_ms * * def set_timing_threshold(self, time_ms): # <<<<<<<<<<<<<< * """set the threshold in milliseconds * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold, "set the threshold in milliseconds\n\n (time_ms): return None\n\n Defaults to 1000.0 / 80.0. This means that the screen will be painted\n using the flip method rather than the update method if the update\n method is taking so long to update the screen that the frame rate falls\n below 80 frames per second.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold = {"set_timing_threshold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_time_ms = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_timing_threshold (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_time_ms,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_time_ms)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_timing_threshold") < 0)) __PYX_ERR(0, 1293, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_time_ms = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_timing_threshold", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1293, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_timing_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v_time_ms); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_time_ms) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations float __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_timing_threshold", 1); /* "pygame/_sprite.pyx":1304 * * """ * self._time_threshold = time_ms # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_time_ms); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error) __pyx_v_self->_time_threshold = __pyx_t_1; /* "pygame/_sprite.pyx":1293 * self._time_threshold = time_ms * * def set_timing_threshold(self, time_ms): # <<<<<<<<<<<<<< * """set the threshold in milliseconds * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_timing_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1030 * """ * * cdef public Rect _clip # <<<<<<<<<<<<<< * cdef public bint _use_update * cdef public float _time_threshold */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_self->_clip); __pyx_r = ((PyObject *)__pyx_v_self->_clip); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1030, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->_clip); __Pyx_DECREF((PyObject *)__pyx_v_self->_clip); __pyx_v_self->_clip = ((pgRectObject *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredDirty._clip.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_4__del__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->_clip); __Pyx_DECREF((PyObject *)__pyx_v_self->_clip); __pyx_v_self->_clip = ((pgRectObject *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1031 * * cdef public Rect _clip * cdef public bint _use_update # <<<<<<<<<<<<<< * cdef public float _time_threshold * cdef public object _bgd */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_use_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredDirty._use_update.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error) __pyx_v_self->_use_update = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty._use_update.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sprite.pyx":1032 * cdef public Rect _clip * cdef public bint _use_update * cdef public float _time_threshold # <<<<<<<<<<<<<< * cdef public object _bgd * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.LayeredDirty._time_threshold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; float __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_v_self->_time_threshold = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty._time_threshold.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "pygame/_sprite.pyx":1033 * cdef public bint _use_update * cdef public float _time_threshold * cdef public object _bgd # <<<<<<<<<<<<<< * * def __init__(self, *sprites, **kwargs): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd___get__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd___get__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_bgd); __pyx_r = __pyx_v_self->_bgd; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_2__set__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_2__set__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 1); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_bgd); __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_4__del__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_4_bgd_4__del__(struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_bgd); __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_20__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.LayeredDirty.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_12LayeredDirty_22__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_LayeredDirty *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1321 * cdef public object __sprite * * def __init__(self, sprite=None): # <<<<<<<<<<<<<< * AbstractGroup.__init__(self) * self.__sprite = None */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1321, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1321, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1321, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":1322 * * def __init__(self, sprite=None): * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self.__sprite = None * if sprite is not None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1323 * def __init__(self, sprite=None): * AbstractGroup.__init__(self) * self.__sprite = None # <<<<<<<<<<<<<< * if sprite is not None: * self.add(sprite) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_DECREF(__pyx_v_self->_GroupSingle__sprite); __pyx_v_self->_GroupSingle__sprite = Py_None; /* "pygame/_sprite.pyx":1324 * AbstractGroup.__init__(self) * self.__sprite = None * if sprite is not None: # <<<<<<<<<<<<<< * self.add(sprite) * */ __pyx_t_5 = (__pyx_v_sprite != Py_None); if (__pyx_t_5) { /* "pygame/_sprite.pyx":1325 * self.__sprite = None * if sprite is not None: * self.add(sprite) # <<<<<<<<<<<<<< * * def copy(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sprite}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1324 * AbstractGroup.__init__(self) * self.__sprite = None * if sprite is not None: # <<<<<<<<<<<<<< * self.add(sprite) * */ } /* "pygame/_sprite.pyx":1321 * cdef public object __sprite * * def __init__(self, sprite=None): # <<<<<<<<<<<<<< * AbstractGroup.__init__(self) * self.__sprite = None */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.GroupSingle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1327 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< * return GroupSingle(self.__sprite) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_3copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_3copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_3copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_3copy(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); /* "pygame/_sprite.pyx":1328 * * def copy(self): * return GroupSingle(self.__sprite) # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle), __pyx_v_self->_GroupSingle__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1327 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< * return GroupSingle(self.__sprite) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.GroupSingle.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1330 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * if self.__sprite is not None: * return [self.__sprite] */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1330, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":1331 * * cpdef list sprites(self): * if self.__sprite is not None: # <<<<<<<<<<<<<< * return [self.__sprite] * else: */ __pyx_t_6 = (__pyx_v_self->_GroupSingle__sprite != Py_None); if (__pyx_t_6) { /* "pygame/_sprite.pyx":1332 * cpdef list sprites(self): * if self.__sprite is not None: * return [self.__sprite] # <<<<<<<<<<<<<< * else: * return [] */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_GIVEREF(__pyx_v_self->_GroupSingle__sprite); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_GroupSingle__sprite)) __PYX_ERR(0, 1332, __pyx_L1_error); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1331 * * cpdef list sprites(self): * if self.__sprite is not None: # <<<<<<<<<<<<<< * return [self.__sprite] * else: */ } /* "pygame/_sprite.pyx":1334 * return [self.__sprite] * else: * return [] # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite) noexcept: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } /* "pygame/_sprite.pyx":1330 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * if self.__sprite is not None: * return [self.__sprite] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.GroupSingle.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_5sprites = {"sprites", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sprites (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sprites", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sprites", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_4sprites(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_4sprites(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pygame_7_sprite_11GroupSingle_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.GroupSingle.sprites", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1336 * return [] * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if self.__sprite is not None: * self.__sprite.remove_internal(self) */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":1337 * * cpdef void add_internal(self, sprite) noexcept: * if self.__sprite is not None: # <<<<<<<<<<<<<< * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) */ __pyx_t_6 = (__pyx_v_self->_GroupSingle__sprite != Py_None); if (__pyx_t_6) { /* "pygame/_sprite.pyx":1338 * cpdef void add_internal(self, sprite) noexcept: * if self.__sprite is not None: * self.__sprite.remove_internal(self) # <<<<<<<<<<<<<< * self.remove_internal(self.__sprite) * self.__sprite = sprite */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_GroupSingle__sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1339 * if self.__sprite is not None: * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) # <<<<<<<<<<<<<< * self.__sprite = sprite * */ __pyx_t_1 = __pyx_v_self->_GroupSingle__sprite; __Pyx_INCREF(__pyx_t_1); ((struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_t_1, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1337 * * cpdef void add_internal(self, sprite) noexcept: * if self.__sprite is not None: # <<<<<<<<<<<<<< * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) */ } /* "pygame/_sprite.pyx":1340 * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) * self.__sprite = sprite # <<<<<<<<<<<<<< * * def __bool__(self): */ __Pyx_INCREF(__pyx_v_sprite); __Pyx_GIVEREF(__pyx_v_sprite); __Pyx_GOTREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_DECREF(__pyx_v_self->_GroupSingle__sprite); __pyx_v_self->_GroupSingle__sprite = __pyx_v_sprite; /* "pygame/_sprite.pyx":1336 * return [] * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if self.__sprite is not None: * self.__sprite.remove_internal(self) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.GroupSingle.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_7add_internal = {"add_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1336, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_internal") < 0)) __PYX_ERR(0, 1336, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1336, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_6add_internal(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_6add_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.GroupSingle.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1342 * self.__sprite = sprite * * def __bool__(self): # <<<<<<<<<<<<<< * return self.__sprite is not None * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_9__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_9__bool__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_8__bool__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_11GroupSingle_8__bool__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { int __pyx_r; int __pyx_t_1; /* "pygame/_sprite.pyx":1343 * * def __bool__(self): * return self.__sprite is not None # <<<<<<<<<<<<<< * * def _get_sprite(self): */ __pyx_t_1 = (__pyx_v_self->_GroupSingle__sprite != Py_None); __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pygame/_sprite.pyx":1342 * self.__sprite = sprite * * def __bool__(self): # <<<<<<<<<<<<<< * return self.__sprite is not None * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "pygame/_sprite.pyx":1345 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< * return self.__sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_11_get_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_11_get_sprite = {"_get_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_11_get_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_11_get_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_sprite (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_get_sprite", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_sprite", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_sprite", 1); /* "pygame/_sprite.pyx":1346 * * def _get_sprite(self): * return self.__sprite # <<<<<<<<<<<<<< * * def _set_sprite(self, sprite): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_GroupSingle__sprite); __pyx_r = __pyx_v_self->_GroupSingle__sprite; goto __pyx_L0; /* "pygame/_sprite.pyx":1345 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< * return self.__sprite * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1348 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_13_set_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_13_set_sprite = {"_set_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_13_set_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_13_set_sprite(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_sprite (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1348, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_set_sprite") < 0)) __PYX_ERR(0, 1348, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_sprite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1348, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle._set_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_sprite", 1); /* "pygame/_sprite.pyx":1349 * * def _set_sprite(self, sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< * sprite.add_internal(self) * return sprite */ ((struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0); /* "pygame/_sprite.pyx":1350 * def _set_sprite(self, sprite): * self.add_internal(sprite) * sprite.add_internal(self) # <<<<<<<<<<<<<< * return sprite * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1351 * self.add_internal(sprite) * sprite.add_internal(self) * return sprite # <<<<<<<<<<<<<< * * sprite = property(_get_sprite, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sprite); __pyx_r = __pyx_v_sprite; goto __pyx_L0; /* "pygame/_sprite.pyx":1348 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.GroupSingle._set_sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1358 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if sprite is self.__sprite: * self.__sprite = None */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":1359 * * cpdef void remove_internal(self, sprite) noexcept: * if sprite is self.__sprite: # <<<<<<<<<<<<<< * self.__sprite = None * if sprite in self.spritedict: */ __pyx_t_6 = (__pyx_v_sprite == __pyx_v_self->_GroupSingle__sprite); if (__pyx_t_6) { /* "pygame/_sprite.pyx":1360 * cpdef void remove_internal(self, sprite) noexcept: * if sprite is self.__sprite: * self.__sprite = None # <<<<<<<<<<<<<< * if sprite in self.spritedict: * AbstractGroup.remove_internal(self, sprite) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_DECREF(__pyx_v_self->_GroupSingle__sprite); __pyx_v_self->_GroupSingle__sprite = Py_None; /* "pygame/_sprite.pyx":1359 * * cpdef void remove_internal(self, sprite) noexcept: * if sprite is self.__sprite: # <<<<<<<<<<<<<< * self.__sprite = None * if sprite in self.spritedict: */ } /* "pygame/_sprite.pyx":1361 * if sprite is self.__sprite: * self.__sprite = None * if sprite in self.spritedict: # <<<<<<<<<<<<<< * AbstractGroup.remove_internal(self, sprite) * */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 1361, __pyx_L1_error) } __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->__pyx_base.spritedict, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1361, __pyx_L1_error) if (__pyx_t_6) { /* "pygame/_sprite.pyx":1362 * self.__sprite = None * if sprite in self.spritedict: * AbstractGroup.remove_internal(self, sprite) # <<<<<<<<<<<<<< * * cpdef bint has_internal(self, sprite) noexcept: */ __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); /* "pygame/_sprite.pyx":1361 * if sprite is self.__sprite: * self.__sprite = None * if sprite in self.spritedict: # <<<<<<<<<<<<<< * AbstractGroup.remove_internal(self, sprite) * */ } /* "pygame/_sprite.pyx":1358 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if sprite is self.__sprite: * self.__sprite = None */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.GroupSingle.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_15remove_internal = {"remove_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1358, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_internal") < 0)) __PYX_ERR(0, 1358, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1358, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_14remove_internal(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_14remove_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.GroupSingle.remove_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1364 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 1); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sprite}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "pygame/_sprite.pyx":1365 * * cpdef bint has_internal(self, sprite) noexcept: * return self.__sprite is sprite # <<<<<<<<<<<<<< * * # Optimizations... */ __pyx_t_6 = (__pyx_v_self->_GroupSingle__sprite == __pyx_v_sprite); __pyx_r = __pyx_t_6; goto __pyx_L0; /* "pygame/_sprite.pyx":1364 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame._sprite.GroupSingle.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_17has_internal = {"has_internal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1364, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "has_internal") < 0)) __PYX_ERR(0, 1364, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_sprite = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("has_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1364, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_16has_internal(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v_sprite); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_16has_internal(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 1); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame._sprite.GroupSingle.has_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1368 * * # Optimizations... * def __contains__(self, sprite): # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_sprite); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_sprite) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), ((PyObject *)__pyx_v_sprite)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_sprite) { int __pyx_r; int __pyx_t_1; /* "pygame/_sprite.pyx":1369 * # Optimizations... * def __contains__(self, sprite): * return self.__sprite is sprite # <<<<<<<<<<<<<< * * */ __pyx_t_1 = (__pyx_v_self->_GroupSingle__sprite == __pyx_v_sprite); __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pygame/_sprite.pyx":1368 * * # Optimizations... * def __contains__(self, sprite): # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "pygame/_sprite.pyx":1319 * """ * * cdef public object __sprite # <<<<<<<<<<<<<< * * def __init__(self, sprite=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite___get__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite___get__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_GroupSingle__sprite); __pyx_r = __pyx_v_self->_GroupSingle__sprite; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_2__set__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_2__set__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 1); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_DECREF(__pyx_v_self->_GroupSingle__sprite); __pyx_v_self->_GroupSingle__sprite = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_4__del__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_4__del__(struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_GroupSingle__sprite); __Pyx_DECREF(__pyx_v_self->_GroupSingle__sprite); __pyx_v_self->_GroupSingle__sprite = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_21__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_21__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_20__reduce_cython__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.GroupSingle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_23__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11GroupSingle_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_7_sprite_11GroupSingle_23__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.GroupSingle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_11GroupSingle_22__setstate_cython__(((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_7_sprite_GroupSingle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.GroupSingle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1373 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_1collide_rect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_collide_rect, "collision detection between two sprites, using rects.\n\n pygame.sprite.collide_rect(left, right): return bool\n\n Tests for collision between two sprites. Uses the pygame.Rect colliderect\n function to calculate the collision. It is intended to be passed as a\n collided callback function to the *collide functions. Sprites must have\n \"rect\" attributes.\n\n New in pygame 1.8.0\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_1collide_rect = {"collide_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_1collide_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_collide_rect}; static PyObject *__pyx_pw_6pygame_7_sprite_1collide_rect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_rect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, 1); __PYX_ERR(0, 1373, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "collide_rect") < 0)) __PYX_ERR(0, 1373, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_left = values[0]; __pyx_v_right = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1373, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_collide_rect(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_rect", 1); /* "pygame/_sprite.pyx":1386 * * """ * return left.rect.colliderect(right.rect) # <<<<<<<<<<<<<< * * class collide_rect_ratio: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1373 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame._sprite.collide_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1400 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_18collide_rect_ratio___init__, "create a new collide_rect_ratio callable\n\n Ratio is expected to be a floating point value used to scale\n the underlying sprite rect before checking for collisions.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_18collide_rect_ratio___init__}; static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ratio = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ratio,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1400, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1400, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1400, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1400, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_ratio = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1400, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_18collide_rect_ratio___init__(__pyx_self, __pyx_v_self, __pyx_v_ratio); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":1407 * * """ * self.ratio = ratio # <<<<<<<<<<<<<< * * def __call__(self, left, right): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) /* "pygame/_sprite.pyx":1400 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1409 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_18collide_rect_ratio_2__call__, "detect collision between two sprites using scaled rects\n\n pygame.sprite.collide_rect_ratio(ratio)(left, right): return bool\n\n Tests for collision between two sprites. Uses the pygame.Rect\n colliderect function to calculate the collision after scaling the rects\n by the stored ratio. Sprites must have \"rect\" attributes.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_3__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_18collide_rect_ratio_2__call__}; static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_left,&__pyx_n_s_right,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1409, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1409, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_left = values[1]; __pyx_v_right = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1409, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(__pyx_self, __pyx_v_self, __pyx_v_left, __pyx_v_right); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_v_ratio = NULL; PyObject *__pyx_v_leftrect = NULL; PyObject *__pyx_v_width = NULL; PyObject *__pyx_v_height = NULL; PyObject *__pyx_v_rightrect = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; unsigned int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); /* "pygame/_sprite.pyx":1420 * """ * * ratio = self.ratio # <<<<<<<<<<<<<< * * leftrect = left.rect */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ratio = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1422 * ratio = self.ratio * * leftrect = left.rect # <<<<<<<<<<<<<< * width = leftrect.width * height = leftrect.height */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leftrect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1423 * * leftrect = left.rect * width = leftrect.width # <<<<<<<<<<<<<< * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_width = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1424 * leftrect = left.rect * width = leftrect.width * height = leftrect.height # <<<<<<<<<<<<<< * leftrect = leftrect.inflate(width * ratio - width, * height * ratio - height) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_height = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1425 * width = leftrect.width * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, # <<<<<<<<<<<<<< * height * ratio - height) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1426 * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, * height * ratio - height) # <<<<<<<<<<<<<< * * rightrect = right.rect */ __pyx_t_3 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF_SET(__pyx_v_leftrect, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1428 * height * ratio - height) * * rightrect = right.rect # <<<<<<<<<<<<<< * width = rightrect.width * height = rightrect.height */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rightrect = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1429 * * rightrect = right.rect * width = rightrect.width # <<<<<<<<<<<<<< * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_width, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1430 * rightrect = right.rect * width = rightrect.width * height = rightrect.height # <<<<<<<<<<<<<< * rightrect = rightrect.inflate(width * ratio - width, * height * ratio - height) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_height, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1431 * width = rightrect.width * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, # <<<<<<<<<<<<<< * height * ratio - height) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":1432 * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, * height * ratio - height) # <<<<<<<<<<<<<< * * return leftrect.colliderect(rightrect) */ __pyx_t_5 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF_SET(__pyx_v_rightrect, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1434 * height * ratio - height) * * return leftrect.colliderect(rightrect) # <<<<<<<<<<<<<< * * def collide_circle(left, right): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_6 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rightrect}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1409 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ratio); __Pyx_XDECREF(__pyx_v_leftrect); __Pyx_XDECREF(__pyx_v_width); __Pyx_XDECREF(__pyx_v_height); __Pyx_XDECREF(__pyx_v_rightrect); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1436 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_3collide_circle(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_2collide_circle, "detect collision between two sprites using circles\n\n pygame.sprite.collide_circle(left, right): return bool\n\n Tests for collision between two sprites by testing whether two circles\n centered on the sprites overlap. If the sprites have a \"radius\" attribute,\n then that radius is used to create the circle; otherwise, a circle is\n created that is big enough to completely enclose the sprite's rect as\n given by the \"rect\" attribute. This function is intended to be passed as\n a collided callback function to the *collide functions. Sprites must have a\n \"rect\" and an optional \"radius\" attribute.\n\n New in pygame 1.8.0\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_3collide_circle = {"collide_circle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_3collide_circle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_2collide_circle}; static PyObject *__pyx_pw_6pygame_7_sprite_3collide_circle(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_circle (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, 1); __PYX_ERR(0, 1436, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "collide_circle") < 0)) __PYX_ERR(0, 1436, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_left = values[0]; __pyx_v_right = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1436, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_circle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_2collide_circle(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_v_xdistance = NULL; PyObject *__pyx_v_ydistance = NULL; PyObject *__pyx_v_distancesquared = NULL; PyObject *__pyx_v_leftradius = NULL; PyObject *__pyx_v_leftrect = NULL; PyObject *__pyx_v_rightradius = NULL; PyObject *__pyx_v_rightrect = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_circle", 1); /* "pygame/_sprite.pyx":1453 * """ * * xdistance = left.rect.centerx - right.rect.centerx # <<<<<<<<<<<<<< * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xdistance = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1454 * * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery # <<<<<<<<<<<<<< * distancesquared = xdistance ** 2 + ydistance ** 2 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ydistance = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1455 * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 # <<<<<<<<<<<<<< * * if hasattr(left, 'radius'): */ __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_distancesquared = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1457 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, 'radius'): # <<<<<<<<<<<<<< * leftradius = left.radius * else: */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1457, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":1458 * * if hasattr(left, 'radius'): * leftradius = left.radius # <<<<<<<<<<<<<< * else: * leftrect = left.rect */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1457 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, 'radius'): # <<<<<<<<<<<<<< * leftradius = left.radius * else: */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1460 * leftradius = left.radius * else: * leftrect = left.rect # <<<<<<<<<<<<<< * # approximating the radius of a square by using half of the diagonal, * # might give false positives (especially if its a long small rect) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leftrect = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1463 * # approximating the radius of a square by using half of the diagonal, * # might give false positives (especially if its a long small rect) * leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1465 * leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) # <<<<<<<<<<<<<< * * if hasattr(right, 'radius'): */ __pyx_t_5 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1465, __pyx_L1_error) } __pyx_L3:; /* "pygame/_sprite.pyx":1467 * setattr(left, 'radius', leftradius) * * if hasattr(right, 'radius'): # <<<<<<<<<<<<<< * rightradius = right.radius * else: */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1467, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":1468 * * if hasattr(right, 'radius'): * rightradius = right.radius # <<<<<<<<<<<<<< * else: * rightrect = right.rect */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1467 * setattr(left, 'radius', leftradius) * * if hasattr(right, 'radius'): # <<<<<<<<<<<<<< * rightradius = right.radius * else: */ goto __pyx_L4; } /* "pygame/_sprite.pyx":1470 * rightradius = right.radius * else: * rightrect = right.rect # <<<<<<<<<<<<<< * # approximating the radius of a square by using half of the diagonal * # might give false positives (especially if its a long small rect) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightrect = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1473 * # approximating the radius of a square by using half of the diagonal * # might give false positives (especially if its a long small rect) * rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1475 * rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) # <<<<<<<<<<<<<< * return distancesquared <= (leftradius + rightradius) ** 2 * */ __pyx_t_5 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1475, __pyx_L1_error) } __pyx_L4:; /* "pygame/_sprite.pyx":1476 * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) * return distancesquared <= (leftradius + rightradius) ** 2 # <<<<<<<<<<<<<< * * class collide_circle_ratio(object): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1436 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame._sprite.collide_circle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_xdistance); __Pyx_XDECREF(__pyx_v_ydistance); __Pyx_XDECREF(__pyx_v_distancesquared); __Pyx_XDECREF(__pyx_v_leftradius); __Pyx_XDECREF(__pyx_v_leftrect); __Pyx_XDECREF(__pyx_v_rightradius); __Pyx_XDECREF(__pyx_v_rightrect); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1490 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_20collide_circle_ratio___init__, "creates a new collide_circle_ratio callable instance\n\n The given ratio is expected to be a floating point value used to scale\n the underlying sprite radius before checking for collisions.\n\n When the ratio is ratio=1.0, then it behaves exactly like the\n collide_circle method.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_20collide_circle_ratio___init__}; static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ratio = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ratio,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratio)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1490, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1490, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_ratio = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1490, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_20collide_circle_ratio___init__(__pyx_self, __pyx_v_self, __pyx_v_ratio); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/_sprite.pyx":1500 * * """ * self.ratio = ratio # <<<<<<<<<<<<<< * * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1500, __pyx_L1_error) /* "pygame/_sprite.pyx":1490 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1503 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_20collide_circle_ratio_2__call__, "detect collision between two sprites using scaled circles\n\n pygame.sprite.collide_circle_radio(ratio)(left, right): return bool\n\n Tests for collision between two sprites by testing whether two circles\n centered on the sprites overlap after scaling the circle's radius by\n the stored ratio. If the sprites have a \"radius\" attribute, that is\n used to create the circle; otherwise, a circle is created that is big\n enough to completely enclose the sprite's rect as given by the \"rect\"\n attribute. Intended to be passed as a collided callback function to the\n *collide functions. Sprites must have a \"rect\" and an optional \"radius\"\n attribute.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_3__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_20collide_circle_ratio_2__call__}; static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_left,&__pyx_n_s_right,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1503, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1503, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_left = values[1]; __pyx_v_right = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1503, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(__pyx_self, __pyx_v_self, __pyx_v_left, __pyx_v_right); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_v_ratio = NULL; PyObject *__pyx_v_xdistance = NULL; PyObject *__pyx_v_ydistance = NULL; PyObject *__pyx_v_distancesquared = NULL; PyObject *__pyx_v_leftradius = NULL; PyObject *__pyx_v_leftrect = NULL; PyObject *__pyx_v_rightradius = NULL; PyObject *__pyx_v_rightrect = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); /* "pygame/_sprite.pyx":1519 * """ * * ratio = self.ratio # <<<<<<<<<<<<<< * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ratio = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1520 * * ratio = self.ratio * xdistance = left.rect.centerx - right.rect.centerx # <<<<<<<<<<<<<< * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xdistance = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1521 * ratio = self.ratio * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery # <<<<<<<<<<<<<< * distancesquared = xdistance ** 2 + ydistance ** 2 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ydistance = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1522 * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 # <<<<<<<<<<<<<< * * if hasattr(left, "radius"): */ __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_distancesquared = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1524 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, "radius"): # <<<<<<<<<<<<<< * leftradius = left.radius * ratio * else: */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1524, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":1525 * * if hasattr(left, "radius"): * leftradius = left.radius * ratio # <<<<<<<<<<<<<< * else: * leftrect = left.rect */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_leftradius = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1524 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, "radius"): # <<<<<<<<<<<<<< * leftradius = left.radius * ratio * else: */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1527 * leftradius = left.radius * ratio * else: * leftrect = left.rect # <<<<<<<<<<<<<< * leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_leftrect = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1528 * else: * leftrect = left.rect * leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) */ __pyx_t_2 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1530 * leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) # <<<<<<<<<<<<<< * * if hasattr(right, "radius"): */ __pyx_t_6 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1530, __pyx_L1_error) } __pyx_L3:; /* "pygame/_sprite.pyx":1532 * setattr(left, 'radius', leftradius) * * if hasattr(right, "radius"): # <<<<<<<<<<<<<< * rightradius = right.radius * ratio * else: */ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1532, __pyx_L1_error) if (__pyx_t_4) { /* "pygame/_sprite.pyx":1533 * * if hasattr(right, "radius"): * rightradius = right.radius * ratio # <<<<<<<<<<<<<< * else: * rightrect = right.rect */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rightradius = __pyx_t_5; __pyx_t_5 = 0; /* "pygame/_sprite.pyx":1532 * setattr(left, 'radius', leftradius) * * if hasattr(right, "radius"): # <<<<<<<<<<<<<< * rightradius = right.radius * ratio * else: */ goto __pyx_L4; } /* "pygame/_sprite.pyx":1535 * rightradius = right.radius * ratio * else: * rightrect = right.rect # <<<<<<<<<<<<<< * rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_rightrect = __pyx_t_5; __pyx_t_5 = 0; /* "pygame/_sprite.pyx":1536 * else: * rightrect = right.rect * rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) */ __pyx_t_5 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1538 * rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) # <<<<<<<<<<<<<< * * return distancesquared <= (leftradius + rightradius) ** 2 */ __pyx_t_6 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1538, __pyx_L1_error) } __pyx_L4:; /* "pygame/_sprite.pyx":1540 * setattr(right, 'radius', rightradius) * * return distancesquared <= (leftradius + rightradius) ** 2 # <<<<<<<<<<<<<< * * def collide_mask(left, right): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1503 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ratio); __Pyx_XDECREF(__pyx_v_xdistance); __Pyx_XDECREF(__pyx_v_ydistance); __Pyx_XDECREF(__pyx_v_distancesquared); __Pyx_XDECREF(__pyx_v_leftradius); __Pyx_XDECREF(__pyx_v_leftrect); __Pyx_XDECREF(__pyx_v_rightradius); __Pyx_XDECREF(__pyx_v_rightrect); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1542 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_5collide_mask(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_4collide_mask, "collision detection between two sprites, using masks.\n\n pygame.sprite.collide_mask(SpriteLeft, SpriteRight): bool\n\n Tests for collision between two sprites by testing if their bitmasks\n overlap. If the sprites have a \"mask\" attribute, that is used as the mask;\n otherwise, a mask is created from the sprite image. Intended to be passed\n as a collided callback function to the *collide functions. Sprites must\n have a \"rect\" and an optional \"mask\" attribute.\n\n New in pygame 1.8.0\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_5collide_mask = {"collide_mask", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_5collide_mask, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_4collide_mask}; static PyObject *__pyx_pw_6pygame_7_sprite_5collide_mask(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_mask (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, 1); __PYX_ERR(0, 1542, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "collide_mask") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_left = values[0]; __pyx_v_right = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1542, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_4collide_mask(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_v_xoffset = NULL; PyObject *__pyx_v_yoffset = NULL; PyObject *__pyx_v_leftmask = NULL; PyObject *__pyx_v_rightmask = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; unsigned int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_mask", 1); /* "pygame/_sprite.pyx":1556 * * """ * xoffset = right.rect[0] - left.rect[0] # <<<<<<<<<<<<<< * yoffset = right.rect[1] - left.rect[1] * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xoffset = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1557 * """ * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] # <<<<<<<<<<<<<< * try: * leftmask = left.mask */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_yoffset = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1558 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< * leftmask = left.mask * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pygame/_sprite.pyx":1559 * yoffset = right.rect[1] - left.rect[1] * try: * leftmask = left.mask # <<<<<<<<<<<<<< * except AttributeError: * leftmask = from_surface(left.image) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leftmask = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1558 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< * leftmask = left.mask * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1560 * try: * leftmask = left.mask * except AttributeError: # <<<<<<<<<<<<<< * leftmask = from_surface(left.image) * try: */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1560, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":1561 * leftmask = left.mask * except AttributeError: * leftmask = from_surface(left.image) # <<<<<<<<<<<<<< * try: * rightmask = right.mask */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_12 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_12 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF_SET(__pyx_v_leftmask, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "pygame/_sprite.pyx":1558 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< * leftmask = left.mask * except AttributeError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L8_try_end:; } /* "pygame/_sprite.pyx":1562 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< * rightmask = right.mask * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pygame/_sprite.pyx":1563 * leftmask = from_surface(left.image) * try: * rightmask = right.mask # <<<<<<<<<<<<<< * except AttributeError: * rightmask = from_surface(right.image) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightmask = __pyx_t_3; __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1562 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< * rightmask = right.mask * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pygame/_sprite.pyx":1564 * try: * rightmask = right.mask * except AttributeError: # <<<<<<<<<<<<<< * rightmask = from_surface(right.image) * return leftmask.overlap(rightmask, (xoffset, yoffset)) */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1564, __pyx_L13_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /* "pygame/_sprite.pyx":1565 * rightmask = right.mask * except AttributeError: * rightmask = from_surface(right.image) # <<<<<<<<<<<<<< * return leftmask.overlap(rightmask, (xoffset, yoffset)) * */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1565, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1565, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_12 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_12 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1565, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF_SET(__pyx_v_rightmask, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; /* "pygame/_sprite.pyx":1562 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< * rightmask = right.mask * except AttributeError: */ __pyx_L13_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L16_try_end:; } /* "pygame/_sprite.pyx":1566 * except AttributeError: * rightmask = from_surface(right.image) * return leftmask.overlap(rightmask, (xoffset, yoffset)) # <<<<<<<<<<<<<< * * def spritecollide(sprite, group, dokill, collided=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftmask, __pyx_n_s_overlap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_xoffset); __Pyx_GIVEREF(__pyx_v_xoffset); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xoffset)) __PYX_ERR(0, 1566, __pyx_L1_error); __Pyx_INCREF(__pyx_v_yoffset); __Pyx_GIVEREF(__pyx_v_yoffset); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_yoffset)) __PYX_ERR(0, 1566, __pyx_L1_error); __pyx_t_8 = NULL; __pyx_t_12 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_12 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_rightmask, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1542 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_xoffset); __Pyx_XDECREF(__pyx_v_yoffset); __Pyx_XDECREF(__pyx_v_leftmask); __Pyx_XDECREF(__pyx_v_rightmask); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1568 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_6spritecollide, "find Sprites in a Group that intersect another Sprite\n\n pygame.sprite.spritecollide(sprite, group, dokill, collided=None):\n return Sprite_list\n\n Return a list containing all Sprites in a Group that intersect with another\n Sprite. Intersection is determined by comparing the Sprite.rect attribute\n of each Sprite.\n\n The dokill argument is a bool. If set to True, all Sprites that collide\n will be removed from the Group.\n\n The collided argument is a callback function used to calculate if two\n sprites are colliding. it should take two sprites as values, and return a\n bool value indicating if they are colliding. If collided is not passed, all\n sprites must have a \"rect\" value, which is a rectangle of the sprite area,\n which will be used to calculate the collision.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_7spritecollide = {"spritecollide", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_7spritecollide, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6spritecollide}; static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_group = 0; PyObject *__pyx_v_dokill = 0; PyObject *__pyx_v_collided = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("spritecollide (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_group,&__pyx_n_s_dokill,&__pyx_n_s_collided,0}; values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_group)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 1); __PYX_ERR(0, 1568, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dokill)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 2); __PYX_ERR(0, 1568, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_collided); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1568, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "spritecollide") < 0)) __PYX_ERR(0, 1568, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sprite = values[0]; __pyx_v_group = values[1]; __pyx_v_dokill = values[2]; __pyx_v_collided = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1568, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.spritecollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_6spritecollide(__pyx_self, __pyx_v_sprite, __pyx_v_group, __pyx_v_dokill, __pyx_v_collided); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_group, PyObject *__pyx_v_dokill, PyObject *__pyx_v_collided) { PyObject *__pyx_v_crashed = NULL; PyObject *__pyx_v_append = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_spritecollide = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("spritecollide", 1); /* "pygame/_sprite.pyx":1588 * * """ * if dokill: # <<<<<<<<<<<<<< * * crashed = [] */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dokill); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1588, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sprite.pyx":1590 * if dokill: * * crashed = [] # <<<<<<<<<<<<<< * append = crashed.append * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_crashed = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1591 * * crashed = [] * append = crashed.append # <<<<<<<<<<<<<< * * if collided: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_crashed, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_append = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1593 * append = crashed.append * * if collided: # <<<<<<<<<<<<<< * for s in group.sprites(): * if collided(sprite, s): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1593, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sprite.pyx":1594 * * if collided: * for s in group.sprites(): # <<<<<<<<<<<<<< * if collided(sprite, s): * s.kill() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1594, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1594, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1594, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1594, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1594, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1594, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1595 * if collided: * for s in group.sprites(): * if collided(sprite, s): # <<<<<<<<<<<<<< * s.kill() * append(s) */ __Pyx_INCREF(__pyx_v_collided); __pyx_t_4 = __pyx_v_collided; __pyx_t_8 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sprite, __pyx_v_s}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pygame/_sprite.pyx":1596 * for s in group.sprites(): * if collided(sprite, s): * s.kill() # <<<<<<<<<<<<<< * append(s) * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1597 * if collided(sprite, s): * s.kill() * append(s) # <<<<<<<<<<<<<< * else: * spritecollide = sprite.rect.colliderect */ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1597, __pyx_L1_error) /* "pygame/_sprite.pyx":1595 * if collided: * for s in group.sprites(): * if collided(sprite, s): # <<<<<<<<<<<<<< * s.kill() * append(s) */ } /* "pygame/_sprite.pyx":1594 * * if collided: * for s in group.sprites(): # <<<<<<<<<<<<<< * if collided(sprite, s): * s.kill() */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1593 * append = crashed.append * * if collided: # <<<<<<<<<<<<<< * for s in group.sprites(): * if collided(sprite, s): */ goto __pyx_L4; } /* "pygame/_sprite.pyx":1599 * append(s) * else: * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< * for s in group.sprites(): * if spritecollide(s.rect): */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_spritecollide = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1600 * else: * spritecollide = sprite.rect.colliderect * for s in group.sprites(): # <<<<<<<<<<<<<< * if spritecollide(s.rect): * s.kill() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1600, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1600, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1600, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1600, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1600, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1600, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1601 * spritecollide = sprite.rect.colliderect * for s in group.sprites(): * if spritecollide(s.rect): # <<<<<<<<<<<<<< * s.kill() * append(s) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_8 = __pyx_v_spritecollide; __pyx_t_10 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pygame/_sprite.pyx":1602 * for s in group.sprites(): * if spritecollide(s.rect): * s.kill() # <<<<<<<<<<<<<< * append(s) * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1603 * if spritecollide(s.rect): * s.kill() * append(s) # <<<<<<<<<<<<<< * * return crashed */ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1603, __pyx_L1_error) /* "pygame/_sprite.pyx":1601 * spritecollide = sprite.rect.colliderect * for s in group.sprites(): * if spritecollide(s.rect): # <<<<<<<<<<<<<< * s.kill() * append(s) */ } /* "pygame/_sprite.pyx":1600 * else: * spritecollide = sprite.rect.colliderect * for s in group.sprites(): # <<<<<<<<<<<<<< * if spritecollide(s.rect): * s.kill() */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "pygame/_sprite.pyx":1605 * append(s) * * return crashed # <<<<<<<<<<<<<< * * elif collided: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_crashed); __pyx_r = __pyx_v_crashed; goto __pyx_L0; /* "pygame/_sprite.pyx":1588 * * """ * if dokill: # <<<<<<<<<<<<<< * * crashed = [] */ } /* "pygame/_sprite.pyx":1607 * return crashed * * elif collided: # <<<<<<<<<<<<<< * return [s for s in group if collided(sprite, s)] * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1607, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sprite.pyx":1608 * * elif collided: * return [s for s in group if collided(sprite, s)] # <<<<<<<<<<<<<< * else: * spritecollide = sprite.rect.colliderect */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_2 = __pyx_v_group; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1608, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1608, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_v_collided); __pyx_t_4 = __pyx_v_collided; __pyx_t_10 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_sprite, __pyx_v_s}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1608, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1607 * return crashed * * elif collided: # <<<<<<<<<<<<<< * return [s for s in group if collided(sprite, s)] * else: */ } /* "pygame/_sprite.pyx":1610 * return [s for s in group if collided(sprite, s)] * else: * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< * return [s for s in group if spritecollide(s.rect)] * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_spritecollide = __pyx_t_2; __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1611 * else: * spritecollide = sprite.rect.colliderect * return [s for s in group if spritecollide(s.rect)] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_3 = __pyx_v_group; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1611, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1611, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1611, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1611, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1611, __pyx_L1_error) #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1611, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_10 = __pyx_v_spritecollide; __pyx_t_11 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_4}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1611, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pygame/_sprite.pyx":1568 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pygame._sprite.spritecollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_crashed); __Pyx_XDECREF(__pyx_v_append); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_spritecollide); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1614 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_8groupcollide, "detect collision between a group and another group\n\n pygame.sprite.groupcollide(groupa, groupb, dokilla, dokillb):\n return dict\n\n Given two groups, this will find the intersections between all sprites in\n each group. It returns a dictionary of all sprites in the first group that\n collide. The value for each item in the dictionary is a list of the sprites\n in the second group it collides with. The two dokill arguments control if\n the sprites from either group will be automatically removed from all\n groups. Collided is a callback function used to calculate if two sprites\n are colliding. it should take two sprites as values, and return a bool\n value indicating if they are colliding. If collided is not passed, all\n sprites must have a \"rect\" value, which is a rectangle of the sprite area\n that will be used to calculate the collision.\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_9groupcollide = {"groupcollide", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_9groupcollide, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_8groupcollide}; static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_groupa = 0; PyObject *__pyx_v_groupb = 0; PyObject *__pyx_v_dokilla = 0; PyObject *__pyx_v_dokillb = 0; PyObject *__pyx_v_collided = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupcollide (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_groupa,&__pyx_n_s_groupb,&__pyx_n_s_dokilla,&__pyx_n_s_dokillb,&__pyx_n_s_collided,0}; values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_groupa)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_groupb)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 1); __PYX_ERR(0, 1614, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dokilla)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 2); __PYX_ERR(0, 1614, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dokillb)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 3); __PYX_ERR(0, 1614, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_collided); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "groupcollide") < 0)) __PYX_ERR(0, 1614, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_groupa = values[0]; __pyx_v_groupb = values[1]; __pyx_v_dokilla = values[2]; __pyx_v_dokillb = values[3]; __pyx_v_collided = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1614, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.groupcollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_8groupcollide(__pyx_self, __pyx_v_groupa, __pyx_v_groupb, __pyx_v_dokilla, __pyx_v_dokillb, __pyx_v_collided); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_groupa, PyObject *__pyx_v_groupb, PyObject *__pyx_v_dokilla, PyObject *__pyx_v_dokillb, PyObject *__pyx_v_collided) { PyObject *__pyx_v_crashed = NULL; PyObject *__pyx_v_SC = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupcollide", 1); /* "pygame/_sprite.pyx":1632 * * """ * crashed = {} # <<<<<<<<<<<<<< * SC = spritecollide * if dokilla: */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_crashed = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1633 * """ * crashed = {} * SC = spritecollide # <<<<<<<<<<<<<< * if dokilla: * for s in groupa.sprites(): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spritecollide); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_SC = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1634 * crashed = {} * SC = spritecollide * if dokilla: # <<<<<<<<<<<<<< * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dokilla); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1634, __pyx_L1_error) if (__pyx_t_2) { /* "pygame/_sprite.pyx":1635 * SC = spritecollide * if dokilla: * for s in groupa.sprites(): # <<<<<<<<<<<<<< * c = SC(s, groupb, dokillb, collided) * if c: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupa, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1635, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1635, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1635, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1635, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1635, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1635, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1636 * if dokilla: * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) # <<<<<<<<<<<<<< * if c: * crashed[s] = c */ __Pyx_INCREF(__pyx_v_SC); __pyx_t_4 = __pyx_v_SC; __pyx_t_8 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1637 * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * s.kill() */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1637, __pyx_L1_error) if (__pyx_t_2) { /* "pygame/_sprite.pyx":1638 * c = SC(s, groupb, dokillb, collided) * if c: * crashed[s] = c # <<<<<<<<<<<<<< * s.kill() * else: */ if (unlikely((PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0))) __PYX_ERR(0, 1638, __pyx_L1_error) /* "pygame/_sprite.pyx":1639 * if c: * crashed[s] = c * s.kill() # <<<<<<<<<<<<<< * else: * for s in groupa: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1637 * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * s.kill() */ } /* "pygame/_sprite.pyx":1635 * SC = spritecollide * if dokilla: * for s in groupa.sprites(): # <<<<<<<<<<<<<< * c = SC(s, groupb, dokillb, collided) * if c: */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1634 * crashed = {} * SC = spritecollide * if dokilla: # <<<<<<<<<<<<<< * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1641 * s.kill() * else: * for s in groupa: # <<<<<<<<<<<<<< * c = SC(s, groupb, dokillb, collided) * if c: */ /*else*/ { if (likely(PyList_CheckExact(__pyx_v_groupa)) || PyTuple_CheckExact(__pyx_v_groupa)) { __pyx_t_3 = __pyx_v_groupa; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_groupa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1641, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1641, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1641, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1641, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1641, __pyx_L1_error) #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1641, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1642 * else: * for s in groupa: * c = SC(s, groupb, dokillb, collided) # <<<<<<<<<<<<<< * if c: * crashed[s] = c */ __Pyx_INCREF(__pyx_v_SC); __pyx_t_4 = __pyx_v_SC; __pyx_t_8 = NULL; __pyx_t_5 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1643 * for s in groupa: * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * return crashed */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1643, __pyx_L1_error) if (__pyx_t_2) { /* "pygame/_sprite.pyx":1644 * c = SC(s, groupb, dokillb, collided) * if c: * crashed[s] = c # <<<<<<<<<<<<<< * return crashed * */ if (unlikely((PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0))) __PYX_ERR(0, 1644, __pyx_L1_error) /* "pygame/_sprite.pyx":1643 * for s in groupa: * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * return crashed */ } /* "pygame/_sprite.pyx":1641 * s.kill() * else: * for s in groupa: # <<<<<<<<<<<<<< * c = SC(s, groupb, dokillb, collided) * if c: */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":1645 * if c: * crashed[s] = c * return crashed # <<<<<<<<<<<<<< * * def spritecollideany(sprite, group, collided=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_crashed); __pyx_r = __pyx_v_crashed; goto __pyx_L0; /* "pygame/_sprite.pyx":1614 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame._sprite.groupcollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_crashed); __Pyx_XDECREF(__pyx_v_SC); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/_sprite.pyx":1647 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_7_sprite_10spritecollideany, "finds any sprites in a group that collide with the given sprite\n\n pygame.sprite.spritecollideany(sprite, group): return sprite\n\n Given a sprite and a group of sprites, this will return return any single\n sprite that collides with with the given sprite. If there are no\n collisions, then this returns None.\n\n If you don't need all the features of the spritecollide function, this\n function will be a bit quicker.\n\n Collided is a callback function used to calculate if two sprites are\n colliding. It should take two sprites as values and return a bool value\n indicating if they are colliding. If collided is not passed, then all\n sprites must have a \"rect\" value, which is a rectangle of the sprite area,\n which will be used to calculate the collision.\n\n\n "); static PyMethodDef __pyx_mdef_6pygame_7_sprite_11spritecollideany = {"spritecollideany", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11spritecollideany, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_10spritecollideany}; static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_group = 0; PyObject *__pyx_v_collided = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("spritecollideany (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sprite,&__pyx_n_s_group,&__pyx_n_s_collided,0}; values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sprite)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_group)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, 1); __PYX_ERR(0, 1647, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_collided); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "spritecollideany") < 0)) __PYX_ERR(0, 1647, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sprite = values[0]; __pyx_v_group = values[1]; __pyx_v_collided = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1647, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame._sprite.spritecollideany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_7_sprite_10spritecollideany(__pyx_self, __pyx_v_sprite, __pyx_v_group, __pyx_v_collided); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sprite, PyObject *__pyx_v_group, PyObject *__pyx_v_collided) { PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_spritecollide = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; unsigned int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("spritecollideany", 1); /* "pygame/_sprite.pyx":1667 * * """ * if collided: # <<<<<<<<<<<<<< * for s in group: * if collided(sprite, s): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1667, __pyx_L1_error) if (__pyx_t_1) { /* "pygame/_sprite.pyx":1668 * """ * if collided: * for s in group: # <<<<<<<<<<<<<< * if collided(sprite, s): * return s */ if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_2 = __pyx_v_group; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1668, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1668, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1668, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1668, __pyx_L1_error) #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1668, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "pygame/_sprite.pyx":1669 * if collided: * for s in group: * if collided(sprite, s): # <<<<<<<<<<<<<< * return s * else: */ __Pyx_INCREF(__pyx_v_collided); __pyx_t_6 = __pyx_v_collided; __pyx_t_7 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "pygame/_sprite.pyx":1670 * for s in group: * if collided(sprite, s): * return s # <<<<<<<<<<<<<< * else: * # Special case old behaviour for speed. */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1669 * if collided: * for s in group: * if collided(sprite, s): # <<<<<<<<<<<<<< * return s * else: */ } /* "pygame/_sprite.pyx":1668 * """ * if collided: * for s in group: # <<<<<<<<<<<<<< * if collided(sprite, s): * return s */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1667 * * """ * if collided: # <<<<<<<<<<<<<< * for s in group: * if collided(sprite, s): */ goto __pyx_L3; } /* "pygame/_sprite.pyx":1673 * else: * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< * for s in group: * if spritecollide(s.rect): */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_spritecollide = __pyx_t_5; __pyx_t_5 = 0; /* "pygame/_sprite.pyx":1674 * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect * for s in group: # <<<<<<<<<<<<<< * if spritecollide(s.rect): * return s */ if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_5 = __pyx_v_group; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_5))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1674, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1674, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_4(__pyx_t_5); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1674, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1675 * spritecollide = sprite.rect.colliderect * for s in group: * if spritecollide(s.rect): # <<<<<<<<<<<<<< * return s * return None */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_7 = __pyx_v_spritecollide; __pyx_t_9 = NULL; __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_8 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pygame/_sprite.pyx":1676 * for s in group: * if spritecollide(s.rect): * return s # <<<<<<<<<<<<<< * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pygame/_sprite.pyx":1675 * spritecollide = sprite.rect.colliderect * for s in group: * if spritecollide(s.rect): # <<<<<<<<<<<<<< * return s * return None */ } /* "pygame/_sprite.pyx":1674 * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect * for s in group: # <<<<<<<<<<<<<< * if spritecollide(s.rect): * return s */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; /* "pygame/_sprite.pyx":1677 * if spritecollide(s.rect): * return s * return None # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/_sprite.pyx":1647 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pygame._sprite.spritecollideany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_spritecollide); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup __pyx_vtable_6pygame_7_sprite_AbstractGroup; static PyObject *__pyx_tp_new_6pygame_7_sprite_AbstractGroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_7_sprite_AbstractGroup *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)o); p->__pyx_vtab = __pyx_vtabptr_6pygame_7_sprite_AbstractGroup; p->spritedict = ((PyObject*)Py_None); Py_INCREF(Py_None); p->lostsprites = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pygame_7_sprite_13AbstractGroup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_AbstractGroup *p = (struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->spritedict); Py_CLEAR(p->lostsprites); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_AbstractGroup *p = (struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)o; if (p->spritedict) { e = (*v)(p->spritedict, a); if (e) return e; } if (p->lostsprites) { e = (*v)(p->lostsprites, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_AbstractGroup(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_AbstractGroup *p = (struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)o; tmp = ((PyObject*)p->spritedict); p->spritedict = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->lostsprites); p->lostsprites = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_7_sprite_13AbstractGroup_spritedict(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_13AbstractGroup_spritedict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_10spritedict_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_13AbstractGroup_lostsprites(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_13AbstractGroup_lostsprites(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_11lostsprites_5__del__(o); } } static PyObject *__pyx_specialmethod___pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__(self); } static PyMethodDef __pyx_methods_6pygame_7_sprite_AbstractGroup[] = { {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_11copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_10copy}, {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_17add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_16add}, {"remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_19remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_18remove}, {"has", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_21has, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_20has}, {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_23update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_22update}, {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_25draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_24draw}, {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_26clear}, {"empty", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_29empty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_13AbstractGroup_28empty}, {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, METH_NOARGS|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_AbstractGroup[] = { {(char *)"spritedict", __pyx_getprop_6pygame_7_sprite_13AbstractGroup_spritedict, __pyx_setprop_6pygame_7_sprite_13AbstractGroup_spritedict, (char *)0, 0}, {(char *)"lostsprites", __pyx_getprop_6pygame_7_sprite_13AbstractGroup_lostsprites, __pyx_setprop_6pygame_7_sprite_13AbstractGroup_lostsprites, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_AbstractGroup_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup}, {Py_tp_repr, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__}, {Py_nb_bool, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_31__bool__}, {Py_sq_length, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__}, {Py_sq_contains, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_15__contains__}, {Py_mp_length, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__}, {Py_tp_doc, (void *)PyDoc_STR("base class for containers of sprites\n\n AbstractGroup does everything needed to behave as a normal group. You can\n easily subclass a new group class from this or the other groups below if\n you want to add more features.\n\n Any AbstractGroup-derived sprite groups act like sequences and support\n iteration, len, and so on.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_AbstractGroup}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_AbstractGroup}, {Py_tp_iter, (void *)__pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_AbstractGroup}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_AbstractGroup}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_AbstractGroup}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_AbstractGroup_spec = { "pygame._sprite.AbstractGroup", sizeof(struct __pyx_obj_6pygame_7_sprite_AbstractGroup), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_AbstractGroup_slots, }; #else static PyNumberMethods __pyx_tp_as_number_AbstractGroup = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6pygame_7_sprite_13AbstractGroup_31__bool__, /*nb_bool*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_AbstractGroup = { __pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pygame_7_sprite_13AbstractGroup_15__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_AbstractGroup = { __pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pygame_7_sprite_AbstractGroup = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""AbstractGroup", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_AbstractGroup), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ &__pyx_tp_as_number_AbstractGroup, /*tp_as_number*/ &__pyx_tp_as_sequence_AbstractGroup, /*tp_as_sequence*/ &__pyx_tp_as_mapping_AbstractGroup, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("base class for containers of sprites\n\n AbstractGroup does everything needed to behave as a normal group. You can\n easily subclass a new group class from this or the other groups below if\n you want to add more features.\n\n Any AbstractGroup-derived sprite groups act like sequences and support\n iteration, len, and so on.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_AbstractGroup, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_AbstractGroup, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_AbstractGroup, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_AbstractGroup, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_Sprite __pyx_vtable_6pygame_7_sprite_Sprite; static PyObject *__pyx_tp_new_6pygame_7_sprite_Sprite(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pygame_7_sprite_Sprite *p; PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_6pygame_7_sprite_Sprite *)o); p->__pyx_vtab = __pyx_vtabptr_6pygame_7_sprite_Sprite; p->_Sprite__g = ((PyObject*)Py_None); Py_INCREF(Py_None); p->image = Py_None; Py_INCREF(Py_None); p->rect = ((pgRectObject *)Py_None); Py_INCREF(Py_None); p->__dict__ = PyDict_New(); if (unlikely(!p->__dict__)) goto bad;if (unlikely(__pyx_pw_6pygame_7_sprite_6Sprite_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_7_sprite_Sprite(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_Sprite *p = (struct __pyx_obj_6pygame_7_sprite_Sprite *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_Sprite) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); if (p->__dict__) PyDict_Clear(p->__dict__); Py_CLEAR(p->_Sprite__g); Py_CLEAR(p->image); Py_CLEAR(p->rect); Py_CLEAR(p->__dict__); #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static int __pyx_tp_traverse_6pygame_7_sprite_Sprite(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_Sprite *p = (struct __pyx_obj_6pygame_7_sprite_Sprite *)o; if (p->_Sprite__g) { e = (*v)(p->_Sprite__g, a); if (e) return e; } if (p->image) { e = (*v)(p->image, a); if (e) return e; } if (p->rect) { e = (*v)(((PyObject *)p->rect), a); if (e) return e; } if (p->__dict__) { e = (*v)(p->__dict__, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_Sprite(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_Sprite *p = (struct __pyx_obj_6pygame_7_sprite_Sprite *)o; tmp = ((PyObject*)p->_Sprite__g); p->_Sprite__g = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->image); p->image = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->rect); p->rect = ((pgRectObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__dict__); p->__dict__ = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx___dict__getter_6pygame_7_sprite_Sprite(PyObject *o, CYTHON_UNUSED void *x) { struct __pyx_obj_6pygame_7_sprite_Sprite *p = (struct __pyx_obj_6pygame_7_sprite_Sprite *)o; if (unlikely(!p->__dict__)){ p->__dict__ = PyDict_New(); } Py_XINCREF(p->__dict__); return p->__dict__; } static PyObject *__pyx_getprop_6pygame_7_sprite_6Sprite__Sprite__g(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_6Sprite__Sprite__g(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_6Sprite_10_Sprite__g_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_6Sprite_image(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_6Sprite_5image_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_6Sprite_image(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_6Sprite_5image_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_6Sprite_5image_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_6Sprite_rect(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_6Sprite_4rect_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_6Sprite_rect(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_6Sprite_4rect_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_6Sprite_4rect_5__del__(o); } } static PyObject *__pyx_specialmethod___pyx_pw_6pygame_7_sprite_6Sprite_21__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __pyx_pw_6pygame_7_sprite_6Sprite_21__repr__(self); } static PyMethodDef __pyx_methods_6pygame_7_sprite_Sprite[] = { {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_5add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_4add}, {"remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_7remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_6remove}, {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_13update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_12update}, {"kill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_15kill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_14kill}, {"groups", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_17groups, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_16groups}, {"alive", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_19alive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_6Sprite_18alive}, {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pygame_7_sprite_6Sprite_21__repr__, METH_NOARGS|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_23__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_6Sprite_25__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_Sprite[] = { {(char *)"__dict__", __pyx___dict__getter_6pygame_7_sprite_Sprite, 0, (char *)0, 0}, {(char *)"_Sprite__g", __pyx_getprop_6pygame_7_sprite_6Sprite__Sprite__g, __pyx_setprop_6pygame_7_sprite_6Sprite__Sprite__g, (char *)0, 0}, {(char *)"image", __pyx_getprop_6pygame_7_sprite_6Sprite_image, __pyx_setprop_6pygame_7_sprite_6Sprite_image, (char *)0, 0}, {(char *)"rect", __pyx_getprop_6pygame_7_sprite_6Sprite_rect, __pyx_setprop_6pygame_7_sprite_6Sprite_rect, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static struct PyMemberDef __pyx_tp_members_Sprite[] = { {"__dictoffset__", T_PYSSIZET, offsetof(struct __pyx_obj_6pygame_7_sprite_Sprite, __dict__), READONLY, NULL}, {NULL, 0, 0, 0, NULL} }; static PyType_Slot __pyx_type_6pygame_7_sprite_Sprite_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_Sprite}, {Py_tp_repr, (void *)__pyx_pw_6pygame_7_sprite_6Sprite_21__repr__}, {Py_tp_doc, (void *)PyDoc_STR("simple base class for visible game objects\n\n pygame.sprite.Sprite(*groups): return Sprite\n\n The base class for visible game objects. Derived classes will want to\n override the Sprite.update() method and assign Sprite.image and Sprite.rect\n attributes. The initializer can accept any number of Group instances that\n the Sprite will become a member of.\n\n When subclassing the Sprite class, be sure to call the base initializer\n before adding the Sprite to Groups.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_Sprite}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_Sprite}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_Sprite}, {Py_tp_members, (void *)__pyx_tp_members_Sprite}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_Sprite}, #if !CYTHON_USE_TYPE_SPECS {Py_tp_dictoffset, (void *)offsetof(struct __pyx_obj_6pygame_7_sprite_Sprite, __dict__)}, #endif {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_6Sprite_3__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_Sprite}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_Sprite_spec = { "pygame._sprite.Sprite", sizeof(struct __pyx_obj_6pygame_7_sprite_Sprite), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_Sprite_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_Sprite = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""Sprite", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_Sprite), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_Sprite, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6pygame_7_sprite_6Sprite_21__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("simple base class for visible game objects\n\n pygame.sprite.Sprite(*groups): return Sprite\n\n The base class for visible game objects. Derived classes will want to\n override the Sprite.update() method and assign Sprite.image and Sprite.rect\n attributes. The initializer can accept any number of Group instances that\n the Sprite will become a member of.\n\n When subclassing the Sprite class, be sure to call the base initializer\n before adding the Sprite to Groups.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_Sprite, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_Sprite, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_Sprite, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_Sprite, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS offsetof(struct __pyx_obj_6pygame_7_sprite_Sprite, __dict__), /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_6Sprite_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_Sprite, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_Group __pyx_vtable_6pygame_7_sprite_Group; static PyObject *__pyx_tp_new_6pygame_7_sprite_Group(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_Group *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_AbstractGroup(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_Group *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_Group; return o; } static PyMethodDef __pyx_methods_6pygame_7_sprite_Group[] = { {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_5Group_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_5Group_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_Group_slots[] = { {Py_tp_doc, (void *)PyDoc_STR("container class for many Sprites\n\n pygame.sprite.Group(*sprites): return Group\n\n A simple container for Sprite objects. This class can be subclassed to\n create containers with more specific behaviors. The constructor takes any\n number of Sprite arguments to add to the Group. The group supports the\n following standard Python operations:\n\n in test if a Sprite is contained\n len the number of Sprites contained\n bool test if any Sprites are contained\n iter iterate through all the Sprites\n\n The Sprites in the Group are not ordered, so the Sprites are drawn and\n iterated over in no particular order.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_AbstractGroup}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_AbstractGroup}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_Group}, {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_5Group_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_Group}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_Group_spec = { "pygame._sprite.Group", sizeof(struct __pyx_obj_6pygame_7_sprite_Group), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_Group_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_Group = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""Group", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_Group), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("container class for many Sprites\n\n pygame.sprite.Group(*sprites): return Group\n\n A simple container for Sprite objects. This class can be subclassed to\n create containers with more specific behaviors. The constructor takes any\n number of Sprite arguments to add to the Group. The group supports the\n following standard Python operations:\n\n in test if a Sprite is contained\n len the number of Sprites contained\n bool test if any Sprites are contained\n iter iterate through all the Sprites\n\n The Sprites in the Group are not ordered, so the Sprites are drawn and\n iterated over in no particular order.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_AbstractGroup, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_Group, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_5Group_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_Group, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates __pyx_vtable_6pygame_7_sprite_RenderUpdates; static PyObject *__pyx_tp_new_6pygame_7_sprite_RenderUpdates(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_RenderUpdates *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_Group(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_RenderUpdates *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_RenderUpdates; return o; } static PyMethodDef __pyx_methods_6pygame_7_sprite_RenderUpdates[] = { {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_1draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_RenderUpdates_slots[] = { {Py_tp_doc, (void *)PyDoc_STR("Group class that tracks dirty updates\n\n pygame.sprite.RenderUpdates(*sprites): return RenderUpdates\n\n This class is derived from pygame.sprite.Group(). It has an enhanced draw\n method that tracks the changed areas of the screen.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_AbstractGroup}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_AbstractGroup}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_RenderUpdates}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_RenderUpdates}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_RenderUpdates_spec = { "pygame._sprite.RenderUpdates", sizeof(struct __pyx_obj_6pygame_7_sprite_RenderUpdates), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_RenderUpdates_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_RenderUpdates = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""RenderUpdates", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_RenderUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("Group class that tracks dirty updates\n\n pygame.sprite.RenderUpdates(*sprites): return RenderUpdates\n\n This class is derived from pygame.sprite.Group(). It has an enhanced draw\n method that tracks the changed areas of the screen.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_AbstractGroup, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_RenderUpdates, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_5Group_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_RenderUpdates, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates __pyx_vtable_6pygame_7_sprite_OrderedUpdates; static PyObject *__pyx_tp_new_6pygame_7_sprite_OrderedUpdates(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_RenderUpdates(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_OrderedUpdates; p->_spritelist = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pygame_7_sprite_OrderedUpdates(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *p = (struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_OrderedUpdates) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_spritelist); PyObject_GC_Track(o); __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup(o); } static int __pyx_tp_traverse_6pygame_7_sprite_OrderedUpdates(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *p = (struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)o; e = __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup(o, v, a); if (e) return e; if (p->_spritelist) { e = (*v)(p->_spritelist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_OrderedUpdates(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *p = (struct __pyx_obj_6pygame_7_sprite_OrderedUpdates *)o; __pyx_tp_clear_6pygame_7_sprite_AbstractGroup(o); tmp = ((PyObject*)p->_spritelist); p->_spritelist = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_7_sprite_14OrderedUpdates__spritelist(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_14OrderedUpdates__spritelist(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_14OrderedUpdates_11_spritelist_5__del__(o); } } static PyMethodDef __pyx_methods_6pygame_7_sprite_OrderedUpdates[] = { {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_OrderedUpdates[] = { {(char *)"_spritelist", __pyx_getprop_6pygame_7_sprite_14OrderedUpdates__spritelist, __pyx_setprop_6pygame_7_sprite_14OrderedUpdates__spritelist, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_OrderedUpdates_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_OrderedUpdates}, {Py_tp_doc, (void *)PyDoc_STR("RenderUpdates class that draws Sprites in order of addition\n\n pygame.sprite.OrderedUpdates(*sprites): return OrderedUpdates\n\n This class derives from pygame.sprite.RenderUpdates(). It maintains\n the order in which the Sprites were added to the Group for rendering.\n This makes adding and removing Sprites from the Group a little\n slower than regular Groups.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_OrderedUpdates}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_OrderedUpdates}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_OrderedUpdates}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_OrderedUpdates}, {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_OrderedUpdates}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_OrderedUpdates_spec = { "pygame._sprite.OrderedUpdates", sizeof(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_OrderedUpdates_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_OrderedUpdates = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""OrderedUpdates", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_OrderedUpdates, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("RenderUpdates class that draws Sprites in order of addition\n\n pygame.sprite.OrderedUpdates(*sprites): return OrderedUpdates\n\n This class derives from pygame.sprite.RenderUpdates(). It maintains\n the order in which the Sprites were added to the Group for rendering.\n This makes adding and removing Sprites from the Group a little\n slower than regular Groups.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_OrderedUpdates, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_OrderedUpdates, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_OrderedUpdates, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_OrderedUpdates, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_14OrderedUpdates_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_OrderedUpdates, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates __pyx_vtable_6pygame_7_sprite_LayeredUpdates; static PyObject *__pyx_tp_new_6pygame_7_sprite_LayeredUpdates(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_AbstractGroup(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_LayeredUpdates; p->_spritelayers = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_spritelist = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pygame_7_sprite_14LayeredUpdates_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *p = (struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_spritelayers); Py_CLEAR(p->_spritelist); PyObject_GC_Track(o); __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup(o); } static int __pyx_tp_traverse_6pygame_7_sprite_LayeredUpdates(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *p = (struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)o; e = __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup(o, v, a); if (e) return e; if (p->_spritelayers) { e = (*v)(p->_spritelayers, a); if (e) return e; } if (p->_spritelist) { e = (*v)(p->_spritelist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_LayeredUpdates(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *p = (struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)o; __pyx_tp_clear_6pygame_7_sprite_AbstractGroup(o); tmp = ((PyObject*)p->_spritelayers); p->_spritelayers = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_spritelist); p->_spritelist = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_7_sprite_14LayeredUpdates__spritelayers(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__spritelayers(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_14LayeredUpdates__spritelist(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__spritelist(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_11_spritelist_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_14LayeredUpdates__default_layer(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__default_layer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_14LayeredUpdates_14_default_layer_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pygame_7_sprite_LayeredUpdates[] = { {"add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_7add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_6add}, {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_13draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_12draw}, {"get_sprites_at", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at}, {"get_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_17get_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_16get_sprite}, {"remove_sprites_of_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_layer}, {"layers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_21layers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_20layers}, {"change_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_22change_layer}, {"get_layer_of_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprite}, {"get_top_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_27get_top_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_26get_top_layer}, {"get_bottom_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer}, {"move_to_front", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_31move_to_front, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_30move_to_front}, {"move_to_back", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_33move_to_back, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_32move_to_back}, {"get_top_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite}, {"get_sprites_from_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_layer}, {"switch_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_14LayeredUpdates_38switch_layer}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_LayeredUpdates[] = { {(char *)"_spritelayers", __pyx_getprop_6pygame_7_sprite_14LayeredUpdates__spritelayers, __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__spritelayers, (char *)0, 0}, {(char *)"_spritelist", __pyx_getprop_6pygame_7_sprite_14LayeredUpdates__spritelist, __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__spritelist, (char *)0, 0}, {(char *)"_default_layer", __pyx_getprop_6pygame_7_sprite_14LayeredUpdates__default_layer, __pyx_setprop_6pygame_7_sprite_14LayeredUpdates__default_layer, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_LayeredUpdates_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates}, {Py_tp_doc, (void *)PyDoc_STR("LayeredUpdates Group handles layers, which are drawn like OrderedUpdates\n\n pygame.sprite.LayeredUpdates(*sprites, **kwargs): return LayeredUpdates\n\n This group is fully compatible with pygame.sprite.Sprite.\n New in pygame 1.8.0\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_LayeredUpdates}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_LayeredUpdates}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_LayeredUpdates}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_LayeredUpdates}, {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_3__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_LayeredUpdates}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_LayeredUpdates_spec = { "pygame._sprite.LayeredUpdates", sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_LayeredUpdates_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredUpdates = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""LayeredUpdates", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("LayeredUpdates Group handles layers, which are drawn like OrderedUpdates\n\n pygame.sprite.LayeredUpdates(*sprites, **kwargs): return LayeredUpdates\n\n This group is fully compatible with pygame.sprite.Sprite.\n New in pygame 1.8.0\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_LayeredUpdates, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_LayeredUpdates, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_LayeredUpdates, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_LayeredUpdates, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_14LayeredUpdates_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_LayeredUpdates, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty __pyx_vtable_6pygame_7_sprite_LayeredDirty; static PyObject *__pyx_tp_new_6pygame_7_sprite_LayeredDirty(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_LayeredDirty *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_LayeredUpdates(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_LayeredDirty; p->_clip = ((pgRectObject *)Py_None); Py_INCREF(Py_None); p->_bgd = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pygame_7_sprite_LayeredDirty(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_LayeredDirty *p = (struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_LayeredDirty) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_clip); Py_CLEAR(p->_bgd); PyObject_GC_Track(o); __pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates(o); } static int __pyx_tp_traverse_6pygame_7_sprite_LayeredDirty(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_LayeredDirty *p = (struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)o; e = __pyx_tp_traverse_6pygame_7_sprite_LayeredUpdates(o, v, a); if (e) return e; if (p->_clip) { e = (*v)(((PyObject *)p->_clip), a); if (e) return e; } if (p->_bgd) { e = (*v)(p->_bgd, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_LayeredDirty(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_LayeredDirty *p = (struct __pyx_obj_6pygame_7_sprite_LayeredDirty *)o; __pyx_tp_clear_6pygame_7_sprite_LayeredUpdates(o); tmp = ((PyObject*)p->_clip); p->_clip = ((pgRectObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_bgd); p->_bgd = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_7_sprite_12LayeredDirty__clip(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_12LayeredDirty__clip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_5_clip_5__del__(o); } } static PyObject *__pyx_getprop_6pygame_7_sprite_12LayeredDirty__use_update(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_12LayeredDirty__use_update(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_11_use_update_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_7_sprite_12LayeredDirty__time_threshold(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_12LayeredDirty__time_threshold(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_15_time_threshold_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pygame_7_sprite_12LayeredDirty__bgd(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_12LayeredDirty__bgd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_12LayeredDirty_4_bgd_5__del__(o); } } static PyMethodDef __pyx_methods_6pygame_7_sprite_LayeredDirty[] = { {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_4draw}, {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_6clear}, {"repaint_rect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_9repaint_rect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_8repaint_rect}, {"set_clip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_10set_clip}, {"get_clip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_13get_clip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_12get_clip}, {"change_layer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_14change_layer}, {"set_timing_treshold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold}, {"set_timing_threshold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_7_sprite_12LayeredDirty_18set_timing_threshold}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_LayeredDirty[] = { {(char *)"_clip", __pyx_getprop_6pygame_7_sprite_12LayeredDirty__clip, __pyx_setprop_6pygame_7_sprite_12LayeredDirty__clip, (char *)0, 0}, {(char *)"_use_update", __pyx_getprop_6pygame_7_sprite_12LayeredDirty__use_update, __pyx_setprop_6pygame_7_sprite_12LayeredDirty__use_update, (char *)0, 0}, {(char *)"_time_threshold", __pyx_getprop_6pygame_7_sprite_12LayeredDirty__time_threshold, __pyx_setprop_6pygame_7_sprite_12LayeredDirty__time_threshold, (char *)0, 0}, {(char *)"_bgd", __pyx_getprop_6pygame_7_sprite_12LayeredDirty__bgd, __pyx_setprop_6pygame_7_sprite_12LayeredDirty__bgd, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_LayeredDirty_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_LayeredDirty}, {Py_tp_doc, (void *)PyDoc_STR("LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates\n\n pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty\n\n This group requires pygame.sprite.DirtySprite or any sprite that\n has the following attributes:\n image, rect, dirty, visible, blendmode (see doc of DirtySprite).\n\n It uses the dirty flag technique and is therefore faster than\n pygame.sprite.RenderUpdates if you have many static sprites. It\n also switches automatically between dirty rect updating and full\n screen drawing, so you do no have to worry which would be faster.\n\n As with the pygame.sprite.Group, you can specify some additional attributes\n through kwargs:\n _use_update: True/False (default is False)\n _default_layer: default layer where the sprites without a layer are\n added\n _time_threshold: treshold time for switching between dirty rect mode\n and fullscreen mode; defaults to updating at 80 frames per second,\n which is equal to 1000.0 / 80.0\n\n New in pygame 1.8.0\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_LayeredDirty}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_LayeredDirty}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_LayeredDirty}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_LayeredDirty}, {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_12LayeredDirty_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_LayeredDirty}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_LayeredDirty_spec = { "pygame._sprite.LayeredDirty", sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredDirty), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_LayeredDirty_slots, }; #else static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredDirty = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""LayeredDirty", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredDirty), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_LayeredDirty, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates\n\n pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty\n\n This group requires pygame.sprite.DirtySprite or any sprite that\n has the following attributes:\n image, rect, dirty, visible, blendmode (see doc of DirtySprite).\n\n It uses the dirty flag technique and is therefore faster than\n pygame.sprite.RenderUpdates if you have many static sprites. It\n also switches automatically between dirty rect updating and full\n screen drawing, so you do no have to worry which would be faster.\n\n As with the pygame.sprite.Group, you can specify some additional attributes\n through kwargs:\n _use_update: True/False (default is False)\n _default_layer: default layer where the sprites without a layer are\n added\n _time_threshold: treshold time for switching between dirty rect mode\n and fullscreen mode; defaults to updating at 80 frames per second,\n which is equal to 1000.0 / 80.0\n\n New in pygame 1.8.0\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_LayeredDirty, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_LayeredDirty, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_LayeredDirty, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_LayeredDirty, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_12LayeredDirty_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_LayeredDirty, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle __pyx_vtable_6pygame_7_sprite_GroupSingle; static PyObject *__pyx_tp_new_6pygame_7_sprite_GroupSingle(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pygame_7_sprite_GroupSingle *p; PyObject *o = __pyx_tp_new_6pygame_7_sprite_AbstractGroup(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pygame_7_sprite_GroupSingle *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup*)__pyx_vtabptr_6pygame_7_sprite_GroupSingle; p->_GroupSingle__sprite = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pygame_7_sprite_GroupSingle(PyObject *o) { struct __pyx_obj_6pygame_7_sprite_GroupSingle *p = (struct __pyx_obj_6pygame_7_sprite_GroupSingle *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_7_sprite_GroupSingle) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_GroupSingle__sprite); PyObject_GC_Track(o); __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup(o); } static int __pyx_tp_traverse_6pygame_7_sprite_GroupSingle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pygame_7_sprite_GroupSingle *p = (struct __pyx_obj_6pygame_7_sprite_GroupSingle *)o; e = __pyx_tp_traverse_6pygame_7_sprite_AbstractGroup(o, v, a); if (e) return e; if (p->_GroupSingle__sprite) { e = (*v)(p->_GroupSingle__sprite, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pygame_7_sprite_GroupSingle(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pygame_7_sprite_GroupSingle *p = (struct __pyx_obj_6pygame_7_sprite_GroupSingle *)o; __pyx_tp_clear_6pygame_7_sprite_AbstractGroup(o); tmp = ((PyObject*)p->_GroupSingle__sprite); p->_GroupSingle__sprite = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pygame_7_sprite_11GroupSingle__GroupSingle__sprite(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_1__get__(o); } static int __pyx_setprop_6pygame_7_sprite_11GroupSingle__GroupSingle__sprite(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_3__set__(o, v); } else { return __pyx_pw_6pygame_7_sprite_11GroupSingle_20_GroupSingle__sprite_5__del__(o); } } static PyMethodDef __pyx_methods_6pygame_7_sprite_GroupSingle[] = { {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_3copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"_get_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_11_get_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"_set_sprite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_13_set_sprite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_7_sprite_11GroupSingle_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pygame_7_sprite_GroupSingle[] = { {(char *)"_GroupSingle__sprite", __pyx_getprop_6pygame_7_sprite_11GroupSingle__GroupSingle__sprite, __pyx_setprop_6pygame_7_sprite_11GroupSingle__GroupSingle__sprite, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_7_sprite_GroupSingle_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_7_sprite_GroupSingle}, {Py_nb_bool, (void *)__pyx_pw_6pygame_7_sprite_11GroupSingle_9__bool__}, {Py_sq_contains, (void *)__pyx_pw_6pygame_7_sprite_11GroupSingle_19__contains__}, {Py_tp_doc, (void *)PyDoc_STR("A group container that holds a single most recent item.\n\n This class works just like a regular group, but it only keeps a single\n sprite in the group. Whatever sprite has been added to the group last will\n be the only sprite in the group.\n\n You can access its one sprite as the .sprite attribute. Assigning to this\n attribute will properly remove the old sprite and then add the new one.\n\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_6pygame_7_sprite_GroupSingle}, {Py_tp_clear, (void *)__pyx_tp_clear_6pygame_7_sprite_GroupSingle}, {Py_tp_methods, (void *)__pyx_methods_6pygame_7_sprite_GroupSingle}, {Py_tp_getset, (void *)__pyx_getsets_6pygame_7_sprite_GroupSingle}, {Py_tp_init, (void *)__pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_7_sprite_GroupSingle}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_7_sprite_GroupSingle_spec = { "pygame._sprite.GroupSingle", sizeof(struct __pyx_obj_6pygame_7_sprite_GroupSingle), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_6pygame_7_sprite_GroupSingle_slots, }; #else static PyNumberMethods __pyx_tp_as_number_GroupSingle = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6pygame_7_sprite_11GroupSingle_9__bool__, /*nb_bool*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_GroupSingle = { #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_33__len__, /*sq_length*/ #else 0, /*sq_length*/ #endif 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pygame_7_sprite_11GroupSingle_19__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyTypeObject __pyx_type_6pygame_7_sprite_GroupSingle = { PyVarObject_HEAD_INIT(0, 0) "pygame._sprite.""GroupSingle", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_7_sprite_GroupSingle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_GroupSingle, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_35__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif &__pyx_tp_as_number_GroupSingle, /*tp_as_number*/ &__pyx_tp_as_sequence_GroupSingle, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("A group container that holds a single most recent item.\n\n This class works just like a regular group, but it only keeps a single\n sprite in the group. Whatever sprite has been added to the group last will\n be the only sprite in the group.\n\n You can access its one sprite as the .sprite attribute. Assigning to this\n attribute will properly remove the old sprite and then add the new one.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pygame_7_sprite_GroupSingle, /*tp_traverse*/ __pyx_tp_clear_6pygame_7_sprite_GroupSingle, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY || 0 __pyx_pw_6pygame_7_sprite_13AbstractGroup_13__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6pygame_7_sprite_GroupSingle, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pygame_7_sprite_GroupSingle, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_7_sprite_GroupSingle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_A_callable_class_that_checks_for, __pyx_k_A_callable_class_that_checks_for, sizeof(__pyx_k_A_callable_class_that_checks_for), 0, 0, 1, 0}, {&__pyx_n_s_AbstractGroup, __pyx_k_AbstractGroup, sizeof(__pyx_k_AbstractGroup), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup___reduce_cython, __pyx_k_AbstractGroup___reduce_cython, sizeof(__pyx_k_AbstractGroup___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup___setstate_cython, __pyx_k_AbstractGroup___setstate_cython, sizeof(__pyx_k_AbstractGroup___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_add, __pyx_k_AbstractGroup_add, sizeof(__pyx_k_AbstractGroup_add), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_add_internal, __pyx_k_AbstractGroup_add_internal, sizeof(__pyx_k_AbstractGroup_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_clear, __pyx_k_AbstractGroup_clear, sizeof(__pyx_k_AbstractGroup_clear), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_copy, __pyx_k_AbstractGroup_copy, sizeof(__pyx_k_AbstractGroup_copy), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_draw, __pyx_k_AbstractGroup_draw, sizeof(__pyx_k_AbstractGroup_draw), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_empty, __pyx_k_AbstractGroup_empty, sizeof(__pyx_k_AbstractGroup_empty), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_has, __pyx_k_AbstractGroup_has, sizeof(__pyx_k_AbstractGroup_has), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_has_internal, __pyx_k_AbstractGroup_has_internal, sizeof(__pyx_k_AbstractGroup_has_internal), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_remove, __pyx_k_AbstractGroup_remove, sizeof(__pyx_k_AbstractGroup_remove), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_remove_internal, __pyx_k_AbstractGroup_remove_internal, sizeof(__pyx_k_AbstractGroup_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_sprites, __pyx_k_AbstractGroup_sprites, sizeof(__pyx_k_AbstractGroup_sprites), 0, 0, 1, 1}, {&__pyx_n_s_AbstractGroup_update, __pyx_k_AbstractGroup_update, sizeof(__pyx_k_AbstractGroup_update), 0, 0, 1, 1}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite, __pyx_k_DirtySprite, sizeof(__pyx_k_DirtySprite), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite___init, __pyx_k_DirtySprite___init, sizeof(__pyx_k_DirtySprite___init), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite___repr, __pyx_k_DirtySprite___repr, sizeof(__pyx_k_DirtySprite___repr), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite__get_visible, __pyx_k_DirtySprite__get_visible, sizeof(__pyx_k_DirtySprite__get_visible), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite__set_visible, __pyx_k_DirtySprite__set_visible, sizeof(__pyx_k_DirtySprite__set_visible), 0, 0, 1, 1}, {&__pyx_n_s_DirtySprite_lambda, __pyx_k_DirtySprite_lambda, sizeof(__pyx_k_DirtySprite_lambda), 0, 0, 1, 1}, {&__pyx_n_s_Group, __pyx_k_Group, sizeof(__pyx_k_Group), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle, __pyx_k_GroupSingle, sizeof(__pyx_k_GroupSingle), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle___reduce_cython, __pyx_k_GroupSingle___reduce_cython, sizeof(__pyx_k_GroupSingle___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle___setstate_cython, __pyx_k_GroupSingle___setstate_cython, sizeof(__pyx_k_GroupSingle___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle__get_sprite, __pyx_k_GroupSingle__get_sprite, sizeof(__pyx_k_GroupSingle__get_sprite), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle__set_sprite, __pyx_k_GroupSingle__set_sprite, sizeof(__pyx_k_GroupSingle__set_sprite), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle_add_internal, __pyx_k_GroupSingle_add_internal, sizeof(__pyx_k_GroupSingle_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle_copy, __pyx_k_GroupSingle_copy, sizeof(__pyx_k_GroupSingle_copy), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle_has_internal, __pyx_k_GroupSingle_has_internal, sizeof(__pyx_k_GroupSingle_has_internal), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle_remove_internal, __pyx_k_GroupSingle_remove_internal, sizeof(__pyx_k_GroupSingle_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_GroupSingle_sprites, __pyx_k_GroupSingle_sprites, sizeof(__pyx_k_GroupSingle_sprites), 0, 0, 1, 1}, {&__pyx_n_s_Group___reduce_cython, __pyx_k_Group___reduce_cython, sizeof(__pyx_k_Group___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Group___setstate_cython, __pyx_k_Group___setstate_cython, sizeof(__pyx_k_Group___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty, __pyx_k_LayeredDirty, sizeof(__pyx_k_LayeredDirty), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty___reduce_cython, __pyx_k_LayeredDirty___reduce_cython, sizeof(__pyx_k_LayeredDirty___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty___setstate_cython, __pyx_k_LayeredDirty___setstate_cython, sizeof(__pyx_k_LayeredDirty___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_add_internal, __pyx_k_LayeredDirty_add_internal, sizeof(__pyx_k_LayeredDirty_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_change_layer, __pyx_k_LayeredDirty_change_layer, sizeof(__pyx_k_LayeredDirty_change_layer), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_clear, __pyx_k_LayeredDirty_clear, sizeof(__pyx_k_LayeredDirty_clear), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_draw, __pyx_k_LayeredDirty_draw, sizeof(__pyx_k_LayeredDirty_draw), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_get_clip, __pyx_k_LayeredDirty_get_clip, sizeof(__pyx_k_LayeredDirty_get_clip), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_repaint_rect, __pyx_k_LayeredDirty_repaint_rect, sizeof(__pyx_k_LayeredDirty_repaint_rect), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_set_clip, __pyx_k_LayeredDirty_set_clip, sizeof(__pyx_k_LayeredDirty_set_clip), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_set_timing_threshol, __pyx_k_LayeredDirty_set_timing_threshol, sizeof(__pyx_k_LayeredDirty_set_timing_threshol), 0, 0, 1, 1}, {&__pyx_n_s_LayeredDirty_set_timing_treshold, __pyx_k_LayeredDirty_set_timing_treshold, sizeof(__pyx_k_LayeredDirty_set_timing_treshold), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates, __pyx_k_LayeredUpdates, sizeof(__pyx_k_LayeredUpdates), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates___reduce_cython, __pyx_k_LayeredUpdates___reduce_cython, sizeof(__pyx_k_LayeredUpdates___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates___setstate_cython, __pyx_k_LayeredUpdates___setstate_cython, sizeof(__pyx_k_LayeredUpdates___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_add, __pyx_k_LayeredUpdates_add, sizeof(__pyx_k_LayeredUpdates_add), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_add_internal, __pyx_k_LayeredUpdates_add_internal, sizeof(__pyx_k_LayeredUpdates_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_change_layer, __pyx_k_LayeredUpdates_change_layer, sizeof(__pyx_k_LayeredUpdates_change_layer), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_draw, __pyx_k_LayeredUpdates_draw, sizeof(__pyx_k_LayeredUpdates_draw), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_bottom_layer, __pyx_k_LayeredUpdates_get_bottom_layer, sizeof(__pyx_k_LayeredUpdates_get_bottom_layer), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_layer_of_spri, __pyx_k_LayeredUpdates_get_layer_of_spri, sizeof(__pyx_k_LayeredUpdates_get_layer_of_spri), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_sprite, __pyx_k_LayeredUpdates_get_sprite, sizeof(__pyx_k_LayeredUpdates_get_sprite), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_sprites_at, __pyx_k_LayeredUpdates_get_sprites_at, sizeof(__pyx_k_LayeredUpdates_get_sprites_at), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_sprites_from, __pyx_k_LayeredUpdates_get_sprites_from, sizeof(__pyx_k_LayeredUpdates_get_sprites_from), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_top_layer, __pyx_k_LayeredUpdates_get_top_layer, sizeof(__pyx_k_LayeredUpdates_get_top_layer), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_get_top_sprite, __pyx_k_LayeredUpdates_get_top_sprite, sizeof(__pyx_k_LayeredUpdates_get_top_sprite), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_layers, __pyx_k_LayeredUpdates_layers, sizeof(__pyx_k_LayeredUpdates_layers), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_move_to_back, __pyx_k_LayeredUpdates_move_to_back, sizeof(__pyx_k_LayeredUpdates_move_to_back), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_move_to_front, __pyx_k_LayeredUpdates_move_to_front, sizeof(__pyx_k_LayeredUpdates_move_to_front), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_remove_internal, __pyx_k_LayeredUpdates_remove_internal, sizeof(__pyx_k_LayeredUpdates_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_remove_sprites_of, __pyx_k_LayeredUpdates_remove_sprites_of, sizeof(__pyx_k_LayeredUpdates_remove_sprites_of), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_sprites, __pyx_k_LayeredUpdates_sprites, sizeof(__pyx_k_LayeredUpdates_sprites), 0, 0, 1, 1}, {&__pyx_n_s_LayeredUpdates_switch_layer, __pyx_k_LayeredUpdates_switch_layer, sizeof(__pyx_k_LayeredUpdates_switch_layer), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates, __pyx_k_OrderedUpdates, sizeof(__pyx_k_OrderedUpdates), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates___reduce_cython, __pyx_k_OrderedUpdates___reduce_cython, sizeof(__pyx_k_OrderedUpdates___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates___setstate_cython, __pyx_k_OrderedUpdates___setstate_cython, sizeof(__pyx_k_OrderedUpdates___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates_add_internal, __pyx_k_OrderedUpdates_add_internal, sizeof(__pyx_k_OrderedUpdates_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates_remove_internal, __pyx_k_OrderedUpdates_remove_internal, sizeof(__pyx_k_OrderedUpdates_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_OrderedUpdates_sprites, __pyx_k_OrderedUpdates_sprites, sizeof(__pyx_k_OrderedUpdates_sprites), 0, 0, 1, 1}, {&__pyx_n_s_Rect, __pyx_k_Rect, sizeof(__pyx_k_Rect), 0, 0, 1, 1}, {&__pyx_n_s_RenderClear, __pyx_k_RenderClear, sizeof(__pyx_k_RenderClear), 0, 0, 1, 1}, {&__pyx_n_s_RenderPlain, __pyx_k_RenderPlain, sizeof(__pyx_k_RenderPlain), 0, 0, 1, 1}, {&__pyx_n_s_RenderUpdates, __pyx_k_RenderUpdates, sizeof(__pyx_k_RenderUpdates), 0, 0, 1, 1}, {&__pyx_n_s_RenderUpdates___reduce_cython, __pyx_k_RenderUpdates___reduce_cython, sizeof(__pyx_k_RenderUpdates___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_RenderUpdates___setstate_cython, __pyx_k_RenderUpdates___setstate_cython, sizeof(__pyx_k_RenderUpdates___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_RenderUpdates_draw, __pyx_k_RenderUpdates_draw, sizeof(__pyx_k_RenderUpdates_draw), 0, 0, 1, 1}, {&__pyx_n_s_SC, __pyx_k_SC, sizeof(__pyx_k_SC), 0, 0, 1, 1}, {&__pyx_n_s_Sprite, __pyx_k_Sprite, sizeof(__pyx_k_Sprite), 0, 0, 1, 1}, {&__pyx_n_s_Sprite___reduce_cython, __pyx_k_Sprite___reduce_cython, sizeof(__pyx_k_Sprite___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Sprite___setstate_cython, __pyx_k_Sprite___setstate_cython, sizeof(__pyx_k_Sprite___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_add, __pyx_k_Sprite_add, sizeof(__pyx_k_Sprite_add), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_add_internal, __pyx_k_Sprite_add_internal, sizeof(__pyx_k_Sprite_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_alive, __pyx_k_Sprite_alive, sizeof(__pyx_k_Sprite_alive), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_groups, __pyx_k_Sprite_groups, sizeof(__pyx_k_Sprite_groups), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_kill, __pyx_k_Sprite_kill, sizeof(__pyx_k_Sprite_kill), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_remove, __pyx_k_Sprite_remove, sizeof(__pyx_k_Sprite_remove), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_remove_internal, __pyx_k_Sprite_remove_internal, sizeof(__pyx_k_Sprite_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_Sprite_update, __pyx_k_Sprite_update, sizeof(__pyx_k_Sprite_update), 0, 0, 1, 1}, {&__pyx_kp_s_The_sprite_contained_in_this_gro, __pyx_k_The_sprite_contained_in_this_gro, sizeof(__pyx_k_The_sprite_contained_in_this_gro), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s__135, __pyx_k__135, sizeof(__pyx_k__135), 0, 0, 1, 1}, {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1}, {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, {&__pyx_kp_s_a_more_featureful_subclass_of_Sp, __pyx_k_a_more_featureful_subclass_of_Sp, sizeof(__pyx_k_a_more_featureful_subclass_of_Sp), 0, 0, 1, 0}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_add_internal, __pyx_k_add_internal, sizeof(__pyx_k_add_internal), 0, 0, 1, 1}, {&__pyx_n_s_alive, __pyx_k_alive, sizeof(__pyx_k_alive), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_bgd, __pyx_k_bgd, sizeof(__pyx_k_bgd), 0, 0, 1, 1}, {&__pyx_n_s_bgd_2, __pyx_k_bgd_2, sizeof(__pyx_k_bgd_2), 0, 0, 1, 1}, {&__pyx_n_s_blendmode, __pyx_k_blendmode, sizeof(__pyx_k_blendmode), 0, 0, 1, 1}, {&__pyx_n_s_blit, __pyx_k_blit, sizeof(__pyx_k_blit), 0, 0, 1, 1}, {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, {&__pyx_n_s_callable, __pyx_k_callable, sizeof(__pyx_k_callable), 0, 0, 1, 1}, {&__pyx_n_s_centerx, __pyx_k_centerx, sizeof(__pyx_k_centerx), 0, 0, 1, 1}, {&__pyx_n_s_centery, __pyx_k_centery, sizeof(__pyx_k_centery), 0, 0, 1, 1}, {&__pyx_n_s_change_layer, __pyx_k_change_layer, sizeof(__pyx_k_change_layer), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1}, {&__pyx_n_s_clip_2, __pyx_k_clip_2, sizeof(__pyx_k_clip_2), 0, 0, 1, 1}, {&__pyx_n_s_collide_circle, __pyx_k_collide_circle, sizeof(__pyx_k_collide_circle), 0, 0, 1, 1}, {&__pyx_n_s_collide_circle_ratio, __pyx_k_collide_circle_ratio, sizeof(__pyx_k_collide_circle_ratio), 0, 0, 1, 1}, {&__pyx_n_s_collide_circle_ratio___call, __pyx_k_collide_circle_ratio___call, sizeof(__pyx_k_collide_circle_ratio___call), 0, 0, 1, 1}, {&__pyx_n_s_collide_circle_ratio___init, __pyx_k_collide_circle_ratio___init, sizeof(__pyx_k_collide_circle_ratio___init), 0, 0, 1, 1}, {&__pyx_n_s_collide_mask, __pyx_k_collide_mask, sizeof(__pyx_k_collide_mask), 0, 0, 1, 1}, {&__pyx_n_s_collide_rect, __pyx_k_collide_rect, sizeof(__pyx_k_collide_rect), 0, 0, 1, 1}, {&__pyx_n_s_collide_rect_ratio, __pyx_k_collide_rect_ratio, sizeof(__pyx_k_collide_rect_ratio), 0, 0, 1, 1}, {&__pyx_n_s_collide_rect_ratio___call, __pyx_k_collide_rect_ratio___call, sizeof(__pyx_k_collide_rect_ratio___call), 0, 0, 1, 1}, {&__pyx_n_s_collide_rect_ratio___init, __pyx_k_collide_rect_ratio___init, sizeof(__pyx_k_collide_rect_ratio___init), 0, 0, 1, 1}, {&__pyx_n_s_collided, __pyx_k_collided, sizeof(__pyx_k_collided), 0, 0, 1, 1}, {&__pyx_n_s_collidelist, __pyx_k_collidelist, sizeof(__pyx_k_collidelist), 0, 0, 1, 1}, {&__pyx_n_s_collidelistall, __pyx_k_collidelistall, sizeof(__pyx_k_collidelistall), 0, 0, 1, 1}, {&__pyx_n_s_colliderect, __pyx_k_colliderect, sizeof(__pyx_k_colliderect), 0, 0, 1, 1}, {&__pyx_n_s_colliding, __pyx_k_colliding, sizeof(__pyx_k_colliding), 0, 0, 1, 1}, {&__pyx_n_s_colliding_idx, __pyx_k_colliding_idx, sizeof(__pyx_k_colliding_idx), 0, 0, 1, 1}, {&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1}, {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_n_s_crashed, __pyx_k_crashed, sizeof(__pyx_k_crashed), 0, 0, 1, 1}, {&__pyx_n_s_default_layer, __pyx_k_default_layer, sizeof(__pyx_k_default_layer), 0, 0, 1, 1}, {&__pyx_n_s_default_layer_2, __pyx_k_default_layer_2, sizeof(__pyx_k_default_layer_2), 0, 0, 1, 1}, {&__pyx_kp_s_detect_collision_between_two_spr, __pyx_k_detect_collision_between_two_spr, sizeof(__pyx_k_detect_collision_between_two_spr), 0, 0, 1, 0}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_dirty, __pyx_k_dirty, sizeof(__pyx_k_dirty), 0, 0, 1, 1}, {&__pyx_n_s_dirty_append, __pyx_k_dirty_append, sizeof(__pyx_k_dirty_append), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_display, __pyx_k_display, sizeof(__pyx_k_display), 0, 0, 1, 1}, {&__pyx_n_s_distancesquared, __pyx_k_distancesquared, sizeof(__pyx_k_distancesquared), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_doc_2, __pyx_k_doc_2, sizeof(__pyx_k_doc_2), 0, 0, 1, 1}, {&__pyx_n_s_dokill, __pyx_k_dokill, sizeof(__pyx_k_dokill), 0, 0, 1, 1}, {&__pyx_n_s_dokilla, __pyx_k_dokilla, sizeof(__pyx_k_dokilla), 0, 0, 1, 1}, {&__pyx_n_s_dokillb, __pyx_k_dokillb, sizeof(__pyx_k_dokillb), 0, 0, 1, 1}, {&__pyx_n_s_draw, __pyx_k_draw, sizeof(__pyx_k_draw), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_end_time, __pyx_k_end_time, sizeof(__pyx_k_end_time), 0, 0, 1, 1}, {&__pyx_n_s_from_surface, __pyx_k_from_surface, sizeof(__pyx_k_from_surface), 0, 0, 1, 1}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_bottom_layer, __pyx_k_get_bottom_layer, sizeof(__pyx_k_get_bottom_layer), 0, 0, 1, 1}, {&__pyx_n_s_get_clip, __pyx_k_get_clip, sizeof(__pyx_k_get_clip), 0, 0, 1, 1}, {&__pyx_n_s_get_layer_of_sprite, __pyx_k_get_layer_of_sprite, sizeof(__pyx_k_get_layer_of_sprite), 0, 0, 1, 1}, {&__pyx_n_s_get_rect, __pyx_k_get_rect, sizeof(__pyx_k_get_rect), 0, 0, 1, 1}, {&__pyx_n_s_get_sprite, __pyx_k_get_sprite, sizeof(__pyx_k_get_sprite), 0, 0, 1, 1}, {&__pyx_n_s_get_sprite_2, __pyx_k_get_sprite_2, sizeof(__pyx_k_get_sprite_2), 0, 0, 1, 1}, {&__pyx_n_s_get_sprites_at, __pyx_k_get_sprites_at, sizeof(__pyx_k_get_sprites_at), 0, 0, 1, 1}, {&__pyx_n_s_get_sprites_from_layer, __pyx_k_get_sprites_from_layer, sizeof(__pyx_k_get_sprites_from_layer), 0, 0, 1, 1}, {&__pyx_n_s_get_surface, __pyx_k_get_surface, sizeof(__pyx_k_get_surface), 0, 0, 1, 1}, {&__pyx_n_s_get_ticks, __pyx_k_get_ticks, sizeof(__pyx_k_get_ticks), 0, 0, 1, 1}, {&__pyx_n_s_get_top_layer, __pyx_k_get_top_layer, sizeof(__pyx_k_get_top_layer), 0, 0, 1, 1}, {&__pyx_n_s_get_top_sprite, __pyx_k_get_top_sprite, sizeof(__pyx_k_get_top_sprite), 0, 0, 1, 1}, {&__pyx_n_s_get_visible, __pyx_k_get_visible, sizeof(__pyx_k_get_visible), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1}, {&__pyx_n_s_groupa, __pyx_k_groupa, sizeof(__pyx_k_groupa), 0, 0, 1, 1}, {&__pyx_n_s_groupb, __pyx_k_groupb, sizeof(__pyx_k_groupb), 0, 0, 1, 1}, {&__pyx_n_s_groupcollide, __pyx_k_groupcollide, sizeof(__pyx_k_groupcollide), 0, 0, 1, 1}, {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1}, {&__pyx_n_s_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 0, 1, 1}, {&__pyx_n_s_has_internal, __pyx_k_has_internal, sizeof(__pyx_k_has_internal), 0, 0, 1, 1}, {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1}, {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_inflate, __pyx_k_inflate, sizeof(__pyx_k_inflate), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_init_rect, __pyx_k_init_rect, sizeof(__pyx_k_init_rect), 0, 0, 1, 1}, {&__pyx_n_s_init_rect_2, __pyx_k_init_rect_2, sizeof(__pyx_k_init_rect_2), 0, 0, 1, 1}, {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_kill, __pyx_k_kill, sizeof(__pyx_k_kill), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1}, {&__pyx_n_s_layer, __pyx_k_layer, sizeof(__pyx_k_layer), 0, 0, 1, 1}, {&__pyx_n_s_layer1_nr, __pyx_k_layer1_nr, sizeof(__pyx_k_layer1_nr), 0, 0, 1, 1}, {&__pyx_n_s_layer2_nr, __pyx_k_layer2_nr, sizeof(__pyx_k_layer2_nr), 0, 0, 1, 1}, {&__pyx_n_s_layer_2, __pyx_k_layer_2, sizeof(__pyx_k_layer_2), 0, 0, 1, 1}, {&__pyx_n_s_layer_nr, __pyx_k_layer_nr, sizeof(__pyx_k_layer_nr), 0, 0, 1, 1}, {&__pyx_n_s_layers, __pyx_k_layers, sizeof(__pyx_k_layers), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_leftmask, __pyx_k_leftmask, sizeof(__pyx_k_leftmask), 0, 0, 1, 1}, {&__pyx_n_s_leftradius, __pyx_k_leftradius, sizeof(__pyx_k_leftradius), 0, 0, 1, 1}, {&__pyx_n_s_leftrect, __pyx_k_leftrect, sizeof(__pyx_k_leftrect), 0, 0, 1, 1}, {&__pyx_n_s_leng, __pyx_k_leng, sizeof(__pyx_k_leng), 0, 0, 1, 1}, {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_mid, __pyx_k_mid, sizeof(__pyx_k_mid), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_move_to_back, __pyx_k_move_to_back, sizeof(__pyx_k_move_to_back), 0, 0, 1, 1}, {&__pyx_n_s_move_to_front, __pyx_k_move_to_front, sizeof(__pyx_k_move_to_front), 0, 0, 1, 1}, {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_new_layer, __pyx_k_new_layer, sizeof(__pyx_k_new_layer), 0, 0, 1, 1}, {&__pyx_n_s_newrect, __pyx_k_newrect, sizeof(__pyx_k_newrect), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_old_rect, __pyx_k_old_rect, sizeof(__pyx_k_old_rect), 0, 0, 1, 1}, {&__pyx_n_s_orig_clip, __pyx_k_orig_clip, sizeof(__pyx_k_orig_clip), 0, 0, 1, 1}, {&__pyx_n_s_overlap, __pyx_k_overlap, sizeof(__pyx_k_overlap), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_pygame, __pyx_k_pygame, sizeof(__pyx_k_pygame), 0, 0, 1, 1}, {&__pyx_n_s_pygame__sprite, __pyx_k_pygame__sprite, sizeof(__pyx_k_pygame__sprite), 0, 0, 1, 1}, {&__pyx_n_s_pygame_mask, __pyx_k_pygame_mask, sizeof(__pyx_k_pygame_mask), 0, 0, 1, 1}, {&__pyx_n_s_pygame_time, __pyx_k_pygame_time, sizeof(__pyx_k_pygame_time), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1}, {&__pyx_n_s_ratio, __pyx_k_ratio, sizeof(__pyx_k_ratio), 0, 0, 1, 1}, {&__pyx_n_s_rec, __pyx_k_rec, sizeof(__pyx_k_rec), 0, 0, 1, 1}, {&__pyx_n_s_rect, __pyx_k_rect, sizeof(__pyx_k_rect), 0, 0, 1, 1}, {&__pyx_n_s_rect_2, __pyx_k_rect_2, sizeof(__pyx_k_rect_2), 0, 0, 1, 1}, {&__pyx_n_s_rect_offset_x, __pyx_k_rect_offset_x, sizeof(__pyx_k_rect_offset_x), 0, 0, 1, 1}, {&__pyx_n_s_rect_offset_y, __pyx_k_rect_offset_y, sizeof(__pyx_k_rect_offset_y), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_remove_internal, __pyx_k_remove_internal, sizeof(__pyx_k_remove_internal), 0, 0, 1, 1}, {&__pyx_n_s_remove_sprites_of_layer, __pyx_k_remove_sprites_of_layer, sizeof(__pyx_k_remove_sprites_of_layer), 0, 0, 1, 1}, {&__pyx_n_s_repaint_rect, __pyx_k_repaint_rect, sizeof(__pyx_k_repaint_rect), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_ret_2, __pyx_k_ret_2, sizeof(__pyx_k_ret_2), 0, 0, 1, 1}, {&__pyx_n_s_return_value, __pyx_k_return_value, sizeof(__pyx_k_return_value), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_rightmask, __pyx_k_rightmask, sizeof(__pyx_k_rightmask), 0, 0, 1, 1}, {&__pyx_n_s_rightradius, __pyx_k_rightradius, sizeof(__pyx_k_rightradius), 0, 0, 1, 1}, {&__pyx_n_s_rightrect, __pyx_k_rightrect, sizeof(__pyx_k_rightrect), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_kp_s_s_DirtySprite_in_d_groups, __pyx_k_s_DirtySprite_in_d_groups, sizeof(__pyx_k_s_DirtySprite_in_d_groups), 0, 0, 1, 0}, {&__pyx_kp_s_s_d_sprites, __pyx_k_s_d_sprites, sizeof(__pyx_k_s_d_sprites), 0, 0, 1, 0}, {&__pyx_kp_s_s_sprite_in_d_groups, __pyx_k_s_sprite_in_d_groups, sizeof(__pyx_k_s_sprite_in_d_groups), 0, 0, 1, 0}, {&__pyx_n_s_screen_rect, __pyx_k_screen_rect, sizeof(__pyx_k_screen_rect), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_set_clip, __pyx_k_set_clip, sizeof(__pyx_k_set_clip), 0, 0, 1, 1}, {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, {&__pyx_n_s_set_sprite, __pyx_k_set_sprite, sizeof(__pyx_k_set_sprite), 0, 0, 1, 1}, {&__pyx_n_s_set_timing_threshold, __pyx_k_set_timing_threshold, sizeof(__pyx_k_set_timing_threshold), 0, 0, 1, 1}, {&__pyx_n_s_set_timing_treshold, __pyx_k_set_timing_treshold, sizeof(__pyx_k_set_timing_treshold), 0, 0, 1, 1}, {&__pyx_n_s_set_visible, __pyx_k_set_visible, sizeof(__pyx_k_set_visible), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_source_rect, __pyx_k_source_rect, sizeof(__pyx_k_source_rect), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_n_s_spr, __pyx_k_spr, sizeof(__pyx_k_spr), 0, 0, 1, 1}, {&__pyx_n_s_spr_rect, __pyx_k_spr_rect, sizeof(__pyx_k_spr_rect), 0, 0, 1, 1}, {&__pyx_n_s_spr_rect_clip, __pyx_k_spr_rect_clip, sizeof(__pyx_k_spr_rect_clip), 0, 0, 1, 1}, {&__pyx_n_s_sprite, __pyx_k_sprite, sizeof(__pyx_k_sprite), 0, 0, 1, 1}, {&__pyx_n_s_sprite_layers, __pyx_k_sprite_layers, sizeof(__pyx_k_sprite_layers), 0, 0, 1, 1}, {&__pyx_n_s_spritecollide, __pyx_k_spritecollide, sizeof(__pyx_k_spritecollide), 0, 0, 1, 1}, {&__pyx_n_s_spritecollideany, __pyx_k_spritecollideany, sizeof(__pyx_k_spritecollideany), 0, 0, 1, 1}, {&__pyx_n_s_spritedict, __pyx_k_spritedict, sizeof(__pyx_k_spritedict), 0, 0, 1, 1}, {&__pyx_n_s_spritegroup, __pyx_k_spritegroup, sizeof(__pyx_k_spritegroup), 0, 0, 1, 1}, {&__pyx_n_s_sprites, __pyx_k_sprites, sizeof(__pyx_k_sprites), 0, 0, 1, 1}, {&__pyx_n_s_sprites1, __pyx_k_sprites1, sizeof(__pyx_k_sprites1), 0, 0, 1, 1}, {&__pyx_n_s_sprites_2, __pyx_k_sprites_2, sizeof(__pyx_k_sprites_2), 0, 0, 1, 1}, {&__pyx_n_s_sprites_append, __pyx_k_sprites_append, sizeof(__pyx_k_sprites_append), 0, 0, 1, 1}, {&__pyx_n_s_sprites_layers, __pyx_k_sprites_layers, sizeof(__pyx_k_sprites_layers), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_k_src_c_cython_pygame__sprite_pyx, sizeof(__pyx_k_src_c_cython_pygame__sprite_pyx), 0, 0, 1, 0}, {&__pyx_n_s_start_time, __pyx_k_start_time, sizeof(__pyx_k_start_time), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_surf, __pyx_k_surf, sizeof(__pyx_k_surf), 0, 0, 1, 1}, {&__pyx_n_s_surf_blit, __pyx_k_surf_blit, sizeof(__pyx_k_surf_blit), 0, 0, 1, 1}, {&__pyx_n_s_surface, __pyx_k_surface, sizeof(__pyx_k_surface), 0, 0, 1, 1}, {&__pyx_n_s_surface_blit, __pyx_k_surface_blit, sizeof(__pyx_k_surface_blit), 0, 0, 1, 1}, {&__pyx_n_s_switch_layer, __pyx_k_switch_layer, sizeof(__pyx_k_switch_layer), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_time_ms, __pyx_k_time_ms, sizeof(__pyx_k_time_ms), 0, 0, 1, 1}, {&__pyx_n_s_time_threshold, __pyx_k_time_threshold, sizeof(__pyx_k_time_threshold), 0, 0, 1, 1}, {&__pyx_n_s_topleft, __pyx_k_topleft, sizeof(__pyx_k_topleft), 0, 0, 1, 1}, {&__pyx_n_s_union, __pyx_k_union, sizeof(__pyx_k_union), 0, 0, 1, 1}, {&__pyx_n_s_union_ip, __pyx_k_union_ip, sizeof(__pyx_k_union_ip), 0, 0, 1, 1}, {&__pyx_n_s_union_rect, __pyx_k_union_rect, sizeof(__pyx_k_union_rect), 0, 0, 1, 1}, {&__pyx_n_s_union_rect_collidelist, __pyx_k_union_rect_collidelist, sizeof(__pyx_k_union_rect_collidelist), 0, 0, 1, 1}, {&__pyx_n_s_union_rect_union_ip, __pyx_k_union_rect_union_ip, sizeof(__pyx_k_union_rect_union_ip), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_update_2, __pyx_k_update_2, sizeof(__pyx_k_update_2), 0, 0, 1, 1}, {&__pyx_n_s_update_append, __pyx_k_update_append, sizeof(__pyx_k_update_append), 0, 0, 1, 1}, {&__pyx_n_s_use_update, __pyx_k_use_update, sizeof(__pyx_k_use_update), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_visible, __pyx_k_visible, sizeof(__pyx_k_visible), 0, 0, 1, 1}, {&__pyx_n_s_visible_2, __pyx_k_visible_2, sizeof(__pyx_k_visible_2), 0, 0, 1, 1}, {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, {&__pyx_n_s_xdistance, __pyx_k_xdistance, sizeof(__pyx_k_xdistance), 0, 0, 1, 1}, {&__pyx_n_s_xoffset, __pyx_k_xoffset, sizeof(__pyx_k_xoffset), 0, 0, 1, 1}, {&__pyx_n_s_ydistance, __pyx_k_ydistance, sizeof(__pyx_k_ydistance), 0, 0, 1, 1}, {&__pyx_n_s_yoffset, __pyx_k_yoffset, sizeof(__pyx_k_yoffset), 0, 0, 1, 1}, {&__pyx_kp_s_you_can_make_this_sprite_disappe, __pyx_k_you_can_make_this_sprite_disappe, sizeof(__pyx_k_you_can_make_this_sprite_disappe), 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 303, __pyx_L1_error) __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1478, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 399, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pygame/_sprite.pyx":842 * """ * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) # <<<<<<<<<<<<<< * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] */ __pyx_tuple_ = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pygame/_sprite.pyx":155 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< * """add the sprite to groups * */ __pyx_tuple__4 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_groups, __pyx_n_s_has, __pyx_n_s_group); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 155, __pyx_L1_error) /* "pygame/_sprite.pyx":173 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< * """remove the sprite from groups * */ __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 173, __pyx_L1_error) /* "pygame/_sprite.pyx":191 * self.remove(*group) * * cpdef void add_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.add(group) * */ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_group); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 191, __pyx_L1_error) /* "pygame/_sprite.pyx":194 * self.__g.add(group) * * cpdef void remove_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.remove(group) * */ __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_internal, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 194, __pyx_L1_error) /* "pygame/_sprite.pyx":197 * self.__g.remove(group) * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """method to control sprite behavior * */ __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_update, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 197, __pyx_L1_error) /* "pygame/_sprite.pyx":212 * pass * * def kill(self): # <<<<<<<<<<<<<< * """remove the Sprite from all Groups * */ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_kill, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 212, __pyx_L1_error) /* "pygame/_sprite.pyx":227 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< * """list of Groups that contain this Sprite * */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_groups, 227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 227, __pyx_L1_error) /* "pygame/_sprite.pyx":237 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< * """does the sprite belong to any groups * */ __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_alive, 237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 237, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":282 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_groups); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 282, __pyx_L1_error) /* "pygame/_sprite.pyx":293 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_val); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_visible, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 293, __pyx_L1_error) /* "pygame/_sprite.pyx":299 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_visible, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 299, __pyx_L1_error) /* "pygame/_sprite.pyx":309 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_repr, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 309, __pyx_L1_error) /* "pygame/_sprite.pyx":336 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """get a list of sprites in the group * */ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_sprites, 336, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 336, __pyx_L1_error) /* "pygame/_sprite.pyx":349 * return list(self.spritedict) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * self.spritedict[sprite] = 0 * */ __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_sprite); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 349, __pyx_L1_error) /* "pygame/_sprite.pyx":352 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * r = self.spritedict[sprite] * if r: */ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_internal, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 352, __pyx_L1_error) /* "pygame/_sprite.pyx":358 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return sprite in self.spritedict * */ __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_has_internal, 358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 358, __pyx_L1_error) /* "pygame/_sprite.pyx":361 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< * """copy a group with all the same sprites * */ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_copy, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 361, __pyx_L1_error) /* "pygame/_sprite.pyx":378 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< * """add sprite(s) to group * */ __pyx_tuple__32 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sprites, __pyx_n_s_sprite, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 378, __pyx_L1_error) /* "pygame/_sprite.pyx":413 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< * """remove sprite(s) from group * */ __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 413, __pyx_L1_error) /* "pygame/_sprite.pyx":445 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< * """ask if group has a sprite or sprites * */ __pyx_tuple__35 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_sprites, __pyx_n_s_return_value, __pyx_n_s_sprite, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_has, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 445, __pyx_L1_error) /* "pygame/_sprite.pyx":485 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """call the update method of every member sprite * */ __pyx_tuple__37 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_s); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_update, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 485, __pyx_L1_error) /* "pygame/_sprite.pyx":497 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites onto the surface * */ __pyx_tuple__39 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_sprites, __pyx_n_s_surface_blit, __pyx_n_s_spritedict, __pyx_n_s_ret, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_draw, 497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 497, __pyx_L1_error) /* "pygame/_sprite.pyx":524 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """erase the previous position of all sprites * */ __pyx_tuple__41 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_bgd, __pyx_n_s_r, __pyx_n_s_surface_blit); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_clear, 524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 524, __pyx_L1_error) /* "pygame/_sprite.pyx":549 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< * """remove all sprites * */ __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_empty, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 549, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 3, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":612 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< * spritedict = self.spritedict * surface_blit = surface.blit */ __pyx_tuple__49 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_spritedict, __pyx_n_s_surface_blit, __pyx_n_s_dirty, __pyx_n_s_dirty_append, __pyx_n_s_s, __pyx_n_s_r, __pyx_n_s_newrect); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_draw, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 612, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":650 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * return list(self._spritelist) * */ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_sprites, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 650, __pyx_L1_error) /* "pygame/_sprite.pyx":653 * return list(self._spritelist) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) */ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 653, __pyx_L1_error) /* "pygame/_sprite.pyx":657 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) */ __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_internal, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 657, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":672 * """ * * _init_rect = Rect(0, 0, 0, 0) # <<<<<<<<<<<<<< * * cdef public dict _spritelayers */ __pyx_tuple__58 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); /* "pygame/_sprite.pyx":700 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sprite, __pyx_n_s_layer_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 700, __pyx_L1_error) __pyx_tuple__61 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); /* "pygame/_sprite.pyx":736 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """add a sprite or sequence of sprites to a group * */ __pyx_tuple__62 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_sprites, __pyx_n_s_kwargs, __pyx_n_s_layer_2, __pyx_n_s_sprite, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add, 736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 736, __pyx_L1_error) /* "pygame/_sprite.pyx":782 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_internal, 782, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 782, __pyx_L1_error) /* "pygame/_sprite.pyx":799 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """return a ordered list of sprites (first back, last top). * */ __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_sprites, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 799, __pyx_L1_error) /* "pygame/_sprite.pyx":807 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the passed surface * */ __pyx_tuple__66 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_spritedict, __pyx_n_s_surface_blit, __pyx_n_s_dirty, __pyx_n_s_dirty_append, __pyx_n_s_init_rect_2, __pyx_n_s_spr, __pyx_n_s_rec, __pyx_n_s_newrect); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_draw, 807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 807, __pyx_L1_error) /* "pygame/_sprite.pyx":833 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< * """return a list with all sprites at that position * */ __pyx_tuple__68 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_pos, __pyx_n_s_sprites_2, __pyx_n_s_rect, __pyx_n_s_colliding_idx, __pyx_n_s_colliding, __pyx_n_s_i); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_sprites_at, 833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 833, __pyx_L1_error) /* "pygame/_sprite.pyx":847 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< * """return the sprite at the index idx from the groups sprites * */ __pyx_tuple__70 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_sprite, 847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 847, __pyx_L1_error) /* "pygame/_sprite.pyx":857 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< * """remove all sprites from a layer and return them as a list * */ __pyx_tuple__72 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_layer_nr, __pyx_n_s_sprites); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_sprites_of_layer, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 857, __pyx_L1_error) /* "pygame/_sprite.pyx":868 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< * """return a list of unique defined layers defined. * */ __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_layers, 868, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 868, __pyx_L1_error) /* "pygame/_sprite.pyx":876 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ __pyx_tuple__75 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_sprite, __pyx_n_s_new_layer, __pyx_n_s_sprites, __pyx_n_s_sprites_layers, __pyx_n_s_leng, __pyx_n_s_low, __pyx_n_s_mid, __pyx_n_s_high); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_change_layer, 876, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 876, __pyx_L1_error) /* "pygame/_sprite.pyx":912 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< * """return the layer that sprite is currently in * */ __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_layer_of_sprite, 912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 912, __pyx_L1_error) /* "pygame/_sprite.pyx":920 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< * """return the top layer * */ __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_top_layer, 920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 920, __pyx_L1_error) /* "pygame/_sprite.pyx":928 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< * """return the bottom layer * */ __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_bottom_layer, 928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 928, __pyx_L1_error) /* "pygame/_sprite.pyx":936 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< * """bring the sprite to front layer * */ __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_move_to_front, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 936, __pyx_L1_error) /* "pygame/_sprite.pyx":948 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< * """move the sprite to the bottom layer * */ __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_move_to_back, 948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 948, __pyx_L1_error) /* "pygame/_sprite.pyx":959 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< * """return the topmost sprite * */ __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_top_sprite, 959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 959, __pyx_L1_error) /* "pygame/_sprite.pyx":967 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< * """return all sprites from a layer ordered as they where added * */ __pyx_tuple__83 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_layer_2, __pyx_n_s_sprites, __pyx_n_s_sprites_append, __pyx_n_s_sprite_layers, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_sprites_from_layer, 967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 967, __pyx_L1_error) /* "pygame/_sprite.pyx":988 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< * """switch the sprites from layer1_nr to layer2_nr * */ __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_layer1_nr, __pyx_n_s_layer2_nr, __pyx_n_s_sprites1, __pyx_n_s_spr); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_switch_layer, 988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 988, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":1062 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 1062, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1062, __pyx_L1_error) /* "pygame/_sprite.pyx":1084 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the given surface * */ __pyx_tuple__90 = PyTuple_Pack(29, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_bgd, __pyx_n_s_orig_clip, __pyx_n_s_clip_2, __pyx_n_s_surf, __pyx_n_s_sprites_2, __pyx_n_s_old_rect, __pyx_n_s_update_2, __pyx_n_s_update_append, __pyx_n_s_ret_2, __pyx_n_s_surf_blit, __pyx_n_s_rect_2, __pyx_n_s_bgd_2, __pyx_n_s_init_rect_2, __pyx_n_s_start_time, __pyx_n_s_spr, __pyx_n_s_union_rect, __pyx_n_s_union_rect_collidelist, __pyx_n_s_union_rect_union_ip, __pyx_n_s_i, __pyx_n_s_rec, __pyx_n_s_spr_rect, __pyx_n_s_rect_offset_x, __pyx_n_s_rect_offset_y, __pyx_n_s_spr_rect_clip, __pyx_n_s_idx, __pyx_n_s_clip, __pyx_n_s_end_time); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_draw, 1084, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1084, __pyx_L1_error) /* "pygame/_sprite.pyx":1224 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """use to set background * */ __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_surface, __pyx_n_s_bgd); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_clear, 1224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1224, __pyx_L1_error) /* "pygame/_sprite.pyx":1232 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< * """repaint the given area * */ __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_screen_rect); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_repaint_rect, 1232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1232, __pyx_L1_error) /* "pygame/_sprite.pyx":1245 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< * """clip the area where to draw; pass None (default) to reset the clip * */ __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_clip, 1245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1245, __pyx_L1_error) /* "pygame/_sprite.pyx":1257 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< * """get the area where drawing will occur * */ __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_clip, 1257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1257, __pyx_L1_error) /* "pygame/_sprite.pyx":1265 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sprite, __pyx_n_s_new_layer); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_change_layer, 1265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1265, __pyx_L1_error) /* "pygame/_sprite.pyx":1278 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< * """set the treshold in milliseconds * */ __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_time_ms); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_timing_treshold, 1278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1278, __pyx_L1_error) /* "pygame/_sprite.pyx":1293 * self._time_threshold = time_ms * * def set_timing_threshold(self, time_ms): # <<<<<<<<<<<<<< * """set the threshold in milliseconds * */ __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_timing_threshold, 1293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1293, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":1327 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< * return GroupSingle(self.__sprite) * */ __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_copy, 1327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1327, __pyx_L1_error) /* "pygame/_sprite.pyx":1330 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * if self.__sprite is not None: * return [self.__sprite] */ __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_sprites, 1330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1330, __pyx_L1_error) /* "pygame/_sprite.pyx":1336 * return [] * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if self.__sprite is not None: * self.__sprite.remove_internal(self) */ __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_add_internal, 1336, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1336, __pyx_L1_error) /* "pygame/_sprite.pyx":1345 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< * return self.__sprite * */ __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_sprite_2, 1345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1345, __pyx_L1_error) /* "pygame/_sprite.pyx":1348 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_sprite, 1348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1348, __pyx_L1_error) /* "pygame/_sprite.pyx":1358 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if sprite is self.__sprite: * self.__sprite = None */ __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_remove_internal, 1358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1358, __pyx_L1_error) /* "pygame/_sprite.pyx":1364 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_has_internal, 1364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1364, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/_sprite.pyx":1373 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_left, __pyx_n_s_right); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_rect, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1373, __pyx_L1_error) /* "pygame/_sprite.pyx":1400 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__116); __Pyx_GIVEREF(__pyx_tuple__116); __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1400, __pyx_L1_error) /* "pygame/_sprite.pyx":1409 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ __pyx_tuple__118 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_leftrect, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1409, __pyx_L1_error) /* "pygame/_sprite.pyx":1436 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ __pyx_tuple__120 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__120); __Pyx_GIVEREF(__pyx_tuple__120); __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_circle, 1436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1436, __pyx_L1_error) /* "pygame/_sprite.pyx":1478 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ __pyx_tuple__122 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); __pyx_tuple__123 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__123); __Pyx_GIVEREF(__pyx_tuple__123); /* "pygame/_sprite.pyx":1490 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1490, __pyx_L1_error) /* "pygame/_sprite.pyx":1503 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ __pyx_tuple__125 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__125); __Pyx_GIVEREF(__pyx_tuple__125); __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1503, __pyx_L1_error) /* "pygame/_sprite.pyx":1542 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ __pyx_tuple__127 = PyTuple_Pack(6, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xoffset, __pyx_n_s_yoffset, __pyx_n_s_leftmask, __pyx_n_s_rightmask); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__127); __Pyx_GIVEREF(__pyx_tuple__127); __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_mask, 1542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1542, __pyx_L1_error) /* "pygame/_sprite.pyx":1568 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ __pyx_tuple__129 = PyTuple_Pack(8, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_dokill, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_append, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollide, 1568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1568, __pyx_L1_error) /* "pygame/_sprite.pyx":1614 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ __pyx_tuple__131 = PyTuple_Pack(9, __pyx_n_s_groupa, __pyx_n_s_groupb, __pyx_n_s_dokilla, __pyx_n_s_dokillb, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_SC, __pyx_n_s_s, __pyx_n_s_c); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_groupcollide, 1614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1614, __pyx_L1_error) /* "pygame/_sprite.pyx":1647 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ __pyx_tuple__133 = PyTuple_Pack(5, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_collided, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__133); __Pyx_GIVEREF(__pyx_tuple__133); __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollideany, 1647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get; __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_pop.method_name = &__pyx_n_s_pop; __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_values.method_name = &__pyx_n_s_values; __pyx_umethod_PyList_Type_remove.type = (PyObject*)&PyList_Type; __pyx_umethod_PyList_Type_remove.method_name = &__pyx_n_s_remove; if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { return 0; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6pygame_7_sprite_Rect = __Pyx_ImportType_3_0_11(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(pgRectObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_7_sprite_Rect) __PYX_ERR(0, 116, __pyx_L1_error) __pyx_vtabptr_6pygame_7_sprite_AbstractGroup = &__pyx_vtable_6pygame_7_sprite_AbstractGroup; __pyx_vtable_6pygame_7_sprite_AbstractGroup.sprites = (PyObject *(*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites; __pyx_vtable_6pygame_7_sprite_AbstractGroup.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal; __pyx_vtable_6pygame_7_sprite_AbstractGroup.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal; __pyx_vtable_6pygame_7_sprite_AbstractGroup.has_internal = (int (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_7_sprite_AbstractGroup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_AbstractGroup_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_7_sprite_AbstractGroup)) __PYX_ERR(0, 314, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_AbstractGroup_spec, __pyx_ptype_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_AbstractGroup = &__pyx_type_6pygame_7_sprite_AbstractGroup; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 314, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__.doc = __pyx_doc_6pygame_7_sprite_13AbstractGroup_32__len__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__; } } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_vtabptr_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractGroup, (PyObject *) __pyx_ptype_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_Sprite = &__pyx_vtable_6pygame_7_sprite_Sprite; __pyx_vtable_6pygame_7_sprite_Sprite.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_6Sprite_add_internal; __pyx_vtable_6pygame_7_sprite_Sprite.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_6Sprite_remove_internal; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_7_sprite_Sprite = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_Sprite_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_7_sprite_Sprite)) __PYX_ERR(0, 127, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_Sprite_spec, __pyx_ptype_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_Sprite = &__pyx_type_6pygame_7_sprite_Sprite; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_Sprite->tp_print = 0; #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_vtabptr_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sprite, (PyObject *) __pyx_ptype_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 127, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_Group = &__pyx_vtable_6pygame_7_sprite_Group; __pyx_vtable_6pygame_7_sprite_Group.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_Group = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_Group_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_Group)) __PYX_ERR(0, 577, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_Group_spec, __pyx_ptype_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_Group = &__pyx_type_6pygame_7_sprite_Group; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_Group->tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_Group->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_Group->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_Group->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_Group->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_Group, __pyx_vtabptr_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Group, (PyObject *) __pyx_ptype_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 577, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_RenderUpdates = &__pyx_vtable_6pygame_7_sprite_RenderUpdates; __pyx_vtable_6pygame_7_sprite_RenderUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_Group; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_Group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_RenderUpdates = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_RenderUpdates_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_RenderUpdates)) __PYX_ERR(0, 603, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_RenderUpdates_spec, __pyx_ptype_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_RenderUpdates = &__pyx_type_6pygame_7_sprite_RenderUpdates; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_RenderUpdates->tp_base = __pyx_ptype_6pygame_7_sprite_Group; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_RenderUpdates->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_RenderUpdates->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_RenderUpdates->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_RenderUpdates->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_RenderUpdates, __pyx_vtabptr_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderUpdates, (PyObject *) __pyx_ptype_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 603, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_OrderedUpdates = &__pyx_vtable_6pygame_7_sprite_OrderedUpdates; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_RenderUpdates; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base.__pyx_base.__pyx_base.sprites = (PyObject *(*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base.__pyx_base.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base.__pyx_base.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_RenderUpdates); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_OrderedUpdates = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_OrderedUpdates_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_OrderedUpdates)) __PYX_ERR(0, 632, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_OrderedUpdates_spec, __pyx_ptype_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_OrderedUpdates = &__pyx_type_6pygame_7_sprite_OrderedUpdates; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_OrderedUpdates->tp_base = __pyx_ptype_6pygame_7_sprite_RenderUpdates; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_OrderedUpdates->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_OrderedUpdates->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_OrderedUpdates->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_OrderedUpdates->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_OrderedUpdates, __pyx_vtabptr_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OrderedUpdates, (PyObject *) __pyx_ptype_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 632, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates = &__pyx_vtable_6pygame_7_sprite_LayeredUpdates; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base.sprites = (PyObject *(*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal__pyx_wrap_1; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args))__pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_LayeredUpdates = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_LayeredUpdates_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_LayeredUpdates)) __PYX_ERR(0, 662, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_LayeredUpdates_spec, __pyx_ptype_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_LayeredUpdates = &__pyx_type_6pygame_7_sprite_LayeredUpdates; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 662, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__.doc = __pyx_doc_6pygame_7_sprite_14LayeredUpdates_2__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__; } } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredUpdates, (PyObject *) __pyx_ptype_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 662, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_LayeredDirty = &__pyx_vtable_6pygame_7_sprite_LayeredDirty; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_LayeredUpdates; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal__pyx_wrap_1; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args))__pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_LayeredDirty = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_LayeredDirty_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_LayeredDirty)) __PYX_ERR(0, 1003, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_LayeredDirty_spec, __pyx_ptype_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_LayeredDirty = &__pyx_type_6pygame_7_sprite_LayeredDirty; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_LayeredDirty->tp_base = __pyx_ptype_6pygame_7_sprite_LayeredUpdates; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_LayeredDirty->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_LayeredDirty->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_LayeredDirty->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_LayeredDirty->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1003, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__.doc = __pyx_doc_6pygame_7_sprite_12LayeredDirty___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__; } } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_vtabptr_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredDirty, (PyObject *) __pyx_ptype_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1003, __pyx_L1_error) #endif __pyx_vtabptr_6pygame_7_sprite_GroupSingle = &__pyx_vtable_6pygame_7_sprite_GroupSingle; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.sprites = (PyObject *(*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_sprites; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_add_internal; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.has_internal = (int (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_has_internal; #if CYTHON_USE_TYPE_SPECS __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_7_sprite_GroupSingle = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_7_sprite_GroupSingle_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_ptype_6pygame_7_sprite_GroupSingle)) __PYX_ERR(0, 1307, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_7_sprite_GroupSingle_spec, __pyx_ptype_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #else __pyx_ptype_6pygame_7_sprite_GroupSingle = &__pyx_type_6pygame_7_sprite_GroupSingle; #endif #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_ptype_6pygame_7_sprite_GroupSingle->tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_7_sprite_GroupSingle->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_7_sprite_GroupSingle->tp_dictoffset && __pyx_ptype_6pygame_7_sprite_GroupSingle->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_7_sprite_GroupSingle->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_vtabptr_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_MergeVtables(__pyx_ptype_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GroupSingle, (PyObject *) __pyx_ptype_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #else sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), #endif __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6pygame_5_sdl2_5video_Color = __Pyx_ImportType_3_0_11(__pyx_t_1, "pygame", "Color", sizeof(pgColorObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(pgColorObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Color) __PYX_ERR(6, 400, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Rect = __Pyx_ImportType_3_0_11(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(pgRectObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Rect) __PYX_ERR(6, 404, __pyx_L1_error) __pyx_t_2 = PyImport_ImportModule("pygame._sdl2.video"); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_5_sdl2_5video_Window = __Pyx_ImportType_3_0_11(__pyx_t_2, "pygame._sdl2.video", "Window", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Window), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_6pygame_5_sdl2_5video_Window),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Window) __PYX_ERR(6, 409, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Renderer = __Pyx_ImportType_3_0_11(__pyx_t_2, "pygame._sdl2.video", "Renderer", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Renderer) __PYX_ERR(6, 413, __pyx_L1_error) __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer)) __PYX_ERR(6, 413, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Texture = __Pyx_ImportType_3_0_11(__pyx_t_2, "pygame._sdl2.video", "Texture", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Texture), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_6pygame_5_sdl2_5video_Texture),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Texture) __PYX_ERR(6, 423, __pyx_L1_error) __pyx_vtabptr_6pygame_5_sdl2_5video_Texture = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Texture); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Texture)) __PYX_ERR(6, 423, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Image = __Pyx_ImportType_3_0_11(__pyx_t_2, "pygame._sdl2.video", "Image", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Image), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_6pygame_5_sdl2_5video_Image),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_6pygame_5_sdl2_5video_Image) __PYX_ERR(6, 435, __pyx_L1_error) __pyx_vtabptr_6pygame_5_sdl2_5video_Image = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Image); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Image)) __PYX_ERR(6, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec__sprite(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec__sprite}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "_sprite", __pyx_k_pygame_module_with_basic_game_ob, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC init_sprite(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC init_sprite(void) #else __Pyx_PyMODINIT_FUNC PyInit__sprite(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit__sprite(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec__sprite(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module '_sprite' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_sprite", __pyx_methods, __pyx_k_pygame_module_with_basic_game_ob, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_sprite" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__sprite(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame___sprite) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame._sprite")) { if (unlikely((PyDict_SetItemString(modules, "pygame._sprite", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pygame/_sprite.pyx":91 * ## specialized cases. * * import pygame # <<<<<<<<<<<<<< * from pygame import Rect * from pygame.time import get_ticks */ __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_pygame, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pygame, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":92 * * import pygame * from pygame import Rect # <<<<<<<<<<<<<< * from pygame.time import get_ticks * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Rect); __Pyx_GIVEREF(__pyx_n_s_Rect); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Rect)) __PYX_ERR(0, 92, __pyx_L1_error); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pygame, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":93 * import pygame * from pygame import Rect * from pygame.time import get_ticks # <<<<<<<<<<<<<< * * from cpython cimport PyObject_CallFunctionObjArgs, PyDict_SetItem, \ */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_get_ticks); __Pyx_GIVEREF(__pyx_n_s_get_ticks); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_ticks)) __PYX_ERR(0, 93, __pyx_L1_error); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_time, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ticks, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":100 * # Python 3 does not have the callable function, but an equivalent can be made * # with the hasattr function. * if 'callable' not in dir(__builtins__): # <<<<<<<<<<<<<< * callable = lambda obj: hasattr(obj, '__call__') * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_builtins); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Dir(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_callable, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pygame/_sprite.pyx":101 * # with the hasattr function. * if 'callable' not in dir(__builtins__): * callable = lambda obj: hasattr(obj, '__call__') # <<<<<<<<<<<<<< * * # Don't depend on pygame.mask if it's not there... */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_callable, __pyx_t_3) < 0) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":100 * # Python 3 does not have the callable function, but an equivalent can be made * # with the hasattr function. * if 'callable' not in dir(__builtins__): # <<<<<<<<<<<<<< * callable = lambda obj: hasattr(obj, '__call__') * */ } /* "pygame/_sprite.pyx":104 * * # Don't depend on pygame.mask if it's not there... * try: # <<<<<<<<<<<<<< * from pygame.mask import from_surface * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pygame/_sprite.pyx":105 * # Don't depend on pygame.mask if it's not there... * try: * from pygame.mask import from_surface # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_from_surface); __Pyx_GIVEREF(__pyx_n_s_from_surface); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_from_surface)) __PYX_ERR(0, 105, __pyx_L3_error); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_mask, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_from_surface, __pyx_t_3) < 0) __PYX_ERR(0, 105, __pyx_L3_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":104 * * # Don't depend on pygame.mask if it's not there... * try: # <<<<<<<<<<<<<< * from pygame.mask import from_surface * except: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":106 * try: * from pygame.mask import from_surface * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_L8_try_end:; } /* "pygame/_sprite.pyx":155 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< * """add the sprite to groups * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_5add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_add, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":173 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< * """remove the sprite from groups * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_7remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_remove, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_remove, __pyx_t_2) < 0) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":191 * self.remove(*group) * * cpdef void add_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.add(group) * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_9add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_add_internal, __pyx_t_2) < 0) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":194 * self.__g.add(group) * * cpdef void remove_internal(self, group) noexcept: # <<<<<<<<<<<<<< * self.__g.remove(group) * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_11remove_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_remove_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_remove_internal, __pyx_t_2) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":197 * self.__g.remove(group) * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """method to control sprite behavior * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_13update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_update, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":212 * pass * * def kill(self): # <<<<<<<<<<<<<< * """remove the Sprite from all Groups * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_15kill, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_kill, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_kill, __pyx_t_2) < 0) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":227 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< * """list of Groups that contain this Sprite * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_17groups, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_groups, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_groups, __pyx_t_2) < 0) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "pygame/_sprite.pyx":237 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< * """does the sprite belong to any groups * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_19alive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite_alive, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite, __pyx_n_s_alive, __pyx_t_2) < 0) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_Sprite); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_23__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_6Sprite_25__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sprite___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":250 * * * class DirtySprite(Sprite): # <<<<<<<<<<<<<< * """a more featureful subclass of Sprite with more attributes * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite); __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite))) __PYX_ERR(0, 250, __pyx_L1_error); __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_3, __pyx_n_s_DirtySprite, __pyx_n_s_DirtySprite, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_a_more_featureful_subclass_of_Sp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_3 != __pyx_t_2) { if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 250, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":282 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_1__init__, 0, __pyx_n_s_DirtySprite___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":293 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_3_set_visible, 0, __pyx_n_s_DirtySprite__set_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_set_visible, __pyx_t_2) < 0) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":299 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_5_get_visible, 0, __pyx_n_s_DirtySprite__get_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_get_visible, __pyx_t_2) < 0) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":303 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_8lambda1, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pygame/_sprite.pyx":304 * * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), # <<<<<<<<<<<<<< * doc="you can make this sprite disappear without " * "removing it from the group,\n" */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_9lambda2, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "pygame/_sprite.pyx":303 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9)) __PYX_ERR(0, 303, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_9 = 0; /* "pygame/_sprite.pyx":305 * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " # <<<<<<<<<<<<<< * "removing it from the group,\n" * "assign 0 for invisible and 1 for visible") */ __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_doc, __pyx_kp_s_you_can_make_this_sprite_disappe) < 0) __PYX_ERR(0, 305, __pyx_L1_error) /* "pygame/_sprite.pyx":303 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_visible_2, __pyx_t_2) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":309 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_7__repr__, 0, __pyx_n_s_DirtySprite___repr, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":250 * * * class DirtySprite(Sprite): # <<<<<<<<<<<<<< * """a more featureful subclass of Sprite with more attributes * */ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_DirtySprite, __pyx_t_3, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DirtySprite, __pyx_t_2) < 0) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":327 * * # dummy val to identify sprite groups, and avoid infinite recursion * _spritegroup = True # <<<<<<<<<<<<<< * * cdef public dict spritedict */ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_spritegroup, Py_True) < 0) __PYX_ERR(0, 327, __pyx_L1_error) PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":336 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """get a list of sprites in the group * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_3sprites, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_sprites, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_sprites, __pyx_t_3) < 0) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":349 * return list(self.spritedict) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * self.spritedict[sprite] = 0 * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_5add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_add_internal, __pyx_t_3) < 0) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":352 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * r = self.spritedict[sprite] * if r: */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_7remove_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_remove_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_remove_internal, __pyx_t_3) < 0) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":358 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return sprite in self.spritedict * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_9has_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_has_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_has_internal, __pyx_t_3) < 0) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":361 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< * """copy a group with all the same sprites * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_11copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_copy, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":378 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< * """add sprite(s) to group * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_17add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_add, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_add, __pyx_t_3) < 0) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":413 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< * """remove sprite(s) from group * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_19remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_remove, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_remove, __pyx_t_3) < 0) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":445 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< * """ask if group has a sprite or sprites * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_21has, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_has, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_has, __pyx_t_3) < 0) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":485 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< * """call the update method of every member sprite * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_23update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_update, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":497 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites onto the surface * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_25draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_draw, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":524 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """erase the previous position of all sprites * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_27clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_clear, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_clear, __pyx_t_3) < 0) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "pygame/_sprite.pyx":549 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< * """remove all sprites * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_29empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup_empty, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup, __pyx_n_s_empty, __pyx_t_3) < 0) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_37__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13AbstractGroup_39__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractGroup___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_5Group_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Group___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_5Group_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Group___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":600 * self.add(*sprites) * * RenderPlain = Group # <<<<<<<<<<<<<< * RenderClear = Group * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderPlain, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 600, __pyx_L1_error) /* "pygame/_sprite.pyx":601 * * RenderPlain = Group * RenderClear = Group # <<<<<<<<<<<<<< * * cdef class RenderUpdates(Group): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderClear, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 601, __pyx_L1_error) /* "pygame/_sprite.pyx":612 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< * spritedict = self.spritedict * surface_blit = surface.blit */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13RenderUpdates_1draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RenderUpdates_draw, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_RenderUpdates, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_RenderUpdates); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13RenderUpdates_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RenderUpdates___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_13RenderUpdates_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RenderUpdates___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":650 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * return list(self._spritelist) * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14OrderedUpdates_3sprites, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OrderedUpdates_sprites, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_OrderedUpdates, __pyx_n_s_sprites, __pyx_t_3) < 0) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_OrderedUpdates); /* "pygame/_sprite.pyx":653 * return list(self._spritelist) * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14OrderedUpdates_5add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OrderedUpdates_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_OrderedUpdates, __pyx_n_s_add_internal, __pyx_t_3) < 0) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_OrderedUpdates); /* "pygame/_sprite.pyx":657 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14OrderedUpdates_7remove_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OrderedUpdates_remove_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_OrderedUpdates, __pyx_n_s_remove_internal, __pyx_t_3) < 0) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_OrderedUpdates); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14OrderedUpdates_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OrderedUpdates___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14OrderedUpdates_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OrderedUpdates___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":672 * """ * * _init_rect = Rect(0, 0, 0, 0) # <<<<<<<<<<<<<< * * cdef public dict _spritelayers */ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_init_rect, __pyx_t_3) < 0) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":700 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_5add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__61); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_add_internal, __pyx_t_3) < 0) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":736 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< * """add a sprite or sequence of sprites to a group * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_7add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_add, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_add, __pyx_t_3) < 0) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":782 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_9remove_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_remove_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_remove_internal, __pyx_t_3) < 0) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":799 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< * """return a ordered list of sprites (first back, last top). * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_11sprites, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_sprites, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_sprites, __pyx_t_3) < 0) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":807 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the passed surface * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_13draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_draw, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":833 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< * """return a list with all sprites at that position * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_15get_sprites_at, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_sprites_at, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_sprites_at, __pyx_t_3) < 0) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":847 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< * """return the sprite at the index idx from the groups sprites * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_17get_sprite, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_sprite, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_sprite, __pyx_t_3) < 0) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":857 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< * """remove all sprites from a layer and return them as a list * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_19remove_sprites_of_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_remove_sprites_of, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_remove_sprites_of_layer, __pyx_t_3) < 0) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":868 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< * """return a list of unique defined layers defined. * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_21layers, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_layers, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_layers, __pyx_t_3) < 0) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":876 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_23change_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_change_layer, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_change_layer, __pyx_t_3) < 0) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":912 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< * """return the layer that sprite is currently in * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_25get_layer_of_sprite, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_layer_of_spri, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_layer_of_sprite, __pyx_t_3) < 0) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":920 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< * """return the top layer * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_27get_top_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_top_layer, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_top_layer, __pyx_t_3) < 0) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":928 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< * """return the bottom layer * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_29get_bottom_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_bottom_layer, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_bottom_layer, __pyx_t_3) < 0) __PYX_ERR(0, 928, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":936 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< * """bring the sprite to front layer * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_31move_to_front, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_move_to_front, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_move_to_front, __pyx_t_3) < 0) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":948 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< * """move the sprite to the bottom layer * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_33move_to_back, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_move_to_back, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_move_to_back, __pyx_t_3) < 0) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":959 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< * """return the topmost sprite * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_35get_top_sprite, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_top_sprite, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_top_sprite, __pyx_t_3) < 0) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":967 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< * """return all sprites from a layer ordered as they where added * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_37get_sprites_from_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_get_sprites_from, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_get_sprites_from_layer, __pyx_t_3) < 0) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "pygame/_sprite.pyx":988 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< * """switch the sprites from layer1_nr to layer2_nr * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_39switch_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates_switch_layer, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates, __pyx_n_s_switch_layer, __pyx_t_3) < 0) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_41__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_14LayeredUpdates_43__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredUpdates___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1062 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None) noexcept: # <<<<<<<<<<<<<< * """Do not use this method directly. * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_3add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__61); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_add_internal, __pyx_t_3) < 0) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1084 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< * """draw all sprites in the right order onto the given surface * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_draw, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__61); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1224 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< * """use to set background * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_7clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_clear, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_clear, __pyx_t_3) < 0) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1232 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< * """repaint the given area * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_9repaint_rect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_repaint_rect, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_repaint_rect, __pyx_t_3) < 0) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1245 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< * """clip the area where to draw; pass None (default) to reset the clip * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_11set_clip, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_set_clip, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__61); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_set_clip, __pyx_t_3) < 0) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1257 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< * """get the area where drawing will occur * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_13get_clip, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_get_clip, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_get_clip, __pyx_t_3) < 0) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1265 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< * """change the layer of the sprite * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_15change_layer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_change_layer, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_change_layer, __pyx_t_3) < 0) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1278 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< * """set the treshold in milliseconds * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_17set_timing_treshold, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_set_timing_treshold, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_set_timing_treshold, __pyx_t_3) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "pygame/_sprite.pyx":1293 * self._time_threshold = time_ms * * def set_timing_threshold(self, time_ms): # <<<<<<<<<<<<<< * """set the threshold in milliseconds * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_19set_timing_threshold, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty_set_timing_threshol, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredDirty, __pyx_n_s_set_timing_threshold, __pyx_t_3) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredDirty); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12LayeredDirty_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LayeredDirty___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/_sprite.pyx":1327 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< * return GroupSingle(self.__sprite) * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle_copy, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1330 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< * if self.__sprite is not None: * return [self.__sprite] */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_5sprites, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle_sprites, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_sprites, __pyx_t_3) < 0) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1336 * return [] * * cpdef void add_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if self.__sprite is not None: * self.__sprite.remove_internal(self) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_7add_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle_add_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_add_internal, __pyx_t_3) < 0) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1345 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< * return self.__sprite * */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_11_get_sprite, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle__get_sprite, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_get_sprite_2, __pyx_t_3) < 0) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1348 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< * self.add_internal(sprite) * sprite.add_internal(self) */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_13_set_sprite, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle__set_sprite, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_set_sprite, __pyx_t_3) < 0) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1353 * return sprite * * sprite = property(_get_sprite, # <<<<<<<<<<<<<< * _set_sprite, * None, */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_get_sprite_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/_sprite.pyx":1354 * * sprite = property(_get_sprite, * _set_sprite, # <<<<<<<<<<<<<< * None, * "The sprite contained in this group") */ __Pyx_GetNameInClass(__pyx_t_7, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_set_sprite); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "pygame/_sprite.pyx":1353 * return sprite * * sprite = property(_get_sprite, # <<<<<<<<<<<<<< * _set_sprite, * None, */ __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 1353, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, Py_None)) __PYX_ERR(0, 1353, __pyx_L1_error); __Pyx_INCREF(__pyx_kp_s_The_sprite_contained_in_this_gro); __Pyx_GIVEREF(__pyx_kp_s_The_sprite_contained_in_this_gro); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_kp_s_The_sprite_contained_in_this_gro)) __PYX_ERR(0, 1353, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_sprite, __pyx_t_7) < 0) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1358 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * if sprite is self.__sprite: * self.__sprite = None */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_15remove_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle_remove_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_remove_internal, __pyx_t_7) < 0) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "pygame/_sprite.pyx":1364 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite) noexcept: # <<<<<<<<<<<<<< * return self.__sprite is sprite * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_17has_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle_has_internal, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_has_internal, __pyx_t_7) < 0) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle___reduce_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11GroupSingle_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GroupSingle___setstate_cython, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1373 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_1collide_rect, 0, __pyx_n_s_collide_rect, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect, __pyx_t_7) < 0) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1388 * return left.rect.colliderect(right.rect) * * class collide_rect_ratio: # <<<<<<<<<<<<<< * """A callable class that checks for collisions using scaled rects * */ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_collide_rect_ratio, __pyx_n_s_collide_rect_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_A_callable_class_that_checks_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "pygame/_sprite.pyx":1400 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_1__init__, 0, __pyx_n_s_collide_rect_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pygame/_sprite.pyx":1409 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_3__call__, 0, __pyx_n_s_collide_rect_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_call, __pyx_t_8) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pygame/_sprite.pyx":1388 * return left.rect.colliderect(right.rect) * * class collide_rect_ratio: # <<<<<<<<<<<<<< * """A callable class that checks for collisions using scaled rects * */ __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_collide_rect_ratio, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect_ratio, __pyx_t_8) < 0) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1436 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_3collide_circle, 0, __pyx_n_s_collide_circle, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle, __pyx_t_7) < 0) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1478 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_tuple__123); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_7, __pyx_n_s_collide_circle_ratio, __pyx_n_s_collide_circle_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_detect_collision_between_two_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7 != __pyx_tuple__123) { if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_tuple__123) < 0))) __PYX_ERR(0, 1478, __pyx_L1_error) } /* "pygame/_sprite.pyx":1490 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_1__init__, 0, __pyx_n_s_collide_circle_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1503 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_3__call__, 0, __pyx_n_s_collide_circle_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_call, __pyx_t_2) < 0) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/_sprite.pyx":1478 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_n_s_collide_circle_ratio, __pyx_t_7, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle_ratio, __pyx_t_2) < 0) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1542 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_5collide_mask, 0, __pyx_n_s_collide_mask, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_mask, __pyx_t_7) < 0) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1568 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_7spritecollide, 0, __pyx_n_s_spritecollide, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__61); if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollide, __pyx_t_7) < 0) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1614 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_9groupcollide, 0, __pyx_n_s_groupcollide, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__61); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupcollide, __pyx_t_7) < 0) __PYX_ERR(0, 1614, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1647 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11spritecollideany, 0, __pyx_n_s_spritecollideany, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__61); if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollideany, __pyx_t_7) < 0) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/_sprite.pyx":1 * ## pygame - Python Game Library # <<<<<<<<<<<<<< * ## Copyright (C) 2000-2003, 2007 Pete Shinners * ## (C) 2004 Joe Wreschnig */ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame._sprite", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame._sprite"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (!r) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* pyfrozenset_new */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { PyObject* result; #if CYTHON_COMPILING_IN_PYPY PyObject* args; args = PyTuple_Pack(1, it); if (unlikely(!args)) return NULL; result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); Py_DECREF(args); return result; #else if (PyFrozenSet_CheckExact(it)) { Py_INCREF(it); return it; } result = PyFrozenSet_New(it); if (unlikely(!result)) return NULL; if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result))) return result; Py_DECREF(result); #endif } #if CYTHON_USE_TYPE_SLOTS return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL); #else return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL); #endif } /* py_set_discard_unhashable */ static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) { PyObject *tmpkey; int rv; if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))) return -1; PyErr_Clear(); tmpkey = __Pyx_PyFrozenSet_New(key); if (tmpkey == NULL) return -1; rv = PySet_Discard(set, tmpkey); Py_DECREF(tmpkey); return rv; } /* py_set_remove */ static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) { if (unlikely(found < 0)) { found = __Pyx_PySet_DiscardUnhashable(set, key); } if (likely(found == 0)) { PyObject *tup; tup = PyTuple_Pack(1, key); if (!tup) return -1; PyErr_SetObject(PyExc_KeyError, tup); Py_DECREF(tup); return -1; } return found; } static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) { int found = PySet_Discard(set, key); if (unlikely(found != 1)) { return __Pyx_PySet_RemoveNotFound(set, key, found); } return 0; } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return -1; __Pyx_PyErr_Clear(); return 0; } return 0; } /* set_iter */ static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, Py_ssize_t* p_orig_length, int* p_source_is_set) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); *p_source_is_set = is_set; if (likely(is_set)) { *p_orig_length = PySet_Size(iterable); Py_INCREF(iterable); return iterable; } #else CYTHON_UNUSED_VAR(is_set); *p_source_is_set = 0; #endif *p_orig_length = 0; return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_set_iter_next( PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject **value, int source_is_set) { if (!CYTHON_COMPILING_IN_CPYTHON || PY_VERSION_HEX >= 0x030d0000 || unlikely(!source_is_set)) { *value = PyIter_Next(iter_obj); if (unlikely(!*value)) { return __Pyx_IterFinish(); } CYTHON_UNUSED_VAR(orig_length); CYTHON_UNUSED_VAR(ppos); return 1; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) { PyErr_SetString( PyExc_RuntimeError, "set changed size during iteration"); return -1; } { Py_hash_t hash; int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash); assert (ret != -1); if (likely(ret)) { Py_INCREF(*value); return 1; } } #endif return 0; } /* RaiseUnexpectedTypeError */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) { __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, expected, obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif /* GetAttr3 */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 int res = PyObject_GetOptionalAttr(o, n, &r); return (res != 0) ? r : __Pyx_NewRef(d); #else #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { r = __Pyx_NewRef(d); } return r; } #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); #endif } /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { if (unlikely(PyTuple_Check(key))) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) { PyErr_SetObject(PyExc_KeyError, args); Py_DECREF(args); } } else { PyErr_SetObject(PyExc_KeyError, key); } } return NULL; } Py_INCREF(value); return value; } #endif /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 local_value = tstate->current_exception; tstate->current_exception = 0; if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 if (unlikely(tstate->current_exception)) #elif CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; #endif } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* SliceObject */ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, int wraparound) { __Pyx_TypeName obj_type_name; #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #else CYTHON_UNUSED_VAR(wraparound); #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #else CYTHON_UNUSED_VAR(wraparound); #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s", obj_type_name, value ? "assignment" : "deletion"); __Pyx_DECREF_TypeName(obj_type_name); bad: return -1; } /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } return __Pyx_IterFinish(); } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_COMPILING_IN_PYPY bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = __Pyx_PyObject_GetIterNextFunc(iter); value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #elif PY_MAJOR_VERSION >= 3 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* UnpackUnboundCMethod */ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { PyObject *result; PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); if (unlikely(!selfless_args)) return NULL; result = PyObject_Call(method, selfless_args, kwargs); Py_DECREF(selfless_args); return result; } static PyMethodDef __Pyx_UnboundCMethod_Def = { "CythonUnboundCMethod", __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), METH_VARARGS | METH_KEYWORDS, NULL }; static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) #else if (likely(!__Pyx_CyOrPyCFunction_Check(method))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } else #endif #if CYTHON_COMPILING_IN_PYPY #else if (PyCFunction_Check(method)) #endif { PyObject *self; int self_found; #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY self = PyObject_GetAttrString(method, "__self__"); if (!self) { PyErr_Clear(); } #else self = PyCFunction_GET_SELF(method); #endif self_found = (self && self != Py_None); #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY Py_XDECREF(self); #endif if (self_found) { PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); if (unlikely(!unbound_method)) return -1; Py_DECREF(method); target->method = unbound_method; } } return 0; } /* CallUnboundCMethod1 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return (*(cfunc->func))(self, arg); } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); #else return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); #endif } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(2, self, arg); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* CallUnboundCMethod2 */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(3); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg1); PyTuple_SET_ITEM(args, 1, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 2, arg2); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(3, self, arg1, arg2); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* dict_getitem_default */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); if ((1)); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } #endif else { if (default_value == Py_None) value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); else value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); } return value; } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - (unsigned long)b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return PyLong_FromLong(-intval); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a)) return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2); else { long q, r; q = a / b; r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); x = q; } return PyInt_FromLong(x); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op1); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2); } } { long q, r; q = a / b; r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); x = q; } return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: { PY_LONG_LONG q, r; q = lla / llb; r = lla - q*llb; q -= ((r != 0) & ((r ^ llb) < 0)); llx = q; } return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2); } #endif /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { PyObject *runerr = NULL; Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); __Pyx_DECREF_TypeName(index_type_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); if (!meth) { PyErr_Clear(); } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; } } obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { PyTypeObject *tp = Py_TYPE(obj); PyMappingMethods *mm = tp->tp_as_mapping; PySequenceMethods *sm = tp->tp_as_sequence; if (likely(mm && mm->mp_subscript)) { return mm->mp_subscript(obj, key); } if (likely(sm && sm->sq_item)) { return __Pyx_PyObject_GetIndex(obj, key); } return __Pyx_PyObject_GetItem_Slow(obj, key); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + (unsigned long)b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op2); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* CallUnboundCMethod0 */ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *args, *result = NULL; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_ASSUME_SAFE_MACROS args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); #else args = PyTuple_Pack(1, self); if (unlikely(!args)) goto bad; #endif result = __Pyx_PyObject_Call(cfunc->method, args, NULL); Py_DECREF(args); bad: return result; } /* py_dict_values */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d); else return PyDict_Values(d); } /* py_dict_pop */ static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 & PY_VERSION_HEX < 0x030d0000 if ((1)) { return _PyDict_Pop(d, key, default_value); } else #endif if (default_value) { return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value); } else { return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key); } } /* PyIntCompare */ static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_UNUSED_VAR(inplace); if (op1 == op2) { return 1; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return (a == b); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); const digit* digits = __Pyx_PyLong_Digits(op1); if (intval == 0) { return (__Pyx_PyLong_IsZero(op1) == 1); } else if (intval < 0) { if (__Pyx_PyLong_IsNonNeg(op1)) return 0; intval = -intval; } else { if (__Pyx_PyLong_IsNeg(op1)) return 0; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); return (unequal == 0); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif return ((double)a == (double)b); } return __Pyx_PyObject_IsTrueAndDecref( PyObject_RichCompare(op1, op2, Py_EQ)); } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType_3_0_11 #define __PYX_HAVE_RT_ImportType_3_0_11 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; Py_ssize_t itemsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; PyObject *py_itemsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #if !CYTHON_COMPILING_IN_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; itemsize = ((PyTypeObject *)result)->tp_itemsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); if (!py_itemsize) goto bad; itemsize = PyLong_AsSsize_t(py_itemsize); Py_DECREF(py_itemsize); py_itemsize = 0; if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (itemsize) { if (size % alignment) { alignment = size % alignment; } if (itemsize < (Py_ssize_t)alignment) itemsize = (Py_ssize_t)alignment; } if ((size_t)(basicsize + itemsize) < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize+itemsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd-%zd from PyObject", module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetVTable */ static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { PyObject *ob = PyCapsule_New(vtable, 0, 0); if (unlikely(!ob)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) #else if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) #endif goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetVTable */ static void* __Pyx_GetVtable(PyTypeObject *type) { void* ptr; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); #else PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); #endif if (!ob) goto bad; ptr = PyCapsule_GetPointer(ob, 0); if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* MergeVTables */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_MergeVtables(PyTypeObject *type) { int i; void** base_vtables; __Pyx_TypeName tp_base_name; __Pyx_TypeName base_name; void* unknown = (void*)-1; PyObject* bases = type->tp_bases; int base_depth = 0; { PyTypeObject* base = type->tp_base; while (base) { base_depth += 1; base = base->tp_base; } } base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); base_vtables[0] = unknown; for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); if (base_vtable != NULL) { int j; PyTypeObject* base = type->tp_base; for (j = 0; j < base_depth; j++) { if (base_vtables[j] == unknown) { base_vtables[j] = __Pyx_GetVtable(base); base_vtables[j + 1] = unknown; } if (base_vtables[j] == base_vtable) { break; } else if (base_vtables[j] == NULL) { goto bad; } base = base->tp_base; } } } PyErr_Clear(); free(base_vtables); return 0; bad: tp_base_name = __Pyx_PyType_GetName(type->tp_base); base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); PyErr_Format(PyExc_TypeError, "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); __Pyx_DECREF_TypeName(tp_base_name); __Pyx_DECREF_TypeName(base_name); free(base_vtables); return -1; } #endif /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* ImportDottedModule */ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; if (unlikely(PyErr_Occurred())) { PyErr_Clear(); } if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { partial_name = name; } else { slice = PySequence_GetSlice(parts_tuple, 0, count); if (unlikely(!slice)) goto bad; sep = PyUnicode_FromStringAndSize(".", 1); if (unlikely(!sep)) goto bad; partial_name = PyUnicode_Join(sep, slice); } PyErr_Format( #if PY_MAJOR_VERSION < 3 PyExc_ImportError, "No module named '%s'", PyString_AS_STRING(partial_name)); #else #if PY_VERSION_HEX >= 0x030600B1 PyExc_ModuleNotFoundError, #else PyExc_ImportError, #endif "No module named '%U'", partial_name); #endif bad: Py_XDECREF(sep); Py_XDECREF(slice); Py_XDECREF(partial_name); return NULL; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { PyObject *imported_module; #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) return NULL; imported_module = __Pyx_PyDict_GetItemStr(modules, name); Py_XINCREF(imported_module); #else imported_module = PyImport_GetModule(name); #endif return imported_module; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { Py_ssize_t i, nparts; nparts = PyTuple_GET_SIZE(parts_tuple); for (i=1; i < nparts && module; i++) { PyObject *part, *submodule; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS part = PyTuple_GET_ITEM(parts_tuple, i); #else part = PySequence_ITEM(parts_tuple, i); #endif submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(part); #endif Py_DECREF(module); module = submodule; } if (unlikely(!module)) { return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); } return module; } #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 PyObject *module, *from_list, *star = __pyx_n_s__2; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); module = __Pyx_Import(name, from_list, 0); Py_DECREF(from_list); return module; #else PyObject *imported_module; PyObject *module = __Pyx_Import(name, NULL, 0); if (!parts_tuple || unlikely(!module)) return module; imported_module = __Pyx__ImportDottedModule_Lookup(name); if (likely(imported_module)) { Py_DECREF(module); return imported_module; } PyErr_Clear(); return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); #endif } static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); if (likely(module)) { PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); if (likely(spec)) { PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { Py_DECREF(spec); spec = NULL; } Py_XDECREF(unsafe); } if (likely(!spec)) { PyErr_Clear(); return module; } Py_DECREF(spec); Py_DECREF(module); } else if (PyErr_Occurred()) { PyErr_Clear(); } #endif return __Pyx__ImportDottedModule(name, parts_tuple); } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__3); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* Py3UpdateBases */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases) { Py_ssize_t i, j, size_bases; PyObject *base, *meth, *new_base, *result, *new_bases = NULL; size_bases = PyTuple_GET_SIZE(bases); for (i = 0; i < size_bases; i++) { base = PyTuple_GET_ITEM(bases, i); if (PyType_Check(base)) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries); if (!meth && PyErr_Occurred()) { goto error; } if (!meth) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } new_base = __Pyx_PyObject_CallOneArg(meth, bases); Py_DECREF(meth); if (!new_base) { goto error; } if (!PyTuple_Check(new_base)) { PyErr_SetString(PyExc_TypeError, "__mro_entries__ must return a tuple"); Py_DECREF(new_base); goto error; } if (!new_bases) { if (!(new_bases = PyList_New(i))) { goto error; } for (j = 0; j < i; j++) { base = PyTuple_GET_ITEM(bases, j); PyList_SET_ITEM(new_bases, j, base); Py_INCREF(base); } } j = PyList_GET_SIZE(new_bases); if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { goto error; } Py_DECREF(new_base); } if (!new_bases) { Py_INCREF(bases); return bases; } result = PyList_AsTuple(new_bases); Py_DECREF(new_bases); return result; error: Py_XDECREF(new_bases); return NULL; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases; #if CYTHON_ASSUME_SAFE_MACROS nbases = PyTuple_GET_SIZE(bases); #else nbases = PyTuple_Size(bases); if (nbases < 0) return NULL; #endif for (i=0; i < nbases; i++) { PyTypeObject *tmptype; #if CYTHON_ASSUME_SAFE_MACROS PyObject *tmp = PyTuple_GET_ITEM(bases, i); #else PyObject *tmp = PyTuple_GetItem(bases, i); if (!tmp) return NULL; #endif tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* PyObjectCall2Args */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectLookupSpecial */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else if (with_error) { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #endif /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs[3] = {NULL, name, bases}; ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_DECREF(prep); } else { if (unlikely(PyErr_Occurred())) return NULL; ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; #if PY_VERSION_HEX >= 0x03030000 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; #else CYTHON_MAYBE_UNUSED_VAR(qualname); #endif if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc_2, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS static int __Pyx_SetNamesPEP487(PyObject *type_obj) { PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *names_to_set, *key, *value, *set_name, *tmp; Py_ssize_t i = 0; #if CYTHON_USE_TYPE_SLOTS names_to_set = PyDict_Copy(type->tp_dict); #else { PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict); names_to_set = NULL; if (likely(d)) { PyObject *names_to_set = PyDict_New(); int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1; Py_DECREF(d); if (unlikely(ret < 0)) Py_CLEAR(names_to_set); } } #endif if (unlikely(names_to_set == NULL)) goto bad; while (PyDict_Next(names_to_set, &i, &key, &value)) { set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name); if (unlikely(set_name != NULL)) { tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key); Py_DECREF(set_name); if (unlikely(tmp == NULL)) { __Pyx_TypeName value_type_name = __Pyx_PyType_GetName(Py_TYPE(value)); __Pyx_TypeName type_name = __Pyx_PyType_GetName(type); PyErr_Format(PyExc_RuntimeError, #if PY_MAJOR_VERSION >= 3 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'", value_type_name, key, type_name); #else "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'", value_type_name, PyString_Check(key) ? PyString_AS_STRING(key) : "?", type_name); #endif goto bad; } else { Py_DECREF(tmp); } } else if (unlikely(PyErr_Occurred())) { goto bad; } } Py_DECREF(names_to_set); return 0; bad: Py_XDECREF(names_to_set); return -1; } static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) { #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyTypeObject *type = (PyTypeObject*) type_obj; PyObject *mro = type->tp_mro; Py_ssize_t i, nbases; if (unlikely(!mro)) goto done; (void) &__Pyx_GetBuiltinName; Py_INCREF(mro); nbases = PyTuple_GET_SIZE(mro); assert(PyTuple_GET_ITEM(mro, 0) == type_obj); for (i = 1; i < nbases-1; i++) { PyObject *base, *dict, *meth; base = PyTuple_GET_ITEM(mro, i); dict = ((PyTypeObject *)base)->tp_dict; meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass); if (unlikely(meth)) { descrgetfunc f = Py_TYPE(meth)->tp_descr_get; PyObject *res; Py_INCREF(meth); if (likely(f)) { res = f(meth, NULL, type_obj); Py_DECREF(meth); if (unlikely(!res)) goto bad; meth = res; } res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw); Py_DECREF(meth); if (unlikely(!res)) goto bad; Py_DECREF(res); goto done; } else if (unlikely(PyErr_Occurred())) { goto bad; } } done: Py_XDECREF(mro); return type_obj; bad: Py_XDECREF(mro); Py_DECREF(type_obj); return NULL; #else PyObject *super_type, *super, *func, *res; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) super_type = __Pyx_GetBuiltinName(__pyx_n_s_super); #else super_type = (PyObject*) &PySuper_Type; (void) &__Pyx_GetBuiltinName; #endif super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL; #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) Py_XDECREF(super_type); #endif if (unlikely(!super)) { Py_CLEAR(type_obj); goto done; } func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass); Py_DECREF(super); if (likely(!func)) { if (unlikely(PyErr_Occurred())) Py_CLEAR(type_obj); goto done; } res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw); Py_DECREF(func); if (unlikely(!res)) Py_CLEAR(type_obj); Py_XDECREF(res); done: return type_obj; #endif } #endif static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result; PyObject *owned_metaclass = NULL; PyObject *margs[4] = {NULL, name, bases, dict}; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, #if PY_VERSION_HEX < 0x030600A4 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw #else mkw #endif ); Py_XDECREF(owned_metaclass); #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS if (likely(result) && likely(PyType_Check(result))) { if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) { Py_CLEAR(result); } else { result = __Pyx_InitSubclassPEP487(result, mkw); } } #else (void) &__Pyx_GetBuiltinName; #endif return result; } /* GetNameInClass */ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; PyObject *dict; assert(PyType_Check(nmspace)); #if CYTHON_USE_TYPE_SLOTS dict = ((PyTypeObject*)nmspace)->tp_dict; Py_XINCREF(dict); #else dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict); #endif if (likely(dict)) { result = PyObject_GetItem(dict, name); Py_DECREF(dict); if (result) { return result; } } PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__135); } return name; } #endif /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CheckBinaryVersion */ static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/_surface.h0000644000175100001770000000167514676242340015461 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #ifndef _SURFACE_H #define _SURFACE_H #include "_pygame.h" #include "surface.h" #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/alphablit.c0000644000175100001770000033261114676242340015622 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2006 Rene Dudfield Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #define NO_PYGAME_C_API #include "_surface.h" #if !defined(PG_ENABLE_ARM_NEON) && defined(__aarch64__) // arm64 has neon optimisations enabled by default, even when fpu=neon is not // passed #define PG_ENABLE_ARM_NEON 1 #endif /* See if we are compiled 64 bit on GCC or MSVC */ #if _WIN32 || _WIN64 #if _WIN64 #define ENV64BIT #endif #endif // Check GCC #if __GNUC__ #if __x86_64__ || __ppc64__ || __aarch64__ #define ENV64BIT #endif #endif #if PG_ENABLE_ARM_NEON // sse2neon.h is from here: https://github.com/DLTcollab/sse2neon #include "include/sse2neon.h" #endif /* PG_ENABLE_ARM_NEON */ /* This defines PG_ENABLE_SSE_NEON as True if either SSE or NEON is available * at compile time. Since we do compile time translation of SSE2->NEON, they * have the same code paths, so this reduces code duplication of those paths. */ #if defined(__SSE2__) #define PG_ENABLE_SSE_NEON 1 #elif PG_ENABLE_ARM_NEON #define PG_ENABLE_SSE_NEON 1 #else #define PG_ENABLE_SSE_NEON 0 #endif /* This returns True if either SSE2 or NEON is present at runtime. * Relevant because they use the same codepaths. Only the relevant runtime * SDL cpu feature check is compiled in.*/ int pg_HasSSE_NEON() { #if defined(__SSE2__) return SDL_HasSSE2(); #elif PG_ENABLE_ARM_NEON return SDL_HasNEON(); #else return 0; #endif } #include "simd_blitters.h" static void alphablit_alpha(SDL_BlitInfo *info); static void alphablit_colorkey(SDL_BlitInfo *info); static void alphablit_solid(SDL_BlitInfo *info); static void blit_blend_add(SDL_BlitInfo *info); static void blit_blend_sub(SDL_BlitInfo *info); static void blit_blend_mul(SDL_BlitInfo *info); static void blit_blend_min(SDL_BlitInfo *info); static void blit_blend_max(SDL_BlitInfo *info); static void blit_blend_rgba_add(SDL_BlitInfo *info); static void blit_blend_rgba_sub(SDL_BlitInfo *info); static void blit_blend_rgba_mul(SDL_BlitInfo *info); static void blit_blend_rgba_min(SDL_BlitInfo *info); static void blit_blend_rgba_max(SDL_BlitInfo *info); static void blit_blend_premultiplied(SDL_BlitInfo *info); #ifdef __MMX__ static void blit_blend_premultiplied_mmx(SDL_BlitInfo *info); #endif /* __MMX__ */ static int SoftBlitPyGame(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args); extern int SDL_RLESurface(SDL_Surface *surface); extern void SDL_UnRLESurface(SDL_Surface *surface, int recode); static int SoftBlitPyGame(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args) { int okay; int src_locked; int dst_locked; /* Everything is okay at the beginning... */ okay = 1; /* Lock the destination if it's in hardware */ dst_locked = 0; if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) okay = 0; else dst_locked = 1; } /* Lock the source if it's in hardware */ src_locked = 0; if (SDL_MUSTLOCK(src)) { if (SDL_LockSurface(src) < 0) okay = 0; else src_locked = 1; } /* Set up source and destination buffer pointers, and BLIT! */ if (okay && srcrect->w && srcrect->h) { SDL_BlitInfo info; /* Set up the blit information */ info.width = srcrect->w; info.height = srcrect->h; info.s_pixels = (Uint8 *)src->pixels + (Uint16)srcrect->y * src->pitch + (Uint16)srcrect->x * src->format->BytesPerPixel; info.s_pxskip = src->format->BytesPerPixel; info.s_skip = src->pitch - info.width * src->format->BytesPerPixel; info.d_pixels = (Uint8 *)dst->pixels + (Uint16)dstrect->y * dst->pitch + (Uint16)dstrect->x * dst->format->BytesPerPixel; info.d_pxskip = dst->format->BytesPerPixel; info.d_skip = dst->pitch - info.width * dst->format->BytesPerPixel; info.src = src->format; info.dst = dst->format; SDL_GetSurfaceAlphaMod(src, &info.src_blanket_alpha); info.src_has_colorkey = SDL_GetColorKey(src, &info.src_colorkey) == 0; if (SDL_GetSurfaceBlendMode(src, &info.src_blend) || SDL_GetSurfaceBlendMode(dst, &info.dst_blend)) { okay = 0; } if (okay) { if (info.d_pixels > info.s_pixels) { int span = info.width * info.src->BytesPerPixel; Uint8 *srcpixend = info.s_pixels + (info.height - 1) * src->pitch + span; if (info.d_pixels < srcpixend) { int dstoffset = (info.d_pixels - info.s_pixels) % src->pitch; if (dstoffset < span || dstoffset > src->pitch - span) { /* Overlapping Self blit with positive destination offset. Reverse direction of the blit. */ info.s_pixels = srcpixend - info.s_pxskip; info.s_pxskip = -info.s_pxskip; info.s_skip = -info.s_skip; info.d_pixels = (info.d_pixels + (info.height - 1) * dst->pitch + span - info.d_pxskip); info.d_pxskip = -info.d_pxskip; info.d_skip = -info.d_skip; } } } /* Convert alpha multiply blends to regular blends if either of the surfaces don't have alpha channels */ if (the_args == PYGAME_BLEND_RGBA_MULT && (info.src_blend == SDL_BLENDMODE_NONE || info.dst_blend == SDL_BLENDMODE_NONE)) { the_args = PYGAME_BLEND_MULT; } switch (the_args) { case 0: { if (info.src_blend != SDL_BLENDMODE_NONE && src->format->Amask) { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask) { /* If our source and destination are the same ARGB 32bit format we can use SSE2/NEON to speed up the blend */ #if PG_ENABLE_SSE_NEON if ((pg_HasSSE_NEON()) && (src != dst)) { if (info.src_blanket_alpha != 255) { alphablit_alpha_sse2_argb_surf_alpha( &info); } else { if (SDL_ISPIXELFORMAT_ALPHA( dst->format->format) && info.dst_blend != SDL_BLENDMODE_NONE) { alphablit_alpha_sse2_argb_no_surf_alpha( &info); } else { alphablit_alpha_sse2_argb_no_surf_alpha_opaque_dst( &info); } } break; } #endif /* PG_ENABLE_SSE_NEON */ } #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ alphablit_alpha(&info); } else if (info.src_has_colorkey) { alphablit_colorkey(&info); } else { alphablit_solid(&info); } break; } case PYGAME_BLEND_ADD: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_has_avx2() && (src != dst)) { blit_blend_rgb_add_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgb_add_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_add(&info); break; } case PYGAME_BLEND_SUB: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_has_avx2() && (src != dst)) { blit_blend_rgb_sub_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgb_sub_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_sub(&info); break; } case PYGAME_BLEND_MULT: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_has_avx2() && (src != dst)) { blit_blend_rgb_mul_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgb_mul_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_mul(&info); break; } case PYGAME_BLEND_MIN: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_has_avx2() && (src != dst)) { blit_blend_rgb_min_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgb_min_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_min(&info); break; } case PYGAME_BLEND_MAX: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_has_avx2() && (src != dst)) { blit_blend_rgb_max_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && !(src->format->Amask != 0 && dst->format->Amask != 0 && src->format->Amask != dst->format->Amask) && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgb_max_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_max(&info); break; } case PYGAME_BLEND_RGBA_ADD: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_has_avx2() && (src != dst)) { blit_blend_rgba_add_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgba_add_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_rgba_add(&info); break; } case PYGAME_BLEND_RGBA_SUB: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_has_avx2() && (src != dst)) { blit_blend_rgba_sub_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgba_sub_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_rgba_sub(&info); break; } case PYGAME_BLEND_RGBA_MULT: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_has_avx2() && (src != dst)) { blit_blend_rgba_mul_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgba_mul_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_rgba_mul(&info); break; } case PYGAME_BLEND_RGBA_MIN: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_has_avx2() && (src != dst)) { blit_blend_rgba_min_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgba_min_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_rgba_min(&info); break; } case PYGAME_BLEND_RGBA_MAX: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_has_avx2() && (src != dst)) { blit_blend_rgba_max_avx2(&info); break; } #if PG_ENABLE_SSE_NEON if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE && pg_HasSSE_NEON() && (src != dst)) { blit_blend_rgba_max_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ blit_blend_rgba_max(&info); break; } case PYGAME_BLEND_PREMULTIPLIED: { if (src->format->BytesPerPixel == 4 && dst->format->BytesPerPixel == 4 && src->format->Rmask == dst->format->Rmask && src->format->Gmask == dst->format->Gmask && src->format->Bmask == dst->format->Bmask && info.src_blend != SDL_BLENDMODE_NONE) { #if defined(__MMX__) || defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON) #if PG_ENABLE_SSE_NEON if (pg_HasSSE_NEON()) { blit_blend_premultiplied_sse2(&info); break; } #endif /* PG_ENABLE_SSE_NEON */ #ifdef __MMX__ if (SDL_HasMMX() == SDL_TRUE) { blit_blend_premultiplied_mmx(&info); break; } #endif /*__MMX__*/ #endif /*__MMX__ || __SSE2__ || PG_ENABLE_ARM_NEON*/ } blit_blend_premultiplied(&info); break; } default: { SDL_SetError("Invalid argument passed to blit."); okay = 0; break; } } } } /* We need to unlock the surfaces if they're locked */ if (dst_locked) SDL_UnlockSurface(dst); if (src_locked) SDL_UnlockSurface(src); /* Blit is done! */ return (okay ? 0 : -1); } /* --------------------------------------------------------- */ static void blit_blend_rgba_add(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Uint32 tmp; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (!dstppa) { blit_blend_add(info); return; } if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask && srcfmt->Amask == dstfmt->Amask && info->src_blend != SDL_BLENDMODE_NONE) { int incr = srcpxskip > 0 ? 1 : -1; if (incr < 0) { src += 3; dst += 3; } while (height--) { LOOP_UNROLLED4( { REPEAT_4({ tmp = (*dst) + (*src); (*dst) = (tmp <= 255 ? tmp : 255); src += incr; dst += incr; }); }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_rgba_sub(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Sint32 tmp2; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (!dstppa) { blit_blend_sub(info); return; } if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask && srcfmt->Amask == dstfmt->Amask && info->src_blend != SDL_BLENDMODE_NONE) { int incr = srcpxskip > 0 ? 1 : -1; if (incr < 0) { src += 3; dst += 3; } while (height--) { LOOP_UNROLLED4( { REPEAT_4({ tmp2 = (*dst) - (*src); (*dst) = (tmp2 >= 0 ? tmp2 : 0); src += incr; dst += incr; }); }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_rgba_mul(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Uint32 tmp; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (!dstppa) { blit_blend_mul(info); return; } if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask && srcfmt->Amask == dstfmt->Amask && info->src_blend != SDL_BLENDMODE_NONE) { int incr = srcpxskip > 0 ? 1 : -1; if (incr < 0) { src += 3; dst += 3; } while (height--) { LOOP_UNROLLED4( { REPEAT_4({ tmp = ((*dst) && (*src)) ? (((*dst) * (*src)) + 255) >> 8 : 0; (*dst) = (tmp <= 255 ? tmp : 255); src += incr; dst += incr; }); }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_rgba_min(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (!dstppa) { blit_blend_min(info); return; } if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask && srcfmt->Amask == dstfmt->Amask && info->src_blend != SDL_BLENDMODE_NONE) { int incr = srcpxskip > 0 ? 1 : -1; if (incr < 0) { src += 3; dst += 3; } while (height--) { LOOP_UNROLLED4( { REPEAT_4({ if ((*src) < (*dst)) (*dst) = (*src); src += incr; dst += incr; }); }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_rgba_max(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (!dstppa) { blit_blend_max(info); return; } if (srcbpp == 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->Bmask == dstfmt->Bmask && srcfmt->Amask == dstfmt->Amask && info->src_blend != SDL_BLENDMODE_NONE) { int incr = srcpxskip > 0 ? 1 : -1; if (incr < 0) { src += 3; dst += 3; } while (height--) { LOOP_UNROLLED4( { REPEAT_4({ if ((*src) > (*dst)) (*dst) = (*src); src += incr; dst += incr; }); }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } #ifdef __MMX__ /* fast ARGB888->(A)RGB888 blending with pixel alpha */ static void blit_blend_premultiplied_mmx(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; SDL_PixelFormat *srcfmt = info->src; Uint32 amask = srcfmt->Amask; Uint32 ashift = srcfmt->Ashift; Uint64 multmask2; __m64 src1, dst1, mm_alpha, mm_zero, mm_alpha2; mm_zero = _mm_setzero_si64(); /* 0 -> mm_zero */ multmask2 = 0x00FF00FF00FF00FFULL; while (height--) { /* *INDENT-OFF* */ LOOP_UNROLLED4( { Uint32 alpha = *srcp & amask; if (alpha == 0) { /* do nothing */ } else if (alpha == amask) { *dstp = *srcp; } else { src1 = _mm_cvtsi32_si64( *srcp); /* src(ARGB) -> src1 (0000ARGB) */ src1 = _mm_unpacklo_pi8(src1, mm_zero); /* 0A0R0G0B -> src1 */ dst1 = _mm_cvtsi32_si64( *dstp); /* dst(ARGB) -> dst1 (0000ARGB) */ dst1 = _mm_unpacklo_pi8(dst1, mm_zero); /* 0A0R0G0B -> dst1 */ mm_alpha = _mm_cvtsi32_si64( alpha); /* alpha -> mm_alpha (0000000A) */ mm_alpha = _mm_srli_si64( mm_alpha, ashift); /* mm_alpha >> ashift -> mm_alpha(0000000A) */ mm_alpha = _mm_unpacklo_pi16( mm_alpha, mm_alpha); /* 00000A0A -> mm_alpha */ mm_alpha2 = _mm_unpacklo_pi32( mm_alpha, mm_alpha); /* 0A0A0A0A -> mm_alpha2 */ mm_alpha2 = _mm_xor_si64( mm_alpha2, *(__m64 *)&multmask2); /* 255 - mm_alpha -> mm_alpha */ /* pre-multiplied alpha blend */ dst1 = _mm_mullo_pi16(dst1, mm_alpha2); dst1 = _mm_srli_pi16(dst1, 8); dst1 = _mm_add_pi16(src1, dst1); dst1 = _mm_packs_pu16(dst1, mm_zero); *dstp = _mm_cvtsi64_si32(dst1); /* dst1 -> pixel */ } ++srcp; ++dstp; }, n, width); /* *INDENT-ON* */ srcp += srcskip; dstp += dstskip; } _mm_empty(); } #endif /*__MMX__*/ static void blit_blend_premultiplied(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { dst[dstoffsetR] = src[srcoffsetR]; dst[dstoffsetG] = src[srcoffsetG]; dst[dstoffsetB] = src[srcoffsetB]; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); if (sA == 0) { dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; } else if (sA == 255) { dst[offsetR] = sR; dst[offsetG] = sG; dst[offsetB] = sB; } else { ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; } src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); // We can save some blending time by just copying // pixels with alphas of 255 or 0 if (sA == 0) { CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); } else if (sA == 255) { CREATE_PIXEL(dst, sR, sG, sB, sA, dstbpp, dstfmt); } else { ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); } src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } /* --------------------------------------------------------- */ static void blit_blend_add(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Uint32 tmp; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { tmp = dst[dstoffsetR] + src[srcoffsetR]; dst[dstoffsetR] = (tmp <= 255 ? tmp : 255); tmp = dst[dstoffsetG] + src[srcoffsetG]; dst[dstoffsetG] = (tmp <= 255 ? tmp : 255); tmp = dst[dstoffsetB] + src[srcoffsetB]; dst[dstoffsetB] = (tmp <= 255 ? tmp : 255); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_sub(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Sint32 tmp2; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { tmp2 = dst[dstoffsetR] - src[srcoffsetR]; dst[dstoffsetR] = (tmp2 >= 0 ? tmp2 : 0); tmp2 = dst[dstoffsetG] - src[srcoffsetG]; dst[dstoffsetG] = (tmp2 >= 0 ? tmp2 : 0); tmp2 = dst[dstoffsetB] - src[srcoffsetB]; dst[dstoffsetB] = (tmp2 >= 0 ? tmp2 : 0); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstfmt); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_SUB(tmp2, sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_mul(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; Uint32 tmp; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { tmp = ((dst[dstoffsetR] && src[srcoffsetR]) ? ((dst[dstoffsetR] * src[srcoffsetR]) + 255) >> 8 : 0); dst[dstoffsetR] = (tmp <= 255 ? tmp : 255); tmp = ((dst[dstoffsetG] && src[srcoffsetG]) ? ((dst[dstoffsetG] * src[srcoffsetG]) + 255) >> 8 : 0); dst[dstoffsetG] = (tmp <= 255 ? tmp : 255); tmp = ((dst[dstoffsetB] && src[srcoffsetB]) ? ((dst[dstoffsetB] * src[srcoffsetB]) + 255) >> 8 : 0); dst[dstoffsetB] = (tmp <= 255 ? tmp : 255); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); *dst = (Uint8)SDL_MapRGB(dstfmt, dR, dG, dB); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_min(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { if (src[srcoffsetR] < dst[dstoffsetR]) { dst[dstoffsetR] = src[srcoffsetR]; } if (src[srcoffsetG] < dst[dstoffsetG]) { dst[dstoffsetG] = src[srcoffsetG]; } if (src[srcoffsetB] < dst[dstoffsetB]) { dst[dstoffsetB] = src[srcoffsetB]; } src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); *dst = (Uint8)SDL_MapRGB(dstfmt, dR, dG, dB); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void blit_blend_max(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; Uint32 pixel; int srcppa = info->src_blend != SDL_BLENDMODE_NONE && srcfmt->Amask; int dstppa = info->dst_blend != SDL_BLENDMODE_NONE && dstfmt->Amask; if (srcbpp >= 3 && dstbpp >= 3 && info->src_blend == SDL_BLENDMODE_NONE) { size_t srcoffsetR, srcoffsetG, srcoffsetB; size_t dstoffsetR, dstoffsetG, dstoffsetB; if (srcbpp == 3) { SET_OFFSETS_24(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } else { SET_OFFSETS_32(srcoffsetR, srcoffsetG, srcoffsetB, srcfmt); } if (dstbpp == 3) { SET_OFFSETS_24(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } else { SET_OFFSETS_32(dstoffsetR, dstoffsetG, dstoffsetB, dstfmt); } while (height--) { LOOP_UNROLLED4( { if (src[srcoffsetR] > dst[dstoffsetR]) { dst[dstoffsetR] = src[srcoffsetR]; } if (src[srcoffsetG] > dst[dstoffsetG]) { dst[dstoffsetG] = src[srcoffsetG]; } if (src[srcoffsetB] > dst[dstoffsetB]) { dst[dstoffsetB] = src[srcoffsetB]; } src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } return; } if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXELVALS_1(dR, dG, dB, dA, dst, dstfmt); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); SET_PIXELVAL(dst, dstfmt, dR, dG, dB, dA); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); dst[offsetR] = dR; dst[offsetG] = dG; dst[offsetB] = dB; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); GET_PIXEL(pixel, dstbpp, dst); GET_PIXELVALS(dR, dG, dB, dA, pixel, dstfmt, dstppa); BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA); CREATE_PIXEL(dst, dR, dG, dB, dA, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } /* --------------------------------------------------------- */ static void alphablit_alpha(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; int dRi, dGi, dBi, dAi, sRi, sGi, sBi, sAi; Uint32 modulateA = info->src_blanket_alpha; Uint32 pixel; /* printf ("Alpha blit with %d and %d\n", srcbpp, dstbpp); */ if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, sAi, src, srcfmt); GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sRi, sGi, sBi, sAi, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, sAi, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sRi, sGi, sBi, sAi, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sR, sG, sB, sA, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); /* modulate Alpha */ sA = (sA * modulateA) / 255; dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sR, sG, sB, sA, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void alphablit_colorkey(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; int dRi, dGi, dBi, dAi, sRi, sGi, sBi, sAi; int alpha = info->src_blanket_alpha; Uint32 colorkey = info->src_colorkey; Uint32 pixel; /* printf ("Colorkey blit with %d and %d\n", srcbpp, dstbpp); */ assert(info->src_has_colorkey); if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, sAi, src, srcfmt); sAi = (*src == colorkey) ? 0 : alpha; GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sRi, sGi, sBi, sAi, dRi, dGi, dBi, dAi); *dst = (Uint8)SDL_MapRGBA(dstfmt, dRi, dGi, dBi, dAi); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, sAi, src, srcfmt); sAi = (*src == colorkey) ? 0 : alpha; GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sRi, sGi, sBi, sAi, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); sA = (pixel == colorkey) ? 0 : alpha; GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sR, sG, sB, sA, dRi, dGi, dBi, dAi); *dst = (Uint8)SDL_MapRGBA(dstfmt, dRi, dGi, dBi, dAi); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { /* This is interim code until SDL can properly handle self blits of surfaces with blanket alpha. */ size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); sA = (pixel == colorkey) ? 0 : alpha; GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sR, sG, sB, sA, dRi, dGi, dBi, dAi); dst[offsetR] = (Uint8)dRi; dst[offsetG] = (Uint8)dGi; dst[offsetB] = (Uint8)dBi; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); sA = (pixel == colorkey) ? 0 : alpha; GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sR, sG, sB, sA, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } static void alphablit_solid(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint8 *src = info->s_pixels; int srcpxskip = info->s_pxskip; int srcskip = info->s_skip; Uint8 *dst = info->d_pixels; int dstpxskip = info->d_pxskip; int dstskip = info->d_skip; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; int dRi, dGi, dBi, dAi, sRi, sGi, sBi; int alpha = info->src_blanket_alpha; int pixel; /* printf ("Solid blit with %d and %d\n", srcbpp, dstbpp); */ if (srcbpp == 1) { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, dAi, src, srcfmt); GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sRi, sGi, sBi, alpha, dRi, dGi, dBi, dAi); *dst = (Uint8)SDL_MapRGBA(dstfmt, dRi, dGi, dBi, dAi); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* dstbpp > 1 */ { while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sRi, sGi, sBi, dAi, src, srcfmt); GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sRi, sGi, sBi, alpha, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } else /* srcbpp > 1 */ { if (dstbpp == 1) { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); GET_PIXELVALS_1(dRi, dGi, dBi, dAi, dst, dstfmt); ALPHA_BLEND(sR, sG, sB, alpha, dRi, dGi, dBi, dAi); *dst = (Uint8)SDL_MapRGBA(dstfmt, dRi, dGi, dBi, dAi); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else if (dstbpp == 3) { /* This is interim code until SDL can properly handle self blits of surfaces with blanket alpha. */ size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, dstfmt); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sR, sG, sB, alpha, dRi, dGi, dBi, dAi); dst[offsetR] = (Uint8)dRi; dst[offsetG] = (Uint8)dGi; dst[offsetB] = (Uint8)dBi; src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } else /* even dstbpp */ { while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src); SDL_GetRGBA(pixel, srcfmt, &sR, &sG, &sB, &sA); GET_PIXEL(pixel, dstbpp, dst); SDL_GetRGBA(pixel, dstfmt, &dR, &dG, &dB, &dA); dRi = dR; dGi = dG; dBi = dB; dAi = dA; ALPHA_BLEND(sR, sG, sB, alpha, dRi, dGi, dBi, dAi); CREATE_PIXEL(dst, dRi, dGi, dBi, dAi, dstbpp, dstfmt); src += srcpxskip; dst += dstpxskip; }, n, width); src += srcskip; dst += dstskip; } } } } /*we assume the "dst" has pixel alpha*/ int pygame_Blit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args) { SDL_Rect fulldst; int srcx, srcy, w, h; /* Make sure the surfaces aren't locked */ if (!src || !dst) { SDL_SetError("pygame_Blit: passed a NULL surface"); return (-1); } if (src->locked || dst->locked) { SDL_SetError("pygame_Blit: Surfaces must not be locked during blit"); return (-1); } /* If the destination rectangle is NULL, use the entire dest surface */ if (dstrect == NULL) { fulldst.x = fulldst.y = 0; dstrect = &fulldst; } /* clip the source rectangle to the source surface */ if (srcrect) { int maxw, maxh; srcx = srcrect->x; w = srcrect->w; if (srcx < 0) { w += srcx; dstrect->x -= srcx; srcx = 0; } maxw = src->w - srcx; if (maxw < w) w = maxw; srcy = srcrect->y; h = srcrect->h; if (srcy < 0) { h += srcy; dstrect->y -= srcy; srcy = 0; } maxh = src->h - srcy; if (maxh < h) h = maxh; } else { srcx = srcy = 0; w = src->w; h = src->h; } /* clip the destination rectangle against the clip rectangle */ { SDL_Rect *clip = &dst->clip_rect; int dx, dy; dx = clip->x - dstrect->x; if (dx > 0) { w -= dx; dstrect->x += dx; srcx += dx; } dx = dstrect->x + w - clip->x - clip->w; if (dx > 0) w -= dx; dy = clip->y - dstrect->y; if (dy > 0) { h -= dy; dstrect->y += dy; srcy += dy; } dy = dstrect->y + h - clip->y - clip->h; if (dy > 0) h -= dy; } if (w > 0 && h > 0) { SDL_Rect sr; sr.x = srcx; sr.y = srcy; sr.w = dstrect->w = w; sr.h = dstrect->h = h; return SoftBlitPyGame(src, &sr, dst, dstrect, the_args); } dstrect->w = dstrect->h = 0; return 0; } int pygame_AlphaBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args) { return pygame_Blit(src, srcrect, dst, dstrect, the_args); } int premul_surf_color_by_alpha(SDL_Surface *src, SDL_Surface *dst) { SDL_BlendMode src_blend; SDL_GetSurfaceBlendMode(src, &src_blend); if (src_blend == SDL_BLENDMODE_NONE && !(src->format->Amask != 0)) return -1; // since we know dst is a copy of src we can simplify the normal checks #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN #if defined(__SSE2__) if ((src->format->BytesPerPixel == 4) && SDL_HasSSE2()) { premul_surf_color_by_alpha_sse2(src, dst); return 0; } #endif /* __SSE2__*/ #if PG_ENABLE_ARM_NEON if ((src->format->BytesPerPixel == 4) && SDL_HasNEON()) { premul_surf_color_by_alpha_sse2(src, dst); return 0; } #endif /* PG_ENABLE_ARM_NEON */ #endif /* SDL_BYTEORDER == SDL_LIL_ENDIAN */ #endif /* __EMSCRIPTEN__ */ premul_surf_color_by_alpha_non_simd(src, dst); return 0; } void premul_surf_color_by_alpha_non_simd(SDL_Surface *src, SDL_Surface *dst) { SDL_PixelFormat *srcfmt = src->format; SDL_PixelFormat *dstfmt = dst->format; int width = src->w; int height = src->h; int srcbpp = srcfmt->BytesPerPixel; int dstbpp = dstfmt->BytesPerPixel; Uint8 *src_pixels = (Uint8 *)src->pixels; Uint8 *dst_pixels = (Uint8 *)dst->pixels; int srcpxskip = src->format->BytesPerPixel; int dstpxskip = dst->format->BytesPerPixel; int srcppa = SDL_TRUE; int n; int pixel; Uint8 dR, dG, dB, dA, sR, sG, sB, sA; while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, srcbpp, src_pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, srcfmt, srcppa); dR = (Uint8)(((sR + 1) * sA) >> 8); dG = (Uint8)(((sG + 1) * sA) >> 8); dB = (Uint8)(((sB + 1) * sA) >> 8); dA = sA; CREATE_PIXEL(dst_pixels, dR, dG, dB, dA, dstbpp, dstfmt); src_pixels += srcpxskip; dst_pixels += dstpxskip; }, n, width); } } #define _PG_WARN_SIMD(s) \ if (pg_##s##_at_runtime_but_uncompiled()) { \ if (PyErr_WarnEx( \ PyExc_RuntimeWarning, \ "Your system is " #s " capable but pygame was not " \ "built with support for it. The performance of some " \ "of your blits could be adversely affected. Consider" \ " enabling compile time detection with environment " \ "variables like PYGAME_DETECT_AVX2=1 if you are " \ "compiling without cross compilation.", \ 1) < 0) { \ return -1; \ } \ } /* On error, returns -1 with python error set. */ int pg_warn_simd_at_runtime_but_uncompiled() { _PG_WARN_SIMD(avx2) _PG_WARN_SIMD(sse2) _PG_WARN_SIMD(neon) return 0; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0031118 pygame-2.6.1/src_c/base.c0000644000175100001770000020741614676242340014600 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #define NO_PYGAME_C_API #define PYGAMEAPI_BASE_INTERNAL #include "pygame.h" #include "doc/pygame_doc.h" #include "pgarrinter.h" #include "pgcompat.h" /* This file controls all the initialization of * the module and the various SDL subsystems */ /*platform specific init stuff*/ #ifdef MS_WIN32 /*python gives us MS_WIN32*/ #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include extern int SDL_RegisterApp(const char *, Uint32, void *); #endif #if defined(macintosh) #if (!defined(__MWERKS__) && !TARGET_API_MAC_CARBON) QDGlobals pg_qd; #endif #endif #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define PAI_MY_ENDIAN '<' #define PAI_OTHER_ENDIAN '>' #define BUF_OTHER_ENDIAN '>' #else #define PAI_MY_ENDIAN '>' #define PAI_OTHER_ENDIAN '<' #define BUF_OTHER_ENDIAN '<' #endif #define BUF_MY_ENDIAN '=' /* Extended array struct */ typedef struct pg_capsule_interface_s { PyArrayInterface inter; Py_intptr_t imem[1]; } pgCapsuleInterface; /* Py_buffer internal data for an array interface/struct */ typedef struct pg_view_internals_s { char format[4]; /* make 4 byte word sized */ Py_ssize_t imem[1]; } pgViewInternals; /* Custom exceptions */ static PyObject *pgExc_BufferError = NULL; /* Only one instance of the state per process. */ static PyObject *pg_quit_functions = NULL; static int pg_is_init = 0; static int pg_sdl_was_init = 0; SDL_Window *pg_default_window = NULL; pgSurfaceObject *pg_default_screen = NULL; static char *pg_env_blend_alpha_SDL2 = NULL; static void pg_atexit_quit(void); static int pgGetArrayStruct(PyObject *, PyObject **, PyArrayInterface **); static PyObject * pgArrayStruct_AsDict(PyArrayInterface *); static PyObject * pgBuffer_AsArrayInterface(Py_buffer *); static PyObject * pgBuffer_AsArrayStruct(Py_buffer *); static int _pg_buffer_is_byteswapped(Py_buffer *); static void pgBuffer_Release(pg_buffer *); static int pgObject_GetBuffer(PyObject *, pg_buffer *, int); static int pgGetArrayInterface(PyObject **, PyObject *); static int pgArrayStruct_AsBuffer(pg_buffer *, PyArrayInterface *, int); static int _pg_arraystruct_as_buffer(Py_buffer *, PyArrayInterface *, int); static int _pg_arraystruct_to_format(char *, PyArrayInterface *, int); static int pgDict_AsBuffer(pg_buffer *, PyObject *, int); static int _pg_shape_check(PyObject *); static int _pg_typestr_check(PyObject *); static int _pg_strides_check(PyObject *); static int _pg_data_check(PyObject *); static int _pg_is_int_tuple(PyObject *); static int _pg_values_as_buffer(Py_buffer *, int, PyObject *, PyObject *, PyObject *, PyObject *); static int _pg_int_tuple_as_ssize_arr(PyObject *, Py_ssize_t *); static int _pg_typestr_as_format(PyObject *, char *, Py_ssize_t *); static PyObject * pg_view_get_typestr_obj(Py_buffer *); static PyObject * pg_view_get_shape_obj(Py_buffer *); static PyObject * pg_view_get_strides_obj(Py_buffer *); static PyObject * pg_view_get_data_obj(Py_buffer *); static char _pg_as_arrayinter_typekind(Py_buffer *); static char _pg_as_arrayinter_byteorder(Py_buffer *); static int _pg_as_arrayinter_flags(Py_buffer *); static pgCapsuleInterface * _pg_new_capsuleinterface(Py_buffer *); static void _pg_capsule_PyMem_Free(PyObject *); static PyObject * _pg_shape_as_tuple(PyArrayInterface *); static PyObject * _pg_typekind_as_str(PyArrayInterface *); static PyObject * _pg_strides_as_tuple(PyArrayInterface *); static PyObject * _pg_data_as_tuple(PyArrayInterface *); static PyObject * pg_get_array_interface(PyObject *, PyObject *); static void _pg_release_buffer_array(Py_buffer *); static void _pg_release_buffer_generic(Py_buffer *); static SDL_Window * pg_GetDefaultWindow(void); static void pg_SetDefaultWindow(SDL_Window *); static pgSurfaceObject * pg_GetDefaultWindowSurface(void); static void pg_SetDefaultWindowSurface(pgSurfaceObject *); static char * pg_EnvShouldBlendAlphaSDL2(void); /* compare compiled to linked, raise python error on incompatibility */ static int pg_CheckSDLVersions(void) { SDL_version compiled; SDL_version linked; SDL_VERSION(&compiled); SDL_GetVersion(&linked); /* only check the major version, in general major version is bumped for ABI * incompatible changes */ if (compiled.major != linked.major) { PyErr_Format(PyExc_RuntimeError, "ABI incompatibility detected! SDL compiled with " "%d.%d.%d, linked to %d.%d.%d (major versions should " "have matched)", compiled.major, compiled.minor, compiled.patch, linked.major, linked.minor, linked.patch); return 0; } /* Basically, this is compiled_version > linked_version case, which we * don't allow */ if ((linked.minor == compiled.minor && linked.patch < compiled.patch) || linked.minor < compiled.minor) { /* We do some ifdefs to support different SDL versions at compile time. We use newer API only when available. Downgrading via dynamic API probably breaks this.*/ PyErr_Format(PyExc_RuntimeError, "Dynamic linking causes SDL downgrade! (compiled with " "version %d.%d.%d, linked to %d.%d.%d)", compiled.major, compiled.minor, compiled.patch, linked.major, linked.minor, linked.patch); return 0; } return 1; } /** * Use this function to register a function to be called when the interpreter * exits. * * \param func A function pointer to be called when the interpreter exits. */ void pg_RegisterQuit(void (*func)(void)) { if (!pg_quit_functions) { pg_quit_functions = PyList_New(0); if (!pg_quit_functions) { return; } } if (func) { PyObject *obj = PyCapsule_New(func, "quit", NULL); if (!obj) { return; } /* There is no difference between success and error for PyList_Append in this case */ (void)PyList_Append(pg_quit_functions, obj); Py_DECREF(obj); } } /** * Use this function to register a function to be called when the interpreter * exits. * * \param value A callable object to be called when the interpreter exits. * \returns None or NULL on failure. */ static PyObject * pg_register_quit(PyObject *self, PyObject *value) { if (!pg_quit_functions) { pg_quit_functions = PyList_New(0); if (!pg_quit_functions) { return NULL; } } if (0 != PyList_Append(pg_quit_functions, value)) { return NULL; /* Exception already set */ } Py_RETURN_NONE; } /** * \brief Initialize all of the pygame modules. * \returns 1 on success, 0 on failure with PyErr set. */ static int pg_mod_autoinit(const char *modname) { PyObject *module, *funcobj, *temp; int ret = 0; module = PyImport_ImportModule(modname); if (!module) return 0; funcobj = PyObject_GetAttrString(module, "_internal_mod_init"); /* If we could not load _internal_mod_init, load init function */ if (!funcobj) { PyErr_Clear(); funcobj = PyObject_GetAttrString(module, "init"); } if (funcobj) { temp = PyObject_CallObject(funcobj, NULL); if (temp) { Py_DECREF(temp); ret = 1; } } Py_DECREF(module); Py_XDECREF(funcobj); return ret; } /** * \brief Quit all of the pygame modules. */ static void pg_mod_autoquit(const char *modname) { PyObject *module, *funcobj, *temp; module = PyImport_ImportModule(modname); if (!module) { PyErr_Clear(); return; } funcobj = PyObject_GetAttrString(module, "_internal_mod_quit"); if (PyErr_Occurred()) PyErr_Clear(); /* If we could not load _internal_mod_quit, load quit function */ if (!funcobj) funcobj = PyObject_GetAttrString(module, "quit"); if (PyErr_Occurred()) PyErr_Clear(); if (funcobj) { temp = PyObject_CallObject(funcobj, NULL); Py_XDECREF(temp); } if (PyErr_Occurred()) PyErr_Clear(); Py_DECREF(module); Py_XDECREF(funcobj); } /** * \brief Initialize all of the pygame modules. */ static PyObject * pg_init(PyObject *self, PyObject *_null) { int i = 0, success = 0, fail = 0; /* Put all the module names we want to init in this array */ const char *modnames[] = { IMPPREFIX "display", /* Display first, this also inits event,time */ IMPPREFIX "joystick", IMPPREFIX "font", IMPPREFIX "freetype", IMPPREFIX "mixer", /* IMPPREFIX "_sdl2.controller", Is this required? Comment for now*/ NULL}; /*nice to initialize timer, so startup time will reflec pg_init() time*/ #if defined(WITH_THREAD) && !defined(MS_WIN32) && defined(SDL_INIT_EVENTTHREAD) pg_sdl_was_init = SDL_Init(SDL_INIT_EVENTTHREAD | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE) == 0; #else pg_sdl_was_init = SDL_Init(SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE) == 0; #endif pg_env_blend_alpha_SDL2 = SDL_getenv("PYGAME_BLEND_ALPHA_SDL2"); /* initialize all pygame modules */ for (i = 0; modnames[i]; i++) { if (pg_mod_autoinit(modnames[i])) success++; else { /* ImportError is neither counted as success nor failure */ if (!PyErr_ExceptionMatches(PyExc_ImportError)) fail++; PyErr_Clear(); } } pg_is_init = 1; return Py_BuildValue("(ii)", success, fail); } /** * \brief Quit all of the pygame modules when the interpreter exits. */ static void pg_atexit_quit(void) { /* Maybe it is safe to call SDL_quit more than once after an SDL_Init, but this is undocumented. So play it safe and only call after a successful SDL_Init. */ if (pg_sdl_was_init) { pg_sdl_was_init = 0; SDL_Quit(); } } /** * \brief Get the SDL version. * \returns A tuple of the SDL version numbers (major, minor, patch). */ static PyObject * pg_get_sdl_version(PyObject *self, PyObject *args, PyObject *kwargs) { int linked = 1; /* Default is linked version. */ SDL_version v; static char *keywords[] = {"linked", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) { return NULL; /* Exception already set. */ } if (linked) { SDL_GetVersion(&v); } else { SDL_VERSION(&v); } return Py_BuildValue("iii", v.major, v.minor, v.patch); } /** * \brief Get the SDL byte order. * \returns The SDL byte order. * * SDL_BYTEORDER is SDL_LIL_ENDIAN for x86, x64, and similar systems that use * the little endian byte order. SDL_BYTEORDER is SDL_BIG_ENDIAN for PowerPC * and similar systems that use the big endian byte order. * */ static PyObject * pg_get_sdl_byteorder(PyObject *self, PyObject *_null) { return PyLong_FromLong(SDL_BYTEORDER); } /** * \brief Quit all pygame modules. */ static void _pg_quit(void) { Py_ssize_t num, i; PyObject *quit, *privatefuncs, *temp; /* Put all the module names we want to quit in this array */ const char *modnames[] = { /* IMPPREFIX "_sdl2.controller", Is this required?, comment for now */ IMPPREFIX "mixer", IMPPREFIX "freetype", IMPPREFIX "font", IMPPREFIX "joystick", IMPPREFIX "display", /* Display last, this also quits event,time */ NULL}; if (pg_quit_functions) { privatefuncs = pg_quit_functions; pg_quit_functions = NULL; num = PyList_Size(privatefuncs); /*quit funcs in reverse order*/ while (num--) { quit = PyList_GET_ITEM(privatefuncs, num); if (!quit) { PyErr_Clear(); continue; } if (PyCallable_Check(quit)) { temp = PyObject_CallObject(quit, NULL); if (temp) Py_DECREF(temp); else PyErr_Clear(); } else if (PyCapsule_CheckExact(quit)) { void *ptr = PyCapsule_GetPointer(quit, "quit"); (*(void (*)(void))ptr)(); } } Py_DECREF(privatefuncs); } /* quit all pygame modules */ for (i = 0; modnames[i]; i++) { pg_mod_autoquit(modnames[i]); } /* Because quit never errors */ if (PyErr_Occurred()) PyErr_Clear(); pg_is_init = 0; /* Release the GIL here, because the timer thread cleanups should happen * without deadlocking. */ Py_BEGIN_ALLOW_THREADS; pg_atexit_quit(); Py_END_ALLOW_THREADS; } /** * \brief Quit all pygame modules. */ static PyObject * pg_quit(PyObject *self, PyObject *_null) { _pg_quit(); Py_RETURN_NONE; } /** * \brief Check if pygame is initialized. * \returns True if pygame is initialized, False otherwise. */ static PyObject * pg_base_get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(pg_is_init); } /* internal C API utility functions */ /** * \brief Convert number like object *obj* to C int and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ static int pg_IntFromObj(PyObject *obj, int *val) { int tmp_val; if (PyFloat_Check(obj)) { /* Python3.8 complains with deprecation warnings if we pass * floats to PyLong_AsLong. */ double dv = PyFloat_AsDouble(obj); tmp_val = (int)dv; } else { tmp_val = PyLong_AsLong(obj); } if (tmp_val == -1 && PyErr_Occurred()) { PyErr_Clear(); return 0; } *val = tmp_val; return 1; } /** * \brief Convert number like object at position *i* in sequence *obj* * to C int and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ static int pg_IntFromObjIndex(PyObject *obj, int i, int *val) { int result = 0; PyObject *item = PySequence_GetItem(obj, i); if (!item) { PyErr_Clear(); return 0; } result = pg_IntFromObj(item, val); Py_DECREF(item); return result; } /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * int and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C integer to store the result. * \param val2 A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ static int pg_TwoIntsFromObj(PyObject *obj, int *val1, int *val2) { if (PyTuple_Check(obj) && PyTuple_Size(obj) == 1) { return pg_TwoIntsFromObj(PyTuple_GET_ITEM(obj, 0), val1, val2); } if (!PySequence_Check(obj) || PySequence_Length(obj) != 2) { return 0; } if (!pg_IntFromObjIndex(obj, 0, val1) || !pg_IntFromObjIndex(obj, 1, val2)) { return 0; } return 1; } /** * \brief Convert number like object *obj* to C float and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ static int pg_FloatFromObj(PyObject *obj, float *val) { float f = (float)PyFloat_AsDouble(obj); if (f == -1 && PyErr_Occurred()) { PyErr_Clear(); return 0; } *val = f; return 1; } /** * \brief Convert number like object at position *i* in sequence *obj* to C * float and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ static int pg_FloatFromObjIndex(PyObject *obj, int i, float *val) { int result = 0; PyObject *item = PySequence_GetItem(obj, i); if (!item) { PyErr_Clear(); return 0; } result = pg_FloatFromObj(item, val); Py_DECREF(item); return result; } /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * float and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C float to store the result. * \param val2 A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ static int pg_TwoFloatsFromObj(PyObject *obj, float *val1, float *val2) { if (PyTuple_Check(obj) && PyTuple_Size(obj) == 1) { return pg_TwoFloatsFromObj(PyTuple_GET_ITEM(obj, 0), val1, val2); } if (!PySequence_Check(obj) || PySequence_Length(obj) != 2) { return 0; } if (!pg_FloatFromObjIndex(obj, 0, val1) || !pg_FloatFromObjIndex(obj, 1, val2)) { return 0; } return 1; } /** * \brief Convert number like object *obj* to C double and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ static int pg_DoubleFromObj(PyObject *obj, double *val) { double d = (double)PyFloat_AsDouble(obj); if (d == -1 && PyErr_Occurred()) { PyErr_Clear(); return 0; } *val = d; return 1; } /** * \brief Convert number like object at position *i* in sequence *obj* to C * double and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ static int pg_DoubleFromObjIndex(PyObject *obj, int i, double *val) { int result = 0; PyObject *item = PySequence_GetItem(obj, i); if (!item) { PyErr_Clear(); return 0; } result = pg_DoubleFromObj(item, val); Py_DECREF(item); return result; } /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * double and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C double to store the result. * \param val2 A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ static int pg_TwoDoublesFromObj(PyObject *obj, double *val1, double *val2) { if (PyTuple_Check(obj) && PyTuple_Size(obj) == 1) { return pg_TwoDoublesFromObj(PyTuple_GET_ITEM(obj, 0), val1, val2); } if (!PySequence_Check(obj) || PySequence_Length(obj) != 2) { return 0; } if (!pg_DoubleFromObjIndex(obj, 0, val1) || !pg_DoubleFromObjIndex(obj, 1, val2)) { return 0; } return 1; } /** * \brief Convert number like object *obj* to C Uint32 and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C int to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ static int pg_UintFromObj(PyObject *obj, Uint32 *val) { if (PyNumber_Check(obj)) { PyObject *longobj; if (!(longobj = PyNumber_Long(obj))) { PyErr_Clear(); return 0; } *val = (Uint32)PyLong_AsUnsignedLong(longobj); Py_DECREF(longobj); if (PyErr_Occurred()) { PyErr_Clear(); return 0; } return 1; } return 0; } /** * \brief Convert number like object at position *i* in sequence *obj* to C * Uint32 and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C int to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ static int pg_UintFromObjIndex(PyObject *obj, int i, Uint32 *val) { int result = 0; PyObject *item = PySequence_GetItem(obj, i); if (!item) { PyErr_Clear(); return 0; } result = pg_UintFromObj(item, val); Py_DECREF(item); return result; } /** * \brief Convert the color represented by object *obj* into a red, green, * blue, alpha length 4 C array *RGBA*. * * The object must be a length 3 or 4 sequence of numbers having values between * 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is * assumed. * * \param obj The Python object to convert. * \param RGBA A pointer to the C array to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ static int pg_RGBAFromObj(PyObject *obj, Uint8 *RGBA) { Py_ssize_t length; Uint32 val; if (PyTuple_Check(obj) && PyTuple_Size(obj) == 1) { return pg_RGBAFromObj(PyTuple_GET_ITEM(obj, 0), RGBA); } if (!PySequence_Check(obj)) { return 0; } length = PySequence_Length(obj); if (length < 3 || length > 4) { return 0; } if (!pg_UintFromObjIndex(obj, 0, &val) || val > 255) { return 0; } RGBA[0] = (Uint8)val; if (!pg_UintFromObjIndex(obj, 1, &val) || val > 255) { return 0; } RGBA[1] = (Uint8)val; if (!pg_UintFromObjIndex(obj, 2, &val) || val > 255) { return 0; } RGBA[2] = (Uint8)val; if (length == 4) { if (!pg_UintFromObjIndex(obj, 3, &val) || val > 255) { return 0; } RGBA[3] = (Uint8)val; } else { RGBA[3] = (Uint8)255; } return 1; } /** * \brief Returns the SDL error message as a Python string. * \returns The SDL error message as a Python string. */ static PyObject * pg_get_error(PyObject *self, PyObject *_null) { return PyUnicode_FromString(SDL_GetError()); } /** * \brief Sets the SDL error message. * \param s The module object. * \param args errstring The error message to set. * \returns None. */ static PyObject * pg_set_error(PyObject *s, PyObject *args) { char *errstring = NULL; #if defined(PYPY_VERSION) if (!PyArg_ParseTuple(args, "es", "UTF-8", &errstring)) return NULL; SDL_SetError("%s", errstring); PyMem_Free(errstring); #else if (!PyArg_ParseTuple(args, "s", &errstring)) { return NULL; } SDL_SetError("%s", errstring); #endif Py_RETURN_NONE; } /*array interface*/ /** * \brief Returns the array interface of the object. * * \param obj The object to get the array interface from. * \param cobj_p A pointer to a PyObject pointer to store the array interface * in. * \param inter_p A pointer to a PyArrayInterface pointer to store the * array interface in. * * \returns -1 if an error occurred, 0 otherwise. */ static int pgGetArrayStruct(PyObject *obj, PyObject **cobj_p, PyArrayInterface **inter_p) { PyObject *cobj = PyObject_GetAttrString(obj, "__array_struct__"); PyArrayInterface *inter = NULL; if (cobj == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); PyErr_SetString(PyExc_ValueError, "no C-struct array interface"); } return -1; } if (PyCapsule_IsValid(cobj, NULL)) { inter = (PyArrayInterface *)PyCapsule_GetPointer(cobj, NULL); } if (inter == NULL || inter->two != 2 /* conditional or */) { Py_DECREF(cobj); PyErr_SetString(PyExc_ValueError, "invalid array interface"); return -1; } *cobj_p = cobj; *inter_p = inter; return 0; } /** * \brief Given a PyArrayInterface, return a python dictionary representing the * array interface. * * \param inter_p A pointer to the PyArrayInterface to convert. * * \returns A Python string representing the typekind of the array interface, * or 0 if an error occurred. */ static PyObject * pgArrayStruct_AsDict(PyArrayInterface *inter_p) { PyObject *dictobj = Py_BuildValue("{sisNsNsNsN}", "version", (int)3, "typestr", _pg_typekind_as_str(inter_p), "shape", _pg_shape_as_tuple(inter_p), "strides", _pg_strides_as_tuple(inter_p), "data", _pg_data_as_tuple(inter_p)); if (!dictobj) { return 0; } if (inter_p->flags & PAI_ARR_HAS_DESCR) { if (!inter_p->descr) { Py_DECREF(dictobj); PyErr_SetString(PyExc_ValueError, "Array struct has descr flag set" " but no descriptor"); return 0; } if (PyDict_SetItemString(dictobj, "descr", inter_p->descr)) { Py_DECREF(dictobj); return 0; } } return dictobj; } /** * \brief Given a Py_buffer, return a python dictionary representing the array * interface. * * \param view_p A pointer to the Py_buffer to convert to a dictionary. * * \returns A Python dictionary representing the array interface of the object. */ static PyObject * pgBuffer_AsArrayInterface(Py_buffer *view_p) { return Py_BuildValue("{sisNsNsNsN}", "version", (int)3, "typestr", pg_view_get_typestr_obj(view_p), "shape", pg_view_get_shape_obj(view_p), "strides", pg_view_get_strides_obj(view_p), "data", pg_view_get_data_obj(view_p)); } /** * \brief Given a Py_buffer, return a python capsule representing the array * interface. * * \param view_p A pointer to the Py_buffer to convert to a capsule. * * \returns A Python capsule representing the array interface of the object. */ static PyObject * pgBuffer_AsArrayStruct(Py_buffer *view_p) { void *cinter_p = _pg_new_capsuleinterface(view_p); PyObject *capsule; if (!cinter_p) { return 0; } capsule = PyCapsule_New(cinter_p, 0, _pg_capsule_PyMem_Free); if (!capsule) { PyMem_Free(cinter_p); return 0; } return capsule; } /** * \brief Given a Py_buffer, return an allocated pgCapsuleInterface struct. * * \param view_p A pointer to the Py_buffer to get the pgCapsuleInterface from. * * \returns A capsule containing a pgCapsuleInterface struct. */ static pgCapsuleInterface * _pg_new_capsuleinterface(Py_buffer *view_p) { int ndim = view_p->ndim; Py_ssize_t cinter_size; pgCapsuleInterface *cinter_p; int i; cinter_size = (sizeof(pgCapsuleInterface) + sizeof(Py_intptr_t) * (2 * ndim - 1)); cinter_p = (pgCapsuleInterface *)PyMem_Malloc(cinter_size); if (!cinter_p) { PyErr_NoMemory(); return 0; } cinter_p->inter.two = 2; cinter_p->inter.nd = ndim; cinter_p->inter.typekind = _pg_as_arrayinter_typekind(view_p); cinter_p->inter.itemsize = (int)view_p->itemsize; cinter_p->inter.flags = _pg_as_arrayinter_flags(view_p); if (view_p->shape) { cinter_p->inter.shape = cinter_p->imem; for (i = 0; i < ndim; ++i) { cinter_p->inter.shape[i] = (Py_intptr_t)view_p->shape[i]; } } if (view_p->strides) { cinter_p->inter.strides = cinter_p->imem + ndim; for (i = 0; i < ndim; ++i) { cinter_p->inter.strides[i] = (Py_intptr_t)view_p->strides[i]; } } cinter_p->inter.data = view_p->buf; cinter_p->inter.descr = 0; return cinter_p; } static void _pg_capsule_PyMem_Free(PyObject *capsule) { PyMem_Free(PyCapsule_GetPointer(capsule, 0)); } static int _pg_as_arrayinter_flags(Py_buffer *view_p) { int inter_flags = PAI_ALIGNED; /* atomic int types always aligned */ if (!view_p->readonly) { inter_flags |= PAI_WRITEABLE; } inter_flags |= _pg_buffer_is_byteswapped(view_p) ? 0 : PAI_NOTSWAPPED; if (PyBuffer_IsContiguous(view_p, 'C')) { inter_flags |= PAI_CONTIGUOUS; } if (PyBuffer_IsContiguous(view_p, 'F')) { inter_flags |= PAI_FORTRAN; } return inter_flags; } static PyObject * pg_view_get_typestr_obj(Py_buffer *view) { return PyUnicode_FromFormat("%c%c%i", _pg_as_arrayinter_byteorder(view), _pg_as_arrayinter_typekind(view), (int)view->itemsize); } static PyObject * pg_view_get_shape_obj(Py_buffer *view) { PyObject *shapeobj = PyTuple_New(view->ndim); PyObject *lengthobj; Py_ssize_t i; if (!shapeobj) { return 0; } for (i = 0; i < view->ndim; ++i) { lengthobj = PyLong_FromLong((long)view->shape[i]); if (!lengthobj) { Py_DECREF(shapeobj); return 0; } PyTuple_SET_ITEM(shapeobj, i, lengthobj); } return shapeobj; } static PyObject * pg_view_get_strides_obj(Py_buffer *view) { PyObject *shapeobj = PyTuple_New(view->ndim); PyObject *lengthobj; Py_ssize_t i; if (!shapeobj) { return 0; } for (i = 0; i < view->ndim; ++i) { lengthobj = PyLong_FromLong((long)view->strides[i]); if (!lengthobj) { Py_DECREF(shapeobj); return 0; } PyTuple_SET_ITEM(shapeobj, i, lengthobj); } return shapeobj; } static PyObject * pg_view_get_data_obj(Py_buffer *view) { return Py_BuildValue("NN", PyLong_FromVoidPtr(view->buf), PyBool_FromLong((long)view->readonly)); } static char _pg_as_arrayinter_typekind(Py_buffer *view) { char type = view->format ? view->format[0] : 'B'; char typekind = 'V'; switch (type) { case '<': case '>': case '=': case '@': case '!': type = view->format[1]; } switch (type) { case 'b': case 'h': case 'i': case 'l': case 'q': typekind = 'i'; break; case 'B': case 'H': case 'I': case 'L': case 'Q': typekind = 'u'; break; case 'f': case 'd': typekind = 'f'; break; default: /* Unknown type */ typekind = 'V'; } return typekind; } static char _pg_as_arrayinter_byteorder(Py_buffer *view) { char format_0 = view->format ? view->format[0] : 'B'; char byteorder; if (view->itemsize == 1) { byteorder = '|'; } else { switch (format_0) { case '<': case '>': byteorder = format_0; break; case '!': byteorder = '>'; break; case 'c': case 's': case 'p': case 'b': case 'B': byteorder = '|'; break; default: byteorder = PAI_MY_ENDIAN; } } return byteorder; } static PyObject * _pg_shape_as_tuple(PyArrayInterface *inter_p) { PyObject *shapeobj = PyTuple_New((Py_ssize_t)inter_p->nd); PyObject *lengthobj; Py_ssize_t i; if (!shapeobj) { return 0; } for (i = 0; i < inter_p->nd; ++i) { lengthobj = PyLong_FromLong((long)inter_p->shape[i]); if (!lengthobj) { Py_DECREF(shapeobj); return 0; } PyTuple_SET_ITEM(shapeobj, i, lengthobj); } return shapeobj; } static PyObject * _pg_typekind_as_str(PyArrayInterface *inter_p) { return PyUnicode_FromFormat( "%c%c%i", inter_p->itemsize > 1 ? ((inter_p->flags & PAI_NOTSWAPPED) ? PAI_MY_ENDIAN : PAI_OTHER_ENDIAN) : '|', inter_p->typekind, inter_p->itemsize); } static PyObject * _pg_strides_as_tuple(PyArrayInterface *inter_p) { PyObject *stridesobj = PyTuple_New((Py_ssize_t)inter_p->nd); PyObject *lengthobj; Py_ssize_t i; if (!stridesobj) { return 0; } for (i = 0; i < inter_p->nd; ++i) { lengthobj = PyLong_FromLong((long)inter_p->strides[i]); if (!lengthobj) { Py_DECREF(stridesobj); return 0; } PyTuple_SET_ITEM(stridesobj, i, lengthobj); } return stridesobj; } static PyObject * _pg_data_as_tuple(PyArrayInterface *inter_p) { long readonly = (inter_p->flags & PAI_WRITEABLE) == 0; return Py_BuildValue("NN", PyLong_FromVoidPtr(inter_p->data), PyBool_FromLong(readonly)); } static PyObject * pg_get_array_interface(PyObject *self, PyObject *arg) { PyObject *cobj; PyArrayInterface *inter_p; PyObject *dictobj; if (pgGetArrayStruct(arg, &cobj, &inter_p)) { return 0; } dictobj = pgArrayStruct_AsDict(inter_p); Py_DECREF(cobj); return dictobj; } /** * \brief Get a buffer object from a given Python object. * * \param obj The Python object to get the buffer from. * \param pg_view_p A pointer to a pg_buffer struct to store the buffer in. * \param flags The desired buffer access mode. * * \returns 0 on success, -1 on failure. * * \note This function attempts to get a buffer object from a given Python * object. If the object supports the buffer protocol, it will be used to * create the buffer. If not, it will try to get an array interface or * dictionary representation of the object and use that to create the buffer. * If none of these methods work, it will raise a ValueError. * */ static int pgObject_GetBuffer(PyObject *obj, pg_buffer *pg_view_p, int flags) { Py_buffer *view_p = (Py_buffer *)pg_view_p; PyObject *cobj = 0; PyObject *dict = 0; PyArrayInterface *inter_p = 0; int success = 0; pg_view_p->release_buffer = _pg_release_buffer_generic; view_p->len = 0; #ifndef NDEBUG /* Allow a callback to assert that it received a pg_buffer, not a Py_buffer */ flags |= PyBUF_PYGAME; #endif if (PyObject_CheckBuffer(obj)) { char *fchar_p; if (PyObject_GetBuffer(obj, view_p, flags)) { return -1; } pg_view_p->release_buffer = PyBuffer_Release; /* Check the format is a numeric type or pad bytes */ fchar_p = view_p->format; /* Skip valid size/byte order code */ switch (*fchar_p) { case '@': case '=': case '<': case '>': case '!': ++fchar_p; break; /* default: assume it is a format type character or item count */ } /* Skip a leading digit */ switch (*fchar_p) { case '1': /* valid count for all item types */ ++fchar_p; break; case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* only valid as a pad byte count */ if (*(fchar_p + 1) == 'x') { ++fchar_p; } break; /* default: assume it is a format character */ } /* verify is a format type character */ switch (*fchar_p) { case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'x': ++fchar_p; break; default: pgBuffer_Release(pg_view_p); PyErr_SetString(PyExc_ValueError, "Unsupported array element type"); return -1; } if (*fchar_p != '\0') { pgBuffer_Release(pg_view_p); PyErr_SetString(PyExc_ValueError, "Arrays of records are unsupported"); return -1; } success = 1; } if (!success && pgGetArrayStruct(obj, &cobj, &inter_p) == 0) { if (pgArrayStruct_AsBuffer(pg_view_p, inter_p, flags)) { Py_DECREF(cobj); return -1; } Py_INCREF(obj); view_p->obj = obj; Py_DECREF(cobj); success = 1; } else if (!success) { PyErr_Clear(); } if (!success && pgGetArrayInterface(&dict, obj) == 0) { if (pgDict_AsBuffer(pg_view_p, dict, flags)) { Py_DECREF(dict); return -1; } Py_INCREF(obj); view_p->obj = obj; Py_DECREF(dict); success = 1; } else if (!success) { PyErr_Clear(); } if (!success) { PyErr_Format(PyExc_ValueError, "%s object does not export an array buffer", Py_TYPE(obj)->tp_name); return -1; } return 0; } /** * \brief Release a pg_buffer object. * * \param pg_view_p The pg_buffer object to release. * * \note This function releases a pg_buffer object. * \note some calls to this function expect this function to not clear * previously set errors. */ static void pgBuffer_Release(pg_buffer *pg_view_p) { assert(pg_view_p && pg_view_p->release_buffer); /* some calls to this function expect this function to not clear previously * set errors, so save and restore any potential errors here */ PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); pg_view_p->release_buffer((Py_buffer *)pg_view_p); PyErr_Restore(type, value, traceback); } static void _pg_release_buffer_generic(Py_buffer *view_p) { if (view_p->obj) { Py_XDECREF(view_p->obj); view_p->obj = 0; } } static void _pg_release_buffer_array(Py_buffer *view_p) { /* This is deliberately made safe for use on an uninitialized *view_p */ if (view_p->internal) { PyMem_Free(view_p->internal); view_p->internal = 0; } _pg_release_buffer_generic(view_p); } static int _pg_buffer_is_byteswapped(Py_buffer *view) { if (view->format) { switch (view->format[0]) { case '<': #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* Use macros to make static analyzer happy */ return 0; #else return 1; #endif case '>': case '!': #if SDL_BYTEORDER == SDL_BIG_ENDIAN /* Use macros to make static analyzer happy */ return 0; #else return 1; #endif } } return 0; } /** * \brief Get the "__array_interface__" from an object and store it in the dict * argument. * * \param dict A pointer to a PyObject pointer. On success, this will be set * to a new reference to the array interface dict. * \param obj The object to get the array interface from. * * \returns -1 on error, 0 on success. */ static int pgGetArrayInterface(PyObject **dict, PyObject *obj) { PyObject *inter = PyObject_GetAttrString(obj, "__array_interface__"); if (inter == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); PyErr_SetString(PyExc_ValueError, "no array interface"); } return -1; } if (!PyDict_Check(inter)) { PyErr_Format(PyExc_ValueError, "expected '__array_interface__' to return a dict: got %s", Py_TYPE(inter)->tp_name); Py_DECREF(inter); return -1; } *dict = inter; return 0; } /** * \brief Get from inter_p array interface and store in pg_view_p buffer. * * \param pg_view_p A pointer to a pg_buffer struct to fill in. * \param inter_p A pointer to a PyArrayInterface struct to use. * \param flags The buffer flags to use when filling in pg_view_p. * * \returns -1 on error, 0 on success. */ static int pgArrayStruct_AsBuffer(pg_buffer *pg_view_p, PyArrayInterface *inter_p, int flags) { pg_view_p->release_buffer = _pg_release_buffer_array; if (_pg_arraystruct_as_buffer((Py_buffer *)pg_view_p, inter_p, flags)) { pgBuffer_Release(pg_view_p); return -1; } return 0; } static int _pg_arraystruct_as_buffer(Py_buffer *view_p, PyArrayInterface *inter_p, int flags) { pgViewInternals *internal_p; Py_ssize_t sz = (sizeof(pgViewInternals) + (2 * inter_p->nd - 1) * sizeof(Py_ssize_t)); int readonly = (inter_p->flags & PAI_WRITEABLE) ? 0 : 1; Py_ssize_t i; view_p->obj = 0; view_p->internal = 0; if (PyBUF_HAS_FLAG(flags, PyBUF_WRITABLE) && readonly) { PyErr_SetString(pgExc_BufferError, "require writable buffer, but it is read-only"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS)) { if (!(inter_p->flags & (PAI_CONTIGUOUS | PAI_FORTRAN))) { PyErr_SetString(pgExc_BufferError, "buffer data is not contiguous"); return -1; } } else if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS)) { if (!(inter_p->flags & PAI_CONTIGUOUS)) { PyErr_SetString(pgExc_BufferError, "buffer data is not C contiguous"); return -1; } } else if (PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS)) { if (!(inter_p->flags & PAI_FORTRAN)) { PyErr_SetString(pgExc_BufferError, "buffer data is not F contiguous"); return -1; } } internal_p = (pgViewInternals *)PyMem_Malloc(sz); if (!internal_p) { PyErr_NoMemory(); return -1; } view_p->internal = internal_p; if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { if (_pg_arraystruct_to_format(internal_p->format, inter_p, sizeof(internal_p->format))) { return -1; } view_p->format = internal_p->format; } else { view_p->format = 0; } view_p->buf = inter_p->data; view_p->itemsize = (Py_ssize_t)inter_p->itemsize; view_p->readonly = readonly; if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view_p->ndim = (Py_ssize_t)inter_p->nd; view_p->shape = internal_p->imem; for (i = 0; i < view_p->ndim; ++i) { view_p->shape[i] = (Py_ssize_t)inter_p->shape[i]; } } else if (inter_p->flags & PAI_CONTIGUOUS) { view_p->ndim = 0; view_p->shape = 0; } else { PyErr_SetString(pgExc_BufferError, "buffer data is not C contiguous, shape needed"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view_p->strides = view_p->shape + inter_p->nd; for (i = 0; i < view_p->ndim; ++i) { view_p->strides[i] = (Py_ssize_t)inter_p->strides[i]; } } else if (inter_p->flags & (PAI_CONTIGUOUS | PAI_FORTRAN)) { view_p->strides = 0; } else { PyErr_SetString(pgExc_BufferError, "buffer is not contiguous, strides needed"); return -1; } view_p->suboffsets = 0; view_p->len = view_p->itemsize; for (i = 0; i < inter_p->nd; ++i) { view_p->len *= (Py_ssize_t)inter_p->shape[i]; } return 0; } static int _pg_arraystruct_to_format(char *format, PyArrayInterface *inter_p, int max_format_len) { char *fchar_p = format; assert(max_format_len >= 4); switch (inter_p->typekind) { case 'i': *fchar_p = ((inter_p->flags & PAI_NOTSWAPPED) ? BUF_MY_ENDIAN : BUF_OTHER_ENDIAN); ++fchar_p; switch (inter_p->itemsize) { case 1: *fchar_p = 'b'; break; case 2: *fchar_p = 'h'; break; case 4: *fchar_p = 'i'; break; case 8: *fchar_p = 'q'; break; default: PyErr_Format(PyExc_ValueError, "Unsupported signed integer size %d", (int)inter_p->itemsize); return -1; } break; case 'u': *fchar_p = ((inter_p->flags & PAI_NOTSWAPPED) ? BUF_MY_ENDIAN : BUF_OTHER_ENDIAN); ++fchar_p; switch (inter_p->itemsize) { case 1: *fchar_p = 'B'; break; case 2: *fchar_p = 'H'; break; case 4: *fchar_p = 'I'; break; case 8: *fchar_p = 'Q'; break; default: PyErr_Format(PyExc_ValueError, "Unsupported unsigned integer size %d", (int)inter_p->itemsize); return -1; } break; case 'f': *fchar_p = ((inter_p->flags & PAI_NOTSWAPPED) ? BUF_MY_ENDIAN : BUF_OTHER_ENDIAN); ++fchar_p; switch (inter_p->itemsize) { case 4: *fchar_p = 'f'; break; case 8: *fchar_p = 'd'; break; default: PyErr_Format(PyExc_ValueError, "Unsupported float size %d", (int)inter_p->itemsize); return -1; } break; case 'V': if (inter_p->itemsize > 9) { PyErr_Format(PyExc_ValueError, "Unsupported void size %d", (int)inter_p->itemsize); return -1; } switch (inter_p->itemsize) { case 1: *fchar_p = '1'; break; case 2: *fchar_p = '2'; break; case 3: *fchar_p = '3'; break; case 4: *fchar_p = '4'; break; case 5: *fchar_p = '5'; break; case 6: *fchar_p = '6'; break; case 7: *fchar_p = '7'; break; case 8: *fchar_p = '8'; break; case 9: *fchar_p = '9'; break; default: PyErr_Format(PyExc_ValueError, "Unsupported void size %d", (int)inter_p->itemsize); return -1; } ++fchar_p; *fchar_p = 'x'; break; default: PyErr_Format(PyExc_ValueError, "Unsupported value type '%c'", (int)inter_p->typekind); return -1; } ++fchar_p; *fchar_p = '\0'; return 0; } /** * \brief Write the array interface dictionary buffer description *dict* into a * Pygame buffer description struct *pg_view_p*. * * \param pg_view_p The Pygame buffer description struct to write into. * \param dict The array interface dictionary to read from. * \param flags The PyBUF flags describing the view type requested. * * \returns 0 on success, or -1 on failure. */ static int pgDict_AsBuffer(pg_buffer *pg_view_p, PyObject *dict, int flags) { PyObject *shape = PyDict_GetItemString(dict, "shape"); PyObject *typestr = PyDict_GetItemString(dict, "typestr"); PyObject *data = PyDict_GetItemString(dict, "data"); PyObject *strides = PyDict_GetItemString(dict, "strides"); if (_pg_shape_check(shape)) { return -1; } if (_pg_typestr_check(typestr)) { return -1; } if (_pg_data_check(data)) { return -1; } if (_pg_strides_check(strides)) { return -1; } pg_view_p->release_buffer = _pg_release_buffer_array; if (_pg_values_as_buffer((Py_buffer *)pg_view_p, flags, typestr, shape, data, strides)) { pgBuffer_Release(pg_view_p); return -1; } return 0; } static int _pg_shape_check(PyObject *op) { if (!op) { PyErr_SetString(PyExc_ValueError, "required 'shape' item is missing"); return -1; } if (!_pg_is_int_tuple(op)) { PyErr_SetString(PyExc_ValueError, "expected a tuple of ints for 'shape'"); return -1; } if (PyTuple_GET_SIZE(op) == 0) { PyErr_SetString(PyExc_ValueError, "expected 'shape' to be at least one-dimensional"); return -1; } return 0; } static int _pg_typestr_check(PyObject *op) { if (!op) { PyErr_SetString(PyExc_ValueError, "required 'typestr' item is missing"); return -1; } if (PyUnicode_Check(op)) { Py_ssize_t len = PyUnicode_GET_LENGTH(op); if (len != 3) { PyErr_SetString(PyExc_ValueError, "expected 'typestr' to be length 3"); return -1; } } else if (PyBytes_Check(op)) { if (PyBytes_GET_SIZE(op) != 3) { PyErr_SetString(PyExc_ValueError, "expected 'typestr' to be length 3"); return -1; } } else { PyErr_SetString(PyExc_ValueError, "expected a string for 'typestr'"); return -1; } return 0; } static int _pg_data_check(PyObject *op) { PyObject *item; if (!op) { PyErr_SetString(PyExc_ValueError, "required 'data' item is missing"); return -1; } if (!PyTuple_Check(op)) { PyErr_SetString(PyExc_ValueError, "expected a tuple for 'data'"); return -1; } if (PyTuple_GET_SIZE(op) != 2) { PyErr_SetString(PyExc_ValueError, "expected a length 2 tuple for 'data'"); return -1; } item = PyTuple_GET_ITEM(op, 0); if (!PyLong_Check(item)) { PyErr_SetString(PyExc_ValueError, "expected an int for item 0 of 'data'"); return -1; } return 0; } static int _pg_strides_check(PyObject *op) { if (op && !_pg_is_int_tuple(op) /* Conditional && */) { PyErr_SetString(PyExc_ValueError, "expected a tuple of ints for 'strides'"); return -1; } return 0; } static int _pg_is_int_tuple(PyObject *op) { Py_ssize_t i; Py_ssize_t n; PyObject *ip; if (!PyTuple_Check(op)) { return 0; } n = PyTuple_GET_SIZE(op); for (i = 0; i != n; ++i) { ip = PyTuple_GET_ITEM(op, i); if (!PyLong_Check(ip)) { return 0; } } return 1; } static int _pg_values_as_buffer(Py_buffer *view_p, int flags, PyObject *typestr, PyObject *shape, PyObject *data, PyObject *strides) { Py_ssize_t ndim = PyTuple_GET_SIZE(shape); pgViewInternals *internal_p; Py_ssize_t sz, i; assert(ndim > 0); view_p->obj = 0; view_p->internal = 0; if (strides && PyTuple_GET_SIZE(strides) != ndim /* Cond. && */) { PyErr_SetString(PyExc_ValueError, "'shape' and 'strides' are not the same length"); return -1; } view_p->ndim = (int)ndim; view_p->buf = PyLong_AsVoidPtr(PyTuple_GET_ITEM(data, 0)); if (!view_p->buf && PyErr_Occurred()) { return -1; } view_p->readonly = PyObject_IsTrue(PyTuple_GET_ITEM(data, 1)); if (view_p->readonly == -1) { return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_WRITABLE) && view_p->readonly) { PyErr_SetString(pgExc_BufferError, "require writable buffer, but it is read-only"); return -1; } sz = sizeof(pgViewInternals) + (2 * ndim - 1) * sizeof(Py_ssize_t); internal_p = (pgViewInternals *)PyMem_Malloc(sz); if (!internal_p) { PyErr_NoMemory(); return -1; } view_p->internal = internal_p; view_p->format = internal_p->format; view_p->shape = internal_p->imem; view_p->strides = internal_p->imem + ndim; if (_pg_typestr_as_format(typestr, view_p->format, &view_p->itemsize)) { return -1; } if (_pg_int_tuple_as_ssize_arr(shape, view_p->shape)) { return -1; } if (strides) { if (_pg_int_tuple_as_ssize_arr(strides, view_p->strides)) { return -1; } } else if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view_p->strides[ndim - 1] = view_p->itemsize; for (i = ndim - 1; i != 0; --i) { view_p->strides[i - 1] = view_p->shape[i] * view_p->strides[i]; } } else { view_p->strides = 0; } view_p->suboffsets = 0; view_p->len = view_p->itemsize; for (i = 0; i < view_p->ndim; ++i) { view_p->len *= view_p->shape[i]; } if (PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS)) { if (!PyBuffer_IsContiguous(view_p, 'A')) { PyErr_SetString(pgExc_BufferError, "buffer data is not contiguous"); return -1; } } else if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS)) { if (!PyBuffer_IsContiguous(view_p, 'C')) { PyErr_SetString(pgExc_BufferError, "buffer data is not C contiguous"); return -1; } } else if (PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS)) { if (!PyBuffer_IsContiguous(view_p, 'F')) { PyErr_SetString(pgExc_BufferError, "buffer data is not F contiguous"); return -1; } } if (!PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { if (PyBuffer_IsContiguous(view_p, 'C')) { view_p->strides = 0; } else { PyErr_SetString(pgExc_BufferError, "buffer data is not C contiguous, strides needed"); return -1; } } if (!PyBUF_HAS_FLAG(flags, PyBUF_ND)) { if (PyBuffer_IsContiguous(view_p, 'C')) { view_p->shape = 0; } else { PyErr_SetString(pgExc_BufferError, "buffer data is not C contiguous, shape needed"); return -1; } } if (!PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { view_p->format = 0; } if (!PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view_p->ndim = 0; } return 0; } static int _pg_int_tuple_as_ssize_arr(PyObject *tp, Py_ssize_t *arr) { Py_ssize_t i; Py_ssize_t n = PyTuple_GET_SIZE(tp); for (i = 0; i != n; ++i) { arr[i] = PyLong_AsSsize_t(PyTuple_GET_ITEM(tp, i)); if (arr[i] == -1 && PyErr_Occurred()) { return -1; } } return 0; } static int _pg_typestr_as_format(PyObject *sp, char *format, Py_ssize_t *itemsize_p) { const char *typestr; char *fchar_p = format; int is_swapped = 0; Py_ssize_t itemsize = 0; if (PyUnicode_Check(sp)) { sp = PyUnicode_AsASCIIString(sp); if (!sp) { return -1; } } else { Py_INCREF(sp); } typestr = PyBytes_AsString(sp); switch (typestr[0]) { case PAI_MY_ENDIAN: case '|': break; case PAI_OTHER_ENDIAN: is_swapped = 1; break; default: PyErr_Format(PyExc_ValueError, "unsupported typestr %s", typestr); Py_DECREF(sp); return -1; } switch (typestr[1]) { case 'i': case 'u': switch (typestr[2]) { case '1': *fchar_p = 'B'; itemsize = 1; break; case '2': *fchar_p = is_swapped ? BUF_OTHER_ENDIAN : BUF_MY_ENDIAN; ++fchar_p; *fchar_p = 'H'; itemsize = 2; break; case '3': *fchar_p = '3'; ++fchar_p; *fchar_p = 'x'; itemsize = 3; break; case '4': *fchar_p = is_swapped ? BUF_OTHER_ENDIAN : BUF_MY_ENDIAN; ++fchar_p; *fchar_p = 'I'; itemsize = 4; break; case '5': *fchar_p = '5'; ++fchar_p; *fchar_p = 'x'; itemsize = 5; break; case '6': *fchar_p = '6'; ++fchar_p; *fchar_p = 'x'; itemsize = 6; break; case '7': *fchar_p = '7'; ++fchar_p; *fchar_p = 'x'; itemsize = 7; break; case '8': *fchar_p = is_swapped ? BUF_OTHER_ENDIAN : BUF_MY_ENDIAN; ++fchar_p; *fchar_p = 'Q'; itemsize = 8; break; case '9': *fchar_p = '9'; ++fchar_p; *fchar_p = 'x'; itemsize = 9; break; default: PyErr_Format(PyExc_ValueError, "unsupported typestr %s", typestr); Py_DECREF(sp); return -1; } if (typestr[1] == 'i') { /* This leaves 'x' uneffected. */ *fchar_p = tolower(*fchar_p); } break; case 'f': *fchar_p = is_swapped ? BUF_OTHER_ENDIAN : BUF_MY_ENDIAN; ++fchar_p; switch (typestr[2]) { case '4': *fchar_p = 'f'; itemsize = 4; break; case '8': *fchar_p = 'd'; itemsize = 8; break; default: PyErr_Format(PyExc_ValueError, "unsupported typestr %s", typestr); Py_DECREF(sp); return -1; } break; case 'V': switch (typestr[2]) { case '1': *fchar_p = '1'; itemsize = 1; break; case '2': *fchar_p = '2'; itemsize = 2; break; case '3': *fchar_p = '3'; itemsize = 3; break; case '4': *fchar_p = '4'; itemsize = 4; break; case '5': *fchar_p = '5'; itemsize = 5; break; case '6': *fchar_p = '6'; itemsize = 6; break; case '7': *fchar_p = '7'; itemsize = 7; break; case '8': *fchar_p = '8'; itemsize = 8; break; case '9': *fchar_p = '9'; itemsize = 9; break; default: PyErr_Format(PyExc_ValueError, "unsupported typestr %s", typestr); Py_DECREF(sp); return -1; } ++fchar_p; *fchar_p = 'x'; break; default: PyErr_Format(PyExc_ValueError, "unsupported typestr %s", typestr); Py_DECREF(sp); return -1; } Py_DECREF(sp); ++fchar_p; *fchar_p = '\0'; *itemsize_p = itemsize; return 0; } /** * \brief Get the default SDL window created by a pygame.display.set_mode() * call, or *NULL*. * * \return The default window, or *NULL* if no window has been created. */ static SDL_Window * pg_GetDefaultWindow(void) { return pg_default_window; } /** * \brief Set the default SDL window created by a pygame.display.set_mode() * call. The previous window, if any, is destroyed. Argument *win* may be * *NULL*. This function is called by pygame.display.set_mode(). * * \param win The new default window. May be NULL. */ static void pg_SetDefaultWindow(SDL_Window *win) { /*Allows a window to be replaced by itself*/ if (win == pg_default_window) { return; } if (pg_default_window) { SDL_DestroyWindow(pg_default_window); } pg_default_window = win; } /** * \brief Return a borrowed reference to the Pygame default window display * surface, or *NULL* if no default window is open. * * \return The default renderer, or *NULL* if no renderer has been created. */ static pgSurfaceObject * pg_GetDefaultWindowSurface(void) { /* return a borrowed reference*/ return pg_default_screen; } /** * \brief Set the Pygame default window display surface. The previous * surface, if any, is destroyed. Argument *screen* may be *NULL*. This * function is called by pygame.display.set_mode(). * * \param screen The new default window display surface. May be NULL. */ static void pg_SetDefaultWindowSurface(pgSurfaceObject *screen) { /*a screen surface can be replaced with itself*/ if (screen == pg_default_screen) { return; } Py_XINCREF(screen); Py_XDECREF(pg_default_screen); pg_default_screen = screen; } /** * \returns NULL if the environment variable PYGAME_BLEND_ALPHA_SDL2 is not * set, otherwise returns a pointer to the environment variable. */ static char * pg_EnvShouldBlendAlphaSDL2(void) { return pg_env_blend_alpha_SDL2; } /* bind functions to python */ static PyMethodDef _base_methods[] = { {"init", (PyCFunction)pg_init, METH_NOARGS, DOC_PYGAMEINIT}, {"quit", (PyCFunction)pg_quit, METH_NOARGS, DOC_PYGAMEQUIT}, {"get_init", (PyCFunction)pg_base_get_init, METH_NOARGS, DOC_PYGAMEGETINIT}, {"register_quit", (PyCFunction)pg_register_quit, METH_O, DOC_PYGAMEREGISTERQUIT}, {"get_error", (PyCFunction)pg_get_error, METH_NOARGS, DOC_PYGAMEGETERROR}, {"set_error", pg_set_error, METH_VARARGS, DOC_PYGAMESETERROR}, {"get_sdl_version", (PyCFunction)pg_get_sdl_version, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEGETSDLVERSION}, {"get_sdl_byteorder", (PyCFunction)pg_get_sdl_byteorder, METH_NOARGS, DOC_PYGAMEGETSDLBYTEORDER}, {"get_array_interface", (PyCFunction)pg_get_array_interface, METH_O, "return an array struct interface as an interface dictionary"}, {NULL, NULL, 0, NULL}}; #if defined(BUILD_STATIC) && defined(NO_PYGAME_C_API) // in case of wasm+dynamic loading it could be a trampoline in the globals // generated at runtime. // when building static make global accessible symbol directly. static PyObject *pgExc_SDLError; #endif MODINIT_DEFINE(base) { PyObject *module, *apiobj, *atexit; PyObject *atexit_register; #if !(defined(BUILD_STATIC) && defined(NO_PYGAME_C_API)) // only pointer via C-api will be used, no need to keep global. PyObject *pgExc_SDLError; #endif static void *c_api[PYGAMEAPI_BASE_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "base", "", -1, _base_methods, NULL, NULL, NULL, NULL}; /* import need modules. Do this first so if there is an error the module is not loaded. */ atexit = PyImport_ImportModule("atexit"); if (!atexit) { return NULL; } atexit_register = PyObject_GetAttrString(atexit, "register"); Py_DECREF(atexit); if (!atexit_register) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (!module) { goto error; } /* create the exceptions */ pgExc_SDLError = PyErr_NewException("pygame.error", PyExc_RuntimeError, NULL); if (PyModule_AddObject(module, "error", pgExc_SDLError)) { Py_XDECREF(pgExc_SDLError); goto error; } pgExc_BufferError = PyErr_NewException("pygame.BufferError", PyExc_BufferError, NULL); /* Because we need a reference to BufferError in the base module */ Py_XINCREF(pgExc_BufferError); if (PyModule_AddObject(module, "BufferError", pgExc_BufferError)) { Py_XDECREF(pgExc_BufferError); goto error; } /* export the c api */ c_api[0] = pgExc_SDLError; c_api[1] = pg_RegisterQuit; c_api[2] = pg_IntFromObj; c_api[3] = pg_IntFromObjIndex; c_api[4] = pg_TwoIntsFromObj; c_api[5] = pg_FloatFromObj; c_api[6] = pg_FloatFromObjIndex; c_api[7] = pg_TwoFloatsFromObj; c_api[8] = pg_UintFromObj; c_api[9] = pg_UintFromObjIndex; c_api[10] = pg_mod_autoinit; c_api[11] = pg_mod_autoquit; c_api[12] = pg_RGBAFromObj; c_api[13] = pgBuffer_AsArrayInterface; c_api[14] = pgBuffer_AsArrayStruct; c_api[15] = pgObject_GetBuffer; c_api[16] = pgBuffer_Release; c_api[17] = pgDict_AsBuffer; c_api[18] = pgExc_BufferError; c_api[19] = pg_GetDefaultWindow; c_api[20] = pg_SetDefaultWindow; c_api[21] = pg_GetDefaultWindowSurface; c_api[22] = pg_SetDefaultWindowSurface; c_api[23] = pg_EnvShouldBlendAlphaSDL2; c_api[24] = pg_DoubleFromObj; c_api[25] = pg_DoubleFromObjIndex; c_api[26] = pg_TwoDoublesFromObj; #define FILLED_SLOTS 27 #if PYGAMEAPI_BASE_NUMSLOTS != FILLED_SLOTS #error export slot count mismatch #endif apiobj = encapsulate_api(c_api, "base"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); goto error; } if (PyModule_AddIntConstant(module, "HAVE_NEWBUF", 1)) { goto error; } /*some initialization*/ PyObject *quit = PyObject_GetAttrString(module, "quit"); PyObject *rval; if (!quit) { /* assertion */ goto error; } rval = PyObject_CallFunctionObjArgs(atexit_register, quit, NULL); Py_DECREF(atexit_register); Py_DECREF(quit); atexit_register = NULL; if (!rval) { goto error; } Py_DECREF(rval); Py_AtExit(pg_atexit_quit); /* This must be called before calling any other SDL API */ if (!pg_CheckSDLVersions()) { goto error; } #ifdef MS_WIN32 SDL_RegisterApp("pygame", 0, GetModuleHandle(NULL)); #endif return module; error: Py_XDECREF(pgExc_BufferError); Py_XDECREF(atexit_register); Py_XDECREF(module); return NULL; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/bitmask.c0000644000175100001770000011061314676242340015310 0ustar00runnerdocker/* Bitmask Collision Detection Library 1.5 Copyright (C) 2002-2005 Ulf Ekstrom except for the bitcount function which is copyright (C) Donald W. Gillies, 1992, and the other bitcount function which was taken from Jorg Arndt's excellent "Algorithms for Programmers" text. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "include/bitmask.h" #include #include #include #ifndef INLINE #warning No INLINE definition in bitmask.h, performance may suffer. #endif #define MIN(a, b) ((a) <= (b) ? (a) : (b)) #define MAX(a, b) ((a) >= (b) ? (a) : (b)) /* The code by Gillies is slightly (1-3%) faster than the more readable code below */ #define GILLIES static INLINE unsigned int bitcount(BITMASK_W n) { const int bitmask_len = BITMASK_W_LEN; if (bitmask_len == 32) { #ifdef GILLIES /* (C) Donald W. Gillies, 1992. All rights reserved. You may reuse this bitcount() function anywhere you please as long as you retain this Copyright Notice. */ register unsigned long tmp; return (tmp = (n) - (((n) >> 1) & 033333333333) - (((n) >> 2) & 011111111111), tmp = ((tmp + (tmp >> 3)) & 030707070707), tmp = (tmp + (tmp >> 6)), tmp = (tmp + (tmp >> 12) + (tmp >> 24)) & 077); /* End of Donald W. Gillies bitcount code */ #else /* This piece taken from Jorg Arndt's "Algorithms for Programmers" */ n = ((n >> 1) & 0x55555555) + (n & 0x55555555); // 0-2 in 2 bits n = ((n >> 2) & 0x33333333) + (n & 0x33333333); // 0-4 in 4 bits n = ((n >> 4) + n) & 0x0f0f0f0f; // 0-8 in 4 bits n += n >> 8; // 0-16 in 8 bits n += n >> 16; // 0-32 in 8 bits return n & 0xff; #endif } else if (bitmask_len == 64) { n = ((n >> 1) & 0x5555555555555555) + (n & 0x5555555555555555); n = ((n >> 2) & 0x3333333333333333) + (n & 0x3333333333333333); n = ((n >> 4) + n) & 0x0f0f0f0f0f0f0f0f; n += n >> 8; n += n >> 16; #ifdef _WIN32 /* Use explicit typecast to silence MSVC warning about large bitshift, * even though this part code does not run on windows */ n += (long long)n >> 32; #else n += n >> 32; #endif return n & 0xff; } else { /* Handle non-32 or 64 bit case the slow way */ unsigned int nbits = 0; while (n) { if (n & 1) nbits++; n = n >> 1; } return nbits; } } /* Positive modulo of the given dividend and divisor (dividend % divisor). * * Params: * dividend: dividend of the modulo operation, can be positive or negative * divisor: divisor of the modulo operation, can be positive or negative * * Returns: * positive modulo of dividend % divisor: * the result will be 0 <= result < divisor */ static INLINE int positive_modulo(int dividend, int divisor) { int result = dividend % divisor; return (result >= 0) ? result : result + divisor; } bitmask_t * bitmask_create(int w, int h) { bitmask_t *temp; size_t size; /* Guard against negative parameters. */ if (w < 0 || h < 0) { return 0; } size = offsetof(bitmask_t, bits); if (w && h) { size += h * ((w - 1) / BITMASK_W_LEN + 1) * sizeof(BITMASK_W); } temp = malloc(size); if (!temp) { return 0; } temp->w = w; temp->h = h; bitmask_clear(temp); return temp; } void bitmask_free(bitmask_t *m) { free(m); } /* Create a copy of the given bitmask. * * Returns: * bitmask if successful, otherwise NULL */ bitmask_t * bitmask_copy(bitmask_t *mask) { bitmask_t *mask_copy = NULL; if (mask->w < 0 || mask->h < 0) { return NULL; } mask_copy = bitmask_create(mask->w, mask->h); if (NULL == mask_copy) { return NULL; } /* Nothing to copy if width or height is 0. */ if (!mask->w || !mask->h) { return mask_copy; } memcpy(mask_copy->bits, mask->bits, mask->h * ((mask->w - 1) / BITMASK_W_LEN + 1) * sizeof(BITMASK_W)); return mask_copy; } void bitmask_clear(bitmask_t *m) { if (!m->h || !m->w) return; memset(m->bits, 0, m->h * ((m->w - 1) / BITMASK_W_LEN + 1) * sizeof(BITMASK_W)); } void bitmask_fill(bitmask_t *m) { int len, shift; BITMASK_W *pixels, cmask, full; if (!m->h || !m->w) { return; } len = m->h * ((m->w - 1) / BITMASK_W_LEN); shift = positive_modulo(BITMASK_W_LEN - m->w, (int)BITMASK_W_LEN); full = ~(BITMASK_W)0; cmask = (~(BITMASK_W)0) >> shift; /* fill all the pixels that aren't in the rightmost BITMASK_Ws */ for (pixels = m->bits; pixels < (m->bits + len); pixels++) { *pixels = full; } /* for the rightmost BITMASK_Ws, use cmask to ensure we aren't setting bits that are outside of the mask */ for (pixels = m->bits + len; pixels < (m->bits + len + m->h); pixels++) { *pixels = cmask; } } void bitmask_invert(bitmask_t *m) { int len, shift; BITMASK_W *pixels, cmask; if (!m->h || !m->w) { return; } len = m->h * ((m->w - 1) / BITMASK_W_LEN); shift = positive_modulo(BITMASK_W_LEN - m->w, (int)BITMASK_W_LEN); cmask = (~(BITMASK_W)0) >> shift; /* flip all the pixels that aren't in the rightmost BITMASK_Ws */ for (pixels = m->bits; pixels < (m->bits + len); pixels++) { *pixels = ~(*pixels); } /* for the rightmost BITMASK_Ws, & with cmask to ensure we aren't setting bits that are outside of the mask */ for (pixels = m->bits + len; pixels < (m->bits + len + m->h); pixels++) { *pixels = cmask & ~(*pixels); } } unsigned int bitmask_count(bitmask_t *m) { BITMASK_W *pixels; unsigned int tot = 0; if (!m->w || !m->h) { return tot; } for (pixels = m->bits; pixels < (m->bits + m->h * ((m->w - 1) / BITMASK_W_LEN + 1)); pixels++) { tot += bitcount(*pixels); } return tot; } int bitmask_overlap(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset) { const BITMASK_W *a_entry, *a_end; const BITMASK_W *b_entry; const BITMASK_W *ap, *app, *bp; unsigned int shift, rshift, i, astripes, bstripes; /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w)) { return 0; } if (xoffset >= 0) { swapentry: if (yoffset >= 0) { a_entry = a->bits + a->h * ((unsigned int)xoffset / BITMASK_W_LEN) + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * ((unsigned int)xoffset / BITMASK_W_LEN); a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = ((unsigned int)(a->w - 1)) / BITMASK_W_LEN - (unsigned int)xoffset / BITMASK_W_LEN; bstripes = ((unsigned int)(b->w - 1)) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, app = ap + a->h, bp = b_entry; ap < a_end;) if ((*ap++ >> shift) & *bp || (*app++ << rshift) & *bp++) return 1; a_entry += a->h; a_end += a->h; b_entry += b->h; } for (ap = a_entry, bp = b_entry; ap < a_end;) if ((*ap++ >> shift) & *bp++) return 1; return 0; } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, app = ap + a->h, bp = b_entry; ap < a_end;) if ((*ap++ >> shift) & *bp || (*app++ << rshift) & *bp++) return 1; a_entry += a->h; a_end += a->h; b_entry += b->h; } return 0; } } else /* xoffset is a multiple of the stripe width, and the above routines won't work */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end;) if (*ap++ & *bp++) return 1; a_entry += a->h; a_end += a->h; b_entry += b->h; } return 0; } } else { const bitmask_t *c = a; a = b; b = c; xoffset *= -1; yoffset *= -1; goto swapentry; } } /* Will hang if there are no bits set in w! */ static INLINE int firstsetbit(BITMASK_W w) { int i = 0; while ((w & 1) == 0) { i++; w /= 2; } return i; } /* x and y are given in the coordinates of mask a, and are untouched if there * is no overlap */ int bitmask_overlap_pos(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset, int *x, int *y) { /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w)) { return 0; } if (xoffset >= 0) { const BITMASK_W *a_entry, *a_end, *b_entry, *ap, *bp; unsigned int shift, rshift, i, astripes, bstripes, xbase; xbase = xoffset / BITMASK_W_LEN; /* first stripe from mask a */ if (yoffset >= 0) { a_entry = a->bits + a->h * xbase + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * xbase; a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; yoffset = 0; /* relied on below */ } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (a->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (b->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) if (*ap & (*bp << shift)) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + i) * BITMASK_W_LEN + firstsetbit(*ap & (*bp << shift)); return 1; } a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) if (*ap & (*bp >> rshift)) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + i + 1) * BITMASK_W_LEN + firstsetbit(*ap & (*bp >> rshift)); return 1; } b_entry += b->h; } for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) if (*ap & (*bp << shift)) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + astripes) * BITMASK_W_LEN + firstsetbit(*ap & (*bp << shift)); return 1; } return 0; } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) if (*ap & (*bp << shift)) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + i) * BITMASK_W_LEN + firstsetbit(*ap & (*bp << shift)); return 1; } a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) if (*ap & (*bp >> rshift)) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + i + 1) * BITMASK_W_LEN + firstsetbit(*ap & (*bp >> rshift)); return 1; } b_entry += b->h; } return 0; } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. This way is also slightly faster. */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) { if (*ap & *bp) { *y = (int)(ap - a_entry) + yoffset; *x = (xbase + i) * BITMASK_W_LEN + firstsetbit(*ap & *bp); return 1; } } a_entry += a->h; a_end += a->h; b_entry += b->h; } return 0; } } else { if (bitmask_overlap_pos(b, a, -xoffset, -yoffset, x, y)) { *x += xoffset; *y += yoffset; return 1; } else return 0; } } int bitmask_overlap_area(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset) { const BITMASK_W *a_entry, *a_end, *b_entry, *ap, *bp; unsigned int shift, rshift, i, astripes, bstripes; unsigned int count = 0; /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w)) { return 0; } if (xoffset >= 0) { swapentry: if (yoffset >= 0) { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN) + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN); a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (a->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (b->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) count += bitcount( ((*ap >> shift) | (*(ap + a->h) << rshift)) & *bp); a_entry += a->h; a_end += a->h; b_entry += b->h; } for (ap = a_entry, bp = b_entry; ap < a_end;) count += bitcount((*ap++ >> shift) & *bp++); return count; } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) count += bitcount( ((*ap >> shift) | (*(ap + a->h) << rshift)) & *bp); a_entry += a->h; a_end += a->h; b_entry += b->h; } return count; } } else /* xoffset is a multiple of the stripe width, and the above routines won't work */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end;) count += bitcount(*ap++ & *bp++); a_entry += a->h; a_end += a->h; b_entry += b->h; } return count; } } else { const bitmask_t *c = a; a = b; b = c; xoffset *= -1; yoffset *= -1; goto swapentry; } } /* Makes a mask of the overlap of two other masks */ void bitmask_overlap_mask(const bitmask_t *a, const bitmask_t *b, bitmask_t *c, int xoffset, int yoffset) { const BITMASK_W *a_entry, *ap; const BITMASK_W *b_entry, *bp; BITMASK_W *c_entry, *cp; int shift, rshift, i, astripes, bstripes; /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w) || (!c->h) || (!c->w)) { return; } if (xoffset >= 0) { const BITMASK_W *a_end; if (yoffset >= 0) { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN) + yoffset; c_entry = c->bits + c->h * (xoffset / BITMASK_W_LEN) + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN); c_entry = c->bits + c->h * (xoffset / BITMASK_W_LEN); a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (a->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (b->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) *cp |= *ap & (*bp << shift); /* The c_entry (output mask) must advance with a_entry. */ a_entry += a->h; a_end += a->h; c_entry += c->h; for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) *cp |= *ap & (*bp >> rshift); b_entry += b->h; } /* This is the '.. zig' to handle the remaining bits. */ for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) *cp |= *ap & (*bp << shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) *cp |= *ap & (*bp << shift); /* The c_entry (output mask) must advance with a_entry. */ a_entry += a->h; a_end += a->h; c_entry += c->h; for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) *cp |= *ap & (*bp >> rshift); b_entry += b->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry, cp = c_entry; ap < a_end; ap++, bp++, cp++) { *cp = *ap & *bp; } a_entry += a->h; c_entry += c->h; a_end += a->h; b_entry += b->h; } } } else { const BITMASK_W *b_end; xoffset *= -1; yoffset *= -1; if (yoffset >= 0) { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN) + yoffset; b_end = b_entry + MIN(a->h, b->h - yoffset); a_entry = a->bits; c_entry = c->bits; } else { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN); b_end = b_entry + MIN(a->h + yoffset, b->h); a_entry = a->bits - yoffset; c_entry = c->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (b->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (a->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) *cp = *ap & (*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) *cp |= *ap & (*bp << rshift); a_entry += a->h; c_entry += c->h; } for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) *cp = *ap & (*bp >> shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) *cp = *ap & (*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) *cp |= *ap & (*bp << rshift); a_entry += a->h; c_entry += c->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(a->w, b->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry, cp = c_entry; bp < b_end; bp++, ap++, cp++) { *cp = *ap & *bp; } b_entry += b->h; b_end += b->h; a_entry += a->h; c_entry += c->h; } } xoffset *= -1; yoffset *= -1; } /* Zero out bits outside the mask rectangle (to the right), if there is a chance we were drawing there. */ if (xoffset + b->w > c->w) { BITMASK_W *c_end, edgemask; int n = (c->w - 1) / BITMASK_W_LEN; shift = positive_modulo(BITMASK_W_LEN - c->w, (int)BITMASK_W_LEN); edgemask = (~(BITMASK_W)0) >> shift; c_end = c->bits + n * c->h + MIN(c->h, b->h + yoffset); for (cp = c->bits + n * c->h + MAX(yoffset, 0); cp < c_end; cp++) *cp &= edgemask; } } /* Draws mask b onto mask a (bitwise OR) */ void bitmask_draw(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset) { BITMASK_W *a_entry, *a_end, *ap; const BITMASK_W *b_entry, *bp; int shift, rshift, i, astripes, bstripes; /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w)) { return; } if (xoffset >= 0) { if (yoffset >= 0) { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN) + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN); a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (a->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (b->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap |= (*bp << shift); a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap |= (*bp >> rshift); b_entry += b->h; } for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap |= (*bp << shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap |= (*bp << shift); a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap |= (*bp >> rshift); b_entry += b->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) { *ap |= *bp; } a_entry += a->h; a_end += a->h; b_entry += b->h; } } } else { const BITMASK_W *b_end; xoffset *= -1; yoffset *= -1; if (yoffset >= 0) { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN) + yoffset; b_end = b_entry + MIN(a->h, b->h - yoffset); a_entry = a->bits; } else { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN); b_end = b_entry + MIN(a->h + yoffset, b->h); a_entry = a->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (b->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (a->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap |= (*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap |= (*bp << rshift); a_entry += a->h; } for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap |= (*bp >> shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap |= (*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap |= (*bp << rshift); a_entry += a->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(a->w, b->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) { *ap |= *bp; } b_entry += b->h; b_end += b->h; a_entry += a->h; } } xoffset *= -1; yoffset *= -1; } /* Zero out bits outside the mask rectangle (to the right), if there is a chance we were drawing there. */ if (xoffset + b->w > a->w) { BITMASK_W edgemask; int n = (a->w - 1) / BITMASK_W_LEN; shift = positive_modulo(BITMASK_W_LEN - a->w, (int)BITMASK_W_LEN); edgemask = (~(BITMASK_W)0) >> shift; a_end = a->bits + n * a->h + MIN(a->h, b->h + yoffset); for (ap = a->bits + n * a->h + MAX(yoffset, 0); ap < a_end; ap++) *ap &= edgemask; } } /* Erases mask b from mask a (a &= ~b) */ void bitmask_erase(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset) { BITMASK_W *a_entry, *ap; const BITMASK_W *b_entry, *bp; int shift, rshift, i, astripes, bstripes; /* Return if no overlap or one mask has a width/height of 0. */ if ((xoffset >= a->w) || (yoffset >= a->h) || (yoffset <= -b->h) || (xoffset <= -b->w) || (!a->h) || (!a->w) || (!b->h) || (!b->w)) { return; } if (xoffset >= 0) { const BITMASK_W *a_end; if (yoffset >= 0) { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN) + yoffset; a_end = a_entry + MIN(b->h, a->h - yoffset); b_entry = b->bits; } else { a_entry = a->bits + a->h * (xoffset / BITMASK_W_LEN); a_end = a_entry + MIN(b->h + yoffset, a->h); b_entry = b->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (a->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (b->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap &= ~(*bp << shift); a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap &= ~(*bp >> rshift); b_entry += b->h; } for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap &= ~(*bp << shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap &= ~(*bp << shift); a_entry += a->h; a_end += a->h; for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) *ap &= ~(*bp >> rshift); b_entry += b->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(b->w, a->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (ap = a_entry, bp = b_entry; ap < a_end; ap++, bp++) { *ap &= ~*bp; } a_entry += a->h; a_end += a->h; b_entry += b->h; } } } else { const BITMASK_W *b_end; xoffset *= -1; yoffset *= -1; if (yoffset >= 0) { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN) + yoffset; b_end = b_entry + MIN(a->h, b->h - yoffset); a_entry = a->bits; } else { b_entry = b->bits + b->h * (xoffset / BITMASK_W_LEN); b_end = b_entry + MIN(a->h + yoffset, b->h); a_entry = a->bits - yoffset; } shift = xoffset & BITMASK_W_MASK; if (shift) { rshift = BITMASK_W_LEN - shift; astripes = (b->w - 1) / BITMASK_W_LEN - xoffset / BITMASK_W_LEN; bstripes = (a->w - 1) / BITMASK_W_LEN + 1; if (bstripes > astripes) /* zig-zag .. zig*/ { for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~(*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~(*bp << rshift); a_entry += a->h; } for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~(*bp >> shift); } else /* zig-zag */ { for (i = 0; i < bstripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~(*bp >> shift); b_entry += b->h; b_end += b->h; for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~(*bp << rshift); a_entry += a->h; } } } else /* xoffset is a multiple of the stripe width, and the above routines won't work. */ { astripes = (MIN(a->w, b->w - xoffset) - 1) / BITMASK_W_LEN + 1; for (i = 0; i < astripes; i++) { for (bp = b_entry, ap = a_entry; bp < b_end; bp++, ap++) *ap &= ~*bp; b_entry += b->h; b_end += b->h; a_entry += a->h; } } } } bitmask_t * bitmask_scale(const bitmask_t *m, int w, int h) { bitmask_t *nm; int x, y, nx, ny, dx, dy, dnx, dny; if (m->w < 0 || m->h < 0 || w < 0 || h < 0) { return 0; } nm = bitmask_create(w, h); if (!nm) return NULL; ny = dny = 0; for (y = 0, dy = h; y < m->h; y++, dy += h) { while (dny < dy) { nx = dnx = 0; for (x = 0, dx = w; x < m->w; x++, dx += w) { if (bitmask_getbit(m, x, y)) { while (dnx < dx) { bitmask_setbit(nm, nx, ny); nx++; dnx += m->w; } } else { while (dnx < dx) { nx++; dnx += m->w; } } } ny++; dny += m->h; } } return nm; } void bitmask_convolve(const bitmask_t *a, const bitmask_t *b, bitmask_t *output, int xoffset, int yoffset) { int x, y; if (!a->h || !a->w || !b->h || !b->w || !output->h || !output->w) { return; } xoffset += b->w - 1; yoffset += b->h - 1; for (y = 0; y < b->h; y++) for (x = 0; x < b->w; x++) if (bitmask_getbit(b, x, y)) bitmask_draw(output, a, xoffset - x, yoffset - y); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/bufferproxy.c0000644000175100001770000004275014676242340016237 0ustar00runnerdocker/* pygame - Python Game Library Module adapted from bufferproxy.c, Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This module exports a proxy object that exposes another object's data through the Python buffer protocol or the array interface. The new buffer protocol is available for Python 3.x. For Python 2.x only the old protocol is implemented (for PyPy compatibility). Both the C level array structure - __array_struct__ - interface and Python level - __array_interface__ - are exposed. */ #define PY_SSIZE_T_CLEAN #define PYGAMEAPI_BUFPROXY_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "pgbufferproxy.h" #include "doc/bufferproxy_doc.h" #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define BUFPROXY_MY_ENDIAN '<' #define BUFPROXY_OTHER_ENDIAN '>' #else #define BUFPROXY_MY_ENDIAN '>' #define BUFPROXY_OTHER_ENDIAN '<' #endif #define PROXY_MODNAME "bufferproxy" #define PROXY_TYPE_NAME "BufferProxy" #ifdef NDEBUG #define PyBUF_PG_VIEW PyBUF_RECORDS #define PyBUF_PG_VIEW_RO PyBUF_RECORDS_RO #else #define PyBUF_PG_VIEW (PyBUF_RECORDS | PyBUF_PYGAME) #define PyBUF_PG_VIEW_RO (PyBUF_RECORDS_RO | PyBUF_PYGAME) #endif typedef struct pgBufproxyObject_s { PyObject_HEAD PyObject *obj; /* Wrapped object (parent) */ pg_buffer *pg_view_p; /* For array interface export */ getbufferproc get_buffer; /* pg_buffer get callback */ PyObject *dict; /* Allow arbitrary attributes */ PyObject *weakrefs; /* Reference cycles can happen */ } pgBufproxyObject; static int pgBufproxy_Trip(PyObject *); static Py_buffer * _proxy_get_view(pgBufproxyObject *); static int proxy_getbuffer(pgBufproxyObject *, Py_buffer *, int); static void proxy_releasebuffer(pgBufproxyObject *, Py_buffer *); static void _release_buffer_from_dict(Py_buffer *); static int _get_buffer_from_dict(PyObject *dict, Py_buffer *view_p, int flags) { PyObject *obj; pg_buffer *pg_dict_view_p; Py_buffer *dict_view_p; PyObject *py_callback; assert(dict && PyDict_Check(dict)); assert(view_p); view_p->obj = 0; pg_dict_view_p = PyMem_New(pg_buffer, 1); if (!pg_dict_view_p) { PyErr_NoMemory(); return -1; } pg_dict_view_p->consumer = ((pg_buffer *)view_p)->consumer; if (pgDict_AsBuffer(pg_dict_view_p, dict, flags)) { PyMem_Free(pg_dict_view_p); return -1; } dict_view_p = (Py_buffer *)pg_dict_view_p; obj = PyDict_GetItemString(dict, "parent"); if (!obj) { obj = Py_None; } Py_INCREF(obj); py_callback = PyDict_GetItemString(dict, "before"); if (py_callback) { PyObject *py_rval; Py_INCREF(py_callback); py_rval = PyObject_CallFunctionObjArgs(py_callback, obj, NULL); Py_DECREF(py_callback); if (!py_rval) { pgBuffer_Release(pg_dict_view_p); Py_DECREF(obj); return -1; } Py_DECREF(py_rval); } Py_INCREF(dict); dict_view_p->obj = dict; view_p->obj = obj; view_p->buf = dict_view_p->buf; view_p->len = dict_view_p->len; view_p->readonly = dict_view_p->readonly; view_p->itemsize = dict_view_p->itemsize; view_p->format = dict_view_p->format; view_p->ndim = dict_view_p->ndim; view_p->shape = dict_view_p->shape; view_p->strides = dict_view_p->strides; view_p->suboffsets = dict_view_p->suboffsets; view_p->internal = pg_dict_view_p; ((pg_buffer *)view_p)->release_buffer = _release_buffer_from_dict; return 0; } /* This will need changes */ static void _release_buffer_from_dict(Py_buffer *view_p) { Py_buffer *dict_view_p; PyObject *dict; PyObject *obj; PyObject *py_callback; assert(view_p && view_p->internal); obj = view_p->obj; dict_view_p = (Py_buffer *)view_p->internal; dict = dict_view_p->obj; assert(dict && PyDict_Check(dict)); py_callback = PyDict_GetItemString(dict, "after"); if (py_callback) { PyObject *py_rval; Py_INCREF(py_callback); py_rval = PyObject_CallFunctionObjArgs(py_callback, obj, NULL); if (py_rval) { Py_DECREF(py_rval); } else { PyErr_Clear(); } Py_DECREF(py_callback); } pgBuffer_Release((pg_buffer *)dict_view_p); PyMem_Free(dict_view_p); view_p->obj = 0; Py_DECREF(obj); } /* Stub functions */ static PyObject * proxy_get_raw(pgBufproxyObject *, PyObject *); /* End transitional stuff */ static PyObject * _proxy_subtype_new(PyTypeObject *type, PyObject *obj, getbufferproc get_buffer) { pgBufproxyObject *self = (pgBufproxyObject *)type->tp_alloc(type, 0); if (!self) { return 0; } Py_XINCREF(obj); self->obj = obj; self->get_buffer = get_buffer; return (PyObject *)self; } static Py_buffer * _proxy_get_view(pgBufproxyObject *proxy) { pg_buffer *pg_view_p = proxy->pg_view_p; if (!pg_view_p) { pg_view_p = PyMem_New(pg_buffer, 1); if (!pg_view_p) { PyErr_NoMemory(); return 0; } pg_view_p->consumer = (PyObject *)proxy; if (proxy->get_buffer(proxy->obj, (Py_buffer *)pg_view_p, PyBUF_PG_VIEW_RO)) { PyMem_Free(pg_view_p); return 0; } proxy->pg_view_p = pg_view_p; } assert(((Py_buffer *)pg_view_p)->len && ((Py_buffer *)pg_view_p)->itemsize); return (Py_buffer *)pg_view_p; } static void _proxy_release_view(pgBufproxyObject *proxy) { pg_buffer *pg_view_p = proxy->pg_view_p; if (pg_view_p) { proxy->pg_view_p = 0; pgBuffer_Release(pg_view_p); PyMem_Free(pg_view_p); } } static int _proxy_zombie_get_buffer(PyObject *obj, Py_buffer *view_p, int flags) { PyObject *proxy = ((pg_buffer *)view_p)->consumer; view_p->obj = 0; PyErr_Format(PyExc_RuntimeError, "Attempted buffer export on <%s at %p, parent=<%s at %p>> " "while deallocating it", Py_TYPE(proxy)->tp_name, (void *)proxy, Py_TYPE(obj)->tp_name, (void *)obj); return -1; } /** * Return a new pgBufproxyObject (Python level constructor). */ static PyObject * proxy_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *obj; getbufferproc get_buffer = (getbufferproc)pgObject_GetBuffer; if (!PyArg_ParseTuple(args, "O:Bufproxy", &obj)) { return 0; } if (PyDict_Check(obj)) { get_buffer = _get_buffer_from_dict; } return _proxy_subtype_new(type, obj, get_buffer); } /** * Deallocates the pgBufproxyObject and its members. * Is reentrant. */ static void proxy_dealloc(pgBufproxyObject *self) { /* Prevent infinite recursion from a reentrant call */ if (self->get_buffer == _proxy_zombie_get_buffer) { return; } self->get_buffer = _proxy_zombie_get_buffer; /* Non reentrant call; deallocate */ PyObject_GC_UnTrack(self); _proxy_release_view(self); Py_XDECREF(self->obj); Py_XDECREF(self->dict); if (self->weakrefs) { PyObject_ClearWeakRefs((PyObject *)self); } Py_TYPE(self)->tp_free(self); } static int proxy_traverse(pgBufproxyObject *self, visitproc visit, void *arg) { if (self->obj) { Py_VISIT(self->obj); } if (self->pg_view_p && /* conditional && */ ((Py_buffer *)self->pg_view_p)->obj) { Py_VISIT(((Py_buffer *)self->pg_view_p)->obj); } if (self->dict) { Py_VISIT(self->dict); } return 0; } /**** Getter and setter access ****/ static PyObject * proxy_get_arraystruct(pgBufproxyObject *self, PyObject *closure) { Py_buffer *view_p = _proxy_get_view(self); PyObject *capsule; if (!view_p) { return 0; } capsule = pgBuffer_AsArrayStruct(view_p); if (!capsule) { _proxy_release_view(self); } return capsule; } static PyObject * proxy_get_arrayinterface(pgBufproxyObject *self, PyObject *closure) { Py_buffer *view_p = _proxy_get_view(self); PyObject *dict; if (!view_p) { return 0; } dict = pgBuffer_AsArrayInterface(view_p); if (!dict) { _proxy_release_view(self); } return dict; } static PyObject * proxy_get_parent(pgBufproxyObject *self, PyObject *closure) { Py_buffer *view_p = _proxy_get_view(self); PyObject *obj; if (!view_p) { return 0; } obj = view_p->obj ? view_p->obj : Py_None; Py_INCREF(obj); return obj; } static PyObject * proxy_get___dict__(pgBufproxyObject *self, PyObject *closure) { if (!self->dict) { self->dict = PyDict_New(); if (!self->dict) { return 0; } } Py_INCREF(self->dict); return self->dict; } static PyObject * proxy_get_raw(pgBufproxyObject *self, PyObject *closure) { Py_buffer *view_p = _proxy_get_view(self); PyObject *py_raw = 0; if (!view_p) { return 0; } if (!PyBuffer_IsContiguous(view_p, 'A')) { _proxy_release_view(self); PyErr_SetString(PyExc_ValueError, "the bytes are not contiguous"); return 0; } py_raw = PyBytes_FromStringAndSize((char *)view_p->buf, view_p->len); if (!py_raw) { _proxy_release_view(self); return 0; } return py_raw; } static PyObject * proxy_get_length(pgBufproxyObject *self, PyObject *closure) { Py_buffer *view_p = _proxy_get_view(self); PyObject *py_length = 0; if (view_p) { py_length = PyLong_FromSsize_t(view_p->len); if (!py_length) { _proxy_release_view(self); } } return py_length; } /**** Methods ****/ /** * Representation method. */ static PyObject * proxy_repr(pgBufproxyObject *self) { Py_buffer *view_p = _proxy_get_view(self); if (!view_p) { return 0; } return PyUnicode_FromFormat("", view_p->len); } /** * Writes raw data to the buffer. */ static PyObject * proxy_write(pgBufproxyObject *self, PyObject *args, PyObject *kwds) { Py_buffer view; const char *buf = 0; Py_ssize_t buflen = 0; Py_ssize_t offset = 0; char *keywords[] = {"buffer", "offset", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "s#|n", keywords, &buf, &buflen, &offset)) { return 0; } if (proxy_getbuffer(self, &view, PyBUF_PG_VIEW)) { return 0; } if (!PyBuffer_IsContiguous(&view, 'A')) { proxy_releasebuffer(self, &view); Py_DECREF(self); PyErr_SetString(PyExc_ValueError, "the BufferProxy bytes are not contiguous"); return 0; } if (buflen > view.len) { proxy_releasebuffer(self, &view); Py_DECREF(self); PyErr_SetString(PyExc_ValueError, "'buffer' object length is too large"); return 0; } if (offset < 0 || buflen + offset > view.len) { proxy_releasebuffer(self, &view); Py_DECREF(self); PyErr_SetString(PyExc_IndexError, "'offset' is out of range"); return 0; } memcpy((char *)view.buf + offset, buf, (size_t)buflen); proxy_releasebuffer(self, &view); Py_DECREF(self); Py_RETURN_NONE; } static struct PyMethodDef proxy_methods[] = { {"write", (PyCFunction)proxy_write, METH_VARARGS | METH_KEYWORDS, DOC_BUFFERPROXYWRITE}, {0, 0, 0, 0}}; /** * Getters and setters for the pgBufproxyObject. */ static PyGetSetDef proxy_getsets[] = { {"__array_struct__", (getter)proxy_get_arraystruct, 0, "Version 3 array interface, C level", 0}, {"__array_interface__", (getter)proxy_get_arrayinterface, 0, "Version 3 array interface, Python level", 0}, {"parent", (getter)proxy_get_parent, 0, DOC_BUFFERPROXYPARENT, 0}, {"__dict__", (getter)proxy_get___dict__, 0, "The object's attribute dictionary, read-only", 0}, {"raw", (getter)proxy_get_raw, 0, DOC_BUFFERPROXYRAW, 0}, {"length", (getter)proxy_get_length, 0, DOC_BUFFERPROXYLENGTH, 0}, {0, 0, 0, 0, 0}}; static int proxy_getbuffer(pgBufproxyObject *self, Py_buffer *view_p, int flags) { Py_buffer *obj_view_p = PyMem_Malloc(sizeof(pg_buffer)); #ifndef NDEBUG flags |= PyBUF_PYGAME; #endif view_p->obj = 0; if (!obj_view_p) { PyErr_NoMemory(); return -1; } ((pg_buffer *)obj_view_p)->consumer = (PyObject *)self; if (self->get_buffer(self->obj, obj_view_p, flags)) { PyMem_Free(obj_view_p); return -1; } Py_INCREF(self); view_p->obj = (PyObject *)self; view_p->buf = obj_view_p->buf; view_p->len = obj_view_p->len; view_p->readonly = obj_view_p->readonly; view_p->itemsize = obj_view_p->itemsize; view_p->format = obj_view_p->format; view_p->ndim = obj_view_p->ndim; view_p->shape = obj_view_p->shape; view_p->strides = obj_view_p->strides; view_p->suboffsets = obj_view_p->suboffsets; view_p->internal = obj_view_p; return 0; } static void proxy_releasebuffer(pgBufproxyObject *self, Py_buffer *view_p) { pgBuffer_Release((pg_buffer *)view_p->internal); PyMem_Free(view_p->internal); } #define PROXY_BUFFERPROCS (&proxy_bufferprocs) static PyBufferProcs proxy_bufferprocs = { (getbufferproc)proxy_getbuffer, (releasebufferproc)proxy_releasebuffer}; #define PROXY_TPFLAGS \ (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC) static PyTypeObject pgBufproxy_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.bufferproxy.BufferProxy", .tp_basicsize = sizeof(pgBufproxyObject), .tp_dealloc = (destructor)proxy_dealloc, .tp_repr = (reprfunc)proxy_repr, .tp_as_buffer = PROXY_BUFFERPROCS, .tp_flags = PROXY_TPFLAGS, .tp_doc = DOC_PYGAMEBUFFERPROXY, .tp_traverse = (traverseproc)proxy_traverse, .tp_weaklistoffset = offsetof(pgBufproxyObject, weakrefs), .tp_methods = proxy_methods, .tp_getset = proxy_getsets, .tp_dictoffset = offsetof(pgBufproxyObject, dict), .tp_alloc = PyType_GenericAlloc, .tp_new = proxy_new, .tp_free = PyObject_GC_Del, }; /**** Module methods ***/ static PyMethodDef bufferproxy_methods[] = {{0, 0, 0, 0}}; /**** Public C api ***/ static PyObject * pgBufproxy_New(PyObject *obj, getbufferproc get_buffer) { if (!get_buffer) { if (!obj) { PyErr_SetString(PyExc_ValueError, "One of arguments 'obj' or 'get_buffer' is " "required: both NULL instead"); return 0; } get_buffer = (getbufferproc)pgObject_GetBuffer; } return _proxy_subtype_new(&pgBufproxy_Type, obj, get_buffer); } static PyObject * pgBufproxy_GetParent(PyObject *obj) { if (!PyObject_IsInstance(obj, (PyObject *)&pgBufproxy_Type)) { PyErr_Format(PyExc_TypeError, "Expected a BufferProxy object: got %s instance instead", Py_TYPE(obj)->tp_name); return 0; } return proxy_get_parent((pgBufproxyObject *)obj, 0); } static int pgBufproxy_Trip(PyObject *obj) { if (!PyObject_IsInstance(obj, (PyObject *)&pgBufproxy_Type)) { PyErr_Format(PyExc_TypeError, "Expected a BufferProxy object: got %s instance instead", Py_TYPE(obj)->tp_name); return -1; } return _proxy_get_view((pgBufproxyObject *)obj) ? 0 : -1; } /*DOC*/ static char bufferproxy_doc[] = DOC_PYGAMEBUFFERPROXY; MODINIT_DEFINE(bufferproxy) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_BUFPROXY_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, PROXY_MODNAME, bufferproxy_doc, -1, bufferproxy_methods, NULL, NULL, NULL, NULL}; /* imported needed apis */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* prepare exported types */ if (PyType_Ready(&pgBufproxy_Type) < 0) { return NULL; } #define bufferproxy_docs "" /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } Py_INCREF(&pgBufproxy_Type); if (PyModule_AddObject(module, PROXY_TYPE_NAME, (PyObject *)&pgBufproxy_Type)) { Py_DECREF(&pgBufproxy_Type); Py_DECREF(module); return NULL; } #if PYGAMEAPI_BUFPROXY_NUMSLOTS != 4 #error export slot count mismatch #endif c_api[0] = &pgBufproxy_Type; c_api[1] = pgBufproxy_New; c_api[2] = pgBufproxy_GetParent; c_api[3] = pgBufproxy_Trip; apiobj = encapsulate_api(c_api, PROXY_MODNAME); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/camera.h0000644000175100001770000001274514676242340015122 0ustar00runnerdocker#ifndef CAMERA_H #define CAMERA_H /* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "pygame.h" #include "pgcompat.h" #include "doc/camera_doc.h" #if defined(__unix__) #include #include #include #include #include #include /* low-level i/o */ #include #include #include #include #include #include #include /* on freebsd there is no asm/types */ #ifdef __linux__ #include /* for videodev2.h */ #include #endif /* on openbsd and netbsd we need to include videoio.h */ #if defined(__OpenBSD__) || defined(__NetBSD__) #include #endif #ifdef __FreeBSD__ #include #endif #endif /* defined(__unix__) */ #if defined(__WIN32__) #ifdef __MINGW32__ #undef WINVER /** _WIN32_WINNT_WINBLUE sets minimum platform SDK to Windows 8.1. */ #define WINVER _WIN32_WINNT_WINBLUE #endif #include #include #include #include #include #include #endif /* some constants used which are not defined on non-v4l machines. */ #ifndef V4L2_PIX_FMT_RGB24 #define V4L2_PIX_FMT_RGB24 'RGB3' #endif #ifndef V4L2_PIX_FMT_RGB444 #define V4L2_PIX_FMT_RGB444 'R444' #endif #ifndef V4L2_PIX_FMT_YUYV #define V4L2_PIX_FMT_YUYV 'YUYV' #endif #ifndef V4L2_PIX_FMT_XBGR32 #define V4L2_PIX_FMT_XBGR32 'XR24' #endif #define CLEAR(x) memset(&(x), 0, sizeof(x)) #define SAT(c) \ if (c & (~255)) { \ if (c < 0) \ c = 0; \ else \ c = 255; \ } #define SAT2(c) ((c) & (~255) ? ((c) < 0 ? 0 : 255) : (c)) #define DEFAULT_WIDTH 640 #define DEFAULT_HEIGHT 480 #define RGB_OUT 1 #define YUV_OUT 2 #define HSV_OUT 4 #define CAM_V4L \ 1 /* deprecated. the incomplete support in pygame was removed */ #define CAM_V4L2 2 struct buffer { void *start; size_t length; }; #if defined(__unix__) typedef struct pgCameraObject { PyObject_HEAD char *device_name; int camera_type; unsigned long pixelformat; unsigned int color_out; struct buffer *buffers; unsigned int n_buffers; int width; int height; int size; int hflip; int vflip; int brightness; int fd; } pgCameraObject; #else /* generic definition. */ typedef struct pgCameraObject { PyObject_HEAD char *device_name; int camera_type; unsigned long pixelformat; unsigned int color_out; struct buffer *buffers; unsigned int n_buffers; int width; int height; int size; int hflip; int vflip; int brightness; int fd; } pgCameraObject; #endif /* internal functions for colorspace conversion */ void colorspace(SDL_Surface *src, SDL_Surface *dst, int cspace); void rgb24_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format); void bgr32_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format); void rgb444_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format); void rgb_to_yuv(const void *src, void *dst, int length, unsigned long source, SDL_PixelFormat *format); void rgb_to_hsv(const void *src, void *dst, int length, unsigned long source, SDL_PixelFormat *format); void yuyv_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format); void yuyv_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format); void uyvy_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format); void uyvy_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format); void sbggr8_to_rgb(const void *src, void *dst, int width, int height, SDL_PixelFormat *format); void yuv420_to_rgb(const void *src, void *dst, int width, int height, SDL_PixelFormat *format); void yuv420_to_yuv(const void *src, void *dst, int width, int height, SDL_PixelFormat *format); #if defined(__unix__) /* internal functions specific to v4l2 */ char ** v4l2_list_cameras(int *num_devices); int v4l2_get_control(int fd, int id, int *value); int v4l2_set_control(int fd, int id, int value); PyObject * v4l2_read_raw(pgCameraObject *self); int v4l2_xioctl(int fd, int request, void *arg); int v4l2_process_image(pgCameraObject *self, const void *image, int buffer_size, SDL_Surface *surf); int v4l2_query_buffer(pgCameraObject *self); int v4l2_read_frame(pgCameraObject *self, SDL_Surface *surf, int *errno_code); int v4l2_stop_capturing(pgCameraObject *self); int v4l2_start_capturing(pgCameraObject *self); int v4l2_uninit_device(pgCameraObject *self); int v4l2_init_mmap(pgCameraObject *self); int v4l2_init_device(pgCameraObject *self); int v4l2_close_device(pgCameraObject *self); int v4l2_open_device(pgCameraObject *self); #endif #endif /* !CAMERA_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/camera_v4l2.c0000644000175100001770000005276514676242340015772 0ustar00runnerdocker/* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if defined(__unix__) #include "_camera.h" #include "pgcompat.h" int v4l2_pixelformat(int fd, struct v4l2_format *fmt, unsigned long pixelformat); char ** v4l2_list_cameras(int *num_devices) { char **devices; char *device = NULL; int num, i, fd; num = *num_devices = 0; devices = (char **)malloc(sizeof(char *) * 65); if (!devices) { return NULL; } /* v4l2 cameras can be /dev/video and /dev/video0 to /dev/video63 */ for (i = -1; i < 64; i++) { device = (char *)malloc(sizeof(char) * 13); if (!device) { goto error; } if (i == -1) { strcpy(device, "/dev/video"); } else { int ret = PyOS_snprintf(device, 13, "/dev/video%d", i); if (ret < 0 || ret >= 13) { goto error; } } fd = open(device, O_RDONLY | O_NONBLOCK); if (fd == -1) { free(device); } else { /* First clean the opened file before putting the name into the * array */ if (close(fd) == -1) { /* Error while closing file */ goto error; } /* 'device' is in array now, don't free it here */ devices[num] = device; num++; } } *num_devices = num; return devices; error: /* During goto here, 'device' must be either NULL or free-able allocated * memory */ free(device); /* free individual 'device' already in devices array */ for (i = 0; i < num; i++) { free(devices[i]); } free(devices); return NULL; } /* A wrapper around a VIDIOC_S_FMT ioctl to check for format compatibility */ int v4l2_pixelformat(int fd, struct v4l2_format *fmt, unsigned long pixelformat) { fmt->fmt.pix.pixelformat = pixelformat; if (-1 == v4l2_xioctl(fd, VIDIOC_S_FMT, fmt)) { return 0; } if (fmt->fmt.pix.pixelformat == pixelformat) { return 1; } else { return 0; } } /* gets the value of a specific camera control if available */ int v4l2_get_control(int fd, int id, int *value) { struct v4l2_control control; CLEAR(control); control.id = id; if (-1 == v4l2_xioctl(fd, VIDIOC_G_CTRL, &control)) { return 0; } *value = control.value; return 1; } /* sets a control if supported. the camera may round the value */ int v4l2_set_control(int fd, int id, int value) { struct v4l2_control control; CLEAR(control); control.id = id; control.value = value; if (-1 == v4l2_xioctl(fd, VIDIOC_S_CTRL, &control)) { return 0; } return 1; } /* returns a string of the buffer from the camera */ /* TODO: fold this into the regular read_frame. lots of duplicate code */ PyObject * v4l2_read_raw(pgCameraObject *self) { struct v4l2_buffer buf; PyObject *raw; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; if (-1 == v4l2_xioctl(self->fd, VIDIOC_DQBUF, &buf)) { PyErr_Format(PyExc_SystemError, "ioctl(VIDIOC_DQBUF) failure : %d, %s", errno, strerror(errno)); return NULL; } assert(buf.index < self->n_buffers); raw = PyBytes_FromStringAndSize(self->buffers[buf.index].start, self->buffers[buf.index].length); if (-1 == v4l2_xioctl(self->fd, VIDIOC_QBUF, &buf)) { PyErr_Format(PyExc_SystemError, "ioctl(VIDIOC_QBUF) failure : %d, %s", errno, strerror(errno)); return NULL; } return raw; } /* * Functions for v4l2 cameras. * This code is based partly on pyvideograb by Laurent Pointal at * http://laurent.pointal.org/python/projets/pyvideograb * the v4l2 capture example at * http://www.linuxtv.org/download/video4linux/API/V4L2_API/spec/ * and the HighGUI library in OpenCV. */ int v4l2_xioctl(int fd, int request, void *arg) { int r; do r = ioctl(fd, request, arg); while (-1 == r && EINTR == errno); return r; } /* sends the image to the conversion function based on input format and desired output format. Note that some of the less common conversions are currently two step processes. */ /* TODO: Write single step conversions where they may actually be useful */ int v4l2_process_image(pgCameraObject *self, const void *image, int buffer_size, SDL_Surface *surf) { if (!surf) return 0; SDL_LockSurface(surf); switch (self->pixelformat) { case V4L2_PIX_FMT_RGB24: if (buffer_size >= self->size * 3) { switch (self->color_out) { case RGB_OUT: rgb24_to_rgb(image, surf->pixels, self->size, surf->format); break; case HSV_OUT: rgb_to_hsv(image, surf->pixels, self->size, V4L2_PIX_FMT_RGB24, surf->format); break; case YUV_OUT: rgb_to_yuv(image, surf->pixels, self->size, V4L2_PIX_FMT_RGB24, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; case V4L2_PIX_FMT_RGB444: if (buffer_size >= self->size * 2) { switch (self->color_out) { case RGB_OUT: rgb444_to_rgb(image, surf->pixels, self->size, surf->format); break; case HSV_OUT: rgb_to_hsv(image, surf->pixels, self->size, V4L2_PIX_FMT_RGB444, surf->format); break; case YUV_OUT: rgb_to_yuv(image, surf->pixels, self->size, V4L2_PIX_FMT_RGB444, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; case V4L2_PIX_FMT_YUYV: if (buffer_size >= self->size * 2) { switch (self->color_out) { case YUV_OUT: yuyv_to_yuv(image, surf->pixels, self->size, surf->format); break; case RGB_OUT: yuyv_to_rgb(image, surf->pixels, self->size, surf->format); break; case HSV_OUT: yuyv_to_rgb(image, surf->pixels, self->size, surf->format); rgb_to_hsv(surf->pixels, surf->pixels, self->size, V4L2_PIX_FMT_YUYV, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; case V4L2_PIX_FMT_UYVY: if (buffer_size >= self->size * 2) { switch (self->color_out) { case YUV_OUT: uyvy_to_yuv(image, surf->pixels, self->size, surf->format); break; case RGB_OUT: uyvy_to_rgb(image, surf->pixels, self->size, surf->format); break; case HSV_OUT: uyvy_to_rgb(image, surf->pixels, self->size, surf->format); rgb_to_hsv(surf->pixels, surf->pixels, self->size, V4L2_PIX_FMT_YUYV, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; case V4L2_PIX_FMT_SBGGR8: if (buffer_size >= self->size) { switch (self->color_out) { case RGB_OUT: sbggr8_to_rgb(image, surf->pixels, self->width, self->height, surf->format); break; case HSV_OUT: sbggr8_to_rgb(image, surf->pixels, self->width, self->height, surf->format); rgb_to_hsv(surf->pixels, surf->pixels, self->size, V4L2_PIX_FMT_SBGGR8, surf->format); break; case YUV_OUT: sbggr8_to_rgb(image, surf->pixels, self->width, self->height, surf->format); rgb_to_yuv(surf->pixels, surf->pixels, self->size, V4L2_PIX_FMT_SBGGR8, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; case V4L2_PIX_FMT_YUV420: if (buffer_size >= (self->size * 3) / 2) { switch (self->color_out) { case YUV_OUT: yuv420_to_yuv(image, surf->pixels, self->width, self->height, surf->format); break; case RGB_OUT: yuv420_to_rgb(image, surf->pixels, self->width, self->height, surf->format); break; case HSV_OUT: yuv420_to_rgb(image, surf->pixels, self->width, self->height, surf->format); rgb_to_hsv(surf->pixels, surf->pixels, self->size, V4L2_PIX_FMT_YUV420, surf->format); break; } } else { SDL_UnlockSurface(surf); return 0; } break; } SDL_UnlockSurface(surf); return 1; } /* query each buffer to see if it contains a frame ready to take */ int v4l2_query_buffer(pgCameraObject *self) { unsigned int i; for (i = 0; i < self->n_buffers; ++i) { struct v4l2_buffer buf; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = i; if (-1 == v4l2_xioctl(self->fd, VIDIOC_QUERYBUF, &buf)) { PyErr_Format(PyExc_MemoryError, "ioctl(VIDIOC_QUERYBUF) failure : %d, %s", errno, strerror(errno)); return 0; } /* is there a buffer on outgoing queue ready for us to take? */ if (buf.flags & V4L2_BUF_FLAG_DONE) return 1; } /* no buffer ready to take */ return 0; } /* This function is safe to be called with GIL released */ int v4l2_read_frame(pgCameraObject *self, SDL_Surface *surf, int *errno_code) { struct v4l2_buffer buf; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; if (-1 == v4l2_xioctl(self->fd, VIDIOC_DQBUF, &buf)) { *errno_code = errno; return 0; } assert(buf.index < self->n_buffers); if (!v4l2_process_image(self, self->buffers[buf.index].start, self->buffers[buf.index].length, surf)) { return 0; } if (-1 == v4l2_xioctl(self->fd, VIDIOC_QBUF, &buf)) { *errno_code = errno; return 0; } return 1; } int v4l2_stop_capturing(pgCameraObject *self) { enum v4l2_buf_type type; type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == v4l2_xioctl(self->fd, VIDIOC_STREAMOFF, &type)) { PyErr_Format(PyExc_SystemError, "ioctl(VIDIOC_STREAMOFF) failure : %d, %s", errno, strerror(errno)); return 0; } return 1; } int v4l2_start_capturing(pgCameraObject *self) { unsigned int i; enum v4l2_buf_type type; for (i = 0; i < self->n_buffers; ++i) { struct v4l2_buffer buf; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = i; if (-1 == v4l2_xioctl(self->fd, VIDIOC_QBUF, &buf)) { PyErr_Format(PyExc_EnvironmentError, "ioctl(VIDIOC_QBUF) failure : %d, %s", errno, strerror(errno)); return 0; } } type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == v4l2_xioctl(self->fd, VIDIOC_STREAMON, &type)) { PyErr_Format(PyExc_EnvironmentError, "ioctl(VIDIOC_STREAMON) failure : %d, %s", errno, strerror(errno)); return 0; } return 1; } int v4l2_uninit_device(pgCameraObject *self) { unsigned int i; for (i = 0; i < self->n_buffers; ++i) { if (-1 == munmap(self->buffers[i].start, self->buffers[i].length)) { PyErr_Format(PyExc_MemoryError, "munmap failure: %d, %s", errno, strerror(errno)); return 0; } } free(self->buffers); return 1; } int v4l2_init_mmap(pgCameraObject *self) { struct v4l2_requestbuffers req; CLEAR(req); /* 2 is the minimum possible, and some drivers will force a higher count. It will likely result in buffer overruns, but for purposes of gaming, it is probably better to drop frames than get old frames. */ req.count = 2; req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; req.memory = V4L2_MEMORY_MMAP; if (-1 == v4l2_xioctl(self->fd, VIDIOC_REQBUFS, &req)) { if (EINVAL == errno) { PyErr_Format(PyExc_MemoryError, "%s does not support memory mapping", self->device_name); return 0; } else { PyErr_Format(PyExc_MemoryError, "ioctl(VIDIOC_REQBUFS) failure : %d, %s", errno, strerror(errno)); return 0; } } if (req.count < 2) { PyErr_Format(PyExc_MemoryError, "Insufficient buffer memory on %s\n", self->device_name); return 0; } self->buffers = calloc(req.count, sizeof(*self->buffers)); if (!self->buffers) { PyErr_Format(PyExc_MemoryError, "Out of memory"); return 0; } for (self->n_buffers = 0; self->n_buffers < req.count; ++self->n_buffers) { struct v4l2_buffer buf; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = self->n_buffers; if (-1 == v4l2_xioctl(self->fd, VIDIOC_QUERYBUF, &buf)) { PyErr_Format(PyExc_MemoryError, "ioctl(VIDIOC_QUERYBUF) failure : %d, %s", errno, strerror(errno)); return 0; } self->buffers[self->n_buffers].length = buf.length; self->buffers[self->n_buffers].start = mmap(NULL /* start anywhere */, buf.length, PROT_READ | PROT_WRITE /* required */, MAP_SHARED /* recommended */, self->fd, buf.m.offset); if (MAP_FAILED == self->buffers[self->n_buffers].start) { PyErr_Format(PyExc_MemoryError, "mmap failure : %d, %s", errno, strerror(errno)); return 0; } } return 1; } int v4l2_init_device(pgCameraObject *self) { struct v4l2_capability cap; struct v4l2_format fmt; unsigned int min; if (-1 == v4l2_xioctl(self->fd, VIDIOC_QUERYCAP, &cap)) { if (EINVAL == errno) { PyErr_Format(PyExc_SystemError, "%s is not a V4L2 device", self->device_name); return 0; } else { PyErr_Format(PyExc_SystemError, "ioctl(VIDIOC_QUERYCAP) failure : %d, %s", errno, strerror(errno)); return 0; } } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { PyErr_Format(PyExc_SystemError, "%s is not a video capture device", self->device_name); return 0; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { PyErr_Format(PyExc_SystemError, "%s does not support streaming i/o", self->device_name); return 0; } CLEAR(fmt); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fmt.fmt.pix.width = self->width; fmt.fmt.pix.height = self->height; fmt.fmt.pix.field = V4L2_FIELD_ANY; /* Find the pixelformat supported by the camera that will take the least processing power to convert to the desired output. Thus, for YUV out, YUYVand YUV420 are first, while for RGB and HSV, the packed RGB formats are first. */ switch (self->color_out) { case YUV_OUT: if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_YUYV)) { self->pixelformat = V4L2_PIX_FMT_YUYV; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_YUV420)) { self->pixelformat = V4L2_PIX_FMT_YUV420; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_UYVY)) { self->pixelformat = V4L2_PIX_FMT_UYVY; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_RGB24)) { self->pixelformat = V4L2_PIX_FMT_RGB24; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_RGB444)) { self->pixelformat = V4L2_PIX_FMT_RGB444; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_SBGGR8)) { self->pixelformat = V4L2_PIX_FMT_SBGGR8; } else { PyErr_Format( PyExc_SystemError, "ioctl(VIDIOC_S_FMT) failure: no supported formats"); return 0; } break; default: if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_RGB24)) { self->pixelformat = V4L2_PIX_FMT_RGB24; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_RGB444)) { self->pixelformat = V4L2_PIX_FMT_RGB444; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_YUYV)) { self->pixelformat = V4L2_PIX_FMT_YUYV; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_SBGGR8)) { self->pixelformat = V4L2_PIX_FMT_SBGGR8; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_YUV420)) { self->pixelformat = V4L2_PIX_FMT_YUV420; } else if (v4l2_pixelformat(self->fd, &fmt, V4L2_PIX_FMT_UYVY)) { self->pixelformat = V4L2_PIX_FMT_UYVY; } else { PyErr_Format( PyExc_SystemError, "ioctl(VIDIOC_S_FMT) failure: no supported formats"); return 0; } break; } /* Note VIDIOC_S_FMT may change width and height. */ self->width = fmt.fmt.pix.width; self->height = fmt.fmt.pix.height; self->size = self->width * self->height; self->pixelformat = fmt.fmt.pix.pixelformat; /* Buggy driver paranoia. */ min = fmt.fmt.pix.width * 2; if (fmt.fmt.pix.bytesperline < min) fmt.fmt.pix.bytesperline = min; min = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height; if (fmt.fmt.pix.sizeimage < min) fmt.fmt.pix.sizeimage = min; v4l2_init_mmap(self); return 1; } int v4l2_close_device(pgCameraObject *self) { if (self->fd == -1) return 1; if (-1 == close(self->fd)) { PyErr_Format(PyExc_SystemError, "Cannot close '%s': %d, %s", self->device_name, errno, strerror(errno)); return 0; } self->fd = -1; return 1; } int v4l2_open_device(pgCameraObject *self) { struct stat st; if (-1 == stat(self->device_name, &st)) { PyErr_Format(PyExc_SystemError, "Cannot identify '%s': %d, %s", self->device_name, errno, strerror(errno)); return 0; } if (!S_ISCHR(st.st_mode)) { PyErr_Format(PyExc_SystemError, "%s is no device", self->device_name); return 0; } self->fd = open(self->device_name, O_RDWR /* required | O_NONBLOCK */, 0); if (-1 == self->fd) { PyErr_Format(PyExc_SystemError, "Cannot open '%s': %d, %s", self->device_name, errno, strerror(errno)); return 0; } return 1; } #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/color.c0000644000175100001770000015646714676242340015015 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2008 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* The follow bug was reported for the pygame.math module: * * Adjust gcc 4.4 optimization for floating point on x86-32 PCs running Linux. * This addresses bug 52: * https://github.com/pygame/pygame/issues/52 * With this option, floats have consistent precision regardless of optimize * level. * * Apparently, the same problem plagues pygame.color, as it failed the * test_hsva__all_elements_within_limits and * test_hsva__sanity_testing_converted_should_not_raise test cases due * to slight, on the order of 10e-14, discrepancies in calculated double * values. */ #if defined(__GNUC__) && defined(__linux__) && defined(__i386__) && \ __SIZEOF_POINTER__ == 4 && __GNUC__ == 4 && __GNUC_MINOR__ >= 4 #pragma GCC optimize("float-store") #endif #define PYGAMEAPI_COLOR_INTERNAL #include "doc/color_doc.h" #include "pygame.h" #include "pgcompat.h" #include #if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && \ !defined(round) #define pg_round(d) (((d < 0) ? (ceil((d) - 0.5)) : (floor((d) + 0.5)))) #else #define pg_round(d) round(d) #endif typedef enum { TRISTATE_SUCCESS, TRISTATE_FAIL, TRISTATE_ERROR } tristate; static PyObject *_COLORDICT = NULL; static int _get_double(PyObject *, double *); static int _get_color(PyObject *, Uint32 *); static int _hextoint(char *, Uint8 *); static tristate _hexcolor(PyObject *, Uint8 *); static int _coerce_obj(PyObject *, Uint8 *); static pgColorObject * _color_new_internal(PyTypeObject *, const Uint8 *); static pgColorObject * _color_new_internal_length(PyTypeObject *, const Uint8 *, Uint8); static PyObject * _color_new(PyTypeObject *, PyObject *, PyObject *); static int _color_init(pgColorObject *, PyObject *, PyObject *); static void _color_dealloc(pgColorObject *); static PyObject * _color_repr(pgColorObject *); static PyObject * _color_iter(pgColorObject *); static PyObject * _color_normalize(pgColorObject *, PyObject *); static PyObject * _color_correct_gamma(pgColorObject *, PyObject *, PyObject *); static PyObject * _color_set_length(pgColorObject *, PyObject *); static PyObject * _color_lerp(pgColorObject *, PyObject *, PyObject *); static PyObject * _color_grayscale(pgColorObject *); static PyObject * _premul_alpha(pgColorObject *, PyObject *); static PyObject * _color_update(pgColorObject *self, PyObject *const *args, Py_ssize_t nargs); PG_DECLARE_FASTCALL_FUNC(_color_update, pgColorObject); /* Getters/setters */ static PyObject * _color_get_r(pgColorObject *, void *); static int _color_set_r(pgColorObject *, PyObject *, void *); static PyObject * _color_get_g(pgColorObject *, void *); static int _color_set_g(pgColorObject *, PyObject *, void *); static PyObject * _color_get_b(pgColorObject *, void *); static int _color_set_b(pgColorObject *, PyObject *, void *); static PyObject * _color_get_a(pgColorObject *, void *); static int _color_set_a(pgColorObject *, PyObject *, void *); static PyObject * _color_get_hsva(pgColorObject *, void *); static int _color_set_hsva(pgColorObject *, PyObject *, void *); static PyObject * _color_get_hsla(pgColorObject *, void *); static int _color_set_hsla(pgColorObject *, PyObject *, void *); static PyObject * _color_get_i1i2i3(pgColorObject *, void *); static int _color_set_i1i2i3(pgColorObject *, PyObject *, void *); static PyObject * _color_get_cmy(pgColorObject *, void *); static int _color_set_cmy(pgColorObject *, PyObject *, void *); static PyObject * _color_get_arraystruct(pgColorObject *, void *); /* Number protocol methods */ static PyObject * _color_add(PyObject *, PyObject *); static PyObject * _color_sub(PyObject *, PyObject *); static PyObject * _color_mul(PyObject *, PyObject *); static PyObject * _color_div(PyObject *, PyObject *); static PyObject * _color_mod(PyObject *, PyObject *); static PyObject * _color_inv(pgColorObject *); static PyObject * _color_int(pgColorObject *); static PyObject * _color_float(pgColorObject *); /* Sequence protocol methods */ static Py_ssize_t _color_length(pgColorObject *); static PyObject * _color_item(pgColorObject *, Py_ssize_t); static int _color_ass_item(pgColorObject *, Py_ssize_t, PyObject *); static PyObject * _color_slice(register pgColorObject *, register Py_ssize_t, register Py_ssize_t); static int _color_contains(pgColorObject *, PyObject *); /* Mapping protocol methods. */ static PyObject * _color_subscript(pgColorObject *, PyObject *); static int _color_set_slice(pgColorObject *, PyObject *, PyObject *); /* Comparison */ static PyObject * _color_richcompare(PyObject *, PyObject *, int); /* New buffer protocol methods. */ static int _color_getbuffer(pgColorObject *, Py_buffer *, int); /* C API interfaces */ static PyObject * pgColor_New(Uint8 rgba[]); static PyObject * pgColor_NewLength(Uint8 rgba[], Uint8 length); static int pg_RGBAFromColorObj(PyObject *color, Uint8 rgba[]); static int pg_RGBAFromFuzzyColorObj(PyObject *color, Uint8 rgba[]); /** * Methods, which are bound to the pgColorObject type. */ static PyMethodDef _color_methods[] = { {"normalize", (PyCFunction)_color_normalize, METH_NOARGS, DOC_COLORNORMALIZE}, {"correct_gamma", (PyCFunction)_color_correct_gamma, METH_VARARGS | METH_KEYWORDS, DOC_COLORCORRECTGAMMA}, {"set_length", (PyCFunction)_color_set_length, METH_VARARGS, DOC_COLORSETLENGTH}, {"lerp", (PyCFunction)_color_lerp, METH_VARARGS | METH_KEYWORDS, DOC_COLORLERP}, {"grayscale", (PyCFunction)_color_grayscale, METH_VARARGS | METH_KEYWORDS, DOC_COLORGRAYSCALE}, {"premul_alpha", (PyCFunction)_premul_alpha, METH_NOARGS, DOC_COLORPREMULALPHA}, {"update", (PyCFunction)PG_FASTCALL_NAME(_color_update), PG_FASTCALL, DOC_COLORUPDATE}, {NULL, NULL, 0, NULL}}; /** * Getters and setters for the pgColorObject. */ static PyGetSetDef _color_getsets[] = { {"r", (getter)_color_get_r, (setter)_color_set_r, DOC_COLORR, NULL}, {"g", (getter)_color_get_g, (setter)_color_set_g, DOC_COLORG, NULL}, {"b", (getter)_color_get_b, (setter)_color_set_b, DOC_COLORB, NULL}, {"a", (getter)_color_get_a, (setter)_color_set_a, DOC_COLORA, NULL}, {"hsva", (getter)_color_get_hsva, (setter)_color_set_hsva, DOC_COLORHSVA, NULL}, {"hsla", (getter)_color_get_hsla, (setter)_color_set_hsla, DOC_COLORHSLA, NULL}, {"i1i2i3", (getter)_color_get_i1i2i3, (setter)_color_set_i1i2i3, DOC_COLORI1I2I3, NULL}, {"cmy", (getter)_color_get_cmy, (setter)_color_set_cmy, DOC_COLORCMY, NULL}, {"__array_struct__", (getter)_color_get_arraystruct, NULL, "array structure interface, read only", NULL}, {NULL, NULL, NULL, NULL, NULL}}; static PyNumberMethods _color_as_number = { .nb_add = (binaryfunc)_color_add, .nb_subtract = (binaryfunc)_color_sub, .nb_multiply = (binaryfunc)_color_mul, .nb_remainder = (binaryfunc)_color_mod, .nb_invert = (unaryfunc)_color_inv, .nb_int = (unaryfunc)_color_int, .nb_float = (unaryfunc)_color_float, .nb_floor_divide = (binaryfunc)_color_div, .nb_index = (unaryfunc)_color_int, }; /** * Sequence interface support for pgColorObject. */ /* sq_slice and sq_ass_slice are no longer used in this struct */ static PySequenceMethods _color_as_sequence = { .sq_length = (lenfunc)_color_length, .sq_item = (ssizeargfunc)_color_item, .sq_ass_item = (ssizeobjargproc)_color_ass_item, .sq_contains = (objobjproc)_color_contains, }; static PyMappingMethods _color_as_mapping = { .mp_length = (lenfunc)_color_length, .mp_subscript = (binaryfunc)_color_subscript, .mp_ass_subscript = (objobjargproc)_color_set_slice, }; static PyBufferProcs _color_as_buffer = {(getbufferproc)_color_getbuffer, NULL}; #define DEFERRED_ADDRESS(ADDR) 0 static PyTypeObject pgColor_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.color.Color", .tp_basicsize = sizeof(pgColorObject), .tp_dealloc = (destructor)_color_dealloc, .tp_repr = (reprfunc)_color_repr, .tp_as_number = &_color_as_number, .tp_as_sequence = &_color_as_sequence, .tp_as_mapping = &_color_as_mapping, .tp_as_buffer = &_color_as_buffer, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMECOLOR, .tp_richcompare = _color_richcompare, .tp_iter = (getiterfunc)_color_iter, .tp_methods = _color_methods, .tp_getset = _color_getsets, .tp_init = (initproc)_color_init, .tp_new = _color_new, }; #define PyColor_Check(o) ((o)->ob_type == (PyTypeObject *)&pgColor_Type) #define RGB_EQUALS(x, y) \ ((((pgColorObject *)x)->data[0] == ((pgColorObj *)y)->data[0]) && \ (((pgColorObject *)x)->data[1] == ((pgColorObj *)y)->data[1]) && \ (((pgColorObject *)x)->data[2] == ((pgColorObj *)y)->data[2]) && \ (((pgColorObject *)x)->data[3] == ((pgColorObj *)y)->data[3])) static int _get_double(PyObject *obj, double *val) { PyObject *floatobj; if (!(floatobj = PyNumber_Float(obj))) { return 0; } *val = PyFloat_AsDouble(floatobj); Py_DECREF(floatobj); return 1; } static int _get_color(PyObject *val, Uint32 *color) { if (!val || !color) { return 0; } if (PyLong_Check(val)) { unsigned long longval = PyLong_AsUnsignedLong(val); if (PyErr_Occurred() || (longval > 0xFFFFFFFF)) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } *color = (Uint32)longval; return 1; } /* Failed */ PyErr_SetString(PyExc_TypeError, "invalid color argument"); return 0; } static int _hextoint(char *hex, Uint8 *val) { /* 'hex' is a two digit hexadecimal number, no spaces, no signs. * This algorithm is brute force, but it is character system agnostic. * It is definitely not a general purpose solution. */ Uint8 temp = 0; switch (toupper(hex[0])) { case '0': break; case '1': temp += 0x10; break; case '2': temp += 0x20; break; case '3': temp += 0x30; break; case '4': temp += 0x40; break; case '5': temp += 0x50; break; case '6': temp += 0x60; break; case '7': temp += 0x70; break; case '8': temp += 0x80; break; case '9': temp += 0x90; break; case 'A': temp += 0xA0; break; case 'B': temp += 0xB0; break; case 'C': temp += 0xC0; break; case 'D': temp += 0xD0; break; case 'E': temp += 0xE0; break; case 'F': temp += 0xF0; break; default: return 0; } switch (toupper(hex[1])) { case '0': break; case '1': temp += 0x01; break; case '2': temp += 0x02; break; case '3': temp += 0x03; break; case '4': temp += 0x04; break; case '5': temp += 0x05; break; case '6': temp += 0x06; break; case '7': temp += 0x07; break; case '8': temp += 0x08; break; case '9': temp += 0x09; break; case 'A': temp += 0x0A; break; case 'B': temp += 0x0B; break; case 'C': temp += 0x0C; break; case 'D': temp += 0x0D; break; case 'E': temp += 0x0E; break; case 'F': temp += 0x0F; break; default: return 0; } *val = temp; return 1; } static tristate _hexcolor(PyObject *color, Uint8 rgba[]) { size_t len; tristate rcode = TRISTATE_FAIL; char *name; PyObject *ascii = PyUnicode_AsASCIIString(color); if (ascii == NULL) { rcode = TRISTATE_ERROR; goto Fail; } name = PyBytes_AsString(ascii); if (name == NULL) { goto Fail; } len = strlen(name); /* hex colors can be * #RRGGBB * #RRGGBBAA * 0xRRGGBB * 0xRRGGBBAA */ if (len < 7) { goto Fail; } if (name[0] == '#') { if (len != 7 && len != 9) goto Fail; if (!_hextoint(name + 1, &rgba[0])) goto Fail; if (!_hextoint(name + 3, &rgba[1])) goto Fail; if (!_hextoint(name + 5, &rgba[2])) goto Fail; rgba[3] = 255; if (len == 9 && !_hextoint(name + 7, &rgba[3])) { goto Fail; } goto Success; } else if (name[0] == '0' && name[1] == 'x') { if (len != 8 && len != 10) goto Fail; if (!_hextoint(name + 2, &rgba[0])) goto Fail; if (!_hextoint(name + 4, &rgba[1])) goto Fail; if (!_hextoint(name + 6, &rgba[2])) goto Fail; rgba[3] = 255; if (len == 10 && !_hextoint(name + 8, &rgba[3])) { goto Fail; } goto Success; } goto Fail; Success: rcode = TRISTATE_SUCCESS; Fail: Py_XDECREF(ascii); return rcode; } static int _coerce_obj(PyObject *obj, Uint8 rgba[]) { if (PyType_IsSubtype(Py_TYPE(obj), &pgColor_Type)) { rgba[0] = ((pgColorObject *)obj)->data[0]; rgba[1] = ((pgColorObject *)obj)->data[1]; rgba[2] = ((pgColorObject *)obj)->data[2]; rgba[3] = ((pgColorObject *)obj)->data[3]; return 1; } else if (PyType_IsSubtype(Py_TYPE(obj), &PyTuple_Type)) { if (pg_RGBAFromObj(obj, rgba)) { return 1; } else if (PyErr_Occurred()) { return -1; } } return 0; } static pgColorObject * _color_new_internal(PyTypeObject *type, const Uint8 rgba[]) { /* default length of 4 - r,g,b,a. */ return _color_new_internal_length(type, rgba, 4); } static pgColorObject * _color_new_internal_length(PyTypeObject *type, const Uint8 rgba[], Uint8 length) { pgColorObject *color = (pgColorObject *)type->tp_alloc(type, 0); if (!color) { return NULL; } memcpy(color->data, rgba, 4); color->len = length; return color; } /** * Creates a new pgColorObject. */ static PyObject * _color_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { static const Uint8 DEFAULT_RGBA[4] = {0, 0, 0, 255}; return (PyObject *)_color_new_internal_length(type, DEFAULT_RGBA, 4); } static int _parse_color_from_text(PyObject *str_obj, Uint8 *rgba) { /* Named color */ PyObject *color = NULL; PyObject *name1 = NULL, *name2 = NULL; /* We assume the caller handled this check for us. */ assert(PyUnicode_Check(str_obj)); name1 = PyObject_CallMethod(str_obj, "replace", "(ss)", " ", ""); if (!name1) { return -1; } name2 = PyObject_CallMethod(name1, "lower", NULL); Py_DECREF(name1); if (!name2) { return -1; } color = PyDict_GetItem(_COLORDICT, name2); Py_DECREF(name2); if (!color) { switch (_hexcolor(str_obj, rgba)) { case TRISTATE_FAIL: PyErr_SetString(PyExc_ValueError, "invalid color name"); return -1; case TRISTATE_ERROR: return -1; default: break; } } else if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_ValueError, "invalid color"); return -1; } return 0; } static int _parse_color_from_single_object(PyObject *obj, Uint8 *rgba) { if (PyUnicode_Check(obj)) { if (_parse_color_from_text(obj, rgba)) { return -1; } } else { /* At this point color is either tuple-like or a single integer. */ if (!pg_RGBAFromColorObj(obj, rgba)) { /* Color is not a valid tuple-like. */ Uint32 color; if (PyTuple_Check(obj) || PySequence_Check(obj)) { /* It was a tuple-like; raise a ValueError * - if we pass it to _get_color, we will get a TypeError * instead, which is wrong. The type is correct, but it * had the wrong number of arguments. */ PyErr_SetString(PyExc_ValueError, "invalid color argument"); return -1; } if (_get_color(obj, &color)) { /* Color is a single integer. */ rgba[0] = (Uint8)(color >> 24); rgba[1] = (Uint8)(color >> 16); rgba[2] = (Uint8)(color >> 8); rgba[3] = (Uint8)color; } else { /* Exception already set by _get_color(). */ return -1; } } } return 0; } static int _color_init(pgColorObject *self, PyObject *args, PyObject *kwds) { Uint8 *rgba = self->data; PyObject *obj; PyObject *obj1 = NULL; PyObject *obj2 = NULL; PyObject *obj3 = NULL; if (!PyArg_ParseTuple(args, "O|OOO", &obj, &obj1, &obj2, &obj3)) { return -1; } if (!obj1) { if (_parse_color_from_single_object(obj, rgba)) { return -1; } } else { Uint32 color = 0; /* Color(R,G,B[,A]) */ if (!_get_color(obj, &color) || color > 255) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return -1; } rgba[0] = (Uint8)color; if (!_get_color(obj1, &color) || color > 255) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return -1; } rgba[1] = (Uint8)color; if (!obj2 || !_get_color(obj2, &color) || color > 255) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return -1; } rgba[2] = (Uint8)color; if (obj3) { if (!_get_color(obj3, &color) || color > 255) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return -1; } rgba[3] = (Uint8)color; } else { /* No alpha */ rgba[3] = 255; } } self->len = 4; return 0; } /** * Deallocates the pgColorObject. */ static void _color_dealloc(pgColorObject *color) { Py_TYPE(color)->tp_free((PyObject *)color); } /** * repr(color) */ static PyObject * _color_repr(pgColorObject *color) { return PyUnicode_FromFormat("(%d, %d, %d, %d)", color->data[0], color->data[1], color->data[2], color->data[3]); } static PyObject * _color_iter(pgColorObject *self) { Uint8 i; PyObject *iter, *tup = PyTuple_New(self->len); if (!tup) { return NULL; } for (i = 0; i < self->len; i++) { PyObject *val = PyLong_FromLong(self->data[i]); if (!val) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, i, val); } iter = PyTuple_Type.tp_iter(tup); Py_DECREF(tup); return iter; } /** * color.normalize() */ static PyObject * _color_normalize(pgColorObject *color, PyObject *_null) { double rgba[4]; rgba[0] = color->data[0] / 255.0; rgba[1] = color->data[1] / 255.0; rgba[2] = color->data[2] / 255.0; rgba[3] = color->data[3] / 255.0; return Py_BuildValue("(ffff)", rgba[0], rgba[1], rgba[2], rgba[3]); } /** * color.correct_gamma(x) */ static PyObject * _color_correct_gamma(pgColorObject *color, PyObject *args, PyObject *kwargs) { double frgba[4]; Uint8 rgba[4]; double _gamma; static char *keywords[] = {"gamma", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "d", keywords, &_gamma)) { return NULL; } frgba[0] = pow(color->data[0] / 255.0, _gamma); frgba[1] = pow(color->data[1] / 255.0, _gamma); frgba[2] = pow(color->data[2] / 255.0, _gamma); frgba[3] = pow(color->data[3] / 255.0, _gamma); /* visual studio doesn't have a round func, so doing it with +.5 and * truncaction */ rgba[0] = (frgba[0] > 1.0) ? 255 : ((frgba[0] < 0.0) ? 0 : (Uint8)(frgba[0] * 255 + .5)); rgba[1] = (frgba[1] > 1.0) ? 255 : ((frgba[1] < 0.0) ? 0 : (Uint8)(frgba[1] * 255 + .5)); rgba[2] = (frgba[2] > 1.0) ? 255 : ((frgba[2] < 0.0) ? 0 : (Uint8)(frgba[2] * 255 + .5)); rgba[3] = (frgba[3] > 1.0) ? 255 : ((frgba[3] < 0.0) ? 0 : (Uint8)(frgba[3] * 255 + .5)); return (PyObject *)_color_new_internal(Py_TYPE(color), rgba); } /** * color.grayscale() */ static PyObject * _color_grayscale(pgColorObject *self) { Uint8 grayscale_pixel = (Uint8)(0.299 * self->data[0] + 0.587 * self->data[1] + 0.114 * self->data[2]); Uint8 new_rgba[4]; new_rgba[0] = grayscale_pixel; new_rgba[1] = grayscale_pixel; new_rgba[2] = grayscale_pixel; new_rgba[3] = self->data[3]; return (PyObject *)_color_new_internal(Py_TYPE(self), new_rgba); } /** * color.lerp(other, x) */ static PyObject * _color_lerp(pgColorObject *self, PyObject *args, PyObject *kw) { Uint8 rgba[4]; Uint8 new_rgba[4]; PyObject *colobj; double amt; static char *keywords[] = {"color", "amount", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kw, "Od", keywords, &colobj, &amt)) { return NULL; } if (!pg_RGBAFromFuzzyColorObj(colobj, rgba)) { /* Exception already set for us */ return NULL; } if (amt < 0 || amt > 1) { return RAISE(PyExc_ValueError, "Argument 2 must be in range [0, 1]"); } new_rgba[0] = (Uint8)pg_round(self->data[0] * (1 - amt) + rgba[0] * amt); new_rgba[1] = (Uint8)pg_round(self->data[1] * (1 - amt) + rgba[1] * amt); new_rgba[2] = (Uint8)pg_round(self->data[2] * (1 - amt) + rgba[2] * amt); new_rgba[3] = (Uint8)pg_round(self->data[3] * (1 - amt) + rgba[3] * amt); return (PyObject *)_color_new_internal(Py_TYPE(self), new_rgba); } /** * color.premul_alpha() */ static PyObject * _premul_alpha(pgColorObject *color, PyObject *_null) { Uint8 new_rgba[4]; new_rgba[0] = (Uint8)(((color->data[0] + 1) * color->data[3]) >> 8); new_rgba[1] = (Uint8)(((color->data[1] + 1) * color->data[3]) >> 8); new_rgba[2] = (Uint8)(((color->data[2] + 1) * color->data[3]) >> 8); new_rgba[3] = color->data[3]; return (PyObject *)_color_new_internal(Py_TYPE(color), new_rgba); } static PyObject * _color_update(pgColorObject *self, PyObject *const *args, Py_ssize_t nargs) { Uint8 *rgba = self->data; if (nargs == 1) { if (_parse_color_from_single_object(args[0], rgba)) { return NULL; } } else if (nargs == 3 || nargs == 4) { Py_ssize_t i; Uint32 color = 0; for (i = 0; i < nargs; i++) { if (!_get_color(args[i], &color) || color > 255) { return RAISE(PyExc_ValueError, "invalid color argument"); } rgba[i] = (Uint8)color; } /* Update len only if alpha component was passed (because the previous * implementation of this function behaved so) */ if (nargs == 4) { self->len = 4; } } else { return RAISE(PyExc_TypeError, "update can take only 1, 3 or 4 arguments"); } Py_RETURN_NONE; } PG_WRAP_FASTCALL_FUNC(_color_update, pgColorObject) /** * color.r */ static PyObject * _color_get_r(pgColorObject *color, void *closure) { return PyLong_FromLong(color->data[0]); } /** * color.r = x */ static int _color_set_r(pgColorObject *color, PyObject *value, void *closure) { Uint32 c; DEL_ATTR_NOT_SUPPORTED_CHECK("r", value); if (!_get_color(value, &c)) { return -1; } if (c > 255) { PyErr_SetString(PyExc_ValueError, "color exceeds allowed range"); return -1; } color->data[0] = c; return 0; } /** * color.g */ static PyObject * _color_get_g(pgColorObject *color, void *closure) { return PyLong_FromLong(color->data[1]); } /** * color.g = x */ static int _color_set_g(pgColorObject *color, PyObject *value, void *closure) { Uint32 c; DEL_ATTR_NOT_SUPPORTED_CHECK("g", value); if (!_get_color(value, &c)) { return -1; } if (c > 255) { PyErr_SetString(PyExc_ValueError, "color exceeds allowed range"); return -1; } color->data[1] = c; return 0; } /** * color.b */ static PyObject * _color_get_b(pgColorObject *color, void *closure) { return PyLong_FromLong(color->data[2]); } /** * color.b = x */ static int _color_set_b(pgColorObject *color, PyObject *value, void *closure) { Uint32 c; DEL_ATTR_NOT_SUPPORTED_CHECK("b", value); if (!_get_color(value, &c)) { return -1; } if (c > 255) { PyErr_SetString(PyExc_ValueError, "color exceeds allowed range"); return -1; } color->data[2] = c; return 0; } /** * color.a */ static PyObject * _color_get_a(pgColorObject *color, void *closure) { return PyLong_FromLong(color->data[3]); } /** * color.a = x */ static int _color_set_a(pgColorObject *color, PyObject *value, void *closure) { Uint32 c; DEL_ATTR_NOT_SUPPORTED_CHECK("a", value); if (!_get_color(value, &c)) { return -1; } if (c > 255) { PyErr_SetString(PyExc_ValueError, "color exceeds allowed range"); return -1; } color->data[3] = c; return 0; } /** * color.hsva */ static PyObject * _color_get_hsva(pgColorObject *color, void *closure) { double hsv[3] = {0, 0, 0}; double frgb[4]; double minv, maxv, diff; /* Normalize */ frgb[0] = color->data[0] / 255.0; frgb[1] = color->data[1] / 255.0; frgb[2] = color->data[2] / 255.0; frgb[3] = color->data[3] / 255.0; maxv = MAX(MAX(frgb[0], frgb[1]), frgb[2]); minv = MIN(MIN(frgb[0], frgb[1]), frgb[2]); diff = maxv - minv; /* Calculate V */ hsv[2] = 100. * maxv; if (maxv == minv) { hsv[0] = 0; hsv[1] = 0; return Py_BuildValue("(ffff)", hsv[0], hsv[1], hsv[2], frgb[3] * 100); } /* Calculate S */ hsv[1] = 100. * (maxv - minv) / maxv; /* Clamp S, needed on some but not all FPUs */ if (hsv[1] < 0) { hsv[1] = 0.f; } else if (hsv[1] > 100) { hsv[1] = 100.f; } /* Calculate H */ if (maxv == frgb[0]) { hsv[0] = fmod((60 * ((frgb[1] - frgb[2]) / diff)), 360.f); } else if (maxv == frgb[1]) { hsv[0] = (60 * ((frgb[2] - frgb[0]) / diff)) + 120.f; } else { hsv[0] = (60 * ((frgb[0] - frgb[1]) / diff)) + 240.f; } if (hsv[0] < 0) { hsv[0] += 360.f; } /* H,S,V,A */ return Py_BuildValue("(ffff)", hsv[0], hsv[1], hsv[2], frgb[3] * 100); } static int _color_set_hsva(pgColorObject *color, PyObject *value, void *closure) { PyObject *item; double hsva[4] = {0, 0, 0, 0}; double f, p, q, t, v, s; int hi; DEL_ATTR_NOT_SUPPORTED_CHECK("hsva", value); if (!PySequence_Check(value) || PySequence_Size(value) < 3) { PyErr_SetString(PyExc_ValueError, "invalid HSVA value"); return -1; } /* H */ item = PySequence_GetItem(value, 0); if (!item || !_get_double(item, &(hsva[0])) || hsva[0] < 0 || hsva[0] > 360) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSVA value"); return -1; } Py_DECREF(item); /* S */ item = PySequence_GetItem(value, 1); if (!item || !_get_double(item, &(hsva[1])) || hsva[1] < 0 || hsva[1] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSVA value"); return -1; } Py_DECREF(item); /* V */ item = PySequence_GetItem(value, 2); if (!item || !_get_double(item, &(hsva[2])) || hsva[2] < 0 || hsva[2] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSVA value"); return -1; } Py_DECREF(item); /* A */ if (PySequence_Size(value) > 3) { item = PySequence_GetItem(value, 3); if (!item || !_get_double(item, &(hsva[3])) || hsva[3] < 0 || hsva[3] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSVA value"); return -1; } Py_DECREF(item); } color->data[3] = (Uint8)((hsva[3] / 100.0f) * 255); s = hsva[1] / 100.f; v = hsva[2] / 100.f; hi = (int)floor(hsva[0] / 60.f); f = (hsva[0] / 60.f) - hi; p = v * (1 - s); q = v * (1 - s * f); t = v * (1 - s * (1 - f)); switch (hi) { case 1: color->data[0] = (Uint8)(q * 255); color->data[1] = (Uint8)(v * 255); color->data[2] = (Uint8)(p * 255); break; case 2: color->data[0] = (Uint8)(p * 255); color->data[1] = (Uint8)(v * 255); color->data[2] = (Uint8)(t * 255); break; case 3: color->data[0] = (Uint8)(p * 255); color->data[1] = (Uint8)(q * 255); color->data[2] = (Uint8)(v * 255); break; case 4: color->data[0] = (Uint8)(t * 255); color->data[1] = (Uint8)(p * 255); color->data[2] = (Uint8)(v * 255); break; case 5: color->data[0] = (Uint8)(v * 255); color->data[1] = (Uint8)(p * 255); color->data[2] = (Uint8)(q * 255); break; default: /* 0 or 6, which are equivalent. */ assert(hi == 0 || hi == 6); color->data[0] = (Uint8)(v * 255); color->data[1] = (Uint8)(t * 255); color->data[2] = (Uint8)(p * 255); } return 0; } /** * color.hsla */ static PyObject * _color_get_hsla(pgColorObject *color, void *closure) { double hsl[3] = {0, 0, 0}; double frgb[4]; double minv, maxv, diff; /* Normalize */ frgb[0] = color->data[0] / 255.0; frgb[1] = color->data[1] / 255.0; frgb[2] = color->data[2] / 255.0; frgb[3] = color->data[3] / 255.0; maxv = MAX(MAX(frgb[0], frgb[1]), frgb[2]); minv = MIN(MIN(frgb[0], frgb[1]), frgb[2]); diff = maxv - minv; /* Calculate L */ hsl[2] = 50.f * (maxv + minv); /* 1/2 (max + min) */ if (maxv == minv) { hsl[1] = 0; hsl[0] = 0; return Py_BuildValue("(ffff)", hsl[0], hsl[1], hsl[2], frgb[3] * 100); } /* Calculate S */ if (hsl[2] <= 50) { hsl[1] = diff / (maxv + minv); } else { hsl[1] = diff / (2 - maxv - minv); } hsl[1] *= 100.f; /* Calculate H */ if (maxv == frgb[0]) { hsl[0] = fmod((60 * ((frgb[1] - frgb[2]) / diff)), 360.f); } else if (maxv == frgb[1]) { hsl[0] = (60 * ((frgb[2] - frgb[0]) / diff)) + 120.f; } else { hsl[0] = (60 * ((frgb[0] - frgb[1]) / diff)) + 240.f; } if (hsl[0] < 0) { hsl[0] += 360.f; } /* H,S,L,A */ return Py_BuildValue("(ffff)", hsl[0], hsl[1], hsl[2], frgb[3] * 100); } /** * color.hsla = x */ static int _color_set_hsla(pgColorObject *color, PyObject *value, void *closure) { PyObject *item; double hsla[4] = {0, 0, 0, 0}; double ht, h, q, p = 0, s, l = 0; static double onethird = 1.0 / 3.0f; DEL_ATTR_NOT_SUPPORTED_CHECK("hsla", value); if (!PySequence_Check(value) || PySequence_Size(value) < 3) { PyErr_SetString(PyExc_ValueError, "invalid HSLA value"); return -1; } /* H */ item = PySequence_GetItem(value, 0); if (!item || !_get_double(item, &(hsla[0])) || hsla[0] < 0 || hsla[0] > 360) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSLA value"); return -1; } Py_DECREF(item); /* S */ item = PySequence_GetItem(value, 1); if (!item || !_get_double(item, &(hsla[1])) || hsla[1] < 0 || hsla[1] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSLA value"); return -1; } Py_DECREF(item); /* L */ item = PySequence_GetItem(value, 2); if (!item || !_get_double(item, &(hsla[2])) || hsla[2] < 0 || hsla[2] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSLA value"); return -1; } Py_DECREF(item); /* A */ if (PySequence_Size(value) > 3) { item = PySequence_GetItem(value, 3); if (!item || !_get_double(item, &(hsla[3])) || hsla[3] < 0 || hsla[3] > 100) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid HSLA value"); return -1; } Py_DECREF(item); } color->data[3] = (Uint8)((hsla[3] / 100.f) * 255); s = hsla[1] / 100.f; l = hsla[2] / 100.f; if (s == 0) { color->data[0] = (Uint8)(l * 255); color->data[1] = (Uint8)(l * 255); color->data[2] = (Uint8)(l * 255); return 0; } if (l < 0.5f) { q = l * (1 + s); } else { q = l + s - (l * s); } p = 2 * l - q; ht = hsla[0] / 360.f; /* Calculate R */ h = ht + onethird; if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } if (h < 1. / 6.f) { color->data[0] = (Uint8)((p + ((q - p) * 6 * h)) * 255); } else if (h < 0.5f) { color->data[0] = (Uint8)(q * 255); } else if (h < 2. / 3.f) { color->data[0] = (Uint8)((p + ((q - p) * 6 * (2. / 3.f - h))) * 255); } else { color->data[0] = (Uint8)(p * 255); } /* Calculate G */ h = ht; if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } if (h < 1. / 6.f) { color->data[1] = (Uint8)((p + ((q - p) * 6 * h)) * 255); } else if (h < 0.5f) { color->data[1] = (Uint8)(q * 255); } else if (h < 2. / 3.f) { color->data[1] = (Uint8)((p + ((q - p) * 6 * (2. / 3.f - h))) * 255); } else { color->data[1] = (Uint8)(p * 255); } /* Calculate B */ h = ht - onethird; if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } if (h < 1. / 6.f) { color->data[2] = (Uint8)((p + ((q - p) * 6 * h)) * 255); } else if (h < 0.5f) { color->data[2] = (Uint8)(q * 255); } else if (h < 2. / 3.f) { color->data[2] = (Uint8)((p + ((q - p) * 6 * (2. / 3.f - h))) * 255); } else { color->data[2] = (Uint8)(p * 255); } return 0; } static PyObject * _color_get_i1i2i3(pgColorObject *color, void *closure) { double i1i2i3[3] = {0, 0, 0}; double frgb[3]; /* Normalize */ frgb[0] = color->data[0] / 255.0; frgb[1] = color->data[1] / 255.0; frgb[2] = color->data[2] / 255.0; i1i2i3[0] = (frgb[0] + frgb[1] + frgb[2]) / 3.0f; i1i2i3[1] = (frgb[0] - frgb[2]) / 2.0f; i1i2i3[2] = (2 * frgb[1] - frgb[0] - frgb[2]) / 4.0f; return Py_BuildValue("(fff)", i1i2i3[0], i1i2i3[1], i1i2i3[2]); } static int _color_set_i1i2i3(pgColorObject *color, PyObject *value, void *closure) { PyObject *item; double i1i2i3[3] = {0, 0, 0}; double ar, ag, ab; DEL_ATTR_NOT_SUPPORTED_CHECK("i1i2i3", value); /* I1 */ item = PySequence_GetItem(value, 0); if (!item || !_get_double(item, &(i1i2i3[0])) || i1i2i3[0] < 0 || i1i2i3[0] > 1) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid I1I2I3 value"); return -1; } Py_DECREF(item); /* I2 */ item = PySequence_GetItem(value, 1); if (!item || !_get_double(item, &(i1i2i3[1])) || i1i2i3[1] < -0.5f || i1i2i3[1] > 0.5f) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid I1I2I3 value"); return -1; } Py_DECREF(item); /* I3 */ item = PySequence_GetItem(value, 2); if (!item || !_get_double(item, &(i1i2i3[2])) || i1i2i3[2] < -0.5f || i1i2i3[2] > 0.5f) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid I1I2I3 value"); return -1; } Py_DECREF(item); ab = i1i2i3[0] - i1i2i3[1] - 2 * i1i2i3[2] / 3.f; ar = 2 * i1i2i3[1] + ab; ag = 3 * i1i2i3[0] - ar - ab; color->data[0] = (Uint8)(ar * 255); color->data[1] = (Uint8)(ag * 255); color->data[2] = (Uint8)(ab * 255); return 0; } static PyObject * _color_get_cmy(pgColorObject *color, void *closure) { double cmy[3] = {0, 0, 0}; double frgb[3]; /* Normalize */ frgb[0] = color->data[0] / 255.0; frgb[1] = color->data[1] / 255.0; frgb[2] = color->data[2] / 255.0; cmy[0] = 1.0 - frgb[0]; cmy[1] = 1.0 - frgb[1]; cmy[2] = 1.0 - frgb[2]; return Py_BuildValue("(fff)", cmy[0], cmy[1], cmy[2]); } static int _color_set_cmy(pgColorObject *color, PyObject *value, void *closure) { PyObject *item; double cmy[3] = {0, 0, 0}; DEL_ATTR_NOT_SUPPORTED_CHECK("cmy", value); /* I1 */ item = PySequence_GetItem(value, 0); if (!item || !_get_double(item, &(cmy[0])) || cmy[0] < 0 || cmy[0] > 1) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid CMY value"); return -1; } Py_DECREF(item); /* I2 */ item = PySequence_GetItem(value, 1); if (!item || !_get_double(item, &(cmy[1])) || cmy[1] < 0 || cmy[1] > 1) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid CMY value"); return -1; } Py_DECREF(item); /* I2 */ item = PySequence_GetItem(value, 2); if (!item || !_get_double(item, &(cmy[2])) || cmy[2] < 0 || cmy[2] > 1) { Py_XDECREF(item); PyErr_SetString(PyExc_ValueError, "invalid CMY value"); return -1; } Py_DECREF(item); color->data[0] = (Uint8)((1.0 - cmy[0]) * 255); color->data[1] = (Uint8)((1.0 - cmy[1]) * 255); color->data[2] = (Uint8)((1.0 - cmy[2]) * 255); return 0; } static PyObject * _color_get_arraystruct(pgColorObject *color, void *closure) { Py_buffer view; PyObject *capsule; if (_color_getbuffer(color, &view, PyBUF_FULL_RO)) { return 0; } capsule = pgBuffer_AsArrayStruct(&view); Py_DECREF(color); return capsule; } /* Number protocol methods */ /** * color1 + color2 */ static PyObject * _color_add(PyObject *obj1, PyObject *obj2) { Uint8 rgba[4]; pgColorObject *color1 = (pgColorObject *)obj1; pgColorObject *color2 = (pgColorObject *)obj2; if (!PyObject_IsInstance(obj1, (PyObject *)&pgColor_Type) || !PyObject_IsInstance(obj2, (PyObject *)&pgColor_Type)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } rgba[0] = MIN(color1->data[0] + color2->data[0], 255); rgba[1] = MIN(color1->data[1] + color2->data[1], 255); rgba[2] = MIN(color1->data[2] + color2->data[2], 255); rgba[3] = MIN(color1->data[3] + color2->data[3], 255); return (PyObject *)_color_new_internal(Py_TYPE(obj1), rgba); } /** * color1 - color2 */ static PyObject * _color_sub(PyObject *obj1, PyObject *obj2) { Uint8 rgba[4]; pgColorObject *color1 = (pgColorObject *)obj1; pgColorObject *color2 = (pgColorObject *)obj2; if (!PyObject_IsInstance(obj1, (PyObject *)&pgColor_Type) || !PyObject_IsInstance(obj2, (PyObject *)&pgColor_Type)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } rgba[0] = MAX(color1->data[0] - color2->data[0], 0); rgba[1] = MAX(color1->data[1] - color2->data[1], 0); rgba[2] = MAX(color1->data[2] - color2->data[2], 0); rgba[3] = MAX(color1->data[3] - color2->data[3], 0); return (PyObject *)_color_new_internal(Py_TYPE(obj1), rgba); } /** * color1 * color2 */ static PyObject * _color_mul(PyObject *obj1, PyObject *obj2) { Uint8 rgba[4]; pgColorObject *color1 = (pgColorObject *)obj1; pgColorObject *color2 = (pgColorObject *)obj2; if (!PyObject_IsInstance(obj1, (PyObject *)&pgColor_Type) || !PyObject_IsInstance(obj2, (PyObject *)&pgColor_Type)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } rgba[0] = MIN(color1->data[0] * color2->data[0], 255); rgba[1] = MIN(color1->data[1] * color2->data[1], 255); rgba[2] = MIN(color1->data[2] * color2->data[2], 255); rgba[3] = MIN(color1->data[3] * color2->data[3], 255); return (PyObject *)_color_new_internal(Py_TYPE(obj1), rgba); } /** * color1 / color2 */ static PyObject * _color_div(PyObject *obj1, PyObject *obj2) { Uint8 rgba[4] = {0, 0, 0, 0}; pgColorObject *color1 = (pgColorObject *)obj1; pgColorObject *color2 = (pgColorObject *)obj2; if (!PyObject_IsInstance(obj1, (PyObject *)&pgColor_Type) || !PyObject_IsInstance(obj2, (PyObject *)&pgColor_Type)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if (color2->data[0] != 0) { rgba[0] = color1->data[0] / color2->data[0]; } if (color2->data[1] != 0) { rgba[1] = color1->data[1] / color2->data[1]; } if (color2->data[2]) { rgba[2] = color1->data[2] / color2->data[2]; } if (color2->data[3]) { rgba[3] = color1->data[3] / color2->data[3]; } return (PyObject *)_color_new_internal(Py_TYPE(obj1), rgba); } /** * color1 % color2 */ static PyObject * _color_mod(PyObject *obj1, PyObject *obj2) { Uint8 rgba[4] = {0, 0, 0, 0}; pgColorObject *color1 = (pgColorObject *)obj1; pgColorObject *color2 = (pgColorObject *)obj2; if (!PyObject_IsInstance(obj1, (PyObject *)&pgColor_Type) || !PyObject_IsInstance(obj2, (PyObject *)&pgColor_Type)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if (color2->data[0] != 0) { rgba[0] = color1->data[0] % color2->data[0]; } if (color2->data[1] != 0) { rgba[1] = color1->data[1] % color2->data[1]; } if (color2->data[2]) { rgba[2] = color1->data[2] % color2->data[2]; } if (color2->data[3]) { rgba[3] = color1->data[3] % color2->data[3]; } return (PyObject *)_color_new_internal(Py_TYPE(obj1), rgba); } /** * ~color */ static PyObject * _color_inv(pgColorObject *color) { Uint8 rgba[4]; rgba[0] = 255 - color->data[0]; rgba[1] = 255 - color->data[1]; rgba[2] = 255 - color->data[2]; rgba[3] = 255 - color->data[3]; return (PyObject *)_color_new_internal(Py_TYPE(color), rgba); } /** * int(color) */ static PyObject * _color_int(pgColorObject *color) { Uint32 tmp = (color->data[0] << 24) + (color->data[1] << 16) + (color->data[2] << 8) + color->data[3]; return PyLong_FromUnsignedLong(tmp); } /** * float(color) */ static PyObject * _color_float(pgColorObject *color) { Uint32 tmp = ((color->data[0] << 24) + (color->data[1] << 16) + (color->data[2] << 8) + color->data[3]); return PyFloat_FromDouble((double)tmp); } /* Sequence protocol methods */ /** * len(color) */ static Py_ssize_t _color_length(pgColorObject *color) { return color->len; } /** * color.set_length(3) */ static PyObject * _color_set_length(pgColorObject *color, PyObject *args) { int clength; if (PyErr_WarnEx(PyExc_DeprecationWarning, "pygame.Color.set_length deprecated since 2.1.3", 1) == -1) { return NULL; } if (!PyArg_ParseTuple(args, "i", &clength)) { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) { return NULL; } /* OverflowError also means the value is out-of-range */ PyErr_Clear(); clength = INT_MAX; } if (clength > 4 || clength < 1) { return RAISE(PyExc_ValueError, "Length needs to be 1,2,3, or 4."); } color->len = clength; Py_RETURN_NONE; } /** * color[x] */ static PyObject * _color_item(pgColorObject *color, Py_ssize_t _index) { if ((_index > (color->len - 1))) { return RAISE(PyExc_IndexError, "invalid index"); } switch (_index) { case 0: return PyLong_FromLong(color->data[0]); case 1: return PyLong_FromLong(color->data[1]); case 2: return PyLong_FromLong(color->data[2]); case 3: return PyLong_FromLong(color->data[3]); default: return RAISE(PyExc_IndexError, "invalid index"); } } static PyObject * _color_subscript(pgColorObject *self, PyObject *item) { if (PyIndex_Check(item)) { Py_ssize_t i; i = PyNumber_AsSsize_t(item, PyExc_IndexError); if (i == -1 && PyErr_Occurred()) { return NULL; } /* if (i < 0) i += PyList_GET_SIZE(self); */ return _color_item(self, i); } if (PySlice_Check(item)) { int len = 4; Py_ssize_t start, stop, step, slicelength; if (Slice_GET_INDICES_EX(item, len, &start, &stop, &step, &slicelength) < 0) { return NULL; } if (slicelength <= 0) { return PyTuple_New(0); } else if (step == 1) { return _color_slice(self, start, stop); } else { PyErr_SetString(PyExc_TypeError, "slice steps not supported"); return NULL; } } else { PyErr_Format(PyExc_TypeError, "Color indices must be integers, not %.200s", Py_TYPE(item)->tp_name); return NULL; } } /** * color[x] = y */ static int _color_ass_item(pgColorObject *color, Py_ssize_t _index, PyObject *value) { switch (_index) { case 0: return _color_set_r(color, value, NULL); case 1: return _color_set_g(color, value, NULL); case 2: return _color_set_b(color, value, NULL); case 3: return _color_set_a(color, value, NULL); default: PyErr_SetString(PyExc_IndexError, "invalid index"); break; } return -1; } static PyObject * _color_slice(register pgColorObject *a, register Py_ssize_t ilow, register Py_ssize_t ihigh) { Py_ssize_t len; Py_ssize_t c1 = 0; Py_ssize_t c2 = 0; Py_ssize_t c3 = 0; Py_ssize_t c4 = 0; /* printf("ilow :%d:, ihigh:%d:\n", ilow, ihigh); */ if (ilow < 0) { ilow = 0; } if (ihigh > 3) { ihigh = 4; } if (ihigh < ilow) { ihigh = ilow; } len = ihigh - ilow; /* printf("2 ilow :%d:, ihigh:%d: len:%d:\n", ilow, ihigh, len); */ if (ilow == 0) { c1 = a->data[0]; c2 = a->data[1]; c3 = a->data[2]; c4 = a->data[3]; } else if (ilow == 1) { c1 = a->data[1]; c2 = a->data[2]; c3 = a->data[3]; } else if (ilow == 2) { c1 = a->data[2]; c2 = a->data[3]; } else if (ilow == 3) { c1 = a->data[3]; } /* return a tuple depending on which elements are wanted. */ if (len == 4) { return Py_BuildValue("(iiii)", c1, c2, c3, c4); } else if (len == 3) { return Py_BuildValue("(iii)", c1, c2, c3); } else if (len == 2) { return Py_BuildValue("(ii)", c1, c2); } else if (len == 1) { return Py_BuildValue("(i)", c1); } else { return Py_BuildValue("()"); } } static int _color_contains(pgColorObject *self, PyObject *arg) { if (!PyLong_Check(arg)) { PyErr_SetString(PyExc_TypeError, "'in ' requires integer object"); return -1; } long comp = PyLong_AsLong(arg); if (comp == -1 && PyErr_Occurred()) { return -1; } int i; for (i = 0; i < self->len; i++) { if (self->data[i] == comp) { return 1; } } return 0; } static int _color_set_slice(pgColorObject *color, PyObject *idx, PyObject *val) { if (val == NULL) { PyErr_SetString(PyExc_TypeError, "Color object doesn't support item deletion"); return -1; } if (PyLong_Check(idx)) { return _color_ass_item(color, PyLong_AsLong(idx), val); } else if (PySlice_Check(idx)) { Py_ssize_t start, stop, step, slicelength; PyObject *fastitems; int c; Py_ssize_t i, cur; if (Slice_GET_INDICES_EX(idx, color->len, &start, &stop, &step, &slicelength) < 0) { return -1; } if ((step < 0 && start < stop) || (step > 0 && start > stop)) stop = start; if (!(fastitems = PySequence_Fast(val, "expected sequence"))) { return -1; } if (PySequence_Fast_GET_SIZE(fastitems) != slicelength) { PyErr_Format(PyExc_ValueError, "attempting to assign sequence of length %zd " "to slice of length %zd", PySequence_Fast_GET_SIZE(fastitems), slicelength); Py_DECREF(fastitems); return -1; } for (cur = start, i = 0; i < slicelength; cur += step, i++) { PyObject *obj = PySequence_Fast_GET_ITEM(fastitems, i); if (PyLong_Check(obj)) { c = PyLong_AsLong(obj); } else { PyErr_SetString(PyExc_TypeError, "color components must be integers"); Py_DECREF(fastitems); return -1; } if (c < 0 || c > 255) { PyErr_SetString(PyExc_ValueError, "color component must be 0-255"); Py_DECREF(fastitems); return -1; } color->data[cur] = (Uint8)c; } Py_DECREF(fastitems); return 0; } PyErr_SetString(PyExc_IndexError, "Index must be an integer or slice"); return -1; } /* * colorA == colorB * colorA != colorB */ static PyObject * _color_richcompare(PyObject *o1, PyObject *o2, int opid) { typedef union { Uint32 pixel; Uint8 bytes[4]; } _rgba_t; _rgba_t rgba1, rgba2; switch (_coerce_obj(o1, rgba1.bytes)) { case -1: return 0; case 0: goto Unimplemented; default: break; } switch (_coerce_obj(o2, rgba2.bytes)) { case -1: return 0; case 0: goto Unimplemented; default: break; } switch (opid) { case Py_EQ: return PyBool_FromLong(rgba1.pixel == rgba2.pixel); case Py_NE: return PyBool_FromLong(rgba1.pixel != rgba2.pixel); default: break; } Unimplemented: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } static int _color_getbuffer(pgColorObject *color, Py_buffer *view, int flags) { static char format[] = "B"; if (PyBUF_HAS_FLAG(flags, PyBUF_WRITABLE)) { PyErr_SetString(pgExc_BufferError, "color buffer is read-only"); return -1; } view->buf = color->data; view->ndim = 1; view->itemsize = 1; view->len = color->len; view->readonly = 1; if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view->ndim = 1; view->shape = &view->len; } else { view->ndim = 0; view->shape = 0; } if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { view->format = format; } else { view->format = 0; } if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view->strides = &view->itemsize; } else { view->strides = 0; } view->suboffsets = 0; Py_INCREF(color); view->obj = (PyObject *)color; return 0; } /**** C API interfaces ****/ static PyObject * pgColor_New(Uint8 rgba[]) { return (PyObject *)_color_new_internal(&pgColor_Type, rgba); } static PyObject * pgColor_NewLength(Uint8 rgba[], Uint8 length) { if (length < 1 || length > 4) { return PyErr_Format(PyExc_ValueError, "Expected length within range [1,4]: got %d", (int)length); } return (PyObject *)_color_new_internal_length(&pgColor_Type, rgba, length); } static int pg_RGBAFromColorObj(PyObject *color, Uint8 rgba[]) { if (PyColor_Check(color)) { rgba[0] = ((pgColorObject *)color)->data[0]; rgba[1] = ((pgColorObject *)color)->data[1]; rgba[2] = ((pgColorObject *)color)->data[2]; rgba[3] = ((pgColorObject *)color)->data[3]; return 1; } /* Default action */ return pg_RGBAFromObj(color, rgba); } static int pg_RGBAFromFuzzyColorObj(PyObject *color, Uint8 rgba[]) { return _parse_color_from_single_object(color, rgba) == 0; } /*DOC*/ static char _color_doc[] = /*DOC*/ "color module for pygame"; MODINIT_DEFINE(color) { PyObject *module = NULL, *colordict_module, *apiobj; static void *c_api[PYGAMEAPI_COLOR_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "color", _color_doc, -1, NULL, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } colordict_module = PyImport_ImportModule("pygame.colordict"); if (!colordict_module) { return NULL; } _COLORDICT = PyObject_GetAttrString(colordict_module, "THECOLORS"); Py_DECREF(colordict_module); if (!_COLORDICT) { return NULL; } /* type preparation */ if (PyType_Ready(&pgColor_Type) < 0) { goto error; } /* create the module */ module = PyModule_Create(&_module); if (!module) { goto error; } pgColor_Type.tp_getattro = PyObject_GenericGetAttr; Py_INCREF(&pgColor_Type); if (PyModule_AddObject(module, "Color", (PyObject *)&pgColor_Type)) { Py_DECREF(&pgColor_Type); goto error; } Py_INCREF(_COLORDICT); if (PyModule_AddObject(module, "THECOLORS", _COLORDICT)) { /* Yes, _COLORDICT is decref'd twice here and we want that */ Py_DECREF(_COLORDICT); goto error; } c_api[0] = &pgColor_Type; c_api[1] = pgColor_New; c_api[2] = pg_RGBAFromColorObj; c_api[3] = pgColor_NewLength; c_api[4] = pg_RGBAFromFuzzyColorObj; apiobj = encapsulate_api(c_api, "color"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); goto error; } return module; error: Py_XDECREF(module); Py_DECREF(_COLORDICT); return NULL; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/constants.c0000644000175100001770000004631014676242340015674 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #define NO_PYGAME_C_API #include "pygame.h" #include "pgcompat.h" #include "scrap.h" /* macros used to create each constant */ #define ADD_ERROR(x) \ { \ Py_DECREF(module); \ return NULL; \ } \ else \ { \ PyList_Append(all_list, PyUnicode_FromString(x)); \ } #define STRINGIZE(x) #x #define DEC_CONSTS_(x, y) \ if (PyModule_AddIntConstant(module, x, (int)y)) \ ADD_ERROR(x) #define DEC_CONSTS(x, y) DEC_CONSTS_(#x, y) #define DEC_CONST(x) DEC_CONSTS_(#x, SDL_##x) #define DEC_CONSTKS(x, y) DEC_CONSTS_(STRINGIZE(K_##x), SDLK_##y) #define DEC_CONSTK(x) DEC_CONSTS_(STRINGIZE(K_##x), SDLK_##x) #define DEC_CONSTSCS(x, y) DEC_CONSTS_(STRINGIZE(KSCAN_##x), SDL_SCANCODE_##y) #define DEC_CONSTSC(x) DEC_CONSTS_(STRINGIZE(KSCAN_##x), SDL_SCANCODE_##x) #define DEC_CONSTKS_AND_SCS(x, y) \ DEC_CONSTS_(STRINGIZE(K_##x), SDLK_##y) \ DEC_CONSTS_(STRINGIZE(KSCAN_##x), SDL_SCANCODE_##y) #define DEC_CONSTK_AND_SC(x) \ DEC_CONSTS_(STRINGIZE(K_##x), SDLK_##x) \ DEC_CONSTS_(STRINGIZE(KSCAN_##x), SDL_SCANCODE_##x) #define DEC_CONSTN(x) DEC_CONSTS_(#x, x) #define DEC_CONSTSF(x) DEC_CONSTS_(#x, PGS_##x) #define ADD_STRING_CONST(x) \ if (PyModule_AddStringConstant(module, #x, x)) \ ADD_ERROR(#x) static PyMethodDef _constant_methods[] = {{NULL}}; /*DOC*/ static char _constants_doc[] = /*DOC*/ "Constants defined by SDL and needed in Pygame.\n"; MODINIT_DEFINE(constants) { PyObject *module, *all_list; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "constants", _constants_doc, -1, _constant_methods, NULL, NULL, NULL, NULL}; module = PyModule_Create(&_module); if (module == NULL) { return NULL; } // Attempt to create __all__ variable for constants module all_list = PyList_New(0); if (!all_list) { Py_DECREF(module); return NULL; } DEC_CONST(LIL_ENDIAN); DEC_CONST(BIG_ENDIAN); DEC_CONSTSF(SWSURFACE); DEC_CONSTSF(HWSURFACE); DEC_CONSTSF(RESIZABLE); DEC_CONSTSF(ASYNCBLIT); DEC_CONSTSF(OPENGL); DEC_CONSTSF(OPENGLBLIT); DEC_CONSTSF(ANYFORMAT); DEC_CONSTSF(HWPALETTE); DEC_CONSTSF(DOUBLEBUF); DEC_CONSTSF(FULLSCREEN); DEC_CONSTSF(HWACCEL); DEC_CONSTSF(SRCCOLORKEY); DEC_CONSTSF(RLEACCELOK); DEC_CONSTSF(RLEACCEL); DEC_CONSTSF(SRCALPHA); DEC_CONSTSF(PREALLOC); DEC_CONSTSF(NOFRAME); DEC_CONSTSF(SHOWN); DEC_CONSTSF(HIDDEN); DEC_CONSTSF(SCALED); DEC_CONST(GL_RED_SIZE); DEC_CONST(GL_GREEN_SIZE); DEC_CONST(GL_BLUE_SIZE); DEC_CONST(GL_ALPHA_SIZE); DEC_CONST(GL_BUFFER_SIZE); DEC_CONST(GL_DOUBLEBUFFER); DEC_CONST(GL_DEPTH_SIZE); DEC_CONST(GL_STENCIL_SIZE); DEC_CONST(GL_ACCUM_RED_SIZE); DEC_CONST(GL_ACCUM_GREEN_SIZE); DEC_CONST(GL_ACCUM_BLUE_SIZE); DEC_CONST(GL_ACCUM_ALPHA_SIZE); DEC_CONST(GL_ACCELERATED_VISUAL); DEC_CONST(GL_CONTEXT_MAJOR_VERSION); DEC_CONST(GL_CONTEXT_MINOR_VERSION); DEC_CONST(GL_SHARE_WITH_CURRENT_CONTEXT); DEC_CONST(GL_CONTEXT_FLAGS); /* context flag values: */ DEC_CONST(GL_CONTEXT_DEBUG_FLAG); DEC_CONST(GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); DEC_CONST(GL_CONTEXT_ROBUST_ACCESS_FLAG); DEC_CONST(GL_CONTEXT_RESET_ISOLATION_FLAG); DEC_CONST(GL_CONTEXT_PROFILE_MASK); /* values for GL_CONTEXT_PROFILE_MASK: */ DEC_CONST(GL_CONTEXT_PROFILE_CORE); DEC_CONST(GL_CONTEXT_PROFILE_COMPATIBILITY); DEC_CONST(GL_CONTEXT_PROFILE_ES); DEC_CONST(GL_FRAMEBUFFER_SRGB_CAPABLE); DEC_CONST(GL_CONTEXT_RELEASE_BEHAVIOR); /* values for GL_CONTEXT_RELEASE_BEHAVIOR: */ DEC_CONST(GL_CONTEXT_RELEASE_BEHAVIOR_NONE); DEC_CONST(GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH); DEC_CONST(BLENDMODE_NONE); DEC_CONST(BLENDMODE_BLEND); DEC_CONST(BLENDMODE_ADD); DEC_CONST(BLENDMODE_MOD); DEC_CONST(GL_STEREO); DEC_CONST(GL_MULTISAMPLEBUFFERS); DEC_CONST(GL_MULTISAMPLESAMPLES); DEC_CONST(GL_SWAP_CONTROL); DEC_CONSTN(TIMER_RESOLUTION); DEC_CONSTN(AUDIO_U8); DEC_CONSTN(AUDIO_S8); DEC_CONSTN(AUDIO_U16LSB); DEC_CONSTN(AUDIO_S16LSB); DEC_CONSTN(AUDIO_U16MSB); DEC_CONSTN(AUDIO_S16MSB); DEC_CONSTN(AUDIO_U16); DEC_CONSTN(AUDIO_S16); DEC_CONSTN(AUDIO_U16SYS); DEC_CONSTN(AUDIO_S16SYS); #define SCRAP_TEXT PYGAME_SCRAP_TEXT #define SCRAP_BMP PYGAME_SCRAP_BMP #define SCRAP_PPM PYGAME_SCRAP_PPM #define SCRAP_PBM PYGAME_SCRAP_PBM ADD_STRING_CONST(SCRAP_TEXT); ADD_STRING_CONST(SCRAP_BMP); ADD_STRING_CONST(SCRAP_PPM); ADD_STRING_CONST(SCRAP_PBM); DEC_CONSTS(SCRAP_CLIPBOARD, 0); DEC_CONSTS(SCRAP_SELECTION, 1); /* BLEND_ADD is an alias for BLEND_RGB_ADD */ #define PYGAME_BLEND_RGB_ADD 0x1 #define PYGAME_BLEND_RGB_SUB 0x2 #define PYGAME_BLEND_RGB_MULT 0x3 #define PYGAME_BLEND_RGB_MIN 0x4 #define PYGAME_BLEND_RGB_MAX 0x5 #define PYGAME_BLEND_ADD PYGAME_BLEND_RGB_ADD #define PYGAME_BLEND_SUB PYGAME_BLEND_RGB_SUB #define PYGAME_BLEND_MULT PYGAME_BLEND_RGB_MULT #define PYGAME_BLEND_MIN PYGAME_BLEND_RGB_MIN #define PYGAME_BLEND_MAX PYGAME_BLEND_RGB_MAX #define PYGAME_BLEND_RGBA_ADD 0x6 #define PYGAME_BLEND_RGBA_SUB 0x7 #define PYGAME_BLEND_RGBA_MULT 0x8 #define PYGAME_BLEND_RGBA_MIN 0x9 #define PYGAME_BLEND_RGBA_MAX 0x10 #define PYGAME_BLEND_PREMULTIPLIED 0x11 #define PYGAME_BLEND_ALPHA_SDL2 0x12 DEC_CONSTS(BLEND_ADD, PYGAME_BLEND_ADD); DEC_CONSTS(BLEND_SUB, PYGAME_BLEND_SUB); DEC_CONSTS(BLEND_MULT, PYGAME_BLEND_MULT); DEC_CONSTS(BLEND_MIN, PYGAME_BLEND_MIN); DEC_CONSTS(BLEND_MAX, PYGAME_BLEND_MAX); DEC_CONSTS(BLEND_RGB_ADD, PYGAME_BLEND_RGB_ADD); DEC_CONSTS(BLEND_RGB_SUB, PYGAME_BLEND_RGB_SUB); DEC_CONSTS(BLEND_RGB_MULT, PYGAME_BLEND_RGB_MULT); DEC_CONSTS(BLEND_RGB_MIN, PYGAME_BLEND_RGB_MIN); DEC_CONSTS(BLEND_RGB_MAX, PYGAME_BLEND_RGB_MAX); DEC_CONSTS(BLEND_RGBA_ADD, PYGAME_BLEND_RGBA_ADD); DEC_CONSTS(BLEND_RGBA_SUB, PYGAME_BLEND_RGBA_SUB); DEC_CONSTS(BLEND_RGBA_MULT, PYGAME_BLEND_RGBA_MULT); DEC_CONSTS(BLEND_RGBA_MIN, PYGAME_BLEND_RGBA_MIN); DEC_CONSTS(BLEND_RGBA_MAX, PYGAME_BLEND_RGBA_MAX); DEC_CONSTS(BLEND_PREMULTIPLIED, PYGAME_BLEND_PREMULTIPLIED); DEC_CONSTS(BLEND_ALPHA_SDL2, PYGAME_BLEND_ALPHA_SDL2); /* Event types */ DEC_CONST(NOEVENT); DEC_CONST(ACTIVEEVENT); DEC_CONST(KEYDOWN); DEC_CONST(KEYUP); DEC_CONST(MOUSEMOTION); DEC_CONST(MOUSEBUTTONDOWN); DEC_CONST(MOUSEBUTTONUP); DEC_CONST(JOYAXISMOTION); DEC_CONST(JOYBALLMOTION); DEC_CONST(JOYHATMOTION); DEC_CONST(JOYBUTTONDOWN); DEC_CONST(JOYBUTTONUP); DEC_CONST(VIDEORESIZE); DEC_CONST(VIDEOEXPOSE); DEC_CONST(QUIT); DEC_CONST(SYSWMEVENT); DEC_CONSTS(MIDIIN, PGE_MIDIIN); DEC_CONSTS(MIDIOUT, PGE_MIDIOUT); DEC_CONSTS(USEREVENT, PGE_USEREVENT); DEC_CONSTS(NUMEVENTS, PG_NUMEVENTS); DEC_CONST(APP_TERMINATING); DEC_CONST(APP_LOWMEMORY); DEC_CONST(APP_WILLENTERBACKGROUND); DEC_CONST(APP_DIDENTERBACKGROUND); DEC_CONST(APP_WILLENTERFOREGROUND); DEC_CONST(APP_DIDENTERFOREGROUND); DEC_CONST(CLIPBOARDUPDATE); DEC_CONST(KEYMAPCHANGED); DEC_CONST(RENDER_TARGETS_RESET); DEC_CONST(RENDER_DEVICE_RESET); DEC_CONST(HAT_CENTERED); DEC_CONST(HAT_UP); DEC_CONST(HAT_RIGHTUP); DEC_CONST(HAT_RIGHT); DEC_CONST(HAT_RIGHTDOWN); DEC_CONST(HAT_DOWN); DEC_CONST(HAT_LEFTDOWN); DEC_CONST(HAT_LEFT); DEC_CONST(HAT_LEFTUP); DEC_CONST(BUTTON_LEFT); DEC_CONST(BUTTON_MIDDLE); DEC_CONST(BUTTON_RIGHT); DEC_CONST(FINGERMOTION); DEC_CONST(FINGERDOWN); DEC_CONST(FINGERUP); DEC_CONST(MULTIGESTURE); DEC_CONST(AUDIODEVICEADDED); DEC_CONST(AUDIODEVICEREMOVED); DEC_CONST(MOUSEWHEEL); DEC_CONST(TEXTINPUT); DEC_CONST(TEXTEDITING); DEC_CONSTS(WINDOWSHOWN, PGE_WINDOWSHOWN); DEC_CONSTS(WINDOWHIDDEN, PGE_WINDOWHIDDEN); DEC_CONSTS(WINDOWEXPOSED, PGE_WINDOWEXPOSED); DEC_CONSTS(WINDOWMOVED, PGE_WINDOWMOVED); DEC_CONSTS(WINDOWRESIZED, PGE_WINDOWRESIZED); DEC_CONSTS(WINDOWSIZECHANGED, PGE_WINDOWSIZECHANGED); DEC_CONSTS(WINDOWMINIMIZED, PGE_WINDOWMINIMIZED); DEC_CONSTS(WINDOWMAXIMIZED, PGE_WINDOWMAXIMIZED); DEC_CONSTS(WINDOWRESTORED, PGE_WINDOWRESTORED); DEC_CONSTS(WINDOWENTER, PGE_WINDOWENTER); DEC_CONSTS(WINDOWLEAVE, PGE_WINDOWLEAVE); DEC_CONSTS(WINDOWFOCUSGAINED, PGE_WINDOWFOCUSGAINED); DEC_CONSTS(WINDOWFOCUSLOST, PGE_WINDOWFOCUSLOST); DEC_CONSTS(WINDOWCLOSE, PGE_WINDOWCLOSE); DEC_CONSTS(WINDOWTAKEFOCUS, PGE_WINDOWTAKEFOCUS); DEC_CONSTS(WINDOWHITTEST, PGE_WINDOWHITTEST); DEC_CONSTS(WINDOWICCPROFCHANGED, PGE_WINDOWICCPROFCHANGED); DEC_CONSTS(WINDOWDISPLAYCHANGED, PGE_WINDOWDISPLAYCHANGED); DEC_CONST(CONTROLLERAXISMOTION); DEC_CONST(CONTROLLERBUTTONDOWN); DEC_CONST(CONTROLLERBUTTONUP); DEC_CONST(CONTROLLERDEVICEADDED); DEC_CONST(CONTROLLERDEVICEREMOVED); DEC_CONST(CONTROLLERDEVICEREMAPPED); #if SDL_VERSION_ATLEAST(2, 0, 14) DEC_CONST(CONTROLLERTOUCHPADDOWN); DEC_CONST(CONTROLLERTOUCHPADMOTION); DEC_CONST(CONTROLLERTOUCHPADUP); DEC_CONST(CONTROLLERSENSORUPDATE); DEC_CONST(LOCALECHANGED); #else DEC_CONSTS(CONTROLLERTOUCHPADDOWN, -1); DEC_CONSTS(CONTROLLERTOUCHPADMOTION, -1); DEC_CONSTS(CONTROLLERTOUCHPADUP, -1); DEC_CONSTS(CONTROLLERSENSORUPDATE, -1); DEC_CONSTS(LOCALECHANGED, -1); #endif DEC_CONST(JOYDEVICEADDED); DEC_CONST(JOYDEVICEREMOVED); DEC_CONSTS(BUTTON_X1, PGM_BUTTON_X1); DEC_CONSTS(BUTTON_X2, PGM_BUTTON_X2); // Still to be decided DEC_CONSTS(BUTTON_WHEELUP, PGM_BUTTON_WHEELUP); DEC_CONSTS(BUTTON_WHEELDOWN, PGM_BUTTON_WHEELDOWN); DEC_CONST(AUDIO_ALLOW_FREQUENCY_CHANGE); DEC_CONST(AUDIO_ALLOW_FORMAT_CHANGE); DEC_CONST(AUDIO_ALLOW_CHANNELS_CHANGE); DEC_CONST(AUDIO_ALLOW_ANY_CHANGE); DEC_CONST(DROPFILE); DEC_CONST(DROPTEXT); DEC_CONST(DROPBEGIN); DEC_CONST(DROPCOMPLETE); DEC_CONST(CONTROLLER_AXIS_INVALID); DEC_CONST(CONTROLLER_AXIS_LEFTX); DEC_CONST(CONTROLLER_AXIS_LEFTY); DEC_CONST(CONTROLLER_AXIS_RIGHTX); DEC_CONST(CONTROLLER_AXIS_RIGHTY); DEC_CONST(CONTROLLER_AXIS_TRIGGERLEFT); DEC_CONST(CONTROLLER_AXIS_TRIGGERRIGHT); DEC_CONST(CONTROLLER_AXIS_MAX); DEC_CONST(CONTROLLER_BUTTON_INVALID); DEC_CONST(CONTROLLER_BUTTON_A); DEC_CONST(CONTROLLER_BUTTON_B); DEC_CONST(CONTROLLER_BUTTON_X); DEC_CONST(CONTROLLER_BUTTON_Y); DEC_CONST(CONTROLLER_BUTTON_BACK); DEC_CONST(CONTROLLER_BUTTON_GUIDE); DEC_CONST(CONTROLLER_BUTTON_START); DEC_CONST(CONTROLLER_BUTTON_LEFTSTICK); DEC_CONST(CONTROLLER_BUTTON_RIGHTSTICK); DEC_CONST(CONTROLLER_BUTTON_LEFTSHOULDER); DEC_CONST(CONTROLLER_BUTTON_RIGHTSHOULDER); DEC_CONST(CONTROLLER_BUTTON_DPAD_UP); DEC_CONST(CONTROLLER_BUTTON_DPAD_DOWN); DEC_CONST(CONTROLLER_BUTTON_DPAD_LEFT); DEC_CONST(CONTROLLER_BUTTON_DPAD_RIGHT); DEC_CONST(CONTROLLER_BUTTON_MAX); /* Keyboard key codes: Pygame K_ constants. Scan codes: KSCAN_ constants. */ DEC_CONSTK_AND_SC(AC_BACK); DEC_CONSTK_AND_SC(UNKNOWN); DEC_CONSTK_AND_SC(BACKSPACE); DEC_CONSTK_AND_SC(TAB); DEC_CONSTK_AND_SC(CLEAR); DEC_CONSTK_AND_SC(RETURN); DEC_CONSTK_AND_SC(PAUSE); DEC_CONSTK_AND_SC(ESCAPE); DEC_CONSTK_AND_SC(SPACE); DEC_CONSTK(QUOTE); DEC_CONSTSC(APOSTROPHE); DEC_CONSTK_AND_SC(COMMA); DEC_CONSTK_AND_SC(MINUS); DEC_CONSTK_AND_SC(PERIOD); DEC_CONSTK_AND_SC(SLASH); DEC_CONSTK_AND_SC(0); DEC_CONSTK_AND_SC(1); DEC_CONSTK_AND_SC(2); DEC_CONSTK_AND_SC(3); DEC_CONSTK_AND_SC(4); DEC_CONSTK_AND_SC(5); DEC_CONSTK_AND_SC(6); DEC_CONSTK_AND_SC(7); DEC_CONSTK_AND_SC(8); DEC_CONSTK_AND_SC(9); DEC_CONSTK_AND_SC(SEMICOLON); DEC_CONSTK_AND_SC(EQUALS); DEC_CONSTK_AND_SC(LEFTBRACKET); DEC_CONSTK_AND_SC(BACKSLASH); DEC_CONSTK_AND_SC(RIGHTBRACKET); DEC_CONSTK(BACKQUOTE); DEC_CONSTSC(GRAVE); DEC_CONSTK(a); DEC_CONSTSC(A); DEC_CONSTK(b); DEC_CONSTSC(B); DEC_CONSTK(c); DEC_CONSTSC(C); DEC_CONSTK(d); DEC_CONSTSC(D); DEC_CONSTK(e); DEC_CONSTSC(E); DEC_CONSTK(f); DEC_CONSTSC(F); DEC_CONSTK(g); DEC_CONSTSC(G); DEC_CONSTK(h); DEC_CONSTSC(H); DEC_CONSTK(i); DEC_CONSTSC(I); DEC_CONSTK(j); DEC_CONSTSC(J); DEC_CONSTK(k); DEC_CONSTSC(K); DEC_CONSTK(l); DEC_CONSTSC(L); DEC_CONSTK(m); DEC_CONSTSC(M); DEC_CONSTK(n); DEC_CONSTSC(N); DEC_CONSTK(o); DEC_CONSTSC(O); DEC_CONSTK(p); DEC_CONSTSC(P); DEC_CONSTK(q); DEC_CONSTSC(Q); DEC_CONSTK(r); DEC_CONSTSC(R); DEC_CONSTK(s); DEC_CONSTSC(S); DEC_CONSTK(t); DEC_CONSTSC(T); DEC_CONSTK(u); DEC_CONSTSC(U); DEC_CONSTK(v); DEC_CONSTSC(V); DEC_CONSTK(w); DEC_CONSTSC(W); DEC_CONSTK(x); DEC_CONSTSC(X); DEC_CONSTK(y); DEC_CONSTSC(Y); DEC_CONSTK(z); DEC_CONSTSC(Z); DEC_CONSTK_AND_SC(DELETE); DEC_CONSTK_AND_SC(KP_0); DEC_CONSTK_AND_SC(KP_1); DEC_CONSTK_AND_SC(KP_2); DEC_CONSTK_AND_SC(KP_3); DEC_CONSTK_AND_SC(KP_4); DEC_CONSTK_AND_SC(KP_5); DEC_CONSTK_AND_SC(KP_6); DEC_CONSTK_AND_SC(KP_7); DEC_CONSTK_AND_SC(KP_8); DEC_CONSTK_AND_SC(KP_9); DEC_CONSTKS_AND_SCS(KP0, KP_0); DEC_CONSTKS_AND_SCS(KP1, KP_1); DEC_CONSTKS_AND_SCS(KP2, KP_2); DEC_CONSTKS_AND_SCS(KP3, KP_3); DEC_CONSTKS_AND_SCS(KP4, KP_4); DEC_CONSTKS_AND_SCS(KP5, KP_5); DEC_CONSTKS_AND_SCS(KP6, KP_6); DEC_CONSTKS_AND_SCS(KP7, KP_7); DEC_CONSTKS_AND_SCS(KP8, KP_8); DEC_CONSTKS_AND_SCS(KP9, KP_9); DEC_CONSTK_AND_SC(KP_PERIOD); DEC_CONSTK_AND_SC(KP_DIVIDE); DEC_CONSTK_AND_SC(KP_MULTIPLY); DEC_CONSTK_AND_SC(KP_MINUS); DEC_CONSTK_AND_SC(KP_PLUS); DEC_CONSTK_AND_SC(KP_ENTER); DEC_CONSTK_AND_SC(KP_EQUALS); DEC_CONSTK_AND_SC(UP); DEC_CONSTK_AND_SC(DOWN); DEC_CONSTK_AND_SC(RIGHT); DEC_CONSTK_AND_SC(LEFT); DEC_CONSTK_AND_SC(INSERT); DEC_CONSTK_AND_SC(HOME); DEC_CONSTK_AND_SC(END); DEC_CONSTK_AND_SC(PAGEUP); DEC_CONSTK_AND_SC(PAGEDOWN); DEC_CONSTK_AND_SC(F1); DEC_CONSTK_AND_SC(F2); DEC_CONSTK_AND_SC(F3); DEC_CONSTK_AND_SC(F4); DEC_CONSTK_AND_SC(F5); DEC_CONSTK_AND_SC(F6); DEC_CONSTK_AND_SC(F7); DEC_CONSTK_AND_SC(F8); DEC_CONSTK_AND_SC(F9); DEC_CONSTK_AND_SC(F10); DEC_CONSTK_AND_SC(F11); DEC_CONSTK_AND_SC(F12); DEC_CONSTK_AND_SC(F13); DEC_CONSTK_AND_SC(F14); DEC_CONSTK_AND_SC(F15); DEC_CONSTK_AND_SC(NUMLOCKCLEAR) DEC_CONSTKS_AND_SCS(NUMLOCK, NUMLOCKCLEAR); DEC_CONSTK_AND_SC(CAPSLOCK); DEC_CONSTK_AND_SC(SCROLLLOCK); DEC_CONSTKS_AND_SCS(SCROLLOCK, SCROLLLOCK); DEC_CONSTK_AND_SC(RSHIFT); DEC_CONSTK_AND_SC(LSHIFT); DEC_CONSTK_AND_SC(RCTRL); DEC_CONSTK_AND_SC(LCTRL); DEC_CONSTK_AND_SC(RALT); DEC_CONSTK_AND_SC(LALT); DEC_CONSTK_AND_SC(RGUI); DEC_CONSTKS_AND_SCS(RMETA, RGUI); DEC_CONSTK_AND_SC(LGUI); DEC_CONSTKS_AND_SCS(LMETA, LGUI); DEC_CONSTKS_AND_SCS(LSUPER, LGUI); DEC_CONSTKS_AND_SCS(RSUPER, RGUI); DEC_CONSTK_AND_SC(MODE); DEC_CONSTK_AND_SC(HELP); DEC_CONSTK_AND_SC(PRINTSCREEN); DEC_CONSTKS_AND_SCS(PRINT, PRINTSCREEN); DEC_CONSTK_AND_SC(SYSREQ); DEC_CONSTKS_AND_SCS(BREAK, PAUSE); DEC_CONSTK_AND_SC(MENU); DEC_CONSTK_AND_SC(POWER); DEC_CONSTK_AND_SC(CURRENCYUNIT); DEC_CONSTK_AND_SC(CURRENCYSUBUNIT); DEC_CONSTKS_AND_SCS(EURO, CURRENCYUNIT); DEC_CONSTSC(INTERNATIONAL1); DEC_CONSTSC(INTERNATIONAL2); DEC_CONSTSC(INTERNATIONAL3); DEC_CONSTSC(INTERNATIONAL4); DEC_CONSTSC(INTERNATIONAL5); DEC_CONSTSC(INTERNATIONAL6); DEC_CONSTSC(INTERNATIONAL7); DEC_CONSTSC(INTERNATIONAL8); DEC_CONSTSC(INTERNATIONAL9); DEC_CONSTSC(LANG1); DEC_CONSTSC(LANG2); DEC_CONSTSC(LANG3); DEC_CONSTSC(LANG4); DEC_CONSTSC(LANG5); DEC_CONSTSC(LANG6); DEC_CONSTSC(LANG7); DEC_CONSTSC(LANG8); DEC_CONSTSC(LANG9); DEC_CONSTSC(NONUSBACKSLASH); DEC_CONSTSC(NONUSHASH); DEC_CONSTK(EXCLAIM); DEC_CONSTK(QUOTEDBL); DEC_CONSTK(HASH); DEC_CONSTK(DOLLAR); DEC_CONSTK(AMPERSAND); DEC_CONSTK(PERCENT); DEC_CONSTK(LEFTPAREN); DEC_CONSTK(RIGHTPAREN); DEC_CONSTK(ASTERISK); DEC_CONSTK(PLUS); DEC_CONSTK(COLON); DEC_CONSTK(LESS); DEC_CONSTK(GREATER); DEC_CONSTK(QUESTION); DEC_CONSTK(AT); DEC_CONSTK(CARET); DEC_CONSTK(UNDERSCORE); /* Keyboard key modifiers: Pygame KMOD_ constants. */ DEC_CONSTN(KMOD_NONE); DEC_CONSTN(KMOD_LSHIFT); DEC_CONSTN(KMOD_RSHIFT); DEC_CONSTN(KMOD_LCTRL); DEC_CONSTN(KMOD_RCTRL); DEC_CONSTN(KMOD_LALT); DEC_CONSTN(KMOD_RALT); DEC_CONSTN(KMOD_LGUI); DEC_CONSTS(KMOD_LMETA, KMOD_LGUI); DEC_CONSTN(KMOD_RGUI); DEC_CONSTS(KMOD_RMETA, KMOD_RGUI); DEC_CONSTN(KMOD_NUM); DEC_CONSTN(KMOD_CAPS); DEC_CONSTN(KMOD_MODE); DEC_CONSTN(KMOD_CTRL); DEC_CONSTN(KMOD_SHIFT); DEC_CONSTN(KMOD_ALT); DEC_CONSTN(KMOD_GUI); DEC_CONSTS(KMOD_META, KMOD_GUI); DEC_CONST(APPMOUSEFOCUS); DEC_CONST(APPINPUTFOCUS); DEC_CONST(APPACTIVE); /* cursor constants */ DEC_CONST(SYSTEM_CURSOR_ARROW); DEC_CONST(SYSTEM_CURSOR_IBEAM); DEC_CONST(SYSTEM_CURSOR_WAIT); DEC_CONST(SYSTEM_CURSOR_CROSSHAIR); DEC_CONST(SYSTEM_CURSOR_WAITARROW); DEC_CONST(SYSTEM_CURSOR_SIZENWSE); DEC_CONST(SYSTEM_CURSOR_SIZENESW); DEC_CONST(SYSTEM_CURSOR_SIZEWE); DEC_CONST(SYSTEM_CURSOR_SIZENS); DEC_CONST(SYSTEM_CURSOR_SIZEALL); DEC_CONST(SYSTEM_CURSOR_NO); DEC_CONST(SYSTEM_CURSOR_HAND); #define PYGAME_USEREVENT_DROPFILE 0x1000 DEC_CONSTS(USEREVENT_DROPFILE, PYGAME_USEREVENT_DROPFILE); if (PyModule_AddObject(module, "__all__", all_list)) { Py_DECREF(all_list); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/controllercompat.c0000644000175100001770000000133514676242340017245 0ustar00runnerdocker/* * Compat file specifically for controller (see * https://github.com/pygame/pygame/pull/3272) we had trouble using pgcompat.c, * because it would be included twice, or it would lead to flakiness on * compilers, because of threads... */ #include int PG_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms) { #if SDL_VERSION_ATLEAST(2, 0, 9) return SDL_GameControllerRumble(gamecontroller, low_frequency_rumble, high_frequency_rumble, duration_ms); #else SDL_SetError("pygame built without controller rumble support"); return -1; #endif } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9841259 pygame-2.6.1/src_c/cython/0000755000175100001770000000000014676242436015022 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0571256 pygame-2.6.1/src_c/cython/pygame/0000755000175100001770000000000014676242436016304 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/cython/pygame/__init__.pxd0000644000175100001770000000000014676242340020540 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0581257 pygame-2.6.1/src_c/cython/pygame/_sdl2/0000755000175100001770000000000014676242436017307 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/cython/pygame/_sdl2/__init__.pxd0000644000175100001770000000000014676242340021543 0ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/cython/pygame/_sdl2/audio.pxd0000644000175100001770000000437414676242340021127 0ustar00runnerdocker# cython: language_level=3str # from .sdl2 cimport * cdef extern from "SDL.h" nogil: # https://wiki.libsdl.org/SDL_OpenAudioDevice # https://wiki.libsdl.org/SDL_CloseAudioDevice # https://wiki.libsdl.org/SDL_AudioSpec # https://wiki.libsdl.org/SDL_AudioFormat ctypedef Uint32 SDL_AudioDeviceID ctypedef Uint16 SDL_AudioFormat ctypedef void (*SDL_AudioCallback)(void *userdata, Uint8 *stream, int len) ctypedef struct SDL_AudioSpec: int freq SDL_AudioFormat format Uint8 channels Uint8 silence Uint16 samples Uint16 padding Uint32 size SDL_AudioCallback callback void *userdata int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained) int SDL_GetNumAudioDevices(int iscapture) const char *SDL_GetAudioDeviceName(int index, int iscapture) SDL_AudioDeviceID SDL_OpenAudioDevice(const char *device, int iscapture, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained, int allowed_changes) cdef int _SDL_AUDIO_ALLOW_FREQUENCY_CHANGE "SDL_AUDIO_ALLOW_FREQUENCY_CHANGE" cdef int _SDL_AUDIO_ALLOW_FORMAT_CHANGE "SDL_AUDIO_ALLOW_FORMAT_CHANGE" cdef int _SDL_AUDIO_ALLOW_CHANNELS_CHANGE "SDL_AUDIO_ALLOW_CHANNELS_CHANGE" cdef int _SDL_AUDIO_ALLOW_ANY_CHANGE "SDL_AUDIO_ALLOW_ANY_CHANGE" # https://wiki.libsdl.org/SDL_PauseAudioDevice void SDL_PauseAudioDevice(SDL_AudioDeviceID dev, int pause_on) void SDL_CloseAudioDevice(SDL_AudioDeviceID dev) cdef Uint16 _AUDIO_U8 "AUDIO_U8" cdef Uint16 _AUDIO_S8 "AUDIO_S8" cdef Uint16 _AUDIO_U16LSB "AUDIO_U16LSB" cdef Uint16 _AUDIO_S16LSB "AUDIO_S16LSB" cdef Uint16 _AUDIO_U16MSB "AUDIO_U16MSB" cdef Uint16 _AUDIO_S16MSB "AUDIO_S16MSB" cdef Uint16 _AUDIO_U16 "AUDIO_U16" cdef Uint16 _AUDIO_S16 "AUDIO_S16" cdef Uint16 _AUDIO_S32LSB "AUDIO_S32LSB" cdef Uint16 _AUDIO_S32MSB "AUDIO_S32MSB" cdef Uint16 _AUDIO_S32 "AUDIO_S32" cdef Uint16 _AUDIO_F32LSB "AUDIO_F32LSB" cdef Uint16 _AUDIO_F32MSB "AUDIO_F32MSB" cdef Uint16 _AUDIO_F32 "AUDIO_F32" cdef class AudioDevice: cdef SDL_AudioDeviceID _deviceid cdef SDL_AudioSpec desired cdef SDL_AudioSpec obtained cdef int _iscapture cdef object _callback cdef object _devicename ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0041118 pygame-2.6.1/src_c/cython/pygame/_sdl2/audio.pyx0000644000175100001770000001620714676242340021152 0ustar00runnerdockerfrom pygame._sdl2.sdl2 import error # expose constants to python. AUDIO_U8 = _AUDIO_U8 AUDIO_S8 = _AUDIO_S8 AUDIO_U16LSB = _AUDIO_U16LSB AUDIO_S16LSB = _AUDIO_S16LSB AUDIO_U16MSB = _AUDIO_U16MSB AUDIO_S16MSB = _AUDIO_S16MSB AUDIO_U16 = _AUDIO_U16 AUDIO_S16 = _AUDIO_S16 AUDIO_S32LSB = _AUDIO_S32LSB AUDIO_S32MSB = _AUDIO_S32MSB AUDIO_S32 = _AUDIO_S32 AUDIO_F32LSB = _AUDIO_F32LSB AUDIO_F32MSB = _AUDIO_F32MSB AUDIO_F32 = _AUDIO_F32 # So we can get the audio formats as string. _audio_format_str = { AUDIO_U8: "AUDIO_U8", AUDIO_S8: "AUDIO_S8", AUDIO_U16LSB: "AUDIO_U16LSB", AUDIO_S16LSB: "AUDIO_S16LSB", AUDIO_U16MSB: "AUDIO_U16MSB", AUDIO_S16MSB: "AUDIO_S16MSB", AUDIO_U16: "AUDIO_U16", AUDIO_S16: "AUDIO_S16", AUDIO_S32LSB: "AUDIO_S32LSB", AUDIO_S32MSB: "AUDIO_S32MSB", AUDIO_S32: "AUDIO_S32", AUDIO_F32LSB: "AUDIO_F32LSB", AUDIO_F32MSB: "AUDIO_F32MSB", AUDIO_F32: "AUDIO_F32", } # for SDL_OpenAudioDevice. AUDIO_ALLOW_FREQUENCY_CHANGE = _SDL_AUDIO_ALLOW_FREQUENCY_CHANGE AUDIO_ALLOW_FORMAT_CHANGE = _SDL_AUDIO_ALLOW_FORMAT_CHANGE AUDIO_ALLOW_CHANNELS_CHANGE = _SDL_AUDIO_ALLOW_CHANNELS_CHANGE AUDIO_ALLOW_ANY_CHANGE = _SDL_AUDIO_ALLOW_ANY_CHANGE # https://wiki.libsdl.org/SDL_GetNumAudioDevices # https://wiki.libsdl.org/SDL_GetAudioDeviceName def get_audio_device_names(iscapture = False): """ Returns a list of unique devicenames for each available audio device. :param bool iscapture: If False return devices available for playback. If True return devices available for capture. :return: list of devicenames. :rtype: List[string] """ cdef int count = SDL_GetNumAudioDevices(iscapture) if count == -1: raise error('Audio system not initialised') names = [] for i in range(count): name = SDL_GetAudioDeviceName(i, iscapture) if not name: raise error() names.append(name.decode('utf8')) return names import traceback cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil: """ This is called in a thread made by SDL. So we need the python GIL to do python stuff. """ cdef Uint8 [:] a_memoryview with gil: a_memoryview = stream try: # The userdata is the audio device. # The audio device is needed in some apps (userdata).callback(userdata, a_memoryview) except: traceback.print_exc() raise cdef class AudioDevice: def __cinit__(self): self._deviceid = 0 self._iscapture = 0 def __dealloc__(self): if self._deviceid: SDL_CloseAudioDevice(self._deviceid) def __init__(self, devicename, iscapture, frequency, audioformat, numchannels, chunksize, allowed_changes, callback): """ An AudioDevice is for sound playback and capture of 'sound cards'. :param string devicename: One of the device names from get_audio_device_names. If None is passed in, it uses the default audio device. :param int frequency: Number of samples per second. 44100, 22050, ... :param int audioformat: AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ... :param int numchannels: 2 if stereo, 1 if mono. :param int chunksize: number of samples buffered. :param allowed_changes: some drivers don't support all possible requested formats. So you can tell it which ones yours support. * AUDIO_ALLOW_FREQUENCY_CHANGE * AUDIO_ALLOW_FORMAT_CHANGE * AUDIO_ALLOW_CHANNELS_CHANGE * AUDIO_ALLOW_ANY_CHANGE If your application can only handle one specific data format, pass a zero for allowed_changes and let SDL transparently handle any differences. :callback: a function which gets called with (audiodevice, memoryview). memoryview is the audio data. Use audiodevice.iscapture to see if it is incoming audio or outgoing. The audiodevice also has the format of the memory. """ memset(&self.desired, 0, sizeof(SDL_AudioSpec)) self._iscapture = iscapture self._callback = callback if not isinstance(devicename, str): raise TypeError("devicename must be a string") self._devicename = devicename self.desired.freq = frequency; self.desired.format = audioformat; self.desired.channels = numchannels; self.desired.samples = chunksize; self.desired.callback = recording_cb; self.desired.userdata = self self._deviceid = SDL_OpenAudioDevice( self._devicename.encode("utf-8"), self._iscapture, &self.desired, &self.obtained, allowed_changes ) if self._deviceid == 0: raise error() @property def iscapture(self): """ is the AudioDevice for capturing audio? """ return self._iscapture @property def deviceid(self): """ deviceid of the audio device relative to the devicename list. """ return self._deviceid @property def devicename(self): """ devicename of the audio device from the devicename list. """ return self._devicename @property def callback(self): """ called in the sound thread with (audiodevice, memoryview) """ return self._callback @property def frequency(self): """ Number of samples per second. 44100, 22050, ... """ return self.obtained.freq @property def audioformat(self): """ AUDIO_F32SYS, AUDIO_F32SYS, AUDIO_U16SYS, AUDIO_S16SYS, ... """ return self.obtained.format @property def numchannels(self): """ 2 if stereo, 1 if mono. """ return self.obtained.channels @property def chunksize(self): """ number of samples buffered. """ return self.obtained.samples def __repr__(self): ret = " stream try: # The userdata is the audio device. # The audio device is needed in some apps (userdata).callback(userdata, a_memoryview) except: traceback.print_exc() raise # ctypedef void (*cfptr)(int) # cdef cfptr myfunctionptr = &myfunc cdef class _PostMix: # def __cinit__(self): def __init__(self, callback): self._callback = callback self.userdata = self self.callback = recording_cb; Mix_SetPostMix(self.callback, self.userdata) def __dealloc__(self): Mix_SetPostMix(NULL, NULL) @property def callback(self): """ called in the sound thread with (audiodevice, memoryview) """ return self._callback _postmix = None cpdef set_post_mix(mix_func): """ Hook a processor function mix_func to the postmix stream for post processing effects. You may just be reading the data and displaying it, or you may be altering the stream to add an echo. """ global _postmix if mix_func is None: _postmix = None Mix_SetPostMix(NULL, NULL) else: _postmix = _PostMix(mix_func) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/_sdl2/sdl2.pxd0000644000175100001770000000240014676242340020656 0ustar00runnerdocker# cython: language_level=3str # from libc.string cimport memset from libc.stdio cimport * cdef extern from "SDL.h" nogil: # SDL_stdinc.h provides the real ones based on platform. ctypedef char Sint8 ctypedef unsigned char Uint8 ctypedef signed short Sint16 ctypedef unsigned short Uint16 ctypedef signed long Sint32 ctypedef unsigned long Uint32 ctypedef unsigned long long Uint64 ctypedef signed long long Sint64 ctypedef int SDL_bool const char *SDL_GetError() # https://wiki.libsdl.org/SDL_InitSubSystem # https://wiki.libsdl.org/SDL_QuitSubSystem # https://wiki.libsdl.org/SDL_WasInit int SDL_InitSubSystem(Uint32 flags) void SDL_QuitSubSystem(Uint32 flags) Uint32 SDL_WasInit(Uint32 flags) cdef int _SDL_INIT_TIMER "SDL_INIT_TIMER" cdef int _SDL_INIT_AUDIO "SDL_INIT_AUDIO" cdef int _SDL_INIT_VIDEO "SDL_INIT_VIDEO" cdef int _SDL_INIT_JOYSTICK "SDL_INIT_JOYSTICK" cdef int _SDL_INIT_HAPTIC "SDL_INIT_HAPTIC" cdef int _SDL_INIT_GAMECONTROLLER "SDL_INIT_GAMECONTROLLER" cdef int _SDL_INIT_EVENTS "SDL_INIT_EVENTS" cdef int _SDL_INIT_SENSOR "SDL_INIT_SENSOR" cdef int _SDL_INIT_NOPARACHUTE "SDL_INIT_NOPARACHUTE" cdef int _SDL_INIT_EVERYTHING "SDL_INIT_EVERYTHING" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/_sdl2/sdl2.pyx0000644000175100001770000000305714676242340020714 0ustar00runnerdocker# cython: language_level=2 # # pygame.error class error(RuntimeError): def __init__(self, message=None): if message is None: message = SDL_GetError().decode('utf8') RuntimeError.__init__(self, message) # for init_subsystem. Expose variables to python. INIT_TIMER = _SDL_INIT_TIMER INIT_AUDIO = _SDL_INIT_AUDIO INIT_VIDEO = _SDL_INIT_VIDEO INIT_JOYSTICK = _SDL_INIT_JOYSTICK INIT_HAPTIC = _SDL_INIT_HAPTIC INIT_GAMECONTROLLER = _SDL_INIT_GAMECONTROLLER INIT_EVENTS = _SDL_INIT_EVENTS # INIT_SENSOR = _SDL_INIT_SENSOR INIT_NOPARACHUTE = _SDL_INIT_NOPARACHUTE INIT_EVERYTHING = _SDL_INIT_EVERYTHING # TODO: Not sure about exposing init_subsystem in pygame. # It would be useful if you wanted to use audio without SDL_mixer. # https://wiki.libsdl.org/SDL_InitSubSystem def init_subsystem(flags): """ Use this function to initialize specific subsystems. :param int flags: any of the flags used by. * INIT_TIMER timer subsystem * INIT_AUDIO audio subsystem * INIT_VIDEO video subsystem; automatically initializes the events subsystem * INIT_JOYSTICK joystick subsystem; automatically initializes the events subsystem * INIT_HAPTIC haptic (force feedback) subsystem * INIT_GAMECONTROLLER controller subsystem; automatically initializes the joystick subsystem * INIT_EVENTS events subsystem * INIT_EVERYTHING all of the above subsystems * INIT_NOPARACHUTE compatibility; this flag is ignored """ if (SDL_InitSubSystem(flags) == -1): raise error() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/_sdl2/video.pxd0000644000175100001770000004621214676242340021131 0ustar00runnerdocker# cython: language_level=3str # from .sdl2 cimport * cdef extern from "SDL.h" nogil: ctypedef struct SDL_Window ctypedef struct SDL_Texture ctypedef struct SDL_Renderer ctypedef struct SDL_Rect: int x, y int w, h ctypedef enum SDL_PixelFormatEnum: SDL_PIXELFORMAT_UNKNOWN int SDL_BITSPERPIXEL(Uint32 format) ctypedef struct SDL_PixelFormat: Uint32 format ctypedef struct SDL_Surface: Uint32 flags SDL_PixelFormat *format int w,h int pitch void* pixels void *userdata int locked void *lock_data SDL_Rect clip_rect ctypedef struct SDL_Point: int x, y ctypedef enum SDL_RendererFlip: SDL_FLIP_NONE, SDL_FLIP_HORIZONTAL, SDL_FLIP_VERTICAL ctypedef enum SDL_BlendMode: SDL_BLENDMODE_NONE = 0x00000000, SDL_BLENDMODE_BLEND = 0x00000001, SDL_BLENDMODE_ADD = 0x00000002, SDL_BLENDMODE_MOD = 0x00000004, SDL_BLENDMODE_INVALID = 0x7FFFFFFF # https://wiki.libsdl.org/SDL_MessageBoxData # https://wiki.libsdl.org/SDL_ShowMessageBox cdef Uint32 _SDL_MESSAGEBOX_ERROR "SDL_MESSAGEBOX_ERROR" cdef Uint32 _SDL_MESSAGEBOX_WARNING "SDL_MESSAGEBOX_WARNING" cdef Uint32 _SDL_MESSAGEBOX_INFORMATION "SDL_MESSAGEBOX_INFORMATION" cdef Uint32 _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT "SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT" cdef Uint32 _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT "SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT" ctypedef struct SDL_MessageBoxData: Uint32 flags SDL_Window* window const char* title const char* message int numbuttons const SDL_MessageBoxButtonData* buttons const SDL_MessageBoxColorScheme* colorScheme ctypedef struct SDL_MessageBoxButtonData: Uint32 flags int buttonid const char *text ctypedef struct SDL_MessageBoxColorScheme int SDL_ShowMessageBox(const SDL_MessageBoxData* messageboxdata, int* buttonid) # RENDERER cdef Uint32 _SDL_RENDERER_SOFTWARE "SDL_RENDERER_SOFTWARE" cdef Uint32 _SDL_RENDERER_ACCELERATED "SDL_RENDERER_ACCELERATED" cdef Uint32 _SDL_RENDERER_PRESENTVSYNC "SDL_RENDERER_PRESENTVSYNC" cdef Uint32 _SDL_RENDERER_TARGETTEXTURE "SDL_RENDERER_TARGETTEXTURE" # https://wiki.libsdl.org/SDL_SetRenderDrawColor # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode # https://wiki.libsdl.org/SDL_CreateRenderer # https://wiki.libsdl.org/SDL_DestroyRenderer # https://wiki.libsdl.org/SDL_RenderClear # https://wiki.libsdl.org/SDL_RenderCopy # https://wiki.libsdl.org/SDL_RenderCopyEx # https://wiki.libsdl.org/SDL_RenderPresent int SDL_SetRenderDrawColor(SDL_Renderer* renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a) int SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode) int SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode) SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, int index, Uint32 flags) void SDL_DestroyRenderer(SDL_Renderer* renderer) int SDL_RenderClear(SDL_Renderer* renderer) int SDL_RenderCopy(SDL_Renderer* renderer, SDL_Texture* texture, const SDL_Rect* srcrect, const SDL_Rect* dstrect) int SDL_RenderCopyEx(SDL_Renderer* renderer, SDL_Texture* texture, const SDL_Rect* srcrect, const SDL_Rect* dstrect, const double angle, const SDL_Point* center, const SDL_RendererFlip flip) void SDL_RenderPresent(SDL_Renderer* renderer) # https://wiki.libsdl.org/SDL_RenderGetViewport # https://wiki.libsdl.org/SDL_RenderSetViewport void SDL_RenderGetViewport(SDL_Renderer* renderer, SDL_Rect* rect) int SDL_RenderSetViewport(SDL_Renderer* renderer, const SDL_Rect* rect) # https://wiki.libsdl.org/SDL_RenderReadPixels int SDL_RenderReadPixels(SDL_Renderer* renderer, const SDL_Rect* rect, Uint32 format, void* pixels, int pitch) # https://wiki.libsdl.org/SDL_SetRenderTarget int SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture) # https://wiki.libsdl.org/SDL_RendererInfo ctypedef struct SDL_RendererInfo: const char *name Uint32 flags Uint32 num_texture_formats Uint32[16] texture_formats int max_texture_width int max_texture_height # https://wiki.libsdl.org/SDL_GetNumRenderDrivers int SDL_GetNumRenderDrivers() # https://wiki.libsdl.org/SDL_GetRenderDriverInfo int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo* info) # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode # https://wiki.libsdl.org/SDL_BlendFactor # https://wiki.libsdl.org/SDL_BlendOperation SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation) ctypedef enum SDL_BlendOperation: SDL_BLENDOPERATION_ADD = 0x00000001, SDL_BLENDOPERATION_SUBTRACT = 0x00000002, SDL_BLENDOPERATION_REV_SUBTRACT = 0x00000003, SDL_BLENDOPERATION_MINIMUM = 0x00000004, SDL_BLENDOPERATION_MAXIMUM = 0x00000005 ctypedef enum SDL_BlendFactor: SDL_BLENDFACTOR_ZERO = 0x00000001, SDL_BLENDFACTOR_ONE = 0x00000002, SDL_BLENDFACTOR_SRC_COLOR = 0x00000003, SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x00000004, SDL_BLENDFACTOR_SRC_ALPHA = 0x00000005, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x00000006, SDL_BLENDFACTOR_DST_COLOR = 0x00000007, SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x00000008, SDL_BLENDFACTOR_DST_ALPHA = 0x00000009, SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0x0000000A # WINDOW # https://wiki.libsdl.org/SDL_CreateWindow # https://wiki.libsdl.org/SDL_DestroyWindow # https://wiki.libsdl.org/SDL_GetWindowTitle # https://wiki.libsdl.org/SDL_SetWindowTitle SDL_Window* SDL_CreateWindow(const char* title, int x, int y, int w, int h, Uint32 flags) void SDL_DestroyWindow(SDL_Window *window) const char* SDL_GetWindowTitle(SDL_Window* window) void SDL_SetWindowTitle(SDL_Window* window, const char* title) # https://wiki.libsdl.org/SDL_GetWindowData # https://wiki.libsdl.org/SDL_SetWindowData void* SDL_GetWindowData(SDL_Window* window, const char* name) void* SDL_SetWindowData(SDL_Window* window, const char* name, void* userdata) # https://wiki.libsdl.org/SDL_MaximizeWindow # https://wiki.libsdl.org/SDL_MinimizeWindow # https://wiki.libsdl.org/SDL_RestoreWindow # https://wiki.libsdl.org/SDL_ShowWindow # https://wiki.libsdl.org/SDL_HideWindow # https://wiki.libsdl.org/SDL_RaiseWindow # https://wiki.libsdl.org/SDL_SetWindowInputFocus # https://wiki.libsdl.org/SDL_SetWindowResizable # https://wiki.libsdl.org/SDL_SetWindowBordered # https://wiki.libsdl.org/SDL_SetWindowIcon void SDL_MaximizeWindow(SDL_Window* window) void SDL_MinimizeWindow(SDL_Window* window) void SDL_RestoreWindow(SDL_Window* window) void SDL_ShowWindow(SDL_Window* window) void SDL_HideWindow(SDL_Window* window) void SDL_RaiseWindow(SDL_Window* window) int SDL_SetWindowInputFocus(SDL_Window* window) void SDL_SetWindowResizable(SDL_Window* window, SDL_bool resizable) void SDL_SetWindowBordered(SDL_Window* window, SDL_bool bordered) void SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon) # https://wiki.libsdl.org/SDL_GetWindowFlags # https://wiki.libsdl.org/SDL_GetWindowID Uint32 SDL_GetWindowFlags(SDL_Window* window) Uint32 SDL_GetWindowID(SDL_Window* window) # https://wiki.libsdl.org/SDL_GetWindowSize # https://wiki.libsdl.org/SDL_SetWindowSize # https://wiki.libsdl.org/SDL_GetWindowPosition # https://wiki.libsdl.org/SDL_SetWindowPosition void SDL_GetWindowSize(SDL_Window* window, int* w, int* h) void SDL_SetWindowSize(SDL_Window* window, int w, int h) void SDL_GetWindowPosition(SDL_Window* window, int* x, int* y) void SDL_SetWindowPosition(SDL_Window* window, int x, int y) # https://wiki.libsdl.org/SDL_GetWindowOpacity # https://wiki.libsdl.org/SDL_SetWindowOpacity int SDL_GetWindowOpacity(SDL_Window* window, float* opacity) int SDL_SetWindowOpacity(SDL_Window* window, float opacity) # https://wiki.libsdl.org/SDL_GetWindowDisplayIndex # https://wiki.libsdl.org/SDL_GetGrabbedWindow # https://wiki.libsdl.org/SDL_GetWindowGrab # https://wiki.libsdl.org/SDL_SetWindowGrab # https://wiki.libsdl.org/SDL_GetWindowKeyboardGrab # https://wiki.libsdl.org/SDL_SetWindowKeyboardGrab # https://wiki.libsdl.org/SDL_SetWindowFullscreen # https://wiki.libsdl.org/SDL_SetWindowModalFor int SDL_GetWindowDisplayIndex(SDL_Window* window) SDL_Window* SDL_GetGrabbedWindow() SDL_bool SDL_GetWindowGrab(SDL_Window* window) void SDL_SetWindowGrab(SDL_Window* window, SDL_bool grabbed) SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window* window) void SDL_SetWindowKeyboardGrab(SDL_Window* window, SDL_bool grabbed) int SDL_SetWindowFullscreen(SDL_Window* window, Uint32 flags) int SDL_SetWindowModalFor(SDL_Window* modal_window, SDL_Window* parent_window) cdef int _SDL_WINDOWPOS_UNDEFINED "SDL_WINDOWPOS_UNDEFINED" cdef int _SDL_WINDOWPOS_CENTERED "SDL_WINDOWPOS_CENTERED" cdef Uint32 _SDL_WINDOW_FULLSCREEN "SDL_WINDOW_FULLSCREEN" cdef Uint32 _SDL_WINDOW_FULLSCREEN_DESKTOP "SDL_WINDOW_FULLSCREEN_DESKTOP" cdef Uint32 _SDL_WINDOW_OPENGL "SDL_WINDOW_OPENGL" cdef Uint32 _SDL_WINDOW_SHOWN "SDL_WINDOW_SHOWN" cdef Uint32 _SDL_WINDOW_HIDDEN "SDL_WINDOW_HIDDEN" cdef Uint32 _SDL_WINDOW_BORDERLESS "SDL_WINDOW_BORDERLESS" cdef Uint32 _SDL_WINDOW_RESIZABLE "SDL_WINDOW_RESIZABLE" cdef Uint32 _SDL_WINDOW_MINIMIZED "SDL_WINDOW_MINIMIZED" cdef Uint32 _SDL_WINDOW_MAXIMIZED "SDL_WINDOW_MAXIMIZED" cdef Uint32 _SDL_WINDOW_INPUT_GRABBED "SDL_WINDOW_INPUT_GRABBED" cdef Uint32 _SDL_WINDOW_INPUT_FOCUS "SDL_WINDOW_INPUT_FOCUS" cdef Uint32 _SDL_WINDOW_MOUSE_FOCUS "SDL_WINDOW_MOUSE_FOCUS" cdef Uint32 _SDL_WINDOW_FOREIGN "SDL_WINDOW_FOREIGN" cdef Uint32 _SDL_WINDOW_ALLOW_HIGHDPI "SDL_WINDOW_ALLOW_HIGHDPI" cdef Uint32 _SDL_WINDOW_MOUSE_CAPTURE "SDL_WINDOW_MOUSE_CAPTURE" cdef Uint32 _SDL_WINDOW_ALWAYS_ON_TOP "SDL_WINDOW_ALWAYS_ON_TOP" cdef Uint32 _SDL_WINDOW_SKIP_TASKBAR "SDL_WINDOW_SKIP_TASKBAR" cdef Uint32 _SDL_WINDOW_UTILITY "SDL_WINDOW_UTILITY" cdef Uint32 _SDL_WINDOW_TOOLTIP "SDL_WINDOW_TOOLTIP" cdef Uint32 _SDL_WINDOW_POPUP_MENU "SDL_WINDOW_POPUP_MENU" cdef Uint32 _SDL_WINDOW_VULKAN "SDL_WINDOW_VULKAN" # TEXTURE # https://wiki.libsdl.org/SDL_CreateTexture # https://wiki.libsdl.org/SDL_CreateTextureFromSurface # https://wiki.libsdl.org/SDL_DestroyTexture # https://wiki.libsdl.org/SDL_GetTextureAlphaMod # https://wiki.libsdl.org/SDL_SetTextureAlphaMod # https://wiki.libsdl.org/SDL_GetTextureBlendMode # https://wiki.libsdl.org/SDL_SetTextureBlendMode # https://wiki.libsdl.org/SDL_GetTextureColorMod # https://wiki.libsdl.org/SDL_SetTextureColorMod SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, Uint32 format, int access, int w, int h) SDL_Texture* SDL_CreateTextureFromSurface(SDL_Renderer* renderer, SDL_Surface* surface) void SDL_DestroyTexture(SDL_Texture* texture) # https://wiki.libsdl.org/SDL_TextureAccess cdef Uint32 _SDL_TEXTUREACCESS_STATIC "SDL_TEXTUREACCESS_STATIC" cdef Uint32 _SDL_TEXTUREACCESS_STREAMING "SDL_TEXTUREACCESS_STREAMING" cdef Uint32 _SDL_TEXTUREACCESS_TARGET "SDL_TEXTUREACCESS_TARGET" Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) int SDL_GetTextureAlphaMod(SDL_Texture* texture, Uint8* alpha) int SDL_SetTextureAlphaMod(SDL_Texture* texture, Uint8 alpha) int SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode) int SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode) int SDL_GetTextureColorMod(SDL_Texture* texture, Uint8* r, Uint8* g, Uint8* b) int SDL_SetTextureColorMod(SDL_Texture* texture, Uint8 r, Uint8 g, Uint8 b) # https://wiki.libsdl.org/SDL_UpdateTexture int SDL_UpdateTexture(SDL_Texture* texture, const SDL_Rect* rect, const void* pixels, int pitch) # https://wiki.libsdl.org/SDL_RenderReadPixels int SDL_RenderReadPixels(SDL_Renderer* renderer, const SDL_Rect* rect, Uint32 format, void* pixels, int pitch) # https://wiki.libsdl.org/SDL_QueryTexture int SDL_QueryTexture(SDL_Texture* texture, Uint32* format, int* access, int* w, int* h) # https://wiki.libsdl.org/SDL_GetRenderTarget SDL_Texture* SDL_GetRenderTarget(SDL_Renderer* renderer) # https://wiki.libsdl.org/SDL_CreateRGBSurfaceWithFormat SDL_Surface* SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format) # https://wiki.libsdl.org/SDL_RenderDrawLine # https://wiki.libsdl.org/SDL_RenderDrawPoint # https://wiki.libsdl.org/SDL_RenderDrawRect # https://wiki.libsdl.org/SDL_RenderFillRect int SDL_RenderDrawLine(SDL_Renderer* renderer, int x1, int y1, int x2, int y2) int SDL_RenderDrawPoint(SDL_Renderer* renderer, int x, int y) int SDL_RenderDrawRect(SDL_Renderer* renderer, const SDL_Rect* rect) int SDL_RenderFillRect(SDL_Renderer* renderer, const SDL_Rect* rect) # https://wiki.libsdl.org/SDL_RenderSetScale # https://wiki.libsdl.org/SDL_RenderGetScale # https://wiki.libsdl.org/SDL_RenderSetLogicalSize # https://wiki.libsdl.org/SDL_RenderGetLogicalSize # https://wiki.libsdl.org/SDL_RenderGetIntegerScale int SDL_RenderSetScale(SDL_Renderer* renderer, float scaleX, float scaleY) void SDL_RenderGetScale(SDL_Renderer* renderer, float* scaleX, float* scaleY) int SDL_RenderSetLogicalSize(SDL_Renderer* renderer, int w, int h) void SDL_RenderGetLogicalSize(SDL_Renderer* renderer, int* w, int* h) int SDL_RenderGetIntegerScale(SDL_Renderer* renderer) cdef extern from "pygame.h" nogil: ctypedef class pygame.Color [object pgColorObject]: cdef Uint8 data[4] cdef Uint8 len ctypedef class pygame.Rect [object pgRectObject]: cdef SDL_Rect r cdef object weakreflist cdef class Window: cdef SDL_Window* _win cdef int _is_borrowed cdef class Renderer: cdef SDL_Renderer* _renderer cdef Color _draw_color cdef Texture _target cdef Window _win cdef int _is_borrowed cpdef object get_viewport(self) cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) cdef class Texture: cdef SDL_Texture* _tex cdef Color _color cdef readonly Renderer renderer cdef readonly int width cdef readonly int height cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, bint flip_x=*, bint flip_y=*) cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, bint flip_x=*, bint flip_y=*) noexcept cdef class Image: cdef Color _color cdef public float angle cdef SDL_Point _origin cdef SDL_Point* _originptr cdef public bint flip_x cdef public bint flip_y cdef public float alpha cdef public SDL_BlendMode blend_mode cdef public Texture texture cdef public Rect srcrect cpdef void draw(self, srcrect=*, dstrect=*) noexcept ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/_sdl2/video.pyx0000644000175100001770000013217414676242340021161 0ustar00runnerdockerfrom cpython cimport PyObject from pygame._sdl2.sdl2 import error from pygame._sdl2.sdl2 import error as errorfnc from libc.stdlib cimport free, malloc import os WINDOWPOS_UNDEFINED = _SDL_WINDOWPOS_UNDEFINED WINDOWPOS_CENTERED = _SDL_WINDOWPOS_CENTERED MESSAGEBOX_ERROR = _SDL_MESSAGEBOX_ERROR MESSAGEBOX_WARNING = _SDL_MESSAGEBOX_WARNING MESSAGEBOX_INFORMATION = _SDL_MESSAGEBOX_INFORMATION cdef extern from "SDL.h" nogil: Uint32 SDL_GetWindowPixelFormat(SDL_Window* window) SDL_bool SDL_IntersectRect(const SDL_Rect* A, const SDL_Rect* B, SDL_Rect* result) void SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable) int SDL_GetWindowOpacity(SDL_Window *window, float *opacity) int SDL_SetWindowOpacity(SDL_Window *window, float opacity) int SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window) int SDL_SetWindowInputFocus(SDL_Window *window) int SDL_SetRelativeMouseMode(SDL_bool enabled) SDL_bool SDL_GetRelativeMouseMode() SDL_Renderer* SDL_GetRenderer(SDL_Window* window) SDL_Window* SDL_GetWindowFromID(Uint32 id) SDL_Surface * SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format) SDL_Surface* SDL_ConvertSurface(SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags) void SDL_FreeSurface(SDL_Surface * surface) SDL_PixelFormat * SDL_AllocFormat(Uint32 pixel_format) void SDL_FreeFormat(SDL_PixelFormat *format) int SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode) int SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode) SDL_Window * SDL_CreateWindowFrom(const void *data) cdef extern from "pygame.h" nogil: ctypedef struct pgSurfaceObject: pass int pgSurface_Check(object surf) SDL_Surface* pgSurface_AsSurface(object surf) void import_pygame_surface() SDL_Window* pg_GetDefaultWindow() void import_pygame_base() int pgRect_Check(object rect) SDL_Rect *pgRect_FromObject(object obj, SDL_Rect *temp) object pgRect_New(SDL_Rect *r) object pgRect_New4(int x, int y, int w, int h) SDL_Rect pgRect_AsRect(object rect) void import_pygame_rect() object pgColor_New(Uint8 rgba[]) object pgColor_NewLength(Uint8 rgba[], Uint8 length) void import_pygame_color() pgSurfaceObject *pgSurface_New2(SDL_Surface *info, int owner) cdef extern from "pgcompat.h" nogil: pass import_pygame_base() import_pygame_color() import_pygame_surface() import_pygame_rect() class RendererDriverInfo: def __repr__(self): return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( self.__class__.__name__, self.name, self.flags, self.num_texture_formats, self.max_texture_width, self.max_texture_height, ) def get_drivers(): cdef int num = SDL_GetNumRenderDrivers() cdef SDL_RendererInfo info cdef int ind for ind from 0 <= ind < num: SDL_GetRenderDriverInfo(ind, &info) ret = RendererDriverInfo() ret.name = info.name.decode("utf-8") ret.flags = info.flags ret.num_texture_formats = info.num_texture_formats ret.max_texture_width = info.max_texture_width ret.max_texture_height = info.max_texture_height yield ret def get_grabbed_window(): """return the Window with input grab enabled, or None if input isn't grabbed.""" cdef SDL_Window *win = SDL_GetGrabbedWindow() cdef void *ptr if win: ptr = SDL_GetWindowData(win, "pg_window") if not ptr: return None return ptr return None def messagebox(title, message, Window window=None, bint info=False, bint warn=False, bint error=False, buttons=('OK', ), return_button=0, escape_button=0): """ Display a message box. :param str title: A title string or None. :param str message: A message string. :param bool info: If ``True``, display an info message. :param bool warn: If ``True``, display a warning message. :param bool error: If ``True``, display an error message. :param tuple buttons: An optional sequence of buttons to show to the user (strings). :param int return_button: Button index to use if the return key is hit (-1 for none). :param int escape_button: Button index to use if the escape key is hit (-1 for none). :return: The index of the button that was pushed. """ # TODO: type check # TODO: color scheme cdef SDL_MessageBoxButtonData* c_buttons = NULL cdef SDL_MessageBoxData data data.flags = 0 if warn: data.flags |= _SDL_MESSAGEBOX_WARNING if error: data.flags |= _SDL_MESSAGEBOX_ERROR if info: data.flags |= _SDL_MESSAGEBOX_INFORMATION if not window: data.window = NULL else: data.window = window._win if title is not None: title = title.encode('utf8') data.title = title else: data.title = NULL message = message.encode('utf8') data.message = message data.colorScheme = NULL cdef SDL_MessageBoxButtonData button if not buttons: button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT button.buttonid = 0 button.text = "OK" data.buttons = &button data.numbuttons = 1 else: buttons_utf8 = [s.encode('utf8') for s in buttons] data.numbuttons = len(buttons) c_buttons =\ malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) if not c_buttons: raise MemoryError() for i, but in enumerate(reversed(buttons_utf8)): c_buttons[i].flags = 0 c_buttons[i].buttonid = data.numbuttons - i - 1 if c_buttons[i].buttonid == return_button: c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT if c_buttons[i].buttonid == escape_button: c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT c_buttons[i].text = but data.buttons = c_buttons cdef int buttonid if SDL_ShowMessageBox(&data, &buttonid): free(c_buttons) raise errorfnc() free(c_buttons) return buttonid cdef class Window: DEFAULT_SIZE = 640, 480 _kwarg_to_flag = { 'opengl': _SDL_WINDOW_OPENGL, 'vulkan': _SDL_WINDOW_VULKAN, 'hidden': _SDL_WINDOW_HIDDEN, 'borderless': _SDL_WINDOW_BORDERLESS, 'resizable': _SDL_WINDOW_RESIZABLE, 'minimized': _SDL_WINDOW_MINIMIZED, 'maximized': _SDL_WINDOW_MAXIMIZED, 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, 'input_focus': _SDL_WINDOW_INPUT_FOCUS, 'mouse_focus': _SDL_WINDOW_MOUSE_FOCUS, 'allow_highdpi': _SDL_WINDOW_ALLOW_HIGHDPI, 'foreign': _SDL_WINDOW_FOREIGN, 'mouse_capture': _SDL_WINDOW_MOUSE_CAPTURE, 'always_on_top': _SDL_WINDOW_ALWAYS_ON_TOP, 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, 'utility': _SDL_WINDOW_UTILITY, 'tooltip': _SDL_WINDOW_TOOLTIP, 'popup_menu': _SDL_WINDOW_POPUP_MENU, } @classmethod def from_window(cls, other): cdef Window self = cls.__new__(cls) os.environ['SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'] = str(hex(other)) cdef long long data = other cdef void* data_ptr = data cdef SDL_Window* window = SDL_CreateWindowFrom(data_ptr) self._win = window self._is_borrowed = 0 SDL_SetWindowData(window, "pg_window", self) return self @classmethod def from_display_module(cls): cdef Window self = cls.__new__(cls) cdef SDL_Window* window = pg_GetDefaultWindow() if not window: raise error() self._win=window self._is_borrowed=1 SDL_SetWindowData(window, "pg_window", self) return self def __init__(self, title='pygame', size=DEFAULT_SIZE, position=WINDOWPOS_UNDEFINED, bint fullscreen=False, bint fullscreen_desktop=False, **kwargs): """ Create a window with the specified position, dimensions, and flags. :param str title: the title of the window, in UTF-8 encoding :param tuple size: the size of the window, in screen coordinates (width, height) :param position: a tuple specifying the window position, WINDOWPOS_CENTERED, or WINDOWPOS_UNDEFINED. :param bool fullscreen: fullscreen window using the window size as the resolution (videomode change) :param bool fullscreen_desktop: fullscreen window using the current desktop resolution :param bool opengl: Usable with OpenGL context. You will still need to create an OpenGL context. :param bool vulkan: usable with a Vulkan instance :param bool hidden: window is not visible :param bool borderless: no window decoration :param bool resizable: window can be resized :param bool minimized: window is minimized :param bool maximized: window is maximized :param bool input_grabbed: window has grabbed input focus :param bool input_focus: window has input focus :param bool mouse_focus: window has mouse focus :param bool foreign: window not created by SDL :param bool allow_highdpi: window should be created in high-DPI mode if supported (>= SDL 2.0.1) :param bool mouse_capture: window has mouse captured (unrelated to INPUT_GRABBED, >= SDL 2.0.4) :param bool always_on_top: window should always be above others (X11 only, >= SDL 2.0.5) :param bool skip_taskbar: window should not be added to the taskbar (X11 only, >= SDL 2.0.5) :param bool utility: window should be treated as a utility window (X11 only, >= SDL 2.0.5) :param bool tooltip: window should be treated as a tooltip (X11 only, >= SDL 2.0.5) :param bool popup_menu: window should be treated as a popup menu (X11 only, >= SDL 2.0.5) """ # https://wiki.libsdl.org/SDL_CreateWindow # https://wiki.libsdl.org/SDL_WindowFlags if position == WINDOWPOS_UNDEFINED: x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED elif position == WINDOWPOS_CENTERED: x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED else: x, y = position flags = 0 if fullscreen and fullscreen_desktop: raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") if fullscreen: flags |= _SDL_WINDOW_FULLSCREEN elif fullscreen_desktop: flags |= _SDL_WINDOW_FULLSCREEN_DESKTOP _kwarg_to_flag = self._kwarg_to_flag for k, v in kwargs.items(): try: flag = _kwarg_to_flag[k] if v: flags |= flag except KeyError: raise TypeError("unknown parameter: %s" % k) self._win = SDL_CreateWindow(title.encode('utf8'), x, y, size[0], size[1], flags) self._is_borrowed=0 if not self._win: raise error() SDL_SetWindowData(self._win, "pg_window", self) import pygame.pkgdata surf = pygame.image.load(pygame.pkgdata.getResource( 'pygame_icon.bmp')) surf.set_colorkey(0) self.set_icon(surf) @property def grab(self): """ Window's input grab state (``True`` or ``False``). Set it to ``True`` to grab, ``False`` to release. When input is grabbed the mouse is confined to the window. If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window. :rtype: bool """ return SDL_GetWindowGrab(self._win) != 0 @grab.setter def grab(self, bint grabbed): # https://wiki.libsdl.org/SDL_SetWindowGrab SDL_SetWindowGrab(self._win, 1 if grabbed else 0) @property def relative_mouse(self): """ Window's relative mouse motion state (``True`` or ``False``). Set it to ``True`` to enable, ``False`` to disable. If mouse.set_visible(True) is set the input will be grabbed, and the mouse will enter endless relative motion mode. :rtype: bool """ return SDL_GetRelativeMouseMode() @relative_mouse.setter def relative_mouse(self, bint enable): # https://wiki.libsdl.org/SDL_SetRelativeMouseMode #SDL_SetWindowGrab(self._win, 1 if enable else 0) SDL_SetRelativeMouseMode(1 if enable else 0) def set_windowed(self): """ Enable windowed mode .. seealso:: :func:`set_fullscreen` """ # https://wiki.libsdl.org/SDL_SetWindowFullscreen if SDL_SetWindowFullscreen(self._win, 0): raise error() #TODO: not sure about this... # Perhaps this is more readable: # window.fullscreen = True # window.fullscreen_desktop = True # window.windowed = True def set_fullscreen(self, bint desktop=False): """ Enable fullscreen for the window :param bool desktop: If ``True``: use the current desktop resolution. If ``False``: change the fullscreen resolution to the window size. .. seealso:: :func:`set_windowed` """ cdef int flags = 0 if desktop: flags = _SDL_WINDOW_FULLSCREEN_DESKTOP else: flags = _SDL_WINDOW_FULLSCREEN if SDL_SetWindowFullscreen(self._win, flags): raise error() @property def title(self): """ The title of the window or u"" if there is none. """ # https://wiki.libsdl.org/SDL_GetWindowTitle return SDL_GetWindowTitle(self._win).decode('utf8') @title.setter def title(self, title): """ Set the window title. :param str title: the desired window title in UTF-8. """ # https://wiki.libsdl.org/SDL_SetWindowTitle SDL_SetWindowTitle(self._win, title.encode('utf8')) def destroy(self): """ Destroys the window. """ # https://wiki.libsdl.org/SDL_DestroyWindow if self._win: SDL_DestroyWindow(self._win) self._win = NULL def hide(self): """ Hide the window. """ # https://wiki.libsdl.org/SDL_HideWindow SDL_HideWindow(self._win) def show(self): """ Show the window. """ # https://wiki.libsdl.org/SDL_ShowWindow SDL_ShowWindow(self._win) def focus(self, input_only=False): """ Raise the window above other windows and set the input focus. :param bool input_only: if ``True``, the window will be given input focus but may be completely obscured by other windows. """ # https://wiki.libsdl.org/SDL_RaiseWindow if input_only: if SDL_SetWindowInputFocus(self._win): raise error() else: SDL_RaiseWindow(self._win) def restore(self): """ Restore the size and position of a minimized or maximized window. """ SDL_RestoreWindow(self._win) def maximize(self): """ Maximize the window. """ SDL_MaximizeWindow(self._win) def minimize(self): """ Minimize the window. """ SDL_MinimizeWindow(self._win) @property def resizable(self): """ Sets whether the window is resizable. """ return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_RESIZABLE != 0 @resizable.setter def resizable(self, enabled): SDL_SetWindowResizable(self._win, 1 if enabled else 0) @property def borderless(self): """ Add or remove the border from the actual window. .. note:: You can't change the border state of a fullscreen window. """ return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_BORDERLESS != 0 @borderless.setter def borderless(self, enabled): SDL_SetWindowBordered(self._win, 0 if enabled else 1) def set_icon(self, surface): """ Set the icon for the window. :param pygame.Surface surface: A Surface to use as the icon. """ if not pgSurface_Check(surface): raise TypeError('surface must be a Surface object') SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) @property def id(self): """ A unique window ID. *Read-only*. :rtype: int """ return SDL_GetWindowID(self._win) @property def size(self): """ The size of the window's client area.""" cdef int w, h SDL_GetWindowSize(self._win, &w, &h) return (w, h) @size.setter def size(self, size): SDL_SetWindowSize(self._win, size[0], size[1]) @property def position(self): """ Window's screen coordinates, or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED""" cdef int x, y SDL_GetWindowPosition(self._win, &x, &y) return (x, y) @position.setter def position(self, position): cdef int x, y if position == WINDOWPOS_UNDEFINED: x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED elif position == WINDOWPOS_CENTERED: x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED else: x, y = position SDL_SetWindowPosition(self._win, x, y) @property def opacity(self): """ Window opacity. It ranges between 0.0 (fully transparent) and 1.0 (fully opaque).""" cdef float opacity if SDL_GetWindowOpacity(self._win, &opacity): raise error() return opacity @opacity.setter def opacity(self, opacity): if SDL_SetWindowOpacity(self._win, opacity): raise error() @property def display_index(self): """ The index of the display associated with the window. *Read-only*. :rtype: int """ cdef int index = SDL_GetWindowDisplayIndex(self._win) if index < 0: raise error() return index def set_modal_for(self, Window parent): """set the window as a modal for a parent window This function is only supported on X11.""" if SDL_SetWindowModalFor(self._win, parent._win): raise error() def __dealloc__(self): if self._is_borrowed: return self.destroy() cdef Uint32 format_from_depth(int depth): cdef Uint32 Rmask, Gmask, Bmask, Amask if depth == 16: Rmask = 0xF << 8 Gmask = 0xF << 4 Bmask = 0xF Amask = 0xF << 12 elif depth in (0, 32): Rmask = 0xFF << 16 Gmask = 0xFF << 8 Bmask = 0xFF Amask = 0xFF << 24 else: raise ValueError("no standard masks exist for given bitdepth with alpha") return SDL_MasksToPixelFormatEnum(depth, Rmask, Gmask, Bmask, Amask) cdef class Texture: def __cinit__(self): cdef Uint8[4] defaultColor = [255, 255, 255, 255] self._color = pgColor_NewLength(defaultColor, 3) def __init__(self, Renderer renderer, size, int depth=0, static=False, streaming=False, target=False): """ Create an empty texture. :param Renderer renderer: Rendering context for the texture. :param tuple size: The width and height of the texture. :param int depth: The pixel format (0 to use the default). One of ``static``, ``streaming``, or ``target`` can be set to ``True``. If all are ``False``, then ``static`` is used. :param bool static: Changes rarely, not lockable. :param bool streaming: Changes frequently, lockable. :param bool target: Can be used as a render target. """ # https://wiki.libsdl.org/SDL_CreateTexture # TODO: masks cdef Uint32 format try: format = format_from_depth(depth) except ValueError as e: raise e cdef int width, height if len(size) != 2: raise ValueError('size must have two elements') width, height = size[0], size[1] if width <= 0 or height <= 0: raise ValueError('size must contain two positive values') cdef int access if static: if streaming or target: raise ValueError('only one of static, streaming, or target can be true') access = _SDL_TEXTUREACCESS_STATIC elif streaming: if static or target: raise ValueError('only one of static, streaming, or target can be true') access = _SDL_TEXTUREACCESS_STREAMING elif target: if streaming or static: raise ValueError('only one of static, streaming, or target can be true') access = _SDL_TEXTUREACCESS_TARGET else: # Create static texture by default. access = _SDL_TEXTUREACCESS_STATIC self.renderer = renderer cdef SDL_Renderer* _renderer = renderer._renderer self._tex = SDL_CreateTexture(_renderer, format, access, width, height) if not self._tex: raise error() self.width, self.height = width, height @staticmethod def from_surface(Renderer renderer, surface): """ Create a texture from an existing surface. :param Renderer renderer: Rendering context for the texture. :param pygame.Surface surface: The surface to create a texture from. """ # https://wiki.libsdl.org/SDL_CreateTextureFromSurface if not pgSurface_Check(surface): raise TypeError('2nd argument must be a surface') cdef Texture self = Texture.__new__(Texture) self.renderer = renderer cdef SDL_Renderer* _renderer = renderer._renderer cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) self._tex = SDL_CreateTextureFromSurface(_renderer, surf_ptr) if not self._tex: raise error() self.width = surface.get_width() self.height = surface.get_height() return self def __dealloc__(self): if self._tex: SDL_DestroyTexture(self._tex) @property def alpha(self): # https://wiki.libsdl.org/SDL_GetTextureAlphaMod cdef Uint8 alpha res = SDL_GetTextureAlphaMod(self._tex, &alpha) if res < 0: raise error() return alpha @alpha.setter def alpha(self, Uint8 new_value): # https://wiki.libsdl.org/SDL_SetTextureAlphaMod res = SDL_SetTextureAlphaMod(self._tex, new_value) if res < 0: raise error() @property def blend_mode(self): # https://wiki.libsdl.org/SDL_GetTextureBlendMode cdef SDL_BlendMode blendMode res = SDL_GetTextureBlendMode(self._tex, &blendMode) if res < 0: raise error() return blendMode @blend_mode.setter def blend_mode(self, blendMode): # https://wiki.libsdl.org/SDL_SetTextureBlendMode res = SDL_SetTextureBlendMode(self._tex, blendMode) if res < 0: raise error() @property def color(self): # https://wiki.libsdl.org/SDL_GetTextureColorMod res = SDL_GetTextureColorMod(self._tex, &self._color.data[0], &self._color.data[1], &self._color.data[2]) if res < 0: raise error() return self._color @color.setter def color(self, new_value): # https://wiki.libsdl.org/SDL_SetTextureColorMod res = SDL_SetTextureColorMod(self._tex, new_value[0], new_value[1], new_value[2]) if res < 0: raise error() def get_rect(self, **kwargs): """ Get the rectangular area of the texture. like surface.get_rect(), returns a new rectangle covering the entire surface. This rectangle will always start at 0, 0 with a width. and height the same size as the texture. """ rect = pgRect_New4(0, 0, self.width, self.height) for key in kwargs: setattr(rect, key, kwargs[key]) return rect cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, bint flip_x=False, bint flip_y=False): cdef int flip = SDL_FLIP_NONE if flip_x: flip |= SDL_FLIP_HORIZONTAL if flip_y: flip |= SDL_FLIP_VERTICAL res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, angle, originptr, flip) if res < 0: raise error() cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, bint flip_x=False, bint flip_y=False) noexcept: """ Copy a portion of the texture to the rendering target. :param srcrect: source rectangle on the texture, or None for the entire texture. :param dstrect: destination rectangle or position on the render target, or None for entire target. The texture is stretched to fill dstrect. :param float angle: angle (in degrees) to rotate dstrect around (clockwise). :param origin: point around which dstrect will be rotated. If None, it will equal the center: (dstrect.w/2, dstrect.h/2). :param bool flip_x: flip horizontally. :param bool flip_y: flip vertically. """ cdef SDL_Rect src, dst cdef SDL_Rect *csrcrect = NULL cdef SDL_Rect *cdstrect = NULL cdef SDL_Point corigin cdef SDL_Point *originptr if srcrect is not None: csrcrect = pgRect_FromObject(srcrect, &src) if not csrcrect: raise TypeError("the argument is not a rectangle or None") if dstrect is not None: cdstrect = pgRect_FromObject(dstrect, &dst) if cdstrect == NULL: if len(dstrect) == 2: dst.x = dstrect[0] dst.y = dstrect[1] dst.w = self.width dst.h = self.height cdstrect = &dst else: raise TypeError('dstrect must be a position, rect, or None') if origin: originptr = &corigin corigin.x = origin[0] corigin.y = origin[1] else: originptr = NULL self.draw_internal(csrcrect, cdstrect, angle, originptr, flip_x, flip_y) def update(self, surface, area=None): # https://wiki.libsdl.org/SDL_UpdateTexture # Should it accept a raw pixel data array too? """ Update the texture with Surface. This is a fairly slow function, intended for use with static textures that do not change often. If the texture is intended to be updated often, it is preferred to create the texture as streaming and use the locking functions. While this function will work with streaming textures, for optimization reasons you may not get the pixels back if you lock the texture afterward. :param surface: source Surface. """ if not pgSurface_Check(surface): raise TypeError("update source should be a Surface.") cdef SDL_Rect rect cdef SDL_Rect *rectptr = pgRect_FromObject(area, &rect) cdef SDL_Surface *surf = pgSurface_AsSurface(surface) # For converting the surface, if needed cdef SDL_Surface *converted_surf = NULL; cdef SDL_PixelFormat *pixel_format = NULL; cdef SDL_BlendMode blend; if rectptr == NULL and area is not None: raise TypeError('area must be a rectangle or None') cdef Uint32 format_ if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): raise error() if format_ != surf.format.format: if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): raise error() pixel_format = SDL_AllocFormat(format_) if (pixel_format == NULL): raise error() converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): SDL_FreeSurface(converted_surf) SDL_FreeFormat(pixel_format) raise error() res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) SDL_FreeSurface(converted_surf) SDL_FreeFormat(pixel_format) else: res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) if res < 0: raise error() cdef class Image: def __cinit__(self): self.angle = 0 self._origin.x = 0 self._origin.y = 0 self._originptr = NULL self.flip_x = False self.flip_y = False cdef Uint8[4] defaultColor = [255, 255, 255, 255] self._color = pgColor_NewLength(defaultColor, 3) self.alpha = 255 def __init__(self, textureOrImage, srcrect=None): cdef SDL_Rect temp cdef SDL_Rect *rectptr if isinstance(textureOrImage, Image): self.texture = textureOrImage.texture self.srcrect = pgRect_New(&(textureOrImage.srcrect).r) else: self.texture = textureOrImage self.srcrect = textureOrImage.get_rect() self.blend_mode = textureOrImage.blend_mode if srcrect is not None: rectptr = pgRect_FromObject(srcrect, &temp) if rectptr == NULL: raise TypeError('srcrect must be None or a rectangle') temp.x = rectptr.x temp.y = rectptr.y temp.w = rectptr.w temp.h = rectptr.h if temp.x < 0 or temp.y < 0 or \ temp.w < 0 or temp.h < 0 or \ temp.x + temp.w > self.srcrect.w or \ temp.y + temp.h > self.srcrect.h: raise ValueError('rect values are out of range') temp.x += self.srcrect.x temp.y += self.srcrect.y self.srcrect = pgRect_New(&temp) @property def color(self): return self._color @color.setter def color(self, new_color): self._color[:3] = new_color[:3] @property def origin(self): if self._originptr == NULL: return None else: return (self._origin.x, self._origin.y) @origin.setter def origin(self, new_origin): if new_origin: self._origin.x = new_origin[0] self._origin.y = new_origin[1] self._originptr = &self._origin else: self._originptr = NULL def get_rect(self, **kwargs): rect = pgRect_New(&self.srcrect.r) for key in kwargs: setattr(rect, key, kwargs[key]) return rect cpdef void draw(self, srcrect=None, dstrect=None) noexcept: """ Copy a portion of the image to the rendering target. :param srcrect: source rectangle specifying a sub-image, or None for the entire image. :param dstrect: destination rectangle or position on the render target, or None for entire target. The image is stretched to fill dstrect. """ cdef SDL_Rect src cdef SDL_Rect dst cdef SDL_Rect *csrcrect = NULL cdef SDL_Rect *cdstrect = NULL cdef SDL_Rect *rectptr if srcrect is None: csrcrect = &self.srcrect.r else: if pgRect_Check(srcrect): src = (srcrect).r else: rectptr = pgRect_FromObject(srcrect, &src) if rectptr == NULL: raise TypeError('srcrect must be a rect or None') src.x = rectptr.x src.y = rectptr.y src.w = rectptr.w src.h = rectptr.h src.x += self.srcrect.x src.y += self.srcrect.y csrcrect = &src if dstrect is not None: cdstrect = pgRect_FromObject(dstrect, &dst) if cdstrect == NULL: if len(dstrect) == 2: dst.x = dstrect[0] dst.y = dstrect[1] dst.w = self.srcrect.w dst.h = self.srcrect.h cdstrect = &dst else: raise TypeError('dstrect must be a position, rect, or None') self.texture.color = self._color self.texture.alpha = self.alpha self.texture.blend_mode = self.blend_mode self.texture.draw_internal(csrcrect, cdstrect, self.angle, self._originptr, self.flip_x, self.flip_y) cdef class Renderer: @classmethod def from_window(cls, Window window): cdef Renderer self = cls.__new__(cls) self._win = window if window._is_borrowed: self._is_borrowed=1 else: raise error() if not self._win: raise error() self._renderer = SDL_GetRenderer(self._win._win) if not self._renderer: raise error() cdef Uint8[4] defaultColor = [255, 255, 255, 255] self._draw_color = pgColor_NewLength(defaultColor, 4) self._target = None return self def __init__(self, Window window, int index=-1, int accelerated=-1, bint vsync=False, bint target_texture=False): """ Create a 2D rendering context for a window. :param Window window: where rendering is displayed. :param int index: index of rendering driver to initialize, or -1 to init the first supporting requested options. :param int accelerated: if 1, the renderer uses hardware acceleration. if 0, the renderer is a software fallback. -1 gives precedence to renderers using hardware acceleration. :param bool vsync: .present() is synchronized with the refresh rate. :param bool target_texture: the renderer supports rendering to texture. """ # https://wiki.libsdl.org/SDL_CreateRenderer # https://wiki.libsdl.org/SDL_RendererFlags flags = 0 if accelerated >= 0: flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE if vsync: flags |= _SDL_RENDERER_PRESENTVSYNC if target_texture: flags |= _SDL_RENDERER_TARGETTEXTURE self._renderer = SDL_CreateRenderer(window._win, index, flags) if not self._renderer: raise error() cdef Uint8[4] defaultColor = [255, 255, 255, 255] self._draw_color = pgColor_NewLength(defaultColor, 4) self._target = None self._win = window self._is_borrowed=0 def __dealloc__(self): if self._is_borrowed: return if self._renderer: SDL_DestroyRenderer(self._renderer) @property def draw_blend_mode(self): # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode cdef SDL_BlendMode blendMode res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) if res < 0: raise error() return blendMode @draw_blend_mode.setter def draw_blend_mode(self, blendMode): # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) if res < 0: raise error() @property def draw_color(self): """ Color used by the drawing functions. """ return self._draw_color @draw_color.setter def draw_color(self, new_value): """ color used by the drawing functions. """ # https://wiki.libsdl.org/SDL_SetRenderDrawColor self._draw_color[:] = new_value res = SDL_SetRenderDrawColor(self._renderer, new_value[0], new_value[1], new_value[2], new_value[3]) if res < 0: raise error() def clear(self): """ Clear the current rendering target with the drawing color. """ # https://wiki.libsdl.org/SDL_RenderClear res = SDL_RenderClear(self._renderer) if res < 0: raise error() def present(self): """ Present the composed backbuffer to the screen. Updates the screen with any rendering performed since previous call. """ # https://wiki.libsdl.org/SDL_RenderPresent SDL_RenderPresent(self._renderer) cpdef get_viewport(self): """ Returns the drawing area on the target. :rtype: pygame.Rect """ # https://wiki.libsdl.org/SDL_RenderGetViewport cdef SDL_Rect rect SDL_RenderGetViewport(self._renderer, &rect) return pgRect_New(&rect) @property def logical_size(self): cdef int w cdef int h SDL_RenderGetLogicalSize(self._renderer, &w, &h) return (w, h) @logical_size.setter def logical_size(self, size): cdef int w = size[0] cdef int h = size[1] if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): raise error() @property def scale(self): cdef float x cdef float y SDL_RenderGetScale(self._renderer, &x, &y); return (x, y) @scale.setter def scale(self, scale): cdef float x = scale[0] cdef float y = scale[1] if (SDL_RenderSetScale(self._renderer, x, y) != 0): raise error() # TODO ifdef # def is_integer_scale(self): # return SDL_RenderGetIntegerScale(self._renderer) def set_viewport(self, area): """ Set the drawing area on the target. If this is set to ``None``, the entire target will be used. :param area: A ``pygame.Rect`` or tuple representing the drawing area on the target, or None. """ # https://wiki.libsdl.org/SDL_RenderSetViewport if area is None: if SDL_RenderSetViewport(self._renderer, NULL) < 0: raise error() return cdef SDL_Rect tmprect cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) if rectptr == NULL: raise TypeError('expected a rectangle') if SDL_RenderSetViewport(self._renderer, rectptr) < 0: raise error() @property def target(self): """ The current render target. Set to ``None`` for the default target. :rtype: Texture, None """ # https://wiki.libsdl.org/SDL_GetRenderTarget return self._target @target.setter def target(self, newtarget): # https://wiki.libsdl.org/SDL_SetRenderTarget if newtarget is None: self._target = None if SDL_SetRenderTarget(self._renderer, NULL) < 0: raise error() elif isinstance(newtarget, Texture): self._target = newtarget if SDL_SetRenderTarget(self._renderer, self._target._tex) < 0: raise error() else: raise TypeError('target must be a Texture or None') cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): """ Only for compatibility. Textures created by different Renderers cannot shared with each other! :param source: A Texture or Image to draw. :param dest: destination on the render target. :param area: the portion of source texture. :param special_flags: have no effect at this moment. """ if isinstance(source, Texture): (source).draw(area, dest) elif isinstance(source, Image): (source).draw(area, dest) elif not hasattr(source, 'draw'): raise TypeError('source must be drawable') else: source.draw(area, dest) if not dest: return self.get_viewport() return dest def draw_line(self, p1, p2): # https://wiki.libsdl.org/SDL_RenderDrawLine res = SDL_RenderDrawLine(self._renderer, p1[0], p1[1], p2[0], p2[1]) if res < 0: raise error() def draw_point(self, point): # https://wiki.libsdl.org/SDL_RenderDrawPoint res = SDL_RenderDrawPoint(self._renderer, point[0], point[1]) if res < 0: raise error() def draw_rect(self, rect): # https://wiki.libsdl.org/SDL_RenderDrawRect cdef SDL_Rect _rect cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) if rectptr == NULL: raise TypeError('expected a rectangle') res = SDL_RenderDrawRect(self._renderer, rectptr) if res < 0: raise error() def fill_rect(self, rect): # https://wiki.libsdl.org/SDL_RenderFillRect cdef SDL_Rect _rect cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) if rectptr == NULL: raise TypeError('expected a rectangle') res = SDL_RenderFillRect(self._renderer, rectptr) if res < 0: raise error() def to_surface(self, surface=None, area=None): # https://wiki.libsdl.org/SDL_RenderReadPixels """ Read pixels from the current rendering target and create a pygame.Surface. WARNING: This is a very slow operation, and should not be used frequently. :param surface: A surface to read the pixel data into. It must be large enough to fit the area, or ``ValueError`` is raised. If ``None``, a new surface is returned. :param area: The area of the screen to read pixels from. The area is clipped to fit inside the viewport. If ``None``, the entire viewport is used. """ cdef Uint32 format cdef SDL_Rect rarea cdef SDL_Rect tempviewport cdef SDL_Rect *areaparam cdef SDL_Surface *surf cdef SDL_Rect *rectptr # obtain area to use if area is not None: rectptr = pgRect_FromObject(area, &rarea) if rectptr == NULL: raise TypeError('area must be None or a rect') # clip area SDL_RenderGetViewport(self._renderer, &tempviewport) SDL_IntersectRect(rectptr, &tempviewport, rectptr) areaparam = rectptr rarea.x = rectptr.x rarea.y = rectptr.y rarea.w = rectptr.w rarea.h = rectptr.h else: SDL_RenderGetViewport(self._renderer, &rarea) areaparam = NULL # prepare surface if surface is None: # create a new surface format = SDL_GetWindowPixelFormat(self._win._win) if format == SDL_PIXELFORMAT_UNKNOWN: raise error() surf = SDL_CreateRGBSurfaceWithFormat( 0, rarea.w, rarea.h, SDL_BITSPERPIXEL(format), format) if surf == NULL: raise MemoryError("not enough memory for the surface") surface = pgSurface_New2(surf, 1) elif pgSurface_Check(surface): surf = pgSurface_AsSurface(surface) if surf.w < rarea.w or surf.h < rarea.h: raise ValueError("the surface is too small") format = surf.format.format else: raise TypeError("'surface' must be a surface or None") if SDL_RenderReadPixels(self._renderer, areaparam, format, surf.pixels, surf.pitch) < 0: raise error() return surface @staticmethod def compose_custom_blend_mode(color_mode, alpha_mode): """ Use this function to compose a custom blend mode.. :param color_mode: A tuple (srcColorFactor, dstColorFactor, colorOperation) :param alpha_mode: A tuple (srcAlphaFactor, dstAlphaFactor, alphaOperation) :return: A blend mode to be used with Renderer.draw_blend_mode and Texure.blend_mode """ # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode res = SDL_ComposeCustomBlendMode(color_mode[0], color_mode[1], color_mode[2], alpha_mode[0], alpha_mode[1], alpha_mode[2]) if res < 0: raise error() return res ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/_sprite.pyx0000644000175100001770000016220414676242340020512 0ustar00runnerdocker## pygame - Python Game Library ## Copyright (C) 2000-2003, 2007 Pete Shinners ## (C) 2004 Joe Wreschnig ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Pete Shinners ## pete@shinners.org # cython: language_level=2 """pygame module with basic game object classes This module contains several simple classes to be used within games. There are the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using Pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games. The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain. The basic Sprite class can draw the Sprites it contains to a Surface. The Group.draw() method requires that each Sprite have a Surface.image attribute and a Surface.rect. The Group.clear() method requires these same attributes and can be used to erase all the Sprites with background. There are also more advanced Groups: pygame.sprite.RenderUpdates() and pygame.sprite.OrderedUpdates(). Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a Surface.rect attribute assigned. The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game. Sprites and Groups manage their relationships with the add() and remove() methods. These methods can accept a single or multiple group arguments for membership. The default initializers for these classes also take a single group or list of groups as arguments for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group. While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you create a new Sprite or Group class. Sprites are not thread safe, so lock them yourself if using threads. """ ##todo ## a group that holds only the 'n' most recent elements. ## sort of like the GroupSingle class, but holding more ## than one sprite ## ## drawing groups that can 'automatically' store the area ## underneath so they can "clear" without needing a background ## function. obviously a little slower than normal, but nice ## to use in many situations. (also remember it must "clear" ## in the reverse order that it draws :]) ## ## the drawing groups should also be able to take a background ## function, instead of just a background surface. the function ## would take a surface and a rectangle on that surface to erase. ## ## perhaps more types of collision functions? the current two ## should handle just about every need, but perhaps more optimized ## specific ones that aren't quite so general but fit into common ## specialized cases. import pygame from pygame import Rect from pygame.time import get_ticks from cpython cimport PyObject_CallFunctionObjArgs, PyDict_SetItem, \ PyObject # Python 3 does not have the callable function, but an equivalent can be made # with the hasattr function. if 'callable' not in dir(__builtins__): callable = lambda obj: hasattr(obj, '__call__') # Don't depend on pygame.mask if it's not there... try: from pygame.mask import from_surface except: pass cdef extern from "_pygame.h" nogil: ctypedef struct SDL_Rect: int x int y int w int h ctypedef class pygame.Rect [object pgRectObject]: cdef SDL_Rect r cdef object weakreflist #import_pygame_rect() from ._sdl2.video cimport * cdef class AbstractGroup cdef class Sprite: """simple base class for visible game objects pygame.sprite.Sprite(*groups): return Sprite The base class for visible game objects. Derived classes will want to override the Sprite.update() method and assign Sprite.image and Sprite.rect attributes. The initializer can accept any number of Group instances that the Sprite will become a member of. When subclassing the Sprite class, be sure to call the base initializer before adding the Sprite to Groups. """ cdef public set __g cdef public object image cdef public Rect rect cdef dict __dict__ def __cinit__(self): self.__dict__ = {} self.__g = set() # The groups the sprite is in def __init__(self, *groups): if groups: self.add(*groups) def add(self, *groups): """add the sprite to groups Sprite.add(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, '_spritegroup'): if not has(group): (group).add_internal(self) self.add_internal(group) else: self.add(*group) def remove(self, *groups): """remove the sprite from groups Sprite.remove(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, '_spritegroup'): if has(group): group.remove_internal(self) self.remove_internal(group) else: self.remove(*group) cpdef void add_internal(self, group) noexcept: self.__g.add(group) cpdef void remove_internal(self, group) noexcept: self.__g.remove(group) def update(self, *args, **kwargs): """method to control sprite behavior Sprite.update(*args, **kwargs): The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by Group.update() with whatever arguments you give it. There is no need to use this method if not using the convenience method by the same name in the Group class. """ pass def kill(self): """remove the Sprite from all Groups Sprite.kill(): return None The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups. """ for c in self.__g: c.remove_internal(self) self.__g.clear() def groups(self): """list of Groups that contain this Sprite Sprite.groups(): return group_list Returns a list of all the Groups that contain this Sprite. """ return list(self.__g) def alive(self): """does the sprite belong to any groups Sprite.alive(): return bool Returns True when the Sprite belongs to one or more Groups. """ return bool(self.__g) def __repr__(self): return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) class DirtySprite(Sprite): """a more featureful subclass of Sprite with more attributes pygame.sprite.DirtySprite(*groups): return DirtySprite Extra DirtySprite attributes with their default values: dirty = 1 If set to 1, it is repainted and then set to 0 again. If set to 2, it is always dirty (repainted each frame; flag is not reset). If set to 0, it is not dirty and therefore not repainted again. blendmode = 0 It's the special_flags argument of Surface.blit; see the blendmodes in the Surface.blit documentation source_rect = None This is the source rect to use. Remember that it is relative to the top left corner (0, 0) of self.image. visible = 1 Normally this is 1. If set to 0, it will not be repainted. (If you change visible to 1, you must set dirty to 1 for it to be erased from the screen.) _layer = 0 0 is the default value but this is able to be set differently when subclassing. """ def __init__(self, *groups): self.dirty = 1 self.blendmode = 0 # pygame 1.8, referred to as special_flags in # the documentation of Surface.blit self._visible = 1 self._layer = getattr(self, '_layer', 0) # Default 0 unless # initialized differently. self.source_rect = None Sprite.__init__(self, *groups) def _set_visible(self, val): """set the visible value (0 or 1) and makes the sprite dirty""" self._visible = val if self.dirty < 2: self.dirty = 1 def _get_visible(self): """return the visible value of that sprite""" return self._visible visible = property(lambda self: self._get_visible(), lambda self, value: self._set_visible(value), doc="you can make this sprite disappear without " "removing it from the group,\n" "assign 0 for invisible and 1 for visible") def __repr__(self): return "<%s DirtySprite(in %d groups)>" % \ (self.__class__.__name__, len(self.groups())) cdef class AbstractGroup: """base class for containers of sprites AbstractGroup does everything needed to behave as a normal group. You can easily subclass a new group class from this or the other groups below if you want to add more features. Any AbstractGroup-derived sprite groups act like sequences and support iteration, len, and so on. """ # dummy val to identify sprite groups, and avoid infinite recursion _spritegroup = True cdef public dict spritedict cdef public list lostsprites def __cinit__(self): self.spritedict = {} self.lostsprites = [] cpdef list sprites(self): """get a list of sprites in the group Group.sprite(): return list Returns an object that can be looped over with a 'for' loop. (For now, it is always a list, but this could change in a future version of pygame.) Alternatively, you can get the same information by iterating directly over the sprite group, e.g. 'for sprite in group'. """ return list(self.spritedict) cpdef void add_internal(self, sprite) noexcept: self.spritedict[sprite] = 0 cpdef void remove_internal(self, sprite) noexcept: r = self.spritedict[sprite] if r: self.lostsprites.append(r) del self.spritedict[sprite] cpdef bint has_internal(self, sprite) noexcept: return sprite in self.spritedict def copy(self): """copy a group with all the same sprites Group.copy(): return Group Returns a copy of the group that is an instance of the same class and has the same sprites in it. """ return self.__class__(self.sprites()) def __iter__(self): return iter(self.sprites()) def __contains__(self, sprite): return self.has(sprite) def add(self, *sprites): """add sprite(s) to group Group.add(sprite, list, group, ...): return None Adds a sprite or sequence of sprites to a group. """ for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite) (sprite).add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite) sprite.add_internal(self) def remove(self, *sprites): """remove sprite(s) from group Group.remove(sprite, list, or group, ...): return None Removes a sprite or sequence of sprites from a group. """ # This function behaves essentially the same as Group.add. It first # tries to handle each argument as an instance of the Sprite class. If # that fails, then it tries to handle the argument as an iterable # object. If that fails, then it tries to handle the argument as an # old-style sprite group. Lastly, if that fails, it assumes that the # normal Sprite methods should be used. for sprite in sprites: if isinstance(sprite, Sprite): if self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) else: try: self.remove(*sprite) except (TypeError, AttributeError): if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if self.has_internal(spr): self.remove_internal(spr) spr.remove_internal(self) elif self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) def has(self, *sprites): """ask if group has a sprite or sprites Group.has(sprite or group, ...): return bool Returns True if the given sprite or sprites are contained in the group. Alternatively, you can get the same information using the 'in' operator, e.g. 'sprite in group', 'subgroup in group'. """ return_value = False for sprite in sprites: if isinstance(sprite, Sprite): # Check for Sprite instance's membership in this group if self.has_internal(sprite): return_value = True else: return False else: try: if self.has(*sprite): return_value = True else: return False except (TypeError, AttributeError): if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if self.has_internal(spr): return_value = True else: return False else: if self.has_internal(sprite): return_value = True else: return False return return_value def update(self, *args, **kwargs): """call the update method of every member sprite Group.update(*args, **kwargs): return None Calls the update method of every member sprite. All arguments that were passed to this method are passed to the Sprite update function. """ for s in self.sprites(): s.update(*args, **kwargs) def draw(self, surface): """draw all sprites onto the surface Group.draw(surface): return None Draws all of the member sprites onto the given surface. """ cdef list sprites = self.sprites() cdef object surface_blit cdef spritedict = self.spritedict cdef object ret if isinstance(surface, Renderer): for spr in sprites: ret = (surface).blit(spr.image, spr.rect) PyDict_SetItem(spritedict, spr, ret) else: surface_blit = surface.blit for spr in sprites: ret = PyObject_CallFunctionObjArgs(surface_blit, spr.image, spr.rect, NULL) PyDict_SetItem(spritedict, spr, ret) self.lostsprites[:] = [] def clear(self, surface, bgd): """erase the previous position of all sprites Group.clear(surface, bgd): return None Clears the area under every drawn sprite in the group. The bgd argument should be Surface which is the same dimensions as the screen surface. The bgd could also be a function which accepts the given surface and the area to be cleared as arguments. """ if callable(bgd): for r in self.lostsprites: bgd(surface, r) for r in self.spritedict.values(): if r: bgd(surface, r) else: surface_blit = surface.blit for r in self.lostsprites: surface_blit(bgd, r, r) for r in self.spritedict.values(): if r: surface_blit(bgd, r, r) def empty(self): """remove all sprites Group.empty(): return None Removes all the sprites from the group. """ for s in self.sprites(): self.remove_internal(s) s.remove_internal(self) def __bool__(self): return bool(self.sprites()) def __len__(self): """return number of sprites in group Group.len(group): return int Returns the number of sprites contained in the group. """ return len(self.sprites()) def __repr__(self): return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) cdef class Group(AbstractGroup): """container class for many Sprites pygame.sprite.Group(*sprites): return Group A simple container for Sprite objects. This class can be subclassed to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations: in test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites The Sprites in the Group are not ordered, so the Sprites are drawn and iterated over in no particular order. """ def __init__(self, *sprites): AbstractGroup.__init__(self) self.add(*sprites) RenderPlain = Group RenderClear = Group cdef class RenderUpdates(Group): """Group class that tracks dirty updates pygame.sprite.RenderUpdates(*sprites): return RenderUpdates This class is derived from pygame.sprite.Group(). It has an enhanced draw method that tracks the changed areas of the screen. """ def draw(self, surface): spritedict = self.spritedict surface_blit = surface.blit dirty = self.lostsprites self.lostsprites.clear() dirty_append = dirty.append for s in self.sprites(): r = spritedict[s] newrect = surface_blit(s.image, s.rect) if r: if newrect.colliderect(r): dirty_append(newrect.union(r)) else: dirty_append(newrect) dirty_append(r) else: dirty_append(newrect) spritedict[s] = newrect return dirty cdef class OrderedUpdates(RenderUpdates): """RenderUpdates class that draws Sprites in order of addition pygame.sprite.OrderedUpdates(*sprites): return OrderedUpdates This class derives from pygame.sprite.RenderUpdates(). It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups. """ cdef public list _spritelist def __init__(self, *sprites): self._spritelist = [] RenderUpdates.__init__(self, *sprites) cpdef list sprites(self): return list(self._spritelist) cpdef void add_internal(self, sprite) noexcept: RenderUpdates.add_internal(self, sprite) self._spritelist.append(sprite) cpdef void remove_internal(self, sprite) noexcept: RenderUpdates.remove_internal(self, sprite) self._spritelist.remove(sprite) cdef class LayeredUpdates(AbstractGroup): """LayeredUpdates Group handles layers, which are drawn like OrderedUpdates pygame.sprite.LayeredUpdates(*sprites, **kwargs): return LayeredUpdates This group is fully compatible with pygame.sprite.Sprite. New in pygame 1.8.0 """ _init_rect = Rect(0, 0, 0, 0) cdef public dict _spritelayers cdef public list _spritelist cdef public int _default_layer def __cinit__(self): self._spritelayers = {} self._spritelist = [] def __init__(self, *sprites, **kwargs): """initialize an instance of LayeredUpdates with the given attributes You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0. If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ AbstractGroup.__init__(self) self._default_layer = kwargs.get('default_layer', 0) self.add(*sprites, **kwargs) cpdef void add_internal(self, sprite, layer=None) noexcept: """Do not use this method directly. It is used by the group to add a sprite internally. """ self.spritedict[sprite] = self._init_rect if layer is None: try: layer = sprite._layer except AttributeError: layer = sprite._layer = self._default_layer elif hasattr(sprite, '_layer'): sprite._layer = layer sprites = self._spritelist # speedup sprites_layers = self._spritelayers sprites_layers[sprite] = layer # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= layer: mid += 1 sprites.insert(mid, sprite) def add(self, *sprites, **kwargs): """add a sprite or sequence of sprites to a group LayeredUpdates.add(*sprites, **kwargs): return None If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ if not sprites: return if 'layer' in kwargs: layer = kwargs['layer'] else: layer = None for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite, layer) (sprite).add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite, **kwargs) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr, layer) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite, layer) sprite.add_internal(self) cpdef void remove_internal(self, sprite) noexcept: """Do not use this method directly. The group uses it to add a sprite. """ self._spritelist.remove(sprite) # these dirty rects are suboptimal for one frame r = self.spritedict[sprite] if r is not self._init_rect: self.lostsprites.append(r) # dirty rect if hasattr(sprite, 'rect'): self.lostsprites.append(sprite.rect) # dirty rect del self.spritedict[sprite] del self._spritelayers[sprite] cpdef list sprites(self): """return a ordered list of sprites (first back, last top). LayeredUpdates.sprites(): return sprites """ return list(self._spritelist) def draw(self, surface): """draw all sprites in the right order onto the passed surface LayeredUpdates.draw(surface): return Rect_list """ spritedict = self.spritedict surface_blit = surface.blit dirty = self.lostsprites self.lostsprites.clear() dirty_append = dirty.append init_rect = self._init_rect for spr in self.sprites(): rec = spritedict[spr] newrect = surface_blit(spr.image, spr.rect) if rec is init_rect: dirty_append(newrect) else: if newrect.colliderect(rec): dirty_append(newrect.union(rec)) else: dirty_append(newrect) dirty_append(rec) spritedict[spr] = newrect return dirty def get_sprites_at(self, pos): """return a list with all sprites at that position LayeredUpdates.get_sprites_at(pos): return colliding_sprites Bottom sprites are listed first; the top ones are listed last. """ _sprites = self._spritelist rect = Rect(pos, (0, 0)) colliding_idx = rect.collidelistall(_sprites) colliding = [_sprites[i] for i in colliding_idx] return colliding def get_sprite(self, idx): """return the sprite at the index idx from the groups sprites LayeredUpdates.get_sprite(idx): return sprite Raises IndexOutOfBounds if the idx is not within range. """ return self._spritelist[idx] def remove_sprites_of_layer(self, layer_nr): """remove all sprites from a layer and return them as a list LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites """ sprites = self.get_sprites_from_layer(layer_nr) self.remove(*sprites) return sprites #---# layer methods def layers(self): """return a list of unique defined layers defined. LayeredUpdates.layers(): return layers """ return sorted(set(self._spritelayers.values())) def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ sprites = self._spritelist # speedup sprites_layers = self._spritelayers # speedup sprites.remove(sprite) sprites_layers.pop(sprite) # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= new_layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= new_layer: mid += 1 sprites.insert(mid, sprite) if hasattr(sprite, 'layer'): sprite.layer = new_layer # add layer info sprites_layers[sprite] = new_layer def get_layer_of_sprite(self, sprite): """return the layer that sprite is currently in If the sprite is not found, then it will return the default layer. """ return self._spritelayers.get(sprite, self._default_layer) def get_top_layer(self): """return the top layer LayeredUpdates.get_top_layer(): return layer """ return self._spritelayers[self._spritelist[-1]] def get_bottom_layer(self): """return the bottom layer LayeredUpdates.get_bottom_layer(): return layer """ return self._spritelayers[self._spritelist[0]] def move_to_front(self, sprite): """bring the sprite to front layer LayeredUpdates.move_to_front(sprite): return None Brings the sprite to front by changing the sprite layer to the top-most layer. The sprite is added at the end of the list of sprites in that top-most layer. """ self.change_layer(sprite, self.get_top_layer()) def move_to_back(self, sprite): """move the sprite to the bottom layer LayeredUpdates.move_to_back(sprite): return None Moves the sprite to the bottom layer by moving it to a new layer below the current bottom layer. """ self.change_layer(sprite, self.get_bottom_layer() - 1) def get_top_sprite(self): """return the topmost sprite LayeredUpdates.get_top_sprite(): return Sprite """ return self._spritelist[-1] def get_sprites_from_layer(self, layer): """return all sprites from a layer ordered as they where added LayeredUpdates.get_sprites_from_layer(layer): return sprites Returns all sprites from a layer. The sprites are ordered in the sequence that they where added. (The sprites are not removed from the layer. """ sprites = [] sprites_append = sprites.append sprite_layers = self._spritelayers for spr in self._spritelist: if sprite_layers[spr] == layer: sprites_append(spr) elif sprite_layers[spr] > layer:# break after because no other will # follow with same layer break return sprites def switch_layer(self, layer1_nr, layer2_nr): """switch the sprites from layer1_nr to layer2_nr LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None The layers number must exist. This method does not check for the existence of the given layers. """ sprites1 = self.remove_sprites_of_layer(layer1_nr) for spr in self.get_sprites_from_layer(layer2_nr): self.change_layer(spr, layer1_nr) self.add(layer=layer2_nr, *sprites1) cdef class LayeredDirty(LayeredUpdates): """LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty This group requires pygame.sprite.DirtySprite or any sprite that has the following attributes: image, rect, dirty, visible, blendmode (see doc of DirtySprite). It uses the dirty flag technique and is therefore faster than pygame.sprite.RenderUpdates if you have many static sprites. It also switches automatically between dirty rect updating and full screen drawing, so you do no have to worry which would be faster. As with the pygame.sprite.Group, you can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: treshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 New in pygame 1.8.0 """ cdef public Rect _clip cdef public bint _use_update cdef public float _time_threshold cdef public object _bgd def __init__(self, *sprites, **kwargs): """initialize group. pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty You can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: treshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 """ LayeredUpdates.__init__(self, *sprites, **kwargs) self._clip = None self._use_update = False self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps self._bgd = None for key, val in kwargs.items(): if key in ['_use_update', '_time_threshold', '_default_layer']: if hasattr(self, key): setattr(self, key, val) cpdef void add_internal(self, sprite, layer=None) noexcept: """Do not use this method directly. It is used by the group to add a sprite internally. """ # check if all needed attributes are set if not hasattr(sprite, 'dirty'): raise AttributeError() if not hasattr(sprite, 'visible'): raise AttributeError() if not hasattr(sprite, 'blendmode'): raise AttributeError() if not isinstance(sprite, DirtySprite): raise TypeError() if sprite.dirty == 0: # set it dirty if it is not sprite.dirty = 1 LayeredUpdates.add_internal(self, sprite, layer) def draw(self, surface, bgd=None): """draw all sprites in the right order onto the given surface LayeredDirty.draw(surface, bgd=None): return Rect_list You can pass the background too. If a self.bgd is already set to some value that is not None, then the bgd argument has no effect. """ # speedups _orig_clip = surface.get_clip() _clip = self._clip if _clip is None: _clip = _orig_clip _surf = surface _sprites = self._spritelist _old_rect = self.spritedict _update = self.lostsprites _update_append = _update.append _ret = None _surf_blit = _surf.blit _rect = Rect if bgd is not None: self._bgd = bgd _bgd = self._bgd init_rect = self._init_rect _surf.set_clip(_clip) # ------- # 0. decide whether to render with update or flip start_time = get_ticks() if self._use_update: # dirty rects mode # 1. find dirty area on screen and put the rects into _update # still not happy with that part for spr in _sprites: if 0 < spr.dirty: # chose the right rect if spr.source_rect: _union_rect = _rect(spr.rect.topleft, spr.source_rect.size) else: _union_rect = _rect(spr.rect) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while -1 < i: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) if _old_rect[spr] is not init_rect: _union_rect = _rect(_old_rect[spr]) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while -1 < i: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) # can it be done better? because that is an O(n**2) algorithm in # worst case # clear using background if _bgd is not None: for rec in _update: _surf_blit(_bgd, rec, rec) # 2. draw for spr in _sprites: if 1 > spr.dirty: if spr._visible: # sprite not dirty; blit only the intersecting part if spr.source_rect is not None: # For possible future speed up, source_rect's data # can be prefetched outside of this loop. _spr_rect = _rect(spr.rect.topleft, spr.source_rect.size) rect_offset_x = spr.source_rect[0] - _spr_rect[0] rect_offset_y = spr.source_rect[1] - _spr_rect[1] else: _spr_rect = spr.rect rect_offset_x = -_spr_rect[0] rect_offset_y = -_spr_rect[1] _spr_rect_clip = _spr_rect.clip for idx in _spr_rect.collidelistall(_update): # clip clip = _spr_rect_clip(_update[idx]) _surf_blit(spr.image, clip, (clip[0] + rect_offset_x, clip[1] + rect_offset_y, clip[2], clip[3]), spr.blendmode) else: # dirty sprite if spr._visible: _old_rect[spr] = _surf_blit(spr.image, spr.rect, spr.source_rect, spr.blendmode) if spr.dirty == 1: spr.dirty = 0 _ret = list(_update) else: # flip, full screen mode if _bgd is not None: _surf_blit(_bgd, (0, 0)) for spr in _sprites: if spr._visible: _old_rect[spr] = _surf_blit(spr.image, spr.rect, spr.source_rect, spr.blendmode) _ret = [_rect(_clip)] # return only the part of the screen changed # timing for switching modes # How may a good threshold be found? It depends on the hardware. end_time = get_ticks() if end_time-start_time > self._time_threshold: self._use_update = False else: self._use_update = True ## # debug ## print " check: using dirty rects:", self._use_update # empty dirty rects list _update[:] = [] # ------- # restore original clip _surf.set_clip(_orig_clip) return _ret def clear(self, surface, bgd): """use to set background Group.clear(surface, bgd): return None """ self._bgd = bgd def repaint_rect(self, screen_rect): """repaint the given area LayeredDirty.repaint_rect(screen_rect): return None screen_rect is in screen coordinates. """ if self._clip: self.lostsprites.append(screen_rect.clip(self._clip)) else: self.lostsprites.append(Rect(screen_rect)) def set_clip(self, screen_rect=None): """clip the area where to draw; pass None (default) to reset the clip LayeredDirty.set_clip(screen_rect=None): return None """ if screen_rect is None: self._clip = pygame.display.get_surface().get_rect() else: self._clip = screen_rect self._use_update = False def get_clip(self): """get the area where drawing will occur LayeredDirty.get_clip(): return Rect """ return self._clip def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ LayeredUpdates.change_layer(self, sprite, new_layer) if sprite.dirty == 0: sprite.dirty = 1 def set_timing_treshold(self, time_ms): """set the treshold in milliseconds DEPRECATED: misspelled 'threshold' set_timing_treshold(time_ms): return None Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. """ self._time_threshold = time_ms def set_timing_threshold(self, time_ms): """set the threshold in milliseconds (time_ms): return None Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. """ self._time_threshold = time_ms cdef class GroupSingle(AbstractGroup): """A group container that holds a single most recent item. This class works just like a regular group, but it only keeps a single sprite in the group. Whatever sprite has been added to the group last will be the only sprite in the group. You can access its one sprite as the .sprite attribute. Assigning to this attribute will properly remove the old sprite and then add the new one. """ cdef public object __sprite def __init__(self, sprite=None): AbstractGroup.__init__(self) self.__sprite = None if sprite is not None: self.add(sprite) def copy(self): return GroupSingle(self.__sprite) cpdef list sprites(self): if self.__sprite is not None: return [self.__sprite] else: return [] cpdef void add_internal(self, sprite) noexcept: if self.__sprite is not None: self.__sprite.remove_internal(self) self.remove_internal(self.__sprite) self.__sprite = sprite def __bool__(self): return self.__sprite is not None def _get_sprite(self): return self.__sprite def _set_sprite(self, sprite): self.add_internal(sprite) sprite.add_internal(self) return sprite sprite = property(_get_sprite, _set_sprite, None, "The sprite contained in this group") cpdef void remove_internal(self, sprite) noexcept: if sprite is self.__sprite: self.__sprite = None if sprite in self.spritedict: AbstractGroup.remove_internal(self, sprite) cpdef bint has_internal(self, sprite) noexcept: return self.__sprite is sprite # Optimizations... def __contains__(self, sprite): return self.__sprite is sprite # Some different collision detection functions that could be used. def collide_rect(left, right): """collision detection between two sprites, using rects. pygame.sprite.collide_rect(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision. It is intended to be passed as a collided callback function to the *collide functions. Sprites must have "rect" attributes. New in pygame 1.8.0 """ return left.rect.colliderect(right.rect) class collide_rect_ratio: """A callable class that checks for collisions using scaled rects The class checks for collisions between two sprites using a scaled version of the sprites' rects. Is created with a ratio; the instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """create a new collide_rect_ratio callable Ratio is expected to be a floating point value used to scale the underlying sprite rect before checking for collisions. """ self.ratio = ratio def __call__(self, left, right): """detect collision between two sprites using scaled rects pygame.sprite.collide_rect_ratio(ratio)(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision after scaling the rects by the stored ratio. Sprites must have "rect" attributes. """ ratio = self.ratio leftrect = left.rect width = leftrect.width height = leftrect.height leftrect = leftrect.inflate(width * ratio - width, height * ratio - height) rightrect = right.rect width = rightrect.width height = rightrect.height rightrect = rightrect.inflate(width * ratio - width, height * ratio - height) return leftrect.colliderect(rightrect) def collide_circle(left, right): """detect collision between two sprites using circles pygame.sprite.collide_circle(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap. If the sprites have a "radius" attribute, then that radius is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. This function is intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. New in pygame 1.8.0 """ xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 if hasattr(left, 'radius'): leftradius = left.radius else: leftrect = left.rect # approximating the radius of a square by using half of the diagonal, # might give false positives (especially if its a long small rect) leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(left, 'radius', leftradius) if hasattr(right, 'radius'): rightradius = right.radius else: rightrect = right.rect # approximating the radius of a square by using half of the diagonal # might give false positives (especially if its a long small rect) rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(right, 'radius', rightradius) return distancesquared <= (leftradius + rightradius) ** 2 class collide_circle_ratio(object): """detect collision between two sprites using scaled circles This callable class checks for collisions between two sprites using a scaled version of a sprite's radius. It is created with a ratio as the argument to the constructor. The instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """creates a new collide_circle_ratio callable instance The given ratio is expected to be a floating point value used to scale the underlying sprite radius before checking for collisions. When the ratio is ratio=1.0, then it behaves exactly like the collide_circle method. """ self.ratio = ratio def __call__(self, left, right): """detect collision between two sprites using scaled circles pygame.sprite.collide_circle_radio(ratio)(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap after scaling the circle's radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. """ ratio = self.ratio xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 if hasattr(left, "radius"): leftradius = left.radius * ratio else: leftrect = left.rect leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(left, 'radius', leftradius) if hasattr(right, "radius"): rightradius = right.radius * ratio else: rightrect = right.rect rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(right, 'radius', rightradius) return distancesquared <= (leftradius + rightradius) ** 2 def collide_mask(left, right): """collision detection between two sprites, using masks. pygame.sprite.collide_mask(SpriteLeft, SpriteRight): bool Tests for collision between two sprites by testing if their bitmasks overlap. If the sprites have a "mask" attribute, that is used as the mask; otherwise, a mask is created from the sprite image. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "mask" attribute. New in pygame 1.8.0 """ xoffset = right.rect[0] - left.rect[0] yoffset = right.rect[1] - left.rect[1] try: leftmask = left.mask except AttributeError: leftmask = from_surface(left.image) try: rightmask = right.mask except AttributeError: rightmask = from_surface(right.image) return leftmask.overlap(rightmask, (xoffset, yoffset)) def spritecollide(sprite, group, dokill, collided=None): """find Sprites in a Group that intersect another Sprite pygame.sprite.spritecollide(sprite, group, dokill, collided=None): return Sprite_list Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the Sprite.rect attribute of each Sprite. The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group. The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ if dokill: crashed = [] append = crashed.append if collided: for s in group.sprites(): if collided(sprite, s): s.kill() append(s) else: spritecollide = sprite.rect.colliderect for s in group.sprites(): if spritecollide(s.rect): s.kill() append(s) return crashed elif collided: return [s for s in group if collided(sprite, s)] else: spritecollide = sprite.rect.colliderect return [s for s in group if spritecollide(s.rect)] def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): """detect collision between a group and another group pygame.sprite.groupcollide(groupa, groupb, dokilla, dokillb): return dict Given two groups, this will find the intersections between all sprites in each group. It returns a dictionary of all sprites in the first group that collide. The value for each item in the dictionary is a list of the sprites in the second group it collides with. The two dokill arguments control if the sprites from either group will be automatically removed from all groups. Collided is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area that will be used to calculate the collision. """ crashed = {} SC = spritecollide if dokilla: for s in groupa.sprites(): c = SC(s, groupb, dokillb, collided) if c: crashed[s] = c s.kill() else: for s in groupa: c = SC(s, groupb, dokillb, collided) if c: crashed[s] = c return crashed def spritecollideany(sprite, group, collided=None): """finds any sprites in a group that collide with the given sprite pygame.sprite.spritecollideany(sprite, group): return sprite Given a sprite and a group of sprites, this will return return any single sprite that collides with with the given sprite. If there are no collisions, then this returns None. If you don't need all the features of the spritecollide function, this function will be a bit quicker. Collided is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ if collided: for s in group: if collided(sprite, s): return s else: # Special case old behaviour for speed. spritecollide = sprite.rect.colliderect for s in group: if spritecollide(s.rect): return s return None ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.005112 pygame-2.6.1/src_c/cython/pygame/pypm.pyx0000644000175100001770000005106214676242340020031 0ustar00runnerdocker# pyPortMidi # Python bindings for PortMidi # John Harrison # http://sound.media.mit.edu/~harrison # harrison@media.mit.edu # written in Pyrex # cython: language_level=2 __version__ = "0.0.6" import array import sys # CHANGES: # 0.0.6: (Feb 25, 2011) christopher arndt # Do not try to close device in Input/Output.__dealloc__ if not open # Major code layout clean up # 0.0.5: (June 1st, 2009) # Output no longer calls abort when it deallocates. # Added abort and close methods. # Need to call Abort() explicityly if you want that to happen. # # 0.0.3: (March 15, 2005) # changed everything from tuples to lists # return 4 values for PmRead instead of 3 (for SysEx) # minor fixes for flexibility and error checking # flushed out DistUtils package and added Mac and Linux compile support # Markus Pfaff: added ability for WriteSysEx to accept lists as well # as strings # 0.0.2: # fixed pointer to function calls to avoid necessity of pyport library # 0.0.1: # initial release FILT_ACTIVE = 0x1 FILT_SYSEX = 0x2 FILT_CLOCK = 0x4 FILT_PLAY = 0x8 FILT_F9 = 0x10 FILT_TICK = 0x10 FILT_FD = 0x20 FILT_UNDEFINED = 0x30 FILT_RESET = 0x40 FILT_REALTIME = 0x7F FILT_NOTE = 0x80 FILT_CHANNEL_AFTERTOUCH = 0x100 FILT_POLY_AFTERTOUCH = 0x200 FILT_AFTERTOUCH = 0x300 FILT_PROGRAM = 0x400 FILT_CONTROL = 0x800 FILT_PITCHBEND = 0x1000 FILT_MTC = 0x2000 FILT_SONG_POSITION = 0x4000 FILT_SONG_SELECT = 0x8000 FILT_TUNE = 0x10000 FALSE = 0 TRUE = 1 cdef extern from "portmidi.h": ctypedef enum PmError: pmNoError = 0, pmHostError = -10000, pmInvalidDeviceId, # out of range or output device when input is requested or vice versa pmInsufficientMemory, pmBufferTooSmall, pmBufferOverflow, pmBadPtr, pmBadData, # illegal midi data, e.g. missing EOX pmInternalError, pmBufferMaxSize, # buffer is already as large as it can be PmError Pm_Initialize() PmError Pm_Terminate() ctypedef void PortMidiStream ctypedef PortMidiStream PmStream # CHECK THIS! ctypedef int PmDeviceID int Pm_HasHostError(PortMidiStream * stream) char *Pm_GetErrorText(PmError errnum) Pm_GetHostErrorText(char * msg, unsigned int len) ctypedef struct PmDeviceInfo: int structVersion char *interf # underlying MIDI API, e.g. MMSystem or DirectX char *name # device name, e.g. USB MidiSport 1x1 int input # true iff input is available int output # true iff output is available int opened # used by generic PortMidi code to do error checking on arguments int Pm_CountDevices() PmDeviceID Pm_GetDefaultInputDeviceID() PmDeviceID Pm_GetDefaultOutputDeviceID() ctypedef long PmTimestamp ctypedef PmTimestamp(*PmTimeProcPtr)(void *time_info) # PmBefore is not defined... PmDeviceInfo* Pm_GetDeviceInfo(PmDeviceID id) PmError Pm_OpenInput(PortMidiStream** stream, PmDeviceID inputDevice, void *inputDriverInfo, long bufferSize, PmTimeProcPtr time_proc, # long = PtTimestamp void *time_info) PmError Pm_OpenOutput(PortMidiStream** stream, PmDeviceID outputDevice, void *outputDriverInfo, long bufferSize, #long (*PmPtr) (), # long = PtTimestamp PmTimeProcPtr time_proc, # long = PtTimestamp void *time_info, long latency) PmError Pm_SetFilter(PortMidiStream* stream, long filters) PmError Pm_Abort(PortMidiStream* stream) PmError Pm_Close(PortMidiStream* stream) ctypedef long PmMessage ctypedef struct PmEvent: PmMessage message PmTimestamp timestamp PmError Pm_Read(PortMidiStream *stream, PmEvent *buffer, long length) PmError Pm_Poll(PortMidiStream *stream) int Pm_Channel(int channel) PmError Pm_SetChannelMask(PortMidiStream *stream, int mask) PmError Pm_Write(PortMidiStream *stream, PmEvent *buffer, long length) PmError Pm_WriteSysEx(PortMidiStream *stream, PmTimestamp when, unsigned char *msg) cdef extern from "porttime.h": ctypedef enum PtError: ptNoError = 0, ptHostError = -10000, ptAlreadyStarted, ptAlreadyStopped, ptInsufficientMemory ctypedef long PtTimestamp ctypedef void (* PtCallback)(PtTimestamp timestamp, void *userData) PtError Pt_Start(int resolution, PtCallback *callback, void *userData) PtTimestamp Pt_Time() cdef long _pypm_initialized def Initialize(): """Initialize PortMidi library. This function must be called once before any other function or class from this module can be used. """ Pm_Initialize() # equiv to TIME_START: start timer w/ ms accuracy Pt_Start(1, NULL, NULL) _pypm_initialized = 1 def Terminate(): """Terminate use of PortMidi library. Call this to clean up Midi streams when done. If you do not call this on Windows machines when you are done with MIDI, your system may crash. """ Pm_Terminate() _pypm_initialized = 0 def GetDefaultInputDeviceID(): """Return the number of the default MIDI input device. See the PortMidi documentation on how the default device is set and determined. """ return Pm_GetDefaultInputDeviceID() def GetDefaultOutputDeviceID(): """Return the number of the default MIDI output device. See the PortMidi documentation on how the default device is set and determined. """ return Pm_GetDefaultOutputDeviceID() def CountDevices(): """Return number of available MIDI (input and output) devices.""" return Pm_CountDevices() def GetDeviceInfo(device_no): """Return device info tuple for MIDI device given by device_no. The returned tuple has the following five items: * underlying MIDI API (string) * device name (string) * whether device can be opened as input (1) or not (0) * whether device can be opened as output (1) or not (0) * whether device is currently opened (1) or not (0) """ cdef PmDeviceInfo *info # disregarding the constness from Pm_GetDeviceInfo, # since pyrex doesn't do const. info = Pm_GetDeviceInfo(device_no) if info != NULL: return info.interf, info.name, info.input, info.output, info.opened # return None def Time(): """Return the current time in ms of the PortMidi timer.""" return Pt_Time() def GetErrorText(err): """Return human-readable error message translated from error number.""" return Pm_GetErrorText(err) def Channel(chan): """Return Channel object for given MIDI channel number 1 - 16. Channel() is used with ChannelMask on input MIDI streams. Example: To receive input on channels 1 and 10 on a MIDI stream called MidiIn:: MidiIn.SetChannelMask(pypm.Channel(1) | pypm.Channel(10)) .. note:: PyPortMidi Channel function has been altered from the original PortMidi c call to correct for what seems to be a bug --- i.e. channel filters were all numbered from 0 to 15 instead of 1 to 16. """ return Pm_Channel(chan - 1) cdef class Output: """Represents an output MIDI stream device. Takes the form:: output = pypm.Output(output_device, latency) latency is in ms. If latency == 0 then timestamps for output are ignored. """ cdef int device cdef PmStream *midi cdef int debug cdef int _aborted def __init__(self, output_device, latency=0, buffer_size=256): """Instantiate MIDI output stream object.""" cdef PmError err #cdef PtTimestamp (*PmPtr) () cdef PmTimeProcPtr PmPtr cdef const char * errmsg self.device = output_device self.debug = 0 self._aborted = 0 if latency == 0: PmPtr = NULL else: PmPtr = &Pt_Time if self.debug: print "Opening Midi Output", output_device err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, PmPtr, NULL, latency) if self.debug: print "Pm_OpenOutput err", err if err < 0: errmsg = Pm_GetErrorText(err) # Something's amiss here - if we try to throw an Exception # here, we crash. if not err == -10000: raise Exception(errmsg) else: print "Unable to open Midi OutputDevice=%i: %s" % ( output_device, errmsg) def __dealloc__(self): """Close midi device if still open when the instance is destroyed.""" cdef PmError err if self.debug: print "Closing MIDI output stream and destroying instance." if self.midi and _pypm_initialized: err = Pm_Close(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) def _check_open(self): """Check whether midi device is open, and if not, raises an error. Internal method, should be used only by other methods of this class. """ if self.midi == NULL: raise Exception("midi Output not open.") if self._aborted: raise Exception( "midi Output aborted. Need to call Close after Abort.") def Close(self): """Close the midi output device, flushing any pending buffers. PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows, so it is best to take care to close all devices explicitly. """ cdef PmError err if not self.midi or not _pypm_initialized: return err = Pm_Close(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) self.midi = NULL def Abort(self): """Terminate outgoing messages immediately. The caller should immediately close the output port after calling this method. This call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. """ cdef PmError err if not self.midi: return err = Pm_Abort(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) self._aborted = 1 def Write(self, data): """Output a series of MIDI events given by data list n this device. Usage:: Write([ [[status, data1, data2, data3], timestamp], [[status, data1, data2, data3], timestamp], ... ]) The data1/2/3 items in each event are optional:: Write([[[0xc0, 0, 0], 20000]]) is equivalent to:: Write([[[0xc0], 20000]]) Example: Send program change 1 at time 20000 and send note 65 with velocity 100 at 500 ms later:: Write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]]) .. notes:: 1. Timestamps will be ignored if latency == 0. 2. To get a note to play immediately, send the note on event with the result from the Time() function as the timestamp. """ cdef PmEvent buffer[1024] cdef PmError err cdef int item cdef int ev_no self._check_open() if len(data) > 1024: raise IndexError('Maximum event list length is 1024.') else: for ev_no, event in enumerate(data): if not event[0]: raise ValueError('No data in event no. %i.' % ev_no) if len(event[0]) > 4: raise ValueError('Too many data bytes (%i) in event no. %i.' % (len(event[0]), ev_no)) buffer[ev_no].message = 0 for item in range(len(event[0])): buffer[ev_no].message += ( (event[0][item] & 0xFF) << (8 * item)) buffer[ev_no].timestamp = event[1] if self.debug: print "%i : %r : %s" % ( ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) if self.debug: print "Writing to midi buffer." err = Pm_Write(self.midi, buffer, len(data)) if err < 0: raise Exception(Pm_GetErrorText(err)) def WriteShort(self, status, data1=0, data2=0): """Output MIDI event of three bytes or less immediately on this device. Usage:: WriteShort(status, data1, data2) status must be a valid MIDI status byte, for example: 0xCx = Program Change 0xBx = Controller Change 0x9x = Note On where x is the MIDI channel number 0 - 0xF. The data1 and data2 arguments are optional and assumed to be 0 if omitted. Example: Send note 65 on with velocity 100:: WriteShort(0x90, 65, 100) """ cdef PmEvent buffer[1] cdef PmError err self._check_open() buffer[0].timestamp = Pt_Time() buffer[0].message = (((data2 << 16) & 0xFF0000) | ((data1 << 8) & 0xFF00) | (status & 0xFF)) if self.debug: print "Writing to MIDI buffer." err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length if err < 0: raise Exception(Pm_GetErrorText(err)) def WriteSysEx(self, when, msg): """Output a timestamped system-exclusive MIDI message on this device. Usage:: WriteSysEx(, ) can be a *list* or a *string* Example (assuming 'out' is an output MIDI stream): out.WriteSysEx(0, '\\xF0\\x7D\\x10\\x11\\x12\\x13\\xF7') This is equivalent to:: out.WriteSysEx(pypm.Time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7]) """ cdef PmError err cdef char *cmsg cdef PtTimestamp cur_time self._check_open() if type(msg) is list: # Markus Pfaff contribution arr = array.array('B', msg) if sys.version_info[0] == 3: msg = arr.tobytes() else: msg = arr.tostring() cmsg = msg cur_time = Pt_Time() err = Pm_WriteSysEx(self.midi, when, cmsg) if err < 0: raise Exception(Pm_GetErrorText(err)) # wait for SysEx to go thru or... # my win32 machine crashes w/ multiple SysEx while Pt_Time() == cur_time: pass cdef class Input: """Represents an input MIDI stream device. Takes the form:: input = pypm.Input(input_device) """ cdef int device cdef PmStream *midi cdef int debug def __init__(self, input_device, buffersize=4096): """Instantiate MIDI input stream object.""" cdef PmError err cdef PmTimeProcPtr PmPtr self.device = input_device self.debug = 0 PmPtr = &Pt_Time err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, PmPtr, NULL) if err < 0: raise Exception(Pm_GetErrorText(err)) if self.debug: print "MIDI input opened.", input_device def __dealloc__(self): """Close midi device if still open when the instance is destroyed.""" cdef PmError err if not _pypm_initialized: return if self.debug: print "Closing MIDI input stream and destroying instance" if self.midi: err = Pm_Close(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) def _check_open(self): """Check whether midi device is open, and if not, raises an error. Internal method, should be used only by other methods of this class. """ if self.midi == NULL: raise Exception("midi Input not open.") def Close(self): """Close the midi input device. PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows, so it is best to take care to close all devices explicitly. """ cdef PmError err if not _pypm_initialized: return if not self.midi: return if self.midi: err = Pm_Close(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) self.midi = NULL def SetFilter(self, filters): """Set filters on an open input stream. Usage:: input.SetFilter(filters) Filters are used to drop selected input event types. By default, only active sensing messages are filtered. To prohibit, say, active sensing and sysex messages, call :: input.SetFilter(FILT_ACTIVE | FILT_SYSEX); Filtering is useful when midi routing or midi thru functionality is being provided by the user application. For example, you may want to exclude timing messages (clock, MTC, start/stop/continue), while allowing note-related messages to pass. Or you may be using a sequencer or drum-machine for MIDI clock information but want to exclude any notes it may play. .. note:: SetFilter empties the buffer after setting the filter, just in case anything got through. """ cdef PmEvent buffer[1] cdef PmError err self._check_open() err = Pm_SetFilter(self.midi, filters) if err < 0: raise Exception(Pm_GetErrorText(err)) while(Pm_Poll(self.midi) != pmNoError): err = Pm_Read(self.midi, buffer, 1) if err < 0: raise Exception(Pm_GetErrorText(err)) def SetChannelMask(self, mask): """Set channel mask to filter incoming messages based on channel. The mask is a 16-bit bitfield corresponding to appropriate channels Channel() can assist in calling this function, i.e. to receive only input on channel 1, call this method like this:: SetChannelMask(Channel(1)) Multiple channels should be OR'd together:: SetChannelMask(Channel(10) | Channel(11)) .. note:: The PyPortMidi Channel function has been altered from the original PortMidi C call to correct for what seems to be a bug --- i.e. channel filters were all numbered from 0 to 15 instead of 1 to 16. """ cdef PmError err self._check_open() err = Pm_SetChannelMask(self.midi, mask) if err < 0: raise Exception(Pm_GetErrorText(err)) def Poll(self): """Test whether input is available. Returns TRUE if input can be read, FALSE otherwise, or an error value. """ cdef PmError err self._check_open() err = Pm_Poll(self.midi) if err < 0: raise Exception(Pm_GetErrorText(err)) return err def Read(self, max_events): """Read and return up to max_events events from input. Reads up to max_events midi events stored in the input buffer and returns them as a list in the following form:: [ [[status, data1, data2, data3], timestamp], [[status, data1, data2, data3], timestamp], ... ] """ cdef PmEvent buffer[1024] cdef PmError num_events self._check_open() if max_events > 1024: raise ValueError('Maximum buffer length is 1024.') if not max_events: raise ValueError('Minimum buffer length is 1.') num_events = Pm_Read(self.midi, buffer, max_events) if num_events < 0: raise Exception(Pm_GetErrorText(num_events)) events = [] if num_events >= 1: for ev_no in range(num_events): events.append( [ [ buffer[ev_no].message & 0xFF, (buffer[ev_no].message >> 8) & 0xFF, (buffer[ev_no].message >> 16) & 0xFF, (buffer[ev_no].message >> 24) & 0xFF ], buffer[ev_no].timestamp ] ) return events ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0061119 pygame-2.6.1/src_c/display.c0000644000175100001770000025235214676242340015332 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * pygame display module */ #define PYGAMEAPI_DISPLAY_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "pgopengl.h" #include "doc/display_doc.h" #include static PyTypeObject pgVidInfo_Type; static PyObject * pgVidInfo_New(const pg_VideoInfo *info); static SDL_Renderer *pg_renderer = NULL; static SDL_Texture *pg_texture = NULL; typedef struct _display_state_s { char *title; PyObject *icon; Uint16 *gamma_ramp; SDL_GLContext gl_context; int toggle_windowed_w; int toggle_windowed_h; Uint8 using_gl; /* using an OPENGL display without renderer */ Uint8 scaled_gl; int scaled_gl_w; int scaled_gl_h; int fullscreen_backup_x; int fullscreen_backup_y; SDL_bool auto_resize; } _DisplayState; static int pg_flip_internal(_DisplayState *state); #ifndef PYPY_VERSION static struct PyModuleDef _module; #define DISPLAY_MOD_STATE(mod) ((_DisplayState *)PyModule_GetState(mod)) #define DISPLAY_STATE DISPLAY_MOD_STATE(PyState_FindModule(&_module)) #else /* PYPY_VERSION */ static struct PyModuleDef _module; static _DisplayState _modstate = {0}; #define DISPLAY_MOD_STATE(mod) (&_modstate) #define DISPLAY_STATE DISPLAY_MOD_STATE(0) #endif /* PYPY_VERSION */ static void _display_state_cleanup(_DisplayState *state) { if (state->title) { free(state->title); state->title = NULL; } if (state->icon) { Py_XDECREF(state->icon); state->icon = NULL; } if (state->gl_context) { SDL_GL_DeleteContext(state->gl_context); state->gl_context = NULL; } if (state->gamma_ramp) { free(state->gamma_ramp); state->gamma_ramp = NULL; } } #if !defined(__APPLE__) static char *icon_defaultname = "pygame_icon.bmp"; static int icon_colorkey = 0; #else static char *icon_defaultname = "pygame_icon_mac.bmp"; static int icon_colorkey = -1; #endif static char *pkgdatamodule_name = "pygame.pkgdata"; static char *imagemodule_name = "pygame.image"; static char *resourcefunc_name = "getResource"; static char *load_basicfunc_name = "load_basic"; static void pg_close_file(PyObject *fileobj) { PyObject *result = PyObject_CallMethod(fileobj, "close", NULL); if (result) { Py_DECREF(result); } else { PyErr_Clear(); } } static PyObject * pg_display_resource(char *filename) { PyObject *imagemodule = NULL; PyObject *load_basicfunc = NULL; PyObject *pkgdatamodule = NULL; PyObject *resourcefunc = NULL; PyObject *fresult = NULL; PyObject *result = NULL; PyObject *name = NULL; pkgdatamodule = PyImport_ImportModule(pkgdatamodule_name); if (!pkgdatamodule) goto display_resource_end; resourcefunc = PyObject_GetAttrString(pkgdatamodule, resourcefunc_name); if (!resourcefunc) goto display_resource_end; imagemodule = PyImport_ImportModule(imagemodule_name); if (!imagemodule) goto display_resource_end; load_basicfunc = PyObject_GetAttrString(imagemodule, load_basicfunc_name); if (!load_basicfunc) goto display_resource_end; fresult = PyObject_CallFunction(resourcefunc, "s", filename); if (!fresult) goto display_resource_end; name = PyObject_GetAttrString(fresult, "name"); if (name != NULL) { if (PyUnicode_Check(name)) { pg_close_file(fresult); Py_DECREF(fresult); fresult = name; name = NULL; } } else { PyErr_Clear(); } result = PyObject_CallFunction(load_basicfunc, "O", fresult); if (!result) goto display_resource_end; display_resource_end: Py_XDECREF(pkgdatamodule); Py_XDECREF(resourcefunc); Py_XDECREF(imagemodule); Py_XDECREF(load_basicfunc); Py_XDECREF(fresult); Py_XDECREF(name); return result; } /* init routines */ static PyObject * pg_display_quit(PyObject *self, PyObject *_null) { _DisplayState *state = DISPLAY_STATE; _display_state_cleanup(state); if (pg_GetDefaultWindowSurface()) { pgSurface_AsSurface(pg_GetDefaultWindowSurface()) = NULL; pg_SetDefaultWindowSurface(NULL); pg_SetDefaultWindow(NULL); } pg_mod_autoquit(IMPPREFIX "event"); pg_mod_autoquit(IMPPREFIX "time"); if (SDL_WasInit(SDL_INIT_VIDEO)) { SDL_QuitSubSystem(SDL_INIT_VIDEO); } Py_RETURN_NONE; } static int _pg_mac_display_init(void) { #if defined(__APPLE__) && defined(darwin) PyObject *module, *rval; int status; module = PyImport_ImportModule("pygame.macosx"); if (!module) return 0; rval = PyObject_CallMethod(module, "Video_AutoInit", ""); Py_DECREF(module); if (!rval) return 0; status = PyObject_IsTrue(rval); Py_DECREF(rval); if (status != 1) return 0; #endif /* Mac */ return 1; } static PyObject * pg_display_init(PyObject *self, PyObject *_null) { const char *drivername; /* Compatibility: * windib video driver was renamed in SDL2, and we don't want it to fail. */ drivername = SDL_getenv("SDL_VIDEODRIVER"); if (drivername && !SDL_strncasecmp("windib", drivername, SDL_strlen(drivername))) { SDL_setenv("SDL_VIDEODRIVER", "windows", 1); } if (!SDL_WasInit(SDL_INIT_VIDEO)) { if (!_pg_mac_display_init()) return NULL; if (SDL_InitSubSystem(SDL_INIT_VIDEO)) return RAISE(pgExc_SDLError, SDL_GetError()); } if (!pg_mod_autoinit(IMPPREFIX "time")) return NULL; if (!pg_mod_autoinit(IMPPREFIX "event")) return NULL; Py_RETURN_NONE; } static PyObject * pg_get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(SDL_WasInit(SDL_INIT_VIDEO) != 0); } static PyObject * pg_get_active(PyObject *self, PyObject *_null) { Uint32 flags = SDL_GetWindowFlags(pg_GetDefaultWindow()); return PyBool_FromLong((flags & SDL_WINDOW_SHOWN) && !(flags & SDL_WINDOW_MINIMIZED)); } /* vidinfo object */ static void pg_vidinfo_dealloc(PyObject *self) { PyObject_Free(self); } static PyObject * pg_vidinfo_getattr(PyObject *self, char *name) { pg_VideoInfo *info = &((pgVidInfoObject *)self)->info; int current_w = -1; int current_h = -1; SDL_version versioninfo; SDL_VERSION(&versioninfo); if (versioninfo.major > 1 || (versioninfo.minor >= 2 && versioninfo.patch >= 10)) { current_w = info->current_w; current_h = info->current_h; } if (!strcmp(name, "hw")) return PyLong_FromLong(info->hw_available); else if (!strcmp(name, "wm")) return PyLong_FromLong(info->wm_available); else if (!strcmp(name, "blit_hw")) return PyLong_FromLong(info->blit_hw); else if (!strcmp(name, "blit_hw_CC")) return PyLong_FromLong(info->blit_hw_CC); else if (!strcmp(name, "blit_hw_A")) return PyLong_FromLong(info->blit_hw_A); else if (!strcmp(name, "blit_sw")) return PyLong_FromLong(info->blit_hw); else if (!strcmp(name, "blit_sw_CC")) return PyLong_FromLong(info->blit_hw_CC); else if (!strcmp(name, "blit_sw_A")) return PyLong_FromLong(info->blit_hw_A); else if (!strcmp(name, "blit_fill")) return PyLong_FromLong(info->blit_fill); else if (!strcmp(name, "video_mem")) return PyLong_FromLong(info->video_mem); else if (!strcmp(name, "bitsize")) return PyLong_FromLong(info->vfmt->BitsPerPixel); else if (!strcmp(name, "bytesize")) return PyLong_FromLong(info->vfmt->BytesPerPixel); else if (!strcmp(name, "masks")) return Py_BuildValue("(iiii)", info->vfmt->Rmask, info->vfmt->Gmask, info->vfmt->Bmask, info->vfmt->Amask); else if (!strcmp(name, "shifts")) return Py_BuildValue("(iiii)", info->vfmt->Rshift, info->vfmt->Gshift, info->vfmt->Bshift, info->vfmt->Ashift); else if (!strcmp(name, "losses")) return Py_BuildValue("(iiii)", info->vfmt->Rloss, info->vfmt->Gloss, info->vfmt->Bloss, info->vfmt->Aloss); else if (!strcmp(name, "current_h")) return PyLong_FromLong(current_h); else if (!strcmp(name, "current_w")) return PyLong_FromLong(current_w); return RAISE(PyExc_AttributeError, "does not exist in vidinfo"); } PyObject * pg_vidinfo_str(PyObject *self) { int current_w = -1; int current_h = -1; pg_VideoInfo *info = &((pgVidInfoObject *)self)->info; const char *pixel_format_name = SDL_GetPixelFormatName(info->vfmt->format); SDL_version versioninfo; SDL_VERSION(&versioninfo); if (versioninfo.major > 1 || (versioninfo.minor >= 2 && versioninfo.patch >= 10)) { current_w = info->current_w; current_h = info->current_h; } return PyUnicode_FromFormat( "", info->hw_available, info->wm_available, info->video_mem, info->blit_hw, info->blit_hw_CC, info->blit_hw_A, info->blit_sw, info->blit_sw_CC, info->blit_sw_A, info->vfmt->BitsPerPixel, info->vfmt->BytesPerPixel, info->vfmt->Rmask, info->vfmt->Gmask, info->vfmt->Bmask, info->vfmt->Amask, info->vfmt->Rshift, info->vfmt->Gshift, info->vfmt->Bshift, info->vfmt->Ashift, info->vfmt->Rloss, info->vfmt->Gloss, info->vfmt->Bloss, info->vfmt->Aloss, current_w, current_h, pixel_format_name); } static PyTypeObject pgVidInfo_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.display.VidInfo", .tp_basicsize = sizeof(pgVidInfoObject), .tp_dealloc = pg_vidinfo_dealloc, .tp_getattr = pg_vidinfo_getattr, .tp_repr = pg_vidinfo_str, }; static PyObject * pgVidInfo_New(const pg_VideoInfo *i) { pgVidInfoObject *info; if (!i) return RAISE(pgExc_SDLError, SDL_GetError()); info = PyObject_New(pgVidInfoObject, &pgVidInfo_Type); if (!info) return NULL; info->info = *i; info->info.vfmt = &info->info.vfmt_data; return (PyObject *)info; } static pg_VideoInfo * pg_GetVideoInfo(pg_VideoInfo *info) { SDL_DisplayMode mode; SDL_PixelFormat *tempformat; Uint32 formatenum; pgSurfaceObject *winsurfobj; SDL_Surface *winsurf; #pragma PG_WARN(hardcoding wm_available to 1) #pragma PG_WARN(setting available video RAM to 0 KB) memset(info, 0, sizeof(pg_VideoInfo)); info->wm_available = 1; winsurfobj = pg_GetDefaultWindowSurface(); if (winsurfobj) { winsurf = pgSurface_AsSurface(winsurfobj); info->current_w = winsurf->w; info->current_h = winsurf->h; info->vfmt_data = *(winsurf->format); info->vfmt = &info->vfmt_data; } else { if (SDL_GetCurrentDisplayMode(0, &mode) == 0) { info->current_w = mode.w; info->current_h = mode.h; formatenum = mode.format; } else { info->current_w = -1; info->current_h = -1; formatenum = SDL_PIXELFORMAT_UNKNOWN; } if ((tempformat = SDL_AllocFormat(formatenum))) { info->vfmt_data = *tempformat; info->vfmt = &info->vfmt_data; SDL_FreeFormat(tempformat); } else { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return (pg_VideoInfo *)NULL; } } return info; } static PyObject * pgInfo(PyObject *self, PyObject *_null) { pg_VideoInfo info; VIDEO_INIT_CHECK(); return pgVidInfo_New(pg_GetVideoInfo(&info)); } static PyObject * pg_get_wm_info(PyObject *self, PyObject *_null) { PyObject *dict; PyObject *tmp; SDL_SysWMinfo info; SDL_Window *win; VIDEO_INIT_CHECK(); SDL_VERSION(&(info.version)) dict = PyDict_New(); if (!dict) return NULL; win = pg_GetDefaultWindow(); if (!win) return dict; if (!SDL_GetWindowWMInfo(win, &info)) return dict; (void)tmp; #if defined(SDL_VIDEO_DRIVER_WINDOWS) tmp = PyLong_FromLongLong((long long)info.info.win.window); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); tmp = PyLong_FromLongLong((long long)info.info.win.hdc); PyDict_SetItemString(dict, "hdc", tmp); Py_DECREF(tmp); tmp = PyLong_FromLongLong((long long)info.info.win.hinstance); PyDict_SetItemString(dict, "hinstance", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_WINRT) tmp = PyCapsule_New(info.info.winrt.window, "window", NULL); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_X11) tmp = PyLong_FromLong(info.info.x11.window); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); tmp = PyCapsule_New(info.info.x11.display, "display", NULL); PyDict_SetItemString(dict, "display", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_DIRECTFB) tmp = PyCapsule_New(info.info.dfb.dfb, "dfb", NULL); PyDict_SetItemString(dict, "dfb", tmp); Py_DECREF(tmp); tmp = PyCapsule_New(info.info.dfb.window, "window", NULL); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); tmp = PyCapsule_New(info.info.dfb.surface, "surface", NULL); PyDict_SetItemString(dict, "surface", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_COCOA) tmp = PyCapsule_New(info.info.cocoa.window, "window", NULL); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_UIKIT) tmp = PyCapsule_New(info.info.uikit.window, "window", NULL); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); tmp = PyLong_FromLong(info.info.uikit.framebuffer); PyDict_SetItemString(dict, "framebuffer", tmp); Py_DECREF(tmp); tmp = PyLong_FromLong(info.info.uikit.colorbuffer); PyDict_SetItemString(dict, "colorbuffer", tmp); Py_DECREF(tmp); tmp = PyLong_FromLong(info.info.uikit.resolveFramebuffer); PyDict_SetItemString(dict, "resolveFramebuffer", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_WAYLAND) tmp = PyCapsule_New(info.info.wl.display, "display", NULL); PyDict_SetItemString(dict, "display", tmp); Py_DECREF(tmp); tmp = PyCapsule_New(info.info.wl.surface, "surface", NULL); PyDict_SetItemString(dict, "surface", tmp); Py_DECREF(tmp); tmp = PyCapsule_New(info.info.wl.shell_surface, "shell_surface", NULL); PyDict_SetItemString(dict, "shell_surface", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_ANDROID) tmp = PyCapsule_New(info.info.android.window, "window", NULL); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); tmp = PyLong_FromLong((long)info.info.android.surface); PyDict_SetItemString(dict, "surface", tmp); Py_DECREF(tmp); #endif #if defined(SDL_VIDEO_DRIVER_VIVANTE) tmp = PyLong_FromLong((long)info.info.vivante.display); PyDict_SetItemString(dict, "display", tmp); Py_DECREF(tmp); tmp = PyLong_FromLong((long)info.info.vivante.window); PyDict_SetItemString(dict, "window", tmp); Py_DECREF(tmp); #endif return dict; } /* display functions */ static PyObject * pg_get_driver(PyObject *self, PyObject *_null) { const char *name = NULL; VIDEO_INIT_CHECK(); name = SDL_GetCurrentVideoDriver(); if (!name) Py_RETURN_NONE; return PyUnicode_FromString(name); } static PyObject * pg_get_surface(PyObject *self, PyObject *_null) { _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); if (pg_renderer != NULL || state->using_gl) { pgSurfaceObject *surface = pg_GetDefaultWindowSurface(); if (!surface) Py_RETURN_NONE; Py_INCREF(surface); return (PyObject *)surface; } else if (win == NULL) { Py_RETURN_NONE; } else { SDL_Surface *sdl_surface = SDL_GetWindowSurface(win); pgSurfaceObject *old_surface = pg_GetDefaultWindowSurface(); if (sdl_surface != old_surface->surf) { pgSurfaceObject *new_surface = (pgSurfaceObject *)pgSurface_New2(sdl_surface, SDL_FALSE); if (!new_surface) return NULL; pg_SetDefaultWindowSurface(new_surface); Py_INCREF((PyObject *)new_surface); return (PyObject *)new_surface; } Py_INCREF(old_surface); return (PyObject *)old_surface; } return NULL; } static PyObject * pg_gl_set_attribute(PyObject *self, PyObject *arg, PyObject *kwargs) { int flag, value, result; VIDEO_INIT_CHECK(); static char *keywords[] = {"flag", "value", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "ii", keywords, &flag, &value)) return NULL; if (flag == -1) /*an undefined/unsupported val, ignore*/ Py_RETURN_NONE; result = SDL_GL_SetAttribute(flag, value); if (result == -1) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * pg_gl_get_attribute(PyObject *self, PyObject *arg, PyObject *kwargs) { int flag, value, result; VIDEO_INIT_CHECK(); static char *keywords[] = {"flag", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "i", keywords, &flag)) return NULL; result = SDL_GL_GetAttribute(flag, &value); if (result == -1) return RAISE(pgExc_SDLError, SDL_GetError()); return PyLong_FromLong(value); } /* ** Looks at the SDL1 environment variables: ** - SDL_VIDEO_WINDOW_POS * "x,y" * "center" ** - SDL_VIDEO_CENTERED * if set the window should be centered. * * Returns: * 0 if we do not want to position the window. * 1 if we set the x and y. * x, and y are set to the x and y. * center_window is set to 0. * 2 if we want the window centered. * center_window is set to 1. */ int _get_video_window_pos(int *x, int *y, int *center_window) { const char *sdl_video_window_pos = SDL_getenv("SDL_VIDEO_WINDOW_POS"); const char *sdl_video_centered = SDL_getenv("SDL_VIDEO_CENTERED"); int xx, yy; if (sdl_video_window_pos) { if (SDL_sscanf(sdl_video_window_pos, "%d,%d", &xx, &yy) == 2) { *x = xx; *y = yy; *center_window = 0; return 1; } if (SDL_strcmp(sdl_video_window_pos, "center") == 0) { sdl_video_centered = sdl_video_window_pos; } } if (sdl_video_centered) { *center_window = 1; return 2; } return 0; } static int SDLCALL pg_ResizeEventWatch(void *userdata, SDL_Event *event) { SDL_Window *pygame_window; _DisplayState *state; SDL_Window *window; if (event->type != SDL_WINDOWEVENT) return 0; pygame_window = pg_GetDefaultWindow(); state = DISPLAY_MOD_STATE((PyObject *)userdata); window = SDL_GetWindowFromID(event->window.windowID); if (window != pygame_window) return 0; if (pg_renderer != NULL) { if (event->window.event == SDL_WINDOWEVENT_MAXIMIZED) { SDL_RenderSetIntegerScale(pg_renderer, SDL_FALSE); } if (event->window.event == SDL_WINDOWEVENT_RESTORED) { SDL_RenderSetIntegerScale( pg_renderer, !(SDL_GetHintBoolean( "SDL_HINT_RENDER_SCALE_QUALITY", SDL_FALSE))); } return 0; } if (state->using_gl) { if (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) { GL_glViewport_Func p_glViewport = (GL_glViewport_Func)SDL_GL_GetProcAddress("glViewport"); int wnew = event->window.data1; int hnew = event->window.data2; SDL_GL_MakeCurrent(pygame_window, state->gl_context); if (state->scaled_gl) { float saved_aspect_ratio = ((float)state->scaled_gl_w) / (float)state->scaled_gl_h; float window_aspect_ratio = ((float)wnew) / (float)hnew; if (window_aspect_ratio > saved_aspect_ratio) { int width = (int)(hnew * saved_aspect_ratio); p_glViewport((wnew - width) / 2, 0, width, hnew); } else { p_glViewport(0, 0, wnew, (int)(wnew / saved_aspect_ratio)); } } else { p_glViewport(0, 0, wnew, hnew); } } return 0; } if (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) { if (window == pygame_window) { SDL_Surface *sdl_surface = SDL_GetWindowSurface(window); pgSurfaceObject *old_surface = pg_GetDefaultWindowSurface(); if (sdl_surface != old_surface->surf) { old_surface->surf = sdl_surface; } } } return 0; } static PyObject * pg_display_set_autoresize(PyObject *self, PyObject *arg) { int do_resize; _DisplayState *state = DISPLAY_MOD_STATE(self); do_resize = PyObject_IsTrue(arg); if (do_resize == -1) { return NULL; } state->auto_resize = (SDL_bool)do_resize; SDL_DelEventWatch(pg_ResizeEventWatch, self); if (do_resize) { SDL_AddEventWatch(pg_ResizeEventWatch, self); Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } int _get_display(SDL_Window *win) { char *display_env = SDL_getenv("PYGAME_DISPLAY"); int display = 0; /* default display 0 */ if (win != NULL) { display = SDL_GetWindowDisplayIndex(win); return display; } else if (display_env != NULL) { display = SDL_atoi(display_env); return display; } /* On e.g. Linux X11, checking the mouse pointer requires that the * video subsystem is initialized to avoid crashes. * * Note that we do not bother raising an error here; the condition will * be rechecked after parsing the arguments and the function will throw * the relevant error there. */ else if (SDL_WasInit(SDL_INIT_VIDEO)) { /* get currently "active" desktop, containing mouse ptr */ int num_displays, i; SDL_Rect display_bounds; SDL_Point mouse_position; SDL_GetGlobalMouseState(&mouse_position.x, &mouse_position.y); num_displays = SDL_GetNumVideoDisplays(); for (i = 0; i < num_displays; i++) { if (SDL_GetDisplayBounds(i, &display_bounds) == 0) { if (SDL_PointInRect(&mouse_position, &display_bounds)) { display = i; break; } } } } return display; } static PyObject * pg_set_mode(PyObject *self, PyObject *arg, PyObject *kwds) { static const char *const DefaultTitle = "pygame window"; _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); pgSurfaceObject *surface = pg_GetDefaultWindowSurface(); SDL_Surface *surf = NULL; SDL_Surface *newownedsurf = NULL; int depth = 0; int flags = 0; int w, h; PyObject *size = NULL; int vsync = SDL_FALSE; /* display will get overwritten by ParseTupleAndKeywords only if display parameter is given. By default, put the new window on the same screen as the old one */ int display = _get_display(win); char *title = state->title; char *scale_env; char *keywords[] = {"size", "flags", "depth", "display", "vsync", NULL}; scale_env = SDL_getenv("PYGAME_FORCE_SCALE"); if (!PyArg_ParseTupleAndKeywords(arg, kwds, "|Oiiii", keywords, &size, &flags, &depth, &display, &vsync)) return NULL; if (scale_env != NULL) { flags |= PGS_SCALED; if (strcmp(scale_env, "photo") == 0) { SDL_SetHintWithPriority(SDL_HINT_RENDER_SCALE_QUALITY, "best", SDL_HINT_NORMAL); } } if (size != NULL) { if (!pg_TwoIntsFromObj(size, &w, &h)) return RAISE(PyExc_TypeError, "size must be two numbers"); if (w < 0 || h < 0) return RAISE(pgExc_SDLError, "Cannot set negative sized display mode"); } else { w = 0; h = 0; } if (!SDL_WasInit(SDL_INIT_VIDEO)) { /* note SDL works special like this too */ if (!pg_display_init(NULL, NULL)) return NULL; } state->using_gl = (flags & PGS_OPENGL) != 0; state->scaled_gl = state->using_gl && (flags & PGS_SCALED) != 0; if (state->scaled_gl) { if (PyErr_WarnEx(PyExc_FutureWarning, "SCALED|OPENGL is experimental and subject to change", 1) != 0) return NULL; } if (!state->title) { state->title = malloc((strlen(DefaultTitle) + 1) * sizeof(char)); if (!state->title) return PyErr_NoMemory(); strcpy(state->title, DefaultTitle); title = state->title; } // if (vsync && !(flags & (PGS_SCALED | PGS_OPENGL))) { // return RAISE(pgExc_SDLError, // "vsync needs either SCALED or OPENGL flag"); // } /* set these only in toggle_fullscreen, clear on set_mode */ state->toggle_windowed_w = 0; state->toggle_windowed_h = 0; if (pg_texture) { SDL_DestroyTexture(pg_texture); pg_texture = NULL; } if (pg_renderer) { SDL_DestroyRenderer(pg_renderer); pg_renderer = NULL; } SDL_DelEventWatch(pg_ResizeEventWatch, self); { Uint32 sdl_flags = 0; SDL_DisplayMode display_mode; if (SDL_GetDesktopDisplayMode(display, &display_mode) != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (w == 0 && h == 0 && !(flags & PGS_SCALED)) { /* We are free to choose a resolution in this case, so we can avoid changing the physical resolution. This used to default to the max supported by the monitor, but we can use current desktop resolution without breaking compatibility. */ w = display_mode.w; h = display_mode.h; } if (flags & PGS_FULLSCREEN) { if (flags & PGS_SCALED) { sdl_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; } // else if (w == display_mode.w && h == display_mode.h) { // /* No need to change physical resolution. // Borderless fullscreen is preferred when possible */ // sdl_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; // } else { sdl_flags |= SDL_WINDOW_FULLSCREEN; } } if (flags & PGS_SCALED) { if (w == 0 || h == 0) return RAISE(pgExc_SDLError, "Cannot set 0 sized SCALED display mode"); } if (flags & PGS_OPENGL) sdl_flags |= SDL_WINDOW_OPENGL; if (flags & PGS_NOFRAME) sdl_flags |= SDL_WINDOW_BORDERLESS; if (flags & PGS_RESIZABLE) { sdl_flags |= SDL_WINDOW_RESIZABLE; if (state->auto_resize) SDL_AddEventWatch(pg_ResizeEventWatch, self); } if (flags & PGS_SHOWN) sdl_flags |= SDL_WINDOW_SHOWN; if (flags & PGS_HIDDEN) sdl_flags |= SDL_WINDOW_HIDDEN; if (!(sdl_flags & SDL_WINDOW_HIDDEN)) sdl_flags |= SDL_WINDOW_SHOWN; if (flags & PGS_OPENGL) { /* Must be called before creating context */ if (flags & PGS_DOUBLEBUF) { flags &= ~PGS_DOUBLEBUF; SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); } else SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0); } #pragma PG_WARN(Not setting bpp ?) #pragma PG_WARN(Add mode stuff.) { int w_1 = w, h_1 = h; int scale = 1; int center_window = 0; int x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(display); int y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(display); _get_video_window_pos(&x, &y, ¢er_window); if (center_window) { x = SDL_WINDOWPOS_CENTERED_DISPLAY(display); y = SDL_WINDOWPOS_CENTERED_DISPLAY(display); } if (win) { if (SDL_GetWindowDisplayIndex(win) == display) { // fullscreen windows don't hold window x and y as needed if (SDL_GetWindowFlags(win) & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP)) { x = state->fullscreen_backup_x; y = state->fullscreen_backup_y; // if the program goes into fullscreen first the "saved // x and y" are "undefined position" that should be // interpreted as a cue to center the window if (x == (int)SDL_WINDOWPOS_UNDEFINED_DISPLAY(display)) x = SDL_WINDOWPOS_CENTERED_DISPLAY(display); if (y == (int)SDL_WINDOWPOS_UNDEFINED_DISPLAY(display)) y = SDL_WINDOWPOS_CENTERED_DISPLAY(display); } else { int old_w, old_h; SDL_GetWindowSize(win, &old_w, &old_h); /* Emulate SDL1 behaviour: When the window is to be * centred, the window shifts to the new centred * location only when resolution changes and previous * position is retained when the dimensions don't * change. * When the window is not to be centred, previous * position is retained unconditionally */ if (!center_window || (w == old_w && h == old_h)) { SDL_GetWindowPosition(win, &x, &y); } } } if (!(flags & PGS_OPENGL) != !(SDL_GetWindowFlags(win) & SDL_WINDOW_OPENGL)) { pg_SetDefaultWindow(NULL); win = NULL; } } if (flags & PGS_SCALED && !(flags & PGS_FULLSCREEN)) { SDL_Rect display_bounds; int fractional_scaling = SDL_FALSE; if (0 != SDL_GetDisplayUsableBounds(display, &display_bounds)) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (SDL_GetHintBoolean("SDL_HINT_RENDER_SCALE_QUALITY", SDL_FALSE)) fractional_scaling = SDL_TRUE; if (state->scaled_gl) fractional_scaling = SDL_TRUE; if (fractional_scaling) { float aspect_ratio = ((float)w) / (float)h; w_1 = display_bounds.w; h_1 = display_bounds.h; if (((float)w_1) / (float)h_1 > aspect_ratio) { w_1 = (int)(h_1 * aspect_ratio); } else { h_1 = (int)(w_1 / aspect_ratio); } } else { int xscale, yscale; xscale = display_bounds.w / w; yscale = display_bounds.h / h; scale = xscale < yscale ? xscale : yscale; if (scale < 1) scale = 1; w_1 = w * scale; h_1 = h * scale; } } // SDL doesn't preserve window position in fullscreen mode // However, windows coming out of fullscreen need these to go back // into the correct position if (sdl_flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP)) { state->fullscreen_backup_x = x; state->fullscreen_backup_y = y; } if (!win) { /*open window*/ char *window_id = SDL_getenv("SDL_WINDOWID"); if (window_id) { long long win_long = SDL_strtol(window_id, NULL, 0); win = SDL_CreateWindowFrom((const void *)win_long); } else { win = SDL_CreateWindow(title, x, y, w_1, h_1, sdl_flags); } if (!win) return RAISE(pgExc_SDLError, SDL_GetError()); } else { /* set min size to (1,1) to erase any previously set min size * relevant for windows leaving SCALED, which sets a min size * only relevant on Windows, I believe. * See https://github.com/pygame/pygame/issues/2327 */ SDL_SetWindowMinimumSize(win, 1, 1); /* change existing window. this invalidates the display surface*/ SDL_SetWindowTitle(win, title); SDL_SetWindowSize(win, w_1, h_1); /* The window must be brought out of fullscreen before the * resize/bordered/hidden changes due to SDL ignoring those * changes if the window is fullscreen * See https://github.com/pygame/pygame/issues/2711 */ if (0 != SDL_SetWindowFullscreen( win, sdl_flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP))) { return RAISE(pgExc_SDLError, SDL_GetError()); } SDL_SetWindowResizable(win, flags & PGS_RESIZABLE); SDL_SetWindowBordered(win, (flags & PGS_NOFRAME) == 0); if ((flags & PGS_SHOWN) || !(flags & PGS_HIDDEN)) SDL_ShowWindow(win); else if (flags & PGS_HIDDEN) SDL_HideWindow(win); SDL_SetWindowPosition(win, x, y); assert(surface); } } if (state->using_gl) { if (!state->gl_context) { state->gl_context = SDL_GL_CreateContext(win); if (!state->gl_context) { _display_state_cleanup(state); PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto DESTROY_WINDOW; } /* SDL_GetWindowSurface can not be used when using GL. According to https://wiki.libsdl.org/SDL_GetWindowSurface So we make a fake surface. */ surf = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, 0xff << 16, 0xff << 8, 0xff, 0); newownedsurf = surf; } else { surf = pgSurface_AsSurface(surface); } if (flags & PGS_SCALED) { state->scaled_gl_w = w; state->scaled_gl_h = h; } /* Even if this succeeds, we can never *really* know if vsync actually works. There may be screen tearing, blocking double buffering, triple buffering, render-offloading where the driver for the on-board graphics *doesn't* have vsync enabled, or cases where the driver lies to us because the user has configured vsync to be always on or always off, or vsync is on by default for the whole desktop because of wayland GL compositing. */ if (vsync == -1) { if (SDL_GL_SetSwapInterval(-1) != 0) { if (PyErr_WarnEx(PyExc_Warning, "adaptive vsync for OpenGL not " "available", 1) != 0) { _display_state_cleanup(state); goto DESTROY_WINDOW; } } } else { if (vsync == 1) { if (SDL_GL_SetSwapInterval(1) != 0) { if (PyErr_WarnEx(PyExc_Warning, "regular vsync for OpenGL not " "available", 1) != 0) { _display_state_cleanup(state); goto DESTROY_WINDOW; } } } else { SDL_GL_SetSwapInterval(0); } } } else { if (state->gl_context) { SDL_GL_DeleteContext(state->gl_context); state->gl_context = NULL; } if (flags & PGS_SCALED) { if (pg_renderer == NULL) { SDL_RendererInfo info; SDL_SetHintWithPriority(SDL_HINT_RENDER_SCALE_QUALITY, "nearest", SDL_HINT_DEFAULT); if (vsync) { pg_renderer = SDL_CreateRenderer( win, -1, SDL_RENDERER_PRESENTVSYNC); } else { pg_renderer = SDL_CreateRenderer(win, -1, 0); } if (pg_renderer == NULL) { return RAISE(pgExc_SDLError, "failed to create renderer"); } /* use whole screen with uneven pixels on fullscreen, exact scale otherwise. we chose the window size for this to work */ SDL_RenderSetIntegerScale( pg_renderer, !(flags & PGS_FULLSCREEN || SDL_GetHintBoolean("SDL_HINT_RENDER_SCALE_QUALITY", SDL_FALSE))); SDL_RenderSetLogicalSize(pg_renderer, w, h); /* this must be called after creating the renderer!*/ SDL_SetWindowMinimumSize(win, w, h); SDL_GetRendererInfo(pg_renderer, &info); if (vsync && !(info.flags & SDL_RENDERER_PRESENTVSYNC)) { if (PyErr_WarnEx(PyExc_Warning, "could not enable vsync", 1) != 0) { _display_state_cleanup(state); goto DESTROY_WINDOW; } } if (!(info.flags & SDL_RENDERER_ACCELERATED)) { if (PyErr_WarnEx(PyExc_Warning, "no fast renderer available", 1) != 0) { _display_state_cleanup(state); goto DESTROY_WINDOW; } } pg_texture = SDL_CreateTexture( pg_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, w, h); } surf = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, 0xff << 16, 0xff << 8, 0xff, 0); newownedsurf = surf; } else { surf = SDL_GetWindowSurface(win); } } if (state->gamma_ramp) { int result = SDL_SetWindowGammaRamp(win, state->gamma_ramp, state->gamma_ramp + 256, state->gamma_ramp + 512); if (result) /* SDL Error? */ { /* Discard a possibly faulty gamma ramp. */ _display_state_cleanup(state); /* Recover error, then destroy the window */ PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto DESTROY_WINDOW; } } if (state->using_gl && pg_renderer != NULL) { _display_state_cleanup(state); PyErr_SetString( pgExc_SDLError, "GL context and SDL_Renderer created at the same time"); goto DESTROY_WINDOW; } if (!surf) { _display_state_cleanup(state); PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto DESTROY_WINDOW; } if (!surface) { surface = pgSurface_New2(surf, newownedsurf != NULL); } else { pgSurface_SetSurface(surface, surf, newownedsurf != NULL); Py_INCREF(surface); } if (!surface) { if (newownedsurf) SDL_FreeSurface(newownedsurf); _display_state_cleanup(state); goto DESTROY_WINDOW; } /*no errors; make the window available*/ pg_SetDefaultWindow(win); pg_SetDefaultWindowSurface(surface); Py_DECREF(surface); /* ensure window is always black after a set_mode call */ SDL_FillRect(surf, NULL, SDL_MapRGB(surf->format, 0, 0, 0)); pg_flip_internal(state); } /*set the window icon*/ if (!state->icon) { state->icon = pg_display_resource(icon_defaultname); if (!state->icon) PyErr_Clear(); else if (icon_colorkey != -1) { SDL_SetColorKey(pgSurface_AsSurface(state->icon), SDL_TRUE, icon_colorkey); } } if (state->icon) SDL_SetWindowIcon(win, pgSurface_AsSurface(state->icon)); /*probably won't do much, but can't hurt, and might help*/ SDL_PumpEvents(); /*return the window's surface (screen)*/ Py_INCREF(surface); return (PyObject *)surface; DESTROY_WINDOW: if (win == pg_GetDefaultWindow()) pg_SetDefaultWindow(NULL); else if (win) SDL_DestroyWindow(win); return NULL; } static int _pg_get_default_display_masks(int bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask) { switch (bpp) { case 8: *Rmask = 0; *Gmask = 0; *Bmask = 0; break; case 12: *Rmask = 0xFF >> 4 << 8; *Gmask = 0xFF >> 4 << 4; *Bmask = 0xFF >> 4; break; case 15: *Rmask = 0xFF >> 3 << 10; *Gmask = 0xFF >> 3 << 5; *Bmask = 0xFF >> 3; break; case 16: *Rmask = 0xFF >> 3 << 11; *Gmask = 0xFF >> 2 << 5; *Bmask = 0xFF >> 3; break; case 24: case 32: *Rmask = 0xFF << 16; *Gmask = 0xFF << 8; *Bmask = 0xFF; break; default: PyErr_SetString(PyExc_ValueError, "nonstandard bit depth given"); return -1; } return 0; } static PyObject * pg_window_size(PyObject *self, PyObject *_null) { SDL_Window *win = pg_GetDefaultWindow(); int w, h; if (!win) return RAISE(pgExc_SDLError, "No open window"); SDL_GetWindowSize(win, &w, &h); return Py_BuildValue("(ii)", w, h); } static PyObject * pg_mode_ok(PyObject *self, PyObject *args, PyObject *kwds) { SDL_DisplayMode desired, closest; int bpp = 0; int flags = SDL_SWSURFACE; int display_index = 0; char *keywords[] = {"size", "flags", "depth", "display", NULL}; VIDEO_INIT_CHECK(); if (!PyArg_ParseTupleAndKeywords(args, kwds, "(ii)|iii", keywords, &desired.w, &desired.h, &flags, &bpp, &display_index)) { return NULL; } if (display_index < 0 || display_index >= SDL_GetNumVideoDisplays()) { return RAISE(PyExc_ValueError, "The display index must be between 0" " and the number of displays."); } #pragma PG_WARN(Ignoring most flags) desired.driverdata = 0; desired.refresh_rate = 0; if (bpp == 0) { desired.format = 0; } else { Uint32 Rmask, Gmask, Bmask; if (_pg_get_default_display_masks(bpp, &Rmask, &Gmask, &Bmask)) { PyErr_Clear(); return PyLong_FromLong((long)0); } desired.format = SDL_MasksToPixelFormatEnum(bpp, Rmask, Gmask, Bmask, 0); } if (!SDL_GetClosestDisplayMode(display_index, &desired, &closest)) { if (flags & PGS_FULLSCREEN) return PyLong_FromLong((long)0); closest.format = desired.format; } if ((flags & PGS_FULLSCREEN) && (closest.w != desired.w || closest.h != desired.h)) return PyLong_FromLong((long)0); return PyLong_FromLong(SDL_BITSPERPIXEL(closest.format)); } static PyObject * pg_list_modes(PyObject *self, PyObject *args, PyObject *kwds) { SDL_DisplayMode mode; int nummodes; int bpp = 0; int flags = PGS_FULLSCREEN; int display_index = 0; int last_width = -1, last_height = -1; PyObject *list, *size; int i; char *keywords[] = {"depth", "flags", "display", NULL}; VIDEO_INIT_CHECK(); if (!PyArg_ParseTupleAndKeywords(args, kwds, "|bii", keywords, &bpp, &flags, &display_index)) { return NULL; } if (display_index < 0 || display_index >= SDL_GetNumVideoDisplays()) { return RAISE(PyExc_ValueError, "The display index must be between 0" " and the number of displays."); } #pragma PG_WARN(Ignoring flags) if (bpp == 0) { SDL_DisplayMode curmode; if (SDL_GetCurrentDisplayMode(display_index, &curmode)) return RAISE(pgExc_SDLError, SDL_GetError()); bpp = SDL_BITSPERPIXEL(curmode.format); } nummodes = SDL_GetNumDisplayModes(display_index); if (nummodes < 0) return RAISE(pgExc_SDLError, SDL_GetError()); if (!(list = PyList_New(0))) return NULL; for (i = 0; i < nummodes; i++) { if (SDL_GetDisplayMode(display_index, i, &mode) < 0) { Py_DECREF(list); return RAISE(pgExc_SDLError, SDL_GetError()); } /* use reasonable defaults (cf. SDL_video.c) */ if (!mode.format) mode.format = SDL_PIXELFORMAT_RGB888; if (!mode.w) mode.w = 640; if (!mode.h) mode.h = 480; if ((int)SDL_BITSPERPIXEL(mode.format) != bpp) continue; if (last_width == mode.w && last_height == mode.h && last_width != -1) { continue; } if (!(size = Py_BuildValue("(ii)", mode.w, mode.h))) { Py_DECREF(list); return NULL; } last_width = mode.w; last_height = mode.h; if (0 != PyList_Append(list, size)) { Py_DECREF(list); Py_DECREF(size); return NULL; /* Exception already set. */ } Py_DECREF(size); } return list; } static int pg_flip_internal(_DisplayState *state) { SDL_Window *win = pg_GetDefaultWindow(); int status = 0; /* Same check as VIDEO_INIT_CHECK() but returns -1 instead of NULL on * fail. */ if (!SDL_WasInit(SDL_INIT_VIDEO)) { PyErr_SetString(pgExc_SDLError, "video system not initialized"); return -1; } if (!win) { PyErr_SetString(pgExc_SDLError, "Display mode not set"); return -1; } Py_BEGIN_ALLOW_THREADS; if (state->using_gl) { SDL_GL_SwapWindow(win); } else { if (pg_renderer != NULL) { SDL_Surface *screen = pgSurface_AsSurface(pg_GetDefaultWindowSurface()); SDL_UpdateTexture(pg_texture, NULL, screen->pixels, screen->pitch); SDL_RenderClear(pg_renderer); SDL_RenderCopy(pg_renderer, pg_texture, NULL, NULL); SDL_RenderPresent(pg_renderer); } else { /* Force a re-initialization of the surface in case it * has been resized to avoid "please call SDL_GetWindowSurface" * errors that the programmer cannot fix */ pgSurfaceObject *screen = pg_GetDefaultWindowSurface(); SDL_Surface *new_surface = SDL_GetWindowSurface(win); if (new_surface != ((pgSurfaceObject *)screen)->surf) { screen->surf = new_surface; } status = SDL_UpdateWindowSurface(win); } } Py_END_ALLOW_THREADS; if (status < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } return 0; } static PyObject * pg_flip(PyObject *self, PyObject *_null) { if (pg_flip_internal(DISPLAY_MOD_STATE(self)) < 0) { return NULL; } Py_RETURN_NONE; } static PyObject * pg_num_displays(PyObject *self, PyObject *_null) { int ret = SDL_GetNumVideoDisplays(); if (ret < 0) return RAISE(pgExc_SDLError, SDL_GetError()); return PyLong_FromLong(ret); } /*BAD things happen when out-of-bound rects go to updaterect*/ static SDL_Rect * pg_screencroprect(SDL_Rect *r, int w, int h, SDL_Rect *cur) { if (r->x > w || r->y > h || (r->x + r->w) <= 0 || (r->y + r->h) <= 0) return 0; else { int right = MIN(r->x + r->w, w); int bottom = MIN(r->y + r->h, h); cur->x = (short)MAX(r->x, 0); cur->y = (short)MAX(r->y, 0); cur->w = (unsigned short)right - cur->x; cur->h = (unsigned short)bottom - cur->y; } return cur; } static PyObject * pg_update(PyObject *self, PyObject *arg) { SDL_Window *win = pg_GetDefaultWindow(); _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Rect *gr, temp = {0}; int wide, high; VIDEO_INIT_CHECK(); if (!win) return RAISE(pgExc_SDLError, "Display mode not set"); if (pg_renderer != NULL) { return pg_flip(self, NULL); } SDL_GetWindowSize(win, &wide, &high); if (state->using_gl) return RAISE(pgExc_SDLError, "Cannot update an OPENGL display"); /*determine type of argument we got*/ if (PyTuple_Size(arg) == 0) { return pg_flip(self, NULL); } if (PyTuple_GET_ITEM(arg, 0) == Py_None) { /* This is to comply with old behaviour of the function, might be worth * deprecating this in the future */ Py_RETURN_NONE; } gr = pgRect_FromObject(arg, &temp); if (gr) { SDL_Rect sdlr; if (pg_screencroprect(gr, wide, high, &sdlr)) SDL_UpdateWindowSurfaceRects(win, &sdlr, 1); } else { PyObject *seq; PyObject *r; Py_ssize_t loop, num; int count; SDL_Rect *rects; if (PyTuple_Size(arg) != 1) return RAISE( PyExc_ValueError, "update requires a rectstyle or sequence of rectstyles"); seq = PyTuple_GET_ITEM(arg, 0); if (!seq || !PySequence_Check(seq)) return RAISE( PyExc_ValueError, "update requires a rectstyle or sequence of rectstyles"); num = PySequence_Length(seq); rects = PyMem_New(SDL_Rect, num); if (!rects) return NULL; count = 0; for (loop = 0; loop < num; ++loop) { SDL_Rect *cur_rect = (rects + count); /*get rect from the sequence*/ r = PySequence_GetItem(seq, loop); if (r == Py_None) { Py_DECREF(r); continue; } gr = pgRect_FromObject(r, &temp); Py_XDECREF(r); if (!gr) { PyMem_Free((char *)rects); return RAISE(PyExc_ValueError, "update_rects requires a single list of rects"); } if (gr->w < 1 && gr->h < 1) continue; /*bail out if rect not onscreen*/ if (!pg_screencroprect(gr, wide, high, cur_rect)) continue; ++count; } if (count) { Py_BEGIN_ALLOW_THREADS; SDL_UpdateWindowSurfaceRects(win, rects, count); Py_END_ALLOW_THREADS; } PyMem_Free((char *)rects); } Py_RETURN_NONE; } static PyObject * pg_set_palette(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surface = pg_GetDefaultWindowSurface(); SDL_Surface *surf; SDL_Palette *pal; SDL_Color *colors; PyObject *list, *item = NULL; int i, len; Uint8 rgba[4]; VIDEO_INIT_CHECK(); static char *keywords[] = {"palette", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "|O", keywords, &list)) return NULL; if (!surface) return RAISE(pgExc_SDLError, "No display mode is set"); Py_INCREF(surface); surf = pgSurface_AsSurface(surface); pal = surf->format->palette; if (surf->format->BytesPerPixel != 1 || !pal) { Py_DECREF(surface); return RAISE(pgExc_SDLError, "Display mode is not colormapped"); } if (!list) { Py_DECREF(surface); Py_RETURN_NONE; } if (!PySequence_Check(list)) { Py_DECREF(surface); return RAISE(PyExc_ValueError, "Argument must be a sequence type"); } len = (int)MIN(pal->ncolors, PySequence_Length(list)); if (len < 0) { return NULL; } #ifdef _MSC_VER /* Make MSVC static analyzer happy by assuring len >= 2 to suppress * a false analyzer report */ __analysis_assume(len >= 2); #endif colors = (SDL_Color *)malloc(len * sizeof(SDL_Color)); if (!colors) { Py_DECREF(surface); return PyErr_NoMemory(); } for (i = 0; i < len; i++) { item = PySequence_GetItem(list, i); if (!item) { free((char *)colors); Py_DECREF(surface); return NULL; } if (!pg_RGBAFromFuzzyColorObj(item, rgba)) { Py_DECREF(item); free((char *)colors); Py_DECREF(surface); return NULL; } Py_DECREF(item); colors[i].r = rgba[0]; colors[i].g = rgba[1]; colors[i].b = rgba[2]; colors[i].a = SDL_ALPHA_OPAQUE; } pal = SDL_AllocPalette(len); if (!pal) { free((char *)colors); Py_DECREF(surface); return RAISE(pgExc_SDLError, SDL_GetError()); } if (!SDL_SetPaletteColors(pal, colors, 0, len)) { SDL_FreePalette(pal); free((char *)colors); Py_DECREF(surface); return RAISE(pgExc_SDLError, SDL_GetError()); } SDL_SetSurfacePalette(surf, pal); SDL_FreePalette(pal); free((char *)colors); Py_DECREF(surface); Py_RETURN_NONE; } static PyObject * pg_set_gamma(PyObject *self, PyObject *arg) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "pygame.display.set_gamma deprecated since 2.2.0", 1) == -1) { return NULL; } float r, g, b; int result = 0; _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); Uint16 *gamma_ramp; if (!PyArg_ParseTuple(arg, "f|ff", &r, &g, &b)) return NULL; if (PyTuple_Size(arg) == 1) g = b = r; VIDEO_INIT_CHECK(); gamma_ramp = (Uint16 *)malloc((3 * 256) * sizeof(Uint16)); if (!gamma_ramp) return PyErr_NoMemory(); SDL_CalculateGammaRamp(r, gamma_ramp); SDL_CalculateGammaRamp(g, gamma_ramp + 256); SDL_CalculateGammaRamp(b, gamma_ramp + 512); if (win) { result = SDL_SetWindowGammaRamp(win, gamma_ramp, gamma_ramp + 256, gamma_ramp + 512); if (result) { /* Discard a possibly faulty gamma ramp */ free(gamma_ramp); gamma_ramp = NULL; } } if (gamma_ramp) { if (state->gamma_ramp) free(state->gamma_ramp); state->gamma_ramp = gamma_ramp; } return PyBool_FromLong(result == 0); } static int pg_convert_to_uint16(PyObject *python_array, Uint16 *c_uint16_array) { int i; PyObject *item; if (!c_uint16_array) { PyErr_SetString(PyExc_RuntimeError, "Memory not allocated for c_uint16_array."); return 0; } if (!PySequence_Check(python_array)) { PyErr_SetString(PyExc_TypeError, "Array must be sequence type"); return 0; } if (PySequence_Size(python_array) != 256) { PyErr_SetString(PyExc_ValueError, "gamma ramp must be 256 elements long"); return 0; } for (i = 0; i < 256; i++) { long ret; item = PySequence_GetItem(python_array, i); if (!item) { return 0; } if (!PyLong_Check(item)) { PyErr_SetString(PyExc_ValueError, "gamma ramp must contain integer elements"); return 0; } ret = PyLong_AsLong(item); Py_XDECREF(item); if (ret < 0 || ret >= 0xFFFF) { if (PyErr_Occurred()) { /* Happens when PyLong_AsLong overflows */ return 0; } PyErr_SetString( PyExc_ValueError, "integers in gamma ramp must be between 0 and 0xFFFF"); return 0; } c_uint16_array[i] = (Uint16)ret; } return 1; } static PyObject * pg_set_gamma_ramp(PyObject *self, PyObject *arg) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "pygame.display.set_gamma_ramp deprecated since 2.2.0", 1) == -1) { return NULL; } _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); Uint16 *gamma_ramp = (Uint16 *)malloc((3 * 256) * sizeof(Uint16)); Uint16 *r, *g, *b; int result = 0; if (!gamma_ramp) return PyErr_NoMemory(); r = gamma_ramp; g = gamma_ramp + 256; b = gamma_ramp + 512; if (!PyArg_ParseTuple(arg, "O&O&O&", pg_convert_to_uint16, r, pg_convert_to_uint16, g, pg_convert_to_uint16, b)) { free(gamma_ramp); return NULL; } VIDEO_INIT_CHECK(); if (win) { result = SDL_SetWindowGammaRamp(win, gamma_ramp, gamma_ramp + 256, gamma_ramp + 512); if (result) { /* Discard a possibly faulty gamma ramp */ free(gamma_ramp); gamma_ramp = NULL; } } if (gamma_ramp) { if (state->gamma_ramp) free(state->gamma_ramp); state->gamma_ramp = gamma_ramp; } return PyBool_FromLong(result == 0); } static PyObject * pg_set_caption(PyObject *self, PyObject *arg, PyObject *kwargs) { _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); char *title, *icontitle = NULL; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure title is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(title = "inited"); #endif static char *keywords[] = {"title", "icontitle", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "s|s", keywords, &title, &icontitle)) return NULL; if (state->title) free(state->title); state->title = (char *)malloc((strlen(title) + 1) * sizeof(char)); if (!state->title) { return PyErr_NoMemory(); } strcpy(state->title, title); if (win) SDL_SetWindowTitle(win, title); /* TODO: icon title? */ Py_RETURN_NONE; } static PyObject * pg_get_caption(PyObject *self, PyObject *_null) { _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); const char *title = win ? SDL_GetWindowTitle(win) : state->title; if (title && *title) { PyObject *titleObj = PyUnicode_FromString(title); PyObject *ret = PyTuple_Pack(2, titleObj, titleObj); Py_DECREF(titleObj); /* TODO: icon title? */ return ret; } return PyTuple_New(0); } static PyObject * pg_set_icon(PyObject *self, PyObject *surface) { _DisplayState *state = DISPLAY_MOD_STATE(self); SDL_Window *win = pg_GetDefaultWindow(); if (!pgSurface_Check(surface)) { return RAISE(PyExc_TypeError, "Argument to set_icon must be a Surface"); } if (!SDL_WasInit(SDL_INIT_VIDEO)) { if (!pg_display_init(NULL, NULL)) return NULL; } Py_INCREF(surface); Py_XDECREF(state->icon); state->icon = surface; if (win) SDL_SetWindowIcon(win, pgSurface_AsSurface(surface)); Py_RETURN_NONE; } static PyObject * pg_iconify(PyObject *self, PyObject *_null) { SDL_Window *win = pg_GetDefaultWindow(); VIDEO_INIT_CHECK(); if (!win) return RAISE(pgExc_SDLError, "No open window"); SDL_MinimizeWindow(win); return PyBool_FromLong(1); } /* This is only here for debugging purposes. Games should not rely on the * implementation details of specific renderers, only on the documented * behaviour of SDL_Renderer. It's fine to debug-print which renderer a game is * running on, or to inform the user when the game is not running with HW * acceleration, but openGL can still be available without HW acceleration. */ static PyObject * pg_get_scaled_renderer_info(PyObject *self) { SDL_RendererInfo r_info; VIDEO_INIT_CHECK(); if (!pg_renderer) { Py_RETURN_NONE; } if (SDL_GetRendererInfo(pg_renderer, &r_info)) { return RAISE(pgExc_SDLError, SDL_GetError()); } return Py_BuildValue("(si)", r_info.name, r_info.flags); } static PyObject * pg_get_desktop_screen_sizes(PyObject *self) { int display_count, i; SDL_DisplayMode dm; PyObject *result, *size_tuple; VIDEO_INIT_CHECK(); display_count = SDL_GetNumVideoDisplays(); if (display_count < 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } result = PyList_New(display_count); if (!result) { return NULL; } for (i = 0; i < display_count; i++) { if (SDL_GetDesktopDisplayMode(i, &dm)) { Py_DECREF(result); return RAISE(pgExc_SDLError, SDL_GetError()); } size_tuple = Py_BuildValue("(ii)", dm.w, dm.h); if (!size_tuple) { Py_DECREF(result); return NULL; } PyList_SET_ITEM(result, i, size_tuple); } return result; } static PyObject * pg_is_fullscreen(PyObject *self, PyObject *_null) { SDL_Window *win = pg_GetDefaultWindow(); int flags; VIDEO_INIT_CHECK(); if (!win) return RAISE(pgExc_SDLError, "No open window"); flags = SDL_GetWindowFlags(win) & SDL_WINDOW_FULLSCREEN_DESKTOP; if (flags & SDL_WINDOW_FULLSCREEN) Py_RETURN_TRUE; else Py_RETURN_FALSE; } static PyObject * pg_toggle_fullscreen(PyObject *self, PyObject *_null) { SDL_Window *win = pg_GetDefaultWindow(); int result, flags; int window_w, window_h, w, h, window_display, x, y; SDL_DisplayMode display_mode; pgSurfaceObject *display_surface; _DisplayState *state = DISPLAY_MOD_STATE(self); GL_glViewport_Func p_glViewport = NULL; SDL_SysWMinfo wm_info; SDL_RendererInfo r_info; VIDEO_INIT_CHECK(); if (!win) return RAISE(pgExc_SDLError, "No open window"); flags = SDL_GetWindowFlags(win); SDL_VERSION(&wm_info.version); if (!SDL_GetWindowWMInfo(win, &wm_info)) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (state->using_gl && pg_renderer != NULL) { return RAISE(pgExc_SDLError, "OPENGL and SDL_Renderer active at the same time"); } if (pg_renderer != NULL) { if (SDL_GetRendererInfo(pg_renderer, &r_info) != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } } switch (wm_info.subsystem) { // if we get this to work correctly with more systems, move them here case SDL_SYSWM_WINDOWS: case SDL_SYSWM_X11: case SDL_SYSWM_COCOA: case SDL_SYSWM_WAYLAND: break; // These probably have fullscreen/windowed, but not tested yet. // before merge, this section should be handled by moving items // into the "supported" category, or returning early. case SDL_SYSWM_WINRT: // currently not supported by pygame? return PyLong_FromLong(-1); // On these platforms, everything is fullscreen at all times anyway // So we silently fail // In the future, add consoles like xbone/switch here case SDL_SYSWM_DIRECTFB: case SDL_SYSWM_UIKIT: // iOS currently not supported by pygame case SDL_SYSWM_ANDROID: // currently not supported by pygame if (PyErr_WarnEx(PyExc_Warning, "cannot leave FULLSCREEN on this platform", 1) != 0) { return NULL; } return PyLong_FromLong(-1); // Untested and unsupported platforms case SDL_SYSWM_MIR: // nobody uses mir any more, wayland has won case SDL_SYSWM_VIVANTE: case SDL_SYSWM_UNKNOWN: default: return RAISE(pgExc_SDLError, "Unsupported platform"); } display_surface = pg_GetDefaultWindowSurface(); // could also take the size of the old display surface SDL_GetWindowSize(win, &window_w, &window_h); SDL_GetWindowPosition(win, &x, &y); window_display = SDL_GetWindowDisplayIndex(win); if (SDL_GetDesktopDisplayMode(window_display, &display_mode) != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } /* if (pg_renderer != NULL) { SDL_RenderGetLogicalSize(pg_renderer, &w, &h); } else */ if (state->using_gl) { p_glViewport = (GL_glViewport_Func)SDL_GL_GetProcAddress("glViewport"); SDL_GL_GetDrawableSize(win, &w, &h); } else { w = display_surface->surf->w; h = display_surface->surf->h; } if (flags & SDL_WINDOW_FULLSCREEN) { /* TOGGLE FULLSCREEN OFF */ if (pg_renderer != NULL) { int scale = 1; int xscale, yscale; xscale = window_w / w; yscale = window_h / h; scale = xscale < yscale ? xscale : yscale; if (scale < 1) { scale = 1; } result = SDL_SetWindowFullscreen(win, 0); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } SDL_SetWindowSize(win, w * scale, h * scale); if (r_info.flags & SDL_RENDERER_SOFTWARE && wm_info.subsystem == SDL_SYSWM_X11) { /* display surface lost? */ SDL_DestroyTexture(pg_texture); SDL_DestroyRenderer(pg_renderer); pg_renderer = SDL_CreateRenderer(win, -1, SDL_RENDERER_SOFTWARE); pg_texture = SDL_CreateTexture(pg_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, w, h); } SDL_RenderSetLogicalSize(pg_renderer, w, h); /* use exact integer scale in windowed mode */ SDL_RenderSetIntegerScale( pg_renderer, !SDL_GetHintBoolean( "SDL_HINT_RENDER_SCALE_QUALITY", SDL_FALSE)); SDL_SetWindowMinimumSize(win, w, h); } else if (state->using_gl) { /* this is literally the only place where state->toggle_windowed_w * should ever be read. We only use it because with GL, there is no * display surface we can query for dimensions. */ result = SDL_SetWindowFullscreen(win, 0); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } SDL_GL_MakeCurrent(win, state->gl_context); if (state->toggle_windowed_w > 0 && state->toggle_windowed_h > 0) { if (state->scaled_gl) { float saved_aspect_ratio = ((float)state->toggle_windowed_w) / (float)state->toggle_windowed_h; float window_aspect_ratio = ((float)display_mode.w) / (float)display_mode.h; if (window_aspect_ratio > saved_aspect_ratio) { int width = (int)(state->toggle_windowed_h * saved_aspect_ratio); p_glViewport((state->toggle_windowed_w - width) / 2, 0, width, state->toggle_windowed_h); } else { p_glViewport(0, 0, state->toggle_windowed_w, (int)(state->toggle_windowed_w / saved_aspect_ratio)); } } else { p_glViewport(0, 0, state->toggle_windowed_w, state->toggle_windowed_h); } } } else if ((flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) { result = SDL_SetWindowFullscreen(win, 0); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } display_surface->surf = SDL_GetWindowSurface(win); } else if (wm_info.subsystem == SDL_SYSWM_X11) { /* This is a HACK, specifically to work around faulty behaviour of * SDL_SetWindowFullscreen on X11 when switching out of fullscreen * would change the physical resolution of the display back to the * desktop resolution in SDL 2.0.8 (unsure about other versions). * The display surface gets messed up, so we re-create the window. * This is only relevant in the non-GL case. */ int wx = SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display); int wy = SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display); if (PyErr_WarnEx(PyExc_Warning, "re-creating window in toggle_fullscreen", 1) != 0) { return NULL; } flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP; /* SDL_WINDOW_FULLSCREEN_DESKTOP includes SDL_WINDOW_FULLSCREEN */ win = SDL_CreateWindow(state->title, wx, wy, w, h, flags); if (win == NULL) { return RAISE(pgExc_SDLError, SDL_GetError()); } else { result = 0; } display_surface->surf = SDL_GetWindowSurface(win); pg_SetDefaultWindow(win); } else { result = SDL_SetWindowFullscreen(win, 0); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } display_surface->surf = SDL_GetWindowSurface(win); } state->toggle_windowed_w = 0; state->toggle_windowed_h = 0; x = state->fullscreen_backup_x; y = state->fullscreen_backup_y; // if the program goes into fullscreen first the "saved // x and y" are "undefined position" that should be // interpreted as a cue to center the window if (x == (int)SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display)) x = SDL_WINDOWPOS_CENTERED_DISPLAY(window_display); if (y == (int)SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display)) y = SDL_WINDOWPOS_CENTERED_DISPLAY(window_display); #if (SDL_VERSION_ATLEAST(2, 0, 5)) SDL_SetWindowResizable(win, flags & SDL_WINDOW_RESIZABLE); #endif SDL_SetWindowBordered(win, (flags & SDL_WINDOW_BORDERLESS) == 0); SDL_SetWindowPosition(win, x, y); } else { /* TOGGLE FULLSCREEN ON */ state->toggle_windowed_w = w; state->toggle_windowed_h = h; state->fullscreen_backup_x = x; state->fullscreen_backup_y = y; if (pg_renderer != NULL) { result = SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (r_info.flags & SDL_RENDERER_SOFTWARE && wm_info.subsystem == SDL_SYSWM_X11) { if (PyErr_WarnEx( PyExc_Warning, "recreating software renderer in toggle_fullscreen", 1) != 0) { return NULL; } /* display surface lost? only on x11? */ SDL_DestroyTexture(pg_texture); SDL_DestroyRenderer(pg_renderer); pg_renderer = SDL_CreateRenderer(win, -1, SDL_RENDERER_SOFTWARE); pg_texture = SDL_CreateTexture(pg_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, w, h); } SDL_RenderSetLogicalSize(pg_renderer, w, h); SDL_RenderSetIntegerScale(pg_renderer, SDL_FALSE); } else if (state->using_gl) { result = SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } SDL_GL_MakeCurrent(win, state->gl_context); if (state->scaled_gl) { float saved_aspect_ratio = ((float)state->scaled_gl_w) / (float)state->scaled_gl_h; float window_aspect_ratio = ((float)display_mode.w) / (float)display_mode.h; if (window_aspect_ratio > saved_aspect_ratio) { int width = (int)(display_mode.h * saved_aspect_ratio); p_glViewport((display_mode.w - width) / 2, 0, width, display_mode.h); } else { p_glViewport(0, 0, display_mode.w, (int)(display_mode.w / saved_aspect_ratio)); } } else { p_glViewport(0, 0, display_mode.w, display_mode.h); } } else if (w == display_mode.w && h == display_mode.h) { result = SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } display_surface->surf = SDL_GetWindowSurface(win); } else if (wm_info.subsystem == SDL_SYSWM_WAYLAND) { if (PyErr_WarnEx(PyExc_Warning, "skipping toggle_fullscreen on wayland", 1) != 0) { return NULL; } return PyLong_FromLong(-1); } else { result = SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } display_surface->surf = SDL_GetWindowSurface(win); if (w != display_surface->surf->w || h != display_surface->surf->h) { int wx = SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display); int wy = SDL_WINDOWPOS_UNDEFINED_DISPLAY(window_display); win = SDL_CreateWindow(state->title, wx, wy, w, h, flags); if (win == NULL) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (0 != SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN)) { return RAISE(pgExc_SDLError, SDL_GetError()); } display_surface->surf = SDL_GetWindowSurface(win); pg_SetDefaultWindow(win); if (PyErr_WarnEx(PyExc_Warning, "re-creating window in toggle_fullscreen", 1) != 0) { return NULL; } return PyLong_FromLong(-1); } } } return PyLong_FromLong(result != 0); } /* This API is provisional, and, not finalised, and should not be documented * in any user-facing docs until we are sure when this is safe to call and when * it should raise an exception */ static PyObject * pg_display_resize_event(PyObject *self, PyObject *event) { /* Call this from your game if you want to use RESIZABLE with SCALED * TODO: Document, handle bad args, bail on FULLSCREEN */ int wnew = PyLong_AsLong(PyObject_GetAttrString(event, "w")); int hnew = PyLong_AsLong(PyObject_GetAttrString(event, "h")); SDL_Window *win = pg_GetDefaultWindow(); int flags; int window_w, window_h, w, h, window_display, result; SDL_DisplayMode display_mode; _DisplayState *state = DISPLAY_MOD_STATE(self); GL_glViewport_Func p_glViewport = NULL; VIDEO_INIT_CHECK(); if (!win) return RAISE(pgExc_SDLError, "No open window"); flags = SDL_GetWindowFlags(win) & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP); if (flags) { return PyLong_FromLong(-1); } // could also take the size of the old display surface SDL_GetWindowSize(win, &window_w, &window_h); window_display = SDL_GetWindowDisplayIndex(win); if (SDL_GetDesktopDisplayMode(window_display, &display_mode) != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } if (state->using_gl) { p_glViewport = (GL_glViewport_Func)SDL_GL_GetProcAddress("glViewport"); SDL_SetWindowSize(win, wnew, hnew); SDL_GL_MakeCurrent(win, state->gl_context); if (state->scaled_gl) { float saved_aspect_ratio = ((float)state->scaled_gl_w) / (float)state->scaled_gl_h; float window_aspect_ratio = ((float)wnew) / (float)hnew; if (window_aspect_ratio > saved_aspect_ratio) { int width = (int)(hnew * saved_aspect_ratio); p_glViewport((wnew - width) / 2, 0, width, hnew); } else { p_glViewport(0, 0, wnew, (int)(wnew / saved_aspect_ratio)); } } else { p_glViewport(0, 0, wnew, hnew); } } else if (pg_renderer != NULL) { SDL_RenderGetLogicalSize(pg_renderer, &w, &h); SDL_SetWindowSize(win, (w > wnew) ? w : wnew, (h > hnew) ? h : hnew); result = SDL_RenderSetLogicalSize(pg_renderer, w, h); if (result != 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } } else { /* do not do anything that would invalidate a display surface! */ return PyLong_FromLong(-1); } Py_RETURN_FALSE; } static PyObject * pg_get_allow_screensaver(PyObject *self) { /* SDL_IsScreenSaverEnabled() unconditionally returns SDL_True if * the video system is not initialized. Therefore we insist on * the video being initialized before calling it. */ VIDEO_INIT_CHECK(); return PyBool_FromLong(SDL_IsScreenSaverEnabled() == SDL_TRUE); } static PyObject * pg_set_allow_screensaver(PyObject *self, PyObject *arg, PyObject *kwargs) { int val = 1; static char *keywords[] = {"value", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "|p", keywords, &val)) { return NULL; } VIDEO_INIT_CHECK(); if (val) { SDL_EnableScreenSaver(); } else { SDL_DisableScreenSaver(); } Py_RETURN_NONE; } static PyMethodDef _pg_display_methods[] = { {"init", (PyCFunction)pg_display_init, METH_NOARGS, DOC_PYGAMEDISPLAYINIT}, {"quit", (PyCFunction)pg_display_quit, METH_NOARGS, DOC_PYGAMEDISPLAYQUIT}, {"get_init", (PyCFunction)pg_get_init, METH_NOARGS, DOC_PYGAMEDISPLAYGETINIT}, {"get_active", (PyCFunction)pg_get_active, METH_NOARGS, DOC_PYGAMEDISPLAYGETACTIVE}, /* { "set_driver", set_driver, 1, doc_set_driver }, */ {"get_driver", (PyCFunction)pg_get_driver, METH_NOARGS, DOC_PYGAMEDISPLAYGETDRIVER}, {"get_wm_info", (PyCFunction)pg_get_wm_info, METH_NOARGS, DOC_PYGAMEDISPLAYGETWMINFO}, {"Info", (PyCFunction)pgInfo, METH_NOARGS, DOC_PYGAMEDISPLAYINFO}, {"get_surface", (PyCFunction)pg_get_surface, METH_NOARGS, DOC_PYGAMEDISPLAYGETSURFACE}, {"get_window_size", (PyCFunction)pg_window_size, METH_NOARGS, DOC_PYGAMEDISPLAYGETWINDOWSIZE}, {"set_mode", (PyCFunction)pg_set_mode, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYSETMODE}, {"mode_ok", (PyCFunction)pg_mode_ok, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYMODEOK}, {"list_modes", (PyCFunction)pg_list_modes, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYLISTMODES}, {"get_num_displays", (PyCFunction)pg_num_displays, METH_NOARGS, DOC_PYGAMEDISPLAYGETNUMDISPLAYS}, {"flip", (PyCFunction)pg_flip, METH_NOARGS, DOC_PYGAMEDISPLAYFLIP}, {"update", (PyCFunction)pg_update, METH_VARARGS, DOC_PYGAMEDISPLAYUPDATE}, {"set_palette", (PyCFunction)pg_set_palette, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYSETPALETTE}, {"set_gamma", pg_set_gamma, METH_VARARGS, DOC_PYGAMEDISPLAYSETGAMMA}, {"set_gamma_ramp", pg_set_gamma_ramp, METH_VARARGS, DOC_PYGAMEDISPLAYSETGAMMARAMP}, {"set_caption", (PyCFunction)pg_set_caption, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYSETCAPTION}, {"get_caption", (PyCFunction)pg_get_caption, METH_NOARGS, DOC_PYGAMEDISPLAYGETCAPTION}, {"set_icon", pg_set_icon, METH_O, DOC_PYGAMEDISPLAYSETICON}, {"iconify", (PyCFunction)pg_iconify, METH_NOARGS, DOC_PYGAMEDISPLAYICONIFY}, {"toggle_fullscreen", (PyCFunction)pg_toggle_fullscreen, METH_NOARGS, DOC_PYGAMEDISPLAYTOGGLEFULLSCREEN}, {"_set_autoresize", (PyCFunction)pg_display_set_autoresize, METH_O, "provisional API, subject to change"}, {"_resize_event", (PyCFunction)pg_display_resize_event, METH_O, "DEPRECATED, never officially supported, kept only for compatibility " "with release candidate"}, {"_get_renderer_info", (PyCFunction)pg_get_scaled_renderer_info, METH_NOARGS, "provisional API, subject to change"}, {"get_desktop_sizes", (PyCFunction)pg_get_desktop_screen_sizes, METH_NOARGS, DOC_PYGAMEDISPLAYGETDESKTOPSIZES}, {"is_fullscreen", (PyCFunction)pg_is_fullscreen, METH_NOARGS, "provisional API, subject to change"}, {"gl_set_attribute", (PyCFunction)pg_gl_set_attribute, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYGLSETATTRIBUTE}, {"gl_get_attribute", (PyCFunction)pg_gl_get_attribute, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYGLGETATTRIBUTE}, {"get_allow_screensaver", (PyCFunction)pg_get_allow_screensaver, METH_NOARGS, DOC_PYGAMEDISPLAYGETALLOWSCREENSAVER}, {"set_allow_screensaver", (PyCFunction)pg_set_allow_screensaver, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDISPLAYSETALLOWSCREENSAVER}, {NULL, NULL, 0, NULL}}; #ifndef PYPY_VERSION static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "display", DOC_PYGAMEDISPLAY, sizeof(_DisplayState), _pg_display_methods, #pragma PG_WARN(At some point should add GC slot functions.) NULL, NULL, NULL, NULL}; #else /* PYPY_VERSION */ static struct PyModuleDef _module = { PyModuleDef_HEAD_INIT, "display", DOC_PYGAMEDISPLAY, -1, /* PyModule_GetState() not implemented */ _pg_display_methods, NULL, NULL, NULL, NULL}; #endif /* PYPY_VERSION */ MODINIT_DEFINE(display) { PyObject *module; _DisplayState *state; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgVidInfo_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } state = DISPLAY_MOD_STATE(module); state->title = NULL; state->icon = NULL; state->gamma_ramp = NULL; state->using_gl = 0; state->auto_resize = SDL_TRUE; return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0601256 pygame-2.6.1/src_c/doc/0000755000175100001770000000000014676242436014263 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0061119 pygame-2.6.1/src_c/doc/README.rst0000644000175100001770000000025614676242340015747 0ustar00runnerdockerThese files are generated from the rst files in docs/reST/ref/ Both the .rst file and the generated .h file should be committed. To generate docs run: python setup.py docs ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.776131 pygame-2.6.1/src_c/doc/bufferproxy_doc.h0000644000175100001770000000217514676242431017634 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEBUFFERPROXY "BufferProxy() -> BufferProxy\npygame object to export a surface buffer through an array protocol" #define DOC_BUFFERPROXYPARENT "parent -> Surface\nparent -> \nReturn wrapped exporting object." #define DOC_BUFFERPROXYLENGTH "length -> int\nThe size, in bytes, of the exported buffer." #define DOC_BUFFERPROXYRAW "raw -> bytes\nA copy of the exported buffer as a single block of bytes." #define DOC_BUFFERPROXYWRITE "write(buffer, offset=0)\nWrite raw bytes to object buffer." /* Docs in a comment... slightly easier to read. */ /* pygame.BufferProxy BufferProxy() -> BufferProxy pygame object to export a surface buffer through an array protocol pygame.BufferProxy.parent parent -> Surface parent -> Return wrapped exporting object. pygame.BufferProxy.length length -> int The size, in bytes, of the exported buffer. pygame.BufferProxy.raw raw -> bytes A copy of the exported buffer as a single block of bytes. pygame.BufferProxy.write write(buffer, offset=0) Write raw bytes to object buffer. */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.8631308 pygame-2.6.1/src_c/doc/camera_doc.h0000644000175100001770000000555214676242431016513 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMECAMERA "pygame module for camera use" #define DOC_PYGAMECAMERAINIT "init(backend = None) -> None\nModule init" #define DOC_PYGAMECAMERAGETBACKENDS "get_backends() -> [str]\nGet the backends supported on this system" #define DOC_PYGAMECAMERACOLORSPACE "colorspace(Surface, format, DestSurface = None) -> Surface\nSurface colorspace conversion" #define DOC_PYGAMECAMERALISTCAMERAS "list_cameras() -> [cameras]\nreturns a list of available cameras" #define DOC_PYGAMECAMERACAMERA "Camera(device, (width, height), format) -> Camera\nload a camera" #define DOC_CAMERASTART "start() -> None\nopens, initializes, and starts capturing" #define DOC_CAMERASTOP "stop() -> None\nstops, uninitializes, and closes the camera" #define DOC_CAMERAGETCONTROLS "get_controls() -> (hflip = bool, vflip = bool, brightness)\ngets current values of user controls" #define DOC_CAMERASETCONTROLS "set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)\nchanges camera settings if supported by the camera" #define DOC_CAMERAGETSIZE "get_size() -> (width, height)\nreturns the dimensions of the images being recorded" #define DOC_CAMERAQUERYIMAGE "query_image() -> bool\nchecks if a frame is ready" #define DOC_CAMERAGETIMAGE "get_image(Surface = None) -> Surface\ncaptures an image as a Surface" #define DOC_CAMERAGETRAW "get_raw() -> bytes\nreturns an unmodified image as bytes" /* Docs in a comment... slightly easier to read. */ /* pygame.camera pygame module for camera use pygame.camera.init init(backend = None) -> None Module init pygame.camera.get_backends get_backends() -> [str] Get the backends supported on this system pygame.camera.colorspace colorspace(Surface, format, DestSurface = None) -> Surface Surface colorspace conversion pygame.camera.list_cameras list_cameras() -> [cameras] returns a list of available cameras pygame.camera.Camera Camera(device, (width, height), format) -> Camera load a camera pygame.camera.Camera.start start() -> None opens, initializes, and starts capturing pygame.camera.Camera.stop stop() -> None stops, uninitializes, and closes the camera pygame.camera.Camera.get_controls get_controls() -> (hflip = bool, vflip = bool, brightness) gets current values of user controls pygame.camera.Camera.set_controls set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness) changes camera settings if supported by the camera pygame.camera.Camera.get_size get_size() -> (width, height) returns the dimensions of the images being recorded pygame.camera.Camera.query_image query_image() -> bool checks if a frame is ready pygame.camera.Camera.get_image get_image(Surface = None) -> Surface captures an image as a Surface pygame.camera.Camera.get_raw get_raw() -> bytes returns an unmodified image as bytes */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.9081306 pygame-2.6.1/src_c/doc/cdrom_doc.h0000644000175100001770000000774614676242431016376 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMECDROM "pygame module for audio cdrom control" #define DOC_PYGAMECDROMINIT "init() -> None\ninitialize the cdrom module" #define DOC_PYGAMECDROMQUIT "quit() -> None\nuninitialize the cdrom module" #define DOC_PYGAMECDROMGETINIT "get_init() -> bool\ntrue if the cdrom module is initialized" #define DOC_PYGAMECDROMGETCOUNT "get_count() -> count\nnumber of cd drives on the system" #define DOC_PYGAMECDROMCD "CD(id) -> CD\nclass to manage a cdrom drive" #define DOC_CDINIT "init() -> None\ninitialize a cdrom drive for use" #define DOC_CDQUIT "quit() -> None\nuninitialize a cdrom drive for use" #define DOC_CDGETINIT "get_init() -> bool\ntrue if this cd device initialized" #define DOC_CDPLAY "play(track, start=None, end=None) -> None\nstart playing audio" #define DOC_CDSTOP "stop() -> None\nstop audio playback" #define DOC_CDPAUSE "pause() -> None\ntemporarily stop audio playback" #define DOC_CDRESUME "resume() -> None\nunpause audio playback" #define DOC_CDEJECT "eject() -> None\neject or open the cdrom drive" #define DOC_CDGETID "get_id() -> id\nthe index of the cdrom drive" #define DOC_CDGETNAME "get_name() -> name\nthe system name of the cdrom drive" #define DOC_CDGETBUSY "get_busy() -> bool\ntrue if the drive is playing audio" #define DOC_CDGETPAUSED "get_paused() -> bool\ntrue if the drive is paused" #define DOC_CDGETCURRENT "get_current() -> track, seconds\nthe current audio playback position" #define DOC_CDGETEMPTY "get_empty() -> bool\nFalse if a cdrom is in the drive" #define DOC_CDGETNUMTRACKS "get_numtracks() -> count\nthe number of tracks on the cdrom" #define DOC_CDGETTRACKAUDIO "get_track_audio(track) -> bool\ntrue if the cdrom track has audio data" #define DOC_CDGETALL "get_all() -> [(audio, start, end, length), ...]\nget all track information" #define DOC_CDGETTRACKSTART "get_track_start(track) -> seconds\nstart time of a cdrom track" #define DOC_CDGETTRACKLENGTH "get_track_length(track) -> seconds\nlength of a cdrom track" /* Docs in a comment... slightly easier to read. */ /* pygame.cdrom pygame module for audio cdrom control pygame.cdrom.init init() -> None initialize the cdrom module pygame.cdrom.quit quit() -> None uninitialize the cdrom module pygame.cdrom.get_init get_init() -> bool true if the cdrom module is initialized pygame.cdrom.get_count get_count() -> count number of cd drives on the system pygame.cdrom.CD CD(id) -> CD class to manage a cdrom drive pygame.cdrom.CD.init init() -> None initialize a cdrom drive for use pygame.cdrom.CD.quit quit() -> None uninitialize a cdrom drive for use pygame.cdrom.CD.get_init get_init() -> bool true if this cd device initialized pygame.cdrom.CD.play play(track, start=None, end=None) -> None start playing audio pygame.cdrom.CD.stop stop() -> None stop audio playback pygame.cdrom.CD.pause pause() -> None temporarily stop audio playback pygame.cdrom.CD.resume resume() -> None unpause audio playback pygame.cdrom.CD.eject eject() -> None eject or open the cdrom drive pygame.cdrom.CD.get_id get_id() -> id the index of the cdrom drive pygame.cdrom.CD.get_name get_name() -> name the system name of the cdrom drive pygame.cdrom.CD.get_busy get_busy() -> bool true if the drive is playing audio pygame.cdrom.CD.get_paused get_paused() -> bool true if the drive is paused pygame.cdrom.CD.get_current get_current() -> track, seconds the current audio playback position pygame.cdrom.CD.get_empty get_empty() -> bool False if a cdrom is in the drive pygame.cdrom.CD.get_numtracks get_numtracks() -> count the number of tracks on the cdrom pygame.cdrom.CD.get_track_audio get_track_audio(track) -> bool true if the cdrom track has audio data pygame.cdrom.CD.get_all get_all() -> [(audio, start, end, length), ...] get all track information pygame.cdrom.CD.get_track_start get_track_start(track) -> seconds start time of a cdrom track pygame.cdrom.CD.get_track_length get_track_length(track) -> seconds length of a cdrom track */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.9621305 pygame-2.6.1/src_c/doc/color_doc.h0000644000175100001770000000624114676242431016375 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMECOLOR "Color(r, g, b) -> Color\nColor(r, g, b, a=255) -> Color\nColor(color_value) -> Color\npygame object for color representations" #define DOC_COLORR "r -> int\nGets or sets the red value of the Color." #define DOC_COLORG "g -> int\nGets or sets the green value of the Color." #define DOC_COLORB "b -> int\nGets or sets the blue value of the Color." #define DOC_COLORA "a -> int\nGets or sets the alpha value of the Color." #define DOC_COLORCMY "cmy -> tuple\nGets or sets the CMY representation of the Color." #define DOC_COLORHSVA "hsva -> tuple\nGets or sets the HSVA representation of the Color." #define DOC_COLORHSLA "hsla -> tuple\nGets or sets the HSLA representation of the Color." #define DOC_COLORI1I2I3 "i1i2i3 -> tuple\nGets or sets the I1I2I3 representation of the Color." #define DOC_COLORNORMALIZE "normalize() -> tuple\nReturns the normalized RGBA values of the Color." #define DOC_COLORCORRECTGAMMA "correct_gamma (gamma) -> Color\nApplies a certain gamma value to the Color." #define DOC_COLORSETLENGTH "set_length(len) -> None\nSet the number of elements in the Color to 1,2,3, or 4." #define DOC_COLORGRAYSCALE "grayscale() -> Color\nreturns the grayscale of a Color" #define DOC_COLORLERP "lerp(Color, float) -> Color\nreturns a linear interpolation to the given Color." #define DOC_COLORPREMULALPHA "premul_alpha() -> Color\nreturns a Color where the r,g,b components have been multiplied by the alpha." #define DOC_COLORUPDATE "update(r, g, b) -> None\nupdate(r, g, b, a=255) -> None\nupdate(color_value) -> None\nSets the elements of the color" /* Docs in a comment... slightly easier to read. */ /* pygame.Color Color(r, g, b) -> Color Color(r, g, b, a=255) -> Color Color(color_value) -> Color pygame object for color representations pygame.Color.r r -> int Gets or sets the red value of the Color. pygame.Color.g g -> int Gets or sets the green value of the Color. pygame.Color.b b -> int Gets or sets the blue value of the Color. pygame.Color.a a -> int Gets or sets the alpha value of the Color. pygame.Color.cmy cmy -> tuple Gets or sets the CMY representation of the Color. pygame.Color.hsva hsva -> tuple Gets or sets the HSVA representation of the Color. pygame.Color.hsla hsla -> tuple Gets or sets the HSLA representation of the Color. pygame.Color.i1i2i3 i1i2i3 -> tuple Gets or sets the I1I2I3 representation of the Color. pygame.Color.normalize normalize() -> tuple Returns the normalized RGBA values of the Color. pygame.Color.correct_gamma correct_gamma (gamma) -> Color Applies a certain gamma value to the Color. pygame.Color.set_length set_length(len) -> None Set the number of elements in the Color to 1,2,3, or 4. pygame.Color.grayscale grayscale() -> Color returns the grayscale of a Color pygame.Color.lerp lerp(Color, float) -> Color returns a linear interpolation to the given Color. pygame.Color.premul_alpha premul_alpha() -> Color returns a Color where the r,g,b components have been multiplied by the alpha. pygame.Color.update update(r, g, b) -> None update(r, g, b, a=255) -> None update(color_value) -> None Sets the elements of the color */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612185.0181305 pygame-2.6.1/src_c/doc/cursors_doc.h0000644000175100001770000000320214676242431016751 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMECURSORS "pygame module for cursor resources" #define DOC_PYGAMECURSORSCOMPILE "compile(strings, black='X', white='.', xor='o') -> data, mask\ncreate binary cursor data from simple strings" #define DOC_PYGAMECURSORSLOADXBM "load_xbm(cursorfile) -> cursor_args\nload_xbm(cursorfile, maskfile) -> cursor_args\nload cursor data from an XBM file" #define DOC_PYGAMECURSORSCURSOR "Cursor(size, hotspot, xormasks, andmasks) -> Cursor\nCursor(hotspot, surface) -> Cursor\nCursor(constant) -> Cursor\nCursor(Cursor) -> Cursor\nCursor() -> Cursor\npygame object representing a cursor" #define DOC_CURSORCOPY "copy() -> Cursor\ncopy the current cursor" #define DOC_CURSORTYPE "type -> string\nGets the cursor type" #define DOC_CURSORDATA "data -> tuple\nGets the cursor data" /* Docs in a comment... slightly easier to read. */ /* pygame.cursors pygame module for cursor resources pygame.cursors.compile compile(strings, black='X', white='.', xor='o') -> data, mask create binary cursor data from simple strings pygame.cursors.load_xbm load_xbm(cursorfile) -> cursor_args load_xbm(cursorfile, maskfile) -> cursor_args load cursor data from an XBM file pygame.cursors.Cursor Cursor(size, hotspot, xormasks, andmasks) -> Cursor Cursor(hotspot, surface) -> Cursor Cursor(constant) -> Cursor Cursor(Cursor) -> Cursor Cursor() -> Cursor pygame object representing a cursor pygame.cursors.Cursor.copy copy() -> Cursor copy the current cursor pygame.cursors.Cursor.type type -> string Gets the cursor type pygame.cursors.Cursor.data data -> tuple Gets the cursor data */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.6371403 pygame-2.6.1/src_c/doc/display_doc.h0000644000175100001770000001443014676242423016724 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEDISPLAY "pygame module to control the display window and screen" #define DOC_PYGAMEDISPLAYINIT "init() -> None\nInitialize the display module" #define DOC_PYGAMEDISPLAYQUIT "quit() -> None\nUninitialize the display module" #define DOC_PYGAMEDISPLAYGETINIT "get_init() -> bool\nReturns True if the display module has been initialized" #define DOC_PYGAMEDISPLAYSETMODE "set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface\nInitialize a window or screen for display" #define DOC_PYGAMEDISPLAYGETSURFACE "get_surface() -> Surface\nGet a reference to the currently set display surface" #define DOC_PYGAMEDISPLAYFLIP "flip() -> None\nUpdate the full display Surface to the screen" #define DOC_PYGAMEDISPLAYUPDATE "update(rectangle=None) -> None\nupdate(rectangle_list) -> None\nUpdate portions of the screen for software displays" #define DOC_PYGAMEDISPLAYGETDRIVER "get_driver() -> name\nGet the name of the pygame display backend" #define DOC_PYGAMEDISPLAYINFO "Info() -> VideoInfo\nCreate a video display information object" #define DOC_PYGAMEDISPLAYGETWMINFO "get_wm_info() -> dict\nGet information about the current windowing system" #define DOC_PYGAMEDISPLAYGETDESKTOPSIZES "get_desktop_sizes() -> list\nGet sizes of active desktops" #define DOC_PYGAMEDISPLAYLISTMODES "list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list\nGet list of available fullscreen modes" #define DOC_PYGAMEDISPLAYMODEOK "mode_ok(size, flags=0, depth=0, display=0) -> depth\nPick the best color depth for a display mode" #define DOC_PYGAMEDISPLAYGLGETATTRIBUTE "gl_get_attribute(flag) -> value\nGet the value for an OpenGL flag for the current display" #define DOC_PYGAMEDISPLAYGLSETATTRIBUTE "gl_set_attribute(flag, value) -> None\nRequest an OpenGL display attribute for the display mode" #define DOC_PYGAMEDISPLAYGETACTIVE "get_active() -> bool\nReturns True when the display is active on the screen" #define DOC_PYGAMEDISPLAYICONIFY "iconify() -> bool\nIconify the display surface" #define DOC_PYGAMEDISPLAYTOGGLEFULLSCREEN "toggle_fullscreen() -> int\nSwitch between fullscreen and windowed displays" #define DOC_PYGAMEDISPLAYSETGAMMA "set_gamma(red, green=None, blue=None) -> bool\nChange the hardware gamma ramps" #define DOC_PYGAMEDISPLAYSETGAMMARAMP "set_gamma_ramp(red, green, blue) -> bool\nChange the hardware gamma ramps with a custom lookup" #define DOC_PYGAMEDISPLAYSETICON "set_icon(Surface) -> None\nChange the system image for the display window" #define DOC_PYGAMEDISPLAYSETCAPTION "set_caption(title, icontitle=None) -> None\nSet the current window caption" #define DOC_PYGAMEDISPLAYGETCAPTION "get_caption() -> (title, icontitle)\nGet the current window caption" #define DOC_PYGAMEDISPLAYSETPALETTE "set_palette(palette=None) -> None\nSet the display color palette for indexed displays" #define DOC_PYGAMEDISPLAYGETNUMDISPLAYS "get_num_displays() -> int\nReturn the number of displays" #define DOC_PYGAMEDISPLAYGETWINDOWSIZE "get_window_size() -> tuple\nReturn the size of the window or screen" #define DOC_PYGAMEDISPLAYGETALLOWSCREENSAVER "get_allow_screensaver() -> bool\nReturn whether the screensaver is allowed to run." #define DOC_PYGAMEDISPLAYSETALLOWSCREENSAVER "set_allow_screensaver(bool) -> None\nSet whether the screensaver may run" /* Docs in a comment... slightly easier to read. */ /* pygame.display pygame module to control the display window and screen pygame.display.init init() -> None Initialize the display module pygame.display.quit quit() -> None Uninitialize the display module pygame.display.get_init get_init() -> bool Returns True if the display module has been initialized pygame.display.set_mode set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface Initialize a window or screen for display pygame.display.get_surface get_surface() -> Surface Get a reference to the currently set display surface pygame.display.flip flip() -> None Update the full display Surface to the screen pygame.display.update update(rectangle=None) -> None update(rectangle_list) -> None Update portions of the screen for software displays pygame.display.get_driver get_driver() -> name Get the name of the pygame display backend pygame.display.Info Info() -> VideoInfo Create a video display information object pygame.display.get_wm_info get_wm_info() -> dict Get information about the current windowing system pygame.display.get_desktop_sizes get_desktop_sizes() -> list Get sizes of active desktops pygame.display.list_modes list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list Get list of available fullscreen modes pygame.display.mode_ok mode_ok(size, flags=0, depth=0, display=0) -> depth Pick the best color depth for a display mode pygame.display.gl_get_attribute gl_get_attribute(flag) -> value Get the value for an OpenGL flag for the current display pygame.display.gl_set_attribute gl_set_attribute(flag, value) -> None Request an OpenGL display attribute for the display mode pygame.display.get_active get_active() -> bool Returns True when the display is active on the screen pygame.display.iconify iconify() -> bool Iconify the display surface pygame.display.toggle_fullscreen toggle_fullscreen() -> int Switch between fullscreen and windowed displays pygame.display.set_gamma set_gamma(red, green=None, blue=None) -> bool Change the hardware gamma ramps pygame.display.set_gamma_ramp set_gamma_ramp(red, green, blue) -> bool Change the hardware gamma ramps with a custom lookup pygame.display.set_icon set_icon(Surface) -> None Change the system image for the display window pygame.display.set_caption set_caption(title, icontitle=None) -> None Set the current window caption pygame.display.get_caption get_caption() -> (title, icontitle) Get the current window caption pygame.display.set_palette set_palette(palette=None) -> None Set the display color palette for indexed displays pygame.display.get_num_displays get_num_displays() -> int Return the number of displays pygame.display.get_window_size get_window_size() -> tuple Return the size of the window or screen pygame.display.get_allow_screensaver get_allow_screensaver() -> bool Return whether the screensaver is allowed to run. pygame.display.set_allow_screensaver set_allow_screensaver(bool) -> None Set whether the screensaver may run */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.7591403 pygame-2.6.1/src_c/doc/draw_doc.h0000644000175100001770000000662214676242423016220 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEDRAW "pygame module for drawing shapes" #define DOC_PYGAMEDRAWRECT "rect(surface, color, rect) -> Rect\nrect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect\ndraw a rectangle" #define DOC_PYGAMEDRAWPOLYGON "polygon(surface, color, points) -> Rect\npolygon(surface, color, points, width=0) -> Rect\ndraw a polygon" #define DOC_PYGAMEDRAWCIRCLE "circle(surface, color, center, radius) -> Rect\ncircle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect\ndraw a circle" #define DOC_PYGAMEDRAWELLIPSE "ellipse(surface, color, rect) -> Rect\nellipse(surface, color, rect, width=0) -> Rect\ndraw an ellipse" #define DOC_PYGAMEDRAWARC "arc(surface, color, rect, start_angle, stop_angle) -> Rect\narc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect\ndraw an elliptical arc" #define DOC_PYGAMEDRAWLINE "line(surface, color, start_pos, end_pos) -> Rect\nline(surface, color, start_pos, end_pos, width=1) -> Rect\ndraw a straight line" #define DOC_PYGAMEDRAWLINES "lines(surface, color, closed, points) -> Rect\nlines(surface, color, closed, points, width=1) -> Rect\ndraw multiple contiguous straight line segments" #define DOC_PYGAMEDRAWAALINE "aaline(surface, color, start_pos, end_pos) -> Rect\naaline(surface, color, start_pos, end_pos, blend=1) -> Rect\ndraw a straight antialiased line" #define DOC_PYGAMEDRAWAALINES "aalines(surface, color, closed, points) -> Rect\naalines(surface, color, closed, points, blend=1) -> Rect\ndraw multiple contiguous straight antialiased line segments" /* Docs in a comment... slightly easier to read. */ /* pygame.draw pygame module for drawing shapes pygame.draw.rect rect(surface, color, rect) -> Rect rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect draw a rectangle pygame.draw.polygon polygon(surface, color, points) -> Rect polygon(surface, color, points, width=0) -> Rect draw a polygon pygame.draw.circle circle(surface, color, center, radius) -> Rect circle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect draw a circle pygame.draw.ellipse ellipse(surface, color, rect) -> Rect ellipse(surface, color, rect, width=0) -> Rect draw an ellipse pygame.draw.arc arc(surface, color, rect, start_angle, stop_angle) -> Rect arc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect draw an elliptical arc pygame.draw.line line(surface, color, start_pos, end_pos) -> Rect line(surface, color, start_pos, end_pos, width=1) -> Rect draw a straight line pygame.draw.lines lines(surface, color, closed, points) -> Rect lines(surface, color, closed, points, width=1) -> Rect draw multiple contiguous straight line segments pygame.draw.aaline aaline(surface, color, start_pos, end_pos) -> Rect aaline(surface, color, start_pos, end_pos, blend=1) -> Rect draw a straight antialiased line pygame.draw.aalines aalines(surface, color, closed, points) -> Rect aalines(surface, color, closed, points, blend=1) -> Rect draw multiple contiguous straight antialiased line segments */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.8391402 pygame-2.6.1/src_c/doc/event_doc.h0000644000175100001770000001105514676242423016400 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEEVENT "pygame module for interacting with events and queues" #define DOC_PYGAMEEVENTPUMP "pump() -> None\ninternally process pygame event handlers" #define DOC_PYGAMEEVENTGET "get(eventtype=None) -> Eventlist\nget(eventtype=None, pump=True) -> Eventlist\nget(eventtype=None, pump=True, exclude=None) -> Eventlist\nget events from the queue" #define DOC_PYGAMEEVENTPOLL "poll() -> Event instance\nget a single event from the queue" #define DOC_PYGAMEEVENTWAIT "wait() -> Event instance\nwait(timeout) -> Event instance\nwait for a single event from the queue" #define DOC_PYGAMEEVENTPEEK "peek(eventtype=None) -> bool\npeek(eventtype=None, pump=True) -> bool\ntest if event types are waiting on the queue" #define DOC_PYGAMEEVENTCLEAR "clear(eventtype=None) -> None\nclear(eventtype=None, pump=True) -> None\nremove all events from the queue" #define DOC_PYGAMEEVENTEVENTNAME "event_name(type) -> string\nget the string name from an event id" #define DOC_PYGAMEEVENTSETBLOCKED "set_blocked(type) -> None\nset_blocked(typelist) -> None\nset_blocked(None) -> None\ncontrol which events are allowed on the queue" #define DOC_PYGAMEEVENTSETALLOWED "set_allowed(type) -> None\nset_allowed(typelist) -> None\nset_allowed(None) -> None\ncontrol which events are allowed on the queue" #define DOC_PYGAMEEVENTGETBLOCKED "get_blocked(type) -> bool\nget_blocked(typelist) -> bool\ntest if a type of event is blocked from the queue" #define DOC_PYGAMEEVENTSETGRAB "set_grab(bool) -> None\ncontrol the sharing of input devices with other applications" #define DOC_PYGAMEEVENTGETGRAB "get_grab() -> bool\ntest if the program is sharing input devices" #define DOC_PYGAMEEVENTSETKEYBOARDGRAB "set_keyboard_grab(bool) -> None\ngrab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key." #define DOC_PYGAMEEVENTGETKEYBOARDGRAB "get_keyboard_grab() -> bool\nget the current keyboard grab state" #define DOC_PYGAMEEVENTPOST "post(Event) -> bool\nplace a new event on the queue" #define DOC_PYGAMEEVENTCUSTOMTYPE "custom_type() -> int\nmake custom user event type" #define DOC_PYGAMEEVENTEVENT "Event(type, dict) -> Event\nEvent(type, **attributes) -> Event\npygame object for representing events" #define DOC_EVENTTYPE "type -> int\nevent type identifier." #define DOC_EVENTDICT "__dict__ -> dict\nevent attribute dictionary" /* Docs in a comment... slightly easier to read. */ /* pygame.event pygame module for interacting with events and queues pygame.event.pump pump() -> None internally process pygame event handlers pygame.event.get get(eventtype=None) -> Eventlist get(eventtype=None, pump=True) -> Eventlist get(eventtype=None, pump=True, exclude=None) -> Eventlist get events from the queue pygame.event.poll poll() -> Event instance get a single event from the queue pygame.event.wait wait() -> Event instance wait(timeout) -> Event instance wait for a single event from the queue pygame.event.peek peek(eventtype=None) -> bool peek(eventtype=None, pump=True) -> bool test if event types are waiting on the queue pygame.event.clear clear(eventtype=None) -> None clear(eventtype=None, pump=True) -> None remove all events from the queue pygame.event.event_name event_name(type) -> string get the string name from an event id pygame.event.set_blocked set_blocked(type) -> None set_blocked(typelist) -> None set_blocked(None) -> None control which events are allowed on the queue pygame.event.set_allowed set_allowed(type) -> None set_allowed(typelist) -> None set_allowed(None) -> None control which events are allowed on the queue pygame.event.get_blocked get_blocked(type) -> bool get_blocked(typelist) -> bool test if a type of event is blocked from the queue pygame.event.set_grab set_grab(bool) -> None control the sharing of input devices with other applications pygame.event.get_grab get_grab() -> bool test if the program is sharing input devices pygame.event.set_keyboard_grab set_keyboard_grab(bool) -> None grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. pygame.event.get_keyboard_grab get_keyboard_grab() -> bool get the current keyboard grab state pygame.event.post post(Event) -> bool place a new event on the queue pygame.event.custom_type custom_type() -> int make custom user event type pygame.event.Event Event(type, dict) -> Event Event(type, **attributes) -> Event pygame object for representing events pygame.event.Event.type type -> int event type identifier. pygame.event.Event.__dict__ __dict__ -> dict event attribute dictionary */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9041402 pygame-2.6.1/src_c/doc/examples_doc.h0000644000175100001770000001403414676242423017075 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEEXAMPLES "module of example programs" #define DOC_PYGAMEEXAMPLESALIENSMAIN "aliens.main() -> None\nplay the full aliens example" #define DOC_PYGAMEEXAMPLESSTARSMAIN "stars.main() -> None\nrun a simple starfield example" #define DOC_PYGAMEEXAMPLESCHIMPMAIN "chimp.main() -> None\nhit the moving chimp" #define DOC_PYGAMEEXAMPLESMOVEITMAIN "moveit.main() -> None\ndisplay animated objects on the screen" #define DOC_PYGAMEEXAMPLESFONTYMAIN "fonty.main() -> None\nrun a font rendering example" #define DOC_PYGAMEEXAMPLESFREETYPEMISCMAIN "freetype_misc.main() -> None\nrun a FreeType rendering example" #define DOC_PYGAMEEXAMPLESVGRADEMAIN "vgrade.main() -> None\ndisplay a vertical gradient" #define DOC_PYGAMEEXAMPLESEVENTLISTMAIN "eventlist.main() -> None\ndisplay pygame events" #define DOC_PYGAMEEXAMPLESARRAYDEMOMAIN "arraydemo.main(arraytype=None) -> None\nshow various surfarray effects" #define DOC_PYGAMEEXAMPLESSOUNDMAIN "sound.main(file_path=None) -> None\nload and play a sound" #define DOC_PYGAMEEXAMPLESSOUNDARRAYDEMOSMAIN "sound_array_demos.main(arraytype=None) -> None\nplay various sndarray effects" #define DOC_PYGAMEEXAMPLESLIQUIDMAIN "liquid.main() -> None\ndisplay an animated liquid effect" #define DOC_PYGAMEEXAMPLESGLCUBEMAIN "glcube.main() -> None\ndisplay an animated 3D cube using OpenGL" #define DOC_PYGAMEEXAMPLESSCRAPCLIPBOARDMAIN "scrap_clipboard.main() -> None\naccess the clipboard" #define DOC_PYGAMEEXAMPLESMASKMAIN "mask.main(*args) -> None\ndisplay multiple images bounce off each other using collision detection" #define DOC_PYGAMEEXAMPLESTESTSPRITEMAIN "testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None\nshow lots of sprites moving around" #define DOC_PYGAMEEXAMPLESHEADLESSNOWINDOWSNEEDEDMAIN "headless_no_windows_needed.main(fin, fout, w, h) -> None\nwrite an image file that is smoothscaled copy of an input file" #define DOC_PYGAMEEXAMPLESJOYSTICKMAIN "joystick.main() -> None\ndemonstrate joystick functionality" #define DOC_PYGAMEEXAMPLESBLENDFILLMAIN "blend_fill.main() -> None\ndemonstrate the various surface.fill method blend options" #define DOC_PYGAMEEXAMPLESBLITBLENDSMAIN "blit_blends.main() -> None\nuses alternative additive fill to that of surface.fill" #define DOC_PYGAMEEXAMPLESCURSORSMAIN "cursors.main() -> None\ndisplay two different custom cursors" #define DOC_PYGAMEEXAMPLESPIXELARRAYMAIN "pixelarray.main() -> None\ndisplay various pixelarray generated effects" #define DOC_PYGAMEEXAMPLESSCALETESTMAIN "scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None\ninteractively scale an image using smoothscale" #define DOC_PYGAMEEXAMPLESMIDIMAIN "midi.main(mode='output', device_id=None) -> None\nrun a midi example" #define DOC_PYGAMEEXAMPLESSCROLLMAIN "scroll.main(image_file=None) -> None\nrun a Surface.scroll example that shows a magnified image" #define DOC_PYGAMEEXAMPLESCAMERAMAIN "camera.main() -> None\ndisplay video captured live from an attached camera" #define DOC_PYGAMEEXAMPLESPLAYMUSMAIN "playmus.main(file_path) -> None\nplay an audio file" /* Docs in a comment... slightly easier to read. */ /* pygame.examples module of example programs pygame.examples.aliens.main aliens.main() -> None play the full aliens example pygame.examples.stars.main stars.main() -> None run a simple starfield example pygame.examples.chimp.main chimp.main() -> None hit the moving chimp pygame.examples.moveit.main moveit.main() -> None display animated objects on the screen pygame.examples.fonty.main fonty.main() -> None run a font rendering example pygame.examples.freetype_misc.main freetype_misc.main() -> None run a FreeType rendering example pygame.examples.vgrade.main vgrade.main() -> None display a vertical gradient pygame.examples.eventlist.main eventlist.main() -> None display pygame events pygame.examples.arraydemo.main arraydemo.main(arraytype=None) -> None show various surfarray effects pygame.examples.sound.main sound.main(file_path=None) -> None load and play a sound pygame.examples.sound_array_demos.main sound_array_demos.main(arraytype=None) -> None play various sndarray effects pygame.examples.liquid.main liquid.main() -> None display an animated liquid effect pygame.examples.glcube.main glcube.main() -> None display an animated 3D cube using OpenGL pygame.examples.scrap_clipboard.main scrap_clipboard.main() -> None access the clipboard pygame.examples.mask.main mask.main(*args) -> None display multiple images bounce off each other using collision detection pygame.examples.testsprite.main testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None show lots of sprites moving around pygame.examples.headless_no_windows_needed.main headless_no_windows_needed.main(fin, fout, w, h) -> None write an image file that is smoothscaled copy of an input file pygame.examples.joystick.main joystick.main() -> None demonstrate joystick functionality pygame.examples.blend_fill.main blend_fill.main() -> None demonstrate the various surface.fill method blend options pygame.examples.blit_blends.main blit_blends.main() -> None uses alternative additive fill to that of surface.fill pygame.examples.cursors.main cursors.main() -> None display two different custom cursors pygame.examples.pixelarray.main pixelarray.main() -> None display various pixelarray generated effects pygame.examples.scaletest.main scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None interactively scale an image using smoothscale pygame.examples.midi.main midi.main(mode='output', device_id=None) -> None run a midi example pygame.examples.scroll.main scroll.main(image_file=None) -> None run a Surface.scroll example that shows a magnified image pygame.examples.camera.main camera.main() -> None display video captured live from an attached camera pygame.examples.playmus.main playmus.main(file_path) -> None play an audio file */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9241402 pygame-2.6.1/src_c/doc/fastevent_doc.h0000644000175100001770000000261114676242423017254 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEFASTEVENT "pygame module for interacting with events and queues" #define DOC_PYGAMEFASTEVENTINIT "init() -> None\ninitialize pygame.fastevent" #define DOC_PYGAMEFASTEVENTGETINIT "get_init() -> bool\nreturns True if the fastevent module is currently initialized" #define DOC_PYGAMEFASTEVENTPUMP "pump() -> None\ninternally process pygame event handlers" #define DOC_PYGAMEFASTEVENTWAIT "wait() -> Event\nwait for an event" #define DOC_PYGAMEFASTEVENTPOLL "poll() -> Event\nget an available event" #define DOC_PYGAMEFASTEVENTGET "get() -> list of Events\nget all events from the queue" #define DOC_PYGAMEFASTEVENTPOST "post(Event) -> None\nplace an event on the queue" /* Docs in a comment... slightly easier to read. */ /* pygame.fastevent pygame module for interacting with events and queues pygame.fastevent.init init() -> None initialize pygame.fastevent pygame.fastevent.get_init get_init() -> bool returns True if the fastevent module is currently initialized pygame.fastevent.pump pump() -> None internally process pygame event handlers pygame.fastevent.wait wait() -> Event wait for an event pygame.fastevent.poll poll() -> Event get an available event pygame.fastevent.get get() -> list of Events get all events from the queue pygame.fastevent.post post(Event) -> None place an event on the queue */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612178.9841402 pygame-2.6.1/src_c/doc/font_doc.h0000644000175100001770000001401314676242423016222 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEFONT "pygame module for loading and rendering fonts" #define DOC_PYGAMEFONTINIT "init() -> None\ninitialize the font module" #define DOC_PYGAMEFONTQUIT "quit() -> None\nuninitialize the font module" #define DOC_PYGAMEFONTGETINIT "get_init() -> bool\ntrue if the font module is initialized" #define DOC_PYGAMEFONTGETDEFAULTFONT "get_default_font() -> string\nget the filename of the default font" #define DOC_PYGAMEFONTGETSDLTTFVERSION "get_sdl_ttf_version(linked=True) -> (major, minor, patch)\ngets SDL_ttf version" #define DOC_PYGAMEFONTGETFONTS "get_fonts() -> list of strings\nget all available fonts" #define DOC_PYGAMEFONTMATCHFONT "match_font(name, bold=False, italic=False) -> path\nfind a specific font on the system" #define DOC_PYGAMEFONTSYSFONT "SysFont(name, size, bold=False, italic=False) -> Font\ncreate a Font object from the system fonts" #define DOC_PYGAMEFONTFONT "Font(file_path=None, size=12) -> Font\nFont(file_path, size) -> Font\nFont(pathlib.Path, size) -> Font\nFont(object, size) -> Font\ncreate a new Font object from a file" #define DOC_FONTBOLD "bold -> bool\nGets or sets whether the font should be rendered in (faked) bold." #define DOC_FONTITALIC "italic -> bool\nGets or sets whether the font should be rendered in (faked) italics." #define DOC_FONTUNDERLINE "underline -> bool\nGets or sets whether the font should be rendered with an underline." #define DOC_FONTSTRIKETHROUGH "strikethrough -> bool\nGets or sets whether the font should be rendered with a strikethrough." #define DOC_FONTRENDER "render(text, antialias, color, background=None) -> Surface\ndraw text on a new Surface" #define DOC_FONTSIZE "size(text) -> (width, height)\ndetermine the amount of space needed to render text" #define DOC_FONTSETUNDERLINE "set_underline(bool) -> None\ncontrol if text is rendered with an underline" #define DOC_FONTGETUNDERLINE "get_underline() -> bool\ncheck if text will be rendered with an underline" #define DOC_FONTSETSTRIKETHROUGH "set_strikethrough(bool) -> None\ncontrol if text is rendered with a strikethrough" #define DOC_FONTGETSTRIKETHROUGH "get_strikethrough() -> bool\ncheck if text will be rendered with a strikethrough" #define DOC_FONTSETBOLD "set_bold(bool) -> None\nenable fake rendering of bold text" #define DOC_FONTGETBOLD "get_bold() -> bool\ncheck if text will be rendered bold" #define DOC_FONTSETITALIC "set_italic(bool) -> None\nenable fake rendering of italic text" #define DOC_FONTMETRICS "metrics(text) -> list\ngets the metrics for each character in the passed string" #define DOC_FONTGETITALIC "get_italic() -> bool\ncheck if the text will be rendered italic" #define DOC_FONTGETLINESIZE "get_linesize() -> int\nget the line space of the font text" #define DOC_FONTGETHEIGHT "get_height() -> int\nget the height of the font" #define DOC_FONTGETASCENT "get_ascent() -> int\nget the ascent of the font" #define DOC_FONTGETDESCENT "get_descent() -> int\nget the descent of the font" #define DOC_FONTSETSCRIPT "set_script(str) -> None\nset the script code for text shaping" /* Docs in a comment... slightly easier to read. */ /* pygame.font pygame module for loading and rendering fonts pygame.font.init init() -> None initialize the font module pygame.font.quit quit() -> None uninitialize the font module pygame.font.get_init get_init() -> bool true if the font module is initialized pygame.font.get_default_font get_default_font() -> string get the filename of the default font pygame.font.get_sdl_ttf_version get_sdl_ttf_version(linked=True) -> (major, minor, patch) gets SDL_ttf version pygame.font.get_fonts get_fonts() -> list of strings get all available fonts pygame.font.match_font match_font(name, bold=False, italic=False) -> path find a specific font on the system pygame.font.SysFont SysFont(name, size, bold=False, italic=False) -> Font create a Font object from the system fonts pygame.font.Font Font(file_path=None, size=12) -> Font Font(file_path, size) -> Font Font(pathlib.Path, size) -> Font Font(object, size) -> Font create a new Font object from a file pygame.font.Font.bold bold -> bool Gets or sets whether the font should be rendered in (faked) bold. pygame.font.Font.italic italic -> bool Gets or sets whether the font should be rendered in (faked) italics. pygame.font.Font.underline underline -> bool Gets or sets whether the font should be rendered with an underline. pygame.font.Font.strikethrough strikethrough -> bool Gets or sets whether the font should be rendered with a strikethrough. pygame.font.Font.render render(text, antialias, color, background=None) -> Surface draw text on a new Surface pygame.font.Font.size size(text) -> (width, height) determine the amount of space needed to render text pygame.font.Font.set_underline set_underline(bool) -> None control if text is rendered with an underline pygame.font.Font.get_underline get_underline() -> bool check if text will be rendered with an underline pygame.font.Font.set_strikethrough set_strikethrough(bool) -> None control if text is rendered with a strikethrough pygame.font.Font.get_strikethrough get_strikethrough() -> bool check if text will be rendered with a strikethrough pygame.font.Font.set_bold set_bold(bool) -> None enable fake rendering of bold text pygame.font.Font.get_bold get_bold() -> bool check if text will be rendered bold pygame.font.Font.set_italic set_italic(bool) -> None enable fake rendering of italic text pygame.font.Font.metrics metrics(text) -> list gets the metrics for each character in the passed string pygame.font.Font.get_italic get_italic() -> bool check if the text will be rendered italic pygame.font.Font.get_linesize get_linesize() -> int get the line space of the font text pygame.font.Font.get_height get_height() -> int get the height of the font pygame.font.Font.get_ascent get_ascent() -> int get the ascent of the font pygame.font.Font.get_descent get_descent() -> int get the descent of the font pygame.font.Font.set_script set_script(str) -> None set the script code for text shaping */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.0891402 pygame-2.6.1/src_c/doc/freetype_doc.h0000644000175100001770000002466014676242423017110 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEFREETYPE "Enhanced pygame module for loading and rendering computer fonts" #define DOC_PYGAMEFREETYPEGETERROR "get_error() -> str\nget_error() -> None\nReturn the latest FreeType error" #define DOC_PYGAMEFREETYPEGETVERSION "get_version(linked=True) -> (int, int, int)\nReturn the FreeType version" #define DOC_PYGAMEFREETYPEINIT "init(cache_size=64, resolution=72) -> None\nInitialize the underlying FreeType library." #define DOC_PYGAMEFREETYPEQUIT "quit() -> None\nShut down the underlying FreeType library." #define DOC_PYGAMEFREETYPEGETINIT "get_init() -> bool\nReturns True if the FreeType module is currently initialized." #define DOC_PYGAMEFREETYPEWASINIT "was_init() -> bool\nDEPRECATED: Use get_init() instead." #define DOC_PYGAMEFREETYPEGETCACHESIZE "get_cache_size() -> long\nReturn the glyph case size" #define DOC_PYGAMEFREETYPEGETDEFAULTRESOLUTION "get_default_resolution() -> long\nReturn the default pixel size in dots per inch" #define DOC_PYGAMEFREETYPESETDEFAULTRESOLUTION "set_default_resolution([resolution])\nSet the default pixel size in dots per inch for the module" #define DOC_PYGAMEFREETYPESYSFONT "SysFont(name, size, bold=False, italic=False) -> Font\ncreate a Font object from the system fonts" #define DOC_PYGAMEFREETYPEGETDEFAULTFONT "get_default_font() -> string\nGet the filename of the default font" #define DOC_PYGAMEFREETYPEFONT "Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font\nFont(pathlib.Path) -> Font\nCreate a new Font instance from a supported font file." #define DOC_FONTNAME "name -> string\nProper font name." #define DOC_FONTPATH "path -> unicode\nFont file path" #define DOC_FONTSIZE "size -> float\nsize -> (float, float)\nThe default point size used in rendering" #define DOC_FONTGETRECT "get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect\nReturn the size and offset of rendered text" #define DOC_FONTGETMETRICS "get_metrics(text, size=0) -> [(...), ...]\nReturn the glyph metrics for the given text" #define DOC_FONTHEIGHT "height -> int\nThe unscaled height of the font in font units" #define DOC_FONTASCENDER "ascender -> int\nThe unscaled ascent of the font in font units" #define DOC_FONTDESCENDER "descender -> int\nThe unscaled descent of the font in font units" #define DOC_FONTGETSIZEDASCENDER "get_sized_ascender(=0) -> int\nThe scaled ascent of the font in pixels" #define DOC_FONTGETSIZEDDESCENDER "get_sized_descender(=0) -> int\nThe scaled descent of the font in pixels" #define DOC_FONTGETSIZEDHEIGHT "get_sized_height(=0) -> int\nThe scaled height of the font in pixels" #define DOC_FONTGETSIZEDGLYPHHEIGHT "get_sized_glyph_height(=0) -> int\nThe scaled bounding box height of the font in pixels" #define DOC_FONTGETSIZES "get_sizes() -> [(int, int, int, float, float), ...]\nget_sizes() -> []\nreturn the available sizes of embedded bitmaps" #define DOC_FONTRENDER "render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)\nReturn rendered text as a surface" #define DOC_FONTRENDERTO "render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect\nRender text onto an existing surface" #define DOC_FONTRENDERRAW "render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))\nReturn rendered text as a string of bytes" #define DOC_FONTRENDERRAWTO "render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect\nRender text into an array of ints" #define DOC_FONTSTYLE "style -> int\nThe font's style flags" #define DOC_FONTUNDERLINE "underline -> bool\nThe state of the font's underline style flag" #define DOC_FONTSTRONG "strong -> bool\nThe state of the font's strong style flag" #define DOC_FONTOBLIQUE "oblique -> bool\nThe state of the font's oblique style flag" #define DOC_FONTWIDE "wide -> bool\nThe state of the font's wide style flag" #define DOC_FONTSTRENGTH "strength -> float\nThe strength associated with the strong or wide font styles" #define DOC_FONTUNDERLINEADJUSTMENT "underline_adjustment -> float\nAdjustment factor for the underline position" #define DOC_FONTFIXEDWIDTH "fixed_width -> bool\nGets whether the font is fixed-width" #define DOC_FONTFIXEDSIZES "fixed_sizes -> int\nthe number of available bitmap sizes for the font" #define DOC_FONTSCALABLE "scalable -> bool\nGets whether the font is scalable" #define DOC_FONTUSEBITMAPSTRIKES "use_bitmap_strikes -> bool\nallow the use of embedded bitmaps in an outline font file" #define DOC_FONTANTIALIASED "antialiased -> bool\nFont anti-aliasing mode" #define DOC_FONTKERNING "kerning -> bool\nCharacter kerning mode" #define DOC_FONTVERTICAL "vertical -> bool\nFont vertical mode" #define DOC_FONTROTATION "rotation -> int\ntext rotation in degrees counterclockwise" #define DOC_FONTFGCOLOR "fgcolor -> Color\ndefault foreground color" #define DOC_FONTBGCOLOR "bgcolor -> Color\ndefault background color" #define DOC_FONTORIGIN "origin -> bool\nFont render to text origin mode" #define DOC_FONTPAD "pad -> bool\npadded boundary mode" #define DOC_FONTUCS4 "ucs4 -> bool\nEnable UCS-4 mode" #define DOC_FONTRESOLUTION "resolution -> int\nPixel resolution in dots per inch" /* Docs in a comment... slightly easier to read. */ /* pygame.freetype Enhanced pygame module for loading and rendering computer fonts pygame.freetype.get_error get_error() -> str get_error() -> None Return the latest FreeType error pygame.freetype.get_version get_version(linked=True) -> (int, int, int) Return the FreeType version pygame.freetype.init init(cache_size=64, resolution=72) -> None Initialize the underlying FreeType library. pygame.freetype.quit quit() -> None Shut down the underlying FreeType library. pygame.freetype.get_init get_init() -> bool Returns True if the FreeType module is currently initialized. pygame.freetype.was_init was_init() -> bool DEPRECATED: Use get_init() instead. pygame.freetype.get_cache_size get_cache_size() -> long Return the glyph case size pygame.freetype.get_default_resolution get_default_resolution() -> long Return the default pixel size in dots per inch pygame.freetype.set_default_resolution set_default_resolution([resolution]) Set the default pixel size in dots per inch for the module pygame.freetype.SysFont SysFont(name, size, bold=False, italic=False) -> Font create a Font object from the system fonts pygame.freetype.get_default_font get_default_font() -> string Get the filename of the default font pygame.freetype.Font Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font Font(pathlib.Path) -> Font Create a new Font instance from a supported font file. pygame.freetype.Font.name name -> string Proper font name. pygame.freetype.Font.path path -> unicode Font file path pygame.freetype.Font.size size -> float size -> (float, float) The default point size used in rendering pygame.freetype.Font.get_rect get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect Return the size and offset of rendered text pygame.freetype.Font.get_metrics get_metrics(text, size=0) -> [(...), ...] Return the glyph metrics for the given text pygame.freetype.Font.height height -> int The unscaled height of the font in font units pygame.freetype.Font.ascender ascender -> int The unscaled ascent of the font in font units pygame.freetype.Font.descender descender -> int The unscaled descent of the font in font units pygame.freetype.Font.get_sized_ascender get_sized_ascender(=0) -> int The scaled ascent of the font in pixels pygame.freetype.Font.get_sized_descender get_sized_descender(=0) -> int The scaled descent of the font in pixels pygame.freetype.Font.get_sized_height get_sized_height(=0) -> int The scaled height of the font in pixels pygame.freetype.Font.get_sized_glyph_height get_sized_glyph_height(=0) -> int The scaled bounding box height of the font in pixels pygame.freetype.Font.get_sizes get_sizes() -> [(int, int, int, float, float), ...] get_sizes() -> [] return the available sizes of embedded bitmaps pygame.freetype.Font.render render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect) Return rendered text as a surface pygame.freetype.Font.render_to render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect Render text onto an existing surface pygame.freetype.Font.render_raw render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int)) Return rendered text as a string of bytes pygame.freetype.Font.render_raw_to render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect Render text into an array of ints pygame.freetype.Font.style style -> int The font's style flags pygame.freetype.Font.underline underline -> bool The state of the font's underline style flag pygame.freetype.Font.strong strong -> bool The state of the font's strong style flag pygame.freetype.Font.oblique oblique -> bool The state of the font's oblique style flag pygame.freetype.Font.wide wide -> bool The state of the font's wide style flag pygame.freetype.Font.strength strength -> float The strength associated with the strong or wide font styles pygame.freetype.Font.underline_adjustment underline_adjustment -> float Adjustment factor for the underline position pygame.freetype.Font.fixed_width fixed_width -> bool Gets whether the font is fixed-width pygame.freetype.Font.fixed_sizes fixed_sizes -> int the number of available bitmap sizes for the font pygame.freetype.Font.scalable scalable -> bool Gets whether the font is scalable pygame.freetype.Font.use_bitmap_strikes use_bitmap_strikes -> bool allow the use of embedded bitmaps in an outline font file pygame.freetype.Font.antialiased antialiased -> bool Font anti-aliasing mode pygame.freetype.Font.kerning kerning -> bool Character kerning mode pygame.freetype.Font.vertical vertical -> bool Font vertical mode pygame.freetype.Font.rotation rotation -> int text rotation in degrees counterclockwise pygame.freetype.Font.fgcolor fgcolor -> Color default foreground color pygame.freetype.Font.bgcolor bgcolor -> Color default background color pygame.freetype.Font.origin origin -> bool Font render to text origin mode pygame.freetype.Font.pad pad -> bool padded boundary mode pygame.freetype.Font.ucs4 ucs4 -> bool Enable UCS-4 mode pygame.freetype.Font.resolution resolution -> int Pixel resolution in dots per inch */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.2301402 pygame-2.6.1/src_c/doc/gfxdraw_doc.h0000644000175100001770000001102414676242423016715 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEGFXDRAW "pygame module for drawing shapes" #define DOC_PYGAMEGFXDRAWPIXEL "pixel(surface, x, y, color) -> None\ndraw a pixel" #define DOC_PYGAMEGFXDRAWHLINE "hline(surface, x1, x2, y, color) -> None\ndraw a horizontal line" #define DOC_PYGAMEGFXDRAWVLINE "vline(surface, x, y1, y2, color) -> None\ndraw a vertical line" #define DOC_PYGAMEGFXDRAWLINE "line(surface, x1, y1, x2, y2, color) -> None\ndraw a line" #define DOC_PYGAMEGFXDRAWRECTANGLE "rectangle(surface, rect, color) -> None\ndraw a rectangle" #define DOC_PYGAMEGFXDRAWBOX "box(surface, rect, color) -> None\ndraw a filled rectangle" #define DOC_PYGAMEGFXDRAWCIRCLE "circle(surface, x, y, r, color) -> None\ndraw a circle" #define DOC_PYGAMEGFXDRAWAACIRCLE "aacircle(surface, x, y, r, color) -> None\ndraw an antialiased circle" #define DOC_PYGAMEGFXDRAWFILLEDCIRCLE "filled_circle(surface, x, y, r, color) -> None\ndraw a filled circle" #define DOC_PYGAMEGFXDRAWELLIPSE "ellipse(surface, x, y, rx, ry, color) -> None\ndraw an ellipse" #define DOC_PYGAMEGFXDRAWAAELLIPSE "aaellipse(surface, x, y, rx, ry, color) -> None\ndraw an antialiased ellipse" #define DOC_PYGAMEGFXDRAWFILLEDELLIPSE "filled_ellipse(surface, x, y, rx, ry, color) -> None\ndraw a filled ellipse" #define DOC_PYGAMEGFXDRAWARC "arc(surface, x, y, r, start_angle, stop_angle, color) -> None\ndraw an arc" #define DOC_PYGAMEGFXDRAWPIE "pie(surface, x, y, r, start_angle, stop_angle, color) -> None\ndraw a pie" #define DOC_PYGAMEGFXDRAWTRIGON "trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None\ndraw a trigon/triangle" #define DOC_PYGAMEGFXDRAWAATRIGON "aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None\ndraw an antialiased trigon/triangle" #define DOC_PYGAMEGFXDRAWFILLEDTRIGON "filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None\ndraw a filled trigon/triangle" #define DOC_PYGAMEGFXDRAWPOLYGON "polygon(surface, points, color) -> None\ndraw a polygon" #define DOC_PYGAMEGFXDRAWAAPOLYGON "aapolygon(surface, points, color) -> None\ndraw an antialiased polygon" #define DOC_PYGAMEGFXDRAWFILLEDPOLYGON "filled_polygon(surface, points, color) -> None\ndraw a filled polygon" #define DOC_PYGAMEGFXDRAWTEXTUREDPOLYGON "textured_polygon(surface, points, texture, tx, ty) -> None\ndraw a textured polygon" #define DOC_PYGAMEGFXDRAWBEZIER "bezier(surface, points, steps, color) -> None\ndraw a Bezier curve" /* Docs in a comment... slightly easier to read. */ /* pygame.gfxdraw pygame module for drawing shapes pygame.gfxdraw.pixel pixel(surface, x, y, color) -> None draw a pixel pygame.gfxdraw.hline hline(surface, x1, x2, y, color) -> None draw a horizontal line pygame.gfxdraw.vline vline(surface, x, y1, y2, color) -> None draw a vertical line pygame.gfxdraw.line line(surface, x1, y1, x2, y2, color) -> None draw a line pygame.gfxdraw.rectangle rectangle(surface, rect, color) -> None draw a rectangle pygame.gfxdraw.box box(surface, rect, color) -> None draw a filled rectangle pygame.gfxdraw.circle circle(surface, x, y, r, color) -> None draw a circle pygame.gfxdraw.aacircle aacircle(surface, x, y, r, color) -> None draw an antialiased circle pygame.gfxdraw.filled_circle filled_circle(surface, x, y, r, color) -> None draw a filled circle pygame.gfxdraw.ellipse ellipse(surface, x, y, rx, ry, color) -> None draw an ellipse pygame.gfxdraw.aaellipse aaellipse(surface, x, y, rx, ry, color) -> None draw an antialiased ellipse pygame.gfxdraw.filled_ellipse filled_ellipse(surface, x, y, rx, ry, color) -> None draw a filled ellipse pygame.gfxdraw.arc arc(surface, x, y, r, start_angle, stop_angle, color) -> None draw an arc pygame.gfxdraw.pie pie(surface, x, y, r, start_angle, stop_angle, color) -> None draw a pie pygame.gfxdraw.trigon trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None draw a trigon/triangle pygame.gfxdraw.aatrigon aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None draw an antialiased trigon/triangle pygame.gfxdraw.filled_trigon filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None draw a filled trigon/triangle pygame.gfxdraw.polygon polygon(surface, points, color) -> None draw a polygon pygame.gfxdraw.aapolygon aapolygon(surface, points, color) -> None draw an antialiased polygon pygame.gfxdraw.filled_polygon filled_polygon(surface, points, color) -> None draw a filled polygon pygame.gfxdraw.textured_polygon textured_polygon(surface, points, texture, tx, ty) -> None draw a textured polygon pygame.gfxdraw.bezier bezier(surface, points, steps, color) -> None draw a Bezier curve */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.2771401 pygame-2.6.1/src_c/doc/image_doc.h0000644000175100001770000000672414676242423016350 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEIMAGE "pygame module for image transfer" #define DOC_PYGAMEIMAGELOAD "load(filename) -> Surface\nload(fileobj, namehint="") -> Surface\nload new image from a file (or file-like object)" #define DOC_PYGAMEIMAGESAVE "save(Surface, filename) -> None\nsave(Surface, fileobj, namehint="") -> None\nsave an image to file (or file-like object)" #define DOC_PYGAMEIMAGEGETSDLIMAGEVERSION "get_sdl_image_version(linked=True) -> None\nget_sdl_image_version(linked=True) -> (major, minor, patch)\nget version number of the SDL_Image library being used" #define DOC_PYGAMEIMAGEGETEXTENDED "get_extended() -> bool\ntest if extended image formats can be loaded" #define DOC_PYGAMEIMAGETOSTRING "tostring(Surface, format, flipped=False) -> bytes\ntransfer image to byte buffer" #define DOC_PYGAMEIMAGETOBYTES "tobytes(Surface, format, flipped=False) -> bytes\ntransfer image to byte buffer" #define DOC_PYGAMEIMAGEFROMSTRING "fromstring(bytes, size, format, flipped=False) -> Surface\ncreate new Surface from a byte buffer" #define DOC_PYGAMEIMAGEFROMBYTES "frombytes(bytes, size, format, flipped=False) -> Surface\ncreate new Surface from a byte buffer" #define DOC_PYGAMEIMAGEFROMBUFFER "frombuffer(buffer, size, format) -> Surface\ncreate a new Surface that shares data inside a bytes buffer" #define DOC_PYGAMEIMAGELOADBASIC "load_basic(file) -> Surface\nload new BMP image from a file (or file-like object)" #define DOC_PYGAMEIMAGELOADEXTENDED "load_extended(filename) -> Surface\nload_extended(fileobj, namehint="") -> Surface\nload an image from a file (or file-like object)" #define DOC_PYGAMEIMAGESAVEEXTENDED "save_extended(Surface, filename) -> None\nsave_extended(Surface, fileobj, namehint="") -> None\nsave a png/jpg image to file (or file-like object)" /* Docs in a comment... slightly easier to read. */ /* pygame.image pygame module for image transfer pygame.image.load load(filename) -> Surface load(fileobj, namehint="") -> Surface load new image from a file (or file-like object) pygame.image.save save(Surface, filename) -> None save(Surface, fileobj, namehint="") -> None save an image to file (or file-like object) pygame.image.get_sdl_image_version get_sdl_image_version(linked=True) -> None get_sdl_image_version(linked=True) -> (major, minor, patch) get version number of the SDL_Image library being used pygame.image.get_extended get_extended() -> bool test if extended image formats can be loaded pygame.image.tostring tostring(Surface, format, flipped=False) -> bytes transfer image to byte buffer pygame.image.tobytes tobytes(Surface, format, flipped=False) -> bytes transfer image to byte buffer pygame.image.fromstring fromstring(bytes, size, format, flipped=False) -> Surface create new Surface from a byte buffer pygame.image.frombytes frombytes(bytes, size, format, flipped=False) -> Surface create new Surface from a byte buffer pygame.image.frombuffer frombuffer(buffer, size, format) -> Surface create a new Surface that shares data inside a bytes buffer pygame.image.load_basic load_basic(file) -> Surface load new BMP image from a file (or file-like object) pygame.image.load_extended load_extended(filename) -> Surface load_extended(fileobj, namehint="") -> Surface load an image from a file (or file-like object) pygame.image.save_extended save_extended(Surface, filename) -> None save_extended(Surface, fileobj, namehint="") -> None save a png/jpg image to file (or file-like object) */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.3751402 pygame-2.6.1/src_c/doc/joystick_doc.h0000644000175100001770000001065714676242423017125 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEJOYSTICK "Pygame module for interacting with joysticks, gamepads, and trackballs." #define DOC_PYGAMEJOYSTICKINIT "init() -> None\nInitialize the joystick module." #define DOC_PYGAMEJOYSTICKQUIT "quit() -> None\nUninitialize the joystick module." #define DOC_PYGAMEJOYSTICKGETINIT "get_init() -> bool\nReturns True if the joystick module is initialized." #define DOC_PYGAMEJOYSTICKGETCOUNT "get_count() -> count\nReturns the number of joysticks." #define DOC_PYGAMEJOYSTICKJOYSTICK "Joystick(id) -> Joystick\nCreate a new Joystick object." #define DOC_JOYSTICKINIT "init() -> None\ninitialize the Joystick" #define DOC_JOYSTICKQUIT "quit() -> None\nuninitialize the Joystick" #define DOC_JOYSTICKGETINIT "get_init() -> bool\ncheck if the Joystick is initialized" #define DOC_JOYSTICKGETID "get_id() -> int\nget the device index (deprecated)" #define DOC_JOYSTICKGETINSTANCEID "get_instance_id() -> int\nget the joystick instance id" #define DOC_JOYSTICKGETGUID "get_guid() -> str\nget the joystick GUID" #define DOC_JOYSTICKGETPOWERLEVEL "get_power_level() -> str\nget the approximate power status of the device" #define DOC_JOYSTICKGETNAME "get_name() -> string\nget the Joystick system name" #define DOC_JOYSTICKGETNUMAXES "get_numaxes() -> int\nget the number of axes on a Joystick" #define DOC_JOYSTICKGETAXIS "get_axis(axis_number) -> float\nget the current position of an axis" #define DOC_JOYSTICKGETNUMBALLS "get_numballs() -> int\nget the number of trackballs on a Joystick" #define DOC_JOYSTICKGETBALL "get_ball(ball_number) -> x, y\nget the relative position of a trackball" #define DOC_JOYSTICKGETNUMBUTTONS "get_numbuttons() -> int\nget the number of buttons on a Joystick" #define DOC_JOYSTICKGETBUTTON "get_button(button) -> bool\nget the current button state" #define DOC_JOYSTICKGETNUMHATS "get_numhats() -> int\nget the number of hat controls on a Joystick" #define DOC_JOYSTICKGETHAT "get_hat(hat_number) -> x, y\nget the position of a joystick hat" #define DOC_JOYSTICKRUMBLE "rumble(low_frequency, high_frequency, duration) -> bool\nStart a rumbling effect" #define DOC_JOYSTICKSTOPRUMBLE "stop_rumble() -> None\nStop any rumble effect playing" /* Docs in a comment... slightly easier to read. */ /* pygame.joystick Pygame module for interacting with joysticks, gamepads, and trackballs. pygame.joystick.init init() -> None Initialize the joystick module. pygame.joystick.quit quit() -> None Uninitialize the joystick module. pygame.joystick.get_init get_init() -> bool Returns True if the joystick module is initialized. pygame.joystick.get_count get_count() -> count Returns the number of joysticks. pygame.joystick.Joystick Joystick(id) -> Joystick Create a new Joystick object. pygame.joystick.Joystick.init init() -> None initialize the Joystick pygame.joystick.Joystick.quit quit() -> None uninitialize the Joystick pygame.joystick.Joystick.get_init get_init() -> bool check if the Joystick is initialized pygame.joystick.Joystick.get_id get_id() -> int get the device index (deprecated) pygame.joystick.Joystick.get_instance_id get_instance_id() -> int get the joystick instance id pygame.joystick.Joystick.get_guid get_guid() -> str get the joystick GUID pygame.joystick.Joystick.get_power_level get_power_level() -> str get the approximate power status of the device pygame.joystick.Joystick.get_name get_name() -> string get the Joystick system name pygame.joystick.Joystick.get_numaxes get_numaxes() -> int get the number of axes on a Joystick pygame.joystick.Joystick.get_axis get_axis(axis_number) -> float get the current position of an axis pygame.joystick.Joystick.get_numballs get_numballs() -> int get the number of trackballs on a Joystick pygame.joystick.Joystick.get_ball get_ball(ball_number) -> x, y get the relative position of a trackball pygame.joystick.Joystick.get_numbuttons get_numbuttons() -> int get the number of buttons on a Joystick pygame.joystick.Joystick.get_button get_button(button) -> bool get the current button state pygame.joystick.Joystick.get_numhats get_numhats() -> int get the number of hat controls on a Joystick pygame.joystick.Joystick.get_hat get_hat(hat_number) -> x, y get the position of a joystick hat pygame.joystick.Joystick.rumble rumble(low_frequency, high_frequency, duration) -> bool Start a rumbling effect pygame.joystick.Joystick.stop_rumble stop_rumble() -> None Stop any rumble effect playing */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.4311402 pygame-2.6.1/src_c/doc/key_doc.h0000644000175100001770000000474214676242423016054 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEKEY "pygame module to work with the keyboard" #define DOC_PYGAMEKEYGETFOCUSED "get_focused() -> bool\ntrue if the display is receiving keyboard input from the system" #define DOC_PYGAMEKEYGETPRESSED "get_pressed() -> bools\nget the state of all keyboard buttons" #define DOC_PYGAMEKEYGETMODS "get_mods() -> int\ndetermine which modifier keys are being held" #define DOC_PYGAMEKEYSETMODS "set_mods(int) -> None\ntemporarily set which modifier keys are pressed" #define DOC_PYGAMEKEYSETREPEAT "set_repeat() -> None\nset_repeat(delay) -> None\nset_repeat(delay, interval) -> None\ncontrol how held keys are repeated" #define DOC_PYGAMEKEYGETREPEAT "get_repeat() -> (delay, interval)\nsee how held keys are repeated" #define DOC_PYGAMEKEYNAME "name(key, use_compat=True) -> str\nget the name of a key identifier" #define DOC_PYGAMEKEYKEYCODE "key_code(name=string) -> int\nget the key identifier from a key name" #define DOC_PYGAMEKEYSTARTTEXTINPUT "start_text_input() -> None\nstart handling Unicode text input events" #define DOC_PYGAMEKEYSTOPTEXTINPUT "stop_text_input() -> None\nstop handling Unicode text input events" #define DOC_PYGAMEKEYSETTEXTINPUTRECT "set_text_input_rect(Rect) -> None\ncontrols the position of the candidate list" /* Docs in a comment... slightly easier to read. */ /* pygame.key pygame module to work with the keyboard pygame.key.get_focused get_focused() -> bool true if the display is receiving keyboard input from the system pygame.key.get_pressed get_pressed() -> bools get the state of all keyboard buttons pygame.key.get_mods get_mods() -> int determine which modifier keys are being held pygame.key.set_mods set_mods(int) -> None temporarily set which modifier keys are pressed pygame.key.set_repeat set_repeat() -> None set_repeat(delay) -> None set_repeat(delay, interval) -> None control how held keys are repeated pygame.key.get_repeat get_repeat() -> (delay, interval) see how held keys are repeated pygame.key.name name(key, use_compat=True) -> str get the name of a key identifier pygame.key.key_code key_code(name=string) -> int get the key identifier from a key name pygame.key.start_text_input start_text_input() -> None start handling Unicode text input events pygame.key.stop_text_input stop_text_input() -> None stop handling Unicode text input events pygame.key.set_text_input_rect set_text_input_rect(Rect) -> None controls the position of the candidate list */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.44314 pygame-2.6.1/src_c/doc/locals_doc.h0000644000175100001770000000032314676242423016530 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMELOCALS "pygame constants" /* Docs in a comment... slightly easier to read. */ /* pygame.locals pygame constants */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.55214 pygame-2.6.1/src_c/doc/mask_doc.h0000644000175100001770000001376314676242424016223 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMASK "pygame module for image masks." #define DOC_PYGAMEMASKFROMSURFACE "from_surface(surface) -> Mask\nfrom_surface(surface, threshold=127) -> Mask\nCreates a Mask from the given surface" #define DOC_PYGAMEMASKFROMTHRESHOLD "from_threshold(surface, color) -> Mask\nfrom_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask\nCreates a mask by thresholding Surfaces" #define DOC_PYGAMEMASKMASK "Mask(size=(width, height)) -> Mask\nMask(size=(width, height), fill=False) -> Mask\npygame object for representing 2D bitmasks" #define DOC_MASKCOPY "copy() -> Mask\nReturns a new copy of the mask" #define DOC_MASKGETSIZE "get_size() -> (width, height)\nReturns the size of the mask" #define DOC_MASKGETRECT "get_rect(**kwargs) -> Rect\nReturns a Rect based on the size of the mask" #define DOC_MASKGETAT "get_at(pos) -> int\nGets the bit at the given position" #define DOC_MASKSETAT "set_at(pos) -> None\nset_at(pos, value=1) -> None\nSets the bit at the given position" #define DOC_MASKOVERLAP "overlap(other, offset) -> (x, y)\noverlap(other, offset) -> None\nReturns the point of intersection" #define DOC_MASKOVERLAPAREA "overlap_area(other, offset) -> numbits\nReturns the number of overlapping set bits" #define DOC_MASKOVERLAPMASK "overlap_mask(other, offset) -> Mask\nReturns a mask of the overlapping set bits" #define DOC_MASKFILL "fill() -> None\nSets all bits to 1" #define DOC_MASKCLEAR "clear() -> None\nSets all bits to 0" #define DOC_MASKINVERT "invert() -> None\nFlips all the bits" #define DOC_MASKSCALE "scale((width, height)) -> Mask\nResizes a mask" #define DOC_MASKDRAW "draw(other, offset) -> None\nDraws a mask onto another" #define DOC_MASKERASE "erase(other, offset) -> None\nErases a mask from another" #define DOC_MASKCOUNT "count() -> bits\nReturns the number of set bits" #define DOC_MASKCENTROID "centroid() -> (x, y)\nReturns the centroid of the set bits" #define DOC_MASKANGLE "angle() -> theta\nReturns the orientation of the set bits" #define DOC_MASKOUTLINE "outline() -> [(x, y), ...]\noutline(every=1) -> [(x, y), ...]\nReturns a list of points outlining an object" #define DOC_MASKCONVOLVE "convolve(other) -> Mask\nconvolve(other, output=None, offset=(0, 0)) -> Mask\nReturns the convolution of this mask with another mask" #define DOC_MASKCONNECTEDCOMPONENT "connected_component() -> Mask\nconnected_component(pos) -> Mask\nReturns a mask containing a connected component" #define DOC_MASKCONNECTEDCOMPONENTS "connected_components() -> [Mask, ...]\nconnected_components(minimum=0) -> [Mask, ...]\nReturns a list of masks of connected components" #define DOC_MASKGETBOUNDINGRECTS "get_bounding_rects() -> [Rect, ...]\nReturns a list of bounding rects of connected components" #define DOC_MASKTOSURFACE "to_surface() -> Surface\nto_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface\nReturns a surface with the mask drawn on it" /* Docs in a comment... slightly easier to read. */ /* pygame.mask pygame module for image masks. pygame.mask.from_surface from_surface(surface) -> Mask from_surface(surface, threshold=127) -> Mask Creates a Mask from the given surface pygame.mask.from_threshold from_threshold(surface, color) -> Mask from_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask Creates a mask by thresholding Surfaces pygame.mask.Mask Mask(size=(width, height)) -> Mask Mask(size=(width, height), fill=False) -> Mask pygame object for representing 2D bitmasks pygame.mask.Mask.copy copy() -> Mask Returns a new copy of the mask pygame.mask.Mask.get_size get_size() -> (width, height) Returns the size of the mask pygame.mask.Mask.get_rect get_rect(**kwargs) -> Rect Returns a Rect based on the size of the mask pygame.mask.Mask.get_at get_at(pos) -> int Gets the bit at the given position pygame.mask.Mask.set_at set_at(pos) -> None set_at(pos, value=1) -> None Sets the bit at the given position pygame.mask.Mask.overlap overlap(other, offset) -> (x, y) overlap(other, offset) -> None Returns the point of intersection pygame.mask.Mask.overlap_area overlap_area(other, offset) -> numbits Returns the number of overlapping set bits pygame.mask.Mask.overlap_mask overlap_mask(other, offset) -> Mask Returns a mask of the overlapping set bits pygame.mask.Mask.fill fill() -> None Sets all bits to 1 pygame.mask.Mask.clear clear() -> None Sets all bits to 0 pygame.mask.Mask.invert invert() -> None Flips all the bits pygame.mask.Mask.scale scale((width, height)) -> Mask Resizes a mask pygame.mask.Mask.draw draw(other, offset) -> None Draws a mask onto another pygame.mask.Mask.erase erase(other, offset) -> None Erases a mask from another pygame.mask.Mask.count count() -> bits Returns the number of set bits pygame.mask.Mask.centroid centroid() -> (x, y) Returns the centroid of the set bits pygame.mask.Mask.angle angle() -> theta Returns the orientation of the set bits pygame.mask.Mask.outline outline() -> [(x, y), ...] outline(every=1) -> [(x, y), ...] Returns a list of points outlining an object pygame.mask.Mask.convolve convolve(other) -> Mask convolve(other, output=None, offset=(0, 0)) -> Mask Returns the convolution of this mask with another mask pygame.mask.Mask.connected_component connected_component() -> Mask connected_component(pos) -> Mask Returns a mask containing a connected component pygame.mask.Mask.connected_components connected_components() -> [Mask, ...] connected_components(minimum=0) -> [Mask, ...] Returns a list of masks of connected components pygame.mask.Mask.get_bounding_rects get_bounding_rects() -> [Rect, ...] Returns a list of bounding rects of connected components pygame.mask.Mask.to_surface to_surface() -> Surface to_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface Returns a surface with the mask drawn on it */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.6621401 pygame-2.6.1/src_c/doc/math_doc.h0000644000175100001770000005202414676242424016212 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMATH "pygame module for vector classes" #define DOC_PYGAMEMATHCLAMP "clamp(value, min, max) -> float\nreturns value clamped to min and max." #define DOC_PYGAMEMATHLERP "lerp(a, b, weight) -> float\ninterpolates between two values by a weight." #define DOC_PYGAMEMATHVECTOR2 "Vector2() -> Vector2(0, 0)\nVector2(int) -> Vector2\nVector2(float) -> Vector2\nVector2(Vector2) -> Vector2\nVector2(x, y) -> Vector2\nVector2((x, y)) -> Vector2\na 2-Dimensional Vector" #define DOC_VECTOR2DOT "dot(Vector2) -> float\ncalculates the dot- or scalar-product with the other vector" #define DOC_VECTOR2CROSS "cross(Vector2) -> float\ncalculates the cross- or vector-product" #define DOC_VECTOR2MAGNITUDE "magnitude() -> float\nreturns the Euclidean magnitude of the vector." #define DOC_VECTOR2MAGNITUDESQUARED "magnitude_squared() -> float\nreturns the squared magnitude of the vector." #define DOC_VECTOR2LENGTH "length() -> float\nreturns the Euclidean length of the vector." #define DOC_VECTOR2LENGTHSQUARED "length_squared() -> float\nreturns the squared Euclidean length of the vector." #define DOC_VECTOR2NORMALIZE "normalize() -> Vector2\nreturns a vector with the same direction but length 1." #define DOC_VECTOR2NORMALIZEIP "normalize_ip() -> None\nnormalizes the vector in place so that its length is 1." #define DOC_VECTOR2ISNORMALIZED "is_normalized() -> Bool\ntests if the vector is normalized i.e. has length == 1." #define DOC_VECTOR2SCALETOLENGTH "scale_to_length(float) -> None\nscales the vector to a given length." #define DOC_VECTOR2REFLECT "reflect(Vector2) -> Vector2\nreturns a vector reflected of a given normal." #define DOC_VECTOR2REFLECTIP "reflect_ip(Vector2) -> None\nreflect the vector of a given normal in place." #define DOC_VECTOR2DISTANCETO "distance_to(Vector2) -> float\ncalculates the Euclidean distance to a given vector." #define DOC_VECTOR2DISTANCESQUAREDTO "distance_squared_to(Vector2) -> float\ncalculates the squared Euclidean distance to a given vector." #define DOC_VECTOR2MOVETOWARDS "move_towards(Vector2, float) -> Vector2\nreturns a vector moved toward the target by a given distance." #define DOC_VECTOR2MOVETOWARDSIP "move_towards_ip(Vector2, float) -> None\nmoves the vector toward its target at a given distance." #define DOC_VECTOR2LERP "lerp(Vector2, float) -> Vector2\nreturns a linear interpolation to the given vector." #define DOC_VECTOR2SLERP "slerp(Vector2, float) -> Vector2\nreturns a spherical interpolation to the given vector." #define DOC_VECTOR2ELEMENTWISE "elementwise() -> VectorElementwiseProxy\nThe next operation will be performed elementwise." #define DOC_VECTOR2ROTATE "rotate(angle) -> Vector2\nrotates a vector by a given angle in degrees." #define DOC_VECTOR2ROTATERAD "rotate_rad(angle) -> Vector2\nrotates a vector by a given angle in radians." #define DOC_VECTOR2ROTATEIP "rotate_ip(angle) -> None\nrotates the vector by a given angle in degrees in place." #define DOC_VECTOR2ROTATEIPRAD "rotate_ip_rad(angle) -> None\nrotates the vector by a given angle in radians in place." #define DOC_VECTOR2ROTATERADIP "rotate_rad_ip(angle) -> None\nrotates the vector by a given angle in radians in place." #define DOC_VECTOR2ANGLETO "angle_to(Vector2) -> float\ncalculates the angle to a given vector in degrees." #define DOC_VECTOR2ASPOLAR "as_polar() -> (r, phi)\nreturns a tuple with radial distance and azimuthal angle." #define DOC_VECTOR2FROMPOLAR "Vector2.from_polar((r, phi)) -> Vector2\nVector2().from_polar((r, phi)) -> None\nCreates a Vector2(x, y) or sets x and y from a polar coordinates tuple." #define DOC_VECTOR2PROJECT "project(Vector2) -> Vector2\nprojects a vector onto another." #define DOC_VECTOR2COPY "copy() -> Vector2\nReturns a copy of itself." #define DOC_VECTOR2CLAMPMAGNITUDE "clamp_magnitude(max_length) -> Vector2\nclamp_magnitude(min_length, max_length) -> Vector2\nReturns a copy of a vector with the magnitude clamped between max_length and min_length." #define DOC_VECTOR2CLAMPMAGNITUDEIP "clamp_magnitude_ip(max_length) -> None\nclamp_magnitude_ip(min_length, max_length) -> None\nClamps the vector's magnitude between max_length and min_length" #define DOC_VECTOR2UPDATE "update() -> None\nupdate(int) -> None\nupdate(float) -> None\nupdate(Vector2) -> None\nupdate(x, y) -> None\nupdate((x, y)) -> None\nSets the coordinates of the vector." #define DOC_VECTOR2EPSILON "Determines the tolerance of vector calculations." #define DOC_PYGAMEMATHVECTOR3 "Vector3() -> Vector3(0, 0, 0)\nVector3(int) -> Vector3\nVector3(float) -> Vector3\nVector3(Vector3) -> Vector3\nVector3(x, y, z) -> Vector3\nVector3((x, y, z)) -> Vector3\na 3-Dimensional Vector" #define DOC_VECTOR3DOT "dot(Vector3) -> float\ncalculates the dot- or scalar-product with the other vector" #define DOC_VECTOR3CROSS "cross(Vector3) -> Vector3\ncalculates the cross- or vector-product" #define DOC_VECTOR3MAGNITUDE "magnitude() -> float\nreturns the Euclidean magnitude of the vector." #define DOC_VECTOR3MAGNITUDESQUARED "magnitude_squared() -> float\nreturns the squared Euclidean magnitude of the vector." #define DOC_VECTOR3LENGTH "length() -> float\nreturns the Euclidean length of the vector." #define DOC_VECTOR3LENGTHSQUARED "length_squared() -> float\nreturns the squared Euclidean length of the vector." #define DOC_VECTOR3NORMALIZE "normalize() -> Vector3\nreturns a vector with the same direction but length 1." #define DOC_VECTOR3NORMALIZEIP "normalize_ip() -> None\nnormalizes the vector in place so that its length is 1." #define DOC_VECTOR3ISNORMALIZED "is_normalized() -> Bool\ntests if the vector is normalized i.e. has length == 1." #define DOC_VECTOR3SCALETOLENGTH "scale_to_length(float) -> None\nscales the vector to a given length." #define DOC_VECTOR3REFLECT "reflect(Vector3) -> Vector3\nreturns a vector reflected of a given normal." #define DOC_VECTOR3REFLECTIP "reflect_ip(Vector3) -> None\nreflect the vector of a given normal in place." #define DOC_VECTOR3DISTANCETO "distance_to(Vector3) -> float\ncalculates the Euclidean distance to a given vector." #define DOC_VECTOR3DISTANCESQUAREDTO "distance_squared_to(Vector3) -> float\ncalculates the squared Euclidean distance to a given vector." #define DOC_VECTOR3MOVETOWARDS "move_towards(Vector3, float) -> Vector3\nreturns a vector moved toward the target by a given distance." #define DOC_VECTOR3MOVETOWARDSIP "move_towards_ip(Vector3, float) -> None\nmoves the vector toward its target at a given distance." #define DOC_VECTOR3LERP "lerp(Vector3, float) -> Vector3\nreturns a linear interpolation to the given vector." #define DOC_VECTOR3SLERP "slerp(Vector3, float) -> Vector3\nreturns a spherical interpolation to the given vector." #define DOC_VECTOR3ELEMENTWISE "elementwise() -> VectorElementwiseProxy\nThe next operation will be performed elementwise." #define DOC_VECTOR3ROTATE "rotate(angle, Vector3) -> Vector3\nrotates a vector by a given angle in degrees." #define DOC_VECTOR3ROTATERAD "rotate_rad(angle, Vector3) -> Vector3\nrotates a vector by a given angle in radians." #define DOC_VECTOR3ROTATEIP "rotate_ip(angle, Vector3) -> None\nrotates the vector by a given angle in degrees in place." #define DOC_VECTOR3ROTATEIPRAD "rotate_ip_rad(angle, Vector3) -> None\nrotates the vector by a given angle in radians in place." #define DOC_VECTOR3ROTATERADIP "rotate_rad_ip(angle, Vector3) -> None\nrotates the vector by a given angle in radians in place." #define DOC_VECTOR3ROTATEX "rotate_x(angle) -> Vector3\nrotates a vector around the x-axis by the angle in degrees." #define DOC_VECTOR3ROTATEXRAD "rotate_x_rad(angle) -> Vector3\nrotates a vector around the x-axis by the angle in radians." #define DOC_VECTOR3ROTATEXIP "rotate_x_ip(angle) -> None\nrotates the vector around the x-axis by the angle in degrees in place." #define DOC_VECTOR3ROTATEXIPRAD "rotate_x_ip_rad(angle) -> None\nrotates the vector around the x-axis by the angle in radians in place." #define DOC_VECTOR3ROTATEXRADIP "rotate_x_rad_ip(angle) -> None\nrotates the vector around the x-axis by the angle in radians in place." #define DOC_VECTOR3ROTATEY "rotate_y(angle) -> Vector3\nrotates a vector around the y-axis by the angle in degrees." #define DOC_VECTOR3ROTATEYRAD "rotate_y_rad(angle) -> Vector3\nrotates a vector around the y-axis by the angle in radians." #define DOC_VECTOR3ROTATEYIP "rotate_y_ip(angle) -> None\nrotates the vector around the y-axis by the angle in degrees in place." #define DOC_VECTOR3ROTATEYIPRAD "rotate_y_ip_rad(angle) -> None\nrotates the vector around the y-axis by the angle in radians in place." #define DOC_VECTOR3ROTATEYRADIP "rotate_y_rad_ip(angle) -> None\nrotates the vector around the y-axis by the angle in radians in place." #define DOC_VECTOR3ROTATEZ "rotate_z(angle) -> Vector3\nrotates a vector around the z-axis by the angle in degrees." #define DOC_VECTOR3ROTATEZRAD "rotate_z_rad(angle) -> Vector3\nrotates a vector around the z-axis by the angle in radians." #define DOC_VECTOR3ROTATEZIP "rotate_z_ip(angle) -> None\nrotates the vector around the z-axis by the angle in degrees in place." #define DOC_VECTOR3ROTATEZIPRAD "rotate_z_ip_rad(angle) -> None\nrotates the vector around the z-axis by the angle in radians in place." #define DOC_VECTOR3ROTATEZRADIP "rotate_z_rad_ip(angle) -> None\nrotates the vector around the z-axis by the angle in radians in place." #define DOC_VECTOR3ANGLETO "angle_to(Vector3) -> float\ncalculates the angle to a given vector in degrees." #define DOC_VECTOR3ASSPHERICAL "as_spherical() -> (r, theta, phi)\nreturns a tuple with radial distance, inclination and azimuthal angle." #define DOC_VECTOR3FROMSPHERICAL "Vector3.from_spherical((r, theta, phi)) -> Vector3\nVector3().from_spherical((r, theta, phi)) -> None\nCreates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple." #define DOC_VECTOR3PROJECT "project(Vector3) -> Vector3\nprojects a vector onto another." #define DOC_VECTOR3COPY "copy() -> Vector3\nReturns a copy of itself." #define DOC_VECTOR3CLAMPMAGNITUDE "clamp_magnitude(max_length) -> Vector3\nclamp_magnitude(min_length, max_length) -> Vector3\nReturns a copy of a vector with the magnitude clamped between max_length and min_length." #define DOC_VECTOR3CLAMPMAGNITUDEIP "clamp_magnitude_ip(max_length) -> None\nclamp_magnitude_ip(min_length, max_length) -> None\nClamps the vector's magnitude between max_length and min_length" #define DOC_VECTOR3UPDATE "update() -> None\nupdate(int) -> None\nupdate(float) -> None\nupdate(Vector3) -> None\nupdate(x, y, z) -> None\nupdate((x, y, z)) -> None\nSets the coordinates of the vector." #define DOC_VECTOR3EPSILON "Determines the tolerance of vector calculations." /* Docs in a comment... slightly easier to read. */ /* pygame.math pygame module for vector classes pygame.math.clamp clamp(value, min, max) -> float returns value clamped to min and max. pygame.math.lerp lerp(a, b, weight) -> float interpolates between two values by a weight. pygame.math.Vector2 Vector2() -> Vector2(0, 0) Vector2(int) -> Vector2 Vector2(float) -> Vector2 Vector2(Vector2) -> Vector2 Vector2(x, y) -> Vector2 Vector2((x, y)) -> Vector2 a 2-Dimensional Vector pygame.math.Vector2.dot dot(Vector2) -> float calculates the dot- or scalar-product with the other vector pygame.math.Vector2.cross cross(Vector2) -> float calculates the cross- or vector-product pygame.math.Vector2.magnitude magnitude() -> float returns the Euclidean magnitude of the vector. pygame.math.Vector2.magnitude_squared magnitude_squared() -> float returns the squared magnitude of the vector. pygame.math.Vector2.length length() -> float returns the Euclidean length of the vector. pygame.math.Vector2.length_squared length_squared() -> float returns the squared Euclidean length of the vector. pygame.math.Vector2.normalize normalize() -> Vector2 returns a vector with the same direction but length 1. pygame.math.Vector2.normalize_ip normalize_ip() -> None normalizes the vector in place so that its length is 1. pygame.math.Vector2.is_normalized is_normalized() -> Bool tests if the vector is normalized i.e. has length == 1. pygame.math.Vector2.scale_to_length scale_to_length(float) -> None scales the vector to a given length. pygame.math.Vector2.reflect reflect(Vector2) -> Vector2 returns a vector reflected of a given normal. pygame.math.Vector2.reflect_ip reflect_ip(Vector2) -> None reflect the vector of a given normal in place. pygame.math.Vector2.distance_to distance_to(Vector2) -> float calculates the Euclidean distance to a given vector. pygame.math.Vector2.distance_squared_to distance_squared_to(Vector2) -> float calculates the squared Euclidean distance to a given vector. pygame.math.Vector2.move_towards move_towards(Vector2, float) -> Vector2 returns a vector moved toward the target by a given distance. pygame.math.Vector2.move_towards_ip move_towards_ip(Vector2, float) -> None moves the vector toward its target at a given distance. pygame.math.Vector2.lerp lerp(Vector2, float) -> Vector2 returns a linear interpolation to the given vector. pygame.math.Vector2.slerp slerp(Vector2, float) -> Vector2 returns a spherical interpolation to the given vector. pygame.math.Vector2.elementwise elementwise() -> VectorElementwiseProxy The next operation will be performed elementwise. pygame.math.Vector2.rotate rotate(angle) -> Vector2 rotates a vector by a given angle in degrees. pygame.math.Vector2.rotate_rad rotate_rad(angle) -> Vector2 rotates a vector by a given angle in radians. pygame.math.Vector2.rotate_ip rotate_ip(angle) -> None rotates the vector by a given angle in degrees in place. pygame.math.Vector2.rotate_ip_rad rotate_ip_rad(angle) -> None rotates the vector by a given angle in radians in place. pygame.math.Vector2.rotate_rad_ip rotate_rad_ip(angle) -> None rotates the vector by a given angle in radians in place. pygame.math.Vector2.angle_to angle_to(Vector2) -> float calculates the angle to a given vector in degrees. pygame.math.Vector2.as_polar as_polar() -> (r, phi) returns a tuple with radial distance and azimuthal angle. pygame.math.Vector2.from_polar Vector2.from_polar((r, phi)) -> Vector2 Vector2().from_polar((r, phi)) -> None Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple. pygame.math.Vector2.project project(Vector2) -> Vector2 projects a vector onto another. pygame.math.Vector2.copy copy() -> Vector2 Returns a copy of itself. pygame.math.Vector2.clamp_magnitude clamp_magnitude(max_length) -> Vector2 clamp_magnitude(min_length, max_length) -> Vector2 Returns a copy of a vector with the magnitude clamped between max_length and min_length. pygame.math.Vector2.clamp_magnitude_ip clamp_magnitude_ip(max_length) -> None clamp_magnitude_ip(min_length, max_length) -> None Clamps the vector's magnitude between max_length and min_length pygame.math.Vector2.update update() -> None update(int) -> None update(float) -> None update(Vector2) -> None update(x, y) -> None update((x, y)) -> None Sets the coordinates of the vector. pygame.math.Vector2.epsilon Determines the tolerance of vector calculations. pygame.math.Vector3 Vector3() -> Vector3(0, 0, 0) Vector3(int) -> Vector3 Vector3(float) -> Vector3 Vector3(Vector3) -> Vector3 Vector3(x, y, z) -> Vector3 Vector3((x, y, z)) -> Vector3 a 3-Dimensional Vector pygame.math.Vector3.dot dot(Vector3) -> float calculates the dot- or scalar-product with the other vector pygame.math.Vector3.cross cross(Vector3) -> Vector3 calculates the cross- or vector-product pygame.math.Vector3.magnitude magnitude() -> float returns the Euclidean magnitude of the vector. pygame.math.Vector3.magnitude_squared magnitude_squared() -> float returns the squared Euclidean magnitude of the vector. pygame.math.Vector3.length length() -> float returns the Euclidean length of the vector. pygame.math.Vector3.length_squared length_squared() -> float returns the squared Euclidean length of the vector. pygame.math.Vector3.normalize normalize() -> Vector3 returns a vector with the same direction but length 1. pygame.math.Vector3.normalize_ip normalize_ip() -> None normalizes the vector in place so that its length is 1. pygame.math.Vector3.is_normalized is_normalized() -> Bool tests if the vector is normalized i.e. has length == 1. pygame.math.Vector3.scale_to_length scale_to_length(float) -> None scales the vector to a given length. pygame.math.Vector3.reflect reflect(Vector3) -> Vector3 returns a vector reflected of a given normal. pygame.math.Vector3.reflect_ip reflect_ip(Vector3) -> None reflect the vector of a given normal in place. pygame.math.Vector3.distance_to distance_to(Vector3) -> float calculates the Euclidean distance to a given vector. pygame.math.Vector3.distance_squared_to distance_squared_to(Vector3) -> float calculates the squared Euclidean distance to a given vector. pygame.math.Vector3.move_towards move_towards(Vector3, float) -> Vector3 returns a vector moved toward the target by a given distance. pygame.math.Vector3.move_towards_ip move_towards_ip(Vector3, float) -> None moves the vector toward its target at a given distance. pygame.math.Vector3.lerp lerp(Vector3, float) -> Vector3 returns a linear interpolation to the given vector. pygame.math.Vector3.slerp slerp(Vector3, float) -> Vector3 returns a spherical interpolation to the given vector. pygame.math.Vector3.elementwise elementwise() -> VectorElementwiseProxy The next operation will be performed elementwise. pygame.math.Vector3.rotate rotate(angle, Vector3) -> Vector3 rotates a vector by a given angle in degrees. pygame.math.Vector3.rotate_rad rotate_rad(angle, Vector3) -> Vector3 rotates a vector by a given angle in radians. pygame.math.Vector3.rotate_ip rotate_ip(angle, Vector3) -> None rotates the vector by a given angle in degrees in place. pygame.math.Vector3.rotate_ip_rad rotate_ip_rad(angle, Vector3) -> None rotates the vector by a given angle in radians in place. pygame.math.Vector3.rotate_rad_ip rotate_rad_ip(angle, Vector3) -> None rotates the vector by a given angle in radians in place. pygame.math.Vector3.rotate_x rotate_x(angle) -> Vector3 rotates a vector around the x-axis by the angle in degrees. pygame.math.Vector3.rotate_x_rad rotate_x_rad(angle) -> Vector3 rotates a vector around the x-axis by the angle in radians. pygame.math.Vector3.rotate_x_ip rotate_x_ip(angle) -> None rotates the vector around the x-axis by the angle in degrees in place. pygame.math.Vector3.rotate_x_ip_rad rotate_x_ip_rad(angle) -> None rotates the vector around the x-axis by the angle in radians in place. pygame.math.Vector3.rotate_x_rad_ip rotate_x_rad_ip(angle) -> None rotates the vector around the x-axis by the angle in radians in place. pygame.math.Vector3.rotate_y rotate_y(angle) -> Vector3 rotates a vector around the y-axis by the angle in degrees. pygame.math.Vector3.rotate_y_rad rotate_y_rad(angle) -> Vector3 rotates a vector around the y-axis by the angle in radians. pygame.math.Vector3.rotate_y_ip rotate_y_ip(angle) -> None rotates the vector around the y-axis by the angle in degrees in place. pygame.math.Vector3.rotate_y_ip_rad rotate_y_ip_rad(angle) -> None rotates the vector around the y-axis by the angle in radians in place. pygame.math.Vector3.rotate_y_rad_ip rotate_y_rad_ip(angle) -> None rotates the vector around the y-axis by the angle in radians in place. pygame.math.Vector3.rotate_z rotate_z(angle) -> Vector3 rotates a vector around the z-axis by the angle in degrees. pygame.math.Vector3.rotate_z_rad rotate_z_rad(angle) -> Vector3 rotates a vector around the z-axis by the angle in radians. pygame.math.Vector3.rotate_z_ip rotate_z_ip(angle) -> None rotates the vector around the z-axis by the angle in degrees in place. pygame.math.Vector3.rotate_z_ip_rad rotate_z_ip_rad(angle) -> None rotates the vector around the z-axis by the angle in radians in place. pygame.math.Vector3.rotate_z_rad_ip rotate_z_rad_ip(angle) -> None rotates the vector around the z-axis by the angle in radians in place. pygame.math.Vector3.angle_to angle_to(Vector3) -> float calculates the angle to a given vector in degrees. pygame.math.Vector3.as_spherical as_spherical() -> (r, theta, phi) returns a tuple with radial distance, inclination and azimuthal angle. pygame.math.Vector3.from_spherical Vector3.from_spherical((r, theta, phi)) -> Vector3 Vector3().from_spherical((r, theta, phi)) -> None Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple. pygame.math.Vector3.project project(Vector3) -> Vector3 projects a vector onto another. pygame.math.Vector3.copy copy() -> Vector3 Returns a copy of itself. pygame.math.Vector3.clamp_magnitude clamp_magnitude(max_length) -> Vector3 clamp_magnitude(min_length, max_length) -> Vector3 Returns a copy of a vector with the magnitude clamped between max_length and min_length. pygame.math.Vector3.clamp_magnitude_ip clamp_magnitude_ip(max_length) -> None clamp_magnitude_ip(min_length, max_length) -> None Clamps the vector's magnitude between max_length and min_length pygame.math.Vector3.update update() -> None update(int) -> None update(float) -> None update(Vector3) -> None update(x, y, z) -> None update((x, y, z)) -> None Sets the coordinates of the vector. pygame.math.Vector3.epsilon Determines the tolerance of vector calculations. */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612179.7311401 pygame-2.6.1/src_c/doc/midi_doc.h0000644000175100001770000001460014676242424016201 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMIDI "pygame module for interacting with midi input and output." #define DOC_PYGAMEMIDIINIT "init() -> None\ninitialize the midi module" #define DOC_PYGAMEMIDIQUIT "quit() -> None\nuninitialize the midi module" #define DOC_PYGAMEMIDIGETINIT "get_init() -> bool\nreturns True if the midi module is currently initialized" #define DOC_PYGAMEMIDIINPUT "Input(device_id) -> None\nInput(device_id, buffer_size) -> None\nInput is used to get midi input from midi devices." #define DOC_INPUTCLOSE "close() -> None\ncloses a midi stream, flushing any pending buffers." #define DOC_INPUTPOLL "poll() -> bool\nreturns True if there's data, or False if not." #define DOC_INPUTREAD "read(num_events) -> midi_event_list\nreads num_events midi events from the buffer." #define DOC_PYGAMEMIDIOUTPUT "Output(device_id) -> None\nOutput(device_id, latency=0) -> None\nOutput(device_id, buffer_size=256) -> None\nOutput(device_id, latency, buffer_size) -> None\nOutput is used to send midi to an output device" #define DOC_OUTPUTABORT "abort() -> None\nterminates outgoing messages immediately" #define DOC_OUTPUTCLOSE "close() -> None\ncloses a midi stream, flushing any pending buffers." #define DOC_OUTPUTNOTEOFF "note_off(note, velocity=None, channel=0) -> None\nturns a midi note off (note must be on)" #define DOC_OUTPUTNOTEON "note_on(note, velocity=None, channel=0) -> None\nturns a midi note on (note must be off)" #define DOC_OUTPUTSETINSTRUMENT "set_instrument(instrument_id, channel=0) -> None\nselect an instrument, with a value between 0 and 127" #define DOC_OUTPUTPITCHBEND "set_instrument(value=0, channel=0) -> None\nmodify the pitch of a channel." #define DOC_OUTPUTWRITE "write(data) -> None\nwrites a list of midi data to the Output" #define DOC_OUTPUTWRITESHORT "write_short(status) -> None\nwrite_short(status, data1=0, data2=0) -> None\nwrites up to 3 bytes of midi data to the Output" #define DOC_OUTPUTWRITESYSEX "write_sys_ex(when, msg) -> None\nwrites a timestamped system-exclusive midi message." #define DOC_PYGAMEMIDIGETCOUNT "get_count() -> num_devices\ngets the number of devices." #define DOC_PYGAMEMIDIGETDEFAULTINPUTID "get_default_input_id() -> default_id\ngets default input device number" #define DOC_PYGAMEMIDIGETDEFAULTOUTPUTID "get_default_output_id() -> default_id\ngets default output device number" #define DOC_PYGAMEMIDIGETDEVICEINFO "get_device_info(an_id) -> (interf, name, input, output, opened)\nget_device_info(an_id) -> None\nreturns information about a midi device" #define DOC_PYGAMEMIDIMIDIS2EVENTS "midis2events(midi_events, device_id) -> [Event, ...]\nconverts midi events to pygame events" #define DOC_PYGAMEMIDITIME "time() -> time\nreturns the current time in ms of the PortMidi timer" #define DOC_PYGAMEMIDIFREQUENCYTOMIDI "frequency_to_midi(midi_note) -> midi_note\nConverts a frequency into a MIDI note. Rounds to the closest midi note." #define DOC_PYGAMEMIDIMIDITOFREQUENCY "midi_to_frequency(midi_note) -> frequency\nConverts a midi note to a frequency." #define DOC_PYGAMEMIDIMIDITOANSINOTE "midi_to_ansi_note(midi_note) -> ansi_note\nReturns the Ansi Note name for a midi number." #define DOC_PYGAMEMIDIMIDIEXCEPTION "MidiException(errno) -> None\nexception that pygame.midi functions and classes can raise" /* Docs in a comment... slightly easier to read. */ /* pygame.midi pygame module for interacting with midi input and output. pygame.midi.init init() -> None initialize the midi module pygame.midi.quit quit() -> None uninitialize the midi module pygame.midi.get_init get_init() -> bool returns True if the midi module is currently initialized pygame.midi.Input Input(device_id) -> None Input(device_id, buffer_size) -> None Input is used to get midi input from midi devices. pygame.midi.Input.close close() -> None closes a midi stream, flushing any pending buffers. pygame.midi.Input.poll poll() -> bool returns True if there's data, or False if not. pygame.midi.Input.read read(num_events) -> midi_event_list reads num_events midi events from the buffer. pygame.midi.Output Output(device_id) -> None Output(device_id, latency=0) -> None Output(device_id, buffer_size=256) -> None Output(device_id, latency, buffer_size) -> None Output is used to send midi to an output device pygame.midi.Output.abort abort() -> None terminates outgoing messages immediately pygame.midi.Output.close close() -> None closes a midi stream, flushing any pending buffers. pygame.midi.Output.note_off note_off(note, velocity=None, channel=0) -> None turns a midi note off (note must be on) pygame.midi.Output.note_on note_on(note, velocity=None, channel=0) -> None turns a midi note on (note must be off) pygame.midi.Output.set_instrument set_instrument(instrument_id, channel=0) -> None select an instrument, with a value between 0 and 127 pygame.midi.Output.pitch_bend set_instrument(value=0, channel=0) -> None modify the pitch of a channel. pygame.midi.Output.write write(data) -> None writes a list of midi data to the Output pygame.midi.Output.write_short write_short(status) -> None write_short(status, data1=0, data2=0) -> None writes up to 3 bytes of midi data to the Output pygame.midi.Output.write_sys_ex write_sys_ex(when, msg) -> None writes a timestamped system-exclusive midi message. pygame.midi.get_count get_count() -> num_devices gets the number of devices. pygame.midi.get_default_input_id get_default_input_id() -> default_id gets default input device number pygame.midi.get_default_output_id get_default_output_id() -> default_id gets default output device number pygame.midi.get_device_info get_device_info(an_id) -> (interf, name, input, output, opened) get_device_info(an_id) -> None returns information about a midi device pygame.midi.midis2events midis2events(midi_events, device_id) -> [Event, ...] converts midi events to pygame events pygame.midi.time time() -> time returns the current time in ms of the PortMidi timer pygame.midi.frequency_to_midi frequency_to_midi(midi_note) -> midi_note Converts a frequency into a MIDI note. Rounds to the closest midi note. pygame.midi.midi_to_frequency midi_to_frequency(midi_note) -> frequency Converts a midi note to a frequency. pygame.midi.midi_to_ansi_note midi_to_ansi_note(midi_note) -> ansi_note Returns the Ansi Note name for a midi number. pygame.midi.MidiException MidiException(errno) -> None exception that pygame.midi functions and classes can raise */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.80314 pygame-2.6.1/src_c/doc/mixer_doc.h0000644000175100001770000002007714676242424016410 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMIXER "pygame module for loading and playing sounds" #define DOC_PYGAMEMIXERINIT "init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None\ninitialize the mixer module" #define DOC_PYGAMEMIXERPREINIT "pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None\npreset the mixer init arguments" #define DOC_PYGAMEMIXERQUIT "quit() -> None\nuninitialize the mixer" #define DOC_PYGAMEMIXERGETINIT "get_init() -> (frequency, format, channels)\ntest if the mixer is initialized" #define DOC_PYGAMEMIXERSTOP "stop() -> None\nstop playback of all sound channels" #define DOC_PYGAMEMIXERPAUSE "pause() -> None\ntemporarily stop playback of all sound channels" #define DOC_PYGAMEMIXERUNPAUSE "unpause() -> None\nresume paused playback of sound channels" #define DOC_PYGAMEMIXERFADEOUT "fadeout(time) -> None\nfade out the volume on all sounds before stopping" #define DOC_PYGAMEMIXERSETNUMCHANNELS "set_num_channels(count) -> None\nset the total number of playback channels" #define DOC_PYGAMEMIXERGETNUMCHANNELS "get_num_channels() -> count\nget the total number of playback channels" #define DOC_PYGAMEMIXERSETRESERVED "set_reserved(count) -> count\nreserve channels from being automatically used" #define DOC_PYGAMEMIXERFINDCHANNEL "find_channel(force=False) -> Channel\nfind an unused channel" #define DOC_PYGAMEMIXERGETBUSY "get_busy() -> bool\ntest if any sound is being mixed" #define DOC_PYGAMEMIXERGETSDLMIXERVERSION "get_sdl_mixer_version() -> (major, minor, patch)\nget_sdl_mixer_version(linked=True) -> (major, minor, patch)\nget the mixer's SDL version" #define DOC_PYGAMEMIXERSOUND "Sound(filename) -> Sound\nSound(file=filename) -> Sound\nSound(file=pathlib_path) -> Sound\nSound(buffer) -> Sound\nSound(buffer=buffer) -> Sound\nSound(object) -> Sound\nSound(file=object) -> Sound\nSound(array=object) -> Sound\nCreate a new Sound object from a file or buffer object" #define DOC_SOUNDPLAY "play(loops=0, maxtime=0, fade_ms=0) -> Channel\nbegin sound playback" #define DOC_SOUNDSTOP "stop() -> None\nstop sound playback" #define DOC_SOUNDFADEOUT "fadeout(time) -> None\nstop sound playback after fading out" #define DOC_SOUNDSETVOLUME "set_volume(value) -> None\nset the playback volume for this Sound" #define DOC_SOUNDGETVOLUME "get_volume() -> value\nget the playback volume" #define DOC_SOUNDGETNUMCHANNELS "get_num_channels() -> count\ncount how many times this Sound is playing" #define DOC_SOUNDGETLENGTH "get_length() -> seconds\nget the length of the Sound" #define DOC_SOUNDGETRAW "get_raw() -> bytes\nreturn a bytestring copy of the Sound samples." #define DOC_PYGAMEMIXERCHANNEL "Channel(id) -> Channel\nCreate a Channel object for controlling playback" #define DOC_CHANNELPLAY "play(Sound, loops=0, maxtime=0, fade_ms=0) -> None\nplay a Sound on a specific Channel" #define DOC_CHANNELSTOP "stop() -> None\nstop playback on a Channel" #define DOC_CHANNELPAUSE "pause() -> None\ntemporarily stop playback of a channel" #define DOC_CHANNELUNPAUSE "unpause() -> None\nresume pause playback of a channel" #define DOC_CHANNELFADEOUT "fadeout(time) -> None\nstop playback after fading channel out" #define DOC_CHANNELSETVOLUME "set_volume(value) -> None\nset_volume(left, right) -> None\nset the volume of a playing channel" #define DOC_CHANNELGETVOLUME "get_volume() -> value\nget the volume of the playing channel" #define DOC_CHANNELGETBUSY "get_busy() -> bool\ncheck if the channel is active" #define DOC_CHANNELGETSOUND "get_sound() -> Sound\nget the currently playing Sound" #define DOC_CHANNELQUEUE "queue(Sound) -> None\nqueue a Sound object to follow the current" #define DOC_CHANNELGETQUEUE "get_queue() -> Sound\nreturn any Sound that is queued" #define DOC_CHANNELSETENDEVENT "set_endevent() -> None\nset_endevent(type) -> None\nhave the channel send an event when playback stops" #define DOC_CHANNELGETENDEVENT "get_endevent() -> type\nget the event a channel sends when playback stops" /* Docs in a comment... slightly easier to read. */ /* pygame.mixer pygame module for loading and playing sounds pygame.mixer.init init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None initialize the mixer module pygame.mixer.pre_init pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None preset the mixer init arguments pygame.mixer.quit quit() -> None uninitialize the mixer pygame.mixer.get_init get_init() -> (frequency, format, channels) test if the mixer is initialized pygame.mixer.stop stop() -> None stop playback of all sound channels pygame.mixer.pause pause() -> None temporarily stop playback of all sound channels pygame.mixer.unpause unpause() -> None resume paused playback of sound channels pygame.mixer.fadeout fadeout(time) -> None fade out the volume on all sounds before stopping pygame.mixer.set_num_channels set_num_channels(count) -> None set the total number of playback channels pygame.mixer.get_num_channels get_num_channels() -> count get the total number of playback channels pygame.mixer.set_reserved set_reserved(count) -> count reserve channels from being automatically used pygame.mixer.find_channel find_channel(force=False) -> Channel find an unused channel pygame.mixer.get_busy get_busy() -> bool test if any sound is being mixed pygame.mixer.get_sdl_mixer_version get_sdl_mixer_version() -> (major, minor, patch) get_sdl_mixer_version(linked=True) -> (major, minor, patch) get the mixer's SDL version pygame.mixer.Sound Sound(filename) -> Sound Sound(file=filename) -> Sound Sound(file=pathlib_path) -> Sound Sound(buffer) -> Sound Sound(buffer=buffer) -> Sound Sound(object) -> Sound Sound(file=object) -> Sound Sound(array=object) -> Sound Create a new Sound object from a file or buffer object pygame.mixer.Sound.play play(loops=0, maxtime=0, fade_ms=0) -> Channel begin sound playback pygame.mixer.Sound.stop stop() -> None stop sound playback pygame.mixer.Sound.fadeout fadeout(time) -> None stop sound playback after fading out pygame.mixer.Sound.set_volume set_volume(value) -> None set the playback volume for this Sound pygame.mixer.Sound.get_volume get_volume() -> value get the playback volume pygame.mixer.Sound.get_num_channels get_num_channels() -> count count how many times this Sound is playing pygame.mixer.Sound.get_length get_length() -> seconds get the length of the Sound pygame.mixer.Sound.get_raw get_raw() -> bytes return a bytestring copy of the Sound samples. pygame.mixer.Channel Channel(id) -> Channel Create a Channel object for controlling playback pygame.mixer.Channel.play play(Sound, loops=0, maxtime=0, fade_ms=0) -> None play a Sound on a specific Channel pygame.mixer.Channel.stop stop() -> None stop playback on a Channel pygame.mixer.Channel.pause pause() -> None temporarily stop playback of a channel pygame.mixer.Channel.unpause unpause() -> None resume pause playback of a channel pygame.mixer.Channel.fadeout fadeout(time) -> None stop playback after fading channel out pygame.mixer.Channel.set_volume set_volume(value) -> None set_volume(left, right) -> None set the volume of a playing channel pygame.mixer.Channel.get_volume get_volume() -> value get the volume of the playing channel pygame.mixer.Channel.get_busy get_busy() -> bool check if the channel is active pygame.mixer.Channel.get_sound get_sound() -> Sound get the currently playing Sound pygame.mixer.Channel.queue queue(Sound) -> None queue a Sound object to follow the current pygame.mixer.Channel.get_queue get_queue() -> Sound return any Sound that is queued pygame.mixer.Channel.set_endevent set_endevent() -> None set_endevent(type) -> None have the channel send an event when playback stops pygame.mixer.Channel.get_endevent get_endevent() -> type get the event a channel sends when playback stops */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.83914 pygame-2.6.1/src_c/doc/mouse_doc.h0000644000175100001770000000452314676242424016412 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMOUSE "pygame module to work with the mouse" #define DOC_PYGAMEMOUSEGETPRESSED "get_pressed(num_buttons=3) -> (button1, button2, button3)\nget_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)\nget the state of the mouse buttons" #define DOC_PYGAMEMOUSEGETPOS "get_pos() -> (x, y)\nget the mouse cursor position" #define DOC_PYGAMEMOUSEGETREL "get_rel() -> (x, y)\nget the amount of mouse movement" #define DOC_PYGAMEMOUSESETPOS "set_pos([x, y]) -> None\nset the mouse cursor position" #define DOC_PYGAMEMOUSESETVISIBLE "set_visible(bool) -> bool\nhide or show the mouse cursor" #define DOC_PYGAMEMOUSEGETVISIBLE "get_visible() -> bool\nget the current visibility state of the mouse cursor" #define DOC_PYGAMEMOUSEGETFOCUSED "get_focused() -> bool\ncheck if the display is receiving mouse input" #define DOC_PYGAMEMOUSESETCURSOR "set_cursor(pygame.cursors.Cursor) -> None\nset_cursor(size, hotspot, xormasks, andmasks) -> None\nset_cursor(hotspot, surface) -> None\nset_cursor(constant) -> None\nset the mouse cursor to a new cursor" #define DOC_PYGAMEMOUSEGETCURSOR "get_cursor() -> pygame.cursors.Cursor\nget the current mouse cursor" /* Docs in a comment... slightly easier to read. */ /* pygame.mouse pygame module to work with the mouse pygame.mouse.get_pressed get_pressed(num_buttons=3) -> (button1, button2, button3) get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5) get the state of the mouse buttons pygame.mouse.get_pos get_pos() -> (x, y) get the mouse cursor position pygame.mouse.get_rel get_rel() -> (x, y) get the amount of mouse movement pygame.mouse.set_pos set_pos([x, y]) -> None set the mouse cursor position pygame.mouse.set_visible set_visible(bool) -> bool hide or show the mouse cursor pygame.mouse.get_visible get_visible() -> bool get the current visibility state of the mouse cursor pygame.mouse.get_focused get_focused() -> bool check if the display is receiving mouse input pygame.mouse.set_cursor set_cursor(pygame.cursors.Cursor) -> None set_cursor(size, hotspot, xormasks, andmasks) -> None set_cursor(hotspot, surface) -> None set_cursor(constant) -> None set the mouse cursor to a new cursor pygame.mouse.get_cursor get_cursor() -> pygame.cursors.Cursor get the current mouse cursor */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.87914 pygame-2.6.1/src_c/doc/music_doc.h0000644000175100001770000000637114676242424016405 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEMIXERMUSIC "pygame module for controlling streamed audio" #define DOC_PYGAMEMIXERMUSICLOAD "load(filename) -> None\nload(fileobj, namehint="") -> None\nLoad a music file for playback" #define DOC_PYGAMEMIXERMUSICUNLOAD "unload() -> None\nUnload the currently loaded music to free up resources" #define DOC_PYGAMEMIXERMUSICPLAY "play(loops=0, start=0.0, fade_ms=0) -> None\nStart the playback of the music stream" #define DOC_PYGAMEMIXERMUSICREWIND "rewind() -> None\nrestart music" #define DOC_PYGAMEMIXERMUSICSTOP "stop() -> None\nstop the music playback" #define DOC_PYGAMEMIXERMUSICPAUSE "pause() -> None\ntemporarily stop music playback" #define DOC_PYGAMEMIXERMUSICUNPAUSE "unpause() -> None\nresume paused music" #define DOC_PYGAMEMIXERMUSICFADEOUT "fadeout(time) -> None\nstop music playback after fading out" #define DOC_PYGAMEMIXERMUSICSETVOLUME "set_volume(volume) -> None\nset the music volume" #define DOC_PYGAMEMIXERMUSICGETVOLUME "get_volume() -> value\nget the music volume" #define DOC_PYGAMEMIXERMUSICGETBUSY "get_busy() -> bool\ncheck if the music stream is playing" #define DOC_PYGAMEMIXERMUSICSETPOS "set_pos(pos) -> None\nset position to play from" #define DOC_PYGAMEMIXERMUSICGETPOS "get_pos() -> time\nget the music play time" #define DOC_PYGAMEMIXERMUSICQUEUE "queue(filename) -> None\nqueue(fileobj, namehint="", loops=0) -> None\nqueue a sound file to follow the current" #define DOC_PYGAMEMIXERMUSICSETENDEVENT "set_endevent() -> None\nset_endevent(type) -> None\nhave the music send an event when playback stops" #define DOC_PYGAMEMIXERMUSICGETENDEVENT "get_endevent() -> type\nget the event a channel sends when playback stops" /* Docs in a comment... slightly easier to read. */ /* pygame.mixer.music pygame module for controlling streamed audio pygame.mixer.music.load load(filename) -> None load(fileobj, namehint="") -> None Load a music file for playback pygame.mixer.music.unload unload() -> None Unload the currently loaded music to free up resources pygame.mixer.music.play play(loops=0, start=0.0, fade_ms=0) -> None Start the playback of the music stream pygame.mixer.music.rewind rewind() -> None restart music pygame.mixer.music.stop stop() -> None stop the music playback pygame.mixer.music.pause pause() -> None temporarily stop music playback pygame.mixer.music.unpause unpause() -> None resume paused music pygame.mixer.music.fadeout fadeout(time) -> None stop music playback after fading out pygame.mixer.music.set_volume set_volume(volume) -> None set the music volume pygame.mixer.music.get_volume get_volume() -> value get the music volume pygame.mixer.music.get_busy get_busy() -> bool check if the music stream is playing pygame.mixer.music.set_pos set_pos(pos) -> None set position to play from pygame.mixer.music.get_pos get_pos() -> time get the music play time pygame.mixer.music.queue queue(filename) -> None queue(fileobj, namehint="", loops=0) -> None queue a sound file to follow the current pygame.mixer.music.set_endevent set_endevent() -> None set_endevent(type) -> None have the music send an event when playback stops pygame.mixer.music.get_endevent get_endevent() -> type get the event a channel sends when playback stops */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.89614 pygame-2.6.1/src_c/doc/overlay_doc.h0000644000175100001770000000167014676242424016743 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEOVERLAY "Overlay(format, (width, height)) -> Overlay\npygame object for video overlay graphics" #define DOC_OVERLAYDISPLAY "display((y, u, v)) -> None\ndisplay() -> None\nset the overlay pixel data" #define DOC_OVERLAYSETLOCATION "set_location(rect) -> None\ncontrol where the overlay is displayed" #define DOC_OVERLAYGETHARDWARE "get_hardware(rect) -> int\ntest if the Overlay is hardware accelerated" /* Docs in a comment... slightly easier to read. */ /* pygame.Overlay Overlay(format, (width, height)) -> Overlay pygame object for video overlay graphics pygame.Overlay.display display((y, u, v)) -> None display() -> None set the overlay pixel data pygame.Overlay.set_location set_location(rect) -> None control where the overlay is displayed pygame.Overlay.get_hardware get_hardware(rect) -> int test if the Overlay is hardware accelerated */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.93614 pygame-2.6.1/src_c/doc/pixelarray_doc.h0000644000175100001770000000526714676242424017450 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEPIXELARRAY "PixelArray(Surface) -> PixelArray\npygame object for direct pixel access of surfaces" #define DOC_PIXELARRAYSURFACE "surface -> Surface\nGets the Surface the PixelArray uses." #define DOC_PIXELARRAYITEMSIZE "itemsize -> int\nReturns the byte size of a pixel array item" #define DOC_PIXELARRAYNDIM "ndim -> int\nReturns the number of dimensions." #define DOC_PIXELARRAYSHAPE "shape -> tuple of int's\nReturns the array size." #define DOC_PIXELARRAYSTRIDES "strides -> tuple of int's\nReturns byte offsets for each array dimension." #define DOC_PIXELARRAYMAKESURFACE "make_surface() -> Surface\nCreates a new Surface from the current PixelArray." #define DOC_PIXELARRAYREPLACE "replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None\nReplaces the passed color in the PixelArray with another one." #define DOC_PIXELARRAYEXTRACT "extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray\nExtracts the passed color from the PixelArray." #define DOC_PIXELARRAYCOMPARE "compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray\nCompares the PixelArray with another one." #define DOC_PIXELARRAYTRANSPOSE "transpose() -> PixelArray\nExchanges the x and y axis." #define DOC_PIXELARRAYCLOSE "close() -> PixelArray\nCloses the PixelArray, and releases Surface lock." /* Docs in a comment... slightly easier to read. */ /* pygame.PixelArray PixelArray(Surface) -> PixelArray pygame object for direct pixel access of surfaces pygame.PixelArray.surface surface -> Surface Gets the Surface the PixelArray uses. pygame.PixelArray.itemsize itemsize -> int Returns the byte size of a pixel array item pygame.PixelArray.ndim ndim -> int Returns the number of dimensions. pygame.PixelArray.shape shape -> tuple of int's Returns the array size. pygame.PixelArray.strides strides -> tuple of int's Returns byte offsets for each array dimension. pygame.PixelArray.make_surface make_surface() -> Surface Creates a new Surface from the current PixelArray. pygame.PixelArray.replace replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None Replaces the passed color in the PixelArray with another one. pygame.PixelArray.extract extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray Extracts the passed color from the PixelArray. pygame.PixelArray.compare compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray Compares the PixelArray with another one. pygame.PixelArray.transpose transpose() -> PixelArray Exchanges the x and y axis. pygame.PixelArray.close close() -> PixelArray Closes the PixelArray, and releases Surface lock. */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612179.95814 pygame-2.6.1/src_c/doc/pixelcopy_doc.h0000644000175100001770000000244514676242424017277 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMEPIXELCOPY "pygame module for general pixel array copying" #define DOC_PYGAMEPIXELCOPYSURFACETOARRAY "surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None\ncopy surface pixels to an array object" #define DOC_PYGAMEPIXELCOPYARRAYTOSURFACE "array_to_surface(, ) -> None\ncopy an array object to a surface" #define DOC_PYGAMEPIXELCOPYMAPARRAY "map_array(, , ) -> None\ncopy an array to another array, using surface format" #define DOC_PYGAMEPIXELCOPYMAKESURFACE "pygame.pixelcopy.make_surface(array) -> Surface\nCopy an array to a new surface" /* Docs in a comment... slightly easier to read. */ /* pygame.pixelcopy pygame module for general pixel array copying pygame.pixelcopy.surface_to_array surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None copy surface pixels to an array object pygame.pixelcopy.array_to_surface array_to_surface(, ) -> None copy an array object to a surface pygame.pixelcopy.map_array map_array(, , ) -> None copy an array to another array, using surface format pygame.pixelcopy.make_surface pygame.pixelcopy.make_surface(array) -> Surface Copy an array to a new surface */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.02514 pygame-2.6.1/src_c/doc/pygame_doc.h0000644000175100001770000000604314676242424016543 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAME "the top level pygame package" #define DOC_PYGAMEINIT "init() -> (numpass, numfail)\ninitialize all imported pygame modules" #define DOC_PYGAMEQUIT "quit() -> None\nuninitialize all pygame modules" #define DOC_PYGAMEGETINIT "get_init() -> bool\nreturns True if pygame is currently initialized" #define DOC_PYGAMEERROR "raise pygame.error(message)\nstandard pygame exception" #define DOC_PYGAMEGETERROR "get_error() -> errorstr\nget the current error message" #define DOC_PYGAMESETERROR "set_error(error_msg) -> None\nset the current error message" #define DOC_PYGAMEGETSDLVERSION "get_sdl_version(linked=True) -> major, minor, patch\nget the version number of SDL" #define DOC_PYGAMEGETSDLBYTEORDER "get_sdl_byteorder() -> int\nget the byte order of SDL" #define DOC_PYGAMEREGISTERQUIT "register_quit(callable) -> None\nregister a function to be called when pygame quits" #define DOC_PYGAMEENCODESTRING "encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None\nEncode a Unicode or bytes object" #define DOC_PYGAMEENCODEFILEPATH "encode_file_path([obj [, etype]]) -> bytes or None\nEncode a Unicode or bytes object as a file system path" #define DOC_PYGAMEVERSION "small module containing version information" #define DOC_PYGAMEVERSIONVER "ver = '1.2'\nversion number as a string" #define DOC_PYGAMEVERSIONVERNUM "vernum = (1, 5, 3)\ntupled integers of the version" #define DOC_PYGAMEVERSIONREV "rev = 'a6f89747b551+'\nrepository revision of the build" #define DOC_PYGAMEVERSIONSDL "SDL = '(2, 0, 12)'\ntupled integers of the SDL library version" /* Docs in a comment... slightly easier to read. */ /* pygame the top level pygame package pygame.init init() -> (numpass, numfail) initialize all imported pygame modules pygame.quit quit() -> None uninitialize all pygame modules pygame.get_init get_init() -> bool returns True if pygame is currently initialized pygame.error raise pygame.error(message) standard pygame exception pygame.get_error get_error() -> errorstr get the current error message pygame.set_error set_error(error_msg) -> None set the current error message pygame.get_sdl_version get_sdl_version(linked=True) -> major, minor, patch get the version number of SDL pygame.get_sdl_byteorder get_sdl_byteorder() -> int get the byte order of SDL pygame.register_quit register_quit(callable) -> None register a function to be called when pygame quits pygame.encode_string encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None Encode a Unicode or bytes object pygame.encode_file_path encode_file_path([obj [, etype]]) -> bytes or None Encode a Unicode or bytes object as a file system path pygame.version small module containing version information pygame.version.ver ver = '1.2' version number as a string pygame.version.vernum vernum = (1, 5, 3) tupled integers of the version pygame.version.rev rev = 'a6f89747b551+' repository revision of the build pygame.version.SDL SDL = '(2, 0, 12)' tupled integers of the SDL library version */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.09614 pygame-2.6.1/src_c/doc/rect_doc.h0000644000175100001770000001540014676242424016213 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMERECT "Rect(left, top, width, height) -> Rect\nRect((left, top), (width, height)) -> Rect\nRect(object) -> Rect\npygame object for storing rectangular coordinates" #define DOC_RECTCOPY "copy() -> Rect\ncopy the rectangle" #define DOC_RECTMOVE "move(x, y) -> Rect\nmoves the rectangle" #define DOC_RECTMOVEIP "move_ip(x, y) -> None\nmoves the rectangle, in place" #define DOC_RECTINFLATE "inflate(x, y) -> Rect\ngrow or shrink the rectangle size" #define DOC_RECTINFLATEIP "inflate_ip(x, y) -> None\ngrow or shrink the rectangle size, in place" #define DOC_RECTSCALEBY "scale_by(scalar) -> Rect\nscale_by(scalex, scaley) -> Rect\nscale the rectangle by given a multiplier" #define DOC_RECTSCALEBYIP "scale_by_ip(scalar) -> None\nscale_by_ip(scalex, scaley) -> None\ngrow or shrink the rectangle size, in place" #define DOC_RECTUPDATE "update(left, top, width, height) -> None\nupdate((left, top), (width, height)) -> None\nupdate(object) -> None\nsets the position and size of the rectangle" #define DOC_RECTCLAMP "clamp(Rect) -> Rect\nmoves the rectangle inside another" #define DOC_RECTCLAMPIP "clamp_ip(Rect) -> None\nmoves the rectangle inside another, in place" #define DOC_RECTCLIP "clip(Rect) -> Rect\ncrops a rectangle inside another" #define DOC_RECTCLIPLINE "clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))\nclipline(x1, y1, x2, y2) -> ()\nclipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1), (x2, y2)) -> ()\nclipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1, x2, y2)) -> ()\nclipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))\nclipline(((x1, y1), (x2, y2))) -> ()\ncrops a line inside a rectangle" #define DOC_RECTUNION "union(Rect) -> Rect\njoins two rectangles into one" #define DOC_RECTUNIONIP "union_ip(Rect) -> None\njoins two rectangles into one, in place" #define DOC_RECTUNIONALL "unionall(Rect_sequence) -> Rect\nthe union of many rectangles" #define DOC_RECTUNIONALLIP "unionall_ip(Rect_sequence) -> None\nthe union of many rectangles, in place" #define DOC_RECTFIT "fit(Rect) -> Rect\nresize and move a rectangle with aspect ratio" #define DOC_RECTNORMALIZE "normalize() -> None\ncorrect negative sizes" #define DOC_RECTCONTAINS "contains(Rect) -> bool\ntest if one rectangle is inside another" #define DOC_RECTCOLLIDEPOINT "collidepoint(x, y) -> bool\ncollidepoint((x,y)) -> bool\ntest if a point is inside a rectangle" #define DOC_RECTCOLLIDERECT "colliderect(Rect) -> bool\ntest if two rectangles overlap" #define DOC_RECTCOLLIDELIST "collidelist(list) -> index\ntest if one rectangle in a list intersects" #define DOC_RECTCOLLIDELISTALL "collidelistall(list) -> indices\ntest if all rectangles in a list intersect" #define DOC_RECTCOLLIDEOBJECTS "collideobjects(rect_list) -> object\ncollideobjects(obj_list, key=func) -> object\ntest if any object in a list intersects" #define DOC_RECTCOLLIDEOBJECTSALL "collideobjectsall(rect_list) -> objects\ncollideobjectsall(obj_list, key=func) -> objects\ntest if all objects in a list intersect" #define DOC_RECTCOLLIDEDICT "collidedict(dict) -> (key, value)\ncollidedict(dict) -> None\ncollidedict(dict, use_values=0) -> (key, value)\ncollidedict(dict, use_values=0) -> None\ntest if one rectangle in a dictionary intersects" #define DOC_RECTCOLLIDEDICTALL "collidedictall(dict) -> [(key, value), ...]\ncollidedictall(dict, use_values=0) -> [(key, value), ...]\ntest if all rectangles in a dictionary intersect" /* Docs in a comment... slightly easier to read. */ /* pygame.Rect Rect(left, top, width, height) -> Rect Rect((left, top), (width, height)) -> Rect Rect(object) -> Rect pygame object for storing rectangular coordinates pygame.Rect.copy copy() -> Rect copy the rectangle pygame.Rect.move move(x, y) -> Rect moves the rectangle pygame.Rect.move_ip move_ip(x, y) -> None moves the rectangle, in place pygame.Rect.inflate inflate(x, y) -> Rect grow or shrink the rectangle size pygame.Rect.inflate_ip inflate_ip(x, y) -> None grow or shrink the rectangle size, in place pygame.Rect.scale_by scale_by(scalar) -> Rect scale_by(scalex, scaley) -> Rect scale the rectangle by given a multiplier pygame.Rect.scale_by_ip scale_by_ip(scalar) -> None scale_by_ip(scalex, scaley) -> None grow or shrink the rectangle size, in place pygame.Rect.update update(left, top, width, height) -> None update((left, top), (width, height)) -> None update(object) -> None sets the position and size of the rectangle pygame.Rect.clamp clamp(Rect) -> Rect moves the rectangle inside another pygame.Rect.clamp_ip clamp_ip(Rect) -> None moves the rectangle inside another, in place pygame.Rect.clip clip(Rect) -> Rect crops a rectangle inside another pygame.Rect.clipline clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2)) clipline(x1, y1, x2, y2) -> () clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2)) clipline((x1, y1), (x2, y2)) -> () clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2)) clipline((x1, y1, x2, y2)) -> () clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2)) clipline(((x1, y1), (x2, y2))) -> () crops a line inside a rectangle pygame.Rect.union union(Rect) -> Rect joins two rectangles into one pygame.Rect.union_ip union_ip(Rect) -> None joins two rectangles into one, in place pygame.Rect.unionall unionall(Rect_sequence) -> Rect the union of many rectangles pygame.Rect.unionall_ip unionall_ip(Rect_sequence) -> None the union of many rectangles, in place pygame.Rect.fit fit(Rect) -> Rect resize and move a rectangle with aspect ratio pygame.Rect.normalize normalize() -> None correct negative sizes pygame.Rect.contains contains(Rect) -> bool test if one rectangle is inside another pygame.Rect.collidepoint collidepoint(x, y) -> bool collidepoint((x,y)) -> bool test if a point is inside a rectangle pygame.Rect.colliderect colliderect(Rect) -> bool test if two rectangles overlap pygame.Rect.collidelist collidelist(list) -> index test if one rectangle in a list intersects pygame.Rect.collidelistall collidelistall(list) -> indices test if all rectangles in a list intersect pygame.Rect.collideobjects collideobjects(rect_list) -> object collideobjects(obj_list, key=func) -> object test if any object in a list intersects pygame.Rect.collideobjectsall collideobjectsall(rect_list) -> objects collideobjectsall(obj_list, key=func) -> objects test if all objects in a list intersect pygame.Rect.collidedict collidedict(dict) -> (key, value) collidedict(dict) -> None collidedict(dict, use_values=0) -> (key, value) collidedict(dict, use_values=0) -> None test if one rectangle in a dictionary intersects pygame.Rect.collidedictall collidedictall(dict) -> [(key, value), ...] collidedictall(dict, use_values=0) -> [(key, value), ...] test if all rectangles in a dictionary intersect */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.13714 pygame-2.6.1/src_c/doc/scrap_doc.h0000644000175100001770000000343214676242424016370 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESCRAP "pygame module for clipboard support." #define DOC_PYGAMESCRAPINIT "init() -> None\nInitializes the scrap module." #define DOC_PYGAMESCRAPGETINIT "get_init() -> bool\nReturns True if the scrap module is currently initialized." #define DOC_PYGAMESCRAPGET "get(type) -> bytes | None\nGets the data for the specified type from the clipboard." #define DOC_PYGAMESCRAPGETTYPES "get_types() -> list\nGets a list of the available clipboard types." #define DOC_PYGAMESCRAPPUT "put(type, data) -> None\nPlaces data into the clipboard." #define DOC_PYGAMESCRAPCONTAINS "contains(type) -> bool\nChecks whether data for a given type is available in the clipboard." #define DOC_PYGAMESCRAPLOST "lost() -> bool\nIndicates if the clipboard ownership has been lost by the pygame application." #define DOC_PYGAMESCRAPSETMODE "set_mode(mode) -> None\nSets the clipboard access mode." /* Docs in a comment... slightly easier to read. */ /* pygame.scrap pygame module for clipboard support. pygame.scrap.init init() -> None Initializes the scrap module. pygame.scrap.get_init get_init() -> bool Returns True if the scrap module is currently initialized. pygame.scrap.get get(type) -> bytes | None Gets the data for the specified type from the clipboard. pygame.scrap.get_types get_types() -> list Gets a list of the available clipboard types. pygame.scrap.put put(type, data) -> None Places data into the clipboard. pygame.scrap.contains contains(type) -> bool Checks whether data for a given type is available in the clipboard. pygame.scrap.lost lost() -> bool Indicates if the clipboard ownership has been lost by the pygame application. pygame.scrap.set_mode set_mode(mode) -> None Sets the clipboard access mode. */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.18114 pygame-2.6.1/src_c/doc/sdl2_controller_doc.h0000644000175100001770000001110214676242424020360 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESDL2CONTROLLER "Pygame module to work with controllers." #define DOC_PYGAMESDL2CONTROLLERINIT "init() -> None\ninitialize the controller module" #define DOC_PYGAMESDL2CONTROLLERQUIT "quit() -> None\nUninitialize the controller module." #define DOC_PYGAMESDL2CONTROLLERGETINIT "get_init() -> bool\nReturns True if the controller module is initialized." #define DOC_PYGAMESDL2CONTROLLERSETEVENTSTATE "set_eventstate(state) -> None\nSets the current state of events related to controllers" #define DOC_PYGAMESDL2CONTROLLERGETEVENTSTATE "get_eventstate() -> bool\nGets the current state of events related to controllers" #define DOC_PYGAMESDL2CONTROLLERGETCOUNT "get_count() -> int\nGet the number of joysticks connected" #define DOC_PYGAMESDL2CONTROLLERISCONTROLLER "is_controller(index) -> bool\nCheck if the given joystick is supported by the game controller interface" #define DOC_PYGAMESDL2CONTROLLERNAMEFORINDEX "name_forindex(index) -> name or None\nGet the name of the controller" #define DOC_PYGAMESDL2CONTROLLERCONTROLLER "Controller(index) -> Controller\nCreate a new Controller object." #define DOC_CONTROLLERQUIT "quit() -> None\nuninitialize the Controller" #define DOC_CONTROLLERGETINIT "get_init() -> bool\ncheck if the Controller is initialized" #define DOC_CONTROLLERFROMJOYSTICK "from_joystick(joystick) -> Controller\nCreate a Controller from a pygame.joystick.Joystick object" #define DOC_CONTROLLERATTACHED "attached() -> bool\nCheck if the Controller has been opened and is currently connected." #define DOC_CONTROLLERASJOYSTICK "as_joystick() -> Joystick object\nReturns a pygame.joystick.Joystick() object" #define DOC_CONTROLLERGETAXIS "get_axis(axis) -> int\nGet the current state of a joystick axis" #define DOC_CONTROLLERGETBUTTON "get_button(button) -> bool\nGet the current state of a button" #define DOC_CONTROLLERGETMAPPING "get_mapping() -> mapping\nGet the mapping assigned to the controller" #define DOC_CONTROLLERSETMAPPING "set_mapping(mapping) -> int\nAssign a mapping to the controller" #define DOC_CONTROLLERRUMBLE "rumble(low_frequency, high_frequency, duration) -> bool\nStart a rumbling effect" #define DOC_CONTROLLERSTOPRUMBLE "stop_rumble() -> None\nStop any rumble effect playing" /* Docs in a comment... slightly easier to read. */ /* pygame._sdl2.controller Pygame module to work with controllers. pygame._sdl2.controller.init init() -> None initialize the controller module pygame._sdl2.controller.quit quit() -> None Uninitialize the controller module. pygame._sdl2.controller.get_init get_init() -> bool Returns True if the controller module is initialized. pygame._sdl2.controller.set_eventstate set_eventstate(state) -> None Sets the current state of events related to controllers pygame._sdl2.controller.get_eventstate get_eventstate() -> bool Gets the current state of events related to controllers pygame._sdl2.controller.get_count get_count() -> int Get the number of joysticks connected pygame._sdl2.controller.is_controller is_controller(index) -> bool Check if the given joystick is supported by the game controller interface pygame._sdl2.controller.name_forindex name_forindex(index) -> name or None Get the name of the controller pygame._sdl2.controller.Controller Controller(index) -> Controller Create a new Controller object. pygame._sdl2.controller.Controller.quit quit() -> None uninitialize the Controller pygame._sdl2.controller.Controller.get_init get_init() -> bool check if the Controller is initialized pygame._sdl2.controller.Controller.from_joystick from_joystick(joystick) -> Controller Create a Controller from a pygame.joystick.Joystick object pygame._sdl2.controller.Controller.attached attached() -> bool Check if the Controller has been opened and is currently connected. pygame._sdl2.controller.Controller.as_joystick as_joystick() -> Joystick object Returns a pygame.joystick.Joystick() object pygame._sdl2.controller.Controller.get_axis get_axis(axis) -> int Get the current state of a joystick axis pygame._sdl2.controller.Controller.get_button get_button(button) -> bool Get the current state of a button pygame._sdl2.controller.Controller.get_mapping get_mapping() -> mapping Get the mapping assigned to the controller pygame._sdl2.controller.Controller.set_mapping set_mapping(mapping) -> int Assign a mapping to the controller pygame._sdl2.controller.Controller.rumble rumble(low_frequency, high_frequency, duration) -> bool Start a rumbling effect pygame._sdl2.controller.Controller.stop_rumble stop_rumble() -> None Stop any rumble effect playing */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.24014 pygame-2.6.1/src_c/doc/sdl2_video_doc.h0000644000175100001770000003467714676242424017331 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESDL2VIDEO "Experimental pygame module for porting new SDL video systems" #define DOC_PYGAMESDL2VIDEOWINDOW "Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window\npygame object that represents a window" #define DOC_WINDOWFROMDISPLAYMODULE "from_display_module() -> Window\nCreates window using window created by pygame.display.set_mode()." #define DOC_WINDOWFROMWINDOW "from_window(other) -> Window\nCreate Window from another window. Could be from another UI toolkit." #define DOC_WINDOWGRAB "grab -> bool\nGets or sets whether the mouse is confined to the window." #define DOC_WINDOWRELATIVEMOUSE "relative_mouse -> bool\nGets or sets the window's relative mouse motion state." #define DOC_WINDOWSETWINDOWED "set_windowed() -> None\nEnable windowed mode (exit fullscreen)." #define DOC_WINDOWSETFULLSCREEN "set_fullscreen(desktop=False) -> None\nEnter fullscreen." #define DOC_WINDOWTITLE "title -> string\nGets or sets whether the window title." #define DOC_WINDOWDESTROY "destroy() -> None\nDestroys the window." #define DOC_WINDOWHIDE "hide() -> None\nHide the window." #define DOC_WINDOWSHOW "show() -> None\nShow the window." #define DOC_WINDOWFOCUS "focus(input_only=False) -> None\nRaise the window above other windows and set the input focus. The "input_only" argument is only supported on X11." #define DOC_WINDOWRESTORE "restore() -> None\nRestore the size and position of a minimized or maximized window." #define DOC_WINDOWMAXIMIZE "maximize() -> None\nMaximize the window." #define DOC_WINDOWMINIMIZE "maximize() -> None\nMinimize the window." #define DOC_WINDOWRESIZABLE "resizable -> bool\nGets and sets whether the window is resizable." #define DOC_WINDOWBORDERLESS "borderless -> bool\nAdd or remove the border from the window." #define DOC_WINDOWSETICON "set_icon(surface) -> None\nSet the icon for the window." #define DOC_WINDOWID "id -> int\nGet the unique window ID. *Read-only*" #define DOC_WINDOWSIZE "size -> (int, int)\nGets and sets the window size." #define DOC_WINDOWPOSITION "position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED\nGets and sets the window position." #define DOC_WINDOWOPACITY "opacity -> float\nGets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque)." #define DOC_WINDOWDISPLAYINDEX "display_index -> int\nGet the index of the display that owns the window. *Read-only*" #define DOC_WINDOWSETMODALFOR "set_modal_for(Window) -> None\nSet the window as a modal for a parent window. This function is only supported on X11." #define DOC_PYGAMESDL2VIDEOTEXTURE "Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture\npygame object that representing a Texture." #define DOC_TEXTUREFROMSURFACE "from_surface(renderer, surface) -> Texture\nCreate a texture from an existing surface." #define DOC_TEXTURERENDERER "renderer -> Renderer\nGets the renderer associated with the Texture. *Read-only*" #define DOC_TEXTUREWIDTH "width -> int\nGets the width of the Texture. *Read-only*" #define DOC_TEXTUREHEIGHT "height -> int\nGets the height of the Texture. *Read-only*" #define DOC_TEXTUREALPHA "alpha -> int\nGets and sets an additional alpha value multiplied into render copy operations." #define DOC_TEXTUREBLENDMODE "blend_mode -> int\nGets and sets the blend mode for the Texture." #define DOC_TEXTURECOLOR "color -> color\nGets and sets an additional color value multiplied into render copy operations." #define DOC_TEXTUREGETRECT "get_rect(**kwargs) -> Rect\nGet the rectangular area of the texture." #define DOC_TEXTUREDRAW "draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None\nCopy a portion of the texture to the rendering target." #define DOC_TEXTUREUPDATE "update(surface, area=None) -> None\nUpdate the texture with a Surface. WARNING: Slow operation, use sparingly." #define DOC_PYGAMESDL2VIDEOIMAGE "Image(textureOrImage, srcrect=None) -> Image\nEasy way to use a portion of a Texture without worrying about srcrect all the time." #define DOC_IMAGEGETRECT "get_rect() -> Rect\nGet the rectangular area of the Image." #define DOC_IMAGEDRAW "draw(srcrect=None, dstrect=None) -> None\nCopy a portion of the Image to the rendering target." #define DOC_IMAGEANGLE "angle -> float\nGets and sets the angle the Image draws itself with." #define DOC_IMAGEORIGIN "origin -> (float, float) or None.\nGets and sets the origin. Origin=None means the Image will be rotated around its center." #define DOC_IMAGEFLIPX "flip_x -> bool\nGets and sets whether the Image is flipped on the x axis." #define DOC_IMAGEFLIPY "flip_y -> bool\nGets and sets whether the Image is flipped on the y axis." #define DOC_IMAGECOLOR "color -> Color\nGets and sets the Image color modifier." #define DOC_IMAGEALPHA "alpha -> float\nGets and sets the Image alpha modifier." #define DOC_IMAGEBLENDMODE "blend_mode -> int\nGets and sets the blend mode for the Image." #define DOC_IMAGETEXTURE "texture -> Texture\nGets and sets the Texture the Image is based on." #define DOC_IMAGESRCRECT "srcrect -> Rect\nGets and sets the Rect the Image is based on." #define DOC_PYGAMESDL2VIDEORENDERER "Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer\nCreate a 2D rendering context for a window." #define DOC_RENDERERFROMWINDOW "from_window(window) -> Renderer\nEasy way to create a Renderer." #define DOC_RENDERERDRAWBLENDMODE "draw_blend_mode -> int\nGets and sets the blend mode used by the drawing functions." #define DOC_RENDERERDRAWCOLOR "draw_color -> Color\nGets and sets the color used by the drawing functions." #define DOC_RENDERERCLEAR "clear() -> None\nClear the current rendering target with the drawing color." #define DOC_RENDERERPRESENT "present() -> None\nUpdates the screen with any new rendering since previous call." #define DOC_RENDERERGETVIEWPORT "get_viewport() -> Rect\nReturns the drawing area on the target." #define DOC_RENDERERSETVIEWPORT "set_viewport(area) -> None\nSet the drawing area on the target. If area is None, the entire target will be used." #define DOC_RENDERERLOGICALSIZE "logical_size -> (int width, int height)\nGets and sets the logical size." #define DOC_RENDERERSCALE "scale -> (float x_scale, float y_scale)\nGets and sets the scale." #define DOC_RENDERERTARGET "target -> Texture or None\nGets and sets the render target. None represents the default target (the renderer)." #define DOC_RENDERERBLIT "blit(source, dest, area=None, special_flags=0)-> Rect\nFor compatibility purposes. Textures created by different Renderers cannot be shared!" #define DOC_RENDERERDRAWLINE "draw_line(p1, p2) -> None\nDraws a line." #define DOC_RENDERERDRAWPOINT "draw_point(point) -> None\nDraws a point." #define DOC_RENDERERDRAWRECT "draw_rect(rect)-> None\nDraws a rectangle." #define DOC_RENDERERFILLRECT "fill_rect(rect)-> None\nFills a rectangle." #define DOC_RENDERERTOSURFACE "to_surface(surface=None, area=None)-> Surface\nRead pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly." /* Docs in a comment... slightly easier to read. */ /* pygame.sdl2_video Experimental pygame module for porting new SDL video systems pygame._sdl2.video.Window Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window pygame object that represents a window pygame._sdl2.video.Window.from_display_module from_display_module() -> Window Creates window using window created by pygame.display.set_mode(). pygame._sdl2.video.Window.from_window from_window(other) -> Window Create Window from another window. Could be from another UI toolkit. pygame._sdl2.video.Window.grab grab -> bool Gets or sets whether the mouse is confined to the window. pygame._sdl2.video.Window.relative_mouse relative_mouse -> bool Gets or sets the window's relative mouse motion state. pygame._sdl2.video.Window.set_windowed set_windowed() -> None Enable windowed mode (exit fullscreen). pygame._sdl2.video.Window.set_fullscreen set_fullscreen(desktop=False) -> None Enter fullscreen. pygame._sdl2.video.Window.title title -> string Gets or sets whether the window title. pygame._sdl2.video.Window.destroy destroy() -> None Destroys the window. pygame._sdl2.video.Window.hide hide() -> None Hide the window. pygame._sdl2.video.Window.show show() -> None Show the window. pygame._sdl2.video.Window.focus focus(input_only=False) -> None Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11. pygame._sdl2.video.Window.restore restore() -> None Restore the size and position of a minimized or maximized window. pygame._sdl2.video.Window.maximize maximize() -> None Maximize the window. pygame._sdl2.video.Window.minimize maximize() -> None Minimize the window. pygame._sdl2.video.Window.resizable resizable -> bool Gets and sets whether the window is resizable. pygame._sdl2.video.Window.borderless borderless -> bool Add or remove the border from the window. pygame._sdl2.video.Window.set_icon set_icon(surface) -> None Set the icon for the window. pygame._sdl2.video.Window.id id -> int Get the unique window ID. *Read-only* pygame._sdl2.video.Window.size size -> (int, int) Gets and sets the window size. pygame._sdl2.video.Window.position position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED Gets and sets the window position. pygame._sdl2.video.Window.opacity opacity -> float Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque). pygame._sdl2.video.Window.display_index display_index -> int Get the index of the display that owns the window. *Read-only* pygame._sdl2.video.Window.set_modal_for set_modal_for(Window) -> None Set the window as a modal for a parent window. This function is only supported on X11. pygame._sdl2.video.Texture Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture pygame object that representing a Texture. pygame._sdl2.video.Texture.from_surface from_surface(renderer, surface) -> Texture Create a texture from an existing surface. pygame._sdl2.video.Texture.renderer renderer -> Renderer Gets the renderer associated with the Texture. *Read-only* pygame._sdl2.video.Texture.width width -> int Gets the width of the Texture. *Read-only* pygame._sdl2.video.Texture.height height -> int Gets the height of the Texture. *Read-only* pygame._sdl2.video.Texture.alpha alpha -> int Gets and sets an additional alpha value multiplied into render copy operations. pygame._sdl2.video.Texture.blend_mode blend_mode -> int Gets and sets the blend mode for the Texture. pygame._sdl2.video.Texture.color color -> color Gets and sets an additional color value multiplied into render copy operations. pygame._sdl2.video.Texture.get_rect get_rect(**kwargs) -> Rect Get the rectangular area of the texture. pygame._sdl2.video.Texture.draw draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None Copy a portion of the texture to the rendering target. pygame._sdl2.video.Texture.update update(surface, area=None) -> None Update the texture with a Surface. WARNING: Slow operation, use sparingly. pygame._sdl2.video.Image Image(textureOrImage, srcrect=None) -> Image Easy way to use a portion of a Texture without worrying about srcrect all the time. pygame._sdl2.video.Image.get_rect get_rect() -> Rect Get the rectangular area of the Image. pygame._sdl2.video.Image.draw draw(srcrect=None, dstrect=None) -> None Copy a portion of the Image to the rendering target. pygame._sdl2.video.Image.angle angle -> float Gets and sets the angle the Image draws itself with. pygame._sdl2.video.Image.origin origin -> (float, float) or None. Gets and sets the origin. Origin=None means the Image will be rotated around its center. pygame._sdl2.video.Image.flip_x flip_x -> bool Gets and sets whether the Image is flipped on the x axis. pygame._sdl2.video.Image.flip_y flip_y -> bool Gets and sets whether the Image is flipped on the y axis. pygame._sdl2.video.Image.color color -> Color Gets and sets the Image color modifier. pygame._sdl2.video.Image.alpha alpha -> float Gets and sets the Image alpha modifier. pygame._sdl2.video.Image.blend_mode blend_mode -> int Gets and sets the blend mode for the Image. pygame._sdl2.video.Image.texture texture -> Texture Gets and sets the Texture the Image is based on. pygame._sdl2.video.Image.srcrect srcrect -> Rect Gets and sets the Rect the Image is based on. pygame._sdl2.video.Renderer Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer Create a 2D rendering context for a window. pygame._sdl2.video.Renderer.from_window from_window(window) -> Renderer Easy way to create a Renderer. pygame._sdl2.video.Renderer.draw_blend_mode draw_blend_mode -> int Gets and sets the blend mode used by the drawing functions. pygame._sdl2.video.Renderer.draw_color draw_color -> Color Gets and sets the color used by the drawing functions. pygame._sdl2.video.Renderer.clear clear() -> None Clear the current rendering target with the drawing color. pygame._sdl2.video.Renderer.present present() -> None Updates the screen with any new rendering since previous call. pygame._sdl2.video.Renderer.get_viewport get_viewport() -> Rect Returns the drawing area on the target. pygame._sdl2.video.Renderer.set_viewport set_viewport(area) -> None Set the drawing area on the target. If area is None, the entire target will be used. pygame._sdl2.video.Renderer.logical_size logical_size -> (int width, int height) Gets and sets the logical size. pygame._sdl2.video.Renderer.scale scale -> (float x_scale, float y_scale) Gets and sets the scale. pygame._sdl2.video.Renderer.target target -> Texture or None Gets and sets the render target. None represents the default target (the renderer). pygame._sdl2.video.Renderer.blit blit(source, dest, area=None, special_flags=0)-> Rect For compatibility purposes. Textures created by different Renderers cannot be shared! pygame._sdl2.video.Renderer.draw_line draw_line(p1, p2) -> None Draws a line. pygame._sdl2.video.Renderer.draw_point draw_point(point) -> None Draws a point. pygame._sdl2.video.Renderer.draw_rect draw_rect(rect)-> None Draws a rectangle. pygame._sdl2.video.Renderer.fill_rect fill_rect(rect)-> None Fills a rectangle. pygame._sdl2.video.Renderer.to_surface to_surface(surface=None, area=None)-> Surface Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly. */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.25914 pygame-2.6.1/src_c/doc/sndarray_doc.h0000644000175100001770000000272514676242424017107 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESNDARRAY "pygame module for accessing sound sample data" #define DOC_PYGAMESNDARRAYARRAY "array(Sound) -> array\ncopy Sound samples into an array" #define DOC_PYGAMESNDARRAYSAMPLES "samples(Sound) -> array\nreference Sound samples into an array" #define DOC_PYGAMESNDARRAYMAKESOUND "make_sound(array) -> Sound\nconvert an array into a Sound object" #define DOC_PYGAMESNDARRAYUSEARRAYTYPE "use_arraytype (arraytype) -> None\nSets the array system to be used for sound arrays" #define DOC_PYGAMESNDARRAYGETARRAYTYPE "get_arraytype () -> str\nGets the currently active array type." #define DOC_PYGAMESNDARRAYGETARRAYTYPES "get_arraytypes () -> tuple\nGets the array system types currently supported." /* Docs in a comment... slightly easier to read. */ /* pygame.sndarray pygame module for accessing sound sample data pygame.sndarray.array array(Sound) -> array copy Sound samples into an array pygame.sndarray.samples samples(Sound) -> array reference Sound samples into an array pygame.sndarray.make_sound make_sound(array) -> Sound convert an array into a Sound object pygame.sndarray.use_arraytype use_arraytype (arraytype) -> None Sets the array system to be used for sound arrays pygame.sndarray.get_arraytype get_arraytype () -> str Gets the currently active array type. pygame.sndarray.get_arraytypes get_arraytypes () -> tuple Gets the array system types currently supported. */././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1727612180.36114 pygame-2.6.1/src_c/doc/sprite_doc.h0000644000175100001770000003445014676242424016572 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESPRITE "pygame module with basic game object classes" #define DOC_PYGAMESPRITESPRITE "Sprite(*groups) -> Sprite\nSimple base class for visible game objects." #define DOC_SPRITEUPDATE "update(*args, **kwargs) -> None\nmethod to control sprite behavior" #define DOC_SPRITEADD "add(*groups) -> None\nadd the sprite to groups" #define DOC_SPRITEREMOVE "remove(*groups) -> None\nremove the sprite from groups" #define DOC_SPRITEKILL "kill() -> None\nremove the Sprite from all Groups" #define DOC_SPRITEALIVE "alive() -> bool\ndoes the sprite belong to any groups" #define DOC_SPRITEGROUPS "groups() -> group_list\nlist of Groups that contain this Sprite" #define DOC_PYGAMESPRITEWEAKSPRITE "WeakSprite(*groups) -> WeakSprite\nA subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically." #define DOC_PYGAMESPRITEDIRTYSPRITE "DirtySprite(*groups) -> DirtySprite\nA subclass of Sprite with more attributes and features." #define DOC_PYGAMESPRITEGROUP "Group(*sprites) -> Group\nA container class to hold and manage multiple Sprite objects." #define DOC_GROUPSPRITES "sprites() -> sprite_list\nlist of the Sprites this Group contains" #define DOC_GROUPCOPY "copy() -> Group\nduplicate the Group" #define DOC_GROUPADD "add(*sprites) -> None\nadd Sprites to this Group" #define DOC_GROUPREMOVE "remove(*sprites) -> None\nremove Sprites from the Group" #define DOC_GROUPHAS "has(*sprites) -> bool\ntest if a Group contains Sprites" #define DOC_GROUPUPDATE "update(*args, **kwargs) -> None\ncall the update method on contained Sprites" #define DOC_GROUPDRAW "draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]\nblit the Sprite images" #define DOC_GROUPCLEAR "clear(Surface_dest, background) -> None\ndraw a background over the Sprites" #define DOC_GROUPEMPTY "empty() -> None\nremove all Sprites" #define DOC_PYGAMESPRITEWEAKDIRTYSPRITE "WeakDirtySprite(*groups) -> WeakDirtySprite\nA subclass of WeakSprite and DirtySprite that combines the benefits of both classes." #define DOC_PYGAMESPRITERENDERPLAIN "Same as pygame.sprite.Group" #define DOC_PYGAMESPRITERENDERCLEAR "Same as pygame.sprite.Group" #define DOC_PYGAMESPRITERENDERUPDATES "RenderUpdates(*sprites) -> RenderUpdates\nGroup sub-class that tracks dirty updates." #define DOC_RENDERUPDATESDRAW "draw(surface, bgsurf=None, special_flags=0) -> Rect_list\nblit the Sprite images and track changed areas" #define DOC_PYGAMESPRITEORDEREDUPDATES "OrderedUpdates(*sprites) -> OrderedUpdates\nRenderUpdates sub-class that draws Sprites in order of addition." #define DOC_PYGAMESPRITELAYEREDUPDATES "LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates\nLayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates." #define DOC_LAYEREDUPDATESADD "add(*sprites, **kwargs) -> None\nadd a sprite or sequence of sprites to a group" #define DOC_LAYEREDUPDATESSPRITES "sprites() -> sprites\nreturns a ordered list of sprites (first back, last top)." #define DOC_LAYEREDUPDATESDRAW "draw(surface, bgsurf=None, special_flags=0) -> Rect_list\ndraw all sprites in the right order onto the passed surface." #define DOC_LAYEREDUPDATESGETSPRITESAT "get_sprites_at(pos) -> colliding_sprites\nreturns a list with all sprites at that position." #define DOC_LAYEREDUPDATESGETSPRITE "get_sprite(idx) -> sprite\nreturns the sprite at the index idx from the groups sprites" #define DOC_LAYEREDUPDATESREMOVESPRITESOFLAYER "remove_sprites_of_layer(layer_nr) -> sprites\nremoves all sprites from a layer and returns them as a list." #define DOC_LAYEREDUPDATESLAYERS "layers() -> layers\nreturns a list of layers defined (unique), sorted from bottom up." #define DOC_LAYEREDUPDATESCHANGELAYER "change_layer(sprite, new_layer) -> None\nchanges the layer of the sprite" #define DOC_LAYEREDUPDATESGETLAYEROFSPRITE "get_layer_of_sprite(sprite) -> layer\nreturns the layer that sprite is currently in." #define DOC_LAYEREDUPDATESGETTOPLAYER "get_top_layer() -> layer\nreturns the top layer" #define DOC_LAYEREDUPDATESGETBOTTOMLAYER "get_bottom_layer() -> layer\nreturns the bottom layer" #define DOC_LAYEREDUPDATESMOVETOFRONT "move_to_front(sprite) -> None\nbrings the sprite to front layer" #define DOC_LAYEREDUPDATESMOVETOBACK "move_to_back(sprite) -> None\nmoves the sprite to the bottom layer" #define DOC_LAYEREDUPDATESGETTOPSPRITE "get_top_sprite() -> Sprite\nreturns the topmost sprite" #define DOC_LAYEREDUPDATESGETSPRITESFROMLAYER "get_sprites_from_layer(layer) -> sprites\nreturns all sprites from a layer, ordered by how they where added" #define DOC_LAYEREDUPDATESSWITCHLAYER "switch_layer(layer1_nr, layer2_nr) -> None\nswitches the sprites from layer1 to layer2" #define DOC_PYGAMESPRITELAYEREDDIRTY "LayeredDirty(*sprites, **kwargs) -> LayeredDirty\nLayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates." #define DOC_LAYEREDDIRTYDRAW "draw(surface, bgsurf=None, special_flags=None) -> Rect_list\ndraw all sprites in the right order onto the passed surface." #define DOC_LAYEREDDIRTYCLEAR "clear(surface, bgd) -> None\nused to set background" #define DOC_LAYEREDDIRTYREPAINTRECT "repaint_rect(screen_rect) -> None\nrepaints the given area" #define DOC_LAYEREDDIRTYSETCLIP "set_clip(screen_rect=None) -> None\nclip the area where to draw. Just pass None (default) to reset the clip" #define DOC_LAYEREDDIRTYGETCLIP "get_clip() -> Rect\nclip the area where to draw. Just pass None (default) to reset the clip" #define DOC_LAYEREDDIRTYCHANGELAYER "change_layer(sprite, new_layer) -> None\nchanges the layer of the sprite" #define DOC_LAYEREDDIRTYSETTIMINGTRESHOLD "set_timing_treshold(time_ms) -> None\nsets the threshold in milliseconds" #define DOC_LAYEREDDIRTYSETTIMINGTHRESHOLD "set_timing_threshold(time_ms) -> None\nsets the threshold in milliseconds" #define DOC_PYGAMESPRITEGROUPSINGLE "GroupSingle(sprite=None) -> GroupSingle\nGroup container that holds a single sprite." #define DOC_PYGAMESPRITESPRITECOLLIDE "spritecollide(sprite, group, dokill, collided = None) -> Sprite_list\nFind sprites in a group that intersect another sprite." #define DOC_PYGAMESPRITECOLLIDERECT "collide_rect(left, right) -> bool\nCollision detection between two sprites, using rects." #define DOC_PYGAMESPRITECOLLIDERECTRATIO "collide_rect_ratio(ratio) -> collided_callable\nCollision detection between two sprites, using rects scaled to a ratio." #define DOC_PYGAMESPRITECOLLIDECIRCLE "collide_circle(left, right) -> bool\nCollision detection between two sprites, using circles." #define DOC_PYGAMESPRITECOLLIDECIRCLERATIO "collide_circle_ratio(ratio) -> collided_callable\nCollision detection between two sprites, using circles scaled to a ratio." #define DOC_PYGAMESPRITECOLLIDEMASK "collide_mask(sprite1, sprite2) -> (int, int)\ncollide_mask(sprite1, sprite2) -> None\nCollision detection between two sprites, using masks." #define DOC_PYGAMESPRITEGROUPCOLLIDE "groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict\nFind all sprites that collide between two groups." #define DOC_PYGAMESPRITESPRITECOLLIDEANY "spritecollideany(sprite, group, collided = None) -> Sprite\nspritecollideany(sprite, group, collided = None) -> None\nSimple test if a sprite intersects anything in a group." /* Docs in a comment... slightly easier to read. */ /* pygame.sprite pygame module with basic game object classes pygame.sprite.Sprite Sprite(*groups) -> Sprite Simple base class for visible game objects. pygame.sprite.Sprite.update update(*args, **kwargs) -> None method to control sprite behavior pygame.sprite.Sprite.add add(*groups) -> None add the sprite to groups pygame.sprite.Sprite.remove remove(*groups) -> None remove the sprite from groups pygame.sprite.Sprite.kill kill() -> None remove the Sprite from all Groups pygame.sprite.Sprite.alive alive() -> bool does the sprite belong to any groups pygame.sprite.Sprite.groups groups() -> group_list list of Groups that contain this Sprite pygame.sprite.WeakSprite WeakSprite(*groups) -> WeakSprite A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically. pygame.sprite.DirtySprite DirtySprite(*groups) -> DirtySprite A subclass of Sprite with more attributes and features. pygame.sprite.Group Group(*sprites) -> Group A container class to hold and manage multiple Sprite objects. pygame.sprite.Group.sprites sprites() -> sprite_list list of the Sprites this Group contains pygame.sprite.Group.copy copy() -> Group duplicate the Group pygame.sprite.Group.add add(*sprites) -> None add Sprites to this Group pygame.sprite.Group.remove remove(*sprites) -> None remove Sprites from the Group pygame.sprite.Group.has has(*sprites) -> bool test if a Group contains Sprites pygame.sprite.Group.update update(*args, **kwargs) -> None call the update method on contained Sprites pygame.sprite.Group.draw draw(Surface, bgsurf=None, special_flags=0) -> List[Rect] blit the Sprite images pygame.sprite.Group.clear clear(Surface_dest, background) -> None draw a background over the Sprites pygame.sprite.Group.empty empty() -> None remove all Sprites pygame.sprite.WeakDirtySprite WeakDirtySprite(*groups) -> WeakDirtySprite A subclass of WeakSprite and DirtySprite that combines the benefits of both classes. pygame.sprite.RenderPlain Same as pygame.sprite.Group pygame.sprite.RenderClear Same as pygame.sprite.Group pygame.sprite.RenderUpdates RenderUpdates(*sprites) -> RenderUpdates Group sub-class that tracks dirty updates. pygame.sprite.RenderUpdates.draw draw(surface, bgsurf=None, special_flags=0) -> Rect_list blit the Sprite images and track changed areas pygame.sprite.OrderedUpdates OrderedUpdates(*sprites) -> OrderedUpdates RenderUpdates sub-class that draws Sprites in order of addition. pygame.sprite.LayeredUpdates LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates. pygame.sprite.LayeredUpdates.add add(*sprites, **kwargs) -> None add a sprite or sequence of sprites to a group pygame.sprite.LayeredUpdates.sprites sprites() -> sprites returns a ordered list of sprites (first back, last top). pygame.sprite.LayeredUpdates.draw draw(surface, bgsurf=None, special_flags=0) -> Rect_list draw all sprites in the right order onto the passed surface. pygame.sprite.LayeredUpdates.get_sprites_at get_sprites_at(pos) -> colliding_sprites returns a list with all sprites at that position. pygame.sprite.LayeredUpdates.get_sprite get_sprite(idx) -> sprite returns the sprite at the index idx from the groups sprites pygame.sprite.LayeredUpdates.remove_sprites_of_layer remove_sprites_of_layer(layer_nr) -> sprites removes all sprites from a layer and returns them as a list. pygame.sprite.LayeredUpdates.layers layers() -> layers returns a list of layers defined (unique), sorted from bottom up. pygame.sprite.LayeredUpdates.change_layer change_layer(sprite, new_layer) -> None changes the layer of the sprite pygame.sprite.LayeredUpdates.get_layer_of_sprite get_layer_of_sprite(sprite) -> layer returns the layer that sprite is currently in. pygame.sprite.LayeredUpdates.get_top_layer get_top_layer() -> layer returns the top layer pygame.sprite.LayeredUpdates.get_bottom_layer get_bottom_layer() -> layer returns the bottom layer pygame.sprite.LayeredUpdates.move_to_front move_to_front(sprite) -> None brings the sprite to front layer pygame.sprite.LayeredUpdates.move_to_back move_to_back(sprite) -> None moves the sprite to the bottom layer pygame.sprite.LayeredUpdates.get_top_sprite get_top_sprite() -> Sprite returns the topmost sprite pygame.sprite.LayeredUpdates.get_sprites_from_layer get_sprites_from_layer(layer) -> sprites returns all sprites from a layer, ordered by how they where added pygame.sprite.LayeredUpdates.switch_layer switch_layer(layer1_nr, layer2_nr) -> None switches the sprites from layer1 to layer2 pygame.sprite.LayeredDirty LayeredDirty(*sprites, **kwargs) -> LayeredDirty LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates. pygame.sprite.LayeredDirty.draw draw(surface, bgsurf=None, special_flags=None) -> Rect_list draw all sprites in the right order onto the passed surface. pygame.sprite.LayeredDirty.clear clear(surface, bgd) -> None used to set background pygame.sprite.LayeredDirty.repaint_rect repaint_rect(screen_rect) -> None repaints the given area pygame.sprite.LayeredDirty.set_clip set_clip(screen_rect=None) -> None clip the area where to draw. Just pass None (default) to reset the clip pygame.sprite.LayeredDirty.get_clip get_clip() -> Rect clip the area where to draw. Just pass None (default) to reset the clip pygame.sprite.LayeredDirty.change_layer change_layer(sprite, new_layer) -> None changes the layer of the sprite pygame.sprite.LayeredDirty.set_timing_treshold set_timing_treshold(time_ms) -> None sets the threshold in milliseconds pygame.sprite.LayeredDirty.set_timing_threshold set_timing_threshold(time_ms) -> None sets the threshold in milliseconds pygame.sprite.GroupSingle GroupSingle(sprite=None) -> GroupSingle Group container that holds a single sprite. pygame.sprite.spritecollide spritecollide(sprite, group, dokill, collided = None) -> Sprite_list Find sprites in a group that intersect another sprite. pygame.sprite.collide_rect collide_rect(left, right) -> bool Collision detection between two sprites, using rects. pygame.sprite.collide_rect_ratio collide_rect_ratio(ratio) -> collided_callable Collision detection between two sprites, using rects scaled to a ratio. pygame.sprite.collide_circle collide_circle(left, right) -> bool Collision detection between two sprites, using circles. pygame.sprite.collide_circle_ratio collide_circle_ratio(ratio) -> collided_callable Collision detection between two sprites, using circles scaled to a ratio. pygame.sprite.collide_mask collide_mask(sprite1, sprite2) -> (int, int) collide_mask(sprite1, sprite2) -> None Collision detection between two sprites, using masks. pygame.sprite.groupcollide groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict Find all sprites that collide between two groups. pygame.sprite.spritecollideany spritecollideany(sprite, group, collided = None) -> Sprite spritecollideany(sprite, group, collided = None) -> None Simple test if a sprite intersects anything in a group. */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.4591398 pygame-2.6.1/src_c/doc/surface_doc.h0000644000175100001770000002634614676242424016721 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESURFACE "Surface((width, height), flags=0, depth=0, masks=None) -> Surface\nSurface((width, height), flags=0, Surface) -> Surface\npygame object for representing images" #define DOC_SURFACEBLIT "blit(source, dest, area=None, special_flags=0) -> Rect\ndraw one image onto another" #define DOC_SURFACEBLITS "blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None\nblits(((source, dest, area), ...)) -> [Rect, ...]\nblits(((source, dest, area, special_flags), ...)) -> [Rect, ...]\ndraw many images onto another" #define DOC_SURFACECONVERT "convert(Surface=None) -> Surface\nconvert(depth, flags=0) -> Surface\nconvert(masks, flags=0) -> Surface\nchange the pixel format of an image" #define DOC_SURFACECONVERTALPHA "convert_alpha(Surface) -> Surface\nconvert_alpha() -> Surface\nchange the pixel format of an image including per pixel alphas" #define DOC_SURFACECOPY "copy() -> Surface\ncreate a new copy of a Surface" #define DOC_SURFACEFILL "fill(color, rect=None, special_flags=0) -> Rect\nfill Surface with a solid color" #define DOC_SURFACESCROLL "scroll(dx=0, dy=0) -> None\nShift the surface image in place" #define DOC_SURFACESETCOLORKEY "set_colorkey(Color, flags=0) -> None\nset_colorkey(None) -> None\nSet the transparent colorkey" #define DOC_SURFACEGETCOLORKEY "get_colorkey() -> RGB or None\nGet the current transparent colorkey" #define DOC_SURFACESETALPHA "set_alpha(value, flags=0) -> None\nset_alpha(None) -> None\nset the alpha value for the full Surface image" #define DOC_SURFACEGETALPHA "get_alpha() -> int_value\nget the current Surface transparency value" #define DOC_SURFACELOCK "lock() -> None\nlock the Surface memory for pixel access" #define DOC_SURFACEUNLOCK "unlock() -> None\nunlock the Surface memory from pixel access" #define DOC_SURFACEMUSTLOCK "mustlock() -> bool\ntest if the Surface requires locking" #define DOC_SURFACEGETLOCKED "get_locked() -> bool\ntest if the Surface is current locked" #define DOC_SURFACEGETLOCKS "get_locks() -> tuple\nGets the locks for the Surface" #define DOC_SURFACEGETAT "get_at((x, y)) -> Color\nget the color value at a single pixel" #define DOC_SURFACESETAT "set_at((x, y), Color) -> None\nset the color value for a single pixel" #define DOC_SURFACEGETATMAPPED "get_at_mapped((x, y)) -> Color\nget the mapped color value at a single pixel" #define DOC_SURFACEGETPALETTE "get_palette() -> [RGB, RGB, RGB, ...]\nget the color index palette for an 8-bit Surface" #define DOC_SURFACEGETPALETTEAT "get_palette_at(index) -> RGB\nget the color for a single entry in a palette" #define DOC_SURFACESETPALETTE "set_palette([RGB, RGB, RGB, ...]) -> None\nset the color palette for an 8-bit Surface" #define DOC_SURFACESETPALETTEAT "set_palette_at(index, RGB) -> None\nset the color for a single index in an 8-bit Surface palette" #define DOC_SURFACEMAPRGB "map_rgb(Color) -> mapped_int\nconvert a color into a mapped color value" #define DOC_SURFACEUNMAPRGB "unmap_rgb(mapped_int) -> Color\nconvert a mapped integer color value into a Color" #define DOC_SURFACESETCLIP "set_clip(rect) -> None\nset_clip(None) -> None\nset the current clipping area of the Surface" #define DOC_SURFACEGETCLIP "get_clip() -> Rect\nget the current clipping area of the Surface" #define DOC_SURFACESUBSURFACE "subsurface(Rect) -> Surface\ncreate a new surface that references its parent" #define DOC_SURFACEGETPARENT "get_parent() -> Surface\nfind the parent of a subsurface" #define DOC_SURFACEGETABSPARENT "get_abs_parent() -> Surface\nfind the top level parent of a subsurface" #define DOC_SURFACEGETOFFSET "get_offset() -> (x, y)\nfind the position of a child subsurface inside a parent" #define DOC_SURFACEGETABSOFFSET "get_abs_offset() -> (x, y)\nfind the absolute position of a child subsurface inside its top level parent" #define DOC_SURFACEGETSIZE "get_size() -> (width, height)\nget the dimensions of the Surface" #define DOC_SURFACEGETWIDTH "get_width() -> width\nget the width of the Surface" #define DOC_SURFACEGETHEIGHT "get_height() -> height\nget the height of the Surface" #define DOC_SURFACEGETRECT "get_rect(**kwargs) -> Rect\nget the rectangular area of the Surface" #define DOC_SURFACEGETBITSIZE "get_bitsize() -> int\nget the bit depth of the Surface pixel format" #define DOC_SURFACEGETBYTESIZE "get_bytesize() -> int\nget the bytes used per Surface pixel" #define DOC_SURFACEGETFLAGS "get_flags() -> int\nget the additional flags used for the Surface" #define DOC_SURFACEGETPITCH "get_pitch() -> int\nget the number of bytes used per Surface row" #define DOC_SURFACEGETMASKS "get_masks() -> (R, G, B, A)\nthe bitmasks needed to convert between a color and a mapped integer" #define DOC_SURFACESETMASKS "set_masks((r,g,b,a)) -> None\nset the bitmasks needed to convert between a color and a mapped integer" #define DOC_SURFACEGETSHIFTS "get_shifts() -> (R, G, B, A)\nthe bit shifts needed to convert between a color and a mapped integer" #define DOC_SURFACESETSHIFTS "set_shifts((r,g,b,a)) -> None\nsets the bit shifts needed to convert between a color and a mapped integer" #define DOC_SURFACEGETLOSSES "get_losses() -> (R, G, B, A)\nthe significant bits used to convert between a color and a mapped integer" #define DOC_SURFACEGETBOUNDINGRECT "get_bounding_rect(min_alpha = 1) -> Rect\nfind the smallest rect containing data" #define DOC_SURFACEGETVIEW "get_view(='2') -> BufferProxy\nreturn a buffer view of the Surface's pixels." #define DOC_SURFACEGETBUFFER "get_buffer() -> BufferProxy\nacquires a buffer object for the pixels of the Surface." #define DOC_SURFACEPIXELSADDRESS "_pixels_address -> int\npixel buffer address" #define DOC_SURFACEPREMULALPHA "premul_alpha() -> Surface\nreturns a copy of the surface with the RGB channels pre-multiplied by the alpha channel." /* Docs in a comment... slightly easier to read. */ /* pygame.Surface Surface((width, height), flags=0, depth=0, masks=None) -> Surface Surface((width, height), flags=0, Surface) -> Surface pygame object for representing images pygame.Surface.blit blit(source, dest, area=None, special_flags=0) -> Rect draw one image onto another pygame.Surface.blits blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None blits(((source, dest, area), ...)) -> [Rect, ...] blits(((source, dest, area, special_flags), ...)) -> [Rect, ...] draw many images onto another pygame.Surface.convert convert(Surface=None) -> Surface convert(depth, flags=0) -> Surface convert(masks, flags=0) -> Surface change the pixel format of an image pygame.Surface.convert_alpha convert_alpha(Surface) -> Surface convert_alpha() -> Surface change the pixel format of an image including per pixel alphas pygame.Surface.copy copy() -> Surface create a new copy of a Surface pygame.Surface.fill fill(color, rect=None, special_flags=0) -> Rect fill Surface with a solid color pygame.Surface.scroll scroll(dx=0, dy=0) -> None Shift the surface image in place pygame.Surface.set_colorkey set_colorkey(Color, flags=0) -> None set_colorkey(None) -> None Set the transparent colorkey pygame.Surface.get_colorkey get_colorkey() -> RGB or None Get the current transparent colorkey pygame.Surface.set_alpha set_alpha(value, flags=0) -> None set_alpha(None) -> None set the alpha value for the full Surface image pygame.Surface.get_alpha get_alpha() -> int_value get the current Surface transparency value pygame.Surface.lock lock() -> None lock the Surface memory for pixel access pygame.Surface.unlock unlock() -> None unlock the Surface memory from pixel access pygame.Surface.mustlock mustlock() -> bool test if the Surface requires locking pygame.Surface.get_locked get_locked() -> bool test if the Surface is current locked pygame.Surface.get_locks get_locks() -> tuple Gets the locks for the Surface pygame.Surface.get_at get_at((x, y)) -> Color get the color value at a single pixel pygame.Surface.set_at set_at((x, y), Color) -> None set the color value for a single pixel pygame.Surface.get_at_mapped get_at_mapped((x, y)) -> Color get the mapped color value at a single pixel pygame.Surface.get_palette get_palette() -> [RGB, RGB, RGB, ...] get the color index palette for an 8-bit Surface pygame.Surface.get_palette_at get_palette_at(index) -> RGB get the color for a single entry in a palette pygame.Surface.set_palette set_palette([RGB, RGB, RGB, ...]) -> None set the color palette for an 8-bit Surface pygame.Surface.set_palette_at set_palette_at(index, RGB) -> None set the color for a single index in an 8-bit Surface palette pygame.Surface.map_rgb map_rgb(Color) -> mapped_int convert a color into a mapped color value pygame.Surface.unmap_rgb unmap_rgb(mapped_int) -> Color convert a mapped integer color value into a Color pygame.Surface.set_clip set_clip(rect) -> None set_clip(None) -> None set the current clipping area of the Surface pygame.Surface.get_clip get_clip() -> Rect get the current clipping area of the Surface pygame.Surface.subsurface subsurface(Rect) -> Surface create a new surface that references its parent pygame.Surface.get_parent get_parent() -> Surface find the parent of a subsurface pygame.Surface.get_abs_parent get_abs_parent() -> Surface find the top level parent of a subsurface pygame.Surface.get_offset get_offset() -> (x, y) find the position of a child subsurface inside a parent pygame.Surface.get_abs_offset get_abs_offset() -> (x, y) find the absolute position of a child subsurface inside its top level parent pygame.Surface.get_size get_size() -> (width, height) get the dimensions of the Surface pygame.Surface.get_width get_width() -> width get the width of the Surface pygame.Surface.get_height get_height() -> height get the height of the Surface pygame.Surface.get_rect get_rect(**kwargs) -> Rect get the rectangular area of the Surface pygame.Surface.get_bitsize get_bitsize() -> int get the bit depth of the Surface pixel format pygame.Surface.get_bytesize get_bytesize() -> int get the bytes used per Surface pixel pygame.Surface.get_flags get_flags() -> int get the additional flags used for the Surface pygame.Surface.get_pitch get_pitch() -> int get the number of bytes used per Surface row pygame.Surface.get_masks get_masks() -> (R, G, B, A) the bitmasks needed to convert between a color and a mapped integer pygame.Surface.set_masks set_masks((r,g,b,a)) -> None set the bitmasks needed to convert between a color and a mapped integer pygame.Surface.get_shifts get_shifts() -> (R, G, B, A) the bit shifts needed to convert between a color and a mapped integer pygame.Surface.set_shifts set_shifts((r,g,b,a)) -> None sets the bit shifts needed to convert between a color and a mapped integer pygame.Surface.get_losses get_losses() -> (R, G, B, A) the significant bits used to convert between a color and a mapped integer pygame.Surface.get_bounding_rect get_bounding_rect(min_alpha = 1) -> Rect find the smallest rect containing data pygame.Surface.get_view get_view(='2') -> BufferProxy return a buffer view of the Surface's pixels. pygame.Surface.get_buffer get_buffer() -> BufferProxy acquires a buffer object for the pixels of the Surface. pygame.Surface._pixels_address _pixels_address -> int pixel buffer address pygame.Surface.premul_alpha premul_alpha() -> Surface returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel. */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.7491395 pygame-2.6.1/src_c/doc/surfarray_doc.h0000644000175100001770000001013314676242425017273 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESURFARRAY "pygame module for accessing surface pixel data using array interfaces" #define DOC_PYGAMESURFARRAYARRAY2D "array2d(Surface) -> array\nCopy pixels into a 2d array" #define DOC_PYGAMESURFARRAYPIXELS2D "pixels2d(Surface) -> array\nReference pixels into a 2d array" #define DOC_PYGAMESURFARRAYARRAY3D "array3d(Surface) -> array\nCopy pixels into a 3d array" #define DOC_PYGAMESURFARRAYPIXELS3D "pixels3d(Surface) -> array\nReference pixels into a 3d array" #define DOC_PYGAMESURFARRAYARRAYALPHA "array_alpha(Surface) -> array\nCopy pixel alphas into a 2d array" #define DOC_PYGAMESURFARRAYPIXELSALPHA "pixels_alpha(Surface) -> array\nReference pixel alphas into a 2d array" #define DOC_PYGAMESURFARRAYARRAYRED "array_red(Surface) -> array\nCopy red pixels into a 2d array" #define DOC_PYGAMESURFARRAYPIXELSRED "pixels_red (Surface) -> array\nReference pixel red into a 2d array." #define DOC_PYGAMESURFARRAYARRAYGREEN "array_green(Surface) -> array\nCopy green pixels into a 2d array" #define DOC_PYGAMESURFARRAYPIXELSGREEN "pixels_green (Surface) -> array\nReference pixel green into a 2d array." #define DOC_PYGAMESURFARRAYARRAYBLUE "array_blue(Surface) -> array\nCopy blue pixels into a 2d array" #define DOC_PYGAMESURFARRAYPIXELSBLUE "pixels_blue (Surface) -> array\nReference pixel blue into a 2d array." #define DOC_PYGAMESURFARRAYARRAYCOLORKEY "array_colorkey(Surface) -> array\nCopy the colorkey values into a 2d array" #define DOC_PYGAMESURFARRAYMAKESURFACE "make_surface(array) -> Surface\nCopy an array to a new surface" #define DOC_PYGAMESURFARRAYBLITARRAY "blit_array(Surface, array) -> None\nBlit directly from a array values" #define DOC_PYGAMESURFARRAYMAPARRAY "map_array(Surface, array3d) -> array2d\nMap a 3d array into a 2d array" #define DOC_PYGAMESURFARRAYUSEARRAYTYPE "use_arraytype (arraytype) -> None\nSets the array system to be used for surface arrays" #define DOC_PYGAMESURFARRAYGETARRAYTYPE "get_arraytype () -> str\nGets the currently active array type." #define DOC_PYGAMESURFARRAYGETARRAYTYPES "get_arraytypes () -> tuple\nGets the array system types currently supported." /* Docs in a comment... slightly easier to read. */ /* pygame.surfarray pygame module for accessing surface pixel data using array interfaces pygame.surfarray.array2d array2d(Surface) -> array Copy pixels into a 2d array pygame.surfarray.pixels2d pixels2d(Surface) -> array Reference pixels into a 2d array pygame.surfarray.array3d array3d(Surface) -> array Copy pixels into a 3d array pygame.surfarray.pixels3d pixels3d(Surface) -> array Reference pixels into a 3d array pygame.surfarray.array_alpha array_alpha(Surface) -> array Copy pixel alphas into a 2d array pygame.surfarray.pixels_alpha pixels_alpha(Surface) -> array Reference pixel alphas into a 2d array pygame.surfarray.array_red array_red(Surface) -> array Copy red pixels into a 2d array pygame.surfarray.pixels_red pixels_red (Surface) -> array Reference pixel red into a 2d array. pygame.surfarray.array_green array_green(Surface) -> array Copy green pixels into a 2d array pygame.surfarray.pixels_green pixels_green (Surface) -> array Reference pixel green into a 2d array. pygame.surfarray.array_blue array_blue(Surface) -> array Copy blue pixels into a 2d array pygame.surfarray.pixels_blue pixels_blue (Surface) -> array Reference pixel blue into a 2d array. pygame.surfarray.array_colorkey array_colorkey(Surface) -> array Copy the colorkey values into a 2d array pygame.surfarray.make_surface make_surface(array) -> Surface Copy an array to a new surface pygame.surfarray.blit_array blit_array(Surface, array) -> None Blit directly from a array values pygame.surfarray.map_array map_array(Surface, array3d) -> array2d Map a 3d array into a 2d array pygame.surfarray.use_arraytype use_arraytype (arraytype) -> None Sets the array system to be used for surface arrays pygame.surfarray.get_arraytype get_arraytype () -> str Gets the currently active array type. pygame.surfarray.get_arraytypes get_arraytypes () -> tuple Gets the array system types currently supported. */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.7751393 pygame-2.6.1/src_c/doc/tests_doc.h0000644000175100001770000000062414676242425016423 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMETESTS "Pygame unit test suite package" #define DOC_PYGAMETESTSRUN "run(*args, **kwds) -> tuple\nRun the pygame unit test suite" /* Docs in a comment... slightly easier to read. */ /* pygame.tests Pygame unit test suite package pygame.tests.run run(*args, **kwds) -> tuple Run the pygame unit test suite */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8011394 pygame-2.6.1/src_c/doc/time_doc.h0000644000175100001770000000407114676242425016217 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMETIME "pygame module for monitoring time" #define DOC_PYGAMETIMEGETTICKS "get_ticks() -> milliseconds\nget the time in milliseconds" #define DOC_PYGAMETIMEWAIT "wait(milliseconds) -> time\npause the program for an amount of time" #define DOC_PYGAMETIMEDELAY "delay(milliseconds) -> time\npause the program for an amount of time" #define DOC_PYGAMETIMESETTIMER "set_timer(event, millis) -> None\nset_timer(event, millis, loops=0) -> None\nrepeatedly create an event on the event queue" #define DOC_PYGAMETIMECLOCK "Clock() -> Clock\ncreate an object to help track time" #define DOC_CLOCKTICK "tick(framerate=0) -> milliseconds\nupdate the clock" #define DOC_CLOCKTICKBUSYLOOP "tick_busy_loop(framerate=0) -> milliseconds\nupdate the clock" #define DOC_CLOCKGETTIME "get_time() -> milliseconds\ntime used in the previous tick" #define DOC_CLOCKGETRAWTIME "get_rawtime() -> milliseconds\nactual time used in the previous tick" #define DOC_CLOCKGETFPS "get_fps() -> float\ncompute the clock framerate" /* Docs in a comment... slightly easier to read. */ /* pygame.time pygame module for monitoring time pygame.time.get_ticks get_ticks() -> milliseconds get the time in milliseconds pygame.time.wait wait(milliseconds) -> time pause the program for an amount of time pygame.time.delay delay(milliseconds) -> time pause the program for an amount of time pygame.time.set_timer set_timer(event, millis) -> None set_timer(event, millis, loops=0) -> None repeatedly create an event on the event queue pygame.time.Clock Clock() -> Clock create an object to help track time pygame.time.Clock.tick tick(framerate=0) -> milliseconds update the clock pygame.time.Clock.tick_busy_loop tick_busy_loop(framerate=0) -> milliseconds update the clock pygame.time.Clock.get_time get_time() -> milliseconds time used in the previous tick pygame.time.Clock.get_rawtime get_rawtime() -> milliseconds actual time used in the previous tick pygame.time.Clock.get_fps get_fps() -> float compute the clock framerate */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8171394 pygame-2.6.1/src_c/doc/touch_doc.h0000644000175100001770000000217314676242425016404 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMESDL2TOUCH "pygame module to work with touch input" #define DOC_PYGAMESDL2TOUCHGETNUMDEVICES "get_num_devices() -> int\nget the number of touch devices" #define DOC_PYGAMESDL2TOUCHGETDEVICE "get_device(index) -> touchid\nget the a touch device id for a given index" #define DOC_PYGAMESDL2TOUCHGETNUMFINGERS "get_num_fingers(touchid) -> int\nthe number of active fingers for a given touch device" #define DOC_PYGAMESDL2TOUCHGETFINGER "get_finger(touchid, index) -> int\nget information about an active finger" /* Docs in a comment... slightly easier to read. */ /* pygame._sdl2.touch pygame module to work with touch input pygame._sdl2.touch.get_num_devices get_num_devices() -> int get the number of touch devices pygame._sdl2.touch.get_device get_device(index) -> touchid get the a touch device id for a given index pygame._sdl2.touch.get_num_fingers get_num_fingers(touchid) -> int the number of active fingers for a given touch device pygame._sdl2.touch.get_finger get_finger(touchid, index) -> int get information about an active finger */././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612180.8691392 pygame-2.6.1/src_c/doc/transform_doc.h0000644000175100001770000001074114676242425017275 0ustar00runnerdocker/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ #define DOC_PYGAMETRANSFORM "pygame module to transform surfaces" #define DOC_PYGAMETRANSFORMFLIP "flip(surface, flip_x, flip_y) -> Surface\nflip vertically and horizontally" #define DOC_PYGAMETRANSFORMSCALE "scale(surface, size, dest_surface=None) -> Surface\nresize to new resolution" #define DOC_PYGAMETRANSFORMSCALEBY "scale_by(surface, factor, dest_surface=None) -> Surface\nresize to new resolution, using scalar(s)" #define DOC_PYGAMETRANSFORMROTATE "rotate(surface, angle) -> Surface\nrotate an image" #define DOC_PYGAMETRANSFORMROTOZOOM "rotozoom(surface, angle, scale) -> Surface\nfiltered scale and rotation" #define DOC_PYGAMETRANSFORMSCALE2X "scale2x(surface, dest_surface=None) -> Surface\nspecialized image doubler" #define DOC_PYGAMETRANSFORMSMOOTHSCALE "smoothscale(surface, size, dest_surface=None) -> Surface\nscale a surface to an arbitrary size smoothly" #define DOC_PYGAMETRANSFORMSMOOTHSCALEBY "smoothscale_by(surface, factor, dest_surface=None) -> Surface\nresize to new resolution, using scalar(s)" #define DOC_PYGAMETRANSFORMGETSMOOTHSCALEBACKEND "get_smoothscale_backend() -> string\nreturn smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'" #define DOC_PYGAMETRANSFORMSETSMOOTHSCALEBACKEND "set_smoothscale_backend(backend) -> None\nset smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'" #define DOC_PYGAMETRANSFORMCHOP "chop(surface, rect) -> Surface\ngets a copy of an image with an interior area removed" #define DOC_PYGAMETRANSFORMLAPLACIAN "laplacian(surface, dest_surface=None) -> Surface\nfind edges in a surface" #define DOC_PYGAMETRANSFORMAVERAGESURFACES "average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface\nfind the average surface from many surfaces." #define DOC_PYGAMETRANSFORMAVERAGECOLOR "average_color(surface, rect=None, consider_alpha=False) -> Color\nfinds the average color of a surface" #define DOC_PYGAMETRANSFORMGRAYSCALE "grayscale(surface, dest_surface=None) -> Surface\ngrayscale a surface" #define DOC_PYGAMETRANSFORMTHRESHOLD "threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels\nfinds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'." /* Docs in a comment... slightly easier to read. */ /* pygame.transform pygame module to transform surfaces pygame.transform.flip flip(surface, flip_x, flip_y) -> Surface flip vertically and horizontally pygame.transform.scale scale(surface, size, dest_surface=None) -> Surface resize to new resolution pygame.transform.scale_by scale_by(surface, factor, dest_surface=None) -> Surface resize to new resolution, using scalar(s) pygame.transform.rotate rotate(surface, angle) -> Surface rotate an image pygame.transform.rotozoom rotozoom(surface, angle, scale) -> Surface filtered scale and rotation pygame.transform.scale2x scale2x(surface, dest_surface=None) -> Surface specialized image doubler pygame.transform.smoothscale smoothscale(surface, size, dest_surface=None) -> Surface scale a surface to an arbitrary size smoothly pygame.transform.smoothscale_by smoothscale_by(surface, factor, dest_surface=None) -> Surface resize to new resolution, using scalar(s) pygame.transform.get_smoothscale_backend get_smoothscale_backend() -> string return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE' pygame.transform.set_smoothscale_backend set_smoothscale_backend(backend) -> None set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE' pygame.transform.chop chop(surface, rect) -> Surface gets a copy of an image with an interior area removed pygame.transform.laplacian laplacian(surface, dest_surface=None) -> Surface find edges in a surface pygame.transform.average_surfaces average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface find the average surface from many surfaces. pygame.transform.average_color average_color(surface, rect=None, consider_alpha=False) -> Color finds the average color of a surface pygame.transform.grayscale grayscale(surface, dest_surface=None) -> Surface grayscale a surface pygame.transform.threshold threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'. */././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/draw.c0000644000175100001770000026264314676242340014626 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * drawing module for pygame */ #include "pygame.h" #include "pgcompat.h" #include "doc/draw_doc.h" #include #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /* Declaration of drawing algorithms */ static void draw_line_width(SDL_Surface *surf, Uint32 color, int x1, int y1, int x2, int y2, int width, int *drawn_area); static void draw_line(SDL_Surface *surf, int x1, int y1, int x2, int y2, Uint32 color, int *drawn_area); static void draw_aaline(SDL_Surface *surf, Uint32 color, float startx, float starty, float endx, float endy, int blend, int *drawn_area); static void draw_arc(SDL_Surface *surf, int x, int y, int radius1, int radius2, double angle_start, double angle_stop, Uint32 color, int *drawn_area); static void draw_circle_bresenham(SDL_Surface *surf, int x0, int y0, int radius, int thickness, Uint32 color, int *drawn_area); static void draw_circle_bresenham_thin(SDL_Surface *surf, int x0, int y0, int radius, Uint32 color, int *drawn_area); static void draw_circle_filled(SDL_Surface *surf, int x0, int y0, int radius, Uint32 color, int *drawn_area); static void draw_circle_quadrant(SDL_Surface *surf, int x0, int y0, int radius, int thickness, Uint32 color, int top_right, int top_left, int bottom_left, int bottom_right, int *drawn_area); static void draw_ellipse_filled(SDL_Surface *surf, int x0, int y0, int width, int height, Uint32 color, int *drawn_area); static void draw_ellipse_thickness(SDL_Surface *surf, int x0, int y0, int width, int height, int thickness, Uint32 color, int *drawn_area); static void draw_fillpoly(SDL_Surface *surf, int *vx, int *vy, Py_ssize_t n, Uint32 color, int *drawn_area); static void draw_rect(SDL_Surface *surf, int x1, int y1, int x2, int y2, int width, Uint32 color); static void draw_round_rect(SDL_Surface *surf, int x1, int y1, int x2, int y2, int radius, int width, Uint32 color, int top_left, int top_right, int bottom_left, int bottom_right, int *drawn_area); // validation of a draw color #define CHECK_LOAD_COLOR(colorobj) \ if (PyLong_Check(colorobj)) \ color = (Uint32)PyLong_AsLong(colorobj); \ else if (pg_RGBAFromFuzzyColorObj(colorobj, rgba)) \ color = \ SDL_MapRGBA(surf->format, rgba[0], rgba[1], rgba[2], rgba[3]); \ else \ return NULL; /* pg_RGBAFromFuzzyColorObj sets the exception for us */ /* Definition of functions that get called in Python */ /* Draws an antialiased line on the given surface. * * Returns a Rect bounding the drawn area. */ static PyObject * aaline(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *start, *end; SDL_Surface *surf = NULL; float startx, starty, endx, endy; int blend = 1; /* Default blend. */ int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ Uint8 rgba[4]; Uint32 color; static char *keywords[] = {"surface", "color", "start_pos", "end_pos", "blend", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OOO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &start, &end, &blend)) { return NULL; /* Exception already set. */ } if (!blend) { if (PyErr_WarnEx( PyExc_DeprecationWarning, "blend=False will be deprecated in pygame 2.2 and will " "default to True", 1) == -1) { return NULL; } } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (!pg_TwoFloatsFromObj(start, &startx, &starty)) { return RAISE(PyExc_TypeError, "invalid start_pos argument"); } if (!pg_TwoFloatsFromObj(end, &endx, &endy)) { return RAISE(PyExc_TypeError, "invalid end_pos argument"); } if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } draw_aaline(surf, color, startx, starty, endx, endy, blend, drawn_area); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4((int)startx, (int)starty, 0, 0); } /* Draws a line on the given surface. * * Returns a Rect bounding the drawn area. */ static PyObject * line(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *start, *end; SDL_Surface *surf = NULL; int startx, starty, endx, endy; Uint8 rgba[4]; Uint32 color; int width = 1; /* Default width. */ int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ static char *keywords[] = {"surface", "color", "start_pos", "end_pos", "width", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OOO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &start, &end, &width)) { return NULL; /* Exception already set. */ } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (!pg_TwoIntsFromObj(start, &startx, &starty)) { return RAISE(PyExc_TypeError, "invalid start_pos argument"); } if (!pg_TwoIntsFromObj(end, &endx, &endy)) { return RAISE(PyExc_TypeError, "invalid end_pos argument"); } if (width < 1) { return pgRect_New4(startx, starty, 0, 0); } if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } draw_line_width(surf, color, startx, starty, endx, endy, width, drawn_area); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } /* Compute return rect. */ if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(startx, starty, 0, 0); } /* Draws a series of antialiased lines on the given surface. * * Returns a Rect bounding the drawn area. */ static PyObject * aalines(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj; PyObject *points, *item = NULL; SDL_Surface *surf = NULL; Uint32 color; Uint8 rgba[4]; float pts[4]; float *xlist, *ylist; float x, y; int l, t; int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ int result, closed; int blend = 1; /* Default blend. */ Py_ssize_t loop, length; static char *keywords[] = {"surface", "color", "closed", "points", "blend", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OpO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &closed, &points, &blend)) { return NULL; /* Exception already set. */ } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } if (!blend) { if (PyErr_WarnEx( PyExc_DeprecationWarning, "blend=False will be deprecated in pygame 2.2 and will " "default to True", 1) == -1) { return NULL; } } CHECK_LOAD_COLOR(colorobj) if (!PySequence_Check(points)) { return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs"); } length = PySequence_Length(points); if (length < 2) { return RAISE(PyExc_ValueError, "points argument must contain 2 or more points"); } xlist = PyMem_New(float, length); ylist = PyMem_New(float, length); if (NULL == xlist || NULL == ylist) { if (xlist) { PyMem_Free(xlist); } if (ylist) { PyMem_Free(ylist); } return RAISE(PyExc_MemoryError, "cannot allocate memory to draw aalines"); } for (loop = 0; loop < length; ++loop) { item = PySequence_GetItem(points, loop); result = pg_TwoFloatsFromObj(item, &x, &y); if (loop == 0) { l = (int)x; t = (int)y; } Py_DECREF(item); if (!result) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_TypeError, "points must be number pairs"); } xlist[loop] = x; ylist[loop] = y; } if (!pgSurface_Lock(surfobj)) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_RuntimeError, "error locking surface"); } for (loop = 1; loop < length; ++loop) { pts[0] = xlist[loop - 1]; pts[1] = ylist[loop - 1]; pts[2] = xlist[loop]; pts[3] = ylist[loop]; draw_aaline(surf, color, pts[0], pts[1], pts[2], pts[3], blend, drawn_area); } if (closed && length > 2) { pts[0] = xlist[length - 1]; pts[1] = ylist[length - 1]; pts[2] = xlist[0]; pts[3] = ylist[0]; draw_aaline(surf, color, pts[0], pts[1], pts[2], pts[3], blend, drawn_area); } PyMem_Free(xlist); PyMem_Free(ylist); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } /* Compute return rect. */ if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(l, t, 0, 0); } /* Draws a series of lines on the given surface. * * Returns a Rect bounding the drawn area. */ static PyObject * lines(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj; PyObject *points, *item = NULL; SDL_Surface *surf = NULL; Uint32 color; Uint8 rgba[4]; int x, y, closed, result; int *xlist = NULL, *ylist = NULL; int width = 1; /* Default width. */ Py_ssize_t loop, length; int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ static char *keywords[] = {"surface", "color", "closed", "points", "width", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OpO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &closed, &points, &width)) { return NULL; /* Exception already set. */ } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (!PySequence_Check(points)) { return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs"); } length = PySequence_Length(points); if (length < 2) { return RAISE(PyExc_ValueError, "points argument must contain 2 or more points"); } xlist = PyMem_New(int, length); ylist = PyMem_New(int, length); if (NULL == xlist || NULL == ylist) { if (xlist) { PyMem_Free(xlist); } if (ylist) { PyMem_Free(ylist); } return RAISE(PyExc_MemoryError, "cannot allocate memory to draw lines"); } for (loop = 0; loop < length; ++loop) { item = PySequence_GetItem(points, loop); result = pg_TwoIntsFromObj(item, &x, &y); Py_DECREF(item); if (!result) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_TypeError, "points must be number pairs"); } xlist[loop] = x; ylist[loop] = y; } x = xlist[0]; y = ylist[0]; if (width < 1) { PyMem_Free(xlist); PyMem_Free(ylist); return pgRect_New4(x, y, 0, 0); } if (!pgSurface_Lock(surfobj)) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_RuntimeError, "error locking surface"); } for (loop = 1; loop < length; ++loop) { draw_line_width(surf, color, xlist[loop - 1], ylist[loop - 1], xlist[loop], ylist[loop], width, drawn_area); } if (closed && length > 2) { draw_line_width(surf, color, xlist[length - 1], ylist[length - 1], xlist[0], ylist[0], width, drawn_area); } PyMem_Free(xlist); PyMem_Free(ylist); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } /* Compute return rect. */ if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(x, y, 0, 0); } static PyObject * arc(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *rectobj; SDL_Rect *rect = NULL, temp; SDL_Surface *surf = NULL; Uint8 rgba[4]; Uint32 color; int loop; int width = 1; /* Default width. */ int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ double angle_start, angle_stop; static char *keywords[] = {"surface", "color", "rect", "start_angle", "stop_angle", "width", NULL}; // float ellipse_ratio; if (!PyArg_ParseTupleAndKeywords( arg, kwargs, "O!OOdd|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &rectobj, &angle_start, &angle_stop, &width)) { return NULL; /* Exception already set. */ } rect = pgRect_FromObject(rectobj, &temp); if (!rect) { return RAISE(PyExc_TypeError, "rect argument is invalid"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (width < 0) { return pgRect_New4(rect->x, rect->y, 0, 0); } if (width > rect->w / 2 || width > rect->h / 2) { width = MAX(rect->w / 2, rect->h / 2); } if (angle_stop < angle_start) { // Angle is in radians angle_stop += 2 * M_PI; } if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } width = MIN(width, MIN(rect->w, rect->h) / 2); if (width == 1) { draw_arc(surf, rect->x + rect->w / 2, rect->y + rect->h / 2, rect->w / 2, rect->h / 2, angle_start, angle_stop, color, drawn_area); } else { for (loop = 0; loop < width; ++loop) { draw_arc(surf, (rect->x + rect->w / 2) - 1, (rect->y + rect->h / 2) - 1, (rect->w / 2 - loop) - 1, (rect->h / 2 - loop) - 1, angle_start, angle_stop, color, drawn_area); draw_arc(surf, rect->x + rect->w / 2, rect->y + rect->h / 2, rect->w / 2 - loop, rect->h / 2 - loop, angle_start, angle_stop, color, drawn_area); } } if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } /* Compute return rect. */ if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(rect->x, rect->y, 0, 0); } static PyObject * ellipse(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *rectobj; SDL_Rect *rect = NULL, temp; SDL_Surface *surf = NULL; Uint8 rgba[4]; Uint32 color; int width = 0; /* Default width. */ int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ static char *keywords[] = {"surface", "color", "rect", "width", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &rectobj, &width)) { return NULL; /* Exception already set. */ } rect = pgRect_FromObject(rectobj, &temp); if (!rect) { return RAISE(PyExc_TypeError, "rect argument is invalid"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (width < 0) { return pgRect_New4(rect->x, rect->y, 0, 0); } if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } if (!width || width >= MIN(rect->w / 2 + rect->w % 2, rect->h / 2 + rect->h % 2)) { draw_ellipse_filled(surf, rect->x, rect->y, rect->w, rect->h, color, drawn_area); } else { draw_ellipse_thickness(surf, rect->x, rect->y, rect->w, rect->h, width - 1, color, drawn_area); } if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(rect->x, rect->y, 0, 0); } static PyObject * circle(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj; SDL_Surface *surf = NULL; Uint8 rgba[4]; Uint32 color; PyObject *posobj, *radiusobj; int posx, posy, radius; int width = 0; /* Default values. */ int top_right = 0, top_left = 0, bottom_left = 0, bottom_right = 0; int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ static char *keywords[] = {"surface", "color", "center", "radius", "width", "draw_top_right", "draw_top_left", "draw_bottom_left", "draw_bottom_right", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!OOO|iiiii", keywords, &pgSurface_Type, &surfobj, &colorobj, &posobj, &radiusobj, &width, &top_right, &top_left, &bottom_left, &bottom_right)) return NULL; /* Exception already set. */ if (!pg_TwoIntsFromObj(posobj, &posx, &posy)) { PyErr_SetString(PyExc_TypeError, "center argument must be a pair of numbers"); return 0; } if (!pg_IntFromObj(radiusobj, &radius)) { PyErr_SetString(PyExc_TypeError, "radius argument must be a number"); return 0; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (radius < 1 || width < 0) { return pgRect_New4(posx, posy, 0, 0); } if (width > radius) { width = radius; } if (posx > surf->clip_rect.x + surf->clip_rect.w + radius || posx < surf->clip_rect.x - radius || posy > surf->clip_rect.y + surf->clip_rect.h + radius || posy < surf->clip_rect.y - radius) { return pgRect_New4(posx, posy, 0, 0); } if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } if ((top_right == 0 && top_left == 0 && bottom_left == 0 && bottom_right == 0)) { if (!width || width == radius) { draw_circle_filled(surf, posx, posy, radius, color, drawn_area); } else if (width == 1) { draw_circle_bresenham_thin(surf, posx, posy, radius, color, drawn_area); } else { draw_circle_bresenham(surf, posx, posy, radius, width, color, drawn_area); } } else { draw_circle_quadrant(surf, posx, posy, radius, width, color, top_right, top_left, bottom_left, bottom_right, drawn_area); } if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) { return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); } else { return pgRect_New4(posx, posy, 0, 0); } } static PyObject * polygon(PyObject *self, PyObject *arg, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *points, *item = NULL; SDL_Surface *surf = NULL; Uint8 rgba[4]; Uint32 color; int *xlist = NULL, *ylist = NULL; int width = 0; /* Default width. */ int x, y, result, l, t; int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ Py_ssize_t loop, length; static char *keywords[] = {"surface", "color", "points", "width", NULL}; if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OO|i", keywords, &pgSurface_Type, &surfobj, &colorobj, &points, &width)) { return NULL; /* Exception already set. */ } if (width) { PyObject *ret = NULL; PyObject *args = Py_BuildValue("(OOiOi)", surfobj, colorobj, 1, points, width); if (!args) { return NULL; /* Exception already set. */ } ret = lines(NULL, args, NULL); Py_DECREF(args); return ret; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (!PySequence_Check(points)) { return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs"); } length = PySequence_Length(points); if (length < 3) { return RAISE(PyExc_ValueError, "points argument must contain more than 2 points"); } xlist = PyMem_New(int, length); ylist = PyMem_New(int, length); if (NULL == xlist || NULL == ylist) { if (xlist) { PyMem_Free(xlist); } if (ylist) { PyMem_Free(ylist); } return RAISE(PyExc_MemoryError, "cannot allocate memory to draw polygon"); } for (loop = 0; loop < length; ++loop) { item = PySequence_GetItem(points, loop); result = pg_TwoIntsFromObj(item, &x, &y); if (loop == 0) { l = x; t = y; } Py_DECREF(item); if (!result) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_TypeError, "points must be number pairs"); } xlist[loop] = x; ylist[loop] = y; } if (!pgSurface_Lock(surfobj)) { PyMem_Free(xlist); PyMem_Free(ylist); return RAISE(PyExc_RuntimeError, "error locking surface"); } draw_fillpoly(surf, xlist, ylist, length, color, drawn_area); PyMem_Free(xlist); PyMem_Free(ylist); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(l, t, 0, 0); } static PyObject * rect(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *colorobj, *rectobj; SDL_Rect *rect = NULL, temp; SDL_Surface *surf = NULL; Uint8 rgba[4]; Uint32 color; int width = 0, radius = 0; /* Default values. */ int top_left_radius = -1, top_right_radius = -1, bottom_left_radius = -1, bottom_right_radius = -1; SDL_Rect sdlrect; SDL_Rect cliprect; int result; SDL_Rect clipped; int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; /* Used to store bounding box values */ static char *keywords[] = {"surface", "color", "rect", "width", "border_radius", "border_top_left_radius", "border_top_right_radius", "border_bottom_left_radius", "border_bottom_right_radius", NULL}; if (!PyArg_ParseTupleAndKeywords( args, kwargs, "O!OO|iiiiii", keywords, &pgSurface_Type, &surfobj, &colorobj, &rectobj, &width, &radius, &top_left_radius, &top_right_radius, &bottom_left_radius, &bottom_right_radius)) { return NULL; /* Exception already set. */ } if (!(rect = pgRect_FromObject(rectobj, &temp))) { return RAISE(PyExc_TypeError, "rect argument is invalid"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel > 4) { return PyErr_Format(PyExc_ValueError, "unsupported surface bit depth (%d) for drawing", surf->format->BytesPerPixel); } CHECK_LOAD_COLOR(colorobj) if (width < 0) { return pgRect_New4(rect->x, rect->y, 0, 0); } /* If there isn't any rounded rect-ness OR the rect is really thin in one direction. The "really thin in one direction" check is necessary because draw_round_rect fails (draws something bad) on rects with a dimension that is 0 or 1 pixels across.*/ if ((radius <= 0 && top_left_radius <= 0 && top_right_radius <= 0 && bottom_left_radius <= 0 && bottom_right_radius <= 0) || abs(rect->w) < 2 || abs(rect->h) < 2) { sdlrect.x = rect->x; sdlrect.y = rect->y; sdlrect.w = rect->w; sdlrect.h = rect->h; SDL_GetClipRect(surf, &cliprect); /* SDL_FillRect respects the clip rect already, but in order to return the drawn area, we need to do this here, and keep the pointer to the result in clipped */ if (!SDL_IntersectRect(&sdlrect, &cliprect, &clipped)) { return pgRect_New4(rect->x, rect->y, 0, 0); } if (width > 0 && (width * 2) < clipped.w && (width * 2) < clipped.h) { draw_rect(surf, sdlrect.x, sdlrect.y, sdlrect.x + sdlrect.w - 1, sdlrect.y + sdlrect.h - 1, width, color); } else { pgSurface_Prep(surfobj); pgSurface_Lock(surfobj); result = SDL_FillRect(surf, &clipped, color); pgSurface_Unlock(surfobj); pgSurface_Unprep(surfobj); if (result != 0) return RAISE(pgExc_SDLError, SDL_GetError()); } return pgRect_New(&clipped); } else { if (!pgSurface_Lock(surfobj)) { return RAISE(PyExc_RuntimeError, "error locking surface"); } /* Little bit to normalize the rect: this matters for the rounded rects, despite not mattering for the normal rects. */ if (rect->w < 0) { rect->x += rect->w; rect->w = -rect->w; } if (rect->h < 0) { rect->y += rect->h; rect->h = -rect->h; } if (width > rect->w / 2 || width > rect->h / 2) { width = MAX(rect->w / 2, rect->h / 2); } draw_round_rect(surf, rect->x, rect->y, rect->x + rect->w - 1, rect->y + rect->h - 1, radius, width, color, top_left_radius, top_right_radius, bottom_left_radius, bottom_right_radius, drawn_area); if (!pgSurface_Unlock(surfobj)) { return RAISE(PyExc_RuntimeError, "error unlocking surface"); } } if (drawn_area[0] != INT_MAX && drawn_area[1] != INT_MAX && drawn_area[2] != INT_MIN && drawn_area[3] != INT_MIN) return pgRect_New4(drawn_area[0], drawn_area[1], drawn_area[2] - drawn_area[0] + 1, drawn_area[3] - drawn_area[1] + 1); else return pgRect_New4(rect->x, rect->y, 0, 0); } /* Functions used in drawing algorithms */ static void swap(float *a, float *b) { float temp = *a; *a = *b; *b = temp; } static int compare_int(const void *a, const void *b) { return (*(const int *)a) - (*(const int *)b); } static int sign(int x, int y) { return (x > 0) ? 1 : ((x < 0) ? -1 : y); } static Uint32 get_antialiased_color(SDL_Surface *surf, int x, int y, Uint32 original_color, float brightness, int blend) { Uint8 color_part[4], background_color[4]; Uint32 *pixels = (Uint32 *)surf->pixels; SDL_GetRGBA(original_color, surf->format, &color_part[0], &color_part[1], &color_part[2], &color_part[3]); if (blend) { if (x < surf->clip_rect.x || x >= surf->clip_rect.x + surf->clip_rect.w || y < surf->clip_rect.y || y >= surf->clip_rect.y + surf->clip_rect.h) return original_color; SDL_GetRGBA(pixels[(y * surf->w) + x], surf->format, &background_color[0], &background_color[1], &background_color[2], &background_color[3]); color_part[0] = (Uint8)(brightness * color_part[0] + (1 - brightness) * background_color[0]); color_part[1] = (Uint8)(brightness * color_part[1] + (1 - brightness) * background_color[1]); color_part[2] = (Uint8)(brightness * color_part[2] + (1 - brightness) * background_color[2]); color_part[3] = (Uint8)(brightness * color_part[3] + (1 - brightness) * background_color[3]); } else { color_part[0] = (Uint8)(brightness * color_part[0]); color_part[1] = (Uint8)(brightness * color_part[1]); color_part[2] = (Uint8)(brightness * color_part[2]); color_part[3] = (Uint8)(brightness * color_part[3]); } original_color = SDL_MapRGBA(surf->format, color_part[0], color_part[1], color_part[2], color_part[3]); return original_color; } static void add_pixel_to_drawn_list(int x, int y, int *pts) { if (x < pts[0]) { pts[0] = x; } if (y < pts[1]) { pts[1] = y; } if (x > pts[2]) { pts[2] = x; } if (y > pts[3]) { pts[3] = y; } } static void add_line_to_drawn_list(int x1, int y1, int x2, int *pts) { if (x1 < pts[0]) { pts[0] = x1; } if (y1 < pts[1]) { pts[1] = y1; } if (x2 > pts[2]) { pts[2] = x2; } if (y1 > pts[3]) { pts[3] = y1; } } static int clip_line(SDL_Surface *surf, int *x1, int *y1, int *x2, int *y2) { int p1 = *x1 - *x2; int p2 = -p1; int p3 = *y1 - *y2; int p4 = -p3; int q1 = *x1 - surf->clip_rect.x; int q2 = surf->clip_rect.w + surf->clip_rect.x - *x1; int q3 = *y1 - surf->clip_rect.y; int q4 = surf->clip_rect.h + surf->clip_rect.y - *y1; int old_x1 = *x1; int old_y1 = *y1; double nmax = 0; double pmin = 1; double r1, r2; if ((p1 == 0 && q1 < 0) || (p2 == 0 && q2 < 0) || (p3 == 0 && q3 < 0) || (p4 == 0 && q4 < 0)) return 0; if (p1) { r1 = (double)q1 / p1; r2 = (double)q2 / p2; if (p1 < 0) { if (r1 > nmax) nmax = r1; if (r2 < pmin) pmin = r2; } else { if (r2 > nmax) nmax = r2; if (r1 < pmin) pmin = r1; } } if (p3) { r1 = (double)q3 / p3; r2 = (double)q4 / p4; if (p3 < 0) { if (r1 > nmax) nmax = r1; if (r2 < pmin) pmin = r2; } else { if (r2 > nmax) nmax = r2; if (r1 < pmin) pmin = r1; } } if (nmax > pmin) return 0; *x1 = old_x1 + (int)(p2 * nmax < 0 ? (p2 * nmax - 0.5) : (p2 * nmax + 0.5)); *y1 = old_y1 + (int)(p4 * nmax < 0 ? (p4 * nmax - 0.5) : (p4 * nmax + 0.5)); *x2 = old_x1 + (int)(p2 * pmin < 0 ? (p2 * pmin - 0.5) : (p2 * pmin + 0.5)); *y2 = old_y1 + (int)(p4 * pmin < 0 ? (p4 * pmin - 0.5) : (p4 * pmin + 0.5)); return 1; } static int set_at(SDL_Surface *surf, int x, int y, Uint32 color) { SDL_PixelFormat *format = surf->format; Uint8 *pixels = (Uint8 *)surf->pixels; Uint8 *byte_buf, rgb[4]; if (x < surf->clip_rect.x || x >= surf->clip_rect.x + surf->clip_rect.w || y < surf->clip_rect.y || y >= surf->clip_rect.y + surf->clip_rect.h) return 0; switch (format->BytesPerPixel) { case 1: *((Uint8 *)pixels + y * surf->pitch + x) = (Uint8)color; break; case 2: *((Uint16 *)(pixels + y * surf->pitch) + x) = (Uint16)color; break; case 4: *((Uint32 *)(pixels + y * surf->pitch) + x) = color; break; default: /*case 3:*/ SDL_GetRGB(color, format, rgb, rgb + 1, rgb + 2); byte_buf = (Uint8 *)(pixels + y * surf->pitch) + x * 3; #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) *(byte_buf + (format->Rshift >> 3)) = rgb[0]; *(byte_buf + (format->Gshift >> 3)) = rgb[1]; *(byte_buf + (format->Bshift >> 3)) = rgb[2]; #else *(byte_buf + 2 - (format->Rshift >> 3)) = rgb[0]; *(byte_buf + 2 - (format->Gshift >> 3)) = rgb[1]; *(byte_buf + 2 - (format->Bshift >> 3)) = rgb[2]; #endif break; } return 1; } static void set_and_check_rect(SDL_Surface *surf, int x, int y, Uint32 color, int *drawn_area) { if (set_at(surf, x, y, color)) add_pixel_to_drawn_list(x, y, drawn_area); } static void draw_aaline(SDL_Surface *surf, Uint32 color, float from_x, float from_y, float to_x, float to_y, int blend, int *drawn_area) { float gradient, dx, dy, intersect_y, brightness; int x, x_pixel_start, x_pixel_end; Uint32 pixel_color; float x_gap, y_endpoint, clip_left, clip_right, clip_top, clip_bottom; int steep, y; dx = to_x - from_x; dy = to_y - from_y; /* Single point. * A line with length 0 is drawn as a single pixel at full brightness. */ if (fabs(dx) < 0.0001 && fabs(dy) < 0.0001) { pixel_color = get_antialiased_color(surf, (int)floor(from_x + 0.5), (int)floor(from_y + 0.5), color, 1, blend); set_and_check_rect(surf, (int)floor(from_x + 0.5), (int)floor(from_y + 0.5), pixel_color, drawn_area); return; } /* To draw correctly the pixels at the border of the clipping area when * the line crosses it, we need to clip it one pixel wider in all four * directions: */ clip_left = (float)surf->clip_rect.x - 1.0f; clip_right = (float)clip_left + surf->clip_rect.w + 1.0f; clip_top = (float)surf->clip_rect.y - 1.0f; clip_bottom = (float)clip_top + surf->clip_rect.h + 1.0f; steep = fabs(dx) < fabs(dy); if (steep) { swap(&from_x, &from_y); swap(&to_x, &to_y); swap(&dx, &dy); swap(&clip_left, &clip_top); swap(&clip_right, &clip_bottom); } if (dx < 0) { swap(&from_x, &to_x); swap(&from_y, &to_y); dx = -dx; dy = -dy; } if (to_x <= clip_left || from_x >= clip_right) { /* The line is completely to the side of the surface */ return; } /* Note. There is no need to guard against a division by zero here. If dx * was zero then either we had a single point (and we've returned) or it * has been swapped with a non-zero dy. */ gradient = dy / dx; /* No need to waste CPU cycles on pixels not on the surface. */ if (from_x < clip_left) { from_y += gradient * (clip_left - from_x); from_x = clip_left; } if (to_x > clip_right) { to_y += gradient * (clip_right - to_x); to_x = clip_right; } if (gradient > 0.0f) { /* from_ is the topmost endpoint */ if (to_y <= clip_top || from_y >= clip_bottom) { /* The line does not enter the surface */ return; } if (from_y < clip_top) { from_x += (clip_top - from_y) / gradient; from_y = clip_top; } if (to_y > clip_bottom) { to_x += (clip_bottom - to_y) / gradient; to_y = clip_bottom; } } else { /* to_ is the topmost endpoint */ if (from_y <= clip_top || to_y >= clip_bottom) { /* The line does not enter the surface */ return; } if (to_y < clip_top) { to_x += (clip_top - to_y) / gradient; to_y = clip_top; } if (from_y > clip_bottom) { from_x += (clip_bottom - from_y) / gradient; from_y = clip_bottom; } } /* By moving the points one pixel down, we can assume y is never negative. * That permit us to use (int)y to round down instead of having to use * floor(y). We then draw the pixels one higher.*/ from_y += 1.0f; to_y += 1.0f; /* Handle endpoints separately. * The line is not a mathematical line of thickness zero. The same * goes for the endpoints. The have a height and width of one pixel. */ /* First endpoint */ x_pixel_start = (int)from_x; y_endpoint = intersect_y = from_y + gradient * (x_pixel_start - from_x); if (to_x > clip_left + 1.0f) { x_gap = 1 + x_pixel_start - from_x; brightness = y_endpoint - (int)y_endpoint; if (steep) { x = (int)y_endpoint; y = x_pixel_start; } else { x = x_pixel_start; y = (int)y_endpoint; } if ((int)y_endpoint < y_endpoint) { pixel_color = get_antialiased_color(surf, x, y, color, brightness * x_gap, blend); set_and_check_rect(surf, x, y, pixel_color, drawn_area); } if (steep) { x--; } else { y--; } brightness = 1 - brightness; pixel_color = get_antialiased_color(surf, x, y, color, brightness * x_gap, blend); set_and_check_rect(surf, x, y, pixel_color, drawn_area); intersect_y += gradient; x_pixel_start++; } /* Second endpoint */ x_pixel_end = (int)ceil(to_x); if (from_x < clip_right - 1.0f) { y_endpoint = to_y + gradient * (x_pixel_end - to_x); x_gap = 1 - x_pixel_end + to_x; brightness = y_endpoint - (int)y_endpoint; if (steep) { x = (int)y_endpoint; y = x_pixel_end; } else { x = x_pixel_end; y = (int)y_endpoint; } if ((int)y_endpoint < y_endpoint) { pixel_color = get_antialiased_color(surf, x, y, color, brightness * x_gap, blend); set_and_check_rect(surf, x, y, pixel_color, drawn_area); } if (steep) { x--; } else { y--; } brightness = 1 - brightness; pixel_color = get_antialiased_color(surf, x, y, color, brightness * x_gap, blend); set_and_check_rect(surf, x, y, pixel_color, drawn_area); } /* main line drawing loop */ for (x = x_pixel_start; x < x_pixel_end; x++) { y = (int)intersect_y; if (steep) { brightness = 1 - intersect_y + y; pixel_color = get_antialiased_color(surf, y - 1, x, color, brightness, blend); set_and_check_rect(surf, y - 1, x, pixel_color, drawn_area); if (y < intersect_y) { brightness = 1 - brightness; pixel_color = get_antialiased_color(surf, y, x, color, brightness, blend); set_and_check_rect(surf, y, x, pixel_color, drawn_area); } } else { brightness = 1 - intersect_y + y; pixel_color = get_antialiased_color(surf, x, y - 1, color, brightness, blend); set_and_check_rect(surf, x, y - 1, pixel_color, drawn_area); if (y < intersect_y) { brightness = 1 - brightness; pixel_color = get_antialiased_color(surf, x, y, color, brightness, blend); set_and_check_rect(surf, x, y, pixel_color, drawn_area); } } intersect_y += gradient; } } static void drawhorzline(SDL_Surface *surf, Uint32 color, int x1, int y1, int x2) { Uint8 *pixel, *end; pixel = ((Uint8 *)surf->pixels) + surf->pitch * y1; end = pixel + x2 * surf->format->BytesPerPixel; pixel += x1 * surf->format->BytesPerPixel; switch (surf->format->BytesPerPixel) { case 1: for (; pixel <= end; ++pixel) { *pixel = (Uint8)color; } break; case 2: for (; pixel <= end; pixel += 2) { *(Uint16 *)pixel = (Uint16)color; } break; case 3: #if SDL_BYTEORDER == SDL_BIG_ENDIAN color <<= 8; #endif for (; pixel <= end; pixel += 3) { memcpy(pixel, &color, 3 * sizeof(Uint8)); } break; default: /*case 4*/ for (; pixel <= end; pixel += 4) { *(Uint32 *)pixel = color; } break; } } static void drawhorzlineclip(SDL_Surface *surf, Uint32 color, int x1, int y1, int x2) { if (y1 < surf->clip_rect.y || y1 >= surf->clip_rect.y + surf->clip_rect.h) return; if (x2 < x1) { int temp = x1; x1 = x2; x2 = temp; } x1 = MAX(x1, surf->clip_rect.x); x2 = MIN(x2, surf->clip_rect.x + surf->clip_rect.w - 1); if (x2 < surf->clip_rect.x || x1 >= surf->clip_rect.x + surf->clip_rect.w) return; if (x1 == x2) { set_at(surf, x1, y1, color); return; } drawhorzline(surf, color, x1, y1, x2); } static void drawhorzlineclipbounding(SDL_Surface *surf, Uint32 color, int x1, int y1, int x2, int *pts) { if (y1 < surf->clip_rect.y || y1 >= surf->clip_rect.y + surf->clip_rect.h) return; if (x2 < x1) { int temp = x1; x1 = x2; x2 = temp; } x1 = MAX(x1, surf->clip_rect.x); x2 = MIN(x2, surf->clip_rect.x + surf->clip_rect.w - 1); if (x2 < surf->clip_rect.x || x1 >= surf->clip_rect.x + surf->clip_rect.w) return; if (x1 == x2) { set_and_check_rect(surf, x1, y1, color, pts); return; } add_line_to_drawn_list(x1, y1, x2, pts); drawhorzline(surf, color, x1, y1, x2); } int inside_clip(SDL_Surface *surf, int x, int y) { if (x < surf->clip_rect.x || x >= surf->clip_rect.x + surf->clip_rect.w || y < surf->clip_rect.y || y >= surf->clip_rect.y + surf->clip_rect.h) return 0; return 1; } static void draw_line_width(SDL_Surface *surf, Uint32 color, int x1, int y1, int x2, int y2, int width, int *drawn_area) { int dx, dy, err, e2, sx, sy, y; int left_top, right_bottom; int end_x = x2; int end_y = y2; int xinc = 0; /* Decide which direction to grow (width/thickness). */ if (abs(x1 - x2) <= abs(y1 - y2)) { /* The line's thickness will be in the x direction. The top/bottom * ends of the line will be flat. */ xinc = 1; } dx = abs(x2 - x1); sx = x1 < x2 ? 1 : -1; dy = abs(y2 - y1); sy = y1 < y2 ? 1 : -1; err = (dx > dy ? dx : -dy) / 2; if (clip_line(surf, &x1, &y1, &x2, &y2)) { if (width == 1) draw_line(surf, x1, y1, x2, y2, color, drawn_area); else { if (xinc) { left_top = x1 - (width - 1) / 2; right_bottom = x1 + width / 2; } else { left_top = y1 - (width - 1) / 2; right_bottom = y1 + width / 2; } while ((sign(x1 - x2, sx) != sx) || (sign(y1 - y2, sy) != sy)) { if (xinc) drawhorzlineclipbounding(surf, color, left_top, y1, right_bottom, drawn_area); else { for (y = left_top; y <= right_bottom; y++) set_and_check_rect(surf, x1, y, color, drawn_area); } e2 = err; if (e2 > -dx) { err -= dy; x1 += sx; if (xinc) { left_top += sx; right_bottom += sx; } } if (e2 < dy) { err += dx; y1 += sy; if (!xinc) { left_top += sy; right_bottom += sy; } } } if (xinc) { while (y1 != end_y && (inside_clip(surf, left_top, y1) || inside_clip(surf, right_bottom, y1))) { drawhorzlineclipbounding(surf, color, left_top, y1, right_bottom, drawn_area); e2 = err; if (e2 > -dx) { err -= dy; x1 += sx; left_top += sx; right_bottom += sx; } if (e2 < dy) { err += dx; y1 += sy; } } drawhorzlineclipbounding(surf, color, left_top, y1, right_bottom, drawn_area); } else { while (x1 != end_x && (inside_clip(surf, x1, left_top) || inside_clip(surf, x1, right_bottom))) { for (y = left_top; y <= right_bottom; y++) set_and_check_rect(surf, x1, y, color, drawn_area); e2 = err; if (e2 > -dx) { err -= dy; x1 += sx; } if (e2 < dy) { err += dx; y1 += sy; left_top += sy; right_bottom += sy; } } for (y = left_top; y <= right_bottom; y++) set_and_check_rect(surf, x1, y, color, drawn_area); } } } } /* Algorithm modified from * https://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm */ static void draw_line(SDL_Surface *surf, int x1, int y1, int x2, int y2, Uint32 color, int *drawn_area) { int dx, dy, err, e2, sx, sy; if (x1 == x2 && y1 == y2) { /* Single point */ set_and_check_rect(surf, x1, y1, color, drawn_area); return; } if (y1 == y2) { /* Horizontal line */ dx = (x1 < x2) ? 1 : -1; for (sx = 0; sx <= abs(x1 - x2); sx++) { set_and_check_rect(surf, x1 + dx * sx, y1, color, drawn_area); } return; } if (x1 == x2) { /* Vertical line */ dy = (y1 < y2) ? 1 : -1; for (sy = 0; sy <= abs(y1 - y2); sy++) set_and_check_rect(surf, x1, y1 + dy * sy, color, drawn_area); return; } dx = abs(x2 - x1), sx = x1 < x2 ? 1 : -1; dy = abs(y2 - y1), sy = y1 < y2 ? 1 : -1; err = (dx > dy ? dx : -dy) / 2; while (x1 != x2 || y1 != y2) { set_and_check_rect(surf, x1, y1, color, drawn_area); e2 = err; if (e2 > -dx) { err -= dy; x1 += sx; } if (e2 < dy) { err += dx; y1 += sy; } } set_and_check_rect(surf, x2, y2, color, drawn_area); } static void draw_arc(SDL_Surface *surf, int x, int y, int radius1, int radius2, double angle_start, double angle_stop, Uint32 color, int *drawn_area) { double aStep; // Angle Step (rad) double a; // Current Angle (rad) int x_last, x_next, y_last, y_next; // Angle step in rad if (radius1 < radius2) { if (radius1 < 1.0e-4) { aStep = 1.0; } else { aStep = asin(2.0 / radius1); } } else { if (radius2 < 1.0e-4) { aStep = 1.0; } else { aStep = asin(2.0 / radius2); } } if (aStep < 0.05) { aStep = 0.05; } x_last = (int)(x + cos(angle_start) * radius1); y_last = (int)(y - sin(angle_start) * radius2); for (a = angle_start + aStep; a < aStep + angle_stop; a += aStep) { int points[4]; x_next = (int)(x + cos(MIN(a, angle_stop)) * radius1); y_next = (int)(y - sin(MIN(a, angle_stop)) * radius2); points[0] = x_last; points[1] = y_last; points[2] = x_next; points[3] = y_next; draw_line(surf, points[0], points[1], points[2], points[3], color, drawn_area); x_last = x_next; y_last = y_next; } } /* Bresenham Circle Algorithm * adapted from: https://de.wikipedia.org/wiki/Bresenham-Algorithmus * with additional line width parameter */ static void draw_circle_bresenham(SDL_Surface *surf, int x0, int y0, int radius, int thickness, Uint32 color, int *drawn_area) { long long x = 0; long long y = radius; long long radius_squared = radius * radius; long long double_radius_squared = 2 * radius_squared; double d1 = radius_squared * (1.25 - radius); long long dx = 0; long long dy = double_radius_squared * y; int line = 1; long long radius_inner = radius - thickness + 1; long long x_inner = 0; long long y_inner = radius_inner; long long radius_inner_squared = radius_inner * radius_inner; long long double_radius_inner_squared = 2 * radius_inner_squared; double d1_inner = radius_inner_squared * (1.25 - radius_inner); double d2_inner = 0; long long dx_inner = 0; long long dy_inner = double_radius_inner_squared * y_inner; while (dx < dy) { while (d1 < 0) { x++; dx += double_radius_squared; d1 += dx + radius_squared; } if (line) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - 1, x0 + (int)x - 1, drawn_area); } else { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - 1, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x_inner - 1, y0 - (int)y, x0 + (int)x - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x_inner - 1, y0 + (int)y - 1, x0 + (int)x - 1, drawn_area); } x++; y--; dx += double_radius_squared; dy -= double_radius_squared; d1 += dx - dy + radius_squared; if (line && y < radius_inner) line = 0; if (!line) { while (d1_inner < 0) { x_inner += 1; dx_inner += double_radius_inner_squared; d1_inner += dx_inner + radius_inner_squared; } x_inner++; y_inner--; dx_inner += double_radius_inner_squared; dy_inner -= double_radius_inner_squared; d1_inner += dx_inner - dy_inner + radius_inner_squared; } } d1 = radius_squared * ((x + 0.5) * (x + 0.5) + (y - 1) * (y - 1) - radius_squared); while (y >= 0) { if (line) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - 1, x0 + (int)x - 1, drawn_area); } else { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - 1, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x_inner - 1, y0 - (int)y, x0 + (int)x - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x_inner - 1, y0 + (int)y - 1, x0 + (int)x - 1, drawn_area); } if (d1 > 0) { y--; dy -= double_radius_squared; d1 += radius_squared - dy; } else { y--; x++; dx += double_radius_squared; dy -= double_radius_squared; d1 += dx - dy + radius_squared; } if (line && y < radius_inner) line = 0; if (!line) { if (dx_inner < dy_inner) { while (d1_inner < 0) { x_inner += 1; dx_inner += double_radius_inner_squared; d1_inner += dx_inner + radius_inner_squared; } x_inner++; y_inner--; dx_inner += double_radius_inner_squared; dy_inner -= double_radius_inner_squared; d1_inner += dx_inner - dy_inner + radius_inner_squared; } else { if (!d2_inner) d2_inner = radius_inner_squared * ((x_inner + 0.5) * (x_inner + 0.5) + (y_inner - 1) * (y_inner - 1) - radius_inner_squared); if (d2_inner > 0) { y_inner--; dy_inner -= double_radius_inner_squared; d2_inner += radius_inner_squared - dy_inner; } else { y_inner--; x_inner++; dx_inner += double_radius_inner_squared; dy_inner -= double_radius_inner_squared; d2_inner += dx_inner - dy_inner + radius_inner_squared; } } } } } static void draw_circle_bresenham_thin(SDL_Surface *surf, int x0, int y0, int radius, Uint32 color, int *drawn_area) { int f = 1 - radius; int ddF_x = 0; int ddF_y = -2 * radius; int x = 0; int y = radius; while (x < y) { if (f >= 0) { y--; ddF_y += 2; f += ddF_y; } x++; ddF_x += 2; f += ddF_x + 1; set_and_check_rect(surf, x0 + x - 1, y0 + y - 1, color, drawn_area); /* 7 */ set_and_check_rect(surf, x0 - x, y0 + y - 1, color, drawn_area); /* 6 */ set_and_check_rect(surf, x0 + x - 1, y0 - y, color, drawn_area); /* 2 */ set_and_check_rect(surf, x0 - x, y0 - y, color, drawn_area); /* 3 */ set_and_check_rect(surf, x0 + y - 1, y0 + x - 1, color, drawn_area); /* 8 */ set_and_check_rect(surf, x0 + y - 1, y0 - x, color, drawn_area); /* 1 */ set_and_check_rect(surf, x0 - y, y0 + x - 1, color, drawn_area); /* 5 */ set_and_check_rect(surf, x0 - y, y0 - x, color, drawn_area); /* 4 */ } } static void draw_circle_quadrant(SDL_Surface *surf, int x0, int y0, int radius, int thickness, Uint32 color, int top_right, int top_left, int bottom_left, int bottom_right, int *drawn_area) { int f = 1 - radius; int ddF_x = 0; int ddF_y = -2 * radius; int x = 0; int y = radius; int y1; int i_y = radius - thickness; int i_f = 1 - i_y; int i_ddF_x = 0; int i_ddF_y = -2 * i_y; int i; if (radius == 1) { if (top_right > 0) set_and_check_rect(surf, x0, y0 - 1, color, drawn_area); if (top_left > 0) set_and_check_rect(surf, x0 - 1, y0 - 1, color, drawn_area); if (bottom_left > 0) set_and_check_rect(surf, x0 - 1, y0, color, drawn_area); if (bottom_right > 0) set_and_check_rect(surf, x0, y0, color, drawn_area); return; } if (thickness != 0) { while (x < y) { if (f >= 0) { y--; ddF_y += 2; f += ddF_y; } if (i_f >= 0) { i_y--; i_ddF_y += 2; i_f += i_ddF_y; } x++; ddF_x += 2; f += ddF_x + 1; i_ddF_x += 2; i_f += i_ddF_x + 1; if (thickness > 1) thickness = y - i_y; /* Numbers represent parts of circle function draw in radians interval: [number - 1 * pi / 4, number * pi / 4] */ if (top_right > 0) { for (i = 0; i < thickness; i++) { y1 = y - i; if ((y0 - y1) < (y0 - x)) set_and_check_rect(surf, x0 + x - 1, y0 - y1, color, drawn_area); /* 2 */ if ((x0 + y1 - 1) >= (x0 + x - 1)) set_and_check_rect(surf, x0 + y1 - 1, y0 - x, color, drawn_area); /* 1 */ } } if (top_left > 0) { for (i = 0; i < thickness; i++) { y1 = y - i; if ((y0 - y1) <= (y0 - x)) set_and_check_rect(surf, x0 - x, y0 - y1, color, drawn_area); /* 3 */ if ((x0 - y1) < (x0 - x)) set_and_check_rect(surf, x0 - y1, y0 - x, color, drawn_area); /* 4 */ } } if (bottom_left > 0) { for (i = 0; i < thickness; i++) { y1 = y - i; if ((x0 - y1) <= (x0 - x)) set_and_check_rect(surf, x0 - y1, y0 + x - 1, color, drawn_area); /* 5 */ if ((y0 + y1 - 1) > (y0 + x - 1)) set_and_check_rect(surf, x0 - x, y0 + y1 - 1, color, drawn_area); /* 6 */ } } if (bottom_right > 0) { for (i = 0; i < thickness; i++) { y1 = y - i; if ((y0 + y1 - 1) >= (y0 + x - 1)) set_and_check_rect(surf, x0 + x - 1, y0 + y1 - 1, color, drawn_area); /* 7 */ if ((x0 + y1 - 1) > (x0 + x - 1)) set_and_check_rect(surf, x0 + y1 - 1, y0 + x - 1, color, drawn_area); /* 8 */ } } } } else { while (x < y) { if (f >= 0) { y--; ddF_y += 2; f += ddF_y; } x++; ddF_x += 2; f += ddF_x + 1; if (top_right > 0) { for (y1 = y0 - x; y1 <= y0; y1++) { set_and_check_rect(surf, x0 + y - 1, y1, color, drawn_area); /* 1 */ } for (y1 = y0 - y; y1 <= y0; y1++) { set_and_check_rect(surf, x0 + x - 1, y1, color, drawn_area); /* 2 */ } } if (top_left > 0) { for (y1 = y0 - x; y1 <= y0; y1++) { set_and_check_rect(surf, x0 - y, y1, color, drawn_area); /* 4 */ } for (y1 = y0 - y; y1 <= y0; y1++) { set_and_check_rect(surf, x0 - x, y1, color, drawn_area); /* 3 */ } } if (bottom_left > 0) { for (y1 = y0; y1 < y0 + x; y1++) { set_and_check_rect(surf, x0 - y, y1, color, drawn_area); /* 4 */ } for (y1 = y0; y1 < y0 + y; y1++) { set_and_check_rect(surf, x0 - x, y1, color, drawn_area); /* 3 */ } } if (bottom_right > 0) { for (y1 = y0; y1 < y0 + x; y1++) { set_and_check_rect(surf, x0 + y - 1, y1, color, drawn_area); /* 1 */ } for (y1 = y0; y1 < y0 + y; y1++) { set_and_check_rect(surf, x0 + x - 1, y1, color, drawn_area); /* 2 */ } } } } } static void draw_circle_filled(SDL_Surface *surf, int x0, int y0, int radius, Uint32 color, int *drawn_area) { int f = 1 - radius; int ddF_x = 0; int ddF_y = -2 * radius; int x = 0; int y = radius; while (x < y) { if (f >= 0) { y--; ddF_y += 2; f += ddF_y; } x++; ddF_x += 2; f += ddF_x + 1; /* optimisation to avoid overdrawing and repeated return rect checks: only draw a line if y-step is about to be decreased. */ if (f >= 0) { drawhorzlineclipbounding(surf, color, x0 - x, y0 + y - 1, x0 + x - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 - x, y0 - y, x0 + x - 1, drawn_area); } drawhorzlineclipbounding(surf, color, x0 - y, y0 + x - 1, x0 + y - 1, drawn_area); drawhorzlineclipbounding(surf, color, x0 - y, y0 - x, x0 + y - 1, drawn_area); } } static void draw_ellipse_filled(SDL_Surface *surf, int x0, int y0, int width, int height, Uint32 color, int *drawn_area) { long long dx, dy, x, y; int x_offset, y_offset; double d1, d2; if (width == 1) { draw_line(surf, x0, y0, x0, y0 + height - 1, color, drawn_area); return; } if (height == 1) { drawhorzlineclipbounding(surf, color, x0, y0, x0 + width - 1, drawn_area); return; } x0 = x0 + width / 2; y0 = y0 + height / 2; x_offset = (width + 1) % 2; y_offset = (height + 1) % 2; width = width / 2; height = height / 2; x = 0; y = height; d1 = (height * height) - (width * width * height) + (0.25 * width * width); dx = 2 * height * height * x; dy = 2 * width * width * y; while (dx < dy) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 + (int)x - x_offset, drawn_area); if (d1 < 0) { x++; dx = dx + (2 * height * height); d1 = d1 + dx + (height * height); } else { x++; y--; dx = dx + (2 * height * height); dy = dy - (2 * width * width); d1 = d1 + dx - dy + (height * height); } } d2 = (((double)height * height) * ((x + 0.5) * (x + 0.5))) + (((double)width * width) * ((y - 1) * (y - 1))) - ((double)width * width * height * height); while (y >= 0) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 + (int)x - x_offset, drawn_area); if (d2 > 0) { y--; dy = dy - (2 * width * width); d2 = d2 + (width * width) - dy; } else { y--; x++; dx = dx + (2 * height * height); dy = dy - (2 * width * width); d2 = d2 + dx - dy + (width * width); } } } static void draw_ellipse_thickness(SDL_Surface *surf, int x0, int y0, int width, int height, int thickness, Uint32 color, int *drawn_area) { long long dx, dy, dx_inner, dy_inner, x, y, x_inner, y_inner; int line, x_offset, y_offset; double d1, d2, d1_inner, d2_inner = 0; x0 = x0 + width / 2; y0 = y0 + height / 2; x_offset = (width + 1) % 2; y_offset = (height + 1) % 2; width = width / 2; height = height / 2; line = 1; x = 0; y = height; x_inner = 0; y_inner = height - thickness; d1 = (height * height) - (width * width * height) + (0.25 * width * width); d1_inner = ((height - thickness) * (height - thickness)) - ((width - thickness) * (width - thickness) * (height - thickness)) + (0.25 * (width - thickness) * (width - thickness)); dx = 2 * height * height * x; dy = 2 * width * width * y; dx_inner = 2 * (height - thickness) * (height - thickness) * x_inner; dy_inner = 2 * (width - thickness) * (width - thickness) * y_inner; while (dx < dy) { if (line) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 + (int)x - x_offset, drawn_area); } else { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x - x_offset, y0 - (int)y, x0 + (int)x_inner - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x - x_offset, y0 + (int)y - y_offset, x0 + (int)x_inner - x_offset, drawn_area); } if (d1 < 0) { x++; dx = dx + (2 * height * height); d1 = d1 + dx + (height * height); } else { x++; y--; dx = dx + (2 * height * height); dy = dy - (2 * width * width); d1 = d1 + dx - dy + (height * height); if (line && y < height - thickness) { line = 0; } if (!line) { if (dx_inner < dy_inner) { while (d1_inner < 0) { x_inner++; dx_inner = dx_inner + (2 * (height - thickness) * (height - thickness)); d1_inner = d1_inner + dx_inner + ((height - thickness) * (height - thickness)); } x_inner++; y_inner--; dx_inner = dx_inner + (2 * (height - thickness) * (height - thickness)); dy_inner = dy_inner - (2 * (width - thickness) * (width - thickness)); d1_inner = d1_inner + dx_inner - dy_inner + ((height - thickness) * (height - thickness)); } } } } d2 = (((double)height * height) * ((x + 0.5) * (x + 0.5))) + (((double)width * width) * ((y - 1) * (y - 1))) - ((double)width * width * height * height); while (y >= 0) { if (line) { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 + (int)x - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 + (int)x - x_offset, drawn_area); } else { drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 - (int)y, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 - (int)x, y0 + (int)y - y_offset, x0 - (int)x_inner, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x - x_offset, y0 - (int)y, x0 + (int)x_inner - x_offset, drawn_area); drawhorzlineclipbounding(surf, color, x0 + (int)x - x_offset, y0 + (int)y - y_offset, x0 + (int)x_inner - x_offset, drawn_area); } if (d2 > 0) { y--; dy = dy - (2 * width * width); d2 = d2 + (width * width) - dy; } else { y--; x++; dx = dx + (2 * height * height); dy = dy - (2 * width * width); d2 = d2 + dx - dy + (width * width); } if (line && y < height - thickness) { line = 0; } if (!line) { if (dx_inner < dy_inner) { while (d1_inner < 0) { x_inner++; dx_inner = dx_inner + (2 * (height - thickness) * (height - thickness)); d1_inner = d1_inner + dx_inner + ((height - thickness) * (height - thickness)); } x_inner++; y_inner--; dx_inner = dx_inner + (2 * (height - thickness) * (height - thickness)); dy_inner = dy_inner - (2 * (width - thickness) * (width - thickness)); d1_inner = d1_inner + dx_inner - dy_inner + ((height - thickness) * (height - thickness)); } else if (y_inner >= 0) { if (d2_inner == 0) { d2_inner = ((((double)height - thickness) * (height - thickness)) * ((x_inner + 0.5) * (x_inner + 0.5))) + ((((double)width - thickness) * (width - thickness)) * ((y_inner - 1) * (y_inner - 1))) - (((double)width - thickness) * (width - thickness) * (height - thickness) * (height - thickness)); } if (d2_inner > 0) { y_inner--; dy_inner = dy_inner - (2 * (width - thickness) * (width - thickness)); d2_inner = d2_inner + ((width - thickness) * (width - thickness)) - dy_inner; } else { y_inner--; x_inner++; dx_inner = dx_inner + (2 * (height - thickness) * (height - thickness)); dy_inner = dy_inner - (2 * (width - thickness) * (width - thickness)); d2_inner = d2_inner + dx_inner - dy_inner + ((width - thickness) * (width - thickness)); } } } } } static void draw_fillpoly(SDL_Surface *surf, int *point_x, int *point_y, Py_ssize_t num_points, Uint32 color, int *drawn_area) { /* point_x : x coordinates of the points * point-y : the y coordinates of the points * num_points : the number of points */ Py_ssize_t i, i_previous; // i_previous is the index of the point before i double y, miny, maxy; double x1, y1; double x2, y2; /* x_intersect are the x-coordinates of intersections of the polygon * with some horizontal line */ int *x_intersect = PyMem_New(int, num_points); if (x_intersect == NULL) { PyErr_NoMemory(); return; } /* Determine Y maxima */ miny = point_y[0]; maxy = point_y[0]; for (i = 1; (i < num_points); i++) { miny = MIN(miny, point_y[i]); maxy = MAX(maxy, point_y[i]); } if (miny == maxy) { /* Special case: polygon only 1 pixel high. */ /* Determine X bounds */ int minx = point_x[0]; int maxx = point_x[0]; for (i = 1; (i < num_points); i++) { minx = MIN(minx, point_x[i]); maxx = MAX(maxx, point_x[i]); } drawhorzlineclipbounding(surf, color, minx, (int)miny, maxx, drawn_area); PyMem_Free(x_intersect); return; } /* Draw, scanning y * ---------------- * The algorithm uses a horizontal line (y) that moves from top to the * bottom of the polygon: * * 1. search intersections with the border lines * 2. sort intersections (x_intersect) * 3. each two x-coordinates in x_intersect are then inside the polygon * (draw line for a pair of two such points) */ for (y = miny; (y <= maxy); y++) { // n_intersections is the number of intersections with the polygon int n_intersections = 0; for (i = 0; (i < num_points); i++) { i_previous = ((i) ? (i - 1) : (num_points - 1)); y1 = point_y[i_previous]; y2 = point_y[i]; if (y1 < y2) { x1 = point_x[i_previous]; x2 = point_x[i]; } else if (y1 > y2) { y2 = point_y[i_previous]; y1 = point_y[i]; x2 = point_x[i_previous]; x1 = point_x[i]; } else { // y1 == y2 : has to be handled as special case (below) continue; } if (((y >= y1) && (y < y2)) || ((y == maxy) && (y2 == maxy))) { // add intersection if y crosses the edge (excluding the lower // end), or when we are on the lowest line (maxy) x_intersect[n_intersections++] = (int)((y - y1) * (x2 - x1) / (y2 - y1) + x1); } } qsort(x_intersect, n_intersections, sizeof(int), compare_int); for (i = 0; (i < n_intersections); i += 2) { drawhorzlineclipbounding(surf, color, x_intersect[i], (int)y, x_intersect[i + 1], drawn_area); } } /* Finally, a special case is not handled by above algorithm: * * For two border points with same height miny < y < maxy, * sometimes the line between them is not colored: * this happens when the line will be a lower border line of the polygon * (eg we are inside the polygon with a smaller y, and outside with a * bigger y), * So we loop for border lines that are horizontal. */ for (i = 0; (i < num_points); i++) { i_previous = ((i) ? (i - 1) : (num_points - 1)); y = point_y[i]; if ((miny < y) && (point_y[i_previous] == y) && (y < maxy)) { drawhorzlineclipbounding(surf, color, point_x[i], (int)y, point_x[i_previous], drawn_area); } } PyMem_Free(x_intersect); } static void draw_rect(SDL_Surface *surf, int x1, int y1, int x2, int y2, int width, Uint32 color) { int i; for (i = 0; i < width; i++) { drawhorzlineclip(surf, color, x1, y1 + i, x2); drawhorzlineclip(surf, color, x1, y2 - i, x2); } for (i = 0; i < (y2 - y1) - 2 * width + 1; i++) { drawhorzlineclip(surf, color, x1, y1 + width + i, x1 + width - 1); drawhorzlineclip(surf, color, x2 - width + 1, y1 + width + i, x2); } } static void draw_round_rect(SDL_Surface *surf, int x1, int y1, int x2, int y2, int radius, int width, Uint32 color, int top_left, int top_right, int bottom_left, int bottom_right, int *drawn_area) { int pts[16], i; float q_top, q_left, q_bottom, q_right, f; if (top_left < 0) top_left = radius; if (top_right < 0) top_right = radius; if (bottom_left < 0) bottom_left = radius; if (bottom_right < 0) bottom_right = radius; if ((top_left + top_right) > (x2 - x1 + 1) || (bottom_left + bottom_right) > (x2 - x1 + 1) || (top_left + bottom_left) > (y2 - y1 + 1) || (top_right + bottom_right) > (y2 - y1 + 1)) { q_top = (x2 - x1 + 1) / (float)(top_left + top_right); q_left = (y2 - y1 + 1) / (float)(top_left + bottom_left); q_bottom = (x2 - x1 + 1) / (float)(bottom_left + bottom_right); q_right = (y2 - y1 + 1) / (float)(top_right + bottom_right); f = MIN(MIN(MIN(q_top, q_left), q_bottom), q_right); top_left = (int)(top_left * f); top_right = (int)(top_right * f); bottom_left = (int)(bottom_left * f); bottom_right = (int)(bottom_right * f); } if (width == 0) { /* Filled rect */ pts[0] = x1; pts[1] = x1 + top_left; pts[2] = x2 - top_right; pts[3] = x2; pts[4] = x2; pts[5] = x2 - bottom_right; pts[6] = x1 + bottom_left; pts[7] = x1; pts[8] = y1 + top_left; pts[9] = y1; pts[10] = y1; pts[11] = y1 + top_right; pts[12] = y2 - bottom_right; pts[13] = y2; pts[14] = y2; pts[15] = y2 - bottom_left; draw_fillpoly(surf, pts, pts + 8, 8, color, drawn_area); draw_circle_quadrant(surf, x2 - top_right + 1, y1 + top_right, top_right, 0, color, 1, 0, 0, 0, drawn_area); draw_circle_quadrant(surf, x1 + top_left, y1 + top_left, top_left, 0, color, 0, 1, 0, 0, drawn_area); draw_circle_quadrant(surf, x1 + bottom_left, y2 - bottom_left + 1, bottom_left, 0, color, 0, 0, 1, 0, drawn_area); draw_circle_quadrant(surf, x2 - bottom_right + 1, y2 - bottom_right + 1, bottom_right, 0, color, 0, 0, 0, 1, drawn_area); } else { if (x2 - top_right == x1 + top_left) { for (i = 0; i < width; i++) { set_and_check_rect( surf, x1 + top_left, y1 + i, color, drawn_area); /* Fill gap if reduced radius */ } } else draw_line_width(surf, color, x1 + top_left, y1 + (int)(width / 2) - 1 + width % 2, x2 - top_right, y1 + (int)(width / 2) - 1 + width % 2, width, drawn_area); /* Top line */ if (y2 - bottom_left == y1 + top_left) { for (i = 0; i < width; i++) { set_and_check_rect( surf, x1 + i, y1 + top_left, color, drawn_area); /* Fill gap if reduced radius */ } } else draw_line_width( surf, color, x1 + (int)(width / 2) - 1 + width % 2, y1 + top_left, x1 + (int)(width / 2) - 1 + width % 2, y2 - bottom_left, width, drawn_area); /* Left line */ if (x2 - bottom_right == x1 + bottom_left) { for (i = 0; i < width; i++) { set_and_check_rect( surf, x1 + bottom_left, y2 - i, color, drawn_area); /* Fill gap if reduced radius */ } } else draw_line_width(surf, color, x1 + bottom_left, y2 - (int)(width / 2), x2 - bottom_right, y2 - (int)(width / 2), width, drawn_area); /* Bottom line */ if (y2 - bottom_right == y1 + top_right) { for (i = 0; i < width; i++) { set_and_check_rect( surf, x2 - i, y1 + top_right, color, drawn_area); /* Fill gap if reduced radius */ } } else draw_line_width(surf, color, x2 - (int)(width / 2), y1 + top_right, x2 - (int)(width / 2), y2 - bottom_right, width, drawn_area); /* Right line */ draw_circle_quadrant(surf, x2 - top_right + 1, y1 + top_right, top_right, width, color, 1, 0, 0, 0, drawn_area); draw_circle_quadrant(surf, x1 + top_left, y1 + top_left, top_left, width, color, 0, 1, 0, 0, drawn_area); draw_circle_quadrant(surf, x1 + bottom_left, y2 - bottom_left + 1, bottom_left, width, color, 0, 0, 1, 0, drawn_area); draw_circle_quadrant(surf, x2 - bottom_right + 1, y2 - bottom_right + 1, bottom_right, width, color, 0, 0, 0, 1, drawn_area); } } /* List of python functions */ static PyMethodDef _draw_methods[] = { {"aaline", (PyCFunction)aaline, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWAALINE}, {"line", (PyCFunction)line, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWLINE}, {"aalines", (PyCFunction)aalines, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWAALINES}, {"lines", (PyCFunction)lines, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWLINES}, {"ellipse", (PyCFunction)ellipse, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWELLIPSE}, {"arc", (PyCFunction)arc, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWARC}, {"circle", (PyCFunction)circle, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWCIRCLE}, {"polygon", (PyCFunction)polygon, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWPOLYGON}, {"rect", (PyCFunction)rect, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEDRAWRECT}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(draw) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "draw", DOC_PYGAMEDRAW, -1, _draw_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* create the module */ return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/event.c0000644000175100001770000022270414676242340015004 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * pygame event module */ #define PYGAMEAPI_EVENT_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/event_doc.h" #include "structmember.h" // The system message code is only tested on windows, so only // include it there for now. #include #define JOYEVENT_INSTANCE_ID "instance_id" #define JOYEVENT_DEVICE_INDEX "device_index" /* Define custom functions for peep events, for SDL1/2 compat */ #define PG_PEEP_EVENT(a, b, c, d) SDL_PeepEvents(a, b, c, d, d) #define PG_PEEP_EVENT_ALL(x, y, z) \ SDL_PeepEvents(x, y, z, SDL_FIRSTEVENT, SDL_LASTEVENT) /* These are used for checks. The checks are kinda redundant because we * have proxy events anyways, but this is needed for SDL1 */ #define USEROBJ_CHECK (Sint32)0xFEEDF00D #define MAX_UINT32 0xFFFFFFFF #define PG_GET_LIST_LEN 128 // Map joystick instance IDs to device ids for partial backwards compatibility static PyObject *joy_instance_map = NULL; /* _custom_event stores the next custom user event type that will be * returned by pygame.event.custom_type() */ #define _PGE_CUSTOM_EVENT_INIT PGE_USEREVENT + 1 static int _custom_event = _PGE_CUSTOM_EVENT_INIT; static int _pg_event_is_init = 0; /* Length of our unicode string in bytes. We need 1 to 3 bytes to store * our unicode data, so we use a length of 4, to include the NULL byte * at the end as well */ #define UNICODE_LEN 4 /* This defines the maximum values of key-press and unicode values we * can store at a time, it is used for determining the unicode attribute * for KEYUP events. Now that its set to 15, it means that a user can * simultaneously hold 15 keys (who would do that?) and on release, all * KEYUP events will have unicode attribute. Why 15? You can set any * arbitrary number you like ;) */ #define MAX_SCAN_UNICODE 15 /* SDL mutex to be held in the event filter when global state is modified. * This mutex is intentionally immortalised (never freed during the entire * duration of the program) because its cleanup can be messy with multiple * threads trying to use it. Since it's a singleton we don't need to worry * about memory leaks */ #ifndef __EMSCRIPTEN__ /* emscripten does not allow multithreading for now and SDL_CreateMutex fails. * Don't bother with mutexes on emscripten for now */ static SDL_mutex *pg_evfilter_mutex = NULL; #endif static struct ScanAndUnicode { SDL_Scancode key; char unicode[UNICODE_LEN]; } scanunicode[MAX_SCAN_UNICODE] = {{0}}; static int pg_key_repeat_delay = 0; static int pg_key_repeat_interval = 0; static SDL_TimerID _pg_repeat_timer = 0; static SDL_Event _pg_repeat_event; static SDL_Event _pg_last_keydown_event = {0}; #ifdef __EMSCRIPTEN__ /* these macros are no-op here */ #define PG_LOCK_EVFILTER_MUTEX #define PG_UNLOCK_EVFILTER_MUTEX #else /* not on emscripten */ #define PG_LOCK_EVFILTER_MUTEX \ if (pg_evfilter_mutex) { \ if (SDL_LockMutex(pg_evfilter_mutex) < 0) { \ /* TODO: better error handling with future error-event API */ \ /* since this error is very rare, we can completely give up if \ * this happens for now */ \ printf("Fatal pygame error in SDL_LockMutex: %s", \ SDL_GetError()); \ PG_EXIT(1); \ } \ } #define PG_UNLOCK_EVFILTER_MUTEX \ if (pg_evfilter_mutex) { \ if (SDL_UnlockMutex(pg_evfilter_mutex) < 0) { \ /* TODO: handle errors with future error-event API */ \ /* since this error is very rare, we can completely give up if \ * this happens for now */ \ printf("Fatal pygame error in SDL_UnlockMutex: %s", \ SDL_GetError()); \ PG_EXIT(1); \ } \ } #endif /* not on emscripten */ static Uint32 _pg_repeat_callback(Uint32 interval, void *param) { /* This function is called in a SDL Timer thread */ PG_LOCK_EVFILTER_MUTEX /* This assignment only shallow-copies, but SDL_KeyboardEvent does not have * any pointer values so it's safe to do */ SDL_Event repeat_event_copy = _pg_repeat_event; int repeat_interval_copy = pg_key_repeat_interval; PG_UNLOCK_EVFILTER_MUTEX repeat_event_copy.type = PGE_KEYREPEAT; repeat_event_copy.key.state = SDL_PRESSED; repeat_event_copy.key.repeat = 1; SDL_PushEvent(&repeat_event_copy); return repeat_interval_copy; } /* This function attempts to determine the unicode attribute from * the keydown/keyup event. This is used as a last-resort, in case we * could not determine the unicode from TEXTINPUT field. Why? * Because this function is really basic and cannot determine the * fancy unicode characters, just the basic ones * * One more advantage of this function is that it can return unicode * for some keys which TEXTINPUT does not provide (which unicode * attribute of SDL1 provided) */ static char _pg_unicode_from_event(SDL_Event *event) { int capsheld = event->key.keysym.mod & KMOD_CAPS; int shiftheld = event->key.keysym.mod & KMOD_SHIFT; int capitalize = (capsheld && !shiftheld) || (shiftheld && !capsheld); SDL_Keycode key = event->key.keysym.sym; if (event->key.keysym.mod & KMOD_CTRL) { /* Control Key held, send control-key related unicode. */ if (key >= SDLK_a && key <= SDLK_z) return key - SDLK_a + 1; else { switch (key) { case SDLK_2: case SDLK_AT: return '\0'; case SDLK_3: case SDLK_LEFTBRACKET: return '\x1b'; case SDLK_4: case SDLK_BACKSLASH: return '\x1c'; case SDLK_5: case SDLK_RIGHTBRACKET: return '\x1d'; case SDLK_6: case SDLK_CARET: return '\x1e'; case SDLK_7: case SDLK_UNDERSCORE: return '\x1f'; case SDLK_8: return '\x7f'; } } } if (key < 128) { if (capitalize && key >= SDLK_a && key <= SDLK_z) return key + 'A' - 'a'; return key; } switch (key) { case SDLK_KP_PERIOD: return '.'; case SDLK_KP_DIVIDE: return '/'; case SDLK_KP_MULTIPLY: return '*'; case SDLK_KP_MINUS: return '-'; case SDLK_KP_PLUS: return '+'; case SDLK_KP_ENTER: return '\r'; case SDLK_KP_EQUALS: return '='; } return '\0'; } /* Strip a utf-8 encoded string to contain only first character. Also * ensure that character can be represented within 3 bytes, because SDL1 * did not support unicode characters that took up 4 bytes. In case this * bit of code is not clear, here is a python equivalent def _pg_strip_utf8(string): if chr(string[0]) <= 0xFFFF: return string[0] else: return "" */ static void _pg_strip_utf8(char *str, char *ret) { Uint8 firstbyte = (Uint8)*str; /* Zero unicode buffer */ memset(ret, 0, UNICODE_LEN); /* 1111 0000 is 0xF0 */ if (firstbyte >= 0xF0) { /* Too large UTF8 string, do nothing */ return; } /* 1110 0000 is 0xE0 */ if (firstbyte >= 0xE0) { /* Copy first 3 bytes */ memcpy(ret, str, 3); } /* 1100 0000 is 0xC0 */ else if (firstbyte >= 0xC0) { /* Copy first 2 bytes */ memcpy(ret, str, 2); } /* 1000 0000 is 0x80 */ else if (firstbyte < 0x80) { /* Copy first byte */ memcpy(ret, str, 1); } } static int _pg_put_event_unicode(SDL_Event *event, char *uni) { int i; for (i = 0; i < MAX_SCAN_UNICODE; i++) { if (!scanunicode[i].key) { scanunicode[i].key = event->key.keysym.scancode; _pg_strip_utf8(uni, scanunicode[i].unicode); return 1; } } return 0; } static PyObject * _pg_get_event_unicode(SDL_Event *event) { char c[20]; int i; for (i = 0; i < MAX_SCAN_UNICODE; i++) { if (scanunicode[i].key == event->key.keysym.scancode) { if (event->type == SDL_KEYUP) { /* mark the position as free real estate for other * events to occupy. */ scanunicode[i].key = 0; } return PyUnicode_FromString(scanunicode[i].unicode); } } /* fallback to function that determines unicode from the event. * We try to get the unicode attribute, and store it in memory*/ c[0] = _pg_unicode_from_event(event); if (_pg_put_event_unicode(event, &c[0])) return _pg_get_event_unicode(event); return PyUnicode_FromString(""); } #define _PG_HANDLE_PROXIFY(name) \ case SDL_##name: \ case PGPOST_##name: \ return proxify ? PGPOST_##name : SDL_##name #define _PG_HANDLE_PROXIFY_PGE(name) \ case PGE_##name: \ case PGPOST_##name: \ return proxify ? PGPOST_##name : PGE_##name /* The next three functions are used for proxying SDL events to and from * PGPOST_* events. * * Some SDL1 events (SDL_ACTIVEEVENT, SDL_VIDEORESIZE and SDL_VIDEOEXPOSE) * are redefined with SDL2, they HAVE to be proxied. * * SDL_USEREVENT is not proxied, because with SDL2, pygame assigns a * different event in place of SDL_USEREVENT, and users use PGE_USEREVENT * * Each WINDOW_* event must be defined twice, once as an event, and also * again, as a proxy event. WINDOW_* events MUST be proxied. */ static Uint32 _pg_pgevent_proxify_helper(Uint32 type, Uint8 proxify) { switch (type) { _PG_HANDLE_PROXIFY(ACTIVEEVENT); _PG_HANDLE_PROXIFY(APP_TERMINATING); _PG_HANDLE_PROXIFY(APP_LOWMEMORY); _PG_HANDLE_PROXIFY(APP_WILLENTERBACKGROUND); _PG_HANDLE_PROXIFY(APP_DIDENTERBACKGROUND); _PG_HANDLE_PROXIFY(APP_WILLENTERFOREGROUND); _PG_HANDLE_PROXIFY(APP_DIDENTERFOREGROUND); _PG_HANDLE_PROXIFY(AUDIODEVICEADDED); _PG_HANDLE_PROXIFY(AUDIODEVICEREMOVED); _PG_HANDLE_PROXIFY(CLIPBOARDUPDATE); _PG_HANDLE_PROXIFY(CONTROLLERAXISMOTION); _PG_HANDLE_PROXIFY(CONTROLLERBUTTONDOWN); _PG_HANDLE_PROXIFY(CONTROLLERBUTTONUP); _PG_HANDLE_PROXIFY(CONTROLLERDEVICEADDED); _PG_HANDLE_PROXIFY(CONTROLLERDEVICEREMOVED); _PG_HANDLE_PROXIFY(CONTROLLERDEVICEREMAPPED); #if SDL_VERSION_ATLEAST(2, 0, 14) _PG_HANDLE_PROXIFY(CONTROLLERTOUCHPADDOWN); _PG_HANDLE_PROXIFY(CONTROLLERTOUCHPADMOTION); _PG_HANDLE_PROXIFY(CONTROLLERTOUCHPADUP); _PG_HANDLE_PROXIFY(CONTROLLERSENSORUPDATE); #endif _PG_HANDLE_PROXIFY(DOLLARGESTURE); _PG_HANDLE_PROXIFY(DOLLARRECORD); _PG_HANDLE_PROXIFY(DROPFILE); _PG_HANDLE_PROXIFY(DROPTEXT); _PG_HANDLE_PROXIFY(DROPBEGIN); _PG_HANDLE_PROXIFY(DROPCOMPLETE); _PG_HANDLE_PROXIFY(FINGERMOTION); _PG_HANDLE_PROXIFY(FINGERDOWN); _PG_HANDLE_PROXIFY(FINGERUP); _PG_HANDLE_PROXIFY(KEYDOWN); _PG_HANDLE_PROXIFY(KEYUP); _PG_HANDLE_PROXIFY(KEYMAPCHANGED); _PG_HANDLE_PROXIFY(JOYAXISMOTION); _PG_HANDLE_PROXIFY(JOYBALLMOTION); _PG_HANDLE_PROXIFY(JOYHATMOTION); _PG_HANDLE_PROXIFY(JOYBUTTONDOWN); _PG_HANDLE_PROXIFY(JOYBUTTONUP); _PG_HANDLE_PROXIFY(JOYDEVICEADDED); _PG_HANDLE_PROXIFY(JOYDEVICEREMOVED); #if SDL_VERSION_ATLEAST(2, 0, 14) _PG_HANDLE_PROXIFY(LOCALECHANGED); #endif _PG_HANDLE_PROXIFY(MOUSEMOTION); _PG_HANDLE_PROXIFY(MOUSEBUTTONDOWN); _PG_HANDLE_PROXIFY(MOUSEBUTTONUP); _PG_HANDLE_PROXIFY(MOUSEWHEEL); _PG_HANDLE_PROXIFY(MULTIGESTURE); _PG_HANDLE_PROXIFY(NOEVENT); _PG_HANDLE_PROXIFY(QUIT); _PG_HANDLE_PROXIFY(RENDER_TARGETS_RESET); _PG_HANDLE_PROXIFY(RENDER_DEVICE_RESET); _PG_HANDLE_PROXIFY(SYSWMEVENT); _PG_HANDLE_PROXIFY(TEXTEDITING); _PG_HANDLE_PROXIFY(TEXTINPUT); _PG_HANDLE_PROXIFY(VIDEORESIZE); _PG_HANDLE_PROXIFY(VIDEOEXPOSE); _PG_HANDLE_PROXIFY_PGE(MIDIIN); _PG_HANDLE_PROXIFY_PGE(MIDIOUT); _PG_HANDLE_PROXIFY_PGE(WINDOWSHOWN); _PG_HANDLE_PROXIFY_PGE(WINDOWHIDDEN); _PG_HANDLE_PROXIFY_PGE(WINDOWEXPOSED); _PG_HANDLE_PROXIFY_PGE(WINDOWMOVED); _PG_HANDLE_PROXIFY_PGE(WINDOWRESIZED); _PG_HANDLE_PROXIFY_PGE(WINDOWSIZECHANGED); _PG_HANDLE_PROXIFY_PGE(WINDOWMINIMIZED); _PG_HANDLE_PROXIFY_PGE(WINDOWMAXIMIZED); _PG_HANDLE_PROXIFY_PGE(WINDOWRESTORED); _PG_HANDLE_PROXIFY_PGE(WINDOWENTER); _PG_HANDLE_PROXIFY_PGE(WINDOWLEAVE); _PG_HANDLE_PROXIFY_PGE(WINDOWFOCUSGAINED); _PG_HANDLE_PROXIFY_PGE(WINDOWFOCUSLOST); _PG_HANDLE_PROXIFY_PGE(WINDOWCLOSE); _PG_HANDLE_PROXIFY_PGE(WINDOWTAKEFOCUS); _PG_HANDLE_PROXIFY_PGE(WINDOWHITTEST); _PG_HANDLE_PROXIFY_PGE(WINDOWICCPROFCHANGED); _PG_HANDLE_PROXIFY_PGE(WINDOWDISPLAYCHANGED); default: return type; } } static Uint32 _pg_pgevent_proxify(Uint32 type) { return _pg_pgevent_proxify_helper(type, 1); } static Uint32 _pg_pgevent_deproxify(Uint32 type) { return _pg_pgevent_proxify_helper(type, 0); } static int _pg_translate_windowevent(void *_, SDL_Event *event) { if (event->type == SDL_WINDOWEVENT) { event->type = PGE_WINDOWSHOWN + event->window.event - 1; return SDL_EventState(_pg_pgevent_proxify(event->type), SDL_QUERY); } return 1; } static int SDLCALL _pg_remove_pending_VIDEORESIZE(void *userdata, SDL_Event *event) { SDL_Event *new_event = (SDL_Event *)userdata; if (event->type == SDL_VIDEORESIZE && event->window.windowID == new_event->window.windowID) { /* We're about to post a new size event, drop the old ones */ return 0; } return 1; } static int SDLCALL _pg_remove_pending_VIDEOEXPOSE(void *userdata, SDL_Event *event) { SDL_Event *new_event = (SDL_Event *)userdata; if (event->type == SDL_VIDEOEXPOSE && event->window.windowID == new_event->window.windowID) { /* We're about to post a new videoexpose event, drop the old ones */ return 0; } return 1; } /* SDL 2 to SDL 1.2 event mapping and SDL 1.2 key repeat emulation, * this can alter events in-place. * This function can be called from multiple threads, so a mutex must be held * when this function tries to modify any global state (the mutex is not needed * on all branches of this function) */ static int SDLCALL pg_event_filter(void *_, SDL_Event *event) { SDL_Event newdownevent, newupevent, newevent = *event; int x, y, i; if (event->type == SDL_WINDOWEVENT) { /* DON'T filter SDL_WINDOWEVENTs here. If we delete events, they * won't be available to low-level SDL2 either.*/ switch (event->window.event) { case SDL_WINDOWEVENT_RESIZED: SDL_FilterEvents(_pg_remove_pending_VIDEORESIZE, &newevent); newevent.type = SDL_VIDEORESIZE; SDL_PushEvent(&newevent); break; case SDL_WINDOWEVENT_EXPOSED: SDL_FilterEvents(_pg_remove_pending_VIDEOEXPOSE, &newevent); newevent.type = SDL_VIDEOEXPOSE; SDL_PushEvent(&newevent); break; case SDL_WINDOWEVENT_ENTER: case SDL_WINDOWEVENT_LEAVE: case SDL_WINDOWEVENT_FOCUS_GAINED: case SDL_WINDOWEVENT_FOCUS_LOST: case SDL_WINDOWEVENT_MINIMIZED: case SDL_WINDOWEVENT_RESTORED: newevent.type = SDL_ACTIVEEVENT; SDL_PushEvent(&newevent); } } else if (event->type == SDL_KEYDOWN) { if (event->key.repeat) return 0; PG_LOCK_EVFILTER_MUTEX if (pg_key_repeat_delay > 0) { if (_pg_repeat_timer) SDL_RemoveTimer(_pg_repeat_timer); _pg_repeat_event = *event; _pg_repeat_timer = SDL_AddTimer(pg_key_repeat_delay, _pg_repeat_callback, NULL); } /* store the keydown event for later in the SDL_TEXTINPUT */ _pg_last_keydown_event = *event; PG_UNLOCK_EVFILTER_MUTEX } else if (event->type == SDL_TEXTINPUT) { PG_LOCK_EVFILTER_MUTEX if (_pg_last_keydown_event.type) { _pg_put_event_unicode(&_pg_last_keydown_event, event->text.text); _pg_last_keydown_event.type = 0; } PG_UNLOCK_EVFILTER_MUTEX } else if (event->type == PGE_KEYREPEAT) { event->type = SDL_KEYDOWN; } else if (event->type == SDL_KEYUP) { PG_LOCK_EVFILTER_MUTEX if (_pg_repeat_timer && _pg_repeat_event.key.keysym.scancode == event->key.keysym.scancode) { SDL_RemoveTimer(_pg_repeat_timer); _pg_repeat_timer = 0; } PG_UNLOCK_EVFILTER_MUTEX } else if (event->type == SDL_MOUSEBUTTONDOWN || event->type == SDL_MOUSEBUTTONUP) { if (event->button.button & PGM_BUTTON_KEEP) event->button.button ^= PGM_BUTTON_KEEP; else if (event->button.button >= PGM_BUTTON_WHEELUP) event->button.button += (PGM_BUTTON_X1 - PGM_BUTTON_WHEELUP); } else if (event->type == SDL_MOUSEWHEEL) { // #691 We are not moving wheel! if (!event->wheel.y && !event->wheel.x) return 0; SDL_GetMouseState(&x, &y); /* Generate a MouseButtonDown event and MouseButtonUp for * compatibility. https://wiki.libsdl.org/SDL_MouseWheelEvent */ newdownevent.type = SDL_MOUSEBUTTONDOWN; newdownevent.button.x = x; newdownevent.button.y = y; newdownevent.button.state = SDL_PRESSED; newdownevent.button.clicks = 1; newdownevent.button.which = event->button.which; newupevent.type = SDL_MOUSEBUTTONUP; newupevent.button.x = x; newupevent.button.y = y; newupevent.button.state = SDL_RELEASED; newupevent.button.clicks = 1; newupevent.button.which = event->button.which; /* Use a for loop to simulate multiple events, because SDL 1 * works that way */ for (i = 0; i < abs(event->wheel.y); i++) { /* Do this in the loop because button.button is mutated before it * is posted from this filter */ if (event->wheel.y > 0) { newdownevent.button.button = newupevent.button.button = PGM_BUTTON_WHEELUP | PGM_BUTTON_KEEP; } else { newdownevent.button.button = newupevent.button.button = PGM_BUTTON_WHEELDOWN | PGM_BUTTON_KEEP; } SDL_PushEvent(&newdownevent); SDL_PushEvent(&newupevent); } /* this doesn't work! This is called by SDL, not Python: if (SDL_PushEvent(&newdownevent) < 0) return RAISE(pgExc_SDLError, SDL_GetError()), 0; */ } return SDL_EventState(_pg_pgevent_proxify(event->type), SDL_QUERY); } /* The two keyrepeat functions below modify state accessed by the event filter, * so they too need to hold the safety mutex */ static int pg_EnableKeyRepeat(int delay, int interval) { if (delay < 0 || interval < 0) { PyErr_SetString(PyExc_ValueError, "delay and interval must equal at least 0"); return -1; } PG_LOCK_EVFILTER_MUTEX pg_key_repeat_delay = delay; pg_key_repeat_interval = interval; PG_UNLOCK_EVFILTER_MUTEX return 0; } static void pg_GetKeyRepeat(int *delay, int *interval) { PG_LOCK_EVFILTER_MUTEX *delay = pg_key_repeat_delay; *interval = pg_key_repeat_interval; PG_UNLOCK_EVFILTER_MUTEX } static PyObject * pgEvent_AutoQuit(PyObject *self, PyObject *_null) { if (_pg_event_is_init) { PG_LOCK_EVFILTER_MUTEX if (_pg_repeat_timer) { SDL_RemoveTimer(_pg_repeat_timer); _pg_repeat_timer = 0; } PG_UNLOCK_EVFILTER_MUTEX /* The main reason for _custom_event to be reset here is so we * can have a unit test that checks if pygame.event.custom_type() * stops returning new types when they are finished, without that * test preventing further tests from getting a custom event type.*/ _custom_event = _PGE_CUSTOM_EVENT_INIT; } _pg_event_is_init = 0; Py_RETURN_NONE; } static PyObject * pgEvent_AutoInit(PyObject *self, PyObject *_null) { if (!_pg_event_is_init) { pg_key_repeat_delay = 0; pg_key_repeat_interval = 0; #ifndef __EMSCRIPTEN__ if (!pg_evfilter_mutex) { /* Create mutex only if it has not been created already */ pg_evfilter_mutex = SDL_CreateMutex(); if (!pg_evfilter_mutex) return RAISE(pgExc_SDLError, SDL_GetError()); } #endif SDL_SetEventFilter(pg_event_filter, NULL); } _pg_event_is_init = 1; Py_RETURN_NONE; } /* This function can fill an SDL event from pygame event */ static int pgEvent_FillUserEvent(pgEventObject *e, SDL_Event *event) { Py_INCREF(e->dict); memset(event, 0, sizeof(SDL_Event)); event->type = _pg_pgevent_proxify(e->type); event->user.code = USEROBJ_CHECK; event->user.data1 = (void *)e->dict; event->user.data2 = NULL; return 0; } static char * _pg_name_from_eventtype(int type) { switch (type) { case SDL_ACTIVEEVENT: return "ActiveEvent"; case SDL_APP_TERMINATING: return "AppTerminating"; case SDL_APP_LOWMEMORY: return "AppLowMemory"; case SDL_APP_WILLENTERBACKGROUND: return "AppWillEnterBackground"; case SDL_APP_DIDENTERBACKGROUND: return "AppDidEnterBackground"; case SDL_APP_WILLENTERFOREGROUND: return "AppWillEnterForeground"; case SDL_APP_DIDENTERFOREGROUND: return "AppDidEnterForeground"; case SDL_CLIPBOARDUPDATE: return "ClipboardUpdate"; case SDL_KEYDOWN: return "KeyDown"; case SDL_KEYUP: return "KeyUp"; case SDL_KEYMAPCHANGED: return "KeyMapChanged"; #if SDL_VERSION_ATLEAST(2, 0, 14) case SDL_LOCALECHANGED: return "LocaleChanged"; #endif case SDL_MOUSEMOTION: return "MouseMotion"; case SDL_MOUSEBUTTONDOWN: return "MouseButtonDown"; case SDL_MOUSEBUTTONUP: return "MouseButtonUp"; case SDL_JOYAXISMOTION: return "JoyAxisMotion"; case SDL_JOYBALLMOTION: return "JoyBallMotion"; case SDL_JOYHATMOTION: return "JoyHatMotion"; case SDL_JOYBUTTONUP: return "JoyButtonUp"; case SDL_JOYBUTTONDOWN: return "JoyButtonDown"; case SDL_QUIT: return "Quit"; case SDL_SYSWMEVENT: return "SysWMEvent"; case SDL_VIDEORESIZE: return "VideoResize"; case SDL_VIDEOEXPOSE: return "VideoExpose"; case PGE_MIDIIN: return "MidiIn"; case PGE_MIDIOUT: return "MidiOut"; case SDL_NOEVENT: return "NoEvent"; case SDL_FINGERMOTION: return "FingerMotion"; case SDL_FINGERDOWN: return "FingerDown"; case SDL_FINGERUP: return "FingerUp"; case SDL_MULTIGESTURE: return "MultiGesture"; case SDL_MOUSEWHEEL: return "MouseWheel"; case SDL_TEXTINPUT: return "TextInput"; case SDL_TEXTEDITING: return "TextEditing"; case SDL_DROPFILE: return "DropFile"; case SDL_DROPTEXT: return "DropText"; case SDL_DROPBEGIN: return "DropBegin"; case SDL_DROPCOMPLETE: return "DropComplete"; case SDL_CONTROLLERAXISMOTION: return "ControllerAxisMotion"; case SDL_CONTROLLERBUTTONDOWN: return "ControllerButtonDown"; case SDL_CONTROLLERBUTTONUP: return "ControllerButtonUp"; case SDL_CONTROLLERDEVICEADDED: return "ControllerDeviceAdded"; case SDL_CONTROLLERDEVICEREMOVED: return "ControllerDeviceRemoved"; case SDL_CONTROLLERDEVICEREMAPPED: return "ControllerDeviceMapped"; case SDL_JOYDEVICEADDED: return "JoyDeviceAdded"; case SDL_JOYDEVICEREMOVED: return "JoyDeviceRemoved"; #if SDL_VERSION_ATLEAST(2, 0, 14) case SDL_CONTROLLERTOUCHPADDOWN: return "ControllerTouchpadDown"; case SDL_CONTROLLERTOUCHPADMOTION: return "ControllerTouchpadMotion"; case SDL_CONTROLLERTOUCHPADUP: return "ControllerTouchpadUp"; case SDL_CONTROLLERSENSORUPDATE: return "ControllerSensorUpdate"; #endif /*SDL_VERSION_ATLEAST(2, 0, 14)*/ case SDL_AUDIODEVICEADDED: return "AudioDeviceAdded"; case SDL_AUDIODEVICEREMOVED: return "AudioDeviceRemoved"; case SDL_RENDER_TARGETS_RESET: return "RenderTargetsReset"; case SDL_RENDER_DEVICE_RESET: return "RenderDeviceReset"; case PGE_WINDOWSHOWN: return "WindowShown"; case PGE_WINDOWHIDDEN: return "WindowHidden"; case PGE_WINDOWEXPOSED: return "WindowExposed"; case PGE_WINDOWMOVED: return "WindowMoved"; case PGE_WINDOWRESIZED: return "WindowResized"; case PGE_WINDOWSIZECHANGED: return "WindowSizeChanged"; case PGE_WINDOWMINIMIZED: return "WindowMinimized"; case PGE_WINDOWMAXIMIZED: return "WindowMaximized"; case PGE_WINDOWRESTORED: return "WindowRestored"; case PGE_WINDOWENTER: return "WindowEnter"; case PGE_WINDOWLEAVE: return "WindowLeave"; case PGE_WINDOWFOCUSGAINED: return "WindowFocusGained"; case PGE_WINDOWFOCUSLOST: return "WindowFocusLost"; case PGE_WINDOWCLOSE: return "WindowClose"; case PGE_WINDOWTAKEFOCUS: return "WindowTakeFocus"; case PGE_WINDOWHITTEST: return "WindowHitTest"; case PGE_WINDOWICCPROFCHANGED: return "WindowICCProfChanged"; case PGE_WINDOWDISPLAYCHANGED: return "WindowDisplayChanged"; } if (type >= PGE_USEREVENT && type < PG_NUMEVENTS) return "UserEvent"; return "Unknown"; } /* Helper for adding objects to dictionaries. Check for errors with PyErr_Occurred() */ static void _pg_insobj(PyObject *dict, char *name, PyObject *v) { if (v) { PyDict_SetItemString(dict, name, v); Py_DECREF(v); } } static PyObject * get_joy_guid(int device_index) { char strguid[33]; SDL_JoystickGUID guid = SDL_JoystickGetDeviceGUID(device_index); SDL_JoystickGetGUIDString(guid, strguid, 33); return PyUnicode_FromString(strguid); } /** Try to insert the instance ID for a new device into the joystick mapping. */ void _joy_map_add(int device_index) { int instance_id = (int)SDL_JoystickGetDeviceInstanceID(device_index); PyObject *k, *v; if (instance_id != -1) { k = PyLong_FromLong(instance_id); v = PyLong_FromLong(device_index); if (k != NULL && v != NULL) { PyDict_SetItem(joy_instance_map, k, v); } Py_XDECREF(k); Py_XDECREF(v); } } /** Look up a device ID for an instance ID. */ PyObject * _joy_map_instance(int instance_id) { PyObject *v, *k = PyLong_FromLong(instance_id); if (!k) { Py_RETURN_NONE; } v = PyDict_GetItem(joy_instance_map, k); if (v) { Py_DECREF(k); Py_INCREF(v); return v; } return k; } /** Discard a joystick from the joystick instance -> device mapping. */ void _joy_map_discard(int instance_id) { PyObject *k = PyLong_FromLong(instance_id); if (k) { PyDict_DelItem(joy_instance_map, k); Py_DECREF(k); } } static PyObject * dict_from_event(SDL_Event *event) { PyObject *dict = NULL, *tuple, *obj; int hx, hy; long gain; long state; /* check if a proxy event or userevent was posted */ if (event->type >= PGPOST_EVENTBEGIN && event->user.code == USEROBJ_CHECK) return (PyObject *)event->user.data1; dict = PyDict_New(); if (!dict) return NULL; switch (event->type) { case SDL_VIDEORESIZE: obj = Py_BuildValue("(ii)", event->window.data1, event->window.data2); _pg_insobj(dict, "size", obj); _pg_insobj(dict, "w", PyLong_FromLong(event->window.data1)); _pg_insobj(dict, "h", PyLong_FromLong(event->window.data2)); break; case SDL_ACTIVEEVENT: switch (event->window.event) { case SDL_WINDOWEVENT_ENTER: gain = 1; state = SDL_APPMOUSEFOCUS; break; case SDL_WINDOWEVENT_LEAVE: gain = 0; state = SDL_APPMOUSEFOCUS; break; case SDL_WINDOWEVENT_FOCUS_GAINED: gain = 1; state = SDL_APPINPUTFOCUS; break; case SDL_WINDOWEVENT_FOCUS_LOST: gain = 0; state = SDL_APPINPUTFOCUS; break; case SDL_WINDOWEVENT_MINIMIZED: gain = 0; state = SDL_APPACTIVE; break; default: assert(event->window.event == SDL_WINDOWEVENT_RESTORED); gain = 1; state = SDL_APPACTIVE; } _pg_insobj(dict, "gain", PyLong_FromLong(gain)); _pg_insobj(dict, "state", PyLong_FromLong(state)); break; case SDL_KEYDOWN: case SDL_KEYUP: PG_LOCK_EVFILTER_MUTEX /* this accesses state also accessed the event filter, so lock */ _pg_insobj(dict, "unicode", _pg_get_event_unicode(event)); PG_UNLOCK_EVFILTER_MUTEX _pg_insobj(dict, "key", PyLong_FromLong(event->key.keysym.sym)); _pg_insobj(dict, "mod", PyLong_FromLong(event->key.keysym.mod)); _pg_insobj(dict, "scancode", PyLong_FromLong(event->key.keysym.scancode)); break; case SDL_MOUSEMOTION: obj = Py_BuildValue("(ii)", event->motion.x, event->motion.y); _pg_insobj(dict, "pos", obj); obj = Py_BuildValue("(ii)", event->motion.xrel, event->motion.yrel); _pg_insobj(dict, "rel", obj); if ((tuple = PyTuple_New(3))) { PyTuple_SET_ITEM(tuple, 0, PyLong_FromLong((event->motion.state & SDL_BUTTON(1)) != 0)); PyTuple_SET_ITEM(tuple, 1, PyLong_FromLong((event->motion.state & SDL_BUTTON(2)) != 0)); PyTuple_SET_ITEM(tuple, 2, PyLong_FromLong((event->motion.state & SDL_BUTTON(3)) != 0)); _pg_insobj(dict, "buttons", tuple); } _pg_insobj( dict, "touch", PyBool_FromLong((event->motion.which == SDL_TOUCH_MOUSEID))); break; case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: obj = Py_BuildValue("(ii)", event->button.x, event->button.y); _pg_insobj(dict, "pos", obj); _pg_insobj(dict, "button", PyLong_FromLong(event->button.button)); _pg_insobj( dict, "touch", PyBool_FromLong((event->button.which == SDL_TOUCH_MOUSEID))); break; case SDL_JOYAXISMOTION: _pg_insobj(dict, "joy", _joy_map_instance(event->jaxis.which)); _pg_insobj(dict, "instance_id", PyLong_FromLong(event->jaxis.which)); _pg_insobj(dict, "axis", PyLong_FromLong(event->jaxis.axis)); _pg_insobj(dict, "value", PyFloat_FromDouble(event->jaxis.value / 32767.0)); break; case SDL_JOYBALLMOTION: _pg_insobj(dict, "joy", _joy_map_instance(event->jaxis.which)); _pg_insobj(dict, "instance_id", PyLong_FromLong(event->jball.which)); _pg_insobj(dict, "ball", PyLong_FromLong(event->jball.ball)); obj = Py_BuildValue("(ii)", event->jball.xrel, event->jball.yrel); _pg_insobj(dict, "rel", obj); break; case SDL_JOYHATMOTION: _pg_insobj(dict, "joy", _joy_map_instance(event->jaxis.which)); _pg_insobj(dict, "instance_id", PyLong_FromLong(event->jhat.which)); _pg_insobj(dict, "hat", PyLong_FromLong(event->jhat.hat)); hx = hy = 0; if (event->jhat.value & SDL_HAT_UP) hy = 1; else if (event->jhat.value & SDL_HAT_DOWN) hy = -1; if (event->jhat.value & SDL_HAT_RIGHT) hx = 1; else if (event->jhat.value & SDL_HAT_LEFT) hx = -1; _pg_insobj(dict, "value", Py_BuildValue("(ii)", hx, hy)); break; case SDL_JOYBUTTONUP: case SDL_JOYBUTTONDOWN: _pg_insobj(dict, "joy", _joy_map_instance(event->jaxis.which)); _pg_insobj(dict, "instance_id", PyLong_FromLong(event->jbutton.which)); _pg_insobj(dict, "button", PyLong_FromLong(event->jbutton.button)); break; case PGE_WINDOWDISPLAYCHANGED: _pg_insobj(dict, "display_index", PyLong_FromLong(event->window.data1)); case PGE_WINDOWMOVED: case PGE_WINDOWRESIZED: case PGE_WINDOWSIZECHANGED: /*other PGE_WINDOW* events do not have attributes */ _pg_insobj(dict, "x", PyLong_FromLong(event->window.data1)); _pg_insobj(dict, "y", PyLong_FromLong(event->window.data2)); break; case SDL_AUDIODEVICEADDED: case SDL_AUDIODEVICEREMOVED: _pg_insobj( dict, "which", PyLong_FromLong( event->adevice .which)); // The audio device index for the ADDED // event (valid until next // SDL_GetNumAudioDevices() call), // SDL_AudioDeviceID for the REMOVED event _pg_insobj(dict, "iscapture", PyLong_FromLong(event->adevice.iscapture)); break; case SDL_FINGERMOTION: case SDL_FINGERDOWN: case SDL_FINGERUP: /* https://wiki.libsdl.org/SDL_TouchFingerEvent */ _pg_insobj(dict, "touch_id", PyLong_FromLongLong(event->tfinger.touchId)); _pg_insobj(dict, "finger_id", PyLong_FromLongLong(event->tfinger.fingerId)); _pg_insobj(dict, "x", PyFloat_FromDouble(event->tfinger.x)); _pg_insobj(dict, "y", PyFloat_FromDouble(event->tfinger.y)); _pg_insobj(dict, "dx", PyFloat_FromDouble(event->tfinger.dx)); _pg_insobj(dict, "dy", PyFloat_FromDouble(event->tfinger.dy)); _pg_insobj(dict, "pressure", PyFloat_FromDouble(event->tfinger.dy)); break; case SDL_MULTIGESTURE: /* https://wiki.libsdl.org/SDL_MultiGestureEvent */ _pg_insobj(dict, "touch_id", PyLong_FromLongLong(event->mgesture.touchId)); _pg_insobj(dict, "x", PyFloat_FromDouble(event->mgesture.x)); _pg_insobj(dict, "y", PyFloat_FromDouble(event->mgesture.y)); _pg_insobj(dict, "rotated", PyFloat_FromDouble(event->mgesture.dTheta)); _pg_insobj(dict, "pinched", PyFloat_FromDouble(event->mgesture.dDist)); _pg_insobj(dict, "num_fingers", PyLong_FromLong(event->mgesture.numFingers)); break; case SDL_MOUSEWHEEL: /* https://wiki.libsdl.org/SDL_MouseWheelEvent */ #ifndef NO_SDL_MOUSEWHEEL_FLIPPED _pg_insobj(dict, "flipped", PyBool_FromLong(event->wheel.direction == SDL_MOUSEWHEEL_FLIPPED)); #else _pg_insobj(dict, "flipped", PyBool_FromLong(0)); #endif _pg_insobj(dict, "x", PyLong_FromLong(event->wheel.x)); _pg_insobj(dict, "y", PyLong_FromLong(event->wheel.y)); #if SDL_VERSION_ATLEAST(2, 0, 18) _pg_insobj(dict, "precise_x", PyFloat_FromDouble((double)event->wheel.preciseX)); _pg_insobj(dict, "precise_y", PyFloat_FromDouble((double)event->wheel.preciseY)); #else /* ~SDL_VERSION_ATLEAST(2, 0, 18) */ /* fallback to regular x and y when SDL version used does not * support precise fields */ _pg_insobj(dict, "precise_x", PyFloat_FromDouble((double)event->wheel.x)); _pg_insobj(dict, "precise_y", PyFloat_FromDouble((double)event->wheel.y)); #endif /* ~SDL_VERSION_ATLEAST(2, 0, 18) */ _pg_insobj( dict, "touch", PyBool_FromLong((event->wheel.which == SDL_TOUCH_MOUSEID))); break; case SDL_TEXTINPUT: /* https://wiki.libsdl.org/SDL_TextInputEvent */ _pg_insobj(dict, "text", PyUnicode_FromString(event->text.text)); break; case SDL_TEXTEDITING: /* https://wiki.libsdl.org/SDL_TextEditingEvent */ _pg_insobj(dict, "text", PyUnicode_FromString(event->edit.text)); _pg_insobj(dict, "start", PyLong_FromLong(event->edit.start)); _pg_insobj(dict, "length", PyLong_FromLong(event->edit.length)); break; /* https://wiki.libsdl.org/SDL_DropEvent */ case SDL_DROPFILE: _pg_insobj(dict, "file", PyUnicode_FromString(event->drop.file)); SDL_free(event->drop.file); break; case SDL_DROPTEXT: _pg_insobj(dict, "text", PyUnicode_FromString(event->drop.file)); SDL_free(event->drop.file); break; case SDL_DROPBEGIN: case SDL_DROPCOMPLETE: break; case SDL_CONTROLLERAXISMOTION: /* https://wiki.libsdl.org/SDL_ControllerAxisEvent */ _pg_insobj(dict, "instance_id", PyLong_FromLong(event->caxis.which)); _pg_insobj(dict, "axis", PyLong_FromLong(event->caxis.axis)); _pg_insobj(dict, "value", PyLong_FromLong(event->caxis.value)); break; case SDL_CONTROLLERBUTTONDOWN: case SDL_CONTROLLERBUTTONUP: /* https://wiki.libsdl.org/SDL_ControllerButtonEvent */ _pg_insobj(dict, "instance_id", PyLong_FromLong(event->cbutton.which)); _pg_insobj(dict, "button", PyLong_FromLong(event->cbutton.button)); break; case SDL_CONTROLLERDEVICEADDED: _pg_insobj(dict, "device_index", PyLong_FromLong(event->cdevice.which)); _pg_insobj(dict, "guid", get_joy_guid(event->jdevice.which)); break; case SDL_JOYDEVICEADDED: _joy_map_add(event->jdevice.which); _pg_insobj(dict, "device_index", PyLong_FromLong(event->jdevice.which)); _pg_insobj(dict, "guid", get_joy_guid(event->jdevice.which)); break; case SDL_CONTROLLERDEVICEREMOVED: case SDL_CONTROLLERDEVICEREMAPPED: /* https://wiki.libsdl.org/SDL_ControllerDeviceEvent */ _pg_insobj(dict, "instance_id", PyLong_FromLong(event->cdevice.which)); break; case SDL_JOYDEVICEREMOVED: _joy_map_discard(event->jdevice.which); _pg_insobj(dict, "instance_id", PyLong_FromLong(event->jdevice.which)); break; #if SDL_VERSION_ATLEAST(2, 0, 14) case SDL_CONTROLLERTOUCHPADDOWN: case SDL_CONTROLLERTOUCHPADMOTION: case SDL_CONTROLLERTOUCHPADUP: _pg_insobj(dict, "instance_id", PyLong_FromLong(event->ctouchpad.which)); _pg_insobj(dict, "touch_id", PyLong_FromLongLong(event->ctouchpad.touchpad)); _pg_insobj(dict, "finger_id", PyLong_FromLongLong(event->ctouchpad.finger)); _pg_insobj(dict, "x", PyFloat_FromDouble(event->ctouchpad.x)); _pg_insobj(dict, "y", PyFloat_FromDouble(event->ctouchpad.y)); _pg_insobj(dict, "pressure", PyFloat_FromDouble(event->ctouchpad.pressure)); break; #endif /*SDL_VERSION_ATLEAST(2, 0, 14)*/ #ifdef WIN32 case SDL_SYSWMEVENT: _pg_insobj(dict, "hwnd", PyLong_FromLongLong( (long long)(event->syswm.msg->msg.win.hwnd))); _pg_insobj(dict, "msg", PyLong_FromLong(event->syswm.msg->msg.win.msg)); _pg_insobj(dict, "wparam", PyLong_FromLongLong(event->syswm.msg->msg.win.wParam)); _pg_insobj(dict, "lparam", PyLong_FromLongLong(event->syswm.msg->msg.win.lParam)); break; #endif /* WIN32 */ #if (defined(unix) || defined(__unix__) || defined(_AIX) || \ defined(__OpenBSD__)) && \ (defined(SDL_VIDEO_DRIVER_X11) && !defined(__CYGWIN32__) && \ !defined(ENABLE_NANOX) && !defined(__QNXNTO__)) case SDL_SYSWMEVENT: if (event->syswm.msg->subsystem == SDL_SYSWM_X11) { XEvent *xevent = (XEvent *)&event->syswm.msg->msg.x11.event; obj = PyBytes_FromStringAndSize((char *)xevent, sizeof(XEvent)); _pg_insobj(dict, "event", obj); } break; #endif /* (defined(unix) || ... */ } /* switch (event->type) */ /* Events that dont have any attributes are not handled in switch * statement */ SDL_Window *window; switch (event->type) { case PGE_WINDOWSHOWN: case PGE_WINDOWHIDDEN: case PGE_WINDOWEXPOSED: case PGE_WINDOWMOVED: case PGE_WINDOWRESIZED: case PGE_WINDOWSIZECHANGED: case PGE_WINDOWMINIMIZED: case PGE_WINDOWMAXIMIZED: case PGE_WINDOWRESTORED: case PGE_WINDOWENTER: case PGE_WINDOWLEAVE: case PGE_WINDOWFOCUSGAINED: case PGE_WINDOWFOCUSLOST: case PGE_WINDOWCLOSE: case PGE_WINDOWTAKEFOCUS: case PGE_WINDOWHITTEST: case PGE_WINDOWICCPROFCHANGED: case PGE_WINDOWDISPLAYCHANGED: { window = SDL_GetWindowFromID(event->window.windowID); break; } case SDL_TEXTEDITING: { window = SDL_GetWindowFromID(event->edit.windowID); break; } case SDL_TEXTINPUT: { window = SDL_GetWindowFromID(event->text.windowID); break; } case SDL_DROPBEGIN: case SDL_DROPCOMPLETE: case SDL_DROPTEXT: case SDL_DROPFILE: { window = SDL_GetWindowFromID(event->drop.windowID); break; } case SDL_KEYDOWN: case SDL_KEYUP: { window = SDL_GetWindowFromID(event->key.windowID); break; } case SDL_MOUSEWHEEL: { window = SDL_GetWindowFromID(event->wheel.windowID); break; } case SDL_MOUSEMOTION: { window = SDL_GetWindowFromID(event->motion.windowID); break; } case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: { window = SDL_GetWindowFromID(event->button.windowID); break; } #if SDL_VERSION_ATLEAST(2, 0, 14) case SDL_FINGERMOTION: case SDL_FINGERDOWN: case SDL_FINGERUP: { window = SDL_GetWindowFromID(event->tfinger.windowID); break; } #endif default: { return dict; } } PyObject *pgWindow; if (!window || !(pgWindow = SDL_GetWindowData(window, "pg_window"))) { pgWindow = Py_None; } Py_INCREF(pgWindow); _pg_insobj(dict, "window", pgWindow); return dict; } /* event object internals */ static void pg_event_dealloc(PyObject *self) { pgEventObject *e = (pgEventObject *)self; Py_XDECREF(e->dict); PyObject_Free(self); } #ifdef PYPY_VERSION /* Because pypy does not work with the __dict__ tp_dictoffset. */ PyObject * pg_EventGetAttr(PyObject *o, PyObject *attr_name) { /* Try e->dict first, if not try the generic attribute. */ PyObject *result = PyDict_GetItem(((pgEventObject *)o)->dict, attr_name); if (!result) { return PyObject_GenericGetAttr(o, attr_name); } return result; } int pg_EventSetAttr(PyObject *o, PyObject *name, PyObject *value) { /* if the variable is in the dict, deal with it there. else if it's a normal attribute set it there. else if it's not an attribute, or in the dict, set it in the dict. */ int dictResult; int setInDict = 0; PyObject *result = PyDict_GetItem(((pgEventObject *)o)->dict, name); if (result) { setInDict = 1; } else { result = PyObject_GenericGetAttr(o, name); if (!result) { setInDict = 1; } } if (setInDict) { dictResult = PyDict_SetItem(((pgEventObject *)o)->dict, name, value); if (dictResult) { return -1; } return 0; } else { return PyObject_GenericSetAttr(o, name, value); } } #endif PyObject * pg_event_str(PyObject *self) { pgEventObject *e = (pgEventObject *)self; return PyUnicode_FromFormat("", e->type, _pg_name_from_eventtype(e->type), e->dict); } static int _pg_event_nonzero(pgEventObject *self) { return self->type != SDL_NOEVENT; } static PyNumberMethods pg_event_as_number = { .nb_bool = (inquiry)_pg_event_nonzero, }; static PyTypeObject pgEvent_Type; #define pgEvent_Check(x) ((x)->ob_type == &pgEvent_Type) #define OFF(x) offsetof(pgEventObject, x) static PyMemberDef pg_event_members[] = { {"__dict__", T_OBJECT, OFF(dict), READONLY}, {"type", T_INT, OFF(type), READONLY}, {"dict", T_OBJECT, OFF(dict), READONLY}, {NULL} /* Sentinel */ }; /* * eventA == eventB * eventA != eventB */ static PyObject * pg_event_richcompare(PyObject *o1, PyObject *o2, int opid) { pgEventObject *e1, *e2; if (!pgEvent_Check(o1) || !pgEvent_Check(o2)) { goto Unimplemented; } e1 = (pgEventObject *)o1; e2 = (pgEventObject *)o2; switch (opid) { case Py_EQ: return PyBool_FromLong( e1->type == e2->type && PyObject_RichCompareBool(e1->dict, e2->dict, Py_EQ) == 1); case Py_NE: return PyBool_FromLong( e1->type != e2->type || PyObject_RichCompareBool(e1->dict, e2->dict, Py_NE) == 1); default: break; } Unimplemented: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } static int _pg_event_populate(pgEventObject *event, int type, PyObject *dict) { event->type = _pg_pgevent_deproxify(type); if (!dict) { dict = PyDict_New(); if (!dict) { PyErr_NoMemory(); return -1; } } else { if (PyDict_GetItemString(dict, "type")) { PyErr_SetString(PyExc_ValueError, "redundant type field in event dict"); return -1; } Py_INCREF(dict); } event->dict = dict; return 0; } static int pg_event_init(pgEventObject *self, PyObject *args, PyObject *kwargs) { int type; PyObject *dict = NULL; if (!PyArg_ParseTuple(args, "i|O!", &type, &PyDict_Type, &dict)) { return -1; } if (!dict) { dict = PyDict_New(); if (!dict) { PyErr_NoMemory(); return -1; } } else { Py_INCREF(dict); } if (kwargs) { PyObject *key, *value; Py_ssize_t pos = 0; while (PyDict_Next(kwargs, &pos, &key, &value)) { if (PyDict_SetItem(dict, key, value) < 0) { Py_DECREF(dict); return -1; } } } if (_pg_event_populate(self, type, dict) == -1) { return -1; } Py_DECREF(dict); return 0; } static PyTypeObject pgEvent_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.event.Event", .tp_basicsize = sizeof(pgEventObject), .tp_dealloc = pg_event_dealloc, .tp_repr = pg_event_str, .tp_as_number = &pg_event_as_number, #ifdef PYPY_VERSION .tp_getattro = pg_EventGetAttr, .tp_setattro = pg_EventSetAttr, #else .tp_getattro = PyObject_GenericGetAttr, .tp_setattro = PyObject_GenericSetAttr, #endif .tp_doc = DOC_PYGAMEEVENTEVENT, .tp_richcompare = pg_event_richcompare, .tp_members = pg_event_members, .tp_dictoffset = offsetof(pgEventObject, dict), .tp_init = (initproc)pg_event_init, .tp_new = PyType_GenericNew, }; static PyObject * pgEvent_New(SDL_Event *event) { pgEventObject *e; e = PyObject_New(pgEventObject, &pgEvent_Type); if (!e) return PyErr_NoMemory(); if (event) { e->type = _pg_pgevent_deproxify(event->type); e->dict = dict_from_event(event); } else { e->type = SDL_NOEVENT; e->dict = PyDict_New(); } if (!e->dict) { PyObject_Free(e); return PyErr_NoMemory(); } return (PyObject *)e; } static PyObject * pgEvent_New2(int type, PyObject *dict) { pgEventObject *e; e = PyObject_New(pgEventObject, &pgEvent_Type); if (!e) return PyErr_NoMemory(); if (_pg_event_populate(e, type, dict) == -1) { PyObject_Free(e); return NULL; } return (PyObject *)e; } /* event module functions */ static PyObject * event_name(PyObject *self, PyObject *args, PyObject *kwargs) { int type; static char *keywords[] = { "type", NULL, }; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", keywords, &type)) return NULL; return PyUnicode_FromString(_pg_name_from_eventtype(type)); } static PyObject * set_grab(PyObject *self, PyObject *arg) { int doit = PyObject_IsTrue(arg); if (doit == -1) return NULL; VIDEO_INIT_CHECK(); SDL_Window *win = pg_GetDefaultWindow(); if (win) { if (doit) { SDL_SetWindowGrab(win, SDL_TRUE); if (SDL_ShowCursor(SDL_QUERY) == SDL_DISABLE) SDL_SetRelativeMouseMode(1); else SDL_SetRelativeMouseMode(0); } else { SDL_SetWindowGrab(win, SDL_FALSE); SDL_SetRelativeMouseMode(0); } } Py_RETURN_NONE; } static PyObject * get_grab(PyObject *self, PyObject *_null) { SDL_Window *win; SDL_bool mode = SDL_FALSE; VIDEO_INIT_CHECK(); win = pg_GetDefaultWindow(); if (win) mode = SDL_GetWindowGrab(win); return PyBool_FromLong(mode); } static PyObject * set_keyboard_grab(PyObject *self, PyObject *arg) { #if SDL_VERSION_ATLEAST(2, 0, 16) VIDEO_INIT_CHECK(); int doit = PyObject_IsTrue(arg); if (doit == -1) return NULL; SDL_Window *win = pg_GetDefaultWindow(); if (win) { if (doit) { SDL_SetWindowKeyboardGrab(win, SDL_TRUE); } else { SDL_SetWindowKeyboardGrab(win, SDL_FALSE); } } #endif Py_RETURN_NONE; } static PyObject * get_keyboard_grab(PyObject *self, PyObject *_null) { #if SDL_VERSION_ATLEAST(2, 0, 16) SDL_Window *win; SDL_bool mode = SDL_FALSE; VIDEO_INIT_CHECK(); win = pg_GetDefaultWindow(); if (win) mode = SDL_GetWindowKeyboardGrab(win); return PyBool_FromLong(mode); #else Py_RETURN_NONE; #endif } static void _pg_event_pump(int dopump) { if (dopump) { SDL_PumpEvents(); } /* We need to translate WINDOWEVENTS. But if we do that from the * from event filter, internal SDL stuff that rely on WINDOWEVENT * might break. So after every event pump, we translate events from * here */ SDL_FilterEvents(_pg_translate_windowevent, NULL); } static int _pg_event_wait(SDL_Event *event, int timeout) { /* Custom re-implementation of SDL_WaitEventTimeout, doing this has * many advantages. This is copied from SDL source code, with a few * minor modifications */ Uint32 finish = 0; if (timeout > 0) finish = SDL_GetTicks() + timeout; while (1) { _pg_event_pump(1); /* Use our custom pump here */ switch (PG_PEEP_EVENT_ALL(event, 1, SDL_GETEVENT)) { case -1: return 0; /* Because this never happens, SDL does it too*/ case 1: return 1; default: if (timeout >= 0 && SDL_GetTicks() >= finish) { /* no events */ return 0; } SDL_Delay(1); } } } static PyObject * pg_event_pump(PyObject *self, PyObject *_null) { VIDEO_INIT_CHECK(); _pg_event_pump(1); Py_RETURN_NONE; } static PyObject * pg_event_poll(PyObject *self, PyObject *_null) { SDL_Event event; VIDEO_INIT_CHECK(); /* polling is just waiting for 0 timeout */ if (!_pg_event_wait(&event, 0)) return pgEvent_New(NULL); return pgEvent_New(&event); } static PyObject * pg_event_wait(PyObject *self, PyObject *args, PyObject *kwargs) { SDL_Event event; int status, timeout = 0; static char *kwids[] = {"timeout", NULL}; VIDEO_INIT_CHECK(); if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwids, &timeout)) { return NULL; } if (!timeout) timeout = -1; Py_BEGIN_ALLOW_THREADS; status = _pg_event_wait(&event, timeout); Py_END_ALLOW_THREADS; if (!status) return pgEvent_New(NULL); return pgEvent_New(&event); } static int _pg_eventtype_from_seq(PyObject *seq, int ind) { int val = 0; if (!pg_IntFromObjIndex(seq, ind, &val)) { PyErr_SetString(PyExc_TypeError, "type sequence must contain valid event types"); return -1; } if (val < 0 || val >= PG_NUMEVENTS) { PyErr_SetString(PyExc_ValueError, "event type out of range"); return -1; } return val; } static PyObject * _pg_eventtype_as_seq(PyObject *obj, Py_ssize_t *len) { *len = 1; if (PySequence_Check(obj)) { *len = PySequence_Size(obj); /* The returned object gets decref'd later, so incref now */ Py_INCREF(obj); return obj; } else if (PyLong_Check(obj)) return Py_BuildValue("(O)", obj); else return RAISE(PyExc_TypeError, "event type must be numeric or a sequence"); } static void _pg_flush_events(Uint32 type) { if (type == MAX_UINT32) SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT); else { SDL_FlushEvent(type); SDL_FlushEvent(_pg_pgevent_proxify(type)); } } static PyObject * pg_event_clear(PyObject *self, PyObject *args, PyObject *kwargs) { Py_ssize_t len; int loop, type; PyObject *seq, *obj = NULL; int dopump = 1; static char *kwids[] = {"eventtype", "pump", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Op", kwids, &obj, &dopump)) return NULL; VIDEO_INIT_CHECK(); _pg_event_pump(dopump); if (obj == NULL || obj == Py_None) { _pg_flush_events(MAX_UINT32); } else { seq = _pg_eventtype_as_seq(obj, &len); if (!seq) /* error aldready set */ return NULL; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) { Py_DECREF(seq); return NULL; /* PyErr aldready set */ } _pg_flush_events(type); } Py_DECREF(seq); } Py_RETURN_NONE; } static int _pg_event_append_to_list(PyObject *list, SDL_Event *event) { /* The caller of this function must handle decref of list on error */ PyObject *e = pgEvent_New(event); if (!e) /* Exception already set. */ return 0; if (PyList_Append(list, e)) { Py_DECREF(e); return 0; /* Exception already set. */ } Py_DECREF(e); return 1; } static PyObject * _pg_get_all_events_except(PyObject *obj) { SDL_Event event; Py_ssize_t len; int loop, type, ret; PyObject *seq, *list; SDL_Event *filtered_events; int filtered_index = 0; int filtered_events_len = 16; SDL_Event eventbuf[PG_GET_LIST_LEN]; filtered_events = malloc(sizeof(SDL_Event) * filtered_events_len); if (!filtered_events) return PyErr_NoMemory(); list = PyList_New(0); if (!list) { free(filtered_events); return PyErr_NoMemory(); } seq = _pg_eventtype_as_seq(obj, &len); if (!seq) goto error; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) goto error; do { ret = PG_PEEP_EVENT(&event, 1, SDL_GETEVENT, type); if (ret < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } else if (ret > 0) { if (filtered_index == filtered_events_len) { SDL_Event *new_filtered_events = malloc(sizeof(SDL_Event) * filtered_events_len * 4); if (new_filtered_events == NULL) { goto error; } memcpy(new_filtered_events, filtered_events, sizeof(SDL_Event) * filtered_events_len); filtered_events_len *= 4; free(filtered_events); filtered_events = new_filtered_events; } filtered_events[filtered_index] = event; filtered_index++; } } while (ret); do { ret = PG_PEEP_EVENT(&event, 1, SDL_GETEVENT, _pg_pgevent_proxify(type)); if (ret < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } else if (ret > 0) { if (filtered_index == filtered_events_len) { SDL_Event *new_filtered_events = malloc(sizeof(SDL_Event) * filtered_events_len * 4); if (new_filtered_events == NULL) { free(filtered_events); goto error; } memcpy(new_filtered_events, filtered_events, sizeof(SDL_Event) * filtered_events_len); filtered_events_len *= 4; free(filtered_events); filtered_events = new_filtered_events; } filtered_events[filtered_index] = event; filtered_index++; } } while (ret); } do { len = PG_PEEP_EVENT_ALL(eventbuf, PG_GET_LIST_LEN, SDL_GETEVENT); if (len == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } for (loop = 0; loop < len; loop++) { if (!_pg_event_append_to_list(list, &eventbuf[loop])) goto error; } } while (len == PG_GET_LIST_LEN); PG_PEEP_EVENT_ALL(filtered_events, filtered_index, SDL_ADDEVENT); free(filtered_events); Py_DECREF(seq); return list; error: /* While doing a goto here, PyErr must be set */ free(filtered_events); Py_DECREF(list); Py_XDECREF(seq); return NULL; } static PyObject * _pg_get_all_events(void) { SDL_Event eventbuf[PG_GET_LIST_LEN]; PyObject *list; int loop, len = PG_GET_LIST_LEN; list = PyList_New(0); if (!list) return PyErr_NoMemory(); while (len == PG_GET_LIST_LEN) { len = PG_PEEP_EVENT_ALL(eventbuf, PG_GET_LIST_LEN, SDL_GETEVENT); if (len == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } for (loop = 0; loop < len; loop++) { if (!_pg_event_append_to_list(list, &eventbuf[loop])) goto error; } } return list; error: Py_DECREF(list); return NULL; } static PyObject * _pg_get_seq_events(PyObject *obj) { Py_ssize_t len; SDL_Event event; int loop, type, ret; PyObject *seq, *list; list = PyList_New(0); if (!list) return PyErr_NoMemory(); seq = _pg_eventtype_as_seq(obj, &len); if (!seq) goto error; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) goto error; do { ret = PG_PEEP_EVENT(&event, 1, SDL_GETEVENT, type); if (ret < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } else if (ret > 0) { if (!_pg_event_append_to_list(list, &event)) goto error; } } while (ret); do { ret = PG_PEEP_EVENT(&event, 1, SDL_GETEVENT, _pg_pgevent_proxify(type)); if (ret < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); goto error; } else if (ret > 0) { if (!_pg_event_append_to_list(list, &event)) goto error; } } while (ret); } Py_DECREF(seq); return list; error: /* While doing a goto here, PyErr must be set */ Py_DECREF(list); Py_XDECREF(seq); return NULL; } static PyObject * pg_event_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *obj_evtype = NULL; PyObject *obj_exclude = NULL; int dopump = 1; static char *kwids[] = {"eventtype", "pump", "exclude", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OpO", kwids, &obj_evtype, &dopump, &obj_exclude)) return NULL; VIDEO_INIT_CHECK(); _pg_event_pump(dopump); if (obj_evtype == NULL || obj_evtype == Py_None) { if (obj_exclude != NULL && obj_exclude != Py_None) { return _pg_get_all_events_except(obj_exclude); } return _pg_get_all_events(); } else { if (obj_exclude != NULL && obj_exclude != Py_None) { return RAISE( pgExc_SDLError, "Invalid combination of excluded and included event type"); } return _pg_get_seq_events(obj_evtype); } } static PyObject * pg_event_peek(PyObject *self, PyObject *args, PyObject *kwargs) { SDL_Event event; Py_ssize_t len; int type, loop, res; PyObject *seq, *obj = NULL; int dopump = 1; static char *kwids[] = {"eventtype", "pump", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Op", kwids, &obj, &dopump)) return NULL; VIDEO_INIT_CHECK(); _pg_event_pump(dopump); if (obj == NULL || obj == Py_None) { res = PG_PEEP_EVENT_ALL(&event, 1, SDL_PEEKEVENT); if (res < 0) return RAISE(pgExc_SDLError, SDL_GetError()); return pgEvent_New(res ? &event : NULL); } else { seq = _pg_eventtype_as_seq(obj, &len); if (!seq) return NULL; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) { Py_DECREF(seq); return NULL; } res = PG_PEEP_EVENT(&event, 1, SDL_PEEKEVENT, type); if (res) { Py_DECREF(seq); if (res < 0) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_TRUE; } res = PG_PEEP_EVENT(&event, 1, SDL_PEEKEVENT, _pg_pgevent_proxify(type)); if (res) { Py_DECREF(seq); if (res < 0) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_TRUE; } } Py_DECREF(seq); Py_RETURN_FALSE; /* No event type match. */ } } /* You might notice how we do event blocking stuff on proxy events and * not the real SDL events. We do this because we want SDL events to pass * through our event filter, to do emulation stuff correctly. Then the * event is filtered after that */ static PyObject * pg_event_post(PyObject *self, PyObject *obj) { SDL_Event event; pgEventObject *e; int ret; VIDEO_INIT_CHECK(); if (!pgEvent_Check(obj)) return RAISE(PyExc_TypeError, "argument must be an Event object"); e = (pgEventObject *)obj; if (SDL_EventState(_pg_pgevent_proxify(e->type), SDL_QUERY) == SDL_IGNORE) Py_RETURN_FALSE; pgEvent_FillUserEvent(e, &event); ret = SDL_PushEvent(&event); if (ret == 1) Py_RETURN_TRUE; else { Py_DECREF(e->dict); if (ret == 0) Py_RETURN_FALSE; else return RAISE(pgExc_SDLError, SDL_GetError()); } } static PyObject * pg_event_set_allowed(PyObject *self, PyObject *obj) { Py_ssize_t len; int loop, type; PyObject *seq; VIDEO_INIT_CHECK(); if (obj == Py_None) { int i; for (i = SDL_FIRSTEVENT; i < SDL_LASTEVENT; i++) { SDL_EventState(i, SDL_ENABLE); } } else { seq = _pg_eventtype_as_seq(obj, &len); if (!seq) return NULL; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) { Py_DECREF(seq); return NULL; } SDL_EventState(_pg_pgevent_proxify(type), SDL_ENABLE); } Py_DECREF(seq); } Py_RETURN_NONE; } static PyObject * pg_event_set_blocked(PyObject *self, PyObject *obj) { Py_ssize_t len; int loop, type; PyObject *seq; VIDEO_INIT_CHECK(); if (obj == Py_None) { int i; /* Start at PGPOST_EVENTBEGIN */ for (i = PGPOST_EVENTBEGIN; i < SDL_LASTEVENT; i++) { SDL_EventState(i, SDL_IGNORE); } } else { seq = _pg_eventtype_as_seq(obj, &len); if (!seq) return NULL; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) { Py_DECREF(seq); return NULL; } SDL_EventState(_pg_pgevent_proxify(type), SDL_IGNORE); } Py_DECREF(seq); } /* Never block SDL_WINDOWEVENT, we need them for translation */ SDL_EventState(SDL_WINDOWEVENT, SDL_ENABLE); /* Never block PGE_KEYREPEAT too, its needed for pygame internal use */ SDL_EventState(PGE_KEYREPEAT, SDL_ENABLE); Py_RETURN_NONE; } static PyObject * pg_event_get_blocked(PyObject *self, PyObject *obj) { Py_ssize_t len; int loop, type, isblocked = 0; PyObject *seq; VIDEO_INIT_CHECK(); seq = _pg_eventtype_as_seq(obj, &len); if (!seq) return NULL; for (loop = 0; loop < len; loop++) { type = _pg_eventtype_from_seq(seq, loop); if (type == -1) { Py_DECREF(seq); return NULL; } if (SDL_EventState(_pg_pgevent_proxify(type), SDL_QUERY) == SDL_IGNORE) { isblocked = 1; break; } } Py_DECREF(seq); return PyBool_FromLong(isblocked); } static PyObject * pg_event_custom_type(PyObject *self, PyObject *_null) { if (_custom_event < PG_NUMEVENTS) return PyLong_FromLong(_custom_event++); else return RAISE(pgExc_SDLError, "pygame.event.custom_type made too many event types."); } static PyMethodDef _event_methods[] = { {"_internal_mod_init", (PyCFunction)pgEvent_AutoInit, METH_NOARGS, "auto initialize for event module"}, {"_internal_mod_quit", (PyCFunction)pgEvent_AutoQuit, METH_NOARGS, "auto quit for event module"}, {"event_name", (PyCFunction)event_name, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEEVENTEVENTNAME}, {"set_grab", set_grab, METH_O, DOC_PYGAMEEVENTSETGRAB}, {"get_grab", (PyCFunction)get_grab, METH_NOARGS, DOC_PYGAMEEVENTGETGRAB}, {"set_keyboard_grab", set_keyboard_grab, METH_O, DOC_PYGAMEEVENTSETKEYBOARDGRAB}, {"get_keyboard_grab", (PyCFunction)get_keyboard_grab, METH_NOARGS, DOC_PYGAMEEVENTGETKEYBOARDGRAB}, {"pump", (PyCFunction)pg_event_pump, METH_NOARGS, DOC_PYGAMEEVENTPUMP}, {"wait", (PyCFunction)pg_event_wait, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEEVENTWAIT}, {"poll", (PyCFunction)pg_event_poll, METH_NOARGS, DOC_PYGAMEEVENTPOLL}, {"clear", (PyCFunction)pg_event_clear, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEEVENTCLEAR}, {"get", (PyCFunction)pg_event_get, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEEVENTGET}, {"peek", (PyCFunction)pg_event_peek, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEEVENTPEEK}, {"post", (PyCFunction)pg_event_post, METH_O, DOC_PYGAMEEVENTPOST}, {"set_allowed", (PyCFunction)pg_event_set_allowed, METH_O, DOC_PYGAMEEVENTSETALLOWED}, {"set_blocked", (PyCFunction)pg_event_set_blocked, METH_O, DOC_PYGAMEEVENTSETBLOCKED}, {"get_blocked", (PyCFunction)pg_event_get_blocked, METH_O, DOC_PYGAMEEVENTGETBLOCKED}, {"custom_type", (PyCFunction)pg_event_custom_type, METH_NOARGS, DOC_PYGAMEEVENTCUSTOMTYPE}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(event) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_EVENT_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "event", DOC_PYGAMEEVENT, -1, _event_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgEvent_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } joy_instance_map = PyDict_New(); /* need to keep a reference for use in the module */ Py_XINCREF(joy_instance_map); if (PyModule_AddObject(module, "_joy_instance_map", joy_instance_map)) { Py_XDECREF(joy_instance_map); Py_DECREF(module); return NULL; } Py_INCREF(&pgEvent_Type); if (PyModule_AddObject(module, "EventType", (PyObject *)&pgEvent_Type)) { Py_DECREF(&pgEvent_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgEvent_Type); if (PyModule_AddObject(module, "Event", (PyObject *)&pgEvent_Type)) { Py_DECREF(&pgEvent_Type); Py_DECREF(module); return NULL; } /* export the c api */ assert(PYGAMEAPI_EVENT_NUMSLOTS == 6); c_api[0] = &pgEvent_Type; c_api[1] = pgEvent_New; c_api[2] = pgEvent_New2; c_api[3] = pgEvent_FillUserEvent; c_api[4] = pg_EnableKeyRepeat; c_api[5] = pg_GetKeyRepeat; apiobj = encapsulate_api(c_api, "event"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } SDL_RegisterEvents(PG_NUMEVENTS - SDL_USEREVENT); return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/font.c0000644000175100001770000006413614676242340014634 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * font module for pygame */ #define PYGAMEAPI_FONT_INTERNAL #include "font.h" #include #include #include "pygame.h" #include "pgcompat.h" #include "doc/font_doc.h" #include "structmember.h" #ifndef SDL_TTF_VERSION_ATLEAST #define SDL_TTF_COMPILEDVERSION \ SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, \ SDL_TTF_PATCHLEVEL) #define SDL_TTF_VERSION_ATLEAST(X, Y, Z) \ (SDL_TTF_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) #endif #define RAISE_TEXT_TYPE_ERROR() \ RAISE(PyExc_TypeError, "text must be a unicode or bytes"); /* For filtering out UCS-4 and larger characters when Python is * built with Py_UNICODE_WIDE. */ #if defined(PYPY_VERSION) #define Py_UNICODE_IS_SURROGATE(ch) (0xD800 <= (ch) && (ch) <= 0xDFFF) #endif static PyTypeObject PyFont_Type; static PyObject * PyFont_New(TTF_Font *); #define PyFont_Check(x) ((x)->ob_type == &PyFont_Type) static unsigned int current_ttf_generation = 0; #if defined(BUILD_STATIC) // SDL_Init + TTF_Init() are made in main before CPython process the module // inittab so the emscripten handler knows it will use SDL2 next cycle. static int font_initialized = 1; #else static int font_initialized = 0; static const char pkgdatamodule_name[] = "pygame.pkgdata"; static const char resourcefunc_name[] = "getResource"; #endif static const char font_defaultname[] = "freesansbold.ttf"; static const int font_defaultsize = 12; /* */ #if !SDL_TTF_VERSION_ATLEAST(2, 0, 15) static int utf_8_needs_UCS_4(const char *str) { static const Uint8 first = '\xF0'; while (*str) { if ((Uint8)*str >= first) { return 1; } ++str; } return 0; } #endif /* Return an encoded file path, a file-like object or a NULL pointer. * May raise a Python error. Use PyErr_Occurred to check. */ static PyObject * font_resource(const char *filename) { PyObject *pkgdatamodule = NULL; PyObject *resourcefunc = NULL; PyObject *result = NULL; PyObject *tmp; pkgdatamodule = PyImport_ImportModule(pkgdatamodule_name); if (pkgdatamodule == NULL) { return NULL; } resourcefunc = PyObject_GetAttrString(pkgdatamodule, resourcefunc_name); Py_DECREF(pkgdatamodule); if (resourcefunc == NULL) { return NULL; } result = PyObject_CallFunction(resourcefunc, "s", filename); Py_DECREF(resourcefunc); if (result == NULL) { return NULL; } tmp = PyObject_GetAttrString(result, "name"); if (tmp != NULL) { PyObject *closeret; if (!(closeret = PyObject_CallMethod(result, "close", NULL))) { Py_DECREF(result); Py_DECREF(tmp); return NULL; } Py_DECREF(closeret); Py_DECREF(result); result = tmp; } else if (!PyErr_ExceptionMatches(PyExc_MemoryError)) { PyErr_Clear(); } tmp = pg_EncodeString(result, "UTF-8", NULL, NULL); if (tmp == NULL) { Py_DECREF(result); return NULL; } else if (tmp != Py_None) { Py_DECREF(result); result = tmp; } else { Py_DECREF(tmp); } return result; } static PyObject * fontmodule_init(PyObject *self, PyObject *_null) { if (!font_initialized) { if (TTF_Init()) return RAISE(pgExc_SDLError, SDL_GetError()); font_initialized = 1; } Py_RETURN_NONE; } static PyObject * fontmodule_quit(PyObject *self, PyObject *_null) { if (font_initialized) { TTF_Quit(); font_initialized = 0; current_ttf_generation++; } Py_RETURN_NONE; } static PyObject * pg_font_get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(font_initialized); } /* font object methods */ static PyObject * font_get_height(PyObject *self, PyObject *_null) { TTF_Font *font = PyFont_AsFont(self); return PyLong_FromLong(TTF_FontHeight(font)); } static PyObject * font_get_descent(PyObject *self, PyObject *_null) { TTF_Font *font = PyFont_AsFont(self); return PyLong_FromLong(TTF_FontDescent(font)); } static PyObject * font_get_ascent(PyObject *self, PyObject *_null) { TTF_Font *font = PyFont_AsFont(self); return PyLong_FromLong(TTF_FontAscent(font)); } static PyObject * font_get_linesize(PyObject *self, PyObject *_null) { TTF_Font *font = PyFont_AsFont(self); return PyLong_FromLong(TTF_FontLineSkip(font)); } static PyObject * _font_get_style_flag_as_py_bool(PyObject *self, int flag) { TTF_Font *font = PyFont_AsFont(self); return PyBool_FromLong((TTF_GetFontStyle(font) & flag) != 0); } static void _font_set_or_clear_style_flag(TTF_Font *font, int flag, int set_flag) { int style = TTF_GetFontStyle(font); if (set_flag) style |= flag; else style &= ~flag; TTF_SetFontStyle(font, style); } /* Implements getter for the bold attribute */ static PyObject * font_getter_bold(PyObject *self, void *closure) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_BOLD); } /* Implements setter for the bold attribute */ static int font_setter_bold(PyObject *self, PyObject *value, void *closure) { TTF_Font *font = PyFont_AsFont(self); int val; DEL_ATTR_NOT_SUPPORTED_CHECK("bold", value); val = PyObject_IsTrue(value); if (val == -1) { return -1; } _font_set_or_clear_style_flag(font, TTF_STYLE_BOLD, val); return 0; } /* Implements get_bold() */ static PyObject * font_get_bold(PyObject *self, PyObject *_null) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_BOLD); } /* Implements set_bold(bool) */ static PyObject * font_set_bold(PyObject *self, PyObject *arg) { TTF_Font *font = PyFont_AsFont(self); int val = PyObject_IsTrue(arg); if (val == -1) { return NULL; } _font_set_or_clear_style_flag(font, TTF_STYLE_BOLD, val); Py_RETURN_NONE; } /* Implements getter for the italic attribute */ static PyObject * font_getter_italic(PyObject *self, void *closure) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_ITALIC); } /* Implements setter for the italic attribute */ static int font_setter_italic(PyObject *self, PyObject *value, void *closure) { TTF_Font *font = PyFont_AsFont(self); int val; DEL_ATTR_NOT_SUPPORTED_CHECK("italic", value); val = PyObject_IsTrue(value); if (val == -1) { return -1; } _font_set_or_clear_style_flag(font, TTF_STYLE_ITALIC, val); return 0; } /* Implements get_italic() */ static PyObject * font_get_italic(PyObject *self, PyObject *_null) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_ITALIC); } /* Implements set_italic(bool) */ static PyObject * font_set_italic(PyObject *self, PyObject *arg) { TTF_Font *font = PyFont_AsFont(self); int val = PyObject_IsTrue(arg); if (val == -1) { return NULL; } _font_set_or_clear_style_flag(font, TTF_STYLE_ITALIC, val); Py_RETURN_NONE; } /* Implements getter for the underline attribute */ static PyObject * font_getter_underline(PyObject *self, void *closure) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_UNDERLINE); } /* Implements setter for the underline attribute */ static int font_setter_underline(PyObject *self, PyObject *value, void *closure) { TTF_Font *font = PyFont_AsFont(self); int val; DEL_ATTR_NOT_SUPPORTED_CHECK("underline", value); val = PyObject_IsTrue(value); if (val == -1) { return -1; } _font_set_or_clear_style_flag(font, TTF_STYLE_UNDERLINE, val); return 0; } /* Implements get_underline() */ static PyObject * font_get_underline(PyObject *self, PyObject *_null) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_UNDERLINE); } /* Implements set_underline(bool) */ static PyObject * font_set_underline(PyObject *self, PyObject *arg) { TTF_Font *font = PyFont_AsFont(self); int val = PyObject_IsTrue(arg); if (val == -1) { return NULL; } _font_set_or_clear_style_flag(font, TTF_STYLE_UNDERLINE, val); Py_RETURN_NONE; } /* Implements getter for the strikethrough attribute */ static PyObject * font_getter_strikethrough(PyObject *self, void *closure) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_STRIKETHROUGH); } /* Implements setter for the strikethrough attribute */ static int font_setter_strikethrough(PyObject *self, PyObject *value, void *closure) { TTF_Font *font = PyFont_AsFont(self); int val; DEL_ATTR_NOT_SUPPORTED_CHECK("strikethrough", value); val = PyObject_IsTrue(value); if (val == -1) { return -1; } _font_set_or_clear_style_flag(font, TTF_STYLE_STRIKETHROUGH, val); return 0; } /* Implements get_strikethrough() */ static PyObject * font_get_strikethrough(PyObject *self, PyObject *args) { return _font_get_style_flag_as_py_bool(self, TTF_STYLE_STRIKETHROUGH); } /* Implements set_strikethrough(bool) */ static PyObject * font_set_strikethrough(PyObject *self, PyObject *arg) { TTF_Font *font = PyFont_AsFont(self); int val = PyObject_IsTrue(arg); if (val == -1) { return NULL; } _font_set_or_clear_style_flag(font, TTF_STYLE_STRIKETHROUGH, val); Py_RETURN_NONE; } static PyObject * font_render(PyObject *self, PyObject *args) { TTF_Font *font = PyFont_AsFont(self); int antialias; PyObject *text, *final; PyObject *fg_rgba_obj, *bg_rgba_obj = Py_None; Uint8 rgba[] = {0, 0, 0, 0}; SDL_Surface *surf; const char *astring = ""; if (!PyArg_ParseTuple(args, "OpO|O", &text, &antialias, &fg_rgba_obj, &bg_rgba_obj)) { return NULL; } if (!pg_RGBAFromFuzzyColorObj(fg_rgba_obj, rgba)) { /* Exception already set for us */ return NULL; } SDL_Color foreg = {rgba[0], rgba[1], rgba[2], SDL_ALPHA_OPAQUE}; /* might be overridden right below, with an explicit background color */ SDL_Color backg = {0, 0, 0, SDL_ALPHA_OPAQUE}; if (bg_rgba_obj != Py_None) { if (!pg_RGBAFromFuzzyColorObj(bg_rgba_obj, rgba)) { /* Exception already set for us */ return NULL; } backg = (SDL_Color){rgba[0], rgba[1], rgba[2], SDL_ALPHA_OPAQUE}; } if (!PyUnicode_Check(text) && !PyBytes_Check(text) && text != Py_None) { return RAISE_TEXT_TYPE_ERROR(); } if (PyUnicode_Check(text)) { Py_ssize_t _size = -1; astring = PyUnicode_AsUTF8AndSize(text, &_size); if (astring == NULL) { /* exception already set */ return NULL; } if (strlen(astring) != (size_t)_size) { return RAISE(PyExc_ValueError, "A null character was found in the text"); } } else if (PyBytes_Check(text)) { /* Bytes_AsStringAndSize with NULL arg for length emits ValueError if internal NULL bytes are present */ if (PyBytes_AsStringAndSize(text, (char **)&astring, NULL) == -1) { return NULL; /* exception already set */ } } /* if text is Py_None, leave astring as a null byte to represent 0 length string */ if (strlen(astring) == 0) { /* special 0 string case */ int height = TTF_FontHeight(font); surf = SDL_CreateRGBSurface(0, 0, height, 32, 0xff << 16, 0xff << 8, 0xff, 0); } else { /* normal case */ #if !SDL_TTF_VERSION_ATLEAST(2, 0, 15) if (utf_8_needs_UCS_4(astring)) { return RAISE(PyExc_UnicodeError, "A Unicode character above '\\uFFFF' was found;" " not supported with SDL_ttf version below 2.0.15"); } #endif if (antialias && bg_rgba_obj == Py_None) { surf = TTF_RenderUTF8_Blended(font, astring, foreg); } else if (antialias) { surf = TTF_RenderUTF8_Shaded(font, astring, foreg, backg); } else { surf = TTF_RenderUTF8_Solid(font, astring, foreg); /* If an explicit background was provided and the rendering options resolve to Render_Solid, that needs to be explicitly handled. */ if (surf != NULL && bg_rgba_obj != Py_None) { SDL_SetColorKey(surf, 0, 0); surf->format->palette->colors[0].r = backg.r; surf->format->palette->colors[0].g = backg.g; surf->format->palette->colors[0].b = backg.b; } } } if (surf == NULL) { return RAISE(pgExc_SDLError, TTF_GetError()); } final = (PyObject *)pgSurface_New(surf); if (final == NULL) { SDL_FreeSurface(surf); } return final; } static PyObject * font_size(PyObject *self, PyObject *text) { TTF_Font *font = PyFont_AsFont(self); int w, h; const char *string; if (PyUnicode_Check(text)) { PyObject *bytes = PyUnicode_AsEncodedString(text, "utf-8", "strict"); int ecode; if (!bytes) { return NULL; } string = PyBytes_AS_STRING(bytes); ecode = TTF_SizeUTF8(font, string, &w, &h); Py_DECREF(bytes); if (ecode) { return RAISE(pgExc_SDLError, TTF_GetError()); } } else if (PyBytes_Check(text)) { string = PyBytes_AS_STRING(text); if (TTF_SizeText(font, string, &w, &h)) { return RAISE(pgExc_SDLError, TTF_GetError()); } } else { return RAISE_TEXT_TYPE_ERROR(); } return Py_BuildValue("(ii)", w, h); } static PyObject * font_metrics(PyObject *self, PyObject *textobj) { TTF_Font *font = PyFont_AsFont(self); PyObject *list; Py_ssize_t length; Py_ssize_t i; int minx; int maxx; int miny; int maxy; int advance; PyObject *obj; PyObject *listitem; Uint16 *buffer; Uint16 ch; PyObject *temp; int surrogate; if (PyUnicode_Check(textobj)) { obj = textobj; Py_INCREF(obj); } else if (PyBytes_Check(textobj)) { obj = PyUnicode_FromEncodedObject(textobj, "UTF-8", NULL); if (!obj) { return NULL; } } else { return RAISE_TEXT_TYPE_ERROR(); } temp = PyUnicode_AsUTF16String(obj); Py_DECREF(obj); if (!temp) return NULL; obj = temp; list = PyList_New(0); if (!list) { Py_DECREF(obj); return NULL; } buffer = (Uint16 *)PyBytes_AS_STRING(obj); length = PyBytes_GET_SIZE(obj) / sizeof(Uint16); for (i = 1 /* skip BOM */; i < length; i++) { ch = buffer[i]; surrogate = Py_UNICODE_IS_SURROGATE(ch); /* TODO: * TTF_GlyphMetrics() seems to return a value for any character, * using the default invalid character, if the char is not found. */ if (!surrogate && /* conditional and */ !TTF_GlyphMetrics(font, (Uint16)ch, &minx, &maxx, &miny, &maxy, &advance)) { listitem = Py_BuildValue("(iiiii)", minx, maxx, miny, maxy, advance); if (!listitem) { Py_DECREF(list); Py_DECREF(obj); return NULL; } } else { /* Not UCS-2 or no matching metrics. */ Py_INCREF(Py_None); listitem = Py_None; if (surrogate) i++; } if (0 != PyList_Append(list, listitem)) { Py_DECREF(list); Py_DECREF(listitem); Py_DECREF(obj); return NULL; /* Exception already set. */ } Py_DECREF(listitem); } Py_DECREF(obj); return list; } static PyObject * font_set_script(PyObject *self, PyObject *arg) { /*Sadly, SDL_TTF_VERSION_ATLEAST is new in SDL_ttf 2.0.15, still too * new to use */ #if SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, \ SDL_TTF_PATCHLEVEL) >= SDL_VERSIONNUM(2, 20, 0) TTF_Font *font = PyFont_AsFont(self); Py_ssize_t size; const char *script_code; if (!PyUnicode_Check(arg)) { return RAISE(PyExc_TypeError, "script code must be a string"); } script_code = PyUnicode_AsUTF8AndSize(arg, &size); if (size != 4) { return RAISE(PyExc_ValueError, "script code must be exactly 4 characters"); } if (TTF_SetFontScriptName(font, script_code) < 0) { return RAISE(pgExc_SDLError, SDL_GetError()); } #else return RAISE(pgExc_SDLError, "pygame.font not compiled with a new enough SDL_ttf version. " "Needs SDL_ttf 2.20.0 or above."); #endif Py_RETURN_NONE; } /** * Getters and setters for the pgFontObject. */ static PyGetSetDef font_getsets[] = { {"bold", (getter)font_getter_bold, (setter)font_setter_bold, DOC_FONTBOLD, NULL}, {"italic", (getter)font_getter_italic, (setter)font_setter_italic, DOC_FONTITALIC, NULL}, {"underline", (getter)font_getter_underline, (setter)font_setter_underline, DOC_FONTUNDERLINE, NULL}, {"strikethrough", (getter)font_getter_strikethrough, (setter)font_setter_strikethrough, DOC_FONTSTRIKETHROUGH, NULL}, {NULL, NULL, NULL, NULL, NULL}}; static PyMethodDef font_methods[] = { {"get_height", font_get_height, METH_NOARGS, DOC_FONTGETHEIGHT}, {"get_descent", font_get_descent, METH_NOARGS, DOC_FONTGETDESCENT}, {"get_ascent", font_get_ascent, METH_NOARGS, DOC_FONTGETASCENT}, {"get_linesize", font_get_linesize, METH_NOARGS, DOC_FONTGETLINESIZE}, {"get_bold", font_get_bold, METH_NOARGS, DOC_FONTGETBOLD}, {"set_bold", font_set_bold, METH_O, DOC_FONTSETBOLD}, {"get_italic", font_get_italic, METH_NOARGS, DOC_FONTGETITALIC}, {"set_italic", font_set_italic, METH_O, DOC_FONTSETITALIC}, {"get_underline", font_get_underline, METH_NOARGS, DOC_FONTGETUNDERLINE}, {"set_underline", font_set_underline, METH_O, DOC_FONTSETUNDERLINE}, {"get_strikethrough", font_get_strikethrough, METH_NOARGS, DOC_FONTGETSTRIKETHROUGH}, {"set_strikethrough", font_set_strikethrough, METH_O, DOC_FONTSETSTRIKETHROUGH}, {"metrics", font_metrics, METH_O, DOC_FONTMETRICS}, {"render", font_render, METH_VARARGS, DOC_FONTRENDER}, {"size", font_size, METH_O, DOC_FONTSIZE}, {"set_script", font_set_script, METH_O, DOC_FONTSETSCRIPT}, {NULL, NULL, 0, NULL}}; /*font object internals*/ static void font_dealloc(PyFontObject *self) { TTF_Font *font = PyFont_AsFont(self); if (font && font_initialized) { if (self->ttf_init_generation != current_ttf_generation) { // Since TTF_Font is a private structure // it's impossible to access face field in a common way. long **face_pp = (long **)font; *face_pp = NULL; } TTF_CloseFont(font); self->font = NULL; } if (self->weakreflist) PyObject_ClearWeakRefs((PyObject *)self); Py_TYPE(self)->tp_free((PyObject *)self); } static int font_init(PyFontObject *self, PyObject *args, PyObject *kwds) { int fontsize = font_defaultsize; TTF_Font *font = NULL; PyObject *obj = Py_None; SDL_RWops *rw; static char *kwlist[] = {"font", "size", NULL}; self->font = NULL; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi", kwlist, &obj, &fontsize)) { return -1; } if (!font_initialized) { PyErr_SetString(pgExc_SDLError, "font not initialized"); return -1; } /* Incref obj, needs to be decref'd later */ Py_INCREF(obj); if (fontsize <= 1) { fontsize = 1; } if (obj == Py_None) { /* default font */ Py_DECREF(obj); obj = font_resource(font_defaultname); if (obj == NULL) { if (PyErr_Occurred() == NULL) { PyErr_Format(PyExc_RuntimeError, "default font '%.1024s' not found", font_defaultname); } goto error; } fontsize = (int)(fontsize * .6875); } rw = pgRWops_FromObject(obj, NULL); if (rw == NULL && PyUnicode_Check(obj)) { if (!PyUnicode_CompareWithASCIIString(obj, font_defaultname)) { /* clear out existing file loading error before attempt to get * default font */ PyErr_Clear(); Py_DECREF(obj); obj = font_resource(font_defaultname); if (obj == NULL) { if (PyErr_Occurred() == NULL) { PyErr_Format(PyExc_RuntimeError, "default font '%.1024s' not found", font_defaultname); } goto error; } /* Unlike when the default font is loaded with None, the fontsize * is not scaled down here. This was probably unintended * implementation detail, * but this rewritten code aims to keep the exact behavior as the * old one */ rw = pgRWops_FromObject(obj, NULL); } } if (rw == NULL) { goto error; } if (fontsize <= 1) fontsize = 1; Py_BEGIN_ALLOW_THREADS; font = TTF_OpenFontRW(rw, 1, fontsize); Py_END_ALLOW_THREADS; Py_DECREF(obj); self->font = font; self->ttf_init_generation = current_ttf_generation; return 0; error: Py_XDECREF(obj); return -1; } static PyTypeObject PyFont_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.font.Font", .tp_basicsize = sizeof(PyFontObject), .tp_dealloc = (destructor)font_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMEFONTFONT, .tp_weaklistoffset = offsetof(PyFontObject, weakreflist), .tp_methods = font_methods, .tp_getset = font_getsets, .tp_init = (initproc)font_init, }; /*font module methods*/ static PyObject * get_default_font(PyObject *self, PyObject *_null) { return PyUnicode_FromString(font_defaultname); } static PyObject * get_ttf_version(PyObject *self, PyObject *args, PyObject *kwargs) { int linked = 1; /* Default is linked version. */ static char *keywords[] = {"linked", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) { return NULL; /* Exception already set. */ } if (linked) { const SDL_version *v = TTF_Linked_Version(); return Py_BuildValue("iii", v->major, v->minor, v->patch); } else { /* compiled version */ SDL_version v; TTF_VERSION(&v); return Py_BuildValue("iii", v.major, v.minor, v.patch); } } static PyMethodDef _font_methods[] = { {"init", (PyCFunction)fontmodule_init, METH_NOARGS, DOC_PYGAMEFONTINIT}, {"quit", (PyCFunction)fontmodule_quit, METH_NOARGS, DOC_PYGAMEFONTQUIT}, {"get_init", (PyCFunction)pg_font_get_init, METH_NOARGS, DOC_PYGAMEFONTGETINIT}, {"get_default_font", (PyCFunction)get_default_font, METH_NOARGS, DOC_PYGAMEFONTGETDEFAULTFONT}, {"get_sdl_ttf_version", (PyCFunction)get_ttf_version, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEFONTGETINIT}, {NULL, NULL, 0, NULL}}; static PyObject * PyFont_New(TTF_Font *font) { PyFontObject *fontobj; if (!font) return RAISE(PyExc_RuntimeError, "unable to load font."); fontobj = (PyFontObject *)PyFont_Type.tp_new(&PyFont_Type, NULL, NULL); if (fontobj) fontobj->font = font; return (PyObject *)fontobj; } MODINIT_DEFINE(font) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_FONT_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "font", DOC_PYGAMEFONT, -1, _font_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&PyFont_Type) < 0) { return NULL; } PyFont_Type.tp_new = PyType_GenericNew; module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&PyFont_Type); if (PyModule_AddObject(module, "FontType", (PyObject *)&PyFont_Type)) { Py_DECREF(&PyFont_Type); Py_DECREF(module); return NULL; } Py_INCREF(&PyFont_Type); if (PyModule_AddObject(module, "Font", (PyObject *)&PyFont_Type)) { Py_DECREF(&PyFont_Type); Py_DECREF(module); return NULL; } #if SDL_TTF_VERSION_ATLEAST(2, 0, 15) /* So people can check for UCS4 support. */ if (PyModule_AddIntConstant(module, "UCS4", 1)) { Py_DECREF(module); return NULL; } #endif /* export the c api */ c_api[0] = &PyFont_Type; c_api[1] = PyFont_New; c_api[2] = &font_initialized; apiobj = encapsulate_api(c_api, "font"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/font.h0000644000175100001770000000053414676242340014631 0ustar00runnerdocker#ifndef PGFONT_INTERNAL_H #define PGFONT_INTERNAL_H #include /* test font initialization */ #define FONT_INIT_CHECK() \ if (!(*(int *)PyFONT_C_API[2])) \ return RAISE(pgExc_SDLError, "font system not initialized") #include "include/pygame_font.h" #define PYGAMEAPI_FONT_NUMSLOTS 3 #endif /* ~PGFONT_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0611258 pygame-2.6.1/src_c/freetype/0000755000175100001770000000000014676242436015341 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/freetype/ft_cache.c0000644000175100001770000001741114676242340017237 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #define NO_PYGAME_C_API #include "ft_wrap.h" #include FT_MODULE_H typedef struct keyfields_ { GlyphIndex_t id; Scale_t face_size; unsigned short style; unsigned short render_flags; unsigned short rotation; FT_Fixed strength; } KeyFields; typedef union cachenodekey_ { KeyFields fields; FT_UInt32 dwords[(sizeof(KeyFields) + 3) / 4]; } NodeKey; typedef struct cachenode_ { FontGlyph glyph; struct cachenode_ *next; NodeKey key; FT_UInt32 hash; } CacheNode; static FT_UInt32 get_hash(const NodeKey *); static CacheNode * allocate_node(FontCache *, const FontRenderMode *, GlyphIndex_t, void *); static void free_node(FontCache *, CacheNode *); static void set_node_key(NodeKey *, GlyphIndex_t, const FontRenderMode *); static int equal_node_keys(const NodeKey *, const NodeKey *); const int render_flags_mask = (FT_RFLAG_ANTIALIAS | FT_RFLAG_HINTED | FT_RFLAG_AUTOHINT); static void set_node_key(NodeKey *key, GlyphIndex_t id, const FontRenderMode *mode) { KeyFields *fields = &key->fields; const FT_UInt16 style_mask = ~(FT_STYLE_UNDERLINE); const FT_UInt16 rflag_mask = ~(FT_RFLAG_VERTICAL | FT_RFLAG_KERNING); unsigned short rot = (unsigned short)(((unsigned int)(mode->rotation_angle)) >> 16); memset(key, 0, sizeof(*key)); fields->id = id; fields->face_size = mode->face_size; fields->style = mode->style & style_mask; fields->render_flags = mode->render_flags & rflag_mask; fields->rotation = rot; fields->strength = mode->strength; } static int equal_node_keys(const NodeKey *a, const NodeKey *b) { size_t i; for (i = 0; i < sizeof(a->dwords) / sizeof(a->dwords[0]); ++i) { if (a->dwords[i] != b->dwords[i]) { return 0; } } return 1; } static FT_UInt32 get_hash(const NodeKey *key) { /* * Based on the 32 bit x86 MurmurHash3, with the key size a multiple of 4. */ FT_UInt32 h1 = 712189651; /* Set to the seed, a prime in this case */ FT_UInt32 c1 = 0xCC9E2D51; FT_UInt32 c2 = 0x1B873593; FT_UInt32 k1; const FT_UInt32 *blocks = key->dwords; int i; for (i = (sizeof(key->dwords) / 4); i; --i) { k1 = blocks[i]; k1 *= c1; k1 = (k1 << 15) | (k1 >> 17); k1 *= c2; h1 ^= k1; h1 = (h1 << 13) | (h1 >> 19); h1 = h1 * 5 + 0xE6546B64; } h1 ^= sizeof(key->dwords); h1 ^= h1 >> 16; h1 *= 0x85EBCA6B; h1 ^= h1 >> 13; h1 *= 0xC2B2AE35; h1 ^= h1 >> 16; return h1; } int _PGFT_Cache_Init(FreeTypeInstance *ft, FontCache *cache) { int cache_size = MAX(ft->cache_size - 1, PGFT_MIN_CACHE_SIZE - 1); int i; /* * Make sure this is a power of 2. */ cache_size = cache_size | (cache_size >> 1); cache_size = cache_size | (cache_size >> 2); cache_size = cache_size | (cache_size >> 4); cache_size = cache_size | (cache_size >> 8); cache_size = cache_size | (cache_size >> 16); cache_size = cache_size + 1; cache->nodes = _PGFT_malloc((size_t)cache_size * sizeof(FontGlyph *)); if (!cache->nodes) return -1; for (i = 0; i < cache_size; ++i) cache->nodes[i] = 0; cache->depths = _PGFT_malloc((size_t)cache_size); if (!cache->depths) { _PGFT_free(cache->nodes); cache->nodes = 0; return -1; } memset(cache->depths, 0, cache_size); cache->free_nodes = 0; cache->size_mask = (FT_UInt32)(cache_size - 1); #ifdef PGFT_DEBUG_CACHE cache->_debug_count = 0; cache->_debug_delete_count = 0; cache->_debug_access = 0; cache->_debug_hit = 0; cache->_debug_miss = 0; #endif return 0; } void _PGFT_Cache_Destroy(FontCache *cache) { CacheNode *node, *next; if (!cache) { return; } /* PGFT_DEBUG_CACHE - Here is a good place to set a breakpoint * to examine _debug fields. */ if (cache->nodes) { FT_UInt i; for (i = 0; i <= cache->size_mask; ++i) { node = cache->nodes[i]; while (node) { next = node->next; free_node(cache, node); node = next; } } _PGFT_free(cache->nodes); cache->nodes = 0; } _PGFT_free(cache->depths); cache->depths = 0; } void _PGFT_Cache_Cleanup(FontCache *cache) { const FT_Byte MAX_BUCKET_DEPTH = 2; CacheNode *node, *prev; FT_UInt32 i; for (i = 0; i <= cache->size_mask; ++i) { while (cache->depths[i] > MAX_BUCKET_DEPTH) { node = cache->nodes[i]; prev = 0; for (;;) { if (!node->next) { #ifdef PGFT_DEBUG_CACHE cache->_debug_delete_count++; #endif if (prev) { prev->next = 0; } free_node(cache, node); break; } prev = node; node = node->next; } } } } FontGlyph * _PGFT_Cache_FindGlyph(GlyphIndex_t id, const FontRenderMode *render, FontCache *cache, void *internal) { CacheNode **nodes = cache->nodes; CacheNode *node, *prev; NodeKey key; FT_UInt32 hash; FT_UInt32 bucket; set_node_key(&key, id, render); hash = get_hash(&key); bucket = hash & cache->size_mask; node = nodes[bucket]; prev = 0; #ifdef PGFT_DEBUG_CACHE cache->_debug_access++; #endif while (node) { if (equal_node_keys(&node->key, &key)) { if (prev) { prev->next = node->next; node->next = nodes[bucket]; nodes[bucket] = node; } #ifdef PGFT_DEBUG_CACHE cache->_debug_hit++; #endif return &node->glyph; } prev = node; node = node->next; } node = allocate_node(cache, render, id, internal); #ifdef PGFT_DEBUG_CACHE cache->_debug_miss++; #endif return node ? &node->glyph : 0; } static void free_node(FontCache *cache, CacheNode *node) { if (!node) { return; } #ifdef PGFT_DEBUG_CACHE cache->_debug_count--; #endif cache->depths[node->hash & cache->size_mask]--; FT_Done_Glyph((FT_Glyph)(node->glyph.image)); _PGFT_free(node); } static CacheNode * allocate_node(FontCache *cache, const FontRenderMode *render, GlyphIndex_t id, void *internal) { CacheNode *node = _PGFT_malloc(sizeof(CacheNode)); FT_UInt32 bucket; if (!node) { return 0; } memset(node, 0, sizeof(CacheNode)); if (_PGFT_LoadGlyph(&node->glyph, id, render, internal)) { goto cleanup; } set_node_key(&node->key, id, render); node->hash = get_hash(&node->key); bucket = node->hash & cache->size_mask; node->next = cache->nodes[bucket]; cache->nodes[bucket] = node; cache->depths[bucket]++; #ifdef PGFT_DEBUG_CACHE cache->_debug_count++; #endif return node; /* * Cleanup on error */ cleanup: _PGFT_free(node); return 0; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/freetype/ft_layout.c0000644000175100001770000005554714676242340017525 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #include "ft_wrap.h" #include FT_MODULE_H #include FT_TRIGONOMETRY_H #include FT_OUTLINE_H #include FT_BITMAP_H #include FT_CACHE_H /* Multiply the font's x ppem by this factor to get the x strength * factor in 16.16 Fixed. */ #define FX16_WIDE_FACTOR (FX16_ONE / 12) #define SLANT_FACTOR 0.22 static FT_Matrix slant_matrix = {FX16_ONE, (FT_Fixed)(SLANT_FACTOR *FX16_ONE), 0, FX16_ONE}; static FT_Matrix unit_matrix = {FX16_ONE, 0, 0, FX16_ONE}; typedef struct textcontext_ { FT_Library lib; FTC_FaceID id; FT_Face font; FTC_CMapCache charmap; int do_transform; FT_Matrix transform; } TextContext; #if 0 #define BOLD_STRENGTH_D (0.65) #define PIXEL_SIZE ((FT_Fixed)64) #define BOLD_STRENGTH ((FT_Fixed)(BOLD_STRENGTH_D * PIXEL_SIZE)) #define BOLD_ADVANCE (BOLD_STRENGTH * (FT_Fixed)4) #endif #define FX16_BOLD_FACTOR (FX16_ONE / 36) #define UNICODE_SPACE ((PGFT_char)' ') typedef enum { UPDATE_NONE, UPDATE_LAYOUT, UPDATE_GLYPHS } UpdateLevel_t; /** render modes requiring glyph reloading and repositioning */ static const FT_UInt16 GLYPH_RENDER_FLAGS = (FT_RFLAG_ANTIALIAS | FT_RFLAG_AUTOHINT | FT_RFLAG_TRANSFORM | FT_RFLAG_USE_BITMAP_STRIKES); /** render modes requiring only glyph repositioning */ static const FT_UInt16 LAYOUT_RENDER_FLAGS = (FT_RFLAG_VERTICAL | FT_RFLAG_HINTED | FT_RFLAG_KERNING | FT_RFLAG_PAD); /** render styles requiring glyph reloading and repositioning */ static const FT_UInt16 GLYPH_STYLE_FLAGS = (FT_STYLE_OBLIQUE | FT_STYLE_STRONG | FT_STYLE_WIDE); static FT_UInt32 get_load_flags(const FontRenderMode *); static void fill_metrics(FontMetrics *, FT_Pos, FT_Pos, FT_Vector *, FT_Vector *); static void fill_context(TextContext *, const FreeTypeInstance *, const pgFontObject *, const FontRenderMode *, const FT_Face); static int size_text(Layout *, FreeTypeInstance *, TextContext *, const PGFT_String *); static int load_glyphs(Layout *, TextContext *, FontCache *); static void position_glyphs(Layout *); static void fill_text_bounding_box(Layout *, FT_Vector, FT_Pos, FT_Pos, FT_Pos, FT_Pos, FT_Pos); static UpdateLevel_t mode_compare(const FontRenderMode *, const FontRenderMode *); static int same_sizes(const Scale_t *, const Scale_t *); static int same_transforms(const FT_Matrix *, const FT_Matrix *); static void copy_mode(FontRenderMode *, const FontRenderMode *); int _PGFT_LayoutInit(FreeTypeInstance *ft, pgFontObject *fontobj) { Layout *ftext = &fontobj->_internals->active_text; FontCache *cache = &fontobj->_internals->glyph_cache; ftext->buffer_size = 0; ftext->glyphs = 0; if (_PGFT_Cache_Init(ft, cache)) { PyErr_NoMemory(); return -1; } return 0; } void _PGFT_LayoutFree(pgFontObject *fontobj) { Layout *ftext = &(fontobj->_internals->active_text); FontCache *cache = &fontobj->_internals->glyph_cache; if (ftext->buffer_size > 0) { _PGFT_free(ftext->glyphs); ftext->glyphs = 0; } _PGFT_Cache_Destroy(cache); } Layout * _PGFT_LoadLayout(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PGFT_String *text) { Layout *ftext = &fontobj->_internals->active_text; FontCache *cache = &fontobj->_internals->glyph_cache; UpdateLevel_t level = (text ? UPDATE_GLYPHS : mode_compare(&ftext->mode, mode)); FT_Face font = 0; TextContext context; if (level != UPDATE_NONE) { copy_mode(&ftext->mode, mode); font = _PGFT_GetFontSized(ft, fontobj, mode->face_size); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } } switch (level) { case UPDATE_GLYPHS: _PGFT_Cache_Cleanup(cache); fill_context(&context, ft, fontobj, mode, font); if (text) { if (size_text(ftext, ft, &context, text)) { return 0; } } if (load_glyphs(ftext, &context, cache)) { return 0; } /* fall through */ case UPDATE_LAYOUT: position_glyphs(ftext); break; default: assert(level == UPDATE_NONE); break; } return ftext; } static int size_text(Layout *ftext, FreeTypeInstance *ft, TextContext *context, const PGFT_String *text) { FT_Face font = context->font; const FT_Size_Metrics *sz_metrics = &font->size->metrics; Py_ssize_t string_length = PGFT_String_GET_LENGTH(text); const PGFT_char *chars = PGFT_String_GET_DATA(text); FT_Fixed y_scale = sz_metrics->y_scale; int have_kerning = FT_HAS_KERNING(font); int length = 0; GlyphSlot *slots; GlyphIndex_t id; GlyphIndex_t prev_id = 0; FT_UInt32 ch; Py_ssize_t i; FT_Error error = 0; assert(!(ftext->mode.render_flags & FT_RFLAG_KERNING) || have_kerning); /* create the text struct */ if (string_length > ftext->buffer_size) { _PGFT_free(ftext->glyphs); ftext->glyphs = (GlyphSlot *)_PGFT_malloc((size_t)string_length * sizeof(GlyphSlot)); if (!ftext->glyphs) { PyErr_NoMemory(); return -1; } ftext->buffer_size = (int)string_length; } /* Retrieve the glyph indices of recognized text characters */ slots = ftext->glyphs; for (i = 0; i < string_length; ++i) { ch = chars[i]; id = FTC_CMapCache_Lookup(context->charmap, context->id, -1, ch); slots[length].id = id; if (have_kerning) { error = FT_Get_Kerning(font, prev_id, id, FT_KERNING_UNFITTED, &slots[length].kerning); if (error) { _PGFT_SetError(ft, "Loading glyphs", error); PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return -1; } } prev_id = id; ++length; } ftext->length = length; /* Fill in generate font parameters */ ftext->ascender = sz_metrics->ascender; ftext->descender = sz_metrics->descender; ftext->height = sz_metrics->height; ftext->max_advance = sz_metrics->max_advance; ftext->underline_pos = -FT_MulFix(font->underline_position, y_scale); ftext->underline_size = FT_MulFix(font->underline_thickness, y_scale); if (ftext->mode.style & FT_STYLE_STRONG) { FT_Fixed bold_str = ftext->mode.strength * sz_metrics->x_ppem; ftext->underline_size = FT_MulFix(ftext->underline_size, FX16_ONE + bold_str / 4); } return 0; } static int load_glyphs(Layout *ftext, TextContext *context, FontCache *cache) { GlyphSlot *slot = ftext->glyphs; Py_ssize_t length = ftext->length; FontRenderMode *mode = &ftext->mode; FontGlyph *glyph; Py_ssize_t i; for (i = 0; i < length; ++i) { glyph = _PGFT_Cache_FindGlyph(slot[i].id, mode, cache, context); if (!glyph) { PyErr_Format(pgExc_SDLError, "Unable to load glyph for id %lu", (unsigned long)slot[i].id); return -1; } slot[i].glyph = glyph; } return 0; } static void position_glyphs(Layout *ftext) { GlyphSlot *glyph_array = ftext->glyphs; GlyphSlot *slot; FontGlyph *glyph = 0; Py_ssize_t n_glyphs = ftext->length; FontMetrics *metrics; FT_Vector pen = {0, 0}; /* untransformed origin */ FT_Vector pen1 = {0, 0}; FT_Vector pen2; int vertical = ftext->mode.render_flags & FT_RFLAG_VERTICAL; int use_kerning = ftext->mode.render_flags & FT_RFLAG_KERNING; /* All these are 16.16 precision */ FT_Angle rotation_angle = ftext->mode.rotation_angle; /* All these are 26.6 precision */ FT_Vector kerning; FT_Pos min_x = FX6_MAX; FT_Pos max_x = FX6_MIN; FT_Pos min_y = FX6_MAX; FT_Pos max_y = FX6_MIN; FT_Pos glyph_width; FT_Pos glyph_height; FT_Pos top = FX6_MIN; Py_ssize_t i; assert(n_glyphs == 0 || glyph_array); for (i = 0; i != n_glyphs; ++i) { slot = &glyph_array[i]; glyph = slot->glyph; pen2.x = pen1.x; pen2.y = pen1.y; pen1.x = pen.x; pen1.y = pen.y; glyph_width = glyph->width; glyph_height = glyph->height; /* * Do size calculations for the glyph */ if (use_kerning) { kerning.x = slot->kerning.x; kerning.y = slot->kerning.y; if (rotation_angle != 0) { FT_Vector_Rotate(&kerning, rotation_angle); } pen.x += FX6_ROUND(kerning.x); pen.y += FX6_ROUND(kerning.y); if (FT_Vector_Length(&pen2) > FT_Vector_Length(&pen)) { pen.x = pen2.x; pen.y = pen2.y; } } metrics = vertical ? &glyph->v_metrics : &glyph->h_metrics; if (metrics->bearing_rotated.y > top) { top = metrics->bearing_rotated.y; } if (pen.x + metrics->bearing_rotated.x < min_x) { min_x = pen.x + metrics->bearing_rotated.x; } if (pen.x + metrics->bearing_rotated.x + glyph_width > max_x) { max_x = pen.x + metrics->bearing_rotated.x + glyph_width; } slot->posn.x = pen.x + metrics->bearing_rotated.x; pen.x += metrics->advance_rotated.x; if (vertical) { if (pen.y + metrics->bearing_rotated.y < min_y) { min_y = pen.y + metrics->bearing_rotated.y; } if (pen.y + metrics->bearing_rotated.y + glyph_height > max_y) { max_y = pen.y + metrics->bearing_rotated.y + glyph_height; } slot->posn.y = pen.y + metrics->bearing_rotated.y; pen.y += metrics->advance_rotated.y; } else { if (pen.y - metrics->bearing_rotated.y < min_y) { min_y = pen.y - metrics->bearing_rotated.y; } if (pen.y - metrics->bearing_rotated.y + glyph_height > max_y) { max_y = pen.y - metrics->bearing_rotated.y + glyph_height; } slot->posn.y = pen.y - metrics->bearing_rotated.y; pen.y -= metrics->advance_rotated.y; } } /* Deal with the special case of a trailing space. * * In determining the bounding box of the text, the above loop omits * the advance of the last character from the calculation. This is * intentional. For a printing character with a bitmap, it avoids * padding of the boundary. But a space is nothing but padding, so * a trailing space gets left out. This adds it in. */ if (n_glyphs > 0 && /* conditional && */ (glyph_array + n_glyphs - 1)->glyph->image->bitmap.width == 0) { if (pen.x < min_x) { min_x = pen.x; } else if (pen.x > max_x) { max_x = pen.x; } if (pen.y < min_y) { min_y = pen.y; } else if (pen.y > max_y) { max_y = pen.y; } } fill_text_bounding_box(ftext, pen, min_x, max_x, min_y, max_y, top); } static void fill_text_bounding_box(Layout *ftext, FT_Vector pen, FT_Pos min_x, FT_Pos max_x, FT_Pos min_y, FT_Pos max_y, FT_Pos top) { const FT_Fixed BASELINE = FX6_ONE; FT_Fixed right = ftext->max_advance / 2; FT_Fixed ascender = ftext->ascender; FT_Fixed descender = ftext->descender; FT_Fixed height = ftext->height; int vertical = ftext->mode.render_flags & FT_RFLAG_VERTICAL; int pad = ftext->mode.render_flags & FT_RFLAG_PAD; if (ftext->length == 0) { min_x = 0; max_x = 0; min_y = vertical ? 0 : -ascender; max_y = vertical ? height : -descender; } ftext->left = FX6_TRUNC(FX6_FLOOR(min_x)); ftext->top = FX6_TRUNC(FX6_CEIL(top)); if (pad) { if (pen.x > max_x) { max_x = pen.x; } else if (pen.x < min_x) { min_x = pen.x; } if (pen.y > max_y) { max_y = pen.y; } else if (pen.y < min_y) { min_y = pen.y; } if (vertical) { if (max_x < right) { max_x = right; } if (min_x > -right) { min_x = -right; } if (min_y > 0) { min_y = 0; } } else { if (min_x > 0) { min_x = 0; } if (min_y > -ascender) { min_y = -ascender; } if (max_y <= -descender) { max_y = -descender + BASELINE; } } } ftext->min_x = min_x; ftext->max_x = max_x; ftext->min_y = min_y; ftext->max_y = max_y; ftext->advance.x = pen.x; ftext->advance.y = pen.y; } int _PGFT_GetMetrics(FreeTypeInstance *ft, pgFontObject *fontobj, PGFT_char character, const FontRenderMode *mode, FT_UInt *gindex, long *minx, long *maxx, long *miny, long *maxy, double *advance_x, double *advance_y) { FontCache *cache = &(fontobj->_internals->glyph_cache); FT_UInt32 ch = (FT_UInt32)character; GlyphIndex_t id; FontGlyph *glyph = 0; TextContext context; FT_Face font; /* load our sized font */ font = _PGFT_GetFontSized(ft, fontobj, mode->face_size); if (!font) { return -1; } /* cleanup the cache */ _PGFT_Cache_Cleanup(cache); fill_context(&context, ft, fontobj, mode, font); id = FTC_CMapCache_Lookup(context.charmap, context.id, -1, ch); if (!id) { return -1; } glyph = _PGFT_Cache_FindGlyph(id, mode, cache, &context); if (!glyph) { return -1; } *gindex = id; *minx = (long)glyph->image->left; *maxx = (long)(glyph->image->left + glyph->image->bitmap.width); *maxy = (long)glyph->image->top; *miny = (long)(glyph->image->top - glyph->image->bitmap.rows); *advance_x = (double)(glyph->h_metrics.advance_rotated.x / 64.0); *advance_y = (double)(glyph->h_metrics.advance_rotated.y / 64.0); return 0; } int _PGFT_LoadGlyph(FontGlyph *glyph, GlyphIndex_t id, const FontRenderMode *mode, void *internal) { static FT_Vector delta = {0, 0}; FT_Render_Mode rmode = ((mode->render_flags & FT_RFLAG_ANTIALIAS) ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO); FT_Vector strong_delta = {0, 0}; FT_Glyph image = 0; FT_Glyph_Metrics *ft_metrics; TextContext *context = (TextContext *)internal; FT_UInt32 load_flags; FT_Fixed rotation_angle = mode->rotation_angle; /* FT_Matrix transform; */ FT_Vector h_bearing_rotated; FT_Vector v_bearing_rotated; FT_Vector h_advance_rotated; FT_Vector v_advance_rotated; FT_Error error = 0; /* * Get loading information */ load_flags = get_load_flags(mode); /* * Load the glyph into the glyph slot */ if (FT_Load_Glyph(context->font, id, (FT_Int)load_flags) || FT_Get_Glyph(context->font->glyph, &image)) goto cleanup; /* * Perform any outline transformations */ if (mode->style & FT_STYLE_STRONG) { FT_UShort x_ppem = context->font->size->metrics.x_ppem; FT_Fixed bold_str; FT_BBox before; FT_BBox after; bold_str = FX16_CEIL_TO_FX6(mode->strength * x_ppem); FT_Outline_Get_CBox(&((FT_OutlineGlyph)image)->outline, &before); if (FT_Outline_Embolden(&((FT_OutlineGlyph)image)->outline, bold_str)) goto cleanup; FT_Outline_Get_CBox(&((FT_OutlineGlyph)image)->outline, &after); strong_delta.x += ((after.xMax - after.xMin) - (before.xMax - before.xMin)); strong_delta.y += ((after.yMax - after.yMin) - (before.yMax - before.yMin)); } if (context->do_transform) { if (FT_Glyph_Transform(image, &context->transform, &delta)) { goto cleanup; } } /* * Finished with outline transformations, now replace with a bitmap */ error = FT_Glyph_To_Bitmap(&image, rmode, 0, 1); if (error) { goto cleanup; } if (mode->style & FT_STYLE_WIDE) { FT_Bitmap *bitmap = &((FT_BitmapGlyph)image)->bitmap; int w = bitmap->width; FT_UShort x_ppem = context->font->size->metrics.x_ppem; FT_Pos x_strength; x_strength = FX16_CEIL_TO_FX6(mode->strength * x_ppem); /* FT_Bitmap_Embolden returns an error for a zero width bitmap */ if (w > 0) { error = FT_Bitmap_Embolden(context->lib, bitmap, x_strength, (FT_Pos)0); if (error) { goto cleanup; } strong_delta.x += INT_TO_FX6(bitmap->width - w); } else { strong_delta.x += x_strength; } } /* Fill the glyph */ ft_metrics = &context->font->glyph->metrics; h_advance_rotated.x = ft_metrics->horiAdvance + strong_delta.x; h_advance_rotated.y = 0; v_advance_rotated.x = 0; v_advance_rotated.y = ft_metrics->vertAdvance + strong_delta.y; if (rotation_angle != 0) { FT_Angle counter_rotation = INT_TO_FX16(360) - rotation_angle; FT_Vector_Rotate(&h_advance_rotated, rotation_angle); FT_Vector_Rotate(&v_advance_rotated, counter_rotation); } glyph->image = (FT_BitmapGlyph)image; glyph->width = INT_TO_FX6(glyph->image->bitmap.width); glyph->height = INT_TO_FX6(glyph->image->bitmap.rows); h_bearing_rotated.x = INT_TO_FX6(glyph->image->left); h_bearing_rotated.y = INT_TO_FX6(glyph->image->top); fill_metrics(&glyph->h_metrics, ft_metrics->horiBearingX, ft_metrics->horiBearingY, &h_bearing_rotated, &h_advance_rotated); if (rotation_angle == 0) { v_bearing_rotated.x = ft_metrics->vertBearingX - strong_delta.x / 2; v_bearing_rotated.y = ft_metrics->vertBearingY; } else { /* * Adjust the vertical metrics. */ FT_Vector v_origin; v_origin.x = (glyph->h_metrics.bearing_x - ft_metrics->vertBearingX + strong_delta.x / 2); v_origin.y = (glyph->h_metrics.bearing_y + ft_metrics->vertBearingY); FT_Vector_Rotate(&v_origin, rotation_angle); v_bearing_rotated.x = glyph->h_metrics.bearing_rotated.x - v_origin.x; v_bearing_rotated.y = v_origin.y - glyph->h_metrics.bearing_rotated.y; } fill_metrics(&glyph->v_metrics, ft_metrics->vertBearingX, ft_metrics->vertBearingY, &v_bearing_rotated, &v_advance_rotated); return 0; /* * Cleanup on error */ cleanup: if (image) { FT_Done_Glyph(image); } return -1; } static void fill_context(TextContext *context, const FreeTypeInstance *ft, const pgFontObject *fontobj, const FontRenderMode *mode, const FT_Face font) { context->lib = ft->library; context->id = (FTC_FaceID) & (fontobj->id); context->font = font; context->charmap = ft->cache_charmap; context->do_transform = 0; if (mode->style & FT_STYLE_OBLIQUE) { context->transform = slant_matrix; context->do_transform = 1; } else { context->transform = unit_matrix; } if (mode->render_flags & FT_RFLAG_TRANSFORM) { FT_Matrix_Multiply(&mode->transform, &context->transform); context->do_transform = 1; } if (mode->rotation_angle != 0) { FT_Vector unit; FT_Matrix rotate; FT_Vector_Unit(&unit, mode->rotation_angle); rotate.xx = unit.x; /* cos(angle) */ rotate.xy = -unit.y; /* -sin(angle) */ rotate.yx = unit.y; /* sin(angle) */ rotate.yy = unit.x; /* cos(angle) */ FT_Matrix_Multiply(&rotate, &context->transform); context->do_transform = 1; } } static void fill_metrics(FontMetrics *metrics, FT_Pos bearing_x, FT_Pos bearing_y, FT_Vector *bearing_rotated, FT_Vector *advance_rotated) { metrics->bearing_x = bearing_x; metrics->bearing_y = bearing_y; metrics->bearing_rotated.x = bearing_rotated->x; metrics->bearing_rotated.y = bearing_rotated->y; metrics->advance_rotated.x = advance_rotated->x; metrics->advance_rotated.y = advance_rotated->y; } static FT_UInt32 get_load_flags(const FontRenderMode *mode) { FT_UInt32 load_flags = FT_LOAD_DEFAULT; load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; if (mode->render_flags & FT_RFLAG_AUTOHINT) { load_flags |= FT_LOAD_FORCE_AUTOHINT; } if (mode->render_flags & FT_RFLAG_HINTED) { load_flags |= FT_LOAD_TARGET_NORMAL; } else { load_flags |= FT_LOAD_NO_HINTING; } if (!(mode->render_flags & FT_RFLAG_USE_BITMAP_STRIKES) || (mode->render_flags & FT_RFLAG_TRANSFORM) || (mode->rotation_angle != 0) || (mode->style & (FT_STYLE_STRONG | FT_STYLE_OBLIQUE))) { load_flags |= FT_LOAD_NO_BITMAP; } return load_flags; } static UpdateLevel_t mode_compare(const FontRenderMode *a, const FontRenderMode *b) { FT_UInt16 a_sflags = a->style; FT_UInt16 b_sflags = b->style; FT_UInt16 a_rflags = a->render_flags; FT_UInt16 b_rflags = b->render_flags; if (!same_sizes(&a->face_size, &b->face_size) || a->rotation_angle != b->rotation_angle || (a_sflags & GLYPH_STYLE_FLAGS) != (b_sflags & GLYPH_STYLE_FLAGS) || (a_rflags & GLYPH_RENDER_FLAGS) != (b_rflags & GLYPH_RENDER_FLAGS) || ((a_rflags & FT_RFLAG_TRANSFORM) && !same_transforms(&a->transform, &b->transform))) { return UPDATE_GLYPHS; } if ((a_rflags & LAYOUT_RENDER_FLAGS) != (b_rflags & LAYOUT_RENDER_FLAGS)) { return UPDATE_LAYOUT; } return UPDATE_NONE; } static int same_sizes(const Scale_t *a, const Scale_t *b) { return a->x == b->x && a->y == b->y; } static int same_transforms(const FT_Matrix *a, const FT_Matrix *b) { return a->xx == b->xx && a->xy == b->xy && a->yx == b->yx && a->yy == b->yy; } static void copy_mode(FontRenderMode *d, const FontRenderMode *s) { memcpy(d, s, sizeof(FontRenderMode)); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/freetype/ft_pixel.h0000644000175100001770000000657214676242340017330 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _PYGAME_FREETYPE_PIXEL_H_ #define _PYGAME_FREETYPE_PIXEL_H_ #include "../surface.h" #define GET_RGB_VALS(pixel, fmt, r, g, b, a) \ (r) = ((pixel) & (fmt)->Rmask) >> (fmt)->Rshift; \ (r) = ((r) << (fmt)->Rloss) + ((r) >> (8 - ((fmt)->Rloss << 1))); \ (g) = ((pixel) & (fmt)->Gmask) >> (fmt)->Gshift; \ (g) = ((g) << (fmt)->Gloss) + ((g) >> (8 - ((fmt)->Gloss << 1))); \ (b) = ((pixel) & (fmt)->Bmask) >> (fmt)->Bshift; \ (b) = ((b) << (fmt)->Bloss) + ((b) >> (8 - ((fmt)->Bloss << 1))); \ if ((fmt)->Amask) { \ (a) = ((pixel) & (fmt)->Amask) >> (fmt)->Ashift; \ (a) = ((a) << (fmt)->Aloss) + ((a) >> (8 - ((fmt)->Aloss << 1))); \ } \ else { \ (a) = 255; \ } #define GET_PALETTE_VALS(pixel, fmt, sr, sg, sb, sa) \ (sr) = (fmt)->palette->colors[(Uint8)(pixel)].r; \ (sg) = (fmt)->palette->colors[(Uint8)(pixel)].g; \ (sb) = (fmt)->palette->colors[(Uint8)(pixel)].b; \ (sa) = 255; #define GET_PIXEL_VALS(pixel, fmt, r, g, b, a) \ if (!(fmt)->palette) { \ GET_RGB_VALS(pixel, fmt, r, g, b, a); \ } \ else { \ GET_PALETTE_VALS(pixel, fmt, r, g, b, a); \ } #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define GET_PIXEL24(b) ((b)[0] + ((b)[1] << 8) + ((b)[2] << 16)) #define SET_PIXEL24_RGB(buf, format, r, g, b) \ *((buf) + ((format)->Rshift >> 3)) = (r); \ *((buf) + ((format)->Gshift >> 3)) = (g); \ *((buf) + ((format)->Bshift >> 3)) = (b); #define SET_PIXEL24(buf, format, rgb) \ *((buf) + ((format)->Rshift >> 3)) = (rgb)[0]; \ *((buf) + ((format)->Gshift >> 3)) = (rgb)[1]; \ *((buf) + ((format)->Bshift >> 3)) = (rgb)[2]; #else #define GET_PIXEL24(b) ((b)[2] + ((b)[1] << 8) + ((b)[0] << 16)) #define SET_PIXEL24_RGB(buf, format, r, g, b) \ *((buf) + 2 - ((format)->Rshift >> 3)) = (r); \ *((buf) + 2 - ((format)->Gshift >> 3)) = (g); \ *((buf) + 2 - ((format)->Bshift >> 3)) = (b); #define SET_PIXEL24(buf, format, rgb) \ *((buf) + 2 - ((format)->Rshift >> 3)) = (rgb)[0]; \ *((buf) + 2 - ((format)->Gshift >> 3)) = (rgb)[1]; \ *((buf) + 2 - ((format)->Bshift >> 3)) = (rgb)[2]; #endif #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/freetype/ft_render.c0000644000175100001770000005562714676242340017466 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #include "ft_wrap.h" #include FT_MODULE_H #include FT_OUTLINE_H static const FontColor mono_opaque = {0, 0, 0, SDL_ALPHA_OPAQUE}; static const FontColor mono_transparent = {0, 0, 0, SDL_ALPHA_TRANSPARENT}; static void render(FreeTypeInstance *, Layout *, const FontRenderMode *, const FontColor *, FontSurface *, unsigned, unsigned, FT_Vector *, FT_Pos, FT_Fixed); static int _validate_view_format(const char *format) { int i = 0; /* Check if the format starts with a size/byte order code or a item count */ switch (format[i]) { case '@': case '=': case '<': case '>': case '!': ++i; break; case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* Only allowed for fill bytes */ if (format[i + 1] == 'x') { ++i; } break; /* default: assume the first character is a format character */ } /* A item count of 1 is accepted */ if (format[i] == '1') { ++i; } /* Verify the next character is a format character */ switch (format[i]) { case 'x': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': ++i; break; /* default: an unrecognized format character; raise exception later */ } if (format[i] != '\0') { return -1; } return 0; } static int _is_swapped(Py_buffer *view_p) { char ch = view_p->format[0]; #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (ch == '>' || ch == '!') { return 1; } #else if (ch == '<') { return 1; } #endif return 0; } int _PGFT_CheckStyle(FT_UInt32 style) { const FT_UInt32 max_style = FT_STYLE_NORMAL | FT_STYLE_STRONG | FT_STYLE_OBLIQUE | FT_STYLE_UNDERLINE | FT_STYLE_WIDE; return style > max_style; } int _PGFT_BuildRenderMode(FreeTypeInstance *ft, pgFontObject *fontobj, FontRenderMode *mode, Scale_t face_size, int style, Angle_t rotation) { if (face_size.x == 0) { if (fontobj->face_size.x == 0) { PyErr_SetString(PyExc_ValueError, "No font point size specified" " and no default font size in typeface"); return -1; } face_size = fontobj->face_size; } mode->face_size = face_size; if (style == FT_STYLE_DEFAULT) { mode->style = fontobj->style; } else { if (_PGFT_CheckStyle((FT_UInt32)style)) { PyErr_SetString(PyExc_ValueError, "Invalid style value"); return -1; } mode->style = (FT_UInt16)style; } if ((mode->style & FT_STYLES_SCALABLE_ONLY) && !fontobj->is_scalable) { PyErr_SetString(PyExc_ValueError, "Unsupported style(s) for a bitmap font"); return -1; } mode->strength = DBL_TO_FX16(fontobj->strength); mode->underline_adjustment = DBL_TO_FX16(fontobj->underline_adjustment); mode->render_flags = fontobj->render_flags; mode->rotation_angle = rotation; mode->transform = fontobj->transform; if (mode->rotation_angle != 0) { if (!fontobj->is_scalable) { PyErr_SetString(PyExc_ValueError, "rotated text is unsupported for a bitmap font"); return -1; } if (mode->style & FT_STYLE_WIDE) { PyErr_SetString(PyExc_ValueError, "the wide style is unsupported for rotated text"); return -1; } if (mode->style & FT_STYLE_UNDERLINE) { PyErr_SetString( PyExc_ValueError, "the underline style is unsupported for rotated text"); return -1; } if (mode->render_flags & FT_RFLAG_PAD) { PyErr_SetString(PyExc_ValueError, "padding is unsupported for rotated text"); return -1; } } if (mode->render_flags & FT_RFLAG_VERTICAL) { if (mode->style & FT_STYLE_UNDERLINE) { PyErr_SetString( PyExc_ValueError, "the underline style is unsupported for vertical text"); return -1; } } if (mode->render_flags & FT_RFLAG_KERNING) { FT_Face font = _PGFT_GetFontSized(ft, fontobj, mode->face_size); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return -1; } if (!FT_HAS_KERNING(font)) { mode->render_flags &= ~FT_RFLAG_KERNING; } } return 0; } void _PGFT_GetRenderMetrics(const FontRenderMode *mode, Layout *text, unsigned *w, unsigned *h, FT_Vector *offset, FT_Pos *underline_top, FT_Fixed *underline_size) { FT_Pos min_x = text->min_x; FT_Pos max_x = text->max_x; FT_Pos min_y = text->min_y; FT_Pos max_y = text->max_y; *underline_top = 0; *underline_size = 0; if (mode->style & FT_STYLE_UNDERLINE) { FT_Fixed half_size = (text->underline_size + 1) / 2; FT_Fixed adjusted_pos; FT_Fixed uline_top; FT_Fixed uline_bottom; if (mode->underline_adjustment < 0) { adjusted_pos = FT_MulFix(text->ascender, mode->underline_adjustment); } else { adjusted_pos = FT_MulFix(text->underline_pos, mode->underline_adjustment); } uline_top = adjusted_pos - half_size; uline_bottom = uline_top + text->underline_size; if (uline_bottom > max_y) { max_y = uline_bottom; } if (uline_top < min_y) { min_y = uline_top; } *underline_size = text->underline_size; *underline_top = uline_top; } offset->x = -min_x; offset->y = -min_y; *w = (unsigned)FX6_TRUNC(FX6_CEIL(max_x) - FX6_FLOOR(min_x)); *h = (unsigned)FX6_TRUNC(FX6_CEIL(max_y) - FX6_FLOOR(min_y)); } /********************************************************* * * Rendering on SDL-specific surfaces * *********************************************************/ int _PGFT_Render_ExistingSurface(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PGFT_String *text, SDL_Surface *surface, int x, int y, FontColor *fgcolor, FontColor *bgcolor, SDL_Rect *r) { static const FontRenderPtr __SDLrenderFuncs[] = { 0, __render_glyph_RGB1, __render_glyph_RGB2, __render_glyph_RGB3, __render_glyph_RGB4}; static const FontRenderPtr __MONOrenderFuncs[] = { 0, __render_glyph_MONO1, __render_glyph_MONO2, __render_glyph_MONO3, __render_glyph_MONO4}; static const FontFillPtr __RGBfillFuncs[] = { 0, __fill_glyph_RGB1, __fill_glyph_RGB2, __fill_glyph_RGB3, __fill_glyph_RGB4}; int locked = 0; unsigned width; unsigned height; FT_Vector offset; FT_Vector surf_offset; FT_Pos underline_top; FT_Fixed underline_size; FontSurface font_surf; Layout *font_text; if (SDL_MUSTLOCK(surface)) { if (SDL_LockSurface(surface) == -1) { SDL_FreeSurface(surface); PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } locked = 1; } /* build font text */ font_text = _PGFT_LoadLayout(ft, fontobj, mode, text); if (!font_text) { if (locked) { SDL_UnlockSurface(surface); } return -1; } if (font_text->length == 0) { /* Nothing to rendering */ r->x = 0; r->y = 0; r->w = 0; r->h = (Uint16)_PGFT_Font_GetHeightSized(ft, fontobj, mode->face_size); return 0; } _PGFT_GetRenderMetrics(mode, font_text, &width, &height, &offset, &underline_top, &underline_size); if (width == 0 || height == 0) { /* Nothing more to do. */ if (locked) { SDL_UnlockSurface(surface); } r->x = 0; r->y = 0; r->w = 0; r->h = (Uint16)_PGFT_Font_GetHeightSized(ft, fontobj, mode->face_size); return 0; } surf_offset.x = INT_TO_FX6(x); surf_offset.y = INT_TO_FX6(y); if (mode->render_flags & FT_RFLAG_ORIGIN) { x -= FX6_TRUNC(FX6_CEIL(offset.x)); y -= FX6_TRUNC(FX6_CEIL(offset.y)); } else { surf_offset.x += offset.x; surf_offset.y += offset.y; } if (!surface->format->BytesPerPixel) { // This should never happen, error to make static analyzer happy PyErr_SetString(pgExc_SDLError, "Got surface of invalid format"); return -1; } /* * Setup target surface struct */ font_surf.buffer = surface->pixels; font_surf.width = surface->w; font_surf.height = surface->h; font_surf.pitch = surface->pitch; font_surf.format = surface->format; font_surf.render_gray = __SDLrenderFuncs[surface->format->BytesPerPixel]; font_surf.render_mono = __MONOrenderFuncs[surface->format->BytesPerPixel]; font_surf.fill = __RGBfillFuncs[surface->format->BytesPerPixel]; /* * if bg color exists, paint background */ if (bgcolor) { if (bgcolor->a == SDL_ALPHA_OPAQUE) { SDL_Rect bg_fill; FT_UInt32 fillcolor; fillcolor = SDL_MapRGBA(surface->format, bgcolor->r, bgcolor->g, bgcolor->b, bgcolor->a); bg_fill.x = (FT_Int16)x; bg_fill.y = (FT_Int16)y; bg_fill.w = (FT_UInt16)width; bg_fill.h = (FT_UInt16)height; SDL_FillRect(surface, &bg_fill, fillcolor); } else { font_surf.fill(INT_TO_FX6(x), INT_TO_FX6(y), INT_TO_FX6(width), INT_TO_FX6(height), &font_surf, bgcolor); } } /* * Render! */ render(ft, font_text, mode, fgcolor, &font_surf, width, height, &surf_offset, underline_top, underline_size); r->x = (Sint16)x; r->y = (Sint16)y; r->w = (Uint16)width; r->h = (Uint16)height; if (locked) { SDL_UnlockSurface(surface); } return 0; } SDL_Surface * _PGFT_Render_NewSurface(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PGFT_String *text, FontColor *fgcolor, FontColor *bgcolor, SDL_Rect *r) { FT_UInt32 rmask = 0; FT_UInt32 gmask = 0; FT_UInt32 bmask = 0; FT_UInt32 amask = 0; int locked = 0; SDL_Surface *surface = 0; int bits_per_pixel = (bgcolor || mode->render_flags & FT_RFLAG_ANTIALIAS) ? 32 : 8; FontSurface font_surf; Layout *font_text; unsigned width; unsigned height; FT_Vector offset; FT_Pos underline_top = 0; FT_Fixed underline_size = 0; FontColor mono_fgcolor = {0, 0, 0, 1}; /* build font text */ font_text = _PGFT_LoadLayout(ft, fontobj, mode, text); if (!font_text) { return 0; } if (font_text->length > 0) { _PGFT_GetRenderMetrics(mode, font_text, &width, &height, &offset, &underline_top, &underline_size); } else { width = 0; height = _PGFT_Font_GetHeightSized(ft, fontobj, mode->face_size); offset.x = -font_text->min_x; offset.y = -font_text->min_y; } if (bits_per_pixel == 32) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN rmask = 0xff000000; gmask = 0x00ff0000; bmask = 0x0000ff00; amask = 0x000000ff; #else rmask = 0x000000ff; gmask = 0x0000ff00; bmask = 0x00ff0000; amask = 0xff000000; #endif } surface = SDL_CreateRGBSurface(0, width, height, bits_per_pixel, rmask, gmask, bmask, amask); if (!surface) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return 0; } if (SDL_MUSTLOCK(surface)) { if (SDL_LockSurface(surface) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(surface); return 0; } locked = 1; } font_surf.buffer = surface->pixels; font_surf.width = surface->w; font_surf.height = surface->h; font_surf.pitch = surface->pitch; font_surf.format = surface->format; if (bits_per_pixel == 32) { FT_UInt32 fillcolor; font_surf.render_gray = __render_glyph_RGB4; font_surf.render_mono = __render_glyph_MONO4; font_surf.fill = __fill_glyph_RGB4; /* * Fill our texture with the required bg color */ if (bgcolor) { fillcolor = SDL_MapRGBA(surface->format, bgcolor->r, bgcolor->g, bgcolor->b, bgcolor->a); } else { fillcolor = SDL_MapRGBA(surface->format, 0, 0, 0, SDL_ALPHA_TRANSPARENT); } SDL_FillRect(surface, 0, fillcolor); } else { SDL_Palette *palette = surface->format->palette; SDL_Color colors[2]; if (!palette) { SDL_FreeSurface(surface); PyErr_NoMemory(); return 0; } colors[1].r = fgcolor->r; /* Foreground */ colors[1].g = fgcolor->g; colors[1].b = fgcolor->b; colors[1].a = SDL_ALPHA_OPAQUE; colors[0].r = ~colors[1].r; /* Background */ colors[0].g = ~colors[1].g; colors[0].b = ~colors[1].b; colors[0].a = SDL_ALPHA_OPAQUE; if (SDL_SetPaletteColors(palette, colors, 0, 2)) { PyErr_Format(PyExc_SystemError, "Pygame bug in _PGFT_Render_NewSurface: %.200s", SDL_GetError()); SDL_FreeSurface(surface); return 0; } SDL_SetColorKey(surface, SDL_TRUE, (FT_UInt32)0); if (fgcolor->a != SDL_ALPHA_OPAQUE) { SDL_SetSurfaceAlphaMod(surface, fgcolor->a); SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND); } fgcolor = &mono_fgcolor; font_surf.render_gray = __render_glyph_GRAY_as_MONO1; font_surf.render_mono = __render_glyph_MONO_as_GRAY1; font_surf.fill = __fill_glyph_GRAY1; /* * Fill our texture with the required bg color */ SDL_FillRect(surface, 0, 0); } /* * Render the text! */ render(ft, font_text, mode, fgcolor, &font_surf, width, height, &offset, underline_top, underline_size); r->x = -(Sint16)FX6_TRUNC(FX6_FLOOR(offset.x)); r->y = (Sint16)FX6_TRUNC(FX6_CEIL(offset.y)); r->w = (Uint16)width; r->h = (Uint16)height; if (locked) { SDL_UnlockSurface(surface); } return surface; } /********************************************************* * * Rendering on generic arrays * *********************************************************/ PyObject * _PGFT_Render_PixelArray(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PGFT_String *text, int invert, int *_width, int *_height) { FT_Byte *buffer = 0; PyObject *array = 0; FontSurface surf; Layout *font_text; unsigned width; unsigned height; FT_Vector offset; FT_Pos underline_top; FT_Fixed underline_size; int array_size; /* build font text */ font_text = _PGFT_LoadLayout(ft, fontobj, mode, text); if (!font_text) { return 0; } if (font_text->length == 0) { /* Nothing to render */ *_width = 0; *_height = _PGFT_Font_GetHeight(ft, fontobj); return PyBytes_FromStringAndSize("", 0); } _PGFT_GetRenderMetrics(mode, font_text, &width, &height, &offset, &underline_top, &underline_size); array_size = width * height; if (array_size == 0) { /* Empty array */ *_width = 0; *_height = height; return PyBytes_FromStringAndSize("", 0); } /* Create an uninitialized string whose buffer can be directly set. */ array = PyBytes_FromStringAndSize(0, array_size); if (!array) { return 0; } buffer = (FT_Byte *)PyBytes_AS_STRING(array); if (invert) { memset(buffer, SDL_ALPHA_OPAQUE, (size_t)array_size); } else { memset(buffer, SDL_ALPHA_TRANSPARENT, (size_t)array_size); } surf.buffer = buffer; surf.width = width; surf.height = height; surf.pitch = (int)surf.width; surf.format = 0; surf.render_gray = __render_glyph_GRAY1; surf.render_mono = __render_glyph_MONO_as_GRAY1; surf.fill = __fill_glyph_GRAY1; render(ft, font_text, mode, invert ? &mono_transparent : &mono_opaque, &surf, width, height, &offset, underline_top, underline_size); *_width = width; *_height = height; return array; } int _PGFT_Render_Array(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PyObject *arrayobj, PGFT_String *text, int invert, int x, int y, SDL_Rect *r) { pg_buffer pg_view; Py_buffer *view_p = (Py_buffer *)&pg_view; unsigned width; unsigned height; int itemsize; FT_Vector offset; FT_Vector array_offset; FT_Pos underline_top; FT_Fixed underline_size; FontSurface font_surf; SDL_PixelFormat format; Layout *font_text; /* Get target buffer */ if (pgObject_GetBuffer(arrayobj, &pg_view, PyBUF_RECORDS)) { return -1; } if (view_p->ndim != 2) { PyErr_Format(PyExc_ValueError, "expecting a 2d target array: got %id array instead", (int)view_p->ndim); pgBuffer_Release(&pg_view); return -1; } if (_validate_view_format(view_p->format)) { PyErr_Format(PyExc_ValueError, "Unsupported array item format '%s'", view_p->format); pgBuffer_Release(&pg_view); return -1; } width = (unsigned)view_p->shape[0]; height = (unsigned)view_p->shape[1]; itemsize = (unsigned)view_p->itemsize; /* build font text */ font_text = _PGFT_LoadLayout(ft, fontobj, mode, text); if (!font_text) { pgBuffer_Release(&pg_view); return -1; } /* if empty string, then nothing more to do */ if (font_text->length == 0) { pgBuffer_Release(&pg_view); r->x = 0; r->y = 0; r->w = 0; r->h = (Uint16)_PGFT_Font_GetHeightSized(ft, fontobj, mode->face_size); return 0; } _PGFT_GetRenderMetrics(mode, font_text, &width, &height, &offset, &underline_top, &underline_size); if (width == 0 || height == 0) { /* Nothing more to do. */ pgBuffer_Release(&pg_view); r->x = 0; r->y = 0; r->w = 0; r->h = (Uint16)_PGFT_Font_GetHeightSized(ft, fontobj, mode->face_size); return 0; } array_offset.x = INT_TO_FX6(x); array_offset.y = INT_TO_FX6(y); if (mode->render_flags & FT_RFLAG_ORIGIN) { x -= FX6_TRUNC(FX6_CEIL(offset.x)); y -= FX6_TRUNC(FX6_CEIL(offset.y)); } else { array_offset.x += offset.x; array_offset.y += offset.y; } /* * Setup target surface struct */ format.BytesPerPixel = itemsize; #if SDL_BYTEORDER == SDL_LIL_ENDIAN format.Ashift = _is_swapped(view_p) ? (itemsize - 1) * 8 : 0; #else format.Ashift = _is_swapped(view_p) ? 0 : (itemsize - 1) * 8; #endif font_surf.buffer = view_p->buf; font_surf.width = (unsigned)view_p->shape[0]; font_surf.height = (unsigned)view_p->shape[1]; font_surf.item_stride = (unsigned)view_p->strides[0]; font_surf.pitch = (unsigned)view_p->strides[1]; font_surf.format = &format; font_surf.render_gray = __render_glyph_INT; font_surf.render_mono = __render_glyph_MONO_as_INT; font_surf.fill = __fill_glyph_INT; render(ft, font_text, mode, invert ? &mono_transparent : &mono_opaque, &font_surf, width, height, &array_offset, underline_top, underline_size); pgBuffer_Release(&pg_view); r->x = -(Sint16)FX6_TRUNC(FX6_FLOOR(offset.x)); r->y = (Sint16)FX6_TRUNC(FX6_CEIL(offset.y)); r->w = (Uint16)width; r->h = (Uint16)height; return 0; } /********************************************************* * * New rendering algorithm (full thickness underlines) * *********************************************************/ static void render(FreeTypeInstance *ft, Layout *text, const FontRenderMode *mode, const FontColor *fg_color, FontSurface *surface, unsigned width, unsigned height, FT_Vector *offset, FT_Pos underline_top, FT_Fixed underline_size) { FT_Pos top; FT_Pos left; int x; int y; int n; int length = text->length; GlyphSlot *slots = text->glyphs; FT_BitmapGlyph image; FontRenderPtr render_gray = surface->render_gray; FontRenderPtr render_mono = surface->render_mono; int is_underline_gray = 0; if (length <= 0) { return; } left = offset->x; top = offset->y; for (n = 0; n < length; ++n) { image = slots[n].glyph->image; x = FX6_TRUNC(FX6_CEIL(left + slots[n].posn.x)); y = FX6_TRUNC(FX6_CEIL(top + slots[n].posn.y)); if (image->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY) { render_gray(x, y, surface, &(image->bitmap), fg_color); is_underline_gray = 1; } else { render_mono(x, y, surface, &(image->bitmap), fg_color); } } if (underline_size > 0) { if (is_underline_gray) { surface->fill(left + text->min_x, top + underline_top, INT_TO_FX6(width), underline_size, surface, fg_color); } else { surface->fill(FX6_CEIL(left + text->min_x), FX6_CEIL(top + underline_top), INT_TO_FX6(width), FX6_CEIL(underline_size), surface, fg_color); } } } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/freetype/ft_render_cb.c0000644000175100001770000011131614676242340020116 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #define NO_PYGAME_C_API #include "ft_wrap.h" #include FT_MODULE_H #include "ft_pixel.h" void __render_glyph_GRAY1(int x, int y, FontSurface *surface, const FT_Bitmap *bitmap, const FontColor *fg_color) { FT_Byte *dst = ((FT_Byte *)surface->buffer) + x + (y * surface->pitch); FT_Byte *dst_cpy; const FT_Byte *src = bitmap->buffer; const FT_Byte *src_cpy; FT_Byte src_byte; unsigned int j, i; #ifndef NDEBUG const FT_Byte *src_end = src + (bitmap->rows * bitmap->pitch); const FT_Byte *dst_end = ((FT_Byte *)surface->buffer + (surface->height * surface->pitch)); #endif assert(dst >= (FT_Byte *)surface->buffer && dst < dst_end); /* * Assumption, target buffer was filled with zeros before any rendering. */ for (j = 0; j < (unsigned int)bitmap->rows; ++j) { src_cpy = src; dst_cpy = dst; for (i = 0; i < (unsigned int)bitmap->width; ++i) { assert(src_cpy < src_end); src_byte = *src_cpy; if (src_byte) { assert(dst_cpy < dst_end); *dst_cpy = src_byte + *dst_cpy - src_byte * *dst_cpy / 255; } ++src_cpy; ++dst_cpy; } dst += surface->pitch; src += bitmap->pitch; } } void __render_glyph_MONO_as_GRAY1(int x, int y, FontSurface *surface, const FT_Bitmap *bitmap, const FontColor *fg_color) { const int off_x = (x < 0) ? -x : 0; const int off_y = (y < 0) ? -y : 0; const int max_x = MIN(x + (int)bitmap->width, (int)surface->width); const int max_y = MIN(y + (int)bitmap->rows, (int)surface->height); const int rx = MAX(0, x); const int ry = MAX(0, y); int i, j, shift; const unsigned char *src; unsigned char *dst; const unsigned char *src_cpy; unsigned char *dst_cpy; FT_UInt32 val; FT_Byte shade = fg_color->a; src = bitmap->buffer + (off_y * bitmap->pitch) + (off_x >> 3); dst = (unsigned char *)surface->buffer + rx + (ry * surface->pitch); shift = off_x & 7; for (j = ry; j < max_y; ++j) { src_cpy = src; dst_cpy = dst; val = (FT_UInt32)(*src_cpy++ | 0x100) << shift; for (i = rx; i < max_x; ++i, ++dst_cpy) { if (val & 0x10000) { val = (FT_UInt32)(*src_cpy++ | 0x100); } if (val & 0x80) { *dst_cpy = shade; } val <<= 1; } src += bitmap->pitch; dst += surface->pitch; } } void __render_glyph_GRAY_as_MONO1(int x, int y, FontSurface *surface, const FT_Bitmap *bitmap, const FontColor *fg_color) { FT_Byte *dst = ((FT_Byte *)surface->buffer) + x + (y * surface->pitch); FT_Byte *dst_cpy; FT_Byte shade = fg_color->a; const FT_Byte *src = bitmap->buffer; const FT_Byte *src_cpy; unsigned int j, i; /* * Assumption, target buffer was filled with the background color before * any rendering. */ for (j = 0; j < (unsigned int)bitmap->rows; ++j) { src_cpy = src; dst_cpy = dst; for (i = 0; i < (unsigned int)bitmap->width; ++i) { if (*src_cpy & '\200') /* Round up on 128 */ { *dst_cpy = shade; } ++src_cpy; ++dst_cpy; } dst += surface->pitch; src += bitmap->pitch; } } void __fill_glyph_GRAY1(FT_Fixed x, FT_Fixed y, FT_Fixed w, FT_Fixed h, FontSurface *surface, const FontColor *color) { int i, j; FT_Byte *dst; FT_Byte *dst_cpy; FT_Byte shade = color->a; FT_Byte edge_shade; #ifndef NDEBUG FT_Byte *dst_end = ((FT_Byte *)surface->buffer + (surface->height * surface->pitch)); #endif x = MAX(0, x); y = MAX(0, y); if (x + w > INT_TO_FX6(surface->width)) { w = INT_TO_FX6(surface->width) - x; } if (y + h > INT_TO_FX6(surface->height)) { h = INT_TO_FX6(surface->height) - y; } dst = ((FT_Byte *)surface->buffer + FX6_TRUNC(FX6_CEIL(x)) + FX6_TRUNC(FX6_CEIL(y)) * surface->pitch); if (y < FX6_CEIL(y)) { dst_cpy = dst - surface->pitch; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (FX6_CEIL(y) - y))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, ++dst_cpy) { assert(dst_cpy < dst_end); *dst_cpy = edge_shade; } } for (j = 0; j < FX6_TRUNC(FX6_FLOOR(h + y) - FX6_CEIL(y)); ++j) { dst_cpy = dst; for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, ++dst_cpy) { assert(dst_cpy < dst_end); *dst_cpy = shade; } dst += surface->pitch; } if (h > FX6_FLOOR(h + y) - y) { dst_cpy = dst; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (y + y - FX6_FLOOR(h + y)))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, ++dst_cpy) { assert(dst_cpy < dst_end); *dst_cpy = edge_shade; } } } void __render_glyph_INT(int x, int y, FontSurface *surface, const FT_Bitmap *bitmap, const FontColor *fg_color) { FT_Byte *dst = ((FT_Byte *)surface->buffer + x * surface->item_stride + y * surface->pitch); int item_size = surface->format->BytesPerPixel; int item_stride = surface->item_stride; FT_Byte *dst_cpy; const FT_Byte *src = bitmap->buffer; const FT_Byte *src_cpy; FT_Byte src_byte; FT_Byte mask = ~fg_color->a; unsigned int j, i; /* * Assumption, target buffer was filled with the background color before * any rendering. */ if (item_size == 1) { for (j = 0; j < (unsigned int)bitmap->rows; ++j) { src_cpy = src; dst_cpy = dst; for (i = 0; i < (unsigned int)bitmap->width; ++i) { src_byte = *src_cpy; if (src_byte) { *dst_cpy = ((src_byte + *dst_cpy - src_byte * *dst_cpy / 255) ^ mask); } ++src_cpy; dst_cpy += item_stride; } dst += surface->pitch; src += bitmap->pitch; } } else { FT_Byte dst_byte; int b, int_offset = surface->format->Ashift / 8; for (j = 0; j < (unsigned int)bitmap->rows; ++j) { src_cpy = src; dst_cpy = dst; for (i = 0; i < (unsigned int)bitmap->width; ++i) { dst_byte = dst_cpy[int_offset]; for (b = 0; b < item_size; ++b) { dst_cpy[b] = 0; } src_byte = *src_cpy; if (src_byte) { dst_cpy[int_offset] = ((src_byte + dst_byte - src_byte * dst_byte / 255) ^ mask); } ++src_cpy; dst_cpy += item_stride; } dst += surface->pitch; src += bitmap->pitch; } } } void __render_glyph_MONO_as_INT(int x, int y, FontSurface *surface, const FT_Bitmap *bitmap, const FontColor *fg_color) { const int off_x = (x < 0) ? -x : 0; const int off_y = (y < 0) ? -y : 0; const int max_x = MIN(x + (int)bitmap->width, (int)surface->width); const int max_y = MIN(y + (int)bitmap->rows, (int)surface->height); const int rx = MAX(0, x); const int ry = MAX(0, y); int i, j, shift; int item_stride = surface->item_stride; int item_size = surface->format->BytesPerPixel; unsigned char *src; unsigned char *dst; unsigned char *src_cpy; unsigned char *dst_cpy; FT_UInt32 val; FT_Byte shade = fg_color->a; /* * Assumption, target buffer was filled with the background color before * any rendering. */ src = bitmap->buffer + (off_y * bitmap->pitch) + (off_x >> 3); dst = ((unsigned char *)surface->buffer + rx * surface->item_stride + ry * surface->pitch); shift = off_x & 7; if (item_size == 1) { /* Slightly optimized loop for 1 byte target int */ for (j = ry; j < max_y; ++j) { src_cpy = src; dst_cpy = dst; val = (FT_UInt32)(*src_cpy++ | 0x100) << shift; for (i = rx; i < max_x; ++i, dst_cpy += item_stride) { if (val & 0x10000) { val = (FT_UInt32)(*src_cpy++ | 0x100); } if (val & 0x80) { *dst_cpy = shade; } val <<= 1; } src += bitmap->pitch; dst += surface->pitch; } } else { /* Generic copy for arbitrary target int size */ int b, int_offset = surface->format->Ashift / 8; for (j = ry; j < max_y; ++j) { src_cpy = src; dst_cpy = dst; val = (FT_UInt32)(*src_cpy++ | 0x100) << shift; for (i = rx; i < max_x; ++i, dst_cpy += item_stride) { for (b = 0; b < item_size; ++b) { dst_cpy[b] = 0; } if (val & 0x10000) { val = (FT_UInt32)(*src_cpy++ | 0x100); } if (val & 0x80) { dst_cpy[int_offset] = shade; } val <<= 1; } src += bitmap->pitch; dst += surface->pitch; } } } void __fill_glyph_INT(FT_Fixed x, FT_Fixed y, FT_Fixed w, FT_Fixed h, FontSurface *surface, const FontColor *color) { int i, j; FT_Byte *dst; int itemsize = surface->format->BytesPerPixel; int item_stride = surface->item_stride; int byteoffset = surface->format->Ashift / 8; FT_Byte *dst_cpy; FT_Byte shade = color->a; FT_Byte edge_shade; x = MAX(0, x); y = MAX(0, y); if (x + w > INT_TO_FX6(surface->width)) { w = INT_TO_FX6(surface->width) - x; } if (y + h > INT_TO_FX6(surface->height)) { h = INT_TO_FX6(surface->height) - y; } dst = ((FT_Byte *)surface->buffer + FX6_TRUNC(FX6_CEIL(x)) * itemsize + FX6_TRUNC(FX6_CEIL(y)) * surface->pitch); if (itemsize == 1) { if (y < FX6_CEIL(y)) { dst_cpy = dst - surface->pitch; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (FX6_CEIL(y) - y))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { *dst_cpy = edge_shade; } } for (j = 0; j < FX6_TRUNC(FX6_FLOOR(h + y) - FX6_CEIL(y)); ++j) { dst_cpy = dst; for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { *dst_cpy = shade; } dst += surface->pitch; } if (h > FX6_FLOOR(h + y) - y) { dst_cpy = dst; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (y + y - FX6_FLOOR(h + y)))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { *dst_cpy = edge_shade; } } } else { int b; if (y < FX6_CEIL(y)) { dst_cpy = dst - surface->pitch; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (FX6_CEIL(y) - y))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { for (b = 0; b < itemsize; ++b) { dst_cpy[b] = 0; } dst_cpy[byteoffset] = edge_shade; } } for (j = 0; j < FX6_TRUNC(FX6_FLOOR(h + y) - FX6_CEIL(y)); ++j) { dst_cpy = dst; for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { for (b = 0; b < itemsize; ++b) { dst_cpy[b] = 0; } dst_cpy[byteoffset] = shade; } dst += surface->pitch; } if (h > FX6_FLOOR(h + y) - y) { dst_cpy = dst; edge_shade = FX6_TRUNC(FX6_ROUND(shade * (h + y - FX6_FLOOR(h + y)))); for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, dst_cpy += item_stride) { for (b = 0; b < itemsize; ++b) { dst_cpy[b] = 0; } dst_cpy[byteoffset] = edge_shade; } } } } #ifndef NDEBUG #define POINTER_ASSERT_DECLARATIONS(s) \ const unsigned char *PA_bstart = ((unsigned char *)(s)->buffer); \ const unsigned char *PA_bend = (PA_bstart + (s)->height * (s)->pitch); #define POINTER_ASSERT(p) \ assert((const unsigned char *)(p) >= PA_bstart); \ assert((const unsigned char *)(p) < PA_bend); #else #define POINTER_ASSERT_DECLARATIONS(s) #define POINTER_ASSERT(p) #endif #define _CREATE_RGB_FILLER(_bpp, _getp, _setp, _blendp) \ void __fill_glyph_RGB##_bpp(FT_Fixed x, FT_Fixed y, FT_Fixed w, \ FT_Fixed h, FontSurface *surface, \ const FontColor *color) \ { \ FT_Fixed dh = 0; \ int i; \ unsigned char *dst; \ FT_UInt32 bgR, bgG, bgB, bgA; \ FT_Byte edge_a; \ POINTER_ASSERT_DECLARATIONS(surface) \ \ /* Crop the rectangle to the top and left of the \ * surface. \ */ \ x = MAX(0, x); \ y = MAX(0, y); \ \ /* Crop the rectangle to the bottom and right of \ * the surface. \ */ \ if (x + w > INT_TO_FX6(surface->width)) { \ w = INT_TO_FX6(surface->width) - x; \ } \ if (y + h > INT_TO_FX6(surface->height)) { \ h = INT_TO_FX6(surface->height) - y; \ } \ \ /* Start at the first pixel of the first row. \ */ \ dst = ((FT_Byte *)surface->buffer + FX6_TRUNC(FX6_CEIL(x)) * _bpp + \ FX6_TRUNC(FX6_CEIL(y)) * surface->pitch); \ \ /* Take care of the top row of the rectangle if the \ * rectangle starts within the pixels: y is not on \ * a pixel boundary. A special case is when the \ * bottom of the rectangle is also with the pixel \ * row. \ */ \ dh = FX6_CEIL(y) - y; \ if (dh > h) { \ dh = h; \ } \ h -= dh; \ if (dh > 0) { \ unsigned char *_dst = dst - surface->pitch; \ \ edge_a = FX6_TRUNC(FX6_ROUND(color->a * dh)); \ \ for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, _dst += _bpp) { \ FT_UInt32 pixel = (FT_UInt32)_getp; \ \ POINTER_ASSERT(_dst) \ \ if (_bpp == 1) { \ GET_PALETTE_VALS(pixel, surface->format, bgR, bgG, bgB, \ bgA); \ } \ else { \ GET_RGB_VALS(pixel, surface->format, bgR, bgG, bgB, bgA); \ } \ \ ALPHA_BLEND(color->r, color->g, color->b, edge_a, bgR, bgG, \ bgB, bgA); \ \ _blendp; \ } \ \ y += dh; \ } \ \ /* Fill in all entirely covered rows. These are \ * pixels which are entirely within the upper and \ * lower edges of the rectangle. \ */ \ dh = FX6_FLOOR(h); \ h -= dh; \ while (dh > 0) { \ unsigned char *_dst = dst; \ \ for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, _dst += _bpp) { \ FT_UInt32 pixel = (FT_UInt32)_getp; \ \ POINTER_ASSERT(_dst) \ \ if (_bpp == 1) { \ GET_PALETTE_VALS(pixel, surface->format, bgR, bgG, bgB, \ bgA); \ } \ else { \ GET_RGB_VALS(pixel, surface->format, bgR, bgG, bgB, bgA); \ } \ \ ALPHA_BLEND(color->r, color->g, color->b, color->a, bgR, bgG, \ bgB, bgA); \ \ _blendp; \ } \ \ dst += surface->pitch; \ dh -= FX6_ONE; \ y += FX6_ONE; \ } \ \ /* Fill in the bottom row of pixels if these pixels \ * are only partially covered: the rectangle bottom \ * is not on a pixel boundary. Otherwise, done. \ */ \ if (h > 0) { \ unsigned char *_dst = dst; \ edge_a = FX6_TRUNC(FX6_ROUND(color->a * h)); \ \ for (i = 0; i < FX6_TRUNC(FX6_CEIL(w)); ++i, _dst += _bpp) { \ FT_UInt32 pixel = (FT_UInt32)_getp; \ \ POINTER_ASSERT(_dst) \ \ if (_bpp == 1) { \ GET_PALETTE_VALS(pixel, surface->format, bgR, bgG, bgB, \ bgA); \ } \ else { \ GET_RGB_VALS(pixel, surface->format, bgR, bgG, bgB, bgA); \ } \ \ ALPHA_BLEND(color->r, color->g, color->b, edge_a, bgR, bgG, \ bgB, bgA); \ \ _blendp; \ } \ } \ } #define __MONO_RENDER_INNER_LOOP(_bpp, _code) \ for (j = ry; j < max_y; ++j) { \ const unsigned char *_src = src; \ unsigned char *_dst = dst; \ FT_UInt32 val = (FT_UInt32)(*_src++ | 0x100) << shift; \ \ for (i = rx; i < max_x; ++i, _dst += _bpp) { \ if (val & 0x10000) { \ val = (FT_UInt32)(*_src++ | 0x100); \ } \ if (val & 0x80) { \ _code; \ } \ val <<= 1; \ } \ \ src += bitmap->pitch; \ dst += surface->pitch; \ } #define _CREATE_MONO_RENDER(_bpp, _getp, _setp, _blendp) \ void __render_glyph_MONO##_bpp(int x, int y, FontSurface *surface, \ const FT_Bitmap *bitmap, \ const FontColor *color) \ { \ const int off_x = (x < 0) ? -x : 0; \ const int off_y = (y < 0) ? -y : 0; \ \ const int max_x = MIN(x + (int)bitmap->width, (int)surface->width); \ const int max_y = MIN(y + (int)bitmap->rows, (int)surface->height); \ \ const int rx = MAX(0, x); \ const int ry = MAX(0, y); \ \ int i, j, shift; \ const unsigned char *src; \ unsigned char *dst; \ FT_UInt32 full_color; \ FT_UInt32 bgR, bgG, bgB, bgA; \ \ src = bitmap->buffer + (off_y * bitmap->pitch) + (off_x >> 3); \ dst = (unsigned char *)surface->buffer + (rx * _bpp) + \ (ry * surface->pitch); \ \ full_color = SDL_MapRGBA(surface->format, (FT_Byte)color->r, \ (FT_Byte)color->g, (FT_Byte)color->b, 255); \ \ shift = off_x & 7; \ (void)full_color; \ if (color->a == 0xFF) { \ __MONO_RENDER_INNER_LOOP(_bpp, { _setp; }); \ } \ else if (color->a > 0) { \ __MONO_RENDER_INNER_LOOP(_bpp, { \ FT_UInt32 pixel = (FT_UInt32)_getp; \ \ if (_bpp == 1) { \ GET_PALETTE_VALS(pixel, surface->format, bgR, bgG, bgB, \ bgA); \ } \ else { \ GET_RGB_VALS(pixel, surface->format, bgR, bgG, bgB, bgA); \ } \ \ ALPHA_BLEND(color->r, color->g, color->b, color->a, bgR, bgG, \ bgB, bgA); \ \ _blendp; \ }); \ } \ } #define _CREATE_RGB_RENDER(_bpp, _getp, _setp, _blendp) \ void __render_glyph_RGB##_bpp(int x, int y, FontSurface *surface, \ const FT_Bitmap *bitmap, \ const FontColor *color) \ { \ const int off_x = (x < 0) ? -x : 0; \ const int off_y = (y < 0) ? -y : 0; \ \ const int max_x = MIN(x + (int)bitmap->width, (int)surface->width); \ const int max_y = MIN(y + (int)bitmap->rows, (int)surface->height); \ \ const int rx = MAX(0, x); \ const int ry = MAX(0, y); \ \ FT_Byte *dst = ((FT_Byte *)surface->buffer) + (rx * _bpp) + \ (ry * surface->pitch); \ FT_Byte *_dst; \ \ const FT_Byte *src = \ bitmap->buffer + off_x + (off_y * bitmap->pitch); \ const FT_Byte *_src; \ \ _DECLARE_full_color##_bpp( \ surface, \ color) /* \ const FT_UInt32 full_color = \ SDL_MapRGBA(surface->format, (FT_Byte)color->r, \ (FT_Byte)color->g, (FT_Byte)color->b, 255); \ */ \ \ FT_UInt32 bgR, \ bgG, bgB, bgA; \ int j, i; \ \ for (j = ry; j < max_y; ++j) { \ _src = src; \ _dst = dst; \ \ for (i = rx; i < max_x; ++i, _dst += _bpp) { \ FT_UInt32 alpha = (*_src++); \ alpha = (alpha * color->a) / 255; \ \ if (alpha == 0xFF) { \ _setp; \ } \ else if (alpha > 0) { \ FT_UInt32 pixel = (FT_UInt32)_getp; \ \ if (_bpp == 1) { \ GET_PALETTE_VALS(pixel, surface->format, bgR, bgG, \ bgB, bgA); \ } \ else { \ GET_RGB_VALS(pixel, surface->format, bgR, bgG, bgB, \ bgA); \ } \ \ ALPHA_BLEND(color->r, color->g, color->b, alpha, bgR, \ bgG, bgB, bgA); \ \ _blendp; \ } \ } \ \ dst += surface->pitch; \ src += bitmap->pitch; \ } \ } /* These macros removes a gcc unused variable warning for __render_glyph_RGB3 */ #define _DECLARE_full_color(s, c) \ const FT_UInt32 full_color = SDL_MapRGBA( \ (s)->format, (FT_Byte)(c)->r, (FT_Byte)(c)->g, (FT_Byte)(c)->b, 255); #define _DECLARE_full_color1(s, c) _DECLARE_full_color(s, c) #define _DECLARE_full_color2(s, c) _DECLARE_full_color(s, c) #define _DECLARE_full_color3(s, c) #define _DECLARE_full_color4(s, c) _DECLARE_full_color(s, c) #define _SET_PIXEL_24 \ SET_PIXEL24_RGB(_dst, surface->format, color->r, color->g, color->b); #define _BLEND_PIXEL_24 SET_PIXEL24_RGB(_dst, surface->format, bgR, bgG, bgB); #define _SET_PIXEL(T) *(T *)_dst = (T)full_color; #define _BLEND_PIXEL(T) \ *((T *)_dst) = \ (T)(((bgR >> surface->format->Rloss) << surface->format->Rshift) | \ ((bgG >> surface->format->Gloss) << surface->format->Gshift) | \ ((bgB >> surface->format->Bloss) << surface->format->Bshift) | \ ((bgA >> surface->format->Aloss) << surface->format->Ashift & \ surface->format->Amask)) #define _BLEND_PIXEL_GENERIC(T) \ *(T *)_dst = (T)(SDL_MapRGB(surface->format, (FT_Byte)bgR, (FT_Byte)bgG, \ (FT_Byte)bgB)) #define _GET_PIXEL(T) (*((T *)_dst)) _CREATE_RGB_RENDER(4, _GET_PIXEL(FT_UInt32), _SET_PIXEL(FT_UInt32), _BLEND_PIXEL(FT_UInt32)) _CREATE_RGB_RENDER(3, GET_PIXEL24(_dst), _SET_PIXEL_24, _BLEND_PIXEL_24) _CREATE_RGB_RENDER(2, _GET_PIXEL(FT_UInt16), _SET_PIXEL(FT_UInt16), _BLEND_PIXEL(FT_UInt16)) _CREATE_RGB_RENDER(1, _GET_PIXEL(FT_Byte), _SET_PIXEL(FT_Byte), _BLEND_PIXEL_GENERIC(FT_Byte)) _CREATE_MONO_RENDER(4, _GET_PIXEL(FT_UInt32), _SET_PIXEL(FT_UInt32), _BLEND_PIXEL(FT_UInt32)) _CREATE_MONO_RENDER(3, GET_PIXEL24(_dst), _SET_PIXEL_24, _BLEND_PIXEL_24) _CREATE_MONO_RENDER(2, _GET_PIXEL(FT_UInt16), _SET_PIXEL(FT_UInt16), _BLEND_PIXEL(FT_UInt16)) _CREATE_MONO_RENDER(1, _GET_PIXEL(FT_Byte), _SET_PIXEL(FT_Byte), _BLEND_PIXEL_GENERIC(FT_Byte)) _CREATE_RGB_FILLER(4, _GET_PIXEL(FT_UInt32), _SET_PIXEL(FT_UInt32), _BLEND_PIXEL(FT_UInt32)) _CREATE_RGB_FILLER(3, GET_PIXEL24(_dst), _SET_PIXEL_24, _BLEND_PIXEL_24) _CREATE_RGB_FILLER(2, _GET_PIXEL(FT_UInt16), _SET_PIXEL(FT_UInt16), _BLEND_PIXEL(FT_UInt16)) _CREATE_RGB_FILLER(1, _GET_PIXEL(FT_Byte), _SET_PIXEL(FT_Byte), _BLEND_PIXEL_GENERIC(FT_Byte)) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/freetype/ft_unicode.c0000644000175100001770000001277114676242340017626 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Pythons encoding is not quite what we want. Python UTF-16 and 32 encodings * pass through surrogate area codes untouched, and unchecked. So if one must * do ones own UTF-16 surrogate pair checking then one might as well perform * the entire translation. */ #define PYGAME_FREETYPE_INTERNAL #define NO_PYGAME_C_API #include "ft_wrap.h" #define SIZEOF_PGFT_STRING(len) \ (sizeof(PGFT_String) + (Py_ssize_t)(len) * sizeof(PGFT_char)) static const PGFT_char UNICODE_HSA_START = 0xD800; static const PGFT_char UNICODE_HSA_END = 0xDBFF; static const PGFT_char UNICODE_LSA_START = 0xDC00; static const PGFT_char UNICODE_LSA_END = 0xDFFF; static const PGFT_char UNICODE_SA_START = 0xD800; static const PGFT_char UNICODE_SA_END = 0xDFFF; static void raise_unicode_error(const char *codec, PyObject *unistr, Py_ssize_t start, Py_ssize_t end, const char *reason) { PyObject *e = PyObject_CallFunction(PyExc_UnicodeEncodeError, "sSkks", codec, unistr, (unsigned long)start, (unsigned long)end, reason); if (!e) return; Py_INCREF(PyExc_UnicodeEncodeError); PyErr_Restore(PyExc_UnicodeEncodeError, e, 0); } /* Helper for _PGFT_EncodePyString to handle PyUnicode object */ static PGFT_String * _encode_unicode_string(PyObject *obj, int ucs4) { PGFT_String *utf32_buffer = NULL; PGFT_char *dst; Py_ssize_t len, srclen; PGFT_char c; int i, j; /* This Py_UCS4 src has to be freed later */ Py_UCS4 *src = PyUnicode_AsUCS4Copy(obj); if (!src) return NULL; len = srclen = PyUnicode_GetLength(obj); if (!ucs4) { /* Do UTF-16 surrogate pair decoding. Calculate character count * and raise an exception on a malformed surrogate pair. */ for (i = 0; i < srclen; ++i) { c = (PGFT_char)src[i]; if (c >= UNICODE_SA_START && c <= UNICODE_SA_END) { if (c > UNICODE_HSA_END) { raise_unicode_error("utf-32", obj, i, i + 1, "missing high-surrogate code point"); goto end; } if (++i == srclen) { raise_unicode_error("utf-32", obj, i - 1, i, "missing low-surrogate code point"); goto end; } c = (PGFT_char)src[i]; if (c < UNICODE_LSA_START || c > UNICODE_LSA_END) { raise_unicode_error("utf-32", obj, i, i + 1, "expected low-surrogate code point"); goto end; } --len; } } } utf32_buffer = (PGFT_String *)_PGFT_malloc(SIZEOF_PGFT_STRING(len)); if (!utf32_buffer) { PyErr_NoMemory(); goto end; } dst = utf32_buffer->data; if (!ucs4) { for (i = 0, j = 0; i < srclen; ++i, ++j) { c = (PGFT_char)src[i]; if (c >= UNICODE_HSA_START && c <= UNICODE_HSA_END) { c = ((c & 0x3FF) << 10 | (PGFT_char)(src[++i] & 0x3FF)) + 0x10000U; } dst[j] = c; } } else { for (i = 0; i < srclen; ++i) { dst[i] = (PGFT_char)src[i]; } } end: PyMem_Free(src); if (utf32_buffer) { utf32_buffer->data[len] = 0; utf32_buffer->length = len; } return utf32_buffer; } /* Helper for _PGFT_EncodePyString to handle Bytes object */ static PGFT_String * _encode_bytes_string(PyObject *obj) { /* * For bytes objects, assume the bytes are * Latin1 text (who would manually enter bytes as * UTF8 anyway?), so manually copy the raw contents * of the object expanding each byte to 32 bits. */ PGFT_String *utf32_buffer; PGFT_char *dst; Py_ssize_t len; int i; char *src; PyBytes_AsStringAndSize(obj, &src, &len); utf32_buffer = (PGFT_String *)_PGFT_malloc(SIZEOF_PGFT_STRING(len)); if (!utf32_buffer) { PyErr_NoMemory(); return NULL; } dst = utf32_buffer->data; for (i = 0; i < len; ++i) { dst[i] = (PGFT_char)(src[i]); } utf32_buffer->data[len] = 0; utf32_buffer->length = len; return utf32_buffer; } PGFT_String * _PGFT_EncodePyString(PyObject *obj, int ucs4) { if (PyUnicode_Check(obj)) return _encode_unicode_string(obj, ucs4); else if (PyBytes_Check(obj)) return _encode_bytes_string(obj); else PyErr_Format(PyExc_TypeError, "Expected a Unicode or LATIN1 (bytes) string for text:" " got type %.1024s", Py_TYPE(obj)->tp_name); return NULL; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/freetype/ft_wrap.c0000644000175100001770000003671214676242340017152 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAME_FREETYPE_INTERNAL #include "../pygame.h" #include "ft_wrap.h" #include FT_MODULE_H static unsigned long RWops_read(FT_Stream, unsigned long, unsigned char *, unsigned long); static int ft_wrap_init(FreeTypeInstance *, pgFontObject *); static void ft_wrap_quit(pgFontObject *); /********************************************************* * * Error management * *********************************************************/ void _PGFT_SetError(FreeTypeInstance *ft, const char *error_msg, FT_Error error_id){ #undef __FTERRORS_H__ #define FT_ERRORDEF(e, v, s) {e, s}, #define FT_ERROR_START_LIST { #define FT_ERROR_END_LIST \ { \ 0, 0 \ } \ } \ ; static const struct {int err_code; const char *err_msg; } ft_errors[] = #include FT_ERRORS_H const int maxlen = (int)(sizeof(ft->_error_msg)) - 1; int i; const char *ft_msg; ft_msg = 0; for (i = 0; ft_errors[i].err_msg; ++i) { if (error_id == ft_errors[i].err_code) { ft_msg = ft_errors[i].err_msg; break; } } if (error_id && ft_msg) { int ret = PyOS_snprintf(ft->_error_msg, sizeof(ft->_error_msg), "%.*s: %s", maxlen - 3, error_msg, ft_msg); if (ret >= 0) { /* return after successfully copying full or truncated error. * If ret < 0, PyOS_snprintf failed so try to strncpy error * message */ return; } } strncpy(ft->_error_msg, error_msg, maxlen); ft->_error_msg[maxlen] = '\0'; /* in case of message truncation */ } const char * _PGFT_GetError(FreeTypeInstance *ft) { return ft->_error_msg; } /********************************************************* * * Misc getters * *********************************************************/ int _PGFT_Font_IsFixedWidth(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return -1; } return FT_IS_FIXED_WIDTH(font) ? 1 : 0; } int _PGFT_Font_NumFixedSizes(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return -1; } return FT_HAS_FIXED_SIZES(font) ? font->num_fixed_sizes : 0; } int _PGFT_Font_GetAvailableSize(FreeTypeInstance *ft, pgFontObject *fontobj, long n, long *size_p, long *height_p, long *width_p, double *x_ppem_p, double *y_ppem_p) { FT_Face font = _PGFT_GetFont(ft, fontobj); FT_Bitmap_Size *bitmap_size_p; if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return -1; } if (!FT_HAS_FIXED_SIZES(font) || n > font->num_fixed_sizes) /* cond. or */ { return 0; } bitmap_size_p = font->available_sizes + n; *size_p = (long)FX6_TRUNC(FX6_ROUND(bitmap_size_p->size)); *height_p = (long)bitmap_size_p->height; *width_p = (long)bitmap_size_p->width; *x_ppem_p = FX6_TO_DBL(bitmap_size_p->x_ppem); *y_ppem_p = FX6_TO_DBL(bitmap_size_p->y_ppem); return 1; } const char * _PGFT_Font_GetName(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font; font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return font->family_name ? font->family_name : ""; } /* All the font metric functions raise an exception and return 0 on an error. * It is up to the caller to check PyErr_Occurred for a 0 return value. */ long _PGFT_Font_GetHeight(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)font->height; } long _PGFT_Font_GetHeightSized(FreeTypeInstance *ft, pgFontObject *fontobj, Scale_t face_size) { FT_Face font = _PGFT_GetFontSized(ft, fontobj, face_size); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)FX6_TRUNC(FX6_CEIL(font->size->metrics.height)); } long _PGFT_Font_GetAscender(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)font->ascender; } long _PGFT_Font_GetAscenderSized(FreeTypeInstance *ft, pgFontObject *fontobj, Scale_t face_size) { FT_Face font = _PGFT_GetFontSized(ft, fontobj, face_size); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)FX6_TRUNC(FX6_CEIL(font->size->metrics.ascender)); } long _PGFT_Font_GetDescender(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)font->descender; } long _PGFT_Font_GetDescenderSized(FreeTypeInstance *ft, pgFontObject *fontobj, Scale_t face_size) { FT_Face font = _PGFT_GetFontSized(ft, fontobj, face_size); if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } return (long)FX6_TRUNC(FX6_FLOOR(font->size->metrics.descender)); } long _PGFT_Font_GetGlyphHeightSized(FreeTypeInstance *ft, pgFontObject *fontobj, Scale_t face_size) { /* * Based on the SDL_ttf height calculation. */ FT_Face font = _PGFT_GetFontSized(ft, fontobj, face_size); FT_Size_Metrics *metrics; if (!font) { PyErr_SetString(pgExc_SDLError, _PGFT_GetError(ft)); return 0; } metrics = &font->size->metrics; return (long)FX6_TRUNC(FX6_CEIL(metrics->ascender) - FX6_FLOOR(metrics->descender)) + /* baseline */ 1; } int _PGFT_GetTextRect(FreeTypeInstance *ft, pgFontObject *fontobj, const FontRenderMode *mode, PGFT_String *text, SDL_Rect *r) { Layout *font_text; unsigned width; unsigned height; FT_Vector offset; FT_Pos underline_top; FT_Fixed underline_size; font_text = _PGFT_LoadLayout(ft, fontobj, mode, text); if (!font_text) goto error; _PGFT_GetRenderMetrics(mode, font_text, &width, &height, &offset, &underline_top, &underline_size); r->x = -(Sint16)FX6_TRUNC(FX6_FLOOR(offset.x)); r->y = (Sint16)FX6_TRUNC(FX6_CEIL(offset.y)); r->w = (Uint16)width; r->h = (Uint16)height; return 0; error: return -1; } /********************************************************* * * Font access * *********************************************************/ FT_Face _PGFT_GetFontSized(FreeTypeInstance *ft, pgFontObject *fontobj, Scale_t face_size) { FT_Error error; FTC_ScalerRec scale; FT_Size _fts; FT_Face font; if (!fontobj->is_scalable && !face_size.y) { FT_Int i; FT_Pos size; font = _PGFT_GetFont(ft, fontobj); if (!font) { return 0; } size = FX6_ROUND(face_size.x); for (i = 0; i < font->num_fixed_sizes; ++i) { if (size == FX6_ROUND(font->available_sizes[i].size)) { face_size.x = font->available_sizes[i].x_ppem; face_size.y = font->available_sizes[i].y_ppem; break; } } } _PGFT_BuildScaler(fontobj, &scale, face_size); error = FTC_Manager_LookupSize(ft->cache_manager, &scale, &_fts); if (error) { _PGFT_SetError(ft, "Failed to resize font", error); return 0; } return _fts->face; } FT_Face _PGFT_GetFont(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Error error; FT_Face font; error = FTC_Manager_LookupFace(ft->cache_manager, (FTC_FaceID)(&fontobj->id), &font); if (error) { _PGFT_SetError(ft, "Failed to load font", error); return 0; } return font; } /********************************************************* * * Scaling * *********************************************************/ void _PGFT_BuildScaler(pgFontObject *fontobj, FTC_Scaler scale, Scale_t face_size) { scale->face_id = (FTC_FaceID)(&fontobj->id); scale->width = face_size.x; scale->height = face_size.y ? face_size.y : face_size.x; scale->pixel = 0; scale->x_res = scale->y_res = fontobj->resolution; } /********************************************************* * * Font loading * * TODO: * - Loading from rwops, existing files, etc * *********************************************************/ static FT_Error _PGFT_font_request(FTC_FaceID font_id, FT_Library library, FT_Pointer request_data, FT_Face *afont) { pgFontId *id = (pgFontId *)font_id; FT_Error error; Py_BEGIN_ALLOW_THREADS; error = FT_Open_Face(library, &id->open_args, id->font_index, afont); Py_END_ALLOW_THREADS; return error; } static int ft_wrap_init(FreeTypeInstance *ft, pgFontObject *fontobj) { FT_Face font; fontobj->_internals = 0; font = _PGFT_GetFont(ft, fontobj); if (!font) { PyErr_SetString(PyExc_FileNotFoundError, _PGFT_GetError(ft)); return -1; } fontobj->is_scalable = FT_IS_SCALABLE(font) ? ~0 : 0; fontobj->_internals = _PGFT_malloc(sizeof(FontInternals)); if (!fontobj->_internals) { PyErr_NoMemory(); return -1; } memset(fontobj->_internals, 0x0, sizeof(FontInternals)); if (_PGFT_LayoutInit(ft, fontobj)) { _PGFT_free(fontobj->_internals); fontobj->_internals = 0; return -1; } return 0; } static void ft_wrap_quit(pgFontObject *fontobj) { if (fontobj->_internals) { _PGFT_LayoutFree(fontobj); _PGFT_free(fontobj->_internals); fontobj->_internals = 0; } } int _PGFT_TryLoadFont_Filename(FreeTypeInstance *ft, pgFontObject *fontobj, const char *filename, long font_index) { char *filename_alloc; size_t file_len; /* There seems to be an intermittent crash with opening a missing file and freetype 2.11.1 on mac homebrew. python3 test/ftfont_test.py -k test_font_file_not_found So instead we look for a missing file with SDL_RWFromFile first. */ SDL_RWops *sdlfile = SDL_RWFromFile(filename, "rb"); if (!sdlfile) { PyErr_Format(PyExc_FileNotFoundError, "No such file or directory: '%s'.", filename); return -1; } SDL_RWclose(sdlfile); file_len = strlen(filename); filename_alloc = _PGFT_malloc(file_len + 1); if (!filename_alloc) { PyErr_NoMemory(); return -1; } strcpy(filename_alloc, filename); filename_alloc[file_len] = 0; fontobj->id.font_index = (FT_Long)font_index; fontobj->id.open_args.flags = FT_OPEN_PATHNAME; fontobj->id.open_args.pathname = filename_alloc; return ft_wrap_init(ft, fontobj); } static unsigned long RWops_read(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count) { SDL_RWops *src; src = (SDL_RWops *)stream->descriptor.pointer; SDL_RWseek(src, (int)offset, SEEK_SET); if (count == 0) return 0; return (unsigned long)SDL_RWread(src, buffer, 1, (int)count); } int _PGFT_TryLoadFont_RWops(FreeTypeInstance *ft, pgFontObject *fontobj, SDL_RWops *src, long font_index) { FT_Stream stream; Sint64 position; position = SDL_RWtell(src); if (position < 0) { PyErr_SetString(pgExc_SDLError, "Failed to seek in font stream"); return -1; } stream = _PGFT_malloc(sizeof(*stream)); if (!stream) { PyErr_NoMemory(); return -1; } memset(stream, 0, sizeof(*stream)); stream->read = RWops_read; stream->descriptor.pointer = src; stream->pos = (unsigned long)position; stream->size = (unsigned long)(SDL_RWsize(src)); fontobj->id.font_index = (FT_Long)font_index; fontobj->id.open_args.flags = FT_OPEN_STREAM; fontobj->id.open_args.stream = stream; return ft_wrap_init(ft, fontobj); } SDL_RWops * _PGFT_GetRWops(pgFontObject *fontobj) { if (fontobj->id.open_args.flags == FT_OPEN_STREAM) return fontobj->id.open_args.stream->descriptor.pointer; return NULL; } void _PGFT_UnloadFont(FreeTypeInstance *ft, pgFontObject *fontobj) { if (fontobj->id.open_args.flags == 0) return; if (ft) { FTC_Manager_RemoveFaceID(ft->cache_manager, (FTC_FaceID)(&fontobj->id)); ft_wrap_quit(fontobj); } if (fontobj->id.open_args.flags == FT_OPEN_PATHNAME) { _PGFT_free(fontobj->id.open_args.pathname); fontobj->id.open_args.pathname = 0; } else if (fontobj->id.open_args.flags == FT_OPEN_STREAM) { _PGFT_free(fontobj->id.open_args.stream); } fontobj->id.open_args.flags = 0; } /********************************************************* * * Library (de)initialization * *********************************************************/ int _PGFT_Init(FreeTypeInstance **_instance, int cache_size) { FreeTypeInstance *inst = 0; int error; inst = _PGFT_malloc(sizeof(FreeTypeInstance)); if (!inst) { PyErr_NoMemory(); goto error_cleanup; } inst->ref_count = 1; inst->cache_manager = 0; inst->library = 0; inst->cache_size = cache_size; error = FT_Init_FreeType(&inst->library); if (error) { PyErr_SetString( PyExc_RuntimeError, "pygame (_PGFT_Init): failed to initialize FreeType library"); goto error_cleanup; } if (FTC_Manager_New(inst->library, 0, 0, 0, &_PGFT_font_request, 0, &inst->cache_manager) != 0) { PyErr_SetString( PyExc_RuntimeError, "pygame (_PGFT_Init): failed to create new FreeType manager"); goto error_cleanup; } if (FTC_CMapCache_New(inst->cache_manager, &inst->cache_charmap) != 0) { PyErr_SetString( PyExc_RuntimeError, "pygame (_PGFT_Init): failed to create new FreeType cache"); goto error_cleanup; } _PGFT_SetError(inst, "", 0); /* Initialize error data. */ *_instance = inst; return 0; error_cleanup: _PGFT_Quit(inst); *_instance = 0; return -1; } void _PGFT_Quit(FreeTypeInstance *ft) { if (!ft) return; if (--ft->ref_count != 0) return; if (ft->cache_manager) FTC_Manager_Done(ft->cache_manager); if (ft->library) FT_Done_FreeType(ft->library); _PGFT_free(ft); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/freetype/ft_wrap.h0000644000175100001770000003254014676242340017152 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _PYGAME_FREETYPE_WRAP_H_ #define _PYGAME_FREETYPE_WRAP_H_ #define PYGAME_FREETYPE_INTERNAL #include "../_pygame.h" #include "../freetype.h" /********************************************************** * Internal module defines **********************************************************/ /* Fixed point (26.6) math macros */ #define FX6_ONE 64L #define FX16_ONE 65536L #define FX6_MAX (0x7FFFFFFFL) #define FX6_MIN (~FX6_MAX) #define FX6_FLOOR(x) ((x) & -64L) #define FX6_CEIL(x) (((x) + 63L) & -64L) #define FX6_ROUND(x) (((x) + 32L) & -64L) #define FX6_TRUNC(x) ((x) >> 6) #define FX16_CEIL_TO_FX6(x) (((x) + 1023L) >> 10) #define FX16_ROUND_TO_INT(x) (((x) + 32768L) >> 16) #define INT_TO_FX6(i) ((FT_Fixed)((i) << 6)) #define INT_TO_FX16(i) ((FT_Fixed)((i) << 16)) #define FX16_TO_DBL(x) ((x) * 1.52587890625e-5 /* 2.0^-16 */) #define DBL_TO_FX16(d) ((FT_Fixed)((d) * 65536.0)) #define FX6_TO_DBL(x) ((x) * 1.5625e-2 /* 2.0^-6 */) #define DBL_TO_FX6(d) ((FT_Fixed)((d) * 64.0)) /* Internal configuration variables */ #define PGFT_DEFAULT_CACHE_SIZE 64 #define PGFT_MIN_CACHE_SIZE 32 #if defined(PGFT_DEBUG_CACHE) #undef PGFT_DEBUG_CACHE #endif #define PGFT_DEFAULT_RESOLUTION 72 /* dots per inch */ #define PGFT_DBL_DEFAULT_STRENGTH (1.0 / 36.0) /* Rendering styles unsupported for bitmap fonts */ #define FT_STYLES_SCALABLE_ONLY (FT_STYLE_STRONG | FT_STYLE_OBLIQUE) /********************************************************** * Internal basic types **********************************************************/ typedef FT_UInt32 PGFT_char; typedef FT_UInt GlyphIndex_t; /********************************************************** * Internal data structures **********************************************************/ /* FreeTypeInstance: the global freetype 2 library state. * * Instances of this struct are created by _PGFT_Init, and * destroyed by _PGFT_Quit. The instances are reference counted. * When adding a local reference, be sure to increment ref_count; * _PTFT_Init returns an instance with ref_count equal one. * When removing a reference, call _PGFT_Quit, which will decrement * the reference count and free the resource if the count reaches * zero. */ typedef struct freetypeinstance_ { Py_ssize_t ref_count; /* Internal */ FT_Library library; FTC_Manager cache_manager; FTC_CMapCache cache_charmap; int cache_size; char _error_msg[1024]; } FreeTypeInstance; typedef struct fontcolor_ { FT_Byte r; FT_Byte g; FT_Byte b; FT_Byte a; } FontColor; typedef struct rendermode_ { Scale_t face_size; FT_Angle rotation_angle; FT_UInt16 render_flags; FT_UInt16 style; /* All these are Fixed 16.16 */ FT_Fixed strength; FT_Fixed underline_adjustment; FT_Matrix transform; } FontRenderMode; #if defined(Py_DEBUG) && !defined(PGFT_DEBUG_CACHE) #define PGFT_DEBUG_CACHE 1 #endif struct cachenode_; typedef struct fontcache_ { struct cachenode_ **nodes; struct cachenode_ *free_nodes; FT_Byte *depths; #ifdef PGFT_DEBUG_CACHE FT_UInt32 _debug_count; FT_UInt32 _debug_delete_count; FT_UInt32 _debug_access; FT_UInt32 _debug_hit; FT_UInt32 _debug_miss; #endif FT_UInt32 size_mask; } FontCache; typedef struct fontmetrics_ { /* All these are 26.6 precision */ FT_Pos bearing_x; FT_Pos bearing_y; FT_Vector bearing_rotated; FT_Vector advance_rotated; } FontMetrics; typedef struct fontglyph_ { FT_BitmapGlyph image; FT_Pos width; /* 26.6 */ FT_Pos height; /* 26.6 */ FontMetrics h_metrics; FontMetrics v_metrics; } FontGlyph; typedef struct glyphslot_ { GlyphIndex_t id; FontGlyph *glyph; FT_Vector posn; FT_Vector kerning; } GlyphSlot; typedef struct layout_ { FontRenderMode mode; int length; int top; /* In pixels */ int left; /* In pixels */ FT_Pos min_x; FT_Pos max_x; FT_Pos min_y; FT_Pos max_y; FT_Vector offset; FT_Vector advance; FT_Pos ascender; FT_Pos descender; FT_Pos height; FT_Pos max_advance; FT_Fixed underline_size; FT_Pos underline_pos; int buffer_size; GlyphSlot *glyphs; } Layout; struct fontsurface_; typedef void (*FontRenderPtr)(int, int, struct fontsurface_ *, const FT_Bitmap *, const FontColor *); typedef void (*FontFillPtr)(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, struct fontsurface_ *, const FontColor *); typedef struct fontsurface_ { void *buffer; unsigned width; unsigned height; int item_stride; int pitch; SDL_PixelFormat *format; FontRenderPtr render_gray; FontRenderPtr render_mono; FontFillPtr fill; } FontSurface; typedef struct fontinternals_ { Layout active_text; FontCache glyph_cache; } FontInternals; typedef struct PGFT_String_ { Py_ssize_t length; PGFT_char data[1]; } PGFT_String; #if defined(PGFT_DEBUG_CACHE) #define PGFT_FONT_CACHE(f) ((f)->_internals->glyph_cache) #endif /********************************************************** * Module state **********************************************************/ typedef struct { FreeTypeInstance *freetype; int cache_size; FT_UInt resolution; } _FreeTypeState; #if !defined(PYPY_VERSION) extern struct PyModuleDef _freetypemodule; #define FREETYPE_MOD_STATE(mod) ((_FreeTypeState *)PyModule_GetState(mod)) #define FREETYPE_STATE FREETYPE_MOD_STATE(PyState_FindModule(&_freetypemodule)) #else /* defined(PYPY_VERSION) */ extern _FreeTypeState _modstate; #define FREETYPE_MOD_STATE(mod) (&_modstate) #define FREETYPE_STATE FREETYPE_MOD_STATE(0) #endif /* defined(PYPY_VERSION) */ #define ASSERT_GRAB_FREETYPE(ft_ptr, rvalue) \ ft_ptr = FREETYPE_STATE->freetype; \ if (!ft_ptr) { \ PyErr_SetString(PyExc_RuntimeError, \ "The FreeType 2 library hasn't been initialized"); \ return (rvalue); \ } /********************************************************** * Internal API **********************************************************/ /**************************************** General functions ******************/ const char * _PGFT_GetError(FreeTypeInstance *); void _PGFT_Quit(FreeTypeInstance *); int _PGFT_Init(FreeTypeInstance **, int); long _PGFT_Font_GetAscender(FreeTypeInstance *, pgFontObject *); long _PGFT_Font_GetAscenderSized(FreeTypeInstance *, pgFontObject *, Scale_t); long _PGFT_Font_GetDescender(FreeTypeInstance *, pgFontObject *); long _PGFT_Font_GetDescenderSized(FreeTypeInstance *, pgFontObject *, Scale_t); long _PGFT_Font_GetHeight(FreeTypeInstance *, pgFontObject *); long _PGFT_Font_GetHeightSized(FreeTypeInstance *, pgFontObject *, Scale_t); long _PGFT_Font_GetGlyphHeightSized(FreeTypeInstance *, pgFontObject *, Scale_t); int _PGFT_Font_IsFixedWidth(FreeTypeInstance *, pgFontObject *); int _PGFT_Font_NumFixedSizes(FreeTypeInstance *, pgFontObject *); int _PGFT_Font_GetAvailableSize(FreeTypeInstance *, pgFontObject *, long, long *, long *, long *, double *, double *); const char * _PGFT_Font_GetName(FreeTypeInstance *, pgFontObject *); int _PGFT_TryLoadFont_Filename(FreeTypeInstance *, pgFontObject *, const char *, long); int _PGFT_TryLoadFont_RWops(FreeTypeInstance *, pgFontObject *, SDL_RWops *, long); SDL_RWops * _PGFT_GetRWops(pgFontObject *fontobj); void _PGFT_UnloadFont(FreeTypeInstance *, pgFontObject *); /**************************************** Metrics management *****************/ int _PGFT_GetTextRect(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PGFT_String *, SDL_Rect *); int _PGFT_GetMetrics(FreeTypeInstance *, pgFontObject *, PGFT_char, const FontRenderMode *, FT_UInt *, long *, long *, long *, long *, double *, double *); void _PGFT_GetRenderMetrics(const FontRenderMode *, Layout *, unsigned *, unsigned *, FT_Vector *, FT_Pos *, FT_Fixed *); /**************************************** Rendering **************************/ PyObject * _PGFT_Render_PixelArray(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PGFT_String *, int, int *, int *); SDL_Surface * _PGFT_Render_NewSurface(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PGFT_String *, FontColor *, FontColor *, SDL_Rect *); int _PGFT_Render_ExistingSurface(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PGFT_String *, SDL_Surface *, int, int, FontColor *, FontColor *, SDL_Rect *); int _PGFT_Render_Array(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PyObject *, PGFT_String *, int, int, int, SDL_Rect *); int _PGFT_BuildRenderMode(FreeTypeInstance *, pgFontObject *, FontRenderMode *, Scale_t, int, Angle_t); int _PGFT_CheckStyle(FT_UInt32); /**************************************** Render callbacks *******************/ void __fill_glyph_RGB1(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __fill_glyph_RGB2(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __fill_glyph_RGB3(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __fill_glyph_RGB4(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __fill_glyph_GRAY1(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __fill_glyph_INT(FT_Fixed, FT_Fixed, FT_Fixed, FT_Fixed, FontSurface *, const FontColor *); void __render_glyph_MONO1(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_MONO2(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_MONO3(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_MONO4(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_RGB1(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_RGB2(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_RGB3(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_RGB4(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_GRAY1(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_MONO_as_GRAY1(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_GRAY_as_MONO1(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_INT(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); void __render_glyph_MONO_as_INT(int, int, FontSurface *, const FT_Bitmap *, const FontColor *); /**************************************** Layout management ******************/ int _PGFT_LayoutInit(FreeTypeInstance *, pgFontObject *); void _PGFT_LayoutFree(pgFontObject *); Layout * _PGFT_LoadLayout(FreeTypeInstance *, pgFontObject *, const FontRenderMode *, PGFT_String *); int _PGFT_LoadGlyph(FontGlyph *, GlyphIndex_t, const FontRenderMode *, void *); /**************************************** Glyph cache management *************/ int _PGFT_Cache_Init(FreeTypeInstance *, FontCache *); void _PGFT_Cache_Destroy(FontCache *); void _PGFT_Cache_Cleanup(FontCache *); FontGlyph * _PGFT_Cache_FindGlyph(FT_UInt32, const FontRenderMode *, FontCache *, void *); /**************************************** Unicode ****************************/ PGFT_String * _PGFT_EncodePyString(PyObject *, int); #define PGFT_String_GET_DATA(s) ((s)->data) #define PGFT_String_GET_LENGTH(s) ((s)->length) #define _PGFT_FreeString _PGFT_free /**************************************** Internals **************************/ void _PGFT_SetError(FreeTypeInstance *, const char *, FT_Error); FT_Face _PGFT_GetFont(FreeTypeInstance *, pgFontObject *); FT_Face _PGFT_GetFontSized(FreeTypeInstance *, pgFontObject *, Scale_t); void _PGFT_BuildScaler(pgFontObject *, FTC_Scaler, Scale_t); #define _PGFT_malloc PyMem_Malloc #define _PGFT_free PyMem_Free #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.008112 pygame-2.6.1/src_c/freetype.h0000644000175100001770000000625514676242340015514 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _PYGAME_FREETYPE_INTERNAL_H_ #define _PYGAME_FREETYPE_INTERNAL_H_ #include "pgcompat.h" #include "pgplatform.h" #include #include FT_FREETYPE_H #include FT_CACHE_H #include FT_XFREE86_H #include FT_TRIGONOMETRY_H /********************************************************** * Global module constants **********************************************************/ /* Render styles */ #define FT_STYLE_NORMAL 0x00 #define FT_STYLE_STRONG 0x01 #define FT_STYLE_OBLIQUE 0x02 #define FT_STYLE_UNDERLINE 0x04 #define FT_STYLE_WIDE 0x08 #define FT_STYLE_DEFAULT 0xFF /* Bounding box modes */ #define FT_BBOX_EXACT FT_GLYPH_BBOX_SUBPIXELS #define FT_BBOX_EXACT_GRIDFIT FT_GLYPH_BBOX_GRIDFIT #define FT_BBOX_PIXEL FT_GLYPH_BBOX_TRUNCATE #define FT_BBOX_PIXEL_GRIDFIT FT_GLYPH_BBOX_PIXELS /* Rendering flags */ #define FT_RFLAG_NONE (0) #define FT_RFLAG_ANTIALIAS (1 << 0) #define FT_RFLAG_AUTOHINT (1 << 1) #define FT_RFLAG_VERTICAL (1 << 2) #define FT_RFLAG_HINTED (1 << 3) #define FT_RFLAG_KERNING (1 << 4) #define FT_RFLAG_TRANSFORM (1 << 5) #define FT_RFLAG_PAD (1 << 6) #define FT_RFLAG_ORIGIN (1 << 7) #define FT_RFLAG_UCS4 (1 << 8) #define FT_RFLAG_USE_BITMAP_STRIKES (1 << 9) #define FT_RFLAG_DEFAULTS \ (FT_RFLAG_HINTED | FT_RFLAG_USE_BITMAP_STRIKES | FT_RFLAG_ANTIALIAS) #define FT_RENDER_NEWBYTEARRAY 0x0 #define FT_RENDER_NEWSURFACE 0x1 #define FT_RENDER_EXISTINGSURFACE 0x2 /********************************************************** * Global module types **********************************************************/ typedef struct _scale_s { FT_UInt x, y; } Scale_t; typedef FT_Angle Angle_t; struct fontinternals_; struct freetypeinstance_; typedef struct { FT_Long font_index; FT_Open_Args open_args; } pgFontId; typedef struct { PyObject_HEAD pgFontId id; PyObject *path; int is_scalable; int is_bg_col_set; Scale_t face_size; FT_Int16 style; FT_Int16 render_flags; double strength; double underline_adjustment; FT_UInt resolution; Angle_t rotation; FT_Matrix transform; FT_Byte fgcolor[4]; FT_Byte bgcolor[4]; struct freetypeinstance_ *freetype; /* Personal reference */ struct fontinternals_ *_internals; } pgFontObject; #define pgFont_IS_ALIVE(o) (((pgFontObject *)(o))->_internals != 0) /* import public API */ #include "include/pygame_freetype.h" #define PYGAMEAPI_FREETYPE_NUMSLOTS 2 #endif /* ~_PYGAME_FREETYPE_INTERNAL_H_ */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/gfxdraw.c0000644000175100001770000010275514676242340015330 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2008 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This is a proposed SDL_gfx draw module for Pygame. It is backported from Pygame 2. TODO: - fix filledPolygonRGBA to use MT versions for threaded use. - do a filled pie version using filledPieColor - Determine if SDL video must be initiated for all routines to work. Add check if required, else remove ASSERT_VIDEO_INIT. - Example (Maybe). */ #define PYGAME_SDLGFXPRIM_INTERNAL #include "pygame.h" #include "doc/gfxdraw_doc.h" #include "surface.h" #include "pgcompat.h" #include "SDL_gfx/SDL_gfxPrimitives.h" static PyObject * _gfx_pixelcolor(PyObject *self, PyObject *args); static PyObject * _gfx_hlinecolor(PyObject *self, PyObject *args); static PyObject * _gfx_vlinecolor(PyObject *self, PyObject *args); static PyObject * _gfx_rectanglecolor(PyObject *self, PyObject *args); static PyObject * _gfx_boxcolor(PyObject *self, PyObject *args); static PyObject * _gfx_linecolor(PyObject *self, PyObject *args); static PyObject * _gfx_circlecolor(PyObject *self, PyObject *args); static PyObject * _gfx_arccolor(PyObject *self, PyObject *args); static PyObject * _gfx_aacirclecolor(PyObject *self, PyObject *args); static PyObject * _gfx_filledcirclecolor(PyObject *self, PyObject *args); static PyObject * _gfx_ellipsecolor(PyObject *self, PyObject *args); static PyObject * _gfx_aaellipsecolor(PyObject *self, PyObject *args); static PyObject * _gfx_filledellipsecolor(PyObject *self, PyObject *args); static PyObject * _gfx_piecolor(PyObject *self, PyObject *args); static PyObject * _gfx_trigoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_aatrigoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_filledtrigoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_polygoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_aapolygoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_filledpolygoncolor(PyObject *self, PyObject *args); static PyObject * _gfx_texturedpolygon(PyObject *self, PyObject *args); static PyObject * _gfx_beziercolor(PyObject *self, PyObject *args); static PyMethodDef _gfxdraw_methods[] = { {"pixel", _gfx_pixelcolor, METH_VARARGS, DOC_PYGAMEGFXDRAWPIXEL}, {"hline", _gfx_hlinecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWHLINE}, {"vline", _gfx_vlinecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWVLINE}, {"rectangle", _gfx_rectanglecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWRECTANGLE}, {"box", _gfx_boxcolor, METH_VARARGS, DOC_PYGAMEGFXDRAWRECTANGLE}, {"line", _gfx_linecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWLINE}, {"circle", _gfx_circlecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWCIRCLE}, {"arc", _gfx_arccolor, METH_VARARGS, DOC_PYGAMEGFXDRAWARC}, {"aacircle", _gfx_aacirclecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWAACIRCLE}, {"filled_circle", _gfx_filledcirclecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWFILLEDCIRCLE}, {"ellipse", _gfx_ellipsecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWELLIPSE}, {"aaellipse", _gfx_aaellipsecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWAAELLIPSE}, {"filled_ellipse", _gfx_filledellipsecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWFILLEDELLIPSE}, {"pie", _gfx_piecolor, METH_VARARGS, DOC_PYGAMEGFXDRAWPIE}, {"trigon", _gfx_trigoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWTRIGON}, {"aatrigon", _gfx_aatrigoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWAATRIGON}, {"filled_trigon", _gfx_filledtrigoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWFILLEDTRIGON}, {"polygon", _gfx_polygoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWPOLYGON}, {"aapolygon", _gfx_aapolygoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWAAPOLYGON}, {"filled_polygon", _gfx_filledpolygoncolor, METH_VARARGS, DOC_PYGAMEGFXDRAWFILLEDPOLYGON}, {"textured_polygon", _gfx_texturedpolygon, METH_VARARGS, DOC_PYGAMEGFXDRAWTEXTUREDPOLYGON}, {"bezier", _gfx_beziercolor, METH_VARARGS, DOC_PYGAMEGFXDRAWBEZIER}, {NULL, NULL, 0, NULL}, }; #define ASSERT_VIDEO_INIT(unused) /* Is video really needed for gfxdraw? */ static int Sint16FromObj(PyObject *item, Sint16 *val) { if (PyNumber_Check(item)) { PyObject *intobj; long tmp; if (!(intobj = PyNumber_Long(item))) return 0; tmp = PyLong_AsLong(intobj); Py_DECREF(intobj); if (tmp == -1 && PyErr_Occurred()) return 0; *val = (Sint16)tmp; return 1; } return 0; } static int Sint16FromSeqIndex(PyObject *obj, Py_ssize_t _index, Sint16 *val) { int result = 0; PyObject *item; item = PySequence_GetItem(obj, _index); if (item) { result = Sint16FromObj(item, val); Py_DECREF(item); } return result; } static PyObject * _gfx_pixelcolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhO:pixel", &surface, &x, &y, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (pixelRGBA(surf, x, y, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_hlinecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x1, x2, y; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhO:hline", &surface, &x1, &x2, &y, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (hlineRGBA(surf, x1, x2, y, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_vlinecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, _y1, y2; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhO:vline", &surface, &x, &_y1, &y2, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (vlineRGBA(surf, x, _y1, y2, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_rectanglecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *rect; SDL_Rect temprect, *sdlrect; Sint16 x1, x2, _y1, y2; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOO:rectangle", &surface, &rect, &color)) { /* Exception already set */ return NULL; } if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } sdlrect = pgRect_FromObject(rect, &temprect); if (sdlrect == NULL) { PyErr_SetString(PyExc_TypeError, "invalid rect style argument"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); x1 = sdlrect->x; _y1 = sdlrect->y; x2 = (Sint16)(sdlrect->x + sdlrect->w - 1); y2 = (Sint16)(sdlrect->y + sdlrect->h - 1); if (rectangleRGBA(surf, x1, _y1, x2, y2, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_boxcolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *rect; SDL_Rect temprect, *sdlrect; Sint16 x1, x2, _y1, y2; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOO:box", &surface, &rect, &color)) { /* Exception already set */ return NULL; } if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } sdlrect = pgRect_FromObject(rect, &temprect); if (sdlrect == NULL) { PyErr_SetString(PyExc_TypeError, "invalid rect style argument"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); x1 = sdlrect->x; _y1 = sdlrect->y; x2 = (Sint16)(sdlrect->x + sdlrect->w - 1); y2 = (Sint16)(sdlrect->y + sdlrect->h - 1); if (boxRGBA(surf, x1, _y1, x2, y2, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_linecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x1, x2, _y1, y2; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhO:line", &surface, &x1, &_y1, &x2, &y2, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (lineRGBA(surf, x1, _y1, x2, y2, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_circlecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, r; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhO:circle", &surface, &x, &y, &r, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (circleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_arccolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, r, start, end; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhhO:arc", &surface, &x, &y, &r, &start, &end, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (arcRGBA(surf, x, y, r, start, end, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_aacirclecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, r; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhO:aacircle", &surface, &x, &y, &r, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (aacircleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_filledcirclecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, r; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhO:filledcircle", &surface, &x, &y, &r, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (filledCircleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_ellipsecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, rx, ry; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhO:ellipse", &surface, &x, &y, &rx, &ry, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (ellipseRGBA(surf, x, y, rx, ry, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_aaellipsecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, rx, ry; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhO:aaellipse", &surface, &x, &y, &rx, &ry, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (aaellipseRGBA(surf, x, y, rx, ry, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_filledellipsecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, rx, ry; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhO:filled_ellipse", &surface, &x, &y, &rx, &ry, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (filledEllipseRGBA(surf, x, y, rx, ry, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_piecolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x, y, r, start, end; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhhO:pie", &surface, &x, &y, &r, &start, &end, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (pieRGBA(surf, x, y, r, start, end, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_trigoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x1, x2, x3, _y1, y2, y3; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhhhO:trigon", &surface, &x1, &_y1, &x2, &y2, &x3, &y3, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (trigonRGBA(surf, x1, _y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_aatrigoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x1, x2, x3, _y1, y2, y3; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhhhO:aatrigon", &surface, &x1, &_y1, &x2, &y2, &x3, &y3, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (aatrigonRGBA(surf, x1, _y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_filledtrigoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color; Sint16 x1, x2, x3, _y1, y2, y3; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OhhhhhhO:filled_trigon", &surface, &x1, &_y1, &x2, &y2, &x3, &y3, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (filledTrigonRGBA(surf, x1, _y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]) == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_polygoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *points, *item; Sint16 *vx, *vy, x, y; Py_ssize_t count, i; int ret; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOO:polygon", &surface, &points, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } if (!PySequence_Check(points)) { PyErr_SetString(PyExc_TypeError, "points must be a sequence"); return NULL; } count = PySequence_Size(points); if (count < 3) { PyErr_SetString(PyExc_ValueError, "points must contain more than 2 points"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); vx = PyMem_New(Sint16, (size_t)count); vy = PyMem_New(Sint16, (size_t)count); if (!vx || !vy) { if (vx) PyMem_Free(vx); if (vy) PyMem_Free(vy); return NULL; } for (i = 0; i < count; i++) { item = PySequence_ITEM(points, i); if (!Sint16FromSeqIndex(item, 0, &x)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } if (!Sint16FromSeqIndex(item, 1, &y)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } Py_DECREF(item); vx[i] = x; vy[i] = y; } Py_BEGIN_ALLOW_THREADS; ret = polygonRGBA(surf, vx, vy, (int)count, rgba[0], rgba[1], rgba[2], rgba[3]); Py_END_ALLOW_THREADS; PyMem_Free(vx); PyMem_Free(vy); if (ret == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_aapolygoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *points, *item; Sint16 *vx, *vy, x, y; Py_ssize_t count, i; int ret; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOO:aapolygon", &surface, &points, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } if (!PySequence_Check(points)) { PyErr_SetString(PyExc_TypeError, "points must be a sequence"); return NULL; } count = PySequence_Size(points); if (count < 3) { PyErr_SetString(PyExc_ValueError, "points must contain more than 2 points"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); vx = PyMem_New(Sint16, (size_t)count); vy = PyMem_New(Sint16, (size_t)count); if (!vx || !vy) { if (vx) PyMem_Free(vx); if (vy) PyMem_Free(vy); return NULL; } for (i = 0; i < count; i++) { item = PySequence_ITEM(points, i); if (!Sint16FromSeqIndex(item, 0, &x)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } if (!Sint16FromSeqIndex(item, 1, &y)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } Py_DECREF(item); vx[i] = x; vy[i] = y; } Py_BEGIN_ALLOW_THREADS; ret = aapolygonRGBA(surf, vx, vy, (int)count, rgba[0], rgba[1], rgba[2], rgba[3]); Py_END_ALLOW_THREADS; PyMem_Free(vx); PyMem_Free(vy); if (ret == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_filledpolygoncolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *points, *item; Sint16 *vx, *vy, x, y; Py_ssize_t count, i; int ret; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOO:filled_polygon", &surface, &points, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } if (!PySequence_Check(points)) { PyErr_SetString(PyExc_TypeError, "points must be a sequence"); return NULL; } count = PySequence_Size(points); if (count < 3) { PyErr_SetString(PyExc_ValueError, "points must contain more than 2 points"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); vx = PyMem_New(Sint16, (size_t)count); vy = PyMem_New(Sint16, (size_t)count); if (!vx || !vy) { if (vx) PyMem_Free(vx); if (vy) PyMem_Free(vy); return NULL; } for (i = 0; i < count; i++) { item = PySequence_ITEM(points, i); if (!Sint16FromSeqIndex(item, 0, &x)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } if (!Sint16FromSeqIndex(item, 1, &y)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } Py_DECREF(item); vx[i] = x; vy[i] = y; } Py_BEGIN_ALLOW_THREADS; ret = filledPolygonRGBA(surf, vx, vy, (int)count, rgba[0], rgba[1], rgba[2], rgba[3]); Py_END_ALLOW_THREADS; PyMem_Free(vx); PyMem_Free(vy); if (ret == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_texturedpolygon(PyObject *self, PyObject *args) { PyObject *surface, *texture, *points, *item; SDL_Surface *s_surface, *s_texture; Sint16 *vx, *vy, x, y, tdx, tdy; Py_ssize_t count, i; int ret; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOOhh:textured_polygon", &surface, &points, &texture, &tdx, &tdy)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } s_surface = pgSurface_AsSurface(surface); if (!s_surface) return RAISE(pgExc_SDLError, "display Surface quit"); if (!pgSurface_Check(texture)) { PyErr_SetString(PyExc_TypeError, "texture must be a Surface"); return NULL; } s_texture = pgSurface_AsSurface(texture); if (!s_texture) return RAISE(pgExc_SDLError, "display Surface quit"); if (!PySequence_Check(points)) { PyErr_SetString(PyExc_TypeError, "points must be a sequence"); return NULL; } if (s_surface->format->BytesPerPixel == 1 && (s_texture->format->Amask || s_texture->flags & SDL_SRCALPHA)) { PyErr_SetString(PyExc_ValueError, "Per-byte alpha texture unsupported " "for 8 bit surfaces"); return NULL; } count = PySequence_Size(points); if (count < 3) { PyErr_SetString(PyExc_ValueError, "points must contain more than 2 points"); return NULL; } vx = PyMem_New(Sint16, (size_t)count); vy = PyMem_New(Sint16, (size_t)count); if (!vx || !vy) { if (vx) PyMem_Free(vx); if (vy) PyMem_Free(vy); return NULL; } for (i = 0; i < count; i++) { item = PySequence_ITEM(points, i); if (!Sint16FromSeqIndex(item, 0, &x)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } if (!Sint16FromSeqIndex(item, 1, &y)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } Py_DECREF(item); vx[i] = x; vy[i] = y; } Py_BEGIN_ALLOW_THREADS; ret = texturedPolygon(s_surface, vx, vy, (int)count, s_texture, tdx, tdy); Py_END_ALLOW_THREADS; PyMem_Free(vx); PyMem_Free(vy); if (ret == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } static PyObject * _gfx_beziercolor(PyObject *self, PyObject *args) { SDL_Surface *surf; PyObject *surface, *color, *points, *item; Sint16 *vx, *vy, x, y; Py_ssize_t count, i; int ret, steps; Uint8 rgba[4]; ASSERT_VIDEO_INIT(NULL); if (!PyArg_ParseTuple(args, "OOiO:bezier", &surface, &points, &steps, &color)) return NULL; if (!pgSurface_Check(surface)) { PyErr_SetString(PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!pg_RGBAFromObj(color, rgba)) { PyErr_SetString(PyExc_TypeError, "invalid color argument"); return NULL; } if (!PySequence_Check(points)) { PyErr_SetString(PyExc_TypeError, "points must be a sequence"); return NULL; } count = PySequence_Size(points); if (count < 3) { PyErr_SetString(PyExc_ValueError, "points must contain more than 2 points"); return NULL; } if (steps < 2) { PyErr_SetString(PyExc_ValueError, "steps parameter must be greater than 1"); return NULL; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); vx = PyMem_New(Sint16, (size_t)count); vy = PyMem_New(Sint16, (size_t)count); if (!vx || !vy) { PyErr_SetString(PyExc_MemoryError, "memory allocation failed"); if (vx) PyMem_Free(vx); if (vy) PyMem_Free(vy); return NULL; } for (i = 0; i < count; i++) { item = PySequence_ITEM(points, i); if (!Sint16FromSeqIndex(item, 0, &x)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } if (!Sint16FromSeqIndex(item, 1, &y)) { PyMem_Free(vx); PyMem_Free(vy); Py_XDECREF(item); return NULL; } Py_DECREF(item); vx[i] = x; vy[i] = y; } Py_BEGIN_ALLOW_THREADS; ret = bezierRGBA(surf, vx, vy, (int)count, steps, rgba[0], rgba[1], rgba[2], rgba[3]); Py_END_ALLOW_THREADS; PyMem_Free(vx); PyMem_Free(vy); if (ret == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } Py_RETURN_NONE; } MODINIT_DEFINE(gfxdraw) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "gfxdraw", DOC_PYGAMEGFXDRAW, -1, _gfxdraw_methods, NULL, NULL, NULL, NULL}; /* import needed APIs; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/image.c0000644000175100001770000016437114676242340014752 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2006 Rene Dudfield This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * image module for pygame */ #include "pygame.h" #include "pgcompat.h" #include "doc/image_doc.h" #if PG_COMPILE_SSE4_2 #include /* SSSE 3 */ #include #endif static int SaveTGA(SDL_Surface *surface, const char *file, int rle); static int SaveTGA_RW(SDL_Surface *surface, SDL_RWops *out, int rle); #define DATAROW(data, row, width, height, flipped) \ ((flipped) ? (((char *)data) + (height - row - 1) * width) \ : (((char *)data) + row * width)) static PyObject *extloadobj = NULL; static PyObject *extsaveobj = NULL; static PyObject *extverobj = NULL; static const char * find_extension(const char *fullname) { const char *dot; if (fullname == NULL) { return NULL; } dot = strrchr(fullname, '.'); if (dot == NULL) { return fullname; } return dot + 1; } static PyObject * image_load_basic(PyObject *self, PyObject *obj) { PyObject *final; SDL_Surface *surf; SDL_RWops *rw = pgRWops_FromObject(obj, NULL); if (rw == NULL) { return NULL; } Py_BEGIN_ALLOW_THREADS; surf = SDL_LoadBMP_RW(rw, 1); Py_END_ALLOW_THREADS; if (surf == NULL) { return RAISE(pgExc_SDLError, SDL_GetError()); } final = (PyObject *)pgSurface_New(surf); if (final == NULL) { SDL_FreeSurface(surf); } return final; } static PyObject * image_load_extended(PyObject *self, PyObject *arg) { if (extloadobj == NULL) return RAISE(PyExc_NotImplementedError, "loading images of extended format is not available"); else return PyObject_CallObject(extloadobj, arg); } static PyObject * image_load(PyObject *self, PyObject *arg) { PyObject *obj; const char *name = NULL; if (extloadobj == NULL) { if (!PyArg_ParseTuple(arg, "O|s", &obj, &name)) { return NULL; } return image_load_basic(self, obj); } else return image_load_extended(self, arg); } #ifdef WIN32 #define strcasecmp _stricmp #else #include #endif static PyObject * image_save_extended(PyObject *self, PyObject *arg) { if (extsaveobj == NULL) return RAISE(PyExc_NotImplementedError, "saving images of extended format is not available"); else return PyObject_CallObject(extsaveobj, arg); } static PyObject * image_save(PyObject *self, PyObject *arg) { pgSurfaceObject *surfobj; PyObject *obj; const char *namehint = NULL; PyObject *oencoded; PyObject *ret; SDL_Surface *surf; int result = 1; if (!PyArg_ParseTuple(arg, "O!O|s", &pgSurface_Type, &surfobj, &obj, &namehint)) { return NULL; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pgSurface_Prep(surfobj); oencoded = pg_EncodeString(obj, "UTF-8", NULL, pgExc_SDLError); if (oencoded == NULL) { result = -2; } else { const char *name = NULL; const char *ext = NULL; if (oencoded == Py_None) { name = (namehint ? namehint : "tga"); } else { name = PyBytes_AS_STRING(oencoded); } ext = find_extension(name); if (!strcasecmp(ext, "png") || !strcasecmp(ext, "jpg") || !strcasecmp(ext, "jpeg")) { /* If it is .png .jpg .jpeg use the extended module. */ /* try to get extended formats */ ret = image_save_extended(self, arg); result = (ret == NULL ? -2 : 0); } else if (oencoded == Py_None) { SDL_RWops *rw = pgRWops_FromFileObject(obj); if (rw != NULL) { if (!strcasecmp(ext, "bmp")) { /* The SDL documentation didn't specify which negative * number is returned upon error. We want to be sure that * result is either 0 or -1: */ result = (SDL_SaveBMP_RW(surf, rw, 0) == 0 ? 0 : -1); } else { result = SaveTGA_RW(surf, rw, 1); } } else { result = -2; } } else { if (!strcasecmp(ext, "bmp")) { Py_BEGIN_ALLOW_THREADS; /* The SDL documentation didn't specify which negative number * is returned upon error. We want to be sure that result is * either 0 or -1: */ result = (SDL_SaveBMP(surf, name) == 0 ? 0 : -1); Py_END_ALLOW_THREADS; } else { Py_BEGIN_ALLOW_THREADS; result = SaveTGA(surf, name, 1); Py_END_ALLOW_THREADS; } } } Py_XDECREF(oencoded); pgSurface_Unprep(surfobj); if (result == -2) { /* Python error raised elsewhere */ return NULL; } if (result == -1) { /* SDL error: translate to Python error */ return RAISE(pgExc_SDLError, SDL_GetError()); } if (result == 1) { /* Should never get here */ return RAISE(pgExc_SDLError, "Unrecognized image type"); } Py_RETURN_NONE; } static PyObject * image_get_extended(PyObject *self, PyObject *_null) { if (extverobj == NULL) Py_RETURN_FALSE; else Py_RETURN_TRUE; } static PyObject * image_get_sdl_image_version(PyObject *self, PyObject *args, PyObject *kwargs) { if (extverobj == NULL) Py_RETURN_NONE; else return PyObject_Call(extverobj, args, kwargs); } #if PG_COMPILE_SSE4_2 #define SSE42_ALIGN_NEEDED 16 #define SSE42_ALIGN __attribute__((aligned(SSE42_ALIGN_NEEDED))) #define _SHIFT_N_STEP2ALIGN(shift, step) (shift / 8 + step * 4) #if PYGAME_DEBUG_SSE /* Useful for debugging/comparing the SSE vectors */ static void _debug_print128_num(__m128i var, const char *msg) { uint32_t val[4]; memcpy(val, &var, sizeof(val)); fprintf(stderr, "%s: %04x%04x%04x%04x\n", msg, val[0], val[1], val[2], val[3]); } #define DEBUG_PRINT128_NUM(var, msg) _debug_print128_num(var, msg) #else #define DEBUG_PRINT128_NUM(var, msg) \ do { /* do nothing */ \ } while (0) #endif /* * Generates an SSE vector useful for reordering a SSE vector * based on the "in-memory layout" to match the "tobytes layout" * It is only useful as second parameter to _mm_shuffle_epi8. * * A short _mm_shuffle_epi8 primer: * * - If the highest bit of a byte in the reorder vector is set, * the matching byte in the original vector is cleared: * - Otherwise, the 3 lowest bit of the byte in the reorder vector * represent the byte index of where to find the relevant value * from the original vector. * * As an example, given the following in memory layout (bytes): * * R1 G1 B1 A1 R2 G2 B2 A2 ... * * And we want: * * A1 R1 G1 B1 A2 R2 G2 B2 * * Then the reorder vector should look like (in hex): * * 03 00 01 02 07 04 05 06 * * This is exactly the type of vector that compute_align_vector * produces (based on the pixel format and where the alpha should * be placed in the output). */ static PG_INLINE __m128i compute_align_vector(SDL_PixelFormat *format, int color_offset, int alpha_offset) { int output_align[4]; size_t i; size_t limit = sizeof(output_align) / sizeof(int); int a_shift = alpha_offset * 8; int r_shift = (color_offset + 0) * 8; int g_shift = (color_offset + 1) * 8; int b_shift = (color_offset + 2) * 8; for (i = 0; i < limit; i++) { int p = 3 - i; output_align[i] = _SHIFT_N_STEP2ALIGN(format->Rshift, p) << r_shift | _SHIFT_N_STEP2ALIGN(format->Gshift, p) << g_shift | _SHIFT_N_STEP2ALIGN(format->Bshift, p) << b_shift | _SHIFT_N_STEP2ALIGN(format->Ashift, p) << a_shift; } return _mm_set_epi32(output_align[0], output_align[1], output_align[2], output_align[3]); } static PG_INLINE PG_FUNCTION_TARGET_SSE4_2 void tobytes_pixels_32bit_sse4(const __m128i *row, __m128i *data, int loop_max, __m128i mask_vector, __m128i align_vector) { int w; for (w = 0; w < loop_max; ++w) { __m128i pvector = _mm_loadu_si128(row + w); DEBUG_PRINT128_NUM(pvector, "Load"); pvector = _mm_and_si128(pvector, mask_vector); DEBUG_PRINT128_NUM(pvector, "after _mm_and_si128 (and)"); pvector = _mm_shuffle_epi8(pvector, align_vector); DEBUG_PRINT128_NUM(pvector, "after _mm_shuffle_epi8 (reorder)"); _mm_storeu_si128(data + w, pvector); } } /* * SSE4.2 variant of tobytes_surf_32bpp. * * It is a lot faster but only works on a subset of the surfaces * (plus requires SSE4.2 support from the CPU). */ static PG_FUNCTION_TARGET_SSE4_2 void tobytes_surf_32bpp_sse42(SDL_Surface *surf, int flipped, char *data, int color_offset, int alpha_offset) { const int step_size = 4; int h; SDL_PixelFormat *format = surf->format; int loop_max = surf->w / step_size; int mask = (format->Rloss ? 0 : format->Rmask) | (format->Gloss ? 0 : format->Gmask) | (format->Bloss ? 0 : format->Bmask) | (format->Aloss ? 0 : format->Amask); __m128i mask_vector = _mm_set_epi32(mask, mask, mask, mask); __m128i align_vector = compute_align_vector(surf->format, color_offset, alpha_offset); /* How much we would overshoot if we overstep loop_max */ int rollback_count = surf->w % step_size; if (rollback_count) { rollback_count = step_size - rollback_count; } DEBUG_PRINT128_NUM(mask_vector, "mask-vector"); DEBUG_PRINT128_NUM(align_vector, "align-vector"); /* This code will be horribly wrong if these assumptions do not hold. * They are intended as a debug/testing guard to ensure that nothing * calls this function without ensuring the assumptions during * development */ assert(sizeof(int) == sizeof(Uint32)); assert(4 * sizeof(Uint32) == sizeof(__m128i)); /* If this assertion does not hold, the fallback code will overrun * the buffers. */ assert(surf->w >= step_size); assert(format->Rloss % 8 == 0); assert(format->Gloss % 8 == 0); assert(format->Bloss % 8 == 0); assert(format->Aloss % 8 == 0); for (h = 0; h < surf->h; ++h) { const char *row = (char *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); tobytes_pixels_32bit_sse4((const __m128i *)row, (__m128i *)data, loop_max, mask_vector, align_vector); row += sizeof(__m128i) * loop_max; data += sizeof(__m128i) * loop_max; if (rollback_count) { /* Back up a bit to ensure we stay within the memory boundaries * Technically, we end up redoing part of the computations, but * it does not really matter as the runtime of these operations * are fixed and the results are deterministic. */ row -= rollback_count * sizeof(Uint32); data -= rollback_count * sizeof(Uint32); tobytes_pixels_32bit_sse4((const __m128i *)row, (__m128i *)data, 1, mask_vector, align_vector); row += sizeof(__m128i); data += sizeof(__m128i); } } } #endif /* PG_COMPILE_SSE4_2 */ static void tobytes_surf_32bpp(SDL_Surface *surf, int flipped, int hascolorkey, Uint32 colorkey, char *serialized_image, int color_offset, int alpha_offset) { int w, h; Uint32 Rmask = surf->format->Rmask; Uint32 Gmask = surf->format->Gmask; Uint32 Bmask = surf->format->Bmask; Uint32 Amask = surf->format->Amask; Uint32 Rshift = surf->format->Rshift; Uint32 Gshift = surf->format->Gshift; Uint32 Bshift = surf->format->Bshift; Uint32 Ashift = surf->format->Ashift; Uint32 Rloss = surf->format->Rloss; Uint32 Gloss = surf->format->Gloss; Uint32 Bloss = surf->format->Bloss; Uint32 Aloss = surf->format->Aloss; #if PG_COMPILE_SSE4_2 if (/* SDL uses Uint32, SSE uses int for building vectors. * Related, we assume that Uint32 is packed so 4 of * them perfectly matches an __m128i. * If these assumptions do not match up, we will * produce incorrect results. */ sizeof(int) == sizeof(Uint32) && 4 * sizeof(Uint32) == sizeof(__m128i) && !hascolorkey /* No color key */ && SDL_HasSSE42() == SDL_TRUE /* The SSE code assumes it will always read at least 4 pixels */ && surf->w >= 4 /* Our SSE code assumes masks are at most 0xff */ && (surf->format->Rmask >> surf->format->Rshift) <= 0x0ff && (surf->format->Gmask >> surf->format->Gshift) <= 0x0ff && (surf->format->Bmask >> surf->format->Bshift) <= 0x0ff && (Amask >> Ashift) <= 0x0ff /* Our SSE code cannot handle losses other than 0 or 8 * Note the mask check above ensures that losses can be * at most be 8 (assuming the pixel format makes sense * at all). */ && (surf->format->Rloss % 8) == 0 && (surf->format->Bloss % 8) == 0 && (surf->format->Gloss % 8) == 0 && (Aloss % 8) == 0) { tobytes_surf_32bpp_sse42(surf, flipped, serialized_image, color_offset, alpha_offset); return; } #endif /* PG_COMPILE_SSE4_2 */ for (h = 0; h < surf->h; ++h) { Uint32 *pixel_row = (Uint32 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { Uint32 color = *pixel_row++; serialized_image[color_offset + 0] = (char)(((color & Rmask) >> Rshift) << Rloss); serialized_image[color_offset + 1] = (char)(((color & Gmask) >> Gshift) << Gloss); serialized_image[color_offset + 2] = (char)(((color & Bmask) >> Bshift) << Bloss); serialized_image[alpha_offset] = hascolorkey ? (char)(color != colorkey) * 255 : (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); serialized_image += 4; } } } PyObject * image_tobytes(PyObject *self, PyObject *arg) { pgSurfaceObject *surfobj; PyObject *bytes = NULL; char *format, *data; SDL_Surface *surf; int w, h, flipped = 0; Py_ssize_t len; Uint32 Rmask, Gmask, Bmask, Amask, Rshift, Gshift, Bshift, Ashift, Rloss, Gloss, Bloss, Aloss; int hascolorkey; Uint32 color, colorkey; Uint32 alpha; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure format is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(format = "inited"); #endif if (!PyArg_ParseTuple(arg, "O!s|i", &pgSurface_Type, &surfobj, &format, &flipped)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); Rmask = surf->format->Rmask; Gmask = surf->format->Gmask; Bmask = surf->format->Bmask; Amask = surf->format->Amask; Rshift = surf->format->Rshift; Gshift = surf->format->Gshift; Bshift = surf->format->Bshift; Ashift = surf->format->Ashift; Rloss = surf->format->Rloss; Gloss = surf->format->Gloss; Bloss = surf->format->Bloss; Aloss = surf->format->Aloss; hascolorkey = (SDL_GetColorKey(surf, &colorkey) == 0); if (!strcmp(format, "P")) { if (surf->format->BytesPerPixel != 1) return RAISE( PyExc_ValueError, "Can only create \"P\" format data with 8bit Surfaces"); bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); for (h = 0; h < surf->h; ++h) memcpy(DATAROW(data, h, surf->w, surf->h, flipped), (char *)surf->pixels + (h * surf->pitch), surf->w); pgSurface_Unlock(surfobj); } else if (!strcmp(format, "RGB")) { bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 3); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 1: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[0] = (char)surf->format->palette->colors[color].r; data[1] = (char)surf->format->palette->colors[color].g; data[2] = (char)surf->format->palette->colors[color].b; data += 3; } } break; case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[0] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[2] = (char)(((color & Bmask) >> Bshift) << Bloss); data += 3; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; data[0] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[2] = (char)(((color & Bmask) >> Bshift) << Bloss); data += 3; } } break; case 4: for (h = 0; h < surf->h; ++h) { Uint32 *ptr = (Uint32 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[0] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Rloss); data[2] = (char)(((color & Bmask) >> Bshift) << Rloss); data += 3; } } break; } pgSurface_Unlock(surfobj); } else if (!strcmp(format, "RGBX") || !strcmp(format, "RGBA")) { if (strcmp(format, "RGBA")) hascolorkey = 0; bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 4); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 1: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[0] = (char)surf->format->palette->colors[color].r; data[1] = (char)surf->format->palette->colors[color].g; data[2] = (char)surf->format->palette->colors[color].b; data[3] = hascolorkey ? (char)(color != colorkey) * 255 : (char)255; data += 4; } } break; case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[0] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[2] = (char)(((color & Bmask) >> Bshift) << Bloss); data[3] = hascolorkey ? (char)(color != colorkey) * 255 : (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; data[0] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[2] = (char)(((color & Bmask) >> Bshift) << Bloss); data[3] = hascolorkey ? (char)(color != colorkey) * 255 : (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 4: tobytes_surf_32bpp(surf, flipped, hascolorkey, colorkey, data, 0, 3); break; } pgSurface_Unlock(surfobj); } else if (!strcmp(format, "ARGB")) { hascolorkey = 0; bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 4); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 1: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[1] = (char)surf->format->palette->colors[color].r; data[2] = (char)surf->format->palette->colors[color].g; data[3] = (char)surf->format->palette->colors[color].b; data[0] = (char)255; data += 4; } } break; case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[1] = (char)(((color & Rmask) >> Rshift) << Rloss); data[2] = (char)(((color & Gmask) >> Gshift) << Gloss); data[3] = (char)(((color & Bmask) >> Bshift) << Bloss); data[0] = (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; data[1] = (char)(((color & Rmask) >> Rshift) << Rloss); data[2] = (char)(((color & Gmask) >> Gshift) << Gloss); data[3] = (char)(((color & Bmask) >> Bshift) << Bloss); data[0] = (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 4: tobytes_surf_32bpp(surf, flipped, hascolorkey, colorkey, data, 1, 0); break; } pgSurface_Unlock(surfobj); } else if (!strcmp(format, "BGRA")) { hascolorkey = 0; bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 4); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 1: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[2] = (char)surf->format->palette->colors[color].r; data[1] = (char)surf->format->palette->colors[color].g; data[0] = (char)surf->format->palette->colors[color].b; data[3] = (char)255; data += 4; } } break; case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[2] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[0] = (char)(((color & Bmask) >> Bshift) << Bloss); data[3] = (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; data[2] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[0] = (char)(((color & Bmask) >> Bshift) << Bloss); data[3] = (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; case 4: for (h = 0; h < surf->h; ++h) { Uint32 *ptr = (Uint32 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; data[2] = (char)(((color & Rmask) >> Rshift) << Rloss); data[1] = (char)(((color & Gmask) >> Gshift) << Gloss); data[0] = (char)(((color & Bmask) >> Bshift) << Bloss); data[3] = (char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255); data += 4; } } break; } pgSurface_Unlock(surfobj); } else if (!strcmp(format, "RGBA_PREMULT")) { if (surf->format->BytesPerPixel == 1 || surf->format->Amask == 0) return RAISE(PyExc_ValueError, "Can only create pre-multiplied alpha bytes if the " "surface has per-pixel alpha"); bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 4); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; alpha = ((color & Amask) >> Ashift) << Aloss; data[0] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[1] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[2] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); data[3] = (char)alpha; data += 4; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; alpha = ((color & Amask) >> Ashift) << Aloss; data[0] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[1] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[2] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); data[3] = (char)alpha; data += 4; } } break; case 4: for (h = 0; h < surf->h; ++h) { Uint32 *ptr = (Uint32 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; alpha = ((color & Amask) >> Ashift) << Aloss; if (alpha == 0) { data[0] = data[1] = data[2] = 0; } else { data[0] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[1] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[2] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); } data[3] = (char)alpha; data += 4; } } break; } pgSurface_Unlock(surfobj); } else if (!strcmp(format, "ARGB_PREMULT")) { if (surf->format->BytesPerPixel == 1 || surf->format->Amask == 0) return RAISE(PyExc_ValueError, "Can only create pre-multiplied alpha bytes if the " "surface has per-pixel alpha"); bytes = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)surf->w * surf->h * 4); if (!bytes) return NULL; PyBytes_AsStringAndSize(bytes, &data, &len); pgSurface_Lock(surfobj); switch (surf->format->BytesPerPixel) { case 2: for (h = 0; h < surf->h; ++h) { Uint16 *ptr = (Uint16 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; alpha = ((color & Amask) >> Ashift) << Aloss; data[1] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[2] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[3] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); data[0] = (char)alpha; data += 4; } } break; case 3: for (h = 0; h < surf->h; ++h) { Uint8 *ptr = (Uint8 *)DATAROW(surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = ptr[0] + (ptr[1] << 8) + (ptr[2] << 16); #else color = ptr[2] + (ptr[1] << 8) + (ptr[0] << 16); #endif ptr += 3; alpha = ((color & Amask) >> Ashift) << Aloss; data[1] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[2] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[3] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); data[0] = (char)alpha; data += 4; } } break; case 4: for (h = 0; h < surf->h; ++h) { Uint32 *ptr = (Uint32 *)DATAROW( surf->pixels, h, surf->pitch, surf->h, flipped); for (w = 0; w < surf->w; ++w) { color = *ptr++; alpha = ((color & Amask) >> Ashift) << Aloss; if (alpha == 0) { data[1] = data[2] = data[3] = 0; } else { data[1] = (char)((((color & Rmask) >> Rshift) << Rloss) * alpha / 255); data[2] = (char)((((color & Gmask) >> Gshift) << Gloss) * alpha / 255); data[3] = (char)((((color & Bmask) >> Bshift) << Bloss) * alpha / 255); } data[0] = (char)alpha; data += 4; } } break; } pgSurface_Unlock(surfobj); } else { return RAISE(PyExc_ValueError, "Unrecognized type of format"); } return bytes; } PyObject * image_frombytes(PyObject *self, PyObject *arg) { PyObject *bytes; char *format, *data; SDL_Surface *surf = NULL; int w, h, flipped = 0; Py_ssize_t len; int loopw, looph; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure format is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(format = "inited"); #endif if (!PyArg_ParseTuple(arg, "O!(ii)s|i", &PyBytes_Type, &bytes, &w, &h, &format, &flipped)) return NULL; if (w < 1 || h < 1) return RAISE(PyExc_ValueError, "Resolution must be nonzero positive values"); PyBytes_AsStringAndSize(bytes, &data, &len); if (!strcmp(format, "P")) { if (len != (Py_ssize_t)w * h) return RAISE( PyExc_ValueError, "Bytes length does not equal format and resolution size"); surf = SDL_CreateRGBSurface(0, w, h, 8, 0, 0, 0, 0); if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_LockSurface(surf); for (looph = 0; looph < h; ++looph) memcpy(((char *)surf->pixels) + looph * surf->pitch, DATAROW(data, looph, w, h, flipped), w); SDL_UnlockSurface(surf); } else if (!strcmp(format, "RGB")) { if (len != (Py_ssize_t)w * h * 3) return RAISE( PyExc_ValueError, "Bytes length does not equal format and resolution size"); surf = SDL_CreateRGBSurface(0, w, h, 24, 0xFF << 16, 0xFF << 8, 0xFF, 0); if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_LockSurface(surf); for (looph = 0; looph < h; ++looph) { Uint8 *pix = (Uint8 *)DATAROW(surf->pixels, looph, surf->pitch, h, flipped); for (loopw = 0; loopw < w; ++loopw) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN pix[2] = data[0]; pix[1] = data[1]; pix[0] = data[2]; #else pix[0] = data[0]; pix[1] = data[1]; pix[2] = data[2]; #endif pix += 3; data += 3; } } SDL_UnlockSurface(surf); } else if (!strcmp(format, "RGBA") || !strcmp(format, "RGBX")) { int alphamult = !strcmp(format, "RGBA"); if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Bytes length does not equal format and resolution size"); surf = SDL_CreateRGBSurface((alphamult ? SDL_SRCALPHA : 0), w, h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0xFF, 0xFF << 8, 0xFF << 16, (alphamult ? 0xFF << 24 : 0)); #else 0xFF << 24, 0xFF << 16, 0xFF << 8, (alphamult ? 0xFF : 0)); #endif if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_LockSurface(surf); for (looph = 0; looph < h; ++looph) { Uint32 *pix = (Uint32 *)DATAROW(surf->pixels, looph, surf->pitch, h, flipped); memcpy(pix, data, w * sizeof(Uint32)); data += w * sizeof(Uint32); } SDL_UnlockSurface(surf); } else if (!strcmp(format, "BGRA")) { if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Bytes length does not equal format and resolution size"); surf = SDL_CreateRGBSurface(SDL_SRCALPHA, w, h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0xFF << 16, 0xFF << 8, 0xFF, 0xFF << 24); #else 0xFF << 8, 0xFF << 16, 0xFF << 24, 0xFF); #endif if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_LockSurface(surf); for (looph = 0; looph < h; ++looph) { Uint32 *pix = (Uint32 *)DATAROW(surf->pixels, looph, surf->pitch, h, flipped); memcpy(pix, data, w * sizeof(Uint32)); data += w * sizeof(Uint32); } SDL_UnlockSurface(surf); } else if (!strcmp(format, "ARGB")) { if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Bytes length does not equal format and resolution size"); surf = SDL_CreateRGBSurface(SDL_SRCALPHA, w, h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0xFF << 8, 0xFF << 16, 0xFF << 24, 0xFF); #else 0xFF << 16, 0xFF << 8, 0xFF, 0xFF << 24); #endif if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_LockSurface(surf); for (looph = 0; looph < h; ++looph) { Uint32 *pix = (Uint32 *)DATAROW(surf->pixels, looph, surf->pitch, h, flipped); memcpy(pix, data, w * sizeof(Uint32)); data += w * sizeof(Uint32); } SDL_UnlockSurface(surf); } else return RAISE(PyExc_ValueError, "Unrecognized type of format"); return (PyObject *)pgSurface_New(surf); } static int _as_read_buffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len) { Py_buffer view; if (obj == NULL || buffer == NULL || buffer_len == NULL) { return -1; } if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) != 0) return -1; *buffer = view.buf; *buffer_len = view.len; PyBuffer_Release(&view); return 0; } /* pgObject_AsCharBuffer is backwards compatible for PyObject_AsCharBuffer. Because PyObject_AsCharBuffer is deprecated. */ int pgObject_AsCharBuffer(PyObject *obj, const char **buffer, Py_ssize_t *buffer_len) { return _as_read_buffer(obj, (const void **)buffer, buffer_len); } PyObject * image_frombuffer(PyObject *self, PyObject *arg) { PyObject *buffer; char *format, *data; SDL_Surface *surf = NULL; int w, h; Py_ssize_t len; pgSurfaceObject *surfobj; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure format is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(format = "inited"); #endif if (!PyArg_ParseTuple(arg, "O(ii)s|i", &buffer, &w, &h, &format)) return NULL; if (w < 1 || h < 1) return RAISE(PyExc_ValueError, "Resolution must be nonzero positive values"); /* breaking constness here, we should really not change this string */ if (pgObject_AsCharBuffer(buffer, (const char **)&data, &len) == -1) return NULL; if (!strcmp(format, "P")) { if (len != (Py_ssize_t)w * h) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); surf = SDL_CreateRGBSurfaceFrom(data, w, h, 8, w, 0, 0, 0, 0); } else if (!strcmp(format, "RGB")) { if (len != (Py_ssize_t)w * h * 3) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); #if SDL_BYTEORDER == SDL_LIL_ENDIAN surf = SDL_CreateRGBSurfaceFrom(data, w, h, 24, w * 3, 0xFF, 0xFF << 8, 0xFF << 16, 0); #else surf = SDL_CreateRGBSurfaceFrom(data, w, h, 24, w * 3, 0xFF << 16, 0xFF << 8, 0xFF, 0); #endif } else if (!strcmp(format, "BGR")) { if (len != (Py_ssize_t)w * h * 3) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); #if SDL_BYTEORDER == SDL_LIL_ENDIAN surf = SDL_CreateRGBSurfaceFrom(data, w, h, 24, w * 3, 0xFF << 16, 0xFF << 8, 0xFF, 0); #else surf = SDL_CreateRGBSurfaceFrom(data, w, h, 24, w * 3, 0xFF, 0xFF << 8, 0xFF << 16, 0); #endif } else if (!strcmp(format, "BGRA")) { if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); #if SDL_BYTEORDER == SDL_LIL_ENDIAN surf = SDL_CreateRGBSurfaceFrom(data, w, h, 32, w * 4, 0xFF << 16, 0xFF << 8, 0xFF, 0xFF << 24); #else surf = SDL_CreateRGBSurfaceFrom(data, w, h, 32, w * 4, 0xFF << 8, 0xFF << 16, 0xFF << 24, 0xFF); #endif } else if (!strcmp(format, "RGBA") || !strcmp(format, "RGBX")) { int alphamult = !strcmp(format, "RGBA"); if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); surf = SDL_CreateRGBSurfaceFrom(data, w, h, 32, w * 4, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0xFF, 0xFF << 8, 0xFF << 16, (alphamult ? 0xFF << 24 : 0)); #else 0xFF << 24, 0xFF << 16, 0xFF << 8, (alphamult ? 0xFF : 0)); #endif if (alphamult) surf->flags |= SDL_SRCALPHA; } else if (!strcmp(format, "ARGB")) { if (len != (Py_ssize_t)w * h * 4) return RAISE( PyExc_ValueError, "Buffer length does not equal format and resolution size"); surf = SDL_CreateRGBSurfaceFrom(data, w, h, 32, w * 4, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0xFF << 8, 0xFF << 16, 0xFF << 24, 0xFF); #else 0xFF << 16, 0xFF << 8, 0xFF, 0xFF << 24); #endif surf->flags |= SDL_SRCALPHA; } else return RAISE(PyExc_ValueError, "Unrecognized type of format"); if (!surf) return RAISE(pgExc_SDLError, SDL_GetError()); surfobj = (pgSurfaceObject *)pgSurface_New(surf); Py_INCREF(buffer); surfobj->dependency = buffer; return (PyObject *)surfobj; } /*******************************************************/ /* tga code by Mattias Engdegard, in the public domain */ /*******************************************************/ struct TGAheader { Uint8 infolen; /* length of info field */ Uint8 has_cmap; /* 1 if image has colormap, 0 otherwise */ Uint8 type; Uint8 cmap_start[2]; /* index of first colormap entry */ Uint8 cmap_len[2]; /* number of entries in colormap */ Uint8 cmap_bits; /* bits per colormap entry */ Uint8 yorigin[2]; /* image origin (ignored here) */ Uint8 xorigin[2]; Uint8 width[2]; /* image size */ Uint8 height[2]; Uint8 pixel_bits; /* bits/pixel */ Uint8 flags; }; enum tga_type { TGA_TYPE_INDEXED = 1, TGA_TYPE_RGB = 2, TGA_TYPE_BW = 3, TGA_TYPE_RLE = 8 /* additive */ }; #define TGA_INTERLEAVE_MASK 0xc0 #define TGA_INTERLEAVE_NONE 0x00 #define TGA_INTERLEAVE_2WAY 0x40 #define TGA_INTERLEAVE_4WAY 0x80 #define TGA_ORIGIN_MASK 0x30 #define TGA_ORIGIN_LEFT 0x00 #define TGA_ORIGIN_RIGHT 0x10 #define TGA_ORIGIN_LOWER 0x00 #define TGA_ORIGIN_UPPER 0x20 /* read/write unaligned little-endian 16-bit ints */ #define LE16(p) ((p)[0] + ((p)[1] << 8)) #define SETLE16(p, v) ((p)[0] = (v), (p)[1] = (v) >> 8) #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #define TGA_RLE_MAX 128 /* max length of a TGA RLE chunk */ /* return the number of bytes in the resulting buffer after RLE-encoding a line of TGA data */ static int rle_line(Uint8 *src, Uint8 *dst, int w, int bpp) { int x = 0; int out = 0; int raw = 0; while (x < w) { Uint32 pix; int x0 = x; memcpy(&pix, src + x * bpp, bpp); x++; while (x < w && memcmp(&pix, src + x * bpp, bpp) == 0 && x - x0 < TGA_RLE_MAX) x++; /* use a repetition chunk iff the repeated pixels would consume two bytes or more */ if ((x - x0 - 1) * bpp >= 2 || x == w) { /* output previous raw chunks */ while (raw < x0) { int n = MIN(TGA_RLE_MAX, x0 - raw); dst[out++] = n - 1; memcpy(dst + out, src + raw * bpp, (size_t)n * bpp); out += n * bpp; raw += n; } if (x - x0 > 0) { /* output new repetition chunk */ dst[out++] = 0x7f + x - x0; memcpy(dst + out, &pix, bpp); out += bpp; } raw = x; } } return out; } /* * Save a surface to an output stream in TGA format. * 8bpp surfaces are saved as indexed images with 24bpp palette, or with * 32bpp palette if colourkeying is used. * 15, 16, 24 and 32bpp surfaces are saved as 24bpp RGB images, * or as 32bpp RGBA images if alpha channel is used. * * RLE compression is not used in the output file. * * Returns -1 upon error, 0 if success */ static int SaveTGA_RW(SDL_Surface *surface, SDL_RWops *out, int rle) { SDL_Surface *linebuf = NULL; int alpha = 0; struct TGAheader h; int srcbpp; Uint8 surf_alpha; int have_surf_colorkey = 0; Uint32 surf_colorkey; Uint32 rmask, gmask, bmask, amask; SDL_Rect r; int bpp; Uint8 *rlebuf = NULL; h.infolen = 0; SETLE16(h.cmap_start, 0); srcbpp = surface->format->BitsPerPixel; if (srcbpp < 8) { SDL_SetError("cannot save <8bpp images as TGA"); return -1; } SDL_GetSurfaceAlphaMod(surface, &surf_alpha); have_surf_colorkey = (SDL_GetColorKey(surface, &surf_colorkey) == 0); if (srcbpp == 8) { h.has_cmap = 1; h.type = TGA_TYPE_INDEXED; if (have_surf_colorkey) h.cmap_bits = 32; else h.cmap_bits = 24; SETLE16(h.cmap_len, surface->format->palette->ncolors); h.pixel_bits = 8; rmask = gmask = bmask = amask = 0; } else { h.has_cmap = 0; h.type = TGA_TYPE_RGB; h.cmap_bits = 0; SETLE16(h.cmap_len, 0); if (surface->format->Amask) { alpha = 1; h.pixel_bits = 32; } else h.pixel_bits = 24; #if SDL_BYTEORDER == SDL_BIG_ENDIAN int s = alpha ? 0 : 8; amask = 0x000000ff >> s; rmask = 0x0000ff00 >> s; gmask = 0x00ff0000 >> s; bmask = 0xff000000 >> s; #else /* SDL_BYTEORDER != SDL_BIG_ENDIAN */ amask = alpha ? 0xff000000 : 0; rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff; #endif /* SDL_BYTEORDER != SDL_BIG_ENDIAN */ } bpp = h.pixel_bits >> 3; if (rle) h.type += TGA_TYPE_RLE; SETLE16(h.yorigin, 0); SETLE16(h.xorigin, 0); SETLE16(h.width, surface->w); SETLE16(h.height, surface->h); h.flags = TGA_ORIGIN_UPPER | (alpha ? 8 : 0); if (!SDL_RWwrite(out, &h, sizeof(h), 1)) return -1; if (h.has_cmap) { int i; SDL_Palette *pal = surface->format->palette; Uint8 entry[4]; for (i = 0; i < pal->ncolors; i++) { entry[0] = pal->colors[i].b; entry[1] = pal->colors[i].g; entry[2] = pal->colors[i].r; entry[3] = ((unsigned)i == surf_colorkey) ? 0 : 0xff; if (!SDL_RWwrite(out, entry, h.cmap_bits >> 3, 1)) return -1; } } linebuf = SDL_CreateRGBSurface(SDL_SWSURFACE, surface->w, 1, h.pixel_bits, rmask, gmask, bmask, amask); if (!linebuf) return -1; if (h.has_cmap) { if (0 != SDL_SetPaletteColors(linebuf->format->palette, surface->format->palette->colors, 0, surface->format->palette->ncolors)) { /* SDL error already set. */ goto error; } } if (rle) { rlebuf = malloc(bpp * surface->w + 1 + surface->w / TGA_RLE_MAX); if (!rlebuf) { SDL_SetError("out of memory"); goto error; } } /* Temporarily remove colourkey and alpha from surface so copies are opaque */ SDL_SetSurfaceAlphaMod(surface, SDL_ALPHA_OPAQUE); if (have_surf_colorkey) SDL_SetColorKey(surface, SDL_FALSE, surf_colorkey); r.x = 0; r.w = surface->w; r.h = 1; for (r.y = 0; r.y < surface->h; r.y++) { int n; void *buf; if (SDL_BlitSurface(surface, &r, linebuf, NULL) < 0) break; if (rle) { buf = rlebuf; n = rle_line(linebuf->pixels, rlebuf, surface->w, bpp); } else { buf = linebuf->pixels; n = surface->w * bpp; } if (!SDL_RWwrite(out, buf, n, 1)) break; } /* restore flags */ SDL_SetSurfaceAlphaMod(surface, surf_alpha); if (have_surf_colorkey) SDL_SetColorKey(surface, SDL_TRUE, surf_colorkey); free(rlebuf); SDL_FreeSurface(linebuf); return 0; error: free(rlebuf); SDL_FreeSurface(linebuf); return -1; } static int SaveTGA(SDL_Surface *surface, const char *file, int rle) { SDL_RWops *out = SDL_RWFromFile(file, "wb"); int ret; if (!out) return -1; ret = SaveTGA_RW(surface, out, rle); SDL_RWclose(out); return ret; } static PyMethodDef _image_methods[] = { {"load_basic", (PyCFunction)image_load_basic, METH_O, DOC_PYGAMEIMAGELOADBASIC}, {"load_extended", image_load_extended, METH_VARARGS, DOC_PYGAMEIMAGELOADEXTENDED}, {"load", image_load, METH_VARARGS, DOC_PYGAMEIMAGELOAD}, {"save_extended", image_save_extended, METH_VARARGS, DOC_PYGAMEIMAGESAVEEXTENDED}, {"save", image_save, METH_VARARGS, DOC_PYGAMEIMAGESAVE}, {"get_extended", (PyCFunction)image_get_extended, METH_NOARGS, DOC_PYGAMEIMAGEGETEXTENDED}, {"get_sdl_image_version", (PyCFunction)image_get_sdl_image_version, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEIMAGEGETSDLIMAGEVERSION}, {"tostring", image_tobytes, METH_VARARGS, DOC_PYGAMEIMAGETOSTRING}, {"tobytes", image_tobytes, METH_VARARGS, DOC_PYGAMEIMAGETOBYTES}, {"fromstring", image_frombytes, METH_VARARGS, DOC_PYGAMEIMAGEFROMSTRING}, {"frombytes", image_frombytes, METH_VARARGS, DOC_PYGAMEIMAGEFROMBYTES}, {"frombuffer", image_frombuffer, METH_VARARGS, DOC_PYGAMEIMAGEFROMBUFFER}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(image) { PyObject *module; PyObject *extmodule; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "image", DOC_PYGAMEIMAGE, -1, _image_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } /* try to get extended formats */ extmodule = PyImport_ImportModule(IMPPREFIX "imageext"); if (extmodule) { extloadobj = PyObject_GetAttrString(extmodule, "load_extended"); if (!extloadobj) { goto error; } extsaveobj = PyObject_GetAttrString(extmodule, "save_extended"); if (!extsaveobj) { goto error; } extverobj = PyObject_GetAttrString(extmodule, "_get_sdl_image_version"); if (!extverobj) { goto error; } Py_DECREF(extmodule); } else { // if the module could not be loaded, dont treat it like an error PyErr_Clear(); } return module; error: Py_XDECREF(extloadobj); Py_XDECREF(extsaveobj); Py_XDECREF(extverobj); Py_DECREF(extmodule); Py_DECREF(module); return NULL; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/imageext.c0000644000175100001770000003427114676242340015466 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2006 Rene Dudfield This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * extended image module for pygame, note this only has * the extended load and save functions, which are automatically used * by the normal pygame.image module if it is available. */ #include "pygame.h" /* Keep a stray macro from conflicting with python.h */ #if defined(HAVE_PROTOTYPES) #undef HAVE_PROTOTYPES #endif /* Remove GCC macro redefine warnings. */ #if defined(HAVE_STDDEF_H) /* also defined in pygame.h (python.h) */ #undef HAVE_STDDEF_H #endif #if defined(HAVE_STDLIB_H) /* also defined in pygame.h (SDL.h) */ #undef HAVE_STDLIB_H #endif // PNG_SKIP_SETJMP_CHECK : non-regression on #662 (build error on old libpng) #define PNG_SKIP_SETJMP_CHECK #include #include "pgcompat.h" #include "doc/image_doc.h" #include "pgopengl.h" #include #ifdef WIN32 #define strcasecmp _stricmp #else #include #endif #include #define JPEG_QUALITY 85 /* #ifdef WITH_THREAD static SDL_mutex *_pg_img_mutex = 0; #endif */ #ifdef WIN32 #include #define pg_RWflush(rwops) \ (FlushFileBuffers((HANDLE)(rwops)->hidden.windowsio.h) ? 0 : -1) #else /* ~WIN32 */ #define pg_RWflush(rwops) (fflush((rwops)->hidden.stdio.fp) ? -1 : 0) #endif /* ~WIN32 */ static char * iext_find_extension(char *fullname) { char *dot; if (fullname == NULL) { return NULL; } dot = strrchr(fullname, '.'); if (dot == NULL) { return fullname; } return dot + 1; } static PyObject * image_load_ext(PyObject *self, PyObject *arg) { PyObject *obj; PyObject *final; char *name = NULL, *ext = NULL, *type = NULL; SDL_Surface *surf; SDL_RWops *rw = NULL; if (!PyArg_ParseTuple(arg, "O|s", &obj, &name)) { return NULL; } rw = pgRWops_FromObject(obj, &ext); if (rw == NULL) /* stop on NULL, error already set */ return NULL; if (name) { /* override extension with namehint if given */ type = iext_find_extension(name); } else { /* Otherwise type should be whatever ext is, even if ext is NULL */ type = ext; } #ifdef WITH_THREAD /* if (ext) lock_mutex = !strcasecmp(ext, "gif"); */ Py_BEGIN_ALLOW_THREADS; /* using multiple threads does not work for (at least) SDL_image * <= 2.0.4 SDL_LockMutex(_pg_img_mutex); surf = IMG_LoadTyped_RW(rw, 1, ext); SDL_UnlockMutex(_pg_img_mutex); */ surf = IMG_LoadTyped_RW(rw, 1, type); Py_END_ALLOW_THREADS; #else /* ~WITH_THREAD */ surf = IMG_LoadTyped_RW(rw, 1, type); #endif /* ~WITH_THREAD */ if (ext) { free(ext); } if (surf == NULL) return RAISE(pgExc_SDLError, IMG_GetError()); final = (PyObject *)pgSurface_New(surf); if (final == NULL) { SDL_FreeSurface(surf); } return final; } /* This entire png saving code is directly copied from the SDL_image source * (with minor changes) * Eventually this should be removed, and we should start using the SDL_image * functions directly */ #ifdef PNG_H #if SDL_BYTEORDER == SDL_LIL_ENDIAN static const Uint32 png_format = SDL_PIXELFORMAT_ABGR8888; #else static const Uint32 png_format = SDL_PIXELFORMAT_RGBA8888; #endif static void png_write_fn(png_structp png_ptr, png_bytep data, png_size_t length) { SDL_RWops *rwops = (SDL_RWops *)png_get_io_ptr(png_ptr); if (SDL_RWwrite(rwops, data, 1, length) != length) { SDL_RWclose(rwops); png_error(png_ptr, "Error while writing to the PNG file (SDL_RWwrite)"); } } static void png_flush_fn(png_structp png_ptr) { SDL_RWops *rwops = (SDL_RWops *)png_get_io_ptr(png_ptr); if (pg_RWflush(rwops)) { SDL_RWclose(rwops); png_error(png_ptr, "Error while writing to PNG file (flush)"); } } static int pg_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst) { if (dst) { png_structp png_ptr; png_infop info_ptr; png_colorp color_ptr = NULL; Uint8 transparent_table[256]; SDL_Surface *source = surface; SDL_Palette *palette; int png_color_type = PNG_COLOR_TYPE_RGB_ALPHA; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) { IMG_SetError( "Couldn't allocate memory for PNG file or incompatible PNG " "dll"); return -1; } info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { png_destroy_write_struct(&png_ptr, NULL); IMG_SetError("Couldn't create image information for PNG file"); return -1; } #ifdef PNG_SETJMP_SUPPORTED #ifndef LIBPNG_VERSION_12 if (setjmp(*png_set_longjmp_fn(png_ptr, longjmp, sizeof(jmp_buf)))) #else if (setjmp(png_ptr->jmpbuf)) #endif #endif { png_destroy_write_struct(&png_ptr, &info_ptr); IMG_SetError("Error writing the PNG file."); return -1; } palette = surface->format->palette; if (palette) { const int ncolors = palette->ncolors; int i; int last_transparent = -1; color_ptr = (png_colorp)SDL_malloc(sizeof(png_colorp) * ncolors); if (color_ptr == NULL) { png_destroy_write_struct(&png_ptr, &info_ptr); IMG_SetError("Couldn't create palette for PNG file"); return -1; } for (i = 0; i < ncolors; i++) { color_ptr[i].red = palette->colors[i].r; color_ptr[i].green = palette->colors[i].g; color_ptr[i].blue = palette->colors[i].b; if (palette->colors[i].a != 255) { last_transparent = i; } } png_set_PLTE(png_ptr, info_ptr, color_ptr, ncolors); png_color_type = PNG_COLOR_TYPE_PALETTE; if (last_transparent >= 0) { for (i = 0; i <= last_transparent; ++i) { transparent_table[i] = palette->colors[i].a; } png_set_tRNS(png_ptr, info_ptr, transparent_table, last_transparent + 1, NULL); } } else if (surface->format->format == SDL_PIXELFORMAT_RGB24) { /* If the surface is exactly the right RGB format it is just passed * through */ png_color_type = PNG_COLOR_TYPE_RGB; } else if (!SDL_ISPIXELFORMAT_ALPHA(surface->format->format)) { /* If the surface is not exactly the right RGB format but does not have alpha information, it should be converted to RGB24 before being passed through */ png_color_type = PNG_COLOR_TYPE_RGB; source = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_RGB24, 0); } else if (surface->format->format != png_format) { /* Otherwise, (surface has alpha data), and it is not in the exact right format , so it should be converted to that */ source = SDL_ConvertSurfaceFormat(surface, png_format, 0); } png_set_write_fn(png_ptr, dst, png_write_fn, png_flush_fn); png_set_IHDR(png_ptr, info_ptr, surface->w, surface->h, 8, png_color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); if (source) { png_bytep *row_pointers; int row; row_pointers = (png_bytep *)SDL_malloc(sizeof(png_bytep) * source->h); if (!row_pointers) { png_destroy_write_struct(&png_ptr, &info_ptr); IMG_SetError("Out of memory"); return -1; } for (row = 0; row < (int)source->h; row++) { row_pointers[row] = (png_bytep)(Uint8 *)source->pixels + row * source->pitch; } png_set_rows(png_ptr, info_ptr, row_pointers); png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL); SDL_free(row_pointers); if (source != surface) { SDL_FreeSurface(source); } } png_destroy_write_struct(&png_ptr, &info_ptr); if (color_ptr) { SDL_free(color_ptr); } if (freedst) { SDL_RWclose(dst); } } else { IMG_SetError("Passed NULL dst"); return -1; } return 0; } int pg_SavePNG(SDL_Surface *surface, const char *file) { SDL_RWops *dst = SDL_RWFromFile(file, "wb"); if (dst) { return pg_SavePNG_RW(surface, dst, 1); } else { return -1; } } #endif /* end if PNG_H */ static PyObject * image_save_ext(PyObject *self, PyObject *arg) { pgSurfaceObject *surfobj; PyObject *obj; char *namehint = NULL; PyObject *oencoded = NULL; SDL_Surface *surf; int result = 1; char *name = NULL; SDL_RWops *rw = NULL; if (!PyArg_ParseTuple(arg, "O!O|s", &pgSurface_Type, &surfobj, &obj, &namehint)) { return NULL; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pgSurface_Prep(surfobj); oencoded = pg_EncodeString(obj, "UTF-8", NULL, pgExc_SDLError); if (oencoded == NULL) { result = -2; } else if (oencoded == Py_None) { rw = pgRWops_FromFileObject(obj); if (rw == NULL) { PyErr_Format(PyExc_TypeError, "Expected a string or file object for the file " "argument: got %.1024s", Py_TYPE(obj)->tp_name); result = -2; } else { name = namehint; } } else { name = PyBytes_AS_STRING(oencoded); } if (result > 0) { char *ext = iext_find_extension(name); if (!strcasecmp(ext, "jpeg") || !strcasecmp(ext, "jpg")) { if (rw != NULL) { result = IMG_SaveJPG_RW(surf, rw, 0, JPEG_QUALITY); } else { result = IMG_SaveJPG(surf, name, JPEG_QUALITY); } } else if (!strcasecmp(ext, "png")) { #ifdef PNG_H /*Py_BEGIN_ALLOW_THREADS; */ if (rw != NULL) { result = pg_SavePNG_RW(surf, rw, 0); } else { result = pg_SavePNG(surf, name); } /*Py_END_ALLOW_THREADS; */ #else PyErr_SetString(pgExc_SDLError, "No support for png compiled in."); result = -2; #endif /* ~PNG_H */ } } pgSurface_Unprep(surfobj); Py_XDECREF(oencoded); if (result == -2) { /* Python error raised elsewhere */ return NULL; } if (result == -1) { /* SDL error: translate to Python error */ return RAISE(pgExc_SDLError, SDL_GetError()); } if (result == 1) { return RAISE(pgExc_SDLError, "Unrecognized image type"); } Py_RETURN_NONE; } static PyObject * imageext_get_sdl_image_version(PyObject *self, PyObject *args, PyObject *kwargs) { int linked = 1; static char *keywords[] = {"linked", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) { return NULL; } if (linked) { SDL_version v; SDL_IMAGE_VERSION(&v); return Py_BuildValue("iii", v.major, v.minor, v.patch); } else { const SDL_version *v = IMG_Linked_Version(); return Py_BuildValue("iii", v->major, v->minor, v->patch); } } /* static void _imageext_free(void *ptr) { #ifdef WITH_THREAD if (_pg_img_mutex) { SDL_DestroyMutex(_pg_img_mutex); _pg_img_mutex = 0; } #endif } */ static PyMethodDef _imageext_methods[] = { {"load_extended", image_load_ext, METH_VARARGS, DOC_PYGAMEIMAGE}, {"save_extended", image_save_ext, METH_VARARGS, DOC_PYGAMEIMAGE}, {"_get_sdl_image_version", (PyCFunction)imageext_get_sdl_image_version, METH_VARARGS | METH_KEYWORDS, "_get_sdl_image_version() -> (major, minor, patch)\n" "Note: Should not be used directly."}, {NULL, NULL, 0, NULL}}; /*DOC*/ static char _imageext_doc[] = /*DOC*/ "additional image loaders"; MODINIT_DEFINE(imageext) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "imageext", _imageext_doc, -1, _imageext_methods, NULL, NULL, NULL, NULL}; /* _imageext_free commented */ /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } /* #ifdef WITH_THREAD _pg_img_mutex = SDL_CreateMutex(); if (!_pg_img_mutex) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } #endif */ /* create the module */ return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0611258 pygame-2.6.1/src_c/include/0000755000175100001770000000000014676242436015141 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/include/_pygame.h0000644000175100001770000007334414676242340016740 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #ifndef _PYGAME_H #define _PYGAME_H /** This header file includes all the definitions for the ** base pygame extensions. This header only requires ** Python includes (and SDL.h for functions that use SDL types). ** The reason for functions prototyped with #define's is ** to allow for maximum Python portability. It also uses ** Python as the runtime linker, which allows for late binding. '' For more information on this style of development, read ** the Python docs on this subject. ** http://www.python.org/doc/current/ext/using-cobjects.html ** ** If using this to build your own derived extensions, ** you'll see that the functions available here are mainly ** used to help convert between python objects and SDL objects. ** Since this library doesn't add a lot of functionality to ** the SDL library, it doesn't need to offer a lot either. ** ** When initializing your extension module, you must manually ** import the modules you want to use. (this is the part about ** using python as the runtime linker). Each module has its ** own import_xxx() routine. You need to perform this import ** after you have initialized your own module, and before ** you call any routines from that module. Since every module ** in pygame does this, there are plenty of examples. ** ** The base module does include some useful conversion routines ** that you are free to use in your own extension. **/ #include "pgplatform.h" #include /* version macros (defined since version 1.9.5) */ #define PG_MAJOR_VERSION 2 #define PG_MINOR_VERSION 6 #define PG_PATCH_VERSION 1 #define PG_VERSIONNUM(MAJOR, MINOR, PATCH) \ (1000 * (MAJOR) + 100 * (MINOR) + (PATCH)) #define PG_VERSION_ATLEAST(MAJOR, MINOR, PATCH) \ (PG_VERSIONNUM(PG_MAJOR_VERSION, PG_MINOR_VERSION, PG_PATCH_VERSION) >= \ PG_VERSIONNUM(MAJOR, MINOR, PATCH)) #include "pgcompat.h" /* Flag indicating a pg_buffer; used for assertions within callbacks */ #ifndef NDEBUG #define PyBUF_PYGAME 0x4000 #endif #define PyBUF_HAS_FLAG(f, F) (((f) & (F)) == (F)) /* Array information exchange struct C type; inherits from Py_buffer * * Pygame uses its own Py_buffer derived C struct as an internal representation * of an imported array buffer. The extended Py_buffer allows for a * per-instance release callback, */ typedef void (*pybuffer_releaseproc)(Py_buffer *); typedef struct pg_bufferinfo_s { Py_buffer view; PyObject *consumer; /* Input: Borrowed reference */ pybuffer_releaseproc release_buffer; } pg_buffer; #include "pgimport.h" /* * BASE module */ #ifndef PYGAMEAPI_BASE_INTERNAL #define pgExc_SDLError ((PyObject *)PYGAMEAPI_GET_SLOT(base, 0)) #define pg_RegisterQuit \ (*(void (*)(void (*)(void)))PYGAMEAPI_GET_SLOT(base, 1)) /** * \brief Convert number like object *obj* to C int and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ #define pg_IntFromObj \ (*(int (*)(PyObject *, int *))PYGAMEAPI_GET_SLOT(base, 2)) /** * \brief Convert number like object at position *i* in sequence *obj* * to C int and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ #define pg_IntFromObjIndex \ (*(int (*)(PyObject *, int, int *))PYGAMEAPI_GET_SLOT(base, 3)) /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * int and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C integer to store the result. * \param val2 A pointer to the C integer to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. * \note This function will convert floats to integers. */ #define pg_TwoIntsFromObj \ (*(int (*)(PyObject *, int *, int *))PYGAMEAPI_GET_SLOT(base, 4)) /** * \brief Convert number like object *obj* to C float and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ #define pg_FloatFromObj \ (*(int (*)(PyObject *, float *))PYGAMEAPI_GET_SLOT(base, 5)) /** * \brief Convert number like object at position *i* in sequence *obj* to C * float and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ #define pg_FloatFromObjIndex \ (*(int (*)(PyObject *, int, float *))PYGAMEAPI_GET_SLOT(base, 6)) /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * float and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C float to store the result. * \param val2 A pointer to the C float to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ #define pg_TwoFloatsFromObj \ (*(int (*)(PyObject *, float *, float *))PYGAMEAPI_GET_SLOT(base, 7)) /** * \brief Convert number like object *obj* to C Uint32 and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C int to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ #define pg_UintFromObj \ (*(int (*)(PyObject *, Uint32 *))PYGAMEAPI_GET_SLOT(base, 8)) /** * \brief Convert number like object at position *i* in sequence *obj* to C * Uint32 and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C int to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ #define pg_UintFromObjIndex \ (*(int (*)(PyObject *, int, Uint32 *))PYGAMEAPI_GET_SLOT(base, 9)) /** * \brief Initialize all of the pygame modules. * \returns 1 on success, 0 on failure with PyErr set. */ #define pg_mod_autoinit (*(int (*)(const char *))PYGAMEAPI_GET_SLOT(base, 10)) /** * \brief Quit all of the pygame modules. */ #define pg_mod_autoquit (*(void (*)(const char *))PYGAMEAPI_GET_SLOT(base, 11)) /** * \brief Convert the color represented by object *obj* into a red, green, * blue, alpha length 4 C array *RGBA*. * * The object must be a length 3 or 4 sequence of numbers having values between * 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is * assumed. * * \param obj The Python object to convert. * \param RGBA A pointer to the C array to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ #define pg_RGBAFromObj \ (*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(base, 12)) /** * \brief Given a Py_buffer, return a python dictionary representing the array * interface. * * \param view_p A pointer to the Py_buffer to convert to a dictionary. * * \returns A Python dictionary representing the array interface of the object. */ #define pgBuffer_AsArrayInterface \ (*(PyObject * (*)(Py_buffer *)) PYGAMEAPI_GET_SLOT(base, 13)) /** * \brief Given a Py_buffer, return a python capsule representing the array * interface. * * \param view_p A pointer to the Py_buffer to convert to a capsule. * * \returns A Python capsule representing the array interface of the object. */ #define pgBuffer_AsArrayStruct \ (*(PyObject * (*)(Py_buffer *)) PYGAMEAPI_GET_SLOT(base, 14)) /** * \brief Get a buffer object from a given Python object. * * \param obj The Python object to get the buffer from. * \param pg_view_p A pointer to a pg_buffer struct to store the buffer in. * \param flags The desired buffer access mode. * * \returns 0 on success, -1 on failure. * * \note This function attempts to get a buffer object from a given Python * object. If the object supports the buffer protocol, it will be used to * create the buffer. If not, it will try to get an array interface or * dictionary representation of the object and use that to create the buffer. * If none of these methods work, it will raise a ValueError. * */ #define pgObject_GetBuffer \ (*(int (*)(PyObject *, pg_buffer *, int))PYGAMEAPI_GET_SLOT(base, 15)) /** * \brief Release a pg_buffer object. * * \param pg_view_p The pg_buffer object to release. * * \note This function releases a pg_buffer object. * \note some calls to this function expect this function to not clear * previously set errors. */ #define pgBuffer_Release (*(void (*)(pg_buffer *))PYGAMEAPI_GET_SLOT(base, 16)) /** * \brief Write the array interface dictionary buffer description *dict* into a * Pygame buffer description struct *pg_view_p*. * * \param pg_view_p The Pygame buffer description struct to write into. * \param dict The array interface dictionary to read from. * \param flags The PyBUF flags describing the view type requested. * * \returns 0 on success, or -1 on failure. */ #define pgDict_AsBuffer \ (*(int (*)(pg_buffer *, PyObject *, int))PYGAMEAPI_GET_SLOT(base, 17)) #define pgExc_BufferError ((PyObject *)PYGAMEAPI_GET_SLOT(base, 18)) /** * \brief Get the default SDL window created by a pygame.display.set_mode() * call, or *NULL*. * * \return The default window, or *NULL* if no window has been created. */ #define pg_GetDefaultWindow \ (*(SDL_Window * (*)(void)) PYGAMEAPI_GET_SLOT(base, 19)) /** * \brief Set the default SDL window created by a pygame.display.set_mode() * call. The previous window, if any, is destroyed. Argument *win* may be * *NULL*. This function is called by pygame.display.set_mode(). * * \param win The new default window. May be NULL. */ #define pg_SetDefaultWindow \ (*(void (*)(SDL_Window *))PYGAMEAPI_GET_SLOT(base, 20)) /** * \brief Return a borrowed reference to the Pygame default window display * surface, or *NULL* if no default window is open. * * \return The default renderer, or *NULL* if no renderer has been created. */ #define pg_GetDefaultWindowSurface \ (*(pgSurfaceObject * (*)(void)) PYGAMEAPI_GET_SLOT(base, 21)) /** * \brief Set the Pygame default window display surface. The previous * surface, if any, is destroyed. Argument *screen* may be *NULL*. This * function is called by pygame.display.set_mode(). * * \param screen The new default window display surface. May be NULL. */ #define pg_SetDefaultWindowSurface \ (*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(base, 22)) /** * \returns NULL if the environment variable PYGAME_BLEND_ALPHA_SDL2 is not * set, otherwise returns a pointer to the environment variable. */ #define pg_EnvShouldBlendAlphaSDL2 \ (*(char *(*)(void))PYGAMEAPI_GET_SLOT(base, 23)) /** * \brief Convert number like object *obj* to C double and in *val*. * * \param obj The Python object to convert. * \param val A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ #define pg_DoubleFromObj \ (*(int (*)(PyObject *, double *))PYGAMEAPI_GET_SLOT(base, 24)) /** * \brief Convert number like object at position *i* in sequence *obj* to C * double and place in argument *val*. * * \param obj The Python object to convert. * \param i The index of the object to convert. * \param val A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. * * \note This function will clear any Python errors. */ #define pg_DoubleFromObjIndex \ (*(int (*)(PyObject *, int, double *))PYGAMEAPI_GET_SLOT(base, 25)) /** * \brief Convert the two number like objects in length 2 sequence *obj* to C * double and place in arguments *val1* and *val2*. * * \param obj The Python two element sequence object to convert. * \param val A pointer to the C double to store the result. * \param val2 A pointer to the C double to store the result. * \returns 1 if the conversion was successful, 0 otherwise. */ #define pg_TwoDoublesFromObj \ (*(int (*)(PyObject *, double *, double *))PYGAMEAPI_GET_SLOT(base, 26)) #define import_pygame_base() IMPORT_PYGAME_MODULE(base) #endif /* ~PYGAMEAPI_BASE_INTERNAL */ typedef struct { /** * \brief The SDL rect wrapped by this object. */ PyObject_HEAD SDL_Rect r; /** * \brief A list of weak references to this rect. */ PyObject *weakreflist; } pgRectObject; /** * \brief Convert a pgRectObject to an SDL_Rect. * * \param obj A pgRectObject instance. * \returns the SDL_Rect field of *obj*, a pgRect_Type instance. * * \note SDL_Rect pgRect_AsRect(PyObject *obj) */ #define pgRect_AsRect(x) (((pgRectObject *)x)->r) #ifndef PYGAMEAPI_RECT_INTERNAL /** * \brief The Pygame rectangle object type pygame.Rect. */ #define pgRect_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(rect, 0)) /** * \brief Check if *obj* is a `pygame.Rect` instance. * * \returns true if *obj* is a `pygame.Rect` instance */ #define pgRect_Check(obj) ((obj)->ob_type == &pgRect_Type) /** * \brief Create a new `pygame.Rect` instance. * * \param r A pointer to an SDL_Rect struct. * \returns a new `pygame.Rect` object for the SDL_Rect *r*. * Returns *NULL* on error. * * \note PyObject* pgRect_New(SDL_Rect *r) */ #define pgRect_New (*(PyObject * (*)(SDL_Rect *)) PYGAMEAPI_GET_SLOT(rect, 1)) /** * \brief Create a new `pygame.Rect` instance from x, y, w, h. * * \param x The x coordinate of the rectangle. * \param y The y coordinate of the rectangle. * \param w The width of the rectangle. * \param h The height of the rectangle. * \returns a new `pygame.Rect` object. Returns *NULL* on error. * * \note PyObject* pgRect_New4(int x, int y, int w, int h) */ #define pgRect_New4 \ (*(PyObject * (*)(int, int, int, int)) PYGAMEAPI_GET_SLOT(rect, 2)) /** * \brief Convert a Python object to a `pygame.Rect` instance. * * \param obj A Python object. * A rectangle can be a length 4 sequence integers (x, y, w, h), or a length 2 * sequence of position (x, y) and size (w, h), or a length 1 tuple containing * a rectangle representation, or have a method *rect* that returns a * rectangle. * * \param temp A pointer to an SDL_Rect struct to store the result in. * \returns a pointer to the SDL_Rect field of the `pygame.Rect` instance * *obj*. Returns *NULL* on error. * * \note This function will clear any Python errors. * \note SDL_Rect* pgRect_FromObject(PyObject *obj, SDL_Rect *temp) */ #define pgRect_FromObject \ (*(SDL_Rect * (*)(PyObject *, SDL_Rect *)) PYGAMEAPI_GET_SLOT(rect, 3)) /** * \brief Normalize a `pygame.Rect` instance. A rect with a negative size * (negative width and/or height) will be adjusted to have a positive size. * * \param rect A pointer to a `pygame.Rect` instance. * \returns *rect* normalized with positive values only. * * \note void pgRect_Normalize(SDL_Rect *rect) */ #define pgRect_Normalize (*(void (*)(SDL_Rect *))PYGAMEAPI_GET_SLOT(rect, 4)) #define import_pygame_rect() IMPORT_PYGAME_MODULE(rect) #endif /* ~PYGAMEAPI_RECT_INTERNAL */ /* * JOYSTICK module */ typedef struct pgJoystickObject { PyObject_HEAD int id; SDL_Joystick *joy; /* Joysticks form an intrusive linked list. * * Note that we don't maintain refcounts for these so they are weakrefs * from the Python side. */ struct pgJoystickObject *next; struct pgJoystickObject *prev; } pgJoystickObject; #define pgJoystick_AsID(x) (((pgJoystickObject *)x)->id) #define pgJoystick_AsSDL(x) (((pgJoystickObject *)x)->joy) #ifndef PYGAMEAPI_JOYSTICK_INTERNAL #define pgJoystick_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(joystick, 0)) #define pgJoystick_Check(x) ((x)->ob_type == &pgJoystick_Type) #define pgJoystick_New (*(PyObject * (*)(int)) PYGAMEAPI_GET_SLOT(joystick, 1)) #define import_pygame_joystick() IMPORT_PYGAME_MODULE(joystick) #endif /* * DISPLAY module */ typedef struct { Uint32 hw_available : 1; Uint32 wm_available : 1; Uint32 blit_hw : 1; Uint32 blit_hw_CC : 1; Uint32 blit_hw_A : 1; Uint32 blit_sw : 1; Uint32 blit_sw_CC : 1; Uint32 blit_sw_A : 1; Uint32 blit_fill : 1; Uint32 video_mem; SDL_PixelFormat *vfmt; SDL_PixelFormat vfmt_data; int current_w; int current_h; } pg_VideoInfo; /** * A pygame object that wraps an SDL_VideoInfo struct. * The object returned by `pygame.display.Info()` */ typedef struct { PyObject_HEAD pg_VideoInfo info; } pgVidInfoObject; /** * \brief Convert a pgVidInfoObject to an SDL_VideoInfo. * * \note SDL_VideoInfo pgVidInfo_AsVidInfo(PyObject *obj) * * \returns the SDL_VideoInfo field of *obj*, a pgVidInfo_Type instance. * \param obj A pgVidInfo_Type instance. * * \note Does not check that *obj* is not `NULL` or an `pgVidInfoObject` * object. */ #define pgVidInfo_AsVidInfo(x) (((pgVidInfoObject *)x)->info) #ifndef PYGAMEAPI_DISPLAY_INTERNAL /** * \brief The pgVidInfoObject object Python type. * \note pgVideoInfo_Type is used for the `pygame.display.Info()` object. */ #define pgVidInfo_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(display, 0)) /** * \brief Check if *obj* is a pgVidInfoObject. * * \returns true if *x* is a `pgVidInfo_Type` instance * \note Will return false if *x* is a subclass of `pgVidInfo_Type`. * \note This macro does not check that *x* is not ``NULL``. * \note int pgVidInfo_Check(PyObject *x) */ #define pgVidInfo_Check(x) ((x)->ob_type == &pgVidInfo_Type) /** * \brief Create a new pgVidInfoObject. * * \param i A pointer to an SDL_VideoInfo struct. * \returns a new `pgVidInfoObject` object for the SDL_VideoInfo *i*. * * \note PyObject* pgVidInfo_New(SDL_VideoInfo *i) * \note On failure, raise a Python exception and return `NULL`. */ #define pgVidInfo_New \ (*(PyObject * (*)(pg_VideoInfo *)) PYGAMEAPI_GET_SLOT(display, 1)) #define import_pygame_display() IMPORT_PYGAME_MODULE(display) #endif /* ~PYGAMEAPI_DISPLAY_INTERNAL */ /* * SURFACE module */ struct pgSubSurface_Data; struct SDL_Surface; /** * \brief A pygame object that wraps an SDL_Surface. A `pygame.Surface` * instance. */ typedef struct { PyObject_HEAD struct SDL_Surface *surf; /** * \brief If true, the surface will be freed when the python object is * destroyed. */ int owner; /** * \brief The subsurface data for this surface (if a subsurface). */ struct pgSubSurface_Data *subsurface; /** * \brief A list of weak references to this surface. */ PyObject *weakreflist; /** * \brief A list of locks for this surface. */ PyObject *locklist; /** * \brief Usually a buffer object which the surface gets its data from. */ PyObject *dependency; } pgSurfaceObject; /** * \brief Convert a `pygame.Surface` instance to an SDL_Surface. * * \param x A `pygame.Surface` instance. * \returns the SDL_Surface field of *x*, a `pygame.Surface` instance. * * \note SDL_Surface* pgSurface_AsSurface(PyObject *x) */ #define pgSurface_AsSurface(x) (((pgSurfaceObject *)x)->surf) #ifndef PYGAMEAPI_SURFACE_INTERNAL /** * \brief The `pygame.Surface` object Python type. */ #define pgSurface_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(surface, 0)) /** * \brief Check if *x* is a `pygame.Surface` instance. * * \param x The object to check. * \returns true if *x* is a `pygame.Surface` instance * * \note Will return false if *x* is a subclass of `pygame.Surface`. * \note This macro does not check that *x* is not ``NULL``. * \note int pgSurface_Check(PyObject *x) */ #define pgSurface_Check(x) \ (PyObject_IsInstance((x), (PyObject *)&pgSurface_Type)) /** * \brief Create a new `pygame.Surface` instance. * * \param s The SDL surface to wrap in a python object. * \param owner If true, the surface will be freed when the python object is * destroyed. \returns A new new pygame surface instance for SDL surface *s*. * Returns *NULL* on error. * * \note pgSurfaceObject* pgSurface_New2(SDL_Surface *s, int owner) */ #define pgSurface_New2 \ (*(pgSurfaceObject * (*)(SDL_Surface *, int)) \ PYGAMEAPI_GET_SLOT(surface, 1)) /** * \brief Sets the SDL surface for a `pygame.Surface` instance. * * \param self The `pygame.Surface` instance to set the surface for. * \param s The SDL surface to set. * \param owner If true, the surface will be freed when the python object is * destroyed. \returns 0 on success, -1 on failure. * * \note int pgSurface_SetSurface(pgSurfaceObject *self, SDL_Surface *s, int * owner) */ #define pgSurface_SetSurface \ (*(int (*)(pgSurfaceObject *, SDL_Surface *, int))PYGAMEAPI_GET_SLOT( \ surface, 3)) /** * \brief Blit one surface onto another. * * \param dstobj The destination surface. * \param srcobj The source surface. * \param dstrect The destination rectangle. * \param srcrect The source rectangle. * \param the_args The blit flags. * \return 0 for success, -1 or -2 for error. * * \note Is accessible through the C api. * \note int pgSurface_Blit(PyObject *dstobj, PyObject *srcobj, SDL_Rect * *dstrect, SDL_Rect *srcrect, int the_args) */ #define pgSurface_Blit \ (*(int (*)(pgSurfaceObject *, pgSurfaceObject *, SDL_Rect *, SDL_Rect *, \ int))PYGAMEAPI_GET_SLOT(surface, 2)) #define import_pygame_surface() \ do { \ IMPORT_PYGAME_MODULE(surface); \ if (PyErr_Occurred() != NULL) \ break; \ IMPORT_PYGAME_MODULE(surflock); \ } while (0) #define pgSurface_New(surface) pgSurface_New2((surface), 1) #define pgSurface_NewNoOwn(surface) pgSurface_New2((surface), 0) #endif /* ~PYGAMEAPI_SURFACE_INTERNAL */ /* * SURFLOCK module * auto imported/initialized by surface */ #ifndef PYGAMEAPI_SURFLOCK_INTERNAL #define pgLifetimeLock_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(surflock, 0)) #define pgLifetimeLock_Check(x) ((x)->ob_type == &pgLifetimeLock_Type) #define pgSurface_Prep(x) \ if ((x)->subsurface) \ (*(*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 1)))(x) #define pgSurface_Unprep(x) \ if ((x)->subsurface) \ (*(*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 2)))(x) #define pgSurface_Lock \ (*(int (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 3)) #define pgSurface_Unlock \ (*(int (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 4)) #define pgSurface_LockBy \ (*(int (*)(pgSurfaceObject *, PyObject *))PYGAMEAPI_GET_SLOT(surflock, 5)) #define pgSurface_UnlockBy \ (*(int (*)(pgSurfaceObject *, PyObject *))PYGAMEAPI_GET_SLOT(surflock, 6)) #define pgSurface_LockLifetime \ (*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(surflock, 7)) #endif /* * EVENT module */ typedef struct pgEventObject pgEventObject; #ifndef PYGAMEAPI_EVENT_INTERNAL #define pgEvent_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(event, 0)) #define pgEvent_Check(x) ((x)->ob_type == &pgEvent_Type) #define pgEvent_New \ (*(PyObject * (*)(SDL_Event *)) PYGAMEAPI_GET_SLOT(event, 1)) #define pgEvent_New2 \ (*(PyObject * (*)(int, PyObject *)) PYGAMEAPI_GET_SLOT(event, 2)) #define pgEvent_FillUserEvent \ (*(int (*)(pgEventObject *, SDL_Event *))PYGAMEAPI_GET_SLOT(event, 3)) #define pg_EnableKeyRepeat (*(int (*)(int, int))PYGAMEAPI_GET_SLOT(event, 4)) #define pg_GetKeyRepeat (*(void (*)(int *, int *))PYGAMEAPI_GET_SLOT(event, 5)) #define import_pygame_event() IMPORT_PYGAME_MODULE(event) #endif /* * RWOBJECT module * the rwobject are only needed for C side work, not accessible from python. */ #ifndef PYGAMEAPI_RWOBJECT_INTERNAL #define pgRWops_FromObject \ (*(SDL_RWops * (*)(PyObject *, char **)) PYGAMEAPI_GET_SLOT(rwobject, 0)) #define pgRWops_IsFileObject \ (*(int (*)(SDL_RWops *))PYGAMEAPI_GET_SLOT(rwobject, 1)) #define pg_EncodeFilePath \ (*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(rwobject, 2)) #define pg_EncodeString \ (*(PyObject * (*)(PyObject *, const char *, const char *, PyObject *)) \ PYGAMEAPI_GET_SLOT(rwobject, 3)) #define pgRWops_FromFileObject \ (*(SDL_RWops * (*)(PyObject *)) PYGAMEAPI_GET_SLOT(rwobject, 4)) #define pgRWops_ReleaseObject \ (*(int (*)(SDL_RWops *))PYGAMEAPI_GET_SLOT(rwobject, 5)) #define import_pygame_rwobject() IMPORT_PYGAME_MODULE(rwobject) #endif /* * PixelArray module */ #ifndef PYGAMEAPI_PIXELARRAY_INTERNAL #define PyPixelArray_Type ((PyTypeObject *)PYGAMEAPI_GET_SLOT(pixelarray, 0)) #define PyPixelArray_Check(x) ((x)->ob_type == &PyPixelArray_Type) #define PyPixelArray_New (*(PyObject * (*)) PYGAMEAPI_GET_SLOT(pixelarray, 1)) #define import_pygame_pixelarray() IMPORT_PYGAME_MODULE(pixelarray) #endif /* PYGAMEAPI_PIXELARRAY_INTERNAL */ /* * Color module */ typedef struct pgColorObject pgColorObject; #ifndef PYGAMEAPI_COLOR_INTERNAL #define pgColor_Type (*(PyObject *)PYGAMEAPI_GET_SLOT(color, 0)) #define pgColor_Check(x) ((x)->ob_type == &pgColor_Type) #define pgColor_New (*(PyObject * (*)(Uint8 *)) PYGAMEAPI_GET_SLOT(color, 1)) #define pgColor_NewLength \ (*(PyObject * (*)(Uint8 *, Uint8)) PYGAMEAPI_GET_SLOT(color, 3)) #define pg_RGBAFromColorObj \ (*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(color, 2)) #define pg_RGBAFromFuzzyColorObj \ (*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(color, 4)) #define pgColor_AsArray(x) (((pgColorObject *)x)->data) #define pgColor_NumComponents(x) (((pgColorObject *)x)->len) #define import_pygame_color() IMPORT_PYGAME_MODULE(color) #endif /* PYGAMEAPI_COLOR_INTERNAL */ /* * Math module */ #ifndef PYGAMEAPI_MATH_INTERNAL #define pgVector2_Check(x) \ ((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 0)) #define pgVector3_Check(x) \ ((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 1)) /* #define pgVector2_New \ (*(PyObject*(*)) \ PYGAMEAPI_GET_SLOT(PyGAME_C_API, 1)) */ #define import_pygame_math() IMPORT_PYGAME_MODULE(math) #endif /* PYGAMEAPI_MATH_INTERNAL */ #define IMPORT_PYGAME_MODULE _IMPORT_PYGAME_MODULE /* * base pygame API slots * disable slots with NO_PYGAME_C_API */ #ifdef PYGAME_H PYGAMEAPI_DEFINE_SLOTS(base); PYGAMEAPI_DEFINE_SLOTS(rect); PYGAMEAPI_DEFINE_SLOTS(cdrom); PYGAMEAPI_DEFINE_SLOTS(joystick); PYGAMEAPI_DEFINE_SLOTS(display); PYGAMEAPI_DEFINE_SLOTS(surface); PYGAMEAPI_DEFINE_SLOTS(surflock); PYGAMEAPI_DEFINE_SLOTS(event); PYGAMEAPI_DEFINE_SLOTS(rwobject); PYGAMEAPI_DEFINE_SLOTS(pixelarray); PYGAMEAPI_DEFINE_SLOTS(color); PYGAMEAPI_DEFINE_SLOTS(math); #else /* ~PYGAME_H */ PYGAMEAPI_EXTERN_SLOTS(base); PYGAMEAPI_EXTERN_SLOTS(rect); PYGAMEAPI_EXTERN_SLOTS(cdrom); PYGAMEAPI_EXTERN_SLOTS(joystick); PYGAMEAPI_EXTERN_SLOTS(display); PYGAMEAPI_EXTERN_SLOTS(surface); PYGAMEAPI_EXTERN_SLOTS(surflock); PYGAMEAPI_EXTERN_SLOTS(event); PYGAMEAPI_EXTERN_SLOTS(rwobject); PYGAMEAPI_EXTERN_SLOTS(pixelarray); PYGAMEAPI_EXTERN_SLOTS(color); PYGAMEAPI_EXTERN_SLOTS(math); #endif /* ~PYGAME_H */ #endif /* PYGAME_H */ /* Use the end of this file for other cross module inline utility * functions There seems to be no good reason to stick to macro only * functions in Python 3. */ static PG_INLINE PyObject * pg_tuple_couple_from_values_int(int val1, int val2) { /* This function turns two input integers into a python tuple object. * Currently, 5th November 2022, this is faster than using Py_BuildValue * to do the same thing. */ PyObject *tup = PyTuple_New(2); if (!tup) { return NULL; } PyObject *tmp = PyLong_FromLong(val1); if (!tmp) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, 0, tmp); tmp = PyLong_FromLong(val2); if (!tmp) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, 1, tmp); return tup; } static PG_INLINE PyObject * pg_tuple_triple_from_values_int(int val1, int val2, int val3) { /* This function turns three input integers into a python tuple object. * Currently, 5th November 2022, this is faster than using Py_BuildValue * to do the same thing. */ PyObject *tup = PyTuple_New(3); if (!tup) { return NULL; } PyObject *tmp = PyLong_FromLong(val1); if (!tmp) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, 0, tmp); tmp = PyLong_FromLong(val2); if (!tmp) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, 1, tmp); tmp = PyLong_FromLong(val3); if (!tmp) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, 2, tmp); return tup; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/include/bitmask.h0000644000175100001770000001153014676242340016736 0ustar00runnerdocker/* Bitmask 1.7 - A pixel-perfect collision detection library. Copyright (C) 2002-2005 Ulf Ekstrom except for the bitcount function which is copyright (C) Donald W. Gillies, 1992. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef BITMASK_H #define BITMASK_H #ifdef __cplusplus extern "C" { #endif #include /* Define INLINE for different compilers. If your compiler does not support inlining then there might be a performance hit in bitmask_overlap_area(). */ #ifndef INLINE #ifdef __GNUC__ #define INLINE inline #else #ifdef _MSC_VER #define INLINE __inline #else #define INLINE #endif #endif #endif #define BITMASK_W unsigned long int #define BITMASK_W_LEN (sizeof(BITMASK_W) * CHAR_BIT) #define BITMASK_W_MASK (BITMASK_W_LEN - 1) #define BITMASK_N(n) ((BITMASK_W)1 << (n)) typedef struct bitmask { int w, h; BITMASK_W bits[1]; } bitmask_t; /* Creates a bitmask of width w and height h, where w and h must both be greater than or equal to 0. The mask is automatically cleared when created. */ bitmask_t * bitmask_create(int w, int h); /* Frees all the memory allocated by bitmask_create for m. */ void bitmask_free(bitmask_t *m); /* Create a copy of the given bitmask. */ bitmask_t * bitmask_copy(bitmask_t *m); /* Clears all bits in the mask */ void bitmask_clear(bitmask_t *m); /* Sets all bits in the mask */ void bitmask_fill(bitmask_t *m); /* Flips all bits in the mask */ void bitmask_invert(bitmask_t *m); /* Counts the bits in the mask */ unsigned int bitmask_count(bitmask_t *m); /* Returns nonzero if the bit at (x,y) is set. Coordinates start at (0,0) */ static INLINE int bitmask_getbit(const bitmask_t *m, int x, int y) { return (m->bits[x / BITMASK_W_LEN * m->h + y] & BITMASK_N(x & BITMASK_W_MASK)) != 0; } /* Sets the bit at (x,y) */ static INLINE void bitmask_setbit(bitmask_t *m, int x, int y) { m->bits[x / BITMASK_W_LEN * m->h + y] |= BITMASK_N(x & BITMASK_W_MASK); } /* Clears the bit at (x,y) */ static INLINE void bitmask_clearbit(bitmask_t *m, int x, int y) { m->bits[x / BITMASK_W_LEN * m->h + y] &= ~BITMASK_N(x & BITMASK_W_MASK); } /* Returns nonzero if the masks overlap with the given offset. The overlap tests uses the following offsets (which may be negative): +----+----------.. |A | yoffset | +-+----------.. +--|B |xoffset | | : : */ int bitmask_overlap(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset); /* Like bitmask_overlap(), but will also give a point of intersection. x and y are given in the coordinates of mask a, and are untouched if there is no overlap. */ int bitmask_overlap_pos(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset, int *x, int *y); /* Returns the number of overlapping 'pixels' */ int bitmask_overlap_area(const bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset); /* Fills a mask with the overlap of two other masks. A bitwise AND. */ void bitmask_overlap_mask(const bitmask_t *a, const bitmask_t *b, bitmask_t *c, int xoffset, int yoffset); /* Draws mask b onto mask a (bitwise OR). Can be used to compose large (game background?) mask from several submasks, which may speed up the testing. */ void bitmask_draw(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset); void bitmask_erase(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset); /* Return a new scaled bitmask, with dimensions w*h. The quality of the scaling may not be perfect for all circumstances, but it should be reasonable. If either w or h is 0 a clear 1x1 mask is returned. */ bitmask_t * bitmask_scale(const bitmask_t *m, int w, int h); /* Convolve b into a, drawing the output into o, shifted by offset. If offset * is 0, then the (x,y) bit will be set if and only if * bitmask_overlap(a, b, x - b->w - 1, y - b->h - 1) returns true. * * Modifies bits o[xoffset ... xoffset + a->w + b->w - 1) * [yoffset ... yoffset + a->h + b->h - 1). */ void bitmask_convolve(const bitmask_t *a, const bitmask_t *b, bitmask_t *o, int xoffset, int yoffset); #ifdef __cplusplus } /* End of extern "C" { */ #endif #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/include/pgcompat.h0000644000175100001770000000363014676242340017120 0ustar00runnerdocker#if !defined(PGCOMPAT_H) #define PGCOMPAT_H #include /* In CPython, Py_Exit finalises the python interpreter before calling C exit() * This does not exist on PyPy, so use exit() directly here */ #ifdef PYPY_VERSION #define PG_EXIT(n) exit(n) #else #define PG_EXIT(n) Py_Exit(n) #endif /* define common types where SDL is not included */ #ifndef SDL_VERSION_ATLEAST #ifdef _MSC_VER typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #else #include #endif typedef uint32_t Uint32; typedef uint8_t Uint8; #endif /* no SDL */ #if defined(SDL_VERSION_ATLEAST) #ifndef SDL_WINDOW_VULKAN #define SDL_WINDOW_VULKAN 0 #endif #ifndef SDL_WINDOW_ALWAYS_ON_TOP #define SDL_WINDOW_ALWAYS_ON_TOP 0 #endif #ifndef SDL_WINDOW_SKIP_TASKBAR #define SDL_WINDOW_SKIP_TASKBAR 0 #endif #ifndef SDL_WINDOW_UTILITY #define SDL_WINDOW_UTILITY 0 #endif #ifndef SDL_WINDOW_TOOLTIP #define SDL_WINDOW_TOOLTIP 0 #endif #ifndef SDL_WINDOW_POPUP_MENU #define SDL_WINDOW_POPUP_MENU 0 #endif #ifndef SDL_WINDOW_INPUT_GRABBED #define SDL_WINDOW_INPUT_GRABBED 0 #endif #ifndef SDL_WINDOW_INPUT_FOCUS #define SDL_WINDOW_INPUT_FOCUS 0 #endif #ifndef SDL_WINDOW_MOUSE_FOCUS #define SDL_WINDOW_MOUSE_FOCUS 0 #endif #ifndef SDL_WINDOW_FOREIGN #define SDL_WINDOW_FOREIGN 0 #endif #ifndef SDL_WINDOW_ALLOW_HIGHDPI #define SDL_WINDOW_ALLOW_HIGHDPI 0 #endif #ifndef SDL_WINDOW_MOUSE_CAPTURE #define SDL_WINDOW_MOUSE_CAPTURE 0 #endif #ifndef SDL_WINDOW_ALWAYS_ON_TOP #define SDL_WINDOW_ALWAYS_ON_TOP 0 #endif #ifndef SDL_WINDOW_SKIP_TASKBAR #define SDL_WINDOW_SKIP_TASKBAR 0 #endif #ifndef SDL_WINDOW_UTILITY #define SDL_WINDOW_UTILITY 0 #endif #ifndef SDL_WINDOW_TOOLTIP #define SDL_WINDOW_TOOLTIP 0 #endif #ifndef SDL_WINDOW_POPUP_MENU #define SDL_WINDOW_POPUP_MENU 0 #endif #ifndef SDL_MOUSEWHEEL_FLIPPED #define NO_SDL_MOUSEWHEEL_FLIPPED #endif #endif /* defined(SDL_VERSION_ATLEAST) */ #endif /* ~defined(PGCOMPAT_H) */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/include/pgimport.h0000644000175100001770000000511414676242340017146 0ustar00runnerdocker#ifndef PGIMPORT_H #define PGIMPORT_H /* Prefix when importing module */ #define IMPPREFIX "pygame." #include "pgcompat.h" #define PYGAMEAPI_LOCAL_ENTRY "_PYGAME_C_API" #define PG_CAPSULE_NAME(m) (IMPPREFIX m "." PYGAMEAPI_LOCAL_ENTRY) /* * fill API slots defined by PYGAMEAPI_DEFINE_SLOTS/PYGAMEAPI_EXTERN_SLOTS */ #define _IMPORT_PYGAME_MODULE(module) \ { \ PyObject *_mod_##module = PyImport_ImportModule(IMPPREFIX #module); \ \ if (_mod_##module != NULL) { \ PyObject *_c_api = \ PyObject_GetAttrString(_mod_##module, PYGAMEAPI_LOCAL_ENTRY); \ \ Py_DECREF(_mod_##module); \ if (_c_api != NULL && PyCapsule_CheckExact(_c_api)) { \ void **localptr = (void **)PyCapsule_GetPointer( \ _c_api, PG_CAPSULE_NAME(#module)); \ _PGSLOTS_##module = localptr; \ } \ Py_XDECREF(_c_api); \ } \ } #define PYGAMEAPI_IS_IMPORTED(module) (_PGSLOTS_##module != NULL) /* * source file must include one of these in order to use _IMPORT_PYGAME_MODULE. * this is set by import_pygame_*() functions. * disable with NO_PYGAME_C_API */ #define PYGAMEAPI_DEFINE_SLOTS(module) void **_PGSLOTS_##module = NULL #define PYGAMEAPI_EXTERN_SLOTS(module) extern void **_PGSLOTS_##module #define PYGAMEAPI_GET_SLOT(module, index) _PGSLOTS_##module[(index)] /* * disabled API with NO_PYGAME_C_API; do nothing instead */ #ifdef NO_PYGAME_C_API #undef PYGAMEAPI_DEFINE_SLOTS #undef PYGAMEAPI_EXTERN_SLOTS #define PYGAMEAPI_DEFINE_SLOTS(module) #define PYGAMEAPI_EXTERN_SLOTS(module) /* intentionally leave this defined to cause a compiler error * #define PYGAMEAPI_GET_SLOT(api_root, index) #undef PYGAMEAPI_GET_SLOT*/ #undef _IMPORT_PYGAME_MODULE #define _IMPORT_PYGAME_MODULE(module) #endif /* NO_PYGAME_C_API */ #define encapsulate_api(ptr, module) \ PyCapsule_New(ptr, PG_CAPSULE_NAME(module), NULL) #endif /* ~PGIMPORT_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.009112 pygame-2.6.1/src_c/include/pgplatform.h0000644000175100001770000000441014676242340017456 0ustar00runnerdocker/* platform/compiler adjustments */ #ifndef PG_PLATFORM_H #define PG_PLATFORM_H #if defined(HAVE_SNPRINTF) /* defined in python.h (pyerrors.h) and SDL.h \ (SDL_config.h) */ #undef HAVE_SNPRINTF /* remove GCC redefine warning */ #endif /* HAVE_SNPRINTF */ #ifndef PG_INLINE #if defined(__clang__) #define PG_INLINE __inline__ __attribute__((__unused__)) #elif defined(__GNUC__) #define PG_INLINE __inline__ #elif defined(_MSC_VER) #define PG_INLINE __inline #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define PG_INLINE inline #else #define PG_INLINE #endif #endif /* ~PG_INLINE */ // Worth trying this on MSVC/win32 builds to see if provides any speed up #ifndef PG_FORCEINLINE #if defined(__clang__) #define PG_FORCEINLINE __inline__ __attribute__((__unused__)) #elif defined(__GNUC__) #define PG_FORCEINLINE __inline__ #elif defined(_MSC_VER) #define PG_FORCEINLINE __forceinline #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define PG_FORCEINLINE inline #else #define PG_FORCEINLINE #endif #endif /* ~PG_FORCEINLINE */ /* This is unconditionally defined in Python.h */ #if defined(_POSIX_C_SOURCE) #undef _POSIX_C_SOURCE #endif #if defined(HAVE_SNPRINTF) #undef HAVE_SNPRINTF #endif /* SDL needs WIN32 */ #if !defined(WIN32) && \ (defined(MS_WIN32) || defined(_WIN32) || defined(__WIN32) || \ defined(__WIN32__) || defined(_WINDOWS)) #define WIN32 #endif #ifndef PG_TARGET_SSE4_2 #if defined(__clang__) || \ (defined(__GNUC__) && \ ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ >= 5)) // The old gcc 4.8 on centos used by manylinux1 does not seem to get sse4.2 // intrinsics #define PG_FUNCTION_TARGET_SSE4_2 __attribute__((target("sse4.2"))) // No else; we define the fallback later #endif #endif /* ~PG_TARGET_SSE4_2 */ #ifdef PG_FUNCTION_TARGET_SSE4_2 #if !defined(__SSE4_2__) && !defined(PG_COMPILE_SSE4_2) #if defined(__x86_64__) || defined(__i386__) #define PG_COMPILE_SSE4_2 1 #endif #endif #endif /* ~PG_TARGET_SSE4_2 */ /* Fallback definition of target attribute */ #ifndef PG_FUNCTION_TARGET_SSE4_2 #define PG_FUNCTION_TARGET_SSE4_2 #endif #ifndef PG_COMPILE_SSE4_2 #define PG_COMPILE_SSE4_2 0 #endif #endif /* ~PG_PLATFORM_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame.h0000644000175100001770000000233514676242340016571 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* To allow the Pygame C api to be globally shared by all code within an * extension module built from multiple C files, only include the pygame.h * header within the top level C file, the one which calls the * 'import_pygame_*' macros. All other C source files of the module should * include _pygame.h instead. */ #ifndef PYGAME_H #define PYGAME_H #include "_pygame.h" #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame_bufferproxy.h0000644000175100001770000000345214676242340021225 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Bufferproxy module C api. */ #if !defined(PG_BUFPROXY_HEADER) #define PG_BUFPROXY_HEADER #include typedef PyObject *(*_pgbufproxy_new_t)(PyObject *, getbufferproc); typedef PyObject *(*_pgbufproxy_get_obj_t)(PyObject *); typedef int (*_pgbufproxy_trip_t)(PyObject *); #ifndef PYGAMEAPI_BUFPROXY_INTERNAL #include "pgimport.h" PYGAMEAPI_DEFINE_SLOTS(bufferproxy); #define pgBufproxy_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(bufferproxy, 0)) #define pgBufproxy_Check(x) ((x)->ob_type == &pgBufproxy_Type) #define pgBufproxy_New (*(_pgbufproxy_new_t)PYGAMEAPI_GET_SLOT(bufferproxy, 1)) #define pgBufproxy_GetParent \ (*(_pgbufproxy_get_obj_t)PYGAMEAPI_GET_SLOT(bufferproxy, 2)) #define pgBufproxy_Trip \ (*(_pgbufproxy_trip_t)PYGAMEAPI_GET_SLOT(bufferproxy, 3)) #define import_pygame_bufferproxy() _IMPORT_PYGAME_MODULE(bufferproxy) #endif /* ~PYGAMEAPI_BUFPROXY_INTERNAL */ #endif /* ~defined(PG_BUFPROXY_HEADER) */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame_font.h0000644000175100001770000000273514676242340017623 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #include #include "pgplatform.h" struct TTF_Font; typedef struct { PyObject_HEAD TTF_Font *font; PyObject *weakreflist; unsigned int ttf_init_generation; } PyFontObject; #define PyFont_AsFont(x) (((PyFontObject *)x)->font) #ifndef PYGAMEAPI_FONT_INTERNAL #include "pgimport.h" PYGAMEAPI_DEFINE_SLOTS(font); #define PyFont_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(font, 0)) #define PyFont_Check(x) ((x)->ob_type == &PyFont_Type) #define PyFont_New (*(PyObject * (*)(TTF_Font *)) PYGAMEAPI_GET_SLOT(font, 1)) /*slot 2 taken by FONT_INIT_CHECK*/ #define import_pygame_font() _IMPORT_PYGAME_MODULE(font) #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame_freetype.h0000644000175100001770000000250214676242340020470 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Vicent Marti This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef PYGAME_FREETYPE_H_ #define PYGAME_FREETYPE_H_ #include "pgplatform.h" #include "pgimport.h" #include "pgcompat.h" #ifndef PYGAME_FREETYPE_INTERNAL PYGAMEAPI_DEFINE_SLOTS(_freetype); #define pgFont_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(_freetype, 0)) #define pgFont_Check(x) ((x)->ob_type == &pgFont_Type) #define pgFont_New \ (*(PyObject * (*)(const char *, long)) PYGAMEAPI_GET_SLOT(_freetype, 1)) #define import_pygame_freetype() _IMPORT_PYGAME_MODULE(_freetype) #endif /* PYGAME_FREETYPE_INTERNAL */ #endif /* PYGAME_FREETYPE_H_ */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame_mask.h0000644000175100001770000000242714676242340017606 0ustar00runnerdocker/* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef PGMASK_H #define PGMASK_H #include #include "bitmask.h" typedef struct { PyObject_HEAD bitmask_t *mask; void *bufdata; } pgMaskObject; #define pgMask_AsBitmap(x) (((pgMaskObject *)x)->mask) #ifndef PYGAMEAPI_MASK_INTERNAL #include "pgimport.h" PYGAMEAPI_DEFINE_SLOTS(mask); #define pgMask_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mask, 0)) #define pgMask_Check(x) ((x)->ob_type == &pgMask_Type) #define import_pygame_mask() _IMPORT_PYGAME_MODULE(mask) #endif /* ~PYGAMEAPI_MASK_INTERNAL */ #endif /* ~PGMASK_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0101118 pygame-2.6.1/src_c/include/pygame_mixer.h0000644000175100001770000000374514676242340020003 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #ifndef PGMIXER_H #define PGMIXER_H #include #include #include "pgcompat.h" struct Mix_Chunk; typedef struct { PyObject_HEAD Mix_Chunk *chunk; Uint8 *mem; PyObject *weakreflist; } pgSoundObject; typedef struct { PyObject_HEAD int chan; } pgChannelObject; #define pgSound_AsChunk(x) (((pgSoundObject *)x)->chunk) #define pgChannel_AsInt(x) (((pgChannelObject *)x)->chan) #include "pgimport.h" #ifndef PYGAMEAPI_MIXER_INTERNAL PYGAMEAPI_DEFINE_SLOTS(mixer); #define pgSound_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mixer, 0)) #define pgSound_Check(x) ((x)->ob_type == &pgSound_Type) #define pgSound_New \ (*(PyObject * (*)(Mix_Chunk *)) PYGAMEAPI_GET_SLOT(mixer, 1)) #define pgSound_Play \ (*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(mixer, 2)) #define pgChannel_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mixer, 3)) #define pgChannel_Check(x) ((x)->ob_type == &pgChannel_Type) #define pgChannel_New (*(PyObject * (*)(int)) PYGAMEAPI_GET_SLOT(mixer, 4)) #define import_pygame_mixer() _IMPORT_PYGAME_MODULE(mixer) #endif /* PYGAMEAPI_MIXER_INTERNAL */ #endif /* ~PGMIXER_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.011112 pygame-2.6.1/src_c/include/sse2neon.h0000644000175100001770000072047514676242340017057 0ustar00runnerdocker#ifndef SSE2NEON_H #define SSE2NEON_H // This header file provides a simple API translation layer // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions // // This header file does not yet translate all of the SSE intrinsics. // // Contributors to this work are: // John W. Ratcliff // Brandon Rowlett // Ken Fast // Eric van Beurden // Alexander Potylitsin // Hasindu Gamaarachchi // Jim Huang // Mark Cheng // Malcolm James MacLeod // Devin Hussey (easyaspi314) // Sebastian Pop // Developer Ecosystem Engineering // Danila Kutenin // François Turban (JishinMaster) // Pei-Hsuan Hung // Yang-Hao Yuan /* * sse2neon is freely redistributable under the MIT License. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* Tunable configurations */ /* Enable precise implementation of _mm_min_ps and _mm_max_ps * This would slow down the computation a bit, but gives consistent result with * x86 SSE2. (e.g. would solve a hole or NaN pixel in the rendering result) */ #ifndef SSE2NEON_PRECISE_MINMAX #define SSE2NEON_PRECISE_MINMAX (0) #endif #if defined(__GNUC__) || defined(__clang__) #pragma push_macro("FORCE_INLINE") #pragma push_macro("ALIGN_STRUCT") #define FORCE_INLINE static inline __attribute__((always_inline)) #define ALIGN_STRUCT(x) __attribute__((aligned(x))) #else #error "Macro name collisions may happen with unsupported compiler." #ifdef FORCE_INLINE #undef FORCE_INLINE #endif #define FORCE_INLINE static inline #ifndef ALIGN_STRUCT #define ALIGN_STRUCT(x) __declspec(align(x)) #endif #endif #include #include // These cause the build to fail on raspberry pi with 'unsupported target' // and don't seem to do anything particularly useful ///* Architecture-specific build options */ ///* FIXME: #pragma GCC push_options is only available on GCC */ //#if defined(__GNUC__) //#if defined(__arm__) && __ARM_ARCH == 7 ///* According to ARM C Language Extensions Architecture specification, // * __ARM_NEON is defined to a value indicating the Advanced SIMD (NEON) // * architecture supported. // */ //#if !defined(__ARM_NEON) || !defined(__ARM_NEON__) //#error "You must enable NEON instructions (e.g. -mfpu=neon) to use SSE2NEON." //#endif //#pragma GCC push_options //#pragma GCC target("fpu=neon") //#elif defined(__aarch64__) //#pragma GCC push_options //#pragma GCC target("+simd") //#else //#error "Unsupported target. Must be either ARMv7-A+NEON or ARMv8-A." //#endif //#endif #include /* Rounding functions require either Aarch64 instructions or libm failback */ #if !defined(__aarch64__) #include #endif /* "__has_builtin" can be used to query support for built-in functions * provided by gcc/clang and other compilers that support it. */ #ifndef __has_builtin /* GCC prior to 10 or non-clang compilers */ /* Compatibility with gcc <= 9 */ #if __GNUC__ <= 9 #define __has_builtin(x) HAS##x #define HAS__builtin_popcount 1 #define HAS__builtin_popcountll 1 #else #define __has_builtin(x) 0 #endif #endif /** * MACRO for shuffle parameter for _mm_shuffle_ps(). * Argument fp3 is a digit[0123] that represents the fp from argument "b" * of mm_shuffle_ps that will be placed in fp3 of result. fp2 is the same * for fp2 in result. fp1 is a digit[0123] that represents the fp from * argument "a" of mm_shuffle_ps that will be places in fp1 of result. * fp0 is the same for fp0 of result. */ #define _MM_SHUFFLE(fp3, fp2, fp1, fp0) \ (((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0))) /* Rounding mode macros. */ #define _MM_FROUND_TO_NEAREST_INT 0x00 #define _MM_FROUND_TO_NEG_INF 0x01 #define _MM_FROUND_TO_POS_INF 0x02 #define _MM_FROUND_TO_ZERO 0x03 #define _MM_FROUND_CUR_DIRECTION 0x04 #define _MM_FROUND_NO_EXC 0x08 /* indicate immediate constant argument in a given range */ #define __constrange(a, b) const /* A few intrinsics accept traditional data types like ints or floats, but * most operate on data types that are specific to SSE. * If a vector type ends in d, it contains doubles, and if it does not have * a suffix, it contains floats. An integer vector type can contain any type * of integer, from chars to shorts to unsigned long longs. */ typedef int64x1_t __m64; typedef float32x4_t __m128; /* 128-bit vector containing 4 floats */ // On ARM 32-bit architecture, the float64x2_t is not supported. // The data type __m128d should be represented in a different way for related // intrinsic conversion. #if defined(__aarch64__) typedef float64x2_t __m128d; /* 128-bit vector containing 2 doubles */ #else typedef float32x4_t __m128d; #endif typedef int64x2_t __m128i; /* 128-bit vector containing integers */ /* type-safe casting between types */ #define vreinterpretq_m128_f16(x) vreinterpretq_f32_f16(x) #define vreinterpretq_m128_f32(x) (x) #define vreinterpretq_m128_f64(x) vreinterpretq_f32_f64(x) #define vreinterpretq_m128_u8(x) vreinterpretq_f32_u8(x) #define vreinterpretq_m128_u16(x) vreinterpretq_f32_u16(x) #define vreinterpretq_m128_u32(x) vreinterpretq_f32_u32(x) #define vreinterpretq_m128_u64(x) vreinterpretq_f32_u64(x) #define vreinterpretq_m128_s8(x) vreinterpretq_f32_s8(x) #define vreinterpretq_m128_s16(x) vreinterpretq_f32_s16(x) #define vreinterpretq_m128_s32(x) vreinterpretq_f32_s32(x) #define vreinterpretq_m128_s64(x) vreinterpretq_f32_s64(x) #define vreinterpretq_f16_m128(x) vreinterpretq_f16_f32(x) #define vreinterpretq_f32_m128(x) (x) #define vreinterpretq_f64_m128(x) vreinterpretq_f64_f32(x) #define vreinterpretq_u8_m128(x) vreinterpretq_u8_f32(x) #define vreinterpretq_u16_m128(x) vreinterpretq_u16_f32(x) #define vreinterpretq_u32_m128(x) vreinterpretq_u32_f32(x) #define vreinterpretq_u64_m128(x) vreinterpretq_u64_f32(x) #define vreinterpretq_s8_m128(x) vreinterpretq_s8_f32(x) #define vreinterpretq_s16_m128(x) vreinterpretq_s16_f32(x) #define vreinterpretq_s32_m128(x) vreinterpretq_s32_f32(x) #define vreinterpretq_s64_m128(x) vreinterpretq_s64_f32(x) #define vreinterpretq_m128i_s8(x) vreinterpretq_s64_s8(x) #define vreinterpretq_m128i_s16(x) vreinterpretq_s64_s16(x) #define vreinterpretq_m128i_s32(x) vreinterpretq_s64_s32(x) #define vreinterpretq_m128i_s64(x) (x) #define vreinterpretq_m128i_u8(x) vreinterpretq_s64_u8(x) #define vreinterpretq_m128i_u16(x) vreinterpretq_s64_u16(x) #define vreinterpretq_m128i_u32(x) vreinterpretq_s64_u32(x) #define vreinterpretq_m128i_u64(x) vreinterpretq_s64_u64(x) #define vreinterpretq_s8_m128i(x) vreinterpretq_s8_s64(x) #define vreinterpretq_s16_m128i(x) vreinterpretq_s16_s64(x) #define vreinterpretq_s32_m128i(x) vreinterpretq_s32_s64(x) #define vreinterpretq_s64_m128i(x) (x) #define vreinterpretq_u8_m128i(x) vreinterpretq_u8_s64(x) #define vreinterpretq_u16_m128i(x) vreinterpretq_u16_s64(x) #define vreinterpretq_u32_m128i(x) vreinterpretq_u32_s64(x) #define vreinterpretq_u64_m128i(x) vreinterpretq_u64_s64(x) #define vreinterpret_m64_s8(x) vreinterpret_s64_s8(x) #define vreinterpret_m64_s16(x) vreinterpret_s64_s16(x) #define vreinterpret_m64_s32(x) vreinterpret_s64_s32(x) #define vreinterpret_m64_s64(x) (x) #define vreinterpret_m64_u8(x) vreinterpret_s64_u8(x) #define vreinterpret_m64_u16(x) vreinterpret_s64_u16(x) #define vreinterpret_m64_u32(x) vreinterpret_s64_u32(x) #define vreinterpret_m64_u64(x) vreinterpret_s64_u64(x) #define vreinterpret_m64_f16(x) vreinterpret_s64_f16(x) #define vreinterpret_m64_f32(x) vreinterpret_s64_f32(x) #define vreinterpret_m64_f64(x) vreinterpret_s64_f64(x) #define vreinterpret_u8_m64(x) vreinterpret_u8_s64(x) #define vreinterpret_u16_m64(x) vreinterpret_u16_s64(x) #define vreinterpret_u32_m64(x) vreinterpret_u32_s64(x) #define vreinterpret_u64_m64(x) vreinterpret_u64_s64(x) #define vreinterpret_s8_m64(x) vreinterpret_s8_s64(x) #define vreinterpret_s16_m64(x) vreinterpret_s16_s64(x) #define vreinterpret_s32_m64(x) vreinterpret_s32_s64(x) #define vreinterpret_s64_m64(x) (x) #define vreinterpret_f32_m64(x) vreinterpret_f32_s64(x) #if defined(__aarch64__) #define vreinterpretq_m128d_s32(x) vreinterpretq_f64_s32(x) #define vreinterpretq_m128d_s64(x) vreinterpretq_f64_s64(x) #define vreinterpretq_m128d_f64(x) (x) #define vreinterpretq_s64_m128d(x) vreinterpretq_s64_f64(x) #define vreinterpretq_f64_m128d(x) (x) #else #define vreinterpretq_m128d_s32(x) vreinterpretq_f32_s32(x) #define vreinterpretq_m128d_s64(x) vreinterpretq_f32_s64(x) #define vreinterpretq_m128d_f32(x) (x) #define vreinterpretq_s64_m128d(x) vreinterpretq_s64_f32(x) #define vreinterpretq_f32_m128d(x) (x) #endif // A struct is defined in this header file called 'SIMDVec' which can be used // by applications which attempt to access the contents of an _m128 struct // directly. It is important to note that accessing the __m128 struct directly // is bad coding practice by Microsoft: @see: // https://msdn.microsoft.com/en-us/library/ayeb3ayc.aspx // // However, some legacy source code may try to access the contents of an __m128 // struct directly so the developer can use the SIMDVec as an alias for it. Any // casting must be done manually by the developer, as you cannot cast or // otherwise alias the base NEON data type for intrinsic operations. // // union intended to allow direct access to an __m128 variable using the names // that the MSVC compiler provides. This union should really only be used when // trying to access the members of the vector as integer values. GCC/clang // allow native access to the float members through a simple array access // operator (in C since 4.6, in C++ since 4.8). // // Ideally direct accesses to SIMD vectors should not be used since it can cause // a performance hit. If it really is needed however, the original __m128 // variable can be aliased with a pointer to this union and used to access // individual components. The use of this union should be hidden behind a macro // that is used throughout the codebase to access the members instead of always // declaring this type of variable. typedef union ALIGN_STRUCT(16) SIMDVec { float m128_f32[4]; // as floats - DON'T USE. Added for convenience. int8_t m128_i8[16]; // as signed 8-bit integers. int16_t m128_i16[8]; // as signed 16-bit integers. int32_t m128_i32[4]; // as signed 32-bit integers. int64_t m128_i64[2]; // as signed 64-bit integers. uint8_t m128_u8[16]; // as unsigned 8-bit integers. uint16_t m128_u16[8]; // as unsigned 16-bit integers. uint32_t m128_u32[4]; // as unsigned 32-bit integers. uint64_t m128_u64[2]; // as unsigned 64-bit integers. } SIMDVec; // casting using SIMDVec #define vreinterpretq_nth_u64_m128i(x, n) (((SIMDVec *) &x)->m128_u64[n]) #define vreinterpretq_nth_u32_m128i(x, n) (((SIMDVec *) &x)->m128_u32[n]) #define vreinterpretq_nth_u8_m128i(x, n) (((SIMDVec *) &x)->m128_u8[n]) /* Backwards compatibility for compilers with lack of specific type support */ // Older gcc does not define vld1q_u8_x4 type #if defined(__GNUC__) && !defined(__clang__) #if __GNUC__ <= 9 FORCE_INLINE uint8x16x4_t vld1q_u8_x4(const uint8_t *p) { uint8x16x4_t ret; ret.val[0] = vld1q_u8(p + 0); ret.val[1] = vld1q_u8(p + 16); ret.val[2] = vld1q_u8(p + 32); ret.val[3] = vld1q_u8(p + 48); return ret; } #endif #endif /* Function Naming Conventions * The naming convention of SSE intrinsics is straightforward. A generic SSE * intrinsic function is given as follows: * _mm__ * * The parts of this format are given as follows: * 1. describes the operation performed by the intrinsic * 2. identifies the data type of the function's primary arguments * * This last part, , is a little complicated. It identifies the * content of the input values, and can be set to any of the following values: * + ps - vectors contain floats (ps stands for packed single-precision) * + pd - vectors cantain doubles (pd stands for packed double-precision) * + epi8/epi16/epi32/epi64 - vectors contain 8-bit/16-bit/32-bit/64-bit * signed integers * + epu8/epu16/epu32/epu64 - vectors contain 8-bit/16-bit/32-bit/64-bit * unsigned integers * + si128 - unspecified 128-bit vector or 256-bit vector * + m128/m128i/m128d - identifies input vector types when they are different * than the type of the returned vector * * For example, _mm_setzero_ps. The _mm implies that the function returns * a 128-bit vector. The _ps at the end implies that the argument vectors * contain floats. * * A complete example: Byte Shuffle - pshufb (_mm_shuffle_epi8) * // Set packed 16-bit integers. 128 bits, 8 short, per 16 bits * __m128i v_in = _mm_setr_epi16(1, 2, 3, 4, 5, 6, 7, 8); * // Set packed 8-bit integers * // 128 bits, 16 chars, per 8 bits * __m128i v_perm = _mm_setr_epi8(1, 0, 2, 3, 8, 9, 10, 11, * 4, 5, 12, 13, 6, 7, 14, 15); * // Shuffle packed 8-bit integers * __m128i v_out = _mm_shuffle_epi8(v_in, v_perm); // pshufb * * Data (Number, Binary, Byte Index): +------+------+-------------+------+------+-------------+ | 1 | 2 | 3 | 4 | Number +------+------+------+------+------+------+------+------+ | 0000 | 0001 | 0000 | 0010 | 0000 | 0011 | 0000 | 0100 | Binary +------+------+------+------+------+------+------+------+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Index +------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+ | 5 | 6 | 7 | 8 | Number +------+------+------+------+------+------+------+------+ | 0000 | 0101 | 0000 | 0110 | 0000 | 0111 | 0000 | 1000 | Binary +------+------+------+------+------+------+------+------+ | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Index +------+------+------+------+------+------+------+------+ * Index (Byte Index): +------+------+------+------+------+------+------+------+ | 1 | 0 | 2 | 3 | 8 | 9 | 10 | 11 | +------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+ | 4 | 5 | 12 | 13 | 6 | 7 | 14 | 15 | +------+------+------+------+------+------+------+------+ * Result: +------+------+------+------+------+------+------+------+ | 1 | 0 | 2 | 3 | 8 | 9 | 10 | 11 | Index +------+------+------+------+------+------+------+------+ | 0001 | 0000 | 0000 | 0010 | 0000 | 0101 | 0000 | 0110 | Binary +------+------+------+------+------+------+------+------+ | 256 | 2 | 5 | 6 | Number +------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+ | 4 | 5 | 12 | 13 | 6 | 7 | 14 | 15 | Index +------+------+------+------+------+------+------+------+ | 0000 | 0011 | 0000 | 0111 | 0000 | 0100 | 0000 | 1000 | Binary +------+------+------+------+------+------+------+------+ | 3 | 7 | 4 | 8 | Number +------+------+------+------+------+------+-------------+ */ /* Set/get methods */ /* Constants for use with _mm_prefetch. */ enum _mm_hint { _MM_HINT_NTA = 0, /* load data to L1 and L2 cache, mark it as NTA */ _MM_HINT_T0 = 1, /* load data to L1 and L2 cache */ _MM_HINT_T1 = 2, /* load data to L2 cache only */ _MM_HINT_T2 = 3, /* load data to L2 cache only, mark it as NTA */ _MM_HINT_ENTA = 4, /* exclusive version of _MM_HINT_NTA */ _MM_HINT_ET0 = 5, /* exclusive version of _MM_HINT_T0 */ _MM_HINT_ET1 = 6, /* exclusive version of _MM_HINT_T1 */ _MM_HINT_ET2 = 7 /* exclusive version of _MM_HINT_T2 */ }; // Loads one cache line of data from address p to a location closer to the // processor. https://msdn.microsoft.com/en-us/library/84szxsww(v=vs.100).aspx FORCE_INLINE void _mm_prefetch(const void *p, int i) { (void) i; __builtin_prefetch(p); } // Copy the lower single-precision (32-bit) floating-point element of a to dst. // // dst[31:0] := a[31:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtss_f32 FORCE_INLINE float _mm_cvtss_f32(__m128 a) { return vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); } // Convert the lower single-precision (32-bit) floating-point element in a to a // 32-bit integer, and store the result in dst. // // dst[31:0] := Convert_FP32_To_Int32(a[31:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtss_si32 #define _mm_cvtss_si32(a) _mm_cvt_ss2si(a) // Convert the lower single-precision (32-bit) floating-point element in a to a // 64-bit integer, and store the result in dst. // // dst[63:0] := Convert_FP32_To_Int64(a[31:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtss_si64 FORCE_INLINE int _mm_cvtss_si64(__m128 a) { #if defined(__aarch64__) return vgetq_lane_s64( vreinterpretq_s64_s32(vcvtnq_s32_f32(vreinterpretq_f32_m128(a))), 0); #else float32_t data = vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); float32_t diff = data - floor(data); if (diff > 0.5) return (int64_t) ceil(data); if (diff == 0.5) { int64_t f = (int64_t) floor(data); int64_t c = (int64_t) ceil(data); return c & 1 ? f : c; } return (int64_t) floor(data); #endif } // Convert packed single-precision (32-bit) floating-point elements in a to // packed 32-bit integers with truncation, and store the results in dst. // // FOR j := 0 to 1 // i := 32*j // dst[i+31:i] := Convert_FP32_To_Int32_Truncate(a[i+31:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtt_ps2pi FORCE_INLINE __m64 _mm_cvtt_ps2pi(__m128 a) { return vreinterpret_m64_s32( vget_low_s32(vcvtq_s32_f32(vreinterpretq_f32_m128(a)))); } // Convert the lower single-precision (32-bit) floating-point element in a to a // 32-bit integer with truncation, and store the result in dst. // // dst[31:0] := Convert_FP32_To_Int32_Truncate(a[31:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtt_ss2si FORCE_INLINE int _mm_cvtt_ss2si(__m128 a) { return vgetq_lane_s32(vcvtq_s32_f32(vreinterpretq_f32_m128(a)), 0); } // Convert packed single-precision (32-bit) floating-point elements in a to // packed 32-bit integers with truncation, and store the results in dst. // // FOR j := 0 to 1 // i := 32*j // dst[i+31:i] := Convert_FP32_To_Int32_Truncate(a[i+31:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvttps_pi32 #define _mm_cvttps_pi32(a) _mm_cvtt_ps2pi(a) // Convert the lower single-precision (32-bit) floating-point element in a to a // 32-bit integer with truncation, and store the result in dst. // // dst[31:0] := Convert_FP32_To_Int32_Truncate(a[31:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvttss_si32 #define _mm_cvttss_si32(a) _mm_cvtt_ss2si(a) // Convert the lower single-precision (32-bit) floating-point element in a to a // 64-bit integer with truncation, and store the result in dst. // // dst[63:0] := Convert_FP32_To_Int64_Truncate(a[31:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvttss_si64 FORCE_INLINE int64_t _mm_cvttss_si64(__m128 a) { return vgetq_lane_s64( vmovl_s32(vget_low_s32(vcvtq_s32_f32(vreinterpretq_f32_m128(a)))), 0); } // Sets the 128-bit value to zero // https://msdn.microsoft.com/en-us/library/vstudio/ys7dw0kh(v=vs.100).aspx FORCE_INLINE __m128i _mm_setzero_si128(void) { return vreinterpretq_m128i_s32(vdupq_n_s32(0)); } // Clears the four single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/vstudio/tk1t2tbz(v=vs.100).aspx FORCE_INLINE __m128 _mm_setzero_ps(void) { return vreinterpretq_m128_f32(vdupq_n_f32(0)); } // Return vector of type __m128d with all elements set to zero. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_setzero_pd FORCE_INLINE __m128d _mm_setzero_pd(void) { #if defined(__aarch64__) return vreinterpretq_m128d_f64(vdupq_n_f64(0)); #else return vreinterpretq_m128d_f32(vdupq_n_f32(0)); #endif } // Sets the four single-precision, floating-point values to w. // // r0 := r1 := r2 := r3 := w // // https://msdn.microsoft.com/en-us/library/vstudio/2x1se8ha(v=vs.100).aspx FORCE_INLINE __m128 _mm_set1_ps(float _w) { return vreinterpretq_m128_f32(vdupq_n_f32(_w)); } // Sets the four single-precision, floating-point values to w. // https://msdn.microsoft.com/en-us/library/vstudio/2x1se8ha(v=vs.100).aspx FORCE_INLINE __m128 _mm_set_ps1(float _w) { return vreinterpretq_m128_f32(vdupq_n_f32(_w)); } // Sets the four single-precision, floating-point values to the four inputs. // https://msdn.microsoft.com/en-us/library/vstudio/afh0zf75(v=vs.100).aspx FORCE_INLINE __m128 _mm_set_ps(float w, float z, float y, float x) { float ALIGN_STRUCT(16) data[4] = {x, y, z, w}; return vreinterpretq_m128_f32(vld1q_f32(data)); } // Copy single-precision (32-bit) floating-point element a to the lower element // of dst, and zero the upper 3 elements. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_set_ss FORCE_INLINE __m128 _mm_set_ss(float a) { float ALIGN_STRUCT(16) data[4] = {a, 0, 0, 0}; return vreinterpretq_m128_f32(vld1q_f32(data)); } // Sets the four single-precision, floating-point values to the four inputs in // reverse order. // https://msdn.microsoft.com/en-us/library/vstudio/d2172ct3(v=vs.100).aspx FORCE_INLINE __m128 _mm_setr_ps(float w, float z, float y, float x) { float ALIGN_STRUCT(16) data[4] = {w, z, y, x}; return vreinterpretq_m128_f32(vld1q_f32(data)); } // Sets the 8 signed 16-bit integer values in reverse order. // // Return Value // r0 := w0 // r1 := w1 // ... // r7 := w7 FORCE_INLINE __m128i _mm_setr_epi16(short w0, short w1, short w2, short w3, short w4, short w5, short w6, short w7) { int16_t ALIGN_STRUCT(16) data[8] = {w0, w1, w2, w3, w4, w5, w6, w7}; return vreinterpretq_m128i_s16(vld1q_s16((int16_t *) data)); } // Sets the 4 signed 32-bit integer values in reverse order // https://technet.microsoft.com/en-us/library/security/27yb3ee5(v=vs.90).aspx FORCE_INLINE __m128i _mm_setr_epi32(int i3, int i2, int i1, int i0) { int32_t ALIGN_STRUCT(16) data[4] = {i3, i2, i1, i0}; return vreinterpretq_m128i_s32(vld1q_s32(data)); } // Set packed 64-bit integers in dst with the supplied values in reverse order. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_setr_epi64 FORCE_INLINE __m128i _mm_setr_epi64(__m64 e1, __m64 e0) { return vreinterpretq_m128i_s64(vcombine_s64(e1, e0)); } // Sets the 16 signed 8-bit integer values to b. // // r0 := b // r1 := b // ... // r15 := b // // https://msdn.microsoft.com/en-us/library/6e14xhyf(v=vs.100).aspx FORCE_INLINE __m128i _mm_set1_epi8(signed char w) { return vreinterpretq_m128i_s8(vdupq_n_s8(w)); } // Sets the 8 signed 16-bit integer values to w. // // r0 := w // r1 := w // ... // r7 := w // // https://msdn.microsoft.com/en-us/library/k0ya3x0e(v=vs.90).aspx FORCE_INLINE __m128i _mm_set1_epi16(short w) { return vreinterpretq_m128i_s16(vdupq_n_s16(w)); } // Sets the 16 signed 8-bit integer values. // https://msdn.microsoft.com/en-us/library/x0cx8zd3(v=vs.90).aspx FORCE_INLINE __m128i _mm_set_epi8(signed char b15, signed char b14, signed char b13, signed char b12, signed char b11, signed char b10, signed char b9, signed char b8, signed char b7, signed char b6, signed char b5, signed char b4, signed char b3, signed char b2, signed char b1, signed char b0) { int8_t ALIGN_STRUCT(16) data[16] = {(int8_t) b0, (int8_t) b1, (int8_t) b2, (int8_t) b3, (int8_t) b4, (int8_t) b5, (int8_t) b6, (int8_t) b7, (int8_t) b8, (int8_t) b9, (int8_t) b10, (int8_t) b11, (int8_t) b12, (int8_t) b13, (int8_t) b14, (int8_t) b15}; return (__m128i) vld1q_s8(data); } // Sets the 8 signed 16-bit integer values. // https://msdn.microsoft.com/en-au/library/3e0fek84(v=vs.90).aspx FORCE_INLINE __m128i _mm_set_epi16(short i7, short i6, short i5, short i4, short i3, short i2, short i1, short i0) { int16_t ALIGN_STRUCT(16) data[8] = {i0, i1, i2, i3, i4, i5, i6, i7}; return vreinterpretq_m128i_s16(vld1q_s16(data)); } // Sets the 16 signed 8-bit integer values in reverse order. // https://msdn.microsoft.com/en-us/library/2khb9c7k(v=vs.90).aspx FORCE_INLINE __m128i _mm_setr_epi8(signed char b0, signed char b1, signed char b2, signed char b3, signed char b4, signed char b5, signed char b6, signed char b7, signed char b8, signed char b9, signed char b10, signed char b11, signed char b12, signed char b13, signed char b14, signed char b15) { int8_t ALIGN_STRUCT(16) data[16] = {(int8_t) b0, (int8_t) b1, (int8_t) b2, (int8_t) b3, (int8_t) b4, (int8_t) b5, (int8_t) b6, (int8_t) b7, (int8_t) b8, (int8_t) b9, (int8_t) b10, (int8_t) b11, (int8_t) b12, (int8_t) b13, (int8_t) b14, (int8_t) b15}; return (__m128i) vld1q_s8(data); } // Sets the 4 signed 32-bit integer values to i. // // r0 := i // r1 := i // r2 := i // r3 := I // // https://msdn.microsoft.com/en-us/library/vstudio/h4xscxat(v=vs.100).aspx FORCE_INLINE __m128i _mm_set1_epi32(int _i) { return vreinterpretq_m128i_s32(vdupq_n_s32(_i)); } // Sets the 2 signed 64-bit integer values to i. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/whtfzhzk(v=vs.100) FORCE_INLINE __m128i _mm_set1_epi64(__m64 _i) { return vreinterpretq_m128i_s64(vdupq_n_s64((int64_t) _i)); } // Sets the 2 signed 64-bit integer values to i. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_set1_epi64x FORCE_INLINE __m128i _mm_set1_epi64x(int64_t _i) { return vreinterpretq_m128i_s64(vdupq_n_s64(_i)); } // Sets the 4 signed 32-bit integer values. // https://msdn.microsoft.com/en-us/library/vstudio/019beekt(v=vs.100).aspx FORCE_INLINE __m128i _mm_set_epi32(int i3, int i2, int i1, int i0) { int32_t ALIGN_STRUCT(16) data[4] = {i0, i1, i2, i3}; return vreinterpretq_m128i_s32(vld1q_s32(data)); } // Returns the __m128i structure with its two 64-bit integer values // initialized to the values of the two 64-bit integers passed in. // https://msdn.microsoft.com/en-us/library/dk2sdw0h(v=vs.120).aspx FORCE_INLINE __m128i _mm_set_epi64x(int64_t i1, int64_t i2) { int64_t ALIGN_STRUCT(16) data[2] = {i2, i1}; return vreinterpretq_m128i_s64(vld1q_s64(data)); } // Returns the __m128i structure with its two 64-bit integer values // initialized to the values of the two 64-bit integers passed in. // https://msdn.microsoft.com/en-us/library/dk2sdw0h(v=vs.120).aspx FORCE_INLINE __m128i _mm_set_epi64(__m64 i1, __m64 i2) { return _mm_set_epi64x((int64_t) i1, (int64_t) i2); } // Set packed double-precision (64-bit) floating-point elements in dst with the // supplied values. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_set_pd FORCE_INLINE __m128d _mm_set_pd(double e1, double e0) { double ALIGN_STRUCT(16) data[2] = {e0, e1}; #if defined(__aarch64__) return vreinterpretq_m128d_f64(vld1q_f64((float64_t *) data)); #else return vreinterpretq_m128d_f32(vld1q_f32((float32_t *) data)); #endif } // Stores four single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/vstudio/s3h4ay6y(v=vs.100).aspx FORCE_INLINE void _mm_store_ps(float *p, __m128 a) { vst1q_f32(p, vreinterpretq_f32_m128(a)); } // Stores four single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/44e30x22(v=vs.100).aspx FORCE_INLINE void _mm_storeu_ps(float *p, __m128 a) { vst1q_f32(p, vreinterpretq_f32_m128(a)); } // Stores four 32-bit integer values as (as a __m128i value) at the address p. // https://msdn.microsoft.com/en-us/library/vstudio/edk11s13(v=vs.100).aspx FORCE_INLINE void _mm_store_si128(__m128i *p, __m128i a) { vst1q_s32((int32_t *) p, vreinterpretq_s32_m128i(a)); } // Stores four 32-bit integer values as (as a __m128i value) at the address p. // https://msdn.microsoft.com/en-us/library/vstudio/edk11s13(v=vs.100).aspx FORCE_INLINE void _mm_storeu_si128(__m128i *p, __m128i a) { vst1q_s32((int32_t *) p, vreinterpretq_s32_m128i(a)); } // Stores the lower single - precision, floating - point value. // https://msdn.microsoft.com/en-us/library/tzz10fbx(v=vs.100).aspx FORCE_INLINE void _mm_store_ss(float *p, __m128 a) { vst1q_lane_f32(p, vreinterpretq_f32_m128(a), 0); } // Store 128-bits (composed of 2 packed double-precision (64-bit) floating-point // elements) from a into memory. mem_addr must be aligned on a 16-byte boundary // or a general-protection exception may be generated. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_store_pd FORCE_INLINE void _mm_store_pd(double *mem_addr, __m128d a) { #if defined(__aarch64__) vst1q_f64((float64_t *) mem_addr, vreinterpretq_f64_m128d(a)); #else vst1q_f32((float32_t *) mem_addr, vreinterpretq_f32_m128d(a)); #endif } // Store 128-bits (composed of 2 packed double-precision (64-bit) floating-point // elements) from a into memory. mem_addr does not need to be aligned on any // particular boundary. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_storeu_pd FORCE_INLINE void _mm_storeu_pd(double *mem_addr, __m128d a) { _mm_store_pd(mem_addr, a); } // Reads the lower 64 bits of b and stores them into the lower 64 bits of a. // https://msdn.microsoft.com/en-us/library/hhwf428f%28v=vs.90%29.aspx FORCE_INLINE void _mm_storel_epi64(__m128i *a, __m128i b) { uint64x1_t hi = vget_high_u64(vreinterpretq_u64_m128i(*a)); uint64x1_t lo = vget_low_u64(vreinterpretq_u64_m128i(b)); *a = vreinterpretq_m128i_u64(vcombine_u64(lo, hi)); } // Stores the lower two single-precision floating point values of a to the // address p. // // *p0 := a0 // *p1 := a1 // // https://msdn.microsoft.com/en-us/library/h54t98ks(v=vs.90).aspx FORCE_INLINE void _mm_storel_pi(__m64 *p, __m128 a) { *p = vreinterpret_m64_f32(vget_low_f32(a)); } // Stores the upper two single-precision, floating-point values of a to the // address p. // // *p0 := a2 // *p1 := a3 // // https://msdn.microsoft.com/en-us/library/a7525fs8(v%3dvs.90).aspx FORCE_INLINE void _mm_storeh_pi(__m64 *p, __m128 a) { *p = vreinterpret_m64_f32(vget_high_f32(a)); } // Loads a single single-precision, floating-point value, copying it into all // four words // https://msdn.microsoft.com/en-us/library/vstudio/5cdkf716(v=vs.100).aspx FORCE_INLINE __m128 _mm_load1_ps(const float *p) { return vreinterpretq_m128_f32(vld1q_dup_f32(p)); } // Load a single-precision (32-bit) floating-point element from memory into all // elements of dst. // // dst[31:0] := MEM[mem_addr+31:mem_addr] // dst[63:32] := MEM[mem_addr+31:mem_addr] // dst[95:64] := MEM[mem_addr+31:mem_addr] // dst[127:96] := MEM[mem_addr+31:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_load_ps1 #define _mm_load_ps1 _mm_load1_ps // Sets the lower two single-precision, floating-point values with 64 // bits of data loaded from the address p; the upper two values are passed // through from a. // // Return Value // r0 := *p0 // r1 := *p1 // r2 := a2 // r3 := a3 // // https://msdn.microsoft.com/en-us/library/s57cyak2(v=vs.100).aspx FORCE_INLINE __m128 _mm_loadl_pi(__m128 a, __m64 const *p) { return vreinterpretq_m128_f32( vcombine_f32(vld1_f32((const float32_t *) p), vget_high_f32(a))); } // Load 4 single-precision (32-bit) floating-point elements from memory into dst // in reverse order. mem_addr must be aligned on a 16-byte boundary or a // general-protection exception may be generated. // // dst[31:0] := MEM[mem_addr+127:mem_addr+96] // dst[63:32] := MEM[mem_addr+95:mem_addr+64] // dst[95:64] := MEM[mem_addr+63:mem_addr+32] // dst[127:96] := MEM[mem_addr+31:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadr_ps FORCE_INLINE __m128 _mm_loadr_ps(const float *p) { float32x4_t v = vrev64q_f32(vld1q_f32(p)); return vreinterpretq_m128_f32(vextq_f32(v, v, 2)); } // Sets the upper two single-precision, floating-point values with 64 // bits of data loaded from the address p; the lower two values are passed // through from a. // // r0 := a0 // r1 := a1 // r2 := *p0 // r3 := *p1 // // https://msdn.microsoft.com/en-us/library/w92wta0x(v%3dvs.100).aspx FORCE_INLINE __m128 _mm_loadh_pi(__m128 a, __m64 const *p) { return vreinterpretq_m128_f32( vcombine_f32(vget_low_f32(a), vld1_f32((const float32_t *) p))); } // Loads four single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/vstudio/zzd50xxt(v=vs.100).aspx FORCE_INLINE __m128 _mm_load_ps(const float *p) { return vreinterpretq_m128_f32(vld1q_f32(p)); } // Loads four single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/x1b16s7z%28v=vs.90%29.aspx FORCE_INLINE __m128 _mm_loadu_ps(const float *p) { // for neon, alignment doesn't matter, so _mm_load_ps and _mm_loadu_ps are // equivalent for neon return vreinterpretq_m128_f32(vld1q_f32(p)); } // Load unaligned 16-bit integer from memory into the first element of dst. // // dst[15:0] := MEM[mem_addr+15:mem_addr] // dst[MAX:16] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadu_si16 FORCE_INLINE __m128i _mm_loadu_si16(const void *p) { return vreinterpretq_m128i_s16( vsetq_lane_s16(*(const int16_t *) p, vdupq_n_s16(0), 0)); } // Load unaligned 64-bit integer from memory into the first element of dst. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[MAX:64] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadu_si64 FORCE_INLINE __m128i _mm_loadu_si64(const void *p) { return vreinterpretq_m128i_s64( vcombine_s64(vld1_s64((const int64_t *) p), vdup_n_s64(0))); } // Load a double-precision (64-bit) floating-point element from memory into the // lower of dst, and zero the upper element. mem_addr does not need to be // aligned on any particular boundary. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[127:64] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_load_sd FORCE_INLINE __m128d _mm_load_sd(const double *p) { #if defined(__aarch64__) return vreinterpretq_m128d_f64(vsetq_lane_f64(*p, vdupq_n_f64(0), 0)); #else const float *fp = (const float *) p; float ALIGN_STRUCT(16) data[4] = {fp[0], fp[1], 0, 0}; return vreinterpretq_m128d_f32(vld1q_f32(data)); #endif } // Loads two double-precision from 16-byte aligned memory, floating-point // values. // // dst[127:0] := MEM[mem_addr+127:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_load_pd FORCE_INLINE __m128d _mm_load_pd(const double *p) { #if defined(__aarch64__) return vreinterpretq_m128d_f64(vld1q_f64(p)); #else const float *fp = (const float *) p; float ALIGN_STRUCT(16) data[4] = {fp[0], fp[1], fp[2], fp[3]}; return vreinterpretq_m128d_f32(vld1q_f32(data)); #endif } // Loads two double-precision from unaligned memory, floating-point values. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadu_pd FORCE_INLINE __m128d _mm_loadu_pd(const double *p) { return _mm_load_pd(p); } // Loads an single - precision, floating - point value into the low word and // clears the upper three words. // https://msdn.microsoft.com/en-us/library/548bb9h4%28v=vs.90%29.aspx FORCE_INLINE __m128 _mm_load_ss(const float *p) { return vreinterpretq_m128_f32(vsetq_lane_f32(*p, vdupq_n_f32(0), 0)); } FORCE_INLINE __m128i _mm_loadl_epi64(__m128i const *p) { /* Load the lower 64 bits of the value pointed to by p into the * lower 64 bits of the result, zeroing the upper 64 bits of the result. */ return vreinterpretq_m128i_s32( vcombine_s32(vld1_s32((int32_t const *) p), vcreate_s32(0))); } // Load a double-precision (64-bit) floating-point element from memory into the // lower element of dst, and copy the upper element from a to dst. mem_addr does // not need to be aligned on any particular boundary. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[127:64] := a[127:64] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadl_pd FORCE_INLINE __m128d _mm_loadl_pd(__m128d a, const double *p) { #if defined(__aarch64__) return vreinterpretq_m128d_f64( vcombine_f64(vld1_f64(p), vget_high_f64(vreinterpretq_f64_m128d(a)))); #else return vreinterpretq_m128d_f32( vcombine_f32(vld1_f32((const float *) p), vget_high_f32(vreinterpretq_f32_m128d(a)))); #endif } // Load 2 double-precision (64-bit) floating-point elements from memory into dst // in reverse order. mem_addr must be aligned on a 16-byte boundary or a // general-protection exception may be generated. // // dst[63:0] := MEM[mem_addr+127:mem_addr+64] // dst[127:64] := MEM[mem_addr+63:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadr_pd FORCE_INLINE __m128d _mm_loadr_pd(const double *p) { #if defined(__aarch64__) float64x2_t v = vld1q_f64(p); return vreinterpretq_m128d_f64(vextq_f64(v, v, 1)); #else int64x2_t v = vld1q_s64((const int64_t *) p); return vreinterpretq_m128d_s64(vextq_s64(v, v, 1)); #endif } // Sets the low word to the single-precision, floating-point value of b // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/35hdzazd(v=vs.100) FORCE_INLINE __m128 _mm_move_ss(__m128 a, __m128 b) { return vreinterpretq_m128_f32( vsetq_lane_f32(vgetq_lane_f32(vreinterpretq_f32_m128(b), 0), vreinterpretq_f32_m128(a), 0)); } // Copy the lower 64-bit integer in a to the lower element of dst, and zero the // upper element. // // dst[63:0] := a[63:0] // dst[127:64] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_move_epi64 FORCE_INLINE __m128i _mm_move_epi64(__m128i a) { return vreinterpretq_m128i_s64( vsetq_lane_s64(0, vreinterpretq_s64_m128i(a), 1)); } // Return vector of type __m128 with undefined elements. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_undefined_ps FORCE_INLINE __m128 _mm_undefined_ps(void) { __m128 a; return a; } /* Logic/Binary operations */ // Computes the bitwise AND-NOT of the four single-precision, floating-point // values of a and b. // // r0 := ~a0 & b0 // r1 := ~a1 & b1 // r2 := ~a2 & b2 // r3 := ~a3 & b3 // // https://msdn.microsoft.com/en-us/library/vstudio/68h7wd02(v=vs.100).aspx FORCE_INLINE __m128 _mm_andnot_ps(__m128 a, __m128 b) { return vreinterpretq_m128_s32( vbicq_s32(vreinterpretq_s32_m128(b), vreinterpretq_s32_m128(a))); // *NOTE* argument swap } // Compute the bitwise NOT of packed double-precision (64-bit) floating-point // elements in a and then AND with b, and store the results in dst. // // FOR j := 0 to 1 // i := j*64 // dst[i+63:i] := ((NOT a[i+63:i]) AND b[i+63:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_andnot_pd FORCE_INLINE __m128d _mm_andnot_pd(__m128d a, __m128d b) { // *NOTE* argument swap return vreinterpretq_m128d_s64( vbicq_s64(vreinterpretq_s64_m128d(b), vreinterpretq_s64_m128d(a))); } // Computes the bitwise AND of the 128-bit value in b and the bitwise NOT of the // 128-bit value in a. // // r := (~a) & b // // https://msdn.microsoft.com/en-us/library/vstudio/1beaceh8(v=vs.100).aspx FORCE_INLINE __m128i _mm_andnot_si128(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vbicq_s32(vreinterpretq_s32_m128i(b), vreinterpretq_s32_m128i(a))); // *NOTE* argument swap } // Computes the bitwise AND of the 128-bit value in a and the 128-bit value in // b. // // r := a & b // // https://msdn.microsoft.com/en-us/library/vstudio/6d1txsa8(v=vs.100).aspx FORCE_INLINE __m128i _mm_and_si128(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vandq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Computes the bitwise AND of the four single-precision, floating-point values // of a and b. // // r0 := a0 & b0 // r1 := a1 & b1 // r2 := a2 & b2 // r3 := a3 & b3 // // https://msdn.microsoft.com/en-us/library/vstudio/73ck1xc5(v=vs.100).aspx FORCE_INLINE __m128 _mm_and_ps(__m128 a, __m128 b) { return vreinterpretq_m128_s32( vandq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b))); } // Compute the bitwise AND of packed double-precision (64-bit) floating-point // elements in a and b, and store the results in dst. // // FOR j := 0 to 1 // i := j*64 // dst[i+63:i] := a[i+63:i] AND b[i+63:i] // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_and_pd FORCE_INLINE __m128d _mm_and_pd(__m128d a, __m128d b) { return vreinterpretq_m128d_s64( vandq_s64(vreinterpretq_s64_m128d(a), vreinterpretq_s64_m128d(b))); } // Computes the bitwise OR of the four single-precision, floating-point values // of a and b. // https://msdn.microsoft.com/en-us/library/vstudio/7ctdsyy0(v=vs.100).aspx FORCE_INLINE __m128 _mm_or_ps(__m128 a, __m128 b) { return vreinterpretq_m128_s32( vorrq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b))); } // Computes bitwise EXOR (exclusive-or) of the four single-precision, // floating-point values of a and b. // https://msdn.microsoft.com/en-us/library/ss6k3wk8(v=vs.100).aspx FORCE_INLINE __m128 _mm_xor_ps(__m128 a, __m128 b) { return vreinterpretq_m128_s32( veorq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b))); } // Compute the bitwise XOR of packed double-precision (64-bit) floating-point // elements in a and b, and store the results in dst. // // FOR j := 0 to 1 // i := j*64 // dst[i+63:i] := a[i+63:i] XOR b[i+63:i] // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_xor_pd FORCE_INLINE __m128d _mm_xor_pd(__m128d a, __m128d b) { return vreinterpretq_m128d_s64( veorq_s64(vreinterpretq_s64_m128d(a), vreinterpretq_s64_m128d(b))); } // Computes the bitwise OR of the 128-bit value in a and the 128-bit value in b. // // r := a | b // // https://msdn.microsoft.com/en-us/library/vstudio/ew8ty0db(v=vs.100).aspx FORCE_INLINE __m128i _mm_or_si128(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vorrq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Computes the bitwise XOR of the 128-bit value in a and the 128-bit value in // b. https://msdn.microsoft.com/en-us/library/fzt08www(v=vs.100).aspx FORCE_INLINE __m128i _mm_xor_si128(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( veorq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Duplicate odd-indexed single-precision (32-bit) floating-point elements // from a, and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_movehdup_ps FORCE_INLINE __m128 _mm_movehdup_ps(__m128 a) { #if __has_builtin(__builtin_shufflevector) return vreinterpretq_m128_f32(__builtin_shufflevector( vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 1, 1, 3, 3)); #else float32_t a1 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 1); float32_t a3 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 3); float ALIGN_STRUCT(16) data[4] = {a1, a1, a3, a3}; return vreinterpretq_m128_f32(vld1q_f32(data)); #endif } // Duplicate even-indexed single-precision (32-bit) floating-point elements // from a, and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_moveldup_ps FORCE_INLINE __m128 _mm_moveldup_ps(__m128 a) { #if __has_builtin(__builtin_shufflevector) return vreinterpretq_m128_f32(__builtin_shufflevector( vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 0, 0, 2, 2)); #else float32_t a0 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); float32_t a2 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 2); float ALIGN_STRUCT(16) data[4] = {a0, a0, a2, a2}; return vreinterpretq_m128_f32(vld1q_f32(data)); #endif } // Moves the upper two values of B into the lower two values of A. // // r3 := a3 // r2 := a2 // r1 := b3 // r0 := b2 FORCE_INLINE __m128 _mm_movehl_ps(__m128 __A, __m128 __B) { float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(__A)); float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(__B)); return vreinterpretq_m128_f32(vcombine_f32(b32, a32)); } // Moves the lower two values of B into the upper two values of A. // // r3 := b1 // r2 := b0 // r1 := a1 // r0 := a0 FORCE_INLINE __m128 _mm_movelh_ps(__m128 __A, __m128 __B) { float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(__A)); float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(__B)); return vreinterpretq_m128_f32(vcombine_f32(a10, b10)); } // Compute the absolute value of packed signed 32-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 3 // i := j*32 // dst[i+31:i] := ABS(a[i+31:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_epi32 FORCE_INLINE __m128i _mm_abs_epi32(__m128i a) { return vreinterpretq_m128i_s32(vabsq_s32(vreinterpretq_s32_m128i(a))); } // Compute the absolute value of packed signed 16-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 7 // i := j*16 // dst[i+15:i] := ABS(a[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_epi16 FORCE_INLINE __m128i _mm_abs_epi16(__m128i a) { return vreinterpretq_m128i_s16(vabsq_s16(vreinterpretq_s16_m128i(a))); } // Compute the absolute value of packed signed 8-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 15 // i := j*8 // dst[i+7:i] := ABS(a[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_epi8 FORCE_INLINE __m128i _mm_abs_epi8(__m128i a) { return vreinterpretq_m128i_s8(vabsq_s8(vreinterpretq_s8_m128i(a))); } // Compute the absolute value of packed signed 32-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 1 // i := j*32 // dst[i+31:i] := ABS(a[i+31:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_pi32 FORCE_INLINE __m64 _mm_abs_pi32(__m64 a) { return vreinterpret_m64_s32(vabs_s32(vreinterpret_s32_m64(a))); } // Compute the absolute value of packed signed 16-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := ABS(a[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_pi16 FORCE_INLINE __m64 _mm_abs_pi16(__m64 a) { return vreinterpret_m64_s16(vabs_s16(vreinterpret_s16_m64(a))); } // Compute the absolute value of packed signed 8-bit integers in a, and store // the unsigned results in dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := ABS(a[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_pi8 FORCE_INLINE __m64 _mm_abs_pi8(__m64 a) { return vreinterpret_m64_s8(vabs_s8(vreinterpret_s8_m64(a))); } // Takes the upper 64 bits of a and places it in the low end of the result // Takes the lower 64 bits of b and places it into the high end of the result. FORCE_INLINE __m128 _mm_shuffle_ps_1032(__m128 a, __m128 b) { float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32(vcombine_f32(a32, b10)); } // takes the lower two 32-bit values from a and swaps them and places in high // end of result takes the higher two 32 bit values from b and swaps them and // places in low end of result. FORCE_INLINE __m128 _mm_shuffle_ps_2301(__m128 a, __m128 b) { float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); float32x2_t b23 = vrev64_f32(vget_high_f32(vreinterpretq_f32_m128(b))); return vreinterpretq_m128_f32(vcombine_f32(a01, b23)); } FORCE_INLINE __m128 _mm_shuffle_ps_0321(__m128 a, __m128 b) { float32x2_t a21 = vget_high_f32( vextq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 3)); float32x2_t b03 = vget_low_f32( vextq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b), 3)); return vreinterpretq_m128_f32(vcombine_f32(a21, b03)); } FORCE_INLINE __m128 _mm_shuffle_ps_2103(__m128 a, __m128 b) { float32x2_t a03 = vget_low_f32( vextq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 3)); float32x2_t b21 = vget_high_f32( vextq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b), 3)); return vreinterpretq_m128_f32(vcombine_f32(a03, b21)); } FORCE_INLINE __m128 _mm_shuffle_ps_1010(__m128 a, __m128 b) { float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32(vcombine_f32(a10, b10)); } FORCE_INLINE __m128 _mm_shuffle_ps_1001(__m128 a, __m128 b) { float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32(vcombine_f32(a01, b10)); } FORCE_INLINE __m128 _mm_shuffle_ps_0101(__m128 a, __m128 b) { float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); float32x2_t b01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(b))); return vreinterpretq_m128_f32(vcombine_f32(a01, b01)); } // keeps the low 64 bits of b in the low and puts the high 64 bits of a in the // high FORCE_INLINE __m128 _mm_shuffle_ps_3210(__m128 a, __m128 b) { float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32(vcombine_f32(a10, b32)); } FORCE_INLINE __m128 _mm_shuffle_ps_0011(__m128 a, __m128 b) { float32x2_t a11 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(a)), 1); float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); return vreinterpretq_m128_f32(vcombine_f32(a11, b00)); } FORCE_INLINE __m128 _mm_shuffle_ps_0022(__m128 a, __m128 b) { float32x2_t a22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 0); float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); return vreinterpretq_m128_f32(vcombine_f32(a22, b00)); } FORCE_INLINE __m128 _mm_shuffle_ps_2200(__m128 a, __m128 b) { float32x2_t a00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(a)), 0); float32x2_t b22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(b)), 0); return vreinterpretq_m128_f32(vcombine_f32(a00, b22)); } FORCE_INLINE __m128 _mm_shuffle_ps_3202(__m128 a, __m128 b) { float32_t a0 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); float32x2_t a22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 0); float32x2_t a02 = vset_lane_f32(a0, a22, 1); /* TODO: use vzip ?*/ float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32(vcombine_f32(a02, b32)); } FORCE_INLINE __m128 _mm_shuffle_ps_1133(__m128 a, __m128 b) { float32x2_t a33 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 1); float32x2_t b11 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 1); return vreinterpretq_m128_f32(vcombine_f32(a33, b11)); } FORCE_INLINE __m128 _mm_shuffle_ps_2010(__m128 a, __m128 b) { float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); float32_t b2 = vgetq_lane_f32(vreinterpretq_f32_m128(b), 2); float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); float32x2_t b20 = vset_lane_f32(b2, b00, 1); return vreinterpretq_m128_f32(vcombine_f32(a10, b20)); } FORCE_INLINE __m128 _mm_shuffle_ps_2001(__m128 a, __m128 b) { float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); float32_t b2 = vgetq_lane_f32(b, 2); float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); float32x2_t b20 = vset_lane_f32(b2, b00, 1); return vreinterpretq_m128_f32(vcombine_f32(a01, b20)); } FORCE_INLINE __m128 _mm_shuffle_ps_2032(__m128 a, __m128 b) { float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); float32_t b2 = vgetq_lane_f32(b, 2); float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); float32x2_t b20 = vset_lane_f32(b2, b00, 1); return vreinterpretq_m128_f32(vcombine_f32(a32, b20)); } // NEON does not support a general purpose permute intrinsic // Selects four specific single-precision, floating-point values from a and b, // based on the mask i. // // C equivalent: // __m128 _mm_shuffle_ps_default(__m128 a, __m128 b, // __constrange(0, 255) int imm) { // __m128 ret; // ret[0] = a[imm & 0x3]; ret[1] = a[(imm >> 2) & 0x3]; // ret[2] = b[(imm >> 4) & 0x03]; ret[3] = b[(imm >> 6) & 0x03]; // return ret; // } // // https://msdn.microsoft.com/en-us/library/vstudio/5f0858x0(v=vs.100).aspx #define _mm_shuffle_ps_default(a, b, imm) \ __extension__({ \ float32x4_t ret; \ ret = vmovq_n_f32( \ vgetq_lane_f32(vreinterpretq_f32_m128(a), (imm) & (0x3))); \ ret = vsetq_lane_f32( \ vgetq_lane_f32(vreinterpretq_f32_m128(a), ((imm) >> 2) & 0x3), \ ret, 1); \ ret = vsetq_lane_f32( \ vgetq_lane_f32(vreinterpretq_f32_m128(b), ((imm) >> 4) & 0x3), \ ret, 2); \ ret = vsetq_lane_f32( \ vgetq_lane_f32(vreinterpretq_f32_m128(b), ((imm) >> 6) & 0x3), \ ret, 3); \ vreinterpretq_m128_f32(ret); \ }) // FORCE_INLINE __m128 _mm_shuffle_ps(__m128 a, __m128 b, __constrange(0,255) // int imm) #if __has_builtin(__builtin_shufflevector) #define _mm_shuffle_ps(a, b, imm) \ __extension__({ \ float32x4_t _input1 = vreinterpretq_f32_m128(a); \ float32x4_t _input2 = vreinterpretq_f32_m128(b); \ float32x4_t _shuf = __builtin_shufflevector( \ _input1, _input2, (imm) & (0x3), ((imm) >> 2) & 0x3, \ (((imm) >> 4) & 0x3) + 4, (((imm) >> 6) & 0x3) + 4); \ vreinterpretq_m128_f32(_shuf); \ }) #else // generic #define _mm_shuffle_ps(a, b, imm) \ __extension__({ \ __m128 ret; \ switch (imm) { \ case _MM_SHUFFLE(1, 0, 3, 2): \ ret = _mm_shuffle_ps_1032((a), (b)); \ break; \ case _MM_SHUFFLE(2, 3, 0, 1): \ ret = _mm_shuffle_ps_2301((a), (b)); \ break; \ case _MM_SHUFFLE(0, 3, 2, 1): \ ret = _mm_shuffle_ps_0321((a), (b)); \ break; \ case _MM_SHUFFLE(2, 1, 0, 3): \ ret = _mm_shuffle_ps_2103((a), (b)); \ break; \ case _MM_SHUFFLE(1, 0, 1, 0): \ ret = _mm_movelh_ps((a), (b)); \ break; \ case _MM_SHUFFLE(1, 0, 0, 1): \ ret = _mm_shuffle_ps_1001((a), (b)); \ break; \ case _MM_SHUFFLE(0, 1, 0, 1): \ ret = _mm_shuffle_ps_0101((a), (b)); \ break; \ case _MM_SHUFFLE(3, 2, 1, 0): \ ret = _mm_shuffle_ps_3210((a), (b)); \ break; \ case _MM_SHUFFLE(0, 0, 1, 1): \ ret = _mm_shuffle_ps_0011((a), (b)); \ break; \ case _MM_SHUFFLE(0, 0, 2, 2): \ ret = _mm_shuffle_ps_0022((a), (b)); \ break; \ case _MM_SHUFFLE(2, 2, 0, 0): \ ret = _mm_shuffle_ps_2200((a), (b)); \ break; \ case _MM_SHUFFLE(3, 2, 0, 2): \ ret = _mm_shuffle_ps_3202((a), (b)); \ break; \ case _MM_SHUFFLE(3, 2, 3, 2): \ ret = _mm_movehl_ps((b), (a)); \ break; \ case _MM_SHUFFLE(1, 1, 3, 3): \ ret = _mm_shuffle_ps_1133((a), (b)); \ break; \ case _MM_SHUFFLE(2, 0, 1, 0): \ ret = _mm_shuffle_ps_2010((a), (b)); \ break; \ case _MM_SHUFFLE(2, 0, 0, 1): \ ret = _mm_shuffle_ps_2001((a), (b)); \ break; \ case _MM_SHUFFLE(2, 0, 3, 2): \ ret = _mm_shuffle_ps_2032((a), (b)); \ break; \ default: \ ret = _mm_shuffle_ps_default((a), (b), (imm)); \ break; \ } \ ret; \ }) #endif // Takes the upper 64 bits of a and places it in the low end of the result // Takes the lower 64 bits of a and places it into the high end of the result. FORCE_INLINE __m128i _mm_shuffle_epi_1032(__m128i a) { int32x2_t a32 = vget_high_s32(vreinterpretq_s32_m128i(a)); int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); return vreinterpretq_m128i_s32(vcombine_s32(a32, a10)); } // takes the lower two 32-bit values from a and swaps them and places in low end // of result takes the higher two 32 bit values from a and swaps them and places // in high end of result. FORCE_INLINE __m128i _mm_shuffle_epi_2301(__m128i a) { int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); int32x2_t a23 = vrev64_s32(vget_high_s32(vreinterpretq_s32_m128i(a))); return vreinterpretq_m128i_s32(vcombine_s32(a01, a23)); } // rotates the least significant 32 bits into the most signficant 32 bits, and // shifts the rest down FORCE_INLINE __m128i _mm_shuffle_epi_0321(__m128i a) { return vreinterpretq_m128i_s32( vextq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(a), 1)); } // rotates the most significant 32 bits into the least signficant 32 bits, and // shifts the rest up FORCE_INLINE __m128i _mm_shuffle_epi_2103(__m128i a) { return vreinterpretq_m128i_s32( vextq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(a), 3)); } // gets the lower 64 bits of a, and places it in the upper 64 bits // gets the lower 64 bits of a and places it in the lower 64 bits FORCE_INLINE __m128i _mm_shuffle_epi_1010(__m128i a) { int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); return vreinterpretq_m128i_s32(vcombine_s32(a10, a10)); } // gets the lower 64 bits of a, swaps the 0 and 1 elements, and places it in the // lower 64 bits gets the lower 64 bits of a, and places it in the upper 64 bits FORCE_INLINE __m128i _mm_shuffle_epi_1001(__m128i a) { int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); return vreinterpretq_m128i_s32(vcombine_s32(a01, a10)); } // gets the lower 64 bits of a, swaps the 0 and 1 elements and places it in the // upper 64 bits gets the lower 64 bits of a, swaps the 0 and 1 elements, and // places it in the lower 64 bits FORCE_INLINE __m128i _mm_shuffle_epi_0101(__m128i a) { int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); return vreinterpretq_m128i_s32(vcombine_s32(a01, a01)); } FORCE_INLINE __m128i _mm_shuffle_epi_2211(__m128i a) { int32x2_t a11 = vdup_lane_s32(vget_low_s32(vreinterpretq_s32_m128i(a)), 1); int32x2_t a22 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 0); return vreinterpretq_m128i_s32(vcombine_s32(a11, a22)); } FORCE_INLINE __m128i _mm_shuffle_epi_0122(__m128i a) { int32x2_t a22 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 0); int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); return vreinterpretq_m128i_s32(vcombine_s32(a22, a01)); } FORCE_INLINE __m128i _mm_shuffle_epi_3332(__m128i a) { int32x2_t a32 = vget_high_s32(vreinterpretq_s32_m128i(a)); int32x2_t a33 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 1); return vreinterpretq_m128i_s32(vcombine_s32(a32, a33)); } // Shuffle packed 8-bit integers in a according to shuffle control mask in the // corresponding 8-bit element of b, and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_shuffle_epi8 FORCE_INLINE __m128i _mm_shuffle_epi8(__m128i a, __m128i b) { int8x16_t tbl = vreinterpretq_s8_m128i(a); // input a uint8x16_t idx = vreinterpretq_u8_m128i(b); // input b uint8x16_t idx_masked = vandq_u8(idx, vdupq_n_u8(0x8F)); // avoid using meaningless bits #if defined(__aarch64__) return vreinterpretq_m128i_s8(vqtbl1q_s8(tbl, idx_masked)); #elif defined(__GNUC__) int8x16_t ret; // %e and %f represent the even and odd D registers // respectively. __asm__ __volatile__( "vtbl.8 %e[ret], {%e[tbl], %f[tbl]}, %e[idx]\n" "vtbl.8 %f[ret], {%e[tbl], %f[tbl]}, %f[idx]\n" : [ret] "=&w"(ret) : [tbl] "w"(tbl), [idx] "w"(idx_masked)); return vreinterpretq_m128i_s8(ret); #else // use this line if testing on aarch64 int8x8x2_t a_split = {vget_low_s8(tbl), vget_high_s8(tbl)}; return vreinterpretq_m128i_s8( vcombine_s8(vtbl2_s8(a_split, vget_low_u8(idx_masked)), vtbl2_s8(a_split, vget_high_u8(idx_masked)))); #endif } // C equivalent: // __m128i _mm_shuffle_epi32_default(__m128i a, // __constrange(0, 255) int imm) { // __m128i ret; // ret[0] = a[imm & 0x3]; ret[1] = a[(imm >> 2) & 0x3]; // ret[2] = a[(imm >> 4) & 0x03]; ret[3] = a[(imm >> 6) & 0x03]; // return ret; // } #define _mm_shuffle_epi32_default(a, imm) \ __extension__({ \ int32x4_t ret; \ ret = vmovq_n_s32( \ vgetq_lane_s32(vreinterpretq_s32_m128i(a), (imm) & (0x3))); \ ret = vsetq_lane_s32( \ vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 2) & 0x3), \ ret, 1); \ ret = vsetq_lane_s32( \ vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 4) & 0x3), \ ret, 2); \ ret = vsetq_lane_s32( \ vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 6) & 0x3), \ ret, 3); \ vreinterpretq_m128i_s32(ret); \ }) // FORCE_INLINE __m128i _mm_shuffle_epi32_splat(__m128i a, __constrange(0,255) // int imm) #if defined(__aarch64__) #define _mm_shuffle_epi32_splat(a, imm) \ __extension__({ \ vreinterpretq_m128i_s32( \ vdupq_laneq_s32(vreinterpretq_s32_m128i(a), (imm))); \ }) #else #define _mm_shuffle_epi32_splat(a, imm) \ __extension__({ \ vreinterpretq_m128i_s32( \ vdupq_n_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), (imm)))); \ }) #endif // Shuffles the 4 signed or unsigned 32-bit integers in a as specified by imm. // https://msdn.microsoft.com/en-us/library/56f67xbk%28v=vs.90%29.aspx // FORCE_INLINE __m128i _mm_shuffle_epi32(__m128i a, // __constrange(0,255) int imm) #if __has_builtin(__builtin_shufflevector) #define _mm_shuffle_epi32(a, imm) \ __extension__({ \ int32x4_t _input = vreinterpretq_s32_m128i(a); \ int32x4_t _shuf = __builtin_shufflevector( \ _input, _input, (imm) & (0x3), ((imm) >> 2) & 0x3, \ ((imm) >> 4) & 0x3, ((imm) >> 6) & 0x3); \ vreinterpretq_m128i_s32(_shuf); \ }) #else // generic #define _mm_shuffle_epi32(a, imm) \ __extension__({ \ __m128i ret; \ switch (imm) { \ case _MM_SHUFFLE(1, 0, 3, 2): \ ret = _mm_shuffle_epi_1032((a)); \ break; \ case _MM_SHUFFLE(2, 3, 0, 1): \ ret = _mm_shuffle_epi_2301((a)); \ break; \ case _MM_SHUFFLE(0, 3, 2, 1): \ ret = _mm_shuffle_epi_0321((a)); \ break; \ case _MM_SHUFFLE(2, 1, 0, 3): \ ret = _mm_shuffle_epi_2103((a)); \ break; \ case _MM_SHUFFLE(1, 0, 1, 0): \ ret = _mm_shuffle_epi_1010((a)); \ break; \ case _MM_SHUFFLE(1, 0, 0, 1): \ ret = _mm_shuffle_epi_1001((a)); \ break; \ case _MM_SHUFFLE(0, 1, 0, 1): \ ret = _mm_shuffle_epi_0101((a)); \ break; \ case _MM_SHUFFLE(2, 2, 1, 1): \ ret = _mm_shuffle_epi_2211((a)); \ break; \ case _MM_SHUFFLE(0, 1, 2, 2): \ ret = _mm_shuffle_epi_0122((a)); \ break; \ case _MM_SHUFFLE(3, 3, 3, 2): \ ret = _mm_shuffle_epi_3332((a)); \ break; \ case _MM_SHUFFLE(0, 0, 0, 0): \ ret = _mm_shuffle_epi32_splat((a), 0); \ break; \ case _MM_SHUFFLE(1, 1, 1, 1): \ ret = _mm_shuffle_epi32_splat((a), 1); \ break; \ case _MM_SHUFFLE(2, 2, 2, 2): \ ret = _mm_shuffle_epi32_splat((a), 2); \ break; \ case _MM_SHUFFLE(3, 3, 3, 3): \ ret = _mm_shuffle_epi32_splat((a), 3); \ break; \ default: \ ret = _mm_shuffle_epi32_default((a), (imm)); \ break; \ } \ ret; \ }) #endif // Shuffles the lower 4 signed or unsigned 16-bit integers in a as specified // by imm. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/y41dkk37(v=vs.100) // FORCE_INLINE __m128i _mm_shufflelo_epi16_function(__m128i a, // __constrange(0,255) int // imm) #define _mm_shufflelo_epi16_function(a, imm) \ __extension__({ \ int16x8_t ret = vreinterpretq_s16_m128i(a); \ int16x4_t lowBits = vget_low_s16(ret); \ ret = vsetq_lane_s16(vget_lane_s16(lowBits, (imm) & (0x3)), ret, 0); \ ret = vsetq_lane_s16(vget_lane_s16(lowBits, ((imm) >> 2) & 0x3), ret, \ 1); \ ret = vsetq_lane_s16(vget_lane_s16(lowBits, ((imm) >> 4) & 0x3), ret, \ 2); \ ret = vsetq_lane_s16(vget_lane_s16(lowBits, ((imm) >> 6) & 0x3), ret, \ 3); \ vreinterpretq_m128i_s16(ret); \ }) // FORCE_INLINE __m128i _mm_shufflelo_epi16(__m128i a, // __constrange(0,255) int imm) #if __has_builtin(__builtin_shufflevector) #define _mm_shufflelo_epi16(a, imm) \ __extension__({ \ int16x8_t _input = vreinterpretq_s16_m128i(a); \ int16x8_t _shuf = __builtin_shufflevector( \ _input, _input, ((imm) & (0x3)), (((imm) >> 2) & 0x3), \ (((imm) >> 4) & 0x3), (((imm) >> 6) & 0x3), 4, 5, 6, 7); \ vreinterpretq_m128i_s16(_shuf); \ }) #else // generic #define _mm_shufflelo_epi16(a, imm) _mm_shufflelo_epi16_function((a), (imm)) #endif // Shuffles the upper 4 signed or unsigned 16-bit integers in a as specified // by imm. // https://msdn.microsoft.com/en-us/library/13ywktbs(v=vs.100).aspx // FORCE_INLINE __m128i _mm_shufflehi_epi16_function(__m128i a, // __constrange(0,255) int // imm) #define _mm_shufflehi_epi16_function(a, imm) \ __extension__({ \ int16x8_t ret = vreinterpretq_s16_m128i(a); \ int16x4_t highBits = vget_high_s16(ret); \ ret = vsetq_lane_s16(vget_lane_s16(highBits, (imm) & (0x3)), ret, 4); \ ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 2) & 0x3), ret, \ 5); \ ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 4) & 0x3), ret, \ 6); \ ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 6) & 0x3), ret, \ 7); \ vreinterpretq_m128i_s16(ret); \ }) // FORCE_INLINE __m128i _mm_shufflehi_epi16(__m128i a, // __constrange(0,255) int imm) #if __has_builtin(__builtin_shufflevector) #define _mm_shufflehi_epi16(a, imm) \ __extension__({ \ int16x8_t _input = vreinterpretq_s16_m128i(a); \ int16x8_t _shuf = __builtin_shufflevector( \ _input, _input, 0, 1, 2, 3, ((imm) & (0x3)) + 4, \ (((imm) >> 2) & 0x3) + 4, (((imm) >> 4) & 0x3) + 4, \ (((imm) >> 6) & 0x3) + 4); \ vreinterpretq_m128i_s16(_shuf); \ }) #else // generic #define _mm_shufflehi_epi16(a, imm) _mm_shufflehi_epi16_function((a), (imm)) #endif // Blend packed 16-bit integers from a and b using control mask imm8, and store // the results in dst. // // FOR j := 0 to 7 // i := j*16 // IF imm8[j] // dst[i+15:i] := b[i+15:i] // ELSE // dst[i+15:i] := a[i+15:i] // FI // ENDFOR // FORCE_INLINE __m128i _mm_blend_epi16(__m128i a, __m128i b, // __constrange(0,255) int imm) #define _mm_blend_epi16(a, b, imm) \ __extension__({ \ const uint16_t _mask[8] = {((imm) & (1 << 0)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 1)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 2)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 3)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 4)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 5)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 6)) ? 0xFFFF : 0x0000, \ ((imm) & (1 << 7)) ? 0xFFFF : 0x0000}; \ uint16x8_t _mask_vec = vld1q_u16(_mask); \ uint16x8_t _a = vreinterpretq_u16_m128i(a); \ uint16x8_t _b = vreinterpretq_u16_m128i(b); \ vreinterpretq_m128i_u16(vbslq_u16(_mask_vec, _b, _a)); \ }) // Blend packed 8-bit integers from a and b using mask, and store the results in // dst. // // FOR j := 0 to 15 // i := j*8 // IF mask[i+7] // dst[i+7:i] := b[i+7:i] // ELSE // dst[i+7:i] := a[i+7:i] // FI // ENDFOR FORCE_INLINE __m128i _mm_blendv_epi8(__m128i _a, __m128i _b, __m128i _mask) { // Use a signed shift right to create a mask with the sign bit uint8x16_t mask = vreinterpretq_u8_s8(vshrq_n_s8(vreinterpretq_s8_m128i(_mask), 7)); uint8x16_t a = vreinterpretq_u8_m128i(_a); uint8x16_t b = vreinterpretq_u8_m128i(_b); return vreinterpretq_m128i_u8(vbslq_u8(mask, b, a)); } /* Shifts */ // Shift packed 16-bit integers in a right by imm while shifting in sign // bits, and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_srai_epi16 FORCE_INLINE __m128i _mm_srai_epi16(__m128i a, int imm) { const int count = (imm & ~15) ? 15 : imm; return (__m128i) vshlq_s16((int16x8_t) a, vdupq_n_s16(-count)); } // Shifts the 8 signed or unsigned 16-bit integers in a left by count bits while // shifting in zeros. // // r0 := a0 << count // r1 := a1 << count // ... // r7 := a7 << count // // https://msdn.microsoft.com/en-us/library/es73bcsy(v=vs.90).aspx #define _mm_slli_epi16(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) <= 0) { \ ret = a; \ } else if ((imm) > 15) { \ ret = _mm_setzero_si128(); \ } else { \ ret = vreinterpretq_m128i_s16( \ vshlq_n_s16(vreinterpretq_s16_m128i(a), (imm))); \ } \ ret; \ }) // Shifts the 4 signed or unsigned 32-bit integers in a left by count bits while // shifting in zeros. : // https://msdn.microsoft.com/en-us/library/z2k3bbtb%28v=vs.90%29.aspx // FORCE_INLINE __m128i _mm_slli_epi32(__m128i a, __constrange(0,255) int imm) FORCE_INLINE __m128i _mm_slli_epi32(__m128i a, int imm) { if (imm <= 0) /* TODO: add constant range macro: [0, 255] */ return a; if (imm > 31) /* TODO: add unlikely macro */ return _mm_setzero_si128(); return vreinterpretq_m128i_s32( vshlq_s32(vreinterpretq_s32_m128i(a), vdupq_n_s32(imm))); } // Shift packed 64-bit integers in a left by imm8 while shifting in zeros, and // store the results in dst. FORCE_INLINE __m128i _mm_slli_epi64(__m128i a, int imm) { if (imm <= 0) /* TODO: add constant range macro: [0, 255] */ return a; if (imm > 63) /* TODO: add unlikely macro */ return _mm_setzero_si128(); return vreinterpretq_m128i_s64( vshlq_s64(vreinterpretq_s64_m128i(a), vdupq_n_s64(imm))); } // Shift packed 16-bit integers in a right by imm8 while shifting in zeros, and // store the results in dst. // // FOR j := 0 to 7 // i := j*16 // IF imm8[7:0] > 15 // dst[i+15:i] := 0 // ELSE // dst[i+15:i] := ZeroExtend16(a[i+15:i] >> imm8[7:0]) // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_srli_epi16 #define _mm_srli_epi16(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) == 0) { \ ret = a; \ } else if (0 < (imm) && (imm) < 16) { \ ret = vreinterpretq_m128i_u16( \ vshlq_u16(vreinterpretq_u16_m128i(a), vdupq_n_s16(-imm))); \ } else { \ ret = _mm_setzero_si128(); \ } \ ret; \ }) // Shift packed 32-bit integers in a right by imm8 while shifting in zeros, and // store the results in dst. // // FOR j := 0 to 3 // i := j*32 // IF imm8[7:0] > 31 // dst[i+31:i] := 0 // ELSE // dst[i+31:i] := ZeroExtend32(a[i+31:i] >> imm8[7:0]) // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_srli_epi32 // FORCE_INLINE __m128i _mm_srli_epi32(__m128i a, __constrange(0,255) int imm) #define _mm_srli_epi32(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) == 0) { \ ret = a; \ } else if (0 < (imm) && (imm) < 32) { \ ret = vreinterpretq_m128i_u32( \ vshlq_u32(vreinterpretq_u32_m128i(a), vdupq_n_s32(-imm))); \ } else { \ ret = _mm_setzero_si128(); \ } \ ret; \ }) // Shift packed 64-bit integers in a right by imm8 while shifting in zeros, and // store the results in dst. // // FOR j := 0 to 1 // i := j*64 // IF imm8[7:0] > 63 // dst[i+63:i] := 0 // ELSE // dst[i+63:i] := ZeroExtend64(a[i+63:i] >> imm8[7:0]) // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_srli_epi64 #define _mm_srli_epi64(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) == 0) { \ ret = a; \ } else if (0 < (imm) && (imm) < 64) { \ ret = vreinterpretq_m128i_u64( \ vshlq_u64(vreinterpretq_u64_m128i(a), vdupq_n_s64(-imm))); \ } else { \ ret = _mm_setzero_si128(); \ } \ ret; \ }) // Shift packed 32-bit integers in a right by imm8 while shifting in sign bits, // and store the results in dst. // // FOR j := 0 to 3 // i := j*32 // IF imm8[7:0] > 31 // dst[i+31:i] := (a[i+31] ? 0xFFFFFFFF : 0x0) // ELSE // dst[i+31:i] := SignExtend32(a[i+31:i] >> imm8[7:0]) // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_srai_epi32 // FORCE_INLINE __m128i _mm_srai_epi32(__m128i a, __constrange(0,255) int imm) #define _mm_srai_epi32(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) == 0) { \ ret = a; \ } else if (0 < (imm) && (imm) < 32) { \ ret = vreinterpretq_m128i_s32( \ vshlq_s32(vreinterpretq_s32_m128i(a), vdupq_n_s32(-imm))); \ } else { \ ret = vreinterpretq_m128i_s32( \ vshrq_n_s32(vreinterpretq_s32_m128i(a), 31)); \ } \ ret; \ }) // Shifts the 128 - bit value in a right by imm bytes while shifting in // zeros.imm must be an immediate. // // r := srl(a, imm*8) // // https://msdn.microsoft.com/en-us/library/305w28yz(v=vs.100).aspx // FORCE_INLINE _mm_srli_si128(__m128i a, __constrange(0,255) int imm) #define _mm_srli_si128(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) <= 0) { \ ret = a; \ } else if ((imm) > 15) { \ ret = _mm_setzero_si128(); \ } else { \ ret = vreinterpretq_m128i_s8( \ vextq_s8(vreinterpretq_s8_m128i(a), vdupq_n_s8(0), (imm))); \ } \ ret; \ }) // Shifts the 128-bit value in a left by imm bytes while shifting in zeros. imm // must be an immediate. // // r := a << (imm * 8) // // https://msdn.microsoft.com/en-us/library/34d3k2kt(v=vs.100).aspx // FORCE_INLINE __m128i _mm_slli_si128(__m128i a, __constrange(0,255) int imm) #define _mm_slli_si128(a, imm) \ __extension__({ \ __m128i ret; \ if ((imm) <= 0) { \ ret = a; \ } else if ((imm) > 15) { \ ret = _mm_setzero_si128(); \ } else { \ ret = vreinterpretq_m128i_s8(vextq_s8( \ vdupq_n_s8(0), vreinterpretq_s8_m128i(a), 16 - (imm))); \ } \ ret; \ }) // Shifts the 8 signed or unsigned 16-bit integers in a left by count bits while // shifting in zeros. // // r0 := a0 << count // r1 := a1 << count // ... // r7 := a7 << count // // https://msdn.microsoft.com/en-us/library/c79w388h(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_sll_epi16(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 15) return _mm_setzero_si128(); int16x8_t vc = vdupq_n_s16((int16_t) c); return vreinterpretq_m128i_s16(vshlq_s16(vreinterpretq_s16_m128i(a), vc)); } // Shifts the 4 signed or unsigned 32-bit integers in a left by count bits while // shifting in zeros. // // r0 := a0 << count // r1 := a1 << count // r2 := a2 << count // r3 := a3 << count // // https://msdn.microsoft.com/en-us/library/6fe5a6s9(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_sll_epi32(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 31) return _mm_setzero_si128(); int32x4_t vc = vdupq_n_s32((int32_t) c); return vreinterpretq_m128i_s32(vshlq_s32(vreinterpretq_s32_m128i(a), vc)); } // Shifts the 2 signed or unsigned 64-bit integers in a left by count bits while // shifting in zeros. // // r0 := a0 << count // r1 := a1 << count // // https://msdn.microsoft.com/en-us/library/6ta9dffd(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_sll_epi64(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 63) return _mm_setzero_si128(); int64x2_t vc = vdupq_n_s64((int64_t) c); return vreinterpretq_m128i_s64(vshlq_s64(vreinterpretq_s64_m128i(a), vc)); } // Shifts the 8 signed or unsigned 16-bit integers in a right by count bits // while shifting in zeros. // // r0 := srl(a0, count) // r1 := srl(a1, count) // ... // r7 := srl(a7, count) // // https://msdn.microsoft.com/en-us/library/wd5ax830(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_srl_epi16(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 15) return _mm_setzero_si128(); int16x8_t vc = vdupq_n_s16(-(int16_t) c); return vreinterpretq_m128i_u16(vshlq_u16(vreinterpretq_u16_m128i(a), vc)); } // Shifts the 4 signed or unsigned 32-bit integers in a right by count bits // while shifting in zeros. // // r0 := srl(a0, count) // r1 := srl(a1, count) // r2 := srl(a2, count) // r3 := srl(a3, count) // // https://msdn.microsoft.com/en-us/library/a9cbttf4(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_srl_epi32(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 31) return _mm_setzero_si128(); int32x4_t vc = vdupq_n_s32(-(int32_t) c); return vreinterpretq_m128i_u32(vshlq_u32(vreinterpretq_u32_m128i(a), vc)); } // Shifts the 2 signed or unsigned 64-bit integers in a right by count bits // while shifting in zeros. // // r0 := srl(a0, count) // r1 := srl(a1, count) // // https://msdn.microsoft.com/en-us/library/yf6cf9k8(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_srl_epi64(__m128i a, __m128i count) { uint64_t c = vreinterpretq_nth_u64_m128i(count, 0); if (c > 63) return _mm_setzero_si128(); int64x2_t vc = vdupq_n_s64(-(int64_t) c); return vreinterpretq_m128i_u64(vshlq_u64(vreinterpretq_u64_m128i(a), vc)); } // NEON does not provide a version of this function. // Creates a 16-bit mask from the most significant bits of the 16 signed or // unsigned 8-bit integers in a and zero extends the upper bits. // https://msdn.microsoft.com/en-us/library/vstudio/s090c8fk(v=vs.100).aspx FORCE_INLINE int _mm_movemask_epi8(__m128i a) { #if defined(__aarch64__) uint8x16_t input = vreinterpretq_u8_m128i(a); const int8_t ALIGN_STRUCT(16) xr[16] = {-7, -6, -5, -4, -3, -2, -1, 0, -7, -6, -5, -4, -3, -2, -1, 0}; const uint8x16_t mask_and = vdupq_n_u8(0x80); const int8x16_t mask_shift = vld1q_s8(xr); const uint8x16_t mask_result = vshlq_u8(vandq_u8(input, mask_and), mask_shift); uint8x8_t lo = vget_low_u8(mask_result); uint8x8_t hi = vget_high_u8(mask_result); return vaddv_u8(lo) + (vaddv_u8(hi) << 8); #else // Use increasingly wide shifts+adds to collect the sign bits // together. // Since the widening shifts would be rather confusing to follow in little // endian, everything will be illustrated in big endian order instead. This // has a different result - the bits would actually be reversed on a big // endian machine. // Starting input (only half the elements are shown): // 89 ff 1d c0 00 10 99 33 uint8x16_t input = vreinterpretq_u8_m128i(a); // Shift out everything but the sign bits with an unsigned shift right. // // Bytes of the vector:: // 89 ff 1d c0 00 10 99 33 // \ \ \ \ \ \ \ \ high_bits = (uint16x4_t)(input >> 7) // | | | | | | | | // 01 01 00 01 00 00 01 00 // // Bits of first important lane(s): // 10001001 (89) // \______ // | // 00000001 (01) uint16x8_t high_bits = vreinterpretq_u16_u8(vshrq_n_u8(input, 7)); // Merge the even lanes together with a 16-bit unsigned shift right + add. // 'xx' represents garbage data which will be ignored in the final result. // In the important bytes, the add functions like a binary OR. // // 01 01 00 01 00 00 01 00 // \_ | \_ | \_ | \_ | paired16 = (uint32x4_t)(input + (input >> 7)) // \| \| \| \| // xx 03 xx 01 xx 00 xx 02 // // 00000001 00000001 (01 01) // \_______ | // \| // xxxxxxxx xxxxxx11 (xx 03) uint32x4_t paired16 = vreinterpretq_u32_u16(vsraq_n_u16(high_bits, high_bits, 7)); // Repeat with a wider 32-bit shift + add. // xx 03 xx 01 xx 00 xx 02 // \____ | \____ | paired32 = (uint64x1_t)(paired16 + (paired16 >> // 14)) // \| \| // xx xx xx 0d xx xx xx 02 // // 00000011 00000001 (03 01) // \\_____ || // '----.\|| // xxxxxxxx xxxx1101 (xx 0d) uint64x2_t paired32 = vreinterpretq_u64_u32(vsraq_n_u32(paired16, paired16, 14)); // Last, an even wider 64-bit shift + add to get our result in the low 8 bit // lanes. xx xx xx 0d xx xx xx 02 // \_________ | paired64 = (uint8x8_t)(paired32 + (paired32 >> // 28)) // \| // xx xx xx xx xx xx xx d2 // // 00001101 00000010 (0d 02) // \ \___ | | // '---. \| | // xxxxxxxx 11010010 (xx d2) uint8x16_t paired64 = vreinterpretq_u8_u64(vsraq_n_u64(paired32, paired32, 28)); // Extract the low 8 bits from each 64-bit lane with 2 8-bit extracts. // xx xx xx xx xx xx xx d2 // || return paired64[0] // d2 // Note: Little endian would return the correct value 4b (01001011) instead. return vgetq_lane_u8(paired64, 0) | ((int) vgetq_lane_u8(paired64, 8) << 8); #endif } // Copy the lower 64-bit integer in a to dst. // // dst[63:0] := a[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_movepi64_pi64 FORCE_INLINE __m64 _mm_movepi64_pi64(__m128i a) { return vreinterpret_m64_s64(vget_low_s64(vreinterpretq_s64_m128i(a))); } // Copy the 64-bit integer a to the lower element of dst, and zero the upper // element. // // dst[63:0] := a[63:0] // dst[127:64] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_movpi64_epi64 FORCE_INLINE __m128i _mm_movpi64_epi64(__m64 a) { return vreinterpretq_m128i_s64( vcombine_s64(vreinterpret_s64_m64(a), vdup_n_s64(0))); } // NEON does not provide this method // Creates a 4-bit mask from the most significant bits of the four // single-precision, floating-point values. // https://msdn.microsoft.com/en-us/library/vstudio/4490ys29(v=vs.100).aspx FORCE_INLINE int _mm_movemask_ps(__m128 a) { uint32x4_t input = vreinterpretq_u32_m128(a); #if defined(__aarch64__) static const int32x4_t shift = {0, 1, 2, 3}; uint32x4_t tmp = vshrq_n_u32(input, 31); return vaddvq_u32(vshlq_u32(tmp, shift)); #else // Uses the exact same method as _mm_movemask_epi8, see that for details. // Shift out everything but the sign bits with a 32-bit unsigned shift // right. uint64x2_t high_bits = vreinterpretq_u64_u32(vshrq_n_u32(input, 31)); // Merge the two pairs together with a 64-bit unsigned shift right + add. uint8x16_t paired = vreinterpretq_u8_u64(vsraq_n_u64(high_bits, high_bits, 31)); // Extract the result. return vgetq_lane_u8(paired, 0) | (vgetq_lane_u8(paired, 8) << 2); #endif } // Compute the bitwise NOT of a and then AND with a 128-bit vector containing // all 1's, and return 1 if the result is zero, otherwise return 0. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_test_all_ones FORCE_INLINE int _mm_test_all_ones(__m128i a) { return (uint64_t)(vgetq_lane_s64(a, 0) & vgetq_lane_s64(a, 1)) == ~(uint64_t) 0; } // Compute the bitwise AND of 128 bits (representing integer data) in a and // mask, and return 1 if the result is zero, otherwise return 0. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_test_all_zeros FORCE_INLINE int _mm_test_all_zeros(__m128i a, __m128i mask) { int64x2_t a_and_mask = vandq_s64(vreinterpretq_s64_m128i(a), vreinterpretq_s64_m128i(mask)); return (vgetq_lane_s64(a_and_mask, 0) | vgetq_lane_s64(a_and_mask, 1)) ? 0 : 1; } /* Math operations */ // Subtracts the four single-precision, floating-point values of a and b. // // r0 := a0 - b0 // r1 := a1 - b1 // r2 := a2 - b2 // r3 := a3 - b3 // // https://msdn.microsoft.com/en-us/library/vstudio/1zad2k61(v=vs.100).aspx FORCE_INLINE __m128 _mm_sub_ps(__m128 a, __m128 b) { return vreinterpretq_m128_f32( vsubq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Subtract the lower single-precision (32-bit) floating-point element in b from // the lower single-precision (32-bit) floating-point element in a, store the // result in the lower element of dst, and copy the upper 3 packed elements from // a to the upper elements of dst. // // dst[31:0] := a[31:0] - b[31:0] // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sub_ss FORCE_INLINE __m128 _mm_sub_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_sub_ps(a, b)); } // Subtract 2 packed 64-bit integers in b from 2 packed 64-bit integers in a, // and store the results in dst. // r0 := a0 - b0 // r1 := a1 - b1 FORCE_INLINE __m128i _mm_sub_epi64(__m128i a, __m128i b) { return vreinterpretq_m128i_s64( vsubq_s64(vreinterpretq_s64_m128i(a), vreinterpretq_s64_m128i(b))); } // Subtracts the 4 signed or unsigned 32-bit integers of b from the 4 signed or // unsigned 32-bit integers of a. // // r0 := a0 - b0 // r1 := a1 - b1 // r2 := a2 - b2 // r3 := a3 - b3 // // https://msdn.microsoft.com/en-us/library/vstudio/fhh866h0(v=vs.100).aspx FORCE_INLINE __m128i _mm_sub_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vsubq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } FORCE_INLINE __m128i _mm_sub_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vsubq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } FORCE_INLINE __m128i _mm_sub_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vsubq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Subtract 64-bit integer b from 64-bit integer a, and store the result in dst. // // dst[63:0] := a[63:0] - b[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sub_si64 FORCE_INLINE __m64 _mm_sub_si64(__m64 a, __m64 b) { return vreinterpret_m64_s64( vsub_s64(vreinterpret_s64_m64(a), vreinterpret_s64_m64(b))); } // Subtracts the 8 unsigned 16-bit integers of bfrom the 8 unsigned 16-bit // integers of a and saturates.. // https://technet.microsoft.com/en-us/subscriptions/index/f44y0s19(v=vs.90).aspx FORCE_INLINE __m128i _mm_subs_epu16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vqsubq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b))); } // Subtracts the 16 unsigned 8-bit integers of b from the 16 unsigned 8-bit // integers of a and saturates. // // r0 := UnsignedSaturate(a0 - b0) // r1 := UnsignedSaturate(a1 - b1) // ... // r15 := UnsignedSaturate(a15 - b15) // // https://technet.microsoft.com/en-us/subscriptions/yadkxc18(v=vs.90) FORCE_INLINE __m128i _mm_subs_epu8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vqsubq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); } // Subtracts the 16 signed 8-bit integers of b from the 16 signed 8-bit integers // of a and saturates. // // r0 := SignedSaturate(a0 - b0) // r1 := SignedSaturate(a1 - b1) // ... // r15 := SignedSaturate(a15 - b15) // // https://technet.microsoft.com/en-us/subscriptions/by7kzks1(v=vs.90) FORCE_INLINE __m128i _mm_subs_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vqsubq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Subtracts the 8 signed 16-bit integers of b from the 8 signed 16-bit integers // of a and saturates. // // r0 := SignedSaturate(a0 - b0) // r1 := SignedSaturate(a1 - b1) // ... // r7 := SignedSaturate(a7 - b7) // // https://technet.microsoft.com/en-us/subscriptions/3247z5b8(v=vs.90) FORCE_INLINE __m128i _mm_subs_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vqsubq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } FORCE_INLINE __m128i _mm_adds_epu16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vqaddq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b))); } // Negate packed 8-bit integers in a when the corresponding signed // 8-bit integer in b is negative, and store the results in dst. // Element in dst are zeroed out when the corresponding element // in b is zero. // // for i in 0..15 // if b[i] < 0 // r[i] := -a[i] // else if b[i] == 0 // r[i] := 0 // else // r[i] := a[i] // fi // done FORCE_INLINE __m128i _mm_sign_epi8(__m128i _a, __m128i _b) { int8x16_t a = vreinterpretq_s8_m128i(_a); int8x16_t b = vreinterpretq_s8_m128i(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFF : 0 uint8x16_t ltMask = vreinterpretq_u8_s8(vshrq_n_s8(b, 7)); // (b == 0) ? 0xFF : 0 #if defined(__aarch64__) int8x16_t zeroMask = vreinterpretq_s8_u8(vceqzq_s8(b)); #else int8x16_t zeroMask = vreinterpretq_s8_u8(vceqq_s8(b, vdupq_n_s8(0))); #endif // bitwise select either a or nagative 'a' (vnegq_s8(a) return nagative 'a') // based on ltMask int8x16_t masked = vbslq_s8(ltMask, vnegq_s8(a), a); // res = masked & (~zeroMask) int8x16_t res = vbicq_s8(masked, zeroMask); return vreinterpretq_m128i_s8(res); } // Negate packed 16-bit integers in a when the corresponding signed // 16-bit integer in b is negative, and store the results in dst. // Element in dst are zeroed out when the corresponding element // in b is zero. // // for i in 0..7 // if b[i] < 0 // r[i] := -a[i] // else if b[i] == 0 // r[i] := 0 // else // r[i] := a[i] // fi // done FORCE_INLINE __m128i _mm_sign_epi16(__m128i _a, __m128i _b) { int16x8_t a = vreinterpretq_s16_m128i(_a); int16x8_t b = vreinterpretq_s16_m128i(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFFFF : 0 uint16x8_t ltMask = vreinterpretq_u16_s16(vshrq_n_s16(b, 15)); // (b == 0) ? 0xFFFF : 0 #if defined(__aarch64__) int16x8_t zeroMask = vreinterpretq_s16_u16(vceqzq_s16(b)); #else int16x8_t zeroMask = vreinterpretq_s16_u16(vceqq_s16(b, vdupq_n_s16(0))); #endif // bitwise select either a or negative 'a' (vnegq_s16(a) equals to negative // 'a') based on ltMask int16x8_t masked = vbslq_s16(ltMask, vnegq_s16(a), a); // res = masked & (~zeroMask) int16x8_t res = vbicq_s16(masked, zeroMask); return vreinterpretq_m128i_s16(res); } // Negate packed 32-bit integers in a when the corresponding signed // 32-bit integer in b is negative, and store the results in dst. // Element in dst are zeroed out when the corresponding element // in b is zero. // // for i in 0..3 // if b[i] < 0 // r[i] := -a[i] // else if b[i] == 0 // r[i] := 0 // else // r[i] := a[i] // fi // done FORCE_INLINE __m128i _mm_sign_epi32(__m128i _a, __m128i _b) { int32x4_t a = vreinterpretq_s32_m128i(_a); int32x4_t b = vreinterpretq_s32_m128i(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFFFFFFFF : 0 uint32x4_t ltMask = vreinterpretq_u32_s32(vshrq_n_s32(b, 31)); // (b == 0) ? 0xFFFFFFFF : 0 #if defined(__aarch64__) int32x4_t zeroMask = vreinterpretq_s32_u32(vceqzq_s32(b)); #else int32x4_t zeroMask = vreinterpretq_s32_u32(vceqq_s32(b, vdupq_n_s32(0))); #endif // bitwise select either a or negative 'a' (vnegq_s32(a) equals to negative // 'a') based on ltMask int32x4_t masked = vbslq_s32(ltMask, vnegq_s32(a), a); // res = masked & (~zeroMask) int32x4_t res = vbicq_s32(masked, zeroMask); return vreinterpretq_m128i_s32(res); } // Negate packed 16-bit integers in a when the corresponding signed 16-bit // integer in b is negative, and store the results in dst. Element in dst are // zeroed out when the corresponding element in b is zero. // // FOR j := 0 to 3 // i := j*16 // IF b[i+15:i] < 0 // dst[i+15:i] := -(a[i+15:i]) // ELSE IF b[i+15:i] == 0 // dst[i+15:i] := 0 // ELSE // dst[i+15:i] := a[i+15:i] // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sign_pi16 FORCE_INLINE __m64 _mm_sign_pi16(__m64 _a, __m64 _b) { int16x4_t a = vreinterpret_s16_m64(_a); int16x4_t b = vreinterpret_s16_m64(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFFFF : 0 uint16x4_t ltMask = vreinterpret_u16_s16(vshr_n_s16(b, 15)); // (b == 0) ? 0xFFFF : 0 #if defined(__aarch64__) int16x4_t zeroMask = vreinterpret_s16_u16(vceqz_s16(b)); #else int16x4_t zeroMask = vreinterpret_s16_u16(vceq_s16(b, vdup_n_s16(0))); #endif // bitwise select either a or nagative 'a' (vneg_s16(a) return nagative 'a') // based on ltMask int16x4_t masked = vbsl_s16(ltMask, vneg_s16(a), a); // res = masked & (~zeroMask) int16x4_t res = vbic_s16(masked, zeroMask); return vreinterpret_m64_s16(res); } // Negate packed 32-bit integers in a when the corresponding signed 32-bit // integer in b is negative, and store the results in dst. Element in dst are // zeroed out when the corresponding element in b is zero. // // FOR j := 0 to 1 // i := j*32 // IF b[i+31:i] < 0 // dst[i+31:i] := -(a[i+31:i]) // ELSE IF b[i+31:i] == 0 // dst[i+31:i] := 0 // ELSE // dst[i+31:i] := a[i+31:i] // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sign_pi32 FORCE_INLINE __m64 _mm_sign_pi32(__m64 _a, __m64 _b) { int32x2_t a = vreinterpret_s32_m64(_a); int32x2_t b = vreinterpret_s32_m64(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFFFFFFFF : 0 uint32x2_t ltMask = vreinterpret_u32_s32(vshr_n_s32(b, 31)); // (b == 0) ? 0xFFFFFFFF : 0 #if defined(__aarch64__) int32x2_t zeroMask = vreinterpret_s32_u32(vceqz_s32(b)); #else int32x2_t zeroMask = vreinterpret_s32_u32(vceq_s32(b, vdup_n_s32(0))); #endif // bitwise select either a or nagative 'a' (vneg_s32(a) return nagative 'a') // based on ltMask int32x2_t masked = vbsl_s32(ltMask, vneg_s32(a), a); // res = masked & (~zeroMask) int32x2_t res = vbic_s32(masked, zeroMask); return vreinterpret_m64_s32(res); } // Negate packed 8-bit integers in a when the corresponding signed 8-bit integer // in b is negative, and store the results in dst. Element in dst are zeroed out // when the corresponding element in b is zero. // // FOR j := 0 to 7 // i := j*8 // IF b[i+7:i] < 0 // dst[i+7:i] := -(a[i+7:i]) // ELSE IF b[i+7:i] == 0 // dst[i+7:i] := 0 // ELSE // dst[i+7:i] := a[i+7:i] // FI // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sign_pi8 FORCE_INLINE __m64 _mm_sign_pi8(__m64 _a, __m64 _b) { int8x8_t a = vreinterpret_s8_m64(_a); int8x8_t b = vreinterpret_s8_m64(_b); // signed shift right: faster than vclt // (b < 0) ? 0xFF : 0 uint8x8_t ltMask = vreinterpret_u8_s8(vshr_n_s8(b, 7)); // (b == 0) ? 0xFF : 0 #if defined(__aarch64__) int8x8_t zeroMask = vreinterpret_s8_u8(vceqz_s8(b)); #else int8x8_t zeroMask = vreinterpret_s8_u8(vceq_s8(b, vdup_n_s8(0))); #endif // bitwise select either a or nagative 'a' (vneg_s8(a) return nagative 'a') // based on ltMask int8x8_t masked = vbsl_s8(ltMask, vneg_s8(a), a); // res = masked & (~zeroMask) int8x8_t res = vbic_s8(masked, zeroMask); return vreinterpret_m64_s8(res); } // Average packed unsigned 16-bit integers in a and b, and store the results in // dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := (a[i+15:i] + b[i+15:i] + 1) >> 1 // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_avg_pu16 FORCE_INLINE __m64 _mm_avg_pu16(__m64 a, __m64 b) { return vreinterpret_m64_u16( vrhadd_u16(vreinterpret_u16_m64(a), vreinterpret_u16_m64(b))); } // Average packed unsigned 8-bit integers in a and b, and store the results in // dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := (a[i+7:i] + b[i+7:i] + 1) >> 1 // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_avg_pu8 FORCE_INLINE __m64 _mm_avg_pu8(__m64 a, __m64 b) { return vreinterpret_m64_u8( vrhadd_u8(vreinterpret_u8_m64(a), vreinterpret_u8_m64(b))); } // Average packed unsigned 8-bit integers in a and b, and store the results in // dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := (a[i+7:i] + b[i+7:i] + 1) >> 1 // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_m_pavgb #define _m_pavgb(a, b) _mm_avg_pu8(a, b) // Average packed unsigned 16-bit integers in a and b, and store the results in // dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := (a[i+15:i] + b[i+15:i] + 1) >> 1 // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_m_pavgw #define _m_pavgw(a, b) _mm_avg_pu16(a, b) // Computes the average of the 16 unsigned 8-bit integers in a and the 16 // unsigned 8-bit integers in b and rounds. // // r0 := (a0 + b0) / 2 // r1 := (a1 + b1) / 2 // ... // r15 := (a15 + b15) / 2 // // https://msdn.microsoft.com/en-us/library/vstudio/8zwh554a(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_avg_epu8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vrhaddq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); } // Computes the average of the 8 unsigned 16-bit integers in a and the 8 // unsigned 16-bit integers in b and rounds. // // r0 := (a0 + b0) / 2 // r1 := (a1 + b1) / 2 // ... // r7 := (a7 + b7) / 2 // // https://msdn.microsoft.com/en-us/library/vstudio/y13ca3c8(v=vs.90).aspx FORCE_INLINE __m128i _mm_avg_epu16(__m128i a, __m128i b) { return (__m128i) vrhaddq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b)); } // Adds the four single-precision, floating-point values of a and b. // // r0 := a0 + b0 // r1 := a1 + b1 // r2 := a2 + b2 // r3 := a3 + b3 // // https://msdn.microsoft.com/en-us/library/vstudio/c9848chc(v=vs.100).aspx FORCE_INLINE __m128 _mm_add_ps(__m128 a, __m128 b) { return vreinterpretq_m128_f32( vaddq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Add packed double-precision (64-bit) floating-point elements in a and b, and // store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_add_pd FORCE_INLINE __m128d _mm_add_pd(__m128d a, __m128d b) { #if defined(__aarch64__) return vreinterpretq_m128d_f64( vaddq_f64(vreinterpretq_f64_m128d(a), vreinterpretq_f64_m128d(b))); #else double *da = (double *) &a; double *db = (double *) &b; double c[2]; c[0] = da[0] + db[0]; c[1] = da[1] + db[1]; return vld1q_f32((float32_t *) c); #endif } // Add 64-bit integers a and b, and store the result in dst. // // dst[63:0] := a[63:0] + b[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_add_si64 FORCE_INLINE __m64 _mm_add_si64(__m64 a, __m64 b) { return vreinterpret_m64_s64( vadd_s64(vreinterpret_s64_m64(a), vreinterpret_s64_m64(b))); } // adds the scalar single-precision floating point values of a and b. // https://msdn.microsoft.com/en-us/library/be94x2y6(v=vs.100).aspx FORCE_INLINE __m128 _mm_add_ss(__m128 a, __m128 b) { float32_t b0 = vgetq_lane_f32(vreinterpretq_f32_m128(b), 0); float32x4_t value = vsetq_lane_f32(b0, vdupq_n_f32(0), 0); // the upper values in the result must be the remnants of . return vreinterpretq_m128_f32(vaddq_f32(a, value)); } // Adds the 4 signed or unsigned 64-bit integers in a to the 4 signed or // unsigned 32-bit integers in b. // https://msdn.microsoft.com/en-us/library/vstudio/09xs4fkk(v=vs.100).aspx FORCE_INLINE __m128i _mm_add_epi64(__m128i a, __m128i b) { return vreinterpretq_m128i_s64( vaddq_s64(vreinterpretq_s64_m128i(a), vreinterpretq_s64_m128i(b))); } // Adds the 4 signed or unsigned 32-bit integers in a to the 4 signed or // unsigned 32-bit integers in b. // // r0 := a0 + b0 // r1 := a1 + b1 // r2 := a2 + b2 // r3 := a3 + b3 // // https://msdn.microsoft.com/en-us/library/vstudio/09xs4fkk(v=vs.100).aspx FORCE_INLINE __m128i _mm_add_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vaddq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Adds the 8 signed or unsigned 16-bit integers in a to the 8 signed or // unsigned 16-bit integers in b. // https://msdn.microsoft.com/en-us/library/fceha5k4(v=vs.100).aspx FORCE_INLINE __m128i _mm_add_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vaddq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Adds the 16 signed or unsigned 8-bit integers in a to the 16 signed or // unsigned 8-bit integers in b. // https://technet.microsoft.com/en-us/subscriptions/yc7tcyzs(v=vs.90) FORCE_INLINE __m128i _mm_add_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vaddq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Adds the 8 signed 16-bit integers in a to the 8 signed 16-bit integers in b // and saturates. // // r0 := SignedSaturate(a0 + b0) // r1 := SignedSaturate(a1 + b1) // ... // r7 := SignedSaturate(a7 + b7) // // https://msdn.microsoft.com/en-us/library/1a306ef8(v=vs.100).aspx FORCE_INLINE __m128i _mm_adds_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vqaddq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Add packed signed 8-bit integers in a and b using saturation, and store the // results in dst. // // FOR j := 0 to 15 // i := j*8 // dst[i+7:i] := Saturate8( a[i+7:i] + b[i+7:i] ) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_adds_epi8 FORCE_INLINE __m128i _mm_adds_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vqaddq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Adds the 16 unsigned 8-bit integers in a to the 16 unsigned 8-bit integers in // b and saturates.. // https://msdn.microsoft.com/en-us/library/9hahyddy(v=vs.100).aspx FORCE_INLINE __m128i _mm_adds_epu8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vqaddq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); } // Multiplies the 8 signed or unsigned 16-bit integers from a by the 8 signed or // unsigned 16-bit integers from b. // // r0 := (a0 * b0)[15:0] // r1 := (a1 * b1)[15:0] // ... // r7 := (a7 * b7)[15:0] // // https://msdn.microsoft.com/en-us/library/vstudio/9ks1472s(v=vs.100).aspx FORCE_INLINE __m128i _mm_mullo_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vmulq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Multiplies the 4 signed or unsigned 32-bit integers from a by the 4 signed or // unsigned 32-bit integers from b. // https://msdn.microsoft.com/en-us/library/vstudio/bb531409(v=vs.100).aspx FORCE_INLINE __m128i _mm_mullo_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vmulq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Multiply the packed unsigned 16-bit integers in a and b, producing // intermediate 32-bit integers, and store the high 16 bits of the intermediate // integers in dst. // // FOR j := 0 to 3 // i := j*16 // tmp[31:0] := a[i+15:i] * b[i+15:i] // dst[i+15:i] := tmp[31:16] // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_m_pmulhuw #define _m_pmulhuw(a, b) _mm_mulhi_pu16(a, b) // Multiplies the four single-precision, floating-point values of a and b. // // r0 := a0 * b0 // r1 := a1 * b1 // r2 := a2 * b2 // r3 := a3 * b3 // // https://msdn.microsoft.com/en-us/library/vstudio/22kbk6t9(v=vs.100).aspx FORCE_INLINE __m128 _mm_mul_ps(__m128 a, __m128 b) { return vreinterpretq_m128_f32( vmulq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Multiply packed double-precision (64-bit) floating-point elements in a and b, // and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mul_pd FORCE_INLINE __m128d _mm_mul_pd(__m128d a, __m128d b) { #if defined(__aarch64__) return vreinterpretq_m128d_f64( vmulq_f64(vreinterpretq_f64_m128d(a), vreinterpretq_f64_m128d(b))); #else double *da = (double *) &a; double *db = (double *) &b; double c[2]; c[0] = da[0] * db[0]; c[1] = da[1] * db[1]; return vld1q_f32((float32_t *) c); #endif } // Multiply the lower single-precision (32-bit) floating-point element in a and // b, store the result in the lower element of dst, and copy the upper 3 packed // elements from a to the upper elements of dst. // // dst[31:0] := a[31:0] * b[31:0] // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mul_ss FORCE_INLINE __m128 _mm_mul_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_mul_ps(a, b)); } // Multiply the low unsigned 32-bit integers from each packed 64-bit element in // a and b, and store the unsigned 64-bit results in dst. // // r0 := (a0 & 0xFFFFFFFF) * (b0 & 0xFFFFFFFF) // r1 := (a2 & 0xFFFFFFFF) * (b2 & 0xFFFFFFFF) FORCE_INLINE __m128i _mm_mul_epu32(__m128i a, __m128i b) { // vmull_u32 upcasts instead of masking, so we downcast. uint32x2_t a_lo = vmovn_u64(vreinterpretq_u64_m128i(a)); uint32x2_t b_lo = vmovn_u64(vreinterpretq_u64_m128i(b)); return vreinterpretq_m128i_u64(vmull_u32(a_lo, b_lo)); } // Multiply the low unsigned 32-bit integers from a and b, and store the // unsigned 64-bit result in dst. // // dst[63:0] := a[31:0] * b[31:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mul_su32 FORCE_INLINE __m64 _mm_mul_su32(__m64 a, __m64 b) { return vreinterpret_m64_u64(vget_low_u64( vmull_u32(vreinterpret_u32_m64(a), vreinterpret_u32_m64(b)))); } // Multiply the low signed 32-bit integers from each packed 64-bit element in // a and b, and store the signed 64-bit results in dst. // // r0 := (int64_t)(int32_t)a0 * (int64_t)(int32_t)b0 // r1 := (int64_t)(int32_t)a2 * (int64_t)(int32_t)b2 FORCE_INLINE __m128i _mm_mul_epi32(__m128i a, __m128i b) { // vmull_s32 upcasts instead of masking, so we downcast. int32x2_t a_lo = vmovn_s64(vreinterpretq_s64_m128i(a)); int32x2_t b_lo = vmovn_s64(vreinterpretq_s64_m128i(b)); return vreinterpretq_m128i_s64(vmull_s32(a_lo, b_lo)); } // Multiplies the 8 signed 16-bit integers from a by the 8 signed 16-bit // integers from b. // // r0 := (a0 * b0) + (a1 * b1) // r1 := (a2 * b2) + (a3 * b3) // r2 := (a4 * b4) + (a5 * b5) // r3 := (a6 * b6) + (a7 * b7) // https://msdn.microsoft.com/en-us/library/yht36sa6(v=vs.90).aspx FORCE_INLINE __m128i _mm_madd_epi16(__m128i a, __m128i b) { int32x4_t low = vmull_s16(vget_low_s16(vreinterpretq_s16_m128i(a)), vget_low_s16(vreinterpretq_s16_m128i(b))); int32x4_t high = vmull_s16(vget_high_s16(vreinterpretq_s16_m128i(a)), vget_high_s16(vreinterpretq_s16_m128i(b))); int32x2_t low_sum = vpadd_s32(vget_low_s32(low), vget_high_s32(low)); int32x2_t high_sum = vpadd_s32(vget_low_s32(high), vget_high_s32(high)); return vreinterpretq_m128i_s32(vcombine_s32(low_sum, high_sum)); } // Multiply packed signed 16-bit integers in a and b, producing intermediate // signed 32-bit integers. Shift right by 15 bits while rounding up, and store // the packed 16-bit integers in dst. // // r0 := Round(((int32_t)a0 * (int32_t)b0) >> 15) // r1 := Round(((int32_t)a1 * (int32_t)b1) >> 15) // r2 := Round(((int32_t)a2 * (int32_t)b2) >> 15) // ... // r7 := Round(((int32_t)a7 * (int32_t)b7) >> 15) FORCE_INLINE __m128i _mm_mulhrs_epi16(__m128i a, __m128i b) { // Has issues due to saturation // return vreinterpretq_m128i_s16(vqrdmulhq_s16(a, b)); // Multiply int32x4_t mul_lo = vmull_s16(vget_low_s16(vreinterpretq_s16_m128i(a)), vget_low_s16(vreinterpretq_s16_m128i(b))); int32x4_t mul_hi = vmull_s16(vget_high_s16(vreinterpretq_s16_m128i(a)), vget_high_s16(vreinterpretq_s16_m128i(b))); // Rounding narrowing shift right // narrow = (int16_t)((mul + 16384) >> 15); int16x4_t narrow_lo = vrshrn_n_s32(mul_lo, 15); int16x4_t narrow_hi = vrshrn_n_s32(mul_hi, 15); // Join together return vreinterpretq_m128i_s16(vcombine_s16(narrow_lo, narrow_hi)); } // Vertically multiply each unsigned 8-bit integer from a with the corresponding // signed 8-bit integer from b, producing intermediate signed 16-bit integers. // Horizontally add adjacent pairs of intermediate signed 16-bit integers, // and pack the saturated results in dst. // // FOR j := 0 to 7 // i := j*16 // dst[i+15:i] := Saturate_To_Int16( a[i+15:i+8]*b[i+15:i+8] + // a[i+7:i]*b[i+7:i] ) // ENDFOR FORCE_INLINE __m128i _mm_maddubs_epi16(__m128i _a, __m128i _b) { #if defined(__aarch64__) uint8x16_t a = vreinterpretq_u8_m128i(_a); int8x16_t b = vreinterpretq_s8_m128i(_b); int16x8_t tl = vmulq_s16(vreinterpretq_s16_u16(vmovl_u8(vget_low_u8(a))), vmovl_s8(vget_low_s8(b))); int16x8_t th = vmulq_s16(vreinterpretq_s16_u16(vmovl_u8(vget_high_u8(a))), vmovl_s8(vget_high_s8(b))); return vreinterpretq_m128i_s16( vqaddq_s16(vuzp1q_s16(tl, th), vuzp2q_s16(tl, th))); #else // This would be much simpler if x86 would choose to zero extend OR sign // extend, not both. This could probably be optimized better. uint16x8_t a = vreinterpretq_u16_m128i(_a); int16x8_t b = vreinterpretq_s16_m128i(_b); // Zero extend a int16x8_t a_odd = vreinterpretq_s16_u16(vshrq_n_u16(a, 8)); int16x8_t a_even = vreinterpretq_s16_u16(vbicq_u16(a, vdupq_n_u16(0xff00))); // Sign extend by shifting left then shifting right. int16x8_t b_even = vshrq_n_s16(vshlq_n_s16(b, 8), 8); int16x8_t b_odd = vshrq_n_s16(b, 8); // multiply int16x8_t prod1 = vmulq_s16(a_even, b_even); int16x8_t prod2 = vmulq_s16(a_odd, b_odd); // saturated add return vreinterpretq_m128i_s16(vqaddq_s16(prod1, prod2)); #endif } // Computes the fused multiple add product of 32-bit floating point numbers. // // Return Value // Multiplies A and B, and adds C to the temporary result before returning it. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_fmadd FORCE_INLINE __m128 _mm_fmadd_ps(__m128 a, __m128 b, __m128 c) { #if defined(__aarch64__) return vreinterpretq_m128_f32(vfmaq_f32(vreinterpretq_f32_m128(c), vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(a))); #else return _mm_add_ps(_mm_mul_ps(a, b), c); #endif } // Alternatively add and subtract packed single-precision (32-bit) // floating-point elements in a to/from packed elements in b, and store the // results in dst. // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=addsub_ps FORCE_INLINE __m128 _mm_addsub_ps(__m128 a, __m128 b) { __m128 mask = {-1.0f, 1.0f, -1.0f, 1.0f}; return _mm_fmadd_ps(b, mask, a); } // Compute the absolute differences of packed unsigned 8-bit integers in a and // b, then horizontally sum each consecutive 8 differences to produce two // unsigned 16-bit integers, and pack these unsigned 16-bit integers in the low // 16 bits of 64-bit elements in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sad_epu8 FORCE_INLINE __m128i _mm_sad_epu8(__m128i a, __m128i b) { uint16x8_t t = vpaddlq_u8(vabdq_u8((uint8x16_t) a, (uint8x16_t) b)); uint16_t r0 = t[0] + t[1] + t[2] + t[3]; uint16_t r4 = t[4] + t[5] + t[6] + t[7]; uint16x8_t r = vsetq_lane_u16(r0, vdupq_n_u16(0), 0); return (__m128i) vsetq_lane_u16(r4, r, 4); } // Compute the absolute differences of packed unsigned 8-bit integers in a and // b, then horizontally sum each consecutive 8 differences to produce four // unsigned 16-bit integers, and pack these unsigned 16-bit integers in the low // 16 bits of dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sad_pu8 FORCE_INLINE __m64 _mm_sad_pu8(__m64 a, __m64 b) { uint16x4_t t = vpaddl_u8(vabd_u8(vreinterpret_u8_m64(a), vreinterpret_u8_m64(b))); uint16_t r0 = t[0] + t[1] + t[2] + t[3]; return vreinterpret_m64_u16(vset_lane_u16(r0, vdup_n_u16(0), 0)); } // Compute the absolute differences of packed unsigned 8-bit integers in a and // b, then horizontally sum each consecutive 8 differences to produce four // unsigned 16-bit integers, and pack these unsigned 16-bit integers in the low // 16 bits of dst. // // FOR j := 0 to 7 // i := j*8 // tmp[i+7:i] := ABS(a[i+7:i] - b[i+7:i]) // ENDFOR // dst[15:0] := tmp[7:0] + tmp[15:8] + tmp[23:16] + tmp[31:24] + tmp[39:32] + // tmp[47:40] + tmp[55:48] + tmp[63:56] dst[63:16] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_m_psadbw #define _m_psadbw(a, b) _mm_sad_pu8(a, b) // Divides the four single-precision, floating-point values of a and b. // // r0 := a0 / b0 // r1 := a1 / b1 // r2 := a2 / b2 // r3 := a3 / b3 // // https://msdn.microsoft.com/en-us/library/edaw8147(v=vs.100).aspx FORCE_INLINE __m128 _mm_div_ps(__m128 a, __m128 b) { #if defined(__aarch64__) return vreinterpretq_m128_f32( vdivq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #else float32x4_t recip0 = vrecpeq_f32(vreinterpretq_f32_m128(b)); float32x4_t recip1 = vmulq_f32(recip0, vrecpsq_f32(recip0, vreinterpretq_f32_m128(b))); return vreinterpretq_m128_f32(vmulq_f32(vreinterpretq_f32_m128(a), recip1)); #endif } // Divides the scalar single-precision floating point value of a by b. // https://msdn.microsoft.com/en-us/library/4y73xa49(v=vs.100).aspx FORCE_INLINE __m128 _mm_div_ss(__m128 a, __m128 b) { float32_t value = vgetq_lane_f32(vreinterpretq_f32_m128(_mm_div_ps(a, b)), 0); return vreinterpretq_m128_f32( vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); } // Compute the approximate reciprocal of packed single-precision (32-bit) // floating-point elements in a, and store the results in dst. The maximum // relative error for this approximation is less than 1.5*2^-12. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_rcp_ps FORCE_INLINE __m128 _mm_rcp_ps(__m128 in) { #if defined(__aarch64__) return vreinterpretq_m128_f32( vdivq_f32(vdupq_n_f32(1.0f), vreinterpretq_f32_m128(in))); #else float32x4_t recip = vrecpeq_f32(vreinterpretq_f32_m128(in)); recip = vmulq_f32(recip, vrecpsq_f32(recip, vreinterpretq_f32_m128(in))); return vreinterpretq_m128_f32(recip); #endif } // Compute the approximate reciprocal of the lower single-precision (32-bit) // floating-point element in a, store the result in the lower element of dst, // and copy the upper 3 packed elements from a to the upper elements of dst. The // maximum relative error for this approximation is less than 1.5*2^-12. // // dst[31:0] := (1.0 / a[31:0]) // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_rcp_ss FORCE_INLINE __m128 _mm_rcp_ss(__m128 a) { return _mm_move_ss(a, _mm_rcp_ps(a)); } // Computes the approximations of square roots of the four single-precision, // floating-point values of a. First computes reciprocal square roots and then // reciprocals of the four values. // // r0 := sqrt(a0) // r1 := sqrt(a1) // r2 := sqrt(a2) // r3 := sqrt(a3) // // https://msdn.microsoft.com/en-us/library/vstudio/8z67bwwk(v=vs.100).aspx FORCE_INLINE __m128 _mm_sqrt_ps(__m128 in) { #if defined(__aarch64__) return vreinterpretq_m128_f32(vsqrtq_f32(vreinterpretq_f32_m128(in))); #else float32x4_t recipsq = vrsqrteq_f32(vreinterpretq_f32_m128(in)); float32x4_t sq = vrecpeq_f32(recipsq); // ??? use step versions of both sqrt and recip for better accuracy? return vreinterpretq_m128_f32(sq); #endif } // Computes the approximation of the square root of the scalar single-precision // floating point value of in. // https://msdn.microsoft.com/en-us/library/ahfsc22d(v=vs.100).aspx FORCE_INLINE __m128 _mm_sqrt_ss(__m128 in) { float32_t value = vgetq_lane_f32(vreinterpretq_f32_m128(_mm_sqrt_ps(in)), 0); return vreinterpretq_m128_f32( vsetq_lane_f32(value, vreinterpretq_f32_m128(in), 0)); } // Computes the approximations of the reciprocal square roots of the four // single-precision floating point values of in. // https://msdn.microsoft.com/en-us/library/22hfsh53(v=vs.100).aspx FORCE_INLINE __m128 _mm_rsqrt_ps(__m128 in) { return vreinterpretq_m128_f32(vrsqrteq_f32(vreinterpretq_f32_m128(in))); } // Compute the approximate reciprocal square root of the lower single-precision // (32-bit) floating-point element in a, store the result in the lower element // of dst, and copy the upper 3 packed elements from a to the upper elements of // dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_rsqrt_ss FORCE_INLINE __m128 _mm_rsqrt_ss(__m128 in) { return vsetq_lane_f32(vgetq_lane_f32(_mm_rsqrt_ps(in), 0), in, 0); } // Compare packed signed 16-bit integers in a and b, and store packed maximum // values in dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := MAX(a[i+15:i], b[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_pi16 FORCE_INLINE __m64 _mm_max_pi16(__m64 a, __m64 b) { return vreinterpret_m64_s16( vmax_s16(vreinterpret_s16_m64(a), vreinterpret_s16_m64(b))); } // Compare packed signed 16-bit integers in a and b, and store packed maximum // values in dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := MAX(a[i+15:i], b[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_pi16 #define _m_pmaxsw(a, b) _mm_max_pi16(a, b) // Computes the maximums of the four single-precision, floating-point values of // a and b. // https://msdn.microsoft.com/en-us/library/vstudio/ff5d607a(v=vs.100).aspx FORCE_INLINE __m128 _mm_max_ps(__m128 a, __m128 b) { #if SSE2NEON_PRECISE_MINMAX float32x4_t _a = vreinterpretq_f32_m128(a); float32x4_t _b = vreinterpretq_f32_m128(b); return vbslq_f32(vcltq_f32(_b, _a), _a, _b); #else return vreinterpretq_m128_f32( vmaxq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #endif } // Compare packed unsigned 8-bit integers in a and b, and store packed maximum // values in dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := MAX(a[i+7:i], b[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_pu8 FORCE_INLINE __m64 _mm_max_pu8(__m64 a, __m64 b) { return vreinterpret_m64_u8( vmax_u8(vreinterpret_u8_m64(a), vreinterpret_u8_m64(b))); } // Compare packed unsigned 8-bit integers in a and b, and store packed maximum // values in dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := MAX(a[i+7:i], b[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_pu8 #define _m_pmaxub(a, b) _mm_max_pu8(a, b) // Compare packed signed 16-bit integers in a and b, and store packed minimum // values in dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := MIN(a[i+15:i], b[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_pi16 FORCE_INLINE __m64 _mm_min_pi16(__m64 a, __m64 b) { return vreinterpret_m64_s16( vmin_s16(vreinterpret_s16_m64(a), vreinterpret_s16_m64(b))); } // Compare packed signed 16-bit integers in a and b, and store packed minimum // values in dst. // // FOR j := 0 to 3 // i := j*16 // dst[i+15:i] := MIN(a[i+15:i], b[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_pi16 #define _m_pminsw(a, b) _mm_min_pi16(a, b) // Computes the minima of the four single-precision, floating-point values of a // and b. // https://msdn.microsoft.com/en-us/library/vstudio/wh13kadz(v=vs.100).aspx FORCE_INLINE __m128 _mm_min_ps(__m128 a, __m128 b) { #if SSE2NEON_PRECISE_MINMAX float32x4_t _a = vreinterpretq_f32_m128(a); float32x4_t _b = vreinterpretq_f32_m128(b); return vbslq_f32(vcltq_f32(_a, _b), _a, _b); #else return vreinterpretq_m128_f32( vminq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #endif } // Compare packed unsigned 8-bit integers in a and b, and store packed minimum // values in dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := MIN(a[i+7:i], b[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_pu8 FORCE_INLINE __m64 _mm_min_pu8(__m64 a, __m64 b) { return vreinterpret_m64_u8( vmin_u8(vreinterpret_u8_m64(a), vreinterpret_u8_m64(b))); } // Compare packed unsigned 8-bit integers in a and b, and store packed minimum // values in dst. // // FOR j := 0 to 7 // i := j*8 // dst[i+7:i] := MIN(a[i+7:i], b[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_pu8 #define _m_pminub(a, b) _mm_min_pu8(a, b) // Computes the maximum of the two lower scalar single-precision floating point // values of a and b. // https://msdn.microsoft.com/en-us/library/s6db5esz(v=vs.100).aspx FORCE_INLINE __m128 _mm_max_ss(__m128 a, __m128 b) { float32_t value = vgetq_lane_f32(_mm_max_ps(a, b), 0); return vreinterpretq_m128_f32( vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); } // Computes the minimum of the two lower scalar single-precision floating point // values of a and b. // https://msdn.microsoft.com/en-us/library/0a9y7xaa(v=vs.100).aspx FORCE_INLINE __m128 _mm_min_ss(__m128 a, __m128 b) { float32_t value = vgetq_lane_f32(_mm_min_ps(a, b), 0); return vreinterpretq_m128_f32( vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); } // Computes the pairwise maxima of the 16 unsigned 8-bit integers from a and the // 16 unsigned 8-bit integers from b. // https://msdn.microsoft.com/en-us/library/st6634za(v=vs.100).aspx FORCE_INLINE __m128i _mm_max_epu8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vmaxq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); } // Computes the pairwise minima of the 16 unsigned 8-bit integers from a and the // 16 unsigned 8-bit integers from b. // https://msdn.microsoft.com/ko-kr/library/17k8cf58(v=vs.100).aspxx FORCE_INLINE __m128i _mm_min_epu8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vminq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); } // Computes the pairwise minima of the 8 signed 16-bit integers from a and the 8 // signed 16-bit integers from b. // https://msdn.microsoft.com/en-us/library/vstudio/6te997ew(v=vs.100).aspx FORCE_INLINE __m128i _mm_min_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vminq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Compare packed signed 8-bit integers in a and b, and store packed maximum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_epi8 FORCE_INLINE __m128i _mm_max_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vmaxq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Compare packed unsigned 16-bit integers in a and b, and store packed maximum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_epu16 FORCE_INLINE __m128i _mm_max_epu16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vmaxq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b))); } // Compare packed signed 8-bit integers in a and b, and store packed minimum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_epi8 FORCE_INLINE __m128i _mm_min_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vminq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Compare packed unsigned 16-bit integers in a and b, and store packed minimum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_min_epu16 FORCE_INLINE __m128i _mm_min_epu16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vminq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b))); } // Computes the pairwise maxima of the 8 signed 16-bit integers from a and the 8 // signed 16-bit integers from b. // https://msdn.microsoft.com/en-us/LIBRary/3x060h7c(v=vs.100).aspx FORCE_INLINE __m128i _mm_max_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vmaxq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // epi versions of min/max // Computes the pariwise maximums of the four signed 32-bit integer values of a // and b. // // A 128-bit parameter that can be defined with the following equations: // r0 := (a0 > b0) ? a0 : b0 // r1 := (a1 > b1) ? a1 : b1 // r2 := (a2 > b2) ? a2 : b2 // r3 := (a3 > b3) ? a3 : b3 // // https://msdn.microsoft.com/en-us/library/vstudio/bb514055(v=vs.100).aspx FORCE_INLINE __m128i _mm_max_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vmaxq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Computes the pariwise minima of the four signed 32-bit integer values of a // and b. // // A 128-bit parameter that can be defined with the following equations: // r0 := (a0 < b0) ? a0 : b0 // r1 := (a1 < b1) ? a1 : b1 // r2 := (a2 < b2) ? a2 : b2 // r3 := (a3 < b3) ? a3 : b3 // // https://msdn.microsoft.com/en-us/library/vstudio/bb531476(v=vs.100).aspx FORCE_INLINE __m128i _mm_min_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s32( vminq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Compare packed unsigned 32-bit integers in a and b, and store packed maximum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_epu32 FORCE_INLINE __m128i _mm_max_epu32(__m128i a, __m128i b) { return vreinterpretq_m128i_u32( vmaxq_u32(vreinterpretq_u32_m128i(a), vreinterpretq_u32_m128i(b))); } // Compare packed unsigned 32-bit integers in a and b, and store packed minimum // values in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_max_epu32 FORCE_INLINE __m128i _mm_min_epu32(__m128i a, __m128i b) { return vreinterpretq_m128i_u32( vminq_u32(vreinterpretq_u32_m128i(a), vreinterpretq_u32_m128i(b))); } // Multiply the packed unsigned 16-bit integers in a and b, producing // intermediate 32-bit integers, and store the high 16 bits of the intermediate // integers in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mulhi_pu16 FORCE_INLINE __m64 _mm_mulhi_pu16(__m64 a, __m64 b) { return vreinterpret_m64_u16(vshrn_n_u32( vmull_u16(vreinterpret_u16_m64(a), vreinterpret_u16_m64(b)), 16)); } // Multiplies the 8 signed 16-bit integers from a by the 8 signed 16-bit // integers from b. // // r0 := (a0 * b0)[31:16] // r1 := (a1 * b1)[31:16] // ... // r7 := (a7 * b7)[31:16] // // https://msdn.microsoft.com/en-us/library/vstudio/59hddw1d(v=vs.100).aspx FORCE_INLINE __m128i _mm_mulhi_epi16(__m128i a, __m128i b) { /* FIXME: issue with large values because of result saturation */ // int16x8_t ret = vqdmulhq_s16(vreinterpretq_s16_m128i(a), // vreinterpretq_s16_m128i(b)); /* =2*a*b */ return // vreinterpretq_m128i_s16(vshrq_n_s16(ret, 1)); int16x4_t a3210 = vget_low_s16(vreinterpretq_s16_m128i(a)); int16x4_t b3210 = vget_low_s16(vreinterpretq_s16_m128i(b)); int32x4_t ab3210 = vmull_s16(a3210, b3210); /* 3333222211110000 */ int16x4_t a7654 = vget_high_s16(vreinterpretq_s16_m128i(a)); int16x4_t b7654 = vget_high_s16(vreinterpretq_s16_m128i(b)); int32x4_t ab7654 = vmull_s16(a7654, b7654); /* 7777666655554444 */ uint16x8x2_t r = vuzpq_u16(vreinterpretq_u16_s32(ab3210), vreinterpretq_u16_s32(ab7654)); return vreinterpretq_m128i_u16(r.val[1]); } // Multiply the packed unsigned 16-bit integers in a and b, producing // intermediate 32-bit integers, and store the high 16 bits of the intermediate // integers in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mulhi_epu16 FORCE_INLINE __m128i _mm_mulhi_epu16(__m128i a, __m128i b) { uint16x4_t a3210 = vget_low_u16(vreinterpretq_u16_m128i(a)); uint16x4_t b3210 = vget_low_u16(vreinterpretq_u16_m128i(b)); uint32x4_t ab3210 = vmull_u16(a3210, b3210); #if defined(__aarch64__) uint32x4_t ab7654 = vmull_high_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b)); uint16x8_t r = vuzp2q_u16(vreinterpretq_u16_u32(ab3210), vreinterpretq_u16_u32(ab7654)); return vreinterpretq_m128i_u16(r); #else uint16x4_t a7654 = vget_high_u16(vreinterpretq_u16_m128i(a)); uint16x4_t b7654 = vget_high_u16(vreinterpretq_u16_m128i(b)); uint32x4_t ab7654 = vmull_u16(a7654, b7654); uint16x8x2_t r = vuzpq_u16(vreinterpretq_u16_u32(ab3210), vreinterpretq_u16_u32(ab7654)); return vreinterpretq_m128i_u16(r.val[1]); #endif } // Computes pairwise add of each argument as single-precision, floating-point // values a and b. // https://msdn.microsoft.com/en-us/library/yd9wecaa.aspx FORCE_INLINE __m128 _mm_hadd_ps(__m128 a, __m128 b) { #if defined(__aarch64__) return vreinterpretq_m128_f32( vpaddq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #else float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); return vreinterpretq_m128_f32( vcombine_f32(vpadd_f32(a10, a32), vpadd_f32(b10, b32))); #endif } // Computes pairwise add of each argument as a 16-bit signed or unsigned integer // values a and b. FORCE_INLINE __m128i _mm_hadd_epi16(__m128i _a, __m128i _b) { int16x8_t a = vreinterpretq_s16_m128i(_a); int16x8_t b = vreinterpretq_s16_m128i(_b); #if defined(__aarch64__) return vreinterpretq_m128i_s16(vpaddq_s16(a, b)); #else return vreinterpretq_m128i_s16( vcombine_s16(vpadd_s16(vget_low_s16(a), vget_high_s16(a)), vpadd_s16(vget_low_s16(b), vget_high_s16(b)))); #endif } // Horizontally substract adjacent pairs of single-precision (32-bit) // floating-point elements in a and b, and pack the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_hsub_ps FORCE_INLINE __m128 _mm_hsub_ps(__m128 _a, __m128 _b) { #if defined(__aarch64__) return vreinterpretq_m128_f32(vsubq_f32( vuzp1q_f32(vreinterpretq_f32_m128(_a), vreinterpretq_f32_m128(_b)), vuzp2q_f32(vreinterpretq_f32_m128(_a), vreinterpretq_f32_m128(_b)))); #else float32x4x2_t c = vuzpq_f32(vreinterpretq_f32_m128(_a), vreinterpretq_f32_m128(_b)); return vreinterpretq_m128_f32(vsubq_f32(c.val[0], c.val[1])); #endif } // Horizontally add adjacent pairs of 16-bit integers in a and b, and pack the // signed 16-bit results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_hadd_pi16 FORCE_INLINE __m64 _mm_hadd_pi16(__m64 a, __m64 b) { return vreinterpret_m64_s16( vpadd_s16(vreinterpret_s16_m64(a), vreinterpret_s16_m64(b))); } // Horizontally add adjacent pairs of 32-bit integers in a and b, and pack the // signed 32-bit results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_hadd_pi32 FORCE_INLINE __m64 _mm_hadd_pi32(__m64 a, __m64 b) { return vreinterpret_m64_s32( vpadd_s32(vreinterpret_s32_m64(a), vreinterpret_s32_m64(b))); } // Computes pairwise difference of each argument as a 16-bit signed or unsigned // integer values a and b. FORCE_INLINE __m128i _mm_hsub_epi16(__m128i _a, __m128i _b) { int32x4_t a = vreinterpretq_s32_m128i(_a); int32x4_t b = vreinterpretq_s32_m128i(_b); // Interleave using vshrn/vmovn // [a0|a2|a4|a6|b0|b2|b4|b6] // [a1|a3|a5|a7|b1|b3|b5|b7] int16x8_t ab0246 = vcombine_s16(vmovn_s32(a), vmovn_s32(b)); int16x8_t ab1357 = vcombine_s16(vshrn_n_s32(a, 16), vshrn_n_s32(b, 16)); // Subtract return vreinterpretq_m128i_s16(vsubq_s16(ab0246, ab1357)); } // Computes saturated pairwise sub of each argument as a 16-bit signed // integer values a and b. FORCE_INLINE __m128i _mm_hadds_epi16(__m128i _a, __m128i _b) { #if defined(__aarch64__) int16x8_t a = vreinterpretq_s16_m128i(_a); int16x8_t b = vreinterpretq_s16_m128i(_b); return vreinterpretq_s64_s16( vqaddq_s16(vuzp1q_s16(a, b), vuzp2q_s16(a, b))); #else int32x4_t a = vreinterpretq_s32_m128i(_a); int32x4_t b = vreinterpretq_s32_m128i(_b); // Interleave using vshrn/vmovn // [a0|a2|a4|a6|b0|b2|b4|b6] // [a1|a3|a5|a7|b1|b3|b5|b7] int16x8_t ab0246 = vcombine_s16(vmovn_s32(a), vmovn_s32(b)); int16x8_t ab1357 = vcombine_s16(vshrn_n_s32(a, 16), vshrn_n_s32(b, 16)); // Saturated add return vreinterpretq_m128i_s16(vqaddq_s16(ab0246, ab1357)); #endif } // Computes saturated pairwise difference of each argument as a 16-bit signed // integer values a and b. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_hsubs_epi16 FORCE_INLINE __m128i _mm_hsubs_epi16(__m128i _a, __m128i _b) { #if defined(__aarch64__) int16x8_t a = vreinterpretq_s16_m128i(_a); int16x8_t b = vreinterpretq_s16_m128i(_b); return vreinterpretq_s64_s16( vqsubq_s16(vuzp1q_s16(a, b), vuzp2q_s16(a, b))); #else int32x4_t a = vreinterpretq_s32_m128i(_a); int32x4_t b = vreinterpretq_s32_m128i(_b); // Interleave using vshrn/vmovn // [a0|a2|a4|a6|b0|b2|b4|b6] // [a1|a3|a5|a7|b1|b3|b5|b7] int16x8_t ab0246 = vcombine_s16(vmovn_s32(a), vmovn_s32(b)); int16x8_t ab1357 = vcombine_s16(vshrn_n_s32(a, 16), vshrn_n_s32(b, 16)); // Saturated subtract return vreinterpretq_m128i_s16(vqsubq_s16(ab0246, ab1357)); #endif } // Computes pairwise add of each argument as a 32-bit signed or unsigned integer // values a and b. FORCE_INLINE __m128i _mm_hadd_epi32(__m128i _a, __m128i _b) { int32x4_t a = vreinterpretq_s32_m128i(_a); int32x4_t b = vreinterpretq_s32_m128i(_b); return vreinterpretq_m128i_s32( vcombine_s32(vpadd_s32(vget_low_s32(a), vget_high_s32(a)), vpadd_s32(vget_low_s32(b), vget_high_s32(b)))); } // Computes pairwise difference of each argument as a 32-bit signed or unsigned // integer values a and b. FORCE_INLINE __m128i _mm_hsub_epi32(__m128i _a, __m128i _b) { int64x2_t a = vreinterpretq_s64_m128i(_a); int64x2_t b = vreinterpretq_s64_m128i(_b); // Interleave using vshrn/vmovn // [a0|a2|b0|b2] // [a1|a2|b1|b3] int32x4_t ab02 = vcombine_s32(vmovn_s64(a), vmovn_s64(b)); int32x4_t ab13 = vcombine_s32(vshrn_n_s64(a, 32), vshrn_n_s64(b, 32)); // Subtract return vreinterpretq_m128i_s32(vsubq_s32(ab02, ab13)); } // Kahan summation for accurate summation of floating-point numbers. // http://blog.zachbjornson.com/2019/08/11/fast-float-summation.html FORCE_INLINE void sse2neon_kadd_f32(float *sum, float *c, float y) { y -= *c; float t = *sum + y; *c = (t - *sum) - y; *sum = t; } // Conditionally multiply the packed single-precision (32-bit) floating-point // elements in a and b using the high 4 bits in imm8, sum the four products, // and conditionally store the sum in dst using the low 4 bits of imm. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_dp_ps FORCE_INLINE __m128 _mm_dp_ps(__m128 a, __m128 b, const int imm) { #if defined(__aarch64__) /* shortcuts */ if (imm == 0xFF) { return _mm_set1_ps(vaddvq_f32(_mm_mul_ps(a, b))); } if (imm == 0x7F) { float32x4_t m = _mm_mul_ps(a, b); m[3] = 0; return _mm_set1_ps(vaddvq_f32(m)); } #endif float s = 0, c = 0; float32x4_t f32a = vreinterpretq_f32_m128(a); float32x4_t f32b = vreinterpretq_f32_m128(b); /* To improve the accuracy of floating-point summation, Kahan algorithm * is used for each operation. */ if (imm & (1 << 4)) sse2neon_kadd_f32(&s, &c, f32a[0] * f32b[0]); if (imm & (1 << 5)) sse2neon_kadd_f32(&s, &c, f32a[1] * f32b[1]); if (imm & (1 << 6)) sse2neon_kadd_f32(&s, &c, f32a[2] * f32b[2]); if (imm & (1 << 7)) sse2neon_kadd_f32(&s, &c, f32a[3] * f32b[3]); s += c; float32x4_t res = { (imm & 0x1) ? s : 0, (imm & 0x2) ? s : 0, (imm & 0x4) ? s : 0, (imm & 0x8) ? s : 0, }; return vreinterpretq_m128_f32(res); } /* Compare operations */ // Compares for less than // https://msdn.microsoft.com/en-us/library/vstudio/f330yhc8(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmplt_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32( vcltq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Compares for less than // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/fy94wye7(v=vs.100) FORCE_INLINE __m128 _mm_cmplt_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmplt_ps(a, b)); } // Compares for greater than. // // r0 := (a0 > b0) ? 0xffffffff : 0x0 // r1 := (a1 > b1) ? 0xffffffff : 0x0 // r2 := (a2 > b2) ? 0xffffffff : 0x0 // r3 := (a3 > b3) ? 0xffffffff : 0x0 // // https://msdn.microsoft.com/en-us/library/vstudio/11dy102s(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmpgt_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32( vcgtq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Compares for greater than. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/1xyyyy9e(v=vs.100) FORCE_INLINE __m128 _mm_cmpgt_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpgt_ps(a, b)); } // Compares for greater than or equal. // https://msdn.microsoft.com/en-us/library/vstudio/fs813y2t(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmpge_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32( vcgeq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Compares for greater than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/kesh3ddc(v=vs.100) FORCE_INLINE __m128 _mm_cmpge_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpge_ps(a, b)); } // Compares for less than or equal. // // r0 := (a0 <= b0) ? 0xffffffff : 0x0 // r1 := (a1 <= b1) ? 0xffffffff : 0x0 // r2 := (a2 <= b2) ? 0xffffffff : 0x0 // r3 := (a3 <= b3) ? 0xffffffff : 0x0 // // https://msdn.microsoft.com/en-us/library/vstudio/1s75w83z(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmple_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32( vcleq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Compares for less than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/a7x0hbhw(v=vs.100) FORCE_INLINE __m128 _mm_cmple_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmple_ps(a, b)); } // Compares for equality. // https://msdn.microsoft.com/en-us/library/vstudio/36aectz5(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmpeq_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32( vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); } // Compares for equality. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/k423z28e(v=vs.100) FORCE_INLINE __m128 _mm_cmpeq_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpeq_ps(a, b)); } // Compares for inequality. // https://msdn.microsoft.com/en-us/library/sf44thbx(v=vs.100).aspx FORCE_INLINE __m128 _mm_cmpneq_ps(__m128 a, __m128 b) { return vreinterpretq_m128_u32(vmvnq_u32( vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)))); } // Compares for inequality. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ekya8fh4(v=vs.100) FORCE_INLINE __m128 _mm_cmpneq_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpneq_ps(a, b)); } // Compares for not greater than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/wsexys62(v=vs.100) FORCE_INLINE __m128 _mm_cmpnge_ps(__m128 a, __m128 b) { return _mm_cmplt_ps(a, b); } // Compares for not greater than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/fk2y80s8(v=vs.100) FORCE_INLINE __m128 _mm_cmpnge_ss(__m128 a, __m128 b) { return _mm_cmplt_ss(a, b); } // Compares for not greater than. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/d0xh7w0s(v=vs.100) FORCE_INLINE __m128 _mm_cmpngt_ps(__m128 a, __m128 b) { return _mm_cmple_ps(a, b); } // Compares for not greater than. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/z7x9ydwh(v=vs.100) FORCE_INLINE __m128 _mm_cmpngt_ss(__m128 a, __m128 b) { return _mm_cmple_ss(a, b); } // Compares for not less than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/6a330kxw(v=vs.100) FORCE_INLINE __m128 _mm_cmpnle_ps(__m128 a, __m128 b) { return _mm_cmpgt_ps(a, b); } // Compares for not less than or equal. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/z7x9ydwh(v=vs.100) FORCE_INLINE __m128 _mm_cmpnle_ss(__m128 a, __m128 b) { return _mm_cmpgt_ss(a, b); } // Compares for not less than. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/4686bbdw(v=vs.100) FORCE_INLINE __m128 _mm_cmpnlt_ps(__m128 a, __m128 b) { return _mm_cmpge_ps(a, b); } // Compares for not less than. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/56b9z2wf(v=vs.100) FORCE_INLINE __m128 _mm_cmpnlt_ss(__m128 a, __m128 b) { return _mm_cmpge_ss(a, b); } // Compares the 16 signed or unsigned 8-bit integers in a and the 16 signed or // unsigned 8-bit integers in b for equality. // https://msdn.microsoft.com/en-us/library/windows/desktop/bz5xk21a(v=vs.90).aspx FORCE_INLINE __m128i _mm_cmpeq_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vceqq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Compares the 8 signed or unsigned 16-bit integers in a and the 8 signed or // unsigned 16-bit integers in b for equality. // https://msdn.microsoft.com/en-us/library/2ay060te(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmpeq_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vceqq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Compare packed 32-bit integers in a and b for equality, and store the results // in dst FORCE_INLINE __m128i _mm_cmpeq_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_u32( vceqq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Compare packed 64-bit integers in a and b for equality, and store the results // in dst FORCE_INLINE __m128i _mm_cmpeq_epi64(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_u64( vceqq_u64(vreinterpretq_u64_m128i(a), vreinterpretq_u64_m128i(b))); #else // ARMv7 lacks vceqq_u64 // (a == b) -> (a_lo == b_lo) && (a_hi == b_hi) uint32x4_t cmp = vceqq_u32(vreinterpretq_u32_m128i(a), vreinterpretq_u32_m128i(b)); uint32x4_t swapped = vrev64q_u32(cmp); return vreinterpretq_m128i_u32(vandq_u32(cmp, swapped)); #endif } // Compares the 16 signed 8-bit integers in a and the 16 signed 8-bit integers // in b for lesser than. // https://msdn.microsoft.com/en-us/library/windows/desktop/9s46csht(v=vs.90).aspx FORCE_INLINE __m128i _mm_cmplt_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vcltq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Compares the 16 signed 8-bit integers in a and the 16 signed 8-bit integers // in b for greater than. // // r0 := (a0 > b0) ? 0xff : 0x0 // r1 := (a1 > b1) ? 0xff : 0x0 // ... // r15 := (a15 > b15) ? 0xff : 0x0 // // https://msdn.microsoft.com/zh-tw/library/wf45zt2b(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmpgt_epi8(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vcgtq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); } // Compares the 8 signed 16-bit integers in a and the 8 signed 16-bit integers // in b for less than. // // r0 := (a0 < b0) ? 0xffff : 0x0 // r1 := (a1 < b1) ? 0xffff : 0x0 // ... // r7 := (a7 < b7) ? 0xffff : 0x0 // // https://technet.microsoft.com/en-us/library/t863edb2(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmplt_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vcltq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Compares the 8 signed 16-bit integers in a and the 8 signed 16-bit integers // in b for greater than. // // r0 := (a0 > b0) ? 0xffff : 0x0 // r1 := (a1 > b1) ? 0xffff : 0x0 // ... // r7 := (a7 > b7) ? 0xffff : 0x0 // // https://technet.microsoft.com/en-us/library/xd43yfsa(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmpgt_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vcgtq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); } // Compares the 4 signed 32-bit integers in a and the 4 signed 32-bit integers // in b for less than. // https://msdn.microsoft.com/en-us/library/vstudio/4ak0bf5d(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmplt_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_u32( vcltq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Compares the 4 signed 32-bit integers in a and the 4 signed 32-bit integers // in b for greater than. // https://msdn.microsoft.com/en-us/library/vstudio/1s9f2z0y(v=vs.100).aspx FORCE_INLINE __m128i _mm_cmpgt_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_u32( vcgtq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); } // Compares the 2 signed 64-bit integers in a and the 2 signed 64-bit integers // in b for greater than. FORCE_INLINE __m128i _mm_cmpgt_epi64(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_u64( vcgtq_s64(vreinterpretq_s64_m128i(a), vreinterpretq_s64_m128i(b))); #else // ARMv7 lacks vcgtq_s64. // This is based off of Clang's SSE2 polyfill: // (a > b) -> ((a_hi > b_hi) || (a_lo > b_lo && a_hi == b_hi)) // Mask the sign bit out since we need a signed AND an unsigned comparison // and it is ugly to try and split them. int32x4_t mask = vreinterpretq_s32_s64(vdupq_n_s64(0x80000000ull)); int32x4_t a_mask = veorq_s32(vreinterpretq_s32_m128i(a), mask); int32x4_t b_mask = veorq_s32(vreinterpretq_s32_m128i(b), mask); // Check if a > b int64x2_t greater = vreinterpretq_s64_u32(vcgtq_s32(a_mask, b_mask)); // Copy upper mask to lower mask // a_hi > b_hi int64x2_t gt_hi = vshrq_n_s64(greater, 63); // Copy lower mask to upper mask // a_lo > b_lo int64x2_t gt_lo = vsliq_n_s64(greater, greater, 32); // Compare for equality int64x2_t equal = vreinterpretq_s64_u32(vceqq_s32(a_mask, b_mask)); // Copy upper mask to lower mask // a_hi == b_hi int64x2_t eq_hi = vshrq_n_s64(equal, 63); // a_hi > b_hi || (a_lo > b_lo && a_hi == b_hi) int64x2_t ret = vorrq_s64(gt_hi, vandq_s64(gt_lo, eq_hi)); return vreinterpretq_m128i_s64(ret); #endif } // Compares the four 32-bit floats in a and b to check if any values are NaN. // Ordered compare between each value returns true for "orderable" and false for // "not orderable" (NaN). // https://msdn.microsoft.com/en-us/library/vstudio/0h9w00fx(v=vs.100).aspx see // also: // http://stackoverflow.com/questions/8627331/what-does-ordered-unordered-comparison-mean // http://stackoverflow.com/questions/29349621/neon-isnanval-intrinsics FORCE_INLINE __m128 _mm_cmpord_ps(__m128 a, __m128 b) { // Note: NEON does not have ordered compare builtin // Need to compare a eq a and b eq b to check for NaN // Do AND of results to get final uint32x4_t ceqaa = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t ceqbb = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); return vreinterpretq_m128_u32(vandq_u32(ceqaa, ceqbb)); } // Compares for ordered. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/343t62da(v=vs.100) FORCE_INLINE __m128 _mm_cmpord_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpord_ps(a, b)); } // Compares for unordered. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/khy6fk1t(v=vs.100) FORCE_INLINE __m128 _mm_cmpunord_ps(__m128 a, __m128 b) { uint32x4_t f32a = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t f32b = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); return vreinterpretq_m128_u32(vmvnq_u32(vandq_u32(f32a, f32b))); } // Compares for unordered. // https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/2as2387b(v=vs.100) FORCE_INLINE __m128 _mm_cmpunord_ss(__m128 a, __m128 b) { return _mm_move_ss(a, _mm_cmpunord_ps(a, b)); } // Compares the lower single-precision floating point scalar values of a and b // using a less than operation. : // https://msdn.microsoft.com/en-us/library/2kwe606b(v=vs.90).aspx Important // note!! The documentation on MSDN is incorrect! If either of the values is a // NAN the docs say you will get a one, but in fact, it will return a zero!! FORCE_INLINE int _mm_comilt_ss(__m128 a, __m128 b) { uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); uint32x4_t a_lt_b = vcltq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_lt_b), 0) != 0) ? 1 : 0; } // Compares the lower single-precision floating point scalar values of a and b // using a greater than operation. : // https://msdn.microsoft.com/en-us/library/b0738e0t(v=vs.100).aspx FORCE_INLINE int _mm_comigt_ss(__m128 a, __m128 b) { // return vgetq_lane_u32(vcgtq_f32(vreinterpretq_f32_m128(a), // vreinterpretq_f32_m128(b)), 0); uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); uint32x4_t a_gt_b = vcgtq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_gt_b), 0) != 0) ? 1 : 0; } // Compares the lower single-precision floating point scalar values of a and b // using a less than or equal operation. : // https://msdn.microsoft.com/en-us/library/1w4t7c57(v=vs.90).aspx FORCE_INLINE int _mm_comile_ss(__m128 a, __m128 b) { // return vgetq_lane_u32(vcleq_f32(vreinterpretq_f32_m128(a), // vreinterpretq_f32_m128(b)), 0); uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); uint32x4_t a_le_b = vcleq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_le_b), 0) != 0) ? 1 : 0; } // Compares the lower single-precision floating point scalar values of a and b // using a greater than or equal operation. : // https://msdn.microsoft.com/en-us/library/8t80des6(v=vs.100).aspx FORCE_INLINE int _mm_comige_ss(__m128 a, __m128 b) { // return vgetq_lane_u32(vcgeq_f32(vreinterpretq_f32_m128(a), // vreinterpretq_f32_m128(b)), 0); uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); uint32x4_t a_ge_b = vcgeq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_ge_b), 0) != 0) ? 1 : 0; } // Compares the lower single-precision floating point scalar values of a and b // using an equality operation. : // https://msdn.microsoft.com/en-us/library/93yx2h2b(v=vs.100).aspx FORCE_INLINE int _mm_comieq_ss(__m128 a, __m128 b) { // return vgetq_lane_u32(vceqq_f32(vreinterpretq_f32_m128(a), // vreinterpretq_f32_m128(b)), 0); uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); uint32x4_t a_eq_b = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_eq_b), 0) != 0) ? 1 : 0; } // Compares the lower single-precision floating point scalar values of a and b // using an inequality operation. : // https://msdn.microsoft.com/en-us/library/bafh5e0a(v=vs.90).aspx FORCE_INLINE int _mm_comineq_ss(__m128 a, __m128 b) { // return !vgetq_lane_u32(vceqq_f32(vreinterpretq_f32_m128(a), // vreinterpretq_f32_m128(b)), 0); uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); uint32x4_t a_or_b_nan = vmvnq_u32(vandq_u32(a_not_nan, b_not_nan)); uint32x4_t a_neq_b = vmvnq_u32( vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); return (vgetq_lane_u32(vorrq_u32(a_or_b_nan, a_neq_b), 0) != 0) ? 1 : 0; } // according to the documentation, these intrinsics behave the same as the // non-'u' versions. We'll just alias them here. #define _mm_ucomilt_ss _mm_comilt_ss #define _mm_ucomile_ss _mm_comile_ss #define _mm_ucomigt_ss _mm_comigt_ss #define _mm_ucomige_ss _mm_comige_ss #define _mm_ucomieq_ss _mm_comieq_ss #define _mm_ucomineq_ss _mm_comineq_ss /* Conversions */ // Convert packed signed 32-bit integers in b to packed single-precision // (32-bit) floating-point elements, store the results in the lower 2 elements // of dst, and copy the upper 2 packed elements from a to the upper elements of // dst. // // dst[31:0] := Convert_Int32_To_FP32(b[31:0]) // dst[63:32] := Convert_Int32_To_FP32(b[63:32]) // dst[95:64] := a[95:64] // dst[127:96] := a[127:96] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvt_pi2ps FORCE_INLINE __m128 _mm_cvt_pi2ps(__m128 a, __m64 b) { return vreinterpretq_m128_f32( vcombine_f32(vcvt_f32_s32(vreinterpret_s32_m64(b)), vget_high_f32(vreinterpretq_f32_m128(a)))); } // Convert the signed 32-bit integer b to a single-precision (32-bit) // floating-point element, store the result in the lower element of dst, and // copy the upper 3 packed elements from a to the upper elements of dst. // // dst[31:0] := Convert_Int32_To_FP32(b[31:0]) // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvt_si2ss FORCE_INLINE __m128 _mm_cvt_si2ss(__m128 a, int b) { return vreinterpretq_m128_f32( vsetq_lane_f32((float) b, vreinterpretq_f32_m128(a), 0)); } // Convert the signed 32-bit integer b to a single-precision (32-bit) // floating-point element, store the result in the lower element of dst, and // copy the upper 3 packed elements from a to the upper elements of dst. // // dst[31:0] := Convert_Int32_To_FP32(b[31:0]) // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi32_ss #define _mm_cvtsi32_ss(a, b) _mm_cvt_si2ss(a, b) // Convert the signed 64-bit integer b to a single-precision (32-bit) // floating-point element, store the result in the lower element of dst, and // copy the upper 3 packed elements from a to the upper elements of dst. // // dst[31:0] := Convert_Int64_To_FP32(b[63:0]) // dst[127:32] := a[127:32] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi64_ss FORCE_INLINE __m128 _mm_cvtsi64_ss(__m128 a, int64_t b) { return vreinterpretq_m128_f32( vsetq_lane_f32((float) b, vreinterpretq_f32_m128(a), 0)); } // Convert the lower single-precision (32-bit) floating-point element in a to a // 32-bit integer, and store the result in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvt_ss2si FORCE_INLINE int _mm_cvt_ss2si(__m128 a) { #if defined(__aarch64__) return vgetq_lane_s32(vcvtnq_s32_f32(vreinterpretq_f32_m128(a)), 0); #else float32_t data = vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); float32_t diff = data - floor(data); if (diff > 0.5) return (int32_t) ceil(data); if (diff == 0.5) { int32_t f = (int32_t) floor(data); int32_t c = (int32_t) ceil(data); return c & 1 ? f : c; } return (int32_t) floor(data); #endif } // Convert packed 16-bit integers in a to packed single-precision (32-bit) // floating-point elements, and store the results in dst. // // FOR j := 0 to 3 // i := j*16 // m := j*32 // dst[m+31:m] := Convert_Int16_To_FP32(a[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpi16_ps FORCE_INLINE __m128 _mm_cvtpi16_ps(__m64 a) { return vreinterpretq_m128_f32( vcvtq_f32_s32(vmovl_s16(vreinterpret_s16_m64(a)))); } // Convert packed 32-bit integers in b to packed single-precision (32-bit) // floating-point elements, store the results in the lower 2 elements of dst, // and copy the upper 2 packed elements from a to the upper elements of dst. // // dst[31:0] := Convert_Int32_To_FP32(b[31:0]) // dst[63:32] := Convert_Int32_To_FP32(b[63:32]) // dst[95:64] := a[95:64] // dst[127:96] := a[127:96] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpi32_ps FORCE_INLINE __m128 _mm_cvtpi32_ps(__m128 a, __m64 b) { return vreinterpretq_m128_f32( vcombine_f32(vcvt_f32_s32(vreinterpret_s32_m64(b)), vget_high_f32(vreinterpretq_f32_m128(a)))); } // Convert packed signed 32-bit integers in a to packed single-precision // (32-bit) floating-point elements, store the results in the lower 2 elements // of dst, then covert the packed signed 32-bit integers in b to // single-precision (32-bit) floating-point element, and store the results in // the upper 2 elements of dst. // // dst[31:0] := Convert_Int32_To_FP32(a[31:0]) // dst[63:32] := Convert_Int32_To_FP32(a[63:32]) // dst[95:64] := Convert_Int32_To_FP32(b[31:0]) // dst[127:96] := Convert_Int32_To_FP32(b[63:32]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpi32x2_ps FORCE_INLINE __m128 _mm_cvtpi32x2_ps(__m64 a, __m64 b) { return vreinterpretq_m128_f32(vcvtq_f32_s32( vcombine_s32(vreinterpret_s32_m64(a), vreinterpret_s32_m64(b)))); } // Convert the lower packed 8-bit integers in a to packed single-precision // (32-bit) floating-point elements, and store the results in dst. // // FOR j := 0 to 3 // i := j*8 // m := j*32 // dst[m+31:m] := Convert_Int8_To_FP32(a[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpi8_ps FORCE_INLINE __m128 _mm_cvtpi8_ps(__m64 a) { return vreinterpretq_m128_f32(vcvtq_f32_s32( vmovl_s16(vget_low_s16(vmovl_s8(vreinterpret_s8_m64(a)))))); } // Convert packed unsigned 16-bit integers in a to packed single-precision // (32-bit) floating-point elements, and store the results in dst. // // FOR j := 0 to 3 // i := j*16 // m := j*32 // dst[m+31:m] := Convert_UInt16_To_FP32(a[i+15:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpu16_ps FORCE_INLINE __m128 _mm_cvtpu16_ps(__m64 a) { return vreinterpretq_m128_f32( vcvtq_f32_u32(vmovl_u16(vreinterpret_u16_m64(a)))); } // Convert the lower packed unsigned 8-bit integers in a to packed // single-precision (32-bit) floating-point elements, and store the results in // dst. // // FOR j := 0 to 3 // i := j*8 // m := j*32 // dst[m+31:m] := Convert_UInt8_To_FP32(a[i+7:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpu8_ps FORCE_INLINE __m128 _mm_cvtpu8_ps(__m64 a) { return vreinterpretq_m128_f32(vcvtq_f32_u32( vmovl_u16(vget_low_u16(vmovl_u8(vreinterpret_u8_m64(a)))))); } // Converts the four single-precision, floating-point values of a to signed // 32-bit integer values using truncate. // https://msdn.microsoft.com/en-us/library/vstudio/1h005y6x(v=vs.100).aspx FORCE_INLINE __m128i _mm_cvttps_epi32(__m128 a) { return vreinterpretq_m128i_s32(vcvtq_s32_f32(vreinterpretq_f32_m128(a))); } // Convert the lower double-precision (64-bit) floating-point element in a to a // 64-bit integer with truncation, and store the result in dst. // // dst[63:0] := Convert_FP64_To_Int64_Truncate(a[63:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvttsd_si64 FORCE_INLINE int64_t _mm_cvttsd_si64(__m128d a) { #if defined(__aarch64__) return vgetq_lane_s64(vcvtq_s64_f64(vreinterpretq_f64_m128d(a)), 0); #else double ret = *((double *) &a); return (int64_t) ret; #endif } // Convert the lower double-precision (64-bit) floating-point element in a to a // 64-bit integer with truncation, and store the result in dst. // // dst[63:0] := Convert_FP64_To_Int64_Truncate(a[63:0]) // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvttsd_si64x #define _mm_cvttsd_si64x(a) _mm_cvttsd_si64(a) // Converts the four signed 32-bit integer values of a to single-precision, // floating-point values // https://msdn.microsoft.com/en-us/library/vstudio/36bwxcx5(v=vs.100).aspx FORCE_INLINE __m128 _mm_cvtepi32_ps(__m128i a) { return vreinterpretq_m128_f32(vcvtq_f32_s32(vreinterpretq_s32_m128i(a))); } // Converts the four unsigned 8-bit integers in the lower 16 bits to four // unsigned 32-bit integers. FORCE_INLINE __m128i _mm_cvtepu8_epi16(__m128i a) { uint8x16_t u8x16 = vreinterpretq_u8_m128i(a); /* xxxx xxxx xxxx DCBA */ uint16x8_t u16x8 = vmovl_u8(vget_low_u8(u8x16)); /* 0x0x 0x0x 0D0C 0B0A */ return vreinterpretq_m128i_u16(u16x8); } // Converts the four unsigned 8-bit integers in the lower 32 bits to four // unsigned 32-bit integers. // https://msdn.microsoft.com/en-us/library/bb531467%28v=vs.100%29.aspx FORCE_INLINE __m128i _mm_cvtepu8_epi32(__m128i a) { uint8x16_t u8x16 = vreinterpretq_u8_m128i(a); /* xxxx xxxx xxxx DCBA */ uint16x8_t u16x8 = vmovl_u8(vget_low_u8(u8x16)); /* 0x0x 0x0x 0D0C 0B0A */ uint32x4_t u32x4 = vmovl_u16(vget_low_u16(u16x8)); /* 000D 000C 000B 000A */ return vreinterpretq_m128i_u32(u32x4); } // Converts the two unsigned 8-bit integers in the lower 16 bits to two // unsigned 64-bit integers. FORCE_INLINE __m128i _mm_cvtepu8_epi64(__m128i a) { uint8x16_t u8x16 = vreinterpretq_u8_m128i(a); /* xxxx xxxx xxxx xxBA */ uint16x8_t u16x8 = vmovl_u8(vget_low_u8(u8x16)); /* 0x0x 0x0x 0x0x 0B0A */ uint32x4_t u32x4 = vmovl_u16(vget_low_u16(u16x8)); /* 000x 000x 000B 000A */ uint64x2_t u64x2 = vmovl_u32(vget_low_u32(u32x4)); /* 0000 000B 0000 000A */ return vreinterpretq_m128i_u64(u64x2); } // Converts the four unsigned 8-bit integers in the lower 16 bits to four // unsigned 32-bit integers. FORCE_INLINE __m128i _mm_cvtepi8_epi16(__m128i a) { int8x16_t s8x16 = vreinterpretq_s8_m128i(a); /* xxxx xxxx xxxx DCBA */ int16x8_t s16x8 = vmovl_s8(vget_low_s8(s8x16)); /* 0x0x 0x0x 0D0C 0B0A */ return vreinterpretq_m128i_s16(s16x8); } // Converts the four unsigned 8-bit integers in the lower 32 bits to four // unsigned 32-bit integers. FORCE_INLINE __m128i _mm_cvtepi8_epi32(__m128i a) { int8x16_t s8x16 = vreinterpretq_s8_m128i(a); /* xxxx xxxx xxxx DCBA */ int16x8_t s16x8 = vmovl_s8(vget_low_s8(s8x16)); /* 0x0x 0x0x 0D0C 0B0A */ int32x4_t s32x4 = vmovl_s16(vget_low_s16(s16x8)); /* 000D 000C 000B 000A */ return vreinterpretq_m128i_s32(s32x4); } // Converts the two signed 8-bit integers in the lower 32 bits to four // signed 64-bit integers. FORCE_INLINE __m128i _mm_cvtepi8_epi64(__m128i a) { int8x16_t s8x16 = vreinterpretq_s8_m128i(a); /* xxxx xxxx xxxx xxBA */ int16x8_t s16x8 = vmovl_s8(vget_low_s8(s8x16)); /* 0x0x 0x0x 0x0x 0B0A */ int32x4_t s32x4 = vmovl_s16(vget_low_s16(s16x8)); /* 000x 000x 000B 000A */ int64x2_t s64x2 = vmovl_s32(vget_low_s32(s32x4)); /* 0000 000B 0000 000A */ return vreinterpretq_m128i_s64(s64x2); } // Converts the four signed 16-bit integers in the lower 64 bits to four signed // 32-bit integers. FORCE_INLINE __m128i _mm_cvtepi16_epi32(__m128i a) { return vreinterpretq_m128i_s32( vmovl_s16(vget_low_s16(vreinterpretq_s16_m128i(a)))); } // Converts the two signed 16-bit integers in the lower 32 bits two signed // 32-bit integers. FORCE_INLINE __m128i _mm_cvtepi16_epi64(__m128i a) { int16x8_t s16x8 = vreinterpretq_s16_m128i(a); /* xxxx xxxx xxxx 0B0A */ int32x4_t s32x4 = vmovl_s16(vget_low_s16(s16x8)); /* 000x 000x 000B 000A */ int64x2_t s64x2 = vmovl_s32(vget_low_s32(s32x4)); /* 0000 000B 0000 000A */ return vreinterpretq_m128i_s64(s64x2); } // Converts the four unsigned 16-bit integers in the lower 64 bits to four // unsigned 32-bit integers. FORCE_INLINE __m128i _mm_cvtepu16_epi32(__m128i a) { return vreinterpretq_m128i_u32( vmovl_u16(vget_low_u16(vreinterpretq_u16_m128i(a)))); } // Converts the two unsigned 16-bit integers in the lower 32 bits to two // unsigned 64-bit integers. FORCE_INLINE __m128i _mm_cvtepu16_epi64(__m128i a) { uint16x8_t u16x8 = vreinterpretq_u16_m128i(a); /* xxxx xxxx xxxx 0B0A */ uint32x4_t u32x4 = vmovl_u16(vget_low_u16(u16x8)); /* 000x 000x 000B 000A */ uint64x2_t u64x2 = vmovl_u32(vget_low_u32(u32x4)); /* 0000 000B 0000 000A */ return vreinterpretq_m128i_u64(u64x2); } // Converts the two unsigned 32-bit integers in the lower 64 bits to two // unsigned 64-bit integers. FORCE_INLINE __m128i _mm_cvtepu32_epi64(__m128i a) { return vreinterpretq_m128i_u64( vmovl_u32(vget_low_u32(vreinterpretq_u32_m128i(a)))); } // Converts the two signed 32-bit integers in the lower 64 bits to two signed // 64-bit integers. FORCE_INLINE __m128i _mm_cvtepi32_epi64(__m128i a) { return vreinterpretq_m128i_s64( vmovl_s32(vget_low_s32(vreinterpretq_s32_m128i(a)))); } // Converts the four single-precision, floating-point values of a to signed // 32-bit integer values. // // r0 := (int) a0 // r1 := (int) a1 // r2 := (int) a2 // r3 := (int) a3 // // https://msdn.microsoft.com/en-us/library/vstudio/xdc42k5e(v=vs.100).aspx // *NOTE*. The default rounding mode on SSE is 'round to even', which ARMv7-A // does not support! It is supported on ARMv8-A however. FORCE_INLINE __m128i _mm_cvtps_epi32(__m128 a) { #if defined(__aarch64__) return vreinterpretq_m128i_s32(vcvtnq_s32_f32(a)); #else uint32x4_t signmask = vdupq_n_u32(0x80000000); float32x4_t half = vbslq_f32(signmask, vreinterpretq_f32_m128(a), vdupq_n_f32(0.5f)); /* +/- 0.5 */ int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32( vreinterpretq_f32_m128(a), half)); /* round to integer: [a + 0.5]*/ int32x4_t r_trunc = vcvtq_s32_f32(vreinterpretq_f32_m128(a)); /* truncate to integer: [a] */ int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32( vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ float32x4_t delta = vsubq_f32( vreinterpretq_f32_m128(a), vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ return vreinterpretq_m128i_s32(vbslq_s32(is_delta_half, r_even, r_normal)); #endif } // Copy the lower 32-bit integer in a to dst. // // dst[31:0] := a[31:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi128_si32 FORCE_INLINE int _mm_cvtsi128_si32(__m128i a) { return vgetq_lane_s32(vreinterpretq_s32_m128i(a), 0); } // Copy the lower 64-bit integer in a to dst. // // dst[63:0] := a[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi128_si64 FORCE_INLINE int64_t _mm_cvtsi128_si64(__m128i a) { return vgetq_lane_s64(vreinterpretq_s64_m128i(a), 0); } // Copy the lower 64-bit integer in a to dst. // // dst[63:0] := a[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi128_si64x #define _mm_cvtsi128_si64x(a) _mm_cvtsi128_si64(a) // Moves 32-bit integer a to the least significant 32 bits of an __m128 object, // zero extending the upper bits. // // r0 := a // r1 := 0x0 // r2 := 0x0 // r3 := 0x0 // // https://msdn.microsoft.com/en-us/library/ct3539ha%28v=vs.90%29.aspx FORCE_INLINE __m128i _mm_cvtsi32_si128(int a) { return vreinterpretq_m128i_s32(vsetq_lane_s32(a, vdupq_n_s32(0), 0)); } // Moves 64-bit integer a to the least significant 64 bits of an __m128 object, // zero extending the upper bits. // // r0 := a // r1 := 0x0 FORCE_INLINE __m128i _mm_cvtsi64_si128(int64_t a) { return vreinterpretq_m128i_s64(vsetq_lane_s64(a, vdupq_n_s64(0), 0)); } // Cast vector of type __m128 to type __m128d. This intrinsic is only used for // compilation and does not generate any instructions, thus it has zero latency. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castps_pd FORCE_INLINE __m128d _mm_castps_pd(__m128 a) { return vreinterpretq_m128d_s32(vreinterpretq_s32_m128(a)); } // Applies a type cast to reinterpret four 32-bit floating point values passed // in as a 128-bit parameter as packed 32-bit integers. // https://msdn.microsoft.com/en-us/library/bb514099.aspx FORCE_INLINE __m128i _mm_castps_si128(__m128 a) { return vreinterpretq_m128i_s32(vreinterpretq_s32_m128(a)); } // Applies a type cast to reinterpret four 32-bit integers passed in as a // 128-bit parameter as packed 32-bit floating point values. // https://msdn.microsoft.com/en-us/library/bb514029.aspx FORCE_INLINE __m128 _mm_castsi128_ps(__m128i a) { return vreinterpretq_m128_s32(vreinterpretq_s32_m128i(a)); } // Loads 128-bit value. : // https://msdn.microsoft.com/en-us/library/atzzad1h(v=vs.80).aspx FORCE_INLINE __m128i _mm_load_si128(const __m128i *p) { return vreinterpretq_m128i_s32(vld1q_s32((const int32_t *) p)); } // Load a double-precision (64-bit) floating-point element from memory into both // elements of dst. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[127:64] := MEM[mem_addr+63:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_load1_pd FORCE_INLINE __m128d _mm_load1_pd(const double *p) { #if defined(__aarch64__) return vreinterpretq_m128d_f64(vld1q_dup_f64(p)); #else return vreinterpretq_m128d_s64(vdupq_n_s64(*(const int64_t *) p)); #endif } // Load a double-precision (64-bit) floating-point element from memory into the // upper element of dst, and copy the lower element from a to dst. mem_addr does // not need to be aligned on any particular boundary. // // dst[63:0] := a[63:0] // dst[127:64] := MEM[mem_addr+63:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadh_pd FORCE_INLINE __m128d _mm_loadh_pd(__m128d a, const double *p) { #if defined(__aarch64__) return vreinterpretq_m128d_f64( vcombine_f64(vget_low_f64(vreinterpretq_f64_m128d(a)), vld1_f64(p))); #else return vreinterpretq_m128d_f32(vcombine_f32( vget_low_f32(vreinterpretq_f32_m128d(a)), vld1_f32((const float *) p))); #endif } // Load a double-precision (64-bit) floating-point element from memory into both // elements of dst. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[127:64] := MEM[mem_addr+63:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_load_pd1 #define _mm_load_pd1 _mm_load1_pd // Load a double-precision (64-bit) floating-point element from memory into both // elements of dst. // // dst[63:0] := MEM[mem_addr+63:mem_addr] // dst[127:64] := MEM[mem_addr+63:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loaddup_pd #define _mm_loaddup_pd _mm_load1_pd // Loads 128-bit value. : // https://msdn.microsoft.com/zh-cn/library/f4k12ae8(v=vs.90).aspx FORCE_INLINE __m128i _mm_loadu_si128(const __m128i *p) { return vreinterpretq_m128i_s32(vld1q_s32((const int32_t *) p)); } // Load unaligned 32-bit integer from memory into the first element of dst. // // dst[31:0] := MEM[mem_addr+31:mem_addr] // dst[MAX:32] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadu_si32 FORCE_INLINE __m128i _mm_loadu_si32(const void *p) { return vreinterpretq_m128i_s32( vsetq_lane_s32(*(const int32_t *) p, vdupq_n_s32(0), 0)); } // Convert packed double-precision (64-bit) floating-point elements in a to // packed single-precision (32-bit) floating-point elements, and store the // results in dst. // // FOR j := 0 to 1 // i := 32*j // k := 64*j // dst[i+31:i] := Convert_FP64_To_FP32(a[k+64:k]) // ENDFOR // dst[127:64] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpd_ps FORCE_INLINE __m128 _mm_cvtpd_ps(__m128d a) { #if defined(__aarch64__) float32x2_t tmp = vcvt_f32_f64(vreinterpretq_f64_m128d(a)); return vreinterpretq_m128_f32(vcombine_f32(tmp, vdup_n_f32(0))); #else float a0 = (float) ((double *) &a)[0]; float a1 = (float) ((double *) &a)[1]; return _mm_set_ps(0, 0, a1, a0); #endif } // Copy the lower double-precision (64-bit) floating-point element of a to dst. // // dst[63:0] := a[63:0] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsd_f64 FORCE_INLINE double _mm_cvtsd_f64(__m128d a) { #if defined(__aarch64__) return (double) vgetq_lane_f64(vreinterpretq_f64_m128d(a), 0); #else return ((double *) &a)[0]; #endif } // Convert packed single-precision (32-bit) floating-point elements in a to // packed double-precision (64-bit) floating-point elements, and store the // results in dst. // // FOR j := 0 to 1 // i := 64*j // k := 32*j // dst[i+63:i] := Convert_FP32_To_FP64(a[k+31:k]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtps_pd FORCE_INLINE __m128d _mm_cvtps_pd(__m128 a) { #if defined(__aarch64__) return vreinterpretq_m128d_f64( vcvt_f64_f32(vget_low_f32(vreinterpretq_f32_m128(a)))); #else double a0 = (double) vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); double a1 = (double) vgetq_lane_f32(vreinterpretq_f32_m128(a), 1); return _mm_set_pd(a1, a0); #endif } // Cast vector of type __m128d to type __m128i. This intrinsic is only used for // compilation and does not generate any instructions, thus it has zero latency. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castpd_si128 FORCE_INLINE __m128i _mm_castpd_si128(__m128d a) { return vreinterpretq_m128i_s64(vreinterpretq_s64_m128d(a)); } // Blend packed single-precision (32-bit) floating-point elements from a and b // using mask, and store the results in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_blendv_ps FORCE_INLINE __m128 _mm_blendv_ps(__m128 a, __m128 b, __m128 mask) { return vreinterpretq_m128_f32(vbslq_f32(vreinterpretq_u32_m128(mask), vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(a))); } // Round the packed single-precision (32-bit) floating-point elements in a using // the rounding parameter, and store the results as packed single-precision // floating-point elements in dst. // software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_round_ps FORCE_INLINE __m128 _mm_round_ps(__m128 a, int rounding) { #if defined(__aarch64__) switch (rounding) { case (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC): return vreinterpretq_m128_f32(vrndnq_f32(vreinterpretq_f32_m128(a))); case (_MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC): return vreinterpretq_m128_f32(vrndmq_f32(vreinterpretq_f32_m128(a))); case (_MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC): return vreinterpretq_m128_f32(vrndpq_f32(vreinterpretq_f32_m128(a))); case (_MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC): return vreinterpretq_m128_f32(vrndq_f32(vreinterpretq_f32_m128(a))); default: //_MM_FROUND_CUR_DIRECTION return vreinterpretq_m128_f32(vrndiq_f32(vreinterpretq_f32_m128(a))); } #else float *v_float = (float *) &a; __m128 zero, neg_inf, pos_inf; switch (rounding) { case (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC): return _mm_cvtepi32_ps(_mm_cvtps_epi32(a)); case (_MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC): return (__m128){floorf(v_float[0]), floorf(v_float[1]), floorf(v_float[2]), floorf(v_float[3])}; case (_MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC): return (__m128){ceilf(v_float[0]), ceilf(v_float[1]), ceilf(v_float[2]), ceilf(v_float[3])}; case (_MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC): zero = _mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f); neg_inf = _mm_set_ps(floorf(v_float[0]), floorf(v_float[1]), floorf(v_float[2]), floorf(v_float[3])); pos_inf = _mm_set_ps(ceilf(v_float[0]), ceilf(v_float[1]), ceilf(v_float[2]), ceilf(v_float[3])); return _mm_blendv_ps(pos_inf, neg_inf, _mm_cmple_ps(a, zero)); default: //_MM_FROUND_CUR_DIRECTION return (__m128){roundf(v_float[0]), roundf(v_float[1]), roundf(v_float[2]), roundf(v_float[3])}; } #endif } // Convert packed single-precision (32-bit) floating-point elements in a to // packed 32-bit integers, and store the results in dst. // // FOR j := 0 to 1 // i := 32*j // dst[i+31:i] := Convert_FP32_To_Int32(a[i+31:i]) // ENDFOR // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvt_ps2pi FORCE_INLINE __m64 _mm_cvt_ps2pi(__m128 a) { #if defined(__aarch64__) return vreinterpret_m64_s32( vget_low_s32(vcvtnq_s32_f32(vreinterpretq_f32_m128(a)))); #else return vreinterpret_m64_s32( vcvt_s32_f32(vget_low_f32(vreinterpretq_f32_m128( _mm_round_ps(a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC))))); #endif } // Round the packed single-precision (32-bit) floating-point elements in a up to // an integer value, and store the results as packed single-precision // floating-point elements in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ceil_ps FORCE_INLINE __m128 _mm_ceil_ps(__m128 a) { return _mm_round_ps(a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); } // Round the packed single-precision (32-bit) floating-point elements in a down // to an integer value, and store the results as packed single-precision // floating-point elements in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_floor_ps FORCE_INLINE __m128 _mm_floor_ps(__m128 a) { return _mm_round_ps(a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); } // Load 128-bits of integer data from unaligned memory into dst. This intrinsic // may perform better than _mm_loadu_si128 when the data crosses a cache line // boundary. // // dst[127:0] := MEM[mem_addr+127:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_lddqu_si128 #define _mm_lddqu_si128 _mm_loadu_si128 /* Miscellaneous Operations */ // Shifts the 8 signed 16-bit integers in a right by count bits while shifting // in the sign bit. // // r0 := a0 >> count // r1 := a1 >> count // ... // r7 := a7 >> count // // https://msdn.microsoft.com/en-us/library/3c9997dk(v%3dvs.90).aspx FORCE_INLINE __m128i _mm_sra_epi16(__m128i a, __m128i count) { int64_t c = (int64_t) vget_low_s64((int64x2_t) count); if (c > 15) return _mm_cmplt_epi16(a, _mm_setzero_si128()); return vreinterpretq_m128i_s16(vshlq_s16((int16x8_t) a, vdupq_n_s16(-c))); } // Shifts the 4 signed 32-bit integers in a right by count bits while shifting // in the sign bit. // // r0 := a0 >> count // r1 := a1 >> count // r2 := a2 >> count // r3 := a3 >> count // // https://msdn.microsoft.com/en-us/library/ce40009e(v%3dvs.100).aspx FORCE_INLINE __m128i _mm_sra_epi32(__m128i a, __m128i count) { int64_t c = (int64_t) vget_low_s64((int64x2_t) count); if (c > 31) return _mm_cmplt_epi32(a, _mm_setzero_si128()); return vreinterpretq_m128i_s32(vshlq_s32((int32x4_t) a, vdupq_n_s32(-c))); } // Packs the 16 signed 16-bit integers from a and b into 8-bit integers and // saturates. // https://msdn.microsoft.com/en-us/library/k4y4f7w5%28v=vs.90%29.aspx FORCE_INLINE __m128i _mm_packs_epi16(__m128i a, __m128i b) { return vreinterpretq_m128i_s8( vcombine_s8(vqmovn_s16(vreinterpretq_s16_m128i(a)), vqmovn_s16(vreinterpretq_s16_m128i(b)))); } // Packs the 16 signed 16 - bit integers from a and b into 8 - bit unsigned // integers and saturates. // // r0 := UnsignedSaturate(a0) // r1 := UnsignedSaturate(a1) // ... // r7 := UnsignedSaturate(a7) // r8 := UnsignedSaturate(b0) // r9 := UnsignedSaturate(b1) // ... // r15 := UnsignedSaturate(b7) // // https://msdn.microsoft.com/en-us/library/07ad1wx4(v=vs.100).aspx FORCE_INLINE __m128i _mm_packus_epi16(const __m128i a, const __m128i b) { return vreinterpretq_m128i_u8( vcombine_u8(vqmovun_s16(vreinterpretq_s16_m128i(a)), vqmovun_s16(vreinterpretq_s16_m128i(b)))); } // Packs the 8 signed 32-bit integers from a and b into signed 16-bit integers // and saturates. // // r0 := SignedSaturate(a0) // r1 := SignedSaturate(a1) // r2 := SignedSaturate(a2) // r3 := SignedSaturate(a3) // r4 := SignedSaturate(b0) // r5 := SignedSaturate(b1) // r6 := SignedSaturate(b2) // r7 := SignedSaturate(b3) // // https://msdn.microsoft.com/en-us/library/393t56f9%28v=vs.90%29.aspx FORCE_INLINE __m128i _mm_packs_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_s16( vcombine_s16(vqmovn_s32(vreinterpretq_s32_m128i(a)), vqmovn_s32(vreinterpretq_s32_m128i(b)))); } // Packs the 8 unsigned 32-bit integers from a and b into unsigned 16-bit // integers and saturates. // // r0 := UnsignedSaturate(a0) // r1 := UnsignedSaturate(a1) // r2 := UnsignedSaturate(a2) // r3 := UnsignedSaturate(a3) // r4 := UnsignedSaturate(b0) // r5 := UnsignedSaturate(b1) // r6 := UnsignedSaturate(b2) // r7 := UnsignedSaturate(b3) FORCE_INLINE __m128i _mm_packus_epi32(__m128i a, __m128i b) { return vreinterpretq_m128i_u16( vcombine_u16(vqmovun_s32(vreinterpretq_s32_m128i(a)), vqmovun_s32(vreinterpretq_s32_m128i(b)))); } // Interleaves the lower 8 signed or unsigned 8-bit integers in a with the lower // 8 signed or unsigned 8-bit integers in b. // // r0 := a0 // r1 := b0 // r2 := a1 // r3 := b1 // ... // r14 := a7 // r15 := b7 // // https://msdn.microsoft.com/en-us/library/xf7k860c%28v=vs.90%29.aspx FORCE_INLINE __m128i _mm_unpacklo_epi8(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s8( vzip1q_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); #else int8x8_t a1 = vreinterpret_s8_s16(vget_low_s16(vreinterpretq_s16_m128i(a))); int8x8_t b1 = vreinterpret_s8_s16(vget_low_s16(vreinterpretq_s16_m128i(b))); int8x8x2_t result = vzip_s8(a1, b1); return vreinterpretq_m128i_s8(vcombine_s8(result.val[0], result.val[1])); #endif } // Interleaves the lower 4 signed or unsigned 16-bit integers in a with the // lower 4 signed or unsigned 16-bit integers in b. // // r0 := a0 // r1 := b0 // r2 := a1 // r3 := b1 // r4 := a2 // r5 := b2 // r6 := a3 // r7 := b3 // // https://msdn.microsoft.com/en-us/library/btxb17bw%28v=vs.90%29.aspx FORCE_INLINE __m128i _mm_unpacklo_epi16(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s16( vzip1q_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); #else int16x4_t a1 = vget_low_s16(vreinterpretq_s16_m128i(a)); int16x4_t b1 = vget_low_s16(vreinterpretq_s16_m128i(b)); int16x4x2_t result = vzip_s16(a1, b1); return vreinterpretq_m128i_s16(vcombine_s16(result.val[0], result.val[1])); #endif } // Interleaves the lower 2 signed or unsigned 32 - bit integers in a with the // lower 2 signed or unsigned 32 - bit integers in b. // // r0 := a0 // r1 := b0 // r2 := a1 // r3 := b1 // // https://msdn.microsoft.com/en-us/library/x8atst9d(v=vs.100).aspx FORCE_INLINE __m128i _mm_unpacklo_epi32(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s32( vzip1q_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); #else int32x2_t a1 = vget_low_s32(vreinterpretq_s32_m128i(a)); int32x2_t b1 = vget_low_s32(vreinterpretq_s32_m128i(b)); int32x2x2_t result = vzip_s32(a1, b1); return vreinterpretq_m128i_s32(vcombine_s32(result.val[0], result.val[1])); #endif } FORCE_INLINE __m128i _mm_unpacklo_epi64(__m128i a, __m128i b) { int64x1_t a_l = vget_low_s64(vreinterpretq_s64_m128i(a)); int64x1_t b_l = vget_low_s64(vreinterpretq_s64_m128i(b)); return vreinterpretq_m128i_s64(vcombine_s64(a_l, b_l)); } // Selects and interleaves the lower two single-precision, floating-point values // from a and b. // // r0 := a0 // r1 := b0 // r2 := a1 // r3 := b1 // // https://msdn.microsoft.com/en-us/library/25st103b%28v=vs.90%29.aspx FORCE_INLINE __m128 _mm_unpacklo_ps(__m128 a, __m128 b) { #if defined(__aarch64__) return vreinterpretq_m128_f32( vzip1q_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #else float32x2_t a1 = vget_low_f32(vreinterpretq_f32_m128(a)); float32x2_t b1 = vget_low_f32(vreinterpretq_f32_m128(b)); float32x2x2_t result = vzip_f32(a1, b1); return vreinterpretq_m128_f32(vcombine_f32(result.val[0], result.val[1])); #endif } // Selects and interleaves the upper two single-precision, floating-point values // from a and b. // // r0 := a2 // r1 := b2 // r2 := a3 // r3 := b3 // // https://msdn.microsoft.com/en-us/library/skccxx7d%28v=vs.90%29.aspx FORCE_INLINE __m128 _mm_unpackhi_ps(__m128 a, __m128 b) { #if defined(__aarch64__) return vreinterpretq_m128_f32( vzip2q_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); #else float32x2_t a1 = vget_high_f32(vreinterpretq_f32_m128(a)); float32x2_t b1 = vget_high_f32(vreinterpretq_f32_m128(b)); float32x2x2_t result = vzip_f32(a1, b1); return vreinterpretq_m128_f32(vcombine_f32(result.val[0], result.val[1])); #endif } // Interleaves the upper 8 signed or unsigned 8-bit integers in a with the upper // 8 signed or unsigned 8-bit integers in b. // // r0 := a8 // r1 := b8 // r2 := a9 // r3 := b9 // ... // r14 := a15 // r15 := b15 // // https://msdn.microsoft.com/en-us/library/t5h7783k(v=vs.100).aspx FORCE_INLINE __m128i _mm_unpackhi_epi8(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s8( vzip2q_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); #else int8x8_t a1 = vreinterpret_s8_s16(vget_high_s16(vreinterpretq_s16_m128i(a))); int8x8_t b1 = vreinterpret_s8_s16(vget_high_s16(vreinterpretq_s16_m128i(b))); int8x8x2_t result = vzip_s8(a1, b1); return vreinterpretq_m128i_s8(vcombine_s8(result.val[0], result.val[1])); #endif } // Interleaves the upper 4 signed or unsigned 16-bit integers in a with the // upper 4 signed or unsigned 16-bit integers in b. // // r0 := a4 // r1 := b4 // r2 := a5 // r3 := b5 // r4 := a6 // r5 := b6 // r6 := a7 // r7 := b7 // // https://msdn.microsoft.com/en-us/library/03196cz7(v=vs.100).aspx FORCE_INLINE __m128i _mm_unpackhi_epi16(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s16( vzip2q_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); #else int16x4_t a1 = vget_high_s16(vreinterpretq_s16_m128i(a)); int16x4_t b1 = vget_high_s16(vreinterpretq_s16_m128i(b)); int16x4x2_t result = vzip_s16(a1, b1); return vreinterpretq_m128i_s16(vcombine_s16(result.val[0], result.val[1])); #endif } // Interleaves the upper 2 signed or unsigned 32-bit integers in a with the // upper 2 signed or unsigned 32-bit integers in b. // https://msdn.microsoft.com/en-us/library/65sa7cbs(v=vs.100).aspx FORCE_INLINE __m128i _mm_unpackhi_epi32(__m128i a, __m128i b) { #if defined(__aarch64__) return vreinterpretq_m128i_s32( vzip2q_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); #else int32x2_t a1 = vget_high_s32(vreinterpretq_s32_m128i(a)); int32x2_t b1 = vget_high_s32(vreinterpretq_s32_m128i(b)); int32x2x2_t result = vzip_s32(a1, b1); return vreinterpretq_m128i_s32(vcombine_s32(result.val[0], result.val[1])); #endif } // Interleaves the upper signed or unsigned 64-bit integer in a with the // upper signed or unsigned 64-bit integer in b. // // r0 := a1 // r1 := b1 FORCE_INLINE __m128i _mm_unpackhi_epi64(__m128i a, __m128i b) { int64x1_t a_h = vget_high_s64(vreinterpretq_s64_m128i(a)); int64x1_t b_h = vget_high_s64(vreinterpretq_s64_m128i(b)); return vreinterpretq_m128i_s64(vcombine_s64(a_h, b_h)); } // Horizontally compute the minimum amongst the packed unsigned 16-bit integers // in a, store the minimum and index in dst, and zero the remaining bits in dst. // // index[2:0] := 0 // min[15:0] := a[15:0] // FOR j := 0 to 7 // i := j*16 // IF a[i+15:i] < min[15:0] // index[2:0] := j // min[15:0] := a[i+15:i] // FI // ENDFOR // dst[15:0] := min[15:0] // dst[18:16] := index[2:0] // dst[127:19] := 0 // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_minpos_epu16 FORCE_INLINE __m128i _mm_minpos_epu16(__m128i a) { __m128i dst; uint16_t min, idx = 0; // Find the minimum value #if defined(__aarch64__) min = vminvq_u16(vreinterpretq_u16_m128i(a)); #else __m64 tmp; tmp = vreinterpret_m64_u16( vmin_u16(vget_low_u16(vreinterpretq_u16_m128i(a)), vget_high_u16(vreinterpretq_u16_m128i(a)))); tmp = vreinterpret_m64_u16( vpmin_u16(vreinterpret_u16_m64(tmp), vreinterpret_u16_m64(tmp))); tmp = vreinterpret_m64_u16( vpmin_u16(vreinterpret_u16_m64(tmp), vreinterpret_u16_m64(tmp))); min = vget_lane_u16(vreinterpret_u16_m64(tmp), 0); #endif // Get the index of the minimum value int i; for (i = 0; i < 8; i++) { if (min == vgetq_lane_u16(vreinterpretq_u16_m128i(a), 0)) { idx = (uint16_t) i; break; } a = _mm_srli_si128(a, 2); } // Generate result dst = _mm_setzero_si128(); dst = vreinterpretq_m128i_u16( vsetq_lane_u16(min, vreinterpretq_u16_m128i(dst), 0)); dst = vreinterpretq_m128i_u16( vsetq_lane_u16(idx, vreinterpretq_u16_m128i(dst), 1)); return dst; } // shift to right // https://msdn.microsoft.com/en-us/library/bb514041(v=vs.120).aspx // http://blog.csdn.net/hemmingway/article/details/44828303 // Clang requires a macro here, as it is extremely picky about c being a // literal. #define _mm_alignr_epi8(a, b, c) \ ((__m128i) vextq_s8((int8x16_t)(b), (int8x16_t)(a), (c))) // Compute the bitwise AND of 128 bits (representing integer data) in a and b, // and set ZF to 1 if the result is zero, otherwise set ZF to 0. Compute the // bitwise NOT of a and then AND with b, and set CF to 1 if the result is zero, // otherwise set CF to 0. Return the CF value. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_testc_si128 FORCE_INLINE int _mm_testc_si128(__m128i a, __m128i b) { int64x2_t s64 = vandq_s64(vreinterpretq_s64_s32(vmvnq_s32(vreinterpretq_s32_m128i(a))), vreinterpretq_s64_m128i(b)); return !(vgetq_lane_s64(s64, 0) | vgetq_lane_s64(s64, 1)); } // Compute the bitwise AND of 128 bits (representing integer data) in a and b, // and set ZF to 1 if the result is zero, otherwise set ZF to 0. Compute the // bitwise NOT of a and then AND with b, and set CF to 1 if the result is zero, // otherwise set CF to 0. Return the ZF value. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_testz_si128 FORCE_INLINE int _mm_testz_si128(__m128i a, __m128i b) { int64x2_t s64 = vandq_s64(vreinterpretq_s64_m128i(a), vreinterpretq_s64_m128i(b)); return !(vgetq_lane_s64(s64, 0) | vgetq_lane_s64(s64, 1)); } // Extracts the selected signed or unsigned 8-bit integer from a and zero // extends. // FORCE_INLINE int _mm_extract_epi8(__m128i a, __constrange(0,16) int imm) #define _mm_extract_epi8(a, imm) vgetq_lane_u8(vreinterpretq_u8_m128i(a), (imm)) // Inserts the least significant 8 bits of b into the selected 8-bit integer // of a. // FORCE_INLINE __m128i _mm_insert_epi8(__m128i a, int b, // __constrange(0,16) int imm) #define _mm_insert_epi8(a, b, imm) \ __extension__({ \ vreinterpretq_m128i_s8( \ vsetq_lane_s8((b), vreinterpretq_s8_m128i(a), (imm))); \ }) // Extracts the selected signed or unsigned 16-bit integer from a and zero // extends. // https://msdn.microsoft.com/en-us/library/6dceta0c(v=vs.100).aspx // FORCE_INLINE int _mm_extract_epi16(__m128i a, __constrange(0,8) int imm) #define _mm_extract_epi16(a, imm) \ vgetq_lane_u16(vreinterpretq_u16_m128i(a), (imm)) // Inserts the least significant 16 bits of b into the selected 16-bit integer // of a. // https://msdn.microsoft.com/en-us/library/kaze8hz1%28v=vs.100%29.aspx // FORCE_INLINE __m128i _mm_insert_epi16(__m128i a, int b, // __constrange(0,8) int imm) #define _mm_insert_epi16(a, b, imm) \ __extension__({ \ vreinterpretq_m128i_s16( \ vsetq_lane_s16((b), vreinterpretq_s16_m128i(a), (imm))); \ }) // Extracts the selected signed or unsigned 32-bit integer from a and zero // extends. // FORCE_INLINE int _mm_extract_epi32(__m128i a, __constrange(0,4) int imm) #define _mm_extract_epi32(a, imm) \ vgetq_lane_s32(vreinterpretq_s32_m128i(a), (imm)) // Extracts the selected single-precision (32-bit) floating-point from a. // FORCE_INLINE int _mm_extract_ps(__m128 a, __constrange(0,4) int imm) #define _mm_extract_ps(a, imm) vgetq_lane_s32(vreinterpretq_s32_m128(a), (imm)) // Inserts the least significant 32 bits of b into the selected 32-bit integer // of a. // FORCE_INLINE __m128i _mm_insert_epi32(__m128i a, int b, // __constrange(0,4) int imm) #define _mm_insert_epi32(a, b, imm) \ __extension__({ \ vreinterpretq_m128i_s32( \ vsetq_lane_s32((b), vreinterpretq_s32_m128i(a), (imm))); \ }) // Extracts the selected signed or unsigned 64-bit integer from a and zero // extends. // FORCE_INLINE __int64 _mm_extract_epi64(__m128i a, __constrange(0,2) int imm) #define _mm_extract_epi64(a, imm) \ vgetq_lane_s64(vreinterpretq_s64_m128i(a), (imm)) // Inserts the least significant 64 bits of b into the selected 64-bit integer // of a. // FORCE_INLINE __m128i _mm_insert_epi64(__m128i a, __int64 b, // __constrange(0,2) int imm) #define _mm_insert_epi64(a, b, imm) \ __extension__({ \ vreinterpretq_m128i_s64( \ vsetq_lane_s64((b), vreinterpretq_s64_m128i(a), (imm))); \ }) // Count the number of bits set to 1 in unsigned 32-bit integer a, and // return that count in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_popcnt_u32 FORCE_INLINE int _mm_popcnt_u32(unsigned int a) { #if defined(__aarch64__) #if __has_builtin(__builtin_popcount) return __builtin_popcount(a); #else return (int) vaddlv_u8(vcnt_u8(vcreate_u8((uint64_t) a))); #endif #else uint32_t count = 0; uint8x8_t input_val, count8x8_val; uint16x4_t count16x4_val; uint32x2_t count32x2_val; input_val = vld1_u8((uint8_t *) &a); count8x8_val = vcnt_u8(input_val); count16x4_val = vpaddl_u8(count8x8_val); count32x2_val = vpaddl_u16(count16x4_val); vst1_u32(&count, count32x2_val); return count; #endif } // Count the number of bits set to 1 in unsigned 64-bit integer a, and // return that count in dst. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_popcnt_u64 FORCE_INLINE int64_t _mm_popcnt_u64(uint64_t a) { #if defined(__aarch64__) #if __has_builtin(__builtin_popcountll) return __builtin_popcountll(a); #else return (int64_t) vaddlv_u8(vcnt_u8(vcreate_u8(a))); #endif #else uint64_t count = 0; uint8x8_t input_val, count8x8_val; uint16x4_t count16x4_val; uint32x2_t count32x2_val; uint64x1_t count64x1_val; input_val = vld1_u8((uint8_t *) &a); count8x8_val = vcnt_u8(input_val); count16x4_val = vpaddl_u8(count8x8_val); count32x2_val = vpaddl_u16(count16x4_val); count64x1_val = vpaddl_u32(count32x2_val); vst1_u64(&count, count64x1_val); return count; #endif } // Macro: Transpose the 4x4 matrix formed by the 4 rows of single-precision // (32-bit) floating-point elements in row0, row1, row2, and row3, and store the // transposed matrix in these vectors (row0 now contains column 0, etc.). // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=MM_TRANSPOSE4_PS #define _MM_TRANSPOSE4_PS(row0, row1, row2, row3) \ do { \ float32x4x2_t ROW01 = vtrnq_f32(row0, row1); \ float32x4x2_t ROW23 = vtrnq_f32(row2, row3); \ row0 = vcombine_f32(vget_low_f32(ROW01.val[0]), \ vget_low_f32(ROW23.val[0])); \ row1 = vcombine_f32(vget_low_f32(ROW01.val[1]), \ vget_low_f32(ROW23.val[1])); \ row2 = vcombine_f32(vget_high_f32(ROW01.val[0]), \ vget_high_f32(ROW23.val[0])); \ row3 = vcombine_f32(vget_high_f32(ROW01.val[1]), \ vget_high_f32(ROW23.val[1])); \ } while (0) /* Crypto Extensions */ #if defined(__ARM_FEATURE_CRYPTO) // Wraps vmull_p64 FORCE_INLINE uint64x2_t _sse2neon_vmull_p64(uint64x1_t _a, uint64x1_t _b) { poly64_t a = vget_lane_p64(vreinterpret_p64_u64(_a), 0); poly64_t b = vget_lane_p64(vreinterpret_p64_u64(_b), 0); return vreinterpretq_u64_p128(vmull_p64(a, b)); } #else // ARMv7 polyfill // ARMv7/some A64 lacks vmull_p64, but it has vmull_p8. // // vmull_p8 calculates 8 8-bit->16-bit polynomial multiplies, but we need a // 64-bit->128-bit polynomial multiply. // // It needs some work and is somewhat slow, but it is still faster than all // known scalar methods. // // Algorithm adapted to C from // https://www.workofard.com/2017/07/ghash-for-low-end-cores/, which is adapted // from "Fast Software Polynomial Multiplication on ARM Processors Using the // NEON Engine" by Danilo Camara, Conrado Gouvea, Julio Lopez and Ricardo Dahab // (https://hal.inria.fr/hal-01506572) static uint64x2_t _sse2neon_vmull_p64(uint64x1_t _a, uint64x1_t _b) { poly8x8_t a = vreinterpret_p8_u64(_a); poly8x8_t b = vreinterpret_p8_u64(_b); // Masks uint8x16_t k48_32 = vcombine_u8(vcreate_u8(0x0000ffffffffffff), vcreate_u8(0x00000000ffffffff)); uint8x16_t k16_00 = vcombine_u8(vcreate_u8(0x000000000000ffff), vcreate_u8(0x0000000000000000)); // Do the multiplies, rotating with vext to get all combinations uint8x16_t d = vreinterpretq_u8_p16(vmull_p8(a, b)); // D = A0 * B0 uint8x16_t e = vreinterpretq_u8_p16(vmull_p8(a, vext_p8(b, b, 1))); // E = A0 * B1 uint8x16_t f = vreinterpretq_u8_p16(vmull_p8(vext_p8(a, a, 1), b)); // F = A1 * B0 uint8x16_t g = vreinterpretq_u8_p16(vmull_p8(a, vext_p8(b, b, 2))); // G = A0 * B2 uint8x16_t h = vreinterpretq_u8_p16(vmull_p8(vext_p8(a, a, 2), b)); // H = A2 * B0 uint8x16_t i = vreinterpretq_u8_p16(vmull_p8(a, vext_p8(b, b, 3))); // I = A0 * B3 uint8x16_t j = vreinterpretq_u8_p16(vmull_p8(vext_p8(a, a, 3), b)); // J = A3 * B0 uint8x16_t k = vreinterpretq_u8_p16(vmull_p8(a, vext_p8(b, b, 4))); // L = A0 * B4 // Add cross products uint8x16_t l = veorq_u8(e, f); // L = E + F uint8x16_t m = veorq_u8(g, h); // M = G + H uint8x16_t n = veorq_u8(i, j); // N = I + J // Interleave. Using vzip1 and vzip2 prevents Clang from emitting TBL // instructions. #if defined(__aarch64__) uint8x16_t lm_p0 = vreinterpretq_u8_u64( vzip1q_u64(vreinterpretq_u64_u8(l), vreinterpretq_u64_u8(m))); uint8x16_t lm_p1 = vreinterpretq_u8_u64( vzip2q_u64(vreinterpretq_u64_u8(l), vreinterpretq_u64_u8(m))); uint8x16_t nk_p0 = vreinterpretq_u8_u64( vzip1q_u64(vreinterpretq_u64_u8(n), vreinterpretq_u64_u8(k))); uint8x16_t nk_p1 = vreinterpretq_u8_u64( vzip2q_u64(vreinterpretq_u64_u8(n), vreinterpretq_u64_u8(k))); #else uint8x16_t lm_p0 = vcombine_u8(vget_low_u8(l), vget_low_u8(m)); uint8x16_t lm_p1 = vcombine_u8(vget_high_u8(l), vget_high_u8(m)); uint8x16_t nk_p0 = vcombine_u8(vget_low_u8(n), vget_low_u8(k)); uint8x16_t nk_p1 = vcombine_u8(vget_high_u8(n), vget_high_u8(k)); #endif // t0 = (L) (P0 + P1) << 8 // t1 = (M) (P2 + P3) << 16 uint8x16_t t0t1_tmp = veorq_u8(lm_p0, lm_p1); uint8x16_t t0t1_h = vandq_u8(lm_p1, k48_32); uint8x16_t t0t1_l = veorq_u8(t0t1_tmp, t0t1_h); // t2 = (N) (P4 + P5) << 24 // t3 = (K) (P6 + P7) << 32 uint8x16_t t2t3_tmp = veorq_u8(nk_p0, nk_p1); uint8x16_t t2t3_h = vandq_u8(nk_p1, k16_00); uint8x16_t t2t3_l = veorq_u8(t2t3_tmp, t2t3_h); // De-interleave #if defined(__aarch64__) uint8x16_t t0 = vreinterpretq_u8_u64( vuzp1q_u64(vreinterpretq_u64_u8(t0t1_l), vreinterpretq_u64_u8(t0t1_h))); uint8x16_t t1 = vreinterpretq_u8_u64( vuzp2q_u64(vreinterpretq_u64_u8(t0t1_l), vreinterpretq_u64_u8(t0t1_h))); uint8x16_t t2 = vreinterpretq_u8_u64( vuzp1q_u64(vreinterpretq_u64_u8(t2t3_l), vreinterpretq_u64_u8(t2t3_h))); uint8x16_t t3 = vreinterpretq_u8_u64( vuzp2q_u64(vreinterpretq_u64_u8(t2t3_l), vreinterpretq_u64_u8(t2t3_h))); #else uint8x16_t t1 = vcombine_u8(vget_high_u8(t0t1_l), vget_high_u8(t0t1_h)); uint8x16_t t0 = vcombine_u8(vget_low_u8(t0t1_l), vget_low_u8(t0t1_h)); uint8x16_t t3 = vcombine_u8(vget_high_u8(t2t3_l), vget_high_u8(t2t3_h)); uint8x16_t t2 = vcombine_u8(vget_low_u8(t2t3_l), vget_low_u8(t2t3_h)); #endif // Shift the cross products uint8x16_t t0_shift = vextq_u8(t0, t0, 15); // t0 << 8 uint8x16_t t1_shift = vextq_u8(t1, t1, 14); // t1 << 16 uint8x16_t t2_shift = vextq_u8(t2, t2, 13); // t2 << 24 uint8x16_t t3_shift = vextq_u8(t3, t3, 12); // t3 << 32 // Accumulate the products uint8x16_t cross1 = veorq_u8(t0_shift, t1_shift); uint8x16_t cross2 = veorq_u8(t2_shift, t3_shift); uint8x16_t mix = veorq_u8(d, cross1); uint8x16_t r = veorq_u8(mix, cross2); return vreinterpretq_u64_u8(r); } #endif // ARMv7 polyfill FORCE_INLINE __m128i _mm_clmulepi64_si128(__m128i _a, __m128i _b, const int imm) { uint64x2_t a = vreinterpretq_u64_m128i(_a); uint64x2_t b = vreinterpretq_u64_m128i(_b); switch (imm & 0x11) { case 0x00: return vreinterpretq_m128i_u64( _sse2neon_vmull_p64(vget_low_u64(a), vget_low_u64(b))); case 0x01: return vreinterpretq_m128i_u64( _sse2neon_vmull_p64(vget_high_u64(a), vget_low_u64(b))); case 0x10: return vreinterpretq_m128i_u64( _sse2neon_vmull_p64(vget_low_u64(a), vget_high_u64(b))); case 0x11: return vreinterpretq_m128i_u64( _sse2neon_vmull_p64(vget_high_u64(a), vget_high_u64(b))); default: abort(); } } #if !defined(__ARM_FEATURE_CRYPTO) /* clang-format off */ #define SSE2NEON_AES_DATA(w) \ { \ w(0x63), w(0x7c), w(0x77), w(0x7b), w(0xf2), w(0x6b), w(0x6f), \ w(0xc5), w(0x30), w(0x01), w(0x67), w(0x2b), w(0xfe), w(0xd7), \ w(0xab), w(0x76), w(0xca), w(0x82), w(0xc9), w(0x7d), w(0xfa), \ w(0x59), w(0x47), w(0xf0), w(0xad), w(0xd4), w(0xa2), w(0xaf), \ w(0x9c), w(0xa4), w(0x72), w(0xc0), w(0xb7), w(0xfd), w(0x93), \ w(0x26), w(0x36), w(0x3f), w(0xf7), w(0xcc), w(0x34), w(0xa5), \ w(0xe5), w(0xf1), w(0x71), w(0xd8), w(0x31), w(0x15), w(0x04), \ w(0xc7), w(0x23), w(0xc3), w(0x18), w(0x96), w(0x05), w(0x9a), \ w(0x07), w(0x12), w(0x80), w(0xe2), w(0xeb), w(0x27), w(0xb2), \ w(0x75), w(0x09), w(0x83), w(0x2c), w(0x1a), w(0x1b), w(0x6e), \ w(0x5a), w(0xa0), w(0x52), w(0x3b), w(0xd6), w(0xb3), w(0x29), \ w(0xe3), w(0x2f), w(0x84), w(0x53), w(0xd1), w(0x00), w(0xed), \ w(0x20), w(0xfc), w(0xb1), w(0x5b), w(0x6a), w(0xcb), w(0xbe), \ w(0x39), w(0x4a), w(0x4c), w(0x58), w(0xcf), w(0xd0), w(0xef), \ w(0xaa), w(0xfb), w(0x43), w(0x4d), w(0x33), w(0x85), w(0x45), \ w(0xf9), w(0x02), w(0x7f), w(0x50), w(0x3c), w(0x9f), w(0xa8), \ w(0x51), w(0xa3), w(0x40), w(0x8f), w(0x92), w(0x9d), w(0x38), \ w(0xf5), w(0xbc), w(0xb6), w(0xda), w(0x21), w(0x10), w(0xff), \ w(0xf3), w(0xd2), w(0xcd), w(0x0c), w(0x13), w(0xec), w(0x5f), \ w(0x97), w(0x44), w(0x17), w(0xc4), w(0xa7), w(0x7e), w(0x3d), \ w(0x64), w(0x5d), w(0x19), w(0x73), w(0x60), w(0x81), w(0x4f), \ w(0xdc), w(0x22), w(0x2a), w(0x90), w(0x88), w(0x46), w(0xee), \ w(0xb8), w(0x14), w(0xde), w(0x5e), w(0x0b), w(0xdb), w(0xe0), \ w(0x32), w(0x3a), w(0x0a), w(0x49), w(0x06), w(0x24), w(0x5c), \ w(0xc2), w(0xd3), w(0xac), w(0x62), w(0x91), w(0x95), w(0xe4), \ w(0x79), w(0xe7), w(0xc8), w(0x37), w(0x6d), w(0x8d), w(0xd5), \ w(0x4e), w(0xa9), w(0x6c), w(0x56), w(0xf4), w(0xea), w(0x65), \ w(0x7a), w(0xae), w(0x08), w(0xba), w(0x78), w(0x25), w(0x2e), \ w(0x1c), w(0xa6), w(0xb4), w(0xc6), w(0xe8), w(0xdd), w(0x74), \ w(0x1f), w(0x4b), w(0xbd), w(0x8b), w(0x8a), w(0x70), w(0x3e), \ w(0xb5), w(0x66), w(0x48), w(0x03), w(0xf6), w(0x0e), w(0x61), \ w(0x35), w(0x57), w(0xb9), w(0x86), w(0xc1), w(0x1d), w(0x9e), \ w(0xe1), w(0xf8), w(0x98), w(0x11), w(0x69), w(0xd9), w(0x8e), \ w(0x94), w(0x9b), w(0x1e), w(0x87), w(0xe9), w(0xce), w(0x55), \ w(0x28), w(0xdf), w(0x8c), w(0xa1), w(0x89), w(0x0d), w(0xbf), \ w(0xe6), w(0x42), w(0x68), w(0x41), w(0x99), w(0x2d), w(0x0f), \ w(0xb0), w(0x54), w(0xbb), w(0x16) \ } /* clang-format on */ /* X Macro trick. See https://en.wikipedia.org/wiki/X_Macro */ #define SSE2NEON_AES_H0(x) (x) static const uint8_t SSE2NEON_sbox[256] = SSE2NEON_AES_DATA(SSE2NEON_AES_H0); #undef SSE2NEON_AES_H0 // In the absence of crypto extensions, implement aesenc using regular neon // intrinsics instead. See: // https://www.workofard.com/2017/01/accelerated-aes-for-the-arm64-linux-kernel/ // https://www.workofard.com/2017/07/ghash-for-low-end-cores/ and // https://github.com/ColinIanKing/linux-next-mirror/blob/b5f466091e130caaf0735976648f72bd5e09aa84/crypto/aegis128-neon-inner.c#L52 // for more information Reproduced with permission of the author. FORCE_INLINE __m128i _mm_aesenc_si128(__m128i EncBlock, __m128i RoundKey) { #if defined(__aarch64__) static const uint8_t shift_rows[] = {0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3, 0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb}; static const uint8_t ror32by8[] = {0x1, 0x2, 0x3, 0x0, 0x5, 0x6, 0x7, 0x4, 0x9, 0xa, 0xb, 0x8, 0xd, 0xe, 0xf, 0xc}; uint8x16_t v; uint8x16_t w = vreinterpretq_u8_m128i(EncBlock); // shift rows w = vqtbl1q_u8(w, vld1q_u8(shift_rows)); // sub bytes v = vqtbl4q_u8(vld1q_u8_x4(SSE2NEON_sbox), w); v = vqtbx4q_u8(v, vld1q_u8_x4(SSE2NEON_sbox + 0x40), w - 0x40); v = vqtbx4q_u8(v, vld1q_u8_x4(SSE2NEON_sbox + 0x80), w - 0x80); v = vqtbx4q_u8(v, vld1q_u8_x4(SSE2NEON_sbox + 0xc0), w - 0xc0); // mix columns w = (v << 1) ^ (uint8x16_t)(((int8x16_t) v >> 7) & 0x1b); w ^= (uint8x16_t) vrev32q_u16((uint16x8_t) v); w ^= vqtbl1q_u8(v ^ w, vld1q_u8(ror32by8)); // add round key return vreinterpretq_m128i_u8(w) ^ RoundKey; #else /* ARMv7-A NEON implementation */ #define SSE2NEON_AES_B2W(b0, b1, b2, b3) \ (((uint32_t)(b3) << 24) | ((uint32_t)(b2) << 16) | ((uint32_t)(b1) << 8) | \ (b0)) #define SSE2NEON_AES_F2(x) ((x << 1) ^ (((x >> 7) & 1) * 0x011b /* WPOLY */)) #define SSE2NEON_AES_F3(x) (SSE2NEON_AES_F2(x) ^ x) #define SSE2NEON_AES_U0(p) \ SSE2NEON_AES_B2W(SSE2NEON_AES_F2(p), p, p, SSE2NEON_AES_F3(p)) #define SSE2NEON_AES_U1(p) \ SSE2NEON_AES_B2W(SSE2NEON_AES_F3(p), SSE2NEON_AES_F2(p), p, p) #define SSE2NEON_AES_U2(p) \ SSE2NEON_AES_B2W(p, SSE2NEON_AES_F3(p), SSE2NEON_AES_F2(p), p) #define SSE2NEON_AES_U3(p) \ SSE2NEON_AES_B2W(p, p, SSE2NEON_AES_F3(p), SSE2NEON_AES_F2(p)) static const uint32_t ALIGN_STRUCT(16) aes_table[4][256] = { SSE2NEON_AES_DATA(SSE2NEON_AES_U0), SSE2NEON_AES_DATA(SSE2NEON_AES_U1), SSE2NEON_AES_DATA(SSE2NEON_AES_U2), SSE2NEON_AES_DATA(SSE2NEON_AES_U3), }; #undef SSE2NEON_AES_B2W #undef SSE2NEON_AES_F2 #undef SSE2NEON_AES_F3 #undef SSE2NEON_AES_U0 #undef SSE2NEON_AES_U1 #undef SSE2NEON_AES_U2 #undef SSE2NEON_AES_U3 uint32_t x0 = _mm_cvtsi128_si32(EncBlock); uint32_t x1 = _mm_cvtsi128_si32(_mm_shuffle_epi32(EncBlock, 0x55)); uint32_t x2 = _mm_cvtsi128_si32(_mm_shuffle_epi32(EncBlock, 0xAA)); uint32_t x3 = _mm_cvtsi128_si32(_mm_shuffle_epi32(EncBlock, 0xFF)); __m128i out = _mm_set_epi32( (aes_table[0][x3 & 0xff] ^ aes_table[1][(x0 >> 8) & 0xff] ^ aes_table[2][(x1 >> 16) & 0xff] ^ aes_table[3][x2 >> 24]), (aes_table[0][x2 & 0xff] ^ aes_table[1][(x3 >> 8) & 0xff] ^ aes_table[2][(x0 >> 16) & 0xff] ^ aes_table[3][x1 >> 24]), (aes_table[0][x1 & 0xff] ^ aes_table[1][(x2 >> 8) & 0xff] ^ aes_table[2][(x3 >> 16) & 0xff] ^ aes_table[3][x0 >> 24]), (aes_table[0][x0 & 0xff] ^ aes_table[1][(x1 >> 8) & 0xff] ^ aes_table[2][(x2 >> 16) & 0xff] ^ aes_table[3][x3 >> 24])); return _mm_xor_si128(out, RoundKey); #endif } FORCE_INLINE __m128i _mm_aesenclast_si128(__m128i a, __m128i RoundKey) { /* FIXME: optimized for NEON */ uint8_t v[4][4] = { [0] = {SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 0)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 5)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 10)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 15)]}, [1] = {SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 4)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 9)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 14)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 3)]}, [2] = {SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 8)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 13)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 2)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 7)]}, [3] = {SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 12)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 1)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 6)], SSE2NEON_sbox[vreinterpretq_nth_u8_m128i(a, 11)]}, }; for (int i = 0; i < 16; i++) vreinterpretq_nth_u8_m128i(a, i) = v[i / 4][i % 4] ^ vreinterpretq_nth_u8_m128i(RoundKey, i); return a; } // Emits the Advanced Encryption Standard (AES) instruction aeskeygenassist. // This instruction generates a round key for AES encryption. See // https://kazakov.life/2017/11/01/cryptocurrency-mining-on-ios-devices/ // for details. // // https://msdn.microsoft.com/en-us/library/cc714138(v=vs.120).aspx FORCE_INLINE __m128i _mm_aeskeygenassist_si128(__m128i key, const int rcon) { uint32_t X1 = _mm_cvtsi128_si32(_mm_shuffle_epi32(key, 0x55)); uint32_t X3 = _mm_cvtsi128_si32(_mm_shuffle_epi32(key, 0xFF)); for (int i = 0; i < 4; ++i) { ((uint8_t *) &X1)[i] = SSE2NEON_sbox[((uint8_t *) &X1)[i]]; ((uint8_t *) &X3)[i] = SSE2NEON_sbox[((uint8_t *) &X3)[i]]; } return _mm_set_epi32(((X3 >> 8) | (X3 << 24)) ^ rcon, X3, ((X1 >> 8) | (X1 << 24)) ^ rcon, X1); } #undef SSE2NEON_AES_DATA #else /* __ARM_FEATURE_CRYPTO */ // Implements equivalent of 'aesenc' by combining AESE (with an empty key) and // AESMC and then manually applying the real key as an xor operation. This // unfortunately means an additional xor op; the compiler should be able to // optimize this away for repeated calls however. See // https://blog.michaelbrase.com/2018/05/08/emulating-x86-aes-intrinsics-on-armv8-a // for more details. FORCE_INLINE __m128i _mm_aesenc_si128(__m128i a, __m128i b) { return vreinterpretq_m128i_u8( vaesmcq_u8(vaeseq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0))) ^ vreinterpretq_u8_m128i(b)); } // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_aesenclast_si128 FORCE_INLINE __m128i _mm_aesenclast_si128(__m128i a, __m128i RoundKey) { return _mm_xor_si128(vreinterpretq_m128i_u8(vaeseq_u8( vreinterpretq_u8_m128i(a), vdupq_n_u8(0))), RoundKey); } FORCE_INLINE __m128i _mm_aeskeygenassist_si128(__m128i a, const int rcon) { // AESE does ShiftRows and SubBytes on A uint8x16_t u8 = vaeseq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0)); uint8x16_t dest = { // Undo ShiftRows step from AESE and extract X1 and X3 u8[0x4], u8[0x1], u8[0xE], u8[0xB], // SubBytes(X1) u8[0x1], u8[0xE], u8[0xB], u8[0x4], // ROT(SubBytes(X1)) u8[0xC], u8[0x9], u8[0x6], u8[0x3], // SubBytes(X3) u8[0x9], u8[0x6], u8[0x3], u8[0xC], // ROT(SubBytes(X3)) }; uint32x4_t r = {0, (unsigned) rcon, 0, (unsigned) rcon}; return vreinterpretq_m128i_u8(dest) ^ vreinterpretq_m128i_u32(r); } #endif /* Streaming Extensions */ // Guarantees that every preceding store is globally visible before any // subsequent store. // https://msdn.microsoft.com/en-us/library/5h2w73d1%28v=vs.90%29.aspx FORCE_INLINE void _mm_sfence(void) { __sync_synchronize(); } // Store 128-bits (composed of 4 packed single-precision (32-bit) floating- // point elements) from a into memory using a non-temporal memory hint. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_stream_ps FORCE_INLINE void _mm_stream_ps(float *p, __m128 a) { #if __has_builtin(__builtin_nontemporal_store) __builtin_nontemporal_store(a, (float32x4_t *) p); #else vst1q_f32(p, vreinterpretq_f32_m128(a)); #endif } // Stores the data in a to the address p without polluting the caches. If the // cache line containing address p is already in the cache, the cache will be // updated. // https://msdn.microsoft.com/en-us/library/ba08y07y%28v=vs.90%29.aspx FORCE_INLINE void _mm_stream_si128(__m128i *p, __m128i a) { #if __has_builtin(__builtin_nontemporal_store) __builtin_nontemporal_store(a, p); #else vst1q_s64((int64_t *) p, vreinterpretq_s64_m128i(a)); #endif } // Load 128-bits of integer data from memory into dst using a non-temporal // memory hint. mem_addr must be aligned on a 16-byte boundary or a // general-protection exception may be generated. // // dst[127:0] := MEM[mem_addr+127:mem_addr] // // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_stream_load_si128 FORCE_INLINE __m128i _mm_stream_load_si128(__m128i *p) { #if __has_builtin(__builtin_nontemporal_store) return __builtin_nontemporal_load(p); #else return vreinterpretq_m128i_s64(vld1q_s64((int64_t *) p)); #endif } // Cache line containing p is flushed and invalidated from all caches in the // coherency domain. : // https://msdn.microsoft.com/en-us/library/ba08y07y(v=vs.100).aspx FORCE_INLINE void _mm_clflush(void const *p) { (void) p; // no corollary for Neon? } // Allocate aligned blocks of memory. // https://software.intel.com/en-us/ // cpp-compiler-developer-guide-and-reference-allocating-and-freeing-aligned-memory-blocks FORCE_INLINE void *_mm_malloc(size_t size, size_t align) { void *ptr; if (align == 1) return malloc(size); if (align == 2 || (sizeof(void *) == 8 && align == 4)) align = sizeof(void *); if (!posix_memalign(&ptr, align, size)) return ptr; return NULL; } FORCE_INLINE void _mm_free(void *addr) { free(addr); } // Starting with the initial value in crc, accumulates a CRC32 value for // unsigned 8-bit integer v. // https://msdn.microsoft.com/en-us/library/bb514036(v=vs.100) FORCE_INLINE uint32_t _mm_crc32_u8(uint32_t crc, uint8_t v) { #if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) __asm__ __volatile__("crc32cb %w[c], %w[c], %w[v]\n\t" : [c] "+r"(crc) : [v] "r"(v)); #else crc ^= v; for (int bit = 0; bit < 8; bit++) { if (crc & 1) crc = (crc >> 1) ^ UINT32_C(0x82f63b78); else crc = (crc >> 1); } #endif return crc; } // Starting with the initial value in crc, accumulates a CRC32 value for // unsigned 16-bit integer v. // https://msdn.microsoft.com/en-us/library/bb531411(v=vs.100) FORCE_INLINE uint32_t _mm_crc32_u16(uint32_t crc, uint16_t v) { #if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) __asm__ __volatile__("crc32ch %w[c], %w[c], %w[v]\n\t" : [c] "+r"(crc) : [v] "r"(v)); #else crc = _mm_crc32_u8(crc, v & 0xff); crc = _mm_crc32_u8(crc, (v >> 8) & 0xff); #endif return crc; } // Starting with the initial value in crc, accumulates a CRC32 value for // unsigned 32-bit integer v. // https://msdn.microsoft.com/en-us/library/bb531394(v=vs.100) FORCE_INLINE uint32_t _mm_crc32_u32(uint32_t crc, uint32_t v) { #if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) __asm__ __volatile__("crc32cw %w[c], %w[c], %w[v]\n\t" : [c] "+r"(crc) : [v] "r"(v)); #else crc = _mm_crc32_u16(crc, v & 0xffff); crc = _mm_crc32_u16(crc, (v >> 16) & 0xffff); #endif return crc; } // Starting with the initial value in crc, accumulates a CRC32 value for // unsigned 64-bit integer v. // https://msdn.microsoft.com/en-us/library/bb514033(v=vs.100) FORCE_INLINE uint64_t _mm_crc32_u64(uint64_t crc, uint64_t v) { #if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) __asm__ __volatile__("crc32cx %w[c], %w[c], %x[v]\n\t" : [c] "+r"(crc) : [v] "r"(v)); #else crc = _mm_crc32_u32((uint32_t)(crc), v & 0xffffffff); crc = _mm_crc32_u32((uint32_t)(crc), (v >> 32) & 0xffffffff); #endif return crc; } #if defined(__GNUC__) || defined(__clang__) #pragma pop_macro("ALIGN_STRUCT") #pragma pop_macro("FORCE_INLINE") #endif #if defined(__GNUC__) #pragma GCC pop_options #endif #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.011112 pygame-2.6.1/src_c/joystick.c0000644000175100001770000004063414676242340015522 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #define PYGAMEAPI_JOYSTICK_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/joystick_doc.h" static pgJoystickObject *joylist_head = NULL; #ifndef BUILD_STATIC static PyObject *joy_instance_map = NULL; #endif // BUILD_STATIC joy_instance_map already defined in src_c/event.c:57 static PyTypeObject pgJoystick_Type; static PyObject * pgJoystick_New(int); static int _joy_map_insert(pgJoystickObject *jstick); #define pgJoystick_Check(x) ((x)->ob_type == &pgJoystick_Type) static PyObject * init(PyObject *self, PyObject *_null) { if (!SDL_WasInit(SDL_INIT_JOYSTICK)) { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK)) return RAISE(pgExc_SDLError, SDL_GetError()); SDL_JoystickEventState(SDL_ENABLE); } Py_RETURN_NONE; } static PyObject * quit(PyObject *self, PyObject *_null) { /* Walk joystick objects to deallocate the stick objects. */ pgJoystickObject *cur = joylist_head; while (cur) { if (cur->joy) { SDL_JoystickClose(cur->joy); cur->joy = NULL; } cur = cur->next; } if (SDL_WasInit(SDL_INIT_JOYSTICK)) { SDL_JoystickEventState(SDL_ENABLE); SDL_QuitSubSystem(SDL_INIT_JOYSTICK); } Py_RETURN_NONE; } static PyObject * get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(SDL_WasInit(SDL_INIT_JOYSTICK) != 0); } /*joystick object funcs*/ static void joy_dealloc(PyObject *self) { pgJoystickObject *jstick = (pgJoystickObject *)self; if (jstick->joy) { SDL_JoystickClose(jstick->joy); } if (jstick->prev) { jstick->prev->next = jstick->next; } else { joylist_head = jstick->next; } if (jstick->next) { jstick->next->prev = jstick->prev; } PyObject_Free(self); } static PyObject * Joystick(PyObject *self, PyObject *args) { int id; if (!PyArg_ParseTuple(args, "i", &id)) { return NULL; } JOYSTICK_INIT_CHECK(); return pgJoystick_New(id); } static PyObject * get_count(PyObject *self, PyObject *_null) { JOYSTICK_INIT_CHECK(); return PyLong_FromLong(SDL_NumJoysticks()); } static PyObject * joy_init(PyObject *self, PyObject *_null) { pgJoystickObject *jstick = (pgJoystickObject *)self; if (!jstick->joy) { jstick->joy = SDL_JoystickOpen(jstick->id); if (!jstick->joy) { return RAISE(pgExc_SDLError, SDL_GetError()); } } if (-1 == _joy_map_insert(jstick)) { return NULL; } Py_RETURN_NONE; } static int _joy_map_insert(pgJoystickObject *jstick) { SDL_JoystickID instance_id; PyObject *k, *v; if (!joy_instance_map) { return -1; } instance_id = SDL_JoystickInstanceID(jstick->joy); if (instance_id < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } k = PyLong_FromLong(instance_id); v = PyLong_FromLong(jstick->id); if (k && v) { PyDict_SetItem(joy_instance_map, k, v); } Py_XDECREF(k); Py_XDECREF(v); return 0; } static PyObject * joy_quit(PyObject *self, PyObject *_null) { pgJoystickObject *joy = (pgJoystickObject *)self; JOYSTICK_INIT_CHECK(); if (joy->joy) { SDL_JoystickClose(joy->joy); joy->joy = NULL; } Py_RETURN_NONE; } static PyObject * joy_get_init(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); return PyBool_FromLong(joy != NULL); } static PyObject * joy_get_id(PyObject *self, PyObject *_null) { int joy_id = pgJoystick_AsID(self); return PyLong_FromLong(joy_id); } static PyObject * joy_get_instance_id(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } return PyLong_FromLong(SDL_JoystickInstanceID(joy)); } static PyObject * joy_get_guid(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); SDL_JoystickGUID guid; char strguid[33]; JOYSTICK_INIT_CHECK(); if (joy) { guid = SDL_JoystickGetGUID(joy); } else { guid = SDL_JoystickGetDeviceGUID(pgJoystick_AsID(self)); } SDL_JoystickGetGUIDString(guid, strguid, 33); return PyUnicode_FromString(strguid); } const char * _pg_powerlevel_string(SDL_JoystickPowerLevel level) { switch (level) { case SDL_JOYSTICK_POWER_EMPTY: return "empty"; case SDL_JOYSTICK_POWER_LOW: return "low"; case SDL_JOYSTICK_POWER_MEDIUM: return "medium"; case SDL_JOYSTICK_POWER_FULL: return "full"; case SDL_JOYSTICK_POWER_WIRED: return "wired"; case SDL_JOYSTICK_POWER_MAX: return "max"; default: return "unknown"; } } static PyObject * joy_get_power_level(PyObject *self, PyObject *_null) { SDL_JoystickPowerLevel level; const char *leveltext; SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } level = SDL_JoystickCurrentPowerLevel(joy); leveltext = _pg_powerlevel_string(level); return PyUnicode_FromString(leveltext); } static PyObject * joy_rumble(pgJoystickObject *self, PyObject *args, PyObject *kwargs) { #if SDL_VERSION_ATLEAST(2, 0, 9) SDL_Joystick *joy = self->joy; double lowf, highf; uint32_t low, high, duration; char *keywords[] = { "low_frequency", "high_frequency", "duration", NULL, }; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ddI", keywords, &lowf, &highf, &duration)) { return NULL; } JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } if (lowf < 0) { lowf = 0.0; } else if (lowf > 1.0) { lowf = 1.0; } if (highf < 0) { highf = 0.f; } else if (highf > 1.0) { highf = 1.0; } low = (Uint32)(lowf * 0xFFFF); high = (Uint32)(highf * 0xFFFF); if (SDL_JoystickRumble(joy, low, high, duration) == -1) { Py_RETURN_FALSE; } Py_RETURN_TRUE; #else Py_RETURN_FALSE; #endif } static PyObject * joy_stop_rumble(pgJoystickObject *self, PyObject *_null) { #if SDL_VERSION_ATLEAST(2, 0, 9) SDL_Joystick *joy = self->joy; SDL_JoystickRumble(joy, 0, 0, 1); #endif Py_RETURN_NONE; } static PyObject * joy_get_name(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); return PyUnicode_FromString(SDL_JoystickName(joy)); } static PyObject * joy_get_numaxes(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } return PyLong_FromLong(SDL_JoystickNumAxes(joy)); } static PyObject * joy_get_axis(PyObject *self, PyObject *args) { SDL_Joystick *joy = pgJoystick_AsSDL(self); int axis, value; if (!PyArg_ParseTuple(args, "i", &axis)) { return NULL; } JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } if (axis < 0 || axis >= SDL_JoystickNumAxes(joy)) { return RAISE(pgExc_SDLError, "Invalid joystick axis"); } value = SDL_JoystickGetAxis(joy, axis); #ifdef DEBUG /*printf("SDL_JoystickGetAxis value:%d:\n", value);*/ #endif return PyFloat_FromDouble(value / 32768.0); } static PyObject * joy_get_numbuttons(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } return PyLong_FromLong(SDL_JoystickNumButtons(joy)); } static PyObject * joy_get_button(PyObject *self, PyObject *args) { SDL_Joystick *joy = pgJoystick_AsSDL(self); int _index, value; if (!PyArg_ParseTuple(args, "i", &_index)) { return NULL; } JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } if (_index < 0 || _index >= SDL_JoystickNumButtons(joy)) { return RAISE(pgExc_SDLError, "Invalid joystick button"); } value = SDL_JoystickGetButton(joy, _index); #ifdef DEBUG /*printf("SDL_JoystickGetButton value:%d:\n", value);*/ #endif return PyLong_FromLong(value); } static PyObject * joy_get_numballs(PyObject *self, PyObject *_null) { SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } return PyLong_FromLong(SDL_JoystickNumBalls(joy)); } static PyObject * joy_get_ball(PyObject *self, PyObject *args) { SDL_Joystick *joy = pgJoystick_AsSDL(self); int _index, dx, dy; int value; if (!PyArg_ParseTuple(args, "i", &_index)) { return NULL; } JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } value = SDL_JoystickNumBalls(joy); #ifdef DEBUG /*printf("SDL_JoystickNumBalls value:%d:\n", value);*/ #endif if (_index < 0 || _index >= value) { return RAISE(pgExc_SDLError, "Invalid joystick trackball"); } SDL_JoystickGetBall(joy, _index, &dx, &dy); return Py_BuildValue("(ii)", dx, dy); } static PyObject * joy_get_numhats(PyObject *self, PyObject *_null) { Uint32 value; SDL_Joystick *joy = pgJoystick_AsSDL(self); JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } value = SDL_JoystickNumHats(joy); #ifdef DEBUG /*printf("SDL_JoystickNumHats value:%d:\n", value);*/ #endif return PyLong_FromLong(value); } static PyObject * joy_get_hat(PyObject *self, PyObject *args) { SDL_Joystick *joy = pgJoystick_AsSDL(self); int _index, px, py; Uint32 value; if (!PyArg_ParseTuple(args, "i", &_index)) { return NULL; } JOYSTICK_INIT_CHECK(); if (!joy) { return RAISE(pgExc_SDLError, "Joystick not initialized"); } if (_index < 0 || _index >= SDL_JoystickNumHats(joy)) { return RAISE(pgExc_SDLError, "Invalid joystick hat"); } px = py = 0; value = SDL_JoystickGetHat(joy, _index); #ifdef DEBUG /*printf("SDL_JoystickGetHat value:%d:\n", value);*/ #endif if (value & SDL_HAT_UP) { py = 1; } else if (value & SDL_HAT_DOWN) { py = -1; } if (value & SDL_HAT_RIGHT) { px = 1; } else if (value & SDL_HAT_LEFT) { px = -1; } return Py_BuildValue("(ii)", px, py); } static PyMethodDef joy_methods[] = { {"init", joy_init, METH_NOARGS, DOC_JOYSTICKINIT}, {"quit", joy_quit, METH_NOARGS, DOC_JOYSTICKQUIT}, {"get_init", joy_get_init, METH_NOARGS, DOC_JOYSTICKGETINIT}, {"get_id", joy_get_id, METH_NOARGS, DOC_JOYSTICKGETID}, {"get_instance_id", joy_get_instance_id, METH_NOARGS, DOC_JOYSTICKGETINSTANCEID}, {"get_guid", joy_get_guid, METH_NOARGS, DOC_JOYSTICKGETGUID}, {"get_power_level", joy_get_power_level, METH_NOARGS, DOC_JOYSTICKGETPOWERLEVEL}, {"rumble", (PyCFunction)joy_rumble, METH_VARARGS | METH_KEYWORDS, DOC_JOYSTICKRUMBLE}, {"stop_rumble", (PyCFunction)joy_stop_rumble, METH_NOARGS, DOC_JOYSTICKSTOPRUMBLE}, {"get_name", joy_get_name, METH_NOARGS, DOC_JOYSTICKGETNAME}, {"get_numaxes", joy_get_numaxes, METH_NOARGS, DOC_JOYSTICKGETNUMAXES}, {"get_axis", joy_get_axis, METH_VARARGS, DOC_JOYSTICKGETAXIS}, {"get_numbuttons", joy_get_numbuttons, METH_NOARGS, DOC_JOYSTICKGETNUMBUTTONS}, {"get_button", joy_get_button, METH_VARARGS, DOC_JOYSTICKGETBUTTON}, {"get_numballs", joy_get_numballs, METH_NOARGS, DOC_JOYSTICKGETNUMBALLS}, {"get_ball", joy_get_ball, METH_VARARGS, DOC_JOYSTICKGETBALL}, {"get_numhats", joy_get_numhats, METH_NOARGS, DOC_JOYSTICKGETNUMHATS}, {"get_hat", joy_get_hat, METH_VARARGS, DOC_JOYSTICKGETHAT}, {NULL, NULL, 0, NULL}}; static PyTypeObject pgJoystick_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.joystick.Joystick", .tp_basicsize = sizeof(pgJoystickObject), .tp_dealloc = joy_dealloc, .tp_doc = DOC_PYGAMEJOYSTICKJOYSTICK, .tp_methods = joy_methods, }; static PyObject * pgJoystick_New(int id) { pgJoystickObject *jstick, *cur; SDL_Joystick *joy; JOYSTICK_INIT_CHECK(); /* Open the SDL device */ if (id >= SDL_NumJoysticks()) { return RAISE(pgExc_SDLError, "Invalid joystick device number"); } joy = SDL_JoystickOpen(id); if (!joy) { return RAISE(pgExc_SDLError, SDL_GetError()); } /* Search existing joystick objects to see if we already have this stick. */ cur = joylist_head; while (cur) { if (cur->joy == joy) { Py_INCREF(cur); return (PyObject *)cur; } cur = cur->next; } /* Construct the Python object */ jstick = PyObject_New(pgJoystickObject, &pgJoystick_Type); if (!jstick) { return NULL; } jstick->id = id; jstick->joy = joy; jstick->prev = NULL; jstick->next = joylist_head; if (joylist_head) { joylist_head->prev = jstick; } joylist_head = jstick; if (-1 == _joy_map_insert(jstick)) { Py_DECREF(jstick); return NULL; } return (PyObject *)jstick; } static PyMethodDef _joystick_methods[] = { {"init", (PyCFunction)init, METH_NOARGS, DOC_PYGAMEJOYSTICKINIT}, {"quit", (PyCFunction)quit, METH_NOARGS, DOC_PYGAMEJOYSTICKQUIT}, {"get_init", (PyCFunction)get_init, METH_NOARGS, DOC_PYGAMEJOYSTICKGETINIT}, {"get_count", (PyCFunction)get_count, METH_NOARGS, DOC_PYGAMEJOYSTICKGETCOUNT}, {"Joystick", Joystick, METH_VARARGS, DOC_PYGAMEJOYSTICKJOYSTICK}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(joystick) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_JOYSTICK_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "joystick", DOC_PYGAMEJOYSTICK, -1, _joystick_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgJoystick_Type) == -1) { return NULL; } /* Grab the instance -> device id mapping */ module = PyImport_ImportModule("pygame.event"); if (!module) { return NULL; } joy_instance_map = PyObject_GetAttrString(module, "_joy_instance_map"); Py_DECREF(module); if (!joy_instance_map) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&pgJoystick_Type); if (PyModule_AddObject(module, "JoystickType", (PyObject *)&pgJoystick_Type)) { Py_DECREF(&pgJoystick_Type); Py_DECREF(module); return NULL; } /* export the c api */ c_api[0] = &pgJoystick_Type; c_api[1] = pgJoystick_New; apiobj = encapsulate_api(c_api, "joystick"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.011112 pygame-2.6.1/src_c/key.c0000644000175100001770000004600214676242340014446 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * pygame keyboard module */ #include "pygame.h" #include "pgcompat.h" #include "doc/key_doc.h" /* keyboard module functions */ static PyObject * key_set_repeat(PyObject *self, PyObject *args) { int delay = 0, interval = 0; if (!PyArg_ParseTuple(args, "|ii", &delay, &interval)) return NULL; VIDEO_INIT_CHECK(); if (delay && !interval) interval = delay; if (pg_EnableKeyRepeat(delay, interval) == -1) return NULL; Py_RETURN_NONE; } static PyObject * key_get_repeat(PyObject *self, PyObject *_null) { int delay = 0, interval = 0; VIDEO_INIT_CHECK(); pg_GetKeyRepeat(&delay, &interval); return Py_BuildValue("(ii)", delay, interval); } /* * pgScancodeWrapper is for key_get_pressed in SDL2. * It converts key symbol indices to scan codes, as suggested in * https://github.com/pygame/pygame/issues/659 * so that they work with SDL_GetKeyboardState(). */ #define _PG_SCANCODEWRAPPER_TYPE_NAME "ScancodeWrapper" #define _PG_SCANCODEWRAPPER_TYPE_FULLNAME \ "pygame.key." _PG_SCANCODEWRAPPER_TYPE_NAME typedef struct { PyTupleObject tuple; } pgScancodeWrapper; static PyObject * pg_scancodewrapper_subscript(pgScancodeWrapper *self, PyObject *item) { long index; PyObject *adjustedvalue, *ret; if ((index = PyLong_AsLong(item)) == -1 && PyErr_Occurred()) return NULL; index = SDL_GetScancodeFromKey(index); adjustedvalue = PyLong_FromLong(index); ret = PyTuple_Type.tp_as_mapping->mp_subscript((PyObject *)self, adjustedvalue); Py_DECREF(adjustedvalue); return ret; } /* static PyObject * pg_iter_raise(PyObject *self) { PyErr_SetString(PyExc_TypeError, "Iterating over key states is not supported"); return NULL; } */ /** * There is an issue in PyPy that causes __iter__ to be called * on creation of a ScandcodeWrapper. This stops this from * happening. */ #ifdef PYPY_VERSION /* static PyObject * pg_scancodewrapper_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) { PyObject *tuple = NULL; Py_ssize_t size = PyTuple_Size(args); if (size == 1) { tuple = PyTuple_GET_ITEM(args, 0); if (PyTuple_Check(tuple)) { size = PyTuple_Size(tuple); } else { tuple = NULL; } } pgScancodeWrapper *obj = (pgScancodeWrapper *)(subtype->tp_alloc(subtype, size)); if (obj && tuple) { for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PyTuple_GET_ITEM((PyObject *)tuple, i); PyTuple_SET_ITEM((PyObject *)obj, i, item); } Py_DECREF(tuple); } return (PyObject *)obj; } */ #endif /* PYPY_VERSION */ static PyMappingMethods pg_scancodewrapper_mapping = { .mp_subscript = (binaryfunc)pg_scancodewrapper_subscript, }; static PyObject * pg_scancodewrapper_repr(pgScancodeWrapper *self) { PyObject *baserepr = PyTuple_Type.tp_repr((PyObject *)self); PyObject *ret = PyUnicode_FromFormat(_PG_SCANCODEWRAPPER_TYPE_FULLNAME "%S", baserepr); Py_DECREF(baserepr); return ret; } static PyTypeObject pgScancodeWrapper_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.key.ScancodeWrapper", .tp_repr = (reprfunc)pg_scancodewrapper_repr, .tp_as_mapping = &pg_scancodewrapper_mapping, /* .tp_iter = (getiterfunc)pg_iter_raise, .tp_iternext = (iternextfunc)pg_iter_raise, #ifdef PYPY_VERSION .tp_new = pg_scancodewrapper_new, #endif */ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_TUPLE_SUBCLASS | Py_TPFLAGS_BASETYPE, }; static PyObject * key_get_pressed(PyObject *self, PyObject *_null) { int num_keys; const Uint8 *key_state; PyObject *ret_obj = NULL; PyObject *key_tuple; int i; VIDEO_INIT_CHECK(); key_state = SDL_GetKeyboardState(&num_keys); if (!key_state || !num_keys) Py_RETURN_NONE; if (!(key_tuple = PyTuple_New(num_keys))) return NULL; for (i = 0; i < num_keys; i++) { PyObject *key_elem; key_elem = PyBool_FromLong(key_state[i]); if (!key_elem) { Py_DECREF(key_tuple); return NULL; } PyTuple_SET_ITEM(key_tuple, i, key_elem); } ret_obj = PyObject_CallFunctionObjArgs((PyObject *)&pgScancodeWrapper_Type, key_tuple, NULL); Py_DECREF(key_tuple); return ret_obj; } /* Keep our own key-name table for backwards compatibility. * This has to be kept updated (only new things can be added, existing records * in this must not be changed). * Here the constant values are hardcoded so that this table remains compatible * with older SDL2 versions without the need for many SDL version check macro * fences */ static const struct { const SDL_Keycode key; const char *name; } pg_key_and_name[] = { {0, ""}, /* K_UNKNOWN */ {8, "backspace"}, /* K_BACKSPACE */ {9, "tab"}, /* K_TAB */ {13, "return"}, /* K_RETURN */ {27, "escape"}, /* K_ESCAPE */ {32, "space"}, /* K_SPACE */ {33, "!"}, /* K_EXCLAIM */ {34, "\""}, /* K_QUOTEDBL */ {35, "#"}, /* K_HASH */ {36, "$"}, /* K_DOLLAR */ {37, "%"}, /* K_PERCENT */ {38, "&"}, /* K_AMPERSAND */ {39, "'"}, /* K_QUOTE */ {40, "("}, /* K_LEFTPAREN */ {41, ")"}, /* K_RIGHTPAREN */ {42, "*"}, /* K_ASTERISK */ {43, "+"}, /* K_PLUS */ {44, ","}, /* K_COMMA */ {45, "-"}, /* K_MINUS */ {46, "."}, /* K_PERIOD */ {47, "/"}, /* K_SLASH */ {48, "0"}, /* K_0 */ {49, "1"}, /* K_1 */ {50, "2"}, /* K_2 */ {51, "3"}, /* K_3 */ {52, "4"}, /* K_4 */ {53, "5"}, /* K_5 */ {54, "6"}, /* K_6 */ {55, "7"}, /* K_7 */ {56, "8"}, /* K_8 */ {57, "9"}, /* K_9 */ {58, ":"}, /* K_COLON */ {59, ";"}, /* K_SEMICOLON */ {60, "<"}, /* K_LESS */ {61, "="}, /* K_EQUALS */ {62, ">"}, /* K_GREATER */ {63, "?"}, /* K_QUESTION */ {64, "@"}, /* K_AT */ {91, "["}, /* K_LEFTBRACKET */ {92, "\\"}, /* K_BACKSLASH */ {93, "]"}, /* K_RIGHTBRACKET */ {94, "^"}, /* K_CARET */ {95, "_"}, /* K_UNDERSCORE */ {96, "`"}, /* K_BACKQUOTE */ {97, "a"}, /* K_a */ {98, "b"}, /* K_b */ {99, "c"}, /* K_c */ {100, "d"}, /* K_d */ {101, "e"}, /* K_e */ {102, "f"}, /* K_f */ {103, "g"}, /* K_g */ {104, "h"}, /* K_h */ {105, "i"}, /* K_i */ {106, "j"}, /* K_j */ {107, "k"}, /* K_k */ {108, "l"}, /* K_l */ {109, "m"}, /* K_m */ {110, "n"}, /* K_n */ {111, "o"}, /* K_o */ {112, "p"}, /* K_p */ {113, "q"}, /* K_q */ {114, "r"}, /* K_r */ {115, "s"}, /* K_s */ {116, "t"}, /* K_t */ {117, "u"}, /* K_u */ {118, "v"}, /* K_v */ {119, "w"}, /* K_w */ {120, "x"}, /* K_x */ {121, "y"}, /* K_y */ {122, "z"}, /* K_z */ {127, "delete"}, /* K_DELETE */ {1073741881, "caps lock"}, /* K_CAPSLOCK */ {1073741882, "f1"}, /* K_F1 */ {1073741883, "f2"}, /* K_F2 */ {1073741884, "f3"}, /* K_F3 */ {1073741885, "f4"}, /* K_F4 */ {1073741886, "f5"}, /* K_F5 */ {1073741887, "f6"}, /* K_F6 */ {1073741888, "f7"}, /* K_F7 */ {1073741889, "f8"}, /* K_F8 */ {1073741890, "f9"}, /* K_F9 */ {1073741891, "f10"}, /* K_F10 */ {1073741892, "f11"}, /* K_F11 */ {1073741893, "f12"}, /* K_F12 */ {1073741894, "print screen"}, /* K_PRINT, K_PRINTSCREEN */ {1073741895, "scroll lock"}, /* K_SCROLLLOCK, K_SCROLLOCK */ {1073741896, "break"}, /* K_BREAK, K_PAUSE */ {1073741897, "insert"}, /* K_INSERT */ {1073741898, "home"}, /* K_HOME */ {1073741899, "page up"}, /* K_PAGEUP */ {1073741901, "end"}, /* K_END */ {1073741902, "page down"}, /* K_PAGEDOWN */ {1073741903, "right"}, /* K_RIGHT */ {1073741904, "left"}, /* K_LEFT */ {1073741905, "down"}, /* K_DOWN */ {1073741906, "up"}, /* K_UP */ {1073741907, "numlock"}, /* K_NUMLOCK, K_NUMLOCKCLEAR */ {1073741908, "[/]"}, /* K_KP_DIVIDE */ {1073741909, "[*]"}, /* K_KP_MULTIPLY */ {1073741910, "[-]"}, /* K_KP_MINUS */ {1073741911, "[+]"}, /* K_KP_PLUS */ {1073741912, "enter"}, /* K_KP_ENTER */ {1073741913, "[1]"}, /* K_KP1, K_KP_1 */ {1073741914, "[2]"}, /* K_KP2, K_KP_2 */ {1073741915, "[3]"}, /* K_KP3, K_KP_3 */ {1073741916, "[4]"}, /* K_KP4, K_KP_4 */ {1073741917, "[5]"}, /* K_KP5, K_KP_5 */ {1073741918, "[6]"}, /* K_KP6, K_KP_6 */ {1073741919, "[7]"}, /* K_KP7, K_KP_7 */ {1073741920, "[8]"}, /* K_KP8, K_KP_8 */ {1073741921, "[9]"}, /* K_KP9, K_KP_9 */ {1073741922, "[0]"}, /* K_KP0, K_KP_0 */ {1073741923, "[.]"}, /* K_KP_PERIOD */ {1073741926, "power"}, /* K_POWER */ {1073741927, "equals"}, /* K_KP_EQUALS */ {1073741928, "f13"}, /* K_F13 */ {1073741929, "f14"}, /* K_F14 */ {1073741930, "f15"}, /* K_F15 */ {1073741941, "help"}, /* K_HELP */ {1073741942, "menu"}, /* K_MENU */ {1073741978, "sys req"}, /* K_SYSREQ */ {1073741980, "clear"}, /* K_CLEAR */ {1073742004, "euro"}, /* K_CURRENCYUNIT, K_EURO */ {1073742005, "CurrencySubUnit"}, /* K_CURRENCYSUBUNIT */ {1073742048, "left ctrl"}, /* K_LCTRL */ {1073742049, "left shift"}, /* K_LSHIFT */ {1073742050, "left alt"}, /* K_LALT */ {1073742051, "left meta"}, /* K_LGUI, K_LMETA, K_LSUPER */ {1073742052, "right ctrl"}, /* K_RCTRL */ {1073742053, "right shift"}, /* K_RSHIFT */ {1073742054, "right alt"}, /* K_RALT */ {1073742055, "right meta"}, /* K_RGUI, K_RMETA, K_RSUPER */ {1073742081, "alt gr"}, /* K_MODE */ {1073742094, "AC Back"}, /* K_AC_BACK */ }; /* Get name from keycode using pygame compat table */ static const char * _pg_get_keycode_name(SDL_Keycode key) { int i; for (i = 0; i < (int)SDL_arraysize(pg_key_and_name); i++) { if (pg_key_and_name[i].key == key) { return pg_key_and_name[i].name; } } return pg_key_and_name[SDLK_UNKNOWN].name; } /* Lighter version of SDL_GetKeyFromName, uses custom compat table first */ static SDL_Keycode _pg_get_key_from_name(const char *name) { int i; for (i = 0; i < (int)SDL_arraysize(pg_key_and_name); i++) { if (!SDL_strcasecmp(name, pg_key_and_name[i].name)) { return pg_key_and_name[i].key; } } /* fallback to SDL function here */ return SDL_GetKeyFromName(name); } static PyObject * key_name(PyObject *self, PyObject *args, PyObject *kwargs) { int key, use_compat = 1; static char *kwids[] = {"key", "use_compat", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|p", kwids, &key, &use_compat)) return NULL; if (use_compat) { /* Use our backcompat function, that has names hardcoded in pygame * source */ return PyUnicode_FromString(_pg_get_keycode_name(key)); } /* This check only needs to run when use_compat=False because SDL API calls * only happen in this case. * This is not checked at the top of this function to not break compat with * older API usage that does not expect this function to need init */ VIDEO_INIT_CHECK(); return PyUnicode_FromString(SDL_GetKeyName(key)); } static PyObject * key_code(PyObject *self, PyObject *args, PyObject *kwargs) { const char *name; SDL_Keycode code; static char *kwids[] = {"name", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s", kwids, &name)) return NULL; /* in the future, this should be an error. For now it's a warning to not * break existing code */ if (!SDL_WasInit(SDL_INIT_VIDEO)) { if (PyErr_WarnEx(PyExc_Warning, "pygame.init() has not been called. This function " "may return incorrect results", 1) != 0) { return NULL; } } code = _pg_get_key_from_name(name); if (code == SDLK_UNKNOWN) { return RAISE(PyExc_ValueError, "unknown key name"); } return PyLong_FromLong(code); } static PyObject * key_get_mods(PyObject *self, PyObject *_null) { VIDEO_INIT_CHECK(); return PyLong_FromLong(SDL_GetModState()); } static PyObject * key_set_mods(PyObject *self, PyObject *args) { int mods; if (!PyArg_ParseTuple(args, "i", &mods)) return NULL; VIDEO_INIT_CHECK(); SDL_SetModState(mods); Py_RETURN_NONE; } static PyObject * key_get_focused(PyObject *self, PyObject *_null) { VIDEO_INIT_CHECK(); return PyBool_FromLong(SDL_GetKeyboardFocus() != NULL); } static PyObject * key_start_text_input(PyObject *self, PyObject *_null) { /* https://wiki.libsdl.org/SDL_StartTextInput */ SDL_StartTextInput(); Py_RETURN_NONE; } static PyObject * key_stop_text_input(PyObject *self, PyObject *_null) { /* https://wiki.libsdl.org/SDL_StopTextInput */ SDL_StopTextInput(); Py_RETURN_NONE; } static PyObject * key_set_text_input_rect(PyObject *self, PyObject *obj) { /* https://wiki.libsdl.org/SDL_SetTextInputRect */ SDL_Rect *rect, temp; SDL_Window *sdlWindow = pg_GetDefaultWindow(); SDL_Renderer *sdlRenderer = SDL_GetRenderer(sdlWindow); if (obj == Py_None) { Py_RETURN_NONE; } rect = pgRect_FromObject(obj, &temp); if (!rect) return RAISE(PyExc_TypeError, "Invalid rect argument"); if (sdlRenderer != NULL) { SDL_Rect vprect, rect2; /* new rect so we do not overwrite the input rect */ float scalex, scaley; SDL_RenderGetScale(sdlRenderer, &scalex, &scaley); SDL_RenderGetViewport(sdlRenderer, &vprect); rect2.x = (int)(rect->x * scalex + vprect.x); rect2.y = (int)(rect->y * scaley + vprect.y); rect2.w = (int)(rect->w * scalex); rect2.h = (int)(rect->h * scaley); SDL_SetTextInputRect(&rect2); Py_RETURN_NONE; } SDL_SetTextInputRect(rect); Py_RETURN_NONE; } static PyMethodDef _key_methods[] = { {"set_repeat", key_set_repeat, METH_VARARGS, DOC_PYGAMEKEYSETREPEAT}, {"get_repeat", key_get_repeat, METH_NOARGS, DOC_PYGAMEKEYGETREPEAT}, {"get_pressed", key_get_pressed, METH_NOARGS, DOC_PYGAMEKEYGETPRESSED}, {"name", (PyCFunction)key_name, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEKEYNAME}, {"key_code", (PyCFunction)key_code, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEKEYKEYCODE}, {"get_mods", key_get_mods, METH_NOARGS, DOC_PYGAMEKEYGETMODS}, {"set_mods", key_set_mods, METH_VARARGS, DOC_PYGAMEKEYSETMODS}, {"get_focused", key_get_focused, METH_NOARGS, DOC_PYGAMEKEYGETFOCUSED}, {"start_text_input", key_start_text_input, METH_NOARGS, DOC_PYGAMEKEYSTARTTEXTINPUT}, {"stop_text_input", key_stop_text_input, METH_NOARGS, DOC_PYGAMEKEYSTOPTEXTINPUT}, {"set_text_input_rect", key_set_text_input_rect, METH_O, DOC_PYGAMEKEYSETTEXTINPUTRECT}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(key) { PyObject *module; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "key", DOC_PYGAMEKEY, -1, _key_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_event(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ pgScancodeWrapper_Type.tp_base = &PyTuple_Type; if (PyType_Ready(&pgScancodeWrapper_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&pgScancodeWrapper_Type); if (PyModule_AddObject(module, _PG_SCANCODEWRAPPER_TYPE_NAME, (PyObject *)&pgScancodeWrapper_Type)) { Py_DECREF(&pgScancodeWrapper_Type); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.011112 pygame-2.6.1/src_c/mask.c0000644000175100001770000023635414676242340014624 0ustar00runnerdocker/* Copyright (C) 2002-2007 Ulf Ekstrom except for the bitcount function. This wrapper code was originally written by Danny van Bruggen(?) for the SCAM library, it was then converted by Ulf Ekstrom to wrap the bitmask library, a spinoff from SCAM. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* a couple of print debugging helpers */ /* #define CALLLOG2(x,y) fprintf(stderr, (x), (y)); #define CALLLOG(x) fprintf(stderr, (x)); */ #define PYGAMEAPI_MASK_INTERNAL 1 #include "mask.h" #include "pygame.h" #include "pgcompat.h" #include "doc/mask_doc.h" #include "structmember.h" #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /* Macro to create mask objects. This will call the type's tp_new and tp_init. * Params: * w: width of mask * h: height of mask * f: fill, 1 is used to set all the bits (to 1) and 0 is used to clear * all the bits (to 0) */ #define CREATE_MASK_OBJ(w, h, f) \ (pgMaskObject *)PyObject_CallFunction((PyObject *)&pgMask_Type, "(ii)i", \ (w), (h), (f)) /* Prototypes */ static PyTypeObject pgMask_Type; static PG_INLINE pgMaskObject * create_mask_using_bitmask(bitmask_t *bitmask); static PG_INLINE pgMaskObject * create_mask_using_bitmask_and_type(bitmask_t *bitmask, PyTypeObject *ob_type); /********** mask helper functions **********/ /* Calculate the absolute difference between 2 Uint32s. */ static PG_INLINE Uint32 abs_diff_uint32(Uint32 a, Uint32 b) { return (a > b) ? a - b : b - a; } /********** mask object methods **********/ /* Copies the given mask. */ static PyObject * mask_copy(PyObject *self, PyObject *_null) { bitmask_t *new_bitmask = bitmask_copy(pgMask_AsBitmap(self)); if (NULL == new_bitmask) { return RAISE(PyExc_MemoryError, "cannot allocate memory for bitmask"); } return (PyObject *)create_mask_using_bitmask_and_type(new_bitmask, Py_TYPE(self)); } /* Redirects mask.copy() to mask.__copy__(). This is done to allow * subclasses that override the __copy__() method to also override the copy() * method automatically. */ static PyObject * mask_call_copy(PyObject *self, PyObject *_null) { return PyObject_CallMethodObjArgs(self, PyUnicode_FromString("__copy__"), NULL); } static PyObject * mask_get_size(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); return Py_BuildValue("(ii)", mask->w, mask->h); } /* Creates a Rect object based on the given mask's size. The rect's * attributes can be altered via the kwargs. * * Returns: * Rect object or NULL to indicate a fail * * Ref: src_c/surface.c surf_get_rect() */ static PyObject * mask_get_rect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *rect = NULL; bitmask_t *bitmask = pgMask_AsBitmap(self); if (0 != PyTuple_GET_SIZE(args)) { return RAISE(PyExc_TypeError, "get_rect only supports keyword arguments"); } rect = pgRect_New4(0, 0, bitmask->w, bitmask->h); if (NULL == rect) { return RAISE(PyExc_MemoryError, "cannot allocate memory for rect"); } if (NULL != kwargs) { PyObject *key = NULL, *value = NULL; Py_ssize_t pos = 0; while (PyDict_Next(kwargs, &pos, &key, &value)) { if ((-1 == PyObject_SetAttr(rect, key, value))) { Py_DECREF(rect); return NULL; } } } return rect; } static PyObject * mask_get_at(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); int x, y, val; PyObject *pos = NULL; static char *keywords[] = {"pos", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &pos)) return NULL; if (!pg_TwoIntsFromObj(pos, &x, &y)) { return RAISE(PyExc_TypeError, "pos must be two numbers"); } if (x >= 0 && x < mask->w && y >= 0 && y < mask->h) { val = bitmask_getbit(mask, x, y); } else { PyErr_Format(PyExc_IndexError, "%d, %d is out of bounds", x, y); return NULL; } return PyLong_FromLong(val); } static PyObject * mask_set_at(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); int x, y, value = 1; PyObject *pos = NULL; static char *keywords[] = {"pos", "value", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i", keywords, &pos, &value)) return NULL; if (!pg_TwoIntsFromObj(pos, &x, &y)) { return RAISE(PyExc_TypeError, "pos must be two numbers"); } if (x >= 0 && x < mask->w && y >= 0 && y < mask->h) { if (value) { bitmask_setbit(mask, x, y); } else { bitmask_clearbit(mask, x, y); } } else { PyErr_Format(PyExc_IndexError, "%d, %d is out of bounds", x, y); return NULL; } Py_INCREF(Py_None); return Py_None; } static PyObject * mask_overlap(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_t *othermask; PyObject *maskobj; int x, y, val; int xp, yp; PyObject *offset = NULL; static char *keywords[] = {"other", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgMask_Type, &maskobj, &offset)) return NULL; othermask = pgMask_AsBitmap(maskobj); if (!pg_TwoIntsFromObj(offset, &x, &y)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } val = bitmask_overlap_pos(mask, othermask, x, y, &xp, &yp); if (val) { return Py_BuildValue("(ii)", xp, yp); } else { Py_INCREF(Py_None); return Py_None; } } static PyObject * mask_overlap_area(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_t *othermask; PyObject *maskobj; int x, y, val; PyObject *offset = NULL; static char *keywords[] = {"other", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgMask_Type, &maskobj, &offset)) { return NULL; } othermask = pgMask_AsBitmap(maskobj); if (!pg_TwoIntsFromObj(offset, &x, &y)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } val = bitmask_overlap_area(mask, othermask, x, y); return PyLong_FromLong(val); } static PyObject * mask_overlap_mask(PyObject *self, PyObject *args, PyObject *kwargs) { int x, y; bitmask_t *bitmask = pgMask_AsBitmap(self); PyObject *maskobj; pgMaskObject *output_maskobj; PyObject *offset = NULL; static char *keywords[] = {"other", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgMask_Type, &maskobj, &offset)) { return NULL; /* Exception already set. */ } output_maskobj = CREATE_MASK_OBJ(bitmask->w, bitmask->h, 0); if (!pg_TwoIntsFromObj(offset, &x, &y)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } if (NULL == output_maskobj) { return NULL; /* Exception already set. */ } bitmask_overlap_mask(bitmask, pgMask_AsBitmap(maskobj), output_maskobj->mask, x, y); return (PyObject *)output_maskobj; } static PyObject * mask_fill(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_fill(mask); Py_RETURN_NONE; } static PyObject * mask_clear(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_clear(mask); Py_RETURN_NONE; } static PyObject * mask_invert(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_invert(mask); Py_RETURN_NONE; } static PyObject * mask_scale(PyObject *self, PyObject *args, PyObject *kwargs) { int x, y; bitmask_t *bitmask = NULL; PyObject *scale = NULL; static char *keywords[] = {"scale", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &scale)) { return NULL; /* Exception already set. */ } if (!pg_TwoIntsFromObj(scale, &x, &y)) { return RAISE(PyExc_TypeError, "scale must be two numbers"); } if (x < 0 || y < 0) { return RAISE(PyExc_ValueError, "cannot scale mask to negative size"); } bitmask = bitmask_scale(pgMask_AsBitmap(self), x, y); if (NULL == bitmask) { return RAISE(PyExc_MemoryError, "cannot allocate memory for bitmask"); } return (PyObject *)create_mask_using_bitmask(bitmask); } static PyObject * mask_draw(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_t *othermask; PyObject *maskobj; int x, y; PyObject *offset = NULL; static char *keywords[] = {"other", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgMask_Type, &maskobj, &offset)) { return NULL; } if (!pg_TwoIntsFromObj(offset, &x, &y)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } othermask = pgMask_AsBitmap(maskobj); bitmask_draw(mask, othermask, x, y); Py_RETURN_NONE; } static PyObject * mask_erase(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *mask = pgMask_AsBitmap(self); bitmask_t *othermask; PyObject *maskobj; int x, y; PyObject *offset = NULL; static char *keywords[] = {"other", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgMask_Type, &maskobj, &offset)) { return NULL; } if (!pg_TwoIntsFromObj(offset, &x, &y)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } othermask = pgMask_AsBitmap(maskobj); bitmask_erase(mask, othermask, x, y); Py_RETURN_NONE; } static PyObject * mask_count(PyObject *self, PyObject *_null) { bitmask_t *m = pgMask_AsBitmap(self); return PyLong_FromLong(bitmask_count(m)); } static PyObject * mask_centroid(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); int x, y; long int m10, m01, m00; PyObject *xobj, *yobj; m10 = m01 = m00 = 0; for (x = 0; x < mask->w; x++) { for (y = 0; y < mask->h; y++) { if (bitmask_getbit(mask, x, y)) { m10 += x; m01 += y; m00++; } } } if (m00) { xobj = PyLong_FromLong(m10 / m00); yobj = PyLong_FromLong(m01 / m00); } else { xobj = PyLong_FromLong(0); yobj = PyLong_FromLong(0); } return Py_BuildValue("(NN)", xobj, yobj); } static PyObject * mask_angle(PyObject *self, PyObject *_null) { bitmask_t *mask = pgMask_AsBitmap(self); int x, y; long int m10, m01, m00, m20, m02, m11; m10 = m01 = m00 = m20 = m02 = m11 = 0; for (x = 0; x < mask->w; x++) { for (y = 0; y < mask->h; y++) { if (bitmask_getbit(mask, x, y)) { m10 += x; m20 += (long)x * x; m11 += (long)x * y; m02 += (long)y * y; m01 += y; m00++; } } } if (m00) { int xc = m10 / m00; int yc = m01 / m00; double theta = -90.0 * atan2(2 * (m11 / m00 - (long)xc * yc), (m20 / m00 - (long)xc * xc) - (m02 / m00 - (long)yc * yc)) / M_PI; return PyFloat_FromDouble(theta); } else { return PyFloat_FromDouble(0); } } static PyObject * mask_outline(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *c = pgMask_AsBitmap(self); bitmask_t *m = NULL; PyObject *plist = NULL; PyObject *value = NULL; int x, y, firstx, firsty, secx, secy, currx, curry, nextx, nexty, n; int e, every = 1; int a[] = {1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1}; int b[] = {0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1}; static char *keywords[] = {"every", NULL}; firstx = firsty = secx = x = 0; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", keywords, &every)) { return NULL; } plist = PyList_New(0); if (!plist) { return RAISE(PyExc_MemoryError, "outline cannot allocate memory for list"); } if (!c->w || !c->h) { return plist; } /* Copying to a larger mask to avoid border checking. */ m = bitmask_create(c->w + 2, c->h + 2); if (!m) { Py_DECREF(plist); return RAISE(PyExc_MemoryError, "outline cannot allocate memory for mask"); } bitmask_draw(m, c, 1, 1); /* find the first set pixel in the mask */ for (y = 1; y < m->h - 1; y++) { for (x = 1; x < m->w - 1; x++) { if (bitmask_getbit(m, x, y)) { firstx = x; firsty = y; value = Py_BuildValue("(ii)", x - 1, y - 1); if (NULL == value) { Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } if (0 != PyList_Append(plist, value)) { Py_DECREF(value); Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } Py_DECREF(value); break; } } if (bitmask_getbit(m, x, y)) break; } /* covers the mask having zero pixels set or only the final pixel */ if ((x == m->w - 1) && (y == m->h - 1)) { bitmask_free(m); return plist; } e = every; /* check just the first pixel for neighbors */ for (n = 0; n < 8; n++) { if (bitmask_getbit(m, x + a[n], y + b[n])) { currx = secx = x + a[n]; curry = secy = y + b[n]; e--; if (!e) { e = every; value = Py_BuildValue("(ii)", secx - 1, secy - 1); if (NULL == value) { Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } if (0 != PyList_Append(plist, value)) { Py_DECREF(value); Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } Py_DECREF(value); } break; } } /* if there are no neighbors, return */ if (!secx) { bitmask_free(m); return plist; } /* the outline tracing loop */ for (;;) { /* look around the pixel, it has to have a neighbor */ for (n = (n + 6) & 7;; n++) { if (bitmask_getbit(m, currx + a[n], curry + b[n])) { nextx = currx + a[n]; nexty = curry + b[n]; e--; if (!e) { e = every; if ((curry == firsty && currx == firstx) && (secx == nextx && secy == nexty)) { break; } value = Py_BuildValue("(ii)", nextx - 1, nexty - 1); if (NULL == value) { Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } if (0 != PyList_Append(plist, value)) { Py_DECREF(value); Py_DECREF(plist); bitmask_free(m); return NULL; /* Exception already set. */ } Py_DECREF(value); } break; } } /* if we are back at the first pixel, and the next one will be the second one we visited, we are done */ if ((curry == firsty && currx == firstx) && (secx == nextx && secy == nexty)) { break; } curry = nexty; currx = nextx; } bitmask_free(m); return plist; } static PyObject * mask_convolve(PyObject *aobj, PyObject *args, PyObject *kwargs) { PyObject *bobj; PyObject *oobj = Py_None; bitmask_t *a = NULL, *b = NULL; int xoffset = 0, yoffset = 0; PyObject *offset = NULL; static char *keywords[] = {"other", "output", "offset", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|OO", keywords, &pgMask_Type, &bobj, &oobj, &offset)) { return NULL; /* Exception already set. */ } if (offset && !pg_TwoIntsFromObj(offset, &xoffset, &yoffset)) { return RAISE(PyExc_TypeError, "offset must be two numbers"); } a = pgMask_AsBitmap(aobj); b = pgMask_AsBitmap(bobj); if (oobj != Py_None) { /* Use this mask for the output. */ Py_INCREF(oobj); } else { pgMaskObject *maskobj = CREATE_MASK_OBJ(MAX(0, a->w + b->w - 1), MAX(0, a->h + b->h - 1), 0); if (NULL == maskobj) { return NULL; /* Exception already set. */ } oobj = (PyObject *)maskobj; } bitmask_convolve(a, b, pgMask_AsBitmap(oobj), xoffset, yoffset); return oobj; } /* Gets the color of a given pixel. * * Params: * pixel: pixel to get the color of * bpp: bytes per pixel * * Returns: * pixel color */ static PG_INLINE Uint32 get_pixel_color(Uint8 *pixel, Uint8 bpp) { switch (bpp) { case 1: return *((Uint8 *)pixel); case 2: return *((Uint16 *)pixel); case 3: #if SDL_BYTEORDER == SDL_LIL_ENDIAN return (pixel[0]) + (pixel[1] << 8) + (pixel[2] << 16); #else /* SDL_BIG_ENDIAN */ return (pixel[2]) + (pixel[1] << 8) + (pixel[0] << 16); #endif /* SDL_BIG_ENDIAN */ default: /* case 4: */ return *((Uint32 *)pixel); } } /* Sets the color of a given pixel. * * Params: * pixel: pixel to set the color of * bpp: bytes per pixel * color: color to set * * Ref: src_c/draw.c set_pixel_32() */ static void set_pixel_color(Uint8 *pixel, Uint8 bpp, Uint32 color) { switch (bpp) { case 1: *pixel = color; break; case 2: *(Uint16 *)pixel = color; break; case 3: #if SDL_BYTEORDER == SDL_LIL_ENDIAN *(Uint16 *)pixel = color; pixel[2] = color >> 16; #else /* != SDL_LIL_ENDIAN */ pixel[2] = color; pixel[1] = color >> 8; pixel[0] = color >> 16; #endif /* SDL_LIL_ENDIAN */ break; default: /* case 4: */ *(Uint32 *)pixel = color; break; } } /* For each surface pixel's alpha that is greater than the threshold, * the corresponding bitmask bit is set. * * Params: * surf: surface * bitmask: bitmask to alter * threshold: threshold used check surface pixels (alpha) against * * Returns: * void */ static void set_from_threshold(SDL_Surface *surf, bitmask_t *bitmask, int threshold) { SDL_PixelFormat *format = surf->format; Uint8 bpp = format->BytesPerPixel; Uint8 *pixel = NULL; Uint8 rgba[4]; int x, y; for (y = 0; y < surf->h; ++y) { pixel = (Uint8 *)surf->pixels + y * surf->pitch; for (x = 0; x < surf->w; ++x, pixel += bpp) { SDL_GetRGBA(get_pixel_color(pixel, bpp), format, rgba, rgba + 1, rgba + 2, rgba + 3); if (rgba[3] > threshold) { bitmask_setbit(bitmask, x, y); } } } } /* For each surface pixel's color that is not equal to the colorkey, the * corresponding bitmask bit is set. * * Params: * surf: surface * bitmask: bitmask to alter * colorkey: color used to check surface pixels against * * Returns: * void */ static void set_from_colorkey(SDL_Surface *surf, bitmask_t *bitmask, Uint32 colorkey) { Uint8 bpp = surf->format->BytesPerPixel; Uint8 *pixel = NULL; int x, y; for (y = 0; y < surf->h; ++y) { pixel = (Uint8 *)surf->pixels + y * surf->pitch; for (x = 0; x < surf->w; ++x, pixel += bpp) { if (get_pixel_color(pixel, bpp) != colorkey) { bitmask_setbit(bitmask, x, y); } } } } /* Creates a mask from a given surface. * * Returns: * Mask object or NULL to indicate a fail */ static PyObject * mask_from_surface(PyObject *self, PyObject *args, PyObject *kwargs) { SDL_Surface *surf = NULL; pgSurfaceObject *surfobj; pgMaskObject *maskobj = NULL; Uint32 colorkey; int threshold = 127; /* default value */ int use_thresh = 1; static char *keywords[] = {"surface", "threshold", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|i", keywords, &pgSurface_Type, &surfobj, &threshold)) { return NULL; /* Exception already set. */ } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->w < 0 || surf->h < 0) { return RAISE(PyExc_ValueError, "cannot create mask with negative size"); } maskobj = CREATE_MASK_OBJ(surf->w, surf->h, 0); if (NULL == maskobj) { return NULL; /* Exception already set. */ } if (surf->w == 0 || surf->h == 0) { /* Nothing left to do for 0 sized surfaces. */ return (PyObject *)maskobj; } if (!pgSurface_Lock(surfobj)) { Py_DECREF((PyObject *)maskobj); return RAISE(PyExc_RuntimeError, "cannot lock surface"); } Py_BEGIN_ALLOW_THREADS; /* Release the GIL. */ use_thresh = (SDL_GetColorKey(surf, &colorkey) == -1); if (use_thresh) { set_from_threshold(surf, maskobj->mask, threshold); } else { set_from_colorkey(surf, maskobj->mask, colorkey); } Py_END_ALLOW_THREADS; /* Obtain the GIL. */ if (!pgSurface_Unlock(surfobj)) { Py_DECREF((PyObject *)maskobj); return RAISE(PyExc_RuntimeError, "cannot unlock surface"); } return (PyObject *)maskobj; } /* palette_colors - this only affects surfaces with a palette if true we look at the colors from the palette, otherwise we threshold the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. */ void bitmask_threshold(bitmask_t *m, SDL_Surface *surf, SDL_Surface *surf2, Uint32 color, Uint32 threshold, int palette_colors) { int x, y, rshift, gshift, bshift, rshift2, gshift2, bshift2; int rloss, gloss, bloss, rloss2, gloss2, bloss2; Uint8 *pixels, *pixels2; SDL_PixelFormat *format, *format2; Uint32 the_color, the_color2, rmask, gmask, bmask, rmask2, gmask2, bmask2; Uint8 *pix; Uint8 r, g, b, a; Uint8 tr, tg, tb, ta; int bpp1, bpp2; format = surf->format; rmask = format->Rmask; gmask = format->Gmask; bmask = format->Bmask; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; bpp1 = surf->format->BytesPerPixel; if (surf2) { format2 = surf2->format; rmask2 = format2->Rmask; gmask2 = format2->Gmask; bmask2 = format2->Bmask; rshift2 = format2->Rshift; gshift2 = format2->Gshift; bshift2 = format2->Bshift; rloss2 = format2->Rloss; gloss2 = format2->Gloss; bloss2 = format2->Bloss; pixels2 = (Uint8 *)surf2->pixels; bpp2 = surf->format->BytesPerPixel; } else { /* make gcc stop complaining */ rmask2 = gmask2 = bmask2 = 0; rshift2 = gshift2 = bshift2 = 0; rloss2 = gloss2 = bloss2 = 0; format2 = NULL; pixels2 = NULL; bpp2 = 0; } SDL_GetRGBA(color, format, &r, &g, &b, &a); SDL_GetRGBA(threshold, format, &tr, &tg, &tb, &ta); for (y = 0; y < surf->h; y++) { pixels = (Uint8 *)surf->pixels + y * surf->pitch; if (surf2) { pixels2 = (Uint8 *)surf2->pixels + y * surf2->pitch; } for (x = 0; x < surf->w; x++) { /* the_color = surf->get_at(x,y) */ switch (bpp1) { case 1: the_color = (Uint32) * ((Uint8 *)pixels); pixels++; break; case 2: the_color = (Uint32) * ((Uint16 *)pixels); pixels += 2; break; case 3: pix = ((Uint8 *)pixels); pixels += 3; #if SDL_BYTEORDER == SDL_LIL_ENDIAN the_color = (pix[0]) + (pix[1] << 8) + (pix[2] << 16); #else the_color = (pix[2]) + (pix[1] << 8) + (pix[0] << 16); #endif break; default: /* case 4: */ the_color = *((Uint32 *)pixels); pixels += 4; break; } if (surf2) { switch (bpp2) { case 1: the_color2 = (Uint32) * ((Uint8 *)pixels2); pixels2++; break; case 2: the_color2 = (Uint32) * ((Uint16 *)pixels2); pixels2 += 2; break; case 3: pix = ((Uint8 *)pixels2); pixels2 += 3; #if SDL_BYTEORDER == SDL_LIL_ENDIAN the_color2 = (pix[0]) + (pix[1] << 8) + (pix[2] << 16); #else the_color2 = (pix[2]) + (pix[1] << 8) + (pix[0] << 16); #endif break; default: /* case 4: */ the_color2 = *((Uint32 *)pixels2); pixels2 += 4; break; } /* TODO: will need to handle surfaces with palette colors. */ if ((bpp2 == 1) && (bpp1 == 1) && (!palette_colors)) { /* Don't look at the color of the surface, just use the value. This is useful for 8bit images that aren't actually using the palette. */ if (abs_diff_uint32(the_color2, the_color) < tr) { /* this pixel is within the threshold of othersurface. */ bitmask_setbit(m, x, y); } } else if ((abs_diff_uint32( (((the_color2 & rmask2) >> rshift2) << rloss2), (((the_color & rmask) >> rshift) << rloss)) < tr) && (abs_diff_uint32( (((the_color2 & gmask2) >> gshift2) << gloss2), (((the_color & gmask) >> gshift) << gloss)) < tg) && (abs_diff_uint32( (((the_color2 & bmask2) >> bshift2) << bloss2), (((the_color & bmask) >> bshift) << bloss)) < tb)) { /* this pixel is within the threshold of othersurface. */ bitmask_setbit(m, x, y); } /* TODO: will need to handle surfaces with palette colors. TODO: will need to handle the case where palette_colors == 0 */ } else if ((abs_diff_uint32( (((the_color & rmask) >> rshift) << rloss), r) < tr) && (abs_diff_uint32( (((the_color & gmask) >> gshift) << gloss), g) < tg) && (abs_diff_uint32( (((the_color & bmask) >> bshift) << bloss), b) < tb)) { /* this pixel is within the threshold of the color. */ bitmask_setbit(m, x, y); } } } } static PyObject * mask_from_threshold(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; pgMaskObject *maskobj = NULL; SDL_Surface *surf = NULL, *surf2 = NULL; PyObject *rgba_obj_color, *rgba_obj_threshold = NULL; Uint8 rgba_color[4]; Uint8 rgba_threshold[4] = {0, 0, 0, 255}; Uint32 color; Uint32 color_threshold; int palette_colors = 1; static char *keywords[] = {"surface", "color", "threshold", "othersurface", "palette_colors", NULL}; if (!PyArg_ParseTupleAndKeywords( args, kwargs, "O!O|OO!i", keywords, &pgSurface_Type, &surfobj, &rgba_obj_color, &rgba_obj_threshold, &pgSurface_Type, &surfobj2, &palette_colors)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surfobj2) { surf2 = pgSurface_AsSurface(surfobj2); if (!surf2) return RAISE(pgExc_SDLError, "display Surface quit"); } if (PyLong_Check(rgba_obj_color)) { color = (Uint32)PyLong_AsLong(rgba_obj_color); } else if (PyLong_Check(rgba_obj_color)) { color = (Uint32)PyLong_AsUnsignedLong(rgba_obj_color); } else if (pg_RGBAFromColorObj(rgba_obj_color, rgba_color)) { color = SDL_MapRGBA(surf->format, rgba_color[0], rgba_color[1], rgba_color[2], rgba_color[3]); } else { return RAISE(PyExc_TypeError, "invalid color argument"); } if (rgba_obj_threshold) { if (PyLong_Check(rgba_obj_threshold)) color_threshold = (Uint32)PyLong_AsLong(rgba_obj_threshold); else if (PyLong_Check(rgba_obj_threshold)) color_threshold = (Uint32)PyLong_AsUnsignedLong(rgba_obj_threshold); else if (pg_RGBAFromColorObj(rgba_obj_threshold, rgba_threshold)) color_threshold = SDL_MapRGBA(surf->format, rgba_threshold[0], rgba_threshold[1], rgba_threshold[2], rgba_threshold[3]); else return RAISE(PyExc_TypeError, "invalid threshold argument"); } else { color_threshold = SDL_MapRGBA(surf->format, rgba_threshold[0], rgba_threshold[1], rgba_threshold[2], rgba_threshold[3]); } maskobj = CREATE_MASK_OBJ(surf->w, surf->h, 0); if (NULL == maskobj) { return NULL; /* Exception already set. */ } pgSurface_Lock(surfobj); if (surfobj2) { pgSurface_Lock(surfobj2); } Py_BEGIN_ALLOW_THREADS; bitmask_threshold(maskobj->mask, surf, surf2, color, color_threshold, palette_colors); Py_END_ALLOW_THREADS; pgSurface_Unlock(surfobj); if (surfobj2) { pgSurface_Unlock(surfobj2); } return (PyObject *)maskobj; } /* The initial labelling phase of the connected components algorithm. * * Connected component labeling based on the SAUF algorithm by Kesheng Wu, * Ekow Otoo, and Kenji Suzuki. The algorithm is best explained by their * paper, "Two Strategies to Speed up Connected Component Labeling Algorithms", * but in summary, it is a very efficient two pass method for 8-connected * components. It uses a decision tree to minimize the number of neighbors that * need to be checked. It stores equivalence information in an array based * union-find. * * Params: * input - the input mask * image - an array to store labelled pixels * ufind - the union-find label equivalence array * largest - an array to store the number of pixels for each label * * Returns: * the highest label in the labelled image */ unsigned int cc_label(bitmask_t *input, unsigned int *image, unsigned int *ufind, unsigned int *largest) { unsigned int *buf; unsigned int x, y, w, h, root, aroot, croot, temp, label; label = 0; w = input->w; h = input->h; ufind[0] = 0; buf = image; /* special case for first pixel */ if (bitmask_getbit(input, 0, 0)) { /* process for a new connected comp: */ label++; /* create a new label */ *buf = label; /* give the pixel the label */ ufind[label] = label; /* put the label in the equivalence array */ largest[label] = 1; /* the label has 1 pixel associated with it */ } else { *buf = 0; } buf++; /* special case for first row. Go over the first row except the first pixel. */ for (x = 1; x < w; x++) { if (bitmask_getbit(input, x, 0)) { if (*(buf - 1)) { /* d label */ *buf = *(buf - 1); } else { /* create label */ label++; *buf = label; ufind[label] = label; largest[label] = 0; } largest[*buf]++; } else { *buf = 0; } buf++; } /* the rest of the image */ for (y = 1; y < h; y++) { /* first pixel of the row */ if (bitmask_getbit(input, 0, y)) { if (*(buf - w)) { /* b label */ *buf = *(buf - w); } else if (*(buf - w + 1)) { /* c label */ *buf = *(buf - w + 1); } else { /* create label */ label++; *buf = label; ufind[label] = label; largest[label] = 0; } largest[*buf]++; } else { *buf = 0; } buf++; /* middle pixels of the row */ for (x = 1; x < (w - 1); x++) { if (bitmask_getbit(input, x, y)) { if (*(buf - w)) { /* b label */ *buf = *(buf - w); } else if (*(buf - w + 1)) { /* c branch of tree */ if (*(buf - w - 1)) { /* union(c, a) */ croot = root = *(buf - w + 1); while (ufind[root] < root) { /* find root */ root = ufind[root]; } if (croot != *(buf - w - 1)) { temp = aroot = *(buf - w - 1); while (ufind[aroot] < aroot) { /* find root */ aroot = ufind[aroot]; } if (root > aroot) { root = aroot; } while (ufind[temp] > root) { /* set root */ aroot = ufind[temp]; ufind[temp] = root; temp = aroot; } } while (ufind[croot] > root) { /* set root */ temp = ufind[croot]; ufind[croot] = root; croot = temp; } *buf = root; } else if (*(buf - 1)) { /* union(c, d) */ croot = root = *(buf - w + 1); while (ufind[root] < root) { /* find root */ root = ufind[root]; } if (croot != *(buf - 1)) { temp = aroot = *(buf - 1); while (ufind[aroot] < aroot) { /* find root */ aroot = ufind[aroot]; } if (root > aroot) { root = aroot; } while (ufind[temp] > root) { /* set root */ aroot = ufind[temp]; ufind[temp] = root; temp = aroot; } } while (ufind[croot] > root) { /* set root */ temp = ufind[croot]; ufind[croot] = root; croot = temp; } *buf = root; } else { /* c label */ *buf = *(buf - w + 1); } } else if (*(buf - w - 1)) { /* a label */ *buf = *(buf - w - 1); } else if (*(buf - 1)) { /* d label */ *buf = *(buf - 1); } else { /* create label */ label++; *buf = label; ufind[label] = label; largest[label] = 0; } largest[*buf]++; } else { *buf = 0; } buf++; } /* last pixel of the row, if its not also the first pixel of the row */ if (w > 1) { if (bitmask_getbit(input, x, y)) { if (*(buf - w)) { /* b label */ *buf = *(buf - w); } else if (*(buf - w - 1)) { /* a label */ *buf = *(buf - w - 1); } else if (*(buf - 1)) { /* d label */ *buf = *(buf - 1); } else { /* create label */ label++; *buf = label; ufind[label] = label; largest[label] = 0; } largest[*buf]++; } else { *buf = 0; } buf++; } } return label; } /* Creates a bounding rect for each connected component in the given mask. * * Allocates memory for rects. * * NOTE: Caller is responsible for freeing the "ret_rects" memory. * * Params: * input - mask to search in for the connected components to bound * num_bounding_boxes - passes back the number of bounding rects found * ret_rects - passes back the bounding rects that are found with the first * rect at index 1, memory is allocated * * Returns: * 0 on success * -2 on memory allocation error */ static int get_bounding_rects(bitmask_t *input, int *num_bounding_boxes, SDL_Rect **ret_rects) { unsigned int *image, *ufind, *largest, *buf; unsigned int x_uf, label = 0; int x, y, w, h, temp, relabel; SDL_Rect *rects; rects = NULL; w = input->w; h = input->h; if (!w || !h) { *ret_rects = rects; return 0; } /* a temporary image to assign labels to each bit of the mask */ image = (unsigned int *)malloc(sizeof(unsigned int) * w * h); if (!image) { return -2; } /* allocate enough space for the maximum possible connected components */ /* the union-find array. see wikipedia for info on union find */ ufind = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!ufind) { free(image); return -2; } largest = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!largest) { free(image); free(ufind); return -2; } /* do the initial labelling */ label = cc_label(input, image, ufind, largest); relabel = 0; /* flatten and relabel the union-find equivalence array. Start at label 1 because label 0 indicates an unset pixel. For this reason, we also use <= label rather than < label. */ for (x_uf = 1; x_uf <= label; ++x_uf) { if (ufind[x_uf] < x_uf) { /* is it a union find root? */ ufind[x_uf] = ufind[ufind[x_uf]]; /* relabel it to its root */ } else { /* its a root */ relabel++; ufind[x_uf] = relabel; /* assign the lowest label available */ } } *num_bounding_boxes = relabel; if (relabel == 0) { /* early out, as we didn't find anything. */ free(image); free(ufind); free(largest); *ret_rects = rects; return 0; } /* the bounding rects, need enough space for the number of labels */ rects = (SDL_Rect *)malloc(sizeof(SDL_Rect) * (relabel + 1)); if (!rects) { free(image); free(ufind); free(largest); return -2; } for (temp = 0; temp <= relabel; temp++) { rects[temp].h = 0; /* so we know if its a new rect or not */ } /* find the bounding rect of each connected component */ buf = image; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { if (ufind[*buf]) { /* if the pixel is part of a component */ if (rects[ufind[*buf]].h) { /* the component has a rect */ temp = rects[ufind[*buf]].x; rects[ufind[*buf]].x = MIN(x, temp); rects[ufind[*buf]].y = MIN(y, rects[ufind[*buf]].y); rects[ufind[*buf]].w = MAX(rects[ufind[*buf]].w + temp, x + 1) - rects[ufind[*buf]].x; rects[ufind[*buf]].h = MAX(rects[ufind[*buf]].h, y - rects[ufind[*buf]].y + 1); } else { /* otherwise, start the rect */ rects[ufind[*buf]].x = x; rects[ufind[*buf]].y = y; rects[ufind[*buf]].w = 1; rects[ufind[*buf]].h = 1; } } buf++; } } free(image); free(ufind); free(largest); *ret_rects = rects; return 0; } static PyObject * mask_get_bounding_rects(PyObject *self, PyObject *_null) { SDL_Rect *regions; SDL_Rect *aregion; int num_bounding_boxes, i, r; PyObject *rect_list; PyObject *rect; bitmask_t *mask = pgMask_AsBitmap(self); rect_list = NULL; regions = NULL; aregion = NULL; num_bounding_boxes = 0; Py_BEGIN_ALLOW_THREADS; r = get_bounding_rects(mask, &num_bounding_boxes, ®ions); Py_END_ALLOW_THREADS; if (r == -2) { /* memory out failure */ return RAISE(PyExc_MemoryError, "Not enough memory to get bounding rects. \n"); } rect_list = PyList_New(0); if (!rect_list) { free(regions); return NULL; /* Exception already set. */ } /* build a list of rects to return. Starts at 1 because we never use 0. */ for (i = 1; i <= num_bounding_boxes; i++) { aregion = regions + i; rect = pgRect_New4(aregion->x, aregion->y, aregion->w, aregion->h); if (NULL == rect) { Py_DECREF(rect_list); free(regions); return RAISE(PyExc_MemoryError, "cannot allocate memory for bounding rects"); } if (0 != PyList_Append(rect_list, rect)) { Py_DECREF(rect); Py_DECREF(rect_list); free(regions); return NULL; /* Exception already set. */ } Py_DECREF(rect); } free(regions); return rect_list; } /* Finds all the connected components in a given mask. * * Allocates memory for components. * * NOTE: Caller is responsible for freeing the "components" memory. * * Params: * mask - mask to search in for the connected components * components - passes back an array of connected component masks with the * first component at index 1, memory is allocated * min - minimum number of pixels for a component to be considered, * defaults to 0 for negative values * * Returns: * the number of connected components (>= 0) * -2 on memory allocation error */ static int get_connected_components(bitmask_t *mask, bitmask_t ***components, int min) { unsigned int *image, *ufind, *largest, *buf; unsigned int x_uf, min_cc, label = 0; int x, y, w, h, relabel; bitmask_t **comps; w = mask->w; h = mask->h; if (!w || !h) { return 0; } /* a temporary image to assign labels to each bit of the mask */ image = (unsigned int *)malloc(sizeof(unsigned int) * w * h); if (!image) { return -2; } /* allocate enough space for the maximum possible connected components */ /* the union-find array. see wikipedia for info on union find */ ufind = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!ufind) { free(image); return -2; } largest = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!largest) { free(image); free(ufind); return -2; } /* do the initial labelling */ label = cc_label(mask, image, ufind, largest); for (x_uf = 1; x_uf <= label; ++x_uf) { if (ufind[x_uf] < x_uf) { largest[ufind[x_uf]] += largest[x_uf]; } } relabel = 0; min_cc = (0 < min) ? (unsigned int)min : 0; /* flatten and relabel the union-find equivalence array. Start at label 1 because label 0 indicates an unset pixel. For this reason, we also use <= label rather than < label. */ for (x_uf = 1; x_uf <= label; ++x_uf) { if (ufind[x_uf] < x_uf) { /* is it a union find root? */ ufind[x_uf] = ufind[ufind[x_uf]]; /* relabel it to its root */ } else { /* its a root */ if (largest[x_uf] >= min_cc) { relabel++; ufind[x_uf] = relabel; /* assign the lowest label available */ } else { ufind[x_uf] = 0; } } } if (relabel == 0) { /* early out, as we didn't find anything. */ free(image); free(ufind); free(largest); return 0; } /* allocate space for the mask array */ comps = (bitmask_t **)malloc(sizeof(bitmask_t *) * (relabel + 1)); if (!comps) { free(image); free(ufind); free(largest); return -2; } /* create the empty masks */ for (x = 1; x <= relabel; x++) { comps[x] = bitmask_create(w, h); } /* set the bits in each mask */ buf = image; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { if (ufind[*buf]) { /* if the pixel is part of a component */ bitmask_setbit(comps[ufind[*buf]], x, y); } buf++; } } free(image); free(ufind); free(largest); *components = comps; return relabel; } static PyObject * mask_connected_components(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *mask_list = NULL; pgMaskObject *maskobj = NULL; bitmask_t **components = NULL; bitmask_t *mask = pgMask_AsBitmap(self); int i, m, num_components, min = 0; /* Default min value. */ static char *keywords[] = {"minimum", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", keywords, &min)) { return NULL; /* Exception already set. */ } Py_BEGIN_ALLOW_THREADS; num_components = get_connected_components(mask, &components, min); Py_END_ALLOW_THREADS; if (num_components == -2) { return RAISE(PyExc_MemoryError, "cannot allocate memory for connected components"); } mask_list = PyList_New(0); if (!mask_list) { /* Components were allocated starting at index 1. */ for (i = 1; i <= num_components; ++i) { bitmask_free(components[i]); } free(components); return NULL; /* Exception already set. */ } /* Components were allocated starting at index 1. */ for (i = 1; i <= num_components; ++i) { maskobj = create_mask_using_bitmask(components[i]); if (NULL == maskobj) { /* Starting freeing with the current index. */ for (m = i; m <= num_components; ++m) { bitmask_free(components[m]); } free(components); Py_DECREF(mask_list); return NULL; /* Exception already set. */ } if (0 != PyList_Append(mask_list, (PyObject *)maskobj)) { /* Can't append to the list. Starting freeing with the next index * as maskobj contains the component from the current index. */ for (m = i + 1; m <= num_components; ++m) { bitmask_free(components[m]); } free(components); Py_DECREF((PyObject *)maskobj); Py_DECREF(mask_list); return NULL; /* Exception already set. */ } Py_DECREF((PyObject *)maskobj); } free(components); return mask_list; } /* Finds the largest connected component in a given mask. * * Tracks the number of pixels in each label, finding the biggest one while * flattening the union-find equivalence array. It then writes an output mask * containing only the largest connected component. * * Params: * input - mask to search in for the largest connected component * output - this mask is updated with the largest connected component * ccx - x index, if < 0 then the largest connected component in the input * mask is found and copied to the output mask, otherwise the connected * component at (ccx, ccy) is copied to the output mask * ccy - y index * * Returns: * 0 on success * -2 on memory allocation error */ static int largest_connected_comp(bitmask_t *input, bitmask_t *output, int ccx, int ccy) { unsigned int *image, *ufind, *largest, *buf; unsigned int max, x, y, w, h, label; w = input->w; h = input->h; if (!w || !h) { return 0; } /* a temporary image to assign labels to each bit of the mask */ image = (unsigned int *)malloc(sizeof(unsigned int) * w * h); if (!image) { return -2; } /* allocate enough space for the maximum possible connected components */ /* the union-find array. see wikipedia for info on union find */ ufind = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!ufind) { free(image); return -2; } /* an array to track the number of pixels associated with each label */ largest = (unsigned int *)malloc(sizeof(unsigned int) * (w / 2 + 1) * (h / 2 + 1)); if (!largest) { free(image); free(ufind); return -2; } /* do the initial labelling */ label = cc_label(input, image, ufind, largest); max = 1; /* flatten the union-find equivalence array */ for (x = 2; x <= label; x++) { if (ufind[x] != x) { /* is it a union find root? */ largest[ufind[x]] += largest[x]; /* add its pixels to its root */ ufind[x] = ufind[ufind[x]]; /* relabel it to its root */ } if (largest[ufind[x]] > largest[max]) { /* is it the new biggest? */ max = ufind[x]; } } /* write out the final image */ buf = image; if (ccx >= 0) max = ufind[*(buf + ccy * w + ccx)]; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { if (ufind[*buf] == max) { /* if the label is the max one */ bitmask_setbit(output, x, y); /* set the bit in the mask */ } buf++; } } free(image); free(ufind); free(largest); return 0; } static PyObject * mask_connected_component(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *input = pgMask_AsBitmap(self); pgMaskObject *output_maskobj = NULL; int x = -1, y = -1; Py_ssize_t args_exist = PyTuple_Size(args); PyObject *pos = NULL; static char *keywords[] = {"pos", NULL}; if (kwargs) args_exist += PyDict_Size(kwargs); if (args_exist) { if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", keywords, &pos)) { return NULL; /* Exception already set. */ } if (!pg_TwoIntsFromObj(pos, &x, &y)) { return RAISE(PyExc_TypeError, "pos must be two numbers"); } if (x < 0 || x >= input->w || y < 0 || y >= input->h) { return PyErr_Format(PyExc_IndexError, "%d, %d is out of bounds", x, y); } } output_maskobj = CREATE_MASK_OBJ(input->w, input->h, 0); if (NULL == output_maskobj) { return NULL; /* Exception already set. */ } /* If a pixel index is provided and the indexed bit is not set, then the * returned mask is empty. */ if (!args_exist || bitmask_getbit(input, x, y)) { if (largest_connected_comp(input, output_maskobj->mask, x, y) == -2) { Py_DECREF(output_maskobj); return RAISE(PyExc_MemoryError, "cannot allocate memory for connected component"); } } return (PyObject *)output_maskobj; } /* Extract the color data from a color object. * * Params: * surf: surface that color will be mapped from * color_obj: color object to extract color data from * rbga_color: rbga array, contains default color if color_obj is NULL * color: color value extracted from the color_obj (or from the default * value of rbga_color) * * Returns: * int: 1, means the color data extraction was successful and the color * parameter contains a valid color value * 0, means the color data extraction has failed and an exception has * been set */ static int extract_color(SDL_Surface *surf, PyObject *color_obj, Uint8 rgba_color[], Uint32 *color) { if (NULL == color_obj) { *color = SDL_MapRGBA(surf->format, rgba_color[0], rgba_color[1], rgba_color[2], rgba_color[3]); return 1; } if (PyLong_Check(color_obj)) { long intval = PyLong_AsLong(color_obj); if ((-1 == intval && PyErr_Occurred()) || intval > (long)0xFFFFFFFF) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } *color = (Uint32)intval; return 1; } if (PyLong_Check(color_obj)) { unsigned long longval = PyLong_AsUnsignedLong(color_obj); if (PyErr_Occurred() || longval > 0xFFFFFFFF) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } *color = (Uint32)longval; return 1; } if (pg_RGBAFromFuzzyColorObj(color_obj, rgba_color)) { *color = SDL_MapRGBA(surf->format, rgba_color[0], rgba_color[1], rgba_color[2], rgba_color[3]); return 1; } return 0; /* Exception already set. */ } /* Draws a mask on a surface. * * Params: * surf: surface to draw on * bitmask: bitmask to draw * x_dest: x position on surface of where to start drawing * y_dest: y position on surface of where to start drawing * draw_setbits: if non-zero then draw the set bits (bits==1) * draw_unsetbits: if non-zero then draw the unset bits (bits==0) * setsurf: use colors from this surface for set bits (bits==1) * unsetsurf: use colors from this surface for unset bits (bits==0) * setcolor: color for set bits, setsurf takes precedence (bits==1) * unsetcolor: color for unset bits, unsetsurf takes precedence (bits==0) * * Assumptions: * - surf and bitmask are non-NULL * - all surfaces have the same pixel format * - all surfaces that are non-NULL are locked */ static void draw_to_surface(SDL_Surface *surf, bitmask_t *bitmask, int x_dest, int y_dest, int draw_setbits, int draw_unsetbits, SDL_Surface *setsurf, SDL_Surface *unsetsurf, Uint32 *setcolor, Uint32 *unsetcolor) { Uint8 *pixel = NULL; Uint8 bpp; int x, y, x_end, y_end, x_start, y_start; /* surf indexing */ int xm, ym, xm_start, ym_start; /* bitmask/setsurf/unsetsurf indexing */ /* There is nothing to do when any of these conditions exist: * - surface has a width or height of <= 0 * - mask has a width or height of <= 0 * - draw_setbits and draw_unsetbits are both 0 */ if ((surf->h <= 0) || (surf->w <= 0) || (bitmask->h <= 0) || (bitmask->w <= 0) || (!draw_setbits && !draw_unsetbits)) { return; } /* There is also nothing to do when the destination position is such that * nothing will be drawn on the surface. */ if ((x_dest >= surf->w) || (y_dest >= surf->h) || (-x_dest > bitmask->w) || (-y_dest > bitmask->h)) { return; } bpp = surf->format->BytesPerPixel; xm_start = (x_dest < 0) ? -x_dest : 0; x_start = (x_dest > 0) ? x_dest : 0; x_end = MIN(surf->w, bitmask->w + x_dest); ym_start = (y_dest < 0) ? -y_dest : 0; y_start = (y_dest > 0) ? y_dest : 0; y_end = MIN(surf->h, bitmask->h + y_dest); if (NULL == setsurf && NULL == unsetsurf) { /* Draw just using color values. No surfaces. */ draw_setbits = draw_setbits && NULL != setcolor; draw_unsetbits = draw_unsetbits && NULL != unsetcolor; for (y = y_start, ym = ym_start; y < y_end; ++y, ++ym) { pixel = (Uint8 *)surf->pixels + y * surf->pitch + x_start * bpp; for (x = x_start, xm = xm_start; x < x_end; ++x, ++xm, pixel += bpp) { if (bitmask_getbit(bitmask, xm, ym)) { if (draw_setbits) { set_pixel_color(pixel, bpp, *setcolor); } } else if (draw_unsetbits) { set_pixel_color(pixel, bpp, *unsetcolor); } } } } else if (NULL == setcolor && NULL == unsetcolor && NULL != setsurf && NULL != unsetsurf && setsurf->h + y_dest >= y_end && setsurf->w + x_dest >= x_end && unsetsurf->h + y_dest >= y_end && unsetsurf->w + x_dest >= x_end) { /* Draw using surfaces that are as big (or bigger) as what is being * drawn and no color values are being used. */ Uint8 *setpixel = NULL, *unsetpixel = NULL; for (y = y_start, ym = ym_start; y < y_end; ++y, ++ym) { pixel = (Uint8 *)surf->pixels + y * surf->pitch + x_start * bpp; setpixel = (Uint8 *)setsurf->pixels + ym * setsurf->pitch + xm_start * bpp; unsetpixel = (Uint8 *)unsetsurf->pixels + ym * unsetsurf->pitch + xm_start * bpp; for (x = x_start, xm = xm_start; x < x_end; ++x, ++xm, pixel += bpp, setpixel += bpp, unsetpixel += bpp) { if (bitmask_getbit(bitmask, xm, ym)) { if (draw_setbits) { set_pixel_color(pixel, bpp, get_pixel_color(setpixel, bpp)); } } else if (draw_unsetbits) { set_pixel_color(pixel, bpp, get_pixel_color(unsetpixel, bpp)); } } } } else { /* Draw using surfaces and color values. */ Uint8 *setpixel = NULL, *unsetpixel = NULL; int use_setsurf, use_unsetsurf; /* Looping over each bit in the mask and deciding whether to use a * color from setsurf/unsetsurf or from setcolor/unsetcolor. */ for (y = y_start, ym = ym_start; y < y_end; ++y, ++ym) { pixel = (Uint8 *)surf->pixels + y * surf->pitch + x_start * bpp; use_setsurf = draw_setbits && NULL != setsurf && setsurf->h > ym; use_unsetsurf = draw_unsetbits && NULL != unsetsurf && unsetsurf->h > ym; if (use_setsurf) { setpixel = (Uint8 *)setsurf->pixels + ym * setsurf->pitch + xm_start * bpp; } if (use_unsetsurf) { unsetpixel = (Uint8 *)unsetsurf->pixels + ym * unsetsurf->pitch + xm_start * bpp; } for (x = x_start, xm = xm_start; x < x_end; ++x, ++xm, pixel += bpp) { if (bitmask_getbit(bitmask, xm, ym)) { if (draw_setbits) { if (use_setsurf && setsurf->w > xm) { set_pixel_color(pixel, bpp, get_pixel_color(setpixel, bpp)); } else if (NULL != setcolor) { set_pixel_color(pixel, bpp, *setcolor); } } } else if (draw_unsetbits) { if (use_unsetsurf && unsetsurf->w > xm) { set_pixel_color(pixel, bpp, get_pixel_color(unsetpixel, bpp)); } else if (NULL != unsetcolor) { set_pixel_color(pixel, bpp, *unsetcolor); } } if (use_setsurf) { setpixel += bpp; } if (use_unsetsurf) { unsetpixel += bpp; } } } } } /* Checks if the surfaces have the same pixel formats. * * Params: * surf: surface to check against * check_surf: surface to check * * Returns: * int: 0 to indicate surfaces don't have the same format * 1 to indicate the surfaces have the same format * * Assumptions: * - both parameters are non-NULL * - these checks are enough to assume the pixel formats are the same */ static int check_surface_pixel_format(SDL_Surface *surf, SDL_Surface *check_surf) { if ((surf->format->BytesPerPixel != check_surf->format->BytesPerPixel) || (surf->format->BitsPerPixel != check_surf->format->BitsPerPixel) || (surf->format->format != check_surf->format->format)) { return 0; } return 1; } /* Draws a mask on a surface. * * Returns: * Surface object or NULL to indicate a fail. */ static PyObject * mask_to_surface(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *surfobj = Py_None, *setcolorobj = NULL, *unsetcolorobj = NULL; PyObject *setsurfobj = Py_None, *unsetsurfobj = Py_None; PyObject *destobj = NULL; SDL_Surface *surf = NULL, *setsurf = NULL, *unsetsurf = NULL; bitmask_t *bitmask = pgMask_AsBitmap(self); Uint32 *setcolor_ptr = NULL, *unsetcolor_ptr = NULL; Uint32 setcolor, unsetcolor; int draw_setbits = 0, draw_unsetbits = 0; int created_surfobj = 0; /* Set to 1 if this func creates the surfobj. */ int x_dest = 0, y_dest = 0; /* Default destination coordinates. */ Uint8 dflt_setcolor[] = {255, 255, 255, 255}; /* Default set color. */ Uint8 dflt_unsetcolor[] = {0, 0, 0, 255}; /* Default unset color. */ static char *keywords[] = {"surface", "setsurface", "unsetsurface", "setcolor", "unsetcolor", "dest", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOOOO", keywords, &surfobj, &setsurfobj, &unsetsurfobj, &setcolorobj, &unsetcolorobj, &destobj)) { return NULL; /* Exception already set. */ } if (Py_None == surfobj) { surfobj = PyObject_CallFunction((PyObject *)&pgSurface_Type, "(ii)ii", bitmask->w, bitmask->h, PGS_SRCALPHA, 32); if (NULL == surfobj) { if (!PyErr_Occurred()) { return RAISE(PyExc_RuntimeError, "unable to create surface"); } return NULL; } created_surfobj = 1; } else if (!pgSurface_Check(surfobj)) { return RAISE(PyExc_TypeError, "invalid surface argument"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (Py_None != setsurfobj) { if (!pgSurface_Check(setsurfobj)) { PyErr_SetString(PyExc_TypeError, "invalid setsurface argument"); goto to_surface_error; } setsurf = pgSurface_AsSurface(setsurfobj); if (!setsurf) return RAISE(pgExc_SDLError, "display Surface quit"); if (0 == check_surface_pixel_format(surf, setsurf)) { /* Needs to have the same format settings as surface. */ PyErr_SetString(PyExc_ValueError, "setsurface needs to have same " "bytesize/bitsize/alpha format as surface"); goto to_surface_error; } else if ((setsurf->h <= 0) || (setsurf->w <= 0)) { /* Surface has no usable color positions, so ignore it. */ setsurf = NULL; } else { draw_setbits = 1; } } if (Py_None != unsetsurfobj) { if (!pgSurface_Check(unsetsurfobj)) { PyErr_SetString(PyExc_TypeError, "invalid unsetsurface argument"); goto to_surface_error; } unsetsurf = pgSurface_AsSurface(unsetsurfobj); if (!unsetsurf) return RAISE(pgExc_SDLError, "display Surface quit"); if (0 == check_surface_pixel_format(surf, unsetsurf)) { /* Needs to have the same format settings as surface. */ PyErr_SetString(PyExc_ValueError, "unsetsurface needs to have same " "bytesize/bitsize/alpha format as surface"); goto to_surface_error; } else if ((unsetsurf->h <= 0) || (unsetsurf->w <= 0)) { /* Surface has no usable color positions, so ignore it. */ unsetsurf = NULL; } else { draw_unsetbits = 1; } } if (Py_None != setcolorobj) { if (!extract_color(surf, setcolorobj, dflt_setcolor, &setcolor)) { goto to_surface_error; /* Exception already set. */ } setcolor_ptr = &setcolor; draw_setbits = 1; } if (Py_None != unsetcolorobj) { if (!extract_color(surf, unsetcolorobj, dflt_unsetcolor, &unsetcolor)) { goto to_surface_error; /* Exception already set. */ } unsetcolor_ptr = &unsetcolor; draw_unsetbits = 1; } if (NULL != destobj) { int tempx = 0, tempy = 0; /* Destination coordinates can be extracted from: * - lists/tuples with 2 items * - Rect (or Rect like) objects (uses x, y values) */ if (pg_TwoIntsFromObj(destobj, &tempx, &tempy)) { x_dest = tempx; y_dest = tempy; } else { SDL_Rect temp_rect; SDL_Rect *dest_rect = pgRect_FromObject(destobj, &temp_rect); if (NULL != dest_rect) { x_dest = dest_rect->x; y_dest = dest_rect->y; } else { PyErr_SetString(PyExc_TypeError, "invalid dest argument"); goto to_surface_error; } } } if (!pgSurface_Lock((pgSurfaceObject *)surfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot lock surface"); goto to_surface_error; } /* Only lock the setsurface if it is being used. * i.e. setsurf is non-NULL */ if (NULL != setsurf && !pgSurface_Lock((pgSurfaceObject *)setsurfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot lock setsurface"); goto to_surface_error; } /* Only lock the unsetsurface if it is being used. * i.e.. unsetsurf is non-NULL. */ if (NULL != unsetsurf && !pgSurface_Lock((pgSurfaceObject *)unsetsurfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot lock unsetsurface"); goto to_surface_error; } Py_BEGIN_ALLOW_THREADS; /* Release the GIL. */ draw_to_surface(surf, bitmask, x_dest, y_dest, draw_setbits, draw_unsetbits, setsurf, unsetsurf, setcolor_ptr, unsetcolor_ptr); Py_END_ALLOW_THREADS; /* Obtain the GIL. */ if (NULL != unsetsurf && !pgSurface_Unlock((pgSurfaceObject *)unsetsurfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot unlock unsetsurface"); goto to_surface_error; } if (NULL != setsurf && !pgSurface_Unlock((pgSurfaceObject *)setsurfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot unlock setsurface"); goto to_surface_error; } if (!pgSurface_Unlock((pgSurfaceObject *)surfobj)) { PyErr_SetString(PyExc_RuntimeError, "cannot unlock surface"); goto to_surface_error; } if (!created_surfobj) { /* Only increase ref count if this func didn't create the surfobj. */ Py_INCREF(surfobj); } return surfobj; /* Handles the cleanup for fail cases. */ to_surface_error: if (created_surfobj) { /* Only decrease ref count if this func created the surfobj. */ Py_DECREF(surfobj); } return NULL; } static PyMethodDef mask_methods[] = { {"__copy__", mask_copy, METH_NOARGS, DOC_MASKCOPY}, {"copy", mask_call_copy, METH_NOARGS, DOC_MASKCOPY}, {"get_size", mask_get_size, METH_NOARGS, DOC_MASKGETSIZE}, {"get_rect", (PyCFunction)mask_get_rect, METH_VARARGS | METH_KEYWORDS, DOC_MASKGETRECT}, {"get_at", (PyCFunction)mask_get_at, METH_VARARGS | METH_KEYWORDS, DOC_MASKGETAT}, {"set_at", (PyCFunction)mask_set_at, METH_VARARGS | METH_KEYWORDS, DOC_MASKSETAT}, {"overlap", (PyCFunction)mask_overlap, METH_VARARGS | METH_KEYWORDS, DOC_MASKOVERLAP}, {"overlap_area", (PyCFunction)mask_overlap_area, METH_VARARGS | METH_KEYWORDS, DOC_MASKOVERLAPAREA}, {"overlap_mask", (PyCFunction)mask_overlap_mask, METH_VARARGS | METH_KEYWORDS, DOC_MASKOVERLAPMASK}, {"fill", mask_fill, METH_NOARGS, DOC_MASKFILL}, {"clear", mask_clear, METH_NOARGS, DOC_MASKCLEAR}, {"invert", mask_invert, METH_NOARGS, DOC_MASKINVERT}, {"scale", (PyCFunction)mask_scale, METH_VARARGS | METH_KEYWORDS, DOC_MASKSCALE}, {"draw", (PyCFunction)mask_draw, METH_VARARGS | METH_KEYWORDS, DOC_MASKDRAW}, {"erase", (PyCFunction)mask_erase, METH_VARARGS | METH_KEYWORDS, DOC_MASKERASE}, {"count", mask_count, METH_NOARGS, DOC_MASKCOUNT}, {"centroid", mask_centroid, METH_NOARGS, DOC_MASKCENTROID}, {"angle", mask_angle, METH_NOARGS, DOC_MASKANGLE}, {"outline", (PyCFunction)mask_outline, METH_VARARGS | METH_KEYWORDS, DOC_MASKOUTLINE}, {"convolve", (PyCFunction)mask_convolve, METH_VARARGS | METH_KEYWORDS, DOC_MASKCONVOLVE}, {"connected_component", (PyCFunction)mask_connected_component, METH_VARARGS | METH_KEYWORDS, DOC_MASKCONNECTEDCOMPONENT}, {"connected_components", (PyCFunction)mask_connected_components, METH_VARARGS | METH_KEYWORDS, DOC_MASKCONNECTEDCOMPONENTS}, {"get_bounding_rects", mask_get_bounding_rects, METH_NOARGS, DOC_MASKGETBOUNDINGRECTS}, {"to_surface", (PyCFunction)mask_to_surface, METH_VARARGS | METH_KEYWORDS, DOC_MASKTOSURFACE}, {NULL, NULL, 0, NULL}}; /*mask object internals*/ /* This is a helper function for internal use only. * Creates a mask object using an existing bitmask. * * Params: * bitmask: pointer to the bitmask to use * * Returns: * Mask object or NULL to indicate a fail */ static PG_INLINE pgMaskObject * create_mask_using_bitmask(bitmask_t *bitmask) { return create_mask_using_bitmask_and_type(bitmask, &pgMask_Type); } /* This is a helper function for internal use only. * Creates a mask object using an existing bitmask and a type. * * Params: * bitmask: pointer to the bitmask to use * ob_type: pointer to the mask object type to create * * Returns: * Mask object or NULL to indicate a fail */ static PG_INLINE pgMaskObject * create_mask_using_bitmask_and_type(bitmask_t *bitmask, PyTypeObject *ob_type) { /* tp_init is not needed as the bitmask has already been created. */ pgMaskObject *maskobj = (pgMaskObject *)pgMask_Type.tp_new(ob_type, NULL, NULL); if (NULL == maskobj) { return (pgMaskObject *)RAISE(PyExc_MemoryError, "cannot allocate memory for mask"); } maskobj->mask = bitmask; return maskobj; } static void mask_dealloc(PyObject *self) { bitmask_t *bitmask = pgMask_AsBitmap(self); if (NULL != bitmask) { /* Free up the bitmask. */ bitmask_free(bitmask); } /* Free up the mask. */ Py_TYPE(self)->tp_free(self); } static PyObject * mask_repr(PyObject *self) { bitmask_t *mask = pgMask_AsBitmap(self); return PyUnicode_FromFormat("", mask->w, mask->h); } static PyObject * mask_new(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) { pgMaskObject *maskobj = (pgMaskObject *)subtype->tp_alloc(subtype, 0); if (NULL == maskobj) { return RAISE(PyExc_MemoryError, "cannot allocate memory for mask"); } maskobj->mask = NULL; return (PyObject *)maskobj; } static int mask_init(PyObject *self, PyObject *args, PyObject *kwargs) { bitmask_t *bitmask = NULL; PyObject *size = NULL; int w, h; int fill = 0; /* Default is false. */ char *keywords[] = {"size", "fill", NULL}; const char *format = "O|p"; if (!PyArg_ParseTupleAndKeywords(args, kwargs, format, keywords, &size, &fill)) { return -1; } if (!pg_TwoIntsFromObj(size, &w, &h)) { PyErr_SetString(PyExc_TypeError, "size must be two numbers"); return -1; } if (w < 0 || h < 0) { PyErr_SetString(PyExc_ValueError, "cannot create mask with negative size"); return -1; } bitmask = bitmask_create(w, h); if (NULL == bitmask) { PyErr_SetString(PyExc_MemoryError, "cannot allocate memory for bitmask"); return -1; } if (fill) { bitmask_fill(bitmask); } ((pgMaskObject *)self)->mask = bitmask; return 0; } typedef struct { int numbufs; Py_ssize_t shape[2]; Py_ssize_t strides[2]; } mask_bufinfo; static int pgMask_GetBuffer(pgMaskObject *self, Py_buffer *view, int flags) { bitmask_t *m = self->mask; mask_bufinfo *bufinfo = (mask_bufinfo *)self->bufdata; if (bufinfo == NULL) { bufinfo = PyMem_RawMalloc(sizeof(mask_bufinfo)); if (bufinfo == NULL) { PyErr_NoMemory(); return -1; } bufinfo->numbufs = 1; bufinfo->shape[0] = (m->w - 1) / BITMASK_W_LEN + 1; bufinfo->shape[1] = m->h; bufinfo->strides[0] = m->h * sizeof(BITMASK_W); bufinfo->strides[1] = sizeof(BITMASK_W); self->bufdata = bufinfo; } else { bufinfo->numbufs++; } view->buf = m->bits; view->len = m->h * ((m->w - 1) / BITMASK_W_LEN + 1) * sizeof(BITMASK_W); view->readonly = 0; view->itemsize = sizeof(BITMASK_W); view->ndim = 2; view->internal = bufinfo; view->shape = (flags & PyBUF_ND) ? bufinfo->shape : NULL; view->strides = (flags & PyBUF_STRIDES) ? bufinfo->strides : NULL; if (flags & PyBUF_FORMAT) { view->format = "L"; /* L = unsigned long */ } else { view->format = NULL; } view->suboffsets = NULL; Py_INCREF(self); view->obj = (PyObject *)self; return 0; } static void pgMask_ReleaseBuffer(pgMaskObject *self, Py_buffer *view) { mask_bufinfo *bufinfo = (mask_bufinfo *)view->internal; bufinfo->numbufs--; if (bufinfo->numbufs == 0) { PyMem_RawFree(bufinfo); self->bufdata = NULL; } } static PyBufferProcs pgMask_BufferProcs = { (getbufferproc)pgMask_GetBuffer, (releasebufferproc)pgMask_ReleaseBuffer}; static PyTypeObject pgMask_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.mask.Mask", .tp_basicsize = sizeof(pgMaskObject), .tp_dealloc = mask_dealloc, .tp_repr = (reprfunc)mask_repr, .tp_as_buffer = &pgMask_BufferProcs, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMEMASKMASK, .tp_methods = mask_methods, .tp_init = mask_init, .tp_new = mask_new, }; /*mask module methods*/ static PyMethodDef _mask_methods[] = { {"from_surface", (PyCFunction)mask_from_surface, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMASKFROMSURFACE}, {"from_threshold", (PyCFunction)mask_from_threshold, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMASKFROMTHRESHOLD}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(mask) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_MASK_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "mask", DOC_PYGAMEMASK, -1, _mask_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } /* create the mask type */ if (PyType_Ready(&pgMask_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&pgMask_Type); if (PyModule_AddObject(module, "MaskType", (PyObject *)&pgMask_Type)) { Py_DECREF(&pgMask_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgMask_Type); if (PyModule_AddObject(module, "Mask", (PyObject *)&pgMask_Type)) { Py_DECREF(&pgMask_Type); Py_DECREF(module); return NULL; } /* export the c api */ c_api[0] = &pgMask_Type; apiobj = encapsulate_api(c_api, "mask"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.011112 pygame-2.6.1/src_c/mask.h0000644000175100001770000000023114676242340014610 0ustar00runnerdocker#ifndef PGMASK_INTERNAL_H #define PGMASK_INTERNAL_H #include "include/pygame_mask.h" #define PYGAMEAPI_MASK_NUMSLOTS 1 #endif /* ~PGMASK_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/math.c0000644000175100001770000042306614676242340014620 0ustar00runnerdocker/* pygame - Python Game Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Adjust gcc 4.4 optimization for floating point on x86-32 PCs running Linux. * This addresses bug 52: * https://github.com/pygame/pygame/issues/52 * With this option, floats have consistent precision regardless of optimize * level. */ #if defined(__GNUC__) && defined(__linux__) && defined(__i386__) && \ __SIZEOF_POINTER__ == 4 && __GNUC__ == 4 && __GNUC_MINOR__ >= 4 #pragma GCC optimize("float-store") #endif #define PYGAMEAPI_MATH_INTERNAL #define NO_PYGAME_C_API #include "doc/math_doc.h" #include "pygame.h" #include "structmember.h" #include "pgcompat.h" #include #include #include #include /* on some windows platforms math.h doesn't define M_PI */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define TWO_PI (2. * M_PI) #ifndef M_PI_2 #define M_PI_2 (M_PI / 2.0) #endif /* M_PI_2 */ #define VECTOR_EPSILON (1e-6) #define VECTOR_MAX_SIZE (4) #define STRING_BUF_SIZE_REPR (112) #define STRING_BUF_SIZE_STR (103) #define SWIZZLE_ERR_NO_ERR 0 #define SWIZZLE_ERR_DOUBLE_IDX 1 #define SWIZZLE_ERR_EXTRACTION_ERR 2 #define OP_ADD 1 /* #define OP_IADD 2 */ #define OP_SUB 3 /* #define OP_ISUB 4 */ #define OP_MUL 5 /* #define OP_IMUL 6 */ #define OP_DIV 7 /* #define OP_IDIV 8 */ #define OP_FLOOR_DIV 9 /* #define OP_IFLOOR_DIV 10 */ #define OP_MOD 11 #define OP_INPLACE 16 #define OP_ARG_REVERSE 32 #define OP_ARG_UNKNOWN 64 #define OP_ARG_VECTOR 128 #define OP_ARG_NUMBER 256 static PyTypeObject pgVector2_Type; static PyTypeObject pgVector3_Type; static PyTypeObject pgVectorElementwiseProxy_Type; static PyTypeObject pgVectorIter_Type; #define pgVector2_Check(x) (PyType_IsSubtype(Py_TYPE(x), &pgVector2_Type)) #define pgVector3_Check(x) (PyType_IsSubtype(Py_TYPE(x), &pgVector3_Type)) #define pgVector_Check(x) (pgVector2_Check(x) || pgVector3_Check(x)) #define vector_elementwiseproxy_Check(x) \ (Py_TYPE(x) == &pgVectorElementwiseProxy_Type) #define _vector_subtype_new(x) \ ((pgVector *)(Py_TYPE(x)->tp_new(Py_TYPE(x), NULL, NULL))) #define DEG2RAD(angle) ((angle) * M_PI / 180.) #define RAD2DEG(angle) ((angle) * 180. / M_PI) typedef struct { PyObject_HEAD double *coords; /* Coordinates */ Py_ssize_t dim; /* Dimension of the vector */ double epsilon; /* Small value for comparisons */ } pgVector; typedef struct { PyObject_HEAD long it_index; pgVector *vec; } vectoriter; typedef struct { PyObject_HEAD pgVector *vec; } vector_elementwiseproxy; /* further forward declarations */ /* math functions */ static PyObject * math_clamp(PyObject *self, PyObject *const *args, Py_ssize_t nargs); PG_DECLARE_FASTCALL_FUNC(math_clamp, PyObject); /* generic helper functions */ static int RealNumber_Check(PyObject *obj); static double PySequence_GetItem_AsDouble(PyObject *seq, Py_ssize_t index); static int PySequence_AsVectorCoords(PyObject *seq, double *const coords, const Py_ssize_t size); static int pgVectorCompatible_Check(PyObject *obj, Py_ssize_t dim); static double _scalar_product(const double *coords1, const double *coords2, Py_ssize_t size); static int get_double_from_unicode_slice(PyObject *unicode_obj, Py_ssize_t idx1, Py_ssize_t idx2, double *val); static Py_ssize_t _vector_find_string_helper(PyObject *str_obj, const char *substr, Py_ssize_t start, Py_ssize_t end); static Py_ssize_t _vector_coords_from_string(PyObject *str, char **delimiter, double *coords, Py_ssize_t dim); static void _vector_move_towards_helper(Py_ssize_t dim, double *origin_coords, double *target_coords, double max_distance); /* generic vector functions */ static PyObject * pgVector_NEW(Py_ssize_t dim); static void vector_dealloc(pgVector *self); static PyObject * vector_generic_math(PyObject *o1, PyObject *o2, int op); static PyObject * vector_add(PyObject *o1, PyObject *o2); static PyObject * vector_sub(PyObject *o1, PyObject *o2); static PyObject * vector_mul(PyObject *o1, PyObject *o2); static PyObject * vector_div(pgVector *self, PyObject *other); static PyObject * vector_floor_div(pgVector *self, PyObject *other); static PyObject * vector_inplace_add(pgVector *self, PyObject *other); static PyObject * vector_inplace_sub(pgVector *self, PyObject *other); static PyObject * vector_inplace_mul(pgVector *self, PyObject *other); static PyObject * vector_inplace_div(pgVector *self, PyObject *other); static PyObject * vector_inplace_floor_div(pgVector *self, PyObject *other); static PyObject * vector_neg(pgVector *self); static PyObject * vector_pos(pgVector *self); static int vector_nonzero(pgVector *self); static Py_ssize_t vector_len(pgVector *self); static PyObject * vector_GetItem(pgVector *self, Py_ssize_t index); static int vector_SetItem(pgVector *self, Py_ssize_t index, PyObject *value); static int vector_contains(pgVector *self, PyObject *arg); static PyObject * vector_GetSlice(pgVector *self, Py_ssize_t ilow, Py_ssize_t ihigh); static int vector_SetSlice(pgVector *self, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v); static PyObject * vector_getx(pgVector *self, void *closure); static PyObject * vector_gety(pgVector *self, void *closure); static PyObject * vector_getz(pgVector *self, void *closure); #ifdef PYGAME_MATH_VECTOR_HAVE_W static PyObject * vector_getw(pgVector *self, void *closure); #endif static int vector_setx(pgVector *self, PyObject *value, void *closure); static int vector_sety(pgVector *self, PyObject *value, void *closure); static int vector_setz(pgVector *self, PyObject *value, void *closure); #ifdef PYGAME_MATH_VECTOR_HAVE_W static int vector_setw(pgVector *self, PyObject *value, void *closure); #endif static PyObject * vector_richcompare(PyObject *o1, PyObject *o2, int op); static PyObject * vector_length(pgVector *self, PyObject *args); static PyObject * vector_length_squared(pgVector *self, PyObject *args); static PyObject * vector_normalize(pgVector *self, PyObject *args); static PyObject * vector_normalize_ip(pgVector *self, PyObject *args); static PyObject * vector_dot(pgVector *self, PyObject *other); static PyObject * vector_scale_to_length(pgVector *self, PyObject *length); static PyObject * vector_move_towards(pgVector *self, PyObject *args); static PyObject * vector_move_towards_ip(pgVector *self, PyObject *args); static PyObject * vector_slerp(pgVector *self, PyObject *args); static PyObject * vector_lerp(pgVector *self, PyObject *args); static int _vector_reflect_helper(double *dst_coords, const double *src_coords, PyObject *normal, Py_ssize_t dim, double epsilon); static PyObject * vector_reflect(pgVector *self, PyObject *normal); static PyObject * vector_reflect_ip(pgVector *self, PyObject *normal); static double _vector_distance_helper(pgVector *self, PyObject *other); static PyObject * vector_distance_to(pgVector *self, PyObject *other); static PyObject * vector_distance_squared_to(pgVector *self, PyObject *other); static PyObject * vector_getAttr_swizzle(pgVector *self, PyObject *attr_name); static int vector_setAttr_swizzle(pgVector *self, PyObject *attr_name, PyObject *val); static PyObject * vector_elementwise(pgVector *self, PyObject *args); static int _vector_check_snprintf_success(int return_code, int max_size); static PyObject * vector_repr(pgVector *self); static PyObject * vector_str(pgVector *self); static PyObject * vector_project_onto(pgVector *self, PyObject *other); static PyObject * vector_copy(pgVector *self, PyObject *_null); static PyObject * vector_clamp_magnitude(pgVector *self, PyObject *const *args, Py_ssize_t nargs); PG_DECLARE_FASTCALL_FUNC(vector_clamp_magnitude, pgVector); static PyObject * vector_clamp_magnitude_ip(pgVector *self, PyObject *const *args, Py_ssize_t nargs); PG_DECLARE_FASTCALL_FUNC(vector_clamp_magnitude_ip, pgVector); static PyObject * vector___round__(pgVector *self, PyObject *args); /* static Py_ssize_t vector_readbuffer(pgVector *self, Py_ssize_t segment, void **ptrptr); static Py_ssize_t vector_writebuffer(pgVector *self, Py_ssize_t segment, void **ptrptr); static Py_ssize_t vector_segcount(pgVector *self, Py_ssize_t *lenp); */ /* vector2 specific functions */ static PyObject * vector2_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static int vector2_init(pgVector *self, PyObject *args, PyObject *kwds); static int _vector2_rotate_helper(double *dst_coords, const double *src_coords, double angle, double epsilon); static PyObject * vector2_rotate(pgVector *self, PyObject *args); static PyObject * vector2_rotate_ip(pgVector *self, PyObject *args); static PyObject * vector2_cross(pgVector *self, PyObject *other); static PyObject * vector2_angle_to(pgVector *self, PyObject *other); static PyObject * vector2_as_polar(pgVector *self, PyObject *args); static PyObject * vector2_from_polar_cls(PyObject *self, PyObject *args); static PyObject * vector2_from_polar_obj(PyObject *self, PyObject *args); /* vector3 specific functions */ static PyObject * vector3_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static int vector3_init(pgVector *self, PyObject *args, PyObject *kwds); static int _vector3_rotate_helper(double *dst_coords, const double *src_coords, const double *axis_coords, double angle, double epsilon); static PyObject * vector3_rotate(pgVector *self, PyObject *args); static PyObject * vector3_rotate_ip(pgVector *self, PyObject *args); static PyObject * vector3_cross(pgVector *self, PyObject *other); static PyObject * vector3_angle_to(pgVector *self, PyObject *other); static PyObject * vector3_as_spherical(pgVector *self, PyObject *args); static PyObject * vector3_from_spherical_cls(PyObject *self, PyObject *args); static PyObject * vector3_from_spherical_obj(PyObject *self, PyObject *args); /* vector iterator functions */ static void vectoriter_dealloc(vectoriter *it); static PyObject * vectoriter_next(vectoriter *it); static PyObject * vectoriter_len(vectoriter *it); static PyObject * vector_iter(PyObject *vec); /* elementwiseproxy */ static void vector_elementwiseproxy_dealloc(vector_elementwiseproxy *it); static PyObject * vector_elementwiseproxy_richcompare(PyObject *o1, PyObject *o2, int op); static PyObject * vector_elementwiseproxy_generic_math(PyObject *o1, PyObject *o2, int op); static PyObject * vector_elementwiseproxy_add(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_sub(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_mul(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_div(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_floor_div(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_pow(PyObject *baseObj, PyObject *expoObj, PyObject *mod); static PyObject * vector_elementwiseproxy_mod(PyObject *o1, PyObject *o2); static PyObject * vector_elementwiseproxy_abs(vector_elementwiseproxy *self); static PyObject * vector_elementwiseproxy_neg(vector_elementwiseproxy *self); static PyObject * vector_elementwiseproxy_pos(vector_elementwiseproxy *self); static int vector_elementwiseproxy_nonzero(vector_elementwiseproxy *self); static PyObject * vector_elementwise(pgVector *vec, PyObject *args); /******************************** * Global helper functions ********************************/ static int RealNumber_Check(PyObject *obj) { if (obj && PyNumber_Check(obj) && !PyComplex_Check(obj)) return 1; return 0; } static double PySequence_GetItem_AsDouble(PyObject *seq, Py_ssize_t index) { PyObject *item; double value; item = PySequence_GetItem(seq, index); if (item == NULL) { PyErr_SetString(PyExc_TypeError, "a sequence is expected"); return -1; } value = PyFloat_AsDouble(item); Py_DECREF(item); if (PyErr_Occurred()) return -1; return value; } static int PySequence_AsVectorCoords(PyObject *seq, double *const coords, const Py_ssize_t size) { Py_ssize_t i; if (pgVector_Check(seq)) { memcpy(coords, ((pgVector *)seq)->coords, sizeof(double) * size); return 1; } if (!PySequence_Check(seq) || PySequence_Length(seq) != size) { PyErr_SetString(PyExc_ValueError, "Sequence has the wrong length."); return 0; } for (i = 0; i < size; ++i) { coords[i] = PySequence_GetItem_AsDouble(seq, i); if (PyErr_Occurred()) { return 0; } } return 1; } static int pgVectorCompatible_Check(PyObject *obj, Py_ssize_t dim) { Py_ssize_t i; PyObject *tmp; switch (dim) { case 2: if (pgVector2_Check(obj)) { return 1; } break; case 3: if (pgVector3_Check(obj)) { return 1; } break; /* case 4: if (pgVector4_Check(obj)) { return 1; } break; */ default: PyErr_SetString( PyExc_SystemError, "Wrong internal call to pgVectorCompatible_Check."); return 0; } if (!PySequence_Check(obj) || (PySequence_Length(obj) != dim)) { return 0; } for (i = 0; i < dim; ++i) { tmp = PySequence_GetItem(obj, i); if (tmp == NULL || !RealNumber_Check(tmp)) { Py_XDECREF(tmp); return 0; } Py_DECREF(tmp); } return 1; } static double _scalar_product(const double *coords1, const double *coords2, Py_ssize_t size) { Py_ssize_t i; double product = 0; for (i = 0; i < size; ++i) product += coords1[i] * coords2[i]; return product; } static int get_double_from_unicode_slice(PyObject *unicode_obj, Py_ssize_t idx1, Py_ssize_t idx2, double *val) { PyObject *float_obj; PyObject *slice = PySequence_GetSlice(unicode_obj, idx1, idx2); if (slice == NULL) { PyErr_SetString(PyExc_SystemError, "internal error while converting str slice to float"); return -1; } float_obj = PyFloat_FromString(slice); Py_DECREF(slice); if (float_obj == NULL) return 0; *val = PyFloat_AsDouble(float_obj); Py_DECREF(float_obj); return 1; } static Py_ssize_t _vector_find_string_helper(PyObject *str_obj, const char *substr, Py_ssize_t start, Py_ssize_t end) { /* This is implemented using Python's Unicode C-API rather than * plain C to handle both char* and wchar_t* especially because * wchar.h was only added to the standard in 95 and we want to be * ISO C 90 compatible. */ PyObject *substr_obj; Py_ssize_t pos; substr_obj = PyUnicode_FromString(substr); if (substr_obj == NULL) { return -2; } pos = PyUnicode_Find(str_obj, substr_obj, start, end, 1); Py_DECREF(substr_obj); return pos; } /* Extracts coords from a str/unicode Object . * should be an array of +1 C-Strings of the strings before, * between and after the coords. * The extracted numbers will be stored in . * return * 0 on success. * -1 if conversion was unsuccessful * -2 if an internal error occurred and an exception was set */ static Py_ssize_t _vector_coords_from_string(PyObject *str, char **delimiter, double *coords, Py_ssize_t dim) { int error_code; Py_ssize_t i, start_pos, end_pos, length, ret = 0; PyObject *vector_string; vector_string = PyUnicode_FromObject(str); if (vector_string == NULL) { ret = -2; goto end; } length = PySequence_Length(vector_string); /* find the starting point of the first coordinate in the string */ start_pos = _vector_find_string_helper(vector_string, delimiter[0], 0, length); if (start_pos < 0) { ret = start_pos; goto end; } start_pos += strlen(delimiter[0]); for (i = 0; i < dim; i++) { /* find the end point of the current coordinate in the string */ end_pos = _vector_find_string_helper(vector_string, delimiter[i + 1], start_pos, length); if (end_pos < 0) { ret = end_pos; goto end; } /* try to convert the current coordinate */ error_code = get_double_from_unicode_slice(vector_string, start_pos, end_pos, &coords[i]); if (error_code < 0) { ret = -2; goto end; } else if (error_code == 0) { ret = -1; goto end; } /* move starting point to the next coordinate */ start_pos = end_pos + strlen(delimiter[i + 1]); } end: Py_XDECREF(vector_string); return ret; } static PyMemberDef vector_members[] = { {"epsilon", T_DOUBLE, offsetof(pgVector, epsilon), 0, "small value used in comparisons"}, {NULL} /* Sentinel */ }; static PyObject * pgVector_NEW(Py_ssize_t dim) { switch (dim) { case 2: return vector2_new(&pgVector2_Type, NULL, NULL); case 3: return vector3_new(&pgVector3_Type, NULL, NULL); /* case 4: return vector4_new(&pgVector4_Type, NULL, NULL); */ default: PyErr_SetString(PyExc_SystemError, "Wrong internal call to pgVector_NEW.\n"); return NULL; } } static void vector_dealloc(pgVector *self) { PyMem_Free(self->coords); Py_TYPE(self)->tp_free((PyObject *)self); } /********************************************** * Generic vector PyNumber emulation routines **********************************************/ static PyObject * vector_generic_math(PyObject *o1, PyObject *o2, int op) { Py_ssize_t i, dim; double *vec_coords; double other_coords[VECTOR_MAX_SIZE] = {0}; double tmp; PyObject *other; pgVector *vec, *ret = NULL; if (pgVector_Check(o1)) { vec = (pgVector *)o1; other = o2; } else { vec = (pgVector *)o2; other = o1; op |= OP_ARG_REVERSE; } dim = vec->dim; vec_coords = vec->coords; if (other == NULL) { PyErr_BadInternalCall(); return NULL; } if (pgVectorCompatible_Check(other, dim)) { op |= OP_ARG_VECTOR; if (!PySequence_AsVectorCoords(other, other_coords, dim)) return NULL; } else if (RealNumber_Check(other)) op |= OP_ARG_NUMBER; else op |= OP_ARG_UNKNOWN; if (op & OP_INPLACE) { ret = vec; Py_INCREF(ret); } else if (op != (OP_MUL | OP_ARG_VECTOR) && op != (OP_MUL | OP_ARG_VECTOR | OP_ARG_REVERSE)) { ret = _vector_subtype_new(vec); if (ret == NULL) return NULL; } switch (op) { case OP_ADD | OP_ARG_VECTOR: case OP_ADD | OP_ARG_VECTOR | OP_ARG_REVERSE: case OP_ADD | OP_ARG_VECTOR | OP_INPLACE: for (i = 0; i < dim; i++) ret->coords[i] = vec_coords[i] + other_coords[i]; break; case OP_SUB | OP_ARG_VECTOR: case OP_SUB | OP_ARG_VECTOR | OP_INPLACE: for (i = 0; i < dim; i++) ret->coords[i] = vec_coords[i] - other_coords[i]; break; case OP_SUB | OP_ARG_VECTOR | OP_ARG_REVERSE: for (i = 0; i < dim; i++) ret->coords[i] = other_coords[i] - vec_coords[i]; break; case OP_MUL | OP_ARG_VECTOR: case OP_MUL | OP_ARG_VECTOR | OP_ARG_REVERSE: tmp = 0.; for (i = 0; i < dim; i++) tmp += vec_coords[i] * other_coords[i]; ret = (pgVector *)PyFloat_FromDouble(tmp); break; case OP_MUL | OP_ARG_NUMBER: case OP_MUL | OP_ARG_NUMBER | OP_ARG_REVERSE: case OP_MUL | OP_ARG_NUMBER | OP_INPLACE: tmp = PyFloat_AsDouble(other); for (i = 0; i < dim; i++) ret->coords[i] = vec_coords[i] * tmp; break; case OP_DIV | OP_ARG_NUMBER: case OP_DIV | OP_ARG_NUMBER | OP_INPLACE: tmp = PyFloat_AsDouble(other); if (tmp == 0.) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } tmp = 1. / tmp; for (i = 0; i < dim; i++) ret->coords[i] = vec_coords[i] * tmp; break; case OP_FLOOR_DIV | OP_ARG_NUMBER: case OP_FLOOR_DIV | OP_ARG_NUMBER | OP_INPLACE: tmp = PyFloat_AsDouble(other); if (tmp == 0.) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } tmp = 1. / tmp; for (i = 0; i < dim; i++) ret->coords[i] = floor(vec_coords[i] * tmp); break; default: Py_XDECREF(ret); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } return (PyObject *)ret; } static PyObject * vector_add(PyObject *o1, PyObject *o2) { return vector_generic_math(o1, o2, OP_ADD); } static PyObject * vector_inplace_add(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_ADD | OP_INPLACE); } static PyObject * vector_sub(PyObject *o1, PyObject *o2) { return vector_generic_math(o1, o2, OP_SUB); } static PyObject * vector_inplace_sub(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_SUB | OP_INPLACE); } static PyObject * vector_mul(PyObject *o1, PyObject *o2) { return vector_generic_math(o1, o2, OP_MUL); } static PyObject * vector_inplace_mul(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_MUL | OP_INPLACE); } static PyObject * vector_div(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_DIV); } static PyObject * vector_inplace_div(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_DIV | OP_INPLACE); } static PyObject * vector_floor_div(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_FLOOR_DIV); } static PyObject * vector_inplace_floor_div(pgVector *o1, PyObject *o2) { return vector_generic_math((PyObject *)o1, o2, OP_FLOOR_DIV | OP_INPLACE); } static PyObject * vector_neg(pgVector *self) { pgVector *ret = _vector_subtype_new(self); if (ret) { Py_ssize_t i; for (i = 0; i < self->dim; i++) { ret->coords[i] = -self->coords[i]; } } return (PyObject *)ret; } static PyObject * vector_pos(pgVector *self) { pgVector *ret = _vector_subtype_new(self); if (ret) { memcpy(ret->coords, self->coords, sizeof(ret->coords[0]) * ret->dim); } return (PyObject *)ret; } static int vector_nonzero(pgVector *self) { Py_ssize_t i; for (i = 0; i < self->dim; i++) { if (self->coords[i] != 0) { return 1; } } return 0; } static PyObject * vector_copy(pgVector *self, PyObject *_null) { Py_ssize_t i; pgVector *ret = _vector_subtype_new(self); if (!ret) { return NULL; } for (i = 0; i < self->dim; i++) { ret->coords[i] = self->coords[i]; } return (PyObject *)ret; } static PyObject * vector_clamp_magnitude(pgVector *self, PyObject *const *args, Py_ssize_t nargs) { Py_ssize_t i; pgVector *ret; ret = _vector_subtype_new(self); if (ret == NULL) return NULL; for (i = 0; i < self->dim; ++i) ret->coords[i] = self->coords[i]; PyObject *ret_val = vector_clamp_magnitude_ip(ret, args, nargs); if (!ret_val) { Py_DECREF(ret); return NULL; } Py_DECREF(ret_val); return (PyObject *)ret; } PG_WRAP_FASTCALL_FUNC(vector_clamp_magnitude, pgVector); static PyObject * vector_clamp_magnitude_ip(pgVector *self, PyObject *const *args, Py_ssize_t nargs) { Py_ssize_t i; double max_length, old_length_sq, fraction = 1, min_length = 0; switch (nargs) { case 2: min_length = PyFloat_AsDouble(args[0]); if (min_length == -1.0 && PyErr_Occurred()) { return NULL; } /* Fall-through */ case 1: max_length = PyFloat_AsDouble(args[nargs - 1]); if (max_length == -1.0 && PyErr_Occurred()) { return NULL; } break; default: return RAISE(PyExc_TypeError, "Vector clamp function must take one or two floats"); } if (min_length > max_length) { return RAISE(PyExc_ValueError, "Argument min_length cannot exceed max_length"); } if (max_length < 0 || min_length < 0) { return RAISE(PyExc_ValueError, "Arguments to Vector clamp must be non-negative"); } /* Get magnitude of Vector */ old_length_sq = _scalar_product(self->coords, self->coords, self->dim); if (old_length_sq == 0) { return RAISE(PyExc_ValueError, "Cannot clamp a vector with zero length"); } /* Notes for other contributors reading this code: * The numerator for the fraction is different. */ if (old_length_sq > max_length * max_length) { /* Scale to length */ fraction = max_length / sqrt(old_length_sq); } if (old_length_sq < min_length * min_length) { /* Scale to length */ fraction = min_length / sqrt(old_length_sq); } for (i = 0; i < self->dim; ++i) self->coords[i] *= fraction; Py_RETURN_NONE; } PG_WRAP_FASTCALL_FUNC(vector_clamp_magnitude_ip, pgVector); static PyNumberMethods vector_as_number = { .nb_add = (binaryfunc)vector_add, .nb_subtract = (binaryfunc)vector_sub, .nb_multiply = (binaryfunc)vector_mul, .nb_negative = (unaryfunc)vector_neg, .nb_positive = (unaryfunc)vector_pos, .nb_bool = (inquiry)vector_nonzero, .nb_inplace_add = (binaryfunc)vector_inplace_add, .nb_inplace_subtract = (binaryfunc)vector_inplace_sub, .nb_inplace_multiply = (binaryfunc)vector_inplace_mul, .nb_floor_divide = (binaryfunc)vector_floor_div, .nb_true_divide = (binaryfunc)vector_div, .nb_inplace_floor_divide = (binaryfunc)vector_inplace_floor_div, .nb_inplace_true_divide = (binaryfunc)vector_inplace_div, }; /************************************************* * Generic vector PySequence emulation routines *************************************************/ static Py_ssize_t vector_len(pgVector *self) { return (Py_ssize_t)self->dim; } static PyObject * vector_GetItem(pgVector *self, Py_ssize_t index) { if (index < 0 || index >= self->dim) { PyErr_SetString(PyExc_IndexError, "subscript out of range."); return NULL; } return PyFloat_FromDouble(self->coords[index]); } static int vector_SetItem(pgVector *self, Py_ssize_t index, PyObject *value) { if (index < 0 || index >= self->dim) { PyErr_SetString(PyExc_IndexError, "subscript out of range."); return -1; } if (value == NULL) { PyErr_SetString(PyExc_TypeError, "item deletion is not supported"); return -1; } self->coords[index] = PyFloat_AsDouble(value); if (PyErr_Occurred()) return -1; return 0; } static int vector_contains(pgVector *self, PyObject *arg) { double f = PyFloat_AsDouble(arg); if (f == -1 && PyErr_Occurred()) { return -1; } int i; for (i = 0; i < self->dim; i++) { if (self->coords[i] == f) { return 1; } } return 0; } static PyObject * vector_GetSlice(pgVector *self, Py_ssize_t ilow, Py_ssize_t ihigh) { /* some code was taken from the CPython source listobject.c */ PyListObject *slice; Py_ssize_t i, len; /* make sure boundaries are sane */ if (ilow < 0) ilow = 0; else if (ilow > self->dim) ilow = self->dim; if (ihigh < ilow) ihigh = ilow; else if (ihigh > self->dim) ihigh = self->dim; len = ihigh - ilow; slice = (PyListObject *)PyList_New(len); if (slice == NULL) return NULL; for (i = 0; i < len; i++) { PyObject *tmp = PyFloat_FromDouble(self->coords[ilow + i]); if (!tmp) { Py_DECREF(slice); return NULL; } PyList_SET_ITEM(slice, i, tmp); } return (PyObject *)slice; } static int vector_SetSlice(pgVector *self, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v) { Py_ssize_t i, len; double new_coords[VECTOR_MAX_SIZE]; if (v == NULL) { PyErr_SetString(PyExc_TypeError, "Vector object doesn't support item deletion"); return -1; } if (ilow < 0) ilow = 0; else if (ilow > self->dim) ilow = self->dim; if (ihigh < ilow) ihigh = ilow; else if (ihigh > self->dim) ihigh = self->dim; len = ihigh - ilow; if (!PySequence_AsVectorCoords(v, new_coords, len)) { return -1; } for (i = 0; i < len; ++i) { self->coords[i + ilow] = new_coords[i]; } return 0; } /* sq_slice and sq_ass_slice are no longer used in this struct */ static PySequenceMethods vector_as_sequence = { .sq_length = (lenfunc)vector_len, .sq_item = (ssizeargfunc)vector_GetItem, .sq_ass_item = (ssizeobjargproc)vector_SetItem, .sq_contains = (objobjproc)vector_contains, }; /*************************************************************************** * Generic vector PyMapping emulation routines to support extended slicing ***************************************************************************/ /* Great parts of this function are adapted from python's list_subscript */ static PyObject * vector_subscript(pgVector *self, PyObject *key) { Py_ssize_t i; if (PyIndex_Check(key)) { i = PyNumber_AsSsize_t(key, PyExc_IndexError); if (i == -1 && PyErr_Occurred()) return NULL; if (i < 0) i += self->dim; return vector_GetItem(self, i); } else if (PySlice_Check(key)) { Py_ssize_t start, stop, step, slicelength, cur; PyObject *result; PyObject *it; if (PySlice_GetIndicesEx((PyObject *)key, self->dim, &start, &stop, &step, &slicelength) < 0) { return NULL; } if (slicelength <= 0) { return PyList_New(0); } else if (step == 1) { return vector_GetSlice(self, start, stop); } else { result = PyList_New(slicelength); if (!result) return NULL; for (cur = start, i = 0; i < slicelength; cur += step, i++) { it = PyFloat_FromDouble(self->coords[cur]); if (it == NULL) { Py_DECREF(result); return NULL; } PyList_SET_ITEM(result, i, it); } return result; } } else { PyErr_Format(PyExc_TypeError, "vector indices must be integers, not %.200s", Py_TYPE(key)->tp_name); return NULL; } } /* Parts of this function are adapted from python's list_ass_subscript */ static int vector_ass_subscript(pgVector *self, PyObject *key, PyObject *value) { if (PyIndex_Check(key)) { Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError); if (i == -1 && PyErr_Occurred()) return -1; if (i < 0) i += self->dim; return vector_SetItem(self, i, value); } else if (PySlice_Check(key)) { Py_ssize_t start, stop, step, slicelength; if (PySlice_GetIndicesEx((PyObject *)key, self->dim, &start, &stop, &step, &slicelength) < 0) { return -1; } if (step == 1) return vector_SetSlice(self, start, stop, value); /* Make sure s[5:2] = [..] inserts at the right place: before 5, not before 2. */ if ((step < 0 && start < stop) || (step > 0 && start > stop)) stop = start; if (value == NULL) { /* delete slice not supported */ PyErr_SetString(PyExc_TypeError, "Deletion of vector components is not supported."); return -1; } else { /* assign slice */ double seqitems[VECTOR_MAX_SIZE]; Py_ssize_t cur, i; if (!PySequence_AsVectorCoords(value, seqitems, slicelength)) return -1; for (cur = start, i = 0; i < slicelength; cur += step, i++) { self->coords[cur] = seqitems[i]; } return 0; } } else { PyErr_Format(PyExc_TypeError, "list indices must be integers, not %.200s", Py_TYPE(key)->tp_name); return -1; } } static PyMappingMethods vector_as_mapping = { .mp_length = (lenfunc)vector_len, .mp_subscript = (binaryfunc)vector_subscript, .mp_ass_subscript = (objobjargproc)vector_ass_subscript, }; static int vector_set_component(pgVector *self, PyObject *value, int component) { if (value == NULL) { PyErr_SetString(PyExc_TypeError, "Cannot delete the x attribute"); return -1; } if (component >= self->dim) { PyErr_BadInternalCall(); return -1; } self->coords[component] = PyFloat_AsDouble(value); if (PyErr_Occurred()) return -1; return 0; } static PyObject * vector_getx(pgVector *self, void *closure) { return PyFloat_FromDouble(self->coords[0]); } static int vector_setx(pgVector *self, PyObject *value, void *closure) { return vector_set_component(self, value, 0); } static PyObject * vector_gety(pgVector *self, void *closure) { return PyFloat_FromDouble(self->coords[1]); } static int vector_sety(pgVector *self, PyObject *value, void *closure) { return vector_set_component(self, value, 1); } static PyObject * vector_getz(pgVector *self, void *closure) { return PyFloat_FromDouble(self->coords[2]); } static int vector_setz(pgVector *self, PyObject *value, void *closure) { return vector_set_component(self, value, 2); } #ifdef PYGAME_MATH_VECTOR_HAVE_W static PyObject * vector_getw(pgVector *self, void *closure) { return PyFloat_FromDouble(self->coords[3]); } static int vector_setw(pgVector *self, PyObject *value, void *closure) { return vector_set_component(self, value, 3); } #endif static PyObject * vector_richcompare(PyObject *o1, PyObject *o2, int op) { Py_ssize_t i; double diff; double other_coords[VECTOR_MAX_SIZE]; pgVector *vec; PyObject *other; if (pgVector_Check(o1)) { vec = (pgVector *)o1; other = o2; } else { vec = (pgVector *)o2; other = o1; } if (!pgVectorCompatible_Check(other, vec->dim)) { if (op == Py_EQ) Py_RETURN_FALSE; else if (op == Py_NE) Py_RETURN_TRUE; else { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } } if (!PySequence_AsVectorCoords(other, other_coords, vec->dim)) { return NULL; } switch (op) { case Py_EQ: for (i = 0; i < vec->dim; i++) { diff = vec->coords[i] - other_coords[i]; /* test diff != diff to catch NaN */ if ((diff != diff) || (fabs(diff) >= vec->epsilon)) { Py_RETURN_FALSE; } } Py_RETURN_TRUE; case Py_NE: for (i = 0; i < vec->dim; i++) { diff = vec->coords[i] - other_coords[i]; if ((diff != diff) || (fabs(diff) >= vec->epsilon)) { Py_RETURN_TRUE; } } Py_RETURN_FALSE; default: PyErr_SetString(PyExc_TypeError, "This operation is not supported by vectors"); return NULL; } } static PyObject * vector_length(pgVector *self, PyObject *_null) { double length_squared = _scalar_product(self->coords, self->coords, self->dim); return PyFloat_FromDouble(sqrt(length_squared)); } static PyObject * vector_length_squared(pgVector *self, PyObject *_null) { double length_squared = _scalar_product(self->coords, self->coords, self->dim); return PyFloat_FromDouble(length_squared); } static PyObject * vector_normalize(pgVector *self, PyObject *_null) { pgVector *ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } memcpy(ret->coords, self->coords, sizeof(ret->coords[0]) * ret->dim); PyObject *tmp = vector_normalize_ip(ret, NULL); if (!tmp) { Py_DECREF(ret); return NULL; } Py_DECREF(tmp); return (PyObject *)ret; } static PyObject * vector_normalize_ip(pgVector *self, PyObject *_null) { Py_ssize_t i; double length; length = sqrt(_scalar_product(self->coords, self->coords, self->dim)); if (length == 0) { PyErr_SetString(PyExc_ValueError, "Can't normalize Vector of length Zero"); return NULL; } for (i = 0; i < self->dim; ++i) self->coords[i] /= length; Py_RETURN_NONE; } static PyObject * vector_is_normalized(pgVector *self, PyObject *_null) { double length_squared = _scalar_product(self->coords, self->coords, self->dim); if (fabs(length_squared - 1) < self->epsilon) Py_RETURN_TRUE; else Py_RETURN_FALSE; } static PyObject * vector_dot(pgVector *self, PyObject *other) { double other_coords[VECTOR_MAX_SIZE]; if (!PySequence_AsVectorCoords(other, other_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Cannot perform dot product with this type."); return NULL; } return PyFloat_FromDouble( _scalar_product(self->coords, other_coords, self->dim)); } static PyObject * vector_scale_to_length(pgVector *self, PyObject *length) { Py_ssize_t i; double new_length, old_length; double fraction; new_length = PyFloat_AsDouble(length); if (PyErr_Occurred()) { return NULL; } old_length = sqrt(_scalar_product(self->coords, self->coords, self->dim)); if (old_length < self->epsilon) { PyErr_SetString(PyExc_ValueError, "Cannot scale a vector with zero length"); return NULL; } fraction = new_length / old_length; for (i = 0; i < self->dim; ++i) self->coords[i] *= fraction; Py_RETURN_NONE; } static void _vector_move_towards_helper(Py_ssize_t dim, double *origin_coords, double *target_coords, double max_distance) { Py_ssize_t i; double frac, dist, delta[VECTOR_MAX_SIZE]; if (max_distance == 0) return; for (i = 0; i < dim; ++i) delta[i] = target_coords[i] - origin_coords[i]; /* Get magnitude of Vector */ dist = sqrt(_scalar_product(delta, delta, dim)); if (dist == 0) { /* origin and target are same, return early (this also makes sure * that frac is never NaN) */ return; } if (dist <= max_distance) { /* Return target Vector */ for (i = 0; i < dim; ++i) origin_coords[i] = target_coords[i]; return; } frac = max_distance / dist; for (i = 0; i < dim; ++i) origin_coords[i] += delta[i] * frac; } static PyObject * vector_move_towards(pgVector *self, PyObject *args) { Py_ssize_t i; PyObject *target; double target_coords[VECTOR_MAX_SIZE]; double max_distance; pgVector *ret; if (!PyArg_ParseTuple(args, "Od:move_towards", &target, &max_distance)) return NULL; if (!pgVectorCompatible_Check(target, self->dim)) { PyErr_SetString(PyExc_TypeError, "Target Vector is not the same size as self"); return NULL; } if (!PySequence_AsVectorCoords(target, target_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected Vector as argument 1"); return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) return NULL; for (i = 0; i < self->dim; ++i) ret->coords[i] = self->coords[i]; _vector_move_towards_helper(self->dim, ret->coords, target_coords, max_distance); return (PyObject *)ret; } static PyObject * vector_move_towards_ip(pgVector *self, PyObject *args) { PyObject *target; double target_coords[VECTOR_MAX_SIZE]; double max_distance; if (!PyArg_ParseTuple(args, "Od:move_towards_ip", &target, &max_distance)) return NULL; if (!pgVectorCompatible_Check(target, self->dim)) { PyErr_SetString(PyExc_TypeError, "Target Vector is not the same size as self"); return NULL; } if (!PySequence_AsVectorCoords(target, target_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected Vector as argument 1"); return NULL; } _vector_move_towards_helper(self->dim, self->coords, target_coords, max_distance); Py_RETURN_NONE; } static PyObject * vector_slerp(pgVector *self, PyObject *args) { Py_ssize_t i; PyObject *other; pgVector *ret; double other_coords[VECTOR_MAX_SIZE]; double tmp, angle, t, length1, length2, f0, f1, f2; if (!PyArg_ParseTuple(args, "Od:slerp", &other, &t)) { return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Argument 1 must be a vector."); return NULL; } if (fabs(t) > 1) { PyErr_SetString(PyExc_ValueError, "Argument 2 must be in range [-1, 1]."); return NULL; } length1 = sqrt(_scalar_product(self->coords, self->coords, self->dim)); length2 = sqrt(_scalar_product(other_coords, other_coords, self->dim)); if ((length1 < self->epsilon) || (length2 < self->epsilon)) { PyErr_SetString(PyExc_ValueError, "can't use slerp with Zero-Vector"); return NULL; } tmp = (_scalar_product(self->coords, other_coords, self->dim) / (length1 * length2)); /* make sure tmp is in the range [-1:1] so acos won't return NaN */ tmp = (tmp < -1 ? -1 : (tmp > 1 ? 1 : tmp)); angle = acos(tmp); /* if t < 0 we take the long arch of the great circle to the destiny */ if (t < 0) { angle -= 2 * M_PI; t = -t; } if (self->coords[0] * other_coords[1] < self->coords[1] * other_coords[0]) angle *= -1; ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } /* special case angle==0 and angle==360 */ if ((fabs(angle) < self->epsilon) || (fabs(fabs(angle) - 2 * M_PI) < self->epsilon)) { /* approximate with lerp, because slerp diverges with 1/sin(angle) */ for (i = 0; i < self->dim; ++i) ret->coords[i] = self->coords[i] * (1 - t) + other_coords[i] * t; } /* special case angle==180 and angle==-180 */ else if (fabs(fabs(angle) - M_PI) < self->epsilon) { PyErr_SetString(PyExc_ValueError, "SLERP with 180 degrees is undefined."); Py_DECREF(ret); return NULL; } else { f0 = ((length2 - length1) * t + length1) / sin(angle); f1 = sin(angle * (1 - t)) / length1; f2 = sin(angle * t) / length2; for (i = 0; i < self->dim; ++i) { ret->coords[i] = (self->coords[i] * f1 + other_coords[i] * f2) * f0; } } return (PyObject *)ret; } static PyObject * vector_lerp(pgVector *self, PyObject *args) { Py_ssize_t i; PyObject *other; pgVector *ret; double t; double other_coords[VECTOR_MAX_SIZE]; if (!PyArg_ParseTuple(args, "Od:Vector.lerp", &other, &t)) { return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected Vector as argument 1"); return NULL; } if (t < 0 || t > 1) { PyErr_SetString(PyExc_ValueError, "Argument 2 must be in range [0, 1]"); return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } for (i = 0; i < self->dim; ++i) ret->coords[i] = self->coords[i] * (1 - t) + other_coords[i] * t; return (PyObject *)ret; } static int _vector_reflect_helper(double *dst_coords, const double *src_coords, PyObject *normal, Py_ssize_t dim, double epsilon) { Py_ssize_t i; double dot_product, norm_length; double norm_coords[VECTOR_MAX_SIZE]; /* normalize the normal */ if (!PySequence_AsVectorCoords(normal, norm_coords, dim)) return 0; norm_length = _scalar_product(norm_coords, norm_coords, dim); if (norm_length < epsilon) { PyErr_SetString(PyExc_ValueError, "Normal must not be of length zero."); return 0; } if (norm_length != 1) { norm_length = sqrt(norm_length); for (i = 0; i < dim; ++i) norm_coords[i] /= norm_length; } /* calculate the dot_product for the projection */ dot_product = _scalar_product(src_coords, norm_coords, dim); for (i = 0; i < dim; ++i) dst_coords[i] = src_coords[i] - 2 * norm_coords[i] * dot_product; return 1; } static PyObject * vector_reflect(pgVector *self, PyObject *normal) { pgVector *ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!_vector_reflect_helper(ret->coords, self->coords, normal, self->dim, self->epsilon)) { Py_DECREF(ret); return NULL; } return (PyObject *)ret; } static PyObject * vector_reflect_ip(pgVector *self, PyObject *normal) { double tmp_coords[VECTOR_MAX_SIZE]; if (!_vector_reflect_helper(tmp_coords, self->coords, normal, self->dim, self->epsilon)) { return NULL; } memcpy(self->coords, tmp_coords, self->dim * sizeof(tmp_coords[0])); Py_RETURN_NONE; } static double _vector_distance_helper(pgVector *self, PyObject *other) { Py_ssize_t i, dim = self->dim; double distance_squared = 0; /* Specialised fastpath for Vector-Vector distance calculation*/ if (pgVector_Check(other)) { pgVector *otherv = (pgVector *)other; double dx, dy; if (dim != otherv->dim) { PyErr_SetString(PyExc_ValueError, "Vectors must be the same size"); return -1; } dx = otherv->coords[0] - self->coords[0]; dy = otherv->coords[1] - self->coords[1]; distance_squared = dx * dx + dy * dy; if (dim == 3) { double dz; dz = otherv->coords[2] - self->coords[2]; distance_squared += dz * dz; } } /* Vector-Sequence distance calculation*/ else { double tmp; PyObject *fast_seq = PySequence_Fast(other, "A sequence was expected"); if (!fast_seq) { return -1; } if (PySequence_Fast_GET_SIZE(fast_seq) != dim) { Py_DECREF(fast_seq); PyErr_SetString(PyExc_ValueError, "Vector and sequence must be the same size"); return -1; } for (i = 0; i < dim; ++i) { tmp = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(fast_seq, i)) - self->coords[i]; if (PyErr_Occurred()) { Py_DECREF(fast_seq); return -1; } distance_squared += tmp * tmp; } Py_DECREF(fast_seq); } return distance_squared; } static PyObject * vector_distance_to(pgVector *self, PyObject *other) { double distance_squared = _vector_distance_helper(self, other); if (distance_squared < 0 && PyErr_Occurred()) return NULL; return PyFloat_FromDouble(sqrt(distance_squared)); } static PyObject * vector_distance_squared_to(pgVector *self, PyObject *other) { double distance_squared = _vector_distance_helper(self, other); if (distance_squared < 0 && PyErr_Occurred()) return NULL; return PyFloat_FromDouble(distance_squared); } static int _vector_check_snprintf_success(int return_code, int max_size) { if (return_code < 0) { PyErr_SetString(PyExc_SystemError, "internal snprintf call went wrong! Please report " "this to github.com/pygame/pygame/issues"); return 0; } if (return_code >= max_size) { PyErr_SetString(PyExc_SystemError, "Internal buffer to small for snprintf! Please report " "this to github.com/pygame/pygame/issues"); return 0; } return 1; } static PyObject * vector_repr(pgVector *self) { /* The repr() of the largest possible Vector3 looks like * "" where 'd' has a maximum size of 32 bytes * so allocate a 16 + 3 * 32 == 112 byte buffer */ char buffer[STRING_BUF_SIZE_REPR]; int tmp; if (self->dim == 2) { tmp = PyOS_snprintf(buffer, STRING_BUF_SIZE_REPR, "", self->coords[0], self->coords[1]); } else if (self->dim == 3) { tmp = PyOS_snprintf(buffer, STRING_BUF_SIZE_REPR, "", self->coords[0], self->coords[1], self->coords[2]); } else { return RAISE( PyExc_NotImplementedError, "repr() for Vectors of higher dimensions are not implemented yet"); } if (!_vector_check_snprintf_success(tmp, STRING_BUF_SIZE_REPR)) return NULL; return PyUnicode_FromString(buffer); } static PyObject * vector_str(pgVector *self) { /* The str() of the largest possible Vector3 looks like * "[{d}, {d}, {d}]" where 'd' has a maximum size of 32 bytes * so allocate a 7 + 3 * 32 == 103 byte buffer */ char buffer[STRING_BUF_SIZE_STR]; int tmp; if (self->dim == 2) { tmp = PyOS_snprintf(buffer, STRING_BUF_SIZE_STR, "[%g, %g]", self->coords[0], self->coords[1]); } else if (self->dim == 3) { tmp = PyOS_snprintf(buffer, STRING_BUF_SIZE_STR, "[%g, %g, %g]", self->coords[0], self->coords[1], self->coords[2]); } else { return RAISE( PyExc_NotImplementedError, "repr() for Vectors of higher dimensions are not implemented yet"); } if (!_vector_check_snprintf_success(tmp, STRING_BUF_SIZE_STR)) return NULL; return PyUnicode_FromString(buffer); } static PyObject * vector_project_onto(pgVector *self, PyObject *other) { Py_ssize_t i; pgVector *ret; double other_coords[VECTOR_MAX_SIZE]; double factor; double a_dot_b; double b_dot_b; if (!PySequence_AsVectorCoords(other, other_coords, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected Vector as argument 1"); return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } a_dot_b = _scalar_product(self->coords, other_coords, self->dim); b_dot_b = _scalar_product(other_coords, other_coords, self->dim); if (b_dot_b < self->epsilon) { PyErr_SetString(PyExc_ValueError, "Cannot project onto a vector with zero length"); Py_DECREF(ret); return NULL; } factor = a_dot_b / b_dot_b; for (i = 0; i < self->dim; ++i) ret->coords[i] = other_coords[i] * factor; return (PyObject *)ret; } /* This method first tries normal attribute access. If successful we're * done. If not we try swizzling. Here we have 3 different outcomes: * 1) swizzling works. we return the result as a tuple * 2) swizzling fails because it wasn't a valid swizzle. we return the * original AttributeError * 3) swizzling fails due to some internal error. we return this error. */ static PyObject * vector_getAttr_swizzle(pgVector *self, PyObject *attr_name) { double value; double *coords; Py_ssize_t i, idx, len; PyObject *attr_unicode = NULL; const char *attr = NULL; PyObject *res = NULL; len = PySequence_Length(attr_name); if (len == 1) { return PyObject_GenericGetAttr((PyObject *)self, attr_name); } if (len < 0) goto swizzle_failed; coords = self->coords; attr_unicode = PyUnicode_FromObject(attr_name); if (attr_unicode == NULL) goto swizzle_failed; attr = PyUnicode_AsUTF8AndSize(attr_unicode, &len); if (attr == NULL) goto internal_error; /* If we are not a swizzle, go straight to GenericGetAttr. */ if ((attr[0] != 'x') && (attr[0] != 'y') && (attr[0] != 'z') && (attr[0] != 'w')) { goto swizzle_failed; } if (len == 2 || len == 3) { res = (PyObject *)pgVector_NEW((int)len); } else { /* More than 3, we return a tuple. */ res = (PyObject *)PyTuple_New(len); } if (res == NULL) goto internal_error; for (i = 0; i < len; i++) { switch (attr[i]) { case 'x': case 'y': case 'z': idx = attr[i] - 'x'; goto swizzle_idx; case 'w': idx = 3; swizzle_idx: if (idx >= self->dim) { goto swizzle_failed; }; value = coords[idx]; break; case '0': value = 0.0f; break; case '1': value = 1.0f; break; default: goto swizzle_failed; } if (len == 2 || len == 3) { ((pgVector *)res)->coords[i] = value; } else { if (PyTuple_SetItem(res, i, PyFloat_FromDouble(value)) != 0) goto internal_error; } } /* swizzling succeeded! */ Py_DECREF(attr_unicode); return res; /* swizzling failed! clean up and return NULL */ swizzle_failed: Py_XDECREF(res); Py_XDECREF(attr_unicode); return PyObject_GenericGetAttr((PyObject *)self, attr_name); internal_error: Py_XDECREF(res); Py_XDECREF(attr_unicode); return NULL; } static int vector_setAttr_swizzle(pgVector *self, PyObject *attr_name, PyObject *val) { const char *attr = NULL; PyObject *attr_unicode; Py_ssize_t len = PySequence_Length(attr_name); double entry[VECTOR_MAX_SIZE]; int entry_was_set[VECTOR_MAX_SIZE]; int swizzle_err = SWIZZLE_ERR_NO_ERR; Py_ssize_t i; if (len == 1) return PyObject_GenericSetAttr((PyObject *)self, attr_name, val); /* if swizzling is enabled first try swizzle */ for (i = 0; i < self->dim; ++i) entry_was_set[i] = 0; /* handle string and unicode uniformly */ attr_unicode = PyUnicode_FromObject(attr_name); if (attr_unicode == NULL) return -1; attr = PyUnicode_AsUTF8AndSize(attr_unicode, &len); if (attr == NULL) { Py_DECREF(attr_unicode); return -1; } for (i = 0; i < len; ++i) { int idx; switch (attr[i]) { case 'x': case 'y': case 'z': idx = attr[i] - 'x'; break; case 'w': idx = 3; break; default: /* swizzle failed. attempt generic attribute setting */ Py_DECREF(attr_unicode); return PyObject_GenericSetAttr((PyObject *)self, attr_name, val); } if (idx >= self->dim) { /* swizzle failed. attempt generic attribute setting */ Py_DECREF(attr_unicode); return PyObject_GenericSetAttr((PyObject *)self, attr_name, val); } if (entry_was_set[idx]) swizzle_err = SWIZZLE_ERR_DOUBLE_IDX; if (swizzle_err == SWIZZLE_ERR_NO_ERR) { entry_was_set[idx] = 1; entry[idx] = PySequence_GetItem_AsDouble(val, i); if (PyErr_Occurred()) swizzle_err = SWIZZLE_ERR_EXTRACTION_ERR; } } Py_DECREF(attr_unicode); switch (swizzle_err) { case SWIZZLE_ERR_NO_ERR: /* swizzle successful */ for (i = 0; i < self->dim; ++i) if (entry_was_set[i]) self->coords[i] = entry[i]; return 0; case SWIZZLE_ERR_DOUBLE_IDX: PyErr_SetString(PyExc_AttributeError, "Attribute assignment conflicts with swizzling."); return -1; case SWIZZLE_ERR_EXTRACTION_ERR: /* exception was set by PySequence_GetItem_AsDouble */ return -1; default: /* this should NEVER happen and means a bug in the code */ PyErr_SetString(PyExc_RuntimeError, "Unhandled error in swizzle code. Please report " "this bug to github.com/pygame/pygame/issues"); return -1; } } #if 0 static Py_ssize_t vector_readbuffer(pgVector *self, Py_ssize_t segment, void **ptrptr) { if (segment != 0) { PyErr_SetString(PyExc_SystemError, "accessing non-existent vector segment"); return -1; } *ptrptr = self->coords; return self->dim; } static Py_ssize_t vector_writebuffer(pgVector *self, Py_ssize_t segment, void **ptrptr) { if (segment != 0) { PyErr_SetString(PyExc_SystemError, "accessing non-existent vector segment"); return -1; } *ptrptr = self->coords; return self->dim; } static Py_ssize_t vector_segcount(pgVector *self, Py_ssize_t *lenp) { if (lenp) { *lenp = self->dim * sizeof(self->coords[0]); } return 1; } static int vector_getbuffer(pgVector *self, Py_buffer *view, int flags) { int ret; void *ptr; if (view == NULL) { self->ob_exports++; return 0; } ptr = self->coords; ret = PyBuffer_FillInfo(view, (PyObject*)self, ptr, Py_SIZE(self), 0, flags); if (ret >= 0) { obj->ob_exports++; } return ret; } static void vector_releasebuffer(pgVector *self, Py_buffer *view) { self->ob_exports--; } static PyBufferProcs vector_as_buffer = { (readbufferproc)vector_readbuffer, (writebufferproc)vector_writebuffer, (segcountproc)vector_segcount, (charbufferproc)0, (getbufferproc)vector_getbuffer, (releasebufferproc)vector_releasebuffer, }; #endif static PyObject * vector___round__(pgVector *self, PyObject *args) { Py_ssize_t i, ndigits; PyObject *o_ndigits = NULL; pgVector *ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!PyArg_ParseTuple(args, "|O", &o_ndigits)) { Py_DECREF(ret); return NULL; } memcpy(ret->coords, self->coords, sizeof(ret->coords[0]) * ret->dim); if (o_ndigits == NULL || o_ndigits == Py_None) { for (i = 0; i < ret->dim; ++i) ret->coords[i] = round(ret->coords[i]); } else if (RealNumber_Check(o_ndigits)) { ndigits = PyNumber_AsSsize_t(o_ndigits, NULL); if (PyErr_Occurred()) { Py_DECREF(ret); return NULL; } for (i = 0; i < ret->dim; ++i) ret->coords[i] = round(ret->coords[i] * pow(10, (double)ndigits)) / pow(10, (double)ndigits); } else { PyErr_SetString(PyExc_TypeError, "Argument must be an integer"); Py_DECREF(ret); return NULL; } return (PyObject *)ret; } /********************************************************************* * vector2 specific functions *********************************************************************/ static PyObject * vector2_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { pgVector *vec = (pgVector *)type->tp_alloc(type, 0); if (vec != NULL) { vec->dim = 2; vec->epsilon = VECTOR_EPSILON; vec->coords = PyMem_New(double, vec->dim); if (vec->coords == NULL) { Py_TYPE(vec)->tp_free((PyObject *)vec); return NULL; } } return (PyObject *)vec; } static int _vector2_set(pgVector *self, PyObject *xOrSequence, PyObject *y) { if (xOrSequence) { if (RealNumber_Check(xOrSequence)) { self->coords[0] = PyFloat_AsDouble(xOrSequence); /* scalar constructor. */ if (y == NULL) { self->coords[1] = self->coords[0]; return 0; } } else if (pgVectorCompatible_Check(xOrSequence, self->dim)) { if (!PySequence_AsVectorCoords(xOrSequence, self->coords, 2)) return -1; else return 0; } else if (PyUnicode_Check(xOrSequence)) { char *delimiter[3] = {""}; Py_ssize_t error_code; error_code = _vector_coords_from_string(xOrSequence, delimiter, self->coords, self->dim); if (error_code == -2) { return -1; } else if (error_code == -1) { goto error; } return 0; } else { goto error; } } else { self->coords[0] = 0.; if (y == NULL) { self->coords[1] = 0.; return 0; } } if (RealNumber_Check(y)) { self->coords[1] = PyFloat_AsDouble(y); } else { goto error; } /* success initialization */ return 0; error: PyErr_SetString(PyExc_ValueError, "Vector2 must be set with 2 real numbers, a " "sequence of 2 real numbers, or " "another Vector2 instance"); return -1; } static int vector2_init(pgVector *self, PyObject *args, PyObject *kwds) { PyObject *xOrSequence = NULL, *y = NULL; static char *kwlist[] = {"x", "y", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:Vector2", kwlist, &xOrSequence, &y)) return -1; return _vector2_set(self, xOrSequence, y); } static PyObject * vector2_update(pgVector *self, PyObject *args, PyObject *kwds) { PyObject *xOrSequence = NULL, *y = NULL; static char *kwlist[] = {"x", "y", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:Vector2", kwlist, &xOrSequence, &y)) return NULL; if (_vector2_set(self, xOrSequence, y) == 0) Py_RETURN_NONE; return NULL; } static int _vector2_rotate_helper(double *dst_coords, const double *src_coords, double angle, double epsilon) { /* make sure angle is in range [0, 2 PI) */ angle = fmod(angle, TWO_PI); if (angle < 0) angle += TWO_PI; /* special-case rotation by 0, 90, 180 and 270 degrees */ if (fmod(angle + epsilon, M_PI_2) < 2 * epsilon) { switch ((int)((angle + epsilon) / M_PI_2)) { case 0: /* 0 degrees */ case 4: /* 360 degree (see issue 214) */ dst_coords[0] = src_coords[0]; dst_coords[1] = src_coords[1]; break; case 1: /* 90 degrees */ dst_coords[0] = -src_coords[1]; dst_coords[1] = src_coords[0]; break; case 2: /* 180 degrees */ dst_coords[0] = -src_coords[0]; dst_coords[1] = -src_coords[1]; break; case 3: /* 270 degrees */ dst_coords[0] = src_coords[1]; dst_coords[1] = -src_coords[0]; break; default: /* this should NEVER happen and means a bug in the code */ PyErr_SetString( PyExc_RuntimeError, "Please report this bug in vector2_rotate_helper to " "the developers at github.com/pygame/pygame/issues"); return 0; } } else { double sinValue, cosValue; sinValue = sin(angle); cosValue = cos(angle); dst_coords[0] = cosValue * src_coords[0] - sinValue * src_coords[1]; dst_coords[1] = sinValue * src_coords[0] + cosValue * src_coords[1]; } return 1; } static PyObject * vector2_rotate_rad(pgVector *self, PyObject *angleObject) { double angle; pgVector *ret; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!_vector2_rotate_helper(ret->coords, self->coords, angle, self->epsilon)) { Py_DECREF(ret); return NULL; } return (PyObject *)ret; } static PyObject * vector2_rotate_rad_ip(pgVector *self, PyObject *angleObject) { double angle; double tmp[2]; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } memcpy(tmp, self->coords, 2 * sizeof(double)); if (!_vector2_rotate_helper(self->coords, tmp, angle, self->epsilon)) { return NULL; } Py_RETURN_NONE; } static PyObject * vector2_rotate_ip_rad(pgVector *self, PyObject *angleObject) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "vector2_rotate_rad_ip() now has all the functionality " "of vector2_rotate_ip_rad(), so vector2_rotate_ip_rad() " "will be deprecated in pygame 2.1.1", 1) == -1) { return NULL; } return vector2_rotate_rad_ip(self, angleObject); } static PyObject * vector2_rotate(pgVector *self, PyObject *angleObject) { double angle; pgVector *ret; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!_vector2_rotate_helper(ret->coords, self->coords, angle, self->epsilon)) { Py_DECREF(ret); return NULL; } return (PyObject *)ret; } static PyObject * vector2_rotate_ip(pgVector *self, PyObject *angleObject) { double angle; double tmp[2]; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); memcpy(tmp, self->coords, 2 * sizeof(double)); if (!_vector2_rotate_helper(self->coords, tmp, angle, self->epsilon)) { return NULL; } Py_RETURN_NONE; } static PyObject * vector2_cross(pgVector *self, PyObject *other) { double other_coords[2]; if (self == (pgVector *)other) return PyFloat_FromDouble(0.0); if (!pgVectorCompatible_Check(other, self->dim)) { PyErr_SetString(PyExc_TypeError, "cannot calculate cross Product"); return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, 2)) { return NULL; } return PyFloat_FromDouble((self->coords[0] * other_coords[1]) - (self->coords[1] * other_coords[0])); } static PyObject * vector2_project(pgVector *self, PyObject *other) { return (PyObject *)vector_project_onto(self, other); } static PyObject * vector2_angle_to(pgVector *self, PyObject *other) { double angle; double other_coords[2]; if (!pgVectorCompatible_Check(other, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected a vector."); return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, 2)) { return NULL; } angle = (atan2(other_coords[1], other_coords[0]) - atan2(self->coords[1], self->coords[0])); return PyFloat_FromDouble(RAD2DEG(angle)); } static PyObject * vector2_as_polar(pgVector *self, PyObject *_null) { double r, phi; r = sqrt(_scalar_product(self->coords, self->coords, self->dim)); phi = RAD2DEG(atan2(self->coords[1], self->coords[0])); return Py_BuildValue("(dd)", r, phi); } static PyObject * vector2_from_polar_cls(PyObject *self, PyObject *args) { PyObject *type, *argList, *vec; double r, phi; if (!PyArg_ParseTuple(args, "O(dd):Vector.from_polar", &type, &r, &phi) || type == NULL) { return NULL; } phi = DEG2RAD(phi); argList = Py_BuildValue("(dd)", r * cos(phi), r * sin(phi)); vec = PyObject_CallObject(type, argList); Py_DECREF(argList); return vec; } static PyObject * vector2_from_polar_obj(PyObject *self, PyObject *args) { PyObject *obj; pgVector *vec; double r, phi; if (!PyArg_ParseTuple(args, "O(dd):Vector2.from_polar", &obj, &r, &phi) || obj == NULL) { return NULL; } vec = (pgVector *)obj; phi = DEG2RAD(phi); vec->coords[0] = r * cos(phi); vec->coords[1] = r * sin(phi); Py_RETURN_NONE; } static PyObject * vector_getsafepickle(pgRectObject *self, void *_null) { Py_RETURN_TRUE; } /* for pickling */ static PyObject * vector2_reduce(PyObject *oself, PyObject *_null) { pgVector *self = (pgVector *)oself; return Py_BuildValue("(O(dd))", Py_TYPE(oself), self->coords[0], self->coords[1]); } static PyMethodDef vector2_methods[] = { {"length", (PyCFunction)vector_length, METH_NOARGS, DOC_VECTOR2LENGTH}, {"length_squared", (PyCFunction)vector_length_squared, METH_NOARGS, DOC_VECTOR2LENGTHSQUARED}, {"magnitude", (PyCFunction)vector_length, METH_NOARGS, DOC_VECTOR2MAGNITUDE}, {"magnitude_squared", (PyCFunction)vector_length_squared, METH_NOARGS, DOC_VECTOR2MAGNITUDESQUARED}, {"rotate", (PyCFunction)vector2_rotate, METH_O, DOC_VECTOR2ROTATE}, {"rotate_ip", (PyCFunction)vector2_rotate_ip, METH_O, DOC_VECTOR2ROTATEIP}, {"rotate_rad", (PyCFunction)vector2_rotate_rad, METH_O, DOC_VECTOR2ROTATERAD}, {"rotate_rad_ip", (PyCFunction)vector2_rotate_rad_ip, METH_O, DOC_VECTOR2ROTATERADIP}, {"rotate_ip_rad", (PyCFunction)vector2_rotate_ip_rad, METH_O, DOC_VECTOR2ROTATEIPRAD}, {"move_towards", (PyCFunction)vector_move_towards, METH_VARARGS, DOC_VECTOR2MOVETOWARDS}, {"move_towards_ip", (PyCFunction)vector_move_towards_ip, METH_VARARGS, DOC_VECTOR2MOVETOWARDSIP}, {"slerp", (PyCFunction)vector_slerp, METH_VARARGS, DOC_VECTOR2SLERP}, {"lerp", (PyCFunction)vector_lerp, METH_VARARGS, DOC_VECTOR2LERP}, {"normalize", (PyCFunction)vector_normalize, METH_NOARGS, DOC_VECTOR2NORMALIZE}, {"normalize_ip", (PyCFunction)vector_normalize_ip, METH_NOARGS, DOC_VECTOR2NORMALIZEIP}, {"is_normalized", (PyCFunction)vector_is_normalized, METH_NOARGS, DOC_VECTOR2ISNORMALIZED}, {"cross", (PyCFunction)vector2_cross, METH_O, DOC_VECTOR2CROSS}, {"dot", (PyCFunction)vector_dot, METH_O, DOC_VECTOR2DOT}, {"angle_to", (PyCFunction)vector2_angle_to, METH_O, DOC_VECTOR2ANGLETO}, {"update", (PyCFunction)vector2_update, METH_VARARGS | METH_KEYWORDS, DOC_VECTOR2UPDATE}, {"scale_to_length", (PyCFunction)vector_scale_to_length, METH_O, DOC_VECTOR2SCALETOLENGTH}, {"reflect", (PyCFunction)vector_reflect, METH_O, DOC_VECTOR2REFLECT}, {"reflect_ip", (PyCFunction)vector_reflect_ip, METH_O, DOC_VECTOR2REFLECTIP}, {"distance_to", (PyCFunction)vector_distance_to, METH_O, DOC_VECTOR2DISTANCETO}, {"distance_squared_to", (PyCFunction)vector_distance_squared_to, METH_O, DOC_VECTOR2DISTANCESQUAREDTO}, {"elementwise", (PyCFunction)vector_elementwise, METH_NOARGS, DOC_VECTOR2ELEMENTWISE}, {"as_polar", (PyCFunction)vector2_as_polar, METH_NOARGS, DOC_VECTOR2ASPOLAR}, /*{"from_polar", (PyCFunction)vector2_from_polar, METH_VARARGS, DOC_VECTOR2FROMPOLAR},*/ {"project", (PyCFunction)vector2_project, METH_O, DOC_VECTOR2PROJECT}, {"copy", (PyCFunction)vector_copy, METH_NOARGS, DOC_VECTOR2COPY}, {"__copy__", (PyCFunction)vector_copy, METH_NOARGS, NULL}, {"clamp_magnitude", (PyCFunction)PG_FASTCALL_NAME(vector_clamp_magnitude), PG_FASTCALL, DOC_VECTOR2CLAMPMAGNITUDE}, {"clamp_magnitude_ip", (PyCFunction)PG_FASTCALL_NAME(vector_clamp_magnitude_ip), PG_FASTCALL, DOC_VECTOR2CLAMPMAGNITUDEIP}, {"__safe_for_unpickling__", (PyCFunction)vector_getsafepickle, METH_NOARGS, NULL}, {"__reduce__", (PyCFunction)vector2_reduce, METH_NOARGS, NULL}, {"__round__", (PyCFunction)vector___round__, METH_VARARGS, NULL}, {NULL} /* Sentinel */ }; static PyGetSetDef vector2_getsets[] = { {"x", (getter)vector_getx, (setter)vector_setx, NULL, NULL}, {"y", (getter)vector_gety, (setter)vector_sety, NULL, NULL}, {NULL, 0, NULL, NULL, NULL} /* Sentinel */ }; /******************************** * pgVector2 type definition ********************************/ static PyTypeObject pgVector2_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.math.Vector2", .tp_basicsize = sizeof(pgVector), .tp_dealloc = (destructor)vector_dealloc, .tp_repr = (reprfunc)vector_repr, .tp_as_number = &vector_as_number, .tp_as_sequence = &vector_as_sequence, .tp_as_mapping = &vector_as_mapping, .tp_str = (reprfunc)vector_str, .tp_getattro = (getattrofunc)vector_getAttr_swizzle, .tp_setattro = (setattrofunc)vector_setAttr_swizzle, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMEMATHVECTOR2, .tp_richcompare = (richcmpfunc)vector_richcompare, .tp_iter = vector_iter, .tp_methods = vector2_methods, .tp_members = vector_members, .tp_getset = vector2_getsets, .tp_init = (initproc)vector2_init, .tp_new = (newfunc)vector2_new, }; /************************************************************* * pgVector3 specific functions *************************************************************/ static PyObject * vector3_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { pgVector *vec = (pgVector *)type->tp_alloc(type, 0); if (vec != NULL) { vec->dim = 3; vec->epsilon = VECTOR_EPSILON; vec->coords = PyMem_New(double, vec->dim); if (vec->coords == NULL) { Py_TYPE(vec)->tp_free((PyObject *)vec); return NULL; } } return (PyObject *)vec; } static int _vector3_set(pgVector *self, PyObject *xOrSequence, PyObject *y, PyObject *z) { if (xOrSequence) { if (RealNumber_Check(xOrSequence)) { self->coords[0] = PyFloat_AsDouble(xOrSequence); /* scalar constructor. */ if (y == NULL && z == NULL) { self->coords[1] = self->coords[0]; self->coords[2] = self->coords[0]; return 0; } } else if (pgVectorCompatible_Check(xOrSequence, self->dim)) { if (!PySequence_AsVectorCoords(xOrSequence, self->coords, 3)) return -1; else return 0; } else if (PyUnicode_Check(xOrSequence)) { char *delimiter[4] = {""}; Py_ssize_t error_code; error_code = _vector_coords_from_string(xOrSequence, delimiter, self->coords, self->dim); if (error_code == -2) { return -1; } else if (error_code == -1) { goto error; } return 0; } else { goto error; } } else { self->coords[0] = 0.; self->coords[1] = 0.; self->coords[2] = 0.; return 0; } if (y && !z) { goto error; } else if (y && z) { if (RealNumber_Check(y) && RealNumber_Check(z)) { self->coords[1] = PyFloat_AsDouble(y); self->coords[2] = PyFloat_AsDouble(z); } else { goto error; } } /* success initialization */ return 0; error: PyErr_SetString(PyExc_ValueError, "Vector3 must be set with 3 real numbers, a " "sequence of 3 real numbers, or " "another Vector3 instance"); return -1; } static int vector3_init(pgVector *self, PyObject *args, PyObject *kwds) { PyObject *xOrSequence = NULL, *y = NULL, *z = NULL; static char *kwlist[] = {"x", "y", "z", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOO:Vector3", kwlist, &xOrSequence, &y, &z)) return -1; return _vector3_set(self, xOrSequence, y, z); } static PyObject * vector3_update(pgVector *self, PyObject *args, PyObject *kwds) { PyObject *xOrSequence = NULL, *y = NULL, *z = NULL; static char *kwlist[] = {"x", "y", "z", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOO:Vector3", kwlist, &xOrSequence, &y, &z)) return NULL; if (_vector3_set(self, xOrSequence, y, z) == 0) Py_RETURN_NONE; return NULL; } static int _vector3_rotate_helper(double *dst_coords, const double *src_coords, const double *axis_coords, double angle, double epsilon) { double normalizationFactor; double axisLength2 = 0; double axis[3]; int i; /* make sure angle is in range [0, 2 PI) */ angle = fmod(angle, TWO_PI); if (angle < 0) angle += TWO_PI; for (i = 0; i < 3; ++i) { axisLength2 += axis_coords[i] * axis_coords[i]; axis[i] = axis_coords[i]; } /* Rotation axis may not be Zero */ if (axisLength2 < epsilon) { PyErr_SetString(PyExc_ValueError, "Rotation Axis is to close to Zero"); return 0; } /* normalize the axis */ if (fabs(axisLength2 - 1) > epsilon) { normalizationFactor = 1. / sqrt(axisLength2); for (i = 0; i < 3; ++i) axis[i] *= normalizationFactor; } /* special-case rotation by 0, 90, 180 and 270 degrees */ if (fmod(angle + epsilon, M_PI_2) < 2 * epsilon) { switch ((int)((angle + epsilon) / M_PI_2)) { case 0: /* 0 degrees */ case 4: /* 360 degrees (see issue 214) */ memcpy(dst_coords, src_coords, 3 * sizeof(src_coords[0])); break; case 1: /* 90 degrees */ dst_coords[0] = (src_coords[0] * (axis[0] * axis[0]) + src_coords[1] * (axis[0] * axis[1] - axis[2]) + src_coords[2] * (axis[0] * axis[2] + axis[1])); dst_coords[1] = (src_coords[0] * (axis[0] * axis[1] + axis[2]) + src_coords[1] * (axis[1] * axis[1]) + src_coords[2] * (axis[1] * axis[2] - axis[0])); dst_coords[2] = (src_coords[0] * (axis[0] * axis[2] - axis[1]) + src_coords[1] * (axis[1] * axis[2] + axis[0]) + src_coords[2] * (axis[2] * axis[2])); break; case 2: /* 180 degrees */ dst_coords[0] = (src_coords[0] * (-1 + axis[0] * axis[0] * 2) + src_coords[1] * (axis[0] * axis[1] * 2) + src_coords[2] * (axis[0] * axis[2] * 2)); dst_coords[1] = (src_coords[0] * (axis[0] * axis[1] * 2) + src_coords[1] * (-1 + axis[1] * axis[1] * 2) + src_coords[2] * (axis[1] * axis[2] * 2)); dst_coords[2] = (src_coords[0] * (axis[0] * axis[2] * 2) + src_coords[1] * (axis[1] * axis[2] * 2) + src_coords[2] * (-1 + axis[2] * axis[2] * 2)); break; case 3: /* 270 degrees */ dst_coords[0] = (src_coords[0] * (axis[0] * axis[0]) + src_coords[1] * (axis[0] * axis[1] + axis[2]) + src_coords[2] * (axis[0] * axis[2] - axis[1])); dst_coords[1] = (src_coords[0] * (axis[0] * axis[1] - axis[2]) + src_coords[1] * (axis[1] * axis[1]) + src_coords[2] * (axis[1] * axis[2] + axis[0])); dst_coords[2] = (src_coords[0] * (axis[0] * axis[2] + axis[1]) + src_coords[1] * (axis[1] * axis[2] - axis[0]) + src_coords[2] * (axis[2] * axis[2])); break; default: /* this should NEVER happen and means a bug in the code */ PyErr_SetString( PyExc_RuntimeError, "Please report this bug in vector3_rotate_helper to " "the developers at github.com/pygame/pygame/issues"); return 0; } } else { double sinValue = sin(angle); double cosValue = cos(angle); double cosComplement = 1 - cosValue; dst_coords[0] = (src_coords[0] * (cosValue + axis[0] * axis[0] * cosComplement) + src_coords[1] * (axis[0] * axis[1] * cosComplement - axis[2] * sinValue) + src_coords[2] * (axis[0] * axis[2] * cosComplement + axis[1] * sinValue)); dst_coords[1] = (src_coords[0] * (axis[0] * axis[1] * cosComplement + axis[2] * sinValue) + src_coords[1] * (cosValue + axis[1] * axis[1] * cosComplement) + src_coords[2] * (axis[1] * axis[2] * cosComplement - axis[0] * sinValue)); dst_coords[2] = (src_coords[0] * (axis[0] * axis[2] * cosComplement - axis[1] * sinValue) + src_coords[1] * (axis[1] * axis[2] * cosComplement + axis[0] * sinValue) + src_coords[2] * (cosValue + axis[2] * axis[2] * cosComplement)); } return 1; } static PyObject * vector3_rotate_rad(pgVector *self, PyObject *args) { pgVector *ret; PyObject *axis; double axis_coords[3]; double angle; if (!PyArg_ParseTuple(args, "dO:rotate", &angle, &axis)) { return NULL; } if (!pgVectorCompatible_Check(axis, self->dim)) { PyErr_SetString(PyExc_TypeError, "axis must be a 3D Vector"); return NULL; } if (!PySequence_AsVectorCoords(axis, axis_coords, 3)) { return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!_vector3_rotate_helper(ret->coords, self->coords, axis_coords, angle, self->epsilon)) { Py_DECREF(ret); return NULL; } return (PyObject *)ret; } static PyObject * vector3_rotate_rad_ip(pgVector *self, PyObject *args) { PyObject *axis; double axis_coords[3]; double angle; double tmp[3]; if (!PyArg_ParseTuple(args, "dO:rotate", &angle, &axis)) { return NULL; } if (!pgVectorCompatible_Check(axis, self->dim)) { PyErr_SetString(PyExc_TypeError, "axis must be a 3D Vector"); return NULL; } if (!PySequence_AsVectorCoords(axis, axis_coords, 3)) { return NULL; } memcpy(tmp, self->coords, 3 * sizeof(self->coords[0])); if (!_vector3_rotate_helper(self->coords, tmp, axis_coords, angle, self->epsilon)) { return NULL; } Py_RETURN_NONE; } static PyObject * vector3_rotate_ip_rad(pgVector *self, PyObject *angleObject) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "vector3_rotate_rad_ip() now has all the functionality " "of vector3_rotate_ip_rad(), so vector3_rotate_ip_rad() " "will be deprecated in pygame 2.1.1", 1) == -1) { return NULL; } return vector3_rotate_rad_ip(self, angleObject); } static PyObject * vector3_rotate(pgVector *self, PyObject *args) { pgVector *ret; PyObject *axis; double axis_coords[3]; double angle; if (!PyArg_ParseTuple(args, "dO:rotate", &angle, &axis)) { return NULL; } angle = DEG2RAD(angle); if (!pgVectorCompatible_Check(axis, self->dim)) { PyErr_SetString(PyExc_TypeError, "axis must be a 3D Vector"); return NULL; } if (!PySequence_AsVectorCoords(axis, axis_coords, 3)) { return NULL; } ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } if (!_vector3_rotate_helper(ret->coords, self->coords, axis_coords, angle, self->epsilon)) { Py_DECREF(ret); return NULL; } return (PyObject *)ret; } static PyObject * vector3_rotate_ip(pgVector *self, PyObject *args) { PyObject *axis; double axis_coords[3]; double angle; double tmp[3]; if (!PyArg_ParseTuple(args, "dO:rotate_ip", &angle, &axis)) { return NULL; } angle = DEG2RAD(angle); if (!pgVectorCompatible_Check(axis, self->dim)) { PyErr_SetString(PyExc_TypeError, "axis must be a 3D Vector"); return NULL; } if (!PySequence_AsVectorCoords(axis, axis_coords, 3)) { return NULL; } memcpy(tmp, self->coords, 3 * sizeof(self->coords[0])); if (!_vector3_rotate_helper(self->coords, tmp, axis_coords, angle, self->epsilon)) { return NULL; } Py_RETURN_NONE; } static PyObject * vector3_rotate_x_rad(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0]; ret->coords[1] = self->coords[1] * cosValue - self->coords[2] * sinValue; ret->coords[2] = self->coords[1] * sinValue + self->coords[2] * cosValue; return (PyObject *)ret; } static PyObject * vector3_rotate_x_rad_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[1] = tmp_coords[1] * cosValue - tmp_coords[2] * sinValue; self->coords[2] = tmp_coords[1] * sinValue + tmp_coords[2] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_rotate_x_ip_rad(pgVector *self, PyObject *angleObject) { if (PyErr_WarnEx( PyExc_DeprecationWarning, "vector3_rotate_x_rad_ip() now has all the functionality of " "vector3_rotate_x_ip_rad(), so vector3_rotate_x_ip_rad() will " "be deprecated in pygame 2.1.1", 1) == -1) { return NULL; } return vector3_rotate_x_rad_ip(self, angleObject); } static PyObject * vector3_rotate_x(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0]; ret->coords[1] = self->coords[1] * cosValue - self->coords[2] * sinValue; ret->coords[2] = self->coords[1] * sinValue + self->coords[2] * cosValue; return (PyObject *)ret; } static PyObject * vector3_rotate_x_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[1] = tmp_coords[1] * cosValue - tmp_coords[2] * sinValue; self->coords[2] = tmp_coords[1] * sinValue + tmp_coords[2] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_rotate_y_rad(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0] * cosValue + self->coords[2] * sinValue; ret->coords[1] = self->coords[1]; ret->coords[2] = -self->coords[0] * sinValue + self->coords[2] * cosValue; return (PyObject *)ret; } static PyObject * vector3_rotate_y_rad_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[0] = tmp_coords[0] * cosValue + tmp_coords[2] * sinValue; self->coords[2] = -tmp_coords[0] * sinValue + tmp_coords[2] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_rotate_y_ip_rad(pgVector *self, PyObject *angleObject) { if (PyErr_WarnEx( PyExc_DeprecationWarning, "vector3_rotate_y_rad_ip() now has all the functionality of " "vector3_rotate_y_ip_rad(), so vector3_rotate_y_ip_rad() will " "be deprecated in pygame 2.1.1", 1) == -1) { return NULL; } return vector3_rotate_x_rad_ip(self, angleObject); } static PyObject * vector3_rotate_y(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0] * cosValue + self->coords[2] * sinValue; ret->coords[1] = self->coords[1]; ret->coords[2] = -self->coords[0] * sinValue + self->coords[2] * cosValue; return (PyObject *)ret; } static PyObject * vector3_rotate_y_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[0] = tmp_coords[0] * cosValue + tmp_coords[2] * sinValue; self->coords[2] = -tmp_coords[0] * sinValue + tmp_coords[2] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_rotate_z_rad(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0] * cosValue - self->coords[1] * sinValue; ret->coords[1] = self->coords[0] * sinValue + self->coords[1] * cosValue; ret->coords[2] = self->coords[2]; return (PyObject *)ret; } static PyObject * vector3_rotate_z_rad_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[0] = tmp_coords[0] * cosValue - tmp_coords[1] * sinValue; self->coords[1] = tmp_coords[0] * sinValue + tmp_coords[1] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_rotate_z_ip_rad(pgVector *self, PyObject *angleObject) { if (PyErr_WarnEx( PyExc_DeprecationWarning, "vector3_rotate_z_rad_ip() now has all the functionality of " "vector3_rotate_z_ip_rad(), so vector3_rotate_z_ip_rad() will " "be deprecated in pygame 2.1.1", 1) == -1) { return NULL; } return vector3_rotate_x_rad_ip(self, angleObject); } static PyObject * vector3_rotate_z(pgVector *self, PyObject *angleObject) { pgVector *ret; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); ret = _vector_subtype_new(self); if (ret == NULL) { return NULL; } ret->coords[0] = self->coords[0] * cosValue - self->coords[1] * sinValue; ret->coords[1] = self->coords[0] * sinValue + self->coords[1] * cosValue; ret->coords[2] = self->coords[2]; return (PyObject *)ret; } static PyObject * vector3_rotate_z_ip(pgVector *self, PyObject *angleObject) { double tmp_coords[3]; double sinValue, cosValue; double angle; angle = PyFloat_AsDouble(angleObject); if (angle == -1.0 && PyErr_Occurred()) { return NULL; } angle = DEG2RAD(angle); sinValue = sin(angle); cosValue = cos(angle); memcpy(tmp_coords, self->coords, 3 * sizeof(tmp_coords[0])); self->coords[0] = tmp_coords[0] * cosValue - tmp_coords[1] * sinValue; self->coords[1] = tmp_coords[0] * sinValue + tmp_coords[1] * cosValue; Py_RETURN_NONE; } static PyObject * vector3_cross(pgVector *self, PyObject *other) { pgVector *ret; double *ret_coords; double *self_coords; double *other_coords; if (!pgVectorCompatible_Check(other, self->dim)) { PyErr_SetString(PyExc_TypeError, "cannot calculate cross Product"); return NULL; } self_coords = self->coords; if (pgVector_Check(other)) { other_coords = ((pgVector *)other)->coords; } else { other_coords = PyMem_New(double, self->dim); if (!other_coords) { return PyErr_NoMemory(); } if (!PySequence_AsVectorCoords(other, other_coords, 3)) { PyMem_Free(other_coords); return NULL; } } ret = _vector_subtype_new(self); if (ret == NULL) { if (!pgVector_Check(other)) PyMem_Free(other_coords); return NULL; } ret_coords = ret->coords; ret_coords[0] = ((self_coords[1] * other_coords[2]) - (self_coords[2] * other_coords[1])); ret_coords[1] = ((self_coords[2] * other_coords[0]) - (self_coords[0] * other_coords[2])); ret_coords[2] = ((self_coords[0] * other_coords[1]) - (self_coords[1] * other_coords[0])); if (!pgVector_Check(other)) PyMem_Free(other_coords); return (PyObject *)ret; } static PyObject * vector3_angle_to(pgVector *self, PyObject *other) { double angle, tmp, squared_length1, squared_length2; double other_coords[VECTOR_MAX_SIZE]; if (!pgVectorCompatible_Check(other, self->dim)) { PyErr_SetString(PyExc_TypeError, "Expected a vector."); return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, self->dim)) { return NULL; } squared_length1 = _scalar_product(self->coords, self->coords, self->dim); squared_length2 = _scalar_product(other_coords, other_coords, self->dim); tmp = sqrt(squared_length1 * squared_length2); if (tmp == 0) { PyErr_SetString(PyExc_ValueError, "angle to zero vector is undefined."); return NULL; } angle = acos(_scalar_product(self->coords, other_coords, self->dim) / tmp); return PyFloat_FromDouble(RAD2DEG(angle)); } static PyObject * vector3_as_spherical(pgVector *self, PyObject *_null) { double r, theta, phi; r = sqrt(_scalar_product(self->coords, self->coords, self->dim)); if (r == 0.) { return Py_BuildValue("(ddd)", 0., 0., 0.); } theta = RAD2DEG(acos(self->coords[2] / r)); phi = RAD2DEG(atan2(self->coords[1], self->coords[0])); return Py_BuildValue("(ddd)", r, theta, phi); } static PyObject * vector3_from_spherical_cls(PyObject *self, PyObject *args) { PyObject *type, *argList, *vec; double r, theta, phi; if (!PyArg_ParseTuple(args, "O(ddd):Vector3.from_spherical", &type, &r, &theta, &phi) || type == NULL) { return NULL; } theta = DEG2RAD(theta); phi = DEG2RAD(phi); argList = Py_BuildValue("(ddd)", r * sin(theta) * cos(phi), r * sin(theta) * sin(phi), r * cos(theta)); vec = PyObject_CallObject(type, argList); return vec; } static PyObject * vector3_from_spherical_obj(PyObject *self, PyObject *args) { PyObject *obj; pgVector *vec; double r, theta, phi; if (!PyArg_ParseTuple(args, "O(ddd):Vector3.from_spherical", &obj, &r, &theta, &phi) || obj == NULL) { return NULL; } vec = (pgVector *)obj; theta = DEG2RAD(theta); phi = DEG2RAD(phi); vec->coords[0] = r * sin(theta) * cos(phi); vec->coords[1] = r * sin(theta) * sin(phi); vec->coords[2] = r * cos(theta); Py_RETURN_NONE; } static PyObject * vector3_project(pgVector *self, PyObject *other) { return (PyObject *)vector_project_onto(self, other); } /* For pickling. */ static PyObject * vector3_reduce(PyObject *oself, PyObject *_null) { pgVector *self = (pgVector *)oself; return Py_BuildValue("(O(ddd))", Py_TYPE(oself), self->coords[0], self->coords[1], self->coords[2]); } static PyMethodDef vector3_methods[] = { {"length", (PyCFunction)vector_length, METH_NOARGS, DOC_VECTOR3LENGTH}, {"length_squared", (PyCFunction)vector_length_squared, METH_NOARGS, DOC_VECTOR3LENGTHSQUARED}, {"magnitude", (PyCFunction)vector_length, METH_NOARGS, DOC_VECTOR3MAGNITUDE}, {"magnitude_squared", (PyCFunction)vector_length_squared, METH_NOARGS, DOC_VECTOR3MAGNITUDESQUARED}, {"rotate", (PyCFunction)vector3_rotate, METH_VARARGS, DOC_VECTOR3ROTATE}, {"rotate_ip", (PyCFunction)vector3_rotate_ip, METH_VARARGS, DOC_VECTOR3ROTATEIP}, {"rotate_rad", (PyCFunction)vector3_rotate_rad, METH_VARARGS, DOC_VECTOR3ROTATERAD}, {"rotate_rad_ip", (PyCFunction)vector3_rotate_rad_ip, METH_VARARGS, DOC_VECTOR3ROTATERADIP}, {"rotate_ip_rad", (PyCFunction)vector3_rotate_ip_rad, METH_VARARGS, DOC_VECTOR3ROTATEIPRAD}, {"rotate_x", (PyCFunction)vector3_rotate_x, METH_O, DOC_VECTOR3ROTATEX}, {"rotate_x_ip", (PyCFunction)vector3_rotate_x_ip, METH_O, DOC_VECTOR3ROTATEXIP}, {"rotate_x_rad", (PyCFunction)vector3_rotate_x_rad, METH_O, DOC_VECTOR3ROTATEXRAD}, {"rotate_x_rad_ip", (PyCFunction)vector3_rotate_x_rad_ip, METH_O, DOC_VECTOR3ROTATEXRADIP}, {"rotate_x_ip_rad", (PyCFunction)vector3_rotate_x_ip_rad, METH_O, DOC_VECTOR3ROTATEXIPRAD}, {"rotate_y", (PyCFunction)vector3_rotate_y, METH_O, DOC_VECTOR3ROTATEY}, {"rotate_y_ip", (PyCFunction)vector3_rotate_y_ip, METH_O, DOC_VECTOR3ROTATEYIP}, {"rotate_y_rad", (PyCFunction)vector3_rotate_y_rad, METH_O, DOC_VECTOR3ROTATEYRAD}, {"rotate_y_rad_ip", (PyCFunction)vector3_rotate_y_rad_ip, METH_O, DOC_VECTOR3ROTATEYRADIP}, {"rotate_y_ip_rad", (PyCFunction)vector3_rotate_y_ip_rad, METH_O, DOC_VECTOR3ROTATEYIPRAD}, {"rotate_z", (PyCFunction)vector3_rotate_z, METH_O, DOC_VECTOR3ROTATEZ}, {"rotate_z_ip", (PyCFunction)vector3_rotate_z_ip, METH_O, DOC_VECTOR3ROTATEZIP}, {"rotate_z_rad", (PyCFunction)vector3_rotate_z_rad, METH_O, DOC_VECTOR3ROTATEZRAD}, {"rotate_z_rad_ip", (PyCFunction)vector3_rotate_z_rad_ip, METH_O, DOC_VECTOR3ROTATEZRADIP}, {"rotate_z_ip_rad", (PyCFunction)vector3_rotate_z_ip_rad, METH_O, DOC_VECTOR3ROTATEZIPRAD}, {"move_towards", (PyCFunction)vector_move_towards, METH_VARARGS, DOC_VECTOR3MOVETOWARDS}, {"move_towards_ip", (PyCFunction)vector_move_towards_ip, METH_VARARGS, DOC_VECTOR3MOVETOWARDSIP}, {"slerp", (PyCFunction)vector_slerp, METH_VARARGS, DOC_VECTOR3SLERP}, {"lerp", (PyCFunction)vector_lerp, METH_VARARGS, DOC_VECTOR3LERP}, {"normalize", (PyCFunction)vector_normalize, METH_NOARGS, DOC_VECTOR3NORMALIZE}, {"normalize_ip", (PyCFunction)vector_normalize_ip, METH_NOARGS, DOC_VECTOR3NORMALIZEIP}, {"is_normalized", (PyCFunction)vector_is_normalized, METH_NOARGS, DOC_VECTOR3ISNORMALIZED}, {"cross", (PyCFunction)vector3_cross, METH_O, DOC_VECTOR3CROSS}, {"dot", (PyCFunction)vector_dot, METH_O, DOC_VECTOR3DOT}, {"angle_to", (PyCFunction)vector3_angle_to, METH_O, DOC_VECTOR3ANGLETO}, {"update", (PyCFunction)vector3_update, METH_VARARGS | METH_KEYWORDS, DOC_VECTOR3UPDATE}, {"scale_to_length", (PyCFunction)vector_scale_to_length, METH_O, DOC_VECTOR3SCALETOLENGTH}, {"reflect", (PyCFunction)vector_reflect, METH_O, DOC_VECTOR3REFLECT}, {"reflect_ip", (PyCFunction)vector_reflect_ip, METH_O, DOC_VECTOR3REFLECTIP}, {"distance_to", (PyCFunction)vector_distance_to, METH_O, DOC_VECTOR3DISTANCETO}, {"distance_squared_to", (PyCFunction)vector_distance_squared_to, METH_O, DOC_VECTOR3DISTANCESQUAREDTO}, {"elementwise", (PyCFunction)vector_elementwise, METH_NOARGS, DOC_VECTOR3ELEMENTWISE}, {"as_spherical", (PyCFunction)vector3_as_spherical, METH_NOARGS, DOC_VECTOR3ASSPHERICAL}, /*{"from_spherical", (PyCFunction)vector3_from_spherical, METH_VARARGS, DOC_VECTOR3FROMSPHERICAL},*/ {"project", (PyCFunction)vector3_project, METH_O, DOC_VECTOR3PROJECT}, {"copy", (PyCFunction)vector_copy, METH_NOARGS, DOC_VECTOR3COPY}, {"__copy__", (PyCFunction)vector_copy, METH_NOARGS, NULL}, {"clamp_magnitude", (PyCFunction)PG_FASTCALL_NAME(vector_clamp_magnitude), PG_FASTCALL, DOC_VECTOR3CLAMPMAGNITUDE}, {"clamp_magnitude_ip", (PyCFunction)PG_FASTCALL_NAME(vector_clamp_magnitude_ip), PG_FASTCALL, DOC_VECTOR3CLAMPMAGNITUDEIP}, {"__safe_for_unpickling__", (PyCFunction)vector_getsafepickle, METH_NOARGS, NULL}, {"__reduce__", (PyCFunction)vector3_reduce, METH_NOARGS, NULL}, {"__round__", (PyCFunction)vector___round__, METH_VARARGS, NULL}, {NULL} /* Sentinel */ }; static PyGetSetDef vector3_getsets[] = { {"x", (getter)vector_getx, (setter)vector_setx, NULL, NULL}, {"y", (getter)vector_gety, (setter)vector_sety, NULL, NULL}, {"z", (getter)vector_getz, (setter)vector_setz, NULL, NULL}, {NULL, 0, NULL, NULL, NULL} /* Sentinel */ }; /******************************** * pgVector3 type definition ********************************/ static PyTypeObject pgVector3_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.math.Vector3", .tp_basicsize = sizeof(pgVector), .tp_dealloc = (destructor)vector_dealloc, .tp_repr = (reprfunc)vector_repr, .tp_as_number = &vector_as_number, .tp_as_sequence = &vector_as_sequence, .tp_as_mapping = &vector_as_mapping, .tp_str = (reprfunc)vector_str, .tp_getattro = (getattrofunc)vector_getAttr_swizzle, .tp_setattro = (setattrofunc)vector_setAttr_swizzle, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMEMATHVECTOR3, .tp_richcompare = (richcmpfunc)vector_richcompare, .tp_iter = vector_iter, .tp_methods = vector3_methods, .tp_members = vector_members, .tp_getset = vector3_getsets, .tp_init = (initproc)vector3_init, .tp_new = (newfunc)vector3_new, }; /******************************************** * pgVectorIterator type definition ********************************************/ static void vectoriter_dealloc(vectoriter *it) { Py_XDECREF(it->vec); PyObject_Free(it); } static PyObject * vectoriter_next(vectoriter *it) { assert(it != NULL); if (it->vec == NULL) return NULL; assert(pgVector_Check(it->vec)); if (it->it_index < it->vec->dim) { double item = it->vec->coords[it->it_index]; ++(it->it_index); return PyFloat_FromDouble(item); } Py_DECREF(it->vec); it->vec = NULL; return NULL; } static PyObject * vectoriter_len(vectoriter *it) { Py_ssize_t len = 0; if (it && it->vec) { len = it->vec->dim - it->it_index; } return PyLong_FromSsize_t(len); } static PyMethodDef vectoriter_methods[] = { { "__length_hint__", (PyCFunction)vectoriter_len, METH_NOARGS, }, {NULL, NULL} /* sentinel */ }; static PyTypeObject pgVectorIter_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.math.VectorIterator", .tp_basicsize = sizeof(vectoriter), .tp_dealloc = (destructor)vectoriter_dealloc, .tp_getattro = PyObject_GenericGetAttr, /* VectorIterator is not subtypable for now, no Py_TPFLAGS_BASETYPE */ .tp_flags = Py_TPFLAGS_DEFAULT, .tp_iter = PyObject_SelfIter, .tp_iternext = (iternextfunc)vectoriter_next, .tp_methods = vectoriter_methods, }; static PyObject * vector_iter(PyObject *vec) { vectoriter *it; if (!pgVector_Check(vec)) { PyErr_BadInternalCall(); return NULL; } it = PyObject_New(vectoriter, &pgVectorIter_Type); if (it == NULL) return NULL; it->it_index = 0; Py_INCREF(vec); it->vec = (pgVector *)vec; return (PyObject *)it; } /***************************************** * elementwiseproxy *****************************************/ static void vector_elementwiseproxy_dealloc(vector_elementwiseproxy *it) { Py_XDECREF(it->vec); PyObject_Free(it); } static PyObject * vector_elementwiseproxy_richcompare(PyObject *o1, PyObject *o2, int op) { Py_ssize_t i, dim; int ret = 1; double diff, value; pgVector *vec; PyObject *other; if (vector_elementwiseproxy_Check(o1)) { vec = ((vector_elementwiseproxy *)o1)->vec; other = o2; } else { vec = ((vector_elementwiseproxy *)o2)->vec; other = o1; /* flip op */ if (op == Py_LT) op = Py_GE; else if (op == Py_LE) op = Py_GT; else if (op == Py_GT) op = Py_LE; else if (op == Py_GE) op = Py_LT; } if (vector_elementwiseproxy_Check(other)) other = (PyObject *)((vector_elementwiseproxy *)other)->vec; dim = vec->dim; if (pgVectorCompatible_Check(other, dim)) { double *other_coords = PyMem_New(double, dim); if (other_coords == NULL) { return NULL; } if (!PySequence_AsVectorCoords(other, other_coords, dim)) { PyMem_Free(other_coords); return NULL; } /* use diff == diff to check for NaN */ /* TODO: how should NaN be handled with LT/LE/GT/GE? */ switch (op) { case Py_EQ: for (i = 0; i < dim; i++) { diff = vec->coords[i] - other_coords[i]; if ((diff != diff) || (fabs(diff) >= vec->epsilon)) { ret = 0; break; } } break; case Py_NE: for (i = 0; i < dim; i++) { diff = vec->coords[i] - other_coords[i]; if ((diff == diff) && (fabs(diff) < vec->epsilon)) { ret = 0; break; } } break; case Py_LT: for (i = 0; i < dim; i++) { if (vec->coords[i] >= other_coords[i]) { ret = 0; break; } } break; case Py_LE: for (i = 0; i < dim; i++) { if (vec->coords[i] > other_coords[i]) { ret = 0; break; } } break; case Py_GT: for (i = 0; i < dim; i++) { if (vec->coords[i] <= other_coords[i]) { ret = 0; break; } } break; case Py_GE: for (i = 0; i < dim; i++) { if (vec->coords[i] < other_coords[i]) { ret = 0; break; } } break; default: PyMem_Free(other_coords); PyErr_BadInternalCall(); return NULL; } PyMem_Free(other_coords); } else if (RealNumber_Check(other)) { /* the following PyFloat_AsDouble call should never fail because then RealNumber_Check should have returned false */ value = PyFloat_AsDouble(other); switch (op) { case Py_EQ: for (i = 0; i < dim; i++) { diff = vec->coords[i] - value; if (diff != diff || fabs(diff) >= vec->epsilon) { ret = 0; break; } } break; case Py_NE: for (i = 0; i < dim; i++) { diff = vec->coords[i] - value; if (diff == diff && fabs(diff) < vec->epsilon) { ret = 0; break; } } break; case Py_LT: for (i = 0; i < dim; i++) { if (vec->coords[i] >= value) { ret = 0; break; } } break; case Py_LE: for (i = 0; i < dim; i++) { if (vec->coords[i] > value) { ret = 0; break; } } break; case Py_GT: for (i = 0; i < dim; i++) { if (vec->coords[i] <= value) { ret = 0; break; } } break; case Py_GE: for (i = 0; i < dim; i++) { if (vec->coords[i] < value) { ret = 0; break; } } break; default: PyErr_BadInternalCall(); return NULL; } } else { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } return PyBool_FromLong(ret); } /******************************************************* * vector_elementwiseproxy PyNumber emulation routines *******************************************************/ static PyObject * vector_elementwiseproxy_generic_math(PyObject *o1, PyObject *o2, int op) { Py_ssize_t i, dim; double mod, other_value = 0.0; double other_coords[VECTOR_MAX_SIZE] = {0}; PyObject *other; pgVector *vec, *ret; if (vector_elementwiseproxy_Check(o1)) { vec = ((vector_elementwiseproxy *)o1)->vec; other = o2; } else { other = o1; vec = ((vector_elementwiseproxy *)o2)->vec; op |= OP_ARG_REVERSE; } dim = vec->dim; if (vector_elementwiseproxy_Check(other)) other = (PyObject *)((vector_elementwiseproxy *)other)->vec; if (pgVectorCompatible_Check(other, dim)) { op |= OP_ARG_VECTOR; if (!PySequence_AsVectorCoords(other, other_coords, dim)) return NULL; } else if (RealNumber_Check(other)) { op |= OP_ARG_NUMBER; other_value = PyFloat_AsDouble(other); } else op |= OP_ARG_UNKNOWN; ret = _vector_subtype_new(vec); if (ret == NULL) { return NULL; } /* only handle special elementwise cases. * all others cases will be handled by the default clause */ switch (op) { case OP_ADD | OP_ARG_NUMBER: case OP_ADD | OP_ARG_NUMBER | OP_ARG_REVERSE: for (i = 0; i < dim; i++) { ret->coords[i] = vec->coords[i] + other_value; } break; case OP_SUB | OP_ARG_NUMBER: for (i = 0; i < dim; i++) ret->coords[i] = vec->coords[i] - other_value; break; case OP_SUB | OP_ARG_NUMBER | OP_ARG_REVERSE: for (i = 0; i < dim; i++) ret->coords[i] = other_value - vec->coords[i]; break; case OP_MUL | OP_ARG_VECTOR: case OP_MUL | OP_ARG_VECTOR | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) ret->coords[i] = vec->coords[i] * other_coords[i]; break; case OP_DIV | OP_ARG_VECTOR: for (i = 0; i < vec->dim; i++) { if (other_coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = vec->coords[i] / other_coords[i]; } break; case OP_DIV | OP_ARG_VECTOR | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = other_coords[i] / vec->coords[i]; } break; case OP_DIV | OP_ARG_NUMBER | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = other_value / vec->coords[i]; } break; case OP_FLOOR_DIV | OP_ARG_VECTOR: for (i = 0; i < vec->dim; i++) { if (other_coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = floor(vec->coords[i] / other_coords[i]); } break; case OP_FLOOR_DIV | OP_ARG_VECTOR | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = floor(other_coords[i] / vec->coords[i]); } break; case OP_FLOOR_DIV | OP_ARG_NUMBER | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } ret->coords[i] = floor(other_value / vec->coords[i]); } break; case OP_MOD | OP_ARG_VECTOR: for (i = 0; i < vec->dim; i++) { if (other_coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } mod = fmod(vec->coords[i], other_coords[i]); /* note: checking mod*value < 0 is incorrect -- underflows to 0 if value < sqrt(smallest nonzero double) */ if (mod && ((other_coords[i] < 0) != (mod < 0))) { mod += other_coords[i]; } ret->coords[i] = mod; } break; case OP_MOD | OP_ARG_VECTOR | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } mod = fmod(other_coords[i], vec->coords[i]); /* note: see above */ if (mod && ((vec->coords[i] < 0) != (mod < 0))) { mod += vec->coords[i]; } ret->coords[i] = mod; } break; case OP_MOD | OP_ARG_NUMBER: if (other_value == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } for (i = 0; i < vec->dim; i++) { mod = fmod(vec->coords[i], other_value); /* note: see above */ if (mod && ((other_value < 0) != (mod < 0))) { mod += other_value; } ret->coords[i] = mod; } break; case OP_MOD | OP_ARG_NUMBER | OP_ARG_REVERSE: for (i = 0; i < vec->dim; i++) { if (vec->coords[i] == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "division by zero"); Py_DECREF(ret); return NULL; } mod = fmod(other_value, vec->coords[i]); /* note: see above */ if (mod && ((vec->coords[i] < 0) != (mod < 0))) { mod += vec->coords[i]; } ret->coords[i] = mod; } break; default: Py_DECREF(ret); return vector_generic_math((PyObject *)vec, other, op); } return (PyObject *)ret; } static PyObject * vector_elementwiseproxy_add(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_ADD); } static PyObject * vector_elementwiseproxy_sub(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_SUB); } static PyObject * vector_elementwiseproxy_mul(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_MUL); } static PyObject * vector_elementwiseproxy_div(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_DIV); } static PyObject * vector_elementwiseproxy_floor_div(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_FLOOR_DIV); } static PyObject * vector_elementwiseproxy_mod(PyObject *o1, PyObject *o2) { return vector_elementwiseproxy_generic_math(o1, o2, OP_MOD); } static PyObject * vector_elementwiseproxy_pow(PyObject *baseObj, PyObject *expoObj, PyObject *mod) { Py_ssize_t i, dim; pgVector *vec; double *tmp; PyObject *bases[VECTOR_MAX_SIZE] = {NULL}; PyObject *expos[VECTOR_MAX_SIZE] = {NULL}; PyObject *ret, *result; if (mod != Py_None) { PyErr_SetString(PyExc_TypeError, "pow() 3rd argument not " "supported for vectors"); return NULL; } if (vector_elementwiseproxy_Check(baseObj)) { vec = ((vector_elementwiseproxy *)baseObj)->vec; dim = vec->dim; tmp = vec->coords; for (i = 0; i < dim; ++i) bases[i] = PyFloat_FromDouble(tmp[i]); if (vector_elementwiseproxy_Check(expoObj)) { tmp = ((vector_elementwiseproxy *)expoObj)->vec->coords; for (i = 0; i < dim; ++i) expos[i] = PyFloat_FromDouble(tmp[i]); } else if (pgVectorCompatible_Check(expoObj, dim)) { for (i = 0; i < dim; ++i) expos[i] = PySequence_ITEM(expoObj, i); } else if (RealNumber_Check(expoObj)) { /* INCREF so that we can unify the clean up code */ for (i = 0; i < dim; i++) { expos[i] = expoObj; Py_INCREF(expoObj); } } else { Py_INCREF(Py_NotImplemented); ret = Py_NotImplemented; goto clean_up; } } else { vec = ((vector_elementwiseproxy *)expoObj)->vec; dim = vec->dim; tmp = vec->coords; for (i = 0; i < dim; ++i) expos[i] = PyFloat_FromDouble(tmp[i]); if (pgVectorCompatible_Check(baseObj, dim)) { for (i = 0; i < dim; ++i) bases[i] = PySequence_ITEM(baseObj, i); } else if (RealNumber_Check(baseObj)) { /* INCREF so that we can unify the clean up code */ for (i = 0; i < dim; i++) { bases[i] = baseObj; Py_INCREF(baseObj); } } else { Py_INCREF(Py_NotImplemented); ret = Py_NotImplemented; goto clean_up; } } if (PyErr_Occurred()) { ret = NULL; goto clean_up; } ret = (PyObject *)_vector_subtype_new(vec); if (ret == NULL) goto clean_up; /* there are many special cases so we let python do the work for us */ for (i = 0; i < dim; i++) { result = PyNumber_Power(bases[i], expos[i], Py_None); if (result == NULL || !RealNumber_Check(result)) { /* raising a negative number to a fractional power returns a * complex in python-3.x. we do not allow this. */ if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ValueError, "negative number " "cannot be raised to a fractional power"); } Py_XDECREF(result); Py_DECREF(ret); ret = NULL; goto clean_up; } ((pgVector *)ret)->coords[i] = PyFloat_AsDouble(result); Py_DECREF(result); } clean_up: for (i = 0; i < dim; ++i) { Py_XDECREF(bases[i]); Py_XDECREF(expos[i]); } return ret; } static PyObject * vector_elementwiseproxy_abs(vector_elementwiseproxy *self) { pgVector *ret = _vector_subtype_new(self->vec); if (ret) { Py_ssize_t i; for (i = 0; i < self->vec->dim; i++) { ret->coords[i] = fabs(self->vec->coords[i]); } } return (PyObject *)ret; } static PyObject * vector_elementwiseproxy_neg(vector_elementwiseproxy *self) { return vector_neg(self->vec); } static PyObject * vector_elementwiseproxy_pos(vector_elementwiseproxy *self) { return vector_pos(self->vec); } static int vector_elementwiseproxy_nonzero(vector_elementwiseproxy *self) { return vector_nonzero(self->vec); } static PyNumberMethods vector_elementwiseproxy_as_number = { .nb_add = (binaryfunc)vector_elementwiseproxy_add, .nb_subtract = (binaryfunc)vector_elementwiseproxy_sub, .nb_multiply = (binaryfunc)vector_elementwiseproxy_mul, .nb_remainder = (binaryfunc)vector_elementwiseproxy_mod, .nb_power = (ternaryfunc)vector_elementwiseproxy_pow, .nb_negative = (unaryfunc)vector_elementwiseproxy_neg, .nb_positive = (unaryfunc)vector_elementwiseproxy_pos, .nb_absolute = (unaryfunc)vector_elementwiseproxy_abs, .nb_bool = (inquiry)vector_elementwiseproxy_nonzero, .nb_floor_divide = (binaryfunc)vector_elementwiseproxy_floor_div, .nb_true_divide = (binaryfunc)vector_elementwiseproxy_div, }; static PyTypeObject pgVectorElementwiseProxy_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.math.VectorElementwiseProxy", .tp_basicsize = sizeof(vector_elementwiseproxy), .tp_dealloc = (destructor)vector_elementwiseproxy_dealloc, .tp_as_number = &vector_elementwiseproxy_as_number, /* Elementwise Proxy is not subtypable for now, no Py_TPFLAGS_BASETYPE */ .tp_flags = Py_TPFLAGS_DEFAULT, .tp_richcompare = (richcmpfunc)vector_elementwiseproxy_richcompare, }; static PyObject * vector_elementwise(pgVector *vec, PyObject *_null) { vector_elementwiseproxy *proxy; if (!pgVector_Check(vec)) { PyErr_BadInternalCall(); return NULL; } proxy = PyObject_New(vector_elementwiseproxy, &pgVectorElementwiseProxy_Type); if (proxy == NULL) return NULL; Py_INCREF(vec); proxy->vec = (pgVector *)vec; return (PyObject *)proxy; } static PyObject * math_clamp(PyObject *self, PyObject *const *args, Py_ssize_t nargs) { if (nargs != 3) return RAISE(PyExc_TypeError, "clamp requires 3 arguments"); PyObject *value = args[0]; PyObject *min = args[1]; PyObject *max = args[2]; if (PyNumber_Check(args[0]) != 1 || PyNumber_Check(args[1]) != 1 || PyNumber_Check(args[2]) != 1) { return RAISE(PyExc_TypeError, "clamp requires 3 numeric arguments"); } // Using RichCompare instead of converting to C types for performance // reasons. This implementation was tested to be faster than using // PyFloat_AsDouble and PyErr_Occurred. // if value < min: return min int result = PyObject_RichCompareBool(value, min, Py_LT); if (result == 1) { Py_INCREF(min); return min; } else if (result == -1) return NULL; // if value > max: return max result = PyObject_RichCompareBool(value, max, Py_GT); if (result == 1) { Py_INCREF(max); return max; } else if (result == -1) return NULL; Py_INCREF(value); return value; } PG_WRAP_FASTCALL_FUNC(math_clamp, PyObject); static PyObject * math_lerp(PyObject *self, PyObject *const *args, Py_ssize_t nargs) { if (nargs != 3) return RAISE(PyExc_TypeError, "lerp requires 3 arguments"); double a = PyFloat_AsDouble(args[0]); if (PyErr_Occurred()) return NULL; double b = PyFloat_AsDouble(args[1]); if (PyErr_Occurred()) return NULL; double weight = PyFloat_AsDouble(args[2]); if (PyErr_Occurred()) return NULL; if (weight < 0 || weight > 1) return RAISE(PyExc_ValueError, "weight must be in range [0, 1]"); return PyFloat_FromDouble(a + (b - a) * weight); } PG_WRAP_FASTCALL_FUNC(math_lerp, PyObject); static PyObject * math_enable_swizzling(pgVector *self, PyObject *_null) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "pygame.math.enable_swizzling() is deprecated, " "and its functionality is removed. This function will be " "removed in a later version.", 1) == -1) { return NULL; } Py_RETURN_NONE; } static PyObject * math_disable_swizzling(pgVector *self, PyObject *_null) { if (PyErr_WarnEx(PyExc_DeprecationWarning, "pygame.math.disable_swizzling() is deprecated, " "and its functionality is removed. This function will be " "removed in a later version.", 1) == -1) { return NULL; } Py_RETURN_NONE; } static PyMethodDef _math_methods[] = { {"clamp", (PyCFunction)PG_FASTCALL_NAME(math_clamp), PG_FASTCALL, DOC_PYGAMEMATHCLAMP}, {"lerp", (PyCFunction)PG_FASTCALL_NAME(math_lerp), PG_FASTCALL, DOC_PYGAMEMATHLERP}, {"enable_swizzling", (PyCFunction)math_enable_swizzling, METH_NOARGS, "Deprecated, will be removed in a future version"}, {"disable_swizzling", (PyCFunction)math_disable_swizzling, METH_NOARGS, "Deprecated, will be removed in a future version."}, {NULL, NULL, 0, NULL}}; /******************************** * ClassObjectMethod Descriptor ********************************/ /* This is a descriptor for a method that have a different functionality * when called from the class and when called from an object. Its * funcionaliy and its use for implementing the from_polar method is * equal to: from math import cos, sin from types import MethodType class ClassObjectMethod: def __init__(self, clsFunc, objFunc): self.clsFunc = clsFunc self.objFunc = objFunc def __get__(self, obj, cls=None): if obj is None: return MethodType(self.clsFunc, cls) return MethodType(self.objFunc, obj) def from_polar_cls(cls, r, phi): return cls(r*cos(phi), r*sin(phi)) def from_polar_obj(obj, r, phi): obj.x = r*cos(phi) obj.y = r*sin(phi) class vec: from_polar = ClassObjectMethod(from_polar_cls, from_polar_obj) def __init__(self, x, y): self.x = x self.y = y def __str__(self): return f'vec({self.x}, {self.y})' * The C code is based on the implementation of the ClassMethod * decorator, in cpython/Objects/funcobject.c */ typedef struct { PyObject_HEAD PyObject *cls_callable, *obj_callable; } ClassObjectMethod; static void com_dealloc(ClassObjectMethod *com) { PyObject_GC_UnTrack((PyObject *)com); Py_XDECREF(com->cls_callable); Py_XDECREF(com->obj_callable); Py_TYPE(com)->tp_free((PyObject *)com); } static int com_traverse(ClassObjectMethod *com, visitproc visit, void *arg) { Py_VISIT(com->cls_callable); Py_VISIT(com->obj_callable); return 0; } static int com_clear(ClassObjectMethod *com) { Py_CLEAR(com->cls_callable); Py_CLEAR(com->obj_callable); return 0; } static PyObject * com_descr_get(PyObject *self, PyObject *obj, PyObject *type) { ClassObjectMethod *com = (ClassObjectMethod *)self; if (com->cls_callable == NULL || com->obj_callable == NULL) { PyErr_SetString(PyExc_RuntimeError, "Uninitialized ClassObjectMethod object"); return NULL; } if (obj == NULL) { if (type == NULL) return NULL; return PyMethod_New(com->cls_callable, type); } return PyMethod_New(com->obj_callable, obj); } /* python > 3.12 */ #if PY_VERSION_HEX > 0x030C0000 #ifndef _PyArg_NoKeywords /* For type constructors that don't take keyword args * * Sets a TypeError and returns 0 if the args/kwargs is * not empty, returns 1 otherwise * * From Python 3.13.0b2, Python/getargs.c */ int _PyArg_NoKeywords(const char *funcname, PyObject *kwargs) { if (kwargs == NULL) { return 1; } if (!PyDict_CheckExact(kwargs)) { PyErr_BadInternalCall(); return 0; } if (PyDict_GET_SIZE(kwargs) == 0) { return 1; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", funcname); return 0; } #endif #endif static int com_init(PyObject *self, PyObject *args, PyObject *kwds) { ClassObjectMethod *com = (ClassObjectMethod *)self; PyObject *cls_callable, *obj_callable; if (!PyArg_UnpackTuple(args, "ClassObjectMethod", 2, 2, &cls_callable, &obj_callable)) return -1; if (!_PyArg_NoKeywords("ClassObjectMethod", kwds)) return -1; Py_INCREF(cls_callable); Py_INCREF(obj_callable); com->cls_callable = cls_callable; com->obj_callable = obj_callable; return 0; } static PyTypeObject pgClassObjectMethod_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "ClassObjectMethod", .tp_basicsize = sizeof(ClassObjectMethod), .tp_dealloc = (destructor)com_dealloc, .tp_getattro = PyObject_GenericGetAttr, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_traverse = (traverseproc)com_traverse, .tp_clear = (inquiry)com_clear, .tp_descr_get = com_descr_get, .tp_init = com_init, .tp_alloc = PyType_GenericAlloc, .tp_new = PyType_GenericNew, .tp_free = PyObject_GC_Del, }; PyObject * pgClassObjectMethod_New(PyObject *cls_callable, PyObject *obj_callable) { ClassObjectMethod *com = (ClassObjectMethod *)PyType_GenericAlloc(&pgClassObjectMethod_Type, 0); if (com != NULL) { Py_INCREF(cls_callable); Py_INCREF(obj_callable); com->cls_callable = cls_callable; com->obj_callable = obj_callable; } return (PyObject *)com; } static PyMethodDef classobject_defs[] = { {"from_polar", (PyCFunction)vector2_from_polar_cls, METH_VARARGS, DOC_VECTOR2FROMPOLAR}, {"from_polar", (PyCFunction)vector2_from_polar_obj, METH_VARARGS, DOC_VECTOR2FROMPOLAR}, {"from_spherical", (PyCFunction)vector3_from_spherical_cls, METH_VARARGS, DOC_VECTOR3FROMSPHERICAL}, {"from_spherical", (PyCFunction)vector3_from_spherical_obj, METH_VARARGS, DOC_VECTOR3FROMSPHERICAL}, {NULL} /* Sentinel */ }; /**************************** * Module init function ****************************/ #if defined(BUILD_STATIC) // prevent name collision with CPython builtin PyInit_math from math module MODINIT_DEFINE(pg_math) #else MODINIT_DEFINE(math) #endif { PyObject *module, *apiobj; PyObject *from_polar_cls, *from_polar_obj, *from_polar, *from_spherical_cls, *from_spherical_obj, *from_spherical; static void *c_api[PYGAMEAPI_MATH_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "math", DOC_PYGAMEMATH, -1, _math_methods, NULL, NULL, NULL, NULL}; /* initialize the extension types */ if ((PyType_Ready(&pgVector2_Type) < 0) || (PyType_Ready(&pgVector3_Type) < 0) || (PyType_Ready(&pgVectorIter_Type) < 0) || (PyType_Ready(&pgVectorElementwiseProxy_Type) < 0) || (PyType_Ready(&pgClassObjectMethod_Type) < 0) /*|| (PyType_Ready(&pgVector4_Type) < 0)*/) { return NULL; } /* initialize the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } /* from_polar */ from_polar_cls = PyCFunction_New(&classobject_defs[0], NULL); from_polar_obj = PyCFunction_New(&classobject_defs[1], NULL); if (from_polar_cls == NULL || from_polar_obj == NULL) { return NULL; } Py_INCREF(from_polar_cls); Py_INCREF(from_polar_obj); from_polar = pgClassObjectMethod_New(from_polar_cls, from_polar_obj); if (from_polar == NULL) { return NULL; } Py_INCREF(from_polar); PyDict_SetItemString(pgVector2_Type.tp_dict, "from_polar", from_polar); PyType_Modified(&pgVector2_Type); Py_DECREF(from_polar); Py_DECREF(from_polar_cls); Py_DECREF(from_polar_obj); /* from_spherical */ from_spherical_cls = PyCFunction_New(&classobject_defs[2], NULL); from_spherical_obj = PyCFunction_New(&classobject_defs[3], NULL); if (from_spherical_cls == NULL || from_spherical_obj == NULL) { return NULL; } Py_INCREF(from_spherical_cls); Py_INCREF(from_spherical_obj); from_spherical = pgClassObjectMethod_New(from_spherical_cls, from_spherical_obj); if (from_spherical == NULL) { return NULL; } Py_INCREF(from_spherical); PyDict_SetItemString(pgVector3_Type.tp_dict, "from_spherical", from_spherical); PyType_Modified(&pgVector3_Type); Py_DECREF(from_spherical); Py_DECREF(from_spherical_cls); Py_DECREF(from_spherical_obj); /* add extension types to module */ Py_INCREF(&pgVector2_Type); Py_INCREF(&pgVector3_Type); Py_INCREF(&pgVectorIter_Type); Py_INCREF(&pgVectorElementwiseProxy_Type); /* Py_INCREF(&pgVector4_Type); */ if ((PyModule_AddObject(module, "Vector2", (PyObject *)&pgVector2_Type) != 0) || (PyModule_AddObject(module, "Vector3", (PyObject *)&pgVector3_Type) != 0) || (PyModule_AddObject(module, "VectorElementwiseProxy", (PyObject *)&pgVectorElementwiseProxy_Type) != 0) || (PyModule_AddObject(module, "VectorIterator", (PyObject *)&pgVectorIter_Type) != 0) /*|| (PyModule_AddObject(module, "Vector4", (PyObject *)&pgVector4_Type) != 0)*/) { if (!PyObject_HasAttrString(module, "Vector2")) Py_DECREF(&pgVector2_Type); if (!PyObject_HasAttrString(module, "Vector3")) Py_DECREF(&pgVector3_Type); if (!PyObject_HasAttrString(module, "VectorElementwiseProxy")) Py_DECREF(&pgVectorElementwiseProxy_Type); if (!PyObject_HasAttrString(module, "VectorIterator")) Py_DECREF(&pgVectorIter_Type); /* if (!PyObject_HasAttrString(module, "Vector4")) Py_DECREF(&pgVector4_Type); */ Py_DECREF(module); return NULL; } /* export the C api */ c_api[0] = &pgVector2_Type; c_api[1] = &pgVector3_Type; /* c_api[2] = &pgVector4_Type; c_api[3] = pgVector_NEW; c_api[4] = pgVectorCompatible_Check; */ apiobj = encapsulate_api(c_api, "math"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/mixer.c0000644000175100001770000015670314676242340015014 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * mixer module for pygame */ #define PYGAMEAPI_MIXER_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/mixer_doc.h" #include "mixer.h" #define PyBUF_HAS_FLAG(f, F) (((f) & (F)) == (F)) #define CHECK_CHUNK_VALID(CHUNK, RET) \ if ((CHUNK) == NULL) { \ PyErr_SetString(PyExc_RuntimeError, \ "__init__() was not called on Sound object so it " \ "failed to setup correctly."); \ return (RET); \ } /* The SDL audio format constants are not defined for anything larger than 2 byte samples. Define our own. Low two bytes gives sample size in bytes. Higher bytes are flags. */ typedef Uint32 PG_sample_format_t; const PG_sample_format_t PG_SAMPLE_SIGNED = 0x10000u; const PG_sample_format_t PG_SAMPLE_NATIVE_ENDIAN = 0x20000u; #if SDL_BYTEORDER == SDL_LIL_ENDIAN const PG_sample_format_t PG_SAMPLE_LITTLE_ENDIAN = 0x20000u; const PG_sample_format_t PG_SAMPLE_BIG_ENDIAN = 0; #else const PG_sample_format_t PG_SAMPLE_LITTLE_ENDIAN = 0; const PG_sample_format_t PG_SAMPLE_BIG_ENDIAN = 0x20000u; #endif const PG_sample_format_t PG_SAMPLE_CHAR_SIGN = (char)0xff > 0 ? 0 : 0x10000u; #define PG_SAMPLE_SIZE(sf) ((sf) & 0x0ffffu) #define PG_IS_SAMPLE_SIGNED(sf) ((sf) & PG_SAMPLE_SIGNED != 0) #define PG_IS_SAMPLE_NATIVE_ENDIAN(sf) ((sf) & PG_SAMPLE_NATIVE_ENDIAN != 0) #define PG_IS_SAMPLE_LITTLE_ENDIAN(sf) \ ((sf) & PG_SAMPLE_LITTLE_ENDIAN == PG_SAMPLE_LITTLE_ENDIAN) #define PG_IS_SAMPLE_BIG_ENDIAN(sf) \ ((sf) & PG_SAMPLE_BIG_ENDIAN == PG_SAMPLE_BIG_ENDIAN) /* Since they are documented, the default init values are defined here rather than taken from SDL_mixer. It also means that the default size is defined in Pygame, rather than SDL AUDIO_xxx, terms. */ #define PYGAME_MIXER_DEFAULT_FREQUENCY 44100 #define PYGAME_MIXER_DEFAULT_SIZE -16 #define PYGAME_MIXER_DEFAULT_CHANNELS 2 #define PYGAME_MIXER_DEFAULT_CHUNKSIZE 512 #define PYGAME_MIXER_DEFAULT_ALLOWEDCHANGES \ SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | SDL_AUDIO_ALLOW_CHANNELS_CHANGE static int sound_init(PyObject *, PyObject *, PyObject *); static PyTypeObject pgSound_Type; static PyTypeObject pgChannel_Type; static PyObject * pgSound_New(Mix_Chunk *); static PyObject * pgChannel_New(int); #define pgSound_Check(x) (Py_TYPE(x) == &pgSound_Type) #define pgChannel_Check(x) (Py_TYPE(x) == &pgChannel_Type) static int snd_getbuffer(PyObject *, Py_buffer *, int); static void snd_releasebuffer(PyObject *, Py_buffer *); static int request_frequency = PYGAME_MIXER_DEFAULT_FREQUENCY; static int request_size = PYGAME_MIXER_DEFAULT_SIZE; static int request_channels = PYGAME_MIXER_DEFAULT_CHANNELS; static int request_chunksize = PYGAME_MIXER_DEFAULT_CHUNKSIZE; static int request_allowedchanges = PYGAME_MIXER_DEFAULT_ALLOWEDCHANGES; static char *request_devicename = NULL; struct ChannelData { PyObject *sound; PyObject *queue; int endevent; }; static struct ChannelData *channeldata = NULL; static int numchanneldata = 0; Mix_Music **mx_current_music; Mix_Music **mx_queue_music; static int _format_itemsize(Uint16 format) { int size = -1; switch (format) { case AUDIO_U8: case AUDIO_S8: size = 1; break; case AUDIO_U16LSB: case AUDIO_U16MSB: case AUDIO_S16LSB: case AUDIO_S16MSB: size = 2; break; case AUDIO_S32LSB: case AUDIO_S32MSB: case AUDIO_F32LSB: case AUDIO_F32MSB: size = 4; break; default: PyErr_Format(PyExc_SystemError, "Pygame bug (mixer.Sound): unknown mixer format %d", (int)format); } return size; } static PG_sample_format_t _format_view_to_audio(Py_buffer *view) { size_t fstr_len; int native_size = 0; int index = 0; PG_sample_format_t format = 0; if (!view->format) { /* Assume unsigned byte */ return (PG_sample_format_t)sizeof(unsigned char); } fstr_len = strlen(view->format); if (fstr_len < 1 || fstr_len > 2) { PyErr_SetString(PyExc_ValueError, "Array has unsupported item format"); return 0; } if (fstr_len == 1) { format |= PG_SAMPLE_NATIVE_ENDIAN; native_size = 1; } else { switch (view->format[index]) { case '@': native_size = 1; format |= PG_SAMPLE_NATIVE_ENDIAN; break; case '=': format |= PG_SAMPLE_NATIVE_ENDIAN; break; case '<': format |= PG_SAMPLE_LITTLE_ENDIAN; break; case '>': case '!': format |= PG_SAMPLE_BIG_ENDIAN; break; default: PyErr_SetString(PyExc_ValueError, "Array has unsupported item format"); return 0; } ++index; } switch (view->format[index]) { case 'c': format |= PG_SAMPLE_CHAR_SIGN; format += native_size ? sizeof(char) : 1; break; case 'b': format |= PG_SAMPLE_SIGNED; format += native_size ? sizeof(signed char) : 1; break; case 'B': format += native_size ? sizeof(unsigned char) : 1; break; case 'h': format |= PG_SAMPLE_SIGNED; format += native_size ? sizeof(short int) : 2; break; case 'H': format += native_size ? sizeof(unsigned short int) : 2; break; case 'i': format |= PG_SAMPLE_SIGNED; format += native_size ? sizeof(int) : 4; break; case 'I': format += native_size ? sizeof(unsigned int) : 4; break; case 'l': format |= PG_SAMPLE_SIGNED; format += native_size ? sizeof(long int) : 4; break; case 'L': format += native_size ? sizeof(unsigned long int) : 4; break; case 'f': format += native_size ? sizeof(float) : 4; break; case 'd': format += native_size ? sizeof(double) : 8; break; case 'q': format |= PG_SAMPLE_SIGNED; format += native_size ? sizeof(long long int) : 8; break; case 'Q': format += native_size ? sizeof(unsigned long long int) : 8; break; default: PyErr_Format(PyExc_ValueError, "Array has unsupported item format '%s'", view->format); return 0; } if (view->itemsize && PG_SAMPLE_SIZE(format) != view->itemsize) { PyErr_Format(PyExc_ValueError, "Array item size %d does not match format '%s'", (int)view->itemsize, view->format); return 0; } return format; } static void _pg_push_mixer_event(int type, int code) { pgEventObject *e; PyObject *dict, *dictcode; SDL_Event event; PyGILState_STATE gstate = PyGILState_Ensure(); dict = PyDict_New(); if (dict) { if (type >= PGE_USEREVENT && type < PG_NUMEVENTS) { dictcode = PyLong_FromLong(code); PyDict_SetItemString(dict, "code", dictcode); Py_DECREF(dictcode); } e = (pgEventObject *)pgEvent_New2(type, dict); Py_DECREF(dict); if (e) { pgEvent_FillUserEvent(e, &event); if (SDL_PushEvent(&event) <= 0) Py_DECREF(dict); Py_DECREF(e); } } PyGILState_Release(gstate); } static void endsound_callback(int channel) { if (channeldata) { if (channeldata[channel].endevent && SDL_WasInit(SDL_INIT_VIDEO)) _pg_push_mixer_event(channeldata[channel].endevent, channel); if (channeldata[channel].queue) { PyGILState_STATE gstate = PyGILState_Ensure(); int channelnum; Mix_Chunk *sound = pgSound_AsChunk(channeldata[channel].queue); Py_XDECREF(channeldata[channel].sound); channeldata[channel].sound = channeldata[channel].queue; channeldata[channel].queue = NULL; PyGILState_Release(gstate); channelnum = Mix_PlayChannelTimed(channel, sound, 0, -1); if (channelnum != -1) Mix_GroupChannel(channelnum, (int)(intptr_t)sound); } else { PyGILState_STATE gstate = PyGILState_Ensure(); Py_XDECREF(channeldata[channel].sound); channeldata[channel].sound = NULL; PyGILState_Release(gstate); Mix_GroupChannel(channel, -1); } } } static PyObject * import_music(void) { PyObject *music = PyImport_ImportModule(IMPPREFIX "mixer_music"); if (music == NULL) { PyErr_Clear(); music = PyImport_ImportModule(RELATIVE_MODULE("mixer_music")); } return music; } static PyObject * _init(int freq, int size, int channels, int chunk, char *devicename, int allowedchanges) { Uint16 fmt = 0; int i; PyObject *music; char *drivername; if (!freq) { freq = request_frequency; } if (!size) { size = request_size; } if (allowedchanges == -1) { allowedchanges = request_allowedchanges; } if (!channels) { channels = request_channels; } if (allowedchanges & SDL_AUDIO_ALLOW_CHANNELS_CHANGE) { if (channels <= 1) channels = 1; else if (channels <= 3) channels = 2; else if (channels <= 5) channels = 4; else channels = 6; } else { switch (channels) { case 1: case 2: case 4: case 6: break; default: return RAISE(PyExc_ValueError, "'channels' must be 1, 2, 4, or 6"); } } if (!chunk) { chunk = request_chunksize; } if (!devicename) { devicename = request_devicename; } /* printf("size:%d:\n", size); */ switch (size) { case 8: fmt = AUDIO_U8; break; case -8: fmt = AUDIO_S8; break; case 16: fmt = AUDIO_U16SYS; break; case -16: fmt = AUDIO_S16SYS; break; case 32: fmt = AUDIO_F32SYS; break; default: PyErr_Format(PyExc_ValueError, "unsupported size %i", size); return NULL; } /* printf("size:%d:\n", size); */ /*make chunk a power of 2*/ for (i = 0; 1 << i < chunk; ++i) ; /*yes, semicolon on for loop*/ chunk = MAX(1 << i, 256); /*do this after for loop exits*/ if (!SDL_WasInit(SDL_INIT_AUDIO)) { if (!channeldata) { /*should always be null*/ channeldata = (struct ChannelData *)malloc( sizeof(struct ChannelData) * MIX_CHANNELS); if (!channeldata) { return PyErr_NoMemory(); } numchanneldata = MIX_CHANNELS; for (i = 0; i < numchanneldata; ++i) { channeldata[i].sound = NULL; channeldata[i].queue = NULL; channeldata[i].endevent = 0; } } /* Compatibility: pulse and dsound audio drivers were renamed in SDL2, and we don't want it to fail. */ drivername = SDL_getenv("SDL_AUDIODRIVER"); if (drivername && SDL_strncasecmp("pulse", drivername, SDL_strlen(drivername)) == 0) { SDL_setenv("SDL_AUDIODRIVER", "pulseaudio", 1); } else if (drivername && SDL_strncasecmp("dsound", drivername, SDL_strlen(drivername)) == 0) { SDL_setenv("SDL_AUDIODRIVER", "directsound", 1); } if (SDL_InitSubSystem(SDL_INIT_AUDIO)) return RAISE(pgExc_SDLError, SDL_GetError()); /* This scary looking block is the expansion of * SDL_MIXER_VERSION_ATLEAST(2, 0, 2), but SDL_MIXER_VERSION_ATLEAST is new in * 2.0.2, and we currently aim to support down to 2.0.0 */ #if ((SDL_MIXER_MAJOR_VERSION >= 2) && \ (SDL_MIXER_MAJOR_VERSION > 2 || SDL_MIXER_MINOR_VERSION >= 0) && \ (SDL_MIXER_MAJOR_VERSION > 2 || SDL_MIXER_MINOR_VERSION > 0 || \ SDL_MIXER_PATCHLEVEL >= 2)) if (Mix_OpenAudioDevice(freq, fmt, channels, chunk, devicename, allowedchanges) == -1) { #else if (Mix_OpenAudio(freq, fmt, channels, chunk) == -1) { #endif SDL_QuitSubSystem(SDL_INIT_AUDIO); return RAISE(pgExc_SDLError, SDL_GetError()); ; } Mix_ChannelFinished(endsound_callback); Mix_VolumeMusic(127); } mx_current_music = NULL; mx_queue_music = NULL; music = import_music(); if (music) { PyObject *ptr; ptr = PyObject_GetAttrString(music, "_MUSIC_POINTER"); if (ptr) { mx_current_music = (Mix_Music **)PyCapsule_GetPointer(ptr, "pygame.music_mixer." "_MUSIC_POINTER"); if (!mx_current_music) { PyErr_Clear(); } } else { PyErr_Clear(); } ptr = PyObject_GetAttrString(music, "_QUEUE_POINTER"); if (ptr) { mx_queue_music = (Mix_Music **)PyCapsule_GetPointer(ptr, "pygame.music_mixer." "_QUEUE_POINTER"); if (!mx_queue_music) { PyErr_Clear(); } } else { PyErr_Clear(); } Py_DECREF(music); } else { PyErr_Clear(); } Py_RETURN_NONE; } static PyObject * pgMixer_AutoInit(PyObject *self, PyObject *_null) { /* Return init with defaults */ return _init(0, 0, 0, 0, NULL, -1); } static PyObject * mixer_quit(PyObject *self, PyObject *_null) { int i; if (SDL_WasInit(SDL_INIT_AUDIO)) { Py_BEGIN_ALLOW_THREADS; Mix_HaltMusic(); Py_END_ALLOW_THREADS; if (channeldata) { for (i = 0; i < numchanneldata; ++i) { Py_XDECREF(channeldata[i].sound); Py_XDECREF(channeldata[i].queue); } free(channeldata); channeldata = NULL; numchanneldata = 0; } if (mx_current_music) { if (*mx_current_music) { Py_BEGIN_ALLOW_THREADS; Mix_FreeMusic(*mx_current_music); Py_END_ALLOW_THREADS; *mx_current_music = NULL; } mx_current_music = NULL; } if (mx_queue_music) { if (*mx_queue_music) { Py_BEGIN_ALLOW_THREADS; Mix_FreeMusic(*mx_queue_music); Py_END_ALLOW_THREADS; *mx_queue_music = NULL; } mx_queue_music = NULL; } Py_BEGIN_ALLOW_THREADS; Mix_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); Py_END_ALLOW_THREADS; } Py_RETURN_NONE; } static PyObject * pg_mixer_init(PyObject *self, PyObject *args, PyObject *keywds) { int freq = 0, size = 0, channels = 0, chunk = 0, allowedchanges = -1; char *devicename = NULL; static char *kwids[] = {"frequency", "size", "channels", "buffer", "devicename", "allowedchanges", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|iiiizi", kwids, &freq, &size, &channels, &chunk, &devicename, &allowedchanges)) { return NULL; } return _init(freq, size, channels, chunk, devicename, allowedchanges); } static PyObject * pg_mixer_get_init(PyObject *self, PyObject *_null) { int freq, channels, realform; Uint16 format; if (!SDL_WasInit(SDL_INIT_AUDIO)) Py_RETURN_NONE; if (!Mix_QuerySpec(&freq, &format, &channels)) Py_RETURN_NONE; // create a signed or unsigned number of bits per sample realform = SDL_AUDIO_BITSIZE(format); if (SDL_AUDIO_ISSIGNED(format)) { realform = -realform; } return Py_BuildValue("(iii)", freq, realform, channels); } static PyObject * pre_init(PyObject *self, PyObject *args, PyObject *keywds) { static char *kwids[] = {"frequency", "size", "channels", "buffer", "devicename", "allowedchanges", NULL}; request_frequency = 0; request_size = 0; request_channels = 0; request_chunksize = 0; request_devicename = NULL; request_allowedchanges = -1; if (!PyArg_ParseTupleAndKeywords( args, keywds, "|iiiizi", kwids, &request_frequency, &request_size, &request_channels, &request_chunksize, &request_devicename, &request_allowedchanges)) return NULL; if (!request_frequency) { request_frequency = PYGAME_MIXER_DEFAULT_FREQUENCY; } if (!request_size) { request_size = PYGAME_MIXER_DEFAULT_SIZE; } if (!request_channels) { request_channels = PYGAME_MIXER_DEFAULT_CHANNELS; } if (!request_chunksize) { request_chunksize = PYGAME_MIXER_DEFAULT_CHUNKSIZE; } if (request_allowedchanges == -1) { request_allowedchanges = PYGAME_MIXER_DEFAULT_ALLOWEDCHANGES; } Py_RETURN_NONE; } /* sound object methods */ static PyObject * pgSound_Play(PyObject *self, PyObject *args, PyObject *kwargs) { Mix_Chunk *chunk = pgSound_AsChunk(self); int channelnum = -1; int loops = 0, playtime = -1, fade_ms = 0; CHECK_CHUNK_VALID(chunk, NULL); char *kwids[] = {"loops", "maxtime", "fade_ms", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iii", kwids, &loops, &playtime, &fade_ms)) return NULL; Py_BEGIN_ALLOW_THREADS; if (fade_ms > 0) { channelnum = Mix_FadeInChannelTimed(-1, chunk, loops, fade_ms, playtime); } else { channelnum = Mix_PlayChannelTimed(-1, chunk, loops, playtime); } Py_END_ALLOW_THREADS; if (channelnum == -1) Py_RETURN_NONE; Py_XDECREF(channeldata[channelnum].sound); Py_XDECREF(channeldata[channelnum].queue); channeldata[channelnum].queue = NULL; channeldata[channelnum].sound = self; Py_INCREF(self); // make sure volume on this arbitrary channel is set to full Mix_Volume(channelnum, 128); Py_BEGIN_ALLOW_THREADS; Mix_GroupChannel(channelnum, (int)(intptr_t)chunk); Py_END_ALLOW_THREADS; return pgChannel_New(channelnum); } static PyObject * snd_get_num_channels(PyObject *self, PyObject *_null) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); MIXER_INIT_CHECK(); return PyLong_FromLong(Mix_GroupCount((int)(intptr_t)chunk)); } static PyObject * snd_fadeout(PyObject *self, PyObject *args) { Mix_Chunk *chunk = pgSound_AsChunk(self); int _time; CHECK_CHUNK_VALID(chunk, NULL); if (!PyArg_ParseTuple(args, "i", &_time)) return NULL; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_FadeOutGroup((int)(intptr_t)chunk, _time); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * snd_stop(PyObject *self, PyObject *_null) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_HaltGroup((int)(intptr_t)chunk); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * snd_set_volume(PyObject *self, PyObject *args) { Mix_Chunk *chunk = pgSound_AsChunk(self); float volume; CHECK_CHUNK_VALID(chunk, NULL); if (!PyArg_ParseTuple(args, "f", &volume)) return NULL; MIXER_INIT_CHECK(); Mix_VolumeChunk(chunk, (int)(volume * 128)); Py_RETURN_NONE; } static PyObject * snd_get_volume(PyObject *self, PyObject *_null) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); int volume; MIXER_INIT_CHECK(); volume = Mix_VolumeChunk(chunk, -1); return PyFloat_FromDouble(volume / 128.0); } static PyObject * snd_get_length(PyObject *self, PyObject *_null) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); int freq, channels, mixerbytes, numsamples; Uint16 format; MIXER_INIT_CHECK(); Mix_QuerySpec(&freq, &format, &channels); if (format == AUDIO_S8 || format == AUDIO_U8) mixerbytes = 1; else if (format == AUDIO_F32LSB || format == AUDIO_F32MSB) { mixerbytes = 4; } else mixerbytes = 2; numsamples = chunk->alen / mixerbytes / channels; return PyFloat_FromDouble((float)numsamples / (float)freq); } static PyObject * snd_get_raw(PyObject *self, PyObject *_null) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); MIXER_INIT_CHECK(); return PyBytes_FromStringAndSize((const char *)chunk->abuf, (Py_ssize_t)chunk->alen); } static PyObject * snd_get_arraystruct(PyObject *self, void *closure) { Py_buffer view; PyObject *cobj; if (snd_getbuffer(self, &view, PyBUF_RECORDS)) { return 0; } cobj = pgBuffer_AsArrayStruct(&view); snd_releasebuffer(view.obj, &view); Py_XDECREF(view.obj); return cobj; } static PyObject * snd_get_arrayinterface(PyObject *self, void *closure) { Py_buffer view; PyObject *dict; if (snd_getbuffer(self, &view, PyBUF_RECORDS)) { return 0; } dict = pgBuffer_AsArrayInterface(&view); snd_releasebuffer(self, &view); Py_DECREF(self); return dict; } static PyObject * snd_get_samples_address(PyObject *self, PyObject *closure) { Mix_Chunk *chunk = pgSound_AsChunk(self); CHECK_CHUNK_VALID(chunk, NULL); MIXER_INIT_CHECK(); #if SIZEOF_VOID_P > SIZEOF_LONG return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)chunk->abuf); #else return PyLong_FromUnsignedLong((unsigned long)chunk->abuf); #endif } PyMethodDef sound_methods[] = { {"play", (PyCFunction)pgSound_Play, METH_VARARGS | METH_KEYWORDS, DOC_SOUNDPLAY}, {"get_num_channels", snd_get_num_channels, METH_NOARGS, DOC_SOUNDGETNUMCHANNELS}, {"fadeout", snd_fadeout, METH_VARARGS, DOC_SOUNDFADEOUT}, {"stop", snd_stop, METH_NOARGS, DOC_SOUNDSTOP}, {"set_volume", snd_set_volume, METH_VARARGS, DOC_SOUNDSETVOLUME}, {"get_volume", snd_get_volume, METH_NOARGS, DOC_SOUNDGETVOLUME}, {"get_length", snd_get_length, METH_NOARGS, DOC_SOUNDGETLENGTH}, {"get_raw", snd_get_raw, METH_NOARGS, DOC_SOUNDGETRAW}, {NULL, NULL, 0, NULL}}; static PyGetSetDef sound_getset[] = { {"__array_struct__", snd_get_arraystruct, NULL, "Version 3", NULL}, {"__array_interface__", snd_get_arrayinterface, NULL, "Version 3", NULL}, {"_samples_address", (getter)snd_get_samples_address, NULL, "samples buffer address (readonly)", NULL}, {NULL, NULL, NULL, NULL, NULL}}; /*buffer protocol*/ /* snd_buffer_iteminfo converts between SDL and python format constants. https://wiki.libsdl.org/SDL_AudioSpec https://docs.python.org/3/library/struct.html#format-characters returns: -1 on error, else 0. format: buffer string showing the format. itemsize: bytes for each item. */ static int snd_buffer_iteminfo(char **format, Py_ssize_t *itemsize, int *channels) { static char fmt_AUDIO_U8[] = "B"; static char fmt_AUDIO_S8[] = "b"; static char fmt_AUDIO_U16SYS[] = "=H"; static char fmt_AUDIO_S16SYS[] = "=h"; static char fmt_AUDIO_S32LSB[] = "obj = 0; if (snd_buffer_iteminfo(&format, &itemsize, &channels)) { return -1; } if (channels != 1 && PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS)) { PyErr_SetString(pgExc_BufferError, "polyphonic sound is not Fortran contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { ndim = channels > 1 ? 2 : 1; samples = chunk->alen / (itemsize * channels); shape = PyMem_New(Py_ssize_t, 2 * ndim); if (!shape) { PyErr_NoMemory(); return -1; } shape[ndim - 1] = channels; shape[0] = samples; if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { strides = shape + ndim; strides[0] = itemsize * channels; strides[ndim - 1] = itemsize; } } Py_INCREF(obj); view->obj = obj; view->buf = chunk->abuf; view->len = (Py_ssize_t)chunk->alen; view->readonly = 0; view->itemsize = itemsize; view->format = PyBUF_HAS_FLAG(flags, PyBUF_FORMAT) ? format : 0; view->ndim = ndim; view->shape = shape; view->strides = strides; view->suboffsets = 0; view->internal = shape; return 0; } static void snd_releasebuffer(PyObject *obj, Py_buffer *view) { if (view->internal) { PyMem_Free(view->internal); view->internal = 0; } } static PyBufferProcs sound_as_buffer[] = {{snd_getbuffer, snd_releasebuffer}}; /*sound object internals*/ static void sound_dealloc(pgSoundObject *self) { Mix_Chunk *chunk = pgSound_AsChunk((PyObject *)self); if (chunk) { Py_BEGIN_ALLOW_THREADS; Mix_FreeChunk(chunk); Py_END_ALLOW_THREADS; } if (self->mem) PyMem_Free(self->mem); if (self->weakreflist) PyObject_ClearWeakRefs((PyObject *)self); Py_TYPE(self)->tp_free((PyObject *)self); } static PyTypeObject pgSound_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.mixer.Sound", .tp_basicsize = sizeof(pgSoundObject), .tp_dealloc = (destructor)sound_dealloc, .tp_as_buffer = sound_as_buffer, .tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_NEWBUFFER), .tp_doc = DOC_PYGAMEMIXERSOUND, .tp_weaklistoffset = offsetof(pgSoundObject, weakreflist), .tp_methods = sound_methods, .tp_getset = sound_getset, .tp_init = sound_init, .tp_new = PyType_GenericNew, }; /* channel object methods */ static PyObject * chan_play(PyObject *self, PyObject *args, PyObject *kwargs) { int channelnum = pgChannel_AsInt(self); PyObject *sound; Mix_Chunk *chunk; int loops = 0, playtime = -1, fade_ms = 0; char *kwids[] = {"Sound", "loops", "maxtime", "fade_ms", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|iii", kwids, &pgSound_Type, &sound, &loops, &playtime, &fade_ms)) return NULL; chunk = pgSound_AsChunk(sound); CHECK_CHUNK_VALID(chunk, NULL); Py_BEGIN_ALLOW_THREADS; if (fade_ms > 0) { channelnum = Mix_FadeInChannelTimed(channelnum, chunk, loops, fade_ms, playtime); } else { channelnum = Mix_PlayChannelTimed(channelnum, chunk, loops, playtime); } if (channelnum != -1) Mix_GroupChannel(channelnum, (int)(intptr_t)chunk); Py_END_ALLOW_THREADS; Py_XDECREF(channeldata[channelnum].sound); Py_XDECREF(channeldata[channelnum].queue); channeldata[channelnum].sound = sound; channeldata[channelnum].queue = NULL; Py_INCREF(sound); Py_RETURN_NONE; } static PyObject * chan_queue(PyObject *self, PyObject *sound) { int channelnum = pgChannel_AsInt(self); Mix_Chunk *chunk; if (!pgSound_Check(sound)) { return RAISE(PyExc_TypeError, "The argument must be an instance of Sound"); } chunk = pgSound_AsChunk(sound); CHECK_CHUNK_VALID(chunk, NULL); if (!channeldata[channelnum].sound) /*nothing playing*/ { Py_BEGIN_ALLOW_THREADS; channelnum = Mix_PlayChannelTimed(channelnum, chunk, 0, -1); if (channelnum != -1) Mix_GroupChannel(channelnum, (int)(intptr_t)chunk); Py_END_ALLOW_THREADS; channeldata[channelnum].sound = sound; Py_INCREF(sound); } else { Py_XDECREF(channeldata[channelnum].queue); channeldata[channelnum].queue = sound; Py_INCREF(sound); } Py_RETURN_NONE; } static PyObject * chan_get_busy(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); MIXER_INIT_CHECK(); return PyBool_FromLong(Mix_Playing(channelnum)); } static PyObject * chan_fadeout(PyObject *self, PyObject *args) { int channelnum = pgChannel_AsInt(self); int _time; if (!PyArg_ParseTuple(args, "i", &_time)) return NULL; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_FadeOutChannel(channelnum, _time); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * chan_stop(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_HaltChannel(channelnum); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * chan_pause(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); MIXER_INIT_CHECK(); Mix_Pause(channelnum); Py_RETURN_NONE; } static PyObject * chan_unpause(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_Resume(channelnum); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * chan_set_volume(PyObject *self, PyObject *args) { int channelnum = pgChannel_AsInt(self); float volume, stereovolume = -1.11f; #ifdef Py_DEBUG int result; #endif Uint8 left, right; PyThreadState *_save; if (!PyArg_ParseTuple(args, "f|f", &volume, &stereovolume)) return NULL; MIXER_INIT_CHECK(); if ((stereovolume <= -1.10f) && (stereovolume >= -1.12f)) { /* The normal volume will be used. No panning. so panning is * set to full. this is in case it was set previously to * something else. NOTE: there is no way to GetPanning * variables. */ left = 255; right = 255; _save = PyEval_SaveThread(); if (!Mix_SetPanning(channelnum, left, right)) { PyEval_RestoreThread(_save); return RAISE(pgExc_SDLError, Mix_GetError()); } PyEval_RestoreThread(_save); } else { /* NOTE: here the volume will be set to 1.0 and the panning will * be used. */ left = (Uint8)(volume * 255); right = (Uint8)(stereovolume * 255); /* printf("left:%d: right:%d:\n", left, right); */ _save = PyEval_SaveThread(); if (!Mix_SetPanning(channelnum, left, right)) { PyEval_RestoreThread(_save); return RAISE(pgExc_SDLError, Mix_GetError()); } PyEval_RestoreThread(_save); volume = 1.0f; } #ifdef Py_DEBUG result = #endif Mix_Volume(channelnum, (int)(volume * 128)); Py_RETURN_NONE; } static PyObject * chan_get_volume(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); int volume; MIXER_INIT_CHECK(); volume = Mix_Volume(channelnum, -1); return PyFloat_FromDouble(volume / 128.0); } static PyObject * chan_get_sound(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); PyObject *sound; sound = channeldata[channelnum].sound; if (!sound) Py_RETURN_NONE; Py_INCREF(sound); return sound; } static PyObject * chan_get_queue(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); PyObject *sound; sound = channeldata[channelnum].queue; if (!sound) Py_RETURN_NONE; Py_INCREF(sound); return sound; } static PyObject * chan_set_endevent(PyObject *self, PyObject *args) { int channelnum = pgChannel_AsInt(self); int event = SDL_NOEVENT; if (!PyArg_ParseTuple(args, "|i", &event)) return NULL; channeldata[channelnum].endevent = event; Py_RETURN_NONE; } static PyObject * chan_get_endevent(PyObject *self, PyObject *_null) { int channelnum = pgChannel_AsInt(self); return PyLong_FromLong(channeldata[channelnum].endevent); } static PyMethodDef channel_methods[] = { {"play", (PyCFunction)chan_play, METH_VARARGS | METH_KEYWORDS, DOC_CHANNELPLAY}, {"queue", chan_queue, METH_O, DOC_CHANNELQUEUE}, {"get_busy", (PyCFunction)chan_get_busy, METH_NOARGS, DOC_CHANNELGETBUSY}, {"fadeout", chan_fadeout, METH_VARARGS, DOC_CHANNELFADEOUT}, {"stop", (PyCFunction)chan_stop, METH_NOARGS, DOC_CHANNELSTOP}, {"pause", (PyCFunction)chan_pause, METH_NOARGS, DOC_CHANNELPAUSE}, {"unpause", (PyCFunction)chan_unpause, METH_NOARGS, DOC_CHANNELUNPAUSE}, {"set_volume", chan_set_volume, METH_VARARGS, DOC_CHANNELSETVOLUME}, {"get_volume", (PyCFunction)chan_get_volume, METH_NOARGS, DOC_CHANNELGETVOLUME}, {"get_sound", (PyCFunction)chan_get_sound, METH_NOARGS, DOC_CHANNELGETSOUND}, {"get_queue", (PyCFunction)chan_get_queue, METH_NOARGS, DOC_CHANNELGETQUEUE}, {"set_endevent", chan_set_endevent, METH_VARARGS, DOC_CHANNELSETENDEVENT}, {"get_endevent", (PyCFunction)chan_get_endevent, METH_NOARGS, DOC_CHANNELGETENDEVENT}, {NULL, NULL, 0, NULL}}; /* channel object internals */ static void channel_dealloc(PyObject *self) { PyObject_Free(self); } static int _channel_init(pgChannelObject *self, int channelnum) { if (!SDL_WasInit(SDL_INIT_AUDIO)) { PyErr_SetString(pgExc_SDLError, "mixer not initialized"); return -1; } if (channelnum < 0 || channelnum >= Mix_GroupCount(-1)) { PyErr_SetString(PyExc_IndexError, "invalid channel index"); return -1; } self->chan = channelnum; return 0; } static int channel_init(pgChannelObject *self, PyObject *args, PyObject *kwargs) { int channelnum; if (!PyArg_ParseTuple(args, "i", &channelnum)) { return -1; } return _channel_init(self, channelnum); } static PyTypeObject pgChannel_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.mixer.Channel", .tp_basicsize = sizeof(pgChannelObject), .tp_dealloc = channel_dealloc, .tp_doc = DOC_PYGAMEMIXERCHANNEL, .tp_methods = channel_methods, .tp_init = (initproc)channel_init, .tp_new = PyType_GenericNew, }; /*mixer module methods*/ static PyObject * get_num_channels(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); return PyLong_FromLong(Mix_GroupCount(-1)); } static PyObject * set_num_channels(PyObject *self, PyObject *args) { int numchans, i; if (!PyArg_ParseTuple(args, "i", &numchans)) return NULL; MIXER_INIT_CHECK(); if (numchans > numchanneldata) { struct ChannelData *cd_org = channeldata; channeldata = (struct ChannelData *)realloc( channeldata, sizeof(struct ChannelData) * numchans); if (!channeldata) { /* Restore the original to avoid leaking it */ channeldata = cd_org; return PyErr_NoMemory(); } for (i = numchanneldata; i < numchans; ++i) { channeldata[i].sound = NULL; channeldata[i].queue = NULL; channeldata[i].endevent = 0; } numchanneldata = numchans; } Py_BEGIN_ALLOW_THREADS; Mix_AllocateChannels(numchans); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * set_reserved(PyObject *self, PyObject *args) { int numchans_requested; int numchans_reserved; if (!PyArg_ParseTuple(args, "i", &numchans_requested)) return NULL; MIXER_INIT_CHECK(); numchans_reserved = Mix_ReserveChannels(numchans_requested); return PyLong_FromLong(numchans_reserved); } static PyObject * get_busy(PyObject *self, PyObject *_null) { if (!SDL_WasInit(SDL_INIT_AUDIO)) return PyBool_FromLong(0); return PyBool_FromLong(Mix_Playing(-1)); } static PyObject * mixer_find_channel(PyObject *self, PyObject *args, PyObject *kwargs) { int chan, force = 0; static char *keywords[] = {"force", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", keywords, &force)) { return NULL; } MIXER_INIT_CHECK(); chan = Mix_GroupAvailable(-1); if (chan == -1) { if (!force) Py_RETURN_NONE; chan = Mix_GroupOldest(-1); } return pgChannel_New(chan); } static PyObject * mixer_fadeout(PyObject *self, PyObject *args) { int _time; if (!PyArg_ParseTuple(args, "i", &_time)) return NULL; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_FadeOutChannel(-1, _time); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * mixer_stop(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_HaltChannel(-1); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * mixer_pause(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Mix_Pause(-1); Py_RETURN_NONE; } static PyObject * mixer_unpause(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_Resume(-1); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } /* Function to get the SDL mixer version data (linked or compiled). * * Ref: * https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_8.html#SEC8 */ static PyObject * mixer_get_sdl_mixer_version(PyObject *self, PyObject *args, PyObject *kwargs) { int linked = 1; /* Default is linked version. */ static char *keywords[] = {"linked", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", keywords, &linked)) { return NULL; /* Exception already set. */ } /* MIXER_INIT_CHECK() is not required for these methods. */ if (linked) { /* linked version */ const SDL_version *v = Mix_Linked_Version(); return Py_BuildValue("iii", v->major, v->minor, v->patch); } else { /* compiled version */ SDL_version v; SDL_MIXER_VERSION(&v); return Py_BuildValue("iii", v.major, v.minor, v.patch); } } static int _chunk_from_buf(const void *buf, Py_ssize_t len, Mix_Chunk **chunk, Uint8 **mem) { Uint8 *m = (Uint8 *)PyMem_Malloc((size_t)len); if (!m) { PyErr_NoMemory(); return -1; } *chunk = Mix_QuickLoad_RAW(m, (Uint32)len); if (!*chunk) { PyMem_Free(m); PyErr_NoMemory(); return -1; } memcpy(m, (Uint8 *)buf, (size_t)len); *mem = m; return 0; } static int _chunk_from_array(void *buf, PG_sample_format_t view_format, int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Mix_Chunk **chunk, Uint8 **mem) { /* TODO: This is taken from _numericsndarray without additions. * So this should be extended to properly handle integer sign * and byte order. These changes will not be backward compatible. */ int freq; Uint16 format; int channels; int itemsize; int view_itemsize = PG_SAMPLE_SIZE(view_format); Uint8 *src, *dst; Py_ssize_t memsize; Py_ssize_t loop1, loop2, step1, step2, length, length2 = 0; if (!Mix_QuerySpec(&freq, &format, &channels)) { PyErr_SetString(pgExc_SDLError, "mixer not initialized"); return -1; } /* Check for compatible values. */ if (channels == 1) { if (ndim != 1) { PyErr_SetString(PyExc_ValueError, "Array must be 1-dimensional for mono mixer"); return -1; } } else { if (ndim != 2) { PyErr_SetString(PyExc_ValueError, "Array must be 2-dimensional for stereo mixer"); return -1; } if (shape[1] != channels) { PyErr_SetString(PyExc_ValueError, "Array depth must match number of mixer channels"); return -1; } } itemsize = _format_itemsize(format); /* printf("!! itemsize: %d\n", itemsize); */ if (itemsize < 0) { return -1; } if (view_itemsize != 1 && view_itemsize != 2 && view_itemsize != 4) { PyErr_Format(PyExc_ValueError, "Unsupported integer size %d", view_itemsize); return -1; } length = shape[0]; step1 = strides ? strides[0] : (Py_ssize_t)view_itemsize * channels; length2 = ndim; if (ndim == 2) { step2 = strides ? strides[1] : view_itemsize; } else { step2 = step1; } memsize = length * channels * itemsize; /* printf("memsize: %d\n", (int)memsize); */ /* Create chunk. */ dst = (Uint8 *)PyMem_Malloc((size_t)memsize); if (!dst) { PyErr_NoMemory(); return -1; } *chunk = Mix_QuickLoad_RAW(dst, (Uint32)memsize); if (!*chunk) { PyMem_Free(dst); PyErr_NoMemory(); return -1; } *mem = dst; /* printf("!! step1: %d, step2: %d, view_itemsize: %d, length: %d\n", step1, step2, view_itemsize, length); */ /* Copy samples. */ if (step1 == (Py_ssize_t)itemsize * channels && step2 == itemsize) { /*OPTIMIZATION: in these cases, we don't need to loop through *the samples individually, because the bytes are already laid *out correctly*/ memcpy(dst, buf, memsize); } else if (itemsize == 1) { for (loop1 = 0; loop1 < length; loop1++) { src = (Uint8 *)buf + (loop1 * step1); switch (view_itemsize) { case 1: for (loop2 = 0; loop2 < length2; loop2++, dst += 1, src += step2) { *(Uint8 *)dst = (Uint8) * ((Uint8 *)src); } break; case 2: for (loop2 = 0; loop2 < length2; loop2++, dst += 1, src += step2) { *(Uint8 *)dst = (Uint8) * ((Uint16 *)src); } break; case 4: for (loop2 = 0; loop2 < length2; loop2++, dst += 1, src += step2) { *(Uint8 *)dst = (Uint8) * ((Uint32 *)src); } break; } } } else { for (loop1 = 0; loop1 < length; loop1++) { src = (Uint8 *)buf + (loop1 * step1); switch (view_itemsize) { case 1: for (loop2 = 0; loop2 < length2; loop2++, dst += 2, src += step2) { *(Uint16 *)dst = (Uint16)(*((Uint8 *)src) << 8); } break; case 2: for (loop2 = 0; loop2 < length2; loop2++, dst += 2, src += step2) { *(Uint16 *)dst = (Uint16) * ((Uint16 *)src); } break; case 4: for (loop2 = 0; loop2 < length2; loop2++, dst += 2, src += step2) { *(Uint16 *)dst = (Uint16) * ((Uint32 *)src); } break; } } } return 0; } static int sound_init(PyObject *self, PyObject *arg, PyObject *kwarg) { static const char arg_cnt_err_msg[] = "Sound takes either 1 positional or 1 keyword argument"; PyObject *obj = NULL; PyObject *file = NULL; PyObject *buffer = NULL; PyObject *array = NULL; PyObject *keys; PyObject *kencoded; SDL_RWops *rw; Mix_Chunk *chunk = NULL; Uint8 *mem = NULL; ((pgSoundObject *)self)->chunk = NULL; ((pgSoundObject *)self)->mem = NULL; /* Similar to MIXER_INIT_CHECK(), but different return value. */ if (!SDL_WasInit(SDL_INIT_AUDIO)) { PyErr_SetString(pgExc_SDLError, "mixer not initialized"); return -1; } /* Process arguments, returning cleaner error messages than PyArg_ParseTupleAndKeywords would. */ if (arg != NULL && PyTuple_GET_SIZE(arg)) { if ((kwarg != NULL && PyDict_Size(kwarg)) || /* conditional and */ PyTuple_GET_SIZE(arg) != 1) { PyErr_SetString(PyExc_TypeError, arg_cnt_err_msg); return -1; } obj = PyTuple_GET_ITEM(arg, 0); if (PyUnicode_Check(obj)) { file = obj; obj = NULL; } else { file = obj; buffer = obj; } } else if (kwarg != NULL) { if (PyDict_Size(kwarg) != 1) { PyErr_SetString(PyExc_TypeError, arg_cnt_err_msg); return -1; } if ((file = PyDict_GetItemString(kwarg, "file")) == NULL && (buffer = PyDict_GetItemString(kwarg, "buffer")) == NULL && (array = PyDict_GetItemString(kwarg, "array")) == NULL) { keys = PyDict_Keys(kwarg); if (keys == NULL) { return -1; } kencoded = pg_EncodeString(PyList_GET_ITEM(keys, 0), NULL, NULL, NULL); Py_DECREF(keys); if (kencoded == NULL) { return -1; } PyErr_Format(PyExc_TypeError, "Unrecognized keyword argument '%.1024s'", PyBytes_AS_STRING(kencoded)); Py_DECREF(kencoded); return -1; } if (buffer != NULL && PyUnicode_Check(buffer)) { /* conditional and */ PyErr_SetString(PyExc_TypeError, "Unicode object not allowed as buffer object"); return -1; } } else { PyErr_SetString(PyExc_TypeError, arg_cnt_err_msg); return -1; } if (file != NULL) { rw = pgRWops_FromObject(file, NULL); if (rw == NULL) { if (obj) { /* use 'buffer' as fallback for single arg */ PyErr_Clear(); goto LOAD_BUFFER; } return -1; } Py_BEGIN_ALLOW_THREADS; chunk = Mix_LoadWAV_RW(rw, 1); Py_END_ALLOW_THREADS; if (chunk == NULL) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } } LOAD_BUFFER: if (!chunk && buffer) { Py_buffer view; int rcode; view.obj = 0; if (PyObject_GetBuffer(buffer, &view, PyBUF_SIMPLE)) { if (obj != NULL) { PyErr_Clear(); } else { PyErr_Format(PyExc_TypeError, "Expected object with buffer interface: got a %s", Py_TYPE(buffer)->tp_name); return -1; } } else { rcode = _chunk_from_buf(view.buf, view.len, &chunk, &mem); PyBuffer_Release(&view); if (rcode) { return -1; } ((pgSoundObject *)self)->mem = mem; } } if (array != NULL) { pg_buffer pg_view; PG_sample_format_t view_format; int rcode; pg_view.view.itemsize = 0; pg_view.view.obj = 0; if (pgObject_GetBuffer(array, &pg_view, PyBUF_FORMAT | PyBUF_ND)) { return -1; } view_format = _format_view_to_audio((Py_buffer *)&pg_view); if (!view_format) { pgBuffer_Release(&pg_view); return -1; } rcode = _chunk_from_array(pg_view.view.buf, view_format, pg_view.view.ndim, pg_view.view.shape, pg_view.view.strides, &chunk, &mem); pgBuffer_Release(&pg_view); if (rcode) { return -1; } ((pgSoundObject *)self)->mem = mem; } if (chunk == NULL) { if (obj == NULL) { PyErr_SetString(PyExc_TypeError, "Unrecognized argument"); } else { PyErr_Format(PyExc_TypeError, "Unrecognized argument (type %s)", Py_TYPE(obj)->tp_name); } return -1; } ((pgSoundObject *)self)->chunk = chunk; return 0; } static PyMethodDef _mixer_methods[] = { {"_internal_mod_init", (PyCFunction)pgMixer_AutoInit, METH_NOARGS, "auto initialize for mixer"}, {"init", (PyCFunction)pg_mixer_init, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERINIT}, {"quit", (PyCFunction)mixer_quit, METH_NOARGS, DOC_PYGAMEMIXERQUIT}, {"get_init", (PyCFunction)pg_mixer_get_init, METH_NOARGS, DOC_PYGAMEMIXERGETINIT}, {"pre_init", (PyCFunction)pre_init, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERPREINIT}, {"get_num_channels", (PyCFunction)get_num_channels, METH_NOARGS, DOC_PYGAMEMIXERGETNUMCHANNELS}, {"set_num_channels", set_num_channels, METH_VARARGS, DOC_PYGAMEMIXERSETNUMCHANNELS}, {"set_reserved", set_reserved, METH_VARARGS, DOC_PYGAMEMIXERSETRESERVED}, {"get_busy", (PyCFunction)get_busy, METH_NOARGS, DOC_PYGAMEMIXERGETBUSY}, {"find_channel", (PyCFunction)mixer_find_channel, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERFINDCHANNEL}, {"fadeout", mixer_fadeout, METH_VARARGS, DOC_PYGAMEMIXERFADEOUT}, {"stop", (PyCFunction)mixer_stop, METH_NOARGS, DOC_PYGAMEMIXERSTOP}, {"pause", (PyCFunction)mixer_pause, METH_NOARGS, DOC_PYGAMEMIXERPAUSE}, {"unpause", (PyCFunction)mixer_unpause, METH_NOARGS, DOC_PYGAMEMIXERUNPAUSE}, {"get_sdl_mixer_version", (PyCFunction)mixer_get_sdl_mixer_version, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERGETSDLMIXERVERSION}, /* { "lookup_frequency", lookup_frequency, 1, doc_lookup_frequency },*/ {NULL, NULL, 0, NULL}}; static PyObject * pgSound_New(Mix_Chunk *chunk) { pgSoundObject *soundobj; if (!chunk) return RAISE(PyExc_RuntimeError, "unable to create sound."); soundobj = (pgSoundObject *)pgSound_Type.tp_new(&pgSound_Type, NULL, NULL); if (soundobj) { soundobj->mem = NULL; soundobj->chunk = chunk; } return (PyObject *)soundobj; } static PyObject * pgChannel_New(int channelnum) { pgChannelObject *chanobj = PyObject_New(pgChannelObject, &pgChannel_Type); if (!chanobj) { return NULL; } if (_channel_init(chanobj, channelnum)) { Py_DECREF(chanobj); return NULL; } return (PyObject *)chanobj; } #if BUILD_STATIC // avoid conflict with PyInit_mixer in _sdl2/mixer.c MODINIT_DEFINE(pg_mixer) #else MODINIT_DEFINE(mixer) #endif { PyObject *module, *apiobj, *music = NULL; static void *c_api[PYGAMEAPI_MIXER_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "mixer", DOC_PYGAMEMIXER, -1, _mixer_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ /*imported needed apis*/ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } import_pygame_event(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgSound_Type) < 0) { return NULL; } if (PyType_Ready(&pgChannel_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&pgSound_Type); if (PyModule_AddObject(module, "Sound", (PyObject *)&pgSound_Type)) { Py_DECREF(&pgSound_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgSound_Type); if (PyModule_AddObject(module, "SoundType", (PyObject *)&pgSound_Type)) { Py_DECREF(&pgSound_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgChannel_Type); if (PyModule_AddObject(module, "ChannelType", (PyObject *)&pgChannel_Type)) { Py_DECREF(&pgChannel_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgChannel_Type); if (PyModule_AddObject(module, "Channel", (PyObject *)&pgChannel_Type)) { Py_DECREF(&pgChannel_Type); Py_DECREF(module); return NULL; } /* export the c api */ c_api[0] = &pgSound_Type; c_api[1] = pgSound_New; c_api[2] = pgSound_Play; c_api[3] = &pgChannel_Type; c_api[4] = pgChannel_New; apiobj = encapsulate_api(c_api, "mixer"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } music = import_music(); if (music) { if (PyModule_AddObject(module, "music", music)) { Py_DECREF(music); Py_DECREF(module); return NULL; } } else { PyErr_Clear(); } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/mixer.h0000644000175100001770000000053414676242340015007 0ustar00runnerdocker#ifndef MIXER_INTERNAL_H #define MIXER_INTERNAL_H #include /* test mixer initializations */ #define MIXER_INIT_CHECK() \ if (!SDL_WasInit(SDL_INIT_AUDIO)) \ return RAISE(pgExc_SDLError, "mixer not initialized") #define PYGAMEAPI_MIXER_NUMSLOTS 5 #include "include/pygame_mixer.h" #endif /* ~MIXER_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/mouse.c0000644000175100001770000003471614676242340015017 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * pygame mouse module */ #include "pygame.h" #include "pgcompat.h" #include "doc/mouse_doc.h" /* mouse module functions */ static PyObject * mouse_set_pos(PyObject *self, PyObject *args) { int x, y; if (!pg_TwoIntsFromObj(args, &x, &y)) return RAISE(PyExc_TypeError, "invalid position argument for set_pos"); VIDEO_INIT_CHECK(); { SDL_Window *sdlWindow = pg_GetDefaultWindow(); SDL_Renderer *sdlRenderer = SDL_GetRenderer(sdlWindow); if (sdlRenderer != NULL) { SDL_Rect vprect; float scalex, scaley; SDL_RenderGetScale(sdlRenderer, &scalex, &scaley); SDL_RenderGetViewport(sdlRenderer, &vprect); x += vprect.x; y += vprect.y; x = (int)(x * scalex); y = (int)(y * scaley); } } SDL_WarpMouseInWindow(NULL, (Uint16)x, (Uint16)y); Py_RETURN_NONE; } static PyObject * mouse_get_pos(PyObject *self, PyObject *_null) { int x, y; VIDEO_INIT_CHECK(); SDL_GetMouseState(&x, &y); { SDL_Window *sdlWindow = pg_GetDefaultWindow(); SDL_Renderer *sdlRenderer = SDL_GetRenderer(sdlWindow); if (sdlRenderer != NULL) { SDL_Rect vprect; float scalex, scaley; SDL_RenderGetScale(sdlRenderer, &scalex, &scaley); SDL_RenderGetViewport(sdlRenderer, &vprect); x = (int)(x / scalex); y = (int)(y / scaley); x -= vprect.x; y -= vprect.y; if (x < 0) x = 0; if (x >= vprect.w) x = vprect.w - 1; if (y < 0) y = 0; if (y >= vprect.h) y = vprect.h - 1; } } return pg_tuple_couple_from_values_int(x, y); } static PyObject * mouse_get_rel(PyObject *self, PyObject *_null) { int x, y; VIDEO_INIT_CHECK(); SDL_GetRelativeMouseState(&x, &y); { SDL_Window *sdlWindow = pg_GetDefaultWindow(); SDL_Renderer *sdlRenderer = SDL_GetRenderer(sdlWindow); if (sdlRenderer != NULL) { SDL_Rect vprect; float scalex, scaley; SDL_RenderGetScale(sdlRenderer, &scalex, &scaley); SDL_RenderGetViewport(sdlRenderer, &vprect); x = (int)(x * scalex + vprect.x); y = (int)(y * scaley + vprect.y); } } return pg_tuple_couple_from_values_int(x, y); } static PyObject * mouse_get_pressed(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *tuple; int state; int num_buttons = 3; static char *kwids[] = {"num_buttons", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwids, &num_buttons)) return NULL; VIDEO_INIT_CHECK(); if (num_buttons != 3 && num_buttons != 5) return RAISE(PyExc_ValueError, "Number of buttons needs to be 3 or 5."); state = SDL_GetMouseState(NULL, NULL); if (!(tuple = PyTuple_New(num_buttons))) return NULL; PyTuple_SET_ITEM(tuple, 0, PyBool_FromLong((state & SDL_BUTTON_LMASK) != 0)); PyTuple_SET_ITEM(tuple, 1, PyBool_FromLong((state & SDL_BUTTON_MMASK) != 0)); PyTuple_SET_ITEM(tuple, 2, PyBool_FromLong((state & SDL_BUTTON_RMASK) != 0)); if (num_buttons == 5) { PyTuple_SET_ITEM(tuple, 3, PyBool_FromLong((state & SDL_BUTTON_X1MASK) != 0)); PyTuple_SET_ITEM(tuple, 4, PyBool_FromLong((state & SDL_BUTTON_X2MASK) != 0)); } return tuple; } static PyObject * mouse_set_visible(PyObject *self, PyObject *args) { int toggle; int mode; SDL_Window *win = NULL; Uint32 window_flags = 0; if (!PyArg_ParseTuple(args, "i", &toggle)) return NULL; VIDEO_INIT_CHECK(); win = pg_GetDefaultWindow(); if (win) { mode = SDL_GetWindowGrab(win); if ((mode == SDL_ENABLE) & !toggle) { SDL_SetRelativeMouseMode(1); } else { SDL_SetRelativeMouseMode(0); } window_flags = SDL_GetWindowFlags(win); if (!toggle && (window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP || window_flags & SDL_WINDOW_FULLSCREEN)) { SDL_SetHint(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, "0"); } else { SDL_SetHint(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, "1"); } } toggle = SDL_ShowCursor(toggle); return PyBool_FromLong(toggle); } static PyObject * mouse_get_visible(PyObject *self, PyObject *_null) { int result; VIDEO_INIT_CHECK(); result = SDL_ShowCursor(SDL_QUERY); if (0 > result) { return RAISE(pgExc_SDLError, SDL_GetError()); } return PyBool_FromLong(result); } static PyObject * mouse_get_focused(PyObject *self, PyObject *_null) { VIDEO_INIT_CHECK(); return PyBool_FromLong(SDL_GetMouseFocus() != NULL); } struct CursorData { int w; int h; int spotx; int spoty; PyObject *xormask, *andmask; pgSurfaceObject *surfobj; int constant; int type; } cursor_data; // possible CursorData.type attributes: #define COLOR_CURSOR 2 #define BITMAP_CURSOR 1 #define SYSTEM_CURSOR 0 /* Defining SYSTEM_CURSOR as zero does more than it seems. Since cursor_data type and constant both initialize to zero, When get_cursor() is called before set_cursor() has set something, it sees a type 0 (system cursor) cursor with the constant 0. The SDL2 constant SDL_SYSTEM_CURSOR_ARROW is 0, so it will return the default cursor.*/ static PyObject * _set_bitmap_cursor(int w, int h, int spotx, int spoty, PyObject *xormask, PyObject *andmask) { Uint8 *xordata = NULL, *anddata = NULL; int xorsize, andsize, loop, val; SDL_Cursor *lastcursor, *cursor = NULL; if (!PySequence_Check(xormask) || !PySequence_Check(andmask)) return RAISE(PyExc_TypeError, "xormask and andmask must be sequences"); if (w % 8) return RAISE(PyExc_ValueError, "Cursor width must be divisible by 8."); xorsize = (int)PySequence_Length(xormask); if (xorsize < 0) return NULL; andsize = (int)PySequence_Length(andmask); if (andsize < 0) return NULL; if (xorsize != w * h / 8 || andsize != w * h / 8) return RAISE(PyExc_ValueError, "bitmasks must be sized width*height/8"); #ifdef _MSC_VER /* Suppress false analyzer report */ __analysis_assume(xorsize >= 2); __analysis_assume(andsize >= 2); #endif xordata = (Uint8 *)malloc(xorsize); anddata = (Uint8 *)malloc(andsize); if ((NULL == xordata) || (NULL == anddata)) { free(xordata); free(anddata); return PyErr_NoMemory(); } for (loop = 0; loop < xorsize; ++loop) { if (!pg_IntFromObjIndex(xormask, loop, &val)) goto interror; xordata[loop] = (Uint8)val; if (!pg_IntFromObjIndex(andmask, loop, &val)) goto interror; anddata[loop] = (Uint8)val; } cursor = SDL_CreateCursor(xordata, anddata, w, h, spotx, spoty); free(xordata); free(anddata); xordata = NULL; anddata = NULL; if (!cursor) return RAISE(pgExc_SDLError, SDL_GetError()); lastcursor = SDL_GetCursor(); SDL_SetCursor(cursor); SDL_FreeCursor(lastcursor); // To make sure that the mask data sticks around, it has to have its ref // count increased Conversely, the old data stored in cursor_data (if it is // there) doesn't need to be around anymore Py_XDECREF(cursor_data.xormask); Py_XDECREF(cursor_data.andmask); Py_INCREF(xormask); Py_INCREF(andmask); cursor_data.type = BITMAP_CURSOR; cursor_data.xormask = xormask; cursor_data.andmask = andmask; cursor_data.w = w; cursor_data.h = h; cursor_data.spotx = spotx; cursor_data.spoty = spoty; Py_RETURN_NONE; interror: if (xordata) free(xordata); if (anddata) free(anddata); return RAISE(PyExc_TypeError, "Invalid number in mask array"); } static PyObject * _set_system_cursor(int constant) { SDL_Cursor *lastcursor, *cursor = NULL; cursor = SDL_CreateSystemCursor(constant); if (!cursor) { // SDL_GetError() wasn't returning relevant stuff when this function // fails return RAISE(pgExc_SDLError, "Error while creating system cursor"); } lastcursor = SDL_GetCursor(); SDL_SetCursor(cursor); SDL_FreeCursor(lastcursor); cursor_data.type = SYSTEM_CURSOR; cursor_data.constant = constant; Py_RETURN_NONE; } static PyObject * _set_color_cursor(int spotx, int spoty, pgSurfaceObject *surfobj) { SDL_Cursor *lastcursor, *cursor = NULL; SDL_Surface *surf = NULL; surf = pgSurface_AsSurface(surfobj); cursor = SDL_CreateColorCursor(surf, spotx, spoty); if (!cursor) return RAISE(pgExc_SDLError, SDL_GetError()); lastcursor = SDL_GetCursor(); SDL_SetCursor(cursor); SDL_FreeCursor(lastcursor); // To make sure that the surface is stored properly, it has to have its ref // count increased Conversely, the old data stored in cursor_data (if it is // there) doesn't need to be around anymore Py_XDECREF(cursor_data.surfobj); Py_INCREF(surfobj); cursor_data.type = COLOR_CURSOR; cursor_data.spotx = spotx; cursor_data.spoty = spoty; cursor_data.surfobj = surfobj; Py_RETURN_NONE; } static PyObject * mouse_set_system_cursor(PyObject *self, PyObject *args) { int constant; if (PyErr_WarnEx(PyExc_DeprecationWarning, "set_cursor() now has all the functionality of " "set_system_cursor(), so set_system_cursor() will be " "deprecated in pygame 2.2", 1) == -1) { return NULL; } VIDEO_INIT_CHECK(); if (!PyArg_ParseTuple(args, "i", &constant)) { return NULL; } return _set_system_cursor(constant); } // mouse.set_cursor goes through a python layer first, see cursors.py static PyObject * mouse_set_cursor(PyObject *self, PyObject *args, PyObject *kwds) { // normal_cursor stuff int w = 0, h = 0, spotx, spoty; PyObject *xormask, *andmask; // system_cursor stuff int constant = -1; // color_cursor stuff pgSurfaceObject *surfobj = NULL; static char *keywords[] = {"system", "bitmap", "color", NULL}; VIDEO_INIT_CHECK(); if (!PyArg_ParseTupleAndKeywords(args, kwds, "|(i)((ii)(ii)OO)((ii)O!)", keywords, &constant, &w, &h, &spotx, &spoty, &xormask, &andmask, &spotx, &spoty, &pgSurface_Type, &surfobj)) { return NULL; } if (constant > -1) { return _set_system_cursor(constant); } else if (w && h) { return _set_bitmap_cursor(w, h, spotx, spoty, xormask, andmask); } else if (surfobj) { return _set_color_cursor(spotx, spoty, surfobj); } return RAISE(PyExc_ValueError, "Invalid cursor format: no valid template found"); } // mouse.get_cursor goes through a python layer first, see cursors.py static PyObject * mouse_get_cursor(PyObject *self, PyObject *_null) { VIDEO_INIT_CHECK(); if (cursor_data.type == SYSTEM_CURSOR) { return Py_BuildValue("(i)", cursor_data.constant); } if (cursor_data.type == BITMAP_CURSOR) { return Py_BuildValue("(ii)(ii)OO", cursor_data.w, cursor_data.h, cursor_data.spotx, cursor_data.spoty, cursor_data.xormask, cursor_data.andmask); } if (cursor_data.type == COLOR_CURSOR) { return Py_BuildValue("(ii)O", cursor_data.spotx, cursor_data.spoty, cursor_data.surfobj); } return RAISE(pgExc_SDLError, "Cursor not found"); } static PyMethodDef _mouse_methods[] = { {"set_pos", mouse_set_pos, METH_VARARGS, DOC_PYGAMEMOUSESETPOS}, {"get_pos", (PyCFunction)mouse_get_pos, METH_NOARGS, DOC_PYGAMEMOUSEGETPOS}, {"get_rel", (PyCFunction)mouse_get_rel, METH_NOARGS, DOC_PYGAMEMOUSEGETREL}, {"get_pressed", (PyCFunction)mouse_get_pressed, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMOUSEGETPRESSED}, {"set_visible", mouse_set_visible, METH_VARARGS, DOC_PYGAMEMOUSESETVISIBLE}, {"get_visible", mouse_get_visible, METH_NOARGS, DOC_PYGAMEMOUSEGETVISIBLE}, {"get_focused", (PyCFunction)mouse_get_focused, METH_NOARGS, DOC_PYGAMEMOUSEGETFOCUSED}, {"set_system_cursor", mouse_set_system_cursor, METH_VARARGS, "set_system_cursor(constant) -> None\nset the mouse cursor to a system " "variant"}, {"_set_cursor", (PyCFunction)mouse_set_cursor, METH_VARARGS | METH_KEYWORDS, "Internal API for mouse.set_cursor"}, {"_get_cursor", (PyCFunction)mouse_get_cursor, METH_NOARGS, "Internal API for mouse.get_cursor"}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(mouse) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "mouse", DOC_PYGAMEMOUSE, -1, _mouse_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* create the module */ return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/music.c0000644000175100001770000003607414676242340015006 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * music module for pygame */ #define PYGAMEAPI_MUSIC_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/music_doc.h" #include "mixer.h" static Mix_Music *current_music = NULL; static Mix_Music *queue_music = NULL; static int queue_music_loops = 0; static int endmusic_event = SDL_NOEVENT; static Uint64 music_pos = 0; static long music_pos_time = -1; static int music_frequency = 0; static Uint16 music_format = 0; static int music_channels = 0; static void mixmusic_callback(void *udata, Uint8 *stream, int len) { if (!Mix_PausedMusic()) { music_pos += len; music_pos_time = SDL_GetTicks(); } } static void _pg_push_music_event(int type) { pgEventObject *e; SDL_Event event; PyGILState_STATE gstate = PyGILState_Ensure(); e = (pgEventObject *)pgEvent_New2(type, NULL); if (e) { pgEvent_FillUserEvent(e, &event); if (SDL_PushEvent(&event) <= 0) Py_DECREF(e->dict); Py_DECREF(e); } PyGILState_Release(gstate); } static void endmusic_callback(void) { if (endmusic_event && SDL_WasInit(SDL_INIT_VIDEO)) _pg_push_music_event(endmusic_event); if (queue_music) { if (current_music) Mix_FreeMusic(current_music); current_music = queue_music; queue_music = NULL; Mix_HookMusicFinished(endmusic_callback); music_pos = 0; Mix_PlayMusic(current_music, queue_music_loops); queue_music_loops = 0; } else { music_pos_time = -1; Mix_SetPostMix(NULL, NULL); } } /*music module methods*/ static PyObject * music_play(PyObject *self, PyObject *args, PyObject *keywds) { int loops = 0; float startpos = 0.0; int val, volume = 0, fade_ms = 0; static char *kwids[] = {"loops", "start", "fade_ms", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ifi", kwids, &loops, &startpos, &fade_ms)) return NULL; MIXER_INIT_CHECK(); if (!current_music) return RAISE(pgExc_SDLError, "music not loaded"); Py_BEGIN_ALLOW_THREADS; Mix_HookMusicFinished(endmusic_callback); Mix_SetPostMix(mixmusic_callback, NULL); Mix_QuerySpec(&music_frequency, &music_format, &music_channels); music_pos = 0; music_pos_time = SDL_GetTicks(); volume = Mix_VolumeMusic(-1); val = Mix_FadeInMusicPos(current_music, loops, fade_ms, startpos); Mix_VolumeMusic(volume); Py_END_ALLOW_THREADS; if (val == -1) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * music_get_busy(PyObject *self, PyObject *_null) { int playing; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; playing = (Mix_PlayingMusic() && !Mix_PausedMusic()); Py_END_ALLOW_THREADS; return PyBool_FromLong(playing); } static PyObject * music_fadeout(PyObject *self, PyObject *args) { int _time; if (!PyArg_ParseTuple(args, "i", &_time)) return NULL; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; /* To prevent the queue_music from playing, free it before fading. */ if (queue_music) { Mix_FreeMusic(queue_music); queue_music = NULL; queue_music_loops = 0; } Mix_FadeOutMusic(_time); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * music_stop(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; /* To prevent the queue_music from playing, free it before stopping. */ if (queue_music) { Mix_FreeMusic(queue_music); queue_music = NULL; queue_music_loops = 0; } Mix_HaltMusic(); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * music_pause(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Mix_PauseMusic(); Py_RETURN_NONE; } static PyObject * music_unpause(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Mix_ResumeMusic(); /* need to set pos_time for the adjusted time spent paused*/ music_pos_time = SDL_GetTicks(); Py_RETURN_NONE; } static PyObject * music_rewind(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_RewindMusic(); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * music_set_volume(PyObject *self, PyObject *args) { float volume; if (!PyArg_ParseTuple(args, "f", &volume)) return NULL; MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; Mix_VolumeMusic((int)(volume * 128)); Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * music_get_volume(PyObject *self, PyObject *_null) { int volume; MIXER_INIT_CHECK(); volume = Mix_VolumeMusic(-1); return PyFloat_FromDouble(volume / 128.0); } static PyObject * music_set_pos(PyObject *self, PyObject *arg) { int position_set; double pos = PyFloat_AsDouble(arg); if (pos == -1 && PyErr_Occurred()) { PyErr_Clear(); return RAISE(PyExc_TypeError, "set_pos expects 1 float argument"); } MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; position_set = Mix_SetMusicPosition(pos); Py_END_ALLOW_THREADS; if (position_set == -1) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * music_get_pos(PyObject *self, PyObject *_null) { long ticks; MIXER_INIT_CHECK(); if (music_pos_time < 0) return PyLong_FromLong(-1); ticks = (long)(1000 * music_pos / (music_channels * music_frequency * ((music_format & 0xff) >> 3))); if (!Mix_PausedMusic()) ticks += SDL_GetTicks() - music_pos_time; return PyLong_FromLong((long)ticks); } static PyObject * music_set_endevent(PyObject *self, PyObject *args) { int eventid = SDL_NOEVENT; if (!PyArg_ParseTuple(args, "|i", &eventid)) return NULL; endmusic_event = eventid; Py_RETURN_NONE; } static PyObject * music_get_endevent(PyObject *self, PyObject *_null) { return PyLong_FromLong(endmusic_event); } Mix_MusicType _get_type_from_hint(char *namehint) { Mix_MusicType type = MUS_NONE; char *dot; // Adjusts namehint into a mere file extension component if (namehint != NULL) { dot = strrchr(namehint, '.'); if (dot != NULL) { namehint = dot + 1; } } else { return type; } /* Copied almost directly from SDL_mixer. Originally meant to check file * extensions to get a hint of what music type it should be. * https://github.com/libsdl-org/SDL_mixer/blob/master/src/music.c#L586-L631 */ if (SDL_strcasecmp(namehint, "WAV") == 0) { type = MUS_WAV; } else if (SDL_strcasecmp(namehint, "MID") == 0 || SDL_strcasecmp(namehint, "MIDI") == 0 || SDL_strcasecmp(namehint, "KAR") == 0) { type = MUS_MID; } else if (SDL_strcasecmp(namehint, "OGG") == 0) { type = MUS_OGG; } #ifdef MUS_OPUS else if (SDL_strcasecmp(namehint, "OPUS") == 0) { type = MUS_OPUS; } #endif else if (SDL_strcasecmp(namehint, "FLAC") == 0) { type = MUS_FLAC; } else if (SDL_strcasecmp(namehint, "MPG") == 0 || SDL_strcasecmp(namehint, "MPEG") == 0 || SDL_strcasecmp(namehint, "MP3") == 0 || SDL_strcasecmp(namehint, "MAD") == 0) { type = MUS_MP3; } else if (SDL_strcasecmp(namehint, "669") == 0 || SDL_strcasecmp(namehint, "AMF") == 0 || SDL_strcasecmp(namehint, "AMS") == 0 || SDL_strcasecmp(namehint, "DBM") == 0 || SDL_strcasecmp(namehint, "DSM") == 0 || SDL_strcasecmp(namehint, "FAR") == 0 || SDL_strcasecmp(namehint, "IT") == 0 || SDL_strcasecmp(namehint, "MED") == 0 || SDL_strcasecmp(namehint, "MDL") == 0 || SDL_strcasecmp(namehint, "MOD") == 0 || SDL_strcasecmp(namehint, "MOL") == 0 || SDL_strcasecmp(namehint, "MTM") == 0 || SDL_strcasecmp(namehint, "NST") == 0 || SDL_strcasecmp(namehint, "OKT") == 0 || SDL_strcasecmp(namehint, "PTM") == 0 || SDL_strcasecmp(namehint, "S3M") == 0 || SDL_strcasecmp(namehint, "STM") == 0 || SDL_strcasecmp(namehint, "ULT") == 0 || SDL_strcasecmp(namehint, "UMX") == 0 || SDL_strcasecmp(namehint, "WOW") == 0 || SDL_strcasecmp(namehint, "XM") == 0) { type = MUS_MOD; } return type; } Mix_Music * _load_music(PyObject *obj, char *namehint) { Mix_Music *new_music = NULL; char *ext = NULL, *type = NULL; SDL_RWops *rw = NULL; PyObject *_type = NULL; PyObject *error = NULL; PyObject *_traceback = NULL; MIXER_INIT_CHECK(); rw = pgRWops_FromObject(obj, &ext); if (rw == NULL) { /* stop on NULL, error already set is what we SHOULD do */ PyErr_Fetch(&_type, &error, &_traceback); PyErr_SetObject(pgExc_SDLError, error); Py_XDECREF(_type); Py_XDECREF(_traceback); return NULL; } if (namehint) { type = namehint; } else { type = ext; } Py_BEGIN_ALLOW_THREADS; new_music = Mix_LoadMUSType_RW(rw, _get_type_from_hint(type), SDL_TRUE); Py_END_ALLOW_THREADS; if (ext) { free(ext); } if (!new_music) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return NULL; } return new_music; } static PyObject * music_load(PyObject *self, PyObject *args, PyObject *keywds) { Mix_Music *new_music = NULL; PyObject *obj; char *namehint = NULL; static char *kwids[] = {"filename", "namehint", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|s", kwids, &obj, &namehint)) return NULL; MIXER_INIT_CHECK(); new_music = _load_music(obj, namehint); if (new_music == NULL) // meaning it has an error to return return NULL; Py_BEGIN_ALLOW_THREADS; if (current_music != NULL) { Mix_FreeMusic(current_music); current_music = NULL; } if (queue_music != NULL) { Mix_FreeMusic(queue_music); queue_music = NULL; queue_music_loops = 0; } Py_END_ALLOW_THREADS; current_music = new_music; Py_RETURN_NONE; } static PyObject * music_unload(PyObject *self, PyObject *_null) { MIXER_INIT_CHECK(); Py_BEGIN_ALLOW_THREADS; if (current_music) { Mix_FreeMusic(current_music); current_music = NULL; } if (queue_music) { Mix_FreeMusic(queue_music); queue_music = NULL; queue_music_loops = 0; } Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * music_queue(PyObject *self, PyObject *args, PyObject *keywds) { Mix_Music *local_queue_music = NULL; PyObject *obj; int loops = 0; char *namehint = NULL; static char *kwids[] = {"filename", "namehint", "loops", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|si", kwids, &obj, &namehint, &loops)) return NULL; MIXER_INIT_CHECK(); queue_music_loops = loops; local_queue_music = _load_music(obj, namehint); if (local_queue_music == NULL) // meaning it has an error to return return NULL; Py_BEGIN_ALLOW_THREADS; /* Free any existing queued music. */ if (queue_music != NULL) { Mix_FreeMusic(queue_music); } Py_END_ALLOW_THREADS; queue_music = local_queue_music; Py_RETURN_NONE; } static PyMethodDef _music_methods[] = { {"set_endevent", music_set_endevent, METH_VARARGS, DOC_PYGAMEMIXERMUSICSETENDEVENT}, {"get_endevent", music_get_endevent, METH_NOARGS, DOC_PYGAMEMIXERMUSICGETENDEVENT}, {"play", (PyCFunction)music_play, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERMUSICPLAY}, {"get_busy", music_get_busy, METH_NOARGS, DOC_PYGAMEMIXERMUSICGETBUSY}, {"fadeout", music_fadeout, METH_VARARGS, DOC_PYGAMEMIXERMUSICFADEOUT}, {"stop", music_stop, METH_NOARGS, DOC_PYGAMEMIXERMUSICSTOP}, {"pause", music_pause, METH_NOARGS, DOC_PYGAMEMIXERMUSICPAUSE}, {"unpause", music_unpause, METH_NOARGS, DOC_PYGAMEMIXERMUSICUNPAUSE}, {"rewind", music_rewind, METH_NOARGS, DOC_PYGAMEMIXERMUSICREWIND}, {"set_volume", music_set_volume, METH_VARARGS, DOC_PYGAMEMIXERMUSICSETVOLUME}, {"get_volume", music_get_volume, METH_NOARGS, DOC_PYGAMEMIXERMUSICGETVOLUME}, {"set_pos", music_set_pos, METH_O, DOC_PYGAMEMIXERMUSICSETPOS}, {"get_pos", music_get_pos, METH_NOARGS, DOC_PYGAMEMIXERMUSICGETPOS}, {"load", (PyCFunction)music_load, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERMUSICLOAD}, {"unload", music_unload, METH_NOARGS, DOC_PYGAMEMIXERMUSICUNLOAD}, {"queue", (PyCFunction)music_queue, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEMIXERMUSICQUEUE}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(mixer_music) { PyObject *module; PyObject *cobj; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "mixer_music", DOC_PYGAMEMIXERMUSIC, -1, _music_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_rwobject(); if (PyErr_Occurred()) { return NULL; } import_pygame_event(); if (PyErr_Occurred()) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } cobj = PyCapsule_New(¤t_music, "pygame.music_mixer._MUSIC_POINTER", NULL); if (PyModule_AddObject(module, "_MUSIC_POINTER", cobj)) { Py_XDECREF(cobj); Py_DECREF(module); return NULL; } cobj = PyCapsule_New(&queue_music, "pygame.music_mixer._QUEUE_POINTER", NULL); if (PyModule_AddObject(module, "_QUEUE_POINTER", cobj)) { Py_XDECREF(cobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/newbuffer.c0000644000175100001770000005744614676242340015657 0ustar00runnerdocker/* pygame - Python Game Library Module newbuffer.c, Copyright (C) 2013 Lenard Lindstrom This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "pygame.h" #include "pgcompat.h" /* Buffer_TYPE states: * * Buffer_Type properties are read-only when the BUFOBJ_FILLED flag is set. * * The BUFOBJ_MEMFREE flag is set when the BufferObject object allocates * the memory for the Py_buffer. It is now responsible for freeing the * memory. * * The BUFOBJ_MUTABLE flag can only be changed by a tp_init slot function * call. * * A Buffer_Type object will only release a Py_buffer if both the * BUFOBJ_MUTABLE and BUFOBJ_FILLED flags are set. The PyBuffer_Release * function is only called by a call of the Buffer_Type release_buffer * method, a call to tp_init, or during garbage collection. * * If only the BUFOBJ_FILLED flag is set, then field values cannot be changed. * * If the view_p BufferObject field is NULL, then the BUFOBJ_MUTABLE flag * must be set. Also, the BUFOBJ_MEMFREE must not be set. * * The view_p->obj field should always be valid. It either points to * an object or is NULL. */ #define BUFOBJ_FILLED 0x0001 #define BUFOBJ_MEMFREE 0x0002 #define BUFOBJ_MUTABLE 0x0004 static PyObject * BufferSubtype_New(PyTypeObject *, Py_buffer *, int, int); static PyObject * Buffer_New(Py_buffer *, int, int); typedef struct buffer_object_t { PyObject_HEAD Py_buffer *view_p; int flags; } BufferObject; static int Module_AddSsize_tConstant(PyObject *module, const char *name, Py_ssize_t value) { PyObject *py_value = PyLong_FromSsize_t(value); if (!py_value) { return -1; } if (PyModule_AddObject(module, name, py_value)) { Py_DECREF(py_value); return -1; } return 0; } static int check_view_get(BufferObject *op, const char *name) { if (!op->view_p) { PyErr_Format(PyExc_AttributeError, "property %400s is undefined for an unallocated view", name); return -1; } return 0; } static int check_view_set(BufferObject *op, const char *name) { if (op->view_p) { if (op->flags & BUFOBJ_FILLED) { PyErr_Format(PyExc_AttributeError, "property %400s is read-only", name); return -1; } } else { PyErr_Format(PyExc_AttributeError, "property %400s is undefined for an unallocated view", name); return -1; } return 0; } static int check_value(PyObject *o, const char *name) { if (!o) { PyErr_Format(PyExc_AttributeError, "property %400s cannot be deleted", name); return -1; } return 0; } static int set_void_ptr(void **vpp, PyObject *o, const char *name) { void *vp = 0; if (check_value(o, name)) { return -1; } if (PyLong_Check(o)) { vp = PyLong_AsVoidPtr(o); if (PyErr_Occurred()) { return -1; } } else if (o == Py_None) { vp = 0; } else { PyErr_Format(PyExc_TypeError, "property %400s must be a Python integer, not '%400s'", name, Py_TYPE(o)->tp_name); return -1; } *vpp = vp; return 0; } static int set_py_ssize_t(Py_ssize_t *ip, PyObject *o, const char *name) { Py_ssize_t i; if (check_value(o, name)) { return -1; } if (!PyLong_Check(o)) { PyErr_Format(PyExc_TypeError, "property %100s must be a Python integer, not '%400s'", name, Py_TYPE(o)->tp_name); return -1; } i = PyLong_AsSsize_t(o); if (PyErr_Occurred()) { return -1; } *ip = i; return 0; } /* Restore a BufferObject instance to the equivalent of initializing * with a null Py_buffer address. */ static void Buffer_Reset(BufferObject *bp) { Py_buffer *view_p; int flags; if (!bp) { return; } view_p = bp->view_p; flags = bp->flags; bp->view_p = 0; bp->flags = BUFOBJ_MUTABLE; if (flags & BUFOBJ_MUTABLE) { if (flags & BUFOBJ_FILLED) { PyBuffer_Release(view_p); } else if (view_p && view_p->obj) /* Conditional && */ { Py_DECREF(view_p->obj); } if (flags & BUFOBJ_MEMFREE) { PyMem_Free(view_p); } } } static PyObject * buffer_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) { BufferObject *bp = (BufferObject *)subtype->tp_alloc(subtype, 0); if (bp) { bp->view_p = 0; bp->flags = BUFOBJ_MUTABLE; } return (PyObject *)bp; } static int buffer_init(BufferObject *self, PyObject *args, PyObject *kwds) { PyObject *py_address = 0; int filled = 0; int preserve = 0; Py_buffer *view_p = 0; char *keywords[] = {"buffer_address", "filled", "preserve", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oii:Py_buffer", keywords, &py_address, &filled, &preserve)) { return -1; } if (py_address == Py_None) { py_address = 0; } if (py_address) { if (PyLong_Check(py_address)) { view_p = (Py_buffer *)PyLong_AsVoidPtr(py_address); if (PyErr_Occurred()) { return -1; } } else { PyErr_Format(PyExc_TypeError, "argument %400s must be an integer, not '%400s'", keywords[0], Py_TYPE(py_address)->tp_name); return -1; } } if (!view_p) { if (filled) { PyErr_Format(PyExc_ValueError, "argument %400s cannot be True for a NULL %400s", keywords[1], keywords[0]); return -1; } else if (preserve) { PyErr_Format(PyExc_ValueError, "argument %400s cannot be True for a NULL %400s", keywords[2], keywords[0]); return -1; } } Buffer_Reset(self); self->view_p = view_p; if (preserve) { /* remove mutable flag */ self->flags &= ~BUFOBJ_MUTABLE; } if (filled) { /* add filled flag */ self->flags |= BUFOBJ_FILLED; } else if (view_p) { view_p->obj = 0; view_p->buf = 0; view_p->len = 0; view_p->itemsize = 0; view_p->readonly = 1; view_p->format = 0; view_p->ndim = 0; view_p->shape = 0; view_p->strides = 0; view_p->suboffsets = 0; view_p->internal = 0; } return 0; } static void buffer_dealloc(BufferObject *self) { PyObject_GC_UnTrack(self); Buffer_Reset(self); Py_TYPE(self)->tp_free(self); } static int buffer_traverse(BufferObject *self, visitproc visit, void *arg) { if (self->view_p && self->view_p->obj) /* Conditional && */ { Py_VISIT(self->view_p->obj); } return 0; } static PyObject * buffer_get_buffer(BufferObject *self, PyObject *args, PyObject *kwds) { PyObject *obj; int flags = PyBUF_SIMPLE; int bufobj_flags = self->flags; char *keywords[] = {"obj", "flags", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|i", keywords, &obj, &flags)) { return 0; } if (bufobj_flags & BUFOBJ_FILLED) { PyErr_SetString(PyExc_ValueError, "The Py_buffer struct is already filled in"); return 0; } self->flags = BUFOBJ_MUTABLE & bufobj_flags; if (!self->view_p) { self->view_p = PyMem_New(Py_buffer, 1); if (!self->view_p) { return PyErr_NoMemory(); } bufobj_flags |= BUFOBJ_MEMFREE; } if (PyObject_GetBuffer(obj, self->view_p, flags)) { if (bufobj_flags & BUFOBJ_MEMFREE) { PyMem_Free(self->view_p); self->view_p = 0; } return 0; } self->flags |= (bufobj_flags & BUFOBJ_MEMFREE) | BUFOBJ_FILLED; Py_RETURN_NONE; } static PyObject * buffer_release_buffer(BufferObject *self, PyObject *_null) { int flags = self->flags; Py_buffer *view_p = self->view_p; if ((flags & BUFOBJ_FILLED) && (flags & BUFOBJ_MUTABLE)) { self->flags = BUFOBJ_FILLED; /* Guard against reentrant calls */ PyBuffer_Release(view_p); self->flags = BUFOBJ_MUTABLE; if (flags & BUFOBJ_MEMFREE) { self->view_p = 0; PyMem_Free(view_p); } else { view_p->obj = 0; view_p->buf = 0; view_p->len = 0; view_p->itemsize = 0; view_p->readonly = 1; view_p->format = 0; view_p->ndim = 0; view_p->shape = 0; view_p->strides = 0; view_p->suboffsets = 0; view_p->internal = 0; } } Py_RETURN_NONE; } static struct PyMethodDef buffer_methods[] = { {"get_buffer", (PyCFunction)buffer_get_buffer, METH_VARARGS | METH_KEYWORDS, "fill in Py_buffer fields with a PyObject_GetBuffer call"}, {"release_buffer", (PyCFunction)buffer_release_buffer, METH_NOARGS, "release the Py_buffer with a PyBuffer_Release call"}, {0, 0, 0, 0}}; static PyObject * buffer_get_obj(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->obj) { Py_RETURN_NONE; } Py_INCREF(self->view_p->obj); return self->view_p->obj; } static int buffer_set_obj(BufferObject *self, PyObject *value, void *closure) { PyObject *tmp; DEL_ATTR_NOT_SUPPORTED_CHECK("obj", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (check_value(value, (const char *)closure)) { return -1; } tmp = self->view_p->obj; if (value != Py_None) { Py_INCREF(value); self->view_p->obj = value; } else { self->view_p->obj = 0; } if (tmp) { Py_DECREF(tmp); } return 0; } static PyObject * buffer_get_buf(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->buf) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->buf); } static int buffer_set_buf(BufferObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("buf", value); if (check_view_set(self, (const char *)closure)) { return -1; } return set_void_ptr(&self->view_p->buf, value, (const char *)closure); } static PyObject * buffer_get_len(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } return PyLong_FromSsize_t(self->view_p->len); } static int buffer_set_len(BufferObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("len", value); if (check_view_set(self, (const char *)closure)) { return -1; } return set_py_ssize_t(&self->view_p->len, value, (const char *)closure); } static PyObject * buffer_get_readonly(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } return PyBool_FromLong((long)self->view_p->readonly); } static int buffer_set_readonly(BufferObject *self, PyObject *value, void *closure) { int readonly = 1; DEL_ATTR_NOT_SUPPORTED_CHECK("readonly", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (check_value(value, (const char *)closure)) { return -1; } readonly = PyObject_IsTrue(value); if (readonly == -1) { return -1; } self->view_p->readonly = readonly; return 0; } static PyObject * buffer_get_format(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->format) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->format); } static int buffer_set_format(BufferObject *self, PyObject *value, void *closure) { void *vp = 0; DEL_ATTR_NOT_SUPPORTED_CHECK("format", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (set_void_ptr(&vp, value, (const char *)closure)) { return -1; } self->view_p->format = (char *)vp; return 0; } static PyObject * buffer_get_ndim(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } return PyLong_FromLong(self->view_p->ndim); } static int buffer_set_ndim(BufferObject *self, PyObject *value, void *closure) { Py_ssize_t ndim = 0; DEL_ATTR_NOT_SUPPORTED_CHECK("mdim", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (set_py_ssize_t(&ndim, value, (const char *)closure)) { return -1; } self->view_p->ndim = (int)ndim; return 0; } static PyObject * buffer_get_shape(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->shape) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->shape); } static int buffer_set_shape(BufferObject *self, PyObject *value, void *closure) { void *vp; DEL_ATTR_NOT_SUPPORTED_CHECK("shape", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (set_void_ptr(&vp, value, (const char *)closure)) { return -1; } self->view_p->shape = (Py_ssize_t *)vp; return 0; } static PyObject * buffer_get_strides(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->strides) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->strides); } static int buffer_set_strides(BufferObject *self, PyObject *value, void *closure) { void *vp; DEL_ATTR_NOT_SUPPORTED_CHECK("strides", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (set_void_ptr(&vp, value, (const char *)closure)) { return -1; } self->view_p->strides = (Py_ssize_t *)vp; return 0; } static PyObject * buffer_get_suboffsets(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->suboffsets) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->suboffsets); } static int buffer_set_suboffsets(BufferObject *self, PyObject *value, void *closure) { void *vp; DEL_ATTR_NOT_SUPPORTED_CHECK("suboffset", value); if (check_view_set(self, (const char *)closure)) { return -1; } if (set_void_ptr(&vp, value, (const char *)closure)) { return -1; } self->view_p->suboffsets = (Py_ssize_t *)vp; return 0; } static PyObject * buffer_get_itemsize(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } return PyLong_FromSsize_t(self->view_p->itemsize); } static int buffer_set_itemsize(BufferObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("itemsize", value); if (check_view_set(self, (const char *)closure)) { return -1; } return set_py_ssize_t(&self->view_p->itemsize, value, (const char *)closure); } static PyObject * buffer_get_internal(BufferObject *self, void *closure) { if (check_view_get(self, (const char *)closure)) { return 0; } if (!self->view_p->internal) { Py_RETURN_NONE; } return PyLong_FromVoidPtr(self->view_p->internal); } static int buffer_set_internal(BufferObject *self, PyObject *value, void *closure) { DEL_ATTR_NOT_SUPPORTED_CHECK("internal", value); if (check_view_set(self, (const char *)closure)) { return -1; } return set_void_ptr(&self->view_p->internal, value, (const char *)closure); } static PyGetSetDef buffer_getset[] = { {"obj", (getter)buffer_get_obj, (setter)buffer_set_obj, 0, "obj"}, {"buf", (getter)buffer_get_buf, (setter)buffer_set_buf, 0, "buf"}, {"len", (getter)buffer_get_len, (setter)buffer_set_len, 0, "len"}, {"readonly", (getter)buffer_get_readonly, (setter)buffer_set_readonly, 0, "readonly"}, {"format", (getter)buffer_get_format, (setter)buffer_set_format, 0, "format"}, {"ndim", (getter)buffer_get_ndim, (setter)buffer_set_ndim, 0, "ndim"}, {"shape", (getter)buffer_get_shape, (setter)buffer_set_shape, 0, "shape"}, {"strides", (getter)buffer_get_strides, (setter)buffer_set_strides, 0, "shape"}, {"suboffsets", (getter)buffer_get_suboffsets, (setter)buffer_set_suboffsets, 0, "suboffsets"}, {"itemsize", (getter)buffer_get_itemsize, (setter)buffer_set_itemsize, 0, "itemsize"}, {"internal", (getter)buffer_get_internal, (setter)buffer_set_internal, 0, "internal"}, {0, 0, 0, 0, 0}}; static int buffer_bool(BufferObject *self) { return self->view_p != NULL; } static PyNumberMethods buffer_as_number = {.nb_bool = (inquiry)buffer_bool}; #define BUFFER_TPFLAGS \ (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC) static PyTypeObject Py_buffer_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.newbuffer.Py_buffer", .tp_basicsize = sizeof(BufferObject), .tp_dealloc = (destructor)buffer_dealloc, .tp_as_number = &buffer_as_number, .tp_flags = BUFFER_TPFLAGS, .tp_doc = "Python level Py_buffer struct wrapper\n", .tp_traverse = (traverseproc)buffer_traverse, /* tp_traverse */ .tp_methods = buffer_methods, .tp_getset = buffer_getset, .tp_init = (initproc)buffer_init, .tp_alloc = PyType_GenericAlloc, .tp_new = buffer_new, .tp_free = PyObject_GC_Del, }; static PyObject * BufferSubtype_New(PyTypeObject *subtype, Py_buffer *view_p, int filled, int preserve) { BufferObject *bp = (BufferObject *)Py_buffer_Type.tp_alloc(subtype, 0); if (!bp) { return 0; } bp->view_p = view_p; bp->flags = 0; if (bp->view_p) { if (filled) { bp->flags |= BUFOBJ_FILLED; } else { bp->view_p->obj = 0; } if (!preserve) { bp->flags |= BUFOBJ_MUTABLE; } } else { bp->flags = BUFOBJ_MUTABLE; } return (PyObject *)bp; } static PyObject * Buffer_New(Py_buffer *view_p, int filled, int preserve) { return BufferSubtype_New(&Py_buffer_Type, view_p, filled, preserve); } static PyObject * mixin__get_buffer(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_NotImplementedError, "abstract method"); return 0; } static PyObject * mixin__release_buffer(PyObject *self, PyObject *arg) { Py_RETURN_NONE; } static PyMethodDef mixin_methods[] = { {"_get_buffer", (PyCFunction)mixin__get_buffer, METH_VARARGS, "new buffer protocol default bf_getbuffer handler"}, {"_release_buffer", (PyCFunction)mixin__release_buffer, METH_O, "new buffer protocol default bf_releasebuffer handler"}, {0, 0, 0, 0}}; static int mixin_getbuffer(PyObject *self, Py_buffer *view_p, int flags) { PyObject *py_view = Buffer_New(view_p, 0, 1); int rval = -1; if (py_view) { PyObject *py_rval = NULL; view_p->obj = 0; py_rval = PyObject_CallMethod(self, "_get_buffer", "(Oi)", py_view, flags); Buffer_Reset((BufferObject *)py_view); Py_DECREF(py_view); if (py_rval == Py_None) { rval = 0; Py_DECREF(py_rval); } else if (py_rval) { PyErr_SetString(PyExc_ValueError, "_get_buffer method return value was not None"); Py_DECREF(py_rval); } } return rval; } static void mixin_releasebuffer(PyObject *self, Py_buffer *view_p) { PyObject *py_view = Buffer_New(view_p, 1, 1); if (py_view) { PyObject *py_rval = PyObject_CallMethod(self, "_release_buffer", "(O)", py_view); if (py_rval) { Py_DECREF(py_rval); } else { PyErr_Clear(); } Buffer_Reset((BufferObject *)py_view); Py_DECREF(py_view); } else { PyErr_Clear(); } } static PyBufferProcs mixin_bufferprocs = { (getbufferproc)mixin_getbuffer, (releasebufferproc)mixin_releasebuffer}; #define MIXIN_TPFLAGS (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE) static PyTypeObject BufferMixin_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.newbuffer.BufferMixin", .tp_basicsize = sizeof(PyObject), .tp_as_buffer = &mixin_bufferprocs, .tp_flags = MIXIN_TPFLAGS, .tp_doc = "Python level new buffer protocol exporter\n", .tp_methods = mixin_methods, .tp_alloc = PyType_GenericAlloc, .tp_new = PyType_GenericNew, .tp_free = PyObject_Del, }; /*DOC*/ static char newbuffer_doc[] = /*DOC*/ "exports BufferMixin, add a new buffer interface to a class"; MODINIT_DEFINE(newbuffer) { PyObject *module; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "newbuffer", newbuffer_doc, -1, NULL, NULL, NULL, NULL, NULL}; /* prepare exported types */ if (PyType_Ready(&Py_buffer_Type) < 0) { return NULL; } if (PyType_Ready(&BufferMixin_Type) < 0) { return NULL; } #define bufferproxy_docs "" /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } Py_INCREF(&BufferMixin_Type); if (PyModule_AddObject(module, "BufferMixin", (PyObject *)&BufferMixin_Type)) { Py_DECREF(&BufferMixin_Type); Py_DECREF(module); return NULL; } Py_INCREF(&Py_buffer_Type); if (PyModule_AddObject(module, "Py_buffer", (PyObject *)&Py_buffer_Type)) { Py_DECREF(&Py_buffer_Type); Py_DECREF(module); return NULL; } if (Module_AddSsize_tConstant(module, "PyBUFFER_SIZEOF", sizeof(Py_buffer)) || PyModule_AddIntMacro(module, PyBUF_SIMPLE) || PyModule_AddIntMacro(module, PyBUF_WRITABLE) || PyModule_AddIntMacro(module, PyBUF_STRIDES) || PyModule_AddIntMacro(module, PyBUF_ND) || PyModule_AddIntMacro(module, PyBUF_C_CONTIGUOUS) || PyModule_AddIntMacro(module, PyBUF_F_CONTIGUOUS) || PyModule_AddIntMacro(module, PyBUF_ANY_CONTIGUOUS) || PyModule_AddIntMacro(module, PyBUF_INDIRECT) || PyModule_AddIntMacro(module, PyBUF_FORMAT) || PyModule_AddIntMacro(module, PyBUF_STRIDED) || PyModule_AddIntMacro(module, PyBUF_STRIDED_RO) || PyModule_AddIntMacro(module, PyBUF_RECORDS) || PyModule_AddIntMacro(module, PyBUF_RECORDS_RO) || PyModule_AddIntMacro(module, PyBUF_FULL) || PyModule_AddIntMacro(module, PyBUF_FULL_RO) || PyModule_AddIntMacro(module, PyBUF_CONTIG) || PyModule_AddIntMacro(module, PyBUF_CONTIG_RO)) { Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/palette.h0000644000175100001770000001562114676242340015324 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #ifndef PALETTE_H #define PALETTE_H #include /* SDL 2 does not assign a default palette color scheme to a new 8 bit * surface. Instead, the palette is set all white. This defines the SDL 1.2 * default palette. */ static const SDL_Color default_palette_colors[] = { {0, 0, 0, 255}, {0, 0, 85, 255}, {0, 0, 170, 255}, {0, 0, 255, 255}, {0, 36, 0, 255}, {0, 36, 85, 255}, {0, 36, 170, 255}, {0, 36, 255, 255}, {0, 73, 0, 255}, {0, 73, 85, 255}, {0, 73, 170, 255}, {0, 73, 255, 255}, {0, 109, 0, 255}, {0, 109, 85, 255}, {0, 109, 170, 255}, {0, 109, 255, 255}, {0, 146, 0, 255}, {0, 146, 85, 255}, {0, 146, 170, 255}, {0, 146, 255, 255}, {0, 182, 0, 255}, {0, 182, 85, 255}, {0, 182, 170, 255}, {0, 182, 255, 255}, {0, 219, 0, 255}, {0, 219, 85, 255}, {0, 219, 170, 255}, {0, 219, 255, 255}, {0, 255, 0, 255}, {0, 255, 85, 255}, {0, 255, 170, 255}, {0, 255, 255, 255}, {85, 0, 0, 255}, {85, 0, 85, 255}, {85, 0, 170, 255}, {85, 0, 255, 255}, {85, 36, 0, 255}, {85, 36, 85, 255}, {85, 36, 170, 255}, {85, 36, 255, 255}, {85, 73, 0, 255}, {85, 73, 85, 255}, {85, 73, 170, 255}, {85, 73, 255, 255}, {85, 109, 0, 255}, {85, 109, 85, 255}, {85, 109, 170, 255}, {85, 109, 255, 255}, {85, 146, 0, 255}, {85, 146, 85, 255}, {85, 146, 170, 255}, {85, 146, 255, 255}, {85, 182, 0, 255}, {85, 182, 85, 255}, {85, 182, 170, 255}, {85, 182, 255, 255}, {85, 219, 0, 255}, {85, 219, 85, 255}, {85, 219, 170, 255}, {85, 219, 255, 255}, {85, 255, 0, 255}, {85, 255, 85, 255}, {85, 255, 170, 255}, {85, 255, 255, 255}, {170, 0, 0, 255}, {170, 0, 85, 255}, {170, 0, 170, 255}, {170, 0, 255, 255}, {170, 36, 0, 255}, {170, 36, 85, 255}, {170, 36, 170, 255}, {170, 36, 255, 255}, {170, 73, 0, 255}, {170, 73, 85, 255}, {170, 73, 170, 255}, {170, 73, 255, 255}, {170, 109, 0, 255}, {170, 109, 85, 255}, {170, 109, 170, 255}, {170, 109, 255, 255}, {170, 146, 0, 255}, {170, 146, 85, 255}, {170, 146, 170, 255}, {170, 146, 255, 255}, {170, 182, 0, 255}, {170, 182, 85, 255}, {170, 182, 170, 255}, {170, 182, 255, 255}, {170, 219, 0, 255}, {170, 219, 85, 255}, {170, 219, 170, 255}, {170, 219, 255, 255}, {170, 255, 0, 255}, {170, 255, 85, 255}, {170, 255, 170, 255}, {170, 255, 255, 255}, {255, 0, 0, 255}, {255, 0, 85, 255}, {255, 0, 170, 255}, {255, 0, 255, 255}, {255, 36, 0, 255}, {255, 36, 85, 255}, {255, 36, 170, 255}, {255, 36, 255, 255}, {255, 73, 0, 255}, {255, 73, 85, 255}, {255, 73, 170, 255}, {255, 73, 255, 255}, {255, 109, 0, 255}, {255, 109, 85, 255}, {255, 109, 170, 255}, {255, 109, 255, 255}, {255, 146, 0, 255}, {255, 146, 85, 255}, {255, 146, 170, 255}, {255, 146, 255, 255}, {255, 182, 0, 255}, {255, 182, 85, 255}, {255, 182, 170, 255}, {255, 182, 255, 255}, {255, 219, 0, 255}, {255, 219, 85, 255}, {255, 219, 170, 255}, {255, 219, 255, 255}, {255, 255, 0, 255}, {255, 255, 85, 255}, {255, 255, 170, 255}, {255, 255, 255, 255}, {0, 0, 0, 255}, {0, 0, 85, 255}, {0, 0, 170, 255}, {0, 0, 255, 255}, {0, 36, 0, 255}, {0, 36, 85, 255}, {0, 36, 170, 255}, {0, 36, 255, 255}, {0, 73, 0, 255}, {0, 73, 85, 255}, {0, 73, 170, 255}, {0, 73, 255, 255}, {0, 109, 0, 255}, {0, 109, 85, 255}, {0, 109, 170, 255}, {0, 109, 255, 255}, {0, 146, 0, 255}, {0, 146, 85, 255}, {0, 146, 170, 255}, {0, 146, 255, 255}, {0, 182, 0, 255}, {0, 182, 85, 255}, {0, 182, 170, 255}, {0, 182, 255, 255}, {0, 219, 0, 255}, {0, 219, 85, 255}, {0, 219, 170, 255}, {0, 219, 255, 255}, {0, 255, 0, 255}, {0, 255, 85, 255}, {0, 255, 170, 255}, {0, 255, 255, 255}, {85, 0, 0, 255}, {85, 0, 85, 255}, {85, 0, 170, 255}, {85, 0, 255, 255}, {85, 36, 0, 255}, {85, 36, 85, 255}, {85, 36, 170, 255}, {85, 36, 255, 255}, {85, 73, 0, 255}, {85, 73, 85, 255}, {85, 73, 170, 255}, {85, 73, 255, 255}, {85, 109, 0, 255}, {85, 109, 85, 255}, {85, 109, 170, 255}, {85, 109, 255, 255}, {85, 146, 0, 255}, {85, 146, 85, 255}, {85, 146, 170, 255}, {85, 146, 255, 255}, {85, 182, 0, 255}, {85, 182, 85, 255}, {85, 182, 170, 255}, {85, 182, 255, 255}, {85, 219, 0, 255}, {85, 219, 85, 255}, {85, 219, 170, 255}, {85, 219, 255, 255}, {85, 255, 0, 255}, {85, 255, 85, 255}, {85, 255, 170, 255}, {85, 255, 255, 255}, {170, 0, 0, 255}, {170, 0, 85, 255}, {170, 0, 170, 255}, {170, 0, 255, 255}, {170, 36, 0, 255}, {170, 36, 85, 255}, {170, 36, 170, 255}, {170, 36, 255, 255}, {170, 73, 0, 255}, {170, 73, 85, 255}, {170, 73, 170, 255}, {170, 73, 255, 255}, {170, 109, 0, 255}, {170, 109, 85, 255}, {170, 109, 170, 255}, {170, 109, 255, 255}, {170, 146, 0, 255}, {170, 146, 85, 255}, {170, 146, 170, 255}, {170, 146, 255, 255}, {170, 182, 0, 255}, {170, 182, 85, 255}, {170, 182, 170, 255}, {170, 182, 255, 255}, {170, 219, 0, 255}, {170, 219, 85, 255}, {170, 219, 170, 255}, {170, 219, 255, 255}, {170, 255, 0, 255}, {170, 255, 85, 255}, {170, 255, 170, 255}, {170, 255, 255, 255}, {255, 0, 0, 255}, {255, 0, 85, 255}, {255, 0, 170, 255}, {255, 0, 255, 255}, {255, 36, 0, 255}, {255, 36, 85, 255}, {255, 36, 170, 255}, {255, 36, 255, 255}, {255, 73, 0, 255}, {255, 73, 85, 255}, {255, 73, 170, 255}, {255, 73, 255, 255}, {255, 109, 0, 255}, {255, 109, 85, 255}, {255, 109, 170, 255}, {255, 109, 255, 255}, {255, 146, 0, 255}, {255, 146, 85, 255}, {255, 146, 170, 255}, {255, 146, 255, 255}, {255, 182, 0, 255}, {255, 182, 85, 255}, {255, 182, 170, 255}, {255, 182, 255, 255}, {255, 219, 0, 255}, {255, 219, 85, 255}, {255, 219, 170, 255}, {255, 219, 255, 255}, {255, 255, 0, 255}, {255, 255, 85, 255}, {255, 255, 170, 255}, {255, 255, 255, 255}}; static const int default_palette_size = (int)(sizeof(default_palette_colors) / sizeof(SDL_Color)); #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgarrinter.h0000644000175100001770000000204414676242340016036 0ustar00runnerdocker/* array structure interface version 3 declarations */ #if !defined(PG_ARRAYINTER_HEADER) #define PG_ARRAYINTER_HEADER static const int PAI_CONTIGUOUS = 0x01; static const int PAI_FORTRAN = 0x02; static const int PAI_ALIGNED = 0x100; static const int PAI_NOTSWAPPED = 0x200; static const int PAI_WRITEABLE = 0x400; static const int PAI_ARR_HAS_DESCR = 0x800; typedef struct { int two; /* contains the integer 2 -- simple sanity check */ int nd; /* number of dimensions */ char typekind; /* kind in array -- character code of typestr */ int itemsize; /* size of each element */ int flags; /* flags indicating how the data should be */ /* interpreted */ Py_intptr_t *shape; /* A length-nd array of shape information */ Py_intptr_t *strides; /* A length-nd array of stride information */ void *data; /* A pointer to the first element of the array */ PyObject *descr; /* NULL or a data-description */ } PyArrayInterface; #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgbufferproxy.h0000644000175100001770000000026314676242340016564 0ustar00runnerdocker#ifndef PG_BUFPROXY_INTERNAL_H #define PG_BUFPROXY_INTERNAL_H #include "include/pygame_bufferproxy.h" #define PYGAMEAPI_BUFPROXY_NUMSLOTS 4 #endif /* ~PG_BUFPROXY_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgcompat.c0000644000175100001770000000002114676242340015457 0ustar00runnerdocker#include ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgcompat.h0000644000175100001770000000134114676242340015472 0ustar00runnerdocker/* Python 2.x/3.x compatibility tools (internal) */ #ifndef PGCOMPAT_INTERNAL_H #define PGCOMPAT_INTERNAL_H #include "include/pgcompat.h" /* Module init function returns new module instance. */ #define MODINIT_DEFINE(mod_name) PyMODINIT_FUNC PyInit_##mod_name(void) /* Defaults for unicode file path encoding */ #if defined(MS_WIN32) #define UNICODE_DEF_FS_ERROR "replace" #else #define UNICODE_DEF_FS_ERROR "surrogateescape" #endif #define RELATIVE_MODULE(m) ("." m) #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #define Slice_GET_INDICES_EX(slice, length, start, stop, step, slicelength) \ PySlice_GetIndicesEx(slice, length, start, stop, step, slicelength) #endif /* ~PGCOMPAT_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgopengl.h0000644000175100001770000000113614676242340015475 0ustar00runnerdocker#if !defined(PGOPENGL_H) #define PGOPENGL_H /** This header includes definitions of Opengl functions as pointer types for ** use with the SDL function SDL_GL_GetProcAddress. **/ #if defined(_WIN32) #define GL_APIENTRY __stdcall #else #define GL_APIENTRY #endif typedef void(GL_APIENTRY *GL_glReadPixels_Func)(int, int, int, int, unsigned int, unsigned int, void *); typedef void(GL_APIENTRY *GL_glViewport_Func)(int, int, unsigned int, unsigned int); #endif ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.012112 pygame-2.6.1/src_c/pgplatform.h0000644000175100001770000000105114676242340016031 0ustar00runnerdocker/* platform/compiler adjustments (internal) */ #ifndef PG_PLATFORM_INTERNAL_H #define PG_PLATFORM_INTERNAL_H #include "include/pgplatform.h" #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif #ifndef ABS #define ABS(a) (((a) < 0) ? -(a) : (a)) #endif /* warnings */ #define PG_STRINGIZE_HELPER(x) #x #define PG_STRINGIZE(x) PG_STRINGIZE_HELPER(x) #define PG_WARN(desc) \ message(__FILE__ "(" PG_STRINGIZE(__LINE__) "): WARNING: " #desc) #endif /* ~PG_PLATFORM_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/pixelarray.c0000644000175100001770000016454414676242340016052 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2007-2008 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define PYGAMEAPI_PIXELARRAY_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/pixelarray_doc.h" #include "surface.h" #if !defined(BUILD_STATIC) static char FormatUint8[] = "B"; static char FormatUint16[] = "=H"; static char FormatUint24[] = "3x"; static char FormatUint32[] = "=I"; #endif struct _pixelarray_t; /* The array, like its surface, is in column-major (FORTRAN) order. This is the reverse of C's row-major order. All array descriptor fields are relative to the original surface data. The pixels field is adjusted for any offsets of the array view into the surface. If shape[1] is 0 the array is one dimensional. */ typedef struct _pixelarray_t { PyObject_HEAD PyObject *dict; /* dict for subclassing */ PyObject *weakrefs; /* Weakrefs for subclassing */ pgSurfaceObject *surface; /* Surface associated with the array */ Py_ssize_t shape[2]; /* (row,col) shape of array in pixels */ Py_ssize_t strides[2]; /* (row,col) offsets in bytes */ Uint8 *pixels; /* Start of array data */ struct _pixelarray_t *parent; /* Parent pixel array: NULL if no parent */ } pgPixelArrayObject; static int array_is_contiguous(pgPixelArrayObject *, char); static pgPixelArrayObject * _pxarray_new_internal(PyTypeObject *, pgSurfaceObject *, pgPixelArrayObject *, Uint8 *, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t); static PyObject * _pxarray_new(PyTypeObject *, PyObject *, PyObject *); static void _pxarray_dealloc(pgPixelArrayObject *); static int _pxarray_traverse(pgPixelArrayObject *, visitproc, void *); static PyObject * _pxarray_get_dict(pgPixelArrayObject *, void *); static pgSurfaceObject * _pxarray_get_surface(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_itemsize(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_shape(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_strides(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_ndim(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_arraystruct(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_arrayinterface(pgPixelArrayObject *, void *); static PyObject * _pxarray_get_pixelsaddress(pgPixelArrayObject *, void *); static PyObject * _pxarray_repr(pgPixelArrayObject *); static PyObject * _array_slice_internal(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, Py_ssize_t); /* Sequence methods */ static Py_ssize_t _pxarray_length(pgPixelArrayObject *); static PyObject * _pxarray_item(pgPixelArrayObject *, Py_ssize_t); static int _array_assign_array(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, pgPixelArrayObject *); static int _array_assign_sequence(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, PyObject *); static int _array_assign_slice(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, Uint32); static int _pxarray_ass_item(pgPixelArrayObject *, Py_ssize_t, PyObject *); static int _pxarray_ass_slice(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, PyObject *); static int _pxarray_contains(pgPixelArrayObject *, PyObject *); /* Mapping methods */ static int _get_subslice(PyObject *, Py_ssize_t, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *); static PyObject * _pxarray_subscript(pgPixelArrayObject *, PyObject *); static int _pxarray_ass_subscript(pgPixelArrayObject *, PyObject *, PyObject *); /* New buffer protocol; also used for internally for array interface */ static int _pxarray_getbuffer(pgPixelArrayObject *, Py_buffer *, int); static PyObject * _pxarray_subscript_internal(pgPixelArrayObject *, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t); /* C API interfaces */ static PyObject * pgPixelArray_New(PyObject *); /* Incomplete forward declaration so we can use it in the methods included * below. */ static PyTypeObject pgPixelArray_Type; #define pgPixelArrayObject_Check(o) \ (Py_TYPE(o) == (PyTypeObject *)&pgPixelArray_Type) #define SURFACE_EQUALS(x, y) \ (((pgPixelArrayObject *)x)->surface == ((pgPixelArrayObject *)y)->surface) static int array_is_contiguous(pgPixelArrayObject *ap, char fortran) { int itemsize = pgSurface_AsSurface(ap->surface)->format->BytesPerPixel; if (ap->strides[0] == itemsize) { if (ap->shape[1] == 0) { return 1; } if ((fortran == 'F' || fortran == 'A') && (ap->strides[1] == ap->shape[0] * itemsize)) { return 1; } } return 0; } void _cleanup_array(pgPixelArrayObject *array) { PyObject_GC_UnTrack(array); if (array->parent) { Py_DECREF(array->parent); } else { pgSurface_UnlockBy(array->surface, (PyObject *)array); } Py_DECREF(array->surface); Py_XDECREF(array->dict); /* We check other operations, and raise ValueError if surface is NULL. */ array->surface = NULL; } #include "pixelarray_methods.c" /** * Methods, which are bound to the pgPixelArrayObject type. */ static PyMethodDef _pxarray_methods[] = { {"compare", (PyCFunction)_compare, METH_VARARGS | METH_KEYWORDS, DOC_PIXELARRAYCOMPARE}, {"extract", (PyCFunction)_extract_color, METH_VARARGS | METH_KEYWORDS, DOC_PIXELARRAYEXTRACT}, {"make_surface", (PyCFunction)_make_surface, METH_NOARGS, DOC_PIXELARRAYMAKESURFACE}, {"close", (PyCFunction)_close_array, METH_NOARGS, DOC_PIXELARRAYCLOSE}, {"__enter__", (PyCFunction)_enter_context, METH_NOARGS, DOC_PIXELARRAYCLOSE}, {"__exit__", (PyCFunction)_exit_context, METH_VARARGS | METH_KEYWORDS, DOC_PIXELARRAYEXTRACT}, {"replace", (PyCFunction)_replace_color, METH_VARARGS | METH_KEYWORDS, DOC_PIXELARRAYREPLACE}, {"transpose", (PyCFunction)_transpose, METH_NOARGS, DOC_PIXELARRAYTRANSPOSE}, {NULL, NULL, 0, NULL}}; static void Text_ConcatAndDel(PyObject **string, PyObject *newpart) { PyObject *result = 0; if (*string && newpart) { result = PyUnicode_Concat(*string, newpart); Py_DECREF(*string); Py_DECREF(newpart); } else { Py_XDECREF(*string); Py_XDECREF(newpart); } *string = result; } /** * Getters and setters for the pgPixelArrayObject. */ static PyGetSetDef _pxarray_getsets[] = { {"__dict__", (getter)_pxarray_get_dict, 0, 0, 0}, {"surface", (getter)_pxarray_get_surface, 0, DOC_PIXELARRAYSURFACE, 0}, {"itemsize", (getter)_pxarray_get_itemsize, 0, DOC_PIXELARRAYITEMSIZE, 0}, {"shape", (getter)_pxarray_get_shape, 0, DOC_PIXELARRAYSHAPE, 0}, {"strides", (getter)_pxarray_get_strides, 0, DOC_PIXELARRAYSTRIDES, 0}, {"ndim", (getter)_pxarray_get_ndim, 0, DOC_PIXELARRAYNDIM, 0}, {"__array_struct__", (getter)_pxarray_get_arraystruct, 0, "Version 3", 0}, {"__array_interface__", (getter)_pxarray_get_arrayinterface, 0, "Version 3", 0}, {"_pixels_address", (getter)_pxarray_get_pixelsaddress, 0, "pixel buffer address (readonly)", 0}, {0, 0, 0, 0, 0}}; /** * Sequence interface support for the pgPixelArrayObject. * concat and repeat are not implemented due to the possible confusion * of their behaviour (see lists numpy array). */ static PySequenceMethods _pxarray_sequence = { .sq_length = (lenfunc)_pxarray_length, .sq_item = (ssizeargfunc)_pxarray_item, .sq_ass_item = (ssizeobjargproc)_pxarray_ass_item, .sq_contains = (objobjproc)_pxarray_contains, }; /** * Mapping interface support for the pgPixelArrayObject. */ static PyMappingMethods _pxarray_mapping = { .mp_length = (lenfunc)_pxarray_length, .mp_subscript = (binaryfunc)_pxarray_subscript, .mp_ass_subscript = (objobjargproc)_pxarray_ass_subscript, }; static PyBufferProcs _pxarray_bufferprocs = {(getbufferproc)_pxarray_getbuffer, 0}; #define PXARRAY_BUFFERPROCS &_pxarray_bufferprocs #define PXARRAY_TPFLAGS \ (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC) static PyTypeObject pgPixelArray_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.pixelarray.PixelArray", .tp_basicsize = sizeof(pgPixelArrayObject), .tp_dealloc = (destructor)_pxarray_dealloc, .tp_repr = (reprfunc)_pxarray_repr, .tp_as_sequence = &_pxarray_sequence, .tp_as_mapping = &_pxarray_mapping, .tp_as_buffer = PXARRAY_BUFFERPROCS, .tp_flags = PXARRAY_TPFLAGS, .tp_doc = DOC_PYGAMEPIXELARRAY, .tp_traverse = (traverseproc)_pxarray_traverse, .tp_weaklistoffset = offsetof(pgPixelArrayObject, weakrefs), .tp_iter = PySeqIter_New, .tp_methods = _pxarray_methods, .tp_getset = _pxarray_getsets, .tp_dictoffset = offsetof(pgPixelArrayObject, dict), .tp_new = _pxarray_new, }; static pgPixelArrayObject * _pxarray_new_internal(PyTypeObject *type, pgSurfaceObject *surface, pgPixelArrayObject *parent, Uint8 *pixels, Py_ssize_t dim0, Py_ssize_t dim1, Py_ssize_t stride0, Py_ssize_t stride1) { pgPixelArrayObject *self; self = (pgPixelArrayObject *)type->tp_alloc(type, 0); if (!self) { return 0; } self->weakrefs = 0; self->dict = 0; if (!parent) { if (!surface) { Py_TYPE(self)->tp_free((PyObject *)self); PyErr_SetString(PyExc_SystemError, "Pygame internal error in _pxarray_new_internal: " "no parent or surface."); return 0; } self->parent = 0; self->surface = surface; Py_INCREF(surface); if (!pgSurface_LockBy(surface, (PyObject *)self)) { Py_DECREF(surface); Py_TYPE(self)->tp_free((PyObject *)self); return 0; } } else { self->parent = parent; Py_INCREF(parent); surface = parent->surface; self->surface = surface; Py_INCREF(surface); } self->shape[0] = dim0; self->shape[1] = dim1; self->strides[0] = stride0; self->strides[1] = stride1; self->pixels = pixels; return self; } /** * Creates a new pgPixelArrayObject. */ static PyObject * _pxarray_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { pgSurfaceObject *surfobj; SDL_Surface *surf; Py_ssize_t dim0; Py_ssize_t dim1; Py_ssize_t stride0; Py_ssize_t stride1; Uint8 *pixels; if (!PyArg_ParseTuple(args, "O!", &pgSurface_Type, &surfobj)) { return 0; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); dim0 = (Py_ssize_t)surf->w; dim1 = (Py_ssize_t)surf->h; stride0 = (Py_ssize_t)surf->format->BytesPerPixel; stride1 = (Py_ssize_t)surf->pitch; pixels = surf->pixels; if (stride0 < 1 || stride0 > 4) { return RAISE(PyExc_ValueError, "unsupported bit depth for reference array"); } return (PyObject *)_pxarray_new_internal(type, surfobj, 0, pixels, dim0, dim1, stride0, stride1); } /** * Deallocates the pgPixelArrayObject and its members. */ static void _pxarray_dealloc(pgPixelArrayObject *self) { if (self->surface) { if (self->weakrefs) { PyObject_ClearWeakRefs((PyObject *)self); } _cleanup_array(self); } Py_TYPE(self)->tp_free((PyObject *)self); } /** * Garbage collector support */ static int _pxarray_traverse(pgPixelArrayObject *self, visitproc visit, void *arg) { Py_VISIT(self->surface); if (self->dict) { Py_VISIT(self->dict); } if (self->parent) { Py_VISIT((PyObject *)self->parent); } return 0; } /**** Getter and setter access ****/ /** * Getter for PixelArray.__dict__. */ static PyObject * _pxarray_get_dict(pgPixelArrayObject *self, void *closure) { PyObject *dict = self->dict; if (!dict) { dict = PyDict_New(); if (!dict) { return 0; } self->dict = dict; } Py_INCREF(dict); return dict; } /** * Getter for PixelArray.surface */ static pgSurfaceObject * _pxarray_get_surface(pgPixelArrayObject *self, void *closure) { if (self->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return NULL; } Py_INCREF(self->surface); return self->surface; } /** * Getter for PixelArray.itemsize * (pixel size in bytes) */ static PyObject * _pxarray_get_itemsize(pgPixelArrayObject *self, void *closure) { if (self->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return NULL; } SDL_Surface *surf = pgSurface_AsSurface(self->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong((long)surf->format->BytesPerPixel); } /** * Getter for PixelArray.shape */ static PyObject * _pxarray_get_shape(pgPixelArrayObject *self, void *closure) { if (self->shape[1]) { return Py_BuildValue("(nn)", self->shape[0], self->shape[1]); } return Py_BuildValue("(n)", self->shape[0]); } /** * Getter for PixelArray.strides */ static PyObject * _pxarray_get_strides(pgPixelArrayObject *self, void *closure) { if (self->shape[1]) { return Py_BuildValue("(nn)", self->strides[0], self->strides[1]); } return Py_BuildValue("(n)", self->strides[0]); } /** * Getter for PixelArray.ndim */ static PyObject * _pxarray_get_ndim(pgPixelArrayObject *self, void *closure) { return PyLong_FromLong(self->shape[1] ? 2L : 1L); } /** * Getter for PixelArray.__array_struct__ * (array struct interface) */ static PyObject * _pxarray_get_arraystruct(pgPixelArrayObject *self, void *closure) { Py_buffer view; PyObject *dict; if (_pxarray_getbuffer(self, &view, PyBUF_RECORDS)) { return 0; } dict = pgBuffer_AsArrayStruct(&view); Py_XDECREF(view.obj); return dict; } static PyObject * _pxarray_get_arrayinterface(pgPixelArrayObject *self, void *closure) { Py_buffer view; PyObject *cobj; if (_pxarray_getbuffer(self, &view, PyBUF_RECORDS)) { return 0; } cobj = pgBuffer_AsArrayInterface(&view); Py_XDECREF(view.obj); return cobj; } /** * Getter for PixelArray._pixels_address * (address of the array's pointer into its surface's pixel data) */ static PyObject * _pxarray_get_pixelsaddress(pgPixelArrayObject *self, void *closure) { void *address = self->pixels; #if SIZEOF_VOID_P > SIZEOF_LONG return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)address); #else return PyLong_FromUnsignedLong((unsigned long)address); #endif } static int _pxarray_getbuffer(pgPixelArrayObject *self, Py_buffer *view_p, int flags) { Py_ssize_t itemsize; int ndim = self->shape[1] ? 2 : 1; Py_ssize_t *shape = 0; Py_ssize_t *strides = 0; Py_ssize_t len; if (self->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return -1; } SDL_Surface *surf = pgSurface_AsSurface(self->surface); if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } itemsize = surf->format->BytesPerPixel; len = self->shape[0] * (ndim == 2 ? self->shape[1] : 1) * itemsize; view_p->obj = 0; if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS) && !array_is_contiguous(self, 'C')) { PyErr_SetString(pgExc_BufferError, "this pixel array is not C contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS) && !array_is_contiguous(self, 'F')) { PyErr_SetString(pgExc_BufferError, "this pixel array is not F contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS) && !array_is_contiguous(self, 'A')) { PyErr_SetString(pgExc_BufferError, "this pixel array is not contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { shape = self->shape; if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { strides = self->strides; } else if (!array_is_contiguous(self, 'C')) { PyErr_SetString( pgExc_BufferError, "this pixel array is not contiguous: need strides"); return -1; } } else if (array_is_contiguous(self, 'F')) { ndim = 0; } else { PyErr_SetString(pgExc_BufferError, "this pixel array is not C contiguous: need strides"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { /* Find the appropriate format for given pixel size */ switch (itemsize) { /* This switch statement is exhaustive over possible itemsize values, the supported surface pixel byte sizes */ case 1: view_p->format = FormatUint8; break; case 2: view_p->format = FormatUint16; break; case 3: view_p->format = FormatUint24; break; case 4: view_p->format = FormatUint32; break; #ifndef NDEBUG /* Assert that itemsize is valid */ default: /* Should not get here */ PyErr_Format(PyExc_SystemError, "Internal Pygame error at line %d in %s: " "unknown item size %d; please report", (int)__LINE__, __FILE__, (int)itemsize); return -1; #endif } } else { view_p->format = 0; } Py_INCREF(self); view_p->obj = (PyObject *)self; view_p->buf = self->pixels; view_p->len = len; view_p->readonly = 0; view_p->itemsize = itemsize; view_p->ndim = ndim; view_p->shape = shape; view_p->strides = strides; view_p->suboffsets = 0; view_p->internal = 0; return 0; } /**** Methods ****/ /** * repr(PixelArray) */ static PyObject * _pxarray_repr(pgPixelArrayObject *array) { SDL_Surface *surf; PyObject *string; int bpp; Uint8 *pixels = array->pixels; int ndim = array->shape[1] ? 2 : 1; Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1] ? array->shape[1] : 1; Py_ssize_t stride0 = array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint32 pixel; Py_ssize_t x; Py_ssize_t y; Uint8 *pixelrow; Uint8 *pixel_p; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); bpp = surf->format->BytesPerPixel; string = PyUnicode_FromString("PixelArray("); if (!string) { return 0; } pixelrow = pixels; if (ndim == 2) { Text_ConcatAndDel(&string, PyUnicode_FromString("[")); if (!string) { return 0; } } switch (bpp) { case 1: for (y = 0; y < dim1; ++y) { Text_ConcatAndDel(&string, PyUnicode_FromString("\n [")); if (!string) { return 0; } pixel_p = pixelrow; for (x = 0; x < dim0 - 1; ++x) { Text_ConcatAndDel(&string, PyUnicode_FromFormat( "%ld, ", (long)*pixel_p)); if (!string) { return 0; } pixel_p += stride0; } Text_ConcatAndDel( &string, PyUnicode_FromFormat("%ld]", (long)*pixel_p)); if (!string) { return 0; } pixelrow += stride1; } break; case 2: for (y = 0; y < dim1; ++y) { Text_ConcatAndDel(&string, PyUnicode_FromString("\n [")); if (!string) { return 0; } pixel_p = pixelrow; for (x = 0; x < dim0 - 1; ++x) { Text_ConcatAndDel(&string, PyUnicode_FromFormat( "%ld, ", (long)*(Uint16 *)pixel_p)); if (!string) { return 0; } pixel_p += stride0; } Text_ConcatAndDel( &string, PyUnicode_FromFormat("%ld]", (long)*(Uint16 *)pixel_p)); if (string == NULL) { return NULL; } pixelrow += stride1; } break; case 3: for (y = 0; y < dim1; ++y) { Text_ConcatAndDel(&string, PyUnicode_FromString("\n [")); pixel_p = pixelrow; for (x = 0; x < dim0 - 1; ++x) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN pixel = (pixel_p[0]) + (pixel_p[1] << 8) + (pixel_p[2] << 16); #else pixel = (pixel_p[2]) + (pixel_p[1] << 8) + (pixel_p[0] << 16); #endif Text_ConcatAndDel( &string, PyUnicode_FromFormat("%ld, ", (long)pixel)); if (!string) { return 0; } pixel_p += stride0; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN pixel = (pixel_p[0]) + (pixel_p[1] << 8) + (pixel_p[2] << 16); #else pixel = (pixel_p[2]) + (pixel_p[1] << 8) + (pixel_p[0] << 16); #endif Text_ConcatAndDel(&string, PyUnicode_FromFormat("%ld]", (long)pixel)); if (!string) { return 0; } pixelrow += stride1; } break; default: /* case 4: */ for (y = 0; y < dim1; ++y) { Text_ConcatAndDel(&string, PyUnicode_FromString("\n [")); if (!string) { return 0; } pixel_p = pixelrow; for (x = 0; x < dim0 - 1; ++x) { Text_ConcatAndDel(&string, PyUnicode_FromFormat( "%ld, ", (long)*(Uint32 *)pixel_p)); if (!string) { return 0; } pixel_p += stride0; } Text_ConcatAndDel( &string, PyUnicode_FromFormat("%ld]", (long)*(Uint32 *)pixel_p)); if (string == NULL) { return NULL; } pixelrow += stride1; } break; } if (ndim == 2) { Text_ConcatAndDel(&string, PyUnicode_FromString("]\n)")); } else { Text_ConcatAndDel(&string, PyUnicode_FromString("\n)")); } return string; } static PyObject * _pxarray_subscript_internal(pgPixelArrayObject *array, Py_ssize_t xstart, Py_ssize_t xstop, Py_ssize_t xstep, Py_ssize_t ystart, Py_ssize_t ystop, Py_ssize_t ystep) { /* Special case: if xstep or ystep are zero, then the corresponding * dimension is removed. If both are zero, then a single integer * pixel value is returned. */ Py_ssize_t dim0; Py_ssize_t dim1; Py_ssize_t stride0; Py_ssize_t stride1; Uint8 *pixels; Py_ssize_t absxstep = ABS(xstep); Py_ssize_t absystep = ABS(ystep); Py_ssize_t dx = xstop - xstart; Py_ssize_t dy = ystop - ystart; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } if (!array->shape[1]) { ystart = 0; ystep = 0; } if (!(xstep || ystep)) { return _get_single_pixel(array, xstart, ystart); } if (xstep) { dim0 = (ABS(dx) + absxstep - 1) / absxstep; stride0 = array->strides[0] * xstep; } else { /* Move dimension 2 into 1 */ dim0 = (ABS(dy) + absystep - 1) / absystep; stride0 = array->strides[1] * ystep; } if (xstep && ystep) { dim1 = (ABS(dy) + absystep - 1) / absystep; stride1 = array->strides[1] * ystep; } else { /* Only a one dimensional array */ dim1 = 0; stride1 = 0; } pixels = (array->pixels + xstart * array->strides[0] + ystart * array->strides[1]); return (PyObject *)_pxarray_new_internal( &pgPixelArray_Type, 0, array, pixels, dim0, dim1, stride0, stride1); } /** * Creates a 2D slice of the array. */ static PyObject * _array_slice_internal(pgPixelArrayObject *array, Py_ssize_t start, Py_ssize_t end, Py_ssize_t step) { if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } if (end == start) { return RAISE(PyExc_IndexError, "array size must not be 0"); } if (start >= array->shape[0]) { return RAISE(PyExc_IndexError, "array index out of range"); } return _pxarray_subscript_internal(array, start, end, step, 0, array->shape[1], 1); } /**** Sequence interfaces ****/ /** * len (array) */ static Py_ssize_t _pxarray_length(pgPixelArrayObject *array) { return array->shape[0]; } /** * array[x] */ static PyObject * _pxarray_item(pgPixelArrayObject *array, Py_ssize_t index) { if (array->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } if (index < 0) { index = array->shape[0] - index; if (index < 0) { return RAISE(PyExc_IndexError, "array index out of range"); } } if (index >= array->shape[0]) { return RAISE(PyExc_IndexError, "array index out of range"); } return _pxarray_subscript_internal(array, index, 0, 0, 0, array->shape[1], 1); } static int _array_assign_array(pgPixelArrayObject *array, Py_ssize_t low, Py_ssize_t high, pgPixelArrayObject *val) { SDL_Surface *surf; Py_ssize_t dim0 = ABS(high - low); Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = high >= low ? array->strides[0] : -array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint8 *pixels = array->pixels + low * array->strides[0]; int bpp; Py_ssize_t val_dim0 = val->shape[0]; Py_ssize_t val_dim1 = val->shape[1]; Py_ssize_t val_stride0 = val->strides[0]; Py_ssize_t val_stride1 = val->strides[1]; Uint8 *val_pixels = val->pixels; SDL_Surface *val_surf; int val_bpp; Uint8 *pixelrow; Uint8 *pixel_p; Uint8 *val_pixelrow; Uint8 *val_pixel_p; Uint8 *copied_pixels = 0; Py_ssize_t x; Py_ssize_t y; int sizes_match = 0; if (array->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return -1; } surf = pgSurface_AsSurface(array->surface); val_surf = pgSurface_AsSurface(val->surface); if (!surf || !val_surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } /* Broadcast length 1 val dimensions.*/ if (val_dim0 == 1) { val_dim0 = dim0; val_stride0 = 0; } if (val_dim1 == 1) { val_dim1 = dim1; val_stride1 = 0; } if (val_dim1) { sizes_match = (dim0 == val_dim0 && dim1 == val_dim1); } else if (dim1) { sizes_match = (dim1 == val_dim0); } else { sizes_match = (dim0 == val_dim0); } if (!sizes_match) { /* Bounds do not match. */ PyErr_SetString(PyExc_ValueError, "array sizes do not match"); return -1; } bpp = surf->format->BytesPerPixel; val_bpp = val_surf->format->BytesPerPixel; if (val_bpp != bpp) { /* bpp do not match. We cannot guarantee that the padding and columns * would be set correctly. */ PyErr_SetString(PyExc_ValueError, "bit depths do not match"); return -1; } /* If we reassign the same array, we need to copy the pixels * first. */ if (SURFACE_EQUALS(array, val)) { /* We assign a different view or so. Copy the source buffer. */ size_t size = (size_t)val_surf->h * val_surf->pitch; intptr_t val_offset = val_pixels - (Uint8 *)val_surf->pixels; copied_pixels = (Uint8 *)malloc(size); if (!copied_pixels) { PyErr_NoMemory(); return -1; } val_pixels = ((Uint8 *)memcpy(copied_pixels, val_surf->pixels, size) + val_offset); } if (!dim1) { dim1 = 1; } pixelrow = pixels; val_pixelrow = val_pixels; switch (bpp) { case 1: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_pixel_p = val_pixelrow; for (x = 0; x < dim0; ++x) { *pixel_p = *val_pixel_p; pixel_p += stride0; val_pixel_p += val_stride0; } pixelrow += stride1; val_pixelrow += val_stride1; } break; case 2: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_pixel_p = val_pixelrow; for (x = 0; x < dim0; ++x) { *((Uint16 *)pixel_p) = *((Uint16 *)val_pixel_p); pixel_p += stride0; val_pixel_p += val_stride0; } pixelrow += stride1; val_pixelrow += val_stride1; } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = surf->format->Rshift >> 3; Uint32 Goffset = surf->format->Gshift >> 3; Uint32 Boffset = surf->format->Bshift >> 3; Uint32 vRoffset = val_surf->format->Rshift >> 3; Uint32 vGoffset = val_surf->format->Gshift >> 3; Uint32 vBoffset = val_surf->format->Bshift >> 3; #else Uint32 Roffset = 2 - (surf->format->Rshift >> 3); Uint32 Goffset = 2 - (surf->format->Gshift >> 3); Uint32 Boffset = 2 - (surf->format->Bshift >> 3); Uint32 vRoffset = 2 - (val_surf->format->Rshift >> 3); Uint32 vGoffset = 2 - (val_surf->format->Gshift >> 3); Uint32 vBoffset = 2 - (val_surf->format->Bshift >> 3); #endif for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_pixel_p = val_pixelrow; for (x = 0; x < dim0; ++x) { pixel_p[Roffset] = val_pixel_p[vRoffset]; pixel_p[Goffset] = val_pixel_p[vGoffset]; pixel_p[Boffset] = val_pixel_p[vBoffset]; pixel_p += stride0; val_pixel_p += val_stride0; } pixelrow += stride1; val_pixelrow += val_stride1; } } break; default: /* case 4: */ for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_pixel_p = val_pixelrow; for (x = 0; x < dim0; ++x) { *((Uint32 *)pixel_p) = *((Uint32 *)val_pixel_p); pixel_p += stride0; val_pixel_p += val_stride0; } pixelrow += stride1; val_pixelrow += val_stride1; } break; } if (copied_pixels) { free(copied_pixels); } return 0; } static int _array_assign_sequence(pgPixelArrayObject *array, Py_ssize_t low, Py_ssize_t high, PyObject *val) { SDL_Surface *surf = pgSurface_AsSurface(array->surface); SDL_PixelFormat *format; Py_ssize_t dim0 = ABS(high - low); Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = high >= low ? array->strides[0] : -array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint8 *pixels = array->pixels + low * array->strides[0]; int bpp; Py_ssize_t val_dim0 = PySequence_Size(val); Uint32 *val_colors; Uint8 *pixelrow; Uint8 *pixel_p; Uint32 *val_color_p; Py_ssize_t x; Py_ssize_t y; PyObject *item; if (val_dim0 != dim0) { PyErr_SetString(PyExc_ValueError, "sequence size mismatch"); return -1; } if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } format = surf->format; bpp = format->BytesPerPixel; if (!dim1) { dim1 = 1; } /* Copy the values. */ val_colors = malloc(sizeof(Uint32) * val_dim0); if (!val_colors) { PyErr_NoMemory(); return -1; } for (x = 0; x < val_dim0; ++x) { item = PySequence_ITEM(val, x); if (!_get_color_from_object(item, format, (val_colors + x))) { Py_DECREF(item); free(val_colors); return -1; } Py_DECREF(item); } pixelrow = pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_color_p = val_colors; for (x = 0; x < dim0; ++x) { *pixel_p = (Uint8)*val_color_p; pixel_p += stride0; ++val_color_p; } pixelrow += stride1; } break; case 2: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_color_p = val_colors; for (x = 0; x < dim0; ++x) { *((Uint16 *)pixel_p) = (Uint16)*val_color_p; pixel_p += stride0; ++val_color_p; } pixelrow += stride1; } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = surf->format->Rshift >> 3; Uint32 Goffset = surf->format->Gshift >> 3; Uint32 Boffset = surf->format->Bshift >> 3; #else Uint32 Roffset = 2 - (surf->format->Rshift >> 3); Uint32 Goffset = 2 - (surf->format->Gshift >> 3); Uint32 Boffset = 2 - (surf->format->Bshift >> 3); #endif for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_color_p = val_colors; for (x = 0; x < dim0; ++x) { pixel_p[Roffset] = (Uint8)(*val_color_p >> 16); pixel_p[Goffset] = (Uint8)(*val_color_p >> 8); pixel_p[Boffset] = (Uint8)*val_color_p; pixel_p += stride0; ++val_color_p; } pixelrow += stride1; } } break; default: /* case 4: */ for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; val_color_p = val_colors; for (x = 0; x < dim0; ++x) { *((Uint32 *)pixel_p) = *val_color_p; pixel_p += stride0; ++val_color_p; } pixelrow += stride1; } break; } Py_END_ALLOW_THREADS; free(val_colors); return 0; } static int _array_assign_slice(pgPixelArrayObject *array, Py_ssize_t low, Py_ssize_t high, Uint32 color) { SDL_Surface *surf = pgSurface_AsSurface(array->surface); Py_ssize_t dim0 = ABS(high - low); Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = high >= low ? array->strides[0] : -array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint8 *pixels = array->pixels + low * array->strides[0]; int bpp; Uint8 *pixelrow; Uint8 *pixel_p; Py_ssize_t x; Py_ssize_t y; if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } bpp = surf->format->BytesPerPixel; if (!dim1) { dim1 = 1; } pixelrow = pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: { Uint8 c = (Uint8)color; for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { *pixel_p = c; pixel_p += stride0; } pixelrow += stride1; } } break; case 2: { Uint16 c = (Uint16)color; for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { *((Uint16 *)pixel_p) = c; pixel_p += stride0; } pixelrow += stride1; } } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = surf->format->Rshift >> 3; Uint32 Goffset = surf->format->Gshift >> 3; Uint32 Boffset = surf->format->Bshift >> 3; #else Uint32 Roffset = 2 - (surf->format->Rshift >> 3); Uint32 Goffset = 2 - (surf->format->Gshift >> 3); Uint32 Boffset = 2 - (surf->format->Bshift >> 3); #endif Uint8 r = (Uint8)(color >> 16); Uint8 g = (Uint8)(color >> 8); Uint8 b = (Uint8)(color); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { pixel_p[Roffset] = r; pixel_p[Goffset] = g; pixel_p[Boffset] = b; pixel_p += stride0; } pixelrow += stride1; } } break; default: /* case 4: */ for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { *((Uint32 *)pixel_p) = color; pixel_p += stride0; } pixelrow += stride1; } break; } Py_END_ALLOW_THREADS; return 0; } /** * array[x] = ... */ static int _pxarray_ass_item(pgPixelArrayObject *array, Py_ssize_t index, PyObject *value) { SDL_Surface *surf = pgSurface_AsSurface(array->surface); Py_ssize_t y = 0; int bpp; Uint8 *pixels = array->pixels; Uint8 *pixel_p; Uint32 color = 0; Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = array->strides[0]; Py_ssize_t stride1 = array->strides[1]; if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } bpp = surf->format->BytesPerPixel; if (!_get_color_from_object(value, surf->format, &color)) { if (PyTuple_Check(value)) { return -1; } if (pgPixelArrayObject_Check(value)) { PyErr_Clear(); /* _get_color_from_object */ return _array_assign_array(array, index, index + 1, (pgPixelArrayObject *)value); } else if (PySequence_Check(value)) { pgPixelArrayObject *tmparray = 0; int retval; PyErr_Clear(); /* _get_color_from_object */ tmparray = (pgPixelArrayObject *)_pxarray_subscript_internal( array, index, 0, 0, 0, array->shape[1], 1); if (!tmparray) { return -1; } retval = _array_assign_sequence(tmparray, 0, tmparray->shape[0], value); Py_DECREF(tmparray); return retval; } else { /* Error already set by _get_color_from_object(). */ return -1; } } if (index < 0) { index += dim0; if (index < 0) { PyErr_SetString(PyExc_IndexError, "array index out of range"); return -1; } } if (index >= dim0) { PyErr_SetString(PyExc_IndexError, "array index out of range"); return -1; } pixels += index * stride0; pixel_p = pixels; if (!dim1) { dim1 = 1; } Py_BEGIN_ALLOW_THREADS; /* Single value assignment. */ switch (bpp) { case 1: for (y = 0; y < dim1; ++y) { *((Uint8 *)pixel_p) = (Uint8)color; pixel_p += stride1; } break; case 2: for (y = 0; y < dim1; ++y) { *((Uint16 *)pixel_p) = (Uint16)color; pixel_p += stride1; } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = surf->format->Rshift >> 3; Uint32 Goffset = surf->format->Gshift >> 3; Uint32 Boffset = surf->format->Bshift >> 3; #else Uint32 Roffset = 2 - (surf->format->Rshift >> 3); Uint32 Goffset = 2 - (surf->format->Gshift >> 3); Uint32 Boffset = 2 - (surf->format->Bshift >> 3); #endif for (y = 0; y < dim1; ++y) { pixel_p[Roffset] = (Uint8)(color >> 16); pixel_p[Goffset] = (Uint8)(color >> 8); pixel_p[Boffset] = (Uint8)color; pixel_p += stride1; } break; } default: /* case 4: */ for (y = 0; y < dim1; ++y) { *((Uint32 *)pixel_p) = color; pixel_p += stride1; } break; } Py_END_ALLOW_THREADS; return 0; } /** * array[x:y] = .... */ static int _pxarray_ass_slice(pgPixelArrayObject *array, Py_ssize_t low, Py_ssize_t high, PyObject *value) { SDL_Surface *surf = pgSurface_AsSurface(array->surface); Uint32 color; if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } if (low < 0) { low = 0; } else if (low > (Sint32)array->shape[0]) { low = array->shape[0]; } if (high < low) { high = low; } else if (high > (Sint32)array->shape[0]) { high = array->shape[0]; } if (pgPixelArrayObject_Check(value)) { return _array_assign_array(array, low, high, (pgPixelArrayObject *)value); } if (_get_color_from_object(value, surf->format, &color)) { return _array_assign_slice(array, low, high, color); } if (PyTuple_Check(value)) { return -1; } PyErr_Clear(); /* In case _get_color_from_object set it */ if (PySequence_Check(value)) { return _array_assign_sequence(array, low, high, value); } return 0; } /** * x in array */ static int _pxarray_contains(pgPixelArrayObject *array, PyObject *value) { SDL_Surface *surf = pgSurface_AsSurface(array->surface); Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint8 *pixels = array->pixels; int bpp; Uint32 color; Uint8 *pixelrow; Uint8 *pixel_p; Py_ssize_t x; Py_ssize_t y; int found = 0; if (!surf) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return -1; } bpp = surf->format->BytesPerPixel; if (!_get_color_from_object(value, surf->format, &color)) { return -1; } if (!dim1) { dim1 = 1; } pixelrow = pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: { Uint8 c = (Uint8)color; for (y = 0; !found && y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; !found && x < dim0; ++x) { found = *pixel_p == c ? 1 : 0; pixel_p += stride0; } pixelrow += stride1; } } break; case 2: { Uint16 c = (Uint16)color; for (y = 0; !found && y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; !found && x < dim0; ++x) { found = *((Uint16 *)pixel_p) == c ? 1 : 0; pixel_p += stride0; } pixelrow += stride1; } } break; case 3: for (y = 0; !found && y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; !found && x < dim0; ++x) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN found = (((Uint32)pixel_p[0]) + ((Uint32)pixel_p[1] << 8) + ((Uint32)pixel_p[2] << 16)) == color; #else found = (((Uint32)pixel_p[2]) + ((Uint32)pixel_p[1] << 8) + ((Uint32)pixel_p[0] << 16)) == color; #endif pixel_p += stride0; } pixelrow += stride1; } break; default: /* case 4: */ for (y = 0; !found && y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; !found && x < dim0; ++x) { found = *((Uint32 *)pixel_p) == color ? 1 : 0; pixel_p += stride0; } pixelrow += stride1; } break; } Py_END_ALLOW_THREADS; return found; } /**** Mapping interfaces ****/ /** * Internally used parser function for the 2D slices: * array[x,y], array[:,:], ... */ static int _get_subslice(PyObject *op, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step) { /* Special case: return step as 0 for an integer op. */ *start = -1; *stop = -1; *step = -1; if (PySlice_Check(op)) { Py_ssize_t slicelen; /* Operator is a slice: array[x::, */ if (Slice_GET_INDICES_EX(op, length, start, stop, step, &slicelen)) { return -1; } } else if (PyLong_Check(op)) { /* Plain index: array[x, */ *start = PyLong_AsLong(op); if (*start < 0) { *start += length; } if (*start >= length || *start < 0) { PyErr_SetString(PyExc_IndexError, "invalid index"); return -1; } *stop = (*start) + 1; *step = 0; } else if (PyLong_Check(op)) { long long val = -1; /* Plain index: array[x, */ val = PyLong_AsLong(op); if ((val < INT_MIN) || (val > INT_MAX)) { PyErr_SetString(PyExc_ValueError, "index too big for array access"); return -1; } *start = (int)val; if (*start < 0) { *start += length; } if (*start >= length || *start < 0) { PyErr_SetString(PyExc_IndexError, "invalid index"); return -1; } *stop = (*start) + 1; *step = 0; } /* No errors. */ return 0; } /** * Slicing support for 1D and 2D access. * array[x,y] is only supported for 2D arrays. */ static PyObject * _pxarray_subscript(pgPixelArrayObject *array, PyObject *op) { Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; /* Note: order matters here. * First check array[x,y], then array[x:y:z], then array[x] * Otherwise it'll fail. */ if (PyTuple_Check(op)) { PyObject *obj; Py_ssize_t size = PySequence_Size(op); Py_ssize_t xstart, xstop, xstep; Py_ssize_t ystart, ystop, ystep; if (size == 0) { /* array[,], array[()] ... */ Py_INCREF(array); return (PyObject *)array; } if (size > 2 || (size == 2 && !dim1)) { return RAISE(PyExc_IndexError, "too many indices for the array"); } obj = PyTuple_GET_ITEM(op, 0); if (obj == Py_Ellipsis || obj == Py_None) { /* Operator is the ellipsis or None * array[...,XXX], array[None,XXX] */ xstart = 0; xstop = dim0; xstep = 1; } else if (_get_subslice(obj, dim0, &xstart, &xstop, &xstep)) { /* Error on retrieving the subslice. */ return 0; } if (size == 2) { obj = PyTuple_GET_ITEM(op, 1); if (obj == Py_Ellipsis || obj == Py_None) { /* Operator is the ellipsis or None * array[XXX,...], array[XXX,None] */ ystart = 0; ystop = dim1; ystep = 1; } else if (_get_subslice(obj, dim1, &ystart, &ystop, &ystep)) { /* Error on retrieving the subslice. */ return 0; } } else { ystart = 0; ystop = dim1; ystep = 1; } /* Null value? */ if (xstart == xstop || ystart == ystop) { Py_RETURN_NONE; } return _pxarray_subscript_internal(array, xstart, xstop, xstep, ystart, ystop, ystep); } else if (op == Py_Ellipsis) { Py_INCREF(array); return (PyObject *)array; } else if (PySlice_Check(op)) { /* A slice */ Py_ssize_t slicelen; Py_ssize_t step; Py_ssize_t start; Py_ssize_t stop; if (Slice_GET_INDICES_EX(op, dim0, &start, &stop, &step, &slicelen)) { return 0; } if (slicelen < 0) { return RAISE(PyExc_IndexError, "Unable to handle negative slice"); } if (slicelen == 0) { Py_RETURN_NONE; } return _pxarray_subscript_internal(array, start, stop, step, 0, dim1, 1); } else if (PyIndex_Check(op) || PyLong_Check(op)) { Py_ssize_t i; PyObject *val = PyNumber_Index(op); if (!val) { return 0; } /* A simple index. */ i = PyNumber_AsSsize_t(val, PyExc_IndexError); Py_DECREF(val); if (i == -1 && PyErr_Occurred()) { return 0; } if (i < 0) { i += dim0; } if (i < 0 || i >= dim0) { return RAISE(PyExc_IndexError, "array index out of range"); } return _pxarray_subscript_internal(array, i, i + 1, 0, 0, dim1, 1); } return RAISE(PyExc_TypeError, "index must be an integer, sequence or slice"); } static int _pxarray_ass_subscript(pgPixelArrayObject *array, PyObject *op, PyObject *value) { /* TODO: by time we can make this faster by avoiding the creation of * temporary subarrays. */ Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; /* Note: order matters here. * First check array[x,y], then array[x:y:z], then array[x] * Otherwise it'll fail. */ if (PyTuple_Check(op)) { pgPixelArrayObject *tmparray; PyObject *obj; Py_ssize_t size = PySequence_Size(op); Py_ssize_t xstart, xstop, xstep; Py_ssize_t ystart, ystop, ystep; int retval; if (size > 2 || (size == 2 && !dim1)) { PyErr_SetString(PyExc_IndexError, "too many indices for the array"); return -1; } obj = PyTuple_GET_ITEM(op, 0); if (obj == Py_Ellipsis || obj == Py_None) { /* Operator is the ellipsis or None * array[...,XXX], array[None,XXX] */ xstart = 0; xstop = dim0; xstep = 1; } else if (_get_subslice(obj, dim0, &xstart, &xstop, &xstep)) { /* Error on retrieving the subslice. */ return -1; } if (size == 2) { obj = PyTuple_GET_ITEM(op, 1); if (obj == Py_Ellipsis || obj == Py_None) { /* Operator is the ellipsis or None * array[XXX,...], array[XXX,None] */ ystart = 0; ystop = dim1; ystep = 1; } else if (_get_subslice(obj, dim1, &ystart, &ystop, &ystep)) { /* Error on retrieving the subslice. */ return -1; } } else { ystart = 0; ystop = dim1; ystep = 1; } /* Null value? Do nothing then. */ if (xstart == xstop || ystart == ystop) { return 0; } /* Single value? */ if (ABS(xstop - xstart) == 1 && ABS(ystop - ystart) == 1) { tmparray = (pgPixelArrayObject *)_pxarray_subscript_internal( array, xstart, xstart + 1, 1, ystart, ystart + 1, 1); if (!tmparray) { return -1; } retval = _pxarray_ass_item(tmparray, 0, value); Py_DECREF(tmparray); return retval; } tmparray = (pgPixelArrayObject *)_pxarray_subscript_internal( array, xstart, xstop, xstep, ystart, ystop, ystep); if (!tmparray) { return -1; } retval = _pxarray_ass_slice(tmparray, 0, (Py_ssize_t)tmparray->shape[0], value); Py_DECREF(tmparray); return retval; } else if (op == Py_Ellipsis) { /* A slice */ pgPixelArrayObject *tmparray = (pgPixelArrayObject *)_pxarray_subscript_internal( array, 0, array->shape[0], 1, 0, array->shape[1], 1); int retval; if (!tmparray) { return -1; } retval = _pxarray_ass_slice(tmparray, 0, (Py_ssize_t)tmparray->shape[0], value); Py_DECREF(tmparray); return retval; } else if (PySlice_Check(op)) { /* A slice */ pgPixelArrayObject *tmparray; Py_ssize_t slicelen; Py_ssize_t step; Py_ssize_t start; Py_ssize_t stop; int retval; if (Slice_GET_INDICES_EX(op, array->shape[0], &start, &stop, &step, &slicelen)) { return -1; } if (slicelen < 0) { PyErr_SetString(PyExc_IndexError, "Unable to handle negative slice"); return -1; } if (slicelen == 0) { return 0; } tmparray = (pgPixelArrayObject *)_array_slice_internal(array, start, stop, step); if (!tmparray) { return -1; } retval = _pxarray_ass_slice(tmparray, 0, (Py_ssize_t)tmparray->shape[0], value); Py_DECREF(tmparray); return retval; } else if (PyIndex_Check(op) || PyLong_Check(op)) { Py_ssize_t i; PyObject *val = PyNumber_Index(op); if (!val) { return -1; } /* A simple index. */ i = PyNumber_AsSsize_t(val, PyExc_IndexError); Py_DECREF(val); if (i == -1 && PyErr_Occurred()) { return -1; } return _pxarray_ass_item(array, i, value); } PyErr_SetString(PyExc_TypeError, "index must be an integer, sequence or slice"); return -1; } /**** C API interfaces ****/ static PyObject * pgPixelArray_New(PyObject *surfobj) { SDL_Surface *surf; Py_ssize_t dim0; Py_ssize_t dim1; Py_ssize_t stride0; Py_ssize_t stride1; Uint8 *pixels; if (!pgSurface_Check(surfobj)) { return RAISE(PyExc_TypeError, "argument is not a Surface"); } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); dim0 = (Py_ssize_t)surf->w; dim1 = (Py_ssize_t)surf->h; stride0 = (Py_ssize_t)surf->format->BytesPerPixel; stride1 = (Py_ssize_t)surf->pitch; pixels = surf->pixels; if (stride0 < 1 || stride0 > 4) { return RAISE(PyExc_ValueError, "unsupported bit depth for reference array"); } return (PyObject *)_pxarray_new_internal( &pgPixelArray_Type, (pgSurfaceObject *)surfobj, 0, pixels, dim0, dim1, stride0, stride1); } MODINIT_DEFINE(pixelarray) { PyObject *module; PyObject *apiobj; static void *c_api[PYGAMEAPI_PIXELARRAY_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "pixelarray", NULL, -1, NULL, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgPixelArray_Type)) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } Py_INCREF(&pgPixelArray_Type); if (PyModule_AddObject(module, "PixelArray", (PyObject *)&pgPixelArray_Type)) { Py_DECREF((PyObject *)&pgPixelArray_Type); Py_DECREF(module); return NULL; } pgPixelArray_Type.tp_getattro = PyObject_GenericGetAttr; c_api[0] = &pgPixelArray_Type; c_api[1] = pgPixelArray_New; apiobj = encapsulate_api(c_api, "pixelarray"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/pixelarray_methods.c0000644000175100001770000010765414676242340017574 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2007-2008 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Simple weighted Euclidean distance, which tries to get near to the * human eye reception using the weights. * It receives RGB values in the range 0-255 and returns a distance * value between 0.0 and 1.0. */ #define COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) \ (sqrt(wr * (r1 - r2) * (r1 - r2) + wg * (g1 - g2) * (g1 - g2) + \ wb * (b1 - b2) * (b1 - b2)) / \ 255.0) #define WR_NTSC 0.299 #define WG_NTSC 0.587 #define WB_NTSC 0.114 /* Modified pg_RGBAFromColorObj that only accepts pygame.Color or tuple * objects. */ static int _RGBAFromColorObj(PyObject *obj, Uint8 rgba[4]) { if (PyObject_IsInstance(obj, (PyObject *)&pgColor_Type) || PyTuple_Check(obj)) { return pg_RGBAFromColorObj(obj, rgba); } PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } /** * Tries to retrieve a valid color for a Surface. */ static int _get_color_from_object(PyObject *val, SDL_PixelFormat *format, Uint32 *color) { Uint8 rgba[] = {0, 0, 0, 0}; if (!val) { return 0; } if (PyLong_Check(val)) { long intval = PyLong_AsLong(val); if (intval == -1 && PyErr_Occurred()) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } *color = (Uint32)intval; return 1; } else if (PyLong_Check(val)) { unsigned long longval = PyLong_AsUnsignedLong(val); if (PyErr_Occurred()) { PyErr_SetString(PyExc_ValueError, "invalid color argument"); return 0; } *color = (Uint32)longval; return 1; } else if (_RGBAFromColorObj(val, rgba)) { *color = (Uint32)SDL_MapRGBA(format, rgba[0], rgba[1], rgba[2], rgba[3]); return 1; } else { PyErr_SetString(PyExc_ValueError, "invalid color argument"); } return 0; } /** * Retrieves a single pixel located at index from the surface pixel * array. */ static PyObject * _get_single_pixel(pgPixelArrayObject *array, Py_ssize_t x, Py_ssize_t y) { Uint8 *pixel_p; SDL_Surface *surf; int bpp; Uint32 pixel; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } pixel_p = (array->pixels + x * array->strides[0] + y * array->strides[1]); surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); bpp = surf->format->BytesPerPixel; /* Find the start of the pixel */ switch (bpp) { case 1: pixel = (Uint32)*pixel_p; break; case 2: pixel = (Uint32) * ((Uint16 *)pixel_p); break; case 3: #if SDL_BYTEORDER == SDL_LIL_ENDIAN pixel = ((Uint32)pixel_p[0] + ((Uint32)pixel_p[1] << 8) + ((Uint32)pixel_p[2] << 16)); #else pixel = ((Uint32)pixel_p[2] + ((Uint32)pixel_p[1] << 8) + ((Uint32)pixel_p[0] << 16)); #endif break; default: /* 4 */ assert(bpp == 4); pixel = *((Uint32 *)pixel_p); } return PyLong_FromLong((long)pixel); } /** * Creates a new surface using the currently applied dimensions, step * size, etc. */ static PyObject * _make_surface(pgPixelArrayObject *array, PyObject *args) { SDL_Surface *surf; int bpp; Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1] ? array->shape[1] : 1; Py_ssize_t stride0 = array->strides[0]; Py_ssize_t stride1 = array->strides[1]; pgSurfaceObject *new_surface; SDL_Surface *temp_surf; SDL_Surface *new_surf; Py_ssize_t new_stride0; Py_ssize_t new_stride1; Uint8 *pixels = array->pixels; Uint8 *new_pixels; Py_ssize_t x; Py_ssize_t y; Uint8 *pixelrow; Uint8 *pixel_p; Uint8 *new_pixelrow; Uint8 *new_pixel_p; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); bpp = surf->format->BytesPerPixel; /* Create the second surface. */ temp_surf = SDL_CreateRGBSurface(surf->flags, (int)dim0, (int)dim1, surf->format->BitsPerPixel, surf->format->Rmask, surf->format->Gmask, surf->format->Bmask, surf->format->Amask); if (!temp_surf) { return RAISE(pgExc_SDLError, SDL_GetError()); } /* Guarantee an identical format. */ new_surf = SDL_ConvertSurface(temp_surf, surf->format, surf->flags); SDL_FreeSurface(temp_surf); if (!new_surf) { return RAISE(pgExc_SDLError, SDL_GetError()); } new_surface = pgSurface_New(new_surf); if (!new_surface) { SDL_FreeSurface(new_surf); return 0; } /* Acquire a temporary lock. */ if (SDL_MUSTLOCK(new_surf) == 0) { SDL_LockSurface(new_surf); } new_pixels = (Uint8 *)new_surf->pixels; new_stride0 = new_surf->format->BytesPerPixel; new_stride1 = new_surf->pitch; pixelrow = pixels; new_pixelrow = new_pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; new_pixel_p = new_pixelrow; for (x = 0; x < dim0; ++x) { *new_pixel_p = *pixel_p; pixel_p += stride0; new_pixel_p += new_stride0; } pixelrow += stride1; new_pixelrow += new_stride1; } break; case 2: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; new_pixel_p = new_pixelrow; for (x = 0; x < dim0; ++x) { *((Uint16 *)new_pixel_p) = *((Uint16 *)pixel_p); pixel_p += stride0; new_pixel_p += new_stride0; } pixelrow += stride1; new_pixelrow += new_stride1; } break; case 3: for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; new_pixel_p = new_pixelrow; for (x = 0; x < dim0; ++x) { memcpy(new_pixel_p, pixel_p, 3); pixel_p += stride0; new_pixel_p += new_stride0; } pixelrow += stride1; new_pixelrow += new_stride1; } break; default: /* case: 4 */ for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; new_pixel_p = new_pixelrow; for (x = 0; x < dim0; ++x) { *((Uint32 *)new_pixel_p) = *((Uint32 *)pixel_p); pixel_p += stride0; new_pixel_p += new_stride0; } pixelrow += stride1; new_pixelrow += new_stride1; } } Py_END_ALLOW_THREADS; if (SDL_MUSTLOCK(new_surf) == 0) { SDL_UnlockSurface(new_surf); } return (PyObject *)new_surface; } static int _get_weights(PyObject *weights, float *wr, float *wg, float *wb) { int success = 1; float rgb[3] = {0}; if (!weights) { *wr = (float)WR_NTSC; *wg = (float)WG_NTSC; *wb = (float)WB_NTSC; return 1; } if (!PySequence_Check(weights)) { PyErr_SetString(PyExc_TypeError, "weights must be a sequence"); success = 0; } else if (PySequence_Size(weights) < 3) { PyErr_SetString(PyExc_TypeError, "weights must contain at least 3 values"); success = 0; } else { PyObject *item; int i; for (i = 0; i < 3; ++i) { item = PySequence_GetItem(weights, i); if (!item) { success = 0; break; } if (PyNumber_Check(item)) { PyObject *num; if ((num = PyNumber_Float(item))) { rgb[i] = (float)PyFloat_AsDouble(num); Py_DECREF(num); } else if (PyErr_Clear(), (num = PyNumber_Long(item))) { rgb[i] = (float)PyLong_AsLong(num); success = rgb[i] != -1 || !PyErr_Occurred(); Py_DECREF(num); } else if (PyErr_Clear(), (num = PyNumber_Long(item))) { rgb[i] = (float)PyLong_AsLong(num); success = (!PyErr_Occurred() || !PyErr_ExceptionMatches(PyExc_OverflowError)); Py_DECREF(num); } else { PyErr_Clear(); PyErr_Format(PyExc_TypeError, "Unrecognized number type %s", Py_TYPE(item)->tp_name); success = 0; } } else { PyErr_SetString(PyExc_TypeError, "invalid weights"); success = 0; } Py_XDECREF(item); if (!success) { break; } } } if (success) { float sum = 0; *wr = rgb[0]; *wg = rgb[1]; *wb = rgb[2]; if ((*wr < 0 || *wg < 0 || *wb < 0) || (*wr == 0 && *wg == 0 && *wb == 0)) { PyErr_SetString(PyExc_ValueError, "weights must be positive and greater than 0"); return 0; } /* Build the average weight values. */ sum = *wr + *wg + *wb; *wr = *wr / sum; *wg = *wg / sum; *wb = *wb / sum; return success; } return 0; } static PyObject * _replace_color(pgPixelArrayObject *array, PyObject *args, PyObject *kwds) { PyObject *weights = 0; PyObject *delcolor = 0; PyObject *replcolor = 0; SDL_Surface *surf; SDL_PixelFormat *format; Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; Py_ssize_t stride0 = array->strides[0]; Py_ssize_t stride1 = array->strides[1]; Uint8 *pixels = array->pixels; int bpp; Uint32 dcolor; Uint32 rcolor; Uint8 r1, g1, b1, r2, g2, b2, a2; Uint8 *pixelrow; Uint8 *pixel_p; float distance = 0; float wr, wg, wb; Py_ssize_t x; Py_ssize_t y; static char *keys[] = {"color", "repcolor", "distance", "weights", NULL}; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO|fO", keys, &delcolor, &replcolor, &distance, &weights)) { return 0; } if (distance < 0 || distance > 1) { return RAISE(PyExc_ValueError, "distance must be in the range from 0.0 to 1.0"); } format = surf->format; bpp = surf->format->BytesPerPixel; if (!_get_color_from_object(delcolor, format, &dcolor) || !_get_color_from_object(replcolor, format, &rcolor)) { return 0; } if (!_get_weights(weights, &wr, &wg, &wb)) { return 0; } if (distance != 0.0) { SDL_GetRGB(dcolor, format, &r1, &g1, &b1); } if (!dim1) { dim1 = 1; } pixelrow = pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: { Uint8 *px_p; for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = pixel_p; if (distance != 0.0) { GET_PIXELVALS_1(r2, g2, b2, a2, px_p, format); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = (Uint8)rcolor; } } else if (*px_p == dcolor) { *px_p = (Uint8)rcolor; } pixel_p += stride0; } pixelrow += stride1; } } break; case 2: { Uint16 *px_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = (Uint16 *)pixel_p; if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, (Uint32)*px_p, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = (Uint16)rcolor; } } else if (*px_p == dcolor) { *px_p = (Uint16)rcolor; } pixel_p += stride0; } pixelrow += stride1; } } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = format->Rshift >> 3; Uint32 Goffset = format->Gshift >> 3; Uint32 Boffset = format->Bshift >> 3; #else Uint32 Roffset = 2 - (format->Rshift >> 3); Uint32 Goffset = 2 - (format->Gshift >> 3); Uint32 Boffset = 2 - (format->Bshift >> 3); #endif Uint32 pxcolor; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { pxcolor = (((Uint32)pixel_p[Roffset] << 16) + ((Uint32)pixel_p[Goffset] << 8) + ((Uint32)pixel_p[Boffset])); if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, pxcolor, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { pixel_p[Roffset] = (Uint8)(rcolor >> 16); pixel_p[Goffset] = (Uint8)(rcolor >> 8); pixel_p[Boffset] = (Uint8)rcolor; } } else if (pxcolor == dcolor) { pixel_p[Roffset] = (Uint8)(rcolor >> 16); pixel_p[Goffset] = (Uint8)(rcolor >> 8); pixel_p[Boffset] = (Uint8)rcolor; } pixel_p += stride0; } pixelrow += stride1; } } break; default: /* case 4: */ { Uint32 *px_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && surf->format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = (Uint32 *)pixel_p; if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, *px_p, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = rcolor; } } else if (*px_p == dcolor) { *px_p = rcolor; } pixel_p += stride0; } pixelrow += stride1; } } break; } Py_END_ALLOW_THREADS; Py_RETURN_NONE; } static PyObject * _extract_color(pgPixelArrayObject *array, PyObject *args, PyObject *kwds) { PyObject *weights = 0; PyObject *excolor = 0; int bpp; Uint32 black; Uint32 white; Uint32 color; Uint8 r1, g1, b1, r2, g2, b2, a2; Uint8 *pixelrow; Uint8 *pixel_p; float distance = 0; float wr, wg, wb; Py_ssize_t x; Py_ssize_t y; PyObject *surface; SDL_Surface *surf; SDL_PixelFormat *format; pgPixelArrayObject *new_array; Py_ssize_t dim0; Py_ssize_t dim1; Py_ssize_t stride0; Py_ssize_t stride1; Uint8 *pixels; static char *keys[] = {"color", "distance", "weights", NULL}; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|fO", keys, &excolor, &distance, &weights)) { return 0; } if (distance < 0 || distance > 1) { return RAISE(PyExc_ValueError, "distance must be in the range from 0.0 to 1.0"); } if (!_get_weights(weights, &wr, &wg, &wb)) { return 0; } /* Create the b/w mask surface. */ surface = _make_surface(array, NULL); if (!surface) { return 0; } new_array = (pgPixelArrayObject *)pgPixelArray_New(surface); Py_DECREF(surface); if (!new_array) { return 0; } surf = pgSurface_AsSurface(surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); format = surf->format; bpp = surf->format->BytesPerPixel; dim0 = new_array->shape[0]; dim1 = new_array->shape[1]; stride0 = new_array->strides[0]; stride1 = new_array->strides[1]; pixels = new_array->pixels; black = SDL_MapRGBA(format, 0, 0, 0, 255); white = SDL_MapRGBA(format, 255, 255, 255, 255); if (!_get_color_from_object(excolor, format, &color)) { Py_DECREF(new_array); return 0; } if (distance != 0.0) { SDL_GetRGB(color, format, &r1, &g1, &b1); } if (!dim1) { dim1 = 1; } pixelrow = pixels; Py_BEGIN_ALLOW_THREADS; switch (bpp) { case 1: { Uint8 *px_p; for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = pixel_p; if (distance != 0.0) { GET_PIXELVALS_1(r2, g2, b2, a2, px_p, format); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = (Uint8)white; } else { *px_p = (Uint8)black; } } else { *px_p = (Uint8)(*px_p == color ? white : black); } pixel_p += stride0; } pixelrow += stride1; } } break; case 2: { Uint16 *px_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = (Uint16 *)pixel_p; if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, (Uint32)*px_p, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = (Uint16)white; } else { *px_p = (Uint16)black; } } else { *px_p = (Uint16)(*px_p == color ? white : black); } pixel_p += stride0; } pixelrow += stride1; } } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = format->Rshift >> 3; Uint32 Goffset = format->Gshift >> 3; Uint32 Boffset = format->Bshift >> 3; #else Uint32 Roffset = 2 - (format->Rshift >> 3); Uint32 Goffset = 2 - (format->Gshift >> 3); Uint32 Boffset = 2 - (format->Bshift >> 3); #endif Uint8 white_r = (Uint8)(white >> 16); Uint8 white_g = (Uint8)(white >> 8); Uint8 white_b = (Uint8)white; Uint8 black_r = (Uint8)(black >> 16); Uint8 black_g = (Uint8)(black >> 8); Uint8 black_b = (Uint8)black; Uint32 pxcolor; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { pxcolor = (((Uint32)pixel_p[Roffset] << 16) + ((Uint32)pixel_p[Goffset] << 8) + ((Uint32)pixel_p[Boffset])); if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, pxcolor, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { pixel_p[Roffset] = white_r; pixel_p[Goffset] = white_g; pixel_p[Boffset] = white_b; } else { pixel_p[Roffset] = black_r; pixel_p[Goffset] = black_g; pixel_p[Boffset] = black_b; } } else if (pxcolor == color) { pixel_p[Roffset] = white_r; pixel_p[Goffset] = white_g; pixel_p[Boffset] = white_b; } else { pixel_p[Roffset] = black_r; pixel_p[Goffset] = black_g; pixel_p[Boffset] = black_b; } pixel_p += stride0; } pixelrow += stride1; } } break; default: /* case 4: */ { Uint32 *px_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); for (y = 0; y < dim1; ++y) { pixel_p = pixelrow; for (x = 0; x < dim0; ++x) { px_p = (Uint32 *)pixel_p; if (distance != 0.0) { GET_PIXELVALS(r2, g2, b2, a2, *px_p, format, ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *px_p = white; } else { *px_p = black; } } else { *px_p = *px_p == color ? white : black; } pixel_p += stride0; } pixelrow += stride1; } } break; } Py_END_ALLOW_THREADS; return (PyObject *)new_array; } static PyObject * _compare(pgPixelArrayObject *array, PyObject *args, PyObject *kwds) { Py_ssize_t dim0 = array->shape[0]; Py_ssize_t dim1 = array->shape[1]; SDL_Surface *surf; SDL_PixelFormat *format; pgPixelArrayObject *other_array; PyObject *weights = 0; SDL_Surface *other_surf; SDL_PixelFormat *other_format; Py_ssize_t other_stride0; Py_ssize_t other_stride1; Uint8 *other_pixels; int bpp; Uint32 black; Uint32 white; Uint8 r1, g1, b1, a1, r2, g2, b2, a2; Uint8 *row_p; Uint8 *byte_p; Uint8 *other_row_p; Uint8 *other_byte_p; float distance = 0; float wr, wg, wb; Py_ssize_t x; Py_ssize_t y; pgPixelArrayObject *new_array; PyObject *new_surface; SDL_PixelFormat *new_format; Py_ssize_t stride0; Py_ssize_t stride1; Uint8 *pixels; static char *keys[] = {"array", "distance", "weights", NULL}; if (array->surface == NULL) { return RAISE(PyExc_ValueError, "Operation on closed PixelArray."); } surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|fO", keys, &pgPixelArray_Type, &other_array, &distance, &weights)) { return 0; } if (distance < 0.0 || distance > 1.0) { return RAISE(PyExc_ValueError, "distance must be in the range from 0.0 to 1.0"); } if (!_get_weights(weights, &wr, &wg, &wb)) { return 0; } if (other_array->shape[0] != dim0 || other_array->shape[1] != dim1) { /* Bounds do not match. */ PyErr_SetString(PyExc_ValueError, "array sizes do not match"); return 0; } format = surf->format; bpp = surf->format->BytesPerPixel; other_surf = pgSurface_AsSurface(other_array->surface); if (!other_surf) return RAISE(pgExc_SDLError, "display Surface quit"); other_format = other_surf->format; if (other_format->BytesPerPixel != bpp) { /* bpp do not match. We cannot guarantee that the padding and co * would be set correctly. */ PyErr_SetString(PyExc_ValueError, "bit depths do not match"); return 0; } other_stride0 = other_array->strides[0]; other_stride1 = other_array->strides[1]; other_pixels = other_array->pixels; /* Create the b/w mask surface. */ new_surface = _make_surface(array, NULL); if (!new_surface) { return 0; } new_array = (pgPixelArrayObject *)pgPixelArray_New(new_surface); Py_DECREF(new_surface); if (!new_array) { return 0; } new_format = surf->format; stride0 = new_array->strides[0]; stride1 = new_array->strides[1]; pixels = new_array->pixels; black = SDL_MapRGBA(format, 0, 0, 0, 255); white = SDL_MapRGBA(format, 255, 255, 255, 255); Py_BEGIN_ALLOW_THREADS; if (!dim1) { dim1 = 1; } row_p = pixels; other_row_p = other_pixels; switch (bpp) { case 1: { Uint8 *pixel_p; Uint8 *other_pixel_p; for (y = 0; y < dim1; ++y) { byte_p = row_p; other_byte_p = other_row_p; for (x = 0; x < dim0; ++x) { pixel_p = byte_p; other_pixel_p = other_byte_p; if (distance != 0.0) { GET_PIXELVALS_1(r1, g1, b1, a1, pixel_p, new_format); GET_PIXELVALS_1(r2, g2, b2, a2, other_pixel_p, other_format); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *pixel_p = (Uint8)white; } else { *pixel_p = (Uint8)black; } } else { *pixel_p = (Uint8)(*pixel_p == *other_pixel_p ? white : black); } byte_p += stride0; other_byte_p += other_stride0; } row_p += stride1; other_row_p += other_stride1; } } break; case 2: { Uint16 *pixel_p; Uint16 *other_pixel_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); int other_ppa = (SDL_ISPIXELFORMAT_ALPHA(other_format->format) && other_format->Amask); for (y = 0; y < dim1; ++y) { byte_p = row_p; other_byte_p = other_row_p; for (x = 0; x < dim0; ++x) { pixel_p = (Uint16 *)byte_p; other_pixel_p = (Uint16 *)other_byte_p; if (distance != 0.0) { GET_PIXELVALS(r1, g1, b1, a1, (Uint32)*pixel_p, format, ppa); GET_PIXELVALS(r2, g2, b2, a2, (Uint32)*other_pixel_p, other_format, other_ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *pixel_p = (Uint16)white; } else { *pixel_p = (Uint16)black; } } else { *pixel_p = (Uint16)(*pixel_p == *other_pixel_p ? white : black); } byte_p += stride0; other_byte_p += other_stride0; } row_p += stride1; other_row_p += other_stride1; } } break; case 3: { #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) Uint32 Roffset = format->Rshift >> 3; Uint32 Goffset = format->Gshift >> 3; Uint32 Boffset = format->Bshift >> 3; Uint32 oRoffset = other_format->Rshift >> 3; Uint32 oGoffset = other_format->Gshift >> 3; Uint32 oBoffset = other_format->Bshift >> 3; #else Uint32 Roffset = 2 - (format->Rshift >> 3); Uint32 Goffset = 2 - (format->Gshift >> 3); Uint32 Boffset = 2 - (format->Bshift >> 3); Uint32 oRoffset = 2 - (other_format->Rshift >> 3); Uint32 oGoffset = 2 - (other_format->Gshift >> 3); Uint32 oBoffset = 2 - (other_format->Bshift >> 3); #endif Uint8 white_r = (Uint8)(white >> 16); Uint8 white_g = (Uint8)(white >> 8); Uint8 white_b = (Uint8)white; Uint8 black_r = (Uint8)(black >> 16); Uint8 black_g = (Uint8)(black >> 8); Uint8 black_b = (Uint8)black; for (y = 0; y < dim1; ++y) { byte_p = row_p; other_byte_p = other_row_p; for (x = 0; x < dim0; ++x) { r1 = byte_p[Roffset]; g1 = byte_p[Goffset]; b1 = byte_p[Boffset]; r2 = other_byte_p[oRoffset]; g2 = other_byte_p[oGoffset]; b2 = other_byte_p[oBoffset]; if (distance != 0.0) { if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { byte_p[Roffset] = white_r; byte_p[Goffset] = white_g; byte_p[Boffset] = white_b; } else { byte_p[Roffset] = black_r; byte_p[Goffset] = black_g; byte_p[Boffset] = black_b; } } else if (r1 == r2 && g1 == g2 && b1 == b2) { byte_p[Roffset] = white_r; byte_p[Goffset] = white_g; byte_p[Boffset] = white_b; } else { byte_p[Roffset] = black_r; byte_p[Goffset] = black_g; byte_p[Boffset] = black_b; } byte_p += stride0; other_byte_p += other_stride0; } row_p += stride1; other_row_p += other_stride1; } } break; default: /* case 4: */ { Uint32 *pixel_p; Uint32 *other_pixel_p; int ppa = (SDL_ISPIXELFORMAT_ALPHA(format->format) && format->Amask); int other_ppa = (SDL_ISPIXELFORMAT_ALPHA(other_format->format) && other_format->Amask); for (y = 0; y < dim1; ++y) { byte_p = row_p; other_byte_p = other_row_p; for (x = 0; x < dim0; ++x) { pixel_p = (Uint32 *)byte_p; other_pixel_p = (Uint32 *)other_byte_p; if (distance != 0.0) { GET_PIXELVALS(r1, g1, b1, a1, *pixel_p, format, ppa); GET_PIXELVALS(r2, g2, b2, a2, *other_pixel_p, other_format, other_ppa); if (COLOR_DIFF_RGB(wr, wg, wb, r1, g1, b1, r2, g2, b2) <= distance) { *pixel_p = white; } else { *pixel_p = black; } } else { *pixel_p = *pixel_p == *other_pixel_p ? white : black; } byte_p += stride0; other_byte_p += other_stride0; } row_p += stride1; other_row_p += other_stride1; } } break; } Py_END_ALLOW_THREADS; return (PyObject *)new_array; } static PyObject * _transpose(pgPixelArrayObject *array, PyObject *args) { if (array->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return NULL; } SDL_Surface *surf = pgSurface_AsSurface(array->surface); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); Py_ssize_t dim0 = array->shape[1] ? array->shape[1] : 1; Py_ssize_t dim1 = array->shape[0]; Py_ssize_t stride0; Py_ssize_t stride1 = array->strides[0]; stride0 = array->shape[1] ? array->strides[1] : array->shape[0] * surf->format->BytesPerPixel; return (PyObject *)_pxarray_new_internal(&pgPixelArray_Type, 0, array, array->pixels, dim0, dim1, stride0, stride1); } /* For cleaning up the array, and for the context manager. See: https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers */ static PyObject * _close_array(pgPixelArrayObject *array, PyObject *args) { if (array->surface == NULL) { PyErr_SetString(PyExc_ValueError, "Operation on closed PixelArray."); return NULL; } _cleanup_array(array); Py_RETURN_NONE; } static PyObject * _enter_context(pgPixelArrayObject *array, PyObject *args) { Py_INCREF(array); return (PyObject *)array; } static PyObject * _exit_context(pgPixelArrayObject *array, PyObject *args, PyObject *kwds) { _cleanup_array(array); Py_RETURN_NONE; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/pixelcopy.c0000644000175100001770000011606614676242340015702 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #include #include "palette.h" #include "pgcompat.h" #include "doc/pixelcopy_doc.h" #include typedef enum { PXC_VIEWKIND_RED, PXC_VIEWKIND_GREEN, PXC_VIEWKIND_BLUE, PXC_VIEWKIND_ALPHA, VIEWKIND_COLORKEY, VIEWKIND_RGB } _pc_view_kind_t; #if !defined(BUILD_STATIC) #include "pygame.h" static int _validate_view_format(const char *format) { int i = 0; /* Skip size/byte order prefix or item count */ switch (format[i]) { case '@': case '=': case '<': case '>': case '!': ++i; break; case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* Only allowed for fill bytes */ if (format[i + 1] == 'x') { ++i; } break; /* default: assume it is a format character */ } /* an item count of 1 is accepted */ if (format[i] == '1') { ++i; } switch (format[i]) { case 'x': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': ++i; break; /* default: unrecognized character; raise error later */ } if (format[i] != '\0') { PyErr_SetString(PyExc_ValueError, "Unsupported array item type"); return -1; } return 0; } static int _is_swapped(Py_buffer *view_p) { char ch = view_p->format[0]; #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (ch == '>' || ch == '!') { return 1; } #else if (ch == '<') { return 1; } #endif return 0; } static int _view_kind(PyObject *obj, void *view_kind_vptr) { unsigned long ch; _pc_view_kind_t *view_kind_ptr = (_pc_view_kind_t *)view_kind_vptr; if (PyUnicode_Check(obj)) { if (PyUnicode_GET_LENGTH(obj) != 1) { PyErr_SetString(PyExc_TypeError, "expected a length 1 string for argument 3"); return 0; } ch = PyUnicode_READ_CHAR(obj, 0); } else if (PyBytes_Check(obj)) { if (PyBytes_GET_SIZE(obj) != 1) { PyErr_SetString(PyExc_TypeError, "expected a length 1 string for argument 3"); return 0; } ch = *PyBytes_AS_STRING(obj); } else { PyErr_Format(PyExc_TypeError, "expected a length one string for argument 3: got '%s'", Py_TYPE(obj)->tp_name); return 0; } switch (ch) { case 'R': case 'r': *view_kind_ptr = PXC_VIEWKIND_RED; break; case 'G': case 'g': *view_kind_ptr = PXC_VIEWKIND_GREEN; break; case 'B': case 'b': *view_kind_ptr = PXC_VIEWKIND_BLUE; break; case 'A': case 'a': *view_kind_ptr = PXC_VIEWKIND_ALPHA; break; case 'C': case 'c': *view_kind_ptr = VIEWKIND_COLORKEY; break; case 'P': case 'p': *view_kind_ptr = VIEWKIND_RGB; break; default: PyErr_Format(PyExc_TypeError, "unrecognized view kind '%c' for argument 3", (int)ch); return 0; } return 1; } #endif // BUILD_STATIC typedef union { Uint32 value; Uint8 bytes[sizeof(Uint32)]; } _pc_pixel_t; static int _copy_mapped(Py_buffer *view_p, SDL_Surface *surf) { Uint8 pixelsize = surf->format->BytesPerPixel; Py_ssize_t intsize = view_p->itemsize; #if SDL_BYTEORDER == SDL_LIL_ENDIAN char *src = (char *)surf->pixels; #else char *src = (char *)surf->pixels + pixelsize - 1; #endif char *dst = (char *)view_p->buf; int w = surf->w; int h = surf->h; Py_intptr_t dx_src = surf->format->BytesPerPixel; Py_intptr_t dy_src = surf->pitch; #if SDL_BYTEORDER == SDL_LIL_ENDIAN Py_intptr_t dz_src = 1; #else Py_intptr_t dz_src = -1; #endif Py_intptr_t dx_dst = view_p->strides[0]; Py_intptr_t dy_dst = view_p->strides[1]; Py_intptr_t dz_dst = 1; Py_intptr_t x, y, z; if (view_p->shape[0] != w || view_p->shape[1] != h) { PyErr_Format(PyExc_ValueError, "Expected a (%d, %d) target: got (%d, %d)", w, h, (int)view_p->shape[0], (int)view_p->shape[1]); return -1; } if (intsize < pixelsize) { PyErr_Format(PyExc_ValueError, "Expected at least a target byte size of %d: got %d", pixelsize, intsize); return -1; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #else if (!_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #endif for (x = 0; x < w; ++x) { for (y = 0; y < h; ++y) { for (z = 0; z < pixelsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = src[dx_src * x + dy_src * y + dz_src * z]; } while (z < intsize) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; ++z; } } } return 0; } static int _copy_colorplane(Py_buffer *view_p, SDL_Surface *surf, _pc_view_kind_t view_kind, Uint8 opaque, Uint8 clear) { SDL_PixelFormat *format = surf->format; int pixelsize = surf->format->BytesPerPixel; SDL_BlendMode mode; int intsize = (int)view_p->itemsize; char *src = (char *)surf->pixels; char *dst = (char *)view_p->buf; int w = surf->w; int h = surf->h; Py_intptr_t dx_src = surf->format->BytesPerPixel; Py_intptr_t dy_src = surf->pitch; Py_intptr_t dx_dst = view_p->strides[0]; Py_intptr_t dy_dst = view_p->strides[1]; Py_intptr_t dz_dst = 1; Py_intptr_t dz_pix; Py_intptr_t x, y, z; Uint8 r, g, b, a; Uint8 *element = 0; _pc_pixel_t pixel = {0}; Uint32 colorkey; if (view_p->shape[0] != w || view_p->shape[1] != h) { PyErr_Format(PyExc_ValueError, "Expected a (%d, %d) target: got (%d, %d)", w, h, (int)view_p->shape[0], (int)view_p->shape[1]); return -1; } if (intsize < 1) { PyErr_Format(PyExc_ValueError, "Expected at least a target byte size of 1: got %d", intsize); return -1; } if (SDL_GetSurfaceBlendMode(surf, &mode) < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } /* Select appropriate color plane element within the pixel */ switch (view_kind) { case PXC_VIEWKIND_RED: element = &r; break; case PXC_VIEWKIND_GREEN: element = &g; break; case PXC_VIEWKIND_BLUE: element = &b; break; default: /* PXC_VIEWKIND_ALPHA or VIEWKIND_COLORKEY */ /* element is unused for VIEWKIND_COLORKEY */ assert(view_kind == PXC_VIEWKIND_ALPHA || view_kind == VIEWKIND_COLORKEY); element = &a; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN dz_pix = 0; if (_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #else dz_pix = (unsigned)(sizeof(Uint32) - pixelsize); if (!_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #endif if (view_kind == VIEWKIND_COLORKEY && SDL_GetColorKey(surf, &colorkey) == 0) { for (x = 0; x < w; ++x) { for (y = 0; y < h; ++y) { for (z = 0; z < pixelsize; ++z) { pixel.bytes[dz_pix + z] = src[dx_src * x + dy_src * y + z]; } dst[dx_dst * x + dy_dst * y] = pixel.value == colorkey ? clear : opaque; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } } } } else if ((view_kind != VIEWKIND_COLORKEY) && (view_kind != PXC_VIEWKIND_ALPHA || mode != SDL_BLENDMODE_NONE)) { for (x = 0; x < w; ++x) { for (y = 0; y < h; ++y) { for (z = 0; z < pixelsize; ++z) { pixel.bytes[dz_pix + z] = src[dx_src * x + dy_src * y + z]; } SDL_GetRGBA(pixel.value, format, &r, &g, &b, &a); dst[dx_dst * x + dy_dst * y] = *element; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } } } } else { for (x = 0; x < w; ++x) { for (y = 0; y < h; ++y) { dst[dx_dst * x + dy_dst * y] = opaque; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } } } } return 0; } static int _copy_unmapped(Py_buffer *view_p, SDL_Surface *surf) { SDL_PixelFormat *format = surf->format; int pixelsize = surf->format->BytesPerPixel; int intsize = (int)view_p->itemsize; char *src = (char *)surf->pixels; char *dst = (char *)view_p->buf; int w = surf->w; int h = surf->h; Py_intptr_t dx_src = surf->format->BytesPerPixel; Py_intptr_t dy_src = surf->pitch; Py_intptr_t dx_dst = view_p->strides[0]; Py_intptr_t dy_dst = view_p->strides[1]; Py_intptr_t dp_dst = view_p->strides[2]; Py_intptr_t dz_dst = 1; Py_intptr_t dz_pix; Py_intptr_t x, y, z; _pc_pixel_t pixel = {0}; Uint8 r, g, b; if (view_p->shape[0] != w || view_p->shape[1] != h || view_p->shape[2] != 3) { PyErr_Format(PyExc_ValueError, "Expected a (%d, %d, 3) target: got (%d, %d, %d)", w, h, (int)view_p->shape[0], (int)view_p->shape[1], (int)view_p->shape[2]); return -1; } if (intsize < 1) { PyErr_Format(PyExc_ValueError, "Expected at least a target byte size of 1: got %d", intsize); return -1; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN dz_pix = 0; if (_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #else dz_pix = (unsigned)(sizeof(Uint32) - pixelsize); if (!_is_swapped(view_p)) { dst += intsize - 1; dz_dst = -1; } #endif for (x = 0; x < w; ++x) { for (y = 0; y < h; ++y) { for (z = 0; z < pixelsize; ++z) { pixel.bytes[dz_pix + z] = src[dx_src * x + dy_src * y + z]; } SDL_GetRGB(pixel.value, format, &r, &g, &b); dst[dx_dst * x + dy_dst * y] = r; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } dst[dx_dst * x + dy_dst * y + dp_dst] = g; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } dst[dx_dst * x + dy_dst * y + 2 * dp_dst] = b; for (z = 1; z < intsize; ++z) { dst[dx_dst * x + dy_dst * y + dz_dst * z] = 0; } } } return 0; } /*macros used to blit arrays*/ #define COPYMACRO_2D(DST, SRC) \ for (loopy = 0; loopy < sizey; ++loopy) { \ DST *imgrow = (DST *)(((char *)surf->pixels) + loopy * surf->pitch); \ Uint8 *datarow = (Uint8 *)array_data + stridey * loopy; \ for (loopx = 0; loopx < sizex; ++loopx) \ *(imgrow + loopx) = (DST) * (SRC *)(datarow + stridex * loopx); \ } #define COPYMACRO_3D(DST, SRC) \ for (loopy = 0; loopy < sizey; ++loopy) { \ DST *pix = (DST *)(((char *)surf->pixels) + surf->pitch * loopy); \ char *data = array_data + stridey * loopy; \ for (loopx = 0; loopx < sizex; ++loopx) { \ *pix++ = (DST)((*(SRC *)(data) >> Rloss << Rshift) | \ (*(SRC *)(data + stridez) >> Gloss << Gshift) | \ (*(SRC *)(data + stridez2) >> Bloss << Bshift) | \ alpha); \ data += stridex; \ } \ } static PyObject * array_to_surface(PyObject *self, PyObject *arg) { pgSurfaceObject *surfobj; PyObject *arrayobj; pg_buffer pg_view; Py_buffer *view_p = (Py_buffer *)&pg_view; char *array_data; SDL_Surface *surf; SDL_PixelFormat *format; int loopx, loopy; Py_ssize_t stridex, stridey, stridez = 0, stridez2 = 0, sizex, sizey; int Rloss, Gloss, Bloss, Rshift, Gshift, Bshift; if (!PyArg_ParseTuple(arg, "O!O", &pgSurface_Type, &surfobj, &arrayobj)) { return NULL; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); format = surf->format; if (pgObject_GetBuffer(arrayobj, &pg_view, PyBUF_RECORDS_RO)) { return 0; } if (_validate_view_format(view_p->format)) { return 0; } if (!(view_p->ndim == 2 || (view_p->ndim == 3 && view_p->shape[2] == 3))) { return RAISE(PyExc_ValueError, "must be a valid 2d or 3d array\n"); } if (surf->format->BytesPerPixel == 0 || surf->format->BytesPerPixel > 4) return RAISE(PyExc_ValueError, "unsupported bit depth for surface"); stridex = view_p->strides[0]; stridey = view_p->strides[1]; if (view_p->ndim == 3) { stridez = view_p->strides[2]; stridez2 = stridez * 2; } else { stridez = 1; stridez2 = 2; } sizex = view_p->shape[0]; sizey = view_p->shape[1]; Rloss = format->Rloss; Gloss = format->Gloss; Bloss = format->Bloss; Rshift = format->Rshift; Gshift = format->Gshift; Bshift = format->Bshift; /* Do any required broadcasting. */ if (sizex == 1) { sizex = surf->w; stridex = 0; } if (sizey == 1) { sizey = surf->h; stridey = 0; } if (sizex != surf->w || sizey != surf->h) { pgBuffer_Release(&pg_view); return RAISE(PyExc_ValueError, "array must match surface dimensions"); } if (!pgSurface_LockBy(surfobj, arrayobj)) { pgBuffer_Release(&pg_view); return NULL; } array_data = (char *)view_p->buf; switch (surf->format->BytesPerPixel) { case 1: if (view_p->ndim == 2) { switch (view_p->itemsize) { case sizeof(Uint8): COPYMACRO_2D(Uint8, Uint8); break; case sizeof(Uint16): COPYMACRO_2D(Uint8, Uint16); break; case sizeof(Uint32): COPYMACRO_2D(Uint8, Uint32); break; case sizeof(Uint64): COPYMACRO_2D(Uint8, Uint64); break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } } else { pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } break; case 2: if (view_p->ndim == 2) { switch (view_p->itemsize) { case sizeof(Uint16): COPYMACRO_2D(Uint16, Uint16); break; case sizeof(Uint32): COPYMACRO_2D(Uint16, Uint32); break; case sizeof(Uint64): COPYMACRO_2D(Uint16, Uint64); break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } } else { Uint16 alpha = 0; if (format->Amask) { alpha = 255 >> format->Aloss << format->Ashift; } switch (view_p->itemsize) { case sizeof(Uint8): COPYMACRO_3D(Uint16, Uint8); break; case sizeof(Uint16): COPYMACRO_3D(Uint16, Uint16); break; case sizeof(Uint32): COPYMACRO_3D(Uint16, Uint32); break; case sizeof(Uint64): COPYMACRO_3D(Uint16, Uint64); break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } } break; case 3: /* Assumption: The rgb components of a 24 bit pixel are in separate bytes. */ if (view_p->itemsize >= (view_p->ndim == 2 ? 3 : 1) && view_p->itemsize <= 9) { size_t stridez_0 = 0; size_t stridez_1 = 0; size_t stridez_2 = 0; #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (view_p->ndim == 2) { stridez_1 = 1; stridez_2 = 2; } else { size_t offset = _is_swapped(view_p) ? view_p->itemsize - 1 : 0; stridez_0 = ((Rshift == 0 ? 0 : (Gshift == 0 ? stridez : stridez2)) + offset); stridez_1 = ((Rshift == 8 ? 0 : (Gshift == 8 ? stridez : stridez2)) + offset); stridez_2 = ((Rshift == 16 ? 0 : (Gshift == 16 ? stridez : stridez2)) + offset); } #else if (view_p->ndim == 2) { stridez_0 = view_p->itemsize - 3; stridez_1 = stridez_0 + 1; stridez_2 = stridez_1 + 1; } else { size_t offset = _is_swapped(view_p) ? 0 : view_p->itemsize - 1; stridez_2 = ((Rshift == 0 ? 0 : (Gshift == 0 ? stridez : stridez2)) + offset); stridez_1 = ((Rshift == 8 ? 0 : (Gshift == 8 ? stridez : stridez2)) + offset); stridez_0 = ((Rshift == 16 ? 0 : (Gshift == 16 ? stridez : stridez2)) + offset); } #endif for (loopy = 0; loopy < sizey; ++loopy) { Uint8 *pix = ((Uint8 *)surf->pixels) + surf->pitch * loopy; Uint8 *data = (Uint8 *)array_data + stridey * loopy; Uint8 *end = pix + 3 * sizex; while (pix != end) { *pix++ = *(data + stridez_0); *pix++ = *(data + stridez_1); *pix++ = *(data + stridez_2); data += stridex; } } } else { pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } break; case 4: if (view_p->ndim == 2) { switch (view_p->itemsize) { case sizeof(Uint32): COPYMACRO_2D(Uint32, Uint32); break; case sizeof(Uint64): COPYMACRO_2D(Uint32, Uint64); break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } } else { Uint32 alpha = 0; if (format->Amask) { alpha = 255 >> format->Aloss << format->Ashift; } switch (view_p->itemsize) { case sizeof(Uint8): COPYMACRO_3D(Uint32, Uint8); break; case sizeof(Uint16): COPYMACRO_3D(Uint32, Uint16); break; case sizeof(Uint32): COPYMACRO_3D(Uint32, Uint32); break; case sizeof(Uint64): COPYMACRO_3D(Uint32, Uint64); break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_ValueError, "unsupported datatype for array\n"); } } break; default: pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } return RAISE(PyExc_RuntimeError, "unsupported bit depth for image"); } pgBuffer_Release(&pg_view); if (!pgSurface_UnlockBy(surfobj, arrayobj)) { return NULL; } Py_RETURN_NONE; } static PyObject * surface_to_array(PyObject *self, PyObject *args, PyObject *kwds) { PyObject *arrayobj; pgSurfaceObject *surfobj; pg_buffer pg_view; Py_buffer *view_p = (Py_buffer *)&pg_view; _pc_view_kind_t view_kind = VIEWKIND_RGB; Uint8 opaque = 255; Uint8 clear = 0; SDL_Surface *surf; PyObject *type = NULL; PyObject *value = NULL; PyObject *traceback = NULL; char *keywords[] = {"array", "surface", "kind", "opaque", "clear", 0}; if (!PyArg_ParseTupleAndKeywords( args, kwds, "OO!|O&BB", keywords, &arrayobj, &pgSurface_Type, &surfobj, _view_kind, (void *)&view_kind, &opaque, &clear)) { return 0; } if (!pgSurface_Lock(surfobj)) { return 0; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (pgObject_GetBuffer(arrayobj, &pg_view, PyBUF_RECORDS)) { pgSurface_Unlock(surfobj); return 0; } if (_validate_view_format(view_p->format)) { pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); return 0; } if (view_p->ndim == 2) { if (view_kind == VIEWKIND_RGB) { if (_copy_mapped(view_p, surf)) { if (PyErr_Occurred()) { PyErr_Fetch(&type, &value, &traceback); PyErr_Clear(); } pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); if (type) { PyErr_Restore(type, value, traceback); } return 0; } } else { if (_copy_colorplane(view_p, surf, view_kind, opaque, clear)) { pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); return 0; } } } else if (view_p->ndim == 3) { if (view_kind != VIEWKIND_RGB) { PyErr_SetString(PyExc_ValueError, "color planes only supported for 2d targets"); pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); return 0; } if (_copy_unmapped(view_p, surf)) { pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); return 0; } } else { pgBuffer_Release(&pg_view); pgSurface_Unlock(surfobj); PyErr_Format(PyExc_ValueError, "unsupported array depth %d", (int)view_p->ndim); return 0; } pgBuffer_Release(&pg_view); if (!pgSurface_Unlock(surfobj)) { return 0; } Py_RETURN_NONE; } static PyObject * map_array(PyObject *self, PyObject *args) { #define PIXELCOPY_MAX_DIM 10 PyObject *src_array; PyObject *tar_array; pgSurfaceObject *format_surf; SDL_PixelFormat *format; pg_buffer src_pg_view; Py_buffer *src_view_p; Uint8 is_src_alloc = 0; Uint8 *src; int src_ndim; Py_intptr_t src_strides[PIXELCOPY_MAX_DIM]; const int src_red = 0; int src_green; int src_blue; pg_buffer tar_pg_view; Py_buffer *tar_view_p; Uint8 is_tar_alloc = 0; Uint8 *tar; int ndim; Py_intptr_t *shape; Py_intptr_t *tar_strides; Py_ssize_t tar_itemsize; int tar_byte0 = 0; int tar_byte1 = 0; int tar_byte2 = 0; int tar_byte3 = 0; Py_ssize_t tar_padding_start; Py_ssize_t tar_padding_end; Py_intptr_t counters[PIXELCOPY_MAX_DIM]; Py_ssize_t src_advances[PIXELCOPY_MAX_DIM] = {0}; Py_ssize_t tar_advances[PIXELCOPY_MAX_DIM] = {0}; int dim_diff; int dim; int topdim; _pc_pixel_t pixel = {0}; int pix_bytesize; Py_ssize_t i; PyObject *type = NULL; PyObject *value, *traceback; if (!PyArg_ParseTuple(args, "OOO!", &tar_array, &src_array, &pgSurface_Type, &format_surf)) { return 0; } if (!pgSurface_Lock(format_surf)) { return 0; } /* Determine array shapes and check validity */ if (pgObject_GetBuffer(tar_array, &tar_pg_view, PyBUF_RECORDS)) { if (PyErr_Occurred()) { PyErr_Fetch(&type, &value, &traceback); PyErr_Clear(); } goto fail; } is_tar_alloc = 1; tar_view_p = (Py_buffer *)&tar_pg_view; tar = (Uint8 *)tar_view_p->buf; if (_validate_view_format(tar_view_p->format)) { PyErr_SetString(PyExc_ValueError, "expected an integer target array"); goto fail; } ndim = tar_view_p->ndim; tar_itemsize = tar_view_p->itemsize; shape = tar_view_p->shape; tar_strides = tar_view_p->strides; if (ndim < 1) { PyErr_SetString(PyExc_ValueError, "target array must be at least 1D"); goto fail; } if (ndim > PIXELCOPY_MAX_DIM) { PyErr_Format(PyExc_ValueError, "target array exceeds %d dimensions", (int)PIXELCOPY_MAX_DIM); goto fail; } if (pgObject_GetBuffer(src_array, &src_pg_view, PyBUF_RECORDS_RO)) { if (PyErr_Occurred()) { PyErr_Fetch(&type, &value, &traceback); PyErr_Clear(); } goto fail; } is_src_alloc = 1; src_view_p = (Py_buffer *)&src_pg_view; if (_validate_view_format(src_view_p->format)) { goto fail; } src = (Uint8 *)src_view_p->buf; src_ndim = src_view_p->ndim; if (src_ndim < 1) { PyErr_SetString(PyExc_ValueError, "source array must be at least 1D"); goto fail; } if (src_view_p->shape[src_ndim - 1] != 3) { PyErr_Format(PyExc_ValueError, "Expected a (..., 3) source array: got (..., %zd)", src_view_p->shape[src_ndim - 1]); goto fail; } if (ndim < src_ndim - 1) { PyErr_Format(PyExc_ValueError, "%d dimensional target has too few dimensions for" " %d dimensional source", ndim, src_ndim); goto fail; } for (dim = 0; dim != ndim; ++dim) { src_strides[dim] = 0; } dim_diff = ndim - src_ndim + 1; for (dim = dim_diff; dim != ndim; ++dim) { if (src_view_p->shape[dim - dim_diff] == 1) { src_strides[dim] = 0; } else if (src_view_p->shape[dim - dim_diff] == shape[dim]) { src_strides[dim] = src_view_p->strides[dim - dim_diff]; } else { PyErr_Format(PyExc_ValueError, "size mismatch between dimension %d of source and" " dimension %d of target", dim - dim_diff, dim); goto fail; } } for (dim = 0; dim != ndim - 1; ++dim) { tar_advances[dim] = tar_strides[dim] - shape[dim + 1] * tar_strides[dim + 1]; src_advances[dim] = src_strides[dim] - shape[dim + 1] * src_strides[dim + 1]; } /* Determine source and destination pixel formats */ format = pgSurface_AsSurface(format_surf)->format; if (!format) return RAISE(pgExc_SDLError, "display Surface quit"); pix_bytesize = format->BytesPerPixel; if (tar_itemsize < pix_bytesize) { PyErr_SetString(PyExc_ValueError, "target array itemsize is too small for pixel format"); goto fail; } src_green = (int)src_view_p->strides[src_ndim - 1]; src_blue = 2 * src_green; switch (pix_bytesize) { case 1: break; #if SDL_BYTEORDER == SDL_BIG_ENDIAN case 2: if (_is_swapped(tar_view_p)) { tar_byte2 = 1; } else { tar_byte3 = 1; } break; case 3: if (_is_swapped(tar_view_p)) { tar_byte1 = 2; tar_byte2 = 1; } else { tar_byte2 = 1; tar_byte3 = 2; } break; #else case 2: if (_is_swapped(tar_view_p)) { tar_byte0 = 1; } else { tar_byte1 = 1; } break; case 3: if (_is_swapped(tar_view_p)) { tar_byte0 = 2; tar_byte1 = 1; } else { tar_byte1 = 1; tar_byte2 = 2; } break; #endif case 4: if (_is_swapped(tar_view_p)) { tar_byte0 = 3; tar_byte1 = 2; tar_byte2 = 1; } else { tar_byte1 = 1; tar_byte2 = 2; tar_byte3 = 3; } break; default: PyErr_Format(PyExc_ValueError, "%d bytes per pixel target format not supported", pix_bytesize); goto fail; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN if (_is_swapped(tar_view_p)) { tar += tar_itemsize - pix_bytesize; tar_padding_start = pix_bytesize - tar_itemsize; tar_padding_end = 0; } else { tar_padding_start = pix_bytesize; tar_padding_end = tar_itemsize; } #else if (_is_swapped(tar_view_p)) { tar_padding_start = pix_bytesize; tar_padding_end = tar_itemsize; } else { tar += tar_itemsize - pix_bytesize; tar_padding_start = pix_bytesize - tar_itemsize; tar_padding_end = 0; } #endif /* Iterate over arrays, left index varying slowest, copying pixels */ dim = 0; topdim = ndim - 1; counters[0] = shape[0]; while (counters[0]) { if (!counters[dim]) { /* Leave loop, moving left one index */ --dim; if (dim < 0) { /* Should not happen, but handle case for extra safety */ PyErr_SetString( PyExc_RuntimeError, "internal pygame error in pixelcopy map_array"); goto fail; } tar += tar_advances[dim]; src += src_advances[dim]; --counters[dim]; } else if (dim == topdim) { /* Next iteration of inner most loop: copy pixel */ pixel.value = SDL_MapRGB(format, src[src_red], src[src_green], src[src_blue]); /* Bytes are copied from the pixel in most to least significant * byte order. If destination bytes get overwritten, when the * destination size is less than 4 bytes, only zero pad bytes * of a pixel get clobbered in the destination write. */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN tar[tar_byte3] = pixel.bytes[3]; tar[tar_byte2] = pixel.bytes[2]; tar[tar_byte1] = pixel.bytes[1]; tar[tar_byte0] = pixel.bytes[0]; #else tar[tar_byte0] = pixel.bytes[0]; tar[tar_byte1] = pixel.bytes[1]; tar[tar_byte2] = pixel.bytes[2]; tar[tar_byte3] = pixel.bytes[3]; #endif for (i = tar_padding_start; i < tar_padding_end; ++i) { tar[i] = 0; } tar += tar_strides[dim]; src += src_strides[dim]; --counters[dim]; } else { /* Enter loop for next index to the right */ dim += 1; counters[dim] = shape[dim]; } } /* Cleanup */ pgBuffer_Release(&src_pg_view); pgBuffer_Release(&tar_pg_view); if (!pgSurface_Unlock(format_surf)) { return 0; } Py_RETURN_NONE; fail: if (is_src_alloc) { pgBuffer_Release(&src_pg_view); } if (is_tar_alloc) { pgBuffer_Release(&tar_pg_view); } pgSurface_Unlock(format_surf); if (type != NULL) { PyErr_Restore(type, value, traceback); } return 0; } static PyObject * make_surface(PyObject *self, PyObject *arg) { pg_buffer pg_view; Py_buffer *view_p = (Py_buffer *)&pg_view; pgSurfaceObject *surfobj; PyObject *args; PyObject *result; SDL_Surface *surf; int sizex, sizey, bitsperpixel; Uint32 rmask, gmask, bmask; if (pgObject_GetBuffer(arg, &pg_view, PyBUF_RECORDS_RO)) { return 0; } if (!(view_p->ndim == 2 || (view_p->ndim == 3 && view_p->shape[2] == 3))) { pgBuffer_Release(&pg_view); return RAISE(PyExc_ValueError, "must be a valid 2d or 3d array\n"); } if (_validate_view_format(view_p->format)) { pgBuffer_Release(&pg_view); return NULL; } if (view_p->ndim == 2) { bitsperpixel = 8; rmask = 0; gmask = 0; bmask = 0; } else { bitsperpixel = 32; rmask = 0xFF << 16; gmask = 0xFF << 8; bmask = 0xFF; } sizex = (int)view_p->shape[0]; sizey = (int)view_p->shape[1]; surf = SDL_CreateRGBSurface(0, sizex, sizey, bitsperpixel, rmask, gmask, bmask, 0); if (!surf) { pgBuffer_Release(&pg_view); return RAISE(pgExc_SDLError, SDL_GetError()); } if (SDL_ISPIXELFORMAT_INDEXED(surf->format->format)) { /* Give the surface something other than an all white palette. * */ if (SDL_SetPaletteColors(surf->format->palette, default_palette_colors, 0, default_palette_size - 1) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(surf); return 0; } } surfobj = pgSurface_New(surf); if (!surfobj) { pgBuffer_Release(&pg_view); SDL_FreeSurface(surf); return 0; } args = Py_BuildValue("(OO)", surfobj, arg); if (!args) { pgBuffer_Release(&pg_view); Py_DECREF(surfobj); return 0; } result = array_to_surface(self, args); pgBuffer_Release(&pg_view); Py_DECREF(args); if (!result) { Py_DECREF(surfobj); return 0; } Py_DECREF(result); return (PyObject *)surfobj; } static PyMethodDef _pixelcopy_methods[] = { {"array_to_surface", array_to_surface, METH_VARARGS, DOC_PYGAMEPIXELCOPYARRAYTOSURFACE}, {"surface_to_array", (PyCFunction)surface_to_array, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEPIXELCOPYSURFACETOARRAY}, {"map_array", map_array, METH_VARARGS, DOC_PYGAMEPIXELCOPYMAPARRAY}, {"make_surface", make_surface, METH_O, DOC_PYGAMEPIXELCOPYMAKESURFACE}, {0, 0, 0, 0}}; MODINIT_DEFINE(pixelcopy) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "pixelcopy", DOC_PYGAMEPIXELCOPY, -1, _pixelcopy_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/pygame.h0000644000175100001770000000207314676242340015145 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* This will use PYGAMEAPI_DEFINE_SLOTS instead * of PYGAMEAPI_EXTERN_SLOTS for base modules. */ #ifndef PYGAME_INTERNAL_H #define PYGAME_INTERNAL_H #define PYGAME_H #include "_pygame.h" #endif /* ~PYGAME_INTERNAL_H */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612187.000128 pygame-2.6.1/src_c/pypm.c0000644000175100001770000260576014676242433014664 0ustar00runnerdocker/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "pygame.pypm", "sources": [ "src_c/cython/pygame/pypm.pyx" ] }, "module_name": "pygame.pypm" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ #if defined(CYTHON_LIMITED_API) && 0 #ifndef Py_LIMITED_API #if CYTHON_LIMITED_API+0 > 0x03030000 #define Py_LIMITED_API CYTHON_LIMITED_API #else #define Py_LIMITED_API 0x03030000 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." #define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 1 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_GIL #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #if PY_VERSION_HEX < 0x030400a1 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif !defined(CYTHON_USE_TP_FINALIZE) #define CYTHON_USE_TP_FINALIZE 1 #endif #if PY_VERSION_HEX < 0x030600B1 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) #endif #if PY_VERSION_HEX < 0x030700A3 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif !defined(CYTHON_USE_EXC_INFO_STACK) #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if !defined(CYTHON_VECTORCALL) #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) #endif #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #if PY_MAJOR_VERSION < 3 #include "longintrepr.h" #endif #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif #endif #if _MSC_VER < 1300 #ifdef _WIN64 typedef unsigned long long __pyx_uintptr_t; #else typedef unsigned int __pyx_uintptr_t; #endif #else #ifdef _WIN64 typedef unsigned __int64 __pyx_uintptr_t; #else typedef unsigned __int32 __pyx_uintptr_t; #endif #endif #else #include typedef uintptr_t __pyx_uintptr_t; #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_DefaultClassType PyClass_Type #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #ifndef CO_OPTIMIZED #define CO_OPTIMIZED 0x0001 #endif #ifndef CO_NEWLOCALS #define CO_NEWLOCALS 0x0002 #endif #ifndef CO_VARARGS #define CO_VARARGS 0x0004 #endif #ifndef CO_VARKEYWORDS #define CO_VARKEYWORDS 0x0008 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x0200 #endif #ifndef CO_GENERATOR #define CO_GENERATOR 0x0020 #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x0080 #endif #elif PY_VERSION_HEX >= 0x030B0000 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); Py_DECREF(empty_bytes); return result; } #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #endif #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #elif CYTHON_BACKPORT_VECTORCALL typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames); #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_MAJOR_VERSION >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if PY_MAJOR_VERSION < 3 #if CYTHON_COMPILING_IN_PYPY #if PYPY_VERSION_NUM < 0x07030600 #if defined(__cplusplus) && __cplusplus >= 201402L [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] #elif defined(__GNUC__) || defined(__clang__) __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) #elif defined(_MSC_VER) __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) #endif static CYTHON_INLINE int PyGILState_Check(void) { return 0; } #else // PYPY_VERSION_NUM < 0x07030600 #endif // PYPY_VERSION_NUM < 0x07030600 #else static CYTHON_INLINE int PyGILState_Check(void) { PyThreadState * tstate = _PyThreadState_Current; return tstate && (tstate == PyGILState_GetThisThreadState()); } #endif #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) #else #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) #undef PyUnicode_Contains #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define __Pyx_Py3Int_Check(op) PyLong_Check(op) #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #else #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #if !defined(_USE_MATH_DEFINES) #define _USE_MATH_DEFINES #endif #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pygame__pypm #define __PYX_HAVE_API__pygame__pypm /* Early includes */ #include "portmidi.h" #include "porttime.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #include static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = (char) c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #include static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { "src_c/cython/pygame/pypm.pyx", "", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_6pygame_4pypm_Output; struct __pyx_obj_6pygame_4pypm_Input; /* "pygame/pypm.pyx":256 * * * cdef class Output: # <<<<<<<<<<<<<< * """Represents an output MIDI stream device. * */ struct __pyx_obj_6pygame_4pypm_Output { PyObject_HEAD int device; PmStream *midi; int debug; int _aborted; }; /* "pygame/pypm.pyx":525 * * * cdef class Input: # <<<<<<<<<<<<<< * """Represents an input MIDI stream device. * */ struct __pyx_obj_6pygame_4pypm_Input { PyObject_HEAD int device; PmStream *midi; int debug; }; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() #endif #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) #else #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) #endif #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else #define __Pyx_Arg_NewRef_VARARGS(arg) arg #define __Pyx_Arg_XDECREF_VARARGS(arg) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_Arg_FASTCALL(args, i) args[i] #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs to have the same reference counting */ #define __Pyx_Arg_XDECREF_FASTCALL(arg) #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) #endif #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) #else #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* PyIntCompare.proto */ static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #if !CYTHON_VECTORCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif #endif #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_LshiftObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceLshift(op1, op2) : PyNumber_Lshift(op1, op2)) #endif /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* IncludeStructmemberH.proto */ #include /* FixUpExtensionType.proto */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); #endif /* PyObjectCallNoArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* ValidateBasesTuple.proto */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetupReduce.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportDottedModule.proto */ static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); #endif /* ImportDottedModuleRelFirst.proto */ static PyObject *__Pyx_ImportDottedModuleRelFirst(PyObject *name, PyObject *parts_tuple); /* FetchSharedCythonModule.proto */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto */ #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #else static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); #endif /* PyMethodNew.proto */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); typesModule = PyImport_ImportModule("types"); if (!typesModule) return NULL; methodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); if (!methodType) return NULL; result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); Py_DECREF(methodType); return result; } #elif PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #else #define __Pyx_PyMethod_New PyMethod_New #endif /* PyVectorcallFastCallDict.proto */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_BACKPORT_VECTORCALL __pyx_vectorcallfunc func_vectorcall; #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif void *defaults; int defaults_pyobjects; size_t defaults_size; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_BACKPORT_VECTORCALL #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); #endif /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* Print.proto */ static int __Pyx_Print(PyObject*, PyObject *, int); #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmDeviceID(PmDeviceID value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntFromPy.proto */ static CYTHON_INLINE PmDeviceID __Pyx_PyInt_As_PmDeviceID(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PtTimestamp(PtTimestamp value); /* CIntFromPy.proto */ static CYTHON_INLINE PmError __Pyx_PyInt_As_PmError(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmError(PmError value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE PmTimestamp __Pyx_PyInt_As_PmTimestamp(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmMessage(PmMessage value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmTimestamp(PmTimestamp value); /* CIntFromPy.proto */ static CYTHON_INLINE PmMessage __Pyx_PyInt_As_PmMessage(PyObject *); /* PrintOne.proto */ static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #else typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* #### Code section: module_declarations ### */ /* Module declarations from "pygame.pypm" */ static long __pyx_v_6pygame_4pypm__pypm_initialized; /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "pygame.pypm" extern int __pyx_module_is_main_pygame__pypm; int __pyx_module_is_main_pygame__pypm = 0; /* Implementation of "pygame.pypm" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_TypeError; /* #### Code section: string_decls ### */ static const char __pyx_k_B[] = "B"; static const char __pyx_k__7[] = "*"; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k__47[] = "?"; static const char __pyx_k_arr[] = "arr"; static const char __pyx_k_end[] = "end"; static const char __pyx_k_err[] = "err"; static const char __pyx_k_msg[] = "msg"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_Poll[] = "Poll"; static const char __pyx_k_Read[] = "Read"; static const char __pyx_k_TRUE[] = "TRUE"; static const char __pyx_k_Time[] = "Time"; static const char __pyx_k_chan[] = "chan"; static const char __pyx_k_cmsg[] = "cmsg"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_file[] = "file"; static const char __pyx_k_info[] = "info"; static const char __pyx_k_item[] = "item"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mask[] = "mask"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_spec[] = "__spec__"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_when[] = "when"; static const char __pyx_k_0_0_6[] = "0.0.6"; static const char __pyx_k_Abort[] = "Abort"; static const char __pyx_k_Close[] = "Close"; static const char __pyx_k_FALSE[] = "FALSE"; static const char __pyx_k_Input[] = "Input"; static const char __pyx_k_Write[] = "Write"; static const char __pyx_k_array[] = "array"; static const char __pyx_k_data1[] = "data1"; static const char __pyx_k_data2[] = "data2"; static const char __pyx_k_ev_no[] = "ev_no"; static const char __pyx_k_event[] = "event"; static const char __pyx_k_i_r_s[] = "%i : %r : %s"; static const char __pyx_k_print[] = "print"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_Output[] = "Output"; static const char __pyx_k_buffer[] = "buffer"; static const char __pyx_k_enable[] = "enable"; static const char __pyx_k_events[] = "events"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_status[] = "status"; static const char __pyx_k_Channel[] = "Channel"; static const char __pyx_k_FILT_F9[] = "FILT_F9"; static const char __pyx_k_FILT_FD[] = "FILT_FD"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_filters[] = "filters"; static const char __pyx_k_latency[] = "latency"; static const char __pyx_k_tobytes[] = "tobytes"; static const char __pyx_k_version[] = "__version__"; static const char __pyx_k_FILT_MTC[] = "FILT_MTC"; static const char __pyx_k_cur_time[] = "cur_time"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_tostring[] = "tostring"; static const char __pyx_k_FILT_NOTE[] = "FILT_NOTE"; static const char __pyx_k_FILT_PLAY[] = "FILT_PLAY"; static const char __pyx_k_FILT_TICK[] = "FILT_TICK"; static const char __pyx_k_FILT_TUNE[] = "FILT_TUNE"; static const char __pyx_k_SetFilter[] = "SetFilter"; static const char __pyx_k_Terminate[] = "Terminate"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_device_no[] = "device_no"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_isenabled[] = "isenabled"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_FILT_CLOCK[] = "FILT_CLOCK"; static const char __pyx_k_FILT_RESET[] = "FILT_RESET"; static const char __pyx_k_FILT_SYSEX[] = "FILT_SYSEX"; static const char __pyx_k_IndexError[] = "IndexError"; static const char __pyx_k_Initialize[] = "Initialize"; static const char __pyx_k_Input_Poll[] = "Input.Poll"; static const char __pyx_k_Input_Read[] = "Input.Read"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_WriteShort[] = "WriteShort"; static const char __pyx_k_WriteSysEx[] = "WriteSysEx"; static const char __pyx_k_buffersize[] = "buffersize"; static const char __pyx_k_check_open[] = "_check_open"; static const char __pyx_k_max_events[] = "max_events"; static const char __pyx_k_num_events[] = "num_events"; static const char __pyx_k_FILT_ACTIVE[] = "FILT_ACTIVE"; static const char __pyx_k_Input_Close[] = "Input.Close"; static const char __pyx_k_buffer_size[] = "buffer_size"; static const char __pyx_k_pygame_pypm[] = "pygame.pypm"; static const char __pyx_k_CountDevices[] = "CountDevices"; static const char __pyx_k_FILT_CONTROL[] = "FILT_CONTROL"; static const char __pyx_k_FILT_PROGRAM[] = "FILT_PROGRAM"; static const char __pyx_k_GetErrorText[] = "GetErrorText"; static const char __pyx_k_Output_Abort[] = "Output.Abort"; static const char __pyx_k_Output_Close[] = "Output.Close"; static const char __pyx_k_Output_Write[] = "Output.Write"; static const char __pyx_k_initializing[] = "_initializing"; static const char __pyx_k_input_device[] = "input_device"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_stringsource[] = ""; static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_FILT_REALTIME[] = "FILT_REALTIME"; static const char __pyx_k_GetDeviceInfo[] = "GetDeviceInfo"; static const char __pyx_k_output_device[] = "output_device"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_FILT_PITCHBEND[] = "FILT_PITCHBEND"; static const char __pyx_k_FILT_UNDEFINED[] = "FILT_UNDEFINED"; static const char __pyx_k_SetChannelMask[] = "SetChannelMask"; static const char __pyx_k_FILT_AFTERTOUCH[] = "FILT_AFTERTOUCH"; static const char __pyx_k_Input_SetFilter[] = "Input.SetFilter"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_FILT_SONG_SELECT[] = "FILT_SONG_SELECT"; static const char __pyx_k_pypm_initialized[] = "_pypm_initialized"; static const char __pyx_k_Input__check_open[] = "Input._check_open"; static const char __pyx_k_MIDI_input_opened[] = "MIDI input opened."; static const char __pyx_k_Output_WriteShort[] = "Output.WriteShort"; static const char __pyx_k_Output_WriteSysEx[] = "Output.WriteSysEx"; static const char __pyx_k_Pm_OpenOutput_err[] = "Pm_OpenOutput err"; static const char __pyx_k_FILT_SONG_POSITION[] = "FILT_SONG_POSITION"; static const char __pyx_k_Output__check_open[] = "Output._check_open"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_Opening_Midi_Output[] = "Opening Midi Output"; static const char __pyx_k_midi_Input_not_open[] = "midi Input not open."; static const char __pyx_k_FILT_POLY_AFTERTOUCH[] = "FILT_POLY_AFTERTOUCH"; static const char __pyx_k_Input_SetChannelMask[] = "Input.SetChannelMask"; static const char __pyx_k_midi_Output_not_open[] = "midi Output not open."; static const char __pyx_k_Input___reduce_cython[] = "Input.__reduce_cython__"; static const char __pyx_k_No_data_in_event_no_i[] = "No data in event no. %i."; static const char __pyx_k_Output___reduce_cython[] = "Output.__reduce_cython__"; static const char __pyx_k_Writing_to_MIDI_buffer[] = "Writing to MIDI buffer."; static const char __pyx_k_Writing_to_midi_buffer[] = "Writing to midi buffer."; static const char __pyx_k_FILT_CHANNEL_AFTERTOUCH[] = "FILT_CHANNEL_AFTERTOUCH"; static const char __pyx_k_GetDefaultInputDeviceID[] = "GetDefaultInputDeviceID"; static const char __pyx_k_Input___setstate_cython[] = "Input.__setstate_cython__"; static const char __pyx_k_GetDefaultOutputDeviceID[] = "GetDefaultOutputDeviceID"; static const char __pyx_k_Output___setstate_cython[] = "Output.__setstate_cython__"; static const char __pyx_k_Minimum_buffer_length_is_1[] = "Minimum buffer length is 1."; static const char __pyx_k_src_c_cython_pygame_pypm_pyx[] = "src_c/cython/pygame/pypm.pyx"; static const char __pyx_k_Maximum_buffer_length_is_1024[] = "Maximum buffer length is 1024."; static const char __pyx_k_Closing_MIDI_input_stream_and_de[] = "Closing MIDI input stream and destroying instance"; static const char __pyx_k_Closing_MIDI_output_stream_and_d[] = "Closing MIDI output stream and destroying instance."; static const char __pyx_k_Maximum_event_list_length_is_102[] = "Maximum event list length is 1024."; static const char __pyx_k_Too_many_data_bytes_i_in_event_n[] = "Too many data bytes (%i) in event no. %i."; static const char __pyx_k_Unable_to_open_Midi_OutputDevice[] = "Unable to open Midi OutputDevice=%i: %s"; static const char __pyx_k_midi_Output_aborted_Need_to_call[] = "midi Output aborted. Need to call Close after Abort."; static const char __pyx_k_self_midi_cannot_be_converted_to[] = "self.midi cannot be converted to a Python object for pickling"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_6pygame_4pypm_Initialize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_2Terminate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_4GetDefaultInputDeviceID(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6GetDefaultOutputDeviceID(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_8CountDevices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_10GetDeviceInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device_no); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_12Time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_14GetErrorText(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_err); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_16Channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chan); /* proto */ static int __pyx_pf_6pygame_4pypm_6Output___init__(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_output_device, PyObject *__pyx_v_latency, PyObject *__pyx_v_buffer_size); /* proto */ static void __pyx_pf_6pygame_4pypm_6Output_2__dealloc__(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_4_check_open(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_6Close(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_8Abort(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_10Write(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_12WriteShort(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_status, PyObject *__pyx_v_data1, PyObject *__pyx_v_data2); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_14WriteSysEx(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_msg); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_6Output_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pygame_4pypm_5Input___init__(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_input_device, PyObject *__pyx_v_buffersize); /* proto */ static void __pyx_pf_6pygame_4pypm_5Input_2__dealloc__(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_4_check_open(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_6Close(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_8SetFilter(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_filters); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_10SetChannelMask(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_12Poll(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_14Read(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_max_events); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pygame_4pypm_5Input_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_6pygame_4pypm_Output(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pygame_4pypm_Input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; #ifdef __Pyx_CyFunction_USED PyTypeObject *__pyx_CyFunctionType; #endif #ifdef __Pyx_FusedFunction_USED PyTypeObject *__pyx_FusedFunctionType; #endif #ifdef __Pyx_Generator_USED PyTypeObject *__pyx_GeneratorType; #endif #ifdef __Pyx_IterableCoroutine_USED PyTypeObject *__pyx_IterableCoroutineType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineAwaitType; #endif #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_6pygame_4pypm_Output; PyObject *__pyx_type_6pygame_4pypm_Input; #endif PyTypeObject *__pyx_ptype_6pygame_4pypm_Output; PyTypeObject *__pyx_ptype_6pygame_4pypm_Input; PyObject *__pyx_kp_s_0_0_6; PyObject *__pyx_n_s_Abort; PyObject *__pyx_n_s_B; PyObject *__pyx_n_s_Channel; PyObject *__pyx_n_s_Close; PyObject *__pyx_kp_s_Closing_MIDI_input_stream_and_de; PyObject *__pyx_kp_s_Closing_MIDI_output_stream_and_d; PyObject *__pyx_n_s_CountDevices; PyObject *__pyx_n_s_FALSE; PyObject *__pyx_n_s_FILT_ACTIVE; PyObject *__pyx_n_s_FILT_AFTERTOUCH; PyObject *__pyx_n_s_FILT_CHANNEL_AFTERTOUCH; PyObject *__pyx_n_s_FILT_CLOCK; PyObject *__pyx_n_s_FILT_CONTROL; PyObject *__pyx_n_s_FILT_F9; PyObject *__pyx_n_s_FILT_FD; PyObject *__pyx_n_s_FILT_MTC; PyObject *__pyx_n_s_FILT_NOTE; PyObject *__pyx_n_s_FILT_PITCHBEND; PyObject *__pyx_n_s_FILT_PLAY; PyObject *__pyx_n_s_FILT_POLY_AFTERTOUCH; PyObject *__pyx_n_s_FILT_PROGRAM; PyObject *__pyx_n_s_FILT_REALTIME; PyObject *__pyx_n_s_FILT_RESET; PyObject *__pyx_n_s_FILT_SONG_POSITION; PyObject *__pyx_n_s_FILT_SONG_SELECT; PyObject *__pyx_n_s_FILT_SYSEX; PyObject *__pyx_n_s_FILT_TICK; PyObject *__pyx_n_s_FILT_TUNE; PyObject *__pyx_n_s_FILT_UNDEFINED; PyObject *__pyx_n_s_GetDefaultInputDeviceID; PyObject *__pyx_n_s_GetDefaultOutputDeviceID; PyObject *__pyx_n_s_GetDeviceInfo; PyObject *__pyx_n_s_GetErrorText; PyObject *__pyx_n_s_IndexError; PyObject *__pyx_n_s_Initialize; PyObject *__pyx_n_s_Input; PyObject *__pyx_n_s_Input_Close; PyObject *__pyx_n_s_Input_Poll; PyObject *__pyx_n_s_Input_Read; PyObject *__pyx_n_s_Input_SetChannelMask; PyObject *__pyx_n_s_Input_SetFilter; PyObject *__pyx_n_s_Input___reduce_cython; PyObject *__pyx_n_s_Input___setstate_cython; PyObject *__pyx_n_s_Input__check_open; PyObject *__pyx_kp_s_MIDI_input_opened; PyObject *__pyx_kp_s_Maximum_buffer_length_is_1024; PyObject *__pyx_kp_s_Maximum_event_list_length_is_102; PyObject *__pyx_kp_s_Minimum_buffer_length_is_1; PyObject *__pyx_kp_s_No_data_in_event_no_i; PyObject *__pyx_kp_s_Opening_Midi_Output; PyObject *__pyx_n_s_Output; PyObject *__pyx_n_s_Output_Abort; PyObject *__pyx_n_s_Output_Close; PyObject *__pyx_n_s_Output_Write; PyObject *__pyx_n_s_Output_WriteShort; PyObject *__pyx_n_s_Output_WriteSysEx; PyObject *__pyx_n_s_Output___reduce_cython; PyObject *__pyx_n_s_Output___setstate_cython; PyObject *__pyx_n_s_Output__check_open; PyObject *__pyx_kp_s_Pm_OpenOutput_err; PyObject *__pyx_n_s_Poll; PyObject *__pyx_n_s_Read; PyObject *__pyx_n_s_SetChannelMask; PyObject *__pyx_n_s_SetFilter; PyObject *__pyx_n_s_TRUE; PyObject *__pyx_n_s_Terminate; PyObject *__pyx_n_s_Time; PyObject *__pyx_kp_s_Too_many_data_bytes_i_in_event_n; PyObject *__pyx_n_s_TypeError; PyObject *__pyx_kp_s_Unable_to_open_Midi_OutputDevice; PyObject *__pyx_n_s_ValueError; PyObject *__pyx_n_s_Write; PyObject *__pyx_n_s_WriteShort; PyObject *__pyx_n_s_WriteSysEx; PyObject *__pyx_kp_s_Writing_to_MIDI_buffer; PyObject *__pyx_kp_s_Writing_to_midi_buffer; PyObject *__pyx_n_s__47; PyObject *__pyx_n_s__7; PyObject *__pyx_n_s_arr; PyObject *__pyx_n_s_array; PyObject *__pyx_n_s_asyncio_coroutines; PyObject *__pyx_n_s_buffer; PyObject *__pyx_n_s_buffer_size; PyObject *__pyx_n_s_buffersize; PyObject *__pyx_n_s_chan; PyObject *__pyx_n_s_check_open; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_cmsg; PyObject *__pyx_n_s_cur_time; PyObject *__pyx_n_s_data; PyObject *__pyx_n_s_data1; PyObject *__pyx_n_s_data2; PyObject *__pyx_n_s_device_no; PyObject *__pyx_kp_u_disable; PyObject *__pyx_kp_u_enable; PyObject *__pyx_n_s_end; PyObject *__pyx_n_s_enumerate; PyObject *__pyx_n_s_err; PyObject *__pyx_n_s_ev_no; PyObject *__pyx_n_s_event; PyObject *__pyx_n_s_events; PyObject *__pyx_n_s_file; PyObject *__pyx_n_s_filters; PyObject *__pyx_kp_u_gc; PyObject *__pyx_n_s_getstate; PyObject *__pyx_kp_s_i_r_s; PyObject *__pyx_n_s_import; PyObject *__pyx_n_s_info; PyObject *__pyx_n_s_initializing; PyObject *__pyx_n_s_input_device; PyObject *__pyx_n_s_is_coroutine; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_item; PyObject *__pyx_n_s_latency; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_mask; PyObject *__pyx_n_s_max_events; PyObject *__pyx_kp_s_midi_Input_not_open; PyObject *__pyx_kp_s_midi_Output_aborted_Need_to_call; PyObject *__pyx_kp_s_midi_Output_not_open; PyObject *__pyx_n_s_msg; PyObject *__pyx_n_s_name; PyObject *__pyx_n_s_num_events; PyObject *__pyx_n_s_output_device; PyObject *__pyx_n_s_print; PyObject *__pyx_n_s_pygame_pypm; PyObject *__pyx_n_s_pypm_initialized; PyObject *__pyx_n_s_pyx_state; PyObject *__pyx_n_s_range; PyObject *__pyx_n_s_reduce; PyObject *__pyx_n_s_reduce_cython; PyObject *__pyx_n_s_reduce_ex; PyObject *__pyx_n_s_self; PyObject *__pyx_kp_s_self_midi_cannot_be_converted_to; PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_spec; PyObject *__pyx_kp_s_src_c_cython_pygame_pypm_pyx; PyObject *__pyx_n_s_status; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_sys; PyObject *__pyx_n_s_test; PyObject *__pyx_n_s_tobytes; PyObject *__pyx_n_s_tostring; PyObject *__pyx_n_s_version; PyObject *__pyx_n_s_version_info; PyObject *__pyx_n_s_when; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_2; PyObject *__pyx_int_3; PyObject *__pyx_int_4; PyObject *__pyx_int_8; PyObject *__pyx_int_16; PyObject *__pyx_int_32; PyObject *__pyx_int_48; PyObject *__pyx_int_64; PyObject *__pyx_int_127; PyObject *__pyx_int_128; PyObject *__pyx_int_255; PyObject *__pyx_int_256; PyObject *__pyx_int_512; PyObject *__pyx_int_768; PyObject *__pyx_int_1024; PyObject *__pyx_int_2048; PyObject *__pyx_int_4096; PyObject *__pyx_int_8192; PyObject *__pyx_int_16384; PyObject *__pyx_int_32768; PyObject *__pyx_int_65280; PyObject *__pyx_int_65536; PyObject *__pyx_int_16711680; PyObject *__pyx_tuple_; PyObject *__pyx_tuple__2; PyObject *__pyx_tuple__3; PyObject *__pyx_tuple__4; PyObject *__pyx_tuple__5; PyObject *__pyx_tuple__6; PyObject *__pyx_tuple__8; PyObject *__pyx_tuple__14; PyObject *__pyx_tuple__17; PyObject *__pyx_tuple__19; PyObject *__pyx_tuple__21; PyObject *__pyx_tuple__23; PyObject *__pyx_tuple__26; PyObject *__pyx_tuple__28; PyObject *__pyx_tuple__30; PyObject *__pyx_tuple__31; PyObject *__pyx_tuple__34; PyObject *__pyx_tuple__38; PyObject *__pyx_tuple__40; PyObject *__pyx_tuple__43; PyObject *__pyx_codeobj__9; PyObject *__pyx_codeobj__10; PyObject *__pyx_codeobj__11; PyObject *__pyx_codeobj__12; PyObject *__pyx_codeobj__13; PyObject *__pyx_codeobj__15; PyObject *__pyx_codeobj__16; PyObject *__pyx_codeobj__18; PyObject *__pyx_codeobj__20; PyObject *__pyx_codeobj__22; PyObject *__pyx_codeobj__24; PyObject *__pyx_codeobj__25; PyObject *__pyx_codeobj__27; PyObject *__pyx_codeobj__29; PyObject *__pyx_codeobj__32; PyObject *__pyx_codeobj__33; PyObject *__pyx_codeobj__35; PyObject *__pyx_codeobj__36; PyObject *__pyx_codeobj__37; PyObject *__pyx_codeobj__39; PyObject *__pyx_codeobj__41; PyObject *__pyx_codeobj__42; PyObject *__pyx_codeobj__44; PyObject *__pyx_codeobj__45; PyObject *__pyx_codeobj__46; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) #else static __pyx_mstate __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_clear(PyObject *m) { __pyx_mstate *clear_module_state = __pyx_mstate(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_CLEAR(clear_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); #endif Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_4pypm_Output); Py_CLEAR(clear_module_state->__pyx_type_6pygame_4pypm_Output); Py_CLEAR(clear_module_state->__pyx_ptype_6pygame_4pypm_Input); Py_CLEAR(clear_module_state->__pyx_type_6pygame_4pypm_Input); Py_CLEAR(clear_module_state->__pyx_kp_s_0_0_6); Py_CLEAR(clear_module_state->__pyx_n_s_Abort); Py_CLEAR(clear_module_state->__pyx_n_s_B); Py_CLEAR(clear_module_state->__pyx_n_s_Channel); Py_CLEAR(clear_module_state->__pyx_n_s_Close); Py_CLEAR(clear_module_state->__pyx_kp_s_Closing_MIDI_input_stream_and_de); Py_CLEAR(clear_module_state->__pyx_kp_s_Closing_MIDI_output_stream_and_d); Py_CLEAR(clear_module_state->__pyx_n_s_CountDevices); Py_CLEAR(clear_module_state->__pyx_n_s_FALSE); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_ACTIVE); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_AFTERTOUCH); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_CHANNEL_AFTERTOUCH); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_CLOCK); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_CONTROL); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_F9); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_FD); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_MTC); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_NOTE); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_PITCHBEND); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_PLAY); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_POLY_AFTERTOUCH); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_PROGRAM); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_REALTIME); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_RESET); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_SONG_POSITION); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_SONG_SELECT); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_SYSEX); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_TICK); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_TUNE); Py_CLEAR(clear_module_state->__pyx_n_s_FILT_UNDEFINED); Py_CLEAR(clear_module_state->__pyx_n_s_GetDefaultInputDeviceID); Py_CLEAR(clear_module_state->__pyx_n_s_GetDefaultOutputDeviceID); Py_CLEAR(clear_module_state->__pyx_n_s_GetDeviceInfo); Py_CLEAR(clear_module_state->__pyx_n_s_GetErrorText); Py_CLEAR(clear_module_state->__pyx_n_s_IndexError); Py_CLEAR(clear_module_state->__pyx_n_s_Initialize); Py_CLEAR(clear_module_state->__pyx_n_s_Input); Py_CLEAR(clear_module_state->__pyx_n_s_Input_Close); Py_CLEAR(clear_module_state->__pyx_n_s_Input_Poll); Py_CLEAR(clear_module_state->__pyx_n_s_Input_Read); Py_CLEAR(clear_module_state->__pyx_n_s_Input_SetChannelMask); Py_CLEAR(clear_module_state->__pyx_n_s_Input_SetFilter); Py_CLEAR(clear_module_state->__pyx_n_s_Input___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Input___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Input__check_open); Py_CLEAR(clear_module_state->__pyx_kp_s_MIDI_input_opened); Py_CLEAR(clear_module_state->__pyx_kp_s_Maximum_buffer_length_is_1024); Py_CLEAR(clear_module_state->__pyx_kp_s_Maximum_event_list_length_is_102); Py_CLEAR(clear_module_state->__pyx_kp_s_Minimum_buffer_length_is_1); Py_CLEAR(clear_module_state->__pyx_kp_s_No_data_in_event_no_i); Py_CLEAR(clear_module_state->__pyx_kp_s_Opening_Midi_Output); Py_CLEAR(clear_module_state->__pyx_n_s_Output); Py_CLEAR(clear_module_state->__pyx_n_s_Output_Abort); Py_CLEAR(clear_module_state->__pyx_n_s_Output_Close); Py_CLEAR(clear_module_state->__pyx_n_s_Output_Write); Py_CLEAR(clear_module_state->__pyx_n_s_Output_WriteShort); Py_CLEAR(clear_module_state->__pyx_n_s_Output_WriteSysEx); Py_CLEAR(clear_module_state->__pyx_n_s_Output___reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Output___setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_Output__check_open); Py_CLEAR(clear_module_state->__pyx_kp_s_Pm_OpenOutput_err); Py_CLEAR(clear_module_state->__pyx_n_s_Poll); Py_CLEAR(clear_module_state->__pyx_n_s_Read); Py_CLEAR(clear_module_state->__pyx_n_s_SetChannelMask); Py_CLEAR(clear_module_state->__pyx_n_s_SetFilter); Py_CLEAR(clear_module_state->__pyx_n_s_TRUE); Py_CLEAR(clear_module_state->__pyx_n_s_Terminate); Py_CLEAR(clear_module_state->__pyx_n_s_Time); Py_CLEAR(clear_module_state->__pyx_kp_s_Too_many_data_bytes_i_in_event_n); Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_open_Midi_OutputDevice); Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); Py_CLEAR(clear_module_state->__pyx_n_s_Write); Py_CLEAR(clear_module_state->__pyx_n_s_WriteShort); Py_CLEAR(clear_module_state->__pyx_n_s_WriteSysEx); Py_CLEAR(clear_module_state->__pyx_kp_s_Writing_to_MIDI_buffer); Py_CLEAR(clear_module_state->__pyx_kp_s_Writing_to_midi_buffer); Py_CLEAR(clear_module_state->__pyx_n_s__47); Py_CLEAR(clear_module_state->__pyx_n_s__7); Py_CLEAR(clear_module_state->__pyx_n_s_arr); Py_CLEAR(clear_module_state->__pyx_n_s_array); Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); Py_CLEAR(clear_module_state->__pyx_n_s_buffer); Py_CLEAR(clear_module_state->__pyx_n_s_buffer_size); Py_CLEAR(clear_module_state->__pyx_n_s_buffersize); Py_CLEAR(clear_module_state->__pyx_n_s_chan); Py_CLEAR(clear_module_state->__pyx_n_s_check_open); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_cmsg); Py_CLEAR(clear_module_state->__pyx_n_s_cur_time); Py_CLEAR(clear_module_state->__pyx_n_s_data); Py_CLEAR(clear_module_state->__pyx_n_s_data1); Py_CLEAR(clear_module_state->__pyx_n_s_data2); Py_CLEAR(clear_module_state->__pyx_n_s_device_no); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_kp_u_enable); Py_CLEAR(clear_module_state->__pyx_n_s_end); Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); Py_CLEAR(clear_module_state->__pyx_n_s_err); Py_CLEAR(clear_module_state->__pyx_n_s_ev_no); Py_CLEAR(clear_module_state->__pyx_n_s_event); Py_CLEAR(clear_module_state->__pyx_n_s_events); Py_CLEAR(clear_module_state->__pyx_n_s_file); Py_CLEAR(clear_module_state->__pyx_n_s_filters); Py_CLEAR(clear_module_state->__pyx_kp_u_gc); Py_CLEAR(clear_module_state->__pyx_n_s_getstate); Py_CLEAR(clear_module_state->__pyx_kp_s_i_r_s); Py_CLEAR(clear_module_state->__pyx_n_s_import); Py_CLEAR(clear_module_state->__pyx_n_s_info); Py_CLEAR(clear_module_state->__pyx_n_s_initializing); Py_CLEAR(clear_module_state->__pyx_n_s_input_device); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_item); Py_CLEAR(clear_module_state->__pyx_n_s_latency); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_mask); Py_CLEAR(clear_module_state->__pyx_n_s_max_events); Py_CLEAR(clear_module_state->__pyx_kp_s_midi_Input_not_open); Py_CLEAR(clear_module_state->__pyx_kp_s_midi_Output_aborted_Need_to_call); Py_CLEAR(clear_module_state->__pyx_kp_s_midi_Output_not_open); Py_CLEAR(clear_module_state->__pyx_n_s_msg); Py_CLEAR(clear_module_state->__pyx_n_s_name); Py_CLEAR(clear_module_state->__pyx_n_s_num_events); Py_CLEAR(clear_module_state->__pyx_n_s_output_device); Py_CLEAR(clear_module_state->__pyx_n_s_print); Py_CLEAR(clear_module_state->__pyx_n_s_pygame_pypm); Py_CLEAR(clear_module_state->__pyx_n_s_pypm_initialized); Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); Py_CLEAR(clear_module_state->__pyx_n_s_range); Py_CLEAR(clear_module_state->__pyx_n_s_reduce); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); Py_CLEAR(clear_module_state->__pyx_n_s_self); Py_CLEAR(clear_module_state->__pyx_kp_s_self_midi_cannot_be_converted_to); Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_kp_s_src_c_cython_pygame_pypm_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_status); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_sys); Py_CLEAR(clear_module_state->__pyx_n_s_test); Py_CLEAR(clear_module_state->__pyx_n_s_tobytes); Py_CLEAR(clear_module_state->__pyx_n_s_tostring); Py_CLEAR(clear_module_state->__pyx_n_s_version); Py_CLEAR(clear_module_state->__pyx_n_s_version_info); Py_CLEAR(clear_module_state->__pyx_n_s_when); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_2); Py_CLEAR(clear_module_state->__pyx_int_3); Py_CLEAR(clear_module_state->__pyx_int_4); Py_CLEAR(clear_module_state->__pyx_int_8); Py_CLEAR(clear_module_state->__pyx_int_16); Py_CLEAR(clear_module_state->__pyx_int_32); Py_CLEAR(clear_module_state->__pyx_int_48); Py_CLEAR(clear_module_state->__pyx_int_64); Py_CLEAR(clear_module_state->__pyx_int_127); Py_CLEAR(clear_module_state->__pyx_int_128); Py_CLEAR(clear_module_state->__pyx_int_255); Py_CLEAR(clear_module_state->__pyx_int_256); Py_CLEAR(clear_module_state->__pyx_int_512); Py_CLEAR(clear_module_state->__pyx_int_768); Py_CLEAR(clear_module_state->__pyx_int_1024); Py_CLEAR(clear_module_state->__pyx_int_2048); Py_CLEAR(clear_module_state->__pyx_int_4096); Py_CLEAR(clear_module_state->__pyx_int_8192); Py_CLEAR(clear_module_state->__pyx_int_16384); Py_CLEAR(clear_module_state->__pyx_int_32768); Py_CLEAR(clear_module_state->__pyx_int_65280); Py_CLEAR(clear_module_state->__pyx_int_65536); Py_CLEAR(clear_module_state->__pyx_int_16711680); Py_CLEAR(clear_module_state->__pyx_tuple_); Py_CLEAR(clear_module_state->__pyx_tuple__2); Py_CLEAR(clear_module_state->__pyx_tuple__3); Py_CLEAR(clear_module_state->__pyx_tuple__4); Py_CLEAR(clear_module_state->__pyx_tuple__5); Py_CLEAR(clear_module_state->__pyx_tuple__6); Py_CLEAR(clear_module_state->__pyx_tuple__8); Py_CLEAR(clear_module_state->__pyx_tuple__14); Py_CLEAR(clear_module_state->__pyx_tuple__17); Py_CLEAR(clear_module_state->__pyx_tuple__19); Py_CLEAR(clear_module_state->__pyx_tuple__21); Py_CLEAR(clear_module_state->__pyx_tuple__23); Py_CLEAR(clear_module_state->__pyx_tuple__26); Py_CLEAR(clear_module_state->__pyx_tuple__28); Py_CLEAR(clear_module_state->__pyx_tuple__30); Py_CLEAR(clear_module_state->__pyx_tuple__31); Py_CLEAR(clear_module_state->__pyx_tuple__34); Py_CLEAR(clear_module_state->__pyx_tuple__38); Py_CLEAR(clear_module_state->__pyx_tuple__40); Py_CLEAR(clear_module_state->__pyx_tuple__43); Py_CLEAR(clear_module_state->__pyx_codeobj__9); Py_CLEAR(clear_module_state->__pyx_codeobj__10); Py_CLEAR(clear_module_state->__pyx_codeobj__11); Py_CLEAR(clear_module_state->__pyx_codeobj__12); Py_CLEAR(clear_module_state->__pyx_codeobj__13); Py_CLEAR(clear_module_state->__pyx_codeobj__15); Py_CLEAR(clear_module_state->__pyx_codeobj__16); Py_CLEAR(clear_module_state->__pyx_codeobj__18); Py_CLEAR(clear_module_state->__pyx_codeobj__20); Py_CLEAR(clear_module_state->__pyx_codeobj__22); Py_CLEAR(clear_module_state->__pyx_codeobj__24); Py_CLEAR(clear_module_state->__pyx_codeobj__25); Py_CLEAR(clear_module_state->__pyx_codeobj__27); Py_CLEAR(clear_module_state->__pyx_codeobj__29); Py_CLEAR(clear_module_state->__pyx_codeobj__32); Py_CLEAR(clear_module_state->__pyx_codeobj__33); Py_CLEAR(clear_module_state->__pyx_codeobj__35); Py_CLEAR(clear_module_state->__pyx_codeobj__36); Py_CLEAR(clear_module_state->__pyx_codeobj__37); Py_CLEAR(clear_module_state->__pyx_codeobj__39); Py_CLEAR(clear_module_state->__pyx_codeobj__41); Py_CLEAR(clear_module_state->__pyx_codeobj__42); Py_CLEAR(clear_module_state->__pyx_codeobj__44); Py_CLEAR(clear_module_state->__pyx_codeobj__45); Py_CLEAR(clear_module_state->__pyx_codeobj__46); return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstate *traverse_module_state = __pyx_mstate(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); Py_VISIT(traverse_module_state->__pyx_empty_tuple); Py_VISIT(traverse_module_state->__pyx_empty_bytes); Py_VISIT(traverse_module_state->__pyx_empty_unicode); #ifdef __Pyx_CyFunction_USED Py_VISIT(traverse_module_state->__pyx_CyFunctionType); #endif #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_4pypm_Output); Py_VISIT(traverse_module_state->__pyx_type_6pygame_4pypm_Output); Py_VISIT(traverse_module_state->__pyx_ptype_6pygame_4pypm_Input); Py_VISIT(traverse_module_state->__pyx_type_6pygame_4pypm_Input); Py_VISIT(traverse_module_state->__pyx_kp_s_0_0_6); Py_VISIT(traverse_module_state->__pyx_n_s_Abort); Py_VISIT(traverse_module_state->__pyx_n_s_B); Py_VISIT(traverse_module_state->__pyx_n_s_Channel); Py_VISIT(traverse_module_state->__pyx_n_s_Close); Py_VISIT(traverse_module_state->__pyx_kp_s_Closing_MIDI_input_stream_and_de); Py_VISIT(traverse_module_state->__pyx_kp_s_Closing_MIDI_output_stream_and_d); Py_VISIT(traverse_module_state->__pyx_n_s_CountDevices); Py_VISIT(traverse_module_state->__pyx_n_s_FALSE); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_ACTIVE); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_AFTERTOUCH); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_CHANNEL_AFTERTOUCH); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_CLOCK); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_CONTROL); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_F9); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_FD); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_MTC); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_NOTE); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_PITCHBEND); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_PLAY); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_POLY_AFTERTOUCH); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_PROGRAM); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_REALTIME); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_RESET); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_SONG_POSITION); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_SONG_SELECT); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_SYSEX); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_TICK); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_TUNE); Py_VISIT(traverse_module_state->__pyx_n_s_FILT_UNDEFINED); Py_VISIT(traverse_module_state->__pyx_n_s_GetDefaultInputDeviceID); Py_VISIT(traverse_module_state->__pyx_n_s_GetDefaultOutputDeviceID); Py_VISIT(traverse_module_state->__pyx_n_s_GetDeviceInfo); Py_VISIT(traverse_module_state->__pyx_n_s_GetErrorText); Py_VISIT(traverse_module_state->__pyx_n_s_IndexError); Py_VISIT(traverse_module_state->__pyx_n_s_Initialize); Py_VISIT(traverse_module_state->__pyx_n_s_Input); Py_VISIT(traverse_module_state->__pyx_n_s_Input_Close); Py_VISIT(traverse_module_state->__pyx_n_s_Input_Poll); Py_VISIT(traverse_module_state->__pyx_n_s_Input_Read); Py_VISIT(traverse_module_state->__pyx_n_s_Input_SetChannelMask); Py_VISIT(traverse_module_state->__pyx_n_s_Input_SetFilter); Py_VISIT(traverse_module_state->__pyx_n_s_Input___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Input___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Input__check_open); Py_VISIT(traverse_module_state->__pyx_kp_s_MIDI_input_opened); Py_VISIT(traverse_module_state->__pyx_kp_s_Maximum_buffer_length_is_1024); Py_VISIT(traverse_module_state->__pyx_kp_s_Maximum_event_list_length_is_102); Py_VISIT(traverse_module_state->__pyx_kp_s_Minimum_buffer_length_is_1); Py_VISIT(traverse_module_state->__pyx_kp_s_No_data_in_event_no_i); Py_VISIT(traverse_module_state->__pyx_kp_s_Opening_Midi_Output); Py_VISIT(traverse_module_state->__pyx_n_s_Output); Py_VISIT(traverse_module_state->__pyx_n_s_Output_Abort); Py_VISIT(traverse_module_state->__pyx_n_s_Output_Close); Py_VISIT(traverse_module_state->__pyx_n_s_Output_Write); Py_VISIT(traverse_module_state->__pyx_n_s_Output_WriteShort); Py_VISIT(traverse_module_state->__pyx_n_s_Output_WriteSysEx); Py_VISIT(traverse_module_state->__pyx_n_s_Output___reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Output___setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_Output__check_open); Py_VISIT(traverse_module_state->__pyx_kp_s_Pm_OpenOutput_err); Py_VISIT(traverse_module_state->__pyx_n_s_Poll); Py_VISIT(traverse_module_state->__pyx_n_s_Read); Py_VISIT(traverse_module_state->__pyx_n_s_SetChannelMask); Py_VISIT(traverse_module_state->__pyx_n_s_SetFilter); Py_VISIT(traverse_module_state->__pyx_n_s_TRUE); Py_VISIT(traverse_module_state->__pyx_n_s_Terminate); Py_VISIT(traverse_module_state->__pyx_n_s_Time); Py_VISIT(traverse_module_state->__pyx_kp_s_Too_many_data_bytes_i_in_event_n); Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_open_Midi_OutputDevice); Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); Py_VISIT(traverse_module_state->__pyx_n_s_Write); Py_VISIT(traverse_module_state->__pyx_n_s_WriteShort); Py_VISIT(traverse_module_state->__pyx_n_s_WriteSysEx); Py_VISIT(traverse_module_state->__pyx_kp_s_Writing_to_MIDI_buffer); Py_VISIT(traverse_module_state->__pyx_kp_s_Writing_to_midi_buffer); Py_VISIT(traverse_module_state->__pyx_n_s__47); Py_VISIT(traverse_module_state->__pyx_n_s__7); Py_VISIT(traverse_module_state->__pyx_n_s_arr); Py_VISIT(traverse_module_state->__pyx_n_s_array); Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); Py_VISIT(traverse_module_state->__pyx_n_s_buffer); Py_VISIT(traverse_module_state->__pyx_n_s_buffer_size); Py_VISIT(traverse_module_state->__pyx_n_s_buffersize); Py_VISIT(traverse_module_state->__pyx_n_s_chan); Py_VISIT(traverse_module_state->__pyx_n_s_check_open); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_cmsg); Py_VISIT(traverse_module_state->__pyx_n_s_cur_time); Py_VISIT(traverse_module_state->__pyx_n_s_data); Py_VISIT(traverse_module_state->__pyx_n_s_data1); Py_VISIT(traverse_module_state->__pyx_n_s_data2); Py_VISIT(traverse_module_state->__pyx_n_s_device_no); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_kp_u_enable); Py_VISIT(traverse_module_state->__pyx_n_s_end); Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); Py_VISIT(traverse_module_state->__pyx_n_s_err); Py_VISIT(traverse_module_state->__pyx_n_s_ev_no); Py_VISIT(traverse_module_state->__pyx_n_s_event); Py_VISIT(traverse_module_state->__pyx_n_s_events); Py_VISIT(traverse_module_state->__pyx_n_s_file); Py_VISIT(traverse_module_state->__pyx_n_s_filters); Py_VISIT(traverse_module_state->__pyx_kp_u_gc); Py_VISIT(traverse_module_state->__pyx_n_s_getstate); Py_VISIT(traverse_module_state->__pyx_kp_s_i_r_s); Py_VISIT(traverse_module_state->__pyx_n_s_import); Py_VISIT(traverse_module_state->__pyx_n_s_info); Py_VISIT(traverse_module_state->__pyx_n_s_initializing); Py_VISIT(traverse_module_state->__pyx_n_s_input_device); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_item); Py_VISIT(traverse_module_state->__pyx_n_s_latency); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_mask); Py_VISIT(traverse_module_state->__pyx_n_s_max_events); Py_VISIT(traverse_module_state->__pyx_kp_s_midi_Input_not_open); Py_VISIT(traverse_module_state->__pyx_kp_s_midi_Output_aborted_Need_to_call); Py_VISIT(traverse_module_state->__pyx_kp_s_midi_Output_not_open); Py_VISIT(traverse_module_state->__pyx_n_s_msg); Py_VISIT(traverse_module_state->__pyx_n_s_name); Py_VISIT(traverse_module_state->__pyx_n_s_num_events); Py_VISIT(traverse_module_state->__pyx_n_s_output_device); Py_VISIT(traverse_module_state->__pyx_n_s_print); Py_VISIT(traverse_module_state->__pyx_n_s_pygame_pypm); Py_VISIT(traverse_module_state->__pyx_n_s_pypm_initialized); Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); Py_VISIT(traverse_module_state->__pyx_n_s_range); Py_VISIT(traverse_module_state->__pyx_n_s_reduce); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); Py_VISIT(traverse_module_state->__pyx_n_s_self); Py_VISIT(traverse_module_state->__pyx_kp_s_self_midi_cannot_be_converted_to); Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_kp_s_src_c_cython_pygame_pypm_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_status); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_sys); Py_VISIT(traverse_module_state->__pyx_n_s_test); Py_VISIT(traverse_module_state->__pyx_n_s_tobytes); Py_VISIT(traverse_module_state->__pyx_n_s_tostring); Py_VISIT(traverse_module_state->__pyx_n_s_version); Py_VISIT(traverse_module_state->__pyx_n_s_version_info); Py_VISIT(traverse_module_state->__pyx_n_s_when); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_2); Py_VISIT(traverse_module_state->__pyx_int_3); Py_VISIT(traverse_module_state->__pyx_int_4); Py_VISIT(traverse_module_state->__pyx_int_8); Py_VISIT(traverse_module_state->__pyx_int_16); Py_VISIT(traverse_module_state->__pyx_int_32); Py_VISIT(traverse_module_state->__pyx_int_48); Py_VISIT(traverse_module_state->__pyx_int_64); Py_VISIT(traverse_module_state->__pyx_int_127); Py_VISIT(traverse_module_state->__pyx_int_128); Py_VISIT(traverse_module_state->__pyx_int_255); Py_VISIT(traverse_module_state->__pyx_int_256); Py_VISIT(traverse_module_state->__pyx_int_512); Py_VISIT(traverse_module_state->__pyx_int_768); Py_VISIT(traverse_module_state->__pyx_int_1024); Py_VISIT(traverse_module_state->__pyx_int_2048); Py_VISIT(traverse_module_state->__pyx_int_4096); Py_VISIT(traverse_module_state->__pyx_int_8192); Py_VISIT(traverse_module_state->__pyx_int_16384); Py_VISIT(traverse_module_state->__pyx_int_32768); Py_VISIT(traverse_module_state->__pyx_int_65280); Py_VISIT(traverse_module_state->__pyx_int_65536); Py_VISIT(traverse_module_state->__pyx_int_16711680); Py_VISIT(traverse_module_state->__pyx_tuple_); Py_VISIT(traverse_module_state->__pyx_tuple__2); Py_VISIT(traverse_module_state->__pyx_tuple__3); Py_VISIT(traverse_module_state->__pyx_tuple__4); Py_VISIT(traverse_module_state->__pyx_tuple__5); Py_VISIT(traverse_module_state->__pyx_tuple__6); Py_VISIT(traverse_module_state->__pyx_tuple__8); Py_VISIT(traverse_module_state->__pyx_tuple__14); Py_VISIT(traverse_module_state->__pyx_tuple__17); Py_VISIT(traverse_module_state->__pyx_tuple__19); Py_VISIT(traverse_module_state->__pyx_tuple__21); Py_VISIT(traverse_module_state->__pyx_tuple__23); Py_VISIT(traverse_module_state->__pyx_tuple__26); Py_VISIT(traverse_module_state->__pyx_tuple__28); Py_VISIT(traverse_module_state->__pyx_tuple__30); Py_VISIT(traverse_module_state->__pyx_tuple__31); Py_VISIT(traverse_module_state->__pyx_tuple__34); Py_VISIT(traverse_module_state->__pyx_tuple__38); Py_VISIT(traverse_module_state->__pyx_tuple__40); Py_VISIT(traverse_module_state->__pyx_tuple__43); Py_VISIT(traverse_module_state->__pyx_codeobj__9); Py_VISIT(traverse_module_state->__pyx_codeobj__10); Py_VISIT(traverse_module_state->__pyx_codeobj__11); Py_VISIT(traverse_module_state->__pyx_codeobj__12); Py_VISIT(traverse_module_state->__pyx_codeobj__13); Py_VISIT(traverse_module_state->__pyx_codeobj__15); Py_VISIT(traverse_module_state->__pyx_codeobj__16); Py_VISIT(traverse_module_state->__pyx_codeobj__18); Py_VISIT(traverse_module_state->__pyx_codeobj__20); Py_VISIT(traverse_module_state->__pyx_codeobj__22); Py_VISIT(traverse_module_state->__pyx_codeobj__24); Py_VISIT(traverse_module_state->__pyx_codeobj__25); Py_VISIT(traverse_module_state->__pyx_codeobj__27); Py_VISIT(traverse_module_state->__pyx_codeobj__29); Py_VISIT(traverse_module_state->__pyx_codeobj__32); Py_VISIT(traverse_module_state->__pyx_codeobj__33); Py_VISIT(traverse_module_state->__pyx_codeobj__35); Py_VISIT(traverse_module_state->__pyx_codeobj__36); Py_VISIT(traverse_module_state->__pyx_codeobj__37); Py_VISIT(traverse_module_state->__pyx_codeobj__39); Py_VISIT(traverse_module_state->__pyx_codeobj__41); Py_VISIT(traverse_module_state->__pyx_codeobj__42); Py_VISIT(traverse_module_state->__pyx_codeobj__44); Py_VISIT(traverse_module_state->__pyx_codeobj__45); Py_VISIT(traverse_module_state->__pyx_codeobj__46); return 0; } #endif /* #### Code section: module_state_defines ### */ #define __pyx_d __pyx_mstate_global->__pyx_d #define __pyx_b __pyx_mstate_global->__pyx_b #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode #ifdef __Pyx_CyFunction_USED #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType #endif #ifdef __Pyx_FusedFunction_USED #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType #endif #ifdef __Pyx_Generator_USED #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType #endif #ifdef __Pyx_IterableCoroutine_USED #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType #endif #ifdef __Pyx_Coroutine_USED #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType #endif #if CYTHON_USE_MODULE_STATE #define __pyx_type_6pygame_4pypm_Output __pyx_mstate_global->__pyx_type_6pygame_4pypm_Output #define __pyx_type_6pygame_4pypm_Input __pyx_mstate_global->__pyx_type_6pygame_4pypm_Input #endif #define __pyx_ptype_6pygame_4pypm_Output __pyx_mstate_global->__pyx_ptype_6pygame_4pypm_Output #define __pyx_ptype_6pygame_4pypm_Input __pyx_mstate_global->__pyx_ptype_6pygame_4pypm_Input #define __pyx_kp_s_0_0_6 __pyx_mstate_global->__pyx_kp_s_0_0_6 #define __pyx_n_s_Abort __pyx_mstate_global->__pyx_n_s_Abort #define __pyx_n_s_B __pyx_mstate_global->__pyx_n_s_B #define __pyx_n_s_Channel __pyx_mstate_global->__pyx_n_s_Channel #define __pyx_n_s_Close __pyx_mstate_global->__pyx_n_s_Close #define __pyx_kp_s_Closing_MIDI_input_stream_and_de __pyx_mstate_global->__pyx_kp_s_Closing_MIDI_input_stream_and_de #define __pyx_kp_s_Closing_MIDI_output_stream_and_d __pyx_mstate_global->__pyx_kp_s_Closing_MIDI_output_stream_and_d #define __pyx_n_s_CountDevices __pyx_mstate_global->__pyx_n_s_CountDevices #define __pyx_n_s_FALSE __pyx_mstate_global->__pyx_n_s_FALSE #define __pyx_n_s_FILT_ACTIVE __pyx_mstate_global->__pyx_n_s_FILT_ACTIVE #define __pyx_n_s_FILT_AFTERTOUCH __pyx_mstate_global->__pyx_n_s_FILT_AFTERTOUCH #define __pyx_n_s_FILT_CHANNEL_AFTERTOUCH __pyx_mstate_global->__pyx_n_s_FILT_CHANNEL_AFTERTOUCH #define __pyx_n_s_FILT_CLOCK __pyx_mstate_global->__pyx_n_s_FILT_CLOCK #define __pyx_n_s_FILT_CONTROL __pyx_mstate_global->__pyx_n_s_FILT_CONTROL #define __pyx_n_s_FILT_F9 __pyx_mstate_global->__pyx_n_s_FILT_F9 #define __pyx_n_s_FILT_FD __pyx_mstate_global->__pyx_n_s_FILT_FD #define __pyx_n_s_FILT_MTC __pyx_mstate_global->__pyx_n_s_FILT_MTC #define __pyx_n_s_FILT_NOTE __pyx_mstate_global->__pyx_n_s_FILT_NOTE #define __pyx_n_s_FILT_PITCHBEND __pyx_mstate_global->__pyx_n_s_FILT_PITCHBEND #define __pyx_n_s_FILT_PLAY __pyx_mstate_global->__pyx_n_s_FILT_PLAY #define __pyx_n_s_FILT_POLY_AFTERTOUCH __pyx_mstate_global->__pyx_n_s_FILT_POLY_AFTERTOUCH #define __pyx_n_s_FILT_PROGRAM __pyx_mstate_global->__pyx_n_s_FILT_PROGRAM #define __pyx_n_s_FILT_REALTIME __pyx_mstate_global->__pyx_n_s_FILT_REALTIME #define __pyx_n_s_FILT_RESET __pyx_mstate_global->__pyx_n_s_FILT_RESET #define __pyx_n_s_FILT_SONG_POSITION __pyx_mstate_global->__pyx_n_s_FILT_SONG_POSITION #define __pyx_n_s_FILT_SONG_SELECT __pyx_mstate_global->__pyx_n_s_FILT_SONG_SELECT #define __pyx_n_s_FILT_SYSEX __pyx_mstate_global->__pyx_n_s_FILT_SYSEX #define __pyx_n_s_FILT_TICK __pyx_mstate_global->__pyx_n_s_FILT_TICK #define __pyx_n_s_FILT_TUNE __pyx_mstate_global->__pyx_n_s_FILT_TUNE #define __pyx_n_s_FILT_UNDEFINED __pyx_mstate_global->__pyx_n_s_FILT_UNDEFINED #define __pyx_n_s_GetDefaultInputDeviceID __pyx_mstate_global->__pyx_n_s_GetDefaultInputDeviceID #define __pyx_n_s_GetDefaultOutputDeviceID __pyx_mstate_global->__pyx_n_s_GetDefaultOutputDeviceID #define __pyx_n_s_GetDeviceInfo __pyx_mstate_global->__pyx_n_s_GetDeviceInfo #define __pyx_n_s_GetErrorText __pyx_mstate_global->__pyx_n_s_GetErrorText #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError #define __pyx_n_s_Initialize __pyx_mstate_global->__pyx_n_s_Initialize #define __pyx_n_s_Input __pyx_mstate_global->__pyx_n_s_Input #define __pyx_n_s_Input_Close __pyx_mstate_global->__pyx_n_s_Input_Close #define __pyx_n_s_Input_Poll __pyx_mstate_global->__pyx_n_s_Input_Poll #define __pyx_n_s_Input_Read __pyx_mstate_global->__pyx_n_s_Input_Read #define __pyx_n_s_Input_SetChannelMask __pyx_mstate_global->__pyx_n_s_Input_SetChannelMask #define __pyx_n_s_Input_SetFilter __pyx_mstate_global->__pyx_n_s_Input_SetFilter #define __pyx_n_s_Input___reduce_cython __pyx_mstate_global->__pyx_n_s_Input___reduce_cython #define __pyx_n_s_Input___setstate_cython __pyx_mstate_global->__pyx_n_s_Input___setstate_cython #define __pyx_n_s_Input__check_open __pyx_mstate_global->__pyx_n_s_Input__check_open #define __pyx_kp_s_MIDI_input_opened __pyx_mstate_global->__pyx_kp_s_MIDI_input_opened #define __pyx_kp_s_Maximum_buffer_length_is_1024 __pyx_mstate_global->__pyx_kp_s_Maximum_buffer_length_is_1024 #define __pyx_kp_s_Maximum_event_list_length_is_102 __pyx_mstate_global->__pyx_kp_s_Maximum_event_list_length_is_102 #define __pyx_kp_s_Minimum_buffer_length_is_1 __pyx_mstate_global->__pyx_kp_s_Minimum_buffer_length_is_1 #define __pyx_kp_s_No_data_in_event_no_i __pyx_mstate_global->__pyx_kp_s_No_data_in_event_no_i #define __pyx_kp_s_Opening_Midi_Output __pyx_mstate_global->__pyx_kp_s_Opening_Midi_Output #define __pyx_n_s_Output __pyx_mstate_global->__pyx_n_s_Output #define __pyx_n_s_Output_Abort __pyx_mstate_global->__pyx_n_s_Output_Abort #define __pyx_n_s_Output_Close __pyx_mstate_global->__pyx_n_s_Output_Close #define __pyx_n_s_Output_Write __pyx_mstate_global->__pyx_n_s_Output_Write #define __pyx_n_s_Output_WriteShort __pyx_mstate_global->__pyx_n_s_Output_WriteShort #define __pyx_n_s_Output_WriteSysEx __pyx_mstate_global->__pyx_n_s_Output_WriteSysEx #define __pyx_n_s_Output___reduce_cython __pyx_mstate_global->__pyx_n_s_Output___reduce_cython #define __pyx_n_s_Output___setstate_cython __pyx_mstate_global->__pyx_n_s_Output___setstate_cython #define __pyx_n_s_Output__check_open __pyx_mstate_global->__pyx_n_s_Output__check_open #define __pyx_kp_s_Pm_OpenOutput_err __pyx_mstate_global->__pyx_kp_s_Pm_OpenOutput_err #define __pyx_n_s_Poll __pyx_mstate_global->__pyx_n_s_Poll #define __pyx_n_s_Read __pyx_mstate_global->__pyx_n_s_Read #define __pyx_n_s_SetChannelMask __pyx_mstate_global->__pyx_n_s_SetChannelMask #define __pyx_n_s_SetFilter __pyx_mstate_global->__pyx_n_s_SetFilter #define __pyx_n_s_TRUE __pyx_mstate_global->__pyx_n_s_TRUE #define __pyx_n_s_Terminate __pyx_mstate_global->__pyx_n_s_Terminate #define __pyx_n_s_Time __pyx_mstate_global->__pyx_n_s_Time #define __pyx_kp_s_Too_many_data_bytes_i_in_event_n __pyx_mstate_global->__pyx_kp_s_Too_many_data_bytes_i_in_event_n #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError #define __pyx_kp_s_Unable_to_open_Midi_OutputDevice __pyx_mstate_global->__pyx_kp_s_Unable_to_open_Midi_OutputDevice #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError #define __pyx_n_s_Write __pyx_mstate_global->__pyx_n_s_Write #define __pyx_n_s_WriteShort __pyx_mstate_global->__pyx_n_s_WriteShort #define __pyx_n_s_WriteSysEx __pyx_mstate_global->__pyx_n_s_WriteSysEx #define __pyx_kp_s_Writing_to_MIDI_buffer __pyx_mstate_global->__pyx_kp_s_Writing_to_MIDI_buffer #define __pyx_kp_s_Writing_to_midi_buffer __pyx_mstate_global->__pyx_kp_s_Writing_to_midi_buffer #define __pyx_n_s__47 __pyx_mstate_global->__pyx_n_s__47 #define __pyx_n_s__7 __pyx_mstate_global->__pyx_n_s__7 #define __pyx_n_s_arr __pyx_mstate_global->__pyx_n_s_arr #define __pyx_n_s_array __pyx_mstate_global->__pyx_n_s_array #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines #define __pyx_n_s_buffer __pyx_mstate_global->__pyx_n_s_buffer #define __pyx_n_s_buffer_size __pyx_mstate_global->__pyx_n_s_buffer_size #define __pyx_n_s_buffersize __pyx_mstate_global->__pyx_n_s_buffersize #define __pyx_n_s_chan __pyx_mstate_global->__pyx_n_s_chan #define __pyx_n_s_check_open __pyx_mstate_global->__pyx_n_s_check_open #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_cmsg __pyx_mstate_global->__pyx_n_s_cmsg #define __pyx_n_s_cur_time __pyx_mstate_global->__pyx_n_s_cur_time #define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data #define __pyx_n_s_data1 __pyx_mstate_global->__pyx_n_s_data1 #define __pyx_n_s_data2 __pyx_mstate_global->__pyx_n_s_data2 #define __pyx_n_s_device_no __pyx_mstate_global->__pyx_n_s_device_no #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate #define __pyx_n_s_err __pyx_mstate_global->__pyx_n_s_err #define __pyx_n_s_ev_no __pyx_mstate_global->__pyx_n_s_ev_no #define __pyx_n_s_event __pyx_mstate_global->__pyx_n_s_event #define __pyx_n_s_events __pyx_mstate_global->__pyx_n_s_events #define __pyx_n_s_file __pyx_mstate_global->__pyx_n_s_file #define __pyx_n_s_filters __pyx_mstate_global->__pyx_n_s_filters #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate #define __pyx_kp_s_i_r_s __pyx_mstate_global->__pyx_kp_s_i_r_s #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing #define __pyx_n_s_input_device __pyx_mstate_global->__pyx_n_s_input_device #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item #define __pyx_n_s_latency __pyx_mstate_global->__pyx_n_s_latency #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_mask __pyx_mstate_global->__pyx_n_s_mask #define __pyx_n_s_max_events __pyx_mstate_global->__pyx_n_s_max_events #define __pyx_kp_s_midi_Input_not_open __pyx_mstate_global->__pyx_kp_s_midi_Input_not_open #define __pyx_kp_s_midi_Output_aborted_Need_to_call __pyx_mstate_global->__pyx_kp_s_midi_Output_aborted_Need_to_call #define __pyx_kp_s_midi_Output_not_open __pyx_mstate_global->__pyx_kp_s_midi_Output_not_open #define __pyx_n_s_msg __pyx_mstate_global->__pyx_n_s_msg #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name #define __pyx_n_s_num_events __pyx_mstate_global->__pyx_n_s_num_events #define __pyx_n_s_output_device __pyx_mstate_global->__pyx_n_s_output_device #define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print #define __pyx_n_s_pygame_pypm __pyx_mstate_global->__pyx_n_s_pygame_pypm #define __pyx_n_s_pypm_initialized __pyx_mstate_global->__pyx_n_s_pypm_initialized #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self #define __pyx_kp_s_self_midi_cannot_be_converted_to __pyx_mstate_global->__pyx_kp_s_self_midi_cannot_be_converted_to #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_kp_s_src_c_cython_pygame_pypm_pyx __pyx_mstate_global->__pyx_kp_s_src_c_cython_pygame_pypm_pyx #define __pyx_n_s_status __pyx_mstate_global->__pyx_n_s_status #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test #define __pyx_n_s_tobytes __pyx_mstate_global->__pyx_n_s_tobytes #define __pyx_n_s_tostring __pyx_mstate_global->__pyx_n_s_tostring #define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info #define __pyx_n_s_when __pyx_mstate_global->__pyx_n_s_when #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4 #define __pyx_int_8 __pyx_mstate_global->__pyx_int_8 #define __pyx_int_16 __pyx_mstate_global->__pyx_int_16 #define __pyx_int_32 __pyx_mstate_global->__pyx_int_32 #define __pyx_int_48 __pyx_mstate_global->__pyx_int_48 #define __pyx_int_64 __pyx_mstate_global->__pyx_int_64 #define __pyx_int_127 __pyx_mstate_global->__pyx_int_127 #define __pyx_int_128 __pyx_mstate_global->__pyx_int_128 #define __pyx_int_255 __pyx_mstate_global->__pyx_int_255 #define __pyx_int_256 __pyx_mstate_global->__pyx_int_256 #define __pyx_int_512 __pyx_mstate_global->__pyx_int_512 #define __pyx_int_768 __pyx_mstate_global->__pyx_int_768 #define __pyx_int_1024 __pyx_mstate_global->__pyx_int_1024 #define __pyx_int_2048 __pyx_mstate_global->__pyx_int_2048 #define __pyx_int_4096 __pyx_mstate_global->__pyx_int_4096 #define __pyx_int_8192 __pyx_mstate_global->__pyx_int_8192 #define __pyx_int_16384 __pyx_mstate_global->__pyx_int_16384 #define __pyx_int_32768 __pyx_mstate_global->__pyx_int_32768 #define __pyx_int_65280 __pyx_mstate_global->__pyx_int_65280 #define __pyx_int_65536 __pyx_mstate_global->__pyx_int_65536 #define __pyx_int_16711680 __pyx_mstate_global->__pyx_int_16711680 #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ #define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2 #define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3 #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4 #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5 #define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19 #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 #define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 #define __pyx_codeobj__9 __pyx_mstate_global->__pyx_codeobj__9 #define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 #define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18 #define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20 #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22 #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 /* #### Code section: module_code ### */ /* "pygame/pypm.pyx":154 * cdef long _pypm_initialized * * def Initialize(): # <<<<<<<<<<<<<< * """Initialize PortMidi library. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_1Initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_Initialize, "Initialize PortMidi library.\n\n This function must be called once before any other function or class from\n this module can be used.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_1Initialize = {"Initialize", (PyCFunction)__pyx_pw_6pygame_4pypm_1Initialize, METH_NOARGS, __pyx_doc_6pygame_4pypm_Initialize}; static PyObject *__pyx_pw_6pygame_4pypm_1Initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Initialize (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_Initialize(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_Initialize(CYTHON_UNUSED PyObject *__pyx_self) { CYTHON_UNUSED long __pyx_v__pypm_initialized; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Initialize", 1); /* "pygame/pypm.pyx":161 * * """ * Pm_Initialize() # <<<<<<<<<<<<<< * # equiv to TIME_START: start timer w/ ms accuracy * Pt_Start(1, NULL, NULL) */ (void)(Pm_Initialize()); /* "pygame/pypm.pyx":163 * Pm_Initialize() * # equiv to TIME_START: start timer w/ ms accuracy * Pt_Start(1, NULL, NULL) # <<<<<<<<<<<<<< * _pypm_initialized = 1 * */ (void)(Pt_Start(1, NULL, NULL)); /* "pygame/pypm.pyx":164 * # equiv to TIME_START: start timer w/ ms accuracy * Pt_Start(1, NULL, NULL) * _pypm_initialized = 1 # <<<<<<<<<<<<<< * * def Terminate(): */ __pyx_v__pypm_initialized = 1; /* "pygame/pypm.pyx":154 * cdef long _pypm_initialized * * def Initialize(): # <<<<<<<<<<<<<< * """Initialize PortMidi library. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":166 * _pypm_initialized = 1 * * def Terminate(): # <<<<<<<<<<<<<< * """Terminate use of PortMidi library. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_3Terminate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_2Terminate, "Terminate use of PortMidi library.\n\n Call this to clean up Midi streams when done.\n\n If you do not call this on Windows machines when you are done with MIDI,\n your system may crash.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_3Terminate = {"Terminate", (PyCFunction)__pyx_pw_6pygame_4pypm_3Terminate, METH_NOARGS, __pyx_doc_6pygame_4pypm_2Terminate}; static PyObject *__pyx_pw_6pygame_4pypm_3Terminate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Terminate (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_2Terminate(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_2Terminate(CYTHON_UNUSED PyObject *__pyx_self) { CYTHON_UNUSED long __pyx_v__pypm_initialized; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Terminate", 1); /* "pygame/pypm.pyx":175 * * """ * Pm_Terminate() # <<<<<<<<<<<<<< * _pypm_initialized = 0 * */ (void)(Pm_Terminate()); /* "pygame/pypm.pyx":176 * """ * Pm_Terminate() * _pypm_initialized = 0 # <<<<<<<<<<<<<< * * */ __pyx_v__pypm_initialized = 0; /* "pygame/pypm.pyx":166 * _pypm_initialized = 1 * * def Terminate(): # <<<<<<<<<<<<<< * """Terminate use of PortMidi library. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":179 * * * def GetDefaultInputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI input device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5GetDefaultInputDeviceID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_4GetDefaultInputDeviceID, "Return the number of the default MIDI input device.\n\n See the PortMidi documentation on how the default device is set and\n determined.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5GetDefaultInputDeviceID = {"GetDefaultInputDeviceID", (PyCFunction)__pyx_pw_6pygame_4pypm_5GetDefaultInputDeviceID, METH_NOARGS, __pyx_doc_6pygame_4pypm_4GetDefaultInputDeviceID}; static PyObject *__pyx_pw_6pygame_4pypm_5GetDefaultInputDeviceID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("GetDefaultInputDeviceID (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_4GetDefaultInputDeviceID(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_4GetDefaultInputDeviceID(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetDefaultInputDeviceID", 1); /* "pygame/pypm.pyx":186 * * """ * return Pm_GetDefaultInputDeviceID() # <<<<<<<<<<<<<< * * def GetDefaultOutputDeviceID(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PmDeviceID(Pm_GetDefaultInputDeviceID()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":179 * * * def GetDefaultInputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI input device. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame.pypm.GetDefaultInputDeviceID", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":188 * return Pm_GetDefaultInputDeviceID() * * def GetDefaultOutputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI output device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_7GetDefaultOutputDeviceID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6GetDefaultOutputDeviceID, "Return the number of the default MIDI output device.\n\n See the PortMidi documentation on how the default device is set and\n determined.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_7GetDefaultOutputDeviceID = {"GetDefaultOutputDeviceID", (PyCFunction)__pyx_pw_6pygame_4pypm_7GetDefaultOutputDeviceID, METH_NOARGS, __pyx_doc_6pygame_4pypm_6GetDefaultOutputDeviceID}; static PyObject *__pyx_pw_6pygame_4pypm_7GetDefaultOutputDeviceID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("GetDefaultOutputDeviceID (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_6GetDefaultOutputDeviceID(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6GetDefaultOutputDeviceID(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetDefaultOutputDeviceID", 1); /* "pygame/pypm.pyx":195 * * """ * return Pm_GetDefaultOutputDeviceID() # <<<<<<<<<<<<<< * * def CountDevices(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PmDeviceID(Pm_GetDefaultOutputDeviceID()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":188 * return Pm_GetDefaultInputDeviceID() * * def GetDefaultOutputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI output device. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame.pypm.GetDefaultOutputDeviceID", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":197 * return Pm_GetDefaultOutputDeviceID() * * def CountDevices(): # <<<<<<<<<<<<<< * """Return number of available MIDI (input and output) devices.""" * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_9CountDevices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_8CountDevices, "Return number of available MIDI (input and output) devices."); static PyMethodDef __pyx_mdef_6pygame_4pypm_9CountDevices = {"CountDevices", (PyCFunction)__pyx_pw_6pygame_4pypm_9CountDevices, METH_NOARGS, __pyx_doc_6pygame_4pypm_8CountDevices}; static PyObject *__pyx_pw_6pygame_4pypm_9CountDevices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("CountDevices (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_8CountDevices(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_8CountDevices(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("CountDevices", 1); /* "pygame/pypm.pyx":200 * """Return number of available MIDI (input and output) devices.""" * * return Pm_CountDevices() # <<<<<<<<<<<<<< * * def GetDeviceInfo(device_no): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(Pm_CountDevices()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":197 * return Pm_GetDefaultOutputDeviceID() * * def CountDevices(): # <<<<<<<<<<<<<< * """Return number of available MIDI (input and output) devices.""" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame.pypm.CountDevices", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":202 * return Pm_CountDevices() * * def GetDeviceInfo(device_no): # <<<<<<<<<<<<<< * """Return device info tuple for MIDI device given by device_no. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_11GetDeviceInfo(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_10GetDeviceInfo, "Return device info tuple for MIDI device given by device_no.\n\n The returned tuple has the following five items:\n\n * underlying MIDI API (string)\n * device name (string)\n * whether device can be opened as input (1) or not (0)\n * whether device can be opened as output (1) or not (0)\n * whether device is currently opened (1) or not (0)\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_11GetDeviceInfo = {"GetDeviceInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_11GetDeviceInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_10GetDeviceInfo}; static PyObject *__pyx_pw_6pygame_4pypm_11GetDeviceInfo(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_device_no = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("GetDeviceInfo (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_device_no,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_device_no)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 202, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "GetDeviceInfo") < 0)) __PYX_ERR(0, 202, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_device_no = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("GetDeviceInfo", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 202, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.GetDeviceInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_10GetDeviceInfo(__pyx_self, __pyx_v_device_no); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_10GetDeviceInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device_no) { PmDeviceInfo *__pyx_v_info; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PmDeviceID __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetDeviceInfo", 1); /* "pygame/pypm.pyx":218 * # disregarding the constness from Pm_GetDeviceInfo, * # since pyrex doesn't do const. * info = Pm_GetDeviceInfo(device_no) # <<<<<<<<<<<<<< * * if info != NULL: */ __pyx_t_1 = __Pyx_PyInt_As_PmDeviceID(__pyx_v_device_no); if (unlikely((__pyx_t_1 == ((PmDeviceID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L1_error) __pyx_v_info = ((PmDeviceInfo *)Pm_GetDeviceInfo(__pyx_t_1)); /* "pygame/pypm.pyx":220 * info = Pm_GetDeviceInfo(device_no) * * if info != NULL: # <<<<<<<<<<<<<< * return info.interf, info.name, info.input, info.output, info.opened * # return None */ __pyx_t_2 = (__pyx_v_info != NULL); if (__pyx_t_2) { /* "pygame/pypm.pyx":221 * * if info != NULL: * return info.interf, info.name, info.input, info.output, info.opened # <<<<<<<<<<<<<< * # return None * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_info->interf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_info->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_info->input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_info->output); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_info->opened); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":220 * info = Pm_GetDeviceInfo(device_no) * * if info != NULL: # <<<<<<<<<<<<<< * return info.interf, info.name, info.input, info.output, info.opened * # return None */ } /* "pygame/pypm.pyx":202 * return Pm_CountDevices() * * def GetDeviceInfo(device_no): # <<<<<<<<<<<<<< * """Return device info tuple for MIDI device given by device_no. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pygame.pypm.GetDeviceInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":224 * # return None * * def Time(): # <<<<<<<<<<<<<< * """Return the current time in ms of the PortMidi timer.""" * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_13Time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_12Time, "Return the current time in ms of the PortMidi timer."); static PyMethodDef __pyx_mdef_6pygame_4pypm_13Time = {"Time", (PyCFunction)__pyx_pw_6pygame_4pypm_13Time, METH_NOARGS, __pyx_doc_6pygame_4pypm_12Time}; static PyObject *__pyx_pw_6pygame_4pypm_13Time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Time (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_6pygame_4pypm_12Time(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_12Time(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Time", 1); /* "pygame/pypm.pyx":227 * """Return the current time in ms of the PortMidi timer.""" * * return Pt_Time() # <<<<<<<<<<<<<< * * def GetErrorText(err): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PtTimestamp(Pt_Time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":224 * # return None * * def Time(): # <<<<<<<<<<<<<< * """Return the current time in ms of the PortMidi timer.""" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame.pypm.Time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":229 * return Pt_Time() * * def GetErrorText(err): # <<<<<<<<<<<<<< * """Return human-readable error message translated from error number.""" * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_15GetErrorText(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_14GetErrorText, "Return human-readable error message translated from error number."); static PyMethodDef __pyx_mdef_6pygame_4pypm_15GetErrorText = {"GetErrorText", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_15GetErrorText, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_14GetErrorText}; static PyObject *__pyx_pw_6pygame_4pypm_15GetErrorText(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_err = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("GetErrorText (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_err,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_err)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "GetErrorText") < 0)) __PYX_ERR(0, 229, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_err = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("GetErrorText", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 229, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.GetErrorText", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_14GetErrorText(__pyx_self, __pyx_v_err); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_14GetErrorText(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_err) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PmError __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetErrorText", 1); /* "pygame/pypm.pyx":232 * """Return human-readable error message translated from error number.""" * * return Pm_GetErrorText(err) # <<<<<<<<<<<<<< * * def Channel(chan): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PmError)__Pyx_PyInt_As_PmError(__pyx_v_err)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":229 * return Pt_Time() * * def GetErrorText(err): # <<<<<<<<<<<<<< * """Return human-readable error message translated from error number.""" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame.pypm.GetErrorText", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":234 * return Pm_GetErrorText(err) * * def Channel(chan): # <<<<<<<<<<<<<< * """Return Channel object for given MIDI channel number 1 - 16. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_17Channel(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_16Channel, "Return Channel object for given MIDI channel number 1 - 16.\n\n Channel() is used with ChannelMask on input MIDI streams.\n\n Example:\n\n To receive input on channels 1 and 10 on a MIDI stream called\n MidiIn::\n\n MidiIn.SetChannelMask(pypm.Channel(1) | pypm.Channel(10))\n\n .. note::\n PyPortMidi Channel function has been altered from\n the original PortMidi c call to correct for what\n seems to be a bug --- i.e. channel filters were\n all numbered from 0 to 15 instead of 1 to 16.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_17Channel = {"Channel", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_17Channel, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_16Channel}; static PyObject *__pyx_pw_6pygame_4pypm_17Channel(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_chan = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Channel (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_chan,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chan)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "Channel") < 0)) __PYX_ERR(0, 234, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_chan = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Channel", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 234, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Channel", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_16Channel(__pyx_self, __pyx_v_chan); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_16Channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chan) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Channel", 1); /* "pygame/pypm.pyx":253 * * """ * return Pm_Channel(chan - 1) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_chan, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(Pm_Channel(__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":234 * return Pm_GetErrorText(err) * * def Channel(chan): # <<<<<<<<<<<<<< * """Return Channel object for given MIDI channel number 1 - 16. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pygame.pypm.Channel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":271 * cdef int _aborted * * def __init__(self, output_device, latency=0, buffer_size=256): # <<<<<<<<<<<<<< * """Instantiate MIDI output stream object.""" * */ /* Python wrapper */ static int __pyx_pw_6pygame_4pypm_6Output_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output___init__, "Instantiate MIDI output stream object."); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_4pypm_6Output___init__; #endif static int __pyx_pw_6pygame_4pypm_6Output_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_output_device = 0; PyObject *__pyx_v_latency = 0; PyObject *__pyx_v_buffer_size = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_output_device,&__pyx_n_s_latency,&__pyx_n_s_buffer_size,0}; values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0)); values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_256)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output_device)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_latency); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 271, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_output_device = values[0]; __pyx_v_latency = values[1]; __pyx_v_buffer_size = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 271, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_6Output___init__(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self), __pyx_v_output_device, __pyx_v_latency, __pyx_v_buffer_size); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_4pypm_6Output___init__(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_output_device, PyObject *__pyx_v_latency, PyObject *__pyx_v_buffer_size) { PmError __pyx_v_err; PmTimeProcPtr __pyx_v_PmPtr; char const *__pyx_v_errmsg; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PmDeviceID __pyx_t_4; long __pyx_t_5; long __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/pypm.pyx":279 * cdef const char * errmsg * * self.device = output_device # <<<<<<<<<<<<<< * self.debug = 0 * self._aborted = 0 */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_output_device); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) __pyx_v_self->device = __pyx_t_1; /* "pygame/pypm.pyx":280 * * self.device = output_device * self.debug = 0 # <<<<<<<<<<<<<< * self._aborted = 0 * */ __pyx_v_self->debug = 0; /* "pygame/pypm.pyx":281 * self.device = output_device * self.debug = 0 * self._aborted = 0 # <<<<<<<<<<<<<< * * if latency == 0: */ __pyx_v_self->_aborted = 0; /* "pygame/pypm.pyx":283 * self._aborted = 0 * * if latency == 0: # <<<<<<<<<<<<<< * PmPtr = NULL * else: */ __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_latency, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 283, __pyx_L1_error) if (__pyx_t_2) { /* "pygame/pypm.pyx":284 * * if latency == 0: * PmPtr = NULL # <<<<<<<<<<<<<< * else: * PmPtr = &Pt_Time */ __pyx_v_PmPtr = NULL; /* "pygame/pypm.pyx":283 * self._aborted = 0 * * if latency == 0: # <<<<<<<<<<<<<< * PmPtr = NULL * else: */ goto __pyx_L3; } /* "pygame/pypm.pyx":286 * PmPtr = NULL * else: * PmPtr = &Pt_Time # <<<<<<<<<<<<<< * * if self.debug: */ /*else*/ { __pyx_v_PmPtr = ((PmTimeProcPtr)(&Pt_Time)); } __pyx_L3:; /* "pygame/pypm.pyx":288 * PmPtr = &Pt_Time * * if self.debug: # <<<<<<<<<<<<<< * print "Opening Midi Output", output_device * */ __pyx_t_2 = (__pyx_v_self->debug != 0); if (__pyx_t_2) { /* "pygame/pypm.pyx":289 * * if self.debug: * print "Opening Midi Output", output_device # <<<<<<<<<<<<<< * * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_s_Opening_Midi_Output); __Pyx_GIVEREF(__pyx_kp_s_Opening_Midi_Output); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_Opening_Midi_Output)) __PYX_ERR(0, 289, __pyx_L1_error); __Pyx_INCREF(__pyx_v_output_device); __Pyx_GIVEREF(__pyx_v_output_device); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_output_device)) __PYX_ERR(0, 289, __pyx_L1_error); if (__Pyx_Print(0, __pyx_t_3, 1) < 0) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/pypm.pyx":288 * PmPtr = &Pt_Time * * if self.debug: # <<<<<<<<<<<<<< * print "Opening Midi Output", output_device * */ } /* "pygame/pypm.pyx":291 * print "Opening Midi Output", output_device * * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, # <<<<<<<<<<<<<< * PmPtr, NULL, latency) * if self.debug: */ __pyx_t_4 = __Pyx_PyInt_As_PmDeviceID(__pyx_v_output_device); if (unlikely((__pyx_t_4 == ((PmDeviceID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_v_buffer_size); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error) /* "pygame/pypm.pyx":292 * * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, * PmPtr, NULL, latency) # <<<<<<<<<<<<<< * if self.debug: * print "Pm_OpenOutput err", err */ __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_latency); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) /* "pygame/pypm.pyx":291 * print "Opening Midi Output", output_device * * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, # <<<<<<<<<<<<<< * PmPtr, NULL, latency) * if self.debug: */ __pyx_v_err = Pm_OpenOutput((&__pyx_v_self->midi), __pyx_t_4, NULL, __pyx_t_5, __pyx_v_PmPtr, NULL, __pyx_t_6); /* "pygame/pypm.pyx":293 * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, * PmPtr, NULL, latency) * if self.debug: # <<<<<<<<<<<<<< * print "Pm_OpenOutput err", err * */ __pyx_t_2 = (__pyx_v_self->debug != 0); if (__pyx_t_2) { /* "pygame/pypm.pyx":294 * PmPtr, NULL, latency) * if self.debug: * print "Pm_OpenOutput err", err # <<<<<<<<<<<<<< * * if err < 0: */ __pyx_t_3 = __Pyx_PyInt_From_PmError(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_kp_s_Pm_OpenOutput_err); __Pyx_GIVEREF(__pyx_kp_s_Pm_OpenOutput_err); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_s_Pm_OpenOutput_err)) __PYX_ERR(0, 294, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error); __pyx_t_3 = 0; if (__Pyx_Print(0, __pyx_t_7, 1) < 0) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pygame/pypm.pyx":293 * err = Pm_OpenOutput(&(self.midi), output_device, NULL, buffer_size, * PmPtr, NULL, latency) * if self.debug: # <<<<<<<<<<<<<< * print "Pm_OpenOutput err", err * */ } /* "pygame/pypm.pyx":296 * print "Pm_OpenOutput err", err * * if err < 0: # <<<<<<<<<<<<<< * errmsg = Pm_GetErrorText(err) * # Something's amiss here - if we try to throw an Exception */ __pyx_t_2 = (__pyx_v_err < 0); if (__pyx_t_2) { /* "pygame/pypm.pyx":297 * * if err < 0: * errmsg = Pm_GetErrorText(err) # <<<<<<<<<<<<<< * # Something's amiss here - if we try to throw an Exception * # here, we crash. */ __pyx_v_errmsg = Pm_GetErrorText(__pyx_v_err); /* "pygame/pypm.pyx":300 * # Something's amiss here - if we try to throw an Exception * # here, we crash. * if not err == -10000: # <<<<<<<<<<<<<< * raise Exception(errmsg) * else: */ __pyx_t_2 = (!(__pyx_v_err == -10000L)); if (unlikely(__pyx_t_2)) { /* "pygame/pypm.pyx":301 * # here, we crash. * if not err == -10000: * raise Exception(errmsg) # <<<<<<<<<<<<<< * else: * print "Unable to open Midi OutputDevice=%i: %s" % ( */ __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_errmsg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 301, __pyx_L1_error) /* "pygame/pypm.pyx":300 * # Something's amiss here - if we try to throw an Exception * # here, we crash. * if not err == -10000: # <<<<<<<<<<<<<< * raise Exception(errmsg) * else: */ } /* "pygame/pypm.pyx":303 * raise Exception(errmsg) * else: * print "Unable to open Midi OutputDevice=%i: %s" % ( # <<<<<<<<<<<<<< * output_device, errmsg) * */ /*else*/ { /* "pygame/pypm.pyx":304 * else: * print "Unable to open Midi OutputDevice=%i: %s" % ( * output_device, errmsg) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_errmsg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_output_device); __Pyx_GIVEREF(__pyx_v_output_device); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_output_device)) __PYX_ERR(0, 304, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error); __pyx_t_3 = 0; /* "pygame/pypm.pyx":303 * raise Exception(errmsg) * else: * print "Unable to open Midi OutputDevice=%i: %s" % ( # <<<<<<<<<<<<<< * output_device, errmsg) * */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_open_Midi_OutputDevice, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pygame/pypm.pyx":296 * print "Pm_OpenOutput err", err * * if err < 0: # <<<<<<<<<<<<<< * errmsg = Pm_GetErrorText(err) * # Something's amiss here - if we try to throw an Exception */ } /* "pygame/pypm.pyx":271 * cdef int _aborted * * def __init__(self, output_device, latency=0, buffer_size=256): # <<<<<<<<<<<<<< * """Instantiate MIDI output stream object.""" * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame.pypm.Output.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":306 * output_device, errmsg) * * def __dealloc__(self): # <<<<<<<<<<<<<< * """Close midi device if still open when the instance is destroyed.""" * */ /* Python wrapper */ static void __pyx_pw_6pygame_4pypm_6Output_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_4pypm_6Output_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_4pypm_6Output_2__dealloc__(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_4pypm_6Output_2__dealloc__(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self) { PmError __pyx_v_err; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 1); /* "pygame/pypm.pyx":311 * cdef PmError err * * if self.debug: # <<<<<<<<<<<<<< * print "Closing MIDI output stream and destroying instance." * */ __pyx_t_1 = (__pyx_v_self->debug != 0); if (__pyx_t_1) { /* "pygame/pypm.pyx":312 * * if self.debug: * print "Closing MIDI output stream and destroying instance." # <<<<<<<<<<<<<< * * if self.midi and _pypm_initialized: */ if (__Pyx_PrintOne(0, __pyx_kp_s_Closing_MIDI_output_stream_and_d) < 0) __PYX_ERR(0, 312, __pyx_L1_error) /* "pygame/pypm.pyx":311 * cdef PmError err * * if self.debug: # <<<<<<<<<<<<<< * print "Closing MIDI output stream and destroying instance." * */ } /* "pygame/pypm.pyx":314 * print "Closing MIDI output stream and destroying instance." * * if self.midi and _pypm_initialized: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ __pyx_t_2 = (__pyx_v_self->midi != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = (__pyx_v_6pygame_4pypm__pypm_initialized != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "pygame/pypm.pyx":315 * * if self.midi and _pypm_initialized: * err = Pm_Close(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Close(__pyx_v_self->midi); /* "pygame/pypm.pyx":316 * if self.midi and _pypm_initialized: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_1 = (__pyx_v_err < 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":317 * err = Pm_Close(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def _check_open(self): */ __pyx_t_3 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 317, __pyx_L1_error) /* "pygame/pypm.pyx":316 * if self.midi and _pypm_initialized: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":314 * print "Closing MIDI output stream and destroying instance." * * if self.midi and _pypm_initialized: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ } /* "pygame/pypm.pyx":306 * output_device, errmsg) * * def __dealloc__(self): # <<<<<<<<<<<<<< * """Close midi device if still open when the instance is destroyed.""" * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pygame.pypm.Output.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pygame/pypm.pyx":319 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_5_check_open(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_4_check_open, "Check whether midi device is open, and if not, raises an error.\n\n Internal method, should be used only by other methods of this class.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_5_check_open = {"_check_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_5_check_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_4_check_open}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_5_check_open(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_open (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_check_open", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_check_open", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_4_check_open(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_4_check_open(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_open", 1); /* "pygame/pypm.pyx":326 * """ * * if self.midi == NULL: # <<<<<<<<<<<<<< * raise Exception("midi Output not open.") * */ __pyx_t_1 = (__pyx_v_self->midi == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":327 * * if self.midi == NULL: * raise Exception("midi Output not open.") # <<<<<<<<<<<<<< * * if self._aborted: */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 327, __pyx_L1_error) /* "pygame/pypm.pyx":326 * """ * * if self.midi == NULL: # <<<<<<<<<<<<<< * raise Exception("midi Output not open.") * */ } /* "pygame/pypm.pyx":329 * raise Exception("midi Output not open.") * * if self._aborted: # <<<<<<<<<<<<<< * raise Exception( * "midi Output aborted. Need to call Close after Abort.") */ __pyx_t_1 = (__pyx_v_self->_aborted != 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":330 * * if self._aborted: * raise Exception( # <<<<<<<<<<<<<< * "midi Output aborted. Need to call Close after Abort.") * */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 330, __pyx_L1_error) /* "pygame/pypm.pyx":329 * raise Exception("midi Output not open.") * * if self._aborted: # <<<<<<<<<<<<<< * raise Exception( * "midi Output aborted. Need to call Close after Abort.") */ } /* "pygame/pypm.pyx":319 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame.pypm.Output._check_open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":333 * "midi Output aborted. Need to call Close after Abort.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi output device, flushing any pending buffers. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_7Close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_6Close, "Close the midi output device, flushing any pending buffers.\n\n PortMidi attempts to close open streams when the application exits --\n this is particularly difficult under Windows, so it is best to take\n care to close all devices explicitly.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_7Close = {"Close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_7Close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_6Close}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_7Close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Close (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("Close", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Close", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_6Close(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_6Close(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self) { PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Close", 1); /* "pygame/pypm.pyx":343 * cdef PmError err * * if not self.midi or not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (!(__pyx_v_self->midi != 0)); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (!(__pyx_v_6pygame_4pypm__pypm_initialized != 0)); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "pygame/pypm.pyx":344 * * if not self.midi or not _pypm_initialized: * return # <<<<<<<<<<<<<< * * err = Pm_Close(self.midi) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/pypm.pyx":343 * cdef PmError err * * if not self.midi or not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ } /* "pygame/pypm.pyx":346 * return * * err = Pm_Close(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Close(__pyx_v_self->midi); /* "pygame/pypm.pyx":347 * * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_1 = (__pyx_v_err < 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":348 * err = Pm_Close(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * self.midi = NULL */ __pyx_t_3 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 348, __pyx_L1_error) /* "pygame/pypm.pyx":347 * * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":350 * raise Exception(Pm_GetErrorText(err)) * * self.midi = NULL # <<<<<<<<<<<<<< * * def Abort(self): */ __pyx_v_self->midi = NULL; /* "pygame/pypm.pyx":333 * "midi Output aborted. Need to call Close after Abort.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi output device, flushing any pending buffers. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pygame.pypm.Output.Close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":352 * self.midi = NULL * * def Abort(self): # <<<<<<<<<<<<<< * """Terminate outgoing messages immediately. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_9Abort(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_8Abort, "Terminate outgoing messages immediately.\n\n The caller should immediately close the output port after calling this\n method. This call may result in transmission of a partial midi message.\n There is no abort for Midi input because the user can simply ignore\n messages in the buffer and close an input device at any time.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_9Abort = {"Abort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_9Abort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_8Abort}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_9Abort(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Abort (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("Abort", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Abort", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_8Abort(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_8Abort(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self) { PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Abort", 1); /* "pygame/pypm.pyx":363 * cdef PmError err * * if not self.midi: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (!(__pyx_v_self->midi != 0)); if (__pyx_t_1) { /* "pygame/pypm.pyx":364 * * if not self.midi: * return # <<<<<<<<<<<<<< * * err = Pm_Abort(self.midi) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/pypm.pyx":363 * cdef PmError err * * if not self.midi: # <<<<<<<<<<<<<< * return * */ } /* "pygame/pypm.pyx":366 * return * * err = Pm_Abort(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Abort(__pyx_v_self->midi); /* "pygame/pypm.pyx":367 * * err = Pm_Abort(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_1 = (__pyx_v_err < 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":368 * err = Pm_Abort(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * self._aborted = 1 */ __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 368, __pyx_L1_error) /* "pygame/pypm.pyx":367 * * err = Pm_Abort(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":370 * raise Exception(Pm_GetErrorText(err)) * * self._aborted = 1 # <<<<<<<<<<<<<< * * def Write(self, data): */ __pyx_v_self->_aborted = 1; /* "pygame/pypm.pyx":352 * self.midi = NULL * * def Abort(self): # <<<<<<<<<<<<<< * """Terminate outgoing messages immediately. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Output.Abort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":372 * self._aborted = 1 * * def Write(self, data): # <<<<<<<<<<<<<< * """Output a series of MIDI events given by data list n this device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_11Write(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_10Write, "Output a series of MIDI events given by data list n this device.\n\n Usage::\n\n Write([\n [[status, data1, data2, data3], timestamp],\n [[status, data1, data2, data3], timestamp],\n ...\n ])\n\n The data1/2/3 items in each event are optional::\n\n Write([[[0xc0, 0, 0], 20000]])\n\n is equivalent to::\n\n Write([[[0xc0], 20000]])\n\n Example:\n\n Send program change 1 at time 20000 and send note 65 with velocity 100\n at 500 ms later::\n\n Write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]])\n\n .. notes::\n 1. Timestamps will be ignored if latency == 0.\n\n 2. To get a note to play immediately, send the note on event with\n the result from the Time() function as the timestamp.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_11Write = {"Write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_11Write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_10Write}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_11Write(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_data = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "Write") < 0)) __PYX_ERR(0, 372, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_data = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 372, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Output.Write", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_10Write(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self), __pyx_v_data); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_10Write(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_data) { PmEvent __pyx_v_buffer[0x400]; PmError __pyx_v_err; int __pyx_v_item; int __pyx_v_ev_no; PyObject *__pyx_v_event = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; int __pyx_t_13; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PmMessage __pyx_t_16; PmTimestamp __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Write", 1); /* "pygame/pypm.pyx":410 * cdef int ev_no * * self._check_open() # <<<<<<<<<<<<<< * * if len(data) > 1024: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":412 * self._check_open() * * if len(data) > 1024: # <<<<<<<<<<<<<< * raise IndexError('Maximum event list length is 1024.') * else: */ __pyx_t_5 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 412, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 > 0x400); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":413 * * if len(data) > 1024: * raise IndexError('Maximum event list length is 1024.') # <<<<<<<<<<<<<< * else: * for ev_no, event in enumerate(data): */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 413, __pyx_L1_error) /* "pygame/pypm.pyx":412 * self._check_open() * * if len(data) > 1024: # <<<<<<<<<<<<<< * raise IndexError('Maximum event list length is 1024.') * else: */ } /* "pygame/pypm.pyx":415 * raise IndexError('Maximum event list length is 1024.') * else: * for ev_no, event in enumerate(data): # <<<<<<<<<<<<<< * if not event[0]: * raise ValueError('No data in event no. %i.' % ev_no) */ /*else*/ { __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 415, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 415, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 415, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 415, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 415, __pyx_L1_error) #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 415, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_event, __pyx_t_2); __pyx_t_2 = 0; __pyx_v_ev_no = __pyx_t_7; __pyx_t_7 = (__pyx_t_7 + 1); /* "pygame/pypm.pyx":416 * else: * for ev_no, event in enumerate(data): * if not event[0]: # <<<<<<<<<<<<<< * raise ValueError('No data in event no. %i.' % ev_no) * if len(event[0]) > 4: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_event, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (!__pyx_t_6); if (unlikely(__pyx_t_9)) { /* "pygame/pypm.pyx":417 * for ev_no, event in enumerate(data): * if not event[0]: * raise ValueError('No data in event no. %i.' % ev_no) # <<<<<<<<<<<<<< * if len(event[0]) > 4: * raise ValueError('Too many data bytes (%i) in event no. %i.' */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ev_no); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_No_data_in_event_no_i, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 417, __pyx_L1_error) /* "pygame/pypm.pyx":416 * else: * for ev_no, event in enumerate(data): * if not event[0]: # <<<<<<<<<<<<<< * raise ValueError('No data in event no. %i.' % ev_no) * if len(event[0]) > 4: */ } /* "pygame/pypm.pyx":418 * if not event[0]: * raise ValueError('No data in event no. %i.' % ev_no) * if len(event[0]) > 4: # <<<<<<<<<<<<<< * raise ValueError('Too many data bytes (%i) in event no. %i.' * % (len(event[0]), ev_no)) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_event, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_10 > 4); if (unlikely(__pyx_t_9)) { /* "pygame/pypm.pyx":420 * if len(event[0]) > 4: * raise ValueError('Too many data bytes (%i) in event no. %i.' * % (len(event[0]), ev_no)) # <<<<<<<<<<<<<< * * buffer[ev_no].message = 0 */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_event, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ev_no); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_data_bytes_i_in_event_n, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pygame/pypm.pyx":419 * raise ValueError('No data in event no. %i.' % ev_no) * if len(event[0]) > 4: * raise ValueError('Too many data bytes (%i) in event no. %i.' # <<<<<<<<<<<<<< * % (len(event[0]), ev_no)) * */ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 419, __pyx_L1_error) /* "pygame/pypm.pyx":418 * if not event[0]: * raise ValueError('No data in event no. %i.' % ev_no) * if len(event[0]) > 4: # <<<<<<<<<<<<<< * raise ValueError('Too many data bytes (%i) in event no. %i.' * % (len(event[0]), ev_no)) */ } /* "pygame/pypm.pyx":422 * % (len(event[0]), ev_no)) * * buffer[ev_no].message = 0 # <<<<<<<<<<<<<< * * for item in range(len(event[0])): */ (__pyx_v_buffer[__pyx_v_ev_no]).message = 0; /* "pygame/pypm.pyx":424 * buffer[ev_no].message = 0 * * for item in range(len(event[0])): # <<<<<<<<<<<<<< * buffer[ev_no].message += ( * (event[0][item] & 0xFF) << (8 * item)) */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_event, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = __pyx_t_10; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_item = __pyx_t_13; /* "pygame/pypm.pyx":425 * * for item in range(len(event[0])): * buffer[ev_no].message += ( # <<<<<<<<<<<<<< * (event[0][item] & 0xFF) << (8 * item)) * */ __pyx_t_14 = __pyx_v_ev_no; __pyx_t_11 = __Pyx_PyInt_From_PmMessage((__pyx_v_buffer[__pyx_t_14]).message); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "pygame/pypm.pyx":426 * for item in range(len(event[0])): * buffer[ev_no].message += ( * (event[0][item] & 0xFF) << (8 * item)) # <<<<<<<<<<<<<< * * buffer[ev_no].timestamp = event[1] */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_event, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_item, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_long((8 * __pyx_v_item)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = PyNumber_Lshift(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":425 * * for item in range(len(event[0])): * buffer[ev_no].message += ( # <<<<<<<<<<<<<< * (event[0][item] & 0xFF) << (8 * item)) * */ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = __Pyx_PyInt_As_PmMessage(__pyx_t_2); if (unlikely((__pyx_t_16 == ((PmMessage)-1)) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_buffer[__pyx_t_14]).message = __pyx_t_16; } /* "pygame/pypm.pyx":428 * (event[0][item] & 0xFF) << (8 * item)) * * buffer[ev_no].timestamp = event[1] # <<<<<<<<<<<<<< * * if self.debug: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_event, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyInt_As_PmTimestamp(__pyx_t_2); if (unlikely((__pyx_t_17 == ((PmTimestamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_buffer[__pyx_v_ev_no]).timestamp = __pyx_t_17; /* "pygame/pypm.pyx":430 * buffer[ev_no].timestamp = event[1] * * if self.debug: # <<<<<<<<<<<<<< * print "%i : %r : %s" % ( * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) */ __pyx_t_9 = (__pyx_v_self->debug != 0); if (__pyx_t_9) { /* "pygame/pypm.pyx":432 * if self.debug: * print "%i : %r : %s" % ( * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) # <<<<<<<<<<<<<< * * if self.debug: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ev_no); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = __Pyx_PyInt_From_PmMessage((__pyx_v_buffer[__pyx_v_ev_no]).message); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = __Pyx_PyInt_From_PmTimestamp((__pyx_v_buffer[__pyx_v_ev_no]).timestamp); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_15); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_15)) __PYX_ERR(0, 432, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_11)) __PYX_ERR(0, 432, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_15 = 0; __pyx_t_11 = 0; /* "pygame/pypm.pyx":431 * * if self.debug: * print "%i : %r : %s" % ( # <<<<<<<<<<<<<< * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) * */ __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_i_r_s, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PrintOne(0, __pyx_t_11) < 0) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pygame/pypm.pyx":430 * buffer[ev_no].timestamp = event[1] * * if self.debug: # <<<<<<<<<<<<<< * print "%i : %r : %s" % ( * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) */ } /* "pygame/pypm.pyx":415 * raise IndexError('Maximum event list length is 1024.') * else: * for ev_no, event in enumerate(data): # <<<<<<<<<<<<<< * if not event[0]: * raise ValueError('No data in event no. %i.' % ev_no) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pygame/pypm.pyx":434 * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) * * if self.debug: # <<<<<<<<<<<<<< * print "Writing to midi buffer." * err = Pm_Write(self.midi, buffer, len(data)) */ __pyx_t_9 = (__pyx_v_self->debug != 0); if (__pyx_t_9) { /* "pygame/pypm.pyx":435 * * if self.debug: * print "Writing to midi buffer." # <<<<<<<<<<<<<< * err = Pm_Write(self.midi, buffer, len(data)) * if err < 0: */ if (__Pyx_PrintOne(0, __pyx_kp_s_Writing_to_midi_buffer) < 0) __PYX_ERR(0, 435, __pyx_L1_error) /* "pygame/pypm.pyx":434 * ev_no, buffer[ev_no].message, buffer[ev_no].timestamp) * * if self.debug: # <<<<<<<<<<<<<< * print "Writing to midi buffer." * err = Pm_Write(self.midi, buffer, len(data)) */ } /* "pygame/pypm.pyx":436 * if self.debug: * print "Writing to midi buffer." * err = Pm_Write(self.midi, buffer, len(data)) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_t_5 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 436, __pyx_L1_error) __pyx_v_err = Pm_Write(__pyx_v_self->midi, __pyx_v_buffer, __pyx_t_5); /* "pygame/pypm.pyx":437 * print "Writing to midi buffer." * err = Pm_Write(self.midi, buffer, len(data)) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_9 = (__pyx_v_err < 0); if (unlikely(__pyx_t_9)) { /* "pygame/pypm.pyx":438 * err = Pm_Write(self.midi, buffer, len(data)) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def WriteShort(self, status, data1=0, data2=0): */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 438, __pyx_L1_error) /* "pygame/pypm.pyx":437 * print "Writing to midi buffer." * err = Pm_Write(self.midi, buffer, len(data)) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":372 * self._aborted = 1 * * def Write(self, data): # <<<<<<<<<<<<<< * """Output a series of MIDI events given by data list n this device. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pygame.pypm.Output.Write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_event); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":440 * raise Exception(Pm_GetErrorText(err)) * * def WriteShort(self, status, data1=0, data2=0): # <<<<<<<<<<<<<< * """Output MIDI event of three bytes or less immediately on this device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_13WriteShort(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_12WriteShort, "Output MIDI event of three bytes or less immediately on this device.\n\n Usage::\n\n WriteShort(status, data1, data2)\n\n status must be a valid MIDI status byte, for example:\n\n 0xCx = Program Change\n 0xBx = Controller Change\n 0x9x = Note On\n\n where x is the MIDI channel number 0 - 0xF.\n\n The data1 and data2 arguments are optional and assumed to be 0 if\n omitted.\n\n Example:\n\n Send note 65 on with velocity 100::\n\n WriteShort(0x90, 65, 100)\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_13WriteShort = {"WriteShort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_13WriteShort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_12WriteShort}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_13WriteShort(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_status = 0; PyObject *__pyx_v_data1 = 0; PyObject *__pyx_v_data2 = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteShort (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,&__pyx_n_s_data1,&__pyx_n_s_data2,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0)); values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_status)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data1); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data2); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "WriteShort") < 0)) __PYX_ERR(0, 440, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = values[0]; __pyx_v_data1 = values[1]; __pyx_v_data2 = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("WriteShort", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 440, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Output.WriteShort", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_12WriteShort(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self), __pyx_v_status, __pyx_v_data1, __pyx_v_data2); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_12WriteShort(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_status, PyObject *__pyx_v_data1, PyObject *__pyx_v_data2) { PmEvent __pyx_v_buffer[1]; PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; PmMessage __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteShort", 1); /* "pygame/pypm.pyx":468 * cdef PmError err * * self._check_open() # <<<<<<<<<<<<<< * * buffer[0].timestamp = Pt_Time() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":470 * self._check_open() * * buffer[0].timestamp = Pt_Time() # <<<<<<<<<<<<<< * buffer[0].message = (((data2 << 16) & 0xFF0000) | * ((data1 << 8) & 0xFF00) | (status & 0xFF)) */ (__pyx_v_buffer[0]).timestamp = Pt_Time(); /* "pygame/pypm.pyx":471 * * buffer[0].timestamp = Pt_Time() * buffer[0].message = (((data2 << 16) & 0xFF0000) | # <<<<<<<<<<<<<< * ((data1 << 8) & 0xFF00) | (status & 0xFF)) * */ __pyx_t_1 = __Pyx_PyInt_LshiftObjC(__pyx_v_data2, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_16711680, 0xFF0000, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":472 * buffer[0].timestamp = Pt_Time() * buffer[0].message = (((data2 << 16) & 0xFF0000) | * ((data1 << 8) & 0xFF00) | (status & 0xFF)) # <<<<<<<<<<<<<< * * if self.debug: */ __pyx_t_1 = __Pyx_PyInt_LshiftObjC(__pyx_v_data1, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_65280, 0xFF00, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":471 * * buffer[0].timestamp = Pt_Time() * buffer[0].message = (((data2 << 16) & 0xFF0000) | # <<<<<<<<<<<<<< * ((data1 << 8) & 0xFF00) | (status & 0xFF)) * */ __pyx_t_1 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pygame/pypm.pyx":472 * buffer[0].timestamp = Pt_Time() * buffer[0].message = (((data2 << 16) & 0xFF0000) | * ((data1 << 8) & 0xFF00) | (status & 0xFF)) # <<<<<<<<<<<<<< * * if self.debug: */ __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_v_status, __pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Or(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_As_PmMessage(__pyx_t_2); if (unlikely((__pyx_t_5 == ((PmMessage)-1)) && PyErr_Occurred())) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":471 * * buffer[0].timestamp = Pt_Time() * buffer[0].message = (((data2 << 16) & 0xFF0000) | # <<<<<<<<<<<<<< * ((data1 << 8) & 0xFF00) | (status & 0xFF)) * */ (__pyx_v_buffer[0]).message = __pyx_t_5; /* "pygame/pypm.pyx":474 * ((data1 << 8) & 0xFF00) | (status & 0xFF)) * * if self.debug: # <<<<<<<<<<<<<< * print "Writing to MIDI buffer." * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length */ __pyx_t_6 = (__pyx_v_self->debug != 0); if (__pyx_t_6) { /* "pygame/pypm.pyx":475 * * if self.debug: * print "Writing to MIDI buffer." # <<<<<<<<<<<<<< * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length * if err < 0: */ if (__Pyx_PrintOne(0, __pyx_kp_s_Writing_to_MIDI_buffer) < 0) __PYX_ERR(0, 475, __pyx_L1_error) /* "pygame/pypm.pyx":474 * ((data1 << 8) & 0xFF00) | (status & 0xFF)) * * if self.debug: # <<<<<<<<<<<<<< * print "Writing to MIDI buffer." * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length */ } /* "pygame/pypm.pyx":476 * if self.debug: * print "Writing to MIDI buffer." * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Write(__pyx_v_self->midi, __pyx_v_buffer, 1); /* "pygame/pypm.pyx":477 * print "Writing to MIDI buffer." * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_6 = (__pyx_v_err < 0); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":478 * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def WriteSysEx(self, when, msg): */ __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 478, __pyx_L1_error) /* "pygame/pypm.pyx":477 * print "Writing to MIDI buffer." * err = Pm_Write(self.midi, buffer, 1) # stream, buffer, length * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":440 * raise Exception(Pm_GetErrorText(err)) * * def WriteShort(self, status, data1=0, data2=0): # <<<<<<<<<<<<<< * """Output MIDI event of three bytes or less immediately on this device. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Output.WriteShort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":480 * raise Exception(Pm_GetErrorText(err)) * * def WriteSysEx(self, when, msg): # <<<<<<<<<<<<<< * """Output a timestamped system-exclusive MIDI message on this device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_15WriteSysEx(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_6Output_14WriteSysEx, "Output a timestamped system-exclusive MIDI message on this device.\n\n Usage::\n\n WriteSysEx(, )\n\n can be a *list* or a *string*\n\n Example (assuming 'out' is an output MIDI stream):\n\n out.WriteSysEx(0, '\\xF0\\x7D\\x10\\x11\\x12\\x13\\xF7')\n\n This is equivalent to::\n\n out.WriteSysEx(pypm.Time(),\n [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7])\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_15WriteSysEx = {"WriteSysEx", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_15WriteSysEx, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_14WriteSysEx}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_15WriteSysEx(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_when = 0; PyObject *__pyx_v_msg = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteSysEx (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_when,&__pyx_n_s_msg,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_when)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_msg)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L3_error) else { __Pyx_RaiseArgtupleInvalid("WriteSysEx", 1, 2, 2, 1); __PYX_ERR(0, 480, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "WriteSysEx") < 0)) __PYX_ERR(0, 480, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_when = values[0]; __pyx_v_msg = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("WriteSysEx", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 480, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Output.WriteSysEx", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_14WriteSysEx(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self), __pyx_v_when, __pyx_v_msg); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_14WriteSysEx(struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_msg) { PmError __pyx_v_err; char *__pyx_v_cmsg; PtTimestamp __pyx_v_cur_time; PyObject *__pyx_v_arr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; char *__pyx_t_6; PmTimestamp __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteSysEx", 0); __Pyx_INCREF(__pyx_v_msg); /* "pygame/pypm.pyx":503 * cdef PtTimestamp cur_time * * self._check_open() # <<<<<<<<<<<<<< * * if type(msg) is list: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":505 * self._check_open() * * if type(msg) is list: # <<<<<<<<<<<<<< * # Markus Pfaff contribution * arr = array.array('B', msg) */ __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_msg)) == ((PyObject *)(&PyList_Type))); if (__pyx_t_5) { /* "pygame/pypm.pyx":507 * if type(msg) is list: * # Markus Pfaff contribution * arr = array.array('B', msg) # <<<<<<<<<<<<<< * if sys.version_info[0] == 3: * msg = arr.tobytes() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_n_s_B, __pyx_v_msg}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_arr = __pyx_t_1; __pyx_t_1 = 0; /* "pygame/pypm.pyx":508 * # Markus Pfaff contribution * arr = array.array('B', msg) * if sys.version_info[0] == 3: # <<<<<<<<<<<<<< * msg = arr.tobytes() * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_3, 3, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pygame/pypm.pyx":509 * arr = array.array('B', msg) * if sys.version_info[0] == 3: * msg = arr.tobytes() # <<<<<<<<<<<<<< * else: * msg = arr.tostring() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_tobytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":508 * # Markus Pfaff contribution * arr = array.array('B', msg) * if sys.version_info[0] == 3: # <<<<<<<<<<<<<< * msg = arr.tobytes() * else: */ goto __pyx_L4; } /* "pygame/pypm.pyx":511 * msg = arr.tobytes() * else: * msg = arr.tostring() # <<<<<<<<<<<<<< * cmsg = msg * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_tostring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; /* "pygame/pypm.pyx":505 * self._check_open() * * if type(msg) is list: # <<<<<<<<<<<<<< * # Markus Pfaff contribution * arr = array.array('B', msg) */ } /* "pygame/pypm.pyx":512 * else: * msg = arr.tostring() * cmsg = msg # <<<<<<<<<<<<<< * * cur_time = Pt_Time() */ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_msg); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error) __pyx_v_cmsg = __pyx_t_6; /* "pygame/pypm.pyx":514 * cmsg = msg * * cur_time = Pt_Time() # <<<<<<<<<<<<<< * err = Pm_WriteSysEx(self.midi, when, cmsg) * if err < 0: */ __pyx_v_cur_time = Pt_Time(); /* "pygame/pypm.pyx":515 * * cur_time = Pt_Time() * err = Pm_WriteSysEx(self.midi, when, cmsg) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_t_7 = __Pyx_PyInt_As_PmTimestamp(__pyx_v_when); if (unlikely((__pyx_t_7 == ((PmTimestamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L1_error) __pyx_v_err = Pm_WriteSysEx(__pyx_v_self->midi, __pyx_t_7, ((unsigned char *)__pyx_v_cmsg)); /* "pygame/pypm.pyx":516 * cur_time = Pt_Time() * err = Pm_WriteSysEx(self.midi, when, cmsg) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_5 = (__pyx_v_err < 0); if (unlikely(__pyx_t_5)) { /* "pygame/pypm.pyx":517 * err = Pm_WriteSysEx(self.midi, when, cmsg) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * # wait for SysEx to go thru or... */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 517, __pyx_L1_error) /* "pygame/pypm.pyx":516 * cur_time = Pt_Time() * err = Pm_WriteSysEx(self.midi, when, cmsg) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":521 * # wait for SysEx to go thru or... * # my win32 machine crashes w/ multiple SysEx * while Pt_Time() == cur_time: # <<<<<<<<<<<<<< * pass * */ while (1) { __pyx_t_5 = (Pt_Time() == __pyx_v_cur_time); if (!__pyx_t_5) break; } /* "pygame/pypm.pyx":480 * raise Exception(Pm_GetErrorText(err)) * * def WriteSysEx(self, when, msg): # <<<<<<<<<<<<<< * """Output a timestamped system-exclusive MIDI message on this device. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Output.WriteSysEx", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_arr); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_17__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_17__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_16__reduce_cython__(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_midi_cannot_be_converted_to, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame.pypm.Output.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_6Output_19__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_4pypm_6Output_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_4pypm_6Output_19__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Output.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_6Output_18__setstate_cython__(((struct __pyx_obj_6pygame_4pypm_Output *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_6Output_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Output *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_midi_cannot_be_converted_to, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame.pypm.Output.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":537 * cdef int debug * * def __init__(self, input_device, buffersize=4096): # <<<<<<<<<<<<<< * """Instantiate MIDI input stream object.""" * */ /* Python wrapper */ static int __pyx_pw_6pygame_4pypm_5Input_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input___init__, "Instantiate MIDI input stream object."); #if CYTHON_UPDATE_DESCRIPTOR_DOC struct wrapperbase __pyx_wrapperbase_6pygame_4pypm_5Input___init__; #endif static int __pyx_pw_6pygame_4pypm_5Input_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_input_device = 0; PyObject *__pyx_v_buffersize = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input_device,&__pyx_n_s_buffersize,0}; values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_4096)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_device)) != 0)) { (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffersize); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 537, __pyx_L3_error) } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input_device = values[0]; __pyx_v_buffersize = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 537, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_5Input___init__(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self), __pyx_v_input_device, __pyx_v_buffersize); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pygame_4pypm_5Input___init__(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_input_device, PyObject *__pyx_v_buffersize) { PmError __pyx_v_err; PmTimeProcPtr __pyx_v_PmPtr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PmDeviceID __pyx_t_2; long __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); /* "pygame/pypm.pyx":542 * cdef PmError err * cdef PmTimeProcPtr PmPtr * self.device = input_device # <<<<<<<<<<<<<< * self.debug = 0 * */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_input_device); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error) __pyx_v_self->device = __pyx_t_1; /* "pygame/pypm.pyx":543 * cdef PmTimeProcPtr PmPtr * self.device = input_device * self.debug = 0 # <<<<<<<<<<<<<< * * PmPtr = &Pt_Time */ __pyx_v_self->debug = 0; /* "pygame/pypm.pyx":545 * self.debug = 0 * * PmPtr = &Pt_Time # <<<<<<<<<<<<<< * * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, */ __pyx_v_PmPtr = ((PmTimeProcPtr)(&Pt_Time)); /* "pygame/pypm.pyx":547 * PmPtr = &Pt_Time * * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, # <<<<<<<<<<<<<< * PmPtr, NULL) * if err < 0: */ __pyx_t_2 = __Pyx_PyInt_As_PmDeviceID(__pyx_v_input_device); if (unlikely((__pyx_t_2 == ((PmDeviceID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_v_buffersize); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L1_error) /* "pygame/pypm.pyx":548 * * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, * PmPtr, NULL) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_OpenInput((&__pyx_v_self->midi), __pyx_t_2, NULL, __pyx_t_3, __pyx_v_PmPtr, NULL); /* "pygame/pypm.pyx":549 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, * PmPtr, NULL) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_4 = (__pyx_v_err < 0); if (unlikely(__pyx_t_4)) { /* "pygame/pypm.pyx":550 * PmPtr, NULL) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * if self.debug: */ __pyx_t_5 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 550, __pyx_L1_error) /* "pygame/pypm.pyx":549 * err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize, * PmPtr, NULL) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":552 * raise Exception(Pm_GetErrorText(err)) * * if self.debug: # <<<<<<<<<<<<<< * print "MIDI input opened.", input_device * */ __pyx_t_4 = (__pyx_v_self->debug != 0); if (__pyx_t_4) { /* "pygame/pypm.pyx":553 * * if self.debug: * print "MIDI input opened.", input_device # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_MIDI_input_opened); __Pyx_GIVEREF(__pyx_kp_s_MIDI_input_opened); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_MIDI_input_opened)) __PYX_ERR(0, 553, __pyx_L1_error); __Pyx_INCREF(__pyx_v_input_device); __Pyx_GIVEREF(__pyx_v_input_device); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_input_device)) __PYX_ERR(0, 553, __pyx_L1_error); if (__Pyx_Print(0, __pyx_t_6, 1) < 0) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pygame/pypm.pyx":552 * raise Exception(Pm_GetErrorText(err)) * * if self.debug: # <<<<<<<<<<<<<< * print "MIDI input opened.", input_device * */ } /* "pygame/pypm.pyx":537 * cdef int debug * * def __init__(self, input_device, buffersize=4096): # <<<<<<<<<<<<<< * """Instantiate MIDI input stream object.""" * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame.pypm.Input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":555 * print "MIDI input opened.", input_device * * def __dealloc__(self): # <<<<<<<<<<<<<< * """Close midi device if still open when the instance is destroyed.""" * */ /* Python wrapper */ static void __pyx_pw_6pygame_4pypm_5Input_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pygame_4pypm_5Input_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_6pygame_4pypm_5Input_2__dealloc__(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pygame_4pypm_5Input_2__dealloc__(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self) { PmError __pyx_v_err; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 1); /* "pygame/pypm.pyx":559 * * cdef PmError err * if not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (!(__pyx_v_6pygame_4pypm__pypm_initialized != 0)); if (__pyx_t_1) { /* "pygame/pypm.pyx":560 * cdef PmError err * if not _pypm_initialized: * return # <<<<<<<<<<<<<< * * if self.debug: */ goto __pyx_L0; /* "pygame/pypm.pyx":559 * * cdef PmError err * if not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ } /* "pygame/pypm.pyx":562 * return * * if self.debug: # <<<<<<<<<<<<<< * print "Closing MIDI input stream and destroying instance" * */ __pyx_t_1 = (__pyx_v_self->debug != 0); if (__pyx_t_1) { /* "pygame/pypm.pyx":563 * * if self.debug: * print "Closing MIDI input stream and destroying instance" # <<<<<<<<<<<<<< * * if self.midi: */ if (__Pyx_PrintOne(0, __pyx_kp_s_Closing_MIDI_input_stream_and_de) < 0) __PYX_ERR(0, 563, __pyx_L1_error) /* "pygame/pypm.pyx":562 * return * * if self.debug: # <<<<<<<<<<<<<< * print "Closing MIDI input stream and destroying instance" * */ } /* "pygame/pypm.pyx":565 * print "Closing MIDI input stream and destroying instance" * * if self.midi: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ __pyx_t_1 = (__pyx_v_self->midi != 0); if (__pyx_t_1) { /* "pygame/pypm.pyx":566 * * if self.midi: * err = Pm_Close(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Close(__pyx_v_self->midi); /* "pygame/pypm.pyx":567 * if self.midi: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_1 = (__pyx_v_err < 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":568 * err = Pm_Close(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def _check_open(self): */ __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 568, __pyx_L1_error) /* "pygame/pypm.pyx":567 * if self.midi: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":565 * print "Closing MIDI input stream and destroying instance" * * if self.midi: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ } /* "pygame/pypm.pyx":555 * print "MIDI input opened.", input_device * * def __dealloc__(self): # <<<<<<<<<<<<<< * """Close midi device if still open when the instance is destroyed.""" * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pygame.pypm.Input.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pygame/pypm.pyx":570 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_5_check_open(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_4_check_open, "Check whether midi device is open, and if not, raises an error.\n\n Internal method, should be used only by other methods of this class.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_5_check_open = {"_check_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_5_check_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_4_check_open}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_5_check_open(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_open (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_check_open", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_check_open", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_4_check_open(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_4_check_open(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_open", 1); /* "pygame/pypm.pyx":576 * * """ * if self.midi == NULL: # <<<<<<<<<<<<<< * raise Exception("midi Input not open.") * */ __pyx_t_1 = (__pyx_v_self->midi == NULL); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":577 * """ * if self.midi == NULL: * raise Exception("midi Input not open.") # <<<<<<<<<<<<<< * * def Close(self): */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 577, __pyx_L1_error) /* "pygame/pypm.pyx":576 * * """ * if self.midi == NULL: # <<<<<<<<<<<<<< * raise Exception("midi Input not open.") * */ } /* "pygame/pypm.pyx":570 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pygame.pypm.Input._check_open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":579 * raise Exception("midi Input not open.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi input device. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_7Close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_6Close, "Close the midi input device.\n\n PortMidi attempts to close open streams when the application exits --\n this is particularly difficult under Windows, so it is best to take\n care to close all devices explicitly.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_7Close = {"Close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_7Close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_6Close}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_7Close(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Close (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("Close", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Close", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_6Close(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_6Close(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self) { PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Close", 1); /* "pygame/pypm.pyx":588 * """ * cdef PmError err * if not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (!(__pyx_v_6pygame_4pypm__pypm_initialized != 0)); if (__pyx_t_1) { /* "pygame/pypm.pyx":589 * cdef PmError err * if not _pypm_initialized: * return # <<<<<<<<<<<<<< * * if not self.midi: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/pypm.pyx":588 * """ * cdef PmError err * if not _pypm_initialized: # <<<<<<<<<<<<<< * return * */ } /* "pygame/pypm.pyx":591 * return * * if not self.midi: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (!(__pyx_v_self->midi != 0)); if (__pyx_t_1) { /* "pygame/pypm.pyx":592 * * if not self.midi: * return # <<<<<<<<<<<<<< * * if self.midi: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pygame/pypm.pyx":591 * return * * if not self.midi: # <<<<<<<<<<<<<< * return * */ } /* "pygame/pypm.pyx":594 * return * * if self.midi: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ __pyx_t_1 = (__pyx_v_self->midi != 0); if (__pyx_t_1) { /* "pygame/pypm.pyx":595 * * if self.midi: * err = Pm_Close(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Close(__pyx_v_self->midi); /* "pygame/pypm.pyx":596 * if self.midi: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_1 = (__pyx_v_err < 0); if (unlikely(__pyx_t_1)) { /* "pygame/pypm.pyx":597 * err = Pm_Close(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * self.midi = NULL */ __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 597, __pyx_L1_error) /* "pygame/pypm.pyx":596 * if self.midi: * err = Pm_Close(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":594 * return * * if self.midi: # <<<<<<<<<<<<<< * err = Pm_Close(self.midi) * if err < 0: */ } /* "pygame/pypm.pyx":599 * raise Exception(Pm_GetErrorText(err)) * * self.midi = NULL # <<<<<<<<<<<<<< * * */ __pyx_v_self->midi = NULL; /* "pygame/pypm.pyx":579 * raise Exception("midi Input not open.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi input device. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Input.Close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":602 * * * def SetFilter(self, filters): # <<<<<<<<<<<<<< * """Set filters on an open input stream. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_9SetFilter(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_8SetFilter, "Set filters on an open input stream.\n\n Usage::\n\n input.SetFilter(filters)\n\n Filters are used to drop selected input event types. By default, only\n active sensing messages are filtered. To prohibit, say, active sensing\n and sysex messages, call\n\n ::\n\n input.SetFilter(FILT_ACTIVE | FILT_SYSEX);\n\n Filtering is useful when midi routing or midi thru functionality is\n being provided by the user application. For example, you may want to\n exclude timing messages (clock, MTC, start/stop/continue), while\n allowing note-related messages to pass. Or you may be using a sequencer\n or drum-machine for MIDI clock information but want to exclude any\n notes it may play.\n\n .. note::\n SetFilter empties the buffer after setting the filter,\n just in case anything got through.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_9SetFilter = {"SetFilter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_9SetFilter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_8SetFilter}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_9SetFilter(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_filters = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetFilter (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filters,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filters)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "SetFilter") < 0)) __PYX_ERR(0, 602, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_filters = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 602, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Input.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_8SetFilter(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self), __pyx_v_filters); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_8SetFilter(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_filters) { PmEvent __pyx_v_buffer[1]; PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetFilter", 1); /* "pygame/pypm.pyx":632 * cdef PmError err * * self._check_open() # <<<<<<<<<<<<<< * * err = Pm_SetFilter(self.midi, filters) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":634 * self._check_open() * * err = Pm_SetFilter(self.midi, filters) # <<<<<<<<<<<<<< * * if err < 0: */ __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_v_filters); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L1_error) __pyx_v_err = Pm_SetFilter(__pyx_v_self->midi, __pyx_t_5); /* "pygame/pypm.pyx":636 * err = Pm_SetFilter(self.midi, filters) * * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_6 = (__pyx_v_err < 0); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":637 * * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * while(Pm_Poll(self.midi) != pmNoError): */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 637, __pyx_L1_error) /* "pygame/pypm.pyx":636 * err = Pm_SetFilter(self.midi, filters) * * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":639 * raise Exception(Pm_GetErrorText(err)) * * while(Pm_Poll(self.midi) != pmNoError): # <<<<<<<<<<<<<< * err = Pm_Read(self.midi, buffer, 1) * if err < 0: */ while (1) { __pyx_t_6 = (Pm_Poll(__pyx_v_self->midi) != pmNoError); if (!__pyx_t_6) break; /* "pygame/pypm.pyx":640 * * while(Pm_Poll(self.midi) != pmNoError): * err = Pm_Read(self.midi, buffer, 1) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Read(__pyx_v_self->midi, __pyx_v_buffer, 1); /* "pygame/pypm.pyx":641 * while(Pm_Poll(self.midi) != pmNoError): * err = Pm_Read(self.midi, buffer, 1) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_6 = (__pyx_v_err < 0); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":642 * err = Pm_Read(self.midi, buffer, 1) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def SetChannelMask(self, mask): */ __pyx_t_2 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 642, __pyx_L1_error) /* "pygame/pypm.pyx":641 * while(Pm_Poll(self.midi) != pmNoError): * err = Pm_Read(self.midi, buffer, 1) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } } /* "pygame/pypm.pyx":602 * * * def SetFilter(self, filters): # <<<<<<<<<<<<<< * """Set filters on an open input stream. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Input.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":644 * raise Exception(Pm_GetErrorText(err)) * * def SetChannelMask(self, mask): # <<<<<<<<<<<<<< * """Set channel mask to filter incoming messages based on channel. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_11SetChannelMask(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_10SetChannelMask, "Set channel mask to filter incoming messages based on channel.\n\n The mask is a 16-bit bitfield corresponding to appropriate channels\n Channel() can assist in calling this function, i.e. to\n receive only input on channel 1, call this method like this::\n\n SetChannelMask(Channel(1))\n\n Multiple channels should be OR'd together::\n\n SetChannelMask(Channel(10) | Channel(11))\n\n .. note::\n The PyPortMidi Channel function has been altered from the original\n PortMidi C call to correct for what seems to be a bug --- i.e.\n channel filters were all numbered from 0 to 15 instead of 1 to 16.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_11SetChannelMask = {"SetChannelMask", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_11SetChannelMask, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_10SetChannelMask}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_11SetChannelMask(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_mask = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetChannelMask (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mask,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mask)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "SetChannelMask") < 0)) __PYX_ERR(0, 644, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_mask = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("SetChannelMask", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 644, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Input.SetChannelMask", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_10SetChannelMask(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self), __pyx_v_mask); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_10SetChannelMask(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_mask) { PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetChannelMask", 1); /* "pygame/pypm.pyx":665 * cdef PmError err * * self._check_open() # <<<<<<<<<<<<<< * * err = Pm_SetChannelMask(self.midi, mask) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":667 * self._check_open() * * err = Pm_SetChannelMask(self.midi, mask) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_mask); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error) __pyx_v_err = Pm_SetChannelMask(__pyx_v_self->midi, __pyx_t_5); /* "pygame/pypm.pyx":668 * * err = Pm_SetChannelMask(self.midi, mask) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_6 = (__pyx_v_err < 0); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":669 * err = Pm_SetChannelMask(self.midi, mask) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * def Poll(self): */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 669, __pyx_L1_error) /* "pygame/pypm.pyx":668 * * err = Pm_SetChannelMask(self.midi, mask) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":644 * raise Exception(Pm_GetErrorText(err)) * * def SetChannelMask(self, mask): # <<<<<<<<<<<<<< * """Set channel mask to filter incoming messages based on channel. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Input.SetChannelMask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":671 * raise Exception(Pm_GetErrorText(err)) * * def Poll(self): # <<<<<<<<<<<<<< * """Test whether input is available. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_13Poll(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_12Poll, "Test whether input is available.\n\n Returns TRUE if input can be read, FALSE otherwise, or an error value.\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_13Poll = {"Poll", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_13Poll, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_12Poll}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_13Poll(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Poll (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("Poll", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Poll", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_12Poll(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_12Poll(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self) { PmError __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Poll", 1); /* "pygame/pypm.pyx":679 * cdef PmError err * * self._check_open() # <<<<<<<<<<<<<< * * err = Pm_Poll(self.midi) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":681 * self._check_open() * * err = Pm_Poll(self.midi) # <<<<<<<<<<<<<< * if err < 0: * raise Exception(Pm_GetErrorText(err)) */ __pyx_v_err = Pm_Poll(__pyx_v_self->midi); /* "pygame/pypm.pyx":682 * * err = Pm_Poll(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ __pyx_t_5 = (__pyx_v_err < 0); if (unlikely(__pyx_t_5)) { /* "pygame/pypm.pyx":683 * err = Pm_Poll(self.midi) * if err < 0: * raise Exception(Pm_GetErrorText(err)) # <<<<<<<<<<<<<< * * return err */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_err)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 683, __pyx_L1_error) /* "pygame/pypm.pyx":682 * * err = Pm_Poll(self.midi) * if err < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(err)) * */ } /* "pygame/pypm.pyx":685 * raise Exception(Pm_GetErrorText(err)) * * return err # <<<<<<<<<<<<<< * * def Read(self, max_events): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PmError(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pygame/pypm.pyx":671 * raise Exception(Pm_GetErrorText(err)) * * def Poll(self): # <<<<<<<<<<<<<< * """Test whether input is available. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pygame.pypm.Input.Poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pygame/pypm.pyx":687 * return err * * def Read(self, max_events): # <<<<<<<<<<<<<< * """Read and return up to max_events events from input. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_15Read(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_6pygame_4pypm_5Input_14Read, "Read and return up to max_events events from input.\n\n Reads up to max_events midi events stored in the input buffer and\n returns them as a list in the following form::\n\n [\n [[status, data1, data2, data3], timestamp],\n [[status, data1, data2, data3], timestamp],\n ...\n ]\n\n "); static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_15Read = {"Read", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_15Read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_14Read}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_15Read(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_max_events = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_max_events,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_events)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "Read") < 0)) __PYX_ERR(0, 687, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_max_events = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 687, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Input.Read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_14Read(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self), __pyx_v_max_events); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_14Read(struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, PyObject *__pyx_v_max_events) { PmEvent __pyx_v_buffer[0x400]; PmError __pyx_v_num_events; PyObject *__pyx_v_events = NULL; int __pyx_v_ev_no; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; unsigned int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; long __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Read", 1); /* "pygame/pypm.pyx":703 * cdef PmError num_events * * self._check_open() # <<<<<<<<<<<<<< * * if max_events > 1024: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/pypm.pyx":705 * self._check_open() * * if max_events > 1024: # <<<<<<<<<<<<<< * raise ValueError('Maximum buffer length is 1024.') * if not max_events: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_events, __pyx_int_1024, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_5)) { /* "pygame/pypm.pyx":706 * * if max_events > 1024: * raise ValueError('Maximum buffer length is 1024.') # <<<<<<<<<<<<<< * if not max_events: * raise ValueError('Minimum buffer length is 1.') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 706, __pyx_L1_error) /* "pygame/pypm.pyx":705 * self._check_open() * * if max_events > 1024: # <<<<<<<<<<<<<< * raise ValueError('Maximum buffer length is 1024.') * if not max_events: */ } /* "pygame/pypm.pyx":707 * if max_events > 1024: * raise ValueError('Maximum buffer length is 1024.') * if not max_events: # <<<<<<<<<<<<<< * raise ValueError('Minimum buffer length is 1.') * */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_events); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 707, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":708 * raise ValueError('Maximum buffer length is 1024.') * if not max_events: * raise ValueError('Minimum buffer length is 1.') # <<<<<<<<<<<<<< * * num_events = Pm_Read(self.midi, buffer, max_events) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 708, __pyx_L1_error) /* "pygame/pypm.pyx":707 * if max_events > 1024: * raise ValueError('Maximum buffer length is 1024.') * if not max_events: # <<<<<<<<<<<<<< * raise ValueError('Minimum buffer length is 1.') * */ } /* "pygame/pypm.pyx":710 * raise ValueError('Minimum buffer length is 1.') * * num_events = Pm_Read(self.midi, buffer, max_events) # <<<<<<<<<<<<<< * if num_events < 0: * raise Exception(Pm_GetErrorText(num_events)) */ __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_v_max_events); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error) __pyx_v_num_events = Pm_Read(__pyx_v_self->midi, __pyx_v_buffer, __pyx_t_7); /* "pygame/pypm.pyx":711 * * num_events = Pm_Read(self.midi, buffer, max_events) * if num_events < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(num_events)) * */ __pyx_t_6 = (__pyx_v_num_events < 0); if (unlikely(__pyx_t_6)) { /* "pygame/pypm.pyx":712 * num_events = Pm_Read(self.midi, buffer, max_events) * if num_events < 0: * raise Exception(Pm_GetErrorText(num_events)) # <<<<<<<<<<<<<< * * events = [] */ __pyx_t_1 = __Pyx_PyBytes_FromString(Pm_GetErrorText(__pyx_v_num_events)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 712, __pyx_L1_error) /* "pygame/pypm.pyx":711 * * num_events = Pm_Read(self.midi, buffer, max_events) * if num_events < 0: # <<<<<<<<<<<<<< * raise Exception(Pm_GetErrorText(num_events)) * */ } /* "pygame/pypm.pyx":714 * raise Exception(Pm_GetErrorText(num_events)) * * events = [] # <<<<<<<<<<<<<< * if num_events >= 1: * for ev_no in range(num_events): */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_events = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":715 * * events = [] * if num_events >= 1: # <<<<<<<<<<<<<< * for ev_no in range(num_events): * events.append( */ __pyx_t_6 = (__pyx_v_num_events >= 1); if (__pyx_t_6) { /* "pygame/pypm.pyx":716 * events = [] * if num_events >= 1: * for ev_no in range(num_events): # <<<<<<<<<<<<<< * events.append( * [ */ __pyx_t_8 = ((int)__pyx_v_num_events); __pyx_t_9 = __pyx_t_8; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_ev_no = __pyx_t_10; /* "pygame/pypm.pyx":720 * [ * [ * buffer[ev_no].message & 0xFF, # <<<<<<<<<<<<<< * (buffer[ev_no].message >> 8) & 0xFF, * (buffer[ev_no].message >> 16) & 0xFF, */ __pyx_t_2 = __Pyx_PyInt_From_PmMessage(((__pyx_v_buffer[__pyx_v_ev_no]).message & 0xFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pygame/pypm.pyx":721 * [ * buffer[ev_no].message & 0xFF, * (buffer[ev_no].message >> 8) & 0xFF, # <<<<<<<<<<<<<< * (buffer[ev_no].message >> 16) & 0xFF, * (buffer[ev_no].message >> 24) & 0xFF */ __pyx_t_1 = __Pyx_PyInt_From_PmMessage((((__pyx_v_buffer[__pyx_v_ev_no]).message >> 8) & 0xFF)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pygame/pypm.pyx":722 * buffer[ev_no].message & 0xFF, * (buffer[ev_no].message >> 8) & 0xFF, * (buffer[ev_no].message >> 16) & 0xFF, # <<<<<<<<<<<<<< * (buffer[ev_no].message >> 24) & 0xFF * ], */ __pyx_t_3 = __Pyx_PyInt_From_PmMessage((((__pyx_v_buffer[__pyx_v_ev_no]).message >> 16) & 0xFF)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "pygame/pypm.pyx":723 * (buffer[ev_no].message >> 8) & 0xFF, * (buffer[ev_no].message >> 16) & 0xFF, * (buffer[ev_no].message >> 24) & 0xFF # <<<<<<<<<<<<<< * ], * buffer[ev_no].timestamp */ __pyx_t_11 = __Pyx_PyInt_From_PmMessage((((__pyx_v_buffer[__pyx_v_ev_no]).message >> 24) & 0xFF)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "pygame/pypm.pyx":719 * events.append( * [ * [ # <<<<<<<<<<<<<< * buffer[ev_no].message & 0xFF, * (buffer[ev_no].message >> 8) & 0xFF, */ __pyx_t_12 = PyList_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 3, __pyx_t_11)) __PYX_ERR(0, 719, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_11 = 0; /* "pygame/pypm.pyx":725 * (buffer[ev_no].message >> 24) & 0xFF * ], * buffer[ev_no].timestamp # <<<<<<<<<<<<<< * ] * ) */ __pyx_t_11 = __Pyx_PyInt_From_PmTimestamp((__pyx_v_buffer[__pyx_v_ev_no]).timestamp); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "pygame/pypm.pyx":718 * for ev_no in range(num_events): * events.append( * [ # <<<<<<<<<<<<<< * [ * buffer[ev_no].message & 0xFF, */ __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_12); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_12)) __PYX_ERR(0, 718, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_11)) __PYX_ERR(0, 718, __pyx_L1_error); __pyx_t_12 = 0; __pyx_t_11 = 0; /* "pygame/pypm.pyx":717 * if num_events >= 1: * for ev_no in range(num_events): * events.append( # <<<<<<<<<<<<<< * [ * [ */ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_events, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pygame/pypm.pyx":715 * * events = [] * if num_events >= 1: # <<<<<<<<<<<<<< * for ev_no in range(num_events): * events.append( */ } /* "pygame/pypm.pyx":729 * ) * * return events # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_events); __pyx_r = __pyx_v_events; goto __pyx_L0; /* "pygame/pypm.pyx":687 * return err * * def Read(self, max_events): # <<<<<<<<<<<<<< * """Read and return up to max_events events from input. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pygame.pypm.Input.Read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_events); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_17__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_17__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_16__reduce_cython__(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 1); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_midi_cannot_be_converted_to, 0, 0); __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame.pypm.Input.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_4pypm_5Input_19__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_6pygame_4pypm_5Input_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pygame_4pypm_5Input_19__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_AddTraceback("pygame.pypm.Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_4pypm_5Input_18__setstate_cython__(((struct __pyx_obj_6pygame_4pypm_Input *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pygame_4pypm_5Input_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_4pypm_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 1); /* "(tree fragment)":4 * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_midi_cannot_be_converted_to, 0, 0); __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pygame.pypm.Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pygame_4pypm_Output(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif return o; } static void __pyx_tp_dealloc_6pygame_4pypm_Output(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_4pypm_Output) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_4pypm_6Output_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyMethodDef __pyx_methods_6pygame_4pypm_Output[] = { {"_check_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_5_check_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_4_check_open}, {"Close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_7Close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_6Close}, {"Abort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_9Abort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_8Abort}, {"Write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_11Write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_10Write}, {"WriteShort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_13WriteShort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_12WriteShort}, {"WriteSysEx", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_15WriteSysEx, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_6Output_14WriteSysEx}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_6Output_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_4pypm_Output_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_4pypm_Output}, {Py_tp_doc, (void *)PyDoc_STR("Represents an output MIDI stream device.\n\n Takes the form::\n\n output = pypm.Output(output_device, latency)\n\n latency is in ms. If latency == 0 then timestamps for output are ignored.\n\n ")}, {Py_tp_methods, (void *)__pyx_methods_6pygame_4pypm_Output}, {Py_tp_init, (void *)__pyx_pw_6pygame_4pypm_6Output_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_4pypm_Output}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_4pypm_Output_spec = { "pygame.pypm.Output", sizeof(struct __pyx_obj_6pygame_4pypm_Output), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_6pygame_4pypm_Output_slots, }; #else static PyTypeObject __pyx_type_6pygame_4pypm_Output = { PyVarObject_HEAD_INIT(0, 0) "pygame.pypm.""Output", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_4pypm_Output), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_4pypm_Output, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ PyDoc_STR("Represents an output MIDI stream device.\n\n Takes the form::\n\n output = pypm.Output(output_device, latency)\n\n latency is in ms. If latency == 0 then timestamps for output are ignored.\n\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_4pypm_Output, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_4pypm_6Output_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_4pypm_Output, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_6pygame_4pypm_Input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; #endif return o; } static void __pyx_tp_dealloc_6pygame_4pypm_Input(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pygame_4pypm_Input) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6pygame_4pypm_5Input_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY (*Py_TYPE(o)->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); if (tp_free) tp_free(o); } #endif } static PyMethodDef __pyx_methods_6pygame_4pypm_Input[] = { {"_check_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_5_check_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_4_check_open}, {"Close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_7Close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_6Close}, {"SetFilter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_9SetFilter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_8SetFilter}, {"SetChannelMask", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_11SetChannelMask, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_10SetChannelMask}, {"Poll", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_13Poll, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_12Poll}, {"Read", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_15Read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pygame_4pypm_5Input_14Read}, {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pygame_4pypm_5Input_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_6pygame_4pypm_Input_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pygame_4pypm_Input}, {Py_tp_doc, (void *)PyDoc_STR("Represents an input MIDI stream device.\n\n Takes the form::\n\n input = pypm.Input(input_device)\n\n ")}, {Py_tp_methods, (void *)__pyx_methods_6pygame_4pypm_Input}, {Py_tp_init, (void *)__pyx_pw_6pygame_4pypm_5Input_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_6pygame_4pypm_Input}, {0, 0}, }; static PyType_Spec __pyx_type_6pygame_4pypm_Input_spec = { "pygame.pypm.Input", sizeof(struct __pyx_obj_6pygame_4pypm_Input), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_6pygame_4pypm_Input_slots, }; #else static PyTypeObject __pyx_type_6pygame_4pypm_Input = { PyVarObject_HEAD_INIT(0, 0) "pygame.pypm.""Input", /*tp_name*/ sizeof(struct __pyx_obj_6pygame_4pypm_Input), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_4pypm_Input, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ PyDoc_STR("Represents an input MIDI stream device.\n\n Takes the form::\n\n input = pypm.Input(input_device)\n\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pygame_4pypm_Input, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_6pygame_4pypm_5Input_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pygame_4pypm_Input, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif /* #### Code section: pystring_table ### */ static int __Pyx_CreateStringTabAndInitStrings(void) { __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_0_0_6, __pyx_k_0_0_6, sizeof(__pyx_k_0_0_6), 0, 0, 1, 0}, {&__pyx_n_s_Abort, __pyx_k_Abort, sizeof(__pyx_k_Abort), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_n_s_Channel, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 0, 1, 1}, {&__pyx_n_s_Close, __pyx_k_Close, sizeof(__pyx_k_Close), 0, 0, 1, 1}, {&__pyx_kp_s_Closing_MIDI_input_stream_and_de, __pyx_k_Closing_MIDI_input_stream_and_de, sizeof(__pyx_k_Closing_MIDI_input_stream_and_de), 0, 0, 1, 0}, {&__pyx_kp_s_Closing_MIDI_output_stream_and_d, __pyx_k_Closing_MIDI_output_stream_and_d, sizeof(__pyx_k_Closing_MIDI_output_stream_and_d), 0, 0, 1, 0}, {&__pyx_n_s_CountDevices, __pyx_k_CountDevices, sizeof(__pyx_k_CountDevices), 0, 0, 1, 1}, {&__pyx_n_s_FALSE, __pyx_k_FALSE, sizeof(__pyx_k_FALSE), 0, 0, 1, 1}, {&__pyx_n_s_FILT_ACTIVE, __pyx_k_FILT_ACTIVE, sizeof(__pyx_k_FILT_ACTIVE), 0, 0, 1, 1}, {&__pyx_n_s_FILT_AFTERTOUCH, __pyx_k_FILT_AFTERTOUCH, sizeof(__pyx_k_FILT_AFTERTOUCH), 0, 0, 1, 1}, {&__pyx_n_s_FILT_CHANNEL_AFTERTOUCH, __pyx_k_FILT_CHANNEL_AFTERTOUCH, sizeof(__pyx_k_FILT_CHANNEL_AFTERTOUCH), 0, 0, 1, 1}, {&__pyx_n_s_FILT_CLOCK, __pyx_k_FILT_CLOCK, sizeof(__pyx_k_FILT_CLOCK), 0, 0, 1, 1}, {&__pyx_n_s_FILT_CONTROL, __pyx_k_FILT_CONTROL, sizeof(__pyx_k_FILT_CONTROL), 0, 0, 1, 1}, {&__pyx_n_s_FILT_F9, __pyx_k_FILT_F9, sizeof(__pyx_k_FILT_F9), 0, 0, 1, 1}, {&__pyx_n_s_FILT_FD, __pyx_k_FILT_FD, sizeof(__pyx_k_FILT_FD), 0, 0, 1, 1}, {&__pyx_n_s_FILT_MTC, __pyx_k_FILT_MTC, sizeof(__pyx_k_FILT_MTC), 0, 0, 1, 1}, {&__pyx_n_s_FILT_NOTE, __pyx_k_FILT_NOTE, sizeof(__pyx_k_FILT_NOTE), 0, 0, 1, 1}, {&__pyx_n_s_FILT_PITCHBEND, __pyx_k_FILT_PITCHBEND, sizeof(__pyx_k_FILT_PITCHBEND), 0, 0, 1, 1}, {&__pyx_n_s_FILT_PLAY, __pyx_k_FILT_PLAY, sizeof(__pyx_k_FILT_PLAY), 0, 0, 1, 1}, {&__pyx_n_s_FILT_POLY_AFTERTOUCH, __pyx_k_FILT_POLY_AFTERTOUCH, sizeof(__pyx_k_FILT_POLY_AFTERTOUCH), 0, 0, 1, 1}, {&__pyx_n_s_FILT_PROGRAM, __pyx_k_FILT_PROGRAM, sizeof(__pyx_k_FILT_PROGRAM), 0, 0, 1, 1}, {&__pyx_n_s_FILT_REALTIME, __pyx_k_FILT_REALTIME, sizeof(__pyx_k_FILT_REALTIME), 0, 0, 1, 1}, {&__pyx_n_s_FILT_RESET, __pyx_k_FILT_RESET, sizeof(__pyx_k_FILT_RESET), 0, 0, 1, 1}, {&__pyx_n_s_FILT_SONG_POSITION, __pyx_k_FILT_SONG_POSITION, sizeof(__pyx_k_FILT_SONG_POSITION), 0, 0, 1, 1}, {&__pyx_n_s_FILT_SONG_SELECT, __pyx_k_FILT_SONG_SELECT, sizeof(__pyx_k_FILT_SONG_SELECT), 0, 0, 1, 1}, {&__pyx_n_s_FILT_SYSEX, __pyx_k_FILT_SYSEX, sizeof(__pyx_k_FILT_SYSEX), 0, 0, 1, 1}, {&__pyx_n_s_FILT_TICK, __pyx_k_FILT_TICK, sizeof(__pyx_k_FILT_TICK), 0, 0, 1, 1}, {&__pyx_n_s_FILT_TUNE, __pyx_k_FILT_TUNE, sizeof(__pyx_k_FILT_TUNE), 0, 0, 1, 1}, {&__pyx_n_s_FILT_UNDEFINED, __pyx_k_FILT_UNDEFINED, sizeof(__pyx_k_FILT_UNDEFINED), 0, 0, 1, 1}, {&__pyx_n_s_GetDefaultInputDeviceID, __pyx_k_GetDefaultInputDeviceID, sizeof(__pyx_k_GetDefaultInputDeviceID), 0, 0, 1, 1}, {&__pyx_n_s_GetDefaultOutputDeviceID, __pyx_k_GetDefaultOutputDeviceID, sizeof(__pyx_k_GetDefaultOutputDeviceID), 0, 0, 1, 1}, {&__pyx_n_s_GetDeviceInfo, __pyx_k_GetDeviceInfo, sizeof(__pyx_k_GetDeviceInfo), 0, 0, 1, 1}, {&__pyx_n_s_GetErrorText, __pyx_k_GetErrorText, sizeof(__pyx_k_GetErrorText), 0, 0, 1, 1}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_Initialize, __pyx_k_Initialize, sizeof(__pyx_k_Initialize), 0, 0, 1, 1}, {&__pyx_n_s_Input, __pyx_k_Input, sizeof(__pyx_k_Input), 0, 0, 1, 1}, {&__pyx_n_s_Input_Close, __pyx_k_Input_Close, sizeof(__pyx_k_Input_Close), 0, 0, 1, 1}, {&__pyx_n_s_Input_Poll, __pyx_k_Input_Poll, sizeof(__pyx_k_Input_Poll), 0, 0, 1, 1}, {&__pyx_n_s_Input_Read, __pyx_k_Input_Read, sizeof(__pyx_k_Input_Read), 0, 0, 1, 1}, {&__pyx_n_s_Input_SetChannelMask, __pyx_k_Input_SetChannelMask, sizeof(__pyx_k_Input_SetChannelMask), 0, 0, 1, 1}, {&__pyx_n_s_Input_SetFilter, __pyx_k_Input_SetFilter, sizeof(__pyx_k_Input_SetFilter), 0, 0, 1, 1}, {&__pyx_n_s_Input___reduce_cython, __pyx_k_Input___reduce_cython, sizeof(__pyx_k_Input___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Input___setstate_cython, __pyx_k_Input___setstate_cython, sizeof(__pyx_k_Input___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Input__check_open, __pyx_k_Input__check_open, sizeof(__pyx_k_Input__check_open), 0, 0, 1, 1}, {&__pyx_kp_s_MIDI_input_opened, __pyx_k_MIDI_input_opened, sizeof(__pyx_k_MIDI_input_opened), 0, 0, 1, 0}, {&__pyx_kp_s_Maximum_buffer_length_is_1024, __pyx_k_Maximum_buffer_length_is_1024, sizeof(__pyx_k_Maximum_buffer_length_is_1024), 0, 0, 1, 0}, {&__pyx_kp_s_Maximum_event_list_length_is_102, __pyx_k_Maximum_event_list_length_is_102, sizeof(__pyx_k_Maximum_event_list_length_is_102), 0, 0, 1, 0}, {&__pyx_kp_s_Minimum_buffer_length_is_1, __pyx_k_Minimum_buffer_length_is_1, sizeof(__pyx_k_Minimum_buffer_length_is_1), 0, 0, 1, 0}, {&__pyx_kp_s_No_data_in_event_no_i, __pyx_k_No_data_in_event_no_i, sizeof(__pyx_k_No_data_in_event_no_i), 0, 0, 1, 0}, {&__pyx_kp_s_Opening_Midi_Output, __pyx_k_Opening_Midi_Output, sizeof(__pyx_k_Opening_Midi_Output), 0, 0, 1, 0}, {&__pyx_n_s_Output, __pyx_k_Output, sizeof(__pyx_k_Output), 0, 0, 1, 1}, {&__pyx_n_s_Output_Abort, __pyx_k_Output_Abort, sizeof(__pyx_k_Output_Abort), 0, 0, 1, 1}, {&__pyx_n_s_Output_Close, __pyx_k_Output_Close, sizeof(__pyx_k_Output_Close), 0, 0, 1, 1}, {&__pyx_n_s_Output_Write, __pyx_k_Output_Write, sizeof(__pyx_k_Output_Write), 0, 0, 1, 1}, {&__pyx_n_s_Output_WriteShort, __pyx_k_Output_WriteShort, sizeof(__pyx_k_Output_WriteShort), 0, 0, 1, 1}, {&__pyx_n_s_Output_WriteSysEx, __pyx_k_Output_WriteSysEx, sizeof(__pyx_k_Output_WriteSysEx), 0, 0, 1, 1}, {&__pyx_n_s_Output___reduce_cython, __pyx_k_Output___reduce_cython, sizeof(__pyx_k_Output___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_Output___setstate_cython, __pyx_k_Output___setstate_cython, sizeof(__pyx_k_Output___setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_Output__check_open, __pyx_k_Output__check_open, sizeof(__pyx_k_Output__check_open), 0, 0, 1, 1}, {&__pyx_kp_s_Pm_OpenOutput_err, __pyx_k_Pm_OpenOutput_err, sizeof(__pyx_k_Pm_OpenOutput_err), 0, 0, 1, 0}, {&__pyx_n_s_Poll, __pyx_k_Poll, sizeof(__pyx_k_Poll), 0, 0, 1, 1}, {&__pyx_n_s_Read, __pyx_k_Read, sizeof(__pyx_k_Read), 0, 0, 1, 1}, {&__pyx_n_s_SetChannelMask, __pyx_k_SetChannelMask, sizeof(__pyx_k_SetChannelMask), 0, 0, 1, 1}, {&__pyx_n_s_SetFilter, __pyx_k_SetFilter, sizeof(__pyx_k_SetFilter), 0, 0, 1, 1}, {&__pyx_n_s_TRUE, __pyx_k_TRUE, sizeof(__pyx_k_TRUE), 0, 0, 1, 1}, {&__pyx_n_s_Terminate, __pyx_k_Terminate, sizeof(__pyx_k_Terminate), 0, 0, 1, 1}, {&__pyx_n_s_Time, __pyx_k_Time, sizeof(__pyx_k_Time), 0, 0, 1, 1}, {&__pyx_kp_s_Too_many_data_bytes_i_in_event_n, __pyx_k_Too_many_data_bytes_i_in_event_n, sizeof(__pyx_k_Too_many_data_bytes_i_in_event_n), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_open_Midi_OutputDevice, __pyx_k_Unable_to_open_Midi_OutputDevice, sizeof(__pyx_k_Unable_to_open_Midi_OutputDevice), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_Write, __pyx_k_Write, sizeof(__pyx_k_Write), 0, 0, 1, 1}, {&__pyx_n_s_WriteShort, __pyx_k_WriteShort, sizeof(__pyx_k_WriteShort), 0, 0, 1, 1}, {&__pyx_n_s_WriteSysEx, __pyx_k_WriteSysEx, sizeof(__pyx_k_WriteSysEx), 0, 0, 1, 1}, {&__pyx_kp_s_Writing_to_MIDI_buffer, __pyx_k_Writing_to_MIDI_buffer, sizeof(__pyx_k_Writing_to_MIDI_buffer), 0, 0, 1, 0}, {&__pyx_kp_s_Writing_to_midi_buffer, __pyx_k_Writing_to_midi_buffer, sizeof(__pyx_k_Writing_to_midi_buffer), 0, 0, 1, 0}, {&__pyx_n_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 1}, {&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1}, {&__pyx_n_s_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 0, 1, 1}, {&__pyx_n_s_buffersize, __pyx_k_buffersize, sizeof(__pyx_k_buffersize), 0, 0, 1, 1}, {&__pyx_n_s_chan, __pyx_k_chan, sizeof(__pyx_k_chan), 0, 0, 1, 1}, {&__pyx_n_s_check_open, __pyx_k_check_open, sizeof(__pyx_k_check_open), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_cmsg, __pyx_k_cmsg, sizeof(__pyx_k_cmsg), 0, 0, 1, 1}, {&__pyx_n_s_cur_time, __pyx_k_cur_time, sizeof(__pyx_k_cur_time), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_data1, __pyx_k_data1, sizeof(__pyx_k_data1), 0, 0, 1, 1}, {&__pyx_n_s_data2, __pyx_k_data2, sizeof(__pyx_k_data2), 0, 0, 1, 1}, {&__pyx_n_s_device_no, __pyx_k_device_no, sizeof(__pyx_k_device_no), 0, 0, 1, 1}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1}, {&__pyx_n_s_ev_no, __pyx_k_ev_no, sizeof(__pyx_k_ev_no), 0, 0, 1, 1}, {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, {&__pyx_n_s_events, __pyx_k_events, sizeof(__pyx_k_events), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_filters, __pyx_k_filters, sizeof(__pyx_k_filters), 0, 0, 1, 1}, {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_kp_s_i_r_s, __pyx_k_i_r_s, sizeof(__pyx_k_i_r_s), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, {&__pyx_n_s_input_device, __pyx_k_input_device, sizeof(__pyx_k_input_device), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1}, {&__pyx_n_s_latency, __pyx_k_latency, sizeof(__pyx_k_latency), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_max_events, __pyx_k_max_events, sizeof(__pyx_k_max_events), 0, 0, 1, 1}, {&__pyx_kp_s_midi_Input_not_open, __pyx_k_midi_Input_not_open, sizeof(__pyx_k_midi_Input_not_open), 0, 0, 1, 0}, {&__pyx_kp_s_midi_Output_aborted_Need_to_call, __pyx_k_midi_Output_aborted_Need_to_call, sizeof(__pyx_k_midi_Output_aborted_Need_to_call), 0, 0, 1, 0}, {&__pyx_kp_s_midi_Output_not_open, __pyx_k_midi_Output_not_open, sizeof(__pyx_k_midi_Output_not_open), 0, 0, 1, 0}, {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_num_events, __pyx_k_num_events, sizeof(__pyx_k_num_events), 0, 0, 1, 1}, {&__pyx_n_s_output_device, __pyx_k_output_device, sizeof(__pyx_k_output_device), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_pygame_pypm, __pyx_k_pygame_pypm, sizeof(__pyx_k_pygame_pypm), 0, 0, 1, 1}, {&__pyx_n_s_pypm_initialized, __pyx_k_pypm_initialized, sizeof(__pyx_k_pypm_initialized), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_s_self_midi_cannot_be_converted_to, __pyx_k_self_midi_cannot_be_converted_to, sizeof(__pyx_k_self_midi_cannot_be_converted_to), 0, 0, 1, 0}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_k_src_c_cython_pygame_pypm_pyx, sizeof(__pyx_k_src_c_cython_pygame_pypm_pyx), 0, 0, 1, 0}, {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_tobytes, __pyx_k_tobytes, sizeof(__pyx_k_tobytes), 0, 0, 1, 1}, {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1}, {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; return __Pyx_InitStrings(__pyx_string_tab); } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 413, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 415, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 417, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 424, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pygame/pypm.pyx":327 * * if self.midi == NULL: * raise Exception("midi Output not open.") # <<<<<<<<<<<<<< * * if self._aborted: */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_midi_Output_not_open); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pygame/pypm.pyx":330 * * if self._aborted: * raise Exception( # <<<<<<<<<<<<<< * "midi Output aborted. Need to call Close after Abort.") * */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_midi_Output_aborted_Need_to_call); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pygame/pypm.pyx":413 * * if len(data) > 1024: * raise IndexError('Maximum event list length is 1024.') # <<<<<<<<<<<<<< * else: * for ev_no, event in enumerate(data): */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Maximum_event_list_length_is_102); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pygame/pypm.pyx":577 * """ * if self.midi == NULL: * raise Exception("midi Input not open.") # <<<<<<<<<<<<<< * * def Close(self): */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_midi_Input_not_open); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pygame/pypm.pyx":706 * * if max_events > 1024: * raise ValueError('Maximum buffer length is 1024.') # <<<<<<<<<<<<<< * if not max_events: * raise ValueError('Minimum buffer length is 1.') */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Maximum_buffer_length_is_1024); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pygame/pypm.pyx":708 * raise ValueError('Maximum buffer length is 1024.') * if not max_events: * raise ValueError('Minimum buffer length is 1.') # <<<<<<<<<<<<<< * * num_events = Pm_Read(self.midi, buffer, max_events) */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Minimum_buffer_length_is_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pygame/pypm.pyx":154 * cdef long _pypm_initialized * * def Initialize(): # <<<<<<<<<<<<<< * """Initialize PortMidi library. * */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_pypm_initialized); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Initialize, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 154, __pyx_L1_error) /* "pygame/pypm.pyx":166 * _pypm_initialized = 1 * * def Terminate(): # <<<<<<<<<<<<<< * """Terminate use of PortMidi library. * */ __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Terminate, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 166, __pyx_L1_error) /* "pygame/pypm.pyx":179 * * * def GetDefaultInputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI input device. * */ __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_GetDefaultInputDeviceID, 179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 179, __pyx_L1_error) /* "pygame/pypm.pyx":188 * return Pm_GetDefaultInputDeviceID() * * def GetDefaultOutputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI output device. * */ __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_GetDefaultOutputDeviceID, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 188, __pyx_L1_error) /* "pygame/pypm.pyx":197 * return Pm_GetDefaultOutputDeviceID() * * def CountDevices(): # <<<<<<<<<<<<<< * """Return number of available MIDI (input and output) devices.""" * */ __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_CountDevices, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 197, __pyx_L1_error) /* "pygame/pypm.pyx":202 * return Pm_CountDevices() * * def GetDeviceInfo(device_no): # <<<<<<<<<<<<<< * """Return device info tuple for MIDI device given by device_no. * */ __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_device_no, __pyx_n_s_info); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_GetDeviceInfo, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 202, __pyx_L1_error) /* "pygame/pypm.pyx":224 * # return None * * def Time(): # <<<<<<<<<<<<<< * """Return the current time in ms of the PortMidi timer.""" * */ __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Time, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 224, __pyx_L1_error) /* "pygame/pypm.pyx":229 * return Pt_Time() * * def GetErrorText(err): # <<<<<<<<<<<<<< * """Return human-readable error message translated from error number.""" * */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_err); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_GetErrorText, 229, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 229, __pyx_L1_error) /* "pygame/pypm.pyx":234 * return Pm_GetErrorText(err) * * def Channel(chan): # <<<<<<<<<<<<<< * """Return Channel object for given MIDI channel number 1 - 16. * */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_chan); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Channel, 234, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 234, __pyx_L1_error) /* "pygame/pypm.pyx":319 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_check_open, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 319, __pyx_L1_error) /* "pygame/pypm.pyx":333 * "midi Output aborted. Need to call Close after Abort.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi output device, flushing any pending buffers. * */ __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_err); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Close, 333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 333, __pyx_L1_error) /* "pygame/pypm.pyx":352 * self.midi = NULL * * def Abort(self): # <<<<<<<<<<<<<< * """Terminate outgoing messages immediately. * */ __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Abort, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 352, __pyx_L1_error) /* "pygame/pypm.pyx":372 * self._aborted = 1 * * def Write(self, data): # <<<<<<<<<<<<<< * """Output a series of MIDI events given by data list n this device. * */ __pyx_tuple__26 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_buffer, __pyx_n_s_err, __pyx_n_s_item, __pyx_n_s_ev_no, __pyx_n_s_event); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Write, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 372, __pyx_L1_error) /* "pygame/pypm.pyx":440 * raise Exception(Pm_GetErrorText(err)) * * def WriteShort(self, status, data1=0, data2=0): # <<<<<<<<<<<<<< * """Output MIDI event of three bytes or less immediately on this device. * */ __pyx_tuple__28 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_status, __pyx_n_s_data1, __pyx_n_s_data2, __pyx_n_s_buffer, __pyx_n_s_err); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_WriteShort, 440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 440, __pyx_L1_error) __pyx_tuple__30 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pygame/pypm.pyx":480 * raise Exception(Pm_GetErrorText(err)) * * def WriteSysEx(self, when, msg): # <<<<<<<<<<<<<< * """Output a timestamped system-exclusive MIDI message on this device. * */ __pyx_tuple__31 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_when, __pyx_n_s_msg, __pyx_n_s_err, __pyx_n_s_cmsg, __pyx_n_s_cur_time, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_WriteSysEx, 480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 480, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 3, __pyx_L1_error) /* "pygame/pypm.pyx":570 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_check_open, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 570, __pyx_L1_error) /* "pygame/pypm.pyx":579 * raise Exception("midi Input not open.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi input device. * */ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Close, 579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 579, __pyx_L1_error) /* "pygame/pypm.pyx":602 * * * def SetFilter(self, filters): # <<<<<<<<<<<<<< * """Set filters on an open input stream. * */ __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filters, __pyx_n_s_buffer, __pyx_n_s_err); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_SetFilter, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 602, __pyx_L1_error) /* "pygame/pypm.pyx":644 * raise Exception(Pm_GetErrorText(err)) * * def SetChannelMask(self, mask): # <<<<<<<<<<<<<< * """Set channel mask to filter incoming messages based on channel. * */ __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_mask, __pyx_n_s_err); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_SetChannelMask, 644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 644, __pyx_L1_error) /* "pygame/pypm.pyx":671 * raise Exception(Pm_GetErrorText(err)) * * def Poll(self): # <<<<<<<<<<<<<< * """Test whether input is available. * */ __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Poll, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 671, __pyx_L1_error) /* "pygame/pypm.pyx":687 * return err * * def Read(self, max_events): # <<<<<<<<<<<<<< * """Read and return up to max_events events from input. * */ __pyx_tuple__43 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_max_events, __pyx_n_s_buffer, __pyx_n_s_num_events, __pyx_n_s_events, __pyx_n_s_ev_no); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame_pypm_pyx, __pyx_n_s_Read, 687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 687, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_48 = PyInt_FromLong(48); if (unlikely(!__pyx_int_48)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_768 = PyInt_FromLong(768); if (unlikely(!__pyx_int_768)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2048 = PyInt_FromLong(2048); if (unlikely(!__pyx_int_2048)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_8192 = PyInt_FromLong(8192); if (unlikely(!__pyx_int_8192)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_16384 = PyInt_FromLong(16384L); if (unlikely(!__pyx_int_16384)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_32768 = PyInt_FromLong(32768L); if (unlikely(!__pyx_int_32768)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_65280 = PyInt_FromLong(65280L); if (unlikely(!__pyx_int_65280)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_16711680 = PyInt_FromLong(16711680L); if (unlikely(!__pyx_int_16711680)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_globals ### */ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { return 0; } /* #### Code section: init_module ### */ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_4pypm_Output = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_4pypm_Output_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_4pypm_Output)) __PYX_ERR(0, 256, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_4pypm_Output_spec, __pyx_ptype_6pygame_4pypm_Output) < 0) __PYX_ERR(0, 256, __pyx_L1_error) #else __pyx_ptype_6pygame_4pypm_Output = &__pyx_type_6pygame_4pypm_Output; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_4pypm_Output) < 0) __PYX_ERR(0, 256, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_4pypm_Output->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_4pypm_Output->tp_dictoffset && __pyx_ptype_6pygame_4pypm_Output->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_4pypm_Output->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_4pypm_Output, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 256, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_4pypm_6Output___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_4pypm_6Output___init__.doc = __pyx_doc_6pygame_4pypm_6Output___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_4pypm_6Output___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Output, (PyObject *) __pyx_ptype_6pygame_4pypm_Output) < 0) __PYX_ERR(0, 256, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_4pypm_Output) < 0) __PYX_ERR(0, 256, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_ptype_6pygame_4pypm_Input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pygame_4pypm_Input_spec, NULL); if (unlikely(!__pyx_ptype_6pygame_4pypm_Input)) __PYX_ERR(0, 525, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pygame_4pypm_Input_spec, __pyx_ptype_6pygame_4pypm_Input) < 0) __PYX_ERR(0, 525, __pyx_L1_error) #else __pyx_ptype_6pygame_4pypm_Input = &__pyx_type_6pygame_4pypm_Input; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_ptype_6pygame_4pypm_Input) < 0) __PYX_ERR(0, 525, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_6pygame_4pypm_Input->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pygame_4pypm_Input->tp_dictoffset && __pyx_ptype_6pygame_4pypm_Input->tp_getattro == PyObject_GenericGetAttr)) { __pyx_ptype_6pygame_4pypm_Input->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pygame_4pypm_Input, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 525, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_6pygame_4pypm_5Input___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_4pypm_5Input___init__.doc = __pyx_doc_6pygame_4pypm_5Input___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_4pypm_5Input___init__; } } #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Input, (PyObject *) __pyx_ptype_6pygame_4pypm_Input) < 0) __PYX_ERR(0, 525, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pygame_4pypm_Input) < 0) __PYX_ERR(0, 525, __pyx_L1_error) #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_pypm(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_pypm}, {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "pypm", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #elif CYTHON_USE_MODULE_STATE sizeof(__pyx_mstate), /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif #endif #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initpypm(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initpypm(void) #else __Pyx_PyMODINIT_FUNC PyInit_pypm(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_pypm(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) #else static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) #endif { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { #if CYTHON_COMPILING_IN_LIMITED_API result = PyModule_AddObject(module, to_name, value); #else result = PyDict_SetItemString(moddict, to_name, value); #endif } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API moddict = module; #else moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; #endif if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_pypm(PyObject *__pyx_pyinit_module) #endif #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'pypm' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("pypm", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #elif CYTHON_USE_MODULE_STATE __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pypm" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #endif CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_pypm(void)", 0); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pygame__pypm) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pygame.pypm")) { if (unlikely((PyDict_SetItemString(modules, "pygame.pypm", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pygame/pypm.pyx":10 * # cython: language_level=2 * * __version__ = "0.0.6" # <<<<<<<<<<<<<< * * import array */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_0_6) < 0) __PYX_ERR(0, 10, __pyx_L1_error) /* "pygame/pypm.pyx":12 * __version__ = "0.0.6" * * import array # <<<<<<<<<<<<<< * import sys * */ __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_n_s_array, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":13 * * import array * import sys # <<<<<<<<<<<<<< * * # CHANGES: */ __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":43 * * * FILT_ACTIVE = 0x1 # <<<<<<<<<<<<<< * FILT_SYSEX = 0x2 * FILT_CLOCK = 0x4 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_ACTIVE, __pyx_int_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error) /* "pygame/pypm.pyx":44 * * FILT_ACTIVE = 0x1 * FILT_SYSEX = 0x2 # <<<<<<<<<<<<<< * FILT_CLOCK = 0x4 * FILT_PLAY = 0x8 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_SYSEX, __pyx_int_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error) /* "pygame/pypm.pyx":45 * FILT_ACTIVE = 0x1 * FILT_SYSEX = 0x2 * FILT_CLOCK = 0x4 # <<<<<<<<<<<<<< * FILT_PLAY = 0x8 * FILT_F9 = 0x10 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_CLOCK, __pyx_int_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error) /* "pygame/pypm.pyx":46 * FILT_SYSEX = 0x2 * FILT_CLOCK = 0x4 * FILT_PLAY = 0x8 # <<<<<<<<<<<<<< * FILT_F9 = 0x10 * FILT_TICK = 0x10 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_PLAY, __pyx_int_8) < 0) __PYX_ERR(0, 46, __pyx_L1_error) /* "pygame/pypm.pyx":47 * FILT_CLOCK = 0x4 * FILT_PLAY = 0x8 * FILT_F9 = 0x10 # <<<<<<<<<<<<<< * FILT_TICK = 0x10 * FILT_FD = 0x20 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_F9, __pyx_int_16) < 0) __PYX_ERR(0, 47, __pyx_L1_error) /* "pygame/pypm.pyx":48 * FILT_PLAY = 0x8 * FILT_F9 = 0x10 * FILT_TICK = 0x10 # <<<<<<<<<<<<<< * FILT_FD = 0x20 * FILT_UNDEFINED = 0x30 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_TICK, __pyx_int_16) < 0) __PYX_ERR(0, 48, __pyx_L1_error) /* "pygame/pypm.pyx":49 * FILT_F9 = 0x10 * FILT_TICK = 0x10 * FILT_FD = 0x20 # <<<<<<<<<<<<<< * FILT_UNDEFINED = 0x30 * FILT_RESET = 0x40 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_FD, __pyx_int_32) < 0) __PYX_ERR(0, 49, __pyx_L1_error) /* "pygame/pypm.pyx":50 * FILT_TICK = 0x10 * FILT_FD = 0x20 * FILT_UNDEFINED = 0x30 # <<<<<<<<<<<<<< * FILT_RESET = 0x40 * FILT_REALTIME = 0x7F */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_UNDEFINED, __pyx_int_48) < 0) __PYX_ERR(0, 50, __pyx_L1_error) /* "pygame/pypm.pyx":51 * FILT_FD = 0x20 * FILT_UNDEFINED = 0x30 * FILT_RESET = 0x40 # <<<<<<<<<<<<<< * FILT_REALTIME = 0x7F * FILT_NOTE = 0x80 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_RESET, __pyx_int_64) < 0) __PYX_ERR(0, 51, __pyx_L1_error) /* "pygame/pypm.pyx":52 * FILT_UNDEFINED = 0x30 * FILT_RESET = 0x40 * FILT_REALTIME = 0x7F # <<<<<<<<<<<<<< * FILT_NOTE = 0x80 * FILT_CHANNEL_AFTERTOUCH = 0x100 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_REALTIME, __pyx_int_127) < 0) __PYX_ERR(0, 52, __pyx_L1_error) /* "pygame/pypm.pyx":53 * FILT_RESET = 0x40 * FILT_REALTIME = 0x7F * FILT_NOTE = 0x80 # <<<<<<<<<<<<<< * FILT_CHANNEL_AFTERTOUCH = 0x100 * FILT_POLY_AFTERTOUCH = 0x200 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_NOTE, __pyx_int_128) < 0) __PYX_ERR(0, 53, __pyx_L1_error) /* "pygame/pypm.pyx":54 * FILT_REALTIME = 0x7F * FILT_NOTE = 0x80 * FILT_CHANNEL_AFTERTOUCH = 0x100 # <<<<<<<<<<<<<< * FILT_POLY_AFTERTOUCH = 0x200 * FILT_AFTERTOUCH = 0x300 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_CHANNEL_AFTERTOUCH, __pyx_int_256) < 0) __PYX_ERR(0, 54, __pyx_L1_error) /* "pygame/pypm.pyx":55 * FILT_NOTE = 0x80 * FILT_CHANNEL_AFTERTOUCH = 0x100 * FILT_POLY_AFTERTOUCH = 0x200 # <<<<<<<<<<<<<< * FILT_AFTERTOUCH = 0x300 * FILT_PROGRAM = 0x400 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_POLY_AFTERTOUCH, __pyx_int_512) < 0) __PYX_ERR(0, 55, __pyx_L1_error) /* "pygame/pypm.pyx":56 * FILT_CHANNEL_AFTERTOUCH = 0x100 * FILT_POLY_AFTERTOUCH = 0x200 * FILT_AFTERTOUCH = 0x300 # <<<<<<<<<<<<<< * FILT_PROGRAM = 0x400 * FILT_CONTROL = 0x800 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_AFTERTOUCH, __pyx_int_768) < 0) __PYX_ERR(0, 56, __pyx_L1_error) /* "pygame/pypm.pyx":57 * FILT_POLY_AFTERTOUCH = 0x200 * FILT_AFTERTOUCH = 0x300 * FILT_PROGRAM = 0x400 # <<<<<<<<<<<<<< * FILT_CONTROL = 0x800 * FILT_PITCHBEND = 0x1000 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_PROGRAM, __pyx_int_1024) < 0) __PYX_ERR(0, 57, __pyx_L1_error) /* "pygame/pypm.pyx":58 * FILT_AFTERTOUCH = 0x300 * FILT_PROGRAM = 0x400 * FILT_CONTROL = 0x800 # <<<<<<<<<<<<<< * FILT_PITCHBEND = 0x1000 * FILT_MTC = 0x2000 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_CONTROL, __pyx_int_2048) < 0) __PYX_ERR(0, 58, __pyx_L1_error) /* "pygame/pypm.pyx":59 * FILT_PROGRAM = 0x400 * FILT_CONTROL = 0x800 * FILT_PITCHBEND = 0x1000 # <<<<<<<<<<<<<< * FILT_MTC = 0x2000 * FILT_SONG_POSITION = 0x4000 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_PITCHBEND, __pyx_int_4096) < 0) __PYX_ERR(0, 59, __pyx_L1_error) /* "pygame/pypm.pyx":60 * FILT_CONTROL = 0x800 * FILT_PITCHBEND = 0x1000 * FILT_MTC = 0x2000 # <<<<<<<<<<<<<< * FILT_SONG_POSITION = 0x4000 * FILT_SONG_SELECT = 0x8000 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_MTC, __pyx_int_8192) < 0) __PYX_ERR(0, 60, __pyx_L1_error) /* "pygame/pypm.pyx":61 * FILT_PITCHBEND = 0x1000 * FILT_MTC = 0x2000 * FILT_SONG_POSITION = 0x4000 # <<<<<<<<<<<<<< * FILT_SONG_SELECT = 0x8000 * FILT_TUNE = 0x10000 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_SONG_POSITION, __pyx_int_16384) < 0) __PYX_ERR(0, 61, __pyx_L1_error) /* "pygame/pypm.pyx":62 * FILT_MTC = 0x2000 * FILT_SONG_POSITION = 0x4000 * FILT_SONG_SELECT = 0x8000 # <<<<<<<<<<<<<< * FILT_TUNE = 0x10000 * FALSE = 0 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_SONG_SELECT, __pyx_int_32768) < 0) __PYX_ERR(0, 62, __pyx_L1_error) /* "pygame/pypm.pyx":63 * FILT_SONG_POSITION = 0x4000 * FILT_SONG_SELECT = 0x8000 * FILT_TUNE = 0x10000 # <<<<<<<<<<<<<< * FALSE = 0 * TRUE = 1 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILT_TUNE, __pyx_int_65536) < 0) __PYX_ERR(0, 63, __pyx_L1_error) /* "pygame/pypm.pyx":64 * FILT_SONG_SELECT = 0x8000 * FILT_TUNE = 0x10000 * FALSE = 0 # <<<<<<<<<<<<<< * TRUE = 1 * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FALSE, __pyx_int_0) < 0) __PYX_ERR(0, 64, __pyx_L1_error) /* "pygame/pypm.pyx":65 * FILT_TUNE = 0x10000 * FALSE = 0 * TRUE = 1 # <<<<<<<<<<<<<< * * cdef extern from "portmidi.h": */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRUE, __pyx_int_1) < 0) __PYX_ERR(0, 65, __pyx_L1_error) /* "pygame/pypm.pyx":154 * cdef long _pypm_initialized * * def Initialize(): # <<<<<<<<<<<<<< * """Initialize PortMidi library. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_1Initialize, 0, __pyx_n_s_Initialize, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Initialize, __pyx_t_2) < 0) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":166 * _pypm_initialized = 1 * * def Terminate(): # <<<<<<<<<<<<<< * """Terminate use of PortMidi library. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_3Terminate, 0, __pyx_n_s_Terminate, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Terminate, __pyx_t_2) < 0) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":179 * * * def GetDefaultInputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI input device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5GetDefaultInputDeviceID, 0, __pyx_n_s_GetDefaultInputDeviceID, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GetDefaultInputDeviceID, __pyx_t_2) < 0) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":188 * return Pm_GetDefaultInputDeviceID() * * def GetDefaultOutputDeviceID(): # <<<<<<<<<<<<<< * """Return the number of the default MIDI output device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_7GetDefaultOutputDeviceID, 0, __pyx_n_s_GetDefaultOutputDeviceID, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GetDefaultOutputDeviceID, __pyx_t_2) < 0) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":197 * return Pm_GetDefaultOutputDeviceID() * * def CountDevices(): # <<<<<<<<<<<<<< * """Return number of available MIDI (input and output) devices.""" * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_9CountDevices, 0, __pyx_n_s_CountDevices, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_CountDevices, __pyx_t_2) < 0) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":202 * return Pm_CountDevices() * * def GetDeviceInfo(device_no): # <<<<<<<<<<<<<< * """Return device info tuple for MIDI device given by device_no. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_11GetDeviceInfo, 0, __pyx_n_s_GetDeviceInfo, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GetDeviceInfo, __pyx_t_2) < 0) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":224 * # return None * * def Time(): # <<<<<<<<<<<<<< * """Return the current time in ms of the PortMidi timer.""" * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_13Time, 0, __pyx_n_s_Time, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Time, __pyx_t_2) < 0) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":229 * return Pt_Time() * * def GetErrorText(err): # <<<<<<<<<<<<<< * """Return human-readable error message translated from error number.""" * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_15GetErrorText, 0, __pyx_n_s_GetErrorText, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GetErrorText, __pyx_t_2) < 0) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":234 * return Pm_GetErrorText(err) * * def Channel(chan): # <<<<<<<<<<<<<< * """Return Channel object for given MIDI channel number 1 - 16. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_17Channel, 0, __pyx_n_s_Channel, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Channel, __pyx_t_2) < 0) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":319 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_5_check_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output__check_open, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_check_open, __pyx_t_2) < 0) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "pygame/pypm.pyx":333 * "midi Output aborted. Need to call Close after Abort.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi output device, flushing any pending buffers. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_7Close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output_Close, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_Close, __pyx_t_2) < 0) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "pygame/pypm.pyx":352 * self.midi = NULL * * def Abort(self): # <<<<<<<<<<<<<< * """Terminate outgoing messages immediately. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_9Abort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output_Abort, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_Abort, __pyx_t_2) < 0) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "pygame/pypm.pyx":372 * self._aborted = 1 * * def Write(self, data): # <<<<<<<<<<<<<< * """Output a series of MIDI events given by data list n this device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_11Write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output_Write, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_Write, __pyx_t_2) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "pygame/pypm.pyx":440 * raise Exception(Pm_GetErrorText(err)) * * def WriteShort(self, status, data1=0, data2=0): # <<<<<<<<<<<<<< * """Output MIDI event of three bytes or less immediately on this device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_13WriteShort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output_WriteShort, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__30); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_WriteShort, __pyx_t_2) < 0) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "pygame/pypm.pyx":480 * raise Exception(Pm_GetErrorText(err)) * * def WriteSysEx(self, when, msg): # <<<<<<<<<<<<<< * """Output a timestamped system-exclusive MIDI message on this device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_15WriteSysEx, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output_WriteSysEx, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Output, __pyx_n_s_WriteSysEx, __pyx_t_2) < 0) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Output); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output___reduce_cython, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_6Output_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Output___setstate_cython, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":570 * raise Exception(Pm_GetErrorText(err)) * * def _check_open(self): # <<<<<<<<<<<<<< * """Check whether midi device is open, and if not, raises an error. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_5_check_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input__check_open, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_check_open, __pyx_t_2) < 0) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "pygame/pypm.pyx":579 * raise Exception("midi Input not open.") * * def Close(self): # <<<<<<<<<<<<<< * """Close the midi input device. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_7Close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_Close, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_Close, __pyx_t_2) < 0) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "pygame/pypm.pyx":602 * * * def SetFilter(self, filters): # <<<<<<<<<<<<<< * """Set filters on an open input stream. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_9SetFilter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_SetFilter, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_SetFilter, __pyx_t_2) < 0) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "pygame/pypm.pyx":644 * raise Exception(Pm_GetErrorText(err)) * * def SetChannelMask(self, mask): # <<<<<<<<<<<<<< * """Set channel mask to filter incoming messages based on channel. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_11SetChannelMask, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_SetChannelMask, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_SetChannelMask, __pyx_t_2) < 0) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "pygame/pypm.pyx":671 * raise Exception(Pm_GetErrorText(err)) * * def Poll(self): # <<<<<<<<<<<<<< * """Test whether input is available. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_13Poll, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_Poll, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_Poll, __pyx_t_2) < 0) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "pygame/pypm.pyx":687 * return err * * def Read(self, max_events): # <<<<<<<<<<<<<< * """Read and return up to max_events events from input. * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_15Read, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_Read, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pygame_4pypm_Input, __pyx_n_s_Read, __pyx_t_2) < 0) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_4pypm_Input); /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input___reduce_cython, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "self.midi cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self.midi cannot be converted to a Python object for pickling" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_4pypm_5Input_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input___setstate_cython, NULL, __pyx_n_s_pygame_pypm, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pygame/pypm.pyx":1 * # pyPortMidi # <<<<<<<<<<<<<< * # Python bindings for PortMidi * # John Harrison */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pygame.pypm", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pygame.pypm"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError */ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* TupleAndListFromArray */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { Py_INCREF(__pyx_empty_tuple); return __pyx_empty_tuple; } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); for (i = 0; i < n; i++) { if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; } for (i = 0; i < n; i++) { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); PyObject *dict; dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; i= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); while (1) { Py_XDECREF(key); key = NULL; Py_XDECREF(value); value = NULL; if (kwds_is_tuple) { Py_ssize_t size; #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(kwds); #else size = PyTuple_Size(kwds); if (size < 0) goto bad; #endif if (pos >= size) break; #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); if (!key) goto bad; #elif CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kwds, pos); #else key = PyTuple_GetItem(kwds, pos); if (!key) goto bad; #endif value = kwvalues[pos]; pos++; } else { if (!PyDict_Next(kwds, &pos, &key, &value)) break; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif } name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(value); Py_DECREF(key); #endif key = NULL; value = NULL; continue; } #if !CYTHON_AVOID_BORROWED_REFS Py_INCREF(key); #endif Py_INCREF(value); name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = ( #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key) ); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS value = NULL; #endif break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } Py_XDECREF(key); Py_XDECREF(value); return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: Py_XDECREF(key); Py_XDECREF(value); return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - (unsigned long)b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return PyLong_FromLong(-intval); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* PyIntCompare */ static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_UNUSED_VAR(inplace); if (op1 == op2) { return 1; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return (a == b); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); const digit* digits = __Pyx_PyLong_Digits(op1); if (intval == 0) { return (__Pyx_PyLong_IsZero(op1) == 1); } else if (intval < 0) { if (__Pyx_PyLong_IsNonNeg(op1)) return 0; intval = -intval; } else { if (__Pyx_PyLong_IsNeg(op1)) return 0; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); return (unequal == 0); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; #if CYTHON_COMPILING_IN_LIMITED_API double a = __pyx_PyFloat_AsDouble(op1); #else double a = PyFloat_AS_DOUBLE(op1); #endif return ((double)a == (double)b); } return __Pyx_PyObject_IsTrueAndDecref( PyObject_RichCompare(op1, op2, Py_EQ)); } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { return NULL; } #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; #else if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif #if PY_VERSION_HEX < 0x030800B1 #if CYTHON_FAST_PYCCALL if (PyCFunction_Check(func)) { if (kwargs) { return _PyCFunction_FastCallDict(func, args, nargs, kwargs); } else { return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); } } #if PY_VERSION_HEX >= 0x030700A1 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); } #endif #endif #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); } #endif #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); #endif if (f) { return f(func, args, (size_t)nargs, NULL); } #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL if (__Pyx_CyFunction_CheckExact(func)) { __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); if (f) return f(func, args, (size_t)nargs, NULL); } #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { __Pyx_PyThreadState_declare CYTHON_UNUSED_VAR(cause); Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; #endif CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kw, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) goto invalid_keyword; return 1; #else if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { Py_ssize_t kwsize; #if CYTHON_ASSUME_SAFE_MACROS kwsize = PyTuple_GET_SIZE(kw); #else kwsize = PyTuple_Size(kw); if (kwsize < 0) return 0; #endif if (unlikely(kwsize == 0)) return 1; if (!kw_allowed) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, 0); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif goto invalid_keyword; } #if PY_VERSION_HEX < 0x03090000 for (pos = 0; pos < kwsize; pos++) { #if CYTHON_ASSUME_SAFE_MACROS key = PyTuple_GET_ITEM(kw, pos); #else key = PyTuple_GetItem(kw, pos); if (!key) return 0; #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } #endif return 1; } while (PyDict_Next(kw, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if (!kw_allowed && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (mm && mm->mp_subscript) { PyObject *r, *key = PyInt_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a & b); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if ((intval & PyLong_MASK) == intval) { long last_digit = (long) __Pyx_PyLong_Digits(op1)[0]; long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1)); return PyLong_FromLong(result); } if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op1); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_and(op1, op2); } } x = a & b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla & llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (likely(b < (long) (sizeof(long)*8) && a == (a << b) >> b) || !a) { return PyInt_FromLong(a << b); } } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op1); } if (likely(__Pyx_PyLong_IsCompact(op1))) { a = __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_lshift(op1, op2); } } x = a << b; #ifdef HAVE_LONG_LONG if (unlikely(!(b < (long) (sizeof(long)*8) && a == x >> b)) && a) { lla = a; goto long_long; } #else if (likely(b < (long) (sizeof(long)*8) && a == x >> b) || !a) #endif return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla << llb; if (likely(lla == llx >> llb)) return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceLshift : PyNumber_Lshift)(op1, op2); } #endif /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #elif CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); #else const PyType_Slot *slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { int changed = 0; #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) const #endif PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { #if PY_VERSION_HEX < 0x030900b1 if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); #if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; #else type->tp_print = (printfunc) memb->offset; #endif changed = 1; } #endif #else if ((0)); #endif #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { Py_DECREF(descr); return -1; } Py_DECREF(descr); changed = 1; } #endif } memb++; } if (changed) PyType_Modified(type); } #endif return 0; } #endif /* PyObjectCallNoArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #elif PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(name)); #endif __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* ValidateBasesTuple */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_MACROS n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (n < 0) return -1; #endif for (i = 1; i < n; i++) { #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif PyTypeObject *b; #if PY_MAJOR_VERSION < 3 if (PyClass_Check(b0)) { PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) gc = PyImport_GetModule(__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, attr_name); #else "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", type_name, PyString_AS_STRING(attr_name)); #endif __Pyx_DECREF_TypeName(type_name); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetupReduce */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); if (likely(reduce_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); if (likely(setstate_cython)) { ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *empty_list = 0; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (unlikely(!py_import)) goto bad; if (!from_list) { empty_list = PyList_New(0); if (unlikely(!empty_list)) goto bad; from_list = empty_list; } #endif empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (unlikely(!py_level)) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, __pyx_d, empty_dict, from_list, level); #endif } } bad: Py_XDECREF(empty_dict); Py_XDECREF(empty_list); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif return module; } /* ImportDottedModule */ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; if (unlikely(PyErr_Occurred())) { PyErr_Clear(); } if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { partial_name = name; } else { slice = PySequence_GetSlice(parts_tuple, 0, count); if (unlikely(!slice)) goto bad; sep = PyUnicode_FromStringAndSize(".", 1); if (unlikely(!sep)) goto bad; partial_name = PyUnicode_Join(sep, slice); } PyErr_Format( #if PY_MAJOR_VERSION < 3 PyExc_ImportError, "No module named '%s'", PyString_AS_STRING(partial_name)); #else #if PY_VERSION_HEX >= 0x030600B1 PyExc_ModuleNotFoundError, #else PyExc_ImportError, #endif "No module named '%U'", partial_name); #endif bad: Py_XDECREF(sep); Py_XDECREF(slice); Py_XDECREF(partial_name); return NULL; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { PyObject *imported_module; #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) return NULL; imported_module = __Pyx_PyDict_GetItemStr(modules, name); Py_XINCREF(imported_module); #else imported_module = PyImport_GetModule(name); #endif return imported_module; } #endif #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { Py_ssize_t i, nparts; nparts = PyTuple_GET_SIZE(parts_tuple); for (i=1; i < nparts && module; i++) { PyObject *part, *submodule; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS part = PyTuple_GET_ITEM(parts_tuple, i); #else part = PySequence_ITEM(parts_tuple, i); #endif submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(part); #endif Py_DECREF(module); module = submodule; } if (unlikely(!module)) { return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); } return module; } #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 PyObject *module, *from_list, *star = __pyx_n_s__7; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); module = __Pyx_Import(name, from_list, 0); Py_DECREF(from_list); return module; #else PyObject *imported_module; PyObject *module = __Pyx_Import(name, NULL, 0); if (!parts_tuple || unlikely(!module)) return module; imported_module = __Pyx__ImportDottedModule_Lookup(name); if (likely(imported_module)) { Py_DECREF(module); return imported_module; } PyErr_Clear(); return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); #endif } static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 PyObject *module = __Pyx__ImportDottedModule_Lookup(name); if (likely(module)) { PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); if (likely(spec)) { PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { Py_DECREF(spec); spec = NULL; } Py_XDECREF(unsafe); } if (likely(!spec)) { PyErr_Clear(); return module; } Py_DECREF(spec); Py_DECREF(module); } else if (PyErr_Occurred()) { PyErr_Clear(); } #endif return __Pyx__ImportDottedModule(name, parts_tuple); } /* ImportDottedModuleRelFirst */ static PyObject *__Pyx_ImportDottedModuleRelFirst(PyObject *name, PyObject *parts_tuple) { PyObject *module; PyObject *from_list = NULL; #if PY_MAJOR_VERSION < 3 PyObject *star = __pyx_n_s__7; from_list = PyList_New(1); if (unlikely(!from_list)) return NULL; Py_INCREF(star); PyList_SET_ITEM(from_list, 0, star); #endif module = __Pyx_Import(name, from_list, -1); Py_XDECREF(from_list); if (module) { #if PY_MAJOR_VERSION >= 3 if (parts_tuple) { module = __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); } #endif return module; } if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) return NULL; PyErr_Clear(); return __Pyx_ImportDottedModule(name, parts_tuple); } /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t basicsize, Py_ssize_t expected_basicsize) { if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } #if !CYTHON_USE_TYPE_SPECS static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* abi_module; const char* object_name; PyTypeObject *cached_type = NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; object_name = strrchr(type->tp_name, '.'); object_name = object_name ? object_name+1 : type->tp_name; cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); if (cached_type) { if (__Pyx_VerifyCachedType( (PyObject *)cached_type, object_name, cached_type->tp_basicsize, type->tp_basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) goto bad; Py_INCREF(type); cached_type = type; done: Py_DECREF(abi_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #else static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module, *cached_type = NULL; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) return NULL; cached_type = PyObject_GetAttrString(abi_module, object_name); if (cached_type) { Py_ssize_t basicsize; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; #else basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; #endif if (__Pyx_VerifyCachedType( cached_type, object_name, basicsize, spec->basicsize) < 0) { goto bad; } goto done; } if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); CYTHON_UNUSED_VAR(module); cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; done: Py_DECREF(abi_module); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } #endif /* PyVectorcallFastCallDict */ #if CYTHON_METH_FASTCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i, pos; size_t j; PyObject *key, *value; unsigned long keys_are_strings; Py_ssize_t nkw = PyDict_GET_SIZE(kw); newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (PyDict_Next(kw, &pos, &key, &value)) { keys_are_strings &= Py_TYPE(key)->tp_flags; Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(kwnames, i, key); kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { return vc(func, args, nargs, NULL); } return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { CYTHON_UNUSED_VAR(closure); if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #else op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_doc, value); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #elif PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #else op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_name, value); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_qualname, value); return 0; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->func_dict, value); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_tuple; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->defaults_kwdict; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_Py_XDECREF_SET(op->func_annotations, value); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject* result = op->func_annotations; CYTHON_UNUSED_VAR(context); if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { int is_coroutine; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; #if PY_VERSION_HEX >= 0x03050000 if (is_coroutine) { PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(op->func_is_coroutine)) { return __Pyx_NewRef(op->func_is_coroutine); } ignore: PyErr_Clear(); } #endif op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); return __Pyx_NewRef(op->func_is_coroutine); } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if CYTHON_USE_TYPE_SPECS {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #if CYTHON_METH_FASTCALL #if CYTHON_BACKPORT_VECTORCALL {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else #if !CYTHON_COMPILING_IN_LIMITED_API {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #endif #endif #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { CYTHON_UNUSED_VAR(args); #if PY_MAJOR_VERSION >= 3 Py_INCREF(m->func_qualname); return m->func_qualname; #else return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyObject *py_name = NULL; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_MACROS size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, size); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); #endif return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } #if CYTHON_COMPILING_IN_LIMITED_API py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); if (!py_name) return NULL; PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", py_name); Py_DECREF(py_name); #else PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); #endif return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_MACROS argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(!argc) < 0) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); #if PY_MAJOR_VERSION > 2 PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); #else PyErr_SetString(PyExc_TypeError, "unbound method needs an argument"); #endif return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 0)) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } if (unlikely(nargs != 1)) { PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", def->ml_name, nargs); return NULL; } return def->ml_meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); #if CYTHON_BACKPORT_VECTORCALL Py_ssize_t nargs = (Py_ssize_t)nargsf; #else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); #endif PyObject *self; switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: self = ((PyCFunctionObject*)cyfunc)->m_self; break; default: return NULL; } return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); } #endif #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; #else static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, #if !CYTHON_METH_FASTCALL 0, #elif CYTHON_BACKPORT_VECTORCALL (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), #else offsetof(PyCFunctionObject, vectorcall), #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL _Py_TPFLAGS_HAVE_VECTORCALL | #endif Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_PyMethod_New, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) 0, #endif #if __PYX_NEED_TP_PRINT_SLOT 0, #endif #if PY_VERSION_HEX >= 0x030C0000 0, #endif #if PY_VERSION_HEX >= 0x030d00A4 0, #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif }; #endif static int __pyx_CyFunction_init(PyObject *module) { #if CYTHON_USE_TYPE_SPECS __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); #else CYTHON_UNUSED_VAR(module); __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); #endif if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ #if !CYTHON_COMPILING_IN_LIMITED_API static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #endif /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result; result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; compiled = Py_CompileString( "out = type(code)(\n" " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" " code.co_lnotab)\n", "", Py_file_input); if (!compiled) return NULL; result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); Py_DECREF(compiled); if (!result) PyErr_Print(); Py_DECREF(result); result = PyDict_GetItemString(scratch_dict, "out"); if (result) Py_INCREF(result); return result; } #else return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { (void) __pyx_cfilenm; (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; py_funcname = PyUnicode_FromString(funcname); if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; #if PY_MAJOR_VERSION < 3 PyObject *py_srcfile = NULL; py_srcfile = PyString_FromString(filename); if (!py_srcfile) goto bad; #endif if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; #endif } #if PY_MAJOR_VERSION < 3 py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_srcfile); #endif return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* Print */ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0) { switch (s[len-1]) { case ' ': break; case '\f': case '\r': case '\n': case '\t': case '\v': PyFile_SoftSpace(f, 0); break; default: break; } } } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmDeviceID(PmDeviceID value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmDeviceID neg_one = (PmDeviceID) -1, const_zero = (PmDeviceID) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PmDeviceID) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PmDeviceID) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmDeviceID) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PmDeviceID) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmDeviceID) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PmDeviceID), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PmDeviceID)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE PmDeviceID __Pyx_PyInt_As_PmDeviceID(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmDeviceID neg_one = (PmDeviceID) -1, const_zero = (PmDeviceID) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(PmDeviceID) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(PmDeviceID, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PmDeviceID) val; } } #endif if (unlikely(!PyLong_Check(x))) { PmDeviceID val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PmDeviceID) -1; val = __Pyx_PyInt_As_PmDeviceID(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(PmDeviceID) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) >= 2 * PyLong_SHIFT)) { return (PmDeviceID) (((((PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0])); } } break; case 3: if ((8 * sizeof(PmDeviceID) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) >= 3 * PyLong_SHIFT)) { return (PmDeviceID) (((((((PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0])); } } break; case 4: if ((8 * sizeof(PmDeviceID) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) >= 4 * PyLong_SHIFT)) { return (PmDeviceID) (((((((((PmDeviceID)digits[3]) << PyLong_SHIFT) | (PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PmDeviceID) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(PmDeviceID) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(PmDeviceID, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmDeviceID) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmDeviceID, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(PmDeviceID) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 2 * PyLong_SHIFT)) { return (PmDeviceID) (((PmDeviceID)-1)*(((((PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; case 2: if ((8 * sizeof(PmDeviceID) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 2 * PyLong_SHIFT)) { return (PmDeviceID) ((((((PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; case -3: if ((8 * sizeof(PmDeviceID) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 3 * PyLong_SHIFT)) { return (PmDeviceID) (((PmDeviceID)-1)*(((((((PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; case 3: if ((8 * sizeof(PmDeviceID) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 3 * PyLong_SHIFT)) { return (PmDeviceID) ((((((((PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; case -4: if ((8 * sizeof(PmDeviceID) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 4 * PyLong_SHIFT)) { return (PmDeviceID) (((PmDeviceID)-1)*(((((((((PmDeviceID)digits[3]) << PyLong_SHIFT) | (PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; case 4: if ((8 * sizeof(PmDeviceID) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmDeviceID, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmDeviceID) - 1 > 4 * PyLong_SHIFT)) { return (PmDeviceID) ((((((((((PmDeviceID)digits[3]) << PyLong_SHIFT) | (PmDeviceID)digits[2]) << PyLong_SHIFT) | (PmDeviceID)digits[1]) << PyLong_SHIFT) | (PmDeviceID)digits[0]))); } } break; } } #endif if ((sizeof(PmDeviceID) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(PmDeviceID, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmDeviceID) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmDeviceID, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { PmDeviceID val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (PmDeviceID) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (PmDeviceID) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (PmDeviceID) -1; } else { stepval = v; } v = NULL; val = (PmDeviceID) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(PmDeviceID) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((PmDeviceID) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(PmDeviceID) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((PmDeviceID) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((PmDeviceID) 1) << (sizeof(PmDeviceID) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (PmDeviceID) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PmDeviceID"); return (PmDeviceID) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PmDeviceID"); return (PmDeviceID) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PtTimestamp(PtTimestamp value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PtTimestamp neg_one = (PtTimestamp) -1, const_zero = (PtTimestamp) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PtTimestamp) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PtTimestamp) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PtTimestamp) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PtTimestamp) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PtTimestamp) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PtTimestamp), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PtTimestamp)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE PmError __Pyx_PyInt_As_PmError(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmError neg_one = (PmError) -1, const_zero = (PmError) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(PmError) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(PmError, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PmError) val; } } #endif if (unlikely(!PyLong_Check(x))) { PmError val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PmError) -1; val = __Pyx_PyInt_As_PmError(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmError, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(PmError) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) >= 2 * PyLong_SHIFT)) { return (PmError) (((((PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0])); } } break; case 3: if ((8 * sizeof(PmError) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) >= 3 * PyLong_SHIFT)) { return (PmError) (((((((PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0])); } } break; case 4: if ((8 * sizeof(PmError) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) >= 4 * PyLong_SHIFT)) { return (PmError) (((((((((PmError)digits[3]) << PyLong_SHIFT) | (PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PmError) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(PmError) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(PmError, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmError) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmError, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmError, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(PmError) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 2 * PyLong_SHIFT)) { return (PmError) (((PmError)-1)*(((((PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; case 2: if ((8 * sizeof(PmError) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 2 * PyLong_SHIFT)) { return (PmError) ((((((PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; case -3: if ((8 * sizeof(PmError) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 3 * PyLong_SHIFT)) { return (PmError) (((PmError)-1)*(((((((PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; case 3: if ((8 * sizeof(PmError) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 3 * PyLong_SHIFT)) { return (PmError) ((((((((PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; case -4: if ((8 * sizeof(PmError) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 4 * PyLong_SHIFT)) { return (PmError) (((PmError)-1)*(((((((((PmError)digits[3]) << PyLong_SHIFT) | (PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; case 4: if ((8 * sizeof(PmError) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmError, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmError) - 1 > 4 * PyLong_SHIFT)) { return (PmError) ((((((((((PmError)digits[3]) << PyLong_SHIFT) | (PmError)digits[2]) << PyLong_SHIFT) | (PmError)digits[1]) << PyLong_SHIFT) | (PmError)digits[0]))); } } break; } } #endif if ((sizeof(PmError) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(PmError, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmError) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmError, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { PmError val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); val = (PmError) -1; #endif if (unlikely(ret)) return (PmError) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PmError"); return (PmError) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PmError"); return (PmError) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(int) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } #endif if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(long) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } #endif if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmError(PmError value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmError neg_one = (PmError) -1, const_zero = (PmError) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PmError) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PmError) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmError) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PmError) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmError) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PmError), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PmError)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE PmTimestamp __Pyx_PyInt_As_PmTimestamp(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmTimestamp neg_one = (PmTimestamp) -1, const_zero = (PmTimestamp) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(PmTimestamp) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(PmTimestamp, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PmTimestamp) val; } } #endif if (unlikely(!PyLong_Check(x))) { PmTimestamp val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PmTimestamp) -1; val = __Pyx_PyInt_As_PmTimestamp(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(PmTimestamp) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) >= 2 * PyLong_SHIFT)) { return (PmTimestamp) (((((PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0])); } } break; case 3: if ((8 * sizeof(PmTimestamp) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) >= 3 * PyLong_SHIFT)) { return (PmTimestamp) (((((((PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0])); } } break; case 4: if ((8 * sizeof(PmTimestamp) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) >= 4 * PyLong_SHIFT)) { return (PmTimestamp) (((((((((PmTimestamp)digits[3]) << PyLong_SHIFT) | (PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PmTimestamp) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(PmTimestamp) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(PmTimestamp, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmTimestamp) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmTimestamp, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(PmTimestamp) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 2 * PyLong_SHIFT)) { return (PmTimestamp) (((PmTimestamp)-1)*(((((PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; case 2: if ((8 * sizeof(PmTimestamp) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 2 * PyLong_SHIFT)) { return (PmTimestamp) ((((((PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; case -3: if ((8 * sizeof(PmTimestamp) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 3 * PyLong_SHIFT)) { return (PmTimestamp) (((PmTimestamp)-1)*(((((((PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; case 3: if ((8 * sizeof(PmTimestamp) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 3 * PyLong_SHIFT)) { return (PmTimestamp) ((((((((PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; case -4: if ((8 * sizeof(PmTimestamp) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 4 * PyLong_SHIFT)) { return (PmTimestamp) (((PmTimestamp)-1)*(((((((((PmTimestamp)digits[3]) << PyLong_SHIFT) | (PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; case 4: if ((8 * sizeof(PmTimestamp) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmTimestamp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmTimestamp) - 1 > 4 * PyLong_SHIFT)) { return (PmTimestamp) ((((((((((PmTimestamp)digits[3]) << PyLong_SHIFT) | (PmTimestamp)digits[2]) << PyLong_SHIFT) | (PmTimestamp)digits[1]) << PyLong_SHIFT) | (PmTimestamp)digits[0]))); } } break; } } #endif if ((sizeof(PmTimestamp) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(PmTimestamp, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmTimestamp) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmTimestamp, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { PmTimestamp val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (PmTimestamp) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (PmTimestamp) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (PmTimestamp) -1; } else { stepval = v; } v = NULL; val = (PmTimestamp) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(PmTimestamp) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((PmTimestamp) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(PmTimestamp) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((PmTimestamp) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((PmTimestamp) 1) << (sizeof(PmTimestamp) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (PmTimestamp) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PmTimestamp"); return (PmTimestamp) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PmTimestamp"); return (PmTimestamp) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmMessage(PmMessage value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmMessage neg_one = (PmMessage) -1, const_zero = (PmMessage) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PmMessage) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PmMessage) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmMessage) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PmMessage) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmMessage) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PmMessage), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PmMessage)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PmTimestamp(PmTimestamp value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmTimestamp neg_one = (PmTimestamp) -1, const_zero = (PmTimestamp) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PmTimestamp) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PmTimestamp) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmTimestamp) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PmTimestamp) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PmTimestamp) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PmTimestamp), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PmTimestamp)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; if (!is_unsigned) { kwds = PyDict_New(); if (!kwds) goto limited_bad; if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: Py_XDECREF(kwds); Py_XDECREF(arg_tuple); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE PmMessage __Pyx_PyInt_As_PmMessage(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PmMessage neg_one = (PmMessage) -1, const_zero = (PmMessage) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if ((sizeof(PmMessage) < sizeof(long))) { __PYX_VERIFY_RETURN_INT(PmMessage, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PmMessage) val; } } #endif if (unlikely(!PyLong_Check(x))) { PmMessage val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PmMessage) -1; val = __Pyx_PyInt_As_PmMessage(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmMessage, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(PmMessage) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) >= 2 * PyLong_SHIFT)) { return (PmMessage) (((((PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0])); } } break; case 3: if ((8 * sizeof(PmMessage) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) >= 3 * PyLong_SHIFT)) { return (PmMessage) (((((((PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0])); } } break; case 4: if ((8 * sizeof(PmMessage) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) >= 4 * PyLong_SHIFT)) { return (PmMessage) (((((((((PmMessage)digits[3]) << PyLong_SHIFT) | (PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PmMessage) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(PmMessage) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(PmMessage, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmMessage) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmMessage, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(PmMessage, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(PmMessage) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 2 * PyLong_SHIFT)) { return (PmMessage) (((PmMessage)-1)*(((((PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; case 2: if ((8 * sizeof(PmMessage) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 2 * PyLong_SHIFT)) { return (PmMessage) ((((((PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; case -3: if ((8 * sizeof(PmMessage) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 3 * PyLong_SHIFT)) { return (PmMessage) (((PmMessage)-1)*(((((((PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; case 3: if ((8 * sizeof(PmMessage) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 3 * PyLong_SHIFT)) { return (PmMessage) ((((((((PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; case -4: if ((8 * sizeof(PmMessage) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 4 * PyLong_SHIFT)) { return (PmMessage) (((PmMessage)-1)*(((((((((PmMessage)digits[3]) << PyLong_SHIFT) | (PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; case 4: if ((8 * sizeof(PmMessage) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(PmMessage, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(PmMessage) - 1 > 4 * PyLong_SHIFT)) { return (PmMessage) ((((((((((PmMessage)digits[3]) << PyLong_SHIFT) | (PmMessage)digits[2]) << PyLong_SHIFT) | (PmMessage)digits[1]) << PyLong_SHIFT) | (PmMessage)digits[0]))); } } break; } } #endif if ((sizeof(PmMessage) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(PmMessage, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if ((sizeof(PmMessage) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(PmMessage, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { PmMessage val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (PmMessage) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (PmMessage) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (PmMessage) -1; } else { stepval = v; } v = NULL; val = (PmMessage) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(PmMessage) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((PmMessage) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(PmMessage) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((PmMessage) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((PmMessage) 1) << (sizeof(PmMessage) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (PmMessage) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PmMessage"); return (PmMessage) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PmMessage"); return (PmMessage) -1; } /* PrintOne */ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp) { PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_n_s_name); if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); name = __Pyx_NewRef(__pyx_n_s__47); } return name; } #endif /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x030B00A4 return Py_Version & ~0xFFUL; #else const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } return version; #endif } static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* InitStrings */ #if PY_MAJOR_VERSION >= 3 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { if (t.is_unicode | t.is_str) { if (t.intern) { *str = PyUnicode_InternFromString(t.s); } else if (t.encoding) { *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); } else { *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); } } else { *str = PyBytes_FromStringAndSize(t.s, t.n - 1); } if (!*str) return -1; if (PyObject_Hash(*str) == -1) return -1; return 0; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION >= 3 __Pyx_InitString(*t, t->p); #else if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; #endif ++t; } return 0; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", type_name, type_name, result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); #if PY_MAJOR_VERSION < 3 } else if (likely(PyInt_CheckExact(o))) { return PyInt_AS_LONG(o); #endif } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyInt_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/rect.c0000644000175100001770000021332314676242340014615 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * Python Rect Object -- useful 2d rectangle class */ #define PYGAMEAPI_RECT_INTERNAL #include "pygame.h" #include "doc/rect_doc.h" #include "structmember.h" #include "pgcompat.h" #include #if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && \ !defined(round) #define pg_round(d) (((d < 0) ? (ceil((d) - 0.5)) : (floor((d) + 0.5)))) #else #define pg_round(d) round(d) #endif static PyTypeObject pgRect_Type; #define pgRect_Check(x) (PyObject_IsInstance(x, (PyObject *)&pgRect_Type)) #define pgRect_CheckExact(x) (Py_TYPE(x) == &pgRect_Type) static int pg_rect_init(pgRectObject *, PyObject *, PyObject *); /* We store some rect objects which have been allocated already. Mostly to work around an old pypy cpyext performance issue. */ #ifdef PYPY_VERSION #define PG_RECT_NUM 49152 const int PG_RECT_FREELIST_MAX = PG_RECT_NUM; static pgRectObject *pg_rect_freelist[PG_RECT_NUM]; int pg_rect_freelist_num = -1; #endif /* Helper method to extract 4 ints from an object. * * This sequence extraction supports the following formats: * - 4 ints * - 2 tuples/lists of 2 ints each * * Params: * obj: sequence object to extract the 4 ints from * val1 .. val4: extracted int values * * Returns: * int: 0 to indicate failure (exception set) * 1 to indicate success * * Assumptions: * - obj argument is a sequence * - all val arguments are valid pointers */ static int four_ints_from_obj(PyObject *obj, int *val1, int *val2, int *val3, int *val4) { Py_ssize_t length = PySequence_Length(obj); if (length < -1) { return 0; /* Exception already set. */ } if (length == 2) { /* Get one end of the line. */ PyObject *item = PySequence_GetItem(obj, 0); int result; if (item == NULL) { return 0; /* Exception already set. */ } result = pg_TwoIntsFromObj(item, val1, val2); Py_DECREF(item); if (!result) { PyErr_SetString(PyExc_TypeError, "number pair expected for first argument"); return 0; } /* Get the other end of the line. */ item = PySequence_GetItem(obj, 1); if (item == NULL) { return 0; /* Exception already set. */ } result = pg_TwoIntsFromObj(item, val3, val4); Py_DECREF(item); if (!result) { PyErr_SetString(PyExc_TypeError, "number pair expected for second argument"); return 0; } } else if (length == 4) { if (!pg_IntFromObjIndex(obj, 0, val1)) { PyErr_SetString(PyExc_TypeError, "number expected for first argument"); return 0; } if (!pg_IntFromObjIndex(obj, 1, val2)) { PyErr_SetString(PyExc_TypeError, "number expected for second argument"); return 0; } if (!pg_IntFromObjIndex(obj, 2, val3)) { PyErr_SetString(PyExc_TypeError, "number expected for third argument"); return 0; } if (!pg_IntFromObjIndex(obj, 3, val4)) { PyErr_SetString(PyExc_TypeError, "number expected for fourth argument"); return 0; } } else { PyErr_Format(PyExc_TypeError, "sequence argument takes 2 or 4 items (%ld given)", length); return 0; } return 1; } static PyObject * _pg_rect_subtype_new4(PyTypeObject *type, int x, int y, int w, int h) { pgRectObject *rect = (pgRectObject *)type->tp_new(type, NULL, NULL); if (rect) { rect->r.x = x; rect->r.y = y; rect->r.w = w; rect->r.h = h; } return (PyObject *)rect; } static PyObject * pg_rect_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { pgRectObject *self; #ifdef PYPY_VERSION /* Only instances of the base pygame.Rect class are allowed in the * current freelist implementation (subclasses are not allowed) */ if (pg_rect_freelist_num > -1 && type == &pgRect_Type) { self = pg_rect_freelist[pg_rect_freelist_num]; Py_INCREF(self); /* This is so that pypy garbage collector thinks it is a new obj TODO: May be a hack. Is a hack. See https://github.com/pygame/pygame/issues/430 */ ((PyObject *)(self))->ob_pypy_link = 0; pg_rect_freelist_num--; } else { self = (pgRectObject *)type->tp_alloc(type, 0); } #else self = (pgRectObject *)type->tp_alloc(type, 0); #endif if (self != NULL) { self->r.x = self->r.y = 0; self->r.w = self->r.h = 0; self->weakreflist = NULL; } return (PyObject *)self; } /* object type functions */ static void pg_rect_dealloc(pgRectObject *self) { if (self->weakreflist != NULL) { PyObject_ClearWeakRefs((PyObject *)self); } #ifdef PYPY_VERSION /* Only instances of the base pygame.Rect class are allowed in the * current freelist implementation (subclasses are not allowed) */ if (pg_rect_freelist_num < PG_RECT_FREELIST_MAX - 1 && pgRect_CheckExact(self)) { pg_rect_freelist_num++; pg_rect_freelist[pg_rect_freelist_num] = self; } else { Py_TYPE(self)->tp_free((PyObject *)self); } #else Py_TYPE(self)->tp_free((PyObject *)self); #endif } static SDL_Rect * pgRect_FromObject(PyObject *obj, SDL_Rect *temp) { int val; Py_ssize_t length; if (pgRect_Check(obj)) { return &((pgRectObject *)obj)->r; } if (PySequence_Check(obj) && (length = PySequence_Length(obj)) > 0) { if (length == 4) { if (!pg_IntFromObjIndex(obj, 0, &val)) { return NULL; } temp->x = val; if (!pg_IntFromObjIndex(obj, 1, &val)) { return NULL; } temp->y = val; if (!pg_IntFromObjIndex(obj, 2, &val)) { return NULL; } temp->w = val; if (!pg_IntFromObjIndex(obj, 3, &val)) { return NULL; } temp->h = val; return temp; } if (length == 2) { PyObject *sub = PySequence_GetItem(obj, 0); if (!sub || !PySequence_Check(sub) || PySequence_Length(sub) != 2) { PyErr_Clear(); Py_XDECREF(sub); return NULL; } if (!pg_IntFromObjIndex(sub, 0, &val)) { Py_DECREF(sub); return NULL; } temp->x = val; if (!pg_IntFromObjIndex(sub, 1, &val)) { Py_DECREF(sub); return NULL; } temp->y = val; Py_DECREF(sub); sub = PySequence_GetItem(obj, 1); if (sub == NULL || !PySequence_Check(sub) || PySequence_Length(sub) != 2) { PyErr_Clear(); Py_XDECREF(sub); return NULL; } if (!pg_IntFromObjIndex(sub, 0, &val)) { Py_DECREF(sub); return NULL; } temp->w = val; if (!pg_IntFromObjIndex(sub, 1, &val)) { Py_DECREF(sub); return NULL; } temp->h = val; Py_DECREF(sub); return temp; } if (PyTuple_Check(obj) && length == 1) /*looks like an arg?*/ { PyObject *sub = PyTuple_GET_ITEM(obj, 0); if (sub) { return pgRect_FromObject(sub, temp); } } } if (PyObject_HasAttrString(obj, "rect")) { PyObject *rectattr; SDL_Rect *returnrect; rectattr = PyObject_GetAttrString(obj, "rect"); if (rectattr == NULL) { PyErr_Clear(); return NULL; } if (PyCallable_Check(rectattr)) /*call if it's a method*/ { PyObject *rectresult = PyObject_CallObject(rectattr, NULL); Py_DECREF(rectattr); if (rectresult == NULL) { PyErr_Clear(); return NULL; } rectattr = rectresult; } returnrect = pgRect_FromObject(rectattr, temp); Py_DECREF(rectattr); return returnrect; } return NULL; } static PyObject * pgRect_New(SDL_Rect *r) { return _pg_rect_subtype_new4(&pgRect_Type, r->x, r->y, r->w, r->h); } static PyObject * pgRect_New4(int x, int y, int w, int h) { return _pg_rect_subtype_new4(&pgRect_Type, x, y, w, h); } static void pgRect_Normalize(SDL_Rect *rect) { if (rect->w < 0) { rect->x += rect->w; rect->w = -rect->w; } if (rect->h < 0) { rect->y += rect->h; rect->h = -rect->h; } } static int _pg_do_rects_intersect(SDL_Rect *A, SDL_Rect *B) { if (A->w == 0 || A->h == 0 || B->w == 0 || B->h == 0) { // zero sized rects should not collide with anything #1197 return 0; } // A.left < B.right && // A.top < B.bottom && // A.right > B.left && // A.bottom > B.top return (MIN(A->x, A->x + A->w) < MAX(B->x, B->x + B->w) && MIN(A->y, A->y + A->h) < MAX(B->y, B->y + B->h) && MAX(A->x, A->x + A->w) > MIN(B->x, B->x + B->w) && MAX(A->y, A->y + A->h) > MIN(B->y, B->y + B->h)); } static PyObject * pg_rect_normalize(pgRectObject *self, PyObject *_null) { pgRect_Normalize(&pgRect_AsRect(self)); Py_RETURN_NONE; } static PyObject * pg_rect_move(pgRectObject *self, PyObject *args) { int x = 0, y = 0; if (!pg_TwoIntsFromObj(args, &x, &y)) { return RAISE(PyExc_TypeError, "argument must contain two numbers"); } return _pg_rect_subtype_new4(Py_TYPE(self), self->r.x + x, self->r.y + y, self->r.w, self->r.h); } static PyObject * pg_rect_move_ip(pgRectObject *self, PyObject *args) { int x = 0, y = 0; if (!pg_TwoIntsFromObj(args, &x, &y)) { return RAISE(PyExc_TypeError, "argument must contain two numbers"); } self->r.x += x; self->r.y += y; Py_RETURN_NONE; } static PyObject * pg_rect_inflate(pgRectObject *self, PyObject *args) { int x = 0, y = 0; if (!pg_TwoIntsFromObj(args, &x, &y)) { return RAISE(PyExc_TypeError, "argument must contain two numbers"); } return _pg_rect_subtype_new4(Py_TYPE(self), self->r.x - x / 2, self->r.y - y / 2, self->r.w + x, self->r.h + y); } static PyObject * pg_rect_inflate_ip(pgRectObject *self, PyObject *args) { int x = 0, y = 0; if (!pg_TwoIntsFromObj(args, &x, &y)) { return RAISE(PyExc_TypeError, "argument must contain two numbers"); } self->r.x -= x / 2; self->r.y -= y / 2; self->r.w += x; self->r.h += y; Py_RETURN_NONE; } static PyObject * pg_rect_scale_by_ip(pgRectObject *self, PyObject *args, PyObject *kwargs) { float factor_x, factor_y = 0; static char *keywords[] = {"x", "y", NULL}; if (kwargs) { PyObject *scale_by = PyDict_GetItemString(kwargs, "scale_by"); float temp_x, temp_y = 0; if (scale_by) { if (PyDict_Size(kwargs) > 1) { return RAISE(PyExc_TypeError, "The 'scale_by' keyword cannot be combined with " "other arguments."); } if (!pg_TwoFloatsFromObj(scale_by, &temp_x, &temp_y)) { PyErr_SetString(PyExc_TypeError, "number pair expected"); return 0; } PyDict_SetItemString(kwargs, "x", PyFloat_FromDouble(temp_x)); PyDict_SetItemString(kwargs, "y", PyFloat_FromDouble(temp_y)); PyDict_DelItemString(kwargs, "scale_by"); } } if (!PyArg_ParseTupleAndKeywords(args, kwargs, "f|f", keywords, &factor_x, &factor_y)) { PyErr_SetString(PyExc_TypeError, "Float values expected."); return NULL; } factor_x = factor_x < 0 ? -factor_x : factor_x; factor_y = factor_y < 0 ? -factor_y : factor_y; factor_y = (factor_y > 0) ? factor_y : factor_x; self->r.x = (int)(self->r.x + (self->r.w / 2) - (self->r.w * factor_x / 2)); self->r.y = (int)(self->r.y + (self->r.h / 2) - (self->r.h * factor_y / 2)); self->r.w = (int)(self->r.w * factor_x); self->r.h = (int)(self->r.h * factor_y); Py_RETURN_NONE; } static PyObject * pg_rect_scale_by(pgRectObject *self, PyObject *args, PyObject *kwargs) { pgRectObject *returnRect = (pgRectObject *)_pg_rect_subtype_new4( Py_TYPE(self), self->r.x, self->r.y, self->r.w, self->r.h); pg_rect_scale_by_ip(returnRect, args, kwargs); return (PyObject *)returnRect; } static PyObject * pg_rect_update(pgRectObject *self, PyObject *args) { SDL_Rect temp; SDL_Rect *argrect = pgRect_FromObject(args, &temp); if (argrect == NULL) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } self->r.x = argrect->x; self->r.y = argrect->y; self->r.w = argrect->w; self->r.h = argrect->h; Py_RETURN_NONE; } static PyObject * pg_rect_union(pgRectObject *self, PyObject *args) { SDL_Rect *argrect, temp; int x, y, w, h; if (!(argrect = pgRect_FromObject(args, &temp))) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } x = MIN(self->r.x, argrect->x); y = MIN(self->r.y, argrect->y); w = MAX(self->r.x + self->r.w, argrect->x + argrect->w) - x; h = MAX(self->r.y + self->r.h, argrect->y + argrect->h) - y; return _pg_rect_subtype_new4(Py_TYPE(self), x, y, w, h); } static PyObject * pg_rect_union_ip(pgRectObject *self, PyObject *args) { SDL_Rect *argrect, temp; int x, y, w, h; if (!(argrect = pgRect_FromObject(args, &temp))) return RAISE(PyExc_TypeError, "Argument must be rect style object"); x = MIN(self->r.x, argrect->x); y = MIN(self->r.y, argrect->y); w = MAX(self->r.x + self->r.w, argrect->x + argrect->w) - x; h = MAX(self->r.y + self->r.h, argrect->y + argrect->h) - y; self->r.x = x; self->r.y = y; self->r.w = w; self->r.h = h; Py_RETURN_NONE; } static PyObject * pg_rect_unionall(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t loop, size; PyObject *list, *obj; int t, l, b, r; static char *keywords[] = {"rect", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &list)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } l = self->r.x; t = self->r.y; r = self->r.x + self->r.w; b = self->r.y + self->r.h; size = PySequence_Length(list); /*warning, size could be -1 on error?*/ if (size < 1) { if (size < 0) { /*Error.*/ return NULL; } /*Empty list: nothing to be done.*/ return _pg_rect_subtype_new4(Py_TYPE(self), l, t, r - l, b - t); } for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj || !(argrect = pgRect_FromObject(obj, &temp))) { Py_XDECREF(obj); return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } l = MIN(l, argrect->x); t = MIN(t, argrect->y); r = MAX(r, argrect->x + argrect->w); b = MAX(b, argrect->y + argrect->h); Py_DECREF(obj); } return _pg_rect_subtype_new4(Py_TYPE(self), l, t, r - l, b - t); } static PyObject * pg_rect_unionall_ip(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t loop, size; PyObject *list, *obj; int t, l, b, r; static char *keywords[] = {"rects", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &list)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } l = self->r.x; t = self->r.y; r = self->r.x + self->r.w; b = self->r.y + self->r.h; size = PySequence_Length(list); /*warning, size could be -1 on error?*/ if (size < 1) { if (size < 0) { /*Error.*/ return NULL; } /*Empty list: nothing to be done.*/ Py_RETURN_NONE; } for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj || !(argrect = pgRect_FromObject(obj, &temp))) { Py_XDECREF(obj); return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } l = MIN(l, argrect->x); t = MIN(t, argrect->y); r = MAX(r, argrect->x + argrect->w); b = MAX(b, argrect->y + argrect->h); Py_DECREF(obj); } self->r.x = l; self->r.y = t; self->r.w = r - l; self->r.h = b - t; Py_RETURN_NONE; } static PyObject * pg_rect_collidepoint(pgRectObject *self, PyObject *args) { int x = 0, y = 0; int inside; if (!pg_TwoIntsFromObj(args, &x, &y)) { return RAISE(PyExc_TypeError, "argument must contain two numbers"); } inside = x >= self->r.x && x < self->r.x + self->r.w && y >= self->r.y && y < self->r.y + self->r.h; return PyBool_FromLong(inside); } static PyObject * pg_rect_colliderect(pgRectObject *self, PyObject *const *args, Py_ssize_t nargs) { /* This function got changed to use the FASTCALL calling convention in * Python 3.7. This lets us exploit the fact that we don't have an * intermediate Tuple args object to extract all the arguments from, saving * us performance in the process. This decoupling forces us to deal with * all the different cases (dictated by the number of parameters) by * building specific code paths. * Given that this function accepts any Rect-like object, there are 3 main * cases to deal with: * - 1 parameter: a Rect-like object * - 2 parameters: two sequences that represent the position and dimensions * of the Rect * - 4 parameters: four numbers that represent the position and dimensions */ SDL_Rect srect = self->r; SDL_Rect temp; if (nargs == 1) { /* One argument was passed in, so we assume it's a rectstyle object. * This could mean several of the following (all dealt by * pgRect_FromObject): * - (x, y, w, h) * - ((x, y), (w, h)) * - Rect * - Object with "rect" attribute */ SDL_Rect *tmp; if (!(tmp = pgRect_FromObject(args[0], &temp))) { if (PyErr_Occurred()) { return NULL; } else { return RAISE(PyExc_TypeError, "Invalid rect, all 4 fields must be numeric"); } } return PyBool_FromLong(_pg_do_rects_intersect(&srect, tmp)); } else if (nargs == 2) { /* Two separate sequences were passed in: * - (x, y), (w, h) */ if (!pg_TwoIntsFromObj(args[0], &temp.x, &temp.y) || !pg_TwoIntsFromObj(args[1], &temp.w, &temp.h)) { if (PyErr_Occurred()) return NULL; else return RAISE(PyExc_TypeError, "Invalid rect, all 4 fields must be numeric"); } } else if (nargs == 4) { /* Four separate arguments were passed in: * - x, y, w, h */ if (!(pg_IntFromObj(args[0], &temp.x))) { return RAISE(PyExc_TypeError, "Invalid x value for rect, must be numeric"); } if (!(pg_IntFromObj(args[1], &temp.y))) { return RAISE(PyExc_TypeError, "Invalid y value for rect, must be numeric"); } if (!(pg_IntFromObj(args[2], &temp.w))) { return RAISE(PyExc_TypeError, "Invalid w value for rect, must be numeric"); } if (!(pg_IntFromObj(args[3], &temp.h))) { return RAISE(PyExc_TypeError, "Invalid h value for rect, must be numeric"); } } else { return RAISE(PyExc_ValueError, "Incorrect arguments number, must be either 1, 2 or 4"); } return PyBool_FromLong(_pg_do_rects_intersect(&srect, &temp)); } PG_WRAP_FASTCALL_FUNC(pg_rect_colliderect, pgRectObject) static PyObject * pg_rect_collidelist(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t size; int loop; PyObject *list, *obj; PyObject *ret = NULL; static char *keywords[] = {"rects", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &list)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } size = PySequence_Length(list); /*warning, size could be -1 on error?*/ for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj || !(argrect = pgRect_FromObject(obj, &temp))) { PyErr_SetString( PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); Py_XDECREF(obj); break; } if (_pg_do_rects_intersect(&self->r, argrect)) { ret = PyLong_FromLong(loop); Py_DECREF(obj); break; } Py_DECREF(obj); } if (loop == size) { ret = PyLong_FromLong(-1); } return ret; } static PyObject * pg_rect_collidelistall(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t size; int loop; PyObject *list, *obj; PyObject *ret = NULL; static char *keywords[] = {"rects", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &list)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } ret = PyList_New(0); if (!ret) { return NULL; } size = PySequence_Length(list); /*warning, size could be -1?*/ for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj || !(argrect = pgRect_FromObject(obj, &temp))) { Py_XDECREF(obj); Py_DECREF(ret); return RAISE(PyExc_TypeError, "Argument must be a sequence of rectstyle objects."); } if (_pg_do_rects_intersect(&self->r, argrect)) { PyObject *num = PyLong_FromLong(loop); if (!num) { Py_DECREF(ret); Py_DECREF(obj); return NULL; } if (0 != PyList_Append(ret, num)) { Py_DECREF(ret); Py_DECREF(num); Py_DECREF(obj); return NULL; /* Exception already set. */ } Py_DECREF(num); } Py_DECREF(obj); } return ret; } static SDL_Rect * pgRect_FromObjectAndKeyFunc(PyObject *obj, PyObject *keyfunc, SDL_Rect *temp) { if (keyfunc) { PyObject *obj_with_rect = PyObject_CallFunctionObjArgs(keyfunc, obj, NULL); if (!obj_with_rect) { return NULL; } SDL_Rect *ret = pgRect_FromObject(obj_with_rect, temp); Py_DECREF(obj_with_rect); if (!ret) { PyErr_SetString( PyExc_TypeError, "Key function must return rect or rect-like objects"); return NULL; } return ret; } else { SDL_Rect *ret = pgRect_FromObject(obj, temp); if (!ret) { PyErr_SetString(PyExc_TypeError, "Sequence must contain rect or rect-like objects"); return NULL; } return ret; } } static PyObject * pg_rect_collideobjectsall(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect; SDL_Rect temp; Py_ssize_t size; int loop; PyObject *list, *obj; PyObject *keyfunc = NULL; PyObject *ret = NULL; static char *keywords[] = {"list", "key", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$O:collideobjectsall", keywords, &list, &keyfunc)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of objects."); } if (keyfunc == Py_None) { keyfunc = NULL; } if (keyfunc && !PyCallable_Check(keyfunc)) { return RAISE(PyExc_TypeError, "Key function must be callable with one argument."); } ret = PyList_New(0); if (!ret) { return NULL; } size = PySequence_Length(list); if (size == -1) { Py_DECREF(ret); return NULL; } for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj) { Py_DECREF(ret); return NULL; } if (!(argrect = pgRect_FromObjectAndKeyFunc(obj, keyfunc, &temp))) { Py_XDECREF(obj); Py_DECREF(ret); return NULL; } if (_pg_do_rects_intersect(&self->r, argrect)) { if (0 != PyList_Append(ret, obj)) { Py_DECREF(ret); Py_DECREF(obj); return NULL; /* Exception already set. */ } } Py_DECREF(obj); } return ret; } static PyObject * pg_rect_collideobjects(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect; SDL_Rect temp; Py_ssize_t size; int loop; PyObject *list, *obj; PyObject *keyfunc = NULL; static char *keywords[] = {"list", "key", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$O:collideobjects", keywords, &list, &keyfunc)) { return NULL; } if (!PySequence_Check(list)) { return RAISE(PyExc_TypeError, "Argument must be a sequence of objects."); } if (keyfunc == Py_None) { keyfunc = NULL; } if (keyfunc && !PyCallable_Check(keyfunc)) { return RAISE(PyExc_TypeError, "Key function must be callable with one argument."); } size = PySequence_Length(list); if (size == -1) { return NULL; } for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj) { return NULL; } if (!(argrect = pgRect_FromObjectAndKeyFunc(obj, keyfunc, &temp))) { Py_XDECREF(obj); return NULL; } if (_pg_do_rects_intersect(&self->r, argrect)) { return obj; } Py_DECREF(obj); } Py_RETURN_NONE; } static PyObject * pg_rect_collidedict(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t loop = 0; Py_ssize_t values = 0; /* Defaults to expecting keys as rects. */ PyObject *dict, *key, *val; PyObject *ret = NULL; static char *keywords[] = {"rect_dict", "values", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i", keywords, &dict, &values)) { return NULL; } if (!PyDict_Check(dict)) { return RAISE(PyExc_TypeError, "first argument must be a dict"); } while (PyDict_Next(dict, &loop, &key, &val)) { if (values) { if (!(argrect = pgRect_FromObject(val, &temp))) { return RAISE(PyExc_TypeError, "dict must have rectstyle values"); } } else { if (!(argrect = pgRect_FromObject(key, &temp))) { return RAISE(PyExc_TypeError, "dict must have rectstyle keys"); } } if (_pg_do_rects_intersect(&self->r, argrect)) { ret = Py_BuildValue("(OO)", key, val); break; } } if (!ret) { Py_RETURN_NONE; } return ret; } static PyObject * pg_rect_collidedictall(pgRectObject *self, PyObject *args, PyObject *kwargs) { SDL_Rect *argrect, temp; Py_ssize_t loop = 0; Py_ssize_t values = 0; /* Defaults to expecting keys as rects. */ PyObject *dict, *key, *val; PyObject *ret = NULL; static char *keywords[] = {"rect_dict", "values", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i", keywords, &dict, &values)) { return NULL; } if (!PyDict_Check(dict)) { return RAISE(PyExc_TypeError, "first argument must be a dict"); } ret = PyList_New(0); if (!ret) return NULL; while (PyDict_Next(dict, &loop, &key, &val)) { if (values) { if (!(argrect = pgRect_FromObject(val, &temp))) { Py_DECREF(ret); return RAISE(PyExc_TypeError, "dict must have rectstyle values"); } } else { if (!(argrect = pgRect_FromObject(key, &temp))) { Py_DECREF(ret); return RAISE(PyExc_TypeError, "dict must have rectstyle keys"); } } if (_pg_do_rects_intersect(&self->r, argrect)) { PyObject *num = Py_BuildValue("(OO)", key, val); if (!num) { Py_DECREF(ret); return NULL; } if (0 != PyList_Append(ret, num)) { Py_DECREF(ret); Py_DECREF(num); return NULL; /* Exception already set. */ } Py_DECREF(num); } } return ret; } static PyObject * pg_rect_clip(pgRectObject *self, PyObject *args) { SDL_Rect *A, *B, temp; int x, y, w, h; A = &self->r; if (!(B = pgRect_FromObject(args, &temp))) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } /* Left */ if ((A->x >= B->x) && (A->x < (B->x + B->w))) { x = A->x; } else if ((B->x >= A->x) && (B->x < (A->x + A->w))) x = B->x; else goto nointersect; /* Right */ if (((A->x + A->w) > B->x) && ((A->x + A->w) <= (B->x + B->w))) { w = (A->x + A->w) - x; } else if (((B->x + B->w) > A->x) && ((B->x + B->w) <= (A->x + A->w))) w = (B->x + B->w) - x; else goto nointersect; /* Top */ if ((A->y >= B->y) && (A->y < (B->y + B->h))) { y = A->y; } else if ((B->y >= A->y) && (B->y < (A->y + A->h))) y = B->y; else goto nointersect; /* Bottom */ if (((A->y + A->h) > B->y) && ((A->y + A->h) <= (B->y + B->h))) { h = (A->y + A->h) - y; } else if (((B->y + B->h) > A->y) && ((B->y + B->h) <= (A->y + A->h))) h = (B->y + B->h) - y; else goto nointersect; return _pg_rect_subtype_new4(Py_TYPE(self), x, y, w, h); nointersect: return _pg_rect_subtype_new4(Py_TYPE(self), A->x, A->y, 0, 0); } /* clipline() - crops the given line within the rect * * Supported argument formats: * clipline(x1, y1, x2, y2) - 4 ints * clipline((x1, y1), (x2, y2)) - 2 sequences of 2 ints * clipline(((x1, y1), (x2, y2))) - 1 sequence of 2 sequences of 2 ints * clipline((x1, y1, x2, y2)) - 1 sequence of 4 ints * * Returns: * PyObject: containing one of the following tuples * ((x1, y1), (x2, y2)) - tuple of 2 tuples of 2 ints, cropped input * line if line intersects with rect * () - empty tuple, if no intersection */ static PyObject * pg_rect_clipline(pgRectObject *self, PyObject *args, PyObject *kwargs) { PyObject *arg1 = NULL, *arg2 = NULL, *arg3 = NULL, *arg4 = NULL; SDL_Rect *rect = &self->r, *rect_copy = NULL; int x1 = 0, y1 = 0, x2 = 0, y2 = 0; static char *keywords[] = {"x1", "x2", "x3", "x4", NULL}; if (kwargs) { int temp_x1 = 0, temp_x2 = 0, temp_x3 = 0, temp_x4 = 0; // Handles 'first_coord' and 'second_coord' scenarios PyObject *first_coord = PyDict_GetItemString(kwargs, "first_coordinate"); PyObject *second_coord = PyDict_GetItemString(kwargs, "second_coordinate"); if (first_coord && second_coord) { if (PyDict_Size(kwargs) > 2) { return RAISE( PyExc_TypeError, "Only 2 keyword argument can be passed when " "using 'first_coordinate' and 'second_coordinate'"); } if (!pg_TwoIntsFromObj(first_coord, &temp_x1, &temp_x2)) { PyErr_SetString(PyExc_TypeError, "number pair expected for first argument"); return 0; } PyDict_SetItemString(kwargs, "x1", PyLong_FromLong(temp_x1)); PyDict_SetItemString(kwargs, "x2", PyLong_FromLong(temp_x2)); PyDict_DelItemString(kwargs, "first_coordinate"); if (!pg_TwoIntsFromObj(second_coord, &temp_x3, &temp_x4)) { PyErr_SetString(PyExc_TypeError, "number pair expected for second argument"); return 0; } PyDict_SetItemString(kwargs, "x3", PyLong_FromLong(temp_x3)); PyDict_SetItemString(kwargs, "x4", PyLong_FromLong(temp_x4)); PyDict_DelItemString(kwargs, "second_coordinate"); } // Handles 'rect_arg' scenarios PyObject *rect_arg = PyDict_GetItemString(kwargs, "rect_arg"); if (rect_arg) { if (PyDict_Size(kwargs) > 1) { return RAISE(PyExc_TypeError, "Only 1 keyword argument can be passed when " "using 'rect_arg"); } else if (!four_ints_from_obj(rect_arg, &temp_x1, &temp_x2, &temp_x3, &temp_x4)) { return 0; // Exception already set } PyDict_SetItemString(kwargs, "x1", PyLong_FromLong(temp_x1)); PyDict_SetItemString(kwargs, "x2", PyLong_FromLong(temp_x2)); PyDict_SetItemString(kwargs, "x3", PyLong_FromLong(temp_x3)); PyDict_SetItemString(kwargs, "x4", PyLong_FromLong(temp_x4)); PyDict_DelItemString(kwargs, "rect_arg"); } } if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO", keywords, &arg1, &arg2, &arg3, &arg4)) { return NULL; /* Exception already set. */ } if (arg2 == NULL) { /* Handles formats: * clipline(((x1, y1), (x2, y2))) * clipline((x1, y1, x2, y2)) */ if (!four_ints_from_obj(arg1, &x1, &y1, &x2, &y2)) { return NULL; /* Exception already set. */ } } else if (arg3 == NULL) { /* Handles format: clipline((x1, y1), (x2, y2)) */ int result = pg_TwoIntsFromObj(arg1, &x1, &y1); if (!result) { return RAISE(PyExc_TypeError, "number pair expected for first argument"); } /* Get the other end of the line. */ result = pg_TwoIntsFromObj(arg2, &x2, &y2); if (!result) { return RAISE(PyExc_TypeError, "number pair expected for second argument"); } } else if (arg4 != NULL) { /* Handles format: clipline(x1, y1, x2, y2) */ int result = pg_IntFromObj(arg1, &x1); if (!result) { return RAISE(PyExc_TypeError, "number expected for first argument"); } result = pg_IntFromObj(arg2, &y1); if (!result) { return RAISE(PyExc_TypeError, "number expected for second argument"); } result = pg_IntFromObj(arg3, &x2); if (!result) { return RAISE(PyExc_TypeError, "number expected for third argument"); } result = pg_IntFromObj(arg4, &y2); if (!result) { return RAISE(PyExc_TypeError, "number expected for fourth argument"); } } else { return RAISE(PyExc_TypeError, "clipline() takes 1, 2, or 4 arguments (3 given)"); } if ((self->r.w < 0) || (self->r.h < 0)) { /* Make a copy of the rect so it can be normalized. */ rect_copy = &pgRect_AsRect(pgRect_New(&self->r)); if (NULL == rect_copy) { return RAISE(PyExc_MemoryError, "cannot allocate memory for rect"); } pgRect_Normalize(rect_copy); rect = rect_copy; } if (!SDL_IntersectRectAndLine(rect, &x1, &y1, &x2, &y2)) { Py_XDECREF(rect_copy); return PyTuple_New(0); } Py_XDECREF(rect_copy); return Py_BuildValue("((ii)(ii))", x1, y1, x2, y2); } static int _pg_rect_contains(pgRectObject *self, PyObject *arg) { SDL_Rect *argrect, temp_arg; if (!(argrect = pgRect_FromObject((PyObject *)arg, &temp_arg))) { return -1; } return (self->r.x <= argrect->x) && (self->r.y <= argrect->y) && (self->r.x + self->r.w >= argrect->x + argrect->w) && (self->r.y + self->r.h >= argrect->y + argrect->h) && (self->r.x + self->r.w > argrect->x) && (self->r.y + self->r.h > argrect->y); } static PyObject * pg_rect_contains(pgRectObject *self, PyObject *arg) { int ret = _pg_rect_contains(self, arg); if (ret < 0) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } return PyBool_FromLong(ret); } static int pg_rect_contains_seq(pgRectObject *self, PyObject *arg) { if (PyLong_Check(arg)) { int coord = (int)PyLong_AsLong(arg); return coord == self->r.x || coord == self->r.y || coord == self->r.w || coord == self->r.h; } int ret = _pg_rect_contains(self, arg); if (ret < 0) { PyErr_SetString(PyExc_TypeError, "'in ' requires rect style object" " or int as left operand"); } return ret; } static PyObject * pg_rect_clamp(pgRectObject *self, PyObject *args) { SDL_Rect *argrect, temp; int x, y; if (!(argrect = pgRect_FromObject(args, &temp))) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } if (self->r.w >= argrect->w) { x = argrect->x + argrect->w / 2 - self->r.w / 2; } else if (self->r.x < argrect->x) x = argrect->x; else if (self->r.x + self->r.w > argrect->x + argrect->w) x = argrect->x + argrect->w - self->r.w; else x = self->r.x; if (self->r.h >= argrect->h) { y = argrect->y + argrect->h / 2 - self->r.h / 2; } else if (self->r.y < argrect->y) y = argrect->y; else if (self->r.y + self->r.h > argrect->y + argrect->h) y = argrect->y + argrect->h - self->r.h; else y = self->r.y; return _pg_rect_subtype_new4(Py_TYPE(self), x, y, self->r.w, self->r.h); } static PyObject * pg_rect_fit(pgRectObject *self, PyObject *args) { SDL_Rect *argrect, temp; int w, h, x, y; float xratio, yratio, maxratio; if (!(argrect = pgRect_FromObject(args, &temp))) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } xratio = (float)self->r.w / (float)argrect->w; yratio = (float)self->r.h / (float)argrect->h; maxratio = (xratio > yratio) ? xratio : yratio; w = (int)(self->r.w / maxratio); h = (int)(self->r.h / maxratio); x = argrect->x + (argrect->w - w) / 2; y = argrect->y + (argrect->h - h) / 2; return _pg_rect_subtype_new4(Py_TYPE(self), x, y, w, h); } static PyObject * pg_rect_clamp_ip(pgRectObject *self, PyObject *args) { SDL_Rect *argrect, temp; int x, y; if (!(argrect = pgRect_FromObject(args, &temp))) { return RAISE(PyExc_TypeError, "Argument must be rect style object"); } if (self->r.w >= argrect->w) { x = argrect->x + argrect->w / 2 - self->r.w / 2; } else if (self->r.x < argrect->x) x = argrect->x; else if (self->r.x + self->r.w > argrect->x + argrect->w) x = argrect->x + argrect->w - self->r.w; else x = self->r.x; if (self->r.h >= argrect->h) { y = argrect->y + argrect->h / 2 - self->r.h / 2; } else if (self->r.y < argrect->y) y = argrect->y; else if (self->r.y + self->r.h > argrect->y + argrect->h) y = argrect->y + argrect->h - self->r.h; else y = self->r.y; self->r.x = x; self->r.y = y; Py_RETURN_NONE; } /* for pickling */ static PyObject * pg_rect_reduce(pgRectObject *self, PyObject *_null) { return Py_BuildValue("(O(iiii))", Py_TYPE(self), (int)self->r.x, (int)self->r.y, (int)self->r.w, (int)self->r.h); } /* for copy module */ static PyObject * pg_rect_copy(pgRectObject *self, PyObject *_null) { return _pg_rect_subtype_new4(Py_TYPE(self), self->r.x, self->r.y, self->r.w, self->r.h); } static struct PyMethodDef pg_rect_methods[] = { {"normalize", (PyCFunction)pg_rect_normalize, METH_NOARGS, DOC_RECTNORMALIZE}, {"clip", (PyCFunction)pg_rect_clip, METH_VARARGS, DOC_RECTCLIP}, {"clipline", (PyCFunction)pg_rect_clipline, METH_VARARGS | METH_KEYWORDS, DOC_RECTCLIPLINE}, {"clamp", (PyCFunction)pg_rect_clamp, METH_VARARGS, DOC_RECTCLAMP}, {"clamp_ip", (PyCFunction)pg_rect_clamp_ip, METH_VARARGS, DOC_RECTCLAMPIP}, {"copy", (PyCFunction)pg_rect_copy, METH_NOARGS, DOC_RECTCOPY}, {"fit", (PyCFunction)pg_rect_fit, METH_VARARGS, DOC_RECTFIT}, {"move", (PyCFunction)pg_rect_move, METH_VARARGS, DOC_RECTMOVE}, {"update", (PyCFunction)pg_rect_update, METH_VARARGS, DOC_RECTUPDATE}, {"scale_by", (PyCFunction)pg_rect_scale_by, METH_VARARGS | METH_KEYWORDS, DOC_RECTSCALEBY}, {"inflate", (PyCFunction)pg_rect_inflate, METH_VARARGS, DOC_RECTINFLATE}, {"union", (PyCFunction)pg_rect_union, METH_VARARGS, DOC_RECTUNION}, {"unionall", (PyCFunction)pg_rect_unionall, METH_VARARGS | METH_KEYWORDS, DOC_RECTUNIONALL}, {"move_ip", (PyCFunction)pg_rect_move_ip, METH_VARARGS, DOC_RECTMOVEIP}, {"inflate_ip", (PyCFunction)pg_rect_inflate_ip, METH_VARARGS, DOC_RECTINFLATEIP}, {"scale_by_ip", (PyCFunction)pg_rect_scale_by_ip, METH_VARARGS | METH_KEYWORDS, DOC_RECTSCALEBYIP}, {"union_ip", (PyCFunction)pg_rect_union_ip, METH_VARARGS, DOC_RECTUNIONIP}, {"unionall_ip", (PyCFunction)pg_rect_unionall_ip, METH_VARARGS | METH_KEYWORDS, DOC_RECTUNIONALLIP}, {"collidepoint", (PyCFunction)pg_rect_collidepoint, METH_VARARGS, DOC_RECTCOLLIDEPOINT}, {"colliderect", (PyCFunction)PG_FASTCALL_NAME(pg_rect_colliderect), PG_FASTCALL, DOC_RECTCOLLIDERECT}, {"collidelist", (PyCFunction)pg_rect_collidelist, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDELIST}, {"collidelistall", (PyCFunction)pg_rect_collidelistall, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDELISTALL}, {"collideobjectsall", (PyCFunction)pg_rect_collideobjectsall, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDEOBJECTSALL}, {"collideobjects", (PyCFunction)pg_rect_collideobjects, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDEOBJECTS}, {"collidedict", (PyCFunction)pg_rect_collidedict, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDEDICT}, {"collidedictall", (PyCFunction)pg_rect_collidedictall, METH_VARARGS | METH_KEYWORDS, DOC_RECTCOLLIDEDICTALL}, {"contains", (PyCFunction)pg_rect_contains, METH_VARARGS, DOC_RECTCONTAINS}, {"__reduce__", (PyCFunction)pg_rect_reduce, METH_NOARGS, NULL}, {"__copy__", (PyCFunction)pg_rect_copy, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL}}; /* sequence functions */ static Py_ssize_t pg_rect_length(PyObject *_self) { return 4; } static PyObject * pg_rect_item(pgRectObject *self, Py_ssize_t i) { int *data = (int *)&self->r; if (i < 0 || i > 3) { if (i > -5 && i < 0) { i += 4; } else { return RAISE(PyExc_IndexError, "Invalid rect Index"); } } return PyLong_FromLong(data[i]); } static int pg_rect_ass_item(pgRectObject *self, Py_ssize_t i, PyObject *v) { int val = 0; int *data = (int *)&self->r; if (!v) { PyErr_SetString(PyExc_TypeError, "item deletion is not supported"); return -1; } if (i < 0 || i > 3) { if (i > -5 && i < 0) { i += 4; } else { PyErr_SetString(PyExc_IndexError, "Invalid rect Index"); return -1; } } if (!pg_IntFromObj(v, &val)) { PyErr_SetString(PyExc_TypeError, "Must assign numeric values"); return -1; } data[i] = val; return 0; } static PySequenceMethods pg_rect_as_sequence = { .sq_length = pg_rect_length, .sq_item = (ssizeargfunc)pg_rect_item, .sq_ass_item = (ssizeobjargproc)pg_rect_ass_item, .sq_contains = (objobjproc)pg_rect_contains_seq, }; static PyObject * pg_rect_subscript(pgRectObject *self, PyObject *op) { int *data = (int *)&self->r; if (PyIndex_Check(op)) { PyObject *index = PyNumber_Index(op); Py_ssize_t i; if (index == NULL) { return NULL; } i = PyNumber_AsSsize_t(index, NULL); Py_DECREF(index); return pg_rect_item(self, i); } else if (op == Py_Ellipsis) { return Py_BuildValue("[iiii]", data[0], data[1], data[2], data[3]); } else if (PySlice_Check(op)) { PyObject *slice; Py_ssize_t start; Py_ssize_t stop; Py_ssize_t step; Py_ssize_t slicelen; Py_ssize_t i; PyObject *n; if (PySlice_GetIndicesEx(op, 4, &start, &stop, &step, &slicelen)) { return NULL; } slice = PyList_New(slicelen); if (slice == NULL) { return NULL; } for (i = 0; i < slicelen; ++i) { n = PyLong_FromSsize_t(data[start + (step * i)]); if (n == NULL) { Py_DECREF(slice); return NULL; } PyList_SET_ITEM(slice, i, n); } return slice; } return RAISE(PyExc_TypeError, "Invalid Rect slice"); } static int pg_rect_ass_subscript(pgRectObject *self, PyObject *op, PyObject *value) { if (!value) { PyErr_SetString(PyExc_TypeError, "item deletion is not supported"); return -1; } if (PyIndex_Check(op)) { PyObject *index; Py_ssize_t i; index = PyNumber_Index(op); if (index == NULL) { return -1; } i = PyNumber_AsSsize_t(index, NULL); Py_DECREF(index); return pg_rect_ass_item(self, i, value); } else if (op == Py_Ellipsis) { int val = 0; if (pg_IntFromObj(value, &val)) { self->r.x = val; self->r.y = val; self->r.w = val; self->r.h = val; } else if (pgRect_Check(value)) { pgRectObject *rect = (pgRectObject *)value; self->r.x = rect->r.x; self->r.y = rect->r.y; self->r.w = rect->r.w; self->r.h = rect->r.h; } else if (PySequence_Check(value)) { PyObject *item; int values[4]; Py_ssize_t i; if (PySequence_Size(value) != 4) { PyErr_SetString(PyExc_TypeError, "Expect a length 4 sequence"); return -1; } for (i = 0; i < 4; ++i) { item = PySequence_ITEM(value, i); if (!pg_IntFromObj(item, values + i)) { PyErr_Format(PyExc_TypeError, "Expected an integer between %d and %d", INT_MIN, INT_MAX); } } self->r.x = values[0]; self->r.y = values[1]; self->r.w = values[2]; self->r.h = values[3]; } else { PyErr_SetString(PyExc_TypeError, "Expected an integer or sequence"); return -1; } } else if (PySlice_Check(op)) { int *data = (int *)&self->r; Py_ssize_t start; Py_ssize_t stop; Py_ssize_t step; Py_ssize_t slicelen; int val = 0; Py_ssize_t i; if (PySlice_GetIndicesEx(op, 4, &start, &stop, &step, &slicelen)) { return -1; } if (pg_IntFromObj(value, &val)) { for (i = 0; i < slicelen; ++i) { data[start + step * i] = val; } } else if (PySequence_Check(value)) { PyObject *item; int values[4]; Py_ssize_t size = PySequence_Size(value); if (size != slicelen) { PyErr_Format(PyExc_TypeError, "Expected a length %zd sequence", slicelen); return -1; } for (i = 0; i < slicelen; ++i) { item = PySequence_ITEM(value, i); if (!pg_IntFromObj(item, values + i)) { PyErr_Format(PyExc_TypeError, "Expected an integer between %d and %d", INT_MIN, INT_MAX); } } for (i = 0; i < slicelen; ++i) { data[start + step * i] = values[i]; } } else { PyErr_SetString(PyExc_TypeError, "Expected an integer or sequence"); return -1; } } else { PyErr_SetString(PyExc_TypeError, "Invalid Rect slice"); return -1; } return 0; } static PyMappingMethods pg_rect_as_mapping = { .mp_length = (lenfunc)pg_rect_length, .mp_subscript = (binaryfunc)pg_rect_subscript, .mp_ass_subscript = (objobjargproc)pg_rect_ass_subscript, }; /* numeric functions */ static int pg_rect_bool(pgRectObject *self) { return self->r.w != 0 && self->r.h != 0; } static PyNumberMethods pg_rect_as_number = { .nb_bool = (inquiry)pg_rect_bool, }; static PyObject * pg_rect_repr(pgRectObject *self) { return PyUnicode_FromFormat("", self->r.x, self->r.y, self->r.w, self->r.h); } static PyObject * pg_rect_str(pgRectObject *self) { return pg_rect_repr(self); } static PyObject * pg_rect_richcompare(PyObject *o1, PyObject *o2, int opid) { SDL_Rect *o1rect, *o2rect, temp1, temp2; int cmp; o1rect = pgRect_FromObject(o1, &temp1); if (!o1rect) { goto Unimplemented; } o2rect = pgRect_FromObject(o2, &temp2); if (!o2rect) { goto Unimplemented; } if (o1rect->x != o2rect->x) { cmp = o1rect->x < o2rect->x ? -1 : 1; } else if (o1rect->y != o2rect->y) { cmp = o1rect->y < o2rect->y ? -1 : 1; } else if (o1rect->w != o2rect->w) { cmp = o1rect->w < o2rect->w ? -1 : 1; } else if (o1rect->h != o2rect->h) { cmp = o1rect->h < o2rect->h ? -1 : 1; } else { cmp = 0; } switch (opid) { case Py_LT: return PyBool_FromLong(cmp < 0); case Py_LE: return PyBool_FromLong(cmp <= 0); case Py_EQ: return PyBool_FromLong(cmp == 0); case Py_NE: return PyBool_FromLong(cmp != 0); case Py_GT: return PyBool_FromLong(cmp > 0); case Py_GE: return PyBool_FromLong(cmp >= 0); default: break; } Unimplemented: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } static PyObject * pg_rect_iterator(pgRectObject *self) { Py_ssize_t i; int *data = (int *)&self->r; PyObject *iter, *tup = PyTuple_New(4); if (!tup) { return NULL; } for (i = 0; i < 4; i++) { PyObject *val = PyLong_FromLong(data[i]); if (!val) { Py_DECREF(tup); return NULL; } PyTuple_SET_ITEM(tup, i, val); } iter = PyTuple_Type.tp_iter(tup); Py_DECREF(tup); return iter; } static int _rounded_int_from_object(PyObject *value, int *val) { double tmpVal; if (!pg_DoubleFromObj(value, &tmpVal)) { PyErr_SetString(PyExc_TypeError, "invalid rect assignment"); return 0; } if (tmpVal > INT_MAX || tmpVal < INT_MIN) { PyErr_Format( PyExc_TypeError, "invalid rect assignment, expected value between %d < x < %d", INT_MIN, INT_MAX); return 0; } *val = (int)pg_round(tmpVal); return 1; } static int _rounded_two_ints_from_object(PyObject *value, int *val1, int *val2) { double tmpVal1, tmpVal2; if (!pg_TwoDoublesFromObj(value, &tmpVal1, &tmpVal2)) { PyErr_SetString(PyExc_TypeError, "invalid rect assignment"); return 0; } if (tmpVal1 > INT_MAX || tmpVal1 < INT_MIN || tmpVal2 > INT_MAX || tmpVal2 < INT_MIN) { PyErr_Format( PyExc_TypeError, "invalid rect assignment, expected value between %d < x < %d", INT_MIN, INT_MAX); return 0; } *val1 = (int)pg_round(tmpVal1); *val2 = (int)pg_round(tmpVal2); return 1; } /*width*/ static PyObject * pg_rect_getwidth(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.w); } static int pg_rect_setwidth(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.w = val1; return 0; } /*height*/ static PyObject * pg_rect_getheight(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.h); } static int pg_rect_setheight(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.h = val1; return 0; } /*top*/ static PyObject * pg_rect_gettop(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.y); } static int pg_rect_settop(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.y = val1; return 0; } /*left*/ static PyObject * pg_rect_getleft(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.x); } static int pg_rect_setleft(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.x = val1; return 0; } /*right*/ static PyObject * pg_rect_getright(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.x + self->r.w); } static int pg_rect_setright(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.x = val1 - self->r.w; return 0; } /*bottom*/ static PyObject * pg_rect_getbottom(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.y + self->r.h); } static int pg_rect_setbottom(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.y = val1 - self->r.h; return 0; } /*centerx*/ static PyObject * pg_rect_getcenterx(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.x + (self->r.w >> 1)); } static int pg_rect_setcenterx(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.x = val1 - (self->r.w >> 1); return 0; } /*centery*/ static PyObject * pg_rect_getcentery(pgRectObject *self, void *closure) { return PyLong_FromLong(self->r.y + (self->r.h >> 1)); } static int pg_rect_setcentery(pgRectObject *self, PyObject *value, void *closure) { int val1; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_int_from_object(value, &val1)) { return -1; } self->r.y = val1 - (self->r.h >> 1); return 0; } /*topleft*/ static PyObject * pg_rect_gettopleft(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x, self->r.y); } static int pg_rect_settopleft(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1; self->r.y = val2; return 0; } /*topright*/ static PyObject * pg_rect_gettopright(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + self->r.w, self->r.y); } static int pg_rect_settopright(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1 - self->r.w; self->r.y = val2; return 0; } /*bottomleft*/ static PyObject * pg_rect_getbottomleft(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x, self->r.y + self->r.h); } static int pg_rect_setbottomleft(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1; self->r.y = val2 - self->r.h; return 0; } /*bottomright*/ static PyObject * pg_rect_getbottomright(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + self->r.w, self->r.y + self->r.h); } static int pg_rect_setbottomright(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1 - self->r.w; self->r.y = val2 - self->r.h; return 0; } /*midtop*/ static PyObject * pg_rect_getmidtop(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + (self->r.w >> 1), self->r.y); } static int pg_rect_setmidtop(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x += val1 - (self->r.x + (self->r.w >> 1)); self->r.y = val2; return 0; } /*midleft*/ static PyObject * pg_rect_getmidleft(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x, self->r.y + (self->r.h >> 1)); } static int pg_rect_setmidleft(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1; self->r.y += val2 - (self->r.y + (self->r.h >> 1)); return 0; } /*midbottom*/ static PyObject * pg_rect_getmidbottom(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + (self->r.w >> 1), self->r.y + self->r.h); } static int pg_rect_setmidbottom(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x += val1 - (self->r.x + (self->r.w >> 1)); self->r.y = val2 - self->r.h; return 0; } /*midright*/ static PyObject * pg_rect_getmidright(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + self->r.w, self->r.y + (self->r.h >> 1)); } static int pg_rect_setmidright(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x = val1 - self->r.w; self->r.y += val2 - (self->r.y + (self->r.h >> 1)); return 0; } /*center*/ static PyObject * pg_rect_getcenter(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.x + (self->r.w >> 1), self->r.y + (self->r.h >> 1)); } static int pg_rect_setcenter(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.x += val1 - (self->r.x + (self->r.w >> 1)); self->r.y += val2 - (self->r.y + (self->r.h >> 1)); return 0; } /*size*/ static PyObject * pg_rect_getsize(pgRectObject *self, void *closure) { return pg_tuple_couple_from_values_int(self->r.w, self->r.h); } static int pg_rect_setsize(pgRectObject *self, PyObject *value, void *closure) { int val1, val2; if (NULL == value) { /* Attribute deletion not supported. */ PyErr_SetString(PyExc_AttributeError, "can't delete attribute"); return -1; } if (!_rounded_two_ints_from_object(value, &val1, &val2)) { return -1; } self->r.w = val1; self->r.h = val2; return 0; } static PyObject * pg_rect_getsafepickle(pgRectObject *self, void *closure) { Py_RETURN_TRUE; } static PyGetSetDef pg_rect_getsets[] = { {"x", (getter)pg_rect_getleft, (setter)pg_rect_setleft, NULL, NULL}, {"y", (getter)pg_rect_gettop, (setter)pg_rect_settop, NULL, NULL}, {"w", (getter)pg_rect_getwidth, (setter)pg_rect_setwidth, NULL, NULL}, {"h", (getter)pg_rect_getheight, (setter)pg_rect_setheight, NULL, NULL}, {"width", (getter)pg_rect_getwidth, (setter)pg_rect_setwidth, NULL, NULL}, {"height", (getter)pg_rect_getheight, (setter)pg_rect_setheight, NULL, NULL}, {"top", (getter)pg_rect_gettop, (setter)pg_rect_settop, NULL, NULL}, {"left", (getter)pg_rect_getleft, (setter)pg_rect_setleft, NULL, NULL}, {"bottom", (getter)pg_rect_getbottom, (setter)pg_rect_setbottom, NULL, NULL}, {"right", (getter)pg_rect_getright, (setter)pg_rect_setright, NULL, NULL}, {"centerx", (getter)pg_rect_getcenterx, (setter)pg_rect_setcenterx, NULL, NULL}, {"centery", (getter)pg_rect_getcentery, (setter)pg_rect_setcentery, NULL, NULL}, {"topleft", (getter)pg_rect_gettopleft, (setter)pg_rect_settopleft, NULL, NULL}, {"topright", (getter)pg_rect_gettopright, (setter)pg_rect_settopright, NULL, NULL}, {"bottomleft", (getter)pg_rect_getbottomleft, (setter)pg_rect_setbottomleft, NULL, NULL}, {"bottomright", (getter)pg_rect_getbottomright, (setter)pg_rect_setbottomright, NULL, NULL}, {"midtop", (getter)pg_rect_getmidtop, (setter)pg_rect_setmidtop, NULL, NULL}, {"midleft", (getter)pg_rect_getmidleft, (setter)pg_rect_setmidleft, NULL, NULL}, {"midbottom", (getter)pg_rect_getmidbottom, (setter)pg_rect_setmidbottom, NULL, NULL}, {"midright", (getter)pg_rect_getmidright, (setter)pg_rect_setmidright, NULL, NULL}, {"size", (getter)pg_rect_getsize, (setter)pg_rect_setsize, NULL, NULL}, {"center", (getter)pg_rect_getcenter, (setter)pg_rect_setcenter, NULL, NULL}, {"__safe_for_unpickling__", (getter)pg_rect_getsafepickle, NULL, NULL, NULL}, {NULL, 0, NULL, NULL, NULL} /* Sentinel */ }; static PyTypeObject pgRect_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.rect.Rect", .tp_basicsize = sizeof(pgRectObject), .tp_dealloc = (destructor)pg_rect_dealloc, .tp_repr = (reprfunc)pg_rect_repr, .tp_as_number = &pg_rect_as_number, .tp_as_sequence = &pg_rect_as_sequence, .tp_as_mapping = &pg_rect_as_mapping, .tp_str = (reprfunc)pg_rect_str, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMERECT, .tp_richcompare = (richcmpfunc)pg_rect_richcompare, .tp_weaklistoffset = offsetof(pgRectObject, weakreflist), .tp_iter = (getiterfunc)pg_rect_iterator, .tp_methods = pg_rect_methods, .tp_getset = pg_rect_getsets, .tp_init = (initproc)pg_rect_init, .tp_new = pg_rect_new, }; static int pg_rect_init(pgRectObject *self, PyObject *args, PyObject *kwds) { SDL_Rect temp; SDL_Rect *argrect = pgRect_FromObject(args, &temp); if (argrect == NULL) { PyErr_SetString(PyExc_TypeError, "Argument must be rect style object"); return -1; } self->r.x = argrect->x; self->r.y = argrect->y; self->r.w = argrect->w; self->r.h = argrect->h; return 0; } static PyMethodDef _pg_module_methods[] = {{NULL, NULL, 0, NULL}}; /*DOC*/ static char _pg_module_doc[] = /*DOC*/ "Module for the rectangle object\n"; MODINIT_DEFINE(rect) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_RECT_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "rect", _pg_module_doc, -1, _pg_module_methods, NULL, NULL, NULL, NULL}; /* import needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* Create the module and add the functions */ if (PyType_Ready(&pgRect_Type) < 0) { return NULL; } module = PyModule_Create(&_module); if (module == NULL) { return NULL; } Py_INCREF(&pgRect_Type); if (PyModule_AddObject(module, "RectType", (PyObject *)&pgRect_Type)) { Py_DECREF(&pgRect_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgRect_Type); if (PyModule_AddObject(module, "Rect", (PyObject *)&pgRect_Type)) { Py_DECREF(&pgRect_Type); Py_DECREF(module); return NULL; } /* export the c api */ c_api[0] = &pgRect_Type; c_api[1] = pgRect_New; c_api[2] = pgRect_New4; c_api[3] = pgRect_FromObject; c_api[4] = pgRect_Normalize; apiobj = encapsulate_api(c_api, "rect"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/rotozoom.c0000644000175100001770000004651314676242340015555 0ustar00runnerdocker/* SDL_rotozoom.c - rotozoomer for 32bit or 8bit surfaces LGPL (c) A. Schiffler This is a trimmed down version of SDL_rotozoom, from the SDL_gfx library. This source is from version 2.0.3. What's left is only what's needed for the rotozoom function. */ #define NO_PYGAME_C_API #include "pygame.h" #include "math.h" typedef struct tColorRGBA { Uint8 r; Uint8 g; Uint8 b; Uint8 a; } tColorRGBA; #define VALUE_LIMIT 0.001 #ifndef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef M_PI #define M_PI 3.141592654 #endif /* 32bit Zoomer with optional anti-aliasing by bilinear interpolation. Zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface. */ int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int smooth) { int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy, ex, ey, t1, t2, sstep; tColorRGBA *c00, *c01, *c10, *c11; tColorRGBA *sp, *csp, *dp; int dgap; /* * Variable setup */ if (smooth) { /* * For interpolation: assume source dimension is one pixel */ /* * smaller to avoid overflow on right and bottom edge. */ sx = (int)(65536.0 * (float)(src->w - 1) / (float)dst->w); sy = (int)(65536.0 * (float)(src->h - 1) / (float)dst->h); } else { sx = (int)(65536.0 * (float)src->w / (float)dst->w); sy = (int)(65536.0 * (float)src->h / (float)dst->h); } /* * Allocate memory for row increments */ if ((sax = (int *)malloc((dst->w + 1) * sizeof(int))) == NULL) { return (-1); } if ((say = (int *)malloc((dst->h + 1) * sizeof(int))) == NULL) { free(sax); return (-1); } /* * Precalculate row increments */ csx = 0; csax = sax; for (x = 0; x <= dst->w; x++) { *csax = csx; csax++; csx &= 0xffff; csx += sx; } csy = 0; csay = say; for (y = 0; y <= dst->h; y++) { *csay = csy; csay++; csy &= 0xffff; csy += sy; } /* * Pointer setup */ csp = (tColorRGBA *)src->pixels; dp = (tColorRGBA *)dst->pixels; dgap = dst->pitch - dst->w * 4; /* * Switch between interpolating and non-interpolating code */ if (smooth) { /* * Interpolating Zoom */ /* * Scan destination */ csay = say; for (y = 0; y < dst->h; y++) { /* * Setup color source pointers */ c00 = csp; c01 = csp; c01++; c10 = (tColorRGBA *)((Uint8 *)csp + src->pitch); c11 = c10; c11++; csax = sax; for (x = 0; x < dst->w; x++) { /* * Interpolate colors */ ex = (*csax & 0xffff); ey = (*csay & 0xffff); t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff; t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff; dp->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff; t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff; dp->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff; t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff; dp->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff; t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff; dp->a = (((t2 - t1) * ey) >> 16) + t1; /* * Advance source pointers */ csax++; sstep = (*csax >> 16); c00 += sstep; c01 += sstep; c10 += sstep; c11 += sstep; /* * Advance destination pointer */ dp++; } /* * Advance source pointer */ csay++; csp = (tColorRGBA *)((Uint8 *)csp + (*csay >> 16) * src->pitch); /* * Advance destination pointers */ dp = (tColorRGBA *)((Uint8 *)dp + dgap); } } else { /* * Non-Interpolating Zoom */ csay = say; for (y = 0; y < dst->h; y++) { sp = csp; csax = sax; for (x = 0; x < dst->w; x++) { /* * Draw */ *dp = *sp; /* * Advance source pointers */ csax++; sp += (*csax >> 16); /* * Advance destination pointer */ dp++; } /* * Advance source pointer */ csay++; csp = (tColorRGBA *)((Uint8 *)csp + (*csay >> 16) * src->pitch); /* * Advance destination pointers */ dp = (tColorRGBA *)((Uint8 *)dp + dgap); } } /* * Remove temp arrays */ free(sax); free(say); return (0); } /* 32bit Rotozoomer with optional anti-aliasing by bilinear interpolation. Rotates and zooms 32bit RGBA/ABGR 'src' surface to 'dst' surface. */ void transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int smooth) { int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh; tColorRGBA c00, c01, c10, c11; tColorRGBA *pc, *sp; int gap; /* * Variable setup */ xd = ((src->w - dst->w) << 15); yd = ((src->h - dst->h) << 15); ax = (cx << 16) - (icos * cx); ay = (cy << 16) - (isin * cx); sw = src->w - 1; sh = src->h - 1; pc = dst->pixels; gap = dst->pitch - dst->w * 4; /* * Switch between interpolating and non-interpolating code */ if (smooth) { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (sdx >> 16); dy = (sdy >> 16); if ((dx >= -1) && (dy >= -1) && (dx < src->w) && (dy < src->h)) { if ((dx >= 0) && (dy >= 0) && (dx < sw) && (dy < sh)) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); sp += dx; c00 = *sp; sp += 1; c01 = *sp; sp = (tColorRGBA *)((Uint8 *)sp + src->pitch); sp -= 1; c10 = *sp; sp += 1; c11 = *sp; } else if ((dx == sw) && (dy == sh)) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); sp += dx; c00 = *sp; c01 = *sp; c10 = *sp; c11 = *sp; } else if ((dx == -1) && (dy == -1)) { sp = (tColorRGBA *)(src->pixels); c00 = *sp; c01 = *sp; c10 = *sp; c11 = *sp; } else if ((dx == -1) && (dy == sh)) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); c00 = *sp; c01 = *sp; c10 = *sp; c11 = *sp; } else if ((dx == sw) && (dy == -1)) { sp = (tColorRGBA *)(src->pixels); sp += dx; c00 = *sp; c01 = *sp; c10 = *sp; c11 = *sp; } else if (dx == -1) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); c00 = *sp; c01 = *sp; c10 = *sp; sp = (tColorRGBA *)((Uint8 *)sp + src->pitch); c11 = *sp; } else if (dy == -1) { sp = (tColorRGBA *)(src->pixels); sp += dx; c00 = *sp; c01 = *sp; c10 = *sp; sp += 1; c11 = *sp; } else if (dx == sw) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); sp += dx; c00 = *sp; c01 = *sp; sp = (tColorRGBA *)((Uint8 *)sp + src->pitch); c10 = *sp; c11 = *sp; } else if (dy == sh) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); sp += dx; c00 = *sp; sp += 1; c01 = *sp; c10 = *sp; c11 = *sp; } else { // NOTE: a catchall to appease gcc4 warnings... // Probably should not get here. we'll see. // old behaviour would be to use the previous pixel, // from the previous loop. sp = (tColorRGBA *)(src->pixels); c00 = *sp; c01 = *sp; c10 = *sp; c11 = *sp; } /* * Interpolate colors */ ex = (sdx & 0xffff); ey = (sdy & 0xffff); t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff; t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff; pc->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff; t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff; pc->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff; t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff; pc->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff; t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff; pc->a = (((t2 - t1) * ey) >> 16) + t1; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *)((Uint8 *)pc + gap); } } else { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (short)(sdx >> 16); dy = (short)(sdy >> 16); if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { sp = (tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy); sp += dx; *pc = *sp; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *)((Uint8 *)pc + gap); } } } /* rotozoomSurface() Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. */ #define VALUE_LIMIT 0.001 /* Local rotozoom-size function with trig result return */ void rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom) { double x, y, cx, cy, sx, sy; double radangle; int dstwidthhalf, dstheighthalf; /* * Determine destination width and height by rotating a centered source box */ radangle = angle * (M_PI / 180.0); *sanglezoom = sin(radangle); *canglezoom = cos(radangle); *sanglezoom *= zoom; *canglezoom *= zoom; x = width / 2; y = height / 2; cx = *canglezoom * x; cy = *canglezoom * y; sx = *sanglezoom * x; sy = *sanglezoom * y; dstwidthhalf = MAX( (int)ceil(MAX(MAX(MAX(fabs(cx + sy), fabs(cx - sy)), fabs(-cx + sy)), fabs(-cx - sy))), 1); dstheighthalf = MAX( (int)ceil(MAX(MAX(MAX(fabs(sx + cy), fabs(sx - cy)), fabs(-sx + cy)), fabs(-sx - cy))), 1); *dstwidth = 2 * dstwidthhalf; *dstheight = 2 * dstheighthalf; } /* Publicly available rotozoom-size function */ void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight) { double dummy_sanglezoom, dummy_canglezoom; rotozoomSurfaceSizeTrig(width, height, angle, zoom, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom); } /* zoomSurface() Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. */ void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight) { /* * Sanity check zoom factors */ if (zoomx < VALUE_LIMIT) { zoomx = VALUE_LIMIT; } if (zoomy < VALUE_LIMIT) { zoomy = VALUE_LIMIT; } /* * Calculate target size */ *dstwidth = (int)((double)width * zoomx); *dstheight = (int)((double)height * zoomy); if (*dstwidth < 1) { *dstwidth = 1; } if (*dstheight < 1) { *dstheight = 1; } } /* Publicly available rotozoom function */ SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth) { SDL_Surface *rz_src; SDL_Surface *rz_dst; double zoominv; int dstwidth, dstheight; int is32bit; int src_converted; /* * Sanity check */ if (src == NULL) return (NULL); /* * Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* * Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* * New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); SDL_BlitSurface(src, NULL, rz_src, NULL); src_converted = 1; } /* * Sanity check zoom factor */ if (zoom < VALUE_LIMIT) { zoom = VALUE_LIMIT; } zoominv = 65536.0 / (zoom * zoom); /* * Check if we have a rotozoom or just a zoom */ if (fabs(angle) > VALUE_LIMIT) { /* * Angle!=0: full rotozoom */ /* * ----------------------- */ int dstwidthhalf, dstheighthalf; double sanglezoom, canglezoom, sanglezoominv, canglezoominv; /* Determine target size */ rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, zoom, &dstwidth, &dstheight, &canglezoom, &sanglezoom); /* * Calculate target factors from sin/cos and zoom */ sanglezoominv = sanglezoom; canglezoominv = canglezoom; sanglezoominv *= zoominv; canglezoominv *= zoominv; /* Calculate half size */ dstwidthhalf = dstwidth / 2; dstheighthalf = dstheight / 2; /* * Alloc space to completely contain the rotated surface */ rz_dst = NULL; /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); /* * Lock source surface */ SDL_LockSurface(rz_src); /* * Check which kind of surface we have */ /* * Call the 32bit transformation routine to do the rotation (using * alpha) */ transformSurfaceRGBA(rz_src, rz_dst, dstwidthhalf, dstheighthalf, (int)(sanglezoominv), (int)(canglezoominv), smooth); /* * Turn on source-alpha support */ SDL_SetSurfaceAlphaMod(rz_dst, SDL_ALPHA_OPAQUE); /* * Unlock source surface */ SDL_UnlockSurface(rz_src); } else { /* * Angle=0: Just a zoom */ /* * -------------------- */ /* * Calculate target size */ zoomSurfaceSize(rz_src->w, rz_src->h, zoom, zoom, &dstwidth, &dstheight); /* * Alloc space to completely contain the zoomed surface */ rz_dst = NULL; /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); /* * Lock source surface */ SDL_LockSurface(rz_src); /* * Check which kind of surface we have */ /* * Call the 32bit transformation routine to do the zooming (using * alpha) */ zoomSurfaceRGBA(rz_src, rz_dst, smooth); /* * Turn on source-alpha support */ SDL_SetSurfaceAlphaMod(rz_dst, SDL_ALPHA_OPAQUE); /* * Unlock source surface */ SDL_UnlockSurface(rz_src); } /* * Cleanup temp surface */ if (src_converted) { SDL_FreeSurface(rz_src); } /* * Return destination surface */ return (rz_dst); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0131118 pygame-2.6.1/src_c/rwobject.c0000644000175100001770000005547714676242340015515 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * SDL_RWops support for python objects */ #define NO_PYGAME_C_API #define PYGAMEAPI_RWOBJECT_INTERNAL #include "pygame.h" #include "pgcompat.h" #include "doc/pygame_doc.h" #if defined(_WIN32) #define PG_LSEEK _lseeki64 #elif defined(__GLIBC__) #define PG_LSEEK lseek64 #else #define PG_LSEEK lseek #endif typedef struct { PyObject *read; PyObject *write; PyObject *seek; PyObject *tell; PyObject *close; PyObject *file; int fileno; } pgRWHelper; /*static const char pg_default_encoding[] = "unicode_escape";*/ /*static const char pg_default_errors[] = "backslashreplace";*/ static const char pg_default_encoding[] = "unicode_escape"; static const char pg_default_errors[] = "backslashreplace"; static PyObject *os_module = NULL; static Sint64 _pg_rw_size(SDL_RWops *); static Sint64 _pg_rw_seek(SDL_RWops *, Sint64, int); static size_t _pg_rw_read(SDL_RWops *, void *, size_t, size_t); static size_t _pg_rw_write(SDL_RWops *, const void *, size_t, size_t); static int _pg_rw_close(SDL_RWops *); /* Converter function used by PyArg_ParseTupleAndKeywords with the "O&" format. * * Returns: 1 on success * 0 on fail (with exception set) */ static int _pg_is_exception_class(PyObject *obj, void **optr) { PyObject **rval = (PyObject **)optr; PyObject *oname; PyObject *tmp; if (!PyType_Check(obj) || /* conditional or */ !PyObject_IsSubclass(obj, PyExc_BaseException)) { oname = PyObject_Str(obj); if (oname == NULL) { PyErr_SetString(PyExc_TypeError, "invalid exception class argument"); return 0; } tmp = PyUnicode_AsEncodedString(oname, "ascii", "replace"); Py_DECREF(oname); if (tmp == NULL) { PyErr_SetString(PyExc_TypeError, "invalid exception class argument"); return 0; } oname = tmp; PyErr_Format(PyExc_TypeError, "Expected an exception class: got %.1024s", PyBytes_AS_STRING(oname)); Py_DECREF(oname); return 0; } *rval = obj; return 1; } static int fetch_object_methods(pgRWHelper *helper, PyObject *obj) { helper->read = helper->write = helper->seek = helper->tell = helper->close = NULL; if (PyObject_HasAttrString(obj, "read")) { helper->read = PyObject_GetAttrString(obj, "read"); if (helper->read && !PyCallable_Check(helper->read)) { Py_DECREF(helper->read); helper->read = NULL; } } if (PyObject_HasAttrString(obj, "write")) { helper->write = PyObject_GetAttrString(obj, "write"); if (helper->write && !PyCallable_Check(helper->write)) { Py_DECREF(helper->write); helper->write = NULL; } } if (!helper->read && !helper->write) { PyErr_SetString(PyExc_TypeError, "not a file object"); return -1; } if (PyObject_HasAttrString(obj, "seek")) { helper->seek = PyObject_GetAttrString(obj, "seek"); if (helper->seek && !PyCallable_Check(helper->seek)) { Py_DECREF(helper->seek); helper->seek = NULL; } } if (PyObject_HasAttrString(obj, "tell")) { helper->tell = PyObject_GetAttrString(obj, "tell"); if (helper->tell && !PyCallable_Check(helper->tell)) { Py_DECREF(helper->tell); helper->tell = NULL; } } if (PyObject_HasAttrString(obj, "close")) { helper->close = PyObject_GetAttrString(obj, "close"); if (helper->close && !PyCallable_Check(helper->close)) { Py_DECREF(helper->close); helper->close = NULL; } } return 0; } /* This function is meant to decode a pathlib object into its str/bytes * representation. */ static PyObject * _trydecode_pathlibobj(PyObject *obj) { PyObject *ret = PyOS_FSPath(obj); if (!ret) { /* A valid object was not passed. But we do not consider it an error */ PyErr_Clear(); Py_INCREF(obj); return obj; } return ret; } static PyObject * pg_EncodeString(PyObject *obj, const char *encoding, const char *errors, PyObject *eclass) { PyObject *oencoded, *exc_type, *exc_value, *exc_trace, *str, *ret; if (obj == NULL) { /* Assume an error was raise; forward it */ return NULL; } if (encoding == NULL) { encoding = pg_default_encoding; } if (errors == NULL) { errors = pg_default_errors; } ret = _trydecode_pathlibobj(obj); if (!ret) return NULL; if (PyUnicode_Check(ret)) { oencoded = PyUnicode_AsEncodedString(ret, encoding, errors); Py_DECREF(ret); if (oencoded != NULL) { return oencoded; } else if (PyErr_ExceptionMatches(PyExc_MemoryError)) { /* Forward memory errors */ return NULL; } else if (eclass != NULL) { /* Forward as eclass error */ PyErr_Fetch(&exc_type, &exc_value, &exc_trace); Py_DECREF(exc_type); Py_XDECREF(exc_trace); if (exc_value == NULL) { PyErr_SetString(eclass, "Unicode encoding error"); } else { str = PyObject_Str(exc_value); Py_DECREF(exc_value); if (str != NULL) { PyErr_SetObject(eclass, str); Py_DECREF(str); } } return NULL; } else if (encoding == pg_default_encoding && errors == pg_default_errors) { /* The default encoding and error handling should not fail */ return RAISE(PyExc_SystemError, "Pygame bug (in pg_EncodeString):" " unexpected encoding error"); } PyErr_Clear(); Py_RETURN_NONE; } if (PyBytes_Check(ret)) { return ret; } Py_DECREF(ret); Py_RETURN_NONE; } static PyObject * pg_EncodeFilePath(PyObject *obj, PyObject *eclass) { PyObject *result = pg_EncodeString(obj, Py_FileSystemDefaultEncoding, UNICODE_DEF_FS_ERROR, eclass); if (result == NULL || result == Py_None) { return result; } if ((size_t)PyBytes_GET_SIZE(result) != strlen(PyBytes_AS_STRING(result))) { if (eclass != NULL) { Py_DECREF(result); result = pg_EncodeString(obj, NULL, NULL, NULL); if (result == NULL) { return NULL; } PyErr_Format(eclass, "File path '%.1024s' contains null characters", PyBytes_AS_STRING(result)); Py_DECREF(result); return NULL; } Py_DECREF(result); Py_RETURN_NONE; } return result; } static int pgRWops_IsFileObject(SDL_RWops *rw) { return rw->close == _pg_rw_close; } static Sint64 _pg_rw_size(SDL_RWops *context) { pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *pos = NULL; PyObject *tmp = NULL; Sint64 size; Sint64 retval = -1; #ifdef WITH_THREAD PyGILState_STATE state; #endif /* WITH_THREAD */ if (!helper->seek || !helper->tell) return retval; #ifdef WITH_THREAD state = PyGILState_Ensure(); #endif /* WITH_THREAD */ /* Current file position; need to restore it later. */ pos = PyObject_CallFunction(helper->tell, NULL); if (!pos) { PyErr_Print(); goto end; } /* Relocate to end of file. */ tmp = PyObject_CallFunction(helper->seek, "ii", 0, SEEK_END); if (!tmp) { PyErr_Print(); goto end; } Py_DECREF(tmp); /* Record file size. */ tmp = PyObject_CallFunction(helper->tell, NULL); if (!tmp) { PyErr_Print(); goto end; } size = PyLong_AsLongLong(tmp); if (size == -1 && PyErr_Occurred() != NULL) { PyErr_Print(); goto end; } Py_DECREF(tmp); /* Return to original position. */ tmp = PyObject_CallFunctionObjArgs(helper->seek, pos, NULL); if (!tmp) { PyErr_Print(); goto end; } /* Success. */ retval = size; end: /* Cleanup. */ Py_XDECREF(pos); Py_XDECREF(tmp); #ifdef WITH_THREAD PyGILState_Release(state); #endif return retval; } static size_t _pg_rw_write(SDL_RWops *context, const void *ptr, size_t size, size_t num) { #ifndef WITH_THREAD pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *result; if (!helper->write) return -1; result = PyObject_CallFunction(helper->write, "y#", (const char *)ptr, (Py_ssize_t)size * num); if (!result) return -1; Py_DECREF(result); return num; #else /* WITH_THREAD */ pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *result; size_t retval; PyGILState_STATE state; if (!helper->write) return -1; state = PyGILState_Ensure(); result = PyObject_CallFunction(helper->write, "y#", (const char *)ptr, (Py_ssize_t)size * num); if (!result) { PyErr_Print(); retval = -1; goto end; } Py_DECREF(result); retval = num; end: PyGILState_Release(state); return retval; #endif /* WITH_THREAD */ } static int _pg_rw_close(SDL_RWops *context) { pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *result; int retval = 0; #ifdef WITH_THREAD PyGILState_STATE state; state = PyGILState_Ensure(); #endif /* WITH_THREAD */ if (helper->close) { result = PyObject_CallFunction(helper->close, NULL); if (!result) { PyErr_Print(); retval = -1; } Py_XDECREF(result); } Py_XDECREF(helper->seek); Py_XDECREF(helper->tell); Py_XDECREF(helper->write); Py_XDECREF(helper->read); Py_XDECREF(helper->close); Py_XDECREF(helper->file); PyMem_Free(helper); #ifdef WITH_THREAD PyGILState_Release(state); #endif /* WITH_THREAD */ SDL_FreeRW(context); return retval; } static SDL_RWops * pgRWops_FromFileObject(PyObject *obj) { SDL_RWops *rw; pgRWHelper *helper; if (obj == NULL) { return (SDL_RWops *)RAISE(PyExc_TypeError, "Invalid filetype object"); } helper = PyMem_New(pgRWHelper, 1); if (helper == NULL) { return (SDL_RWops *)PyErr_NoMemory(); } helper->fileno = PyObject_AsFileDescriptor(obj); if (helper->fileno == -1) PyErr_Clear(); if (fetch_object_methods(helper, obj)) { PyMem_Free(helper); return NULL; } rw = SDL_AllocRW(); if (rw == NULL) { PyMem_Free(helper); return (SDL_RWops *)PyErr_NoMemory(); } helper->file = obj; Py_INCREF(obj); /* Adding a helper to the hidden data to support file-like object RWops */ rw->hidden.unknown.data1 = (void *)helper; rw->size = _pg_rw_size; rw->seek = _pg_rw_seek; rw->read = _pg_rw_read; rw->write = _pg_rw_write; rw->close = _pg_rw_close; /* https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads */ /* ^ in Python >= 3.7, we don't have to call this function, and in 3.11 * it will be removed */ #if PY_VERSION_HEX < 0x03070000 #ifdef WITH_THREAD PyEval_InitThreads(); #endif /* WITH_THREAD */ #endif return rw; } static int pgRWops_ReleaseObject(SDL_RWops *context) { int ret = 0; if (pgRWops_IsFileObject(context)) { #ifdef WITH_THREAD PyGILState_STATE state = PyGILState_Ensure(); #endif /* WITH_THREAD */ pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *fileobj = helper->file; /* 5 helper functions */ Py_ssize_t filerefcnt = Py_REFCNT(fileobj) - 1 - 5; if (filerefcnt) { Py_XDECREF(helper->seek); Py_XDECREF(helper->tell); Py_XDECREF(helper->write); Py_XDECREF(helper->read); Py_XDECREF(helper->close); Py_DECREF(fileobj); PyMem_Del(helper); SDL_FreeRW(context); } else { ret = SDL_RWclose(context); if (ret < 0) { PyErr_SetString(PyExc_IOError, SDL_GetError()); Py_DECREF(fileobj); } } #ifdef WITH_THREAD PyGILState_Release(state); #endif /* WITH_THREAD */ } else { ret = SDL_RWclose(context); if (ret < 0) PyErr_SetString(PyExc_IOError, SDL_GetError()); } return ret; } static Sint64 _pg_rw_seek(SDL_RWops *context, Sint64 offset, int whence) { pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *result; Sint64 retval; #ifdef WITH_THREAD PyGILState_STATE state; if (helper->fileno != -1) { return PG_LSEEK(helper->fileno, offset, whence); } if (!helper->seek || !helper->tell) return -1; state = PyGILState_Ensure(); if (!(offset == 0 && whence == SEEK_CUR)) /* being seek'd, not just tell'd */ { result = PyObject_CallFunction(helper->seek, "Li", (long long)offset, whence); if (!result) { PyErr_Print(); retval = -1; goto end; } Py_DECREF(result); } result = PyObject_CallFunction(helper->tell, NULL); if (!result) { PyErr_Print(); retval = -1; goto end; } retval = PyLong_AsLongLong(result); if (retval == -1 && PyErr_Occurred()) PyErr_Clear(); Py_DECREF(result); end: PyGILState_Release(state); return retval; #else /* ~WITH_THREAD */ if (helper->fileno != -1) { return PG_LSEEK(helper->fileno, offset, whence); } if (!helper->seek || !helper->tell) return -1; if (!(offset == 0 && whence == SEEK_CUR)) /*being called only for 'tell'*/ { result = PyObject_CallFunction(helper->seek, "Li", (long long)offset, whence); if (!result) return -1; Py_DECREF(result); } result = PyObject_CallFunction(helper->tell, NULL); if (!result) return -1; retval = PyLong_AsLongLong(result); if (retval == -1 && PyErr_Occurred()) PyErr_Clear(); Py_DECREF(result); return retval; #endif /* ~WITH_THREAD*/ } static size_t _pg_rw_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) { pgRWHelper *helper = (pgRWHelper *)context->hidden.unknown.data1; PyObject *result; Py_ssize_t retval; #ifdef WITH_THREAD PyGILState_STATE state; #endif /* WITH_THREAD */ if (helper->fileno != -1) { retval = read(helper->fileno, ptr, (unsigned int)(size * maxnum)); if (retval == -1) { return -1; } retval /= size; return retval; } if (!helper->read) return -1; #ifdef WITH_THREAD state = PyGILState_Ensure(); #endif /* WITH_THREAD */ result = PyObject_CallFunction(helper->read, "K", (unsigned long long)size * maxnum); if (!result) { PyErr_Print(); retval = -1; goto end; } if (!PyBytes_Check(result)) { Py_DECREF(result); PyErr_Print(); retval = -1; goto end; } retval = PyBytes_GET_SIZE(result); if (retval) { memcpy(ptr, PyBytes_AsString(result), retval); retval /= size; } Py_DECREF(result); end: #ifdef WITH_THREAD PyGILState_Release(state); #endif /* WITH_THREAD */ return retval; } static SDL_RWops * _rwops_from_pystr(PyObject *obj, char **extptr) { SDL_RWops *rw = NULL; PyObject *oencoded; char *encoded = NULL; /* If a valid extptr has been passed, we want it to default to NULL * to show that an extension hasn't been procured (if it has it will * get set to that later) */ if (extptr) { *extptr = NULL; } if (!obj) { // forward any errors return NULL; } oencoded = pg_EncodeString(obj, "UTF-8", NULL, NULL); if (!oencoded || oencoded == Py_None) { /* if oencoded is NULL, we are forwarding an error. If it is None, the * object passed was not a bytes/string/pathlib object so handling of * that is done after this function, exit early here */ Py_XDECREF(oencoded); return NULL; } encoded = PyBytes_AS_STRING(oencoded); rw = SDL_RWFromFile(encoded, "rb"); if (rw) { /* If a valid extptr has been passed, populate it with a dynamically * allocated field for the file extension. */ if (extptr) { char *ext = strrchr(encoded, '.'); if (ext && strlen(ext) > 1) { ext++; *extptr = malloc(strlen(ext) + 1); if (!(*extptr)) { /* If out of memory, decref oencoded to be safe, and try * to close out `rw` as well. */ Py_DECREF(oencoded); if (SDL_RWclose(rw) < 0) { PyErr_SetString(PyExc_IOError, SDL_GetError()); } return (SDL_RWops *)PyErr_NoMemory(); } strcpy(*extptr, ext); } } Py_DECREF(oencoded); return rw; } Py_DECREF(oencoded); /* Clear SDL error and set our own error message for filenotfound errors * TODO: Check SDL error here and forward any non filenotfound related * errors correctly here */ SDL_ClearError(); PyObject *cwd = NULL, *path = NULL, *isabs = NULL; if (!os_module) goto simple_case; cwd = PyObject_CallMethod(os_module, "getcwd", NULL); if (!cwd) goto simple_case; path = PyObject_GetAttrString(os_module, "path"); if (!path) goto simple_case; isabs = PyObject_CallMethod(path, "isabs", "O", obj); Py_DECREF(path); if (!isabs || isabs == Py_True) goto simple_case; PyErr_Format(PyExc_FileNotFoundError, "No file '%S' found in working directory '%S'.", obj, cwd); Py_DECREF(cwd); Py_DECREF(isabs); return NULL; simple_case: Py_XDECREF(cwd); Py_XDECREF(isabs); PyErr_Format(PyExc_FileNotFoundError, "No such file or directory: '%S'.", obj); return NULL; } static SDL_RWops * pgRWops_FromObject(PyObject *obj, char **extptr) { #if __EMSCRIPTEN__ SDL_RWops *rw; int retry = 0; again: rw = _rwops_from_pystr(obj, extptr); if (retry) Py_XDECREF(obj); if (!rw) { if (PyErr_Occurred()) return NULL; } else { return rw; } fail: if (retry) return RAISE(PyExc_RuntimeError, "can't access resource on platform"); retry = 1; PyObject *name = PyObject_GetAttrString(obj, "name"); if (name) { obj = name; goto again; } goto fail; // unreachable. #else SDL_RWops *rw = _rwops_from_pystr(obj, extptr); if (!rw) { if (PyErr_Occurred()) return NULL; } else { return rw; } return pgRWops_FromFileObject(obj); #endif } static PyObject * pg_encode_string(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *obj = NULL; PyObject *eclass = NULL; const char *encoding = NULL; const char *errors = NULL; static char *kwids[] = {"obj", "encoding", "errors", "etype", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|OssO&", kwids, &obj, &encoding, &errors, &_pg_is_exception_class, &eclass)) { return NULL; } if (obj == NULL) { PyErr_SetString(PyExc_SyntaxError, "Forwarded exception"); } return pg_EncodeString(obj, encoding, errors, eclass); } static PyObject * pg_encode_file_path(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *obj = NULL; PyObject *eclass = NULL; static char *kwids[] = {"obj", "etype", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|OO&", kwids, &obj, &_pg_is_exception_class, &eclass)) { return NULL; } if (obj == NULL) { PyErr_SetString(PyExc_SyntaxError, "Forwarded exception"); } return pg_EncodeFilePath(obj, eclass); } static PyMethodDef _pg_rwobject_methods[] = { {"encode_string", (PyCFunction)pg_encode_string, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEENCODESTRING}, {"encode_file_path", (PyCFunction)pg_encode_file_path, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMEENCODEFILEPATH}, {NULL, NULL, 0, NULL}}; /*DOC*/ static char _pg_rwobject_doc[] = /*DOC*/ "SDL_RWops support"; MODINIT_DEFINE(rwobject) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_RWOBJECT_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "rwobject", _pg_rwobject_doc, -1, _pg_rwobject_methods, NULL, NULL, NULL, NULL}; /* Create the module and add the functions */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } /* export the c api */ c_api[0] = pgRWops_FromObject; c_api[1] = pgRWops_IsFileObject; c_api[2] = pg_EncodeFilePath; c_api[3] = pg_EncodeString; c_api[4] = pgRWops_FromFileObject; c_api[5] = pgRWops_ReleaseObject; apiobj = encapsulate_api(c_api, "rwobject"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } /* import os, don't sweat if it errors, it will be checked before use */ os_module = PyImport_ImportModule("os"); if (os_module == NULL) PyErr_Clear(); return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale.h0000644000175100001770000000751714676242340014762 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium MMX/SSE smoothscale routines * Available on Win32 or GCC on a Pentium. * Sorry, no Win64 support yet for Visual C builds, but it can be added. */ #if !defined(SCALE_HEADER) #define SCALE_HEADER #if (defined(__GNUC__) && \ ((defined(__x86_64__) && !defined(_NO_MMX_FOR_X86_64)) || \ defined(__i386__))) || \ (defined(MS_WIN32) && !((defined(_M_X64) || defined(_M_ARM64)) && \ defined(_NO_MMX_FOR_X86_64))) #define SCALE_MMX_SUPPORT /* These functions implement an area-averaging shrinking filter in the * X-dimension. */ void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); void filter_shrink_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); /* These functions implement an area-averaging shrinking filter in the * Y-dimension. */ void filter_shrink_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); void filter_shrink_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); /* These functions implement a bilinear filter in the X-dimension. */ void filter_expand_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); void filter_expand_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); /* These functions implement a bilinear filter in the Y-dimension. */ void filter_expand_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); void filter_expand_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); #if defined(_M_X64) void filter_shrink_Y_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); void filter_shrink_Y_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight); void filter_expand_X_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); void filter_expand_X_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth); #endif /* #if defined(_M_X64) */ #endif /* #if (defined(__GNUC__) && .....) */ #endif /* #if !defined(SCALE_HEADER) */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale2x.c0000644000175100001770000003065714676242340015230 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* This implements the AdvanceMAME Scale2x feature found on this page, http://advancemame.sourceforge.net/scale2x.html It is an incredibly simple and powerful image doubling routine that does an astonishing job of doubling game graphic data while interpolating out the jaggies. Congrats to the AdvanceMAME team, I'm very impressed and surprised with this code! */ #include #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define READINT24(x) ((x)[0] << 16 | (x)[1] << 8 | (x)[2]) #define WRITEINT24(x, i) \ { \ (x)[0] = i >> 16; \ (x)[1] = (i >> 8) & 0xff; \ x[2] = i & 0xff; \ } /* this requires a destination surface already setup to be twice as large as the source. oh, and formats must match too. this will just blindly assume you didn't flounder. */ void scale2x(SDL_Surface *src, SDL_Surface *dst) { int looph, loopw; Uint8 *srcpix = (Uint8 *)src->pixels; Uint8 *dstpix = (Uint8 *)dst->pixels; const int srcpitch = src->pitch; const int dstpitch = dst->pitch; const int width = src->w; const int height = src->h; switch (src->format->BytesPerPixel) { case 1: { Uint8 E0, E1, E2, E3, B, D, E, F, H; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { B = *(Uint8 *)(srcpix + (MAX(0, looph - 1) * srcpitch) + (1 * loopw)); D = *(Uint8 *)(srcpix + (looph * srcpitch) + (1 * MAX(0, loopw - 1))); E = *(Uint8 *)(srcpix + (looph * srcpitch) + (1 * loopw)); F = *(Uint8 *)(srcpix + (looph * srcpitch) + (1 * MIN(width - 1, loopw + 1))); H = *(Uint8 *)(srcpix + (MIN(height - 1, looph + 1) * srcpitch) + (1 * loopw)); E0 = D == B && B != F && D != H ? D : E; E1 = B == F && B != D && F != H ? F : E; E2 = D == H && D != B && H != F ? D : E; E3 = H == F && D != H && B != F ? F : E; *(Uint8 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 1) = E0; *(Uint8 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 1) = E1; *(Uint8 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 1) = E2; *(Uint8 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 1) = E3; } } break; } case 2: { Uint16 E0, E1, E2, E3, B, D, E, F, H; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { B = *(Uint16 *)(srcpix + (MAX(0, looph - 1) * srcpitch) + (2 * loopw)); D = *(Uint16 *)(srcpix + (looph * srcpitch) + (2 * MAX(0, loopw - 1))); E = *(Uint16 *)(srcpix + (looph * srcpitch) + (2 * loopw)); F = *(Uint16 *)(srcpix + (looph * srcpitch) + (2 * MIN(width - 1, loopw + 1))); H = *(Uint16 *)(srcpix + (MIN(height - 1, looph + 1) * srcpitch) + (2 * loopw)); E0 = D == B && B != F && D != H ? D : E; E1 = B == F && B != D && F != H ? F : E; E2 = D == H && D != B && H != F ? D : E; E3 = H == F && D != H && B != F ? F : E; *(Uint16 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 2) = E0; *(Uint16 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 2) = E1; *(Uint16 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 2) = E2; *(Uint16 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 2) = E3; } } break; } case 3: { int E0, E1, E2, E3, B, D, E, F, H; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { B = READINT24(srcpix + (MAX(0, looph - 1) * srcpitch) + (3 * loopw)); D = READINT24(srcpix + (looph * srcpitch) + (3 * MAX(0, loopw - 1))); E = READINT24(srcpix + (looph * srcpitch) + (3 * loopw)); F = READINT24(srcpix + (looph * srcpitch) + (3 * MIN(width - 1, loopw + 1))); H = READINT24(srcpix + (MIN(height - 1, looph + 1) * srcpitch) + (3 * loopw)); E0 = D == B && B != F && D != H ? D : E; E1 = B == F && B != D && F != H ? F : E; E2 = D == H && D != B && H != F ? D : E; E3 = H == F && D != H && B != F ? F : E; WRITEINT24((dstpix + looph * 2 * dstpitch + loopw * 2 * 3), E0); WRITEINT24( (dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 3), E1); WRITEINT24( (dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 3), E2); WRITEINT24((dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 3), E3); } } break; } default: { /*case 4:*/ Uint32 E0, E1, E2, E3, B, D, E, F, H; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { B = *(Uint32 *)(srcpix + (MAX(0, looph - 1) * srcpitch) + (4 * loopw)); D = *(Uint32 *)(srcpix + (looph * srcpitch) + (4 * MAX(0, loopw - 1))); E = *(Uint32 *)(srcpix + (looph * srcpitch) + (4 * loopw)); F = *(Uint32 *)(srcpix + (looph * srcpitch) + (4 * MIN(width - 1, loopw + 1))); H = *(Uint32 *)(srcpix + (MIN(height - 1, looph + 1) * srcpitch) + (4 * loopw)); E0 = D == B && B != F && D != H ? D : E; E1 = B == F && B != D && F != H ? F : E; E2 = D == H && D != B && H != F ? D : E; E3 = H == F && D != H && B != F ? F : E; *(Uint32 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 4) = E0; *(Uint32 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 4) = E1; *(Uint32 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 4) = E2; *(Uint32 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 4) = E3; } } break; } } } void scale2xraw(SDL_Surface *src, SDL_Surface *dst) { int looph, loopw; Uint8 *srcpix = (Uint8 *)src->pixels; Uint8 *dstpix = (Uint8 *)dst->pixels; const int srcpitch = src->pitch; const int dstpitch = dst->pitch; const int width = src->w; const int height = src->h; switch (src->format->BytesPerPixel) { case 1: { Uint8 E0, E1, E2, E3, E; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { E = *(Uint8 *)(srcpix + (looph * srcpitch) + (1 * loopw)); E0 = E; E1 = E; E2 = E; E3 = E; *(Uint8 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 1) = E0; *(Uint8 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 1) = E1; *(Uint8 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 1) = E2; *(Uint8 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 1) = E3; } } break; } case 2: { Uint16 E0, E1, E2, E3, E; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { E = *(Uint16 *)(srcpix + (looph * srcpitch) + (2 * loopw)); E0 = E; E1 = E; E2 = E; E3 = E; *(Uint16 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 2) = E0; *(Uint16 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 2) = E1; *(Uint16 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 2) = E2; *(Uint16 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 2) = E3; } } break; } case 3: { int E0, E1, E2, E3, E; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { E = READINT24(srcpix + (looph * srcpitch) + (3 * loopw)); E0 = E; E1 = E; E2 = E; E3 = E; WRITEINT24((dstpix + looph * 2 * dstpitch + loopw * 2 * 3), E0); WRITEINT24( (dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 3), E1); WRITEINT24( (dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 3), E2); WRITEINT24((dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 3), E3); } } break; } default: { /*case 4:*/ Uint32 E0, E1, E2, E3, E; for (looph = 0; looph < height; ++looph) { for (loopw = 0; loopw < width; ++loopw) { E = *(Uint32 *)(srcpix + (looph * srcpitch) + (4 * loopw)); E0 = E; E1 = E; E2 = E; E3 = E; *(Uint32 *)(dstpix + looph * 2 * dstpitch + loopw * 2 * 4) = E0; *(Uint32 *)(dstpix + looph * 2 * dstpitch + (loopw * 2 + 1) * 4) = E1; *(Uint32 *)(dstpix + (looph * 2 + 1) * dstpitch + loopw * 2 * 4) = E2; *(Uint32 *)(dstpix + (looph * 2 + 1) * dstpitch + (loopw * 2 + 1) * 4) = E3; } } break; } } } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale_mmx.c0000644000175100001770000000254014676242340015625 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium MMX/SSE smoothscale routines * These are only compiled with GCC. */ #if defined(__GNUC__) /* Choose between the 32 bit and 64 bit versions. * Including source code like this may be frowned upon by some, * but the alternative is ungainly conditionally compiled code. */ #if defined(__x86_64__) #include "scale_mmx64.c" #elif defined(__i386__) #include "scale_mmx32.c" #endif #else #if defined(_M_X64) && !defined(_NO_MMX_FOR_X86_64) #include "scale_mmx64_msvc.c" #endif #endif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale_mmx32.c0000644000175100001770000010071714676242340015777 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium 32 bit SSE/MMX smoothscale filter routines * These are written for compilation with GCC only. * * This file should not depend on anything but the C standard library. */ #if !defined(__GNUC__) || !defined(__i386__) || defined(__x86_64__) #error "Pygame build bug: should not be compiling this file!" #endif #include typedef uint8_t Uint8; /* SDL convention */ typedef uint16_t Uint16; /* SDL convention */ #include #include #include "scale.h" /* These functions implement an area-averaging shrinking filter in the * X-dimension. */ void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %2, %%mm3; " /* mm3 = 2^14 */ " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " movq %%mm4, %%mm5; " /* mm2 = (srcpix * xcounter >> 16) */ " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " movq %%mm4, %%mm5; " /* mm3 = (srcpix * xfrac) >> 16) */ " psraw $15, %%mm5; " " pand %%mm3, %%mm5; " " movq %%mm3, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm3; " " paddw %%mm5, %%mm3; " " paddw %%mm6, %%mm3; " " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " movq %%mm7, %%mm5; " " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm7, %%mm6; " " pmulhw %%mm7, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff), "m"(dstdiff) /* input */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } void filter_shrink_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " movq %2, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %%mm6, %%mm3; " /* mm3 = 2^14 */ " pshufw $0, %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm2; " /* mm2 = (srcpix * xcounter >> 16) */ " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * xfrac) >> 16 */ " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " pmulhuw %%mm7, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff), "m"(dstdiff) /* input */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } /* These functions implement an area-averaging shrinking filter in the * Y-dimension. */ void filter_shrink_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %2, %%eax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%eax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%eax); " " add $8, %%eax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%eax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " movq %%mm4, %%mm0; " /* mm3 = (srcpix * yfrac) >> 16) */ " psraw $15, %%mm0; " " pand %%mm3, %%mm0; " " movq %%mm3, %%mm2; " " psraw $15, %%mm2; " " pand %%mm4, %%mm2; " " pmulhw %%mm4, %%mm3; " " paddw %%mm0, %%mm3; " " paddw %%mm2, %%mm3; " " movq %%mm1, %%mm0; " /* mm4 = (srcpix * ycounter >> 16) */ " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm1, %%mm2; " " pmulhw %%mm1, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " movq %%mm3, (%%eax); " " paddw %%mm5, %%mm4; " " add $8, %%eax; " " movq %%mm7, %%mm0; " " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm7, %%mm2; " " pmulhw %%mm7, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " pxor %%mm0, %%mm0; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff), "m"(dstdiff), "m"(One64) /* input */ : "%ecx", "%edx", "%eax" /* clobbered */ ); // clang-format on /* free the temporary memory */ free(templine); } void filter_shrink_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %2, %%eax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%eax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%eax); " " add $8, %%eax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%eax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * yfrac) >> 16 */ " pmulhuw %%mm1, %%mm4; " /* mm4 = (srcpix * ycounter >> 16) */ " movq %%mm3, (%%eax); " " paddw %%mm5, %%mm4; " " add $8, %%eax; " " pmulhuw %%mm7, %%mm4; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff), "m"(dstdiff), "m"(One64) /* input */ : "%ecx", "%edx", "%eax" /* clobbered */ ); // clang-format on /* free the temporary memory */ free(templine); } /* These functions implement a bilinear filter in the X-dimension. */ void filter_expand_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int x, y; int factorwidth = 8; long long One64 = 0x0100010001000100ULL; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *x0 = xidx0; int width = dstwidth; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " pxor %%mm0, %%mm0; " " movq %5, %%mm7; " "1: " " movl (%2), %%eax; " /* get xidx0[x] */ " add $4, %2; " " movq %%mm7, %%mm2; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " psubw %%mm1, %%mm2; " /* load mult1 */ " movd (%4,%%eax,4), %%mm4; " " movd 4(%4,%%eax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%1); " " add $4, %1; " " decl %3; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(dstrow), "+r"(x0), "+m"(width) /* outputs */ : "S"(srcrow0), "m"(One64) /* input */ : "%eax" /* clobbered */ ); // clang-format on } /* free memory */ free(xidx0); free(xmult0); free(xmult1); } void filter_expand_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int x, y; int factorwidth = 8; long long One64 = 0x0100010001000100ULL; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *x0 = xidx0; int width = dstwidth; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " pxor %%mm0, %%mm0; " " movq %5, %%mm7; " "1: " " movl (%2), %%eax; " /* get xidx0[x] */ " add $4, %2; " " movq %%mm7, %%mm2; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " psubw %%mm1, %%mm2; " /* load mult1 */ " movd (%4,%%eax,4), %%mm4; " " movd 4(%4,%%eax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%1); " " add $4, %1; " " decl %3; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(dstrow), "+r"(x0), "+m"(width) /* outputs */ : "S"(srcrow0), "m"(One64) /* input */ : "%eax" /* clobbered */ ); // clang-format on } /* free memory */ free(xidx0); free(xmult0); free(xmult1); } /* These functions implement a bilinear filter in the Y-dimension. */ void filter_expand_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%eax; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%eax; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* no outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%eax" /* clobbered */ ); // clang-format on } } void filter_expand_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%eax; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " pshufw $0, %%mm1, %%mm1; " " pshufw $0, %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%eax; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* no outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%eax" /* clobbered */ ); // clang-format on } } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale_mmx64.c0000644000175100001770000010123314676242340015776 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium 64 bit SSE/MMX smoothscale routines * These are written for compilation with GCC only. * * This file should not depend on anything but the C standard library. */ #if !defined(__GNUC__) || !defined(__x86_64__) #error "Pygame build bug: should not be compiling this file!" #endif #include typedef uint8_t Uint8; /* SDL convention */ typedef uint16_t Uint16; /* SDL convention */ #include #include #include "scale.h" /* These functions implement an area-averaging shrinking filter in the * X-dimension. */ void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %2, %%mm3; " /* mm3 = 2^14 */ " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " movq %%mm4, %%mm5; " /* mm2 = (srcpix * xcounter >> 16) */ " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " movq %%mm4, %%mm5; " /* mm3 = (srcpix * xfrac) >> 16) */ " psraw $15, %%mm5; " " pand %%mm3, %%mm5; " " movq %%mm3, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm3; " " paddw %%mm5, %%mm3; " " paddw %%mm6, %%mm3; " " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " movq %%mm7, %%mm5; " " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm7, %%mm6; " " pmulhw %%mm7, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff64), "m"(dstdiff64) /* inputs */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } void filter_shrink_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " movq %2, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %%mm6, %%mm3; " /* mm3 = 2^14 */ " pshufw $0, %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm2; " /* mm2 = (srcpix * xcounter >> 16) */ " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * xfrac) >> 16 */ " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " pmulhuw %%mm7, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff64), "m"(dstdiff64) /* inputs */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } /* These functions implement an area-averaging shrinking filter in the * Y-dimension. */ void filter_shrink_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; long long srcdiff64, dstdiff64; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); srcdiff64 = srcdiff; dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " mov %2, %%rax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%rax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%rax); " " add $8, %%rax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%rax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " movq %%mm4, %%mm0; " /* mm3 = (srcpix * yfrac) >> 16) */ " psraw $15, %%mm0; " " pand %%mm3, %%mm0; " " movq %%mm3, %%mm2; " " psraw $15, %%mm2; " " pand %%mm4, %%mm2; " " pmulhw %%mm4, %%mm3; " " paddw %%mm0, %%mm3; " " paddw %%mm2, %%mm3; " " movq %%mm1, %%mm0; " /* mm4 = (srcpix * ycounter >> 16) */ " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm1, %%mm2; " " pmulhw %%mm1, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " movq %%mm3, (%%rax); " " paddw %%mm5, %%mm4; " " add $8, %%rax; " " movq %%mm7, %%mm0; " " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm7, %%mm2; " " pmulhw %%mm7, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " pxor %%mm0, %%mm0; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff64), "m"(dstdiff64), "m"(One64) /* input */ : "%ecx", "%edx", "%rax" /* clobbered */ ); // clang-format on /* free the temporary memory */ free(templine); } void filter_shrink_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; long long srcdiff64, dstdiff64; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); srcdiff64 = srcdiff; dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " mov %2, %%rax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%rax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%rax); " " add $8, %%rax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%rax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * yfrac) >> 16 */ " pmulhuw %%mm1, %%mm4; " /* mm4 = (srcpix * ycounter >> 16) */ " movq %%mm3, (%%rax); " " paddw %%mm5, %%mm4; " " add $8, %%rax; " " pmulhuw %%mm7, %%mm4; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff64), "m"(dstdiff64), "m"(One64) /* input */ : "%ecx", "%edx", "%rax" /* clobbered */ ); // clang-format on /* free the temporary memory */ free(templine); } /* These functions implement a bilinear filter in the X-dimension. */ void filter_expand_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int x, y; int factorwidth = 8; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *xm1 = xmult1; int *x0 = xidx0; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " movl %5, %%ecx; " " pxor %%mm0, %%mm0; " "1: " " movslq (%3), %%rax; " /* get xidx0[x] */ " add $4, %3; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " movq (%1), %%mm2; " /* load mult1 */ " add $8, %1; " " movd (%4,%%rax,4), %%mm4; " " movd 4(%4,%%rax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(xm1), "+r"(dstrow), "+r"(x0) /* outputs */ : "r"(srcrow0), "m"(dstwidth) /* input */ : "%ecx", "%rax" /* clobbered */ ); // clang-format on } /* free memory */ free(xidx0); free(xmult0); free(xmult1); } void filter_expand_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int x, y; int factorwidth = 8; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *xm1 = xmult1; int *x0 = xidx0; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " movl %5, %%ecx; " " pxor %%mm0, %%mm0; " "1: " " movslq (%3), %%rax; " /* get xidx0[x] */ " add $4, %3; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " movq (%1), %%mm2; " /* load mult1 */ " add $8, %1; " " movd (%4,%%rax,4), %%mm4; " " movd 4(%4,%%rax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(xm1), "+r"(dstrow), "+r"(x0) /* outputs */ : "r"(srcrow0), "m"(dstwidth) /* input */ : "%ecx", "%rax" /* clobbered */ ); // clang-format on } /* free memory */ free(xidx0); free(xmult0); free(xmult1); } /* These functions implement a bilinear filter in the Y-dimension */ void filter_expand_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%ecx; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%ecx" /* clobbered */ ); // clang-format on } } void filter_expand_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%ecx; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " pshufw $0, %%mm1, %%mm1; " " pshufw $0, %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%ecx" /* clobbered */ ); // clang-format on } } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale_mmx64_gcc.c0000644000175100001770000007650014676242340016622 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium 64 bit SSE/MMX smoothscale routines * These are written for compilation with GCC only. * * This file should not depend on anything. */ #if !defined(__GNUC__) #error "Pygame build bug: should not be compiling this file!" #endif #include typedef uint8_t Uint8; /* SDL convention */ typedef uint16_t Uint16; /* SDL convention */ #include #include #include "scale.h" /* These functions implement an area-averaging shrinking filter in the * X-dimension. */ void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %2, %%mm3; " /* mm3 = 2^14 */ " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " movq %%mm4, %%mm5; " /* mm2 = (srcpix * xcounter >> 16) */ " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " movq %%mm4, %%mm5; " /* mm3 = (srcpix * xfrac) >> 16) */ " psraw $15, %%mm5; " " pand %%mm3, %%mm5; " " movq %%mm3, %%mm6; " " psraw $15, %%mm6; " " pand %%mm4, %%mm6; " " pmulhw %%mm4, %%mm3; " " paddw %%mm5, %%mm3; " " paddw %%mm6, %%mm3; " " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " movq %%mm7, %%mm5; " " psraw $15, %%mm5; " " pand %%mm2, %%mm5; " " movq %%mm2, %%mm6; " " psraw $15, %%mm6; " " pand %%mm7, %%mm6; " " pmulhw %%mm7, %%mm2; " " paddw %%mm5, %%mm2; " " paddw %%mm6, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff64), "m"(dstdiff64) /* inputs */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } void filter_shrink_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int xspace = 0x04000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = 0x40000000 / xspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for X-shrink area average filter */ " " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == xrecipmmx */ " movq %2, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " movl %5, %%ecx; " /* ecx == xcounter */ " pxor %%mm1, %%mm1; " /* mm1 == accumulator */ " movl %4, %%edx; " /* edx == width */ "2: " /* inner X-loop */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movd (%0), %%mm2; " /* mm2 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm2; " " paddw %%mm2, %%mm1; " /* accumulator += srcpix */ " subl $0x4000, %%ecx; " " jmp 4f; " "3: " /* prepare to output a pixel */ " movd %%ecx, %%mm2; " " movq %%mm6, %%mm3; " /* mm3 = 2^14 */ " pshufw $0, %%mm2, %%mm2; " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " psubw %%mm2, %%mm3; " /* mm3 = xfrac */ " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm2; " /* mm2 = (srcpix * xcounter >> 16) */ " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * xfrac) >> 16 */ " paddw %%mm1, %%mm2; " " movq %%mm3, %%mm1; " /* accumulator = (srcpix * xfrac) >> 16 */ " pmulhuw %%mm7, %%mm2; " " packuswb %%mm0, %%mm2; " " movd %%mm2, (%1); " " add %5, %%ecx; " " add $4, %1; " " subl $0x4000, %%ecx; " "4: " /* tail of inner X-loop */ " decl %%edx; " " jne 2b; " " add %7, %0; " /* srcpix += srcdiff */ " add %8, %1; " /* dstpix += dstdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(One64), "m"(height), "m"(srcwidth), "m"(xspace), "m"(xrecip), "m"(srcdiff64), "m"(dstdiff64) /* inputs */ : "%ecx", "%edx" /* clobbered */ ); // clang-format on } /* These functions implement an area-averaging shrinking filter in the * Y-dimension. */ void filter_shrink_Y_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { // Uint16 *templine; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " punpcklwd %%mm7, %%mm7; " " punpckldq %%mm7, %%mm7; " "1: " /* outer Y-loop */ " mov %2, %%rax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%rax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%rax); " " add $8, %%rax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%rax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " movq %%mm4, %%mm0; " /* mm3 = (srcpix * yfrac) >> 16) */ " psraw $15, %%mm0; " " pand %%mm3, %%mm0; " " movq %%mm3, %%mm2; " " psraw $15, %%mm2; " " pand %%mm4, %%mm2; " " pmulhw %%mm4, %%mm3; " " paddw %%mm0, %%mm3; " " paddw %%mm2, %%mm3; " " movq %%mm1, %%mm0; " /* mm4 = (srcpix * ycounter >> 16) */ " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm1, %%mm2; " " pmulhw %%mm1, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " movq %%mm3, (%%rax); " " paddw %%mm5, %%mm4; " " add $8, %%rax; " " movq %%mm7, %%mm0; " " psraw $15, %%mm0; " " pand %%mm4, %%mm0; " " movq %%mm4, %%mm2; " " psraw $15, %%mm2; " " pand %%mm7, %%mm2; " " pmulhw %%mm7, %%mm4; " " paddw %%mm0, %%mm4; " " paddw %%mm2, %%mm4; " " pxor %%mm0, %%mm0; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff64), "m"(dstdiff64), "m"(One64) /* input */ : "%ecx", "%edx", "%rax" /* clobbered */ ); // clang-format on } void filter_shrink_Y_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int yspace = 0x4000 * srcheight / dstheight; /* must be > 1 */ int yrecip = 0x40000000 / yspace; long long One64 = 0x4000400040004000ULL; long long srcdiff64 = srcdiff; long long dstdiff64 = dstdiff; // clang-format off asm __volatile__( " /* MMX code for Y-shrink area average filter */ " " movl %5, %%ecx; " /* ecx == ycounter */ " pxor %%mm0, %%mm0; " " movd %6, %%mm7; " /* mm7 == yrecipmmx */ " pshufw $0, %%mm7, %%mm7; " "1: " /* outer Y-loop */ " mov %2, %%rax; " /* rax == accumulate */ " cmpl $0x4000, %%ecx; " " jbe 3f; " " movl %4, %%edx; " /* edx == width */ "2: " " movd (%0), %%mm1; " " add $4, %0; " " movq (%%rax), %%mm2; " " punpcklbw %%mm0, %%mm1; " " paddw %%mm1, %%mm2; " " movq %%mm2, (%%rax); " " add $8, %%rax; " " decl %%edx; " " jne 2b; " " subl $0x4000, %%ecx; " " jmp 6f; " "3: " /* prepare to output a line */ " movd %%ecx, %%mm1; " " movl %4, %%edx; " /* edx = width */ " movq %9, %%mm6; " /* mm6 = 2^14 */ " pshufw $0, %%mm1, %%mm1; " " psubw %%mm1, %%mm6; " /* mm6 = yfrac */ "4: " " movd (%0), %%mm4; " /* mm4 = srcpix */ " add $4, %0; " " punpcklbw %%mm0, %%mm4; " " movq (%%rax), %%mm5; " /* mm5 = accumulate */ " movq %%mm6, %%mm3; " " psllw $2, %%mm4; " " pmulhuw %%mm4, %%mm3; " /* mm3 = (srcpix * yfrac) >> 16 */ " pmulhuw %%mm1, %%mm4; " /* mm4 = (srcpix * ycounter >> 16) */ " movq %%mm3, (%%rax); " " paddw %%mm5, %%mm4; " " add $8, %%rax; " " pmulhuw %%mm7, %%mm4; " " packuswb %%mm0, %%mm4; " " movd %%mm4, (%1); " " add $4, %1; " " decl %%edx; " " jne 4b; " " add %8, %1; " /* dstpix += dstdiff */ " addl %5, %%ecx; " " subl $0x4000, %%ecx; " "6: " /* tail of outer Y-loop */ " add %7, %0; " /* srcpix += srcdiff */ " decl %3; " " jne 1b; " " emms; " : "+r"(srcpix), "+r"(dstpix) /* outputs */ : "m"(templine), "m"(srcheight), "m"(width), "m"(yspace), "m"(yrecip), "m"(srcdiff64), "m"(dstdiff64), "m"(One64) /* input */ : "%ecx", "%edx", "%rax" /* clobbered */ ); // clang-format on } /* These functions implement a bilinear filter in the X-dimension. */ void filter_expand_X_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int x, y; int factorwidth = 8; /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *xm1 = xmult1; int *x0 = xidx0; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " movl %5, %%ecx; " " pxor %%mm0, %%mm0; " "1: " " movsxl (%3), %%rax; " /* get xidx0[x] */ " add $4, %3; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " movq (%1), %%mm2; " /* load mult1 */ " add $8, %1; " " movd (%4,%%rax,4), %%mm4; " " movd 4(%4,%%rax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(xm1), "+r"(dstrow), "+r"(x0) /* outputs */ : "r"(srcrow0), "m"(dstwidth) /* input */ : "%ecx", "%rax" /* clobbered */ ); // clang-format on } } void filter_expand_X_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int x, y; int factorwidth = 8; /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { int xm1 = 0x100 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; int xm0 = 0x100 - xm1; xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x * 2] = xm1 | (xm1 << 16); xmult1[x * 2 + 1] = xm1 | (xm1 << 16); xmult0[x * 2] = xm0 | (xm0 << 16); xmult0[x * 2 + 1] = xm0 | (xm0 << 16); } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; Uint8 *dstrow = dstpix + y * dstpitch; int *xm0 = xmult0; int *xm1 = xmult1; int *x0 = xidx0; // clang-format off asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ " " movl %5, %%ecx; " " pxor %%mm0, %%mm0; " "1: " " movsxl (%3), %%rax; " /* get xidx0[x] */ " add $4, %3; " " movq (%0), %%mm1; " /* load mult0 */ " add $8, %0; " " movq (%1), %%mm2; " /* load mult1 */ " add $8, %1; " " movd (%4,%%rax,4), %%mm4; " " movd 4(%4,%%rax,4), %%mm5; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(xm0), "+r"(xm1), "+r"(dstrow), "+r"(x0) /* outputs */ : "r"(srcrow0), "m"(dstwidth) /* input */ : "%ecx", "%rax" /* clobbered */ ); // clang-format on } } /* These functions implement a bilinear filter in the Y-dimension */ void filter_expand_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%ecx; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " punpcklwd %%mm1, %%mm1; " " punpckldq %%mm1, %%mm1; " " punpcklwd %%mm2, %%mm2; " " punpckldq %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%ecx" /* clobbered */ ); // clang-format on } } void filter_expand_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x0100 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x0100 - ymult1; Uint8 *dstrow = dstpix + y * dstpitch; // clang-format off asm __volatile__( " /* MMX code for inner loop of Y bilinear filter */ " " movl %5, %%ecx; " " movd %3, %%mm1; " " movd %4, %%mm2; " " pxor %%mm0, %%mm0; " " pshufw $0, %%mm1, %%mm1; " " pshufw $0, %%mm2, %%mm2; " "1: " " movd (%0), %%mm4; " " add $4, %0; " " movd (%1), %%mm5; " " add $4, %1; " " punpcklbw %%mm0, %%mm4; " " punpcklbw %%mm0, %%mm5; " " pmullw %%mm1, %%mm4; " " pmullw %%mm2, %%mm5; " " paddw %%mm4, %%mm5; " " psrlw $8, %%mm5; " " packuswb %%mm0, %%mm5; " " movd %%mm5, (%2); " " add $4, %2; " " decl %%ecx; " " jne 1b; " " emms; " : "+r"(srcrow0), "+r"(srcrow1), "+r"(dstrow) /* outputs */ : "m"(ymult0), "m"(ymult1), "m"(width) /* input */ : "%ecx" /* clobbered */ ); // clang-format on } } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scale_mmx64_msvc.c0000644000175100001770000001006614676242340017031 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* Pentium 64 bit SSE/MMX smoothscale routines * These are written for compilation with MSVC only. * * This file should not depend on anything but the C standard library. */ #include typedef uint8_t Uint8; /* SDL convention */ typedef uint16_t Uint16; /* SDL convention */ #include #include #include "scale.h" /* These functions implement an area-averaging shrinking filter in the * Y-dimension. */ void filter_shrink_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); filter_shrink_Y_MMX_gcc(srcpix, dstpix, templine, width, srcpitch, dstpitch, srcheight, dstheight); /* free the temporary memory */ free(templine); } void filter_shrink_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == 0) return; memset(templine, 0, dstpitch * 2); filter_shrink_Y_SSE_gcc(srcpix, dstpix, templine, width, srcpitch, dstpitch, srcheight, dstheight); /* free the temporary memory */ free(templine); } /* These functions implement a bilinear filter in the X-dimension. */ void filter_expand_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int factorwidth = 8; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } filter_expand_X_MMX_gcc(srcpix, dstpix, xidx0, xmult0, xmult1, height, srcpitch, dstpitch, srcwidth, dstwidth); /* free memory */ free(xidx0); free(xmult0); free(xmult1); } void filter_expand_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int *xidx0, *xmult0, *xmult1; int factorwidth = 8; /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == 0) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == 0 || xmult1 == 0) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } filter_expand_X_SSE_gcc(srcpix, dstpix, xidx0, xmult0, xmult1, height, srcpitch, dstpitch, srcwidth, dstwidth); /* free memory */ free(xidx0); free(xmult0); free(xmult1); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scrap.c0000644000175100001770000002424214676242340014770 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally written and put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Handle clipboard text and data in arbitrary formats */ #include #include #include "SDL.h" #include "SDL_syswm.h" #include "pygame.h" #include "pgcompat.h" #include "doc/scrap_doc.h" #include "scrap.h" /** * Indicates, whether pygame.scrap was initialized or not. */ static int _scrapinitialized = 0; /** * Currently active Clipboard object. */ static ScrapClipType _currentmode; static PyObject *_selectiondata = NULL; static PyObject *_clipdata = NULL; /* Forward declarations. */ static PyObject * _scrap_get_types(PyObject *self, PyObject *args); static PyObject * _scrap_contains(PyObject *self, PyObject *args); static PyObject * _scrap_get_scrap(PyObject *self, PyObject *args); static PyObject * _scrap_put_scrap(PyObject *self, PyObject *args); static PyObject * _scrap_lost_scrap(PyObject *self, PyObject *args); static PyObject * _scrap_set_mode(PyObject *self, PyObject *args); /* Determine what type of clipboard we are using */ #if !defined(__WIN32__) #define SDL2_SCRAP #include "scrap_sdl2.c" #elif defined(__unix__) && defined(SDL_VIDEO_DRIVER_X11) /*!defined(__QNXNTO__) &&*/ #define X11_SCRAP #include /* Needed for clipboard timeouts. */ #include "scrap_x11.c" #elif defined(__WIN32__) #define WIN_SCRAP #include "scrap_win.c" #elif defined(__APPLE__) #define MAC_SCRAP #include "scrap_mac.c" #else #error Unknown window manager for clipboard handling #endif /* scrap type */ /** * \brief Indicates whether the scrap module is already initialized. * * \return 0 if the module is not initialized, 1, if it is. */ int pygame_scrap_initialized(void) { return _scrapinitialized; } #if !defined(MAC_SCRAP) /* * Initializes the pygame scrap module. */ static PyObject * _scrap_init(PyObject *self, PyObject *args) { VIDEO_INIT_CHECK(); if (!pygame_scrap_initialized()) { Py_XDECREF(_clipdata); Py_XDECREF(_selectiondata); _clipdata = PyDict_New(); _selectiondata = PyDict_New(); } /* In case we've got not video surface, we won't initialize * anything. * Here is old SDL1 code for future reference * if (!SDL_GetVideoSurface()) * return RAISE(pgExc_SDLError, "No display mode is set"); */ if (!pygame_scrap_init()) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } #endif /* * Indicates whether the scrap module is currently initialized. * * Note: All platforms supported here. */ static PyObject * _scrap_get_init(PyObject *self, PyObject *_null) { return PyBool_FromLong(pygame_scrap_initialized()); } #if !defined(MAC_SCRAP) /* * Gets the currently available types from the active clipboard. */ static PyObject * _scrap_get_types(PyObject *self, PyObject *_null) { int i = 0; char **types; char *type; PyObject *list; PyObject *tmp; PYGAME_SCRAP_INIT_CHECK(); if (!pygame_scrap_lost()) { switch (_currentmode) { case SCRAP_SELECTION: return PyDict_Keys(_selectiondata); case SCRAP_CLIPBOARD: default: return PyDict_Keys(_clipdata); } } list = PyList_New(0); types = pygame_scrap_get_types(); if (!types) return list; while (types[i] != NULL) { type = types[i]; tmp = PyUnicode_DecodeASCII(type, strlen(type), 0); if (!tmp) { Py_DECREF(list); return 0; } if (PyList_Append(list, tmp)) { Py_DECREF(list); Py_DECREF(tmp); return 0; } Py_DECREF(tmp); i++; } return list; } #endif #if !defined(MAC_SCRAP) /* * Checks whether the active clipboard contains a certain type. */ static PyObject * _scrap_contains(PyObject *self, PyObject *args) { char *type = NULL; if (!PyArg_ParseTuple(args, "s", &type)) return NULL; if (pygame_scrap_contains(type)) Py_RETURN_TRUE; Py_RETURN_FALSE; } #endif #if !defined(MAC_SCRAP) /* * Gets the content for a certain type from the active clipboard. */ static PyObject * _scrap_get_scrap(PyObject *self, PyObject *args) { char *scrap = NULL; PyObject *retval; char *scrap_type; size_t count; PYGAME_SCRAP_INIT_CHECK(); if (!PyArg_ParseTuple(args, "s", &scrap_type)) return NULL; if (!pygame_scrap_lost()) { /* Still own the clipboard. */ PyObject *scrap_dict = NULL; PyObject *key = NULL; PyObject *val = NULL; switch (_currentmode) { case SCRAP_SELECTION: scrap_dict = _selectiondata; break; case SCRAP_CLIPBOARD: default: scrap_dict = _clipdata; break; } key = PyUnicode_FromString(scrap_type); if (NULL == key) { return PyErr_Format(PyExc_ValueError, "invalid scrap data type identifier (%s)", scrap_type); } val = PyDict_GetItemWithError(scrap_dict, key); Py_DECREF(key); if (NULL == val) { if (PyErr_Occurred()) { return PyErr_Format(PyExc_SystemError, "pygame.scrap internal error (key=%s)", scrap_type); } Py_RETURN_NONE; } Py_INCREF(val); return val; } /* pygame_get_scrap() only returns NULL or !NULL, but won't set any * errors. */ scrap = pygame_scrap_get(scrap_type, &count); if (!scrap) Py_RETURN_NONE; retval = PyBytes_FromStringAndSize(scrap, count); #if defined(PYGAME_SCRAP_FREE_STRING) free(scrap); #endif return retval; } #endif #if !defined(MAC_SCRAP) /* * This will put a python string into the clipboard. */ static PyObject * _scrap_put_scrap(PyObject *self, PyObject *args) { Py_ssize_t scraplen; char *scrap = NULL; char *scrap_type; PyObject *tmp; static const char argfmt[] = "sy#"; PYGAME_SCRAP_INIT_CHECK(); if (!PyArg_ParseTuple(args, argfmt, &scrap_type, &scrap, &scraplen)) { return NULL; } /* Set it in the clipboard. */ if (!pygame_scrap_put(scrap_type, scraplen, scrap)) return RAISE(pgExc_SDLError, "content could not be placed in clipboard."); /* Add or replace the set value. */ switch (_currentmode) { case SCRAP_SELECTION: { tmp = PyBytes_FromStringAndSize(scrap, scraplen); PyDict_SetItemString(_selectiondata, scrap_type, tmp); Py_DECREF(tmp); break; } case SCRAP_CLIPBOARD: default: { tmp = PyBytes_FromStringAndSize(scrap, scraplen); PyDict_SetItemString(_clipdata, scrap_type, tmp); Py_DECREF(tmp); break; } } Py_RETURN_NONE; } #endif #if !defined(MAC_SCRAP) /* * Checks whether the pygame window has lost the clipboard. */ static PyObject * _scrap_lost_scrap(PyObject *self, PyObject *_null) { PYGAME_SCRAP_INIT_CHECK(); if (pygame_scrap_lost()) Py_RETURN_TRUE; Py_RETURN_FALSE; } #endif #if !defined(MAC_SCRAP) /* * Sets the clipboard mode. This only works for the X11 environment, which * diverses between mouse selections and the clipboard. */ static PyObject * _scrap_set_mode(PyObject *self, PyObject *args) { PYGAME_SCRAP_INIT_CHECK(); if (!PyArg_ParseTuple(args, "i", &_currentmode)) return NULL; if (_currentmode != SCRAP_CLIPBOARD && _currentmode != SCRAP_SELECTION) return RAISE(PyExc_ValueError, "invalid clipboard mode"); #ifndef X11_SCRAP /* Force the clipboard, if not in a X11 environment. */ _currentmode = SCRAP_CLIPBOARD; #endif Py_RETURN_NONE; } #endif /* !defined(MAC_SCRAP) */ static PyMethodDef scrap_builtins[] = { /* * Only initialise these functions for ones we know about. * * Note, the macosx stuff is done in sdlosx_main.m */ #if (defined(X11_SCRAP) || defined(WIN_SCRAP) || defined(QNX_SCRAP) || \ defined(MAC_SCRAP) || defined(SDL2_SCRAP)) {"init", _scrap_init, 1, DOC_PYGAMESCRAPINIT}, {"get_init", _scrap_get_init, METH_NOARGS, DOC_PYGAMESCRAPGETINIT}, {"contains", _scrap_contains, METH_VARARGS, DOC_PYGAMESCRAPCONTAINS}, {"get", _scrap_get_scrap, METH_VARARGS, DOC_PYGAMESCRAPGET}, {"get_types", _scrap_get_types, METH_NOARGS, DOC_PYGAMESCRAPGETTYPES}, {"put", _scrap_put_scrap, METH_VARARGS, DOC_PYGAMESCRAPPUT}, {"lost", _scrap_lost_scrap, METH_NOARGS, DOC_PYGAMESCRAPLOST}, {"set_mode", _scrap_set_mode, METH_VARARGS, DOC_PYGAMESCRAPSETMODE}, #endif {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(scrap) { static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "scrap", "", -1, scrap_builtins, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } /* create the module */ return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scrap.h0000644000175100001770000001114014676242340014766 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef SCRAP_H #define SCRAP_H /* This is unconditionally defined in Python.h */ #if defined(_POSIX_C_SOURCE) #undef _POSIX_C_SOURCE #endif #include /* Handle clipboard text and data in arbitrary formats */ /** * Predefined supported pygame scrap types. */ #define PYGAME_SCRAP_TEXT "text/plain" #define PYGAME_SCRAP_BMP "image/bmp" #define PYGAME_SCRAP_PPM "image/ppm" #define PYGAME_SCRAP_PBM "image/pbm" /** * The supported scrap clipboard types. * * This is only relevant in a X11 environment, which supports mouse * selections as well. For Win32 and MacOS environments the default * clipboard is used, no matter what value is passed. */ typedef enum { SCRAP_CLIPBOARD, SCRAP_SELECTION /* only supported in X11 environments. */ } ScrapClipType; /** * Macro for initialization checks. */ #define PYGAME_SCRAP_INIT_CHECK() \ if (!pygame_scrap_initialized()) \ return (PyErr_SetString(pgExc_SDLError, "scrap system not initialized."), \ NULL) /** * \brief Checks, whether the pygame scrap module was initialized. * * \return 1 if the modules was initialized, 0 otherwise. */ extern int pygame_scrap_initialized(void); /** * \brief Initializes the pygame scrap module internals. Call this before any * other method. * * \return 1 on successful initialization, 0 otherwise. */ extern int pygame_scrap_init(void); /** * \brief Checks, whether the pygame window lost the clipboard focus or not. * * \return 1 if the window lost the focus, 0 otherwise. */ extern int pygame_scrap_lost(void); /** * \brief Places content of a specific type into the clipboard. * * \note For X11 the following notes are important: The following types * are reserved for internal usage and thus will throw an error on * setting them: "TIMESTAMP", "TARGETS", "SDL_SELECTION". * Setting PYGAME_SCRAP_TEXT ("text/plain") will also automatically * set the X11 types "STRING" (XA_STRING), "TEXT" and "UTF8_STRING". * * For Win32 the following notes are important: Setting * PYGAME_SCRAP_TEXT ("text/plain") will also automatically set * the Win32 type "TEXT" (CF_TEXT). * * For QNX the following notes are important: Setting * PYGAME_SCRAP_TEXT ("text/plain") will also automatically set * the QNX type "TEXT" (Ph_CL_TEXT). * * \param type The type of the content. * \param srclen The length of the content. * \param src The NULL terminated content. * \return 1, if the content could be successfully pasted into the clipboard, * 0 otherwise. */ extern int pygame_scrap_put(char *type, Py_ssize_t srclen, char *src); /** * \brief Gets the current content from the clipboard. * * \note The received content does not need to be the content previously * placed in the clipboard using pygame_put_scrap(). See the * pygame_put_scrap() notes for more details. * * \param type The type of the content to receive. * \param count The size of the returned content. * \return The content or NULL in case of an error or if no content of the * specified type was available. */ extern char * pygame_scrap_get(char *type, size_t *count); /** * \brief Gets the currently available content types from the clipboard. * * \return The different available content types or NULL in case of an * error or if no content type is available. */ extern char ** pygame_scrap_get_types(void); /** * \brief Checks whether content for the specified scrap type is currently * available in the clipboard. * * \param type The type to check for. * \return 1, if there is content and 0 otherwise. */ extern int pygame_scrap_contains(char *type); #endif /* SCRAP_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scrap_mac.c0000644000175100001770000000426514676242340015613 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally written and put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ static PyObject * mac_scrap_call(char *name, PyObject *args) { static PyObject *mac_scrap_module = NULL; PyObject *method; PyObject *result; if (!mac_scrap_module) mac_scrap_module = PyImport_ImportModule("pygame.sdlmain_osx"); if (!mac_scrap_module) return NULL; method = PyObject_GetAttrString(mac_scrap_module, name); if (!method) return NULL; result = PyObject_CallObject(method, args); Py_DECREF(method); return result; } static PyObject * _scrap_init(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapInit", args); } static PyObject * _scrap_get_scrap(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapGet", args); } static PyObject * _scrap_put_scrap(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapPut", args); } static PyObject * _scrap_lost_scrap(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapLost", args); } static PyObject * _scrap_get_types(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapGetTypes", args); } static PyObject * _scrap_contains(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapContains", args); } static PyObject * _scrap_set_mode(PyObject *self, PyObject *args) { return mac_scrap_call("ScrapSetMode", args); } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scrap_qnx.c0000644000175100001770000001410214676242340015650 0ustar00runnerdocker /* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally written and put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ static unsigned short InputGroup; #define MAX_CHUNK_SIZE INT_MAX /** * \brief Converts the passed type into a system specific type to use * for the clipboard. * * \param type The type to convert. * \return A system specific type. */ static uint32_t _convert_format(char *type) { switch (type) { case PYGAME_SCRAP_TEXT: return Ph_CL_TEXT; default: /* PYGAME_SCRAP_BMP et al. */ { /* TODO */ return 0; } } } int pygame_scrap_init(void) { SDL_SysWMinfo info; int retval = 0; /* Grab the window manager specific information */ SDL_SetError("SDL is not running on known window manager"); SDL_VERSION(&info.version); if (SDL_GetWMInfo(&info)) { /* Save the information for later use */ InputGroup = PhInputGroup(NULL); retval = 1; } if (retval) _scrapinitialized = 1; return retval; } int pygame_scrap_lost(void) { if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } return (PhInputGroup(NULL) != InputGroup); } int pygame_scrap_put(char *type, Py_ssize_t srclen, char *src) { uint32_t format; int nulledlen = srclen + 1; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } format = _convert_format(type); /* Clear old buffer and copy the new content. */ if (_clipbuffer) free(_clipbuffer); _clipbuffer = malloc(nulledlen); if (!_clipbuffer) return 0; /* Allocation failed. */ memset(_clipbuffer, 0, nulledlen); memcpy(_clipbuffer, src, srclen); _clipsize = srclen; _cliptype = format; #if (_NTO_VERSION < 620) /* Before 6.2.0 releases. */ { PhClipHeader clheader = {Ph_CLIPBOARD_TYPE_TEXT, 0, NULL}; int *cldata; int status; cldata = (int *)_clipbuffer; *cldata = type; clheader.data = _clipbuffer; if (dstlen > 65535) clheader.length = 65535; /* Maximum photon clipboard size. :( */ else clheader.length = nulledlen; status = PhClipboardCopy(InputGroup, 1, &clheader); if (status == -1) { /* Could not access the clipboard, raise an error. */ CLEAN_CLIP_BUFFER(); return 0; } } #else /* 6.2.0 and 6.2.1 and future releases. */ { PhClipboardHdr clheader = {Ph_CLIPBOARD_TYPE_TEXT, 0, NULL}; int *cldata; int status; cldata = (int *)_clipbuffer; *cldata = type; clheader.data = _clipbuffer; clheader.length = nulledlen; status = PhClipboardWrite(InputGroup, 1, &clheader); if (status == -1) { /* Could not access the clipboard, raise an error. */ CLEAN_CLIP_BUFFER(); return 0; } } #endif return 1; } char * pygame_get_scrap(char *type) { uint32_t format = _convert_format(type); char *retval = NULL; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } /* If we are the owner, simply return the clip buffer, if it matches * the request type. */ if (!pygame_scrap_lost()) { if (format != _cliptype) return NULL; if (_clipbuffer) { retval = malloc(_clipsize + 1); if (!retval) return NULL; memset(retval, 0, _clipsize + 1); memcpy(retval, _clipbuffer, _clipsize + 1); return retval; } return NULL; } #if (_NTO_VERSION < 620) /* before 6.2.0 releases */ { void *clhandle; PhClipHeader *clheader; int *cldata; clhandle = PhClipboardPasteStart(InputGroup); if (clhandle) { clheader = PhClipboardPasteType(clhandle, Ph_CLIPBOARD_TYPE_TEXT); if (clheader) { cldata = clheader->data; if (*cldata == type) retval = malloc(clheader->length + 1); if (retval) { memset(retval, 0, clheader->length + 1); memcpy(retval, cldata, clheader->length + 1); } } PhClipboardPasteFinish(clhandle); } } #else /* 6.2.0 and 6.2.1 and future releases */ { void *clhandle; PhClipboardHdr *clheader; int *cldata; clheader = PhClipboardRead(InputGroup, Ph_CLIPBOARD_TYPE_TEXT); if (clheader) { cldata = clheader->data; if (*cldata == type) retval = malloc(clheader->length + 1); if (retval) { memset(retval, 0, clheader->length + 1); memcpy(retval, cldata, clheader->length + 1); } /* According to the QNX 6.x docs, the clheader pointer is a * newly created one that must be freed manually. */ free(clheader->data); free(clheader); } } #endif return retval; } char ** pygame_scrap_get_types(void) { return NULL; } int pygame_scrap_contains(char *type) { return 0; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0141118 pygame-2.6.1/src_c/scrap_sdl2.c0000644000175100001770000000343114676242340015711 0ustar00runnerdocker#include "SDL.h" #include "SDL_clipboard.h" #define PYGAME_SCRAP_FREE_STRING 1 char *pygame_scrap_plaintext_type = "text/plain;charset=utf-8"; char **pygame_scrap_types; int pygame_scrap_contains(char *type) { return (strcmp(type, pygame_scrap_plaintext_type) == 0) && SDL_HasClipboardText(); } char * pygame_scrap_get(char *type, size_t *count) { char *retval = NULL; char *clipboard = NULL; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return NULL; } if (strcmp(type, pygame_scrap_plaintext_type) == 0) { clipboard = SDL_GetClipboardText(); if (clipboard != NULL) { *count = strlen(clipboard); retval = strdup(clipboard); SDL_free(clipboard); return retval; } } return NULL; } char ** pygame_scrap_get_types(void) { if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return NULL; } return pygame_scrap_types; } int pygame_scrap_init(void) { SDL_Init(SDL_INIT_VIDEO); pygame_scrap_types = malloc(sizeof(char *) * 2); if (!pygame_scrap_types) { return 0; } pygame_scrap_types[0] = pygame_scrap_plaintext_type; pygame_scrap_types[1] = NULL; _scrapinitialized = 1; return _scrapinitialized; } int pygame_scrap_lost(void) { return 1; } int pygame_scrap_put(char *type, Py_ssize_t srclen, char *src) { if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } if (strcmp(type, pygame_scrap_plaintext_type) == 0) { if (SDL_SetClipboardText(src) == 0) { return 1; } } return 0; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/scrap_win.c0000644000175100001770000002470414676242340015650 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally written and put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #if !defined(CF_DIBV5) /* Missing from the MinGW win32api-3.11 winuser.h header */ #define CF_DIBV5 17 #endif static HWND window_handle; #define MAX_CHUNK_SIZE INT_MAX static UINT _format_MIME_PLAIN; /** * \brief Converts the passed type into a system specific clipboard type * to use for the clipboard. * * \param type The type to convert. * \return A system specific type. */ static UINT _convert_format(char *type) { return RegisterClipboardFormat(type); } /** * \brief Gets a system specific clipboard format type for a certain type. * * \param type The name of the format to get the mapped format type for. * \return The format type or -1 if no such type was found. */ static UINT _convert_internal_type(char *type) { if (strcmp(type, PYGAME_SCRAP_TEXT) == 0) return CF_TEXT; if (strcmp(type, "text/plain;charset=utf-8") == 0) return CF_UNICODETEXT; if (strcmp(type, "image/tiff") == 0) return CF_TIFF; if (strcmp(type, PYGAME_SCRAP_BMP) == 0) return CF_DIB; if (strcmp(type, "audio/wav") == 0) return CF_WAVE; return -1; } /** * \brief Looks up the name for the specific clipboard format type. * * \param format The format to get the name for. * \param buf The buffer to copy the name into. * \param size The size of the buffer. * \return The length of the format name. */ static size_t _lookup_clipboard_format(UINT format, char *buf, int size) { size_t len; char *cpy; memset(buf, 0, size); switch (format) { case CF_TEXT: len = strlen(PYGAME_SCRAP_TEXT); cpy = PYGAME_SCRAP_TEXT; break; case CF_UNICODETEXT: len = 24; cpy = "text/plain;charset=utf-8"; break; case CF_TIFF: len = 10; cpy = "image/tiff"; break; case CF_DIB: len = strlen(PYGAME_SCRAP_BMP); cpy = PYGAME_SCRAP_BMP; break; case CF_WAVE: len = 9; cpy = "audio/wav"; break; default: len = GetClipboardFormatName(format, buf, size); return len; } if (len != 0) memcpy(buf, cpy, len); return len; } /** * \brief Creates a BMP character buffer with all headers from a DIB * HANDLE. The caller has to free the returned buffer. * \param data The DIB handle data. * \param count The size of the DIB handle. * \return The character buffer containing the BMP information. */ static char * _create_dib_buffer(char *data, size_t *count) { BITMAPFILEHEADER hdr; LPBITMAPINFOHEADER bihdr; char *buf; if (!data) return NULL; bihdr = (LPBITMAPINFOHEADER)data; /* Create the BMP header. */ hdr.bfType = 'M' << 8 | 'B'; /* Specs say, it is always BM */ hdr.bfReserved1 = 0; hdr.bfReserved2 = 0; hdr.bfSize = (DWORD)(sizeof(BITMAPFILEHEADER) + bihdr->biSize + bihdr->biClrUsed * sizeof(RGBQUAD) + bihdr->biSizeImage); hdr.bfOffBits = (DWORD)(sizeof(BITMAPFILEHEADER) + bihdr->biSize + bihdr->biClrUsed * sizeof(RGBQUAD)); #ifdef _MSC_VER /* Suppress false analyzer report */ __analysis_assume(*count > 0); #endif /* Copy both to the buffer. */ buf = malloc(sizeof(hdr) + (*count)); if (!buf) return NULL; memcpy(buf, &hdr, sizeof(hdr)); memcpy(buf + sizeof(BITMAPFILEHEADER), data, *count); /* Increase count for the correct size. */ *count += sizeof(hdr); return buf; } int pygame_scrap_init(void) { SDL_SysWMinfo info; int retval = 0; /* Grab the window manager specific information */ SDL_SetError("SDL is not running on known window manager"); SDL_VERSION(&info.version); if (SDL_GetWindowWMInfo(pg_GetDefaultWindow(), &info)) { /* Save the information for later use */ window_handle = info.info.win.window; retval = 1; } if (retval) _scrapinitialized = 1; _format_MIME_PLAIN = RegisterClipboardFormat(PYGAME_SCRAP_TEXT); return retval; } int pygame_scrap_lost(void) { if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } return (GetClipboardOwner() != window_handle); } int pygame_scrap_put(char *type, Py_ssize_t srclen, char *src) { UINT format; Py_ssize_t nulledlen = srclen + 1; HANDLE hMem; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } format = _convert_internal_type(type); if (format == -1) format = _convert_format(type); if (!OpenClipboard(window_handle)) return 0; /* Could not open the clipboard. */ if (format == CF_DIB || format == CF_DIBV5) nulledlen -= sizeof(BITMAPFILEHEADER); /* We won't copy the header */ hMem = GlobalAlloc((GMEM_MOVEABLE | GMEM_DDESHARE), nulledlen); if (hMem) { char *dst = GlobalLock(hMem); if (dst) { memset(dst, 0, nulledlen); if (format == CF_DIB || format == CF_DIBV5) memcpy(dst, src + sizeof(BITMAPFILEHEADER), nulledlen - 1); else memcpy(dst, src, srclen); } GlobalUnlock(hMem); EmptyClipboard(); SetClipboardData(format, hMem); if (format == _format_MIME_PLAIN) { /* Setting SCRAP_TEXT, also set CF_TEXT. */ SetClipboardData(CF_TEXT, hMem); } } else { /* Could not access the clipboard, raise an error. */ CloseClipboard(); return 0; } CloseClipboard(); return 1; } char * pygame_scrap_get(char *type, size_t *count) { UINT format = _convert_format(type); char *retval = NULL; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return NULL; } if (!pygame_scrap_lost()) return PyBytes_AsString(PyDict_GetItemString(_clipdata, type)); if (!OpenClipboard(window_handle)) return NULL; if (!IsClipboardFormatAvailable(format)) { /* The format was not found - was it a mapped type? */ format = _convert_internal_type(type); if (format == -1) { CloseClipboard(); return NULL; } } if (IsClipboardFormatAvailable(format)) { HANDLE hMem; char *src; src = NULL; hMem = GetClipboardData(format); if (hMem) { *count = 0; /* CF_BITMAP is not a global, so do not lock it. */ if (format != CF_BITMAP) { src = GlobalLock(hMem); if (!src) { CloseClipboard(); return NULL; } *count = GlobalSize(hMem); } if (format == CF_DIB || format == CF_DIBV5) { /* Count will be increased accordingly in * _create_dib_buffer. */ src = _create_dib_buffer(src, count); GlobalUnlock(hMem); CloseClipboard(); return src; } else if (*count != 0) { /* weird error, shouldn't get here. */ if (!src) { return NULL; } retval = malloc(*count); if (retval) { memset(retval, 0, *count); memcpy(retval, src, *count); } } GlobalUnlock(hMem); } } CloseClipboard(); return retval; } char ** pygame_scrap_get_types(void) { UINT format = 0; char **types = NULL; char **tmptypes; int i = 0; int count = -1; size_t len; char tmp[100] = {'\0'}; int size = 0; if (!OpenClipboard(window_handle)) return NULL; size = CountClipboardFormats(); if (size == 0) { CloseClipboard(); return NULL; /* No clipboard data. */ } for (i = 0; i < size; i++) { format = EnumClipboardFormats(format); if (format == 0) { /* Something wicked happened. */ while (i > 0) free(types[i]); free(types); CloseClipboard(); return NULL; } /* No predefined name, get the (truncated) name. */ len = _lookup_clipboard_format(format, tmp, 100); if (len == 0) continue; count++; tmptypes = realloc(types, sizeof(char *) * (count + 1)); if (!tmptypes) { while (count > 0) { free(types[count]); count--; } free(types); CloseClipboard(); return NULL; } types = tmptypes; types[count] = malloc(sizeof(char) * (len + 1)); if (!types[count]) { while (count > 0) { free(types[count]); count--; } free(types); CloseClipboard(); return NULL; } memset(types[count], 0, len + 1); memcpy(types[count], tmp, len); } tmptypes = realloc(types, sizeof(char *) * (count + 1)); if (!tmptypes) { while (count > 0) { free(types[count]); count--; } free(types); CloseClipboard(); return NULL; } types = tmptypes; types[count] = NULL; CloseClipboard(); return types; } int pygame_scrap_contains(char *type) { return IsClipboardFormatAvailable(_convert_format(type)); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/scrap_x11.c0000644000175100001770000006120014676242340015454 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen Originally written and put in the public domain by Sam Lantinga. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include static Display *SDL_Display; static Window SDL_Window; static void (*Lock_Display)(void); static void (*Unlock_Display)(void); /* Atoms used. */ static Atom _atom_UTF8; static Atom _atom_TEXT; static Atom _atom_COMPOUND; static Atom _atom_MIME_PLAIN; static Atom _atom_MIME_UTF8; static Atom _atom_TARGETS; static Atom _atom_TIMESTAMP; static Atom _atom_SDL; static Atom _atom_BMP; static Atom _atom_CLIPBOARD; /* Timestamps for the requests. */ static Time _cliptime = CurrentTime; static Time _selectiontime = CurrentTime; /* Maximum size to send or receive per request. */ #define MAX_CHUNK_SIZE(display) \ MIN(262144, /* 65536 * 4 */ \ (XExtendedMaxRequestSize(display)) == 0 \ ? XMaxRequestSize(display) - 100 \ : XExtendedMaxRequestSize(display) - 100) #define GET_CLIPATOM(x) ((x == SCRAP_SELECTION) ? XA_PRIMARY : _atom_CLIPBOARD) static Atom _convert_format(char *type); static void _init_atom_types(void); static char * _atom_to_string(Atom a); static void _add_clip_data(Atom type, char *data, int srclen); static int _clipboard_filter(const SDL_Event *event); static void _set_targets(PyObject *data, Display *display, Window window, Atom property); static int _set_data(PyObject *dict, Display *display, Window window, Atom property, Atom target); static Window _get_scrap_owner(Atom *selection); static char * _get_data_as(Atom source, Atom format, unsigned long *length); /** * \brief Converts the passed type into a system specific type to use * for the clipboard. * * \param type The type to convert. * \return A system specific type. */ static Atom _convert_format(char *type) { if (strcmp(type, PYGAME_SCRAP_PPM) == 0) return XA_PIXMAP; if (strcmp(type, PYGAME_SCRAP_PBM) == 0) return XA_BITMAP; return XInternAtom(SDL_Display, type, False); } /** * \brief Initializes the used atom types. */ static void _init_atom_types(void) { _atom_UTF8 = XInternAtom(SDL_Display, "UTF8_STRING", False); _atom_TEXT = XInternAtom(SDL_Display, "TEXT", False); _atom_COMPOUND = XInternAtom(SDL_Display, "COMPOUND_TEXT", False); _atom_MIME_PLAIN = XInternAtom(SDL_Display, "text/plain", False); _atom_MIME_UTF8 = XInternAtom(SDL_Display, "text/plain;charset=utf-8", False); _atom_TARGETS = XInternAtom(SDL_Display, "TARGETS", False); _atom_TIMESTAMP = XInternAtom(SDL_Display, "TIMESTAMP", False); _atom_SDL = XInternAtom(SDL_Display, "SDL_SELECTION", False); _atom_BMP = XInternAtom(SDL_Display, PYGAME_SCRAP_BMP, False); _atom_CLIPBOARD = XInternAtom(SDL_Display, "CLIPBOARD", False); } /** * \brief Returns the name of the passed Atom. The result has to be * freed by the caller using free(). * * \param a The Atom to get the name for. * \return The name of the Atom. */ static char * _atom_to_string(Atom a) { char *name; char *retval; if (!a) return NULL; name = XGetAtomName(SDL_Display, a); retval = strdup(name); XFree(name); return retval; } /** * Adds additional data to the currently selected clipboard and Window * if it does not already exist. * * \param cliptype The Atom to set the data for. * \param data The data to set. * \param srclen The length of the data. */ static void _add_clip_data(Atom cliptype, char *data, int srclen) { Atom clip = GET_CLIPATOM(_currentmode); PyObject *dict = (_currentmode == SCRAP_CLIPBOARD) ? _clipdata : _selectiondata; PyObject *tmp; char *key = _atom_to_string(cliptype); tmp = PyBytes_FromStringAndSize(data, srclen); PyDict_SetItemString(dict, key, tmp); Py_DECREF(tmp); XChangeProperty(SDL_Display, SDL_Window, clip, cliptype, 8, PropModeReplace, (unsigned char *)data, srclen); free(key); } /** * \brief System message filter function -- handles X11 clipboard messages. * * \param event The SDL_Event to check. * \return Always 1. */ static int _clipboard_filter(const SDL_Event *event) { PyObject *dict = NULL; Time timestamp = CurrentTime; /* Post all non-window manager specific events */ if (event->type != SDL_SYSWMEVENT) return 1; XEvent xevent = event->syswm.msg->event.xevent; /* Handle window-manager specific clipboard events */ switch (xevent.type) { case PropertyNotify: { /* Handled in pygame_scrap_put(). */ break; } case SelectionClear: { XSelectionClearEvent *clear = &xevent.xselectionclear; /* Looks like another window takes control over the clipboard. * Release the internally saved buffer, if any. */ if (clear->selection == XA_PRIMARY) timestamp = _selectiontime; else if (clear->selection == _atom_CLIPBOARD) timestamp = _cliptime; else break; /* Do not do anything, if the times do not match. */ if (timestamp != CurrentTime && xevent.xselectionclear.time < timestamp) break; /* Clean the dictionaries. */ if (clear->selection == XA_PRIMARY) PyDict_Clear(_selectiondata); else if (clear->selection != _atom_CLIPBOARD) PyDict_Clear(_clipdata); break; } case SelectionNotify: /* This one will be handled directly in the pygame_scrap_get () * function. */ break; case SelectionRequest: { XSelectionRequestEvent *req = &xevent.xselectionrequest; XEvent ev; /* Prepare answer. */ ev.xselection.type = SelectionNotify; ev.xselection.display = req->display; ev.xselection.requestor = req->requestor; ev.xselection.selection = req->selection; ev.xselection.target = req->target; ev.xselection.property = None; ev.xselection.time = req->time; /* Which clipboard type was requested? */ if (req->selection == XA_PRIMARY) { dict = _selectiondata; timestamp = _selectiontime; } else if (req->selection == _atom_CLIPBOARD) { dict = _clipdata; timestamp = _cliptime; } else /* Anything else's not supported. */ { XSendEvent(req->display, req->requestor, False, NoEventMask, &ev); return 1; } /* No data? */ if (PyDict_Size(dict) == 0) { XSendEvent(req->display, req->requestor, False, NoEventMask, &ev); return 1; } /* We do not own the selection anymore. */ if (timestamp == CurrentTime || (req->time != CurrentTime && timestamp > req->time)) { XSendEvent(req->display, req->requestor, False, NoEventMask, &ev); return 1; } /* * TODO: We have to make it ICCCM compatible at some point by * implementing the MULTIPLE atom request. */ /* Old client? */ if (req->property == None) ev.xselection.property = req->target; if (req->target == _atom_TARGETS) { /* The requestor wants to know, what we've got. */ _set_targets(dict, req->display, req->requestor, req->property); } else { _set_data(dict, req->display, req->requestor, req->property, req->target); } ev.xselection.property = req->property; /* Post the event for X11 clipboard reading above */ XSendEvent(req->display, req->requestor, False, 0, &ev); break; } } return 1; } /** * Sets the list of target atoms available in the clipboard. * * \param data The clipboard dictionary. * \param display The requesting Display. * \param window The requesting Window. * \param property The request property to place the list into. */ static void _set_targets(PyObject *data, Display *display, Window window, Atom property) { int i; char *format; PyObject *list = PyDict_Keys(data); PyObject *chars; int amount = PyList_Size(list); /* All types plus the TARGETS and a TIMESTAMP atom. */ Atom *targets = malloc((amount + 2) * sizeof(Atom)); if (targets == NULL) return; memset(targets, 0, (amount + 2) * sizeof(Atom)); targets[0] = _atom_TARGETS; targets[1] = _atom_TIMESTAMP; for (i = 0; i < amount; i++) { chars = PyUnicode_AsASCIIString(PyList_GetItem(list, i)); if (!chars) { return; } format = PyBytes_AsString(chars); targets[i + 2] = _convert_format(format); Py_DECREF(chars); } XChangeProperty(display, window, property, XA_ATOM, 32, PropModeReplace, (unsigned char *)targets, amount + 2); } /** * Places the requested Atom data into a Window. * * \param data The clipboard dictionary. * \param display The requesting Display. * \param window The requesting Window. * \param property The request property to place the list into. * \param target The target property to place the list into. * \return 0 if no data for the target is available, 1 on success. */ static int _set_data(PyObject *data, Display *display, Window window, Atom property, Atom target) { char *name = _atom_to_string(target); PyObject *val = PyDict_GetItemString(data, name); char *value = NULL; int size; if (!val) { XFree(name); return 0; } size = PyBytes_Size(val); value = PyBytes_AsString(val); /* Send data. */ XChangeProperty(display, window, property, target, 8, PropModeReplace, (unsigned char *)value, size); XFree(name); return 1; } /** * \brief Tries to determine the X window with a valid selection. * Default is to check * - passed parameter * - CLIPBOARD * - XA_PRIMARY * - XA_SECONDARY * - XA_CUT_BUFFER0 - 7 * * in this order. * * \param selection The Atom type, that should be tried before any of the * fixed XA_* buffers. * \return The Window handle, that owns the selection or None if none was * found. */ static Window _get_scrap_owner(Atom *selection) { int i = 0; static Atom buffers[] = {XA_PRIMARY, XA_SECONDARY, XA_CUT_BUFFER0, XA_CUT_BUFFER1, XA_CUT_BUFFER2, XA_CUT_BUFFER3, XA_CUT_BUFFER4, XA_CUT_BUFFER5, XA_CUT_BUFFER6, XA_CUT_BUFFER7}; Window owner = XGetSelectionOwner(SDL_Display, *selection); if (owner != None) return owner; owner = XGetSelectionOwner(SDL_Display, _atom_CLIPBOARD); if (owner != None) return owner; while (i < 10) { owner = XGetSelectionOwner(SDL_Display, buffers[i]); if (owner != None) { *selection = buffers[i]; return owner; } i++; } return None; } /** * Retrieves the data from a certain source Atom using a specific * format. * * \param source The currently active clipboard Atom to get the data from. * \param format The format of the data to get. * \param length Out parameter that contains the length of the returned * buffer. * \return The requested content or NULL in case no content exists or an * error occurred. */ static char * _get_data_as(Atom source, Atom format, unsigned long *length) { unsigned char *retval = NULL; Window owner; time_t start; Atom sel_type; int sel_format; unsigned long nbytes; unsigned long overflow; *length = 0; unsigned char *src; unsigned long offset = 0; unsigned long chunk = 0; int step = 1; XEvent ev; Time timestamp; /* If we are the owner, simply return the clip buffer, if it matches * the request type. */ if (!pygame_scrap_lost()) { char *fmt; char *data; fmt = _atom_to_string(format); if (_currentmode == SCRAP_SELECTION) data = PyBytes_AsString(PyDict_GetItemString(_selectiondata, fmt)); else data = PyBytes_AsString(PyDict_GetItemString(_clipdata, fmt)); free(fmt); return data; } Lock_Display(); /* Find a selection owner. */ owner = _get_scrap_owner(&source); if (owner == None) { Unlock_Display(); return NULL; } timestamp = (source == XA_PRIMARY) ? _selectiontime : _cliptime; /* Copy and convert the selection into our SDL_SELECTION atom of the * window. * Flush afterwards, so we have an immediate effect and do not receive * the old buffer anymore. */ XConvertSelection(SDL_Display, source, format, _atom_SDL, SDL_Window, timestamp); XSync(SDL_Display, False); /* Let's wait for the SelectionNotify event from the callee and * react upon it as soon as it is received. */ for (start = time(0);;) { if (XCheckTypedWindowEvent(SDL_Display, SDL_Window, SelectionNotify, &ev)) break; if (time(0) - start >= 5) { /* Timeout, damn. */ Unlock_Display(); return NULL; } } /* Get any property type and check the sel_type afterwards to decide * what to do. */ if (XGetWindowProperty(SDL_Display, ev.xselection.requestor, _atom_SDL, 0, 0, True, AnyPropertyType, &sel_type, &sel_format, &nbytes, &overflow, &src) != Success) { XFree(src); Unlock_Display(); return NULL; } /* In case we requested a SCRAP_TEXT, any property type of * XA_STRING, XA_COMPOUND_TEXT, UTF8_STRING and TEXT is valid. */ if (format == _atom_MIME_PLAIN && (sel_type != _atom_UTF8 && sel_type != _atom_TEXT && sel_type != _atom_COMPOUND && sel_type != XA_STRING)) { /* No matching text type found. Return nothing then. */ XFree(src); Unlock_Display(); return NULL; } /* Anything is fine, so copy the buffer and return it. */ switch (sel_format) { case 16: step = sizeof(short) / 2; break; case 32: step = sizeof(long) / 4; break; case 8: default: step = sizeof(char); *length = overflow; /* 8 bit size is already correctly set in nbytes.*/ break; } /* X11 guarantees NULL termination, add an extra byte. */ *length = step * overflow; retval = malloc(*length + 1); if (retval) { unsigned long boffset = 0; chunk = MAX_CHUNK_SIZE(SDL_Display); memset(retval, 0, (size_t)(*length + 1)); /* Read as long as there is data. */ while (overflow) { if (XGetWindowProperty(SDL_Display, ev.xselection.requestor, _atom_SDL, offset, chunk, True, AnyPropertyType, &sel_type, &sel_format, &nbytes, &overflow, &src) != Success) { break; } offset += nbytes / (32 / sel_format); nbytes *= step * sel_format / 8; memcpy(retval + boffset, src, nbytes); boffset += nbytes; XFree(src); } } else { /* ENOMEM */ return NULL; } /* In case we've got a COMPOUND_TEXT, convert it to the current * multibyte locale. */ if (sel_type == _atom_COMPOUND && sel_format == 8) { char **list = NULL; int count; int status = 0; XTextProperty p; p.encoding = sel_type; p.format = sel_format; p.nitems = nbytes; p.value = retval; status = XmbTextPropertyToTextList(SDL_Display, &p, &list, &count); if (status == XLocaleNotSupported || status == XConverterNotFound) { free(retval); PyErr_SetString(pgExc_SDLError, "current locale is not supported for conversion."); return NULL; } else if (status == XNoMemory) { free(retval); return NULL; } else if (status == Success) { if (count && list) { int i = 0; int ioffset = 0; unsigned char *tmp; free(retval); retval = NULL; for (i = 0; i < count; i++) { *length = strlen(list[i]); tmp = retval; retval = realloc(retval, (*length) + 1); if (!retval) { free(tmp); return NULL; } ioffset += *length; memcpy(retval, list[i], *length); memset(retval + ioffset, '\n', 1); } memset(retval + ioffset, 0, 1); } } if (list) XFreeStringList(list); } Unlock_Display(); return (char *)retval; } int pygame_scrap_init(void) { SDL_SysWMinfo info; int retval = 0; /* Grab the window manager specific information */ SDL_SetError("SDL is not running on known window manager"); SDL_VERSION(&info.version); if (SDL_GetWMInfo(&info)) { /* Save the information for later use */ if (info.subsystem == SDL_SYSWM_X11) { XWindowAttributes setattrs; XSetWindowAttributes newattrs; newattrs.event_mask = PropertyChangeMask; SDL_Display = info.info.x11.display; SDL_Window = info.info.x11.window; Lock_Display = info.info.x11.lock_func; Unlock_Display = info.info.x11.unlock_func; Lock_Display(); /* We need the PropertyNotify event for the timestap, so * modify the event attributes. */ XGetWindowAttributes(SDL_Display, SDL_Window, &setattrs); newattrs.event_mask |= setattrs.all_event_masks; XChangeWindowAttributes(SDL_Display, SDL_Window, CWEventMask, &newattrs); Unlock_Display(); /* Enable the special window hook events */ SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE); SDL_SetEventFilter(_clipboard_filter); /* Create the atom types we need. */ _init_atom_types(); retval = 1; } else SDL_SetError("SDL is not running on X11"); } if (retval) _scrapinitialized = 1; return retval; } int pygame_scrap_lost(void) { int retval; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } Lock_Display(); retval = (XGetSelectionOwner(SDL_Display, GET_CLIPATOM(_currentmode)) != SDL_Window); Unlock_Display(); return retval; } int pygame_scrap_put(char *type, Py_ssize_t srclen, char *src) { Atom clip; Atom cliptype; Time timestamp = CurrentTime; time_t start; XEvent ev; if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return 0; } Lock_Display(); clip = GET_CLIPATOM(_currentmode); cliptype = _convert_format(type); /* We've some types which should not be set by the user. */ if (cliptype == _atom_TARGETS || cliptype == _atom_SDL || cliptype == _atom_TIMESTAMP) { PyErr_SetString(PyExc_ValueError, "the requested type is reserved."); Unlock_Display(); return 0; } /* Update the clipboard property with the buffer. */ XChangeProperty(SDL_Display, SDL_Window, clip, cliptype, 8, PropModeReplace, (unsigned char *)src, srclen); if (cliptype == _atom_MIME_PLAIN) { /* Set PYGAME_SCRAP_TEXT. Also set XA_STRING, TEXT and * UTF8_STRING if they are not set in the dictionary. */ _add_clip_data(XA_STRING, src, srclen); _add_clip_data(_atom_UTF8, src, srclen); _add_clip_data(_atom_TEXT, src, srclen); } XSync(SDL_Display, False); /* Update the timestamp */ for (start = time(0);;) { if (XCheckTypedWindowEvent(SDL_Display, SDL_Window, PropertyNotify, &ev)) break; if (time(0) - start >= 5) { /* Timeout, damn. */ Unlock_Display(); goto SETSELECTIONOWNER; } } if (ev.xproperty.atom == clip) { timestamp = ev.xproperty.time; if (clip == XA_PRIMARY) _selectiontime = timestamp; else _cliptime = timestamp; } else timestamp = (clip == XA_PRIMARY) ? _selectiontime : _cliptime; SETSELECTIONOWNER: /* Set the selection owner to the own window. */ XSetSelectionOwner(SDL_Display, clip, SDL_Window, timestamp); if (XGetSelectionOwner(SDL_Display, clip) != SDL_Window) { /* Ouch, we could not toggle the selection owner. Raise an * error, as it's not guaranteed, that the clipboard * contains valid data. */ Unlock_Display(); return 0; } Unlock_Display(); return 1; } char * pygame_scrap_get(char *type, size_t *count) { if (!pygame_scrap_initialized()) { PyErr_SetString(pgExc_SDLError, "scrap system not initialized."); return NULL; } return _get_data_as(GET_CLIPATOM(_currentmode), _convert_format(type), count); } int pygame_scrap_contains(char *type) { int i = 0; char **types = pygame_scrap_get_types(); while (types[i]) { if (strcmp(type, types[i]) == 0) return 1; i++; } return 0; } char ** pygame_scrap_get_types(void) { char **types; Atom *targetdata; unsigned long length; if (!pygame_scrap_lost()) { PyObject *key; PyObject *chars; Py_ssize_t pos = 0; int i = 0; PyObject *dict = (_currentmode == SCRAP_SELECTION) ? _selectiondata : _clipdata; types = malloc(sizeof(char *) * (PyDict_Size(dict) + 1)); if (!types) return NULL; memset(types, 0, (size_t)(PyDict_Size(dict) + 1)); while (PyDict_Next(dict, &pos, &key, NULL)) { chars = PyUnicode_AsASCIIString(key); if (chars) { types[i] = strdup(PyBytes_AsString(chars)); Py_DECREF(chars); } else { types[i] = NULL; } if (!types[i]) { /* Could not allocate memory, free anything. */ int j = 0; while (types[j]) { free(types[j]); j++; } free(types); return NULL; } i++; } types[i] = NULL; return types; } targetdata = (Atom *)_get_data_as(GET_CLIPATOM(_currentmode), _atom_TARGETS, &length); if (length > 0 && targetdata != NULL) { Atom *data = targetdata; int count = length / sizeof(Atom); int i; char **targets = malloc(sizeof(char *) * (count + 1)); if (targets == NULL) { free(targetdata); return NULL; } memset(targets, 0, sizeof(char *) * (count + 1)); for (i = 0; i < count; i++) targets[i] = _atom_to_string(data[i]); free(targetdata); return targets; } return NULL; } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/sdlmain_osx.m0000644000175100001770000002464014676242340016214 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2009 Brian Fisher This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Mac OS X functions to accommodate the fact SDLMain.m is not included */ #include "pygame.h" #include #include #include #include #include #include #include #include #include "pgcompat.h" #include "scrap.h" #include /* We dont support OSX 10.6 and below. */ #if __MAC_OS_X_VERSION_MAX_ALLOWED <= 1060 #define PYGAME_MAC_SCRAP_OLD 1 #endif struct CPSProcessSerNum { UInt32 lo; UInt32 hi; }; typedef struct CPSProcessSerNum CPSProcessSerNum; extern OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn); extern OSErr CPSEnableForegroundOperation(CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); extern OSErr CPSSetFrontProcess(CPSProcessSerNum *psn); extern OSErr CPSSetProcessName(CPSProcessSerNum *psn, const char *processname); static NSString * getApplicationName(void) { const NSDictionary *dict; NSString *appName = 0; /* Determine the application name */ dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); if (dict) appName = [dict objectForKey: @"CFBundleName"]; if (![appName length]) appName = [[NSProcessInfo processInfo] processName]; return appName; } static PyObject * _WMEnable(PyObject *self) { CPSProcessSerNum psn; const char* nameString; NSString* nameNSString; if (!CPSGetCurrentProcess(&psn)) { nameNSString = getApplicationName(); nameString = [nameNSString UTF8String]; CPSSetProcessName(&psn, nameString); if (!CPSEnableForegroundOperation(&psn, 0x03, 0x3C, 0x2C, 0x1103)) { if (CPSSetFrontProcess(&psn)) return RAISE(pgExc_SDLError, "CPSSetFrontProcess failed"); } else return RAISE(pgExc_SDLError, "CPSEnableForegroundOperation failed"); } else return RAISE(pgExc_SDLError, "CPSGetCurrentProcess failed"); Py_RETURN_TRUE; } //############################################################################# // Defining the NSApplication class we will use //############################################################################# @interface PYGSDLApplication : NSApplication @end /* For some reason, Apple removed setAppleMenu from the headers in 10.4, but the method still is there and works. To avoid warnings, we declare it ourselves here. */ @interface NSApplication(SDL_Missing_Methods) - (void)setAppleMenu:(NSMenu *)menu; @end @implementation PYGSDLApplication /* Invoked from the Quit menu item */ - (void)terminate:(id)sender { SDL_Event event; event.type = SDL_QUIT; SDL_PushEvent(&event); } @end /* The below functions are unused for now, hence commented static void setApplicationMenu(void) { NSMenu *appleMenu; NSMenuItem *menuItem; NSString *title; NSString *appName; appName = getApplicationName(); appleMenu = [[NSMenu alloc] initWithTitle:@""]; title = [@"About " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; [appleMenu addItem:[NSMenuItem separatorItem]]; title = [@"Hide " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; #if MAC_OS_X_VERSION_MAX_ALLOWED < 101200 [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; #else [menuItem setKeyEquivalentModifierMask:(NSEventModifierFlagOption|NSEventModifierFlagCommand)]; #endif [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; [appleMenu addItem:[NSMenuItem separatorItem]]; title = [@"Quit " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; [menuItem setSubmenu:appleMenu]; [[NSApp mainMenu] addItem:menuItem]; [NSApp setAppleMenu:appleMenu]; [appleMenu release]; [menuItem release]; } static void setupWindowMenu(void) { NSMenu *windowMenu; NSMenuItem *windowMenuItem, *menuItem; windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; [windowMenu addItem:menuItem]; [menuItem release]; windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; [windowMenuItem setSubmenu:windowMenu]; [[NSApp mainMenu] addItem:windowMenuItem]; [NSApp setWindowsMenu:windowMenu]; [windowMenu release]; [windowMenuItem release]; } */ static PyObject * _ScrapInit(PyObject *self) { Py_RETURN_TRUE; } static PyObject* _ScrapGet(PyObject *self, PyObject *args) { #if defined (PYGAME_MAC_SCRAP_OLD) Py_RETURN_NONE; #else char *scrap_type; if (!PyArg_ParseTuple(args, "s", &scrap_type)) return NULL; // anything else than text is not implemented if (strcmp(scrap_type, PYGAME_SCRAP_TEXT)) Py_RETURN_NONE; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *info = [[NSPasteboard generalPasteboard]stringForType:NSPasteboardTypeString]; PyObject *ret = NULL; if (info != nil) ret = PyUnicode_FromString([info UTF8String]); [pool release]; if (!ret) Py_RETURN_NONE; return ret; #endif } static PyObject * _ScrapGetTypes(PyObject *self) { #ifdef PYGAME_MAC_SCRAP_OLD Py_RETURN_NONE; #else PyObject *list = PyList_New(0); if (!list) return NULL; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSArray *types = [pb types]; for (NSString *type in types) { if (PyList_Append(list, PyUnicode_FromString([type UTF8String]))) { Py_DECREF(list); [pool release]; return NULL; } } [pool release]; return list; #endif } static PyObject * _ScrapPut(PyObject *self, PyObject *args) { #ifndef PYGAME_MAC_SCRAP_OLD char *scrap_type, *data; if (!PyArg_ParseTuple(args, "ss", &scrap_type, &data)) return NULL; // anything else than text is not implemented if (strcmp(scrap_type, PYGAME_SCRAP_TEXT)) Py_RETURN_NONE; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSString *ndata = [NSString stringWithCString:(char *)data encoding:NSUTF8StringEncoding]; [pb declareTypes: [NSArray arrayWithObject:NSPasteboardTypeString] owner: pb]; [pb setString:ndata forType: NSPasteboardTypeString]; [pool release]; #endif Py_RETURN_NONE; } static PyObject* _ScrapSetMode(PyObject *self, PyObject *args) { #ifndef PYGAME_MAC_SCRAP_OLD char *mode; if (!PyArg_ParseTuple(args, "s", &mode)) return NULL; /* ankith26: * TODO - Someone who understands what's going on here, pls fill code * here. Im just doing cleanup, I dont understand this stuff */ #endif Py_RETURN_NONE; } static PyObject* _ScrapContains(PyObject *self, PyObject *args) { #ifdef PYGAME_MAC_SCRAP_OLD Py_RETURN_NONE; #else char *mode; PyObject *ret = Py_False; if (!PyArg_ParseTuple (args, "s", &mode)) return NULL; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSArray *types = [pb types]; for (NSString *type in types) { if (strcmp([type UTF8String], mode) == 0) ret = Py_True; } [pool release]; Py_INCREF(ret); return ret; #endif } static PyObject * _ScrapLost(PyObject *self) { #ifdef PYGAME_MAC_SCRAP_OLD Py_RETURN_NONE; #else PyObject *ret; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSArray *supportedTypes = [NSArray arrayWithObjects: NSPasteboardTypeString, nil]; NSString *bestType = [[NSPasteboard generalPasteboard] availableTypeFromArray:supportedTypes]; ret = (bestType == nil) ? Py_True : Py_False; [pool release]; Py_INCREF(ret); return ret; #endif } static PyMethodDef macosx_builtins[] = { {"WMEnable", (PyCFunction)_WMEnable, METH_NOARGS, "Enables Foreground Operation when Window Manager is not available" }, {"ScrapInit", (PyCFunction)_ScrapInit, METH_NOARGS, "Initialize scrap for osx" }, {"ScrapGet", (PyCFunction)_ScrapGet, METH_VARARGS, "Get a element from the scrap for osx" }, {"ScrapPut", (PyCFunction)_ScrapPut, METH_VARARGS, "Set a element from the scrap for osx" }, {"ScrapGetTypes", (PyCFunction)_ScrapGetTypes, METH_NOARGS, "Get scrap types for osx" }, {"ScrapSetMode", (PyCFunction)_ScrapSetMode, METH_VARARGS, "Set mode for osx scrap (not used)" }, {"ScrapContains", (PyCFunction)_ScrapContains, METH_VARARGS, "Check if a type is allowed on osx scrap (not used)" }, {"ScrapLost", (PyCFunction)_ScrapLost, METH_NOARGS, "Check if our type is lost from scrap for osx" }, {NULL, NULL, 0, NULL} }; MODINIT_DEFINE (sdlmain_osx) { /* create the module */ static struct PyModuleDef _module = { PyModuleDef_HEAD_INIT, "sdlmain_osx", NULL, -1, macosx_builtins, NULL, NULL, NULL, NULL }; /*imported needed apis*/ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } return PyModule_Create(&_module); } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/simd_blitters.h0000644000175100001770000000467614676242340016542 0ustar00runnerdocker#define NO_PYGAME_C_API #include "_surface.h" #include "_blit_info.h" #if !defined(PG_ENABLE_ARM_NEON) && defined(__aarch64__) // arm64 has neon optimisations enabled by default, even when fpu=neon is not // passed #define PG_ENABLE_ARM_NEON 1 #endif int pg_sse2_at_runtime_but_uncompiled(); int pg_neon_at_runtime_but_uncompiled(); int pg_avx2_at_runtime_but_uncompiled(); #if (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON)) void alphablit_alpha_sse2_argb_surf_alpha(SDL_BlitInfo *info); void alphablit_alpha_sse2_argb_no_surf_alpha(SDL_BlitInfo *info); void alphablit_alpha_sse2_argb_no_surf_alpha_opaque_dst(SDL_BlitInfo *info); void blit_blend_rgba_mul_sse2(SDL_BlitInfo *info); void blit_blend_rgb_mul_sse2(SDL_BlitInfo *info); void blit_blend_rgba_add_sse2(SDL_BlitInfo *info); void blit_blend_rgb_add_sse2(SDL_BlitInfo *info); void blit_blend_rgba_sub_sse2(SDL_BlitInfo *info); void blit_blend_rgb_sub_sse2(SDL_BlitInfo *info); void blit_blend_rgba_max_sse2(SDL_BlitInfo *info); void blit_blend_rgb_max_sse2(SDL_BlitInfo *info); void blit_blend_rgba_min_sse2(SDL_BlitInfo *info); void blit_blend_rgb_min_sse2(SDL_BlitInfo *info); void blit_blend_premultiplied_sse2(SDL_BlitInfo *info); #endif /* (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON)) */ /* Deliberately putting these outside of the preprocessor guards as I want to move to a system of trusting the runtime checks to head to the right function and having a fallback function there if pygame is not compiled with the right stuff (this is the strategy used for AVX2 right now. Potentially I might want to shift both these into a slightly different file as they are not exactly blits (though v. similar) - or I could rename the SIMD trilogy of files to replace the word blit with something more generic like surface_ops*/ void premul_surf_color_by_alpha_non_simd(SDL_Surface *src, SDL_Surface *dst); void premul_surf_color_by_alpha_sse2(SDL_Surface *src, SDL_Surface *dst); int pg_has_avx2(); void blit_blend_rgba_mul_avx2(SDL_BlitInfo *info); void blit_blend_rgb_mul_avx2(SDL_BlitInfo *info); void blit_blend_rgba_add_avx2(SDL_BlitInfo *info); void blit_blend_rgb_add_avx2(SDL_BlitInfo *info); void blit_blend_rgba_sub_avx2(SDL_BlitInfo *info); void blit_blend_rgb_sub_avx2(SDL_BlitInfo *info); void blit_blend_rgba_max_avx2(SDL_BlitInfo *info); void blit_blend_rgb_max_avx2(SDL_BlitInfo *info); void blit_blend_rgba_min_avx2(SDL_BlitInfo *info); void blit_blend_rgb_min_avx2(SDL_BlitInfo *info); ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/simd_blitters_avx2.c0000644000175100001770000007243014676242340017466 0ustar00runnerdocker#include "simd_blitters.h" #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) #include #endif /* defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) */ #define BAD_AVX2_FUNCTION_CALL \ printf( \ "Fatal Error: Attempted calling an AVX2 function when both compile " \ "time and runtime support is missing. If you are seeing this " \ "message, you have stumbled across a pygame bug, please report it " \ "to the devs!"); \ PG_EXIT(1) /* helper function that does a runtime check for AVX2. It has the added * functionality of also returning 0 if compile time support is missing */ int pg_has_avx2() { #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) return SDL_HasAVX2(); #else return 0; #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ } /* This returns 1 when avx2 is available at runtime but support for it isn't * compiled in, 0 in all other cases */ int pg_avx2_at_runtime_but_uncompiled() { if (SDL_HasAVX2()) { #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) return 0; #else return 1; #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ } return 0; } #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgba_mul_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_zero, mm_two_five_fives; __m256i mm256_src, mm256_srcA, mm256_srcB, mm256_dst, mm256_dstA, mm256_dstB, mm256_shuff_mask_A, mm256_shuff_mask_B, mm256_two_five_fives; mm256_shuff_mask_A = _mm256_set_epi8(0x80, 23, 0x80, 22, 0x80, 21, 0x80, 20, 0x80, 19, 0x80, 18, 0x80, 17, 0x80, 16, 0x80, 7, 0x80, 6, 0x80, 5, 0x80, 4, 0x80, 3, 0x80, 2, 0x80, 1, 0x80, 0); mm256_shuff_mask_B = _mm256_set_epi8(0x80, 31, 0x80, 30, 0x80, 29, 0x80, 28, 0x80, 27, 0x80, 26, 0x80, 25, 0x80, 24, 0x80, 15, 0x80, 14, 0x80, 13, 0x80, 12, 0x80, 11, 0x80, 10, 0x80, 9, 0x80, 8); mm_zero = _mm_setzero_si128(); mm_two_five_fives = _mm_set_epi64x(0x00FF00FF00FF00FF, 0x00FF00FF00FF00FF); mm256_two_five_fives = _mm256_set_epi8( 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); /*mm_src = 0x000000000000000000000000AARRGGBB*/ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_cvtsi32_si128(*dstp); /*mm_dst = 0x000000000000000000000000AARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x00000000AARRGGBB00000000AARRGGBB*/ *dstp = _mm_cvtsi128_si32(mm_dst); /*dstp = 0xAARRGGBB*/ srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_srcA = _mm256_shuffle_epi8(mm256_src, mm256_shuff_mask_A); mm256_srcB = _mm256_shuffle_epi8(mm256_src, mm256_shuff_mask_B); mm256_dstA = _mm256_shuffle_epi8(mm256_dst, mm256_shuff_mask_A); mm256_dstB = _mm256_shuffle_epi8(mm256_dst, mm256_shuff_mask_B); mm256_dstA = _mm256_mullo_epi16(mm256_srcA, mm256_dstA); mm256_dstA = _mm256_add_epi16(mm256_dstA, mm256_two_five_fives); mm256_dstA = _mm256_srli_epi16(mm256_dstA, 8); mm256_dstB = _mm256_mullo_epi16(mm256_srcB, mm256_dstB); mm256_dstB = _mm256_add_epi16(mm256_dstB, mm256_two_five_fives); mm256_dstB = _mm256_srli_epi16(mm256_dstB, 8); mm256_dst = _mm256_packus_epi16(mm256_dstA, mm256_dstB); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgba_mul_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgb_mul_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_zero, mm_two_five_fives, mm_alpha_mask; __m256i mm256_src, mm256_srcA, mm256_srcB, mm256_dst, mm256_dstA, mm256_dstB, mm256_shuff_mask_A, mm256_shuff_mask_B, mm256_two_five_fives, mm256_alpha_mask; mm256_shuff_mask_A = _mm256_set_epi8(0x80, 23, 0x80, 22, 0x80, 21, 0x80, 20, 0x80, 19, 0x80, 18, 0x80, 17, 0x80, 16, 0x80, 7, 0x80, 6, 0x80, 5, 0x80, 4, 0x80, 3, 0x80, 2, 0x80, 1, 0x80, 0); mm256_shuff_mask_B = _mm256_set_epi8(0x80, 31, 0x80, 30, 0x80, 29, 0x80, 28, 0x80, 27, 0x80, 26, 0x80, 25, 0x80, 24, 0x80, 15, 0x80, 14, 0x80, 13, 0x80, 12, 0x80, 11, 0x80, 10, 0x80, 9, 0x80, 8); mm_zero = _mm_setzero_si128(); mm_two_five_fives = _mm_set_epi64x(0x00FF00FF00FF00FF, 0x00FF00FF00FF00FF); mm_alpha_mask = _mm_cvtsi32_si128(amask); mm256_two_five_fives = _mm256_set_epi8( 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF); mm256_alpha_mask = _mm256_set_epi32(amask, amask, amask, amask, amask, amask, amask, amask); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); /*mm_src = 0x000000000000000000000000AARRGGBB*/ mm_src = _mm_or_si128(mm_src, mm_alpha_mask); /* ensure source alpha is 255 */ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_cvtsi32_si128(*dstp); /*mm_dst = 0x000000000000000000000000AARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x00000000AARRGGBB00000000AARRGGBB*/ *dstp = _mm_cvtsi128_si32(mm_dst); /*dstp = 0xAARRGGBB*/ srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_src = _mm256_or_si256(mm256_src, mm256_alpha_mask); /* ensure source alpha is 255 */ mm256_dst = _mm256_loadu_si256(dstp256); mm256_srcA = _mm256_shuffle_epi8(mm256_src, mm256_shuff_mask_A); mm256_srcB = _mm256_shuffle_epi8(mm256_src, mm256_shuff_mask_B); mm256_dstA = _mm256_shuffle_epi8(mm256_dst, mm256_shuff_mask_A); mm256_dstB = _mm256_shuffle_epi8(mm256_dst, mm256_shuff_mask_B); mm256_dstA = _mm256_mullo_epi16(mm256_srcA, mm256_dstA); mm256_dstA = _mm256_add_epi16(mm256_dstA, mm256_two_five_fives); mm256_dstA = _mm256_srli_epi16(mm256_dstA, 8); mm256_dstB = _mm256_mullo_epi16(mm256_srcB, mm256_dstB); mm256_dstB = _mm256_add_epi16(mm256_dstB, mm256_two_five_fives); mm256_dstB = _mm256_srli_epi16(mm256_dstB, 8); mm256_dst = _mm256_packus_epi16(mm256_dstA, mm256_dstB); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgb_mul_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgba_add_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst; __m256i mm256_src, mm256_dst; while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_adds_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_dst = _mm256_adds_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgba_add_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgb_add_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_alpha_mask; __m256i mm256_src, mm256_dst, mm256_alpha_mask; mm_alpha_mask = _mm_cvtsi32_si128(amask); mm256_alpha_mask = _mm256_set_epi32(amask, amask, amask, amask, amask, amask, amask, amask); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_adds_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_src = _mm256_subs_epu8(mm256_src, mm256_alpha_mask); mm256_dst = _mm256_adds_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgb_add_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgba_sub_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst; __m256i mm256_src, mm256_dst; while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_subs_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_dst = _mm256_subs_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgba_sub_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgb_sub_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_alpha_mask; __m256i mm256_src, mm256_dst, mm256_alpha_mask; mm_alpha_mask = _mm_cvtsi32_si128(amask); mm256_alpha_mask = _mm256_set_epi32(amask, amask, amask, amask, amask, amask, amask, amask); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_subs_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_src = _mm256_subs_epu8(mm256_src, mm256_alpha_mask); mm256_dst = _mm256_subs_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgb_sub_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgba_max_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst; __m256i mm256_src, mm256_dst; while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_max_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_dst = _mm256_max_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgba_max_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgb_max_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_alpha_mask; __m256i mm256_src, mm256_dst, mm256_alpha_mask; mm_alpha_mask = _mm_cvtsi32_si128(amask); mm256_alpha_mask = _mm256_set_epi32(amask, amask, amask, amask, amask, amask, amask, amask); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_max_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_src = _mm256_subs_epu8(mm256_src, mm256_alpha_mask); mm256_dst = _mm256_max_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgb_max_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgba_min_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst; __m256i mm256_src, mm256_dst; while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_min_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_dst = _mm256_min_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgba_min_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ #if defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) void blit_blend_rgb_min_avx2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_8_width = width % 8; int post_8_width = (width - pre_8_width) / 8; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; __m256i *srcp256 = (__m256i *)info->s_pixels; __m256i *dstp256 = (__m256i *)info->d_pixels; __m128i mm_src, mm_dst, mm_alpha_mask; __m256i mm256_src, mm256_dst, mm256_alpha_mask; mm_alpha_mask = _mm_cvtsi32_si128(amask); mm256_alpha_mask = _mm256_set_epi32(amask, amask, amask, amask, amask, amask, amask, amask); while (height--) { if (pre_8_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_adds_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_min_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_8_width); } srcp256 = (__m256i *)srcp; dstp256 = (__m256i *)dstp; if (post_8_width > 0) { LOOP_UNROLLED4( { mm256_src = _mm256_loadu_si256(srcp256); mm256_dst = _mm256_loadu_si256(dstp256); mm256_src = _mm256_adds_epu8(mm256_src, mm256_alpha_mask); mm256_dst = _mm256_min_epu8(mm256_dst, mm256_src); _mm256_storeu_si256(dstp256, mm256_dst); srcp256++; dstp256++; }, n, post_8_width); } srcp = (Uint32 *)srcp256 + srcskip; dstp = (Uint32 *)dstp256 + dstskip; } } #else void blit_blend_rgb_min_avx2(SDL_BlitInfo *info) { BAD_AVX2_FUNCTION_CALL; } #endif /* defined(__AVX2__) && defined(HAVE_IMMINTRIN_H) && \ !defined(SDL_DISABLE_IMMINTRIN_H) */ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/simd_blitters_sse2.c0000644000175100001770000014554714676242340017474 0ustar00runnerdocker#include "simd_blitters.h" #if PG_ENABLE_ARM_NEON // sse2neon.h is from here: https://github.com/DLTcollab/sse2neon #include "include/sse2neon.h" #endif /* PG_ENABLE_ARM_NEON */ /* See if we are compiled 64 bit on GCC or MSVC */ #if _WIN32 || _WIN64 #if _WIN64 #define ENV64BIT #endif #endif // Check GCC #if __GNUC__ #if __x86_64__ || __ppc64__ || __aarch64__ #define ENV64BIT #endif #endif /* This returns 1 when sse2 is available at runtime but support for it isn't * compiled in, 0 in all other cases */ int pg_sse2_at_runtime_but_uncompiled() { if (SDL_HasSSE2()) { #ifdef __SSE2__ return 0; #else return 1; #endif /* __SSE2__ */ } return 0; } /* This returns 1 when neon is available at runtime but support for it isn't * compiled in, 0 in all other cases */ int pg_neon_at_runtime_but_uncompiled() { if (SDL_HasNEON()) { #if PG_ENABLE_ARM_NEON return 0; #else return 1; #endif /* PG_ENABLE_ARM_NEON */ } return 0; } #if (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON)) /* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32869 * These are both the "movq" instruction, but apparently we need to use the * load low one on 32 bit. See: * https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/emmintrin.h * According to the intel intrinsics guide the instructions this uses on 32 * bit are slightly slower * ARGS: reg is a pointer to an m128, num is a pointer to a 64 bit integer */ #if defined(ENV64BIT) #define LOAD_64_INTO_M128(num, reg) *reg = _mm_cvtsi64_si128(*num) #define STORE_M128_INTO_64(reg, num) *num = _mm_cvtsi128_si64(*reg) #else #define LOAD_64_INTO_M128(num, reg) \ *reg = _mm_loadl_epi64((const __m128i *)num) #define STORE_M128_INTO_64(reg, num) _mm_storel_epi64((__m128i *)num, *reg) #endif void alphablit_alpha_sse2_argb_surf_alpha(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; // int srcbpp = srcfmt->BytesPerPixel; // int dstbpp = dstfmt->BytesPerPixel; Uint32 dst_amask = dstfmt->Amask; Uint32 src_amask = srcfmt->Amask; int dst_opaque = (dst_amask ? 0 : 255); Uint32 modulateA = info->src_blanket_alpha; Uint64 rgb_mask; __m128i src1, dst1, sub_dst, mm_src_alpha; __m128i rgb_src_alpha, mm_zero; __m128i mm_dst_alpha, mm_sub_alpha, rgb_mask_128; mm_zero = _mm_setzero_si128(); rgb_mask = 0x0000000000FFFFFF; // 0F0F0F0F rgb_mask_128 = _mm_loadl_epi64((const __m128i *)&rgb_mask); /* Original 'Straight Alpha' blending equation: -------------------------------------------- dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA)) We use something slightly different to simulate SDL1, as follows: dstRGB = (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> 8) dstA = srcA + dstA - ((srcA * dstA) / 255); */ while (height--) { LOOP_UNROLLED4( { Uint32 src_alpha = (*srcp & src_amask); Uint32 dst_alpha = (*dstp & dst_amask) + dst_opaque; /* modulate src_alpha - need to do it here for accurate testing */ src_alpha = src_alpha >> 24; src_alpha = (src_alpha * modulateA) / 255; src_alpha = src_alpha << 24; if ((src_alpha == src_amask) || (dst_alpha == 0)) { /* 255 src alpha or 0 dst alpha So copy src pixel over dst pixel, also copy modulated alpha */ *dstp = (*srcp & 0x00FFFFFF) | src_alpha; } else { /* Do the actual blend */ /* src_alpha -> mm_src_alpha (000000000000A000) */ mm_src_alpha = _mm_cvtsi32_si128(src_alpha); /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000000000A) */ mm_src_alpha = _mm_srli_si128(mm_src_alpha, 3); /* dst_alpha -> mm_dst_alpha (000000000000A000) */ mm_dst_alpha = _mm_cvtsi32_si128(dst_alpha); /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000000000A) */ mm_dst_alpha = _mm_srli_si128(mm_dst_alpha, 3); /* Calc alpha first */ /* (srcA * dstA) */ mm_sub_alpha = _mm_mullo_epi16(mm_src_alpha, mm_dst_alpha); /* (srcA * dstA) / 255 */ mm_sub_alpha = _mm_srli_epi16( _mm_mulhi_epu16(mm_sub_alpha, _mm_set1_epi16((short)0x8081)), 7); /* srcA + dstA */ mm_dst_alpha = _mm_add_epi16(mm_src_alpha, mm_dst_alpha); /* srcA + dstA - ((srcA * dstA) / 255); */ mm_dst_alpha = _mm_slli_si128( _mm_sub_epi16(mm_dst_alpha, mm_sub_alpha), 3); /* Then Calc RGB */ /* 0000000000000A0A -> rgb_src_alpha */ rgb_src_alpha = _mm_unpacklo_epi16(mm_src_alpha, mm_src_alpha); /* 000000000A0A0A0A -> rgb_src_alpha */ rgb_src_alpha = _mm_unpacklo_epi32(rgb_src_alpha, rgb_src_alpha); /* src(ARGB) -> src1 (000000000000ARGB) */ src1 = _mm_cvtsi32_si128(*srcp); /* 000000000A0R0G0B -> src1 */ src1 = _mm_unpacklo_epi8(src1, mm_zero); /* dst(ARGB) -> dst1 (000000000000ARGB) */ dst1 = _mm_cvtsi32_si128(*dstp); /* 000000000A0R0G0B -> dst1 */ dst1 = _mm_unpacklo_epi8(dst1, mm_zero); /* (srcRGB - dstRGB) */ sub_dst = _mm_sub_epi16(src1, dst1); /* (srcRGB - dstRGB) * srcA */ sub_dst = _mm_mullo_epi16(sub_dst, rgb_src_alpha); /* (srcRGB - dstRGB) * srcA + srcRGB */ sub_dst = _mm_add_epi16(sub_dst, src1); /* (dstRGB << 8) */ dst1 = _mm_slli_epi16(dst1, 8); /* ((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) */ sub_dst = _mm_add_epi16(sub_dst, dst1); /* (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> * 8)*/ sub_dst = _mm_srli_epi16(sub_dst, 8); /* pack everything back into a pixel */ sub_dst = _mm_packus_epi16(sub_dst, mm_zero); sub_dst = _mm_and_si128(sub_dst, rgb_mask_128); /* add alpha to RGB */ sub_dst = _mm_add_epi16(mm_dst_alpha, sub_dst); *dstp = _mm_cvtsi128_si32(sub_dst); } ++srcp; ++dstp; }, n, width); srcp += srcskip; dstp += dstskip; } } void alphablit_alpha_sse2_argb_no_surf_alpha(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; int srcskip = info->s_skip >> 2; int dstskip = info->d_skip >> 2; SDL_PixelFormat *srcfmt = info->src; SDL_PixelFormat *dstfmt = info->dst; /* Original 'Straight Alpha' blending equation: -------------------------------------------- dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA)) We use something slightly different to simulate SDL1, as follows: dstRGB = (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> 8) dstA = srcA + dstA - ((srcA * dstA) / 255); */ /* There are two paths through this blitter: 1. Two pixels at once. 2. One pixel at a time. */ Uint64 *srcp64 = (Uint64 *)info->s_pixels; Uint64 *dstp64 = (Uint64 *)info->d_pixels; Uint64 src_amask64 = ((Uint64)srcfmt->Amask << 32) | srcfmt->Amask; Uint64 rgb_mask = 0x00FFFFFF00FFFFFF; Uint64 offset_rgb_mask = 0xFF00FFFFFF00FFFF; Uint32 *srcp32 = (Uint32 *)info->s_pixels; Uint32 *dstp32 = (Uint32 *)info->d_pixels; Uint32 src_amask32 = srcfmt->Amask; Uint32 dst_amask32 = dstfmt->Amask; __m128i src1, dst1, temp, sub_dst; __m128i temp2, mm_src_alpha, mm_dst_alpha, mm_sub_alpha; __m128i mm_alpha_mask, mm_zero, rgb_mask_128, offset_rgb_mask_128, alpha_mask_128; if (((width % 2) == 0) && ((srcskip % 2) == 0) && ((dstskip % 2) == 0)) { width = width / 2; srcskip = srcskip / 2; dstskip = dstskip / 2; mm_zero = _mm_setzero_si128(); mm_alpha_mask = _mm_cvtsi32_si128(0x00FF00FF); /* two pixels at a time -- * only works when blit width is an even number */ LOAD_64_INTO_M128(&rgb_mask, &rgb_mask_128); LOAD_64_INTO_M128(&offset_rgb_mask, &offset_rgb_mask_128); LOAD_64_INTO_M128(&src_amask64, &alpha_mask_128); while (height--) { LOOP_UNROLLED4( { /* load the pixels into SSE registers */ /* src(ARGB) -> src1 (00000000ARGBARGB) */ LOAD_64_INTO_M128(srcp64, &src1); /* dst(ARGB) -> dst1 (00000000ARGBARGB) */ LOAD_64_INTO_M128(dstp64, &dst1); /* src_alpha -> mm_src_alpha (00000000A000A000) */ mm_src_alpha = _mm_and_si128(src1, alpha_mask_128); /* dst_alpha -> mm_dst_alpha (00000000A000A000) */ mm_dst_alpha = _mm_and_si128(dst1, alpha_mask_128); /* Do the actual blend */ /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000A000A00) */ mm_src_alpha = _mm_srli_si128(mm_src_alpha, 1); /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000A000A00) */ mm_dst_alpha = _mm_srli_si128(mm_dst_alpha, 1); /* this makes sure we copy across src RGB data when dst is * 0*/ temp2 = _mm_cmpeq_epi8(mm_dst_alpha, offset_rgb_mask_128); /* Calc alpha first */ /* (srcA * dstA) */ temp = _mm_mullo_epi16(mm_src_alpha, mm_dst_alpha); /* (srcA * dstA) / 255 */ temp = _mm_srli_epi16( _mm_mulhi_epu16(temp, _mm_set1_epi16((short)0x8081)), 7); /* srcA + dstA - ((srcA * dstA) / 255); */ mm_dst_alpha = _mm_sub_epi16(mm_dst_alpha, temp); mm_dst_alpha = _mm_add_epi16(mm_src_alpha, mm_dst_alpha); mm_dst_alpha = _mm_slli_si128(mm_dst_alpha, 1); /* this makes sure we copy across src RGB data when dst is * 0*/ mm_src_alpha = _mm_or_si128(mm_src_alpha, temp2); // Create squashed src alpha mm_src_alpha = _mm_add_epi16( _mm_and_si128(_mm_srli_si128(mm_src_alpha, 2), mm_alpha_mask), _mm_and_si128(_mm_srli_si128(mm_src_alpha, 4), mm_alpha_mask)); /* Then Calc RGB */ /* 0000000000000A0A -> mm_src_alpha */ mm_src_alpha = _mm_unpacklo_epi16(mm_src_alpha, mm_src_alpha); /* 000000000A0A0A0A -> rgb_src_alpha */ mm_src_alpha = _mm_unpacklo_epi32(mm_src_alpha, mm_src_alpha); /* 000000000A0R0G0B -> src1 */ src1 = _mm_unpacklo_epi8(src1, mm_zero); /* 000000000A0R0G0B -> dst1 */ dst1 = _mm_unpacklo_epi8(dst1, mm_zero); /* (srcRGB - dstRGB) */ temp = _mm_sub_epi16(src1, dst1); /* (srcRGB - dstRGB) * srcA */ temp = _mm_mullo_epi16(temp, mm_src_alpha); /* (srcRGB - dstRGB) * srcA + srcRGB */ temp = _mm_add_epi16(temp, src1); /* (dstRGB << 8) */ dst1 = _mm_slli_epi16(dst1, 8); /* ((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) */ temp = _mm_add_epi16(temp, dst1); /* (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> * 8)*/ temp = _mm_srli_epi16(temp, 8); /* pack everything back into a pixel */ temp = _mm_packus_epi16(temp, mm_zero); temp = _mm_and_si128(temp, rgb_mask_128); /* add alpha to RGB */ temp = _mm_add_epi16(mm_dst_alpha, temp); STORE_M128_INTO_64(&temp, dstp64); ++srcp64; ++dstp64; }, n, width); srcp64 += srcskip; dstp64 += dstskip; } } else { /* one pixel at a time */ mm_zero = _mm_setzero_si128(); rgb_mask_128 = _mm_cvtsi32_si128(0x00FFFFFF); while (height--) { LOOP_UNROLLED4( { Uint32 src_alpha = (*srcp32 & src_amask32); Uint32 dst_alpha = (*dstp32 & dst_amask32); if ((src_alpha == src_amask32) || (dst_alpha == 0)) { /* 255 src alpha or 0 dst alpha So just copy src pixel over dst pixel*/ *dstp32 = *srcp32; } else { /* Do the actual blend */ /* src_alpha -> mm_src_alpha (000000000000A000) */ mm_src_alpha = _mm_cvtsi32_si128(src_alpha); /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000000000A) */ mm_src_alpha = _mm_srli_si128(mm_src_alpha, 3); /* dst_alpha -> mm_dst_alpha (000000000000A000) */ mm_dst_alpha = _mm_cvtsi32_si128(dst_alpha); /* mm_src_alpha >> ashift -> * rgb_src_alpha(000000000000000A) */ mm_dst_alpha = _mm_srli_si128(mm_dst_alpha, 3); /* Calc alpha first */ /* (srcA * dstA) */ mm_sub_alpha = _mm_mullo_epi16(mm_src_alpha, mm_dst_alpha); /* (srcA * dstA) / 255 */ mm_sub_alpha = _mm_srli_epi16( _mm_mulhi_epu16(mm_sub_alpha, _mm_set1_epi16((short)0x8081)), 7); /* srcA + dstA - ((srcA * dstA) / 255); */ mm_dst_alpha = _mm_sub_epi16(mm_dst_alpha, mm_sub_alpha); mm_dst_alpha = _mm_add_epi16(mm_src_alpha, mm_dst_alpha); mm_dst_alpha = _mm_slli_si128(mm_dst_alpha, 3); /* Then Calc RGB */ /* 0000000000000A0A -> rgb_src_alpha */ mm_src_alpha = _mm_unpacklo_epi16(mm_src_alpha, mm_src_alpha); /* 000000000A0A0A0A -> rgb_src_alpha */ mm_src_alpha = _mm_unpacklo_epi32(mm_src_alpha, mm_src_alpha); /* src(ARGB) -> src1 (000000000000ARGB) */ src1 = _mm_cvtsi32_si128(*srcp32); /* 000000000A0R0G0B -> src1 */ src1 = _mm_unpacklo_epi8(src1, mm_zero); /* dst(ARGB) -> dst1 (000000000000ARGB) */ dst1 = _mm_cvtsi32_si128(*dstp32); /* 000000000A0R0G0B -> dst1 */ dst1 = _mm_unpacklo_epi8(dst1, mm_zero); /* (srcRGB - dstRGB) */ sub_dst = _mm_sub_epi16(src1, dst1); /* (srcRGB - dstRGB) * srcA */ sub_dst = _mm_mullo_epi16(sub_dst, mm_src_alpha); /* (srcRGB - dstRGB) * srcA + srcRGB */ sub_dst = _mm_add_epi16(sub_dst, src1); /* (dstRGB << 8) */ dst1 = _mm_slli_epi16(dst1, 8); /* ((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) */ sub_dst = _mm_add_epi16(sub_dst, dst1); /* (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) * >> 8)*/ sub_dst = _mm_srli_epi16(sub_dst, 8); /* pack everything back into a pixel */ sub_dst = _mm_packus_epi16(sub_dst, mm_zero); sub_dst = _mm_and_si128(sub_dst, rgb_mask_128); /* add alpha to RGB */ sub_dst = _mm_add_epi16(mm_dst_alpha, sub_dst); *dstp32 = _mm_cvtsi128_si32(sub_dst); } ++srcp32; ++dstp32; }, n, width); srcp32 += srcskip; dstp32 += dstskip; } } } void alphablit_alpha_sse2_argb_no_surf_alpha_opaque_dst(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; int srcskip = info->s_skip >> 2; int dstskip = info->d_skip >> 2; Uint64 *srcp64 = (Uint64 *)info->s_pixels; Uint64 *dstp64 = (Uint64 *)info->d_pixels; Uint64 rgb_mask64 = 0x00FFFFFF00FFFFFF; Uint32 rgb_mask32 = 0x00FFFFFF; Uint32 *srcp32 = (Uint32 *)info->s_pixels; Uint32 *dstp32 = (Uint32 *)info->d_pixels; __m128i src1, dst1, sub_dst, mm_src_alpha, mm_zero, mm_rgb_mask; /* There are two paths through this blitter: 1. Two pixels at once. 2. One pixel at a time. */ if (((width % 2) == 0) && ((srcskip % 2) == 0) && ((dstskip % 2) == 0)) { width = width / 2; srcskip = srcskip / 2; dstskip = dstskip / 2; mm_zero = _mm_setzero_si128(); /* two pixels at a time */ LOAD_64_INTO_M128(&rgb_mask64, &mm_rgb_mask); while (height--) { LOOP_UNROLLED4( { /* src(ARGB) -> src1 (00000000ARGBARGB) */ LOAD_64_INTO_M128(srcp64, &src1); /* isolate alpha channels * 00000000A1000A2000 -> mm_src_alpha */ mm_src_alpha = _mm_andnot_si128(mm_rgb_mask, src1); /* shift right to position alpha channels for manipulation * 000000000A1000A200 -> mm_src_alpha*/ mm_src_alpha = _mm_srli_si128(mm_src_alpha, 1); /* shuffle alpha channels to duplicate 16 bit pairs * shuffle (3, 3, 1, 1) (backed 2 bit numbers) * [00][00][00][00][0A1][00][0A2][00] -> mm_src_alpha * [7 ][6 ][5 ][4 ][ 3 ][2 ][ 1 ][0 ] * Therefore the previous contents of 16 bit number #1 * Goes into 16 bit number #1 and #2, and the previous * content of 16 bit number #3 goes into #2 and #3 */ mm_src_alpha = _mm_shufflelo_epi16(mm_src_alpha, 0b11110101); /* finally move into final config * spread out so they can be multiplied in 16 bit math * against all RGBA of both pixels being blit * 0A10A10A10A10A20A20A20A2 -> mm_src_alpha */ mm_src_alpha = _mm_unpacklo_epi16(mm_src_alpha, mm_src_alpha); /* 0A0R0G0B0A0R0G0B -> src1 */ src1 = _mm_unpacklo_epi8(src1, mm_zero); /* dst(ARGB) -> dst1 (00000000ARGBARGB) */ LOAD_64_INTO_M128(dstp64, &dst1); /* 0A0R0G0B0A0R0G0B -> dst1 */ dst1 = _mm_unpacklo_epi8(dst1, mm_zero); /* (srcRGB - dstRGB) */ sub_dst = _mm_sub_epi16(src1, dst1); /* (srcRGB - dstRGB) * srcA */ sub_dst = _mm_mullo_epi16(sub_dst, mm_src_alpha); /* (srcRGB - dstRGB) * srcA + srcRGB */ sub_dst = _mm_add_epi16(sub_dst, src1); /* (dstRGB << 8) */ dst1 = _mm_slli_epi16(dst1, 8); /* ((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) */ sub_dst = _mm_add_epi16(sub_dst, dst1); /* (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> * 8)*/ sub_dst = _mm_srli_epi16(sub_dst, 8); /* pack everything back into a pixel with zeroed out alpha */ sub_dst = _mm_packus_epi16(sub_dst, mm_zero); sub_dst = _mm_and_si128(sub_dst, mm_rgb_mask); STORE_M128_INTO_64(&sub_dst, dstp64); ++srcp64; ++dstp64; }, n, width); srcp64 += srcskip; dstp64 += dstskip; } } else { /* one pixel at a time */ mm_zero = _mm_setzero_si128(); mm_rgb_mask = _mm_cvtsi32_si128(rgb_mask32); while (height--) { LOOP_UNROLLED4( { /* Do the actual blend */ /* src(ARGB) -> src1 (000000000000ARGB) */ src1 = _mm_cvtsi32_si128(*srcp32); /* src1 >> ashift -> mm_src_alpha(000000000000000A) */ mm_src_alpha = _mm_srli_si128(src1, 3); /* Then Calc RGB */ /* 0000000000000A0A -> rgb_src_alpha */ mm_src_alpha = _mm_unpacklo_epi16(mm_src_alpha, mm_src_alpha); /* 000000000A0A0A0A -> rgb_src_alpha */ mm_src_alpha = _mm_unpacklo_epi32(mm_src_alpha, mm_src_alpha); /* 000000000A0R0G0B -> src1 */ src1 = _mm_unpacklo_epi8(src1, mm_zero); /* dst(ARGB) -> dst1 (000000000000ARGB) */ dst1 = _mm_cvtsi32_si128(*dstp32); /* 000000000A0R0G0B -> dst1 */ dst1 = _mm_unpacklo_epi8(dst1, mm_zero); /* (srcRGB - dstRGB) */ sub_dst = _mm_sub_epi16(src1, dst1); /* (srcRGB - dstRGB) * srcA */ sub_dst = _mm_mullo_epi16(sub_dst, mm_src_alpha); /* (srcRGB - dstRGB) * srcA + srcRGB */ sub_dst = _mm_add_epi16(sub_dst, src1); /* (dstRGB << 8) */ dst1 = _mm_slli_epi16(dst1, 8); /* ((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) */ sub_dst = _mm_add_epi16(sub_dst, dst1); /* (((dstRGB << 8) + (srcRGB - dstRGB) * srcA + srcRGB) >> * 8)*/ sub_dst = _mm_srli_epi16(sub_dst, 8); /* pack everything back into a pixel */ sub_dst = _mm_packus_epi16(sub_dst, mm_zero); sub_dst = _mm_and_si128(sub_dst, mm_rgb_mask); /* reset alpha to 0 */ *dstp32 = _mm_cvtsi128_si32(sub_dst); ++srcp32; ++dstp32; }, n, width); srcp32 += srcskip; dstp32 += dstskip; } } } void blit_blend_rgba_mul_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; Uint64 *srcp64 = (Uint64 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; Uint64 *dstp64 = (Uint64 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_2_width = width % 2; int post_2_width = (width - pre_2_width) / 2; __m128i mm_src, mm_dst, mm_zero, mm_two_five_fives; mm_zero = _mm_setzero_si128(); mm_two_five_fives = _mm_set_epi64x(0x00FF00FF00FF00FF, 0x00FF00FF00FF00FF); while (height--) { if (pre_2_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); /*mm_src = 0x000000000000000000000000AARRGGBB*/ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_cvtsi32_si128(*dstp); /*mm_dst = 0x000000000000000000000000AARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x00000000AARRGGBB00000000AARRGGBB*/ *dstp = _mm_cvtsi128_si32(mm_dst); /*dstp = 0xAARRGGBB*/ srcp += srcpxskip; dstp += dstpxskip; }, n, pre_2_width); } srcp64 = (Uint64 *)srcp; dstp64 = (Uint64 *)dstp; if (post_2_width > 0) { LOOP_UNROLLED4( { LOAD_64_INTO_M128(srcp64, &mm_src); /*mm_src = 0x0000000000000000AARRGGBBAARRGGBB*/ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ LOAD_64_INTO_M128(dstp64, &mm_dst); /*mm_dst = 0x0000000000000000AARRGGBBAARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0xAAAARRRRGGGGBBBBAAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0xAAAARRRRGGGGBBBBAAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x00000000AARRGGBB00000000AARRGGBB*/ STORE_M128_INTO_64(&mm_dst, dstp64); /*dstp = 0xAARRGGBB*/ srcp64++; dstp64++; }, n, post_2_width); } srcp = (Uint32 *)srcp64 + srcskip; dstp = (Uint32 *)dstp64 + dstskip; } } void blit_blend_rgb_mul_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; Uint64 *srcp64 = (Uint64 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; Uint64 *dstp64 = (Uint64 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_2_width = width % 2; int post_2_width = (width - pre_2_width) / 2; /* if either surface has a non-zero alpha mask use that as our mask */ Uint32 amask = info->src->Amask | info->dst->Amask; Uint64 amask64 = (((Uint64)amask) << 32) | (Uint64)amask; __m128i mm_src, mm_dst, mm_zero, mm_two_five_fives, mm_alpha_mask; mm_zero = _mm_setzero_si128(); mm_two_five_fives = _mm_set_epi64x(0x00FF00FF00FF00FF, 0x00FF00FF00FF00FF); mm_alpha_mask = _mm_set_epi64x(0x0000000000000000, amask64); while (height--) { if (pre_2_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); /*mm_src = 0x000000000000000000000000AARRGGBB*/ mm_src = _mm_or_si128(mm_src, mm_alpha_mask); /* ensure source alpha is 255 */ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_cvtsi32_si128(*dstp); /*mm_dst = 0x000000000000000000000000AARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0x0000000000000000AAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x000000000000000000AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x000000000000000000000000AARRGGBB*/ *dstp = _mm_cvtsi128_si32(mm_dst); /*dstp = 0xAARRGGBB*/ srcp += srcpxskip; dstp += dstpxskip; }, n, pre_2_width); } srcp64 = (Uint64 *)srcp; dstp64 = (Uint64 *)dstp; if (post_2_width > 0) { LOOP_UNROLLED4( { LOAD_64_INTO_M128(srcp64, &mm_src); /*mm_src = 0x0000000000000000AARRGGBBAARRGGBB*/ mm_src = _mm_or_si128(mm_src, mm_alpha_mask); /* ensure source alpha is 255 */ mm_src = _mm_unpacklo_epi8(mm_src, mm_zero); /*mm_src = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ LOAD_64_INTO_M128(dstp64, &mm_dst); /*mm_dst = 0x0000000000000000AARRGGBBAARRGGBB*/ mm_dst = _mm_unpacklo_epi8(mm_dst, mm_zero); /*mm_dst = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ mm_dst = _mm_mullo_epi16(mm_src, mm_dst); /*mm_dst = 0xAAAARRRRGGGGBBBBAAAARRRRGGGGBBBB*/ mm_dst = _mm_add_epi16(mm_dst, mm_two_five_fives); /*mm_dst = 0xAAAARRRRGGGGBBBBAAAARRRRGGGGBBBB*/ mm_dst = _mm_srli_epi16(mm_dst, 8); /*mm_dst = 0x00AA00RR00GG00BB00AA00RR00GG00BB*/ mm_dst = _mm_packus_epi16(mm_dst, mm_dst); /*mm_dst = 0x00000000AARRGGBB00000000AARRGGBB*/ STORE_M128_INTO_64(&mm_dst, dstp64); /*dstp = 0xAARRGGBB*/ srcp64++; dstp64++; }, n, post_2_width); } srcp = (Uint32 *)srcp64 + srcskip; dstp = (Uint32 *)dstp64 + dstskip; } } void blit_blend_rgba_add_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i mm_src, mm_dst; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_adds_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_dst = _mm_adds_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgb_add_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; Uint32 amask = info->src->Amask | info->dst->Amask; __m128i mm_src, mm_dst, mm_alpha_mask; mm_alpha_mask = _mm_set_epi32(amask, amask, amask, amask); while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_adds_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_adds_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgba_sub_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i mm_src, mm_dst; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_subs_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_dst = _mm_subs_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgb_sub_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; Uint32 amask = info->src->Amask | info->dst->Amask; __m128i mm_src, mm_dst, mm_alpha_mask; mm_alpha_mask = _mm_set_epi32(amask, amask, amask, amask); while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_subs_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_subs_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgba_max_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i mm_src, mm_dst; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_max_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_dst = _mm_max_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgb_max_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; Uint32 amask = info->src->Amask | info->dst->Amask; __m128i mm_src, mm_dst, mm_alpha_mask; mm_alpha_mask = _mm_set_epi32(amask, amask, amask, amask); while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_max_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_src = _mm_subs_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_max_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgba_min_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i mm_src, mm_dst; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_dst = _mm_min_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_dst = _mm_min_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_rgb_min_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; int srcpxskip = info->s_pxskip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; int dstpxskip = info->d_pxskip >> 2; int pre_4_width = width % 4; int post_4_width = (width - pre_4_width) / 4; __m128i *srcp128 = (__m128i *)info->s_pixels; __m128i *dstp128 = (__m128i *)info->d_pixels; Uint32 amask = info->src->Amask | info->dst->Amask; __m128i mm_src, mm_dst, mm_alpha_mask; mm_alpha_mask = _mm_set_epi32(amask, amask, amask, amask); while (height--) { if (pre_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_cvtsi32_si128(*srcp); mm_dst = _mm_cvtsi32_si128(*dstp); mm_src = _mm_adds_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_min_epu8(mm_dst, mm_src); *dstp = _mm_cvtsi128_si32(mm_dst); srcp += srcpxskip; dstp += dstpxskip; }, n, pre_4_width); } srcp128 = (__m128i *)srcp; dstp128 = (__m128i *)dstp; if (post_4_width > 0) { LOOP_UNROLLED4( { mm_src = _mm_loadu_si128(srcp128); mm_dst = _mm_loadu_si128(dstp128); mm_src = _mm_adds_epu8(mm_src, mm_alpha_mask); mm_dst = _mm_min_epu8(mm_dst, mm_src); _mm_storeu_si128(dstp128, mm_dst); srcp128++; dstp128++; }, n, post_4_width); } srcp = (Uint32 *)srcp128 + srcskip; dstp = (Uint32 *)dstp128 + dstskip; } } void blit_blend_premultiplied_sse2(SDL_BlitInfo *info) { int n; int width = info->width; int height = info->height; Uint32 *srcp = (Uint32 *)info->s_pixels; int srcskip = info->s_skip >> 2; Uint32 *dstp = (Uint32 *)info->d_pixels; int dstskip = info->d_skip >> 2; SDL_PixelFormat *srcfmt = info->src; Uint32 amask = srcfmt->Amask; // Uint64 multmask; Uint64 ones; // __m128i multmask_128; __m128i src1, dst1, sub_dst, mm_alpha, mm_zero, ones_128; mm_zero = _mm_setzero_si128(); // multmask = 0x00FF00FF00FF00FF; // 0F0F0F0F // multmask_128 = _mm_loadl_epi64((const __m128i *)&multmask); ones = 0x0001000100010001; ones_128 = _mm_loadl_epi64((const __m128i *)&ones); while (height--) { /* *INDENT-OFF* */ LOOP_UNROLLED4( { Uint32 alpha = *srcp & amask; if (alpha == 0) { /* do nothing */ } else if (alpha == amask) { *dstp = *srcp; } else { src1 = _mm_cvtsi32_si128( *srcp); /* src(ARGB) -> src1 (000000000000ARGB) */ src1 = _mm_unpacklo_epi8( src1, mm_zero); /* 000000000A0R0G0B -> src1 */ dst1 = _mm_cvtsi32_si128( *dstp); /* dst(ARGB) -> dst1 (000000000000ARGB) */ dst1 = _mm_unpacklo_epi8( dst1, mm_zero); /* 000000000A0R0G0B -> dst1 */ mm_alpha = _mm_cvtsi32_si128( alpha); /* alpha -> mm_alpha (000000000000A000) */ mm_alpha = _mm_srli_si128( mm_alpha, 3); /* mm_alpha >> ashift -> mm_alpha(000000000000000A) */ mm_alpha = _mm_unpacklo_epi16( mm_alpha, mm_alpha); /* 0000000000000A0A -> mm_alpha */ mm_alpha = _mm_unpacklo_epi32( mm_alpha, mm_alpha); /* 000000000A0A0A0A -> mm_alpha2 */ /* pre-multiplied alpha blend */ sub_dst = _mm_add_epi16(dst1, ones_128); sub_dst = _mm_mullo_epi16(sub_dst, mm_alpha); sub_dst = _mm_srli_epi16(sub_dst, 8); dst1 = _mm_add_epi16(src1, dst1); dst1 = _mm_sub_epi16(dst1, sub_dst); dst1 = _mm_packus_epi16(dst1, mm_zero); *dstp = _mm_cvtsi128_si32(dst1); } ++srcp; ++dstp; }, n, width); /* *INDENT-ON* */ srcp += srcskip; dstp += dstskip; } } #endif /* (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON)) */ #if defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON) void premul_surf_color_by_alpha_sse2(SDL_Surface *src, SDL_Surface *dst) { int n; int width = src->w; int height = src->h; Uint32 *srcp = (Uint32 *)src->pixels; Uint32 *dstp = (Uint32 *)dst->pixels; SDL_PixelFormat *srcfmt = src->format; Uint32 amask = srcfmt->Amask; Uint64 ones; __m128i src1, dst1, rgb_mul_src, mm_alpha, mm_alpha_in, mm_zero, ones_128; mm_zero = _mm_setzero_si128(); ones = 0x0001000100010001; ones_128 = _mm_loadl_epi64((const __m128i *)&ones); while (height--) { /* *INDENT-OFF* */ LOOP_UNROLLED4( { Uint32 alpha = *srcp & amask; if (alpha == amask) { *dstp = *srcp; } else { /* extract source pixels */ src1 = _mm_cvtsi32_si128( *srcp); /* src(ARGB) -> src1 (000000000000ARGB) */ src1 = _mm_unpacklo_epi8( src1, mm_zero); /* 000000000A0R0G0B -> src1 */ /* extract source alpha and copy to r, g, b channels */ mm_alpha_in = _mm_cvtsi32_si128( alpha); /* alpha -> mm_alpha (000000000000A000) */ mm_alpha = _mm_srli_si128( mm_alpha_in, 3); /* mm_alpha >> ashift -> mm_alpha(000000000000000A) */ mm_alpha = _mm_unpacklo_epi16( mm_alpha, mm_alpha); /* 0000000000000A0A -> mm_alpha */ mm_alpha = _mm_unpacklo_epi32( mm_alpha, mm_alpha); /* 000000000A0A0A0A -> mm_alpha2 */ /* rgb alpha multiply */ rgb_mul_src = _mm_add_epi16(src1, ones_128); rgb_mul_src = _mm_mullo_epi16(rgb_mul_src, mm_alpha); rgb_mul_src = _mm_srli_epi16(rgb_mul_src, 8); dst1 = _mm_packus_epi16(rgb_mul_src, mm_zero); dst1 = _mm_max_epu8(mm_alpha_in, dst1); /* restore original alpha */ *dstp = _mm_cvtsi128_si32(dst1); } ++srcp; ++dstp; }, n, width); } } #endif /* __SSE2__ || PG_ENABLE_ARM_NEON*/ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.015112 pygame-2.6.1/src_c/static.c0000644000175100001770000001376314676242340015155 0ustar00runnerdocker#define NO_PYGAME_C_API #define PYGAMEAPI_RECT_INTERNAL #define PYGAMEAPI_EVENT_INTERNAL #define PYGAMEAPI_JOYSTICK_INTERNAL #define PYGAMEAPI_BASE_INTERNAL #define PYGAMEAPI_SURFACE_INTERNAL #define pgSurface_New(surface) (pgSurfaceObject *)pgSurface_New2((surface), 1) #define pgSurface_NewNoOwn(surface) \ (pgSurfaceObject *)pgSurface_New2((surface), 0) #include "pygame.h" #include "Python.h" #if defined(__EMSCRIPTEN__) #undef WITH_THREAD #endif #if defined(BUILD_STATIC) #undef import_pygame_base #undef import_pygame_rect #undef import_pygame_surface #undef import_pygame_color #undef import_pygame_bufferproxy #undef import_pygame_rwobject #undef import_pygame_event void import_pygame_base(void) { } void import_pygame_rect(void) { } void import_pygame_surface(void) { } void import_pygame_color(void) { } void import_pygame_bufferproxy(void) { } void import_pygame_rwobject(void) { } void import_pygame_event(void) { } void import_pygame_joystick(void) { } PyMODINIT_FUNC PyInit_base(void); PyMODINIT_FUNC PyInit_color(void); PyMODINIT_FUNC PyInit_constants(void); PyMODINIT_FUNC PyInit_version(void); PyMODINIT_FUNC PyInit_rect(void); PyMODINIT_FUNC PyInit_surflock(void); PyMODINIT_FUNC PyInit_rwobject(void); PyMODINIT_FUNC PyInit_bufferproxy(void); PyMODINIT_FUNC PyInit_surface(void); PyMODINIT_FUNC PyInit_display(void); PyMODINIT_FUNC PyInit__freetype(void); PyMODINIT_FUNC PyInit_font(void); PyMODINIT_FUNC PyInit_draw(void); PyMODINIT_FUNC PyInit_mouse(void); PyMODINIT_FUNC PyInit_key(void); PyMODINIT_FUNC PyInit_event(void); PyMODINIT_FUNC PyInit_joystick(void); PyMODINIT_FUNC PyInit_imageext(void); PyMODINIT_FUNC PyInit_image(void); PyMODINIT_FUNC PyInit_mask(void); PyMODINIT_FUNC PyInit_mixer_music(void); PyMODINIT_FUNC PyInit_pg_mixer(void); PyMODINIT_FUNC PyInit_pg_math(void); PyMODINIT_FUNC PyInit_pg_time(void); PyMODINIT_FUNC PyInit_sdl2(void); PyMODINIT_FUNC PyInit_mixer(void); PyMODINIT_FUNC PyInit_context(void); PyMODINIT_FUNC PyInit_controller(void); PyMODINIT_FUNC PyInit_transform(void); PyMODINIT_FUNC PyInit_video(void); PyMODINIT_FUNC PyInit__sprite(void); PyMODINIT_FUNC PyInit_pixelcopy(void); PyMODINIT_FUNC PyInit_gfxdraw(void); void PyGame_static_init() { PyImport_AppendInittab("pygame_base", PyInit_base); PyImport_AppendInittab("pygame_color", PyInit_color); PyImport_AppendInittab("pygame_constants", PyInit_constants); PyImport_AppendInittab("pygame_rect", PyInit_rect); PyImport_AppendInittab("pygame_surflock", PyInit_surflock); PyImport_AppendInittab("pygame_rwobject", PyInit_rwobject); PyImport_AppendInittab("pygame_bufferproxy", PyInit_bufferproxy); PyImport_AppendInittab("pygame_math", PyInit_pg_math); PyImport_AppendInittab("pygame_surface", PyInit_surface); PyImport_AppendInittab("pygame_pixelcopy", PyInit_pixelcopy); PyImport_AppendInittab("pygame_transform", PyInit_transform); PyImport_AppendInittab("pygame_display", PyInit_display); PyImport_AppendInittab("pygame__freetype", PyInit__freetype); PyImport_AppendInittab("pygame_font", PyInit_font); PyImport_AppendInittab("pygame_draw", PyInit_draw); PyImport_AppendInittab("pygame_gfxdraw", PyInit_gfxdraw); PyImport_AppendInittab("pygame_imageext", PyInit_imageext); PyImport_AppendInittab("pygame_image", PyInit_image); PyImport_AppendInittab("pygame_mask", PyInit_mask); PyImport_AppendInittab("pygame_mixer_music", PyInit_mixer_music); PyImport_AppendInittab("pygame_mixer", PyInit_pg_mixer); PyImport_AppendInittab("pygame_mouse", PyInit_mouse); PyImport_AppendInittab("pygame_key", PyInit_key); PyImport_AppendInittab("pygame_event", PyInit_event); PyImport_AppendInittab("pygame_joystick", PyInit_joystick); PyImport_AppendInittab("pygame_time", PyInit_pg_time); PyImport_AppendInittab("pygame_sdl2_video", PyInit_video); PyImport_AppendInittab("pygame_context", PyInit_context); PyImport_AppendInittab("pygame_sprite", PyInit__sprite); PyImport_AppendInittab("pygame__sdl2_sdl2", PyInit_sdl2); PyImport_AppendInittab("pygame__sdl2_sdl2_mixer", PyInit_mixer); PyImport_AppendInittab("pygame__sdl2_controller", PyInit_controller); } #endif // defined(BUILD_STATIC) #include "base.c" #include "rect.c" #undef pgSurface_Lock #undef pgSurface_Unlock #undef pgSurface_LockBy #undef pgSurface_UnlockBy #undef pgSurface_Prep #undef pgSurface_Unprep #undef pgLifetimeLock_Type #undef pgSurface_LockLifetime #include "surflock.c" #undef pgColor_New #undef pgColor_NewLength #undef pg_RGBAFromColorObj #undef pg_RGBAFromFuzzyColorObj #undef pgColor_Type #include "color.c" #undef pgBufproxy_New #include "bufferproxy.c" #undef pgSurface_Blit #undef pgSurface_New #undef pgSurface_Type #undef pgSurface_SetSurface #include "surface.c" #undef pgVidInfo_Type #undef pgVidInfo_New #include "display.c" #include "draw.c" #undef pg_EncodeString #undef pg_EncodeFilePath #undef pgRWops_IsFileObject #undef pgRWops_GetFileExtension #undef pgRWops_FromFileObject #undef pgRWops_ReleaseObject #undef pgRWops_FromObject #include "rwobject.c" #define pgSurface_New(surface) (pgSurfaceObject *)pgSurface_New2((surface), 1) #include "image.c" #include "imageext.c" #include "mask.c" #undef pg_EnableKeyRepeat #undef pg_GetKeyRepeat #undef pgEvent_FillUserEvent #undef pgEvent_Type #undef pgEvent_New #include "event.c" #include "mouse.c" #include "key.c" #include "joystick.c" #include "time.c" #include "_freetype.c" #include "freetype/ft_wrap.c" #include "freetype/ft_render.c" #include "freetype/ft_render_cb.c" #include "freetype/ft_cache.c" #include "freetype/ft_layout.c" #include "freetype/ft_unicode.c" #undef DOC_FONTUNDERLINE #undef DOC_FONTRENDER #undef DOC_FONTSIZE #include "font.c" #include "mixer.c" #include "music.c" #include "gfxdraw.c" #include "alphablit.c" #include "surface_fill.c" #include "pixelarray.c" #include "pixelcopy.c" #include "newbuffer.c" #include "_sdl2/controller.c" #include "_sdl2/touch.c" #include "transform.c" // that remove some warnings #undef MAX #undef MIN #include "scale2x.c" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/surface.c0000644000175100001770000035057214676242340015320 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #define PYGAMEAPI_SURFACE_INTERNAL #include "surface.h" #include "palette.h" #include "structmember.h" #include "pgcompat.h" #include "doc/surface_doc.h" #include "pgbufferproxy.h" /* stdint.h is missing from some versions of MSVC. */ #ifdef _MSC_VER #ifndef UINT32_MAX #define UINT32_MAX 0xFFFFFFFF #endif #else #include #endif /* _MSC_VER */ typedef enum { VIEWKIND_0D = 0, VIEWKIND_1D = 1, VIEWKIND_2D = 2, VIEWKIND_3D = 3, VIEWKIND_RED, VIEWKIND_GREEN, VIEWKIND_BLUE, VIEWKIND_ALPHA } SurfViewKind; /* To avoid problems with non-const Py_buffer format field */ static char FormatUint8[] = "B"; static char FormatUint16[] = "=H"; static char FormatUint24[] = "3x"; static char FormatUint32[] = "=I"; typedef struct pg_bufferinternal_s { PyObject *consumer_ref; /* A weak reference to a bufferproxy object */ Py_ssize_t mem[6]; /* Enough memory for dim 3 shape and strides */ } pg_bufferinternal; /* copy of SDL Blit mapping definitions to enable pointer casting hack for checking state of the SDL_COPY_RLE_DESIRED flag */ #define PGS_COPY_RLE_DESIRED 0x00001000 typedef struct { Uint8 *src; int src_w, src_h; int src_pitch; int src_skip; Uint8 *dst; int dst_w, dst_h; int dst_pitch; int dst_skip; SDL_PixelFormat *src_fmt; SDL_PixelFormat *dst_fmt; Uint8 *table; int flags; Uint32 colorkey; Uint8 r, g, b, a; } pg_BlitInfo; typedef struct pg_BlitMap { SDL_Surface *dst; int identity; SDL_blit blit; void *data; pg_BlitInfo info; /* the version count matches the destination; mismatch indicates an invalid mapping */ Uint32 dst_palette_version; Uint32 src_palette_version; } pg_BlitMap; /* end PGS_COPY_RLE_DESIRED hack definitions */ int pgSurface_Blit(pgSurfaceObject *dstobj, pgSurfaceObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args); /* statics */ static pgSurfaceObject * pgSurface_New2(SDL_Surface *info, int owner); static PyObject * surf_subtype_new(PyTypeObject *type, SDL_Surface *s, int owner); static PyObject * surface_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static intptr_t surface_init(pgSurfaceObject *self, PyObject *args, PyObject *kwds); static PyObject * surface_str(PyObject *self); static void surface_dealloc(PyObject *self); static void surface_cleanup(pgSurfaceObject *self); static void surface_move(Uint8 *src, Uint8 *dst, int h, int span, int srcpitch, int dstpitch); static PyObject * surf_get_at(PyObject *self, PyObject *args); static PyObject * surf_set_at(PyObject *self, PyObject *args); static PyObject * surf_get_at_mapped(PyObject *self, PyObject *args); static PyObject * surf_map_rgb(PyObject *self, PyObject *args); static PyObject * surf_unmap_rgb(PyObject *self, PyObject *arg); static PyObject * surf_lock(PyObject *self, PyObject *args); static PyObject * surf_unlock(PyObject *self, PyObject *args); static PyObject * surf_mustlock(PyObject *self, PyObject *args); static PyObject * surf_get_locked(PyObject *self, PyObject *args); static PyObject * surf_get_locks(PyObject *self, PyObject *args); static PyObject * surf_get_palette(PyObject *self, PyObject *args); static PyObject * surf_get_palette_at(PyObject *self, PyObject *args); static PyObject * surf_set_palette(PyObject *self, PyObject *seq); static PyObject * surf_set_palette_at(PyObject *self, PyObject *args); static PyObject * surf_set_colorkey(pgSurfaceObject *self, PyObject *args); static PyObject * surf_get_colorkey(pgSurfaceObject *self, PyObject *args); static PyObject * surf_set_alpha(pgSurfaceObject *self, PyObject *args); static PyObject * surf_get_alpha(pgSurfaceObject *self, PyObject *args); static PyObject * surf_get_blendmode(PyObject *self, PyObject *args); static PyObject * surf_copy(pgSurfaceObject *self, PyObject *args); static PyObject * surf_convert(pgSurfaceObject *self, PyObject *args); static PyObject * surf_convert_alpha(pgSurfaceObject *self, PyObject *args); static PyObject * surf_set_clip(PyObject *self, PyObject *args); static PyObject * surf_get_clip(PyObject *self, PyObject *args); static PyObject * surf_blit(pgSurfaceObject *self, PyObject *args, PyObject *keywds); static PyObject * surf_blits(pgSurfaceObject *self, PyObject *args, PyObject *keywds); static PyObject * surf_fill(pgSurfaceObject *self, PyObject *args, PyObject *keywds); static PyObject * surf_scroll(PyObject *self, PyObject *args, PyObject *keywds); static PyObject * surf_get_abs_offset(PyObject *self, PyObject *args); static PyObject * surf_get_abs_parent(PyObject *self, PyObject *args); static PyObject * surf_get_bitsize(PyObject *self, PyObject *args); static PyObject * surf_get_bytesize(PyObject *self, PyObject *args); static PyObject * surf_get_flags(PyObject *self, PyObject *args); static PyObject * surf_get_height(PyObject *self, PyObject *args); static PyObject * surf_get_pitch(PyObject *self, PyObject *args); static PyObject * surf_get_rect(PyObject *self, PyObject *args, PyObject *kwargs); static PyObject * surf_get_width(PyObject *self, PyObject *args); static PyObject * surf_get_shifts(PyObject *self, PyObject *args); static PyObject * surf_set_shifts(PyObject *self, PyObject *args); static PyObject * surf_get_size(PyObject *self, PyObject *args); static PyObject * surf_get_losses(PyObject *self, PyObject *args); static PyObject * surf_get_masks(PyObject *self, PyObject *args); static PyObject * surf_set_masks(PyObject *self, PyObject *args); static PyObject * surf_get_offset(PyObject *self, PyObject *args); static PyObject * surf_get_parent(PyObject *self, PyObject *args); static PyObject * surf_subsurface(PyObject *self, PyObject *args); static PyObject * surf_get_view(PyObject *self, PyObject *args); static PyObject * surf_get_buffer(PyObject *self, PyObject *args); static PyObject * surf_get_bounding_rect(PyObject *self, PyObject *args, PyObject *kwargs); static PyObject * surf_get_pixels_address(PyObject *self, PyObject *closure); static PyObject * surf_premul_alpha(pgSurfaceObject *self, PyObject *args); static int _view_kind(PyObject *obj, void *view_kind_vptr); static int _get_buffer_0D(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_1D(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_2D(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_3D(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_red(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_green(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_blue(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_alpha(PyObject *obj, Py_buffer *view_p, int flags); static int _get_buffer_colorplane(PyObject *obj, Py_buffer *view_p, int flags, char *name, Uint32 mask); static int _init_buffer(PyObject *surf, Py_buffer *view_p, int flags); static void _release_buffer(Py_buffer *view_p); static PyObject * _raise_get_view_ndim_error(int bitsize, SurfViewKind kind); static PyObject * _raise_create_surface_error(void); static SDL_Surface * pg_DisplayFormatAlpha(SDL_Surface *surface); static SDL_Surface * pg_DisplayFormat(SDL_Surface *surface); static int _PgSurface_SrcAlpha(SDL_Surface *surf); #if !SDL_VERSION_ATLEAST(2, 0, 10) static Uint32 pg_map_rgb(SDL_Surface *surf, Uint8 r, Uint8 g, Uint8 b) { /* SDL_MapRGB() returns wrong values for color keys for indexed formats since since alpha = 0 */ Uint32 key; if (!surf->format->palette) return SDL_MapRGB(surf->format, r, g, b); if (!SDL_GetColorKey(surf, &key)) { Uint8 keyr, keyg, keyb; SDL_GetRGB(key, surf->format, &keyr, &keyg, &keyb); if (r == keyr && g == keyg && b == keyb) return key; } else SDL_ClearError(); return SDL_MapRGBA(surf->format, r, g, b, SDL_ALPHA_OPAQUE); } static Uint32 pg_map_rgba(SDL_Surface *surf, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { if (!surf->format->palette) return SDL_MapRGBA(surf->format, r, g, b, a); return pg_map_rgb(surf, r, g, b); } #else /* SDL_VERSION_ATLEAST(2, 0, 10) */ #define pg_map_rgb(surf, r, g, b) SDL_MapRGB((surf)->format, (r), (g), (b)) #define pg_map_rgba(surf, r, g, b, a) \ SDL_MapRGBA((surf)->format, (r), (g), (b), (a)) #endif /* SDL_VERSION_ATLEAST(2, 0, 10) */ static PyGetSetDef surface_getsets[] = { {"_pixels_address", (getter)surf_get_pixels_address, NULL, "pixel buffer address (readonly)", NULL}, {NULL, NULL, NULL, NULL, NULL}}; static struct PyMethodDef surface_methods[] = { {"get_at", surf_get_at, METH_VARARGS, DOC_SURFACEGETAT}, {"set_at", surf_set_at, METH_VARARGS, DOC_SURFACESETAT}, {"get_at_mapped", surf_get_at_mapped, METH_VARARGS, DOC_SURFACEGETATMAPPED}, {"map_rgb", surf_map_rgb, METH_VARARGS, DOC_SURFACEMAPRGB}, {"unmap_rgb", surf_unmap_rgb, METH_O, DOC_SURFACEUNMAPRGB}, {"get_palette", surf_get_palette, METH_NOARGS, DOC_SURFACEGETPALETTE}, {"get_palette_at", surf_get_palette_at, METH_VARARGS, DOC_SURFACEGETPALETTEAT}, {"set_palette", surf_set_palette, METH_O, DOC_SURFACESETPALETTE}, {"set_palette_at", surf_set_palette_at, METH_VARARGS, DOC_SURFACESETPALETTEAT}, {"lock", surf_lock, METH_NOARGS, DOC_SURFACELOCK}, {"unlock", surf_unlock, METH_NOARGS, DOC_SURFACEUNLOCK}, {"mustlock", surf_mustlock, METH_NOARGS, DOC_SURFACEMUSTLOCK}, {"get_locked", surf_get_locked, METH_NOARGS, DOC_SURFACEGETLOCKED}, {"get_locks", surf_get_locks, METH_NOARGS, DOC_SURFACEGETLOCKS}, {"set_colorkey", (PyCFunction)surf_set_colorkey, METH_VARARGS, DOC_SURFACESETCOLORKEY}, {"get_colorkey", (PyCFunction)surf_get_colorkey, METH_NOARGS, DOC_SURFACEGETCOLORKEY}, {"set_alpha", (PyCFunction)surf_set_alpha, METH_VARARGS, DOC_SURFACESETALPHA}, {"get_alpha", (PyCFunction)surf_get_alpha, METH_NOARGS, DOC_SURFACEGETALPHA}, {"get_blendmode", surf_get_blendmode, METH_NOARGS, "Return the surface's SDL 2 blend mode"}, {"copy", (PyCFunction)surf_copy, METH_NOARGS, DOC_SURFACECOPY}, {"__copy__", (PyCFunction)surf_copy, METH_NOARGS, DOC_SURFACECOPY}, {"convert", (PyCFunction)surf_convert, METH_VARARGS, DOC_SURFACECONVERT}, {"convert_alpha", (PyCFunction)surf_convert_alpha, METH_VARARGS, DOC_SURFACECONVERTALPHA}, {"set_clip", surf_set_clip, METH_VARARGS, DOC_SURFACESETCLIP}, {"get_clip", surf_get_clip, METH_NOARGS, DOC_SURFACEGETCLIP}, {"fill", (PyCFunction)surf_fill, METH_VARARGS | METH_KEYWORDS, DOC_SURFACEFILL}, {"blit", (PyCFunction)surf_blit, METH_VARARGS | METH_KEYWORDS, DOC_SURFACEBLIT}, {"blits", (PyCFunction)surf_blits, METH_VARARGS | METH_KEYWORDS, DOC_SURFACEBLITS}, {"scroll", (PyCFunction)surf_scroll, METH_VARARGS | METH_KEYWORDS, DOC_SURFACESCROLL}, {"get_flags", surf_get_flags, METH_NOARGS, DOC_SURFACEGETFLAGS}, {"get_size", surf_get_size, METH_NOARGS, DOC_SURFACEGETSIZE}, {"get_width", surf_get_width, METH_NOARGS, DOC_SURFACEGETWIDTH}, {"get_height", surf_get_height, METH_NOARGS, DOC_SURFACEGETHEIGHT}, {"get_rect", (PyCFunction)surf_get_rect, METH_VARARGS | METH_KEYWORDS, DOC_SURFACEGETRECT}, {"get_pitch", surf_get_pitch, METH_NOARGS, DOC_SURFACEGETPITCH}, {"get_bitsize", surf_get_bitsize, METH_NOARGS, DOC_SURFACEGETBITSIZE}, {"get_bytesize", surf_get_bytesize, METH_NOARGS, DOC_SURFACEGETBYTESIZE}, {"get_masks", surf_get_masks, METH_NOARGS, DOC_SURFACEGETMASKS}, {"get_shifts", surf_get_shifts, METH_NOARGS, DOC_SURFACEGETSHIFTS}, {"set_masks", surf_set_masks, METH_VARARGS, DOC_SURFACESETMASKS}, {"set_shifts", surf_set_shifts, METH_VARARGS, DOC_SURFACESETSHIFTS}, {"get_losses", surf_get_losses, METH_NOARGS, DOC_SURFACEGETLOSSES}, {"subsurface", surf_subsurface, METH_VARARGS, DOC_SURFACESUBSURFACE}, {"get_offset", surf_get_offset, METH_NOARGS, DOC_SURFACEGETOFFSET}, {"get_abs_offset", surf_get_abs_offset, METH_NOARGS, DOC_SURFACEGETABSOFFSET}, {"get_parent", surf_get_parent, METH_NOARGS, DOC_SURFACEGETPARENT}, {"get_abs_parent", surf_get_abs_parent, METH_NOARGS, DOC_SURFACEGETABSPARENT}, {"get_bounding_rect", (PyCFunction)surf_get_bounding_rect, METH_VARARGS | METH_KEYWORDS, DOC_SURFACEGETBOUNDINGRECT}, {"get_view", surf_get_view, METH_VARARGS, DOC_SURFACEGETVIEW}, {"get_buffer", surf_get_buffer, METH_NOARGS, DOC_SURFACEGETBUFFER}, {"premul_alpha", (PyCFunction)surf_premul_alpha, METH_NOARGS, DOC_SURFACEPREMULALPHA}, {NULL, NULL, 0, NULL}}; static PyTypeObject pgSurface_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.surface.Surface", .tp_basicsize = sizeof(pgSurfaceObject), .tp_dealloc = surface_dealloc, .tp_repr = surface_str, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_PYGAMESURFACE, .tp_weaklistoffset = offsetof(pgSurfaceObject, weakreflist), .tp_methods = surface_methods, .tp_getset = surface_getsets, .tp_init = (initproc)surface_init, .tp_new = surface_new, }; #define pgSurface_Check(x) \ (PyObject_IsInstance((x), (PyObject *)&pgSurface_Type)) static pgSurfaceObject * pgSurface_New2(SDL_Surface *s, int owner) { return (pgSurfaceObject *)surf_subtype_new(&pgSurface_Type, s, owner); } static int pgSurface_SetSurface(pgSurfaceObject *self, SDL_Surface *s, int owner) { if (!s) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } if (s == self->surf) { self->owner = owner; return 0; } surface_cleanup(self); self->surf = s; self->owner = owner; return 0; } static PyObject * surf_subtype_new(PyTypeObject *type, SDL_Surface *s, int owner) { pgSurfaceObject *self; if (!s) return RAISE(pgExc_SDLError, SDL_GetError()); self = (pgSurfaceObject *)pgSurface_Type.tp_new(type, NULL, NULL); if (pgSurface_SetSurface(self, s, owner)) return NULL; return (PyObject *)self; } static PyObject * surface_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { pgSurfaceObject *self; self = (pgSurfaceObject *)type->tp_alloc(type, 0); if (self) { self->surf = NULL; self->owner = 0; self->subsurface = NULL; self->weakreflist = NULL; self->dependency = NULL; self->locklist = NULL; } return (PyObject *)self; } /* surface object internals */ static void surface_cleanup(pgSurfaceObject *self) { if (self->surf && self->owner) { SDL_FreeSurface(self->surf); self->surf = NULL; } if (self->subsurface) { Py_XDECREF(self->subsurface->owner); PyMem_Free(self->subsurface); self->subsurface = NULL; } if (self->dependency) { Py_DECREF(self->dependency); self->dependency = NULL; } if (self->locklist) { Py_DECREF(self->locklist); self->locklist = NULL; } self->owner = 0; } static void surface_dealloc(PyObject *self) { if (((pgSurfaceObject *)self)->weakreflist) PyObject_ClearWeakRefs(self); surface_cleanup((pgSurfaceObject *)self); Py_TYPE(self)->tp_free(self); } static PyObject * surface_str(PyObject *self) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) { return PyUnicode_FromString(""); } return PyUnicode_FromFormat("", surf->w, surf->h, surf->format->BitsPerPixel); } static intptr_t surface_init(pgSurfaceObject *self, PyObject *args, PyObject *kwds) { Uint32 flags = 0; int width, height; PyObject *depth = NULL, *masks = NULL, *size = NULL; int bpp; Uint32 Rmask, Gmask, Bmask, Amask; SDL_Surface *surface; SDL_PixelFormat default_format; char *kwids[] = {"size", "flags", "depth", "masks", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|iOO", kwids, &size, &flags, &depth, &masks)) return -1; if (PySequence_Check(size) && PySequence_Length(size) == 2) { if ((!pg_IntFromObjIndex(size, 0, &width)) || (!pg_IntFromObjIndex(size, 1, &height))) { PyErr_SetString(PyExc_ValueError, "size needs to be (number width, number height)"); return -1; } } else { PyErr_SetString(PyExc_ValueError, "size needs to be (number width, number height)"); return -1; } if (width < 0 || height < 0) { PyErr_SetString(pgExc_SDLError, "Invalid resolution for Surface"); return -1; } default_format.palette = NULL; surface_cleanup(self); if (depth && masks) { /* all info supplied, most errorchecking * needed */ if (pgSurface_Check(depth)) { PyErr_SetString(PyExc_ValueError, "cannot pass surface for depth and color masks"); return -1; } if (!pg_IntFromObj(depth, &bpp)) { PyErr_SetString(PyExc_ValueError, "invalid bits per pixel depth argument"); return -1; } if (!PySequence_Check(masks) || PySequence_Length(masks) != 4) { PyErr_SetString(PyExc_ValueError, "masks argument must be sequence of four numbers"); return -1; } if (!pg_UintFromObjIndex(masks, 0, &Rmask) || !pg_UintFromObjIndex(masks, 1, &Gmask) || !pg_UintFromObjIndex(masks, 2, &Bmask) || !pg_UintFromObjIndex(masks, 3, &Amask)) { PyErr_SetString(PyExc_ValueError, "invalid mask values in masks sequence"); return -1; } } else if (depth && PyNumber_Check(depth)) { /* use default masks */ if (!pg_IntFromObj(depth, &bpp)) { PyErr_SetString(PyExc_ValueError, "invalid bits per pixel depth argument"); return -1; } if (flags & PGS_SRCALPHA) { switch (bpp) { case 16: Rmask = 0xF << 8; Gmask = 0xF << 4; Bmask = 0xF; Amask = 0xF << 12; break; case 32: Rmask = 0xFF << 16; Gmask = 0xFF << 8; Bmask = 0xFF; Amask = 0xFF << 24; break; default: PyErr_SetString( PyExc_ValueError, "no standard masks exist for given bitdepth with " "alpha"); return -1; } } else { Amask = 0; switch (bpp) { case 8: Rmask = 0; Gmask = 0; Bmask = 0; break; case 12: Rmask = 0xFF >> 4 << 8; Gmask = 0xFF >> 4 << 4; Bmask = 0xFF >> 4; break; case 15: Rmask = 0xFF >> 3 << 10; Gmask = 0xFF >> 3 << 5; Bmask = 0xFF >> 3; break; case 16: Rmask = 0xFF >> 3 << 11; Gmask = 0xFF >> 2 << 5; Bmask = 0xFF >> 3; break; case 24: case 32: Rmask = 0xFF << 16; Gmask = 0xFF << 8; Bmask = 0xFF; break; default: PyErr_SetString(PyExc_ValueError, "nonstandard bit depth given"); return -1; } } } else { /* no depth or surface */ SDL_PixelFormat *pix; if (depth && pgSurface_Check(depth)) pix = ((pgSurfaceObject *)depth)->surf->format; else if (pg_GetDefaultWindowSurface()) pix = pgSurface_AsSurface(pg_GetDefaultWindowSurface())->format; else { pix = &default_format; pix->BitsPerPixel = 32; pix->Amask = 0; pix->Rmask = 0xFF0000; pix->Gmask = 0xFF00; pix->Bmask = 0xFF; } bpp = pix->BitsPerPixel; if (flags & PGS_SRCALPHA) { switch (bpp) { case 16: Rmask = 0xF << 8; Gmask = 0xF << 4; Bmask = 0xF; Amask = 0xF << 12; break; case 24: bpp = 32; // we automatically step up to 32 if video is 24, fall // through to case below case 32: Rmask = 0xFF << 16; Gmask = 0xFF << 8; Bmask = 0xFF; Amask = 0xFF << 24; break; default: PyErr_SetString( PyExc_ValueError, "no standard masks exist for given bitdepth with " "alpha"); return -1; } } else { Rmask = pix->Rmask; Gmask = pix->Gmask; Bmask = pix->Bmask; Amask = pix->Amask; } } surface = SDL_CreateRGBSurface(0, width, height, bpp, Rmask, Gmask, Bmask, Amask); if (!surface) { _raise_create_surface_error(); return -1; } if (!(flags & PGS_SRCALPHA)) { /* We ignore the error if any. */ SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE); /* When the display format has a full alpha channel (MacOS right now), * Surfaces may be created with an unreqested alpha channel, which * could cause issues. * pygame Surfaces are supposed to be (0, 0, 0, 255) by default. * This is a simple fix to fill it with (0, 0, 0, 255) if necessary. * See Github issue: https://github.com/pygame/pygame/issues/1395 */ if (Amask != 0) { SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 255)); } } if (SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { /* Give the surface something other than an all white palette. * */ if (SDL_SetPaletteColors(surface->format->palette, default_palette_colors, 0, default_palette_size - 1) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(surface); return -1; } } if (surface) { self->surf = surface; self->owner = 1; self->subsurface = NULL; } return 0; } static PyObject * _raise_create_surface_error(void) { const char *msg = SDL_GetError(); if (strcmp(msg, "Unknown pixel format") == 0) return RAISE(PyExc_ValueError, "Invalid mask values"); return RAISE(pgExc_SDLError, msg); } /* surface object methods */ static PyObject * surf_get_at(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_PixelFormat *format = NULL; Uint8 *pixels = NULL; int x, y; Uint32 color; Uint8 *pix; Uint8 rgba[4] = {0, 0, 0, 255}; if (!PyArg_ParseTuple(args, "(ii)", &x, &y)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (x < 0 || x >= surf->w || y < 0 || y >= surf->h) return RAISE(PyExc_IndexError, "pixel index out of range"); format = surf->format; if (format->BytesPerPixel < 1 || format->BytesPerPixel > 4) return RAISE(PyExc_RuntimeError, "invalid color depth for surface"); if (!pgSurface_Lock((pgSurfaceObject *)self)) return NULL; pixels = (Uint8 *)surf->pixels; switch (format->BytesPerPixel) { case 1: color = (Uint32) * ((Uint8 *)pixels + y * surf->pitch + x); SDL_GetRGB(color, format, rgba, rgba + 1, rgba + 2); break; case 2: color = (Uint32) * ((Uint16 *)(pixels + y * surf->pitch) + x); SDL_GetRGBA(color, format, rgba, rgba + 1, rgba + 2, rgba + 3); break; case 3: pix = ((Uint8 *)(pixels + y * surf->pitch) + x * 3); #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = (pix[0]) + (pix[1] << 8) + (pix[2] << 16); #else color = (pix[2]) + (pix[1] << 8) + (pix[0] << 16); #endif SDL_GetRGB(color, format, rgba, rgba + 1, rgba + 2); break; default: /* case 4: */ assert(format->BytesPerPixel == 4); color = *((Uint32 *)(pixels + y * surf->pitch) + x); SDL_GetRGBA(color, format, rgba, rgba + 1, rgba + 2, rgba + 3); break; } if (!pgSurface_Unlock((pgSurfaceObject *)self)) return NULL; return pgColor_New(rgba); } static PyObject * surf_set_at(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_PixelFormat *format = NULL; Uint8 *pixels; int x, y; Uint32 color; Uint8 rgba[4] = {0, 0, 0, 0}; PyObject *rgba_obj; Uint8 *byte_buf; if (!PyArg_ParseTuple(args, "(ii)O", &x, &y, &rgba_obj)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); format = surf->format; if (format->BytesPerPixel < 1 || format->BytesPerPixel > 4) return RAISE(PyExc_RuntimeError, "invalid color depth for surface"); if (x < surf->clip_rect.x || x >= surf->clip_rect.x + surf->clip_rect.w || y < surf->clip_rect.y || y >= surf->clip_rect.y + surf->clip_rect.h) { /* out of clip area */ Py_RETURN_NONE; } if (PyLong_Check(rgba_obj)) { color = (Uint32)PyLong_AsLong(rgba_obj); if (PyErr_Occurred() && (Sint32)color == -1) return RAISE(PyExc_TypeError, "invalid color argument"); } else if (PyLong_Check(rgba_obj)) { color = (Uint32)PyLong_AsUnsignedLong(rgba_obj); if (PyErr_Occurred() && (Sint32)color == -1) return RAISE(PyExc_TypeError, "invalid color argument"); } else if (pg_RGBAFromFuzzyColorObj(rgba_obj, rgba)) color = pg_map_rgba(surf, rgba[0], rgba[1], rgba[2], rgba[3]); else return NULL; /* pg_RGBAFromFuzzyColorObj set an except for us */ if (!pgSurface_Lock((pgSurfaceObject *)self)) return NULL; pixels = (Uint8 *)surf->pixels; switch (format->BytesPerPixel) { case 1: *((Uint8 *)pixels + y * surf->pitch + x) = (Uint8)color; break; case 2: *((Uint16 *)(pixels + y * surf->pitch) + x) = (Uint16)color; break; case 3: byte_buf = (Uint8 *)(pixels + y * surf->pitch) + x * 3; #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) *(byte_buf + (format->Rshift >> 3)) = (Uint8)(color >> format->Rshift); *(byte_buf + (format->Gshift >> 3)) = (Uint8)(color >> format->Gshift); *(byte_buf + (format->Bshift >> 3)) = (Uint8)(color >> format->Bshift); #else *(byte_buf + 2 - (format->Rshift >> 3)) = (Uint8)(color >> format->Rshift); *(byte_buf + 2 - (format->Gshift >> 3)) = (Uint8)(color >> format->Gshift); *(byte_buf + 2 - (format->Bshift >> 3)) = (Uint8)(color >> format->Bshift); #endif break; default: /* case 4: */ *((Uint32 *)(pixels + y * surf->pitch) + x) = color; break; } if (!pgSurface_Unlock((pgSurfaceObject *)self)) return NULL; Py_RETURN_NONE; } static PyObject * surf_get_at_mapped(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_PixelFormat *format = NULL; Uint8 *pixels = NULL; int x, y; Sint32 color; Uint8 *pix; if (!PyArg_ParseTuple(args, "(ii)", &x, &y)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (x < 0 || x >= surf->w || y < 0 || y >= surf->h) return RAISE(PyExc_IndexError, "pixel index out of range"); format = surf->format; if (format->BytesPerPixel < 1 || format->BytesPerPixel > 4) return RAISE(PyExc_RuntimeError, "invalid color depth for surface"); if (!pgSurface_Lock((pgSurfaceObject *)self)) return NULL; pixels = (Uint8 *)surf->pixels; switch (format->BytesPerPixel) { case 1: color = (Uint32) * ((Uint8 *)pixels + y * surf->pitch + x); break; case 2: color = (Uint32) * ((Uint16 *)(pixels + y * surf->pitch) + x); break; case 3: pix = ((Uint8 *)(pixels + y * surf->pitch) + x * 3); #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = (pix[0]) + (pix[1] << 8) + (pix[2] << 16); #else color = (pix[2]) + (pix[1] << 8) + (pix[0] << 16); #endif break; default: /* case 4: */ color = *((Uint32 *)(pixels + y * surf->pitch) + x); break; } if (!pgSurface_Unlock((pgSurfaceObject *)self)) return NULL; return PyLong_FromLong((long)color); } static PyObject * surf_map_rgb(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); Uint8 rgba[4]; int color; if (!pg_RGBAFromFuzzyColorObj(args, rgba)) return NULL; /* Exception already set for us */ if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); color = pg_map_rgba(surf, rgba[0], rgba[1], rgba[2], rgba[3]); return PyLong_FromLong(color); } static PyObject * surf_unmap_rgb(PyObject *self, PyObject *arg) { SDL_Surface *surf = pgSurface_AsSurface(self); Uint32 col; Uint8 rgba[4]; col = (Uint32)PyLong_AsLong(arg); if (col == (Uint32)-1 && PyErr_Occurred()) { PyErr_Clear(); return RAISE(PyExc_TypeError, "unmap_rgb expects 1 number argument"); } if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (SDL_ISPIXELFORMAT_ALPHA(surf->format->format)) SDL_GetRGBA(col, surf->format, rgba, rgba + 1, rgba + 2, rgba + 3); else { SDL_GetRGB(col, surf->format, rgba, rgba + 1, rgba + 2); rgba[3] = 255; } return pgColor_New(rgba); } static PyObject * surf_lock(PyObject *self, PyObject *_null) { if (!pgSurface_Lock((pgSurfaceObject *)self)) return NULL; Py_RETURN_NONE; } static PyObject * surf_unlock(PyObject *self, PyObject *_null) { pgSurface_Unlock((pgSurfaceObject *)self); Py_RETURN_NONE; } static PyObject * surf_mustlock(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyBool_FromLong(SDL_MUSTLOCK(surf) || ((pgSurfaceObject *)self)->subsurface); } static PyObject * surf_get_locked(PyObject *self, PyObject *_null) { pgSurfaceObject *surf = (pgSurfaceObject *)self; if (surf->locklist && PyList_Size(surf->locklist) > 0) Py_RETURN_TRUE; Py_RETURN_FALSE; } static PyObject * surf_get_locks(PyObject *self, PyObject *_null) { pgSurfaceObject *surf = (pgSurfaceObject *)self; Py_ssize_t len, i = 0; PyObject *tuple, *tmp; if (!surf->locklist) return PyTuple_New(0); len = PyList_Size(surf->locklist); tuple = PyTuple_New(len); if (!tuple) return NULL; for (i = 0; i < len; i++) { tmp = PyWeakref_GetObject(PyList_GetItem(surf->locklist, i)); Py_INCREF(tmp); PyTuple_SetItem(tuple, i, tmp); } return tuple; } static PyObject * surf_get_palette(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_Palette *pal = NULL; PyObject *list; int i; PyObject *color; SDL_Color *c; Uint8 rgba[4] = {0, 0, 0, 255}; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pal = surf->format->palette; if (!pal) return RAISE(pgExc_SDLError, "Surface has no palette to get\n"); list = PyTuple_New(pal->ncolors); if (!list) return NULL; for (i = 0; i < pal->ncolors; i++) { c = &pal->colors[i]; rgba[0] = c->r; rgba[1] = c->g; rgba[2] = c->b; color = pgColor_NewLength(rgba, 3); if (!color) { Py_DECREF(list); return NULL; } PyTuple_SET_ITEM(list, i, color); } return list; } static PyObject * surf_get_palette_at(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_Palette *pal = NULL; SDL_Color *c; int _index; Uint8 rgba[4]; if (!PyArg_ParseTuple(args, "i", &_index)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pal = surf->format->palette; if (!pal) return RAISE(pgExc_SDLError, "Surface has no palette to set\n"); if (_index >= pal->ncolors || _index < 0) return RAISE(PyExc_IndexError, "index out of bounds"); c = &pal->colors[_index]; rgba[0] = c->r; rgba[1] = c->g; rgba[2] = c->b; rgba[3] = 255; return pgColor_NewLength(rgba, 3); } static PyObject * surf_set_palette(PyObject *self, PyObject *seq) { /* This method works differently from the SDL 1.2 equivalent. * It replaces colors in the surface's existing palette. So, if the * color list is shorter than the existing palette, only the first * part of the palette is replaced. For the SDL 1.2 Pygame version, * the actual colors array is replaced, making it shorter. */ const SDL_Color *old_colors; SDL_Color colors[256]; SDL_Surface *surf = pgSurface_AsSurface(self); SDL_Palette *pal = NULL; PyObject *item; int i, len; Uint8 rgba[4]; int ecode; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!PySequence_Check(seq)) return RAISE(PyExc_ValueError, "Argument must be a sequence type"); pal = surf->format->palette; if (!SDL_ISPIXELFORMAT_INDEXED(surf->format->format)) return RAISE(pgExc_SDLError, "Surface colors are not indexed\n"); if (!pal) return RAISE(pgExc_SDLError, "Surface is not palettitized\n"); old_colors = pal->colors; len = (int)MIN(pal->ncolors, PySequence_Length(seq)); for (i = 0; i < len; i++) { item = PySequence_GetItem(seq, i); ecode = pg_RGBAFromObj(item, rgba); Py_DECREF(item); if (!ecode) { return RAISE(PyExc_ValueError, "takes a sequence of integers of RGB"); } if (rgba[3] != 255) { return RAISE(PyExc_ValueError, "takes an alpha value of 255"); } colors[i].r = (unsigned char)rgba[0]; colors[i].g = (unsigned char)rgba[1]; colors[i].b = (unsigned char)rgba[2]; /* Preserve palette alphas. Normally, a palette entry has alpha 255. * If, however, colorkey is set, the corresponding palette entry has * 0 alpha. */ colors[i].a = (unsigned char)old_colors[i].a; } ecode = SDL_SetPaletteColors(pal, colors, 0, len); if (ecode != 0) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * surf_set_palette_at(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_Palette *pal = NULL; SDL_Color color; int _index; PyObject *color_obj; Uint8 rgba[4]; if (!PyArg_ParseTuple(args, "iO", &_index, &color_obj)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!pg_RGBAFromObj(color_obj, rgba)) { return RAISE(PyExc_ValueError, "takes a sequence of integers of RGB for argument 2"); } if (!SDL_ISPIXELFORMAT_INDEXED(surf->format->format)) return RAISE(pgExc_SDLError, "Surface colors are not indexed\n"); pal = surf->format->palette; if (!pal) { PyErr_SetString(pgExc_SDLError, "Surface is not palettized\n"); return NULL; } if (_index >= pal->ncolors || _index < 0) { PyErr_SetString(PyExc_IndexError, "index out of bounds"); return NULL; } color.r = rgba[0]; color.g = rgba[1]; color.b = rgba[2]; color.a = pal->colors[_index].a; /* May be a colorkey color. */ if (SDL_SetPaletteColors(pal, &color, _index, 1) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * surf_set_colorkey(pgSurfaceObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); Uint32 flags = 0, color = 0; PyObject *rgba_obj = NULL; Uint8 rgba[4]; int result; int hascolor = SDL_FALSE; if (!PyArg_ParseTuple(args, "|Oi", &rgba_obj, &flags)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (rgba_obj && rgba_obj != Py_None) { if (PyLong_Check(rgba_obj)) { color = (Uint32)PyLong_AsLong(rgba_obj); if (PyErr_Occurred() && (Sint32)color == -1) return RAISE(PyExc_TypeError, "invalid color argument"); } else if (PyLong_Check(rgba_obj)) { color = (Uint32)PyLong_AsUnsignedLong(rgba_obj); if (PyErr_Occurred() && (Sint32)color == -1) return RAISE(PyExc_TypeError, "invalid color argument"); } else if (pg_RGBAFromFuzzyColorObj(rgba_obj, rgba)) { if (SDL_ISPIXELFORMAT_ALPHA(surf->format->format)) color = pg_map_rgba(surf, rgba[0], rgba[1], rgba[2], rgba[3]); else color = pg_map_rgb(surf, rgba[0], rgba[1], rgba[2]); } else return NULL; /* pg_RGBAFromFuzzyColorObj set an exception for us */ hascolor = SDL_TRUE; } pgSurface_Prep(self); result = 0; if (hascolor && surf->format->BytesPerPixel == 1) { /* For an indexed surface, remove the previous colorkey first. */ result = SDL_SetColorKey(surf, SDL_FALSE, color); } if (result == 0 && hascolor) { result = SDL_SetSurfaceRLE( surf, (flags & PGS_RLEACCEL) ? SDL_TRUE : SDL_FALSE); } if (result == 0) { result = SDL_SetColorKey(surf, hascolor, color); } pgSurface_Unprep(self); if (result == -1) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * surf_get_colorkey(pgSurfaceObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); Uint32 mapped_color; Uint8 r, g, b, a = 255; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (SDL_GetColorKey(surf, &mapped_color) != 0) { SDL_ClearError(); Py_RETURN_NONE; } if (SDL_ISPIXELFORMAT_ALPHA(surf->format->format)) SDL_GetRGBA(mapped_color, surf->format, &r, &g, &b, &a); else SDL_GetRGB(mapped_color, surf->format, &r, &g, &b); return Py_BuildValue("(bbbb)", r, g, b, a); } static PyObject * surf_set_alpha(pgSurfaceObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); Uint32 flags = 0; PyObject *alpha_obj = NULL, *intobj = NULL; Uint8 alpha; int result, alphaval = 255; SDL_Rect sdlrect; SDL_Surface *surface; if (!PyArg_ParseTuple(args, "|Oi", &alpha_obj, &flags)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (alpha_obj && alpha_obj != Py_None) { if (PyNumber_Check(alpha_obj) && (intobj = PyNumber_Long(alpha_obj))) { if (PyLong_Check(intobj)) { alphaval = (int)PyLong_AsLong(intobj); Py_DECREF(intobj); } else return RAISE(PyExc_TypeError, "invalid alpha argument"); } else return RAISE(PyExc_TypeError, "invalid alpha argument"); if (SDL_SetSurfaceBlendMode(surf, SDL_BLENDMODE_BLEND) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); } else { if (SDL_SetSurfaceBlendMode(surf, SDL_BLENDMODE_NONE) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); } if (alphaval > 255) alpha = 255; else if (alphaval < 0) alpha = 0; else alpha = (Uint8)alphaval; if (alpha == 255 && (surf->format->BytesPerPixel == 1)) { /* Can't blend with a surface alpha of 255 and 8bit surfaces */ if (SDL_SetSurfaceBlendMode(surf, SDL_BLENDMODE_NONE) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); } pgSurface_Prep(self); result = SDL_SetSurfaceRLE(surf, (flags & PGS_RLEACCEL) ? SDL_TRUE : SDL_FALSE); /* HACK HACK HACK */ if ((surf->flags & SDL_RLEACCEL) && (!(flags & PGS_RLEACCEL))) { /* hack to strip SDL_RLEACCEL flag off surface immediately when it is not requested */ sdlrect.x = 0; sdlrect.y = 0; sdlrect.h = 0; sdlrect.w = 0; surface = SDL_CreateRGBSurface( 0, 1, 1, 32, surf->format->Rmask, surf->format->Gmask, surf->format->Bmask, surf->format->Amask); SDL_LowerBlit(surf, &sdlrect, surface, &sdlrect); SDL_FreeSurface(surface); } /* HACK HACK HACK */ if (result == 0) result = SDL_SetSurfaceAlphaMod(surf, alpha); pgSurface_Unprep(self); if (result == -1) return RAISE(pgExc_SDLError, SDL_GetError()); Py_RETURN_NONE; } static PyObject * surf_get_alpha(pgSurfaceObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_BlendMode mode; Uint8 alpha; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (SDL_GetSurfaceBlendMode(surf, &mode) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); if (mode != SDL_BLENDMODE_BLEND) Py_RETURN_NONE; if (SDL_GetSurfaceAlphaMod(surf, &alpha) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); return PyLong_FromLong(alpha); } static PyObject * surf_get_blendmode(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_BlendMode mode; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (SDL_GetSurfaceBlendMode(surf, &mode) != 0) return RAISE(pgExc_SDLError, SDL_GetError()); return PyLong_FromLong((long)mode); } static PyObject * surf_copy(pgSurfaceObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); PyObject *final; SDL_Surface *newsurf; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); /* SDL_ConvertSurface does not work on empty surface, * meaning all pixels are black (255). */ pgSurface_Prep(self); newsurf = SDL_ConvertSurface(surf, surf->format, 0); pgSurface_Unprep(self); final = surf_subtype_new(Py_TYPE(self), newsurf, 1); if (!final) SDL_FreeSurface(newsurf); return final; } static PyObject * surf_convert(pgSurfaceObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); PyObject *final; PyObject *argobject = NULL; SDL_Surface *src; SDL_Surface *newsurf; Uint32 flags = UINT32_MAX; Uint32 colorkey; Uint8 key_r, key_g, key_b, key_a = 255; int has_colorkey = SDL_FALSE; if (!SDL_WasInit(SDL_INIT_VIDEO)) return RAISE(pgExc_SDLError, "cannot convert without pygame.display initialized"); if (!PyArg_ParseTuple(args, "|Oi", &argobject, &flags)) return NULL; pgSurface_Prep(self); if (SDL_GetColorKey(surf, &colorkey) == 0) { has_colorkey = SDL_TRUE; if (SDL_ISPIXELFORMAT_ALPHA(surf->format->format)) SDL_GetRGBA(colorkey, surf->format, &key_r, &key_g, &key_b, &key_a); else SDL_GetRGB(colorkey, surf->format, &key_r, &key_g, &key_b); } if (argobject) { if (pgSurface_Check(argobject)) { src = pgSurface_AsSurface(argobject); if (!src) return RAISE(pgExc_SDLError, "display Surface quit"); newsurf = SDL_ConvertSurface(surf, src->format, 0); } else { /* will be updated later, initialize to make static analyzer happy */ int bpp = 0; SDL_PixelFormat format; memcpy(&format, surf->format, sizeof(format)); if (pg_IntFromObj(argobject, &bpp)) { Uint32 Rmask, Gmask, Bmask, Amask; if (flags != UINT32_MAX && flags & PGS_SRCALPHA) { switch (bpp) { case 16: Rmask = 0xF << 8; Gmask = 0xF << 4; Bmask = 0xF; Amask = 0xF << 12; break; case 32: Rmask = 0xFF << 16; Gmask = 0xFF << 8; Bmask = 0xFF; Amask = 0xFF << 24; break; default: return RAISE(PyExc_ValueError, "no standard masks exist for given " "bitdepth with alpha"); } } else { Amask = 0; switch (bpp) { case 8: Rmask = 0; Gmask = 0; Bmask = 0; break; case 12: Rmask = 0xFF >> 4 << 8; Gmask = 0xFF >> 4 << 4; Bmask = 0xFF >> 4; break; case 15: Rmask = 0xFF >> 3 << 10; Gmask = 0xFF >> 3 << 5; Bmask = 0xFF >> 3; break; case 16: Rmask = 0xFF >> 3 << 11; Gmask = 0xFF >> 2 << 5; Bmask = 0xFF >> 3; break; case 24: case 32: Rmask = 0xFF << 16; Gmask = 0xFF << 8; Bmask = 0xFF; break; default: return RAISE(PyExc_ValueError, "nonstandard bit depth given"); } } format.Rmask = Rmask; format.Gmask = Gmask; format.Bmask = Bmask; format.Amask = Amask; } else if (PySequence_Check(argobject) && PySequence_Size(argobject) == 4) { Uint32 mask; if (!pg_UintFromObjIndex(argobject, 0, &format.Rmask) || !pg_UintFromObjIndex(argobject, 1, &format.Gmask) || !pg_UintFromObjIndex(argobject, 2, &format.Bmask) || !pg_UintFromObjIndex(argobject, 3, &format.Amask)) { pgSurface_Unprep(self); return RAISE(PyExc_ValueError, "invalid color masks given"); } mask = format.Rmask | format.Gmask | format.Bmask | format.Amask; for (bpp = 0; bpp < 32; ++bpp) if (!(mask >> bpp)) break; } else { pgSurface_Unprep(self); return RAISE( PyExc_ValueError, "invalid argument specifying new format to convert to"); } format.BitsPerPixel = (Uint8)bpp; format.BytesPerPixel = (bpp + 7) / 8; if (format.BitsPerPixel > 8) /* Allow a 8 bit source surface with an empty palette to be * converted to a format without a palette (Issue #131). * If the target format has a non-NULL palette pointer then * SDL_ConvertSurface checks that the palette is not empty-- * that at least one entry is not black. */ format.palette = NULL; newsurf = SDL_ConvertSurface(surf, &format, 0); SDL_SetSurfaceBlendMode(newsurf, SDL_BLENDMODE_NONE); } } else { newsurf = pg_DisplayFormat(surf); SDL_SetSurfaceBlendMode(newsurf, SDL_BLENDMODE_NONE); } if (has_colorkey) { colorkey = pg_map_rgba(newsurf, key_r, key_g, key_b, key_a); if (SDL_SetColorKey(newsurf, SDL_TRUE, colorkey) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } pgSurface_Unprep(self); final = surf_subtype_new(Py_TYPE(self), newsurf, 1); if (!final) SDL_FreeSurface(newsurf); return final; } static SDL_Surface * pg_DisplayFormat(SDL_Surface *surface) { SDL_Surface *displaysurf; if (!pg_GetDefaultWindowSurface()) { SDL_SetError("No video mode has been set"); return NULL; } displaysurf = pgSurface_AsSurface(pg_GetDefaultWindowSurface()); return SDL_ConvertSurface(surface, displaysurf->format, 0); } static SDL_Surface * pg_DisplayFormatAlpha(SDL_Surface *surface) { SDL_Surface *displaysurf; SDL_PixelFormat *dformat; Uint32 pfe; Uint32 amask = 0xff000000; Uint32 rmask = 0x00ff0000; Uint32 gmask = 0x0000ff00; Uint32 bmask = 0x000000ff; if (!pg_GetDefaultWindowSurface()) { SDL_SetError("No video mode has been set"); return NULL; } displaysurf = pgSurface_AsSurface(pg_GetDefaultWindowSurface()); dformat = displaysurf->format; switch (dformat->BytesPerPixel) { case 2: /* same behavior as SDL1 */ if ((dformat->Rmask == 0x1f) && (dformat->Bmask == 0xf800 || dformat->Bmask == 0x7c00)) { rmask = 0xff; bmask = 0xff0000; } break; case 3: case 4: /* keep the format if the high bits are free */ if ((dformat->Rmask == 0xff) && (dformat->Bmask == 0xff0000)) { rmask = 0xff; bmask = 0xff0000; } else if (dformat->Rmask == 0xff00 && (dformat->Bmask == 0xff000000)) { amask = 0x000000ff; rmask = 0x0000ff00; gmask = 0x00ff0000; bmask = 0xff000000; } break; default: /* ARGB8888 */ break; } pfe = SDL_MasksToPixelFormatEnum(32, rmask, gmask, bmask, amask); if (pfe == SDL_PIXELFORMAT_UNKNOWN) { SDL_SetError("unknown pixel format"); return NULL; } return SDL_ConvertSurfaceFormat(surface, pfe, 0); } static PyObject * surf_convert_alpha(pgSurfaceObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); PyObject *final; pgSurfaceObject *srcsurf = NULL; SDL_Surface *newsurf; if (!SDL_WasInit(SDL_INIT_VIDEO)) return RAISE(pgExc_SDLError, "cannot convert without pygame.display initialized"); if (!PyArg_ParseTuple(args, "|O!", &pgSurface_Type, &srcsurf)) return NULL; #pragma PG_WARN("srcsurf doesn't actually do anything?") /*if (!srcsurf) {}*/ /* * hmm, we have to figure this out, not all depths have good * support for alpha */ newsurf = pg_DisplayFormatAlpha(surf); SDL_SetSurfaceBlendMode(newsurf, SDL_BLENDMODE_BLEND); final = surf_subtype_new(Py_TYPE(self), newsurf, 1); if (!final) SDL_FreeSurface(newsurf); return final; } static PyObject * surf_set_clip(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); PyObject *item; SDL_Rect *rect = NULL, temp; SDL_Rect sdlrect; int result; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (PyTuple_Size(args)) { item = PyTuple_GET_ITEM(args, 0); if (item == Py_None && PyTuple_Size(args) == 1) { result = SDL_SetClipRect(surf, NULL); } else { rect = pgRect_FromObject(args, &temp); if (!rect) return RAISE(PyExc_ValueError, "invalid rectstyle object"); sdlrect.x = rect->x; sdlrect.y = rect->y; sdlrect.h = rect->h; sdlrect.w = rect->w; result = SDL_SetClipRect(surf, &sdlrect); } } else { result = SDL_SetClipRect(surf, NULL); } if (result == -1) { return RAISE(pgExc_SDLError, SDL_GetError()); } Py_RETURN_NONE; } static PyObject * surf_get_clip(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return pgRect_New(&surf->clip_rect); } static PyObject * surf_fill(pgSurfaceObject *self, PyObject *args, PyObject *keywds) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_Rect *rect, temp; PyObject *r = NULL; Uint32 color; int result; PyObject *rgba_obj; Uint8 rgba[4]; SDL_Rect sdlrect; int blendargs = 0; static char *kwids[] = {"color", "rect", "special_flags", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|Oi", kwids, &rgba_obj, &r, &blendargs)) return NULL; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (PyLong_Check(rgba_obj)) color = (Uint32)PyLong_AsLong(rgba_obj); else if (PyLong_Check(rgba_obj)) color = (Uint32)PyLong_AsUnsignedLong(rgba_obj); else if (pg_RGBAFromFuzzyColorObj(rgba_obj, rgba)) color = pg_map_rgba(surf, rgba[0], rgba[1], rgba[2], rgba[3]); else return NULL; /* pg_RGBAFromFuzzyColorObj set an exception for us */ if (!r || r == Py_None) { rect = &temp; temp.x = temp.y = 0; temp.w = surf->w; temp.h = surf->h; } else if (!(rect = pgRect_FromObject(r, &temp))) return RAISE(PyExc_ValueError, "invalid rectstyle object"); /* we need a fresh copy so our Rect values don't get munged */ if (rect != &temp) { memcpy(&temp, rect, sizeof(temp)); rect = &temp; } if (rect->w < 0 || rect->h < 0 || rect->x > surf->w || rect->y > surf->h) { sdlrect.x = sdlrect.y = 0; sdlrect.w = sdlrect.h = 0; } else { sdlrect.x = rect->x; sdlrect.y = rect->y; sdlrect.w = rect->w; sdlrect.h = rect->h; // clip the rect to be within the surface. if (sdlrect.x + sdlrect.w <= 0 || sdlrect.y + sdlrect.h <= 0) { sdlrect.w = 0; sdlrect.h = 0; } if (sdlrect.x < 0) { sdlrect.x = 0; } if (sdlrect.y < 0) { sdlrect.y = 0; } if (sdlrect.x + sdlrect.w > surf->w) { sdlrect.w = sdlrect.w + (surf->w - (sdlrect.x + sdlrect.w)); } if (sdlrect.y + sdlrect.h > surf->h) { sdlrect.h = sdlrect.h + (surf->h - (sdlrect.y + sdlrect.h)); } if (sdlrect.w <= 0 || sdlrect.h <= 0) { return pgRect_New(&sdlrect); } if (blendargs != 0) { result = surface_fill_blend(surf, &sdlrect, color, blendargs); } else { pgSurface_Prep(self); pgSurface_Lock((pgSurfaceObject *)self); result = SDL_FillRect(surf, &sdlrect, color); pgSurface_Unlock((pgSurfaceObject *)self); pgSurface_Unprep(self); } if (result == -1) return RAISE(pgExc_SDLError, SDL_GetError()); } return pgRect_New(&sdlrect); } static PyObject * surf_blit(pgSurfaceObject *self, PyObject *args, PyObject *keywds) { SDL_Surface *src, *dest = pgSurface_AsSurface(self); SDL_Rect *src_rect, temp; PyObject *argpos, *argrect = NULL; pgSurfaceObject *srcobject; int dx, dy, result; SDL_Rect dest_rect; int sx, sy; int the_args = 0; static char *kwids[] = {"source", "dest", "area", "special_flags", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "O!O|Oi", kwids, &pgSurface_Type, &srcobject, &argpos, &argrect, &the_args)) return NULL; src = pgSurface_AsSurface(srcobject); if (!dest || !src) return RAISE(pgExc_SDLError, "display Surface quit"); if ((src_rect = pgRect_FromObject(argpos, &temp))) { dx = src_rect->x; dy = src_rect->y; } else if (pg_TwoIntsFromObj(argpos, &sx, &sy)) { dx = sx; dy = sy; } else return RAISE(PyExc_TypeError, "invalid destination position for blit"); if (argrect && argrect != Py_None) { if (!(src_rect = pgRect_FromObject(argrect, &temp))) return RAISE(PyExc_TypeError, "Invalid rectstyle argument"); } else { temp.x = temp.y = 0; temp.w = src->w; temp.h = src->h; src_rect = &temp; } dest_rect.x = dx; dest_rect.y = dy; dest_rect.w = src_rect->w; dest_rect.h = src_rect->h; if (!the_args) the_args = 0; result = pgSurface_Blit(self, srcobject, &dest_rect, src_rect, the_args); if (result != 0) return NULL; return pgRect_New(&dest_rect); } #define BLITS_ERR_SEQUENCE_REQUIRED 1 #define BLITS_ERR_DISPLAY_SURF_QUIT 2 #define BLITS_ERR_SEQUENCE_SURF 3 #define BLITS_ERR_NO_OPENGL_SURF 4 #define BLITS_ERR_INVALID_DESTINATION 5 #define BLITS_ERR_INVALID_RECT_STYLE 6 #define BLITS_ERR_MUST_ASSIGN_NUMERIC 7 #define BLITS_ERR_BLIT_FAIL 8 #define BLITS_ERR_PY_EXCEPTION_RAISED 9 #define BLITS_ERR_SOURCE_NOT_SURFACE 10 static PyObject * surf_blits(pgSurfaceObject *self, PyObject *args, PyObject *keywds) { SDL_Surface *src, *dest = pgSurface_AsSurface(self); SDL_Rect *src_rect, temp; PyObject *srcobject = NULL, *argpos = NULL, *argrect = NULL; int dx, dy, result; SDL_Rect dest_rect; int sx, sy; int the_args = 0; PyObject *blitsequence; PyObject *iterator = NULL; PyObject *item = NULL; PyObject *special_flags = NULL; PyObject *ret = NULL; PyObject *retrect = NULL; Py_ssize_t itemlength, sequencelength, curriter = 0; int doreturn = 1; int bliterrornum = 0; int issequence = 0; static char *kwids[] = {"blit_sequence", "doreturn", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|i", kwids, &blitsequence, &doreturn)) return NULL; if (!PyIter_Check(blitsequence) && !(issequence = PySequence_Check(blitsequence))) { bliterrornum = BLITS_ERR_SEQUENCE_REQUIRED; goto bliterror; } if (doreturn) { /* If the sequence is countable, meaning not a generator, we can get * faster rect appending to the list by pre allocating it * to later call the more efficient SET_ITEM*/ if (issequence) { sequencelength = PySequence_Size(blitsequence); if (sequencelength == -1) { bliterrornum = BLITS_ERR_PY_EXCEPTION_RAISED; goto bliterror; } ret = PyList_New(sequencelength); } else { ret = PyList_New(0); } if (!ret) return NULL; } iterator = PyObject_GetIter(blitsequence); if (!iterator) { Py_XDECREF(ret); return NULL; } while ((item = PyIter_Next(iterator))) { if (PySequence_Check(item)) { itemlength = PySequence_Length(item); if (itemlength > 4 || itemlength < 2) { bliterrornum = BLITS_ERR_SEQUENCE_REQUIRED; goto bliterror; } } else { bliterrornum = BLITS_ERR_SEQUENCE_REQUIRED; goto bliterror; } argrect = NULL; special_flags = NULL; the_args = 0; /* We know that there will be at least two items due to the conditional at the start of the loop */ assert(itemlength >= 2); /* (Surface, dest) */ srcobject = PySequence_ITEM(item, 0); argpos = PySequence_ITEM(item, 1); if (itemlength >= 3) { /* (Surface, dest, area) */ argrect = PySequence_ITEM(item, 2); } if (itemlength == 4) { /* (Surface, dest, area, special_flags) */ special_flags = PySequence_ITEM(item, 3); } Py_DECREF(item); /* Clear item to avoid double deref on errors */ item = NULL; if (!pgSurface_Check(srcobject)) { bliterrornum = BLITS_ERR_SOURCE_NOT_SURFACE; goto bliterror; } src = pgSurface_AsSurface(srcobject); if (!dest) { bliterrornum = BLITS_ERR_DISPLAY_SURF_QUIT; goto bliterror; } if (!src) { bliterrornum = BLITS_ERR_SEQUENCE_SURF; goto bliterror; } if ((src_rect = pgRect_FromObject(argpos, &temp))) { dx = src_rect->x; dy = src_rect->y; } else if (pg_TwoIntsFromObj(argpos, &sx, &sy)) { dx = sx; dy = sy; } else { bliterrornum = BLITS_ERR_INVALID_DESTINATION; goto bliterror; } if (argrect && argrect != Py_None) { if (!(src_rect = pgRect_FromObject(argrect, &temp))) { bliterrornum = BLITS_ERR_INVALID_RECT_STYLE; goto bliterror; } } else { temp.x = temp.y = 0; temp.w = src->w; temp.h = src->h; src_rect = &temp; } dest_rect.x = dx; dest_rect.y = dy; dest_rect.w = src_rect->w; dest_rect.h = src_rect->h; if (special_flags) { if (!pg_IntFromObj(special_flags, &the_args)) { bliterrornum = BLITS_ERR_MUST_ASSIGN_NUMERIC; goto bliterror; } } result = pgSurface_Blit(self, (pgSurfaceObject *)srcobject, &dest_rect, src_rect, the_args); if (result != 0) { bliterrornum = BLITS_ERR_BLIT_FAIL; goto bliterror; } if (doreturn) { retrect = NULL; retrect = pgRect_New(&dest_rect); /* If the sequence is countable, we already pre allocated a list * of matching size. Now we can use the efficient PyList_SET_ITEM * to add elements to the list */ if (issequence) { PyList_SET_ITEM(ret, curriter++, retrect); } else if (PyList_Append(ret, retrect) != -1) { Py_DECREF(retrect); } else { Py_DECREF(retrect); retrect = NULL; bliterrornum = BLITS_ERR_PY_EXCEPTION_RAISED; goto bliterror; } retrect = NULL; /* Clear to avoid double deref on errors */ } Py_DECREF(srcobject); Py_DECREF(argpos); Py_XDECREF(argrect); Py_XDECREF(special_flags); /* Clear to avoid double deref on errors */ srcobject = NULL; argpos = NULL; argrect = NULL; special_flags = NULL; } Py_DECREF(iterator); if (PyErr_Occurred()) { Py_XDECREF(ret); return NULL; } if (doreturn) { return ret; } else { Py_RETURN_NONE; } bliterror: Py_XDECREF(srcobject); Py_XDECREF(argpos); Py_XDECREF(argrect); Py_XDECREF(retrect); Py_XDECREF(special_flags); Py_XDECREF(iterator); Py_XDECREF(item); Py_XDECREF(ret); switch (bliterrornum) { case BLITS_ERR_SEQUENCE_REQUIRED: return RAISE( PyExc_ValueError, "blit_sequence should be iterator of (Surface, dest)"); case BLITS_ERR_DISPLAY_SURF_QUIT: return RAISE(pgExc_SDLError, "display Surface quit"); case BLITS_ERR_SEQUENCE_SURF: return RAISE(PyExc_TypeError, "First element of blit_list needs to be Surface."); case BLITS_ERR_INVALID_DESTINATION: return RAISE(PyExc_TypeError, "invalid destination position for blit"); case BLITS_ERR_INVALID_RECT_STYLE: return RAISE(PyExc_TypeError, "Invalid rectstyle argument"); case BLITS_ERR_MUST_ASSIGN_NUMERIC: return RAISE(PyExc_TypeError, "Must assign numeric values"); case BLITS_ERR_BLIT_FAIL: return RAISE(PyExc_TypeError, "Blit failed"); case BLITS_ERR_PY_EXCEPTION_RAISED: return NULL; /* Raising a previously set exception */ case BLITS_ERR_SOURCE_NOT_SURFACE: return RAISE(PyExc_TypeError, "Source objects must be a surface"); } return RAISE(PyExc_TypeError, "Unknown error"); } static PyObject * surf_scroll(PyObject *self, PyObject *args, PyObject *keywds) { int dx = 0, dy = 0; SDL_Surface *surf; int bpp; int pitch; SDL_Rect *clip_rect; int w, h; Uint8 *src, *dst; static char *kwids[] = {"dx", "dy", NULL}; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwids, &dx, &dy)) { return NULL; } surf = pgSurface_AsSurface(self); if (!surf) { return RAISE(pgExc_SDLError, "display Surface quit"); } if (dx == 0 && dy == 0) { Py_RETURN_NONE; } clip_rect = &surf->clip_rect; w = clip_rect->w; h = clip_rect->h; if (dx >= w || dx <= -w || dy >= h || dy <= -h) { Py_RETURN_NONE; } if (!pgSurface_Lock((pgSurfaceObject *)self)) { return NULL; } bpp = surf->format->BytesPerPixel; pitch = surf->pitch; src = dst = (Uint8 *)surf->pixels + clip_rect->y * pitch + clip_rect->x * bpp; if (dx >= 0) { w -= dx; if (dy > 0) { h -= dy; dst += dy * pitch + dx * bpp; } else { h += dy; src -= dy * pitch; dst += dx * bpp; } } else { w += dx; if (dy > 0) { h -= dy; src -= dx * bpp; dst += dy * pitch; } else { h += dy; src -= dy * pitch + dx * bpp; } } surface_move(src, dst, h, w * bpp, pitch, pitch); if (!pgSurface_Unlock((pgSurfaceObject *)self)) { return NULL; } Py_RETURN_NONE; } int pg_HasSurfaceRLE(SDL_Surface *surface) { pg_BlitMap *blit_map; /* this is part of a hack to allow us to access the COPY_RLE_DESIRED flag from pygame */ if (!surface) { return SDL_FALSE; } blit_map = (pg_BlitMap *)surface->map; if (!(blit_map->info.flags & PGS_COPY_RLE_DESIRED)) { return SDL_FALSE; } return SDL_TRUE; } static int _PgSurface_SrcAlpha(SDL_Surface *surf) { SDL_BlendMode mode; if (SDL_GetSurfaceBlendMode(surf, &mode) < 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } return (mode != SDL_BLENDMODE_NONE); } static PyObject * surf_get_flags(PyObject *self, PyObject *_null) { Uint32 sdl_flags = 0; Uint32 window_flags = 0; Uint32 flags = 0; int is_alpha; int is_window_surf = 0; SDL_Window *win = pg_GetDefaultWindow(); SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (win && pg_GetDefaultWindowSurface()) { if (surf == pgSurface_AsSurface(pg_GetDefaultWindowSurface())) { is_window_surf = 1; window_flags = SDL_GetWindowFlags(win); } } sdl_flags = surf->flags; if ((is_alpha = _PgSurface_SrcAlpha(surf)) == -1) return NULL; if (is_alpha) { flags |= PGS_SRCALPHA; } if (SDL_GetColorKey(surf, NULL) == 0) flags |= PGS_SRCCOLORKEY; if (sdl_flags & SDL_PREALLOC) flags |= PGS_PREALLOC; if (pg_HasSurfaceRLE(surf)) flags |= PGS_RLEACCELOK; if ((sdl_flags & SDL_RLEACCEL)) flags |= PGS_RLEACCEL; if (is_window_surf) { if (window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP || window_flags & SDL_WINDOW_FULLSCREEN) flags |= PGS_FULLSCREEN; if (window_flags & SDL_WINDOW_OPENGL) flags |= PGS_OPENGL; if (window_flags & SDL_WINDOW_RESIZABLE) flags |= PGS_RESIZABLE; if (window_flags & SDL_WINDOW_BORDERLESS) flags |= PGS_NOFRAME; } return PyLong_FromLong((long)flags); } static PyObject * surf_get_pitch(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong(surf->pitch); } static PyObject * surf_get_size(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return Py_BuildValue("(ii)", surf->w, surf->h); } static PyObject * surf_get_width(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong(surf->w); } static PyObject * surf_get_height(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong(surf->h); } static PyObject * surf_get_rect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *rect; SDL_Surface *surf = pgSurface_AsSurface(self); if (PyTuple_GET_SIZE(args) > 0) { return RAISE(PyExc_TypeError, "get_rect only accepts keyword arguments"); } if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); rect = pgRect_New4(0, 0, surf->w, surf->h); if (rect && kwargs) { PyObject *key, *value; Py_ssize_t pos = 0; while (PyDict_Next(kwargs, &pos, &key, &value)) { if ((PyObject_SetAttr(rect, key, value) == -1)) { Py_DECREF(rect); return NULL; } } } return rect; } static PyObject * surf_get_bitsize(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong(surf->format->BitsPerPixel); } static PyObject * surf_get_bytesize(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return PyLong_FromLong(surf->format->BytesPerPixel); } static PyObject * surf_get_masks(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return Py_BuildValue("(IIII)", surf->format->Rmask, surf->format->Gmask, surf->format->Bmask, surf->format->Amask); } static PyObject * surf_set_masks(PyObject *self, PyObject *args) { return RAISE(PyExc_TypeError, "The surface masks are read-only in SDL2"); } static PyObject * surf_get_shifts(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return Py_BuildValue("(iiii)", surf->format->Rshift, surf->format->Gshift, surf->format->Bshift, surf->format->Ashift); } static PyObject * surf_set_shifts(PyObject *self, PyObject *args) { return RAISE(PyExc_TypeError, "The surface shifts are read-only in SDL2"); } static PyObject * surf_get_losses(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); return Py_BuildValue("(iiii)", surf->format->Rloss, surf->format->Gloss, surf->format->Bloss, surf->format->Aloss); } static PyObject * surf_subsurface(PyObject *self, PyObject *args) { SDL_Surface *surf = pgSurface_AsSurface(self); SDL_PixelFormat *format; SDL_Rect *rect, temp; SDL_Surface *sub; PyObject *subobj; int pixeloffset; char *startpixel; struct pgSubSurface_Data *data; Uint8 alpha; Uint32 colorkey; int ecode; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); format = surf->format; if (!(rect = pgRect_FromObject(args, &temp))) return RAISE(PyExc_ValueError, "invalid rectstyle argument"); if (rect->x < 0 || rect->y < 0 || rect->x + rect->w > surf->w || rect->y + rect->h > surf->h) return RAISE(PyExc_ValueError, "subsurface rectangle outside surface area"); pgSurface_Lock((pgSurfaceObject *)self); pixeloffset = rect->x * format->BytesPerPixel + rect->y * surf->pitch; startpixel = ((char *)surf->pixels) + pixeloffset; sub = SDL_CreateRGBSurfaceFrom( startpixel, rect->w, rect->h, format->BitsPerPixel, surf->pitch, format->Rmask, format->Gmask, format->Bmask, format->Amask); pgSurface_Unlock((pgSurfaceObject *)self); if (!sub) return _raise_create_surface_error(); /* copy the colormap if we need it */ if (SDL_ISPIXELFORMAT_INDEXED(surf->format->format) && surf->format->palette) { SDL_Color *colors = surf->format->palette->colors; int ncolors = surf->format->palette->ncolors; SDL_Palette *pal = SDL_AllocPalette(ncolors); if (!pal) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(sub); return NULL; } if (SDL_SetPaletteColors(pal, colors, 0, ncolors) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreePalette(pal); SDL_FreeSurface(sub); return NULL; } if (SDL_SetSurfacePalette(sub, pal) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreePalette(pal); SDL_FreeSurface(sub); return NULL; } SDL_FreePalette(pal); } if (SDL_GetSurfaceAlphaMod(surf, &alpha) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(sub); return NULL; } if (alpha != 255) { if (SDL_SetSurfaceAlphaMod(sub, alpha) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(sub); return NULL; } } ecode = SDL_GetColorKey(surf, &colorkey); if (ecode == 0) { if (SDL_SetColorKey(sub, SDL_TRUE, colorkey) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(sub); return NULL; } } else if (ecode == -1) SDL_ClearError(); else { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(sub); return NULL; } data = PyMem_New(struct pgSubSurface_Data, 1); if (!data) return NULL; subobj = surf_subtype_new(Py_TYPE(self), sub, 1); if (!subobj) { PyMem_Free(data); return NULL; } Py_INCREF(self); data->owner = self; data->pixeloffset = pixeloffset; data->offsetx = rect->x; data->offsety = rect->y; ((pgSurfaceObject *)subobj)->subsurface = data; return subobj; } static PyObject * surf_get_offset(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); struct pgSubSurface_Data *subdata; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); subdata = ((pgSurfaceObject *)self)->subsurface; if (!subdata) return Py_BuildValue("(ii)", 0, 0); return Py_BuildValue("(ii)", subdata->offsetx, subdata->offsety); } static PyObject * surf_get_abs_offset(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); struct pgSubSurface_Data *subdata; PyObject *owner; int offsetx, offsety; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); subdata = ((pgSurfaceObject *)self)->subsurface; if (!subdata) return Py_BuildValue("(ii)", 0, 0); subdata = ((pgSurfaceObject *)self)->subsurface; owner = subdata->owner; offsetx = subdata->offsetx; offsety = subdata->offsety; while (((pgSurfaceObject *)owner)->subsurface) { subdata = ((pgSurfaceObject *)owner)->subsurface; owner = subdata->owner; offsetx += subdata->offsetx; offsety += subdata->offsety; } return Py_BuildValue("(ii)", offsetx, offsety); } static PyObject * surf_get_parent(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); struct pgSubSurface_Data *subdata; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); subdata = ((pgSurfaceObject *)self)->subsurface; if (!subdata) Py_RETURN_NONE; Py_INCREF(subdata->owner); return subdata->owner; } static PyObject * surf_get_abs_parent(PyObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); struct pgSubSurface_Data *subdata; PyObject *owner; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); subdata = ((pgSurfaceObject *)self)->subsurface; if (!subdata) { Py_INCREF(self); return self; } subdata = ((pgSurfaceObject *)self)->subsurface; owner = subdata->owner; while (((pgSurfaceObject *)owner)->subsurface) { subdata = ((pgSurfaceObject *)owner)->subsurface; owner = subdata->owner; } Py_INCREF(owner); return owner; } static PyObject * surf_get_bounding_rect(PyObject *self, PyObject *args, PyObject *kwargs) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN const int BYTE0 = 0; const int BYTE1 = 1; const int BYTE2 = 2; #else const int BYTE0 = 2; const int BYTE1 = 1; const int BYTE2 = 0; #endif PyObject *rect; SDL_Surface *surf = pgSurface_AsSurface(self); SDL_PixelFormat *format = NULL; Uint8 *pixels = NULL; Uint8 *pixel; int x, y; int min_x, min_y, max_x, max_y; int min_alpha = 1; int found_alpha = 0; Uint32 value; Uint8 r, g, b, a; int has_colorkey = 0; Uint32 colorkey; Uint8 keyr, keyg, keyb; char *kwids[] = {"min_alpha", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwids, &min_alpha)) return RAISE(PyExc_ValueError, "get_bounding_rect only accepts a single optional " "min_alpha argument"); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (!pgSurface_Lock((pgSurfaceObject *)self)) return RAISE(pgExc_SDLError, "could not lock surface"); format = surf->format; if (SDL_GetColorKey(surf, &colorkey) == 0) { has_colorkey = 1; SDL_GetRGBA(colorkey, surf->format, &keyr, &keyg, &keyb, &a); } pixels = (Uint8 *)surf->pixels; min_y = 0; min_x = 0; max_x = surf->w; max_y = surf->h; found_alpha = 0; for (y = max_y - 1; y >= min_y; --y) { for (x = min_x; x < max_x; ++x) { pixel = (pixels + y * surf->pitch) + x * format->BytesPerPixel; switch (format->BytesPerPixel) { case 1: value = *pixel; break; case 2: value = *(Uint16 *)pixel; break; case 3: value = pixel[BYTE0]; value |= pixel[BYTE1] << 8; value |= pixel[BYTE2] << 16; break; default: assert(format->BytesPerPixel == 4); value = *(Uint32 *)pixel; } SDL_GetRGBA(value, surf->format, &r, &g, &b, &a); if ((a >= min_alpha && has_colorkey == 0) || (has_colorkey != 0 && (r != keyr || g != keyg || b != keyb))) { found_alpha = 1; break; } } if (found_alpha == 1) { break; } max_y = y; } found_alpha = 0; for (x = max_x - 1; x >= min_x; --x) { for (y = min_y; y < max_y; ++y) { pixel = (pixels + y * surf->pitch) + x * format->BytesPerPixel; switch (format->BytesPerPixel) { case 1: value = *pixel; break; case 2: value = *(Uint16 *)pixel; break; case 3: value = pixel[BYTE0]; value |= pixel[BYTE1] << 8; value |= pixel[BYTE2] << 16; break; default: assert(format->BytesPerPixel == 4); value = *(Uint32 *)pixel; } SDL_GetRGBA(value, surf->format, &r, &g, &b, &a); if ((a >= min_alpha && has_colorkey == 0) || (has_colorkey != 0 && (r != keyr || g != keyg || b != keyb))) { found_alpha = 1; break; } } if (found_alpha == 1) { break; } max_x = x; } found_alpha = 0; for (y = min_y; y < max_y; ++y) { min_y = y; for (x = min_x; x < max_x; ++x) { pixel = (pixels + y * surf->pitch) + x * format->BytesPerPixel; switch (format->BytesPerPixel) { case 1: value = *pixel; break; case 2: value = *(Uint16 *)pixel; break; case 3: value = pixel[BYTE0]; value |= pixel[BYTE1] << 8; value |= pixel[BYTE2] << 16; break; default: assert(format->BytesPerPixel == 4); value = *(Uint32 *)pixel; } SDL_GetRGBA(value, surf->format, &r, &g, &b, &a); if ((a >= min_alpha && has_colorkey == 0) || (has_colorkey != 0 && (r != keyr || g != keyg || b != keyb))) { found_alpha = 1; break; } } if (found_alpha == 1) { break; } } found_alpha = 0; for (x = min_x; x < max_x; ++x) { min_x = x; for (y = min_y; y < max_y; ++y) { pixel = (pixels + y * surf->pitch) + x * format->BytesPerPixel; switch (format->BytesPerPixel) { case 1: value = *pixel; break; case 2: value = *(Uint16 *)pixel; break; case 3: value = pixel[BYTE0]; value |= pixel[BYTE1] << 8; value |= pixel[BYTE2] << 16; break; default: assert(format->BytesPerPixel == 4); value = *(Uint32 *)pixel; } SDL_GetRGBA(value, surf->format, &r, &g, &b, &a); if ((a >= min_alpha && has_colorkey == 0) || (has_colorkey != 0 && (r != keyr || g != keyg || b != keyb))) { found_alpha = 1; break; } } if (found_alpha == 1) { break; } } if (!pgSurface_Unlock((pgSurfaceObject *)self)) return RAISE(pgExc_SDLError, "could not unlock surface"); rect = pgRect_New4(min_x, min_y, max_x - min_x, max_y - min_y); return rect; } static PyObject * _raise_get_view_ndim_error(int bitsize, SurfViewKind kind) { const char *name = ""; /* guard against a segfault */ /* Put a human readable name to a surface view kind */ switch (kind) { /* This switch statement is exhaustive over the SurfViewKind enum */ case VIEWKIND_0D: name = "contiguous bytes"; break; case VIEWKIND_1D: name = "contiguous pixels"; break; case VIEWKIND_2D: name = "2D"; break; case VIEWKIND_3D: name = "3D"; break; case VIEWKIND_RED: name = "red"; break; case VIEWKIND_GREEN: name = "green"; break; case VIEWKIND_BLUE: name = "blue"; break; case VIEWKIND_ALPHA: name = "alpha"; break; #ifndef NDEBUG /* Assert this switch statement is exhaustive */ default: /* Should not be here */ PyErr_Format(PyExc_SystemError, "pygame bug in _raise_get_view_ndim_error:" " unknown view kind %d", (int)kind); return 0; #endif } PyErr_Format(PyExc_ValueError, "unsupported bit depth %d for %s reference array", bitsize, name); return 0; } static PyObject * surf_get_view(PyObject *self, PyObject *args) { SDL_Surface *surface = pgSurface_AsSurface(self); SDL_PixelFormat *format; Uint32 mask = 0; SurfViewKind view_kind = VIEWKIND_2D; getbufferproc get_buffer = 0; if (!PyArg_ParseTuple(args, "|O&", _view_kind, &view_kind)) { return 0; } if (!surface) { return RAISE(pgExc_SDLError, "display Surface quit"); } format = surface->format; switch (view_kind) { /* This switch statement is exhaustive over the SurfViewKind enum */ case VIEWKIND_0D: if (surface->pitch != format->BytesPerPixel * surface->w) { PyErr_SetString(PyExc_ValueError, "Surface data is not contiguous"); return 0; } get_buffer = _get_buffer_0D; break; case VIEWKIND_1D: if (surface->pitch != format->BytesPerPixel * surface->w) { PyErr_SetString(PyExc_ValueError, "Surface data is not contiguous"); return 0; } get_buffer = _get_buffer_1D; break; case VIEWKIND_2D: get_buffer = _get_buffer_2D; break; case VIEWKIND_3D: if (format->BytesPerPixel < 3) { return _raise_get_view_ndim_error(format->BytesPerPixel * 8, view_kind); } if (format->Gmask != 0x00ff00 && (format->BytesPerPixel != 4 || format->Gmask != 0xff0000)) { return RAISE(PyExc_ValueError, "unsupported colormasks for 3D reference array"); } get_buffer = _get_buffer_3D; break; case VIEWKIND_RED: mask = format->Rmask; if (mask != 0x000000ffU && mask != 0x0000ff00U && mask != 0x00ff0000U && mask != 0xff000000U) { return RAISE(PyExc_ValueError, "unsupported colormasks for red reference array"); } get_buffer = _get_buffer_red; break; case VIEWKIND_GREEN: mask = format->Gmask; if (mask != 0x000000ffU && mask != 0x0000ff00U && mask != 0x00ff0000U && mask != 0xff000000U) { return RAISE( PyExc_ValueError, "unsupported colormasks for green reference array"); } get_buffer = _get_buffer_green; break; case VIEWKIND_BLUE: mask = format->Bmask; if (mask != 0x000000ffU && mask != 0x0000ff00U && mask != 0x00ff0000U && mask != 0xff000000U) { return RAISE( PyExc_ValueError, "unsupported colormasks for blue reference array"); } get_buffer = _get_buffer_blue; break; case VIEWKIND_ALPHA: mask = format->Amask; if (mask != 0x000000ffU && mask != 0x0000ff00U && mask != 0x00ff0000U && mask != 0xff000000U) { return RAISE( PyExc_ValueError, "unsupported colormasks for alpha reference array"); } get_buffer = _get_buffer_alpha; break; #ifndef NDEBUG /* Assert this switch statement is exhaustive */ default: /* Should not be here */ PyErr_Format(PyExc_SystemError, "pygame bug in surf_get_view:" " unrecognized view kind %d", (int)view_kind); return 0; #endif } assert(get_buffer); return pgBufproxy_New(self, get_buffer); } static PyObject * surf_get_buffer(PyObject *self, PyObject *_null) { SDL_Surface *surface = pgSurface_AsSurface(self); PyObject *proxy_obj; if (!surface) { return RAISE(pgExc_SDLError, "display Surface quit"); } proxy_obj = pgBufproxy_New(self, _get_buffer_0D); if (proxy_obj) { if (pgBufproxy_Trip(proxy_obj)) { Py_DECREF(proxy_obj); proxy_obj = 0; } } return proxy_obj; } static PyObject * surf_premul_alpha(pgSurfaceObject *self, PyObject *_null) { SDL_Surface *surf = pgSurface_AsSurface(self); PyObject *final; SDL_Surface *newsurf; if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pgSurface_Prep(self); // Make a copy of the surface first newsurf = SDL_ConvertSurface(surf, surf->format, 0); if (premul_surf_color_by_alpha(surf, newsurf) != 0) { return RAISE(PyExc_ValueError, "source surface to be alpha pre-multiplied must have " "alpha channel"); } pgSurface_Unprep(self); final = surf_subtype_new(Py_TYPE(self), newsurf, 1); if (!final) SDL_FreeSurface(newsurf); return final; } static int _get_buffer_0D(PyObject *obj, Py_buffer *view_p, int flags) { SDL_Surface *surface = pgSurface_AsSurface(obj); view_p->obj = 0; if (_init_buffer(obj, view_p, flags)) { return -1; } view_p->buf = surface->pixels; view_p->itemsize = 1; view_p->len = (Py_ssize_t)surface->pitch * surface->h; view_p->readonly = 0; if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { view_p->format = FormatUint8; } if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view_p->ndim = 1; view_p->shape[0] = view_p->len; if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view_p->strides[0] = view_p->itemsize; } } Py_INCREF(obj); view_p->obj = obj; return 0; } static int _get_buffer_1D(PyObject *obj, Py_buffer *view_p, int flags) { SDL_Surface *surface = pgSurface_AsSurface(obj); Py_ssize_t itemsize = surface->format->BytesPerPixel; view_p->obj = 0; if (itemsize == 1) { return _get_buffer_0D(obj, view_p, flags); } if (_init_buffer(obj, view_p, flags)) { return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { switch (itemsize) { /* This switch statement is exhaustive over all remaining possible itemsize values, the valid pixel byte sizes of non color-mapped images */ case 2: view_p->format = FormatUint16; break; case 3: view_p->format = FormatUint24; break; case 4: view_p->format = FormatUint32; break; #ifndef NDEBUG /* Assert this switch statement is exhaustive */ default: /* Should not be here */ PyErr_Format(PyExc_SystemError, "Pygame bug caught at line %i in file %s: " "unknown pixel size %zd. Please report", (int)__LINE__, __FILE__, itemsize); return -1; #endif } } view_p->buf = surface->pixels; view_p->itemsize = itemsize; view_p->readonly = 0; view_p->len = (Py_ssize_t)surface->pitch * surface->h; if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view_p->ndim = 1; view_p->shape[0] = (Py_ssize_t)surface->w * surface->h; if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view_p->strides[0] = itemsize; } } view_p->suboffsets = 0; Py_INCREF(obj); view_p->obj = obj; return 0; } static int _get_buffer_2D(PyObject *obj, Py_buffer *view_p, int flags) { SDL_Surface *surface = pgSurface_AsSurface(obj); int itemsize = surface->format->BytesPerPixel; view_p->obj = 0; if (!PyBUF_HAS_FLAG(flags, PyBUF_ND)) { if (surface->pitch != surface->w * itemsize) { PyErr_SetString(pgExc_BufferError, "A 2D surface view is not C contiguous"); return -1; } return _get_buffer_1D(obj, view_p, flags); } if (!PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { PyErr_SetString(pgExc_BufferError, "A 2D surface view is not C contiguous: " "need strides"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS)) { PyErr_SetString(pgExc_BufferError, "A 2D surface view is not C contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS) && surface->pitch != surface->w * itemsize) { PyErr_SetString(pgExc_BufferError, "This 2D surface view is not F contiguous"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS) && surface->pitch != surface->w * itemsize) { PyErr_SetString(pgExc_BufferError, "This 2D surface view is not contiguous"); return -1; } if (_init_buffer(obj, view_p, flags)) { return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { switch (itemsize) { /* This switch statement is exhaustive over all possible itemsize values, valid pixel byte sizes */ case 1: view_p->format = FormatUint8; break; case 2: view_p->format = FormatUint16; break; case 3: view_p->format = FormatUint24; break; case 4: view_p->format = FormatUint32; break; #ifndef NDEBUG /* Assert this switch statement is exhaustive */ default: /* Should not be here */ PyErr_Format(PyExc_SystemError, "Pygame bug caught at line %i in file %s: " "unknown pixel size %i. Please report", (int)__LINE__, __FILE__, itemsize); return -1; #endif } } view_p->buf = surface->pixels; view_p->itemsize = itemsize; view_p->ndim = 2; view_p->readonly = 0; view_p->len = (Py_ssize_t)surface->w * surface->h * itemsize; view_p->shape[0] = surface->w; view_p->shape[1] = surface->h; view_p->strides[0] = itemsize; view_p->strides[1] = surface->pitch; view_p->suboffsets = 0; Py_INCREF(obj); view_p->obj = obj; return 0; } static int _get_buffer_3D(PyObject *obj, Py_buffer *view_p, int flags) { SDL_Surface *surface = pgSurface_AsSurface(obj); int pixelsize = surface->format->BytesPerPixel; char *startpixel = (char *)surface->pixels; view_p->obj = 0; if (!PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { PyErr_SetString(pgExc_BufferError, "A 3D surface view is not contiguous: needs strides"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS) || PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS) || PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS)) { PyErr_SetString(pgExc_BufferError, "A 3D surface view is not contiguous"); return -1; } if (_init_buffer(obj, view_p, flags)) { return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { view_p->format = FormatUint8; } view_p->itemsize = 1; view_p->ndim = 3; view_p->readonly = 0; view_p->len = (Py_ssize_t)surface->w * surface->h * 3; view_p->shape[0] = surface->w; view_p->shape[1] = surface->h; view_p->shape[2] = 3; view_p->strides[0] = pixelsize; view_p->strides[1] = surface->pitch; switch (surface->format->Rmask) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN case 0xffU: view_p->strides[2] = 1; break; case 0xff00U: assert(pixelsize == 4); view_p->strides[2] = 1; startpixel += 1; break; case 0xff0000U: view_p->strides[2] = -1; startpixel += 2; break; default: /* 0xff000000U */ assert(pixelsize == 4); view_p->strides[2] = -1; startpixel += 3; #else /* SDL_BYTEORDER != SDL_LIL_ENDIAN */ case 0xffU: view_p->strides[2] = -1; startpixel += pixelsize - 1; break; case 0xff00U: assert(pixelsize == 4); view_p->strides[2] = -1; startpixel += pixelsize - 2; break; case 0xff0000U: view_p->strides[2] = 1; startpixel += pixelsize - 3; break; default: /* 0xff000000U */ assert(pixelsize == 4); view_p->strides[2] = 1; #endif /* SDL_BYTEORDER != SDL_LIL_ENDIAN */ } view_p->buf = startpixel; Py_INCREF(obj); view_p->obj = obj; return 0; } static int _get_buffer_red(PyObject *obj, Py_buffer *view_p, int flags) { return _get_buffer_colorplane(obj, view_p, flags, "red", pgSurface_AsSurface(obj)->format->Rmask); } static int _get_buffer_green(PyObject *obj, Py_buffer *view_p, int flags) { return _get_buffer_colorplane(obj, view_p, flags, "green", pgSurface_AsSurface(obj)->format->Gmask); } static int _get_buffer_blue(PyObject *obj, Py_buffer *view_p, int flags) { return _get_buffer_colorplane(obj, view_p, flags, "blue", pgSurface_AsSurface(obj)->format->Bmask); } static int _get_buffer_alpha(PyObject *obj, Py_buffer *view_p, int flags) { return _get_buffer_colorplane(obj, view_p, flags, "alpha", pgSurface_AsSurface(obj)->format->Amask); } static int _get_buffer_colorplane(PyObject *obj, Py_buffer *view_p, int flags, char *name, Uint32 mask) { SDL_Surface *surface = pgSurface_AsSurface(obj); int pixelsize = surface->format->BytesPerPixel; char *startpixel = (char *)surface->pixels; view_p->obj = 0; if (!PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { PyErr_SetString(pgExc_BufferError, "A surface color plane view is not contiguous: " "need strides"); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_C_CONTIGUOUS) || PyBUF_HAS_FLAG(flags, PyBUF_F_CONTIGUOUS) || PyBUF_HAS_FLAG(flags, PyBUF_ANY_CONTIGUOUS)) { PyErr_SetString(pgExc_BufferError, "A surface color plane view is not contiguous"); return -1; } switch (mask) { /* This switch statement is exhaustive over possible mask value, the allowable masks for 24 bit and 32 bit surfaces */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN case 0x000000ffU: break; case 0x0000ff00U: startpixel += 1; break; case 0x00ff0000U: startpixel += 2; break; case 0xff000000U: startpixel += 3; break; #else /* SDL_BYTEORDER != SDL_LIL_ENDIAN */ case 0x000000ffU: startpixel += pixelsize - 1; break; case 0x0000ff00U: startpixel += pixelsize - 2; break; case 0x00ff0000U: startpixel += pixelsize - 3; break; case 0xff000000U: break; #endif /* SDL_BYTEORDER != SDL_LIL_ENDIAN */ #ifndef NDEBUG /* Assert this switch statement is exhaustive */ default: /* Should not be here */ PyErr_Format(PyExc_SystemError, "Pygame bug caught at line %i in file %s: " "unknown mask value %p. Please report", (int)__LINE__, __FILE__, (void *)mask); return -1; #endif } if (_init_buffer(obj, view_p, flags)) { return -1; } view_p->buf = startpixel; if (PyBUF_HAS_FLAG(flags, PyBUF_FORMAT)) { view_p->format = FormatUint8; } view_p->itemsize = 1; view_p->ndim = 2; view_p->readonly = 0; view_p->len = (Py_ssize_t)surface->w * surface->h; view_p->shape[0] = surface->w; view_p->shape[1] = surface->h; view_p->strides[0] = pixelsize; view_p->strides[1] = surface->pitch; Py_INCREF(obj); view_p->obj = obj; return 0; } static int _init_buffer(PyObject *surf, Py_buffer *view_p, int flags) { PyObject *consumer; pg_bufferinternal *internal; assert(surf); assert(view_p); assert(pgSurface_Check(surf)); assert(PyBUF_HAS_FLAG(flags, PyBUF_PYGAME)); consumer = ((pg_buffer *)view_p)->consumer; assert(consumer); internal = PyMem_New(pg_bufferinternal, 1); if (!internal) { PyErr_NoMemory(); return -1; } internal->consumer_ref = PyWeakref_NewRef(consumer, 0); if (!internal->consumer_ref) { PyMem_Free(internal); return -1; } if (!pgSurface_LockBy((pgSurfaceObject *)surf, consumer)) { PyErr_Format(pgExc_BufferError, "Unable to lock <%s at %p> by <%s at %p>", Py_TYPE(surf)->tp_name, (void *)surf, Py_TYPE(consumer)->tp_name, (void *)consumer); Py_DECREF(internal->consumer_ref); PyMem_Free(internal); return -1; } if (PyBUF_HAS_FLAG(flags, PyBUF_ND)) { view_p->shape = internal->mem; if (PyBUF_HAS_FLAG(flags, PyBUF_STRIDES)) { view_p->strides = internal->mem + 3; } else { view_p->strides = 0; } } else { view_p->shape = 0; view_p->strides = 0; } view_p->ndim = 0; view_p->format = 0; view_p->suboffsets = 0; view_p->internal = internal; ((pg_buffer *)view_p)->release_buffer = _release_buffer; return 0; } static void _release_buffer(Py_buffer *view_p) { pg_bufferinternal *internal; PyObject *consumer_ref; PyObject *consumer; assert(view_p && view_p->obj && view_p->internal); internal = (pg_bufferinternal *)view_p->internal; consumer_ref = internal->consumer_ref; assert(consumer_ref && PyWeakref_CheckRef(consumer_ref)); consumer = PyWeakref_GetObject(consumer_ref); if (consumer) { if (!pgSurface_UnlockBy((pgSurfaceObject *)view_p->obj, consumer)) { PyErr_Clear(); } } Py_DECREF(consumer_ref); PyMem_Free(internal); Py_DECREF(view_p->obj); view_p->obj = 0; } static int _view_kind(PyObject *obj, void *view_kind_vptr) { unsigned long ch; SurfViewKind *view_kind_ptr = (SurfViewKind *)view_kind_vptr; if (PyUnicode_Check(obj)) { if (PyUnicode_GET_LENGTH(obj) != 1) { PyErr_SetString(PyExc_TypeError, "expected a length 1 string for argument 1"); return 0; } ch = PyUnicode_READ_CHAR(obj, 0); } else if (PyBytes_Check(obj)) { if (PyBytes_GET_SIZE(obj) != 1) { PyErr_SetString(PyExc_TypeError, "expected a length 1 string for argument 1"); return 0; } ch = *PyBytes_AS_STRING(obj); } else { PyErr_Format(PyExc_TypeError, "expected a length one string for argument 1: got '%s'", Py_TYPE(obj)->tp_name); return 0; } switch (ch) { case '0': *view_kind_ptr = VIEWKIND_0D; break; case '1': *view_kind_ptr = VIEWKIND_1D; break; case '2': *view_kind_ptr = VIEWKIND_2D; break; case 'R': case 'r': *view_kind_ptr = VIEWKIND_RED; break; case 'G': case 'g': *view_kind_ptr = VIEWKIND_GREEN; break; case 'B': case 'b': *view_kind_ptr = VIEWKIND_BLUE; break; case 'A': case 'a': *view_kind_ptr = VIEWKIND_ALPHA; break; case '3': *view_kind_ptr = VIEWKIND_3D; break; default: PyErr_Format(PyExc_TypeError, "unrecognized view kind '%c' for argument 1", (int)ch); return 0; } return 1; } static PyObject * surf_get_pixels_address(PyObject *self, PyObject *closure) { SDL_Surface *surface = pgSurface_AsSurface(self); void *address; if (!surface) { Py_RETURN_NONE; } if (!surface->pixels) { return PyLong_FromLong(0L); } address = surface->pixels; #if SIZEOF_VOID_P > SIZEOF_LONG return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)address); #else return PyLong_FromUnsignedLong((unsigned long)address); #endif } static void surface_move(Uint8 *src, Uint8 *dst, int h, int span, int srcpitch, int dstpitch) { if (src < dst) { src += (h - 1) * srcpitch; dst += (h - 1) * dstpitch; srcpitch = -srcpitch; dstpitch = -dstpitch; } while (h--) { memmove(dst, src, span); src += srcpitch; dst += dstpitch; } } static int surface_do_overlap(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) { Uint8 *srcpixels; Uint8 *dstpixels; int srcx = srcrect->x, srcy = srcrect->y; int dstx = dstrect->x, dsty = dstrect->y; int x, y; int w = srcrect->w, h = srcrect->h; int maxw, maxh; SDL_Rect *clip = &dst->clip_rect; int span; int dstoffset; /* clip the source rectangle to the source surface */ if (srcx < 0) { w += srcx; dstx -= srcx; srcx = 0; } maxw = src->w - srcx; if (maxw < w) { w = maxw; } if (srcy < 0) { h += srcy; dsty -= srcy; srcy = 0; } maxh = src->h - srcy; if (maxh < h) { h = maxh; } /* clip the destination rectangle against the clip rectangle */ x = clip->x - dstx; if (x > 0) { w -= x; dstx += x; srcx += x; } x = dstx + w - clip->x - clip->w; if (x > 0) { w -= x; } y = clip->y - dsty; if (y > 0) { h -= y; dsty += y; srcy += y; } y = dsty + h - clip->y - clip->h; if (y > 0) { h -= y; } if (w <= 0 || h <= 0) { return 0; } srcpixels = ((Uint8 *)src->pixels + srcy * src->pitch + srcx * src->format->BytesPerPixel); dstpixels = ((Uint8 *)dst->pixels + dsty * dst->pitch + dstx * dst->format->BytesPerPixel); if (dstpixels <= srcpixels) { return 0; } span = w * src->format->BytesPerPixel; if (dstpixels >= srcpixels + (h - 1) * src->pitch + span) { return 0; } dstoffset = (dstpixels - srcpixels) % src->pitch; return dstoffset < span || dstoffset > src->pitch - span; } /** * \brief Blit one surface onto another. * * \param dstobj The destination surface. * \param srcobj The source surface. * \param dstrect The destination rectangle. * \param srcrect The source rectangle. * \param the_args The blit flags. * \return 0 for success, -1 or -2 for error. * * \note Is accessible through the C api. */ int pgSurface_Blit(pgSurfaceObject *dstobj, pgSurfaceObject *srcobj, SDL_Rect *dstrect, SDL_Rect *srcrect, int the_args) { SDL_Surface *src = pgSurface_AsSurface(srcobj); SDL_Surface *dst = pgSurface_AsSurface(dstobj); SDL_Surface *subsurface = NULL; int result, suboffsetx = 0, suboffsety = 0; SDL_Rect orig_clip, sub_clip; Uint8 alpha; Uint32 key; /* passthrough blits to the real surface */ if (((pgSurfaceObject *)dstobj)->subsurface) { PyObject *owner; struct pgSubSurface_Data *subdata; subdata = ((pgSurfaceObject *)dstobj)->subsurface; owner = subdata->owner; subsurface = pgSurface_AsSurface(owner); suboffsetx = subdata->offsetx; suboffsety = subdata->offsety; while (((pgSurfaceObject *)owner)->subsurface) { subdata = ((pgSurfaceObject *)owner)->subsurface; owner = subdata->owner; subsurface = pgSurface_AsSurface(owner); suboffsetx += subdata->offsetx; suboffsety += subdata->offsety; } /* Only need to check the surface at the outermost surface (the non-subsurface) as a subsurface can't be the display surface and only a display surface can have the SDL_Surface being NULL */ if (!subsurface) { PyErr_SetString(pgExc_SDLError, "display Surface quit"); return 1; } SDL_GetClipRect(subsurface, &orig_clip); SDL_GetClipRect(dst, &sub_clip); sub_clip.x += suboffsetx; sub_clip.y += suboffsety; SDL_SetClipRect(subsurface, &sub_clip); dstrect->x += suboffsetx; dstrect->y += suboffsety; dst = subsurface; } else { pgSurface_Prep(dstobj); subsurface = NULL; } pgSurface_Prep(srcobj); if ((the_args != 0 && the_args != PYGAME_BLEND_ALPHA_SDL2) || ((SDL_GetColorKey(src, &key) == 0 || _PgSurface_SrcAlpha(src) == 1) && /* This simplification is possible because a source subsurface is converted to its owner with a clip rect and a dst subsurface cannot be blitted to its owner because the owner is locked. */ dst->pixels == src->pixels && srcrect != NULL && surface_do_overlap(src, srcrect, dst, dstrect))) { /* Py_BEGIN_ALLOW_THREADS */ result = pygame_Blit(src, srcrect, dst, dstrect, the_args); /* Py_END_ALLOW_THREADS */ } /* can't blit alpha to 8bit, crashes SDL */ else if (dst->format->BytesPerPixel == 1 && (SDL_ISPIXELFORMAT_ALPHA(src->format->format) || ((SDL_GetSurfaceAlphaMod(src, &alpha) == 0 && alpha != 255)))) { /* Py_BEGIN_ALLOW_THREADS */ if (src->format->BytesPerPixel == 1) { result = pygame_Blit(src, srcrect, dst, dstrect, 0); } else { SDL_PixelFormat *fmt = src->format; SDL_PixelFormat newfmt; newfmt.palette = 0; /* Set NULL (or SDL gets confused) */ newfmt.BitsPerPixel = fmt->BitsPerPixel; newfmt.BytesPerPixel = fmt->BytesPerPixel; newfmt.Amask = 0; newfmt.Rmask = fmt->Rmask; newfmt.Gmask = fmt->Gmask; newfmt.Bmask = fmt->Bmask; newfmt.Ashift = 0; newfmt.Rshift = fmt->Rshift; newfmt.Gshift = fmt->Gshift; newfmt.Bshift = fmt->Bshift; newfmt.Aloss = 0; newfmt.Rloss = fmt->Rloss; newfmt.Gloss = fmt->Gloss; newfmt.Bloss = fmt->Bloss; src = SDL_ConvertSurface(src, &newfmt, 0); if (src) { result = SDL_BlitSurface(src, srcrect, dst, dstrect); SDL_FreeSurface(src); } else { result = -1; } } /* Py_END_ALLOW_THREADS */ } else if (the_args != PYGAME_BLEND_ALPHA_SDL2 && !(pg_EnvShouldBlendAlphaSDL2()) && SDL_GetColorKey(src, &key) != 0 && (dst->format->BytesPerPixel == 4 || dst->format->BytesPerPixel == 2) && _PgSurface_SrcAlpha(src) && (SDL_ISPIXELFORMAT_ALPHA(src->format->format)) && !pg_HasSurfaceRLE(src) && !pg_HasSurfaceRLE(dst) && !(src->flags & SDL_RLEACCEL) && !(dst->flags & SDL_RLEACCEL)) { /* If we have a 32bit source surface with per pixel alpha and no RLE we'll use pygame_Blit so we can mimic how SDL1 behaved */ result = pygame_Blit(src, srcrect, dst, dstrect, the_args); } else { /* Py_BEGIN_ALLOW_THREADS */ result = SDL_BlitSurface(src, srcrect, dst, dstrect); /* Py_END_ALLOW_THREADS */ } if (subsurface) { SDL_SetClipRect(subsurface, &orig_clip); dstrect->x -= suboffsetx; dstrect->y -= suboffsety; } else pgSurface_Unprep(dstobj); pgSurface_Unprep(srcobj); if (result == -1) PyErr_SetString(pgExc_SDLError, SDL_GetError()); if (result == -2) PyErr_SetString(pgExc_SDLError, "Surface was lost"); return result != 0; } static PyMethodDef _surface_methods[] = {{NULL, NULL, 0, NULL}}; MODINIT_DEFINE(surface) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_SURFACE_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "surface", DOC_PYGAMESURFACE, -1, _surface_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_bufferproxy(); if (PyErr_Occurred()) { return NULL; } _IMPORT_PYGAME_MODULE(surflock); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&pgSurface_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } if (pg_warn_simd_at_runtime_but_uncompiled() < 0) { Py_DECREF(module); return NULL; } Py_INCREF(&pgSurface_Type); if (PyModule_AddObject(module, "SurfaceType", (PyObject *)&pgSurface_Type)) { Py_DECREF(&pgSurface_Type); Py_DECREF(module); return NULL; } Py_INCREF(&pgSurface_Type); if (PyModule_AddObject(module, "Surface", (PyObject *)&pgSurface_Type)) { Py_DECREF(&pgSurface_Type); Py_DECREF(module); return NULL; } /* export the c api */ c_api[0] = &pgSurface_Type; c_api[1] = pgSurface_New2; c_api[2] = pgSurface_Blit; c_api[3] = pgSurface_SetSurface; apiobj = encapsulate_api(c_api, "surface"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } Py_XINCREF(pgSurface_Type.tp_dict); if (PyModule_AddObject(module, "_dict", pgSurface_Type.tp_dict)) { Py_XDECREF(pgSurface_Type.tp_dict); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/surface.h0000644000175100001770000003437014676242340015320 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #ifndef SURFACE_H #define SURFACE_H /* This is defined in SDL.h */ #if defined(_POSIX_C_SOURCE) #undef _POSIX_C_SOURCE #endif #include #include "pygame.h" /* Blend modes */ #define PYGAME_BLEND_ADD 0x1 #define PYGAME_BLEND_SUB 0x2 #define PYGAME_BLEND_MULT 0x3 #define PYGAME_BLEND_MIN 0x4 #define PYGAME_BLEND_MAX 0x5 #define PYGAME_BLEND_RGB_ADD 0x1 #define PYGAME_BLEND_RGB_SUB 0x2 #define PYGAME_BLEND_RGB_MULT 0x3 #define PYGAME_BLEND_RGB_MIN 0x4 #define PYGAME_BLEND_RGB_MAX 0x5 #define PYGAME_BLEND_RGBA_ADD 0x6 #define PYGAME_BLEND_RGBA_SUB 0x7 #define PYGAME_BLEND_RGBA_MULT 0x8 #define PYGAME_BLEND_RGBA_MIN 0x9 #define PYGAME_BLEND_RGBA_MAX 0x10 #define PYGAME_BLEND_PREMULTIPLIED 0x11 #define PYGAME_BLEND_ALPHA_SDL2 0x12 #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define GET_PIXEL_24(b) (b[0] + (b[1] << 8) + (b[2] << 16)) #else #define GET_PIXEL_24(b) (b[2] + (b[1] << 8) + (b[0] << 16)) #endif #define GET_PIXEL(pxl, bpp, source) \ switch (bpp) { \ case 2: \ pxl = *((Uint16 *)(source)); \ break; \ case 4: \ pxl = *((Uint32 *)(source)); \ break; \ default: { \ Uint8 *b = (Uint8 *)source; \ pxl = GET_PIXEL_24(b); \ } break; \ } #define GET_PIXELVALS(_sR, _sG, _sB, _sA, px, fmt, ppa) \ SDL_GetRGBA(px, fmt, &(_sR), &(_sG), &(_sB), &(_sA)); \ if (!ppa) { \ _sA = 255; \ } #define GET_PIXELVALS_1(sr, sg, sb, sa, _src, _fmt) \ sr = _fmt->palette->colors[*((Uint8 *)(_src))].r; \ sg = _fmt->palette->colors[*((Uint8 *)(_src))].g; \ sb = _fmt->palette->colors[*((Uint8 *)(_src))].b; \ sa = 255; /* For 1 byte palette pixels */ #define SET_PIXELVAL(px, fmt, _dR, _dG, _dB, _dA) \ *(px) = (Uint8)SDL_MapRGBA(fmt, _dR, _dG, _dB, _dA) #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define SET_OFFSETS_24(or, og, ob, fmt) \ { \ or = (fmt->Rshift == 0 ? 0 : fmt->Rshift == 8 ? 1 : 2); \ og = (fmt->Gshift == 0 ? 0 : fmt->Gshift == 8 ? 1 : 2); \ ob = (fmt->Bshift == 0 ? 0 : fmt->Bshift == 8 ? 1 : 2); \ } #define SET_OFFSETS_32(or, og, ob, fmt) \ { \ or = (fmt->Rshift == 0 ? 0 \ : fmt->Rshift == 8 ? 1 \ : fmt->Rshift == 16 ? 2 \ : 3); \ og = (fmt->Gshift == 0 ? 0 \ : fmt->Gshift == 8 ? 1 \ : fmt->Gshift == 16 ? 2 \ : 3); \ ob = (fmt->Bshift == 0 ? 0 \ : fmt->Bshift == 8 ? 1 \ : fmt->Bshift == 16 ? 2 \ : 3); \ } #else #define SET_OFFSETS_24(or, og, ob, fmt) \ { \ or = (fmt->Rshift == 0 ? 2 : fmt->Rshift == 8 ? 1 : 0); \ og = (fmt->Gshift == 0 ? 2 : fmt->Gshift == 8 ? 1 : 0); \ ob = (fmt->Bshift == 0 ? 2 : fmt->Bshift == 8 ? 1 : 0); \ } #define SET_OFFSETS_32(or, og, ob, fmt) \ { \ or = (fmt->Rshift == 0 ? 3 \ : fmt->Rshift == 8 ? 2 \ : fmt->Rshift == 16 ? 1 \ : 0); \ og = (fmt->Gshift == 0 ? 3 \ : fmt->Gshift == 8 ? 2 \ : fmt->Gshift == 16 ? 1 \ : 0); \ ob = (fmt->Bshift == 0 ? 3 \ : fmt->Bshift == 8 ? 2 \ : fmt->Bshift == 16 ? 1 \ : 0); \ } #endif #define CREATE_PIXEL(buf, r, g, b, a, bp, ft) \ switch (bp) { \ case 2: \ *((Uint16 *)(buf)) = ((r >> ft->Rloss) << ft->Rshift) | \ ((g >> ft->Gloss) << ft->Gshift) | \ ((b >> ft->Bloss) << ft->Bshift) | \ ((a >> ft->Aloss) << ft->Ashift); \ break; \ case 4: \ *((Uint32 *)(buf)) = ((r >> ft->Rloss) << ft->Rshift) | \ ((g >> ft->Gloss) << ft->Gshift) | \ ((b >> ft->Bloss) << ft->Bshift) | \ ((a >> ft->Aloss) << ft->Ashift); \ break; \ } /* Pretty good idea from Tom Duff :-). */ #define LOOP_UNROLLED4(code, n, width) \ n = (width + 3) / 4; \ switch (width & 3) { \ case 0: \ do { \ code; \ case 3: \ code; \ case 2: \ code; \ case 1: \ code; \ } while (--n > 0); \ } /* Used in the srcbpp == dstbpp == 1 blend functions */ #define REPEAT_3(code) \ code; \ code; \ code; #define REPEAT_4(code) \ code; \ code; \ code; \ code; #define BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \ tmp = dR + sR; \ dR = (tmp <= 255 ? tmp : 255); \ tmp = dG + sG; \ dG = (tmp <= 255 ? tmp : 255); \ tmp = dB + sB; \ dB = (tmp <= 255 ? tmp : 255); #define BLEND_SUB(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \ tmp = dR - sR; \ dR = (tmp >= 0 ? tmp : 0); \ tmp = dG - sG; \ dG = (tmp >= 0 ? tmp : 0); \ tmp = dB - sB; \ dB = (tmp >= 0 ? tmp : 0); #define BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA) \ dR = (dR && sR) ? ((dR * sR) + 255) >> 8 : 0; \ dG = (dG && sG) ? ((dG * sG) + 255) >> 8 : 0; \ dB = (dB && sB) ? ((dB * sB) + 255) >> 8 : 0; #define BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA) \ if (sR < dR) { \ dR = sR; \ } \ if (sG < dG) { \ dG = sG; \ } \ if (sB < dB) { \ dB = sB; \ } #define BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA) \ if (sR > dR) { \ dR = sR; \ } \ if (sG > dG) { \ dG = sG; \ } \ if (sB > dB) { \ dB = sB; \ } #define BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \ tmp = dR + sR; \ dR = (tmp <= 255 ? tmp : 255); \ tmp = dG + sG; \ dG = (tmp <= 255 ? tmp : 255); \ tmp = dB + sB; \ dB = (tmp <= 255 ? tmp : 255); \ tmp = dA + sA; \ dA = (tmp <= 255 ? tmp : 255); #define BLEND_RGBA_SUB(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \ tmp = dR - sR; \ dR = (tmp >= 0 ? tmp : 0); \ tmp = dG - sG; \ dG = (tmp >= 0 ? tmp : 0); \ tmp = dB - sB; \ dB = (tmp >= 0 ? tmp : 0); \ tmp = dA - sA; \ dA = (tmp >= 0 ? tmp : 0); #define BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA) \ dR = (dR && sR) ? ((dR * sR) + 255) >> 8 : 0; \ dG = (dG && sG) ? ((dG * sG) + 255) >> 8 : 0; \ dB = (dB && sB) ? ((dB * sB) + 255) >> 8 : 0; \ dA = (dA && sA) ? ((dA * sA) + 255) >> 8 : 0; #define BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA) \ if (sR < dR) { \ dR = sR; \ } \ if (sG < dG) { \ dG = sG; \ } \ if (sB < dB) { \ dB = sB; \ } \ if (sA < dA) { \ dA = sA; \ } #define BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA) \ if (sR > dR) { \ dR = sR; \ } \ if (sG > dG) { \ dG = sG; \ } \ if (sB > dB) { \ dB = sB; \ } \ if (sA > dA) { \ dA = sA; \ } #if 1 /* Choose an alpha blend equation. If the sign is preserved on a right shift * then use a specialized, faster, equation. Otherwise a more general form, * where all additions are done before the shift, is needed. */ #if (-1 >> 1) < 0 #define ALPHA_BLEND_COMP(sC, dC, sA) ((((sC - dC) * sA + sC) >> 8) + dC) #else #define ALPHA_BLEND_COMP(sC, dC, sA) (((dC << 8) + (sC - dC) * sA + sC) >> 8) #endif #define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA) \ do { \ if (dA) { \ dR = ALPHA_BLEND_COMP(sR, dR, sA); \ dG = ALPHA_BLEND_COMP(sG, dG, sA); \ dB = ALPHA_BLEND_COMP(sB, dB, sA); \ dA = sA + dA - ((sA * dA) / 255); \ } \ else { \ dR = sR; \ dG = sG; \ dB = sB; \ dA = sA; \ } \ } while (0) #define ALPHA_BLEND_PREMULTIPLIED_COMP(sC, dC, sA) \ (sC + dC - ((dC + 1) * sA >> 8)) #define ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \ do { \ dR = ALPHA_BLEND_PREMULTIPLIED_COMP(sR, dR, sA); \ dG = ALPHA_BLEND_PREMULTIPLIED_COMP(sG, dG, sA); \ dB = ALPHA_BLEND_PREMULTIPLIED_COMP(sB, dB, sA); \ dA = ALPHA_BLEND_PREMULTIPLIED_COMP(sA, dA, sA); \ } while (0) #elif 0 #define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA) \ do { \ if (sA) { \ if (dA && sA < 255) { \ int dContrib = dA * (255 - sA) / 255; \ dA = sA + dA - ((sA * dA) / 255); \ dR = (dR * dContrib + sR * sA) / dA; \ dG = (dG * dContrib + sG * sA) / dA; \ dB = (dB * dContrib + sB * sA) / dA; \ } \ else { \ dR = sR; \ dG = sG; \ dB = sB; \ dA = sA; \ } \ } \ } while (0) #endif int surface_fill_blend(SDL_Surface *surface, SDL_Rect *rect, Uint32 color, int blendargs); void surface_respect_clip_rect(SDL_Surface *surface, SDL_Rect *rect); int pygame_AlphaBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args); int pygame_Blit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int the_args); int premul_surf_color_by_alpha(SDL_Surface *src, SDL_Surface *dst); int pg_warn_simd_at_runtime_but_uncompiled(); #endif /* SURFACE_H */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/surface_fill.c0000644000175100001770000006777414676242340016337 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2007 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define NO_PYGAME_C_API #include "_surface.h" /* * Changes SDL_Rect to respect any clipping rect defined on the surface. * Necessary when modifying surface->pixels directly instead of through an * SDL interface. */ void surface_respect_clip_rect(SDL_Surface *surface, SDL_Rect *rect) { SDL_Rect tmp; SDL_Rect *A, *B; int x, y, w, h; A = rect; B = &tmp; SDL_GetClipRect(surface, B); /* Code here is nearly identical to rect_clip in rect.c */ /* Left */ if ((A->x >= B->x) && (A->x < (B->x + B->w))) x = A->x; else if ((B->x >= A->x) && (B->x < (A->x + A->w))) x = B->x; else return; /* Right */ if (((A->x + A->w) > B->x) && ((A->x + A->w) <= (B->x + B->w))) w = (A->x + A->w) - x; else if (((B->x + B->w) > A->x) && ((B->x + B->w) <= (A->x + A->w))) w = (B->x + B->w) - x; else return; /* Top */ if ((A->y >= B->y) && (A->y < (B->y + B->h))) y = A->y; else if ((B->y >= A->y) && (B->y < (A->y + A->h))) y = B->y; else return; /* Bottom */ if (((A->y + A->h) > B->y) && ((A->y + A->h) <= (B->y + B->h))) h = (A->y + A->h) - y; else if (((B->y + B->h) > A->y) && ((B->y + B->h) <= (A->y + A->h))) h = (B->y + B->h) - y; else return; rect->x = x; rect->y = y; rect->w = w; rect->h = h; } static int surface_fill_blend_add(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; Uint32 tmp; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_ADD(tmp, cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } case 3: { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, fmt); GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_ADD(tmp, cR, cG, cB, cA, sR, sG, sB, sA); pixels[offsetR] = sR; pixels[offsetG] = sG; pixels[offsetB] = sB; pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_ADD(tmp, cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_sub(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; Sint32 tmp2; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_SUB(tmp2, cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } case 3: { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, fmt); GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_SUB(tmp2, cR, cG, cB, cA, sR, sG, sB, sA); pixels[offsetR] = sR; pixels[offsetG] = sG; pixels[offsetB] = sB; pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_SUB(tmp2, cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_mult(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_MULT(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } case 3: { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, fmt); GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MULT(cR, cG, cB, cA, sR, sG, sB, sA); pixels[offsetR] = sR; pixels[offsetG] = sG; pixels[offsetB] = sB; pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MULT(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_min(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_MIN(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } case 3: { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, fmt); GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MIN(cR, cG, cB, cA, sR, sG, sB, sA); pixels[offsetR] = sR; pixels[offsetG] = sG; pixels[offsetB] = sB; pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MIN(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_max(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_MAX(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } case 3: { size_t offsetR, offsetG, offsetB; SET_OFFSETS_24(offsetR, offsetG, offsetB, fmt); GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MAX(cR, cG, cB, cA, sR, sG, sB, sA); pixels[offsetR] = sR; pixels[offsetG] = sG; pixels[offsetB] = sB; pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_MAX(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } /* ------------------------- */ static int surface_fill_blend_rgba_add(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; Uint32 tmp; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); if (!ppa) { return surface_fill_blend_add(surface, rect, color); } pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_RGBA_ADD(tmp, cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_RGBA_ADD(tmp, cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_rgba_sub(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; Sint32 tmp2; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); if (!ppa) { return surface_fill_blend_sub(surface, rect, color); } pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_RGBA_SUB(tmp2, cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_RGBA_SUB(tmp2, cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_rgba_mult(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); if (!ppa) { return surface_fill_blend_mult(surface, rect, color); } pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_RGBA_MULT(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_RGBA_MULT(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_rgba_min(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); if (!ppa) { return surface_fill_blend_min(surface, rect, color); } pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_RGBA_MIN(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_RGBA_MIN(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } static int surface_fill_blend_rgba_max(SDL_Surface *surface, SDL_Rect *rect, Uint32 color) { Uint8 *pixels; int width = rect->w; int height = rect->h; int skip; int bpp = surface->format->BytesPerPixel; int n; SDL_PixelFormat *fmt = surface->format; Uint8 sR, sG, sB, sA, cR, cG, cB, cA; Uint32 pixel; int result = -1; int ppa; SDL_BlendMode mode; SDL_GetSurfaceBlendMode(surface, &mode); ppa = (fmt->Amask && mode != SDL_BLENDMODE_NONE); if (!ppa) { return surface_fill_blend_max(surface, rect, color); } pixels = (Uint8 *)surface->pixels + (Uint16)rect->y * surface->pitch + (Uint16)rect->x * bpp; skip = surface->pitch - width * bpp; switch (bpp) { case 1: { SDL_GetRGBA(color, fmt, &cR, &cG, &cB, &cA); while (height--) { LOOP_UNROLLED4( { GET_PIXELVALS_1(sR, sG, sB, sA, pixels, fmt); BLEND_RGBA_MAX(cR, cG, cB, cA, sR, sG, sB, sA); *pixels = SDL_MapRGBA(fmt, sR, sG, sB, sA); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } default: { GET_PIXELVALS(cR, cG, cB, cA, color, fmt, ppa); /* printf ("Color: %d, %d, %d, %d, BPP is: %d\n", cR, cG, cB, cA, bpp); */ while (height--) { LOOP_UNROLLED4( { GET_PIXEL(pixel, bpp, pixels); GET_PIXELVALS(sR, sG, sB, sA, pixel, fmt, ppa); BLEND_RGBA_MAX(cR, cG, cB, cA, sR, sG, sB, sA); CREATE_PIXEL(pixels, sR, sG, sB, sA, bpp, fmt); pixels += bpp; }, n, width); pixels += skip; } result = 0; break; } } return result; } int surface_fill_blend(SDL_Surface *surface, SDL_Rect *rect, Uint32 color, int blendargs) { int result = -1; int locked = 0; surface_respect_clip_rect(surface, rect); /* Lock the surface, if needed */ if (SDL_MUSTLOCK(surface)) { if (SDL_LockSurface(surface) < 0) return -1; locked = 1; } switch (blendargs) { case PYGAME_BLEND_ADD: { result = surface_fill_blend_add(surface, rect, color); break; } case PYGAME_BLEND_SUB: { result = surface_fill_blend_sub(surface, rect, color); break; } case PYGAME_BLEND_MULT: { result = surface_fill_blend_mult(surface, rect, color); break; } case PYGAME_BLEND_MIN: { result = surface_fill_blend_min(surface, rect, color); break; } case PYGAME_BLEND_MAX: { result = surface_fill_blend_max(surface, rect, color); break; } case PYGAME_BLEND_RGBA_ADD: { result = surface_fill_blend_rgba_add(surface, rect, color); break; } case PYGAME_BLEND_RGBA_SUB: { result = surface_fill_blend_rgba_sub(surface, rect, color); break; } case PYGAME_BLEND_RGBA_MULT: { result = surface_fill_blend_rgba_mult(surface, rect, color); break; } case PYGAME_BLEND_RGBA_MIN: { result = surface_fill_blend_rgba_min(surface, rect, color); break; } case PYGAME_BLEND_RGBA_MAX: { result = surface_fill_blend_rgba_max(surface, rect, color); break; } default: { result = -1; break; } } if (locked) { SDL_UnlockSurface(surface); } return result; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/surflock.c0000644000175100001770000001621414676242340015510 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2008 Marcus von Appen This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * internal surface locking support for python objects */ #define PYGAMEAPI_SURFLOCK_INTERNAL #include "pygame.h" #include "pgcompat.h" static int pgSurface_Lock(pgSurfaceObject *); static int pgSurface_Unlock(pgSurfaceObject *); static int pgSurface_LockBy(pgSurfaceObject *, PyObject *); static int pgSurface_UnlockBy(pgSurfaceObject *, PyObject *); static void _lifelock_dealloc(PyObject *); static void pgSurface_Prep(pgSurfaceObject *surfobj) { struct pgSubSurface_Data *data = ((pgSurfaceObject *)surfobj)->subsurface; if (data != NULL) { SDL_Surface *surf = pgSurface_AsSurface(surfobj); SDL_Surface *owner = pgSurface_AsSurface(data->owner); pgSurface_LockBy((pgSurfaceObject *)data->owner, (PyObject *)surfobj); surf->pixels = ((char *)owner->pixels) + data->pixeloffset; } } static void pgSurface_Unprep(pgSurfaceObject *surfobj) { struct pgSubSurface_Data *data = ((pgSurfaceObject *)surfobj)->subsurface; if (data != NULL) { pgSurface_UnlockBy((pgSurfaceObject *)data->owner, (PyObject *)surfobj); } } static int pgSurface_Lock(pgSurfaceObject *surfobj) { return pgSurface_LockBy(surfobj, (PyObject *)surfobj); } static int pgSurface_Unlock(pgSurfaceObject *surfobj) { return pgSurface_UnlockBy(surfobj, (PyObject *)surfobj); } static int pgSurface_LockBy(pgSurfaceObject *surfobj, PyObject *lockobj) { PyObject *ref; pgSurfaceObject *surf = (pgSurfaceObject *)surfobj; if (surf->locklist == NULL) { surf->locklist = PyList_New(0); if (surf->locklist == NULL) { return 0; } } ref = PyWeakref_NewRef(lockobj, NULL); if (ref == NULL) { return 0; } if (ref == Py_None) { Py_DECREF(ref); return 0; } if (0 != PyList_Append(surf->locklist, ref)) { Py_DECREF(ref); return 0; /* Exception already set. */ } Py_DECREF(ref); if (surf->subsurface != NULL) { pgSurface_Prep(surfobj); } if (SDL_LockSurface(surf->surf) == -1) { PyErr_SetString(PyExc_RuntimeError, "error locking surface"); return 0; } return 1; } static int pgSurface_UnlockBy(pgSurfaceObject *surfobj, PyObject *lockobj) { pgSurfaceObject *surf = (pgSurfaceObject *)surfobj; int found = 0; int noerror = 1; if (surf->locklist != NULL) { PyObject *item, *ref; Py_ssize_t len = PyList_Size(surf->locklist); while (--len >= 0 && !found) { item = PyList_GetItem(surf->locklist, len); ref = PyWeakref_GetObject(item); if (ref == lockobj) { if (PySequence_DelItem(surf->locklist, len) == -1) { return 0; } else { found = 1; } } } /* Clear dead references */ len = PyList_Size(surf->locklist); while (--len >= 0) { item = PyList_GetItem(surf->locklist, len); ref = PyWeakref_GetObject(item); if (ref == Py_None) { if (PySequence_DelItem(surf->locklist, len) == -1) { noerror = 0; } else { found++; } } } } if (!found) { return noerror; } /* Release all found locks. */ while (found > 0) { if (surf->surf != NULL) { SDL_UnlockSurface(surf->surf); } if (surf->subsurface != NULL) { pgSurface_Unprep(surfobj); } found--; } return noerror; } static PyTypeObject pgLifetimeLock_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.surflock.SurfLifeLock", .tp_basicsize = sizeof(pgLifetimeLockObject), .tp_dealloc = _lifelock_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_weaklistoffset = offsetof(pgLifetimeLockObject, weakrefs), }; /* lifetimelock object internals */ static void _lifelock_dealloc(PyObject *self) { pgLifetimeLockObject *lifelock = (pgLifetimeLockObject *)self; if (lifelock->weakrefs != NULL) { PyObject_ClearWeakRefs(self); } pgSurface_UnlockBy((pgSurfaceObject *)lifelock->surface, lifelock->lockobj); Py_DECREF(lifelock->surface); PyObject_Free(self); } static PyObject * pgSurface_LockLifetime(PyObject *surfobj, PyObject *lockobj) { pgLifetimeLockObject *life; if (surfobj == NULL) { return RAISE(pgExc_SDLError, SDL_GetError()); } life = PyObject_New(pgLifetimeLockObject, &pgLifetimeLock_Type); if (life != NULL) { life->surface = surfobj; life->lockobj = lockobj; life->weakrefs = NULL; Py_INCREF(surfobj); if (!pgSurface_LockBy((pgSurfaceObject *)surfobj, lockobj)) { return NULL; } } return (PyObject *)life; } static PyMethodDef _surflock_methods[] = {{NULL, NULL, 0, NULL}}; /*DOC*/ static char _surflock_doc[] = /*DOC*/ "Surface locking support"; MODINIT_DEFINE(surflock) { PyObject *module, *apiobj; static void *c_api[PYGAMEAPI_SURFLOCK_NUMSLOTS]; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "surflock", _surflock_doc, -1, _surflock_methods, NULL, NULL, NULL, NULL}; if (PyType_Ready(&pgLifetimeLock_Type) < 0) { return NULL; } /* Create the module and add the functions */ module = PyModule_Create(&_module); if (module == NULL) { return NULL; } /* export the c api */ c_api[0] = &pgLifetimeLock_Type; c_api[1] = pgSurface_Prep; c_api[2] = pgSurface_Unprep; c_api[3] = pgSurface_Lock; c_api[4] = pgSurface_Unlock; c_api[5] = pgSurface_LockBy; c_api[6] = pgSurface_UnlockBy; c_api[7] = pgSurface_LockLifetime; apiobj = encapsulate_api(c_api, "surflock"); if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { Py_XDECREF(apiobj); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/time.c0000644000175100001770000004146614676242340014625 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ #include "pygame.h" #include "pgcompat.h" #include "doc/time_doc.h" #define WORST_CLOCK_ACCURACY 12 /** * Linked list structure to hold timer data. */ typedef struct pgEventTimer { struct pgEventTimer *next; /** Pointer to the next timer in the linked list. */ intptr_t timer_id; /** The ID of the timer. */ pgEventObject *event; /** The event object associated with the timer. */ int repeat; /** The number of times the timer should repeat. */ } pgEventTimer; /** * pg_event_timer is a pointer to the first timer in a linked list of * pgEventTimer structures. Each pgEventTimer structure represents a timer that * has been created using pygame.time.set_timer. The linked list is used to * keep track of all the timers that have been created. If no timers have been * created, pg_event_timer is NULL. */ static pgEventTimer *pg_event_timer = NULL; /** * timermutex is a mutex used to protect the pg_event_timer linked list. * It is created when pygame.time.autoinit is called, and destroyed when * pygame.time.autoquit is called. */ static SDL_mutex *timermutex = NULL; /** * pg_timer_id is an integer that is incremented each time a timer is created. */ static intptr_t pg_timer_id = 0; static PyObject * pg_time_autoquit(PyObject *self, PyObject *_null) { pgEventTimer *hunt, *todel; /* We can let errors silently pass in this function, because this * needs to run */ if (timermutex) { SDL_LockMutex(timermutex); } if (pg_event_timer) { hunt = pg_event_timer; while (hunt) { todel = hunt; hunt = hunt->next; Py_DECREF(todel->event); PyMem_Free(todel); } pg_event_timer = NULL; pg_timer_id = 0; } if (timermutex) { SDL_UnlockMutex(timermutex); /* After we are done, we can destroy the mutex as well */ SDL_DestroyMutex(timermutex); timermutex = NULL; } Py_RETURN_NONE; } static PyObject * pg_time_autoinit(PyObject *self, PyObject *_null) { #ifndef __EMSCRIPTEN__ /* allocate a mutex for timer data holding struct*/ if (!timermutex) { timermutex = SDL_CreateMutex(); if (!timermutex) return RAISE(pgExc_SDLError, SDL_GetError()); } #endif Py_RETURN_NONE; } static intptr_t _pg_add_event_timer(pgEventObject *ev, int repeat) { pgEventTimer *new; new = PyMem_New(pgEventTimer, 1); if (!new) { PyErr_NoMemory(); return 0; } if (SDL_LockMutex(timermutex) < 0) { /* this case will almost never happen, but still handle it */ PyMem_Free(new); PyErr_SetString(pgExc_SDLError, SDL_GetError()); return 0; } pg_timer_id++; Py_XINCREF(ev); new->next = pg_event_timer; new->timer_id = pg_timer_id; new->event = ev; new->repeat = repeat; pg_event_timer = new; /* Chances of it failing here are next to zero, dont do anything */ SDL_UnlockMutex(timermutex); return new->timer_id; } /** * \brief Removes the pgEventTimer struct associated with the given * pgEventObject from the linked list of timers. * * \param ev The pgEventObject to remove from the linked list of timers. * * \note Requires GIL. * \note Requires locking of timermutex. */ static void _pg_remove_event_timer(pgEventObject *ev) { pgEventTimer *hunt, *prev = NULL; if (!pg_event_timer) { /* No timers, quit early */ return; } if (SDL_LockMutex(timermutex) < 0) return; hunt = pg_event_timer; while (hunt->event->type != ev->type) { prev = hunt; hunt = hunt->next; if (!hunt) { /* Reached end without finding a match, quit early */ SDL_UnlockMutex(timermutex); return; } } if (prev) prev->next = hunt->next; else pg_event_timer = hunt->next; Py_DECREF(hunt->event); PyMem_Del(hunt); /* Chances of it failing here are next to zero, dont do anything */ SDL_UnlockMutex(timermutex); } /** * Returns the pgEventTimer struct associated with the given timer_id. * Decrements the repeat counter of the timer by 1 if it is greater than or * equal to 0. * * \param timer_id The ID of the timer to retrieve. * \returns A pointer to the pgEventTimer struct associated with the given * timer_id, or NULL if not found. * * \note No GIL required * \note Requires timermutex lock */ static pgEventTimer * _pg_get_event_on_timer(intptr_t timer_id) { pgEventTimer *hunt, *found; if (SDL_LockMutex(timermutex) < 0) return NULL; hunt = pg_event_timer; found = NULL; while (hunt) { if (hunt->timer_id == timer_id) { if (hunt->repeat >= 0) { hunt->repeat--; } found = hunt; break; } hunt = hunt->next; } /* Chances of it failing here are next to zero, dont do anything */ SDL_UnlockMutex(timermutex); return found; } static Uint32 timer_callback(Uint32 interval, void *param) { pgEventTimer *evtimer; SDL_Event event; PyGILState_STATE gstate; /* This function runs in a separate thread, so we acquire the GIL, * pgEvent_FillUserEvent and _pg_remove_event_timer do python API calls */ gstate = PyGILState_Ensure(); evtimer = _pg_get_event_on_timer((intptr_t)param); if (evtimer == NULL) { PyGILState_Release(gstate); return 0; } if (SDL_WasInit(SDL_INIT_VIDEO)) { if (evtimer->event && evtimer->event->dict) { pgEvent_FillUserEvent(evtimer->event, &event); if (SDL_PushEvent(&event) <= 0) Py_DECREF(evtimer->event->dict); } } else evtimer->repeat = 0; if (!evtimer->repeat) { /* This does memory cleanup */ _pg_remove_event_timer(evtimer->event); interval = 0; } PyGILState_Release(gstate); return interval; } static int accurate_delay(int ticks) { int funcstart, delay; if (ticks <= 0) return 0; if (!SDL_WasInit(SDL_INIT_TIMER)) { if (SDL_InitSubSystem(SDL_INIT_TIMER)) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); return -1; } } funcstart = SDL_GetTicks(); if (ticks >= WORST_CLOCK_ACCURACY) { delay = (ticks - 2) - (ticks % WORST_CLOCK_ACCURACY); if (delay >= WORST_CLOCK_ACCURACY) { Py_BEGIN_ALLOW_THREADS; SDL_Delay(delay); Py_END_ALLOW_THREADS; } } do { delay = ticks - (SDL_GetTicks() - funcstart); } while (delay > 0); return SDL_GetTicks() - funcstart; } static PyObject * time_get_ticks(PyObject *self, PyObject *_null) { if (!SDL_WasInit(SDL_INIT_TIMER)) return PyLong_FromLong(0); return PyLong_FromLong(SDL_GetTicks()); } static PyObject * time_delay(PyObject *self, PyObject *arg) { int ticks; if (!PyLong_Check(arg)) return RAISE(PyExc_TypeError, "delay requires one integer argument"); ticks = PyLong_AsLong(arg); if (ticks < 0) ticks = 0; ticks = accurate_delay(ticks); if (ticks == -1) return NULL; return PyLong_FromLong(ticks); } static PyObject * time_wait(PyObject *self, PyObject *arg) { int ticks, start; if (!PyLong_Check(arg)) return RAISE(PyExc_TypeError, "wait requires one integer argument"); if (!SDL_WasInit(SDL_INIT_TIMER)) { if (SDL_InitSubSystem(SDL_INIT_TIMER)) { return RAISE(pgExc_SDLError, SDL_GetError()); } } ticks = PyLong_AsLong(arg); if (ticks < 0) ticks = 0; start = SDL_GetTicks(); Py_BEGIN_ALLOW_THREADS; SDL_Delay(ticks); Py_END_ALLOW_THREADS; return PyLong_FromLong(SDL_GetTicks() - start); } static PyObject * time_set_timer(PyObject *self, PyObject *args, PyObject *kwargs) { int ticks, loops = 0; intptr_t timer_id; PyObject *obj; pgEventObject *e; static char *kwids[] = {"event", "millis", "loops", NULL}; #ifdef __EMSCRIPTEN__ return RAISE(PyExc_NotImplementedError, "set_timer is not implemented on WASM yet"); #endif if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|i", kwids, &obj, &ticks, &loops)) return NULL; if (!timermutex) return RAISE(pgExc_SDLError, "pygame is not initialized"); if (PyLong_Check(obj)) { e = (pgEventObject *)pgEvent_New2(PyLong_AsLong(obj), NULL); if (!e) return NULL; } else if (pgEvent_Check(obj)) { Py_INCREF(obj); e = (pgEventObject *)obj; } else return RAISE(PyExc_TypeError, "first argument must be an event type or event object"); /* stop original timer, if it exists */ _pg_remove_event_timer(e); if (ticks <= 0) { Py_DECREF(e); Py_RETURN_NONE; } /* just doublecheck that timer is initialized */ if (!SDL_WasInit(SDL_INIT_TIMER)) { if (SDL_InitSubSystem(SDL_INIT_TIMER)) { Py_DECREF(e); return RAISE(pgExc_SDLError, SDL_GetError()); } } timer_id = _pg_add_event_timer(e, loops); if (!timer_id) { Py_DECREF(e); return NULL; } if (!SDL_AddTimer(ticks, timer_callback, (void *)timer_id)) { _pg_remove_event_timer(e); /* Does cleanup */ return RAISE(pgExc_SDLError, SDL_GetError()); } Py_RETURN_NONE; } /*clock object interface*/ typedef struct { PyObject_HEAD int last_tick; int fps_count, fps_tick; float fps; int timepassed, rawpassed; PyObject *rendered; } PyClockObject; // to be called by the other tick functions. static PyObject * clock_tick_base(PyObject *self, PyObject *arg, int use_accurate_delay) { PyClockObject *_clock = (PyClockObject *)self; float framerate = 0.0f; int nowtime; if (!PyArg_ParseTuple(arg, "|f", &framerate)) return NULL; if (framerate) { int delay, endtime = (int)((1.0f / framerate) * 1000.0f); _clock->rawpassed = SDL_GetTicks() - _clock->last_tick; delay = endtime - _clock->rawpassed; /*just doublecheck that timer is initialized*/ if (!SDL_WasInit(SDL_INIT_TIMER)) { if (SDL_InitSubSystem(SDL_INIT_TIMER)) { return RAISE(pgExc_SDLError, SDL_GetError()); } } if (use_accurate_delay) delay = accurate_delay(delay); else { // this uses sdls delay, which can be inaccurate. if (delay < 0) delay = 0; Py_BEGIN_ALLOW_THREADS; SDL_Delay((Uint32)delay); Py_END_ALLOW_THREADS; } if (delay == -1) return NULL; } nowtime = SDL_GetTicks(); _clock->timepassed = nowtime - _clock->last_tick; _clock->fps_count += 1; _clock->last_tick = nowtime; if (!framerate) _clock->rawpassed = _clock->timepassed; if (!_clock->fps_tick) { _clock->fps_count = 0; _clock->fps_tick = nowtime; } else if (_clock->fps_count >= 10) { _clock->fps = _clock->fps_count / ((nowtime - _clock->fps_tick) / 1000.0f); _clock->fps_count = 0; _clock->fps_tick = nowtime; Py_XDECREF(_clock->rendered); } return PyLong_FromLong(_clock->timepassed); } static PyObject * clock_tick(PyObject *self, PyObject *arg) { return clock_tick_base(self, arg, 0); } static PyObject * clock_tick_busy_loop(PyObject *self, PyObject *arg) { return clock_tick_base(self, arg, 1); } static PyObject * clock_get_fps(PyObject *self, PyObject *_null) { PyClockObject *_clock = (PyClockObject *)self; return PyFloat_FromDouble(_clock->fps); } static PyObject * clock_get_time(PyObject *self, PyObject *_null) { PyClockObject *_clock = (PyClockObject *)self; return PyLong_FromLong(_clock->timepassed); } static PyObject * clock_get_rawtime(PyObject *self, PyObject *_null) { PyClockObject *_clock = (PyClockObject *)self; return PyLong_FromLong(_clock->rawpassed); } /* clock object internals */ static struct PyMethodDef clock_methods[] = { {"tick", clock_tick, METH_VARARGS, DOC_CLOCKTICK}, {"get_fps", clock_get_fps, METH_NOARGS, DOC_CLOCKGETFPS}, {"get_time", clock_get_time, METH_NOARGS, DOC_CLOCKGETTIME}, {"get_rawtime", clock_get_rawtime, METH_NOARGS, DOC_CLOCKGETRAWTIME}, {"tick_busy_loop", clock_tick_busy_loop, METH_VARARGS, DOC_CLOCKTICKBUSYLOOP}, {NULL, NULL, 0, NULL}}; static void clock_dealloc(PyObject *self) { PyClockObject *_clock = (PyClockObject *)self; Py_XDECREF(_clock->rendered); PyObject_Free(self); } PyObject * clock_str(PyObject *self) { char str[64]; PyClockObject *_clock = (PyClockObject *)self; int ret = PyOS_snprintf(str, 64, "", _clock->fps); if (ret < 0 || ret >= 64) { return RAISE(PyExc_RuntimeError, "Internal PyOS_snprintf call failed!"); } return PyUnicode_FromString(str); } static PyObject * clock_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { char *kwids[] = {NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "", kwids)) { /* This function does not actually take in any arguments, but this * argparse function is used to generate pythonic error messages if * any args are passed */ return NULL; } if (!SDL_WasInit(SDL_INIT_TIMER)) { if (SDL_InitSubSystem(SDL_INIT_TIMER)) { return RAISE(pgExc_SDLError, SDL_GetError()); } } PyClockObject *self = (PyClockObject *)(type->tp_alloc(type, 0)); self->fps_tick = 0; self->timepassed = 0; self->rawpassed = 0; self->last_tick = SDL_GetTicks(); self->fps = 0.0f; self->fps_count = 0; self->rendered = NULL; return (PyObject *)self; } static PyTypeObject PyClock_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.time.Clock", .tp_basicsize = sizeof(PyClockObject), .tp_dealloc = clock_dealloc, .tp_repr = clock_str, .tp_str = clock_str, .tp_doc = DOC_PYGAMETIMECLOCK, .tp_methods = clock_methods, .tp_new = clock_new, }; static PyMethodDef _time_methods[] = { {"_internal_mod_init", (PyCFunction)pg_time_autoinit, METH_NOARGS, "auto initialize function for time"}, {"_internal_mod_quit", (PyCFunction)pg_time_autoquit, METH_NOARGS, "auto quit function for time"}, {"get_ticks", (PyCFunction)time_get_ticks, METH_NOARGS, DOC_PYGAMETIMEGETTICKS}, {"delay", time_delay, METH_O, DOC_PYGAMETIMEDELAY}, {"wait", time_wait, METH_O, DOC_PYGAMETIMEWAIT}, {"set_timer", (PyCFunction)time_set_timer, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETIMESETTIMER}, {NULL, NULL, 0, NULL}}; #if defined(BUILD_STATIC) // avoid PyInit_time conflict with static builtin MODINIT_DEFINE(pg_time) #else MODINIT_DEFINE(time) #endif // BUILD_STATIC { PyObject *module; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "time", DOC_PYGAMETIME, -1, _time_methods, NULL, NULL, NULL, NULL}; /* need to import base module, just so SDL is happy. Do this first so if the module is there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_event(); if (PyErr_Occurred()) { return NULL; } /* type preparation */ if (PyType_Ready(&PyClock_Type) < 0) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (!module) { return NULL; } Py_INCREF(&PyClock_Type); if (PyModule_AddObject(module, "Clock", (PyObject *)&PyClock_Type)) { Py_DECREF(&PyClock_Type); Py_DECREF(module); return NULL; } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/transform.c0000644000175100001770000032253514676242340015701 0ustar00runnerdocker/* pygame - Python Game Library Copyright (C) 2000-2001 Pete Shinners Copyright (C) 2007 Rene Dudfield, Richard Goedeken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Pete Shinners pete@shinners.org */ /* * surface transformations for pygame */ #include "pygame.h" #include "pgcompat.h" #include "doc/transform_doc.h" #include #include #include "scale.h" typedef void (*SMOOTHSCALE_FILTER_P)(Uint8 *, Uint8 *, int, int, int, int, int); struct _module_state { const char *filter_type; SMOOTHSCALE_FILTER_P filter_shrink_X; SMOOTHSCALE_FILTER_P filter_shrink_Y; SMOOTHSCALE_FILTER_P filter_expand_X; SMOOTHSCALE_FILTER_P filter_expand_Y; }; #define GETSTATE(m) ((struct _module_state *)PyModule_GetState(m)) #ifdef SCALE_MMX_SUPPORT #include #endif /* SCALE_MMX_SUPPORT */ void scale2x(SDL_Surface *src, SDL_Surface *dst); void scale2xraw(SDL_Surface *src, SDL_Surface *dst); extern SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth); static int _get_factor(PyObject *factorobj, float *x, float *y) { Py_ssize_t len = PyObject_Length(factorobj); if (PyErr_Occurred()) { PyErr_Clear(); } if (len > 2) { PyErr_Format(PyExc_TypeError, "factor should be either one number or a sequence of two " "numbers."); return 0; } if (len == 2) { if (!pg_TwoFloatsFromObj(factorobj, x, y)) { PyErr_Format(PyExc_TypeError, "factor should be either one number or a sequence of " "two numbers."); return 0; } return 1; } if (!pg_FloatFromObj(factorobj, x)) { PyErr_Format(PyExc_TypeError, "factor should be either one number or a sequence of two " "numbers."); return 0; } *y = *x; return 1; } #if defined(BUILD_STATIC) extern int _PgSurface_SrcAlpha(SDL_Surface *surf); #else static int _PgSurface_SrcAlpha(SDL_Surface *surf) { if (SDL_ISPIXELFORMAT_ALPHA(surf->format->format)) { SDL_BlendMode mode; if (SDL_GetSurfaceBlendMode(surf, &mode) < 0) { return -1; } if (mode == SDL_BLENDMODE_BLEND) return 1; } else { Uint8 color = SDL_ALPHA_OPAQUE; if (SDL_GetSurfaceAlphaMod(surf, &color) != 0) { return -1; } if (color != SDL_ALPHA_OPAQUE) return 1; } return 0; } #endif static SDL_Surface * newsurf_fromsurf(SDL_Surface *surf, int width, int height) { SDL_Surface *newsurf; Uint32 colorkey; Uint8 alpha; int isalpha; if (surf->format->BytesPerPixel == 0 || surf->format->BytesPerPixel > 4) return (SDL_Surface *)(RAISE( PyExc_ValueError, "unsupported Surface bit depth for transform")); newsurf = SDL_CreateRGBSurface(surf->flags, width, height, surf->format->BitsPerPixel, surf->format->Rmask, surf->format->Gmask, surf->format->Bmask, surf->format->Amask); if (!newsurf) return (SDL_Surface *)(RAISE(pgExc_SDLError, SDL_GetError())); /* Copy palette, colorkey, etc info */ if (SDL_ISPIXELFORMAT_INDEXED(surf->format->format)) { if (SDL_SetPaletteColors(newsurf->format->palette, surf->format->palette->colors, 0, surf->format->palette->ncolors) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } if (SDL_GetSurfaceAlphaMod(surf, &alpha) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } if (alpha != 255) { if (SDL_SetSurfaceAlphaMod(newsurf, alpha) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } isalpha = _PgSurface_SrcAlpha(surf); if (isalpha == 1) { if (SDL_SetSurfaceBlendMode(newsurf, SDL_BLENDMODE_BLEND) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } else if (isalpha == -1) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } else { if (SDL_SetSurfaceBlendMode(newsurf, SDL_BLENDMODE_NONE) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } if (SDL_GetColorKey(surf, &colorkey) == 0) { if (SDL_SetColorKey(newsurf, SDL_TRUE, colorkey) != 0 || SDL_SetSurfaceRLE(newsurf, SDL_TRUE) != 0) { PyErr_SetString(pgExc_SDLError, SDL_GetError()); SDL_FreeSurface(newsurf); return NULL; } } return newsurf; } static SDL_Surface * rotate90(SDL_Surface *src, int angle) { int numturns = (angle / 90) % 4; int dstwidth, dstheight; SDL_Surface *dst; char *srcpix, *dstpix, *srcrow, *dstrow; int srcstepx, srcstepy, dststepx, dststepy; int loopx, loopy; if (numturns < 0) numturns = 4 + numturns; if (!(numturns % 2)) { dstwidth = src->w; dstheight = src->h; } else { dstwidth = src->h; dstheight = src->w; } dst = newsurf_fromsurf(src, dstwidth, dstheight); if (!dst) return NULL; Py_BEGIN_ALLOW_THREADS; SDL_LockSurface(dst); srcrow = (char *)src->pixels; dstrow = (char *)dst->pixels; srcstepx = dststepx = src->format->BytesPerPixel; srcstepy = src->pitch; dststepy = dst->pitch; switch (numturns) { /*case 0: we don't need to change anything*/ case 1: srcrow += ((src->w - 1) * srcstepx); srcstepy = -srcstepx; srcstepx = src->pitch; break; case 2: srcrow += ((src->h - 1) * srcstepy) + ((src->w - 1) * srcstepx); srcstepx = -srcstepx; srcstepy = -srcstepy; break; case 3: srcrow += ((src->h - 1) * srcstepy); srcstepx = -srcstepy; srcstepy = src->format->BytesPerPixel; break; } switch (src->format->BytesPerPixel) { case 1: for (loopy = 0; loopy < dstheight; ++loopy) { dstpix = dstrow; srcpix = srcrow; for (loopx = 0; loopx < dstwidth; ++loopx) { *dstpix = *srcpix; srcpix += srcstepx; dstpix += dststepx; } dstrow += dststepy; srcrow += srcstepy; } break; case 2: for (loopy = 0; loopy < dstheight; ++loopy) { dstpix = dstrow; srcpix = srcrow; for (loopx = 0; loopx < dstwidth; ++loopx) { *(Uint16 *)dstpix = *(Uint16 *)srcpix; srcpix += srcstepx; dstpix += dststepx; } dstrow += dststepy; srcrow += srcstepy; } break; case 3: for (loopy = 0; loopy < dstheight; ++loopy) { dstpix = dstrow; srcpix = srcrow; for (loopx = 0; loopx < dstwidth; ++loopx) { memcpy(dstpix, srcpix, 3); srcpix += srcstepx; dstpix += dststepx; } dstrow += dststepy; srcrow += srcstepy; } break; case 4: for (loopy = 0; loopy < dstheight; ++loopy) { dstpix = dstrow; srcpix = srcrow; for (loopx = 0; loopx < dstwidth; ++loopx) { *(Uint32 *)dstpix = *(Uint32 *)srcpix; srcpix += srcstepx; dstpix += dststepx; } dstrow += dststepy; srcrow += srcstepy; } break; } SDL_UnlockSurface(dst); Py_END_ALLOW_THREADS; return dst; } static void rotate(SDL_Surface *src, SDL_Surface *dst, Uint32 bgcolor, double sangle, double cangle) { int x, y, dx, dy; Uint8 *srcpix = (Uint8 *)src->pixels; Uint8 *dstrow = (Uint8 *)dst->pixels; int srcpitch = src->pitch; int dstpitch = dst->pitch; int cy = dst->h / 2; int xd = ((src->w - dst->w) << 15); int yd = ((src->h - dst->h) << 15); int isin = (int)(sangle * 65536); int icos = (int)(cangle * 65536); int ax = ((dst->w) << 15) - (int)(cangle * (((long long)dst->w - 1) << 15)); int ay = ((dst->h) << 15) - (int)(sangle * (((long long)dst->w - 1) << 15)); int xmaxval = ((src->w) << 16) - 1; int ymaxval = ((src->h) << 16) - 1; switch (src->format->BytesPerPixel) { case 1: for (y = 0; y < dst->h; y++) { Uint8 *dstpos = (Uint8 *)dstrow; dx = (ax + (isin * (cy - y))) + xd; dy = (ay - (icos * (cy - y))) + yd; for (x = 0; x < dst->w; x++) { if (dx < 0 || dy < 0 || dx > xmaxval || dy > ymaxval) *dstpos++ = bgcolor; else *dstpos++ = *(Uint8 *)(srcpix + ((dy >> 16) * srcpitch) + (dx >> 16)); dx += icos; dy += isin; } dstrow += dstpitch; } break; case 2: for (y = 0; y < dst->h; y++) { Uint16 *dstpos = (Uint16 *)dstrow; dx = (ax + (isin * (cy - y))) + xd; dy = (ay - (icos * (cy - y))) + yd; for (x = 0; x < dst->w; x++) { if (dx < 0 || dy < 0 || dx > xmaxval || dy > ymaxval) *dstpos++ = bgcolor; else *dstpos++ = *(Uint16 *)(srcpix + ((dy >> 16) * srcpitch) + ((long long)dx >> 16 << 1)); dx += icos; dy += isin; } dstrow += dstpitch; } break; case 4: for (y = 0; y < dst->h; y++) { Uint32 *dstpos = (Uint32 *)dstrow; dx = (ax + (isin * (cy - y))) + xd; dy = (ay - (icos * (cy - y))) + yd; for (x = 0; x < dst->w; x++) { if (dx < 0 || dy < 0 || dx > xmaxval || dy > ymaxval) *dstpos++ = bgcolor; else *dstpos++ = *(Uint32 *)(srcpix + ((dy >> 16) * srcpitch) + ((long long)dx >> 16 << 2)); dx += icos; dy += isin; } dstrow += dstpitch; } break; default: /*case 3:*/ for (y = 0; y < dst->h; y++) { Uint8 *dstpos = (Uint8 *)dstrow; dx = (ax + (isin * (cy - y))) + xd; dy = (ay - (icos * (cy - y))) + yd; for (x = 0; x < dst->w; x++) { if (dx < 0 || dy < 0 || dx > xmaxval || dy > ymaxval) { memcpy(dstpos, &bgcolor, 3 * sizeof(Uint8)); dstpos += 3; } else { Uint8 *srcpos = (Uint8 *)(srcpix + ((dy >> 16) * srcpitch) + ((dx >> 16) * 3)); memcpy(dstpos, srcpos, 3 * sizeof(Uint8)); dstpos += 3; } dx += icos; dy += isin; } dstrow += dstpitch; } break; } } static void stretch(SDL_Surface *src, SDL_Surface *dst) { int looph, loopw; Uint8 *srcrow = (Uint8 *)src->pixels; Uint8 *dstrow = (Uint8 *)dst->pixels; int srcpitch = src->pitch; int dstpitch = dst->pitch; int dstwidth = dst->w; int dstheight = dst->h; int dstwidth2 = dst->w << 1; int dstheight2 = dst->h << 1; int srcwidth2 = src->w << 1; int srcheight2 = src->h << 1; int w_err, h_err = srcheight2 - dstheight2; switch (src->format->BytesPerPixel) { case 1: for (looph = 0; looph < dstheight; ++looph) { Uint8 *srcpix = (Uint8 *)srcrow, *dstpix = (Uint8 *)dstrow; w_err = srcwidth2 - dstwidth2; for (loopw = 0; loopw < dstwidth; ++loopw) { *dstpix++ = *srcpix; while (w_err >= 0) { ++srcpix; w_err -= dstwidth2; } w_err += srcwidth2; } while (h_err >= 0) { srcrow += srcpitch; h_err -= dstheight2; } dstrow += dstpitch; h_err += srcheight2; } break; case 2: for (looph = 0; looph < dstheight; ++looph) { Uint16 *srcpix = (Uint16 *)srcrow, *dstpix = (Uint16 *)dstrow; w_err = srcwidth2 - dstwidth2; for (loopw = 0; loopw < dstwidth; ++loopw) { *dstpix++ = *srcpix; while (w_err >= 0) { ++srcpix; w_err -= dstwidth2; } w_err += srcwidth2; } while (h_err >= 0) { srcrow += srcpitch; h_err -= dstheight2; } dstrow += dstpitch; h_err += srcheight2; } break; case 3: for (looph = 0; looph < dstheight; ++looph) { Uint8 *srcpix = (Uint8 *)srcrow, *dstpix = (Uint8 *)dstrow; w_err = srcwidth2 - dstwidth2; for (loopw = 0; loopw < dstwidth; ++loopw) { memcpy(dstpix, srcpix, 3); dstpix += 3; while (w_err >= 0) { srcpix += 3; w_err -= dstwidth2; } w_err += srcwidth2; } while (h_err >= 0) { srcrow += srcpitch; h_err -= dstheight2; } dstrow += dstpitch; h_err += srcheight2; } break; default: /*case 4:*/ for (looph = 0; looph < dstheight; ++looph) { Uint32 *srcpix = (Uint32 *)srcrow, *dstpix = (Uint32 *)dstrow; w_err = srcwidth2 - dstwidth2; for (loopw = 0; loopw < dstwidth; ++loopw) { *dstpix++ = *srcpix; while (w_err >= 0) { ++srcpix; w_err -= dstwidth2; } w_err += srcwidth2; } while (h_err >= 0) { srcrow += srcpitch; h_err -= dstheight2; } dstrow += dstpitch; h_err += srcheight2; } break; } } static SDL_Surface * scale_to(pgSurfaceObject *srcobj, pgSurfaceObject *dstobj, int width, int height) { SDL_Surface *src = NULL; SDL_Surface *retsurf = NULL; if (width < 0 || height < 0) return RAISE(PyExc_ValueError, "Cannot scale to negative size"); src = pgSurface_AsSurface(srcobj); if (!src) return RAISE(pgExc_SDLError, "display Surface quit"); if (!dstobj) { retsurf = newsurf_fromsurf(src, width, height); if (!retsurf) return NULL; } else { retsurf = pgSurface_AsSurface(dstobj); if (!retsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } if (retsurf->w != width || retsurf->h != height) { return (SDL_Surface *)(RAISE( PyExc_ValueError, "Destination surface not the given width or height.")); } if (src->format->BytesPerPixel != retsurf->format->BytesPerPixel) { return (SDL_Surface *)(RAISE( PyExc_ValueError, "Source and destination surfaces need the same format.")); } if ((width && height) && (src->w && src->h)) { SDL_LockSurface(retsurf); pgSurface_Lock(srcobj); Py_BEGIN_ALLOW_THREADS; if (width == 2 * src->w && height == 2 * src->h) { scale2xraw(src, retsurf); } else { stretch(src, retsurf); } Py_END_ALLOW_THREADS; pgSurface_Unlock(srcobj); SDL_UnlockSurface(retsurf); } return retsurf; } static PyObject * surf_scale(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; PyObject *size; SDL_Surface *newsurf; int width, height; static char *keywords[] = {"surface", "size", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O|O!", keywords, &pgSurface_Type, &surfobj, &size, &pgSurface_Type, &surfobj2)) return NULL; if (!pg_TwoIntsFromObj(size, &width, &height)) return RAISE(PyExc_TypeError, "size must be two numbers"); newsurf = scale_to(surfobj, surfobj2, width, height); if (!newsurf) { return NULL; } if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_scale_by(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; PyObject *factorobj = NULL; float scalex, scaley; SDL_Surface *surf, *newsurf; static char *keywords[] = {"surface", "factor", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O|O!", keywords, &pgSurface_Type, &surfobj, &factorobj, &pgSurface_Type, &surfobj2)) return NULL; if (!_get_factor(factorobj, &scalex, &scaley)) { return NULL; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); newsurf = scale_to(surfobj, surfobj2, (int)(surf->w * scalex), (int)(surf->h * scaley)); if (!newsurf) { return NULL; } if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_scale2x(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *surfobj, *surfobj2 = NULL; SDL_Surface *surf; SDL_Surface *newsurf; static char *keywords[] = {"surface", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O!", keywords, &pgSurface_Type, &surfobj, &pgSurface_Type, &surfobj2)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); /* if the second surface is not there, then make a new one. */ if (!surfobj2) { int width = surf->w * 2; int height = surf->h * 2; newsurf = newsurf_fromsurf(surf, width, height); if (!newsurf) return NULL; } else { newsurf = pgSurface_AsSurface(surfobj2); if (!newsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } /* check to see if the size is twice as big. */ if (newsurf->w != (surf->w * 2) || newsurf->h != (surf->h * 2)) return RAISE(PyExc_ValueError, "Destination surface not 2x bigger."); /* check to see if the format of the surface is the same. */ if (surf->format->BytesPerPixel != newsurf->format->BytesPerPixel) return RAISE(PyExc_ValueError, "Source and destination surfaces need the same format."); SDL_LockSurface(newsurf); SDL_LockSurface(surf); Py_BEGIN_ALLOW_THREADS; scale2x(surf, newsurf); Py_END_ALLOW_THREADS; SDL_UnlockSurface(surf); SDL_UnlockSurface(newsurf); if (surfobj2) { Py_INCREF(surfobj2); return surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_rotate(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; SDL_Surface *surf, *newsurf; float angle; double radangle, sangle, cangle; double x, y, cx, cy, sx, sy; int nxmax, nymax; Uint32 bgcolor; static char *keywords[] = {"surface", "angle", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!f", keywords, &pgSurface_Type, &surfobj, &angle)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (surf->w < 1 || surf->h < 1) { Py_INCREF(surfobj); return (PyObject *)surfobj; } if (surf->format->BytesPerPixel == 0 || surf->format->BytesPerPixel > 4) return RAISE(PyExc_ValueError, "unsupported Surface bit depth for transform"); if (!(fmod((double)angle, (double)90.0f))) { pgSurface_Lock(surfobj); /* The function releases GIL internally, don't release here */ newsurf = rotate90(surf, (int)angle); pgSurface_Unlock(surfobj); if (!newsurf) return NULL; return (PyObject *)pgSurface_New(newsurf); } radangle = angle * .01745329251994329; sangle = sin(radangle); cangle = cos(radangle); x = surf->w; y = surf->h; cx = cangle * x; cy = cangle * y; sx = sangle * x; sy = sangle * y; nxmax = (int)(MAX(MAX(MAX(fabs(cx + sy), fabs(cx - sy)), fabs(-cx + sy)), fabs(-cx - sy))); nymax = (int)(MAX(MAX(MAX(fabs(sx + cy), fabs(sx - cy)), fabs(-sx + cy)), fabs(-sx - cy))); newsurf = newsurf_fromsurf(surf, nxmax, nymax); if (!newsurf) return NULL; /* get the background color */ if (SDL_GetColorKey(surf, &bgcolor) != 0) { SDL_LockSurface(surf); switch (surf->format->BytesPerPixel) { case 1: bgcolor = *(Uint8 *)surf->pixels; break; case 2: bgcolor = *(Uint16 *)surf->pixels; break; case 4: bgcolor = *(Uint32 *)surf->pixels; break; default: /*case 3:*/ #if SDL_BYTEORDER == SDL_LIL_ENDIAN bgcolor = (((Uint8 *)surf->pixels)[0]) + (((Uint8 *)surf->pixels)[1] << 8) + (((Uint8 *)surf->pixels)[2] << 16); #else bgcolor = (((Uint8 *)surf->pixels)[2]) + (((Uint8 *)surf->pixels)[1] << 8) + (((Uint8 *)surf->pixels)[0] << 16); #endif } SDL_UnlockSurface(surf); bgcolor &= ~surf->format->Amask; } SDL_LockSurface(newsurf); pgSurface_Lock(surfobj); Py_BEGIN_ALLOW_THREADS; rotate(surf, newsurf, bgcolor, sangle, cangle); Py_END_ALLOW_THREADS; pgSurface_Unlock(surfobj); SDL_UnlockSurface(newsurf); return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_flip(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; SDL_Surface *surf, *newsurf; int xaxis, yaxis; int loopx, loopy; int srcpitch, dstpitch; Uint8 *srcpix, *dstpix; static char *keywords[] = {"surface", "flip_x", "flip_y", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!ii", keywords, &pgSurface_Type, &surfobj, &xaxis, &yaxis)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); newsurf = newsurf_fromsurf(surf, surf->w, surf->h); if (!newsurf) return NULL; srcpitch = surf->pitch; dstpitch = newsurf->pitch; SDL_LockSurface(newsurf); pgSurface_Lock(surfobj); srcpix = (Uint8 *)surf->pixels; dstpix = (Uint8 *)newsurf->pixels; Py_BEGIN_ALLOW_THREADS; if (!xaxis) { if (!yaxis) { for (loopy = 0; loopy < surf->h; ++loopy) memcpy(dstpix + loopy * dstpitch, srcpix + loopy * srcpitch, surf->w * surf->format->BytesPerPixel); } else { for (loopy = 0; loopy < surf->h; ++loopy) memcpy(dstpix + loopy * dstpitch, srcpix + (surf->h - 1 - loopy) * srcpitch, surf->w * surf->format->BytesPerPixel); } } else /*if (xaxis)*/ { if (yaxis) { switch (surf->format->BytesPerPixel) { case 1: for (loopy = 0; loopy < surf->h; ++loopy) { Uint8 *dst = (Uint8 *)(dstpix + loopy * dstpitch); Uint8 *src = ((Uint8 *)(srcpix + (surf->h - 1 - loopy) * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 2: for (loopy = 0; loopy < surf->h; ++loopy) { Uint16 *dst = (Uint16 *)(dstpix + loopy * dstpitch); Uint16 *src = ((Uint16 *)(srcpix + (surf->h - 1 - loopy) * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 4: for (loopy = 0; loopy < surf->h; ++loopy) { Uint32 *dst = (Uint32 *)(dstpix + loopy * dstpitch); Uint32 *src = ((Uint32 *)(srcpix + (surf->h - 1 - loopy) * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 3: for (loopy = 0; loopy < surf->h; ++loopy) { Uint8 *dst = (Uint8 *)(dstpix + loopy * dstpitch); Uint8 *src = ((Uint8 *)(srcpix + (surf->h - 1 - loopy) * srcpitch)) + surf->w * 3 - 3; for (loopx = 0; loopx < surf->w; ++loopx) { memcpy(dst, src, 3); dst += 3; src -= 3; } } break; } } else { switch (surf->format->BytesPerPixel) { case 1: for (loopy = 0; loopy < surf->h; ++loopy) { Uint8 *dst = (Uint8 *)(dstpix + loopy * dstpitch); Uint8 *src = ((Uint8 *)(srcpix + loopy * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 2: for (loopy = 0; loopy < surf->h; ++loopy) { Uint16 *dst = (Uint16 *)(dstpix + loopy * dstpitch); Uint16 *src = ((Uint16 *)(srcpix + loopy * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 4: for (loopy = 0; loopy < surf->h; ++loopy) { Uint32 *dst = (Uint32 *)(dstpix + loopy * dstpitch); Uint32 *src = ((Uint32 *)(srcpix + loopy * srcpitch)) + surf->w - 1; for (loopx = 0; loopx < surf->w; ++loopx) *dst++ = *src--; } break; case 3: for (loopy = 0; loopy < surf->h; ++loopy) { Uint8 *dst = (Uint8 *)(dstpix + loopy * dstpitch); Uint8 *src = ((Uint8 *)(srcpix + loopy * srcpitch)) + surf->w * 3 - 3; for (loopx = 0; loopx < surf->w; ++loopx) { memcpy(dst, src, 3); dst += 3; src -= 3; } } break; } } } Py_END_ALLOW_THREADS; pgSurface_Unlock(surfobj); SDL_UnlockSurface(newsurf); return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_rotozoom(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; SDL_Surface *surf, *newsurf, *surf32; float scale, angle; static char *keywords[] = {"surface", "angle", "scale", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!ff", keywords, &pgSurface_Type, &surfobj, &angle, &scale)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); if (scale == 0.0 || surf->w == 0 || surf->h == 0) { newsurf = newsurf_fromsurf(surf, 0, 0); return (PyObject *)pgSurface_New(newsurf); } if (surf->format->BitsPerPixel == 32) { surf32 = surf; pgSurface_Lock(surfobj); } else { Py_BEGIN_ALLOW_THREADS; surf32 = SDL_CreateRGBSurface(SDL_SWSURFACE, surf->w, surf->h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); SDL_BlitSurface(surf, NULL, surf32, NULL); Py_END_ALLOW_THREADS; } Py_BEGIN_ALLOW_THREADS; newsurf = rotozoomSurface(surf32, angle, scale, 1); Py_END_ALLOW_THREADS; if (surf32 == surf) pgSurface_Unlock(surfobj); else SDL_FreeSurface(surf32); return (PyObject *)pgSurface_New(newsurf); } static SDL_Surface * chop(SDL_Surface *src, int x, int y, int width, int height) { SDL_Surface *dst; int dstwidth, dstheight; char *srcpix, *dstpix, *srcrow, *dstrow; int srcstepx, srcstepy, dststepx, dststepy; int loopx, loopy; if ((x + width) > src->w) width = MIN(MAX(src->w - x, 0), src->w); if ((y + height) > src->h) height = MIN(MAX(src->h - y, 0), src->h); if (x < 0) { width -= (-x); x = 0; } if (y < 0) { height -= (-y); y = 0; } dstwidth = src->w - width; dstheight = src->h - height; dst = newsurf_fromsurf(src, dstwidth, dstheight); if (!dst) return NULL; Py_BEGIN_ALLOW_THREADS; SDL_LockSurface(dst); srcrow = (char *)src->pixels; dstrow = (char *)dst->pixels; srcstepx = dststepx = src->format->BytesPerPixel; srcstepy = src->pitch; dststepy = dst->pitch; for (loopy = 0; loopy < src->h; loopy++) { if ((loopy < y) || (loopy >= (y + height))) { dstpix = dstrow; srcpix = srcrow; for (loopx = 0; loopx < src->w; loopx++) { if ((loopx < x) || (loopx >= (x + width))) { switch (src->format->BytesPerPixel) { case 1: *dstpix = *srcpix; break; case 2: *(Uint16 *)dstpix = *(Uint16 *)srcpix; break; case 3: memcpy(dstpix, srcpix, 3); break; case 4: *(Uint32 *)dstpix = *(Uint32 *)srcpix; break; } dstpix += dststepx; } srcpix += srcstepx; } dstrow += dststepy; } srcrow += srcstepy; } SDL_UnlockSurface(dst); Py_END_ALLOW_THREADS; return dst; } static PyObject * surf_chop(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *surfobj, *rectobj; SDL_Surface *surf, *newsurf; SDL_Rect *rect, temp; static char *keywords[] = {"surface", "rect", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O", keywords, &pgSurface_Type, &surfobj, &rectobj)) return NULL; if (!(rect = pgRect_FromObject(rectobj, &temp))) return RAISE(PyExc_TypeError, "Rect argument is invalid"); surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); /* The function releases GIL internally, don't release here */ newsurf = chop(surf, rect->x, rect->y, rect->w, rect->h); return (PyObject *)pgSurface_New(newsurf); } /* * smooth scale functions. */ /* this function implements an area-averaging shrinking filter in the * X-dimension */ static void filter_shrink_X_ONLYC(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int srcdiff = srcpitch - (srcwidth * 4); int dstdiff = dstpitch - (dstwidth * 4); int x, y; int xspace = 0x10000 * srcwidth / dstwidth; /* must be > 1 */ int xrecip = (int)(0x100000000LL / xspace); for (y = 0; y < height; y++) { Uint16 accumulate[4] = {0, 0, 0, 0}; int xcounter = xspace; for (x = 0; x < srcwidth; x++) { if (xcounter > 0x10000) { accumulate[0] += (Uint16)*srcpix++; accumulate[1] += (Uint16)*srcpix++; accumulate[2] += (Uint16)*srcpix++; accumulate[3] += (Uint16)*srcpix++; xcounter -= 0x10000; } else { int xfrac = 0x10000 - xcounter; /* write out a destination pixel */ *dstpix++ = (Uint8)(((accumulate[0] + ((srcpix[0] * xcounter) >> 16)) * xrecip) >> 16); *dstpix++ = (Uint8)(((accumulate[1] + ((srcpix[1] * xcounter) >> 16)) * xrecip) >> 16); *dstpix++ = (Uint8)(((accumulate[2] + ((srcpix[2] * xcounter) >> 16)) * xrecip) >> 16); *dstpix++ = (Uint8)(((accumulate[3] + ((srcpix[3] * xcounter) >> 16)) * xrecip) >> 16); /* reload the accumulator with the remainder of this pixel */ accumulate[0] = (Uint16)((*srcpix++ * xfrac) >> 16); accumulate[1] = (Uint16)((*srcpix++ * xfrac) >> 16); accumulate[2] = (Uint16)((*srcpix++ * xfrac) >> 16); accumulate[3] = (Uint16)((*srcpix++ * xfrac) >> 16); xcounter = xspace - xfrac; } } srcpix += srcdiff; dstpix += dstdiff; } } /* this function implements an area-averaging shrinking filter in the * Y-dimension */ static void filter_shrink_Y_ONLYC(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { Uint16 *templine; int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 4); int x, y; int yspace = 0x10000 * srcheight / dstheight; /* must be > 1 */ int yrecip = (int)(0x100000000LL / yspace); int ycounter = yspace; /* allocate and clear a memory area for storing the accumulator line */ templine = (Uint16 *)malloc(dstpitch * 2); if (templine == NULL) return; memset(templine, 0, dstpitch * 2); for (y = 0; y < srcheight; y++) { Uint16 *accumulate = templine; if (ycounter > 0x10000) { for (x = 0; x < width; x++) { *accumulate++ += (Uint16)*srcpix++; *accumulate++ += (Uint16)*srcpix++; *accumulate++ += (Uint16)*srcpix++; *accumulate++ += (Uint16)*srcpix++; } ycounter -= 0x10000; } else { int yfrac = 0x10000 - ycounter; /* write out a destination line */ for (x = 0; x < width; x++) { *dstpix++ = (Uint8)(((*accumulate++ + ((*srcpix++ * ycounter) >> 16)) * yrecip) >> 16); *dstpix++ = (Uint8)(((*accumulate++ + ((*srcpix++ * ycounter) >> 16)) * yrecip) >> 16); *dstpix++ = (Uint8)(((*accumulate++ + ((*srcpix++ * ycounter) >> 16)) * yrecip) >> 16); *dstpix++ = (Uint8)(((*accumulate++ + ((*srcpix++ * ycounter) >> 16)) * yrecip) >> 16); } dstpix += dstdiff; /* reload the accumulator with the remainder of this line */ accumulate = templine; srcpix -= 4 * width; for (x = 0; x < width; x++) { *accumulate++ = (Uint16)((*srcpix++ * yfrac) >> 16); *accumulate++ = (Uint16)((*srcpix++ * yfrac) >> 16); *accumulate++ = (Uint16)((*srcpix++ * yfrac) >> 16); *accumulate++ = (Uint16)((*srcpix++ * yfrac) >> 16); } ycounter = yspace - yfrac; } srcpix += srcdiff; } /* for (int y = 0; y < srcheight; y++) */ /* free the temporary memory */ free(templine); } /* this function implements a bilinear filter in the X-dimension */ static void filter_expand_X_ONLYC(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth) { int dstdiff = dstpitch - (dstwidth * 4); int *xidx0, *xmult0, *xmult1; int x, y; const int factorwidth = 4; #ifdef _MSC_VER /* Make MSVC static analyzer happy by assuring dstwidth >= 2 to suppress * a false analyzer report */ __analysis_assume(dstwidth >= 2); #endif /* Allocate memory for factors */ xidx0 = malloc(dstwidth * 4); if (xidx0 == NULL) return; xmult0 = (int *)malloc(dstwidth * factorwidth); xmult1 = (int *)malloc(dstwidth * factorwidth); if (xmult0 == NULL || xmult1 == NULL) { free(xidx0); if (xmult0) free(xmult0); if (xmult1) free(xmult1); return; } /* Create multiplier factors and starting indices and put them in arrays */ for (x = 0; x < dstwidth; x++) { xidx0[x] = x * (srcwidth - 1) / dstwidth; xmult1[x] = 0x10000 * ((x * (srcwidth - 1)) % dstwidth) / dstwidth; xmult0[x] = 0x10000 - xmult1[x]; } /* Do the scaling in raster order so we don't trash the cache */ for (y = 0; y < height; y++) { Uint8 *srcrow0 = srcpix + y * srcpitch; for (x = 0; x < dstwidth; x++) { Uint8 *src = srcrow0 + xidx0[x] * 4; int xm0 = xmult0[x]; int xm1 = xmult1[x]; *dstpix++ = (Uint8)(((src[0] * xm0) + (src[4] * xm1)) >> 16); *dstpix++ = (Uint8)(((src[1] * xm0) + (src[5] * xm1)) >> 16); *dstpix++ = (Uint8)(((src[2] * xm0) + (src[6] * xm1)) >> 16); *dstpix++ = (Uint8)(((src[3] * xm0) + (src[7] * xm1)) >> 16); } dstpix += dstdiff; } /* free memory */ free(xidx0); free(xmult0); free(xmult1); } /* this function implements a bilinear filter in the Y-dimension */ static void filter_expand_Y_ONLYC(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight) { int x, y; for (y = 0; y < dstheight; y++) { int yidx0 = y * (srcheight - 1) / dstheight; Uint8 *srcrow0 = srcpix + yidx0 * srcpitch; Uint8 *srcrow1 = srcrow0 + srcpitch; int ymult1 = 0x10000 * ((y * (srcheight - 1)) % dstheight) / dstheight; int ymult0 = 0x10000 - ymult1; for (x = 0; x < width; x++) { *dstpix++ = (Uint8)(((*srcrow0++ * ymult0) + (*srcrow1++ * ymult1)) >> 16); *dstpix++ = (Uint8)(((*srcrow0++ * ymult0) + (*srcrow1++ * ymult1)) >> 16); *dstpix++ = (Uint8)(((*srcrow0++ * ymult0) + (*srcrow1++ * ymult1)) >> 16); *dstpix++ = (Uint8)(((*srcrow0++ * ymult0) + (*srcrow1++ * ymult1)) >> 16); } } } static void smoothscale_init(struct _module_state *st) { if (st->filter_shrink_X) { return; } #ifdef SCALE_MMX_SUPPORT if (SDL_HasSSE()) { st->filter_type = "SSE"; st->filter_shrink_X = filter_shrink_X_SSE; st->filter_shrink_Y = filter_shrink_Y_SSE; st->filter_expand_X = filter_expand_X_SSE; st->filter_expand_Y = filter_expand_Y_SSE; } else if (SDL_HasMMX()) { st->filter_type = "MMX"; st->filter_shrink_X = filter_shrink_X_MMX; st->filter_shrink_Y = filter_shrink_Y_MMX; st->filter_expand_X = filter_expand_X_MMX; st->filter_expand_Y = filter_expand_Y_MMX; } else { st->filter_type = "GENERIC"; st->filter_shrink_X = filter_shrink_X_ONLYC; st->filter_shrink_Y = filter_shrink_Y_ONLYC; st->filter_expand_X = filter_expand_X_ONLYC; st->filter_expand_Y = filter_expand_Y_ONLYC; } #else /* ~SCALE_MMX_SUPPORT */ st->filter_type = "GENERIC"; st->filter_shrink_X = filter_shrink_X_ONLYC; st->filter_shrink_Y = filter_shrink_Y_ONLYC; st->filter_expand_X = filter_expand_X_ONLYC; st->filter_expand_Y = filter_expand_Y_ONLYC; #endif /* ~SCALE_MMX_SUPPORT */ } static void convert_24_32(Uint8 *srcpix, int srcpitch, Uint8 *dstpix, int dstpitch, int width, int height) { int srcdiff = srcpitch - (width * 3); int dstdiff = dstpitch - (width * 4); int x, y; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { *dstpix++ = *srcpix++; *dstpix++ = *srcpix++; *dstpix++ = *srcpix++; *dstpix++ = 0xff; } srcpix += srcdiff; dstpix += dstdiff; } } static void convert_32_24(Uint8 *srcpix, int srcpitch, Uint8 *dstpix, int dstpitch, int width, int height) { int srcdiff = srcpitch - (width * 4); int dstdiff = dstpitch - (width * 3); int x, y; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { *dstpix++ = *srcpix++; *dstpix++ = *srcpix++; *dstpix++ = *srcpix++; srcpix++; } srcpix += srcdiff; dstpix += dstdiff; } } static void scalesmooth(SDL_Surface *src, SDL_Surface *dst, struct _module_state *st) { Uint8 *srcpix = (Uint8 *)src->pixels; Uint8 *dstpix = (Uint8 *)dst->pixels; Uint8 *dst32 = NULL; int srcpitch = src->pitch; int dstpitch = dst->pitch; int srcwidth = src->w; int srcheight = src->h; int dstwidth = dst->w; int dstheight = dst->h; int bpp = src->format->BytesPerPixel; Uint8 *temppix = NULL; int tempwidth = 0, temppitch = 0; /* convert to 32-bit if necessary */ if (bpp == 3) { int newpitch = srcwidth * 4; Uint8 *newsrc = (Uint8 *)malloc((size_t)newpitch * srcheight); if (!newsrc) return; convert_24_32(srcpix, srcpitch, newsrc, newpitch, srcwidth, srcheight); srcpix = newsrc; srcpitch = newpitch; /* create a destination buffer for the 32-bit result */ dstpitch = dstwidth << 2; dst32 = (Uint8 *)malloc((size_t)dstpitch * dstheight); if (dst32 == NULL) { free(srcpix); return; } dstpix = dst32; } /* Create a temporary processing buffer if we will be scaling both X and Y */ if (srcwidth != dstwidth && srcheight != dstheight) { tempwidth = dstwidth; temppitch = tempwidth << 2; temppix = (Uint8 *)malloc((size_t)temppitch * srcheight); if (temppix == NULL) { if (bpp == 3) { free(srcpix); free(dstpix); } return; } } /* Start the filter by doing X-scaling */ if (dstwidth < srcwidth) /* shrink */ { if (srcheight != dstheight) st->filter_shrink_X(srcpix, temppix, srcheight, srcpitch, temppitch, srcwidth, dstwidth); else st->filter_shrink_X(srcpix, dstpix, srcheight, srcpitch, dstpitch, srcwidth, dstwidth); } else if (dstwidth > srcwidth) /* expand */ { if (srcheight != dstheight) st->filter_expand_X(srcpix, temppix, srcheight, srcpitch, temppitch, srcwidth, dstwidth); else st->filter_expand_X(srcpix, dstpix, srcheight, srcpitch, dstpitch, srcwidth, dstwidth); } /* Now do the Y scale */ if (dstheight < srcheight) /* shrink */ { if (srcwidth != dstwidth) st->filter_shrink_Y(temppix, dstpix, tempwidth, temppitch, dstpitch, srcheight, dstheight); else st->filter_shrink_Y(srcpix, dstpix, srcwidth, srcpitch, dstpitch, srcheight, dstheight); } else if (dstheight > srcheight) /* expand */ { if (srcwidth != dstwidth) st->filter_expand_Y(temppix, dstpix, tempwidth, temppitch, dstpitch, srcheight, dstheight); else st->filter_expand_Y(srcpix, dstpix, srcwidth, srcpitch, dstpitch, srcheight, dstheight); } /* Convert back to 24-bit if necessary */ if (bpp == 3) { convert_32_24(dst32, dstpitch, (Uint8 *)dst->pixels, dst->pitch, dstwidth, dstheight); free(dst32); dst32 = NULL; free(srcpix); srcpix = NULL; } /* free temporary buffer if necessary */ if (temppix != NULL) free(temppix); } static SDL_Surface * smoothscale_to(PyObject *self, pgSurfaceObject *srcobj, pgSurfaceObject *dstobj, int width, int height) { SDL_Surface *src = NULL; SDL_Surface *retsurf = NULL; int bpp; if (width < 0 || height < 0) return (SDL_Surface *)(RAISE(PyExc_ValueError, "Cannot scale to negative size")); src = pgSurface_AsSurface(srcobj); if (!src) return RAISE(pgExc_SDLError, "display Surface quit"); bpp = src->format->BytesPerPixel; if (bpp < 3 || bpp > 4) return (SDL_Surface *)(RAISE( PyExc_ValueError, "Only 24-bit or 32-bit surfaces can be smoothly scaled")); if (!dstobj) { retsurf = newsurf_fromsurf(src, width, height); if (!retsurf) return NULL; } else { retsurf = pgSurface_AsSurface(dstobj); if (!retsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } if (retsurf->w != width || retsurf->h != height) return (SDL_Surface *)(RAISE( PyExc_ValueError, "Destination surface not the given width or height.")); if (((width * bpp + 3) >> 2) > retsurf->pitch) return (SDL_Surface *)(RAISE( PyExc_ValueError, "SDL Error: destination surface pitch not 4-byte aligned.")); if (width && height) { SDL_LockSurface(retsurf); pgSurface_Lock(srcobj); /* handle trivial case */ if (src->w == width && src->h == height) { int y; Py_BEGIN_ALLOW_THREADS; for (y = 0; y < height; y++) { memcpy((Uint8 *)retsurf->pixels + y * retsurf->pitch, (Uint8 *)src->pixels + y * src->pitch, width * bpp); } Py_END_ALLOW_THREADS; } else { struct _module_state *st = GETSTATE(self); Py_BEGIN_ALLOW_THREADS; scalesmooth(src, retsurf, st); Py_END_ALLOW_THREADS; } pgSurface_Unlock(srcobj); SDL_UnlockSurface(retsurf); } return retsurf; } static PyObject * surf_scalesmooth(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; PyObject *size; SDL_Surface *newsurf; int width, height; static char *keywords[] = {"surface", "size", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O|O!", keywords, &pgSurface_Type, &surfobj, &size, &pgSurface_Type, &surfobj2)) return NULL; if (!pg_TwoIntsFromObj(size, &width, &height)) return RAISE(PyExc_TypeError, "size must be two numbers"); newsurf = smoothscale_to(self, surfobj, surfobj2, width, height); if (!newsurf) { return NULL; } if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_scalesmooth_by(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; PyObject *factorobj = NULL; float scale, scaley; SDL_Surface *surf, *newsurf; static char *keywords[] = {"surface", "factor", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O|O!", keywords, &pgSurface_Type, &surfobj, &factorobj, &pgSurface_Type, &surfobj2)) return NULL; if (!_get_factor(factorobj, &scale, &scaley)) { return NULL; } surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); newsurf = smoothscale_to(self, surfobj, surfobj2, (int)(surf->w * scale), (int)(surf->h * scaley)); if (!newsurf) { return NULL; } if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } static PyObject * surf_get_smoothscale_backend(PyObject *self, PyObject *_null) { return PyUnicode_FromString(GETSTATE(self)->filter_type); } static PyObject * surf_set_smoothscale_backend(PyObject *self, PyObject *args, PyObject *kwargs) { struct _module_state *st = GETSTATE(self); char *keywords[] = {"backend", NULL}; const char *type; #ifdef _MSC_VER /* MSVC static analyzer false alarm: assure type is NULL-terminated by * making analyzer assume it was initialised */ __analysis_assume(type = "inited"); #endif if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s", keywords, &type)) return NULL; #if defined(SCALE_MMX_SUPPORT) if (strcmp(type, "GENERIC") == 0) { st->filter_type = "GENERIC"; st->filter_shrink_X = filter_shrink_X_ONLYC; st->filter_shrink_Y = filter_shrink_Y_ONLYC; st->filter_expand_X = filter_expand_X_ONLYC; st->filter_expand_Y = filter_expand_Y_ONLYC; } else if (strcmp(type, "MMX") == 0) { if (!SDL_HasMMX()) { return RAISE(PyExc_ValueError, "MMX not supported on this machine"); } st->filter_type = "MMX"; st->filter_shrink_X = filter_shrink_X_MMX; st->filter_shrink_Y = filter_shrink_Y_MMX; st->filter_expand_X = filter_expand_X_MMX; st->filter_expand_Y = filter_expand_Y_MMX; } else if (strcmp(type, "SSE") == 0) { if (!SDL_HasSSE()) { return RAISE(PyExc_ValueError, "SSE not supported on this machine"); } st->filter_type = "SSE"; st->filter_shrink_X = filter_shrink_X_SSE; st->filter_shrink_Y = filter_shrink_Y_SSE; st->filter_expand_X = filter_expand_X_SSE; st->filter_expand_Y = filter_expand_Y_SSE; } else { return PyErr_Format(PyExc_ValueError, "Unknown backend type %s", type); } Py_RETURN_NONE; #else /* Not an x86 processor */ if (strcmp(type, "GENERIC") != 0) { if (strcmp(st->filter_type, "MMX") == 0 || strcmp(st->filter_type, "SSE") == 0) { return PyErr_Format(PyExc_ValueError, "%s not supported on this machine", type); } return PyErr_Format(PyExc_ValueError, "Unknown backend type %s", type); } Py_RETURN_NONE; #endif /* defined(SCALE_MMX_SUPPORT) */ } /* _get_color_move_pixels is for iterating over pixels in a Surface. bpp - bytes per pixel the_color - is set for that pixel pixels - pointer is advanced by one pixel. */ static PG_INLINE Uint8 * _get_color_move_pixels(Uint8 bpp, Uint8 *pixels, Uint32 *the_color) { Uint8 *pix; // printf("bpp:%i, pixels:%p\n", bpp, pixels); switch (bpp) { case 1: *the_color = (Uint32) * ((Uint8 *)pixels); return pixels + 1; case 2: *the_color = (Uint32) * ((Uint16 *)pixels); return pixels + 2; case 3: pix = ((Uint8 *)pixels); #if SDL_BYTEORDER == SDL_LIL_ENDIAN *the_color = (pix[0]) + (pix[1] << 8) + (pix[2] << 16); #else *the_color = (pix[2]) + (pix[1] << 8) + (pix[0] << 16); #endif return pixels + 3; default: /* case 4: */ *the_color = *((Uint32 *)pixels); return pixels + 4; } // printf("---bpp:%i, pixels:%p\n", bpp, pixels); } /* _set_at_pixels sets the pixel to the_color. x - x pos in the SDL_Surface pixels. y - y pos in the SDL_Surface pixels. format - of the SDL_Surface pixels. pitch - of the SDL_Surface. the_color - to set in the pixels at this position. */ static PG_INLINE void _set_at_pixels(int x, int y, Uint8 *pixels, SDL_PixelFormat *format, int surf_pitch, Uint32 the_color) { Uint8 *byte_buf; switch (format->BytesPerPixel) { case 1: *((Uint8 *)pixels + y * surf_pitch + x) = (Uint8)the_color; break; case 2: *((Uint16 *)(pixels + y * surf_pitch) + x) = (Uint16)the_color; break; case 3: byte_buf = (Uint8 *)(pixels + y * surf_pitch) + x * 3; #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) *(byte_buf + (format->Rshift >> 3)) = (Uint8)(the_color >> 16); *(byte_buf + (format->Gshift >> 3)) = (Uint8)(the_color >> 8); *(byte_buf + (format->Bshift >> 3)) = (Uint8)the_color; #else *(byte_buf + 2 - (format->Rshift >> 3)) = (Uint8)(the_color >> 16); *(byte_buf + 2 - (format->Gshift >> 3)) = (Uint8)(the_color >> 8); *(byte_buf + 2 - (format->Bshift >> 3)) = (Uint8)the_color; #endif break; default: /* case 4: */ *((Uint32 *)(pixels + y * surf_pitch) + x) = the_color; break; } } static int get_threshold(SDL_Surface *dest_surf, SDL_Surface *surf, Uint32 color_search_color, Uint32 color_threshold, Uint32 color_set_color, int set_behavior, SDL_Surface *search_surf, int inverse_set) { int x, y, similar; Uint8 *pixels, *destpixels = NULL, *pixels2 = NULL; SDL_PixelFormat *format; Uint32 the_color, the_color2, dest_set_color; Uint8 search_color_r, search_color_g, search_color_b; Uint8 surf_r, surf_g, surf_b; Uint8 threshold_r, threshold_g, threshold_b; Uint8 search_surf_r, search_surf_g, search_surf_b; int within_threshold; similar = 0; format = surf->format; if (set_behavior) { destpixels = (Uint8 *)dest_surf->pixels; } if (search_surf) { pixels2 = (Uint8 *)search_surf->pixels; } SDL_GetRGB(color_search_color, format, &search_color_r, &search_color_g, &search_color_b); SDL_GetRGB(color_threshold, format, &threshold_r, &threshold_g, &threshold_b); for (y = 0; y < surf->h; y++) { pixels = (Uint8 *)surf->pixels + y * surf->pitch; if (search_surf) pixels2 = (Uint8 *)search_surf->pixels + y * search_surf->pitch; for (x = 0; x < surf->w; x++) { pixels = _get_color_move_pixels(surf->format->BytesPerPixel, pixels, &the_color); SDL_GetRGB(the_color, surf->format, &surf_r, &surf_g, &surf_b); if (search_surf) { /* Get search_surf.color */ pixels2 = _get_color_move_pixels( search_surf->format->BytesPerPixel, pixels2, &the_color2); SDL_GetRGB(the_color2, search_surf->format, &search_surf_r, &search_surf_g, &search_surf_b); /* search_surf(the_color2) is within threshold of * surf(the_color) */ within_threshold = ((abs((int)search_surf_r - (int)surf_r) <= threshold_r) && (abs((int)search_surf_g - (int)surf_g) <= threshold_g) && (abs((int)search_surf_b - (int)surf_b) <= threshold_b)); dest_set_color = ((set_behavior == 2) ? the_color2 : color_set_color); } else { /* search_color within threshold of surf.the_color */ // printf("rgb: %i,%i,%i\n", surf_r, surf_g, surf_b); within_threshold = ((abs((int)search_color_r - (int)surf_r) <= threshold_r) && (abs((int)search_color_g - (int)surf_g) <= threshold_g) && (abs((int)search_color_b - (int)surf_b) <= threshold_b)); dest_set_color = ((set_behavior == 2) ? the_color : color_set_color); } if (within_threshold) similar++; if (set_behavior && ((within_threshold && inverse_set) || (!within_threshold && !inverse_set))) { _set_at_pixels(x, y, destpixels, dest_surf->format, dest_surf->pitch, dest_set_color); } } } return similar; } /* _color_from_obj gets a color from a python object. Returns 0 if ok, and sets color to the color. -1 means error. If color_obj is NULL, use rgba_default. If rgba_default is NULL, do not use a default color, return -1. */ int _color_from_obj(PyObject *color_obj, SDL_PixelFormat *format, Uint8 rgba_default[4], Uint32 *color) { if (color_obj) { Uint8 rgba_color[4]; if (PyLong_Check(color_obj)) *color = (Uint32)PyLong_AsLong(color_obj); else if (PyLong_Check(color_obj)) *color = (Uint32)PyLong_AsUnsignedLong(color_obj); else if (pg_RGBAFromColorObj(color_obj, rgba_color)) *color = SDL_MapRGBA(format, rgba_color[0], rgba_color[1], rgba_color[2], rgba_color[3]); else return -1; } else { if (!rgba_default) return -1; *color = SDL_MapRGBA(format, rgba_default[0], rgba_default[1], rgba_default[2], rgba_default[3]); } return 0; } static PyObject * surf_threshold(PyObject *self, PyObject *args, PyObject *kwds) { PyObject *dest_surf_obj; SDL_Surface *dest_surf = NULL; pgSurfaceObject *surf_obj; SDL_Surface *surf = NULL; PyObject *search_color_obj; PyObject *threshold_obj = NULL; PyObject *set_color_obj = NULL; int set_behavior = 1; int inverse_set = 0; PyObject *search_surf_obj = NULL; SDL_Surface *search_surf = NULL; Uint8 rgba_threshold_default[4] = {0, 0, 0, 255}; Uint8 rgba_set_color_default[4] = {0, 0, 0, 255}; Uint32 color_search_color = 0; Uint32 color_threshold = 0; Uint32 color_set_color = 0; int num_threshold_pixels = 0; /* https://www.pygame.org/docs/ref/transform.html#pygame.transform.threshold Returns the number of pixels within the threshold. */ static char *kwlist[] = { "dest_surface", /* Surface we are changing. See 'set_behavior'. None - if counting (set_behavior is 0), don't need 'dest_surf'. */ "surface", /* Surface we are looking at. */ "search_color", /* Color we are searching for. */ "threshold", /* =(0,0,0,0) Within this distance from search_color (or search_surf). */ "set_color", /* =(0,0,0,0) Color we set. */ "set_behavior", /* =1 What and where we set pixels (if at all) 1 - pixels in dest_surface will be changed to 'set_color'. 0 - we do not change 'dest_surf', just count. Make dest_surf=None. 2 - pixels set in 'dest_surf' will be from 'surface'. */ "search_surf", /* =None If set, compare to this surface. None - search against 'search_color' instead. Surface - look at the color in here rather than 'search_color'. */ "inverse_set", /* =False. False - pixels outside of threshold are changed. True - pixels within threshold are changed. */ 0}; /* Get all arguments into our variables. https://docs.python.org/3/c-api/arg.html#c.PyArg_ParseTupleAndKeywords https://docs.python.org/3/c-api/arg.html#parsing-arguments */ if (!PyArg_ParseTupleAndKeywords( args, kwds, "OO!O|OOiOi", kwlist, /* required */ &dest_surf_obj, /* O python object from c type */ &pgSurface_Type, &surf_obj, /* O! python object from c type */ &search_color_obj, /* O| python object. All after | optional. */ /* optional */ &threshold_obj, /* O python object. */ &set_color_obj, /* O python object. */ &set_behavior, /* i plain python int. */ &search_surf_obj, /* O python object. */ &inverse_set)) /* i plain python int. */ return NULL; if (set_behavior == 0 && !(set_color_obj == NULL || set_color_obj == Py_None)) { return RAISE(PyExc_TypeError, "if set_behavior==0 set_color should be None"); } if (set_behavior == 0 && dest_surf_obj != Py_None) { return RAISE(PyExc_TypeError, "if set_behavior==0 dest_surf_obj should be None"); } if (dest_surf_obj && dest_surf_obj != Py_None && pgSurface_Check(dest_surf_obj)) { dest_surf = pgSurface_AsSurface(dest_surf_obj); if (!dest_surf) return RAISE(pgExc_SDLError, "display Surface quit"); } else if (set_behavior != 0) { return RAISE( PyExc_TypeError, "argument 1 must be pygame.Surface, or None with set_behavior=1"); } surf = pgSurface_AsSurface(surf_obj); if (NULL == surf) { return RAISE(PyExc_TypeError, "invalid surf argument"); } if (search_surf_obj && pgSurface_Check(search_surf_obj)) { search_surf = pgSurface_AsSurface(search_surf_obj); if (!search_surf) return RAISE(pgExc_SDLError, "display Surface quit"); } if (search_surf && search_color_obj != Py_None) { return RAISE(PyExc_TypeError, "if search_surf is used, search_color should be None"); } if (set_behavior == 2 && set_color_obj != Py_None) { return RAISE(PyExc_TypeError, "if set_behavior==2 set_color should be None"); } if (search_color_obj != Py_None) { if (_color_from_obj(search_color_obj, surf->format, NULL, &color_search_color)) return RAISE(PyExc_TypeError, "invalid search_color argument"); } if (_color_from_obj(threshold_obj, surf->format, rgba_threshold_default, &color_threshold)) return RAISE(PyExc_TypeError, "invalid threshold argument"); if (set_color_obj != Py_None) { if (_color_from_obj(set_color_obj, surf->format, rgba_set_color_default, &color_set_color)) return RAISE(PyExc_TypeError, "invalid set_color argument"); } if (dest_surf && (surf->h != dest_surf->h || surf->w != dest_surf->w)) { return RAISE(PyExc_TypeError, "surf and dest_surf not the same size"); } if (search_surf && (surf->h != search_surf->h || surf->w != search_surf->w)) { return RAISE(PyExc_TypeError, "surf and search_surf not the same size"); } if (dest_surf) pgSurface_Lock((pgSurfaceObject *)dest_surf_obj); pgSurface_Lock(surf_obj); if (search_surf) pgSurface_Lock((pgSurfaceObject *)search_surf_obj); Py_BEGIN_ALLOW_THREADS; num_threshold_pixels = get_threshold(dest_surf, surf, color_search_color, color_threshold, color_set_color, set_behavior, search_surf, inverse_set); Py_END_ALLOW_THREADS; if (dest_surf) pgSurface_Unlock((pgSurfaceObject *)dest_surf_obj); pgSurface_Unlock(surf_obj); if (search_surf) pgSurface_Unlock((pgSurfaceObject *)search_surf_obj); return PyLong_FromLong(num_threshold_pixels); } /* TODO: add_4 sub_4 mul_4 clamp_4 */ #define SURF_GET_AT(p_color, p_surf, p_x, p_y, p_pixels, p_format, p_pix) \ switch (p_format->BytesPerPixel) { \ case 1: \ p_color = (Uint32) * \ ((Uint8 *)(p_pixels) + (p_y) * p_surf->pitch + (p_x)); \ break; \ case 2: \ p_color = \ (Uint32) * \ ((Uint16 *)((p_pixels) + (p_y) * p_surf->pitch) + (p_x)); \ break; \ case 3: \ p_pix = \ ((Uint8 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x) * 3); \ p_color = (SDL_BYTEORDER == SDL_LIL_ENDIAN) \ ? (p_pix[0]) + (p_pix[1] << 8) + (p_pix[2] << 16) \ : (p_pix[2]) + (p_pix[1] << 8) + (p_pix[0] << 16); \ break; \ default: /* case 4: */ \ p_color = \ *((Uint32 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x)); \ break; \ } #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) #define SURF_SET_AT(p_color, p_surf, p_x, p_y, p_pixels, p_format, \ p_byte_buf) \ switch (p_format->BytesPerPixel) { \ case 1: \ *((Uint8 *)p_pixels + (p_y) * p_surf->pitch + (p_x)) = \ (Uint8)p_color; \ break; \ case 2: \ *((Uint16 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x)) = \ (Uint16)p_color; \ break; \ case 3: \ p_byte_buf = \ (Uint8 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x) * 3; \ *(p_byte_buf + (p_format->Rshift >> 3)) = \ (Uint8)(p_color >> p_format->Rshift); \ *(p_byte_buf + (p_format->Gshift >> 3)) = \ (Uint8)(p_color >> p_format->Gshift); \ *(p_byte_buf + (p_format->Bshift >> 3)) = \ (Uint8)(p_color >> p_format->Bshift); \ break; \ default: \ *((Uint32 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x)) = \ p_color; \ break; \ } #else #define SURF_SET_AT(p_color, p_surf, p_x, p_y, p_pixels, p_format, \ p_byte_buf) \ switch (p_format->BytesPerPixel) { \ case 1: \ *((Uint8 *)p_pixels + (p_y) * p_surf->pitch + (p_x)) = \ (Uint8)p_color; \ break; \ case 2: \ *((Uint16 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x)) = \ (Uint16)p_color; \ break; \ case 3: \ p_byte_buf = \ (Uint8 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x) * 3; \ *(p_byte_buf + 2 - (p_format->Rshift >> 3)) = \ (Uint8)(p_color >> p_format->Rshift); \ *(p_byte_buf + 2 - (p_format->Gshift >> 3)) = \ (Uint8)(p_color >> p_format->Gshift); \ *(p_byte_buf + 2 - (p_format->Bshift >> 3)) = \ (Uint8)(p_color >> p_format->Bshift); \ break; \ default: \ *((Uint32 *)(p_pixels + (p_y) * p_surf->pitch) + (p_x)) = \ p_color; \ break; \ } #endif SDL_Surface * grayscale(pgSurfaceObject *srcobj, pgSurfaceObject *dstobj) { SDL_Surface *src = pgSurface_AsSurface(srcobj); SDL_Surface *newsurf; if (!src) return RAISE(pgExc_SDLError, "display Surface quit"); if (!dstobj) { newsurf = newsurf_fromsurf(src, srcobj->surf->w, srcobj->surf->h); if (!newsurf) return NULL; } else { newsurf = pgSurface_AsSurface(dstobj); if (!newsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } if (newsurf->w != src->w || newsurf->h != src->h) { return (SDL_Surface *)(RAISE( PyExc_ValueError, "Destination surface must be the same size as source surface.")); } if (src->format->BytesPerPixel != newsurf->format->BytesPerPixel) { return (SDL_Surface *)(RAISE( PyExc_ValueError, "Source and destination surfaces need the same format.")); } int x, y; for (y = 0; y < src->h; y++) { for (x = 0; x < src->w; x++) { Uint32 pixel; Uint8 *pix; SURF_GET_AT(pixel, src, x, y, (Uint8 *)src->pixels, src->format, pix); Uint8 r, g, b, a; SDL_GetRGBA(pixel, src->format, &r, &g, &b, &a); Uint8 grayscale_pixel = (Uint8)(0.299 * r + 0.587 * g + 0.114 * b); Uint32 new_pixel = SDL_MapRGBA(newsurf->format, grayscale_pixel, grayscale_pixel, grayscale_pixel, a); SURF_SET_AT(new_pixel, newsurf, x, y, (Uint8 *)newsurf->pixels, newsurf->format, pix); } } SDL_UnlockSurface(newsurf); return newsurf; } static PyObject * surf_grayscale(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; pgSurfaceObject *surfobj2 = NULL; SDL_Surface *newsurf; static char *keywords[] = {"surface", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O!", keywords, &pgSurface_Type, &surfobj, &pgSurface_Type, &surfobj2)) return NULL; newsurf = grayscale(surfobj, surfobj2); if (!newsurf) { return NULL; } if (surfobj2) { Py_INCREF(surfobj2); return (PyObject *)surfobj2; } else { return (PyObject *)pgSurface_New(newsurf); } } /* number to use for missing samples */ #define LAPLACIAN_NUM 0xFFFFFFFF void laplacian(SDL_Surface *surf, SDL_Surface *destsurf) { int ii; int x, y, height, width; Uint32 sample[9]; // Uint32 total[4]; int total[4]; Uint8 c1r, c1g, c1b, c1a; // Uint32 c1r, c1g, c1b, c1a; Uint8 acolor[4]; Uint32 the_color; int atmp0; int atmp1; int atmp2; int atmp3; SDL_PixelFormat *format, *destformat; Uint8 *pixels, *destpixels; Uint8 *pix; Uint8 *byte_buf; height = surf->h; width = surf->w; pixels = (Uint8 *)surf->pixels; format = surf->format; destpixels = (Uint8 *)destsurf->pixels; destformat = destsurf->format; /* -1 -1 -1 -1 8 -1 -1 -1 -1 col = (sample[4] * 8) - (sample[0] + sample[1] + sample[2] + sample[3] + sample[5] + sample[6] + sample[7] + sample[8]) [(-1,-1), (0,-1), (1,-1), (-1,0), (0,0), (1,0), (-1,1), (0,1), (1,1)] */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { // Need to bounds check these accesses. if (y > 0) { if (x > 0) { SURF_GET_AT(sample[0], surf, x + -1, y + -1, pixels, format, pix); } SURF_GET_AT(sample[1], surf, x + 0, y + -1, pixels, format, pix); if (x + 1 < width) { SURF_GET_AT(sample[2], surf, x + 1, y + -1, pixels, format, pix); } } else { sample[0] = LAPLACIAN_NUM; sample[1] = LAPLACIAN_NUM; sample[2] = LAPLACIAN_NUM; } if (x > 0) { SURF_GET_AT(sample[3], surf, x + -1, y + 0, pixels, format, pix); } else { sample[3] = LAPLACIAN_NUM; } // SURF_GET_AT(sample[4], surf, x+0 , y+0); sample[4] = 0; if (x + 1 < width) { SURF_GET_AT(sample[5], surf, x + 1, y + 0, pixels, format, pix); } else { sample[5] = LAPLACIAN_NUM; } if (y + 1 < height) { if (x > 0) { SURF_GET_AT(sample[6], surf, x + -1, y + 1, pixels, format, pix); } SURF_GET_AT(sample[7], surf, x + 0, y + 1, pixels, format, pix); if (x + 1 < width) { SURF_GET_AT(sample[8], surf, x + 1, y + 1, pixels, format, pix); } } else { sample[6] = LAPLACIAN_NUM; sample[7] = LAPLACIAN_NUM; sample[8] = LAPLACIAN_NUM; } memset(total, 0, 4 * sizeof(int)); for (ii = 0; ii < 9; ii++) { SDL_GetRGBA(sample[ii], format, &c1r, &c1g, &c1b, &c1a); total[0] += c1r; total[1] += c1g; total[2] += c1b; total[3] += c1a; } SURF_GET_AT(sample[4], surf, x, y, pixels, format, pix); SDL_GetRGBA(sample[4], format, &c1r, &c1g, &c1b, &c1a); // cast on the right to a signed int, and then clamp to 0-255. // atmp = c1r * 8 atmp0 = c1r * 8; acolor[0] = MIN(MAX(atmp0 - total[0], 0), 255); atmp1 = c1g * 8; acolor[1] = MIN(MAX(atmp1 - total[1], 0), 255); atmp2 = c1b * 8; acolor[2] = MIN(MAX(atmp2 - total[2], 0), 255); atmp3 = c1a * 8; acolor[3] = MIN(MAX(atmp3 - total[3], 0), 255); // printf("%d;;%d;;%d;; ", atmp0, acolor[0],total[0]); // printf("%d,%d,%d,%d;; \n", acolor[0], acolor[1], acolor[2], // acolor[3]); // the_color = (Uint32)acolor; // the_color = 0x00000000; // cast on the right to Uint32, and then clamp to 255. the_color = SDL_MapRGBA(surf->format, acolor[0], acolor[1], acolor[2], acolor[3]); // set_at(destsurf, color, x,y); switch (destformat->BytesPerPixel) { case 1: *((Uint8 *)destpixels + y * destsurf->pitch + x) = (Uint8)the_color; break; case 2: *((Uint16 *)(destpixels + y * destsurf->pitch) + x) = (Uint16)the_color; break; case 3: byte_buf = (Uint8 *)(destpixels + y * destsurf->pitch) + x * 3; #if (SDL_BYTEORDER == SDL_LIL_ENDIAN) *(byte_buf + (destformat->Rshift >> 3)) = (Uint8)(the_color >> surf->format->Rshift); *(byte_buf + (destformat->Gshift >> 3)) = (Uint8)(the_color >> surf->format->Gshift); *(byte_buf + (destformat->Bshift >> 3)) = (Uint8)(the_color >> surf->format->Bshift); #else *(byte_buf + 2 - (destformat->Rshift >> 3)) = (Uint8)(the_color >> surf->format->Rshift); *(byte_buf + 2 - (destformat->Gshift >> 3)) = (Uint8)(the_color >> surf->format->Gshift); *(byte_buf + 2 - (destformat->Bshift >> 3)) = (Uint8)(the_color >> surf->format->Bshift); #endif break; default: *((Uint32 *)(destpixels + y * destsurf->pitch) + x) = the_color; break; } } } } static PyObject * surf_laplacian(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *surfobj, *surfobj2 = NULL; SDL_Surface *surf; SDL_Surface *newsurf; static char *keywords[] = {"surface", "dest_surface", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O!", keywords, &pgSurface_Type, &surfobj, &pgSurface_Type, &surfobj2)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); /* if the second surface is not there, then make a new one. */ if (!surfobj2) { int width = surf->w; int height = surf->h; newsurf = newsurf_fromsurf(surf, width, height); if (!newsurf) return NULL; } else { newsurf = pgSurface_AsSurface(surfobj2); if (!newsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } /* check to see if the size is the correct size. */ if (newsurf->w != (surf->w) || newsurf->h != (surf->h)) return RAISE(PyExc_ValueError, "Destination surface not the same size."); /* check to see if the format of the surface is the same. */ if (surf->format->BytesPerPixel != newsurf->format->BytesPerPixel) return RAISE(PyExc_ValueError, "Source and destination surfaces need the same format."); SDL_LockSurface(newsurf); SDL_LockSurface(surf); Py_BEGIN_ALLOW_THREADS; laplacian(surf, newsurf); Py_END_ALLOW_THREADS; SDL_UnlockSurface(surf); SDL_UnlockSurface(newsurf); if (surfobj2) { Py_INCREF(surfobj2); return surfobj2; } else return (PyObject *)pgSurface_New(newsurf); } int average_surfaces(SDL_Surface **surfaces, size_t num_surfaces, SDL_Surface *destsurf, int palette_colors) { /* returns the average surface from the ones given. All surfaces need to be the same size. palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. */ Uint32 *accumulate; Uint32 *the_idx; Uint32 the_color; SDL_Surface *surf; size_t surf_idx; int height, width, x, y; float div_inv; SDL_PixelFormat *format, *destformat; Uint8 *pixels, *destpixels; Uint8 *pix; Uint8 *byte_buf; Uint32 rmask, gmask, bmask; int rshift, gshift, bshift, rloss, gloss, bloss; int num_elements; if (!num_surfaces) { return 0; } height = surfaces[0]->h; width = surfaces[0]->w; destpixels = (Uint8 *)destsurf->pixels; destformat = destsurf->format; /* allocate an array to accumulate them all. If we're using 1 byte per pixel, then only need to average on that much. */ if ((destformat->BytesPerPixel == 1) && (destformat->palette) && (!palette_colors)) { num_elements = 1; } else { num_elements = 3; } accumulate = (Uint32 *)calloc(1, sizeof(Uint32) * height * width * num_elements); if (!accumulate) { return -1; } /* add up the r,g,b from all the surfaces. */ for (surf_idx = 0; surf_idx < num_surfaces; surf_idx++) { surf = surfaces[surf_idx]; pixels = (Uint8 *)surf->pixels; format = surf->format; rmask = format->Rmask; gmask = format->Gmask; bmask = format->Bmask; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; the_idx = accumulate; /* If palette surface, we use a different code path... */ if ((format->BytesPerPixel == 1 && destformat->BytesPerPixel == 1) && (format->palette) && (destformat->palette) && (!palette_colors)) { /* This is useful if the surface is actually greyscale colors, and not palette colors. */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { SURF_GET_AT(the_color, surf, x, y, pixels, format, pix); *(the_idx) += the_color; the_idx++; } } } else { /* TODO: This doesn't work correctly for palette surfaces yet, when the source is paletted. Probably need to use something like GET_PIXELVALS_1 from surface.h */ /* for non palette surfaces, we do this... */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { SURF_GET_AT(the_color, surf, x, y, pixels, format, pix); *(the_idx) += ((the_color & rmask) >> rshift) << rloss; *(the_idx + 1) += ((the_color & gmask) >> gshift) << gloss; *(the_idx + 2) += ((the_color & bmask) >> bshift) << bloss; the_idx += 3; } } } } /* blit the accumulated array back to the destination surface. */ div_inv = (float)(1.0L / (num_surfaces)); the_idx = accumulate; if (num_elements == 1 && (!palette_colors)) { /* this is where we are using the palette surface without using its colors from the palette. */ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { the_color = (Uint32)(*(the_idx)*div_inv + .5f); SURF_SET_AT(the_color, destsurf, x, y, destpixels, destformat, byte_buf); the_idx++; } } /* TODO: will need to handle palette colors. */ } else if (num_elements == 3) { for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { the_color = SDL_MapRGB(destformat, (Uint8)(*(the_idx)*div_inv + .5f), (Uint8)(*(the_idx + 1) * div_inv + .5f), (Uint8)(*(the_idx + 2) * div_inv + .5f)); /* TODO: should it take into consideration the output shifts/masks/losses? Or does SDL_MapRGB do that correctly? *(the_idx) += ((the_color & rmask) >> rshift) << rloss; *(the_idx + 1) += ((the_color & gmask) >> gshift) << gloss; *(the_idx + 2) += ((the_color & bmask) >> bshift) << bloss; */ SURF_SET_AT(the_color, destsurf, x, y, destpixels, destformat, byte_buf); the_idx += 3; } } } else { free(accumulate); return -4; } free(accumulate); return 1; } /* returns the average surface from the ones given. All surfaces need to be the same size. palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. */ static PyObject * surf_average_surfaces(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *surfobj2 = NULL; SDL_Surface *surf; SDL_Surface *newsurf = NULL; SDL_Surface **surfaces; int width, height; int an_error = 0; size_t size, loop, loop_up_to; int palette_colors = 1; PyObject *list, *obj; PyObject *ret = NULL; static char *keywords[] = {"surfaces", "dest_surface", "palette_colors", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O!i", keywords, &list, &pgSurface_Type, &surfobj2, &palette_colors)) return NULL; if (!PySequence_Check(list)) return RAISE(PyExc_TypeError, "Argument must be a sequence of surface objects."); size = PySequence_Length(list); /*warning, size could be -1 on error?*/ if (size < 1) return RAISE(PyExc_TypeError, "Needs to be given at least one surface."); /* Allocate an array of surface pointers. */ surfaces = (SDL_Surface **)calloc(1, sizeof(SDL_Surface *) * size); if (!surfaces) { return RAISE(PyExc_MemoryError, "Not enough memory to store surfaces.\n"); } /* Iterate over 'surfaces' passed in. */ /* need to get the first surface to see how big it is */ for (loop = 0; loop < size; ++loop) { obj = PySequence_GetItem(list, loop); if (!obj) { Py_XDECREF(obj); ret = RAISE(PyExc_TypeError, "Needs to be a surface object."); an_error = 1; break; } if (!pgSurface_Check(obj)) { Py_XDECREF(obj); ret = RAISE(PyExc_TypeError, "Needs to be a surface object."); an_error = 1; break; } surf = pgSurface_AsSurface(obj); if (!surf) { Py_XDECREF(obj); ret = RAISE(PyExc_TypeError, "Needs to be a surface object."); an_error = 1; break; } if (loop == 0) { /* if the second surface is not there, then make a new one. */ if (!surfobj2) { width = surf->w; height = surf->h; newsurf = newsurf_fromsurf(surf, width, height); if (!newsurf) { Py_XDECREF(obj); ret = RAISE(PyExc_ValueError, "Could not create new surface."); an_error = 1; break; } } else { newsurf = pgSurface_AsSurface(surfobj2); if (!newsurf) return RAISE(pgExc_SDLError, "display Surface quit"); } /* check to see if the size is the correct size. */ if (newsurf->w != (surf->w) || newsurf->h != (surf->h)) { Py_XDECREF(obj); ret = RAISE(PyExc_ValueError, "Destination surface not the same size."); an_error = 1; break; } /* check to see if the format of the surface is the same. */ if (surf->format->BytesPerPixel != newsurf->format->BytesPerPixel) { Py_XDECREF(obj); ret = RAISE( PyExc_ValueError, "Source and destination surfaces need the same format."); an_error = 1; break; } } /* Copy surface pointer, and also lock surface. */ SDL_LockSurface(surf); surfaces[loop] = surf; Py_DECREF(obj); } loop_up_to = loop; if (!an_error) { /* Process images, get average surface. */ SDL_LockSurface(newsurf); Py_BEGIN_ALLOW_THREADS; average_surfaces(surfaces, size, newsurf, palette_colors); Py_END_ALLOW_THREADS; SDL_UnlockSurface(newsurf); if (surfobj2) { Py_INCREF(surfobj2); ret = surfobj2; } else { ret = (PyObject *)pgSurface_New(newsurf); } } /* cleanup */ /* unlock the surfaces we got up to. */ for (loop = 0; loop < loop_up_to; loop++) { if (surfaces[loop]) { SDL_UnlockSurface(surfaces[loop]); } } free(surfaces); return ret; } /* VS 2015 crashes when compiling this function, turning off optimisations to try to fix it */ #if defined(_MSC_VER) && (_MSC_VER == 1900) #pragma optimize("", off) #endif /* When GCC compiles the following function with -O3 on PPC64 little endian, * the function gives incorrect output with 24-bit surfaces. This is most * likely a compiler bug, see #2876 for related issue. * So turn optimisations off here */ #if defined(__GNUC__) && defined(__PPC64__) #pragma GCC push_options #pragma GCC optimize("O0") #endif void average_color(SDL_Surface *surf, int x, int y, int width, int height, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a, SDL_bool consider_alpha) { Uint32 color, rmask, gmask, bmask, amask; Uint8 *pixels; unsigned int rtot, gtot, btot, atot, size, rshift, gshift, bshift, ashift, alpha; unsigned int rloss, gloss, bloss, aloss; int row, col, width_and_x, height_and_y; SDL_PixelFormat *format; format = surf->format; rmask = format->Rmask; gmask = format->Gmask; bmask = format->Bmask; amask = format->Amask; rshift = format->Rshift; gshift = format->Gshift; bshift = format->Bshift; ashift = format->Ashift; rloss = format->Rloss; gloss = format->Gloss; bloss = format->Bloss; aloss = format->Aloss; rtot = gtot = btot = atot = 0; /* make sure the area specified is within the Surface */ if ((x + width) > surf->w) width = surf->w - x; if ((y + height) > surf->h) height = surf->h - y; if (x < 0) { width -= (-x); x = 0; } if (y < 0) { height -= (-y); y = 0; } size = width * height; width_and_x = width + x; height_and_y = height + y; if (consider_alpha) { switch (format->BytesPerPixel) { case 1: { Uint8 color8; for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x; for (col = x; col < width_and_x; col++) { color8 = *(Uint8 *)pixels; alpha = ((color8 & amask) >> ashift) << aloss; atot += alpha; rtot += ((((color8 & rmask) >> rshift) << rloss) * alpha); gtot += ((((color8 & gmask) >> gshift) << gloss) * alpha); btot += ((((color8 & bmask) >> bshift) << bloss) * alpha); pixels++; } } } break; case 2: for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 2; for (col = x; col < width_and_x; col++) { color = (Uint32) * ((Uint16 *)pixels); alpha = ((color & amask) >> ashift) << aloss; atot += alpha; rtot += ((((color & rmask) >> rshift) << rloss) * alpha); gtot += ((((color & gmask) >> gshift) << gloss) * alpha); btot += ((((color & bmask) >> bshift) << bloss) * alpha); pixels += 2; } } break; case 3: for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 3; for (col = x; col < width_and_x; col++) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = (pixels[0]) + (pixels[1] << 8) + (pixels[2] << 16); #else color = (pixels[2]) + (pixels[1] << 8) + (pixels[0] << 16); #endif alpha = ((color & amask) >> ashift) << aloss; atot += alpha; rtot += ((((color & rmask) >> rshift) << rloss) * alpha); gtot += ((((color & gmask) >> gshift) << gloss) * alpha); btot += ((((color & bmask) >> bshift) << bloss) * alpha); pixels += 3; } } break; default: /* case 4: */ for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 4; for (col = x; col < width_and_x; col++) { color = *(Uint32 *)pixels; alpha = ((color & amask) >> ashift) << aloss; atot += alpha; rtot += ((((color & rmask) >> rshift) << rloss) * alpha); gtot += ((((color & gmask) >> gshift) << gloss) * alpha); btot += ((((color & bmask) >> bshift) << bloss) * alpha); pixels += 4; } } break; } *a = atot / size; size = (atot == 0 ? size : atot); *r = rtot / size; *g = gtot / size; *b = btot / size; } else { switch (format->BytesPerPixel) { case 1: { Uint8 color8; for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x; for (col = x; col < width_and_x; col++) { color8 = *(Uint8 *)pixels; rtot += ((color8 & rmask) >> rshift) << rloss; gtot += ((color8 & gmask) >> gshift) << gloss; btot += ((color8 & bmask) >> bshift) << bloss; atot += ((color8 & amask) >> ashift) << aloss; pixels++; } } } break; case 2: for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 2; for (col = x; col < width_and_x; col++) { color = (Uint32) * ((Uint16 *)pixels); rtot += ((color & rmask) >> rshift) << rloss; gtot += ((color & gmask) >> gshift) << gloss; btot += ((color & bmask) >> bshift) << bloss; atot += ((color & amask) >> ashift) << aloss; pixels += 2; } } break; case 3: for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 3; for (col = x; col < width_and_x; col++) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN color = (pixels[0]) + (pixels[1] << 8) + (pixels[2] << 16); #else color = (pixels[2]) + (pixels[1] << 8) + (pixels[0] << 16); #endif rtot += ((color & rmask) >> rshift) << rloss; gtot += ((color & gmask) >> gshift) << gloss; btot += ((color & bmask) >> bshift) << bloss; atot += ((color & amask) >> ashift) << aloss; pixels += 3; } } break; default: /* case 4: */ for (row = y; row < height_and_y; row++) { pixels = (Uint8 *)surf->pixels + row * surf->pitch + x * 4; for (col = x; col < width_and_x; col++) { color = *(Uint32 *)pixels; rtot += ((color & rmask) >> rshift) << rloss; gtot += ((color & gmask) >> gshift) << gloss; btot += ((color & bmask) >> bshift) << bloss; atot += ((color & amask) >> ashift) << aloss; pixels += 4; } } break; } *r = rtot / size; *g = gtot / size; *b = btot / size; *a = atot / size; } } /* Optimisation was only disabled for one function - see above */ #if defined(_MSC_VER) && (_MSC_VER == 1900) #pragma optimize("", on) #endif /* Optimisation was only disabled for one function on GCC+PPC64 - see above */ #if defined(__GNUC__) && defined(__PPC64__) #pragma GCC pop_options #endif static PyObject * surf_average_color(PyObject *self, PyObject *args, PyObject *kwargs) { pgSurfaceObject *surfobj; PyObject *rectobj = NULL; SDL_Surface *surf; SDL_Rect *rect, temp; Uint8 r, g, b, a; int x, y, w, h; static char *keywords[] = {"surface", "rect", "consider_alpha", NULL}; SDL_bool consider_alpha = SDL_FALSE; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|Op", keywords, &pgSurface_Type, &surfobj, &rectobj, &consider_alpha)) return NULL; surf = pgSurface_AsSurface(surfobj); if (!surf) return RAISE(pgExc_SDLError, "display Surface quit"); pgSurface_Lock(surfobj); if (!rectobj) { x = 0; y = 0; w = surf->w; h = surf->h; } else { if (!(rect = pgRect_FromObject(rectobj, &temp))) return RAISE(PyExc_TypeError, "Rect argument is invalid"); x = rect->x; y = rect->y; w = rect->w; h = rect->h; } Py_BEGIN_ALLOW_THREADS; average_color(surf, x, y, w, h, &r, &g, &b, &a, consider_alpha); Py_END_ALLOW_THREADS; pgSurface_Unlock(surfobj); return Py_BuildValue("(bbbb)", r, g, b, a); } static PyMethodDef _transform_methods[] = { {"scale", (PyCFunction)surf_scale, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSCALE}, {"scale_by", (PyCFunction)surf_scale_by, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSCALEBY}, {"rotate", (PyCFunction)surf_rotate, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMROTATE}, {"flip", (PyCFunction)surf_flip, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMFLIP}, {"rotozoom", (PyCFunction)surf_rotozoom, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMROTOZOOM}, {"chop", (PyCFunction)surf_chop, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMCHOP}, {"scale2x", (PyCFunction)surf_scale2x, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSCALE2X}, {"smoothscale", (PyCFunction)surf_scalesmooth, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSMOOTHSCALE}, {"smoothscale_by", (PyCFunction)surf_scalesmooth_by, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSMOOTHSCALEBY}, {"get_smoothscale_backend", surf_get_smoothscale_backend, METH_NOARGS, DOC_PYGAMETRANSFORMGETSMOOTHSCALEBACKEND}, {"set_smoothscale_backend", (PyCFunction)surf_set_smoothscale_backend, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMSETSMOOTHSCALEBACKEND}, {"threshold", (PyCFunction)surf_threshold, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMTHRESHOLD}, {"laplacian", (PyCFunction)surf_laplacian, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMTHRESHOLD}, {"average_surfaces", (PyCFunction)surf_average_surfaces, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMAVERAGESURFACES}, {"average_color", (PyCFunction)surf_average_color, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMAVERAGECOLOR}, {"grayscale", (PyCFunction)surf_grayscale, METH_VARARGS | METH_KEYWORDS, DOC_PYGAMETRANSFORMGRAYSCALE}, {NULL, NULL, 0, NULL}}; MODINIT_DEFINE(transform) { PyObject *module; struct _module_state *st; static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, "transform", DOC_PYGAMETRANSFORM, sizeof(struct _module_state), _transform_methods, NULL, NULL, NULL, NULL}; /* imported needed apis; Do this first so if there is an error the module is not loaded. */ import_pygame_base(); if (PyErr_Occurred()) { return NULL; } import_pygame_color(); if (PyErr_Occurred()) { return NULL; } import_pygame_rect(); if (PyErr_Occurred()) { return NULL; } import_pygame_surface(); if (PyErr_Occurred()) { return NULL; } /* create the module */ module = PyModule_Create(&_module); if (module == 0) { return NULL; } st = GETSTATE(module); if (st->filter_type == 0) { smoothscale_init(st); } return module; } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_c/void.c0000644000175100001770000000023414676242340014614 0ustar00runnerdocker/* this file is used for static compilation to avoid duplicate symbols in some objects files while some other may need to be linked manually */ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0631256 pygame-2.6.1/src_py/0000755000175100001770000000000014676242436013724 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/.editorconfig0000644000175100001770000000064314676242340016376 0ustar00runnerdockerroot=true [*] end_of_line = lf insert_final_newline = true # The settings for C (*.c and *.h) files are mirrored in src_c/.clang-format. # Keep them in sync. [*.{c,h}] indent_style = space indent_size = 4 tab_width = 4 trim_trailing_whitespace = true max_line_length = 79 [*.{py,pyx}] indent_style = space indent_size = 4 charset = utf-8 file_type_emacs = python trim_trailing_whitespace = true max_line_length = 79 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/__init__.py0000644000175100001770000002241314676242340016031 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2001 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. The package is highly portable, with games running on Windows, MacOS, OS X, BeOS, FreeBSD, IRIX, and Linux.""" import sys import os # Choose Windows display driver if os.name == "nt": pygame_dir = os.path.split(__file__)[0] # pypy does not find the dlls, so we add package folder to PATH. os.environ["PATH"] = os.environ["PATH"] + ";" + pygame_dir # windows store python does not find the dlls, so we run this if sys.version_info > (3, 8): os.add_dll_directory(pygame_dir) # only available in 3.8+ # cleanup namespace del pygame_dir # when running under X11, always set the SDL window WM_CLASS to make the # window managers correctly match the pygame window. elif "DISPLAY" in os.environ and "SDL_VIDEO_X11_WMCLASS" not in os.environ: os.environ["SDL_VIDEO_X11_WMCLASS"] = os.path.basename(sys.argv[0]) def _attribute_undefined(name): raise RuntimeError(f"{name} is not available") class MissingModule: _NOT_IMPLEMENTED_ = True def __init__(self, name, urgent=0): self.name = name exc_type, exc_msg = sys.exc_info()[:2] self.info = str(exc_msg) self.reason = f"{exc_type.__name__}: {self.info}" self.urgent = urgent if urgent: self.warn() def __getattr__(self, var): if not self.urgent: self.warn() self.urgent = 1 missing_msg = f"{self.name} module not available ({self.reason})" raise NotImplementedError(missing_msg) def __bool__(self): return False def warn(self): msg_type = "import" if self.urgent else "use" message = f"{msg_type} {self.name}: {self.info}\n({self.reason})" try: import warnings level = 4 if self.urgent else 3 warnings.warn(message, RuntimeWarning, level) except ImportError: print(message) # we need to import like this, each at a time. the cleanest way to import # our modules is with the import command (not the __import__ function) # isort: skip_file # first, the "required" modules from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] from pygame.constants import * # now has __all__ pylint: disable=wildcard-import; lgtm[py/polluting-import] from pygame.version import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] from pygame.rect import Rect from pygame.rwobject import encode_string, encode_file_path import pygame.surflock import pygame.color Color = pygame.color.Color import pygame.bufferproxy BufferProxy = pygame.bufferproxy.BufferProxy import pygame.math Vector2 = pygame.math.Vector2 Vector3 = pygame.math.Vector3 __version__ = ver # next, the "standard" modules # we still allow them to be missing for stripped down pygame distributions if get_sdl_version() < (2, 0, 0): # cdrom only available for SDL 1.2.X try: import pygame.cdrom except (ImportError, OSError): cdrom = MissingModule("cdrom", urgent=1) try: import pygame.display except (ImportError, OSError): display = MissingModule("display", urgent=1) try: import pygame.draw except (ImportError, OSError): draw = MissingModule("draw", urgent=1) try: import pygame.event except (ImportError, OSError): event = MissingModule("event", urgent=1) try: import pygame.image except (ImportError, OSError): image = MissingModule("image", urgent=1) try: import pygame.joystick except (ImportError, OSError): joystick = MissingModule("joystick", urgent=1) try: import pygame.key except (ImportError, OSError): key = MissingModule("key", urgent=1) try: import pygame.mouse except (ImportError, OSError): mouse = MissingModule("mouse", urgent=1) try: import pygame.cursors from pygame.cursors import Cursor except (ImportError, OSError): cursors = MissingModule("cursors", urgent=1) def Cursor(*args): # pylint: disable=unused-argument _attribute_undefined("pygame.Cursor") try: import pygame.sprite except (ImportError, OSError): sprite = MissingModule("sprite", urgent=1) try: import pygame.threads except (ImportError, OSError): threads = MissingModule("threads", urgent=1) try: import pygame.pixelcopy except (ImportError, OSError): pixelcopy = MissingModule("pixelcopy", urgent=1) try: from pygame.surface import Surface, SurfaceType except (ImportError, OSError): def Surface(size, flags, depth, masks): # pylint: disable=unused-argument _attribute_undefined("pygame.Surface") SurfaceType = Surface try: import pygame.mask from pygame.mask import Mask except (ImportError, OSError): mask = MissingModule("mask", urgent=0) def Mask(size, fill): # pylint: disable=unused-argument _attribute_undefined("pygame.Mask") try: from pygame.pixelarray import PixelArray except (ImportError, OSError): def PixelArray(surface): # pylint: disable=unused-argument _attribute_undefined("pygame.PixelArray") try: from pygame.overlay import Overlay except (ImportError, OSError): def Overlay(format, size): # pylint: disable=unused-argument _attribute_undefined("pygame.Overlay") try: import pygame.time except (ImportError, OSError): time = MissingModule("time", urgent=1) try: import pygame.transform except (ImportError, OSError): transform = MissingModule("transform", urgent=1) # lastly, the "optional" pygame modules if "PYGAME_FREETYPE" in os.environ: try: import pygame.ftfont as font sys.modules["pygame.font"] = font except (ImportError, OSError): pass try: import pygame.font import pygame.sysfont pygame.font.SysFont = pygame.sysfont.SysFont pygame.font.get_fonts = pygame.sysfont.get_fonts pygame.font.match_font = pygame.sysfont.match_font except (ImportError, OSError): font = MissingModule("font", urgent=0) # try and load pygame.mixer_music before mixer, for py2app... try: import pygame.mixer_music # del pygame.mixer_music # print("NOTE2: failed importing pygame.mixer_music in lib/__init__.py") except (ImportError, OSError): pass try: import pygame.mixer except (ImportError, OSError): mixer = MissingModule("mixer", urgent=0) try: import pygame.scrap except (ImportError, OSError): scrap = MissingModule("scrap", urgent=0) try: import pygame.surfarray except (ImportError, OSError): surfarray = MissingModule("surfarray", urgent=0) try: import pygame.sndarray except (ImportError, OSError): sndarray = MissingModule("sndarray", urgent=0) try: import pygame.fastevent except (ImportError, OSError): fastevent = MissingModule("fastevent", urgent=0) # there's also a couple "internal" modules not needed # by users, but putting them here helps "dependency finder" # programs get everything they need (like py2exe) try: import pygame.imageext del pygame.imageext except (ImportError, OSError): pass # this internal module needs to be included for dependency # finders, but can't be deleted, as some tests need it try: import pygame.pkgdata except (ImportError, OSError): pass def packager_imports(): """some additional imports that py2app/py2exe will want to see""" import atexit import numpy import OpenGL.GL import pygame.macosx import pygame.colordict # make Rects pickleable import copyreg def __rect_constructor(x, y, w, h): return Rect(x, y, w, h) def __rect_reduce(r): assert isinstance(r, Rect) return __rect_constructor, (r.x, r.y, r.w, r.h) copyreg.pickle(Rect, __rect_reduce, __rect_constructor) # make Colors pickleable def __color_constructor(r, g, b, a): return Color(r, g, b, a) def __color_reduce(c): assert isinstance(c, Color) return __color_constructor, (c.r, c.g, c.b, c.a) copyreg.pickle(Color, __color_reduce, __color_constructor) # Thanks for supporting pygame. Without support now, there won't be pygame later. if "PYGAME_HIDE_SUPPORT_PROMPT" not in os.environ: print( "pygame {} (SDL {}.{}.{}, Python {}.{}.{})".format( # pylint: disable=consider-using-f-string ver, *get_sdl_version() + sys.version_info[0:3] ) ) print("Hello from the pygame community. https://www.pygame.org/contribute.html") # cleanup namespace del pygame, os, sys, MissingModule, copyreg, packager_imports ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0631256 pygame-2.6.1/src_py/__pyinstaller/0000755000175100001770000000000014676242436016570 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/__pyinstaller/__init__.py0000644000175100001770000000011014676242340020663 0ustar00runnerdockerimport os def get_hook_dirs(): return [os.path.dirname(__file__)] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/__pyinstaller/hook-pygame.py0000644000175100001770000000253014676242340021354 0ustar00runnerdocker""" binaries hook for pygame seems to be required for pygame 2.0 Windows. Otherwise some essential DLLs will not be transferred to the exe. And also put hooks for datas, resources that pygame uses, to work correctly with pyinstaller """ import os import platform from pygame import __file__ as pygame_main_file # Get pygame's folder pygame_folder = os.path.dirname(os.path.abspath(pygame_main_file)) # datas is the variable that pyinstaller looks for while processing hooks datas = [] # A helper to append the relative path of a resource to hook variable - datas def _append_to_datas(file_path): res_path = os.path.join(pygame_folder, file_path) if os.path.exists(res_path): datas.append((res_path, "pygame")) # First append the font file, then based on the OS, append pygame icon file _append_to_datas("freesansbold.ttf") if platform.system() == "Darwin": _append_to_datas("pygame_icon_mac.bmp") else: _append_to_datas("pygame_icon.bmp") if platform.system() == "Windows": from PyInstaller.utils.hooks import collect_dynamic_libs pre_binaries = collect_dynamic_libs("pygame") binaries = [] for b in pre_binaries: binary, location = b # settles all the DLLs into the top level folder, which prevents duplication # with the DLLs already being put there. binaries.append((binary, ".")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/_camera_opencv.py0000644000175100001770000001251614676242340017236 0ustar00runnerdocker"""pygame.camera backend that uses OpenCV. Uses the cv2 module opencv for python. See https://pypi.org/project/opencv-python/ for wheels version. python3 -m pip install opencv-python --user """ import sys import time import numpy import cv2 import pygame def list_cameras(): """ """ index = 0 device_idx = [] failed = 0 # Sometimes there are gaps between the device index. # We keep trying max_gaps times. max_gaps = 3 while failed < max_gaps: vcap = cv2.VideoCapture(index) if not vcap.read()[0]: failed += 1 else: device_idx.append(index) vcap.release() index += 1 return device_idx def list_cameras_darwin(): import subprocess from xml.etree import ElementTree # pylint: disable=consider-using-with flout, _ = subprocess.Popen( "system_profiler -xml SPCameraDataType", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ).communicate() last_text = None cameras = [] for node in ElementTree.fromstring(flout).iterfind("./array/dict/array/dict/*"): if last_text == "_name": cameras.append(node.text) last_text = node.text return cameras class Camera: def __init__(self, device=0, size=(640, 480), mode="RGB", api_preference=None): """ api_preference - cv2.CAP_DSHOW cv2.CAP_V4L2 cv2.CAP_MSMF and others # See https://docs.opencv.org/3.4/d4/d15/group__videoio__flags__base.html """ self._device_index = device self._size = size self.api_preference = api_preference if api_preference is not None and sys.platform == "win32": # seems more compatible on windows? self.api_preference = cv2.CAP_DSHOW if mode == "RGB": self._fmt = cv2.COLOR_BGR2RGB elif mode == "YUV": self._fmt = cv2.COLOR_BGR2YUV elif mode == "HSV": self._fmt = cv2.COLOR_BGR2HSV else: raise ValueError("Not a supported mode") self._open = False # all of this could have been done in the constructor, but creating # the VideoCapture is very time consuming, so it makes more sense in the # actual start() method def start(self): if self._open: return self._cam = cv2.VideoCapture(self._device_index, self.api_preference) if not self._cam.isOpened(): raise ValueError("Could not open camera.") self._cam.set(cv2.CAP_PROP_FRAME_WIDTH, self._size[0]) self._cam.set(cv2.CAP_PROP_FRAME_HEIGHT, self._size[1]) w = self._cam.get(cv2.CAP_PROP_FRAME_WIDTH) h = self._cam.get(cv2.CAP_PROP_FRAME_HEIGHT) self._size = (int(w), int(h)) self._flipx = False self._flipy = False self._brightness = 1 self._frametime = 1 / self._cam.get(cv2.CAP_PROP_FPS) self._last_frame_time = 0 self._open = True def stop(self): if self._open: self._cam.release() self._cam = None self._open = False def _check_open(self): if not self._open: raise pygame.error("Camera must be started") def get_size(self): self._check_open() return self._size def set_controls(self, hflip=None, vflip=None, brightness=None): self._check_open() if hflip is not None: self._flipx = bool(hflip) if vflip is not None: self._flipy = bool(vflip) if brightness is not None: self._cam.set(cv2.CAP_PROP_BRIGHTNESS, brightness) return self.get_controls() def get_controls(self): self._check_open() return (self._flipx, self._flipy, self._cam.get(cv2.CAP_PROP_BRIGHTNESS)) def query_image(self): self._check_open() current_time = time.time() if current_time - self._last_frame_time > self._frametime: return True return False def get_image(self, dest_surf=None): self._check_open() self._last_frame_time = time.time() _, image = self._cam.read() image = cv2.cvtColor(image, self._fmt) flip_code = None if self._flipx: if self._flipy: flip_code = -1 else: flip_code = 1 elif self._flipy: flip_code = 0 if flip_code is not None: image = cv2.flip(image, flip_code) image = numpy.fliplr(image) image = numpy.rot90(image) surf = pygame.surfarray.make_surface(image) if dest_surf: dest_surf.blit(surf, (0, 0)) return dest_surf return surf def get_raw(self): self._check_open() self._last_frame_time = time.time() _, image = self._cam.read() return image.tobytes() class CameraMac(Camera): def __init__(self, device=0, size=(640, 480), mode="RGB", api_preference=None): if isinstance(device, int): _dev = device elif isinstance(device, str): _dev = list_cameras_darwin().index(device) else: raise TypeError( "OpenCV-Mac backend can take device indices or names, ints or strings, not ", str(type(device)), ) super().__init__(_dev, size, mode, api_preference) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0161119 pygame-2.6.1/src_py/_camera_vidcapture.py0000644000175100001770000000651314676242340020112 0ustar00runnerdocker"""pygame.camera.Camera implementation using the videocapture module for windows. http://videocapture.sourceforge.net/ Binary windows wheels: https://www.lfd.uci.edu/~gohlke/pythonlibs/#videocapture """ import pygame def list_cameras(): """Always only lists one camera. Functionality not supported in videocapture module. """ return [0] # this just cycles through all the cameras trying to open them # cameras = [] # for x in range(256): # try: # c = Camera(x) # except: # break # cameras.append(x) # return cameras def init(): global vidcap try: import vidcap as vc except ImportError: from VideoCapture import vidcap as vc vidcap = vc def quit(): global vidcap vidcap = None class Camera: # pylint: disable=unused-argument def __init__(self, device=0, size=(640, 480), mode="RGB", show_video_window=0): """device: VideoCapture enumerates the available video capture devices on your system. If you have more than one device, specify the desired one here. The device number starts from 0. show_video_window: 0 ... do not display a video window (the default) 1 ... display a video window Mainly used for debugging, since the video window can not be closed or moved around. """ self.dev = vidcap.new_Dev(device, show_video_window) width, height = size self.dev.setresolution(width, height) def display_capture_filter_properties(self): """Displays a dialog containing the property page of the capture filter. For VfW drivers you may find the option to select the resolution most likely here. """ self.dev.displaycapturefilterproperties() def display_capture_pin_properties(self): """Displays a dialog containing the property page of the capture pin. For WDM drivers you may find the option to select the resolution most likely here. """ self.dev.displaycapturepinproperties() def set_resolution(self, width, height): """Sets the capture resolution. (without dialog)""" self.dev.setresolution(width, height) def get_buffer(self): """Returns a string containing the raw pixel data.""" return self.dev.getbuffer() def start(self): """Not implemented.""" def set_controls(self, **kwargs): """Not implemented.""" def stop(self): """Not implemented.""" def get_image(self, dest_surf=None): """ """ return self.get_surface(dest_surf) def get_surface(self, dest_surf=None): """Returns a pygame Surface.""" abuffer, width, height = self.get_buffer() if not abuffer: return None surf = pygame.image.frombuffer(abuffer, (width, height), "BGR") surf = pygame.transform.flip(surf, 0, 1) # if there is a destination surface given, we blit onto that. if dest_surf: dest_surf.blit(surf, (0, 0)) else: dest_surf = surf return dest_surf if __name__ == "__main__": import pygame.examples.camera pygame.camera.Camera = Camera pygame.camera.list_cameras = list_cameras pygame.examples.camera.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0631256 pygame-2.6.1/src_py/_sdl2/0000755000175100001770000000000014676242436014727 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/_sdl2/__init__.py0000644000175100001770000000037014676242340017032 0ustar00runnerdockerfrom .sdl2 import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] from .audio import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] from .video import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/camera.py0000644000175100001770000001370314676242340015524 0ustar00runnerdockerimport os import platform import sys import warnings from abc import ABC, abstractmethod from pygame import error _is_init = False class AbstractCamera(ABC): # set_controls and get_controls are not a part of the AbstractCamera ABC, # because implementations of the same can vary across different Camera # types @abstractmethod def __init__(self, *args, **kwargs): """ """ @abstractmethod def start(self): """ """ @abstractmethod def stop(self): """ """ @abstractmethod def get_size(self): """ """ @abstractmethod def query_image(self): """ """ @abstractmethod def get_image(self, dest_surf=None): """ """ @abstractmethod def get_raw(self): """ """ def _pre_init_placeholder(): if not _is_init: raise error("pygame.camera is not initialized") # camera was init, and yet functions are not monkey patched. This should # not happen raise NotImplementedError() def _pre_init_placeholder_varargs(*_, **__): _pre_init_placeholder() class _PreInitPlaceholderCamera(AbstractCamera): __init__ = _pre_init_placeholder_varargs start = _pre_init_placeholder_varargs stop = _pre_init_placeholder_varargs get_controls = _pre_init_placeholder_varargs set_controls = _pre_init_placeholder_varargs get_size = _pre_init_placeholder_varargs query_image = _pre_init_placeholder_varargs get_image = _pre_init_placeholder_varargs get_raw = _pre_init_placeholder_varargs list_cameras = _pre_init_placeholder Camera = _PreInitPlaceholderCamera def _colorspace_not_available(*args): raise RuntimeError("pygame is not built with colorspace support") try: from pygame import _camera colorspace = _camera.colorspace except ImportError: # Should not happen in most cases colorspace = _colorspace_not_available def _setup_backend(backend): global list_cameras, Camera if backend == "opencv-mac": from pygame import _camera_opencv list_cameras = _camera_opencv.list_cameras_darwin Camera = _camera_opencv.CameraMac elif backend == "opencv": from pygame import _camera_opencv list_cameras = _camera_opencv.list_cameras Camera = _camera_opencv.Camera elif backend in ("_camera (msmf)", "_camera (v4l2)"): from pygame import _camera list_cameras = _camera.list_cameras Camera = _camera.Camera elif backend == "videocapture": from pygame import _camera_vidcapture warnings.warn( "The VideoCapture backend is not recommended and may be removed." "For Python3 and Windows 8+, there is now a native Windows " "backend built into pygame.", DeprecationWarning, stacklevel=2, ) _camera_vidcapture.init() list_cameras = _camera_vidcapture.list_cameras Camera = _camera_vidcapture.Camera else: raise ValueError("unrecognized backend name") def get_backends(): possible_backends = [] if sys.platform == "win32": version_code = platform.win32_ver()[0].split(".")[0] if "Server" in version_code: version_code = ''.join(filter(str.isdigit, version_code))[:4] minimum_satisfied = int(version_code) >= 2012 else: minimum_satisfied = int(version_code) >= 8 if minimum_satisfied: try: # If cv2 is installed, prefer that on windows. import cv2 possible_backends.append("OpenCV") except ImportError: possible_backends.append("_camera (MSMF)") if "linux" in sys.platform: possible_backends.append("_camera (V4L2)") if "darwin" in sys.platform: possible_backends.append("OpenCV-Mac") if "OpenCV" not in possible_backends: possible_backends.append("OpenCV") if sys.platform == "win32": possible_backends.append("VideoCapture") # see if we have any user specified defaults in environments. camera_env = os.environ.get("PYGAME_CAMERA", "").lower() if camera_env == "opencv": # prioritize opencv if "OpenCV" in possible_backends: possible_backends.remove("OpenCV") possible_backends = ["OpenCV"] + possible_backends if camera_env in ("vidcapture", "videocapture"): # prioritize vidcapture if "VideoCapture" in possible_backends: possible_backends.remove("VideoCapture") possible_backends = ["VideoCapture"] + possible_backends return possible_backends def init(backend=None): global _is_init # select the camera module to import here. backends = [b.lower() for b in get_backends()] if not backends: raise error("No camera backends are supported on your platform!") backend = backends[0] if backend is None else backend.lower() if backend not in backends: warnings.warn( "We don't think this is a supported backend on this system, " "but we'll try it...", Warning, stacklevel=2, ) try: _setup_backend(backend) except ImportError: emsg = f"Backend '{backend}' is not supported on your platform!" if backend in ("opencv", "opencv-mac", "videocapture"): dep = "vidcap" if backend == "videocapture" else "OpenCV" emsg += ( f" Make sure you have '{dep}' installed to be able to use this backend" ) raise error(emsg) _is_init = True def quit(): global _is_init, Camera, list_cameras # reset to their respective pre-init placeholders list_cameras = _pre_init_placeholder Camera = _PreInitPlaceholderCamera _is_init = False if __name__ == "__main__": # try and use this camera stuff with the pygame camera example. import pygame.examples.camera # pygame.camera.Camera = Camera # pygame.camera.list_cameras = list_cameras pygame.examples.camera.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/colordict.py0000644000175100001770000006225514676242340016264 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2003 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """ A dictionary of RGBA tuples indexed by color names. See https://www.pygame.org/docs/ref/color_list.html for sample swatches. """ THECOLORS = { "aliceblue": (240, 248, 255, 255), "antiquewhite": (250, 235, 215, 255), "antiquewhite1": (255, 239, 219, 255), "antiquewhite2": (238, 223, 204, 255), "antiquewhite3": (205, 192, 176, 255), "antiquewhite4": (139, 131, 120, 255), "aqua": (0, 255, 255, 255), "aquamarine": (127, 255, 212, 255), "aquamarine1": (127, 255, 212, 255), "aquamarine2": (118, 238, 198, 255), "aquamarine3": (102, 205, 170, 255), "aquamarine4": (69, 139, 116, 255), "azure": (240, 255, 255, 255), "azure1": (240, 255, 255, 255), "azure3": (193, 205, 205, 255), "azure2": (224, 238, 238, 255), "azure4": (131, 139, 139, 255), "beige": (245, 245, 220, 255), "bisque": (255, 228, 196, 255), "bisque1": (255, 228, 196, 255), "bisque2": (238, 213, 183, 255), "bisque3": (205, 183, 158, 255), "bisque4": (139, 125, 107, 255), "black": (0, 0, 0, 255), "blanchedalmond": (255, 235, 205, 255), "blue": (0, 0, 255, 255), "blue1": (0, 0, 255, 255), "blue2": (0, 0, 238, 255), "blue3": (0, 0, 205, 255), "blue4": (0, 0, 139, 255), "blueviolet": (138, 43, 226, 255), "brown": (165, 42, 42, 255), "brown1": (255, 64, 64, 255), "brown2": (238, 59, 59, 255), "brown3": (205, 51, 51, 255), "brown4": (139, 35, 35, 255), "burlywood": (222, 184, 135, 255), "burlywood1": (255, 211, 155, 255), "burlywood2": (238, 197, 145, 255), "burlywood3": (205, 170, 125, 255), "burlywood4": (139, 115, 85, 255), "cadetblue": (95, 158, 160, 255), "cadetblue1": (152, 245, 255, 255), "cadetblue2": (142, 229, 238, 255), "cadetblue3": (122, 197, 205, 255), "cadetblue4": (83, 134, 139, 255), "chartreuse": (127, 255, 0, 255), "chartreuse1": (127, 255, 0, 255), "chartreuse2": (118, 238, 0, 255), "chartreuse3": (102, 205, 0, 255), "chartreuse4": (69, 139, 0, 255), "chocolate": (210, 105, 30, 255), "chocolate1": (255, 127, 36, 255), "chocolate2": (238, 118, 33, 255), "chocolate3": (205, 102, 29, 255), "chocolate4": (139, 69, 19, 255), "coral": (255, 127, 80, 255), "coral1": (255, 114, 86, 255), "coral2": (238, 106, 80, 255), "coral3": (205, 91, 69, 255), "coral4": (139, 62, 47, 255), "cornflowerblue": (100, 149, 237, 255), "cornsilk": (255, 248, 220, 255), "cornsilk1": (255, 248, 220, 255), "cornsilk2": (238, 232, 205, 255), "cornsilk3": (205, 200, 177, 255), "cornsilk4": (139, 136, 120, 255), "crimson": (220, 20, 60, 255), "cyan": (0, 255, 255, 255), "cyan1": (0, 255, 255, 255), "cyan2": (0, 238, 238, 255), "cyan3": (0, 205, 205, 255), "cyan4": (0, 139, 139, 255), "darkblue": (0, 0, 139, 255), "darkcyan": (0, 139, 139, 255), "darkgoldenrod": (184, 134, 11, 255), "darkgoldenrod1": (255, 185, 15, 255), "darkgoldenrod2": (238, 173, 14, 255), "darkgoldenrod3": (205, 149, 12, 255), "darkgoldenrod4": (139, 101, 8, 255), "darkgray": (169, 169, 169, 255), "darkgreen": (0, 100, 0, 255), "darkgrey": (169, 169, 169, 255), "darkkhaki": (189, 183, 107, 255), "darkmagenta": (139, 0, 139, 255), "darkolivegreen": (85, 107, 47, 255), "darkolivegreen1": (202, 255, 112, 255), "darkolivegreen2": (188, 238, 104, 255), "darkolivegreen3": (162, 205, 90, 255), "darkolivegreen4": (110, 139, 61, 255), "darkorange": (255, 140, 0, 255), "darkorange1": (255, 127, 0, 255), "darkorange2": (238, 118, 0, 255), "darkorange3": (205, 102, 0, 255), "darkorange4": (139, 69, 0, 255), "darkorchid": (153, 50, 204, 255), "darkorchid1": (191, 62, 255, 255), "darkorchid2": (178, 58, 238, 255), "darkorchid3": (154, 50, 205, 255), "darkorchid4": (104, 34, 139, 255), "darkred": (139, 0, 0, 255), "darksalmon": (233, 150, 122, 255), "darkseagreen": (143, 188, 143, 255), "darkseagreen1": (193, 255, 193, 255), "darkseagreen2": (180, 238, 180, 255), "darkseagreen3": (155, 205, 155, 255), "darkseagreen4": (105, 139, 105, 255), "darkslateblue": (72, 61, 139, 255), "darkslategray": (47, 79, 79, 255), "darkslategray1": (151, 255, 255, 255), "darkslategray2": (141, 238, 238, 255), "darkslategray3": (121, 205, 205, 255), "darkslategray4": (82, 139, 139, 255), "darkslategrey": (47, 79, 79, 255), "darkturquoise": (0, 206, 209, 255), "darkviolet": (148, 0, 211, 255), "deeppink": (255, 20, 147, 255), "deeppink1": (255, 20, 147, 255), "deeppink2": (238, 18, 137, 255), "deeppink3": (205, 16, 118, 255), "deeppink4": (139, 10, 80, 255), "deepskyblue": (0, 191, 255, 255), "deepskyblue1": (0, 191, 255, 255), "deepskyblue2": (0, 178, 238, 255), "deepskyblue3": (0, 154, 205, 255), "deepskyblue4": (0, 104, 139, 255), "dimgray": (105, 105, 105, 255), "dimgrey": (105, 105, 105, 255), "dodgerblue": (30, 144, 255, 255), "dodgerblue1": (30, 144, 255, 255), "dodgerblue2": (28, 134, 238, 255), "dodgerblue3": (24, 116, 205, 255), "dodgerblue4": (16, 78, 139, 255), "firebrick": (178, 34, 34, 255), "firebrick1": (255, 48, 48, 255), "firebrick2": (238, 44, 44, 255), "firebrick3": (205, 38, 38, 255), "firebrick4": (139, 26, 26, 255), "floralwhite": (255, 250, 240, 255), "forestgreen": (34, 139, 34, 255), "fuchsia": (255, 0, 255, 255), "gainsboro": (220, 220, 220, 255), "ghostwhite": (248, 248, 255, 255), "gold": (255, 215, 0, 255), "gold1": (255, 215, 0, 255), "gold2": (238, 201, 0, 255), "gold3": (205, 173, 0, 255), "gold4": (139, 117, 0, 255), "goldenrod": (218, 165, 32, 255), "goldenrod1": (255, 193, 37, 255), "goldenrod2": (238, 180, 34, 255), "goldenrod3": (205, 155, 29, 255), "goldenrod4": (139, 105, 20, 255), "gray": (190, 190, 190, 255), "gray0": (0, 0, 0, 255), "gray1": (3, 3, 3, 255), "gray2": (5, 5, 5, 255), "gray3": (8, 8, 8, 255), "gray4": (10, 10, 10, 255), "gray5": (13, 13, 13, 255), "gray6": (15, 15, 15, 255), "gray7": (18, 18, 18, 255), "gray8": (20, 20, 20, 255), "gray9": (23, 23, 23, 255), "gray10": (26, 26, 26, 255), "gray11": (28, 28, 28, 255), "gray12": (31, 31, 31, 255), "gray13": (33, 33, 33, 255), "gray14": (36, 36, 36, 255), "gray15": (38, 38, 38, 255), "gray16": (41, 41, 41, 255), "gray17": (43, 43, 43, 255), "gray18": (46, 46, 46, 255), "gray19": (48, 48, 48, 255), "gray20": (51, 51, 51, 255), "gray21": (54, 54, 54, 255), "gray22": (56, 56, 56, 255), "gray23": (59, 59, 59, 255), "gray24": (61, 61, 61, 255), "gray25": (64, 64, 64, 255), "gray26": (66, 66, 66, 255), "gray27": (69, 69, 69, 255), "gray28": (71, 71, 71, 255), "gray29": (74, 74, 74, 255), "gray30": (77, 77, 77, 255), "gray31": (79, 79, 79, 255), "gray32": (82, 82, 82, 255), "gray33": (84, 84, 84, 255), "gray34": (87, 87, 87, 255), "gray35": (89, 89, 89, 255), "gray36": (92, 92, 92, 255), "gray37": (94, 94, 94, 255), "gray38": (97, 97, 97, 255), "gray39": (99, 99, 99, 255), "gray40": (102, 102, 102, 255), "gray41": (105, 105, 105, 255), "gray42": (107, 107, 107, 255), "gray43": (110, 110, 110, 255), "gray44": (112, 112, 112, 255), "gray45": (115, 115, 115, 255), "gray46": (117, 117, 117, 255), "gray47": (120, 120, 120, 255), "gray48": (122, 122, 122, 255), "gray49": (125, 125, 125, 255), "gray50": (127, 127, 127, 255), "gray51": (130, 130, 130, 255), "gray52": (133, 133, 133, 255), "gray53": (135, 135, 135, 255), "gray54": (138, 138, 138, 255), "gray55": (140, 140, 140, 255), "gray56": (143, 143, 143, 255), "gray57": (145, 145, 145, 255), "gray58": (148, 148, 148, 255), "gray59": (150, 150, 150, 255), "gray60": (153, 153, 153, 255), "gray61": (156, 156, 156, 255), "gray62": (158, 158, 158, 255), "gray63": (161, 161, 161, 255), "gray64": (163, 163, 163, 255), "gray65": (166, 166, 166, 255), "gray66": (168, 168, 168, 255), "gray67": (171, 171, 171, 255), "gray68": (173, 173, 173, 255), "gray69": (176, 176, 176, 255), "gray70": (179, 179, 179, 255), "gray71": (181, 181, 181, 255), "gray72": (184, 184, 184, 255), "gray73": (186, 186, 186, 255), "gray74": (189, 189, 189, 255), "gray75": (191, 191, 191, 255), "gray76": (194, 194, 194, 255), "gray77": (196, 196, 196, 255), "gray78": (199, 199, 199, 255), "gray79": (201, 201, 201, 255), "gray80": (204, 204, 204, 255), "gray81": (207, 207, 207, 255), "gray82": (209, 209, 209, 255), "gray83": (212, 212, 212, 255), "gray84": (214, 214, 214, 255), "gray85": (217, 217, 217, 255), "gray86": (219, 219, 219, 255), "gray87": (222, 222, 222, 255), "gray88": (224, 224, 224, 255), "gray89": (227, 227, 227, 255), "gray90": (229, 229, 229, 255), "gray91": (232, 232, 232, 255), "gray92": (235, 235, 235, 255), "gray93": (237, 237, 237, 255), "gray94": (240, 240, 240, 255), "gray95": (242, 242, 242, 255), "gray96": (245, 245, 245, 255), "gray97": (247, 247, 247, 255), "gray98": (250, 250, 250, 255), "gray99": (252, 252, 252, 255), "gray100": (255, 255, 255, 255), "green": (0, 255, 0, 255), "green1": (0, 255, 0, 255), "green2": (0, 238, 0, 255), "green3": (0, 205, 0, 255), "green4": (0, 139, 0, 255), "greenyellow": (173, 255, 47, 255), "grey": (190, 190, 190, 255), "grey0": (0, 0, 0, 255), "grey1": (3, 3, 3, 255), "grey2": (5, 5, 5, 255), "grey3": (8, 8, 8, 255), "grey4": (10, 10, 10, 255), "grey5": (13, 13, 13, 255), "grey6": (15, 15, 15, 255), "grey7": (18, 18, 18, 255), "grey8": (20, 20, 20, 255), "grey9": (23, 23, 23, 255), "grey10": (26, 26, 26, 255), "grey11": (28, 28, 28, 255), "grey12": (31, 31, 31, 255), "grey13": (33, 33, 33, 255), "grey14": (36, 36, 36, 255), "grey15": (38, 38, 38, 255), "grey16": (41, 41, 41, 255), "grey17": (43, 43, 43, 255), "grey18": (46, 46, 46, 255), "grey19": (48, 48, 48, 255), "grey20": (51, 51, 51, 255), "grey21": (54, 54, 54, 255), "grey22": (56, 56, 56, 255), "grey23": (59, 59, 59, 255), "grey24": (61, 61, 61, 255), "grey25": (64, 64, 64, 255), "grey26": (66, 66, 66, 255), "grey27": (69, 69, 69, 255), "grey28": (71, 71, 71, 255), "grey29": (74, 74, 74, 255), "grey30": (77, 77, 77, 255), "grey31": (79, 79, 79, 255), "grey32": (82, 82, 82, 255), "grey33": (84, 84, 84, 255), "grey34": (87, 87, 87, 255), "grey35": (89, 89, 89, 255), "grey36": (92, 92, 92, 255), "grey37": (94, 94, 94, 255), "grey38": (97, 97, 97, 255), "grey39": (99, 99, 99, 255), "grey40": (102, 102, 102, 255), "grey41": (105, 105, 105, 255), "grey42": (107, 107, 107, 255), "grey43": (110, 110, 110, 255), "grey44": (112, 112, 112, 255), "grey45": (115, 115, 115, 255), "grey46": (117, 117, 117, 255), "grey47": (120, 120, 120, 255), "grey48": (122, 122, 122, 255), "grey49": (125, 125, 125, 255), "grey50": (127, 127, 127, 255), "grey51": (130, 130, 130, 255), "grey52": (133, 133, 133, 255), "grey53": (135, 135, 135, 255), "grey54": (138, 138, 138, 255), "grey55": (140, 140, 140, 255), "grey56": (143, 143, 143, 255), "grey57": (145, 145, 145, 255), "grey58": (148, 148, 148, 255), "grey59": (150, 150, 150, 255), "grey60": (153, 153, 153, 255), "grey61": (156, 156, 156, 255), "grey62": (158, 158, 158, 255), "grey63": (161, 161, 161, 255), "grey64": (163, 163, 163, 255), "grey65": (166, 166, 166, 255), "grey66": (168, 168, 168, 255), "grey67": (171, 171, 171, 255), "grey68": (173, 173, 173, 255), "grey69": (176, 176, 176, 255), "grey70": (179, 179, 179, 255), "grey71": (181, 181, 181, 255), "grey72": (184, 184, 184, 255), "grey73": (186, 186, 186, 255), "grey74": (189, 189, 189, 255), "grey75": (191, 191, 191, 255), "grey76": (194, 194, 194, 255), "grey77": (196, 196, 196, 255), "grey78": (199, 199, 199, 255), "grey79": (201, 201, 201, 255), "grey80": (204, 204, 204, 255), "grey81": (207, 207, 207, 255), "grey82": (209, 209, 209, 255), "grey83": (212, 212, 212, 255), "grey84": (214, 214, 214, 255), "grey85": (217, 217, 217, 255), "grey86": (219, 219, 219, 255), "grey87": (222, 222, 222, 255), "grey88": (224, 224, 224, 255), "grey89": (227, 227, 227, 255), "grey90": (229, 229, 229, 255), "grey91": (232, 232, 232, 255), "grey92": (235, 235, 235, 255), "grey93": (237, 237, 237, 255), "grey94": (240, 240, 240, 255), "grey95": (242, 242, 242, 255), "grey96": (245, 245, 245, 255), "grey97": (247, 247, 247, 255), "grey98": (250, 250, 250, 255), "grey99": (252, 252, 252, 255), "grey100": (255, 255, 255, 255), "honeydew": (240, 255, 240, 255), "honeydew1": (240, 255, 240, 255), "honeydew2": (224, 238, 224, 255), "honeydew3": (193, 205, 193, 255), "honeydew4": (131, 139, 131, 255), "hotpink": (255, 105, 180, 255), "hotpink1": (255, 110, 180, 255), "hotpink2": (238, 106, 167, 255), "hotpink3": (205, 96, 144, 255), "hotpink4": (139, 58, 98, 255), "indianred": (205, 92, 92, 255), "indianred1": (255, 106, 106, 255), "indianred2": (238, 99, 99, 255), "indianred3": (205, 85, 85, 255), "indianred4": (139, 58, 58, 255), "indigo": (75, 0, 130, 255), "ivory": (255, 255, 240, 255), "ivory1": (255, 255, 240, 255), "ivory2": (238, 238, 224, 255), "ivory3": (205, 205, 193, 255), "ivory4": (139, 139, 131, 255), "khaki": (240, 230, 140, 255), "khaki1": (255, 246, 143, 255), "khaki2": (238, 230, 133, 255), "khaki3": (205, 198, 115, 255), "khaki4": (139, 134, 78, 255), "lavender": (230, 230, 250, 255), "lavenderblush": (255, 240, 245, 255), "lavenderblush1": (255, 240, 245, 255), "lavenderblush2": (238, 224, 229, 255), "lavenderblush3": (205, 193, 197, 255), "lavenderblush4": (139, 131, 134, 255), "lawngreen": (124, 252, 0, 255), "lemonchiffon": (255, 250, 205, 255), "lemonchiffon1": (255, 250, 205, 255), "lemonchiffon2": (238, 233, 191, 255), "lemonchiffon3": (205, 201, 165, 255), "lemonchiffon4": (139, 137, 112, 255), "lightblue": (173, 216, 230, 255), "lightblue1": (191, 239, 255, 255), "lightblue2": (178, 223, 238, 255), "lightblue3": (154, 192, 205, 255), "lightblue4": (104, 131, 139, 255), "lightcoral": (240, 128, 128, 255), "lightcyan": (224, 255, 255, 255), "lightcyan1": (224, 255, 255, 255), "lightcyan2": (209, 238, 238, 255), "lightcyan3": (180, 205, 205, 255), "lightcyan4": (122, 139, 139, 255), "lightgoldenrod": (238, 221, 130, 255), "lightgoldenrod1": (255, 236, 139, 255), "lightgoldenrod2": (238, 220, 130, 255), "lightgoldenrod3": (205, 190, 112, 255), "lightgoldenrod4": (139, 129, 76, 255), "lightgoldenrodyellow": (250, 250, 210, 255), "lightgray": (211, 211, 211, 255), "lightgreen": (144, 238, 144, 255), "lightgrey": (211, 211, 211, 255), "lightpink": (255, 182, 193, 255), "lightpink1": (255, 174, 185, 255), "lightpink2": (238, 162, 173, 255), "lightpink3": (205, 140, 149, 255), "lightpink4": (139, 95, 101, 255), "lightsalmon": (255, 160, 122, 255), "lightsalmon1": (255, 160, 122, 255), "lightsalmon2": (238, 149, 114, 255), "lightsalmon3": (205, 129, 98, 255), "lightsalmon4": (139, 87, 66, 255), "lightseagreen": (32, 178, 170, 255), "lightskyblue": (135, 206, 250, 255), "lightskyblue1": (176, 226, 255, 255), "lightskyblue2": (164, 211, 238, 255), "lightskyblue3": (141, 182, 205, 255), "lightskyblue4": (96, 123, 139, 255), "lightslateblue": (132, 112, 255, 255), "lightslategray": (119, 136, 153, 255), "lightslategrey": (119, 136, 153, 255), "lightsteelblue": (176, 196, 222, 255), "lightsteelblue1": (202, 225, 255, 255), "lightsteelblue2": (188, 210, 238, 255), "lightsteelblue3": (162, 181, 205, 255), "lightsteelblue4": (110, 123, 139, 255), "lightyellow": (255, 255, 224, 255), "lightyellow1": (255, 255, 224, 255), "lightyellow2": (238, 238, 209, 255), "lightyellow3": (205, 205, 180, 255), "lightyellow4": (139, 139, 122, 255), "linen": (250, 240, 230, 255), "lime": (0, 255, 0, 255), "limegreen": (50, 205, 50, 255), "magenta": (255, 0, 255, 255), "magenta1": (255, 0, 255, 255), "magenta2": (238, 0, 238, 255), "magenta3": (205, 0, 205, 255), "magenta4": (139, 0, 139, 255), "maroon": (176, 48, 96, 255), "maroon1": (255, 52, 179, 255), "maroon2": (238, 48, 167, 255), "maroon3": (205, 41, 144, 255), "maroon4": (139, 28, 98, 255), "mediumaquamarine": (102, 205, 170, 255), "mediumblue": (0, 0, 205, 255), "mediumorchid": (186, 85, 211, 255), "mediumorchid1": (224, 102, 255, 255), "mediumorchid2": (209, 95, 238, 255), "mediumorchid3": (180, 82, 205, 255), "mediumorchid4": (122, 55, 139, 255), "mediumpurple": (147, 112, 219, 255), "mediumpurple1": (171, 130, 255, 255), "mediumpurple2": (159, 121, 238, 255), "mediumpurple3": (137, 104, 205, 255), "mediumpurple4": (93, 71, 139, 255), "mediumseagreen": (60, 179, 113, 255), "mediumslateblue": (123, 104, 238, 255), "mediumspringgreen": (0, 250, 154, 255), "mediumturquoise": (72, 209, 204, 255), "mediumvioletred": (199, 21, 133, 255), "midnightblue": (25, 25, 112, 255), "mintcream": (245, 255, 250, 255), "mistyrose": (255, 228, 225, 255), "mistyrose1": (255, 228, 225, 255), "mistyrose2": (238, 213, 210, 255), "mistyrose3": (205, 183, 181, 255), "mistyrose4": (139, 125, 123, 255), "moccasin": (255, 228, 181, 255), "navajowhite": (255, 222, 173, 255), "navajowhite1": (255, 222, 173, 255), "navajowhite2": (238, 207, 161, 255), "navajowhite3": (205, 179, 139, 255), "navajowhite4": (139, 121, 94, 255), "navy": (0, 0, 128, 255), "navyblue": (0, 0, 128, 255), "oldlace": (253, 245, 230, 255), "olive": (128, 128, 0, 255), "olivedrab": (107, 142, 35, 255), "olivedrab1": (192, 255, 62, 255), "olivedrab2": (179, 238, 58, 255), "olivedrab3": (154, 205, 50, 255), "olivedrab4": (105, 139, 34, 255), "orange": (255, 165, 0, 255), "orange1": (255, 165, 0, 255), "orange2": (238, 154, 0, 255), "orange3": (205, 133, 0, 255), "orange4": (139, 90, 0, 255), "orangered": (255, 69, 0, 255), "orangered1": (255, 69, 0, 255), "orangered2": (238, 64, 0, 255), "orangered3": (205, 55, 0, 255), "orangered4": (139, 37, 0, 255), "orchid": (218, 112, 214, 255), "orchid1": (255, 131, 250, 255), "orchid2": (238, 122, 233, 255), "orchid3": (205, 105, 201, 255), "orchid4": (139, 71, 137, 255), "palegreen": (152, 251, 152, 255), "palegreen1": (154, 255, 154, 255), "palegreen2": (144, 238, 144, 255), "palegreen3": (124, 205, 124, 255), "palegreen4": (84, 139, 84, 255), "palegoldenrod": (238, 232, 170, 255), "paleturquoise": (175, 238, 238, 255), "paleturquoise1": (187, 255, 255, 255), "paleturquoise2": (174, 238, 238, 255), "paleturquoise3": (150, 205, 205, 255), "paleturquoise4": (102, 139, 139, 255), "palevioletred": (219, 112, 147, 255), "palevioletred1": (255, 130, 171, 255), "palevioletred2": (238, 121, 159, 255), "palevioletred3": (205, 104, 137, 255), "palevioletred4": (139, 71, 93, 255), "papayawhip": (255, 239, 213, 255), "peachpuff": (255, 218, 185, 255), "peachpuff1": (255, 218, 185, 255), "peachpuff2": (238, 203, 173, 255), "peachpuff3": (205, 175, 149, 255), "peachpuff4": (139, 119, 101, 255), "peru": (205, 133, 63, 255), "pink": (255, 192, 203, 255), "pink1": (255, 181, 197, 255), "pink2": (238, 169, 184, 255), "pink3": (205, 145, 158, 255), "pink4": (139, 99, 108, 255), "plum": (221, 160, 221, 255), "plum1": (255, 187, 255, 255), "plum2": (238, 174, 238, 255), "plum3": (205, 150, 205, 255), "plum4": (139, 102, 139, 255), "powderblue": (176, 224, 230, 255), "purple": (160, 32, 240, 255), "purple1": (155, 48, 255, 255), "purple2": (145, 44, 238, 255), "purple3": (125, 38, 205, 255), "purple4": (85, 26, 139, 255), "red": (255, 0, 0, 255), "red1": (255, 0, 0, 255), "red2": (238, 0, 0, 255), "red3": (205, 0, 0, 255), "red4": (139, 0, 0, 255), "rosybrown": (188, 143, 143, 255), "rosybrown1": (255, 193, 193, 255), "rosybrown2": (238, 180, 180, 255), "rosybrown3": (205, 155, 155, 255), "rosybrown4": (139, 105, 105, 255), "royalblue": (65, 105, 225, 255), "royalblue1": (72, 118, 255, 255), "royalblue2": (67, 110, 238, 255), "royalblue3": (58, 95, 205, 255), "royalblue4": (39, 64, 139, 255), "salmon": (250, 128, 114, 255), "salmon1": (255, 140, 105, 255), "salmon2": (238, 130, 98, 255), "salmon3": (205, 112, 84, 255), "salmon4": (139, 76, 57, 255), "saddlebrown": (139, 69, 19, 255), "sandybrown": (244, 164, 96, 255), "seagreen": (46, 139, 87, 255), "seagreen1": (84, 255, 159, 255), "seagreen2": (78, 238, 148, 255), "seagreen3": (67, 205, 128, 255), "seagreen4": (46, 139, 87, 255), "seashell": (255, 245, 238, 255), "seashell1": (255, 245, 238, 255), "seashell2": (238, 229, 222, 255), "seashell3": (205, 197, 191, 255), "seashell4": (139, 134, 130, 255), "sienna": (160, 82, 45, 255), "sienna1": (255, 130, 71, 255), "sienna2": (238, 121, 66, 255), "sienna3": (205, 104, 57, 255), "sienna4": (139, 71, 38, 255), "silver": (192, 192, 192, 255), "skyblue": (135, 206, 235, 255), "skyblue1": (135, 206, 255, 255), "skyblue2": (126, 192, 238, 255), "skyblue3": (108, 166, 205, 255), "skyblue4": (74, 112, 139, 255), "slateblue": (106, 90, 205, 255), "slateblue1": (131, 111, 255, 255), "slateblue2": (122, 103, 238, 255), "slateblue3": (105, 89, 205, 255), "slateblue4": (71, 60, 139, 255), "slategray": (112, 128, 144, 255), "slategray1": (198, 226, 255, 255), "slategray2": (185, 211, 238, 255), "slategray3": (159, 182, 205, 255), "slategray4": (108, 123, 139, 255), "slategrey": (112, 128, 144, 255), "snow": (255, 250, 250, 255), "snow1": (255, 250, 250, 255), "snow2": (238, 233, 233, 255), "snow3": (205, 201, 201, 255), "snow4": (139, 137, 137, 255), "springgreen": (0, 255, 127, 255), "springgreen1": (0, 255, 127, 255), "springgreen2": (0, 238, 118, 255), "springgreen3": (0, 205, 102, 255), "springgreen4": (0, 139, 69, 255), "steelblue": (70, 130, 180, 255), "steelblue1": (99, 184, 255, 255), "steelblue2": (92, 172, 238, 255), "steelblue3": (79, 148, 205, 255), "steelblue4": (54, 100, 139, 255), "tan": (210, 180, 140, 255), "tan1": (255, 165, 79, 255), "tan2": (238, 154, 73, 255), "tan3": (205, 133, 63, 255), "tan4": (139, 90, 43, 255), "teal": (0, 128, 128, 255), "thistle": (216, 191, 216, 255), "thistle1": (255, 225, 255, 255), "thistle2": (238, 210, 238, 255), "thistle3": (205, 181, 205, 255), "thistle4": (139, 123, 139, 255), "tomato": (255, 99, 71, 255), "tomato1": (255, 99, 71, 255), "tomato2": (238, 92, 66, 255), "tomato3": (205, 79, 57, 255), "tomato4": (139, 54, 38, 255), "turquoise": (64, 224, 208, 255), "turquoise1": (0, 245, 255, 255), "turquoise2": (0, 229, 238, 255), "turquoise3": (0, 197, 205, 255), "turquoise4": (0, 134, 139, 255), "violet": (238, 130, 238, 255), "violetred": (208, 32, 144, 255), "violetred1": (255, 62, 150, 255), "violetred2": (238, 58, 140, 255), "violetred3": (205, 50, 120, 255), "violetred4": (139, 34, 82, 255), "wheat": (245, 222, 179, 255), "wheat1": (255, 231, 186, 255), "wheat2": (238, 216, 174, 255), "wheat3": (205, 186, 150, 255), "wheat4": (139, 126, 102, 255), "white": (255, 255, 255, 255), "whitesmoke": (245, 245, 245, 255), "yellow": (255, 255, 0, 255), "yellow1": (255, 255, 0, 255), "yellow2": (238, 238, 0, 255), "yellow3": (205, 205, 0, 255), "yellow4": (139, 139, 0, 255), "yellowgreen": (154, 205, 50, 255), } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/cursors.py0000644000175100001770000004325514676242340016001 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2003 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """Set of cursor resources available for use. These cursors come in a sequence of values that are needed as the arguments for pygame.mouse.set_cursor(). To dereference the sequence in place and create the cursor in one step, call like this: pygame.mouse.set_cursor(*pygame.cursors.arrow). Here is a list of available cursors: arrow, diamond, ball, broken_x, tri_left, tri_right There is also a sample string cursor named 'thickarrow_strings'. The compile() function can convert these string cursors into cursor byte data that can be used to create Cursor objects. Alternately, you can also create Cursor objects using surfaces or cursors constants, such as pygame.SYSTEM_CURSOR_ARROW. """ import pygame _cursor_id_table = { pygame.SYSTEM_CURSOR_ARROW: "SYSTEM_CURSOR_ARROW", pygame.SYSTEM_CURSOR_IBEAM: "SYSTEM_CURSOR_IBEAM", pygame.SYSTEM_CURSOR_WAIT: "SYSTEM_CURSOR_WAIT", pygame.SYSTEM_CURSOR_CROSSHAIR: "SYSTEM_CURSOR_CROSSHAIR", pygame.SYSTEM_CURSOR_WAITARROW: "SYSTEM_CURSOR_WAITARROW", pygame.SYSTEM_CURSOR_SIZENWSE: "SYSTEM_CURSOR_SIZENWSE", pygame.SYSTEM_CURSOR_SIZENESW: "SYSTEM_CURSOR_SIZENESW", pygame.SYSTEM_CURSOR_SIZEWE: "SYSTEM_CURSOR_SIZEWE", pygame.SYSTEM_CURSOR_SIZENS: "SYSTEM_CURSOR_SIZENS", pygame.SYSTEM_CURSOR_SIZEALL: "SYSTEM_CURSOR_SIZEALL", pygame.SYSTEM_CURSOR_NO: "SYSTEM_CURSOR_NO", pygame.SYSTEM_CURSOR_HAND: "SYSTEM_CURSOR_HAND", } class Cursor: def __init__(self, *args): """Cursor(size, hotspot, xormasks, andmasks) -> Cursor Cursor(hotspot, Surface) -> Cursor Cursor(constant) -> Cursor Cursor(Cursor) -> copies the Cursor object passed as an argument Cursor() -> Cursor pygame object for representing cursors You can initialize a cursor from a system cursor or use the constructor on an existing Cursor object, which will copy it. Providing a Surface instance will render the cursor displayed as that Surface when used. These Surfaces may use other colors than black and white.""" if len(args) == 0: self.type = "system" self.data = (pygame.SYSTEM_CURSOR_ARROW,) elif len(args) == 1 and args[0] in _cursor_id_table: self.type = "system" self.data = (args[0],) elif len(args) == 1 and isinstance(args[0], Cursor): self.type = args[0].type self.data = args[0].data elif ( len(args) == 2 and len(args[0]) == 2 and isinstance(args[1], pygame.Surface) ): self.type = "color" self.data = tuple(args) elif len(args) == 4 and len(args[0]) == 2 and len(args[1]) == 2: self.type = "bitmap" # pylint: disable=consider-using-generator # See https://github.com/pygame/pygame/pull/2509 for analysis self.data = tuple(tuple(arg) for arg in args) else: raise TypeError("Arguments must match a cursor specification") def __len__(self): return len(self.data) def __iter__(self): return iter(self.data) def __getitem__(self, index): return self.data[index] def __eq__(self, other): return isinstance(other, Cursor) and self.data == other.data def __ne__(self, other): return not self.__eq__(other) def __copy__(self): """Clone the current Cursor object. You can do the same thing by doing Cursor(Cursor).""" return self.__class__(self) copy = __copy__ def __hash__(self): return hash(tuple([self.type] + list(self.data))) def __repr__(self): if self.type == "system": id_string = _cursor_id_table.get(self.data[0], "constant lookup error") return f"" if self.type == "bitmap": size = f"size: {self.data[0]}" hotspot = f"hotspot: {self.data[1]}" return f"" if self.type == "color": hotspot = f"hotspot: {self.data[0]}" surf = repr(self.data[1]) return f"" raise TypeError("Invalid Cursor") # Python side of the set_cursor function: C side in mouse.c def set_cursor(*args): """set_cursor(pygame.cursors.Cursor OR args for a pygame.cursors.Cursor) -> None set the mouse cursor to a new cursor""" cursor = Cursor(*args) pygame.mouse._set_cursor(**{cursor.type: cursor.data}) pygame.mouse.set_cursor = set_cursor del set_cursor # cleanup namespace # Python side of the get_cursor function: C side in mouse.c def get_cursor(): """get_cursor() -> pygame.cursors.Cursor get the current mouse cursor""" return Cursor(*pygame.mouse._get_cursor()) pygame.mouse.get_cursor = get_cursor del get_cursor # cleanup namespace arrow = Cursor( (16, 16), (0, 0), ( 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00, 0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00, 0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, ), ( 0x40, 0x00, 0xE0, 0x00, 0xF0, 0x00, 0xF8, 0x00, 0xFC, 0x00, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x80, 0xFF, 0xC0, 0xFF, 0x80, 0xFE, 0x00, 0xEF, 0x00, 0x4F, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x00, ), ) diamond = Cursor( (16, 16), (7, 7), ( 0, 0, 1, 0, 3, 128, 7, 192, 14, 224, 28, 112, 56, 56, 112, 28, 56, 56, 28, 112, 14, 224, 7, 192, 3, 128, 1, 0, 0, 0, 0, 0, ), ( 1, 0, 3, 128, 7, 192, 15, 224, 31, 240, 62, 248, 124, 124, 248, 62, 124, 124, 62, 248, 31, 240, 15, 224, 7, 192, 3, 128, 1, 0, 0, 0, ), ) ball = Cursor( (16, 16), (7, 7), ( 0, 0, 3, 192, 15, 240, 24, 248, 51, 252, 55, 252, 127, 254, 127, 254, 127, 254, 127, 254, 63, 252, 63, 252, 31, 248, 15, 240, 3, 192, 0, 0, ), ( 3, 192, 15, 240, 31, 248, 63, 252, 127, 254, 127, 254, 255, 255, 255, 255, 255, 255, 255, 255, 127, 254, 127, 254, 63, 252, 31, 248, 15, 240, 3, 192, ), ) broken_x = Cursor( (16, 16), (7, 7), ( 0, 0, 96, 6, 112, 14, 56, 28, 28, 56, 12, 48, 0, 0, 0, 0, 0, 0, 0, 0, 12, 48, 28, 56, 56, 28, 112, 14, 96, 6, 0, 0, ), ( 224, 7, 240, 15, 248, 31, 124, 62, 62, 124, 30, 120, 14, 112, 0, 0, 0, 0, 14, 112, 30, 120, 62, 124, 124, 62, 248, 31, 240, 15, 224, 7, ), ) tri_left = Cursor( (16, 16), (1, 1), ( 0, 0, 96, 0, 120, 0, 62, 0, 63, 128, 31, 224, 31, 248, 15, 254, 15, 254, 7, 128, 7, 128, 3, 128, 3, 128, 1, 128, 1, 128, 0, 0, ), ( 224, 0, 248, 0, 254, 0, 127, 128, 127, 224, 63, 248, 63, 254, 31, 255, 31, 255, 15, 254, 15, 192, 7, 192, 7, 192, 3, 192, 3, 192, 1, 128, ), ) tri_right = Cursor( (16, 16), (14, 1), ( 0, 0, 0, 6, 0, 30, 0, 124, 1, 252, 7, 248, 31, 248, 127, 240, 127, 240, 1, 224, 1, 224, 1, 192, 1, 192, 1, 128, 1, 128, 0, 0, ), ( 0, 7, 0, 31, 0, 127, 1, 254, 7, 254, 31, 252, 127, 252, 255, 248, 255, 248, 127, 240, 3, 240, 3, 224, 3, 224, 3, 192, 3, 192, 1, 128, ), ) # Here is an example string resource cursor. To use this: # curs, mask = pygame.cursors.compile_cursor(pygame.cursors.thickarrow_strings, 'X', '.') # pygame.mouse.set_cursor((24, 24), (0, 0), curs, mask) # Be warned, though, that cursors created from compiled strings do not support colors. # sized 24x24 thickarrow_strings = ( "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ", ) # sized 24x16 sizer_x_strings = ( " X X ", " XX XX ", " X.X X.X ", " X..X X..X ", " X...XXXXXXXX...X ", "X................X ", " X...XXXXXXXX...X ", " X..X X..X ", " X.X X.X ", " XX XX ", " X X ", " ", " ", " ", " ", " ", ) # sized 16x24 sizer_y_strings = ( " X ", " X.X ", " X...X ", " X.....X ", " X.......X ", "XXXXX.XXXXX ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", "XXXXX.XXXXX ", " X.......X ", " X.....X ", " X...X ", " X.X ", " X ", " ", " ", " ", " ", " ", ) # sized 24x16 sizer_xy_strings = ( "XXXXXXXX ", "X.....X ", "X....X ", "X...X ", "X..X.X ", "X.X X.X ", "XX X.X X ", "X X.X XX ", " X.XX.X ", " X...X ", " X...X ", " X....X ", " X.....X ", " XXXXXXXX ", " ", " ", ) # sized 8x16 textmarker_strings = ( "ooo ooo ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", "ooo ooo ", " ", " ", " ", " ", ) def compile(strings, black="X", white=".", xor="o"): """pygame.cursors.compile(strings, black, white, xor) -> data, mask compile cursor strings into cursor data This takes a set of strings with equal length and computes the binary data for that cursor. The string widths must be divisible by 8. The black and white arguments are single letter strings that tells which characters will represent black pixels, and which characters represent white pixels. All other characters are considered clear. Some systems allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black. This returns a tuple containing the cursor data and cursor mask data. Both these arguments are used when setting a cursor with pygame.mouse.set_cursor(). """ # first check for consistent lengths size = len(strings[0]), len(strings) if size[0] % 8 or size[1] % 8: raise ValueError(f"cursor string sizes must be divisible by 8 {size}") for s in strings[1:]: if len(s) != size[0]: raise ValueError("Cursor strings are inconsistent lengths") # create the data arrays. # this could stand a little optimizing maskdata = [] filldata = [] maskitem = fillitem = 0 step = 8 for s in strings: for c in s: maskitem = maskitem << 1 fillitem = fillitem << 1 step = step - 1 if c == black: maskitem = maskitem | 1 fillitem = fillitem | 1 elif c == white: maskitem = maskitem | 1 elif c == xor: fillitem = fillitem | 1 if not step: maskdata.append(maskitem) filldata.append(fillitem) maskitem = fillitem = 0 step = 8 return tuple(filldata), tuple(maskdata) def load_xbm(curs, mask): """pygame.cursors.load_xbm(cursorfile, maskfile) -> cursor_args reads a pair of XBM files into set_cursor arguments Arguments can either be filenames or filelike objects with the readlines method. Not largely tested, but should work with typical XBM files. """ def bitswap(num): val = 0 for x in range(8): b = num & (1 << x) != 0 val = val << 1 | b return val if hasattr(curs, "readlines"): curs = curs.readlines() else: with open(curs, encoding="ascii") as cursor_f: curs = cursor_f.readlines() if hasattr(mask, "readlines"): mask = mask.readlines() else: with open(mask, encoding="ascii") as mask_f: mask = mask_f.readlines() # avoid comments for i, line in enumerate(curs): if line.startswith("#define"): curs = curs[i:] break for i, line in enumerate(mask): if line.startswith("#define"): mask = mask[i:] break # load width,height width = int(curs[0].split()[-1]) height = int(curs[1].split()[-1]) # load hotspot position if curs[2].startswith("#define"): hotx = int(curs[2].split()[-1]) hoty = int(curs[3].split()[-1]) else: hotx = hoty = 0 info = width, height, hotx, hoty possible_starts = ("static char", "static unsigned char") for i, line in enumerate(curs): if line.startswith(possible_starts): break data = " ".join(curs[i + 1 :]).replace("};", "").replace(",", " ") cursdata = tuple(bitswap(int(x, 16)) for x in data.split()) for i, line in enumerate(mask): if line.startswith(possible_starts): break data = " ".join(mask[i + 1 :]).replace("};", "").replace(",", " ") maskdata = tuple(bitswap(int(x, 16)) for x in data.split()) return info[:2], info[2:], cursdata, maskdata ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/draw_py.py0000644000175100001770000004434614676242340015750 0ustar00runnerdocker"""Pygame Drawing algorithms written in Python. (Work in Progress) Implement Pygame's Drawing Algorithms in a Python version for testing and debugging. """ from collections import namedtuple from math import floor, ceil # H E L P E R F U N C T I O N S # # fractional part of x def frac(value): """return fractional part of x""" return value - floor(value) def inv_frac(value): """return inverse fractional part of x""" return 1 - (value - floor(value)) # eg, 1 - frac(x) BoundingBox = namedtuple("BoundingBox", ["left", "top", "right", "bottom"]) Point = namedtuple("Point", ["x", "y"]) # L O W L E V E L D R A W F U N C T I O N S # # (They are too low-level to be translated into python, right?) def set_at(surf, in_x, in_y, color): """Set the color of a pixel in a surface""" surf.set_at((in_x, in_y), color) def draw_pixel(surf, pos, color, bright, blend=True): """draw one blended pixel with given brightness.""" try: other_col = surf.get_at(pos) if blend else (0, 0, 0, 0) except IndexError: # pixel outside the surface return new_color = tuple( (bright * col + (1 - bright) * pix) for col, pix in zip(color, other_col) ) # FIXME what should happen if only one, color or surf_col, has alpha? surf.set_at(pos, new_color) def _drawhorzline(surf, color, x_from, in_y, x_to): if x_from == x_to: surf.set_at((x_from, in_y), color) return start, end = (x_from, x_to) if x_from <= x_to else (x_to, x_from) for line_x in range(start, end + 1): surf.set_at((line_x, in_y), color) def _drawvertline(surf, color, in_x, y_from, y_to): if y_from == y_to: surf.set_at((in_x, y_from), color) return start, end = (y_from, y_to) if y_from <= y_to else (y_to, y_from) for line_y in range(start, end + 1): surf.set_at((in_x, line_y), color) # I N T E R N A L D R A W L I N E F U N C T I O N S # def _clip_and_draw_horizline(surf, color, x_from, in_y, x_to): """draw clipped horizontal line.""" # check Y inside surf clip = surf.get_clip() if in_y < clip.y or in_y >= clip.y + clip.h: return x_from = max(x_from, clip.x) x_to = min(x_to, clip.x + clip.w - 1) # check any x inside surf if x_to < clip.x or x_from >= clip.x + clip.w: return _drawhorzline(surf, color, x_from, in_y, x_to) def _clip_and_draw_vertline(surf, color, in_x, y_from, y_to): """draw clipped vertical line.""" # check X inside surf clip = surf.get_clip() if in_x < clip.x or in_x >= clip.x + clip.w: return y_from = max(y_from, clip.y) y_to = min(y_to, clip.y + clip.h - 1) # check any y inside surf if y_to < clip.y or y_from >= clip.y + clip.h: return _drawvertline(surf, color, in_x, y_from, y_to) # These constants xxx_EDGE are "outside-the-bounding-box"-flags LEFT_EDGE = 0x1 RIGHT_EDGE = 0x2 BOTTOM_EDGE = 0x4 TOP_EDGE = 0x8 def encode(pos, b_box): """returns a code that defines position with respect to a bounding box""" # we use the fact that python interprets booleans (the inequalities) # as 0/1, and then multiply them with the xxx_EDGE flags return ( (pos[0] < b_box.left) * LEFT_EDGE + (pos[0] > b_box.right) * RIGHT_EDGE + (pos[1] < b_box.top) * TOP_EDGE + (pos[1] > b_box.bottom) * BOTTOM_EDGE ) def clip_line(line, b_box, use_float=False): """Algorithm to calculate the clipped line. We calculate the coordinates of the part of the line segment within the bounding box (defined by left, top, right, bottom). The we write the coordinates of the line segment into "line", much like the C-algorithm. With `use_float` True, clip_line is usable for float-clipping. Returns: true if the line segment cuts the bounding box (false otherwise) """ def inside(code): return not code def accept(code_a, code_b): return not (code_a or code_b) def reject(code_a, code_b): return code_a and code_b assert isinstance(line, list) x_1, y_1, x_2, y_2 = line dtype = float if use_float else int while True: # the coordinates are progressively modified with the codes, # until they are either rejected or correspond to the final result. code1 = encode((x_1, y_1), b_box) code2 = encode((x_2, y_2), b_box) if accept(code1, code2): # write coordinates into "line" ! line[:] = x_1, y_1, x_2, y_2 return True if reject(code1, code2): return False # We operate on the (x_1, y_1) point, # and swap if it is inside the bbox: if inside(code1): x_1, x_2 = x_2, x_1 y_1, y_2 = y_2, y_1 code1, code2 = code2, code1 slope = (y_2 - y_1) / float(x_2 - x_1) if (x_2 != x_1) else 1.0 # Each case, if true, means that we are outside the border: # calculate x_1 and y_1 to be the "first point" inside the bbox... if code1 & LEFT_EDGE: y_1 += dtype((b_box.left - x_1) * slope) x_1 = b_box.left elif code1 & RIGHT_EDGE: y_1 += dtype((b_box.right - x_1) * slope) x_1 = b_box.right elif code1 & BOTTOM_EDGE: if x_2 != x_1: x_1 += dtype((b_box.bottom - y_1) / slope) y_1 = b_box.bottom elif code1 & TOP_EDGE: if x_2 != x_1: x_1 += dtype((b_box.top - y_1) / slope) y_1 = b_box.top def _draw_line(surf, color, start, end): """draw a non-horizontal line (without anti-aliasing).""" # Variant of https://en.wikipedia.org/wiki/Bresenham's_line_algorithm # # This strongly differs from craw.c implementation, because we use a # "slope" variable (instead of delta_x and delta_y) and a "error" variable. # And we can not do pointer-arithmetic with "BytesPerPixel", like in # the C-algorithm. if start.x == end.x: # This case should not happen... raise ValueError slope = abs((end.y - start.y) / (end.x - start.x)) error = 0.0 if slope < 1: # Here, it's a rather horizontal line # 1. check in which octants we are & set init values if end.x < start.x: start.x, end.x = end.x, start.x start.y, end.y = end.y, start.y line_y = start.y dy_sign = 1 if (start.y < end.y) else -1 # 2. step along x coordinate for line_x in range(start.x, end.x + 1): set_at(surf, line_x, line_y, color) error += slope if error >= 0.5: line_y += dy_sign error -= 1 else: # Case of a rather vertical line # 1. check in which octants we are & set init values if start.y > end.y: start.x, end.x = end.x, start.x start.y, end.y = end.y, start.y line_x = start.x slope = 1 / slope dx_sign = 1 if (start.x < end.x) else -1 # 2. step along y coordinate for line_y in range(start.y, end.y + 1): set_at(surf, line_x, line_y, color) error += slope if error >= 0.5: line_x += dx_sign error -= 1 def _draw_aaline(surf, color, start, end, blend): """draw an anti-aliased line. The algorithm yields identical results with _draw_line for horizontal, vertical or diagonal lines, and results changes smoothly when changing any of the endpoint coordinates. Note that this yields strange results for very short lines, eg a line from (0, 0) to (0, 1) will draw 2 pixels, and a line from (0, 0) to (0, 1.1) will blend 10 % on the pixel (0, 2). """ # The different requirements that we have on an antialiasing algorithm # implies to make some compromises: # 1. We want smooth evolution wrt to the 4 endpoint coordinates # (this means also that we want a smooth evolution when the angle # passes +/- 45° # 2. We want the same behavior when swapping the endpoints # 3. We want understandable results for the endpoint values # (eg we want to avoid half-integer values to draw a simple plain # horizontal or vertical line between two integer l endpoints) # # This implies to somehow make the line artificially 1 pixel longer # and to draw a full pixel when we have the endpoints are identical. d_x = end.x - start.x d_y = end.y - start.y if d_x == 0 and d_y == 0: # For smoothness reasons, we could also do some blending here, # but it seems overshoot... set_at(surf, int(start.x), int(start.y), color) return if start.x > end.x or start.y > end.y: start.x, end.x = end.x, start.x start.y, end.y = end.y, start.y d_x = -d_x d_y = -d_y if abs(d_x) >= abs(d_y): slope = d_y / d_x def draw_two_pixel(in_x, float_y, factor): flr_y = floor(float_y) draw_pixel(surf, (in_x, flr_y), color, factor * inv_frac(float_y), blend) draw_pixel(surf, (in_x, flr_y + 1), color, factor * frac(float_y), blend) _draw_aaline_dx(d_x, slope, end, start, draw_two_pixel) else: slope = d_x / d_y def draw_two_pixel(float_x, in_y, factor): fl_x = floor(float_x) draw_pixel(surf, (fl_x, in_y), color, factor * inv_frac(float_x), blend) draw_pixel(surf, (fl_x + 1, in_y), color, factor * frac(float_x), blend) _draw_aaline_dy(d_y, slope, end, start, draw_two_pixel) def _draw_aaline_dy(d_y, slope, end, start, draw_two_pixel): g_y = ceil(start.y) g_x = start.x + (g_y - start.y) * slope # 1. Draw start of the segment if start.y < g_y: draw_two_pixel(g_x - slope, floor(start.y), inv_frac(start.y)) # 2. Draw end of the segment rest = frac(end.y) s_y = ceil(end.y) if rest > 0: s_x = start.x + slope * (d_y + 1 - rest) draw_two_pixel(s_x, s_y, rest) else: s_y += 1 # 3. loop for other points for line_y in range(g_y, s_y): line_x = g_x + slope * (line_y - g_y) draw_two_pixel(line_x, line_y, 1) def _draw_aaline_dx(d_x, slope, end, start, draw_two_pixel): # A and G are respectively left and right to the "from" point, but # with integer-x-coordinate, (and only if from_x is not integer). # Hence they appear in following order on the line in general case: # A from-pt G . . . to-pt S # |------*-------|--- . . . ---|-----*------|- g_x = ceil(start.x) g_y = start.y + (g_x - start.x) * slope # 1. Draw start of the segment if we have a non-integer-part if start.x < g_x: # this corresponds to the point "A" draw_two_pixel(floor(start.x), g_y - slope, inv_frac(start.x)) # 2. Draw end of the segment: we add one pixel for homogeneity reasons rest = frac(end.x) s_x = ceil(end.x) if rest > 0: # Again we draw only if we have a non-integer-part s_y = start.y + slope * (d_x + 1 - rest) draw_two_pixel(s_x, s_y, rest) else: s_x += 1 # 3. loop for other points for line_x in range(g_x, s_x): line_y = g_y + slope * (line_x - g_x) draw_two_pixel(line_x, line_y, 1) # C L I P A N D D R A W L I N E F U N C T I O N S # def _clip_and_draw_line(surf, rect, color, pts): """clip the line into the rectangle and draw if needed. Returns true if anything has been drawn, else false.""" # "pts" is a list with the four coordinates of the two endpoints # of the line to be drawn : pts = x1, y1, x2, y2. # The data format is like that to stay closer to the C-algorithm. if not clip_line( pts, BoundingBox(rect.x, rect.y, rect.x + rect.w - 1, rect.y + rect.h - 1) ): # The line segment defined by "pts" is not crossing the rectangle return 0 if pts[1] == pts[3]: # eg y1 == y2 _drawhorzline(surf, color, pts[0], pts[1], pts[2]) elif pts[0] == pts[2]: # eg x1 == x2 _drawvertline(surf, color, pts[0], pts[1], pts[3]) else: _draw_line(surf, color, Point(pts[0], pts[1]), Point(pts[2], pts[3])) return 1 def _clip_and_draw_line_width(surf, rect, color, line, width): yinc = xinc = 0 if abs(line[0] - line[2]) > abs(line[1] - line[3]): yinc = 1 else: xinc = 1 newpts = line[:] if _clip_and_draw_line(surf, rect, color, newpts): anydrawn = 1 frame = newpts[:] else: anydrawn = 0 frame = [10000, 10000, -10000, -10000] for loop in range(1, width // 2 + 1): newpts[0] = line[0] + xinc * loop newpts[1] = line[1] + yinc * loop newpts[2] = line[2] + xinc * loop newpts[3] = line[3] + yinc * loop if _clip_and_draw_line(surf, rect, color, newpts): anydrawn = 1 frame[0] = min(newpts[0], frame[0]) frame[1] = min(newpts[1], frame[1]) frame[2] = max(newpts[2], frame[2]) frame[3] = max(newpts[3], frame[3]) if loop * 2 < width: newpts[0] = line[0] - xinc * loop newpts[1] = line[1] - yinc * loop newpts[2] = line[2] - xinc * loop newpts[3] = line[3] - yinc * loop if _clip_and_draw_line(surf, rect, color, newpts): anydrawn = 1 frame[0] = min(newpts[0], frame[0]) frame[1] = min(newpts[1], frame[1]) frame[2] = max(newpts[2], frame[2]) frame[3] = max(newpts[3], frame[3]) return anydrawn def _clip_and_draw_aaline(surf, rect, color, line, blend): """draw anti-aliased line between two endpoints.""" if not clip_line( line, BoundingBox(rect.x - 1, rect.y - 1, rect.x + rect.w, rect.y + rect.h), use_float=True, ): return # TODO Rect(rect.x, rect.y, 0, 0) _draw_aaline(surf, color, Point(line[0], line[1]), Point(line[2], line[3]), blend) return # TODO Rect(-- affected area --) # D R A W L I N E F U N C T I O N S # def draw_aaline(surf, color, from_point, to_point, blend=True): """draw anti-aliased line between two endpoints.""" line = [from_point[0], from_point[1], to_point[0], to_point[1]] return _clip_and_draw_aaline(surf, surf.get_clip(), color, line, blend) def draw_line(surf, color, from_point, to_point, width=1): """draw anti-aliased line between two endpoints.""" line = [from_point[0], from_point[1], to_point[0], to_point[1]] return _clip_and_draw_line_width(surf, surf.get_clip(), color, line, width) # M U L T I L I N E F U N C T I O N S # def _multi_lines( surf, color, closed, # pylint: disable=too-many-arguments points, width=1, blend=False, aaline=False, ): """draw several lines, either anti-aliased or not.""" # The code for anti-aliased or not is almost identical, so it's factorized if len(points) <= 2: raise TypeError line = [0] * 4 # store x1, y1 & x2, y2 of the lines to be drawn xlist = [pt[0] for pt in points] ylist = [pt[1] for pt in points] line[0] = xlist[0] line[1] = ylist[0] b_box = BoundingBox(left=xlist[0], right=xlist[0], top=ylist[0], bottom=ylist[0]) for line_x, line_y in points[1:]: b_box.left = min(b_box.left, line_x) b_box.right = max(b_box.right, line_x) b_box.top = min(b_box.top, line_y) b_box.bottom = max(b_box.bottom, line_y) rect = surf.get_clip() for loop in range(1, len(points)): line[0] = xlist[loop - 1] line[1] = ylist[loop - 1] line[2] = xlist[loop] line[3] = ylist[loop] if aaline: _clip_and_draw_aaline(surf, rect, color, line, blend) else: _clip_and_draw_line_width(surf, rect, color, line, width) if closed: line[0] = xlist[len(points) - 1] line[1] = ylist[len(points) - 1] line[2] = xlist[0] line[3] = ylist[0] if aaline: _clip_and_draw_aaline(surf, rect, color, line, blend) else: _clip_and_draw_line_width(surf, rect, color, line, width) # TODO Rect(...) def draw_lines(surf, color, closed, points, width=1): """draw several lines connected through the points.""" return _multi_lines(surf, color, closed, points, width, aaline=False) def draw_aalines(surf, color, closed, points, blend=True): """draw several anti-aliased lines connected through the points.""" return _multi_lines(surf, color, closed, points, blend=blend, aaline=True) def draw_polygon(surface, color, points, width): """Draw a polygon""" if width: draw_lines(surface, color, 1, points, width) return # TODO Rect(...) num_points = len(points) point_x = [x for x, y in points] point_y = [y for x, y in points] miny = min(point_y) maxy = max(point_y) if miny == maxy: minx = min(point_x) maxx = max(point_x) _clip_and_draw_horizline(surface, color, minx, miny, maxx) return # TODO Rect(...) for y_coord in range(miny, maxy + 1): x_intersect = [] for i in range(num_points): _draw_polygon_inner_loop(i, point_x, point_y, y_coord, x_intersect) x_intersect.sort() for i in range(0, len(x_intersect), 2): _clip_and_draw_horizline( surface, color, x_intersect[i], y_coord, x_intersect[i + 1] ) # special case : horizontal border lines for i in range(num_points): i_prev = i - 1 if i else num_points - 1 if miny < point_y[i] == point_y[i_prev] < maxy: _clip_and_draw_horizline( surface, color, point_x[i], point_y[i], point_x[i_prev] ) return # TODO Rect(...) def _draw_polygon_inner_loop(index, point_x, point_y, y_coord, x_intersect): i_prev = index - 1 if index else len(point_x) - 1 y_1 = point_y[i_prev] y_2 = point_y[index] if y_1 < y_2: x_1 = point_x[i_prev] x_2 = point_x[index] elif y_1 > y_2: y_2 = point_y[i_prev] y_1 = point_y[index] x_2 = point_x[i_prev] x_1 = point_x[index] else: # special case handled below return if (y_2 > y_coord >= y_1) or ((y_coord == max(point_y)) and (y_coord <= y_2)): x_intersect.append((y_coord - y_1) * (x_2 - x_1) // (y_2 - y_1) + x_1) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0171118 pygame-2.6.1/src_py/fastevent.py0000644000175100001770000000323614676242340016273 0ustar00runnerdocker""" A compatibility shim for pygame.fastevent based on pygame.event. This module was deprecated in pygame 2.2, and is scheduled for removal in a future pygame version. If you are using pygame.fastevent, please migrate to using regular pygame.event module """ import pygame.event import pygame.display from pygame import error, register_quit from pygame.event import Event _ft_init = False def _ft_init_check(): """ Raises error if module is not init """ if not _ft_init: raise error("fastevent system not initialized") def _quit_hook(): """ Hook that gets run to quit module """ global _ft_init _ft_init = False def init(): """init() -> None initialize pygame.fastevent """ global _ft_init if not pygame.display.get_init(): raise error("video system not initialized") register_quit(_quit_hook) _ft_init = True def get_init(): """get_init() -> bool returns True if the fastevent module is currently initialized """ return _ft_init def pump(): """pump() -> None internally process pygame event handlers """ _ft_init_check() pygame.event.pump() def wait(): """wait() -> Event wait for an event """ _ft_init_check() return pygame.event.wait() def poll(): """poll() -> Event get an available event """ _ft_init_check() return pygame.event.poll() def get(): """get() -> list of Events get all events from the queue """ _ft_init_check() return pygame.event.get() def post(event: Event): """post(Event) -> None place an event on the queue """ _ft_init_check() pygame.event.post(event) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/freesansbold.ttf0000644000175100001770000030045014676242340017106 0ustar00runnerdocker PGSUBׯOS/2.pVcmapWcvt /0Hglyfu{P/`head `46hheah4$hmtxUb5 kern7OS1?$ loca7c( maxph4 nameJhTLpostL]n "Hlatnligainitmedi Lb2 (- OLM,IL?V?V1 "P JPfEd@ ZcxZ@~_!(+.3    " & 0 : D !""""""`"e% !(*-3    & 0 9 D !""""""`"d%)ogec`^A=7651RONMJA90Turhaܵ }|y~srg  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`apcdhvnjtiqfukzbml{wox!yc{DtmxHq}o_vNQaYfk]i,7;S?J[2VH0*8:Dh2A\w?$).!n./<2<2/<2<23!%!!!M f!Xp 4/3 ///33 301#5#5*C)52 @?33 3 /3 ް 201#'5!#'5*8(v*8(ق)s/33333ް22222   // / /////01#7#537#53733733#3##7#737#j(Macw"i"g"i"Zmdw(i(ggg ccccc-5;//%/&//3 3!301231ް222$2%2.2/2    & ' 6 7 8ް92:2;2 01#6'&'#5&'&'=35&'5476753567547 )D3ODR5UUi*9D4PHISN*L&7h: ii&=o j/y266a-J<JI_#'9O&/'30/1323.EFG7/:3;3O3()9/ 3 3ް22#2$/%/ / 333 ް2 2!24/5363732=>?@ABI>ްJ2K2L2+,-.012#"'&=476"3276=4'&%3#2#"'&=476"033276=4'#&Y7B4BV7+C3B0 )/ +yLuMZ6(B4BV7+C3B0 )/ )D#,%R7+B2AU7*c)/ )1 k'tE2AR7+B2BU7*c)/ )0 7-8F ? 35 6 7 #5ް>2?2@2 /3330 1 2 3 /3335 B C D :5ް;2<2=2#$%&*013#'"'&=4767&/&=476326=3276754'#"13q2{.W@,A*<"? *F3Dk/2+t/*- 0Ha;0 + u kL8B U6LY7! "18R1$F$/G399,37&7B!44 2!?3/301#'5*8(ق(8/-?3 / //333013#&'&=476dl :5dmЅ9AIfв&(*8- ? 3///33301#676=4'&'3zdl :5dmЅ9AIfв&(*e?3 / //301'7537''mmHmmC:CC: $E$tt$F#^+^^+2 H/3/333  / //33 3  01##5#5353ww#ww@R-/3//3 330173567615#@" '9L VZ& 8L*V/301!5*V@ /3/3017#5֖/3//013#CC((q ? 3 3 !ް2(2/333#ް$2%2&2012#"'&'&=476"3276=4'&}A2; Hg `>Y?%d=4=^iM-2 _3PT-?T5 2b ~='_8Po2B   L/3/333  / //3 3 3  01##5!53# JtvL/%_ ?33 ް!2"2ް2%/333   01!632#"'&'533276=4/&#"#9Br>-\CaA(U L DC~?}+Y@[H5S4HSF#d6 1E ?33<=>2<ް32E2ް222&'(/ 3!3"3 56789:@/A3B3C3    01#&'&#"670372#"/&=4?67320"03276=4'&, H6Cl9)W>XoC32 ?~p<B5<9$6H K9U&O":)V /33/301#6?6767!558 #PnYfMn } $8J ? 3 3ABC9Aް:2J2-./%-ް&2627282 / 333<=>?/33333()*+1/233343 !"E/F3G3H301#"'&=4?&'1&=47632'"3276=4'&+"3276=4'&`ZB_F2N&Q Q>UuA,.E 5A 5I <I ?3Us@0U:Sf9+M `7*I2CI+ 1: /: =N :T #7p/ 3!3# ް 2 2. / 0 .ް$2%272/333) * + , 01733275#"'&=47632#"'&"03276=4'&&1t $8n;+X>YE16@m?+B <A=1# Z@[F2tQenH2D$] ='] q?/3ް2/33301%#5#5vqRL/3ް2//3 33330173567615##5q" '9L VZ& 8L( //01 %5~moy24#/3ް201!5!5wwww( //015-5(~ moy@,04X2/33141ް223/4312 / 3 3 3"#$%&01%#&7676716=4'&#"#6767632#5q|)(8 1=)AF++  0 R5#.B :%/l:YU5IN2 "-8vUl%/&3'3 !"/#3;ް<2=2D2E2F2G2     ^_`UްV2W2l2PQRSQް22234+/,3-3.3IްJ2K2L2YZ[\/333678901331;2?6=4'&#"3273#"'&'&=4767632#"'&'4'"#"'&=4?67632'"32?676754'+&ZN%343bhm\ uhs[eyvVϾoRK]3& 9QO1$? <[K"u=1.+,(1 5  )? GYvX\~k\Q)I._\"#' }ly^TE@.<bXK? C>I>*9M M %/333/3 ?301%!#3# 1Y__'R)/33!"# !ް(2)2?33/3 !/33#/$3%3&3'3(3  013!2##32754'"+3274=4#REn><?$x6?ye_mo54K H4FjO<5\KN޽[_,%P ?33 ? 3!3/333   01#&'&#"327673#"'&=47632 *Qs0^'3o% rNoYExVW*45o-<):ZJ2cfIj 7XM _/ 3 3?33/3ް2222 013!2#'327=4+MDYYBDihP}Op H/3ް 2  ?3/3 01!!!!!]:}}}JJ =/3/ 3?3/301#!!!?:}}*,a ?33"#$%*"ް+2,?33 / 3 3 3 01#'#"'&=47632#&/&#";276767#5ZDj``o`W5 2O{4O6JW:v`dmlj]dB< `7G>!w9O= RM.2Pz# 7|7|A\F!b!(!&~ ?33   ?33  % & ?3/ 3 3 3 ް222 2!2"2#201!5#"'&'&=476323"3276=4'&#4aT> :O>Vb3B 9"C ;!7N; SsTBO'G*8g,G(6m, % (E ?33!!!ް2!""" ?33%!&!'!(!01%!327673#"'&=47632%3&'&'#" =Ka8DA(h7I? cIkUBVI*9f+F(6b1Cg / 333 ?33?3/3 ް 2 2  013632#4'&#"#C:dH17.B W).cJ+!4C5/3?3/33301#7#5ό}}&B/3?3 / 3 3333301#'53274177#5@#S#_p[}};$ -/33 3 ? 3 / 3 0173#'#3DZŤ8J=C/3?3/301#ό'<8%//3"3#3.3/3 ?33 33333'() ?33//3+,-.#+ް$2%2 !"ް220136?2672;2#4'&#"#4'&#"#<6> `+:\v'1 F1 FCA CMX",h5@h5@?"%j / 333 ?333 ?3/3 ް22    01367232#4#"#?7^(ZJ NRe%0Ma8#9%%w ? 3 3  ?33#$% / 333ް2 2!2012#"'&=476"3276=4'&'"-C$hC`E*kA_I"=%F#@%}D`K0sEeK-qJ*8j.F+9q+:&>%)/3/33 !  ?33  ( ) /3ް#2$2%2&2     01632#"'#"3276=4'dQ> 7O>Ud2C :!A!;!PY8MtS@XlH)8j+E*7m,& %'{/3/33   ?33  '  / 3333ް222"2#2$2%2013##"'&'&'4=47632"3276=4'&1fP= 7P=Ud2vC :!C = X7KtS@YH)8j+G(6q*?r% = / 3 ?33   ?3/ 3   0136763'"#?%M,{jZ{%9k ?33!"#5 ?63730/132333  $/%3&3'3(301#&'"#"13#"'&533276=4'&/&/&=47632`@i<`4J9nH# 3gQ30 $* 4!6l.['-^ ? 3 3!!/333""""// /3333301#337#"'5#5353-N  "/EE]. b }L]:\ ?33 ? 333/ 3 3 3   ް2222201!#5#"'&=33276=37^ (ZI @Re%0xa7R/3 ?33301!#33^umu #/333 ?33 3 3 301!# #333eQVVRQR}zz /333 ?3 3 301#'#373c[\XW  %)/33 3   ?333013+"'53276=3(<3 ɚwE i,2w )/3 ? 301!!5#5A qqq:q%8=8u/33?7383!/"3#3$3%31323334353          01#"01"101013#"'&=4'#/&#'5;676154763=%*"*E %LF"  <:%c1D  $(6c>!,0\3 S&d8?3///301#P_H8`2t/1323?33/3333 333333   ! + , - . / 0153274=472167&'&=4/#5323+1#H%*"*E %LF"  <:%c1D  $)6c>!,0\3 S&<:2/33/ 3 3013#"/&#"#632;276N v-%9 $ Nx/#9"$  * * BF 5 ?3 ///333 015353B*C)5D$ z#)X/////333&'()'ް222$2%2$$ $$$$0167076?3#5&'&=476753#&'/6 V5F,9!$,,r>&2?R; o;%ef rB[=VUU4HLSQ ?333/33   /3%3&3%'%(%Q%8ް92B2C2D2123*/+3,3-3HIJK!/"3#3$301#67323327#"'&#"'676=4'#53&'&147676321#'&/&#"#wzAJ)%/:)LE C@"1<7S Y3?3@3A3JKLMJް2C2"-ް&2'2(2)2   UްV2W2X2234501#3211#&=754'1+'3276=4'&+721"'&'&=4767"23276=4'& `YF# g9\g3  gQnl jgnkgf}ZXXXzZX[Y9HJ"h /0Q * fe!nl fdnm G[Z~~\[\Z[Z;/301!5;OO%l/ 3 3(((ް2%2((( / 333(((( ް!2"2#2((((012#"'&=476"327056754'&/J-<)4H. <(42 )4 *;(2L-;)3J.?*0,0 8`S/3ް2 2 2   /// 3 3 301%!5##5#5353)װwwgwwIwwH$i/3$ ް22)))/333*** ް 2 2 201!6767676=4/"#'47632F((W .3\dy&+; mQN*:6 7oZ8'+I3x /!3"3()*+,-)ް2 2/333 3//03132301532754/"#6?632#"'&=3323276=4' J&& X(P_$4AJ$1u\9+T>8+ A 1=9 GU#Y@% =y_=#7=~FF:$=#m/3 ?3333 3!3"3  ?333/3# / 3 3301#33276=37#"'&'"+"',=  !%615='3!3Rz>W# 2&AL?33///// 33ް201####&'&=4763+b?bm;(3:bHPV:NWDO@$ /3/3013#@||${$&"A /33+++///33333, , , ,01;6;2#"/7327670=4/&#"+< Z7OE$( "?0 L4 (/////301#5273#ku@_==KWW)/3 ް 22 ! ?333  ( ) /333''''#ް$2%2&2'' ' '01!52#"'&=4763"3276=4'&'NӖp# M$/g'P"-0,0 . TNN^"-k*R&2q)D4G4KXH 57'557'5eeveeOsuYYrsuYYr(R e / 3  /333 )))))/ //3ް22201#5273#3#%##5#53#5ku@_WYW._m_j==KW!K]]J(N 1 / 3   1 ް22$)%)&)/ //3ް 2!2"2****ް222  ()*+01#5273#3#%!6767676=4/"#'47632ku@_WYW((W .3\dy&+; ==KW!eQN*:6 7oZ8'+R37BE6/73; < 9/:3=3>38)?)B)C)E) /!3"3()*+,-)ް2 2/333 3//0313238+ A 1=9 GU#Y@% =!K]]J34 (,R/33 * ?+3),/33 3   )/*3+,0133276'53#"'&=476767676'53|()8 1> )AF1,40 SQ5#.B ;%/l:YV;TN2$" *7&$C&$t&$E&$K&$i&$Ij/333  /3 ް 2 ?3/333  01%##!!!!!!#5SCr}}}G,$H / 3 3+++ް2222 2?-@-A-+?,3-3678&/'3(3)3;<=/33333,,, ,01632#"/7327670=4'#1#'"7&/&=47632#&'&#"327673{< Z7OE$( +d1oxVW* *Qs0^'3o% xJ(0 L4 S$jfIj 7X45o-<):ZH-Op&(COp&(tOp&(EOp&(i&,C?"&,t+&,E&,i+/333ް22+2)*?33#$%&'(/333()ް2 2!2   01#53!2#!3274?6=4'&'#"+3MMMC M K<㖇Z%..$VSP6> a"l K S3AwyA4PD&1K(&2C(&2t(&2E(&2K(&2iO ''7'7TTTTTTTU)5y ?33"#$ ? 3 3,-.///3332345&2ް'2(2)2017'7&=47676327#" 3276=4&#""S3VRU ^[S4YCO ^;2Rm7&:7Up6$4[._nj eL\-c\ i e0`@^KZ:b@\SL&8CL&8tL&8EL&8i&<tLyx/3/33ް22?3/3ް22    017#332#'32?4/#▖r:>]5Jm`x73?3,-./0015367541676=4'&#"1#4?67232+"'5?676=4'&'# G>H ;;k}@(W.!0V6M1 FI ]_5 ?: p0/I.>f" /ME,p9#S  &DCs &Dt^ &DEi &DKh &Dij &DIiY%:IN/33 3 3 3 3EFGH6!7!8!16ް22?2J"K"" ?#3$3'3(3)3"L!M!N!/333@ABC01%3#"'#"'&=4?6?6754#"#6326323!3276%5;2?3&#"Ȋc7B@Sf i*8DUDu9>]F  >9 %0O2 _ bbg.haM%2  5'12c ;R>1) N&  =3 `{"$ %B{ / 3 3+++/333339.:.;.<.$ ?%3&3012/ 3!3"34567/3,,016;2#"'732?4'#1#'"7&'&=47632#&'"1&#"32?3#= Z:PC%(++w9O= ,>&1? V:(1L4 U2>F!b!((M.2O[. ?"p:) &HCs &Htf &HEq &Hir&CC"&t+&E&i#9"4 ? 3 3+,-+ް#2$242####?"/ /333&'()/&ް02122201#"'&=4?632&''7&'77"3276=4'&Tu>XE(pF)IIjK-25*E+9(t/G*9.#:&XC:&Xty:&XE:&Xi %&\t^:&>$/3 ? 3 3    ?33  # $ ?3/3 ް22 2!2 01632#"'#"3276=4'dhB8P=Ud2C :!A!;!Y\OsR@WH)8h,D)8m, %&\ik&$o &Doj&$G &DGlM/33 + ++/3?3/3333    01%!#3327#"'&=4?# 1SL$'wV%KX_`'$<5/ B K.$%<Q / 3 3+++ ?333LMN4 ?536373,-. /!3"3#3EFGHIJ/333'3/333)3*3+3,3=3>3P3Q3789:;01%327#"'&=476767#&541#"'&=4?6?6754#"#6732'532765 lL $'sMMJZM1&8DQD  (0B 1 W:F5/ >G. M3)E  6 "&  $ 1 S,&&t" &Fto,&&E" &FE!,&&H" &FH,&&F" &FFzM&'F&G+/333ް22+2)*?33#$%&'(/333()ް2 2!2   01#53!2#!3274?6=4'&'#"+3MMMC M K<㖇Z%..$VSP6> a"l K S3AwyA4P], ?33" # $  ?33  + , ް22 2    ?3/333 ް22 2 22&2'2(2)2  01#53533##5#"'&=47632"3276=4'&#<<4afB;O>Vb3v@"9"C ;!TCBBC7NZPrTBO&E+9g,G(6m,Op&(o &HosOp&(G &HG]#Op&(H &HHpO| / 33++ +/33ް2?3/3/33301!327#"'&=4?!!!!lL("yo)]:}:F5/ C M6}} %6=t/334+5+6+/333!%!&!'!!%ް"27"8" ?33;!M K L7^/ ;1, mEeL,X&;RD/A1%R+43-Op&(F &HFp*&*E"&&JE!*&*G"&&JG*&*H"&&JH*&*"&U&J"D&+EC&KEmD ]/3 3 3/3?33 3/3ް22 2   01!#3!3#ߖ K'Cl / 333 ?33?3/3 ް 2 2   013632#4'&#"#C:dH17.B W).cJ+!4;&,K:&K&,Go:8@ &Fo7p@&,G &G#": / 3 3+?3/333330173#"'&50=47#X'0'` qT'?C$ / :L<"c /33+ + +?3/333/333301;7#"'&=47#7#5R,(cnM:E  / ;GA}}?&,HC/3 ?3/301#ό?&,-C&&LM:&-E&+E ?3/////3///   01#'532741773#'#@#S#kgNRRL_p[ddJ&.;$&Nu;$PC&/tC&OtPC&/C&OPC&/C~&OPC&/wC&OwU 5/3 ? 3/3 3 3 017!!573楥oPPpXq}8Y8 -/3 ? 3/3 3 3 017#5738888(O(&(O(dD&1t?"&Qt{D&1?"%&QD&1F?"&QF?"%o / 333 ?333 ?3/3 ް22     01367232#4#"#?7^(ZJ NRe%0Ma8D D/33 3?333/3ް22  01!#33ۖ!'?"%o / 333 ?333 ?3/3 ް22     01367232#4#"#?7^(ZJ NRe%0Ma8(&2o#9&Ro(&2G#9&RG#(&2L5#9&RL0 ? 3 3,-./3ް2?3?33 !" / 333'()*'ް20201!!5#"'&=476325!!!&'#"13276pZ35TQcRxK5+?'D _1!L+:K(:};@ ojlX+4}}jE^A\E'C%)=I ?333 3 3 3$!%!&!'! 234 %ް!2-">"?" ?33333*+;<=C!D!E!F!/333-./001%3#"'#"'&=47632632!3276"3276=4'&'"3&'&'"#"b/8 qBMvE*n@]zIAsF >< I"=%F#@27 g.KKsEeJ+LL\$=P> /, )J*8j.F+9q+u4*, P&5t?r&UtP&5?r%&UP&5F6u&UF- y&6t&Vtf y&6E&VEp! $y] / 3 3+++ް22222'0(0=?>3?3GHI!/8393:3;3MNOP/33333,,W,*/+3,3-3Z[\]01632#"'7327670=4'#1#'"7&'&'3276=4'&/&/50'&=47632#&/"12T= Z9QD%( *+ o/l :2f(}?XK3vZ*)r# '1L4 S%d<: I%76R8^e 5. [".$%\ / 3 33+++ ?$3[3\3-./A ?B3C3HIJKL&/<3=3>3?3PQ/33333,,, ,1,2,3,4,[,1VWXY01632+"'&'7327670=4'#1#'"7&'&'33276=4'&/&/&=47632#&'"#"13#< Y7NE$( +(6Z  >`4J9`@iR9P(0 L4 TS .$* 4!6l.['5H# 3g`3$ y&6F&VFq$V&7x F&WxV&7F<&WxVB/3?3/311/3 01##5!H\\}}-t/333""""̱̰ / / //322 2 2 /3333301#337#"'5#5353-N  "/EE]. b }L]L&8K:&XKL&8o:&XoL&8G:&XG#L&8I:&XIL&8L:/&XLL-/33++,+-+ ?333?3!3"3/333/33 3()*+ް22 2!2"#$01#"'&'54737+"'&=323274=332U')($C;,;1RG4:AM/ =6.J?x~{bD=F03:4-"/#3$3+++ ?33,3 ? 333/ 3 3 3  &/'3(3)3/3333301!#5#"'&=33276=332?3#"'&=47676@7^ (ZI nL$'v8 @Re%0xa7R8H5/ @9,  &:E1&ZE!&<E %&\Ej!&<iB&=t|&]tFB&=H&]HTB&=F&]FS4\/3/3"" / 3## #/3333  ̱̱013##53543'"LLP($]Ai&$#P/33  ް222#ް22   01##"'732767#53767632&#";10M/+##<{ f (8$:a|10s/)xa;si) y&6%&VsV&7-&W_F3#'#tkgNRRLdd _G#'373kgNRRL_aa#]+%/33/ / //01#"'5&=332?+9!*H&8 D=  G'9!) B;pm /3/301#5nzzMN W/ 3 333ް2333/33333ް23333012#"/5&'5476"2?4'3 ,3 ,  ,2 +3 0  - ; / 33++ +///33301;327#"'&=476KR L'(h Q3%2/ 9I. mY:/33 3 3/3 3//013#"/&#"#6763232?YG ?=  G  #b bT#7!#7~FF:~FF2 U/33 3  ް244 / 35 5ް255 01#7#53#53zZ鼼 ?/3  ?333444//// /01#'!#33/#7ՠTN'BA= tzZ5㼼;e:/33666 / 333666601#"'&'&=4756?632e!21###-.#$^$"$#"$$"$"!#/3 ް 2  ?33344 /3    771101#7!!!!!!zZ8Xt㼼.r?3 3 333888 8/3  44 / 3  ް2 2201#7#!#3!3zZB㼼R&]+/344///3 01#7#3zZ#뼼\#k/3 ! /344/33    / 3 3ް2#2%01#7 '&5476324'&#"3276zZ+fffffddfBCXVDBBDWXCBylmmllmml?>=??>>?8?33 3 3344///3/01#7!#3?zZdː֯48弼CAU[4/333234/344'4(4)4*4'/399"/#3$3%3/3:,:-:.:/:4:    601#7!56?6=4'&#"!53&'&/476;23zZc**>5A!o R,5 H$7- =g59"  W9O;?3̱/3;;01!#!O|_/3?301'3'&'7ь(f# 1 v_+/F}7 n/3   ް 2?3/3    771 1 01!!!!!!8Xt r B/3  ?3/3< </3== 01!57!5!!ru%2h z-v ( h/3 ̱̱̱̱̱̰ / //3ް2 2 2  01#!#3!3BR&@D/339 : ; A9ްB2CD'Cް(2)2    / 3 33/012B/ްC2>>A>D>>ް 2?2@2????F01#"'&'&=476?676324'&/&'&#"3276765!5!0.WSg[UY15/0EBRF?D37(*03*( !)'0A23~fvZW40',UWZNN1602LKd=3/#""#27A;/+$":9V6,&?388/301#31 <?3 3 38888/3 /01##33̽V>\V>  ? 3// / /01#'&'7#3ˠ# 1 '_)!'F'M? 333888888/355ް25501###3'73z  $(8 E?33 38888/355ް2  01##33Q-u d/ 3   ް2?3/3 3 3771 1/3@@ 01!5!!5!!5!e88>HH_H4\/33  ް2 /3 3ް2201#"'&5476324'&"276ffdffddfBCCBBCCBflmmllmml?>>??>>?7K?3̱̱̱/3ް2 01#!#!bx5t/33 ? 3 3 ̱ / 3ް22????!01+#!24'&+3276CBg'R&@))@5N#F49! $#.-0MwD/3  ް2/3<</3==01!5'5!!!w2 { v xB?3̱/3̱̱ 01###5!xj_x *?33 3///3 /01 #3?ː֯48CAU[#./3AA / 3 3 3()*+(ް222$2%2.2     ް2#2001#5&'&=47676753'4'&'676ZNxxNZ,PwwN[1';9*0:(10)9aUMJJMUB98,NSSM[M0' *3jm'.NQ3)" ?333// / //01#'?# 3763?3೽  )   o&,/ 3BBBB!B"B#B   !̱ !̰/,//333 / 3 3/33 !"( ް)2*2+2,.01#3#53"'&'&'&=;33273676=7-.H"NO"-&$ 85  pd:= 2.Dz1  0j9/3$3%3&'/33234%/&3#9$9*/+3,3-3/3::::9:  ;013!56?6=4'&/&'&#"!53&'&=476?632-.vc*+)*3A.0'']z-,((MPjvSQ)'riN1%~y)EHX3-0"##$:9EVCI(z~(/Nc^WX8777VW9u \ ? 3/333/ //355 / 3 /355 01#53#53#39\ߖrub? 333/333 / //355 / 3  /355/01#53#53#3?ː֯48ߖCAU[e3/33.3/303+ް 2 2 2"#$/3CC/33 /333&3)*+)'(5)01#74/&+"327#"'&547676763537#"/& }[29:!:v;U{??$$,+61!#z"$C+K0+'-WU+',JKF:9%$ +Bz! 7;^/33234,2ް-2.2)*+#)ް$2%29)ް:28C;C01%#"'54767&'&54?6732#&'&#";#"32767#7 53P! !9;z M03 "!7f8GG<f7!"g}[I*+@"  %>U)+*+G-9"m"8-t) )r/333   $%&/3CC//3 3$3ް22+01#776767632'4'&#"#?'632}[ 9-, 8p$7#(   +):5&0*v I]/333 ? 3 ް2CC/33 3     01+"'&=3367#7.L-@,) ,K}[ ))Su  q 5/33)*+ ? 34353/33 3  ް244/33 !" / 35 5/3551/233343  57 01#7#53#53#"'&'5&'5&5332767676=3zZ 5,\d+3   $" q>"#  %">Y?  ?7e+//33*3+3,3 ' ް222 /33   /333"3%&'%#$1%014/&+"327#"'&547676763537#"/&9:!:v;U{??$$,+61!#z"$C+K0+'-WU+',JKF:9%$ +Bz! !"D/33=>?&/'3(3)*+2)ް3242 / / / 33  789: /(3)3DDD-/.3/303#/$3C3D3!"F01%#"'&'#476767632'4'&+53276=4'&#"327676565H:*)'1<0t<+0'EKC:&2 5A67 ! b3% 4a2 6Z:| -+!] )!/+@/3 3 ?33 ///3/01#5&/"'4767632/Lj  '  ;_Z) h 5R *!7}/33 0 1 2 0ް2 / 3 3 3-./0/3EEE"/#36373 !901%#"'&=47676763'5!#'4'&'&#"3276765*A=_xIF%$-%$q5S 3&{6 `@C IGL:9  -nzR'V,!"#$.$'(-7M/33234,2ް-2.2)*+#)ް$2%201%#"'54767&'&54?6732#&'&#";#"32767 53P! !9;z M03 "!7f8GG<f7!"I*+@"  %>U)+*+G-9"m"8- )`/3/ /3335555/3FF/333()+01'6514'&#"'&=4767#5!31|+]dXD4E}OL%+$$&*>z.ZA8tW;zdGmlv>!)<) ,%d /333 !"//33 3ް22 ' 0176767632'4'&#"#?'632 9-, 8p$7#(   +):5&0*v %3c/33,-.&,ް'2% ް!2"2 /333GGGG501#"'&'&'&=4767632'&'&#"#32767569:N=-0" 98YX89?6 *' hWZ(&04IDptVV6556VRvBY=824hz@,3!2+.!L/333 ? 3/33 3     01+"'&=3367.L-@,) , ))Su  ) < ?3 3 37777/3 /01#'#373 8J,*/33%3///.'/01%#"/&'#'&'&'&#76323?JF)E X 1 r 2*  %@A9?$ %  !$ Qf 4S*f / 3 3*////!/"//3ް 2!2"#$,"01%#"'&'#"/#332?65?3"'=S!1  )33%@7     I% &Oy)   ?333///01#3'?67 tגv x84 / KG / 3 3 3@AB3@ް4252012!0ް"2%2&2'2#$//3 9:;<"/#3$H%H/333+,-./333FGI01'6?4'&+"'.5676?67&/&=4?#5!#";#"322w& 5F9>LH>>#$KLttLK < $!:8#$^@D$# "DB`KJJK(# $$Y****X!a ?3   /// / 3   ް22̱̱01#"'&5##'!#?36?ADFZ@ )!E7?xx 6-(|/3 3#$%#ް22 / / /33   ! ް2'2(2*01#"/#476324'&#"32765604J4-PMlxKJ&$79!%%#76%&g40EDNMV+*)([\()(-Y*15d/3343012/)/*3+3,3     ް22245701#4'&#"'674#'&'#&/&'&=4767632 7  V!3Q#* .@0%*9/#%'@?NjGG+M!!<(5 "D$y1>LH>>#$KLt < $!:8#$HW^@D$# "DB`KJ(# $$Y****XX / 3 3 ?3/3II/3301#?#"'&'&/5#5!,>4"$ & !=v)[/3 3 ?3(3)3/33%ް&2'2(2)+01%#"'&'5&'5&5332767676=3 5,\d+3   $" >"#  %">Y?  ?7# =,/-3(0)0*0+0.0/000,JJJJ ?336/738393-/.3+,  / ް2 2 2!"#$?#01%4'&'&#276765332+#53"'&'&'&=47676L!"*0hP7'$-laCC$"?>SB94($(*$%$ +h'(/+*%!+(GBMHB>,(+$854965/!V3%B/333    ?33////'/01+"'&/#'&'&##5?233727V-+&N %5)n} ' .}'!} ?3 3!3  // / 3 3 3ް222ް222 2!#01%#5&'&=3367676=3KBiiBK x>66=xI8  U <- +O/3 3333,-./;<I//333 &'()2&ް324252678?6ް@2A2B2I2NOQ01%#"'&'#"'#&'&'&=47676736?6=32?6=4'&'&/7 ((6;,,;8$* *B )  * <*<-3$'(&2,;4>@07 )H'%0()@-$$-@))),+B+$40@<5: / 3 3 3 ?3ް222/355/333/35501#53#53+"'&=3367L-E') ,S *)Ru  1/33%&' ?30313ް222/33/355/355-/.3/303 1301#53#53#"'&'5&'5&5332767676=3 5,\d+3   $" U>"#  %">Y?  ?7 5 / 3 3012"0ް#2/3CC/333)*+,-.)ް24252701#7#"'&'&=476324'&/&'&"32765}["!>>LH>>#$KLttLK < $!:8#$^@D$# "DB`KJJK(# $$Y****X)-i/3 3 ?3(3)3+/,3*C-C/33%ް&2'2(2)/01%#"'&'5&'5&5332767676=3'#7 5,\d+3   $" }[>"#  %">Y?  ?7 OS/3 3333,-./;<Q/R3PCSC/333 &'()2&ް324252678?6ް@2A2B2I2NOU01%#"'&'#"'#&'&'&=47676736?6=32?6=4'&'&/7#7 ((6;,,;8$* *B )  * <*}[<-3$'(&2,;4>@07 )H'%0()@-$$-@))),+B+$40@<5#Op&(COp&(i / 3 3ް2222?3 /311 / 3ް2222 ̱ 0132#!#5!3276=4'#'#|;%,8HՌlc\`~ ?335 6 7  ?33, - > //3 3!3 0123 ް92:2;2<2@017632#"'&=7676?675"13276=4'&h )IG+2cU= :_Bc9*z %u * B!<!@"8G  "WO< SsN5fJd  *G)6m+E*8f.<'3/33)*+()ް2232 ?33'/3()!/"3#3$3+3  ,/-3.3/3035013!21###32736=4'#'3276=4'&#< S-.:X-.Zt: %$tzC "'(:;* 4NA,'a 'q' )<7/3 ?3/3OO01##ЌqU1/333PPP P P/3 ?3/3 / 333/3/301%3#5!#53676=!3#\nn`1Ɵe}}>GU:3 %HJ/3 3333 ?333 3 3/333  /01%#'35373#'#Lձճ(%;# ?$3%3-./-ް:2;2 ?33   /3  /3333/30/13233343=01753274=4'&#"#67632#"'&533276=4/9&#^>-cg7K8;<%S" %FB/3 ?3/3QQ/3 01###5qUq %\&(;P/33#3$3%31 2 3 D E F ?333333) * ; < = P //'/(//333,-./,ް22(252627282&'?@AB#ްH2I2J2K2 !R 01%#"'&=4?6767323632#"'#"3276=4'#&!"3276=4'9#&2dhA97,Pd22dQ> 7O>Ud2vE8"C :WC :!@!;@X[PruP>YY8MtS@XJ)8d-H)7i-H)8j+D*8m,[< \ / 3PP/ 3 ?333/3/3 / 3  0133333#5<ˌ`nUI}< c/3/ 3 3 RRRR/ 3 3 ް222 01333#5#"'<r<I b/3  ?333 3 3/3ް2 ް 2  01)33333I󌳌UU</3 P P   ?333 3 3/3ް2 ް 2  /3  01)333333#S錳xnUUI| / 33ް2 ?3/3ް222  ̱01!32#!#32754/7t-.Zݫ7qW.*ύA,'q:+< p/3333ް2 2 ?333/3ް2"01#2##!33276=4'&#޶#-.Z݌zC "~A,'nq' )<S / 3 3ް22 ?3 /3012##!33276=4'&#<#-.Z݌zC "M~A,'nq' )" %%\ ?33 !" ް%2 ?33/3SSSS'01753&'&#"#67632#"'&'332767ˮ>=  g4D?!t9PA#/Jq,.35C_D"\1ENR<b%* ?33!"#/3/3 ? 3 3* ?3 /3 TTTTT%ް&2'2(2,01%##3367632#"'&"3276=4'&Pr8GC$hB`EI"=%F#@ܓ7}D`K/r2'J*8j.F+9q+i/333/3 ? 3 3/33ް222  01%#7&'&54?63!#=#"13[\ -.Z#zC "R A,'nq') &HC! &Hir$B/3 ?3/3QQ/3 01###5qUq<&t!" %)V ?33ް2() ?33#$%/333S)S+01%#2757673#"'&=47632#&'"1&#"3aC< `7G>!w9O= ,>`7|7|A\F!b!((M.,%9y ?33!"#5 ?63730/132333  /39$/%3&3'3(301#&'"#"13#"'&533276=4'&/&/&=47632`@i<`4J9nH# 3gQ30 $* 4!6l.['CL&i&MM/3 3 3 ?3/333ް201!###5676=hY+C9 3L%j,e?" ]/3 3 3/ 3 ?333/ 3  ް222 013353#5##?ˌˌ$B/3 ?3/3QQ/3 01###5qUq;$&tA!<&C! %&\Gj#<  d/3UU  ?3 3 3/3/3ް 2   01!#5#333eň}}ULy u / 3 3ް22 ? 3 / 3 ް22220132#!33276=4/|;%+7lc`%SJJ`D/3/3/3/3 013#53!j@E/3 ?3UU/3/3 01##35ЌU~JJ7/3?3/3LL013#!!}<7/3 ?3/3OO01##ЌqUJJ7/3?3/3LL013#!!}<7/3 ?3/3OO01##ЌqU6J/3 3333?333 3 3/333  /01 # 333 ##eǤez_J/3 3333 ?333 3 3/333  /01%#'35373#'#Lձճ( y7" ?#3$3+,3+ް42526272?33  /333.//30313 0132754'&+"#47632#"'&'3276=4'&'&+LB!3K@?RzHi@o/l O ff< d^9Sp/@]/-b<$+8d<S%;# ?$3%3-./-ް:2;2 ?33   /3  /3333/30/13233343=01753274=4'&#"#67632#"'&533276=4/9&#^>-cg7K8;<]F  >9 %0O2 _ bbg.haM%2  5'12c ;R>1) N&  =3 `{Op&(G &HG],)}# ?$3%3ް2! !(!)!?333 '/(3)3XX X!X  + 01%!32?54'&'&#"#6?67232#"'&= [!t-\#- Q* )SZDvUQ9l r=54X7ncgI^" %'z ?33$%& $ް!2 ?33 /33VVVV)0154'&#"1#67632#"'&'5#327~B< `7G>!w$,=O0 > z# 7)|7|A\Fb0AN`B .,&8i" &9im6&i&i y&iX&il y7" ?#3$3+,3+ް42526272?33  /333.//30313 0132754'&+"#47632#"'&'3276=4'&'&+LB!3K@?RzHi@o/l O ff< d^9Sp/@]/-b<$+8d<S%;# ?$3%3-./-ް:2;2 ?33   /3  /3333/30/13233343=01753274=4'&#"#67632#"'&533276=4/9&#^>-cg7K8;<7I? cIkUBVI*9f+F(6b1C$/3?3/301#ό'<8%//3"3#3.3/3 ?33 33333'() ?33//3+,-.#+ް$2%2 !"ް2210136?2672;2#4'&#"#4'&#"#<6> `+:\v'1 F1 FCA CMX",h5@h5@*-"./ //33 3 '''''$/01'7&'&'5476/&32?*r *'1'BEDeN!,4' ,7`#r/3  ް2"2#2//3 3 3   /3/333 01#53%"'&=3!2754/7#rrQ1$q & 3b!K%sV.*UH6 cD4 G l#,(/ 3'3(3ް222 / 3 33/3ް2/33"#$%01#53#53"'&=3!25/7#?eeeeQ1$q'3b"$FDeeeW.*TH5  dC-&%*G)-, - / 3,3-3ް222$2 ް 2 /333/3 / 3 /3/33'()*01#3'#37#3"'&=3!25/7#-ee~dd>ggQ1$q'3b"$FgggfT.*UH5  cD-'$,G(.-GA/33  8// 3!3"3  &I 01%32?#"/&'&=4?67/'?63# Y(# 09\#BT7-T,"6.Z0-?"(86T &9#) <  *".)B/7iIEaWV! ^  z  -QK]/33ް2$/%3&3'3   +/3M01#533276?#"/&'&=4?67/'?6# sqq(# 08]"-T7-T."0.Z0-?"(86T &9%( <  *"rW-+A06 iHEaWV" _  z  @n/33345/333 3!3-3m3n3&EFGRSTZ/8/93:3;3 I/J3K3L3M#N#O#T/U3V3W3`abcdepb01%'#"/1+"'&/&=?76=4/73276=332754/7CG(!* '9MygO1. b J!k4, `/ !%i,7a   0"V4 < R&53W$## E")&W26-Z,'?/=V',#x2 4"35(<. #" -7/3##01!5-7hh7/3##01!57hhC //3  ?/33  01#54767673ʇ*%5SPmM%.JB .?3  //3 3 301356'#B*%5SPmM%.JBy} - / 3//3 3 3017356'#B*%5SP}mM%.JG \/3 33  ?3/33  ް22 01#54767673#54767673·*%5SP*%5SPmM%.J}mM%.JI Z?3 33  ///3 3 3 ް22201356'#7356'#I*%5SP*%5SPmM%.J}mM%.JHy} Y / 333 ///3 3 3 ް222017356'#7356'#H*%5SP*%5SP}mM%.J}mM%.J>  H/333   // / //33 3  01###5353 t3t>u/3 3 3  ް2 22    ///// 3 3 33301#3##5#535#5353tttt2,2#"'&=476?%4!(@&6 5 '@&4 (B%\ ^/333 3 3 /3ް2 ް 2 017#5!#5!#5㖒 %);M_qV(/)3233343V3W3X30DEFThij#!D?#!>D)Dz "AB`Go?3 3333/// / / ////3 ް 2 * * ް2**01##5!##33#/_m?^U[VT[zNN]^8].> /339\:\;\09ް1222]]]]#ް$2%2333/333.4567/33 3 01'632#"'&=47676326=4/&#"#9#9&#"32?6f(>FwKF+ Br\8*A2H5.3 2%I#&&CB,$< J+ 4gayvG4F_J2$I&qL4 ?I;On`6/3?30133%!?'} :/333 # # # ް22^^ ^//01#&'&#! !2767676?3&#!" 3h#@ VJ1!)"Y98L!  jw ( #/301!5 #ww '7$^P.!It2E/333ް2 2 2  //017#537#5!73#3!'{IDAb#TDDa4wywu8=wywy8- /3**/01%!5 %5~Q[[.mox- /3**/01%!=-5~Q[[Jmoy /3//01# > ttT88p - / 3//33 301356'#pz9%EC#')%*#xr8D/3iIEaNa ] z'  M)= 70/ _<S 8ZSV!MMp2,,y72M(MH2@M@,,D,,,,, ,,,MqMqH(H2H(c@R,MOcJ *D?,JcPABD (L +P cL cMBMH=,M,c;,"c,Mc"cCC,;Cy<c?c#c:c?,Mc:, ,, %dHH<MB,$,,,d,!Mr,XH(M^H8__Myc:,@M_(m,Xe(e(ec3,OOOO?D ( ( ( ( (HO LLLLLcC,,,,,,y,",,,,Cc#c?c#c#c#c#c#H2c c:c:c:c:, c:, ,,,,,",,",,",,"MccO,O,O,O,O, *c" *c" *c" *c"DcCDcC""?C(?C,J,;=;cPCcPCcPCcP,CcDc?Dc?Dc?c?Dc? (c# (c# (c#P?P?P6 , , , ,cMcMcMLc:Lc:Lc:Lc:Lc:Lc:  , cccM, ,cMMM M#MpMMM-MM2;bL197 (*(,1\'-6 75 % o:TN?@Ol : JJZ@)l44b r S P?!x t?b ? OO:cJ, ?,.YDcJDDRRcJ+OE DDJ.ABD (DL,c|.DDIDDDL,iD,^2P<<$1,)"`<`<=;`<`<c#`<c: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x;;;<.<<===='=2=>=I=U=`>1????+?6?B?N????@@@@&@2@>@J@V@AgAsAAAAAAAAAAB-BBBBBBBCC*CCD D!DeDDEREEFDFG*G[GH*HXHHI.IJJ8JaJJK1KKL5LtLLM_MNIU`lxwIhRŒEލbߎ ;kKܑ3QÕ0Fϕr@V"()2(7`o  F$,P&xP & @HX P& x  P    & @ H X$r$ $H$TXCopyright 2002 Free Software Foundation.FreeSansBoldPfaEdit 1.0 : Free Sans Bold : 15-4-2072Free Sans Bold$Revision: 0.4 $FreeSansBoldThe use of this font is granted subject to GNU General Public License.http://www.gnu.org/copyleft/gpl.htmlThe quick brown fox jumps over the lazy dog.Copyright 2002 Free Software Foundation.FreeSansBoldPfaEdit 1.0 : Free Sans Bold : 15-4-2072Free Sans Bold$Revision: 0.4 $FreeSansBoldThe use of this font is granted subject to GNU General Public License.http://www.gnu.org/copyleft/gpl.htmlThe quick brown fox jumps over the lazy dog.polkrepkoDovoljena je uporaba v skladu z licenco GNU General Public License.http://www.gnu.org/copyleft/gpl.html`erif bo za vajo spet kuhal doma e ~gance.eE  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjikmlnoqprsutvwxzy{}|~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~AmacronamacronAbreveabreveAogonekaogonek Ccircumflex ccircumflex Cdotaccent cdotaccentDcarondcaronDcroatEmacronemacronEbreveebreve Edotaccent edotaccentEogonekeogonekEcaronecaron Gcircumflex gcircumflex Gdotaccent gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonekIJij Jcircumflex jcircumflex Kcommaaccent kcommaaccent kgreenlandicLacutelacute Lcommaaccent lcommaaccentLcaronlcaronLdotldotNacutenacute Ncommaaccent ncommaaccentNcaronncaron napostropheEngengOmacronomacronObreveobreve Ohungarumlaut ohungarumlautRacuteracute Rcommaaccent rcommaaccentRcaronrcaronSacutesacute Scircumflex scircumflexuni0162uni0163TcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring Uhungarumlaut uhungarumlautUogonekuogonek Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentlongs Scommaaccent scommaaccent Tcommaaccent tcommaaccent dieresistonos Alphatonos anoteleia EpsilontonosEtatonos Iotatonos Omicrontonos Upsilontonos OmegatonosAlphaBetaGammaEpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsi IotadieresisUpsilondieresis alphatonos epsilontonosetatonos iotatonosupsilondieresistonosalphabetagammadeltaepsilonzetaetathetaiotakappalambdauni03BCnuxiomicronrhosigma1sigmatauupsilonphichipsiomega iotadieresisupsilondieresis omicrontonos upsilontonos omegatonosuni0400 afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061uni040D afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097uni0450 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109uni045D afii10110 afii10193uni048Cuni048Duni048Euni048F afii10050 afii10098uni0492uni0493uni0494uni0495uni0496uni0497uni0498uni0499uni049Auni049Buni049Cuni049Duni049Euni049Funi04A0uni04A1uni04A2uni04A3uni04A4uni04A5uni04A6uni04A7uni04A8uni04A9uni04AAuni04ABuni04ACuni04ADuni04AEuni04AFuni04B0uni04B1uni04B2uni04B3uni04B4uni04B5uni04B6uni04B7uni04B8uni04B9uni04BAuni04BBuni04BCuni04BDuni04BEuni04BFuni04C0uni04C1uni04C2uni04C3uni04C4uni04C7uni04C8uni04CBuni04CCuni04D0uni04D1uni04D2uni04D3uni04D4uni04D5uni04D6uni04D7uni04D8 afii10846uni04DAuni04DBuni04DCuni04DDuni04DEuni04DFuni04E0uni04E1uni04E2uni04E3uni04E4uni04E5uni04E6uni04E7uni04E8uni04E9uni04EAuni04EBuni04ECuni04EDuni04EEuni04EFuni04F0uni04F1uni04F2uni04F3uni04F4uni04F5uni04F8uni04F9uni0617uni0618uni0619uni061A afii57403uni061C afii57409 afii57416 afii57418 afii57419 afii57421 afii57422 afii57427Euro commaaccentuniFE9E././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/freetype.py0000644000175100001770000000426014676242340016115 0ustar00runnerdocker"""Enhanced Pygame module for loading and rendering computer fonts""" from pygame._freetype import ( Font, STYLE_NORMAL, STYLE_OBLIQUE, STYLE_STRONG, STYLE_UNDERLINE, STYLE_WIDE, STYLE_DEFAULT, init, quit, get_init, was_init, get_cache_size, get_default_font, get_default_resolution, get_error, get_version, set_default_resolution, ) from pygame.sysfont import match_font, get_fonts, SysFont as _SysFont __all__ = [ "Font", "STYLE_NORMAL", "STYLE_OBLIQUE", "STYLE_STRONG", "STYLE_UNDERLINE", "STYLE_WIDE", "STYLE_DEFAULT", "init", "quit", "get_init", "was_init", "get_cache_size", "get_default_font", "get_default_resolution", "get_error", "get_version", "set_default_resolution", "match_font", "get_fonts", ] def SysFont(name, size, bold=False, italic=False, constructor=None): """pygame.ftfont.SysFont(name, size, bold=False, italic=False, constructor=None) -> Font Create a pygame Font from system font resources. This will search the system fonts for the given font name. You can also enable bold or italic styles, and the appropriate system font will be selected if available. This will always return a valid Font object, and will fallback on the builtin pygame font if the given font is not found. Name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If optional constructor is provided, it must be a function with signature constructor(fontpath, size, bold, italic) which returns a Font instance. If None, a pygame.freetype.Font object is created. """ if constructor is None: def constructor(fontpath, size, bold, italic): font = Font(fontpath, size) font.strong = bold font.oblique = italic return font return _SysFont(name, size, bold, italic, constructor) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/ftfont.py0000644000175100001770000001401114676242340015565 0ustar00runnerdocker"""pygame module for loading and rendering fonts (freetype alternative)""" __all__ = [ "Font", "init", "quit", "get_default_font", "get_init", "SysFont", "match_font", "get_fonts", ] from pygame._freetype import init, Font as _Font, get_default_resolution from pygame._freetype import quit, get_default_font, get_init as _get_init from pygame._freetype import _internal_mod_init from pygame.sysfont import match_font, get_fonts, SysFont as _SysFont from pygame import encode_file_path class Font(_Font): """Font(filename, size) -> Font Font(object, size) -> Font create a new Font object from a file (freetype alternative) This Font type differs from font.Font in that it can render glyphs for Unicode code points in the supplementary planes (> 0xFFFF). """ __encode_file_path = staticmethod(encode_file_path) __get_default_resolution = staticmethod(get_default_resolution) __default_font = encode_file_path(get_default_font()) __unull = "\x00" __bnull = b"\x00" def __init__(self, file=None, size=-1): size = max(size, 1) if isinstance(file, str): try: bfile = self.__encode_file_path(file, ValueError) except ValueError: bfile = "" else: bfile = file if isinstance(bfile, bytes) and bfile == self.__default_font: file = None if file is None: resolution = int(self.__get_default_resolution() * 0.6875) if resolution == 0: resolution = 1 else: resolution = 0 super().__init__(file, size=size, resolution=resolution) self.strength = 1.0 / 12.0 self.kerning = False self.origin = True self.pad = True self.ucs4 = True self.underline_adjustment = 1.0 def render(self, text, antialias, color, background=None): """render(text, antialias, color, background=None) -> Surface draw text on a new Surface""" if text is None: text = "" if isinstance(text, str) and self.__unull in text: raise ValueError("A null character was found in the text") if isinstance(text, bytes) and self.__bnull in text: raise ValueError("A null character was found in the text") save_antialiased = ( self.antialiased # pylint: disable = access-member-before-definition ) self.antialiased = bool(antialias) try: s, _ = super().render(text, color, background) return s finally: self.antialiased = save_antialiased def set_bold(self, value): """set_bold(bool) -> None enable fake rendering of bold text""" self.wide = bool(value) def get_bold(self): """get_bold() -> bool check if text will be rendered bold""" return self.wide bold = property(get_bold, set_bold) def set_italic(self, value): """set_italic(bool) -> None enable fake rendering of italic text""" self.oblique = bool(value) def get_italic(self): """get_italic() -> bool check if the text will be rendered italic""" return self.oblique italic = property(get_italic, set_italic) def set_underline(self, value): """set_underline(bool) -> None control if text is rendered with an underline""" self.underline = bool(value) def get_underline(self): """get_underline() -> bool check if the text will be rendered with an underline""" return self.underline def metrics(self, text): """metrics(text) -> list Gets the metrics for each character in the passed string.""" return self.get_metrics(text) def get_ascent(self): """get_ascent() -> int get the ascent of the font""" return self.get_sized_ascender() def get_descent(self): """get_descent() -> int get the descent of the font""" return self.get_sized_descender() def get_height(self): """get_height() -> int get the height of the font""" return self.get_sized_ascender() - self.get_sized_descender() + 1 def get_linesize(self): """get_linesize() -> int get the line space of the font text""" return self.get_sized_height() def size(self, text): """size(text) -> (width, height) determine the amount of space needed to render text""" return self.get_rect(text).size FontType = Font def get_init(): """get_init() -> bool true if the font module is initialized""" return _get_init() def SysFont(name, size, bold=0, italic=0, constructor=None): """pygame.ftfont.SysFont(name, size, bold=False, italic=False, constructor=None) -> Font Create a pygame Font from system font resources. This will search the system fonts for the given font name. You can also enable bold or italic styles, and the appropriate system font will be selected if available. This will always return a valid Font object, and will fallback on the builtin pygame font if the given font is not found. Name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If optional constructor is provided, it must be a function with signature constructor(fontpath, size, bold, italic) which returns a Font instance. If None, a pygame.ftfont.Font object is created. """ if constructor is None: def constructor(fontpath, size, bold, italic): font = Font(fontpath, size) font.set_bold(bold) font.set_italic(italic) return font return _SysFont(name, size, bold, italic, constructor) del _Font, get_default_resolution, encode_file_path ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/locals.py0000644000175100001770000000225314676242340015547 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2003 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """Set of functions from pygame that are handy to have in the local namespace for your module""" import pygame from pygame.constants import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] from pygame.rect import Rect from pygame.color import Color __all__ = pygame.constants.__all__ + ["Rect", "Color"] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/macosx.py0000644000175100001770000000051114676242340015557 0ustar00runnerdockerimport platform import os import sys __all__ = ["Video_AutoInit"] def Video_AutoInit(): """Called from the base.c just before display module is initialized.""" if "Darwin" in platform.platform(): if (os.getcwd() == "/") and len(sys.argv) > 1: os.chdir(os.path.dirname(sys.argv[0])) return True ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/midi.py0000644000175100001770000005742514676242340015227 0ustar00runnerdocker"""pygame.midi pygame module for interacting with midi input and output. The midi module can send output to midi devices, and get input from midi devices. It can also list midi devices on the system. Including real midi devices, and virtual ones. It uses the portmidi library. Is portable to which ever platforms portmidi supports (currently windows, OSX, and linux). This uses pyportmidi for now, but may use its own bindings at some point in the future. The pyportmidi bindings are included with pygame. New in pygame 1.9.0. """ # TODO: finish writing tests. # - likely as interactive tests... so you'd need to plug in # a midi device. # TODO: create a background thread version for input threads. # - that can automatically inject input into the event queue # once the input object is running. Like joysticks. import math import atexit import pygame import pygame.locals import pygame.pypm as _pypm # For backward compatibility. MIDIIN = pygame.locals.MIDIIN MIDIOUT = pygame.locals.MIDIOUT __all__ = [ "Input", "MIDIIN", "MIDIOUT", "MidiException", "Output", "get_count", "get_default_input_id", "get_default_output_id", "get_device_info", "init", "midis2events", "quit", "get_init", "time", "frequency_to_midi", "midi_to_frequency", "midi_to_ansi_note", ] __theclasses__ = ["Input", "Output"] def _module_init(state=None): # this is a sneaky dodge to store module level state in a non-public # function. Helps us dodge using globals. if state is not None: _module_init.value = state return state try: _module_init.value except AttributeError: return False return _module_init.value def init(): """initialize the midi module pygame.midi.init(): return None Call the initialisation function before using the midi module. It is safe to call this more than once. """ if not _module_init(): _pypm.Initialize() _module_init(True) atexit.register(quit) def quit(): # pylint: disable=redefined-builtin """uninitialize the midi module pygame.midi.quit(): return None Called automatically atexit if you don't call it. It is safe to call this function more than once. """ if _module_init(): # TODO: find all Input and Output classes and close them first? _pypm.Terminate() _module_init(False) def get_init(): """returns True if the midi module is currently initialized pygame.midi.get_init(): return bool Returns True if the pygame.midi module is currently initialized. New in pygame 1.9.5. """ return _module_init() def _check_init(): if not _module_init(): raise RuntimeError("pygame.midi not initialised.") def get_count(): """gets the number of devices. pygame.midi.get_count(): return num_devices Device ids range from 0 to get_count() -1 """ _check_init() return _pypm.CountDevices() def get_default_input_id(): """gets default input device number pygame.midi.get_default_input_id(): return default_id Return the default device ID or -1 if there are no devices. The result can be passed to the Input()/Output() class. On the PC, the user can specify a default device by setting an environment variable. For example, to use device #1. set PM_RECOMMENDED_INPUT_DEVICE=1 The user should first determine the available device ID by using the supplied application "testin" or "testout". In general, the registry is a better place for this kind of info, and with USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if PM_RECOMMENDED_OUTPUT_DEVICE (or PM_RECOMMENDED_INPUT_DEVICE) is *NOT* found in the environment, then the default device is obtained by looking for a string in the registry under: HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device and HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device for a string. The number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB", and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB". In addition to the name, get_device_info() returns "interf", which is the interface name. (The "interface" is the underlying software system or API used by PortMidi to access devices. Examples are MMSystem, DirectX (not implemented), ALSA, OSS (not implemented), etc.) At present, the only Win32 interface is "MMSystem", the only Linux interface is "ALSA", and the only Max OS X interface is "CoreMIDI". To specify both the interface and the device name in the registry, separate the two with a comma and a space, e.g.: MMSystem, In USB MidiSport 1x1 In this case, the string before the comma must be a substring of the "interf" string, and the string after the space must be a substring of the "name" name string in order to match the device. Note: in the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID). """ _check_init() return _pypm.GetDefaultInputDeviceID() def get_default_output_id(): """gets default output device number pygame.midi.get_default_output_id(): return default_id Return the default device ID or -1 if there are no devices. The result can be passed to the Input()/Output() class. On the PC, the user can specify a default device by setting an environment variable. For example, to use device #1. set PM_RECOMMENDED_OUTPUT_DEVICE=1 The user should first determine the available device ID by using the supplied application "testin" or "testout". In general, the registry is a better place for this kind of info, and with USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if PM_RECOMMENDED_OUTPUT_DEVICE (or PM_RECOMMENDED_INPUT_DEVICE) is *NOT* found in the environment, then the default device is obtained by looking for a string in the registry under: HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device and HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device for a string. The number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB", and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB". In addition to the name, get_device_info() returns "interf", which is the interface name. (The "interface" is the underlying software system or API used by PortMidi to access devices. Examples are MMSystem, DirectX (not implemented), ALSA, OSS (not implemented), etc.) At present, the only Win32 interface is "MMSystem", the only Linux interface is "ALSA", and the only Max OS X interface is "CoreMIDI". To specify both the interface and the device name in the registry, separate the two with a comma and a space, e.g.: MMSystem, In USB MidiSport 1x1 In this case, the string before the comma must be a substring of the "interf" string, and the string after the space must be a substring of the "name" name string in order to match the device. Note: in the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID). """ _check_init() return _pypm.GetDefaultOutputDeviceID() def get_device_info(an_id): """returns information about a midi device pygame.midi.get_device_info(an_id): return (interf, name, input, output, opened) interf - a byte string describing the device interface, eg b'ALSA'. name - a byte string for the name of the device, eg b'Midi Through Port-0' input - 0, or 1 if the device is an input device. output - 0, or 1 if the device is an output device. opened - 0, or 1 if the device is opened. If the id is out of range, the function returns None. """ _check_init() return _pypm.GetDeviceInfo(an_id) class Input: """Input is used to get midi input from midi devices. Input(device_id) Input(device_id, buffer_size) buffer_size - the number of input events to be buffered waiting to be read using Input.read() """ def __init__(self, device_id, buffer_size=4096): """ The buffer_size specifies the number of input events to be buffered waiting to be read using Input.read(). """ _check_init() if device_id == -1: raise MidiException( "Device id is -1, not a valid output id. " "-1 usually means there were no default " "Output devices." ) try: result = get_device_info(device_id) except TypeError: raise TypeError("an integer is required") except OverflowError: raise OverflowError("long int too large to convert to int") # and now some nasty looking error checking, to provide nice error # messages to the kind, lovely, midi using people of wherever. if result: _, _, is_input, is_output, _ = result if is_input: try: self._input = _pypm.Input(device_id, buffer_size) except TypeError: raise TypeError("an integer is required") self.device_id = device_id elif is_output: raise MidiException( "Device id given is not a valid input id, it is an output id." ) else: raise MidiException("Device id given is not a valid input id.") else: raise MidiException("Device id invalid, out of range.") def _check_open(self): if self._input is None: raise MidiException("midi not open.") def close(self): """closes a midi stream, flushing any pending buffers. Input.close(): return None PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows. """ _check_init() if self._input is not None: self._input.Close() self._input = None def read(self, num_events): """reads num_events midi events from the buffer. Input.read(num_events): return midi_event_list Reads from the Input buffer and gives back midi events. [[[status,data1,data2,data3],timestamp], [[status,data1,data2,data3],timestamp],...] """ _check_init() self._check_open() return self._input.Read(num_events) def poll(self): """returns true if there's data, or false if not. Input.poll(): return Bool raises a MidiException on error. """ _check_init() self._check_open() result = self._input.Poll() if result == _pypm.TRUE: return True if result == _pypm.FALSE: return False err_text = _pypm.GetErrorText(result) raise MidiException((result, err_text)) class Output: """Output is used to send midi to an output device Output(device_id) Output(device_id, latency = 0) Output(device_id, buffer_size = 4096) Output(device_id, latency, buffer_size) The buffer_size specifies the number of output events to be buffered waiting for output. (In some cases -- see below -- PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored.) latency is the delay in milliseconds applied to timestamps to determine when the output should actually occur. (If latency is < 0, 0 is assumed.) If latency is zero, timestamps are ignored and all output is delivered immediately. If latency is greater than zero, output is delayed until the message timestamp plus the latency. (NOTE: time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.) In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency. """ def __init__(self, device_id, latency=0, buffer_size=256): """Output(device_id) Output(device_id, latency = 0) Output(device_id, buffer_size = 4096) Output(device_id, latency, buffer_size) The buffer_size specifies the number of output events to be buffered waiting for output. (In some cases -- see below -- PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored.) latency is the delay in milliseconds applied to timestamps to determine when the output should actually occur. (If latency is < 0, 0 is assumed.) If latency is zero, timestamps are ignored and all output is delivered immediately. If latency is greater than zero, output is delayed until the message timestamp plus the latency. (NOTE: time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets.) In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency. """ _check_init() self._aborted = 0 if device_id == -1: raise MidiException( "Device id is -1, not a valid output id." " -1 usually means there were no default " "Output devices." ) try: result = get_device_info(device_id) except TypeError: raise TypeError("an integer is required") except OverflowError: raise OverflowError("long int too large to convert to int") # and now some nasty looking error checking, to provide nice error # messages to the kind, lovely, midi using people of wherever. if result: _, _, is_input, is_output, _ = result if is_output: try: self._output = _pypm.Output(device_id, latency, buffer_size) except TypeError: raise TypeError("an integer is required") self.device_id = device_id elif is_input: raise MidiException( "Device id given is not a valid output id, it is an input id." ) else: raise MidiException("Device id given is not a valid output id.") else: raise MidiException("Device id invalid, out of range.") def _check_open(self): if self._output is None: raise MidiException("midi not open.") if self._aborted: raise MidiException("midi aborted.") def close(self): """closes a midi stream, flushing any pending buffers. Output.close(): return None PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows. """ _check_init() if self._output is not None: self._output.Close() self._output = None def abort(self): """terminates outgoing messages immediately Output.abort(): return None The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. """ _check_init() if self._output: self._output.Abort() self._aborted = 1 def write(self, data): """writes a list of midi data to the Output Output.write(data) writes series of MIDI information in the form of a list: write([[[status <,data1><,data2><,data3>],timestamp], [[status <,data1><,data2><,data3>],timestamp],...]) fields are optional example: choose program change 1 at time 20000 and send note 65 with velocity 100 500 ms later. write([[[0xc0,0,0],20000],[[0x90,60,100],20500]]) notes: 1. timestamps will be ignored if latency = 0. 2. To get a note to play immediately, send MIDI info with timestamp read from function Time. 3. understanding optional data fields: write([[[0xc0,0,0],20000]]) is equivalent to write([[[0xc0],20000]]) Can send up to 1024 elements in your data list, otherwise an IndexError exception is raised. """ _check_init() self._check_open() self._output.Write(data) def write_short(self, status, data1=0, data2=0): """write_short(status <, data1><, data2>) Output.write_short(status) Output.write_short(status, data1 = 0, data2 = 0) output MIDI information of 3 bytes or less. data fields are optional status byte could be: 0xc0 = program change 0x90 = note on etc. data bytes are optional and assumed 0 if omitted example: note 65 on with velocity 100 write_short(0x90,65,100) """ _check_init() self._check_open() self._output.WriteShort(status, data1, data2) def write_sys_ex(self, when, msg): """writes a timestamped system-exclusive midi message. Output.write_sys_ex(when, msg) msg - can be a *list* or a *string* when - a timestamp in milliseconds example: (assuming o is an onput MIDI stream) o.write_sys_ex(0,'\\xF0\\x7D\\x10\\x11\\x12\\x13\\xF7') is equivalent to o.write_sys_ex(pygame.midi.time(), [0xF0,0x7D,0x10,0x11,0x12,0x13,0xF7]) """ _check_init() self._check_open() self._output.WriteSysEx(when, msg) def note_on(self, note, velocity, channel=0): """turns a midi note on. Note must be off. Output.note_on(note, velocity, channel=0) note is an integer from 0 to 127 velocity is an integer from 0 to 127 channel is an integer from 0 to 15 Turn a note on in the output stream. The note must already be off for this to work correctly. """ if not 0 <= channel <= 15: raise ValueError("Channel not between 0 and 15.") self.write_short(0x90 + channel, note, velocity) def note_off(self, note, velocity=0, channel=0): """turns a midi note off. Note must be on. Output.note_off(note, velocity=0, channel=0) note is an integer from 0 to 127 velocity is an integer from 0 to 127 (release velocity) channel is an integer from 0 to 15 Turn a note off in the output stream. The note must already be on for this to work correctly. """ if not 0 <= channel <= 15: raise ValueError("Channel not between 0 and 15.") self.write_short(0x80 + channel, note, velocity) def set_instrument(self, instrument_id, channel=0): """select an instrument for a channel, with a value between 0 and 127 Output.set_instrument(instrument_id, channel=0) Also called "patch change" or "program change". """ if not 0 <= instrument_id <= 127: raise ValueError(f"Undefined instrument id: {instrument_id}") if not 0 <= channel <= 15: raise ValueError("Channel not between 0 and 15.") self.write_short(0xC0 + channel, instrument_id) def pitch_bend(self, value=0, channel=0): """modify the pitch of a channel. Output.pitch_bend(value=0, channel=0) Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers). If no value is given, the pitch bend is returned to "no change". """ if not 0 <= channel <= 15: raise ValueError("Channel not between 0 and 15.") if not -8192 <= value <= 8191: raise ValueError( f"Pitch bend value must be between -8192 and +8191, not {value}." ) # "The 14 bit value of the pitch bend is defined so that a value of # 0x2000 is the center corresponding to the normal pitch of the note # (no pitch change)." so value=0 should send 0x2000 value = value + 0x2000 lsb = value & 0x7F # keep least 7 bits msb = value >> 7 self.write_short(0xE0 + channel, lsb, msb) # MIDI commands # # 0x80 Note Off (note_off) # 0x90 Note On (note_on) # 0xA0 Aftertouch # 0xB0 Continuous controller # 0xC0 Patch change (set_instrument?) # 0xD0 Channel Pressure # 0xE0 Pitch bend # 0xF0 (non-musical commands) def time(): """returns the current time in ms of the PortMidi timer pygame.midi.time(): return time The time is reset to 0, when the module is inited. """ _check_init() return _pypm.Time() def midis2events(midis, device_id): """converts midi events to pygame events pygame.midi.midis2events(midis, device_id): return [Event, ...] Takes a sequence of midi events and returns list of pygame events. """ evs = [] for midi in midis: ((status, data1, data2, data3), timestamp) = midi event = pygame.event.Event( MIDIIN, status=status, data1=data1, data2=data2, data3=data3, timestamp=timestamp, vice_id=device_id, ) evs.append(event) return evs class MidiException(Exception): """exception that pygame.midi functions and classes can raise MidiException(errno) """ def __init__(self, value): super().__init__(value) self.parameter = value def __str__(self): return repr(self.parameter) def frequency_to_midi(frequency): """converts a frequency into a MIDI note. Rounds to the closest midi note. ::Examples:: >>> frequency_to_midi(27.5) 21 >>> frequency_to_midi(36.7) 26 >>> frequency_to_midi(4186.0) 108 """ return int(round(69 + (12 * math.log(frequency / 440.0)) / math.log(2))) def midi_to_frequency(midi_note): """Converts a midi note to a frequency. ::Examples:: >>> midi_to_frequency(21) 27.5 >>> midi_to_frequency(26) 36.7 >>> midi_to_frequency(108) 4186.0 """ return round(440.0 * 2 ** ((midi_note - 69) * (1.0 / 12.0)), 1) def midi_to_ansi_note(midi_note): """returns the Ansi Note name for a midi number. ::Examples:: >>> midi_to_ansi_note(21) 'A0' >>> midi_to_ansi_note(102) 'F#7' >>> midi_to_ansi_note(108) 'C8' """ notes = ["A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#"] num_notes = 12 note_name = notes[int((midi_note - 21) % num_notes)] note_number = (midi_note - 12) // num_notes return f"{note_name}{note_number}" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/pkgdata.py0000644000175100001770000000456514676242340015715 0ustar00runnerdocker""" pkgdata is a simple, extensible way for a package to acquire data file resources. The getResource function is equivalent to the standard idioms, such as the following minimal implementation: import sys, os def getResource(identifier, pkgname=__name__): pkgpath = os.path.dirname(sys.modules[pkgname].__file__) path = os.path.join(pkgpath, identifier) return file(os.path.normpath(path), mode='rb') When a __loader__ is present on the module given by __name__, it will defer getResource to its get_data implementation and return it as a file-like object (such as StringIO). """ __all__ = ["getResource"] import sys import os try: from pkg_resources import resource_stream, resource_exists except ImportError: def resource_exists(_package_or_requirement, _resource_name): """ A stub for when we fail to import this function. :return: Always returns False """ return False def resource_stream(_package_of_requirement, _resource_name): """ A stub for when we fail to import this function. Always raises a NotImplementedError when called. """ raise NotImplementedError def getResource(identifier, pkgname=__name__): """ Acquire a readable object for a given package name and identifier. An IOError will be raised if the resource can not be found. For example: mydata = getResource('mypkgdata.jpg').read() Note that the package name must be fully qualified, if given, such that it would be found in sys.modules. In some cases, getResource will return a real file object. In that case, it may be useful to use its name attribute to get the path rather than use it as a file-like object. For example, you may be handing data off to a C API. """ # When pyinstaller (or similar tools) are used, resource_exists may raise # NotImplemented error try: if resource_exists(pkgname, identifier): return resource_stream(pkgname, identifier) except NotImplementedError: pass mod = sys.modules[pkgname] path_to_file = getattr(mod, "__file__", None) if path_to_file is None: raise OSError(f"{repr(mod)} has no __file__!") path = os.path.join(os.path.dirname(path_to_file), identifier) # pylint: disable=consider-using-with return open(os.path.normpath(path), "rb") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.018112 pygame-2.6.1/src_py/pygame.ico0000644000175100001770000043415414676242340015707 0ustar00runnerdocker 00h >(& 00N "hf) 6. (00 %,   |* h4(0`3333333;s3333;33;0s33;3s3;;7s3337s3xww33'wvfxpws7wwwfwx033xwwswfxpxs3xwwxwgpwgxwvwxwwwvwxpxyxwwxpxpxqwwwwxgwwwxwpwwxpxp330wwxxx;7wwxww32xpww3w;03p33x;s;7sp3;p ;p;;0{33p;;7;p;3;7{7w337w;w337{{8s?0;?p{8?p88p;{{;7;?{7;p{;7s;;7ws7;3p;w;pwp???????????>( @33333;033333333wwp;wwwwxs37wwwpx7xwqwwwwxwxqwwpwwwwwwwwwww;3wxsww30;0p;03;3;;33w;;3x3337s0?;0;?;0;?;??3󻳳w; 7;03;30?(  w p p  p 0 0 ;  c(0`  !&&%"!0601#'#(1(34)%<55719A)9E9UV9Z9D9JPG:R^qk::Pg"G:::lvwsGB:::`poR]G^HHurY ;avuRYD; 8Gvvt bvuYYusQZ^  n _BBBB P RGR xBBEEPQ Y]9 'zz1 =HHFEYRR yĶ'?EFE>>y2RY P-ċ;&^;y O |1$Q\ûyı'Y+ ĿĿyēLJøĽ10½Ͷym,»2(fiɂSĶ!'Ė3-‘N7ĜjĀ,ĶMKįN2@ıᨸU*( @   01!"!!,!)(!)*))0)12)1411E9RS9RY9ZY9IRMZMZMRQZUZ9QJ![ZUcYc]k]k]ccsesk{iw)ac!ek9ek)is1isBQBJUBJQJRYBZ[BBQRJYRRURRYRZYZc]Bk]BRaZcaBcbJkeJ{mJceRkiRceZkiZsmZc]{BmsZqsZy{kiccqksqc{ucciscqssussyss}{yc{{{{s{{{(14mqy}ZuZ}ZacesqkmkuBIJQ)!199&3&9BVJTBRk{iuJRksZFkws{!!R!!!!!)!!))5FVcsƾýõŽǽqqqf !wGqfWprqoXq!Y%N:+D|e&#?,E`\62lA6,9TS6=M7F]-ZRb I H7Uc.Bda20 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NS.objectsV$classTname_assetcatalog-referenceTicon  !"Z$classnameX$classes\NSDictionary!#XNSObject$)27ILQS[ahp{$././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/pygame_icon_mac.bmp0000644000175100001770000100021214676242340017524 0ustar00runnerdockerBM| ==BGRs(` @33ff&@ff < $\2                                                                                                                                 !"##$$%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%$$#"!     !#%'(*+,-.//00111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222111100//.-,+*)'%#!    !$'*,.024567899:; > A ))C //E 55G ::H ;;I ??J ??J >>J ??J CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCK CCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCKCCK KKDAA@@@??>>>>=====<<<<<<;;;;::998765421/-*(%"  "&)-02579&&&B]]]Sg{)))DP ZiDDD𤤤𬬬𴴴𼼼ڲФ“kgggW222E98530-*&"   $)-147?ttt\ԩDDD+2 ٰc...D851.*%     %+/37HHHK{۳``` vvvή^^^S840+&!   %+05?u||| ew===DZ;;;F61,&    $*05HHHJŔ o  ѣgggT61+%  !(.4FFFH̝Ud x n duZiP]EQGSQ_\k fw q { mmmحdddS5/)"  $+1:111?I evHT*1 >>5? fxIU+3"+3:DHUVfewspbsRaDP5>!Q_ ⧧w5.'    (/:ϞFFF.6 n5?%+N[wQ_# KX %,cccݳ===D0)!  !)1jjjRNNN&- MZ HUu   GT bsz,,,ߍc2*"  !*2oWWW$ s,3-5} (-----------------,!P^JW3+#  !*2___ BM[k(--------------------------&-(/aaaџ3+#   )2˕ggg m y&-------------------------------7A&,w000ܮ3+"  (1Ϛppp ;E=H (----------------------------------%FP>H߲2*! '0ʓwww  %-------------------------------------)6>fx#bbbܭ1(  %. &,-5#---------------------------------------$ n333ӝ/&  ",i +3&,$-----------------------------------------hz -# )jjjK 3<%------------------------------------------- aaa`*   % 1  ew--------------------------------------------pdu444DDD>'  !+Е } '--------------------------------------------+  fffiiijjjkkkrrr-#  'X { Sa6? ---------------------------------------------- XdxO\&,111NNNmmmp)  "- z  ----------------------------------------------O\**)HIHMNLRSQVWUZ\Z_a_UVT121 ---ooo;;;9$  (~ w bsEQ,---------------------------------------------- o4<BCBproijh*+* LLLԙ) ";;;7 v 9C------------------------------------------Y---)Sav..-VWU :::rrrI#  '͌ t  ---------------------------------------------(LY6?KLKſ&'& iiiި(   @@@6 r {*2-----------------------------------------9---%mt 454uqlWc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FniT~mpro+++uuuH" $ q lJX--------------------------------------------6? xzwlgRc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FkfP9:9kkkٜ&  ) o bsXh ----------------------------------------g--- U`%454{faJc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]F}zg bbbFFF6  !\ m Yhfx*--------------------------------------Gk--*STS|c]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FsſYYYv" $~~~ k~ Zjbs-----------------------------------------Z[YsnZc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FjeOPPP&  <<<1ppp %'-"(#%,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">?>MNMiki#'ly$---------------------------------------------* =E$$$-* c]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FDED,,,!     3, '" " JKJhjghjh -2v&---------------------------------------------------)'''c]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fd^GNOM !   ZZZjlj&'&-'-'*$'!# NNNbdbLLLNONegdEM#--------------------------------------------------------+u a[Dc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]Fc]FpkWXYX!   GHG()(777;<;qtqS]%------------------------------------------------------------)\g ID3c]Fc]Fc]Fc]Fc]Fc]Fc]Fw^`^{{{!   IIIefd_a__a_kmkxzwIJI>>>//. `l(+,--------------------------------------------------------------& CKRM:c]Fc]Fc]Fup\665qqq!   ###nomIIIacalnk  m{))")----------------------------------------------------------------- (&zwfIII!   888qsp|||121454 7>') --------------------------------------------------------------------#*+*RTRGSyyy!   [][rrr , (----------------------------------------------------------------------'$(¾nom %$*===!   ZZZ;<;yzyQRQ%%%hhh### ;B'!,------------------------------------------------------------------------* :A Vdqqq!   ***uwthjg]]]  ,---------------------------------------------------------------------------,NXFkx) .4Xh"555!   YYY  MW*)-----------------------------------------------------------------------------------& ++iv{ UUU!   ___rtr"#"KT* "------------------------------------------------------------------------------------- CK,*& ?G.6sss!   hhh *+*CDC* -------------------------------------------------------------------------------------- 5;,&'* COct!   000ab`tvs"%--------------------------------------------------------------------------------------,*&&&')x N[2;###!  !bbbkmk gt'---------------------------------------------------------,,,,,-------------------------- AI!'&&&&')iv 555!  !777@A@+,+).+ (-----------------------------------------------------,*)''''''')(----------------------qv)&&&&&&''\g...!  !sssMNLrsqpsp% ----------------------------------------------------+('''''''''''*--------------------Q[*&&&&&&&&'&^i UUU!  !jjj fw9C676676bn,--------------------------------------------------,(''''''''''''! ,-------------------!HQ+&&&&&&&&&&')*/ RRR!  !QQQ y^nDO)0'%-------------------------------------------------,''''''''''''''-------------------# @H+&&&&&&&&&&&&'+#IR!  !777,3 fxKT- -------------------,,,++,------------------------,('''''''''''''-------------------# ;B+&&&&&&&&&&&&&&(+% 7>!  !JW '---------------,*)'''''''(---------------------+''''''''''''#-------------------S],&&&&&&&&&&&&&&&&),PZ!  ! hz ,4+-------------+(''''''''''' "-------------------)''''''''''$+-------------------}p~,&&&&&&&&&&&&&&&&&(- 06\\\!  !rrr 3< 9@-------------)'''''''''''''$------------------%#''''$ %--------------------Xc+&&&&&&&&&&&&&&@&)$!  !UUU 2;sbn------------(''''''''''''' ------------------, %---------------------')&&&&&&&&&&&&&&Q&,U_\\\!  !77719 09%lz~(----------('''''''''''''-------------------( ,---------------------%#'-(&&&&&&&&&&&&&&}A)#!  !O] /7$ Q\%---------,''''''''''''%---------------------" ,-----------------------p~dp,&&&&&&&&&&&&&&&,'-&+!  ! m )0"S^&---------+''''''''''%"------------------------)  !"*--------------------------+%*&&&&&&&&&&&&&&&&kB+vUUU!  !qqq #! ]h(---------*$'&%#----------------------------------------------------.M-- =D-'&&&&&&&&&&&&&&&&&(!///!  !RRR } ,1fs*---------------------------------------------------------------x-* *&&&&&&&&&&&&&&&&&&,B+ !  !3337@ t  =Dco------------,-----------------------------------------------------2p-S] =D-'&&&&&&&&&&&&&&&&&&&G|+',!  !4=P[$ 39-(-----------*  ,-------------------------------------------------------/()&&&&&&&&&&&&&&&&&&&&&)Ydjjj!  !o} ,,---------------'"$%&,----------------------------------------------------------=G(,&&&&&&&&&&&&&&&&&&&&&&G(DDD!  !TTT - =D(------------------------------------------------------------------------------Be- =DS]-)&&&&&&&&&&&&&&&&&&&&&&&&%$$$!  !ZZZ &&"""!  !+--)$)---------------------------------------------------------------------------,Ze !,'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&$$$!  !"&$---EN 6=,--------------------------------------------------------------------------,MW,'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&$$$!  !UUUp---*!%Yd, ------------------------------------------------------------------------$).NX%'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&!000!  !$$$ ----& HQ*!---------------------------------------------------------------------,n|///!!!n|&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'LLL!  ! ,----$ /5)$-------------------------------------------------------------------$&+ "&%&&&&&&&&&&&&&&&&&&&&&&&&&&&(Ydiii!  ! -----((- &!&----------------------------------------------------------------,jw333SSS#'&&&&&&&&&&&&&&&&&&&&&&&&&( 28!  ! :A ,-----+ >F "' "--------------------------------------------------------------$(ttt (&&&&&&&&&&&&&&&&&&&&&&&&) !  ! DL ------,Yd[f),---------------------------------------------------------,&+777!'&&&&&&&&&&&&&&&&&&&&&&&'!  ! uuu!  !--- 4:999~~~bbbt------------"MV 06-'&&&&&&&&&&&(!  !]]] @H--(+++!!!DDD ,-----------) 6=,(&&&&&&&&&&&!222!  ! --rrrUUU]]]------------#GGGBBBLLL%)&&&&&&&&&&&p\\\!  ![[[ ;C--Wb???jjjGP----------- - ~~~*&&&&&&&&&&' -2!  !-- *----------#-%%%am+&&&&&&&&&&( !   sss-'999!!!KKKppp----------(- MV,&&&&&&&&&&#,,,!   777Zf-ppp555 =E----------,- BJ,&&&&&&&&&&QQQ!   -YYY eee------------!% 6=,&&&&&&&&&'  $,&&&&&&&&&%!!!!   '- CKkx-----------U`+&&&&&&&&&FFF   PPP -3'- 17 =E----------*+0+&&&&&&&&&Q\jjj   %- 8?"----------!#WWW AI+&&&&&&&&(#'   {{{$- DL---------- +$$$Xc*&&&&&&&&(    BBB =E"-NX ----------% -&+o})&&&&&&&&$(((    -Ze(((,---------+-Va(&&&&&&&&GGG   nnn-eq444+---------- % TTTTTT"'&&&&&&&'Vaggg   000-yAAA(----------, +&&&&&&&&)+0   ||| -!ccc444*----------,`l ?G+&&&&&&&&*   ))) -*000-----------)#@@@z*&&&&&&&&$###  sss $+-"------------ -!%FFF$(&&&&&&&'{III  !-HQ 5<------------%EEE +&&&&&&&&) ?Guuu  hhh 06-vLU------------,',jjj*&&&&&&&&*    -$<<<iv------------'* 111  +'&&&&&&&&"&&&  ^^^ DM*-$(aaa -------------- 9@fs+&&&&&&&&(p~RRR  -v+-------------#$ ((&&&&&&&&*',  VVV Va-'((( 4:--------------,###???v+&&&&&&&&&#  "- 5<n|--------------$-R\MMM 17+&&&&&&&&&(XcWWW ݋RRR cq->>><<<"--------------,&+(-hhh&'&&&&&'&&&* z )- ,1*/------;M-------- ,'PPP (&&&&&\&&(444 eMMM p-!+++XXX----:--------,(&+::: ~*&&&&&/&&, /5xxxف P (- ?G,------------(,* 8?+&&&&&&&)"j  ;IIIp-% aaav----QO---------,,Wb;;;)))*&&&&&&EU',',cccR  ]]]($-w,,,*-------------- +-# 06AAABBB DL&)&&&&&&-'+ : GGG MV --ENZZZ!-----pg----------- )-- >>>BBBFFFGGG#' ,'&&&&&&.*% TTT% -* $UUUam--------------------+---%w 5< :Av#+)&&&&&&&/7) KKK ބmmm %-% vvviii!%+---------------------)#  %----+)(('+-*(&&&&&&&&((+ 5<///  W...ky+-$[[[```&--------------,&eq 8?"&  39MW +----,+)'&&&&&&&&&&&1@&( 28s  / *-' $@@@VVV"'-------------%eq  R\ !--)&&&&&&&&&&&&&&&&&&&%E  [[[)-) 17uuu#'(------------% 5<666SSSqqqyyy```---n{+&&&&&&&&&&&&&&&&&&&444NNN  333 ;B&-,~ 666[f*------------DDD}}}WWW[g &&&&&&&&&&&&&&&&& "&RRR  Or--)]ijjj>>> 5<$------------( =EEEE===JS&&&&&&&&&&&&&&$+0999k  NNN (--&x 6=U`-------------rrrJJJ ^k)'&&&&&&&&$r,2666/ ggg ----*~{xu&---------------v777XXX +0HQLUOYhvphuNY29$###PPP~~~ HDDD  &-----------------------+OY___^^^222333LLLuuuc  DDD +--------------------( /5 zzz|||{{{|||~~~aaa  jOOO ------------------  YYY\\\ '--------------% ;B555.  uhhh cr#----------, =Eqqq  UUUwww )------+ dp SSS욚+  bAAA dq %--)"bn 28%%%kkk  888 -2MVOYEN MaaaDP"L{U)666 -CZpt^G1JJJ                                                                                         ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/sndarray.py0000644000175100001770000000776314676242340016130 0ustar00runnerdocker## pygame - Python Game Library ## Copyright (C) 2008 Marcus von Appen ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Marcus von Appen ## mva@sysfault.org """pygame module for accessing sound sample data Functions to convert between NumPy arrays and Sound objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, surfarray becomes a MissingModule object. Sound data is made of thousands of samples per second, and each sample is the amplitude of the wave at a particular moment in time. For example, in 22-kHz format, element number 5 of the array is the amplitude of the wave after 5/22000 seconds. Each sample is an 8-bit or 16-bit integer, depending on the data format. A stereo sound file has two values per sample, while a mono sound file only has one. Sounds with 16-bit data will be treated as unsigned integers, if the sound sample type requests this. """ from pygame import mixer import numpy import warnings __all__ = [ "array", "samples", "make_sound", "use_arraytype", "get_arraytype", "get_arraytypes", ] def array(sound): """pygame.sndarray.array(Sound): return array Copy Sound samples into an array. Creates a new array for the sound data and copies the samples. The array will always be in the format returned from pygame.mixer.get_init(). """ return numpy.array(sound, copy=True) def samples(sound): """pygame.sndarray.samples(Sound): return array Reference Sound samples into an array. Creates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from pygame.mixer.get_init(). """ return numpy.array(sound, copy=False) def make_sound(array): """pygame.sndarray.make_sound(array): return Sound Convert an array into a Sound object. Create a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format. """ return mixer.Sound(array=array) def use_arraytype(arraytype): """pygame.sndarray.use_arraytype(arraytype): return None DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) arraytype = arraytype.lower() if arraytype != "numpy": raise ValueError("invalid array type") def get_arraytype(): """pygame.sndarray.get_arraytype(): return str DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) return "numpy" def get_arraytypes(): """pygame.sndarray.get_arraytypes(): return tuple DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) return ("numpy",) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/sprite.py0000644000175100001770000017266314676242340015615 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2003, 2007 Pete Shinners # (C) 2004 Joe Wreschnig # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """pygame module with basic game object classes This module contains several simple classes to be used within games. There are the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using Pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games. The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain. The basic Sprite class can draw the Sprites it contains to a Surface. The Group.draw() method requires that each Sprite have a Surface.image attribute and a Surface.rect. The Group.clear() method requires these same attributes and can be used to erase all the Sprites with background. There are also more advanced Groups: pygame.sprite.RenderUpdates() and pygame.sprite.OrderedUpdates(). Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a Surface.rect attribute assigned. The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game. Sprites and Groups manage their relationships with the add() and remove() methods. These methods can accept a single or multiple group arguments for membership. The default initializers for these classes also take a single group or list of groups as arguments for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group. While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you create a new Sprite or Group class. Sprites are not thread safe, so lock them yourself if using threads. """ # TODO: a group that holds only the 'n' most recent elements. # sort of like the GroupSingle class, but holding more # than one sprite # # drawing groups that can 'automatically' store the area # underneath so they can "clear" without needing a background # function. obviously a little slower than normal, but nice # to use in many situations. (also remember it must "clear" # in the reverse order that it draws :]) # # the drawing groups should also be able to take a background # function, instead of just a background surface. the function # would take a surface and a rectangle on that surface to erase. # # perhaps more types of collision functions? the current two # should handle just about every need, but perhaps more optimized # specific ones that aren't quite so general but fit into common # specialized cases. from typing import Generic, TypeVar from weakref import WeakSet from warnings import warn import pygame from pygame.rect import Rect from pygame.time import get_ticks from pygame.mask import from_surface class Sprite: """simple base class for visible game objects pygame.sprite.Sprite(*groups): return Sprite The base class for visible game objects. Derived classes will want to override the Sprite.update() method and assign Sprite.image and Sprite.rect attributes. The initializer can accept any number of Group instances that the Sprite will become a member of. When subclassing the Sprite class, be sure to call the base initializer before adding the Sprite to Groups. """ def __init__(self, *groups): self.__g = set() # The groups the sprite is in if groups: self.add(*groups) def add(self, *groups): """add the sprite to groups Sprite.add(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, "_spritegroup"): if not has(group): group.add_internal(self) self.add_internal(group) else: self.add(*group) def remove(self, *groups): """remove the sprite from groups Sprite.remove(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, "_spritegroup"): if has(group): group.remove_internal(self) self.remove_internal(group) else: self.remove(*group) def add_internal(self, group): """ For adding this sprite to a group internally. :param group: The group we are adding to. """ self.__g.add(group) def remove_internal(self, group): """ For removing this sprite from a group internally. :param group: The group we are removing from. """ self.__g.remove(group) def update(self, *args, **kwargs): """method to control sprite behavior Sprite.update(*args, **kwargs): The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by Group.update() with whatever arguments you give it. There is no need to use this method if not using the convenience method by the same name in the Group class. """ def kill(self): """remove the Sprite from all Groups Sprite.kill(): return None The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups. """ for group in self.__g: group.remove_internal(self) self.__g.clear() def groups(self): """list of Groups that contain this Sprite Sprite.groups(): return group_list Returns a list of all the Groups that contain this Sprite. """ return list(self.__g) def alive(self): """does the sprite belong to any groups Sprite.alive(): return bool Returns True when the Sprite belongs to one or more Groups. """ return bool(self.__g) def __repr__(self): return f"<{self.__class__.__name__} Sprite(in {len(self.__g)} groups)>" @property def layer(self): """ Dynamic, read only property for protected _layer attribute. This will get the _layer variable if it exists. If you try to get it before it is set it will raise an attribute error. Layer property can only be set before the sprite is added to a group, after that it is read only and a sprite's layer in a group should be set via the group's change_layer() method. :return: layer as an int, or raise AttributeError. """ return self._layer @layer.setter def layer(self, value): if not self.alive(): self._layer = value else: raise AttributeError( "Can't set layer directly after " "adding to group. Use " "group.change_layer(sprite, new_layer) " "instead." ) class WeakSprite(Sprite): """A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically. """ def __init__(self, *groups): super().__init__(*groups) self.__dict__["_Sprite__g"] = WeakSet(self._Sprite__g) class DirtySprite(Sprite): """a more featureful subclass of Sprite with more attributes pygame.sprite.DirtySprite(*groups): return DirtySprite Extra DirtySprite attributes with their default values: dirty = 1 If set to 1, it is repainted and then set to 0 again. If set to 2, it is always dirty (repainted each frame; flag is not reset). If set to 0, it is not dirty and therefore not repainted again. blendmode = 0 It's the special_flags argument of Surface.blit; see the blendmodes in the Surface.blit documentation source_rect = None This is the source rect to use. Remember that it is relative to the top left corner (0, 0) of self.image. visible = 1 Normally this is 1. If set to 0, it will not be repainted. (If you change visible to 1, you must set dirty to 1 for it to be erased from the screen.) _layer = 0 0 is the default value but this is able to be set differently when subclassing. """ def __init__(self, *groups): self.dirty = 1 # referred to as special_flags in the documentation of Surface.blit self.blendmode = 0 self._visible = 1 # Default 0 unless initialized differently. self._layer = getattr(self, "_layer", 0) self.source_rect = None Sprite.__init__(self, *groups) def _set_visible(self, val): """set the visible value (0 or 1) and makes the sprite dirty""" self._visible = val if self.dirty < 2: self.dirty = 1 def _get_visible(self): """return the visible value of that sprite""" return self._visible @property def visible(self): """ You can make this sprite disappear without removing it from the group assign 0 for invisible and 1 for visible """ return self._get_visible() @visible.setter def visible(self, value): self._set_visible(value) @property def layer(self): """ Layer property can only be set before the sprite is added to a group, after that it is read only and a sprite's layer in a group should be set via the group's change_layer() method. Overwrites dynamic property from sprite class for speed. """ return self._layer @layer.setter def layer(self, value): if not self.alive(): self._layer = value else: raise AttributeError( "Can't set layer directly after " "adding to group. Use " "group.change_layer(sprite, new_layer) " "instead." ) def __repr__(self): return ( f"<{self.__class__.__name__} DirtySprite(in {len(self.groups())} groups)>" ) class WeakDirtySprite(WeakSprite, DirtySprite): """A subclass of WeakSprite and DirtySprite that combines the benefits of both classes. """ class AbstractGroup(Generic[TypeVar("T")]): """base class for containers of sprites AbstractGroup does everything needed to behave as a normal group. You can easily subclass a new group class from this or the other groups below if you want to add more features. Any AbstractGroup-derived sprite groups act like sequences and support iteration, len, and so on. """ # dummy val to identify sprite groups, and avoid infinite recursion _spritegroup = True def __init__(self): self.spritedict = {} self.lostsprites = [] def sprites(self): """get a list of sprites in the group Group.sprites(): return list Returns an object that can be looped over with a 'for' loop. (For now, it is always a list, but this could change in a future version of pygame.) Alternatively, you can get the same information by iterating directly over the sprite group, e.g. 'for sprite in group'. """ return list(self.spritedict) def add_internal( self, sprite, layer=None, # noqa pylint: disable=unused-argument; supporting legacy derived classes that override in non-pythonic way ): """ For adding a sprite to this group internally. :param sprite: The sprite we are adding. :param layer: the layer to add to, if the group type supports layers """ self.spritedict[sprite] = None def remove_internal(self, sprite): """ For removing a sprite from this group internally. :param sprite: The sprite we are removing. """ lost_rect = self.spritedict[sprite] if lost_rect: self.lostsprites.append(lost_rect) del self.spritedict[sprite] def has_internal(self, sprite): """ For checking if a sprite is in this group internally. :param sprite: The sprite we are checking. """ return sprite in self.spritedict def copy(self): """copy a group with all the same sprites Group.copy(): return Group Returns a copy of the group that is an instance of the same class and has the same sprites in it. """ return self.__class__( # noqa pylint: disable=too-many-function-args self.sprites() # Needed because copy() won't work on AbstractGroup ) def __iter__(self): return iter(self.sprites()) def __contains__(self, sprite): return self.has(sprite) def add(self, *sprites): """add sprite(s) to group Group.add(sprite, list, group, ...): return None Adds a sprite or sequence of sprites to a group. """ for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite) sprite.add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, "_spritegroup"): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite) sprite.add_internal(self) def remove(self, *sprites): """remove sprite(s) from group Group.remove(sprite, list, or group, ...): return None Removes a sprite or sequence of sprites from a group. """ # This function behaves essentially the same as Group.add. It first # tries to handle each argument as an instance of the Sprite class. If # that fails, then it tries to handle the argument as an iterable # object. If that fails, then it tries to handle the argument as an # old-style sprite group. Lastly, if that fails, it assumes that the # normal Sprite methods should be used. for sprite in sprites: if isinstance(sprite, Sprite): if self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) else: try: self.remove(*sprite) except (TypeError, AttributeError): if hasattr(sprite, "_spritegroup"): for spr in sprite.sprites(): if self.has_internal(spr): self.remove_internal(spr) spr.remove_internal(self) elif self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) def has(self, *sprites): """ask if group has a sprite or sprites Group.has(sprite or group, ...): return bool Returns True if the given sprite or sprites are contained in the group. Alternatively, you can get the same information using the 'in' operator, e.g. 'sprite in group', 'subgroup in group'. """ if not sprites: return False # return False if no sprites passed in for sprite in sprites: if isinstance(sprite, Sprite): # Check for Sprite instance's membership in this group if not self.has_internal(sprite): return False else: try: if not self.has(*sprite): return False except (TypeError, AttributeError): if hasattr(sprite, "_spritegroup"): for spr in sprite.sprites(): if not self.has_internal(spr): return False else: if not self.has_internal(sprite): return False return True def update(self, *args, **kwargs): """call the update method of every member sprite Group.update(*args, **kwargs): return None Calls the update method of every member sprite. All arguments that were passed to this method are passed to the Sprite update function. """ for sprite in self.sprites(): sprite.update(*args, **kwargs) def draw( self, surface, bgsurf=None, special_flags=0 ): # noqa pylint: disable=unused-argument; bgsurf arg used in LayeredDirty """draw all sprites onto the surface Group.draw(surface, special_flags=0): return Rect_list Draws all of the member sprites onto the given surface. """ sprites = self.sprites() if hasattr(surface, "blits"): self.spritedict.update( zip( sprites, surface.blits( (spr.image, spr.rect, None, special_flags) for spr in sprites ), ) ) else: for spr in sprites: self.spritedict[spr] = surface.blit( spr.image, spr.rect, None, special_flags ) self.lostsprites = [] dirty = self.lostsprites return dirty def clear(self, surface, bgd): """erase the previous position of all sprites Group.clear(surface, bgd): return None Clears the area under every drawn sprite in the group. The bgd argument should be Surface which is the same dimensions as the screen surface. The bgd could also be a function which accepts the given surface and the area to be cleared as arguments. """ if callable(bgd): for lost_clear_rect in self.lostsprites: bgd(surface, lost_clear_rect) for clear_rect in self.spritedict.values(): if clear_rect: bgd(surface, clear_rect) else: surface_blit = surface.blit for lost_clear_rect in self.lostsprites: surface_blit(bgd, lost_clear_rect, lost_clear_rect) for clear_rect in self.spritedict.values(): if clear_rect: surface_blit(bgd, clear_rect, clear_rect) def empty(self): """remove all sprites Group.empty(): return None Removes all the sprites from the group. """ for sprite in self.sprites(): self.remove_internal(sprite) sprite.remove_internal(self) def __bool__(self): return bool(self.sprites()) def __len__(self): """return number of sprites in group Group.len(group): return int Returns the number of sprites contained in the group. """ return len(self.sprites()) def __repr__(self): return f"<{self.__class__.__name__}({len(self)} sprites)>" class Group(AbstractGroup): """container class for many Sprites pygame.sprite.Group(*sprites): return Group A simple container for Sprite objects. This class can be subclassed to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations: in test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites The Sprites in the Group are not ordered, so the Sprites are drawn and iterated over in no particular order. """ def __init__(self, *sprites): AbstractGroup.__init__(self) self.add(*sprites) RenderPlain = Group RenderClear = Group class RenderUpdates(Group): """Group class that tracks dirty updates pygame.sprite.RenderUpdates(*sprites): return RenderUpdates This class is derived from pygame.sprite.Group(). It has an enhanced draw method that tracks the changed areas of the screen. """ def draw(self, surface, bgsurf=None, special_flags=0): surface_blit = surface.blit dirty = self.lostsprites self.lostsprites = [] dirty_append = dirty.append for sprite in self.sprites(): old_rect = self.spritedict[sprite] new_rect = surface_blit(sprite.image, sprite.rect, None, special_flags) if old_rect: if new_rect.colliderect(old_rect): dirty_append(new_rect.union(old_rect)) else: dirty_append(new_rect) dirty_append(old_rect) else: dirty_append(new_rect) self.spritedict[sprite] = new_rect return dirty class OrderedUpdates(RenderUpdates): """RenderUpdates class that draws Sprites in order of addition pygame.sprite.OrderedUpdates(*sprites): return OrderedUpdates This class derives from pygame.sprite.RenderUpdates(). It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups. """ def __init__(self, *sprites): self._spritelist = [] RenderUpdates.__init__(self, *sprites) def sprites(self): return self._spritelist.copy() def add_internal(self, sprite, layer=None): RenderUpdates.add_internal(self, sprite) self._spritelist.append(sprite) def remove_internal(self, sprite): RenderUpdates.remove_internal(self, sprite) self._spritelist.remove(sprite) class LayeredUpdates(AbstractGroup): """LayeredUpdates Group handles layers, which are drawn like OrderedUpdates pygame.sprite.LayeredUpdates(*sprites, **kwargs): return LayeredUpdates This group is fully compatible with pygame.sprite.Sprite. New in pygame 1.8.0 """ _init_rect = Rect(0, 0, 0, 0) def __init__(self, *sprites, **kwargs): """initialize an instance of LayeredUpdates with the given attributes You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0. If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ self._spritelayers = {} self._spritelist = [] AbstractGroup.__init__(self) self._default_layer = kwargs.get("default_layer", 0) self.add(*sprites, **kwargs) def add_internal(self, sprite, layer=None): """Do not use this method directly. It is used by the group to add a sprite internally. """ self.spritedict[sprite] = self._init_rect if layer is None: try: layer = sprite.layer except AttributeError: layer = self._default_layer setattr(sprite, "_layer", layer) elif hasattr(sprite, "_layer"): setattr(sprite, "_layer", layer) sprites = self._spritelist # speedup sprites_layers = self._spritelayers sprites_layers[sprite] = layer # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= layer: mid += 1 sprites.insert(mid, sprite) def add(self, *sprites, **kwargs): """add a sprite or sequence of sprites to a group LayeredUpdates.add(*sprites, **kwargs): return None If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ if not sprites: return layer = kwargs["layer"] if "layer" in kwargs else None for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite, layer) sprite.add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite, **kwargs) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, "_spritegroup"): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr, layer) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite, layer) sprite.add_internal(self) def remove_internal(self, sprite): """Do not use this method directly. The group uses it to add a sprite. """ self._spritelist.remove(sprite) # these dirty rects are suboptimal for one frame old_rect = self.spritedict[sprite] if old_rect is not self._init_rect: self.lostsprites.append(old_rect) # dirty rect if hasattr(sprite, "rect"): self.lostsprites.append(sprite.rect) # dirty rect del self.spritedict[sprite] del self._spritelayers[sprite] def sprites(self): """return a ordered list of sprites (first back, last top). LayeredUpdates.sprites(): return sprites """ return self._spritelist.copy() def draw(self, surface, bgsurf=None, special_flags=0): """draw all sprites in the right order onto the passed surface LayeredUpdates.draw(surface, special_flags=0): return Rect_list """ spritedict = self.spritedict surface_blit = surface.blit dirty = self.lostsprites self.lostsprites = [] dirty_append = dirty.append init_rect = self._init_rect for spr in self.sprites(): rec = spritedict[spr] newrect = surface_blit(spr.image, spr.rect, None, special_flags) if rec is init_rect: dirty_append(newrect) else: if newrect.colliderect(rec): dirty_append(newrect.union(rec)) else: dirty_append(newrect) dirty_append(rec) spritedict[spr] = newrect return dirty def get_sprites_at(self, pos): """return a list with all sprites at that position LayeredUpdates.get_sprites_at(pos): return colliding_sprites Bottom sprites are listed first; the top ones are listed last. """ _sprites = self._spritelist rect = Rect(pos, (1, 1)) colliding_idx = rect.collidelistall(_sprites) return [_sprites[i] for i in colliding_idx] def get_sprite(self, idx): """return the sprite at the index idx from the groups sprites LayeredUpdates.get_sprite(idx): return sprite Raises IndexOutOfBounds if the idx is not within range. """ return self._spritelist[idx] def remove_sprites_of_layer(self, layer_nr): """remove all sprites from a layer and return them as a list LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites """ sprites = self.get_sprites_from_layer(layer_nr) self.remove(*sprites) return sprites # layer methods def layers(self): """return a list of unique defined layers defined. LayeredUpdates.layers(): return layers """ return sorted(set(self._spritelayers.values())) def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ sprites = self._spritelist # speedup sprites_layers = self._spritelayers # speedup sprites.remove(sprite) sprites_layers.pop(sprite) # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= new_layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= new_layer: mid += 1 sprites.insert(mid, sprite) if hasattr(sprite, "_layer"): setattr(sprite, "_layer", new_layer) # add layer info sprites_layers[sprite] = new_layer def get_layer_of_sprite(self, sprite): """return the layer that sprite is currently in If the sprite is not found, then it will return the default layer. """ return self._spritelayers.get(sprite, self._default_layer) def get_top_layer(self): """return the top layer LayeredUpdates.get_top_layer(): return layer """ return self._spritelayers[self._spritelist[-1]] def get_bottom_layer(self): """return the bottom layer LayeredUpdates.get_bottom_layer(): return layer """ return self._spritelayers[self._spritelist[0]] def move_to_front(self, sprite): """bring the sprite to front layer LayeredUpdates.move_to_front(sprite): return None Brings the sprite to front by changing the sprite layer to the top-most layer. The sprite is added at the end of the list of sprites in that top-most layer. """ self.change_layer(sprite, self.get_top_layer()) def move_to_back(self, sprite): """move the sprite to the bottom layer LayeredUpdates.move_to_back(sprite): return None Moves the sprite to the bottom layer by moving it to a new layer below the current bottom layer. """ self.change_layer(sprite, self.get_bottom_layer() - 1) def get_top_sprite(self): """return the topmost sprite LayeredUpdates.get_top_sprite(): return Sprite """ return self._spritelist[-1] def get_sprites_from_layer(self, layer): """return all sprites from a layer ordered as they where added LayeredUpdates.get_sprites_from_layer(layer): return sprites Returns all sprites from a layer. The sprites are ordered in the sequence that they where added. (The sprites are not removed from the layer. """ sprites = [] sprites_append = sprites.append sprite_layers = self._spritelayers for spr in self._spritelist: if sprite_layers[spr] == layer: sprites_append(spr) elif sprite_layers[spr] > layer: # break after because no other will # follow with same layer break return sprites def switch_layer(self, layer1_nr, layer2_nr): """switch the sprites from layer1_nr to layer2_nr LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None The layers number must exist. This method does not check for the existence of the given layers. """ sprites1 = self.remove_sprites_of_layer(layer1_nr) for spr in self.get_sprites_from_layer(layer2_nr): self.change_layer(spr, layer1_nr) self.add(layer=layer2_nr, *sprites1) class LayeredDirty(LayeredUpdates): """LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty This group requires pygame.sprite.DirtySprite or any sprite that has the following attributes: image, rect, dirty, visible, blendmode (see doc of DirtySprite). It uses the dirty flag technique and is therefore faster than pygame.sprite.RenderUpdates if you have many static sprites. It also switches automatically between dirty rect updating and full screen drawing, so you do no have to worry which would be faster. As with the pygame.sprite.Group, you can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 New in pygame 1.8.0 """ def __init__(self, *sprites, **kwargs): """initialize group. pygame.sprite.LayeredDirty(*sprites, **kwargs): return LayeredDirty You can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 """ LayeredUpdates.__init__(self, *sprites, **kwargs) self._clip = None self._use_update = False self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps self._bgd = None for key, val in kwargs.items(): if key in ["_use_update", "_time_threshold", "_default_layer"] and hasattr( self, key ): setattr(self, key, val) def add_internal(self, sprite, layer=None): """Do not use this method directly. It is used by the group to add a sprite internally. """ # check if all needed attributes are set if not hasattr(sprite, "dirty"): raise AttributeError() if not hasattr(sprite, "visible"): raise AttributeError() if not hasattr(sprite, "blendmode"): raise AttributeError() if not isinstance(sprite, DirtySprite): raise TypeError() if sprite.dirty == 0: # set it dirty if it is not sprite.dirty = 1 LayeredUpdates.add_internal(self, sprite, layer) def draw(self, surface, bgsurf=None, special_flags=None): """draw all sprites in the right order onto the given surface LayeredDirty.draw(surface, bgsurf=None, special_flags=None): return Rect_list You can pass the background too. If a self.bgd is already set to some value that is not None, then the bgsurf argument has no effect. Passing a value to special_flags will pass that value as the special_flags argument to pass to all Surface.blit calls, overriding the sprite.blendmode attribute """ # functions and classes assigned locally to speed up loops orig_clip = surface.get_clip() latest_clip = self._clip if latest_clip is None: latest_clip = orig_clip local_sprites = self._spritelist local_old_rect = self.spritedict local_update = self.lostsprites rect_type = Rect surf_blit_func = surface.blit if bgsurf is not None: self._bgd = bgsurf local_bgd = self._bgd surface.set_clip(latest_clip) # ------- # 0. decide whether to render with update or flip start_time = get_ticks() if self._use_update: # dirty rects mode # 1. find dirty area on screen and put the rects into # self.lostsprites still not happy with that part self._find_dirty_area( latest_clip, local_old_rect, rect_type, local_sprites, local_update, local_update.append, self._init_rect, ) # can it be done better? because that is an O(n**2) algorithm in # worst case # clear using background if local_bgd is not None: flags = 0 if special_flags is None else special_flags for rec in local_update: surf_blit_func(local_bgd, rec, rec, flags) # 2. draw self._draw_dirty_internal( local_old_rect, rect_type, local_sprites, surf_blit_func, local_update, special_flags, ) local_ret = list(local_update) else: # flip, full screen mode if local_bgd is not None: flags = 0 if special_flags is None else special_flags surf_blit_func(local_bgd, (0, 0), None, flags) for spr in local_sprites: if spr.visible: flags = spr.blendmode if special_flags is None else special_flags local_old_rect[spr] = surf_blit_func( spr.image, spr.rect, spr.source_rect, flags ) # return only the part of the screen changed local_ret = [rect_type(latest_clip)] # timing for switching modes # How may a good threshold be found? It depends on the hardware. end_time = get_ticks() if end_time - start_time > self._time_threshold: self._use_update = False else: self._use_update = True # empty dirty rects list local_update[:] = [] # ------- # restore original clip surface.set_clip(orig_clip) return local_ret @staticmethod def _draw_dirty_internal( _old_rect, _rect, _sprites, _surf_blit, _update, _special_flags ): for spr in _sprites: flags = spr.blendmode if _special_flags is None else _special_flags if spr.dirty < 1 and spr.visible: # sprite not dirty; blit only the intersecting part if spr.source_rect is not None: # For possible future speed up, source_rect's data # can be pre-fetched outside of this loop. _spr_rect = _rect(spr.rect.topleft, spr.source_rect.size) rect_offset_x = spr.source_rect[0] - _spr_rect[0] rect_offset_y = spr.source_rect[1] - _spr_rect[1] else: _spr_rect = spr.rect rect_offset_x = -_spr_rect[0] rect_offset_y = -_spr_rect[1] _spr_rect_clip = _spr_rect.clip for idx in _spr_rect.collidelistall(_update): # clip clip = _spr_rect_clip(_update[idx]) _surf_blit( spr.image, clip, ( clip[0] + rect_offset_x, clip[1] + rect_offset_y, clip[2], clip[3], ), flags, ) else: # dirty sprite if spr.visible: _old_rect[spr] = _surf_blit( spr.image, spr.rect, spr.source_rect, flags ) if spr.dirty == 1: spr.dirty = 0 @staticmethod def _find_dirty_area( _clip, _old_rect, _rect, _sprites, _update, _update_append, init_rect ): for spr in _sprites: if spr.dirty > 0: # chose the right rect if spr.source_rect: _union_rect = _rect(spr.rect.topleft, spr.source_rect.size) else: _union_rect = _rect(spr.rect) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while i > -1: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) if _old_rect[spr] is not init_rect: _union_rect = _rect(_old_rect[spr]) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while i > -1: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) def clear(self, surface, bgd): """use to set background Group.clear(surface, bgd): return None """ self._bgd = bgd def repaint_rect(self, screen_rect): """repaint the given area LayeredDirty.repaint_rect(screen_rect): return None screen_rect is in screen coordinates. """ if self._clip: self.lostsprites.append(screen_rect.clip(self._clip)) else: self.lostsprites.append(Rect(screen_rect)) def set_clip(self, screen_rect=None): """clip the area where to draw; pass None (default) to reset the clip LayeredDirty.set_clip(screen_rect=None): return None """ if screen_rect is None: self._clip = pygame.display.get_surface().get_rect() else: self._clip = screen_rect self._use_update = False def get_clip(self): """get the area where drawing will occur LayeredDirty.get_clip(): return Rect """ return self._clip def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ LayeredUpdates.change_layer(self, sprite, new_layer) if sprite.dirty == 0: sprite.dirty = 1 def set_timing_treshold(self, time_ms): """set the threshold in milliseconds set_timing_treshold(time_ms): return None Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. Raises TypeError if time_ms is not int or float. """ warn( "This function will be removed, use set_timing_threshold function instead", DeprecationWarning, ) self.set_timing_threshold(time_ms) def set_timing_threshold(self, time_ms): """set the threshold in milliseconds set_timing_threshold(time_ms): return None Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. Raises TypeError if time_ms is not int or float. """ if isinstance(time_ms, (int, float)): self._time_threshold = time_ms else: raise TypeError( f"Expected numeric value, got {time_ms.__class__.__name__} instead" ) class GroupSingle(AbstractGroup): """A group container that holds a single most recent item. This class works just like a regular group, but it only keeps a single sprite in the group. Whatever sprite has been added to the group last will be the only sprite in the group. You can access its one sprite as the .sprite attribute. Assigning to this attribute will properly remove the old sprite and then add the new one. """ def __init__(self, sprite=None): AbstractGroup.__init__(self) self.__sprite = None if sprite is not None: self.add(sprite) def copy(self): return GroupSingle(self.__sprite) def sprites(self): if self.__sprite is not None: return [self.__sprite] return [] def add_internal(self, sprite, layer=None): if self.__sprite is not None: self.__sprite.remove_internal(self) self.remove_internal(self.__sprite) self.__sprite = sprite def __bool__(self): return self.__sprite is not None def _get_sprite(self): return self.__sprite def _set_sprite(self, sprite): self.add_internal(sprite) sprite.add_internal(self) return sprite @property def sprite(self): """ Property for the single sprite contained in this group :return: The sprite. """ return self._get_sprite() @sprite.setter def sprite(self, sprite_to_set): self._set_sprite(sprite_to_set) def remove_internal(self, sprite): if sprite is self.__sprite: self.__sprite = None if sprite in self.spritedict: AbstractGroup.remove_internal(self, sprite) def has_internal(self, sprite): return self.__sprite is sprite # Optimizations... def __contains__(self, sprite): return self.__sprite is sprite # Some different collision detection functions that could be used. def collide_rect(left, right): """collision detection between two sprites, using rects. pygame.sprite.collide_rect(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision. It is intended to be passed as a collided callback function to the *collide functions. Sprites must have "rect" attributes. New in pygame 1.8.0 """ return left.rect.colliderect(right.rect) class collide_rect_ratio: # noqa pylint: disable=invalid-name; this is a function-like class """A callable class that checks for collisions using scaled rects The class checks for collisions between two sprites using a scaled version of the sprites' rects. Is created with a ratio; the instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """create a new collide_rect_ratio callable Ratio is expected to be a floating point value used to scale the underlying sprite rect before checking for collisions. """ self.ratio = ratio def __repr__(self): """ Turn the class into a string. """ # pylint: disable=consider-using-f-string return "<{klass} @{id:x} {attrs}>".format( klass=self.__class__.__name__, id=id(self) & 0xFFFFFF, attrs=" ".join(f"{k}={v!r}" for k, v in self.__dict__.items()), ) def __call__(self, left, right): """detect collision between two sprites using scaled rects pygame.sprite.collide_rect_ratio(ratio)(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision after scaling the rects by the stored ratio. Sprites must have "rect" attributes. """ ratio = self.ratio leftrect = left.rect width = leftrect.width height = leftrect.height leftrect = leftrect.inflate(width * ratio - width, height * ratio - height) rightrect = right.rect width = rightrect.width height = rightrect.height rightrect = rightrect.inflate(width * ratio - width, height * ratio - height) return leftrect.colliderect(rightrect) def collide_circle(left, right): """detect collision between two sprites using circles pygame.sprite.collide_circle(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap. If the sprites have a "radius" attribute, then that radius is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. This function is intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. New in pygame 1.8.0 """ xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance**2 + ydistance**2 try: leftradius = left.radius except AttributeError: leftrect = left.rect # approximating the radius of a square by using half of the diagonal, # might give false positives (especially if its a long small rect) leftradius = 0.5 * ((leftrect.width**2 + leftrect.height**2) ** 0.5) # store the radius on the sprite for next time left.radius = leftradius try: rightradius = right.radius except AttributeError: rightrect = right.rect # approximating the radius of a square by using half of the diagonal # might give false positives (especially if its a long small rect) rightradius = 0.5 * ((rightrect.width**2 + rightrect.height**2) ** 0.5) # store the radius on the sprite for next time right.radius = rightradius return distancesquared <= (leftradius + rightradius) ** 2 class collide_circle_ratio: # noqa pylint: disable=invalid-name; this is a function-like class """detect collision between two sprites using scaled circles This callable class checks for collisions between two sprites using a scaled version of a sprite's radius. It is created with a ratio as the argument to the constructor. The instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """creates a new collide_circle_ratio callable instance The given ratio is expected to be a floating point value used to scale the underlying sprite radius before checking for collisions. When the ratio is ratio=1.0, then it behaves exactly like the collide_circle method. """ self.ratio = ratio def __repr__(self): """ Turn the class into a string. """ # pylint: disable=consider-using-f-string return "<{klass} @{id:x} {attrs}>".format( klass=self.__class__.__name__, id=id(self) & 0xFFFFFF, attrs=" ".join(f"{k}={v!r}" for k, v in self.__dict__.items()), ) def __call__(self, left, right): """detect collision between two sprites using scaled circles pygame.sprite.collide_circle_radio(ratio)(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap after scaling the circle's radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. """ ratio = self.ratio xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance**2 + ydistance**2 try: leftradius = left.radius except AttributeError: leftrect = left.rect leftradius = 0.5 * ((leftrect.width**2 + leftrect.height**2) ** 0.5) # store the radius on the sprite for next time left.radius = leftradius leftradius *= ratio try: rightradius = right.radius except AttributeError: rightrect = right.rect rightradius = 0.5 * ((rightrect.width**2 + rightrect.height**2) ** 0.5) # store the radius on the sprite for next time right.radius = rightradius rightradius *= ratio return distancesquared <= (leftradius + rightradius) ** 2 def collide_mask(left, right): """collision detection between two sprites, using masks. pygame.sprite.collide_mask(SpriteLeft, SpriteRight): bool Tests for collision between two sprites by testing if their bitmasks overlap. If the sprites have a "mask" attribute, that is used as the mask; otherwise, a mask is created from the sprite image. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "mask" attribute. New in pygame 1.8.0 """ xoffset = right.rect[0] - left.rect[0] yoffset = right.rect[1] - left.rect[1] try: leftmask = left.mask except AttributeError: leftmask = from_surface(left.image) try: rightmask = right.mask except AttributeError: rightmask = from_surface(right.image) return leftmask.overlap(rightmask, (xoffset, yoffset)) def spritecollide(sprite, group, dokill, collided=None): """find Sprites in a Group that intersect another Sprite pygame.sprite.spritecollide(sprite, group, dokill, collided=None): return Sprite_list Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the Sprite.rect attribute of each Sprite. The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group. The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ # pull the default collision function in as a local variable outside # the loop as this makes the loop run faster default_sprite_collide_func = sprite.rect.colliderect if dokill: crashed = [] append = crashed.append for group_sprite in group.sprites(): if collided is not None: if collided(sprite, group_sprite): group_sprite.kill() append(group_sprite) else: if default_sprite_collide_func(group_sprite.rect): group_sprite.kill() append(group_sprite) return crashed if collided is not None: return [ group_sprite for group_sprite in group if collided(sprite, group_sprite) ] return [ group_sprite for group_sprite in group if default_sprite_collide_func(group_sprite.rect) ] def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): """detect collision between a group and another group pygame.sprite.groupcollide(groupa, groupb, dokilla, dokillb): return dict Given two groups, this will find the intersections between all sprites in each group. It returns a dictionary of all sprites in the first group that collide. The value for each item in the dictionary is a list of the sprites in the second group it collides with. The two dokill arguments control if the sprites from either group will be automatically removed from all groups. Collided is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area that will be used to calculate the collision. """ crashed = {} # pull the collision function in as a local variable outside # the loop as this makes the loop run faster sprite_collide_func = spritecollide if dokilla: for group_a_sprite in groupa.sprites(): collision = sprite_collide_func(group_a_sprite, groupb, dokillb, collided) if collision: crashed[group_a_sprite] = collision group_a_sprite.kill() else: for group_a_sprite in groupa: collision = sprite_collide_func(group_a_sprite, groupb, dokillb, collided) if collision: crashed[group_a_sprite] = collision return crashed def spritecollideany(sprite, group, collided=None): """finds any sprites in a group that collide with the given sprite pygame.sprite.spritecollideany(sprite, group): return sprite Given a sprite and a group of sprites, this will return any single sprite that collides with the given sprite. If there are no collisions, then this returns None. If you don't need all the features of the spritecollide function, this function will be a bit quicker. Collided is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ # pull the default collision function in as a local variable outside # the loop as this makes the loop run faster default_sprite_collide_func = sprite.rect.colliderect if collided is not None: for group_sprite in group: if collided(sprite, group_sprite): return group_sprite else: # Special case old behaviour for speed. for group_sprite in group: if default_sprite_collide_func(group_sprite.rect): return group_sprite return None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/surfarray.py0000644000175100001770000003410514676242340016311 0ustar00runnerdocker## pygame - Python Game Library ## Copyright (C) 2007 Marcus von Appen ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Marcus von Appen ## mva@sysfault.org """pygame module for accessing surface pixel data using array interfaces Functions to convert between NumPy arrays and Surface objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, surfarray becomes a MissingModule object. Every pixel is stored as a single integer value to represent the red, green, and blue colors. The 8bit images use a value that looks into a colormap. Pixels with higher depth use a bit packing process to place three or four values into a single number. The arrays are indexed by the X axis first, followed by the Y axis. Arrays that treat the pixels as a single integer are referred to as 2D arrays. This module can also separate the red, green, and blue color values into separate indices. These types of arrays are referred to as 3D arrays, and the last index is 0 for red, 1 for green, and 2 for blue. """ from pygame.pixelcopy import ( array_to_surface, surface_to_array, map_array as pix_map_array, make_surface as pix_make_surface, ) import numpy from numpy import ( array as numpy_array, empty as numpy_empty, uint32 as numpy_uint32, ndarray as numpy_ndarray, ) import warnings # will be removed in the future # float96 not available on all numpy versions. numpy_floats = [ getattr(numpy, type_name) for type_name in "float32 float64 float96".split() if hasattr(numpy, type_name) ] # Added below due to deprecation of numpy.float. See issue #2814 numpy_floats.append(float) # Pixel sizes corresponding to NumPy supported integer sizes, and therefore # permissible for 2D reference arrays. _pixel2d_bitdepths = {8, 16, 32} __all__ = [ "array2d", "array3d", "array_alpha", "array_blue", "array_colorkey", "array_green", "array_red", "array_to_surface", "blit_array", "get_arraytype", "get_arraytypes", "make_surface", "map_array", "pixels2d", "pixels3d", "pixels_alpha", "pixels_blue", "pixels_green", "pixels_red", "surface_to_array", "use_arraytype", ] def blit_array(surface, array): """pygame.surfarray.blit_array(Surface, array): return None Blit directly from a array values. Directly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ascii character and record arrays are accepted. This function will temporarily lock the Surface as the new values are copied. """ if isinstance(array, numpy_ndarray) and array.dtype in numpy_floats: array = array.round(0).astype(numpy_uint32) return array_to_surface(surface, array) def make_surface(array): """pygame.surfarray.make_surface (array): return Surface Copy an array to a new surface. Create a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. """ if isinstance(array, numpy_ndarray) and array.dtype in numpy_floats: array = array.round(0).astype(numpy_uint32) return pix_make_surface(array) def array2d(surface): """pygame.surfarray.array2d(Surface): return array copy pixels into a 2d array Copy the pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ bpp = surface.get_bytesize() try: dtype = (numpy.uint8, numpy.uint16, numpy.int32, numpy.int32)[bpp - 1] except IndexError: raise ValueError(f"unsupported bit depth {bpp * 8} for 2D array") size = surface.get_size() array = numpy.empty(size, dtype) surface_to_array(array, surface) return array def pixels2d(surface): """pygame.surfarray.pixels2d(Surface): return array reference pixels into a 2d array Create a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. Pixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can. The Surface this references will remain locked for the lifetime of the array (see the Surface.lock - lock the Surface memory for pixel access method). """ if surface.get_bitsize() not in _pixel2d_bitdepths: raise ValueError("unsupported bit depth for 2D reference array") try: return numpy_array(surface.get_view("2"), copy=False) except (ValueError, TypeError): raise ValueError( f"bit depth {surface.get_bitsize()} unsupported for 2D reference array" ) def array3d(surface): """pygame.surfarray.array3d(Surface): return array copy pixels into a 3d array Copy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ width, height = surface.get_size() array = numpy.empty((width, height, 3), numpy.uint8) surface_to_array(array, surface) return array def pixels3d(surface): """pygame.surfarray.pixels3d(Surface): return array reference pixels into a 3d array Create a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced. The Surface this references will remain locked for the lifetime of the array (see the Surface.lock - lock the Surface memory for pixel access method). """ return numpy_array(surface.get_view("3"), copy=False) def array_alpha(surface): """pygame.surfarray.array_alpha(Surface): return array copy pixel alphas into a 2d array Copy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ size = surface.get_size() array = numpy.empty(size, numpy.uint8) surface_to_array(array, surface, "A") return array def pixels_alpha(surface): """pygame.surfarray.pixels_alpha(Surface): return array reference pixel alphas into a 2d array Create a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 32-bit Surfaces with a per-pixel alpha value. The Surface this array references will remain locked for the lifetime of the array. """ return numpy.array(surface.get_view("A"), copy=False) def pixels_red(surface): """pygame.surfarray.pixels_red(Surface): return array Reference pixel red into a 2d array. Create a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this array references will remain locked for the lifetime of the array. """ return numpy.array(surface.get_view("R"), copy=False) def array_red(surface): """pygame.surfarray.array_red(Surface): return array copy pixel red into a 2d array Copy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ size = surface.get_size() array = numpy.empty(size, numpy.uint8) surface_to_array(array, surface, "R") return array def pixels_green(surface): """pygame.surfarray.pixels_green(Surface): return array Reference pixel green into a 2d array. Create a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this array references will remain locked for the lifetime of the array. """ return numpy.array(surface.get_view("G"), copy=False) def array_green(surface): """pygame.surfarray.array_green(Surface): return array copy pixel green into a 2d array Copy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ size = surface.get_size() array = numpy.empty(size, numpy.uint8) surface_to_array(array, surface, "G") return array def pixels_blue(surface): """pygame.surfarray.pixels_blue(Surface): return array Reference pixel blue into a 2d array. Create a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this array references will remain locked for the lifetime of the array. """ return numpy.array(surface.get_view("B"), copy=False) def array_blue(surface): """pygame.surfarray.array_blue(Surface): return array copy pixel blue into a 2d array Copy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the Surface.lock - lock the Surface memory for pixel access method). """ size = surface.get_size() array = numpy.empty(size, numpy.uint8) surface_to_array(array, surface, "B") return array def array_colorkey(surface): """pygame.surfarray.array_colorkey(Surface): return array copy the colorkey values into a 2d array Create a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque. This will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned. This function will temporarily lock the Surface as pixels are copied. """ size = surface.get_size() array = numpy.empty(size, numpy.uint8) surface_to_array(array, surface, "C") return array def map_array(surface, array): """pygame.surfarray.map_array(Surface, array3d): return array2d map a 3d array into a 2d array Convert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Note: arrays do not need to be 3D, as long as the minor axis has three elements giving the component colours, any array shape can be used (for example, a single colour can be mapped, or an array of colours). The array shape is limited to eleven dimensions maximum, including the three element minor axis. """ if array.ndim == 0: raise ValueError("array must have at least 1 dimension") shape = array.shape if shape[-1] != 3: raise ValueError("array must be a 3d array of 3-value color data") target = numpy_empty(shape[:-1], numpy.int32) pix_map_array(target, array, surface) return target def use_arraytype(arraytype): """pygame.surfarray.use_arraytype(arraytype): return None DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) arraytype = arraytype.lower() if arraytype != "numpy": raise ValueError("invalid array type") def get_arraytype(): """pygame.surfarray.get_arraytype(): return str DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) return "numpy" def get_arraytypes(): """pygame.surfarray.get_arraytypes(): return tuple DEPRECATED - only numpy arrays are now supported. """ warnings.warn( DeprecationWarning( "only numpy arrays are now supported, " "this function will be removed in a " "future version of the module" ) ) return ("numpy",) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/sysfont.py0000644000175100001770000003603714676242340016006 0ustar00runnerdocker# pygame - Python Game Library # Copyright (C) 2000-2003 Pete Shinners # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Pete Shinners # pete@shinners.org """sysfont, used in the font module to find system fonts""" import os import sys import warnings from os.path import basename, dirname, exists, join, splitext from pygame.font import Font if sys.platform != "emscripten": if os.name == "nt": import winreg as _winreg import subprocess OpenType_extensions = frozenset((".ttf", ".ttc", ".otf")) Sysfonts = {} Sysalias = {} is_init = False def _simplename(name): """create simple version of the font name""" # return alphanumeric characters of a string (converted to lowercase) return "".join(c.lower() for c in name if c.isalnum()) def _addfont(name, bold, italic, font, fontdict): """insert a font and style into the font dictionary""" if name not in fontdict: fontdict[name] = {} fontdict[name][bold, italic] = font def initsysfonts_win32(): """initialize fonts dictionary on Windows""" fontdir = join(os.environ.get("WINDIR", "C:\\Windows"), "Fonts") fonts = {} # add fonts entered in the registry microsoft_font_dirs = [ "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts", ] for domain in [_winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CURRENT_USER]: for font_dir in microsoft_font_dirs: try: key = _winreg.OpenKey(domain, font_dir) except FileNotFoundError: continue for i in range(_winreg.QueryInfoKey(key)[1]): try: # name is the font's name e.g. Times New Roman (TrueType) # font is the font's filename e.g. times.ttf name, font, _ = _winreg.EnumValue(key, i) except OSError: break if splitext(font)[1].lower() not in OpenType_extensions: continue if not dirname(font): font = join(fontdir, font) # Some are named A & B, both names should be processed separately # Ex: the main Cambria file is marked as "Cambria & Cambria Math" for name in name.split("&"): _parse_font_entry_win(name, font, fonts) return fonts def _parse_font_entry_win(name, font, fonts): """ Parse out a simpler name and the font style from the initial file name. :param name: The font name :param font: The font file path :param fonts: The pygame font dictionary """ true_type_suffix = "(TrueType)" mods = ("demibold", "narrow", "light", "unicode", "bt", "mt") if name.endswith(true_type_suffix): name = name.rstrip(true_type_suffix).rstrip() name = name.lower().split() bold = italic = False for mod in mods: if mod in name: name.remove(mod) if "bold" in name: name.remove("bold") bold = True if "italic" in name: name.remove("italic") italic = True name = "".join(name) name = _simplename(name) _addfont(name, bold, italic, font, fonts) def _parse_font_entry_darwin(name, filepath, fonts): """ Parses a font entry for macOS :param name: The filepath without extensions or directories :param filepath: The full path to the font :param fonts: The pygame font dictionary to add the parsed font data to. """ name = _simplename(name) mods = ("regular",) for mod in mods: if mod in name: name = name.replace(mod, "") bold = italic = False if "bold" in name: name = name.replace("bold", "") bold = True if "italic" in name: name = name.replace("italic", "") italic = True _addfont(name, bold, italic, filepath, fonts) def _font_finder_darwin(): locations = [ "/Library/Fonts", "/Network/Library/Fonts", "/System/Library/Fonts", "/System/Library/Fonts/Supplemental", ] username = os.getenv("USER") if username: locations.append(f"/Users/{username}/Library/Fonts") strange_root = "/System/Library/Assets/com_apple_MobileAsset_Font3" if exists(strange_root): locations += [f"{strange_root}/{loc}" for loc in os.listdir(strange_root)] fonts = {} for location in locations: if not exists(location): continue files = os.listdir(location) for file in files: name, extension = splitext(file) if extension in OpenType_extensions: _parse_font_entry_darwin(name, join(location, file), fonts) return fonts def initsysfonts_darwin(): """Read the fonts on MacOS, and OS X.""" # fc-list is not likely to be there on pre 10.4.x, or MacOS 10.10+ fonts = {} fclist_locations = [ "/usr/X11/bin/fc-list", # apple x11 "/usr/X11R6/bin/fc-list", # apple x11 ] for bin_location in fclist_locations: if exists(bin_location): fonts = initsysfonts_unix(bin_location) break if len(fonts) == 0: fonts = _font_finder_darwin() return fonts # read the fonts on unix def initsysfonts_unix(path="fc-list"): """use the fc-list from fontconfig to get a list of fonts""" fonts = {} if sys.platform == "emscripten": return fonts try: proc = subprocess.run( [path, ":", "file", "family", "style"], stdout=subprocess.PIPE, # capture stdout stderr=subprocess.PIPE, # capture stderr check=True, # so that errors raise python exception which is handled below timeout=1, # so that we don't hang the program waiting ) except FileNotFoundError: warnings.warn( f"'{path}' is missing, system fonts cannot be loaded on your platform" ) except subprocess.TimeoutExpired: warnings.warn( f"Process running '{path}' timed-out! System fonts cannot be loaded on " "your platform" ) except subprocess.CalledProcessError as e: warnings.warn( f"'{path}' failed with error code {e.returncode}! System fonts cannot be " f"loaded on your platform. Error log is:\n{e.stderr}" ) else: for entry in proc.stdout.decode("ascii", "ignore").splitlines(): try: _parse_font_entry_unix(entry, fonts) except ValueError: # noqa: PERF203 # try the next one. pass return fonts def _parse_font_entry_unix(entry, fonts): """ Parses an entry in the unix font data to add to the pygame font dictionary. :param entry: A entry from the unix font list. :param fonts: The pygame font dictionary to add the parsed font data to. """ filename, family, style = entry.split(":", 2) if splitext(filename)[1].lower() in OpenType_extensions: bold = "Bold" in style italic = "Italic" in style oblique = "Oblique" in style for name in family.strip().split(","): if name: break else: name = splitext(basename(filename))[0] _addfont(_simplename(name), bold, italic or oblique, filename, fonts) def create_aliases(): """Map common fonts that are absent from the system to similar fonts that are installed in the system """ alias_groups = ( ( "monospace", "misc-fixed", "courier", "couriernew", "console", "fixed", "mono", "freemono", "bitstreamverasansmono", "verasansmono", "monotype", "lucidaconsole", "consolas", "dejavusansmono", "liberationmono", ), ( "sans", "arial", "helvetica", "swiss", "freesans", "bitstreamverasans", "verasans", "verdana", "tahoma", "calibri", "gillsans", "segoeui", "trebuchetms", "ubuntu", "dejavusans", "liberationsans", ), ( "serif", "times", "freeserif", "bitstreamveraserif", "roman", "timesroman", "timesnewroman", "dutch", "veraserif", "georgia", "cambria", "constantia", "dejavuserif", "liberationserif", ), ("wingdings", "wingbats"), ("comicsansms", "comicsans"), ) for alias_set in alias_groups: for name in alias_set: if name in Sysfonts: found = Sysfonts[name] break else: continue for name in alias_set: if name not in Sysfonts: Sysalias[name] = found def initsysfonts(): """ Initialise the sysfont module, called once. Locates the installed fonts and creates some aliases for common font categories. Has different initialisation functions for different platforms. """ global is_init if is_init: # no need to re-init return if sys.platform == "win32": fonts = initsysfonts_win32() elif sys.platform == "darwin": fonts = initsysfonts_darwin() else: fonts = initsysfonts_unix() Sysfonts.update(fonts) create_aliases() is_init = True def font_constructor(fontpath, size, bold, italic): """ pygame.font specific declarations :param fontpath: path to a font. :param size: size of a font. :param bold: bold style, True or False. :param italic: italic style, True or False. :return: A font.Font object. """ font = Font(fontpath, size) if bold: font.set_bold(True) if italic: font.set_italic(True) return font # the exported functions def SysFont(name, size, bold=False, italic=False, constructor=None): """pygame.font.SysFont(name, size, bold=False, italic=False, constructor=None) -> Font Create a pygame Font from system font resources. This will search the system fonts for the given font name. You can also enable bold or italic styles, and the appropriate system font will be selected if available. This will always return a valid Font object, and will fallback on the builtin pygame font if the given font is not found. Name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If optional constructor is provided, it must be a function with signature constructor(fontpath, size, bold, italic) which returns a Font instance. If None, a pygame.font.Font object is created. """ if constructor is None: constructor = font_constructor initsysfonts() gotbold = gotitalic = False fontname = None if name: if isinstance(name, (str, bytes)): name = name.split(b"," if isinstance(name, bytes) else ",") for single_name in name: if isinstance(single_name, bytes): single_name = single_name.decode() single_name = _simplename(single_name) styles = Sysfonts.get(single_name) if not styles: styles = Sysalias.get(single_name) if styles: plainname = styles.get((False, False)) fontname = styles.get((bold, italic)) if not (fontname or plainname): # Neither requested style, nor plain font exists, so # return a font with the name requested, but an # arbitrary style. (style, fontname) = list(styles.items())[0] # Attempt to style it as requested. This can't # unbold or unitalicize anything, but it can # fake bold and/or fake italicize. if bold and style[0]: gotbold = True if italic and style[1]: gotitalic = True elif not fontname: fontname = plainname elif plainname != fontname: gotbold = bold gotitalic = italic if fontname: break set_bold = set_italic = False if bold and not gotbold: set_bold = True if italic and not gotitalic: set_italic = True return constructor(fontname, size, set_bold, set_italic) def get_fonts(): """pygame.font.get_fonts() -> list get a list of system font names Returns the list of all found system fonts. Note that the names of the fonts will be all lowercase with spaces removed. This is how pygame internally stores the font names for matching. """ initsysfonts() return list(Sysfonts) def match_font(name, bold=False, italic=False): """pygame.font.match_font(name, bold=0, italic=0) -> name find the filename for the named system font This performs the same font search as the SysFont() function, only it returns the path to the TTF file that would be loaded. The font name can also be an iterable of font names or a string/bytes of comma-separated font names to try. If no match is found, None is returned. """ initsysfonts() fontname = None if isinstance(name, (str, bytes)): name = name.split(b"," if isinstance(name, bytes) else ",") for single_name in name: if isinstance(single_name, bytes): single_name = single_name.decode() single_name = _simplename(single_name) styles = Sysfonts.get(single_name) if not styles: styles = Sysalias.get(single_name) if styles: while not fontname: fontname = styles.get((bold, italic)) if italic: italic = 0 elif bold: bold = 0 elif not fontname: fontname = list(styles.values())[0] if fontname: break return fontname ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0631256 pygame-2.6.1/src_py/threads/0000755000175100001770000000000014676242436015356 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/src_py/threads/__init__.py0000644000175100001770000001757714676242340017502 0ustar00runnerdocker""" * Experimental * Like the map function, but can use a pool of threads. Really easy to use threads. eg. tmap(f, alist) If you know how to use the map function, you can use threads. """ __author__ = "Rene Dudfield" __version__ = "0.3.0" __license__ = "Python license" from queue import Queue, Empty import threading Thread = threading.Thread STOP = object() FINISH = object() # DONE_ONE = object() # DONE_TWO = object() # a default worker queue. _wq = None # if we are using threads or not. This is the number of workers. _use_workers = 0 # Set this to the maximum for the amount of Cores/CPUs # Note, that the tests early out. # So it should only test the best number of workers +2 MAX_WORKERS_TO_TEST = 64 def init(number_of_workers=0): """Does a little test to see if threading is worth it. Sets up a global worker queue if it's worth it. Calling init() is not required, but is generally better to do. """ global _wq, _use_workers if number_of_workers: _use_workers = number_of_workers else: _use_workers = benchmark_workers() # if it is best to use zero workers, then use that. _wq = WorkerQueue(_use_workers) def quit(): """cleans up everything.""" global _wq, _use_workers _wq.stop() _wq = None _use_workers = False def benchmark_workers(a_bench_func=None, the_data=None): """does a little test to see if workers are at all faster. Returns the number of workers which works best. Takes a little bit of time to run, so you should only really call it once. You can pass in benchmark data, and functions if you want. a_bench_func - f(data) the_data - data to work on. """ # TODO: try and make this scale better with slower/faster cpus. # first find some variables so that using 0 workers takes about 1.0 seconds. # then go from there. # note, this will only work with pygame 1.8rc3+ # replace the doit() and the_data with something that releases the GIL import pygame import pygame.transform import time if not a_bench_func: def doit(x): return pygame.transform.scale(x, (544, 576)) else: doit = a_bench_func if not the_data: thedata = [pygame.Surface((155, 155), 0, 32) for x in range(10)] else: thedata = the_data best = time.time() + 100000000 best_number = 0 # last_best = -1 for num_workers in range(0, MAX_WORKERS_TO_TEST): wq = WorkerQueue(num_workers) t1 = time.time() for _ in range(20): print(f"active count:{threading.active_count()}") tmap(doit, thedata, worker_queue=wq) t2 = time.time() wq.stop() total_time = t2 - t1 print(f"total time num_workers:{num_workers}: time:{total_time}:") if total_time < best: # last_best = best_number best_number = num_workers best = total_time if num_workers - best_number > 1: # We tried to add more, but it didn't like it. # so we stop with testing at this number. break return best_number class WorkerQueue: def __init__(self, num_workers=20): self.queue = Queue() self.pool = [] self._setup_workers(num_workers) def _setup_workers(self, num_workers): """Sets up the worker threads NOTE: undefined behaviour if you call this again. """ self.pool = [] for _ in range(num_workers): self.pool.append(Thread(target=self.threadloop)) for a_thread in self.pool: a_thread.setDaemon(True) a_thread.start() def do(self, f, *args, **kwArgs): """puts a function on a queue for running later.""" self.queue.put((f, args, kwArgs)) def stop(self): """Stops the WorkerQueue, waits for all of the threads to finish up.""" self.queue.put(STOP) for thread in self.pool: thread.join() def threadloop(self): # , finish=False): """Loops until all of the tasks are finished.""" while True: args = self.queue.get() if args is STOP: self.queue.put(STOP) self.queue.task_done() break try: args[0](*args[1], **args[2]) finally: # clean up the queue, raise the exception. self.queue.task_done() # raise def wait(self): """waits until all tasks are complete.""" self.queue.join() class FuncResult: """Used for wrapping up a function call so that the results are stored inside the instances result attribute. """ def __init__(self, f, callback=None, errback=None): """f - is the function we that we call callback(result) - this is called when the function(f) returns errback(exception) - this is called when the function(f) raises an exception. """ self.f = f self.exception = None self.result = None self.callback = callback self.errback = errback def __call__(self, *args, **kwargs): # we try to call the function here. If it fails we store the exception. try: self.result = self.f(*args, **kwargs) if self.callback: self.callback(self.result) except Exception as e: self.exception = e if self.errback: self.errback(self.exception) def tmap(f, seq_args, num_workers=20, worker_queue=None, wait=True, stop_on_error=True): """like map, but uses a thread pool to execute. num_workers - the number of worker threads that will be used. If pool is passed in, then the num_workers arg is ignored. worker_queue - you can optionally pass in an existing WorkerQueue. wait - True means that the results are returned when everything is finished. False means that we return the [worker_queue, results] right away instead. results, is returned as a list of FuncResult instances. stop_on_error - """ if worker_queue: wq = worker_queue else: # see if we have a global queue to work with. if _wq: wq = _wq else: if num_workers == 0: return map(f, seq_args) wq = WorkerQueue(num_workers) # we short cut it here if the number of workers is 0. # normal map should be faster in this case. if len(wq.pool) == 0: return map(f, seq_args) # print("queue size:%s" % wq.queue.qsize()) # TODO: divide the data (seq_args) into even chunks and # then pass each thread a map(f, equal_part(seq_args)) # That way there should be less locking, and overhead. results = [] for sa in seq_args: results.append(FuncResult(f)) wq.do(results[-1], sa) # wq.stop() if wait: # print("wait") wq.wait() # print("after wait") # print("queue size:%s" % wq.queue.qsize()) if wq.queue.qsize(): raise RuntimeError("buggy threadmap") # if we created a worker queue, we need to stop it. if not worker_queue and not _wq: # print("stopping") wq.stop() if wq.queue.qsize(): um = wq.queue.get() if um is not STOP: raise RuntimeError("buggy threadmap") # see if there were any errors. If so raise the first one. This matches map behaviour. # TODO: the traceback doesn't show up nicely. # NOTE: TODO: we might want to return the results anyway? This should be an option. if stop_on_error: error_ones = list(filter(lambda x: x.exception, results)) if error_ones: raise error_ones[0].exception return (x.result for x in results) return [wq, results] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612189.795126 pygame-2.6.1/src_py/version.py0000644000175100001770000000462614676242436015773 0ustar00runnerdocker## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Pete Shinners ## pete@shinners.org """Simply the current installed pygame version. The version information is stored in the regular pygame module as 'pygame.ver'. Keeping the version information also available in a separate module allows you to test the pygame version without importing the main pygame module. The python version information should always compare greater than any previous releases. (hmm, until we get to versions > 10) """ from pygame.base import get_sdl_version ############### # This file is generated with version.py.in ## class SoftwareVersion(tuple): """ A class for storing data about software versions. """ __slots__ = () fields = "major", "minor", "patch" def __new__(cls, major, minor, patch): return tuple.__new__(cls, (major, minor, patch)) def __repr__(self): fields = (f"{fld}={val}" for fld, val in zip(self.fields, self)) return f"{str(self.__class__.__name__)}({', '.join(fields)})" def __str__(self): return f"{self.major}.{self.minor}.{self.patch}" major = property(lambda self: self[0]) minor = property(lambda self: self[1]) patch = property(lambda self: self[2]) class PygameVersion(SoftwareVersion): """ Pygame Version class. """ class SDLVersion(SoftwareVersion): """ SDL Version class. """ _sdl_tuple = get_sdl_version() SDL = SDLVersion(_sdl_tuple[0], _sdl_tuple[1], _sdl_tuple[2]) ver = "2.6.1" # pylint: disable=invalid-name vernum = PygameVersion(2, 6, 1) rev = "" # pylint: disable=invalid-name __all__ = ["SDL", "ver", "vernum", "rev"] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0671256 pygame-2.6.1/test/0000755000175100001770000000000014676242436013404 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/.editorconfig0000644000175100001770000000064314676242340016056 0ustar00runnerdockerroot=true [*] end_of_line = lf insert_final_newline = true # The settings for C (*.c and *.h) files are mirrored in src_c/.clang-format. # Keep them in sync. [*.{c,h}] indent_style = space indent_size = 4 tab_width = 4 trim_trailing_whitespace = true max_line_length = 79 [*.{py,pyx}] indent_style = space indent_size = 4 charset = utf-8 file_type_emacs = python trim_trailing_whitespace = true max_line_length = 79 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/README.rst0000644000175100001770000001065514676242340015074 0ustar00runnerdockerrun_tests.py ************ The test runner for pygame was developed for these purposes: * Per process isolation of test modules * Ability to tag tests for exclusion (interactive tests etc) * Record timings of tests It does this by altering the behaviour of unittest at run time. As much as possible each individual module was left to be fully compatible with the standard unittest. If an individual module is run, eg ``python test/color_test.py``, then it will run an unmodified version of unittest. ( unittest.main() ) Creating New Test Modules ************************* **NOTE** Be sure to import test_utils first at the top of your file, this will set the sys.path required for test.unittest to run, otherwise run_tests.py will not work properly :: import test_utils import test.unittest as unittest Writing New Tests ***************** See test/util/gen_stubs.py for automatic creation of test stubs and follow the naming convention gen_stubs.py ************ ``trunk/test/util/gen_stubs.py`` The gen_stubs.py utility will inspect pygame, and compile stubs of each of the module's callables (funcs, methods, getter/setters). It will include in the test's comment the __doc__ and the documentation found in the relevant xxxx.doc files. There is a naming convention in place that maps test names to callables in a one to one manner. If there are no untested (or unstubbed) callables then gen_stubs.py will output nothing. ``gen_stubs.py --help`` ``gen_stubs.py module -d >> ../test_module_to_append_to.py`` You will need to manually merge the stubs into relevant TestCases. Test Naming Convention ********************** This convention is in place so the stub generator can tell what has already been tested and for other introspection purposes. Each module in the pygame package has a corresponding test module in the trunk/test directory. pygame.color : color_test.py Each class has corresponding TestCase[s] in form of $Class + "Type" :: # TC[:TC.rindex('Type')] pygame.color.Color : color_test.ColorTypeTest pygame.color.Color : color_test.ColorTypeTestOtherAspect **NOTE** Use the names of the instantiator helper functions: eg ``pygame.cdrom.CD`` and not ``pygame.cdrom.CDType`` Each test should be named in the form, test_$funcname__$comment :: Surface.blit : test_blit__raises_exception_if_locked Tagging ******* There are three levels of tagging available, module level, TestCase level and individual test level. For class and module level tagging assign a tag attribute ``__tags__ = []`` Module Level Tags ----------------- Include the module level tags in: ``some_module_tags.py`` Where the module name is 'some_module' which has its tests in some_module_test.py This allows some modules to be excluded without loading some code in the first place. ``__tags__ = ['display', 'interactive']`` Tags are inherited by children, so all TestCases, and thus tests will inherit these module level tags. Class Level Tags ---------------- If you want to override a specific tag then you can use negation. :: class SomeTest(unittest.TestCase): __tags__ = ['-interactive'] Test Level Tags --------------- The tags for individual tests are specified in the __doc__ for the test. :: format : |Tags:comma,separated,tags| def test_something__about_something(self): """ |Tags:interactive,some_other_tag| """ **NOTE** By default 'interactive' tags are not run run_tests.py --exclude display,slow for exclusion of tags However if you do python test/some_module_test.py all of the tests will run. See run_tests.py --help for more details. test_utils.py ************* This contains utility routines for common testing needs as well as sets the sys.path required for test.unittest to work. some convenience functions :: question(q) Will ask q and return True if they answered yes prompt(p) Will notify the user of p and then prompt them to "press enter to continue" trunk_relative_path(pth) Will return a normalized relative path, relative to the test_module eg trunk_relative_path('examples\\data\\alien.jpg') will work on linux This is so the test module can be run from anywhere with working paths eg ../test/color_test.py fixture_path(pth) Likewise but paths are relative to trunk\test\fixtures example_path(pth) Likewise but paths are relative to trunk\examples ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/__init__.py0000644000175100001770000000234314676242340015511 0ustar00runnerdocker"""Pygame unit test suite package Exports function run() A quick way to run the test suite package from the command line is by importing the go submodule: python -m "import pygame.tests" [] Command line option --help displays a usage message. Available options correspond to the pygame.tests.run arguments. The xxxx_test submodules of the tests package are unit test suites for individual parts of Pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive. For Pygame development the test suite can be run from a Pygame distribution root directory using run_tests.py. Alternately, test/__main__.py can be run directly. """ if __name__ == "pygame.tests": from pygame.tests.test_utils.run_tests import run elif __name__ == "__main__": import os import sys pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) if is_pygame_pkg: import pygame.tests.__main__ else: import test.__main__ else: from test.test_utils.run_tests import run ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/__main__.py0000644000175100001770000000731414676242340015475 0ustar00runnerdocker"""Load and run the Pygame test suite python -c "import pygame.tests.go" [] or python test/go.py [] Command line option --help displays a command line usage message. run_tests.py in the main distribution directory is an alternative to test.go """ import sys if __name__ == "__main__": import os pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") if is_pygame_pkg: from pygame.tests.test_utils.run_tests import run_and_exit from pygame.tests.test_utils.test_runner import opt_parser else: from test.test_utils.run_tests import run_and_exit from test.test_utils.test_runner import opt_parser if is_pygame_pkg: test_pkg_name = "pygame.tests" else: test_pkg_name = "test" program_name = sys.argv[0] if program_name == "-c": program_name = f'python -c "import {test_pkg_name}.go"' ########################################################################### # Set additional command line options # # Defined in test_runner.py as it shares options, added to here opt_parser.set_usage( f""" Runs all or some of the {test_pkg_name}.xxxx_test tests. $ {program_name} sprite threads -sd Runs the sprite and threads module tests isolated in subprocesses, dumping all failing tests info in the form of a dict. """ ) opt_parser.add_option( "-d", "--dump", action="store_true", help="dump results as dict ready to eval" ) opt_parser.add_option("-F", "--file", help="dump results to a file") opt_parser.add_option( "-m", "--multi_thread", metavar="THREADS", type="int", help="run subprocessed tests in x THREADS", ) opt_parser.add_option( "-t", "--time_out", metavar="SECONDS", type="int", help="kill stalled subprocessed tests after SECONDS", ) opt_parser.add_option( "-f", "--fake", metavar="DIR", help="run fake tests in run_tests__tests/$DIR" ) opt_parser.add_option( "-p", "--python", metavar="PYTHON", help="path to python executable to run subproccesed tests\n" "default (sys.executable): %s" % sys.executable, ) opt_parser.add_option( "-I", "--interactive", action="store_true", help="include tests requiring user input", ) opt_parser.add_option("-S", "--seed", type="int", help="Randomisation seed") ########################################################################### # Set run() keyword arguments according to command line arguments. # args will be the test module list, passed as positional argumemts. options, args = opt_parser.parse_args() kwds = {} if options.incomplete: kwds["incomplete"] = True if options.usesubprocess: kwds["usesubprocess"] = True else: kwds["usesubprocess"] = False if options.dump: kwds["dump"] = True if options.file: kwds["file"] = options.file if options.exclude: kwds["exclude"] = options.exclude if options.unbuffered: kwds["unbuffered"] = True if options.randomize: kwds["randomize"] = True if options.seed is not None: kwds["seed"] = options.seed if options.multi_thread is not None: kwds["multi_thread"] = options.multi_thread if options.time_out is not None: kwds["time_out"] = options.time_out if options.fake: kwds["fake"] = options.fake if options.python: kwds["python"] = options.python if options.interactive: kwds["interactive"] = True kwds["verbosity"] = options.verbosity if options.verbosity is not None else 1 ########################################################################### # Run the test suite. run_and_exit(*args, **kwds) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/base_test.py0000644000175100001770000005366114676242340015734 0ustar00runnerdockerimport sys import unittest import platform IS_PYPY = "PyPy" == platform.python_implementation() try: from pygame.tests.test_utils import arrinter except NameError: pass import pygame quit_count = 0 def quit_hook(): global quit_count quit_count += 1 class BaseModuleTest(unittest.TestCase): def tearDown(self): # Clean up after each test method. pygame.quit() def test_get_sdl_byteorder(self): """Ensure the SDL byte order is valid""" byte_order = pygame.get_sdl_byteorder() expected_options = (pygame.LIL_ENDIAN, pygame.BIG_ENDIAN) self.assertIn(byte_order, expected_options) def test_get_sdl_version(self): """Ensure the SDL version is valid""" self.assertEqual(len(pygame.get_sdl_version()), 3) class ExporterBase: def __init__(self, shape, typechar, itemsize): import ctypes ndim = len(shape) self.ndim = ndim self.shape = tuple(shape) array_len = 1 for d in shape: array_len *= d self.size = itemsize * array_len self.parent = ctypes.create_string_buffer(self.size) self.itemsize = itemsize strides = [itemsize] * ndim for i in range(ndim - 1, 0, -1): strides[i - 1] = strides[i] * shape[i] self.strides = tuple(strides) self.data = ctypes.addressof(self.parent), False if self.itemsize == 1: byteorder = "|" elif sys.byteorder == "big": byteorder = ">" else: byteorder = "<" self.typestr = byteorder + typechar + str(self.itemsize) def assertSame(self, proxy, obj): self.assertEqual(proxy.length, obj.size) iface = proxy.__array_interface__ self.assertEqual(iface["typestr"], obj.typestr) self.assertEqual(iface["shape"], obj.shape) self.assertEqual(iface["strides"], obj.strides) self.assertEqual(iface["data"], obj.data) def test_PgObject_GetBuffer_array_interface(self): from pygame.bufferproxy import BufferProxy class Exporter(self.ExporterBase): def get__array_interface__(self): return { "version": 3, "typestr": self.typestr, "shape": self.shape, "strides": self.strides, "data": self.data, } __array_interface__ = property(get__array_interface__) # Should be ignored by PgObject_GetBuffer __array_struct__ = property(lambda self: None) _shape = [2, 3, 5, 7, 11] # Some prime numbers for ndim in range(1, len(_shape)): o = Exporter(_shape[0:ndim], "i", 2) v = BufferProxy(o) self.assertSame(v, o) ndim = 2 shape = _shape[0:ndim] for typechar in ("i", "u"): for itemsize in (1, 2, 4, 8): o = Exporter(shape, typechar, itemsize) v = BufferProxy(o) self.assertSame(v, o) for itemsize in (4, 8): o = Exporter(shape, "f", itemsize) v = BufferProxy(o) self.assertSame(v, o) # Is the dict received from an exporting object properly released? # The dict should be freed before PgObject_GetBuffer returns. # When the BufferProxy v's length property is referenced, v calls # PgObject_GetBuffer, which in turn references Exporter2 o's # __array_interface__ property. The Exporter2 instance o returns a # dict subclass for which it keeps both a regular reference and a # weak reference. The regular reference should be the only # remaining reference when PgObject_GetBuffer returns. This is # verified by first checking the weak reference both before and # after the regular reference held by o is removed. import weakref, gc class NoDictError(RuntimeError): pass class WRDict(dict): """Weak referenceable dict""" pass class Exporter2(Exporter): def get__array_interface__2(self): self.d = WRDict(Exporter.get__array_interface__(self)) self.dict_ref = weakref.ref(self.d) return self.d __array_interface__ = property(get__array_interface__2) def free_dict(self): self.d = None def is_dict_alive(self): try: return self.dict_ref() is not None except AttributeError: raise NoDictError("__array_interface__ is unread") o = Exporter2((2, 4), "u", 4) v = BufferProxy(o) self.assertRaises(NoDictError, o.is_dict_alive) length = v.length self.assertTrue(o.is_dict_alive()) o.free_dict() gc.collect() self.assertFalse(o.is_dict_alive()) def test_GetView_array_struct(self): from pygame.bufferproxy import BufferProxy class Exporter(self.ExporterBase): def __init__(self, shape, typechar, itemsize): super().__init__(shape, typechar, itemsize) self.view = BufferProxy(self.__dict__) def get__array_struct__(self): return self.view.__array_struct__ __array_struct__ = property(get__array_struct__) # Should not cause PgObject_GetBuffer to fail __array_interface__ = property(lambda self: None) _shape = [2, 3, 5, 7, 11] # Some prime numbers for ndim in range(1, len(_shape)): o = Exporter(_shape[0:ndim], "i", 2) v = BufferProxy(o) self.assertSame(v, o) ndim = 2 shape = _shape[0:ndim] for typechar in ("i", "u"): for itemsize in (1, 2, 4, 8): o = Exporter(shape, typechar, itemsize) v = BufferProxy(o) self.assertSame(v, o) for itemsize in (4, 8): o = Exporter(shape, "f", itemsize) v = BufferProxy(o) self.assertSame(v, o) # Check returned cobject/capsule reference count try: from sys import getrefcount except ImportError: # PyPy: no reference counting pass else: o = Exporter(shape, typechar, itemsize) self.assertEqual(getrefcount(o.__array_struct__), 1) if pygame.HAVE_NEWBUF: from pygame.tests.test_utils import buftools def NEWBUF_assertSame(self, proxy, exp): buftools = self.buftools Importer = buftools.Importer self.assertEqual(proxy.length, exp.len) imp = Importer(proxy, buftools.PyBUF_RECORDS_RO) self.assertEqual(imp.readonly, exp.readonly) self.assertEqual(imp.format, exp.format) self.assertEqual(imp.itemsize, exp.itemsize) self.assertEqual(imp.ndim, exp.ndim) self.assertEqual(imp.shape, exp.shape) self.assertEqual(imp.strides, exp.strides) self.assertTrue(imp.suboffsets is None) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") @unittest.skipIf(IS_PYPY, "pypy no likey") def test_newbuf(self): from pygame.bufferproxy import BufferProxy Exporter = self.buftools.Exporter _shape = [2, 3, 5, 7, 11] # Some prime numbers for ndim in range(1, len(_shape)): o = Exporter(_shape[0:ndim], "=h") v = BufferProxy(o) self.NEWBUF_assertSame(v, o) ndim = 2 shape = _shape[0:ndim] for format in [ "b", "B", "=h", "=H", "=i", "=I", "=q", "=Q", "f", "d", "1h", "=1h", "x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", ]: o = Exporter(shape, format) v = BufferProxy(o) self.NEWBUF_assertSame(v, o) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_bad_format(self): from pygame.bufferproxy import BufferProxy from pygame.newbuffer import BufferMixin from ctypes import create_string_buffer, addressof buftools = self.buftools Exporter = buftools.Exporter Importer = buftools.Importer PyBUF_FORMAT = buftools.PyBUF_FORMAT for format in [ "", "=", "1", " ", "2h", "=2h", "0x", "11x", "=!", "h ", " h", "hh", "?", ]: exp = Exporter((1,), format, itemsize=2) b = BufferProxy(exp) self.assertRaises(ValueError, Importer, b, PyBUF_FORMAT) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") @unittest.skipIf(IS_PYPY, "fails on pypy") def test_PgDict_AsBuffer_PyBUF_flags(self): from pygame.bufferproxy import BufferProxy is_lil_endian = pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN fsys, frev = ("<", ">") if is_lil_endian else (">", "<") buftools = self.buftools Importer = buftools.Importer a = BufferProxy( {"typestr": "|u4", "shape": (10, 2), "data": (9, False)} ) # 9? No data accesses. b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 4) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, 9) b = Importer(a, buftools.PyBUF_WRITABLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 4) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, 9) b = Importer(a, buftools.PyBUF_ND) self.assertEqual(b.ndim, 2) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 4) self.assertEqual(b.shape, (10, 2)) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, 9) a = BufferProxy( { "typestr": fsys + "i2", "shape": (5, 10), "strides": (24, 2), "data": (42, False), } ) # 42? No data accesses. b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, 2) self.assertTrue(b.format is None) self.assertEqual(b.len, 100) self.assertEqual(b.itemsize, 2) self.assertEqual(b.shape, (5, 10)) self.assertEqual(b.strides, (24, 2)) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, 42) b = Importer(a, buftools.PyBUF_FULL_RO) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "=h") self.assertEqual(b.len, 100) self.assertEqual(b.itemsize, 2) self.assertEqual(b.shape, (5, 10)) self.assertEqual(b.strides, (24, 2)) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, 42) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_CONTIG) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_CONTIG) a = BufferProxy( { "typestr": frev + "i2", "shape": (3, 5, 10), "strides": (120, 24, 2), "data": (1000000, True), } ) # 1000000? No data accesses. b = Importer(a, buftools.PyBUF_FULL_RO) self.assertEqual(b.ndim, 3) self.assertEqual(b.format, frev + "h") self.assertEqual(b.len, 300) self.assertEqual(b.itemsize, 2) self.assertEqual(b.shape, (3, 5, 10)) self.assertEqual(b.strides, (120, 24, 2)) self.assertTrue(b.suboffsets is None) self.assertTrue(b.readonly) self.assertEqual(b.buf, 1000000) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_FULL) @unittest.skipIf(IS_PYPY or (not pygame.HAVE_NEWBUF), "newbuf with ctypes") def test_PgObject_AsBuffer_PyBUF_flags(self): from pygame.bufferproxy import BufferProxy import ctypes is_lil_endian = pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN fsys, frev = ("<", ">") if is_lil_endian else (">", "<") buftools = self.buftools Importer = buftools.Importer e = arrinter.Exporter( (10, 2), typekind="f", itemsize=ctypes.sizeof(ctypes.c_double) ) a = BufferProxy(e) b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, e.len) self.assertEqual(b.itemsize, e.itemsize) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, e.data) b = Importer(a, buftools.PyBUF_WRITABLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, e.len) self.assertEqual(b.itemsize, e.itemsize) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, e.data) b = Importer(a, buftools.PyBUF_ND) self.assertEqual(b.ndim, e.nd) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, e.itemsize) self.assertEqual(b.shape, e.shape) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, e.data) e = arrinter.Exporter((5, 10), typekind="i", itemsize=2, strides=(24, 2)) a = BufferProxy(e) b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, e.nd) self.assertTrue(b.format is None) self.assertEqual(b.len, e.len) self.assertEqual(b.itemsize, e.itemsize) self.assertEqual(b.shape, e.shape) self.assertEqual(b.strides, e.strides) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, e.data) b = Importer(a, buftools.PyBUF_FULL_RO) self.assertEqual(b.ndim, e.nd) self.assertEqual(b.format, "=h") self.assertEqual(b.len, e.len) self.assertEqual(b.itemsize, e.itemsize) self.assertEqual(b.shape, e.shape) self.assertEqual(b.strides, e.strides) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, e.data) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_CONTIG) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_CONTIG) e = arrinter.Exporter( (3, 5, 10), typekind="i", itemsize=2, strides=(120, 24, 2), flags=arrinter.PAI_ALIGNED, ) a = BufferProxy(e) b = Importer(a, buftools.PyBUF_FULL_RO) self.assertEqual(b.ndim, e.nd) self.assertEqual(b.format, frev + "h") self.assertEqual(b.len, e.len) self.assertEqual(b.itemsize, e.itemsize) self.assertEqual(b.shape, e.shape) self.assertEqual(b.strides, e.strides) self.assertTrue(b.suboffsets is None) self.assertTrue(b.readonly) self.assertEqual(b.buf, e.data) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_FULL) def test_PgObject_GetBuffer_exception(self): # For consistency with surfarray from pygame.bufferproxy import BufferProxy bp = BufferProxy(1) self.assertRaises(ValueError, getattr, bp, "length") def not_init_assertions(self): self.assertFalse(pygame.get_init(), "pygame shouldn't be initialized") self.assertFalse(pygame.display.get_init(), "display shouldn't be initialized") if "pygame.mixer" in sys.modules: self.assertFalse(pygame.mixer.get_init(), "mixer shouldn't be initialized") if "pygame.font" in sys.modules: self.assertFalse(pygame.font.get_init(), "init shouldn't be initialized") ## !!! TODO : Remove when scrap works for OS X import platform if platform.system().startswith("Darwin"): return try: self.assertRaises(pygame.error, pygame.scrap.get) except NotImplementedError: # Scrap is optional. pass # pygame.cdrom # pygame.joystick def init_assertions(self): self.assertTrue(pygame.get_init()) self.assertTrue(pygame.display.get_init()) if "pygame.mixer" in sys.modules: self.assertTrue(pygame.mixer.get_init()) if "pygame.font" in sys.modules: self.assertTrue(pygame.font.get_init()) def test_quit__and_init(self): # __doc__ (as of 2008-06-25) for pygame.base.quit: # pygame.quit(): return None # uninitialize all pygame modules # Make sure everything is not init self.not_init_assertions() # Initiate it pygame.init() # Check self.init_assertions() # Quit pygame.quit() # All modules have quit self.not_init_assertions() def test_register_quit(self): """Ensure that a registered function is called on quit()""" self.assertEqual(quit_count, 0) pygame.init() pygame.register_quit(quit_hook) pygame.quit() self.assertEqual(quit_count, 1) def test_get_error(self): # __doc__ (as of 2008-08-02) for pygame.base.get_error: # pygame.get_error(): return errorstr # get the current error message # # SDL maintains an internal error message. This message will usually # be given to you when pygame.error is raised. You will rarely need to # call this function. # # The first error could be all sorts of nonsense or empty. e = pygame.get_error() pygame.set_error("hi") self.assertEqual(pygame.get_error(), "hi") pygame.set_error("") self.assertEqual(pygame.get_error(), "") def test_set_error(self): # The first error could be all sorts of nonsense or empty. e = pygame.get_error() pygame.set_error("hi") self.assertEqual(pygame.get_error(), "hi") pygame.set_error("") self.assertEqual(pygame.get_error(), "") def test_unicode_error(self): pygame.set_error("你好") self.assertEqual("你好", pygame.get_error()) def test_init(self): """Ensures init() works properly.""" # Make sure nothing initialized. self.not_init_assertions() # display and joystick must init, at minimum expected_min_passes = 2 # All modules should pass. expected_fails = 0 passes, fails = pygame.init() self.init_assertions() self.assertGreaterEqual(passes, expected_min_passes) self.assertEqual(fails, expected_fails) def test_get_init(self): # Test if get_init() gets the init state. self.assertFalse(pygame.get_init()) def test_get_init__after_init(self): # Test if get_init() gets the init state after pygame.init() called. pygame.init() self.assertTrue(pygame.get_init()) def test_get_init__after_quit(self): # Test if get_init() gets the init state after pygame.quit() called. pygame.init() pygame.quit() self.assertFalse(pygame.get_init()) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0201118 pygame-2.6.1/test/blit_test.py0000644000175100001770000001430714676242340015746 0ustar00runnerdockerimport unittest import pygame from pygame.locals import * from time import time class BlitTest(unittest.TestCase): def test_SRCALPHA(self): """SRCALPHA tests.""" # blend(s, 0, d) = d s = pygame.Surface((1, 1), SRCALPHA, 32) s.fill((255, 255, 255, 0)) d = pygame.Surface((1, 1), SRCALPHA, 32) d.fill((0, 0, 255, 255)) s.blit(d, (0, 0)) self.assertEqual(s.get_at((0, 0)), d.get_at((0, 0))) # blend(s, 255, d) = s s = pygame.Surface((1, 1), SRCALPHA, 32) s.fill((123, 0, 0, 255)) s1 = pygame.Surface((1, 1), SRCALPHA, 32) s1.fill((123, 0, 0, 255)) d = pygame.Surface((1, 1), SRCALPHA, 32) d.fill((10, 0, 0, 0)) s.blit(d, (0, 0)) self.assertEqual(s.get_at((0, 0)), s1.get_at((0, 0))) # TODO: these should be true too. # blend(0, sA, 0) = 0 # blend(255, sA, 255) = 255 # blend(s, sA, d) <= 255 def test_BLEND(self): """BLEND_ tests.""" # test that it doesn't overflow, and that it is saturated. s = pygame.Surface((1, 1), SRCALPHA, 32) s.fill((255, 255, 255, 0)) d = pygame.Surface((1, 1), SRCALPHA, 32) d.fill((0, 0, 255, 255)) s.blit(d, (0, 0), None, BLEND_ADD) # print("d %s" % (d.get_at((0,0)),)) # print(s.get_at((0,0))) # self.assertEqual(s.get_at((0,0))[2], 255 ) # self.assertEqual(s.get_at((0,0))[3], 0 ) s.blit(d, (0, 0), None, BLEND_RGBA_ADD) # print(s.get_at((0,0))) self.assertEqual(s.get_at((0, 0))[3], 255) # test adding works. s.fill((20, 255, 255, 0)) d.fill((10, 0, 255, 255)) s.blit(d, (0, 0), None, BLEND_ADD) self.assertEqual(s.get_at((0, 0))[2], 255) # test subbing works. s.fill((20, 255, 255, 0)) d.fill((10, 0, 255, 255)) s.blit(d, (0, 0), None, BLEND_SUB) self.assertEqual(s.get_at((0, 0))[0], 10) # no overflow in sub blend. s.fill((20, 255, 255, 0)) d.fill((30, 0, 255, 255)) s.blit(d, (0, 0), None, BLEND_SUB) self.assertEqual(s.get_at((0, 0))[0], 0) class BlitsTest(unittest.TestCase): """Tests for pygame.Surface.blits""" def setUp(self): self.NUM_SURFS = 255 self.PRINT_TIMING = 0 self.dst = pygame.Surface((self.NUM_SURFS * 10, 10), SRCALPHA, 32) self.dst.fill((230, 230, 230)) self.blit_list = self.make_blit_list(self.NUM_SURFS) def make_blit_list(self, num_surfs): """Generate a list of tuples representing surfaces and destinations for blitting""" blit_list = [] for i in range(num_surfs): dest = (i * 10, 0) surf = pygame.Surface((10, 10), SRCALPHA, 32) color = (i * 1, i * 1, i * 1) surf.fill(color) blit_list.append((surf, dest)) return blit_list def custom_blits(self, blit_list): """Custom blits method that manually iterates over the blit_list and blits each surface onto the destination.""" for surface, dest in blit_list: self.dst.blit(surface, dest) def test_custom_blits_performance(self): """Checks time performance of the custom blits method""" t0 = time() results = self.custom_blits(self.blit_list) t1 = time() if self.PRINT_TIMING: print(f"python blits: {t1 - t0}") def test_blits_performance(self): """Checks time performance of blits""" t0 = time() results = self.dst.blits(self.blit_list) t1 = time() if self.PRINT_TIMING: print(f"Surface.blits: {t1 - t0}") # Measure time performance of blits with doreturn=0 t0 = time() results = self.dst.blits(self.blit_list, doreturn=0) t1 = time() if self.PRINT_TIMING: print(f"Surface.blits doreturn=0: {t1 - t0}") # Measure time performance of blits using a generator t0 = time() results = self.dst.blits(((surf, dest) for surf, dest in self.blit_list)) t1 = time() if self.PRINT_TIMING: print(f"Surface.blits generator: {t1 - t0}") def test_blits_correctness(self): """Checks the correctness of the colors on the destination after blitting and tests that the length of the results list matches the number of surfaces blitted.""" results = self.dst.blits(self.blit_list) for i in range(self.NUM_SURFS): color = (i * 1, i * 1, i * 1) self.assertEqual(self.dst.get_at((i * 10, 0)), color) self.assertEqual(self.dst.get_at(((i * 10) + 5, 5)), color) self.assertEqual(len(results), self.NUM_SURFS) def test_blits_doreturn(self): """Tests that when doreturn=0, it returns None""" results = self.dst.blits(self.blit_list, doreturn=0) self.assertEqual(results, None) def test_blits_not_sequence(self): """Tests that calling blits with an invalid non-sequence None argument raises a ValueError.""" dst = pygame.Surface((100, 10), SRCALPHA, 32) with self.assertRaises(ValueError): dst.blits(None) def test_blits_wrong_length(self): """Tests that calling blits with an invalid sequence containing a single surface (without a destination) raises a ValueError.""" dst = pygame.Surface((100, 10), SRCALPHA, 32) with self.assertRaises(ValueError): dst.blits([pygame.Surface((10, 10), SRCALPHA, 32)]) def test_blits_bad_surf_args(self): """Tests that calling blits with a sequence containing an invalid tuple of None arguments raises a TypeError.""" dst = pygame.Surface((100, 10), SRCALPHA, 32) with self.assertRaises(TypeError): dst.blits([(None, None)]) def test_blits_bad_dest(self): """Tests that calling blits with a sequence containing an invalid tuple with a destination of None raises a TypeError.""" dst = pygame.Surface((100, 10), SRCALPHA, 32) with self.assertRaises(TypeError): dst.blits([(pygame.Surface((10, 10), SRCALPHA, 32), None)]) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/bufferproxy_test.py0000644000175100001770000004010314676242340017360 0ustar00runnerdockerimport re import weakref import gc import ctypes import unittest import pygame from pygame.bufferproxy import BufferProxy try: BufferError except NameError: from pygame import BufferError class BufferProxyTest(unittest.TestCase): view_keywords = { "shape": (5, 4, 3), "typestr": "|u1", "data": (0, True), "strides": (4, 20, 1), } def test_module_name(self): self.assertEqual(pygame.bufferproxy.__name__, "pygame.bufferproxy") def test_class_name(self): self.assertEqual(BufferProxy.__name__, "BufferProxy") def test___array_struct___property(self): kwds = self.view_keywords v = BufferProxy(kwds) d = pygame.get_array_interface(v) self.assertEqual(len(d), 5) self.assertEqual(d["version"], 3) self.assertEqual(d["shape"], kwds["shape"]) self.assertEqual(d["typestr"], kwds["typestr"]) self.assertEqual(d["data"], kwds["data"]) self.assertEqual(d["strides"], kwds["strides"]) def test___array_interface___property(self): kwds = self.view_keywords v = BufferProxy(kwds) d = v.__array_interface__ self.assertEqual(len(d), 5) self.assertEqual(d["version"], 3) self.assertEqual(d["shape"], kwds["shape"]) self.assertEqual(d["typestr"], kwds["typestr"]) self.assertEqual(d["data"], kwds["data"]) self.assertEqual(d["strides"], kwds["strides"]) def test_parent_property(self): kwds = dict(self.view_keywords) p = [] kwds["parent"] = p v = BufferProxy(kwds) self.assertIs(v.parent, p) def test_before(self): def callback(parent): success.append(parent is p) class MyException(Exception): pass def raise_exception(parent): raise MyException("Just a test.") kwds = dict(self.view_keywords) p = [] kwds["parent"] = p # For array interface success = [] kwds["before"] = callback v = BufferProxy(kwds) self.assertEqual(len(success), 0) d = v.__array_interface__ self.assertEqual(len(success), 1) self.assertTrue(success[0]) d = v.__array_interface__ self.assertEqual(len(success), 1) d = v = None gc.collect() self.assertEqual(len(success), 1) # For array struct success = [] kwds["before"] = callback v = BufferProxy(kwds) self.assertEqual(len(success), 0) c = v.__array_struct__ self.assertEqual(len(success), 1) self.assertTrue(success[0]) c = v.__array_struct__ self.assertEqual(len(success), 1) c = v = None gc.collect() self.assertEqual(len(success), 1) # Callback raises an exception kwds["before"] = raise_exception v = BufferProxy(kwds) self.assertRaises(MyException, lambda: v.__array_struct__) def test_after(self): def callback(parent): success.append(parent is p) kwds = dict(self.view_keywords) p = [] kwds["parent"] = p # For array interface success = [] kwds["after"] = callback v = BufferProxy(kwds) self.assertEqual(len(success), 0) d = v.__array_interface__ self.assertEqual(len(success), 0) d = v.__array_interface__ self.assertEqual(len(success), 0) d = v = None gc.collect() self.assertEqual(len(success), 1) self.assertTrue(success[0]) # For array struct success = [] kwds["after"] = callback v = BufferProxy(kwds) self.assertEqual(len(success), 0) c = v.__array_struct__ self.assertEqual(len(success), 0) c = v.__array_struct__ self.assertEqual(len(success), 0) c = v = None gc.collect() self.assertEqual(len(success), 1) self.assertTrue(success[0]) def test_attribute(self): v = BufferProxy(self.view_keywords) self.assertRaises(AttributeError, getattr, v, "undefined") v.undefined = 12 self.assertEqual(v.undefined, 12) del v.undefined self.assertRaises(AttributeError, getattr, v, "undefined") def test_weakref(self): v = BufferProxy(self.view_keywords) weak_v = weakref.ref(v) self.assertIs(weak_v(), v) v = None gc.collect() self.assertIsNone(weak_v()) def test_gc(self): """refcount agnostic check that contained objects are freed""" def before_callback(parent): return r[0] def after_callback(parent): return r[1] class Obj: pass p = Obj() a = Obj() r = [Obj(), Obj()] weak_p = weakref.ref(p) weak_a = weakref.ref(a) weak_r0 = weakref.ref(r[0]) weak_r1 = weakref.ref(r[1]) weak_before = weakref.ref(before_callback) weak_after = weakref.ref(after_callback) kwds = dict(self.view_keywords) kwds["parent"] = p kwds["before"] = before_callback kwds["after"] = after_callback v = BufferProxy(kwds) v.some_attribute = a weak_v = weakref.ref(v) kwds = p = a = before_callback = after_callback = None gc.collect() self.assertTrue(weak_p() is not None) self.assertTrue(weak_a() is not None) self.assertTrue(weak_before() is not None) self.assertTrue(weak_after() is not None) v = None [gc.collect() for x in range(4)] self.assertTrue(weak_v() is None) self.assertTrue(weak_p() is None) self.assertTrue(weak_a() is None) self.assertTrue(weak_before() is None) self.assertTrue(weak_after() is None) self.assertTrue(weak_r0() is not None) self.assertTrue(weak_r1() is not None) r = None gc.collect() self.assertTrue(weak_r0() is None) self.assertTrue(weak_r1() is None) # Cycle removal kwds = dict(self.view_keywords) kwds["parent"] = [] v = BufferProxy(kwds) v.some_attribute = v tracked = True for o in gc.get_objects(): if o is v: break else: tracked = False self.assertTrue(tracked) kwds["parent"].append(v) kwds = None gc.collect() n1 = len(gc.garbage) v = None gc.collect() n2 = len(gc.garbage) self.assertEqual(n2, n1) def test_c_api(self): api = pygame.bufferproxy._PYGAME_C_API api_type = type(pygame.base._PYGAME_C_API) self.assertIsInstance(api, api_type) def test_repr(self): v = BufferProxy(self.view_keywords) cname = BufferProxy.__name__ oname, ovalue = re.findall(r"<([^)]+)\(([^)]+)\)>", repr(v))[0] self.assertEqual(oname, cname) self.assertEqual(v.length, int(ovalue)) def test_subclassing(self): class MyBufferProxy(BufferProxy): def __repr__(self): return f"*{BufferProxy.__repr__(self)}*" kwds = dict(self.view_keywords) kwds["parent"] = 0 v = MyBufferProxy(kwds) self.assertEqual(v.parent, 0) r = repr(v) self.assertEqual(r[:2], "*<") self.assertEqual(r[-2:], ">*") @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def NEWBUF_test_newbuf(self): from ctypes import string_at from pygame.tests.test_utils import buftools Exporter = buftools.Exporter Importer = buftools.Importer exp = Exporter((10,), "B", readonly=True) b = BufferProxy(exp) self.assertEqual(b.length, exp.len) self.assertEqual(b.raw, string_at(exp.buf, exp.len)) d = b.__array_interface__ try: self.assertEqual(d["typestr"], "|u1") self.assertEqual(d["shape"], exp.shape) self.assertEqual(d["strides"], exp.strides) self.assertEqual(d["data"], (exp.buf, True)) finally: d = None exp = Exporter((3,), "=h") b = BufferProxy(exp) self.assertEqual(b.length, exp.len) self.assertEqual(b.raw, string_at(exp.buf, exp.len)) d = b.__array_interface__ try: lil_endian = pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN f = f"{'<' if lil_endian else '>'}i{exp.itemsize}" self.assertEqual(d["typestr"], f) self.assertEqual(d["shape"], exp.shape) self.assertEqual(d["strides"], exp.strides) self.assertEqual(d["data"], (exp.buf, False)) finally: d = None exp = Exporter((10, 2), "=i") b = BufferProxy(exp) imp = Importer(b, buftools.PyBUF_RECORDS) self.assertTrue(imp.obj is b) self.assertEqual(imp.buf, exp.buf) self.assertEqual(imp.ndim, exp.ndim) self.assertEqual(imp.format, exp.format) self.assertEqual(imp.readonly, exp.readonly) self.assertEqual(imp.itemsize, exp.itemsize) self.assertEqual(imp.len, exp.len) self.assertEqual(imp.shape, exp.shape) self.assertEqual(imp.strides, exp.strides) self.assertTrue(imp.suboffsets is None) d = { "typestr": "|u1", "shape": (10,), "strides": (1,), "data": (9, True), } # 9? Will not reading the data anyway. b = BufferProxy(d) imp = Importer(b, buftools.PyBUF_SIMPLE) self.assertTrue(imp.obj is b) self.assertEqual(imp.buf, 9) self.assertEqual(imp.len, 10) self.assertEqual(imp.format, None) self.assertEqual(imp.itemsize, 1) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.readonly) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) try: pygame.bufferproxy.get_segcount except AttributeError: pass else: def test_oldbuf_arg(self): self.OLDBUF_test_oldbuf_arg() def OLDBUF_test_oldbuf_arg(self): from pygame.bufferproxy import get_segcount, get_read_buffer, get_write_buffer content = b"\x01\x00\x00\x02" * 12 memory = ctypes.create_string_buffer(content) memaddr = ctypes.addressof(memory) def raise_exception(o): raise ValueError("An exception") bf = BufferProxy( { "shape": (len(content),), "typestr": "|u1", "data": (memaddr, False), "strides": (1,), } ) seglen, segaddr = get_read_buffer(bf, 0) self.assertEqual(segaddr, 0) self.assertEqual(seglen, 0) seglen, segaddr = get_write_buffer(bf, 0) self.assertEqual(segaddr, 0) self.assertEqual(seglen, 0) segcount, buflen = get_segcount(bf) self.assertEqual(segcount, 1) self.assertEqual(buflen, len(content)) seglen, segaddr = get_read_buffer(bf, 0) self.assertEqual(segaddr, memaddr) self.assertEqual(seglen, len(content)) seglen, segaddr = get_write_buffer(bf, 0) self.assertEqual(segaddr, memaddr) self.assertEqual(seglen, len(content)) bf = BufferProxy( { "shape": (len(content),), "typestr": "|u1", "data": (memaddr, True), "strides": (1,), } ) segcount, buflen = get_segcount(bf) self.assertEqual(segcount, 1) self.assertEqual(buflen, len(content)) seglen, segaddr = get_read_buffer(bf, 0) self.assertEqual(segaddr, memaddr) self.assertEqual(seglen, len(content)) self.assertRaises(ValueError, get_write_buffer, bf, 0) bf = BufferProxy( { "shape": (len(content),), "typestr": "|u1", "data": (memaddr, True), "strides": (1,), "before": raise_exception, } ) segcount, buflen = get_segcount(bf) self.assertEqual(segcount, 0) self.assertEqual(buflen, 0) bf = BufferProxy( { "shape": (3, 4), "typestr": "|u4", "data": (memaddr, True), "strides": (12, 4), } ) segcount, buflen = get_segcount(bf) self.assertEqual(segcount, 3 * 4) self.assertEqual(buflen, 3 * 4 * 4) for i in range(0, 4): seglen, segaddr = get_read_buffer(bf, i) self.assertEqual(segaddr, memaddr + i * 4) self.assertEqual(seglen, 4) class BufferProxyLegacyTest(unittest.TestCase): content = b"\x01\x00\x00\x02" * 12 buffer = ctypes.create_string_buffer(content) data = (ctypes.addressof(buffer), True) def test_length(self): # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.length: # The size of the buffer data in bytes. bf = BufferProxy( {"shape": (3, 4), "typestr": "|u4", "data": self.data, "strides": (12, 4)} ) self.assertEqual(bf.length, len(self.content)) bf = BufferProxy( {"shape": (3, 3), "typestr": "|u4", "data": self.data, "strides": (12, 4)} ) self.assertEqual(bf.length, 3 * 3 * 4) def test_raw(self): # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.raw: # The raw buffer data as string. The string may contain NUL bytes. bf = BufferProxy( {"shape": (len(self.content),), "typestr": "|u1", "data": self.data} ) self.assertEqual(bf.raw, self.content) bf = BufferProxy( {"shape": (3, 4), "typestr": "|u4", "data": self.data, "strides": (4, 12)} ) self.assertEqual(bf.raw, self.content) bf = BufferProxy( {"shape": (3, 4), "typestr": "|u1", "data": self.data, "strides": (16, 4)} ) self.assertRaises(ValueError, getattr, bf, "raw") def test_write(self): # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.write: # B.write (bufferproxy, buffer, offset) -> None # # Writes raw data to the bufferproxy. # # Writes the raw data from buffer to the BufferProxy object, starting # at the specified offset within the BufferProxy. # If the length of the passed buffer exceeds the length of the # BufferProxy (reduced by the offset), an IndexError will be raised. from ctypes import c_byte, sizeof, addressof, string_at, memset nullbyte = b"\x00" Buf = c_byte * 10 data_buf = Buf(*range(1, 3 * sizeof(Buf) + 1, 3)) data = string_at(data_buf, sizeof(data_buf)) buf = Buf() bp = BufferProxy( {"typestr": "|u1", "shape": (sizeof(buf),), "data": (addressof(buf), False)} ) try: self.assertEqual(bp.raw, nullbyte * sizeof(Buf)) bp.write(data) self.assertEqual(bp.raw, data) memset(buf, 0, sizeof(buf)) bp.write(data[:3], 2) raw = bp.raw self.assertEqual(raw[:2], nullbyte * 2) self.assertEqual(raw[2:5], data[:3]) self.assertEqual(raw[5:], nullbyte * (sizeof(Buf) - 5)) bp.write(data[:3], bp.length - 3) raw = bp.raw self.assertEqual(raw[-3:], data[:3]) self.assertRaises(IndexError, bp.write, data, 1) self.assertRaises(IndexError, bp.write, data[:5], -1) self.assertRaises(IndexError, bp.write, data[:5], bp.length) self.assertRaises(TypeError, bp.write, 12) bp = BufferProxy( { "typestr": "|u1", "shape": (sizeof(buf),), "data": (addressof(buf), True), } ) self.assertRaises(pygame.BufferError, bp.write, b"123") finally: # Make sure bp is garbage collected before buf bp = None gc.collect() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/camera_test.py0000644000175100001770000000144114676242340016237 0ustar00runnerdockerimport unittest import os import pygame import pygame.camera class CameraModuleTest(unittest.TestCase): def setUp(self): pygame.init() pygame.camera.init() @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") in ["dummy", "android"], "requires the SDL_VIDEODRIVER to be non dummy", ) def test_camera(self): cameras = pygame.camera.list_cameras() if len(cameras) == 0: self.skipTest("No cameras found") cam = pygame.camera.Camera(cameras[0], (640, 480)) cam.start() image = cam.get_image() self.assertIsNotNone(image, "Could not capture image") cam.stop() def tearDown(self): pygame.camera.quit() pygame.quit() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/color_test.py0000644000175100001770000014116514676242340016135 0ustar00runnerdockerimport math import operator import platform import unittest from collections.abc import Collection, Sequence import pygame from pygame.colordict import THECOLORS IS_PYPY = "PyPy" == platform.python_implementation() ################################### CONSTANTS ################################## rgba_vals = [0, 1, 62, 63, 126, 127, 255] rgba_combinations = [ (r, g, b, a) for r in rgba_vals for g in rgba_vals for b in rgba_vals for a in rgba_vals ] ################################################################################ def rgba_combos_Color_generator(): for rgba in rgba_combinations: yield pygame.Color(*rgba) # Python gamma correct def gamma_correct(rgba_0_255, gamma): corrected = round(255.0 * math.pow(rgba_0_255 / 255.0, gamma)) return max(min(int(corrected), 255), 0) ################################################################################ # TODO: add tests for # correct_gamma() -- test against statically defined verified correct values # coerce () -- ?? def _assignr(x, y): x.r = y def _assigng(x, y): x.g = y def _assignb(x, y): x.b = y def _assigna(x, y): x.a = y def _assign_item(x, p, y): x[p] = y class ColorTypeTest(unittest.TestCase): def test_new(self): c = pygame.Color.__new__(pygame.Color) self.assertEqual(c, pygame.Color(0, 0, 0, 255)) self.assertEqual(len(c), 4) def test_init(self): c = pygame.Color(10, 20, 30, 200) self.assertEqual(c, (10, 20, 30, 200)) c.set_length(3) self.assertEqual(len(c), 3) c.__init__(100, 110, 120, 128) self.assertEqual(len(c), 4) self.assertEqual(c, (100, 110, 120, 128)) def test_invalid_html_hex_codes(self): # This was a problem with the way 2 digit hex numbers were # calculated. The test_hex_digits test is related to the fix. Color = pygame.color.Color self.assertRaises(ValueError, lambda: Color("# f000000")) self.assertRaises(ValueError, lambda: Color("#f 000000")) self.assertRaises(ValueError, lambda: Color("#-f000000")) def test_hex_digits(self): # This is an implementation specific test. # Two digit hex numbers are calculated using table lookups # for the upper and lower digits. Color = pygame.color.Color self.assertEqual(Color("#00000000").r, 0x00) self.assertEqual(Color("#10000000").r, 0x10) self.assertEqual(Color("#20000000").r, 0x20) self.assertEqual(Color("#30000000").r, 0x30) self.assertEqual(Color("#40000000").r, 0x40) self.assertEqual(Color("#50000000").r, 0x50) self.assertEqual(Color("#60000000").r, 0x60) self.assertEqual(Color("#70000000").r, 0x70) self.assertEqual(Color("#80000000").r, 0x80) self.assertEqual(Color("#90000000").r, 0x90) self.assertEqual(Color("#A0000000").r, 0xA0) self.assertEqual(Color("#B0000000").r, 0xB0) self.assertEqual(Color("#C0000000").r, 0xC0) self.assertEqual(Color("#D0000000").r, 0xD0) self.assertEqual(Color("#E0000000").r, 0xE0) self.assertEqual(Color("#F0000000").r, 0xF0) self.assertEqual(Color("#01000000").r, 0x01) self.assertEqual(Color("#02000000").r, 0x02) self.assertEqual(Color("#03000000").r, 0x03) self.assertEqual(Color("#04000000").r, 0x04) self.assertEqual(Color("#05000000").r, 0x05) self.assertEqual(Color("#06000000").r, 0x06) self.assertEqual(Color("#07000000").r, 0x07) self.assertEqual(Color("#08000000").r, 0x08) self.assertEqual(Color("#09000000").r, 0x09) self.assertEqual(Color("#0A000000").r, 0x0A) self.assertEqual(Color("#0B000000").r, 0x0B) self.assertEqual(Color("#0C000000").r, 0x0C) self.assertEqual(Color("#0D000000").r, 0x0D) self.assertEqual(Color("#0E000000").r, 0x0E) self.assertEqual(Color("#0F000000").r, 0x0F) def test_comparison(self): Color = pygame.color.Color # Check valid comparisons self.assertTrue(Color(255, 0, 0, 0) == Color(255, 0, 0, 0)) self.assertTrue(Color(0, 255, 0, 0) == Color(0, 255, 0, 0)) self.assertTrue(Color(0, 0, 255, 0) == Color(0, 0, 255, 0)) self.assertTrue(Color(0, 0, 0, 255) == Color(0, 0, 0, 255)) self.assertFalse(Color(0, 0, 0, 0) == Color(255, 0, 0, 0)) self.assertFalse(Color(0, 0, 0, 0) == Color(0, 255, 0, 0)) self.assertFalse(Color(0, 0, 0, 0) == Color(0, 0, 255, 0)) self.assertFalse(Color(0, 0, 0, 0) == Color(0, 0, 0, 255)) self.assertTrue(Color(0, 0, 0, 0) != Color(255, 0, 0, 0)) self.assertTrue(Color(0, 0, 0, 0) != Color(0, 255, 0, 0)) self.assertTrue(Color(0, 0, 0, 0) != Color(0, 0, 255, 0)) self.assertTrue(Color(0, 0, 0, 0) != Color(0, 0, 0, 255)) self.assertFalse(Color(255, 0, 0, 0) != Color(255, 0, 0, 0)) self.assertFalse(Color(0, 255, 0, 0) != Color(0, 255, 0, 0)) self.assertFalse(Color(0, 0, 255, 0) != Color(0, 0, 255, 0)) self.assertFalse(Color(0, 0, 0, 255) != Color(0, 0, 0, 255)) self.assertTrue(Color(255, 0, 0, 0) == (255, 0, 0, 0)) self.assertTrue(Color(0, 255, 0, 0) == (0, 255, 0, 0)) self.assertTrue(Color(0, 0, 255, 0) == (0, 0, 255, 0)) self.assertTrue(Color(0, 0, 0, 255) == (0, 0, 0, 255)) self.assertFalse(Color(0, 0, 0, 0) == (255, 0, 0, 0)) self.assertFalse(Color(0, 0, 0, 0) == (0, 255, 0, 0)) self.assertFalse(Color(0, 0, 0, 0) == (0, 0, 255, 0)) self.assertFalse(Color(0, 0, 0, 0) == (0, 0, 0, 255)) self.assertTrue(Color(0, 0, 0, 0) != (255, 0, 0, 0)) self.assertTrue(Color(0, 0, 0, 0) != (0, 255, 0, 0)) self.assertTrue(Color(0, 0, 0, 0) != (0, 0, 255, 0)) self.assertTrue(Color(0, 0, 0, 0) != (0, 0, 0, 255)) self.assertFalse(Color(255, 0, 0, 0) != (255, 0, 0, 0)) self.assertFalse(Color(0, 255, 0, 0) != (0, 255, 0, 0)) self.assertFalse(Color(0, 0, 255, 0) != (0, 0, 255, 0)) self.assertFalse(Color(0, 0, 0, 255) != (0, 0, 0, 255)) self.assertTrue((255, 0, 0, 0) == Color(255, 0, 0, 0)) self.assertTrue((0, 255, 0, 0) == Color(0, 255, 0, 0)) self.assertTrue((0, 0, 255, 0) == Color(0, 0, 255, 0)) self.assertTrue((0, 0, 0, 255) == Color(0, 0, 0, 255)) self.assertFalse((0, 0, 0, 0) == Color(255, 0, 0, 0)) self.assertFalse((0, 0, 0, 0) == Color(0, 255, 0, 0)) self.assertFalse((0, 0, 0, 0) == Color(0, 0, 255, 0)) self.assertFalse((0, 0, 0, 0) == Color(0, 0, 0, 255)) self.assertTrue((0, 0, 0, 0) != Color(255, 0, 0, 0)) self.assertTrue((0, 0, 0, 0) != Color(0, 255, 0, 0)) self.assertTrue((0, 0, 0, 0) != Color(0, 0, 255, 0)) self.assertTrue((0, 0, 0, 0) != Color(0, 0, 0, 255)) self.assertFalse((255, 0, 0, 0) != Color(255, 0, 0, 0)) self.assertFalse((0, 255, 0, 0) != Color(0, 255, 0, 0)) self.assertFalse((0, 0, 255, 0) != Color(0, 0, 255, 0)) self.assertFalse((0, 0, 0, 255) != Color(0, 0, 0, 255)) class TupleSubclass(tuple): pass self.assertTrue(Color(255, 0, 0, 0) == TupleSubclass((255, 0, 0, 0))) self.assertTrue(TupleSubclass((255, 0, 0, 0)) == Color(255, 0, 0, 0)) self.assertFalse(Color(255, 0, 0, 0) != TupleSubclass((255, 0, 0, 0))) self.assertFalse(TupleSubclass((255, 0, 0, 0)) != Color(255, 0, 0, 0)) # These are not supported so will be unequal. self.assertFalse(Color(255, 0, 0, 0) == "#ff000000") self.assertTrue(Color(255, 0, 0, 0) != "#ff000000") self.assertFalse("#ff000000" == Color(255, 0, 0, 0)) self.assertTrue("#ff000000" != Color(255, 0, 0, 0)) self.assertFalse(Color(255, 0, 0, 0) == 0xFF000000) self.assertTrue(Color(255, 0, 0, 0) != 0xFF000000) self.assertFalse(0xFF000000 == Color(255, 0, 0, 0)) self.assertTrue(0xFF000000 != Color(255, 0, 0, 0)) self.assertFalse(Color(255, 0, 0, 0) == [255, 0, 0, 0]) self.assertTrue(Color(255, 0, 0, 0) != [255, 0, 0, 0]) self.assertFalse([255, 0, 0, 0] == Color(255, 0, 0, 0)) self.assertTrue([255, 0, 0, 0] != Color(255, 0, 0, 0)) # Comparison is not implemented for invalid color values. class Test: def __eq__(self, other): return -1 def __ne__(self, other): return -2 class TestTuple(tuple): def __eq__(self, other): return -1 def __ne__(self, other): return -2 t = Test() t_tuple = TestTuple(("a", 0, 0, 0)) black = Color("black") self.assertEqual(black == t, -1) self.assertEqual(t == black, -1) self.assertEqual(black != t, -2) self.assertEqual(t != black, -2) self.assertEqual(black == t_tuple, -1) self.assertEqual(black != t_tuple, -2) self.assertEqual(t_tuple == black, -1) self.assertEqual(t_tuple != black, -2) def test_ignore_whitespace(self): self.assertEqual(pygame.color.Color("red"), pygame.color.Color(" r e d ")) def test_slice(self): # """|tags: python3_ignore|""" # slicing a color gives you back a tuple. # do all sorts of slice combinations. c = pygame.Color(1, 2, 3, 4) self.assertEqual((1, 2, 3, 4), c[:]) self.assertEqual((1, 2, 3), c[:-1]) self.assertEqual((), c[:-5]) self.assertEqual((1, 2, 3, 4), c[:4]) self.assertEqual((1, 2, 3, 4), c[:5]) self.assertEqual((1, 2), c[:2]) self.assertEqual((1,), c[:1]) self.assertEqual((), c[:0]) self.assertEqual((2,), c[1:-2]) self.assertEqual((3, 4), c[-2:]) self.assertEqual((4,), c[-1:]) # NOTE: assigning to a slice is currently unsupported. def test_unpack(self): # should be able to unpack to r,g,b,a and r,g,b c = pygame.Color(1, 2, 3, 4) r, g, b, a = c self.assertEqual((1, 2, 3, 4), (r, g, b, a)) self.assertEqual(c, (r, g, b, a)) c.set_length(3) r, g, b = c self.assertEqual((1, 2, 3), (r, g, b)) # Checking if DeprecationWarning is triggered # when function is called for i in range(1, 5): with self.assertWarns(DeprecationWarning): c.set_length(i) def test_length(self): # should be able to unpack to r,g,b,a and r,g,b c = pygame.Color(1, 2, 3, 4) self.assertEqual(len(c), 4) c.set_length(3) self.assertEqual(len(c), 3) # it keeps the old alpha anyway... self.assertEqual(c.a, 4) # however you can't get the alpha in this way: self.assertRaises(IndexError, lambda x: c[x], 4) c.set_length(4) self.assertEqual(len(c), 4) self.assertEqual(len(c), 4) self.assertRaises(ValueError, c.set_length, 5) self.assertRaises(ValueError, c.set_length, -1) self.assertRaises(ValueError, c.set_length, 0) self.assertRaises(ValueError, c.set_length, pow(2, 33)) def test_case_insensitivity_of_string_args(self): self.assertEqual(pygame.color.Color("red"), pygame.color.Color("Red")) def test_color(self): """Ensures Color objects can be created.""" color = pygame.Color(0, 0, 0, 0) self.assertIsInstance(color, pygame.Color) def test_color__rgba_int_args(self): """Ensures Color objects can be created using ints.""" color = pygame.Color(10, 20, 30, 40) self.assertEqual(color.r, 10) self.assertEqual(color.g, 20) self.assertEqual(color.b, 30) self.assertEqual(color.a, 40) def test_color__rgba_int_args_without_alpha(self): """Ensures Color objects can be created without providing alpha.""" color = pygame.Color(10, 20, 30) self.assertEqual(color.r, 10) self.assertEqual(color.g, 20) self.assertEqual(color.b, 30) self.assertEqual(color.a, 255) def test_color__rgba_int_args_invalid_value(self): """Ensures invalid values are detected when creating Color objects.""" self.assertRaises(ValueError, pygame.Color, 257, 10, 105, 44) self.assertRaises(ValueError, pygame.Color, 10, 257, 105, 44) self.assertRaises(ValueError, pygame.Color, 10, 105, 257, 44) self.assertRaises(ValueError, pygame.Color, 10, 105, 44, 257) def test_color__rgba_int_args_invalid_value_without_alpha(self): """Ensures invalid values are detected when creating Color objects without providing an alpha. """ self.assertRaises(ValueError, pygame.Color, 256, 10, 105) self.assertRaises(ValueError, pygame.Color, 10, 256, 105) self.assertRaises(ValueError, pygame.Color, 10, 105, 256) def test_color__color_object_arg(self): """Ensures Color objects can be created using Color objects.""" color_args = (10, 20, 30, 40) color_obj = pygame.Color(*color_args) new_color_obj = pygame.Color(color_obj) self.assertIsInstance(new_color_obj, pygame.Color) self.assertEqual(new_color_obj, color_obj) self.assertEqual(new_color_obj.r, color_args[0]) self.assertEqual(new_color_obj.g, color_args[1]) self.assertEqual(new_color_obj.b, color_args[2]) self.assertEqual(new_color_obj.a, color_args[3]) def test_color__name_str_arg(self): """Ensures Color objects can be created using str names.""" for name in ("aquamarine3", "AQUAMARINE3", "AqUAmArIne3"): color = pygame.Color(name) self.assertEqual(color.r, 102) self.assertEqual(color.g, 205) self.assertEqual(color.b, 170) self.assertEqual(color.a, 255) def test_color__name_str_arg_from_colordict(self): """Ensures Color objects can be created using str names from the THECOLORS dict.""" for name, values in THECOLORS.items(): color = pygame.Color(name) self.assertEqual(color.r, values[0]) self.assertEqual(color.g, values[1]) self.assertEqual(color.b, values[2]) self.assertEqual(color.a, values[3]) def test_color__html_str_arg(self): """Ensures Color objects can be created using html strings.""" # See test_webstyle() for related tests. color = pygame.Color("#a1B2c3D4") self.assertEqual(color.r, 0xA1) self.assertEqual(color.g, 0xB2) self.assertEqual(color.b, 0xC3) self.assertEqual(color.a, 0xD4) def test_color__hex_str_arg(self): """Ensures Color objects can be created using hex strings.""" # See test_webstyle() for related tests. color = pygame.Color("0x1a2B3c4D") self.assertEqual(color.r, 0x1A) self.assertEqual(color.g, 0x2B) self.assertEqual(color.b, 0x3C) self.assertEqual(color.a, 0x4D) def test_color__int_arg(self): """Ensures Color objects can be created using one int value.""" for value in (0x0, 0xFFFFFFFF, 0xAABBCCDD): color = pygame.Color(value) self.assertEqual(color.r, (value >> 24) & 0xFF) self.assertEqual(color.g, (value >> 16) & 0xFF) self.assertEqual(color.b, (value >> 8) & 0xFF) self.assertEqual(color.a, value & 0xFF) def test_color__int_arg_invalid(self): """Ensures invalid int values are detected when creating Color objects.""" with self.assertRaises(ValueError): color = pygame.Color(0x1FFFFFFFF) def test_color__sequence_arg(self): """Ensures Color objects can be created using tuples/lists.""" color_values = (33, 44, 55, 66) for seq_type in (tuple, list): color = pygame.Color(seq_type(color_values)) self.assertEqual(color.r, color_values[0]) self.assertEqual(color.g, color_values[1]) self.assertEqual(color.b, color_values[2]) self.assertEqual(color.a, color_values[3]) def test_color__sequence_arg_without_alpha(self): """Ensures Color objects can be created using tuples/lists without providing an alpha value. """ color_values = (33, 44, 55) for seq_type in (tuple, list): color = pygame.Color(seq_type(color_values)) self.assertEqual(color.r, color_values[0]) self.assertEqual(color.g, color_values[1]) self.assertEqual(color.b, color_values[2]) self.assertEqual(color.a, 255) def test_color__sequence_arg_invalid_value(self): """Ensures invalid sequences are detected when creating Color objects.""" cls = pygame.Color for seq_type in (tuple, list): self.assertRaises(ValueError, cls, seq_type((256, 90, 80, 70))) self.assertRaises(ValueError, cls, seq_type((100, 256, 80, 70))) self.assertRaises(ValueError, cls, seq_type((100, 90, 256, 70))) self.assertRaises(ValueError, cls, seq_type((100, 90, 80, 256))) def test_color__sequence_arg_invalid_value_without_alpha(self): """Ensures invalid sequences are detected when creating Color objects without providing an alpha. """ cls = pygame.Color for seq_type in (tuple, list): self.assertRaises(ValueError, cls, seq_type((256, 90, 80))) self.assertRaises(ValueError, cls, seq_type((100, 256, 80))) self.assertRaises(ValueError, cls, seq_type((100, 90, 256))) def test_color__sequence_arg_invalid_format(self): """Ensures invalid sequences are detected when creating Color objects with the wrong number of values. """ cls = pygame.Color for seq_type in (tuple, list): self.assertRaises(ValueError, cls, seq_type((100,))) self.assertRaises(ValueError, cls, seq_type((100, 90))) self.assertRaises(ValueError, cls, seq_type((100, 90, 80, 70, 60))) def test_rgba(self): c = pygame.Color(0) self.assertEqual(c.r, 0) self.assertEqual(c.g, 0) self.assertEqual(c.b, 0) self.assertEqual(c.a, 0) # Test simple assignments c.r = 123 self.assertEqual(c.r, 123) self.assertRaises(ValueError, _assignr, c, 537) self.assertEqual(c.r, 123) self.assertRaises(ValueError, _assignr, c, -3) self.assertEqual(c.r, 123) c.g = 55 self.assertEqual(c.g, 55) self.assertRaises(ValueError, _assigng, c, 348) self.assertEqual(c.g, 55) self.assertRaises(ValueError, _assigng, c, -44) self.assertEqual(c.g, 55) c.b = 77 self.assertEqual(c.b, 77) self.assertRaises(ValueError, _assignb, c, 256) self.assertEqual(c.b, 77) self.assertRaises(ValueError, _assignb, c, -12) self.assertEqual(c.b, 77) c.a = 255 self.assertEqual(c.a, 255) self.assertRaises(ValueError, _assigna, c, 312) self.assertEqual(c.a, 255) self.assertRaises(ValueError, _assigna, c, -10) self.assertEqual(c.a, 255) def test_repr(self): c = pygame.Color(68, 38, 26, 69) t = "(68, 38, 26, 69)" self.assertEqual(repr(c), t) def test_add(self): c1 = pygame.Color(0) self.assertEqual(c1.r, 0) self.assertEqual(c1.g, 0) self.assertEqual(c1.b, 0) self.assertEqual(c1.a, 0) c2 = pygame.Color(20, 33, 82, 193) self.assertEqual(c2.r, 20) self.assertEqual(c2.g, 33) self.assertEqual(c2.b, 82) self.assertEqual(c2.a, 193) c3 = c1 + c2 self.assertEqual(c3.r, 20) self.assertEqual(c3.g, 33) self.assertEqual(c3.b, 82) self.assertEqual(c3.a, 193) c3 = c3 + c2 self.assertEqual(c3.r, 40) self.assertEqual(c3.g, 66) self.assertEqual(c3.b, 164) self.assertEqual(c3.a, 255) # Issue #286: Is type checking done for Python 3.x? self.assertRaises(TypeError, operator.add, c1, None) self.assertRaises(TypeError, operator.add, None, c1) def test_sub(self): c1 = pygame.Color(0xFFFFFFFF) self.assertEqual(c1.r, 255) self.assertEqual(c1.g, 255) self.assertEqual(c1.b, 255) self.assertEqual(c1.a, 255) c2 = pygame.Color(20, 33, 82, 193) self.assertEqual(c2.r, 20) self.assertEqual(c2.g, 33) self.assertEqual(c2.b, 82) self.assertEqual(c2.a, 193) c3 = c1 - c2 self.assertEqual(c3.r, 235) self.assertEqual(c3.g, 222) self.assertEqual(c3.b, 173) self.assertEqual(c3.a, 62) c3 = c3 - c2 self.assertEqual(c3.r, 215) self.assertEqual(c3.g, 189) self.assertEqual(c3.b, 91) self.assertEqual(c3.a, 0) # Issue #286: Is type checking done for Python 3.x? self.assertRaises(TypeError, operator.sub, c1, None) self.assertRaises(TypeError, operator.sub, None, c1) def test_mul(self): c1 = pygame.Color(0x01010101) self.assertEqual(c1.r, 1) self.assertEqual(c1.g, 1) self.assertEqual(c1.b, 1) self.assertEqual(c1.a, 1) c2 = pygame.Color(2, 5, 3, 22) self.assertEqual(c2.r, 2) self.assertEqual(c2.g, 5) self.assertEqual(c2.b, 3) self.assertEqual(c2.a, 22) c3 = c1 * c2 self.assertEqual(c3.r, 2) self.assertEqual(c3.g, 5) self.assertEqual(c3.b, 3) self.assertEqual(c3.a, 22) c3 = c3 * c2 self.assertEqual(c3.r, 4) self.assertEqual(c3.g, 25) self.assertEqual(c3.b, 9) self.assertEqual(c3.a, 255) # Issue #286: Is type checking done for Python 3.x? self.assertRaises(TypeError, operator.mul, c1, None) self.assertRaises(TypeError, operator.mul, None, c1) def test_div(self): c1 = pygame.Color(0x80808080) self.assertEqual(c1.r, 128) self.assertEqual(c1.g, 128) self.assertEqual(c1.b, 128) self.assertEqual(c1.a, 128) c2 = pygame.Color(2, 4, 8, 16) self.assertEqual(c2.r, 2) self.assertEqual(c2.g, 4) self.assertEqual(c2.b, 8) self.assertEqual(c2.a, 16) c3 = c1 // c2 self.assertEqual(c3.r, 64) self.assertEqual(c3.g, 32) self.assertEqual(c3.b, 16) self.assertEqual(c3.a, 8) c3 = c3 // c2 self.assertEqual(c3.r, 32) self.assertEqual(c3.g, 8) self.assertEqual(c3.b, 2) self.assertEqual(c3.a, 0) # Issue #286: Is type checking done for Python 3.x? self.assertRaises(TypeError, operator.floordiv, c1, None) self.assertRaises(TypeError, operator.floordiv, None, c1) # Division by zero check dividend = pygame.Color(255, 255, 255, 255) for i in range(4): divisor = pygame.Color(64, 64, 64, 64) divisor[i] = 0 quotient = pygame.Color(3, 3, 3, 3) quotient[i] = 0 self.assertEqual(dividend // divisor, quotient) def test_mod(self): c1 = pygame.Color(0xFFFFFFFF) self.assertEqual(c1.r, 255) self.assertEqual(c1.g, 255) self.assertEqual(c1.b, 255) self.assertEqual(c1.a, 255) c2 = pygame.Color(2, 4, 8, 16) self.assertEqual(c2.r, 2) self.assertEqual(c2.g, 4) self.assertEqual(c2.b, 8) self.assertEqual(c2.a, 16) c3 = c1 % c2 self.assertEqual(c3.r, 1) self.assertEqual(c3.g, 3) self.assertEqual(c3.b, 7) self.assertEqual(c3.a, 15) # Issue #286: Is type checking done for Python 3.x? self.assertRaises(TypeError, operator.mod, c1, None) self.assertRaises(TypeError, operator.mod, None, c1) # Division by zero check dividend = pygame.Color(255, 255, 255, 255) for i in range(4): divisor = pygame.Color(64, 64, 64, 64) divisor[i] = 0 quotient = pygame.Color(63, 63, 63, 63) quotient[i] = 0 self.assertEqual(dividend % divisor, quotient) def test_float(self): c = pygame.Color(0xCC00CC00) self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 0) self.assertEqual(float(c), float(0xCC00CC00)) c = pygame.Color(0x33727592) self.assertEqual(c.r, 51) self.assertEqual(c.g, 114) self.assertEqual(c.b, 117) self.assertEqual(c.a, 146) self.assertEqual(float(c), float(0x33727592)) def test_oct(self): c = pygame.Color(0xCC00CC00) self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 0) self.assertEqual(oct(c), oct(0xCC00CC00)) c = pygame.Color(0x33727592) self.assertEqual(c.r, 51) self.assertEqual(c.g, 114) self.assertEqual(c.b, 117) self.assertEqual(c.a, 146) self.assertEqual(oct(c), oct(0x33727592)) def test_hex(self): c = pygame.Color(0xCC00CC00) self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 0) self.assertEqual(hex(c), hex(0xCC00CC00)) c = pygame.Color(0x33727592) self.assertEqual(c.r, 51) self.assertEqual(c.g, 114) self.assertEqual(c.b, 117) self.assertEqual(c.a, 146) self.assertEqual(hex(c), hex(0x33727592)) def test_webstyle(self): c = pygame.Color("#CC00CC11") self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 17) self.assertEqual(hex(c), hex(0xCC00CC11)) c = pygame.Color("#CC00CC") self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 255) self.assertEqual(hex(c), hex(0xCC00CCFF)) c = pygame.Color("0xCC00CC11") self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 17) self.assertEqual(hex(c), hex(0xCC00CC11)) c = pygame.Color("0xCC00CC") self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 255) self.assertEqual(hex(c), hex(0xCC00CCFF)) self.assertRaises(ValueError, pygame.Color, "#cc00qq") self.assertRaises(ValueError, pygame.Color, "0xcc00qq") self.assertRaises(ValueError, pygame.Color, "09abcdef") self.assertRaises(ValueError, pygame.Color, "09abcde") self.assertRaises(ValueError, pygame.Color, "quarky") def test_int(self): # This will be a long c = pygame.Color(0xCC00CC00) self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 0) self.assertEqual(int(c), int(0xCC00CC00)) # This will be an int c = pygame.Color(0x33727592) self.assertEqual(c.r, 51) self.assertEqual(c.g, 114) self.assertEqual(c.b, 117) self.assertEqual(c.a, 146) self.assertEqual(int(c), int(0x33727592)) def test_long(self): # This will be a long c = pygame.Color(0xCC00CC00) self.assertEqual(c.r, 204) self.assertEqual(c.g, 0) self.assertEqual(c.b, 204) self.assertEqual(c.a, 0) self.assertEqual(int(c), int(0xCC00CC00)) # This will be an int c = pygame.Color(0x33727592) self.assertEqual(c.r, 51) self.assertEqual(c.g, 114) self.assertEqual(c.b, 117) self.assertEqual(c.a, 146) self.assertEqual(int(c), int(0x33727592)) def test_normalize(self): c = pygame.Color(204, 38, 194, 55) self.assertEqual(c.r, 204) self.assertEqual(c.g, 38) self.assertEqual(c.b, 194) self.assertEqual(c.a, 55) t = c.normalize() self.assertAlmostEqual(t[0], 0.800000, 5) self.assertAlmostEqual(t[1], 0.149016, 5) self.assertAlmostEqual(t[2], 0.760784, 5) self.assertAlmostEqual(t[3], 0.215686, 5) def test_len(self): c = pygame.Color(204, 38, 194, 55) self.assertEqual(len(c), 4) def test_get_item(self): c = pygame.Color(204, 38, 194, 55) self.assertEqual(c[0], 204) self.assertEqual(c[1], 38) self.assertEqual(c[2], 194) self.assertEqual(c[3], 55) def test_set_item(self): c = pygame.Color(204, 38, 194, 55) self.assertEqual(c[0], 204) self.assertEqual(c[1], 38) self.assertEqual(c[2], 194) self.assertEqual(c[3], 55) c[0] = 33 self.assertEqual(c[0], 33) c[1] = 48 self.assertEqual(c[1], 48) c[2] = 173 self.assertEqual(c[2], 173) c[3] = 213 self.assertEqual(c[3], 213) # Now try some 'invalid' ones self.assertRaises(TypeError, _assign_item, c, 0, 95.485) self.assertEqual(c[0], 33) self.assertRaises(ValueError, _assign_item, c, 1, -83) self.assertEqual(c[1], 48) self.assertRaises(TypeError, _assign_item, c, 2, "Hello") self.assertEqual(c[2], 173) def test_Color_type_works_for_Surface_get_and_set_colorkey(self): s = pygame.Surface((32, 32)) c = pygame.Color(33, 22, 11, 255) s.set_colorkey(c) get_r, get_g, get_b, get_a = s.get_colorkey() self.assertTrue(get_r == c.r) self.assertTrue(get_g == c.g) self.assertTrue(get_b == c.b) self.assertTrue(get_a == c.a) ########## HSLA, HSVA, CMY, I1I2I3 ALL ELEMENTS WITHIN SPECIFIED RANGE ######### def test_hsla__all_elements_within_limits(self): for c in rgba_combos_Color_generator(): h, s, l, a = c.hsla self.assertTrue(0 <= h <= 360) self.assertTrue(0 <= s <= 100) self.assertTrue(0 <= l <= 100) self.assertTrue(0 <= a <= 100) def test_hsva__all_elements_within_limits(self): for c in rgba_combos_Color_generator(): h, s, v, a = c.hsva self.assertTrue(0 <= h <= 360) self.assertTrue(0 <= s <= 100) self.assertTrue(0 <= v <= 100) self.assertTrue(0 <= a <= 100) def test_cmy__all_elements_within_limits(self): for c in rgba_combos_Color_generator(): c, m, y = c.cmy self.assertTrue(0 <= c <= 1) self.assertTrue(0 <= m <= 1) self.assertTrue(0 <= y <= 1) def test_i1i2i3__all_elements_within_limits(self): for c in rgba_combos_Color_generator(): i1, i2, i3 = c.i1i2i3 self.assertTrue(0 <= i1 <= 1) self.assertTrue(-0.5 <= i2 <= 0.5) self.assertTrue(-0.5 <= i3 <= 0.5) def test_issue_269(self): """PyColor OverflowError on HSVA with hue value of 360 >>> c = pygame.Color(0) >>> c.hsva = (360,0,0,0) Traceback (most recent call last): File "", line 1, in OverflowError: this is not allowed to happen ever >>> pygame.ver '1.9.1release' >>> """ c = pygame.Color(0) c.hsva = 360, 0, 0, 0 self.assertEqual(c.hsva, (0, 0, 0, 0)) c.hsva = 360, 100, 100, 100 self.assertEqual(c.hsva, (0, 100, 100, 100)) self.assertEqual(c, (255, 0, 0, 255)) ####################### COLORSPACE PROPERTY SANITY TESTS ####################### def colorspaces_converted_should_not_raise(self, prop): fails = 0 x = 0 for c in rgba_combos_Color_generator(): x += 1 other = pygame.Color(0) try: setattr(other, prop, getattr(c, prop)) # eg other.hsla = c.hsla except ValueError: fails += 1 self.assertTrue(x > 0, "x is combination counter, 0 means no tests!") self.assertTrue((fails, x) == (0, x)) def test_hsla__sanity_testing_converted_should_not_raise(self): self.colorspaces_converted_should_not_raise("hsla") def test_hsva__sanity_testing_converted_should_not_raise(self): self.colorspaces_converted_should_not_raise("hsva") def test_cmy__sanity_testing_converted_should_not_raise(self): self.colorspaces_converted_should_not_raise("cmy") def test_i1i2i3__sanity_testing_converted_should_not_raise(self): self.colorspaces_converted_should_not_raise("i1i2i3") ################################################################################ def colorspaces_converted_should_equate_bar_rounding(self, prop): for c in rgba_combos_Color_generator(): other = pygame.Color(0) try: setattr(other, prop, getattr(c, prop)) # eg other.hsla = c.hsla self.assertTrue(abs(other.r - c.r) <= 1) self.assertTrue(abs(other.b - c.b) <= 1) self.assertTrue(abs(other.g - c.g) <= 1) # CMY and I1I2I3 do not care about the alpha if prop not in ("cmy", "i1i2i3"): self.assertTrue(abs(other.a - c.a) <= 1) except ValueError: pass # other tests will notify, this tests equation def test_hsla__sanity_testing_converted_should_equate_bar_rounding(self): self.colorspaces_converted_should_equate_bar_rounding("hsla") def test_hsva__sanity_testing_converted_should_equate_bar_rounding(self): self.colorspaces_converted_should_equate_bar_rounding("hsva") def test_cmy__sanity_testing_converted_should_equate_bar_rounding(self): self.colorspaces_converted_should_equate_bar_rounding("cmy") def test_i1i2i3__sanity_testing_converted_should_equate_bar_rounding(self): self.colorspaces_converted_should_equate_bar_rounding("i1i2i3") ################################################################################ def test_correct_gamma__verified_against_python_implementation(self): "|tags:slow|" # gamma_correct defined at top of page gammas = [i / 10.0 for i in range(1, 31)] # [0.1 ... 3.0] gammas_len = len(gammas) for i, c in enumerate(rgba_combos_Color_generator()): gamma = gammas[i % gammas_len] corrected = pygame.Color(*[gamma_correct(x, gamma) for x in tuple(c)]) lib_corrected = c.correct_gamma(gamma) self.assertTrue(corrected.r == lib_corrected.r) self.assertTrue(corrected.g == lib_corrected.g) self.assertTrue(corrected.b == lib_corrected.b) self.assertTrue(corrected.a == lib_corrected.a) # TODO: test against statically defined verified _correct_ values # assert corrected.r == 125 etc. def test_pickle(self): import pickle c1 = pygame.Color(1, 2, 3, 4) # c2 = pygame.Color(255,254,253,252) pickle_string = pickle.dumps(c1) c1_frompickle = pickle.loads(pickle_string) self.assertEqual(c1, c1_frompickle) ################################################################################ # only available if ctypes module is also available @unittest.skipIf(IS_PYPY, "PyPy has no ctypes") def test_arraystruct(self): import pygame.tests.test_utils.arrinter as ai import ctypes as ct c_byte_p = ct.POINTER(ct.c_byte) c = pygame.Color(5, 7, 13, 23) flags = ai.PAI_CONTIGUOUS | ai.PAI_FORTRAN | ai.PAI_ALIGNED | ai.PAI_NOTSWAPPED for i in range(1, 5): c.set_length(i) inter = ai.ArrayInterface(c) self.assertEqual(inter.two, 2) self.assertEqual(inter.nd, 1) self.assertEqual(inter.typekind, "u") self.assertEqual(inter.itemsize, 1) self.assertEqual(inter.flags, flags) self.assertEqual(inter.shape[0], i) self.assertEqual(inter.strides[0], 1) data = ct.cast(inter.data, c_byte_p) for j in range(i): self.assertEqual(data[j], c[j]) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf(self): from pygame.tests.test_utils import buftools from ctypes import cast, POINTER, c_uint8 class ColorImporter(buftools.Importer): def __init__(self, color, flags): super().__init__(color, flags) self.items = cast(self.buf, POINTER(c_uint8)) def __getitem__(self, index): if 0 <= index < 4: return self.items[index] raise IndexError(f"valid index values are between 0 and 3: got {index}") def __setitem__(self, index, value): if 0 <= index < 4: self.items[index] = value else: raise IndexError( f"valid index values are between 0 and 3: got {index}" ) c = pygame.Color(50, 100, 150, 200) imp = ColorImporter(c, buftools.PyBUF_SIMPLE) self.assertTrue(imp.obj is c) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.itemsize, 1) self.assertEqual(imp.len, 4) self.assertTrue(imp.readonly) self.assertTrue(imp.format is None) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) for i in range(4): self.assertEqual(c[i], imp[i]) imp[0] = 60 self.assertEqual(c.r, 60) imp[1] = 110 self.assertEqual(c.g, 110) imp[2] = 160 self.assertEqual(c.b, 160) imp[3] = 210 self.assertEqual(c.a, 210) imp = ColorImporter(c, buftools.PyBUF_FORMAT) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.itemsize, 1) self.assertEqual(imp.len, 4) self.assertEqual(imp.format, "B") self.assertEqual(imp.ndim, 0) self.assertEqual(imp.itemsize, 1) self.assertEqual(imp.len, 4) imp = ColorImporter(c, buftools.PyBUF_ND) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.itemsize, 1) self.assertEqual(imp.len, 4) self.assertTrue(imp.format is None) self.assertEqual(imp.shape, (4,)) self.assertEqual(imp.strides, None) imp = ColorImporter(c, buftools.PyBUF_STRIDES) self.assertEqual(imp.ndim, 1) self.assertTrue(imp.format is None) self.assertEqual(imp.shape, (4,)) self.assertEqual(imp.strides, (1,)) imp = ColorImporter(c, buftools.PyBUF_C_CONTIGUOUS) self.assertEqual(imp.ndim, 1) imp = ColorImporter(c, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(imp.ndim, 1) imp = ColorImporter(c, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(imp.ndim, 1) for i in range(1, 5): c.set_length(i) imp = ColorImporter(c, buftools.PyBUF_ND) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.len, i) self.assertEqual(imp.shape, (i,)) self.assertRaises(BufferError, ColorImporter, c, buftools.PyBUF_WRITABLE) def test_color_iter(self): c = pygame.Color(50, 100, 150, 200) # call __iter__ explicitly to test that it is defined color_iterator = c.__iter__() for i, val in enumerate(color_iterator): self.assertEqual(c[i], val) def test_color_contains(self): c = pygame.Color(50, 60, 70) # call __contains__ explicitly to test that it is defined self.assertTrue(c.__contains__(50)) self.assertTrue(60 in c) self.assertTrue(70 in c) self.assertFalse(100 in c) self.assertFalse(c.__contains__(10)) self.assertRaises(TypeError, lambda: "string" in c) self.assertRaises(TypeError, lambda: 3.14159 in c) def test_grayscale(self): Color = pygame.color.Color color = Color(255, 0, 0, 255) self.assertEqual(color.grayscale(), Color(76, 76, 76, 255)) color = Color(3, 5, 7, 255) self.assertEqual(color.grayscale(), Color(4, 4, 4, 255)) color = Color(3, 5, 70, 255) self.assertEqual(color.grayscale(), Color(11, 11, 11, 255)) color = Color(3, 50, 70, 255) self.assertEqual(color.grayscale(), Color(38, 38, 38, 255)) color = Color(30, 50, 70, 255) self.assertEqual(color.grayscale(), Color(46, 46, 46, 255)) color = Color(255, 0, 0, 144) self.assertEqual(color.grayscale(), Color(76, 76, 76, 144)) color = Color(3, 5, 7, 144) self.assertEqual(color.grayscale(), Color(4, 4, 4, 144)) color = Color(3, 5, 70, 144) self.assertEqual(color.grayscale(), Color(11, 11, 11, 144)) color = Color(3, 50, 70, 144) self.assertEqual(color.grayscale(), Color(38, 38, 38, 144)) color = Color(30, 50, 70, 144) self.assertEqual(color.grayscale(), Color(46, 46, 46, 144)) def test_lerp(self): # setup Color = pygame.color.Color color0 = Color(0, 0, 0, 0) color128 = Color(128, 128, 128, 128) color255 = Color(255, 255, 255, 255) color100 = Color(100, 100, 100, 100) # type checking self.assertTrue(isinstance(color0.lerp(color128, 0.5), Color)) # common value testing self.assertEqual(color0.lerp(color128, 0.5), Color(64, 64, 64, 64)) self.assertEqual(color0.lerp(color128, 0.5), Color(64, 64, 64, 64)) self.assertEqual(color128.lerp(color255, 0.5), Color(192, 192, 192, 192)) self.assertEqual(color0.lerp(color255, 0.5), Color(128, 128, 128, 128)) # testing extremes self.assertEqual(color0.lerp(color100, 0), color0) self.assertEqual(color0.lerp(color100, 0.01), Color(1, 1, 1, 1)) self.assertEqual(color0.lerp(color100, 0.99), Color(99, 99, 99, 99)) self.assertEqual(color0.lerp(color100, 1), color100) # kwarg testing self.assertEqual(color0.lerp(color=color100, amount=0.5), Color(50, 50, 50, 50)) self.assertEqual(color0.lerp(amount=0.5, color=color100), Color(50, 50, 50, 50)) # invalid input testing self.assertRaises(ValueError, lambda: color0.lerp(color128, 2.5)) self.assertRaises(ValueError, lambda: color0.lerp(color128, -0.5)) self.assertRaises(ValueError, lambda: color0.lerp((256, 0, 0, 0), 0.5)) self.assertRaises(ValueError, lambda: color0.lerp((0, 256, 0, 0), 0.5)) self.assertRaises(ValueError, lambda: color0.lerp((0, 0, 256, 0), 0.5)) self.assertRaises(ValueError, lambda: color0.lerp((0, 0, 0, 256), 0.5)) self.assertRaises(TypeError, lambda: color0.lerp(0.2, 0.5)) def test_premul_alpha(self): # setup Color = pygame.color.Color color0 = Color(0, 0, 0, 0) alpha0 = Color(255, 255, 255, 0) alpha49 = Color(255, 0, 0, 49) alpha67 = Color(0, 255, 0, 67) alpha73 = Color(0, 0, 255, 73) alpha128 = Color(255, 255, 255, 128) alpha199 = Color(255, 255, 255, 199) alpha255 = Color(128, 128, 128, 255) # type checking self.assertTrue(isinstance(color0.premul_alpha(), Color)) # hand crafted value testing self.assertEqual(alpha0.premul_alpha(), Color(0, 0, 0, 0)) self.assertEqual(alpha49.premul_alpha(), Color(49, 0, 0, 49)) self.assertEqual(alpha67.premul_alpha(), Color(0, 67, 0, 67)) self.assertEqual(alpha73.premul_alpha(), Color(0, 0, 73, 73)) self.assertEqual(alpha128.premul_alpha(), Color(128, 128, 128, 128)) self.assertEqual(alpha199.premul_alpha(), Color(199, 199, 199, 199)) self.assertEqual(alpha255.premul_alpha(), Color(128, 128, 128, 255)) # full range of alpha auto sub-testing test_colors = [ (200, 30, 74), (76, 83, 24), (184, 21, 6), (74, 4, 74), (76, 83, 24), (184, 21, 234), (160, 30, 74), (96, 147, 204), (198, 201, 60), (132, 89, 74), (245, 9, 224), (184, 112, 6), ] for r, g, b in test_colors: for a in range(255): with self.subTest(r=r, g=g, b=b, a=a): alpha = a / 255.0 self.assertEqual( Color(r, g, b, a).premul_alpha(), Color( ((r + 1) * a) >> 8, ((g + 1) * a) >> 8, ((b + 1) * a) >> 8, a, ), ) def test_update(self): c = pygame.color.Color(0, 0, 0) c.update(1, 2, 3, 4) self.assertEqual(c.r, 1) self.assertEqual(c.g, 2) self.assertEqual(c.b, 3) self.assertEqual(c.a, 4) c = pygame.color.Color(0, 0, 0) c.update([1, 2, 3, 4]) self.assertEqual(c.r, 1) self.assertEqual(c.g, 2) self.assertEqual(c.b, 3) self.assertEqual(c.a, 4) c = pygame.color.Color(0, 0, 0) c2 = pygame.color.Color(1, 2, 3, 4) c.update(c2) self.assertEqual(c.r, 1) self.assertEqual(c.g, 2) self.assertEqual(c.b, 3) self.assertEqual(c.a, 4) c = pygame.color.Color(1, 1, 1) c.update("black") self.assertEqual(c.r, 0) self.assertEqual(c.g, 0) self.assertEqual(c.b, 0) self.assertEqual(c.a, 255) c = pygame.color.Color(0, 0, 0, 120) c.set_length(3) c.update(1, 2, 3) self.assertEqual(len(c), 3) c.set_length(4) self.assertEqual(c[3], 120) c.set_length(3) c.update(1, 2, 3, 4) self.assertEqual(len(c), 4) def test_collection_abc(self): c = pygame.Color(64, 70, 75, 255) self.assertTrue(isinstance(c, Collection)) self.assertFalse(isinstance(c, Sequence)) class SubclassTest(unittest.TestCase): class MyColor(pygame.Color): def __init__(self, *args, **kwds): super(SubclassTest.MyColor, self).__init__(*args, **kwds) self.an_attribute = True def test_add(self): mc1 = self.MyColor(128, 128, 128, 255) self.assertTrue(mc1.an_attribute) c2 = pygame.Color(64, 64, 64, 255) mc2 = mc1 + c2 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") c3 = c2 + mc1 self.assertTrue(type(c3) is pygame.Color) def test_sub(self): mc1 = self.MyColor(128, 128, 128, 255) self.assertTrue(mc1.an_attribute) c2 = pygame.Color(64, 64, 64, 255) mc2 = mc1 - c2 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") c3 = c2 - mc1 self.assertTrue(type(c3) is pygame.Color) def test_mul(self): mc1 = self.MyColor(128, 128, 128, 255) self.assertTrue(mc1.an_attribute) c2 = pygame.Color(64, 64, 64, 255) mc2 = mc1 * c2 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") c3 = c2 * mc1 self.assertTrue(type(c3) is pygame.Color) def test_div(self): mc1 = self.MyColor(128, 128, 128, 255) self.assertTrue(mc1.an_attribute) c2 = pygame.Color(64, 64, 64, 255) mc2 = mc1 // c2 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") c3 = c2 // mc1 self.assertTrue(type(c3) is pygame.Color) def test_mod(self): mc1 = self.MyColor(128, 128, 128, 255) self.assertTrue(mc1.an_attribute) c2 = pygame.Color(64, 64, 64, 255) mc2 = mc1 % c2 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") c3 = c2 % mc1 self.assertTrue(type(c3) is pygame.Color) def test_inv(self): mc1 = self.MyColor(64, 64, 64, 64) self.assertTrue(mc1.an_attribute) mc2 = ~mc1 self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") def test_correct_gamma(self): mc1 = self.MyColor(64, 70, 75, 255) self.assertTrue(mc1.an_attribute) mc2 = mc1.correct_gamma(0.03) self.assertTrue(isinstance(mc2, self.MyColor)) self.assertRaises(AttributeError, getattr, mc2, "an_attribute") def test_collection_abc(self): mc1 = self.MyColor(64, 70, 75, 255) self.assertTrue(isinstance(mc1, Collection)) self.assertFalse(isinstance(mc1, Sequence)) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/constants_test.py0000644000175100001770000002213414676242340017025 0ustar00runnerdockerimport unittest import pygame.constants # K_* and KSCAN_* common names. K_AND_KSCAN_COMMON_NAMES = ( "UNKNOWN", "BACKSPACE", "TAB", "CLEAR", "RETURN", "PAUSE", "ESCAPE", "SPACE", "COMMA", "MINUS", "PERIOD", "SLASH", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "SEMICOLON", "EQUALS", "LEFTBRACKET", "BACKSLASH", "RIGHTBRACKET", "DELETE", "KP0", "KP1", "KP2", "KP3", "KP4", "KP5", "KP6", "KP7", "KP8", "KP9", "KP_PERIOD", "KP_DIVIDE", "KP_MULTIPLY", "KP_MINUS", "KP_PLUS", "KP_ENTER", "KP_EQUALS", "UP", "DOWN", "RIGHT", "LEFT", "INSERT", "HOME", "END", "PAGEUP", "PAGEDOWN", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "NUMLOCK", "CAPSLOCK", "SCROLLOCK", "RSHIFT", "LSHIFT", "RCTRL", "LCTRL", "RALT", "LALT", "RMETA", "LMETA", "LSUPER", "RSUPER", "MODE", "HELP", "PRINT", "SYSREQ", "BREAK", "MENU", "POWER", "EURO", "KP_0", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", "KP_8", "KP_9", "NUMLOCKCLEAR", "SCROLLLOCK", "RGUI", "LGUI", "PRINTSCREEN", "CURRENCYUNIT", "CURRENCYSUBUNIT", ) # Constants that have the same value. K_AND_KSCAN_COMMON_OVERLAPS = ( ("KP0", "KP_0"), ("KP1", "KP_1"), ("KP2", "KP_2"), ("KP3", "KP_3"), ("KP4", "KP_4"), ("KP5", "KP_5"), ("KP6", "KP_6"), ("KP7", "KP_7"), ("KP8", "KP_8"), ("KP9", "KP_9"), ("NUMLOCK", "NUMLOCKCLEAR"), ("SCROLLOCK", "SCROLLLOCK"), ("LSUPER", "LMETA", "LGUI"), ("RSUPER", "RMETA", "RGUI"), ("PRINT", "PRINTSCREEN"), ("BREAK", "PAUSE"), ("EURO", "CURRENCYUNIT"), ) def create_overlap_set(constant_names): """Helper function to find overlapping constant values/names. Returns a set of fronzensets: set(frozenset(names of overlapping constants), ...) """ # Create an overlap dict. overlap_dict = {} for name in constant_names: value = getattr(pygame.constants, name) overlap_dict.setdefault(value, set()).add(name) # Get all entries with more than 1 value. overlaps = set() for overlap_names in overlap_dict.values(): if len(overlap_names) > 1: overlaps.add(frozenset(overlap_names)) return overlaps class KConstantsTests(unittest.TestCase): """Test K_* (key) constants.""" # K_* specific names. K_SPECIFIC_NAMES = ( "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "QUOTE", "BACKQUOTE", "EXCLAIM", "QUOTEDBL", "HASH", "DOLLAR", "AMPERSAND", "LEFTPAREN", "RIGHTPAREN", "ASTERISK", "PLUS", "COLON", "LESS", "GREATER", "QUESTION", "AT", "CARET", "UNDERSCORE", "PERCENT", ) # Create a sequence of all the K_* constant names. K_NAMES = tuple("K_" + n for n in K_AND_KSCAN_COMMON_NAMES + K_SPECIFIC_NAMES) def test_k__existence(self): """Ensures K constants exist.""" for name in self.K_NAMES: self.assertTrue(hasattr(pygame.constants, name), f"missing constant {name}") def test_k__type(self): """Ensures K constants are the correct type.""" for name in self.K_NAMES: value = getattr(pygame.constants, name) self.assertIs(type(value), int) def test_k__value_overlap(self): """Ensures no unexpected K constant values overlap.""" EXPECTED_OVERLAPS = { frozenset("K_" + n for n in item) for item in K_AND_KSCAN_COMMON_OVERLAPS } overlaps = create_overlap_set(self.K_NAMES) self.assertSetEqual(overlaps, EXPECTED_OVERLAPS) class KscanConstantsTests(unittest.TestCase): """Test KSCAN_* (scancode) constants.""" # KSCAN_* specific names. KSCAN_SPECIFIC_NAMES = ( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "APOSTROPHE", "GRAVE", "INTERNATIONAL1", "INTERNATIONAL2", "INTERNATIONAL3", "INTERNATIONAL4", "INTERNATIONAL5", "INTERNATIONAL6", "INTERNATIONAL7", "INTERNATIONAL8", "INTERNATIONAL9", "LANG1", "LANG2", "LANG3", "LANG4", "LANG5", "LANG6", "LANG7", "LANG8", "LANG9", "NONUSBACKSLASH", "NONUSHASH", ) # Create a sequence of all the KSCAN_* constant names. KSCAN_NAMES = tuple( "KSCAN_" + n for n in K_AND_KSCAN_COMMON_NAMES + KSCAN_SPECIFIC_NAMES ) def test_kscan__existence(self): """Ensures KSCAN constants exist.""" for name in self.KSCAN_NAMES: self.assertTrue(hasattr(pygame.constants, name), f"missing constant {name}") def test_kscan__type(self): """Ensures KSCAN constants are the correct type.""" for name in self.KSCAN_NAMES: value = getattr(pygame.constants, name) self.assertIs(type(value), int) def test_kscan__value_overlap(self): """Ensures no unexpected KSCAN constant values overlap.""" EXPECTED_OVERLAPS = { frozenset("KSCAN_" + n for n in item) for item in K_AND_KSCAN_COMMON_OVERLAPS } overlaps = create_overlap_set(self.KSCAN_NAMES) self.assertSetEqual(overlaps, EXPECTED_OVERLAPS) class KmodConstantsTests(unittest.TestCase): """Test KMOD_* (key modifier) constants.""" # KMOD_* constant names. KMOD_CONSTANTS = ( "KMOD_NONE", "KMOD_LSHIFT", "KMOD_RSHIFT", "KMOD_SHIFT", "KMOD_LCTRL", "KMOD_RCTRL", "KMOD_CTRL", "KMOD_LALT", "KMOD_RALT", "KMOD_ALT", "KMOD_LMETA", "KMOD_RMETA", "KMOD_META", "KMOD_NUM", "KMOD_CAPS", "KMOD_MODE", "KMOD_LGUI", "KMOD_RGUI", "KMOD_GUI", ) def test_kmod__existence(self): """Ensures KMOD constants exist.""" for name in self.KMOD_CONSTANTS: self.assertTrue(hasattr(pygame.constants, name), f"missing constant {name}") def test_kmod__type(self): """Ensures KMOD constants are the correct type.""" for name in self.KMOD_CONSTANTS: value = getattr(pygame.constants, name) self.assertIs(type(value), int) def test_kmod__value_overlap(self): """Ensures no unexpected KMOD constant values overlap.""" # KMODs that have the same values. EXPECTED_OVERLAPS = { frozenset(["KMOD_LGUI", "KMOD_LMETA"]), frozenset(["KMOD_RGUI", "KMOD_RMETA"]), frozenset(["KMOD_GUI", "KMOD_META"]), } overlaps = create_overlap_set(self.KMOD_CONSTANTS) self.assertSetEqual(overlaps, EXPECTED_OVERLAPS) def test_kmod__no_bitwise_overlap(self): """Ensures certain KMOD constants have no overlapping bits.""" NO_BITWISE_OVERLAP = ( "KMOD_NONE", "KMOD_LSHIFT", "KMOD_RSHIFT", "KMOD_LCTRL", "KMOD_RCTRL", "KMOD_LALT", "KMOD_RALT", "KMOD_LMETA", "KMOD_RMETA", "KMOD_NUM", "KMOD_CAPS", "KMOD_MODE", ) kmods = 0 for name in NO_BITWISE_OVERLAP: value = getattr(pygame.constants, name) self.assertFalse(kmods & value) kmods |= value def test_kmod__bitwise_overlap(self): """Ensures certain KMOD constants have overlapping bits.""" # KMODS that are comprised of other KMODs. KMOD_COMPRISED_DICT = { "KMOD_SHIFT": ("KMOD_LSHIFT", "KMOD_RSHIFT"), "KMOD_CTRL": ("KMOD_LCTRL", "KMOD_RCTRL"), "KMOD_ALT": ("KMOD_LALT", "KMOD_RALT"), "KMOD_META": ("KMOD_LMETA", "KMOD_RMETA"), "KMOD_GUI": ("KMOD_LGUI", "KMOD_RGUI"), } for base_name, seq_names in KMOD_COMPRISED_DICT.items(): expected_value = 0 # Reset. for name in seq_names: expected_value |= getattr(pygame.constants, name) value = getattr(pygame.constants, base_name) self.assertEqual(value, expected_value) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/controller_test.py0000644000175100001770000002512214676242340017174 0ustar00runnerdockerimport unittest import pygame import pygame._sdl2.controller as controller from pygame.tests.test_utils import prompt, question class ControllerModuleTest(unittest.TestCase): def setUp(self): controller.init() def tearDown(self): controller.quit() def test_init(self): controller.quit() controller.init() self.assertTrue(controller.get_init()) def test_init__multiple(self): controller.init() controller.init() self.assertTrue(controller.get_init()) def test_quit(self): controller.quit() self.assertFalse(controller.get_init()) def test_quit__multiple(self): controller.quit() controller.quit() self.assertFalse(controller.get_init()) def test_get_init(self): self.assertTrue(controller.get_init()) def test_get_eventstate(self): controller.set_eventstate(True) self.assertTrue(controller.get_eventstate()) controller.set_eventstate(False) self.assertFalse(controller.get_eventstate()) controller.set_eventstate(True) def test_get_count(self): self.assertGreaterEqual(controller.get_count(), 0) def test_is_controller(self): for i in range(controller.get_count()): if controller.is_controller(i): c = controller.Controller(i) self.assertIsInstance(c, controller.Controller) c.quit() else: with self.assertRaises(pygame._sdl2.sdl2.error): c = controller.Controller(i) with self.assertRaises(TypeError): controller.is_controller("Test") def test_name_forindex(self): self.assertIsNone(controller.name_forindex(-1)) class ControllerTypeTest(unittest.TestCase): def setUp(self): controller.init() def tearDown(self): controller.quit() def _get_first_controller(self): for i in range(controller.get_count()): if controller.is_controller(i): return controller.Controller(i) def test_construction(self): c = self._get_first_controller() if c: self.assertIsInstance(c, controller.Controller) else: self.skipTest("No controller connected") def test__auto_init(self): c = self._get_first_controller() if c: self.assertTrue(c.get_init()) else: self.skipTest("No controller connected") def test_get_init(self): c = self._get_first_controller() if c: self.assertTrue(c.get_init()) c.quit() self.assertFalse(c.get_init()) else: self.skipTest("No controller connected") def test_from_joystick(self): for i in range(controller.get_count()): if controller.is_controller(i): joy = pygame.joystick.Joystick(i) break else: self.skipTest("No controller connected") c = controller.Controller.from_joystick(joy) self.assertIsInstance(c, controller.Controller) def test_as_joystick(self): c = self._get_first_controller() if c: joy = c.as_joystick() self.assertIsInstance(joy, type(pygame.joystick.Joystick(0))) else: self.skipTest("No controller connected") def test_get_mapping(self): c = self._get_first_controller() if c: mapping = c.get_mapping() self.assertIsInstance(mapping, dict) self.assertIsNotNone(mapping["a"]) else: self.skipTest("No controller connected") def test_set_mapping(self): c = self._get_first_controller() if c: mapping = c.get_mapping() mapping["a"] = "b3" mapping["y"] = "b0" c.set_mapping(mapping) new_mapping = c.get_mapping() self.assertEqual(len(mapping), len(new_mapping)) for i in mapping: if mapping[i] not in ("a", "y"): self.assertEqual(mapping[i], new_mapping[i]) else: if i == "a": self.assertEqual(new_mapping[i], mapping["y"]) else: self.assertEqual(new_mapping[i], mapping["a"]) else: self.skipTest("No controller connected") class ControllerInteractiveTest(unittest.TestCase): __tags__ = ["interactive"] def _get_first_controller(self): for i in range(controller.get_count()): if controller.is_controller(i): return controller.Controller(i) def setUp(self): controller.init() def tearDown(self): controller.quit() def test__get_count_interactive(self): prompt( "Please connect at least one controller " "before the test for controller.get_count() starts" ) # Reset the number of joysticks counted controller.quit() controller.init() joystick_num = controller.get_count() ans = question( "get_count() thinks there are {} joysticks " "connected. Is that correct?".format(joystick_num) ) self.assertTrue(ans) def test_set_eventstate_on_interactive(self): c = self._get_first_controller() if not c: self.skipTest("No controller connected") pygame.display.init() pygame.font.init() screen = pygame.display.set_mode((400, 400)) font = pygame.font.Font(None, 20) running = True screen.fill((255, 255, 255)) screen.blit( font.render("Press button 'x' (on ps4) or 'a' (on xbox).", True, (0, 0, 0)), (0, 0), ) pygame.display.update() controller.set_eventstate(True) while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False if event.type == pygame.CONTROLLERBUTTONDOWN: running = False pygame.display.quit() pygame.font.quit() def test_set_eventstate_off_interactive(self): c = self._get_first_controller() if not c: self.skipTest("No controller connected") pygame.display.init() pygame.font.init() screen = pygame.display.set_mode((400, 400)) font = pygame.font.Font(None, 20) running = True screen.fill((255, 255, 255)) screen.blit( font.render("Press button 'x' (on ps4) or 'a' (on xbox).", True, (0, 0, 0)), (0, 0), ) pygame.display.update() controller.set_eventstate(False) while running: for event in pygame.event.get(pygame.QUIT): if event: running = False if c.get_button(pygame.CONTROLLER_BUTTON_A): if pygame.event.peek(pygame.CONTROLLERBUTTONDOWN): pygame.display.quit() pygame.font.quit() self.fail() else: running = False pygame.display.quit() pygame.font.quit() def test_get_button_interactive(self): c = self._get_first_controller() if not c: self.skipTest("No controller connected") pygame.display.init() pygame.font.init() screen = pygame.display.set_mode((400, 400)) font = pygame.font.Font(None, 20) running = True label1 = font.render( "Press button 'x' (on ps4) or 'a' (on xbox).", True, (0, 0, 0) ) label2 = font.render( 'The two values should match up. Press "y" or "n" to confirm.', True, (0, 0, 0), ) is_pressed = [False, False] # event, get_button() while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False if event.type == pygame.CONTROLLERBUTTONDOWN and event.button == 0: is_pressed[0] = True if event.type == pygame.CONTROLLERBUTTONUP and event.button == 0: is_pressed[0] = False if event.type == pygame.KEYDOWN: if event.key == pygame.K_y: running = False if event.key == pygame.K_n: running = False pygame.display.quit() pygame.font.quit() self.fail() is_pressed[1] = c.get_button(pygame.CONTROLLER_BUTTON_A) screen.fill((255, 255, 255)) screen.blit(label1, (0, 0)) screen.blit(label2, (0, 20)) screen.blit(font.render(str(is_pressed), True, (0, 0, 0)), (0, 40)) pygame.display.update() pygame.display.quit() pygame.font.quit() def test_get_axis_interactive(self): c = self._get_first_controller() if not c: self.skipTest("No controller connected") pygame.display.init() pygame.font.init() screen = pygame.display.set_mode((400, 400)) font = pygame.font.Font(None, 20) running = True label1 = font.render( "Press down the right trigger. The value on-screen should", True, (0, 0, 0) ) label2 = font.render( "indicate how far the trigger is pressed down. This value should", True, (0, 0, 0), ) label3 = font.render( 'be in the range of 0-32767. Press "y" or "n" to confirm.', True, (0, 0, 0) ) while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False if event.type == pygame.KEYDOWN: if event.key == pygame.K_y: running = False if event.key == pygame.K_n: running = False pygame.display.quit() pygame.font.quit() self.fail() right_trigger = c.get_axis(pygame.CONTROLLER_AXIS_TRIGGERRIGHT) screen.fill((255, 255, 255)) screen.blit(label1, (0, 0)) screen.blit(label2, (0, 20)) screen.blit(label3, (0, 40)) screen.blit(font.render(str(right_trigger), True, (0, 0, 0)), (0, 60)) pygame.display.update() pygame.display.quit() pygame.font.quit() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/cursors_test.py0000644000175100001770000001702414676242340016513 0ustar00runnerdockerimport unittest from pygame.tests.test_utils import fixture_path import pygame class CursorsModuleTest(unittest.TestCase): def test_compile(self): # __doc__ (as of 2008-06-25) for pygame.cursors.compile: # pygame.cursors.compile(strings, black, white,xor) -> data, mask # compile cursor strings into cursor data # # This takes a set of strings with equal length and computes # the binary data for that cursor. The string widths must be # divisible by 8. # # The black and white arguments are single letter strings that # tells which characters will represent black pixels, and which # characters represent white pixels. All other characters are # considered clear. # # This returns a tuple containing the cursor data and cursor mask # data. Both these arguments are used when setting a cursor with # pygame.mouse.set_cursor(). # Various types of input strings test_cursor1 = ("X.X.XXXX", "XXXXXX..", " XXXX ") test_cursor2 = ( "X.X.XXXX", "XXXXXX..", "XXXXXX ", "XXXXXX..", "XXXXXX..", "XXXXXX", "XXXXXX..", "XXXXXX..", ) test_cursor3 = (".XX.", " ", ".. ", "X.. X") # Test such that total number of strings is not divisible by 8 with self.assertRaises(ValueError): pygame.cursors.compile(test_cursor1) # Test such that size of individual string is not divisible by 8 with self.assertRaises(ValueError): pygame.cursors.compile(test_cursor2) # Test such that neither size of individual string nor total number of strings is divisible by 8 with self.assertRaises(ValueError): pygame.cursors.compile(test_cursor3) # Test that checks whether the byte data from compile function is equal to actual byte data actual_byte_data = ( 192, 0, 0, 224, 0, 0, 240, 0, 0, 216, 0, 0, 204, 0, 0, 198, 0, 0, 195, 0, 0, 193, 128, 0, 192, 192, 0, 192, 96, 0, 192, 48, 0, 192, 56, 0, 192, 248, 0, 220, 192, 0, 246, 96, 0, 198, 96, 0, 6, 96, 0, 3, 48, 0, 3, 48, 0, 1, 224, 0, 1, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ), ( 192, 0, 0, 224, 0, 0, 240, 0, 0, 248, 0, 0, 252, 0, 0, 254, 0, 0, 255, 0, 0, 255, 128, 0, 255, 192, 0, 255, 224, 0, 255, 240, 0, 255, 248, 0, 255, 248, 0, 255, 192, 0, 247, 224, 0, 199, 224, 0, 7, 224, 0, 3, 240, 0, 3, 240, 0, 1, 224, 0, 1, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ) cursor = pygame.cursors.compile(pygame.cursors.thickarrow_strings) self.assertEqual(cursor, actual_byte_data) # Test such that cursor byte data obtained from compile function is valid in pygame.mouse.set_cursor() pygame.display.init() try: pygame.mouse.set_cursor((24, 24), (0, 0), *cursor) except pygame.error as e: if "not currently supported" in str(e): unittest.skip("skipping test as set_cursor() is not supported") finally: pygame.display.quit() ################################################################################ def test_load_xbm(self): # __doc__ (as of 2008-06-25) for pygame.cursors.load_xbm: # pygame.cursors.load_xbm(cursorfile, maskfile) -> cursor_args # reads a pair of XBM files into set_cursor arguments # # Arguments can either be filenames or filelike objects # with the readlines method. Not largely tested, but # should work with typical XBM files. # Test that load_xbm will take filenames as arguments cursorfile = fixture_path(r"xbm_cursors/white_sizing.xbm") maskfile = fixture_path(r"xbm_cursors/white_sizing_mask.xbm") cursor = pygame.cursors.load_xbm(cursorfile, maskfile) # Test that load_xbm will take file objects as arguments with open(cursorfile) as cursor_f, open(maskfile) as mask_f: cursor = pygame.cursors.load_xbm(cursor_f, mask_f) # Can it load using pathlib.Path? import pathlib cursor = pygame.cursors.load_xbm( pathlib.Path(cursorfile), pathlib.Path(maskfile) ) # Is it in a format that mouse.set_cursor won't blow up on? pygame.display.init() try: pygame.mouse.set_cursor(*cursor) except pygame.error as e: if "not currently supported" in str(e): unittest.skip("skipping test as set_cursor() is not supported") finally: pygame.display.quit() def test_Cursor(self): """Ensure that the cursor object parses information properly""" c1 = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_CROSSHAIR) self.assertEqual(c1.data, (pygame.SYSTEM_CURSOR_CROSSHAIR,)) self.assertEqual(c1.type, "system") c2 = pygame.cursors.Cursor(c1) self.assertEqual(c1, c2) with self.assertRaises(TypeError): pygame.cursors.Cursor(-34002) with self.assertRaises(TypeError): pygame.cursors.Cursor("a", "b", "c", "d") with self.assertRaises(TypeError): pygame.cursors.Cursor((2,)) c3 = pygame.cursors.Cursor((0, 0), pygame.Surface((20, 20))) self.assertEqual(c3.data[0], (0, 0)) self.assertEqual(c3.data[1].get_size(), (20, 20)) self.assertEqual(c3.type, "color") xormask, andmask = pygame.cursors.compile(pygame.cursors.thickarrow_strings) c4 = pygame.cursors.Cursor((24, 24), (0, 0), xormask, andmask) self.assertEqual(c4.data, ((24, 24), (0, 0), xormask, andmask)) self.assertEqual(c4.type, "bitmap") ################################################################################ if __name__ == "__main__": unittest.main() ################################################################################ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/display_test.py0000644000175100001770000013253114676242340016461 0ustar00runnerdockerimport unittest import os import sys import time import pygame, pygame.transform from pygame.tests.test_utils import question from pygame import display class DisplayModuleTest(unittest.TestCase): default_caption = "pygame window" def setUp(self): display.init() def tearDown(self): display.quit() def test_Info(self): inf = pygame.display.Info() self.assertNotEqual(inf.current_h, -1) self.assertNotEqual(inf.current_w, -1) # probably have an older SDL than 1.2.10 if -1. screen = pygame.display.set_mode((128, 128)) inf = pygame.display.Info() self.assertEqual(inf.current_h, 128) self.assertEqual(inf.current_w, 128) def test_flip(self): screen = pygame.display.set_mode((100, 100)) # test without a change self.assertIsNone(pygame.display.flip()) # test with a change pygame.Surface.fill(screen, (66, 66, 53)) self.assertIsNone(pygame.display.flip()) # test without display init pygame.display.quit() with self.assertRaises(pygame.error): (pygame.display.flip()) # test without window del screen with self.assertRaises(pygame.error): (pygame.display.flip()) def test_get_active(self): """Test the get_active function""" # Initially, the display is not active pygame.display.quit() self.assertEqual(pygame.display.get_active(), False) # get_active defaults to true after a set_mode pygame.display.init() pygame.display.set_mode((640, 480)) self.assertEqual(pygame.display.get_active(), True) # get_active after init/quit should be False # since no display is visible pygame.display.quit() pygame.display.init() self.assertEqual(pygame.display.get_active(), False) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", "requires the SDL_VIDEODRIVER to be a non dummy value", ) def test_get_active_iconify(self): """Test the get_active function after an iconify""" # According to the docs, get_active should return # false if the display is iconified pygame.display.set_mode((640, 480)) pygame.event.clear() pygame.display.iconify() for _ in range(100): time.sleep(0.01) pygame.event.pump() self.assertEqual(pygame.display.get_active(), False) def test_get_caption(self): screen = display.set_mode((100, 100)) self.assertEqual(display.get_caption()[0], self.default_caption) def test_set_caption(self): TEST_CAPTION = "test" screen = display.set_mode((100, 100)) self.assertIsNone(display.set_caption(TEST_CAPTION)) self.assertEqual(display.get_caption()[0], TEST_CAPTION) self.assertEqual(display.get_caption()[1], TEST_CAPTION) def test_set_caption_kwargs(self): TEST_CAPTION = "test" screen = display.set_mode((100, 100)) self.assertIsNone(display.set_caption(title=TEST_CAPTION)) self.assertEqual(display.get_caption()[0], TEST_CAPTION) self.assertEqual(display.get_caption()[1], TEST_CAPTION) def test_caption_unicode(self): TEST_CAPTION = "台" display.set_caption(TEST_CAPTION) self.assertEqual(display.get_caption()[0], TEST_CAPTION) def test_get_driver(self): drivers = [ "aalib", "android", "arm", "cocoa", "dga", "directx", "directfb", "dummy", "emscripten", "fbcon", "ggi", "haiku", "khronos", "kmsdrm", "nacl", "offscreen", "pandora", "psp", "qnx", "raspberry", "svgalib", "uikit", "vgl", "vivante", "wayland", "windows", "windib", "winrt", "x11", ] driver = display.get_driver() self.assertIn(driver, drivers) display.quit() with self.assertRaises(pygame.error): driver = display.get_driver() def test_get_init(self): """Ensures the module's initialization state can be retrieved.""" # display.init() already called in setUp() self.assertTrue(display.get_init()) # This test can be uncommented when issues #991 and #993 are resolved. @unittest.skipIf(True, "SDL2 issues") def test_get_surface(self): """Ensures get_surface gets the current display surface.""" lengths = (1, 5, 100) for expected_size in ((w, h) for w in lengths for h in lengths): for expected_depth in (8, 16, 24, 32): expected_surface = display.set_mode(expected_size, 0, expected_depth) surface = pygame.display.get_surface() self.assertEqual(surface, expected_surface) self.assertIsInstance(surface, pygame.Surface) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_bitsize(), expected_depth) def test_get_surface__mode_not_set(self): """Ensures get_surface handles the display mode not being set.""" surface = pygame.display.get_surface() self.assertIsNone(surface) def test_get_wm_info(self): wm_info = display.get_wm_info() # Assert function returns a dictionary type self.assertIsInstance(wm_info, dict) wm_info_potential_keys = { "colorbuffer", "connection", "data", "dfb", "display", "framebuffer", "fswindow", "hdc", "hglrc", "hinstance", "lock_func", "resolveFramebuffer", "shell_surface", "surface", "taskHandle", "unlock_func", "wimpVersion", "window", "wmwindow", } # If any unexpected dict keys are present, they # will be stored in set wm_info_remaining_keys wm_info_remaining_keys = set(wm_info.keys()).difference(wm_info_potential_keys) # Assert set is empty (& therefore does not # contain unexpected dict keys) self.assertFalse(wm_info_remaining_keys) @unittest.skipIf( ( "skipping for all because some failures on rasppi and maybe other platforms" or os.environ.get("SDL_VIDEODRIVER") == "dummy" ), 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) def test_gl_get_attribute(self): screen = display.set_mode((0, 0), pygame.OPENGL) # We create a list where we store the original values of the # flags before setting them with a different value. original_values = [] original_values.append(pygame.display.gl_get_attribute(pygame.GL_ALPHA_SIZE)) original_values.append(pygame.display.gl_get_attribute(pygame.GL_DEPTH_SIZE)) original_values.append(pygame.display.gl_get_attribute(pygame.GL_STENCIL_SIZE)) original_values.append( pygame.display.gl_get_attribute(pygame.GL_ACCUM_RED_SIZE) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_ACCUM_GREEN_SIZE) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_ACCUM_BLUE_SIZE) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_ACCUM_ALPHA_SIZE) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLEBUFFERS) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLESAMPLES) ) original_values.append(pygame.display.gl_get_attribute(pygame.GL_STEREO)) original_values.append( pygame.display.gl_get_attribute(pygame.GL_ACCELERATED_VISUAL) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_MAJOR_VERSION) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_MINOR_VERSION) ) original_values.append(pygame.display.gl_get_attribute(pygame.GL_CONTEXT_FLAGS)) original_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_PROFILE_MASK) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_SHARE_WITH_CURRENT_CONTEXT) ) original_values.append( pygame.display.gl_get_attribute(pygame.GL_FRAMEBUFFER_SRGB_CAPABLE) ) # Setting the flags with values supposedly different from the original values # assign SDL1-supported values with gl_set_attribute pygame.display.gl_set_attribute(pygame.GL_ALPHA_SIZE, 8) pygame.display.gl_set_attribute(pygame.GL_DEPTH_SIZE, 24) pygame.display.gl_set_attribute(pygame.GL_STENCIL_SIZE, 8) pygame.display.gl_set_attribute(pygame.GL_ACCUM_RED_SIZE, 16) pygame.display.gl_set_attribute(pygame.GL_ACCUM_GREEN_SIZE, 16) pygame.display.gl_set_attribute(pygame.GL_ACCUM_BLUE_SIZE, 16) pygame.display.gl_set_attribute(pygame.GL_ACCUM_ALPHA_SIZE, 16) pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLEBUFFERS, 1) pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLESAMPLES, 1) pygame.display.gl_set_attribute(pygame.GL_STEREO, 0) pygame.display.gl_set_attribute(pygame.GL_ACCELERATED_VISUAL, 0) pygame.display.gl_set_attribute(pygame.GL_CONTEXT_MAJOR_VERSION, 1) pygame.display.gl_set_attribute(pygame.GL_CONTEXT_MINOR_VERSION, 1) pygame.display.gl_set_attribute(pygame.GL_CONTEXT_FLAGS, 0) pygame.display.gl_set_attribute(pygame.GL_CONTEXT_PROFILE_MASK, 0) pygame.display.gl_set_attribute(pygame.GL_SHARE_WITH_CURRENT_CONTEXT, 0) pygame.display.gl_set_attribute(pygame.GL_FRAMEBUFFER_SRGB_CAPABLE, 0) # We create a list where we store the values that we set each flag to set_values = [8, 24, 8, 16, 16, 16, 16, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0] # We create a list where we store the values after getting them get_values = [] get_values.append(pygame.display.gl_get_attribute(pygame.GL_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_DEPTH_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_STENCIL_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_RED_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_GREEN_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_BLUE_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLEBUFFERS)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLESAMPLES)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_STEREO)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCELERATED_VISUAL)) get_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_MAJOR_VERSION) ) get_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_MINOR_VERSION) ) get_values.append(pygame.display.gl_get_attribute(pygame.GL_CONTEXT_FLAGS)) get_values.append( pygame.display.gl_get_attribute(pygame.GL_CONTEXT_PROFILE_MASK) ) get_values.append( pygame.display.gl_get_attribute(pygame.GL_SHARE_WITH_CURRENT_CONTEXT) ) get_values.append( pygame.display.gl_get_attribute(pygame.GL_FRAMEBUFFER_SRGB_CAPABLE) ) # We check to see if the values that we get correspond to the values that we set # them to or to the original values. for i in range(len(original_values)): self.assertTrue( (get_values[i] == original_values[i]) or (get_values[i] == set_values[i]) ) # test using non-flag argument with self.assertRaises(TypeError): pygame.display.gl_get_attribute("DUMMY") @unittest.skipIf( ( "skipping for all because some failures on rasppi and maybe other platforms" or os.environ.get("SDL_VIDEODRIVER") == "dummy" ), 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) def test_gl_get_attribute_kwargs(self): screen = display.set_mode((0, 0), pygame.OPENGL) # We create a list where we store the original values of the # flags before setting them with a different value. original_values = [] original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ALPHA_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_DEPTH_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_STENCIL_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_RED_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_GREEN_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_BLUE_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_ALPHA_SIZE) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLEBUFFERS) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLESAMPLES) ) original_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_STEREO)) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCELERATED_VISUAL) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_MAJOR_VERSION) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_MINOR_VERSION) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_FLAGS) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_PROFILE_MASK) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_SHARE_WITH_CURRENT_CONTEXT) ) original_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_FRAMEBUFFER_SRGB_CAPABLE) ) # Setting the flags with values supposedly different from the original values # assign SDL1-supported values with gl_set_attribute pygame.display.gl_set_attribute(flag=pygame.GL_ALPHA_SIZE, value=8) pygame.display.gl_set_attribute(flag=pygame.GL_DEPTH_SIZE, value=24) pygame.display.gl_set_attribute(flag=pygame.GL_STENCIL_SIZE, value=8) pygame.display.gl_set_attribute(flag=pygame.GL_ACCUM_RED_SIZE, value=16) pygame.display.gl_set_attribute(flag=pygame.GL_ACCUM_GREEN_SIZE, value=16) pygame.display.gl_set_attribute(flag=pygame.GL_ACCUM_BLUE_SIZE, value=16) pygame.display.gl_set_attribute(flag=pygame.GL_ACCUM_ALPHA_SIZE, value=16) pygame.display.gl_set_attribute(flag=pygame.GL_MULTISAMPLEBUFFERS, value=1) pygame.display.gl_set_attribute(flag=pygame.GL_MULTISAMPLESAMPLES, value=1) pygame.display.gl_set_attribute(flag=pygame.GL_STEREO, value=0) pygame.display.gl_set_attribute(flag=pygame.GL_ACCELERATED_VISUAL, value=0) pygame.display.gl_set_attribute(flag=pygame.GL_CONTEXT_MAJOR_VERSION, value=1) pygame.display.gl_set_attribute(flag=pygame.GL_CONTEXT_MINOR_VERSION, value=1) pygame.display.gl_set_attribute(flag=pygame.GL_CONTEXT_FLAGS, value=0) pygame.display.gl_set_attribute(flag=pygame.GL_CONTEXT_PROFILE_MASK, value=0) pygame.display.gl_set_attribute( flag=pygame.GL_SHARE_WITH_CURRENT_CONTEXT, value=0 ) pygame.display.gl_set_attribute( flag=pygame.GL_FRAMEBUFFER_SRGB_CAPABLE, value=0 ) # We create a list where we store the values that we set each flag to set_values = [8, 24, 8, 16, 16, 16, 16, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0] # We create a list where we store the values after getting them get_values = [] get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_DEPTH_SIZE)) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_STENCIL_SIZE)) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_RED_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_GREEN_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_BLUE_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_ALPHA_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLEBUFFERS) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLESAMPLES) ) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_STEREO)) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCELERATED_VISUAL) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_MAJOR_VERSION) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_MINOR_VERSION) ) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_FLAGS)) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_CONTEXT_PROFILE_MASK) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_SHARE_WITH_CURRENT_CONTEXT) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_FRAMEBUFFER_SRGB_CAPABLE) ) # We check to see if the values that we get correspond to the values that we set # them to or to the original values. for i in range(len(original_values)): self.assertTrue( (get_values[i] == original_values[i]) or (get_values[i] == set_values[i]) ) # test using non-flag argument with self.assertRaises(TypeError): pygame.display.gl_get_attribute("DUMMY") @unittest.skipIf( ( "skipping for all because some failures on rasppi and maybe other platforms" or os.environ.get("SDL_VIDEODRIVER") == "dummy" ), 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) def test_gl_set_attribute(self): # __doc__ (as of 2008-08-02) for pygame.display.gl_set_attribute: # pygame.display.gl_set_attribute(flag, value): return None # request an opengl display attribute for the display mode # # When calling pygame.display.set_mode() with the pygame.OPENGL flag, # Pygame automatically handles setting the OpenGL attributes like # color and doublebuffering. OpenGL offers several other attributes # you may want control over. Pass one of these attributes as the flag, # and its appropriate value. This must be called before # pygame.display.set_mode() # # The OPENGL flags are; # GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, # GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, # GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO screen = display.set_mode((0, 0), pygame.OPENGL) # We create a list where we store the values that we set each flag to set_values = [8, 24, 8, 16, 16, 16, 16, 1, 1, 0] # Setting the flags with values supposedly different from the original values # assign SDL1-supported values with gl_set_attribute pygame.display.gl_set_attribute(pygame.GL_ALPHA_SIZE, set_values[0]) pygame.display.gl_set_attribute(pygame.GL_DEPTH_SIZE, set_values[1]) pygame.display.gl_set_attribute(pygame.GL_STENCIL_SIZE, set_values[2]) pygame.display.gl_set_attribute(pygame.GL_ACCUM_RED_SIZE, set_values[3]) pygame.display.gl_set_attribute(pygame.GL_ACCUM_GREEN_SIZE, set_values[4]) pygame.display.gl_set_attribute(pygame.GL_ACCUM_BLUE_SIZE, set_values[5]) pygame.display.gl_set_attribute(pygame.GL_ACCUM_ALPHA_SIZE, set_values[6]) pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLEBUFFERS, set_values[7]) pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLESAMPLES, set_values[8]) pygame.display.gl_set_attribute(pygame.GL_STEREO, set_values[9]) # We create a list where we store the values after getting them get_values = [] get_values.append(pygame.display.gl_get_attribute(pygame.GL_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_DEPTH_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_STENCIL_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_RED_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_GREEN_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_BLUE_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_ACCUM_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLEBUFFERS)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLESAMPLES)) get_values.append(pygame.display.gl_get_attribute(pygame.GL_STEREO)) # We check to see if the values that we get correspond to the values that we set # them to or to the original values. for i in range(len(set_values)): self.assertTrue(get_values[i] == set_values[i]) # test using non-flag argument with self.assertRaises(TypeError): pygame.display.gl_get_attribute("DUMMY") @unittest.skipIf( ( "skipping for all because some failures on rasppi and maybe other platforms" or os.environ.get("SDL_VIDEODRIVER") == "dummy" ), 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) def test_gl_set_attribute_kwargs(self): # __doc__ (as of 2008-08-02) for pygame.display.gl_set_attribute: # pygame.display.gl_set_attribute(flag, value): return None # request an opengl display attribute for the display mode # # When calling pygame.display.set_mode() with the pygame.OPENGL flag, # Pygame automatically handles setting the OpenGL attributes like # color and doublebuffering. OpenGL offers several other attributes # you may want control over. Pass one of these attributes as the flag, # and its appropriate value. This must be called before # pygame.display.set_mode() # # The OPENGL flags are; # GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, # GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, # GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO screen = display.set_mode((0, 0), pygame.OPENGL) # We create a list where we store the values that we set each flag to set_values = [8, 24, 8, 16, 16, 16, 16, 1, 1, 0] # Setting the flags with values supposedly different from the original values # assign SDL1-supported values with gl_set_attribute pygame.display.gl_set_attribute(flag=pygame.GL_ALPHA_SIZE, value=set_values[0]) pygame.display.gl_set_attribute(flag=pygame.GL_DEPTH_SIZE, value=set_values[1]) pygame.display.gl_set_attribute( flag=pygame.GL_STENCIL_SIZE, value=set_values[2] ) pygame.display.gl_set_attribute( flag=pygame.GL_ACCUM_RED_SIZE, value=set_values[3] ) pygame.display.gl_set_attribute( flag=pygame.GL_ACCUM_GREEN_SIZE, value=set_values[4] ) pygame.display.gl_set_attribute( flag=pygame.GL_ACCUM_BLUE_SIZE, value=set_values[5] ) pygame.display.gl_set_attribute( flag=pygame.GL_ACCUM_ALPHA_SIZE, value=set_values[6] ) pygame.display.gl_set_attribute( flag=pygame.GL_MULTISAMPLEBUFFERS, value=set_values[7] ) pygame.display.gl_set_attribute( flag=pygame.GL_MULTISAMPLESAMPLES, value=set_values[8] ) pygame.display.gl_set_attribute(flag=pygame.GL_STEREO, value=set_values[9]) # We create a list where we store the values after getting them get_values = [] get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_ALPHA_SIZE)) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_DEPTH_SIZE)) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_STENCIL_SIZE)) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_RED_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_GREEN_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_BLUE_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_ACCUM_ALPHA_SIZE) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLEBUFFERS) ) get_values.append( pygame.display.gl_get_attribute(flag=pygame.GL_MULTISAMPLESAMPLES) ) get_values.append(pygame.display.gl_get_attribute(flag=pygame.GL_STEREO)) # We check to see if the values that we get correspond to the values that we set # them to or to the original values. for i in range(len(set_values)): self.assertTrue(get_values[i] == set_values[i]) # test using non-flag argument with self.assertRaises(TypeError): pygame.display.gl_get_attribute("DUMMY") @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") in ["dummy", "android"], "iconify is only supported on some video drivers/platforms", ) def test_iconify(self): pygame.display.set_mode((640, 480)) self.assertEqual(pygame.display.get_active(), True) success = pygame.display.iconify() if success: active_event = window_minimized_event = False # make sure we cycle the event loop enough to get the display # hidden. Test that both ACTIVEEVENT and WINDOWMINIMISED event appears for _ in range(50): time.sleep(0.01) for event in pygame.event.get(): if event.type == pygame.ACTIVEEVENT: if not event.gain and event.state == pygame.APPACTIVE: active_event = True if event.type == pygame.WINDOWMINIMIZED: window_minimized_event = True self.assertTrue(window_minimized_event) self.assertTrue(active_event) self.assertFalse(pygame.display.get_active()) else: self.fail("Iconify not supported on this platform, please skip") def test_init(self): """Ensures the module is initialized after init called.""" # display.init() already called in setUp(), so quit and re-init display.quit() display.init() self.assertTrue(display.get_init()) def test_init__multiple(self): """Ensures the module is initialized after multiple init calls.""" display.init() display.init() self.assertTrue(display.get_init()) def test_list_modes(self): modes = pygame.display.list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) # modes == -1 means any mode is supported. if modes != -1: self.assertEqual(len(modes[0]), 2) self.assertEqual(type(modes[0][0]), int) modes = pygame.display.list_modes() if modes != -1: self.assertEqual(len(modes[0]), 2) self.assertEqual(type(modes[0][0]), int) self.assertEqual(len(modes), len(set(modes))) modes = pygame.display.list_modes(depth=0, flags=0, display=0) if modes != -1: self.assertEqual(len(modes[0]), 2) self.assertEqual(type(modes[0][0]), int) def test_mode_ok(self): pygame.display.mode_ok((128, 128)) modes = pygame.display.list_modes() if modes != -1: size = modes[0] self.assertNotEqual(pygame.display.mode_ok(size), 0) pygame.display.mode_ok((128, 128), 0, 32) pygame.display.mode_ok((128, 128), flags=0, depth=32, display=0) def test_mode_ok_fullscreen(self): modes = pygame.display.list_modes() if modes != -1: size = modes[0] self.assertNotEqual( pygame.display.mode_ok(size, flags=pygame.FULLSCREEN), 0 ) def test_mode_ok_scaled(self): modes = pygame.display.list_modes() if modes != -1: size = modes[0] self.assertNotEqual(pygame.display.mode_ok(size, flags=pygame.SCALED), 0) def test_get_num_displays(self): self.assertGreater(pygame.display.get_num_displays(), 0) def test_quit(self): """Ensures the module is not initialized after quit called.""" display.quit() self.assertFalse(display.get_init()) def test_quit__multiple(self): """Ensures the module is not initialized after multiple quit calls.""" display.quit() display.quit() self.assertFalse(display.get_init()) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", "Needs a not dummy videodriver" ) def test_set_gamma(self): pygame.display.set_mode((1, 1)) gammas = [0.25, 0.5, 0.88, 1.0] for gamma in gammas: with self.subTest(gamma=gamma): with self.assertWarns(DeprecationWarning): self.assertEqual(pygame.display.set_gamma(gamma), True) self.assertEqual(pygame.display.set_gamma(gamma), True) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", "Needs a not dummy videodriver" ) def test_set_gamma__tuple(self): pygame.display.set_mode((1, 1)) gammas = [(0.5, 0.5, 0.5), (1.0, 1.0, 1.0), (0.25, 0.33, 0.44)] for r, g, b in gammas: with self.subTest(r=r, g=g, b=b): self.assertEqual(pygame.display.set_gamma(r, g, b), True) @unittest.skipIf( not hasattr(pygame.display, "set_gamma_ramp"), "Not all systems and hardware support gamma ramps", ) def test_set_gamma_ramp(self): # __doc__ (as of 2008-08-02) for pygame.display.set_gamma_ramp: # change the hardware gamma ramps with a custom lookup # pygame.display.set_gamma_ramp(red, green, blue): return bool # set_gamma_ramp(red, green, blue): return bool # # Set the red, green, and blue gamma ramps with an explicit lookup # table. Each argument should be sequence of 256 integers. The # integers should range between 0 and 0xffff. Not all systems and # hardware support gamma ramps, if the function succeeds it will # return True. # pygame.display.set_mode((5, 5)) r = list(range(256)) g = [number + 256 for number in r] b = [number + 256 for number in g] with self.assertWarns(DeprecationWarning): isSupported = pygame.display.set_gamma_ramp(r, g, b) if isSupported: self.assertTrue(pygame.display.set_gamma_ramp(r, g, b)) else: self.assertFalse(pygame.display.set_gamma_ramp(r, g, b)) def test_set_mode_kwargs(self): pygame.display.set_mode(size=(1, 1), flags=0, depth=0, display=0) def test_set_mode_scaled(self): surf = pygame.display.set_mode( size=(1, 1), flags=pygame.SCALED, depth=0, display=0 ) winsize = pygame.display.get_window_size() self.assertEqual( winsize[0] % surf.get_size()[0], 0, "window width should be a multiple of the surface width", ) self.assertEqual( winsize[1] % surf.get_size()[1], 0, "window height should be a multiple of the surface height", ) self.assertEqual( winsize[0] / surf.get_size()[0], winsize[1] / surf.get_size()[1] ) def test_set_mode_vector2(self): pygame.display.set_mode(pygame.Vector2(1, 1)) def test_set_mode_unscaled(self): """Ensures a window created with SCALED can become smaller.""" # see https://github.com/pygame/pygame/issues/2327 screen = pygame.display.set_mode((300, 300), pygame.SCALED) self.assertEqual(screen.get_size(), (300, 300)) screen = pygame.display.set_mode((200, 200)) self.assertEqual(screen.get_size(), (200, 200)) def test_screensaver_support(self): pygame.display.set_allow_screensaver(True) self.assertTrue(pygame.display.get_allow_screensaver()) pygame.display.set_allow_screensaver(False) self.assertFalse(pygame.display.get_allow_screensaver()) pygame.display.set_allow_screensaver() self.assertTrue(pygame.display.get_allow_screensaver()) # the following test fails always with SDL2 @unittest.skipIf(True, "set_palette() not supported in SDL2") def test_set_palette(self): with self.assertRaises(pygame.error): palette = [1, 2, 3] pygame.display.set_palette(palette) pygame.display.set_mode((1024, 768), 0, 8) palette = [] self.assertIsNone(pygame.display.set_palette(palette)) with self.assertRaises(ValueError): palette = 12 pygame.display.set_palette(palette) with self.assertRaises(TypeError): palette = [[1, 2], [1, 2]] pygame.display.set_palette(palette) with self.assertRaises(TypeError): palette = [[0, 0, 0, 0, 0]] + [[x, x, x, x, x] for x in range(1, 255)] pygame.display.set_palette(palette) with self.assertRaises(TypeError): palette = "qwerty" pygame.display.set_palette(palette) with self.assertRaises(TypeError): palette = [[123, 123, 123] * 10000] pygame.display.set_palette(palette) with self.assertRaises(TypeError): palette = [1, 2, 3] pygame.display.set_palette(palette) skip_list = ["dummy", "android"] @unittest.skipIf(True, "set_palette() not supported in SDL2") def test_set_palette_kwargs(self): with self.assertRaises(pygame.error): palette = [1, 2, 3] pygame.display.set_palette(palette=palette) pygame.display.set_mode((1024, 768), 0, 8) palette = [] self.assertIsNone(pygame.display.set_palette(palette=palette)) with self.assertRaises(ValueError): palette = 12 pygame.display.set_palette(palette=palette) with self.assertRaises(TypeError): palette = [[1, 2], [1, 2]] pygame.display.set_palette(palette=palette) with self.assertRaises(TypeError): palette = [[0, 0, 0, 0, 0]] + [[x, x, x, x, x] for x in range(1, 255)] pygame.display.set_palette(palette=palette) with self.assertRaises(TypeError): palette = "qwerty" pygame.display.set_palette(palette=palette) with self.assertRaises(TypeError): palette = [[123, 123, 123] * 10000] pygame.display.set_palette(palette=palette) with self.assertRaises(TypeError): palette = [1, 2, 3] pygame.display.set_palette(palette=palette) skip_list = ["dummy", "android"] @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") in skip_list, "requires the SDL_VIDEODRIVER to be non dummy", ) def test_toggle_fullscreen(self): """Test for toggle fullscreen""" # try to toggle fullscreen with no active display # this should result in an error pygame.display.quit() with self.assertRaises(pygame.error): pygame.display.toggle_fullscreen() pygame.display.init() width_height = (640, 480) test_surf = pygame.display.set_mode(width_height) # try to toggle fullscreen try: pygame.display.toggle_fullscreen() except pygame.error: self.fail() else: # if toggle success, the width/height should be a # value found in list_modes if pygame.display.toggle_fullscreen() == 1: boolean = ( test_surf.get_width(), test_surf.get_height(), ) in pygame.display.list_modes( depth=0, flags=pygame.FULLSCREEN, display=0 ) self.assertEqual(boolean, True) # if not original width/height should be preserved else: self.assertEqual( (test_surf.get_width(), test_surf.get_height()), width_height ) class DisplayUpdateTest(unittest.TestCase): def question(self, qstr): """this is used in the interactive subclass.""" def setUp(self): display.init() self.screen = pygame.display.set_mode((500, 500)) self.screen.fill("black") pygame.display.flip() pygame.event.pump() # so mac updates def tearDown(self): display.quit() def test_update_negative(self): """takes rects with negative values.""" self.screen.fill("green") r1 = pygame.Rect(0, 0, 100, 100) pygame.display.update(r1) r2 = pygame.Rect(-10, 0, 100, 100) pygame.display.update(r2) r3 = pygame.Rect(-10, 0, -100, -100) pygame.display.update(r3) self.question("Is the screen green in (0, 0, 100, 100)?") def test_update_sequence(self): """only updates the part of the display given by the rects.""" self.screen.fill("green") rects = [ pygame.Rect(0, 0, 100, 100), pygame.Rect(100, 0, 100, 100), pygame.Rect(200, 0, 100, 100), pygame.Rect(300, 300, 100, 100), ] pygame.display.update(rects) pygame.event.pump() # so mac updates self.question(f"Is the screen green in {rects}?") def test_update_none_skipped(self): """None is skipped inside sequences.""" self.screen.fill("green") rects = ( None, pygame.Rect(100, 0, 100, 100), None, pygame.Rect(200, 0, 100, 100), pygame.Rect(300, 300, 100, 100), ) pygame.display.update(rects) pygame.event.pump() # so mac updates self.question(f"Is the screen green in {rects}?") def test_update_none(self): """does NOT update the display.""" self.screen.fill("green") pygame.display.update(None) pygame.event.pump() # so mac updates self.question("Is the screen black and NOT green?") def test_update_no_args(self): """does NOT update the display.""" self.screen.fill("green") pygame.display.update() pygame.event.pump() # so mac updates self.question("Is the WHOLE screen green?") def test_update_args(self): """updates the display using the args as a rect.""" self.screen.fill("green") pygame.display.update(100, 100, 100, 100) pygame.event.pump() # so mac updates self.question("Is the screen green in (100, 100, 100, 100)?") def test_update_incorrect_args(self): """raises a ValueError when inputs are wrong.""" with self.assertRaises(ValueError): pygame.display.update(100, "asdf", 100, 100) with self.assertRaises(ValueError): pygame.display.update([100, "asdf", 100, 100]) def test_update_no_init(self): """raises a pygame.error.""" pygame.display.quit() with self.assertRaises(pygame.error): pygame.display.update() class DisplayUpdateInteractiveTest(DisplayUpdateTest): """Because we want these tests to run as interactive and not interactive.""" __tags__ = ["interactive"] def question(self, qstr): """since this is the interactive subclass we ask a question.""" question(qstr) class DisplayInteractiveTest(unittest.TestCase): __tags__ = ["interactive"] def test_set_icon_interactive(self): os.environ["SDL_VIDEO_WINDOW_POS"] = "100,250" pygame.display.quit() pygame.display.init() test_icon = pygame.Surface((32, 32)) test_icon.fill((255, 0, 0)) pygame.display.set_icon(test_icon) screen = pygame.display.set_mode((400, 100)) pygame.display.set_caption("Is the window icon a red square?") response = question("Is the display icon red square?") self.assertTrue(response) pygame.display.quit() def test_set_gamma_ramp(self): os.environ["SDL_VIDEO_WINDOW_POS"] = "100,250" pygame.display.quit() pygame.display.init() screen = pygame.display.set_mode((400, 100)) screen.fill((100, 100, 100)) blue_ramp = [x * 256 for x in range(0, 256)] blue_ramp[100] = 150 * 256 # Can't tint too far or gamma ramps fail normal_ramp = [x * 256 for x in range(0, 256)] # test to see if this platform supports gamma ramps gamma_success = False if pygame.display.set_gamma_ramp(normal_ramp, normal_ramp, blue_ramp): pygame.display.update() gamma_success = True if gamma_success: response = question("Is the window background tinted blue?") self.assertTrue(response) # restore normal ramp pygame.display.set_gamma_ramp(normal_ramp, normal_ramp, normal_ramp) pygame.display.quit() class FullscreenToggleTests(unittest.TestCase): __tags__ = ["interactive"] screen = None font = None isfullscreen = False WIDTH = 800 HEIGHT = 600 def setUp(self): pygame.init() if sys.platform == "win32": # known issue with windows, must have mode from pygame.display.list_modes() # or window created with flag pygame.SCALED self.screen = pygame.display.set_mode( (self.WIDTH, self.HEIGHT), flags=pygame.SCALED ) else: self.screen = pygame.display.set_mode((self.WIDTH, self.HEIGHT)) pygame.display.set_caption("Fullscreen Tests") self.screen.fill((255, 255, 255)) pygame.display.flip() self.font = pygame.font.Font(None, 32) def tearDown(self): if self.isfullscreen: pygame.display.toggle_fullscreen() pygame.quit() def visual_test(self, fullscreen=False): text = "" if fullscreen: if not self.isfullscreen: pygame.display.toggle_fullscreen() self.isfullscreen = True text = "Is this in fullscreen? [y/n]" else: if self.isfullscreen: pygame.display.toggle_fullscreen() self.isfullscreen = False text = "Is this not in fullscreen [y/n]" s = self.font.render(text, False, (0, 0, 0)) self.screen.blit(s, (self.WIDTH / 2 - self.font.size(text)[0] / 2, 100)) pygame.display.flip() while True: for event in pygame.event.get(): if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: return False if event.key == pygame.K_y: return True if event.key == pygame.K_n: return False if event.type == pygame.QUIT: return False def test_fullscreen_true(self): self.assertTrue(self.visual_test(fullscreen=True)) def test_fullscreen_false(self): self.assertTrue(self.visual_test(fullscreen=False)) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) class DisplayOpenGLTest(unittest.TestCase): def test_screen_size_opengl(self): """returns a surface with the same size requested. |tags:display,slow,opengl| """ pygame.display.init() screen = pygame.display.set_mode((640, 480), pygame.OPENGL) self.assertEqual((640, 480), screen.get_size()) class X11CrashTest(unittest.TestCase): def test_x11_set_mode_crash_gh1654(self): # Test for https://github.com/pygame/pygame/issues/1654 # If unfixed, this will trip a segmentation fault pygame.display.init() pygame.display.quit() screen = pygame.display.set_mode((640, 480), 0) self.assertEqual((640, 480), screen.get_size()) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0211117 pygame-2.6.1/test/docs_test.py0000644000175100001770000000210314676242340015733 0ustar00runnerdockerimport os import subprocess import sys import unittest class DocsIncludedTest(unittest.TestCase): def test_doc_import_works(self): from pygame.docs.__main__ import has_local_docs, open_docs @unittest.skipIf("CI" not in os.environ, "Docs not required for local builds") def test_docs_included(self): from pygame.docs.__main__ import has_local_docs self.assertTrue(has_local_docs()) @unittest.skipIf("CI" not in os.environ, "Docs not required for local builds") def test_docs_command(self): try: subprocess.run( [sys.executable, "-m", "pygame.docs"], timeout=5, # check ensures an exception is raised when the process fails check=True, # pipe stdout/stderr so that they don't clutter main stdout stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) except subprocess.TimeoutExpired: # timeout errors are not an issue pass if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.022112 pygame-2.6.1/test/draw_test.py0000644000175100001770000072053014676242340015753 0ustar00runnerdockerimport math import unittest import sys import warnings import pygame from pygame import draw from pygame import draw_py from pygame.locals import SRCALPHA from pygame.tests import test_utils from pygame.math import Vector2 RED = BG_RED = pygame.Color("red") GREEN = FG_GREEN = pygame.Color("green") # Clockwise from the top left corner and ending with the center point. RECT_POSITION_ATTRIBUTES = ( "topleft", "midtop", "topright", "midright", "bottomright", "midbottom", "bottomleft", "midleft", "center", ) def get_border_values(surface, width, height): """Returns a list containing lists with the values of the surface's borders. """ border_top = [surface.get_at((x, 0)) for x in range(width)] border_left = [surface.get_at((0, y)) for y in range(height)] border_right = [surface.get_at((width - 1, y)) for y in range(height)] border_bottom = [surface.get_at((x, height - 1)) for x in range(width)] return [border_top, border_left, border_right, border_bottom] def corners(surface): """Returns a tuple with the corner positions of the given surface. Clockwise from the top left corner. """ width, height = surface.get_size() return ((0, 0), (width - 1, 0), (width - 1, height - 1), (0, height - 1)) def rect_corners_mids_and_center(rect): """Returns a tuple with each corner, mid, and the center for a given rect. Clockwise from the top left corner and ending with the center point. """ return ( rect.topleft, rect.midtop, rect.topright, rect.midright, rect.bottomright, rect.midbottom, rect.bottomleft, rect.midleft, rect.center, ) def border_pos_and_color(surface): """Yields each border position and its color for a given surface. Clockwise from the top left corner. """ width, height = surface.get_size() right, bottom = width - 1, height - 1 # Top edge. for x in range(width): pos = (x, 0) yield pos, surface.get_at(pos) # Right edge. # Top right done in top edge loop. for y in range(1, height): pos = (right, y) yield pos, surface.get_at(pos) # Bottom edge. # Bottom right done in right edge loop. for x in range(right - 1, -1, -1): pos = (x, bottom) yield pos, surface.get_at(pos) # Left edge. # Bottom left done in bottom edge loop. Top left done in top edge loop. for y in range(bottom - 1, 0, -1): pos = (0, y) yield pos, surface.get_at(pos) def get_color_points(surface, color, bounds_rect=None, match_color=True): """Get all the points of a given color on the surface within the given bounds. If bounds_rect is None the full surface is checked. If match_color is True, all points matching the color are returned, otherwise all points not matching the color are returned. """ get_at = surface.get_at # For possible speed up. if bounds_rect is None: x_range = range(surface.get_width()) y_range = range(surface.get_height()) else: x_range = range(bounds_rect.left, bounds_rect.right) y_range = range(bounds_rect.top, bounds_rect.bottom) surface.lock() # For possible speed up. if match_color: pts = [(x, y) for x in x_range for y in y_range if get_at((x, y)) == color] else: pts = [(x, y) for x in x_range for y in y_range if get_at((x, y)) != color] surface.unlock() return pts def create_bounding_rect(surface, surf_color, default_pos): """Create a rect to bound all the pixels that don't match surf_color. The default_pos parameter is used to position the bounding rect for the case where all pixels match the surf_color. """ width, height = surface.get_clip().size xmin, ymin = width, height xmax, ymax = -1, -1 get_at = surface.get_at # For possible speed up. surface.lock() # For possible speed up. for y in range(height): for x in range(width): if get_at((x, y)) != surf_color: xmin = min(x, xmin) xmax = max(x, xmax) ymin = min(y, ymin) ymax = max(y, ymax) surface.unlock() if -1 == xmax: # No points means a 0 sized rect positioned at default_pos. return pygame.Rect(default_pos, (0, 0)) return pygame.Rect((xmin, ymin), (xmax - xmin + 1, ymax - ymin + 1)) class InvalidBool: """To help test invalid bool values.""" __bool__ = None class DrawTestCase(unittest.TestCase): """Base class to test draw module functions.""" draw_rect = staticmethod(draw.rect) draw_polygon = staticmethod(draw.polygon) draw_circle = staticmethod(draw.circle) draw_ellipse = staticmethod(draw.ellipse) draw_arc = staticmethod(draw.arc) draw_line = staticmethod(draw.line) draw_lines = staticmethod(draw.lines) draw_aaline = staticmethod(draw.aaline) draw_aalines = staticmethod(draw.aalines) class PythonDrawTestCase(unittest.TestCase): """Base class to test draw_py module functions.""" # draw_py is currently missing some functions. # draw_rect = staticmethod(draw_py.draw_rect) draw_polygon = staticmethod(draw_py.draw_polygon) # draw_circle = staticmethod(draw_py.draw_circle) # draw_ellipse = staticmethod(draw_py.draw_ellipse) # draw_arc = staticmethod(draw_py.draw_arc) draw_line = staticmethod(draw_py.draw_line) draw_lines = staticmethod(draw_py.draw_lines) draw_aaline = staticmethod(draw_py.draw_aaline) draw_aalines = staticmethod(draw_py.draw_aalines) ### Ellipse Testing ########################################################### class DrawEllipseMixin: """Mixin tests for drawing ellipses. This class contains all the general ellipse drawing tests. """ def test_ellipse__args(self): """Ensures draw ellipse accepts the correct args.""" bounds_rect = self.draw_ellipse( pygame.Surface((3, 3)), (0, 10, 0, 50), pygame.Rect((0, 0), (3, 2)), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__args_without_width(self): """Ensures draw ellipse accepts the args without a width.""" bounds_rect = self.draw_ellipse( pygame.Surface((2, 2)), (1, 1, 1, 99), pygame.Rect((1, 1), (1, 1)) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__args_with_negative_width(self): """Ensures draw ellipse accepts the args with negative width.""" bounds_rect = self.draw_ellipse( pygame.Surface((3, 3)), (0, 10, 0, 50), pygame.Rect((2, 3), (3, 2)), -1 ) self.assertIsInstance(bounds_rect, pygame.Rect) self.assertEqual(bounds_rect, pygame.Rect(2, 3, 0, 0)) def test_ellipse__args_with_width_gt_radius(self): """Ensures draw ellipse accepts the args with width > rect.w // 2 and width > rect.h // 2. """ rect = pygame.Rect((0, 0), (4, 4)) bounds_rect = self.draw_ellipse( pygame.Surface((3, 3)), (0, 10, 0, 50), rect, rect.w // 2 + 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) bounds_rect = self.draw_ellipse( pygame.Surface((3, 3)), (0, 10, 0, 50), rect, rect.h // 2 + 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__kwargs(self): """Ensures draw ellipse accepts the correct kwargs with and without a width arg. """ kwargs_list = [ { "surface": pygame.Surface((4, 4)), "color": pygame.Color("yellow"), "rect": pygame.Rect((0, 0), (3, 2)), "width": 1, }, { "surface": pygame.Surface((2, 1)), "color": (0, 10, 20), "rect": (0, 0, 1, 1), }, ] for kwargs in kwargs_list: bounds_rect = self.draw_ellipse(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__kwargs_order_independent(self): """Ensures draw ellipse's kwargs are not order dependent.""" bounds_rect = self.draw_ellipse( color=(1, 2, 3), surface=pygame.Surface((3, 2)), width=0, rect=pygame.Rect((1, 0), (1, 1)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__args_missing(self): """Ensures draw ellipse detects any missing required args.""" surface = pygame.Surface((1, 1)) with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(surface, pygame.Color("red")) with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse() def test_ellipse__kwargs_missing(self): """Ensures draw ellipse detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((1, 2)), "color": pygame.Color("red"), "rect": pygame.Rect((1, 0), (2, 2)), "width": 2, } for name in ("rect", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(**invalid_kwargs) def test_ellipse__arg_invalid_types(self): """Ensures draw ellipse detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") rect = pygame.Rect((1, 1), (1, 1)) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_ellipse(surface, color, rect, "1") with self.assertRaises(TypeError): # Invalid rect. bounds_rect = self.draw_ellipse(surface, color, (1, 2, 3, 4, 5), 1) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_ellipse(surface, 2.3, rect, 0) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_ellipse(rect, color, rect, 2) def test_ellipse__kwarg_invalid_types(self): """Ensures draw ellipse detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") rect = pygame.Rect((0, 1), (1, 1)) kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "rect": rect, "width": 1, }, { "surface": surface, "color": 2.3, # Invalid color. "rect": rect, "width": 1, }, { "surface": surface, "color": color, "rect": (0, 0, 0), # Invalid rect. "width": 1, }, {"surface": surface, "color": color, "rect": rect, "width": 1.1}, ] # Invalid width. for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(**kwargs) def test_ellipse__kwarg_invalid_name(self): """Ensures draw ellipse detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") rect = pygame.Rect((0, 1), (2, 2)) kwargs_list = [ { "surface": surface, "color": color, "rect": rect, "width": 1, "invalid": 1, }, {"surface": surface, "color": color, "rect": rect, "invalid": 1}, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(**kwargs) def test_ellipse__args_and_kwargs(self): """Ensures draw ellipse accepts a combination of args/kwargs""" surface = pygame.Surface((3, 1)) color = (255, 255, 0, 0) rect = pygame.Rect((1, 0), (2, 1)) width = 0 kwargs = {"surface": surface, "color": color, "rect": rect, "width": width} for name in ("surface", "color", "rect", "width"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_ellipse(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_ellipse(surface, color, **kwargs) elif "rect" == name: bounds_rect = self.draw_ellipse(surface, color, rect, **kwargs) else: bounds_rect = self.draw_ellipse(surface, color, rect, width, **kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__valid_width_values(self): """Ensures draw ellipse accepts different width values.""" pos = (1, 1) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) color = (10, 20, 30, 255) kwargs = { "surface": surface, "color": color, "rect": pygame.Rect(pos, (3, 2)), "width": None, } for width in (-1000, -10, -1, 0, 1, 10, 1000): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = color if width >= 0 else surface_color bounds_rect = self.draw_ellipse(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__valid_rect_formats(self): """Ensures draw ellipse accepts different rect formats.""" pos = (1, 1) expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = {"surface": surface, "color": expected_color, "rect": None, "width": 0} rects = (pygame.Rect(pos, (1, 3)), (pos, (2, 1)), (pos[0], pos[1], 1, 1)) for rect in rects: surface.fill(surface_color) # Clear for each test. kwargs["rect"] = rect bounds_rect = self.draw_ellipse(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__valid_color_formats(self): """Ensures draw ellipse accepts different color formats.""" pos = (1, 1) green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": None, "rect": pygame.Rect(pos, (1, 2)), "width": 0, } reds = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in reds: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_ellipse(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_ellipse__invalid_color_formats(self): """Ensures draw ellipse handles invalid color formats correctly.""" pos = (1, 1) surface = pygame.Surface((4, 3)) kwargs = { "surface": surface, "color": None, "rect": pygame.Rect(pos, (2, 2)), "width": 1, } for expected_color in (2.3, surface): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_ellipse(**kwargs) def test_ellipse(self): """Tests ellipses of differing sizes on surfaces of differing sizes. Checks if the number of sides touching the border of the surface is correct. """ left_top = [(0, 0), (1, 0), (0, 1), (1, 1)] sizes = [(4, 4), (5, 4), (4, 5), (5, 5)] color = (1, 13, 24, 255) def same_size(width, height, border_width): """Test for ellipses with the same size as the surface.""" surface = pygame.Surface((width, height)) self.draw_ellipse(surface, color, (0, 0, width, height), border_width) # For each of the four borders check if it contains the color borders = get_border_values(surface, width, height) for border in borders: self.assertTrue(color in border) def not_same_size(width, height, border_width, left, top): """Test for ellipses that aren't the same size as the surface.""" surface = pygame.Surface((width, height)) self.draw_ellipse( surface, color, (left, top, width - 1, height - 1), border_width ) borders = get_border_values(surface, width, height) # Check if two sides of the ellipse are touching the border sides_touching = [color in border for border in borders].count(True) self.assertEqual(sides_touching, 2) for width, height in sizes: for border_width in (0, 1): same_size(width, height, border_width) for left, top in left_top: not_same_size(width, height, border_width, left, top) def test_ellipse__big_ellipse(self): """Test for big ellipse that could overflow in algorithm""" width = 1025 height = 1025 border = 1 x_value_test = int(0.4 * height) y_value_test = int(0.4 * height) surface = pygame.Surface((width, height)) self.draw_ellipse(surface, (255, 0, 0), (0, 0, width, height), border) colored_pixels = 0 for y in range(height): if surface.get_at((x_value_test, y)) == (255, 0, 0): colored_pixels += 1 for x in range(width): if surface.get_at((x, y_value_test)) == (255, 0, 0): colored_pixels += 1 self.assertEqual(colored_pixels, border * 4) def test_ellipse__thick_line(self): """Ensures a thick lined ellipse is drawn correctly.""" ellipse_color = pygame.Color("yellow") surface_color = pygame.Color("black") surface = pygame.Surface((40, 40)) rect = pygame.Rect((0, 0), (31, 23)) rect.center = surface.get_rect().center # As the lines get thicker the internals of the ellipse are not # cleanly defined. So only test up to a few thicknesses before the # maximum thickness. for thickness in range(1, min(*rect.size) // 2 - 2): surface.fill(surface_color) # Clear for each test. self.draw_ellipse(surface, ellipse_color, rect, thickness) surface.lock() # For possible speed up. # Check vertical thickness on the ellipse's top. x = rect.centerx y_start = rect.top y_end = rect.top + thickness - 1 for y in range(y_start, y_end + 1): self.assertEqual(surface.get_at((x, y)), ellipse_color, thickness) # Check pixels above and below this line. self.assertEqual(surface.get_at((x, y_start - 1)), surface_color, thickness) self.assertEqual(surface.get_at((x, y_end + 1)), surface_color, thickness) # Check vertical thickness on the ellipse's bottom. x = rect.centerx y_start = rect.bottom - thickness y_end = rect.bottom - 1 for y in range(y_start, y_end + 1): self.assertEqual(surface.get_at((x, y)), ellipse_color, thickness) # Check pixels above and below this line. self.assertEqual(surface.get_at((x, y_start - 1)), surface_color, thickness) self.assertEqual(surface.get_at((x, y_end + 1)), surface_color, thickness) # Check horizontal thickness on the ellipse's left. x_start = rect.left x_end = rect.left + thickness - 1 y = rect.centery for x in range(x_start, x_end + 1): self.assertEqual(surface.get_at((x, y)), ellipse_color, thickness) # Check pixels to the left and right of this line. self.assertEqual(surface.get_at((x_start - 1, y)), surface_color, thickness) self.assertEqual(surface.get_at((x_end + 1, y)), surface_color, thickness) # Check horizontal thickness on the ellipse's right. x_start = rect.right - thickness x_end = rect.right - 1 y = rect.centery for x in range(x_start, x_end + 1): self.assertEqual(surface.get_at((x, y)), ellipse_color, thickness) # Check pixels to the left and right of this line. self.assertEqual(surface.get_at((x_start - 1, y)), surface_color, thickness) self.assertEqual(surface.get_at((x_end + 1, y)), surface_color, thickness) surface.unlock() def test_ellipse__no_holes(self): width = 80 height = 70 surface = pygame.Surface((width + 1, height)) rect = pygame.Rect(0, 0, width, height) for thickness in range(1, 37, 5): surface.fill("BLACK") self.draw_ellipse(surface, "RED", rect, thickness) for y in range(height): number_of_changes = 0 drawn_pixel = False for x in range(width + 1): if ( not drawn_pixel and surface.get_at((x, y)) == pygame.Color("RED") or drawn_pixel and surface.get_at((x, y)) == pygame.Color("BLACK") ): drawn_pixel = not drawn_pixel number_of_changes += 1 if y < thickness or y > height - thickness - 1: self.assertEqual(number_of_changes, 2) else: self.assertEqual(number_of_changes, 4) def test_ellipse__max_width(self): """Ensures an ellipse with max width (and greater) is drawn correctly.""" ellipse_color = pygame.Color("yellow") surface_color = pygame.Color("black") surface = pygame.Surface((40, 40)) rect = pygame.Rect((0, 0), (31, 21)) rect.center = surface.get_rect().center max_thickness = (min(*rect.size) + 1) // 2 for thickness in range(max_thickness, max_thickness + 3): surface.fill(surface_color) # Clear for each test. self.draw_ellipse(surface, ellipse_color, rect, thickness) surface.lock() # For possible speed up. # Check vertical thickness. for y in range(rect.top, rect.bottom): self.assertEqual(surface.get_at((rect.centerx, y)), ellipse_color) # Check horizontal thickness. for x in range(rect.left, rect.right): self.assertEqual(surface.get_at((x, rect.centery)), ellipse_color) # Check pixels above and below ellipse. self.assertEqual( surface.get_at((rect.centerx, rect.top - 1)), surface_color ) self.assertEqual( surface.get_at((rect.centerx, rect.bottom + 1)), surface_color ) # Check pixels to the left and right of the ellipse. self.assertEqual( surface.get_at((rect.left - 1, rect.centery)), surface_color ) self.assertEqual( surface.get_at((rect.right + 1, rect.centery)), surface_color ) surface.unlock() def _check_1_pixel_sized_ellipse( self, surface, collide_rect, surface_color, ellipse_color ): # Helper method to check the surface for 1 pixel wide and/or high # ellipses. surf_w, surf_h = surface.get_size() surface.lock() # For possible speed up. for pos in ((x, y) for y in range(surf_h) for x in range(surf_w)): # Since the ellipse is just a line we can use a rect to help find # where it is expected to be drawn. if collide_rect.collidepoint(pos): expected_color = ellipse_color else: expected_color = surface_color self.assertEqual( surface.get_at(pos), expected_color, f"collide_rect={collide_rect}, pos={pos}", ) surface.unlock() def test_ellipse__1_pixel_width(self): """Ensures an ellipse with a width of 1 is drawn correctly. An ellipse with a width of 1 pixel is a vertical line. """ ellipse_color = pygame.Color("red") surface_color = pygame.Color("black") surf_w, surf_h = 10, 20 surface = pygame.Surface((surf_w, surf_h)) rect = pygame.Rect((0, 0), (1, 0)) collide_rect = rect.copy() # Calculate some positions. off_left = -1 off_right = surf_w off_bottom = surf_h center_x = surf_w // 2 center_y = surf_h // 2 # Test some even and odd heights. for ellipse_h in range(6, 10): collide_rect.h = ellipse_h rect.h = ellipse_h # Calculate some variable positions. off_top = -(ellipse_h + 1) half_off_top = -(ellipse_h // 2) half_off_bottom = surf_h - (ellipse_h // 2) # Draw the ellipse in different positions: fully on-surface, # partially off-surface, and fully off-surface. positions = ( (off_left, off_top), (off_left, half_off_top), (off_left, center_y), (off_left, half_off_bottom), (off_left, off_bottom), (center_x, off_top), (center_x, half_off_top), (center_x, center_y), (center_x, half_off_bottom), (center_x, off_bottom), (off_right, off_top), (off_right, half_off_top), (off_right, center_y), (off_right, half_off_bottom), (off_right, off_bottom), ) for rect_pos in positions: surface.fill(surface_color) # Clear before each draw. rect.topleft = rect_pos collide_rect.topleft = rect_pos self.draw_ellipse(surface, ellipse_color, rect) self._check_1_pixel_sized_ellipse( surface, collide_rect, surface_color, ellipse_color ) def test_ellipse__1_pixel_width_spanning_surface(self): """Ensures an ellipse with a width of 1 is drawn correctly when spanning the height of the surface. An ellipse with a width of 1 pixel is a vertical line. """ ellipse_color = pygame.Color("red") surface_color = pygame.Color("black") surf_w, surf_h = 10, 20 surface = pygame.Surface((surf_w, surf_h)) rect = pygame.Rect((0, 0), (1, surf_h + 2)) # Longer than the surface. # Draw the ellipse in different positions: on-surface and off-surface. positions = ( (-1, -1), # (off_left, off_top) (0, -1), # (left_edge, off_top) (surf_w // 2, -1), # (center_x, off_top) (surf_w - 1, -1), # (right_edge, off_top) (surf_w, -1), ) # (off_right, off_top) for rect_pos in positions: surface.fill(surface_color) # Clear before each draw. rect.topleft = rect_pos self.draw_ellipse(surface, ellipse_color, rect) self._check_1_pixel_sized_ellipse( surface, rect, surface_color, ellipse_color ) def test_ellipse__1_pixel_height(self): """Ensures an ellipse with a height of 1 is drawn correctly. An ellipse with a height of 1 pixel is a horizontal line. """ ellipse_color = pygame.Color("red") surface_color = pygame.Color("black") surf_w, surf_h = 20, 10 surface = pygame.Surface((surf_w, surf_h)) rect = pygame.Rect((0, 0), (0, 1)) collide_rect = rect.copy() # Calculate some positions. off_right = surf_w off_top = -1 off_bottom = surf_h center_x = surf_w // 2 center_y = surf_h // 2 # Test some even and odd widths. for ellipse_w in range(6, 10): collide_rect.w = ellipse_w rect.w = ellipse_w # Calculate some variable positions. off_left = -(ellipse_w + 1) half_off_left = -(ellipse_w // 2) half_off_right = surf_w - (ellipse_w // 2) # Draw the ellipse in different positions: fully on-surface, # partially off-surface, and fully off-surface. positions = ( (off_left, off_top), (half_off_left, off_top), (center_x, off_top), (half_off_right, off_top), (off_right, off_top), (off_left, center_y), (half_off_left, center_y), (center_x, center_y), (half_off_right, center_y), (off_right, center_y), (off_left, off_bottom), (half_off_left, off_bottom), (center_x, off_bottom), (half_off_right, off_bottom), (off_right, off_bottom), ) for rect_pos in positions: surface.fill(surface_color) # Clear before each draw. rect.topleft = rect_pos collide_rect.topleft = rect_pos self.draw_ellipse(surface, ellipse_color, rect) self._check_1_pixel_sized_ellipse( surface, collide_rect, surface_color, ellipse_color ) def test_ellipse__1_pixel_height_spanning_surface(self): """Ensures an ellipse with a height of 1 is drawn correctly when spanning the width of the surface. An ellipse with a height of 1 pixel is a horizontal line. """ ellipse_color = pygame.Color("red") surface_color = pygame.Color("black") surf_w, surf_h = 20, 10 surface = pygame.Surface((surf_w, surf_h)) rect = pygame.Rect((0, 0), (surf_w + 2, 1)) # Wider than the surface. # Draw the ellipse in different positions: on-surface and off-surface. positions = ( (-1, -1), # (off_left, off_top) (-1, 0), # (off_left, top_edge) (-1, surf_h // 2), # (off_left, center_y) (-1, surf_h - 1), # (off_left, bottom_edge) (-1, surf_h), ) # (off_left, off_bottom) for rect_pos in positions: surface.fill(surface_color) # Clear before each draw. rect.topleft = rect_pos self.draw_ellipse(surface, ellipse_color, rect) self._check_1_pixel_sized_ellipse( surface, rect, surface_color, ellipse_color ) def test_ellipse__1_pixel_width_and_height(self): """Ensures an ellipse with a width and height of 1 is drawn correctly. An ellipse with a width and height of 1 pixel is a single pixel. """ ellipse_color = pygame.Color("red") surface_color = pygame.Color("black") surf_w, surf_h = 10, 10 surface = pygame.Surface((surf_w, surf_h)) rect = pygame.Rect((0, 0), (1, 1)) # Calculate some positions. off_left = -1 off_right = surf_w off_top = -1 off_bottom = surf_h left_edge = 0 right_edge = surf_w - 1 top_edge = 0 bottom_edge = surf_h - 1 center_x = surf_w // 2 center_y = surf_h // 2 # Draw the ellipse in different positions: center surface, # top/bottom/left/right edges, and off-surface. positions = ( (off_left, off_top), (off_left, top_edge), (off_left, center_y), (off_left, bottom_edge), (off_left, off_bottom), (left_edge, off_top), (left_edge, top_edge), (left_edge, center_y), (left_edge, bottom_edge), (left_edge, off_bottom), (center_x, off_top), (center_x, top_edge), (center_x, center_y), (center_x, bottom_edge), (center_x, off_bottom), (right_edge, off_top), (right_edge, top_edge), (right_edge, center_y), (right_edge, bottom_edge), (right_edge, off_bottom), (off_right, off_top), (off_right, top_edge), (off_right, center_y), (off_right, bottom_edge), (off_right, off_bottom), ) for rect_pos in positions: surface.fill(surface_color) # Clear before each draw. rect.topleft = rect_pos self.draw_ellipse(surface, ellipse_color, rect) self._check_1_pixel_sized_ellipse( surface, rect, surface_color, ellipse_color ) def test_ellipse__bounding_rect(self): """Ensures draw ellipse returns the correct bounding rect. Tests ellipses on and off the surface and a range of width/thickness values. """ ellipse_color = pygame.Color("red") surf_color = pygame.Color("black") min_width = min_height = 5 max_width = max_height = 7 sizes = ((min_width, min_height), (max_width, max_height)) surface = pygame.Surface((20, 20), 0, 32) surf_rect = surface.get_rect() # Make a rect that is bigger than the surface to help test drawing # ellipses off and partially off the surface. big_rect = surf_rect.inflate(min_width * 2 + 1, min_height * 2 + 1) for pos in rect_corners_mids_and_center( surf_rect ) + rect_corners_mids_and_center(big_rect): # Each of the ellipse's rect position attributes will be set to # the pos value. for attr in RECT_POSITION_ATTRIBUTES: # Test using different rect sizes and thickness values. for width, height in sizes: ellipse_rect = pygame.Rect((0, 0), (width, height)) setattr(ellipse_rect, attr, pos) for thickness in (0, 1, 2, 3, min(width, height)): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_ellipse( surface, ellipse_color, ellipse_rect, thickness ) # Calculating the expected_rect after the ellipse # is drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, ellipse_rect.topleft ) self.assertEqual(bounding_rect, expected_rect) def test_ellipse__surface_clip(self): """Ensures draw ellipse respects a surface's clip area. Tests drawing the ellipse filled and unfilled. """ surfw = surfh = 30 ellipse_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the ellipse's pos. for width in (0, 1): # Filled and unfilled. # Test centering the ellipse along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the ellipse without the # clip area set. pos_rect.center = center surface.set_clip(None) surface.fill(surface_color) self.draw_ellipse(surface, ellipse_color, pos_rect, width) expected_pts = get_color_points(surface, ellipse_color, clip_rect) # Clear the surface and set the clip area. Redraw the ellipse # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_ellipse(surface, ellipse_color, pos_rect, width) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the ellipse_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = ellipse_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() class DrawEllipseTest(DrawEllipseMixin, DrawTestCase): """Test draw module function ellipse. This class inherits the general tests from DrawEllipseMixin. It is also the class to add any draw.ellipse specific tests to. """ # Commented out to avoid cluttering the test output. Add back in if draw_py # ever properly supports drawing ellipses. # @unittest.skip('draw_py.draw_ellipse not supported yet') # class PythonDrawEllipseTest(DrawEllipseMixin, PythonDrawTestCase): # """Test draw_py module function draw_ellipse. # # This class inherits the general tests from DrawEllipseMixin. It is also # the class to add any draw_py.draw_ellipse specific tests to. # """ ### Line/Lines/AALine/AALines Testing ######################################### class BaseLineMixin: """Mixin base for drawing various lines. This class contains general helper methods and setup for testing the different types of lines. """ COLORS = ( (0, 0, 0), (255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255), (255, 255, 255), ) @staticmethod def _create_surfaces(): # Create some surfaces with different sizes, depths, and flags. surfaces = [] for size in ((49, 49), (50, 50)): for depth in (8, 16, 24, 32): for flags in (0, SRCALPHA): surface = pygame.display.set_mode(size, flags, depth) surfaces.append(surface) surfaces.append(surface.convert_alpha()) return surfaces @staticmethod def _rect_lines(rect): # Yields pairs of end points and their reverse (to test symmetry). # Uses a rect with the points radiating from its midleft. for pt in rect_corners_mids_and_center(rect): if pt in [rect.midleft, rect.center]: # Don't bother with these points. continue yield (rect.midleft, pt) yield (pt, rect.midleft) ### Line Testing ############################################################## class LineMixin(BaseLineMixin): """Mixin test for drawing a single line. This class contains all the general single line drawing tests. """ def test_line__args(self): """Ensures draw line accepts the correct args.""" bounds_rect = self.draw_line( pygame.Surface((3, 3)), (0, 10, 0, 50), (0, 0), (1, 1), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__args_without_width(self): """Ensures draw line accepts the args without a width.""" bounds_rect = self.draw_line( pygame.Surface((2, 2)), (0, 0, 0, 50), (0, 0), (2, 2) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__kwargs(self): """Ensures draw line accepts the correct kwargs with and without a width arg. """ surface = pygame.Surface((4, 4)) color = pygame.Color("yellow") start_pos = (1, 1) end_pos = (2, 2) kwargs_list = [ { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "width": 1, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, }, ] for kwargs in kwargs_list: bounds_rect = self.draw_line(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__kwargs_order_independent(self): """Ensures draw line's kwargs are not order dependent.""" bounds_rect = self.draw_line( start_pos=(1, 2), end_pos=(2, 1), width=2, color=(10, 20, 30), surface=pygame.Surface((3, 2)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__args_missing(self): """Ensures draw line detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_line(surface, color, (0, 0)) with self.assertRaises(TypeError): bounds_rect = self.draw_line(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_line(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_line() def test_line__kwargs_missing(self): """Ensures draw line detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((3, 2)), "color": pygame.Color("red"), "start_pos": (2, 1), "end_pos": (2, 2), "width": 1, } for name in ("end_pos", "start_pos", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_line(**invalid_kwargs) def test_line__arg_invalid_types(self): """Ensures draw line detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") start_pos = (0, 1) end_pos = (1, 2) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_line(surface, color, start_pos, end_pos, "1") with self.assertRaises(TypeError): # Invalid end_pos. bounds_rect = self.draw_line(surface, color, start_pos, (1, 2, 3)) with self.assertRaises(TypeError): # Invalid start_pos. bounds_rect = self.draw_line(surface, color, (1,), end_pos) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_line(surface, 2.3, start_pos, end_pos) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_line((1, 2, 3, 4), color, start_pos, end_pos) def test_line__kwarg_invalid_types(self): """Ensures draw line detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") start_pos = (1, 0) end_pos = (2, 0) width = 1 kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "start_pos": start_pos, "end_pos": end_pos, "width": width, }, { "surface": surface, "color": 2.3, # Invalid color. "start_pos": start_pos, "end_pos": end_pos, "width": width, }, { "surface": surface, "color": color, "start_pos": (0, 0, 0), # Invalid start_pos. "end_pos": end_pos, "width": width, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": (0,), # Invalid end_pos. "width": width, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "width": 1.2, }, ] # Invalid width. for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_line(**kwargs) def test_line__kwarg_invalid_name(self): """Ensures draw line detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") start_pos = (1, 1) end_pos = (2, 0) kwargs_list = [ { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "width": 1, "invalid": 1, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_line(**kwargs) def test_line__args_and_kwargs(self): """Ensures draw line accepts a combination of args/kwargs""" surface = pygame.Surface((3, 2)) color = (255, 255, 0, 0) start_pos = (0, 1) end_pos = (1, 2) width = 0 kwargs = { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "width": width, } for name in ("surface", "color", "start_pos", "end_pos", "width"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_line(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_line(surface, color, **kwargs) elif "start_pos" == name: bounds_rect = self.draw_line(surface, color, start_pos, **kwargs) elif "end_pos" == name: bounds_rect = self.draw_line( surface, color, start_pos, end_pos, **kwargs ) else: bounds_rect = self.draw_line( surface, color, start_pos, end_pos, width, **kwargs ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__valid_width_values(self): """Ensures draw line accepts different width values.""" line_color = pygame.Color("yellow") surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) pos = (2, 1) kwargs = { "surface": surface, "color": line_color, "start_pos": pos, "end_pos": (2, 2), "width": None, } for width in (-100, -10, -1, 0, 1, 10, 100): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = line_color if width > 0 else surface_color bounds_rect = self.draw_line(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__valid_start_pos_formats(self): """Ensures draw line accepts different start_pos formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = { "surface": surface, "color": expected_color, "start_pos": None, "end_pos": (2, 2), "width": 2, } x, y = 2, 1 # start position # The point values can be ints or floats. for start_pos in ((x, y), (x + 0.1, y), (x, y + 0.1), (x + 0.1, y + 0.1)): # The point type can be a tuple/list/Vector2. for seq_type in (tuple, list, Vector2): surface.fill(surface_color) # Clear for each test. kwargs["start_pos"] = seq_type(start_pos) bounds_rect = self.draw_line(**kwargs) self.assertEqual(surface.get_at((x, y)), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__valid_end_pos_formats(self): """Ensures draw line accepts different end_pos formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = { "surface": surface, "color": expected_color, "start_pos": (2, 1), "end_pos": None, "width": 2, } x, y = 2, 2 # end position # The point values can be ints or floats. for end_pos in ((x, y), (x + 0.2, y), (x, y + 0.2), (x + 0.2, y + 0.2)): # The point type can be a tuple/list/Vector2. for seq_type in (tuple, list, Vector2): surface.fill(surface_color) # Clear for each test. kwargs["end_pos"] = seq_type(end_pos) bounds_rect = self.draw_line(**kwargs) self.assertEqual(surface.get_at((x, y)), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__invalid_start_pos_formats(self): """Ensures draw line handles invalid start_pos formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "start_pos": None, "end_pos": (2, 2), "width": 1, } start_pos_fmts = ( (2,), # Too few coords. (2, 1, 0), # Too many coords. (2, "1"), # Wrong type. {2, 1}, # Wrong type. {2: 1}, ) # Wrong type. for start_pos in start_pos_fmts: kwargs["start_pos"] = start_pos with self.assertRaises(TypeError): bounds_rect = self.draw_line(**kwargs) def test_line__invalid_end_pos_formats(self): """Ensures draw line handles invalid end_pos formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "start_pos": (2, 2), "end_pos": None, "width": 1, } end_pos_fmts = ( (2,), # Too few coords. (2, 1, 0), # Too many coords. (2, "1"), # Wrong type. {2, 1}, # Wrong type. {2: 1}, ) # Wrong type. for end_pos in end_pos_fmts: kwargs["end_pos"] = end_pos with self.assertRaises(TypeError): bounds_rect = self.draw_line(**kwargs) def test_line__valid_color_formats(self): """Ensures draw line accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) pos = (1, 1) kwargs = { "surface": surface, "color": None, "start_pos": pos, "end_pos": (2, 1), "width": 3, } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_line(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_line__invalid_color_formats(self): """Ensures draw line handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "start_pos": (1, 1), "end_pos": (2, 1), "width": 1, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_line(**kwargs) def test_line__color(self): """Tests if the line drawn is the correct color.""" pos = (0, 0) for surface in self._create_surfaces(): for expected_color in self.COLORS: self.draw_line(surface, expected_color, pos, (1, 0)) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_line__color_with_thickness(self): """Ensures a thick line is drawn using the correct color.""" from_x = 5 to_x = 10 y = 5 for surface in self._create_surfaces(): for expected_color in self.COLORS: self.draw_line(surface, expected_color, (from_x, y), (to_x, y), 5) for pos in ((x, y + i) for i in (-2, 0, 2) for x in (from_x, to_x)): self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_line__gaps(self): """Tests if the line drawn contains any gaps.""" expected_color = (255, 255, 255) for surface in self._create_surfaces(): width = surface.get_width() self.draw_line(surface, expected_color, (0, 0), (width - 1, 0)) for x in range(width): pos = (x, 0) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_line__gaps_with_thickness(self): """Ensures a thick line is drawn without any gaps.""" expected_color = (255, 255, 255) thickness = 5 for surface in self._create_surfaces(): width = surface.get_width() - 1 h = width // 5 w = h * 5 self.draw_line(surface, expected_color, (0, 5), (w, 5 + h), thickness) for x in range(w + 1): for y in range(3, 8): pos = (x, y + ((x + 2) // 5)) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_line__bounding_rect(self): """Ensures draw line returns the correct bounding rect. Tests lines with endpoints on and off the surface and a range of width/thickness values. """ if isinstance(self, PythonDrawTestCase): self.skipTest("bounding rects not supported in draw_py.draw_line") line_color = pygame.Color("red") surf_color = pygame.Color("black") width = height = 30 # Using a rect to help manage where the lines are drawn. helper_rect = pygame.Rect((0, 0), (width, height)) # Testing surfaces of different sizes. One larger than the helper_rect # and one smaller (to test lines that span the surface). for size in ((width + 5, height + 5), (width - 5, height - 5)): surface = pygame.Surface(size, 0, 32) surf_rect = surface.get_rect() # Move the helper rect to different positions to test line # endpoints on and off the surface. for pos in rect_corners_mids_and_center(surf_rect): helper_rect.center = pos # Draw using different thicknesses. for thickness in range(-1, 5): for start, end in self._rect_lines(helper_rect): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_line( surface, line_color, start, end, thickness ) if 0 < thickness: # Calculating the expected_rect after the line is # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, start ) else: # Nothing drawn. expected_rect = pygame.Rect(start, (0, 0)) self.assertEqual( bounding_rect, expected_rect, "start={}, end={}, size={}, thickness={}".format( start, end, size, thickness ), ) def test_line__surface_clip(self): """Ensures draw line respects a surface's clip area.""" surfw = surfh = 30 line_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the line's pos. for thickness in (1, 3): # Test different line widths. # Test centering the line along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the line without the # clip area set. pos_rect.center = center surface.set_clip(None) surface.fill(surface_color) self.draw_line( surface, line_color, pos_rect.midtop, pos_rect.midbottom, thickness ) expected_pts = get_color_points(surface, line_color, clip_rect) # Clear the surface and set the clip area. Redraw the line # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_line( surface, line_color, pos_rect.midtop, pos_rect.midbottom, thickness ) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the line_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = line_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() # Commented out to avoid cluttering the test output. Add back in if draw_py # ever fully supports drawing single lines. # @unittest.skip('draw_py.draw_line not fully supported yet') # class PythonDrawLineTest(LineMixin, PythonDrawTestCase): # """Test draw_py module function line. # # This class inherits the general tests from LineMixin. It is also the class # to add any draw_py.draw_line specific tests to. # """ class DrawLineTest(LineMixin, DrawTestCase): """Test draw module function line. This class inherits the general tests from LineMixin. It is also the class to add any draw.line specific tests to. """ def test_line_endianness(self): """test color component order""" for depth in (24, 32): surface = pygame.Surface((5, 3), 0, depth) surface.fill(pygame.Color(0, 0, 0)) self.draw_line(surface, pygame.Color(255, 0, 0), (0, 1), (2, 1), 1) self.assertGreater(surface.get_at((1, 1)).r, 0, "there should be red here") surface.fill(pygame.Color(0, 0, 0)) self.draw_line(surface, pygame.Color(0, 0, 255), (0, 1), (2, 1), 1) self.assertGreater(surface.get_at((1, 1)).b, 0, "there should be blue here") def test_line(self): # (l, t), (l, t) self.surf_size = (320, 200) self.surf = pygame.Surface(self.surf_size, pygame.SRCALPHA) self.color = (1, 13, 24, 205) drawn = draw.line(self.surf, self.color, (1, 0), (200, 0)) self.assertEqual( drawn.right, 201, "end point arg should be (or at least was) inclusive" ) # Should be colored where it's supposed to be for pt in test_utils.rect_area_pts(drawn): self.assertEqual(self.surf.get_at(pt), self.color) # And not where it shouldn't for pt in test_utils.rect_outer_bounds(drawn): self.assertNotEqual(self.surf.get_at(pt), self.color) # Line width greater that 1 line_width = 2 offset = 5 a = (offset, offset) b = (self.surf_size[0] - offset, a[1]) c = (a[0], self.surf_size[1] - offset) d = (b[0], c[1]) e = (a[0] + offset, c[1]) f = (b[0], c[0] + 5) lines = [ (a, d), (b, c), (c, b), (d, a), (a, b), (b, a), (a, c), (c, a), (a, e), (e, a), (a, f), (f, a), (a, a), ] for p1, p2 in lines: msg = f"{p1} - {p2}" if p1[0] <= p2[0]: plow = p1 phigh = p2 else: plow = p2 phigh = p1 self.surf.fill((0, 0, 0)) rec = draw.line(self.surf, (255, 255, 255), p1, p2, line_width) xinc = yinc = 0 if abs(p1[0] - p2[0]) > abs(p1[1] - p2[1]): yinc = 1 else: xinc = 1 for i in range(line_width): p = (p1[0] + xinc * i, p1[1] + yinc * i) self.assertEqual(self.surf.get_at(p), (255, 255, 255), msg) p = (p2[0] + xinc * i, p2[1] + yinc * i) self.assertEqual(self.surf.get_at(p), (255, 255, 255), msg) p = (plow[0] - 1, plow[1]) self.assertEqual(self.surf.get_at(p), (0, 0, 0), msg) p = (plow[0] + xinc * line_width, plow[1] + yinc * line_width) self.assertEqual(self.surf.get_at(p), (0, 0, 0), msg) p = (phigh[0] + xinc * line_width, phigh[1] + yinc * line_width) self.assertEqual(self.surf.get_at(p), (0, 0, 0), msg) if p1[0] < p2[0]: rx = p1[0] else: rx = p2[0] if p1[1] < p2[1]: ry = p1[1] else: ry = p2[1] w = abs(p2[0] - p1[0]) + 1 + xinc * (line_width - 1) h = abs(p2[1] - p1[1]) + 1 + yinc * (line_width - 1) msg += f", {rec}" self.assertEqual(rec, (rx, ry, w, h), msg) def test_line_for_gaps(self): # This checks bug Thick Line Bug #448 width = 200 height = 200 surf = pygame.Surface((width, height), pygame.SRCALPHA) def white_surrounded_pixels(x, y): offsets = [(1, 0), (0, 1), (-1, 0), (0, -1)] WHITE = (255, 255, 255, 255) return len( [1 for dx, dy in offsets if surf.get_at((x + dx, y + dy)) == WHITE] ) def check_white_line(start, end): surf.fill((0, 0, 0)) pygame.draw.line(surf, (255, 255, 255), start, end, 30) BLACK = (0, 0, 0, 255) for x in range(1, width - 1): for y in range(1, height - 1): if surf.get_at((x, y)) == BLACK: self.assertTrue(white_surrounded_pixels(x, y) < 3) check_white_line((50, 50), (140, 0)) check_white_line((50, 50), (0, 120)) check_white_line((50, 50), (199, 198)) ### Lines Testing ############################################################# class LinesMixin(BaseLineMixin): """Mixin test for drawing lines. This class contains all the general lines drawing tests. """ def test_lines__args(self): """Ensures draw lines accepts the correct args.""" bounds_rect = self.draw_lines( pygame.Surface((3, 3)), (0, 10, 0, 50), False, ((0, 0), (1, 1)), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__args_without_width(self): """Ensures draw lines accepts the args without a width.""" bounds_rect = self.draw_lines( pygame.Surface((2, 2)), (0, 0, 0, 50), False, ((0, 0), (1, 1)) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__kwargs(self): """Ensures draw lines accepts the correct kwargs with and without a width arg. """ surface = pygame.Surface((4, 4)) color = pygame.Color("yellow") points = ((0, 0), (1, 1), (2, 2)) kwargs_list = [ { "surface": surface, "color": color, "closed": False, "points": points, "width": 1, }, {"surface": surface, "color": color, "closed": False, "points": points}, ] for kwargs in kwargs_list: bounds_rect = self.draw_lines(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__kwargs_order_independent(self): """Ensures draw lines's kwargs are not order dependent.""" bounds_rect = self.draw_lines( closed=1, points=((0, 0), (1, 1), (2, 2)), width=2, color=(10, 20, 30), surface=pygame.Surface((3, 2)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__args_missing(self): """Ensures draw lines detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_lines(surface, color, 0) with self.assertRaises(TypeError): bounds_rect = self.draw_lines(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_lines(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_lines() def test_lines__kwargs_missing(self): """Ensures draw lines detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((3, 2)), "color": pygame.Color("red"), "closed": 1, "points": ((2, 2), (1, 1)), "width": 1, } for name in ("points", "closed", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_lines(**invalid_kwargs) def test_lines__arg_invalid_types(self): """Ensures draw lines detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") closed = 0 points = ((1, 2), (2, 1)) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_lines(surface, color, closed, points, "1") with self.assertRaises(TypeError): # Invalid points. bounds_rect = self.draw_lines(surface, color, closed, (1, 2, 3)) with self.assertRaises(TypeError): # Invalid closed. bounds_rect = self.draw_lines(surface, color, InvalidBool(), points) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_lines(surface, 2.3, closed, points) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_lines((1, 2, 3, 4), color, closed, points) def test_lines__kwarg_invalid_types(self): """Ensures draw lines detects invalid kwarg types.""" valid_kwargs = { "surface": pygame.Surface((3, 3)), "color": pygame.Color("green"), "closed": False, "points": ((1, 2), (2, 1)), "width": 1, } invalid_kwargs = { "surface": pygame.Surface, "color": 2.3, "closed": InvalidBool(), "points": (0, 0, 0), "width": 1.2, } for kwarg in ("surface", "color", "closed", "points", "width"): kwargs = dict(valid_kwargs) kwargs[kwarg] = invalid_kwargs[kwarg] with self.assertRaises(TypeError): bounds_rect = self.draw_lines(**kwargs) def test_lines__kwarg_invalid_name(self): """Ensures draw lines detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") closed = 1 points = ((1, 2), (2, 1)) kwargs_list = [ { "surface": surface, "color": color, "closed": closed, "points": points, "width": 1, "invalid": 1, }, { "surface": surface, "color": color, "closed": closed, "points": points, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_lines(**kwargs) def test_lines__args_and_kwargs(self): """Ensures draw lines accepts a combination of args/kwargs""" surface = pygame.Surface((3, 2)) color = (255, 255, 0, 0) closed = 0 points = ((1, 2), (2, 1)) width = 1 kwargs = { "surface": surface, "color": color, "closed": closed, "points": points, "width": width, } for name in ("surface", "color", "closed", "points", "width"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_lines(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_lines(surface, color, **kwargs) elif "closed" == name: bounds_rect = self.draw_lines(surface, color, closed, **kwargs) elif "points" == name: bounds_rect = self.draw_lines(surface, color, closed, points, **kwargs) else: bounds_rect = self.draw_lines( surface, color, closed, points, width, **kwargs ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__valid_width_values(self): """Ensures draw lines accepts different width values.""" line_color = pygame.Color("yellow") surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) pos = (1, 1) kwargs = { "surface": surface, "color": line_color, "closed": False, "points": (pos, (2, 1)), "width": None, } for width in (-100, -10, -1, 0, 1, 10, 100): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = line_color if width > 0 else surface_color bounds_rect = self.draw_lines(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__valid_points_format(self): """Ensures draw lines accepts different points formats.""" expected_color = (10, 20, 30, 255) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": expected_color, "closed": False, "points": None, "width": 1, } # The point type can be a tuple/list/Vector2. point_types = ( (tuple, tuple, tuple, tuple), # all tuples (list, list, list, list), # all lists (Vector2, Vector2, Vector2, Vector2), # all Vector2s (list, Vector2, tuple, Vector2), ) # mix # The point values can be ints or floats. point_values = ( ((1, 1), (2, 1), (2, 2), (1, 2)), ((1, 1), (2.2, 1), (2.1, 2.2), (1, 2.1)), ) # Each sequence of points can be a tuple or a list. seq_types = (tuple, list) for point_type in point_types: for values in point_values: check_pos = values[0] points = [point_type[i](pt) for i, pt in enumerate(values)] for seq_type in seq_types: surface.fill(surface_color) # Clear for each test. kwargs["points"] = seq_type(points) bounds_rect = self.draw_lines(**kwargs) self.assertEqual(surface.get_at(check_pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__invalid_points_formats(self): """Ensures draw lines handles invalid points formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "closed": False, "points": None, "width": 1, } points_fmts = ( ((1, 1), (2,)), # Too few coords. ((1, 1), (2, 2, 2)), # Too many coords. ((1, 1), (2, "2")), # Wrong type. ((1, 1), {2, 3}), # Wrong type. ((1, 1), {2: 2, 3: 3}), # Wrong type. {(1, 1), (1, 2)}, # Wrong type. {1: 1, 4: 4}, ) # Wrong type. for points in points_fmts: kwargs["points"] = points with self.assertRaises(TypeError): bounds_rect = self.draw_lines(**kwargs) def test_lines__invalid_points_values(self): """Ensures draw lines handles invalid points values correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "closed": False, "points": None, "width": 1, } for points in ([], ((1, 1),)): # Too few points. for seq_type in (tuple, list): # Test as tuples and lists. kwargs["points"] = seq_type(points) with self.assertRaises(ValueError): bounds_rect = self.draw_lines(**kwargs) def test_lines__valid_closed_values(self): """Ensures draw lines accepts different closed values.""" line_color = pygame.Color("blue") surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) pos = (1, 2) kwargs = { "surface": surface, "color": line_color, "closed": None, "points": ((1, 1), (3, 1), (3, 3), (1, 3)), "width": 1, } true_values = (-7, 1, 10, "2", 3.1, (4,), [5], True) false_values = (None, "", 0, (), [], False) for closed in true_values + false_values: surface.fill(surface_color) # Clear for each test. kwargs["closed"] = closed expected_color = line_color if closed else surface_color bounds_rect = self.draw_lines(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__valid_color_formats(self): """Ensures draw lines accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) pos = (1, 1) kwargs = { "surface": surface, "color": None, "closed": False, "points": (pos, (2, 1)), "width": 3, } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_lines(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_lines__invalid_color_formats(self): """Ensures draw lines handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "closed": False, "points": ((1, 1), (1, 2)), "width": 1, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_lines(**kwargs) def test_lines__color(self): """Tests if the lines drawn are the correct color. Draws lines around the border of the given surface and checks if all borders of the surface only contain the given color. """ for surface in self._create_surfaces(): for expected_color in self.COLORS: self.draw_lines(surface, expected_color, True, corners(surface)) for pos, color in border_pos_and_color(surface): self.assertEqual(color, expected_color, f"pos={pos}") def test_lines__color_with_thickness(self): """Ensures thick lines are drawn using the correct color.""" x_left = y_top = 5 for surface in self._create_surfaces(): x_right = surface.get_width() - 5 y_bottom = surface.get_height() - 5 endpoints = ( (x_left, y_top), (x_right, y_top), (x_right, y_bottom), (x_left, y_bottom), ) for expected_color in self.COLORS: self.draw_lines(surface, expected_color, True, endpoints, 3) for t in (-1, 0, 1): for x in range(x_left, x_right + 1): for y in (y_top, y_bottom): pos = (x, y + t) self.assertEqual( surface.get_at(pos), expected_color, f"pos={pos}", ) for y in range(y_top, y_bottom + 1): for x in (x_left, x_right): pos = (x + t, y) self.assertEqual( surface.get_at(pos), expected_color, f"pos={pos}", ) def test_lines__gaps(self): """Tests if the lines drawn contain any gaps. Draws lines around the border of the given surface and checks if all borders of the surface contain any gaps. """ expected_color = (255, 255, 255) for surface in self._create_surfaces(): self.draw_lines(surface, expected_color, True, corners(surface)) for pos, color in border_pos_and_color(surface): self.assertEqual(color, expected_color, f"pos={pos}") def test_lines__gaps_with_thickness(self): """Ensures thick lines are drawn without any gaps.""" expected_color = (255, 255, 255) x_left = y_top = 5 for surface in self._create_surfaces(): h = (surface.get_width() - 11) // 5 w = h * 5 x_right = x_left + w y_bottom = y_top + h endpoints = ((x_left, y_top), (x_right, y_top), (x_right, y_bottom)) self.draw_lines(surface, expected_color, True, endpoints, 3) for x in range(x_left, x_right + 1): for t in (-1, 0, 1): pos = (x, y_top + t) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") pos = (x, y_top + t + ((x - 3) // 5)) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") for y in range(y_top, y_bottom + 1): for t in (-1, 0, 1): pos = (x_right + t, y) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_lines__bounding_rect(self): """Ensures draw lines returns the correct bounding rect. Tests lines with endpoints on and off the surface and a range of width/thickness values. """ line_color = pygame.Color("red") surf_color = pygame.Color("black") width = height = 30 # Using a rect to help manage where the lines are drawn. pos_rect = pygame.Rect((0, 0), (width, height)) # Testing surfaces of different sizes. One larger than the pos_rect # and one smaller (to test lines that span the surface). for size in ((width + 5, height + 5), (width - 5, height - 5)): surface = pygame.Surface(size, 0, 32) surf_rect = surface.get_rect() # Move pos_rect to different positions to test line endpoints on # and off the surface. for pos in rect_corners_mids_and_center(surf_rect): pos_rect.center = pos # Shape: Triangle (if closed), ^ caret (if not closed). pts = (pos_rect.midleft, pos_rect.midtop, pos_rect.midright) pos = pts[0] # Rect position if nothing drawn. # Draw using different thickness and closed values. for thickness in range(-1, 5): for closed in (True, False): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_lines( surface, line_color, closed, pts, thickness ) if 0 < thickness: # Calculating the expected_rect after the lines are # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, pos ) else: # Nothing drawn. expected_rect = pygame.Rect(pos, (0, 0)) self.assertEqual(bounding_rect, expected_rect) def test_lines__surface_clip(self): """Ensures draw lines respects a surface's clip area.""" surfw = surfh = 30 line_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the lines's pos. # Test centering the pos_rect along the clip rect's edge to allow for # drawing the lines over the clip_rect's bounds. for center in rect_corners_mids_and_center(clip_rect): pos_rect.center = center pts = (pos_rect.midtop, pos_rect.center, pos_rect.midbottom) for closed in (True, False): # Test closed and not closed. for thickness in (1, 3): # Test different line widths. # Get the expected points by drawing the lines without the # clip area set. surface.set_clip(None) surface.fill(surface_color) self.draw_lines(surface, line_color, closed, pts, thickness) expected_pts = get_color_points(surface, line_color, clip_rect) # Clear the surface and set the clip area. Redraw the lines # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_lines(surface, line_color, closed, pts, thickness) surface.lock() # For possible speed up. # Check all the surface points to ensure only the # expected_pts are the line_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = line_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() # Commented out to avoid cluttering the test output. Add back in if draw_py # ever fully supports drawing lines. # class PythonDrawLinesTest(LinesMixin, PythonDrawTestCase): # """Test draw_py module function lines. # # This class inherits the general tests from LinesMixin. It is also the # class to add any draw_py.draw_lines specific tests to. # """ class DrawLinesTest(LinesMixin, DrawTestCase): """Test draw module function lines. This class inherits the general tests from LinesMixin. It is also the class to add any draw.lines specific tests to. """ ### AALine Testing ############################################################ class AALineMixin(BaseLineMixin): """Mixin test for drawing a single aaline. This class contains all the general single aaline drawing tests. """ def test_aaline__args(self): """Ensures draw aaline accepts the correct args.""" bounds_rect = self.draw_aaline( pygame.Surface((3, 3)), (0, 10, 0, 50), (0, 0), (1, 1), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__args_without_blend(self): """Ensures draw aaline accepts the args without a blend.""" bounds_rect = self.draw_aaline( pygame.Surface((2, 2)), (0, 0, 0, 50), (0, 0), (2, 2) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__blend_warning(self): """From pygame 2, blend=False should raise DeprecationWarning.""" with warnings.catch_warnings(record=True) as w: # Cause all warnings to always be triggered. warnings.simplefilter("always") # Trigger DeprecationWarning. self.draw_aaline( pygame.Surface((2, 2)), (0, 0, 0, 50), (0, 0), (2, 2), False ) # Check if there is only one warning and is a DeprecationWarning. self.assertEqual(len(w), 1) self.assertTrue(issubclass(w[-1].category, DeprecationWarning)) def test_aaline__kwargs(self): """Ensures draw aaline accepts the correct kwargs""" surface = pygame.Surface((4, 4)) color = pygame.Color("yellow") start_pos = (1, 1) end_pos = (2, 2) kwargs_list = [ { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, }, ] for kwargs in kwargs_list: bounds_rect = self.draw_aaline(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__kwargs_order_independent(self): """Ensures draw aaline's kwargs are not order dependent.""" bounds_rect = self.draw_aaline( start_pos=(1, 2), end_pos=(2, 1), color=(10, 20, 30), surface=pygame.Surface((3, 2)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__args_missing(self): """Ensures draw aaline detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(surface, color, (0, 0)) with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_aaline() def test_aaline__kwargs_missing(self): """Ensures draw aaline detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((3, 2)), "color": pygame.Color("red"), "start_pos": (2, 1), "end_pos": (2, 2), } for name in ("end_pos", "start_pos", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**invalid_kwargs) def test_aaline__arg_invalid_types(self): """Ensures draw aaline detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") start_pos = (0, 1) end_pos = (1, 2) with self.assertRaises(TypeError): # Invalid end_pos. bounds_rect = self.draw_aaline(surface, color, start_pos, (1, 2, 3)) with self.assertRaises(TypeError): # Invalid start_pos. bounds_rect = self.draw_aaline(surface, color, (1,), end_pos) with self.assertRaises(ValueError): # Invalid color. bounds_rect = self.draw_aaline(surface, "invalid-color", start_pos, end_pos) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_aaline((1, 2, 3, 4), color, start_pos, end_pos) def test_aaline__kwarg_invalid_types(self): """Ensures draw aaline detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") start_pos = (1, 0) end_pos = (2, 0) kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "start_pos": start_pos, "end_pos": end_pos, }, { "surface": surface, "color": 2.3, # Invalid color. "start_pos": start_pos, "end_pos": end_pos, }, { "surface": surface, "color": color, "start_pos": (0, 0, 0), # Invalid start_pos. "end_pos": end_pos, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": (0,), # Invalid end_pos. }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**kwargs) def test_aaline__kwarg_invalid_name(self): """Ensures draw aaline detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") start_pos = (1, 1) end_pos = (2, 0) kwargs_list = [ { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "invalid": 1, }, { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**kwargs) def test_aaline__args_and_kwargs(self): """Ensures draw aaline accepts a combination of args/kwargs""" surface = pygame.Surface((3, 2)) color = (255, 255, 0, 0) start_pos = (0, 1) end_pos = (1, 2) kwargs = { "surface": surface, "color": color, "start_pos": start_pos, "end_pos": end_pos, } for name in ("surface", "color", "start_pos", "end_pos"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_aaline(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_aaline(surface, color, **kwargs) elif "start_pos" == name: bounds_rect = self.draw_aaline(surface, color, start_pos, **kwargs) elif "end_pos" == name: bounds_rect = self.draw_aaline( surface, color, start_pos, end_pos, **kwargs ) else: bounds_rect = self.draw_aaline( surface, color, start_pos, end_pos, **kwargs ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__valid_start_pos_formats(self): """Ensures draw aaline accepts different start_pos formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = { "surface": surface, "color": expected_color, "start_pos": None, "end_pos": (2, 2), } x, y = 2, 1 # start position positions = ((x, y), (x + 0.01, y), (x, y + 0.01), (x + 0.01, y + 0.01)) for start_pos in positions: for seq_type in (tuple, list, Vector2): surface.fill(surface_color) # Clear for each test. kwargs["start_pos"] = seq_type(start_pos) bounds_rect = self.draw_aaline(**kwargs) color = surface.get_at((x, y)) for i, sub_color in enumerate(expected_color): # The color could be slightly off the expected color due to # any fractional position arguments. self.assertGreaterEqual(color[i] + 6, sub_color, start_pos) self.assertIsInstance(bounds_rect, pygame.Rect, start_pos) def test_aaline__valid_end_pos_formats(self): """Ensures draw aaline accepts different end_pos formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = { "surface": surface, "color": expected_color, "start_pos": (2, 1), "end_pos": None, } x, y = 2, 2 # end position positions = ((x, y), (x + 0.02, y), (x, y + 0.02), (x + 0.02, y + 0.02)) for end_pos in positions: for seq_type in (tuple, list, Vector2): surface.fill(surface_color) # Clear for each test. kwargs["end_pos"] = seq_type(end_pos) bounds_rect = self.draw_aaline(**kwargs) color = surface.get_at((x, y)) for i, sub_color in enumerate(expected_color): # The color could be slightly off the expected color due to # any fractional position arguments. self.assertGreaterEqual(color[i] + 15, sub_color, end_pos) self.assertIsInstance(bounds_rect, pygame.Rect, end_pos) def test_aaline__invalid_start_pos_formats(self): """Ensures draw aaline handles invalid start_pos formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "start_pos": None, "end_pos": (2, 2), } start_pos_fmts = ( (2,), # Too few coords. (2, 1, 0), # Too many coords. (2, "1"), # Wrong type. {2, 1}, # Wrong type. {2: 1}, ) # Wrong type. for start_pos in start_pos_fmts: kwargs["start_pos"] = start_pos with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**kwargs) def test_aaline__invalid_end_pos_formats(self): """Ensures draw aaline handles invalid end_pos formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "start_pos": (2, 2), "end_pos": None, } end_pos_fmts = ( (2,), # Too few coords. (2, 1, 0), # Too many coords. (2, "1"), # Wrong type. {2, 1}, # Wrong type. {2: 1}, ) # Wrong type. for end_pos in end_pos_fmts: kwargs["end_pos"] = end_pos with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**kwargs) def test_aaline__valid_color_formats(self): """Ensures draw aaline accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) pos = (1, 1) kwargs = { "surface": surface, "color": None, "start_pos": pos, "end_pos": (2, 1), } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_aaline(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aaline__invalid_color_formats(self): """Ensures draw aaline handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "start_pos": (1, 1), "end_pos": (2, 1), } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_aaline(**kwargs) def test_aaline__color(self): """Tests if the aaline drawn is the correct color.""" pos = (0, 0) for surface in self._create_surfaces(): for expected_color in self.COLORS: self.draw_aaline(surface, expected_color, pos, (1, 0)) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_aaline__gaps(self): """Tests if the aaline drawn contains any gaps. See: #512 """ expected_color = (255, 255, 255) for surface in self._create_surfaces(): width = surface.get_width() self.draw_aaline(surface, expected_color, (0, 0), (width - 1, 0)) for x in range(width): pos = (x, 0) self.assertEqual(surface.get_at(pos), expected_color, f"pos={pos}") def test_aaline__bounding_rect(self): """Ensures draw aaline returns the correct bounding rect. Tests lines with endpoints on and off the surface. """ line_color = pygame.Color("red") surf_color = pygame.Color("blue") width = height = 30 # Using a rect to help manage where the lines are drawn. helper_rect = pygame.Rect((0, 0), (width, height)) # Testing surfaces of different sizes. One larger than the helper_rect # and one smaller (to test lines that span the surface). for size in ((width + 5, height + 5), (width - 5, height - 5)): surface = pygame.Surface(size, 0, 32) surf_rect = surface.get_rect() # Move the helper rect to different positions to test line # endpoints on and off the surface. for pos in rect_corners_mids_and_center(surf_rect): helper_rect.center = pos for start, end in self._rect_lines(helper_rect): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_aaline(surface, line_color, start, end) # Calculating the expected_rect after the line is # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect(surface, surf_color, start) self.assertEqual(bounding_rect, expected_rect) def test_aaline__surface_clip(self): """Ensures draw aaline respects a surface's clip area.""" surfw = surfh = 30 aaline_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the aaline's pos. # Test centering the pos_rect along the clip rect's edge to allow for # drawing the aaline over the clip_rect's bounds. for center in rect_corners_mids_and_center(clip_rect): pos_rect.center = center # Get the expected points by drawing the aaline without the # clip area set. surface.set_clip(None) surface.fill(surface_color) self.draw_aaline(surface, aaline_color, pos_rect.midtop, pos_rect.midbottom) expected_pts = get_color_points(surface, surface_color, clip_rect, False) # Clear the surface and set the clip area. Redraw the aaline # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_aaline(surface, aaline_color, pos_rect.midtop, pos_rect.midbottom) surface.lock() # For possible speed up. # Check all the surface points to ensure the expected_pts # are not surface_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: self.assertNotEqual(surface.get_at(pt), surface_color, pt) else: self.assertEqual(surface.get_at(pt), surface_color, pt) surface.unlock() # Commented out to avoid cluttering the test output. Add back in if draw_py # ever fully supports drawing single aalines. # class PythonDrawAALineTest(AALineMixin, PythonDrawTestCase): # """Test draw_py module function aaline. # # This class inherits the general tests from AALineMixin. It is also the # class to add any draw_py.draw_aaline specific tests to. # """ class DrawAALineTest(AALineMixin, DrawTestCase): """Test draw module function aaline. This class inherits the general tests from AALineMixin. It is also the class to add any draw.aaline specific tests to. """ def test_aaline_endianness(self): """test color component order""" for depth in (24, 32): surface = pygame.Surface((5, 3), 0, depth) surface.fill(pygame.Color(0, 0, 0)) self.draw_aaline(surface, pygame.Color(255, 0, 0), (0, 1), (2, 1), 1) self.assertGreater(surface.get_at((1, 1)).r, 0, "there should be red here") surface.fill(pygame.Color(0, 0, 0)) self.draw_aaline(surface, pygame.Color(0, 0, 255), (0, 1), (2, 1), 1) self.assertGreater(surface.get_at((1, 1)).b, 0, "there should be blue here") def _check_antialiasing( self, from_point, to_point, should, check_points, set_endpoints=True ): """Draw a line between two points and check colors of check_points.""" if set_endpoints: should[from_point] = should[to_point] = FG_GREEN def check_one_direction(from_point, to_point, should): self.draw_aaline(self.surface, FG_GREEN, from_point, to_point, True) for pt in check_points: color = should.get(pt, BG_RED) with self.subTest(from_pt=from_point, pt=pt, to=to_point): self.assertEqual(self.surface.get_at(pt), color) # reset draw.rect(self.surface, BG_RED, (0, 0, 10, 10), 0) # it is important to test also opposite direction, the algorithm # is (#512) or was not symmetric check_one_direction(from_point, to_point, should) if from_point != to_point: check_one_direction(to_point, from_point, should) def test_short_non_antialiased_lines(self): """test very short not anti aliased lines in all directions.""" # Horizontal, vertical and diagonal lines should not be anti-aliased, # even with draw.aaline ... self.surface = pygame.Surface((10, 10)) draw.rect(self.surface, BG_RED, (0, 0, 10, 10), 0) check_points = [(i, j) for i in range(3, 8) for j in range(3, 8)] def check_both_directions(from_pt, to_pt, other_points): should = {pt: FG_GREEN for pt in other_points} self._check_antialiasing(from_pt, to_pt, should, check_points) # 0. one point check_both_directions((5, 5), (5, 5), []) # 1. horizontal check_both_directions((4, 7), (5, 7), []) check_both_directions((5, 4), (7, 4), [(6, 4)]) # 2. vertical check_both_directions((5, 5), (5, 6), []) check_both_directions((6, 4), (6, 6), [(6, 5)]) # 3. diagonals check_both_directions((5, 5), (6, 6), []) check_both_directions((5, 5), (7, 7), [(6, 6)]) check_both_directions((5, 6), (6, 5), []) check_both_directions((6, 4), (4, 6), [(5, 5)]) def test_short_line_anti_aliasing(self): self.surface = pygame.Surface((10, 10)) draw.rect(self.surface, BG_RED, (0, 0, 10, 10), 0) check_points = [(i, j) for i in range(3, 8) for j in range(3, 8)] def check_both_directions(from_pt, to_pt, should): self._check_antialiasing(from_pt, to_pt, should, check_points) brown = (127, 127, 0) reddish = (191, 63, 0) greenish = (63, 191, 0) # lets say dx = abs(x0 - x1) ; dy = abs(y0 - y1) # dy / dx = 0.5 check_both_directions((4, 4), (6, 5), {(5, 4): brown, (5, 5): brown}) check_both_directions((4, 5), (6, 4), {(5, 4): brown, (5, 5): brown}) # dy / dx = 2 check_both_directions((4, 4), (5, 6), {(4, 5): brown, (5, 5): brown}) check_both_directions((5, 4), (4, 6), {(4, 5): brown, (5, 5): brown}) # some little longer lines; so we need to check more points: check_points = [(i, j) for i in range(2, 9) for j in range(2, 9)] # dy / dx = 0.25 should = { (4, 3): greenish, (5, 3): brown, (6, 3): reddish, (4, 4): reddish, (5, 4): brown, (6, 4): greenish, } check_both_directions((3, 3), (7, 4), should) should = { (4, 3): reddish, (5, 3): brown, (6, 3): greenish, (4, 4): greenish, (5, 4): brown, (6, 4): reddish, } check_both_directions((3, 4), (7, 3), should) # dy / dx = 4 should = { (4, 4): greenish, (4, 5): brown, (4, 6): reddish, (5, 4): reddish, (5, 5): brown, (5, 6): greenish, } check_both_directions((4, 3), (5, 7), should) should = { (4, 4): reddish, (4, 5): brown, (4, 6): greenish, (5, 4): greenish, (5, 5): brown, (5, 6): reddish, } check_both_directions((5, 3), (4, 7), should) def test_anti_aliasing_float_coordinates(self): """Float coordinates should be blended smoothly.""" self.surface = pygame.Surface((10, 10)) draw.rect(self.surface, BG_RED, (0, 0, 10, 10), 0) check_points = [(i, j) for i in range(5) for j in range(5)] brown = (127, 127, 0) reddish = (191, 63, 0) greenish = (63, 191, 0) # 0. identical point : current implementation does no smoothing... expected = {(2, 2): FG_GREEN} self._check_antialiasing( (1.5, 2), (1.5, 2), expected, check_points, set_endpoints=False ) expected = {(2, 3): FG_GREEN} self._check_antialiasing( (2.49, 2.7), (2.49, 2.7), expected, check_points, set_endpoints=False ) # 1. horizontal lines # a) blend endpoints expected = {(1, 2): brown, (2, 2): FG_GREEN} self._check_antialiasing( (1.5, 2), (2, 2), expected, check_points, set_endpoints=False ) expected = {(1, 2): brown, (2, 2): FG_GREEN, (3, 2): brown} self._check_antialiasing( (1.5, 2), (2.5, 2), expected, check_points, set_endpoints=False ) expected = {(2, 2): brown, (1, 2): FG_GREEN} self._check_antialiasing( (1, 2), (1.5, 2), expected, check_points, set_endpoints=False ) expected = {(1, 2): brown, (2, 2): greenish} self._check_antialiasing( (1.5, 2), (1.75, 2), expected, check_points, set_endpoints=False ) # b) blend y-coordinate expected = {(x, y): brown for x in range(2, 5) for y in (1, 2)} self._check_antialiasing( (2, 1.5), (4, 1.5), expected, check_points, set_endpoints=False ) # 2. vertical lines # a) blend endpoints expected = {(2, 1): brown, (2, 2): FG_GREEN, (2, 3): brown} self._check_antialiasing( (2, 1.5), (2, 2.5), expected, check_points, set_endpoints=False ) expected = {(2, 1): brown, (2, 2): greenish} self._check_antialiasing( (2, 1.5), (2, 1.75), expected, check_points, set_endpoints=False ) # b) blend x-coordinate expected = {(x, y): brown for x in (1, 2) for y in range(2, 5)} self._check_antialiasing( (1.5, 2), (1.5, 4), expected, check_points, set_endpoints=False ) # 3. diagonal lines # a) blend endpoints expected = {(1, 1): brown, (2, 2): FG_GREEN, (3, 3): brown} self._check_antialiasing( (1.5, 1.5), (2.5, 2.5), expected, check_points, set_endpoints=False ) expected = {(3, 1): brown, (2, 2): FG_GREEN, (1, 3): brown} self._check_antialiasing( (2.5, 1.5), (1.5, 2.5), expected, check_points, set_endpoints=False ) # b) blend sidewards expected = {(2, 1): brown, (2, 2): brown, (3, 2): brown, (3, 3): brown} self._check_antialiasing( (2, 1.5), (3, 2.5), expected, check_points, set_endpoints=False ) expected = { (2, 1): greenish, (2, 2): reddish, (3, 2): greenish, (3, 3): reddish, (4, 3): greenish, (4, 4): reddish, } self._check_antialiasing( (2, 1.25), (4, 3.25), expected, check_points, set_endpoints=False ) def test_anti_aliasing_at_and_outside_the_border(self): """Ensures antialiasing works correct at a surface's borders.""" self.surface = pygame.Surface((10, 10)) draw.rect(self.surface, BG_RED, (0, 0, 10, 10), 0) check_points = [(i, j) for i in range(10) for j in range(10)] reddish = (191, 63, 0) brown = (127, 127, 0) greenish = (63, 191, 0) from_point, to_point = (3, 3), (7, 4) should = { (4, 3): greenish, (5, 3): brown, (6, 3): reddish, (4, 4): reddish, (5, 4): brown, (6, 4): greenish, } for dx, dy in ( (-4, 0), (4, 0), # moved to left and right borders (0, -5), (0, -4), (0, -3), # upper border (0, 5), (0, 6), (0, 7), # lower border (-4, -4), (-4, -3), (-3, -4), ): # upper left corner first = from_point[0] + dx, from_point[1] + dy second = to_point[0] + dx, to_point[1] + dy expected = {(x + dx, y + dy): color for (x, y), color in should.items()} self._check_antialiasing(first, second, expected, check_points) ### AALines Testing ########################################################### class AALinesMixin(BaseLineMixin): """Mixin test for drawing aalines. This class contains all the general aalines drawing tests. """ def test_aalines__args(self): """Ensures draw aalines accepts the correct args.""" bounds_rect = self.draw_aalines( pygame.Surface((3, 3)), (0, 10, 0, 50), False, ((0, 0), (1, 1)), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__args_without_blend(self): """Ensures draw aalines accepts the args without a blend.""" bounds_rect = self.draw_aalines( pygame.Surface((2, 2)), (0, 0, 0, 50), False, ((0, 0), (1, 1)) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__blend_warning(self): """From pygame 2, blend=False should raise DeprecationWarning.""" with warnings.catch_warnings(record=True) as w: # Cause all warnings to always be triggered. warnings.simplefilter("always") # Trigger DeprecationWarning. self.draw_aalines( pygame.Surface((2, 2)), (0, 0, 0, 50), False, ((0, 0), (1, 1)), False ) # Check if there is only one warning and is a DeprecationWarning. self.assertEqual(len(w), 1) self.assertTrue(issubclass(w[-1].category, DeprecationWarning)) def test_aalines__kwargs(self): """Ensures draw aalines accepts the correct kwargs.""" surface = pygame.Surface((4, 4)) color = pygame.Color("yellow") points = ((0, 0), (1, 1), (2, 2)) kwargs_list = [ {"surface": surface, "color": color, "closed": False, "points": points}, ] for kwargs in kwargs_list: bounds_rect = self.draw_aalines(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__kwargs_order_independent(self): """Ensures draw aalines's kwargs are not order dependent.""" bounds_rect = self.draw_aalines( closed=1, points=((0, 0), (1, 1), (2, 2)), color=(10, 20, 30), surface=pygame.Surface((3, 2)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__args_missing(self): """Ensures draw aalines detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(surface, color, 0) with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_aalines() def test_aalines__kwargs_missing(self): """Ensures draw aalines detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((3, 2)), "color": pygame.Color("red"), "closed": 1, "points": ((2, 2), (1, 1)), } for name in ("points", "closed", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(**invalid_kwargs) def test_aalines__arg_invalid_types(self): """Ensures draw aalines detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") closed = 0 points = ((1, 2), (2, 1)) with self.assertRaises(TypeError): # Invalid blend. bounds_rect = self.draw_aalines(surface, color, closed, points, "1") with self.assertRaises(TypeError): # Invalid points. bounds_rect = self.draw_aalines(surface, color, closed, (1, 2, 3)) with self.assertRaises(TypeError): # Invalid closed. bounds_rect = self.draw_aalines(surface, color, InvalidBool(), points) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_aalines(surface, 2.3, closed, points) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_aalines((1, 2, 3, 4), color, closed, points) def test_aalines__kwarg_invalid_types(self): """Ensures draw aalines detects invalid kwarg types.""" valid_kwargs = { "surface": pygame.Surface((3, 3)), "color": pygame.Color("green"), "closed": False, "points": ((1, 2), (2, 1)), } invalid_kwargs = { "surface": pygame.Surface, "color": 2.3, "closed": InvalidBool(), "points": (0, 0, 0), } for kwarg in ("surface", "color", "closed", "points"): kwargs = dict(valid_kwargs) kwargs[kwarg] = invalid_kwargs[kwarg] with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(**kwargs) def test_aalines__kwarg_invalid_name(self): """Ensures draw aalines detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") closed = 1 points = ((1, 2), (2, 1)) kwargs_list = [ { "surface": surface, "color": color, "closed": closed, "points": points, "invalid": 1, }, { "surface": surface, "color": color, "closed": closed, "points": points, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(**kwargs) def test_aalines__args_and_kwargs(self): """Ensures draw aalines accepts a combination of args/kwargs""" surface = pygame.Surface((3, 2)) color = (255, 255, 0, 0) closed = 0 points = ((1, 2), (2, 1)) kwargs = { "surface": surface, "color": color, "closed": closed, "points": points, } for name in ("surface", "color", "closed", "points"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_aalines(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_aalines(surface, color, **kwargs) elif "closed" == name: bounds_rect = self.draw_aalines(surface, color, closed, **kwargs) elif "points" == name: bounds_rect = self.draw_aalines( surface, color, closed, points, **kwargs ) else: bounds_rect = self.draw_aalines( surface, color, closed, points, **kwargs ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__valid_points_format(self): """Ensures draw aalines accepts different points formats.""" expected_color = (10, 20, 30, 255) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": expected_color, "closed": False, "points": None, } # The point type can be a tuple/list/Vector2. point_types = ( (tuple, tuple, tuple, tuple), # all tuples (list, list, list, list), # all lists (Vector2, Vector2, Vector2, Vector2), # all Vector2s (list, Vector2, tuple, Vector2), ) # mix # The point values can be ints or floats. point_values = ( ((1, 1), (2, 1), (2, 2), (1, 2)), ((1, 1), (2.2, 1), (2.1, 2.2), (1, 2.1)), ) # Each sequence of points can be a tuple or a list. seq_types = (tuple, list) for point_type in point_types: for values in point_values: check_pos = values[0] points = [point_type[i](pt) for i, pt in enumerate(values)] for seq_type in seq_types: surface.fill(surface_color) # Clear for each test. kwargs["points"] = seq_type(points) bounds_rect = self.draw_aalines(**kwargs) self.assertEqual(surface.get_at(check_pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__invalid_points_formats(self): """Ensures draw aalines handles invalid points formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "closed": False, "points": None, } points_fmts = ( ((1, 1), (2,)), # Too few coords. ((1, 1), (2, 2, 2)), # Too many coords. ((1, 1), (2, "2")), # Wrong type. ((1, 1), {2, 3}), # Wrong type. ((1, 1), {2: 2, 3: 3}), # Wrong type. {(1, 1), (1, 2)}, # Wrong type. {1: 1, 4: 4}, ) # Wrong type. for points in points_fmts: kwargs["points"] = points with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(**kwargs) def test_aalines__invalid_points_values(self): """Ensures draw aalines handles invalid points values correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "closed": False, "points": None, } for points in ([], ((1, 1),)): # Too few points. for seq_type in (tuple, list): # Test as tuples and lists. kwargs["points"] = seq_type(points) with self.assertRaises(ValueError): bounds_rect = self.draw_aalines(**kwargs) def test_aalines__valid_closed_values(self): """Ensures draw aalines accepts different closed values.""" line_color = pygame.Color("blue") surface_color = pygame.Color("white") surface = pygame.Surface((5, 5)) pos = (1, 3) kwargs = { "surface": surface, "color": line_color, "closed": None, "points": ((1, 1), (4, 1), (4, 4), (1, 4)), } true_values = (-7, 1, 10, "2", 3.1, (4,), [5], True) false_values = (None, "", 0, (), [], False) for closed in true_values + false_values: surface.fill(surface_color) # Clear for each test. kwargs["closed"] = closed expected_color = line_color if closed else surface_color bounds_rect = self.draw_aalines(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__valid_color_formats(self): """Ensures draw aalines accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) pos = (1, 1) kwargs = { "surface": surface, "color": None, "closed": False, "points": (pos, (2, 1)), } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_aalines(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_aalines__invalid_color_formats(self): """Ensures draw aalines handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "closed": False, "points": ((1, 1), (1, 2)), } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_aalines(**kwargs) def test_aalines__color(self): """Tests if the aalines drawn are the correct color. Draws aalines around the border of the given surface and checks if all borders of the surface only contain the given color. """ for surface in self._create_surfaces(): for expected_color in self.COLORS: self.draw_aalines(surface, expected_color, True, corners(surface)) for pos, color in border_pos_and_color(surface): self.assertEqual(color, expected_color, f"pos={pos}") def test_aalines__gaps(self): """Tests if the aalines drawn contain any gaps. Draws aalines around the border of the given surface and checks if all borders of the surface contain any gaps. See: #512 """ expected_color = (255, 255, 255) for surface in self._create_surfaces(): self.draw_aalines(surface, expected_color, True, corners(surface)) for pos, color in border_pos_and_color(surface): self.assertEqual(color, expected_color, f"pos={pos}") def test_aalines__bounding_rect(self): """Ensures draw aalines returns the correct bounding rect. Tests lines with endpoints on and off the surface and blending enabled and disabled. """ line_color = pygame.Color("red") surf_color = pygame.Color("blue") width = height = 30 # Using a rect to help manage where the lines are drawn. pos_rect = pygame.Rect((0, 0), (width, height)) # Testing surfaces of different sizes. One larger than the pos_rect # and one smaller (to test lines that span the surface). for size in ((width + 5, height + 5), (width - 5, height - 5)): surface = pygame.Surface(size, 0, 32) surf_rect = surface.get_rect() # Move pos_rect to different positions to test line endpoints on # and off the surface. for pos in rect_corners_mids_and_center(surf_rect): pos_rect.center = pos # Shape: Triangle (if closed), ^ caret (if not closed). pts = (pos_rect.midleft, pos_rect.midtop, pos_rect.midright) pos = pts[0] # Rect position if nothing drawn. for closed in (True, False): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_aalines(surface, line_color, closed, pts) # Calculating the expected_rect after the lines are # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect(surface, surf_color, pos) self.assertEqual(bounding_rect, expected_rect) def test_aalines__surface_clip(self): """Ensures draw aalines respects a surface's clip area.""" surfw = surfh = 30 aaline_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the aalines's pos. # Test centering the pos_rect along the clip rect's edge to allow for # drawing the aalines over the clip_rect's bounds. for center in rect_corners_mids_and_center(clip_rect): pos_rect.center = center pts = (pos_rect.midtop, pos_rect.center, pos_rect.midbottom) for closed in (True, False): # Test closed and not closed. # Get the expected points by drawing the aalines without # the clip area set. surface.set_clip(None) surface.fill(surface_color) self.draw_aalines(surface, aaline_color, closed, pts) expected_pts = get_color_points( surface, surface_color, clip_rect, False ) # Clear the surface and set the clip area. Redraw the # aalines and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_aalines(surface, aaline_color, closed, pts) surface.lock() # For possible speed up. # Check all the surface points to ensure the expected_pts # are not surface_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: self.assertNotEqual(surface.get_at(pt), surface_color, pt) else: self.assertEqual(surface.get_at(pt), surface_color, pt) surface.unlock() # Commented out to avoid cluttering the test output. Add back in if draw_py # ever fully supports drawing aalines. # class PythonDrawAALinesTest(AALinesMixin, PythonDrawTestCase): # """Test draw_py module function aalines. # # This class inherits the general tests from AALinesMixin. It is also the # class to add any draw_py.draw_aalines specific tests to. # """ class DrawAALinesTest(AALinesMixin, DrawTestCase): """Test draw module function aalines. This class inherits the general tests from AALinesMixin. It is also the class to add any draw.aalines specific tests to. """ ### Polygon Testing ########################################################### SQUARE = ([0, 0], [3, 0], [3, 3], [0, 3]) DIAMOND = [(1, 3), (3, 5), (5, 3), (3, 1)] CROSS = ( [2, 0], [4, 0], [4, 2], [6, 2], [6, 4], [4, 4], [4, 6], [2, 6], [2, 4], [0, 4], [0, 2], [2, 2], ) class DrawPolygonMixin: """Mixin tests for drawing polygons. This class contains all the general polygon drawing tests. """ def setUp(self): self.surface = pygame.Surface((20, 20)) def test_polygon__args(self): """Ensures draw polygon accepts the correct args.""" bounds_rect = self.draw_polygon( pygame.Surface((3, 3)), (0, 10, 0, 50), ((0, 0), (1, 1), (2, 2)), 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__args_without_width(self): """Ensures draw polygon accepts the args without a width.""" bounds_rect = self.draw_polygon( pygame.Surface((2, 2)), (0, 0, 0, 50), ((0, 0), (1, 1), (2, 2)) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__kwargs(self): """Ensures draw polygon accepts the correct kwargs with and without a width arg. """ surface = pygame.Surface((4, 4)) color = pygame.Color("yellow") points = ((0, 0), (1, 1), (2, 2)) kwargs_list = [ {"surface": surface, "color": color, "points": points, "width": 1}, {"surface": surface, "color": color, "points": points}, ] for kwargs in kwargs_list: bounds_rect = self.draw_polygon(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__kwargs_order_independent(self): """Ensures draw polygon's kwargs are not order dependent.""" bounds_rect = self.draw_polygon( color=(10, 20, 30), surface=pygame.Surface((3, 2)), width=0, points=((0, 1), (1, 2), (2, 3)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__args_missing(self): """Ensures draw polygon detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_polygon() def test_polygon__kwargs_missing(self): """Ensures draw polygon detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((1, 2)), "color": pygame.Color("red"), "points": ((2, 1), (2, 2), (2, 3)), "width": 1, } for name in ("points", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(**invalid_kwargs) def test_polygon__arg_invalid_types(self): """Ensures draw polygon detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") points = ((0, 1), (1, 2), (1, 3)) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_polygon(surface, color, points, "1") with self.assertRaises(TypeError): # Invalid points. bounds_rect = self.draw_polygon(surface, color, (1, 2, 3)) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_polygon(surface, 2.3, points) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_polygon((1, 2, 3, 4), color, points) def test_polygon__kwarg_invalid_types(self): """Ensures draw polygon detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") points = ((0, 0), (1, 0), (2, 0)) width = 1 kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "points": points, "width": width, }, { "surface": surface, "color": 2.3, # Invalid color. "points": points, "width": width, }, { "surface": surface, "color": color, "points": ((1,), (1,), (1,)), # Invalid points. "width": width, }, {"surface": surface, "color": color, "points": points, "width": 1.2}, ] # Invalid width. for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(**kwargs) def test_polygon__kwarg_invalid_name(self): """Ensures draw polygon detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") points = ((1, 1), (1, 2), (1, 3)) kwargs_list = [ { "surface": surface, "color": color, "points": points, "width": 1, "invalid": 1, }, {"surface": surface, "color": color, "points": points, "invalid": 1}, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(**kwargs) def test_polygon__args_and_kwargs(self): """Ensures draw polygon accepts a combination of args/kwargs""" surface = pygame.Surface((3, 1)) color = (255, 255, 0, 0) points = ((0, 1), (1, 2), (2, 3)) width = 0 kwargs = {"surface": surface, "color": color, "points": points, "width": width} for name in ("surface", "color", "points", "width"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_polygon(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_polygon(surface, color, **kwargs) elif "points" == name: bounds_rect = self.draw_polygon(surface, color, points, **kwargs) else: bounds_rect = self.draw_polygon(surface, color, points, width, **kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__valid_width_values(self): """Ensures draw polygon accepts different width values.""" surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) color = (10, 20, 30, 255) kwargs = { "surface": surface, "color": color, "points": ((1, 1), (2, 1), (2, 2), (1, 2)), "width": None, } pos = kwargs["points"][0] for width in (-100, -10, -1, 0, 1, 10, 100): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = color if width >= 0 else surface_color bounds_rect = self.draw_polygon(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__valid_points_format(self): """Ensures draw polygon accepts different points formats.""" expected_color = (10, 20, 30, 255) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": expected_color, "points": None, "width": 0, } # The point type can be a tuple/list/Vector2. point_types = ( (tuple, tuple, tuple, tuple), # all tuples (list, list, list, list), # all lists (Vector2, Vector2, Vector2, Vector2), # all Vector2s (list, Vector2, tuple, Vector2), ) # mix # The point values can be ints or floats. point_values = ( ((1, 1), (2, 1), (2, 2), (1, 2)), ((1, 1), (2.2, 1), (2.1, 2.2), (1, 2.1)), ) # Each sequence of points can be a tuple or a list. seq_types = (tuple, list) for point_type in point_types: for values in point_values: check_pos = values[0] points = [point_type[i](pt) for i, pt in enumerate(values)] for seq_type in seq_types: surface.fill(surface_color) # Clear for each test. kwargs["points"] = seq_type(points) bounds_rect = self.draw_polygon(**kwargs) self.assertEqual(surface.get_at(check_pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__invalid_points_formats(self): """Ensures draw polygon handles invalid points formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "points": None, "width": 0, } points_fmts = ( ((1, 1), (2, 1), (2,)), # Too few coords. ((1, 1), (2, 1), (2, 2, 2)), # Too many coords. ((1, 1), (2, 1), (2, "2")), # Wrong type. ((1, 1), (2, 1), {2, 3}), # Wrong type. ((1, 1), (2, 1), {2: 2, 3: 3}), # Wrong type. {(1, 1), (2, 1), (2, 2), (1, 2)}, # Wrong type. {1: 1, 2: 2, 3: 3, 4: 4}, ) # Wrong type. for points in points_fmts: kwargs["points"] = points with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(**kwargs) def test_polygon__invalid_points_values(self): """Ensures draw polygon handles invalid points values correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "points": None, "width": 0, } points_fmts = ( (), # Too few points. ((1, 1),), # Too few points. ((1, 1), (2, 1)), ) # Too few points. for points in points_fmts: for seq_type in (tuple, list): # Test as tuples and lists. kwargs["points"] = seq_type(points) with self.assertRaises(ValueError): bounds_rect = self.draw_polygon(**kwargs) def test_polygon__valid_color_formats(self): """Ensures draw polygon accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": None, "points": ((1, 1), (2, 1), (2, 2), (1, 2)), "width": 0, } pos = kwargs["points"][0] greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_polygon(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_polygon__invalid_color_formats(self): """Ensures draw polygon handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "points": ((1, 1), (2, 1), (2, 2), (1, 2)), "width": 0, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_polygon(**kwargs) def test_draw_square(self): self.draw_polygon(self.surface, RED, SQUARE, 0) # note : there is a discussion (#234) if draw.polygon should include or # not the right or lower border; here we stick with current behavior, # eg include those borders ... for x in range(4): for y in range(4): self.assertEqual(self.surface.get_at((x, y)), RED) def test_draw_diamond(self): pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) self.draw_polygon(self.surface, GREEN, DIAMOND, 0) # this diamond shape is equivalent to its four corners, plus inner square for x, y in DIAMOND: self.assertEqual(self.surface.get_at((x, y)), GREEN, msg=str((x, y))) for x in range(2, 5): for y in range(2, 5): self.assertEqual(self.surface.get_at((x, y)), GREEN) def test_1_pixel_high_or_wide_shapes(self): # 1. one-pixel-high, filled pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) self.draw_polygon(self.surface, GREEN, [(x, 2) for x, _y in CROSS], 0) cross_size = 6 # the maximum x or y coordinate of the cross for x in range(cross_size + 1): self.assertEqual(self.surface.get_at((x, 1)), RED) self.assertEqual(self.surface.get_at((x, 2)), GREEN) self.assertEqual(self.surface.get_at((x, 3)), RED) pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) # 2. one-pixel-high, not filled self.draw_polygon(self.surface, GREEN, [(x, 5) for x, _y in CROSS], 1) for x in range(cross_size + 1): self.assertEqual(self.surface.get_at((x, 4)), RED) self.assertEqual(self.surface.get_at((x, 5)), GREEN) self.assertEqual(self.surface.get_at((x, 6)), RED) pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) # 3. one-pixel-wide, filled self.draw_polygon(self.surface, GREEN, [(3, y) for _x, y in CROSS], 0) for y in range(cross_size + 1): self.assertEqual(self.surface.get_at((2, y)), RED) self.assertEqual(self.surface.get_at((3, y)), GREEN) self.assertEqual(self.surface.get_at((4, y)), RED) pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) # 4. one-pixel-wide, not filled self.draw_polygon(self.surface, GREEN, [(4, y) for _x, y in CROSS], 1) for y in range(cross_size + 1): self.assertEqual(self.surface.get_at((3, y)), RED) self.assertEqual(self.surface.get_at((4, y)), GREEN) self.assertEqual(self.surface.get_at((5, y)), RED) def test_draw_symetric_cross(self): """non-regression on issue #234 : x and y where handled inconsistently. Also, the result is/was different whether we fill or not the polygon. """ # 1. case width = 1 (not filled: `polygon` calls internally the `lines` function) pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) self.draw_polygon(self.surface, GREEN, CROSS, 1) inside = [(x, 3) for x in range(1, 6)] + [(3, y) for y in range(1, 6)] for x in range(10): for y in range(10): if (x, y) in inside: self.assertEqual(self.surface.get_at((x, y)), RED) elif (x in range(2, 5) and y < 7) or (y in range(2, 5) and x < 7): # we are on the border of the cross: self.assertEqual(self.surface.get_at((x, y)), GREEN) else: # we are outside self.assertEqual(self.surface.get_at((x, y)), RED) # 2. case width = 0 (filled; this is the example from #234) pygame.draw.rect(self.surface, RED, (0, 0, 10, 10), 0) self.draw_polygon(self.surface, GREEN, CROSS, 0) inside = [(x, 3) for x in range(1, 6)] + [(3, y) for y in range(1, 6)] for x in range(10): for y in range(10): if (x in range(2, 5) and y < 7) or (y in range(2, 5) and x < 7): # we are on the border of the cross: self.assertEqual( self.surface.get_at((x, y)), GREEN, msg=str((x, y)) ) else: # we are outside self.assertEqual(self.surface.get_at((x, y)), RED) def test_illumine_shape(self): """non-regression on issue #313""" rect = pygame.Rect((0, 0, 20, 20)) path_data = [ (0, 0), (rect.width - 1, 0), # upper border (rect.width - 5, 5 - 1), (5 - 1, 5 - 1), # upper inner (5 - 1, rect.height - 5), (0, rect.height - 1), ] # lower diagonal # The shape looks like this (the numbers are the indices of path_data) # 0**********************1 <-- upper border # *********************** # ********************** # ********************* # ****3**************2 <-- upper inner border # ***** # ***** (more lines here) # ***** # ****4 # **** # *** # ** # 5 # # the current bug is that the "upper inner" line is not drawn, but only # if 4 or some lower corner exists pygame.draw.rect(self.surface, RED, (0, 0, 20, 20), 0) # 1. First without the corners 4 & 5 self.draw_polygon(self.surface, GREEN, path_data[:4], 0) for x in range(20): self.assertEqual(self.surface.get_at((x, 0)), GREEN) # upper border for x in range(4, rect.width - 5 + 1): self.assertEqual(self.surface.get_at((x, 4)), GREEN) # upper inner # 2. with the corners 4 & 5 pygame.draw.rect(self.surface, RED, (0, 0, 20, 20), 0) self.draw_polygon(self.surface, GREEN, path_data, 0) for x in range(4, rect.width - 5 + 1): self.assertEqual(self.surface.get_at((x, 4)), GREEN) # upper inner def test_invalid_points(self): self.assertRaises( TypeError, lambda: self.draw_polygon( self.surface, RED, ((0, 0), (0, 20), (20, 20), 20), 0 ), ) def test_polygon__bounding_rect(self): """Ensures draw polygon returns the correct bounding rect. Tests polygons on and off the surface and a range of width/thickness values. """ polygon_color = pygame.Color("red") surf_color = pygame.Color("black") min_width = min_height = 5 max_width = max_height = 7 sizes = ((min_width, min_height), (max_width, max_height)) surface = pygame.Surface((20, 20), 0, 32) surf_rect = surface.get_rect() # Make a rect that is bigger than the surface to help test drawing # polygons off and partially off the surface. big_rect = surf_rect.inflate(min_width * 2 + 1, min_height * 2 + 1) for pos in rect_corners_mids_and_center( surf_rect ) + rect_corners_mids_and_center(big_rect): # A rect (pos_rect) is used to help create and position the # polygon. Each of this rect's position attributes will be set to # the pos value. for attr in RECT_POSITION_ATTRIBUTES: # Test using different rect sizes and thickness values. for width, height in sizes: pos_rect = pygame.Rect((0, 0), (width, height)) setattr(pos_rect, attr, pos) # Points form a triangle with no fully # horizontal/vertical lines. vertices = ( pos_rect.midleft, pos_rect.midtop, pos_rect.bottomright, ) for thickness in range(4): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_polygon( surface, polygon_color, vertices, thickness ) # Calculating the expected_rect after the polygon # is drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, vertices[0] ) self.assertEqual( bounding_rect, expected_rect, f"thickness={thickness}", ) def test_polygon__surface_clip(self): """Ensures draw polygon respects a surface's clip area. Tests drawing the polygon filled and unfilled. """ surfw = surfh = 30 polygon_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (8, 10)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the polygon's pos. for width in (0, 1): # Filled and unfilled. # Test centering the polygon along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the polygon without the # clip area set. pos_rect.center = center vertices = ( pos_rect.topleft, pos_rect.topright, pos_rect.bottomright, pos_rect.bottomleft, ) surface.set_clip(None) surface.fill(surface_color) self.draw_polygon(surface, polygon_color, vertices, width) expected_pts = get_color_points(surface, polygon_color, clip_rect) # Clear the surface and set the clip area. Redraw the polygon # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_polygon(surface, polygon_color, vertices, width) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the polygon_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = polygon_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() # Test cases for Issue #3989 (fixed on #4191) # This tests the fill polygon bug to avoid def test_polygon_large_coords_3989(self): """ Ensures draw polygon works correctly with large points. Testing the drawings of filled polygons """ point_a = (600, 50) point_b = (50, 600) extreme_points_coords = (58000, 100000) extreme_negative_coords = (-58000, -100000) extreme_negative_x = (-58000, 100000) extreme_negative_y = (58000, -100000) surf_w = surf_h = 650 surface = pygame.Surface((surf_w, surf_h)) green = (0, 255, 0) white = (0, 0, 0, 255) # Draw white background pygame.draw.rect(surface, white, (0, 0, surf_w, surf_h), 0) # Extreme points case def extreme_points(self): self.assertEqual(surface.get_at((640, 50)), white) self.assertEqual(surface.get_at((50, 640)), white) # Extreme negative points case def extreme_negative_pass(self): self.assertEqual(surface.get_at((600, 25)), white) def extreme_negative_fail(self): self.assertNotEqual(surface.get_at((5, 5)), white) # Extreme negative x case def extreme_x_pass(self): self.assertEqual(surface.get_at((600, 600)), white) def extreme_x_fail(self): self.assertNotEqual(surface.get_at((100, 640)), white) # Extreme negative y case def extreme_y_pass(self): self.assertEqual(surface.get_at((600, 600)), white) def extreme_y_fail(self): self.assertNotEqual(surface.get_at((300, 300)), white) # Checks the surface point to ensure the polygon has been drawn correctly. # Uses multiple passing and failing test cases depending on the polygon self.draw_polygon(surface, green, (point_a, point_b, extreme_points_coords)) extreme_points(self) pygame.draw.rect(surface, white, (0, 0, surf_w, surf_h), 0) self.draw_polygon(surface, green, (point_a, point_b, extreme_negative_coords)) extreme_negative_pass(self) extreme_negative_fail(self) pygame.draw.rect(surface, white, (0, 0, surf_w, surf_h), 0) self.draw_polygon(surface, green, (point_a, point_b, extreme_negative_x)) extreme_x_pass(self) extreme_x_fail(self) pygame.draw.rect(surface, white, (0, 0, surf_w, surf_h), 0) self.draw_polygon(surface, green, (point_a, point_b, extreme_negative_y)) extreme_y_pass(self) extreme_y_fail(self) class DrawPolygonTest(DrawPolygonMixin, DrawTestCase): """Test draw module function polygon. This class inherits the general tests from DrawPolygonMixin. It is also the class to add any draw.polygon specific tests to. """ # Commented out to avoid cluttering the test output. Add back in if draw_py # ever fully supports drawing polygons. # @unittest.skip('draw_py.draw_polygon not fully supported yet') # class PythonDrawPolygonTest(DrawPolygonMixin, PythonDrawTestCase): # """Test draw_py module function draw_polygon. # # This class inherits the general tests from DrawPolygonMixin. It is also # the class to add any draw_py.draw_polygon specific tests to. # """ ### Rect Testing ############################################################## class DrawRectMixin: """Mixin tests for drawing rects. This class contains all the general rect drawing tests. """ def test_rect__args(self): """Ensures draw rect accepts the correct args.""" bounds_rect = self.draw_rect( pygame.Surface((2, 2)), (20, 10, 20, 150), pygame.Rect((0, 0), (1, 1)), 2, 1, 2, 3, 4, 5, ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__args_without_width(self): """Ensures draw rect accepts the args without a width and borders.""" bounds_rect = self.draw_rect( pygame.Surface((3, 5)), (0, 0, 0, 255), pygame.Rect((0, 0), (1, 1)) ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__kwargs(self): """Ensures draw rect accepts the correct kwargs with and without a width and border_radius arg. """ kwargs_list = [ { "surface": pygame.Surface((5, 5)), "color": pygame.Color("red"), "rect": pygame.Rect((0, 0), (1, 2)), "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": pygame.Surface((1, 2)), "color": (0, 100, 200), "rect": (0, 0, 1, 1), }, ] for kwargs in kwargs_list: bounds_rect = self.draw_rect(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__kwargs_order_independent(self): """Ensures draw rect's kwargs are not order dependent.""" bounds_rect = self.draw_rect( color=(0, 1, 2), border_radius=10, surface=pygame.Surface((2, 3)), border_top_left_radius=5, width=-2, border_top_right_radius=20, border_bottom_right_radius=0, rect=pygame.Rect((0, 0), (0, 0)), border_bottom_left_radius=15, ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__args_missing(self): """Ensures draw rect detects any missing required args.""" surface = pygame.Surface((1, 1)) with self.assertRaises(TypeError): bounds_rect = self.draw_rect(surface, pygame.Color("white")) with self.assertRaises(TypeError): bounds_rect = self.draw_rect(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_rect() def test_rect__kwargs_missing(self): """Ensures draw rect detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((1, 3)), "color": pygame.Color("red"), "rect": pygame.Rect((0, 0), (2, 2)), "width": 5, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, } for name in ("rect", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_rect(**invalid_kwargs) def test_rect__arg_invalid_types(self): """Ensures draw rect detects invalid arg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("white") rect = pygame.Rect((1, 1), (1, 1)) with self.assertRaises(TypeError): # Invalid border_bottom_right_radius. bounds_rect = self.draw_rect( surface, color, rect, 2, border_bottom_right_radius="rad" ) with self.assertRaises(TypeError): # Invalid border_bottom_left_radius. bounds_rect = self.draw_rect( surface, color, rect, 2, border_bottom_left_radius="rad" ) with self.assertRaises(TypeError): # Invalid border_top_right_radius. bounds_rect = self.draw_rect( surface, color, rect, 2, border_top_right_radius="rad" ) with self.assertRaises(TypeError): # Invalid border_top_left_radius. bounds_rect = self.draw_rect( surface, color, rect, 2, border_top_left_radius="draw" ) with self.assertRaises(TypeError): # Invalid border_radius. bounds_rect = self.draw_rect(surface, color, rect, 2, "rad") with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_rect(surface, color, rect, "2", 4) with self.assertRaises(TypeError): # Invalid rect. bounds_rect = self.draw_rect(surface, color, (1, 2, 3), 2, 6) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_rect(surface, 2.3, rect, 3, 8) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_rect(rect, color, rect, 4, 10) def test_rect__kwarg_invalid_types(self): """Ensures draw rect detects invalid kwarg types.""" surface = pygame.Surface((2, 3)) color = pygame.Color("red") rect = pygame.Rect((0, 0), (1, 1)) kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": 2.3, # Invalid color. "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": (1, 1, 2), # Invalid rect. "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1.1, # Invalid width. "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10.5, # Invalid border_radius. "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5.5, # Invalid top_left_radius. "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": "a", # Invalid top_right_radius. "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": "c", # Invalid bottom_left_radius "border_bottom_right_radius": 0, }, { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": "d", # Invalid bottom_right. }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_rect(**kwargs) def test_rect__kwarg_invalid_name(self): """Ensures draw rect detects invalid kwarg names.""" surface = pygame.Surface((2, 1)) color = pygame.Color("green") rect = pygame.Rect((0, 0), (3, 3)) kwargs_list = [ { "surface": surface, "color": color, "rect": rect, "width": 1, "border_radius": 10, "border_top_left_radius": 5, "border_top_right_radius": 20, "border_bottom_left_radius": 15, "border_bottom_right_radius": 0, "invalid": 1, }, {"surface": surface, "color": color, "rect": rect, "invalid": 1}, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_rect(**kwargs) def test_rect__args_and_kwargs(self): """Ensures draw rect accepts a combination of args/kwargs""" surface = pygame.Surface((3, 1)) color = (255, 255, 255, 0) rect = pygame.Rect((1, 0), (2, 5)) width = 0 kwargs = {"surface": surface, "color": color, "rect": rect, "width": width} for name in ("surface", "color", "rect", "width"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_rect(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_rect(surface, color, **kwargs) elif "rect" == name: bounds_rect = self.draw_rect(surface, color, rect, **kwargs) else: bounds_rect = self.draw_rect(surface, color, rect, width, **kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__valid_width_values(self): """Ensures draw rect accepts different width values.""" pos = (1, 1) surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) color = (1, 2, 3, 255) kwargs = { "surface": surface, "color": color, "rect": pygame.Rect(pos, (2, 2)), "width": None, } for width in (-1000, -10, -1, 0, 1, 10, 1000): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = color if width >= 0 else surface_color bounds_rect = self.draw_rect(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__valid_rect_formats(self): """Ensures draw rect accepts different rect formats.""" pos = (1, 1) expected_color = pygame.Color("yellow") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) kwargs = {"surface": surface, "color": expected_color, "rect": None, "width": 0} rects = ( pygame.Rect(pos, (1, 1)), (pos, (2, 2)), (pos[0], pos[1], 3, 3), [pos, (2.1, 2.2)], ) for rect in rects: surface.fill(surface_color) # Clear for each test. kwargs["rect"] = rect bounds_rect = self.draw_rect(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__invalid_rect_formats(self): """Ensures draw rect handles invalid rect formats correctly.""" kwargs = { "surface": pygame.Surface((4, 4)), "color": pygame.Color("red"), "rect": None, "width": 0, } invalid_fmts = ( [], [1], [1, 2], [1, 2, 3], [1, 2, 3, 4, 5], {1, 2, 3, 4}, [1, 2, 3, "4"], ) for rect in invalid_fmts: kwargs["rect"] = rect with self.assertRaises(TypeError): bounds_rect = self.draw_rect(**kwargs) def test_rect__valid_color_formats(self): """Ensures draw rect accepts different color formats.""" pos = (1, 1) red_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": None, "rect": pygame.Rect(pos, (1, 1)), "width": 3, } reds = ((255, 0, 0), (255, 0, 0, 255), surface.map_rgb(red_color), red_color) for color in reds: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = red_color bounds_rect = self.draw_rect(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_rect__invalid_color_formats(self): """Ensures draw rect handles invalid color formats correctly.""" pos = (1, 1) surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": None, "rect": pygame.Rect(pos, (1, 1)), "width": 1, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_rect(**kwargs) def test_rect__fill(self): self.surf_w, self.surf_h = self.surf_size = (320, 200) self.surf = pygame.Surface(self.surf_size, pygame.SRCALPHA) self.color = (1, 13, 24, 205) rect = pygame.Rect(10, 10, 25, 20) drawn = self.draw_rect(self.surf, self.color, rect, 0) self.assertEqual(drawn, rect) # Should be colored where it's supposed to be for pt in test_utils.rect_area_pts(rect): color_at_pt = self.surf.get_at(pt) self.assertEqual(color_at_pt, self.color) # And not where it shouldn't for pt in test_utils.rect_outer_bounds(rect): color_at_pt = self.surf.get_at(pt) self.assertNotEqual(color_at_pt, self.color) # Issue #310: Cannot draw rectangles that are 1 pixel high bgcolor = pygame.Color("black") self.surf.fill(bgcolor) hrect = pygame.Rect(1, 1, self.surf_w - 2, 1) vrect = pygame.Rect(1, 3, 1, self.surf_h - 4) drawn = self.draw_rect(self.surf, self.color, hrect, 0) self.assertEqual(drawn, hrect) x, y = hrect.topleft w, h = hrect.size self.assertEqual(self.surf.get_at((x - 1, y)), bgcolor) self.assertEqual(self.surf.get_at((x + w, y)), bgcolor) for i in range(x, x + w): self.assertEqual(self.surf.get_at((i, y)), self.color) drawn = self.draw_rect(self.surf, self.color, vrect, 0) self.assertEqual(drawn, vrect) x, y = vrect.topleft w, h = vrect.size self.assertEqual(self.surf.get_at((x, y - 1)), bgcolor) self.assertEqual(self.surf.get_at((x, y + h)), bgcolor) for i in range(y, y + h): self.assertEqual(self.surf.get_at((x, i)), self.color) def test_rect__one_pixel_lines(self): self.surf = pygame.Surface((320, 200), pygame.SRCALPHA) self.color = (1, 13, 24, 205) rect = pygame.Rect(10, 10, 56, 20) drawn = self.draw_rect(self.surf, self.color, rect, 1) self.assertEqual(drawn, rect) # Should be colored where it's supposed to be for pt in test_utils.rect_perimeter_pts(drawn): color_at_pt = self.surf.get_at(pt) self.assertEqual(color_at_pt, self.color) # And not where it shouldn't for pt in test_utils.rect_outer_bounds(drawn): color_at_pt = self.surf.get_at(pt) self.assertNotEqual(color_at_pt, self.color) def test_rect__draw_line_width(self): surface = pygame.Surface((100, 100)) surface.fill("black") color = pygame.Color(255, 255, 255) rect_width = 80 rect_height = 50 line_width = 10 pygame.draw.rect( surface, color, pygame.Rect(0, 0, rect_width, rect_height), line_width ) for i in range(line_width): self.assertEqual(surface.get_at((i, i)), color) self.assertEqual(surface.get_at((rect_width - i - 1, i)), color) self.assertEqual(surface.get_at((i, rect_height - i - 1)), color) self.assertEqual( surface.get_at((rect_width - i - 1, rect_height - i - 1)), color ) self.assertEqual(surface.get_at((line_width, line_width)), (0, 0, 0)) self.assertEqual( surface.get_at((rect_width - line_width - 1, line_width)), (0, 0, 0) ) self.assertEqual( surface.get_at((line_width, rect_height - line_width - 1)), (0, 0, 0) ) self.assertEqual( surface.get_at((rect_width - line_width - 1, rect_height - line_width - 1)), (0, 0, 0), ) def test_rect__bounding_rect(self): """Ensures draw rect returns the correct bounding rect. Tests rects on and off the surface and a range of width/thickness values. """ rect_color = pygame.Color("red") surf_color = pygame.Color("black") min_width = min_height = 5 max_width = max_height = 7 sizes = ((min_width, min_height), (max_width, max_height)) surface = pygame.Surface((20, 20), 0, 32) surf_rect = surface.get_rect() # Make a rect that is bigger than the surface to help test drawing # rects off and partially off the surface. big_rect = surf_rect.inflate(min_width * 2 + 1, min_height * 2 + 1) for pos in rect_corners_mids_and_center( surf_rect ) + rect_corners_mids_and_center(big_rect): # Each of the rect's position attributes will be set to the pos # value. for attr in RECT_POSITION_ATTRIBUTES: # Test using different rect sizes and thickness values. for width, height in sizes: rect = pygame.Rect((0, 0), (width, height)) setattr(rect, attr, pos) for thickness in range(4): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_rect( surface, rect_color, rect, thickness ) # Calculating the expected_rect after the rect is # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, rect.topleft ) self.assertEqual( bounding_rect, expected_rect, f"thickness={thickness}", ) def test_rect__surface_clip(self): """Ensures draw rect respects a surface's clip area. Tests drawing the rect filled and unfilled. """ surfw = surfh = 30 rect_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (8, 10)) clip_rect.center = surface.get_rect().center test_rect = clip_rect.copy() # Manages the rect's pos. for width in (0, 1): # Filled and unfilled. # Test centering the rect along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the rect without the # clip area set. test_rect.center = center surface.set_clip(None) surface.fill(surface_color) self.draw_rect(surface, rect_color, test_rect, width) expected_pts = get_color_points(surface, rect_color, clip_rect) # Clear the surface and set the clip area. Redraw the rect # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_rect(surface, rect_color, test_rect, width) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the rect_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = rect_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() class DrawRectTest(DrawRectMixin, DrawTestCase): """Test draw module function rect. This class inherits the general tests from DrawRectMixin. It is also the class to add any draw.rect specific tests to. """ # Commented out to avoid cluttering the test output. Add back in if draw_py # ever properly supports drawing rects. # @unittest.skip('draw_py.draw_rect not supported yet') # class PythonDrawRectTest(DrawRectMixin, PythonDrawTestCase): # """Test draw_py module function draw_rect. # # This class inherits the general tests from DrawRectMixin. It is also the # class to add any draw_py.draw_rect specific tests to. # """ ### Circle Testing ############################################################ class DrawCircleMixin: """Mixin tests for drawing circles. This class contains all the general circle drawing tests. """ def test_circle__args(self): """Ensures draw circle accepts the correct args.""" bounds_rect = self.draw_circle( pygame.Surface((3, 3)), (0, 10, 0, 50), (0, 0), 3, 1, 1, 0, 1, 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__args_without_width(self): """Ensures draw circle accepts the args without a width and quadrants.""" bounds_rect = self.draw_circle(pygame.Surface((2, 2)), (0, 0, 0, 50), (1, 1), 1) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__args_with_negative_width(self): """Ensures draw circle accepts the args with negative width.""" bounds_rect = self.draw_circle( pygame.Surface((2, 2)), (0, 0, 0, 50), (1, 1), 1, -1 ) self.assertIsInstance(bounds_rect, pygame.Rect) self.assertEqual(bounds_rect, pygame.Rect(1, 1, 0, 0)) def test_circle__args_with_width_gt_radius(self): """Ensures draw circle accepts the args with width > radius.""" bounds_rect = self.draw_circle( pygame.Surface((2, 2)), (0, 0, 0, 50), (1, 1), 2, 3, 0, 0, 0, 0 ) self.assertIsInstance(bounds_rect, pygame.Rect) self.assertEqual(bounds_rect, pygame.Rect(0, 0, 2, 2)) def test_circle__kwargs(self): """Ensures draw circle accepts the correct kwargs with and without a width and quadrant arguments. """ kwargs_list = [ { "surface": pygame.Surface((4, 4)), "color": pygame.Color("yellow"), "center": (2, 2), "radius": 2, "width": 1, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": False, "draw_bottom_right": True, }, { "surface": pygame.Surface((2, 1)), "color": (0, 10, 20), "center": (1, 1), "radius": 1, }, ] for kwargs in kwargs_list: bounds_rect = self.draw_circle(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__kwargs_order_independent(self): """Ensures draw circle's kwargs are not order dependent.""" bounds_rect = self.draw_circle( draw_top_right=False, color=(10, 20, 30), surface=pygame.Surface((3, 2)), width=0, draw_bottom_left=False, center=(1, 0), draw_bottom_right=False, radius=2, draw_top_left=True, ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__args_missing(self): """Ensures draw circle detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("blue") with self.assertRaises(TypeError): bounds_rect = self.draw_circle(surface, color, (0, 0)) with self.assertRaises(TypeError): bounds_rect = self.draw_circle(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_circle(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_circle() def test_circle__kwargs_missing(self): """Ensures draw circle detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((1, 2)), "color": pygame.Color("red"), "center": (1, 0), "radius": 2, "width": 1, "draw_top_right": False, "draw_top_left": False, "draw_bottom_left": False, "draw_bottom_right": True, } for name in ("radius", "center", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_circle(**invalid_kwargs) def test_circle__arg_invalid_types(self): """Ensures draw circle detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") center = (1, 1) radius = 1 with self.assertRaises(TypeError): # Invalid draw_top_right. bounds_rect = self.draw_circle( surface, color, center, radius, 1, "a", 1, 1, 1 ) with self.assertRaises(TypeError): # Invalid draw_top_left. bounds_rect = self.draw_circle( surface, color, center, radius, 1, 1, "b", 1, 1 ) with self.assertRaises(TypeError): # Invalid draw_bottom_left. bounds_rect = self.draw_circle( surface, color, center, radius, 1, 1, 1, "c", 1 ) with self.assertRaises(TypeError): # Invalid draw_bottom_right. bounds_rect = self.draw_circle( surface, color, center, radius, 1, 1, 1, 1, "d" ) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_circle(surface, color, center, radius, "1") with self.assertRaises(TypeError): # Invalid radius. bounds_rect = self.draw_circle(surface, color, center, "2") with self.assertRaises(TypeError): # Invalid center. bounds_rect = self.draw_circle(surface, color, (1, 2, 3), radius) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_circle(surface, 2.3, center, radius) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_circle((1, 2, 3, 4), color, center, radius) def test_circle__kwarg_invalid_types(self): """Ensures draw circle detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") center = (0, 1) radius = 1 width = 1 quadrant = 1 kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": 2.3, # Invalid color. "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": (1, 1, 1), # Invalid center. "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": "1", # Invalid radius. "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "width": 1.2, # Invalid width. "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": "True", # Invalid draw_top_right "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": "True", # Invalid draw_top_left "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": 3.14, # Invalid draw_bottom_left "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": "quadrant", # Invalid draw_bottom_right }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_circle(**kwargs) def test_circle__kwarg_invalid_name(self): """Ensures draw circle detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") center = (0, 0) radius = 2 kwargs_list = [ { "surface": surface, "color": color, "center": center, "radius": radius, "width": 1, "quadrant": 1, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, }, { "surface": surface, "color": color, "center": center, "radius": radius, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_circle(**kwargs) def test_circle__args_and_kwargs(self): """Ensures draw circle accepts a combination of args/kwargs""" surface = pygame.Surface((3, 1)) color = (255, 255, 0, 0) center = (1, 0) radius = 2 width = 0 draw_top_right = True draw_top_left = False draw_bottom_left = False draw_bottom_right = True kwargs = { "surface": surface, "color": color, "center": center, "radius": radius, "width": width, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } for name in ( "surface", "color", "center", "radius", "width", "draw_top_right", "draw_top_left", "draw_bottom_left", "draw_bottom_right", ): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_circle(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_circle(surface, color, **kwargs) elif "center" == name: bounds_rect = self.draw_circle(surface, color, center, **kwargs) elif "radius" == name: bounds_rect = self.draw_circle(surface, color, center, radius, **kwargs) elif "width" == name: bounds_rect = self.draw_circle( surface, color, center, radius, width, **kwargs ) elif "draw_top_right" == name: bounds_rect = self.draw_circle( surface, color, center, radius, width, draw_top_right, **kwargs ) elif "draw_top_left" == name: bounds_rect = self.draw_circle( surface, color, center, radius, width, draw_top_right, draw_top_left, **kwargs, ) elif "draw_bottom_left" == name: bounds_rect = self.draw_circle( surface, color, center, radius, width, draw_top_right, draw_top_left, draw_bottom_left, **kwargs, ) else: bounds_rect = self.draw_circle( surface, color, center, radius, width, draw_top_right, draw_top_left, draw_bottom_left, draw_bottom_right, **kwargs, ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__valid_width_values(self): """Ensures draw circle accepts different width values.""" center = (2, 2) radius = 1 pos = (center[0] - radius, center[1]) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) color = (10, 20, 30, 255) kwargs = { "surface": surface, "color": color, "center": center, "radius": radius, "width": None, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } for width in (-100, -10, -1, 0, 1, 10, 100): surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = color if width >= 0 else surface_color bounds_rect = self.draw_circle(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__valid_radius_values(self): """Ensures draw circle accepts different radius values.""" pos = center = (2, 2) surface_color = pygame.Color("white") surface = pygame.Surface((3, 4)) color = (10, 20, 30, 255) kwargs = { "surface": surface, "color": color, "center": center, "radius": None, "width": 0, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } for radius in (-10, -1, 0, 1, 10): surface.fill(surface_color) # Clear for each test. kwargs["radius"] = radius expected_color = color if radius > 0 else surface_color bounds_rect = self.draw_circle(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__valid_center_formats(self): """Ensures draw circle accepts different center formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((4, 4)) kwargs = { "surface": surface, "color": expected_color, "center": None, "radius": 1, "width": 0, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } x, y = 2, 2 # center position # The center values can be ints or floats. for center in ((x, y), (x + 0.1, y), (x, y + 0.1), (x + 0.1, y + 0.1)): # The center type can be a tuple/list/Vector2. for seq_type in (tuple, list, Vector2): surface.fill(surface_color) # Clear for each test. kwargs["center"] = seq_type(center) bounds_rect = self.draw_circle(**kwargs) self.assertEqual(surface.get_at((x, y)), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__valid_color_formats(self): """Ensures draw circle accepts different color formats.""" center = (2, 2) radius = 1 pos = (center[0] - radius, center[1]) green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((3, 4)) kwargs = { "surface": surface, "color": None, "center": center, "radius": radius, "width": 0, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_circle(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_circle__invalid_color_formats(self): """Ensures draw circle handles invalid color formats correctly.""" kwargs = { "surface": pygame.Surface((4, 3)), "color": None, "center": (1, 2), "radius": 1, "width": 0, "draw_top_right": True, "draw_top_left": True, "draw_bottom_left": True, "draw_bottom_right": True, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_circle(**kwargs) def test_circle__floats(self): """Ensure that floats are accepted.""" draw.circle( surface=pygame.Surface((4, 4)), color=(255, 255, 127), center=(1.5, 1.5), radius=1.3, width=0, draw_top_right=True, draw_top_left=True, draw_bottom_left=True, draw_bottom_right=True, ) draw.circle( surface=pygame.Surface((4, 4)), color=(255, 255, 127), center=Vector2(1.5, 1.5), radius=1.3, width=0, draw_top_right=True, draw_top_left=True, draw_bottom_left=True, draw_bottom_right=True, ) draw.circle(pygame.Surface((2, 2)), (0, 0, 0, 50), (1.3, 1.3), 1.2) # def test_circle_clip(self): # """ maybe useful to help work out circle clip algorithm.""" # MAX = max # MIN = min # posx=30 # posy=15 # radius=1 # l=29 # t=14 # r=30 # b=16 # clip_rect_x=0 # clip_rect_y=0 # clip_rect_w=30 # clip_rect_h=30 # l = MAX(posx - radius, clip_rect_x) # t = MAX(posy - radius, clip_rect_y) # r = MIN(posx + radius, clip_rect_x + clip_rect_w) # b = MIN(posy + radius, clip_rect_y + clip_rect_h) # l, t, MAX(r - l, 0), MAX(b - t, 0) def test_circle__bounding_rect(self): """Ensures draw circle returns the correct bounding rect. Tests circles on and off the surface and a range of width/thickness values. """ circle_color = pygame.Color("red") surf_color = pygame.Color("black") max_radius = 3 surface = pygame.Surface((30, 30), 0, 32) surf_rect = surface.get_rect() # Make a rect that is bigger than the surface to help test drawing # circles off and partially off the surface. Make this rect such that # when centering the test circle on one of its corners, the circle is # drawn fully off the test surface, but a rect bounding the circle # would still overlap with the test surface. big_rect = surf_rect.inflate(max_radius * 2 - 1, max_radius * 2 - 1) for pos in rect_corners_mids_and_center( surf_rect ) + rect_corners_mids_and_center(big_rect): # Test using different radius and thickness values. for radius in range(max_radius + 1): for thickness in range(radius + 1): surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_circle( surface, circle_color, pos, radius, thickness ) # Calculating the expected_rect after the circle is # drawn (it uses what is actually drawn). expected_rect = create_bounding_rect(surface, surf_color, pos) # print("pos:%s:, radius:%s:, thickness:%s:" % (pos, radius, thickness)) # self.assertEqual(bounding_rect, expected_rect) with self.subTest( surface=surface, circle_color=circle_color, pos=pos, radius=radius, thickness=thickness, ): self.assertEqual(bounding_rect, expected_rect) def test_circle_negative_radius(self): """Ensures negative radius circles return zero sized bounding rect.""" surf = pygame.Surface((200, 200)) color = (0, 0, 0, 50) center = surf.get_height() // 2, surf.get_height() // 2 bounding_rect = self.draw_circle(surf, color, center, radius=-1, width=1) self.assertEqual(bounding_rect.size, (0, 0)) def test_circle_zero_radius(self): """Ensures zero radius circles does not draw a center pixel. NOTE: This is backwards incompatible behaviour with 1.9.x. """ surf = pygame.Surface((200, 200)) circle_color = pygame.Color("red") surf_color = pygame.Color("black") center = (100, 100) radius = 0 width = 1 bounding_rect = self.draw_circle(surf, circle_color, center, radius, width) expected_rect = create_bounding_rect(surf, surf_color, center) self.assertEqual(bounding_rect, expected_rect) self.assertEqual(bounding_rect, pygame.Rect(100, 100, 0, 0)) def test_circle__surface_clip(self): """Ensures draw circle respects a surface's clip area. Tests drawing the circle filled and unfilled. """ surfw = surfh = 25 circle_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (10, 10)) clip_rect.center = surface.get_rect().center radius = clip_rect.w // 2 + 1 for width in (0, 1): # Filled and unfilled. # Test centering the circle along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the circle without the # clip area set. surface.set_clip(None) surface.fill(surface_color) self.draw_circle(surface, circle_color, center, radius, width) expected_pts = get_color_points(surface, circle_color, clip_rect) # Clear the surface and set the clip area. Redraw the circle # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_circle(surface, circle_color, center, radius, width) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the circle_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = circle_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() def test_circle_shape(self): """Ensures there are no holes in the circle, and no overdrawing. Tests drawing a thick circle. Measures the distance of the drawn pixels from the circle center. """ surfw = surfh = 100 circle_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) (cx, cy) = center = (50, 50) radius = 45 width = 25 dest_rect = self.draw_circle(surface, circle_color, center, radius, width) for pt in test_utils.rect_area_pts(dest_rect): x, y = pt sqr_distance = (x - cx) ** 2 + (y - cy) ** 2 if (radius - width + 1) ** 2 < sqr_distance < (radius - 1) ** 2: self.assertEqual(surface.get_at(pt), circle_color) if ( sqr_distance < (radius - width - 1) ** 2 or sqr_distance > (radius + 1) ** 2 ): self.assertEqual(surface.get_at(pt), surface_color) def test_circle__diameter(self): """Ensures draw circle is twice size of radius high and wide.""" surf = pygame.Surface((200, 200)) color = (0, 0, 0, 50) center = surf.get_height() // 2, surf.get_height() // 2 width = 1 radius = 6 for radius in range(1, 65): bounding_rect = self.draw_circle(surf, color, center, radius, width) self.assertEqual(bounding_rect.width, radius * 2) self.assertEqual(bounding_rect.height, radius * 2) def test_x_bounds(self): """ensures a circle is drawn properly when there is a negative x, or a big x.""" surf = pygame.Surface((200, 200)) bgcolor = (0, 0, 0, 255) surf.fill(bgcolor) color = (255, 0, 0, 255) width = 1 radius = 10 where = (0, 30) bounding_rect1 = self.draw_circle(surf, color, where, radius=radius) self.assertEqual( bounding_rect1, pygame.Rect(0, where[1] - radius, where[0] + radius, radius * 2), ) self.assertEqual( surf.get_at((where[0] if where[0] > 0 else 0, where[1])), color ) self.assertEqual(surf.get_at((where[0] + radius + 1, where[1])), bgcolor) self.assertEqual(surf.get_at((where[0] + radius - 1, where[1])), color) surf.fill(bgcolor) where = (-1e30, 80) bounding_rect1 = self.draw_circle(surf, color, where, radius=radius) self.assertEqual(bounding_rect1, pygame.Rect(where[0], where[1], 0, 0)) self.assertEqual(surf.get_at((0 + radius, where[1])), bgcolor) surf.fill(bgcolor) where = (surf.get_width() + radius * 2, 80) bounding_rect1 = self.draw_circle(surf, color, where, radius=radius) self.assertEqual(bounding_rect1, pygame.Rect(where[0], where[1], 0, 0)) self.assertEqual(surf.get_at((0, where[1])), bgcolor) self.assertEqual(surf.get_at((0 + radius // 2, where[1])), bgcolor) self.assertEqual(surf.get_at((surf.get_width() - 1, where[1])), bgcolor) self.assertEqual(surf.get_at((surf.get_width() - radius, where[1])), bgcolor) surf.fill(bgcolor) where = (-1, 80) bounding_rect1 = self.draw_circle(surf, color, where, radius=radius) self.assertEqual( bounding_rect1, pygame.Rect(0, where[1] - radius, where[0] + radius, radius * 2), ) self.assertEqual( surf.get_at((where[0] if where[0] > 0 else 0, where[1])), color ) self.assertEqual(surf.get_at((where[0] + radius, where[1])), bgcolor) self.assertEqual(surf.get_at((where[0] + radius - 1, where[1])), color) class DrawCircleTest(DrawCircleMixin, DrawTestCase): """Test draw module function circle. This class inherits the general tests from DrawCircleMixin. It is also the class to add any draw.circle specific tests to. """ # Commented out to avoid cluttering the test output. Add back in if draw_py # ever properly supports drawing circles. # @unittest.skip('draw_py.draw_circle not supported yet') # class PythonDrawCircleTest(DrawCircleMixin, PythonDrawTestCase): # """Test draw_py module function draw_circle." # # This class inherits the general tests from DrawCircleMixin. It is also # the class to add any draw_py.draw_circle specific tests to. # """ ### Arc Testing ############################################################### class DrawArcMixin: """Mixin tests for drawing arcs. This class contains all the general arc drawing tests. """ def test_arc__args(self): """Ensures draw arc accepts the correct args.""" bounds_rect = self.draw_arc( pygame.Surface((3, 3)), (0, 10, 0, 50), (1, 1, 2, 2), 0, 1, 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__args_without_width(self): """Ensures draw arc accepts the args without a width.""" bounds_rect = self.draw_arc( pygame.Surface((2, 2)), (1, 1, 1, 99), pygame.Rect((0, 0), (2, 2)), 1.1, 2.1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__args_with_negative_width(self): """Ensures draw arc accepts the args with negative width.""" bounds_rect = self.draw_arc( pygame.Surface((3, 3)), (10, 10, 50, 50), (1, 1, 2, 2), 0, 1, -1 ) self.assertIsInstance(bounds_rect, pygame.Rect) self.assertEqual(bounds_rect, pygame.Rect(1, 1, 0, 0)) def test_arc__args_with_width_gt_radius(self): """Ensures draw arc accepts the args with width > rect.w // 2 and width > rect.h // 2. """ rect = pygame.Rect((0, 0), (4, 4)) bounds_rect = self.draw_arc( pygame.Surface((3, 3)), (10, 10, 50, 50), rect, 0, 45, rect.w // 2 + 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) bounds_rect = self.draw_arc( pygame.Surface((3, 3)), (10, 10, 50, 50), rect, 0, 45, rect.h // 2 + 1 ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__kwargs(self): """Ensures draw arc accepts the correct kwargs with and without a width arg. """ kwargs_list = [ { "surface": pygame.Surface((4, 4)), "color": pygame.Color("yellow"), "rect": pygame.Rect((0, 0), (3, 2)), "start_angle": 0.5, "stop_angle": 3, "width": 1, }, { "surface": pygame.Surface((2, 1)), "color": (0, 10, 20), "rect": (0, 0, 2, 2), "start_angle": 1, "stop_angle": 3.1, }, ] for kwargs in kwargs_list: bounds_rect = self.draw_arc(**kwargs) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__kwargs_order_independent(self): """Ensures draw arc's kwargs are not order dependent.""" bounds_rect = self.draw_arc( stop_angle=1, start_angle=2.2, color=(1, 2, 3), surface=pygame.Surface((3, 2)), width=1, rect=pygame.Rect((1, 0), (2, 3)), ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__args_missing(self): """Ensures draw arc detects any missing required args.""" surface = pygame.Surface((1, 1)) color = pygame.Color("red") rect = pygame.Rect((0, 0), (2, 2)) with self.assertRaises(TypeError): bounds_rect = self.draw_arc(surface, color, rect, 0.1) with self.assertRaises(TypeError): bounds_rect = self.draw_arc(surface, color, rect) with self.assertRaises(TypeError): bounds_rect = self.draw_arc(surface, color) with self.assertRaises(TypeError): bounds_rect = self.draw_arc(surface) with self.assertRaises(TypeError): bounds_rect = self.draw_arc() def test_arc__kwargs_missing(self): """Ensures draw arc detects any missing required kwargs.""" kwargs = { "surface": pygame.Surface((1, 2)), "color": pygame.Color("red"), "rect": pygame.Rect((1, 0), (2, 2)), "start_angle": 0.1, "stop_angle": 2, "width": 1, } for name in ("stop_angle", "start_angle", "rect", "color", "surface"): invalid_kwargs = dict(kwargs) invalid_kwargs.pop(name) # Pop from a copy. with self.assertRaises(TypeError): bounds_rect = self.draw_arc(**invalid_kwargs) def test_arc__arg_invalid_types(self): """Ensures draw arc detects invalid arg types.""" surface = pygame.Surface((2, 2)) color = pygame.Color("blue") rect = pygame.Rect((1, 1), (3, 3)) with self.assertRaises(TypeError): # Invalid width. bounds_rect = self.draw_arc(surface, color, rect, 0, 1, "1") with self.assertRaises(TypeError): # Invalid stop_angle. bounds_rect = self.draw_arc(surface, color, rect, 0, "1", 1) with self.assertRaises(TypeError): # Invalid start_angle. bounds_rect = self.draw_arc(surface, color, rect, "1", 0, 1) with self.assertRaises(TypeError): # Invalid rect. bounds_rect = self.draw_arc(surface, color, (1, 2, 3, 4, 5), 0, 1, 1) with self.assertRaises(TypeError): # Invalid color. bounds_rect = self.draw_arc(surface, 2.3, rect, 0, 1, 1) with self.assertRaises(TypeError): # Invalid surface. bounds_rect = self.draw_arc(rect, color, rect, 0, 1, 1) def test_arc__kwarg_invalid_types(self): """Ensures draw arc detects invalid kwarg types.""" surface = pygame.Surface((3, 3)) color = pygame.Color("green") rect = pygame.Rect((0, 1), (4, 2)) start = 3 stop = 4 kwargs_list = [ { "surface": pygame.Surface, # Invalid surface. "color": color, "rect": rect, "start_angle": start, "stop_angle": stop, "width": 1, }, { "surface": surface, "color": 2.3, # Invalid color. "rect": rect, "start_angle": start, "stop_angle": stop, "width": 1, }, { "surface": surface, "color": color, "rect": (0, 0, 0), # Invalid rect. "start_angle": start, "stop_angle": stop, "width": 1, }, { "surface": surface, "color": color, "rect": rect, "start_angle": "1", # Invalid start_angle. "stop_angle": stop, "width": 1, }, { "surface": surface, "color": color, "rect": rect, "start_angle": start, "stop_angle": "1", # Invalid stop_angle. "width": 1, }, { "surface": surface, "color": color, "rect": rect, "start_angle": start, "stop_angle": stop, "width": 1.1, }, ] # Invalid width. for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_arc(**kwargs) def test_arc__kwarg_invalid_name(self): """Ensures draw arc detects invalid kwarg names.""" surface = pygame.Surface((2, 3)) color = pygame.Color("cyan") rect = pygame.Rect((0, 1), (2, 2)) start = 0.9 stop = 2.3 kwargs_list = [ { "surface": surface, "color": color, "rect": rect, "start_angle": start, "stop_angle": stop, "width": 1, "invalid": 1, }, { "surface": surface, "color": color, "rect": rect, "start_angle": start, "stop_angle": stop, "invalid": 1, }, ] for kwargs in kwargs_list: with self.assertRaises(TypeError): bounds_rect = self.draw_arc(**kwargs) def test_arc__args_and_kwargs(self): """Ensures draw arc accepts a combination of args/kwargs""" surface = pygame.Surface((3, 1)) color = (255, 255, 0, 0) rect = pygame.Rect((1, 0), (2, 3)) start = 0.6 stop = 2 width = 1 kwargs = { "surface": surface, "color": color, "rect": rect, "start_angle": start, "stop_angle": stop, "width": width, } for name in ("surface", "color", "rect", "start_angle", "stop_angle"): kwargs.pop(name) if "surface" == name: bounds_rect = self.draw_arc(surface, **kwargs) elif "color" == name: bounds_rect = self.draw_arc(surface, color, **kwargs) elif "rect" == name: bounds_rect = self.draw_arc(surface, color, rect, **kwargs) elif "start_angle" == name: bounds_rect = self.draw_arc(surface, color, rect, start, **kwargs) elif "stop_angle" == name: bounds_rect = self.draw_arc(surface, color, rect, start, stop, **kwargs) else: bounds_rect = self.draw_arc( surface, color, rect, start, stop, width, **kwargs ) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__valid_width_values(self): """Ensures draw arc accepts different width values.""" arc_color = pygame.Color("yellow") surface_color = pygame.Color("white") surface = pygame.Surface((6, 6)) rect = pygame.Rect((0, 0), (4, 4)) rect.center = surface.get_rect().center pos = rect.centerx + 1, rect.centery + 1 kwargs = { "surface": surface, "color": arc_color, "rect": rect, "start_angle": 0, "stop_angle": 7, "width": None, } for width in (-50, -10, -3, -2, -1, 0, 1, 2, 3, 10, 50): msg = f"width={width}" surface.fill(surface_color) # Clear for each test. kwargs["width"] = width expected_color = arc_color if width > 0 else surface_color bounds_rect = self.draw_arc(**kwargs) self.assertEqual(surface.get_at(pos), expected_color, msg) self.assertIsInstance(bounds_rect, pygame.Rect, msg) def test_arc__valid_stop_angle_values(self): """Ensures draw arc accepts different stop_angle values.""" expected_color = pygame.Color("blue") surface_color = pygame.Color("white") surface = pygame.Surface((6, 6)) rect = pygame.Rect((0, 0), (4, 4)) rect.center = surface.get_rect().center pos = rect.centerx, rect.centery + 1 kwargs = { "surface": surface, "color": expected_color, "rect": rect, "start_angle": -17, "stop_angle": None, "width": 1, } for stop_angle in (-10, -5.5, -1, 0, 1, 5.5, 10): msg = f"stop_angle={stop_angle}" surface.fill(surface_color) # Clear for each test. kwargs["stop_angle"] = stop_angle bounds_rect = self.draw_arc(**kwargs) self.assertEqual(surface.get_at(pos), expected_color, msg) self.assertIsInstance(bounds_rect, pygame.Rect, msg) def test_arc__valid_start_angle_values(self): """Ensures draw arc accepts different start_angle values.""" expected_color = pygame.Color("blue") surface_color = pygame.Color("white") surface = pygame.Surface((6, 6)) rect = pygame.Rect((0, 0), (4, 4)) rect.center = surface.get_rect().center pos = rect.centerx + 1, rect.centery + 1 kwargs = { "surface": surface, "color": expected_color, "rect": rect, "start_angle": None, "stop_angle": 17, "width": 1, } for start_angle in (-10.0, -5.5, -1, 0, 1, 5.5, 10.0): msg = f"start_angle={start_angle}" surface.fill(surface_color) # Clear for each test. kwargs["start_angle"] = start_angle bounds_rect = self.draw_arc(**kwargs) self.assertEqual(surface.get_at(pos), expected_color, msg) self.assertIsInstance(bounds_rect, pygame.Rect, msg) def test_arc__valid_rect_formats(self): """Ensures draw arc accepts different rect formats.""" expected_color = pygame.Color("red") surface_color = pygame.Color("black") surface = pygame.Surface((6, 6)) rect = pygame.Rect((0, 0), (4, 4)) rect.center = surface.get_rect().center pos = rect.centerx + 1, rect.centery + 1 kwargs = { "surface": surface, "color": expected_color, "rect": None, "start_angle": 0, "stop_angle": 7, "width": 1, } rects = (rect, (rect.topleft, rect.size), (rect.x, rect.y, rect.w, rect.h)) for rect in rects: surface.fill(surface_color) # Clear for each test. kwargs["rect"] = rect bounds_rect = self.draw_arc(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__valid_color_formats(self): """Ensures draw arc accepts different color formats.""" green_color = pygame.Color("green") surface_color = pygame.Color("black") surface = pygame.Surface((6, 6)) rect = pygame.Rect((0, 0), (4, 4)) rect.center = surface.get_rect().center pos = rect.centerx + 1, rect.centery + 1 kwargs = { "surface": surface, "color": None, "rect": rect, "start_angle": 0, "stop_angle": 7, "width": 1, } greens = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(green_color), green_color, ) for color in greens: surface.fill(surface_color) # Clear for each test. kwargs["color"] = color if isinstance(color, int): expected_color = surface.unmap_rgb(color) else: expected_color = green_color bounds_rect = self.draw_arc(**kwargs) self.assertEqual(surface.get_at(pos), expected_color) self.assertIsInstance(bounds_rect, pygame.Rect) def test_arc__invalid_color_formats(self): """Ensures draw arc handles invalid color formats correctly.""" pos = (1, 1) surface = pygame.Surface((4, 3)) kwargs = { "surface": surface, "color": None, "rect": pygame.Rect(pos, (2, 2)), "start_angle": 5, "stop_angle": 6.1, "width": 1, } for expected_color in (2.3, self): kwargs["color"] = expected_color with self.assertRaises(TypeError): bounds_rect = self.draw_arc(**kwargs) def test_arc(self): """Ensure draw arc works correctly.""" black = pygame.Color("black") red = pygame.Color("red") # create an image object of width 100, height 150, filled with black. surface = pygame.Surface((100, 150)) surface.fill(black) # rectangle that contains for the ellipse arc. # 0 pixel from left, 0 pixel from top # 80 pixels wide, 40 pixels high rect = (0, 0, 80, 40) # angle of the arc in radians start_angle = 0.0 stop_angle = 3.14 # thickness, and it grows inward from the rectangle width = 3 # draw an elliptical arc pygame.draw.arc(surface, red, rect, start_angle, stop_angle, width) # Save the drawn arc pygame.image.save(surface, "arc.png") # arc is red x = 20 for y in range(2, 5): self.assertEqual(surface.get_at((x, y)), red) # the rest area in surface is black self.assertEqual(surface.get_at((0, 0)), black) def test_arc__bounding_rect(self): """Ensures draw arc returns the correct bounding rect. Tests arcs on and off the surface and a range of width/thickness values. """ arc_color = pygame.Color("red") surf_color = pygame.Color("black") min_width = min_height = 5 max_width = max_height = 7 sizes = ((min_width, min_height), (max_width, max_height)) surface = pygame.Surface((20, 20), 0, 32) surf_rect = surface.get_rect() # Make a rect that is bigger than the surface to help test drawing # arcs off and partially off the surface. big_rect = surf_rect.inflate(min_width * 2 + 1, min_height * 2 + 1) # Max angle allows for a full circle to be drawn. start_angle = 0 stop_angles = (0, 2, 3, 5, math.ceil(2 * math.pi)) for pos in rect_corners_mids_and_center( surf_rect ) + rect_corners_mids_and_center(big_rect): # Each of the arc's rect position attributes will be set to the pos # value. for attr in RECT_POSITION_ATTRIBUTES: # Test using different rect sizes, thickness values and stop # angles. for width, height in sizes: arc_rect = pygame.Rect((0, 0), (width, height)) setattr(arc_rect, attr, pos) for thickness in (0, 1, 2, 3, min(width, height)): for stop_angle in stop_angles: surface.fill(surf_color) # Clear for each test. bounding_rect = self.draw_arc( surface, arc_color, arc_rect, start_angle, stop_angle, thickness, ) # Calculating the expected_rect after the arc # is drawn (it uses what is actually drawn). expected_rect = create_bounding_rect( surface, surf_color, arc_rect.topleft ) self.assertEqual( bounding_rect, expected_rect, f"thickness={thickness}", ) def test_arc__surface_clip(self): """Ensures draw arc respects a surface's clip area.""" surfw = surfh = 30 start = 0.1 end = 0 # end < start so a full circle will be drawn arc_color = pygame.Color("red") surface_color = pygame.Color("green") surface = pygame.Surface((surfw, surfh)) surface.fill(surface_color) clip_rect = pygame.Rect((0, 0), (11, 11)) clip_rect.center = surface.get_rect().center pos_rect = clip_rect.copy() # Manages the arc's pos. for thickness in (1, 3): # Different line widths. # Test centering the arc along the clip rect's edge. for center in rect_corners_mids_and_center(clip_rect): # Get the expected points by drawing the arc without the # clip area set. pos_rect.center = center surface.set_clip(None) surface.fill(surface_color) self.draw_arc(surface, arc_color, pos_rect, start, end, thickness) expected_pts = get_color_points(surface, arc_color, clip_rect) # Clear the surface and set the clip area. Redraw the arc # and check that only the clip area is modified. surface.fill(surface_color) surface.set_clip(clip_rect) self.draw_arc(surface, arc_color, pos_rect, start, end, thickness) surface.lock() # For possible speed up. # Check all the surface points to ensure only the expected_pts # are the arc_color. for pt in ((x, y) for x in range(surfw) for y in range(surfh)): if pt in expected_pts: expected_color = arc_color else: expected_color = surface_color self.assertEqual(surface.get_at(pt), expected_color, pt) surface.unlock() class DrawArcTest(DrawArcMixin, DrawTestCase): """Test draw module function arc. This class inherits the general tests from DrawArcMixin. It is also the class to add any draw.arc specific tests to. """ # Commented out to avoid cluttering the test output. Add back in if draw_py # ever properly supports drawing arcs. # @unittest.skip('draw_py.draw_arc not supported yet') # class PythonDrawArcTest(DrawArcMixin, PythonDrawTestCase): # """Test draw_py module function draw_arc. # # This class inherits the general tests from DrawArcMixin. It is also the # class to add any draw_py.draw_arc specific tests to. # """ ### Draw Module Testing ####################################################### class DrawModuleTest(unittest.TestCase): """General draw module tests.""" def test_path_data_validation(self): """Test validation of multi-point drawing methods. See bug #521 """ surf = pygame.Surface((5, 5)) rect = pygame.Rect(0, 0, 5, 5) bad_values = ( "text", b"bytes", 1 + 1j, # string, bytes, complex, object(), (lambda x: x), ) # object, function bad_points = list(bad_values) + [(1,), (1, 2, 3)] # wrong tuple length bad_points.extend((1, v) for v in bad_values) # one wrong value good_path = [(1, 1), (1, 3), (3, 3), (3, 1)] # A) draw.lines check_pts = [(x, y) for x in range(5) for y in range(5)] for method, is_polgon in ( (draw.lines, 0), (draw.aalines, 0), (draw.polygon, 1), ): for val in bad_values: # 1. at the beginning draw.rect(surf, RED, rect, 0) with self.assertRaises(TypeError): if is_polgon: method(surf, GREEN, [val] + good_path, 0) else: method(surf, GREEN, True, [val] + good_path) # make sure, nothing was drawn : self.assertTrue(all(surf.get_at(pt) == RED for pt in check_pts)) # 2. not at the beginning (was not checked) draw.rect(surf, RED, rect, 0) with self.assertRaises(TypeError): path = good_path[:2] + [val] + good_path[2:] if is_polgon: method(surf, GREEN, path, 0) else: method(surf, GREEN, True, path) # make sure, nothing was drawn : self.assertTrue(all(surf.get_at(pt) == RED for pt in check_pts)) def test_color_validation(self): surf = pygame.Surface((10, 10)) colors = 123456, (1, 10, 100), RED, "#ab12df", "red" points = ((0, 0), (1, 1), (1, 0)) # 1. valid colors for col in colors: draw.line(surf, col, (0, 0), (1, 1)) draw.aaline(surf, col, (0, 0), (1, 1)) draw.aalines(surf, col, True, points) draw.lines(surf, col, True, points) draw.arc(surf, col, pygame.Rect(0, 0, 3, 3), 15, 150) draw.ellipse(surf, col, pygame.Rect(0, 0, 3, 6), 1) draw.circle(surf, col, (7, 3), 2) draw.polygon(surf, col, points, 0) # 2. invalid colors for col in (1.256, object(), None): with self.assertRaises(TypeError): draw.line(surf, col, (0, 0), (1, 1)) with self.assertRaises(TypeError): draw.aaline(surf, col, (0, 0), (1, 1)) with self.assertRaises(TypeError): draw.aalines(surf, col, True, points) with self.assertRaises(TypeError): draw.lines(surf, col, True, points) with self.assertRaises(TypeError): draw.arc(surf, col, pygame.Rect(0, 0, 3, 3), 15, 150) with self.assertRaises(TypeError): draw.ellipse(surf, col, pygame.Rect(0, 0, 3, 6), 1) with self.assertRaises(TypeError): draw.circle(surf, col, (7, 3), 2) with self.assertRaises(TypeError): draw.polygon(surf, col, points, 0) ############################################################################### if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.022112 pygame-2.6.1/test/event_test.py0000644000175100001770000010147114676242340016134 0ustar00runnerdockerimport collections import time import unittest import os import pygame EVENT_TYPES = ( # pygame.NOEVENT, # pygame.ACTIVEEVENT, pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION, pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP, pygame.JOYAXISMOTION, pygame.JOYBALLMOTION, pygame.JOYHATMOTION, pygame.JOYBUTTONDOWN, pygame.JOYBUTTONUP, pygame.VIDEORESIZE, pygame.VIDEOEXPOSE, pygame.QUIT, pygame.SYSWMEVENT, pygame.USEREVENT, # pygame.NUMEVENTS, ) EVENT_TEST_PARAMS = collections.defaultdict(dict) EVENT_TEST_PARAMS.update( { pygame.KEYDOWN: {"key": pygame.K_SPACE}, pygame.KEYUP: {"key": pygame.K_SPACE}, pygame.MOUSEMOTION: {}, pygame.MOUSEBUTTONDOWN: {"button": 1}, pygame.MOUSEBUTTONUP: {"button": 1}, } ) NAMES_AND_EVENTS = ( ("NoEvent", pygame.NOEVENT), ("ActiveEvent", pygame.ACTIVEEVENT), ("KeyDown", pygame.KEYDOWN), ("KeyUp", pygame.KEYUP), ("MouseMotion", pygame.MOUSEMOTION), ("MouseButtonDown", pygame.MOUSEBUTTONDOWN), ("MouseButtonUp", pygame.MOUSEBUTTONUP), ("JoyAxisMotion", pygame.JOYAXISMOTION), ("JoyBallMotion", pygame.JOYBALLMOTION), ("JoyHatMotion", pygame.JOYHATMOTION), ("JoyButtonDown", pygame.JOYBUTTONDOWN), ("JoyButtonUp", pygame.JOYBUTTONUP), ("VideoResize", pygame.VIDEORESIZE), ("VideoExpose", pygame.VIDEOEXPOSE), ("Quit", pygame.QUIT), ("SysWMEvent", pygame.SYSWMEVENT), ("MidiIn", pygame.MIDIIN), ("MidiOut", pygame.MIDIOUT), ("UserEvent", pygame.USEREVENT), ("Unknown", 0xFFFF), ("FingerMotion", pygame.FINGERMOTION), ("FingerDown", pygame.FINGERDOWN), ("FingerUp", pygame.FINGERUP), ("MultiGesture", pygame.MULTIGESTURE), ("MouseWheel", pygame.MOUSEWHEEL), ("TextInput", pygame.TEXTINPUT), ("TextEditing", pygame.TEXTEDITING), ("ControllerAxisMotion", pygame.CONTROLLERAXISMOTION), ("ControllerButtonDown", pygame.CONTROLLERBUTTONDOWN), ("ControllerButtonUp", pygame.CONTROLLERBUTTONUP), ("ControllerDeviceAdded", pygame.CONTROLLERDEVICEADDED), ("ControllerDeviceRemoved", pygame.CONTROLLERDEVICEREMOVED), ("ControllerDeviceMapped", pygame.CONTROLLERDEVICEREMAPPED), ("DropFile", pygame.DROPFILE), ("AudioDeviceAdded", pygame.AUDIODEVICEADDED), ("AudioDeviceRemoved", pygame.AUDIODEVICEREMOVED), ("DropText", pygame.DROPTEXT), ("DropBegin", pygame.DROPBEGIN), ("DropComplete", pygame.DROPCOMPLETE), ) class EventTypeTest(unittest.TestCase): def test_Event(self): """Ensure an Event object can be created.""" e = pygame.event.Event(pygame.USEREVENT, some_attr=1, other_attr="1") self.assertEqual(e.some_attr, 1) self.assertEqual(e.other_attr, "1") # Event now uses tp_dictoffset and tp_members: # https://github.com/pygame/pygame/issues/62 self.assertEqual(e.type, pygame.USEREVENT) self.assertIs(e.dict, e.__dict__) e.some_attr = 12 self.assertEqual(e.some_attr, 12) e.new_attr = 15 self.assertEqual(e.new_attr, 15) self.assertRaises(AttributeError, setattr, e, "type", 0) self.assertRaises(AttributeError, setattr, e, "dict", None) # Ensure attributes are visible to dir(), part of the original # posted request. d = dir(e) attrs = ("type", "dict", "__dict__", "some_attr", "other_attr", "new_attr") for attr in attrs: self.assertIn(attr, d) # redundant type field as kwarg self.assertRaises(ValueError, pygame.event.Event, 10, type=100) def test_as_str(self): # Bug reported on Pygame mailing list July 24, 2011: # For Python 3.x str(event) to raises an UnicodeEncodeError when # an event attribute is a string with a non-ascii character. try: str(pygame.event.Event(EVENT_TYPES[0], a="\xed")) except UnicodeEncodeError: self.fail("Event object raised exception for non-ascii character") # Passed. def test_event_bool(self): self.assertFalse(pygame.event.Event(pygame.NOEVENT)) for event_type in [ pygame.MOUSEBUTTONDOWN, pygame.ACTIVEEVENT, pygame.WINDOWLEAVE, pygame.USEREVENT_DROPFILE, ]: self.assertTrue(pygame.event.Event(event_type)) def test_event_equality(self): """Ensure that events can be compared correctly.""" a = pygame.event.Event(EVENT_TYPES[0], a=1) b = pygame.event.Event(EVENT_TYPES[0], a=1) c = pygame.event.Event(EVENT_TYPES[1], a=1) d = pygame.event.Event(EVENT_TYPES[0], a=2) # Comparing event a self.assertEqual(a, a) # Event is equal to itself self.assertEqual(a, b) # Same type and attributes self.assertNotEqual(a, c) # Different type but same attributes self.assertNotEqual(a, d) # Same type but different attributes # Comparing event b self.assertEqual(b, a) # Same type and attributes self.assertNotEqual(b, c) # Different type but same attributes self.assertNotEqual(b, d) # Same type but different attributes # Comparing event c self.assertNotEqual(c, a) # Different type but same attributes self.assertNotEqual(c, b) # Different type but same attributes self.assertNotEqual(c, d) # Different type and different attributes # Comparing event d self.assertNotEqual(d, a) # Same type but different attributes self.assertNotEqual(d, b) # Same type but different attributes self.assertNotEqual(d, c) # Different type and different attributes race_condition_notification = """ This test is dependent on timing. The event queue is cleared in preparation for tests. There is a small window where outside events from the OS may have effected results. Try running the test again. """ class EventModuleArgsTest(unittest.TestCase): def setUp(self): pygame.display.init() pygame.event.clear() def tearDown(self): pygame.display.quit() def test_get(self): pygame.event.get() pygame.event.get(None) pygame.event.get(None, True) pygame.event.get(pump=False) pygame.event.get(pump=True) pygame.event.get(eventtype=None) pygame.event.get(eventtype=[pygame.KEYUP, pygame.KEYDOWN]) pygame.event.get(eventtype=pygame.USEREVENT, pump=False) # event type out of range self.assertRaises(ValueError, pygame.event.get, 0x00010000) self.assertRaises(TypeError, pygame.event.get, 1 + 2j) self.assertRaises(TypeError, pygame.event.get, "foo") def test_clear(self): pygame.event.clear() pygame.event.clear(None) pygame.event.clear(None, True) pygame.event.clear(pump=False) pygame.event.clear(pump=True) pygame.event.clear(eventtype=None) pygame.event.clear(eventtype=[pygame.KEYUP, pygame.KEYDOWN]) pygame.event.clear(eventtype=pygame.USEREVENT, pump=False) # event type out of range self.assertRaises(ValueError, pygame.event.clear, 0x0010FFFFF) self.assertRaises(TypeError, pygame.event.get, ["a", "b", "c"]) def test_peek(self): pygame.event.peek() pygame.event.peek(None) pygame.event.peek(None, True) pygame.event.peek(pump=False) pygame.event.peek(pump=True) pygame.event.peek(eventtype=None) pygame.event.peek(eventtype=[pygame.KEYUP, pygame.KEYDOWN]) pygame.event.peek(eventtype=pygame.USEREVENT, pump=False) class Foo: pass # event type out of range self.assertRaises(ValueError, pygame.event.peek, -1) self.assertRaises(ValueError, pygame.event.peek, [-10]) self.assertRaises(TypeError, pygame.event.peek, Foo()) class EventCustomTypeTest(unittest.TestCase): """Those tests are special in that they need the _custom_event counter to be reset before and/or after being run.""" def setUp(self): pygame.quit() pygame.init() pygame.display.init() def tearDown(self): pygame.quit() def test_custom_type(self): self.assertEqual(pygame.event.custom_type(), pygame.USEREVENT + 1) atype = pygame.event.custom_type() atype2 = pygame.event.custom_type() self.assertEqual(atype, atype2 - 1) ev = pygame.event.Event(atype) pygame.event.post(ev) queue = pygame.event.get(atype) self.assertEqual(len(queue), 1) self.assertEqual(queue[0].type, atype) def test_custom_type__end_boundary(self): """Ensure custom_type() raises error when no more custom types. The last allowed custom type number should be (pygame.NUMEVENTS - 1). """ last = -1 start = pygame.event.custom_type() + 1 for _ in range(start, pygame.NUMEVENTS): last = pygame.event.custom_type() self.assertEqual(last, pygame.NUMEVENTS - 1) with self.assertRaises(pygame.error): pygame.event.custom_type() def test_custom_type__reset(self): """Ensure custom events get 'deregistered' by quit().""" before = pygame.event.custom_type() self.assertEqual(before, pygame.event.custom_type() - 1) pygame.quit() pygame.init() pygame.display.init() self.assertEqual(before, pygame.event.custom_type()) class EventModuleTest(unittest.TestCase): def _assertCountEqual(self, *args, **kwargs): # Handle method name differences between Python versions. # Is this still needed? self.assertCountEqual(*args, **kwargs) def _assertExpectedEvents(self, expected, got): """Find events like expected events, raise on unexpected or missing, ignore additional event properties if expected properties are present.""" # This does greedy matching, don't encode an NP-hard problem # into your input data, *please* items_left = got[:] for expected_element in expected: for item in items_left: for key in expected_element.__dict__: if item.__dict__[key] != expected_element.__dict__[key]: break else: # found item! items_left.remove(item) break else: raise AssertionError( "Expected " + str(expected_element) + " among remaining events " + str(items_left) + " out of " + str(got) ) if len(items_left) > 0: raise AssertionError("Unexpected Events: " + str(items_left)) def setUp(self): pygame.display.init() pygame.event.clear() # flush events def tearDown(self): pygame.event.clear() # flush events pygame.display.quit() def test_event_numevents(self): """Ensures NUMEVENTS does not exceed the maximum SDL number of events.""" # Ref: https://www.libsdl.org/tmp/SDL/include/SDL_events.h MAX_SDL_EVENTS = 0xFFFF # SDL_LASTEVENT = 0xFFFF self.assertLessEqual(pygame.NUMEVENTS, MAX_SDL_EVENTS) def test_event_attribute(self): e1 = pygame.event.Event(pygame.USEREVENT, attr1="attr1") self.assertEqual(e1.attr1, "attr1") def test_set_blocked(self): """Ensure events can be blocked from the queue.""" event = EVENT_TYPES[0] unblocked_event = EVENT_TYPES[1] pygame.event.set_blocked(event) self.assertTrue(pygame.event.get_blocked(event)) self.assertFalse(pygame.event.get_blocked(unblocked_event)) posted = pygame.event.post( pygame.event.Event(event, **EVENT_TEST_PARAMS[event]) ) self.assertFalse(posted) # post an unblocked event posted = pygame.event.post( pygame.event.Event(unblocked_event, **EVENT_TEST_PARAMS[unblocked_event]) ) self.assertTrue(posted) ret = pygame.event.get() should_be_blocked = [e for e in ret if e.type == event] should_be_allowed_types = [e.type for e in ret if e.type != event] self.assertEqual(should_be_blocked, []) self.assertTrue(unblocked_event in should_be_allowed_types) def test_set_blocked__event_sequence(self): """Ensure a sequence of event types can be blocked.""" event_types = [ pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION, pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP, pygame.WINDOWFOCUSLOST, pygame.USEREVENT, ] pygame.event.set_blocked(event_types) for etype in event_types: self.assertTrue(pygame.event.get_blocked(etype)) def test_set_blocked_all(self): """Ensure all events can be unblocked at once.""" pygame.event.set_blocked(None) for e in EVENT_TYPES: self.assertTrue(pygame.event.get_blocked(e)) def test_post__and_poll(self): """Ensure events can be posted to the queue.""" e1 = pygame.event.Event(pygame.USEREVENT, attr1="attr1") pygame.event.post(e1) posted_event = pygame.event.poll() self.assertEqual(e1.attr1, posted_event.attr1, race_condition_notification) # fuzzing event types for i in range(1, 13): pygame.event.post( pygame.event.Event(EVENT_TYPES[i], **EVENT_TEST_PARAMS[EVENT_TYPES[i]]) ) self.assertEqual( pygame.event.poll().type, EVENT_TYPES[i], race_condition_notification ) def test_post_and_get_keydown(self): """Ensure keydown events can be posted to the queue.""" activemodkeys = pygame.key.get_mods() events = [ pygame.event.Event(pygame.KEYDOWN, key=pygame.K_p), pygame.event.Event(pygame.KEYDOWN, key=pygame.K_y, mod=activemodkeys), pygame.event.Event(pygame.KEYDOWN, key=pygame.K_g, unicode="g"), pygame.event.Event(pygame.KEYDOWN, key=pygame.K_a, unicode=None), pygame.event.Event(pygame.KEYDOWN, key=pygame.K_m, mod=None, window=None), pygame.event.Event( pygame.KEYDOWN, key=pygame.K_e, mod=activemodkeys, unicode="e" ), ] for e in events: pygame.event.post(e) posted_event = pygame.event.poll() self.assertEqual(e, posted_event, race_condition_notification) def test_post_large_user_event(self): pygame.event.post( pygame.event.Event( pygame.USEREVENT, {"a": "a" * 1024}, test=list(range(100)) ) ) e = pygame.event.poll() self.assertEqual(e.type, pygame.USEREVENT) self.assertEqual(e.a, "a" * 1024) self.assertEqual(e.test, list(range(100))) def test_post_blocked(self): """ Test blocked events are not posted. Also test whether post() returns a boolean correctly """ pygame.event.set_blocked(pygame.USEREVENT) self.assertFalse(pygame.event.post(pygame.event.Event(pygame.USEREVENT))) self.assertFalse(pygame.event.poll()) pygame.event.set_allowed(pygame.USEREVENT) self.assertTrue(pygame.event.post(pygame.event.Event(pygame.USEREVENT))) self.assertEqual(pygame.event.poll(), pygame.event.Event(pygame.USEREVENT)) def test_get(self): """Ensure get() retrieves all the events on the queue.""" event_cnt = 10 for _ in range(event_cnt): pygame.event.post(pygame.event.Event(pygame.USEREVENT)) queue = pygame.event.get() self.assertEqual(len(queue), event_cnt) self.assertTrue(all(e.type == pygame.USEREVENT for e in queue)) def test_get_type(self): ev = pygame.event.Event(pygame.USEREVENT) pygame.event.post(ev) queue = pygame.event.get(pygame.USEREVENT) self.assertEqual(len(queue), 1) self.assertEqual(queue[0].type, pygame.USEREVENT) TESTEVENTS = 10 for _ in range(TESTEVENTS): pygame.event.post(ev) q = pygame.event.get([pygame.USEREVENT]) self.assertEqual(len(q), TESTEVENTS) for event in q: self.assertEqual(event, ev) def test_get_exclude_throw(self): self.assertRaises( pygame.error, pygame.event.get, pygame.KEYDOWN, False, pygame.KEYUP ) def test_get_exclude(self): pygame.event.post(pygame.event.Event(pygame.USEREVENT)) pygame.event.post(pygame.event.Event(pygame.KEYDOWN)) queue = pygame.event.get(exclude=pygame.KEYDOWN) self.assertEqual(len(queue), 1) self.assertEqual(queue[0].type, pygame.USEREVENT) pygame.event.post(pygame.event.Event(pygame.KEYUP)) pygame.event.post(pygame.event.Event(pygame.USEREVENT)) queue = pygame.event.get(exclude=(pygame.KEYDOWN, pygame.KEYUP)) self.assertEqual(len(queue), 1) self.assertEqual(queue[0].type, pygame.USEREVENT) queue = pygame.event.get() self.assertEqual(len(queue), 2) def test_get__empty_queue(self): """Ensure get() works correctly on an empty queue.""" expected_events = [] pygame.event.clear() # Ensure all events can be checked. retrieved_events = pygame.event.get() self.assertListEqual(retrieved_events, expected_events) # Ensure events can be checked individually. for event_type in EVENT_TYPES: retrieved_events = pygame.event.get(event_type) self.assertListEqual(retrieved_events, expected_events) # Ensure events can be checked as a sequence. retrieved_events = pygame.event.get(EVENT_TYPES) self.assertListEqual(retrieved_events, expected_events) def test_get__event_sequence(self): """Ensure get() can handle a sequence of event types.""" event_types = [pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION] other_event_type = pygame.MOUSEBUTTONUP # Test when no events in the queue. expected_events = [] pygame.event.clear() retrieved_events = pygame.event.get(event_types) # don't use self._assertCountEqual here. This checks for # expected properties in events, and ignores unexpected ones, for # forward compatibility with SDL2. self._assertExpectedEvents(expected=expected_events, got=retrieved_events) # Test when an event type not in the list is in the queue. expected_events = [] pygame.event.clear() pygame.event.post( pygame.event.Event(other_event_type, **EVENT_TEST_PARAMS[other_event_type]) ) retrieved_events = pygame.event.get(event_types) self._assertExpectedEvents(expected=expected_events, got=retrieved_events) # Test when 1 event type in the list is in the queue. expected_events = [ pygame.event.Event(event_types[0], **EVENT_TEST_PARAMS[event_types[0]]) ] pygame.event.clear() pygame.event.post(expected_events[0]) retrieved_events = pygame.event.get(event_types) self._assertExpectedEvents(expected=expected_events, got=retrieved_events) # Test all events in the list are in the queue. pygame.event.clear() expected_events = [] for etype in event_types: expected_events.append( pygame.event.Event(etype, **EVENT_TEST_PARAMS[etype]) ) pygame.event.post(expected_events[-1]) retrieved_events = pygame.event.get(event_types) self._assertExpectedEvents(expected=expected_events, got=retrieved_events) def test_get_clears_queue(self): """Ensure get() clears the event queue after a call""" pygame.event.get() # should clear the queue completely by getting all events self.assertEqual(pygame.event.get(), []) def test_clear(self): """Ensure clear() removes all the events on the queue.""" for e in EVENT_TYPES: pygame.event.post(pygame.event.Event(e, **EVENT_TEST_PARAMS[e])) poll_event = pygame.event.poll() self.assertNotEqual(poll_event.type, pygame.NOEVENT) pygame.event.clear() poll_event = pygame.event.poll() self.assertEqual(poll_event.type, pygame.NOEVENT, race_condition_notification) def test_clear__empty_queue(self): """Ensure clear() works correctly on an empty queue.""" expected_events = [] pygame.event.clear() # Test calling clear() on an already empty queue. pygame.event.clear() retrieved_events = pygame.event.get() self.assertListEqual(retrieved_events, expected_events) def test_clear__event_sequence(self): """Ensure a sequence of event types can be cleared from the queue.""" cleared_event_types = EVENT_TYPES[:5] expected_event_types = EVENT_TYPES[5:10] expected_events = [] # Add the events to the queue. for etype in cleared_event_types: pygame.event.post(pygame.event.Event(etype, **EVENT_TEST_PARAMS[etype])) for etype in expected_events: expected_events.append( pygame.event.Event(etype, **EVENT_TEST_PARAMS[etype]) ) pygame.event.post(expected_events[-1]) # Clear the cleared_events from the queue. pygame.event.clear(cleared_event_types) # Check the rest of the events in the queue. remaining_events = pygame.event.get() self._assertCountEqual(remaining_events, expected_events) def test_event_name(self): """Ensure event_name() returns the correct event name.""" for expected_name, event in NAMES_AND_EVENTS: self.assertEqual( pygame.event.event_name(event), expected_name, f"0x{event:X}" ) def test_event_name__userevent_range(self): """Ensures event_name() returns the correct name for user events. Tests the full range of user events. """ expected_name = "UserEvent" for event in range(pygame.USEREVENT, pygame.NUMEVENTS): self.assertEqual( pygame.event.event_name(event), expected_name, f"0x{event:X}" ) def test_event_name__userevent_boundary(self): """Ensures event_name() does not return 'UserEvent' for events just outside the user event range. """ unexpected_name = "UserEvent" for event in (pygame.USEREVENT - 1, pygame.NUMEVENTS): self.assertNotEqual( pygame.event.event_name(event), unexpected_name, f"0x{event:X}" ) def test_event_name__kwargs(self): """Ensure event_name() returns the correct event name when kwargs used.""" for expected_name, event in NAMES_AND_EVENTS: self.assertEqual( pygame.event.event_name(type=event), expected_name, f"0x{event:X}" ) def test_peek(self): """Ensure queued events can be peeked at.""" event_types = [pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION] for event_type in event_types: pygame.event.post( pygame.event.Event(event_type, **EVENT_TEST_PARAMS[event_type]) ) # Ensure events can be checked individually. for event_type in event_types: self.assertTrue(pygame.event.peek(event_type)) # Ensure events can be checked as a sequence. self.assertTrue(pygame.event.peek(event_types)) def test_peek__event_sequence(self): """Ensure peek() can handle a sequence of event types.""" event_types = [pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION] other_event_type = pygame.MOUSEBUTTONUP # Test when no events in the queue. pygame.event.clear() peeked = pygame.event.peek(event_types) self.assertFalse(peeked) # Test when an event type not in the list is in the queue. pygame.event.clear() pygame.event.post( pygame.event.Event(other_event_type, **EVENT_TEST_PARAMS[other_event_type]) ) peeked = pygame.event.peek(event_types) self.assertFalse(peeked) # Test when 1 event type in the list is in the queue. pygame.event.clear() pygame.event.post( pygame.event.Event(event_types[0], **EVENT_TEST_PARAMS[event_types[0]]) ) peeked = pygame.event.peek(event_types) self.assertTrue(peeked) # Test all events in the list are in the queue. pygame.event.clear() for etype in event_types: pygame.event.post(pygame.event.Event(etype, **EVENT_TEST_PARAMS[etype])) peeked = pygame.event.peek(event_types) self.assertTrue(peeked) def test_peek__empty_queue(self): """Ensure peek() works correctly on an empty queue.""" pygame.event.clear() # Ensure all events can be checked. peeked = pygame.event.peek() self.assertFalse(peeked) # Ensure events can be checked individually. for event_type in EVENT_TYPES: peeked = pygame.event.peek(event_type) self.assertFalse(peeked) # Ensure events can be checked as a sequence. peeked = pygame.event.peek(EVENT_TYPES) self.assertFalse(peeked) def test_set_allowed(self): """Ensure a blocked event type can be unblocked/allowed.""" event = EVENT_TYPES[0] pygame.event.set_blocked(event) self.assertTrue(pygame.event.get_blocked(event)) pygame.event.set_allowed(event) self.assertFalse(pygame.event.get_blocked(event)) def test_set_allowed__event_sequence(self): """Ensure a sequence of blocked event types can be unblocked/allowed.""" event_types = [ pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION, pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP, ] pygame.event.set_blocked(event_types) pygame.event.set_allowed(event_types) for etype in event_types: self.assertFalse(pygame.event.get_blocked(etype)) def test_set_allowed_all(self): """Ensure all events can be unblocked/allowed at once.""" pygame.event.set_blocked(None) for e in EVENT_TYPES: self.assertTrue(pygame.event.get_blocked(e)) pygame.event.set_allowed(None) for e in EVENT_TYPES: self.assertFalse(pygame.event.get_blocked(e)) def test_pump(self): """Ensure pump() functions properly.""" pygame.event.pump() # @unittest.skipIf( # os.environ.get("SDL_VIDEODRIVER") == "dummy", # 'requires the SDL_VIDEODRIVER to be a non "dummy" value', # ) # Fails on SDL 2.0.18 @unittest.skip("flaky test, and broken on 2.0.18 windows") def test_set_grab__and_get_symmetric(self): """Ensure event grabbing can be enabled and disabled. WARNING: Moving the mouse off the display during this test can cause it to fail. """ surf = pygame.display.set_mode((10, 10)) pygame.event.set_grab(True) self.assertTrue(pygame.event.get_grab()) pygame.event.set_grab(False) self.assertFalse(pygame.event.get_grab()) def test_get_blocked(self): """Ensure an event's blocked state can be retrieved.""" # Test each event is not blocked. pygame.event.set_allowed(None) for etype in EVENT_TYPES: blocked = pygame.event.get_blocked(etype) self.assertFalse(blocked) # Test each event type is blocked. pygame.event.set_blocked(None) for etype in EVENT_TYPES: blocked = pygame.event.get_blocked(etype) self.assertTrue(blocked) def test_get_blocked__event_sequence(self): """Ensure get_blocked() can handle a sequence of event types.""" event_types = [ pygame.KEYDOWN, pygame.KEYUP, pygame.MOUSEMOTION, pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP, pygame.WINDOWMINIMIZED, pygame.USEREVENT, ] # Test no event types in the list are blocked. blocked = pygame.event.get_blocked(event_types) self.assertFalse(blocked) # Test when 1 event type in the list is blocked. pygame.event.set_blocked(event_types[2]) blocked = pygame.event.get_blocked(event_types) self.assertTrue(blocked) # Test all event types in the list are blocked. pygame.event.set_blocked(event_types) blocked = pygame.event.get_blocked(event_types) self.assertTrue(blocked) # @unittest.skipIf( # os.environ.get("SDL_VIDEODRIVER") == "dummy", # 'requires the SDL_VIDEODRIVER to be a non "dummy" value', # ) # Fails on SDL 2.0.18 @unittest.skip("flaky test, and broken on 2.0.18 windows") def test_get_grab(self): """Ensure get_grab() works as expected""" surf = pygame.display.set_mode((10, 10)) # Test 5 times for i in range(5): pygame.event.set_grab(i % 2) self.assertEqual(pygame.event.get_grab(), i % 2) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", "requires the SDL_VIDEODRIVER to be a non dummy value", ) @unittest.skipIf(pygame.get_sdl_version() < (2, 0, 16), "Needs at least SDL 2.0.16") def test_set_keyboard_grab_and_get_keyboard_grab(self): """Ensure set_keyboard_grab() and get_keyboard_grab() work as expected""" surf = pygame.display.set_mode((10, 10)) pygame.event.set_keyboard_grab(True) self.assertTrue(pygame.event.get_keyboard_grab()) pygame.event.set_keyboard_grab(False) self.assertFalse(pygame.event.get_keyboard_grab()) def test_poll(self): """Ensure poll() works as expected""" pygame.event.clear() ev = pygame.event.poll() # poll() on empty queue should return NOEVENT self.assertEqual(ev.type, pygame.NOEVENT) # test poll returns stuff in same order e1 = pygame.event.Event(pygame.USEREVENT) e2 = pygame.event.Event(pygame.KEYDOWN, key=pygame.K_a) e3 = pygame.event.Event(pygame.KEYUP, key=pygame.K_a) pygame.event.post(e1) pygame.event.post(e2) pygame.event.post(e3) self.assertEqual(pygame.event.poll().type, e1.type) self.assertEqual(pygame.event.poll().type, e2.type) self.assertEqual(pygame.event.poll().type, e3.type) self.assertEqual(pygame.event.poll().type, pygame.NOEVENT) class EventModuleTestsWithTiming(unittest.TestCase): __tags__ = ["timing"] def setUp(self): pygame.display.init() pygame.event.clear() # flush events def tearDown(self): pygame.event.clear() # flush events pygame.display.quit() def test_event_wait(self): """Ensure wait() waits for an event on the queue.""" # Test case without timeout. event = pygame.event.Event(EVENT_TYPES[0], **EVENT_TEST_PARAMS[EVENT_TYPES[0]]) pygame.event.post(event) wait_event = pygame.event.wait() self.assertEqual(wait_event.type, event.type) # Test case with timeout and no event in the queue. wait_event = pygame.event.wait(100) self.assertEqual(wait_event.type, pygame.NOEVENT) # Test case with timeout and an event in the queue. event = pygame.event.Event(EVENT_TYPES[0], **EVENT_TEST_PARAMS[EVENT_TYPES[0]]) pygame.event.post(event) wait_event = pygame.event.wait(100) self.assertEqual(wait_event.type, event.type) # test wait with timeout waits for the correct duration pygame.time.set_timer(pygame.USEREVENT, 50, 3) for wait_time, expected_type, expected_time in ( (60, pygame.USEREVENT, 50), (65, pygame.USEREVENT, 50), (20, pygame.NOEVENT, 20), (45, pygame.USEREVENT, 30), (70, pygame.NOEVENT, 70), ): start_time = time.perf_counter() self.assertEqual(pygame.event.wait(wait_time).type, expected_type) self.assertAlmostEqual( time.perf_counter() - start_time, expected_time / 1000, delta=0.01 ) # test wait without timeout waits for the full duration pygame.time.set_timer(pygame.USEREVENT, 100, 1) start_time = time.perf_counter() self.assertEqual(pygame.event.wait().type, pygame.USEREVENT) self.assertAlmostEqual(time.perf_counter() - start_time, 0.1, delta=0.01) # test wait returns no event if event is arriving later pygame.time.set_timer(pygame.USEREVENT, 50, 1) self.assertEqual(pygame.event.wait(40).type, pygame.NOEVENT) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9851258 pygame-2.6.1/test/fixtures/0000755000175100001770000000000014676242436015255 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0681257 pygame-2.6.1/test/fixtures/fonts/0000755000175100001770000000000014676242436016406 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.022112 pygame-2.6.1/test/fixtures/fonts/A_PyGameMono-8.png0000644000175100001770000000013414676242340021524 0ustar00runnerdockerPNG  IHDR^PLTEٟIDATchgBf0Y "IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PlayfairDisplaySemibold.ttf0000644000175100001770000071613414676242340023707 0ustar00runnerdocker GDEF|Zr\GPOSs\GSUBFDOS/2PO*4`STAT$6cmapAIN*hcvt (@fpgm61gasprTglyf,vhead6hheac*$hmtxzw%locaũ8 maxp namepAnpostT`qG+TprepZ@<*@'gW_O+A!!!Fr8$(A@>LK Ig>Ma?N%%%(%(&BB +A&&#"566'7&&#"56672!7a#I&,L3.* <'+ c $3aBG*4PZ&&fE&&f5+G&&fE&&f5+e&&f"5+*&&f Y5+&p&s&&sܰ5+G&&s&&sܰ5+l&&s"P5+p&&s Yܰ5+&G&&&"L&!}D&%&& Y?IMUf@ 9L IK PX@Lr  ~   ~    g@M  _ >Mb?N@M  ~   ~    g@M  _ >Mb?NY@:VVNNJJVfVfcba`]\NUNTRPJMJMLKICBA81,+(%B +A&&#"5667#.##"3326673&&#""5>54&&'52326#7!01#0417#.#52667u31%  Z0%+ ! ! 9(20y0]h/ !!1ma+o  !## d.$#@'H# AL #%$$ $UH1L( $$%# t35536")6$l%>?@< KIg_>M_?N'&9642.,&>'>mp +S32632#"&#"5>54&&'!"32654&##041326654&$N'1Xvu%QAXg,|Z@)N!! !!)+RIO[[V383XE#F87K)[g $$%# "44[TMT-K+JK.4I@F~>MaDM?MaEN.,'&#" 44 +A2673#.'&&#"32676673#&&#"&&5466BU!K)4M35O4%N!%SAfUX'+&nZ-=,7_~GI}]4SE^s'+'Vrp^.&%.&.D&$#.&.&$+ IK PX@_>M_?NK PX@$rp_>M`?N@_>M_?NYY@&$++  +A2#"&#"5>54&&'5766"326654&M[{X")N!! !!N'$Z..]i+mijmZ $$%# "4 4"Om &  5+$& w !$C8@QK PX@? r  ~   i_>M AM`?NKPX@@   ~   i_>M AM`?N@B    ~  ~   i_>M`?NYY@$AA99AQAQNMLKHG9@9?=;82u73 +A#.##"3326673&&#""5>54&&'5232601#0417#.#52667/$=17 93E* 32 ly5!! !!5yl .us-**+)M# EO! ! ! &WL1P+ $$%# 9<<9"=%,>$C&$$C&$X$C&$b$C&$e$C&$&eܰ5+$GC&$'o°5+$C&$&e|ܰ5+$pl&$&e"A5+$Cp&$&e Kܰ5+$C&${$C&$$GC&$$C&$|$C&$"$CL&$!o$DN&$%{$C&$ K,18Q@N&%L~~_>M?MaEN83(#$* +A'#"&'&&#"#>53326654&'5#"#6654&'326* 7X5D{R;U ,TA9G"aM5N0 53A$7M6;^5  >cLBnC2R.V`%VL(P+,1&6U$/-5FIK PX@:    p     j_ >Ma?N@;    ~     j_ >Ma?NY@#66..6F6FCBA@=<.5.420-'B3 +A#.##"&&#"5>54&&'5232601#0417#.#52667/ &@5+ .+\1*N!! !!5yl .ui-**++P(KW% ! &&  $$%# 9<<9"=%,>/Bb@_~   i>Ma DM ?M a E N=;6532/.-&%$ BB +A23273#&&'&&#"326766554&&'53267#&&#"#"&5466CT# "O(5O5if)  +*7='@#O/Z' =&nZ6V7_}G b,+8( s]/&9)/&9/&9/&9/&9# /&9/BFK PX@H~  r i  g>MaDM ?M a E N@I~   i  g>MaDM ?M a E NY@'CCCFCFED=;6532/.-&%$ BB +A23273#&&'&&#"326766554&&'53267#&&#"#"&54665!CT# "O(5O5if)  +*7='@#O/ZkC' =&nZ6V7_}G z,+8( s]$!CGJ@G>"I  g _>M a ?NDDDGDGFEC?=<54aBa +a5>54&&'53267&&#"5>54&&'53267&&#"5!!! !!P(,M ! ! M,(P?!! !!N-(N ! ! N(-N $$%#  #%$$  $$%#  #%$$ X$&A7$&A$&A$G!.@+ I_>Ma?N!B +A&&#"5>54&&'5326G ! ! N(-N!! !!N-(N #%$$  $$%# $D&ERd$k&Eg&E&Eq&E$G&EU°5+$GG&EUG&E$G&E"xL&E!$DL&E%y&E DB'@$_>MaINa +G5>54&&'53267); " M**Q!!  ~(`S%%#  #%)`Z"F]D&R$(JY@V LJ:4 Ii _ >M a?N)))J)EDC<;BA\ +A7&&#"566''.'5667766&'532%&&#"5>54&&'5326!D$-"P!9+(*B!G%"("@&: ! ! N(-N!! !!N-(N&+H  ('Y,>" #%$$  $$%# $&T$&T#$C,2@/_>M`?N,'u7 +A3326673&&#""5>54&&'5326K"# 94H,32 ly5!! !!N-)P #% ! 2^C!5R, $$%# $C&Wg$C&W=h$C&W#$C&WRby 5+C&W?%h@G@D:'! L _  >Ma?M?N@;82BB +A&&#"5>5#&&#"5>54&&'5326722326h " ! P)-O"#  )*<1!! !!1%F!)P #%$$  $$ t052,%# (%3?@<( L_ >Ma?M?N3.aB$ +A&"&&#"5>54&&'532674&&'5326 "  S )*<1!! !!1,w (+=11-GP052,%#  _14%&^(%&^%&^#$D4O@  )  F LKPX@3    r_ >Ma?M bIN@4     _ >Ma?M bINY@OMJHA?;94/aB +A&"&&#"5>54&&'532674&&'5326#"&54632326502 !  R #"01!! !!10o #"11>$@,+@'& <4 #%G&$$  $$%# }%# kq)"(!!ng%&^ .-@*aDMaEN  +A2#"&&5466"326654&&fUWdfUX`;W06\7;W06[Vsp^Vrp^ZhjUZgkU.&d1.&d.&d.&d'1ܰ5+.G&d'".&d'ܰ5+.l&d'"5+.p&d' ܰ5+.&d.G&d".&d.&d".e#3E@BLaDMa>MaEN%$-+$3%3##( +A67&&54632'2#"&&5466"326654&&@T" $$!S7zfUWdfUX`;W06\7;W06[ (&%.*Vsp^Vrp^ZhjUZgkU.&q1.Ge&q".&q.&q".&q .&d.L&d!. &d.&y1.&d .8IM^FK PX@Sr p   ~  jaDM_>M`?M aENK PX@T p   ~  jaDM_>M`?M aEN@U  ~   ~  jaDM_>M`?M aENYY@3NNJJ:9N^N^[ZYXUTJMJMLKB@9I:I20.(#"88 +A23267#.##"3326673&&#""#"&&5466"326654&&#57#.#52667/)D&+n,7, " " 0?%0z/&C+eTW_:U/5Z66%%9o&(($ 'H# AL #%$$ $UH1L(Vrp^ZhjU*!&*t35536")6$V12@/'!Ig_>Ma?NB%!&p +S32632##5326654&#"&&#"5>54&&'$N'1X@oVdZ?C>L).+\1*N!! !!nW$OC*6X3_^"4&&  $$%# $G<P@M,&I gg _  >Ma?N<765.-+'%$  +A2##041326654&#"#'267&&#"5>54&&'5326>@oV`V?CAQL/V ! ! N(-N!! !!N-(N5hY)QC'7\5Y] #%$$  $$%# .D'7GR@O!Li aDMaEMaIN98)(A?8G9G1/(7)7-#(& +e#"&&'&&'#"&5432>77662#"&&5466"326654&& !B-6gk= ,6#(%59'.-Ayi*ALfUWdfUX`;W06\7;W06[2H"2   (Vsp^Vrp^ZhjUZgkU$1MU@RA@'! Lr g_>M a?M  a E NMKEC><B%!&p +S32632##5326654&#"&&#"5>54&&'7267#"&''.##$N'1X@oV`V?C>L) ! N(-N!! !!/?-SO   8+0B $#l^P!E:%-K.OW"4$$  $$%# =>g)# -?d*@$$&$&d$&#9 ?Z@W  ~a DM_>M?M aEN31.-)('%"  ?? +A23273#.#"#"&'&#"#>5332654&'.54668< 'G71A*M51N-@l@;E %M@4JTD/R1cL@oD;<=R*>O8>O&9 &9 &L9D &$9 &O9 &# BT@Q&%:LaDM_?MaEN<;9210*( BB +A2#"&'&&54632326654&'&&#""&&#"5>546L{/Fd5CvN%0(&  " *?#pf85U4 +#30!! )"=T5<_6 -!)' %-R5aw .sk2# $$ -0K@HLg>MaDMaEN*("! 00 +E"&&7!!3267'6654.#"#4&'37>32`URp'R;I^ 'DV0%L!6N9fWUBkJ}J YS(R>Zn&. UwvVr19@6I_>Ma?N1*$B# +A#.##&&#"5>5#"#6654&'23226r(A5 .,`24[+.!4B( ,jj,+jj.W(P[()(  ():([P(W.r&GWL@ 5+r&qDr&$r&#8-@*_>MaEN83'a) +A#"&'.54&&'53267326654&&'5326 ! cG0]## !!N-)P"# >;IP )(=11-Cj'*3B]A:%#  #%Cb6BvK14&&&&&G&&&"gDH@E-'>&"La>Ma EN=<53+(%# DD +E"&'.54&&'5326732665"&'73267&&546327`0]## !!N-)P"# >;IP 3$ <!$$$2 cB]A:%#  #%Cb6BvK  (&%,mCj'*3&Gg&&&"& w&L&!D&%&°5+& w'/@,L_>M?N'"aU +A"&#"#&&'5326764&'53260  #K$,M1,)!;%14s%4'CN"(C@@=*10/L_ >M?N)))C)>=<83(#fU +A"&#"#&&'532676&&'5326%"&#"#&&'53260   E"*J" x,)!;%K   %J#%>05z" #%E {DN!#: s%&&&+&,1CP@M37.LK2J- I_ >M_?NC?>=,'&%X +A"&&#"526'&&'532601.#"56670&176&'532/C#,X.yF$+P2 m&/+:8;"B" >k8>D; F5F# 8/@6&LG_#7I@F76$L0*I_>Ma?N21/+)(#e +A#&3267"766&'5326&&#"5>55_,% 5(\(( r!-)!;% ! P(+O!! L13#BJ$$  $$>_&_&o_&G_&_&_&"_& U(*'@@=L~_>M`?N'""e" +A32>73&&#"5#"#6654&'326*'A4"77>=j5N0 53Ag/P:!5P+%VL(P+(*&(*&U(*&°5+$D&E&g'Rl.&&A%&^&D.&d&M9 &&(*&& 7CY@V<;5./LaGMa?Ma?N988C9C31,*" 77 +W"&54>554&&#"#"&546766323267#"&'72675B<(?F>(%.)!"N.,D   0"9&L* 23%'D4*7"I ) &#*%D1 3!-'82,+( =& &( &&(°5+ G&&( &&(e°5+ &&(q°5+ &&((°5+ .&, .&6 /&&65+ G.&&6 0&&6]5+ C&&65+ &&6 5+ &= G& >&f ;&r &G D& &|  &) +7\m@j'YX0/Lg aGM a ?M a EN98-,VTKIFEDCA?8\9\,7-7" ++ +W"&54>554&&#"#"&546766327267'"&&546632!'36&&#"3267B<(?F>(%.)!"N.,D^<=!034%'E@_54cES_"2%: ? /HD4*7"I ) &#*%D2478 (2,+(?:vYV~Djt1S2Ye EZ*#4#E,.L@I "L*J!Ia@MaGMaEN-+)(  +A2#"&'332654&&#"'66''6654326bNi>h=+O9;:,!'AY^,&' &Bc}9%({Tg/B=BH  f-+(*=@:LaGMaEN$" ** +A2#"&5467&&#"3267#"&&5466%?('" &0#'>#L 1N8@h=>o-!($& =Y:Q^'$5#F.;xYX{B(=&(.&7(D&(.&A(&)=0S@P&% LJa@MaGMa?MaEN*(#!00"" +A3&#"43262&&#"3267#"&&5466&%B' &B,F 06A1"$: H;<]3B..2o[Zn35qdmNGaH)&<)G&($;@8LgaGMaEN $$ +A2!'36&&#"3267#"&&5466Xd#&8(@"#I 3P6Dh:=ljt1S2Ye EZ*#4#E,&y(;&(&Z(D&( &<' 5+K #aK PX@$ri_AMaCN@%i_AMaCNY@ #b +w2>54&&'#"&'3>33DP0O`0FvH1R1!1j6-a-'A)J@F:W9#A\90@$B[GAK!K.&&4O@LLa @M_ AM_?N/.-,)('!  44 +A2#"&5467&&#"3#3&&#"5265#5346766!1%' kk5-Z3$H%HH E $&## BCEw1!*Y]"D*6BT@RQD LKKPX@4  iaGM aGMa?Ma IN@2  iiaGM aGMa INY@#87,+NLHF><7B8B20+6,6%" ** +W"&&5467326654&##"&&5467332"&54632'2654&#"7'6632#"&&7;`886OB-L.-CB%=$@D ',qLi>}XRmmRQnnQ####D&!  '&+! 2  &+/2%*$ '?  ;E0S3MRSLLSRM=PP==PP=%3 1%$D=&D&D.&"D.&,D+&S9 95+D&D>.:FX@VU H " L!KKPX@=i g aGM a GMa?Ma IN@;ii g aGM a GMa INY@*<;0/RPLJB@;F ;`886OB-L.-CB%=$@D ',qLi>}XRmmRQnnQ####D&!  '&Cy+! 2  &+/2%*$ '?  ;E0S3MRSLLSRM=PP==PP=%3 1%$L9?@<L5 J a @MaGM_?N86a&a# +S66323&&#"52654&&#"3&&#"52654326Y4)4%J$$F  0AC$$M%' &B8.<3**/+M=**:-+ L&L(&S 5+L&N@@5+ &3 &@#JaAM_?N"a +S3&&#"52654326%J&%L%' %CM**:.+ =&BR&P.&N& &9G &;  >&/;& D<HT@8+& LKPX@6r  a  @MaAMaEMbIN@7  a  @MaAMaEMbINY@JI>=PNITJTDB=H>H"&"%'$$ +A#"&54632232655#"&'&&5543267326554326%2#"&546!2#"&546$[S2=%"( .$S;'5' %C 1=' %C%--%$..S%--%$..VUJ "!1-+h*O:-+(!!((!!((!!((!!(*?@<L_>MaAM_?N  +A!53&&#"52654326*%J&%L%' %CM**:.+D/&2&NK &D&+D*@' JaAMaIN" +G5665432675;( &B 'RSQ-+UPr& DF.&:BQ@N3L#KJ$Ia@M _ AM_?NA<^"a +S3&&#"526543267&&#"526''&�&'53266"F$%M%' &B`8c  8"G h!K!+"B)%N**:-+!g K!.: &S5+:&A&?L@IL K;'J Ia AM_?N><aQ[ +A&&#"526''&򊗸&'5326%3&&#"52654326%)u7"D x  &f+7*"F$%L%' %Cr& M**;-+&@#Ja@M_?N"a +S3&&#"52654326%I&%M%( &BN**:-+I&F225+&<&-&R5+>&@v:[K PX@ 72 Y8LK PX@ 72 Y8L@ 72 Y8LYYK PX@-a GM a AM _ ?NK PX@*a GM a AM _ ?N@-a GM a AM _ ?NYY@)<;VTNMLFED;[<[5310+*)#"! :: +A23&&#"52654&&#"3&&#"52654326766!23&&#"52654&&#"'66z'5#H"$C2A"%L%' %CT^'5%K#$C .@Z?0**/+$?'**;-+d70?0**/+R:H>.S9K PX@ 61 7LK PX@ 61 7L@ 61 7LYYK PX@&a GM a AM_?NK PX@$a GM a AM_?N@&a GM a AM_?NYY@420/*)("!  99 +A23&&#"52654&&#"3&&#"52654326766*3%K#%F  1@ D#%L%' %CX<3**/+O;**;-+d9.S=&S&S} 5+S.&dS&DIY@VFAGLa GMaAM_?MaINDB@?:98210+) II +A2#".54632667667>54&&#"3&&#"52654326766*3#H6& $"' 1@ D#%L%' %CX<3Mt'#  %+*N;**;-+d9-S &`)-@*aGMaEN  +A2#"&&5466"32654&Ek??kEEl>>lE/;;/.<<7xbbx66xbbx7wvvw)=&&)&&B).&&P)/&&&P5+)G.&&&P)0&&&Pw5+)^&&&P95+)&&&P:5+)&&W)G&&)>&&);&&)6#/oLKPX@!aGMAMaEN@$aGMaENY@%$+)$/%/##( +A'667&&54632'2#"&&5466"32654&#3  @Ek??kEEl>>lE/;;/.<<  #%' 07xbbx66xbbx7wvvw)6=&3)G6&3)6>&3)6;&3)6 &3C);&&|)&&a)M&&)=&;) &&C)@[@X54Lg a  GMa EMa EN:820'%"! @@  +A2#"&&5466"32654&%2!'36&&#"3267#"&&5466:[44[:Ai;;iA)77),88U` #4)?" A 0J1>]45^7wbbx66xbbw7vvuvjt1S2Ye EZ*#4#E,BHK5P@M32$#LJa@Ma GMaEM_CN0.(&!55"a +S3&&#"526543262#"&'7326654&&#"'661+V1#D"' %CMh6fK*A *17+(B[-&-+~|XI ?rKSd-A>BH)K74F@C1LaGMaEM_CN.-,&%$  +A2#&&#"3267#"&&5466%3&&#"5265>3G6 5:2!%; M79^68b-"C#0X+1+'#+|Sh.A=BG:z][y< &-00@ ,'- LK PX@(raGMaAM_?N@)aGMaAM_?NY@*(&% 00 +A2#"&5467&3&&#"526543267>f)' &  020W/'M%' %C '7(!, " 1C1!*;-+h0=&B.&B&BA1;G@DaGMaGM_?MaEN/-*)&% ;; +S273#.#"#"&'&&'&#665332654&'.5466*<"6,)$95I3S2,  8,2<-";%.K 9OB%F/$!-'%K<.A#   \L7S/$+,:!0<)-;1=&F&.&F1D&Fu0.&F1&F~YM]@Z4)E?Lia @Ma?MaENGFDA;910-+!MM +A2#"&&54632326654.'#"&54326654&#"&&#"5265466>ag%;E!U}G;_6"=("#--=#  2(/-);!"'7hQA&C5$ HhA=V-+# '"%  $G55VA-  $Z@EGMG&,Yp50B@?La@M_AM_?N0+''% +s5265#534676632#"&5467&&#"3&&#"%HH E)!1%' 5-Z3$H*Y]" $&## BC1!g3@0 LJ_AMaEN%# +S3#3267#"&'&&5#53566׀&?9"/XX$>r$#)1A@5Q i J@GLJ g_AMaEN  +A!53#3267#"&'&&5#53566Yր'?9"0XX%>r$#)1A@5Q x&N< 5+Dg&Npg&NyA/C@@  L+JaAMa?MaEN"&"%" +A3&#"5#"&'&&5543267326554326&%CW2'5' %C /?' %C\-+d7/>1-+h*O:-+A=&SA&SGA.&SKA.&SUA&S\GA&SA>&SA;&SlCN@K?2-LaAMa?MaEN"&"%"* +A'667&&5463273&#"5#"&'&&5543267326554326#3 !?&%CW2'5' %C /?' %C  $%'\-+d7/>1-+h*O:-+l=&\Gl&\l>&\l;&\l &\HA;&SA&SfDK&SkA&SA &SH$,@)L_AM?N$f% +A&"&3267"76&'5326!   <$E# x [#20)"+^& F@ 2C@@+ '!LAM_AM?N2,$"( +S"&"&326%&"727'76&'5326" b    <$E1#   N$3" *! (!,^iG> =&hE .&h &h >&h 1CM@J>37.&LK2J- IaAM_?NC?,'I +S"&&#"526'&&'532601.#"56670&176&'532  6#I <"D 6(#30+*.q<% 53+yG%:"#"% Q2=D"={@L JKPX@$r_AM?MbIN@%_AM?MbINY@:61/*("R +A&3267"76&'5326#"&&5463232677!" ? %E$ }X$1/)&++&!% .$"+j/&!F@e2  "&)cD=&nD.&n7D&n>D&n)D>&ngD;&nsD &n*! dK PX@#rp_AM`?N@%~_AM`?NY@!c! +A326673&&#"#"#4&'326H'A,-a03j1J)A'-a03j !L@F\!KAG[!=&v!.&v*!&vD?=&&B'4k(?&'S?&' )?&&'1?&F'!?&v'|3[^@[LJB<I@M  _>MaGM _ ?N444[4TNMJHDCA=;:65a&a# +A66323&&#"52654&&#"3&&#"526566!&&#"5>5#"#6654&'23226X4*3%K#%F  0A D#%L%%?T.+`33\,-+6>! ,hj+2wx9-<3**0*M<**C)(  ():&XM(R,(SG]@ LKV,! <;  L    a @M aGM_AM a EMa ENIHPNH]I]A?970.'%GG%# +A3#3267#"&'&&5#5356627#"&5467&&#"3267#"&&5466%24&#".546(A:"/XX$?v,H('! &0#'>" L 1N8@h=>o4G75+D) /"St%"* 1@A5Q )!(&% >Z:P]'$5#F.;xYX{BDP?F2<)<:($&[@6   LK PX@=   a @MaDM _ AM_?N@;   i a @M _ AM_?NY@1('VUTSPONHGFCBA@:81/'[([!  && +A2&&#"3#3&&#"5265#5346766%2#"&5467&&#"3#3&&#"5265#534676696V A152%H%'P'!LLSZ!1$' kk5-Z3$G%HH E20 %1BJAm**6U ( $&## BCEw1!*Y]"Ip@ NMLK PX@@a@M a DM _ AM _ ?N@>  ia@M _ AM _ ?NY@7KJkjihedc]\[XWVURPJpKpDCBA>=<6541/*)("!  II +A2#"&547&&#"326673&&#"52654&##3&&#"5265#53467662&&#"3#3&&#"5265#53467662H-'&.7 %,=0E7!'K'%M%*,&O*)L'!LL%("h%H%'P'!LL Y !!((2"1E4M**;-+m+*?d$$$)$*FO=m**6T!>e@ CBL JK PX@< @M a @M a DM _ AM_?N@:  i @M a @M _ AM_?NY@*@?`_^]ZYXRQPMLKJGE?e@e=;:83210a(a +A3&&#"52654&'&&#"3#3&&#"5265#5346766323262&&#"3#3&&#"5265#5346766t!'K'%M% *&  qq,&O*)L'!LL( R) @%7%I%'P'!LL YM**?  G4Fm+*Jj" !)$*FO=m**6T!qH\@YLa @M _ AM _ ?NCBA@=<;5430.)('!  HH +A2#"&547&&#"326673&&#"52654&##3&&#"5265#5346766u7G-'&.7 &1A 0D7!'K'&L%*,&O**L'!LL%(!h !!((2)"LIM**;-+m+*?c% #q>E@B J @M a @M _ AM_?N=;:83210a(a +A3&&#"52654&'&&#"3#3&&#"5265#534676632326)!'K'&L% )%  qq,&O**L'!LL) R)A&5M**?  G6Dm+*Jj" 1KSoK PX@ Xh" {z LK PX@ Xh" {z L@ Xh" {z LYYK PX@W    a @Ma GMa GM _?M aEM_CNK PX@a    a @Ma GMa GMaEM _?M aEM_CN@W    a @Ma GMa GM _?M aEM_CNYY@-qpUT}xvpq`^ToUoGEBA>=53&$SSa +A3&&#"5265662#"&5467&&#"#"&'&&'&#665332654&'.5466720154&#"6.5462#"&'7326654&&#"'664.[2%G%%>b*D7 #/#: "9"3R2.  6*$-:/!;%0O3H84(=  LMi6gJ)A )17+(BZnD1!*T3&#"-'0<(.A#   \L4T1(%-:"0<(-<DPNLBG+50-0 "3-/<7~|XI ?rKSd-A>BH1/]u@ban,  L  a@M aGM_AMa EM _ ?M a EN_^fd^u_uQOLKHG?=0.'%]]%# +A3#3267#"&'&&5#535662#"&5467&&#"#"&'&&'&#665332654&'.5466%24&#"6.546)A9"0XX$>_*D7 #/#: "9"3R2.  6*$-:/!;%0O3H84(=  Lt%"* 1@A5Q 3&#"-'0<(.A#   \L4T1(%-:"0<(-<DP?F-7.,. #2*/>9o8Tn@kRQC LJ I @Ma@M a GM_AM_?M a E N:9OMHFA?9T:T75%a/ +A'6654&'&&#"3#3&&#"5265#5346766323262#"&'332654&&#"'66,& %#  qq,&O**L'!LL)N)=(4Oi>h=,N9;:,!'AZ  k J4Dm+*Ki"c}9%({Tg/B=BH8_{@=< yxjLJIK PX@N @Ma@M a DMaGM _ AM_?MaEN@L  i @Ma@MaGM _ AM_?MaENY@0a`:9vtomhf`{a{ZYXWTSRLKJGFEDA?9_:_75%a/ +A'6654&'&&#"3#3&&#"5265#5346766323262&&#"3#3&&#"5265#53467662#"&'332654&&#"'66h+& %"  qq,&O*)L'!LL(O(=(5g>+N9;:-!&AY  k K6Am+*Ki"!)$*FO=m**6T!׃c}9%({Tg/B=BH_K PX@dcLJK PX@dc LJ@dcLJYYK PX@N@Ma@MaDM aGM  _ AM _ ?NK PX@I@Ma@MaDMaGM _ AM _ ?NK PX@N@Ma@MaDM aGM  _ AM _ ?N@Li@Ma@M aGM  _ AM _ ?NYYY@4a`~{zysrqnmlkhf`a^\[YTSRQNMLFEDA@?>(a&a# +A66323&&#"52654&&#"3&&#"52654&'&&#"3#3&&#"5265#5346766323262&&#"3#3&&#"5265#5346766hX4)4%J$$F  0AC$$M% %"  qq,&O*)L'!LL(O(=(5%H%'P'!LL Y8.<3**/+M=**? I2Hm+*Ki" )$*FO=m**6T!D~Y@ ^] 2/LK PX@G  a@M a DM _ AM _?MaIN@E    ia@M _ AM _?MaINY@5[Z{zyxutsmlkhgfeb`Z[TSRQNMLFEDA?-+$" YY +A2#"&547&&#"32667#"&'&&5463266766766454&##3&&#"5265#53467662&&#"3#3&&#"5265#53467668G-'&.7 %0A 0E7$I5" $"' *3+V/(L'!LL&'"ge@CBlkLpK JqIK PX@H @M a @M a DM _ AM_?N@F  i @M a @M _ AM_?NY@4@?~yxwr`_^]ZYXRQPMLKJGE?e@e=;:83210a(a +A3&&#"52654&'&&#"3#3&&#"5265#5346766323262&&#"3#3&&#"5265#53467667&&#"526''&�&'53266h$H%%M% %"  qq,&O*)L'!LL(O(=(5(a&a# +A66323&&#"52654&&#"3&&#"52654&'&&#"3#3&&#"5265#534676632326X5)4%K#%E  0A D#%L% %#  qq,&O**L'!LL)N)=(48.<3**/+M=**? K6Am+*Ki"@LX@   LKPX@4a@M a DM _ AM _?N@2   ia@M _ AM _?NY@/NMBATRMXNXHFALBL;:98543-,+(&!  @@ +A2'&&#"326673&&#"52654&##3&&#"5265#53467662#"&546#2#"&546-0? 7**&0D7!'K'&L%*,&P)*L'!LLNO**(()*))-&%0737M**:.+m+*Oa! *))**))*q>>MP@MGLa @M _ AM _?N9876321+*)&$ >> +A2&&#"326673&&#"52654&##3&&#"5265#534676676.'&6#6-) 0D7!'K'&L%*,&O**L'!LL$Em+ *?,&2'ZM**;-+m+*Bg#04H4 )0#(D2Yf@c2/La @M _ AM _?MaINTSRQNMLFEDA?-+$" YY +A2#"&547&&#"32667#"&'&&54632667667>54&##3&&#"5265#5346766u7G-'&.7 &1A 0D7#I6# $"' *2,V/(L'!LL%(!h !!((2)"LIUMt'#  '.-+s/*?c% #>hl@iYEDLIK JJI @M a @M _ AM_ ?Ngba`XWRQPK=;:83210a(a +A3&&#"52654&'&&#"3#3&&#"5265#5346766323267&&#"526''&�&'53266$H&%L% %#  qq,&O**L'!LL)N)=(4Z8b  8#F h"K!+"B)$N**? J5Cm+*Ki"!g K!.uc$(@@=LK Ig6Ma7N%%%(%(&KB +A&&#"566'7&&#"56672!7H"C"-N0,(54( \ c$"0v8B4-uc&+u<&/Uu&&/U+5+Gu<&'/Uu&&/U*u5+u!&&/U5+u&&/U^5+uN&.buV&-du9&&-d+Ұ5+GuV&'-du9&&-d*vҰ5+)&&-de5+u>&&-d_2 05+uK&(yGuc&uc&*vu&\^5+u&0kDuc&3ue&5uN&6D7HLTeK PX@ 'LC=IK PX@ 'LC=IKPX@ ' KC=IKPX@ 'LC=I@ ' KC=IYYYYK PX@[  rr  ~  p    g`6Mb7M a7NK PX@L  r  ~   ~    g_6M b7NK PX@M    ~   ~    g_6M b7NKPX@T    ~   ~      g_6Mb7NKPX@]  r  ~   ~    g`6Mb7M a7N@T    ~   ~      g_6Mb7NYYYYY@7UUMMII88UeUeba`_\[MTMSQOILILKJ8H8HEDB><;71u73 +A#.##"3326673&&#""5>54&&'52326%&&#"5667#7!01#0417#.#52667-&% /.1.s.Ze. !!0j])i31% !P  "" `"A':C #%t$$ !MA-G% $$%# 5.$"?f....."0%U`$=@ KIK PX@&rg_6M_7NKPX@ g_6M_7NKPX@&rg_6M_7N@ g_6M_7NYYY@&%8531-+%=&=lp +S32632#"&#"5>54&&'!"32654&##041326654&%H$/XsnK[T`&zY>&H!! !  ##PIGQ]L041`J?/L 0B%KY $$%$ "4t4KFDI#=%?B.Un/I@F~6Ma8M7Ma9N)'"! // +A273#&&'&&#"32676673#&&#"&&5466h54&&'5766"326654&JQn6;%I!! ! H$%_))S]%^`^N $$%$ "4p4"C^`&%N&.v`%,`5=NK PX@Lr r  ~  pr   i`6M`7NK PX@A r  ~  ~   i_6M`7NKPX@B    ~  ~   i_6M`7NKPX@Nr    ~  ~r   i`6M`7N@B    ~  ~   i_6M`7NYYYY@$>>66>N>NKJIHED6=6<:85/u72 +A#&&##"332673&&#""5>54&&'5232601#0417#.#52667 D?1 5GK1z0gs3!! ! 3sg,oi'##&`"A'WD \ Mb-G% $$%# j.22.0$2%,c&+%,<&/M%,N&.Z%,V&-\%,9&&-\+Ұ5+%G,V&'-\%,9&&-\*nҰ5+%)&&-\]5+%,>&&-\W2 05+%,K&(q%,N&)%G,`&%,c&*n%,&\^5+%,&0c%D/`&3[%,h&W\^5+7n0K@HLg6Ma8Ma9N*("! 00 +E"&&7!!3267'6654.#"#4&'37>32jURp'R;I^ 'DV0%L!6N9fWU8uZ=e=m{ LmG"R>Zn&. IgfJ,1`7Q@N%$L~~_6M7Ma9N72'#$* +A'#"&'&&#"#>5332654&'57#"#6654&'326* 9X3DzQ=U +VCOObL5N0 53A`$.@,3Q0  >cLCoAV=HR%VL(P+,1N&.W%`+3DIK PX@@r r  ~     i` 6Ma7NK PX@: r  ~     i_ 6Ma7NKPX@;    ~     i_ 6Ma7NKPX@Ar    ~     i` 6Ma7N@;    ~     i_ 6Ma7NYYYY@#44,,4D4DA@?>;:,3,20.+%B2 +A#&&##"&&#"5>54&&'5232601#0417#.#52667 D?1 .*[/-O!! " 3sg,oi'##&`"A'WD l%% $$%# j.22.0$2.n>KPX@6 i6Ma 8M 7M7M a 9 N@9   i6Ma 8M7M a 9 NY@9731/.+*)#"! >> +A2673#&&'&&#"326766554&&'53267#&&#"#"&5466xBJ B4`pje  *)Y%&>  O0Un'. \L!=*[)(8   fP.c&+.<&/.N&..V&-.n&1.N&)".n>BKPX@? i  g6Ma 8M 7M7M a 9 N@B   i  g6Ma 8M7M a 9 NY@%???B?BA@9731/.+*)#"! >> +A2673#&&'&&#"326766554&&'53267#&&#"#"&54665!xBJ B4`pje  *)Y%&>  O0UVCn'. \L!=*u)(8   fP$%`GJ@G$ I  g  _  6Ma7NGBA@<;765/BB +A&&#"5>55!&&#"5>54&&'53267!54&&'5326!! !!J+(Q!! !!P)+J!! ! J+)P!!  ! Q(+J` #%t$$  $$$$  $$%#  #%%# `&8%N&.%V&-%D`!.@+ I_6Ma7N!B +A&&#"5>54&&'5326D!! !!N&,O!! " O,&N` #%t$$  $$%# %Zc&+ <&/V&-nK&(%DN&)R%GD`&QDc&*%L&'\^5+%E`&[s&0%DH`&3sN&6E=`13@0Le_6N1,''* +A#"&'&&546323267>54&&'5326= "  r[.&%)   " J+)P` #%)`Z"E] "  "0J:%# EsV&-%`'IY@V LJ93 Ii _ 6M a7N(((I(DCB;:BA\ +A7&&#"566''&&'5667766&'532%&&#"5>54&&'5326#;%= L A/2 '$*E*Q%#!G&2!! !!N&-M!! " M-&N`#$G  (R1 #%t$$  $$%# %N&.%`&1 %,`+K PX@&r_6M_7NKPX@ _6M_7NKPX@&r_6M_7N@ _6M_7NYYY@+&u7 +A332673&&#""5>54&&'5326D!! /?Y1z0gs3!! ! O-&L` #%l ! Vk 2K( $$%# %,c&+%,f&>8%,`&1%,`&RU0 25+.U&4%&4-.&459&40&K4,`&A"E`?G@D9&  L _  6Ma7M7N?:71BB +A&&#"5>5#&&#"5>54&&'5326722326E"# #"N(/T"# **;1!! #"L&,((N` #%t$$  $$%`(--(v%# I %`3?@<( L_ 6Ma7M7N3.aB$ +A&"&&#"5>54&&'532674&&'5326 "  p**;1!! !!1:?+*=1`,)(--(v%# d),%c&+%N&.%`&1%D`9T@ .  K LKPX@0    r  f_ 6Ma7N@1      f_ 6Ma7NY@TROMFD@>9432-'&% +A"&&#"5>54&&'532674&&'5326#"&54632326502!! p #"01!! " 19? #"10=%@+,?&& <5` #%3>>3i$$  $$%# d2%# kq)"(!!ng%N&6z.n-@*a8Ma9N  +A2#"&&5466"326654&&vbRT`bRT\8S-3W58S-4VnIdaQIcaQMY[IMX\I.c&+.<&/.V&-.9&'-+Ұ5+.GV&'-.9&'-*Ұ5+.)&'-5+.>&'-2 05+.K&(.Gn&.c&*.&\^5+.#3E@BLa8Ma6Ma9N%$-+$3%3##( +A67&&54632'2#"&&5466"326654&&@T" $$!S7rbRT`bRT\8S-3W58S-4VZ (&%.*IdaQIcaQMY[IMX\I.c& +.G& .c& *.& \^5+.h& \^5+.w&,.&0.& .c&+.N&6/n7HL]K PX@Rr p  p  ja8M_6M`7M a9NK PX@Sr p   ~  ja8M_6M`7M a9NKPX@T p   ~  ja8M_6M`7M a9N@U  ~   ~  ja8M_6M`7M a9NYYY@3MMII98M]M]ZYXWTSILILKJA?8H9H1/-&!  77 +A23267#&&##"332673&&#""#"&&5466"326654&&#57#.#52667m-@%*l+ >8 #F? /w/PZ,(cKP[5N+0S25%$9V"!" n"A'WD #%t$$ Mb-G%IcaQJ]_E-$&,f....."0%?`32@/)#Ii_6Ma7NB%2&p +S32632##041326654&#"&&#"5>54&&'%H$3\}x>kRVL54&&'5326Bz{>kRVL7@.7/V!! !!N&,O!! ! O,&N]J D:$-K+v #%t$$  $$%# /D9n$4DP@MLie a8Ma9N65&%><5D6D.,%4&4#%%+ +e23267#"&&'#"&5432>2#"&&5466"326654&&.@.AE)JDDGiVD>,6#(%59 bRT`bRT\8S-3W58S-4V!  $JO)5  nIdaQIcaQMY[IMX\I%`2M\@YBA (" Lr   g_6M a7M  a 9 NMKFD?=1B%2%p +S32632041326654&#"&&#"5>54&&'3267#"&''&&##%H$/X|.tilb8<;I# !!R**H!! ! 69";R   8+88 3,A`TD%M6&C(FJ"4t$$  $$%$ -8Z /!x;"%c&+%N&.u%`&19nAZ@W  ~a 8M_6M7M a9N42/.*)(&"  AA +A23273#.#"#"&'&&#"#>53326654&'.54663= ,I53@+H-2T3>iB6F ,R@5"MD1U4;bn,.K>6S10%"1,:H18L& ,8ZE@d9+$/=%;J16F$9c&+u9N&.K9Dn&29V&-M9n&1 nBT@Q&%:La8M_7Ma9N<;9210*( BB +A2#"&'&&54632326654&'7&&#""&&#"5>5546Lz05U05#"#6654&'23226e #<2*,*;@A7*,*2<# +fg*+gh`'H.HT%+((((%TH-H'e`&# ϰ5+eN&#.nDe`&#2e`&#1`8-@*_6Ma9N83'a) +A#"&'.554&&'532673266554&&'5326"# ]<1W"!$ " M,(N " >@CJ((=3`1-Cb%%.g==kC14c&(+<&(/sN&(.V&(-K&((G`&(c&(*&(\^5+D@ -'>&"LK PX@)a6Ma6Ma 9NKPX@a6Ma 9NKPX@)a6Ma6Ma 9N@a6Ma 9NYYY@=<53+(%# DD +E"&'.554&&'5326732665"&'73267&&546327\1W"!$ " M,(N " >@CJ2$< #$$2 ]g==kCN  (&%,Cb%%.c&1+G&1c&1*&1\^5+h&1}\^5+w&(,&(0D`&(3e&(5N&(6bu`$-@*LJ_6M7NQa% +A&"&&'5326766&'5326u( "D!-O/*'A'` 55$%"0/BM#`$;=@:,+LJ_ 6M7N%%%;%6'Qa% +A&"&&'5326764&'5326%&"&&'5326,  #C!,M/g(%53( #D!+J`56$$"0$GP"$.MU%c&=++V&=-K&=(c&=* y`2DO@L48/LK3J I_ 6M_7ND@?>.'&%X +A"&&#"526'&&'532601.#"56670&176&'532*[A ,W*A 3Pq(&42'B8c&6D3`  4 4*~.FG`#9@98$L KJ2IK PX@+a6Ma6M_7NKPX@!a6M_7NKPX@+a6Ma6M_7N@!a6M_7NYYY@ qBA +A#&&'53267"766&'5326.#"5>55G%%2'S*& g'%3. '%7<<4%' F`,,{ 8C&%  %&SGc&C+GV&C-\GK&C(qGG`&CGc&C*nG&C\^5+Gh&CW\^5+0`$p@ LK PX@#rp_6M`7N@%~_6M`7NY@$"e" +A32673&&#"5#"#6654&'326 DN53<9GCL767v`Uj#7E%5Qf-B$0c&K+{0N&K.Q0N&K)1h1=u@#=2 LK PX@iaQN@$iYaQY@<:*(! 11 +S2327#"&'#"&546766554&#"#"&546766327LB  5#'> &;H@3!! %!:DgBF&3 +A#.##"326654&&#""#'2632#"&#"5>54&&'52326 %54&&'52326 &@5 )&V--N!! !!5yl )h+P(KW% !$$  $$%# $&T$a-^IK PX@p_MaN@_MaNY@--qBE+A&"#"&&#"5>54&&'53632667 .d2"# )&V--N!! !!(Y!!O0B' a*A" #%$$  $$%# !G5VuIj JKPX@'  _ MaM_N@ S  _ MaNY@I=<;5%3& +A33#.#!"#654&'!2654&##"#52>76&'5326323266Z"# 0 %?11?$ -3+   )H:.>' 6:+&>+52 #%7%G(@J J@(G%77 %$DPEvP5$C$$C&X}$C&${.Pe@`ts @: LaJi _ M  a M a NffQQ//ff~xvqoigQeQb\[ZYSR/P/KJIBA?;9810.*)("!  +A27267#"&''.##5#5667766&'532%&&#"5>54&&'5326%#'&&'5326#"#"&'73677>3jGoF   8,0A 516 D$S+?!G%")#@&9 ! " O-'N!! !!N'-O(#$G"?+S#E "9&A715  B0+8   GnGy=:*" +A)6K'*('Y,>" #%$$  $$%# ">,Y'(*'6)A+ "*:=&Oh@e!L   iia M _ Ma NKIGFBA><42.-+*%# OO +A2#"&'&&5463232654&&'#"&5432>54&#"#4&&'3327>&az*CN$.]L.2Vk95V , '"H,UZ?0    ),696H' &6QF*B0 .D.2L4+"&$#'`T0Q2 4E'IE:^7?S8 $!(JN@K('L:4 I _ M aN)))J)EDC<;9532+*!B+A&&#"5>54&&'532601'&&#"5>54&&'5326G ! ! N(-N!! !!N-(N+ ! ! P-&O!! !!O&-P #%$$  $$%# :"z #%$$  $$%# $&]:$&]$!;Pp@mL.-  LKJ    i _ MaMa N<<#"=:820+)";#;!B+A&&#"5>54&&'532627267#"&''.##55667766&'5327G ! ! N(-N!! !!N-(NGnG   9,0A 417+A"G$#("A&9" D$ #%$$  $$%# =:*" +A)6('Y,>"'*$'.`J@: L JKPX@)r _ MaMb N@* _ MaMb NY@J>E$(6B +A&&#"5>54&##"#"&5463232>76&'5326323266"# #"R--W'(+   *H:)>/!$% .>' 6:+&>+52 #%$$  $$7 %$FQ,(#* ( FyS5%h]$A.d$@8@5*$ I _  MaN@5B6B +A&&#"5>54&##"&&#"5>54&&'532632326 ! ! P-&O!! 3{3 ! N(-N!! !!N-;t##r:-P #%$$  $$77$$  $$%# $V}.r$>{@ &LKPX@&p_Mb N@'~_Mb NY@<942.,$v +A&&'532267"66&'5326#"&546323267+ ),97 % !.)!;%/  +-4-!) *22B" -.'CJ_  *" % (%&j:]oAY@V1+I   i  iiYaQ  A <;:320,*)"!  +A2#"&&5466"326654&&7&&#"5>54&&'5326†fh„fi`|>D\_}>D9 ! ! N(-N!! !!N-(N@}]ZHB_WE{Y]w: #%|%$  $$%$  "DP@M L4.Ii _ MaN###D#?>=653/-,%$"%' +A"3267#"&'&&554&326%&&#"5>54&&'5326# --,Mj:-G  R('K " " N*1],- !!O-(N !$4  @4!  #%$$  &&%# $V GrLKPX@( _ M_M_N@!S _ M_NY@GBA@6a& +A33#.#*#"&#"5>54&&'53267332654&&'5326 ! 0 %?1"JD#s;-N!! !!N-(N ! 3{3 !!O&-P #%7%G(@J  $$%#  #%77%# $`I@F I _ M _N`[ZYSPJIHBA@:710/)('  +A&&#"#"&&#"#"&#"5>54&&'53267332654&&'5326732654&&'5326!! !!L,-`-=<(_*/^.,L!! !!N-%H 3=3 I$*J 1=3 I$-O #%$$  $$%#  #%77%#  #%77%# $V)f$LKPX@- _ M _M _N@%S _ M _NY@"fa`_YVPONHGF@=765/.-&%#&+A33#.#""#"&&#"#"&#"5>54&&'53267332654&&'53267332654&&'5326 !! 1 $@1$X-=<(_**].,L!! !!N-%H 373 I$*J 173 I$-O #%7%G(@J  $$%#  #%77%#  #%77%# $V@Kt  LKPX@#_ Ma M  N@#  _ Ma NY@KJGFCB@;6a+A&&#"#"&#"5>54&&'53267332654&&'5326"#.# ! ! P-:r##t;-N!! !!N-(N ! 3{3 !!O&-P,="$<, #%$$  $$%#  #%77%# O!K@@K!$R77@4'Ig_M_N72gAF& +A326654&&#"#'2632#"&#"5>54&&'5326S%' (7;@:A'Idx6AjNE,)N!! !!N-,T #%5!0U65#"#654&'3266%' (7;@:A'IKhABjME-(O!! ,3E*:<IL #%5!0U6% $$C&VK"4L($7YP@MIC'Ig _ M a N888Y8TSRKJHDBA:972gAF&+A326654&&#"#'2632#"&#"5>54&&'5326%&&#"5>54&&'5326S%' (7;@:A'Idx6AjNE,)N!! !!N-,Ti ! ! N(-N!! !!N-(N #%5!0U6;542.,+$# !+A2#".5>326654&&#""'26&&#"5>54&##"#"&5463232>76&'5326323266dx65zg /1#.07:C< *)  B."# #"R--W'(+   *H:)>/!$% .>' 6:+&>+523V55\9,O47O,< #%$$  $$7 %$FQ,(#* ( FyS5$!Ceij@g`D>"Iig _ M a Nfffifihgea_^WVUONMFEC?=<543-,+$# !+A2#".7466326654&&#*'265>54&&'53267&&#"5>54&&'53267&&#"5!dx65zg /1#//7:E= )'  B!! !!P(,M ! ! M,(P?!! !!N-(N ! ! N(-Nr1Q12W6*K03J( $$%#  #%$$  $$%#  #%$$ X9 .4Ls@p>= JI L     i  iMa MMa N65GEB@;95L6L.,'&#" 44+A2673#.'&&#"32676673#&&#"&&546623267#".#"'66BU!L)4M35O4%N!%SAfUX/*,+  F,/*,,  H'+#bQ'2&7_~GI}]4SE^s'+'Vrp^!GF GE=4Lr@o= JI L     i  iMa MMa N65GEB@;95L6L/.+*$" 44+A2#"&'&#665332>54.#"#4&'376623267#".#"'66DeQUhAT# M%3P5.J4)S"]/*,,  G*/*,, G[qqY'+#jS:G5]}IG}`6*9-Wj%+'GD!GF$GEq&EDBRY"T]@Z L;5I i  _ M a N###T#MGFCA=<:643/-*)"%'+a5266554&&#"566323&&#"#.##&&#"5>5#"#6654&'23226B +/+Mj9-H  R((J(A5 .,`24[+.!4B( ,jj,+jj !%3  @5! .W(P[()(  ():([P(W.$#El@i5/L ga M  _ M aMa N$$$E$@?>7640.-&%## +A2#"&&5466#5"326654&&%&&#"5>54&&'5326aQS_`QT5O,2S26O+1Rh ! ! N(-N!! !!N-(NVsp^Vrp^TZhjUZgkU #%$$  $$%# 2Na@^A@  L   rg_ M aM  a N333N3NEC><642,2%&B+A&&#"5>54&#"3301#"&&54632326#"#"&'73677667> ! " O-'N!! )L>B?V`p~1X0'Ol!&  @1)9   SO&? #%$$  $$4"VL0M-9Y/R`$@*d?- #)g?9 D,Rk@hPO B   L     i_ MaM a N.-MKFD=;64-R.R,%$3#+A#.##&&#"5>5#"#6654&'232262#"&&5463232654&&#"566r(A5 J&5+.!4B( ,jj,+jjDj>Bl?%H.* &" ;@A=0X j,R(GY+H ():([P(W./_IJ`-0%"&#%  ^`7U1!(R;N@K+I gg _  M_N;654-,*$  +Q5!'326654&&#"#'2632#"&#"5>54&&'53260%' (7;@:A'Idx6AjNE,)N!! !!N-,T #%5!0U6^\RPJHGE>W?W=97621-,$"!**a+A&3267"&'73677>33#"75>53&&#""&''.##532726776&#"#gSEZ'3n+8   GnGC715  B!! " O-'N0A 516BGoF   8h<3}SG`"30 "*:=6)A+ $$ $$ +A)6=:*" ^M+1M@J I g_ MaN1+*)"!  +Q5!#.##"&&#"5>54&&'52326 &@5 )&V--N!! !!5yl )hZj+P(KW% !$$  $$%# V6Ke@FZY& LGJKPX@I  i _  MaMa M_N@A  iS _  MaMa NY@6ffLL77ff}|usrpLeLd^\WUOM7K7HBA@?9861BA+A#5667766&'532%&&#"5>54&&'5326%#'&&'5326#"#"&'73677>3&&'&&''.##53233 D$S+?!G%")#@&9 ! " O-'N!! !!N'-O(#$G"?+S#E "9&A715  B0+8   GnGJ (8,5 516BGoF  '*('Y,>" #%$$  $$%# ">,Y'(*'6)A+ "*:=IM )-)6=:#% %G($V?T@P: LOJKPX@2  i _ M a M_N@+  iS _ M a  NY@$@@@T@TNJIHBA?;9810/)(' !*+E&&'&&''.##53233%5>54&&'53267&&#"5667766&'5327 (8,4 417CGnG   }!! !!N-(N ! ! N(-N+A"G$#("A&9" D$ȪIL )-)6=:#% %G( $$%#  #%$$ e('Y,>"'*$V 0RV@ M1+LKPX@.g _ M aMN@.g _ M aNY@+SSSVSVUTRNLKDCB<;:320,*)"! #+E.#733%5>54&&'53267&&#"5>54&&'53267&&#"5! %?1M0!! !!P(,M ! ! M,(P?!! !!N-(N ! ! N(-NAL g7%G( $$%#  #%$$  $$%#  #%$$ X__';@:(;L4.IK"PX@)r g_ M aN@* g_ M aNY@653/-,'"!   +A!5#&3267"766&'5326&&#"5>557 ,% 5(\(( r!-)!;% ! P(+O!! L13#BJ$$  $$>$n İ5+$R0RVX@ULM1+ Ig _ M a NSSSVSVUTRNLKDCB<;:Ba#+E6&33'5>54&&'53267&&#"5>54&&'53267&&#"5!$;,i.*$ !! !!P(,M ! ! M,(P?!! !!N-(N ! ! N(-NEHg7A= $$%#  #%$$  $$%#  #%$$ X-.#=@:gaMa N##  +S5!2#"&&5466"326654&&p#fUWdfUX`;W06\7;W06[ZxVsp^Vrp^ZhjUZgkU 8.>>@;LJaMaMa N0/86/>0>,&+6+A>32#"&&54>766766766"32>54& 7&6!0@( DM CepJPe/$=(&G6422( 9/?;bJ M]*=qMXx>Fm\h_,eYWm2+G[0|g?F@Crg _ M_N98321*%! ?: +A2'0&1>54&#"326654&##04132#"&#"52654326.pXtw59#= "02?9}e)^P Q+$L%%J#*NC47N3%.?*,"6?2B>)@$*J*+\K PX@r_M_N@ _M_NY@+%aS+A#.#""#"3&&#"526543263 , 4.[2%G%%K##G(I# AM#$1!*I+;&'XK PX@p_M_N@_M_NY@''qa%+A#"3&&#"526543267>7'4.[2%G%%K#F*9"(@#+1!*I+C?c I> JKPX@4 a M a  M_M_N@-S a M a  M_NY@IFECB@5%c +A"3#.#"#"#654&'32654&##"'267667632632326#!12+7E4+2$ " .# , ))#/ $5"H**#@';FE;'@#*J*):wn-"/-AX*((<&d(&PV4j@^  =-K  LL K  ~  _Ma!M  _ MNkk65kk|{ztsrmlfdVUIG?>5j6j,+$"44+A2#"&&5467'6#"&'&&'&&5>7>!2&#"&'5667667>&&'.'#"&546"3&&#"52654326-'%"  $+'E9 #4:;,25 -)- 62(>  =3" 8,7>D0G'%%#! F;2L?'27+J03G., l;?F@C?L _ M _N;654/.-'&% a+A"3&&#"52654326%"3&&#"52654326'l%%K#%E  C$$M  D#%L%%K#$F***I+***I+@ u l&9el<&I5Sj@g  LKi  _  Ma !M _MN666S6NMLGFE?>=87/.-,$"55+A2#"&&546776#"&'.'&&5>7>"3&&#"52654326-'%!  ($F` #5; ;.25 .""H%#K%%M$$F*%  2&0$L%-/126'$<%***J*I='5H@ 9L= JKPX@*r _  M_Mb N@+ _  M_Mb NY@H?E%'5a +A"3&&#"52654&##"#"&&54632232667>76326323265##E('R')  7+)' "# ))$)&3" H**+J*)^C+>#"&## +*kw;*=G@D7%  L _  MaMN=8402B +A&&#"5>5#&#"5>54&&'53272326 F$(L &%(;. .B1%#C !"!"  "!f0&02&%# %[;?Q@N  g _ M _N<<=;654/.-'&% a+A"3&&#"52654326%"3&&#"52654326!5[%%K#%E  C$$M  D#%L%%K#$F***I+***I+)&[:1@. _  M_N:/a5a +A"3&&#"52654&##"3&&#"5265432632326[%%K#%F  I  D#%L%%J$*K-.B+$M***J****J*K(?(!/_K PX@ r_M_N@!_M_NY@/(#a# +A#.##3&&#"5265#"#6654&'323263! &5 #4.W11X.4)!2# gS**T(I# GMx1!1MG #I(DnD&n9"*K5Rx@uPA@,+ LJaMa !M a !Ma  M a  M_N76MKEC><6R7R0.)'" 55Aa+A3&&#"526543262'&&#"3267#"&5466!2#"&'7326654&&#"'66*&M,+O&*'#C0@0452%0 F.Zu6_Uh4cH"9 (-4."6 U---+(.y{Vi0 !]y<}WJ>rMUe- ** m 1>J@G+*Li _ M_N>987/-(& a +A"3&&#"52654326%"3267#"&'&&5543261%%G,+[.4 C$$M  $0T/%7 %K$$E**!1?+*X#2  ;+J*bi@oKPX@) _ M aM _N@"S _ M aNY@@;:941aq# +A"3#.#"#"&#"526543267"332654326[%"0;4#0'-I+%L%%K#$F  I  C$$M**#A';G*I+***I+gWK@HRA;*J _ M _NWSQPKHCB@<:941,+)$#" +A"3&&#"#"&#"#"&#"526543267"3326543267"332654326g%%K!&F)*H G))E(#L%%K##C". A!!C2 A"$L***I+***I+***I+bo^YHB1JKPX@. _ M aM _N@&S _ M aNY@^ZXWROJIGCA@;8Q#+A"3#.#"#"&#"#"&#"526543267"3326543267"332654326g%#);67*H !E+*C(#L%%K##C 1 A!!C2 A"$L**#A! ;G*I+***I+***I+a[:ElKPX@#_ Ma M  N@#  _ Ma NY@EDA@=<:55a+A"3&&#"#"&#"526543267"332654326"#.#[%%K#*E--I+%L%%J$$F  I  C$$M3554***J****J* H;;H  13@0g_M_N1,uAE% +A"326654&#""#'2232#"&#"52654326%!03FQ,*K!tg-hVC'!J# C$$L*"$>n7  ' &8 &&#! 0fRVb($5$F-;wYY|A &,*$%2Hf@c?>L  i  ia !Ma !Ma NGECA<:86-,)(#! 22 +S2#"&'&&54632326654&&#"#4&'3766#"&&#"'6632326Dg')! *'E,#:"6 47  ( #&>uU[~@  '"!! +mcWl3);K .' &, &4N&D M=T@QL9 J  i gi _N<:87210*)(#!  +A!5766323&&#"526554&&#"3&&#"52654326}X4)4%J$$F  0AC$$M%( &B.X8.<3**+M=**:-+-1Ae@b  g a !M_ M_M a N32..;92A3A.1.10/-('&!  +A2#"&&5466"3&&#"52654326#5%"326654&& Cg;;gCBh;;h #I#%L%%K#$Frq++++7wbbx66xbbw7***I+0n^]o00o]^n02K̴AKK PX@/   ri_ M_M   NK PX@5   rrg_ M_M   N@/   ri_ M_M   NYY@333K3K@?><652,AE%a+A"3&&#"52654&#"63"#"&&546632326#"&'5667>7># D#$J# +-=K,-GV\!(`Q B'"J0 89 )  ,M***X!!4B=)B#+A%  I(% &.   E IM\@YLEJ i  gi_Ma#NJJJMJMLKHFDC>=<654/-&+# +S6632#".5463266766766454&&#"3&&#"52654326!5X4)4$I5$"$  0AC$$M%( &BX8.<3Mt(   %+L+M=**:-+ L15B@?  i   gg_N222525431,uAE% +A"326654&#""#'2232#"&#"52654326!5%!03FQ,*K!tg-hVC'!J# C$$L=L*`"$V`@}`423T LSK r  i `M _ M N@?--\ZJIHG?V@V->-987/.$#"!,,+e'&322>7"&'5667667>&75265573&&#""&'&&'&&5676&#"!`M3;<:$(" 7_N(>  = ;C F#!E68;,O^7 #R*4e&6 }#(%'J40 2**,4*,0LL%p?2 /{K PX@(r g_ M_N@) g_ M_NY@/)('"!   +Q5!#.#""#"3&&#"526543263Gp , 4.[2%G%%K##G(I# AM#$1!*I+ V_5S@uc+ LKKPX@H ~_M a !M  _ MM _N@A ~S_M a !M  _ MNY@/TT66TTrpljba6S6NMLGFE?>=87-,$" 55+W"&'5667667>&&'.'#"&54632&7526543267"3&&#".'&&'.'&&5>7>32#"&&5467'63O"   = "J##F" F#!E!#/  ;,25 -)-'%"  $+'F8'J 9)"3  %*%<$'540 2**J***AD ' 185($<%*%  2#*8 L%#%G! VRZ@ ?I-LKPX@8_ Ma!M _M  _   N@1   S_ Ma!M _NY@ZZTS<:64,+a +A"3&&#"52654326.'&&'.'&&5>7>32#"&&5467563""H%#K%%M$$F/ #/  ;,24 -)-'%"  $,'E9***J*SAD ' 185($<%*%  2#*8 L%#%G! V,JNLKPX@0g _M _ MN@0g _M _ NY@3KK--KNKNML-J-EDC>=<654/.,'&% #+E.#733"3&&#"52654326%"3&&#"52654326!5g%@1N1#%%K#%E  C$$M  D#%L%%K#$FAL!f6%H(***I+***I+K8B@?2-L I_MMaN83f+B+e&&#"5>55&"&3267"76&'5326H !!P',O ! a!   <$E# x [#20)$$  $$C"+^& F@K<@61L IK PX@(_ M _MMaN@& g_ MMaNY@<7-,+%  +e!57&&#"5>55&"&3267"76&'5326 !!P',O ! a!   <$E# x [#20)'x$$  $$C"+^& F@LRy,JN`@]L Ig _ M _ NKK--KNKNML-J-EDC>=<654/.,'a#+E6&33"3&&#"52654326%"3&&#"52654326!5$;,j-+$ O%%K#%E  C$$M  D#%L%%K#$FEHf7B=***I+***I+')=@:ga!Ma N  +A!572#"&&5466"32654&Ek??kEEl>>lE/;;/.<<7xbbx66xbbx7wvvwuc%L`>*IK PX@3rrrg` 6M_7NK PX@'rg_ 6M_7NKPX@(g_ 6M_7NKPX@4rrg` 6M_7N@(g_ 6M_7NYYYY@>5e2%%2 +A#&&##"32654&&##04132#"&#"5>54&&'53226326 E>=#%KBB8VPcB~|[9%H " !!H&#G6 -k`"A'WD-h4 MI-C&!I54&&'536326 $@4 .*[/-O!! !! K$1V(]`*M2 JW& l%% $$%# %c&+g%-IK PX@$pr`6Ma7NKPX@_6Ma7NKPX@#r`6Ma7N@_6Ma7NYYY@--qBE +A&"#"&&#"5>54&&'53267>7,a0 .*[/-O!! !!$PY!-:!*A" !#t%% $$%# #B2Vi`I;@8S  _  6Ma7NIBA=<;5%3& +A33#.##"#654&'!2654&##"#52>76&'532632326K!! 1 $@11@$ &1(   )H:.>' 67 /+$N` #%t7%G(@J J@(G%78 %$8oC:b}A5%,`%,c&*o%,K&(q`2Gc^@4-9(c uoL3.JK PX@<r  j_ 6Ma7M a 9NKPX@:  i_ 6M a7M a 9NKPX@<r  j_ 6Ma7M a 9N@:  i_ 6M a7M a 9NYYY@4dddd~wvtpnmfea_XUTRLJGCBA;:2/'& %&! +A#"#"&'73677>7>''&&'5326%5667766&'532#"&''.##567267&&#"5>54&&'5326I',@-)7   (7C#*!#D'H)\%;#"1&G$;%\)H'D""!G&2,9+-A+(I1;'@U  ! ! M'+O!! !!O+'MH)}C)  ,`#-1L+%""%+L1)C}) 78`($ & #%t$$  $$%# nKh@eL  ~i 6Ma 8Ma9NGECB>=;920,+! KK +A22#"&'&&5463232654&'&&##"&54326654&#"#4&&'3326766Un>d7@tK3M% ) < PI11    5')0BN  <nD?1D)"F8T_ '%#! YB8U  H9<=gP?K- %`!+MM@J'L=7 I _ 6M a7N,,,M,HGF?><865.-!B +A&&#"5>54&&'5326010661&&#"5>54&&'5326D!! !!P)+J!! ! J+)P!! !!J+(Q!! ! Q(,M` #%t$$  $$%#   #%t$$  $$%# %a&;%c&*%`4V@ %F@ LJK PX@3rj _ 6M  a 7Ma9NKPX@0i _ 6M  a 7M a9NKPX@3rj _ 6M  a 7Ma9N@0i _ 6M  a 7M a9NYYY@555V5QPOHGEAQ'%)0 +S67267#"&&''.##5667766&'5326%&&#"5>54&&'5326#0$%D9)  9,0% 0.Q#<$\*D&H!"!G )!! !!N&,O!! " O,&NH-#`,  /-p/*!&)O1 #%t$$  $$%# %c&+`M@  L JKPX@*r _  6Ma7Mb9N@+ _  6Ma7Mb9NY@MED?E$(6B +A&&#"5>54&##"#"&5463232>76&&'53266323266!! !!M))P!! (  &B4(?/"%& *7#  $%8)-00` #%t$$  $$8 %$@nA,)#)) ;fC#$"E`%`.n%`@8@5*$ I _  6Ma7N@5B6B +A&&#"5>54&##"&&#"5>54&&'532632326!! !!J+(Q!! 0w1 !!P)+J!! ! J+1h66h0+J` #%t$$  $$77t$$  $$%# %?`.Une`#v`%@|@ 'LKKPX@&p_6Mb9N@'~_6Mb9NY@>:53/-%  +A&32267"766&'5326#"&5463223267v&! (+35# '%!.)8 (,5+#*,`-+ !!"8B _ a  *"'!&&vb&;T5+11AY@V!I i   i  iYaQ32;92A3A1,+*#"   +A2#"&&5466%&&#"5>54&&'5326"326654&&|_az}^a " " M'-M!! !!M-'MwWp7=uSVq7=u(7kPNr>:qRKm;~ #%$$  $$%# 3dIQk46hLOf1 y`B`"DP@M L4.Ii _ 6Ma7N###D#?>=653/-,%$"%' +A"3267#"&'&&554&326%&&#"5>54&&'5326! 02%F`7,I! R('H!! !!L--\+. ! O)*L` !&4  @4i!  #%t$$  &&%# %V`F>@;LS _ 6M_7NFA@?6a& +A33#.#""#"&#"5>54&&'53267332654&&'5326!! 1%@13b!6h1+J!! " J+)P!! 1n1 " Q(*K` #%t7%G(@J  $$%#  #%t77%# %``I@F I _ 6M _7N`[ZYSPJIHBA@:710/)('   +A&&#"#"&&#"#"&#"5>54&&'53267332654&&'53267332654&&'5326 " " J+-]';8']*'Z,,M " ! O-#F 3/3 I#)H !003 I$,M` #%t$$  $$%#  #%t77%#  #%t77%# %V`fP@M$LS _ 6M _7Nfa`_YVPONHGF@=765/.-&%#& +A33#.#""#"&&#"#"&#"5>54&&'53267332654&&'53267332654&&'5326 " 0 %?1#V*;8']*'Z,,M " ! O-#F 3/3 I#)H !003 I$,M` #%t7%G(@J  $$%#  #%t77%#  #%t77%# %V`@Kն  LK PX@(  q_ 6M  7M_7NKPX@#  _ 6Ma 7NKPX@'  _ 6M  7M_7N@#  _ 6Ma 7NYYY@KJGFCB@;6a +A&&#"#"&#"5>54&&'53267332654&&'5326"#.# ! ! K+0b76d1+J!! " J+)P!! .r1 !!P(+Kž-<##<,` #%t$$  $$%#  #%t77%# !L@@L!%?`07@4 Ii_6M_7N0+e!%& +A32654&&##52#"&#"5>54&&'5326H"# &G9=:R\lu.|Y1$H " !!H*+T` #%t4"NI*F)/K,R^ $%%# `7 IK PX@.ri` 6M_7NKPX@(i_ 6M_7NKPX@.ri` 6M_7N@(i_ 6M_7NYYY@71$e!%& +A32654&&##52#"&#"5>5#"#654&'2326"# %G9<;R\mu-{Z1#H!! -/A' +_g3,T` #%t4"NI*F)/K,R^ $%%TH 2K(%m`0RP@MB< Ii _ 6M a 7N111R1MLKDCA=;:320+e!%& +A32654&&##52#"&#"5>54&&'5326%&&#"5>54&&'5326H"# &G9=:R\lu.|Y1$H " !!H*+TA!! !!N&,O ! ! O,&N` #%t4"NI*F)/K,R^ $%%#  #%t$$  $$%# `d\@ ("K JK PX@8  r g  _ 6M7Ma7M b 9 NKPX@4  r g  _ 6Ma7M b 9 NKPX@5   g  _ 6Ma7M b 9 NKPX@9   g  _ 6M7Ma7M b 9 N@5   g  _ 6Ma7M b 9 NYYYY@d\[VUTLHCA=;6B%$%  +A2#"&56632654&&##&&#"5>54&##"#"&5463232>76&&'53266323266zlu.}&B@#D:=:p!! !!M))P!! (  &B4(?/"%& *7#  $%8)-00X.L,R_NI*F) #%t$$  $$8 %$@nA,)#)) ;fC#$%`04V[@XF@ I i _6M a 7N55115V5QPOHGEA?>761414320+e!%& +A32654&&##52#"&#"5>54&&'5326!5&&#"5>54&&'5326"# %G:=:R\mu-}}Y1$H " !!H,)T!! !!N&,O!! " O,&N` #%t3#LE*B'-H,QX $%%#  #%t$$  $$%# 9n.Un/Es@p87 CB L     i  i6Ma 8M7Ma9N10@><:530E1E)'"! // +A2673#&&'&&#"32676673#&&#"&&546623267#"&&#"'66f?E H)UfqP'P"ICWRS //(  E(!/,*  En&+ XJ'3"&%"A2Sf#*&IbcQ9::9=dn/Es@p87 CB L     i  i6Ma 8M7Ma9N10@><:530E1E*)&%  // +A2#"&'&#665332654&#"#4&'376623267#"&&#"'662WQQZBH#O(PpaR*P!I!-+,  E&1-%  BnNcbL&,!^M'<"%'!;1P`",'7888%D`nK&(E=`$`1TRQ LK PX@9  i_ 6M  _ 7M _7NKPX@-  i_ 6M _ 7NKPX@9  i_ 6M  _ 7M _7N@-  i_ 6M _ 7NYYY@32OMFED>=<2T3T1*$" +A#&&##.#"5>5#"#6654&'232262&&#"5>554&&#"566c A<< ! 29?8*,<;A,eg*+gh",G! !O'(J /0%C[`'H( eP+((((Pe'H'?5B!  !\'3  %n'Il@i93L ga 8M  _ 6M a7Ma9N(((I(DCB;:8421*)!''  +A2#"&&546601#041"326654&&%&&#"5>54&&'5326YJLWYJM/E&,I,/E&+I!! !!N&,O!! ! O,&NnIdaQIcaQMY[IMX\I #%t$$  $$%# l`4Oa@^BA  L r   j_ 6M a7M  a 9 N555O5MFD?=874.2%&B +A&&#"5>54&#"3301'".546632326#"#"&'732677667>l ! ! H**U"# &F:=:RlIc94oXY0$HZ-1 <7&9   RC'@` $%t$$  $$4"JE'C'/:2I'4<\*/ R;2,`,Qk@hON B   L     i_ 6Ma7M a9N.-LJFD=;64-Q.Q,%$3# +A#.##&&#"5>5#"#6654&'232262#"&&5463232654&#"566e $<2*G%5,.*1=" ,eg*+gh54&&'5326u-"# &G9=:R\lu.|Y1$H " !!H*+T #%t4"NI*F)/K,R^ $%%# `0C_j@`]\>1 L KK PX@=rr  i_6M a 7M a 9NKPX@Arr  i_6M  a 7M a 9NKPX@=rr  i_6M a 7M a 9NK PX@Arr  i_6M  a 7M a 9N@Br  i_6M  a 7M a 9NYYYY@,EDfdZXQNMKD_E_C?=<8732*('$00u +e&&'532667"&'73677>7>#"75>553&&#""&''.##567267766&#"!^V%an6$!)7   (7C#* I',@!! ! M'+O-A+(I1;'@U  9["DF@:'  ,`#-)}C) $$$$ )C}) 78`($ Mx-B%!`4!IK PX@/r g` 6Ma7NKPX@) g_ 6Ma7NKPX@/r g` 6Ma7N@) g_ 6Ma7NYYY@4,+*#"   +Q5!#.#""#"&&#"5>54&&'536326k $@4 .*[/-O!! !! K$1V(]-3*M2 JW& l%% $$%# V`2Gi@4-9( {uL3.JK PX@Ar  j S_ 6M a7Ma9NK PX@?  i  S_ 6M a7M a9NKPX@;  i S_ 6M a7Ma9NKPX@Ar  j S_ 6M a7Ma9N@;  i S_ 6M a7Ma9NYYYY@8jjHHjj}|zvtslkHiHicbXUTRGCBA;:2/'& %&! +A#"#"&'73677>7>''&&'5326%5667766&'532&&'&&''.##'633&&#"5>54&&'5326I',@-)7   (7C#*!#D'H)\%;#"1&G$;%\)H'D""!G&2 (8,3 0.R$0#$D:(  !  ! ! M'+O!! !!O+'MH)}C)  ,`#-1L+%""%+L1IL )-s/-#`#% %G(  #%t$$  $$%# %V`!7Y @3"IC L2JK PX@0rj S _ 6M  a 7 NKPX@*i S _ 6M  a 7 NKPX@0rj S _ 6M  a 7 N@*i S _ 6M  a 7 NYYY@"888Y8TSRKJHDBA:91,+*$#!!1* +E&&'&&''.##'6335667766&'53267&&#"5>54&&'5326 (8,3 0.Q#0$%D9)   T*D&H!"!G )#<$!! !!N&,O!! " O,&NIL )-s/-#`#% %G()O1!&! #%t$$  $$%# %V`V@ 3- LK PX@/qg  _ 6M a 7N@.g  _ 6M a 7NY@+VQPOKJFED>=<542.,+'&"!# +E.#733&&#"5>55!&&#"5>54&&'53267!54&&'5326%@1N1!! !!J+(Q!! !!P)+J!! ! J+)P!!  ! Q(+JAL g7%G(  #%t$$  $$$$  $$%#  #%%# G`CG`'=D@<(=LK"J6 IK PX@3r ga6Ma6M  _ 7 NKPX@)r ga6M  _ 7 NKPX@3r ga6Ma6M  _ 7 NK(PX@)r ga6M  _ 7 N@* ga6M  _ 7 NYYYY@875.-,'#!   +e!5#&&'53267"766&'5326.#"5>557%%2'S*& g'%3. '%7<<4%' F,,{ 8C&%  %&S$`"DK@H L?#Ii_6M a 7ND@>=654.-,%$"%' +a5266554&&#"566323&&#"5>54&&'53267&&#" +/+Mj9-H! !R((J]!! !!N*1\+. ! P-&O !Y%3  @5?!  $$%#  %'x$$ %R`VX@UL3-  I  g  _ 6M a7NVQPOKJFED>=<54BB# +E6&33&&#"5>55!&&#"5>54&&'53267!54&&'5326m$;,j-+$ X!! !!K*(Q!! !!P)+J!! " J+)P!!  " Q(*KEHg7A= #%t$$  $$$$  $$%#  #%%# 7n.n#=@:ga8Ma9N##  +S5!2#"&&5466"326654&&obRT`bRT\8S-3W58S-4V-AIdaQIcaQMY[IMX\I @(M_)N A+A&#"!mooo6.0?AG@D)L0Ia(M`)N:865/*"  AA +A232673&&#"5>54&#"&&#"6654'333.546s.JT&4GKEF*,+L`^N+,*EE MF3%UJ.҅uCmdkBMb-G%XrIwwIrX%G-bMBkdmCuD%9J].@ T.'LLKK(PX@+ rh  *M a +M,NK/PX@*   ph a +M,NK0PX@)   h a +M,NK1PX@*   ph a +M,N@)   h a +M,NYYYY@%;:&&ZXQOCB:J;J&9&942+)$" +A2#.7>467>7#"&3267#".77%2'.7>3267#"&&7 "  ").%  '/7M/B-! 0# " !*(7&5$%1K;KZ1 c0IoS"dK^+ 4?TU8"5:#.G8EV.  8=4?UU8&>"9#6C@@, L h*Ma+N$$$6$620)'##5 +A01!"'>3#"&5467>773267#"&&79(=/:cP  %$)!(7$4$! (#$22Ih8hq\&-@_D)"4?UU8'L7&$Tue%`/F-@*aGMaEN  +A2#"&&5466"32654&&@MvCEzRKwDD{I9J&@$:I&>BvPPIAxPO~KzZn2zZm2+a#@ Ji_?Na +A3&&#"526554&ȶ$,M)2[.4.(QkS. !10.+#k@! LIKPX@raGM`?N@aGM`?NY@ ## +A232673&&#!5>54&#"'66KW:XX) [-SO51/)ChB=1QFB!>DIXh=62+) 1L i1@ .-LK PX@#ieaGNK PX@&iaGMaCNKPX@#ieaGNKPX@&iaGMaCN@#ieaGNYYYY@+)" 11 +S26#5>54&'#"546326654&#"'>E]0S6=d54&#"'33267p T*C1a\BmC=oG=9'  "/?GZB:^B#3fI?E 42)#@ LiaEN&'$) +A32654&#"#>32#"&54>,YI,/%;7&.& 2C 3W5BmAhx1Qdh1]zes.`qkY.(3:4aEKk6[gF)l "ILKPX@r_AN@_ANY),1 +S3!#"&54>7!"#4&Z-;:&! &>HE) /jyR  (,!fH'2+0=,EME,8\JA8T%U&CO17V0&L8If!]1-M/>50KA>BN13H%j)/@,L IeaGN#!)) +A2'>54&&#"326673#"&&5466iw0Qcf-+WI+.&;7&-( 3B!2X5BmQ~^@% ,Tnal-`qlX.(3;4aDLj73J-@*aDMaEN  +A2#"&&5466"32654&?PxCEyNPxCEyJ@@H?B>HVsp^Vrp^ Y%@"J Ia?NB +A&&#"5>54ȶ K).Z',.B\n!" '&4 !"3v@ %LKPX@$paDM`?N@%~aDM`?NY@,*#! 33 +S232673#"&5>54&&#"#"&546766;]75[q<$BR'0fX6 45 #*"T'J75dixJ!, C"-tK  50827#* "WOD1M5 +R=B]1 '%#! mOO_ YMa?N@ga?NY@B +A7!!5&&#"5>57( J+'K'(b DW$$  $$ɟ'7@10/"LK'PX@+i@M_>MaEN@+i_>MaENY@775%''&# +A!6632#"&'&&54632326654&#"'33267!N,?h=EvJ$B&&  2(A&I9D!#" &*1^EJj7-'! $ $]S`aW4"9H@E'LiaDMaEN42,*#! 99 +A2#"&5467&&#"32654&#"#>32#"&5466\?") &/!MEN@_>MENY@ %(+ +A#"&54>7!"#654&'2326*N;# !!:\f,++#WV PfBT&%*N>.%- 0:-91@.%$LaDMaEN-+ 99 +A2'6654&#"#"&&5466732654.5466*9\5YJ%83+41OWO1AsI>nC4V60(;07G0MVM0CO17V0&L82M:!]1-M/>50KA>BN13H%,9H@E.LiaDMaEN31*($"99 +A2#"&'&&5463232>54.#"326673#"&&5466#vJV<#)'. aPQk`RPkWNVJXNVIu-@*JIiY_OR +w3&&#"526554ȶ$= #?#'"/9K,sB#<@9! LIiW_O ## +w23267&&##5>54&#"'66/=!4:  :6$ ,E./!2++2/7A'#$!3)*r@ ('LKPX@!iea?M?N@iie?NY@%# ** +w265>54&'#"5466654&#"'66/>;24L0P`06V3"  "/E+(&6 51&;('?'%1 ,%!3 a_@ LK PX@qW_O@W_OY@ )# +e73267&&#!5#7    C.  6@@+'@! LJK PX@ giYaQK PX@gea?NKPX@ giYaQKPX@gea?N@ giYaQYYYY@ 5%$& +e&&##'66325>54&#"'73326  >&?=0Qa04U2!(*n1?)*A,&C/#- nqP'(@%LiYaQ&&$) +A32654&#"'>32#"&54>1 C9$&1. : (6$@(0O0MW4T`P !?fN>E9CA4+#)?/0C#_UIkI* 7 .@+LJW_O(+" +w33#"&54>7#"'66  .+,BE!EO\85c]X(11k^L44@1! LiYaQ(& 44 +S2'6654&#"#"&546732654&&'.5465M;1! %!/B=_J=\M7"%-$316$SL..)7 :%)"- )E*7D774A @!):)&.&*5 /9h%5@2LIiYaQ!%% +w2'>54&&#"3267#"&546MW4S^+ A9"'2. : )56UgZS@bB'7]F>CK K5++?DK K5+ \5FK K5++VGK K5+oHK K5+ 85IK K5+]JK K5+h>KK K5+" OKPX@ea@N@iYaQY@      +S2#"&546"32654&RilWQjjT.8?*-8>VGH`UIG`LEL@MEK@&@#JIcaDNR +S3&&#"526554ȶ$= #?#'"/9K,>"{@  LIKPX@a@M_ANK PX@ca@N@iW_OYY@ "" +S23267&&##5>54&#"'66.< 38  :8$ :!E%&.'&2*3<#21\+*@ ('LK PX@#riea@NK"PX@$iea@N@*iiYaQYY@%# ** +S265>54&'#"5466654&#"'66/?<13M1P`/5V4#  #/D&#"1 /-$7%%;$!+ , 1 R\y@ LK PX@q_ANKPX@_AN@W_OYY@ )# +S73267&&#!5#7   B- hX@\+ 'c@! LJKPX@ie_@N@ giYaQY@ 5%$& +A&&##'66325>54&#"'73326  >$A=0Qa03U3!'*n 1v8$':( ;+' oh%"@Lea>N$&$) +A32654&#"'>32#"&54>1 D9#'2/: )56UgGMW5T_h8\F:A4>;0'!&ABCIYQAaB& Z8.@+LJW_O(*" +S33#"&54>7#"'66  ?1,BE%UfA /YSN$11]d34@1! LiYaQ(& 33 +S2'6654&#"#"&546732654&'.5466L\L9"&-$2A+6%Sd))&3 4!#) &B&2?220< :!#4#"+7&2*4]h%S@ LIK PX@a@MaAN@iaANY@!%% +S2'>54&&#"3267#"&546MW3S_+B8#&1.: (55VgTO9W<"2R=8=4>;0' 'ABDHLJIK PX@i_ON@iY_OYR +S3&&#"526554ȶ$= #?#'"/9K,>"Y@  LIK PX@aNM_ON@caNNY@ "" +S23267&&##5>54&#"'66.< 38  :8$ :!E%&.'&2*3<#21\+*@ ('LK PX@&riaNMaQNK PX@'iaNMaQN@$ieaNNYY@%# ** +S265>54&'#"5466654&#"'66/?<13M1P`/5V4#  #/D&#"1 /-$7%%;$!+ , 1" OKPX@ea@N@iYaQY@      +S2#"&546"32654&RilWQjjT.8?*-8>VGH`UIG`LEL@MEK@ R\y@ LK PX@q_ANKPX@_AN@W_OYY@ )# +S73267&&#!5#7   B- hX@\+ 'c@! LJKPX@ie_@N@ giYaQY@ 5%$& +A&&##'66325>54&#"'73326  >$A=0Qa03U3!'*n 1v8$':( ;+' oh%"@Lea>N$&$) +A32654&#"'>32#"&54>1 D9#'2/: )56UgGMW5T_h8\F:A4>;0'!&ABCIYQAaB& Z8.@+LJW_O(*" +S33#"&54>7#"'66  ?1,BE%UfA /YSN$11]d34@1! LiYaQ(& 33 +S2'6654&#"#"&546732654&'.5466L\L9"&-$2A+6%Sd))&3 4!#) &B&2?220< :!#4#"+7&2*4]h%S@ LIK PX@a@MaAN@iaANY@!%% +S2'>54&&#"3267#"&546MW3S_+B8#&1.: (55VgTO9W<"2R=8=4>;0' 'ABDHO82+A'<8 28'LG&B0g08'LA&B1_(8'Ln&C 1.8'LW&B218'L&D2K6 @aEN   +w2#"&546",,"#++(!!((!!(6v%@"L IaEN +w2'6676'#"&546! 35 + *+*1T 3&# )?'R R 5+Av&S R 5+6&R'RR1>0@-@MaEN  +S21#.5462#"&546*(",,"#+++)*nKKn*)+v(!!((!!(8D/@,aGMIN' +S#"&54>772#"&546'( #++##++>?|o]!*()) ]p|?(!!((!!(!-K@H L~a@MaEN#")'"-#-!! +S2#5>54&#"#"&5467662#"&546gn=;G93 ( $H",,"#++`TUof % <*5LH8(> # ;+  % OI85L*eGZ K PX@+ pq h W _O@)  h W _OY@"       +A#!7#!7aaf aaE Z O !R.K,PX@ >M?N@ vY@  +A#R!  QG_r@?,@)aDMAMEN' +S#"&54>572#"&546'* #++##++?|f!!%%!!f|?( !((! ( !-y@  LK,PX@$aDMAMaEN@&~aDMaENY@#")'"-#-!!''' +A3267&&54632#"&5467572#"&546);<H92)$I2fm ",,"#++ >H'^W !$%(fXSn(!!((!!(:R) 05+K\VU5+&J$&Gf6@J& 2+S'6654&' qqH>>H&YY g瓓fD0%5@2 Lia@MaIN%%" +A3"&&54&&'#53>54660! 3R..R3KY&  &YY_Zf1 2eZJV+ )f\^g,+h^Xe*D/GgD@VK%@"_@M_CN +A#3#AAm$KGi:@(  2+A&&546E;;Eo{{ ZȁW N֌ Gk4@)#2@/ Liea@N##" +A"&&54&&'#53>546) /R55R/ GT&  WJMS^- .]SPL#VLV_((_VkX.GmD@X"@c_@N +A#3#AAD%Go@@?3@W_O +A!53JJ96@W_O +A!5"6PP9;6@W_O +A!5;6PP?3q>ks l5+?<qSU5+:9sSU5+:9<tSU5+?<w6vS6v-3@0&L! IaEN)'-- +e2'6676'#"&546#2'6676'#"&546D! 35 + *+! 35 + *+*1T 3&# )*1T 3&# )0|K H5++|N `5+0S L H5++SN `5+! 2+A&&'5667&&'566 17714}SS}-33-1uOOu8dQSf8T22D6]LM_6O./3!2+A'>7.''>7.'5}SS}5/88/1vMMv1,33,T2 1T9cQSf8 O. .O6]LM`50 2+A&&'566 17714}SS}8dQSf8T22.C2+S'>7.'>5}SS}50880T22T8cRSf8/+&/@DN +S2#.546e     5B41B7 GiVV5+=GiG-V@V5+G2iVV5+:GNiGjV@V5+H Tq !$5+B Xs "%5+BDXt "%5+,G6@#  2+S'6654&'.ewwe 8778?gg? Aab@6"8@5 LiiYaQ""" +A"&54&&'#53>5466! 3Q//Q3 !pZ  Z>?HO# $NI@?M\JOOJ[J8GS@](@%gW_O +A#3#AAZ*GG@Hn0@-8Ma9N  +S2#.5462#"&546+(",,"#++n&&M[e55e[M&&(!!((!!(Gn/@,a8M9N' +S#"&54>772#"&546*(",,"#++5e[M&&&&M[e5(!!((!!(n%1@@= La8Ma9N'&-+&1'1%% +S2'6654&#"#"&5467662#"&546ay-M\.&VN93"%!$#=#++##++nKD)=-UfPC@B  $%0 (!!((!!( n%17@4%$La8Ma9N'&-+&1'1'*& +A3267667&&54632#"&54>7''2#"&546'VO:3" %!$#=&by-K]0 #++##++fPD?C  #%/ KD(>.U(!!((!!(B{R 5+G\,05+!#E! 2+A&&'5667&&'566%17714}SS}-33-1uOOuE8dQSe9T1 2D5^KM`6O. .?"D!2+A'>7.''>7.'4}SS}407701vNNv1,33,DT22T9cQRf8 O/.O6]LM`5!#5E 2+A&&'566%17714}SS}E8dQSe9T1 2;"PD2+S'>7.'K5}SS}50880DT22T9cQRf8? T!K2e@b'&L rp>Mb GMbEM CN ,*$"2 2 +W535372#"&5467&&#"3267#"&&5466%?('# &0$'># K 1N8@h=>o -!($& =Y:Q^'$5#F.;xYX{BBG !1@ !  LJ IK PX@iYaQK PX@eaANKPX@iYaQKPX@eaAN@iYaQYYYY@ #"+)"1#1.- +A'#"''7&&547'76632"326654&&B67B77=/6B5!5B577m#:"#:"#9""9B7785C6 5C58;36B6(%=%$=%%=$$>%3|HCGKK PX@L  p  ~   qaDM_>M?M aEN@J    ~   aDM_>M?M aENY@+HHDDHKHKJIDGDGFE530/+*)'#! CC +A23273#.#"#"&'&&#"#>5332654.'.54667#3# 8< &G<9?+F42N-Ak@;C *TD>G(E4/R1cLPn798))3">P8>O&x44 ;048h@eL     g ga DMaEN5511585876141432+)"  00 +A2#"&5467&&#"3267&&54632#"&5466!5%!5-?(' ,NTPQ+ ( 'B$LU  g %" "  ""& p^kdD:>P@M +(La@M_AMaIN;;;>;>=<&$ :: +A2#"&547&&#"#".5463266766766546766!5j3)#%4" $K1&%"   HO %&!2 ]dbMt'!   32 Y^"%.26n@k'L!K J  r   i   giYaQ33//363654/2/2'#)"%+S2327#"&''.'#"546326654&##!5%!5%vjXl  537B &'  @2N`!35 YJCeAAg%&@6168b0;a:OWPd!aJNR@)LK,PX@@  ~ g   ga DMaEN@>  ~ i g   gaENY@'OOKKORORQPKNKNML;:750.#! JJ +A2#"&547&&#"663232654&'7#"&&'&&#"#"&5466766455466!5%!5y$4$%.#)0/&>&>>%"!*#0PDE*ID# 3 (,imO $$!0 $C^96RJ+" 'A96I#  #% 2D1RP]d~+?@ >, ?L82 IKPX@2r g  g_>M  a ? N@3 g  g_>M  a ? NY@&:97310+&%$  +A!5!5#&3267"766&'5326&&#"5>55#ss,% 5(]'( q".)!;% !!P',O ! L,d13#BJ$$  $$>6'R'RO_+ b5+'i^ /@,W_O  +A3##5#5354$^ET:r@W_O+A!5: r5( 2+S7''7'K(E:* jKPX@geaGN@$igYaQY@     +A2#"&5462#"&546!5@!!!!!!!!  !!    E:0@-gW_O +A!5!5:  B7D 8@5JIgW_O  +A'!5!5  DN&G?FG\@F2+A%gF$$>AF'G^@ 5+,-F& 5+'"^' 5+?O1^@[ "!/.Lii iYaQ,*'%11  +S23267#".#"'>23267#".#"'66&E@A#!1 D7&D??#'6%;&C@@"$8&:''D@A##0 E%"'GW$%'1I(%$)1I($#%HV@W}?dD@4 LiYaQ  +DS23267#".#"'66'C>B$ 4W8(B?@%!2W}#$@K#$AJLAr%@"W_O +A#5!5A$/rͯ71J@G#" LYiYYaQ-+'%  11 +A2#"&'732654&#"#"&54632&&#"32>DCQC/s@6j,7>)'-dhfa+DCSA1r?5k,5@*&.dggaJ9BB:) #6.  !//!N5BB:) #6.  !//!b57@4 (%LiYaQ#!55+A2#"&5467&&##".5463223>546766 3"# -$K1&%#"! $J"$!! ?;Mt'!  !;(Mt'$K@>@;*$ I   iYaQ@5B6B +A&&#"5>54&##"&&#"5>54&&'532632326 " " M,&L " 33 " K',M " " M,#ZWRY",M #%[$$  $$77[$$  $$%# #!*|@$" !LK PX@'r~gW`P@(~gW`PY@*%u"#+A#.##326673&&#""55326$>0Pf7;:&WU%<=7)M# EO!+dV%9X/1 L#@LJK PX@'iWaQK PX@ iWaQK PX@'iWaQ@ iWaQYYY@#B%!+A"&"&&'53267"62263J  6>.:#Q"` +52LO+&$0C@@.-LiiYaQ+)$" 00+A2#"&54>32.#"326654&#"'66N2B"<\>[o!EhH'G, (4%9) 8%6]:ON[5/`WZKwGde.cU5!VPMJ$<8A9A31,7-7(&"+#+!!     +A2#"&546"3254&'2#"&546"3254&'2#"&546"3254&'GWYEFX[E(!D& GWYEGWZE(!D& GWYEGWZF(!D%=VML\VMK]IIJIVML\VMK]IIJIVML\VMK]2IIJI 885+<J '+a@ L%$! IK PX@qWaQ@WaQY@ (((+(+*)% +S&#"566&&'5667&&'5667#5ZL\__\LZZLLXYLLZZLLXYLLZJGe#++#eGe##V<54&&#"3267#"&&54>26&&#"3267#"&54>XU7Xf1'" <=Q KE-QP]LOW6g1%nC^SK&%  3)#A3A)5:(DU8ybT`3./* 2UxL]p3Qfg: !@jeW,"3Ug4/)dZN_+C<7r`<.]K@ D#43 a L  ~   i  i aDMa >MaENML~omhf_]LM<:+)! KK +A2#"&5467&&#"6632#"&'32>54&&'7#"&&54>7&&54>%23267&&54632#"&&5467>76654&#"#"&5466C&0*'!%4F & & 3?GT3aN. (*<;Ref[,BB1<4DCX\K4;5?J 0 * %&=#$@(g[?B@@E- )) 7 '"% @?7 LACZ-.A+44 _=BoBMEMaCN,*&$  +A27&&#"56655"&&5466""330<Gz:. ! W-/S?&QZQOOQ!!H$$ )54bjfY5ONPLAllC%D0bK@H2"!PL~a@MaINUSKIB@ 00 +A2#"&5467&&#"'6654&&'.5466#"&'&&54632326654&&'.546(&6 &$'6(/,J,5I%AT $ #F3:U.5`1 #!$F2;U-4_?&6!%$'%'.+J-4I&A .'#% +':4#=A+3Z' 2"46"(CH/2I) 4"56"'CI/1J) /'#% ,(94$2#"&5467&&#"32667#"&&54667"32>54.Sm>>mSRm>>mf&A('" + '>#/0 0O7@i=?n2Jb88bJJb88b>mSRm>>mRSm>},!(&$ 4VBTb),($F.;xYX{B]9eLLe99eLLe98f)9hdD@[SLb KK PX@=   i  i  iiYaQK PX@D     i  i   iiYaQ@=   i  i  iiYaQYY@);:+*YTMKGDB@:h;c31*9+9)("   +DA2#"&&54662327#"&''.#7"326654&&204132654&#""&#"#566554&'52326OMKKMMKK " 3%(*ABk@@kBBl??l7>:>:<5*  !   0KMMKKMMK?  ICpDCqCCqCDpCJ)&&%#$    B'7a@ 1 MG! L*JK PX@3  r  i Y a Q@4    i Y a QY@ 888a8\WVTRONLHFEB@>=RR7B+A&&#"5665#&#"56654&'5326722326%#&&##&&#"5665#"#654&'326 !7.# !!0ld1'*.?!%?-*'*k))k$$$ ]$$$4 D5**+5D! 4%8'+;Gf@cL+I ii  iYaQ=<-,CA+Pjk 3V44V33V44V3****  C69@+3"^TUd; )P<;Q))Q;>""??4@88AA88@53433435U=Z.K,PX@ CN@ vY@  +S#HZW=ZLK,PX@CN@vY@ +S##HHHF &!dW,!@$  Iv,, +S.56677''752"#&&4.   &&uu&&u     vddv -! '5--5' !&Z\#4<DUN@MHDCBA@?><;:98764/ LK)PX@ CN@ vY@ FEEUFU-+ +S'&&'44667.456673#"&5264677''7''752"#&&4.        y&&uu&&uu&&uu&&u    (&&))&&(b-5' !! '5-(! '5--5' !'159IU@& L i g  g a DM_>Ma?M?NKJ;:6622QOJUKUCA:I;I6969872525431,aB +A#&&#"5>54&&'532674&&'5326!5!52#"&&5466"32654&7"# + #"03"# #"3: #"13j3V44V33V44V3**++ #%y$$  $$%# 4b%# jI)P<;Q))Q;:dD@ Iv +DA&&''667gA?u$`2?h9m"44"l:(E @ >N +S#( 2()&.Q665+( IK)PX>NvY@  +S&&''667nDB}&h6Cn8k!<<!j9``@v +A!_```*@'gW_O +A!!!_y`+_N->O|@yG%65 e L     i i  i a8Ma9NQPsqljcaPQ?=-+#! OO +A2#"&5467&&#"6632#"&'32>54&&'7#"&&54>7.54>%23267&&54632#"&54>7>7>54&#"#"&54663%-*' "4  & +@tM7cL+ !" "(Sn_X+??"54E;K&1AD=S8"* %';!:C0?$:=*!;& *'!7n '!& 2$. =6>T+*B,*%  +4Ck>1[A3H0 +*@="2$ (&"' "(87#5(  %*  !$Ka6M@JJ I~~e6M7N,*&$  +A27&&#"56655"&&5466""330<J~;1 #"R+3Y?&PWPNNPa!!$$ )5AQXWM5CoD DoBLwxM$:.]L@I0 NL~iYaQQPIG?>..( +A2#"&5467&&'6654&''.5466#"&'&&5463276654&''&&546=H$'!) 964 '1+9F"-08bZ"-08b?H$' ) 864!&1,: $%# ,"*z"3'#G "!-,*@$ "!-+)A$ $%# ,")z#2'#G5n0 5+ -1K PX@>  pq jgYaQ@<   jgYaQY@...1.10/'%!  -- +A273#&&'&&#"32676673#&#"&&54667#,/=% :COY@=%?2MyEGzR28SD2-orx81HW68qSQw@,>Q  5+6DHLKPX@L  p  ~   qa8M_6M7M a9N@J    ~   a8M_6M7M a9NY@+IIEEILILKJEHEHGF530/+*)'#! DD +A232673#.#"#"&&'&#"#>53326654&&'.54667#3#7=  ,L98?(Q;-Q3=h@$4+ -UC7"%H8?4 :a%hn.K>9S.-% ..!8H3:M&  ,8ZEEc5* .-(1?(7G$X,,!<n/37b@_ i g   gia 8Ma9N4400474765030321*("  // +A2#"&5467&&#"3267&&54632#"&5466!5%!5%A&% 2NTQQ2 %%2ELU  gn &!$ $!. aQd?V 5+`26:e@b*$L J   gii6M  _  6Ma9N77337:7:983636(#"%& +S23267#"&''&&'#"546326654&&##!5%!5kR1gQ3V<   7-96 1&  F9,S;"35`?2&E3 ,-X  1v6$R93@Pd"KnIMQr@o('L   g   gia 8Ma9NNNJJNQNQPOJMJMLK;:64/-"  II +A2#"&547&&#"663232654&'7#"&&'&&#"#"&5467>55466!5%!5s&7$%-&306&*F""77!"!*#0PDE%B> )' (* +gpOn $$!0 .T9/C<$"#>63F!    "5*:e>db`+A|@@, AL K&J: IK PX@<r g ga6M a 6M  _ 7 NKPX@2r g ga 6M  _ 7 NKPX@<r g ga6M a 6M  _ 7 NKPX@2r g ga 6M  _ 7 N@3 g ga 6M  _ 7 NYYYY@$<;9210+'%$  +e!5!5#&&'53267"766&'5326.#"5>55uu%%2&S+& g'%4- &&7<<4%&Ed,,{ 8C&%  %&SDn6:K@H *'Lgea8N777:7:98%#66 +A2#"&547&&#"#".5463267>546766!5_&A(#&4" $K1&%# !GOn- &!2 ]dMt'!  -Y^"+gx 5dD@*YaQ      +DA2#"&546#2#"&5462**(()*))*))**))*r (dD@YaQ   +DS2#"&546c$..$$..(!!((!!( W>2+S6.'&6+ *?,04H4 )0#(W=2+S'>766->+ +0 (#0) 4H4W;  2+A'>766'>766oJ9  +J: +/ '8;2G4 '8;2G4d.dD@ Iv +DS&&''667]:8k!V,9].6e!-- f6d.dD@ Jv +DA#&&'766y9]]:8l U. f66f ..q&dD@ JYaQ&$ +DA#"&&'7326 0J44J0 RCDQ #H//H# 44\ 8dD@-iYaQ      +DS2#"&546"32654&*??*)??)11113,-33-,3&%%%%%%&y ?dD@4 LiYaQ  +DS23267#".#"'66)"#'B'*"#'D D;D;Y'dD@W_O +DA!5Y#S$; ?dD@4 LYaQ '( +DS56654&#"#"&54676632)#$ /8GQ<S7+ # ,&)3 .G 'dD@YaQ   +DW"&54632c&$" %'!$#" 3dD@( LIYaQ  +DW2'667#"&546e!+/8)#&;)"*7 "DqdD@LKPX@pjYaQ@jYaQY@ %%# +Dw6632#"&'732654#"7k! "';!+ 5% G#hD3dD@( LYaQ%( +Dw3267#"&5467-## ?)).QI0 #!$)?`t'dD@W_O +DA!5t(j<@W_O +A!5j<2M 2+A'''[Y S  2+A'#''( k=e{H p 2+A''' XX+| 2W=$q 2d.!2D 12d.!2g$r 1W>&W;2z!D$\ y v -@*YaQ      +A2#"&546#2#"&5460**(()*))*))**))* @YaQ   +S2#"&546b#++##++(!!((!!(2+S.'&&766[&8/6L5 + )8%  &   2+S6'>+ 7J7/8' &  %8)/  2+A6'>'6'>o* U6 & * U6 & ' 8.' 8.@ Iv +S&&''667jA@z%e4Ai*O $$ P*@ Jv +A#&&'766AijA@{$dP*)Q $$@ JYaQ&$ +A#"&&'7326 9U::U9 cNNd <((< )* +@(ia@N      +S2#"&546"32654&*??*)??)11113,-33-,3&%%%%%%&7@4 LiYaQ  +S23267#".#"'66!3./' G,!4-/& G>?>> 3L@W_O +A!5L#. 7@4 LYaQ '&& +S56654&#"#"&54676632%+',!">&J97' &  #. . D;@8LiaIN%%# +w6632#"&'732654&#"7p#"$*@%-< !H# iD&@# LaIN%% +w3267#"&5467=." >)*-WO7 #!$)?2+S'>766o '  $ $ *!(8+ U=2+S'>766| *  (4&"3/6A.vK -@*YaQ      +A2#"&546#2#"&5460**(()*))K*))**))*N @YaQ   +S2#"&546b#++##++N( !((! (c2+S.'&&766[&8/6L5 +W )8%  & XOc 2+S6'>+ 7J7/8'W &  %8)w 2+A6'>'6'>o* 2E0 &. * 2E0 &. g' )=-' )=- V@ Iv +S&&''667g?>x#b2?fV*O $$ P* N@ Jv +A#&&'766?ff@>x#bNP*)Q $$<@ JYaQ&$ +A#"&&'7326 8R98S8 `LL`< <((< )* @W_O +A!5 D@@=LiYaQ%%# +w6632#"&'732654&#"7p#"$*@%-< !H# iD+@( LYaQ%% +w3267#"&5467=." >)*-WO7 #!$)?2+S'>766o '  $x $ *!(8+ e 0@-iYaQ      +S2#"&546"32654&*??*)??)1111e3,-33-,3&%%%%%%&N7@4 LiYaQ  +S23267#".#"'66!4-/)C,!4./(CN?>?>$6K0PX@ _AN@W_OY@  +A!57@W_O +A!5#i#0@-LYaQ ##+A2#"&'&&546323267&&546c&J34J%'DC'&(  (&%  !%#NLKPX@a@N@YaQY@ ## +A2#"&'&&546323267&&546(U89U')PO)####" #a#0@-LYaQ ## +A2#"&'&&546323267&&546(U89U')PO)a####" #73@JIv +S'66546/(  #+ VAD@ #@JIv +S'66546:1  .7 `HMI/f@JIv +S'66546:.  ,7f ]FJG2+A555 X=2+A555=2+A555UB8lU6Lt  6^| $<Tj  4 J Z 5 M c y 1 Y o  !9 %+McyUk .`xFp  ) A Y o "#$%&''+'C(N(f(|((()*+z++++,,,---0-H-`-x......//,/D/f/|0*1<1T1l11233334 4!494O5 5"585Z55555577&7<7d777788&8N8l888899(9>9T9l99;;<<<<<==>>>?????@@4@\@@@@@AA A6ANAdABPBfCJDDEE+EAEfE~GBH"H8H[H{HIII0IFI\IrIIIKCKKLL$LLMMMOOsOOOOOQSkSSSSTUUUUUVV VHVpVVVVVWX X%X=XUXkXXXXXYZ[\]]]]^___2_H_^`a[abbbbccccd dd7dOdgeteeeeefff0fHf^gghhh0hHi`jjjjjk kk5lll/lGlmlllllnBoqsuZv~wpz|u}=~/$Lt6_u !mE]u6^ -C[{XI_6Nf~2J "8Ndz3n7OefBZr2 5U>7Og !&<Rjp4Ln ":RtĔĬ űƮ,ɹ+MmPf|˔̹`pΟίlτjўѮ'Nf~@P`p]m}ڍM6SC[MQ@P LH^v   / + / ? 0'=w_x9q  !,"$$&{'})+-./I/Y001F1V33+4y456667 9;+>@ @@,@<A)A9AIAYBBCCDEG@HJLK LMP-QzQRTTT.T>V=WzXZZ]__bdfPf`h`iljjksklooppp!p1pq+rstDu/uv{wGwxtxy{{}}~vd &#@]zNnTj.cz>:Zk:"r^DA^xm3+Azz3MgwFe8=U2Lf|WmWz+0@@@@@8=MTfGD !Lu9|Q"V%=Ŭƶˇd̗(ִ}ٵ8ڀ۟q(ߌ߿$0m[P`4t {0@"t,m0v&6F JId"_G KN,<B cPIv33\p_<OLض2<m$......$ $ q$q$q$q$q$q$q$q$q$q$q$q$q$q$q$q$q$q$W,W,I$////////$$$$l$$l$llll$l$ll$ll$l``$$$[$[$[$[$\$[%%%%%$%.........................n$_$.$$$$999999999999 -ddddddddW(W(W(W($.%.99W(                        B((((((P)2(P)P)(((((((((((((((((('Y!!!!!!ZZ ZZ444444444 4E444>>>E/////`````Q`/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)5)Q@B)11&101xY`o```UUUUUUUUUUUUUUUUUUUU      !!!!S(`/)1!X(131oooooooooooooooooooooooo2z%......%%]%]%]%]%]%]%]%]%]%]%]%]%]%]%]%]%]%]%7W,W,1%........%%%i%i%iiii%i%ii%%ii%iZZ%%%G%G%G%G%M%.%.39A0Gh"%%%%%%......................../W%P%/%%%%393939393939 oz OOOOOOOOA0A0A0A01+w$$.$.$$q$q$q$H&$&$&$$$%$.$n$. $;$8$$l$$$99.=l$l`e!$]l.$$dd$$-. =84(((fXXQu/)uQ(==* K }u"'J`1(%44[ .6L "ff XuZu'/)or%z%"%"% %z]%]%]%"%%%%%h"%.%W%.mmGz %%!%%Y%%%39.=i%iZ#%DY"%%OO$%7.?Y$o%v/{++  ##2#.}3{  "'&#  'O4D-O,"[Gq C= y"ZHn B? x"ZHn B? xZH"n B? x<20(.16 6?%A96> 8;L3r*r!r ? :K6&6DD:V:$4(4DD@X@%?P9t9?Z>?R:v:? 660+0+#"3^_.Z////=ll:HaBB6,7#SSG]G*+H*G  BG5!5?r!r;?/!MB-3m  %!6B'E5EE|B\G\r>t,I'?@LP7 $a# $"T'<<<A>Y>YHSHSr.m.!-%u-8*B'%?&UWx!&'>J(.(r.a`a`m+T-^$53 F>/6m!?l"+ # ~/2Sp#2$2=222y#1X2$  / # X  $7#//:QBCX&]&4@ zFTH :  T0 /9~7Y #(58#:C_ck     " & 0 3 : D R !!!"!+!T!!""""""+"H"`"e%% 0:7Y#&57$;Dbj     & 0 2 9 D R !!!"!*!S!!""""""+"H"`"d%%b8t`NKGde`0JYoQ-Rz   $ *2.`W^ef]SqR_TUY $89AERTW]^d}i`jv&?ABFNSghmnvghXOrCD [ BPPMQZ 1%(.MGIJ!coeg{my~L %1')=/;ZTWXo@q"#3&/4'=;?>DBQOHPKF SVXZY[\_ a#`"!b$x:f(w9|>CEDGJIHQPOfc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yfc`Ca8-7,.<-8, < G Ccb PX@`Yfc`CaCc8-9,% . G#B%IG#G#a Xb!Y#B8*-:,#B%%G#G#a B C+e.# <8-;,#B%% .G#G#a #B B C+ `PX @QX  &YBB# C #G#G#a#F`Cb PX@`Yfc` + a C`d#CadPXCaC`Y%b PX@`Yfca# &#Fa8# CF% CG#G#a` Cb PX@`Yfc`# +#C`+%a%b PX@`Yfc&a %`d#%`dPX!#!Y# &#Fa8Y-<,#B & .G#G#a#<8-=,#B #B F#G+#a8->,#B%%G#G#aTX. <#!%%G#G#a %%G#G#a%%I%acc# Xb!Ycb PX@`Yfc`#.# <8#!Y-?,#B C .G#G#a ` `fb PX@`Yfc# <8-@,# .F%FCXPRYX +.0+-~,>+@+-,>+A+-,>+B+-,>+@+-,>+A+-,>+B+-,?+.0+-,?+@+-,?+A+-,?+B+-,?+@+-,?+A+-,?+B+-, EPXEX#!!YYB+e$PxEX0Y-KRXYcpBG/!*B@ L<4& *B@ PD8- * B@@ @ @ *B@@@@@ *D$QX@XdD(QXXDY'QX@cTXDYYYYY@ N>6(*DdDDaaKDDDdd`naaKD\ $ 2$ V Bd 2$ F 0 b *~ *~ 6 6   4  2 R  b  n  xCopyright 2017 The Playfair Display Project Authors (https://github.com/clauseggers/Playfair-Display), with Reserved Font Name "Playfair Display".Playfair Display SemiBoldRegular1.200;FTH;PlayfairDisplay-RegularVersion 1.200; ttfautohint (v1.8.2)PlayfairDisplay-SemiBoldPlayfair is a trademark of Claus Eggers Srensen.Claus Eggers Srensenhttp://www.forthehearts.netThis Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFLhttp://scripts.sil.org/OFLPlayfair DisplaySemiBoldWeightRomanItalicB$     bc%&d'(e !"#$)*%&'()*++,-,./01234-5.67/89:;01<=>?f2@ABCDEgFGHIJKLMNOP345QRS6TUVWX7YZ[\8]^h_`abcdefghijk9:lmno;<pqrst=uvwxyz{|Di}~kljnmEFoGHprsqIJKLtvwuMNOPQxRy{|z}STUVWX~YZ[\]      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ? ^`>@B  !a# _A      !C"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLAbreveuni1EAEuni1EB6uni1EB0uni1EB2uni1EB4uni01CDuni1EA4uni1EACuni1EA6uni1EA8uni1EAAuni1EA0uni1EA2AmacronAogonek Ccircumflex CdotaccentDcaronDcroatEbreveEcaronuni1EBEuni1EC6uni1EC0uni1EC2uni1EC4 Edotaccentuni1EB8uni1EBAEmacronEogonekuni1EBCuni01B7uni01EEuni01F4Gcaron Gcircumflexuni0122 Gdotaccentuni01E4Hbaruni021E HcircumflexIJIbreveuni1ECAuni1EC8ImacronIogonekItilde Jcircumflexuni01E8uni0136LacuteLcaronuni013BLdotNacuteNcaronuni0145EngObreveuni1ED0uni1ED8uni1ED2uni1ED4uni1ED6uni1ECCuni1ECEOhornuni1EDAuni1EE2uni1EDCuni1EDEuni1EE0 OhungarumlautOmacron OslashacuteRacuteRcaronuni0156Sacute Scircumflexuni0218uni1E9Euni018FTbarTcaronuni0162uni021AUbreveuni01D3uni1EE4uni1EE6Uhornuni1EE8uni1EF0uni1EEAuni1EECuni1EEE UhungarumlautUmacronUogonekUringUtildeWacute Wcircumflex WdieresisWgrave Ycircumflexuni1EF4Ygraveuni1EF6uni1EF8Zacute ZdotaccentIacute_J.loclNLDCacute.loclPLKNacute.loclPLKOacute.loclPLKSacute.loclPLKZacute.loclPLKabreveuni1EAFuni1EB7uni1EB1uni1EB3uni1EB5uni01CEuni1EA5uni1EADuni1EA7uni1EA9uni1EABuni1EA1uni1EA3amacronaogonek ccircumflex cdotaccentdcaronebreveecaronuni1EBFuni1EC7uni1EC1uni1EC3uni1EC5 edotaccentuni1EB9uni1EBBemacroneogonekuni1EBDuni0259uni0292uni01EFuni01F5gcaron gcircumflexuni0123 gdotaccentuni01E5hbaruni021F hcircumflexibreve i.loclTRKuni1ECBuni1EC9ijimacroniogonekitildeuni0237 jcircumflexuni01E9uni0137 kgreenlandiclacutelcaronuni013Cldotnacute napostrophencaronuni0146engobreveuni1ED1uni1ED9uni1ED3uni1ED5uni1ED7uni1ECDuni1ECFohornuni1EDBuni1EE3uni1EDDuni1EDFuni1EE1 ohungarumlautomacron oslashacuteracutercaronuni0157sacute scircumflexuni0219longstbartcaronuni0163uni021Bubreveuni01D4uni1EE5uni1EE7uhornuni1EE9uni1EF1uni1EEBuni1EEDuni1EEF uhungarumlautumacronuogonekuringutildewacute wcircumflex wdieresiswgrave ycircumflexuni1EF5ygraveuni1EF7uni1EF9zacute zdotaccentiacute_j.loclNLDcacute.loclPLKnacute.loclPLKoacute.loclPLKsacute.loclPLKzacute.loclPLKT_hc_tf_ff_f_if_f_ls_ps_tf_b.liga f_f_b.liga f_f_h.liga f_f_j.liga f_f_k.ligaf_h.ligaf_idieresis.liga f_igrave.ligaf_j.ligaf_k.ligaa.smcp aacute.smcp abreve.smcp uni1EAF.smcp uni1EB7.smcp uni1EB1.smcp uni1EB3.smcp uni1EB5.smcp uni01CE.smcpacircumflex.smcp uni1EA5.smcp uni1EAD.smcp uni1EA7.smcp uni1EA9.smcp uni1EAB.smcpadieresis.smcp uni1EA1.smcp agrave.smcp uni1EA3.smcp amacron.smcp aogonek.smcp aring.smcp atilde.smcpae.smcpb.smcpc.smcp cacute.smcp ccaron.smcp ccedilla.smcpccircumflex.smcpcdotaccent.smcpd.smcpeth.smcp dcaron.smcp dcroat.smcpe.smcp eacute.smcp ebreve.smcp ecaron.smcpecircumflex.smcp uni1EBF.smcp uni1EC7.smcp uni1EC1.smcp uni1EC3.smcp uni1EC5.smcpedieresis.smcpedotaccent.smcp uni1EB9.smcp egrave.smcp uni1EBB.smcp emacron.smcp eogonek.smcp uni1EBD.smcp uni0259.smcp uni0292.smcp uni01EF.smcpf.smcpg.smcp uni01F5.smcp gbreve.smcp gcaron.smcpgcircumflex.smcp uni0123.smcpgdotaccent.smcp uni01E5.smcph.smcp hbar.smcp uni021F.smcphcircumflex.smcpi.smcp iacute.smcp ibreve.smcpicircumflex.smcpidieresis.smcpi.loclTRK.smcp uni1ECB.smcp igrave.smcp uni1EC9.smcpij.smcp imacron.smcp iogonek.smcp itilde.smcpj.smcpjcircumflex.smcpk.smcp uni01E9.smcp uni0137.smcpl.smcp lacute.smcp lcaron.smcp uni013C.smcp ldot.smcpcacute.loclPLK.smcpnacute.loclPLK.smcpoacute.loclPLK.smcpsacute.loclPLK.smcpzacute.loclPLK.smcp lslash.smcpm.smcpn.smcp nacute.smcp ncaron.smcp uni0146.smcpeng.smcp ntilde.smcpo.smcp oacute.smcp obreve.smcpocircumflex.smcp uni1ED1.smcp uni1ED9.smcp uni1ED3.smcp uni1ED5.smcp uni1ED7.smcpodieresis.smcp uni1ECD.smcp ograve.smcp uni1ECF.smcp ohorn.smcp uni1EDB.smcp uni1EE3.smcp uni1EDD.smcp uni1EDF.smcp uni1EE1.smcpohungarumlaut.smcp omacron.smcp oslash.smcposlashacute.smcp otilde.smcpoe.smcpp.smcp thorn.smcpq.smcpr.smcp racute.smcp rcaron.smcp uni0157.smcps.smcp sacute.smcp scaron.smcp scedilla.smcpscircumflex.smcp uni0219.smcpgermandbls.smcpt.smcp tbar.smcp tcaron.smcp uni0163.smcp uni021B.smcpu.smcp uacute.smcp ubreve.smcp uni01D4.smcpucircumflex.smcpudieresis.smcp uni1EE5.smcp ugrave.smcp uni1EE7.smcp uhorn.smcp uni1EE9.smcp uni1EF1.smcp uni1EEB.smcp uni1EED.smcp uni1EEF.smcpuhungarumlaut.smcp umacron.smcp uogonek.smcp uring.smcp utilde.smcpv.smcpw.smcp wacute.smcpwcircumflex.smcpwdieresis.smcp wgrave.smcpx.smcpy.smcp yacute.smcpycircumflex.smcpydieresis.smcp uni1EF5.smcp ygrave.smcp uni1EF7.smcp uni1EF9.smcpz.smcp zacute.smcp zcaron.smcpzdotaccent.smcpuni0410uni0411uni0412uni0413uni0403uni0490uni0414uni0415uni0400uni0401uni0416uni0417uni0418uni0419uni040Duni041Auni040Cuni041Buni041Cuni041Duni041Euni041Funi0420uni0421uni0422uni0423uni040Euni0424uni0425uni0427uni0426uni0428uni0429uni040Funi042Cuni042Auni042Buni0409uni040Auni0405uni0404uni042Duni0406uni0407uni0408uni040Buni042Euni042Funi0402uni0462uni046Auni0492uni0496uni049Auni04A2 UstraitcyUstraitstrokecyuni04BAuni04C9uni04D8uni04E8uni0430uni0431uni0432uni0433uni0453uni0491uni0434uni0435uni0450uni0451uni0436uni0437uni0438uni0439uni045Duni043Auni045Cuni043Buni043Cuni043Duni043Euni043Funi0440uni0441uni0442uni0443uni045Euni0444uni0445uni0447uni0446uni0448uni0449uni045Funi044Cuni044Auni044Buni0459uni045Auni0455uni0454uni044Duni0456uni0457uni0458uni045Buni044Euni044Funi0452uni0463uni046Buni0493uni0497uni049Buni04A3 ustraitcyustraitstrokecyuni04BBuni04CAuni04D9uni04E9 uni0430.smcp uni0431.smcp uni0432.smcp uni0433.smcp uni0453.smcp uni0491.smcp uni0434.smcp uni0435.smcp uni0450.smcp uni0451.smcp uni0436.smcp uni0437.smcp uni0438.smcp uni0439.smcp uni045D.smcp uni043A.smcp uni045C.smcp uni043B.smcp uni043C.smcp uni043D.smcp uni043E.smcp uni043F.smcp uni0440.smcp uni0441.smcp uni0442.smcp uni0443.smcp uni045E.smcp uni0444.smcp uni0445.smcp uni0447.smcp uni0446.smcp uni0448.smcp uni0449.smcp uni045F.smcp uni044C.smcp uni044A.smcp uni044B.smcp uni0459.smcp uni045A.smcp uni0455.smcp uni0454.smcp uni044D.smcp uni0456.smcp uni0457.smcp uni0458.smcp uni045B.smcp uni044E.smcp uni044F.smcp uni0452.smcp uni0463.smcp uni046B.smcp uni0493.smcp uni0497.smcp uni049B.smcp uni04A3.smcpustraitcy.smcpustraitstrokecy.smcp uni04BB.smcp uni04CA.smcp uni04D9.smcp uni04E9.smcpuni0394uni03A9uni03BCuni212Buni212A uni212B.smcp uni212A.smcpzero.lfone.lftwo.lfthree.lffour.lffive.lfsix.lfseven.lfeight.lfnine.lf zero.subsone.substwo.subs three.subs four.subs five.subssix.subs seven.subs eight.subs nine.subs zero.dnomone.dnomtwo.dnom three.dnom four.dnom five.dnomsix.dnom seven.dnom eight.dnom nine.dnom zero.numrone.numrtwo.numr three.numr four.numr five.numrsix.numr seven.numr eight.numr nine.numruni00B9uni00B2uni00B3 zero.sups four.sups five.supssix.sups seven.sups eight.sups nine.supsuni2153uni2154exclamdown.casequestiondown.caseperiodcentered.case bullet.caseparenleft.caseparenright.casebraceleft.casebraceright.casebracketleft.casebracketright.caseuni00ADuni2010 hyphen.case endash.case emdash.case uni2010.caseguillemotleft.caseguillemotright.caseguilsinglleft.caseguilsinglright.case hyphen.smcp endash.smcp emdash.smcpparenleft.smcpparenright.smcpbraceleft.smcpbraceright.smcpbracketleft.smcpbracketright.smcp exclam.smcpexclamdown.smcp question.smcpquestiondown.smcpperiodcentered.smcp bullet.smcpguillemotleft.smcpguillemotright.smcpguilsinglleft.smcpguilsinglright.smcp uni2010.smcpuni00A0uni2009CREurouni20B9uni2052asciitilde.casearrowupuni2197 arrowrightuni2198 arrowdownuni2199 arrowleftuni2196 arrowboth filledboxuni25A1filledbox.case uni25A1.caseuni2105uni2116minutesecondat.caseasciicircum.casefilledbox.smcp uni25A1.smcpat.smcpampersand.smcpparagraph.smcp section.smcpasciicircum.smcp cent.smcp currency.smcp dollar.smcp Euro.smcpasciitilde.smcp uni20B9.smcp sterling.smcpyen.smcp florin.smcpuni02BCuni0308uni0307 gravecomb acutecombuni030Buni0302uni030Cuni0306uni030A tildecombuni0304 hookabovecomb dotbelowcombuni0326uni0327uni0328strokeshortoverlaycombstrokeshortoverlaycomb.smcpslashshortoverlaycombslashlongoverlaycombslashlongoverlaycomb.smcp uni0308.case uni0307.casegravecomb.caseacutecomb.case uni030B.case uni0302.case uni030C.case uni0306.case uni030A.casetildecomb.case uni0304.casehookabovecomb.case uni0326.case uni0327.case uni0328.caseacutecomb.loclPLK.caseacutecomb.loclPLK uni0308.smcp uni0307.smcpgravecomb.smcpacutecomb.smcp uni030B.smcp uni0302.smcp uni030C.smcp uni0306.smcp uni0304.smcp uni0326.smcp uni0327.smcp uni0328.smcpacutecomb.loclPLK.smcp ring.smcp tilde.smcpstrokelongoverlaycomb.casestrokelongoverlaycomb.smcpbrevecy brevecy.case brevecy.smcphacek hacek.case hacek.smcpslashLslashl slashL.smcpV6ac #%KMNQQSUXacegkmmwx{   456 $2" &044# *^DFLTlatncpspkern mark&mkmk, :^ Q    x7mmmmmmmmmmmmmmmmmmmm>mm+>+>+> +>+>   $xxxx xxxxxxxx  mmF*x?d?d?d?d?d+D+D+D+D+D+D+D+D+D+D+D+D+D+D+D+D+D    +z+z+z+z+z+z"+D!!!!!@!@!@!@!@!@!@!@!@!@!@!@!f',',',',','Z+++++++++++>?d+D+z++++++++++++++++++++++++088~8~8~8~8~8~.z+.z.0000000000088.......9l9l9l99999/99999/J/x99/9999l9l9l9l9l9l99l8888888888888/88809>9>042F2F2F2F8888882h89,9,55599999999996998\8\8\8\8\8\6F8\8\8\8\8\8\8\888898~9l8889,8999>9,9>9>9l999l9999m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@m@9m@m@?:6??????<<< > > > > > > ?J?J?J?J?J?J?J>.?J?J?J?J>|>H?J>b>|>|mzmzmz??>????DvI(??J?d?d?d?d?d?d??????????????????????????ADD`D`D`D`DvDvDvDvDvDvDEEvEEEFFFFFFFFFFFFFFFFFFFFF GGGGGHIIIIIIIII(I(I(I(I.JKz\LM\FOh>hpivlilill,l,ll,l,ijlllj6jllk:l,ljllllllllmmmmm@mzmmmn*n\nnno(oBodoooop pp"pppppppqqqq q&q0q6qDqNqXq^qhqnqtqr4r4rFsubvv{}~}~‡ pzZ$LJTJT..XXXXn?@ABCDEFGHIJ  fhjlm"<BY_fhjln//<  9:;=>?@defghijklmnopqrstuvwxy{|&'()*+,-./0123456789:;=>@AFGHIJKLMvwxy{}~      !" RSV_qrstuwxyz{|<f?<fhj l!np @@@???<f"hj l!np ?Lm"<f*h-jl)n&p*$<=>?@AOPY[]`f~$<OPY[]`f$<OPY[]`f?<f"hj l!np $$$?m"<<7  !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abc}~&'()*+,-./012456789:;=>@AFGHIJKLM{}~     "  RSV_fhlqrstuz{|  !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abc}~Mghijklm<=>?@ABCDEFGHIJ  RSVY_fhln{|A R5S5m"<B Yfhjln p<]  !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~3OP  ]fh}I A" RSV_qrstuwxyz{|A"_ ?Lm"<_q d9:;=>?@defghijklmnopqrstuvwxy{|     !"#$%&'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMSTUVWXYZ[\]^_`abcdefghijklmnopqrstvwxyz{|}~      !"KLMN RSTUV_qrstuwxyz{| ?Lm"_9:;=>?@defghijklmnopqrstuvwxy{| &'()*+,-./0123456789:;=>?ANOPQRSTUVWXYZ[\]^_`abcdefghijklnopqrst{}     #$%&'()*+,-./0123456789:;<=>?@ACDEFGHIJOP]lqrstuwxyz?Lm"_ m"<BYfhjlnp<f?< OPY]`fhj  !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abc}~ghijklmnopqrst  RSVY`fhj{|}~`fhj]`fhjPY~ Y] ~YWY ]f hj~        NNNWY]f hj WY]`fh!jOP WY`fhj~ mPY`fhj mY`fhj  !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abc}~  Y`h_fhj  !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~3NOPQRghijklmnopqrstvwxyOP  Y]`fh}~] fTTTfEEEf PPPWY]fhj9:;=>?@RSdefghijklmnopqrstuvwxy{|&'()*+,-./0123456789:;=>A{}fqrstuz_fh mY`fhj mPY`fhj`fhjfmZOPWYG]"`=f!h)j!?f mPWY`fhj OPY]`fhjWY]f hj OP WY`fhj??$<OPY]_`"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNY]`fhj~ "<BWY`fhjX     "RSV_fqrstuz{|<fhWY`fhj WY`fhj WY`f(h j "W`f<=>?@ACDEFGHIJOPY]`f~f"f <OPY]`fWY`fhj ?m"<"<BSWY`fhj{|<fy"<=>?@ABCDEFGHIJRSV_fh{|"()*+,-./0123456789:;<=>?@ABCDEFGHIJRSVWY`fhj{|}~"<BSWY`fh j{| N<]`"<fh;#$%&'<=>?@ABCDEFGHIJO]`fhj~"_f"_f"]_fuFGHIJK~      !"RSTUV] _fqrstuz{|~ "] _f9     qrstuz "]_ffsW\ehijklntxyz}~WY]`fhjpqrstuwxyz}~QWbimntv~fh}QQRSTUVWXZ[]^_`abcdfgijkmnopqrstuvw{|}~fhjlQW_QWbehlvytttttttRSTUV_hqrstuwxyz{|n)ehlnyqrstuwxyz"QW[bjkmnvfhl lnZQRSTUVWXZ[\]^_`abcdfgjkmnopqrsuvw{|}RSV_fhlqrstuz{|wxy1QWbvRSV_qrstuwxyz{|)QW[\lxzY]_`hjpHQRSTUVWXZ[\]^_`abcdfgjkmnopqrsuvw{|RSVYfhln{|~/ehly]_ lqrstuwxyzQWnfQWnvQWbehlvyRSVqrstuwxyz{|Aehijklnty}~Y]`qrstuwxyz}~lfQRSTUVWXZ[]^_`acdfgijkmnopqrstuw{|}~Y]`fhl}~ QW[mnt}WY]`fhllQW_lnt}GG]htQW[mn}YfhjlnY]`fhjqrstuz}~ Y`fhjY`fhj~RSV_qrstuz{| Y`fhj `fqrstuz~Y`fhj~Y`fhjqrstuz~RSV_fh{| Y`fhjfqrstuz FY`Y]`fhj`fhjY`fhj~]hY]`fhqrstuz}~fY`fhj}~_fhj`f _fh Y`fhj) Y]`qrstuz}~`fh~:Y]`fhj~_f%RSTUV]_qrstuz{|ffqrstuz3Y`fhjf6RSV_fh{| fRSV_fqrstuz{| Y]_fARSVY`fh{|}~qrstuzGhfh fRSVfqrstuz{|'Y]`qrstuz}~<Y]`fh}~Y]`fhf hjWY`fhj!q$<]_$<OPY]_`  `fhj[`fhqrstuz  [`fhj  [`fhj `fhj  [`fhj fh RSV[_fqrstuz{| fhj `fhj  RSVfhj{| [fqrstuz f fhj !`fh f fh  RSV[^_qrstuz{| fhj  RSV_fhj{|'()'+''('1231521DFGDIDDFD2$<lnt}!ReSe::$<lnt}e:!<n2RvSvDDDVV<=>?@ACDEFGHIJ !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQTVWXYZ\]^_`abc}~ !#_ M"QWbv . 9:;=>?@defghijklmnopqrstuvwxy{|&'()*+,-./0123456789:;=>AFGHIJKMvwxy{}~      !"QWbehvy  _sghijklnopqrst#$%&'()*+,-./0123456789:;<=>?@ACDEFGHIJijknt~!~> !"#$%&'()*+,-./0123458ABDEFGHIJKMNOPQTVWXYZ\]^_`abc}~ N  !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQ&RSTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~    ___ !"#$%&'()*+,-./0123456789:;=>ABCDEFGHIJKMNOPQRSTUVWXYZ[\]^_`abcdefghijklmvwxyz{|}~nn      !#$%&'()*+,-./0123456789:;<=>?@ACDEFGHIJKLMNQ\behlvxy}_                         n          "#egfhj % %!%"%#%$%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%8%9:;=>?@A%B%D%E%F%G%H%I%J%K%M%N%O%P%Q&R~S~T%V%W%X%Y%Z%\%]%^%_%`%a%b%c%defghijklmnopqrstuvwxy{|}%~%%%%%%%,,,,, ,  , ,,VVV,&'()*+,-./0123456789:;=>@AFGHIJKLSTUVWXYZ[\]^_`abcdefghijklvwxyz,{}~cc     QWbehlvy}~  Vc  % "egfh  !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQRuSuTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~    MMM&'()*+,-./0123456789:;=>AFGHIJKSTUVWXYZ[\]^_`abcdefz{}~                                       ZZ                            Qbehvy}uMZ    "eq! !!!"!#!$!%!&!'!(!)!*!+!,!-!.!/!0!1!2!3!4!5!8!9:;=>?@A!B!D!E!F!G!H!I!J!K!M!N!O!P!Q$RST!V!W!X!Y!Z!\!]!^!_!`!a!b!c!defghijklmnopqrstuvwxy{|}!~!!!!!!!3Wehly} !r !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~3behlvy} } !"#$%&'()*+,-./01234589:;=>?@ABDEFGHIJKMNOPQRSTVWXYZ\]^_`abcdefghijklmnopqrstuvwxy{|}~3behvy}  QW[\mntx}ReSe::$<lnt}e:!RfSf;;$<lnt}f;! "QWmnnm<BQWmnt "<QWl_QWn QW[\mnt "<B3,,     ,fhj3@@     @fhj666fhj#$%&'<=>?@ACDEFGHIJ@ <Bm<BQW[mnt}! NOPQRghijklmnopqrst"#$%&'<=>?@ABCDEFGHIJ 027CFK~!"!" !"?    &'()*+,-./012456789:;=>AM{}"= > ? @ A CDEFGHIJ   RfSf000CC&  ""<QWl_7:?bI ,zx|4>M Ghl/6D5 `Z59;4=B7DK=MTEVpMwyh{|kmx  29;=@ BK MUW[ bl%nt0v7Ak!#;=ACNTXZZ]f jknwz|~"%()*,-/12=@JMOQRTVXZ\fhruwxyz }RUquw #4$59;=@AB DE FF?GK MQ RS?TT@VV@W\!]] ^cdpwy{{||5%&""''AASD  ))#^###$$%%&29;==>>?@(BE9FKMMDNRglntvy2zz{{||}}~~2D##(())7  E E8*_ 3* :! #',(; =A1CJKN3TV;WW<XXTZZT]_ `aVbd ee.ff jkWnn oo<pp qq<rr st-uu vw-zz.{| ~~U. -`;<U.$FGYYJ$[=[GG>>$]$aFJ=$XHZZI I / \ H H 0 0/ / 0   /    @8RS6TUKquwyBzz{|6}}R~~+R+LNLNQMOMOCPP++E 5889;=@ABDKMQRS0TTVZ\cdy{|}~ <     ,%&2334;=>@@3AABEFKLL3MMNR"Sf glntvy%zz{{||}}~~% F9&!#'#(; =A$CJKN&RVXXZZ]abb=cdee'fghh'ii-jk>osuuvv=wwyy'{|~~--G1' ? @  )  @ C/ /H ? )/ A((.BA(..D(     RS TU2VV quwy*zz{| }};~~!;!4747:5858+66!! (   T$2"(.cjsd`cA  (" &044#$ "(.4:@FLRX^cVbQ5*`c````````?`$JPV\bhntz cV;bQZ5+<c<<<<6<<?< (R "$024)1aca  #%KMFyNQQ3SU4Xa7ceAgkDmmIwxJ{LQW[]`fgiklmpqrux{ 56, $*06<BHNTZ`flrx~cVcjsbQd5*`c`````````?`djpjpjpjppjpjpjpjpjpjppjpjpjpjpdpjp jpjpdjpdjpjpjp````(.(.".(.X  4   F :LF @ F   XL R  X  T~Tjdj^jdjdjjjj<<ppv|v||v|lflfllflNTrTTrTTrTTTrTNrTTNTrTNrTTrTTTNTrTrTNxxxBH     $*$*$*$*$*$*z*$* $*$*$*z*$* $*$*$*$*$*$*$*jp0<6<6<6<6<06N6N6N60BN6H6N6T~~Z`flrTx~Z`f`f`f`ff`f`f`f`f`f`ff`f`f`f`fZfD`f`f`fZ`f`f`f~8~2 ~~8 &,28~8>D>JDJbh\hPhVhdhbh\hbh,2,2n2t2zJP4PPPP PPP4PJ"P(PJP4PJ"P(P4P4P.PJP4P4P:@FLRXjp^pdpjpv| & *$*06<PBHVNTN~TZ`flf~lrxV~V\8884ztzztz@zz@zzztztz4tzLztz4zRzLR@F@FFF(.(.(.(.(.(..(. (.(.(.(.&(.,>2>>>8DV^^2>JVDVPVJVPVX^^\^b^h^bzh^n^t^^Xz^^X^^Xz^^^^^X^^^(.                  ":.:(:.:4:4:t:@:t:4Ft:L:R:X2^2^2^2djpjp$v|   *<NT < $*<0606<BHNTZ`flrx~JP & &,28>DJPV\ bhznztz"(.(.@FX^(.(.(.(. "(.@F4:4:@FLRX^djpv|FZEeF6lF|GAEFMMh8Z/l8|EA68zZzZA{ZyZ0l|AK::czjGdZbdddv2A@B++vyr"+/A;v{K" ))  A ); K%!A;%&4677 A0;/(K!K5A5;6-A; 755K!5666 )6(+AL7<`]6J<J`U-.).(KA+`+<,=`tv<u6<<66A<6<]<`l<l`m<dst6tG)t(vAtRt<u<`xI<]< <6`yC<ST6^AjTRT`T<U<_S`A`6<<.64AD.R%`%<FHH 998@%%vQQP"(KGE>B2nn^CC<@)K LK,&-6`*`</`/<.<L#`<<[<;`]`fB`BIaJ=Q`N`"<````z[`<.`5`r`st`wFG{|6<+Tu`uaRI`P<< *DFLTlatnD@ AZE hCAT CRT KAZ MOL NLD :PLK fROM TAT TRK            aaltc2sccaltcaseccmpdligdnomfracligalnumlocllocllocllocllocllocl locllocllocllocl$numr*onum0ordn6rlig>sinfDsmcpJsubsPsupsV $'!#   "*VR  ,, N    F F T v : \ ~ ."^       !"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKMN      !"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKMN./01234567L " 56$^`c\f`"%(FHH1JL2NP5Rv8xy]{_Qd  #8AWWYY__JB(4@LXdpv|  &,28>D&LO{ |P}~KR&L$.8E%/9B&0:C'1;D(2<F)3=G *4>H!+5?I",6@J#-7AKabcdklmnopwxyz()*'+,-./!0#1$2%3&4B_de &'GIQwXZ[\efghijqstu'KRIQ {|}~' _e 'Gw >(> JJ [[W[[ RzG>0 EBCDFGHIJK_( "BL*.78A $ld&OPOPd&&R^ #h&@T^qq_`_`qf0      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN()*+,-./0123 564Q  W\ejqqsu '(,-''/b.      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN()*+,-./0123 564FS W"L`Ny{W\ejqqsu  %&*+''-h1 !"#abcdklmnopwxyz !"#$%&XX Z\ ejqqsu !-''02  N ?NF*  FR E (08@HPV\bhntz  Pb&8%&&%&Q   * !"#$%&'' \$(J)&& !"#$%& ''$wghtital././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PyGameMono-18-100dpi.bdf0000644000175100001770000000363314676242340022316 0ustar00runnerdockerSTARTFONT 2.1 FONT -FontForge-PyGameMono-Medium-R-Normal--25-180-100-100-M-250-ISO10646-1 SIZE 18 100 100 FONTBOUNDINGBOX 21 22 0 0 COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" COMMENT "Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)" STARTPROPERTIES 29 FOUNDRY "FontForge" FAMILY_NAME "PyGameMono" WEIGHT_NAME "Medium" SLANT "R" SETWIDTH_NAME "Normal" ADD_STYLE_NAME "" PIXEL_SIZE 25 POINT_SIZE 180 RESOLUTION_X 100 RESOLUTION_Y 100 SPACING "M" AVERAGE_WIDTH 250 CHARSET_REGISTRY "ISO10646" CHARSET_ENCODING "1" FONTNAME_REGISTRY "" CHARSET_COLLECTIONS "ISO10646-1" FONT_NAME "PyGameMono" FACE_NAME "PyGame Mono" FONT_VERSION "001.000" FONT_ASCENT 20 FONT_DESCENT 5 UNDERLINE_POSITION -2 UNDERLINE_THICKNESS 2 RAW_ASCENT 800 RAW_DESCENT 200 RELATIVE_WEIGHT 50 RELATIVE_SETWIDTH 50 FIGURE_WIDTH -1 AVG_UPPERCASE_WIDTH 250 ENDPROPERTIES CHARS 5 STARTCHAR .notdef ENCODING 0 SWIDTH 1000 0 DWIDTH 25 0 BBX 20 20 0 0 BITMAP FFFFF0 FFFFF0 FE07F0 F801F0 F000F0 E00070 E00070 C00030 C00030 C00030 C00030 C00030 C00030 E00070 E00070 F000F0 F801F0 FE07F0 FFFFF0 FFFFF0 ENDCHAR STARTCHAR A ENCODING 65 SWIDTH 1000 0 DWIDTH 25 0 BBX 20 21 0 1 BITMAP 03FC00 1FFF80 3FFFC0 7C03E0 F000F0 E00070 E00070 F000F0 FC03F0 FFFFF0 FFFFF0 FFFFF0 FF0FF0 7C03F0 7801E0 7800E0 7000E0 700060 600060 200040 200040 ENDCHAR STARTCHAR B ENCODING 66 SWIDTH 1000 0 DWIDTH 25 0 BBX 18 20 1 0 BITMAP FFFE00 FFFF80 7E0780 7801C0 7000C0 3000C0 3000C0 3801C0 3E0780 3FFF00 3FFF00 3E0780 380180 3000C0 3000C0 3000C0 7801C0 7E07C0 FFFF80 FFFE00 ENDCHAR STARTCHAR C ENCODING 67 SWIDTH 1000 0 DWIDTH 25 0 BBX 20 20 0 0 BITMAP 00FC00 03FF00 0FFF80 1F03E0 3E0070 7C0010 780000 F80000 F00000 F00000 F00000 F00000 F80000 780000 7C0010 3E0070 1F01E0 0FFFC0 03FF80 00FE00 ENDCHAR STARTCHAR u13079 ENCODING 77945 SWIDTH 1000 0 DWIDTH 25 0 BBX 21 10 0 5 BITMAP 03FC00 0FFF80 1E73C0 78F8F0 F0F878 70F870 3870E0 1E03C0 0FFF80 03FC00 ENDCHAR ENDFONT ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PyGameMono-18-75dpi.bdf0000644000175100001770000000316014676242340022244 0ustar00runnerdockerSTARTFONT 2.1 FONT -FontForge-PyGameMono-Medium-R-Normal--19-180-75-75-M-190-ISO10646-1 SIZE 18 75 75 FONTBOUNDINGBOX 15 17 0 0 COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" COMMENT "Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)" STARTPROPERTIES 29 FOUNDRY "FontForge" FAMILY_NAME "PyGameMono" WEIGHT_NAME "Medium" SLANT "R" SETWIDTH_NAME "Normal" ADD_STYLE_NAME "" PIXEL_SIZE 19 POINT_SIZE 180 RESOLUTION_X 75 RESOLUTION_Y 75 SPACING "M" AVERAGE_WIDTH 190 CHARSET_REGISTRY "ISO10646" CHARSET_ENCODING "1" FONTNAME_REGISTRY "" CHARSET_COLLECTIONS "ISO10646-1" FONT_NAME "PyGameMono" FACE_NAME "PyGame Mono" FONT_VERSION "001.000" FONT_ASCENT 15 FONT_DESCENT 4 UNDERLINE_POSITION -2 UNDERLINE_THICKNESS 1 RAW_ASCENT 800 RAW_DESCENT 200 RELATIVE_WEIGHT 50 RELATIVE_SETWIDTH 50 FIGURE_WIDTH -1 AVG_UPPERCASE_WIDTH 190 ENDPROPERTIES CHARS 5 STARTCHAR .notdef ENCODING 0 SWIDTH 1000 0 DWIDTH 19 0 BBX 15 15 0 0 BITMAP FFFE FFFE FC7E F01E E00E C006 C006 C006 C006 C006 E00E F01E FC7E FFFE FFFE ENDCHAR STARTCHAR A ENCODING 65 SWIDTH 1000 0 DWIDTH 19 0 BBX 15 17 0 0 BITMAP 0FE0 3FF8 783C F01E E00E E00E F01E F83E FFFE FFFE FC7E 701C 701C 600C 600C 4004 4004 ENDCHAR STARTCHAR B ENCODING 66 SWIDTH 1000 0 DWIDTH 19 0 BBX 15 15 0 0 BITMAP FFF8 7FFC 780E 3006 3006 380E 3FF8 3FF8 3FF8 380E 3006 3006 7C1E 7FFC FFF8 ENDCHAR STARTCHAR C ENCODING 67 SWIDTH 1000 0 DWIDTH 19 0 BBX 15 15 0 0 BITMAP 03E0 0FF8 3C1C 7806 7000 E000 E000 E000 E000 E000 7000 7806 3C1C 0FF8 03E0 ENDCHAR STARTCHAR u13079 ENCODING 77945 SWIDTH 1000 0 DWIDTH 19 0 BBX 15 7 0 4 BITMAP 0FE0 3838 638C E38E 638C 3838 0FE0 ENDCHAR ENDFONT ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PyGameMono-8.bdf0000644000175100001770000000252514676242340021241 0ustar00runnerdockerSTARTFONT 2.1 FONT -FontForge-PyGameMono-Medium-R-Normal--8-80-75-75-C-80-ISO10646-1 SIZE 8 75 75 FONTBOUNDINGBOX 6 7 0 0 COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" COMMENT "Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)" STARTPROPERTIES 29 FOUNDRY "FontForge" FAMILY_NAME "PyGameMono" WEIGHT_NAME "Medium" SLANT "R" SETWIDTH_NAME "Normal" ADD_STYLE_NAME "" PIXEL_SIZE 8 POINT_SIZE 80 RESOLUTION_X 75 RESOLUTION_Y 75 SPACING "C" AVERAGE_WIDTH 80 CHARSET_REGISTRY "ISO10646" CHARSET_ENCODING "1" FONTNAME_REGISTRY "" CHARSET_COLLECTIONS "ISO10646-1" FONT_NAME "PyGameMono" FACE_NAME "PyGame Mono" FONT_VERSION "001.000" FONT_ASCENT 6 FONT_DESCENT 2 UNDERLINE_POSITION -1 UNDERLINE_THICKNESS 1 RAW_ASCENT 800 RAW_DESCENT 200 RELATIVE_WEIGHT 50 RELATIVE_SETWIDTH 50 FIGURE_WIDTH -1 AVG_UPPERCASE_WIDTH 80 ENDPROPERTIES CHARS 5 STARTCHAR .notdef ENCODING 0 SWIDTH 1000 0 DWIDTH 8 0 BBX 6 6 0 0 BITMAP FC 84 84 84 84 FC ENDCHAR STARTCHAR A ENCODING 65 SWIDTH 1000 0 DWIDTH 8 0 BBX 6 7 0 0 BITMAP 78 84 84 FC 84 84 84 ENDCHAR STARTCHAR B ENCODING 66 SWIDTH 1000 0 DWIDTH 8 0 BBX 6 6 0 0 BITMAP FC 44 78 4C 44 FC ENDCHAR STARTCHAR C ENCODING 67 SWIDTH 1000 0 DWIDTH 8 0 BBX 6 6 0 0 BITMAP 78 C4 C0 C0 C4 78 ENDCHAR STARTCHAR u13079 ENCODING 77945 SWIDTH 1000 0 DWIDTH 8 0 BBX 6 4 0 1 BITMAP 78 B4 B4 78 ENDCHAR ENDFONT ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PyGameMono.otf0000644000175100001770000000607014676242340021130 0ustar00runnerdockerOTTO PCFF B{ IEBDT&^z EBLCW 6J TFFTMf<; GDEF4$ X(OS/2YgnL@`cmapeE\headB.6hhea$hmtx (maxpP8nameI!{post3 N_< ΁#΁# Z P1  PfEdA 8ZA K (l       P    Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)PyGameMonoPyGameMonoMediumMediumFontForge 2.0 : PyGame Mono : 14-10-2013FontForge 2.0 : PyGame Mono : 14-10-2013PyGame MonoPyGame MonoVersion 001.000 Version 001.000 PyGameMonoPyGameMono,T, T(CA 4AC0y0y2 PyGameMono- &#R]gu13079Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net)PyGame MonoPyGameMono"#$n5TQ $9Xhƨnnht9XSƨSƨrnt9XQhQhrnƨ9X8$vMt?+opt++pooo?+Md'cF=q J|`H~~Ղ*~raWWaI~Qh~Lq \sPBBP$N@@NxvfnNj|fU@hΡHBN8X*_L@LhC6bY'=1 11()MQT9k9w9s? &LR\ͯXX$l+l66+l+l66+llll0Iq<25@5@q225@ss5@<2I&:FiiiD&iQDQFiY*|w ͕ ێ  az@G{0z^? @93g?p7s78p3 pq7v8h((  )15"Giɉo1~auk././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0231118 pygame-2.6.1/test/fixtures/fonts/PyGameMono.sfd0000644000175100001770000001451114676242340021113 0ustar00runnerdockerSplineFontDB: 3.0 FontName: PyGameMono FullName: PyGame Mono FamilyName: PyGameMono Weight: Medium Copyright: Created by Lenard Lindstrom,,, with FontForge 2.0 (http://fontforge.sf.net) UComments: "2013-10-11: Created.+AAoACgAA-pygame - Python Game Library+AAoA-Test font PyGameMono, Copyright (C) 2013 Lenard Lindstrom+AAoACgAA-This library is free software; you can redistribute it and/or+AAoA-modify it under the terms of the GNU Library General Public+AAoA-License as published by the Free Software Foundation; either+AAoA-version 2 of the License, or (at your option) any later version.+AAoACgAA-This library is distributed in the hope that it will be useful,+AAoA-but WITHOUT ANY WARRANTY; without even the implied warranty of+AAoA-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+AAoA-Library General Public License for more details.+AAoACgAA-You should have received a copy of the GNU Library General Public+AAoA-License along with this library; if not, write to the Free+AAoA-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA+AAoACgAA" Version: 001.000 ItalicAngle: 0 UnderlinePosition: -100 UnderlineWidth: 50 Ascent: 800 Descent: 200 LayerCount: 2 Layer: 0 0 "Back" 1 Layer: 1 0 "Fore" 0 XUID: [1021 912 78401767 10725709] FSType: 8 OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 1 CreationTime: 1381544181 ModificationTime: 1381781368 PfmFamily: 49 TTFWeight: 500 TTFWidth: 5 LineGap: 90 VLineGap: 0 OS2TypoAscent: 0 OS2TypoAOffset: 1 OS2TypoDescent: 0 OS2TypoDOffset: 1 OS2TypoLinegap: 90 OS2WinAscent: 0 OS2WinAOffset: 1 OS2WinDescent: 0 OS2WinDOffset: 1 HheadAscent: 0 HheadAOffset: 1 HheadDescent: 0 HheadDOffset: 1 OS2FamilyClass: 2319 OS2Vendor: 'PfEd' MarkAttachClasses: 1 DEI: 91125 LangName: 1033 Encoding: UnicodeFull UnicodeInterp: none NameList: Adobe Glyph List DisplaySize: -24 AntiAlias: 1 FitToEm: 1 WinInfo: 77904 24 18 BeginPrivate: 0 EndPrivate TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144 BeginChars: 1114112 5 StartChar: A Encoding: 65 65 0 Width: 1000 VWidth: 0 HStem: 0 21G<72.5 119.695 682.5 726.5> 384 111<312.148 495.257> 777 123<264.353 535.647> VStem: 0 139<585.021 689.951> 661 139<585.002 688.082> LayerCount: 2 Fore SplineSet 139 636 m 0 139 558.168 255.928 495 400 495 c 0 544.072 495 661 558.168 661 636 c 0 661 713.832 544.072 777 400 777 c 0 255.928 777 139 713.832 139 636 c 0 100 0 m 1 45 234 0 361.682 0 600 c 0 0 834 205 900 400 900 c 24 595 900 800 822 800 600 c 0 800 360.834 753 234 700 0 c 1 665 180 590.045 384 400 384 c 24 209.955 384 139.39 149.76 100 0 c 1 EndSplineSet Validated: 1 EndChar StartChar: B Encoding: 66 66 1 Width: 1000 VWidth: 0 HStem: 0 91<307.884 570.044> 355 97<317.65 572.008> 724 76.4445<315.347 574.736> VStem: 120 80<174.135 277.365 535.109 572> 694 106<173.306 274.441 532.71 643.215> LayerCount: 2 Fore SplineSet 200 223 m 0 200 150 303 91 437 91 c 0 571 91 694 150 694 223 c 0 694 296 571 355 437 355 c 0 303 355 200 296 200 223 c 0 202 588 m 0 202 513 312 452 448 452 c 0 584 452 694 513 694 588 c 0 694 663 584 724 448 724 c 0 312 724 202 663 202 588 c 0 800 200 m 0 800 92 749 1 552 0 c 0 430 -0 253 -0 0 0 c 1 85 41 120 216 120 400 c 0 120 572 73 756 0 800 c 1 150 800 273.778 800.444 372.519 800.444 c 0 421.889 800.444 465 800.333 502 800 c 0 785 799 800 665 800 600 c 0 800 540 781 510 760 490 c 0 730 461 694 453 694 400 c 0 694 358 723 339 760 310 c 0 781 294 800 259 800 200 c 0 EndSplineSet Validated: 1 EndChar StartChar: .notdef Encoding: 0 0 2 Width: 1000 VWidth: 0 HStem: 0 88<283.168 514.832> 712 88<283.168 514.832> VStem: 0 83<285.634 514.366> 715 85<285.634 514.366> LayerCount: 2 Fore SplineSet 83 400 m 0 83 227.776 224.568 88 399 88 c 0 573.432 88 715 227.776 715 400 c 0 715 572.224 573.432 712 399 712 c 0 224.568 712 83 572.224 83 400 c 0 0 800 m 1 800 800 l 1 800 0 l 1 0 0 l 1 0 800 l 1 EndSplineSet Validated: 1 Comment: "Default character" EndChar StartChar: C Encoding: 67 67 3 Width: 1000 VWidth: 0 HStem: 0 110<323.65 572.264> 690 110<326.99 550.385> VStem: 0 147<291.893 504.85> LayerCount: 2 Fore SplineSet 425 110 m 0 564 110 687 167 788 230 c 1 796 230 796 230 800 230 c 1 800 222 800 224 800 216 c 1 753 98 621 -0 450 0 c 0 227 0 0 165 0 400 c 24 0 635 235 800 450 800 c 1 580 800 745 668 800 584 c 1 800 575 799 576 800 570 c 1 796 570 796 570 791 570 c 1 684 628 535 690 425 690 c 0 277 690 147 557 147 400 c 0 147 243 268 110 425 110 c 0 EndSplineSet Validated: 1 EndChar StartChar: u13079 Encoding: 77945 77945 4 Width: 1000 VWidth: 0 HStem: 200 66<262.666 534.533> 302 196<339.508 460.492> 534 66<262.278 535.629> VStem: 302 196<339.508 460.492> CounterMasks: 1 e0 LayerCount: 2 Fore SplineSet 302 400 m 0 302 454.096 345.904 498 400 498 c 0 454.096 498 498 454.096 498 400 c 0 498 345.904 454.096 302 400 302 c 0 345.904 302 302 345.904 302 400 c 0 146 400 m 0 146 326.032 259.792 266 400 266 c 0 540.208 266 654 326.032 654 400 c 0 654 473.968 540.208 534 400 534 c 0 259.792 534 146 473.968 146 400 c 0 0 400 m 1 124 550 225.587 600 400 600 c 24 574.413 600 690 532 800 400 c 1 720 254 574.413 200 400 200 c 24 225.587 200 90 234 0 400 c 1 EndSplineSet Validated: 1 EndChar EndChars BitmapFont: 8 6 6 2 1 BDFChar: 0 65 8 0 5 0 6 G_CbJKS5!Y BDFChar: 1 66 8 0 5 0 5 r'Yd'7/R#b BDFChar: 2 0 8 0 5 0 5 r.K`VK_tfM BDFChar: 3 67 8 0 5 0 5 Gf7D5`-;7^ BDFChar: 4 77945 8 0 5 1 4 GdOi& EndBitmapFont BitmapFont: 19 6 15 4 1 BDFChar: 0 65 19 0 14 0 16 &)]\IGWbI:i""ZTn/h?gs8N&tr-iT)E#`6o?jo:'5Qh&e BDFChar: 1 66 19 0 14 0 14 s7h*AGRcD30EsKH5PRJ<5PR2J0Es38Hlde8s7cQo BDFChar: 2 0 19 0 14 0 14 s8N&tr-n,Vi"!O,^]qRY^]qRYi"#5tr-n\Fs8Duu BDFChar: 3 67 19 0 14 0 14 "5j^b4:`!'UX<3!"O`!5L8g^b>c(GQGU/#JgB>JH,TK BDFChar: 2 0 25 0 19 0 19 s8VTgs7$!mnG!%Rn,Vt9!-$irE52H-^]6((!&21g0YdZB^]6(H!-$irE:DHKMU[eq~7   " & : D t !"!!"$#  08=AGJMPX^nx7   & 9 D t !"!!"$#>82+C1J"$&*,244>DRX`^hj  &65(A)7,8-[*9+H\V]J';:G.</=ZL0>%^1? @!B4C"_2D3E#`$F   Mcda  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~cae bQNOYdMP    2 Inconsolata5E 'G !)19AIR[dmv#-7AKU_is} '1;EOYimw~ %+17=CPV[hpw} $07=MTW]cmsy-8CNameMe.1NameMe.2NameMe.3NameMe.4NameMe.5NameMe.6NameMe.7NameMe.8NameMe.9NameMe.10NameMe.11NameMe.12NameMe.13NameMe.14NameMe.15NameMe.16NameMe.17NameMe.18NameMe.19NameMe.20NameMe.21NameMe.22NameMe.23NameMe.24NameMe.25NameMe.26NameMe.27NameMe.28NameMe.29NameMe.30NameMe.31NameMe.127NameMe.128NameMe.129NameMe.130NameMe.131NameMe.132NameMe.133NameMe.134NameMe.135NameMe.136NameMe.137NameMe.138NameMe.139NameMe.140NameMe.141NameMe.142NameMe.143NameMe.144NameMe.145NameMe.146NameMe.147NameMe.148NameMe.149NameMe.150NameMe.151NameMe.152NameMe.153NameMe.154NameMe.155NameMe.156NameMe.157NameMe.158NameMe.159nonbreakingspaceeurosofthyphenuni00B2uni00B3microuni00B9uni02CBuni02C9circumflex.capcaron.capgrave.capacute.capomacronAogonekLcaronSacuteScedillaTcaronZacuteZdotaccentRacuteAbreveLacuteCacuteCcaronEogonekEcaronDcaronDcroatNacuteNcaronOhungarumlautRcaronUringUhungarumlautTcedillaaogonekabreveccarondcaroneogoneklcaronlacutenacutencaronohungarumlautrcaronsacutecacutescedillatcedillauringuhungarumlautzdotecaronNameMe.329kgreenlandicdotlessjenguparrowdownarrowvisiblespacer.serifgbrevehungarumlaut.capuni2074EngdcroatGbreveIdotaccentracutetcaronzacutezero.noslash001.010Created by Raph Levien using his own tools and FontForge. Copyright 2006 Raph Levien. Released under the SIL Open Font License, http://scripts.sil.org/OFL.InconsolataInconsolatah  !"#$%&'()*+,-./0123456789:;<=>?@|BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abdfjsrx{A}~klguiwvy c    tepqg  #&),/258;>ADGJMPSVY\_`_ j   WPl Tj"oi3A\jYgZ " 0 !#d#####$_$$$%%E%u%%&&(())++(,^,y,--/f/o/0151C1Q1_1m2"23n3|3557888888888888888888888888888888888889;=@@@CCDFFFGH,H:HIJrL L'MN5NCN^NOaOQLT-TUUUUVVBVwW|XZHZcZ~ZZZZ[[:[U[p[[[\\E\^^^__7_R`bsbbbccHc}fhhhi i?iZiuiikXkskkkllHmnnnno o;op pp(p6pDpRp`pnp|pppppqrrrrsssYsgsusuLu~uw#xzz{{~~~7_zҀ0KfÁKkʉP%@[vƊNvZx.@q;@@5%@NG@[P! G&a+Ry@@]@ʀ:pz@@D<:@@Z@@@!q+&6^G+_@&` Ih.)@ )*@޻w@@Q1 i@b@"@%z>@Yo?܀\ox OĒ@@ Q2@=^<@2@7ZJFLA}7@@@E2@"Z@@,@D@ @C;Hn@@X@1Ju@-@7X@ @E@2ȝ<<27J@N@\ꖀ@;<Py@u9žn^!@3@$L(Ν@@B@l@YCW@=% '13@7;@@:@,@Z%@^&(@F@,@ @@a9i@W@@dSڀ>j@@4A;@#*AXAjMZ8{+ڀR#u$ @@УpN@ећ[@`> #L@$U@7A@Sf@@Y@׽(:3@85#@"n?\ @<e>cR@HJ]@_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@%@al &|, @U:'$@;@"+'@⦀K@VX@& d@'ו@@t Ϭ.0T@,5!X#`@x_@,@3 @wLjmr@7@ԏ *@ hl@9eF@&3@Q*@Ÿ%̝ ׀@`@,ýS7et @նdy_@2 4 @mJ@2 ˀd %{Q@eՀMM."@@l ]"@"@]@]"@"@]@ @@r@li@@~kz@@ 00r@' },@ϳ(-23@('03 %uQ@4>C Ӏ!># @Ҁ4@ *@@P@C@ 5@@ @@ Ā @@U{4YH^@ C'@6@6@&Ed0BN%D(;*c8E>'/24\)xpg^VME<3+"0& $3@8 KC[F {x,op2?2yKC C(::::QQQQ2T2222:7111111 80000dddd(D(((((F(>>>><,Z{dp}dqq(D B33228B((::5228221180=NDD(c888E>>2N0B0DN==::0>&eeK2%$Qc,211>ŝNYvų././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/fixtures/fonts/test_sans.ttf0000644000175100001770000040374014676242340021132 0ustar00runnerdocker FFTMGGDEF'GPOSGSUBpfpgms#gasp glyf#$head8',6hheaKd$hmtxA  loca).vHmaxp  nameñvpost,(P>prepz^ =r_<ğO ğO `gH>NC`gRT/Z33f Px1ASC@ Q3>`: 999Ws sIVHh !d9[99sPssgsNs/sRshsisYs`99edesTVVhV9g9 Vs9aV9aV].V  V.V-A999 sjsWsWsVsW9sVsssVssV99s1""\ss:sqsss-sSdk3zdA)HLP9wPsS88IVVVVVVhVVVV9 9999a9a9a9a9a9GV-VsWsWsWsWsWsWBWsWsWsWsW9 999sVssVsVsVsVsVdA,sssssVsWVsWVsWhWhWhWhWVsVVsWVsWVsWVsWVsW9gsV9gsV9gsV9gsVss 999 9 999\99 Vs[s~sUssssss9asV9asV9asVaV8V]9V]9V]9V]9.9..9ssssss V-V-A1A1A1sVsWB9G,V]9.933PW9F2AVVhX=VA9a9VX 3Z9aVl.V-buV.W9V-VFsj`VtVFVsjsjVsVOVV)`0U3?S`sV`?SW.UhV]99 u.7V@VUkVcC@9aVh.7vV.UUU.@i`sWx@sWZ1xx ksVUsW#V+zk-+7UsWs W99@ s kJ   V-[[[sk~KKKssQ7UUXYV`ess:sE%lXP=]8ed3W1d8dAdd?dAd"g{mm))s+kUFQ@;@<fBw5+-|ZjZH-/ H@~~ O\_   " & 0 3 : < > D  !!!!"!&!.!^!!"""""""")"+"H"a"e###!%%% %%%%%$%,%4%<%l%%%%%%%%%%%%%%%&<&@&B&`&c&f&k ~Q^   & 0 2 9 < > D  !!!!"!&!.![!!"""""""")"+"H"`"d### %%% %%%%%$%,%4%<%P%%%%%%%%%%%%%%%&:&@&B&`&c&e&jG/vhzzxt 0-%$?2#ED;852/(!ܹܴܱܩܝJGF)'&# bcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?w7   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`apcdhvnj$ti=8q?@fu254;kzvbm7@<3l{   ~8 w KRoNOPxSQL@EYXUTSRQPONMLKJIHGFEDCBA@?>=<;:9876510/.-,('&%$#"! ,E#F` &`&#HH-,E#F#a &a&#HH-,E#F` a F`&#HH-,E#F#a ` &a a&#HH-,E#F`@a f`&#HH-,E#F#a@` &a@a&#HH-, <<-, E# D# ZQX# D#Y QX# MD#Y &QX# D#Y!!-, EhD ` EFvhE`D-, C#Ce -, C#C -,(#p(>(#p(E: -, E%EadPQXED!!Y-,I#D-, EC`D-,CCe -, i@a ,b`+ d#da\XaY-,E+)#D)z-,Ee,#DE+#D-,KRXED!!Y-,KQXED!!Y-,%# `#-,%# a#-,%-,F#F`F# F`ab# # pE` PXaFY`h:-, E%FRKQ[X%F ha%%?#!8!Y-, E%FPX%F ha%%?#!8!Y-,CC -,!! d#d@b-,!QX d#d b@/+Y`-,!QX d#dUb/+Y`-, d#d@b`#!-,KSX%Id#Ei@ab aj#D#!# 9/Y-,KSX %Idi &%Id#ab aj#D&#D#D& 9# 9//Y-,E#E`#E`#E`#vhb -,H+-, ETX@D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 0/ ?     ?]]]/]]3]]3qr910]]]]% '7%73-ww- ZgIHHIk)dG G@.    8 7?3]]322]]/]3210]]]]#!5!3!X`TT N H @ H @ P   @&)H @ H  //++]qr3+10+%#>5#5 {-1Xۨ5WKB AA[Op!@@p//]q//]105![Р~.@ @P@ H//+]qr1035393@y H) ??/8]810]+]3i P#'p@PY%i%F!V!f!VfYivy   yvn@)n?  s#s??/]]10^]]]]]]]]]]]]#".54>324.#"32>#MfgKKjeL(NqHLtO()OrIGrO+JJCCը߅78ߧއ;; ^@  n/@HDTdHt?2?33+/3]+/^]3/]/]2/]1035!5%3!gMW<g (@Muuze%V%)!Y!i!i##u'n@@&*H@*nt&&& @&H&\l|  s&t?9?3]]]9/+]33]/]q+210]]]]]]]]]]]35>54.#"'>32!g3O$D_:6_J/ Btkiq<3Upz|mVu||V<[>54&#"'>32?yst: +JlJEgy3fb3n[;w P{Yvl3"HoNU~R)ai7AkI8\B$N_57^Iqzo][-;eM>lV> ;Xp/7 u@Pvv@ H[ k {  op0Ps ??39/32/^]qr3322]/+3]q10]]]]]#!533!qh??Lw$% R,@V f UeZjU+e+U*e*&@YH $$$$D!# H# n@/.$%n! n ?  s(($t!ss g   ?3]]]?9//]q3/322]qr9+10_q_qr]]+]]]]]#".'732>54.#"#!!>32@~{orC (EeHFrQ,*NqH-LA5/!0civ@jF4[zF(K;#+TzOAmO,%A%5@uh$8@0zYiZjzTdT#d#t#T"d"t"5E22@- H%5Euon@/%%%%:/n  @&H *u 4s4s??3]9/2/+]2]q2/10]]]+]]]]]]]]]#".54>32.#">324.#"32>;so{z=EvH~gN{QJxT-1s`o=$HjF1dQ3(KjBAgH&jG^`CnP[QFҌ[_>upIvS-AjLNd:-Uzi D@-z i nP   _ @` t ??2/]q3/]q9/10]] #47!5! jGPe E9.Y)=Q@u((u!!uuuzzz zzzuUEeEUKeKZAjA4n*n$O n@>>>/>>>>SHn  $Cu99M/uMu??9/99/q]qr99//q9910]]]]]]]]]]]]]]]#".54>75.54>324.#"32>4.#"32>9u||w9/Oe6;]?!9pmso6!?]==hL,>dIGb?:fPUg7#DsVOoE FrQRpDZn>>mYMxW5 >Wj;Jc9:cJ:jW=  5WxL5X?##?X5*XH..HX3_I--Ja4AkM**Mm`$8@i'  t##t zz{Z(j(Yi H6%n/?O 0@: o /n @ &H4s_o*s"s  ?3]?9/]2/+]3/^]qr310]+]]]]]]]]]]]]#".'732>7#".54>324.#"32>GvQfHw[IyU0I]l7`l;?xo%IkFAhH'#FhE2gS5ݼ^!FpOEЌ/J3E|km{BNf;.UzKGzY3"Fk~:6@$@P@ H?//+]qr32105353k: Y@ H @ H @ P   @&)H @ H  /?/++]qr3+3310+%#>5#553 {-1XϜ5WKB AAeHj@H(H(H@3H Pp ?0p?o/]33]]/]/]310]+]+++5 eZ;dXGF@1@` p /_oP/]]]/]]3/]q3105!5!dXeHj@H(H(H@3H Pp 0p??o/]]]33/]3/]10]+]+++75 5eZ㚙on^T'%)@Du$$u##ZjZZzZ z :J H )))&&FF @@&,H!_  '&L_!?3]/]9/+]/9/q3/10]]]]]]]#>54.#"'>3253'%>ORO?''>NPM<%*MmC Cyzr{@GlUC<:DS7EhP?99FX;;\? z TpA8gn]re@zuuy//t&&f&cFVEfE{IJ8Z8j8;fR?6?F?R@&@6@F@%5E%5E9   H\f\\P:`:::5:E:9]9 99 }44 4K4 *h%) p"HH 1PP  R@_1o1111t=RR RR,kc$/?O 0@M6YGGBM/3]?99//]]33//]]q99//]r9]22210]]]]]]]]]]+]]]]]]]]]]]]]]]]]]]]]]#".5467##".54>3237332>54.#"32>7#"$&54>$324.#"32>7>nCva8O2E]uGT}Q(Gr<`I6't+&>kO-S㸋^0Vix,72oi?v$\"?Y8VW-_cEx`F `/@&+ -YE+:gSxݩf0C(Tx10.Qpޢ\@ts`!09p?4!sܴFv2TfG$PR@fvfviyiyse|jz9Yiu6VfZHUG%5*:  *:  0 %5P0`/_v  ?2?3]9/32]]q/]3]qq3/]q3]qq9=/33]qq]qq999910]]]]]]]]]]]]]]]]!!#3 .'!~?6d(RC-.DR(1!.@l  -u--z$$$  % &k{ Z@ H)Z@"/"""0)Z@(_)_)_??9/q9/^]2]q9/+9]]]10]]]]]]]]#!!24&#!!2>4.#!!2>ThuC!CeCUX.ATtH Q1\PsI{Y2k_,'TZ;hU= :ZwBrbB!=VC^<7#"$&546$32.x}@EuRmV!&pvV[.GDfPӘT+NkANOd9m  e<2[F*e d@F{+;{+;{{yZ@/  @Z@__??/^]]q10]]]]]]]]]#!!24.#!!2>ejңoR{:oNϰ]Q˂=H M @% H  Z@ _ _ _??9/q]/^]23/+99//103!!!!!-2< i H@: H Z@0 _?o@H_??9/+^]q]/^]23/+9/+10!!#!gg-@+j+B%R%UVVUz Y i jjI%Y%5{ @  $\@!!/ /`//[ !_"""_)_0 @   ?3/]q?9/]/]]]]]9/2/]10]]]]]]]]]]]]]]46$32.#"32>75!5!#"$&gYĐd#IhX|=BSqV[U/kYǥ e.V{M64U? @gfdk{YV  $  j    Z@ ?3?39/^]223/]839/]93q310]]]]]]]]]]]]]!#33 R͸>/8@(0 @`Z@_??/^]/]q1033!,,@ ) H H @H(   H* !%H* H* H!%HH@ H $$,\*$4..t.;... .ϫ.4. .......t...`.T.@.4........t..P.D.0..$.......p.4.D.d. ....t....`.4.T...gt.....P..$.D..4.D.d..........4.T.t.7@S..$.D.t... ....d..K..4......@.P.p.?.. .\@@%H*K$ $?3]?33+3/^]2]]]_]]]qqqqqrrrr^]]]qrrr^]]]]]]]qqqqqqqqqrrrrrrrr^]]]]]]]]]]]qqqqq^]]]qqq^]]]q29=/3310+++++++]+++]]!46767#.'&'#3>73V  wp3j,3032+a'@(-/5987/g'T/?B; Ĺ @' +H6 F  +H)9I !H H ) !H@5H&\DT0@p@@@H \@@+H  @+H ?33+?33+/^]2+]q/]_]q310]_]++]]++]+]+!#30'.53:10)[#XHb*c-a'l@J[%% %R!!!T[fh [@) ))[     _#_??/]]]]q10]]]]]]]]]]]]#"$&546$324.#"32>_X\\A{~?A{{;ǥhm  efДPPәUVu@S *  % Z@@@Z@_/O_@ H_ ??9/+^]q/]2]q10]]]]]#!#!24&#!!26=yybQ}|>\uD=oaԒa}$8@ql|hhe"WU1Z'Z-l|Z(Z(,U,6Z662U22 [@%%:/[  ::*_ 4_ _/?3?]/]]]q992/10]]]]]]]]]]]]]]]]3267#".'.546$324.#"32>Mӆ5DS3@&[1VaFP\\A{~?A{{;Ǖu@Z9 3_Ws efДPPәUVh@> u|JZjrc@3%p@WIpTdB#3Z 0@`@ Z@_/_o_?2?9/]2/^]2]/]39/9310]_]]]+_]]]]_]]_]]]]]]]]!!#!24.#!!2>Ix~B'T[,TxL;RxM%I7h^ClN@^?)Hb]?@n>D>;61(! !!+!!Y:`6iv*Z))Z@A Z@H4Z@Hx;4@/Hw444:44/_o*Y*K***$_` R D  ?3]]]?3]]]]99]]+]]+/^]3/+]2/10]]]]]]]]]]]]]]]]]# $'732>54.'.54>32.#"Eۖ(:cfUf9?r`;wm`F(QrM5V{SbQ#?lPAvgL+Ym=%7ZA$<_BEV8& +:QkFd\*)RyP!3P6#53tН\9fSRn?]>Ɋk^+,`odψB M@JZjEUe:Zjz5Ueut {*: %5 *:4T 0`%5 P0`/y  ?3]?3]]q/]3]qq/]q_qq3]q_q9=/33]qq]qq10]]]]]]]]]]]!#367>73    -Y#)'%)#X0 .W@Iy,u{It F zIYiuGWg-[-k-{-dtU H @ HuDTd6zK[k H*:  % 5    *: %5*: %5'{'t''-*-:-----......{.o.[.O.O....@H .0.. .8x @@&Hw00060F0V00'0070g0w000000&000000x0000i0(080X000000000X0h0I0700000000(0H000X0h0000I0(0 0000000000|H90*00 000000000x0i0:0J0Z0)00 0h0000@0000|0k0\0K0<0+00 0000000000m0_0M0/0?00000000000m0}0[0M0;0-00 0800000000{0m0K0[090+00 000000000}0k0]0K0=0+00_0000000DT-'@{ H?33+]3?3]^]]_qq_qqqqqqqqqqqqqrrrrrrrrrrrrrrr^]]]]]]]]]]]]]]]qqqqqqqq_qqqqqqqrrrrrrrrrrrrrrrr^]]]]]]]]]]]]qqqq+qqqqrrrrr^]]]]qqqqqqqqqrrrrrr^]]]qqqq/+^]3_]]q/^]]+]_qqqqqqqqqq3]q_q9=///]]33]qq]qq33]qq]qq33]qq]qq10+]]]]]]]++]]]]]]]]]]]]]]]!#.'&'#367>732>73   a &h/79:70f&?|1:4EC><7m7;>CFEhy4.+ w@\I;& K[)9DT&6 )Q E 3   ]L+; RC&6     ` T 0 $       p d @ 4        t P D   $ T  4 d 4 d   K {    4 D jT d @ ; $       { d 0 $       p d @ 4   9      D t $ T T d @  0        @H     H @) r4DT ?2?39]]/]]q83/+]]]]+]8399//923]_]]qrrrrrr^]]]]]]]]]]]qqqqqqqqqqrrrr^]]qrr^]qrrrrrrrrrr^]]]]]]]]]]]qqqqqqqqqq10^]]_]]]]]]]]]]]]]]]]]]]! # 3 3 XYP} h)b-)S@  H@ Hi6FZ&Vv9I V  9  Y       Y y 6 ) 9        t V f B $ 4         v b T 6 F $        p d @  $ 4  i  @  t P ` D        T d t 0 @ $      $ D T t 9  p  $ 4 T d       4 T    p 0 `  / ;K{??39]3]]_]]]]qqqqqrrrr^]]]qqqqqqqqrrrrrrrrr^]]]]]]]]]_]qqqqqqqqqqqqqrrrrrrrrrrrr^]]qqqrrr^]]qqq/^]]]q9^]]2+M210+_^]]+]]#3 3 HH9aA z@#dtm}[)9IrTd@ H @ H@ H @ H__?2?22+/+]33/+]3310+]]]]]])5!5!!ZVW)1@0? ??/]]q]q210!#3Wu9G@(x H IF * ??/]8]810]]]+]3i W1@?@P??/]q]q21053#5!Ws HH@/HvHy6Ffv&FVf0AH@9H9Iiy )Yi @H9&6FH"8d@P$4tK4 `p@P"/2/?3]]^]_]]]]]]qqqqqqrrrrrr^]_]+]]+]+qqqq+rrrrrrr^]]]]]]]]]qqqqqqqqqrrrrrrrrr^]]]]]qqqrr^]]]]qqqqr/^]]qqq+q+qr^]+^]qr33++]qr10_]+]+++ #3΢pry i#@``///]q105!ij/@u@@/?/]/]]10] 53WsN2A@2y==y ( H + H%%F@. o8888CG@H?G0CCCC@ #H!Q(9Q 3_/P.3P?2?3/]q9/?+]q/]3/+]222/10]+]+]]"&54>?54.#"'>323267#".'#'2>=QW:W;4T>& 8gn*;"C&3I.E\u#VU*BwZ5_kN;C^:'C3@kN+.PQp7Q64T; ?bt5Y2ZIX`3@ i1y1y#@ HIYIY@? HG@  5*F05?5p555555%P /P?2???2]]qqrr/^]22]10+]]]]+]]!"&'##>533>324.#"32>r{32z>`EGmI&&IlFB`@"Yc80" +32.#"@iM` hl C|^9Vxm}U32WvDZj3gV3{@WU"e"Z2j29I6 F  yvF@*5 Gp555555 /P%P?2?2??]]qq/]]2210]]]]]]%#"!234.453#.532>54.#"52z{2>`EGmI&&JkFB`@hZ6Zb +/* 'H<+ %05ppg0.gxsb+.fWN%k@.Z#j#ZjUeI G@'%G0''''@#HP%% PP??9/9/+q/]2]q2/10]]]3267#"4>32'.#"#IrPu=flLdo/-cT:Ug9^H--[I/ӄ;XzJb<@   3 C  @j HF/O_?;_@VdH@',H 0`@/P P??32?]]]q++qr^]q/^]322/^]310+^]##5354>32.#"3i;fQ E-(3 Iz;eK+)<'aVWK1E@Hz11ve>U e Z:j:&6&)! yv /F@2"0GF@QH=##".54>3234>734.#"32>$]f@{d=dF&;UpHg]++aos.,1Pg6EcA@bD6gR2W&Gb<KQ"KxV)K:#E͇БMia>7( +32#4.#"#3=FTd>hM0XF@gI(7M28eT/EhE#.TxK~!B8'=s@ F0@*H     p      @"%HO  S???]q+qqrrrrrrrr9/+^]3210533 :W=3@ H( HF  @?@H@P_oO??O_ o?o@TORH/?O=@58Hp@#&HOpP S???]]]qq+qrr+^]]]]+qrrr^]]qqqqr^]]]qrrr+^]]]9/^]33/210++53#"&'532>536]H"A $ &1  Z>jN-+C. @T|zvV f Yiyt D  * t  T t t 0  @i H F0 ?  ? _   ? _  9 @SVH`   `   0 @  ????9^]qqr+^]qr/^]2/+_]]q833/]83_r9310]]]]]]]]!#33 0Ima />o@4F0p@"%HOp??]]]q+qqrrrrrr/^]qr10334#N;¹* H @ H";F .F///)/Y////////v/Y///F// F   6  =======i=y=[=I=+=;========i=[=)=9== ===i=====[=M=)=9=========}=+=K=[=k=========+=K=[=k== ===@======[=k=O=;=$= ========d=K=?=+====={====o=;== =j======[=O========d===+=K=======k=4===9====t==+=K=[== ======K=[={===`====O=0=/=@="5P(P/ ?22??2?2^]]]]]_]]qqqrrrrrr^]]]]]]]qqqqqqqrrrrrrr^]]]]]]]qqqqqqqqqqqrrrrrrrrrrrr^]]]]]]]qqq_qqqqqqqrrrrrr^]]]]]]]]]]]]qqqqqqqqq/^]q2/^]]]]]qqqq9/910++!4.#"#4.'33>323>32#4.#"/L79\A#8Ka@{3294U?@gI(>RjFZT'OjA-U}QS"KC0,9;/L5,\d/VN"t@;y tvy      G@$0$$@#H$GP P??/]]+q]10^]]]]]]]]]#".5!24.#"32>q{A~u8'KlDEoN),Mi>EpN*Dӏ0FҌ~b')c{~b('bWM&:@i8y8i*y*$$$@ HIYIY@? HG@''<1F0<?<p<<<<<<,P"6P?2???2]]qqrr/^]22]10+]]]+]]]#"&'##4.'33>324.#"32>(]pt.@Re?p](;bJ73#46767#4.#"32>CgQ=?Rg)KkBEb==aFv`)3inlh3%aN>@(0! F0(H ???3+/^]q23/]1034.'33>32.#"+:P9( 0>W7>"GB:;>9>[;8cQ9K7@Ut..ok%6*4 $I##H@ 09 I @H ,HO_ `9999@*'*H?99,)P $$$$$ P` p   ?3/]q?3/]q99]]+]q/]q3/+]q2/10]]]]]]]]#".'732>54.'.54632.#";pi^rM:aF'.RuFAg@ʳ 0DU.zt+MlA+ZUK8!+LwQ+@iLWQ'A01?**EfM~*9#JK,9' #/BX*,{@W(iy( i y  Hl| Ho F  @P ?  P??]32]/^]q332/]10+]+]]q]q%#"5#53733#3267*)U8}5x3?1 ҃UN?:%y@E!*!:!F@/    'F$$$$0$$$''''''p''@ HP ?2??2+]]qr/^]q]qr310]]32>53#.5##".5:4U?@gI(>RjFZT':ROjA-U}Qs"KC0,9;/L5,\e:[@79I6F:Jiy5Egw H@> H +{DTDT@ [*  K[`DT DTDT[D K[`DT `DTgDT[D K@c[7K[? `DT `P/ ?3?3^]]]_]]]]qqqqqqqqrrrr^]]]qqqqqqqqr^]]]]]]qqqqqqr^]]]]]]]]qqqrrrr^]]]]]]]]qr/^]83/^]]]]qrr839=/3310++]_]q]]q]q]q!#3>73ew:@?D??B?:*@$:)J)z)))5Eu6F6@ H9I9 H6F@ H6 F  @3 H9I H9I H #(#X###)**@I/2HI*4*&******y*6*F*f*******f*v*9*&****@ Yiy ,,,,,y,f,T,6,F,,,,,,,,t,f,9,,$,,,,,,,i,6,F, ,,,,V,f,,9,+,,,,,,,,,,r,d,V,4,D,",,,,,,,,,v,T,d,B,4,,&,,,,,,,,,f,v,T,6,F,$,,,,@,,,,f,,,D,T,6,,,i,,,,,,t,,6,F,f,$,,,,,,,,,i,V,D,,6,,,,,,,r,`,,$,T,8,,,,,t,K,0,,$,,,,,{,4,D,d,,,,,d,,,,?,,,@(HB4")#( H-#( H-#?3]+]+?3]]]+^]_]]]]]qqqqqqqrrrrrr^]]_]]]]]]qqqqqqqqrrrrrrrr^]]]]]]]]]]qqqqqqqqqqqqrrrrrrrrrrr^]]]]]]]]]]]]]]qqqqqqqrrrrr^]]]]]]]]]]]qqqqqqqq/^]83/^]]]]]]]]qqqqqqqrrr+839=///qr33333310+_q+q+q+q+]q+]q]q]qq!#.'&'#367>7367>73ѭ Ѳ P&,/-,&RJ:!C %'&$@B"#&$C: @Hyvy7 w  zx  @;   ) 9        & F f  H @  9  @tHv d V D 6 $        v d V D 6 $          F V  @H V f v D & 6  & 6 f v  v D T d 6 $         v d   & F V g F V  d V D 6 $      & 6 F 7f  @6=BH9 "       t ` T @ 4   @"H   P p  ?3?393^]_]+qqqqqqqqqqr_rr+r^]]]qqqqqqqqr^]]]]]]]]]qqqqqqqqr^]]]]]+]qrrrrrr^]]]]]]]]]]]]]qqqqqqqq+/^]r83/+^]qqqqrr8399//8892310]]_]]]]]]]]]]]]! # 3 3 ! D,[W: !#"&'5326?3>73\&ObxN": 0O3S   Ծbo;v+5-Z-H APRj1:  @NYitFVf({$ ;[ @'7H@H @(\dH     t ` T @ 4 D d  @ IRH   ?D d  $ D d  3>H @'H  P p  @ HPP?2?2+^]_]++qr^]]]+]qqqqqqqqq+/++^]33/^]q33_q10]]]]]]35!5!!18j&ڋ"W-`@A H H-!( ?@! / o  O / O o  +??9/]qr9/]]q3322210++".54.'5>546;#";AcB"7P33P7?[M4G)+G3M[?W)LlDi?X88X>jkl2T@,  ,AT3jmN]@ H@ HH@Hp@H@+H0@P$$HH@Hp@ H@H0$@z}H$n@ ruHTfiH@ [^HP`@ORH@ DGH>@8=H`p@H@H@p//?^]]++qrrrr+^]+_]]+q+r+rr+^]]+qqq+q+qr+++^]]]]qq+qqqr+r_rr++^]++]]9/^]103N~"W-b( H@7 H, & 0 /oO/Oo-,??9/]qr9/]q3322210++2654>75.54&+532+5^[O3G+*F4O[<7Q44Q7"BcAmje3TA,  ,@T2dlk>X88X?DlL)\)P' @Z)90 H 0 H г H@ H p  @ &323267LEIX&A<82Q(PMK%233E{4 ;=D),-  &.  2*:@[iFV9@HIYi6  y F  9   i y &    I Y y    t V f D  & 6  @H   @H$     @@Hf   @Hb r @ P " 2   @u|H  @@ nsH  l @@>ekH   v R b $ 4 D      d t  @GKH   @=;@H  7  T d t     T d  @H@  /]?^]_]+]qqrrrrr^]]+]]+qq_qqrrrrrrr+^]+]+qqqq+qr+r^]]+]]+qqqqqqrrrr^]]]]]qqq/^]]]]+qqqq3/103##5  +@XhWg   'G@8 HFF"P|`p peP /3]]]3?]q22]]]/3//+9/q3210]]]]]267#5.54>753.#"T`3X~S|o_+BoP|NxV6 riMg@@ihl >t\> ]q΃?7Um?Zj3gi]q>:P2@SF6F%5$' o',n#'n_  O_o2o  0Pp0@@H& Q#?o@%*H@ H,s,t2v222?3]2?39/++^]q32/+]qr/]9/q329/3910]]]#!5>=#534>32.#"!!!2>7P 9YsCFYV0cgF{cG '5A$rph,?(&C5%7PuM%.y\f7:V994$s}~8j\G*C0qs#7@wJZj,<JZj,<E U e # 3 EUe#3J"Z"j"-"="EUe#3EUe#3JZj-=.$/9)3 /]/]]10]]]]]]]]]]]]]]]]467'7>327'#"&''7.732>54.#")%dhc6IG~6ah`%+,&dfe6~GH4iff%),Mf:9fM,,Mf9:fM,G6dge'+*&ai`6GG5die%)*&iif6I:fL,,Lf::fL--Lfv@IFJjzEeuO @\  @  Q Q/  @)-H   ??39/^]q33]+q222/^]33229]2]210]]]]]]]]!!!!#!5!7!5!3 3A}@[sw}/}yN]@    H @ H   H @H  p  @H     @+H0 @ P   $      $  H H @Hp   @ H  @H0  $   @z}H   $ n @ ruH T  fiH  @ [^HP `  @ORH   @ DGH  > @8=H ` p     @!H @H@ p   / ?/99//^]]++qrrrr+^]+_]]+q+r+rr+^]]+qqq+q+qr+++^]]]]qq+qqqr+r_rr++^]++]]9/^]321033  sTMaO@u//zdU+UkU-QmQ-9m9}99U`u``S>s>>SZsZZyPPoPZP-Pt6F*I%*%-+$$ LLIK"I7KK7K7NFAIINN N@NNN!HN@HN-I,,XIA AAA@D"&HA7777ySjSSSwhS]72Q-' Q?2/39]]]]]]qq]]]]]]]/+]3//++]q29999//r10]]]]]]]]]]]]]]]]]]]]]]]2.#"#".'732>54.'.54>7.5464.'>LOlI.DT.}2Sm;DpF7R61O7:pk]uO 6Nd9:fL-9_{AAhA ;T5*K9!5Xq=:Y<1Rl<6]D'?bE-:" OG-@. .IjL-WI7 3@Q3IuS,@hM7C% (A/6H3$.IiJ-SG5.@P00E3#!4E'.B0"/F-Z{H@ H@H@H;- 9,0H+{o[O;/?@H@H/++]_qqqqqqqqqqrr+_rrrrrrr^]]]32/++++1053!53ӥø1[@oQ II*I EE*EL<9/I/6(F(6$F$9IZZ5QEQ:=446.F.6)F)9#I#9I2Q=_GoGG=G=0@ @@DH&o<7BWLRLBBBBBBBBLLLpLLLLBLBL!+??99//]q]q33/q/+]q99//]310]]]]]]]]]]]]q]]q#".54>324.#"32>%32>7#".54>32.#"4^dc^44^dq\-RtWccWtR-!CdC1K8's:RoKeb00abKpP7r &7H/Ec@d^44^dd^4rVsR-c䂃b-QsYHxV0-7#+Q?&@r^ao;$;K'!2&.Sv2A@-( H.( H( H H@ H3'' / 88@H8d8t88P88@ H8?@&HCC@3 H9 99 H   #33** P?3/]3/]29/]]3+]]]+]/+3//+_]]]+q332/]10+++++".54>?54.#"'>323267#".'#'2>=5V>!3Vq>'8#CQ +KlGDmM*#  *)9&&30P9 )J7 :8R4E\8<.<#;L /R>#<_B:2h'3MFo"7G%A 4+8AS q@Tj z j z jzjz_  @ `   _ ` /o/]32/]qq/]]q10]]]]%53 !53 vRTPQm?sm?sdG3@ P@ H?/+]]]/]]10%!5!1?H==$=:@^ H9/I/6(F(6$F$9I= H6.F.6)F)9#I#9IEE3>>E?E56@;;2??6?6?0@ @@<H&o226>4E DDD7666777p76E77E6!+??9///]q]]23//q/+]q99//833/293]10]]]]+]]]]+]#".54>324.#"32>##!24&+3264^dc^44^dq\-RtWccWtR-Rǡ3hUݟ_QPTd^44^dd^4rVsR-c䂃b-QsP?~of{PEHU| ///10!5!|s^z\'B H @! H H H   #?/]10++++#".54>324.#"32>-Ni;;hN..Nh;;iN-m0A&%A00A%&A0y;hM--Mh;54&#"'>32!+XdgR4GJDX.LkDAgG%6Sf_N3g=`QHIP1>KID3W@%!dVKIJ*q'5@ffV f Y"i"*@P H H0--- ` `"### @%H1 i"H"X""( G  ?3]?3]]9/9/+]3/q/]q2/9/910++]]]]#".'732654.+532>54&#"'>32WtI$ XUMS%8C=9=2 JGDT2Of;EhF#VZ4K0t'@Q+ CEHL-6 m 5(3!tpqP`52_W3#-XYT]2f~&@@&H/+]/^]1053wN~@ H HFV H@> H 0/o@ H P`p/]/9/+/]^]qr9/3]210++]++#"&'532>54&#*73AhK-1%)8#=HAk'^^)C0b %(dQP3} K@, 0`   0o ?2?33/3/]3/]/]2/]10]535733P{3klxk#  H @+ H  H  H$4d@& H@!H%p%%/% P ?3/]]]]/+/+]_]]q10++++#"&54>324.#"32>Ӱ+WX]T'2H00K33F+1K4ɾ[e55d\SnABnRTnBBnS @deue u eueu   p  ? o    p?  /o/]32/]]]q/]]]qqr10]]]]%#5 53#5 53ΨRRݪROot?ot?8N&y'@ p `   ?55]]]]58u&y'r/@o/ p `   3@ H?5+]]]]5]]5IN' 's.!@p`S@ H?55+]]]5V:%)@pyz##z$$Td:Jz H '''((F_@733267#".#5%>ORO?''>NPM<%*MmC Cyzr{@q2GlUC<:DS7EhP?99FX;;\? z TpA8gdR&$N&%+5+5R&$@ &L%+5+5R&$`@ &%+5+5R&$^@ &,%+5+5R&$l@ &%+55+55R&$P@ 8%+55?55@VtrVfsUem\)    Z_ _ _ _???29/9//3323/399/]99//q10]]]]]]]]]!!#!!!!!#! E !d<#2:3&3hNy&&x :0(%+5&(? &  %+5+5&(@  &(  %+5+5&(w & %+5+5&(y & %+55+55 &,&%+5+56&,F@ &E%+5+5h&,@ & %+5+54&,@ &%+55+55e!p@Eu [ [Z[  Z@#Z___??9/q32/33/2q9/10]]]]]]]3!2#!#%4.#!!!!2>ңojR{j:oN!`Q]H˂=9H &1@ & +%+5+5a&2(&ش), %+5+5a&2%@ (&%(+ %+5+5a&2@ )&.( %+5+5a&2(&1? %+5+5a&2(&,* %+55+55s H@H H HH@HHH@HH H@H /q/]]q10++++++++++++ 7   bh^^i`fJb`g_iiaG'3@Y,%T!e{lZi   tcU2[2r++T+&T&U%JZzd k ,([@5 5([ +#/_#_ ?3?399/]]]]q9910]]]]]]]]]]]]]]]]]]]]]]]#"&'#7&546$32734&'32>%.#"_QxXV\}RyUW11;;]{;23;\~?ǥh:6a  e86^pH,/V}qKU*.P)&8&%+5+5)&8@ &%%+5+5)&8@ & %+5+5)&8&%+55+55-)&<@  &A %+5+5_@?t{Z0 @ Z@__    ??99///^]22/]]q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r^]]qqqq+r^]]]qqrr+++^]_]9/^]3//]+]q+]10++_]]"&'532>53#'##53M"A $ &1 6]ihW+C.@>jN-nN?&.ʹ  %+5N&NN  %+5: @H{tV f {YiC :* z,  p  P   @( H F0 ?  ?2?39]]/^]2/+]q839/]893310]]]]]]]]]]]!#33 0Il~: //&/&^ %+5+5[>&ON@ &K%+5+5N/&/ %+5~NG&O%+5/&/@  %+5?5i&O$KA@@H@H@HH@ H@ H  %+5?5++++++/&/O _%+5&OOBT%+5/ w@1ydtVV Z  @` H @H    _??9/]]9++/]q/3210qrqr]]!!573%hyUU f@*'' F @ p  @H H O??9/]9++]]]9/^]332210qq35737zz||DDXHGz &1@ &I%+5+5&Qt@ &&a&)$%+5+5N &1%+5NN&Q[ *&$%+5 &1&%+5+5&QL&&(.$%+5+5P&Qb 47@5)))0 H/@[ H*6:6663'Z@3Z@Pp0P0'_-! _?2/???2/^]]]qr/]29/]310]++]]]".'732>54.#"#4.'33>328`O?%d;@N) 'QW^yF"gV|p5V(6s-A:k_Blb.>iMD%\ZL?EE=eF'@̋ВNWN5@y44Z4j4+4;4K4.@J H..1F@ `    7%F @%P+P????2/^]qr2]qqr9/10]+]]]"&'532>54.#"#4.'33>32"A $ &1 4U?@gI(>RjFZT'6]W+C.OjA-U}QS"KC0,9;/L5,\d>jN-a&2MN@ (&)( %+5+5VS&RM@ #&$#%+5+5a&2@ (&-5 %+5+5V&RN@ #&(4%+5+5a&2@ (&](1 %+55+55V"&RS @ #&g#,%+55+55a1@w f i V0Y*T//T/ ++[+Z" 0"/"O"?"_""""""@&H" -[    3___(__????9/]/]]/]/+]q99//]29910]]]]]]]]!#"$&546$32!!!!!%267."#"399Y^:94Lo L %%}}?@~j b<WJ΃єPV2N';D@fvaUZBjBl=Z=E:U:e:E4U4e4J0Z0j0J*Z*j*I &G@32%4.#"32>%.#".#IrPu=fl=?ɉqDuCwo/?*MnDErQ-/Ql>ErQ,-cT:Ug9^H--[I/[\]ZDӏ^SXz'~b')c{~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(DBBB>2>>>/ >>  Zjz 0 EPEE0E`EEEE/E U e u  >>-p9@@@@@@ H@ '&&  9?999 /3//]]]39/32/+]9/]3//3]]]]q3/]q3]]939///]q]q]]310]+++]]]#!#&'.54>32.'!4.#"32>573&!á~$!&&BX22XB&$11$$ 1$p-O Ds O--O;"";O$J<))>I$_w,!!,,# #,#Ws>&D'PUtcZ#@e&jm$%ԴLB$%+55+5+55&& %+5+5B&t@ Y&IY\=%+5+5G&K@ 4&I47 %+5+5,&t@ .&^.1%+5+5]N'69NK'V.N'7N*,&sW B@v x@ H@/?/]3/]+]10]]#'##53ih B@vx@ H@/?/]2/]+]10]]#53373hi3XSQ@;[k4D H@!H/?@H@H/++]_q++/]]]/]q10!5!X%wI@3O@@73)JtT2u'8H**G8&u 2St3Up=+;$$;*=pU3 P@ @HS?/+1053 3s'Y@ H  H H@* H@_  #/?O/]]/]10++++#".54>324.#"32>&BX22XB&&BX22XB&l$11$$11$2XB&&BX22XA&&AX21$$11&&1PUL@7 H  H H _ @ H  P`p/]q/+/]q210+++#"&54>733267G(ij"054+1-:p fU/O=* -;F'*0 M@ H  H))9Yi@H@H Щ 9@H{I@H6}o-=M H[k{H &fvn@@`emHpRb@"2Rbr$4Ddt@ <@H;@95:Hdt0@P$p@HTdt@ H@ $'H@!HD0 @+ H @@H/?/]2+]q3//]+]q_qq+q++]]+]qqqrrrrr+_^]+]]]]]qqqqqqqqqrrrrrr+^]]]]]]]q+qq+qrrrrrr^]+]qqqq+qrrr^]++]q10++".#"#>3232673*TNG76 [-J;,TNE67\+J%-%>9-_N2%-%?8,_N3 o@R f bb @?O@)H@H/?/]22/++]^]q10]]]]]]53353@@+ H) *+@p @`/]_]]/]10_]]+53E!$%A S@5 H *//     ?/]]33/2/]/]9/q]10]+53%53!53EؖB!p%R&$Tl|^ %$$HHHHHH@ H@ H?5+++++++++]5~ @ H@!HtVfD&6@Ht@$HvTd@"HFVv4&H@%Hdt6FV$@HVf$4D@w|HRb 0@p@ goHDTcfH\_HW[H@QVH$4D@CFH0$<@ 8;H@)-0H  0 H/+]]]q_qqqr+rr+^]]]+]]q++++r+^]]_]+]qqq+qqqrrrr++^]]]]]+qqqqqr+rrrr+^]]]]]]+]q+/1053'(T(|1@ q@%//]]]]5+]]5?5 '+T%|_HHHH@ Hq@%o/]]]]5+]]5?5+++++U',T|\ H @ H @ H @ Hf@%o_O//]]]]]]]5+]]5?5++++&2T|'@ *((^@ (( %/]55+]]5?5A'<Tt|@@H@H@H@HH@H@H@H@HH@H@H@H@HH@H@H@H@HH@H@H@H@H@H@H@H@H@HH@H@HHHHHHHHHHHHHHHHHHHHH~~H}}H@||H@{{H@zzHyyHxxHwwHvvH@uuHttH@ssHrrH@qqH@ppH@ooHnnH@mmHllHkkH@jjHiiH@hhH@ggH@ffHeeH@ddH@ccHbbH@aaH@``H@__H@^^H@]]H\\H@[[HZZH@YYHXXH@WWH@VVH@UUH@TTH@SSHRRHQQHPPHOOH@NNH@MMH@LLHKKHJJHIIH@HHHGGHFFHEEHDDHCCHBBH@AAH@@H??H>>H==H<@::55%_]]]]qqq5+]]5?5+A&U<@ @H@HHH@H@H@H@HHH@H@H@H@H@H@H@HH@H@H@H@HH@H@H@H@HH@H@H@H@H@ H@wwH@ssH@nnH@mmH@jjH@eeH@ddH@``H^^H@]]H@WWH@VVH@UUHTTH@ OOH@JJH@==H@88H@77H@66H@33H22H11H@00H@**H@))H@((H$$H##H@""H@H@H@HHH@H@ H@H@ H&ܴ %+555+555++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++R$%/8@(Z@0P @`_??/^]q/]10!#/8=@jzeuYV H@@ HFfvIiy _O0@H0/_ H  ?3]+?2]]/+]3/]]]]qqq39=/3310]]]]++]]]]1073!%.'># ^(RE01FR((A= +a'+@i fYV VZU *+ %%Z%!!U! +*[;o0 @P[     +_((#_#_- -]]??9//]]]/^]qqqqqrr^]9910^]]]]]]]]]]]#"$&546$324.#"32>%!!_X\\A{~?A{{;Kǥhm  efДPPәUVР|,?. N@ t{ H6  @ H HH9o0/%5*:  % 5    *:  0o0v?2?3]/]]q2]qq/]3]qq9=/3]qq3]qq]]]]10]+++]+]]%#.'&'#3N|   z?/Y#)%')#Y- 0 1Z K@1R _0 @p _ __??9//]q3/]q39910q!!!5!5}9\a2 O@(Z@Z@o   @ H_?2?+]q/]/^]10!!#!ax 3l @i t WgTd t F V f 9ggd'   0 P `  F   _  _?2?92/]]]33/3qq/^]]99//]qq3qqqqr10]]]]]]]]q]35 5!!!lmCC|.7-)<u(3 H H H@H H)Z {Zt#Z/$Dt5D555555p5`55@ H#.`  "1`  ??99//3232+]_]]qq/]q3322]]10+++++#5#".54>;53324&+32>%;#"@ŅSSŃ@CɇHGʅC08\Y++Y\84iTTiqHHu5bXXb5.+;#@ZjUeZjZjJE Zd#Z Zkd4Dd%$%4%D%%%%%%%%%`%p%T%@%%@ H"`??339/]32+_]]]]]]q/^]]qq3]q2]q10_]]]]]]!#".53;332>53+SɆC/]\88_[-DɄSTh-Pd9I9dP1hTUW9@[e$e111 H    Ht66v68v8t7767** )50( `(p((o(("[P55@EH55055[O_o 0_; '0*_)_??32]/^]]]qqr/]]+r99//]]3310]]]]]]]]+]]+]]]]267>;!5>54.#"!532.54>Z;mc*'!G`Y*=tlmt=*Y`G!'*cm;ZVj63~Ut|AA|tU~36jV4&,@ &%+55+55-) r@  H@ H @ i6FZ&Vv9IV 9Y Yy6)9 tVfB$4vbT6F$pd@$4i@tP`D Tdt0@$$DTt9p$4Td4Tp0`/  _  @ H ;K{??39]3/+]32]]_]]]]qqqqqrrrr^]]]qqqqqqqqrrrrrrrrr^]]]]]]]]]_]qqqqqqqqqqqqqrrrrrrrrrrrr^]]qqqrrr^]]qqq/^]]]q9^]]2+M2/10+_^]]+]]#3 3%53!53 ӥHH9ayVe&~T!@ <&73#.'32>7.#"KAWoFEpV? .'$  ;]B6dR= -GfFB`@8^E&'E]68?A/:gn'BA:1pg04klVsD.fWI >@D{z<<jzfvJ2Z2j2%eu%0H400@0`00@:H0404H@0+@++++++@! F00P11&9P !&P ?32??9/9/^]2]q99//+]q910]]]]]]]]]]#"&'##463232>54.#5>54.#"I5oxf8cf5#=Q.9r[8GQW+HnI&&QYq9W73#>7z0:]?C?>C?-o|A[V2@Qsjv..j.ZjZjU e r&r3C22G@.//)4 G))/P@HHoZ.0P$??99]]++2/]]q9/9932/10]]]]]]]]]]]]4.'32>".'#".54>75!`1ELIf<#IoMQpE *-) <6fO1@{sr}BI`UsVQr[L`76_7tanHDspa!SwFjN9@1%5$E$7"*% H **F000##@%0HH@B H;5G?O_@%+H;;_;0P//O/_////////'P$ P ?3?39/]q9]q/+]+++2/99//910]+]]]]]]%2>7#".54>75.54>32.#"3"6`O?i TjN`\-*H`63U="2_WvC/}K[`7aKHmB4Jr08d'G5 .TtE:_E*(@V3>jM,VcXGDUJ9F% (PE-E.V`8@u&77'|'''usd$$$$9,,<Ld666&6V6///G!(22 O@!H @2/P@H!!!!!!!0/?9]]]]+32/^]+]q2/3/9/q10]]]]]]]]]]]]]]'>54.'.54>75#!5!+Jd96oZ: ~  $B^9*YRI61Uq@ "$" >{lQ/{@O1"9XD"D>38 !&'"-! $2JdCSDFjXN#d @. H#F@P% F   0  %%p%%@H#P ???2?+]]q/^]q2]q10+4.#"#4&'33>3294U?@gI(  >RjFZT'XVOjA-U}QSDy*01//L5,\dj %@l |$$sUe|JZjsEUe     !G@@-0H' G #H0''@#H'P P P??9/]+q/+]2+q310^]]]]]]]]]]]]]]]]]#".5322>7!"!. lv>yp6*>dI*,G^B>cH*#(Ea\uy]4ؤׁ43~ԡ~3:  @ F  _o o `@P`p?p?Oj`p?`7/?o???^]]]qqrrr^]]qqqrrr^]]]]qqrrr^]]]qqrr^]]]qq9/^]q2103.53 5@F!N @<4: @r f v iyV  T F      @  F0 ?  ?2?39]]/^]2/^]q839/893q310]]]]]]]]]!#33 0Im: /!<@esjz  e u fv~lTeuVT@; HTdt]mIeu&V*:Jz  !@E!??__@#0#`### !P ??399]/^]]]]qr83/839/9910]]]]]]]]]]+]]]_]]]]]_]]_]]_]]]]]]]]]]]]'.#"'>32#.'#$*-9( #H 7WIC$cIiC $Q_A8;8<>7w:*!./&5##"&'##332>53^8EV9Rx ;bJCdC!.:3O5@: ?|EtU/4[~Ki"LC1:#@OWgw H F@[ k { [    ; [ k  @  K[`DT DTDT[D K[`DT `DTgDT[D K[@]7K[? `DT `P/ ?3?3^]]]_]]]]qqqqqqqqrrrr^]]]qqqqqqqqr^]]]]]]qqqqqqr^]]]]]]]]qqqrrrr^]]]]]]]]qr/83^]]qr239=/+3310]_]]]#3654&'3?jMz7|Nc^:`VQw--qVjJ@}zGGe!u!!i'U2S,9nB~BBB*B , ( H II,IlI|II _%O%p%%%_o%4?F   ???O?o?????? ????@ H?*G%P *@ H*H4*9 $$$9P?22/9/]9]+]+999/]/+]q99//]22/]r3/]qr910]+]]]]]]]]]4>75.54>75+5!'>54.'.V3n}DvW32Oa/ DPLJzMpD@]@( } ";ZC?Q1 6YT@O1"9XD"D>38 !&'"-! $2JdVNRO+:0s@#5 u (H(H.P ` . #F@oP@& H22/2 HO_o"P(P???22/22]2]+]q22]/10++]".5!#>="5>3!#32>7f;R4n$' 'OE5 +36% #E;^BHJL}P  S,8  W;O/@@zeujzj-z-K[k}kJZG@1&F0011@#H1`11 P+P???]]+q/^]q2]10]]]]]]]]#".'##4>324.#"32>;?sb>bPB54.'.54>32.F6XC1  L|\5r_= ~  #Da?Bq^H2.KnaDcI6t*191Phlj*D`H9%;YD"D>38 !&',$(3D]zQ/lB",w$V:/@^ z .e.u.d*t**|!!Z!j!&l&|&J&Z&oG@ @1(G  #P+P??2/]]q^]10]]]]]]]]]]#".54>3!#".'4.'#"32>0={{{|?V~9 #+,7+"-YSk=NuL&pLJʁҊB*csNJtc*2in4a:#c@2#  H - F" """$%O%%%%%@ HP#P ?2?+]]]q9/]]33/10]+]"5>3!!32>7#".5'OE5 +36D #E+;R4  S,8  ;^B:q@>jzV)G@/! F  0  !!p!!@ H! P??3]+]]q/^]]qr210]]]]]#".5332>54.'35q{mh3uIhA!(( ;ښR2ktc2lxDx)(qUWR#-@e"e!u!!JZEU- H@6 H @PG $G+H@@/P'P+P??32?3/q/]32q2/]10]++]]]]#.54>746324&#">Jnr}C1gmE`<T\1WPDL5׌GiHύfgMrPDLyӁXP@3{T{Zj)9 H@c HtEUe&6'7GeuV'7;[{D $ @)HF5}K[k? P?3??9]]_]]]]+]]/833//^]]q833/3910]]]_]]]]]]]]++]]]]]]]]]]]%#.#"'>323 #,(* "> 0F<;$i9W6R7 >fKGW,<@Zy Hyy   Hy FFH!!!o! !!P!!!!P ??32?33/]]qqq/^]3210]+]]+]%>53#.533.W|P%;||;&O|WwIy[|zn5k5nzzZyI SO?@S!!wz:: %%*%%% *I==(. . 3G@A3G?((A0AAA@ #HAAA A@A#>>8P#. P-?32?329/9]]+]qr/]^]]99//9/910]]]]]]32>54.'7#".'##".54>732>=3srfAW5=aCmg15e_DhM44MiC_e51gmD`>4VA3R98fZRyTpeȉH$Dc@@cD$HȀe¡pTyRZf8-T{N{&i&ٴ %+55+55{&i &$" %+55+55V&RT)@ #&F#&%+5+5&T@  & # %+5+5S&T@ @&7@C(%+5+5&(yHHHHHHHHHHHHH@ H & %+55+55++++++++++++++.O-@ e%u%%@G H H* : $4 *'Z-((( Z*_+&!_(+(_??3/]??9/322/^]/]]29/10]]++]]>32#".'7326=4&#"#!5!!m5)V\5XK@o)08!TP3{xi! ]d5 .{!eowz  圜/&aq@ &! %+5+5hy*@''')))u u IF % 5 *:D,[tD+%dt@0_ "O&&&_" _ 0@p?3/]q?3/]9/q/^]_]]q3/]]]q29/]10_]]]]]]]]]]]]]]"!!32>7#"$&546$32.o|I r MmZlO(l{V[.GDfD~npH2Ri7MOd9m  e<2[F*]6|,4&,@ &%+55+55 h- &/@b9   :  y t///{(((e  H+{*zZ0'''' $ 4  @HI$4@'H I !,Z+_!!__,_???9//2/]3q+qq+q/^]q10]]+]]]]]]]]]]]]]#!!#"&'532>7!!24&#!!26 =yy`1+1oWp@ljU%>k:i\yn@t{&6Z@+ H Z  @  Z__   _???39/3//^]32/^]2/+]10]]]#!!#3!3!24&#!!26=yy¿>V}|>GWp@sT:i\y./@ eu@L H%5E Z  0  Z0p _ _ ?2?29/32]]qr/^]/]]310]+]]!4&#"#!5!!>32q5tnb#$bpv8?zm  圜 &@ &% %+5+57:&^J@ &'%+5+5h ^@@ \ Z0@@Z@    _/?3?3/]]q/^]/]]qq9/10!3!3!""hhR$@Ft{& ZP @ Z@0@#H_@    __??9/]q]+q/^]2/]]]]qqq2/10]]]]#!!!!24&#!!26=yy!~}|>oWp@H:i\y%/ahE@_ srfU e ZjaS5E\Z_$4@ H$4@H \/__/3?22?]/3+q+q/^]]]]2/10]]]]]]]]_]_]]]]]]%3#!#3>7!!2)B7,CԺ1(.6 h83Aݲ3(G)H@)uucl|l|e u !(H@#H:J)5Eu'0H(8H @ H' 7 G H@I H H H" (Z) ) 4)t))))!  @ H  D t  +  @3D+t+++/++"'`/ )!?33?339/]q329933]_]]/]83/]]]]+83/]q39/93329/93310++++]+]+]_]]]++]]]]]]]".'#&'3332>73###R-0.U0BZLQ99QLZB0U.0- U#c{DkD{c1f# {Cp<@3!|pp`eu"e"u"| Z j ;K!@z H+3Z.@%H..8Z$$$_o$$pOo0@ -H@ H3_ )#@ H##_) _ 0p H?2/+]q?3/+9/q9/++]/]]]]qq99//]_]q2/+910_]+]]]]]]]_]]_]]]".'732>54&+532654.#"'>32mv^$B[yPMzU-GG'HhAMrS8!`ilx@(Ih?CuW3E2[OM7bK,%Ed@vw{7V;(DZ1=RW-5`SDkP7 2RsI_q>{@@A H  H \)  @ P    0  \/   ?22/?33/]/^]2q/]]]q3q10++]]]]333#46767ުd3b'.('Y&,,Z:&J@ &! %+5+5@hT t TzYi H:d t P 5 E    `  Z    /  / `/ ?2?39/]29]/]q83/]29/]893310]]]]+]]]]]]32>73###9QLZB0U.0-D{c1f# {@#uUsUe@. H%5jzZ @_$4@HI$4@H I __ ???]/3q+qq+q/^]]]q10]]]+]]]]]]]]!#"&'532>7!#^1+1k0 +a2nX H H H H H H H H H @ H++++++++++3hy&.77@oZjz)UeFdtVyTdFqVf:J  ?Oo@ _?2?3/99/8]22/8]39910]]]]]]]]]]]]]]]]]]]]]]#".'732>?3 3/QZmK B@:Q#S0%:59&1>XR( %4ZDYv(3@\FVfIYi;3;5+&+5'&')ZZ#Z.O  5p555O55$/`  "1`  ??99//3232]]]q/]]]332210]]]]]]]]+#5#".54>;53324&+32>%;#"@Ņ((Ń@CɇʅC \Y+W+Y\ iTTiqHHu5bXXb5.+;h J@/\ Z@pZ@   _/?2/?3/]/^]/]]q2/10%#!3!3Ŵ@F( H H*:JZ0@po@ Z   @   @H_/  ?3/?9/]32+]q/^]]/]]]]qqq310]++]#".5332>73#$^ks8rl45nh\# /\YR{l  r@LZ Z$ {dZD    p @   _?2/?33]]_]]]]]/^]/]]]]]qq9/1033!3!3h/}@T{T\Z Z ; K [ {     o   Z   _/?2/2/?33/]/^]]]]_]]q9/2/]]]10%#!3!3!3/-ӺҺ.d@Dt{&@Z/ @Z  _ __ ??9//]2/^]]]q]10]]]]!2#!!5!4&#!!26B}|>=yy5s3-:iZWp@ym@Lt{ & Z@PpZ @ Z@@ H_ _?3/?3/9/+]/^]2/]]]q/]]10]]]]#!3!24&#!!263=yy~}|>oWp@:i\yk@Lt{ & Z @` Z@_ _??9/]]/^]2/]]]q10]]]]#!3!24&#!!26=yy~}|>oWp@:i`yiy*@Qssesesee e jZ!!  Z  (($$&[ #p####@##@? H#P` #_&&&& _ 0@pO_ ?3/]?3/]q9/q/]]q3/+]]]q39/10]]]]]]]]]]]]]]"'6$32#".'732>7!5!.XfEG.[Vvq)QmWmM r I|*F[2324.#"32>ZZٿ* c蒟W3!#!3!!"`[T'B~xI%MwS;LxT,_NlC^h7I9bH)?^WsNDx?84.#"32>2#".54>7>?>'IhAErQ,,Mi>EpN*q{A:Γ9d[+VV[N|^C,Ca~r[%'\prY$$XFs  !2Ile7aH):$/@ *%*@! H  &,GG@/1@11@2#H1?11&F0 $Q&&&&&%PP??9/q9/^]q2]+q]q9/9]10+]]]2#!32>54.+32>54&#4LpD#hQ5Q:% #=Z=NuN':K,C/2F,'=+RL:6@#@'H0F0P??/^]q3/]+10!#:I:h:@A f"r"""yfv""b$DTI @*H F@o @ I PP  /3?22?/3333]]2/+10]]]]]]]]]]]]]]]]!!#!#3>7!3B100Fңw::9ˆ2h2;IWNHS:'a@X"  ZjzUeuJ!!!E*:% 5 " &F'  ' @1 ''!     P ?    _  0  @@/?)))o))P)?) ))))O)_)0)"@% H%PO_O '!?33?339/^]q3299+33]]]]qqqqqqr/]qr83/]]]]qqqqqqr839/39/8933]29/893]310]]]]]]]]]]]]]]"&'#.'3332>?3###SAaB-ؼ0A4004A0-BaA PUBEM\2&2\MBU #1^N7@55&&%&--F((3G I@@V$H    99I@ H-P#P#P`p ?2/]]q?3/]q9/q9/+]]]q99//]+2/9q10]]"&'732654.#52>54&#"'>32ʧ-~g`q7\x@@rV1c]#F<* >aNUb5,GX-8dK+1e},NV^[;N-&C4JV!7*Db?*Lh?9X=$)C]:EwW1:@  @k7#<Ŭ:MRJe9<9:&@ &!%+5+5:@u9y @{ H x /OI8 yG 6   F09I  O0/ P?O??2/?3/9/^]q2/8]]]]]qr3q/]29/89qq3]3qq]10]]]+]]32>?3###04A0-BaA:&2\MBU # :@*tUeu&frdV@= Ht HF@@`p6@H  PP ???/]3]]+3q3]]qr]10+]]+]]]]]]]]]]]!!#"&'532>7!h*,3G^A0 &#3(!"&ؕ]**^:@ k{d t @z7!#4>7% # <=9,:k?HH?<@<: @0F@O9/o    @1H F   0  P? ?2?39/^]qr/]q2+]qr]qr^]210!3#!#B紴:6:VNR:m@PF@O9/o   / F0P?3?/^]q]]qr]qr^]10#!#Ǵ/:I:WMSWNF#:H@+F _ 0 @ / P?2?]]]]9/^]]+M10!!#!#d:IW:\VW>5J_@ ]]]NHHH9HmR3@K H/  H 6G@ KG$DU' HA&$Dd4aa@4#HaTadaaa@a a0aaa&-PFP1[;P ??32?32?]]]_]]]+q/^]q3322]+M10_^]+]+]+++]#"&'##467##"3234.533>3232>754.#"4.#"32>>&Vei*.op-.reV&8U<<^A""@^=9V9n4X@5\F(#A\54&+ 4hggE`;tpJvR,61G.^W2: i H@: HG F@ F @  Q   O    Q ?3?39/^]q/]2]9/10++2#!332>54&+3&4hggE`;t<pJvR,:61G.^W ::  H@V HG@//?_@#'H F  @  Q   O   Q ??9/^]q/]q2+]qr]10++2#!332>54&+84hgUE`;tpJvR,:61G.^W7N(@Wv"vkk  G@    *FF@ H P  P$ `p@"H$/@ HP?3/+]?3/+]9/q/+qr3/]q29/]10]]]]]732>7!5!.#"'>32#".7dIgD"c"CgImv Bi]ZQ3rcj=; lh5aRZX,i[DtT05أx͗V6\zN'@Uy%%t!!vyG G@) F   0  P P/  #P???9/]?/^]q2]9/^]310]]]]]#".'##33!24.#"32>fsA޴!׽#Ca=?cF%'F^8>dF&>:6~b')c{~b('b: @Du H (+H %H4+)0 H  HG  F@   @[kQ/Q  ?3?9/]2/]83]q39/9310++]]q+q++] #.5463!##";Xvxk|6z\]^]W{&Hi@ &&*(%+55+55 W9@ 1 H@V H$$9F@P---; 9F0;;;;;;p;;;9(P!3P Q H??+9/322??]]qr/^]q3322]q9/10^]++]3#5353!!3>32#"&'532>54.#",FTd>hM6]H"A $ &1 0XF@gI(!B8'7M28eT>jN-+C.EhE#.TxK&t@ &U %+5+5WN(@qtt/*?$F#F$ $$@$`$$$$$$GP P /@ H  P## #`#p#####"H##?2/+]?3/+]9/q/]2/^]q3/9/]]10]]]]".54>32.#"!!32674r3QZ]iB vmIgC"c#DgJd =jVx؀50TtD[i,XZRa5gm Cz\69KV=&OԵ @88H @ 77H @66H 55H @ 44H @22H 11H @ 00H @**H ))H @ ((H @&&H %%H $$H ##H @""H @H @ H11H@ ()H@HH@ H%+5+]++++55++++++++++++++++++%{&i&%+55+55W=M :"-*@Ruj9Huj 9  H W g w  Hm Hu6F H@ H"#F@  G))@  H)/P//@]#H/0/m  ?       ?  j )  5   -Q"""""O""" P P#Q ???9/^]q/3]]qq]q]]]]]qq]]+q+]9/]210++]]]+q+]]+qq]]+qq]]]2#!!#"&'532>7!32>54&+M4hg>e*,3G^A0 &#3(!"&E`;tpJvR,ؕ]**^61G.^W,: H@ HF G@!P!!@2#H!F @Q POQ ?2??9/^]q3//]2]+q]9/3210++32#!!#3!32>54&+4hgfNE`;t:6JvR,:6E1G.^W )@U H! F@P   +# F0++++++p+++#Q  P H?+2?3?9/32]]qr/^]q3322]q910^]+>32#4.#"##5353!!=FTd>hM0XF@gI(,Y7M28eTWEhE#.TxK!B8'&t?@ &Q%+5+5W&\@  & %-%+5+5h: }@Y I O & F@O9/o F0  p  P/3?3/]qr/^]q]qr^]9/^]1033!3!#:Ih7@%Z@F@_??3/^]]/]103!# 8@$I0 F0P???/^]q3/]10!#!3!B٣8: &:A/&03.%+5+5&ZCH+&,/*%+5+5 &:@ /&K/2.%+5+5&Zt&@ +&]+.*%+5+5 &:@ /&31.%+55+55{&Zi@ +&/-*%+55+55-)&<" & %+5+5W&\Ci &!$%+5+5[Op5![Р[Op5![Р[Op5![РrL+@?O/?o@&+H/+]q//105!rÉL+@?O/?o@&+H/+]q//105!ÉL+@?O/?o@&+H/+]q//105!ÉN&BBH /@ H@ H @  H ?/+2+10+54>733 y-2Y4VKB AAH 4 H  H @  H  ?/+3+10+#>5#53H {-1X5VKB A?H 3 H  H @  H  //+3+10+%#>5#53H {-1X35WKB AA~G /@ H@ H @  H  ?/+2+10+##.=AX1-{ ?A BKV5K_ Y@: H H@ H @ H    ?32/2]/^]]2+2+10++54>733!54>733 z-1X y-2Y4VKB AAÒ4VKB AAK_ k H@ H  @ H    @ H?  ?32/2]/]3+^]]2+10++#>5#53#>5#53_ y-1X {-1X5VKB AAÑ5VKB AAK_ h H@ H  @ H    @ H  /32/2/]/3+^]]2+10++%#>5#53#>5#53_ y-1X {-1X35WKB AAÐ5WKB AAv @@%  /o  /?/]q33/22/10#53%s`arxsV@2      ?//]3/3322/21053%%%%#5hihixxGQ|I H @' H H H?  0/]]]/]]]10++++#".54>32|-Lf:9cK++Kc9:fL-:fM,,Mf:9dJ++Jd V@= 0`0@`/ /3322/]]/^]q9/10!53!53!53(7+?Sg{@ vyf@ H` H\ HV H>@ H8 H4 H. H@ H H  H@  HJ;1@v y 1f@&@@@@@@rcYihh&hhhhvhYhFh)hhhhhyhkhVh9hhh&h h " )IYy"@-1H@H}}}}y}k}]}I};}-} }}}}}}}}}}}i}[}M}6})} }}}}}}}}}{}f}K}=} }}}}}}k}}]}9}+}} }}}}}}{}}Y} };}K}}}}}}{}}f};}K} }}}}}}}}i}y}]}9}I}+}}}}}@}}{}f}I}6} }}i}}}}}y}k}I};}} }}}}}}}y}[}k}9}}+}}}}}}y}k}9}&} }8}}}}}}Y}F})}}}}}}}}{}d}K}?}}}}}}}}p}_}@}}}mTw^E,O6'?????^]]]]]]]_]]]qqqqqqq_qqqqqrrrrrrrrrr^]]]]]]]]]qqqqqqqqqqrrrrrrrrrrr^]]]]]]]]]]qqqqqqqqqqrrrrrrrrr^]]]]]qqqqqqqqqrrrrrrrrrr^]]]]]]]]]]]]]qqqqqqqqqqq/++^]/^]]]]]]]qqqqqqqrr9/]q99//^]]883310++++++++++++_]]!#3%2#".54>4.#"32>2#".54>4.#"32>2#".54>4.#"32>0?lP..Qn%7#&:''8%"6'?lP..Qn%7#&:''8%"6'?lP..Qn%7#&:''8%"6' !SjfV&%VgjS!Ib:;aIGa;;a!SjfV&%VgjS!Ib:;aIGa;;a!SjfV&%VgjS!Ib:;aIGa;;aUzY(@ H H/0?/]]10++3U@ĞzUz&V `]5XQH@7jzjzO_0@`p/o/]/]q10]]%53 PQm?sYRB@0eueupo/o/]/]]q10]]%#5 53RQot?G&@ //]55]55T ///10!5!+u`b-o@@ H@ H??/++]8/]810!#3qe!o@ H $  !$ @& HK[@H@H/?/_]]]++]3/]+]22/]/]210+4.#"#4.533>32 /#HUw&1@*na.=%d^.("# . lyO.j@E  0Pp \  Q   _?O? _ ??9/^]]q]q22/3322/]q99//10!!!!##53!gQn{$Ձ:P:@Q::%5(,0 o4n+'0n O_o:o  0Pp0@FH*Q. Q+  @*-H   'o/_o4#s)4t%:::?3]]2?3]9/]q3]+]222/+^]qr/]9/33229/339910]]#!5>=#535#5354>32.#"!!!!!2>7P 9YsCFYV0cgF{cG '5A$rphh,?(&C5%7PuM%.y\f7:V994$s}8j\G*C0g/b@Gu[[[IkIIDmD[DiRiP}[k}[kT9d969F9%a5aEaL H1@^ H H -RIQQ0HAF'K%)H" 9I8f888YHK_?K_KKK@'H_KK@APA`AAAA@ HAF d[_HdPXHdFJHd;>Hd05Hd@ HOd_dodd HY@GHAHYAN54.'.54632.#"=yy+}|>iq{#J0i]ho5n)7(跪Ky\=cX(D1">W41`M/-6 9P00dR4\uD=oaԒ {zŃbNIbx6X@=: () 5O;pwit& U$ 6WV=@DIj&:+J+z++$;4;D;t;;.779-3n%n$$n@`@^H0Q9Q6@'/H-/?/?/(s%|%%%*%%ss% ?3]]?3]]]9/]qr3]+q222/+]q3//3/229/10]]]+%267#".'#73.5467#73>32.#"!!!!dx ?gaxyE (x(I{sag? yjDjO2 (c(l *Mr~d[DvW2Mr.5zC2WvD[d'Wc/%Qd9E+O@vy/B@  H< H H @ H H HJII45?@>,?@ H?"  P`&441:MJD'????33]/]/+99//883/3310++++++]]]#".54>32#34.#"32>3267#".54>32.#"3WtBBsU10VuDBsU2;+?(*@,+?)'?,/K6E^ -MoH^R&;a|ADjL0 SKlW}i--h~g))g1cN !Nb_O""O|K|Z2RW 6cL-Ey`g*(F^7 HU~'7@ 5(HH@CH H H( (`(p((((((333##  "&H @ H O93- "-/?9/9/9999]/++]3]2^]3/]]q2/310]]+++++]%2673#"&=5>74>324.#">3DExmo B"#B;bH4O5,OnB *s( '1M6Nhm IK;lS1*NoEcv&9S64U=!$=Q.!h.#7;@| H= r E U e  & !!%!  /=:I$I9.I$$$/$$$ I0@P )$H@H 3999@#,H98 @$H @H 8?3++/+]?33++?/]q22/]]]99//]]332]10]]]]]]]]]]+]!#3&'.53#"&54>324.#"32>5!&06+WX]T'/E-.G00C).H2{,,&Y'XR(.'b3ɾ[e55d\Qk@@kPRl??lz'/@ H @HYiy% H@I H,)*@@//**@*P**'%o(, * *P***%-?33]22/]3/]]9/]210++]+]+5#.'&'#367>53##5!l (z @&,7  3)"hool9@_e$e111 H    Ht66v68v8t7767** )50(  (`(p((/o(("[55@AH555055[?Oo0 '0*_)_??32/^]]q/]]+r99//]]3310]]]]]]]]+]]+]]]]267>;!5>54.#"!532.54>Z;mc*'!G`Y*=tlmt=*Y`G!'*cm;ZVj63~Ut|AA|tU~36jVX|H -R@2Z @!!_!P!`!p!!/ /---' ?2]]?9//]2]]qq210]".54>32!32>7.#"kƆE__pŽQ@NX.Kt]L#H$Tm;M\53WJ<"]oՋBO҂-#73!;H:RR:H;)"bADp*$*pDAb"V@ @ /299/105>73.'#"bADp*$*pDAb"V;H:RR:H;#d^D@  //29910.'3#>7!5;H:RR:H;#"bADp*$*pDAb"V@ @ /299/10%>7#.'53+"bADp*$*pDAb"V;H:RR:H;d^D$@@ //29929910#.'5>73!.'3#>7;H:RR:H;;H:RR:H;)"bADp*$*pDAb""bADp*$*pDAb"&@@@ /299299/105>73.'>7#.'5"bADp*$*pDAb""bADp*$*pDAb";H:RR:H;;H:RR:H;H#(@#  /299299/3210!!5>73.'>7#.'5 "bADp*$*pDAb""bADp*$*pDAb"hPX;H:RR:H;;H:RR:H;8/E@]z!!DHUeJZzJ8Z8C8 H:C* : J %-5--- '0'''00(00F@`@@H@ HG323>54&#"7>32.#"32>  `a]N#/IfS*M@2;:7$*tCq^)$3@$5VC1 *A,BlS8.hjj0ΐM?kK32>32%"32>54..#"326],RsFaF KTZ.EsS.,RtG^CKT^3ErQ-Fw83wM+G33G]3wN+F10G/FxNNj>?fH'7dYQh<>fI(7e~(F^66\E'(F^63]E)~` //103!!^j8^#@K[K[ //3//10]]4>32#4.#"Dzbc{Fg5_NN^4tLLtbl98ldN#@ ""*"% %%%%%%@HL%/%?% %%@H%@H%%)%9% %%%%@Hk%{%%]%K%)%9%% %%%Hm%%H %%H%y%%%K%[%k%%H%%%}%%k%]%&%6%F%%%%%%p%@nwzH%@ekH%v%% %%)%%%@ORH%JNH%)% %%%%%%%%%54>32.#"$$K>#3B'2Z}K"K=$3B'2Y|N %@T0^V( (AT,B^V)8P,!C@$ H HA HB0 H=0 H*г H0@ H H 0 H0 H Hг HгH@) H?0P@`- @ H /E;@-#@)(1 1011@ '323267"&'.#"5>323267(EIAk-&A<82Q(PMK%233E{4 ;=D(EIAk-&A<82Q(PMK%233E{4 ;=D+ !%/  3+Z,  &.  2* A7$@l5: < *      dtP0 `o  _ o   /_o P   /]]3]22222/]q3/]q_qq3910_]]]]##5!!5!3!!!7 =X!l$ܔdGP 1@  ??/]/]9//33/33105!5!5!d8d?$ {@H(H(H@?H 0P @`@ HO_@PP/]33]]//+3//]q310]+]+++5 5!AZw쑑A$ y@H(H(H@>H 0P @`@ H@PO_P/]]]33//+3/]q310]+]+++75 55!AZXXu7 #@i y iy///10]]3 %! {RVdG////107!!d>T"  H  ///10+#47632#"'.'&#"TR?K3% !$ V{{?0(4 ''#i  H ///10+3#".54>3232765"Z(g>2%!%}86'"%)j%?33105! %iH??103#ؑHK"??310!!#(in"??3105!# (%%H"??3103!!Hn%H"??3105!3 %H' ???23103!!#iHnnH'???33105!3# %K( ?2?33105!!# i%n%H( ?3?33105!3! %nH 3  @  ?32??3223105!3!!# i%nnqj% ??3233105!5! AّH*A ?2?3103#3#ّhHK Kj 1  ???23310!!!!#(iijב" 3     ?3?2310!###בnn#j ? A    ??3?3310!!#!!#htjo"j 1    ???333105!5!5!# i(qב) 4A    ?2?33105!### ܑב%nj ? A    ??3?3310#!5#!5!ґttj)F)ޑqH 1   ???233103!!!!iH"ב%H 4 A    ?3?33103!!33A$Hn#nqH ?  A    ?2??33103!!3!!ّK$hH"qH 2    ???332105!5!5!3 iqב)%H 4A    ?3?3310!5!333$ב%nqH ?A      ??3?3310!5!3!3!5!$KqFH 6    ????2233103!!!!#iiH"ב"H 8     ??3?323103!!#3#AHnn KH I A     ?3?3??223310#3!!#3!!jt " "H 8  @   ????3322105!5!5!3# iqבKH ;A   @ ??3?332105!3#3# 㑑h%K#KH I  A     ?3??3?2233103#3!5!#!5!A㑑tHK )ޑj 9     ?2??3333105!!#5! iiq"h :   @  ?22?333105!!### ב%nnj J    ?3?32?333310#!5!3!!#!5jtttAޑ"בqH :@     ?3??3333105!3!5! Aّ"%H :  @  ?33?333105!333! ב%nnqH L@  A      ?3?32?3333103!!3!5!5!AH"oHL  @    ?32?32??33222233105!5!5!3!!!!# iiiqב"ב"HM  @     ?3?3322?3322223103!!###!5!33AבHnnnnH ]     ?3?32?3?3222332233103!!#!5!3!!#3!5!AבttH"ޑ" mH/?3310!!Umm?/3310!!UH??3310!!U H??/310!!* H??/310!!* *g #'+/37;?CGKOSW[_cgkosw{1mUE- y@ xlTD, xeM5@ dL4qYA)}@ |pX@(|aQ9 @ `P8u]=%@!t\<$x||xiI1!@hH0 gckhd`h_[WT\XTSOKHPLHC?GD@.)'.@D%T%K![!K[DT #//10]]]]4>32#".732>54.#"Fz^^{GG{^^zFV9bLLc::cLLb9d^{GG{^^zFFz^Lc99cLLc::c# /]/102#"'&5467>76jnk5RS4l9R46n9:m64R9) //103!32>54.#")Ex[[xEEx[[xE}A[xEEx[[xEEx)+"@" '//103!4>32#".'32>54.#")Q:cKKc::cKKc:MEx[[xEEx[[xE}AKc::cKKc::cK[xEEx[[xEExscu" //10#"'.5476324'&#"3276c%%%V3eK#%HJfgGJL33FF3331HH13}5V%#%H%V5fHJJGgF3333FE6116y!-9D@] $ t $t+{+{D"(?4.(.(.1%+7+>:h:Y:G:::b^0H[[׀ؙٙW .. -- .. --#_[)4`@7*/$'!04h4Y4K4=442-_oO-_--- /99//]^]3]]]]332/99//3310#"'&54676324&#"326%4&#"326327'#"'ZZZZ. -- ., // ,0^b>LLH[[ -- .. -- ..[_#Fs;3F/@ H4.4$w##@M H H;;  H;/4#4;B p ?   9+>0/43?3O33/^]]]]]/]]]]10]]]]+]]++]]]+373#'#5.''7.'#5367'7>7"327654'.B 965--,,(17:"B?n0+(. P(9p6Eu0bb0uE`cc1u;  -;q9>_1(,=20db2/aac02P&/b@>++++""""P'''@%(H /+^]2qr/]32/qr]qr9/3210.'&547>32!!#!5!"327654&'&7Z#GS,e>SW;=>B.*PlzS++VSzmQR FF;G,+G>>=T,G;QAQF@(1A;NN?  33FF;A1?J777B??/^]]]99/r]]r9910.'.'.547>323267632#"'.'#"'&547632"327654'&6%( ? .@$    TVWvvWTTUzGSZ>==@XY<>><      "O-@" '*R*Qm}VXTTuuWV+ >=X[===>ZW>>;/(@& 0 ` p  "@ H"O_/]//+3/]/10#"'!727>'#"'&547>7>76 (_E#%?BXc$&}V+B,-SZB?N9En&86_,+i?~BCF_?BWVc %%1E[wK`_B?[J;*U/;q9S<K/@9M?4=C /)//99//]923/]10)7>7>7654&5#"&'&547632.'.547>3267>32#"&'.'FTl)@4:Z+X-;a)OII]P3N(a2+C.=#!K2dmy;*&StsOP"4&sN&(PNmVb(%)LtvSP<3=-Q}.-L'fZy'&@) @ P p  ///]10^]].'.'.'.547632>32b*gL8E+%DFfbN/"X2U#F)N7>-qEEt/'xSEj( #&b<^Q2P;`N]]5(o]H: 9Pwc;kM;!0@! @O_o! //]9/9/]2103#>54&'&'#"&547632L3:0./9@%%Hl9:Q0*%#Jj9:;b&J5-L9<guv#dC  @; H#F/  O o  O_Fo"SP P ?3?32???/]]2/]/]q3210+]##5354>32.#"3533i;fQ E-(3 ӆIz;eK+)<'ai:wZC  @5 HF/OoO_FoP P?3?32??/]]2/]/]q10+]##5354>32.#"33i;fQ E-(3 ӇIz;eK+)<'aI4wNK H@( H_?O  P`p/]/]/]q9/10++#"&'532>54&#*732AhK-1%)8#=H>4T< )C0b %(`)?w8@ o_]]]5NH K H@ H  `@ !H   /]+]q/310++#>5#53H,(u-1XWk/0V.3 #5!533!4=46'jo岲o-q %'# !&"5(|&@%%$5$E$ H"" @5H ` `""D T d 5   &  ?2]]]?9//]q2/+]33_q22_]]10+]#".'732654&#"#!!>32|&IlFBeJ, '6$GVQK3M!r[6CgE$CAhJ(!;Q0/$U]QU%q!'Gf+4x6@!  `` ??2/]]q3/]9/10#4>7!5!x@jM+/Pk<4MalfXq-('QD H@@R H/ H+ HL7G H===222FGGG( ` `L8# B#-??]]9/99/]q2/q/]]3/q99]10++++4.#"32>4.#"32>7#".54>75.54>32 5)'5 6-06 #=1-;$$=..="#IqMMqJ#/= $7&#FhDHiE!&8$$?.0""0/''04()5#;**<6[B%%BZ6.H4 %4@#-O;"#@)u u I  I@  /?/]2/]10]]".'332673ToQ h]]h Q9[s9g``g9s[9|E $@ P` ?]q/310#>5#53E,(u-1XWu/0`.K /@  _oP  ?   /]q]q/21046733#,(u-1X%Wu/0`.j0@u@@@H_@ H/+]+/]]10]%53H4@"z@@O@H_@ H/+]+/]]10]573H A@v x@ H@@H_@ H/+]3+/+]10]]#'##573ih A@vx@ H@@H_@ H/+]+2/+]10]]#'53373hi-Z#@_@ H/+]32/1053!53ӥDYi@" H  H@ @_@ H/+]23/]]10++]".#"#>3232673*TNG76 [-J;,TNE67\+J%-%>9-_N2%-%?8,_N3  X@<f bb @@ H@H_@ H/+]2+2/+^]q10]]]]]5733573 7@  d @ @H _@ H/+]+2/^]10^]]".'3326734JtT2um[[ku 2St)EZ15<=41ZE)V@3s  DzQ ) r . +    f  .  , [ (   88 \  VDigitized data 2007 Ascender Corporation. All rights reserved.Digitized data 2007 Ascender Corporation. All rights reserved.Liberation SansLiberation SansRegularRegularFontForge 2.0 : Liberation Sans Regular : 13-7-2008FontForge 2.0 : Liberation Sans Regular : 13-7-2008Liberation Sans RegularLiberation Sans RegularVersion 1.04Version 1.04LiberationSans-RegularLiberationSans-RegularLiberation is a trademark of Red Ht, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions.Liberation is a trademark of Red Ht, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions.Ascender CorporationAscender CorporationSteve MattesonSteve Mattesonhttp://www.ascendercorp.com/http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlhttp://www.ascendercorp.com/typedesigners.htmlUse of this Liberation font software is subject to the license agreement under which you accepted the Liberation font software.Use of this Liberation font software is subject to the license agreement under which you accepted the Liberation font software.http://www.ascendercorp.com/liberation.htmlhttp://www.ascendercorp.com/liberation.html  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjikmlnoqprsutvwxzy{}|~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~uni00B2uni00B3u00B5uni00B9AmacronamacronAbreveabreveAogonekaogonek Ccircumflex ccircumflex Cdotaccent cdotaccentDcarondcaronDcroatEmacronemacronEbreveebreve Edotaccent edotaccentEogonekeogonekEcaronecaron Gcircumflex gcircumflex Gdotaccent gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonekIJij Jcircumflex jcircumflex Kcommaaccent kcommaaccent kgreenlandicLacutelacute Lcommaaccent lcommaaccentLcaronlcaronLdotldotNacutenacute Ncommaaccent ncommaaccentNcaronncaron napostropheEngengOmacronomacronObreveobreve Ohungarumlaut ohungarumlautRacuteracute Rcommaaccent rcommaaccentRcaronrcaronSacutesacute Scircumflex scircumflex Tcommaaccent tcommaaccentTcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring Uhungarumlaut uhungarumlautUogonekuogonek Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentlongs Aringacute aringacuteAEacuteaeacute Oslashacute oslashacute Scommaaccent scommaaccentuni021Auni021Buni02C9tonos dieresistonos Alphatonos anoteleia EpsilontonosEtatonos Iotatonos Omicrontonos Upsilontonos OmegatonosiotadieresistonosAlphaBetaGammaEpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsi IotadieresisUpsilondieresis alphatonos epsilontonosetatonos iotatonosupsilondieresistonosalphabetagammadeltaepsilonzetaetathetaiotakappalambdanuxiomicronrhosigma1sigmatauupsilonphichipsiomega iotadieresisupsilondieresis omicrontonos upsilontonos omegatonos afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061 afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109 afii10110 afii10193 afii10050 afii10098WgravewgraveWacutewacute Wdieresis wdieresisYgraveygraveuni2010uni2011 figuredash afii00208 underscoredbl quotereversedminutesecond exclamdbluni203Euni207FlirapesetaEuro afii61248 afii61289 afii61352u2126 estimated oneeighth threeeighths fiveeighths seveneighths arrowleftarrowup arrowright arrowdown arrowboth arrowupdn arrowupdnbseu2206 orthogonal intersection equivalencehouse revlogicalnot integraltp integralbtSF100000SF110000SF010000SF030000SF020000SF040000SF080000SF090000SF060000SF070000SF050000SF430000SF240000SF510000SF520000SF390000SF220000SF210000SF250000SF500000SF490000SF380000SF280000SF270000SF260000SF360000SF370000SF420000SF190000SF200000SF230000SF470000SF480000SF410000SF450000SF460000SF400000SF540000SF530000SF440000upblockdnblockblocklfblockrtblockltshadeshadedkshade filledboxH22073H18543H18551 filledrecttriaguptriagrttriagdntriaglfcircleH18533 invbullet invcircle openbullet smileface invsmilefacesunfemalemalespadeclubheartdiamond musicalnotemusicalnotedbluniF001uniF002uniF005middotuniF004uni2074uni2075uni2077uni2078glyph571glyph572glyph573glyph574glyph575glyph576glyph577glyph578glyph579glyph580glyph581  LNDFLTcyrl$grek.latn8 TbDFLTcyrl&grek2latn>kernpi 2@^p4r|&Tv.8,:dR>TZ`6  . < b 0 H j  @ R  , > l .p(FLZ $7<V_biqrxh 7h9h:vZG././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/fixtures/fonts/u13079_PyGameMono-8.png0000644000175100001770000000013114676242340022211 0ustar00runnerdockerPNG  IHDRPLTEٟIDATchgv8IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0681257 pygame-2.6.1/test/fixtures/xbm_cursors/0000755000175100001770000000000014676242436017623 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/fixtures/xbm_cursors/white_sizing.xbm0000644000175100001770000000055614676242340023036 0ustar00runnerdocker#define resize_white_width 16 #define resize_white_height 16 #define resize_white_x_hot 7 #define resize_white_y_hot 7 static unsigned char resize_white_bits[] = { 0xff, 0x03, 0x01, 0x02, 0xfd, 0x03, 0x05, 0x00, 0xf5, 0x0f, 0x15, 0x08, 0xd5, 0xeb, 0x55, 0xaa, 0x55, 0xaa, 0xd7, 0xab, 0x10, 0xa8, 0xf0, 0xb7, 0x00, 0xa8, 0xc0, 0x9f, 0x40, 0x80, 0xc0, 0xff}; ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/fixtures/xbm_cursors/white_sizing_mask.xbm0000644000175100001770000000060714676242340024046 0ustar00runnerdocker#define resize_white_mask_width 16 #define resize_white_mask_height 16 #define resize_white_mask_x_hot 7 #define resize_white_mask_y_hot 7 static unsigned char resize_white_mask_bits[] = { 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0x07, 0x00, 0xf7, 0x0f, 0xf7, 0x0f, 0xf7, 0xef, 0x77, 0xee, 0x77, 0xee, 0xf7, 0xef, 0xf0, 0xef, 0xf0, 0xff, 0x00, 0xf8, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff}; ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/font_test.py0000644000175100001770000006505614676242340015771 0ustar00runnerdocker# -*- coding: utf-8 -*- import sys import os import unittest import pathlib import platform import pygame from pygame import font as pygame_font # So font can be replaced with ftfont FONTDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures", "fonts") def equal_images(s1, s2): size = s1.get_size() if s2.get_size() != size: return False w, h = size for x in range(w): for y in range(h): if s1.get_at((x, y)) != s2.get_at((x, y)): return False return True IS_PYPY = "PyPy" == platform.python_implementation() @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class FontModuleTest(unittest.TestCase): def setUp(self): pygame_font.init() def tearDown(self): pygame_font.quit() def test_get_sdl_ttf_version(self): def test_ver_tuple(ver): self.assertIsInstance(ver, tuple) self.assertEqual(len(ver), 3) for i in ver: self.assertIsInstance(i, int) if pygame_font.__name__ != "pygame.ftfont": compiled = pygame_font.get_sdl_ttf_version() linked = pygame_font.get_sdl_ttf_version(linked=True) test_ver_tuple(compiled) test_ver_tuple(linked) self.assertTrue(linked >= compiled) def test_SysFont(self): # Can only check that a font object is returned. fonts = pygame_font.get_fonts() if "arial" in fonts: # Try to use arial font if it is there, rather than a random font # which can be different depending on installed fonts on the system. font_name = "arial" else: font_name = sorted(fonts)[0] o = pygame_font.SysFont(font_name, 20) self.assertTrue(isinstance(o, pygame_font.FontType)) o = pygame_font.SysFont(font_name, 20, italic=True) self.assertTrue(isinstance(o, pygame_font.FontType)) o = pygame_font.SysFont(font_name, 20, bold=True) self.assertTrue(isinstance(o, pygame_font.FontType)) o = pygame_font.SysFont("thisisnotafont", 20) self.assertTrue(isinstance(o, pygame_font.FontType)) def test_get_default_font(self): self.assertEqual(pygame_font.get_default_font(), "freesansbold.ttf") def test_get_fonts_returns_something(self): fnts = pygame_font.get_fonts() self.assertTrue(fnts) # to test if some files exist... # def XXtest_has_file_osx_10_5_sdk(self): # import os # f = "/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/ft2build.h" # self.assertEqual(os.path.exists(f), True) # def XXtest_has_file_osx_10_4_sdk(self): # import os # f = "/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/ft2build.h" # self.assertEqual(os.path.exists(f), True) def test_get_fonts(self): fnts = pygame_font.get_fonts() self.assertTrue(fnts, msg=repr(fnts)) for name in fnts: # note, on ubuntu 2.6 they are all unicode strings. self.assertTrue(isinstance(name, str), name) # Font names can be comprised of only numeric characters, so # just checking name.islower() will not work as expected here. self.assertFalse(any(c.isupper() for c in name)) self.assertTrue(name.isalnum(), name) def test_get_init(self): self.assertTrue(pygame_font.get_init()) pygame_font.quit() self.assertFalse(pygame_font.get_init()) def test_init(self): pygame_font.init() def test_match_font_all_exist(self): fonts = pygame_font.get_fonts() # Ensure all listed fonts are in fact available, and the returned file # name is a full path. for font in fonts: path = pygame_font.match_font(font) self.assertFalse(path is None) self.assertTrue(os.path.isabs(path) and os.path.isfile(path)) def test_match_font_name(self): """That match_font accepts names of various types""" font = pygame_font.get_fonts()[0] font_path = pygame_font.match_font(font) self.assertIsNotNone(font_path) font_b = font.encode() not_a_font = "thisisnotafont" not_a_font_b = b"thisisnotafont" good_font_names = [ # Check single name bytes. font_b, # Check string of comma-separated names. ",".join([not_a_font, font, not_a_font]), # Check list of names. [not_a_font, font, not_a_font], # Check generator: (name for name in [not_a_font, font, not_a_font]), # Check comma-separated bytes. b",".join([not_a_font_b, font_b, not_a_font_b]), # Check list of bytes. [not_a_font_b, font_b, not_a_font_b], # Check mixed list of bytes and string. [font, not_a_font, font_b, not_a_font_b], ] for font_name in good_font_names: self.assertEqual(pygame_font.match_font(font_name), font_path, font_name) def test_not_match_font_name(self): """match_font return None when names of various types do not exist""" not_a_font = "thisisnotafont" not_a_font_b = b"thisisnotafont" bad_font_names = [ not_a_font, ",".join([not_a_font, not_a_font, not_a_font]), [not_a_font, not_a_font, not_a_font], (name for name in [not_a_font, not_a_font, not_a_font]), not_a_font_b, b",".join([not_a_font_b, not_a_font_b, not_a_font_b]), [not_a_font_b, not_a_font_b, not_a_font_b], [not_a_font, not_a_font_b, not_a_font], ] for font_name in bad_font_names: self.assertIsNone(pygame_font.match_font(font_name), font_name) def test_match_font_bold(self): fonts = pygame_font.get_fonts() # Look for a bold font. self.assertTrue(any(pygame_font.match_font(font, bold=True) for font in fonts)) def test_match_font_italic(self): fonts = pygame_font.get_fonts() # Look for an italic font. self.assertTrue( any(pygame_font.match_font(font, italic=True) for font in fonts) ) def test_issue_742(self): """that the font background does not crash.""" surf = pygame.Surface((320, 240)) font = pygame_font.Font(None, 24) image = font.render("Test", 0, (255, 255, 255), (0, 0, 0)) self.assertIsNone(image.get_colorkey()) image.set_alpha(255) surf.blit(image, (0, 0)) # not issue 742, but be sure to test that background color is # correctly issued on this mode self.assertEqual(surf.get_at((0, 0)), pygame.Color(0, 0, 0)) def test_issue_font_alphablit(self): """Check that blitting anti-aliased text doesn't change the background blue""" pygame.display.set_mode((600, 400)) font = pygame_font.Font(None, 24) (color, text, center, pos) = ((160, 200, 250), "Music", (190, 170), "midright") img1 = font.render(text, True, color) img = pygame.Surface(img1.get_size(), depth=32) pre_blit_corner_pixel = img.get_at((0, 0)) img.blit(img1, (0, 0)) post_blit_corner_pixel = img.get_at((0, 0)) self.assertEqual(pre_blit_corner_pixel, post_blit_corner_pixel) def test_segfault_after_reinit(self): """Reinitialization of font module should not cause segmentation fault""" import gc font = pygame_font.Font(None, 20) pygame_font.quit() pygame_font.init() del font gc.collect() def test_quit(self): pygame_font.quit() @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class FontTest(unittest.TestCase): def setUp(self): pygame_font.init() def tearDown(self): pygame_font.quit() def test_render_args(self): screen = pygame.display.set_mode((600, 400)) rect = screen.get_rect() f = pygame_font.Font(None, 20) screen.fill((10, 10, 10)) font_surface = f.render(" bar", True, (0, 0, 0), (255, 255, 255)) font_rect = font_surface.get_rect() font_rect.topleft = rect.topleft self.assertTrue(font_surface) screen.blit(font_surface, font_rect, font_rect) pygame.display.update() self.assertEqual(tuple(screen.get_at((0, 0)))[:3], (255, 255, 255)) self.assertEqual(tuple(screen.get_at(font_rect.topleft))[:3], (255, 255, 255)) # If we don't have a real display, don't do this test. # Transparent background doesn't seem to work without a read video card. if os.environ.get("SDL_VIDEODRIVER") != "dummy": screen.fill((10, 10, 10)) font_surface = f.render(" bar", True, (0, 0, 0), None) font_rect = font_surface.get_rect() font_rect.topleft = rect.topleft self.assertTrue(font_surface) screen.blit(font_surface, font_rect, font_rect) pygame.display.update() self.assertEqual(tuple(screen.get_at((0, 0)))[:3], (10, 10, 10)) self.assertEqual(tuple(screen.get_at(font_rect.topleft))[:3], (10, 10, 10)) screen.fill((10, 10, 10)) font_surface = f.render(" bar", True, (0, 0, 0)) font_rect = font_surface.get_rect() font_rect.topleft = rect.topleft self.assertTrue(font_surface) screen.blit(font_surface, font_rect, font_rect) pygame.display.update(rect) self.assertEqual(tuple(screen.get_at((0, 0)))[:3], (10, 10, 10)) self.assertEqual(tuple(screen.get_at(font_rect.topleft))[:3], (10, 10, 10)) @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class FontTypeTest(unittest.TestCase): def setUp(self): pygame_font.init() def tearDown(self): pygame_font.quit() def test_default_parameters(self): f = pygame_font.Font() def test_get_ascent(self): # Checking ascent would need a custom test font to do properly. f = pygame_font.Font(None, 20) ascent = f.get_ascent() self.assertTrue(isinstance(ascent, int)) self.assertTrue(ascent > 0) s = f.render("X", False, (255, 255, 255)) self.assertTrue(s.get_size()[1] > ascent) def test_get_descent(self): # Checking descent would need a custom test font to do properly. f = pygame_font.Font(None, 20) descent = f.get_descent() self.assertTrue(isinstance(descent, int)) self.assertTrue(descent < 0) def test_get_height(self): # Checking height would need a custom test font to do properly. f = pygame_font.Font(None, 20) height = f.get_height() self.assertTrue(isinstance(height, int)) self.assertTrue(height > 0) s = f.render("X", False, (255, 255, 255)) self.assertTrue(s.get_size()[1] == height) def test_get_linesize(self): # Checking linesize would need a custom test font to do properly. # Questions: How do linesize, height and descent relate? f = pygame_font.Font(None, 20) linesize = f.get_linesize() self.assertTrue(isinstance(linesize, int)) self.assertTrue(linesize > 0) def test_metrics(self): # Ensure bytes decoding works correctly. Can only compare results # with unicode for now. f = pygame_font.Font(None, 20) um = f.metrics(".") bm = f.metrics(b".") self.assertEqual(len(um), 1) self.assertEqual(len(bm), 1) self.assertIsNotNone(um[0]) self.assertEqual(um, bm) u = "\u212A" b = u.encode("UTF-16")[2:] # Keep byte order consistent. [2:] skips BOM bm = f.metrics(b) self.assertEqual(len(bm), 2) try: # FIXME why do we do this try/except ? um = f.metrics(u) except pygame.error: pass else: self.assertEqual(len(um), 1) self.assertNotEqual(bm[0], um[0]) self.assertNotEqual(bm[1], um[0]) u = "\U00013000" bm = f.metrics(u) self.assertEqual(len(bm), 1) self.assertIsNone(bm[0]) return # unfinished # The documentation is useless here. How large a list? # How do list positions relate to character codes? # What about unicode characters? # __doc__ (as of 2008-08-02) for pygame_font.Font.metrics: # Font.metrics(text): return list # Gets the metrics for each character in the passed string. # # The list contains tuples for each character, which contain the # minimum X offset, the maximum X offset, the minimum Y offset, the # maximum Y offset and the advance offset (bearing plus width) of the # character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, # maxy, advance), ...] self.fail() def test_render(self): f = pygame_font.Font(None, 20) s = f.render("foo", True, [0, 0, 0], [255, 255, 255]) s = f.render("xxx", True, [0, 0, 0], [255, 255, 255]) s = f.render("", True, [0, 0, 0], [255, 255, 255]) s = f.render("foo", False, [0, 0, 0], [255, 255, 255]) s = f.render("xxx", False, [0, 0, 0], [255, 255, 255]) s = f.render("xxx", False, [0, 0, 0]) s = f.render(" ", False, [0, 0, 0]) s = f.render(" ", False, [0, 0, 0], [255, 255, 255]) # null text should be 0 pixel wide. s = f.render("", False, [0, 0, 0], [255, 255, 255]) self.assertEqual(s.get_size()[0], 0) # None text should be 0 pixel wide. s = f.render(None, False, [0, 0, 0], [255, 255, 255]) self.assertEqual(s.get_size()[0], 0) # Non-text should raise a TypeError. self.assertRaises(TypeError, f.render, [], False, [0, 0, 0], [255, 255, 255]) self.assertRaises(TypeError, f.render, 1, False, [0, 0, 0], [255, 255, 255]) # is background transparent for antialiasing? s = f.render(".", True, [255, 255, 255]) self.assertEqual(s.get_at((0, 0))[3], 0) # is Unicode and bytes encoding correct? # Cannot really test if the correct characters are rendered, but # at least can assert the encodings differ. su = f.render(".", False, [0, 0, 0], [255, 255, 255]) sb = f.render(b".", False, [0, 0, 0], [255, 255, 255]) self.assertTrue(equal_images(su, sb)) u = "\u212A" b = u.encode("UTF-16")[2:] # Keep byte order consistent. [2:] skips BOM sb = f.render(b, False, [0, 0, 0], [255, 255, 255]) try: # FIXME why do we do this try/except ? su = f.render(u, False, [0, 0, 0], [255, 255, 255]) except pygame.error: pass else: self.assertFalse(equal_images(su, sb)) # test for internal null bytes self.assertRaises(ValueError, f.render, b"ab\x00cd", 0, [0, 0, 0]) self.assertRaises(ValueError, f.render, "ab\x00cd", 0, [0, 0, 0]) def test_render_ucs2_ucs4(self): """that it renders without raising if there is a new enough SDL_ttf.""" f = pygame_font.Font(None, 20) # If the font module is SDL_ttf < 2.0.15 based, then it only supports UCS-2 # it will raise an exception for an out-of-range UCS-4 code point. if hasattr(pygame_font, "UCS4"): ucs_2 = "\uFFEE" s = f.render(ucs_2, False, [0, 0, 0], [255, 255, 255]) ucs_4 = "\U00010000" s = f.render(ucs_4, False, [0, 0, 0], [255, 255, 255]) def test_set_bold(self): f = pygame_font.Font(None, 20) self.assertFalse(f.get_bold()) f.set_bold(True) self.assertTrue(f.get_bold()) f.set_bold(False) self.assertFalse(f.get_bold()) def test_set_italic(self): f = pygame_font.Font(None, 20) self.assertFalse(f.get_italic()) f.set_italic(True) self.assertTrue(f.get_italic()) f.set_italic(False) self.assertFalse(f.get_italic()) def test_set_underline(self): f = pygame_font.Font(None, 20) self.assertFalse(f.get_underline()) f.set_underline(True) self.assertTrue(f.get_underline()) f.set_underline(False) self.assertFalse(f.get_underline()) def test_set_strikethrough(self): if pygame_font.__name__ != "pygame.ftfont": f = pygame_font.Font(None, 20) self.assertFalse(f.get_strikethrough()) f.set_strikethrough(True) self.assertTrue(f.get_strikethrough()) f.set_strikethrough(False) self.assertFalse(f.get_strikethrough()) def test_bold_attr(self): f = pygame_font.Font(None, 20) self.assertFalse(f.bold) f.bold = True self.assertTrue(f.bold) f.bold = False self.assertFalse(f.bold) def test_set_italic_property(self): f = pygame_font.Font(None, 20) self.assertFalse(f.italic) f.italic = True self.assertTrue(f.italic) f.italic = False self.assertFalse(f.italic) def test_set_underline_property(self): f = pygame_font.Font(None, 20) self.assertFalse(f.underline) f.underline = True self.assertTrue(f.underline) f.underline = False self.assertFalse(f.underline) def test_set_strikethrough_property(self): if pygame_font.__name__ != "pygame.ftfont": f = pygame_font.Font(None, 20) self.assertFalse(f.strikethrough) f.strikethrough = True self.assertTrue(f.strikethrough) f.strikethrough = False self.assertFalse(f.strikethrough) def test_size(self): f = pygame_font.Font(None, 20) text = "Xg" size = f.size(text) w, h = size s = f.render(text, False, (255, 255, 255)) btext = text.encode("ascii") self.assertIsInstance(w, int) self.assertIsInstance(h, int) self.assertEqual(s.get_size(), size) self.assertEqual(f.size(btext), size) text = "\u212A" btext = text.encode("UTF-16")[2:] # Keep the byte order consistent. bsize = f.size(btext) size = f.size(text) self.assertNotEqual(size, bsize) def test_font_file_not_found(self): # A per BUG reported by Bo Jangeborg on pygame-user mailing list, # http://www.mail-archive.com/pygame-users@seul.org/msg11675.html pygame_font.init() self.assertRaises( FileNotFoundError, pygame_font.Font, "some-fictional-font.ttf", 20 ) def test_load_from_file(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) f = pygame_font.Font(font_path, 20) def test_load_from_file_default(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) f = pygame_font.Font(font_path) def test_load_from_pathlib(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) f = pygame_font.Font(pathlib.Path(font_path), 20) f = pygame_font.Font(pathlib.Path(font_path)) def test_load_from_pathlib_default(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) f = pygame_font.Font(pathlib.Path(font_path)) def test_load_from_file_obj(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) with open(font_path, "rb") as f: font = pygame_font.Font(f, 20) def test_load_from_file_obj_default(self): font_name = pygame_font.get_default_font() font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) with open(font_path, "rb") as f: font = pygame_font.Font(f) def test_load_default_font_filename(self): # In font_init, a special case is when the filename argument is # identical to the default font file name. f = pygame_font.Font(pygame_font.get_default_font(), 20) def test_load_default_font_filename_default(self): # In font_init, a special case is when the filename argument is # identical to the default font file name. f = pygame_font.Font(pygame_font.get_default_font()) def _load_unicode(self, path): import shutil fdir = str(FONTDIR) temp = os.path.join(fdir, path) pgfont = os.path.join(fdir, "test_sans.ttf") shutil.copy(pgfont, temp) try: with open(temp, "rb") as f: pass except FileNotFoundError: raise unittest.SkipTest("the path cannot be opened") try: pygame_font.Font(temp, 20) finally: os.remove(temp) def test_load_from_file_unicode_0(self): """ASCII string as a unicode object""" self._load_unicode("temp_file.ttf") def test_load_from_file_unicode_1(self): self._load_unicode("你好.ttf") def test_load_from_file_bytes(self): font_path = os.path.join( os.path.split(pygame.__file__)[0], pygame_font.get_default_font() ) filesystem_encoding = sys.getfilesystemencoding() filesystem_errors = "replace" if sys.platform == "win32" else "surrogateescape" try: # FIXME why do we do this try/except ? font_path = font_path.decode(filesystem_encoding, filesystem_errors) except AttributeError: pass bfont_path = font_path.encode(filesystem_encoding, filesystem_errors) f = pygame_font.Font(bfont_path, 20) def test_issue_3144(self): fpath = os.path.join(FONTDIR, "PlayfairDisplaySemibold.ttf") # issue in SDL_ttf 2.0.18 DLL on Windows # tested to make us aware of any regressions for size in (60, 40, 10, 20, 70, 45, 50, 10): font = pygame_font.Font(fpath, size) font.render("WHERE", True, "black") def test_font_set_script(self): if pygame_font.__name__ == "pygame.ftfont": return # this ain't a pygame.ftfont thing! font = pygame_font.Font(None, 16) ttf_version = pygame_font.get_sdl_ttf_version() if ttf_version >= (2, 20, 0): self.assertRaises(TypeError, pygame.font.Font.set_script) self.assertRaises(TypeError, pygame.font.Font.set_script, font) self.assertRaises(TypeError, pygame.font.Font.set_script, "hey", "Deva") self.assertRaises(TypeError, font.set_script, 1) self.assertRaises(TypeError, font.set_script, ["D", "e", "v", "a"]) self.assertRaises(ValueError, font.set_script, "too long by far") self.assertRaises(ValueError, font.set_script, "") self.assertRaises(ValueError, font.set_script, "a") font.set_script("Deva") else: self.assertRaises(pygame.error, font.set_script, "Deva") @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class VisualTests(unittest.TestCase): __tags__ = ["interactive"] screen = None aborted = False def setUp(self): if self.screen is None: pygame.init() self.screen = pygame.display.set_mode((600, 200)) self.screen.fill((255, 255, 255)) pygame.display.flip() self.f = pygame_font.Font(None, 32) def abort(self): if self.screen is not None: pygame.quit() self.aborted = True def query( self, bold=False, italic=False, underline=False, strikethrough=False, antialiase=False, ): if self.aborted: return False spacing = 10 offset = 20 y = spacing f = self.f screen = self.screen screen.fill((255, 255, 255)) pygame.display.flip() if not (bold or italic or underline or strikethrough or antialiase): text = "normal" else: modes = [] if bold: modes.append("bold") if italic: modes.append("italic") if underline: modes.append("underlined") if strikethrough: modes.append("strikethrough") if antialiase: modes.append("antialiased") text = f"{'-'.join(modes)} (y/n):" f.set_bold(bold) f.set_italic(italic) f.set_underline(underline) if pygame_font.__name__ != "pygame.ftfont": f.set_strikethrough(strikethrough) s = f.render(text, antialiase, (0, 0, 0)) screen.blit(s, (offset, y)) y += s.get_size()[1] + spacing f.set_bold(False) f.set_italic(False) f.set_underline(False) if pygame_font.__name__ != "pygame.ftfont": f.set_strikethrough(False) s = f.render("(some comparison text)", False, (0, 0, 0)) screen.blit(s, (offset, y)) pygame.display.flip() while True: for evt in pygame.event.get(): if evt.type == pygame.KEYDOWN: if evt.key == pygame.K_ESCAPE: self.abort() return False if evt.key == pygame.K_y: return True if evt.key == pygame.K_n: return False if evt.type == pygame.QUIT: self.abort() return False def test_bold(self): self.assertTrue(self.query(bold=True)) def test_italic(self): self.assertTrue(self.query(italic=True)) def test_underline(self): self.assertTrue(self.query(underline=True)) def test_strikethrough(self): if pygame_font.__name__ != "pygame.ftfont": self.assertTrue(self.query(strikethrough=True)) def test_antialiase(self): self.assertTrue(self.query(antialiase=True)) def test_bold_antialiase(self): self.assertTrue(self.query(bold=True, antialiase=True)) def test_italic_underline(self): self.assertTrue(self.query(italic=True, underline=True)) def test_bold_strikethrough(self): if pygame_font.__name__ != "pygame.ftfont": self.assertTrue(self.query(bold=True, strikethrough=True)) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/freetype_tags.py0000644000175100001770000000026614676242340016615 0ustar00runnerdocker__tags__ = ["development"] exclude = False try: import pygame.freetype except ImportError: exclude = True if exclude: __tags__.extend(["ignore", "subprocess_ignore"]) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/freetype_test.py0000644000175100001770000017660014676242340016644 0ustar00runnerdockerimport os if os.environ.get("SDL_VIDEODRIVER") == "dummy": __tags__ = ("ignore", "subprocess_ignore") import unittest import ctypes import weakref import gc import pathlib import platform IS_PYPY = "PyPy" == platform.python_implementation() try: from pygame.tests.test_utils import arrinter except NameError: pass import pygame try: import pygame.freetype as ft except ImportError: ft = None FONTDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures", "fonts") def nullfont(): """return an uninitialized font instance""" return ft.Font.__new__(ft.Font) max_point_size_FX6 = 0x7FFFFFFF max_point_size = max_point_size_FX6 >> 6 max_point_size_f = max_point_size_FX6 * 0.015625 def surf_same_image(a, b): """Return True if a's pixel buffer is identical to b's""" a_sz = a.get_height() * a.get_pitch() b_sz = b.get_height() * b.get_pitch() if a_sz != b_sz: return False a_bytes = ctypes.string_at(a._pixels_address, a_sz) b_bytes = ctypes.string_at(b._pixels_address, b_sz) return a_bytes == b_bytes class FreeTypeFontTest(unittest.TestCase): _fixed_path = os.path.join(FONTDIR, "test_fixed.otf") _sans_path = os.path.join(FONTDIR, "test_sans.ttf") _mono_path = os.path.join(FONTDIR, "PyGameMono.otf") _bmp_8_75dpi_path = os.path.join(FONTDIR, "PyGameMono-8.bdf") _bmp_18_75dpi_path = os.path.join(FONTDIR, "PyGameMono-18-75dpi.bdf") _bmp_18_100dpi_path = os.path.join(FONTDIR, "PyGameMono-18-100dpi.bdf") _TEST_FONTS = {} @classmethod def setUpClass(cls): ft.init() # Setup the test fonts. # Inconsolata is an open-source font designed by Raph Levien. # Licensed under the Open Font License. # http://www.levien.com/type/myfonts/inconsolata.html cls._TEST_FONTS["fixed"] = ft.Font(cls._fixed_path) # Liberation Sans is an open-source font designed by Steve Matteson. # Licensed under the GNU GPL. # https://fedorahosted.org/liberation-fonts/ cls._TEST_FONTS["sans"] = ft.Font(cls._sans_path) # A scalable mono test font made for pygame. It contains only # a few glyphs: '\0', 'A', 'B', 'C', and U+13079. # It also contains two bitmap sizes: 8.0 X 8.0 and 19.0 X 19.0. cls._TEST_FONTS["mono"] = ft.Font(cls._mono_path) # A fixed size bitmap mono test font made for pygame. # It contains only a few glyphs: '\0', 'A', 'B', 'C', and U+13079. # The size is 8.0 X 8.0. cls._TEST_FONTS["bmp-8-75dpi"] = ft.Font(cls._bmp_8_75dpi_path) # A fixed size bitmap mono test font made for pygame. # It contains only a few glyphs: '\0', 'A', 'B', 'C', and U+13079. # The size is 8.0 X 8.0. cls._TEST_FONTS["bmp-18-75dpi"] = ft.Font(cls._bmp_18_75dpi_path) # A fixed size bitmap mono test font made for pygame. # It contains only a few glyphs: '\0', 'A', 'B', 'C', and U+13079. # The size is 8.0 X 8.0. cls._TEST_FONTS["bmp-18-100dpi"] = ft.Font(cls._bmp_18_100dpi_path) @classmethod def tearDownClass(cls): ft.quit() def test_freetype_defaultfont(self): font = ft.Font(None) self.assertEqual(font.name, "FreeSans") def test_freetype_Font_init(self): self.assertRaises( FileNotFoundError, ft.Font, os.path.join(FONTDIR, "nonexistent.ttf") ) f = self._TEST_FONTS["sans"] self.assertIsInstance(f, ft.Font) f = self._TEST_FONTS["fixed"] self.assertIsInstance(f, ft.Font) # Test keyword arguments f = ft.Font(size=22, file=None) self.assertEqual(f.size, 22) f = ft.Font(font_index=0, file=None) self.assertNotEqual(ft.get_default_resolution(), 100) f = ft.Font(resolution=100, file=None) self.assertEqual(f.resolution, 100) f = ft.Font(ucs4=True, file=None) self.assertTrue(f.ucs4) self.assertRaises(OverflowError, ft.Font, file=None, size=(max_point_size + 1)) self.assertRaises(OverflowError, ft.Font, file=None, size=-1) f = ft.Font(None, size=24) self.assertTrue(f.height > 0) self.assertRaises( FileNotFoundError, f.__init__, os.path.join(FONTDIR, "nonexistent.ttf") ) # Test attribute preservation during reinitalization f = ft.Font(self._sans_path, size=24, ucs4=True) self.assertEqual(f.name, "Liberation Sans") self.assertTrue(f.scalable) self.assertFalse(f.fixed_width) self.assertTrue(f.antialiased) self.assertFalse(f.oblique) self.assertTrue(f.ucs4) f.antialiased = False f.oblique = True f.__init__(self._mono_path) self.assertEqual(f.name, "PyGameMono") self.assertTrue(f.scalable) self.assertTrue(f.fixed_width) self.assertFalse(f.antialiased) self.assertTrue(f.oblique) self.assertTrue(f.ucs4) # For a bitmap font, the size is automatically set to the first # size in the available sizes list. f = ft.Font(self._bmp_8_75dpi_path) sizes = f.get_sizes() self.assertEqual(len(sizes), 1) size_pt, width_px, height_px, x_ppem, y_ppem = sizes[0] self.assertEqual(f.size, (x_ppem, y_ppem)) f.__init__(self._bmp_8_75dpi_path, size=12) self.assertEqual(f.size, 12.0) @unittest.skipIf(IS_PYPY, "PyPy doesn't use refcounting") def test_freetype_Font_dealloc(self): import sys handle = open(self._sans_path, "rb") def load_font(): tempFont = ft.Font(handle) try: load_font() self.assertEqual(sys.getrefcount(handle), 2) finally: # Ensures file is closed even if test fails. handle.close() def test_freetype_Font_kerning(self): """Ensures get/set works with the kerning property.""" ft_font = self._TEST_FONTS["sans"] # Test default is disabled. self.assertFalse(ft_font.kerning) # Test setting to True. ft_font.kerning = True self.assertTrue(ft_font.kerning) # Test setting to False. ft_font.kerning = False self.assertFalse(ft_font.kerning) def test_freetype_Font_kerning__enabled(self): """Ensures exceptions are not raised when calling freetype methods while kerning is enabled. Note: This does not test what changes occur to a rendered font by having kerning enabled. Related to issue #367. """ surface = pygame.Surface((10, 10), 0, 32) TEST_TEXT = "Freetype Font" ft_font = self._TEST_FONTS["bmp-8-75dpi"] ft_font.kerning = True # Call different methods to ensure they don't raise an exception. metrics = ft_font.get_metrics(TEST_TEXT) self.assertIsInstance(metrics, list) rect = ft_font.get_rect(TEST_TEXT) self.assertIsInstance(rect, pygame.Rect) font_surf, rect = ft_font.render(TEST_TEXT) self.assertIsInstance(font_surf, pygame.Surface) self.assertIsInstance(rect, pygame.Rect) rect = ft_font.render_to(surface, (0, 0), TEST_TEXT) self.assertIsInstance(rect, pygame.Rect) buf, size = ft_font.render_raw(TEST_TEXT) self.assertIsInstance(buf, bytes) self.assertIsInstance(size, tuple) rect = ft_font.render_raw_to(surface.get_view("2"), TEST_TEXT) self.assertIsInstance(rect, pygame.Rect) def test_freetype_Font_scalable(self): f = self._TEST_FONTS["sans"] self.assertTrue(f.scalable) self.assertRaises(RuntimeError, lambda: nullfont().scalable) def test_freetype_Font_fixed_width(self): f = self._TEST_FONTS["sans"] self.assertFalse(f.fixed_width) f = self._TEST_FONTS["mono"] self.assertTrue(f.fixed_width) self.assertRaises(RuntimeError, lambda: nullfont().fixed_width) def test_freetype_Font_fixed_sizes(self): f = self._TEST_FONTS["sans"] self.assertEqual(f.fixed_sizes, 0) f = self._TEST_FONTS["bmp-8-75dpi"] self.assertEqual(f.fixed_sizes, 1) f = self._TEST_FONTS["mono"] self.assertEqual(f.fixed_sizes, 2) def test_freetype_Font_get_sizes(self): f = self._TEST_FONTS["sans"] szlist = f.get_sizes() self.assertIsInstance(szlist, list) self.assertEqual(len(szlist), 0) f = self._TEST_FONTS["bmp-8-75dpi"] szlist = f.get_sizes() self.assertIsInstance(szlist, list) self.assertEqual(len(szlist), 1) size8 = szlist[0] self.assertIsInstance(size8[0], int) self.assertEqual(size8[0], 8) self.assertIsInstance(size8[1], int) self.assertIsInstance(size8[2], int) self.assertIsInstance(size8[3], float) self.assertEqual(int(size8[3] * 64.0 + 0.5), 8 * 64) self.assertIsInstance(size8[4], float) self.assertEqual(int(size8[4] * 64.0 + 0.5), 8 * 64) f = self._TEST_FONTS["mono"] szlist = f.get_sizes() self.assertIsInstance(szlist, list) self.assertEqual(len(szlist), 2) size8 = szlist[0] self.assertEqual(size8[3], 8) self.assertEqual(int(size8[3] * 64.0 + 0.5), 8 * 64) self.assertEqual(int(size8[4] * 64.0 + 0.5), 8 * 64) size19 = szlist[1] self.assertEqual(size19[3], 19) self.assertEqual(int(size19[3] * 64.0 + 0.5), 19 * 64) self.assertEqual(int(size19[4] * 64.0 + 0.5), 19 * 64) def test_freetype_Font_use_bitmap_strikes(self): f = self._TEST_FONTS["mono"] try: # use_bitmap_strikes == True # self.assertTrue(f.use_bitmap_strikes) # bitmap compatible properties s_strike, sz = f.render_raw("A", size=19) try: f.vertical = True s_strike_vert, sz = f.render_raw("A", size=19) finally: f.vertical = False try: f.wide = True s_strike_wide, sz = f.render_raw("A", size=19) finally: f.wide = False try: f.underline = True s_strike_underline, sz = f.render_raw("A", size=19) finally: f.underline = False # bitmap incompatible properties s_strike_rot45, sz = f.render_raw("A", size=19, rotation=45) try: f.strong = True s_strike_strong, sz = f.render_raw("A", size=19) finally: f.strong = False try: f.oblique = True s_strike_oblique, sz = f.render_raw("A", size=19) finally: f.oblique = False # compare with use_bitmap_strikes == False # f.use_bitmap_strikes = False self.assertFalse(f.use_bitmap_strikes) # bitmap compatible properties s_outline, sz = f.render_raw("A", size=19) self.assertNotEqual(s_outline, s_strike) try: f.vertical = True s_outline, sz = f.render_raw("A", size=19) self.assertNotEqual(s_outline, s_strike_vert) finally: f.vertical = False try: f.wide = True s_outline, sz = f.render_raw("A", size=19) self.assertNotEqual(s_outline, s_strike_wide) finally: f.wide = False try: f.underline = True s_outline, sz = f.render_raw("A", size=19) self.assertNotEqual(s_outline, s_strike_underline) finally: f.underline = False # bitmap incompatible properties s_outline, sz = f.render_raw("A", size=19, rotation=45) self.assertEqual(s_outline, s_strike_rot45) try: f.strong = True s_outline, sz = f.render_raw("A", size=19) self.assertEqual(s_outline, s_strike_strong) finally: f.strong = False try: f.oblique = True s_outline, sz = f.render_raw("A", size=19) self.assertEqual(s_outline, s_strike_oblique) finally: f.oblique = False finally: f.use_bitmap_strikes = True def test_freetype_Font_bitmap_files(self): """Ensure bitmap file restrictions are caught""" f = self._TEST_FONTS["bmp-8-75dpi"] f_null = nullfont() s = pygame.Surface((10, 10), 0, 32) a = s.get_view("3") exception = AttributeError self.assertRaises(exception, setattr, f, "strong", True) self.assertRaises(exception, setattr, f, "oblique", True) self.assertRaises(exception, setattr, f, "style", ft.STYLE_STRONG) self.assertRaises(exception, setattr, f, "style", ft.STYLE_OBLIQUE) exception = RuntimeError self.assertRaises(exception, setattr, f_null, "strong", True) self.assertRaises(exception, setattr, f_null, "oblique", True) self.assertRaises(exception, setattr, f_null, "style", ft.STYLE_STRONG) self.assertRaises(exception, setattr, f_null, "style", ft.STYLE_OBLIQUE) exception = ValueError self.assertRaises(exception, f.render, "A", (0, 0, 0), size=8, rotation=1) self.assertRaises( exception, f.render, "A", (0, 0, 0), size=8, style=ft.STYLE_OBLIQUE ) self.assertRaises( exception, f.render, "A", (0, 0, 0), size=8, style=ft.STYLE_STRONG ) self.assertRaises(exception, f.render_raw, "A", size=8, rotation=1) self.assertRaises(exception, f.render_raw, "A", size=8, style=ft.STYLE_OBLIQUE) self.assertRaises(exception, f.render_raw, "A", size=8, style=ft.STYLE_STRONG) self.assertRaises( exception, f.render_to, s, (0, 0), "A", (0, 0, 0), size=8, rotation=1 ) self.assertRaises( exception, f.render_to, s, (0, 0), "A", (0, 0, 0), size=8, style=ft.STYLE_OBLIQUE, ) self.assertRaises( exception, f.render_to, s, (0, 0), "A", (0, 0, 0), size=8, style=ft.STYLE_STRONG, ) self.assertRaises(exception, f.render_raw_to, a, "A", size=8, rotation=1) self.assertRaises( exception, f.render_raw_to, a, "A", size=8, style=ft.STYLE_OBLIQUE ) self.assertRaises( exception, f.render_raw_to, a, "A", size=8, style=ft.STYLE_STRONG ) self.assertRaises(exception, f.get_rect, "A", size=8, rotation=1) self.assertRaises(exception, f.get_rect, "A", size=8, style=ft.STYLE_OBLIQUE) self.assertRaises(exception, f.get_rect, "A", size=8, style=ft.STYLE_STRONG) # Unsupported point size exception = pygame.error self.assertRaises(exception, f.get_rect, "A", size=42) self.assertRaises(exception, f.get_metrics, "A", size=42) self.assertRaises(exception, f.get_sized_ascender, 42) self.assertRaises(exception, f.get_sized_descender, 42) self.assertRaises(exception, f.get_sized_height, 42) self.assertRaises(exception, f.get_sized_glyph_height, 42) def test_freetype_Font_get_metrics(self): font = self._TEST_FONTS["sans"] metrics = font.get_metrics("ABCD", size=24) self.assertEqual(len(metrics), len("ABCD")) self.assertIsInstance(metrics, list) for metrics_tuple in metrics: self.assertIsInstance(metrics_tuple, tuple, metrics_tuple) self.assertEqual(len(metrics_tuple), 6) for m in metrics_tuple[:4]: self.assertIsInstance(m, int) for m in metrics_tuple[4:]: self.assertIsInstance(m, float) # test for empty string metrics = font.get_metrics("", size=24) self.assertEqual(metrics, []) # test for invalid string self.assertRaises(TypeError, font.get_metrics, 24, 24) # raises exception when uninitialized self.assertRaises(RuntimeError, nullfont().get_metrics, "a", size=24) def test_freetype_Font_get_rect(self): font = self._TEST_FONTS["sans"] def test_rect(r): self.assertIsInstance(r, pygame.Rect) rect_default = font.get_rect("ABCDabcd", size=24) test_rect(rect_default) self.assertTrue(rect_default.size > (0, 0)) self.assertTrue(rect_default.width > rect_default.height) rect_bigger = font.get_rect("ABCDabcd", size=32) test_rect(rect_bigger) self.assertTrue(rect_bigger.size > rect_default.size) rect_strong = font.get_rect("ABCDabcd", size=24, style=ft.STYLE_STRONG) test_rect(rect_strong) self.assertTrue(rect_strong.size > rect_default.size) font.vertical = True rect_vert = font.get_rect("ABCDabcd", size=24) test_rect(rect_vert) self.assertTrue(rect_vert.width < rect_vert.height) font.vertical = False rect_oblique = font.get_rect("ABCDabcd", size=24, style=ft.STYLE_OBLIQUE) test_rect(rect_oblique) self.assertTrue(rect_oblique.width > rect_default.width) self.assertTrue(rect_oblique.height == rect_default.height) rect_under = font.get_rect("ABCDabcd", size=24, style=ft.STYLE_UNDERLINE) test_rect(rect_under) self.assertTrue(rect_under.width == rect_default.width) self.assertTrue(rect_under.height > rect_default.height) # Rect size should change if UTF surrogate pairs are treated as # one code point or two. ufont = self._TEST_FONTS["mono"] rect_utf32 = ufont.get_rect("\U00013079", size=24) rect_utf16 = ufont.get_rect("\uD80C\uDC79", size=24) self.assertEqual(rect_utf16, rect_utf32) ufont.ucs4 = True try: rect_utf16 = ufont.get_rect("\uD80C\uDC79", size=24) finally: ufont.ucs4 = False self.assertNotEqual(rect_utf16, rect_utf32) self.assertRaises(RuntimeError, nullfont().get_rect, "a", size=24) # text stretching rect12 = font.get_rect("A", size=12.0) rect24 = font.get_rect("A", size=24.0) rect_x = font.get_rect("A", size=(24.0, 12.0)) self.assertEqual(rect_x.width, rect24.width) self.assertEqual(rect_x.height, rect12.height) rect_y = font.get_rect("A", size=(12.0, 24.0)) self.assertEqual(rect_y.width, rect12.width) self.assertEqual(rect_y.height, rect24.height) def test_freetype_Font_height(self): f = self._TEST_FONTS["sans"] self.assertEqual(f.height, 2355) f = self._TEST_FONTS["fixed"] self.assertEqual(f.height, 1100) self.assertRaises(RuntimeError, lambda: nullfont().height) def test_freetype_Font_name(self): f = self._TEST_FONTS["sans"] self.assertEqual(f.name, "Liberation Sans") f = self._TEST_FONTS["fixed"] self.assertEqual(f.name, "Inconsolata") nf = nullfont() self.assertEqual(nf.name, repr(nf)) def test_freetype_Font_size(self): f = ft.Font(None, size=12) self.assertEqual(f.size, 12) f.size = 22 self.assertEqual(f.size, 22) f.size = 0 self.assertEqual(f.size, 0) f.size = max_point_size self.assertEqual(f.size, max_point_size) f.size = 6.5 self.assertEqual(f.size, 6.5) f.size = max_point_size_f self.assertEqual(f.size, max_point_size_f) self.assertRaises(OverflowError, setattr, f, "size", -1) self.assertRaises(OverflowError, setattr, f, "size", (max_point_size + 1)) f.size = 24.0, 0 size = f.size self.assertIsInstance(size, float) self.assertEqual(size, 24.0) f.size = 16, 16 size = f.size self.assertIsInstance(size, tuple) self.assertEqual(len(size), 2) x, y = size self.assertIsInstance(x, float) self.assertEqual(x, 16.0) self.assertIsInstance(y, float) self.assertEqual(y, 16.0) f.size = 20.5, 22.25 x, y = f.size self.assertEqual(x, 20.5) self.assertEqual(y, 22.25) f.size = 0, 0 size = f.size self.assertIsInstance(size, float) self.assertEqual(size, 0.0) self.assertRaises(ValueError, setattr, f, "size", (0, 24.0)) self.assertRaises(TypeError, setattr, f, "size", (24.0,)) self.assertRaises(TypeError, setattr, f, "size", (24.0, 0, 0)) self.assertRaises(TypeError, setattr, f, "size", (24.0j, 24.0)) self.assertRaises(TypeError, setattr, f, "size", (24.0, 24.0j)) self.assertRaises(OverflowError, setattr, f, "size", (-1, 16)) self.assertRaises(OverflowError, setattr, f, "size", (max_point_size + 1, 16)) self.assertRaises(OverflowError, setattr, f, "size", (16, -1)) self.assertRaises(OverflowError, setattr, f, "size", (16, max_point_size + 1)) # bitmap files with identical point size but differing ppems. f75 = self._TEST_FONTS["bmp-18-75dpi"] sizes = f75.get_sizes() self.assertEqual(len(sizes), 1) size_pt, width_px, height_px, x_ppem, y_ppem = sizes[0] self.assertEqual(size_pt, 18) self.assertEqual(x_ppem, 19.0) self.assertEqual(y_ppem, 19.0) rect = f75.get_rect("A", size=18) rect = f75.get_rect("A", size=19) rect = f75.get_rect("A", size=(19.0, 19.0)) self.assertRaises(pygame.error, f75.get_rect, "A", size=17) f100 = self._TEST_FONTS["bmp-18-100dpi"] sizes = f100.get_sizes() self.assertEqual(len(sizes), 1) size_pt, width_px, height_px, x_ppem, y_ppem = sizes[0] self.assertEqual(size_pt, 18) self.assertEqual(x_ppem, 25.0) self.assertEqual(y_ppem, 25.0) rect = f100.get_rect("A", size=18) rect = f100.get_rect("A", size=25) rect = f100.get_rect("A", size=(25.0, 25.0)) self.assertRaises(pygame.error, f100.get_rect, "A", size=17) def test_freetype_Font_rotation(self): test_angles = [ (30, 30), (360, 0), (390, 30), (720, 0), (764, 44), (-30, 330), (-360, 0), (-390, 330), (-720, 0), (-764, 316), ] f = ft.Font(None) self.assertEqual(f.rotation, 0) for r, r_reduced in test_angles: f.rotation = r self.assertEqual( f.rotation, r_reduced, "for angle %d: %d != %d" % (r, f.rotation, r_reduced), ) self.assertRaises(TypeError, setattr, f, "rotation", "12") def test_freetype_Font_render_to(self): # Rendering to an existing target surface is equivalent to # blitting a surface returned by Font.render with the target. font = self._TEST_FONTS["sans"] surf = pygame.Surface((800, 600)) color = pygame.Color(0, 0, 0) rrect = font.render_to(surf, (32, 32), "FoobarBaz", color, None, size=24) self.assertIsInstance(rrect, pygame.Rect) self.assertEqual(rrect.topleft, (32, 32)) self.assertNotEqual(rrect.bottomright, (32, 32)) rcopy = rrect.copy() rcopy.topleft = (32, 32) self.assertTrue(surf.get_rect().contains(rcopy)) rect = pygame.Rect(20, 20, 2, 2) rrect = font.render_to(surf, rect, "FoobarBax", color, None, size=24) self.assertEqual(rect.topleft, rrect.topleft) self.assertNotEqual(rrect.size, rect.size) rrect = font.render_to(surf, (20.1, 18.9), "FoobarBax", color, None, size=24) rrect = font.render_to(surf, rect, "", color, None, size=24) self.assertFalse(rrect) self.assertEqual(rrect.height, font.get_sized_height(24)) # invalid surf test self.assertRaises(TypeError, font.render_to, "not a surface", "text", color) self.assertRaises(TypeError, font.render_to, pygame.Surface, "text", color) # invalid dest test for dest in [ None, 0, "a", "ab", (), (1,), ("a", 2), (1, "a"), (1 + 2j, 2), (1, 1 + 2j), (1, int), (int, 1), ]: self.assertRaises( TypeError, font.render_to, surf, dest, "foobar", color, size=24 ) # misc parameter test self.assertRaises(ValueError, font.render_to, surf, (0, 0), "foobar", color) self.assertRaises( TypeError, font.render_to, surf, (0, 0), "foobar", color, 2.3, size=24 ) self.assertRaises( ValueError, font.render_to, surf, (0, 0), "foobar", color, None, style=42, size=24, ) self.assertRaises( TypeError, font.render_to, surf, (0, 0), "foobar", color, None, style=None, size=24, ) self.assertRaises( ValueError, font.render_to, surf, (0, 0), "foobar", color, None, style=97, size=24, ) def test_freetype_Font_render(self): font = self._TEST_FONTS["sans"] surf = pygame.Surface((800, 600)) color = pygame.Color(0, 0, 0) rend = font.render("FoobarBaz", pygame.Color(0, 0, 0), None, size=24) self.assertIsInstance(rend, tuple) self.assertEqual(len(rend), 2) self.assertIsInstance(rend[0], pygame.Surface) self.assertIsInstance(rend[1], pygame.Rect) self.assertEqual(rend[0].get_rect().size, rend[1].size) s, r = font.render("", pygame.Color(0, 0, 0), None, size=24) self.assertEqual(r.width, 0) self.assertEqual(r.height, font.get_sized_height(24)) self.assertEqual(s.get_size(), r.size) self.assertEqual(s.get_bitsize(), 32) # misc parameter test self.assertRaises(ValueError, font.render, "foobar", color) self.assertRaises(TypeError, font.render, "foobar", color, 2.3, size=24) self.assertRaises( ValueError, font.render, "foobar", color, None, style=42, size=24 ) self.assertRaises( TypeError, font.render, "foobar", color, None, style=None, size=24 ) self.assertRaises( ValueError, font.render, "foobar", color, None, style=97, size=24 ) # valid surrogate pairs font2 = self._TEST_FONTS["mono"] ucs4 = font2.ucs4 try: font2.ucs4 = False rend1 = font2.render("\uD80C\uDC79", color, size=24) rend2 = font2.render("\U00013079", color, size=24) self.assertEqual(rend1[1], rend2[1]) font2.ucs4 = True rend1 = font2.render("\uD80C\uDC79", color, size=24) self.assertNotEqual(rend1[1], rend2[1]) finally: font2.ucs4 = ucs4 # malformed surrogate pairs self.assertRaises(UnicodeEncodeError, font.render, "\uD80C", color, size=24) self.assertRaises(UnicodeEncodeError, font.render, "\uDCA7", color, size=24) self.assertRaises( UnicodeEncodeError, font.render, "\uD7FF\uDCA7", color, size=24 ) self.assertRaises( UnicodeEncodeError, font.render, "\uDC00\uDCA7", color, size=24 ) self.assertRaises( UnicodeEncodeError, font.render, "\uD80C\uDBFF", color, size=24 ) self.assertRaises( UnicodeEncodeError, font.render, "\uD80C\uE000", color, size=24 ) # raises exception when uninitialized self.assertRaises(RuntimeError, nullfont().render, "a", (0, 0, 0), size=24) # Confirm the correct glyphs are returned for a couple of # unicode code points, 'A' and '\U00023079'. For each code point # the rendered glyph is compared with an image of glyph bitmap # as exported by FontForge. path = os.path.join(FONTDIR, "A_PyGameMono-8.png") A = pygame.image.load(path) path = os.path.join(FONTDIR, "u13079_PyGameMono-8.png") u13079 = pygame.image.load(path) font = self._TEST_FONTS["mono"] font.ucs4 = False A_rendered, r = font.render("A", bgcolor=pygame.Color("white"), size=8) u13079_rendered, r = font.render( "\U00013079", bgcolor=pygame.Color("white"), size=8 ) # before comparing the surfaces, make sure they are the same # pixel format. Use 32-bit SRCALPHA to avoid row padding and # undefined bytes (the alpha byte will be set to 255.) bitmap = pygame.Surface(A.get_size(), pygame.SRCALPHA, 32) bitmap.blit(A, (0, 0)) rendering = pygame.Surface(A_rendered.get_size(), pygame.SRCALPHA, 32) rendering.blit(A_rendered, (0, 0)) self.assertTrue(surf_same_image(rendering, bitmap)) bitmap = pygame.Surface(u13079.get_size(), pygame.SRCALPHA, 32) bitmap.blit(u13079, (0, 0)) rendering = pygame.Surface(u13079_rendered.get_size(), pygame.SRCALPHA, 32) rendering.blit(u13079_rendered, (0, 0)) self.assertTrue(surf_same_image(rendering, bitmap)) def test_freetype_Font_render_mono(self): font = self._TEST_FONTS["sans"] color = pygame.Color("black") colorkey = pygame.Color("white") text = "." save_antialiased = font.antialiased font.antialiased = False try: surf, r = font.render(text, color, size=24) self.assertEqual(surf.get_bitsize(), 8) flags = surf.get_flags() self.assertTrue(flags & pygame.SRCCOLORKEY) self.assertFalse(flags & (pygame.SRCALPHA | pygame.HWSURFACE)) self.assertEqual(surf.get_colorkey(), colorkey) self.assertIsNone(surf.get_alpha()) translucent_color = pygame.Color(*color) translucent_color.a = 55 surf, r = font.render(text, translucent_color, size=24) self.assertEqual(surf.get_bitsize(), 8) flags = surf.get_flags() self.assertTrue(flags & (pygame.SRCCOLORKEY | pygame.SRCALPHA)) self.assertFalse(flags & pygame.HWSURFACE) self.assertEqual(surf.get_colorkey(), colorkey) self.assertEqual(surf.get_alpha(), translucent_color.a) surf, r = font.render(text, color, colorkey, size=24) self.assertEqual(surf.get_bitsize(), 32) finally: font.antialiased = save_antialiased def test_freetype_Font_render_to_mono(self): # Blitting is done in two stages. First the target is alpha filled # with the background color, if any. Second, the foreground # color is alpha blitted to the background. font = self._TEST_FONTS["sans"] text = " ." rect = font.get_rect(text, size=24) size = rect.size fg = pygame.Surface((1, 1), pygame.SRCALPHA, 32) bg = pygame.Surface((1, 1), pygame.SRCALPHA, 32) surrogate = pygame.Surface((1, 1), pygame.SRCALPHA, 32) surfaces = [ pygame.Surface(size, 0, 8), pygame.Surface(size, 0, 16), pygame.Surface(size, pygame.SRCALPHA, 16), pygame.Surface(size, 0, 24), pygame.Surface(size, 0, 32), pygame.Surface(size, pygame.SRCALPHA, 32), ] fg_colors = [ surfaces[0].get_palette_at(2), surfaces[1].unmap_rgb(surfaces[1].map_rgb((128, 64, 200))), surfaces[2].unmap_rgb(surfaces[2].map_rgb((99, 0, 100, 64))), (128, 97, 213), (128, 97, 213), (128, 97, 213, 60), ] fg_colors = [pygame.Color(*c) for c in fg_colors] self.assertEqual(len(surfaces), len(fg_colors)) # integrity check bg_colors = [ surfaces[0].get_palette_at(4), surfaces[1].unmap_rgb(surfaces[1].map_rgb((220, 20, 99))), surfaces[2].unmap_rgb(surfaces[2].map_rgb((55, 200, 0, 86))), (255, 120, 13), (255, 120, 13), (255, 120, 13, 180), ] bg_colors = [pygame.Color(*c) for c in bg_colors] self.assertEqual(len(surfaces), len(bg_colors)) # integrity check save_antialiased = font.antialiased font.antialiased = False try: fill_color = pygame.Color("black") for i, surf in enumerate(surfaces): surf.fill(fill_color) fg_color = fg_colors[i] fg.set_at((0, 0), fg_color) surf.blit(fg, (0, 0)) r_fg_color = surf.get_at((0, 0)) surf.set_at((0, 0), fill_color) rrect = font.render_to(surf, (0, 0), text, fg_color, size=24) bottomleft = 0, rrect.height - 1 self.assertEqual( surf.get_at(bottomleft), fill_color, "Position: {}. Depth: {}." " fg_color: {}.".format(bottomleft, surf.get_bitsize(), fg_color), ) bottomright = rrect.width - 1, rrect.height - 1 self.assertEqual( surf.get_at(bottomright), r_fg_color, "Position: {}. Depth: {}." " fg_color: {}.".format(bottomright, surf.get_bitsize(), fg_color), ) for i, surf in enumerate(surfaces): surf.fill(fill_color) fg_color = fg_colors[i] bg_color = bg_colors[i] bg.set_at((0, 0), bg_color) fg.set_at((0, 0), fg_color) if surf.get_bitsize() == 24: # For a 24 bit target surface test against Pygame's alpha # blit as there appears to be a problem with SDL's alpha # blit: # # self.assertEqual(surf.get_at(bottomright), r_fg_color) # # raises # # AssertionError: (128, 97, 213, 255) != (129, 98, 213, 255) # surrogate.set_at((0, 0), fill_color) surrogate.blit(bg, (0, 0)) r_bg_color = surrogate.get_at((0, 0)) surrogate.blit(fg, (0, 0)) r_fg_color = surrogate.get_at((0, 0)) else: # Surface blit values for comparison. surf.blit(bg, (0, 0)) r_bg_color = surf.get_at((0, 0)) surf.blit(fg, (0, 0)) r_fg_color = surf.get_at((0, 0)) surf.set_at((0, 0), fill_color) rrect = font.render_to(surf, (0, 0), text, fg_color, bg_color, size=24) bottomleft = 0, rrect.height - 1 self.assertEqual(surf.get_at(bottomleft), r_bg_color) bottomright = rrect.width - 1, rrect.height - 1 self.assertEqual(surf.get_at(bottomright), r_fg_color) finally: font.antialiased = save_antialiased def test_freetype_Font_render_raw(self): font = self._TEST_FONTS["sans"] text = "abc" size = font.get_rect(text, size=24).size rend = font.render_raw(text, size=24) self.assertIsInstance(rend, tuple) self.assertEqual(len(rend), 2) r, s = rend self.assertIsInstance(r, bytes) self.assertIsInstance(s, tuple) self.assertTrue(len(s), 2) w, h = s self.assertIsInstance(w, int) self.assertIsInstance(h, int) self.assertEqual(s, size) self.assertEqual(len(r), w * h) r, (w, h) = font.render_raw("", size=24) self.assertEqual(w, 0) self.assertEqual(h, font.height) self.assertEqual(len(r), 0) # bug with decenders: this would crash rend = font.render_raw("render_raw", size=24) # bug with non-printable characters: this would cause a crash # because the text length was not adjusted for skipped characters. text = "".join([chr(i) for i in range(31, 64)]) rend = font.render_raw(text, size=10) def test_freetype_Font_render_raw_to(self): # This only checks that blits do not crash. It needs to check: # - int values # - invert option # font = self._TEST_FONTS["sans"] text = "abc" # No frills antialiased render to int1 (__render_glyph_INT) srect = font.get_rect(text, size=24) surf = pygame.Surface(srect.size, 0, 8) rrect = font.render_raw_to(surf.get_view("2"), text, size=24) self.assertEqual(rrect, srect) for bpp in [24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to(surf.get_view("r"), text, size=24) self.assertEqual(rrect, srect) # Underlining to int1 (__fill_glyph_INT) srect = font.get_rect(text, size=24, style=ft.STYLE_UNDERLINE) surf = pygame.Surface(srect.size, 0, 8) rrect = font.render_raw_to( surf.get_view("2"), text, size=24, style=ft.STYLE_UNDERLINE ) self.assertEqual(rrect, srect) for bpp in [24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to( surf.get_view("r"), text, size=24, style=ft.STYLE_UNDERLINE ) self.assertEqual(rrect, srect) # Unaliased (mono) rendering to int1 (__render_glyph_MONO_as_INT) font.antialiased = False try: srect = font.get_rect(text, size=24) surf = pygame.Surface(srect.size, 0, 8) rrect = font.render_raw_to(surf.get_view("2"), text, size=24) self.assertEqual(rrect, srect) for bpp in [24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to(surf.get_view("r"), text, size=24) self.assertEqual(rrect, srect) finally: font.antialiased = True # Antialiased render to ints sized greater than 1 byte # (__render_glyph_INT) srect = font.get_rect(text, size=24) for bpp in [16, 24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to(surf.get_view("2"), text, size=24) self.assertEqual(rrect, srect) # Underline render to ints sized greater than 1 byte # (__fill_glyph_INT) srect = font.get_rect(text, size=24, style=ft.STYLE_UNDERLINE) for bpp in [16, 24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to( surf.get_view("2"), text, size=24, style=ft.STYLE_UNDERLINE ) self.assertEqual(rrect, srect) # Unaliased (mono) rendering to ints greater than 1 byte # (__render_glyph_MONO_as_INT) font.antialiased = False try: srect = font.get_rect(text, size=24) for bpp in [16, 24, 32]: surf = pygame.Surface(srect.size, 0, bpp) rrect = font.render_raw_to(surf.get_view("2"), text, size=24) self.assertEqual(rrect, srect) finally: font.antialiased = True # Invalid dest parameter test. srect = font.get_rect(text, size=24) surf_buf = pygame.Surface(srect.size, 0, 32).get_view("2") for dest in [ 0, "a", "ab", (), (1,), ("a", 2), (1, "a"), (1 + 2j, 2), (1, 1 + 2j), (1, int), (int, 1), ]: self.assertRaises( TypeError, font.render_raw_to, surf_buf, text, dest, size=24 ) def test_freetype_Font_text_is_None_with_arr(self): f = ft.Font(self._sans_path, 36) f.style = ft.STYLE_NORMAL f.rotation = 0 text = "ABCD" # reference values get_rect = f.get_rect(text) f.vertical = True get_rect_vert = f.get_rect(text) self.assertTrue(get_rect_vert.width < get_rect.width) self.assertTrue(get_rect_vert.height > get_rect.height) f.vertical = False render_to_surf = pygame.Surface(get_rect.size, pygame.SRCALPHA, 32) if IS_PYPY: return arr = arrinter.Array(get_rect.size, "u", 1) render = f.render(text, (0, 0, 0)) render_to = f.render_to(render_to_surf, (0, 0), text, (0, 0, 0)) render_raw = f.render_raw(text) render_raw_to = f.render_raw_to(arr, text) # comparisons surf = pygame.Surface(get_rect.size, pygame.SRCALPHA, 32) self.assertEqual(f.get_rect(None), get_rect) s, r = f.render(None, (0, 0, 0)) self.assertEqual(r, render[1]) self.assertTrue(surf_same_image(s, render[0])) r = f.render_to(surf, (0, 0), None, (0, 0, 0)) self.assertEqual(r, render_to) self.assertTrue(surf_same_image(surf, render_to_surf)) px, sz = f.render_raw(None) self.assertEqual(sz, render_raw[1]) self.assertEqual(px, render_raw[0]) sz = f.render_raw_to(arr, None) self.assertEqual(sz, render_raw_to) def test_freetype_Font_text_is_None(self): f = ft.Font(self._sans_path, 36) f.style = ft.STYLE_NORMAL f.rotation = 0 text = "ABCD" # reference values get_rect = f.get_rect(text) f.vertical = True get_rect_vert = f.get_rect(text) # vertical: trigger glyph positioning. f.vertical = True r = f.get_rect(None) self.assertEqual(r, get_rect_vert) f.vertical = False # wide style: trigger glyph reload r = f.get_rect(None, style=ft.STYLE_WIDE) self.assertEqual(r.height, get_rect.height) self.assertTrue(r.width > get_rect.width) r = f.get_rect(None) self.assertEqual(r, get_rect) # rotated: trigger glyph reload r = f.get_rect(None, rotation=90) self.assertEqual(r.width, get_rect.height) self.assertEqual(r.height, get_rect.width) # this method will not support None text self.assertRaises(TypeError, f.get_metrics, None) def test_freetype_Font_fgcolor(self): f = ft.Font(self._bmp_8_75dpi_path) notdef = "\0" # the PyGameMono .notdef glyph has a pixel at (0, 0) f.origin = False f.pad = False black = pygame.Color("black") # initial color green = pygame.Color("green") alpha128 = pygame.Color(10, 20, 30, 128) c = f.fgcolor self.assertIsInstance(c, pygame.Color) self.assertEqual(c, black) s, r = f.render(notdef) self.assertEqual(s.get_at((0, 0)), black) f.fgcolor = green self.assertEqual(f.fgcolor, green) s, r = f.render(notdef) self.assertEqual(s.get_at((0, 0)), green) f.fgcolor = alpha128 s, r = f.render(notdef) self.assertEqual(s.get_at((0, 0)), alpha128) surf = pygame.Surface(f.get_rect(notdef).size, pygame.SRCALPHA, 32) f.render_to(surf, (0, 0), None) self.assertEqual(surf.get_at((0, 0)), alpha128) self.assertRaises(AttributeError, setattr, f, "fgcolor", None) def test_freetype_Font_bgcolor(self): f = ft.Font(None, 32) zero = "0" # the default font 0 glyph does not have a pixel at (0, 0) f.origin = False f.pad = False transparent_black = pygame.Color(0, 0, 0, 0) # initial color green = pygame.Color("green") alpha128 = pygame.Color(10, 20, 30, 128) c = f.bgcolor self.assertIsInstance(c, pygame.Color) self.assertEqual(c, transparent_black) s, r = f.render(zero, pygame.Color(255, 255, 255)) self.assertEqual(s.get_at((0, 0)), transparent_black) f.bgcolor = green self.assertEqual(f.bgcolor, green) s, r = f.render(zero) self.assertEqual(s.get_at((0, 0)), green) f.bgcolor = alpha128 s, r = f.render(zero) self.assertEqual(s.get_at((0, 0)), alpha128) surf = pygame.Surface(f.get_rect(zero).size, pygame.SRCALPHA, 32) f.render_to(surf, (0, 0), None) self.assertEqual(surf.get_at((0, 0)), alpha128) self.assertRaises(AttributeError, setattr, f, "bgcolor", None) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") @unittest.skipIf(IS_PYPY, "pypy no likey") def test_newbuf(self): from pygame.tests.test_utils import buftools Exporter = buftools.Exporter font = self._TEST_FONTS["sans"] srect = font.get_rect("Hi", size=12) for format in [ "b", "B", "h", "H", "i", "I", "l", "L", "q", "Q", "x", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "h", "=h", "@h", "!h", "1h", "=1h", ]: newbuf = Exporter(srect.size, format=format) rrect = font.render_raw_to(newbuf, "Hi", size=12) self.assertEqual(rrect, srect) # Some unsupported formats for format in ["f", "d", "2h", "?", "hh"]: newbuf = Exporter(srect.size, format=format, itemsize=4) self.assertRaises(ValueError, font.render_raw_to, newbuf, "Hi", size=12) def test_freetype_Font_style(self): font = self._TEST_FONTS["sans"] # make sure STYLE_NORMAL is the default value self.assertEqual(ft.STYLE_NORMAL, font.style) # make sure we check for style type with self.assertRaises(TypeError): font.style = "None" with self.assertRaises(TypeError): font.style = None # make sure we only accept valid constants with self.assertRaises(ValueError): font.style = 112 # make assure no assignments happened self.assertEqual(ft.STYLE_NORMAL, font.style) # test assignment font.style = ft.STYLE_UNDERLINE self.assertEqual(ft.STYLE_UNDERLINE, font.style) # test complex styles st = ft.STYLE_STRONG | ft.STYLE_UNDERLINE | ft.STYLE_OBLIQUE font.style = st self.assertEqual(st, font.style) # and that STYLE_DEFAULT has no effect (continued from above) self.assertNotEqual(st, ft.STYLE_DEFAULT) font.style = ft.STYLE_DEFAULT self.assertEqual(st, font.style) # revert changes font.style = ft.STYLE_NORMAL self.assertEqual(ft.STYLE_NORMAL, font.style) def test_freetype_Font_resolution(self): text = "|" # Differs in width and height resolution = ft.get_default_resolution() new_font = ft.Font(self._sans_path, resolution=2 * resolution) self.assertEqual(new_font.resolution, 2 * resolution) size_normal = self._TEST_FONTS["sans"].get_rect(text, size=24).size size_scaled = new_font.get_rect(text, size=24).size size_by_2 = size_normal[0] * 2 self.assertTrue( size_by_2 + 2 >= size_scaled[0] >= size_by_2 - 2, "%i not equal %i" % (size_scaled[1], size_by_2), ) size_by_2 = size_normal[1] * 2 self.assertTrue( size_by_2 + 2 >= size_scaled[1] >= size_by_2 - 2, "%i not equal %i" % (size_scaled[1], size_by_2), ) new_resolution = resolution + 10 ft.set_default_resolution(new_resolution) try: new_font = ft.Font(self._sans_path, resolution=0) self.assertEqual(new_font.resolution, new_resolution) finally: ft.set_default_resolution() def test_freetype_Font_path(self): self.assertEqual(self._TEST_FONTS["sans"].path, self._sans_path) self.assertRaises(AttributeError, getattr, nullfont(), "path") # This Font cache test is conditional on freetype being built by a debug # version of Python or with the C macro PGFT_DEBUG_CACHE defined. def test_freetype_Font_cache(self): glyphs = "abcde" glen = len(glyphs) other_glyphs = "123" oglen = len(other_glyphs) uempty = "" ## many_glyphs = (uempty.join([chr(i) for i in range(32,127)] + ## [chr(i) for i in range(161,172)] + ## [chr(i) for i in range(174,239)])) many_glyphs = uempty.join([chr(i) for i in range(32, 127)]) mglen = len(many_glyphs) count = 0 access = 0 hit = 0 miss = 0 f = ft.Font(None, size=24, font_index=0, resolution=72, ucs4=False) f.style = ft.STYLE_NORMAL f.antialiased = True # Ensure debug counters are zero self.assertEqual(f._debug_cache_stats, (0, 0, 0, 0, 0)) # Load some basic glyphs count = access = miss = glen f.render_raw(glyphs) self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # Vertical should not affect the cache access += glen hit += glen f.vertical = True f.render_raw(glyphs) f.vertical = False self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # New glyphs will count += oglen access += oglen miss += oglen f.render_raw(other_glyphs) self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # Point size does count += glen access += glen miss += glen f.render_raw(glyphs, size=12) self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # Underline style does not access += oglen hit += oglen f.underline = True f.render_raw(other_glyphs) f.underline = False self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # Oblique style does count += glen access += glen miss += glen f.oblique = True f.render_raw(glyphs) f.oblique = False self.assertEqual(f._debug_cache_stats, (count, 0, access, hit, miss)) # Strong style does; by this point cache clears can happen count += glen access += glen miss += glen f.strong = True f.render_raw(glyphs) f.strong = False ccount, cdelete_count, caccess, chit, cmiss = f._debug_cache_stats self.assertEqual( (ccount + cdelete_count, caccess, chit, cmiss), (count, access, hit, miss) ) # Rotation does count += glen access += glen miss += glen f.render_raw(glyphs, rotation=10) ccount, cdelete_count, caccess, chit, cmiss = f._debug_cache_stats self.assertEqual( (ccount + cdelete_count, caccess, chit, cmiss), (count, access, hit, miss) ) # aliased (mono) glyphs do count += oglen access += oglen miss += oglen f.antialiased = False f.render_raw(other_glyphs) f.antialiased = True ccount, cdelete_count, caccess, chit, cmiss = f._debug_cache_stats self.assertEqual( (ccount + cdelete_count, caccess, chit, cmiss), (count, access, hit, miss) ) # Trigger a cleanup for sure. count += 2 * mglen access += 2 * mglen miss += 2 * mglen f.get_metrics(many_glyphs, size=8) f.get_metrics(many_glyphs, size=10) ccount, cdelete_count, caccess, chit, cmiss = f._debug_cache_stats self.assertTrue(ccount < count) self.assertEqual( (ccount + cdelete_count, caccess, chit, cmiss), (count, access, hit, miss) ) try: ft.Font._debug_cache_stats except AttributeError: del test_freetype_Font_cache def test_undefined_character_code(self): # To be consistent with pygame.font.Font, undefined codes # are rendered as the undefined character, and has metrics # of None. font = self._TEST_FONTS["sans"] img, size1 = font.render(chr(1), (0, 0, 0), size=24) img, size0 = font.render("", (0, 0, 0), size=24) self.assertTrue(size1.width > size0.width) metrics = font.get_metrics(chr(1) + chr(48), size=24) self.assertEqual(len(metrics), 2) self.assertIsNone(metrics[0]) self.assertIsInstance(metrics[1], tuple) def test_issue_242(self): """Issue #242: get_rect() uses 0 as default style""" # Issue #242: freetype.Font.get_rect() ignores style defaults when # the style argument is not given # # The text boundary rectangle returned by freetype.Font.get_rect() # should match the boundary of the same text rendered directly to a # surface. This permits accurate text positioning. To work properly, # get_rect() should calculate the text boundary to reflect text style, # such as underline. Instead, it ignores the style settings for the # Font object when the style argument is omitted. # # When the style argument is not given, freetype.get_rect() uses # unstyled text when calculating the boundary rectangle. This is # because _ftfont_getrect(), in _freetype.c, set the default # style to 0 rather than FT_STYLE_DEFAULT. # font = self._TEST_FONTS["sans"] # Try wide style on a wide character. prev_style = font.wide font.wide = True try: rect = font.get_rect("M", size=64) surf, rrect = font.render(None, size=64) self.assertEqual(rect, rrect) finally: font.wide = prev_style # Try strong style on several wide characters. prev_style = font.strong font.strong = True try: rect = font.get_rect("Mm_", size=64) surf, rrect = font.render(None, size=64) self.assertEqual(rect, rrect) finally: font.strong = prev_style # Try oblique style on a tall, narrow character. prev_style = font.oblique font.oblique = True try: rect = font.get_rect("|", size=64) surf, rrect = font.render(None, size=64) self.assertEqual(rect, rrect) finally: font.oblique = prev_style # Try underline style on a glyphless character. prev_style = font.underline font.underline = True try: rect = font.get_rect(" ", size=64) surf, rrect = font.render(None, size=64) self.assertEqual(rect, rrect) finally: font.underline = prev_style def test_issue_237(self): """Issue #237: Memory overrun when rendered with underlining""" # Issue #237: Memory overrun when text without descenders is rendered # with underlining # # The bug crashes the Python interpreter. The bug is caught with C # assertions in ft_render_cb.c when the Pygame module is compiled # for debugging. So far it is only known to affect Times New Roman. # name = "Times New Roman" font = ft.SysFont(name, 19) if font.name != name: # The font is unavailable, so skip the test. return font.underline = True s, r = font.render("Amazon", size=19) # Some other checks to make sure nothing else broke. for adj in [-2, -1.9, -1, 0, 1.9, 2]: font.underline_adjustment = adj s, r = font.render("Amazon", size=19) def test_issue_243(self): """Issue Y: trailing space ignored in boundary calculation""" # Issue #243: For a string with trailing spaces, freetype ignores the # last space in boundary calculations # font = self._TEST_FONTS["fixed"] r1 = font.get_rect(" ", size=64) self.assertTrue(r1.width > 1) r2 = font.get_rect(" ", size=64) self.assertEqual(r2.width, 2 * r1.width) def test_garbage_collection(self): """Check reference counting on returned new references""" def ref_items(seq): return [weakref.ref(o) for o in seq] font = self._TEST_FONTS["bmp-8-75dpi"] font.size = font.get_sizes()[0][0] text = "A" rect = font.get_rect(text) surf = pygame.Surface(rect.size, pygame.SRCALPHA, 32) refs = [] refs.extend(ref_items(font.render(text, (0, 0, 0)))) refs.append(weakref.ref(font.render_to(surf, (0, 0), text, (0, 0, 0)))) refs.append(weakref.ref(font.get_rect(text))) n = len(refs) self.assertTrue(n > 0) # for pypy we garbage collection twice. for i in range(2): gc.collect() for i in range(n): self.assertIsNone(refs[i](), "ref %d not collected" % i) try: from sys import getrefcount except ImportError: pass else: array = arrinter.Array(rect.size, "u", 1) o = font.render_raw(text) self.assertEqual(getrefcount(o), 2) self.assertEqual(getrefcount(o[0]), 2) self.assertEqual(getrefcount(o[1]), 2) self.assertEqual(getrefcount(font.render_raw_to(array, text)), 1) o = font.get_metrics("AB") self.assertEqual(getrefcount(o), 2) for i in range(len(o)): self.assertEqual(getrefcount(o[i]), 2, "refcount fail for item %d" % i) o = font.get_sizes() self.assertEqual(getrefcount(o), 2) for i in range(len(o)): self.assertEqual(getrefcount(o[i]), 2, "refcount fail for item %d" % i) def test_display_surface_quit(self): """Font.render_to() on a closed display surface""" # The Font.render_to() method checks that PySurfaceObject.surf is NULL # and raise a exception if it is. This fixes a bug in Pygame revision # 0600ea4f1cfb and earlier where Pygame segfaults instead. null_surface = pygame.Surface.__new__(pygame.Surface) f = self._TEST_FONTS["sans"] self.assertRaises( pygame.error, f.render_to, null_surface, (0, 0), "Crash!", size=12 ) def test_issue_565(self): """get_metrics supporting rotation/styles/size""" tests = [ {"method": "size", "value": 36, "msg": "metrics same for size"}, {"method": "rotation", "value": 90, "msg": "metrics same for rotation"}, {"method": "oblique", "value": True, "msg": "metrics same for oblique"}, ] text = "|" def run_test(method, value, msg): font = ft.Font(self._sans_path, size=24) before = font.get_metrics(text) font.__setattr__(method, value) after = font.get_metrics(text) self.assertNotEqual(before, after, msg) for test in tests: run_test(test["method"], test["value"], test["msg"]) def test_freetype_SysFont_name(self): """that SysFont accepts names of various types""" fonts = pygame.font.get_fonts() size = 12 # Check single name string: font_name = ft.SysFont(fonts[0], size).name self.assertFalse(font_name is None) # Check string of comma-separated names. names = ",".join(fonts) font_name_2 = ft.SysFont(names, size).name self.assertEqual(font_name_2, font_name) # Check list of names. font_name_2 = ft.SysFont(fonts, size).name self.assertEqual(font_name_2, font_name) # Check generator: names = (name for name in fonts) font_name_2 = ft.SysFont(names, size).name self.assertEqual(font_name_2, font_name) fonts_b = [f.encode() for f in fonts] # Check single name bytes. font_name_2 = ft.SysFont(fonts_b[0], size).name self.assertEqual(font_name_2, font_name) # Check comma-separated bytes. names = b",".join(fonts_b) font_name_2 = ft.SysFont(names, size).name self.assertEqual(font_name_2, font_name) # Check list of bytes. font_name_2 = ft.SysFont(fonts_b, size).name self.assertEqual(font_name_2, font_name) # Check mixed list of bytes and string. names = [fonts[0], fonts_b[1], fonts[2], fonts_b[3]] font_name_2 = ft.SysFont(names, size).name self.assertEqual(font_name_2, font_name) def test_pathlib(self): f = ft.Font(pathlib.Path(self._fixed_path), 20) class FreeTypeTest(unittest.TestCase): def setUp(self): ft.init() def tearDown(self): ft.quit() def test_resolution(self): try: ft.set_default_resolution() resolution = ft.get_default_resolution() self.assertEqual(resolution, 72) new_resolution = resolution + 10 ft.set_default_resolution(new_resolution) self.assertEqual(ft.get_default_resolution(), new_resolution) ft.init(resolution=resolution + 20) self.assertEqual(ft.get_default_resolution(), new_resolution) finally: ft.set_default_resolution() def test_autoinit_and_autoquit(self): pygame.init() self.assertTrue(ft.get_init()) pygame.quit() self.assertFalse(ft.get_init()) # Ensure autoquit is replaced at init time pygame.init() self.assertTrue(ft.get_init()) pygame.quit() self.assertFalse(ft.get_init()) def test_init(self): # Test if module initialized after calling init(). ft.quit() ft.init() self.assertTrue(ft.get_init()) def test_init__multiple(self): # Test if module initialized after multiple init() calls. ft.init() ft.init() self.assertTrue(ft.get_init()) def test_quit(self): # Test if module uninitialized after calling quit(). ft.quit() self.assertFalse(ft.get_init()) def test_quit__multiple(self): # Test if module initialized after multiple quit() calls. ft.quit() ft.quit() self.assertFalse(ft.get_init()) def test_get_init(self): # Test if get_init() gets the init state. self.assertTrue(ft.get_init()) def test_cache_size(self): DEFAULT_CACHE_SIZE = 64 self.assertEqual(ft.get_cache_size(), DEFAULT_CACHE_SIZE) ft.quit() self.assertEqual(ft.get_cache_size(), 0) new_cache_size = DEFAULT_CACHE_SIZE * 2 ft.init(cache_size=new_cache_size) self.assertEqual(ft.get_cache_size(), new_cache_size) def test_get_error(self): """Ensures get_error() is initially empty (None).""" error_msg = ft.get_error() self.assertIsNone(error_msg) def test_get_version(self): # Test that get_version() can be called before init() # Also tests get_version ft.quit() # asserting not None just to have a test case # there is no real fail condition other than # raising an exception or a segfault, so a tuple of ints # should be returned in all cases self.assertIsNotNone(ft.get_version(linked=False)) self.assertIsNotNone(ft.get_version(linked=True)) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/ftfont_tags.py0000644000175100001770000000026414676242340016270 0ustar00runnerdocker__tags__ = ["development"] exclude = False try: import pygame.ftfont except ImportError: exclude = True if exclude: __tags__.extend(["ignore", "subprocess_ignore"]) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/ftfont_test.py0000644000175100001770000000064514676242340016314 0ustar00runnerdockerimport sys import os import unittest from pygame.tests import font_test import pygame.ftfont font_test.pygame_font = pygame.ftfont for name in dir(font_test): obj = getattr(font_test, name) if isinstance(obj, type) and issubclass(obj, unittest.TestCase): # conditional and new_name = f"Ft{name}" globals()[new_name] = type(new_name, (obj,), {}) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/gfxdraw_test.py0000644000175100001770000007714214676242340016464 0ustar00runnerdockerimport unittest import pygame import pygame.gfxdraw from pygame.locals import * from pygame.tests.test_utils import SurfaceSubclass def intensity(c, i): """Return color c changed by intensity i For 0 <= i <= 127 the color is a shade, with 0 being black, 127 being the unaltered color. For 128 <= i <= 255 the color is a tint, with 255 being white, 128 the unaltered color. """ r, g, b = c[0:3] if 0 <= i <= 127: # Darken return ((r * i) // 127, (g * i) // 127, (b * i) // 127) # Lighten return ( r + ((255 - r) * (255 - i)) // 127, g + ((255 - g) * (255 - i)) // 127, b + ((255 - b) * (255 - i)) // 127, ) class GfxdrawDefaultTest(unittest.TestCase): is_started = False foreground_color = (128, 64, 8) background_color = (255, 255, 255) def make_palette(base_color): """Return color palette that is various intensities of base_color""" # Need this function for Python 3.x so the base_color # is within the scope of the list comprehension. return [intensity(base_color, i) for i in range(0, 256)] default_palette = make_palette(foreground_color) default_size = (100, 100) def check_at(self, surf, posn, color): sc = surf.get_at(posn) fail_msg = "%s != %s at %s, bitsize: %i, flags: %i, masks: %s" % ( sc, color, posn, surf.get_bitsize(), surf.get_flags(), surf.get_masks(), ) self.assertEqual(sc, color, fail_msg) def check_not_at(self, surf, posn, color): sc = surf.get_at(posn) fail_msg = "%s != %s at %s, bitsize: %i, flags: %i, masks: %s" % ( sc, color, posn, surf.get_bitsize(), surf.get_flags(), surf.get_masks(), ) self.assertNotEqual(sc, color, fail_msg) @classmethod def setUpClass(cls): # Necessary for Surface.set_palette. pygame.init() pygame.display.set_mode((1, 1)) @classmethod def tearDownClass(cls): pygame.quit() def setUp(self): # This makes sure pygame is always initialized before each test (in # case a test calls pygame.quit()). if not pygame.get_init(): pygame.init() Surface = pygame.Surface size = self.default_size palette = self.default_palette if not self.is_started: # Create test surfaces self.surfaces = [ Surface(size, 0, 8), Surface(size, SRCALPHA, 16), Surface(size, SRCALPHA, 32), ] self.surfaces[0].set_palette(palette) nonpalette_fmts = ( # (8, (0xe0, 0x1c, 0x3, 0x0)), (12, (0xF00, 0xF0, 0xF, 0x0)), (15, (0x7C00, 0x3E0, 0x1F, 0x0)), (15, (0x1F, 0x3E0, 0x7C00, 0x0)), (16, (0xF00, 0xF0, 0xF, 0xF000)), (16, (0xF000, 0xF00, 0xF0, 0xF)), (16, (0xF, 0xF0, 0xF00, 0xF000)), (16, (0xF0, 0xF00, 0xF000, 0xF)), (16, (0x7C00, 0x3E0, 0x1F, 0x8000)), (16, (0xF800, 0x7C0, 0x3E, 0x1)), (16, (0x1F, 0x3E0, 0x7C00, 0x8000)), (16, (0x3E, 0x7C0, 0xF800, 0x1)), (16, (0xF800, 0x7E0, 0x1F, 0x0)), (16, (0x1F, 0x7E0, 0xF800, 0x0)), (24, (0xFF, 0xFF00, 0xFF0000, 0x0)), (24, (0xFF0000, 0xFF00, 0xFF, 0x0)), (32, (0xFF0000, 0xFF00, 0xFF, 0x0)), (32, (0xFF000000, 0xFF0000, 0xFF00, 0x0)), (32, (0xFF, 0xFF00, 0xFF0000, 0x0)), (32, (0xFF00, 0xFF0000, 0xFF000000, 0x0)), (32, (0xFF0000, 0xFF00, 0xFF, 0xFF000000)), (32, (0xFF000000, 0xFF0000, 0xFF00, 0xFF)), (32, (0xFF, 0xFF00, 0xFF0000, 0xFF000000)), (32, (0xFF00, 0xFF0000, 0xFF000000, 0xFF)), ) for bitsize, masks in nonpalette_fmts: self.surfaces.append(Surface(size, 0, bitsize, masks)) for surf in self.surfaces: surf.fill(self.background_color) def test_gfxdraw__subclassed_surface(self): """Ensure pygame.gfxdraw works on subclassed surfaces.""" surface = SurfaceSubclass((11, 13), SRCALPHA, 32) surface.fill(pygame.Color("blue")) expected_color = pygame.Color("red") x, y = 1, 2 pygame.gfxdraw.pixel(surface, x, y, expected_color) self.assertEqual(surface.get_at((x, y)), expected_color) def test_pixel(self): """pixel(surface, x, y, color): return None""" fg = self.foreground_color bg = self.background_color for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.pixel(surf, 2, 2, fg) for x in range(1, 4): for y in range(1, 4): if x == 2 and y == 2: self.check_at(surf, (x, y), fg_adjusted) else: self.check_at(surf, (x, y), bg_adjusted) def test_hline(self): """hline(surface, x1, x2, y, color): return None""" fg = self.foreground_color bg = self.background_color startx = 10 stopx = 80 y = 50 fg_test_points = [(startx, y), (stopx, y), ((stopx - startx) // 2, y)] bg_test_points = [ (startx - 1, y), (stopx + 1, y), (startx, y - 1), (startx, y + 1), (stopx, y - 1), (stopx, y + 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.hline(surf, startx, stopx, y, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_vline(self): """vline(surface, x, y1, y2, color): return None""" fg = self.foreground_color bg = self.background_color x = 50 starty = 10 stopy = 80 fg_test_points = [(x, starty), (x, stopy), (x, (stopy - starty) // 2)] bg_test_points = [ (x, starty - 1), (x, stopy + 1), (x - 1, starty), (x + 1, starty), (x - 1, stopy), (x + 1, stopy), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.vline(surf, x, starty, stopy, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_rectangle(self): """rectangle(surface, rect, color): return None""" fg = self.foreground_color bg = self.background_color rect = pygame.Rect(10, 15, 55, 62) rect_tuple = tuple(rect) fg_test_points = [ rect.topleft, (rect.right - 1, rect.top), (rect.left, rect.bottom - 1), (rect.right - 1, rect.bottom - 1), ] bg_test_points = [ (rect.left - 1, rect.top - 1), (rect.left + 1, rect.top + 1), (rect.right, rect.top - 1), (rect.right - 2, rect.top + 1), (rect.left - 1, rect.bottom), (rect.left + 1, rect.bottom - 2), (rect.right, rect.bottom), (rect.right - 2, rect.bottom - 2), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.rectangle(surf, rect, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) surf.fill(bg) pygame.gfxdraw.rectangle(surf, rect_tuple, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_box(self): """box(surface, rect, color): return None""" fg = self.foreground_color bg = self.background_color rect = pygame.Rect(10, 15, 55, 62) rect_tuple = tuple(rect) fg_test_points = [ rect.topleft, (rect.left + 1, rect.top + 1), (rect.right - 1, rect.top), (rect.right - 2, rect.top + 1), (rect.left, rect.bottom - 1), (rect.left + 1, rect.bottom - 2), (rect.right - 1, rect.bottom - 1), (rect.right - 2, rect.bottom - 2), ] bg_test_points = [ (rect.left - 1, rect.top - 1), (rect.right, rect.top - 1), (rect.left - 1, rect.bottom), (rect.right, rect.bottom), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.box(surf, rect, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) surf.fill(bg) pygame.gfxdraw.box(surf, rect_tuple, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_line(self): """line(surface, x1, y1, x2, y2, color): return None""" fg = self.foreground_color bg = self.background_color x1 = 10 y1 = 15 x2 = 92 y2 = 77 fg_test_points = [(x1, y1), (x2, y2)] bg_test_points = [ (x1 - 1, y1), (x1, y1 - 1), (x1 - 1, y1 - 1), (x2 + 1, y2), (x2, y2 + 1), (x2 + 1, y2 + 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.line(surf, x1, y1, x2, y2, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_circle(self): """circle(surface, x, y, r, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 r = 30 fg_test_points = [(x, y - r), (x, y + r), (x - r, y), (x + r, y)] bg_test_points = [ (x, y), (x, y - r + 1), (x, y - r - 1), (x, y + r + 1), (x, y + r - 1), (x - r - 1, y), (x - r + 1, y), (x + r + 1, y), (x + r - 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.circle(surf, x, y, r, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_arc(self): """arc(surface, x, y, r, start, end, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 r = 30 start = 0 # +x direction, but not (x + r, y) (?) end = 90 # -y direction, including (x, y + r) fg_test_points = [(x, y + r), (x + r, y + 1)] bg_test_points = [ (x, y), (x, y - r), (x - r, y), (x, y + r + 1), (x, y + r - 1), (x - 1, y + r), (x + r + 1, y), (x + r - 1, y), (x + r, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.arc(surf, x, y, r, start, end, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aacircle(self): """aacircle(surface, x, y, r, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 r = 30 fg_test_points = [(x, y - r), (x, y + r), (x - r, y), (x + r, y)] bg_test_points = [ (x, y), (x, y - r + 1), (x, y - r - 1), (x, y + r + 1), (x, y + r - 1), (x - r - 1, y), (x - r + 1, y), (x + r + 1, y), (x + r - 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.aacircle(surf, x, y, r, fg) for posn in fg_test_points: self.check_not_at(surf, posn, bg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_filled_circle(self): """filled_circle(surface, x, y, r, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 r = 30 fg_test_points = [ (x, y - r), (x, y - r + 1), (x, y + r), (x, y + r - 1), (x - r, y), (x - r + 1, y), (x + r, y), (x + r - 1, y), (x, y), ] bg_test_points = [ (x, y - r - 1), (x, y + r + 1), (x - r - 1, y), (x + r + 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.filled_circle(surf, x, y, r, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_ellipse(self): """ellipse(surface, x, y, rx, ry, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 rx = 30 ry = 35 fg_test_points = [(x, y - ry), (x, y + ry), (x - rx, y), (x + rx, y)] bg_test_points = [ (x, y), (x, y - ry + 1), (x, y - ry - 1), (x, y + ry + 1), (x, y + ry - 1), (x - rx - 1, y), (x - rx + 1, y), (x + rx + 1, y), (x + rx - 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.ellipse(surf, x, y, rx, ry, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aaellipse(self): """aaellipse(surface, x, y, rx, ry, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 rx = 30 ry = 35 fg_test_points = [(x, y - ry), (x, y + ry), (x - rx, y), (x + rx, y)] bg_test_points = [ (x, y), (x, y - ry + 1), (x, y - ry - 1), (x, y + ry + 1), (x, y + ry - 1), (x - rx - 1, y), (x - rx + 1, y), (x + rx + 1, y), (x + rx - 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.aaellipse(surf, x, y, rx, ry, fg) for posn in fg_test_points: self.check_not_at(surf, posn, bg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_filled_ellipse(self): """filled_ellipse(surface, x, y, rx, ry, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 rx = 30 ry = 35 fg_test_points = [ (x, y - ry), (x, y - ry + 1), (x, y + ry), (x, y + ry - 1), (x - rx, y), (x - rx + 1, y), (x + rx, y), (x + rx - 1, y), (x, y), ] bg_test_points = [ (x, y - ry - 1), (x, y + ry + 1), (x - rx - 1, y), (x + rx + 1, y), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.filled_ellipse(surf, x, y, rx, ry, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_pie(self): """pie(surface, x, y, r, start, end, color): return None""" fg = self.foreground_color bg = self.background_color x = 45 y = 40 r = 30 start = 0 # +x direction, including (x + r, y) end = 90 # -y direction, but not (x, y + r) (?) fg_test_points = [(x, y), (x + 1, y), (x, y + 1), (x + r, y)] bg_test_points = [ (x - 1, y), (x, y - 1), (x - 1, y - 1), (x + 1, y + 1), (x + r + 1, y), (x + r, y - 1), (x, y + r + 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.pie(surf, x, y, r, start, end, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_trigon(self): """trigon(surface, x1, y1, x2, y2, x3, y3, color): return None""" fg = self.foreground_color bg = self.background_color x1 = 10 y1 = 15 x2 = 92 y2 = 77 x3 = 20 y3 = 60 fg_test_points = [(x1, y1), (x2, y2), (x3, y3)] bg_test_points = [ (x1 - 1, y1 - 1), (x2 + 1, y2 + 1), (x3 - 1, y3 + 1), (x1 + 10, y1 + 30), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.trigon(surf, x1, y1, x2, y2, x3, y3, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aatrigon(self): """aatrigon(surface, x1, y1, x2, y2, x3, y3, color): return None""" fg = self.foreground_color bg = self.background_color x1 = 10 y1 = 15 x2 = 92 y2 = 77 x3 = 20 y3 = 60 fg_test_points = [(x1, y1), (x2, y2), (x3, y3)] bg_test_points = [ (x1 - 1, y1 - 1), (x2 + 1, y2 + 1), (x3 - 1, y3 + 1), (x1 + 10, y1 + 30), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.aatrigon(surf, x1, y1, x2, y2, x3, y3, fg) for posn in fg_test_points: self.check_not_at(surf, posn, bg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aatrigon__with_horizontal_edge(self): """Ensure aatrigon draws horizontal edges correctly. This test creates 2 surfaces and draws an aatrigon on each. The pixels on each surface are compared to ensure they are the same. The only difference between the 2 aatrigons is the order the points are drawn. The order of the points should have no impact on the final drawing. Related to issue #622. """ bg_color = pygame.Color("white") line_color = pygame.Color("black") width, height = 11, 10 expected_surface = pygame.Surface((width, height), 0, 32) expected_surface.fill(bg_color) surface = pygame.Surface((width, height), 0, 32) surface.fill(bg_color) x1, y1 = width - 1, 0 x2, y2 = (width - 1) // 2, height - 1 x3, y3 = 0, 0 # The points in this order draw as expected. pygame.gfxdraw.aatrigon(expected_surface, x1, y1, x2, y2, x3, y3, line_color) # The points in reverse order fail to draw the horizontal edge along # the top. pygame.gfxdraw.aatrigon(surface, x3, y3, x2, y2, x1, y1, line_color) # The surfaces are locked for a possible speed up of pixel access. expected_surface.lock() surface.lock() for x in range(width): for y in range(height): self.assertEqual( expected_surface.get_at((x, y)), surface.get_at((x, y)), f"pos=({x}, {y})", ) surface.unlock() expected_surface.unlock() def test_filled_trigon(self): """filled_trigon(surface, x1, y1, x2, y2, x3, y3, color): return None""" fg = self.foreground_color bg = self.background_color x1 = 10 y1 = 15 x2 = 92 y2 = 77 x3 = 20 y3 = 60 fg_test_points = [(x1, y1), (x2, y2), (x3, y3), (x1 + 10, y1 + 30)] bg_test_points = [(x1 - 1, y1 - 1), (x2 + 1, y2 + 1), (x3 - 1, y3 + 1)] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.filled_trigon(surf, x1, y1, x2, y2, x3, y3, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_polygon(self): """polygon(surface, points, color): return None""" fg = self.foreground_color bg = self.background_color points = [(10, 80), (10, 15), (92, 25), (92, 80)] fg_test_points = points + [ (points[0][0], points[0][1] - 1), (points[0][0] + 1, points[0][1]), (points[3][0] - 1, points[3][1]), (points[3][0], points[3][1] - 1), (points[2][0], points[2][1] + 1), ] bg_test_points = [ (points[0][0] - 1, points[0][1]), (points[0][0], points[0][1] + 1), (points[0][0] - 1, points[0][1] + 1), (points[0][0] + 1, points[0][1] - 1), (points[3][0] + 1, points[3][1]), (points[3][0], points[3][1] + 1), (points[3][0] + 1, points[3][1] + 1), (points[3][0] - 1, points[3][1] - 1), (points[2][0] + 1, points[2][1]), (points[2][0] - 1, points[2][1] + 1), (points[1][0] - 1, points[1][1]), (points[1][0], points[1][1] - 1), (points[1][0] - 1, points[1][1] - 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.polygon(surf, points, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aapolygon(self): """aapolygon(surface, points, color): return None""" fg = self.foreground_color bg = self.background_color points = [(10, 80), (10, 15), (92, 25), (92, 80)] fg_test_points = points bg_test_points = [ (points[0][0] - 1, points[0][1]), (points[0][0], points[0][1] + 1), (points[0][0] - 1, points[0][1] + 1), (points[0][0] + 1, points[0][1] - 1), (points[3][0] + 1, points[3][1]), (points[3][0], points[3][1] + 1), (points[3][0] + 1, points[3][1] + 1), (points[3][0] - 1, points[3][1] - 1), (points[2][0] + 1, points[2][1]), (points[2][0] - 1, points[2][1] + 1), (points[1][0] - 1, points[1][1]), (points[1][0], points[1][1] - 1), (points[1][0] - 1, points[1][1] - 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.aapolygon(surf, points, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_not_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_aapolygon__with_horizontal_edge(self): """Ensure aapolygon draws horizontal edges correctly. This test creates 2 surfaces and draws a polygon on each. The pixels on each surface are compared to ensure they are the same. The only difference between the 2 polygons is that one is drawn using aapolygon() and the other using multiple line() calls. They should produce the same final drawing. Related to issue #622. """ bg_color = pygame.Color("white") line_color = pygame.Color("black") width, height = 11, 10 expected_surface = pygame.Surface((width, height), 0, 32) expected_surface.fill(bg_color) surface = pygame.Surface((width, height), 0, 32) surface.fill(bg_color) points = ((0, 0), (0, height - 1), (width - 1, height - 1), (width - 1, 0)) # The points are used to draw the expected aapolygon using the line() # function. for (x1, y1), (x2, y2) in zip(points, points[1:] + points[:1]): pygame.gfxdraw.line(expected_surface, x1, y1, x2, y2, line_color) # The points in this order fail to draw the horizontal edge along # the top. pygame.gfxdraw.aapolygon(surface, points, line_color) # The surfaces are locked for a possible speed up of pixel access. expected_surface.lock() surface.lock() for x in range(width): for y in range(height): self.assertEqual( expected_surface.get_at((x, y)), surface.get_at((x, y)), f"pos=({x}, {y})", ) surface.unlock() expected_surface.unlock() def test_filled_polygon(self): """filled_polygon(surface, points, color): return None""" fg = self.foreground_color bg = self.background_color points = [(10, 80), (10, 15), (92, 25), (92, 80)] fg_test_points = points + [ (points[0][0], points[0][1] - 1), (points[0][0] + 1, points[0][1]), (points[0][0] + 1, points[0][1] - 1), (points[3][0] - 1, points[3][1]), (points[3][0], points[3][1] - 1), (points[3][0] - 1, points[3][1] - 1), (points[2][0], points[2][1] + 1), (points[2][0] - 1, points[2][1] + 1), ] bg_test_points = [ (points[0][0] - 1, points[0][1]), (points[0][0], points[0][1] + 1), (points[0][0] - 1, points[0][1] + 1), (points[3][0] + 1, points[3][1]), (points[3][0], points[3][1] + 1), (points[3][0] + 1, points[3][1] + 1), (points[2][0] + 1, points[2][1]), (points[1][0] - 1, points[1][1]), (points[1][0], points[1][1] - 1), (points[1][0] - 1, points[1][1] - 1), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.filled_polygon(surf, points, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) def test_textured_polygon(self): """textured_polygon(surface, points, texture, tx, ty): return None""" w, h = self.default_size fg = self.foreground_color bg = self.background_color tx = 0 ty = 0 texture = pygame.Surface((w + tx, h + ty), 0, 24) texture.fill(fg, (0, 0, w, h)) points = [(10, 80), (10, 15), (92, 25), (92, 80)] # Don't know how to really check this as boarder points may # or may not be included in the textured polygon. fg_test_points = [(points[1][0] + 30, points[1][1] + 40)] bg_test_points = [ (points[0][0] - 1, points[0][1]), (points[0][0], points[0][1] + 1), (points[0][0] - 1, points[0][1] + 1), (points[3][0] + 1, points[3][1]), (points[3][0], points[3][1] + 1), (points[3][0] + 1, points[3][1] + 1), (points[2][0] + 1, points[2][1]), (points[1][0] - 1, points[1][1]), (points[1][0], points[1][1] - 1), (points[1][0] - 1, points[1][1] - 1), ] for surf in self.surfaces[1:]: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.textured_polygon(surf, points, texture, -tx, -ty) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) # Alpha blit to 8 bits-per-pixel surface forbidden. texture = pygame.Surface(self.default_size, SRCALPHA, 32) self.assertRaises( ValueError, pygame.gfxdraw.textured_polygon, self.surfaces[0], points, texture, 0, 0, ) def test_bezier(self): """bezier(surface, points, steps, color): return None""" fg = self.foreground_color bg = self.background_color points = [(10, 50), (25, 15), (60, 80), (92, 30)] fg_test_points = [points[0], points[3]] bg_test_points = [ (points[0][0] - 1, points[0][1]), (points[3][0] + 1, points[3][1]), (points[1][0], points[1][1] + 3), (points[2][0], points[2][1] - 3), ] for surf in self.surfaces: fg_adjusted = surf.unmap_rgb(surf.map_rgb(fg)) bg_adjusted = surf.unmap_rgb(surf.map_rgb(bg)) pygame.gfxdraw.bezier(surf, points, 30, fg) for posn in fg_test_points: self.check_at(surf, posn, fg_adjusted) for posn in bg_test_points: self.check_at(surf, posn, bg_adjusted) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/image__save_gl_surface_test.py0000644000175100001770000000225614676242340021445 0ustar00runnerdockerimport os import unittest from pygame.tests import test_utils import pygame from pygame.locals import * @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'OpenGL requires a non-"dummy" SDL_VIDEODRIVER', ) class GL_ImageSave(unittest.TestCase): def test_image_save_works_with_opengl_surfaces(self): """ |tags:display,slow,opengl| """ pygame.display.init() screen = pygame.display.set_mode((640, 480), OPENGL | DOUBLEBUF) pygame.display.flip() tmp_dir = test_utils.get_tmp_dir() # Try the imageext module. tmp_file = os.path.join(tmp_dir, "opengl_save_surface_test.png") pygame.image.save(screen, tmp_file) self.assertTrue(os.path.exists(tmp_file)) os.remove(tmp_file) # Only test the image module. tmp_file = os.path.join(tmp_dir, "opengl_save_surface_test.bmp") pygame.image.save(screen, tmp_file) self.assertTrue(os.path.exists(tmp_file)) os.remove(tmp_file) # stops tonnes of tmp dirs building up in trunk dir os.rmdir(tmp_dir) pygame.display.quit() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/image_tags.py0000644000175100001770000000020414676242340016044 0ustar00runnerdocker__tags__ = [] import pygame import sys if "pygame.image" not in sys.modules: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/image_test.py0000644000175100001770000012402014676242340016070 0ustar00runnerdockerimport array import binascii import io import os import tempfile import unittest import glob import pathlib from pygame.tests.test_utils import example_path, png, tostring import pygame, pygame.image, pygame.pkgdata sdl_image_svg_jpeg_save_bug = False _sdl_image_ver = pygame.image.get_sdl_image_version() if _sdl_image_ver is not None: sdl_image_svg_jpeg_save_bug = ( _sdl_image_ver <= (2, 0, 5) and pygame.get_sdl_byteorder() == pygame.BIG_ENDIAN ) def test_magic(f, magic_hexes): """Tests a given file to see if the magic hex matches.""" data = f.read(len(magic_hexes)) if len(data) != len(magic_hexes): return 0 for i, magic_hex in enumerate(magic_hexes): if magic_hex != data[i]: return 0 return 1 class ImageModuleTest(unittest.TestCase): def testLoadIcon(self): """see if we can load the pygame icon.""" f = pygame.pkgdata.getResource("pygame_icon.bmp") self.assertEqual(f.mode, "rb") surf = pygame.image.load_basic(f) self.assertEqual(surf.get_at((0, 0)), (5, 4, 5, 255)) self.assertEqual(surf.get_height(), 32) self.assertEqual(surf.get_width(), 32) def testLoadPNG(self): """see if we can load a png with color values in the proper channels.""" # Create a PNG file with known colors reddish_pixel = (210, 0, 0, 255) greenish_pixel = (0, 220, 0, 255) bluish_pixel = (0, 0, 230, 255) greyish_pixel = (110, 120, 130, 140) pixel_array = [reddish_pixel + greenish_pixel, bluish_pixel + greyish_pixel] f_descriptor, f_path = tempfile.mkstemp(suffix=".png") with os.fdopen(f_descriptor, "wb") as f: w = png.Writer(2, 2, alpha=True) w.write(f, pixel_array) # Read the PNG file and verify that pygame interprets it correctly surf = pygame.image.load(f_path) self.assertEqual(surf.get_at((0, 0)), reddish_pixel) self.assertEqual(surf.get_at((1, 0)), greenish_pixel) self.assertEqual(surf.get_at((0, 1)), bluish_pixel) self.assertEqual(surf.get_at((1, 1)), greyish_pixel) # Read the PNG file obj. and verify that pygame interprets it correctly with open(f_path, "rb") as f: surf = pygame.image.load(f) self.assertEqual(surf.get_at((0, 0)), reddish_pixel) self.assertEqual(surf.get_at((1, 0)), greenish_pixel) self.assertEqual(surf.get_at((0, 1)), bluish_pixel) self.assertEqual(surf.get_at((1, 1)), greyish_pixel) os.remove(f_path) def testLoadJPG(self): """to see if we can load a jpg.""" f = example_path("data/alien1.jpg") surf = pygame.image.load(f) with open(f, "rb") as f: surf = pygame.image.load(f) def testLoadBytesIO(self): """to see if we can load images with BytesIO.""" files = [ "data/alien1.png", "data/alien1.jpg", "data/alien1.gif", "data/asprite.bmp", ] for fname in files: with self.subTest(fname=fname): with open(example_path(fname), "rb") as f: img_bytes = f.read() img_file = io.BytesIO(img_bytes) image = pygame.image.load(img_file) @unittest.skipIf( sdl_image_svg_jpeg_save_bug, "SDL_image 2.0.5 and older has a big endian bug in jpeg saving", ) def testSaveJPG(self): """JPG equivalent to issue #211 - color channel swapping Make sure the SDL surface color masks represent the rgb memory format required by the JPG library. The masks are machine endian dependent """ from pygame import Color, Rect # The source image is a 2 by 2 square of four colors. Since JPEG is # lossy, there can be color bleed. Make each color square 16 by 16, # to avoid the significantly color value distorts found at color # boundaries due to the compression value set by Pygame. square_len = 16 sz = 2 * square_len, 2 * square_len # +---------------------------------+ # | red | green | # |----------------+----------------| # | blue | (255, 128, 64) | # +---------------------------------+ # # as (rect, color) pairs. def as_rect(square_x, square_y): return Rect( square_x * square_len, square_y * square_len, square_len, square_len ) squares = [ (as_rect(0, 0), Color("red")), (as_rect(1, 0), Color("green")), (as_rect(0, 1), Color("blue")), (as_rect(1, 1), Color(255, 128, 64)), ] # A surface format which is not directly usable with libjpeg. surf = pygame.Surface(sz, 0, 32) for rect, color in squares: surf.fill(color, rect) # Assume pygame.image.Load works correctly as it is handled by the # third party SDL_image library. with tempfile.NamedTemporaryFile(suffix=".jpg", delete=False) as f: temp_filename = f.name pygame.image.save(surf, temp_filename) jpg_surf = pygame.image.load(temp_filename) # Allow for small differences in the restored colors. def approx(c): mask = 0xFC return pygame.Color(c.r & mask, c.g & mask, c.b & mask) offset = square_len // 2 for rect, color in squares: posn = rect.move((offset, offset)).topleft self.assertEqual(approx(jpg_surf.get_at(posn)), approx(color)) os.remove(temp_filename) def testSavePNG32(self): """see if we can save a png with color values in the proper channels.""" # Create a PNG file with known colors reddish_pixel = (215, 0, 0, 255) greenish_pixel = (0, 225, 0, 255) bluish_pixel = (0, 0, 235, 255) greyish_pixel = (115, 125, 135, 145) surf = pygame.Surface((1, 4), pygame.SRCALPHA, 32) surf.set_at((0, 0), reddish_pixel) surf.set_at((0, 1), greenish_pixel) surf.set_at((0, 2), bluish_pixel) surf.set_at((0, 3), greyish_pixel) with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f: temp_filename = f.name pygame.image.save(surf, temp_filename) try: # Read the PNG file and verify that pygame saved it correctly reader = png.Reader(filename=temp_filename) width, height, pixels, metadata = reader.asRGBA8() # pixels is a generator self.assertEqual(tuple(next(pixels)), reddish_pixel) self.assertEqual(tuple(next(pixels)), greenish_pixel) self.assertEqual(tuple(next(pixels)), bluish_pixel) self.assertEqual(tuple(next(pixels)), greyish_pixel) finally: # Ensures proper clean up. if not reader.file.closed: reader.file.close() del reader os.remove(temp_filename) def testSavePNG24(self): """see if we can save a png with color values in the proper channels.""" # Create a PNG file with known colors reddish_pixel = (215, 0, 0) greenish_pixel = (0, 225, 0) bluish_pixel = (0, 0, 235) greyish_pixel = (115, 125, 135) surf = pygame.Surface((1, 4), 0, 24) surf.set_at((0, 0), reddish_pixel) surf.set_at((0, 1), greenish_pixel) surf.set_at((0, 2), bluish_pixel) surf.set_at((0, 3), greyish_pixel) with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f: temp_filename = f.name pygame.image.save(surf, temp_filename) try: # Read the PNG file and verify that pygame saved it correctly reader = png.Reader(filename=temp_filename) width, height, pixels, metadata = reader.asRGB8() # pixels is a generator self.assertEqual(tuple(next(pixels)), reddish_pixel) self.assertEqual(tuple(next(pixels)), greenish_pixel) self.assertEqual(tuple(next(pixels)), bluish_pixel) self.assertEqual(tuple(next(pixels)), greyish_pixel) finally: # Ensures proper clean up. if not reader.file.closed: reader.file.close() del reader os.remove(temp_filename) def testSavePNG8(self): """see if we can save an 8 bit png correctly""" # Create an 8-bit PNG file with known colors set_pixels = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (170, 146, 170)] size = (1, len(set_pixels)) surf = pygame.Surface(size, depth=8) for cnt, pix in enumerate(set_pixels): surf.set_at((0, cnt), pix) with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f: temp_filename = f.name pygame.image.save(surf, temp_filename) try: # Read the PNG file and verify that pygame saved it correctly reader = png.Reader(filename=temp_filename) width, height, pixels, _ = reader.asRGB8() self.assertEqual(size, (width, height)) # pixels is a generator self.assertEqual(list(map(tuple, pixels)), set_pixels) finally: # Ensures proper clean up. if not reader.file.closed: reader.file.close() del reader os.remove(temp_filename) def testSavePaletteAsPNG8(self): """see if we can save a png with color values in the proper channels.""" # Create a PNG file with known colors pygame.display.init() reddish_pixel = (215, 0, 0) greenish_pixel = (0, 225, 0) bluish_pixel = (0, 0, 235) greyish_pixel = (115, 125, 135) surf = pygame.Surface((1, 4), 0, 8) surf.set_palette_at(0, reddish_pixel) surf.set_palette_at(1, greenish_pixel) surf.set_palette_at(2, bluish_pixel) surf.set_palette_at(3, greyish_pixel) with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f: temp_filename = f.name pygame.image.save(surf, temp_filename) try: # Read the PNG file and verify that pygame saved it correctly reader = png.Reader(filename=temp_filename) reader.read() palette = reader.palette() # pixels is a generator self.assertEqual(tuple(next(palette)), reddish_pixel) self.assertEqual(tuple(next(palette)), greenish_pixel) self.assertEqual(tuple(next(palette)), bluish_pixel) self.assertEqual(tuple(next(palette)), greyish_pixel) finally: # Ensures proper clean up. if not reader.file.closed: reader.file.close() del reader os.remove(temp_filename) def test_save(self): s = pygame.Surface((10, 10)) s.fill((23, 23, 23)) magic_hex = {} magic_hex["jpg"] = [0xFF, 0xD8, 0xFF, 0xE0] magic_hex["png"] = [0x89, 0x50, 0x4E, 0x47] # magic_hex['tga'] = [0x0, 0x0, 0xa] magic_hex["bmp"] = [0x42, 0x4D] formats = ["jpg", "png", "bmp"] # uppercase too... JPG formats = formats + [x.upper() for x in formats] for fmt in formats: try: temp_filename = f"tmpimg.{fmt}" pygame.image.save(s, temp_filename) # Using 'with' ensures the file is closed even if test fails. with open(temp_filename, "rb") as handle: # Test the magic numbers at the start of the file to ensure # they are saved as the correct file type. self.assertEqual( (1, fmt), (test_magic(handle, magic_hex[fmt.lower()]), fmt) ) # load the file to make sure it was saved correctly. # Note load can load a jpg saved with a .png file name. s2 = pygame.image.load(temp_filename) # compare contents, might only work reliably for png... # but because it's all one color it seems to work with jpg. self.assertEqual(s2.get_at((0, 0)), s.get_at((0, 0))) finally: # clean up the temp file, comment out to leave tmp file after run. os.remove(temp_filename) def test_save_to_fileobject(self): s = pygame.Surface((1, 1)) s.fill((23, 23, 23)) bytes_stream = io.BytesIO() pygame.image.save(s, bytes_stream) bytes_stream.seek(0) s2 = pygame.image.load(bytes_stream, "tga") self.assertEqual(s.get_at((0, 0)), s2.get_at((0, 0))) def test_save_tga(self): s = pygame.Surface((1, 1)) s.fill((23, 23, 23)) with tempfile.NamedTemporaryFile(suffix=".tga", delete=False) as f: temp_filename = f.name try: pygame.image.save(s, temp_filename) s2 = pygame.image.load(temp_filename) self.assertEqual(s2.get_at((0, 0)), s.get_at((0, 0))) finally: # clean up the temp file, even if test fails os.remove(temp_filename) def test_save_pathlib(self): surf = pygame.Surface((1, 1)) surf.fill((23, 23, 23)) with tempfile.NamedTemporaryFile(suffix=".tga", delete=False) as f: temp_filename = f.name path = pathlib.Path(temp_filename) try: pygame.image.save(surf, path) s2 = pygame.image.load(path) self.assertEqual(s2.get_at((0, 0)), surf.get_at((0, 0))) finally: os.remove(temp_filename) def test_save__to_fileobject_w_namehint_argument(self): s = pygame.Surface((10, 10)) s.fill((23, 23, 23)) magic_hex = {} magic_hex["jpg"] = [0xFF, 0xD8, 0xFF, 0xE0] magic_hex["png"] = [0x89, 0x50, 0x4E, 0x47] magic_hex["bmp"] = [0x42, 0x4D] formats = ["tga", "jpg", "bmp", "png"] # uppercase too... JPG formats = formats + [x.upper() for x in formats] SDL_Im_version = pygame.image.get_sdl_image_version() # We assume here that minor version and patch level of SDL_Image # never goes above 99 isAtLeastSDL_image_2_0_2 = (SDL_Im_version is not None) and ( SDL_Im_version[0] * 10000 + SDL_Im_version[1] * 100 + SDL_Im_version[2] ) >= 20002 for fmt in formats: tmp_file, tmp_filename = tempfile.mkstemp(suffix=f".{fmt}") if not isAtLeastSDL_image_2_0_2 and fmt.lower() == "jpg": with os.fdopen(tmp_file, "wb") as handle: with self.assertRaises(pygame.error): pygame.image.save(s, handle, tmp_filename) else: with os.fdopen(tmp_file, "r+b") as handle: pygame.image.save(s, handle, tmp_filename) if fmt.lower() in magic_hex: # Test the magic numbers at the start of the file to # ensure they are saved as the correct file type. handle.seek(0) self.assertEqual( (1, fmt), (test_magic(handle, magic_hex[fmt.lower()]), fmt) ) # load the file to make sure it was saved correctly. handle.flush() handle.seek(0) s2 = pygame.image.load(handle, tmp_filename) self.assertEqual(s2.get_at((0, 0)), s.get_at((0, 0))) os.remove(tmp_filename) def test_save_colorkey(self): """make sure the color key is not changed when saving.""" s = pygame.Surface((10, 10), pygame.SRCALPHA, 32) s.fill((23, 23, 23)) s.set_colorkey((0, 0, 0)) colorkey1 = s.get_colorkey() p1 = s.get_at((0, 0)) temp_filename = "tmpimg.png" try: pygame.image.save(s, temp_filename) s2 = pygame.image.load(temp_filename) finally: os.remove(temp_filename) colorkey2 = s.get_colorkey() # check that the pixel and the colorkey is correct. self.assertEqual(colorkey1, colorkey2) self.assertEqual(p1, s2.get_at((0, 0))) def test_load_unicode_path(self): import shutil orig = example_path("data/asprite.bmp") temp = os.path.join(example_path("data"), "你好.bmp") shutil.copy(orig, temp) try: im = pygame.image.load(temp) finally: os.remove(temp) def _unicode_save(self, temp_file): im = pygame.Surface((10, 10), 0, 32) try: with open(temp_file, "w") as f: pass os.remove(temp_file) except OSError: raise unittest.SkipTest("the path cannot be opened") self.assertFalse(os.path.exists(temp_file)) try: pygame.image.save(im, temp_file) self.assertGreater(os.path.getsize(temp_file), 10) finally: try: os.remove(temp_file) except OSError: pass def test_save_unicode_path(self): """save unicode object with non-ASCII chars""" self._unicode_save("你好.bmp") def assertPremultipliedAreEqual(self, string1, string2, source_string): self.assertEqual(len(string1), len(string2)) block_size = 20 if string1 != string2: for block_start in range(0, len(string1), block_size): block_end = min(block_start + block_size, len(string1)) block1 = string1[block_start:block_end] block2 = string2[block_start:block_end] if block1 != block2: source_block = source_string[block_start:block_end] msg = ( "string difference in %d to %d of %d:\n%s\n%s\nsource:\n%s" % ( block_start, block_end, len(string1), binascii.hexlify(block1), binascii.hexlify(block2), binascii.hexlify(source_block), ) ) self.fail(msg) def test_to_string__premultiplied(self): """test to make sure we can export a surface to a premultiplied alpha string""" def convertRGBAtoPremultiplied(surface_to_modify): for x in range(surface_to_modify.get_width()): for y in range(surface_to_modify.get_height()): color = surface_to_modify.get_at((x, y)) premult_color = ( color[0] * color[3] / 255, color[1] * color[3] / 255, color[2] * color[3] / 255, color[3], ) surface_to_modify.set_at((x, y), premult_color) test_surface = pygame.Surface((256, 256), pygame.SRCALPHA, 32) for x in range(test_surface.get_width()): for y in range(test_surface.get_height()): i = x + y * test_surface.get_width() test_surface.set_at( (x, y), ((i * 7) % 256, (i * 13) % 256, (i * 27) % 256, y) ) premultiplied_copy = test_surface.copy() convertRGBAtoPremultiplied(premultiplied_copy) self.assertPremultipliedAreEqual( pygame.image.tostring(test_surface, "RGBA_PREMULT"), pygame.image.tostring(premultiplied_copy, "RGBA"), pygame.image.tostring(test_surface, "RGBA"), ) self.assertPremultipliedAreEqual( pygame.image.tostring(test_surface, "ARGB_PREMULT"), pygame.image.tostring(premultiplied_copy, "ARGB"), pygame.image.tostring(test_surface, "ARGB"), ) no_alpha_surface = pygame.Surface((256, 256), 0, 24) self.assertRaises( ValueError, pygame.image.tostring, no_alpha_surface, "RGBA_PREMULT" ) # Custom assert method to check for identical surfaces. def _assertSurfaceEqual(self, surf_a, surf_b, msg=None): a_width, a_height = surf_a.get_width(), surf_a.get_height() # Check a few things to see if the surfaces are equal. self.assertEqual(a_width, surf_b.get_width(), msg) self.assertEqual(a_height, surf_b.get_height(), msg) self.assertEqual(surf_a.get_size(), surf_b.get_size(), msg) self.assertEqual(surf_a.get_rect(), surf_b.get_rect(), msg) self.assertEqual(surf_a.get_colorkey(), surf_b.get_colorkey(), msg) self.assertEqual(surf_a.get_alpha(), surf_b.get_alpha(), msg) self.assertEqual(surf_a.get_flags(), surf_b.get_flags(), msg) self.assertEqual(surf_a.get_bitsize(), surf_b.get_bitsize(), msg) self.assertEqual(surf_a.get_bytesize(), surf_b.get_bytesize(), msg) # Anything else? # Making the method lookups local for a possible speed up. surf_a_get_at = surf_a.get_at surf_b_get_at = surf_b.get_at for y in range(a_height): for x in range(a_width): self.assertEqual( surf_a_get_at((x, y)), surf_b_get_at((x, y)), "%s (pixel: %d, %d)" % (msg, x, y), ) def test_fromstring__and_tostring(self): """Ensure methods tostring() and fromstring() are symmetric.""" import itertools fmts = ("RGBA", "ARGB", "BGRA") fmt_permutations = itertools.permutations(fmts, 2) fmt_combinations = itertools.combinations(fmts, 2) def convert(fmt1, fmt2, str_buf): pos_fmt1 = {k: v for v, k in enumerate(fmt1)} pos_fmt2 = {k: v for v, k in enumerate(fmt2)} byte_buf = array.array("B", str_buf) num_quads = len(byte_buf) // 4 for i in range(num_quads): i4 = i * 4 R = byte_buf[i4 + pos_fmt1["R"]] G = byte_buf[i4 + pos_fmt1["G"]] B = byte_buf[i4 + pos_fmt1["B"]] A = byte_buf[i4 + pos_fmt1["A"]] byte_buf[i4 + pos_fmt2["R"]] = R byte_buf[i4 + pos_fmt2["G"]] = G byte_buf[i4 + pos_fmt2["B"]] = B byte_buf[i4 + pos_fmt2["A"]] = A return tostring(byte_buf) #################################################################### test_surface = pygame.Surface((64, 256), flags=pygame.SRCALPHA, depth=32) for i in range(256): for j in range(16): intensity = j * 16 + 15 test_surface.set_at((j + 0, i), (intensity, i, i, i)) test_surface.set_at((j + 16, i), (i, intensity, i, i)) test_surface.set_at((j + 32, i), (i, i, intensity, i)) test_surface.set_at((j + 32, i), (i, i, i, intensity)) self._assertSurfaceEqual( test_surface, test_surface, "failing with identical surfaces" ) for pair in fmt_combinations: fmt1_buf = pygame.image.tostring(test_surface, pair[0]) fmt1_convert_buf = convert( pair[1], pair[0], convert(pair[0], pair[1], fmt1_buf) ) test_convert_two_way = pygame.image.fromstring( fmt1_convert_buf, test_surface.get_size(), pair[0] ) self._assertSurfaceEqual( test_surface, test_convert_two_way, f"converting {pair[0]} to {pair[1]} and back is not symmetric", ) for pair in fmt_permutations: fmt1_buf = pygame.image.tostring(test_surface, pair[0]) fmt2_convert_buf = convert(pair[0], pair[1], fmt1_buf) test_convert_one_way = pygame.image.fromstring( fmt2_convert_buf, test_surface.get_size(), pair[1] ) self._assertSurfaceEqual( test_surface, test_convert_one_way, f"converting {pair[0]} to {pair[1]} failed", ) for fmt in fmts: test_buf = pygame.image.tostring(test_surface, fmt) test_to_from_fmt_string = pygame.image.fromstring( test_buf, test_surface.get_size(), fmt ) self._assertSurfaceEqual( test_surface, test_to_from_fmt_string, "tostring/fromstring functions are not " f"symmetric with '{fmt}' format", ) def test_tostring_depth_24(self): test_surface = pygame.Surface((64, 256), depth=24) for i in range(256): for j in range(16): intensity = j * 16 + 15 test_surface.set_at((j + 0, i), (intensity, i, i, i)) test_surface.set_at((j + 16, i), (i, intensity, i, i)) test_surface.set_at((j + 32, i), (i, i, intensity, i)) test_surface.set_at((j + 32, i), (i, i, i, intensity)) fmt = "RGB" fmt_buf = pygame.image.tostring(test_surface, fmt) test_to_from_fmt_string = pygame.image.fromstring( fmt_buf, test_surface.get_size(), fmt ) self._assertSurfaceEqual( test_surface, test_to_from_fmt_string, f'tostring/fromstring functions are not symmetric with "{fmt}" format', ) def test_frombuffer_8bit(self): """test reading pixel data from a bytes buffer""" pygame.display.init() eight_bit_palette_buffer = bytearray( [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3] ) eight_bit_surf = pygame.image.frombuffer(eight_bit_palette_buffer, (4, 4), "P") eight_bit_surf.set_palette( [(255, 10, 20), (255, 255, 255), (0, 0, 0), (50, 200, 20)] ) self.assertEqual(eight_bit_surf.get_at((0, 0)), pygame.Color(255, 10, 20)) self.assertEqual(eight_bit_surf.get_at((1, 1)), pygame.Color(255, 255, 255)) self.assertEqual(eight_bit_surf.get_at((2, 2)), pygame.Color(0, 0, 0)) self.assertEqual(eight_bit_surf.get_at((3, 3)), pygame.Color(50, 200, 20)) def test_frombuffer_RGB(self): rgb_buffer = bytearray( [ 255, 10, 20, 255, 10, 20, 255, 10, 20, 255, 10, 20, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 200, 20, 50, 200, 20, 50, 200, 20, 50, 200, 20, ] ) rgb_surf = pygame.image.frombuffer(rgb_buffer, (4, 4), "RGB") self.assertEqual(rgb_surf.get_at((0, 0)), pygame.Color(255, 10, 20)) self.assertEqual(rgb_surf.get_at((1, 1)), pygame.Color(255, 255, 255)) self.assertEqual(rgb_surf.get_at((2, 2)), pygame.Color(0, 0, 0)) self.assertEqual(rgb_surf.get_at((3, 3)), pygame.Color(50, 200, 20)) def test_frombuffer_BGR(self): bgr_buffer = bytearray( [ 20, 10, 255, 20, 10, 255, 20, 10, 255, 20, 10, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 200, 50, 20, 200, 50, 20, 200, 50, 20, 200, 50, ] ) bgr_surf = pygame.image.frombuffer(bgr_buffer, (4, 4), "BGR") self.assertEqual(bgr_surf.get_at((0, 0)), pygame.Color(255, 10, 20)) self.assertEqual(bgr_surf.get_at((1, 1)), pygame.Color(255, 255, 255)) self.assertEqual(bgr_surf.get_at((2, 2)), pygame.Color(0, 0, 0)) self.assertEqual(bgr_surf.get_at((3, 3)), pygame.Color(50, 200, 20)) def test_frombuffer_BGRA(self): bgra_buffer = bytearray( [ 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 79, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, ] ) bgra_surf = pygame.image.frombuffer(bgra_buffer, (4, 4), "BGRA") self.assertEqual(bgra_surf.get_at((0, 0)), pygame.Color(20, 10, 255, 200)) self.assertEqual(bgra_surf.get_at((1, 1)), pygame.Color(255, 255, 255, 127)) self.assertEqual(bgra_surf.get_at((2, 2)), pygame.Color(0, 0, 0, 79)) self.assertEqual(bgra_surf.get_at((3, 3)), pygame.Color(20, 200, 50, 255)) def test_frombuffer_RGBX(self): rgbx_buffer = bytearray( [ 255, 10, 20, 255, 255, 10, 20, 255, 255, 10, 20, 255, 255, 10, 20, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, ] ) rgbx_surf = pygame.image.frombuffer(rgbx_buffer, (4, 4), "RGBX") self.assertEqual(rgbx_surf.get_at((0, 0)), pygame.Color(255, 10, 20, 255)) self.assertEqual(rgbx_surf.get_at((1, 1)), pygame.Color(255, 255, 255, 255)) self.assertEqual(rgbx_surf.get_at((2, 2)), pygame.Color(0, 0, 0, 255)) self.assertEqual(rgbx_surf.get_at((3, 3)), pygame.Color(50, 200, 20, 255)) def test_frombuffer_RGBA(self): rgba_buffer = bytearray( [ 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 79, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, ] ) rgba_surf = pygame.image.frombuffer(rgba_buffer, (4, 4), "RGBA") self.assertEqual(rgba_surf.get_at((0, 0)), pygame.Color(255, 10, 20, 200)) self.assertEqual(rgba_surf.get_at((1, 1)), pygame.Color(255, 255, 255, 127)) self.assertEqual(rgba_surf.get_at((2, 2)), pygame.Color(0, 0, 0, 79)) self.assertEqual(rgba_surf.get_at((3, 3)), pygame.Color(50, 200, 20, 255)) def test_frombuffer_ARGB(self): argb_buffer = bytearray( [ 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 200, 255, 10, 20, 127, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 79, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, 255, 50, 200, 20, ] ) argb_surf = pygame.image.frombuffer(argb_buffer, (4, 4), "ARGB") self.assertEqual(argb_surf.get_at((0, 0)), pygame.Color(255, 10, 20, 200)) self.assertEqual(argb_surf.get_at((1, 1)), pygame.Color(255, 255, 255, 127)) self.assertEqual(argb_surf.get_at((2, 2)), pygame.Color(0, 0, 0, 79)) self.assertEqual(argb_surf.get_at((3, 3)), pygame.Color(50, 200, 20, 255)) def test_get_extended(self): # Create a png file and try to load it. If it cannot, get_extended() should return False raw_image = [] raw_image.append((200, 200, 200, 255, 100, 100, 100, 255)) f_descriptor, f_path = tempfile.mkstemp(suffix=".png") with os.fdopen(f_descriptor, "wb") as file: w = png.Writer(2, 1, alpha=True) w.write(file, raw_image) try: surf = pygame.image.load(f_path) loaded = True except pygame.error: loaded = False self.assertEqual(pygame.image.get_extended(), loaded) os.remove(f_path) def test_get_sdl_image_version(self): # If get_extended() returns False then get_sdl_image_version() should # return None if not pygame.image.get_extended(): self.assertIsNone(pygame.image.get_sdl_image_version()) else: expected_length = 3 expected_type = tuple expected_item_type = int version = pygame.image.get_sdl_image_version() self.assertIsInstance(version, expected_type) self.assertEqual(len(version), expected_length) for item in version: self.assertIsInstance(item, expected_item_type) def test_load_basic(self): """to see if we can load bmp from files and/or file-like objects in memory""" # pygame.image.load(filename): return Surface # test loading from a file s = pygame.image.load_basic(example_path("data/asprite.bmp")) self.assertEqual(s.get_at((0, 0)), (255, 255, 255, 255)) # test loading from io.BufferedReader f = pygame.pkgdata.getResource("pygame_icon.bmp") self.assertEqual(f.mode, "rb") surf = pygame.image.load_basic(f) self.assertEqual(surf.get_at((0, 0)), (5, 4, 5, 255)) self.assertEqual(surf.get_height(), 32) self.assertEqual(surf.get_width(), 32) f.close() def test_load_extended(self): """can load different format images. We test loading the following file types: bmp, png, jpg, gif (non-animated), pcx, tga (uncompressed), tif, xpm, ppm, pgm Following file types are tested when using SDL 2 svg, pnm, webp All the loaded images are smaller than 32 x 32 pixels. """ filename_expected_color = [ ("asprite.bmp", (255, 255, 255, 255)), ("laplacian.png", (10, 10, 70, 255)), ("red.jpg", (254, 0, 0, 255)), ("blue.gif", (0, 0, 255, 255)), ("green.pcx", (0, 255, 0, 255)), ("yellow.tga", (255, 255, 0, 255)), ("turquoise.tif", (0, 255, 255, 255)), ("purple.xpm", (255, 0, 255, 255)), ("black.ppm", (0, 0, 0, 255)), ("grey.pgm", (120, 120, 120, 255)), ("teal.svg", (0, 128, 128, 255)), ("crimson.pnm", (220, 20, 60, 255)), ("scarlet.webp", (252, 14, 53, 255)), ] for filename, expected_color in filename_expected_color: if filename.endswith("svg") and sdl_image_svg_jpeg_save_bug: # SDL_image 2.0.5 and older has an svg loading bug on big # endian platforms continue with self.subTest( f'Test loading a {filename.split(".")[-1]}', filename="examples/data/" + filename, expected_color=expected_color, ): surf = pygame.image.load_extended(example_path("data/" + filename)) self.assertEqual(surf.get_at((0, 0)), expected_color) def test_load_pathlib(self): """works loading using a Path argument.""" path = pathlib.Path(example_path("data/asprite.bmp")) surf = pygame.image.load_extended(path) self.assertEqual(surf.get_at((0, 0)), (255, 255, 255, 255)) def test_save_extended(self): surf = pygame.Surface((5, 5)) surf.fill((23, 23, 23)) passing_formats = ["jpg", "png"] passing_formats += [fmt.upper() for fmt in passing_formats] magic_hex = {} magic_hex["jpg"] = [0xFF, 0xD8, 0xFF, 0xE0] magic_hex["png"] = [0x89, 0x50, 0x4E, 0x47] failing_formats = ["bmp", "tga"] failing_formats += [fmt.upper() for fmt in failing_formats] # check that .jpg and .png save for fmt in passing_formats: temp_file_name = f"temp_file.{fmt}" # save image as .jpg and .png pygame.image.save_extended(surf, temp_file_name) with open(temp_file_name, "rb") as file: # Test the magic numbers at the start of the file to ensure # they are saved as the correct file type. self.assertEqual(1, (test_magic(file, magic_hex[fmt.lower()]))) # load the file to make sure it was saved correctly loaded_file = pygame.image.load(temp_file_name) self.assertEqual(loaded_file.get_at((0, 0)), surf.get_at((0, 0))) # clean up the temp file os.remove(temp_file_name) # check that .bmp and .tga do not save for fmt in failing_formats: self.assertRaises( pygame.error, pygame.image.save_extended, surf, f"temp_file.{fmt}" ) def threads_load(self, images): import pygame.threads for i in range(10): surfs = pygame.threads.tmap(pygame.image.load, images) for s in surfs: self.assertIsInstance(s, pygame.Surface) def test_load_png_threads(self): self.threads_load(glob.glob(example_path("data/*.png"))) def test_load_jpg_threads(self): self.threads_load(glob.glob(example_path("data/*.jpg"))) def test_load_bmp_threads(self): self.threads_load(glob.glob(example_path("data/*.bmp"))) def test_load_gif_threads(self): self.threads_load(glob.glob(example_path("data/*.gif"))) def test_from_to_bytes_exists(self): getattr(pygame.image, "frombytes") getattr(pygame.image, "tobytes") if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/imageext_tags.py0000644000175100001770000000020714676242340016570 0ustar00runnerdocker__tags__ = [] import pygame import sys if "pygame.imageext" not in sys.modules: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/imageext_test.py0000644000175100001770000000544414676242340016621 0ustar00runnerdockerimport os import os.path import sys import unittest from pygame.tests.test_utils import example_path import pygame, pygame.image, pygame.pkgdata imageext = sys.modules["pygame.imageext"] class ImageextModuleTest(unittest.TestCase): # Most of the testing is done indirectly through image_test.py # This just confirms file path encoding and error handling. def test_save_non_string_file(self): im = pygame.Surface((10, 10), 0, 32) self.assertRaises(TypeError, imageext.save_extended, im, []) def test_load_non_string_file(self): self.assertRaises(TypeError, imageext.load_extended, []) @unittest.skip("SDL silently removes invalid characters") def test_save_bad_filename(self): im = pygame.Surface((10, 10), 0, 32) u = "a\x00b\x00c.png" self.assertRaises(pygame.error, imageext.save_extended, im, u) @unittest.skip("SDL silently removes invalid characters") def test_load_bad_filename(self): u = "a\x00b\x00c.png" self.assertRaises(pygame.error, imageext.load_extended, u) def test_save_unknown_extension(self): im = pygame.Surface((10, 10), 0, 32) s = "foo.bar" self.assertRaises(pygame.error, imageext.save_extended, im, s) def test_load_unknown_extension(self): s = "foo.bar" self.assertRaises(FileNotFoundError, imageext.load_extended, s) def test_load_unknown_file(self): s = "nonexistent.png" self.assertRaises(FileNotFoundError, imageext.load_extended, s) def test_load_unicode_path_0(self): u = example_path("data/alien1.png") im = imageext.load_extended(u) def test_load_unicode_path_1(self): """non-ASCII unicode""" import shutil orig = example_path("data/alien1.png") temp = os.path.join(example_path("data"), "你好.png") shutil.copy(orig, temp) try: im = imageext.load_extended(temp) finally: os.remove(temp) def _unicode_save(self, temp_file): im = pygame.Surface((10, 10), 0, 32) try: with open(temp_file, "w") as f: pass os.remove(temp_file) except OSError: raise unittest.SkipTest("the path cannot be opened") self.assertFalse(os.path.exists(temp_file)) try: imageext.save_extended(im, temp_file) self.assertGreater(os.path.getsize(temp_file), 10) finally: try: os.remove(temp_file) except OSError: pass def test_save_unicode_path_0(self): """unicode object with ASCII chars""" self._unicode_save("temp_file.png") def test_save_unicode_path_1(self): self._unicode_save("你好.png") if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.025112 pygame-2.6.1/test/joystick_test.py0000644000175100001770000001367614676242340016663 0ustar00runnerdockerimport unittest from pygame.tests.test_utils import question, prompt import pygame import pygame._sdl2.controller class JoystickTypeTest(unittest.TestCase): def todo_test_Joystick(self): # __doc__ (as of 2008-08-02) for pygame.joystick.Joystick: # pygame.joystick.Joystick(id): return Joystick # create a new Joystick object # # Create a new joystick to access a physical device. The id argument # must be a value from 0 to pygame.joystick.get_count()-1. # # To access most of the Joystick methods, you'll need to init() the # Joystick. This is separate from making sure the joystick module is # initialized. When multiple Joysticks objects are created for the # same physical joystick device (i.e., they have the same ID number), # the state and values for those Joystick objects will be shared. # # The Joystick object allows you to get information about the types of # controls on a joystick device. Once the device is initialized the # Pygame event queue will start receiving events about its input. # # You can call the Joystick.get_name() and Joystick.get_id() functions # without initializing the Joystick object. # self.fail() class JoystickModuleTest(unittest.TestCase): def test_get_init(self): # Check that get_init() matches what is actually happening def error_check_get_init(): try: pygame.joystick.get_count() except pygame.error: return False return True # Start uninitialised self.assertEqual(pygame.joystick.get_init(), False) pygame.joystick.init() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # True pygame.joystick.quit() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # False pygame.joystick.init() pygame.joystick.init() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # True pygame.joystick.quit() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # False pygame.joystick.quit() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # False for i in range(100): pygame.joystick.init() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # True pygame.joystick.quit() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # False for i in range(100): pygame.joystick.quit() self.assertEqual(pygame.joystick.get_init(), error_check_get_init()) # False def test_init(self): """ This unit test is for joystick.init() It was written to help reduce maintenance costs and to help test against changes to the code or different platforms. """ pygame.quit() # test that pygame.init automatically calls joystick.init pygame.init() self.assertEqual(pygame.joystick.get_init(), True) # Controller module interferes with the joystick module. pygame._sdl2.controller.quit() # test that get_count doesn't work w/o joystick init # this is done before and after an init to test # that init activates the joystick functions pygame.joystick.quit() with self.assertRaises(pygame.error): pygame.joystick.get_count() # test explicit call(s) to joystick.init. # Also test that get_count works once init is called iterations = 20 for i in range(iterations): pygame.joystick.init() self.assertEqual(pygame.joystick.get_init(), True) self.assertIsNotNone(pygame.joystick.get_count()) def test_quit(self): """Test if joystick.quit works.""" pygame.joystick.init() self.assertIsNotNone(pygame.joystick.get_count()) # Is not None before quit pygame.joystick.quit() with self.assertRaises(pygame.error): # Raises error if quit worked pygame.joystick.get_count() def test_get_count(self): # Test that get_count correctly returns a non-negative number of joysticks pygame.joystick.init() try: count = pygame.joystick.get_count() self.assertGreaterEqual( count, 0, ("joystick.get_count() must " "return a value >= 0") ) finally: pygame.joystick.quit() class JoystickInteractiveTest(unittest.TestCase): __tags__ = ["interactive"] def test_get_count_interactive(self): # Test get_count correctly identifies number of connected joysticks prompt( "Please connect any joysticks/controllers now before starting the " "joystick.get_count() test." ) pygame.joystick.init() # pygame.joystick.get_count(): return count # number of joysticks on the system, 0 means no joysticks connected count = pygame.joystick.get_count() response = question( "NOTE: Having Steam open may add an extra virtual controller for " "each joystick/controller physically plugged in.\n" f"joystick.get_count() thinks there is [{count}] joystick(s)/controller(s)" "connected to this system. Is this correct?" ) self.assertTrue(response) # When you create Joystick objects using Joystick(id), you pass an # integer that must be lower than this count. # Test Joystick(id) for each connected joystick if count != 0: for x in range(count): pygame.joystick.Joystick(x) with self.assertRaises(pygame.error): pygame.joystick.Joystick(count) pygame.joystick.quit() ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0261118 pygame-2.6.1/test/key_test.py0000644000175100001770000002172414676242340015605 0ustar00runnerdockerimport os import time import unittest import pygame import pygame.key # keys that are not tested for const-name match SKIPPED_KEYS = {"K_UNKNOWN"} # This is the expected compat output KEY_NAME_COMPAT = { "K_0": "0", "K_1": "1", "K_2": "2", "K_3": "3", "K_4": "4", "K_5": "5", "K_6": "6", "K_7": "7", "K_8": "8", "K_9": "9", "K_AC_BACK": "AC Back", "K_AMPERSAND": "&", "K_ASTERISK": "*", "K_AT": "@", "K_BACKQUOTE": "`", "K_BACKSLASH": "\\", "K_BACKSPACE": "backspace", "K_BREAK": "break", "K_CAPSLOCK": "caps lock", "K_CARET": "^", "K_CLEAR": "clear", "K_COLON": ":", "K_COMMA": ",", "K_CURRENCYSUBUNIT": "CurrencySubUnit", "K_CURRENCYUNIT": "euro", "K_DELETE": "delete", "K_DOLLAR": "$", "K_DOWN": "down", "K_END": "end", "K_EQUALS": "=", "K_ESCAPE": "escape", "K_EURO": "euro", "K_EXCLAIM": "!", "K_F1": "f1", "K_F10": "f10", "K_F11": "f11", "K_F12": "f12", "K_F13": "f13", "K_F14": "f14", "K_F15": "f15", "K_F2": "f2", "K_F3": "f3", "K_F4": "f4", "K_F5": "f5", "K_F6": "f6", "K_F7": "f7", "K_F8": "f8", "K_F9": "f9", "K_GREATER": ">", "K_HASH": "#", "K_HELP": "help", "K_HOME": "home", "K_INSERT": "insert", "K_KP0": "[0]", "K_KP1": "[1]", "K_KP2": "[2]", "K_KP3": "[3]", "K_KP4": "[4]", "K_KP5": "[5]", "K_KP6": "[6]", "K_KP7": "[7]", "K_KP8": "[8]", "K_KP9": "[9]", "K_KP_0": "[0]", "K_KP_1": "[1]", "K_KP_2": "[2]", "K_KP_3": "[3]", "K_KP_4": "[4]", "K_KP_5": "[5]", "K_KP_6": "[6]", "K_KP_7": "[7]", "K_KP_8": "[8]", "K_KP_9": "[9]", "K_KP_DIVIDE": "[/]", "K_KP_ENTER": "enter", "K_KP_EQUALS": "equals", "K_KP_MINUS": "[-]", "K_KP_MULTIPLY": "[*]", "K_KP_PERIOD": "[.]", "K_KP_PLUS": "[+]", "K_LALT": "left alt", "K_LCTRL": "left ctrl", "K_LEFT": "left", "K_LEFTBRACKET": "[", "K_LEFTPAREN": "(", "K_LESS": "<", "K_LGUI": "left meta", "K_LMETA": "left meta", "K_LSHIFT": "left shift", "K_LSUPER": "left meta", "K_MENU": "menu", "K_MINUS": "-", "K_MODE": "alt gr", "K_NUMLOCK": "numlock", "K_NUMLOCKCLEAR": "numlock", "K_PAGEDOWN": "page down", "K_PAGEUP": "page up", "K_PAUSE": "break", "K_PERCENT": "%", "K_PERIOD": ".", "K_PLUS": "+", "K_POWER": "power", "K_PRINT": "print screen", "K_PRINTSCREEN": "print screen", "K_QUESTION": "?", "K_QUOTE": "'", "K_QUOTEDBL": '"', "K_RALT": "right alt", "K_RCTRL": "right ctrl", "K_RETURN": "return", "K_RGUI": "right meta", "K_RIGHT": "right", "K_RIGHTBRACKET": "]", "K_RIGHTPAREN": ")", "K_RMETA": "right meta", "K_RSHIFT": "right shift", "K_RSUPER": "right meta", "K_SCROLLLOCK": "scroll lock", "K_SCROLLOCK": "scroll lock", "K_SEMICOLON": ";", "K_SLASH": "/", "K_SPACE": "space", "K_SYSREQ": "sys req", "K_TAB": "tab", "K_UNDERSCORE": "_", "K_UP": "up", "K_a": "a", "K_b": "b", "K_c": "c", "K_d": "d", "K_e": "e", "K_f": "f", "K_g": "g", "K_h": "h", "K_i": "i", "K_j": "j", "K_k": "k", "K_l": "l", "K_m": "m", "K_n": "n", "K_o": "o", "K_p": "p", "K_q": "q", "K_r": "r", "K_s": "s", "K_t": "t", "K_u": "u", "K_v": "v", "K_w": "w", "K_x": "x", "K_y": "y", "K_z": "z", } class KeyModuleTest(unittest.TestCase): @classmethod def setUpClass(cls): pygame.init() @classmethod def tearDownClass(cls): pygame.quit() def setUp(self): # This makes sure pygame is always initialized before each test (in # case a test calls pygame.quit()). if not pygame.get_init(): pygame.init() if not pygame.display.get_init(): pygame.display.init() def test_import(self): """does it import?""" import pygame.key # fixme: test_get_focused failing systematically in some linux # fixme: test_get_focused failing on SDL 2.0.18 on Windows @unittest.skip("flaky test, and broken on 2.0.18 windows") def test_get_focused(self): # This test fails in SDL2 in some linux # This test was skipped in SDL1. focused = pygame.key.get_focused() self.assertFalse(focused) # No window to focus self.assertIsInstance(focused, int) # Dummy video driver never gets keyboard focus. if os.environ.get("SDL_VIDEODRIVER") != "dummy": # Positive test, fullscreen with events grabbed display_sizes = pygame.display.list_modes() if display_sizes == -1: display_sizes = [(500, 500)] pygame.display.set_mode(size=display_sizes[-1], flags=pygame.FULLSCREEN) pygame.event.set_grab(True) # Pump event queue to get window focus on macos pygame.event.pump() focused = pygame.key.get_focused() self.assertIsInstance(focused, int) self.assertTrue(focused) # Now test negative, iconify takes away focus pygame.event.clear() # TODO: iconify test fails in windows if os.name != "nt": pygame.display.iconify() # Apparent need to pump event queue in order to make sure iconify # happens. See display_test.py's test_get_active_iconify for _ in range(50): time.sleep(0.01) pygame.event.pump() self.assertFalse(pygame.key.get_focused()) # Test if focus is returned when iconify is gone pygame.display.set_mode(size=display_sizes[-1], flags=pygame.FULLSCREEN) for i in range(50): time.sleep(0.01) pygame.event.pump() self.assertTrue(pygame.key.get_focused()) # Test if a quit display raises an error: pygame.display.quit() with self.assertRaises(pygame.error) as cm: pygame.key.get_focused() def test_get_pressed(self): states = pygame.key.get_pressed() self.assertEqual(states[pygame.K_RIGHT], 0) # def test_get_pressed_not_iter(self): # states = pygame.key.get_pressed() # with self.assertRaises(TypeError): # next(states) # with self.assertRaises(TypeError): # for k in states: # pass def test_name_and_key_code(self): for const_name in dir(pygame): if not const_name.startswith("K_") or const_name in SKIPPED_KEYS: continue try: expected_str_name = KEY_NAME_COMPAT[const_name] except KeyError: self.fail( "If you are seeing this error in a test run, you probably added a " "new pygame key constant, but forgot to update key_test unitests" ) const_val = getattr(pygame, const_name) # with these tests below, we also make sure that key.name and key.key_code # can work together and handle each others outputs # test positional args self.assertEqual(pygame.key.name(const_val), expected_str_name) # test kwarg self.assertEqual(pygame.key.name(key=const_val), expected_str_name) # test positional args self.assertEqual(pygame.key.key_code(expected_str_name), const_val) # test kwarg self.assertEqual(pygame.key.key_code(name=expected_str_name), const_val) alt_name = pygame.key.name(const_val, use_compat=False) self.assertIsInstance(alt_name, str) # This is a test for an implementation detail of name with use_compat=False # If this test breaks in the future for any key, it is safe to put skips on # failing keys (the implementation detail is documented as being unreliable) self.assertEqual(pygame.key.key_code(alt_name), const_val) self.assertRaises(TypeError, pygame.key.name, "fizzbuzz") self.assertRaises(TypeError, pygame.key.key_code, pygame.K_a) self.assertRaises(ValueError, pygame.key.key_code, "fizzbuzz") def test_set_and_get_mods(self): pygame.key.set_mods(pygame.KMOD_CTRL) self.assertEqual(pygame.key.get_mods(), pygame.KMOD_CTRL) pygame.key.set_mods(pygame.KMOD_ALT) self.assertEqual(pygame.key.get_mods(), pygame.KMOD_ALT) pygame.key.set_mods(pygame.KMOD_CTRL | pygame.KMOD_ALT) self.assertEqual(pygame.key.get_mods(), pygame.KMOD_CTRL | pygame.KMOD_ALT) def test_set_and_get_repeat(self): self.assertEqual(pygame.key.get_repeat(), (0, 0)) pygame.key.set_repeat(10, 15) self.assertEqual(pygame.key.get_repeat(), (10, 15)) pygame.key.set_repeat() self.assertEqual(pygame.key.get_repeat(), (0, 0)) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0261118 pygame-2.6.1/test/locals_test.py0000644000175100001770000000064114676242340016265 0ustar00runnerdockerimport unittest import pygame.constants import pygame.locals class LocalsTest(unittest.TestCase): def test_locals_has_all_constants(self): constants_set = set(pygame.constants.__all__) locals_set = set(pygame.locals.__all__) # locals should have everything that constants has self.assertEqual(constants_set - locals_set, set()) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0261118 pygame-2.6.1/test/mask_test.py0000644000175100001770000074017014676242340015753 0ustar00runnerdockerfrom collections import OrderedDict import copy import platform import random import unittest import sys import pygame from pygame.locals import * from pygame.math import Vector2 IS_PYPY = "PyPy" == platform.python_implementation() def random_mask(size=(100, 100)): """random_mask(size=(100,100)): return Mask Create a mask of the given size, with roughly half the bits set at random.""" m = pygame.Mask(size) for i in range(size[0] * size[1] // 2): x, y = random.randint(0, size[0] - 1), random.randint(0, size[1] - 1) m.set_at((x, y)) return m def maskFromSurface(surface, threshold=127): mask = pygame.Mask(surface.get_size()) key = surface.get_colorkey() if key: for y in range(surface.get_height()): for x in range(surface.get_width()): if surface.get_at((x + 0.1, y + 0.1)) != key: mask.set_at((x, y), 1) else: for y in range(surface.get_height()): for x in range(surface.get_width()): if surface.get_at((x, y))[3] > threshold: mask.set_at((x, y), 1) return mask def create_bounding_rect(points): """Creates a bounding rect from the given points.""" xmin = xmax = points[0][0] ymin = ymax = points[0][1] for x, y in points[1:]: xmin = min(x, xmin) xmax = max(x, xmax) ymin = min(y, ymin) ymax = max(y, ymax) return pygame.Rect((xmin, ymin), (xmax - xmin + 1, ymax - ymin + 1)) def zero_size_pairs(width, height): """Creates a generator which yields pairs of sizes. For each pair of sizes at least one of the sizes will have a 0 in it. """ sizes = ((width, height), (width, 0), (0, height), (0, 0)) return ((a, b) for a in sizes for b in sizes if 0 in a or 0 in b) def corners(mask): """Returns a tuple with the corner positions of the given mask. Clockwise from the top left corner. """ width, height = mask.get_size() return ((0, 0), (width - 1, 0), (width - 1, height - 1), (0, height - 1)) def off_corners(rect): """Returns a tuple with the positions off of the corners of the given rect. Clockwise from the top left corner. """ return ( (rect.left - 1, rect.top), (rect.left - 1, rect.top - 1), (rect.left, rect.top - 1), (rect.right - 1, rect.top - 1), (rect.right, rect.top - 1), (rect.right, rect.top), (rect.right, rect.bottom - 1), (rect.right, rect.bottom), (rect.right - 1, rect.bottom), (rect.left, rect.bottom), (rect.left - 1, rect.bottom), (rect.left - 1, rect.bottom - 1), ) def assertSurfaceFilled(testcase, surface, expected_color, area_rect=None): """Checks to see if the given surface is filled with the given color. If an area_rect is provided, only check that area of the surface. """ if area_rect is None: x_range = range(surface.get_width()) y_range = range(surface.get_height()) else: area_rect.normalize() area_rect = area_rect.clip(surface.get_rect()) x_range = range(area_rect.left, area_rect.right) y_range = range(area_rect.top, area_rect.bottom) surface.lock() # Lock for possible speed up. for pos in ((x, y) for y in y_range for x in x_range): testcase.assertEqual(surface.get_at(pos), expected_color, pos) surface.unlock() def assertSurfaceFilledIgnoreArea(testcase, surface, expected_color, ignore_rect): """Checks if the surface is filled with the given color. The ignore_rect area is not checked. """ x_range = range(surface.get_width()) y_range = range(surface.get_height()) ignore_rect.normalize() surface.lock() # Lock for possible speed up. for pos in ((x, y) for y in y_range for x in x_range): if not ignore_rect.collidepoint(pos): testcase.assertEqual(surface.get_at(pos), expected_color, pos) surface.unlock() def assertMaskEqual(testcase, m1, m2, msg=None): """Checks to see if the 2 given masks are equal.""" m1_count = m1.count() testcase.assertEqual(m1.get_size(), m2.get_size(), msg=msg) testcase.assertEqual(m1_count, m2.count(), msg=msg) testcase.assertEqual(m1_count, m1.overlap_area(m2, (0, 0)), msg=msg) # This can be used to help debug exact locations. ##for i in range(m1.get_size()[0]): ## for j in range(m1.get_size()[1]): ## testcase.assertEqual(m1.get_at((i, j)), m2.get_at((i, j))) # @unittest.skipIf(IS_PYPY, "pypy has lots of mask failures") # TODO class MaskTypeTest(unittest.TestCase): ORIGIN_OFFSETS = ( (0, 0), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), ) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_mask(self): """Ensure masks are created correctly without fill parameter.""" expected_count = 0 expected_size = (11, 23) mask1 = pygame.mask.Mask(expected_size) mask2 = pygame.mask.Mask(size=expected_size) self.assertIsInstance(mask1, pygame.mask.Mask) self.assertEqual(mask1.count(), expected_count) self.assertEqual(mask1.get_size(), expected_size) self.assertIsInstance(mask2, pygame.mask.Mask) self.assertEqual(mask2.count(), expected_count) self.assertEqual(mask2.get_size(), expected_size) def test_mask__negative_size(self): """Ensure the mask constructor handles negative sizes correctly.""" for size in ((1, -1), (-1, 1), (-1, -1)): with self.assertRaises(ValueError): mask = pygame.Mask(size) def test_mask__fill_kwarg(self): """Ensure masks are created correctly using the fill keyword.""" width, height = 37, 47 expected_size = (width, height) fill_counts = {True: width * height, False: 0} for fill, expected_count in fill_counts.items(): msg = f"fill={fill}" mask = pygame.mask.Mask(expected_size, fill=fill) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual(mask.get_size(), expected_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_mask__fill_kwarg_bit_boundaries(self): """Ensures masks are created correctly using the fill keyword over a range of sizes. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(1, 4): for width in range(1, 66): expected_count = width * height expected_size = (width, height) msg = f"size={expected_size}" mask = pygame.mask.Mask(expected_size, fill=True) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual(mask.get_size(), expected_size, msg) def test_mask__fill_arg(self): """Ensure masks are created correctly using a fill arg.""" width, height = 59, 71 expected_size = (width, height) fill_counts = {True: width * height, False: 0} for fill, expected_count in fill_counts.items(): msg = f"fill={fill}" mask = pygame.mask.Mask(expected_size, fill) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual(mask.get_size(), expected_size, msg) def test_mask__size_kwarg(self): """Ensure masks are created correctly using the size keyword.""" width, height = 73, 83 expected_size = (width, height) fill_counts = {True: width * height, False: 0} for fill, expected_count in fill_counts.items(): msg = f"fill={fill}" mask1 = pygame.mask.Mask(fill=fill, size=expected_size) mask2 = pygame.mask.Mask(size=expected_size, fill=fill) self.assertIsInstance(mask1, pygame.mask.Mask, msg) self.assertIsInstance(mask2, pygame.mask.Mask, msg) self.assertEqual(mask1.count(), expected_count, msg) self.assertEqual(mask2.count(), expected_count, msg) self.assertEqual(mask1.get_size(), expected_size, msg) self.assertEqual(mask2.get_size(), expected_size, msg) def test_copy(self): """Ensures copy works correctly with some bits set and unset.""" # Test different widths and heights. for width in (31, 32, 33, 63, 64, 65): for height in (31, 32, 33, 63, 64, 65): mask = pygame.mask.Mask((width, height)) # Create a checkerboard pattern of set/unset bits. for x in range(width): for y in range(x & 1, height, 2): mask.set_at((x, y)) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) def test_copy__full(self): """Ensures copy works correctly on a filled masked.""" # Test different widths and heights. for width in (31, 32, 33, 63, 64, 65): for height in (31, 32, 33, 63, 64, 65): mask = pygame.mask.Mask((width, height), fill=True) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) def test_copy__empty(self): """Ensures copy works correctly on an empty mask.""" for width in (31, 32, 33, 63, 64, 65): for height in (31, 32, 33, 63, 64, 65): mask = pygame.mask.Mask((width, height)) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) def test_copy__independent(self): """Ensures copy makes an independent copy of the mask.""" mask_set_pos = (64, 1) mask_copy_set_pos = (64, 2) mask = pygame.mask.Mask((65, 3)) # Test both the copy() and __copy__() methods. mask_copies = (mask.copy(), copy.copy(mask)) mask.set_at(mask_set_pos) for mask_copy in mask_copies: mask_copy.set_at(mask_copy_set_pos) self.assertIsNot(mask_copy, mask) self.assertNotEqual( mask_copy.get_at(mask_set_pos), mask.get_at(mask_set_pos) ) self.assertNotEqual( mask_copy.get_at(mask_copy_set_pos), mask.get_at(mask_copy_set_pos) ) def test_get_size(self): """Ensure a mask's size is correctly retrieved.""" expected_size = (93, 101) mask = pygame.mask.Mask(expected_size) self.assertEqual(mask.get_size(), expected_size) def test_get_rect(self): """Ensures get_rect works correctly.""" expected_rect = pygame.Rect((0, 0), (11, 13)) # Test on full and empty masks. for fill in (True, False): mask = pygame.mask.Mask(expected_rect.size, fill=fill) rect = mask.get_rect() self.assertEqual(rect, expected_rect) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_get_rect__one_kwarg(self): """Ensures get_rect supports a single rect attribute kwarg. Tests all the rect attributes. """ # Rect attributes that take a single value. RECT_SINGLE_VALUE_ATTRIBUTES = ( "x", "y", "top", "left", "bottom", "right", "centerx", "centery", "width", "height", "w", "h", ) # Rect attributes that take 2 values. RECT_DOUBLE_VALUE_ATTRIBUTES = ( "topleft", "bottomleft", "topright", "bottomright", "midtop", "midleft", "midbottom", "midright", "center", "size", ) # Testing ints/floats and tuples/lists/Vector2s. # {attribute_names : attribute_values} rect_attributes = { RECT_SINGLE_VALUE_ATTRIBUTES: (3, 5.1), RECT_DOUBLE_VALUE_ATTRIBUTES: ((1, 2.2), [2.3, 3], Vector2(0, 1)), } size = (7, 3) mask = pygame.mask.Mask(size) for attributes, values in rect_attributes.items(): for attribute in attributes: for value in values: expected_rect = pygame.Rect((0, 0), size) setattr(expected_rect, attribute, value) rect = mask.get_rect(**{attribute: value}) self.assertEqual(rect, expected_rect) def test_get_rect__multiple_kwargs(self): """Ensures get_rect supports multiple rect attribute kwargs.""" mask = pygame.mask.Mask((5, 4)) expected_rect = pygame.Rect((0, 0), (0, 0)) kwargs = {"x": 7.1, "top": -1, "size": Vector2(2, 3.2)} for attrib, value in kwargs.items(): setattr(expected_rect, attrib, value) rect = mask.get_rect(**kwargs) self.assertEqual(rect, expected_rect) def test_get_rect__no_arg_support(self): """Ensures get_rect only supports kwargs.""" mask = pygame.mask.Mask((4, 5)) with self.assertRaises(TypeError): rect = mask.get_rect(3) with self.assertRaises(TypeError): rect = mask.get_rect((1, 2)) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_get_rect__invalid_kwarg_name(self): """Ensures get_rect detects invalid kwargs.""" mask = pygame.mask.Mask((1, 2)) with self.assertRaises(AttributeError): rect = mask.get_rect(righte=11) with self.assertRaises(AttributeError): rect = mask.get_rect(toplef=(1, 1)) with self.assertRaises(AttributeError): rect = mask.get_rect(move=(3, 2)) def test_get_rect__invalid_kwarg_format(self): """Ensures get_rect detects invalid kwarg formats.""" mask = pygame.mask.Mask((3, 11)) with self.assertRaises(TypeError): rect = mask.get_rect(right="1") # Wrong type. with self.assertRaises(TypeError): rect = mask.get_rect(bottom=(1,)) # Wrong type. with self.assertRaises(TypeError): rect = mask.get_rect(centerx=(1, 1)) # Wrong type. with self.assertRaises(TypeError): rect = mask.get_rect(midleft=(1, "1")) # Wrong type. with self.assertRaises(TypeError): rect = mask.get_rect(topright=(1,)) # Too few. with self.assertRaises(TypeError): rect = mask.get_rect(bottomleft=(1, 2, 3)) # Too many. with self.assertRaises(TypeError): rect = mask.get_rect(midbottom=1) # Wrong type. def test_get_at(self): """Ensure individual mask bits are correctly retrieved.""" width, height = 5, 7 mask0 = pygame.mask.Mask((width, height)) mask1 = pygame.mask.Mask((width, height), fill=True) mask0_expected_bit = 0 mask1_expected_bit = 1 pos = (width - 1, height - 1) # Check twice to make sure bits aren't toggled. self.assertEqual(mask0.get_at(pos), mask0_expected_bit) self.assertEqual(mask0.get_at(pos=pos), mask0_expected_bit) self.assertEqual(mask1.get_at(Vector2(pos)), mask1_expected_bit) self.assertEqual(mask1.get_at(pos=Vector2(pos)), mask1_expected_bit) def test_get_at__out_of_bounds(self): """Ensure get_at() checks bounds.""" width, height = 11, 3 mask = pygame.mask.Mask((width, height)) with self.assertRaises(IndexError): mask.get_at((width, 0)) with self.assertRaises(IndexError): mask.get_at((0, height)) with self.assertRaises(IndexError): mask.get_at((-1, 0)) with self.assertRaises(IndexError): mask.get_at((0, -1)) def test_set_at(self): """Ensure individual mask bits are set to 1.""" width, height = 13, 17 mask0 = pygame.mask.Mask((width, height)) mask1 = pygame.mask.Mask((width, height), fill=True) mask0_expected_count = 1 mask1_expected_count = mask1.count() expected_bit = 1 pos = (width - 1, height - 1) mask0.set_at(pos, expected_bit) # set 0 to 1 mask1.set_at(pos=Vector2(pos), value=expected_bit) # set 1 to 1 self.assertEqual(mask0.get_at(pos), expected_bit) self.assertEqual(mask0.count(), mask0_expected_count) self.assertEqual(mask1.get_at(pos), expected_bit) self.assertEqual(mask1.count(), mask1_expected_count) def test_set_at__to_0(self): """Ensure individual mask bits are set to 0.""" width, height = 11, 7 mask0 = pygame.mask.Mask((width, height)) mask1 = pygame.mask.Mask((width, height), fill=True) mask0_expected_count = 0 mask1_expected_count = mask1.count() - 1 expected_bit = 0 pos = (width - 1, height - 1) mask0.set_at(pos, expected_bit) # set 0 to 0 mask1.set_at(pos, expected_bit) # set 1 to 0 self.assertEqual(mask0.get_at(pos), expected_bit) self.assertEqual(mask0.count(), mask0_expected_count) self.assertEqual(mask1.get_at(pos), expected_bit) self.assertEqual(mask1.count(), mask1_expected_count) def test_set_at__default_value(self): """Ensure individual mask bits are set using the default value.""" width, height = 3, 21 mask0 = pygame.mask.Mask((width, height)) mask1 = pygame.mask.Mask((width, height), fill=True) mask0_expected_count = 1 mask1_expected_count = mask1.count() expected_bit = 1 pos = (width - 1, height - 1) mask0.set_at(pos) # set 0 to 1 mask1.set_at(pos) # set 1 to 1 self.assertEqual(mask0.get_at(pos), expected_bit) self.assertEqual(mask0.count(), mask0_expected_count) self.assertEqual(mask1.get_at(pos), expected_bit) self.assertEqual(mask1.count(), mask1_expected_count) def test_set_at__out_of_bounds(self): """Ensure set_at() checks bounds.""" width, height = 11, 3 mask = pygame.mask.Mask((width, height)) with self.assertRaises(IndexError): mask.set_at((width, 0)) with self.assertRaises(IndexError): mask.set_at((0, height)) with self.assertRaises(IndexError): mask.set_at((-1, 0)) with self.assertRaises(IndexError): mask.set_at((0, -1)) def test_overlap(self): """Ensure the overlap intersection is correctly calculated. Testing the different combinations of full/empty masks: (mask1-filled) 1 overlap 1 (mask2-filled) (mask1-empty) 0 overlap 1 (mask2-filled) (mask1-filled) 1 overlap 0 (mask2-empty) (mask1-empty) 0 overlap 0 (mask2-empty) """ expected_size = (4, 4) offset = (0, 0) expected_default = None expected_overlaps = {(True, True): offset} for fill2 in (True, False): mask2 = pygame.mask.Mask(expected_size, fill=fill2) mask2_count = mask2.count() for fill1 in (True, False): key = (fill1, fill2) msg = f"key={key}" mask1 = pygame.mask.Mask(expected_size, fill=fill1) mask1_count = mask1.count() expected_pos = expected_overlaps.get(key, expected_default) overlap_pos = mask1.overlap(mask2, offset) self.assertEqual(overlap_pos, expected_pos, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), expected_size, msg) self.assertEqual(mask2.get_size(), expected_size, msg) def test_overlap__offset(self): """Ensure an offset overlap intersection is correctly calculated.""" mask1 = pygame.mask.Mask((65, 3), fill=True) mask2 = pygame.mask.Mask((66, 4), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" expected_pos = (max(offset[0], 0), max(offset[1], 0)) overlap_pos = mask1.overlap(other=mask2, offset=offset) self.assertEqual(overlap_pos, expected_pos, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) def test_overlap__offset_with_unset_bits(self): """Ensure an offset overlap intersection is correctly calculated when (0, 0) bits not set.""" mask1 = pygame.mask.Mask((65, 3), fill=True) mask2 = pygame.mask.Mask((66, 4), fill=True) unset_pos = (0, 0) mask1.set_at(unset_pos, 0) mask2.set_at(unset_pos, 0) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" x, y = offset expected_y = max(y, 0) if 0 == y: expected_x = max(x + 1, 1) elif 0 < y: expected_x = max(x + 1, 0) else: expected_x = max(x, 1) overlap_pos = mask1.overlap(mask2, Vector2(offset)) self.assertEqual(overlap_pos, (expected_x, expected_y), msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) self.assertEqual(mask1.get_at(unset_pos), 0, msg) self.assertEqual(mask2.get_at(unset_pos), 0, msg) def test_overlap__no_overlap(self): """Ensure an offset overlap intersection is correctly calculated when there is no overlap.""" mask1 = pygame.mask.Mask((65, 3), fill=True) mask1_count = mask1.count() mask1_size = mask1.get_size() mask2_w, mask2_h = 67, 5 mask2_size = (mask2_w, mask2_h) mask2 = pygame.mask.Mask(mask2_size) set_pos = (mask2_w - 1, mask2_h - 1) mask2.set_at(set_pos) mask2_count = 1 for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" overlap_pos = mask1.overlap(mask2, offset) self.assertIsNone(overlap_pos, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) self.assertEqual(mask2.get_at(set_pos), 1, msg) def test_overlap__offset_boundary(self): """Ensures overlap handles offsets and boundaries correctly.""" mask1 = pygame.mask.Mask((13, 3), fill=True) mask2 = pygame.mask.Mask((7, 5), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() # Check the 4 boundaries. offsets = ( (mask1_size[0], 0), # off right (0, mask1_size[1]), # off bottom (-mask2_size[0], 0), # off left (0, -mask2_size[1]), ) # off top for offset in offsets: msg = f"offset={offset}" overlap_pos = mask1.overlap(mask2, offset) self.assertIsNone(overlap_pos, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap__bit_boundaries(self): """Ensures overlap handles masks of different sizes correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(2, 4): for width in range(2, 66): mask_size = (width, height) mask_count = width * height mask1 = pygame.mask.Mask(mask_size, fill=True) mask2 = pygame.mask.Mask(mask_size, fill=True) # Testing masks offset from each other. for offset in self.ORIGIN_OFFSETS: msg = f"size={mask_size}, offset={offset}" expected_pos = (max(offset[0], 0), max(offset[1], 0)) overlap_pos = mask1.overlap(mask2, offset) self.assertEqual(overlap_pos, expected_pos, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask_count, msg) self.assertEqual(mask2.count(), mask_count, msg) self.assertEqual(mask1.get_size(), mask_size, msg) self.assertEqual(mask2.get_size(), mask_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap__invalid_mask_arg(self): """Ensure overlap handles invalid mask arguments correctly.""" size = (5, 3) offset = (0, 0) mask = pygame.mask.Mask(size) invalid_mask = pygame.Surface(size) with self.assertRaises(TypeError): overlap_pos = mask.overlap(invalid_mask, offset) def test_overlap__invalid_offset_arg(self): """Ensure overlap handles invalid offset arguments correctly.""" size = (2, 7) offset = "(0, 0)" mask1 = pygame.mask.Mask(size) mask2 = pygame.mask.Mask(size) with self.assertRaises(TypeError): overlap_pos = mask1.overlap(mask2, offset) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_area(self): """Ensure the overlap_area is correctly calculated. Testing the different combinations of full/empty masks: (mask1-filled) 1 overlap_area 1 (mask2-filled) (mask1-empty) 0 overlap_area 1 (mask2-filled) (mask1-filled) 1 overlap_area 0 (mask2-empty) (mask1-empty) 0 overlap_area 0 (mask2-empty) """ expected_size = width, height = (4, 4) offset = (0, 0) expected_default = 0 expected_counts = {(True, True): width * height} for fill2 in (True, False): mask2 = pygame.mask.Mask(expected_size, fill=fill2) mask2_count = mask2.count() for fill1 in (True, False): key = (fill1, fill2) msg = f"key={key}" mask1 = pygame.mask.Mask(expected_size, fill=fill1) mask1_count = mask1.count() expected_count = expected_counts.get(key, expected_default) overlap_count = mask1.overlap_area(mask2, offset) self.assertEqual(overlap_count, expected_count, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), expected_size, msg) self.assertEqual(mask2.get_size(), expected_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_area__offset(self): """Ensure an offset overlap_area is correctly calculated.""" mask1 = pygame.mask.Mask((65, 3), fill=True) mask2 = pygame.mask.Mask((66, 4), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_count = overlap_rect.w * overlap_rect.h overlap_count = mask1.overlap_area(other=mask2, offset=offset) self.assertEqual(overlap_count, expected_count, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) def test_overlap_area__offset_boundary(self): """Ensures overlap_area handles offsets and boundaries correctly.""" mask1 = pygame.mask.Mask((11, 3), fill=True) mask2 = pygame.mask.Mask((5, 7), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() expected_count = 0 # Check the 4 boundaries. offsets = ( (mask1_size[0], 0), # off right (0, mask1_size[1]), # off bottom (-mask2_size[0], 0), # off left (0, -mask2_size[1]), ) # off top for offset in offsets: msg = f"offset={offset}" overlap_count = mask1.overlap_area(mask2, Vector2(offset)) self.assertEqual(overlap_count, expected_count, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_area__bit_boundaries(self): """Ensures overlap_area handles masks of different sizes correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(2, 4): for width in range(2, 66): mask_size = (width, height) mask_count = width * height mask1 = pygame.mask.Mask(mask_size, fill=True) mask2 = pygame.mask.Mask(mask_size, fill=True) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # Testing masks offset from each other. for offset in self.ORIGIN_OFFSETS: msg = f"size={mask_size}, offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_overlap_count = overlap_rect.w * overlap_rect.h overlap_count = mask1.overlap_area(mask2, offset) self.assertEqual(overlap_count, expected_overlap_count, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask_count, msg) self.assertEqual(mask2.count(), mask_count, msg) self.assertEqual(mask1.get_size(), mask_size, msg) self.assertEqual(mask2.get_size(), mask_size, msg) def test_overlap_area__invalid_mask_arg(self): """Ensure overlap_area handles invalid mask arguments correctly.""" size = (3, 5) offset = (0, 0) mask = pygame.mask.Mask(size) invalid_mask = pygame.Surface(size) with self.assertRaises(TypeError): overlap_count = mask.overlap_area(invalid_mask, offset) def test_overlap_area__invalid_offset_arg(self): """Ensure overlap_area handles invalid offset arguments correctly.""" size = (7, 2) offset = "(0, 0)" mask1 = pygame.mask.Mask(size) mask2 = pygame.mask.Mask(size) with self.assertRaises(TypeError): overlap_count = mask1.overlap_area(mask2, offset) def test_overlap_mask(self): """Ensure overlap_mask's mask has correct bits set. Testing the different combinations of full/empty masks: (mask1-filled) 1 overlap_mask 1 (mask2-filled) (mask1-empty) 0 overlap_mask 1 (mask2-filled) (mask1-filled) 1 overlap_mask 0 (mask2-empty) (mask1-empty) 0 overlap_mask 0 (mask2-empty) """ expected_size = (4, 4) offset = (0, 0) expected_default = pygame.mask.Mask(expected_size) expected_masks = {(True, True): pygame.mask.Mask(expected_size, fill=True)} for fill2 in (True, False): mask2 = pygame.mask.Mask(expected_size, fill=fill2) mask2_count = mask2.count() for fill1 in (True, False): key = (fill1, fill2) msg = f"key={key}" mask1 = pygame.mask.Mask(expected_size, fill=fill1) mask1_count = mask1.count() expected_mask = expected_masks.get(key, expected_default) overlap_mask = mask1.overlap_mask(other=mask2, offset=offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) assertMaskEqual(self, overlap_mask, expected_mask, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), expected_size, msg) self.assertEqual(mask2.get_size(), expected_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_mask__bits_set(self): """Ensure overlap_mask's mask has correct bits set.""" mask1 = pygame.mask.Mask((50, 50), fill=True) mask2 = pygame.mask.Mask((300, 10), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() mask3 = mask1.overlap_mask(mask2, (-1, 0)) for i in range(50): for j in range(10): self.assertEqual(mask3.get_at((i, j)), 1, f"({i}, {j})") for i in range(50): for j in range(11, 50): self.assertEqual(mask3.get_at((i, j)), 0, f"({i}, {j})") # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count) self.assertEqual(mask2.count(), mask2_count) self.assertEqual(mask1.get_size(), mask1_size) self.assertEqual(mask2.get_size(), mask2_size) def test_overlap_mask__offset(self): """Ensure an offset overlap_mask's mask is correctly calculated.""" mask1 = pygame.mask.Mask((65, 3), fill=True) mask2 = pygame.mask.Mask((66, 4), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() expected_mask = pygame.Mask(mask1_size) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.clear() expected_mask.draw( pygame.Mask(overlap_rect.size, fill=True), overlap_rect.topleft ) overlap_mask = mask1.overlap_mask(mask2, offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) assertMaskEqual(self, overlap_mask, expected_mask, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_mask__specific_offsets(self): """Ensure an offset overlap_mask's mask is correctly calculated. Testing the specific case of: -both masks are wider than 32 bits -a positive offset is used -the mask calling overlap_mask() is wider than the mask passed in """ mask1 = pygame.mask.Mask((65, 5), fill=True) mask2 = pygame.mask.Mask((33, 3), fill=True) expected_mask = pygame.Mask(mask1.get_size()) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # This rect's corners are used to move rect2 around the inside of # rect1. corner_rect = rect1.inflate(-2, -2) for corner in ("topleft", "topright", "bottomright", "bottomleft"): setattr(rect2, corner, getattr(corner_rect, corner)) offset = rect2.topleft msg = f"offset={offset}" overlap_rect = rect1.clip(rect2) expected_mask.clear() expected_mask.draw( pygame.Mask(overlap_rect.size, fill=True), overlap_rect.topleft ) overlap_mask = mask1.overlap_mask(mask2, offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) assertMaskEqual(self, overlap_mask, expected_mask, msg) def test_overlap_mask__offset_boundary(self): """Ensures overlap_mask handles offsets and boundaries correctly.""" mask1 = pygame.mask.Mask((9, 3), fill=True) mask2 = pygame.mask.Mask((11, 5), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() expected_count = 0 expected_size = mask1_size # Check the 4 boundaries. offsets = ( (mask1_size[0], 0), # off right (0, mask1_size[1]), # off bottom (-mask2_size[0], 0), # off left (0, -mask2_size[1]), ) # off top for offset in offsets: msg = f"offset={offset}" overlap_mask = mask1.overlap_mask(mask2, offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) self.assertEqual(overlap_mask.count(), expected_count, msg) self.assertEqual(overlap_mask.get_size(), expected_size, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_overlap_mask__bit_boundaries(self): """Ensures overlap_mask handles masks of different sizes correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(2, 4): for width in range(2, 66): mask_size = (width, height) mask_count = width * height mask1 = pygame.mask.Mask(mask_size, fill=True) mask2 = pygame.mask.Mask(mask_size, fill=True) expected_mask = pygame.Mask(mask_size) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # Testing masks offset from each other. for offset in self.ORIGIN_OFFSETS: msg = f"size={mask_size}, offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.clear() expected_mask.draw( pygame.Mask(overlap_rect.size, fill=True), overlap_rect.topleft ) overlap_mask = mask1.overlap_mask(mask2, offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) assertMaskEqual(self, overlap_mask, expected_mask, msg) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask_count, msg) self.assertEqual(mask2.count(), mask_count, msg) self.assertEqual(mask1.get_size(), mask_size, msg) self.assertEqual(mask2.get_size(), mask_size, msg) def test_overlap_mask__invalid_mask_arg(self): """Ensure overlap_mask handles invalid mask arguments correctly.""" size = (3, 2) offset = (0, 0) mask = pygame.mask.Mask(size) invalid_mask = pygame.Surface(size) with self.assertRaises(TypeError): overlap_mask = mask.overlap_mask(invalid_mask, offset) def test_overlap_mask__invalid_offset_arg(self): """Ensure overlap_mask handles invalid offset arguments correctly.""" size = (5, 2) offset = "(0, 0)" mask1 = pygame.mask.Mask(size) mask2 = pygame.mask.Mask(size) with self.assertRaises(TypeError): overlap_mask = mask1.overlap_mask(mask2, offset) def test_mask_access(self): """do the set_at, and get_at parts work correctly?""" m = pygame.Mask((10, 10)) m.set_at((0, 0), 1) self.assertEqual(m.get_at((0, 0)), 1) m.set_at((9, 0), 1) self.assertEqual(m.get_at((9, 0)), 1) # s = pygame.Surface((10,10)) # s.set_at((1,0), (0, 0, 1, 255)) # self.assertEqual(s.get_at((1,0)), (0, 0, 1, 255)) # s.set_at((-1,0), (0, 0, 1, 255)) # out of bounds, should get IndexError self.assertRaises(IndexError, lambda: m.get_at((-1, 0))) self.assertRaises(IndexError, lambda: m.set_at((-1, 0), 1)) self.assertRaises(IndexError, lambda: m.set_at((10, 0), 1)) self.assertRaises(IndexError, lambda: m.set_at((0, 10), 1)) def test_fill(self): """Ensure a mask can be filled.""" width, height = 11, 23 expected_count = width * height expected_size = (width, height) mask = pygame.mask.Mask(expected_size) mask.fill() self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_fill__bit_boundaries(self): """Ensures masks of different sizes are filled correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(1, 4): for width in range(1, 66): mask = pygame.mask.Mask((width, height)) expected_count = width * height mask.fill() self.assertEqual( mask.count(), expected_count, f"size=({width}, {height})" ) def test_clear(self): """Ensure a mask can be cleared.""" expected_count = 0 expected_size = (13, 27) mask = pygame.mask.Mask(expected_size, fill=True) mask.clear() self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) def test_clear__bit_boundaries(self): """Ensures masks of different sizes are cleared correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ expected_count = 0 for height in range(1, 4): for width in range(1, 66): mask = pygame.mask.Mask((width, height), fill=True) mask.clear() self.assertEqual( mask.count(), expected_count, f"size=({width}, {height})" ) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_invert(self): """Ensure a mask can be inverted.""" side = 73 expected_size = (side, side) mask1 = pygame.mask.Mask(expected_size) mask2 = pygame.mask.Mask(expected_size, fill=True) expected_count1 = side * side expected_count2 = 0 for i in range(side): expected_count1 -= 1 expected_count2 += 1 pos = (i, i) mask1.set_at(pos) mask2.set_at(pos, 0) mask1.invert() mask2.invert() self.assertEqual(mask1.count(), expected_count1) self.assertEqual(mask2.count(), expected_count2) self.assertEqual(mask1.get_size(), expected_size) self.assertEqual(mask2.get_size(), expected_size) for i in range(side): pos = (i, i) msg = f"pos={pos}" self.assertEqual(mask1.get_at(pos), 0, msg) self.assertEqual(mask2.get_at(pos), 1, msg) def test_invert__full(self): """Ensure a full mask can be inverted.""" expected_count = 0 expected_size = (43, 97) mask = pygame.mask.Mask(expected_size, fill=True) mask.invert() self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) def test_invert__empty(self): """Ensure an empty mask can be inverted.""" width, height = 43, 97 expected_size = (width, height) expected_count = width * height mask = pygame.mask.Mask(expected_size) mask.invert() self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_invert__bit_boundaries(self): """Ensures masks of different sizes are inverted correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for fill in (True, False): for height in range(1, 4): for width in range(1, 66): mask = pygame.mask.Mask((width, height), fill=fill) expected_count = 0 if fill else width * height mask.invert() self.assertEqual( mask.count(), expected_count, f"fill={fill}, size=({width}, {height})", ) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_scale(self): """Ensure a mask can be scaled.""" width, height = 43, 61 original_size = (width, height) for fill in (True, False): original_mask = pygame.mask.Mask(original_size, fill=fill) original_count = width * height if fill else 0 # Test a range of sizes. Also tests scaling to 'same' # size when new_w, new_h = width, height for new_w in range(width - 10, width + 10): for new_h in range(height - 10, height + 10): expected_size = (new_w, new_h) expected_count = new_w * new_h if fill else 0 msg = f"size={expected_size}" mask = original_mask.scale(scale=expected_size) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual(mask.get_size(), expected_size) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count, msg) self.assertEqual(original_mask.get_size(), original_size, msg) def test_scale__negative_size(self): """Ensure scale handles negative sizes correctly.""" mask = pygame.Mask((100, 100)) with self.assertRaises(ValueError): mask.scale((-1, -1)) with self.assertRaises(ValueError): mask.scale(Vector2(-1, 10)) with self.assertRaises(ValueError): mask.scale((10, -1)) def test_draw(self): """Ensure a mask can be drawn onto another mask. Testing the different combinations of full/empty masks: (mask1-filled) 1 draw 1 (mask2-filled) (mask1-empty) 0 draw 1 (mask2-filled) (mask1-filled) 1 draw 0 (mask2-empty) (mask1-empty) 0 draw 0 (mask2-empty) """ expected_size = (4, 4) offset = (0, 0) expected_default = pygame.mask.Mask(expected_size, fill=True) expected_masks = {(False, False): pygame.mask.Mask(expected_size)} for fill2 in (True, False): mask2 = pygame.mask.Mask(expected_size, fill=fill2) mask2_count = mask2.count() for fill1 in (True, False): key = (fill1, fill2) msg = f"key={key}" mask1 = pygame.mask.Mask(expected_size, fill=fill1) expected_mask = expected_masks.get(key, expected_default) mask1.draw(mask2, offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask2.get_size(), expected_size, msg) def test_draw__offset(self): """Ensure an offset mask can be drawn onto another mask.""" mask1 = pygame.mask.Mask((65, 3)) mask2 = pygame.mask.Mask((66, 4), fill=True) mask2_count = mask2.count() mask2_size = mask2.get_size() expected_mask = pygame.Mask(mask1.get_size()) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.clear() # Normally draw() could be used to set these bits, but the draw() # method is being tested here, so a loop is used instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y)) mask1.clear() # Ensure it's empty for testing each offset. mask1.draw(other=mask2, offset=offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) def test_draw__specific_offsets(self): """Ensure an offset mask can be drawn onto another mask. Testing the specific case of: -both masks are wider than 32 bits -a positive offset is used -the mask calling draw() is wider than the mask passed in """ mask1 = pygame.mask.Mask((65, 5)) mask2 = pygame.mask.Mask((33, 3), fill=True) expected_mask = pygame.Mask(mask1.get_size()) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # This rect's corners are used to move rect2 around the inside of # rect1. corner_rect = rect1.inflate(-2, -2) for corner in ("topleft", "topright", "bottomright", "bottomleft"): setattr(rect2, corner, getattr(corner_rect, corner)) offset = rect2.topleft msg = f"offset={offset}" overlap_rect = rect1.clip(rect2) expected_mask.clear() # Normally draw() could be used to set these bits, but the draw() # method is being tested here, so a loop is used instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y)) mask1.clear() # Ensure it's empty for testing each offset. mask1.draw(mask2, offset) assertMaskEqual(self, mask1, expected_mask, msg) def test_draw__offset_boundary(self): """Ensures draw handles offsets and boundaries correctly.""" mask1 = pygame.mask.Mask((13, 5)) mask2 = pygame.mask.Mask((7, 3), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() # Check the 4 boundaries. offsets = ( (mask1_size[0], 0), # off right (0, mask1_size[1]), # off bottom (-mask2_size[0], 0), # off left (0, -mask2_size[1]), ) # off top for offset in offsets: msg = f"offset={offset}" mask1.draw(mask2, offset) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_draw__bit_boundaries(self): """Ensures draw handles masks of different sizes correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(2, 4): for width in range(2, 66): mask_size = (width, height) mask_count = width * height mask1 = pygame.mask.Mask(mask_size) mask2 = pygame.mask.Mask(mask_size, fill=True) expected_mask = pygame.Mask(mask_size) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # Testing masks offset from each other. for offset in self.ORIGIN_OFFSETS: msg = f"size={mask_size}, offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.clear() # Normally draw() could be used to set these bits, but the # draw() method is being tested here, so a loop is used # instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y)) mask1.clear() # Ensure it's empty for each test. mask1.draw(mask2, offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask_count, msg) self.assertEqual(mask2.get_size(), mask_size, msg) def test_draw__invalid_mask_arg(self): """Ensure draw handles invalid mask arguments correctly.""" size = (7, 3) offset = (0, 0) mask = pygame.mask.Mask(size) invalid_mask = pygame.Surface(size) with self.assertRaises(TypeError): mask.draw(invalid_mask, offset) def test_draw__invalid_offset_arg(self): """Ensure draw handles invalid offset arguments correctly.""" size = (5, 7) offset = "(0, 0)" mask1 = pygame.mask.Mask(size) mask2 = pygame.mask.Mask(size) with self.assertRaises(TypeError): mask1.draw(mask2, offset) def test_erase(self): """Ensure a mask can erase another mask. Testing the different combinations of full/empty masks: (mask1-filled) 1 erase 1 (mask2-filled) (mask1-empty) 0 erase 1 (mask2-filled) (mask1-filled) 1 erase 0 (mask2-empty) (mask1-empty) 0 erase 0 (mask2-empty) """ expected_size = (4, 4) offset = (0, 0) expected_default = pygame.mask.Mask(expected_size) expected_masks = {(True, False): pygame.mask.Mask(expected_size, fill=True)} for fill2 in (True, False): mask2 = pygame.mask.Mask(expected_size, fill=fill2) mask2_count = mask2.count() for fill1 in (True, False): key = (fill1, fill2) msg = f"key={key}" mask1 = pygame.mask.Mask(expected_size, fill=fill1) expected_mask = expected_masks.get(key, expected_default) mask1.erase(mask2, offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask2.get_size(), expected_size, msg) def test_erase__offset(self): """Ensure an offset mask can erase another mask.""" mask1 = pygame.mask.Mask((65, 3)) mask2 = pygame.mask.Mask((66, 4), fill=True) mask2_count = mask2.count() mask2_size = mask2.get_size() expected_mask = pygame.Mask(mask1.get_size()) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() for offset in self.ORIGIN_OFFSETS: msg = f"offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.fill() # Normally erase() could be used to clear these bits, but the # erase() method is being tested here, so a loop is used instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y), 0) mask1.fill() # Ensure it's filled for testing each offset. mask1.erase(other=mask2, offset=offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) def test_erase__specific_offsets(self): """Ensure an offset mask can erase another mask. Testing the specific case of: -both masks are wider than 32 bits -a positive offset is used -the mask calling erase() is wider than the mask passed in """ mask1 = pygame.mask.Mask((65, 5)) mask2 = pygame.mask.Mask((33, 3), fill=True) expected_mask = pygame.Mask(mask1.get_size()) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # This rect's corners are used to move rect2 around the inside of # rect1. corner_rect = rect1.inflate(-2, -2) for corner in ("topleft", "topright", "bottomright", "bottomleft"): setattr(rect2, corner, getattr(corner_rect, corner)) offset = rect2.topleft msg = f"offset={offset}" overlap_rect = rect1.clip(rect2) expected_mask.fill() # Normally erase() could be used to clear these bits, but the # erase() method is being tested here, so a loop is used instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y), 0) mask1.fill() # Ensure it's filled for testing each offset. mask1.erase(mask2, Vector2(offset)) assertMaskEqual(self, mask1, expected_mask, msg) def test_erase__offset_boundary(self): """Ensures erase handles offsets and boundaries correctly.""" mask1 = pygame.mask.Mask((7, 11), fill=True) mask2 = pygame.mask.Mask((3, 13), fill=True) mask1_count = mask1.count() mask2_count = mask2.count() mask1_size = mask1.get_size() mask2_size = mask2.get_size() # Check the 4 boundaries. offsets = ( (mask1_size[0], 0), # off right (0, mask1_size[1]), # off bottom (-mask2_size[0], 0), # off left (0, -mask2_size[1]), ) # off top for offset in offsets: msg = f"offset={offset}" mask1.erase(mask2, offset) # Ensure mask1/mask2 unchanged. self.assertEqual(mask1.count(), mask1_count, msg) self.assertEqual(mask2.count(), mask2_count, msg) self.assertEqual(mask1.get_size(), mask1_size, msg) self.assertEqual(mask2.get_size(), mask2_size, msg) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_erase__bit_boundaries(self): """Ensures erase handles masks of different sizes correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for height in range(2, 4): for width in range(2, 66): mask_size = (width, height) mask_count = width * height mask1 = pygame.mask.Mask(mask_size) mask2 = pygame.mask.Mask(mask_size, fill=True) expected_mask = pygame.Mask(mask_size) # Using rects to help determine the overlapping area. rect1 = mask1.get_rect() rect2 = mask2.get_rect() # Testing masks offset from each other. for offset in self.ORIGIN_OFFSETS: msg = f"size={mask_size}, offset={offset}" rect2.topleft = offset overlap_rect = rect1.clip(rect2) expected_mask.fill() # Normally erase() could be used to clear these bits, but # the erase() method is being tested here, so a loop is # used instead. for x in range(overlap_rect.left, overlap_rect.right): for y in range(overlap_rect.top, overlap_rect.bottom): expected_mask.set_at((x, y), 0) mask1.fill() # Ensure it's filled for each test. mask1.erase(mask2, offset) assertMaskEqual(self, mask1, expected_mask, msg) # Ensure mask2 unchanged. self.assertEqual(mask2.count(), mask_count, msg) self.assertEqual(mask2.get_size(), mask_size, msg) def test_erase__invalid_mask_arg(self): """Ensure erase handles invalid mask arguments correctly.""" size = (3, 7) offset = (0, 0) mask = pygame.mask.Mask(size) invalid_mask = pygame.Surface(size) with self.assertRaises(TypeError): mask.erase(invalid_mask, offset) def test_erase__invalid_offset_arg(self): """Ensure erase handles invalid offset arguments correctly.""" size = (7, 5) offset = "(0, 0)" mask1 = pygame.mask.Mask(size) mask2 = pygame.mask.Mask(size) with self.assertRaises(TypeError): mask1.erase(mask2, offset) def test_count(self): """Ensure a mask's set bits are correctly counted.""" side = 67 expected_size = (side, side) expected_count = 0 mask = pygame.mask.Mask(expected_size) for i in range(side): expected_count += 1 mask.set_at((i, i)) count = mask.count() self.assertEqual(count, expected_count) self.assertEqual(mask.get_size(), expected_size) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_count__bit_boundaries(self): """Ensures the set bits of different sized masks are counted correctly. Tests masks of different sizes, including: -masks 31 to 33 bits wide (32 bit boundaries) -masks 63 to 65 bits wide (64 bit boundaries) """ for fill in (True, False): for height in range(1, 4): for width in range(1, 66): mask = pygame.mask.Mask((width, height), fill=fill) expected_count = width * height if fill else 0 # Test toggling each bit. for pos in ((x, y) for y in range(height) for x in range(width)): if fill: mask.set_at(pos, 0) expected_count -= 1 else: mask.set_at(pos, 1) expected_count += 1 count = mask.count() self.assertEqual( count, expected_count, f"fill={fill}, size=({width}, {height}), pos={pos}", ) def test_count__full_mask(self): """Ensure a full mask's set bits are correctly counted.""" width, height = 17, 97 expected_size = (width, height) expected_count = width * height mask = pygame.mask.Mask(expected_size, fill=True) count = mask.count() self.assertEqual(count, expected_count) self.assertEqual(mask.get_size(), expected_size) def test_count__empty_mask(self): """Ensure an empty mask's set bits are correctly counted.""" expected_count = 0 expected_size = (13, 27) mask = pygame.mask.Mask(expected_size) count = mask.count() self.assertEqual(count, expected_count) self.assertEqual(mask.get_size(), expected_size) def test_centroid(self): """Ensure a filled mask's centroid is correctly calculated.""" mask = pygame.mask.Mask((5, 7), fill=True) expected_centroid = mask.get_rect().center centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__empty_mask(self): """Ensure an empty mask's centroid is correctly calculated.""" expected_centroid = (0, 0) expected_size = (101, 103) mask = pygame.mask.Mask(expected_size) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) self.assertEqual(mask.get_size(), expected_size) def test_centroid__single_row(self): """Ensure a mask's centroid is correctly calculated when setting points along a single row.""" width, height = (5, 7) mask = pygame.mask.Mask((width, height)) for y in range(height): mask.clear() # Clear for each row. for x in range(width): mask.set_at((x, y)) expected_centroid = (x // 2, y) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__two_rows(self): """Ensure a mask's centroid is correctly calculated when setting points along two rows.""" width, height = (5, 7) mask = pygame.mask.Mask((width, height)) # The first row is tested with each of the other rows. for y in range(1, height): mask.clear() # Clear for each set of rows. for x in range(width): mask.set_at((x, 0)) mask.set_at((x, y)) expected_centroid = (x // 2, y // 2) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__single_column(self): """Ensure a mask's centroid is correctly calculated when setting points along a single column.""" width, height = (5, 7) mask = pygame.mask.Mask((width, height)) for x in range(width): mask.clear() # Clear for each column. for y in range(height): mask.set_at((x, y)) expected_centroid = (x, y // 2) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__two_columns(self): """Ensure a mask's centroid is correctly calculated when setting points along two columns.""" width, height = (5, 7) mask = pygame.mask.Mask((width, height)) # The first column is tested with each of the other columns. for x in range(1, width): mask.clear() # Clear for each set of columns. for y in range(height): mask.set_at((0, y)) mask.set_at((x, y)) expected_centroid = (x // 2, y // 2) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__all_corners(self): """Ensure a mask's centroid is correctly calculated when its corners are set.""" mask = pygame.mask.Mask((5, 7)) expected_centroid = mask.get_rect().center for corner in corners(mask): mask.set_at(corner) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_centroid__two_corners(self): """Ensure a mask's centroid is correctly calculated when only two corners are set.""" mask = pygame.mask.Mask((5, 7)) mask_rect = mask.get_rect() mask_corners = corners(mask) for i, corner1 in enumerate(mask_corners): for corner2 in mask_corners[i + 1 :]: mask.clear() # Clear for each pair of corners. mask.set_at(corner1) mask.set_at(corner2) if corner1[0] == corner2[0]: expected_centroid = (corner1[0], abs(corner1[1] - corner2[1]) // 2) elif corner1[1] == corner2[1]: expected_centroid = (abs(corner1[0] - corner2[0]) // 2, corner1[1]) else: expected_centroid = mask_rect.center centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_angle(self): """Ensure a mask's orientation angle is correctly calculated.""" expected_angle = -45.0 expected_size = (100, 100) surface = pygame.Surface(expected_size) mask = pygame.mask.from_surface(surface) angle = mask.angle() # Returns the orientation of the pixels self.assertIsInstance(angle, float) self.assertEqual(angle, expected_angle) def test_angle__empty_mask(self): """Ensure an empty mask's angle is correctly calculated.""" expected_angle = 0.0 expected_size = (107, 43) mask = pygame.mask.Mask(expected_size) angle = mask.angle() self.assertIsInstance(angle, float) self.assertAlmostEqual(angle, expected_angle) self.assertEqual(mask.get_size(), expected_size) def test_drawing(self): """Test fill, clear, invert, draw, erase""" m = pygame.Mask((100, 100)) self.assertEqual(m.count(), 0) m.fill() self.assertEqual(m.count(), 10000) m2 = pygame.Mask((10, 10), fill=True) m.erase(m2, (50, 50)) self.assertEqual(m.count(), 9900) m.invert() self.assertEqual(m.count(), 100) m.draw(m2, (0, 0)) self.assertEqual(m.count(), 200) m.clear() self.assertEqual(m.count(), 0) def test_outline(self): """ """ m = pygame.Mask((20, 20)) self.assertEqual(m.outline(), []) m.set_at((10, 10), 1) self.assertEqual(m.outline(), [(10, 10)]) m.set_at((10, 12), 1) self.assertEqual(m.outline(10), [(10, 10)]) m.set_at((11, 11), 1) self.assertEqual( m.outline(), [(10, 10), (11, 11), (10, 12), (11, 11), (10, 10)] ) self.assertEqual(m.outline(every=2), [(10, 10), (10, 12), (10, 10)]) # TODO: Test more corner case outlines. def test_convolve__size(self): sizes = [(1, 1), (31, 31), (32, 32), (100, 100)] for s1 in sizes: m1 = pygame.Mask(s1) for s2 in sizes: m2 = pygame.Mask(s2) o = m1.convolve(m2) self.assertIsInstance(o, pygame.mask.Mask) for i in (0, 1): self.assertEqual( o.get_size()[i], m1.get_size()[i] + m2.get_size()[i] - 1 ) def test_convolve__point_identities(self): """Convolving with a single point is the identity, while convolving a point with something flips it.""" m = random_mask((100, 100)) k = pygame.Mask((1, 1)) k.set_at((0, 0)) convolve_mask = m.convolve(k) self.assertIsInstance(convolve_mask, pygame.mask.Mask) assertMaskEqual(self, m, convolve_mask) convolve_mask = k.convolve(k.convolve(m)) self.assertIsInstance(convolve_mask, pygame.mask.Mask) assertMaskEqual(self, m, convolve_mask) def test_convolve__with_output(self): """checks that convolution modifies only the correct portion of the output""" m = random_mask((10, 10)) k = pygame.Mask((2, 2)) k.set_at((0, 0)) o = pygame.Mask((50, 50)) test = pygame.Mask((50, 50)) m.convolve(k, o) test.draw(m, (1, 1)) self.assertIsInstance(o, pygame.mask.Mask) assertMaskEqual(self, o, test) o.clear() test.clear() m.convolve(other=k, output=o, offset=Vector2(10, 10)) test.draw(m, (11, 11)) self.assertIsInstance(o, pygame.mask.Mask) assertMaskEqual(self, o, test) def test_convolve__out_of_range(self): full = pygame.Mask((2, 2), fill=True) # Tuple of points (out of range) and the expected count for each. pts_data = (((0, 3), 0), ((0, 2), 3), ((-2, -2), 1), ((-3, -3), 0)) for pt, expected_count in pts_data: convolve_mask = full.convolve(full, None, pt) self.assertIsInstance(convolve_mask, pygame.mask.Mask) self.assertEqual(convolve_mask.count(), expected_count) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_convolve(self): """Tests the definition of convolution""" m1 = random_mask((100, 100)) m2 = random_mask((100, 100)) conv = m1.convolve(m2) self.assertIsInstance(conv, pygame.mask.Mask) for i in range(conv.get_size()[0]): for j in range(conv.get_size()[1]): self.assertEqual( conv.get_at((i, j)) == 0, m1.overlap(m2, (i - 99, j - 99)) is None ) def _draw_component_pattern_box(self, mask, size, pos, inverse=False): # Helper method to create/draw a 'box' pattern for testing. # # 111 # 101 3x3 example pattern # 111 pattern = pygame.mask.Mask((size, size), fill=True) pattern.set_at((size // 2, size // 2), 0) if inverse: mask.erase(pattern, pos) pattern.invert() else: mask.draw(pattern, pos) return pattern def _draw_component_pattern_x(self, mask, size, pos, inverse=False): # Helper method to create/draw an 'X' pattern for testing. # # 101 # 010 3x3 example pattern # 101 pattern = pygame.mask.Mask((size, size)) ymax = size - 1 for y in range(size): for x in range(size): if x in [y, ymax - y]: pattern.set_at((x, y)) if inverse: mask.erase(pattern, pos) pattern.invert() else: mask.draw(pattern, pos) return pattern def _draw_component_pattern_plus(self, mask, size, pos, inverse=False): # Helper method to create/draw a '+' pattern for testing. # # 010 # 111 3x3 example pattern # 010 pattern = pygame.mask.Mask((size, size)) xmid = ymid = size // 2 for y in range(size): for x in range(size): if x == xmid or y == ymid: pattern.set_at((x, y)) if inverse: mask.erase(pattern, pos) pattern.invert() else: mask.draw(pattern, pos) return pattern def test_connected_component(self): """Ensure a mask's connected component is correctly calculated.""" width, height = 41, 27 expected_size = (width, height) original_mask = pygame.mask.Mask(expected_size) patterns = [] # Patterns and offsets. # Draw some connected patterns on the original mask. offset = (0, 0) pattern = self._draw_component_pattern_x(original_mask, 3, offset) patterns.append((pattern, offset)) size = 4 offset = (width - size, 0) pattern = self._draw_component_pattern_plus(original_mask, size, offset) patterns.append((pattern, offset)) # Make this one the largest connected component. offset = (width // 2, height // 2) pattern = self._draw_component_pattern_box(original_mask, 7, offset) patterns.append((pattern, offset)) expected_pattern, expected_offset = patterns[-1] expected_count = expected_pattern.count() original_count = sum(p.count() for p, _ in patterns) mask = original_mask.connected_component() self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) self.assertEqual( mask.overlap_area(expected_pattern, expected_offset), expected_count ) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count) self.assertEqual(original_mask.get_size(), expected_size) for pattern, offset in patterns: self.assertEqual( original_mask.overlap_area(pattern, offset), pattern.count() ) def test_connected_component__full_mask(self): """Ensure a mask's connected component is correctly calculated when the mask is full. """ expected_size = (23, 31) original_mask = pygame.mask.Mask(expected_size, fill=True) expected_count = original_mask.count() mask = original_mask.connected_component() self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), expected_count) self.assertEqual(original_mask.get_size(), expected_size) def test_connected_component__empty_mask(self): """Ensure a mask's connected component is correctly calculated when the mask is empty. """ expected_size = (37, 43) original_mask = pygame.mask.Mask(expected_size) original_count = original_mask.count() expected_count = 0 mask = original_mask.connected_component() self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count) self.assertEqual(original_mask.get_size(), expected_size) def test_connected_component__one_set_bit(self): """Ensure a mask's connected component is correctly calculated when the coordinate's bit is set with a connected component of 1 bit. """ width, height = 71, 67 expected_size = (width, height) original_mask = pygame.mask.Mask(expected_size, fill=True) xset, yset = width // 2, height // 2 set_pos = (xset, yset) expected_offset = (xset - 1, yset - 1) # This isolates the bit at set_pos from all the other bits. expected_pattern = self._draw_component_pattern_box( original_mask, 3, expected_offset, inverse=True ) expected_count = 1 original_count = original_mask.count() mask = original_mask.connected_component(set_pos) self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) self.assertEqual( mask.overlap_area(expected_pattern, expected_offset), expected_count ) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count) self.assertEqual(original_mask.get_size(), expected_size) self.assertEqual( original_mask.overlap_area(expected_pattern, expected_offset), expected_count, ) def test_connected_component__multi_set_bits(self): """Ensure a mask's connected component is correctly calculated when the coordinate's bit is set with a connected component of > 1 bit. """ expected_size = (113, 67) original_mask = pygame.mask.Mask(expected_size) p_width, p_height = 11, 13 set_pos = xset, yset = 11, 21 expected_offset = (xset - 1, yset - 1) expected_pattern = pygame.mask.Mask((p_width, p_height), fill=True) # Make an unsymmetrical pattern. All the set bits need to be connected # in the resulting pattern for this to work properly. for y in range(3, p_height): for x in range(1, p_width): if x in [y, y - 3, p_width - 4]: expected_pattern.set_at((x, y), 0) expected_count = expected_pattern.count() original_mask.draw(expected_pattern, expected_offset) mask = original_mask.connected_component(set_pos) self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) self.assertEqual( mask.overlap_area(expected_pattern, expected_offset), expected_count ) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), expected_count) self.assertEqual(original_mask.get_size(), expected_size) self.assertEqual( original_mask.overlap_area(expected_pattern, expected_offset), expected_count, ) def test_connected_component__unset_bit(self): """Ensure a mask's connected component is correctly calculated when the coordinate's bit is unset. """ width, height = 109, 101 expected_size = (width, height) original_mask = pygame.mask.Mask(expected_size, fill=True) unset_pos = (width // 2, height // 2) original_mask.set_at(unset_pos, 0) original_count = original_mask.count() expected_count = 0 mask = original_mask.connected_component(unset_pos) self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), expected_count) self.assertEqual(mask.get_size(), expected_size) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count) self.assertEqual(original_mask.get_size(), expected_size) self.assertEqual(original_mask.get_at(unset_pos), 0) def test_connected_component__out_of_bounds(self): """Ensure connected_component() checks bounds.""" width, height = 19, 11 original_size = (width, height) original_mask = pygame.mask.Mask(original_size, fill=True) original_count = original_mask.count() for pos in ((0, -1), (-1, 0), (0, height + 1), (width + 1, 0)): with self.assertRaises(IndexError): mask = original_mask.connected_component(pos) # Ensure the original mask is unchanged. self.assertEqual(original_mask.count(), original_count) self.assertEqual(original_mask.get_size(), original_size) def test_connected_components(self): """ """ m = pygame.Mask((10, 10)) self.assertListEqual(m.connected_components(), []) comp = m.connected_component() self.assertEqual(m.count(), comp.count()) m.set_at((0, 0), 1) m.set_at((1, 1), 1) comp = m.connected_component() comps = m.connected_components() comps1 = m.connected_components(1) comps2 = m.connected_components(2) comps3 = m.connected_components(3) self.assertEqual(comp.count(), comps[0].count()) self.assertEqual(comps1[0].count(), 2) self.assertEqual(comps2[0].count(), 2) self.assertListEqual(comps3, []) m.set_at((9, 9), 1) comp = m.connected_component() comp1 = m.connected_component((1, 1)) comp2 = m.connected_component((2, 2)) comps = m.connected_components() comps1 = m.connected_components(1) comps2 = m.connected_components(minimum=2) comps3 = m.connected_components(3) self.assertEqual(comp.count(), 2) self.assertEqual(comp1.count(), 2) self.assertEqual(comp2.count(), 0) self.assertEqual(len(comps), 2) self.assertEqual(len(comps1), 2) self.assertEqual(len(comps2), 1) self.assertEqual(len(comps3), 0) for mask in comps: self.assertIsInstance(mask, pygame.mask.Mask) def test_connected_components__negative_min_with_empty_mask(self): """Ensures connected_components() properly handles negative min values when the mask is empty. Negative and zero values for the min parameter (minimum number of bits per connected component) equate to setting it to one. """ expected_comps = [] mask_count = 0 mask_size = (65, 13) mask = pygame.mask.Mask(mask_size) connected_comps = mask.connected_components(-1) self.assertListEqual(connected_comps, expected_comps) # Ensure the original mask is unchanged. self.assertEqual(mask.count(), mask_count) self.assertEqual(mask.get_size(), mask_size) def test_connected_components__negative_min_with_full_mask(self): """Ensures connected_components() properly handles negative min values when the mask is full. Negative and zero values for the min parameter (minimum number of bits per connected component) equate to setting it to one. """ mask_size = (64, 11) mask = pygame.mask.Mask(mask_size, fill=True) mask_count = mask.count() expected_len = 1 connected_comps = mask.connected_components(-2) self.assertEqual(len(connected_comps), expected_len) assertMaskEqual(self, connected_comps[0], mask) # Ensure the original mask is unchanged. self.assertEqual(mask.count(), mask_count) self.assertEqual(mask.get_size(), mask_size) def test_connected_components__negative_min_with_some_bits_set(self): """Ensures connected_components() properly handles negative min values when the mask has some bits set. Negative and zero values for the min parameter (minimum number of bits per connected component) equate to setting it to one. """ mask_size = (64, 12) mask = pygame.mask.Mask(mask_size) expected_comps = {} # Set the corners and the center positions. A new expected component # mask is created for each point. for corner in corners(mask): mask.set_at(corner) new_mask = pygame.mask.Mask(mask_size) new_mask.set_at(corner) expected_comps[corner] = new_mask center = (mask_size[0] // 2, mask_size[1] // 2) mask.set_at(center) new_mask = pygame.mask.Mask(mask_size) new_mask.set_at(center) expected_comps[center] = new_mask mask_count = mask.count() connected_comps = mask.connected_components(-3) self.assertEqual(len(connected_comps), len(expected_comps)) for comp in connected_comps: # Since the masks in the connected component list can be in any # order, loop the expected components to find its match. found = False for pt in tuple(expected_comps.keys()): if comp.get_at(pt): found = True assertMaskEqual(self, comp, expected_comps[pt]) del expected_comps[pt] # Entry removed so it isn't reused. break self.assertTrue(found, f"missing component for pt={pt}") # Ensure the original mask is unchanged. self.assertEqual(mask.count(), mask_count) self.assertEqual(mask.get_size(), mask_size) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_get_bounding_rects(self): """Ensures get_bounding_rects works correctly.""" # Create masks with different set point groups. Each group of # connected set points will be contained in its own bounding rect. # Diagonal points are considered connected. mask_data = [] # [((size), ((rect1_pts), ...)), ...] # Mask 1: # |0123456789 # -+---------- # 0|1100000000 # 1|1000000000 # 2|0000000000 # 3|1001000000 # 4|0000000000 # 5|0000000000 # 6|0000000000 # 7|0000000000 # 8|0000000000 # 9|0000000000 mask_data.append( ( (10, 10), # size # Points to set for the 3 bounding rects. (((0, 0), (1, 0), (0, 1)), ((0, 3),), ((3, 3),)), # rect1 # rect2 ) ) # rect3 # Mask 2: # |0123 # -+---- # 0|1100 # 1|1111 mask_data.append( ( (4, 2), # size # Points to set for the 1 bounding rect. (((0, 0), (1, 0), (0, 1), (1, 1), (2, 1), (3, 1)),), ) ) # Mask 3: # |01234 # -+----- # 0|00100 # 1|01110 # 2|00100 mask_data.append( ( (5, 3), # size # Points to set for the 1 bounding rect. (((2, 0), (1, 1), (2, 1), (3, 1), (2, 2)),), ) ) # Mask 4: # |01234 # -+----- # 0|00010 # 1|00100 # 2|01000 mask_data.append( ( (5, 3), # size # Points to set for the 1 bounding rect. (((3, 0), (2, 1), (1, 2)),), ) ) # Mask 5: # |01234 # -+----- # 0|00011 # 1|11111 mask_data.append( ( (5, 2), # size # Points to set for the 1 bounding rect. (((3, 0), (4, 0), (0, 1), (1, 1), (2, 1), (3, 1)),), ) ) # Mask 6: # |01234 # -+----- # 0|10001 # 1|00100 # 2|10001 mask_data.append( ( (5, 3), # size # Points to set for the 5 bounding rects. ( ((0, 0),), # rect1 ((4, 0),), # rect2 ((2, 1),), # rect3 ((0, 2),), # rect4 ((4, 2),), ), ) ) # rect5 for size, rect_point_tuples in mask_data: rects = [] mask = pygame.Mask(size) for rect_points in rect_point_tuples: rects.append(create_bounding_rect(rect_points)) for pt in rect_points: mask.set_at(pt) expected_rects = sorted(rects, key=tuple) rects = mask.get_bounding_rects() self.assertListEqual( sorted(mask.get_bounding_rects(), key=tuple), expected_rects, f"size={size}", ) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface(self): """Ensures empty and full masks can be drawn onto surfaces.""" expected_ref_count = 3 size = (33, 65) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") test_fills = ((pygame.Color("white"), True), (pygame.Color("black"), False)) for expected_color, fill in test_fills: surface.fill(surface_color) mask = pygame.mask.Mask(size, fill=fill) to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__create_surface(self): """Ensures empty and full masks can be drawn onto a created surface.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 size = (33, 65) test_fills = ((pygame.Color("white"), True), (pygame.Color("black"), False)) for expected_color, fill in test_fills: mask = pygame.mask.Mask(size, fill=fill) for use_arg in (True, False): if use_arg: to_surface = mask.to_surface(None) else: to_surface = mask.to_surface() self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__surface_param(self): """Ensures to_surface accepts a surface arg/kwarg.""" expected_ref_count = 4 expected_color = pygame.Color("white") surface_color = pygame.Color("red") size = (5, 3) mask = pygame.mask.Mask(size, fill=True) surface = pygame.Surface(size) kwargs = {"surface": surface} for use_kwargs in (True, False): surface.fill(surface_color) if use_kwargs: to_surface = mask.to_surface(**kwargs) else: to_surface = mask.to_surface(kwargs["surface"]) self.assertIs(to_surface, surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setsurface_param(self): """Ensures to_surface accepts a setsurface arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") size = (5, 3) mask = pygame.mask.Mask(size, fill=True) setsurface = pygame.Surface(size, expected_flag, expected_depth) setsurface.fill(expected_color) kwargs = {"setsurface": setsurface} for use_kwargs in (True, False): if use_kwargs: to_surface = mask.to_surface(**kwargs) else: to_surface = mask.to_surface(None, kwargs["setsurface"]) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetsurface_param(self): """Ensures to_surface accepts a unsetsurface arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") size = (5, 3) mask = pygame.mask.Mask(size) unsetsurface = pygame.Surface(size, expected_flag, expected_depth) unsetsurface.fill(expected_color) kwargs = {"unsetsurface": unsetsurface} for use_kwargs in (True, False): if use_kwargs: to_surface = mask.to_surface(**kwargs) else: to_surface = mask.to_surface(None, None, kwargs["unsetsurface"]) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setcolor_param(self): """Ensures to_surface accepts a setcolor arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") size = (5, 3) mask = pygame.mask.Mask(size, fill=True) kwargs = {"setcolor": expected_color} for use_kwargs in (True, False): if use_kwargs: to_surface = mask.to_surface(**kwargs) else: to_surface = mask.to_surface(None, None, None, kwargs["setcolor"]) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setcolor_default(self): """Ensures the default setcolor is correct.""" expected_color = pygame.Color("white") size = (3, 7) mask = pygame.mask.Mask(size, fill=True) to_surface = mask.to_surface( surface=None, setsurface=None, unsetsurface=None, unsetcolor=None ) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetcolor_param(self): """Ensures to_surface accepts a unsetcolor arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") size = (5, 3) mask = pygame.mask.Mask(size) kwargs = {"unsetcolor": expected_color} for use_kwargs in (True, False): if use_kwargs: to_surface = mask.to_surface(**kwargs) else: to_surface = mask.to_surface( None, None, None, None, kwargs["unsetcolor"] ) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetcolor_default(self): """Ensures the default unsetcolor is correct.""" expected_color = pygame.Color("black") size = (3, 7) mask = pygame.mask.Mask(size) to_surface = mask.to_surface( surface=None, setsurface=None, unsetsurface=None, setcolor=None ) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__dest_param(self): """Ensures to_surface accepts a dest arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 default_surface_color = (0, 0, 0, 0) default_unsetcolor = pygame.Color("black") dest = (0, 0) size = (5, 3) mask = pygame.mask.Mask(size) kwargs = {"dest": dest} for use_kwargs in (True, False): if use_kwargs: expected_color = default_unsetcolor to_surface = mask.to_surface(**kwargs) else: expected_color = default_surface_color to_surface = mask.to_surface( None, None, None, None, None, kwargs["dest"] ) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__dest_default(self): """Ensures the default dest is correct.""" expected_color = pygame.Color("white") surface_color = pygame.Color("red") mask_size = (3, 2) mask = pygame.mask.Mask(mask_size, fill=True) mask_rect = mask.get_rect() # Make the surface bigger than the mask. surf_size = (mask_size[0] + 2, mask_size[1] + 1) surface = pygame.Surface(surf_size, SRCALPHA, 32) surface.fill(surface_color) to_surface = mask.to_surface( surface, setsurface=None, unsetsurface=None, unsetcolor=None ) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), surf_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) @unittest.expectedFailure def test_to_surface__area_param(self): """Ensures to_surface accepts an area arg/kwarg.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 default_surface_color = (0, 0, 0, 0) default_unsetcolor = pygame.Color("black") size = (5, 3) mask = pygame.mask.Mask(size) kwargs = {"area": mask.get_rect()} for use_kwargs in (True, False): if use_kwargs: expected_color = default_unsetcolor to_surface = mask.to_surface(**kwargs) else: expected_color = default_surface_color to_surface = mask.to_surface( None, None, None, None, None, (0, 0), kwargs["area"] ) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__area_default(self): """Ensures the default area is correct.""" expected_color = pygame.Color("white") surface_color = pygame.Color("red") mask_size = (3, 2) mask = pygame.mask.Mask(mask_size, fill=True) mask_rect = mask.get_rect() # Make the surface bigger than the mask. The default area is the full # area of the mask. surf_size = (mask_size[0] + 2, mask_size[1] + 1) surface = pygame.Surface(surf_size, SRCALPHA, 32) surface.fill(surface_color) to_surface = mask.to_surface( surface, setsurface=None, unsetsurface=None, unsetcolor=None ) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), surf_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__kwargs(self): """Ensures to_surface accepts the correct kwargs.""" expected_color = pygame.Color("white") size = (5, 3) mask = pygame.mask.Mask(size, fill=True) surface = pygame.Surface(size) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface.fill(expected_color) test_data = ( (None, None), # None entry allows loop to test all kwargs on first pass. ("dest", (0, 0)), ("unsetcolor", pygame.Color("yellow")), ("setcolor", expected_color), ("unsetsurface", surface.copy()), ("setsurface", setsurface), ("surface", surface), ) kwargs = dict(test_data) for name, _ in test_data: kwargs.pop(name) surface.fill(surface_color) # Clear for each test. to_surface = mask.to_surface(**kwargs) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__kwargs_create_surface(self): """Ensures to_surface accepts the correct kwargs when creating a surface. """ expected_color = pygame.Color("black") size = (5, 3) mask = pygame.mask.Mask(size) setsurface = pygame.Surface(size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) unsetsurface = setsurface.copy() unsetsurface.fill(expected_color) test_data = ( (None, None), # None entry allows loop to test all kwargs on first pass. ("dest", (0, 0)), ("unsetcolor", expected_color), ("setcolor", pygame.Color("yellow")), ("unsetsurface", unsetsurface), ("setsurface", setsurface), ("surface", None), ) kwargs = dict(test_data) for name, _ in test_data: kwargs.pop(name) to_surface = mask.to_surface(**kwargs) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__kwargs_order_independent(self): """Ensures to_surface kwargs are not order dependent.""" expected_color = pygame.Color("blue") size = (3, 2) mask = pygame.mask.Mask(size, fill=True) surface = pygame.Surface(size) to_surface = mask.to_surface( dest=(0, 0), setcolor=expected_color, unsetcolor=None, surface=surface, unsetsurface=pygame.Surface(size), setsurface=None, ) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__args_invalid_types(self): """Ensures to_surface detects invalid kwarg types.""" size = (3, 2) mask = pygame.mask.Mask(size, fill=True) invalid_surf = pygame.Color("green") invalid_color = pygame.Surface(size) with self.assertRaises(TypeError): # Invalid dest. mask.to_surface(None, None, None, None, None, (0,)) with self.assertRaises(TypeError): # Invalid unsetcolor. mask.to_surface(None, None, None, None, invalid_color) with self.assertRaises(TypeError): # Invalid setcolor. mask.to_surface(None, None, None, invalid_color, None) with self.assertRaises(TypeError): # Invalid unsetsurface. mask.to_surface(None, None, invalid_surf, None, None) with self.assertRaises(TypeError): # Invalid setsurface. mask.to_surface(None, invalid_surf, None, None, None) with self.assertRaises(TypeError): # Invalid surface. mask.to_surface(invalid_surf, None, None, None, None) def test_to_surface__kwargs_invalid_types(self): """Ensures to_surface detects invalid kwarg types.""" size = (3, 2) mask = pygame.mask.Mask(size) valid_kwargs = { "surface": pygame.Surface(size), "setsurface": pygame.Surface(size), "unsetsurface": pygame.Surface(size), "setcolor": pygame.Color("green"), "unsetcolor": pygame.Color("green"), "dest": (0, 0), } invalid_kwargs = { "surface": (1, 2, 3, 4), "setsurface": pygame.Color("green"), "unsetsurface": ((1, 2), (2, 1)), "setcolor": pygame.Mask((1, 2)), "unsetcolor": pygame.Surface((2, 2)), "dest": (0, 0, 0), } kwarg_order = ( "surface", "setsurface", "unsetsurface", "setcolor", "unsetcolor", "dest", ) for kwarg in kwarg_order: kwargs = dict(valid_kwargs) kwargs[kwarg] = invalid_kwargs[kwarg] with self.assertRaises(TypeError): mask.to_surface(**kwargs) def test_to_surface__kwargs_invalid_name(self): """Ensures to_surface detects invalid kwarg names.""" mask = pygame.mask.Mask((3, 2)) kwargs = {"setcolour": pygame.Color("red")} with self.assertRaises(TypeError): mask.to_surface(**kwargs) def test_to_surface__args_and_kwargs(self): """Ensures to_surface accepts a combination of args/kwargs""" size = (5, 3) surface_color = pygame.Color("red") setsurface_color = pygame.Color("yellow") unsetsurface_color = pygame.Color("blue") setcolor = pygame.Color("green") unsetcolor = pygame.Color("cyan") surface = pygame.Surface(size, SRCALPHA, 32) setsurface = surface.copy() unsetsurface = surface.copy() setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) mask = pygame.mask.Mask(size, fill=True) expected_color = setsurface_color test_data = ( (None, None), # None entry allows loop to test all kwargs on first pass. ("surface", surface), ("setsurface", setsurface), ("unsetsurface", unsetsurface), ("setcolor", setcolor), ("unsetcolor", unsetcolor), ("dest", (0, 0)), ) args = [] kwargs = dict(test_data) # Loop gradually moves the kwargs to args. for name, value in test_data: if name is not None: args.append(value) kwargs.pop(name) surface.fill(surface_color) to_surface = mask.to_surface(*args, **kwargs) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__valid_setcolor_formats(self): """Ensures to_surface handles valid setcolor formats correctly.""" size = (5, 3) mask = pygame.mask.Mask(size, fill=True) surface = pygame.Surface(size, SRCALPHA, 32) expected_color = pygame.Color("green") test_colors = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(expected_color), expected_color, "green", "#00FF00FF", "0x00FF00FF", ) for setcolor in test_colors: to_surface = mask.to_surface(setcolor=setcolor) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__valid_unsetcolor_formats(self): """Ensures to_surface handles valid unsetcolor formats correctly.""" size = (5, 3) mask = pygame.mask.Mask(size) surface = pygame.Surface(size, SRCALPHA, 32) expected_color = pygame.Color("green") test_colors = ( (0, 255, 0), (0, 255, 0, 255), surface.map_rgb(expected_color), expected_color, "green", "#00FF00FF", "0x00FF00FF", ) for unsetcolor in test_colors: to_surface = mask.to_surface(unsetcolor=unsetcolor) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__invalid_setcolor_formats(self): """Ensures to_surface handles invalid setcolor formats correctly.""" mask = pygame.mask.Mask((5, 3)) for setcolor in ("green color", "#00FF00FF0", "0x00FF00FF0", (1, 2)): with self.assertRaises(ValueError): mask.to_surface(setcolor=setcolor) for setcolor in (pygame.Surface((1, 2)), pygame.Mask((2, 1)), 1.1): with self.assertRaises(TypeError): mask.to_surface(setcolor=setcolor) def test_to_surface__invalid_unsetcolor_formats(self): """Ensures to_surface handles invalid unsetcolor formats correctly.""" mask = pygame.mask.Mask((5, 3)) for unsetcolor in ("green color", "#00FF00FF0", "0x00FF00FF0", (1, 2)): with self.assertRaises(ValueError): mask.to_surface(unsetcolor=unsetcolor) for unsetcolor in (pygame.Surface((1, 2)), pygame.Mask((2, 1)), 1.1): with self.assertRaises(TypeError): mask.to_surface(unsetcolor=unsetcolor) def test_to_surface__valid_dest_formats(self): """Ensures to_surface handles valid dest formats correctly.""" expected_color = pygame.Color("white") mask = pygame.mask.Mask((3, 5), fill=True) dests = ( (0, 0), [0, 0], Vector2(0, 0), (0, 0, 100, 100), pygame.Rect((0, 0), (10, 10)), ) for dest in dests: to_surface = mask.to_surface(dest=dest) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__invalid_dest_formats(self): """Ensures to_surface handles invalid dest formats correctly.""" mask = pygame.mask.Mask((3, 5)) invalid_dests = ( (0,), # Incorrect size. (0, 0, 0), # Incorrect size. {0, 1}, # Incorrect type. {0: 1}, # Incorrect type. Rect, ) # Incorrect type. for dest in invalid_dests: with self.assertRaises(TypeError): mask.to_surface(dest=dest) def test_to_surface__negative_sized_dest_rect(self): """Ensures to_surface correctly handles negative sized dest rects.""" expected_color = pygame.Color("white") mask = pygame.mask.Mask((3, 5), fill=True) dests = ( pygame.Rect((0, 0), (10, -10)), pygame.Rect((0, 0), (-10, 10)), pygame.Rect((0, 0), (-10, -10)), ) for dest in dests: to_surface = mask.to_surface(dest=dest) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__zero_sized_dest_rect(self): """Ensures to_surface correctly handles zero sized dest rects.""" expected_color = pygame.Color("white") mask = pygame.mask.Mask((3, 5), fill=True) dests = ( pygame.Rect((0, 0), (0, 10)), pygame.Rect((0, 0), (10, 0)), pygame.Rect((0, 0), (0, 0)), ) for dest in dests: to_surface = mask.to_surface(dest=dest) assertSurfaceFilled(self, to_surface, expected_color) @unittest.expectedFailure def test_to_surface__valid_area_formats(self): """Ensures to_surface handles valid area formats correctly.""" size = (3, 5) surface_color = pygame.Color("red") expected_color = pygame.Color("white") surface = pygame.Surface(size) mask = pygame.mask.Mask(size, fill=True) area_pos = (0, 0) area_size = (2, 1) areas = ( (area_pos[0], area_pos[1], area_size[0], area_size[1]), (area_pos, area_size), (area_pos, list(area_size)), (list(area_pos), area_size), (list(area_pos), list(area_size)), [area_pos[0], area_pos[1], area_size[0], area_size[1]], [area_pos, area_size], [area_pos, list(area_size)], [list(area_pos), area_size], [list(area_pos), list(area_size)], pygame.Rect(area_pos, area_size), ) for area in areas: surface.fill(surface_color) area_rect = pygame.Rect(area) to_surface = mask.to_surface(surface, area=area) assertSurfaceFilled(self, to_surface, expected_color, area_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, area_rect) @unittest.expectedFailure def test_to_surface__invalid_area_formats(self): """Ensures to_surface handles invalid area formats correctly.""" mask = pygame.mask.Mask((3, 5)) invalid_areas = ( (0,), # Incorrect size. (0, 0), # Incorrect size. (0, 0, 1), # Incorrect size. ((0, 0), (1,)), # Incorrect size. ((0,), (1, 1)), # Incorrect size. {0, 1, 2, 3}, # Incorrect type. {0: 1, 2: 3}, # Incorrect type. Rect, # Incorrect type. ) for area in invalid_areas: with self.assertRaisesRegex(TypeError, "invalid area argument"): unused_to_surface = mask.to_surface(area=area) @unittest.expectedFailure def test_to_surface__negative_sized_area_rect(self): """Ensures to_surface correctly handles negative sized area rects.""" size = (3, 5) surface_color = pygame.Color("red") expected_color = pygame.Color("white") surface = pygame.Surface(size) mask = pygame.mask.Mask(size) mask.set_at((0, 0)) # These rects should cause position (0, 0) of the mask to be drawn. areas = ( pygame.Rect((0, 1), (1, -1)), pygame.Rect((1, 0), (-1, 1)), pygame.Rect((1, 1), (-1, -1)), ) for area in areas: surface.fill(surface_color) to_surface = mask.to_surface(surface, area=area) assertSurfaceFilled(self, to_surface, expected_color, area) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, area) @unittest.expectedFailure def test_to_surface__zero_sized_area_rect(self): """Ensures to_surface correctly handles zero sized area rects.""" size = (3, 5) expected_color = pygame.Color("red") surface = pygame.Surface(size) mask = pygame.mask.Mask(size, fill=True) # Zero sized rect areas should cause none of the mask to be drawn. areas = ( pygame.Rect((0, 0), (0, 1)), pygame.Rect((0, 0), (1, 0)), pygame.Rect((0, 0), (0, 0)), ) for area in areas: surface.fill(expected_color) to_surface = mask.to_surface(surface, area=area) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__default_surface_with_param_combinations(self): """Ensures to_surface works with a default surface value and combinations of other parameters. This tests many different parameter combinations with full and empty masks. """ expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 size = (5, 3) dest = (0, 0) default_surface_color = (0, 0, 0, 0) setsurface_color = pygame.Color("yellow") unsetsurface_color = pygame.Color("blue") setcolor = pygame.Color("green") unsetcolor = pygame.Color("cyan") setsurface = pygame.Surface(size, expected_flag, expected_depth) unsetsurface = setsurface.copy() setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) kwargs = { "setsurface": None, "unsetsurface": None, "setcolor": None, "unsetcolor": None, "dest": None, } for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) # Test different combinations of parameters. for setsurface_param in (setsurface, None): kwargs["setsurface"] = setsurface_param for unsetsurface_param in (unsetsurface, None): kwargs["unsetsurface"] = unsetsurface_param for setcolor_param in (setcolor, None): kwargs["setcolor"] = setcolor_param for unsetcolor_param in (unsetcolor, None): kwargs["unsetcolor"] = unsetcolor_param for dest_param in (dest, None): if dest_param is None: kwargs.pop("dest", None) else: kwargs["dest"] = dest_param if fill: if setsurface_param is not None: expected_color = setsurface_color elif setcolor_param is not None: expected_color = setcolor else: expected_color = default_surface_color else: if unsetsurface_param is not None: expected_color = unsetsurface_color elif unsetcolor_param is not None: expected_color = unsetcolor else: expected_color = default_surface_color to_surface = mask.to_surface(**kwargs) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual( sys.getrefcount(to_surface), expected_ref_count ) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual( to_surface.get_bitsize(), expected_depth ) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__surface_with_param_combinations(self): """Ensures to_surface works with a surface value and combinations of other parameters. This tests many different parameter combinations with full and empty masks. """ expected_ref_count = 4 expected_flag = SRCALPHA expected_depth = 32 size = (5, 3) dest = (0, 0) surface_color = pygame.Color("red") setsurface_color = pygame.Color("yellow") unsetsurface_color = pygame.Color("blue") setcolor = pygame.Color("green") unsetcolor = pygame.Color("cyan") surface = pygame.Surface(size, expected_flag, expected_depth) setsurface = surface.copy() unsetsurface = surface.copy() setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) kwargs = { "surface": surface, "setsurface": None, "unsetsurface": None, "setcolor": None, "unsetcolor": None, "dest": None, } for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) # Test different combinations of parameters. for setsurface_param in (setsurface, None): kwargs["setsurface"] = setsurface_param for unsetsurface_param in (unsetsurface, None): kwargs["unsetsurface"] = unsetsurface_param for setcolor_param in (setcolor, None): kwargs["setcolor"] = setcolor_param for unsetcolor_param in (unsetcolor, None): kwargs["unsetcolor"] = unsetcolor_param surface.fill(surface_color) # Clear for each test. for dest_param in (dest, None): if dest_param is None: kwargs.pop("dest", None) else: kwargs["dest"] = dest_param if fill: if setsurface_param is not None: expected_color = setsurface_color elif setcolor_param is not None: expected_color = setcolor else: expected_color = surface_color else: if unsetsurface_param is not None: expected_color = unsetsurface_color elif unsetcolor_param is not None: expected_color = unsetcolor else: expected_color = surface_color to_surface = mask.to_surface(**kwargs) self.assertIs(to_surface, surface) if not IS_PYPY: self.assertEqual( sys.getrefcount(to_surface), expected_ref_count ) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual( to_surface.get_bitsize(), expected_depth ) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__set_and_unset_bits(self): """Ensures that to_surface works correctly with with set/unset bits when using the defaults for setcolor and unsetcolor. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") width, height = size = (10, 20) mask = pygame.mask.Mask(size) mask_rect = mask.get_rect() surface = pygame.Surface(size) surface_color = pygame.Color("red") # Create a checkerboard pattern of set/unset bits. for pos in ((x, y) for x in range(width) for y in range(x & 1, height, 2)): mask.set_at(pos) # Test different dest values. for dest in self.ORIGIN_OFFSETS: mask_rect.topleft = dest surface.fill(surface_color) to_surface = mask.to_surface(surface, dest=dest) to_surface.lock() # Lock for possible speed up. for pos in ((x, y) for x in range(width) for y in range(height)): mask_pos = (pos[0] - dest[0], pos[1] - dest[1]) if not mask_rect.collidepoint(pos): expected_color = surface_color elif mask.get_at(mask_pos): expected_color = default_setcolor else: expected_color = default_unsetcolor self.assertEqual(to_surface.get_at(pos), expected_color, (dest, pos)) to_surface.unlock() def test_to_surface__set_and_unset_bits_with_setsurface_unsetsurface(self): """Ensures that to_surface works correctly with with set/unset bits when using setsurface and unsetsurface. """ width, height = size = (10, 20) mask = pygame.mask.Mask(size) mask_rect = mask.get_rect() surface = pygame.Surface(size) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface_color = pygame.Color("green") setsurface.fill(setsurface_color) unsetsurface = surface.copy() unsetsurface_color = pygame.Color("blue") unsetsurface.fill(unsetsurface_color) # Create a checkerboard pattern of set/unset bits. for pos in ((x, y) for x in range(width) for y in range(x & 1, height, 2)): mask.set_at(pos) # Test different dest values. for dest in self.ORIGIN_OFFSETS: mask_rect.topleft = dest # Tests the color parameters set to None and also as their # default values. Should have no effect as they are not being # used, but this exercises different to_surface() code. for disable_color_params in (True, False): surface.fill(surface_color) # Clear for each test. if disable_color_params: to_surface = mask.to_surface( surface, dest=dest, setsurface=setsurface, unsetsurface=unsetsurface, setcolor=None, unsetcolor=None, ) else: to_surface = mask.to_surface( surface, dest=dest, setsurface=setsurface, unsetsurface=unsetsurface, ) to_surface.lock() # Lock for possible speed up. for pos in ((x, y) for x in range(width) for y in range(height)): mask_pos = (pos[0] - dest[0], pos[1] - dest[1]) if not mask_rect.collidepoint(pos): expected_color = surface_color elif mask.get_at(mask_pos): expected_color = setsurface_color else: expected_color = unsetsurface_color self.assertEqual(to_surface.get_at(pos), expected_color) to_surface.unlock() def test_to_surface__surface_narrower_than_mask(self): """Ensures that surfaces narrower than the mask work correctly. For this test the surface's width is less than the mask's width. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 20) narrow_size = (6, 20) surface = pygame.Surface(narrow_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), narrow_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setsurface_narrower_than_mask(self): """Ensures that setsurfaces narrower than the mask work correctly. For this test the setsurface's width is less than the mask's width. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 20) narrow_size = (6, 20) setsurface = pygame.Surface(narrow_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_setcolor, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_unsetcolor) def test_to_surface__unsetsurface_narrower_than_mask(self): """Ensures that unsetsurfaces narrower than the mask work correctly. For this test the unsetsurface's width is less than the mask's width. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 20) narrow_size = (6, 20) unsetsurface = pygame.Surface(narrow_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_setcolor) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_unsetcolor, unsetsurface_rect ) def test_to_surface__setsurface_narrower_than_mask_and_colors_none(self): """Ensures that setsurfaces narrower than the mask work correctly when setcolor and unsetcolor are set to None. For this test the setsurface's width is less than the mask's width. """ default_surface_color = (0, 0, 0, 0) mask_size = (10, 20) narrow_size = (6, 20) setsurface = pygame.Surface(narrow_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface( setsurface=setsurface, setcolor=None, unsetcolor=None ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_surface_color, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_surface_color) def test_to_surface__unsetsurface_narrower_than_mask_and_colors_none(self): """Ensures that unsetsurfaces narrower than the mask work correctly when setcolor and unsetcolor are set to None. For this test the unsetsurface's width is less than the mask's width. """ default_surface_color = (0, 0, 0, 0) mask_size = (10, 20) narrow_size = (6, 20) unsetsurface = pygame.Surface(narrow_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface( unsetsurface=unsetsurface, setcolor=None, unsetcolor=None ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_surface_color) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_surface_color, unsetsurface_rect ) def test_to_surface__surface_wider_than_mask(self): """Ensures that surfaces wider than the mask work correctly. For this test the surface's width is greater than the mask's width. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (6, 15) wide_size = (11, 15) surface = pygame.Surface(wide_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), wide_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_wider_than_mask(self): """Ensures that setsurfaces wider than the mask work correctly. For this test the setsurface's width is greater than the mask's width. """ default_unsetcolor = pygame.Color("black") mask_size = (6, 15) wide_size = (11, 15) setsurface = pygame.Surface(wide_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = setsurface_color if fill else default_unsetcolor to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetsurface_wider_than_mask(self): """Ensures that unsetsurfaces wider than the mask work correctly. For this test the unsetsurface's width is greater than the mask's width. """ default_setcolor = pygame.Color("white") mask_size = (6, 15) wide_size = (11, 15) unsetsurface = pygame.Surface(wide_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = default_setcolor if fill else unsetsurface_color to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__surface_shorter_than_mask(self): """Ensures that surfaces shorter than the mask work correctly. For this test the surface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 11) short_size = (10, 6) surface = pygame.Surface(short_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), short_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setsurface_shorter_than_mask(self): """Ensures that setsurfaces shorter than the mask work correctly. For this test the setsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 11) short_size = (10, 6) setsurface = pygame.Surface(short_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_setcolor, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_unsetcolor) def test_to_surface__unsetsurface_shorter_than_mask(self): """Ensures that unsetsurfaces shorter than the mask work correctly. For this test the unsetsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 11) short_size = (10, 6) unsetsurface = pygame.Surface(short_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_setcolor) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_unsetcolor, unsetsurface_rect ) def test_to_surface__setsurface_shorter_than_mask_and_colors_none(self): """Ensures that setsurfaces shorter than the mask work correctly when setcolor and unsetcolor are set to None. For this test the setsurface's height is less than the mask's height. """ default_surface_color = (0, 0, 0, 0) mask_size = (10, 11) short_size = (10, 6) setsurface = pygame.Surface(short_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface( setsurface=setsurface, setcolor=None, unsetcolor=None ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_surface_color, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_surface_color) def test_to_surface__unsetsurface_shorter_than_mask_and_colors_none(self): """Ensures that unsetsurfaces shorter than the mask work correctly when setcolor and unsetcolor are set to None. For this test the unsetsurface's height is less than the mask's height. """ default_surface_color = (0, 0, 0, 0) mask_size = (10, 11) short_size = (10, 6) unsetsurface = pygame.Surface(short_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface( unsetsurface=unsetsurface, setcolor=None, unsetcolor=None ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_surface_color) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_surface_color, unsetsurface_rect ) def test_to_surface__surface_taller_than_mask(self): """Ensures that surfaces taller than the mask work correctly. For this test the surface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 6) tall_size = (10, 11) surface = pygame.Surface(tall_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), tall_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_taller_than_mask(self): """Ensures that setsurfaces taller than the mask work correctly. For this test the setsurface's height is greater than the mask's height. """ default_unsetcolor = pygame.Color("black") mask_size = (10, 6) tall_size = (10, 11) setsurface = pygame.Surface(tall_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = setsurface_color if fill else default_unsetcolor to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetsurface_taller_than_mask(self): """Ensures that unsetsurfaces taller than the mask work correctly. For this test the unsetsurface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") mask_size = (10, 6) tall_size = (10, 11) unsetsurface = pygame.Surface(tall_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = default_setcolor if fill else unsetsurface_color to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__surface_wider_and_taller_than_mask(self): """Ensures that surfaces wider and taller than the mask work correctly. For this test the surface's width is greater than the mask's width and the surface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (6, 8) wide_tall_size = (11, 15) surface = pygame.Surface(wide_tall_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), wide_tall_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_wider_and_taller_than_mask(self): """Ensures that setsurfaces wider and taller than the mask work correctly. For this test the setsurface's width is greater than the mask's width and the setsurface's height is greater than the mask's height. """ default_unsetcolor = pygame.Color("black") mask_size = (6, 8) wide_tall_size = (11, 15) setsurface = pygame.Surface(wide_tall_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = setsurface_color if fill else default_unsetcolor to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetsurface_wider_and_taller_than_mask(self): """Ensures that unsetsurfaces wider and taller than the mask work correctly. For this test the unsetsurface's width is greater than the mask's width and the unsetsurface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") mask_size = (6, 8) wide_tall_size = (11, 15) unsetsurface = pygame.Surface(wide_tall_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) expected_color = default_setcolor if fill else unsetsurface_color to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__surface_wider_and_shorter_than_mask(self): """Ensures that surfaces wider and shorter than the mask work correctly. For this test the surface's width is greater than the mask's width and the surface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (7, 11) wide_short_size = (13, 6) surface = pygame.Surface(wide_short_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), wide_short_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_wider_and_shorter_than_mask(self): """Ensures that setsurfaces wider and shorter than the mask work correctly. For this test the setsurface's width is greater than the mask's width and the setsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (7, 11) wide_short_size = (10, 6) setsurface = pygame.Surface(wide_short_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_setcolor, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_unsetcolor) def test_to_surface__unsetsurface_wider_and_shorter_than_mask(self): """Ensures that unsetsurfaces wider and shorter than the mask work correctly. For this test the unsetsurface's width is greater than the mask's width and the unsetsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (7, 11) wide_short_size = (10, 6) unsetsurface = pygame.Surface(wide_short_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_setcolor) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_unsetcolor, unsetsurface_rect ) def test_to_surface__surface_narrower_and_taller_than_mask(self): """Ensures that surfaces narrower and taller than the mask work correctly. For this test the surface's width is less than the mask's width and the surface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 8) narrow_tall_size = (6, 15) surface = pygame.Surface(narrow_tall_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), narrow_tall_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_narrower_and_taller_than_mask(self): """Ensures that setsurfaces narrower and taller than the mask work correctly. For this test the setsurface's width is less than the mask's width and the setsurface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 8) narrow_tall_size = (6, 15) setsurface = pygame.Surface(narrow_tall_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_setcolor, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_unsetcolor) def test_to_surface__unsetsurface_narrower_and_taller_than_mask(self): """Ensures that unsetsurfaces narrower and taller than the mask work correctly. For this test the unsetsurface's width is less than the mask's width and the unsetsurface's height is greater than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 8) narrow_tall_size = (6, 15) unsetsurface = pygame.Surface(narrow_tall_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_setcolor) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_unsetcolor, unsetsurface_rect ) def test_to_surface__surface_narrower_and_shorter_than_mask(self): """Ensures that surfaces narrower and shorter than the mask work correctly. For this test the surface's width is less than the mask's width and the surface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 18) narrow_short_size = (6, 15) surface = pygame.Surface(narrow_short_size) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) mask_rect = mask.get_rect() surface.fill(surface_color) # Clear for each test. expected_color = default_setcolor if fill else default_unsetcolor to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), narrow_short_size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea(self, to_surface, surface_color, mask_rect) def test_to_surface__setsurface_narrower_and_shorter_than_mask(self): """Ensures that setsurfaces narrower and shorter than the mask work correctly. For this test the setsurface's width is less than the mask's width and the setsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 18) narrow_short_size = (6, 15) setsurface = pygame.Surface(narrow_short_size, SRCALPHA, 32) setsurface_color = pygame.Color("red") setsurface.fill(setsurface_color) setsurface_rect = setsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, setsurface_color, setsurface_rect) assertSurfaceFilledIgnoreArea( self, to_surface, default_setcolor, setsurface_rect ) else: assertSurfaceFilled(self, to_surface, default_unsetcolor) def test_to_surface__unsetsurface_narrower_and_shorter_than_mask(self): """Ensures that unsetsurfaces narrower and shorter than the mask work correctly. For this test the unsetsurface's width is less than the mask's width and the unsetsurface's height is less than the mask's height. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") mask_size = (10, 18) narrow_short_size = (6, 15) unsetsurface = pygame.Surface(narrow_short_size, SRCALPHA, 32) unsetsurface_color = pygame.Color("red") unsetsurface.fill(unsetsurface_color) unsetsurface_rect = unsetsurface.get_rect() for fill in (True, False): mask = pygame.mask.Mask(mask_size, fill=fill) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) # Different checks depending on if the mask was filled or not. if fill: assertSurfaceFilled(self, to_surface, default_setcolor) else: assertSurfaceFilled( self, to_surface, unsetsurface_color, unsetsurface_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, default_unsetcolor, unsetsurface_rect ) @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface__all_surfaces_different_sizes_than_mask(self): """Ensures that all the surface parameters can be of different sizes.""" default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") surface_color = pygame.Color("red") setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") mask_size = (10, 15) surface_size = (11, 14) setsurface_size = (9, 8) unsetsurface_size = (12, 16) surface = pygame.Surface(surface_size) setsurface = pygame.Surface(setsurface_size) unsetsurface = pygame.Surface(unsetsurface_size) surface.fill(surface_color) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) surface_rect = surface.get_rect() setsurface_rect = setsurface.get_rect() unsetsurface_rect = unsetsurface.get_rect() # Create a mask that is filled except for a rect in the center. mask = pygame.mask.Mask(mask_size, fill=True) mask_rect = mask.get_rect() unfilled_rect = pygame.Rect((0, 0), (4, 5)) unfilled_rect.center = mask_rect.center for pos in ( (x, y) for x in range(unfilled_rect.x, unfilled_rect.w) for y in range(unfilled_rect.y, unfilled_rect.h) ): mask.set_at(pos, 0) to_surface = mask.to_surface(surface, setsurface, unsetsurface) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), surface_size) # Check each surface pixel for the correct color. to_surface.lock() # Lock for possible speed up. for pos in ( (x, y) for x in range(surface_rect.w) for y in range(surface_rect.h) ): if not mask_rect.collidepoint(pos): expected_color = surface_color elif mask.get_at(pos): # Checking set bit colors. if setsurface_rect.collidepoint(pos): expected_color = setsurface_color else: expected_color = default_setcolor else: # Checking unset bit colors. if unsetsurface_rect.collidepoint(pos): expected_color = unsetsurface_color else: expected_color = default_unsetcolor self.assertEqual(to_surface.get_at(pos), expected_color) to_surface.unlock() def test_to_surface__dest_locations(self): """Ensures dest values can be different locations on/off the surface.""" SIDE = 7 surface = pygame.Surface((SIDE, SIDE)) surface_rect = surface.get_rect() dest_rect = surface_rect.copy() surface_color = pygame.Color("red") default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") directions = ( ((s, 0) for s in range(-SIDE, SIDE + 1)), # left to right ((0, s) for s in range(-SIDE, SIDE + 1)), # top to bottom ((s, s) for s in range(-SIDE, SIDE + 1)), # topleft to bottomright diag ((-s, s) for s in range(-SIDE, SIDE + 1)), # topright to bottomleft diag ) for fill in (True, False): mask = pygame.mask.Mask((SIDE, SIDE), fill=fill) expected_color = default_setcolor if fill else default_unsetcolor for direction in directions: for pos in direction: dest_rect.topleft = pos overlap_rect = dest_rect.clip(surface_rect) surface.fill(surface_color) to_surface = mask.to_surface(surface, dest=dest_rect) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) @unittest.expectedFailure @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface__area_locations(self): """Ensures area rects can be different locations on/off the mask.""" SIDE = 7 surface = pygame.Surface((SIDE, SIDE)) surface_color = pygame.Color("red") default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") directions = ( ((s, 0) for s in range(-SIDE, SIDE + 1)), # left to right ((0, s) for s in range(-SIDE, SIDE + 1)), # top to bottom ((s, s) for s in range(-SIDE, SIDE + 1)), # topleft to bottomright diag ((-s, s) for s in range(-SIDE, SIDE + 1)), # topright to bottomleft diag ) for fill in (True, False): mask = pygame.mask.Mask((SIDE, SIDE), fill=fill) mask_rect = mask.get_rect() area_rect = mask_rect.copy() expected_color = default_setcolor if fill else default_unsetcolor for direction in directions: for pos in direction: area_rect.topleft = pos overlap_rect = area_rect.clip(mask_rect) overlap_rect.topleft = (0, 0) surface.fill(surface_color) to_surface = mask.to_surface(surface, area=area_rect) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) @unittest.expectedFailure def test_to_surface__dest_and_area_locations(self): """Ensures dest/area values can be different locations on/off the surface/mask. """ SIDE = 5 surface = pygame.Surface((SIDE, SIDE)) surface_rect = surface.get_rect() dest_rect = surface_rect.copy() surface_color = pygame.Color("red") default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") dest_directions = ( ((s, 0) for s in range(-SIDE, SIDE + 1)), # left to right ((0, s) for s in range(-SIDE, SIDE + 1)), # top to bottom ((s, s) for s in range(-SIDE, SIDE + 1)), # topleft to bottomright diag ((-s, s) for s in range(-SIDE, SIDE + 1)), # topright to bottomleft diag ) # Using only the topleft to bottomright diagonal to test the area (to # reduce the number of loop iterations). area_positions = list(dest_directions[2]) for fill in (True, False): mask = pygame.mask.Mask((SIDE, SIDE), fill=fill) mask_rect = mask.get_rect() area_rect = mask_rect.copy() expected_color = default_setcolor if fill else default_unsetcolor for dest_direction in dest_directions: for dest_pos in dest_direction: dest_rect.topleft = dest_pos for area_pos in area_positions: area_rect.topleft = area_pos area_overlap_rect = area_rect.clip(mask_rect) area_overlap_rect.topleft = dest_rect.topleft dest_overlap_rect = dest_rect.clip(area_overlap_rect) surface.fill(surface_color) to_surface = mask.to_surface( surface, dest=dest_rect, area=area_rect ) assertSurfaceFilled( self, to_surface, expected_color, dest_overlap_rect ) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, dest_overlap_rect ) @unittest.expectedFailure def test_to_surface__area_sizes(self): """Ensures area rects can be different sizes.""" SIDE = 7 SIZES = ( (0, 0), (0, 1), (1, 0), (1, 1), (SIDE - 1, SIDE - 1), (SIDE - 1, SIDE), (SIDE, SIDE - 1), (SIDE, SIDE), (SIDE + 1, SIDE), (SIDE, SIDE + 1), (SIDE + 1, SIDE + 1), ) surface = pygame.Surface((SIDE, SIDE)) surface_color = pygame.Color("red") default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") for fill in (True, False): mask = pygame.mask.Mask((SIDE, SIDE), fill=fill) mask_rect = mask.get_rect() expected_color = default_setcolor if fill else default_unsetcolor for size in SIZES: area_rect = pygame.Rect((0, 0), size) for pos in self.ORIGIN_OFFSETS: area_rect.topleft = pos overlap_rect = area_rect.clip(mask_rect) overlap_rect.topleft = (0, 0) surface.fill(surface_color) to_surface = mask.to_surface(surface, area=area_rect) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) def test_to_surface__surface_color_alphas(self): """Ensures the setsurface/unsetsurface color alpha values are respected.""" size = (13, 17) setsurface_color = pygame.Color("green") setsurface_color.a = 53 unsetsurface_color = pygame.Color("blue") unsetsurface_color.a = 109 setsurface = pygame.Surface(size, flags=SRCALPHA, depth=32) unsetsurface = pygame.Surface(size, flags=SRCALPHA, depth=32) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) expected_color = setsurface_color if fill else unsetsurface_color to_surface = mask.to_surface( setsurface=setsurface, unsetsurface=unsetsurface ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__color_alphas(self): """Ensures the setcolor/unsetcolor alpha values are respected.""" size = (13, 17) setcolor = pygame.Color("green") setcolor.a = 35 unsetcolor = pygame.Color("blue") unsetcolor.a = 213 for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) expected_color = setcolor if fill else unsetcolor to_surface = mask.to_surface(setcolor=setcolor, unsetcolor=unsetcolor) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__depths(self): """Ensures to_surface works correctly with supported surface depths.""" size = (13, 17) surface_color = pygame.Color("red") setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") for depth in (8, 16, 24, 32): surface = pygame.Surface(size, depth=depth) setsurface = pygame.Surface(size, depth=depth) unsetsurface = pygame.Surface(size, depth=depth) surface.fill(surface_color) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) # For non-32 bit depths, the actual color can be different from # what was filled. expected_color = ( setsurface.get_at((0, 0)) if fill else unsetsurface.get_at((0, 0)) ) to_surface = mask.to_surface(surface, setsurface, unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__different_depths(self): """Ensures an exception is raised when surfaces have different depths.""" size = (13, 17) surface_color = pygame.Color("red") setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") mask = pygame.mask.Mask(size) # Test different combinations of depths. test_depths = ( (8, 8, 16), # surface/setsurface/unsetsurface (8, 8, 24), (8, 8, 32), (16, 16, 24), (16, 16, 32), (24, 16, 8), (32, 16, 16), (32, 32, 16), (32, 24, 32), ) for depths in test_depths: surface = pygame.Surface(size, depth=depths[0]) setsurface = pygame.Surface(size, depth=depths[1]) unsetsurface = pygame.Surface(size, depth=depths[2]) surface.fill(surface_color) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) with self.assertRaises(ValueError): mask.to_surface(surface, setsurface, unsetsurface) def test_to_surface__different_depths_with_created_surfaces(self): """Ensures an exception is raised when surfaces have different depths than the created surface. """ size = (13, 17) setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") mask = pygame.mask.Mask(size) # Test different combinations of depths. The created surface always has # a depth of 32. test_depths = ( (8, 8), # setsurface/unsetsurface (16, 16), (24, 24), (24, 16), (32, 8), (32, 16), (32, 24), (16, 32), ) for set_depth, unset_depth in test_depths: setsurface = pygame.Surface(size, depth=set_depth) unsetsurface = pygame.Surface(size, depth=unset_depth) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) with self.assertRaises(ValueError): mask.to_surface(setsurface=setsurface, unsetsurface=unsetsurface) def test_to_surface__same_srcalphas(self): """Ensures to_surface works correctly when the SRCALPHA flag is set or not.""" size = (13, 17) surface_color = pygame.Color("red") setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") for depth in (16, 32): for flags in (0, SRCALPHA): surface = pygame.Surface(size, flags=flags, depth=depth) setsurface = pygame.Surface(size, flags=flags, depth=depth) unsetsurface = pygame.Surface(size, flags=flags, depth=depth) surface.fill(surface_color) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) expected_color = setsurface_color if fill else unsetsurface_color to_surface = mask.to_surface(surface, setsurface, unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) if flags: self.assertTrue(to_surface.get_flags() & flags) def test_to_surface__same_srcalphas_with_created_surfaces(self): """Ensures to_surface works correctly when it creates a surface and the SRCALPHA flag is set on both setsurface and unsetsurface. """ size = (13, 17) setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") # The created surface always has a depth of 32 and the SRCALPHA flag set. expected_flags = SRCALPHA setsurface = pygame.Surface(size, flags=expected_flags, depth=32) unsetsurface = pygame.Surface(size, flags=expected_flags, depth=32) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) expected_color = setsurface_color if fill else unsetsurface_color to_surface = mask.to_surface( setsurface=setsurface, unsetsurface=unsetsurface ) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) self.assertTrue(to_surface.get_flags() & expected_flags) def test_to_surface__different_srcalphas(self): """Ensures an exception is raised when surfaces have different SRCALPHA flag settings. """ size = (13, 17) surface_color = pygame.Color("red") setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") mask = pygame.mask.Mask(size) # Test different combinations of SRCALPHA flags. test_flags = ( (SRCALPHA, 0, 0), # surface/setsurface/unsetsurface (SRCALPHA, SRCALPHA, 0), (0, SRCALPHA, SRCALPHA), (0, 0, SRCALPHA), ) for depth in (16, 32): for flags in test_flags: surface = pygame.Surface(size, flags=flags[0], depth=depth) setsurface = pygame.Surface(size, flags=flags[1], depth=depth) unsetsurface = pygame.Surface(size, flags=flags[2], depth=depth) surface.fill(surface_color) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) with self.assertRaises(ValueError): mask.to_surface(surface, setsurface, unsetsurface) def test_to_surface__different_srcalphas_with_created_surfaces(self): """Ensures an exception is raised when surfaces have different SRCALPHA flag settings than the created surface. """ size = (13, 17) setsurface_color = pygame.Color("green") unsetsurface_color = pygame.Color("blue") mask = pygame.mask.Mask(size) for depth in (16, 32): # Test different combinations of SRCALPHA flags. The created # surface always has the SRCALPHA flag set. for flags in ((0, 0), (SRCALPHA, 0), (0, SRCALPHA)): setsurface = pygame.Surface(size, flags=flags[0], depth=depth) unsetsurface = pygame.Surface(size, flags=flags[1], depth=depth) setsurface.fill(setsurface_color) unsetsurface.fill(unsetsurface_color) with self.assertRaises(ValueError): mask.to_surface(setsurface=setsurface, unsetsurface=unsetsurface) def test_to_surface__dest_on_surface(self): """Ensures dest values on the surface work correctly when using the defaults for setcolor and unsetcolor. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") width, height = size = (5, 9) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() expected_color = default_setcolor if fill else default_unsetcolor # Test the dest parameter at different locations on the surface. for dest in ((x, y) for y in range(height) for x in range(width)): surface.fill(surface_color) # Clear for each test. mask_rect.topleft = dest to_surface = mask.to_surface(surface, dest=dest) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, mask_rect ) def test_to_surface__dest_on_surface_with_setsurface_unsetsurface(self): """Ensures dest values on the surface work correctly when using setsurface and unsetsurface. """ width, height = size = (5, 9) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface_color = pygame.Color("green") setsurface.fill(setsurface_color) unsetsurface = surface.copy() unsetsurface_color = pygame.Color("blue") unsetsurface.fill(unsetsurface_color) # Using different kwargs to exercise different to_surface() code. # Should not have any impact on the resulting drawn surfaces. kwargs = { "surface": surface, "setsurface": setsurface, "unsetsurface": unsetsurface, "dest": None, } color_kwargs = dict(kwargs) color_kwargs.update((("setcolor", None), ("unsetcolor", None))) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() expected_color = setsurface_color if fill else unsetsurface_color # Test the dest parameter at different locations on the surface. for dest in ((x, y) for y in range(height) for x in range(width)): mask_rect.topleft = dest for use_color_params in (True, False): surface.fill(surface_color) # Clear for each test. test_kwargs = color_kwargs if use_color_params else kwargs test_kwargs["dest"] = dest to_surface = mask.to_surface(**test_kwargs) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, mask_rect ) def test_to_surface__dest_off_surface(self): """Ensures dest values off the surface work correctly when using the defaults for setcolor and unsetcolor. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") width, height = size = (5, 7) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") # Test different dests off the surface. dests = [(-width, -height), (-width, 0), (0, -height)] dests.extend(off_corners(surface.get_rect())) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() expected_color = default_setcolor if fill else default_unsetcolor for dest in dests: surface.fill(surface_color) # Clear for each test. mask_rect.topleft = dest to_surface = mask.to_surface(surface, dest=dest) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, mask_rect ) def test_to_surface__dest_off_surface_with_setsurface_unsetsurface(self): """Ensures dest values off the surface work correctly when using setsurface and unsetsurface. """ width, height = size = (5, 7) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface_color = pygame.Color("green") setsurface.fill(setsurface_color) unsetsurface = surface.copy() unsetsurface_color = pygame.Color("blue") unsetsurface.fill(unsetsurface_color) # Test different dests off the surface. dests = [(-width, -height), (-width, 0), (0, -height)] dests.extend(off_corners(surface.get_rect())) # Using different kwargs to exercise different to_surface() code. # Should not have any impact on the resulting drawn surfaces. kwargs = { "surface": surface, "setsurface": setsurface, "unsetsurface": unsetsurface, "dest": None, } color_kwargs = dict(kwargs) color_kwargs.update((("setcolor", None), ("unsetcolor", None))) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() expected_color = setsurface_color if fill else unsetsurface_color for dest in dests: mask_rect.topleft = dest for use_color_params in (True, False): surface.fill(surface_color) # Clear for each test. test_kwargs = color_kwargs if use_color_params else kwargs test_kwargs["dest"] = dest to_surface = mask.to_surface(**test_kwargs) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, mask_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, mask_rect ) @unittest.expectedFailure @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface__area_on_mask(self): """Ensures area values on the mask work correctly when using the defaults for setcolor and unsetcolor. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") width, height = size = (5, 9) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() area_rect = mask_rect.copy() expected_color = default_setcolor if fill else default_unsetcolor # Testing the area parameter at different locations on the mask. for pos in ((x, y) for y in range(height) for x in range(width)): surface.fill(surface_color) # Clear for each test. area_rect.topleft = pos overlap_rect = mask_rect.clip(area_rect) overlap_rect.topleft = (0, 0) to_surface = mask.to_surface(surface, area=area_rect) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) @unittest.expectedFailure def test_to_surface__area_on_mask_with_setsurface_unsetsurface(self): """Ensures area values on the mask work correctly when using setsurface and unsetsurface. """ width, height = size = (5, 9) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface_color = pygame.Color("green") setsurface.fill(setsurface_color) unsetsurface = surface.copy() unsetsurface_color = pygame.Color("blue") unsetsurface.fill(unsetsurface_color) # Using the values in kwargs vs color_kwargs tests different to_surface # code. Should not have any impact on the resulting drawn surfaces. kwargs = { "surface": surface, "setsurface": setsurface, "unsetsurface": unsetsurface, "area": pygame.Rect((0, 0), size), } color_kwargs = dict(kwargs) color_kwargs.update((("setcolor", None), ("unsetcolor", None))) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() area_rect = mask_rect.copy() expected_color = setsurface_color if fill else unsetsurface_color # Testing the area parameter at different locations on the mask. for pos in ((x, y) for y in range(height) for x in range(width)): area_rect.topleft = pos overlap_rect = mask_rect.clip(area_rect) overlap_rect.topleft = (0, 0) for use_color_params in (True, False): surface.fill(surface_color) # Clear for each test. test_kwargs = color_kwargs if use_color_params else kwargs test_kwargs["area"].topleft = pos overlap_rect = mask_rect.clip(test_kwargs["area"]) overlap_rect.topleft = (0, 0) to_surface = mask.to_surface(**test_kwargs) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) @unittest.expectedFailure @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface__area_off_mask(self): """Ensures area values off the mask work correctly when using the defaults for setcolor and unsetcolor. """ default_setcolor = pygame.Color("white") default_unsetcolor = pygame.Color("black") width, height = size = (5, 7) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") # Testing positions off the mask. positions = [(-width, -height), (-width, 0), (0, -height)] positions.extend(off_corners(pygame.Rect((0, 0), (width, height)))) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() area_rect = mask_rect.copy() expected_color = default_setcolor if fill else default_unsetcolor for pos in positions: surface.fill(surface_color) # Clear for each test. area_rect.topleft = pos overlap_rect = mask_rect.clip(area_rect) overlap_rect.topleft = (0, 0) to_surface = mask.to_surface(surface, area=area_rect) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) @unittest.expectedFailure @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface__area_off_mask_with_setsurface_unsetsurface(self): """Ensures area values off the mask work correctly when using setsurface and unsetsurface. """ width, height = size = (5, 7) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") setsurface = surface.copy() setsurface_color = pygame.Color("green") setsurface.fill(setsurface_color) unsetsurface = surface.copy() unsetsurface_color = pygame.Color("blue") unsetsurface.fill(unsetsurface_color) # Testing positions off the mask. positions = [(-width, -height), (-width, 0), (0, -height)] positions.extend(off_corners(pygame.Rect((0, 0), (width, height)))) # Using the values in kwargs vs color_kwargs tests different to_surface # code. Should not have any impact on the resulting drawn surfaces. kwargs = { "surface": surface, "setsurface": setsurface, "unsetsurface": unsetsurface, "area": pygame.Rect((0, 0), size), } color_kwargs = dict(kwargs) color_kwargs.update((("setcolor", None), ("unsetcolor", None))) for fill in (True, False): mask = pygame.mask.Mask(size, fill=fill) mask_rect = mask.get_rect() expected_color = setsurface_color if fill else unsetsurface_color for pos in positions: for use_color_params in (True, False): surface.fill(surface_color) # Clear for each test. test_kwargs = color_kwargs if use_color_params else kwargs test_kwargs["area"].topleft = pos overlap_rect = mask_rect.clip(test_kwargs["area"]) overlap_rect.topleft = (0, 0) to_surface = mask.to_surface(**test_kwargs) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color, overlap_rect) assertSurfaceFilledIgnoreArea( self, to_surface, surface_color, overlap_rect ) def test_to_surface__surface_with_zero_size(self): """Ensures zero sized surfaces are handled correctly.""" expected_ref_count = 3 size = (0, 0) surface = pygame.Surface(size) mask = pygame.mask.Mask((3, 4), fill=True) to_surface = mask.to_surface(surface) self.assertIs(to_surface, surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) def test_to_surface__setsurface_with_zero_size(self): """Ensures zero sized setsurfaces are handled correctly.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("white") # Default setcolor. mask_size = (2, 4) mask = pygame.mask.Mask(mask_size, fill=True) setsurface = pygame.Surface((0, 0), expected_flag, expected_depth) to_surface = mask.to_surface(setsurface=setsurface) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__unsetsurface_with_zero_size(self): """Ensures zero sized unsetsurfaces are handled correctly.""" expected_ref_count = 2 expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("black") # Default unsetcolor. mask_size = (4, 2) mask = pygame.mask.Mask(mask_size) unsetsurface = pygame.Surface((0, 0), expected_flag, expected_depth) to_surface = mask.to_surface(unsetsurface=unsetsurface) self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), mask_size) assertSurfaceFilled(self, to_surface, expected_color) def test_zero_mask(self): """Ensures masks can be created with zero sizes.""" for size in ((100, 0), (0, 100), (0, 0)): for fill in (True, False): msg = f"size={size}, fill={fill}" mask = pygame.mask.Mask(size, fill=fill) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), size, msg) def test_zero_mask_copy(self): """Ensures copy correctly handles zero sized masks.""" for expected_size in ((11, 0), (0, 11), (0, 0)): mask = pygame.mask.Mask(expected_size) mask_copy = mask.copy() self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) def test_zero_mask_get_size(self): """Ensures get_size correctly handles zero sized masks.""" for expected_size in ((41, 0), (0, 40), (0, 0)): mask = pygame.mask.Mask(expected_size) size = mask.get_size() self.assertEqual(size, expected_size) def test_zero_mask_get_rect(self): """Ensures get_rect correctly handles zero sized masks.""" for expected_size in ((4, 0), (0, 4), (0, 0)): expected_rect = pygame.Rect((0, 0), expected_size) mask = pygame.mask.Mask(expected_size) rect = mask.get_rect() self.assertEqual(rect, expected_rect) def test_zero_mask_get_at(self): """Ensures get_at correctly handles zero sized masks.""" for size in ((51, 0), (0, 50), (0, 0)): mask = pygame.mask.Mask(size) with self.assertRaises(IndexError): value = mask.get_at((0, 0)) def test_zero_mask_set_at(self): """Ensures set_at correctly handles zero sized masks.""" for size in ((31, 0), (0, 30), (0, 0)): mask = pygame.mask.Mask(size) with self.assertRaises(IndexError): mask.set_at((0, 0)) def test_zero_mask_overlap(self): """Ensures overlap correctly handles zero sized masks. Tests combinations of sized and zero sized masks. """ offset = (0, 0) for size1, size2 in zero_size_pairs(51, 42): msg = f"size1={size1}, size2={size2}" mask1 = pygame.mask.Mask(size1, fill=True) mask2 = pygame.mask.Mask(size2, fill=True) overlap_pos = mask1.overlap(mask2, offset) self.assertIsNone(overlap_pos, msg) def test_zero_mask_overlap_area(self): """Ensures overlap_area correctly handles zero sized masks. Tests combinations of sized and zero sized masks. """ offset = (0, 0) expected_count = 0 for size1, size2 in zero_size_pairs(41, 52): msg = f"size1={size1}, size2={size2}" mask1 = pygame.mask.Mask(size1, fill=True) mask2 = pygame.mask.Mask(size2, fill=True) overlap_count = mask1.overlap_area(mask2, offset) self.assertEqual(overlap_count, expected_count, msg) def test_zero_mask_overlap_mask(self): """Ensures overlap_mask correctly handles zero sized masks. Tests combinations of sized and zero sized masks. """ offset = (0, 0) expected_count = 0 for size1, size2 in zero_size_pairs(43, 53): msg = f"size1={size1}, size2={size2}" mask1 = pygame.mask.Mask(size1, fill=True) mask2 = pygame.mask.Mask(size2, fill=True) overlap_mask = mask1.overlap_mask(mask2, offset) self.assertIsInstance(overlap_mask, pygame.mask.Mask, msg) self.assertEqual(overlap_mask.count(), expected_count, msg) self.assertEqual(overlap_mask.get_size(), size1, msg) def test_zero_mask_fill(self): """Ensures fill correctly handles zero sized masks.""" expected_count = 0 for size in ((100, 0), (0, 100), (0, 0)): mask = pygame.mask.Mask(size) mask.fill() self.assertEqual(mask.count(), expected_count, f"size={size}") def test_zero_mask_clear(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size) mask.clear() self.assertEqual(mask.count(), 0) def test_zero_mask_flip(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size) mask.invert() self.assertEqual(mask.count(), 0) def test_zero_mask_scale(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size) mask2 = mask.scale((2, 3)) self.assertIsInstance(mask2, pygame.mask.Mask) self.assertEqual(mask2.get_size(), (2, 3)) def test_zero_mask_draw(self): """Ensures draw correctly handles zero sized masks. Tests combinations of sized and zero sized masks. """ offset = (0, 0) for size1, size2 in zero_size_pairs(31, 37): msg = f"size1={size1}, size2={size2}" mask1 = pygame.mask.Mask(size1, fill=True) mask2 = pygame.mask.Mask(size2, fill=True) expected_count = mask1.count() mask1.draw(mask2, offset) self.assertEqual(mask1.count(), expected_count, msg) self.assertEqual(mask1.get_size(), size1, msg) def test_zero_mask_erase(self): """Ensures erase correctly handles zero sized masks. Tests combinations of sized and zero sized masks. """ offset = (0, 0) for size1, size2 in zero_size_pairs(29, 23): msg = f"size1={size1}, size2={size2}" mask1 = pygame.mask.Mask(size1, fill=True) mask2 = pygame.mask.Mask(size2, fill=True) expected_count = mask1.count() mask1.erase(mask2, offset) self.assertEqual(mask1.count(), expected_count, msg) self.assertEqual(mask1.get_size(), size1, msg) def test_zero_mask_count(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size, fill=True) self.assertEqual(mask.count(), 0) def test_zero_mask_centroid(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size) self.assertEqual(mask.centroid(), (0, 0)) def test_zero_mask_angle(self): sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: mask = pygame.mask.Mask(size) self.assertEqual(mask.angle(), 0.0) def test_zero_mask_outline(self): """Ensures outline correctly handles zero sized masks.""" expected_points = [] for size in ((61, 0), (0, 60), (0, 0)): mask = pygame.mask.Mask(size) points = mask.outline() self.assertListEqual(points, expected_points, f"size={size}") def test_zero_mask_outline__with_arg(self): """Ensures outline correctly handles zero sized masks when using the skip pixels argument.""" expected_points = [] for size in ((66, 0), (0, 65), (0, 0)): mask = pygame.mask.Mask(size) points = mask.outline(10) self.assertListEqual(points, expected_points, f"size={size}") def test_zero_mask_convolve(self): """Ensures convolve correctly handles zero sized masks. Tests the different combinations of sized and zero sized masks. """ for size1 in ((17, 13), (71, 0), (0, 70), (0, 0)): mask1 = pygame.mask.Mask(size1, fill=True) for size2 in ((11, 7), (81, 0), (0, 60), (0, 0)): msg = f"sizes={size1}, {size2}" mask2 = pygame.mask.Mask(size2, fill=True) expected_size = ( max(0, size1[0] + size2[0] - 1), max(0, size1[1] + size2[1] - 1), ) mask = mask1.convolve(mask2) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertIsNot(mask, mask2, msg) self.assertEqual(mask.get_size(), expected_size, msg) def test_zero_mask_convolve__with_output_mask(self): """Ensures convolve correctly handles zero sized masks when using an output mask argument. Tests the different combinations of sized and zero sized masks. """ for size1 in ((11, 17), (91, 0), (0, 90), (0, 0)): mask1 = pygame.mask.Mask(size1, fill=True) for size2 in ((13, 11), (83, 0), (0, 62), (0, 0)): mask2 = pygame.mask.Mask(size2, fill=True) for output_size in ((7, 5), (71, 0), (0, 70), (0, 0)): msg = f"sizes={size1}, {size2}, {output_size}" output_mask = pygame.mask.Mask(output_size) mask = mask1.convolve(mask2, output_mask) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertIs(mask, output_mask, msg) self.assertEqual(mask.get_size(), output_size, msg) def test_zero_mask_connected_component(self): """Ensures connected_component correctly handles zero sized masks.""" expected_count = 0 for size in ((81, 0), (0, 80), (0, 0)): msg = f"size={size}" mask = pygame.mask.Mask(size) cc_mask = mask.connected_component() self.assertIsInstance(cc_mask, pygame.mask.Mask, msg) self.assertEqual(cc_mask.get_size(), size) self.assertEqual(cc_mask.count(), expected_count, msg) def test_zero_mask_connected_component__indexed(self): """Ensures connected_component correctly handles zero sized masks when using an index argument.""" for size in ((91, 0), (0, 90), (0, 0)): mask = pygame.mask.Mask(size) with self.assertRaises(IndexError): cc_mask = mask.connected_component((0, 0)) def test_zero_mask_connected_components(self): """Ensures connected_components correctly handles zero sized masks.""" expected_cc_masks = [] for size in ((11, 0), (0, 10), (0, 0)): mask = pygame.mask.Mask(size) cc_masks = mask.connected_components() self.assertListEqual(cc_masks, expected_cc_masks, f"size={size}") def test_zero_mask_get_bounding_rects(self): """Ensures get_bounding_rects correctly handles zero sized masks.""" expected_bounding_rects = [] for size in ((21, 0), (0, 20), (0, 0)): mask = pygame.mask.Mask(size) bounding_rects = mask.get_bounding_rects() self.assertListEqual( bounding_rects, expected_bounding_rects, f"size={size}" ) def test_zero_mask_to_surface(self): """Ensures to_surface correctly handles zero sized masks and surfaces.""" mask_color = pygame.Color("blue") surf_color = pygame.Color("red") for surf_size in ((7, 3), (7, 0), (0, 7), (0, 0)): surface = pygame.Surface(surf_size, SRCALPHA, 32) surface.fill(surf_color) for mask_size in ((5, 0), (0, 5), (0, 0)): mask = pygame.mask.Mask(mask_size, fill=True) to_surface = mask.to_surface(surface, setcolor=mask_color) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), surf_size) if 0 not in surf_size: assertSurfaceFilled(self, to_surface, surf_color) def test_zero_mask_to_surface__create_surface(self): """Ensures to_surface correctly handles zero sized masks and surfaces when it has to create a default surface. """ mask_color = pygame.Color("blue") for mask_size in ((3, 0), (0, 3), (0, 0)): mask = pygame.mask.Mask(mask_size, fill=True) to_surface = mask.to_surface(setcolor=mask_color) self.assertIsInstance(to_surface, pygame.Surface) self.assertEqual(to_surface.get_size(), mask_size) class SubMask(pygame.mask.Mask): """Subclass of the Mask class to help test subclassing.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_attribute = True class SubMaskCopy(SubMask): """Subclass of the Mask class to help test copying subclasses.""" def copy(self): mask_copy = super().copy() mask_copy.test_attribute = self.test_attribute return mask_copy class SubMaskDunderCopy(SubMask): """Subclass of the Mask class to help test copying subclasses.""" def __copy__(self): mask_copy = super().__copy__() mask_copy.test_attribute = self.test_attribute return mask_copy class SubMaskCopyAndDunderCopy(SubMaskDunderCopy): """Subclass of the Mask class to help test copying subclasses.""" def copy(self): return super().copy() class MaskSubclassTest(unittest.TestCase): """Test subclassed Masks.""" def test_subclass_mask(self): """Ensures the Mask class can be subclassed.""" mask = SubMask((5, 3), fill=True) self.assertIsInstance(mask, pygame.mask.Mask) self.assertIsInstance(mask, SubMask) self.assertTrue(mask.test_attribute) def test_subclass_copy(self): """Ensures copy works for subclassed Masks.""" mask = SubMask((65, 2), fill=True) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsInstance(mask_copy, SubMask) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) # No subclass attributes because copy()/__copy__() not overridden. self.assertFalse(hasattr(mask_copy, "test_attribute")) def test_subclass_copy__override_copy(self): """Ensures copy works for subclassed Masks overriding copy.""" mask = SubMaskCopy((65, 2), fill=True) # Test both the copy() and __copy__() methods. for i, mask_copy in enumerate((mask.copy(), copy.copy(mask))): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsInstance(mask_copy, SubMaskCopy) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) if 1 == i: # No subclass attributes because __copy__() not overridden. self.assertFalse(hasattr(mask_copy, "test_attribute")) else: self.assertTrue(mask_copy.test_attribute) def test_subclass_copy__override_dunder_copy(self): """Ensures copy works for subclassed Masks overriding __copy__.""" mask = SubMaskDunderCopy((65, 2), fill=True) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsInstance(mask_copy, SubMaskDunderCopy) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) # Calls to copy() eventually call __copy__() internally so the # attributes will be copied. self.assertTrue(mask_copy.test_attribute) def test_subclass_copy__override_both_copy_methods(self): """Ensures copy works for subclassed Masks overriding copy/__copy__.""" mask = SubMaskCopyAndDunderCopy((65, 2), fill=True) # Test both the copy() and __copy__() methods. for mask_copy in (mask.copy(), copy.copy(mask)): self.assertIsInstance(mask_copy, pygame.mask.Mask) self.assertIsInstance(mask_copy, SubMaskCopyAndDunderCopy) self.assertIsNot(mask_copy, mask) assertMaskEqual(self, mask_copy, mask) self.assertTrue(mask_copy.test_attribute) def test_subclass_get_size(self): """Ensures get_size works for subclassed Masks.""" expected_size = (2, 3) mask = SubMask(expected_size) size = mask.get_size() self.assertEqual(size, expected_size) def test_subclass_mask_get_rect(self): """Ensures get_rect works for subclassed Masks.""" expected_rect = pygame.Rect((0, 0), (65, 33)) mask = SubMask(expected_rect.size, fill=True) rect = mask.get_rect() self.assertEqual(rect, expected_rect) def test_subclass_get_at(self): """Ensures get_at works for subclassed Masks.""" expected_bit = 1 mask = SubMask((3, 2), fill=True) bit = mask.get_at((0, 0)) self.assertEqual(bit, expected_bit) def test_subclass_set_at(self): """Ensures set_at works for subclassed Masks.""" expected_bit = 1 expected_count = 1 pos = (0, 0) mask = SubMask(fill=False, size=(4, 2)) mask.set_at(pos) self.assertEqual(mask.get_at(pos), expected_bit) self.assertEqual(mask.count(), expected_count) def test_subclass_overlap(self): """Ensures overlap works for subclassed Masks.""" expected_pos = (0, 0) mask_size = (2, 3) masks = (pygame.mask.Mask(fill=True, size=mask_size), SubMask(mask_size, True)) arg_masks = ( pygame.mask.Mask(fill=True, size=mask_size), SubMask(mask_size, True), ) # Test different combinations of subclassed and non-subclassed Masks. for mask in masks: for arg_mask in arg_masks: overlap_pos = mask.overlap(arg_mask, (0, 0)) self.assertEqual(overlap_pos, expected_pos) def test_subclass_overlap_area(self): """Ensures overlap_area works for subclassed Masks.""" mask_size = (3, 2) expected_count = mask_size[0] * mask_size[1] masks = (pygame.mask.Mask(fill=True, size=mask_size), SubMask(mask_size, True)) arg_masks = ( pygame.mask.Mask(fill=True, size=mask_size), SubMask(mask_size, True), ) # Test different combinations of subclassed and non-subclassed Masks. for mask in masks: for arg_mask in arg_masks: overlap_count = mask.overlap_area(arg_mask, (0, 0)) self.assertEqual(overlap_count, expected_count) def test_subclass_overlap_mask(self): """Ensures overlap_mask works for subclassed Masks.""" expected_size = (4, 5) expected_count = expected_size[0] * expected_size[1] masks = ( pygame.mask.Mask(fill=True, size=expected_size), SubMask(expected_size, True), ) arg_masks = ( pygame.mask.Mask(fill=True, size=expected_size), SubMask(expected_size, True), ) # Test different combinations of subclassed and non-subclassed Masks. for mask in masks: for arg_mask in arg_masks: overlap_mask = mask.overlap_mask(arg_mask, (0, 0)) self.assertIsInstance(overlap_mask, pygame.mask.Mask) self.assertNotIsInstance(overlap_mask, SubMask) self.assertEqual(overlap_mask.count(), expected_count) self.assertEqual(overlap_mask.get_size(), expected_size) def test_subclass_fill(self): """Ensures fill works for subclassed Masks.""" mask_size = (2, 4) expected_count = mask_size[0] * mask_size[1] mask = SubMask(fill=False, size=mask_size) mask.fill() self.assertEqual(mask.count(), expected_count) def test_subclass_clear(self): """Ensures clear works for subclassed Masks.""" mask_size = (4, 3) expected_count = 0 mask = SubMask(mask_size, True) mask.clear() self.assertEqual(mask.count(), expected_count) def test_subclass_invert(self): """Ensures invert works for subclassed Masks.""" mask_size = (1, 4) expected_count = mask_size[0] * mask_size[1] mask = SubMask(fill=False, size=mask_size) mask.invert() self.assertEqual(mask.count(), expected_count) def test_subclass_scale(self): """Ensures scale works for subclassed Masks.""" expected_size = (5, 2) mask = SubMask((1, 4)) scaled_mask = mask.scale(expected_size) self.assertIsInstance(scaled_mask, pygame.mask.Mask) self.assertNotIsInstance(scaled_mask, SubMask) self.assertEqual(scaled_mask.get_size(), expected_size) def test_subclass_draw(self): """Ensures draw works for subclassed Masks.""" mask_size = (5, 4) expected_count = mask_size[0] * mask_size[1] arg_masks = ( pygame.mask.Mask(fill=True, size=mask_size), SubMask(mask_size, True), ) # Test different combinations of subclassed and non-subclassed Masks. for mask in (pygame.mask.Mask(mask_size), SubMask(mask_size)): for arg_mask in arg_masks: mask.clear() # Clear for each test. mask.draw(arg_mask, (0, 0)) self.assertEqual(mask.count(), expected_count) def test_subclass_erase(self): """Ensures erase works for subclassed Masks.""" mask_size = (3, 4) expected_count = 0 masks = (pygame.mask.Mask(mask_size, True), SubMask(mask_size, True)) arg_masks = (pygame.mask.Mask(mask_size, True), SubMask(mask_size, True)) # Test different combinations of subclassed and non-subclassed Masks. for mask in masks: for arg_mask in arg_masks: mask.fill() # Fill for each test. mask.erase(arg_mask, (0, 0)) self.assertEqual(mask.count(), expected_count) def test_subclass_count(self): """Ensures count works for subclassed Masks.""" mask_size = (5, 2) expected_count = mask_size[0] * mask_size[1] - 1 mask = SubMask(fill=True, size=mask_size) mask.set_at((1, 1), 0) count = mask.count() self.assertEqual(count, expected_count) def test_subclass_centroid(self): """Ensures centroid works for subclassed Masks.""" expected_centroid = (0, 0) mask_size = (3, 2) mask = SubMask((3, 2)) centroid = mask.centroid() self.assertEqual(centroid, expected_centroid) def test_subclass_angle(self): """Ensures angle works for subclassed Masks.""" expected_angle = 0.0 mask = SubMask(size=(5, 4)) angle = mask.angle() self.assertAlmostEqual(angle, expected_angle) def test_subclass_outline(self): """Ensures outline works for subclassed Masks.""" expected_outline = [] mask = SubMask((3, 4)) outline = mask.outline() self.assertListEqual(outline, expected_outline) def test_subclass_convolve(self): """Ensures convolve works for subclassed Masks.""" width, height = 7, 5 mask_size = (width, height) expected_count = 0 expected_size = (max(0, width * 2 - 1), max(0, height * 2 - 1)) arg_masks = (pygame.mask.Mask(mask_size), SubMask(mask_size)) output_masks = (pygame.mask.Mask(mask_size), SubMask(mask_size)) # Test different combinations of subclassed and non-subclassed Masks. for mask in (pygame.mask.Mask(mask_size), SubMask(mask_size)): for arg_mask in arg_masks: convolve_mask = mask.convolve(arg_mask) self.assertIsInstance(convolve_mask, pygame.mask.Mask) self.assertNotIsInstance(convolve_mask, SubMask) self.assertEqual(convolve_mask.count(), expected_count) self.assertEqual(convolve_mask.get_size(), expected_size) # Test subclassed masks for the output_mask as well. for output_mask in output_masks: convolve_mask = mask.convolve(arg_mask, output_mask) self.assertIsInstance(convolve_mask, pygame.mask.Mask) self.assertEqual(convolve_mask.count(), expected_count) self.assertEqual(convolve_mask.get_size(), mask_size) if isinstance(output_mask, SubMask): self.assertIsInstance(convolve_mask, SubMask) else: self.assertNotIsInstance(convolve_mask, SubMask) def test_subclass_connected_component(self): """Ensures connected_component works for subclassed Masks.""" expected_count = 0 expected_size = (3, 4) mask = SubMask(expected_size) cc_mask = mask.connected_component() self.assertIsInstance(cc_mask, pygame.mask.Mask) self.assertNotIsInstance(cc_mask, SubMask) self.assertEqual(cc_mask.count(), expected_count) self.assertEqual(cc_mask.get_size(), expected_size) def test_subclass_connected_components(self): """Ensures connected_components works for subclassed Masks.""" expected_ccs = [] mask = SubMask((5, 4)) ccs = mask.connected_components() self.assertListEqual(ccs, expected_ccs) def test_subclass_get_bounding_rects(self): """Ensures get_bounding_rects works for subclassed Masks.""" expected_bounding_rects = [] mask = SubMask((3, 2)) bounding_rects = mask.get_bounding_rects() self.assertListEqual(bounding_rects, expected_bounding_rects) def test_subclass_to_surface(self): """Ensures to_surface works for subclassed Masks.""" expected_color = pygame.Color("blue") size = (5, 3) mask = SubMask(size, fill=True) surface = pygame.Surface(size, SRCALPHA, 32) surface.fill(pygame.Color("red")) to_surface = mask.to_surface(surface, setcolor=expected_color) self.assertIs(to_surface, surface) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) @unittest.skipIf(IS_PYPY, "pypy has lots of mask failures") # TODO class MaskModuleTest(unittest.TestCase): def test_from_surface(self): """Ensures from_surface creates a mask with the correct bits set. This test checks the masks created by the from_surface function using 16 and 32 bit surfaces. Each alpha value (0-255) is tested against several different threshold values. Note: On 16 bit surface the requested alpha value can differ from what is actually set. This test uses the value read from the surface. """ threshold_count = 256 surface_color = [55, 155, 255, 0] expected_size = (11, 9) all_set_count = expected_size[0] * expected_size[1] none_set_count = 0 for depth in (16, 32): surface = pygame.Surface(expected_size, SRCALPHA, depth) for alpha in range(threshold_count): surface_color[3] = alpha surface.fill(surface_color) if depth < 32: # On surfaces with depths < 32 the requested alpha can be # different than what gets set. Use the value read from the # surface. alpha = surface.get_at((0, 0))[3] # Test the mask created at threshold values low, high and # around alpha. threshold_test_values = {-1, 0, alpha - 1, alpha, alpha + 1, 255, 256} for threshold in threshold_test_values: msg = f"depth={depth}, alpha={alpha}, threshold={threshold}" if alpha > threshold: expected_count = all_set_count else: expected_count = none_set_count mask = pygame.mask.from_surface( surface=surface, threshold=threshold ) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) def test_from_surface__different_alphas_32bit(self): """Ensures from_surface creates a mask with the correct bits set when pixels have different alpha values (32 bits surfaces). This test checks the masks created by the from_surface function using a 32 bit surface. The surface is created with each pixel having a different alpha value (0-255). This surface is tested over a range of threshold values (0-255). """ offset = (0, 0) threshold_count = 256 surface_color = [10, 20, 30, 0] expected_size = (threshold_count, 1) expected_mask = pygame.Mask(expected_size, fill=True) surface = pygame.Surface(expected_size, SRCALPHA, 32) # Give each pixel a different alpha. surface.lock() # Lock for possible speed up. for a in range(threshold_count): surface_color[3] = a surface.set_at((a, 0), surface_color) surface.unlock() # Test the mask created for each different alpha threshold. for threshold in range(threshold_count): msg = f"threshold={threshold}" expected_mask.set_at((threshold, 0), 0) expected_count = expected_mask.count() mask = pygame.mask.from_surface(surface, threshold) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual( mask.overlap_area(expected_mask, offset), expected_count, msg ) def test_from_surface__different_alphas_16bit(self): """Ensures from_surface creates a mask with the correct bits set when pixels have different alpha values (16 bit surfaces). This test checks the masks created by the from_surface function using a 16 bit surface. Each pixel of the surface is set with a different alpha value (0-255), but since this is a 16 bit surface the requested alpha value can differ from what is actually set. The resulting surface will have groups of alpha values which complicates the test as the alpha groups will all be set/unset at a given threshold. The setup calculates these groups and an expected mask for each. This test data is then used to test each alpha grouping over a range of threshold values. """ threshold_count = 256 surface_color = [110, 120, 130, 0] expected_size = (threshold_count, 1) surface = pygame.Surface(expected_size, SRCALPHA, 16) # Give each pixel a different alpha. surface.lock() # Lock for possible speed up. for a in range(threshold_count): surface_color[3] = a surface.set_at((a, 0), surface_color) surface.unlock() alpha_thresholds = OrderedDict() special_thresholds = set() # Create the threshold ranges and identify any thresholds that need # special handling. for threshold in range(threshold_count): # On surfaces with depths < 32 the requested alpha can be different # than what gets set. Use the value read from the surface. alpha = surface.get_at((threshold, 0))[3] if alpha not in alpha_thresholds: alpha_thresholds[alpha] = [threshold] else: alpha_thresholds[alpha].append(threshold) if threshold < alpha: special_thresholds.add(threshold) # Use each threshold group to create an expected mask. test_data = [] # [(from_threshold, to_threshold, expected_mask), ...] offset = (0, 0) erase_mask = pygame.Mask(expected_size) exp_mask = pygame.Mask(expected_size, fill=True) for thresholds in alpha_thresholds.values(): for threshold in thresholds: if threshold in special_thresholds: # Any special thresholds just reuse previous exp_mask. test_data.append((threshold, threshold + 1, exp_mask)) else: to_threshold = thresholds[-1] + 1 # Make the expected mask by erasing the unset bits. for thres in range(to_threshold): erase_mask.set_at((thres, 0), 1) exp_mask = pygame.Mask(expected_size, fill=True) exp_mask.erase(erase_mask, offset) test_data.append((threshold, to_threshold, exp_mask)) break # All the setup is done. Now test the masks created over the threshold # ranges. for from_threshold, to_threshold, expected_mask in test_data: expected_count = expected_mask.count() for threshold in range(from_threshold, to_threshold): msg = f"threshold={threshold}" mask = pygame.mask.from_surface(surface, threshold) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual( mask.overlap_area(expected_mask, offset), expected_count, msg ) def test_from_surface__with_colorkey_mask_cleared(self): """Ensures from_surface creates a mask with the correct bits set when the surface uses a colorkey. The surface is filled with the colorkey color so the resulting masks are expected to have no bits set. """ colorkeys = ((0, 0, 0), (1, 2, 3), (50, 100, 200), (255, 255, 255)) expected_size = (7, 11) expected_count = 0 for depth in (8, 16, 24, 32): msg = f"depth={depth}" surface = pygame.Surface(expected_size, 0, depth) for colorkey in colorkeys: surface.set_colorkey(colorkey) # With some depths (i.e. 8 and 16) the actual colorkey can be # different than what was requested via the set. surface.fill(surface.get_colorkey()) mask = pygame.mask.from_surface(surface) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) def test_from_surface__with_colorkey_mask_filled(self): """Ensures from_surface creates a mask with the correct bits set when the surface uses a colorkey. The surface is filled with a color that is not the colorkey color so the resulting masks are expected to have all bits set. """ colorkeys = ((0, 0, 0), (1, 2, 3), (10, 100, 200), (255, 255, 255)) surface_color = (50, 100, 200) expected_size = (11, 7) expected_count = expected_size[0] * expected_size[1] for depth in (8, 16, 24, 32): msg = f"depth={depth}" surface = pygame.Surface(expected_size, 0, depth) surface.fill(surface_color) for colorkey in colorkeys: surface.set_colorkey(colorkey) mask = pygame.mask.from_surface(surface) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) def test_from_surface__with_colorkey_mask_pattern(self): """Ensures from_surface creates a mask with the correct bits set when the surface uses a colorkey. The surface is filled with alternating pixels of colorkey and non-colorkey colors, so the resulting masks are expected to have alternating bits set. """ def alternate(func, set_value, unset_value, width, height): # Helper function to set alternating values. setbit = False for pos in ((x, y) for x in range(width) for y in range(height)): func(pos, set_value if setbit else unset_value) setbit = not setbit surface_color = (5, 10, 20) colorkey = (50, 60, 70) expected_size = (11, 2) expected_mask = pygame.mask.Mask(expected_size) alternate(expected_mask.set_at, 1, 0, *expected_size) expected_count = expected_mask.count() offset = (0, 0) for depth in (8, 16, 24, 32): msg = f"depth={depth}" surface = pygame.Surface(expected_size, 0, depth) # Fill the surface with alternating colors. alternate(surface.set_at, surface_color, colorkey, *expected_size) surface.set_colorkey(colorkey) mask = pygame.mask.from_surface(surface) self.assertIsInstance(mask, pygame.mask.Mask, msg) self.assertEqual(mask.get_size(), expected_size, msg) self.assertEqual(mask.count(), expected_count, msg) self.assertEqual( mask.overlap_area(expected_mask, offset), expected_count, msg ) def test_from_threshold(self): """Does mask.from_threshold() work correctly?""" a = [16, 24, 32] for i in a: surf = pygame.surface.Surface((70, 70), 0, i) surf.fill((100, 50, 200), (20, 20, 20, 20)) mask = pygame.mask.from_threshold( surf, (100, 50, 200, 255), (10, 10, 10, 255) ) rects = mask.get_bounding_rects() self.assertEqual(mask.count(), 400) self.assertEqual(mask.get_bounding_rects(), [pygame.Rect((20, 20, 20, 20))]) for i in a: surf = pygame.surface.Surface((70, 70), 0, i) surf2 = pygame.surface.Surface((70, 70), 0, i) surf.fill((100, 100, 100)) surf2.fill((150, 150, 150)) surf2.fill((100, 100, 100), (40, 40, 10, 10)) mask = pygame.mask.from_threshold( surface=surf, color=(0, 0, 0, 0), threshold=(10, 10, 10, 255), othersurface=surf2, ) self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), 100) self.assertEqual(mask.get_bounding_rects(), [pygame.Rect((40, 40, 10, 10))]) def test_zero_size_from_surface(self): """Ensures from_surface can create masks from zero sized surfaces.""" for size in ((100, 0), (0, 100), (0, 0)): mask = pygame.mask.from_surface(pygame.Surface(size)) self.assertIsInstance(mask, pygame.mask.MaskType, f"size={size}") self.assertEqual(mask.get_size(), size) def test_zero_size_from_threshold(self): a = [16, 24, 32] sizes = ((100, 0), (0, 100), (0, 0)) for size in sizes: for i in a: surf = pygame.surface.Surface(size, 0, i) surf.fill((100, 50, 200), (20, 20, 20, 20)) mask = pygame.mask.from_threshold( surf, (100, 50, 200, 255), (10, 10, 10, 255) ) self.assertEqual(mask.count(), 0) rects = mask.get_bounding_rects() self.assertEqual(rects, []) for i in a: surf = pygame.surface.Surface(size, 0, i) surf2 = pygame.surface.Surface(size, 0, i) surf.fill((100, 100, 100)) surf2.fill((150, 150, 150)) surf2.fill((100, 100, 100), (40, 40, 10, 10)) mask = pygame.mask.from_threshold( surf, (0, 0, 0, 0), (10, 10, 10, 255), surf2 ) self.assertIsInstance(mask, pygame.mask.Mask) self.assertEqual(mask.count(), 0) rects = mask.get_bounding_rects() self.assertEqual(rects, []) def test_buffer_interface(self): size = (1000, 100) pixels_set = ((0, 1), (100, 10), (173, 90)) pixels_unset = ((0, 0), (101, 10), (173, 91)) mask = pygame.Mask(size) for point in pixels_set: mask.set_at(point, 1) view = memoryview(mask) intwidth = 8 * view.strides[1] for point in pixels_set: x, y = point col = x // intwidth self.assertEqual( (view[col, y] >> (x % intwidth)) & 1, 1, f"the pixel at {point} is not set to 1", ) for point in pixels_unset: x, y = point col = x // intwidth self.assertEqual( (view[col, y] >> (x % intwidth)) & 1, 0, f"the pixel at {point} is not set to 0", ) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/math_test.py0000644000175100001770000033166414676242340015755 0ustar00runnerdockerimport math import platform import unittest from collections.abc import Collection, Sequence import pygame.math from pygame.math import Vector2, Vector3 IS_PYPY = "PyPy" == platform.python_implementation() class MathModuleTest(unittest.TestCase): """Math module tests.""" def test_lerp(self): result = pygame.math.lerp(10, 100, 0.5) # 55.0 self.assertAlmostEqual(result, 55.0) result = pygame.math.lerp(10, 100, 0.0) # 10 self.assertAlmostEqual(result, 10.0) result = pygame.math.lerp(10, 100, 1.0) # 100 self.assertAlmostEqual(result, 100.0) # Not enough args self.assertRaises(TypeError, pygame.math.lerp, 1) # Wrong arg type self.assertRaises(TypeError, pygame.math.lerp, "str", "str", "str") # Percent outside range [0, 1] self.assertRaises(ValueError, pygame.math.lerp, 10, 100, 1.1) self.assertRaises(ValueError, pygame.math.lerp, 10, 100, -0.5) def test_clamp(self): """Test clamp function.""" # Int tests # Test going above max result = pygame.math.clamp(10, 1, 5) self.assertEqual(result, 5) # Test going below min result = pygame.math.clamp(-10, 1, 5) self.assertEqual(result, 1) # Test equal to max result = pygame.math.clamp(5, 1, 5) self.assertEqual(result, 5) # Test equal to min result = pygame.math.clamp(1, 1, 5) self.assertEqual(result, 1) # Test between min and max result = pygame.math.clamp(3, 1, 5) self.assertEqual(result, 3) # Float tests # Test going above max result = pygame.math.clamp(10.0, 1.12, 5.0) self.assertAlmostEqual(result, 5.0) # Test going below min result = pygame.math.clamp(-10.0, 1.12, 5.0) self.assertAlmostEqual(result, 1.12) # Test equal to max result = pygame.math.clamp(5.0, 1.12, 5.0) self.assertAlmostEqual(result, 5.0) # Test equal to min result = pygame.math.clamp(1.12, 1.12, 5.0) self.assertAlmostEqual(result, 1.12) # Test between min and max result = pygame.math.clamp(2.5, 1.12, 5.0) self.assertAlmostEqual(result, 2.5) # Error tests # Not enough args self.assertRaises(TypeError, pygame.math.clamp, 10) # Non numeric args self.assertRaises(TypeError, pygame.math.clamp, "hello", "py", "thon") class Vector2TypeTest(unittest.TestCase): def setUp(self): self.zeroVec = Vector2() self.e1 = Vector2(1, 0) self.e2 = Vector2(0, 1) self.t1 = (1.2, 3.4) self.l1 = list(self.t1) self.v1 = Vector2(self.t1) self.t2 = (5.6, 7.8) self.l2 = list(self.t2) self.v2 = Vector2(self.t2) self.s1 = 5.6 self.s2 = 7.8 def testConstructionDefault(self): v = Vector2() self.assertEqual(v.x, 0.0) self.assertEqual(v.y, 0.0) def testConstructionScalar(self): v = Vector2(1) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 1.0) def testConstructionScalarKeywords(self): v = Vector2(x=1) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 1.0) def testConstructionKeywords(self): v = Vector2(x=1, y=2) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 2.0) def testConstructionXY(self): v = Vector2(1.2, 3.4) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) def testConstructionTuple(self): v = Vector2((1.2, 3.4)) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) def testConstructionList(self): v = Vector2([1.2, 3.4]) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) def testConstructionVector2(self): v = Vector2(Vector2(1.2, 3.4)) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) def testAttributeAccess(self): tmp = self.v1.x self.assertEqual(tmp, self.v1.x) self.assertEqual(tmp, self.v1[0]) tmp = self.v1.y self.assertEqual(tmp, self.v1.y) self.assertEqual(tmp, self.v1[1]) self.v1.x = 3.141 self.assertEqual(self.v1.x, 3.141) self.v1.y = 3.141 self.assertEqual(self.v1.y, 3.141) def assign_nonfloat(): v = Vector2() v.x = "spam" self.assertRaises(TypeError, assign_nonfloat) def test___round___basic(self): self.assertEqual(round(pygame.Vector2(0.0, 0.0)), pygame.Vector2(0.0, 0.0)) self.assertEqual(type(round(pygame.Vector2(0.0, 0.0))), pygame.Vector2) self.assertEqual( round(pygame.Vector2(1.0, 1.0)), round(pygame.Vector2(1.0, 1.0)) ) self.assertEqual( round(pygame.Vector2(10.0, 10.0)), round(pygame.Vector2(10.0, 10.0)) ) self.assertEqual( round(pygame.Vector2(1000000000.0, 1000000000.0)), pygame.Vector2(1000000000.0, 1000000000.0), ) self.assertEqual(round(pygame.Vector2(1e20, 1e20)), pygame.Vector2(1e20, 1e20)) self.assertEqual(round(pygame.Vector2(-1.0, -1.0)), pygame.Vector2(-1.0, -1.0)) self.assertEqual( round(pygame.Vector2(-10.0, -10.0)), pygame.Vector2(-10.0, -10.0) ) self.assertEqual( round(pygame.Vector2(-1000000000.0, -1000000000.0)), pygame.Vector2(-1000000000.0, -1000000000.0), ) self.assertEqual( round(pygame.Vector2(-1e20, -1e20)), pygame.Vector2(-1e20, -1e20) ) self.assertEqual(round(pygame.Vector2(0.1, 0.1)), pygame.Vector2(0.0, 0.0)) self.assertEqual(round(pygame.Vector2(1.1, 1.1)), pygame.Vector2(1.0, 1.0)) self.assertEqual(round(pygame.Vector2(10.1, 10.1)), pygame.Vector2(10.0, 10.0)) self.assertEqual( round(pygame.Vector2(1000000000.1, 1000000000.1)), pygame.Vector2(1000000000.0, 1000000000.0), ) self.assertEqual(round(pygame.Vector2(-1.1, -1.1)), pygame.Vector2(-1.0, -1.0)) self.assertEqual( round(pygame.Vector2(-10.1, -10.1)), pygame.Vector2(-10.0, -10.0) ) self.assertEqual( round(pygame.Vector2(-1000000000.1, -1000000000.1)), pygame.Vector2(-1000000000.0, -1000000000.0), ) self.assertEqual(round(pygame.Vector2(0.9, 0.9)), pygame.Vector2(1.0, 1.0)) self.assertEqual(round(pygame.Vector2(9.9, 9.9)), pygame.Vector2(10.0, 10.0)) self.assertEqual( round(pygame.Vector2(999999999.9, 999999999.9)), pygame.Vector2(1000000000.0, 1000000000.0), ) self.assertEqual(round(pygame.Vector2(-0.9, -0.9)), pygame.Vector2(-1.0, -1.0)) self.assertEqual( round(pygame.Vector2(-9.9, -9.9)), pygame.Vector2(-10.0, -10.0) ) self.assertEqual( round(pygame.Vector2(-999999999.9, -999999999.9)), pygame.Vector2(-1000000000.0, -1000000000.0), ) self.assertEqual( round(pygame.Vector2(-8.0, -8.0), -1), pygame.Vector2(-10.0, -10.0) ) self.assertEqual(type(round(pygame.Vector2(-8.0, -8.0), -1)), pygame.Vector2) self.assertEqual(type(round(pygame.Vector2(-8.0, -8.0), 0)), pygame.Vector2) self.assertEqual(type(round(pygame.Vector2(-8.0, -8.0), 1)), pygame.Vector2) # Check even / odd rounding behaviour self.assertEqual(round(pygame.Vector2(5.5, 5.5)), pygame.Vector2(6, 6)) self.assertEqual(round(pygame.Vector2(5.4, 5.4)), pygame.Vector2(5.0, 5.0)) self.assertEqual(round(pygame.Vector2(5.6, 5.6)), pygame.Vector2(6.0, 6.0)) self.assertEqual(round(pygame.Vector2(-5.5, -5.5)), pygame.Vector2(-6, -6)) self.assertEqual(round(pygame.Vector2(-5.4, -5.4)), pygame.Vector2(-5, -5)) self.assertEqual(round(pygame.Vector2(-5.6, -5.6)), pygame.Vector2(-6, -6)) self.assertRaises(TypeError, round, pygame.Vector2(1.0, 1.0), 1.5) self.assertRaises(TypeError, round, pygame.Vector2(1.0, 1.0), "a") def testCopy(self): v_copy0 = Vector2(2004.0, 2022.0) v_copy1 = v_copy0.copy() self.assertEqual(v_copy0.x, v_copy1.x) self.assertEqual(v_copy0.y, v_copy1.y) def test_move_towards_basic(self): expected = Vector2(8.08, 2006.87) origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) change_ip = Vector2(7.22, 2004.0) change = origin.move_towards(target, 3) change_ip.move_towards_ip(target, 3) self.assertEqual(round(change.x, 2), expected.x) self.assertEqual(round(change.y, 2), expected.y) self.assertEqual(round(change_ip.x, 2), expected.x) self.assertEqual(round(change_ip.y, 2), expected.y) def test_move_towards_max_distance(self): expected = Vector2(12.30, 2021) origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) change_ip = Vector2(7.22, 2004.0) change = origin.move_towards(target, 25) change_ip.move_towards_ip(target, 25) self.assertEqual(round(change.x, 2), expected.x) self.assertEqual(round(change.y, 2), expected.y) self.assertEqual(round(change_ip.x, 2), expected.x) self.assertEqual(round(change_ip.y, 2), expected.y) def test_move_nowhere(self): expected = Vector2(7.22, 2004.0) origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) change_ip = Vector2(7.22, 2004.0) change = origin.move_towards(target, 0) change_ip.move_towards_ip(target, 0) self.assertEqual(round(change.x, 2), expected.x) self.assertEqual(round(change.y, 2), expected.y) self.assertEqual(round(change_ip.x, 2), expected.x) self.assertEqual(round(change_ip.y, 2), expected.y) def test_move_away(self): expected = Vector2(6.36, 2001.13) origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) change_ip = Vector2(7.22, 2004.0) change = origin.move_towards(target, -3) change_ip.move_towards_ip(target, -3) self.assertEqual(round(change.x, 2), expected.x) self.assertEqual(round(change.y, 2), expected.y) self.assertEqual(round(change_ip.x, 2), expected.x) self.assertEqual(round(change_ip.y, 2), expected.y) def test_move_towards_self(self): vec = Vector2(6.36, 2001.13) vec2 = vec.copy() for dist in (-3.54, -1, 0, 0.234, 12): self.assertEqual(vec.move_towards(vec2, dist), vec) vec2.move_towards_ip(vec, dist) self.assertEqual(vec, vec2) def test_move_towards_errors(self): def overpopulate(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards(target, 3, 2) def overpopulate_ip(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards_ip(target, 3, 2) def invalid_types1(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards(target, "novial") def invalid_types_ip1(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards_ip(target, "is") def invalid_types2(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards("kinda", 3) def invalid_types_ip2(): origin = Vector2(7.22, 2004.0) target = Vector2(12.30, 2021.0) origin.move_towards_ip("cool", 3) self.assertRaises(TypeError, overpopulate) self.assertRaises(TypeError, overpopulate_ip) self.assertRaises(TypeError, invalid_types1) self.assertRaises(TypeError, invalid_types_ip1) self.assertRaises(TypeError, invalid_types2) self.assertRaises(TypeError, invalid_types_ip2) def testSequence(self): v = Vector2(1.2, 3.4) Vector2()[:] self.assertEqual(len(v), 2) self.assertEqual(v[0], 1.2) self.assertEqual(v[1], 3.4) self.assertRaises(IndexError, lambda: v[2]) self.assertEqual(v[-1], 3.4) self.assertEqual(v[-2], 1.2) self.assertRaises(IndexError, lambda: v[-3]) self.assertEqual(v[:], [1.2, 3.4]) self.assertEqual(v[1:], [3.4]) self.assertEqual(v[:1], [1.2]) self.assertEqual(list(v), [1.2, 3.4]) self.assertEqual(tuple(v), (1.2, 3.4)) v[0] = 5.6 v[1] = 7.8 self.assertEqual(v.x, 5.6) self.assertEqual(v.y, 7.8) v[:] = [9.1, 11.12] self.assertEqual(v.x, 9.1) self.assertEqual(v.y, 11.12) def overpopulate(): v = Vector2() v[:] = [1, 2, 3] self.assertRaises(ValueError, overpopulate) def underpopulate(): v = Vector2() v[:] = [1] self.assertRaises(ValueError, underpopulate) def assign_nonfloat(): v = Vector2() v[0] = "spam" self.assertRaises(TypeError, assign_nonfloat) def testExtendedSlicing(self): # deletion def delSlice(vec, start=None, stop=None, step=None): if start is not None and stop is not None and step is not None: del vec[start:stop:step] elif start is not None and stop is None and step is not None: del vec[start::step] elif start is None and stop is None and step is not None: del vec[::step] v = Vector2(self.v1) self.assertRaises(TypeError, delSlice, v, None, None, 2) self.assertRaises(TypeError, delSlice, v, 1, None, 2) self.assertRaises(TypeError, delSlice, v, 1, 2, 1) # assignment v = Vector2(self.v1) v[::2] = [-1] self.assertEqual(v, [-1, self.v1.y]) v = Vector2(self.v1) v[::-2] = [10] self.assertEqual(v, [self.v1.x, 10]) v = Vector2(self.v1) v[::-1] = v self.assertEqual(v, [self.v1.y, self.v1.x]) a = Vector2(self.v1) b = Vector2(self.v1) c = Vector2(self.v1) a[1:2] = [2.2] b[slice(1, 2)] = [2.2] c[1:2:] = (2.2,) self.assertEqual(a, b) self.assertEqual(a, c) self.assertEqual(type(a), type(self.v1)) self.assertEqual(type(b), type(self.v1)) self.assertEqual(type(c), type(self.v1)) def test_contains(self): c = Vector2(0, 1) # call __contains__ explicitly to test that it is defined self.assertTrue(c.__contains__(0)) self.assertTrue(0 in c) self.assertTrue(1 in c) self.assertTrue(2 not in c) self.assertFalse(c.__contains__(2)) self.assertRaises(TypeError, lambda: "string" in c) self.assertRaises(TypeError, lambda: 3 + 4j in c) def testAdd(self): v3 = self.v1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.v2.x) self.assertEqual(v3.y, self.v1.y + self.v2.y) v3 = self.v1 + self.t2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.t2[0]) self.assertEqual(v3.y, self.v1.y + self.t2[1]) v3 = self.v1 + self.l2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.l2[0]) self.assertEqual(v3.y, self.v1.y + self.l2[1]) v3 = self.t1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.t1[0] + self.v2.x) self.assertEqual(v3.y, self.t1[1] + self.v2.y) v3 = self.l1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.l1[0] + self.v2.x) self.assertEqual(v3.y, self.l1[1] + self.v2.y) def testSub(self): v3 = self.v1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.v2.x) self.assertEqual(v3.y, self.v1.y - self.v2.y) v3 = self.v1 - self.t2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.t2[0]) self.assertEqual(v3.y, self.v1.y - self.t2[1]) v3 = self.v1 - self.l2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.l2[0]) self.assertEqual(v3.y, self.v1.y - self.l2[1]) v3 = self.t1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.t1[0] - self.v2.x) self.assertEqual(v3.y, self.t1[1] - self.v2.y) v3 = self.l1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.l1[0] - self.v2.x) self.assertEqual(v3.y, self.l1[1] - self.v2.y) def testScalarMultiplication(self): v = self.s1 * self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.s1 * self.v1.x) self.assertEqual(v.y, self.s1 * self.v1.y) v = self.v1 * self.s2 self.assertEqual(v.x, self.v1.x * self.s2) self.assertEqual(v.y, self.v1.y * self.s2) def testScalarDivision(self): v = self.v1 / self.s1 self.assertTrue(isinstance(v, type(self.v1))) self.assertAlmostEqual(v.x, self.v1.x / self.s1) self.assertAlmostEqual(v.y, self.v1.y / self.s1) v = self.v1 // self.s2 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.v1.x // self.s2) self.assertEqual(v.y, self.v1.y // self.s2) def testBool(self): self.assertEqual(bool(self.zeroVec), False) self.assertEqual(bool(self.v1), True) self.assertTrue(not self.zeroVec) self.assertTrue(self.v1) def testUnary(self): v = +self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.v1.x) self.assertEqual(v.y, self.v1.y) self.assertNotEqual(id(v), id(self.v1)) v = -self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, -self.v1.x) self.assertEqual(v.y, -self.v1.y) self.assertNotEqual(id(v), id(self.v1)) def testCompare(self): int_vec = Vector2(3, -2) flt_vec = Vector2(3.0, -2.0) zero_vec = Vector2(0, 0) self.assertEqual(int_vec == flt_vec, True) self.assertEqual(int_vec != flt_vec, False) self.assertEqual(int_vec != zero_vec, True) self.assertEqual(flt_vec == zero_vec, False) self.assertEqual(int_vec == (3, -2), True) self.assertEqual(int_vec != (3, -2), False) self.assertEqual(int_vec != [0, 0], True) self.assertEqual(int_vec == [0, 0], False) self.assertEqual(int_vec != 5, True) self.assertEqual(int_vec == 5, False) self.assertEqual(int_vec != [3, -2, 0], True) self.assertEqual(int_vec == [3, -2, 0], False) def testStr(self): v = Vector2(1.2, 3.4) self.assertEqual(str(v), "[1.2, 3.4]") def testRepr(self): v = Vector2(1.2, 3.4) self.assertEqual(v.__repr__(), "") self.assertEqual(v, Vector2(v.__repr__())) def testIter(self): it = self.v1.__iter__() next_ = it.__next__ self.assertEqual(next_(), self.v1[0]) self.assertEqual(next_(), self.v1[1]) self.assertRaises(StopIteration, lambda: next_()) it1 = self.v1.__iter__() it2 = self.v1.__iter__() self.assertNotEqual(id(it1), id(it2)) self.assertEqual(id(it1), id(it1.__iter__())) self.assertEqual(list(it1), list(it2)) self.assertEqual(list(self.v1.__iter__()), self.l1) idx = 0 for val in self.v1: self.assertEqual(val, self.v1[idx]) idx += 1 def test_rotate(self): v1 = Vector2(1, 0) v2 = v1.rotate(90) v3 = v1.rotate(90 + 360) self.assertEqual(v1.x, 1) self.assertEqual(v1.y, 0) self.assertEqual(v2.x, 0) self.assertEqual(v2.y, 1) self.assertEqual(v3.x, v2.x) self.assertEqual(v3.y, v2.y) v1 = Vector2(-1, -1) v2 = v1.rotate(-90) self.assertEqual(v2.x, -1) self.assertEqual(v2.y, 1) v2 = v1.rotate(360) self.assertEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) v2 = v1.rotate(0) self.assertEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) # issue 214 self.assertEqual(Vector2(0, 1).rotate(359.99999999), Vector2(0, 1)) def test_rotate_rad(self): tests = ( ((1, 0), math.pi), ((1, 0), math.pi / 2), ((1, 0), -math.pi / 2), ((1, 0), math.pi / 4), ) for initialVec, radians in tests: self.assertEqual( Vector2(initialVec).rotate_rad(radians), (math.cos(radians), math.sin(radians)), ) def test_rotate_ip(self): v = Vector2(1, 0) self.assertEqual(v.rotate_ip(90), None) self.assertEqual(v.x, 0) self.assertEqual(v.y, 1) v = Vector2(-1, -1) v.rotate_ip(-90) self.assertEqual(v.x, -1) self.assertEqual(v.y, 1) def test_rotate_rad_ip(self): tests = ( ((1, 0), math.pi), ((1, 0), math.pi / 2), ((1, 0), -math.pi / 2), ((1, 0), math.pi / 4), ) for initialVec, radians in tests: vec = Vector2(initialVec) vec.rotate_rad_ip(radians) self.assertEqual(vec, (math.cos(radians), math.sin(radians))) def test_normalize(self): v = self.v1.normalize() # length is 1 self.assertAlmostEqual(v.x * v.x + v.y * v.y, 1.0) # v1 is unchanged self.assertEqual(self.v1.x, self.l1[0]) self.assertEqual(self.v1.y, self.l1[1]) # v2 is parallel to v1 self.assertAlmostEqual(self.v1.x * v.y - self.v1.y * v.x, 0.0) self.assertRaises(ValueError, lambda: self.zeroVec.normalize()) def test_normalize_ip(self): v = +self.v1 # v has length != 1 before normalizing self.assertNotEqual(v.x * v.x + v.y * v.y, 1.0) # inplace operations should return None self.assertEqual(v.normalize_ip(), None) # length is 1 self.assertAlmostEqual(v.x * v.x + v.y * v.y, 1.0) # v2 is parallel to v1 self.assertAlmostEqual(self.v1.x * v.y - self.v1.y * v.x, 0.0) self.assertRaises(ValueError, lambda: self.zeroVec.normalize_ip()) def test_is_normalized(self): self.assertEqual(self.v1.is_normalized(), False) v = self.v1.normalize() self.assertEqual(v.is_normalized(), True) self.assertEqual(self.e2.is_normalized(), True) self.assertEqual(self.zeroVec.is_normalized(), False) def test_cross(self): self.assertEqual( self.v1.cross(self.v2), self.v1.x * self.v2.y - self.v1.y * self.v2.x ) self.assertEqual( self.v1.cross(self.l2), self.v1.x * self.l2[1] - self.v1.y * self.l2[0] ) self.assertEqual( self.v1.cross(self.t2), self.v1.x * self.t2[1] - self.v1.y * self.t2[0] ) self.assertEqual(self.v1.cross(self.v2), -self.v2.cross(self.v1)) self.assertEqual(self.v1.cross(self.v1), 0) def test_dot(self): self.assertAlmostEqual( self.v1.dot(self.v2), self.v1.x * self.v2.x + self.v1.y * self.v2.y ) self.assertAlmostEqual( self.v1.dot(self.l2), self.v1.x * self.l2[0] + self.v1.y * self.l2[1] ) self.assertAlmostEqual( self.v1.dot(self.t2), self.v1.x * self.t2[0] + self.v1.y * self.t2[1] ) self.assertEqual(self.v1.dot(self.v2), self.v2.dot(self.v1)) self.assertEqual(self.v1.dot(self.v2), self.v1 * self.v2) def test_angle_to(self): self.assertEqual( self.v1.rotate(self.v1.angle_to(self.v2)).normalize(), self.v2.normalize() ) self.assertEqual(Vector2(1, 1).angle_to((-1, 1)), 90) self.assertEqual(Vector2(1, 0).angle_to((0, -1)), -90) self.assertEqual(Vector2(1, 0).angle_to((-1, 1)), 135) self.assertEqual(abs(Vector2(1, 0).angle_to((-1, 0))), 180) def test_scale_to_length(self): v = Vector2(1, 1) v.scale_to_length(2.5) self.assertEqual(v, Vector2(2.5, 2.5) / math.sqrt(2)) self.assertRaises(ValueError, lambda: self.zeroVec.scale_to_length(1)) self.assertEqual(v.scale_to_length(0), None) self.assertEqual(v, self.zeroVec) def test_length(self): self.assertEqual(Vector2(3, 4).length(), 5) self.assertEqual(Vector2(-3, 4).length(), 5) self.assertEqual(self.zeroVec.length(), 0) def test_length_squared(self): self.assertEqual(Vector2(3, 4).length_squared(), 25) self.assertEqual(Vector2(-3, 4).length_squared(), 25) self.assertEqual(self.zeroVec.length_squared(), 0) def test_reflect(self): v = Vector2(1, -1) n = Vector2(0, 1) self.assertEqual(v.reflect(n), Vector2(1, 1)) self.assertEqual(v.reflect(3 * n), v.reflect(n)) self.assertEqual(v.reflect(-v), -v) self.assertRaises(ValueError, lambda: v.reflect(self.zeroVec)) def test_reflect_ip(self): v1 = Vector2(1, -1) v2 = Vector2(v1) n = Vector2(0, 1) self.assertEqual(v2.reflect_ip(n), None) self.assertEqual(v2, Vector2(1, 1)) v2 = Vector2(v1) v2.reflect_ip(3 * n) self.assertEqual(v2, v1.reflect(n)) v2 = Vector2(v1) v2.reflect_ip(-v1) self.assertEqual(v2, -v1) self.assertRaises(ValueError, lambda: v2.reflect_ip(Vector2())) def test_distance_to(self): diff = self.v1 - self.v2 self.assertEqual(self.e1.distance_to(self.e2), math.sqrt(2)) self.assertEqual(self.e1.distance_to((0, 1)), math.sqrt(2)) self.assertEqual(self.e1.distance_to([0, 1]), math.sqrt(2)) self.assertAlmostEqual( self.v1.distance_to(self.v2), math.sqrt(diff.x * diff.x + diff.y * diff.y) ) self.assertAlmostEqual( self.v1.distance_to(self.t2), math.sqrt(diff.x * diff.x + diff.y * diff.y) ) self.assertAlmostEqual( self.v1.distance_to(self.l2), math.sqrt(diff.x * diff.x + diff.y * diff.y) ) self.assertEqual(self.v1.distance_to(self.v1), 0) self.assertEqual(self.v1.distance_to(self.t1), 0) self.assertEqual(self.v1.distance_to(self.l1), 0) self.assertEqual(self.v1.distance_to(self.t2), self.v2.distance_to(self.t1)) self.assertEqual(self.v1.distance_to(self.l2), self.v2.distance_to(self.l1)) self.assertEqual(self.v1.distance_to(self.v2), self.v2.distance_to(self.v1)) def test_distance_squared_to(self): diff = self.v1 - self.v2 self.assertEqual(self.e1.distance_squared_to(self.e2), 2) self.assertEqual(self.e1.distance_squared_to((0, 1)), 2) self.assertEqual(self.e1.distance_squared_to([0, 1]), 2) self.assertAlmostEqual( self.v1.distance_squared_to(self.v2), diff.x * diff.x + diff.y * diff.y ) self.assertAlmostEqual( self.v1.distance_squared_to(self.t2), diff.x * diff.x + diff.y * diff.y ) self.assertAlmostEqual( self.v1.distance_squared_to(self.l2), diff.x * diff.x + diff.y * diff.y ) self.assertEqual(self.v1.distance_squared_to(self.v1), 0) self.assertEqual(self.v1.distance_squared_to(self.t1), 0) self.assertEqual(self.v1.distance_squared_to(self.l1), 0) self.assertEqual( self.v1.distance_squared_to(self.v2), self.v2.distance_squared_to(self.v1) ) self.assertEqual( self.v1.distance_squared_to(self.t2), self.v2.distance_squared_to(self.t1) ) self.assertEqual( self.v1.distance_squared_to(self.l2), self.v2.distance_squared_to(self.l1) ) def test_update(self): v = Vector2(3, 4) v.update(0) self.assertEqual(v, Vector2((0, 0))) v.update(5, 1) self.assertEqual(v, Vector2(5, 1)) v.update((4, 1)) self.assertNotEqual(v, Vector2((5, 1))) def test_swizzle(self): self.assertEqual(self.v1.yx, (self.v1.y, self.v1.x)) self.assertEqual( self.v1.xxyyxy, (self.v1.x, self.v1.x, self.v1.y, self.v1.y, self.v1.x, self.v1.y), ) self.v1.xy = self.t2 self.assertEqual(self.v1, self.t2) self.v1.yx = self.t2 self.assertEqual(self.v1, (self.t2[1], self.t2[0])) self.assertEqual(type(self.v1), Vector2) def invalidSwizzleX(): Vector2().xx = (1, 2) def invalidSwizzleY(): Vector2().yy = (1, 2) self.assertRaises(AttributeError, invalidSwizzleX) self.assertRaises(AttributeError, invalidSwizzleY) def invalidAssignment(): Vector2().xy = 3 self.assertRaises(TypeError, invalidAssignment) def unicodeAttribute(): getattr(Vector2(), "ä") self.assertRaises(AttributeError, unicodeAttribute) def test_swizzle_return_types(self): self.assertEqual(type(self.v1.x), float) self.assertEqual(type(self.v1.xy), Vector2) self.assertEqual(type(self.v1.xyx), Vector3) # but we don't have vector4 or above... so tuple. self.assertEqual(type(self.v1.xyxy), tuple) self.assertEqual(type(self.v1.xyxyx), tuple) def test_elementwise(self): v1 = self.v1 v2 = self.v2 s1 = self.s1 s2 = self.s2 # behaviour for "elementwise op scalar" self.assertEqual(v1.elementwise() + s1, (v1.x + s1, v1.y + s1)) self.assertEqual(v1.elementwise() - s1, (v1.x - s1, v1.y - s1)) self.assertEqual(v1.elementwise() * s2, (v1.x * s2, v1.y * s2)) self.assertEqual(v1.elementwise() / s2, (v1.x / s2, v1.y / s2)) self.assertEqual(v1.elementwise() // s1, (v1.x // s1, v1.y // s1)) self.assertEqual(v1.elementwise() ** s1, (v1.x**s1, v1.y**s1)) self.assertEqual(v1.elementwise() % s1, (v1.x % s1, v1.y % s1)) self.assertEqual(v1.elementwise() > s1, v1.x > s1 and v1.y > s1) self.assertEqual(v1.elementwise() < s1, v1.x < s1 and v1.y < s1) self.assertEqual(v1.elementwise() == s1, v1.x == s1 and v1.y == s1) self.assertEqual(v1.elementwise() != s1, s1 not in [v1.x, v1.y]) self.assertEqual(v1.elementwise() >= s1, v1.x >= s1 and v1.y >= s1) self.assertEqual(v1.elementwise() <= s1, v1.x <= s1 and v1.y <= s1) self.assertEqual(v1.elementwise() != s1, s1 not in [v1.x, v1.y]) # behaviour for "scalar op elementwise" self.assertEqual(s1 + v1.elementwise(), (s1 + v1.x, s1 + v1.y)) self.assertEqual(s1 - v1.elementwise(), (s1 - v1.x, s1 - v1.y)) self.assertEqual(s1 * v1.elementwise(), (s1 * v1.x, s1 * v1.y)) self.assertEqual(s1 / v1.elementwise(), (s1 / v1.x, s1 / v1.y)) self.assertEqual(s1 // v1.elementwise(), (s1 // v1.x, s1 // v1.y)) self.assertEqual(s1 ** v1.elementwise(), (s1**v1.x, s1**v1.y)) self.assertEqual(s1 % v1.elementwise(), (s1 % v1.x, s1 % v1.y)) self.assertEqual(s1 < v1.elementwise(), s1 < v1.x and s1 < v1.y) self.assertEqual(s1 > v1.elementwise(), s1 > v1.x and s1 > v1.y) self.assertEqual(s1 == v1.elementwise(), s1 == v1.x and s1 == v1.y) self.assertEqual(s1 != v1.elementwise(), s1 not in [v1.x, v1.y]) self.assertEqual(s1 <= v1.elementwise(), s1 <= v1.x and s1 <= v1.y) self.assertEqual(s1 >= v1.elementwise(), s1 >= v1.x and s1 >= v1.y) self.assertEqual(s1 != v1.elementwise(), s1 not in [v1.x, v1.y]) # behaviour for "elementwise op vector" self.assertEqual(type(v1.elementwise() * v2), type(v1)) self.assertEqual(v1.elementwise() + v2, v1 + v2) self.assertEqual(v1.elementwise() - v2, v1 - v2) self.assertEqual(v1.elementwise() * v2, (v1.x * v2.x, v1.y * v2.y)) self.assertEqual(v1.elementwise() / v2, (v1.x / v2.x, v1.y / v2.y)) self.assertEqual(v1.elementwise() // v2, (v1.x // v2.x, v1.y // v2.y)) self.assertEqual(v1.elementwise() ** v2, (v1.x**v2.x, v1.y**v2.y)) self.assertEqual(v1.elementwise() % v2, (v1.x % v2.x, v1.y % v2.y)) self.assertEqual(v1.elementwise() > v2, v1.x > v2.x and v1.y > v2.y) self.assertEqual(v1.elementwise() < v2, v1.x < v2.x and v1.y < v2.y) self.assertEqual(v1.elementwise() >= v2, v1.x >= v2.x and v1.y >= v2.y) self.assertEqual(v1.elementwise() <= v2, v1.x <= v2.x and v1.y <= v2.y) self.assertEqual(v1.elementwise() == v2, v1.x == v2.x and v1.y == v2.y) self.assertEqual(v1.elementwise() != v2, v1.x != v2.x and v1.y != v2.y) # behaviour for "vector op elementwise" self.assertEqual(v2 + v1.elementwise(), v2 + v1) self.assertEqual(v2 - v1.elementwise(), v2 - v1) self.assertEqual(v2 * v1.elementwise(), (v2.x * v1.x, v2.y * v1.y)) self.assertEqual(v2 / v1.elementwise(), (v2.x / v1.x, v2.y / v1.y)) self.assertEqual(v2 // v1.elementwise(), (v2.x // v1.x, v2.y // v1.y)) self.assertEqual(v2 ** v1.elementwise(), (v2.x**v1.x, v2.y**v1.y)) self.assertEqual(v2 % v1.elementwise(), (v2.x % v1.x, v2.y % v1.y)) self.assertEqual(v2 < v1.elementwise(), v2.x < v1.x and v2.y < v1.y) self.assertEqual(v2 > v1.elementwise(), v2.x > v1.x and v2.y > v1.y) self.assertEqual(v2 <= v1.elementwise(), v2.x <= v1.x and v2.y <= v1.y) self.assertEqual(v2 >= v1.elementwise(), v2.x >= v1.x and v2.y >= v1.y) self.assertEqual(v2 == v1.elementwise(), v2.x == v1.x and v2.y == v1.y) self.assertEqual(v2 != v1.elementwise(), v2.x != v1.x and v2.y != v1.y) # behaviour for "elementwise op elementwise" self.assertEqual(v2.elementwise() + v1.elementwise(), v2 + v1) self.assertEqual(v2.elementwise() - v1.elementwise(), v2 - v1) self.assertEqual( v2.elementwise() * v1.elementwise(), (v2.x * v1.x, v2.y * v1.y) ) self.assertEqual( v2.elementwise() / v1.elementwise(), (v2.x / v1.x, v2.y / v1.y) ) self.assertEqual( v2.elementwise() // v1.elementwise(), (v2.x // v1.x, v2.y // v1.y) ) self.assertEqual(v2.elementwise() ** v1.elementwise(), (v2.x**v1.x, v2.y**v1.y)) self.assertEqual( v2.elementwise() % v1.elementwise(), (v2.x % v1.x, v2.y % v1.y) ) self.assertEqual( v2.elementwise() < v1.elementwise(), v2.x < v1.x and v2.y < v1.y ) self.assertEqual( v2.elementwise() > v1.elementwise(), v2.x > v1.x and v2.y > v1.y ) self.assertEqual( v2.elementwise() <= v1.elementwise(), v2.x <= v1.x and v2.y <= v1.y ) self.assertEqual( v2.elementwise() >= v1.elementwise(), v2.x >= v1.x and v2.y >= v1.y ) self.assertEqual( v2.elementwise() == v1.elementwise(), v2.x == v1.x and v2.y == v1.y ) self.assertEqual( v2.elementwise() != v1.elementwise(), v2.x != v1.x and v2.y != v1.y ) # other behaviour self.assertEqual(abs(v1.elementwise()), (abs(v1.x), abs(v1.y))) self.assertEqual(-v1.elementwise(), -v1) self.assertEqual(+v1.elementwise(), +v1) self.assertEqual(bool(v1.elementwise()), bool(v1)) self.assertEqual(bool(Vector2().elementwise()), bool(Vector2())) self.assertEqual(self.zeroVec.elementwise() ** 0, (1, 1)) self.assertRaises(ValueError, lambda: pow(Vector2(-1, 0).elementwise(), 1.2)) self.assertRaises(ZeroDivisionError, lambda: self.zeroVec.elementwise() ** -1) self.assertRaises(ZeroDivisionError, lambda: self.zeroVec.elementwise() ** -1) self.assertRaises(ZeroDivisionError, lambda: Vector2(1, 1).elementwise() / 0) self.assertRaises(ZeroDivisionError, lambda: Vector2(1, 1).elementwise() // 0) self.assertRaises(ZeroDivisionError, lambda: Vector2(1, 1).elementwise() % 0) self.assertRaises( ZeroDivisionError, lambda: Vector2(1, 1).elementwise() / self.zeroVec ) self.assertRaises( ZeroDivisionError, lambda: Vector2(1, 1).elementwise() // self.zeroVec ) self.assertRaises( ZeroDivisionError, lambda: Vector2(1, 1).elementwise() % self.zeroVec ) self.assertRaises(ZeroDivisionError, lambda: 2 / self.zeroVec.elementwise()) self.assertRaises(ZeroDivisionError, lambda: 2 // self.zeroVec.elementwise()) self.assertRaises(ZeroDivisionError, lambda: 2 % self.zeroVec.elementwise()) def test_slerp(self): self.assertRaises(ValueError, lambda: self.zeroVec.slerp(self.v1, 0.5)) self.assertRaises(ValueError, lambda: self.v1.slerp(self.zeroVec, 0.5)) self.assertRaises(ValueError, lambda: self.zeroVec.slerp(self.zeroVec, 0.5)) v1 = Vector2(1, 0) v2 = Vector2(0, 1) steps = 10 angle_step = v1.angle_to(v2) / steps for i, u in ((i, v1.slerp(v2, i / float(steps))) for i in range(steps + 1)): self.assertAlmostEqual(u.length(), 1) self.assertAlmostEqual(v1.angle_to(u), i * angle_step) self.assertEqual(u, v2) v1 = Vector2(100, 0) v2 = Vector2(0, 10) radial_factor = v2.length() / v1.length() for i, u in ((i, v1.slerp(v2, -i / float(steps))) for i in range(steps + 1)): self.assertAlmostEqual( u.length(), (v2.length() - v1.length()) * (float(i) / steps) + v1.length(), ) self.assertEqual(u, v2) self.assertEqual(v1.slerp(v1, 0.5), v1) self.assertEqual(v2.slerp(v2, 0.5), v2) self.assertRaises(ValueError, lambda: v1.slerp(-v1, 0.5)) def test_lerp(self): v1 = Vector2(0, 0) v2 = Vector2(10, 10) self.assertEqual(v1.lerp(v2, 0.5), (5, 5)) self.assertRaises(ValueError, lambda: v1.lerp(v2, 2.5)) v1 = Vector2(-10, -5) v2 = Vector2(10, 10) self.assertEqual(v1.lerp(v2, 0.5), (0, 2.5)) def test_polar(self): v = Vector2() v.from_polar(self.v1.as_polar()) self.assertEqual(self.v1, v) self.assertEqual(self.v1, Vector2.from_polar(self.v1.as_polar())) self.assertEqual(self.e1.as_polar(), (1, 0)) self.assertEqual(self.e2.as_polar(), (1, 90)) self.assertEqual((2 * self.e2).as_polar(), (2, 90)) self.assertRaises(TypeError, lambda: v.from_polar((None, None))) self.assertRaises(TypeError, lambda: v.from_polar("ab")) self.assertRaises(TypeError, lambda: v.from_polar((None, 1))) self.assertRaises(TypeError, lambda: v.from_polar((1, 2, 3))) self.assertRaises(TypeError, lambda: v.from_polar((1,))) self.assertRaises(TypeError, lambda: v.from_polar(1, 2)) self.assertRaises(TypeError, lambda: Vector2.from_polar((None, None))) self.assertRaises(TypeError, lambda: Vector2.from_polar("ab")) self.assertRaises(TypeError, lambda: Vector2.from_polar((None, 1))) self.assertRaises(TypeError, lambda: Vector2.from_polar((1, 2, 3))) self.assertRaises(TypeError, lambda: Vector2.from_polar((1,))) self.assertRaises(TypeError, lambda: Vector2.from_polar(1, 2)) v.from_polar((0.5, 90)) self.assertEqual(v, 0.5 * self.e2) self.assertEqual(Vector2.from_polar((0.5, 90)), 0.5 * self.e2) self.assertEqual(Vector2.from_polar((0.5, 90)), v) v.from_polar((1, 0)) self.assertEqual(v, self.e1) self.assertEqual(Vector2.from_polar((1, 0)), self.e1) self.assertEqual(Vector2.from_polar((1, 0)), v) def test_subclass_operation(self): class Vector(pygame.math.Vector2): pass vec_a = Vector(2, 0) vec_b = Vector(0, 1) result_add = vec_a + vec_b self.assertEqual(result_add, Vector(2, 1)) vec_a *= 2 self.assertEqual(vec_a, Vector(4, 0)) def test_project_v2_onto_x_axis(self): """Project onto x-axis, e.g. get the component pointing in the x-axis direction.""" # arrange v = Vector2(2, 2) x_axis = Vector2(10, 0) # act actual = v.project(x_axis) # assert self.assertEqual(v.x, actual.x) self.assertEqual(0, actual.y) def test_project_v2_onto_y_axis(self): """Project onto y-axis, e.g. get the component pointing in the y-axis direction.""" # arrange v = Vector2(2, 2) y_axis = Vector2(0, 100) # act actual = v.project(y_axis) # assert self.assertEqual(0, actual.x) self.assertEqual(v.y, actual.y) def test_project_v2_onto_other(self): """Project onto other vector.""" # arrange v = Vector2(2, 3) other = Vector2(3, 5) # act actual = v.project(other) # assert expected = v.dot(other) / other.dot(other) * other self.assertEqual(expected.x, actual.x) self.assertEqual(expected.y, actual.y) def test_project_v2_onto_other_as_tuple(self): """Project onto other tuple as vector.""" # arrange v = Vector2(2, 3) other = Vector2(3, 5) # act actual = v.project(tuple(other)) # assert expected = v.dot(other) / other.dot(other) * other self.assertEqual(expected.x, actual.x) self.assertEqual(expected.y, actual.y) def test_project_v2_onto_other_as_list(self): """Project onto other list as vector.""" # arrange v = Vector2(2, 3) other = Vector2(3, 5) # act actual = v.project(list(other)) # assert expected = v.dot(other) / other.dot(other) * other self.assertEqual(expected.x, actual.x) self.assertEqual(expected.y, actual.y) def test_project_v2_raises_if_other_has_zero_length(self): """Check if exception is raise when projected on vector has zero length.""" # arrange v = Vector2(2, 3) other = Vector2(0, 0) # act / assert self.assertRaises(ValueError, v.project, other) def test_project_v2_raises_if_other_is_not_iterable(self): """Check if exception is raise when projected on vector is not iterable.""" # arrange v = Vector2(2, 3) other = 10 # act / assert self.assertRaises(TypeError, v.project, other) def test_collection_abc(self): v = Vector2(3, 4) self.assertTrue(isinstance(v, Collection)) self.assertFalse(isinstance(v, Sequence)) def test_clamp_mag_v2_max(self): v1 = Vector2(7, 2) v2 = v1.clamp_magnitude(5) v3 = v1.clamp_magnitude(0, 5) self.assertEqual(v2, v3) v1.clamp_magnitude_ip(5) self.assertEqual(v1, v2) v1.clamp_magnitude_ip(0, 5) self.assertEqual(v1, v2) expected_v2 = Vector2(4.807619738204116, 1.3736056394868903) self.assertEqual(expected_v2, v2) def test_clamp_mag_v2_min(self): v1 = Vector2(1, 2) v2 = v1.clamp_magnitude(3, 5) v1.clamp_magnitude_ip(3, 5) expected_v2 = Vector2(1.3416407864998738, 2.6832815729997477) self.assertEqual(expected_v2, v2) self.assertEqual(expected_v2, v1) def test_clamp_mag_v2_no_change(self): v1 = Vector2(1, 2) for args in ( (1, 6), (1.12, 3.55), (0.93, 2.83), (7.6,), ): with self.subTest(args=args): v2 = v1.clamp_magnitude(*args) v1.clamp_magnitude_ip(*args) self.assertEqual(v1, v2) self.assertEqual(v1, Vector2(1, 2)) def test_clamp_mag_v2_edge_cases(self): v1 = Vector2(1, 2) v2 = v1.clamp_magnitude(6, 6) v1.clamp_magnitude_ip(6, 6) self.assertEqual(v1, v2) self.assertAlmostEqual(v1.length(), 6) v2 = v1.clamp_magnitude(0) v1.clamp_magnitude_ip(0, 0) self.assertEqual(v1, v2) self.assertEqual(v1, Vector2()) def test_clamp_mag_v2_errors(self): v1 = Vector2(1, 2) for invalid_args in ( ("foo", "bar"), (1, 2, 3), (342.234, "test"), ): with self.subTest(invalid_args=invalid_args): self.assertRaises(TypeError, v1.clamp_magnitude, *invalid_args) self.assertRaises(TypeError, v1.clamp_magnitude_ip, *invalid_args) for invalid_args in ( (-1,), (4, 3), # min > max (-4, 10), (-4, -2), ): with self.subTest(invalid_args=invalid_args): self.assertRaises(ValueError, v1.clamp_magnitude, *invalid_args) self.assertRaises(ValueError, v1.clamp_magnitude_ip, *invalid_args) # 0 vector v2 = Vector2() self.assertRaises(ValueError, v2.clamp_magnitude, 3) self.assertRaises(ValueError, v2.clamp_magnitude_ip, 4) def test_subclassing_v2(self): """Check if Vector2 is subclassable""" v = Vector2(4, 2) class TestVector(Vector2): def supermariobrosiscool(self): return 722 other = TestVector(4, 1) self.assertEqual(other.supermariobrosiscool(), 722) self.assertNotEqual(type(v), TestVector) self.assertNotEqual(type(v), type(other.copy())) self.assertEqual(TestVector, type(other.reflect(v))) self.assertEqual(TestVector, type(other.lerp(v, 1))) self.assertEqual(TestVector, type(other.slerp(v, 1))) self.assertEqual(TestVector, type(other.rotate(5))) self.assertEqual(TestVector, type(other.rotate_rad(5))) self.assertEqual(TestVector, type(other.project(v))) self.assertEqual(TestVector, type(other.move_towards(v, 5))) self.assertEqual(TestVector, type(other.clamp_magnitude(5))) self.assertEqual(TestVector, type(other.clamp_magnitude(1, 5))) self.assertEqual(TestVector, type(other.elementwise() + other)) other1 = TestVector(4, 2) self.assertEqual(type(other + other1), TestVector) self.assertEqual(type(other - other1), TestVector) self.assertEqual(type(other * 3), TestVector) self.assertEqual(type(other / 3), TestVector) self.assertEqual(type(other.elementwise() ** 3), TestVector) class Vector3TypeTest(unittest.TestCase): def setUp(self): self.zeroVec = Vector3() self.e1 = Vector3(1, 0, 0) self.e2 = Vector3(0, 1, 0) self.e3 = Vector3(0, 0, 1) self.t1 = (1.2, 3.4, 9.6) self.l1 = list(self.t1) self.v1 = Vector3(self.t1) self.t2 = (5.6, 7.8, 2.1) self.l2 = list(self.t2) self.v2 = Vector3(self.t2) self.s1 = 5.6 self.s2 = 7.8 def testConstructionDefault(self): v = Vector3() self.assertEqual(v.x, 0.0) self.assertEqual(v.y, 0.0) self.assertEqual(v.z, 0.0) def testConstructionXYZ(self): v = Vector3(1.2, 3.4, 9.6) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) self.assertEqual(v.z, 9.6) def testConstructionTuple(self): v = Vector3((1.2, 3.4, 9.6)) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) self.assertEqual(v.z, 9.6) def testConstructionList(self): v = Vector3([1.2, 3.4, -9.6]) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) self.assertEqual(v.z, -9.6) def testConstructionVector3(self): v = Vector3(Vector3(1.2, 3.4, -9.6)) self.assertEqual(v.x, 1.2) self.assertEqual(v.y, 3.4) self.assertEqual(v.z, -9.6) def testConstructionScalar(self): v = Vector3(1) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 1.0) self.assertEqual(v.z, 1.0) def testConstructionScalarKeywords(self): v = Vector3(x=1) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 1.0) self.assertEqual(v.z, 1.0) def testConstructionKeywords(self): v = Vector3(x=1, y=2, z=3) self.assertEqual(v.x, 1.0) self.assertEqual(v.y, 2.0) self.assertEqual(v.z, 3.0) def testConstructionMissing(self): self.assertRaises(ValueError, Vector3, 1, 2) self.assertRaises(ValueError, Vector3, x=1, y=2) def testAttributeAccess(self): tmp = self.v1.x self.assertEqual(tmp, self.v1.x) self.assertEqual(tmp, self.v1[0]) tmp = self.v1.y self.assertEqual(tmp, self.v1.y) self.assertEqual(tmp, self.v1[1]) tmp = self.v1.z self.assertEqual(tmp, self.v1.z) self.assertEqual(tmp, self.v1[2]) self.v1.x = 3.141 self.assertEqual(self.v1.x, 3.141) self.v1.y = 3.141 self.assertEqual(self.v1.y, 3.141) self.v1.z = 3.141 self.assertEqual(self.v1.z, 3.141) def assign_nonfloat(): v = Vector2() v.x = "spam" self.assertRaises(TypeError, assign_nonfloat) def testCopy(self): v_copy0 = Vector3(2014.0, 2032.0, 2076.0) v_copy1 = v_copy0.copy() self.assertEqual(v_copy0.x, v_copy1.x) self.assertEqual(v_copy0.y, v_copy1.y) self.assertEqual(v_copy0.z, v_copy1.z) def testSequence(self): v = Vector3(1.2, 3.4, -9.6) self.assertEqual(len(v), 3) self.assertEqual(v[0], 1.2) self.assertEqual(v[1], 3.4) self.assertEqual(v[2], -9.6) self.assertRaises(IndexError, lambda: v[3]) self.assertEqual(v[-1], -9.6) self.assertEqual(v[-2], 3.4) self.assertEqual(v[-3], 1.2) self.assertRaises(IndexError, lambda: v[-4]) self.assertEqual(v[:], [1.2, 3.4, -9.6]) self.assertEqual(v[1:], [3.4, -9.6]) self.assertEqual(v[:1], [1.2]) self.assertEqual(v[:-1], [1.2, 3.4]) self.assertEqual(v[1:2], [3.4]) self.assertEqual(list(v), [1.2, 3.4, -9.6]) self.assertEqual(tuple(v), (1.2, 3.4, -9.6)) v[0] = 5.6 v[1] = 7.8 v[2] = -2.1 self.assertEqual(v.x, 5.6) self.assertEqual(v.y, 7.8) self.assertEqual(v.z, -2.1) v[:] = [9.1, 11.12, -13.41] self.assertEqual(v.x, 9.1) self.assertEqual(v.y, 11.12) self.assertEqual(v.z, -13.41) def overpopulate(): v = Vector3() v[:] = [1, 2, 3, 4] self.assertRaises(ValueError, overpopulate) def underpopulate(): v = Vector3() v[:] = [1] self.assertRaises(ValueError, underpopulate) def assign_nonfloat(): v = Vector2() v[0] = "spam" self.assertRaises(TypeError, assign_nonfloat) def testExtendedSlicing(self): # deletion def delSlice(vec, start=None, stop=None, step=None): if start is not None and stop is not None and step is not None: del vec[start:stop:step] elif start is not None and stop is None and step is not None: del vec[start::step] elif start is None and stop is None and step is not None: del vec[::step] v = Vector3(self.v1) self.assertRaises(TypeError, delSlice, v, None, None, 2) self.assertRaises(TypeError, delSlice, v, 1, None, 2) self.assertRaises(TypeError, delSlice, v, 1, 2, 1) # assignment v = Vector3(self.v1) v[::2] = [-1.1, -2.2] self.assertEqual(v, [-1.1, self.v1.y, -2.2]) v = Vector3(self.v1) v[::-2] = [10, 20] self.assertEqual(v, [20, self.v1.y, 10]) v = Vector3(self.v1) v[::-1] = v self.assertEqual(v, [self.v1.z, self.v1.y, self.v1.x]) a = Vector3(self.v1) b = Vector3(self.v1) c = Vector3(self.v1) a[1:2] = [2.2] b[slice(1, 2)] = [2.2] c[1:2:] = (2.2,) self.assertEqual(a, b) self.assertEqual(a, c) self.assertEqual(type(a), type(self.v1)) self.assertEqual(type(b), type(self.v1)) self.assertEqual(type(c), type(self.v1)) def test_contains(self): c = Vector3(0, 1, 2) # call __contains__ explicitly to test that it is defined self.assertTrue(c.__contains__(0)) self.assertTrue(0 in c) self.assertTrue(1 in c) self.assertTrue(2 in c) self.assertTrue(3 not in c) self.assertFalse(c.__contains__(10)) self.assertRaises(TypeError, lambda: "string" in c) self.assertRaises(TypeError, lambda: 3 + 4j in c) def testAdd(self): v3 = self.v1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.v2.x) self.assertEqual(v3.y, self.v1.y + self.v2.y) self.assertEqual(v3.z, self.v1.z + self.v2.z) v3 = self.v1 + self.t2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.t2[0]) self.assertEqual(v3.y, self.v1.y + self.t2[1]) self.assertEqual(v3.z, self.v1.z + self.t2[2]) v3 = self.v1 + self.l2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x + self.l2[0]) self.assertEqual(v3.y, self.v1.y + self.l2[1]) self.assertEqual(v3.z, self.v1.z + self.l2[2]) v3 = self.t1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.t1[0] + self.v2.x) self.assertEqual(v3.y, self.t1[1] + self.v2.y) self.assertEqual(v3.z, self.t1[2] + self.v2.z) v3 = self.l1 + self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.l1[0] + self.v2.x) self.assertEqual(v3.y, self.l1[1] + self.v2.y) self.assertEqual(v3.z, self.l1[2] + self.v2.z) def testSub(self): v3 = self.v1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.v2.x) self.assertEqual(v3.y, self.v1.y - self.v2.y) self.assertEqual(v3.z, self.v1.z - self.v2.z) v3 = self.v1 - self.t2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.t2[0]) self.assertEqual(v3.y, self.v1.y - self.t2[1]) self.assertEqual(v3.z, self.v1.z - self.t2[2]) v3 = self.v1 - self.l2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.v1.x - self.l2[0]) self.assertEqual(v3.y, self.v1.y - self.l2[1]) self.assertEqual(v3.z, self.v1.z - self.l2[2]) v3 = self.t1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.t1[0] - self.v2.x) self.assertEqual(v3.y, self.t1[1] - self.v2.y) self.assertEqual(v3.z, self.t1[2] - self.v2.z) v3 = self.l1 - self.v2 self.assertTrue(isinstance(v3, type(self.v1))) self.assertEqual(v3.x, self.l1[0] - self.v2.x) self.assertEqual(v3.y, self.l1[1] - self.v2.y) self.assertEqual(v3.z, self.l1[2] - self.v2.z) def testScalarMultiplication(self): v = self.s1 * self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.s1 * self.v1.x) self.assertEqual(v.y, self.s1 * self.v1.y) self.assertEqual(v.z, self.s1 * self.v1.z) v = self.v1 * self.s2 self.assertEqual(v.x, self.v1.x * self.s2) self.assertEqual(v.y, self.v1.y * self.s2) self.assertEqual(v.z, self.v1.z * self.s2) def testScalarDivision(self): v = self.v1 / self.s1 self.assertTrue(isinstance(v, type(self.v1))) self.assertAlmostEqual(v.x, self.v1.x / self.s1) self.assertAlmostEqual(v.y, self.v1.y / self.s1) self.assertAlmostEqual(v.z, self.v1.z / self.s1) v = self.v1 // self.s2 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.v1.x // self.s2) self.assertEqual(v.y, self.v1.y // self.s2) self.assertEqual(v.z, self.v1.z // self.s2) def testBool(self): self.assertEqual(bool(self.zeroVec), False) self.assertEqual(bool(self.v1), True) self.assertTrue(not self.zeroVec) self.assertTrue(self.v1) def testUnary(self): v = +self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, self.v1.x) self.assertEqual(v.y, self.v1.y) self.assertEqual(v.z, self.v1.z) self.assertNotEqual(id(v), id(self.v1)) v = -self.v1 self.assertTrue(isinstance(v, type(self.v1))) self.assertEqual(v.x, -self.v1.x) self.assertEqual(v.y, -self.v1.y) self.assertEqual(v.z, -self.v1.z) self.assertNotEqual(id(v), id(self.v1)) def testCompare(self): int_vec = Vector3(3, -2, 13) flt_vec = Vector3(3.0, -2.0, 13.0) zero_vec = Vector3(0, 0, 0) self.assertEqual(int_vec == flt_vec, True) self.assertEqual(int_vec != flt_vec, False) self.assertEqual(int_vec != zero_vec, True) self.assertEqual(flt_vec == zero_vec, False) self.assertEqual(int_vec == (3, -2, 13), True) self.assertEqual(int_vec != (3, -2, 13), False) self.assertEqual(int_vec != [0, 0], True) self.assertEqual(int_vec == [0, 0], False) self.assertEqual(int_vec != 5, True) self.assertEqual(int_vec == 5, False) self.assertEqual(int_vec != [3, -2, 0, 1], True) self.assertEqual(int_vec == [3, -2, 0, 1], False) def testStr(self): v = Vector3(1.2, 3.4, 5.6) self.assertEqual(str(v), "[1.2, 3.4, 5.6]") def testRepr(self): v = Vector3(1.2, 3.4, -9.6) self.assertEqual(v.__repr__(), "") self.assertEqual(v, Vector3(v.__repr__())) def testIter(self): it = self.v1.__iter__() next_ = it.__next__ self.assertEqual(next_(), self.v1[0]) self.assertEqual(next_(), self.v1[1]) self.assertEqual(next_(), self.v1[2]) self.assertRaises(StopIteration, lambda: next_()) it1 = self.v1.__iter__() it2 = self.v1.__iter__() self.assertNotEqual(id(it1), id(it2)) self.assertEqual(id(it1), id(it1.__iter__())) self.assertEqual(list(it1), list(it2)) self.assertEqual(list(self.v1.__iter__()), self.l1) idx = 0 for val in self.v1: self.assertEqual(val, self.v1[idx]) idx += 1 def test___round___basic(self): self.assertEqual( round(pygame.Vector3(0.0, 0.0, 0.0)), pygame.Vector3(0.0, 0.0, 0.0) ) self.assertEqual(type(round(pygame.Vector3(0.0, 0.0, 0.0))), pygame.Vector3) self.assertEqual( round(pygame.Vector3(1.0, 1.0, 1.0)), round(pygame.Vector3(1.0, 1.0, 1.0)) ) self.assertEqual( round(pygame.Vector3(10.0, 10.0, 10.0)), round(pygame.Vector3(10.0, 10.0, 10.0)), ) self.assertEqual( round(pygame.Vector3(1000000000.0, 1000000000.0, 1000000000.0)), pygame.Vector3(1000000000.0, 1000000000.0, 1000000000.0), ) self.assertEqual( round(pygame.Vector3(1e20, 1e20, 1e20)), pygame.Vector3(1e20, 1e20, 1e20) ) self.assertEqual( round(pygame.Vector3(-1.0, -1.0, -1.0)), pygame.Vector3(-1.0, -1.0, -1.0) ) self.assertEqual( round(pygame.Vector3(-10.0, -10.0, -10.0)), pygame.Vector3(-10.0, -10.0, -10.0), ) self.assertEqual( round(pygame.Vector3(-1000000000.0, -1000000000.0, -1000000000.0)), pygame.Vector3(-1000000000.0, -1000000000.0, -1000000000.0), ) self.assertEqual( round(pygame.Vector3(-1e20, -1e20, -1e20)), pygame.Vector3(-1e20, -1e20, -1e20), ) self.assertEqual( round(pygame.Vector3(0.1, 0.1, 0.1)), pygame.Vector3(0.0, 0.0, 0.0) ) self.assertEqual( round(pygame.Vector3(1.1, 1.1, 1.1)), pygame.Vector3(1.0, 1.0, 1.0) ) self.assertEqual( round(pygame.Vector3(10.1, 10.1, 10.1)), pygame.Vector3(10.0, 10.0, 10.0) ) self.assertEqual( round(pygame.Vector3(1000000000.1, 1000000000.1, 1000000000.1)), pygame.Vector3(1000000000.0, 1000000000.0, 1000000000.0), ) self.assertEqual( round(pygame.Vector3(-1.1, -1.1, -1.1)), pygame.Vector3(-1.0, -1.0, -1.0) ) self.assertEqual( round(pygame.Vector3(-10.1, -10.1, -10.1)), pygame.Vector3(-10.0, -10.0, -10.0), ) self.assertEqual( round(pygame.Vector3(-1000000000.1, -1000000000.1, -1000000000.1)), pygame.Vector3(-1000000000.0, -1000000000.0, -1000000000.0), ) self.assertEqual( round(pygame.Vector3(0.9, 0.9, 0.9)), pygame.Vector3(1.0, 1.0, 1.0) ) self.assertEqual( round(pygame.Vector3(9.9, 9.9, 9.9)), pygame.Vector3(10.0, 10.0, 10.0) ) self.assertEqual( round(pygame.Vector3(999999999.9, 999999999.9, 999999999.9)), pygame.Vector3(1000000000.0, 1000000000.0, 1000000000.0), ) self.assertEqual( round(pygame.Vector3(-0.9, -0.9, -0.9)), pygame.Vector3(-1.0, -1.0, -1.0) ) self.assertEqual( round(pygame.Vector3(-9.9, -9.9, -9.9)), pygame.Vector3(-10.0, -10.0, -10.0) ) self.assertEqual( round(pygame.Vector3(-999999999.9, -999999999.9, -999999999.9)), pygame.Vector3(-1000000000.0, -1000000000.0, -1000000000.0), ) self.assertEqual( round(pygame.Vector3(-8.0, -8.0, -8.0), -1), pygame.Vector3(-10.0, -10.0, -10.0), ) self.assertEqual( type(round(pygame.Vector3(-8.0, -8.0, -8.0), -1)), pygame.Vector3 ) self.assertEqual( type(round(pygame.Vector3(-8.0, -8.0, -8.0), 0)), pygame.Vector3 ) self.assertEqual( type(round(pygame.Vector3(-8.0, -8.0, -8.0), 1)), pygame.Vector3 ) # Check even / odd rounding behaviour self.assertEqual(round(pygame.Vector3(5.5, 5.5, 5.5)), pygame.Vector3(6, 6, 6)) self.assertEqual( round(pygame.Vector3(5.4, 5.4, 5.4)), pygame.Vector3(5.0, 5.0, 5.0) ) self.assertEqual( round(pygame.Vector3(5.6, 5.6, 5.6)), pygame.Vector3(6.0, 6.0, 6.0) ) self.assertEqual( round(pygame.Vector3(-5.5, -5.5, -5.5)), pygame.Vector3(-6, -6, -6) ) self.assertEqual( round(pygame.Vector3(-5.4, -5.4, -5.4)), pygame.Vector3(-5, -5, -5) ) self.assertEqual( round(pygame.Vector3(-5.6, -5.6, -5.6)), pygame.Vector3(-6, -6, -6) ) self.assertRaises(TypeError, round, pygame.Vector3(1.0, 1.0, 1.0), 1.5) self.assertRaises(TypeError, round, pygame.Vector3(1.0, 1.0, 1.0), "a") def test_rotate(self): v1 = Vector3(1, 0, 0) axis = Vector3(0, 1, 0) v2 = v1.rotate(90, axis) v3 = v1.rotate(90 + 360, axis) self.assertEqual(v1.x, 1) self.assertEqual(v1.y, 0) self.assertEqual(v1.z, 0) self.assertEqual(v2.x, 0) self.assertEqual(v2.y, 0) self.assertEqual(v2.z, -1) self.assertEqual(v3.x, v2.x) self.assertEqual(v3.y, v2.y) self.assertEqual(v3.z, v2.z) v1 = Vector3(-1, -1, -1) v2 = v1.rotate(-90, axis) self.assertEqual(v2.x, 1) self.assertEqual(v2.y, -1) self.assertEqual(v2.z, -1) v2 = v1.rotate(360, axis) self.assertEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) self.assertEqual(v1.z, v2.z) v2 = v1.rotate(0, axis) self.assertEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) self.assertEqual(v1.z, v2.z) # issue 214 self.assertEqual( Vector3(0, 1, 0).rotate(359.9999999, Vector3(0, 0, 1)), Vector3(0, 1, 0) ) def test_rotate_rad(self): axis = Vector3(0, 0, 1) tests = ( ((1, 0, 0), math.pi), ((1, 0, 0), math.pi / 2), ((1, 0, 0), -math.pi / 2), ((1, 0, 0), math.pi / 4), ) for initialVec, radians in tests: vec = Vector3(initialVec).rotate_rad(radians, axis) self.assertEqual(vec, (math.cos(radians), math.sin(radians), 0)) def test_rotate_ip(self): v = Vector3(1, 0, 0) axis = Vector3(0, 1, 0) self.assertEqual(v.rotate_ip(90, axis), None) self.assertEqual(v.x, 0) self.assertEqual(v.y, 0) self.assertEqual(v.z, -1) v = Vector3(-1, -1, 1) v.rotate_ip(-90, axis) self.assertEqual(v.x, -1) self.assertEqual(v.y, -1) self.assertEqual(v.z, -1) def test_rotate_rad_ip(self): axis = Vector3(0, 0, 1) tests = ( ((1, 0, 0), math.pi), ((1, 0, 0), math.pi / 2), ((1, 0, 0), -math.pi / 2), ((1, 0, 0), math.pi / 4), ) for initialVec, radians in tests: vec = Vector3(initialVec) vec.rotate_rad_ip(radians, axis) self.assertEqual(vec, (math.cos(radians), math.sin(radians), 0)) def test_rotate_x(self): v1 = Vector3(1, 0, 0) v2 = v1.rotate_x(90) v3 = v1.rotate_x(90 + 360) self.assertEqual(v1.x, 1) self.assertEqual(v1.y, 0) self.assertEqual(v1.z, 0) self.assertEqual(v2.x, 1) self.assertEqual(v2.y, 0) self.assertEqual(v2.z, 0) self.assertEqual(v3.x, v2.x) self.assertEqual(v3.y, v2.y) self.assertEqual(v3.z, v2.z) v1 = Vector3(-1, -1, -1) v2 = v1.rotate_x(-90) self.assertEqual(v2.x, -1) self.assertAlmostEqual(v2.y, -1) self.assertAlmostEqual(v2.z, 1) v2 = v1.rotate_x(360) self.assertAlmostEqual(v1.x, v2.x) self.assertAlmostEqual(v1.y, v2.y) self.assertAlmostEqual(v1.z, v2.z) v2 = v1.rotate_x(0) self.assertEqual(v1.x, v2.x) self.assertAlmostEqual(v1.y, v2.y) self.assertAlmostEqual(v1.z, v2.z) def test_rotate_x_rad(self): vec = Vector3(0, 1, 0) result = vec.rotate_x_rad(math.pi / 2) self.assertEqual(result, (0, 0, 1)) def test_rotate_x_ip(self): v = Vector3(1, 0, 0) self.assertEqual(v.rotate_x_ip(90), None) self.assertEqual(v.x, 1) self.assertEqual(v.y, 0) self.assertEqual(v.z, 0) v = Vector3(-1, -1, 1) v.rotate_x_ip(-90) self.assertEqual(v.x, -1) self.assertAlmostEqual(v.y, 1) self.assertAlmostEqual(v.z, 1) def test_rotate_x_rad_ip(self): vec = Vector3(0, 1, 0) vec.rotate_x_rad_ip(math.pi / 2) self.assertEqual(vec, (0, 0, 1)) def test_rotate_y(self): v1 = Vector3(1, 0, 0) v2 = v1.rotate_y(90) v3 = v1.rotate_y(90 + 360) self.assertEqual(v1.x, 1) self.assertEqual(v1.y, 0) self.assertEqual(v1.z, 0) self.assertAlmostEqual(v2.x, 0) self.assertEqual(v2.y, 0) self.assertAlmostEqual(v2.z, -1) self.assertAlmostEqual(v3.x, v2.x) self.assertEqual(v3.y, v2.y) self.assertAlmostEqual(v3.z, v2.z) v1 = Vector3(-1, -1, -1) v2 = v1.rotate_y(-90) self.assertAlmostEqual(v2.x, 1) self.assertEqual(v2.y, -1) self.assertAlmostEqual(v2.z, -1) v2 = v1.rotate_y(360) self.assertAlmostEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) self.assertAlmostEqual(v1.z, v2.z) v2 = v1.rotate_y(0) self.assertEqual(v1.x, v2.x) self.assertEqual(v1.y, v2.y) self.assertEqual(v1.z, v2.z) def test_rotate_y_rad(self): vec = Vector3(1, 0, 0) result = vec.rotate_y_rad(math.pi / 2) self.assertEqual(result, (0, 0, -1)) def test_rotate_y_ip(self): v = Vector3(1, 0, 0) self.assertEqual(v.rotate_y_ip(90), None) self.assertAlmostEqual(v.x, 0) self.assertEqual(v.y, 0) self.assertAlmostEqual(v.z, -1) v = Vector3(-1, -1, 1) v.rotate_y_ip(-90) self.assertAlmostEqual(v.x, -1) self.assertEqual(v.y, -1) self.assertAlmostEqual(v.z, -1) def test_rotate_y_rad_ip(self): vec = Vector3(1, 0, 0) vec.rotate_y_rad_ip(math.pi / 2) self.assertEqual(vec, (0, 0, -1)) def test_rotate_z(self): v1 = Vector3(1, 0, 0) v2 = v1.rotate_z(90) v3 = v1.rotate_z(90 + 360) self.assertEqual(v1.x, 1) self.assertEqual(v1.y, 0) self.assertEqual(v1.z, 0) self.assertAlmostEqual(v2.x, 0) self.assertAlmostEqual(v2.y, 1) self.assertEqual(v2.z, 0) self.assertAlmostEqual(v3.x, v2.x) self.assertAlmostEqual(v3.y, v2.y) self.assertEqual(v3.z, v2.z) v1 = Vector3(-1, -1, -1) v2 = v1.rotate_z(-90) self.assertAlmostEqual(v2.x, -1) self.assertAlmostEqual(v2.y, 1) self.assertEqual(v2.z, -1) v2 = v1.rotate_z(360) self.assertAlmostEqual(v1.x, v2.x) self.assertAlmostEqual(v1.y, v2.y) self.assertEqual(v1.z, v2.z) v2 = v1.rotate_z(0) self.assertAlmostEqual(v1.x, v2.x) self.assertAlmostEqual(v1.y, v2.y) self.assertEqual(v1.z, v2.z) def test_rotate_z_rad(self): vec = Vector3(1, 0, 0) result = vec.rotate_z_rad(math.pi / 2) self.assertEqual(result, (0, 1, 0)) def test_rotate_z_ip(self): v = Vector3(1, 0, 0) self.assertEqual(v.rotate_z_ip(90), None) self.assertAlmostEqual(v.x, 0) self.assertAlmostEqual(v.y, 1) self.assertEqual(v.z, 0) v = Vector3(-1, -1, 1) v.rotate_z_ip(-90) self.assertAlmostEqual(v.x, -1) self.assertAlmostEqual(v.y, 1) self.assertEqual(v.z, 1) def test_rotate_z_rad_ip(self): vec = Vector3(1, 0, 0) vec.rotate_z_rad_ip(math.pi / 2) self.assertEqual(vec, (0, 1, 0)) def test_normalize(self): v = self.v1.normalize() # length is 1 self.assertAlmostEqual(v.x * v.x + v.y * v.y + v.z * v.z, 1.0) # v1 is unchanged self.assertEqual(self.v1.x, self.l1[0]) self.assertEqual(self.v1.y, self.l1[1]) self.assertEqual(self.v1.z, self.l1[2]) # v2 is parallel to v1 (tested via cross product) cross = ( (self.v1.y * v.z - self.v1.z * v.y) ** 2 + (self.v1.z * v.x - self.v1.x * v.z) ** 2 + (self.v1.x * v.y - self.v1.y * v.x) ** 2 ) self.assertAlmostEqual(cross, 0.0) self.assertRaises(ValueError, lambda: self.zeroVec.normalize()) def test_normalize_ip(self): v = +self.v1 # v has length != 1 before normalizing self.assertNotEqual(v.x * v.x + v.y * v.y + v.z * v.z, 1.0) # inplace operations should return None self.assertEqual(v.normalize_ip(), None) # length is 1 self.assertAlmostEqual(v.x * v.x + v.y * v.y + v.z * v.z, 1.0) # v2 is parallel to v1 (tested via cross product) cross = ( (self.v1.y * v.z - self.v1.z * v.y) ** 2 + (self.v1.z * v.x - self.v1.x * v.z) ** 2 + (self.v1.x * v.y - self.v1.y * v.x) ** 2 ) self.assertAlmostEqual(cross, 0.0) self.assertRaises(ValueError, lambda: self.zeroVec.normalize_ip()) def test_is_normalized(self): self.assertEqual(self.v1.is_normalized(), False) v = self.v1.normalize() self.assertEqual(v.is_normalized(), True) self.assertEqual(self.e2.is_normalized(), True) self.assertEqual(self.zeroVec.is_normalized(), False) def test_cross(self): def cross(a, b): return Vector3( a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0], ) self.assertEqual(self.v1.cross(self.v2), cross(self.v1, self.v2)) self.assertEqual(self.v1.cross(self.l2), cross(self.v1, self.l2)) self.assertEqual(self.v1.cross(self.t2), cross(self.v1, self.t2)) self.assertEqual(self.v1.cross(self.v2), -self.v2.cross(self.v1)) self.assertEqual(self.v1.cross(self.v1), self.zeroVec) def test_dot(self): self.assertAlmostEqual( self.v1.dot(self.v2), self.v1.x * self.v2.x + self.v1.y * self.v2.y + self.v1.z * self.v2.z, ) self.assertAlmostEqual( self.v1.dot(self.l2), self.v1.x * self.l2[0] + self.v1.y * self.l2[1] + self.v1.z * self.l2[2], ) self.assertAlmostEqual( self.v1.dot(self.t2), self.v1.x * self.t2[0] + self.v1.y * self.t2[1] + self.v1.z * self.t2[2], ) self.assertAlmostEqual(self.v1.dot(self.v2), self.v2.dot(self.v1)) self.assertAlmostEqual(self.v1.dot(self.v2), self.v1 * self.v2) def test_angle_to(self): self.assertEqual(Vector3(1, 1, 0).angle_to((-1, 1, 0)), 90) self.assertEqual(Vector3(1, 0, 0).angle_to((0, 0, -1)), 90) self.assertEqual(Vector3(1, 0, 0).angle_to((-1, 0, 1)), 135) self.assertEqual(abs(Vector3(1, 0, 1).angle_to((-1, 0, -1))), 180) # if we rotate v1 by the angle_to v2 around their cross product # we should look in the same direction self.assertEqual( self.v1.rotate( self.v1.angle_to(self.v2), self.v1.cross(self.v2) ).normalize(), self.v2.normalize(), ) def test_scale_to_length(self): v = Vector3(1, 1, 1) v.scale_to_length(2.5) self.assertEqual(v, Vector3(2.5, 2.5, 2.5) / math.sqrt(3)) self.assertRaises(ValueError, lambda: self.zeroVec.scale_to_length(1)) self.assertEqual(v.scale_to_length(0), None) self.assertEqual(v, self.zeroVec) def test_length(self): self.assertEqual(Vector3(3, 4, 5).length(), math.sqrt(3 * 3 + 4 * 4 + 5 * 5)) self.assertEqual(Vector3(-3, 4, 5).length(), math.sqrt(-3 * -3 + 4 * 4 + 5 * 5)) self.assertEqual(self.zeroVec.length(), 0) def test_length_squared(self): self.assertEqual(Vector3(3, 4, 5).length_squared(), 3 * 3 + 4 * 4 + 5 * 5) self.assertEqual(Vector3(-3, 4, 5).length_squared(), -3 * -3 + 4 * 4 + 5 * 5) self.assertEqual(self.zeroVec.length_squared(), 0) def test_reflect(self): v = Vector3(1, -1, 1) n = Vector3(0, 1, 0) self.assertEqual(v.reflect(n), Vector3(1, 1, 1)) self.assertEqual(v.reflect(3 * n), v.reflect(n)) self.assertEqual(v.reflect(-v), -v) self.assertRaises(ValueError, lambda: v.reflect(self.zeroVec)) def test_reflect_ip(self): v1 = Vector3(1, -1, 1) v2 = Vector3(v1) n = Vector3(0, 1, 0) self.assertEqual(v2.reflect_ip(n), None) self.assertEqual(v2, Vector3(1, 1, 1)) v2 = Vector3(v1) v2.reflect_ip(3 * n) self.assertEqual(v2, v1.reflect(n)) v2 = Vector3(v1) v2.reflect_ip(-v1) self.assertEqual(v2, -v1) self.assertRaises(ValueError, lambda: v2.reflect_ip(self.zeroVec)) def test_distance_to(self): diff = self.v1 - self.v2 self.assertEqual(self.e1.distance_to(self.e2), math.sqrt(2)) self.assertEqual(self.e1.distance_to((0, 1, 0)), math.sqrt(2)) self.assertEqual(self.e1.distance_to([0, 1, 0]), math.sqrt(2)) self.assertEqual( self.v1.distance_to(self.v2), math.sqrt(diff.x * diff.x + diff.y * diff.y + diff.z * diff.z), ) self.assertEqual( self.v1.distance_to(self.t2), math.sqrt(diff.x * diff.x + diff.y * diff.y + diff.z * diff.z), ) self.assertEqual( self.v1.distance_to(self.l2), math.sqrt(diff.x * diff.x + diff.y * diff.y + diff.z * diff.z), ) self.assertEqual(self.v1.distance_to(self.v1), 0) self.assertEqual(self.v1.distance_to(self.t1), 0) self.assertEqual(self.v1.distance_to(self.l1), 0) self.assertEqual(self.v1.distance_to(self.v2), self.v2.distance_to(self.v1)) self.assertEqual(self.v1.distance_to(self.t2), self.v2.distance_to(self.t1)) self.assertEqual(self.v1.distance_to(self.l2), self.v2.distance_to(self.l1)) def test_distance_to_exceptions(self): v2 = Vector2(10, 10) v3 = Vector3(1, 1, 1) # illegal distance Vector3-Vector2 / Vector2-Vector3 self.assertRaises(ValueError, v2.distance_to, v3) self.assertRaises(ValueError, v3.distance_to, v2) # distance to illegal tuple/list positions self.assertRaises(ValueError, v2.distance_to, (1, 1, 1)) self.assertRaises(ValueError, v2.distance_to, (1, 1, 0)) self.assertRaises(ValueError, v2.distance_to, (1,)) self.assertRaises(ValueError, v2.distance_to, [1, 1, 1]) self.assertRaises(ValueError, v2.distance_to, [1, 1, 0]) self.assertRaises( ValueError, v2.distance_to, [ 1, ], ) self.assertRaises(ValueError, v2.distance_to, (1, 1, 1)) # vec3 self.assertRaises(ValueError, v3.distance_to, (1, 1)) self.assertRaises(ValueError, v3.distance_to, (1,)) self.assertRaises(ValueError, v3.distance_to, [1, 1]) self.assertRaises( ValueError, v3.distance_to, [ 1, ], ) # illegal types as positions self.assertRaises(TypeError, v2.distance_to, (1, "hello")) self.assertRaises(TypeError, v2.distance_to, ([], [])) self.assertRaises(TypeError, v2.distance_to, (1, ("hello",))) # illegal args number self.assertRaises(TypeError, v2.distance_to) self.assertRaises(TypeError, v2.distance_to, (1, 1), (1, 2)) self.assertRaises(TypeError, v2.distance_to, (1, 1), (1, 2), 1) def test_distance_squared_to_exceptions(self): v2 = Vector2(10, 10) v3 = Vector3(1, 1, 1) dist_t = v2.distance_squared_to dist_t3 = v3.distance_squared_to # illegal distance Vector3-Vector2 / Vector2-Vector3 self.assertRaises(ValueError, dist_t, v3) self.assertRaises(ValueError, dist_t3, v2) # distance to illegal tuple/list positions self.assertRaises(ValueError, dist_t, (1, 1, 1)) self.assertRaises(ValueError, dist_t, (1, 1, 0)) self.assertRaises(ValueError, dist_t, (1,)) self.assertRaises(ValueError, dist_t, [1, 1, 1]) self.assertRaises(ValueError, dist_t, [1, 1, 0]) self.assertRaises( ValueError, dist_t, [ 1, ], ) self.assertRaises(ValueError, dist_t, (1, 1, 1)) # vec3 self.assertRaises(ValueError, dist_t3, (1, 1)) self.assertRaises(ValueError, dist_t3, (1,)) self.assertRaises(ValueError, dist_t3, [1, 1]) self.assertRaises( ValueError, dist_t3, [ 1, ], ) # illegal types as positions self.assertRaises(TypeError, dist_t, (1, "hello")) self.assertRaises(TypeError, dist_t, ([], [])) self.assertRaises(TypeError, dist_t, (1, ("hello",))) # illegal args number self.assertRaises(TypeError, dist_t) self.assertRaises(TypeError, dist_t, (1, 1), (1, 2)) self.assertRaises(TypeError, dist_t, (1, 1), (1, 2), 1) def test_distance_squared_to(self): diff = self.v1 - self.v2 self.assertEqual(self.e1.distance_squared_to(self.e2), 2) self.assertEqual(self.e1.distance_squared_to((0, 1, 0)), 2) self.assertEqual(self.e1.distance_squared_to([0, 1, 0]), 2) self.assertAlmostEqual( self.v1.distance_squared_to(self.v2), diff.x * diff.x + diff.y * diff.y + diff.z * diff.z, ) self.assertAlmostEqual( self.v1.distance_squared_to(self.t2), diff.x * diff.x + diff.y * diff.y + diff.z * diff.z, ) self.assertAlmostEqual( self.v1.distance_squared_to(self.l2), diff.x * diff.x + diff.y * diff.y + diff.z * diff.z, ) self.assertEqual(self.v1.distance_squared_to(self.v1), 0) self.assertEqual(self.v1.distance_squared_to(self.t1), 0) self.assertEqual(self.v1.distance_squared_to(self.l1), 0) self.assertEqual( self.v1.distance_squared_to(self.v2), self.v2.distance_squared_to(self.v1) ) self.assertEqual( self.v1.distance_squared_to(self.t2), self.v2.distance_squared_to(self.t1) ) self.assertEqual( self.v1.distance_squared_to(self.l2), self.v2.distance_squared_to(self.l1) ) def test_swizzle(self): self.assertEqual(self.v1.yxz, (self.v1.y, self.v1.x, self.v1.z)) self.assertEqual( self.v1.xxyyzzxyz, ( self.v1.x, self.v1.x, self.v1.y, self.v1.y, self.v1.z, self.v1.z, self.v1.x, self.v1.y, self.v1.z, ), ) self.v1.xyz = self.t2 self.assertEqual(self.v1, self.t2) self.v1.zxy = self.t2 self.assertEqual(self.v1, (self.t2[1], self.t2[2], self.t2[0])) self.v1.yz = self.t2[:2] self.assertEqual(self.v1, (self.t2[1], self.t2[0], self.t2[1])) self.assertEqual(type(self.v1), Vector3) @unittest.skipIf(IS_PYPY, "known pypy failure") def test_invalid_swizzle(self): def invalidSwizzleX(): Vector3().xx = (1, 2) def invalidSwizzleY(): Vector3().yy = (1, 2) def invalidSwizzleZ(): Vector3().zz = (1, 2) def invalidSwizzleW(): Vector3().ww = (1, 2) self.assertRaises(AttributeError, invalidSwizzleX) self.assertRaises(AttributeError, invalidSwizzleY) self.assertRaises(AttributeError, invalidSwizzleZ) self.assertRaises(AttributeError, invalidSwizzleW) def invalidAssignment(): Vector3().xy = 3 self.assertRaises(TypeError, invalidAssignment) def test_swizzle_return_types(self): self.assertEqual(type(self.v1.x), float) self.assertEqual(type(self.v1.xy), Vector2) self.assertEqual(type(self.v1.xyz), Vector3) # but we don't have vector4 or above... so tuple. self.assertEqual(type(self.v1.xyxy), tuple) self.assertEqual(type(self.v1.xyxyx), tuple) def test_dir_works(self): # not every single one of the attributes... attributes = {"lerp", "normalize", "normalize_ip", "reflect", "slerp", "x", "y"} # check if this selection of attributes are all there. self.assertTrue(attributes.issubset(set(dir(self.v1)))) def test_elementwise(self): # behaviour for "elementwise op scalar" self.assertEqual( self.v1.elementwise() + self.s1, (self.v1.x + self.s1, self.v1.y + self.s1, self.v1.z + self.s1), ) self.assertEqual( self.v1.elementwise() - self.s1, (self.v1.x - self.s1, self.v1.y - self.s1, self.v1.z - self.s1), ) self.assertEqual( self.v1.elementwise() * self.s2, (self.v1.x * self.s2, self.v1.y * self.s2, self.v1.z * self.s2), ) self.assertEqual( self.v1.elementwise() / self.s2, (self.v1.x / self.s2, self.v1.y / self.s2, self.v1.z / self.s2), ) self.assertEqual( self.v1.elementwise() // self.s1, (self.v1.x // self.s1, self.v1.y // self.s1, self.v1.z // self.s1), ) self.assertEqual( self.v1.elementwise() ** self.s1, (self.v1.x**self.s1, self.v1.y**self.s1, self.v1.z**self.s1), ) self.assertEqual( self.v1.elementwise() % self.s1, (self.v1.x % self.s1, self.v1.y % self.s1, self.v1.z % self.s1), ) self.assertEqual( self.v1.elementwise() > self.s1, self.v1.x > self.s1 and self.v1.y > self.s1 and self.v1.z > self.s1, ) self.assertEqual( self.v1.elementwise() < self.s1, self.v1.x < self.s1 and self.v1.y < self.s1 and self.v1.z < self.s1, ) self.assertEqual( self.v1.elementwise() == self.s1, self.v1.x == self.s1 and self.v1.y == self.s1 and self.v1.z == self.s1, ) self.assertEqual( self.v1.elementwise() != self.s1, self.v1.x != self.s1 and self.v1.y != self.s1 and self.v1.z != self.s1, ) self.assertEqual( self.v1.elementwise() >= self.s1, self.v1.x >= self.s1 and self.v1.y >= self.s1 and self.v1.z >= self.s1, ) self.assertEqual( self.v1.elementwise() <= self.s1, self.v1.x <= self.s1 and self.v1.y <= self.s1 and self.v1.z <= self.s1, ) # behaviour for "scalar op elementwise" self.assertEqual(5 + self.v1.elementwise(), Vector3(5, 5, 5) + self.v1) self.assertEqual(3.5 - self.v1.elementwise(), Vector3(3.5, 3.5, 3.5) - self.v1) self.assertEqual(7.5 * self.v1.elementwise(), 7.5 * self.v1) self.assertEqual( -3.5 / self.v1.elementwise(), (-3.5 / self.v1.x, -3.5 / self.v1.y, -3.5 / self.v1.z), ) self.assertEqual( -3.5 // self.v1.elementwise(), (-3.5 // self.v1.x, -3.5 // self.v1.y, -3.5 // self.v1.z), ) self.assertEqual( -(3.5 ** self.v1.elementwise()), (-(3.5**self.v1.x), -(3.5**self.v1.y), -(3.5**self.v1.z)), ) self.assertEqual( 3 % self.v1.elementwise(), (3 % self.v1.x, 3 % self.v1.y, 3 % self.v1.z) ) self.assertEqual( 2 < self.v1.elementwise(), 2 < self.v1.x and 2 < self.v1.y and 2 < self.v1.z ) self.assertEqual( 2 > self.v1.elementwise(), 2 > self.v1.x and 2 > self.v1.y and 2 > self.v1.z ) self.assertEqual( 1 == self.v1.elementwise(), 1 == self.v1.x and 1 == self.v1.y and 1 == self.v1.z, ) self.assertEqual( 1 != self.v1.elementwise(), 1 != self.v1.x and 1 != self.v1.y and 1 != self.v1.z, ) self.assertEqual( 2 <= self.v1.elementwise(), 2 <= self.v1.x and 2 <= self.v1.y and 2 <= self.v1.z, ) self.assertEqual( -7 >= self.v1.elementwise(), -7 >= self.v1.x and -7 >= self.v1.y and -7 >= self.v1.z, ) self.assertEqual( -7 != self.v1.elementwise(), -7 != self.v1.x and -7 != self.v1.y and -7 != self.v1.z, ) # behaviour for "elementwise op vector" self.assertEqual(type(self.v1.elementwise() * self.v2), type(self.v1)) self.assertEqual(self.v1.elementwise() + self.v2, self.v1 + self.v2) self.assertEqual(self.v1.elementwise() + self.v2, self.v1 + self.v2) self.assertEqual(self.v1.elementwise() - self.v2, self.v1 - self.v2) self.assertEqual( self.v1.elementwise() * self.v2, (self.v1.x * self.v2.x, self.v1.y * self.v2.y, self.v1.z * self.v2.z), ) self.assertEqual( self.v1.elementwise() / self.v2, (self.v1.x / self.v2.x, self.v1.y / self.v2.y, self.v1.z / self.v2.z), ) self.assertEqual( self.v1.elementwise() // self.v2, (self.v1.x // self.v2.x, self.v1.y // self.v2.y, self.v1.z // self.v2.z), ) self.assertEqual( self.v1.elementwise() ** self.v2, (self.v1.x**self.v2.x, self.v1.y**self.v2.y, self.v1.z**self.v2.z), ) self.assertEqual( self.v1.elementwise() % self.v2, (self.v1.x % self.v2.x, self.v1.y % self.v2.y, self.v1.z % self.v2.z), ) self.assertEqual( self.v1.elementwise() > self.v2, self.v1.x > self.v2.x and self.v1.y > self.v2.y and self.v1.z > self.v2.z, ) self.assertEqual( self.v1.elementwise() < self.v2, self.v1.x < self.v2.x and self.v1.y < self.v2.y and self.v1.z < self.v2.z, ) self.assertEqual( self.v1.elementwise() >= self.v2, self.v1.x >= self.v2.x and self.v1.y >= self.v2.y and self.v1.z >= self.v2.z, ) self.assertEqual( self.v1.elementwise() <= self.v2, self.v1.x <= self.v2.x and self.v1.y <= self.v2.y and self.v1.z <= self.v2.z, ) self.assertEqual( self.v1.elementwise() == self.v2, self.v1.x == self.v2.x and self.v1.y == self.v2.y and self.v1.z == self.v2.z, ) self.assertEqual( self.v1.elementwise() != self.v2, self.v1.x != self.v2.x and self.v1.y != self.v2.y and self.v1.z != self.v2.z, ) # behaviour for "vector op elementwise" self.assertEqual(self.v2 + self.v1.elementwise(), self.v2 + self.v1) self.assertEqual(self.v2 - self.v1.elementwise(), self.v2 - self.v1) self.assertEqual( self.v2 * self.v1.elementwise(), (self.v2.x * self.v1.x, self.v2.y * self.v1.y, self.v2.z * self.v1.z), ) self.assertEqual( self.v2 / self.v1.elementwise(), (self.v2.x / self.v1.x, self.v2.y / self.v1.y, self.v2.z / self.v1.z), ) self.assertEqual( self.v2 // self.v1.elementwise(), (self.v2.x // self.v1.x, self.v2.y // self.v1.y, self.v2.z // self.v1.z), ) self.assertEqual( self.v2 ** self.v1.elementwise(), (self.v2.x**self.v1.x, self.v2.y**self.v1.y, self.v2.z**self.v1.z), ) self.assertEqual( self.v2 % self.v1.elementwise(), (self.v2.x % self.v1.x, self.v2.y % self.v1.y, self.v2.z % self.v1.z), ) self.assertEqual( self.v2 < self.v1.elementwise(), self.v2.x < self.v1.x and self.v2.y < self.v1.y and self.v2.z < self.v1.z, ) self.assertEqual( self.v2 > self.v1.elementwise(), self.v2.x > self.v1.x and self.v2.y > self.v1.y and self.v2.z > self.v1.z, ) self.assertEqual( self.v2 <= self.v1.elementwise(), self.v2.x <= self.v1.x and self.v2.y <= self.v1.y and self.v2.z <= self.v1.z, ) self.assertEqual( self.v2 >= self.v1.elementwise(), self.v2.x >= self.v1.x and self.v2.y >= self.v1.y and self.v2.z >= self.v1.z, ) self.assertEqual( self.v2 == self.v1.elementwise(), self.v2.x == self.v1.x and self.v2.y == self.v1.y and self.v2.z == self.v1.z, ) self.assertEqual( self.v2 != self.v1.elementwise(), self.v2.x != self.v1.x and self.v2.y != self.v1.y and self.v2.z != self.v1.z, ) # behaviour for "elementwise op elementwise" self.assertEqual( self.v2.elementwise() + self.v1.elementwise(), self.v2 + self.v1 ) self.assertEqual( self.v2.elementwise() - self.v1.elementwise(), self.v2 - self.v1 ) self.assertEqual( self.v2.elementwise() * self.v1.elementwise(), (self.v2.x * self.v1.x, self.v2.y * self.v1.y, self.v2.z * self.v1.z), ) self.assertEqual( self.v2.elementwise() / self.v1.elementwise(), (self.v2.x / self.v1.x, self.v2.y / self.v1.y, self.v2.z / self.v1.z), ) self.assertEqual( self.v2.elementwise() // self.v1.elementwise(), (self.v2.x // self.v1.x, self.v2.y // self.v1.y, self.v2.z // self.v1.z), ) self.assertEqual( self.v2.elementwise() ** self.v1.elementwise(), (self.v2.x**self.v1.x, self.v2.y**self.v1.y, self.v2.z**self.v1.z), ) self.assertEqual( self.v2.elementwise() % self.v1.elementwise(), (self.v2.x % self.v1.x, self.v2.y % self.v1.y, self.v2.z % self.v1.z), ) self.assertEqual( self.v2.elementwise() < self.v1.elementwise(), self.v2.x < self.v1.x and self.v2.y < self.v1.y and self.v2.z < self.v1.z, ) self.assertEqual( self.v2.elementwise() > self.v1.elementwise(), self.v2.x > self.v1.x and self.v2.y > self.v1.y and self.v2.z > self.v1.z, ) self.assertEqual( self.v2.elementwise() <= self.v1.elementwise(), self.v2.x <= self.v1.x and self.v2.y <= self.v1.y and self.v2.z <= self.v1.z, ) self.assertEqual( self.v2.elementwise() >= self.v1.elementwise(), self.v2.x >= self.v1.x and self.v2.y >= self.v1.y and self.v2.z >= self.v1.z, ) self.assertEqual( self.v2.elementwise() == self.v1.elementwise(), self.v2.x == self.v1.x and self.v2.y == self.v1.y and self.v2.z == self.v1.z, ) self.assertEqual( self.v2.elementwise() != self.v1.elementwise(), self.v2.x != self.v1.x and self.v2.y != self.v1.y and self.v2.z != self.v1.z, ) # other behaviour self.assertEqual( abs(self.v1.elementwise()), (abs(self.v1.x), abs(self.v1.y), abs(self.v1.z)) ) self.assertEqual(-self.v1.elementwise(), -self.v1) self.assertEqual(+self.v1.elementwise(), +self.v1) self.assertEqual(bool(self.v1.elementwise()), bool(self.v1)) self.assertEqual(bool(Vector3().elementwise()), bool(Vector3())) self.assertEqual(self.zeroVec.elementwise() ** 0, (1, 1, 1)) self.assertRaises(ValueError, lambda: pow(Vector3(-1, 0, 0).elementwise(), 1.2)) self.assertRaises(ZeroDivisionError, lambda: self.zeroVec.elementwise() ** -1) self.assertRaises(ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() / 0) self.assertRaises( ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() // 0 ) self.assertRaises(ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() % 0) self.assertRaises( ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() / self.zeroVec ) self.assertRaises( ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() // self.zeroVec ) self.assertRaises( ZeroDivisionError, lambda: Vector3(1, 1, 1).elementwise() % self.zeroVec ) self.assertRaises(ZeroDivisionError, lambda: 2 / self.zeroVec.elementwise()) self.assertRaises(ZeroDivisionError, lambda: 2 // self.zeroVec.elementwise()) self.assertRaises(ZeroDivisionError, lambda: 2 % self.zeroVec.elementwise()) def test_slerp(self): self.assertRaises(ValueError, lambda: self.zeroVec.slerp(self.v1, 0.5)) self.assertRaises(ValueError, lambda: self.v1.slerp(self.zeroVec, 0.5)) self.assertRaises(ValueError, lambda: self.zeroVec.slerp(self.zeroVec, 0.5)) steps = 10 angle_step = self.e1.angle_to(self.e2) / steps for i, u in ( (i, self.e1.slerp(self.e2, i / float(steps))) for i in range(steps + 1) ): self.assertAlmostEqual(u.length(), 1) self.assertAlmostEqual(self.e1.angle_to(u), i * angle_step) self.assertEqual(u, self.e2) v1 = Vector3(100, 0, 0) v2 = Vector3(0, 10, 7) radial_factor = v2.length() / v1.length() for i, u in ((i, v1.slerp(v2, -i / float(steps))) for i in range(steps + 1)): self.assertAlmostEqual( u.length(), (v2.length() - v1.length()) * (float(i) / steps) + v1.length(), ) self.assertEqual(u, v2) self.assertEqual(v1.slerp(v1, 0.5), v1) self.assertEqual(v2.slerp(v2, 0.5), v2) self.assertRaises(ValueError, lambda: v1.slerp(-v1, 0.5)) def test_lerp(self): v1 = Vector3(0, 0, 0) v2 = Vector3(10, 10, 10) self.assertEqual(v1.lerp(v2, 0.5), (5, 5, 5)) self.assertRaises(ValueError, lambda: v1.lerp(v2, 2.5)) v1 = Vector3(-10, -5, -20) v2 = Vector3(10, 10, -20) self.assertEqual(v1.lerp(v2, 0.5), (0, 2.5, -20)) def test_spherical(self): v = Vector3() v.from_spherical(self.v1.as_spherical()) self.assertEqual(self.v1, v) self.assertEqual(self.v1, Vector3.from_spherical(self.v1.as_spherical())) self.assertEqual(self.e1.as_spherical(), (1, 90, 0)) self.assertEqual(self.e2.as_spherical(), (1, 90, 90)) self.assertEqual(self.e3.as_spherical(), (1, 0, 0)) self.assertEqual((2 * self.e2).as_spherical(), (2, 90, 90)) self.assertRaises(TypeError, lambda: v.from_spherical((None, None, None))) self.assertRaises(TypeError, lambda: v.from_spherical("abc")) self.assertRaises(TypeError, lambda: v.from_spherical((None, 1, 2))) self.assertRaises(TypeError, lambda: v.from_spherical((1, 2, 3, 4))) self.assertRaises(TypeError, lambda: v.from_spherical((1, 2))) self.assertRaises(TypeError, lambda: v.from_spherical(1, 2, 3)) self.assertRaises(TypeError, lambda: Vector3.from_spherical((None, None, None))) self.assertRaises(TypeError, lambda: Vector3.from_spherical("abc")) self.assertRaises(TypeError, lambda: Vector3.from_spherical((None, 1, 2))) self.assertRaises(TypeError, lambda: Vector3.from_spherical((1, 2, 3, 4))) self.assertRaises(TypeError, lambda: Vector3.from_spherical((1, 2))) self.assertRaises(TypeError, lambda: Vector3.from_spherical(1, 2, 3)) v.from_spherical((0.5, 90, 90)) self.assertEqual(v, 0.5 * self.e2) self.assertEqual(Vector3.from_spherical((0.5, 90, 90)), 0.5 * self.e2) self.assertEqual(Vector3.from_spherical((0.5, 90, 90)), v) def test_inplace_operators(self): v = Vector3(1, 1, 1) v *= 2 self.assertEqual(v, (2.0, 2.0, 2.0)) v = Vector3(4, 4, 4) v /= 2 self.assertEqual(v, (2.0, 2.0, 2.0)) v = Vector3(3.0, 3.0, 3.0) v -= (1, 1, 1) self.assertEqual(v, (2.0, 2.0, 2.0)) v = Vector3(3.0, 3.0, 3.0) v += (1, 1, 1) self.assertEqual(v, (4.0, 4.0, 4.0)) def test_pickle(self): import pickle v2 = Vector2(1, 2) v3 = Vector3(1, 2, 3) self.assertEqual(pickle.loads(pickle.dumps(v2)), v2) self.assertEqual(pickle.loads(pickle.dumps(v3)), v3) def test_subclass_operation(self): class Vector(pygame.math.Vector3): pass v = Vector(2.0, 2.0, 2.0) v *= 2 self.assertEqual(v, (4.0, 4.0, 4.0)) def test_swizzle_constants(self): """We can get constant values from a swizzle.""" v = Vector2(7, 6) self.assertEqual( v.xy1, (7.0, 6.0, 1.0), ) def test_swizzle_four_constants(self): """We can get 4 constant values from a swizzle.""" v = Vector2(7, 6) self.assertEqual( v.xy01, (7.0, 6.0, 0.0, 1.0), ) def test_swizzle_oob(self): """An out-of-bounds swizzle raises an AttributeError.""" v = Vector2(7, 6) with self.assertRaises(AttributeError): v.xyz @unittest.skipIf(IS_PYPY, "known pypy failure") def test_swizzle_set_oob(self): """An out-of-bounds swizzle set raises an AttributeError.""" v = Vector2(7, 6) with self.assertRaises(AttributeError): v.xz = (1, 1) def test_project_v3_onto_x_axis(self): """Project onto x-axis, e.g. get the component pointing in the x-axis direction.""" # arrange v = Vector3(2, 3, 4) x_axis = Vector3(10, 0, 0) # act actual = v.project(x_axis) # assert self.assertEqual(v.x, actual.x) self.assertEqual(0, actual.y) self.assertEqual(0, actual.z) def test_project_v3_onto_y_axis(self): """Project onto y-axis, e.g. get the component pointing in the y-axis direction.""" # arrange v = Vector3(2, 3, 4) y_axis = Vector3(0, 100, 0) # act actual = v.project(y_axis) # assert self.assertEqual(0, actual.x) self.assertEqual(v.y, actual.y) self.assertEqual(0, actual.z) def test_project_v3_onto_z_axis(self): """Project onto z-axis, e.g. get the component pointing in the z-axis direction.""" # arrange v = Vector3(2, 3, 4) y_axis = Vector3(0, 0, 77) # act actual = v.project(y_axis) # assert self.assertEqual(0, actual.x) self.assertEqual(0, actual.y) self.assertEqual(v.z, actual.z) def test_project_v3_onto_other(self): """Project onto other vector.""" # arrange v = Vector3(2, 3, 4) other = Vector3(3, 5, 7) # act actual = v.project(other) # assert expected = v.dot(other) / other.dot(other) * other self.assertAlmostEqual(expected.x, actual.x) self.assertAlmostEqual(expected.y, actual.y) self.assertAlmostEqual(expected.z, actual.z) def test_project_v3_onto_other_as_tuple(self): """Project onto other tuple as vector.""" # arrange v = Vector3(2, 3, 4) other = Vector3(3, 5, 7) # act actual = v.project(tuple(other)) # assert expected = v.dot(other) / other.dot(other) * other self.assertAlmostEqual(expected.x, actual.x) self.assertAlmostEqual(expected.y, actual.y) self.assertAlmostEqual(expected.z, actual.z) def test_project_v3_onto_other_as_list(self): """Project onto other list as vector.""" # arrange v = Vector3(2, 3, 4) other = Vector3(3, 5, 7) # act actual = v.project(list(other)) # assert expected = v.dot(other) / other.dot(other) * other self.assertAlmostEqual(expected.x, actual.x) self.assertAlmostEqual(expected.y, actual.y) self.assertAlmostEqual(expected.z, actual.z) def test_project_v3_raises_if_other_has_zero_length(self): """Check if exception is raise when projected on vector has zero length.""" # arrange v = Vector3(2, 3, 4) other = Vector3(0, 0, 0) # act / assert self.assertRaises(ValueError, v.project, other) def test_project_v3_raises_if_other_is_not_iterable(self): """Check if exception is raise when projected on vector is not iterable.""" # arrange v = Vector3(2, 3, 4) other = 10 # act / assert self.assertRaises(TypeError, v.project, other) def test_collection_abc(self): v = Vector3(3, 4, 5) self.assertTrue(isinstance(v, Collection)) self.assertFalse(isinstance(v, Sequence)) def test_clamp_mag_v3_max(self): v1 = Vector3(7, 2, 2) v2 = v1.clamp_magnitude(5) v3 = v1.clamp_magnitude(0, 5) self.assertEqual(v2, v3) v1.clamp_magnitude_ip(5) self.assertEqual(v1, v2) v1.clamp_magnitude_ip(0, 5) self.assertEqual(v1, v2) expected_v2 = Vector3(4.635863249727653, 1.3245323570650438, 1.3245323570650438) self.assertEqual(expected_v2, v2) def test_clamp_mag_v3_min(self): v1 = Vector3(3, 1, 2) v2 = v1.clamp_magnitude(5, 10) v1.clamp_magnitude_ip(5, 10) expected_v2 = Vector3(4.008918628686366, 1.3363062095621219, 2.6726124191242437) self.assertEqual(expected_v2, v1) self.assertEqual(expected_v2, v2) def test_clamp_mag_v3_no_change(self): v1 = Vector3(1, 2, 3) for args in ( (1, 6), (1.12, 5.55), (0.93, 6.83), (7.6,), ): with self.subTest(args=args): v2 = v1.clamp_magnitude(*args) v1.clamp_magnitude_ip(*args) self.assertEqual(v1, v2) self.assertEqual(v1, Vector3(1, 2, 3)) def test_clamp_mag_v3_edge_cases(self): v1 = Vector3(1, 2, 1) v2 = v1.clamp_magnitude(6, 6) v1.clamp_magnitude_ip(6, 6) self.assertEqual(v1, v2) self.assertAlmostEqual(v1.length(), 6) v2 = v1.clamp_magnitude(0) v1.clamp_magnitude_ip(0, 0) self.assertEqual(v1, v2) self.assertEqual(v1, Vector3()) def test_clamp_mag_v3_errors(self): v1 = Vector3(1, 2, 2) for invalid_args in ( ("foo", "bar"), (1, 2, 3), (342.234, "test"), ): with self.subTest(invalid_args=invalid_args): self.assertRaises(TypeError, v1.clamp_magnitude, *invalid_args) self.assertRaises(TypeError, v1.clamp_magnitude_ip, *invalid_args) for invalid_args in ( (-1,), (4, 3), # min > max (-4, 10), (-4, -2), ): with self.subTest(invalid_args=invalid_args): self.assertRaises(ValueError, v1.clamp_magnitude, *invalid_args) self.assertRaises(ValueError, v1.clamp_magnitude_ip, *invalid_args) # 0 vector v2 = Vector3() self.assertRaises(ValueError, v2.clamp_magnitude, 3) self.assertRaises(ValueError, v2.clamp_magnitude_ip, 4) def test_subclassing_v3(self): """Check if Vector3 is subclassable""" v = Vector3(4, 2, 0) class TestVector(Vector3): def supermariobrosiscool(self): return 722 other = TestVector(4, 1, 0) self.assertEqual(other.supermariobrosiscool(), 722) self.assertNotEqual(type(v), TestVector) self.assertNotEqual(type(v), type(other.copy())) self.assertEqual(TestVector, type(other.reflect(v))) self.assertEqual(TestVector, type(other.lerp(v, 1))) self.assertEqual(TestVector, type(other.slerp(v, 1))) self.assertEqual(TestVector, type(other.rotate(5, v))) self.assertEqual(TestVector, type(other.rotate_rad(5, v))) self.assertEqual(TestVector, type(other.project(v))) self.assertEqual(TestVector, type(other.move_towards(v, 5))) self.assertEqual(TestVector, type(other.clamp_magnitude(5))) self.assertEqual(TestVector, type(other.clamp_magnitude(1, 5))) self.assertEqual(TestVector, type(other.elementwise() + other)) other1 = TestVector(4, 2, 0) self.assertEqual(type(other + other1), TestVector) self.assertEqual(type(other - other1), TestVector) self.assertEqual(type(other * 3), TestVector) self.assertEqual(type(other / 3), TestVector) self.assertEqual(type(other.elementwise() ** 3), TestVector) def test_move_towards_basic(self): expected = Vector3(7.93205057, 2006.38284641, 43.80780420) origin = Vector3(7.22, 2004.0, 42.13) target = Vector3(12.30, 2021.0, 54.1) change_ip = origin.copy() change = origin.move_towards(target, 3) change_ip.move_towards_ip(target, 3) self.assertEqual(change, expected) self.assertEqual(change_ip, expected) def test_move_towards_max_distance(self): expected = Vector3(12.30, 2021, 42.5) origin = Vector3(7.22, 2004.0, 17.5) change_ip = origin.copy() change = origin.move_towards(expected, 100) change_ip.move_towards_ip(expected, 100) self.assertEqual(change, expected) self.assertEqual(change_ip, expected) def test_move_nowhere(self): origin = Vector3(7.22, 2004.0, 24.5) target = Vector3(12.30, 2021.0, 3.2) change_ip = origin.copy() change = origin.move_towards(target, 0) change_ip.move_towards_ip(target, 0) self.assertEqual(change, origin) self.assertEqual(change_ip, origin) def test_move_away(self): expected = Vector3(6.74137906, 2002.39831577, 49.70890994) origin = Vector3(7.22, 2004.0, 52.2) target = Vector3(12.30, 2021.0, 78.64) change_ip = origin.copy() change = origin.move_towards(target, -3) change_ip.move_towards_ip(target, -3) self.assertEqual(change, expected) self.assertEqual(change_ip, expected) def test_move_towards_self(self): vec = Vector3(6.36, 2001.13, -123.14) vec2 = vec.copy() for dist in (-3.54, -1, 0, 0.234, 12): self.assertEqual(vec.move_towards(vec2, dist), vec) vec2.move_towards_ip(vec, dist) self.assertEqual(vec, vec2) def test_move_towards_errors(self): origin = Vector3(7.22, 2004.0, 4.1) target = Vector3(12.30, 2021.0, -421.5) self.assertRaises(TypeError, origin.move_towards, target, 3, 2) self.assertRaises(TypeError, origin.move_towards_ip, target, 3, 2) self.assertRaises(TypeError, origin.move_towards, target, "a") self.assertRaises(TypeError, origin.move_towards_ip, target, "b") self.assertRaises(TypeError, origin.move_towards, "c", 3) self.assertRaises(TypeError, origin.move_towards_ip, "d", 3) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/midi_test.py0000644000175100001770000004101114676242340015726 0ustar00runnerdockerimport unittest import pygame class MidiInputTest(unittest.TestCase): __tags__ = ["interactive"] def setUp(self): import pygame.midi pygame.midi.init() in_id = pygame.midi.get_default_input_id() if in_id != -1: self.midi_input = pygame.midi.Input(in_id) else: self.midi_input = None def tearDown(self): if self.midi_input: self.midi_input.close() pygame.midi.quit() def test_Input(self): i = pygame.midi.get_default_input_id() if self.midi_input: self.assertEqual(self.midi_input.device_id, i) # try feeding it an input id. i = pygame.midi.get_default_output_id() # can handle some invalid input too. self.assertRaises(pygame.midi.MidiException, pygame.midi.Input, i) self.assertRaises(pygame.midi.MidiException, pygame.midi.Input, 9009) self.assertRaises(pygame.midi.MidiException, pygame.midi.Input, -1) self.assertRaises(TypeError, pygame.midi.Input, "1234") self.assertRaises(OverflowError, pygame.midi.Input, pow(2, 99)) def test_poll(self): if not self.midi_input: self.skipTest("No midi Input device") self.assertFalse(self.midi_input.poll()) # TODO fake some incoming data pygame.midi.quit() self.assertRaises(RuntimeError, self.midi_input.poll) # set midi_input to None to avoid error in tearDown self.midi_input = None def test_read(self): if not self.midi_input: self.skipTest("No midi Input device") read = self.midi_input.read(5) self.assertEqual(read, []) # TODO fake some incoming data pygame.midi.quit() self.assertRaises(RuntimeError, self.midi_input.read, 52) # set midi_input to None to avoid error in tearDown self.midi_input = None def test_close(self): if not self.midi_input: self.skipTest("No midi Input device") self.assertIsNotNone(self.midi_input._input) self.midi_input.close() self.assertIsNone(self.midi_input._input) class MidiOutputTest(unittest.TestCase): __tags__ = ["interactive"] def setUp(self): import pygame.midi pygame.midi.init() m_out_id = pygame.midi.get_default_output_id() if m_out_id != -1: self.midi_output = pygame.midi.Output(m_out_id) else: self.midi_output = None def tearDown(self): if self.midi_output: self.midi_output.close() pygame.midi.quit() def test_Output(self): i = pygame.midi.get_default_output_id() if self.midi_output: self.assertEqual(self.midi_output.device_id, i) # try feeding it an input id. i = pygame.midi.get_default_input_id() # can handle some invalid input too. self.assertRaises(pygame.midi.MidiException, pygame.midi.Output, i) self.assertRaises(pygame.midi.MidiException, pygame.midi.Output, 9009) self.assertRaises(pygame.midi.MidiException, pygame.midi.Output, -1) self.assertRaises(TypeError, pygame.midi.Output, "1234") self.assertRaises(OverflowError, pygame.midi.Output, pow(2, 99)) def test_note_off(self): if self.midi_output: out = self.midi_output out.note_on(5, 30, 0) out.note_off(5, 30, 0) with self.assertRaises(ValueError) as cm: out.note_off(5, 30, 25) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") with self.assertRaises(ValueError) as cm: out.note_off(5, 30, -1) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") def test_note_on(self): if self.midi_output: out = self.midi_output out.note_on(5, 30, 0) out.note_on(5, 42, 10) with self.assertRaises(ValueError) as cm: out.note_on(5, 30, 25) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") with self.assertRaises(ValueError) as cm: out.note_on(5, 30, -1) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") def test_set_instrument(self): if not self.midi_output: self.skipTest("No midi device") out = self.midi_output out.set_instrument(5) out.set_instrument(42, channel=2) with self.assertRaises(ValueError) as cm: out.set_instrument(-6) self.assertEqual(str(cm.exception), "Undefined instrument id: -6") with self.assertRaises(ValueError) as cm: out.set_instrument(156) self.assertEqual(str(cm.exception), "Undefined instrument id: 156") with self.assertRaises(ValueError) as cm: out.set_instrument(5, -1) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") with self.assertRaises(ValueError) as cm: out.set_instrument(5, 16) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") def test_write(self): if not self.midi_output: self.skipTest("No midi device") out = self.midi_output out.write([[[0xC0, 0, 0], 20000]]) # is equivalent to out.write([[[0xC0], 20000]]) # example from the docstring : # 1. choose program change 1 at time 20000 and # 2. send note 65 with velocity 100 500 ms later out.write([[[0xC0, 0, 0], 20000], [[0x90, 60, 100], 20500]]) out.write([]) verrry_long = [[[0x90, 60, i % 100], 20000 + 100 * i] for i in range(1024)] out.write(verrry_long) too_long = [[[0x90, 60, i % 100], 20000 + 100 * i] for i in range(1025)] self.assertRaises(IndexError, out.write, too_long) # test wrong data with self.assertRaises(TypeError) as cm: out.write("Non sens ?") error_msg = "unsupported operand type(s) for &: 'str' and 'int'" self.assertEqual(str(cm.exception), error_msg) with self.assertRaises(TypeError) as cm: out.write(["Hey what's that?"]) self.assertEqual(str(cm.exception), error_msg) def test_write_short(self): if not self.midi_output: self.skipTest("No midi device") out = self.midi_output # program change out.write_short(0xC0) # put a note on, then off. out.write_short(0x90, 65, 100) out.write_short(0x80, 65, 100) out.write_short(0x90) def test_write_sys_ex(self): if not self.midi_output: self.skipTest("No midi device") out = self.midi_output out.write_sys_ex(pygame.midi.time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7]) def test_pitch_bend(self): # FIXME : pitch_bend in the code, but not in documentation if not self.midi_output: self.skipTest("No midi device") out = self.midi_output with self.assertRaises(ValueError) as cm: out.pitch_bend(5, channel=-1) self.assertEqual(str(cm.exception), "Channel not between 0 and 15.") with self.assertRaises(ValueError) as cm: out.pitch_bend(5, channel=16) with self.assertRaises(ValueError) as cm: out.pitch_bend(-10001, 1) self.assertEqual( str(cm.exception), "Pitch bend value must be between " "-8192 and +8191, not -10001.", ) with self.assertRaises(ValueError) as cm: out.pitch_bend(10665, 2) def test_close(self): if not self.midi_output: self.skipTest("No midi device") self.assertIsNotNone(self.midi_output._output) self.midi_output.close() self.assertIsNone(self.midi_output._output) def test_abort(self): if not self.midi_output: self.skipTest("No midi device") self.assertEqual(self.midi_output._aborted, 0) self.midi_output.abort() self.assertEqual(self.midi_output._aborted, 1) class MidiModuleTest(unittest.TestCase): """Midi module tests that require midi hardware or midi.init(). See MidiModuleNonInteractiveTest for non-interactive module tests. """ __tags__ = ["interactive"] def setUp(self): import pygame.midi pygame.midi.init() def tearDown(self): pygame.midi.quit() def test_get_count(self): c = pygame.midi.get_count() self.assertIsInstance(c, int) self.assertTrue(c >= 0) def test_get_default_input_id(self): midin_id = pygame.midi.get_default_input_id() # if there is a not None return make sure it is an int. self.assertIsInstance(midin_id, int) self.assertTrue(midin_id >= -1) pygame.midi.quit() self.assertRaises(RuntimeError, pygame.midi.get_default_output_id) def test_get_default_output_id(self): c = pygame.midi.get_default_output_id() self.assertIsInstance(c, int) self.assertTrue(c >= -1) pygame.midi.quit() self.assertRaises(RuntimeError, pygame.midi.get_default_output_id) def test_get_device_info(self): an_id = pygame.midi.get_default_output_id() if an_id != -1: interf, name, input, output, opened = pygame.midi.get_device_info(an_id) self.assertEqual(output, 1) self.assertEqual(input, 0) self.assertEqual(opened, 0) an_in_id = pygame.midi.get_default_input_id() if an_in_id != -1: r = pygame.midi.get_device_info(an_in_id) # if r is None, it means that the id is out of range. interf, name, input, output, opened = r self.assertEqual(output, 0) self.assertEqual(input, 1) self.assertEqual(opened, 0) out_of_range = pygame.midi.get_count() for num in range(out_of_range): self.assertIsNotNone(pygame.midi.get_device_info(num)) info = pygame.midi.get_device_info(out_of_range) self.assertIsNone(info) def test_init(self): pygame.midi.quit() self.assertRaises(RuntimeError, pygame.midi.get_count) # initialising many times should be fine. pygame.midi.init() pygame.midi.init() pygame.midi.init() pygame.midi.init() self.assertTrue(pygame.midi.get_init()) def test_quit(self): # It is safe to call this more than once. pygame.midi.quit() pygame.midi.init() pygame.midi.quit() pygame.midi.quit() pygame.midi.init() pygame.midi.init() pygame.midi.quit() self.assertFalse(pygame.midi.get_init()) def test_get_init(self): # Already initialized as pygame.midi.init() was called in setUp(). self.assertTrue(pygame.midi.get_init()) def test_time(self): mtime = pygame.midi.time() self.assertIsInstance(mtime, int) # should be close to 2-3... since the timer is just init'd. self.assertTrue(0 <= mtime < 100) class MidiModuleNonInteractiveTest(unittest.TestCase): """Midi module tests that do not require midi hardware or midi.init(). See MidiModuleTest for interactive module tests. """ def setUp(self): import pygame.midi def test_midiin(self): """Ensures the MIDIIN event id exists in the midi module. The MIDIIN event id can be accessed via the midi module for backward compatibility. """ self.assertEqual(pygame.midi.MIDIIN, pygame.MIDIIN) self.assertEqual(pygame.midi.MIDIIN, pygame.locals.MIDIIN) self.assertNotEqual(pygame.midi.MIDIIN, pygame.MIDIOUT) self.assertNotEqual(pygame.midi.MIDIIN, pygame.locals.MIDIOUT) def test_midiout(self): """Ensures the MIDIOUT event id exists in the midi module. The MIDIOUT event id can be accessed via the midi module for backward compatibility. """ self.assertEqual(pygame.midi.MIDIOUT, pygame.MIDIOUT) self.assertEqual(pygame.midi.MIDIOUT, pygame.locals.MIDIOUT) self.assertNotEqual(pygame.midi.MIDIOUT, pygame.MIDIIN) self.assertNotEqual(pygame.midi.MIDIOUT, pygame.locals.MIDIIN) def test_MidiException(self): """Ensures the MidiException is raised as expected.""" def raiseit(): raise pygame.midi.MidiException("Hello Midi param") with self.assertRaises(pygame.midi.MidiException) as cm: raiseit() self.assertEqual(cm.exception.parameter, "Hello Midi param") def test_midis2events(self): """Ensures midi events are properly converted to pygame events.""" # List/tuple indexes. MIDI_DATA = 0 MD_STATUS = 0 MD_DATA1 = 1 MD_DATA2 = 2 MD_DATA3 = 3 TIMESTAMP = 1 # Midi events take the form of: # ((status, data1, data2, data3), timestamp) midi_events = ( ((0xC0, 0, 1, 2), 20000), ((0x90, 60, 1000, "string_data"), 20001), (("0", "1", "2", "3"), "4"), ) expected_num_events = len(midi_events) # Test different device ids. for device_id in range(3): pg_events = pygame.midi.midis2events(midi_events, device_id) self.assertEqual(len(pg_events), expected_num_events) for i, pg_event in enumerate(pg_events): # Get the original midi data for comparison. midi_event = midi_events[i] midi_event_data = midi_event[MIDI_DATA] # Can't directly check event instance as pygame.event.Event is # a function. # self.assertIsInstance(pg_event, pygame.event.Event) self.assertEqual(pg_event.__class__.__name__, "Event") self.assertEqual(pg_event.type, pygame.MIDIIN) self.assertEqual(pg_event.status, midi_event_data[MD_STATUS]) self.assertEqual(pg_event.data1, midi_event_data[MD_DATA1]) self.assertEqual(pg_event.data2, midi_event_data[MD_DATA2]) self.assertEqual(pg_event.data3, midi_event_data[MD_DATA3]) self.assertEqual(pg_event.timestamp, midi_event[TIMESTAMP]) self.assertEqual(pg_event.vice_id, device_id) def test_midis2events__missing_event_data(self): """Ensures midi events with missing values are handled properly.""" midi_event_missing_data = ((0xC0, 0, 1), 20000) midi_event_missing_timestamp = ((0xC0, 0, 1, 2),) for midi_event in (midi_event_missing_data, midi_event_missing_timestamp): with self.assertRaises(ValueError): events = pygame.midi.midis2events([midi_event], 0) def test_midis2events__extra_event_data(self): """Ensures midi events with extra values are handled properly.""" midi_event_extra_data = ((0xC0, 0, 1, 2, "extra"), 20000) midi_event_extra_timestamp = ((0xC0, 0, 1, 2), 20000, "extra") for midi_event in (midi_event_extra_data, midi_event_extra_timestamp): with self.assertRaises(ValueError): events = pygame.midi.midis2events([midi_event], 0) def test_midis2events__extra_event_data_missing_timestamp(self): """Ensures midi events with extra data and no timestamps are handled properly. """ midi_event_extra_data_no_timestamp = ((0xC0, 0, 1, 2, "extra"),) with self.assertRaises(ValueError): events = pygame.midi.midis2events([midi_event_extra_data_no_timestamp], 0) def test_conversions(self): """of frequencies to midi note numbers and ansi note names.""" from pygame.midi import frequency_to_midi, midi_to_frequency, midi_to_ansi_note self.assertEqual(frequency_to_midi(27.5), 21) self.assertEqual(frequency_to_midi(36.7), 26) self.assertEqual(frequency_to_midi(4186.0), 108) self.assertEqual(midi_to_frequency(21), 27.5) self.assertEqual(midi_to_frequency(26), 36.7) self.assertEqual(midi_to_frequency(108), 4186.0) self.assertEqual(midi_to_ansi_note(21), "A0") self.assertEqual(midi_to_ansi_note(71), "B4") self.assertEqual(midi_to_ansi_note(82), "A#5") self.assertEqual(midi_to_ansi_note(83), "B5") self.assertEqual(midi_to_ansi_note(93), "A6") self.assertEqual(midi_to_ansi_note(94), "A#6") self.assertEqual(midi_to_ansi_note(95), "B6") self.assertEqual(midi_to_ansi_note(96), "C7") self.assertEqual(midi_to_ansi_note(102), "F#7") self.assertEqual(midi_to_ansi_note(108), "C8") if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/mixer_music_tags.py0000644000175100001770000000021214676242340017305 0ustar00runnerdocker__tags__ = [] import pygame import sys if "pygame.mixer_music" not in sys.modules: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/mixer_music_test.py0000644000175100001770000004216214676242340017340 0ustar00runnerdockerimport os import sys import platform import unittest import time from pygame.tests.test_utils import example_path import pygame class MixerMusicModuleTest(unittest.TestCase): @classmethod def setUpClass(cls): # Initializing the mixer is slow, so minimize the times it is called. pygame.mixer.init() @classmethod def tearDownClass(cls): pygame.mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if pygame.mixer.get_init() is None: pygame.mixer.init() def test_load_mp3(self): "|tags:music|" self.music_load("mp3") def test_load_ogg(self): "|tags:music|" self.music_load("ogg") def test_load_wav(self): "|tags:music|" self.music_load("wav") def music_load(self, format): data_fname = example_path("data") path = os.path.join(data_fname, f"house_lo.{format}") if os.sep == "\\": path = path.replace("\\", "\\\\") umusfn = str(path) bmusfn = umusfn.encode() pygame.mixer.music.load(umusfn) pygame.mixer.music.load(bmusfn) def test_load_object(self): """test loading music from file-like objects.""" formats = ["ogg", "wav"] data_fname = example_path("data") for f in formats: path = os.path.join(data_fname, f"house_lo.{f}") if os.sep == "\\": path = path.replace("\\", "\\\\") bmusfn = path.encode() with open(bmusfn, "rb") as musf: pygame.mixer.music.load(musf) def test_object_namehint(self): """test loading & queuing music from file-like objects with namehint argument.""" formats = ["wav", "ogg"] data_fname = example_path("data") for f in formats: path = os.path.join(data_fname, f"house_lo.{f}") if os.sep == "\\": path = path.replace("\\", "\\\\") bmusfn = path.encode() # these two "with open" blocks need to be separate, which is kinda weird with open(bmusfn, "rb") as musf: pygame.mixer.music.load(musf, f) with open(bmusfn, "rb") as musf: pygame.mixer.music.queue(musf, f) with open(bmusfn, "rb") as musf: pygame.mixer.music.load(musf, namehint=f) with open(bmusfn, "rb") as musf: pygame.mixer.music.queue(musf, namehint=f) def test_load_unicode(self): """test non-ASCII unicode path""" import shutil ep = example_path("data") temp_file = os.path.join(ep, "你好.wav") org_file = os.path.join(ep, "house_lo.wav") try: with open(temp_file, "w") as f: pass os.remove(temp_file) except OSError: raise unittest.SkipTest("the path cannot be opened") shutil.copy(org_file, temp_file) try: pygame.mixer.music.load(temp_file) pygame.mixer.music.load(org_file) # unload finally: os.remove(temp_file) def test_unload(self): import shutil import tempfile ep = example_path("data") org_file = os.path.join(ep, "house_lo.wav") tmpfd, tmppath = tempfile.mkstemp(".wav") os.close(tmpfd) shutil.copy(org_file, tmppath) try: pygame.mixer.music.load(tmppath) pygame.mixer.music.unload() finally: os.remove(tmppath) def test_queue_mp3(self): """Ensures queue() accepts mp3 files. |tags:music| """ filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.queue(filename) def test_queue_ogg(self): """Ensures queue() accepts ogg files. |tags:music| """ filename = example_path(os.path.join("data", "house_lo.ogg")) pygame.mixer.music.queue(filename) def test_queue_wav(self): """Ensures queue() accepts wav files. |tags:music| """ filename = example_path(os.path.join("data", "house_lo.wav")) pygame.mixer.music.queue(filename) def test_queue__multiple_calls(self): """Ensures queue() can be called multiple times.""" ogg_file = example_path(os.path.join("data", "house_lo.ogg")) wav_file = example_path(os.path.join("data", "house_lo.wav")) pygame.mixer.music.queue(ogg_file) pygame.mixer.music.queue(wav_file) def test_queue__arguments(self): """Ensures queue() can be called with proper arguments.""" wav_file = example_path(os.path.join("data", "house_lo.wav")) pygame.mixer.music.queue(wav_file, loops=2) pygame.mixer.music.queue(wav_file, namehint="") pygame.mixer.music.queue(wav_file, "") pygame.mixer.music.queue(wav_file, "", 2) def test_queue__no_file(self): """Ensures queue() correctly handles missing the file argument.""" with self.assertRaises(TypeError): pygame.mixer.music.queue() def test_queue__invalid_sound_type(self): """Ensures queue() correctly handles invalid file types.""" not_a_sound_file = example_path(os.path.join("data", "city.png")) with self.assertRaises(pygame.error): pygame.mixer.music.queue(not_a_sound_file) def test_queue__invalid_filename(self): """Ensures queue() correctly handles invalid filenames.""" with self.assertRaises(pygame.error): pygame.mixer.music.queue("") def test_music_pause__unpause(self): """Ensure music has the correct position immediately after unpausing |tags:music| """ filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() # Wait 0.05s, then pause time.sleep(0.05) pygame.mixer.music.pause() # Wait 0.05s, get position, unpause, then get position again time.sleep(0.05) before_unpause = pygame.mixer.music.get_pos() pygame.mixer.music.unpause() after_unpause = pygame.mixer.music.get_pos() self.assertEqual(before_unpause, after_unpause) def test_stop(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.stop: # Stops the music playback if it is currently playing. filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() pygame.mixer.music.stop() self.assertEqual(pygame.mixer.music.get_busy(), False) def test_rewind(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.rewind: # Resets playback of the current music to the beginning. filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() # The music be played for some time time.sleep(3) # Then it is rewinded pygame.mixer.music.rewind() # Since the sound is 7s long, if it is busy after 6s it means it has been restarted time.sleep(6.9) self.assertTrue(pygame.mixer.music.get_busy()) pygame.mixer.music.stop() # Testing that if the music is paused, rewind works but keep the music paused pygame.mixer.music.play() time.sleep(2) pygame.mixer.music.pause() pygame.mixer.music.rewind() self.assertFalse(pygame.mixer.music.get_busy()) time.sleep(1) pygame.mixer.music.unpause() time.sleep(6.9) self.assertTrue(pygame.mixer.music.get_busy()) def todo_test_get_pos(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_pos: # This gets the number of milliseconds that the music has been playing # for. The returned time only represents how long the music has been # playing; it does not take into account any starting position # offsets. # self.fail() # def test_fadeout(self): # filename = example_path(os.path.join("data", "house_lo.mp3")) # pygame.mixer.music.load(filename) # pygame.mixer.music.play() # pygame.mixer.music.fadeout(50) # time.sleep(0.3) # self.assertEqual(pygame.mixer.music.get_busy(), False) @unittest.skipIf( os.environ.get("SDL_AUDIODRIVER") == "disk", 'disk audio driver "playback" writing to disk is slow', ) def test_play__start_time(self): pygame.display.init() # music file is 7 seconds long filename = example_path(os.path.join("data", "house_lo.ogg")) pygame.mixer.music.load(filename) start_time_in_seconds = 6.0 # 6 seconds music_finished = False clock = pygame.time.Clock() start_time_in_ms = clock.tick() # should play the last 1 second pygame.mixer.music.play(0, start=start_time_in_seconds) running = True while running: pygame.event.pump() if not (pygame.mixer.music.get_busy() or music_finished): music_finished = True time_to_finish = (clock.tick() - start_time_in_ms) // 1000 self.assertEqual(time_to_finish, 1) running = False def test_play(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.play: # This will play the loaded music stream. If the music is already # playing it will be restarted. # # The loops argument controls the number of repeats a music will play. # play(5) will cause the music to played once, then repeated five # times, for a total of six. If the loops is -1 then the music will # repeat indefinitely. # # The starting position argument controls where in the music the song # starts playing. The starting position is dependent on the format of # music playing. MP3 and OGG use the position as time (in seconds). # MOD music it is the pattern order number. Passing a startpos will # raise a NotImplementedError if it cannot set the start position # filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() self.assertTrue(pygame.mixer.music.get_busy()) pygame.mixer.music.stop() def test_load(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.load: # This will load a music file and prepare it for playback. If a music # stream is already playing it will be stopped. This does not start # the music playing. # # Music can only be loaded from filenames, not python file objects # like the other pygame loading functions. # filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) self.assertFalse(pygame.mixer.music.get_busy()) pygame.mixer.music.play() self.assertTrue(pygame.mixer.music.get_busy()) filename = example_path(os.path.join("data", "house_lo.wav")) pygame.mixer.music.load(filename) self.assertFalse(pygame.mixer.music.get_busy()) def test_get_volume(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_volume: # Returns the current volume for the mixer. The value will be between # 0.0 and 1.0. # filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() vol = pygame.mixer.music.get_volume() self.assertGreaterEqual(vol, 0) self.assertLessEqual(vol, 1) pygame.mixer.music.stop() def test_pause(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.pause: # Temporarily stop playback of the music stream. It can be resumed # with the pygame.mixer.music.unpause() function. # self.music_load("ogg") self.assertFalse(pygame.mixer.music.get_busy()) pygame.mixer.music.play() self.assertTrue(pygame.mixer.music.get_busy()) pygame.mixer.music.pause() self.assertFalse(pygame.mixer.music.get_busy()) def test_get_busy(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_busy: # Returns True when the music stream is actively playing. When the # music is idle this returns False. # self.music_load("ogg") self.assertFalse(pygame.mixer.music.get_busy()) pygame.mixer.music.play() self.assertTrue(pygame.mixer.music.get_busy()) pygame.mixer.music.pause() self.assertFalse(pygame.mixer.music.get_busy()) def test_unpause(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.unpause: # This will resume the playback of a music stream after it has been paused. filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() self.assertTrue(pygame.mixer.music.get_busy()) time.sleep(0.1) pygame.mixer.music.pause() self.assertFalse(pygame.mixer.music.get_busy()) before = pygame.mixer.music.get_pos() pygame.mixer.music.unpause() after = pygame.mixer.music.get_pos() self.assertTrue(pygame.mixer.music.get_busy()) # It could rarely be that it is +/- 1 different # But mostly, after should equal before. self.assertTrue(before - 1 <= after <= before + 1) pygame.mixer.music.stop() def test_set_volume(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_volume: # Set the volume of the music playback. The value argument is between # 0.0 and 1.0. When new music is loaded the volume is reset. # filename = example_path(os.path.join("data", "house_lo.mp3")) pygame.mixer.music.load(filename) pygame.mixer.music.play() pygame.mixer.music.set_volume(0.5) vol = pygame.mixer.music.get_volume() self.assertEqual(vol, 0.5) pygame.mixer.music.stop() def todo_test_set_pos(self): # __doc__ (as of 2010-24-05) for pygame.mixer_music.set_pos: # This sets the position in the music file where playback will start. The # meaning of "pos", a float (or a number that can be converted to a float), # depends on the music format. Newer versions of SDL_mixer have better # positioning support than earlier. An SDLError is raised if a particular # format does not support positioning. # self.fail() def test_init(self): """issue #955. unload music whenever mixer.quit() is called""" import tempfile import shutil testfile = example_path(os.path.join("data", "house_lo.wav")) tempcopy = os.path.join(tempfile.gettempdir(), "tempfile.wav") for i in range(10): pygame.mixer.init() try: shutil.copy2(testfile, tempcopy) pygame.mixer.music.load(tempcopy) pygame.mixer.quit() finally: os.remove(tempcopy) # class MixerMusicEndEventTest(unittest.TestCase): # def setUp(self): # pygame.display.init() # pygame.display.set_mode((40, 40)) # if pygame.mixer.get_init() is None: # pygame.mixer.init() # def tearDown(self): # pygame.display.quit() # pygame.mixer.quit() # def test_get_endevent(self): # # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_endevent: # # Returns the event type to be sent every time the music finishes # # playback. If there is no endevent the function returns # # pygame.NOEVENT. # # # filename = example_path(os.path.join("data", "car_door.wav")) # pygame.mixer.music.load(filename) # pygame.mixer.music.play() # no_event = pygame.mixer_music.get_endevent() # self.assertEqual(pygame.NOEVENT, no_event) # event_type = pygame.USEREVENT # pygame.mixer_music.set_endevent(event_type) # end_event = pygame.mixer_music.get_endevent() # self.assertEqual(event_type, end_event) # def test_set_endevent(self): # # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_endevent: # # This causes Pygame to signal (by means of the event queue) when the # # music is done playing. The argument determines the type of event # # that will be queued. # # # # The event will be queued every time the music finishes, not just the # # first time. To stop the event from being queued, call this method # # with no argument. # # # filename = example_path(os.path.join("data", "house_lo.wav")) # pygame.mixer.music.load(filename) # pygame.mixer.music.play() # event_type = pygame.USEREVENT # pygame.mixer_music.set_endevent(event_type) # end_event = pygame.mixer_music.get_endevent() # self.assertEqual(event_type, end_event) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/mixer_tags.py0000644000175100001770000000020414676242340016106 0ustar00runnerdocker__tags__ = [] import pygame import sys if "pygame.mixer" not in sys.modules: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/mixer_test.py0000644000175100001770000015140314676242340016137 0ustar00runnerdockerimport sys import os import unittest import pathlib import platform import time from array import array from pygame.tests.test_utils import example_path import pygame from pygame import mixer IS_PYPY = "PyPy" == platform.python_implementation() ################################### CONSTANTS ################################## FREQUENCIES = [11025, 22050, 44100, 48000] SIZES = [-16, -8, 8, 16] # fixme # size 32 failed in test_get_init__returns_exact_values_used_for_init CHANNELS = [1, 2] BUFFERS = [3024] CONFIGS = [ {"frequency": f, "size": s, "channels": c} for f in FREQUENCIES for s in SIZES for c in CHANNELS ] # Using all CONFIGS fails on a Mac; probably older SDL_mixer; we could do: # if platform.system() == 'Darwin': # But using all CONFIGS is very slow (> 10 sec for example) # And probably, we don't need to be so exhaustive, hence: CONFIG = {"frequency": 44100, "size": 32, "channels": 2, "allowedchanges": 0} class InvalidBool: """To help test invalid bool values.""" __bool__ = None ############################## MODULE LEVEL TESTS ############################# class MixerModuleTest(unittest.TestCase): def tearDown(self): mixer.quit() mixer.pre_init(0, 0, 0, 0) def test_init__keyword_args(self): # note: this test used to loop over all CONFIGS, but it's very slow.. mixer.init(**CONFIG) mixer_conf = mixer.get_init() self.assertEqual(mixer_conf[0], CONFIG["frequency"]) # Not all "sizes" are supported on all systems, hence "abs". self.assertEqual(abs(mixer_conf[1]), abs(CONFIG["size"])) self.assertGreaterEqual(mixer_conf[2], CONFIG["channels"]) def test_pre_init__keyword_args(self): # note: this test used to loop over all CONFIGS, but it's very slow.. mixer.pre_init(**CONFIG) mixer.init() mixer_conf = mixer.get_init() self.assertEqual(mixer_conf[0], CONFIG["frequency"]) # Not all "sizes" are supported on all systems, hence "abs". self.assertEqual(abs(mixer_conf[1]), abs(CONFIG["size"])) self.assertGreaterEqual(mixer_conf[2], CONFIG["channels"]) def test_pre_init__zero_values(self): # Ensure that argument values of 0 are replaced with # default values. No way to check buffer size though. mixer.pre_init(22050, -8, 1) # Non default values mixer.pre_init(0, 0, 0) # Should reset to default values mixer.init(allowedchanges=0) self.assertEqual(mixer.get_init()[0], 44100) self.assertEqual(mixer.get_init()[1], -16) self.assertGreaterEqual(mixer.get_init()[2], 2) def test_init__zero_values(self): # Ensure that argument values of 0 are replaced with # preset values. No way to check buffer size though. mixer.pre_init(44100, 8, 1, allowedchanges=0) # None default values mixer.init(0, 0, 0) self.assertEqual(mixer.get_init(), (44100, 8, 1)) # def test_get_init__returns_exact_values_used_for_init(self): # # TODO: size 32 fails in this test (maybe SDL_mixer bug) # # TODO: 2) When you start the mixer, you request the settings. # # But it can be that a sound system doesn’t support what you request… # # and it gives you back something close to what you request but not equal. # # So, you can’t test for equality. # # See allowedchanges # for init_conf in CONFIGS: # frequency, size, channels = init_conf.values() # if (frequency, size) == (22050, 16): # continue # mixer.init(frequency, size, channels) # mixer_conf = mixer.get_init() # self.assertEqual(tuple(init_conf.values()), mixer_conf) # mixer.quit() def test_get_init__returns_None_if_mixer_not_initialized(self): self.assertIsNone(mixer.get_init()) def test_get_num_channels__defaults_eight_after_init(self): mixer.init() self.assertEqual(mixer.get_num_channels(), 8) def test_set_num_channels(self): mixer.init() default_num_channels = mixer.get_num_channels() for i in range(1, default_num_channels + 1): mixer.set_num_channels(i) self.assertEqual(mixer.get_num_channels(), i) def test_quit(self): """get_num_channels() Should throw pygame.error if uninitialized after mixer.quit()""" mixer.init() mixer.quit() self.assertRaises(pygame.error, mixer.get_num_channels) # TODO: FIXME: appveyor and pypy (on linux) fails here sometimes. @unittest.skipIf(sys.platform.startswith("win"), "See github issue 892.") @unittest.skipIf(IS_PYPY, "random errors here with pypy") def test_sound_args(self): def get_bytes(snd): return snd.get_raw() mixer.init() sample = b"\x00\xff" * 24 wave_path = example_path(os.path.join("data", "house_lo.wav")) uwave_path = str(wave_path) bwave_path = uwave_path.encode(sys.getfilesystemencoding()) snd = mixer.Sound(file=wave_path) self.assertTrue(snd.get_length() > 0.5) snd_bytes = get_bytes(snd) self.assertTrue(len(snd_bytes) > 1000) self.assertEqual(get_bytes(mixer.Sound(wave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(file=uwave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(uwave_path)), snd_bytes) arg_emsg = "Sound takes either 1 positional or 1 keyword argument" with self.assertRaises(TypeError) as cm: mixer.Sound() self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(wave_path, buffer=sample) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(sample, file=wave_path) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(buffer=sample, file=wave_path) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(foobar=sample) self.assertEqual(str(cm.exception), "Unrecognized keyword argument 'foobar'") snd = mixer.Sound(wave_path, **{}) self.assertEqual(get_bytes(snd), snd_bytes) snd = mixer.Sound(*[], **{"file": wave_path}) with self.assertRaises(TypeError) as cm: mixer.Sound([]) self.assertEqual(str(cm.exception), "Unrecognized argument (type list)") with self.assertRaises(TypeError) as cm: snd = mixer.Sound(buffer=[]) emsg = "Expected object with buffer interface: got a list" self.assertEqual(str(cm.exception), emsg) ufake_path = "12345678" self.assertRaises(IOError, mixer.Sound, ufake_path) self.assertRaises(IOError, mixer.Sound, "12345678") with self.assertRaises(TypeError) as cm: mixer.Sound(buffer="something") emsg = "Unicode object not allowed as buffer object" self.assertEqual(str(cm.exception), emsg) self.assertEqual(get_bytes(mixer.Sound(buffer=sample)), sample) if type(sample) != str: somebytes = get_bytes(mixer.Sound(sample)) # on python 2 we do not allow using string except as file name. self.assertEqual(somebytes, sample) self.assertEqual(get_bytes(mixer.Sound(file=bwave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(bwave_path)), snd_bytes) snd = mixer.Sound(wave_path) with self.assertRaises(TypeError) as cm: mixer.Sound(wave_path, array=snd) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(buffer=sample, array=snd) self.assertEqual(str(cm.exception), arg_emsg) snd2 = mixer.Sound(array=snd) self.assertEqual(snd.get_raw(), snd2.get_raw()) def test_sound_unicode(self): """test non-ASCII unicode path""" mixer.init() import shutil ep = example_path("data") temp_file = os.path.join(ep, "你好.wav") org_file = os.path.join(ep, "house_lo.wav") shutil.copy(org_file, temp_file) try: with open(temp_file, "rb") as f: pass except OSError: raise unittest.SkipTest("the path cannot be opened") try: sound = mixer.Sound(temp_file) del sound finally: os.remove(temp_file) @unittest.skipIf( os.environ.get("SDL_AUDIODRIVER") == "disk", "this test fails without real sound card", ) def test_array_keyword(self): try: from numpy import ( array, arange, zeros, int8, uint8, int16, uint16, int32, uint32, ) except ImportError: self.skipTest("requires numpy") freq = 22050 format_list = [-8, 8, -16, 16] channels_list = [1, 2] a_lists = {f: [] for f in format_list} a32u_mono = arange(0, 256, 1, uint32) a16u_mono = a32u_mono.astype(uint16) a8u_mono = a32u_mono.astype(uint8) au_list_mono = [(1, a) for a in [a8u_mono, a16u_mono, a32u_mono]] for format in format_list: if format > 0: a_lists[format].extend(au_list_mono) a32s_mono = arange(-128, 128, 1, int32) a16s_mono = a32s_mono.astype(int16) a8s_mono = a32s_mono.astype(int8) as_list_mono = [(1, a) for a in [a8s_mono, a16s_mono, a32s_mono]] for format in format_list: if format < 0: a_lists[format].extend(as_list_mono) a32u_stereo = zeros([a32u_mono.shape[0], 2], uint32) a32u_stereo[:, 0] = a32u_mono a32u_stereo[:, 1] = 255 - a32u_mono a16u_stereo = a32u_stereo.astype(uint16) a8u_stereo = a32u_stereo.astype(uint8) au_list_stereo = [(2, a) for a in [a8u_stereo, a16u_stereo, a32u_stereo]] for format in format_list: if format > 0: a_lists[format].extend(au_list_stereo) a32s_stereo = zeros([a32s_mono.shape[0], 2], int32) a32s_stereo[:, 0] = a32s_mono a32s_stereo[:, 1] = -1 - a32s_mono a16s_stereo = a32s_stereo.astype(int16) a8s_stereo = a32s_stereo.astype(int8) as_list_stereo = [(2, a) for a in [a8s_stereo, a16s_stereo, a32s_stereo]] for format in format_list: if format < 0: a_lists[format].extend(as_list_stereo) for format in format_list: for channels in channels_list: try: mixer.init(freq, format, channels) except pygame.error: # Some formats (e.g. 16) may not be supported. continue try: __, f, c = mixer.get_init() if f != format or c != channels: # Some formats (e.g. -8) may not be supported. continue for c, a in a_lists[format]: self._test_array_argument(format, a, c == channels) finally: mixer.quit() def _test_array_argument(self, format, a, test_pass): from numpy import array, all as all_ try: snd = mixer.Sound(array=a) except ValueError: if not test_pass: return self.fail("Raised ValueError: Format %i, dtype %s" % (format, a.dtype)) if not test_pass: self.fail( "Did not raise ValueError: Format %i, dtype %s" % (format, a.dtype) ) a2 = array(snd) a3 = a.astype(a2.dtype) lshift = abs(format) - 8 * a.itemsize if lshift >= 0: # This is asymmetric with respect to downcasting. a3 <<= lshift self.assertTrue(all_(a2 == a3), "Format %i, dtype %s" % (format, a.dtype)) def _test_array_interface_fail(self, a): self.assertRaises(ValueError, mixer.Sound, array=a) def test_array_interface(self): mixer.init(22050, -16, 1, allowedchanges=0) snd = mixer.Sound(buffer=b"\x00\x7f" * 20) d = snd.__array_interface__ self.assertTrue(isinstance(d, dict)) if pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN: typestr = "") if is_lil_endian else (">", "<") shape = (10, channels)[:ndim] strides = (channels * itemsize, itemsize)[2 - ndim :] exp = Exporter(shape, format=frev + "i") snd = mixer.Sound(array=exp) buflen = len(exp) * itemsize * channels imp = Importer(snd, buftools.PyBUF_SIMPLE) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_WRITABLE) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FORMAT) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_ND) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, shape) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_STRIDES) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FULL_RO) self.assertEqual(imp.ndim, ndim) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, 2) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FULL_RO) self.assertEqual(imp.ndim, ndim) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, exp.shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_C_CONTIGUOUS) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) imp = Importer(snd, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) if ndim == 1: imp = Importer(snd, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(imp.ndim, 1) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) else: self.assertRaises(BufferError, Importer, snd, buftools.PyBUF_F_CONTIGUOUS) def test_fadeout(self): """Ensure pygame.mixer.fadeout() stops playback after fading out the sound.""" if mixer.get_init() is None: mixer.init() sound = pygame.mixer.Sound(example_path("data/house_lo.wav")) channel = pygame.mixer.find_channel() channel.play(sound) fadeout_time = 200 # milliseconds channel.fadeout(fadeout_time) pygame.time.wait(fadeout_time + 30) # Ensure the channel is no longer busy self.assertFalse(channel.get_busy()) def test_find_channel(self): # __doc__ (as of 2008-08-02) for pygame.mixer.find_channel: # pygame.mixer.find_channel(force=False): return Channel # find an unused channel mixer.init() filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) num_channels = mixer.get_num_channels() if num_channels > 0: found_channel = mixer.find_channel() self.assertIsNotNone(found_channel) # try playing on all channels channels = [] for channel_id in range(0, num_channels): channel = mixer.Channel(channel_id) channel.play(sound) channels.append(channel) # should fail without being forceful found_channel = mixer.find_channel() self.assertIsNone(found_channel) # try forcing without keyword found_channel = mixer.find_channel(True) self.assertIsNotNone(found_channel) # try forcing with keyword found_channel = mixer.find_channel(force=True) self.assertIsNotNone(found_channel) for channel in channels: channel.stop() found_channel = mixer.find_channel() self.assertIsNotNone(found_channel) @unittest.expectedFailure def test_pause(self): """Ensure pygame.mixer.pause() temporarily stops playback of all sound channels.""" if mixer.get_init() is None: mixer.init() sound = mixer.Sound(example_path("data/house_lo.wav")) channel = mixer.find_channel() channel.play(sound) mixer.pause() # TODO: this currently fails? # Ensure the channel is paused self.assertFalse(channel.get_busy()) mixer.unpause() # Ensure the channel is no longer paused self.assertTrue(channel.get_busy()) def test_set_reserved(self): """Ensure pygame.mixer.set_reserved() reserves the given number of channels.""" # pygame.mixer.set_reserved(count): return count mixer.init() default_num_channels = mixer.get_num_channels() # try reserving all the channels result = mixer.set_reserved(default_num_channels) self.assertEqual(result, default_num_channels) # try reserving all the channels + 1 result = mixer.set_reserved(default_num_channels + 1) # should still be default self.assertEqual(result, default_num_channels) # try unreserving all result = mixer.set_reserved(0) # should still be default self.assertEqual(result, 0) # try reserving half result = mixer.set_reserved(int(default_num_channels / 2)) # should still be default self.assertEqual(result, int(default_num_channels / 2)) def test_stop(self): """Stops playback of all active sound channels.""" if mixer.get_init() is None: mixer.init() sound = pygame.mixer.Sound(example_path("data/house_lo.wav")) channel = pygame.mixer.Channel(0) channel.play(sound) pygame.mixer.stop() for i in range(pygame.mixer.get_num_channels()): self.assertFalse(pygame.mixer.Channel(i).get_busy()) def test_get_sdl_mixer_version(self): """Ensures get_sdl_mixer_version works correctly with no args.""" expected_length = 3 expected_type = tuple expected_item_type = int version = pygame.mixer.get_sdl_mixer_version() self.assertIsInstance(version, expected_type) self.assertEqual(len(version), expected_length) for item in version: self.assertIsInstance(item, expected_item_type) def test_get_sdl_mixer_version__args(self): """Ensures get_sdl_mixer_version works correctly using args.""" expected_length = 3 expected_type = tuple expected_item_type = int for value in (True, False): version = pygame.mixer.get_sdl_mixer_version(value) self.assertIsInstance(version, expected_type) self.assertEqual(len(version), expected_length) for item in version: self.assertIsInstance(item, expected_item_type) def test_get_sdl_mixer_version__kwargs(self): """Ensures get_sdl_mixer_version works correctly using kwargs.""" expected_length = 3 expected_type = tuple expected_item_type = int for value in (True, False): version = pygame.mixer.get_sdl_mixer_version(linked=value) self.assertIsInstance(version, expected_type) self.assertEqual(len(version), expected_length) for item in version: self.assertIsInstance(item, expected_item_type) def test_get_sdl_mixer_version__invalid_args_kwargs(self): """Ensures get_sdl_mixer_version handles invalid args and kwargs.""" invalid_bool = InvalidBool() with self.assertRaises(TypeError): version = pygame.mixer.get_sdl_mixer_version(invalid_bool) with self.assertRaises(TypeError): version = pygame.mixer.get_sdl_mixer_version(linked=invalid_bool) def test_get_sdl_mixer_version__linked_equals_compiled(self): """Ensures get_sdl_mixer_version's linked/compiled versions are equal.""" linked_version = pygame.mixer.get_sdl_mixer_version(linked=True) complied_version = pygame.mixer.get_sdl_mixer_version(linked=False) self.assertTupleEqual(linked_version, complied_version) ############################## CHANNEL CLASS TESTS ############################# class ChannelTypeTest(unittest.TestCase): @classmethod def setUpClass(cls): # Initializing the mixer is slow, so minimize the times it is called. mixer.init() @classmethod def tearDownClass(cls): mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if mixer.get_init() is None: mixer.init() def test_channel(self): """Ensure Channel() creation works.""" channel = mixer.Channel(0) self.assertIsInstance(channel, mixer.ChannelType) self.assertEqual(channel.__class__.__name__, "Channel") def test_channel__without_arg(self): """Ensure exception for Channel() creation with no argument.""" with self.assertRaises(TypeError): mixer.Channel() def test_channel__invalid_id(self): """Ensure exception for Channel() creation with an invalid id.""" with self.assertRaises(IndexError): mixer.Channel(-1) def test_channel__before_init(self): """Ensure exception for Channel() creation with non-init mixer.""" mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): mixer.Channel(0) def test_fadeout(self): """Ensure Channel.fadeout() stops playback after fading out.""" channel = mixer.Channel(0) sound = mixer.Sound(example_path("data/house_lo.wav")) channel.play(sound) fadeout_time = 1000 channel.fadeout(fadeout_time) # Wait for the fadeout to complete. pygame.time.wait(fadeout_time + 100) self.assertFalse(channel.get_busy()) def test_get_busy(self): """Ensure an idle channel's busy state is correct.""" expected_busy = False channel = mixer.Channel(0) busy = channel.get_busy() self.assertEqual(busy, expected_busy) def test_get_busy__active(self): """Ensure an active channel's busy state is correct.""" channel = mixer.Channel(0) sound = mixer.Sound(example_path("data/house_lo.wav")) channel.play(sound) self.assertTrue(channel.get_busy()) def todo_test_get_endevent(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.get_endevent: # Channel.get_endevent(): return type # get the event a channel sends when playback stops # # Returns the event type to be sent every time the Channel finishes # playback of a Sound. If there is no endevent the function returns # pygame.NOEVENT. # self.fail() def test_get_queue(self): """Ensure Channel.get_queue() returns any queued Sound.""" channel = mixer.Channel(0) frequency, format, channels = mixer.get_init() sound_length_in_ms = 200 sound_length_in_ms_2 = 400 bytes_per_ms = int((frequency / 1000) * channels * (abs(format) // 8)) sound1 = mixer.Sound(b"\x00" * int(sound_length_in_ms * bytes_per_ms)) sound2 = mixer.Sound(b"\x00" * (int(sound_length_in_ms_2 * bytes_per_ms))) channel.play(sound1) channel.queue(sound2) # Ensure the second queued sound is returned. self.assertEqual(channel.get_queue().get_length(), sound2.get_length()) pygame.time.wait(sound_length_in_ms + 100) self.assertIsNone(channel.get_queue()) # the second sound is now playing self.assertEqual(channel.get_sound().get_length(), sound2.get_length()) pygame.time.wait((sound_length_in_ms_2) + 100) # Now there is nothing on the queue. self.assertIsNone(channel.get_queue()) def test_get_sound(self): """Ensure Channel.get_sound() returns the currently playing Sound.""" channel = mixer.Channel(0) sound = mixer.Sound(example_path("data/house_lo.wav")) channel.play(sound) # Ensure the correct Sound object is returned. got_sound = channel.get_sound() self.assertEqual(got_sound, sound) # Stop the sound and ensure None is returned. channel.stop() got_sound = channel.get_sound() self.assertIsNone(got_sound) def test_get_volume(self): """Ensure a channel's volume can be retrieved.""" expected_volume = 1.0 # default channel = mixer.Channel(0) volume = channel.get_volume() self.assertAlmostEqual(volume, expected_volume) def test_pause_unpause(self): """ Test if the Channel can be paused and unpaused. """ if mixer.get_init() is None: mixer.init() sound = pygame.mixer.Sound(example_path("data/house_lo.wav")) channel = sound.play() channel.pause() self.assertTrue( channel.get_busy(), msg="Channel should be paused but it's not." ) channel.unpause() self.assertTrue( channel.get_busy(), msg="Channel should be unpaused but it's not." ) sound.stop() def test_pause_unpause__before_init(self): """ Ensure exception for Channel.pause() with non-init mixer. """ sound = mixer.Sound(example_path("data/house_lo.wav")) channel = sound.play() mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): channel.pause() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): channel.unpause() def test_queue(self): """ Ensure the Channel.queue() works correctly """ if os.environ.get("PYGAME_MSYS2") == "1": self.skipTest("Skip test on MSYS2") # Setup channel = mixer.Channel(0) frequency, format, channels = mixer.get_init() sound_length_in_ms = 200 sound_length_in_ms_2 = 400 sound_length_in_ms_3 = 300 bytes_per_ms = int((frequency / 1000) * channels * (abs(format) // 8)) sound1 = mixer.Sound(b"\x00" * int(sound_length_in_ms * bytes_per_ms)) sound2 = mixer.Sound(b"\x00" * (int(sound_length_in_ms_2 * bytes_per_ms))) sound3 = mixer.Sound(b"\x00" * (int(sound_length_in_ms_3 * bytes_per_ms))) # Test that the sound is played when the first one stop and the queue is cleared channel.play(sound1) channel.queue(sound2) pygame.time.wait(sound_length_in_ms + 100) self.assertTrue(channel.get_busy()) self.assertEqual(channel.get_sound(), sound2) self.assertIsNone(channel.get_queue()) pygame.time.wait(sound_length_in_ms_2 + 100) # Test when no sound playing channel.queue(sound1) self.assertTrue(channel.get_busy()) self.assertEqual(channel.get_sound(), sound1) pygame.time.wait(sound_length_in_ms + 100) # Test that the queue is discarded if Channel.play() is used channel.play(sound1) channel.queue(sound2) channel.play(sound3) self.assertIsNone(channel.get_queue()) pygame.time.wait(sound_length_in_ms_3 + 100) self.assertFalse(channel.get_busy()) # Test that the queue is discarded if Channel.stop() is used channel.play(sound1) channel.queue(sound2) channel.stop() self.assertIsNone(channel.get_queue()) self.assertFalse(channel.get_busy()) # Test that when there is already a queue(), the ancient queue get discarded channel.play(sound1) channel.queue(sound2) channel.queue(sound3) self.assertEqual(channel.get_sound(), sound1) self.assertEqual(channel.get_queue(), sound3) def test_stop(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.stop: # Channel.stop(): return None # stop playback on a Channel # # Stop sound playback on a channel. After playback is stopped the # channel becomes available for new Sounds to play on it. # channel = mixer.Channel(0) sound = mixer.Sound(example_path("data/house_lo.wav")) # simple check channel.play(sound) channel.stop() self.assertFalse(channel.get_busy()) # check that queued sounds also stop channel.queue(sound) channel.stop() self.assertFalse(channel.get_busy()) # check that new sounds can be played channel.play(sound) self.assertTrue(channel.get_busy()) class ChannelSetVolumeTest(unittest.TestCase): def setUp(self): mixer.init() self.channel = pygame.mixer.Channel(0) self.sound = pygame.mixer.Sound(example_path("data/boom.wav")) def tearDown(self): mixer.quit() def test_set_volume_with_one_argument(self): self.channel.play(self.sound) self.channel.set_volume(0.5) self.assertEqual(self.channel.get_volume(), 0.5) @unittest.expectedFailure def test_set_volume_with_two_arguments(self): # TODO: why doesn't this work? Seems to ignore stereo setting. # https://www.pygame.org/docs/ref/mixer.html#pygame.mixer.Channel.set_volume self.channel.play(self.sound) self.channel.set_volume(0.3, 0.7) self.assertEqual(self.channel.get_volume(), (0.3, 0.7)) class ChannelEndEventTest(unittest.TestCase): def setUp(self): pygame.display.init() pygame.display.set_mode((40, 40)) if mixer.get_init() is None: mixer.init() def tearDown(self): pygame.display.quit() mixer.quit() def test_get_endevent(self): """Ensure Channel.get_endevent() returns the correct event type.""" channel = mixer.Channel(0) sound = mixer.Sound(example_path("data/house_lo.wav")) channel.play(sound) # Set the end event for the channel. END_EVENT = pygame.USEREVENT + 1 channel.set_endevent(END_EVENT) got_end_event = channel.get_endevent() self.assertEqual(got_end_event, END_EVENT) # Wait for the sound to finish playing. channel.stop() while channel.get_busy(): pygame.time.wait(10) # Check that the end event was sent. events = pygame.event.get(got_end_event) self.assertTrue(len(events) > 0) ############################### SOUND CLASS TESTS ############################## class TestSoundPlay(unittest.TestCase): def setUp(self): mixer.init() self.filename = example_path(os.path.join("data", "house_lo.wav")) self.sound = mixer.Sound(file=self.filename) def tearDown(self): mixer.quit() def test_play_once(self): """Test playing a sound once.""" channel = self.sound.play() self.assertIsInstance(channel, pygame.mixer.Channel) self.assertTrue(channel.get_busy()) def test_play_multiple_times(self): """Test playing a sound multiple times.""" # create a sound 100ms long frequency, format, channels = mixer.get_init() sound_length_in_ms = 100 bytes_per_ms = int((frequency / 1000) * channels * (abs(format) // 8)) sound = mixer.Sound(b"\x00" * int(sound_length_in_ms * bytes_per_ms)) self.assertAlmostEqual( sound.get_length(), sound_length_in_ms / 1000.0, places=2 ) num_loops = 5 channel = sound.play(loops=num_loops) self.assertIsInstance(channel, pygame.mixer.Channel) # the sound should be playing pygame.time.wait((sound_length_in_ms * num_loops) - 100) self.assertTrue(channel.get_busy()) # the sound should not be playing anymore pygame.time.wait(sound_length_in_ms + 200) self.assertFalse(channel.get_busy()) def test_play_indefinitely(self): """Test playing a sound indefinitely.""" frequency, format, channels = mixer.get_init() sound_length_in_ms = 100 bytes_per_ms = int((frequency / 1000) * channels * (abs(format) // 8)) sound = mixer.Sound(b"\x00" * int(sound_length_in_ms * bytes_per_ms)) channel = sound.play(loops=-1) self.assertIsInstance(channel, pygame.mixer.Channel) # we can't wait forever... so we wait 2 loops for _ in range(2): self.assertTrue(channel.get_busy()) pygame.time.wait(sound_length_in_ms) def test_play_with_maxtime(self): """Test playing a sound with maxtime.""" channel = self.sound.play(maxtime=200) self.assertIsInstance(channel, pygame.mixer.Channel) self.assertTrue(channel.get_busy()) pygame.time.wait(200 + 50) self.assertFalse(channel.get_busy()) def test_play_with_fade_ms(self): """Test playing a sound with fade_ms.""" channel = self.sound.play(fade_ms=500) self.assertIsInstance(channel, pygame.mixer.Channel) self.assertTrue(channel.get_busy()) pygame.time.wait(250) self.assertGreater(channel.get_volume(), 0.3) self.assertLess(channel.get_volume(), 0.80) pygame.time.wait(300) self.assertEqual(channel.get_volume(), 1.0) def test_play_with_invalid_loops(self): """Test playing a sound with invalid loops.""" with self.assertRaises(TypeError): self.sound.play(loops="invalid") def test_play_with_invalid_maxtime(self): """Test playing a sound with invalid maxtime.""" with self.assertRaises(TypeError): self.sound.play(maxtime="invalid") def test_play_with_invalid_fade_ms(self): """Test playing a sound with invalid fade_ms.""" with self.assertRaises(TypeError): self.sound.play(fade_ms="invalid") class SoundTypeTest(unittest.TestCase): @classmethod def tearDownClass(cls): mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if mixer.get_init() is None: mixer.init() # See MixerModuleTest's methods test_sound_args(), test_sound_unicode(), # and test_array_keyword() for additional testing of Sound() creation. def test_sound(self): """Ensure Sound() creation with a filename works.""" filename = example_path(os.path.join("data", "house_lo.wav")) sound1 = mixer.Sound(filename) sound2 = mixer.Sound(file=filename) self.assertIsInstance(sound1, mixer.Sound) self.assertIsInstance(sound2, mixer.Sound) def test_sound__from_file_object(self): """Ensure Sound() creation with a file object works.""" filename = example_path(os.path.join("data", "house_lo.wav")) # Using 'with' ensures the file is closed even if test fails. with open(filename, "rb") as file_obj: sound = mixer.Sound(file_obj) self.assertIsInstance(sound, mixer.Sound) def test_sound__from_sound_object(self): """Ensure Sound() creation with a Sound() object works.""" filename = example_path(os.path.join("data", "house_lo.wav")) sound_obj = mixer.Sound(file=filename) sound = mixer.Sound(sound_obj) self.assertIsInstance(sound, mixer.Sound) def test_sound__from_pathlib(self): """Ensure Sound() creation with a pathlib.Path object works.""" path = pathlib.Path(example_path(os.path.join("data", "house_lo.wav"))) sound1 = mixer.Sound(path) sound2 = mixer.Sound(file=path) self.assertIsInstance(sound1, mixer.Sound) self.assertIsInstance(sound2, mixer.Sound) def todo_test_sound__from_buffer(self): """Ensure Sound() creation with a buffer works.""" self.fail() def test_sound__from_array(self): """Ensure Sound() creation with an array works.""" array1 = array('u', example_path(os.path.join("data", "house_lo.wav"))) sound1 = mixer.Sound(array1) self.assertIsInstance(sound1, mixer.Sound) def test_sound__without_arg(self): """Ensure exception raised for Sound() creation with no argument.""" with self.assertRaises(TypeError): mixer.Sound() def test_sound__before_init(self): """Ensure exception raised for Sound() creation with non-init mixer.""" mixer.quit() filename = example_path(os.path.join("data", "house_lo.wav")) with self.assertRaisesRegex(pygame.error, "mixer not initialized"): mixer.Sound(file=filename) @unittest.skipIf(IS_PYPY, "pypy skip") def test_samples_address(self): """Test the _samples_address getter.""" try: from ctypes import pythonapi, c_void_p, py_object Bytes_FromString = pythonapi.PyBytes_FromString Bytes_FromString.restype = c_void_p Bytes_FromString.argtypes = [py_object] samples = b"abcdefgh" # keep byte size a multiple of 4 sample_bytes = Bytes_FromString(samples) snd = mixer.Sound(buffer=samples) self.assertNotEqual(snd._samples_address, sample_bytes) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): snd._samples_address def test_get_length(self): """Tests if get_length returns a correct length.""" try: for size in SIZES: pygame.mixer.quit() pygame.mixer.init(size=size) filename = example_path(os.path.join("data", "punch.wav")) sound = mixer.Sound(file=filename) # The sound data is in the mixer output format. So dividing the # length of the raw sound data by the mixer settings gives # the expected length of the sound. sound_bytes = sound.get_raw() mix_freq, mix_bits, mix_channels = pygame.mixer.get_init() mix_bytes = abs(mix_bits) / 8 expected_length = ( float(len(sound_bytes)) / mix_freq / mix_bytes / mix_channels ) self.assertAlmostEqual(expected_length, sound.get_length()) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.get_length() def test_get_num_channels(self): """ Tests if Sound.get_num_channels returns the correct number of channels playing a specific sound. """ try: filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) self.assertEqual(sound.get_num_channels(), 0) sound.play() self.assertEqual(sound.get_num_channels(), 1) sound.play() self.assertEqual(sound.get_num_channels(), 2) sound.stop() self.assertEqual(sound.get_num_channels(), 0) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.get_num_channels() def test_get_volume(self): """Ensure a sound's volume can be retrieved.""" try: expected_volume = 1.0 # default filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) volume = sound.get_volume() self.assertAlmostEqual(volume, expected_volume) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.get_volume() def test_get_volume__while_playing(self): """Ensure a sound's volume can be retrieved while playing.""" try: expected_volume = 1.0 # default filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) sound.play(-1) volume = sound.get_volume() self.assertAlmostEqual(volume, expected_volume) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.get_volume() def test_set_volume(self): """Ensure a sound's volume can be set.""" try: float_delta = 1.0 / 128 # SDL volume range is 0 to 128 filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) current_volume = sound.get_volume() # (volume_set_value : expected_volume) volumes = ( (-1, current_volume), # value < 0 won't change volume (0, 0.0), (0.01, 0.01), (0.1, 0.1), (0.5, 0.5), (0.9, 0.9), (0.99, 0.99), (1, 1.0), (1.1, 1.0), (2.0, 1.0), ) for volume_set_value, expected_volume in volumes: sound.set_volume(volume_set_value) self.assertAlmostEqual( sound.get_volume(), expected_volume, delta=float_delta ) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.set_volume(1) def test_set_volume__while_playing(self): """Ensure a sound's volume can be set while playing.""" try: float_delta = 1.0 / 128 # SDL volume range is 0 to 128 filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) current_volume = sound.get_volume() # (volume_set_value : expected_volume) volumes = ( (-1, current_volume), # value < 0 won't change volume (0, 0.0), (0.01, 0.01), (0.1, 0.1), (0.5, 0.5), (0.9, 0.9), (0.99, 0.99), (1, 1.0), (1.1, 1.0), (2.0, 1.0), ) sound.play(loops=-1) for volume_set_value, expected_volume in volumes: sound.set_volume(volume_set_value) self.assertAlmostEqual( sound.get_volume(), expected_volume, delta=float_delta ) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.set_volume(1) def test_stop(self): """Ensure stop can be called while not playing a sound.""" try: expected_channels = 0 filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) sound.stop() self.assertEqual(sound.get_num_channels(), expected_channels) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.stop() def test_stop__while_playing(self): """Ensure stop stops a playing sound.""" try: expected_channels = 0 filename = example_path(os.path.join("data", "house_lo.wav")) sound = mixer.Sound(file=filename) sound.play(-1) sound.stop() self.assertEqual(sound.get_num_channels(), expected_channels) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): sound.stop() def test_get_raw(self): """Ensure get_raw returns the correct bytestring.""" try: samples = b"abcdefgh" # keep byte size a multiple of 4 snd = mixer.Sound(buffer=samples) raw = snd.get_raw() self.assertIsInstance(raw, bytes) self.assertEqual(raw, samples) finally: pygame.mixer.quit() with self.assertRaisesRegex(pygame.error, "mixer not initialized"): snd.get_raw() def test_correct_subclassing(self): class CorrectSublass(mixer.Sound): def __init__(self, file): super().__init__(file=file) filename = example_path(os.path.join("data", "house_lo.wav")) correct = CorrectSublass(filename) try: correct.get_volume() except Exception: self.fail("This should not raise an exception.") def test_incorrect_subclassing(self): class IncorrectSuclass(mixer.Sound): def __init__(self): pass incorrect = IncorrectSuclass() self.assertRaises(RuntimeError, incorrect.get_volume) class TestSoundFadeout(unittest.TestCase): def setUp(self): if mixer.get_init() is None: pygame.mixer.init() def tearDown(self): pygame.mixer.quit() def test_fadeout_with_valid_time(self): """Tests if fadeout stops sound playback after fading it out over the time argument in milliseconds.""" filename = example_path(os.path.join("data", "punch.wav")) sound = mixer.Sound(file=filename) channel = sound.play() channel.fadeout(1000) pygame.time.wait(2000) self.assertFalse(channel.get_busy()) # TODO: this fails. # def test_fadeout_with_zero_time(self): # """Tests if fadeout stops sound playback immediately when time argument is zero.""" # filename = example_path(os.path.join("data", "punch.wav")) # sound = mixer.Sound(file=filename) # channel = sound.play() # channel.fadeout(0) # self.assertFalse(channel.get_busy()) # TODO: this fails. # def test_fadeout_with_negative_time(self): # """Tests if fadeout stops sound playback immediately when time argument is negative.""" # filename = example_path(os.path.join("data", "punch.wav")) # sound = mixer.Sound(file=filename) # channel = sound.play() # channel.fadeout(-1000) # self.assertFalse(channel.get_busy()) # TODO: What should happen here? # def test_fadeout_with_large_time(self): # """Tests if fadeout stops sound playback after fading it out over the time argument in milliseconds, even if time is larger than the sound length.""" # filename = example_path(os.path.join("data", "punch.wav")) # sound = mixer.Sound(file=filename) # channel = sound.play() # channel.fadeout(...?) # pygame.time.wait(...?) # self.assertFalse(channel.get_busy()) class TestGetBusy(unittest.TestCase): """Test pygame.mixer.get_busy. |tags:slow| """ def setUp(self): pygame.mixer.init() def tearDown(self): pygame.mixer.quit() def test_no_sound_playing(self): """ Test that get_busy returns False when no sound is playing. """ self.assertFalse(pygame.mixer.get_busy()) def test_one_sound_playing(self): """ Test that get_busy returns True when one sound is playing. """ sound = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound.play() time.sleep(0.2) self.assertTrue(pygame.mixer.get_busy()) sound.stop() def test_multiple_sounds_playing(self): """ Test that get_busy returns True when multiple sounds are playing. """ sound1 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound2 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound1.play() sound2.play() time.sleep(0.2) self.assertTrue(pygame.mixer.get_busy()) sound1.stop() sound2.stop() def test_all_sounds_stopped(self): """ Test that get_busy returns False when all sounds are stopped. """ sound1 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound2 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound1.play() sound2.play() time.sleep(0.2) sound1.stop() sound2.stop() time.sleep(0.2) self.assertFalse(pygame.mixer.get_busy()) def test_all_sounds_stopped_with_fadeout(self): """ Test that get_busy returns False when all sounds are stopped with fadeout. """ sound1 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound2 = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound1.play() sound2.play() time.sleep(0.2) sound1.fadeout(100) sound2.fadeout(100) time.sleep(0.3) self.assertFalse(pygame.mixer.get_busy()) def test_sound_fading_out(self): """Tests that get_busy() returns True when a sound is fading out""" sound = pygame.mixer.Sound(example_path("data/house_lo.wav")) sound.play(fade_ms=1000) time.sleep(1.1) self.assertTrue(pygame.mixer.get_busy()) sound.stop() ##################################### MAIN ##################################### if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/mouse_test.py0000644000175100001770000003153214676242340016143 0ustar00runnerdockerimport unittest import os import platform import warnings import pygame DARWIN = "Darwin" in platform.platform() class MouseTests(unittest.TestCase): @classmethod def setUpClass(cls): # The display needs to be initialized for mouse functions. pygame.display.init() @classmethod def tearDownClass(cls): pygame.display.quit() class MouseModuleInteractiveTest(MouseTests): __tags__ = ["interactive"] def test_set_pos(self): """Ensures set_pos works correctly. Requires tester to move the mouse to be on the window. """ pygame.display.set_mode((500, 500)) pygame.event.get() # Pump event queue to make window get focus on macos. if not pygame.mouse.get_focused(): # The window needs to be focused for the mouse.set_pos to work on macos. return clock = pygame.time.Clock() expected_pos = ((10, 0), (0, 0), (499, 0), (499, 499), (341, 143), (94, 49)) for x, y in expected_pos: pygame.mouse.set_pos(x, y) pygame.event.get() found_pos = pygame.mouse.get_pos() clock.tick() time_passed = 0.0 ready_to_test = False while not ready_to_test and time_passed <= 1000.0: # Avoid endless loop time_passed += clock.tick() for event in pygame.event.get(): if event.type == pygame.MOUSEMOTION: ready_to_test = True self.assertEqual(found_pos, (x, y)) class MouseModuleTest(MouseTests): @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER", "") == "dummy", "Cursors not supported on headless test machines", ) def test_get_cursor(self): """Ensures get_cursor works correctly.""" # error should be raised when the display is uninitialized with self.assertRaises(pygame.error): pygame.display.quit() pygame.mouse.get_cursor() pygame.display.init() size = (8, 8) hotspot = (0, 0) xormask = (0, 96, 120, 126, 112, 96, 0, 0) andmask = (224, 240, 254, 255, 254, 240, 96, 0) expected_length = 4 expected_cursor = pygame.cursors.Cursor(size, hotspot, xormask, andmask) pygame.mouse.set_cursor(expected_cursor) try: cursor = pygame.mouse.get_cursor() self.assertIsInstance(cursor, pygame.cursors.Cursor) self.assertEqual(len(cursor), expected_length) for info in cursor: self.assertIsInstance(info, tuple) pygame.mouse.set_cursor(size, hotspot, xormask, andmask) self.assertEqual(pygame.mouse.get_cursor(), expected_cursor) # SDLError should be raised when the mouse cursor is NULL except pygame.error: with self.assertRaises(pygame.error): pygame.mouse.get_cursor() @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER", "") == "dummy", "mouse.set_system_cursor only available in SDL2", ) def test_set_system_cursor(self): """Ensures set_system_cursor works correctly.""" with warnings.catch_warnings(record=True) as w: """From Pygame 2.0.1, set_system_cursor() should raise a deprecation warning""" # Cause all warnings to always be triggered. warnings.simplefilter("always") # Error should be raised when the display is uninitialized with self.assertRaises(pygame.error): pygame.display.quit() pygame.mouse.set_system_cursor(pygame.SYSTEM_CURSOR_HAND) pygame.display.init() # TypeError raised when PyArg_ParseTuple fails to parse parameters with self.assertRaises(TypeError): pygame.mouse.set_system_cursor("b") with self.assertRaises(TypeError): pygame.mouse.set_system_cursor(None) with self.assertRaises(TypeError): pygame.mouse.set_system_cursor((8, 8), (0, 0)) # Right type, invalid value with self.assertRaises(pygame.error): pygame.mouse.set_system_cursor(2000) # Working as intended self.assertEqual( pygame.mouse.set_system_cursor(pygame.SYSTEM_CURSOR_ARROW), None ) # Making sure the warnings are working properly self.assertEqual(len(w), 6) self.assertTrue( all(issubclass(warn.category, DeprecationWarning) for warn in w) ) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER", "") == "dummy", "Cursors not supported on headless test machines", ) def test_set_cursor(self): """Ensures set_cursor works correctly.""" # Bitmap cursor information size = (8, 8) hotspot = (0, 0) xormask = (0, 126, 64, 64, 32, 16, 0, 0) andmask = (254, 255, 254, 112, 56, 28, 12, 0) bitmap_cursor = pygame.cursors.Cursor(size, hotspot, xormask, andmask) # System cursor information constant = pygame.SYSTEM_CURSOR_ARROW system_cursor = pygame.cursors.Cursor(constant) # Color cursor information (also uses hotspot variable from Bitmap cursor info) surface = pygame.Surface((10, 10)) color_cursor = pygame.cursors.Cursor(hotspot, surface) pygame.display.quit() # Bitmap: Error should be raised when the display is uninitialized with self.assertRaises(pygame.error): pygame.mouse.set_cursor(bitmap_cursor) # System: Error should be raised when the display is uninitialized with self.assertRaises(pygame.error): pygame.mouse.set_cursor(system_cursor) # Color: Error should be raised when the display is uninitialized with self.assertRaises(pygame.error): pygame.mouse.set_cursor(color_cursor) pygame.display.init() # Bitmap: TypeError raised when PyArg_ParseTuple fails to parse parameters with self.assertRaises(TypeError): pygame.mouse.set_cursor(("w", "h"), hotspot, xormask, andmask) with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, ("0", "0"), xormask, andmask) with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, ("x", "y", "z"), xormask, andmask) # Bitmap: TypeError raised when either mask is not a sequence with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, hotspot, 12345678, andmask) with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, hotspot, xormask, 12345678) # Bitmap: TypeError raised when element of mask is not an integer with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, hotspot, "00000000", andmask) with self.assertRaises(TypeError): pygame.mouse.set_cursor(size, hotspot, xormask, (2, [0], 4, 0, 0, 8, 0, 1)) # Bitmap: ValueError raised when width not divisible by 8 with self.assertRaises(ValueError): pygame.mouse.set_cursor((3, 8), hotspot, xormask, andmask) # Bitmap: ValueError raised when length of either mask != width * height / 8 with self.assertRaises(ValueError): pygame.mouse.set_cursor((16, 2), hotspot, (128, 64, 32), andmask) with self.assertRaises(ValueError): pygame.mouse.set_cursor((16, 2), hotspot, xormask, (192, 96, 48, 0, 1)) # Bitmap: Working as intended self.assertEqual( pygame.mouse.set_cursor((16, 1), hotspot, (8, 0), (0, 192)), None ) pygame.mouse.set_cursor(size, hotspot, xormask, andmask) self.assertEqual(pygame.mouse.get_cursor(), bitmap_cursor) # Bitmap: Working as intended + lists + masks with no references pygame.mouse.set_cursor(size, hotspot, list(xormask), list(andmask)) self.assertEqual(pygame.mouse.get_cursor(), bitmap_cursor) # System: TypeError raised when constant is invalid with self.assertRaises(TypeError): pygame.mouse.set_cursor(-50021232) with self.assertRaises(TypeError): pygame.mouse.set_cursor("yellow") # System: Working as intended self.assertEqual(pygame.mouse.set_cursor(constant), None) pygame.mouse.set_cursor(constant) self.assertEqual(pygame.mouse.get_cursor(), system_cursor) pygame.mouse.set_cursor(system_cursor) self.assertEqual(pygame.mouse.get_cursor(), system_cursor) # Color: TypeError raised with invalid parameters with self.assertRaises(TypeError): pygame.mouse.set_cursor(("x", "y"), surface) with self.assertRaises(TypeError): pygame.mouse.set_cursor(hotspot, "not_a_surface") # Color: Working as intended self.assertEqual(pygame.mouse.set_cursor(hotspot, surface), None) pygame.mouse.set_cursor(hotspot, surface) self.assertEqual(pygame.mouse.get_cursor(), color_cursor) pygame.mouse.set_cursor(color_cursor) self.assertEqual(pygame.mouse.get_cursor(), color_cursor) # Color: Working as intended + Surface with no references is returned okay pygame.mouse.set_cursor((0, 0), pygame.Surface((20, 20))) cursor = pygame.mouse.get_cursor() self.assertEqual(cursor.type, "color") self.assertEqual(cursor.data[0], (0, 0)) self.assertEqual(cursor.data[1].get_size(), (20, 20)) def test_get_focused(self): """Ensures get_focused returns the correct type.""" focused = pygame.mouse.get_focused() self.assertIsInstance(focused, int) def test_get_pressed(self): """Ensures get_pressed returns the correct types.""" expected_length = 3 buttons_pressed = pygame.mouse.get_pressed() self.assertIsInstance(buttons_pressed, tuple) self.assertEqual(len(buttons_pressed), expected_length) for value in buttons_pressed: self.assertIsInstance(value, bool) expected_length = 5 buttons_pressed = pygame.mouse.get_pressed(num_buttons=5) self.assertIsInstance(buttons_pressed, tuple) self.assertEqual(len(buttons_pressed), expected_length) for value in buttons_pressed: self.assertIsInstance(value, bool) expected_length = 3 buttons_pressed = pygame.mouse.get_pressed(3) self.assertIsInstance(buttons_pressed, tuple) self.assertEqual(len(buttons_pressed), expected_length) for value in buttons_pressed: self.assertIsInstance(value, bool) expected_length = 5 buttons_pressed = pygame.mouse.get_pressed(5) self.assertIsInstance(buttons_pressed, tuple) self.assertEqual(len(buttons_pressed), expected_length) for value in buttons_pressed: self.assertIsInstance(value, bool) with self.assertRaises(ValueError): pygame.mouse.get_pressed(4) def test_get_pos(self): """Ensures get_pos returns the correct types.""" expected_length = 2 pos = pygame.mouse.get_pos() self.assertIsInstance(pos, tuple) self.assertEqual(len(pos), expected_length) for value in pos: self.assertIsInstance(value, int) def test_set_pos__invalid_pos(self): """Ensures set_pos handles invalid positions correctly.""" for invalid_pos in ((1,), [1, 2, 3], 1, "1", (1, "1"), []): with self.assertRaises(TypeError): pygame.mouse.set_pos(invalid_pos) def test_get_rel(self): """Ensures get_rel returns the correct types.""" expected_length = 2 rel = pygame.mouse.get_rel() self.assertIsInstance(rel, tuple) self.assertEqual(len(rel), expected_length) for value in rel: self.assertIsInstance(value, int) def test_get_visible(self): """Ensures get_visible works correctly.""" for expected_value in (False, True): pygame.mouse.set_visible(expected_value) visible = pygame.mouse.get_visible() self.assertEqual(visible, expected_value) def test_set_visible(self): """Ensures set_visible returns the correct values.""" # Set to a known state. pygame.mouse.set_visible(True) for expected_visible in (False, True): prev_visible = pygame.mouse.set_visible(expected_visible) self.assertEqual(prev_visible, not expected_visible) def test_set_visible__invalid_value(self): """Ensures set_visible handles invalid positions correctly.""" for invalid_value in ((1,), [1, 2, 3], 1.1, "1", (1, "1"), []): with self.assertRaises(TypeError): prev_visible = pygame.mouse.set_visible(invalid_value) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/pixelarray_test.py0000644000175100001770000017243114676242340017177 0ustar00runnerdockerimport gc import operator import platform import sys import unittest import weakref from functools import reduce from pygame.tests.test_utils import SurfaceSubclass try: from pygame.tests.test_utils import arrinter except NameError: pass import pygame IS_PYPY = "PyPy" == platform.python_implementation() class TestMixin: def assert_surfaces_equal(self, s1, s2, msg=None): """Checks if two surfaces are equal in size and color.""" w, h = s1.get_size() self.assertTupleEqual((w, h), s2.get_size(), msg) msg = "" if msg is None else f"{msg}, " msg += f"size: ({w}, {h})" for x in range(w): for y in range(h): self.assertEqual( s1.get_at((x, y)), s2.get_at((x, y)), f"{msg}, position: ({x}, {y})", ) def assert_surface_filled(self, surface, expected_color, msg=None): """Checks if the surface is filled with the given color.""" width, height = surface.get_size() surface.lock() # Lock for possible speed up. for pos in ((x, y) for y in range(height) for x in range(width)): self.assertEqual(surface.get_at(pos), expected_color, msg) surface.unlock() @unittest.skipIf(IS_PYPY, "pypy having issues") class PixelArrayTypeTest(unittest.TestCase, TestMixin): def test_compare(self): # __doc__ (as of 2008-06-25) for pygame.pixelarray.PixelArray.compare: # PixelArray.compare (array, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray # Compares the PixelArray with another one. w = 10 h = 20 size = w, h sf = pygame.Surface(size, 0, 32) ar = pygame.PixelArray(sf) sf2 = pygame.Surface(size, 0, 32) self.assertRaises(TypeError, ar.compare, sf2) ar2 = pygame.PixelArray(sf2) ar3 = ar.compare(ar2) self.assertTrue(isinstance(ar3, pygame.PixelArray)) self.assertEqual(ar3.shape, size) sf2.fill(pygame.Color("white")) self.assert_surfaces_equal(sf2, ar3.surface) del ar3 r = pygame.Rect(2, 5, 6, 13) sf.fill(pygame.Color("blue"), r) sf2.fill(pygame.Color("red")) sf2.fill(pygame.Color("blue"), r) ar3 = ar.compare(ar2) sf.fill(pygame.Color("white"), r) self.assert_surfaces_equal(sf, ar3.surface) # FINISH ME! # Test other bit depths, slices, and distance != 0. def test_compare__same_colors_within_distance(self): """Ensures compare works correctly with same colored surfaces.""" size = (3, 5) pixelarray_result_color = pygame.Color("white") surface_color = (127, 127, 127, 255) for depth in (8, 16, 24, 32): expected_pixelarray_surface = pygame.Surface(size, depth=depth) expected_pixelarray_surface.fill(pixelarray_result_color) # Copy the surface to ensure same dimensions/formatting. surf_a = expected_pixelarray_surface.copy() surf_a.fill(surface_color) # For non-32 bit depths, the actual color can be different from what # was filled. expected_surface_color = surf_a.get_at((0, 0)) pixelarray_a = pygame.PixelArray(surf_a) pixelarray_b = pygame.PixelArray(surf_a.copy()) for distance in (0.0, 0.01, 0.1, 1.0): pixelarray_result = pixelarray_a.compare( pixelarray_b, distance=distance ) # Ensure the resulting pixelarray is correct and that the original # surfaces were not changed. self.assert_surfaces_equal( pixelarray_result.surface, expected_pixelarray_surface, (depth, distance), ) self.assert_surface_filled( pixelarray_a.surface, expected_surface_color, (depth, distance) ) self.assert_surface_filled( pixelarray_b.surface, expected_surface_color, (depth, distance) ) pixelarray_a.close() pixelarray_b.close() pixelarray_result.close() def test_compare__different_colors_within_distance(self): """Ensures compare works correctly with different colored surfaces and the color difference is within the given distance. """ size = (3, 5) pixelarray_result_color = pygame.Color("white") surface_a_color = (127, 127, 127, 255) surface_b_color = (128, 127, 127, 255) for depth in (8, 16, 24, 32): expected_pixelarray_surface = pygame.Surface(size, depth=depth) expected_pixelarray_surface.fill(pixelarray_result_color) # Copy the surface to ensure same dimensions/formatting. surf_a = expected_pixelarray_surface.copy() surf_a.fill(surface_a_color) # For non-32 bit depths, the actual color can be different from what # was filled. expected_surface_a_color = surf_a.get_at((0, 0)) pixelarray_a = pygame.PixelArray(surf_a) surf_b = expected_pixelarray_surface.copy() surf_b.fill(surface_b_color) # For non-32 bit depths, the actual color can be different from what # was filled. expected_surface_b_color = surf_b.get_at((0, 0)) pixelarray_b = pygame.PixelArray(surf_b) for distance in (0.2, 0.3, 0.5, 1.0): pixelarray_result = pixelarray_a.compare( pixelarray_b, distance=distance ) # Ensure the resulting pixelarray is correct and that the original # surfaces were not changed. self.assert_surfaces_equal( pixelarray_result.surface, expected_pixelarray_surface, (depth, distance), ) self.assert_surface_filled( pixelarray_a.surface, expected_surface_a_color, (depth, distance) ) self.assert_surface_filled( pixelarray_b.surface, expected_surface_b_color, (depth, distance) ) pixelarray_a.close() pixelarray_b.close() pixelarray_result.close() def test_compare__different_colors_not_within_distance(self): """Ensures compare works correctly with different colored surfaces and the color difference is not within the given distance. """ size = (3, 5) pixelarray_result_color = pygame.Color("black") surface_a_color = (127, 127, 127, 255) surface_b_color = (128, 127, 127, 255) for depth in (8, 16, 24, 32): expected_pixelarray_surface = pygame.Surface(size, depth=depth) expected_pixelarray_surface.fill(pixelarray_result_color) # Copy the surface to ensure same dimensions/formatting. surf_a = expected_pixelarray_surface.copy() surf_a.fill(surface_a_color) # For non-32 bit depths, the actual color can be different from what # was filled. expected_surface_a_color = surf_a.get_at((0, 0)) pixelarray_a = pygame.PixelArray(surf_a) surf_b = expected_pixelarray_surface.copy() surf_b.fill(surface_b_color) # For non-32 bit depths, the actual color can be different from what # was filled. expected_surface_b_color = surf_b.get_at((0, 0)) pixelarray_b = pygame.PixelArray(surf_b) for distance in (0.0, 0.00001, 0.0001, 0.001): pixelarray_result = pixelarray_a.compare( pixelarray_b, distance=distance ) # Ensure the resulting pixelarray is correct and that the original # surfaces were not changed. self.assert_surfaces_equal( pixelarray_result.surface, expected_pixelarray_surface, (depth, distance), ) self.assert_surface_filled( pixelarray_a.surface, expected_surface_a_color, (depth, distance) ) self.assert_surface_filled( pixelarray_b.surface, expected_surface_b_color, (depth, distance) ) pixelarray_a.close() pixelarray_b.close() pixelarray_result.close() def test_close(self): """does not crash when it is deleted.""" s = pygame.Surface((10, 10)) a = pygame.PixelArray(s) a.close() del a def test_close_raises(self): """when you try to do an operation after it is closed.""" s = pygame.Surface((10, 10)) a = pygame.PixelArray(s) a.close() def access_after(): a[:] self.assertRaises(ValueError, access_after) def assign_all_after(): a[:] = 1 self.assertRaises(ValueError, assign_all_after) def make_surface_after(): a.make_surface() self.assertRaises(ValueError, make_surface_after) def iter_after(): for x in a: pass self.assertRaises(ValueError, iter_after) def close_after(): a.close() self.assertRaises(ValueError, close_after) def surface_after(): a.surface self.assertRaises(ValueError, surface_after) def itemsize_after(): a.itemsize self.assertRaises(ValueError, itemsize_after) def transpose_after(): a.transpose() self.assertRaises(ValueError, transpose_after) def test_context_manager(self): """closes properly.""" s = pygame.Surface((10, 10)) with pygame.PixelArray(s) as a: a[:] # Test pixel array write... will also catch refcount issues and # segfault with pygame.PixelArray(s) as a: a[:] = pygame.Color("deepskyblue") def test_pixel_array(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) self.assertEqual(ar._pixels_address, sf._pixels_address) if sf.mustlock(): self.assertTrue(sf.get_locked()) self.assertEqual(len(ar), 10) del ar if sf.mustlock(): self.assertFalse(sf.get_locked()) def test_as_class(self): # Check general new-style class freatures. sf = pygame.Surface((2, 3), 0, 32) ar = pygame.PixelArray(sf) self.assertRaises(AttributeError, getattr, ar, "nonnative") ar.nonnative = "value" self.assertEqual(ar.nonnative, "value") r = weakref.ref(ar) self.assertTrue(r() is ar) del ar gc.collect() self.assertTrue(r() is None) class C(pygame.PixelArray): def __str__(self): return "string (%i, %i)" % self.shape ar = C(sf) self.assertEqual(str(ar), "string (2, 3)") r = weakref.ref(ar) self.assertTrue(r() is ar) del ar gc.collect() self.assertTrue(r() is None) def test_pixelarray__subclassed_surface(self): """Ensure the PixelArray constructor accepts subclassed surfaces.""" surface = SurfaceSubclass((3, 5), 0, 32) pixelarray = pygame.PixelArray(surface) self.assertIsInstance(pixelarray, pygame.PixelArray) # Sequence interfaces def test_get_column(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((6, 8), 0, bpp) sf.fill((0, 0, 255)) val = sf.map_rgb((0, 0, 255)) ar = pygame.PixelArray(sf) ar2 = ar.__getitem__(1) self.assertEqual(len(ar2), 8) self.assertEqual(ar2.__getitem__(0), val) self.assertEqual(ar2.__getitem__(1), val) self.assertEqual(ar2.__getitem__(2), val) ar2 = ar.__getitem__(-1) self.assertEqual(len(ar2), 8) self.assertEqual(ar2.__getitem__(0), val) self.assertEqual(ar2.__getitem__(1), val) self.assertEqual(ar2.__getitem__(2), val) @unittest.skipIf(IS_PYPY, "pypy malloc abort") def test_get_pixel(self): w = 10 h = 20 size = w, h bg_color = (0, 0, 255) fg_color_y = (0, 0, 128) fg_color_x = (0, 0, 11) for bpp in (8, 16, 24, 32): sf = pygame.Surface(size, 0, bpp) mapped_bg_color = sf.map_rgb(bg_color) mapped_fg_color_y = sf.map_rgb(fg_color_y) mapped_fg_color_x = sf.map_rgb(fg_color_x) self.assertNotEqual( mapped_fg_color_y, mapped_bg_color, "Unusable test colors for bpp %i" % (bpp,), ) self.assertNotEqual( mapped_fg_color_x, mapped_bg_color, "Unusable test colors for bpp %i" % (bpp,), ) self.assertNotEqual( mapped_fg_color_y, mapped_fg_color_x, "Unusable test colors for bpp %i" % (bpp,), ) sf.fill(bg_color) ar = pygame.PixelArray(sf) ar_y = ar.__getitem__(1) for y in range(h): ar2 = ar_y.__getitem__(y) self.assertEqual( ar2, mapped_bg_color, "ar[1][%i] == %i, mapped_bg_color == %i" % (y, ar2, mapped_bg_color), ) sf.set_at((1, y), fg_color_y) ar2 = ar_y.__getitem__(y) self.assertEqual( ar2, mapped_fg_color_y, "ar[1][%i] == %i, mapped_fg_color_y == %i" % (y, ar2, mapped_fg_color_y), ) sf.set_at((1, 1), bg_color) for x in range(w): ar2 = ar.__getitem__(x).__getitem__(1) self.assertEqual( ar2, mapped_bg_color, "ar[%i][1] = %i, mapped_bg_color = %i" % (x, ar2, mapped_bg_color), ) sf.set_at((x, 1), fg_color_x) ar2 = ar.__getitem__(x).__getitem__(1) self.assertEqual( ar2, mapped_fg_color_x, "ar[%i][1] = %i, mapped_fg_color_x = %i" % (x, ar2, mapped_fg_color_x), ) ar2 = ar.__getitem__(0).__getitem__(0) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(1).__getitem__(0) self.assertEqual(ar2, mapped_fg_color_y, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(-4).__getitem__(1) self.assertEqual(ar2, mapped_fg_color_x, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(-4).__getitem__(5) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(-4).__getitem__(0) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(-w + 1).__getitem__(0) self.assertEqual(ar2, mapped_fg_color_y, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(-w).__getitem__(0) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(5).__getitem__(-4) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(5).__getitem__(-h + 1) self.assertEqual(ar2, mapped_fg_color_x, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(5).__getitem__(-h) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(0).__getitem__(-h + 1) self.assertEqual(ar2, mapped_fg_color_x, "bpp = %i" % (bpp,)) ar2 = ar.__getitem__(0).__getitem__(-h) self.assertEqual(ar2, mapped_bg_color, "bpp = %i" % (bpp,)) def test_set_pixel(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) ar.__getitem__(0).__setitem__(0, (0, 255, 0)) self.assertEqual(ar[0][0], sf.map_rgb((0, 255, 0))) ar.__getitem__(1).__setitem__(1, (128, 128, 128)) self.assertEqual(ar[1][1], sf.map_rgb((128, 128, 128))) ar.__getitem__(-1).__setitem__(-1, (128, 128, 128)) self.assertEqual(ar[9][19], sf.map_rgb((128, 128, 128))) ar.__getitem__(-2).__setitem__(-2, (128, 128, 128)) self.assertEqual(ar[8][-2], sf.map_rgb((128, 128, 128))) def test_set_column(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((6, 8), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) sf2 = pygame.Surface((6, 8), 0, bpp) sf2.fill((0, 255, 255)) ar2 = pygame.PixelArray(sf2) # Test single value assignment ar.__setitem__(2, (128, 128, 128)) self.assertEqual(ar[2][0], sf.map_rgb((128, 128, 128))) self.assertEqual(ar[2][1], sf.map_rgb((128, 128, 128))) ar.__setitem__(-1, (0, 255, 255)) self.assertEqual(ar[5][0], sf.map_rgb((0, 255, 255))) self.assertEqual(ar[-1][1], sf.map_rgb((0, 255, 255))) ar.__setitem__(-2, (255, 255, 0)) self.assertEqual(ar[4][0], sf.map_rgb((255, 255, 0))) self.assertEqual(ar[-2][1], sf.map_rgb((255, 255, 0))) # Test list assignment. ar.__setitem__(0, [(255, 255, 255)] * 8) self.assertEqual(ar[0][0], sf.map_rgb((255, 255, 255))) self.assertEqual(ar[0][1], sf.map_rgb((255, 255, 255))) # Test tuple assignment. # Changed in Pygame 1.9.2 - Raises an exception. self.assertRaises( ValueError, ar.__setitem__, 1, ( (204, 0, 204), (17, 17, 17), (204, 0, 204), (17, 17, 17), (204, 0, 204), (17, 17, 17), (204, 0, 204), (17, 17, 17), ), ) # Test pixel array assignment. ar.__setitem__(1, ar2.__getitem__(3)) self.assertEqual(ar[1][0], sf.map_rgb((0, 255, 255))) self.assertEqual(ar[1][1], sf.map_rgb((0, 255, 255))) def test_get_slice(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) self.assertEqual(len(ar[0:2]), 2) self.assertEqual(len(ar[3:7][3]), 20) self.assertEqual(ar[0:0], None) self.assertEqual(ar[5:5], None) self.assertEqual(ar[9:9], None) # Has to resolve to ar[7:8] self.assertEqual(len(ar[-3:-2]), 1) # 2D self.assertEqual(len(ar[-3:-2][0]), 20) # 1D # Try assignments. # 2D assignment. ar[2:5] = (255, 255, 255) # 1D assignment ar[3][3:7] = (10, 10, 10) self.assertEqual(ar[3][5], sf.map_rgb((10, 10, 10))) self.assertEqual(ar[3][6], sf.map_rgb((10, 10, 10))) @unittest.skipIf(IS_PYPY, "skipping for PyPy (segfaults on mac pypy3 6.0.0)") def test_contains(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) sf.fill((0, 0, 0)) sf.set_at((8, 8), (255, 255, 255)) ar = pygame.PixelArray(sf) self.assertTrue((0, 0, 0) in ar) self.assertTrue((255, 255, 255) in ar) self.assertFalse((255, 255, 0) in ar) self.assertFalse(0x0000FF in ar) # Test sliced array self.assertTrue((0, 0, 0) in ar[8]) self.assertTrue((255, 255, 255) in ar[8]) self.assertFalse((255, 255, 0) in ar[8]) self.assertFalse(0x0000FF in ar[8]) def test_get_surface(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) self.assertTrue(ar.surface is sf) def test_get_surface__subclassed_surface(self): """Ensure the surface attribute can handle subclassed surfaces.""" expected_surface = SurfaceSubclass((5, 3), 0, 32) pixelarray = pygame.PixelArray(expected_surface) surface = pixelarray.surface self.assertIs(surface, expected_surface) self.assertIsInstance(surface, pygame.Surface) self.assertIsInstance(surface, SurfaceSubclass) def test_set_slice(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((6, 8), 0, bpp) sf.fill((0, 0, 0)) ar = pygame.PixelArray(sf) # Test single value assignment val = sf.map_rgb((128, 128, 128)) ar[0:2] = val self.assertEqual(ar[0][0], val) self.assertEqual(ar[0][1], val) self.assertEqual(ar[1][0], val) self.assertEqual(ar[1][1], val) val = sf.map_rgb((0, 255, 255)) ar[-3:-1] = val self.assertEqual(ar[3][0], val) self.assertEqual(ar[-2][1], val) val = sf.map_rgb((255, 255, 255)) ar[-3:] = (255, 255, 255) self.assertEqual(ar[4][0], val) self.assertEqual(ar[-1][1], val) # Test array size mismatch. # Changed in ver. 1.9.2 # (was "Test list assignment, this is a vertical assignment.") val = sf.map_rgb((0, 255, 0)) self.assertRaises(ValueError, ar.__setitem__, slice(2, 4), [val] * 8) # And the horizontal assignment. val = sf.map_rgb((255, 0, 0)) val2 = sf.map_rgb((128, 0, 255)) ar[0:2] = [val, val2] self.assertEqual(ar[0][0], val) self.assertEqual(ar[1][0], val2) self.assertEqual(ar[0][1], val) self.assertEqual(ar[1][1], val2) self.assertEqual(ar[0][4], val) self.assertEqual(ar[1][4], val2) self.assertEqual(ar[0][5], val) self.assertEqual(ar[1][5], val2) # Test pixelarray assignment. ar[:] = (0, 0, 0) sf2 = pygame.Surface((6, 8), 0, bpp) sf2.fill((255, 0, 255)) val = sf.map_rgb((255, 0, 255)) ar2 = pygame.PixelArray(sf2) ar[:] = ar2[:] self.assertEqual(ar[0][0], val) self.assertEqual(ar[5][7], val) # Ensure p1 ... pn are freed for array[...] = [p1, ..., pn] # Bug fix: reference counting. if hasattr(sys, "getrefcount"): class Int(int): """Unique int instances""" pass sf = pygame.Surface((5, 2), 0, 32) ar = pygame.PixelArray(sf) pixel_list = [Int(i) for i in range(ar.shape[0])] refcnts_before = [sys.getrefcount(i) for i in pixel_list] ar[...] = pixel_list refcnts_after = [sys.getrefcount(i) for i in pixel_list] gc.collect() self.assertEqual(refcnts_after, refcnts_before) def test_subscript(self): # By default we do not need to work with any special __***__ # methods as map subscripts are the first looked up by the # object system. for bpp in (8, 16, 24, 32): sf = pygame.Surface((6, 8), 0, bpp) sf.set_at((1, 3), (0, 255, 0)) sf.set_at((0, 0), (0, 255, 0)) sf.set_at((4, 4), (0, 255, 0)) val = sf.map_rgb((0, 255, 0)) ar = pygame.PixelArray(sf) # Test single value requests. self.assertEqual(ar[1, 3], val) self.assertEqual(ar[0, 0], val) self.assertEqual(ar[4, 4], val) self.assertEqual(ar[1][3], val) self.assertEqual(ar[0][0], val) self.assertEqual(ar[4][4], val) # Test ellipse working. self.assertEqual(len(ar[..., ...]), 6) self.assertEqual(len(ar[1, ...]), 8) self.assertEqual(len(ar[..., 3]), 6) # Test simple slicing self.assertEqual(len(ar[:, :]), 6) self.assertEqual( len(ar[:,]), 6, ) self.assertEqual(len(ar[1, :]), 8) self.assertEqual(len(ar[:, 2]), 6) # Empty slices self.assertEqual( ar[4:4,], None, ) self.assertEqual(ar[4:4, ...], None) self.assertEqual(ar[4:4, 2:2], None) self.assertEqual(ar[4:4, 1:4], None) self.assertEqual( ar[4:4:2,], None, ) self.assertEqual( ar[4:4:-2,], None, ) self.assertEqual(ar[4:4:1, ...], None) self.assertEqual(ar[4:4:-1, ...], None) self.assertEqual(ar[4:4:1, 2:2], None) self.assertEqual(ar[4:4:-1, 1:4], None) self.assertEqual(ar[..., 4:4], None) self.assertEqual(ar[1:4, 4:4], None) self.assertEqual(ar[..., 4:4:1], None) self.assertEqual(ar[..., 4:4:-1], None) self.assertEqual(ar[2:2, 4:4:1], None) self.assertEqual(ar[1:4, 4:4:-1], None) # Test advanced slicing ar[0] = 0 ar[1] = 1 ar[2] = 2 ar[3] = 3 ar[4] = 4 ar[5] = 5 # We should receive something like [0,2,4] self.assertEqual(ar[::2, 1][0], 0) self.assertEqual(ar[::2, 1][1], 2) self.assertEqual(ar[::2, 1][2], 4) # We should receive something like [2,2,2] self.assertEqual(ar[2, ::2][0], 2) self.assertEqual(ar[2, ::2][1], 2) self.assertEqual(ar[2, ::2][2], 2) # Should create a 3x3 array of [0,2,4] ar2 = ar[::2, ::2] self.assertEqual(len(ar2), 3) self.assertEqual(ar2[0][0], 0) self.assertEqual(ar2[0][1], 0) self.assertEqual(ar2[0][2], 0) self.assertEqual(ar2[2][0], 4) self.assertEqual(ar2[2][1], 4) self.assertEqual(ar2[2][2], 4) self.assertEqual(ar2[1][0], 2) self.assertEqual(ar2[2][0], 4) self.assertEqual(ar2[1][1], 2) # Should create a reversed 3x8 array over X of [1,2,3] -> [3,2,1] ar2 = ar[3:0:-1] self.assertEqual(len(ar2), 3) self.assertEqual(ar2[0][0], 3) self.assertEqual(ar2[0][1], 3) self.assertEqual(ar2[0][2], 3) self.assertEqual(ar2[0][7], 3) self.assertEqual(ar2[2][0], 1) self.assertEqual(ar2[2][1], 1) self.assertEqual(ar2[2][2], 1) self.assertEqual(ar2[2][7], 1) self.assertEqual(ar2[1][0], 2) self.assertEqual(ar2[1][1], 2) # Should completely reverse the array over X -> [5,4,3,2,1,0] ar2 = ar[::-1] self.assertEqual(len(ar2), 6) self.assertEqual(ar2[0][0], 5) self.assertEqual(ar2[0][1], 5) self.assertEqual(ar2[0][3], 5) self.assertEqual(ar2[0][-1], 5) self.assertEqual(ar2[1][0], 4) self.assertEqual(ar2[1][1], 4) self.assertEqual(ar2[1][3], 4) self.assertEqual(ar2[1][-1], 4) self.assertEqual(ar2[-1][-1], 0) self.assertEqual(ar2[-2][-2], 1) self.assertEqual(ar2[-3][-1], 2) # Test advanced slicing ar[:] = 0 ar2 = ar[:, 1] ar2[:] = [99] * len(ar2) self.assertEqual(ar2[0], 99) self.assertEqual(ar2[-1], 99) self.assertEqual(ar2[-2], 99) self.assertEqual(ar2[2], 99) self.assertEqual(ar[0, 1], 99) self.assertEqual(ar[1, 1], 99) self.assertEqual(ar[2, 1], 99) self.assertEqual(ar[-1, 1], 99) self.assertEqual(ar[-2, 1], 99) # Cases where a 2d array should have a dimension of length 1. ar2 = ar[1:2, :] self.assertEqual(ar2.shape, (1, ar.shape[1])) ar2 = ar[:, 1:2] self.assertEqual(ar2.shape, (ar.shape[0], 1)) sf2 = pygame.Surface((1, 5), 0, 32) ar2 = pygame.PixelArray(sf2) self.assertEqual(ar2.shape, sf2.get_size()) sf2 = pygame.Surface((7, 1), 0, 32) ar2 = pygame.PixelArray(sf2) self.assertEqual(ar2.shape, sf2.get_size()) # Array has a single ellipsis subscript: the identity operator ar2 = ar[...] self.assertTrue(ar2 is ar) # Ensure x and y are freed for p = array[x, y] # Bug fix: reference counting if hasattr(sys, "getrefcount"): class Int(int): """Unique int instances""" pass sf = pygame.Surface((2, 2), 0, 32) ar = pygame.PixelArray(sf) x, y = Int(0), Int(1) rx_before, ry_before = sys.getrefcount(x), sys.getrefcount(y) p = ar[x, y] rx_after, ry_after = sys.getrefcount(x), sys.getrefcount(y) self.assertEqual(rx_after, rx_before) self.assertEqual(ry_after, ry_before) def test_ass_subscript(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((6, 8), 0, bpp) sf.fill((255, 255, 255)) ar = pygame.PixelArray(sf) # Test ellipse working ar[..., ...] = (0, 0, 0) self.assertEqual(ar[0, 0], 0) self.assertEqual(ar[1, 0], 0) self.assertEqual(ar[-1, -1], 0) ar[...,] = (0, 0, 255) self.assertEqual(ar[0, 0], sf.map_rgb((0, 0, 255))) self.assertEqual(ar[1, 0], sf.map_rgb((0, 0, 255))) self.assertEqual(ar[-1, -1], sf.map_rgb((0, 0, 255))) ar[:, ...] = (255, 0, 0) self.assertEqual(ar[0, 0], sf.map_rgb((255, 0, 0))) self.assertEqual(ar[1, 0], sf.map_rgb((255, 0, 0))) self.assertEqual(ar[-1, -1], sf.map_rgb((255, 0, 0))) ar[...] = (0, 255, 0) self.assertEqual(ar[0, 0], sf.map_rgb((0, 255, 0))) self.assertEqual(ar[1, 0], sf.map_rgb((0, 255, 0))) self.assertEqual(ar[-1, -1], sf.map_rgb((0, 255, 0))) # Ensure x and y are freed for array[x, y] = p # Bug fix: reference counting if hasattr(sys, "getrefcount"): class Int(int): """Unique int instances""" pass sf = pygame.Surface((2, 2), 0, 32) ar = pygame.PixelArray(sf) x, y = Int(0), Int(1) rx_before, ry_before = sys.getrefcount(x), sys.getrefcount(y) ar[x, y] = 0 rx_after, ry_after = sys.getrefcount(x), sys.getrefcount(y) self.assertEqual(rx_after, rx_before) self.assertEqual(ry_after, ry_before) def test_pixels_field(self): for bpp in [1, 2, 3, 4]: sf = pygame.Surface((11, 7), 0, bpp * 8) ar = pygame.PixelArray(sf) ar2 = ar[1:, :] self.assertEqual(ar2._pixels_address - ar._pixels_address, ar.itemsize) ar2 = ar[:, 1:] self.assertEqual(ar2._pixels_address - ar._pixels_address, ar.strides[1]) ar2 = ar[::-1, :] self.assertEqual( ar2._pixels_address - ar._pixels_address, (ar.shape[0] - 1) * ar.itemsize, ) ar2 = ar[::-2, :] self.assertEqual( ar2._pixels_address - ar._pixels_address, (ar.shape[0] - 1) * ar.itemsize, ) ar2 = ar[:, ::-1] self.assertEqual( ar2._pixels_address - ar._pixels_address, (ar.shape[1] - 1) * ar.strides[1], ) ar3 = ar2[::-1, :] self.assertEqual( ar3._pixels_address - ar._pixels_address, (ar.shape[0] - 1) * ar.strides[0] + (ar.shape[1] - 1) * ar.strides[1], ) ar2 = ar[:, ::-2] self.assertEqual( ar2._pixels_address - ar._pixels_address, (ar.shape[1] - 1) * ar.strides[1], ) ar2 = ar[2::, 3::] self.assertEqual( ar2._pixels_address - ar._pixels_address, ar.strides[0] * 2 + ar.strides[1] * 3, ) ar2 = ar[2::2, 3::4] self.assertEqual( ar2._pixels_address - ar._pixels_address, ar.strides[0] * 2 + ar.strides[1] * 3, ) ar2 = ar[9:2:-1, :] self.assertEqual( ar2._pixels_address - ar._pixels_address, ar.strides[0] * 9 ) ar2 = ar[:, 5:2:-1] self.assertEqual( ar2._pixels_address - ar._pixels_address, ar.strides[1] * 5 ) ##? ar2 = ar[:,9:2:-1] def test_make_surface(self): bg_color = pygame.Color(255, 255, 255) fg_color = pygame.Color(128, 100, 0) for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 20), 0, bpp) bg_color_adj = sf.unmap_rgb(sf.map_rgb(bg_color)) fg_color_adj = sf.unmap_rgb(sf.map_rgb(fg_color)) sf.fill(bg_color_adj) sf.fill(fg_color_adj, (2, 5, 4, 11)) ar = pygame.PixelArray(sf) newsf = ar[::2, ::2].make_surface() rect = newsf.get_rect() self.assertEqual(rect.width, 5) self.assertEqual(rect.height, 10) for p in [ (0, 2), (0, 3), (1, 2), (2, 2), (3, 2), (3, 3), (0, 7), (0, 8), (1, 8), (2, 8), (3, 8), (3, 7), ]: self.assertEqual(newsf.get_at(p), bg_color_adj) for p in [(1, 3), (2, 3), (1, 5), (2, 5), (1, 7), (2, 7)]: self.assertEqual(newsf.get_at(p), fg_color_adj) # Bug when array width is not a multiple of the slice step. w = 17 lst = list(range(w)) w_slice = len(lst[::2]) h = 3 sf = pygame.Surface((w, h), 0, 32) ar = pygame.PixelArray(sf) ar2 = ar[::2, :] sf2 = ar2.make_surface() w2, h2 = sf2.get_size() self.assertEqual(w2, w_slice) self.assertEqual(h2, h) # Bug when array height is not a multiple of the slice step. # This can hang the Python interpreter. h = 17 lst = list(range(h)) h_slice = len(lst[::2]) w = 3 sf = pygame.Surface((w, h), 0, 32) ar = pygame.PixelArray(sf) ar2 = ar[:, ::2] sf2 = ar2.make_surface() # Hangs here. w2, h2 = sf2.get_size() self.assertEqual(w2, w) self.assertEqual(h2, h_slice) def test_make_surface__subclassed_surface(self): """Ensure make_surface can handle subclassed surfaces.""" expected_size = (3, 5) expected_flags = 0 expected_depth = 32 original_surface = SurfaceSubclass( expected_size, expected_flags, expected_depth ) pixelarray = pygame.PixelArray(original_surface) surface = pixelarray.make_surface() self.assertIsNot(surface, original_surface) self.assertIsInstance(surface, pygame.Surface) self.assertNotIsInstance(surface, SurfaceSubclass) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_flags(), expected_flags) self.assertEqual(surface.get_bitsize(), expected_depth) def test_iter(self): for bpp in (8, 16, 24, 32): sf = pygame.Surface((5, 10), 0, bpp) ar = pygame.PixelArray(sf) iterations = 0 for col in ar: self.assertEqual(len(col), 10) iterations += 1 self.assertEqual(iterations, 5) def test_replace(self): # print("replace start") for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 10), 0, bpp) sf.fill((255, 0, 0)) rval = sf.map_rgb((0, 0, 255)) oval = sf.map_rgb((255, 0, 0)) ar = pygame.PixelArray(sf) ar[::2].replace((255, 0, 0), (0, 0, 255)) self.assertEqual(ar[0][0], rval) self.assertEqual(ar[1][0], oval) self.assertEqual(ar[2][3], rval) self.assertEqual(ar[3][6], oval) self.assertEqual(ar[8][9], rval) self.assertEqual(ar[9][9], oval) ar[::2].replace((0, 0, 255), (255, 0, 0), weights=(10, 20, 50)) self.assertEqual(ar[0][0], oval) self.assertEqual(ar[2][3], oval) self.assertEqual(ar[3][6], oval) self.assertEqual(ar[8][9], oval) self.assertEqual(ar[9][9], oval) # print("replace end") def test_extract(self): # print("extract start") for bpp in (8, 16, 24, 32): sf = pygame.Surface((10, 10), 0, bpp) sf.fill((0, 0, 255)) sf.fill((255, 0, 0), (2, 2, 6, 6)) white = sf.map_rgb((255, 255, 255)) black = sf.map_rgb((0, 0, 0)) ar = pygame.PixelArray(sf) newar = ar.extract((255, 0, 0)) self.assertEqual(newar[0][0], black) self.assertEqual(newar[1][0], black) self.assertEqual(newar[2][3], white) self.assertEqual(newar[3][6], white) self.assertEqual(newar[8][9], black) self.assertEqual(newar[9][9], black) newar = ar.extract((255, 0, 0), weights=(10, 0.1, 50)) self.assertEqual(newar[0][0], black) self.assertEqual(newar[1][0], black) self.assertEqual(newar[2][3], white) self.assertEqual(newar[3][6], white) self.assertEqual(newar[8][9], black) self.assertEqual(newar[9][9], black) # print("extract end") def test_2dslice_assignment(self): w = 2 * 5 * 8 h = 3 * 5 * 9 sf = pygame.Surface((w, h), 0, 32) ar = pygame.PixelArray(sf) size = (w, h) strides = (1, w) offset = 0 self._test_assignment(sf, ar, size, strides, offset) xslice = slice(None, None, 2) yslice = slice(None, None, 3) ar, size, strides, offset = self._array_slice( ar, size, (xslice, yslice), strides, offset ) self._test_assignment(sf, ar, size, strides, offset) xslice = slice(5, None, 5) yslice = slice(5, None, 5) ar, size, strides, offset = self._array_slice( ar, size, (xslice, yslice), strides, offset ) self._test_assignment(sf, ar, size, strides, offset) def _test_assignment(self, sf, ar, ar_size, ar_strides, ar_offset): self.assertEqual(ar.shape, ar_size) ar_w, ar_h = ar_size ar_xstride, ar_ystride = ar_strides sf_w, sf_h = sf.get_size() black = pygame.Color("black") color = pygame.Color(0, 0, 12) pxcolor = sf.map_rgb(color) sf.fill(black) for ar_x, ar_y in [ (0, 0), (0, ar_h - 4), (ar_w - 3, 0), (0, ar_h - 1), (ar_w - 1, 0), (ar_w - 1, ar_h - 1), ]: sf_offset = ar_offset + ar_x * ar_xstride + ar_y * ar_ystride sf_y = sf_offset // sf_w sf_x = sf_offset - sf_y * sf_w sf_posn = (sf_x, sf_y) sf_pix = sf.get_at(sf_posn) self.assertEqual( sf_pix, black, "at pixarr posn (%i, %i) (surf posn (%i, %i)): " "%s != %s" % (ar_x, ar_y, sf_x, sf_y, sf_pix, black), ) ar[ar_x, ar_y] = pxcolor sf_pix = sf.get_at(sf_posn) self.assertEqual( sf_pix, color, "at pixarr posn (%i, %i) (surf posn (%i, %i)): " "%s != %s" % (ar_x, ar_y, sf_x, sf_y, sf_pix, color), ) def _array_slice(self, ar, size, slices, strides, offset): ar = ar[slices] xslice, yslice = slices w, h = size xstart, xstop, xstep = xslice.indices(w) ystart, ystop, ystep = yslice.indices(h) w = (xstop - xstart + xstep - 1) // xstep h = (ystop - ystart + ystep - 1) // ystep xstride, ystride = strides offset += xstart * xstride + ystart * ystride xstride *= xstep ystride *= ystep return ar, (w, h), (xstride, ystride), offset def test_array_properties(self): # itemsize, ndim, shape, and strides. for bpp in [1, 2, 3, 4]: sf = pygame.Surface((2, 2), 0, bpp * 8) ar = pygame.PixelArray(sf) self.assertEqual(ar.itemsize, bpp) for shape in [(4, 16), (5, 13)]: w, h = shape sf = pygame.Surface(shape, 0, 32) bpp = sf.get_bytesize() pitch = sf.get_pitch() ar = pygame.PixelArray(sf) self.assertEqual(ar.ndim, 2) self.assertEqual(ar.shape, shape) self.assertEqual(ar.strides, (bpp, pitch)) ar2 = ar[::2, :] w2 = len(([0] * w)[::2]) self.assertEqual(ar2.ndim, 2) self.assertEqual(ar2.shape, (w2, h)) self.assertEqual(ar2.strides, (2 * bpp, pitch)) ar2 = ar[:, ::2] h2 = len(([0] * h)[::2]) self.assertEqual(ar2.ndim, 2) self.assertEqual(ar2.shape, (w, h2)) self.assertEqual(ar2.strides, (bpp, 2 * pitch)) ar2 = ar[1] self.assertEqual(ar2.ndim, 1) self.assertEqual(ar2.shape, (h,)) self.assertEqual(ar2.strides, (pitch,)) ar2 = ar[:, 1] self.assertEqual(ar2.ndim, 1) self.assertEqual(ar2.shape, (w,)) self.assertEqual(ar2.strides, (bpp,)) def test_self_assign(self): # This differs from NumPy arrays. w = 10 max_x = w - 1 h = 20 max_y = h - 1 for bpp in [1, 2, 3, 4]: sf = pygame.Surface((w, h), 0, bpp * 8) ar = pygame.PixelArray(sf) for i in range(w * h): ar[i % w, i // w] = i ar[:, :] = ar[::-1, :] for i in range(w * h): self.assertEqual(ar[max_x - i % w, i // w], i) ar = pygame.PixelArray(sf) for i in range(w * h): ar[i % w, i // w] = i ar[:, :] = ar[:, ::-1] for i in range(w * h): self.assertEqual(ar[i % w, max_y - i // w], i) ar = pygame.PixelArray(sf) for i in range(w * h): ar[i % w, i // w] = i ar[:, :] = ar[::-1, ::-1] for i in range(w * h): self.assertEqual(ar[max_x - i % w, max_y - i // w], i) def test_color_value(self): # Confirm that a PixelArray slice assignment distinguishes between # pygame.Color and tuple objects as single (r, g, b[, a]) colors # and other sequences as sequences of colors to be treated as # slices. sf = pygame.Surface((5, 5), 0, 32) ar = pygame.PixelArray(sf) index = slice(None, None, 1) ar.__setitem__(index, (1, 2, 3)) self.assertEqual(ar[0, 0], sf.map_rgb((1, 2, 3))) ar.__setitem__(index, pygame.Color(10, 11, 12)) self.assertEqual(ar[0, 0], sf.map_rgb((10, 11, 12))) self.assertRaises(ValueError, ar.__setitem__, index, (1, 2, 3, 4, 5)) self.assertRaises(ValueError, ar.__setitem__, (index, index), (1, 2, 3, 4, 5)) self.assertRaises(ValueError, ar.__setitem__, index, [1, 2, 3]) self.assertRaises(ValueError, ar.__setitem__, (index, index), [1, 2, 3]) sf = pygame.Surface((3, 3), 0, 32) ar = pygame.PixelArray(sf) ar[:] = (20, 30, 40) self.assertEqual(ar[0, 0], sf.map_rgb((20, 30, 40))) ar[:] = [20, 30, 40] self.assertEqual(ar[0, 0], 20) self.assertEqual(ar[1, 0], 30) self.assertEqual(ar[2, 0], 40) def test_transpose(self): # PixelArray.transpose(): swap axis on a 2D array, add a length # 1 x axis to a 1D array. sf = pygame.Surface((3, 7), 0, 32) ar = pygame.PixelArray(sf) w, h = ar.shape dx, dy = ar.strides for i in range(w * h): x = i % w y = i // w ar[x, y] = i ar_t = ar.transpose() self.assertEqual(ar_t.shape, (h, w)) self.assertEqual(ar_t.strides, (dy, dx)) for i in range(w * h): x = i % w y = i // w self.assertEqual(ar_t[y, x], ar[x, y]) ar1D = ar[0] ar2D = ar1D.transpose() self.assertEqual(ar2D.shape, (1, h)) for y in range(h): self.assertEqual(ar1D[y], ar2D[0, y]) ar1D = ar[:, 0] ar2D = ar1D.transpose() self.assertEqual(ar2D.shape, (1, w)) for x in range(2): self.assertEqual(ar1D[x], ar2D[0, x]) def test_length_1_dimension_broadcast(self): w = 5 sf = pygame.Surface((w, w), 0, 32) ar = pygame.PixelArray(sf) # y-axis broadcast. sf_x = pygame.Surface((w, 1), 0, 32) ar_x = pygame.PixelArray(sf_x) for i in range(w): ar_x[i, 0] = (w + 1) * 10 ar[...] = ar_x for y in range(w): for x in range(w): self.assertEqual(ar[x, y], ar_x[x, 0]) # x-axis broadcast. ar[...] = 0 sf_y = pygame.Surface((1, w), 0, 32) ar_y = pygame.PixelArray(sf_y) for i in range(w): ar_y[0, i] = (w + 1) * 10 ar[...] = ar_y for x in range(w): for y in range(w): self.assertEqual(ar[x, y], ar_y[0, y]) # (1, 1) array broadcast. ar[...] = 0 sf_1px = pygame.Surface((1, 1), 0, 32) ar_1px = pygame.PixelArray(sf_1px) ar_1px[0, 0] = 42 # Well it had to show up somewhere. ar[...] = ar_1px for y in range(w): for x in range(w): self.assertEqual(ar[x, y], 42) def test_assign_size_mismatch(self): sf = pygame.Surface((7, 11), 0, 32) ar = pygame.PixelArray(sf) self.assertRaises(ValueError, ar.__setitem__, Ellipsis, ar[:, 0:2]) self.assertRaises(ValueError, ar.__setitem__, Ellipsis, ar[0:2, :]) def test_repr(self): # Python 3.x bug: the tp_repr slot function returned NULL instead # of a Unicode string, triggering an exception. sf = pygame.Surface((3, 1), pygame.SRCALPHA, 16) ar = pygame.PixelArray(sf) ar[...] = 42 pixel = sf.get_at_mapped((0, 0)) self.assertEqual(repr(ar), type(ar).__name__ + "([\n [42, 42, 42]]\n)") @unittest.skipIf(IS_PYPY, "pypy having issues") class PixelArrayArrayInterfaceTest(unittest.TestCase, TestMixin): @unittest.skipIf(IS_PYPY, "skipping for PyPy (why?)") def test_basic(self): # Check unchanging fields. sf = pygame.Surface((2, 2), 0, 32) ar = pygame.PixelArray(sf) ai = arrinter.ArrayInterface(ar) self.assertEqual(ai.two, 2) self.assertEqual(ai.typekind, "u") self.assertEqual(ai.nd, 2) self.assertEqual(ai.data, ar._pixels_address) @unittest.skipIf(IS_PYPY, "skipping for PyPy (why?)") def test_shape(self): for shape in [[4, 16], [5, 13]]: w, h = shape sf = pygame.Surface(shape, 0, 32) ar = pygame.PixelArray(sf) ai = arrinter.ArrayInterface(ar) ai_shape = [ai.shape[i] for i in range(ai.nd)] self.assertEqual(ai_shape, shape) ar2 = ar[::2, :] ai2 = arrinter.ArrayInterface(ar2) w2 = len(([0] * w)[::2]) ai_shape = [ai2.shape[i] for i in range(ai2.nd)] self.assertEqual(ai_shape, [w2, h]) ar2 = ar[:, ::2] ai2 = arrinter.ArrayInterface(ar2) h2 = len(([0] * h)[::2]) ai_shape = [ai2.shape[i] for i in range(ai2.nd)] self.assertEqual(ai_shape, [w, h2]) @unittest.skipIf(IS_PYPY, "skipping for PyPy (why?)") def test_itemsize(self): for bytes_per_pixel in range(1, 5): bits_per_pixel = 8 * bytes_per_pixel sf = pygame.Surface((2, 2), 0, bits_per_pixel) ar = pygame.PixelArray(sf) ai = arrinter.ArrayInterface(ar) self.assertEqual(ai.itemsize, bytes_per_pixel) @unittest.skipIf(IS_PYPY, "skipping for PyPy (why?)") def test_flags(self): aim = arrinter common_flags = aim.PAI_NOTSWAPPED | aim.PAI_WRITEABLE | aim.PAI_ALIGNED s = pygame.Surface((10, 2), 0, 32) ar = pygame.PixelArray(s) ai = aim.ArrayInterface(ar) self.assertEqual(ai.flags, common_flags | aim.PAI_FORTRAN) ar2 = ar[::2, :] ai = aim.ArrayInterface(ar2) self.assertEqual(ai.flags, common_flags) s = pygame.Surface((8, 2), 0, 24) ar = pygame.PixelArray(s) ai = aim.ArrayInterface(ar) self.assertEqual(ai.flags, common_flags | aim.PAI_FORTRAN) s = pygame.Surface((7, 2), 0, 24) ar = pygame.PixelArray(s) ai = aim.ArrayInterface(ar) self.assertEqual(ai.flags, common_flags) def test_slicing(self): # This will implicitly test data and strides fields. # # Need an 8 bit test surfaces because pixelcopy.make_surface # returns an 8 bit surface for a 2d array. factors = [7, 3, 11] w = reduce(operator.mul, factors, 1) h = 13 sf = pygame.Surface((w, h), 0, 8) color = sf.map_rgb((1, 17, 128)) ar = pygame.PixelArray(sf) for f in factors[:-1]: w = w // f sf.fill((0, 0, 0)) ar = ar[f : f + w, :] ar[0][0] = color ar[-1][-2] = color ar[0][-3] = color sf2 = ar.make_surface() sf3 = pygame.pixelcopy.make_surface(ar) self.assert_surfaces_equal(sf3, sf2) h = reduce(operator.mul, factors, 1) w = 13 sf = pygame.Surface((w, h), 0, 8) color = sf.map_rgb((1, 17, 128)) ar = pygame.PixelArray(sf) for f in factors[:-1]: h = h // f sf.fill((0, 0, 0)) ar = ar[:, f : f + h] ar[0][0] = color ar[-1][-2] = color ar[0][-3] = color sf2 = ar.make_surface() sf3 = pygame.pixelcopy.make_surface(ar) self.assert_surfaces_equal(sf3, sf2) w = 20 h = 10 sf = pygame.Surface((w, h), 0, 8) color = sf.map_rgb((1, 17, 128)) ar = pygame.PixelArray(sf) for slices in [ (slice(w), slice(h)), (slice(0, w, 2), slice(h)), (slice(0, w, 3), slice(h)), (slice(w), slice(0, h, 2)), (slice(w), slice(0, h, 3)), (slice(0, w, 2), slice(0, h, 2)), (slice(0, w, 3), slice(0, h, 3)), ]: sf.fill((0, 0, 0)) ar2 = ar[slices] ar2[0][0] = color ar2[-1][-2] = color ar2[0][-3] = color sf2 = ar2.make_surface() sf3 = pygame.pixelcopy.make_surface(ar2) self.assert_surfaces_equal(sf3, sf2) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") @unittest.skipIf(IS_PYPY, "pypy having issues") class PixelArrayNewBufferTest(unittest.TestCase, TestMixin): if pygame.HAVE_NEWBUF: from pygame.tests.test_utils import buftools bitsize_to_format = {8: "B", 16: "=H", 24: "3x", 32: "=I"} def test_newbuf_2D(self): buftools = self.buftools Importer = buftools.Importer for bit_size in [8, 16, 24, 32]: s = pygame.Surface((10, 2), 0, bit_size) ar = pygame.PixelArray(s) format = self.bitsize_to_format[bit_size] itemsize = ar.itemsize shape = ar.shape w, h = shape strides = ar.strides length = w * h * itemsize imp = Importer(ar, buftools.PyBUF_FULL) self.assertTrue(imp.obj, ar) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 2) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.format, format) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertEqual(imp.buf, s._pixels_address) s = pygame.Surface((8, 16), 0, 32) ar = pygame.PixelArray(s) format = self.bitsize_to_format[s.get_bitsize()] itemsize = ar.itemsize shape = ar.shape w, h = shape strides = ar.strides length = w * h * itemsize imp = Importer(ar, buftools.PyBUF_SIMPLE) self.assertTrue(imp.obj, ar) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertEqual(imp.buf, s._pixels_address) imp = Importer(ar, buftools.PyBUF_FORMAT) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.format, format) imp = Importer(ar, buftools.PyBUF_WRITABLE) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.format is None) imp = Importer(ar, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(imp.ndim, 2) self.assertTrue(imp.format is None) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) imp = Importer(ar, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(imp.ndim, 2) self.assertTrue(imp.format is None) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_ND) ar_sliced = ar[:, ::2] format = self.bitsize_to_format[s.get_bitsize()] itemsize = ar_sliced.itemsize shape = ar_sliced.shape w, h = shape strides = ar_sliced.strides length = w * h * itemsize imp = Importer(ar_sliced, buftools.PyBUF_STRIDED) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 2) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertEqual(imp.buf, s._pixels_address) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises( BufferError, Importer, ar_sliced, buftools.PyBUF_ANY_CONTIGUOUS ) ar_sliced = ar[::2, :] format = self.bitsize_to_format[s.get_bitsize()] itemsize = ar_sliced.itemsize shape = ar_sliced.shape w, h = shape strides = ar_sliced.strides length = w * h * itemsize imp = Importer(ar_sliced, buftools.PyBUF_STRIDED) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 2) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertEqual(imp.buf, s._pixels_address) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar_sliced, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises( BufferError, Importer, ar_sliced, buftools.PyBUF_ANY_CONTIGUOUS ) s2 = s.subsurface((2, 3, 5, 7)) ar = pygame.PixelArray(s2) format = self.bitsize_to_format[s.get_bitsize()] itemsize = ar.itemsize shape = ar.shape w, h = shape strides = ar.strides length = w * h * itemsize imp = Importer(ar, buftools.PyBUF_STRIDES) self.assertTrue(imp.obj, ar) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 2) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertEqual(imp.buf, s2._pixels_address) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_FORMAT) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_ANY_CONTIGUOUS) def test_newbuf_1D(self): buftools = self.buftools Importer = buftools.Importer s = pygame.Surface((2, 16), 0, 32) ar_2D = pygame.PixelArray(s) x = 0 ar = ar_2D[x] format = self.bitsize_to_format[s.get_bitsize()] itemsize = ar.itemsize shape = ar.shape h = shape[0] strides = ar.strides length = h * itemsize buf = s._pixels_address + x * itemsize imp = Importer(ar, buftools.PyBUF_STRIDES) self.assertTrue(imp.obj, ar) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertEqual(imp.buf, buf) imp = Importer(ar, buftools.PyBUF_FULL) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.format, format) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_FORMAT) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, ar, buftools.PyBUF_ANY_CONTIGUOUS) y = 10 ar = ar_2D[:, y] shape = ar.shape w = shape[0] strides = ar.strides length = w * itemsize buf = s._pixels_address + y * s.get_pitch() imp = Importer(ar, buftools.PyBUF_FULL) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.format, format) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertEqual(imp.buf, buf) self.assertTrue(imp.suboffsets is None) imp = Importer(ar, buftools.PyBUF_SIMPLE) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) imp = Importer(ar, buftools.PyBUF_ND) self.assertEqual(imp.len, length) self.assertEqual(imp.ndim, 1) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.format is None) self.assertFalse(imp.readonly) self.assertEqual(imp.shape, shape) self.assertTrue(imp.strides is None) imp = Importer(ar, buftools.PyBUF_C_CONTIGUOUS) self.assertEqual(imp.ndim, 1) imp = Importer(ar, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(imp.ndim, 1) imp = Importer(ar, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(imp.ndim, 1) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0271118 pygame-2.6.1/test/pixelcopy_test.py0000644000175100001770000006170714676242340017036 0ustar00runnerdockerimport platform import unittest try: from pygame.tests.test_utils import arrinter except NameError: pass import pygame from pygame.locals import * from pygame.pixelcopy import surface_to_array, map_array, array_to_surface, make_surface IS_PYPY = "PyPy" == platform.python_implementation() def unsigned32(i): """cast signed 32 bit integer to an unsigned integer""" return i & 0xFFFFFFFF @unittest.skipIf(IS_PYPY, "pypy having illegal instruction on mac") class PixelcopyModuleTest(unittest.TestCase): bitsizes = [8, 16, 32] test_palette = [ (0, 0, 0, 255), (10, 30, 60, 255), (25, 75, 100, 255), (100, 150, 200, 255), (0, 100, 200, 255), ] surf_size = (10, 12) test_points = [ ((0, 0), 1), ((4, 5), 1), ((9, 0), 2), ((5, 5), 2), ((0, 11), 3), ((4, 6), 3), ((9, 11), 4), ((5, 6), 4), ] def __init__(self, *args, **kwds): pygame.display.init() try: unittest.TestCase.__init__(self, *args, **kwds) self.sources = [ self._make_src_surface(8), self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] finally: pygame.display.quit() def _make_surface(self, bitsize, srcalpha=False, palette=None): if palette is None: palette = self.test_palette flags = 0 if srcalpha: flags |= SRCALPHA surf = pygame.Surface(self.surf_size, flags, bitsize) if bitsize == 8: surf.set_palette([c[:3] for c in palette]) return surf def _fill_surface(self, surf, palette=None): if palette is None: palette = self.test_palette surf.fill(palette[1], (0, 0, 5, 6)) surf.fill(palette[2], (5, 0, 5, 6)) surf.fill(palette[3], (0, 6, 5, 6)) surf.fill(palette[4], (5, 6, 5, 6)) def _make_src_surface(self, bitsize, srcalpha=False, palette=None): surf = self._make_surface(bitsize, srcalpha, palette) self._fill_surface(surf, palette) return surf def setUp(self): pygame.display.init() def tearDown(self): pygame.display.quit() def test_surface_to_array_2d(self): alpha_color = (0, 0, 0, 128) for surf in self.sources: src_bitsize = surf.get_bitsize() for dst_bitsize in self.bitsizes: # dst in a surface standing in for a 2 dimensional array # of unsigned integers. The byte order is system dependent. dst = pygame.Surface(surf.get_size(), 0, dst_bitsize) dst.fill((0, 0, 0, 0)) view = dst.get_view("2") self.assertFalse(surf.get_locked()) if dst_bitsize < src_bitsize: self.assertRaises(ValueError, surface_to_array, view, surf) self.assertFalse(surf.get_locked()) continue surface_to_array(view, surf) self.assertFalse(surf.get_locked()) for posn, i in self.test_points: sp = surf.get_at_mapped(posn) dp = dst.get_at_mapped(posn) self.assertEqual( dp, sp, "%s != %s: flags: %i" ", bpp: %i, posn: %s" % (dp, sp, surf.get_flags(), surf.get_bitsize(), posn), ) del view if surf.get_masks()[3]: dst.fill((0, 0, 0, 0)) view = dst.get_view("2") posn = (2, 1) surf.set_at(posn, alpha_color) self.assertFalse(surf.get_locked()) surface_to_array(view, surf) self.assertFalse(surf.get_locked()) sp = surf.get_at_mapped(posn) dp = dst.get_at_mapped(posn) self.assertEqual( dp, sp, "%s != %s: bpp: %i" % (dp, sp, surf.get_bitsize()) ) if IS_PYPY: return # Swapped endian destination array pai_flags = arrinter.PAI_ALIGNED | arrinter.PAI_WRITEABLE for surf in self.sources: for itemsize in [1, 2, 4, 8]: if itemsize < surf.get_bytesize(): continue a = arrinter.Array(surf.get_size(), "u", itemsize, flags=pai_flags) surface_to_array(a, surf) for posn, i in self.test_points: sp = unsigned32(surf.get_at_mapped(posn)) dp = a[posn] self.assertEqual( dp, sp, "%s != %s: itemsize: %i, flags: %i" ", bpp: %i, posn: %s" % ( dp, sp, itemsize, surf.get_flags(), surf.get_bitsize(), posn, ), ) def test_surface_to_array_3d(self): self.iter_surface_to_array_3d((0xFF, 0xFF00, 0xFF0000, 0)) self.iter_surface_to_array_3d((0xFF0000, 0xFF00, 0xFF, 0)) def iter_surface_to_array_3d(self, rgba_masks): dst = pygame.Surface(self.surf_size, 0, 24, masks=rgba_masks) for surf in self.sources: dst.fill((0, 0, 0, 0)) src_bitsize = surf.get_bitsize() view = dst.get_view("3") self.assertFalse(surf.get_locked()) surface_to_array(view, surf) self.assertFalse(surf.get_locked()) for posn, i in self.test_points: sc = surf.get_at(posn)[0:3] dc = dst.get_at(posn)[0:3] self.assertEqual( dc, sc, "%s != %s: flags: %i" ", bpp: %i, posn: %s" % (dc, sc, surf.get_flags(), surf.get_bitsize(), posn), ) view = None def test_map_array(self): targets = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] source = pygame.Surface( self.surf_size, 0, 24, masks=[0xFF, 0xFF00, 0xFF0000, 0] ) self._fill_surface(source) source_view = source.get_view("3") # (w, h, 3) for t in targets: map_array(t.get_view("2"), source_view, t) for posn, i in self.test_points: sc = t.map_rgb(source.get_at(posn)) dc = t.get_at_mapped(posn) self.assertEqual( dc, sc, "%s != %s: flags: %i" ", bpp: %i, posn: %s" % (dc, sc, t.get_flags(), t.get_bitsize(), posn), ) color = pygame.Color("salmon") color.set_length(3) for t in targets: map_array(t.get_view("2"), color, t) sc = t.map_rgb(color) for posn, i in self.test_points: dc = t.get_at_mapped(posn) self.assertEqual( dc, sc, "%s != %s: flags: %i" ", bpp: %i, posn: %s" % (dc, sc, t.get_flags(), t.get_bitsize(), posn), ) # mismatched shapes w, h = source.get_size() target = pygame.Surface((w, h + 1), 0, 32) self.assertRaises(ValueError, map_array, target, source, target) target = pygame.Surface((w - 1, h), 0, 32) self.assertRaises(ValueError, map_array, target, source, target) def test_array_to_surface_broadcasting(self): # target surfaces targets = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] w, h = self.surf_size # broadcast column column = pygame.Surface((1, h), 0, 32) for target in targets: source = pygame.Surface((1, h), 0, target) for y in range(h): source.set_at((0, y), pygame.Color(y + 1, y + h + 1, y + 2 * h + 1)) pygame.pixelcopy.surface_to_array(column.get_view("2"), source) pygame.pixelcopy.array_to_surface(target, column.get_view("2")) for x in range(w): for y in range(h): self.assertEqual( target.get_at_mapped((x, y)), column.get_at_mapped((0, y)) ) # broadcast row row = pygame.Surface((w, 1), 0, 32) for target in targets: source = pygame.Surface((w, 1), 0, target) for x in range(w): source.set_at((x, 0), pygame.Color(x + 1, x + w + 1, x + 2 * w + 1)) pygame.pixelcopy.surface_to_array(row.get_view("2"), source) pygame.pixelcopy.array_to_surface(target, row.get_view("2")) for x in range(w): for y in range(h): self.assertEqual( target.get_at_mapped((x, y)), row.get_at_mapped((x, 0)) ) # broadcast pixel pixel = pygame.Surface((1, 1), 0, 32) for target in targets: source = pygame.Surface((1, 1), 0, target) source.set_at((0, 0), pygame.Color(13, 47, 101)) pygame.pixelcopy.surface_to_array(pixel.get_view("2"), source) pygame.pixelcopy.array_to_surface(target, pixel.get_view("2")) p = pixel.get_at_mapped((0, 0)) for x in range(w): for y in range(h): self.assertEqual(target.get_at_mapped((x, y)), p) @unittest.skipIf(IS_PYPY, "pypy having illegal instruction on mac") class PixelCopyTestWithArrayNumpy(unittest.TestCase): try: import numpy except ImportError: __tags__ = ["ignore", "subprocess_ignore"] else: pygame.surfarray.use_arraytype("numpy") bitsizes = [8, 16, 32] test_palette = [ (0, 0, 0, 255), (10, 30, 60, 255), (25, 75, 100, 255), (100, 150, 200, 255), (0, 100, 200, 255), ] surf_size = (10, 12) test_points = [ ((0, 0), 1), ((4, 5), 1), ((9, 0), 2), ((5, 5), 2), ((0, 11), 3), ((4, 6), 3), ((9, 11), 4), ((5, 6), 4), ] pixels2d = {8, 16, 32} pixels3d = {24, 32} array2d = {8, 16, 24, 32} array3d = {24, 32} def __init__(self, *args, **kwds): import numpy self.dst_types = [numpy.uint8, numpy.uint16, numpy.uint32] try: self.dst_types.append(numpy.uint64) except AttributeError: pass pygame.display.init() try: unittest.TestCase.__init__(self, *args, **kwds) self.sources = [ self._make_src_surface(8), self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] finally: pygame.display.quit() def _make_surface(self, bitsize, srcalpha=False, palette=None): if palette is None: palette = self.test_palette flags = 0 if srcalpha: flags |= SRCALPHA surf = pygame.Surface(self.surf_size, flags, bitsize) if bitsize == 8: surf.set_palette([c[:3] for c in palette]) return surf def _fill_surface(self, surf, palette=None): if palette is None: palette = self.test_palette surf.fill(palette[1], (0, 0, 5, 6)) surf.fill(palette[2], (5, 0, 5, 6)) surf.fill(palette[3], (0, 6, 5, 6)) surf.fill(palette[4], (5, 6, 5, 6)) def _make_src_surface(self, bitsize, srcalpha=False, palette=None): surf = self._make_surface(bitsize, srcalpha, palette) self._fill_surface(surf, palette) return surf def setUp(self): pygame.display.init() def tearDown(self): pygame.display.quit() def test_surface_to_array_2d(self): try: from numpy import empty, dtype except ImportError: return palette = self.test_palette alpha_color = (0, 0, 0, 128) dst_dims = self.surf_size destinations = [empty(dst_dims, t) for t in self.dst_types] if pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN: swapped_dst = empty(dst_dims, dtype(">u4")) else: swapped_dst = empty(dst_dims, dtype("u4")) else: swapped_dst = empty(dst_dims, dtype("i", "!i", "1i", "=1i", "@q", "q", "4x", "8x", ]: surface.fill((255, 254, 253)) exp = Exporter(shape, format=format) exp._buf[:] = [42] * exp.buflen array_to_surface(surface, exp) for x in range(w): for y in range(h): self.assertEqual(surface.get_at((x, y)), (42, 42, 42, 255)) # Some unsupported formats for array_to_surface and a 32 bit surface for format in ["f", "d", "?", "x", "1x", "2x", "3x", "5x", "6x", "7x", "9x"]: exp = Exporter(shape, format=format) self.assertRaises(ValueError, array_to_surface, surface, exp) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/rect_test.py0000644000175100001770000034566714676242340015771 0ustar00runnerdockerimport math import unittest from collections.abc import Collection, Sequence import platform import random from pygame import Rect, Vector2 from pygame.tests import test_utils IS_PYPY = "PyPy" == platform.python_implementation() # todo can they be different on different platforms? _int_min = -2147483647 - 1 # min value of int in C _int_max = 2147483647 # max value of int in C def _random_int(): return random.randint(_int_min, _int_max) class RectTypeTest(unittest.TestCase): def _assertCountEqual(self, *args, **kwargs): self.assertCountEqual(*args, **kwargs) def testConstructionXYWidthHeight(self): r = Rect(1, 2, 3, 4) self.assertEqual(1, r.left) self.assertEqual(2, r.top) self.assertEqual(3, r.width) self.assertEqual(4, r.height) def testConstructionTopLeftSize(self): r = Rect((1, 2), (3, 4)) self.assertEqual(1, r.left) self.assertEqual(2, r.top) self.assertEqual(3, r.width) self.assertEqual(4, r.height) def testCalculatedAttributes(self): r = Rect(1, 2, 3, 4) self.assertEqual(r.left + r.width, r.right) self.assertEqual(r.top + r.height, r.bottom) self.assertEqual((r.width, r.height), r.size) self.assertEqual((r.left, r.top), r.topleft) self.assertEqual((r.right, r.top), r.topright) self.assertEqual((r.left, r.bottom), r.bottomleft) self.assertEqual((r.right, r.bottom), r.bottomright) midx = r.left + r.width // 2 midy = r.top + r.height // 2 self.assertEqual(midx, r.centerx) self.assertEqual(midy, r.centery) self.assertEqual((r.centerx, r.centery), r.center) self.assertEqual((r.centerx, r.top), r.midtop) self.assertEqual((r.centerx, r.bottom), r.midbottom) self.assertEqual((r.left, r.centery), r.midleft) self.assertEqual((r.right, r.centery), r.midright) def test_rect_iter(self): rect = Rect(50, 100, 150, 200) # call __iter__ explicitly to test that it is defined rect_iterator = rect.__iter__() for i, val in enumerate(rect_iterator): self.assertEqual(rect[i], val) def test_normalize(self): """Ensures normalize works when width and height are both negative.""" test_rect = Rect((1, 2), (-3, -6)) expected_normalized_rect = ( (test_rect.x + test_rect.w, test_rect.y + test_rect.h), (-test_rect.w, -test_rect.h), ) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_normalize__positive_height(self): """Ensures normalize works with a negative width and a positive height.""" test_rect = Rect((1, 2), (-3, 6)) expected_normalized_rect = ( (test_rect.x + test_rect.w, test_rect.y), (-test_rect.w, test_rect.h), ) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_normalize__positive_width(self): """Ensures normalize works with a positive width and a negative height.""" test_rect = Rect((1, 2), (3, -6)) expected_normalized_rect = ( (test_rect.x, test_rect.y + test_rect.h), (test_rect.w, -test_rect.h), ) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_normalize__zero_height(self): """Ensures normalize works with a negative width and a zero height.""" test_rect = Rect((1, 2), (-3, 0)) expected_normalized_rect = ( (test_rect.x + test_rect.w, test_rect.y), (-test_rect.w, test_rect.h), ) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_normalize__zero_width(self): """Ensures normalize works with a zero width and a negative height.""" test_rect = Rect((1, 2), (0, -6)) expected_normalized_rect = ( (test_rect.x, test_rect.y + test_rect.h), (test_rect.w, -test_rect.h), ) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_normalize__non_negative(self): """Ensures normalize works when width and height are both non-negative. Tests combinations of positive and zero values for width and height. The normalize method has no impact when both width and height are non-negative. """ for size in ((3, 6), (3, 0), (0, 6), (0, 0)): test_rect = Rect((1, 2), size) expected_normalized_rect = Rect(test_rect) test_rect.normalize() self.assertEqual(test_rect, expected_normalized_rect) def test_x(self): """Ensures changing the x attribute moves the rect and does not change the rect's size. """ expected_x = 10 expected_y = 2 expected_size = (3, 4) r = Rect((1, expected_y), expected_size) r.x = expected_x self.assertEqual(r.x, expected_x) self.assertEqual(r.x, r.left) self.assertEqual(r.y, expected_y) self.assertEqual(r.size, expected_size) def test_x__invalid_value(self): """Ensures the x attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.x = value def test_x__del(self): """Ensures the x attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.x def test_y(self): """Ensures changing the y attribute moves the rect and does not change the rect's size. """ expected_x = 1 expected_y = 20 expected_size = (3, 4) r = Rect((expected_x, 2), expected_size) r.y = expected_y self.assertEqual(r.y, expected_y) self.assertEqual(r.y, r.top) self.assertEqual(r.x, expected_x) self.assertEqual(r.size, expected_size) def test_y__invalid_value(self): """Ensures the y attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.y = value def test_y__del(self): """Ensures the y attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.y def test_left(self): """Changing the left attribute moves the rect and does not change the rect's width """ r = Rect(1, 2, 3, 4) new_left = 10 r.left = new_left self.assertEqual(new_left, r.left) self.assertEqual(Rect(new_left, 2, 3, 4), r) def test_left__invalid_value(self): """Ensures the left attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.left = value def test_left__del(self): """Ensures the left attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.left def test_right(self): """Changing the right attribute moves the rect and does not change the rect's width """ r = Rect(1, 2, 3, 4) new_right = r.right + 20 expected_left = r.left + 20 old_width = r.width r.right = new_right self.assertEqual(new_right, r.right) self.assertEqual(expected_left, r.left) self.assertEqual(old_width, r.width) def test_right__invalid_value(self): """Ensures the right attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.right = value def test_right__del(self): """Ensures the right attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.right def test_top(self): """Changing the top attribute moves the rect and does not change the rect's width """ r = Rect(1, 2, 3, 4) new_top = 10 r.top = new_top self.assertEqual(Rect(1, new_top, 3, 4), r) self.assertEqual(new_top, r.top) def test_top__invalid_value(self): """Ensures the top attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.top = value def test_top__del(self): """Ensures the top attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.top def test_bottom(self): """Changing the bottom attribute moves the rect and does not change the rect's height """ r = Rect(1, 2, 3, 4) new_bottom = r.bottom + 20 expected_top = r.top + 20 old_height = r.height r.bottom = new_bottom self.assertEqual(new_bottom, r.bottom) self.assertEqual(expected_top, r.top) self.assertEqual(old_height, r.height) def test_bottom__invalid_value(self): """Ensures the bottom attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.bottom = value def test_bottom__del(self): """Ensures the bottom attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.bottom def test_centerx(self): """Changing the centerx attribute moves the rect and does not change the rect's width """ r = Rect(1, 2, 3, 4) new_centerx = r.centerx + 20 expected_left = r.left + 20 old_width = r.width r.centerx = new_centerx self.assertEqual(new_centerx, r.centerx) self.assertEqual(expected_left, r.left) self.assertEqual(old_width, r.width) def test_centerx__invalid_value(self): """Ensures the centerx attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.centerx = value def test_centerx__del(self): """Ensures the centerx attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.centerx def test_centery(self): """Changing the centery attribute moves the rect and does not change the rect's width """ r = Rect(1, 2, 3, 4) new_centery = r.centery + 20 expected_top = r.top + 20 old_height = r.height r.centery = new_centery self.assertEqual(new_centery, r.centery) self.assertEqual(expected_top, r.top) self.assertEqual(old_height, r.height) def test_centery__invalid_value(self): """Ensures the centery attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.centery = value def test_centery__del(self): """Ensures the centery attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.centery def test_topleft(self): """Changing the topleft attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_topleft = (r.left + 20, r.top + 30) old_size = r.size r.topleft = new_topleft self.assertEqual(new_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_topleft__invalid_value(self): """Ensures the topleft attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.topleft = value def test_topleft__del(self): """Ensures the topleft attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.topleft def test_bottomleft(self): """Changing the bottomleft attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_bottomleft = (r.left + 20, r.bottom + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.bottomleft = new_bottomleft self.assertEqual(new_bottomleft, r.bottomleft) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_bottomleft__invalid_value(self): """Ensures the bottomleft attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.bottomleft = value def test_bottomleft__del(self): """Ensures the bottomleft attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.bottomleft def test_topright(self): """Changing the topright attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_topright = (r.right + 20, r.top + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.topright = new_topright self.assertEqual(new_topright, r.topright) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_topright__invalid_value(self): """Ensures the topright attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.topright = value def test_topright__del(self): """Ensures the topright attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.topright def test_bottomright(self): """Changing the bottomright attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_bottomright = (r.right + 20, r.bottom + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.bottomright = new_bottomright self.assertEqual(new_bottomright, r.bottomright) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_bottomright__invalid_value(self): """Ensures the bottomright attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.bottomright = value def test_bottomright__del(self): """Ensures the bottomright attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.bottomright def test_center(self): """Changing the center attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_center = (r.centerx + 20, r.centery + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.center = new_center self.assertEqual(new_center, r.center) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_center__invalid_value(self): """Ensures the center attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.center = value def test_center__del(self): """Ensures the center attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.center def test_midleft(self): """Changing the midleft attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_midleft = (r.left + 20, r.centery + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.midleft = new_midleft self.assertEqual(new_midleft, r.midleft) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_midleft__invalid_value(self): """Ensures the midleft attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.midleft = value def test_midleft__del(self): """Ensures the midleft attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.midleft def test_midright(self): """Changing the midright attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_midright = (r.right + 20, r.centery + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.midright = new_midright self.assertEqual(new_midright, r.midright) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_midright__invalid_value(self): """Ensures the midright attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.midright = value def test_midright__del(self): """Ensures the midright attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.midright def test_midtop(self): """Changing the midtop attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_midtop = (r.centerx + 20, r.top + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.midtop = new_midtop self.assertEqual(new_midtop, r.midtop) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_midtop__invalid_value(self): """Ensures the midtop attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.midtop = value def test_midtop__del(self): """Ensures the midtop attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.midtop def test_midbottom(self): """Changing the midbottom attribute moves the rect and does not change the rect's size """ r = Rect(1, 2, 3, 4) new_midbottom = (r.centerx + 20, r.bottom + 30) expected_topleft = (r.left + 20, r.top + 30) old_size = r.size r.midbottom = new_midbottom self.assertEqual(new_midbottom, r.midbottom) self.assertEqual(expected_topleft, r.topleft) self.assertEqual(old_size, r.size) def test_midbottom__invalid_value(self): """Ensures the midbottom attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.midbottom = value def test_midbottom__del(self): """Ensures the midbottom attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.midbottom def test_width(self): """Changing the width resizes the rect from the top-left corner""" r = Rect(1, 2, 3, 4) new_width = 10 old_topleft = r.topleft old_height = r.height r.width = new_width self.assertEqual(new_width, r.width) self.assertEqual(old_height, r.height) self.assertEqual(old_topleft, r.topleft) def test_width__invalid_value(self): """Ensures the width attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.width = value def test_width__del(self): """Ensures the width attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.width def test_height(self): """Changing the height resizes the rect from the top-left corner""" r = Rect(1, 2, 3, 4) new_height = 10 old_topleft = r.topleft old_width = r.width r.height = new_height self.assertEqual(new_height, r.height) self.assertEqual(old_width, r.width) self.assertEqual(old_topleft, r.topleft) def test_height__invalid_value(self): """Ensures the height attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.height = value def test_height__del(self): """Ensures the height attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.height def test_size(self): """Changing the size resizes the rect from the top-left corner""" r = Rect(1, 2, 3, 4) new_size = (10, 20) old_topleft = r.topleft r.size = new_size self.assertEqual(new_size, r.size) self.assertEqual(old_topleft, r.topleft) def test_size__invalid_value(self): """Ensures the size attribute handles invalid values correctly.""" r = Rect(0, 0, 1, 1) for value in (None, [], "1", 1, (1,), [1, 2, 3]): with self.assertRaises(TypeError): r.size = value def test_size__del(self): """Ensures the size attribute can't be deleted.""" r = Rect(0, 0, 1, 1) with self.assertRaises(AttributeError): del r.size def test_contains(self): r = Rect(1, 2, 3, 4) self.assertTrue( r.contains(Rect(2, 3, 1, 1)), "r does not contain Rect(2, 3, 1, 1)" ) self.assertTrue(Rect(2, 3, 1, 1) in r, "r does not contain Rect(2, 3, 1, 1) 2") self.assertTrue( r.contains(Rect(r)), "r does not contain the same rect as itself" ) self.assertTrue(r in Rect(r), "r does not contain the same rect as itself") self.assertTrue( r.contains(Rect(2, 3, 0, 0)), "r does not contain an empty rect within its bounds", ) self.assertTrue( Rect(2, 3, 0, 0) in r, "r does not contain an empty rect within its bounds", ) self.assertFalse(r.contains(Rect(0, 0, 1, 2)), "r contains Rect(0, 0, 1, 2)") self.assertFalse(r.contains(Rect(4, 6, 1, 1)), "r contains Rect(4, 6, 1, 1)") self.assertFalse(r.contains(Rect(4, 6, 0, 0)), "r contains Rect(4, 6, 0, 0)") self.assertFalse(Rect(0, 0, 1, 2) in r, "r contains Rect(0, 0, 1, 2)") self.assertFalse(Rect(4, 6, 1, 1) in r, "r contains Rect(4, 6, 1, 1)") self.assertFalse(Rect(4, 6, 0, 0) in r, "r contains Rect(4, 6, 0, 0)") self.assertTrue(2 in Rect(0, 0, 1, 2), "r does not contain 2") self.assertFalse(3 in Rect(0, 0, 1, 2), "r contains 3") self.assertRaises(TypeError, lambda: "string" in Rect(0, 0, 1, 2)) self.assertRaises(TypeError, lambda: 4 + 3j in Rect(0, 0, 1, 2)) def test_collidepoint(self): r = Rect(1, 2, 3, 4) self.assertTrue( r.collidepoint(r.left, r.top), "r does not collide with point (left, top)" ) self.assertFalse( r.collidepoint(r.left - 1, r.top), "r collides with point (left - 1, top)" ) self.assertFalse( r.collidepoint(r.left, r.top - 1), "r collides with point (left, top - 1)" ) self.assertFalse( r.collidepoint(r.left - 1, r.top - 1), "r collides with point (left - 1, top - 1)", ) self.assertTrue( r.collidepoint(r.right - 1, r.bottom - 1), "r does not collide with point (right - 1, bottom - 1)", ) self.assertFalse( r.collidepoint(r.right, r.bottom), "r collides with point (right, bottom)" ) self.assertFalse( r.collidepoint(r.right - 1, r.bottom), "r collides with point (right - 1, bottom)", ) self.assertFalse( r.collidepoint(r.right, r.bottom - 1), "r collides with point (right, bottom - 1)", ) def test_inflate__larger(self): """The inflate method inflates around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = r.inflate(4, 6) self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 2, r2.left) self.assertEqual(r.top - 3, r2.top) self.assertEqual(r.right + 2, r2.right) self.assertEqual(r.bottom + 3, r2.bottom) self.assertEqual(r.width + 4, r2.width) self.assertEqual(r.height + 6, r2.height) def test_inflate__smaller(self): """The inflate method inflates around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = r.inflate(-4, -6) self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.top + 3, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.bottom - 3, r2.bottom) self.assertEqual(r.width - 4, r2.width) self.assertEqual(r.height - 6, r2.height) def test_inflate_ip__larger(self): """The inflate_ip method inflates around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = Rect(r) r2.inflate_ip(-4, -6) self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.top + 3, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.bottom - 3, r2.bottom) self.assertEqual(r.width - 4, r2.width) self.assertEqual(r.height - 6, r2.height) def test_inflate_ip__smaller(self): """The inflate method inflates around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = Rect(r) r2.inflate_ip(-4, -6) self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.top + 3, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.bottom - 3, r2.bottom) self.assertEqual(r.width - 4, r2.width) self.assertEqual(r.height - 6, r2.height) def test_scale_by__larger_single_argument(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = r.scale_by(2) self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.top - 4, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.bottom + 4, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 2, r2.height) def test_scale_by__larger_single_argument_kwarg(self): """The scale method scales around the center of the rectangle using keyword arguments 'x' and 'y'""" r = Rect(2, 4, 6, 8) r2 = r.scale_by(x=2) self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.top - 4, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.bottom + 4, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 2, r2.height) def test_scale_by__smaller_single_argument(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 8, 8) r2 = r.scale_by(0.5) self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.top + 2, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.bottom - 2, r2.bottom) self.assertEqual(r.width - 4, r2.width) self.assertEqual(r.height - 4, r2.height) def test_scale_by__larger(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 6, 8) # act r2 = r.scale_by(2, 4) # assert self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.centery - r.h * 4 / 2, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.centery + r.h * 4 / 2, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 4, r2.height) def test_scale_by__larger_kwargs_scale_by(self): """ The scale method scales around the center of the rectangle Uses 'scale_by' kwarg. """ # arrange r = Rect(2, 4, 6, 8) # act r2 = r.scale_by(scale_by=(2, 4)) # assert self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.centery - r.h * 4 / 2, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.centery + r.h * 4 / 2, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 4, r2.height) def test_scale_by__larger_kwargs(self): """ The scale method scales around the center of the rectangle Uses 'x' and 'y' kwargs. """ # arrange r = Rect(2, 4, 6, 8) # act r2 = r.scale_by(x=2, y=4) # assert self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.centery - r.h * 4 / 2, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.centery + r.h * 4 / 2, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 4, r2.height) def test_scale_by__smaller(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 8, 8) # act r2 = r.scale_by(0.5, 0.25) # assert self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.centery - r.h / 4 / 2, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.centery + r.h / 4 / 2, r2.bottom) self.assertEqual(r.width - 4, r2.width) self.assertEqual(r.height // 4, r2.height) def test_scale_by__subzero(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 6, 8) r.scale_by(0) r.scale_by(-1) r.scale_by(-0.000001) r.scale_by(0.00001) rx1 = r.scale_by(10, 1) self.assertEqual(r.centerx - r.w * 10 / 2, rx1.x) self.assertEqual(r.y, rx1.y) self.assertEqual(r.w * 10, rx1.w) self.assertEqual(r.h, rx1.h) rx2 = r.scale_by(-10, 1) self.assertEqual(rx1.x, rx2.x) self.assertEqual(rx1.y, rx2.y) self.assertEqual(rx1.w, rx2.w) self.assertEqual(rx1.h, rx2.h) ry1 = r.scale_by(1, 10) self.assertEqual(r.x, ry1.x) self.assertEqual(r.centery - r.h * 10 / 2, ry1.y) self.assertEqual(r.w, ry1.w) self.assertEqual(r.h * 10, ry1.h) ry2 = r.scale_by(1, -10) self.assertEqual(ry1.x, ry2.x) self.assertEqual(ry1.y, ry2.y) self.assertEqual(ry1.w, ry2.w) self.assertEqual(ry1.h, ry2.h) r1 = r.scale_by(10) self.assertEqual(r.centerx - r.w * 10 / 2, r1.x) self.assertEqual(r.centery - r.h * 10 / 2, r1.y) self.assertEqual(r.w * 10, r1.w) self.assertEqual(r.h * 10, r1.h) def test_scale_by_identity(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 6, 8) # act actual = r.scale_by(1, 1) # assert self.assertEqual(r.x, actual.x) self.assertEqual(r.y, actual.y) self.assertEqual(r.w, actual.w) self.assertEqual(r.h, actual.h) def test_scale_by_negative_identity(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 6, 8) # act actual = r.scale_by(-1, -1) # assert self.assertEqual(r.x, actual.x) self.assertEqual(r.y, actual.y) self.assertEqual(r.w, actual.w) self.assertEqual(r.h, actual.h) def test_scale_by_identity_single_argument(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 6, 8) # act actual = r.scale_by(1) # assert self.assertEqual(r.x, actual.x) self.assertEqual(r.y, actual.y) self.assertEqual(r.w, actual.w) self.assertEqual(r.h, actual.h) def test_scale_by_negative_identity_single_argment(self): """The scale method scales around the center of the rectangle""" # arrange r = Rect(2, 4, 6, 8) # act actual = r.scale_by(-1) # assert self.assertEqual(r.x, actual.x) self.assertEqual(r.y, actual.y) self.assertEqual(r.w, actual.w) self.assertEqual(r.h, actual.h) def test_scale_by_ip__larger(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = Rect(r) r2.scale_by_ip(2) self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.top - 4, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.bottom + 4, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 2, r2.height) def test_scale_by_ip__smaller(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 8, 8) r2 = Rect(r) r2.scale_by_ip(0.5) self.assertEqual(r.center, r2.center) self.assertEqual(r.left + 2, r2.left) self.assertEqual(r.top + 2, r2.top) self.assertEqual(r.right - 2, r2.right) self.assertEqual(r.bottom - 2, r2.bottom) self.assertEqual(r.width / 2, r2.width) self.assertEqual(r.height / 2, r2.height) def test_scale_by_ip__subzero(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 6, 8) r.scale_by_ip(0) r.scale_by_ip(-1) r.scale_by_ip(-0.000001) r.scale_by_ip(0.00001) def test_scale_by_ip__kwargs(self): """The scale method scales around the center of the rectangle""" r = Rect(2, 4, 6, 8) r2 = Rect(r) r2.scale_by_ip(x=2, y=4) # assert self.assertEqual(r.center, r2.center) self.assertEqual(r.left - 3, r2.left) self.assertEqual(r.centery - r.h * 4 / 2, r2.top) self.assertEqual(r.right + 3, r2.right) self.assertEqual(r.centery + r.h * 4 / 2, r2.bottom) self.assertEqual(r.width * 2, r2.width) self.assertEqual(r.height * 4, r2.height) def test_scale_by_ip__kwarg_exceptions(self): """The scale method scales around the center of the rectangle using keyword argument 'scale_by'. Tests for incorrect keyword args""" r = Rect(2, 4, 6, 8) with self.assertRaises(TypeError): r.scale_by_ip(scale_by=2) with self.assertRaises(TypeError): r.scale_by_ip(scale_by=(1, 2), y=1) def test_clamp(self): r = Rect(10, 10, 10, 10) c = Rect(19, 12, 5, 5).clamp(r) self.assertEqual(c.right, r.right) self.assertEqual(c.top, 12) c = Rect(1, 2, 3, 4).clamp(r) self.assertEqual(c.topleft, r.topleft) c = Rect(5, 500, 22, 33).clamp(r) self.assertEqual(c.center, r.center) def test_clamp_ip(self): r = Rect(10, 10, 10, 10) c = Rect(19, 12, 5, 5) c.clamp_ip(r) self.assertEqual(c.right, r.right) self.assertEqual(c.top, 12) c = Rect(1, 2, 3, 4) c.clamp_ip(r) self.assertEqual(c.topleft, r.topleft) c = Rect(5, 500, 22, 33) c.clamp_ip(r) self.assertEqual(c.center, r.center) def test_clip(self): r1 = Rect(1, 2, 3, 4) self.assertEqual(Rect(1, 2, 2, 2), r1.clip(Rect(0, 0, 3, 4))) self.assertEqual(Rect(2, 2, 2, 4), r1.clip(Rect(2, 2, 10, 20))) self.assertEqual(Rect(2, 3, 1, 2), r1.clip(Rect(2, 3, 1, 2))) self.assertEqual((0, 0), r1.clip(20, 30, 5, 6).size) self.assertEqual( r1, r1.clip(Rect(r1)), "r1 does not clip an identical rect to itself" ) def test_clipline(self): """Ensures clipline handles four int parameters. Tests the clipline(x1, y1, x2, y2) format. """ rect = Rect((1, 2), (35, 40)) x1 = 5 y1 = 6 x2 = 11 y2 = 19 expected_line = ((x1, y1), (x2, y2)) clipped_line = rect.clipline(x1, y1, x2, y2) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__two_sequences(self): """Ensures clipline handles a sequence of two sequences. Tests the clipline((x1, y1), (x2, y2)) format. Tests the sequences as different types. """ rect = Rect((1, 2), (35, 40)) pt1 = (5, 6) pt2 = (11, 19) INNER_SEQUENCES = (list, tuple, Vector2) expected_line = (pt1, pt2) for inner_seq1 in INNER_SEQUENCES: endpt1 = inner_seq1(pt1) for inner_seq2 in INNER_SEQUENCES: clipped_line = rect.clipline((endpt1, inner_seq2(pt2))) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__two_sequences_kwarg(self): """Ensures clipline handles a sequence of two sequences using kwargs. Tests the clipline((x1, y1), (x2, y2)) format. Tests the sequences as different types. """ rect = Rect((1, 2), (35, 40)) pt1 = (5, 6) pt2 = (11, 19) INNER_SEQUENCES = (list, tuple, Vector2) expected_line = (pt1, pt2) for inner_seq1 in INNER_SEQUENCES: endpt1 = inner_seq1(pt1) for inner_seq2 in INNER_SEQUENCES: clipped_line = rect.clipline( first_coordinate=endpt1, second_coordinate=inner_seq2(pt2) ) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__sequence_of_four_ints(self): """Ensures clipline handles a sequence of four ints. Tests the clipline((x1, y1, x2, y2)) format. Tests the sequence as different types. """ rect = Rect((1, 2), (35, 40)) line = (5, 6, 11, 19) expected_line = ((line[0], line[1]), (line[2], line[3])) for outer_seq in (list, tuple): clipped_line = rect.clipline(outer_seq(line)) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__sequence_of_four_ints_kwargs(self): """Ensures clipline handles a sequence of four ints using kwargs. Tests the clipline((x1, y1, x2, y2)) format. Tests the sequence as different types. """ rect = Rect((1, 2), (35, 40)) line = (5, 6, 11, 19) expected_line = ((line[0], line[1]), (line[2], line[3])) for outer_seq in (list, tuple): clipped_line = rect.clipline(rect_arg=outer_seq(line)) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__sequence_of_two_sequences(self): """Ensures clipline handles a sequence of two sequences. Tests the clipline(((x1, y1), (x2, y2))) format. Tests the sequences as different types. """ rect = Rect((1, 2), (35, 40)) pt1 = (5, 6) pt2 = (11, 19) INNER_SEQUENCES = (list, tuple, Vector2) expected_line = (pt1, pt2) for inner_seq1 in INNER_SEQUENCES: endpt1 = inner_seq1(pt1) for inner_seq2 in INNER_SEQUENCES: endpt2 = inner_seq2(pt2) for outer_seq in (list, tuple): clipped_line = rect.clipline(outer_seq((endpt1, endpt2))) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__sequence_of_two_sequences_kwargs(self): """Ensures clipline handles a sequence of two sequences using kwargs. Tests the clipline(((x1, y1), (x2, y2))) format. Tests the sequences as different types. """ rect = Rect((1, 2), (35, 40)) pt1 = (5, 6) pt2 = (11, 19) INNER_SEQUENCES = (list, tuple, Vector2) expected_line = (pt1, pt2) for inner_seq1 in INNER_SEQUENCES: endpt1 = inner_seq1(pt1) for inner_seq2 in INNER_SEQUENCES: endpt2 = inner_seq2(pt2) for outer_seq in (list, tuple): clipped_line = rect.clipline(x1=outer_seq((endpt1, endpt2))) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__floats(self): """Ensures clipline handles float parameters.""" rect = Rect((1, 2), (35, 40)) x1 = 5.9 y1 = 6.9 x2 = 11.9 y2 = 19.9 # Floats are truncated. expected_line = ( (math.floor(x1), math.floor(y1)), (math.floor(x2), math.floor(y2)), ) clipped_line = rect.clipline(x1, y1, x2, y2) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__floats_kwargs(self): """Ensures clipline handles four float parameters. Tests the clipline(x1, y1, x2, y2) format. """ rect = Rect((1, 2), (35, 40)) x1 = 5.9 y1 = 6.9 x2 = 11.9 y2 = 19.9 # Floats are truncated. expected_line = ( (math.floor(x1), math.floor(y1)), (math.floor(x2), math.floor(y2)), ) clipped_line = rect.clipline(x1=x1, x2=y1, x3=x2, x4=y2) self.assertIsInstance(clipped_line, tuple) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__kwarg_exceptions(self): """Ensure clipline handles incorrect keyword arguments""" r = Rect(2, 4, 6, 8) with self.assertRaises(TypeError): r.clipline(x1=0) with self.assertRaises(TypeError): r.clipline(first_coordinate=(1, 3, 5, 4), second_coordinate=(1, 2)) with self.assertRaises(TypeError): r.clipline(first_coordinate=(1, 3), second_coordinate=(2, 2), x1=1) with self.assertRaises(TypeError): r.clipline(rect_arg=(1, 3, 5)) with self.assertRaises(TypeError): r.clipline(rect_arg=(1, 3, 5, 4), second_coordinate=(2, 2)) def test_clipline__no_overlap(self): """Ensures lines that do not overlap the rect are not clipped.""" rect = Rect((10, 25), (15, 20)) # Use a bigger rect to help create test lines. big_rect = rect.inflate(2, 2) lines = ( (big_rect.bottomleft, big_rect.topleft), # Left edge. (big_rect.topleft, big_rect.topright), # Top edge. (big_rect.topright, big_rect.bottomright), # Right edge. (big_rect.bottomright, big_rect.bottomleft), ) # Bottom edge. expected_line = () # Test lines outside rect. for line in lines: clipped_line = rect.clipline(line) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__both_endpoints_outside(self): """Ensures lines that overlap the rect are clipped. Testing lines with both endpoints outside the rect. """ rect = Rect((0, 0), (20, 20)) # Use a bigger rect to help create test lines. big_rect = rect.inflate(2, 2) # Create a dict of lines and expected results. line_dict = { (big_rect.midleft, big_rect.midright): ( rect.midleft, (rect.midright[0] - 1, rect.midright[1]), ), (big_rect.midtop, big_rect.midbottom): ( rect.midtop, (rect.midbottom[0], rect.midbottom[1] - 1), ), # Diagonals. (big_rect.topleft, big_rect.bottomright): ( rect.topleft, (rect.bottomright[0] - 1, rect.bottomright[1] - 1), ), # This line needs a small adjustment to make sure it intersects # the rect correctly. ( (big_rect.topright[0] - 1, big_rect.topright[1]), (big_rect.bottomleft[0], big_rect.bottomleft[1] - 1), ): ( (rect.topright[0] - 1, rect.topright[1]), (rect.bottomleft[0], rect.bottomleft[1] - 1), ), } for line, expected_line in line_dict.items(): clipped_line = rect.clipline(line) self.assertTupleEqual(clipped_line, expected_line) # Swap endpoints to test for symmetry. expected_line = (expected_line[1], expected_line[0]) clipped_line = rect.clipline((line[1], line[0])) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__both_endpoints_inside(self): """Ensures lines that overlap the rect are clipped. Testing lines with both endpoints inside the rect. """ rect = Rect((-10, -5), (20, 20)) # Use a smaller rect to help create test lines. small_rect = rect.inflate(-2, -2) lines = ( (small_rect.midleft, small_rect.midright), (small_rect.midtop, small_rect.midbottom), # Diagonals. (small_rect.topleft, small_rect.bottomright), (small_rect.topright, small_rect.bottomleft), ) for line in lines: expected_line = line clipped_line = rect.clipline(line) self.assertTupleEqual(clipped_line, expected_line) # Swap endpoints to test for symmetry. expected_line = (expected_line[1], expected_line[0]) clipped_line = rect.clipline((line[1], line[0])) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__endpoints_inside_and_outside(self): """Ensures lines that overlap the rect are clipped. Testing lines with one endpoint outside the rect and the other is inside the rect. """ rect = Rect((0, 0), (21, 21)) # Use a bigger rect to help create test lines. big_rect = rect.inflate(2, 2) # Create a dict of lines and expected results. line_dict = { (big_rect.midleft, rect.center): (rect.midleft, rect.center), (big_rect.midtop, rect.center): (rect.midtop, rect.center), (big_rect.midright, rect.center): ( (rect.midright[0] - 1, rect.midright[1]), rect.center, ), (big_rect.midbottom, rect.center): ( (rect.midbottom[0], rect.midbottom[1] - 1), rect.center, ), # Diagonals. (big_rect.topleft, rect.center): (rect.topleft, rect.center), (big_rect.topright, rect.center): ( (rect.topright[0] - 1, rect.topright[1]), rect.center, ), (big_rect.bottomright, rect.center): ( (rect.bottomright[0] - 1, rect.bottomright[1] - 1), rect.center, ), # This line needs a small adjustment to make sure it intersects # the rect correctly. ((big_rect.bottomleft[0], big_rect.bottomleft[1] - 1), rect.center): ( (rect.bottomleft[0], rect.bottomleft[1] - 1), rect.center, ), } for line, expected_line in line_dict.items(): clipped_line = rect.clipline(line) self.assertTupleEqual(clipped_line, expected_line) # Swap endpoints to test for symmetry. expected_line = (expected_line[1], expected_line[0]) clipped_line = rect.clipline((line[1], line[0])) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__edges(self): """Ensures clipline properly clips line that are along the rect edges.""" rect = Rect((10, 25), (15, 20)) # Create a dict of edges and expected results. edge_dict = { # Left edge. (rect.bottomleft, rect.topleft): ( (rect.bottomleft[0], rect.bottomleft[1] - 1), rect.topleft, ), # Top edge. (rect.topleft, rect.topright): ( rect.topleft, (rect.topright[0] - 1, rect.topright[1]), ), # Right edge. (rect.topright, rect.bottomright): (), # Bottom edge. (rect.bottomright, rect.bottomleft): (), } for edge, expected_line in edge_dict.items(): clipped_line = rect.clipline(edge) self.assertTupleEqual(clipped_line, expected_line) # Swap endpoints to test for symmetry. if expected_line: expected_line = (expected_line[1], expected_line[0]) clipped_line = rect.clipline((edge[1], edge[0])) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__equal_endpoints_with_overlap(self): """Ensures clipline handles lines with both endpoints the same. Testing lines that overlap the rect. """ rect = Rect((10, 25), (15, 20)) # Test all the points in and on a rect. pts = ( (x, y) for x in range(rect.left, rect.right) for y in range(rect.top, rect.bottom) ) for pt in pts: expected_line = (pt, pt) clipped_line = rect.clipline((pt, pt)) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__equal_endpoints_no_overlap(self): """Ensures clipline handles lines with both endpoints the same. Testing lines that do not overlap the rect. """ expected_line = () rect = Rect((10, 25), (15, 20)) # Test points outside rect. for pt in test_utils.rect_perimeter_pts(rect.inflate(2, 2)): clipped_line = rect.clipline((pt, pt)) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__zero_size_rect(self): """Ensures clipline handles zero sized rects correctly.""" expected_line = () for size in ((0, 15), (15, 0), (0, 0)): rect = Rect((10, 25), size) clipped_line = rect.clipline(rect.topleft, rect.topleft) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__negative_size_rect(self): """Ensures clipline handles negative sized rects correctly.""" expected_line = () for size in ((-15, 20), (15, -20), (-15, -20)): rect = Rect((10, 25), size) norm_rect = rect.copy() norm_rect.normalize() # Use a bigger rect to help create test lines. big_rect = norm_rect.inflate(2, 2) # Create a dict of lines and expected results. Some line have both # endpoints outside the rect and some have one inside and one # outside. line_dict = { (big_rect.midleft, big_rect.midright): ( norm_rect.midleft, (norm_rect.midright[0] - 1, norm_rect.midright[1]), ), (big_rect.midtop, big_rect.midbottom): ( norm_rect.midtop, (norm_rect.midbottom[0], norm_rect.midbottom[1] - 1), ), (big_rect.midleft, norm_rect.center): ( norm_rect.midleft, norm_rect.center, ), (big_rect.midtop, norm_rect.center): ( norm_rect.midtop, norm_rect.center, ), (big_rect.midright, norm_rect.center): ( (norm_rect.midright[0] - 1, norm_rect.midright[1]), norm_rect.center, ), (big_rect.midbottom, norm_rect.center): ( (norm_rect.midbottom[0], norm_rect.midbottom[1] - 1), norm_rect.center, ), } for line, expected_line in line_dict.items(): clipped_line = rect.clipline(line) # Make sure rect wasn't normalized. self.assertNotEqual(rect, norm_rect) self.assertTupleEqual(clipped_line, expected_line) # Swap endpoints to test for symmetry. expected_line = (expected_line[1], expected_line[0]) clipped_line = rect.clipline((line[1], line[0])) self.assertTupleEqual(clipped_line, expected_line) def test_clipline__invalid_line(self): """Ensures clipline handles invalid lines correctly.""" rect = Rect((0, 0), (10, 20)) invalid_lines = ( (), (1,), (1, 2), (1, 2, 3), (1, 2, 3, 4, 5), ((1, 2),), ((1, 2), (3,)), ((1, 2), 3), ((1, 2, 5), (3, 4)), ((1, 2), (3, 4, 5)), ((1, 2), (3, 4), (5, 6)), ) for line in invalid_lines: with self.assertRaises(TypeError): clipped_line = rect.clipline(line) with self.assertRaises(TypeError): clipped_line = rect.clipline(*line) def test_move(self): r = Rect(1, 2, 3, 4) move_x = 10 move_y = 20 r2 = r.move(move_x, move_y) expected_r2 = Rect(r.left + move_x, r.top + move_y, r.width, r.height) self.assertEqual(expected_r2, r2) def test_move_ip(self): r = Rect(1, 2, 3, 4) r2 = Rect(r) move_x = 10 move_y = 20 r2.move_ip(move_x, move_y) expected_r2 = Rect(r.left + move_x, r.top + move_y, r.width, r.height) self.assertEqual(expected_r2, r2) @unittest.skipIf( IS_PYPY, "fails on pypy (but only for: bottom, right, centerx, centery)" ) def test_set_float_values(self): zero = 0 pos = 124 neg = -432 # (initial, increment, expected, other) data_rows = [ (zero, 0.1, zero, _random_int()), (zero, 0.4, zero, _random_int()), (zero, 0.5, zero + 1, _random_int()), (zero, 1.1, zero + 1, _random_int()), (zero, 1.5, zero + 2, _random_int()), # >0f (zero, -0.1, zero, _random_int()), (zero, -0.4, zero, _random_int()), (zero, -0.5, zero - 1, _random_int()), (zero, -0.6, zero - 1, _random_int()), (zero, -1.6, zero - 2, _random_int()), # <0f (zero, 1, zero + 1, _random_int()), (zero, 4, zero + 4, _random_int()), # >0i (zero, -1, zero - 1, _random_int()), (zero, -4, zero - 4, _random_int()), # <0i (pos, 0.1, pos, _random_int()), (pos, 0.4, pos, _random_int()), (pos, 0.5, pos + 1, _random_int()), (pos, 1.1, pos + 1, _random_int()), (pos, 1.5, pos + 2, _random_int()), # >0f (pos, -0.1, pos, _random_int()), (pos, -0.4, pos, _random_int()), (pos, -0.5, pos, _random_int()), (pos, -0.6, pos - 1, _random_int()), (pos, -1.6, pos - 2, _random_int()), # <0f (pos, 1, pos + 1, _random_int()), (pos, 4, pos + 4, _random_int()), # >0i (pos, -1, pos - 1, _random_int()), (pos, -4, pos - 4, _random_int()), # <0i (neg, 0.1, neg, _random_int()), (neg, 0.4, neg, _random_int()), (neg, 0.5, neg, _random_int()), (neg, 1.1, neg + 1, _random_int()), (neg, 1.5, neg + 1, _random_int()), # >0f (neg, -0.1, neg, _random_int()), (neg, -0.4, neg, _random_int()), (neg, -0.5, neg - 1, _random_int()), (neg, -0.6, neg - 1, _random_int()), (neg, -1.6, neg - 2, _random_int()), # <0f (neg, 1, neg + 1, _random_int()), (neg, 4, neg + 4, _random_int()), # >0i (neg, -1, neg - 1, _random_int()), (neg, -4, neg - 4, _random_int()), # <0i ] single_value_attribute_names = [ "x", "y", "w", "h", "width", "height", "top", "left", "bottom", "right", "centerx", "centery", ] tuple_value_attribute_names = [ "topleft", "topright", "bottomleft", "bottomright", "midtop", "midleft", "midbottom", "midright", "size", "center", ] for row in data_rows: initial, inc, expected, other = row new_value = initial + inc for attribute_name in single_value_attribute_names: with self.subTest(row=row, name=f"r.{attribute_name}"): actual = Rect( _random_int(), _random_int(), _random_int(), _random_int() ) # act setattr(actual, attribute_name, new_value) # assert self.assertEqual(expected, getattr(actual, attribute_name)) for attribute_name in tuple_value_attribute_names: with self.subTest(row=row, name=f"r.{attribute_name}[0]"): actual = Rect( _random_int(), _random_int(), _random_int(), _random_int() ) # act setattr(actual, attribute_name, (new_value, other)) # assert self.assertEqual((expected, other), getattr(actual, attribute_name)) with self.subTest(row=row, name=f"r.{attribute_name}[1]"): actual = Rect( _random_int(), _random_int(), _random_int(), _random_int() ) # act setattr(actual, attribute_name, (other, new_value)) # assert self.assertEqual((other, expected), getattr(actual, attribute_name)) def test_set_out_of_range_number_raises_exception(self): i = 0 # (initial, expected) data_rows = [ (_int_max + 1, TypeError), (_int_max + 0.00001, TypeError), (_int_max, None), (_int_max - 1, None), (_int_max - 2, None), (_int_max - 10, None), (_int_max - 63, None), (_int_max - 64, None), (_int_max - 65, None), (_int_min - 1, TypeError), (_int_min - 0.00001, TypeError), (_int_min, None), (_int_min + 1, None), (_int_min + 2, None), (_int_min + 10, None), (_int_min + 62, None), (_int_min + 63, None), (_int_min + 64, None), (0, None), (100000, None), (-100000, None), ] single_attribute_names = [ "x", "y", "w", "h", "width", "height", "top", "left", "bottom", "right", "centerx", "centery", ] tuple_value_attribute_names = [ "topleft", "topright", "bottomleft", "bottomright", "midtop", "midleft", "midbottom", "midright", "size", "center", ] for row in data_rows: for attribute_name in single_attribute_names: value, expected = row with self.subTest(row=row, name=f"r.{attribute_name}"): actual = Rect(0, 0, 0, 0) if expected: # act/ assert self.assertRaises( TypeError, setattr, actual, attribute_name, value ) else: # act setattr(actual, attribute_name, value) # assert self.assertEqual(value, getattr(actual, attribute_name)) other = _random_int() for attribute_name in tuple_value_attribute_names: value, expected = row with self.subTest(row=row, name=f"r.{attribute_name}[0]"): actual = Rect(0, 0, 0, 0) # act/ assert if expected: # act/ assert self.assertRaises( TypeError, setattr, actual, attribute_name, (value, other) ) else: # act setattr(actual, attribute_name, (value, other)) # assert self.assertEqual( (value, other), getattr(actual, attribute_name) ) with self.subTest(row=row, name=f"r.{attribute_name}[1]"): actual = Rect(0, 0, 0, 0) # act/ assert if expected: # act/ assert self.assertRaises( TypeError, setattr, actual, attribute_name, (other, value) ) else: # act setattr(actual, attribute_name, (other, value)) # assert self.assertEqual( (other, value), getattr(actual, attribute_name) ) def test_update_XYWidthHeight(self): """Test update with 4 int values(x, y, w, h)""" rect = Rect(0, 0, 1, 1) rect.update(1, 2, 3, 4) self.assertEqual(1, rect.left) self.assertEqual(2, rect.top) self.assertEqual(3, rect.width) self.assertEqual(4, rect.height) def test_update__TopLeftSize(self): """Test update with 2 tuples((x, y), (w, h))""" rect = Rect(0, 0, 1, 1) rect.update((1, 2), (3, 4)) self.assertEqual(1, rect.left) self.assertEqual(2, rect.top) self.assertEqual(3, rect.width) self.assertEqual(4, rect.height) def test_update__List(self): """Test update with list""" rect = Rect(0, 0, 1, 1) rect2 = [1, 2, 3, 4] rect.update(rect2) self.assertEqual(1, rect.left) self.assertEqual(2, rect.top) self.assertEqual(3, rect.width) self.assertEqual(4, rect.height) def test_update__RectObject(self): """Test update with other rect object""" rect = Rect(0, 0, 1, 1) rect2 = Rect(1, 2, 3, 4) rect.update(rect2) self.assertEqual(1, rect.left) self.assertEqual(2, rect.top) self.assertEqual(3, rect.width) self.assertEqual(4, rect.height) def test_union(self): r1 = Rect(1, 1, 1, 2) r2 = Rect(-2, -2, 1, 2) self.assertEqual(Rect(-2, -2, 4, 5), r1.union(r2)) def test_union__with_identical_Rect(self): r1 = Rect(1, 2, 3, 4) self.assertEqual(r1, r1.union(Rect(r1))) def test_union_ip(self): r1 = Rect(1, 1, 1, 2) r2 = Rect(-2, -2, 1, 2) r1.union_ip(r2) self.assertEqual(Rect(-2, -2, 4, 5), r1) def test_unionall(self): r1 = Rect(0, 0, 1, 1) r2 = Rect(-2, -2, 1, 1) r3 = Rect(2, 2, 1, 1) r4 = r1.unionall([r2, r3]) self.assertEqual(Rect(-2, -2, 5, 5), r4) def test_unionall__invalid_rect_format(self): """Ensures unionall correctly handles invalid rect parameters.""" numbers = [0, 1.2, 2, 3.3] strs = ["a", "b", "c"] nones = [None, None] for invalid_rects in (numbers, strs, nones): with self.assertRaises(TypeError): Rect(0, 0, 1, 1).unionall(invalid_rects) def test_unionall__kwargs(self): r1 = Rect(0, 0, 1, 1) r2 = Rect(-2, -2, 1, 1) r3 = Rect(2, 2, 1, 1) r4 = r1.unionall(rect=[r2, r3]) self.assertEqual(Rect(-2, -2, 5, 5), r4) def test_unionall_ip(self): r1 = Rect(0, 0, 1, 1) r2 = Rect(-2, -2, 1, 1) r3 = Rect(2, 2, 1, 1) r1.unionall_ip([r2, r3]) self.assertEqual(Rect(-2, -2, 5, 5), r1) # Bug for an empty list. Would return a Rect instead of None. self.assertTrue(r1.unionall_ip([]) is None) def test_unionall_ip__kwargs(self): r1 = Rect(0, 0, 1, 1) r2 = Rect(-2, -2, 1, 1) r3 = Rect(2, 2, 1, 1) r1.unionall_ip(rects=[r2, r3]) self.assertEqual(Rect(-2, -2, 5, 5), r1) # Bug for an empty list. Would return a Rect instead of None. self.assertTrue(r1.unionall_ip([]) is None) def test_colliderect(self): r1 = Rect(1, 2, 3, 4) self.assertTrue( r1.colliderect(Rect(0, 0, 2, 3)), "r1 does not collide with Rect(0, 0, 2, 3)", ) self.assertFalse( r1.colliderect(Rect(0, 0, 1, 2)), "r1 collides with Rect(0, 0, 1, 2)" ) self.assertFalse( r1.colliderect(Rect(r1.right, r1.bottom, 2, 2)), "r1 collides with Rect(r1.right, r1.bottom, 2, 2)", ) self.assertTrue( r1.colliderect(Rect(r1.left + 1, r1.top + 1, r1.width - 2, r1.height - 2)), "r1 does not collide with Rect(r1.left + 1, r1.top + 1, " + "r1.width - 2, r1.height - 2)", ) self.assertTrue( r1.colliderect(Rect(r1.left - 1, r1.top - 1, r1.width + 2, r1.height + 2)), "r1 does not collide with Rect(r1.left - 1, r1.top - 1, " + "r1.width + 2, r1.height + 2)", ) self.assertTrue( r1.colliderect(Rect(r1)), "r1 does not collide with an identical rect" ) self.assertFalse( r1.colliderect(Rect(r1.right, r1.bottom, 0, 0)), "r1 collides with Rect(r1.right, r1.bottom, 0, 0)", ) self.assertFalse( r1.colliderect(Rect(r1.right, r1.bottom, 1, 1)), "r1 collides with Rect(r1.right, r1.bottom, 1, 1)", ) def testEquals(self): """check to see how the rect uses __eq__""" r1 = Rect(1, 2, 3, 4) r2 = Rect(10, 20, 30, 40) r3 = (10, 20, 30, 40) r4 = Rect(10, 20, 30, 40) class foo(Rect): def __eq__(self, other): return id(self) == id(other) def __ne__(self, other): return id(self) != id(other) class foo2(Rect): pass r5 = foo(10, 20, 30, 40) r6 = foo2(10, 20, 30, 40) self.assertNotEqual(r5, r2) # because we define equality differently for this subclass. self.assertEqual(r6, r2) rect_list = [r1, r2, r3, r4, r6] # see if we can remove 4 of these. rect_list.remove(r2) rect_list.remove(r2) rect_list.remove(r2) rect_list.remove(r2) self.assertRaises(ValueError, rect_list.remove, r2) def test_collidedict(self): """Ensures collidedict detects collisions.""" rect = Rect(1, 1, 10, 10) collide_item1 = ("collide 1", rect.copy()) collide_item2 = ("collide 2", Rect(5, 5, 10, 10)) no_collide_item1 = ("no collide 1", Rect(60, 60, 10, 10)) no_collide_item2 = ("no collide 2", Rect(70, 70, 10, 10)) # Dict to check collisions with values. rect_values = dict( (collide_item1, collide_item2, no_collide_item1, no_collide_item2) ) value_collide_items = (collide_item1, collide_item2) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = tuple((tuple(v), k) for k, v in value_collide_items) for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_item = rect.collidedict(d, use_values) # The detected collision could be any of the possible items. self.assertIn(collide_item, expected_items) def test_collidedict__no_collision(self): """Ensures collidedict returns None when no collisions.""" rect = Rect(1, 1, 10, 10) no_collide_item1 = ("no collide 1", Rect(50, 50, 10, 10)) no_collide_item2 = ("no collide 2", Rect(60, 60, 10, 10)) no_collide_item3 = ("no collide 3", Rect(70, 70, 10, 10)) # Dict to check collisions with values. rect_values = dict((no_collide_item1, no_collide_item2, no_collide_item3)) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} for use_values in (True, False): d = rect_values if use_values else rect_keys collide_item = rect.collidedict(d, use_values) self.assertIsNone(collide_item) def test_collidedict__barely_touching(self): """Ensures collidedict works correctly for rects that barely touch.""" rect = Rect(1, 1, 10, 10) # Small rect to test barely touching collisions. collide_rect = Rect(0, 0, 1, 1) collide_item1 = ("collide 1", collide_rect) no_collide_item1 = ("no collide 1", Rect(50, 50, 10, 10)) no_collide_item2 = ("no collide 2", Rect(60, 60, 10, 10)) no_collide_item3 = ("no collide 3", Rect(70, 70, 10, 10)) # Dict to check collisions with values. no_collide_rect_values = dict( (no_collide_item1, no_collide_item2, no_collide_item3) ) # Dict to check collisions with keys. no_collide_rect_keys = {tuple(v): k for k, v in no_collide_rect_values.items()} # Tests the collide_rect on each of the rect's corners. for attr in ("topleft", "topright", "bottomright", "bottomleft"): setattr(collide_rect, attr, getattr(rect, attr)) for use_values in (True, False): if use_values: expected_item = collide_item1 d = dict(no_collide_rect_values) else: expected_item = (tuple(collide_item1[1]), collide_item1[0]) d = dict(no_collide_rect_keys) d.update((expected_item,)) # Add in the expected item. collide_item = rect.collidedict(d, use_values) self.assertTupleEqual(collide_item, expected_item) def test_collidedict__zero_sized_rects(self): """Ensures collidedict works correctly with zero sized rects. There should be no collisions with zero sized rects. """ zero_rect1 = Rect(1, 1, 0, 0) zero_rect2 = Rect(1, 1, 1, 0) zero_rect3 = Rect(1, 1, 0, 1) zero_rect4 = Rect(1, 1, -1, 0) zero_rect5 = Rect(1, 1, 0, -1) no_collide_item1 = ("no collide 1", zero_rect1.copy()) no_collide_item2 = ("no collide 2", zero_rect2.copy()) no_collide_item3 = ("no collide 3", zero_rect3.copy()) no_collide_item4 = ("no collide 4", zero_rect4.copy()) no_collide_item5 = ("no collide 5", zero_rect5.copy()) no_collide_item6 = ("no collide 6", Rect(0, 0, 10, 10)) no_collide_item7 = ("no collide 7", Rect(0, 0, 2, 2)) # Dict to check collisions with values. rect_values = dict( ( no_collide_item1, no_collide_item2, no_collide_item3, no_collide_item4, no_collide_item5, no_collide_item6, no_collide_item7, ) ) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} for use_values in (True, False): d = rect_values if use_values else rect_keys for zero_rect in ( zero_rect1, zero_rect2, zero_rect3, zero_rect4, zero_rect5, ): collide_item = zero_rect.collidedict(d, use_values) self.assertIsNone(collide_item) def test_collidedict__zero_sized_rects_as_args(self): """Ensures collidedict works correctly with zero sized rects as args. There should be no collisions with zero sized rects. """ rect = Rect(0, 0, 10, 10) no_collide_item1 = ("no collide 1", Rect(1, 1, 0, 0)) no_collide_item2 = ("no collide 2", Rect(1, 1, 1, 0)) no_collide_item3 = ("no collide 3", Rect(1, 1, 0, 1)) # Dict to check collisions with values. rect_values = dict((no_collide_item1, no_collide_item2, no_collide_item3)) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} for use_values in (True, False): d = rect_values if use_values else rect_keys collide_item = rect.collidedict(d, use_values) self.assertIsNone(collide_item) def test_collidedict__negative_sized_rects(self): """Ensures collidedict works correctly with negative sized rects.""" neg_rect = Rect(1, 1, -1, -1) collide_item1 = ("collide 1", neg_rect.copy()) collide_item2 = ("collide 2", Rect(0, 0, 10, 10)) no_collide_item1 = ("no collide 1", Rect(1, 1, 10, 10)) # Dict to check collisions with values. rect_values = dict((collide_item1, collide_item2, no_collide_item1)) value_collide_items = (collide_item1, collide_item2) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = tuple((tuple(v), k) for k, v in value_collide_items) for use_values in (True, False): if use_values: collide_items = value_collide_items d = rect_values else: collide_items = key_collide_items d = rect_keys collide_item = neg_rect.collidedict(d, use_values) # The detected collision could be any of the possible items. self.assertIn(collide_item, collide_items) def test_collidedict__negative_sized_rects_as_args(self): """Ensures collidedict works correctly with negative sized rect args.""" rect = Rect(0, 0, 10, 10) collide_item1 = ("collide 1", Rect(1, 1, -1, -1)) no_collide_item1 = ("no collide 1", Rect(1, 1, -1, 0)) no_collide_item2 = ("no collide 2", Rect(1, 1, 0, -1)) # Dict to check collisions with values. rect_values = dict((collide_item1, no_collide_item1, no_collide_item2)) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} for use_values in (True, False): if use_values: expected_item = collide_item1 d = rect_values else: expected_item = (tuple(collide_item1[1]), collide_item1[0]) d = rect_keys collide_item = rect.collidedict(d, use_values) self.assertTupleEqual(collide_item, expected_item) def test_collidedict__invalid_dict_format(self): """Ensures collidedict correctly handles invalid dict parameters.""" rect = Rect(0, 0, 10, 10) invalid_value_dict = ("collide", rect.copy()) invalid_key_dict = tuple(invalid_value_dict[1]), invalid_value_dict[0] for use_values in (True, False): d = invalid_value_dict if use_values else invalid_key_dict with self.assertRaises(TypeError): collide_item = rect.collidedict(d, use_values) def test_collidedict__invalid_dict_value_format(self): """Ensures collidedict correctly handles dicts with invalid values.""" rect = Rect(0, 0, 10, 10) rect_keys = {tuple(rect): "collide"} with self.assertRaises(TypeError): collide_item = rect.collidedict(rect_keys, 1) def test_collidedict__invalid_dict_key_format(self): """Ensures collidedict correctly handles dicts with invalid keys.""" rect = Rect(0, 0, 10, 10) rect_values = {"collide": rect.copy()} with self.assertRaises(TypeError): collide_item = rect.collidedict(rect_values) def test_collidedict__invalid_use_values_format(self): """Ensures collidedict correctly handles invalid use_values parameters.""" rect = Rect(0, 0, 1, 1) d = {} for invalid_param in (None, d, 1.1): with self.assertRaises(TypeError): collide_item = rect.collidedict(d, invalid_param) def test_collidedict__kwargs(self): """Ensures collidedict detects collisions via keyword arguments.""" rect = Rect(1, 1, 10, 10) collide_item1 = ("collide 1", rect.copy()) collide_item2 = ("collide 2", Rect(5, 5, 10, 10)) no_collide_item1 = ("no collide 1", Rect(60, 60, 10, 10)) no_collide_item2 = ("no collide 2", Rect(70, 70, 10, 10)) # Dict to check collisions with values. rect_values = dict( (collide_item1, collide_item2, no_collide_item1, no_collide_item2) ) value_collide_items = (collide_item1, collide_item2) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = tuple((tuple(v), k) for k, v in value_collide_items) for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_item = rect.collidedict(rect_dict=d, values=use_values) # The detected collision could be any of the possible items. self.assertIn(collide_item, expected_items) def test_collidedictall(self): """Ensures collidedictall detects collisions.""" rect = Rect(1, 1, 10, 10) collide_item1 = ("collide 1", rect.copy()) collide_item2 = ("collide 2", Rect(5, 5, 10, 10)) no_collide_item1 = ("no collide 1", Rect(60, 60, 20, 20)) no_collide_item2 = ("no collide 2", Rect(70, 70, 20, 20)) # Dict to check collisions with values. rect_values = dict( (collide_item1, collide_item2, no_collide_item1, no_collide_item2) ) value_collide_items = [collide_item1, collide_item2] # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = [(tuple(v), k) for k, v in value_collide_items] for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_items = rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__no_collision(self): """Ensures collidedictall returns an empty list when no collisions.""" rect = Rect(1, 1, 10, 10) no_collide_item1 = ("no collide 1", Rect(50, 50, 20, 20)) no_collide_item2 = ("no collide 2", Rect(60, 60, 20, 20)) no_collide_item3 = ("no collide 3", Rect(70, 70, 20, 20)) # Dict to check collisions with values. rect_values = dict((no_collide_item1, no_collide_item2, no_collide_item3)) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} expected_items = [] for use_values in (True, False): d = rect_values if use_values else rect_keys collide_items = rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__barely_touching(self): """Ensures collidedictall works correctly for rects that barely touch.""" rect = Rect(1, 1, 10, 10) # Small rect to test barely touching collisions. collide_rect = Rect(0, 0, 1, 1) collide_item1 = ("collide 1", collide_rect) no_collide_item1 = ("no collide 1", Rect(50, 50, 20, 20)) no_collide_item2 = ("no collide 2", Rect(60, 60, 20, 20)) no_collide_item3 = ("no collide 3", Rect(70, 70, 20, 20)) # Dict to check collisions with values. no_collide_rect_values = dict( (no_collide_item1, no_collide_item2, no_collide_item3) ) # Dict to check collisions with keys. no_collide_rect_keys = {tuple(v): k for k, v in no_collide_rect_values.items()} # Tests the collide_rect on each of the rect's corners. for attr in ("topleft", "topright", "bottomright", "bottomleft"): setattr(collide_rect, attr, getattr(rect, attr)) for use_values in (True, False): if use_values: expected_items = [collide_item1] d = dict(no_collide_rect_values) else: expected_items = [(tuple(collide_item1[1]), collide_item1[0])] d = dict(no_collide_rect_keys) d.update(expected_items) # Add in the expected items. collide_items = rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__zero_sized_rects(self): """Ensures collidedictall works correctly with zero sized rects. There should be no collisions with zero sized rects. """ zero_rect1 = Rect(2, 2, 0, 0) zero_rect2 = Rect(2, 2, 2, 0) zero_rect3 = Rect(2, 2, 0, 2) zero_rect4 = Rect(2, 2, -2, 0) zero_rect5 = Rect(2, 2, 0, -2) no_collide_item1 = ("no collide 1", zero_rect1.copy()) no_collide_item2 = ("no collide 2", zero_rect2.copy()) no_collide_item3 = ("no collide 3", zero_rect3.copy()) no_collide_item4 = ("no collide 4", zero_rect4.copy()) no_collide_item5 = ("no collide 5", zero_rect5.copy()) no_collide_item6 = ("no collide 6", Rect(0, 0, 10, 10)) no_collide_item7 = ("no collide 7", Rect(0, 0, 2, 2)) # Dict to check collisions with values. rect_values = dict( ( no_collide_item1, no_collide_item2, no_collide_item3, no_collide_item4, no_collide_item5, no_collide_item6, no_collide_item7, ) ) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} expected_items = [] for use_values in (True, False): d = rect_values if use_values else rect_keys for zero_rect in ( zero_rect1, zero_rect2, zero_rect3, zero_rect4, zero_rect5, ): collide_items = zero_rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__zero_sized_rects_as_args(self): """Ensures collidedictall works correctly with zero sized rects as args. There should be no collisions with zero sized rects. """ rect = Rect(0, 0, 20, 20) no_collide_item1 = ("no collide 1", Rect(2, 2, 0, 0)) no_collide_item2 = ("no collide 2", Rect(2, 2, 2, 0)) no_collide_item3 = ("no collide 3", Rect(2, 2, 0, 2)) # Dict to check collisions with values. rect_values = dict((no_collide_item1, no_collide_item2, no_collide_item3)) # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} expected_items = [] for use_values in (True, False): d = rect_values if use_values else rect_keys collide_items = rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__negative_sized_rects(self): """Ensures collidedictall works correctly with negative sized rects.""" neg_rect = Rect(2, 2, -2, -2) collide_item1 = ("collide 1", neg_rect.copy()) collide_item2 = ("collide 2", Rect(0, 0, 20, 20)) no_collide_item1 = ("no collide 1", Rect(2, 2, 20, 20)) # Dict to check collisions with values. rect_values = dict((collide_item1, collide_item2, no_collide_item1)) value_collide_items = [collide_item1, collide_item2] # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = [(tuple(v), k) for k, v in value_collide_items] for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_items = neg_rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__negative_sized_rects_as_args(self): """Ensures collidedictall works correctly with negative sized rect args. """ rect = Rect(0, 0, 10, 10) collide_item1 = ("collide 1", Rect(1, 1, -1, -1)) no_collide_item1 = ("no collide 1", Rect(1, 1, -1, 0)) no_collide_item2 = ("no collide 2", Rect(1, 1, 0, -1)) # Dict to check collisions with values. rect_values = dict((collide_item1, no_collide_item1, no_collide_item2)) value_collide_items = [collide_item1] # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = [(tuple(v), k) for k, v in value_collide_items] for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_items = rect.collidedictall(d, use_values) self._assertCountEqual(collide_items, expected_items) def test_collidedictall__invalid_dict_format(self): """Ensures collidedictall correctly handles invalid dict parameters.""" rect = Rect(0, 0, 10, 10) invalid_value_dict = ("collide", rect.copy()) invalid_key_dict = tuple(invalid_value_dict[1]), invalid_value_dict[0] for use_values in (True, False): d = invalid_value_dict if use_values else invalid_key_dict with self.assertRaises(TypeError): collide_item = rect.collidedictall(d, use_values) def test_collidedictall__invalid_dict_value_format(self): """Ensures collidedictall correctly handles dicts with invalid values.""" rect = Rect(0, 0, 10, 10) rect_keys = {tuple(rect): "collide"} with self.assertRaises(TypeError): collide_items = rect.collidedictall(rect_keys, 1) def test_collidedictall__invalid_dict_key_format(self): """Ensures collidedictall correctly handles dicts with invalid keys.""" rect = Rect(0, 0, 10, 10) rect_values = {"collide": rect.copy()} with self.assertRaises(TypeError): collide_items = rect.collidedictall(rect_values) def test_collidedictall__invalid_use_values_format(self): """Ensures collidedictall correctly handles invalid use_values parameters. """ rect = Rect(0, 0, 1, 1) d = {} for invalid_param in (None, d, 1.1): with self.assertRaises(TypeError): collide_items = rect.collidedictall(d, invalid_param) def test_collidedictall__kwargs(self): """Ensures collidedictall detects collisions via keyword arguments.""" rect = Rect(1, 1, 10, 10) collide_item1 = ("collide 1", rect.copy()) collide_item2 = ("collide 2", Rect(5, 5, 10, 10)) no_collide_item1 = ("no collide 1", Rect(60, 60, 20, 20)) no_collide_item2 = ("no collide 2", Rect(70, 70, 20, 20)) # Dict to check collisions with values. rect_values = dict( (collide_item1, collide_item2, no_collide_item1, no_collide_item2) ) value_collide_items = [collide_item1, collide_item2] # Dict to check collisions with keys. rect_keys = {tuple(v): k for k, v in rect_values.items()} key_collide_items = [(tuple(v), k) for k, v in value_collide_items] for use_values in (True, False): if use_values: expected_items = value_collide_items d = rect_values else: expected_items = key_collide_items d = rect_keys collide_items = rect.collidedictall(rect_dict=d, values=use_values) self._assertCountEqual(collide_items, expected_items) def test_collidelist(self): # __doc__ (as of 2008-08-02) for pygame.rect.Rect.collidelist: # Rect.collidelist(list): return index # test if one rectangle in a list intersects # # Test whether the rectangle collides with any in a sequence of # rectangles. The index of the first collision found is returned. If # no collisions are found an index of -1 is returned. r = Rect(1, 1, 10, 10) l = [Rect(50, 50, 1, 1), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1)] self.assertEqual(r.collidelist(l), 1) f = [Rect(50, 50, 1, 1), (100, 100, 4, 4)] self.assertEqual(r.collidelist(f), -1) def test_collidelist__kwargs(self): # Rect.collidelist(list): return index # test if one rectangle in a list intersects # # Test whether the rectangle collides with any in a sequence of # rectangles using keyword arguments. The index of the first collision # found is returned. If no collisions are found an index # of -1 is returned. r = Rect(1, 1, 10, 10) l = [Rect(50, 50, 1, 1), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1)] self.assertEqual(r.collidelist(l), 1) f = [Rect(50, 50, 1, 1), (100, 100, 4, 4)] self.assertEqual(r.collidelist(rects=f), -1) def test_collidelistall(self): # __doc__ (as of 2008-08-02) for pygame.rect.Rect.collidelistall: # Rect.collidelistall(list): return indices # test if all rectangles in a list intersect # # Returns a list of all the indices that contain rectangles that # collide with the Rect. If no intersecting rectangles are found, an # empty list is returned. r = Rect(1, 1, 10, 10) l = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [Rect(50, 50, 1, 1), Rect(20, 20, 5, 5)] self.assertFalse(r.collidelistall(f)) def test_collidelistall_returns_empty_list(self): r = Rect(1, 1, 10, 10) l = [ Rect(112, 1, 10, 10), Rect(50, 5, 10, 10), Rect(15, 15, 1, 1), Rect(-20, 2, 1, 1), ] self.assertEqual(r.collidelistall(l), []) def test_collidelistall_list_of_tuples(self): r = Rect(1, 1, 10, 10) l = [ (1, 1, 10, 10), (5, 5, 10, 10), (15, 15, 1, 1), (2, 2, 1, 1), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [(50, 50, 1, 1), (20, 20, 5, 5)] self.assertFalse(r.collidelistall(f)) def test_collidelistall_list_of_two_tuples(self): r = Rect(1, 1, 10, 10) l = [ ((1, 1), (10, 10)), ((5, 5), (10, 10)), ((15, 15), (1, 1)), ((2, 2), (1, 1)), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [((50, 50), (1, 1)), ((20, 20), (5, 5))] self.assertFalse(r.collidelistall(f)) def test_collidelistall_list_of_lists(self): r = Rect(1, 1, 10, 10) l = [ [1, 1, 10, 10], [5, 5, 10, 10], [15, 15, 1, 1], [2, 2, 1, 1], ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [[50, 50, 1, 1], [20, 20, 5, 5]] self.assertFalse(r.collidelistall(f)) class _ObjectWithRectAttribute: def __init__(self, r): self.rect = r class _ObjectWithCallableRectAttribute: def __init__(self, r): self._rect = r def rect(self): return self._rect class _ObjectWithRectProperty: def __init__(self, r): self._rect = r @property def rect(self): return self._rect class _ObjectWithMultipleRectAttribute: def __init__(self, r1, r2, r3): self.rect1 = r1 self.rect2 = r2 self.rect3 = r3 def test_collidelistall_list_of_object_with_rect_attribute(self): r = Rect(1, 1, 10, 10) l = [ self._ObjectWithRectAttribute(Rect(1, 1, 10, 10)), self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithRectAttribute(Rect(15, 15, 1, 1)), self._ObjectWithRectAttribute(Rect(2, 2, 1, 1)), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [ self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithRectAttribute(Rect(20, 20, 5, 5)), ] self.assertFalse(r.collidelistall(f)) def test_collidelistall_list_of_object_with_callable_rect_attribute(self): r = Rect(1, 1, 10, 10) l = [ self._ObjectWithCallableRectAttribute(Rect(1, 1, 10, 10)), self._ObjectWithCallableRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithCallableRectAttribute(Rect(15, 15, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(2, 2, 1, 1)), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(20, 20, 5, 5)), ] self.assertFalse(r.collidelistall(f)) def test_collidelistall_list_of_object_with_callable_rect_returning_object_with_rect_attribute( self, ): r = Rect(1, 1, 10, 10) l = [ self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(1, 1, 10, 10)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(15, 15, 1, 1)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(2, 2, 1, 1)) ), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(20, 20, 5, 5)), ] self.assertFalse(r.collidelistall(f)) def test_collidelistall_list_of_object_with_rect_property(self): r = Rect(1, 1, 10, 10) l = [ self._ObjectWithRectProperty(Rect(1, 1, 10, 10)), self._ObjectWithRectProperty(Rect(5, 5, 10, 10)), self._ObjectWithRectProperty(Rect(15, 15, 1, 1)), self._ObjectWithRectProperty(Rect(2, 2, 1, 1)), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [ self._ObjectWithRectProperty(Rect(50, 50, 1, 1)), self._ObjectWithRectProperty(Rect(20, 20, 5, 5)), ] self.assertFalse(r.collidelistall(f)) def test_collidelistall__kwargs(self): # Rect.collidelistall(list): return indices # test if all rectangles in a list intersect using keyword arguments. # # Returns a list of all the indices that contain rectangles that # collide with the Rect. If no intersecting rectangles are found, an # empty list is returned. r = Rect(1, 1, 10, 10) l = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] self.assertEqual(r.collidelistall(l), [0, 1, 3]) f = [Rect(50, 50, 1, 1), Rect(20, 20, 5, 5)] self.assertFalse(r.collidelistall(rects=f)) def test_collideobjects_call_variants(self): # arrange r = Rect(1, 1, 10, 10) rects = [Rect(1, 2, 3, 4), Rect(10, 20, 30, 40)] objects = [ self._ObjectWithMultipleRectAttribute( Rect(1, 2, 3, 4), Rect(10, 20, 30, 40), Rect(100, 200, 300, 400) ), self._ObjectWithMultipleRectAttribute( Rect(1, 2, 3, 4), Rect(10, 20, 30, 40), Rect(100, 200, 300, 400) ), ] # act / verify r.collideobjects(rects) r.collideobjects(rects, key=None) r.collideobjects(objects, key=lambda o: o.rect1) self.assertRaises(TypeError, r.collideobjects, objects) def test_collideobjects_without_key(self): r = Rect(1, 1, 10, 10) types_to_test = [ [Rect(50, 50, 1, 1), Rect(5, 5, 10, 10), Rect(4, 4, 1, 1)], [ self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithRectAttribute(Rect(4, 4, 1, 1)), ], [ self._ObjectWithRectProperty(Rect(50, 50, 1, 1)), self._ObjectWithRectProperty(Rect(5, 5, 10, 10)), self._ObjectWithRectProperty(Rect(4, 4, 1, 1)), ], [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithCallableRectAttribute(Rect(4, 4, 1, 1)), ], [ self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(4, 4, 1, 1)) ), ], [(50, 50, 1, 1), (5, 5, 10, 10), (4, 4, 1, 1)], [((50, 50), (1, 1)), ((5, 5), (10, 10)), ((4, 4), (1, 1))], [[50, 50, 1, 1], [5, 5, 10, 10], [4, 4, 1, 1]], [ Rect(50, 50, 1, 1), self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)), (4, 4, 1, 1), ], # mix ] for l in types_to_test: with self.subTest(type=l[0].__class__.__name__): # act actual = r.collideobjects(l) # assert self.assertEqual(actual, l[1]) types_to_test = [ [Rect(50, 50, 1, 1), Rect(100, 100, 4, 4)], [ self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithRectAttribute(Rect(100, 100, 4, 4)), ], [ self._ObjectWithRectProperty(Rect(50, 50, 1, 1)), self._ObjectWithRectProperty(Rect(100, 100, 4, 4)), ], [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(100, 100, 4, 4)), ], [ self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(100, 100, 4, 4)) ), ], [(50, 50, 1, 1), (100, 100, 4, 4)], [((50, 50), (1, 1)), ((100, 100), (4, 4))], [[50, 50, 1, 1], [100, 100, 4, 4]], [Rect(50, 50, 1, 1), [100, 100, 4, 4]], # mix ] for f in types_to_test: with self.subTest(type=f[0].__class__.__name__, expected=None): # act actual = r.collideobjects(f) # assert self.assertEqual(actual, None) def test_collideobjects_list_of_object_with_multiple_rect_attribute(self): r = Rect(1, 1, 10, 10) things = [ self._ObjectWithMultipleRectAttribute( Rect(1, 1, 10, 10), Rect(5, 5, 1, 1), Rect(-73, 3, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(5, 5, 10, 10), Rect(-5, -5, 10, 10), Rect(3, 3, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(15, 15, 1, 1), Rect(100, 1, 1, 1), Rect(3, 83, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(2, 2, 1, 1), Rect(1, -81, 10, 10), Rect(3, 8, 3, 3) ), ] self.assertEqual(r.collideobjects(things, key=lambda o: o.rect1), things[0]) self.assertEqual(r.collideobjects(things, key=lambda o: o.rect2), things[0]) self.assertEqual(r.collideobjects(things, key=lambda o: o.rect3), things[1]) f = [ self._ObjectWithMultipleRectAttribute( Rect(50, 50, 1, 1), Rect(11, 1, 1, 1), Rect(2, -32, 2, 2) ), self._ObjectWithMultipleRectAttribute( Rect(20, 20, 5, 5), Rect(1, 11, 1, 1), Rect(-20, 2, 2, 2) ), ] self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect1)) self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect2)) self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect3)) def test_collideobjectsall_call_variants(self): # arrange r = Rect(1, 1, 10, 10) rects = [Rect(1, 2, 3, 4), Rect(10, 20, 30, 40)] objects = [ self._ObjectWithMultipleRectAttribute( Rect(1, 2, 3, 4), Rect(10, 20, 30, 40), Rect(100, 200, 300, 400) ), self._ObjectWithMultipleRectAttribute( Rect(1, 2, 3, 4), Rect(10, 20, 30, 40), Rect(100, 200, 300, 400) ), ] # act / verify r.collideobjectsall(rects) r.collideobjectsall(rects, key=None) r.collideobjectsall(objects, key=lambda o: o.rect1) self.assertRaises(TypeError, r.collideobjectsall, objects) def test_collideobjectsall(self): r = Rect(1, 1, 10, 10) types_to_test = [ [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ], [ (1, 1, 10, 10), (5, 5, 10, 10), (15, 15, 1, 1), (2, 2, 1, 1), ], [ ((1, 1), (10, 10)), ((5, 5), (10, 10)), ((15, 15), (1, 1)), ((2, 2), (1, 1)), ], [ [1, 1, 10, 10], [5, 5, 10, 10], [15, 15, 1, 1], [2, 2, 1, 1], ], [ self._ObjectWithRectAttribute(Rect(1, 1, 10, 10)), self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithRectAttribute(Rect(15, 15, 1, 1)), self._ObjectWithRectAttribute(Rect(2, 2, 1, 1)), ], [ self._ObjectWithCallableRectAttribute(Rect(1, 1, 10, 10)), self._ObjectWithCallableRectAttribute(Rect(5, 5, 10, 10)), self._ObjectWithCallableRectAttribute(Rect(15, 15, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(2, 2, 1, 1)), ], [ self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(1, 1, 10, 10)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(5, 5, 10, 10)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(15, 15, 1, 1)) ), self._ObjectWithCallableRectAttribute( self._ObjectWithRectAttribute(Rect(2, 2, 1, 1)) ), ], [ self._ObjectWithRectProperty(Rect(1, 1, 10, 10)), self._ObjectWithRectProperty(Rect(5, 5, 10, 10)), self._ObjectWithRectProperty(Rect(15, 15, 1, 1)), self._ObjectWithRectProperty(Rect(2, 2, 1, 1)), ], ] for things in types_to_test: with self.subTest(type=things[0].__class__.__name__): # act actual = r.collideobjectsall(things, key=None) # assert self.assertEqual(actual, [things[0], things[1], things[3]]) types_to_test = [ [Rect(50, 50, 1, 1), Rect(20, 20, 5, 5)], [(50, 50, 1, 1), (20, 20, 5, 5)], [((50, 50), (1, 1)), ((20, 20), (5, 5))], [[50, 50, 1, 1], [20, 20, 5, 5]], [ self._ObjectWithRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithRectAttribute(Rect(20, 20, 5, 5)), ], [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(20, 20, 5, 5)), ], [ self._ObjectWithCallableRectAttribute(Rect(50, 50, 1, 1)), self._ObjectWithCallableRectAttribute(Rect(20, 20, 5, 5)), ], [ self._ObjectWithRectProperty(Rect(50, 50, 1, 1)), self._ObjectWithRectProperty(Rect(20, 20, 5, 5)), ], ] for f in types_to_test: with self.subTest(type=f[0].__class__.__name__, expected=None): # act actual = r.collideobjectsall(f) # assert self.assertFalse(actual) def test_collideobjectsall_list_of_object_with_multiple_rect_attribute(self): r = Rect(1, 1, 10, 10) things = [ self._ObjectWithMultipleRectAttribute( Rect(1, 1, 10, 10), Rect(5, 5, 1, 1), Rect(-73, 3, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(5, 5, 10, 10), Rect(-5, -5, 10, 10), Rect(3, 3, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(15, 15, 1, 1), Rect(100, 1, 1, 1), Rect(3, 83, 3, 3) ), self._ObjectWithMultipleRectAttribute( Rect(2, 2, 1, 1), Rect(1, -81, 10, 10), Rect(3, 8, 3, 3) ), ] self.assertEqual( r.collideobjectsall(things, key=lambda o: o.rect1), [things[0], things[1], things[3]], ) self.assertEqual( r.collideobjectsall(things, key=lambda o: o.rect2), [things[0], things[1]] ) self.assertEqual( r.collideobjectsall(things, key=lambda o: o.rect3), [things[1], things[3]] ) f = [ self._ObjectWithMultipleRectAttribute( Rect(50, 50, 1, 1), Rect(11, 1, 1, 1), Rect(2, -32, 2, 2) ), self._ObjectWithMultipleRectAttribute( Rect(20, 20, 5, 5), Rect(1, 11, 1, 1), Rect(-20, 2, 2, 2) ), ] self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect1)) self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect2)) self.assertFalse(r.collideobjectsall(f, key=lambda o: o.rect3)) def test_fit(self): # __doc__ (as of 2008-08-02) for pygame.rect.Rect.fit: # Rect.fit(Rect): return Rect # resize and move a rectangle with aspect ratio # # Returns a new rectangle that is moved and resized to fit another. # The aspect ratio of the original Rect is preserved, so the new # rectangle may be smaller than the target in either width or height. r = Rect(10, 10, 30, 30) r2 = Rect(30, 30, 15, 10) f = r.fit(r2) self.assertTrue(r2.contains(f)) f2 = r2.fit(r) self.assertTrue(r.contains(f2)) def test_copy(self): r = Rect(1, 2, 10, 20) c = r.copy() self.assertEqual(c, r) def test_subscript(self): r = Rect(1, 2, 3, 4) self.assertEqual(r[0], 1) self.assertEqual(r[1], 2) self.assertEqual(r[2], 3) self.assertEqual(r[3], 4) self.assertEqual(r[-1], 4) self.assertEqual(r[-2], 3) self.assertEqual(r[-4], 1) self.assertRaises(IndexError, r.__getitem__, 5) self.assertRaises(IndexError, r.__getitem__, -5) self.assertEqual(r[0:2], [1, 2]) self.assertEqual(r[0:4], [1, 2, 3, 4]) self.assertEqual(r[0:-1], [1, 2, 3]) self.assertEqual(r[:], [1, 2, 3, 4]) self.assertEqual(r[...], [1, 2, 3, 4]) self.assertEqual(r[0:4:2], [1, 3]) self.assertEqual(r[0:4:3], [1, 4]) self.assertEqual(r[3::-1], [4, 3, 2, 1]) self.assertRaises(TypeError, r.__getitem__, None) def test_ass_subscript(self): r = Rect(0, 0, 0, 0) r[...] = 1, 2, 3, 4 self.assertEqual(r, [1, 2, 3, 4]) self.assertRaises(TypeError, r.__setitem__, None, 0) self.assertEqual(r, [1, 2, 3, 4]) self.assertRaises(TypeError, r.__setitem__, 0, "") self.assertEqual(r, [1, 2, 3, 4]) self.assertRaises(IndexError, r.__setitem__, 4, 0) self.assertEqual(r, [1, 2, 3, 4]) self.assertRaises(IndexError, r.__setitem__, -5, 0) self.assertEqual(r, [1, 2, 3, 4]) r[0] = 10 self.assertEqual(r, [10, 2, 3, 4]) r[3] = 40 self.assertEqual(r, [10, 2, 3, 40]) r[-1] = 400 self.assertEqual(r, [10, 2, 3, 400]) r[-4] = 100 self.assertEqual(r, [100, 2, 3, 400]) r[1:3] = 0 self.assertEqual(r, [100, 0, 0, 400]) r[...] = 0 self.assertEqual(r, [0, 0, 0, 0]) r[:] = 9 self.assertEqual(r, [9, 9, 9, 9]) r[:] = 11, 12, 13, 14 self.assertEqual(r, [11, 12, 13, 14]) r[::-1] = r self.assertEqual(r, [14, 13, 12, 11]) def test_ass_subscript_deletion(self): r = Rect(0, 0, 0, 0) with self.assertRaises(TypeError): del r[0] with self.assertRaises(TypeError): del r[0:2] with self.assertRaises(TypeError): del r[...] def test_collection_abc(self): r = Rect(64, 70, 75, 30) self.assertTrue(isinstance(r, Collection)) self.assertFalse(isinstance(r, Sequence)) class SubclassTest(unittest.TestCase): class MyRect(Rect): def __init__(self, *args, **kwds): super(SubclassTest.MyRect, self).__init__(*args, **kwds) self.an_attribute = True def test_copy(self): mr1 = self.MyRect(1, 2, 10, 20) self.assertTrue(mr1.an_attribute) mr2 = mr1.copy() self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_move(self): mr1 = self.MyRect(1, 2, 10, 20) self.assertTrue(mr1.an_attribute) mr2 = mr1.move(1, 2) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_inflate(self): mr1 = self.MyRect(1, 2, 10, 20) self.assertTrue(mr1.an_attribute) mr2 = mr1.inflate(2, 4) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_clamp(self): mr1 = self.MyRect(19, 12, 5, 5) self.assertTrue(mr1.an_attribute) mr2 = mr1.clamp(Rect(10, 10, 10, 10)) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_clip(self): mr1 = self.MyRect(1, 2, 3, 4) self.assertTrue(mr1.an_attribute) mr2 = mr1.clip(Rect(0, 0, 3, 4)) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_union(self): mr1 = self.MyRect(1, 1, 1, 2) self.assertTrue(mr1.an_attribute) mr2 = mr1.union(Rect(-2, -2, 1, 2)) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_unionall(self): mr1 = self.MyRect(0, 0, 1, 1) self.assertTrue(mr1.an_attribute) mr2 = mr1.unionall([Rect(-2, -2, 1, 1), Rect(2, 2, 1, 1)]) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_fit(self): mr1 = self.MyRect(10, 10, 30, 30) self.assertTrue(mr1.an_attribute) mr2 = mr1.fit(Rect(30, 30, 15, 10)) self.assertTrue(isinstance(mr2, self.MyRect)) self.assertRaises(AttributeError, getattr, mr2, "an_attribute") def test_collection_abc(self): mr1 = self.MyRect(64, 70, 75, 30) self.assertTrue(isinstance(mr1, Collection)) self.assertFalse(isinstance(mr1, Sequence)) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0681257 pygame-2.6.1/test/run_tests__tests/0000755000175100001770000000000014676242436017013 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/__init__.py0000644000175100001770000000001014676242340021105 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0691257 pygame-2.6.1/test/run_tests__tests/all_ok/0000755000175100001770000000000014676242436020254 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/__init__.py0000644000175100001770000000001014676242340022346 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/fake_2_test.py0000644000175100001770000000160314676242340023006 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/fake_3_test.py0000644000175100001770000000160314676242340023007 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/fake_4_test.py0000644000175100001770000000160314676242340023010 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/fake_5_test.py0000644000175100001770000000160314676242340023011 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/fake_6_test.py0000644000175100001770000000160314676242340023012 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/no_assertions__ret_code_of_1__test.py0000644000175100001770000000143514676242340027616 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): pass def test_get_mods(self): pass def test_get_pressed(self): pass def test_name(self): pass def test_set_mods(self): pass def test_set_repeat(self): pass if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/all_ok/zero_tests_test.py0000644000175100001770000000104114676242340024054 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): pass if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0691257 pygame-2.6.1/test/run_tests__tests/everything/0000755000175100001770000000000014676242436021177 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/everything/__init__.py0000644000175100001770000000001014676242340023271 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/everything/fake_2_test.py0000644000175100001770000000160314676242340023731 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/everything/incomplete_todo_test.py0000644000175100001770000000161514676242340025771 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def todo_test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def todo_test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/everything/magic_tag_test.py0000644000175100001770000000153314676242340024517 0ustar00runnerdocker__tags__ = ["magic"] if __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/everything/sleep_test.py0000644000175100001770000000131314676242340023710 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest import time class KeyModuleTest(unittest.TestCase): def test_get_focused(self): stop_time = time.time() + 10.0 while time.time() < stop_time: time.sleep(1) self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0691257 pygame-2.6.1/test/run_tests__tests/exclude/0000755000175100001770000000000014676242436020444 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/exclude/__init__.py0000644000175100001770000000001014676242340022536 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/exclude/fake_2_test.py0000644000175100001770000000160314676242340023176 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/exclude/invisible_tag_test.py0000644000175100001770000000163514676242340024673 0ustar00runnerdocker__tags__ = ["invisible"] if __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/exclude/magic_tag_test.py0000644000175100001770000000153314676242340023764 0ustar00runnerdocker__tags__ = ["magic"] if __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0691257 pygame-2.6.1/test/run_tests__tests/failures1/0000755000175100001770000000000014676242436020706 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/failures1/__init__.py0000644000175100001770000000001014676242340023000 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/failures1/fake_2_test.py0000644000175100001770000000160314676242340023440 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/failures1/fake_3_test.py0000644000175100001770000000160314676242340023441 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/failures1/fake_4_test.py0000644000175100001770000000166514676242340023452 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(False, "Some Jibberish") def test_name(self): self.assertTrue(True) def test_set_mods(self): if 1: if 1: assert False def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0701256 pygame-2.6.1/test/run_tests__tests/incomplete/0000755000175100001770000000000014676242436021152 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/incomplete/__init__.py0000644000175100001770000000001014676242340023244 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/incomplete/fake_2_test.py0000644000175100001770000000157114676242340023710 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def todo_test_get_pressed(self): self.fail() def test_name(self): self.assertTrue(True) def todo_test_set_mods(self): self.fail() def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0281117 pygame-2.6.1/test/run_tests__tests/incomplete/fake_3_test.py0000644000175100001770000000160314676242340023705 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0701256 pygame-2.6.1/test/run_tests__tests/incomplete_todo/0000755000175100001770000000000014676242436022177 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/incomplete_todo/__init__.py0000644000175100001770000000001014676242340024271 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/incomplete_todo/fake_2_test.py0000644000175100001770000000161514676242340024734 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def todo_test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def todo_test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/incomplete_todo/fake_3_test.py0000644000175100001770000000160314676242340024732 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0701256 pygame-2.6.1/test/run_tests__tests/infinite_loop/0000755000175100001770000000000014676242436021651 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/infinite_loop/__init__.py0000644000175100001770000000001014676242340023743 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/infinite_loop/fake_1_test.py0000644000175100001770000000161214676242340024402 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): while True: pass def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/infinite_loop/fake_2_test.py0000644000175100001770000000160314676242340024403 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0701256 pygame-2.6.1/test/run_tests__tests/print_stderr/0000755000175100001770000000000014676242436021532 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stderr/__init__.py0000644000175100001770000000001014676242340023624 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stderr/fake_2_test.py0000644000175100001770000000160314676242340024264 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stderr/fake_3_test.py0000644000175100001770000000167214676242340024273 0ustar00runnerdockerimport sys if __name__ == "__main__": import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): sys.stderr.write("jibberish messes things up\n") self.assertTrue(False) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stderr/fake_4_test.py0000644000175100001770000000166514676242340024276 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(False, "Some Jibberish") def test_name(self): self.assertTrue(True) def test_set_mods(self): if 1: if 1: assert False def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0711257 pygame-2.6.1/test/run_tests__tests/print_stdout/0000755000175100001770000000000014676242436021551 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stdout/__init__.py0000644000175100001770000000001014676242340023643 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stdout/fake_2_test.py0000644000175100001770000000160314676242340024303 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stdout/fake_3_test.py0000644000175100001770000000176414676242340024314 0ustar00runnerdockerimport sys if __name__ == "__main__": import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): sys.stdout.write("jibberish ruins everything\n") self.assertTrue(False) def test_name(self): sys.stdout.write("forgot to remove debug crap\n") self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/print_stdout/fake_4_test.py0000644000175100001770000000166514676242340024315 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(False, "Some Jibberish") def test_name(self): self.assertTrue(True) def test_set_mods(self): if 1: if 1: assert False def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/run_tests__test.py0000644000175100001770000001033314676242340022603 0ustar00runnerdocker################################################################################ import subprocess, os, sys, re, difflib ################################################################################ IGNORE = (".svn", "infinite_loop") NORMALIZERS = ( (r"Ran (\d+) tests in (\d+\.\d+)s", "Ran \\1 tests in X.XXXs"), (r'File ".*?([^/\\.]+\.py)"', 'File "\\1"'), ) ################################################################################ def norm_result(result): "normalize differences, such as timing between output" for normalizer, replacement in NORMALIZERS: if hasattr(normalizer, "__call__"): result = normalizer(result) else: result = re.sub(normalizer, replacement, result) return result def call_proc(cmd, cd=None): proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cd, universal_newlines=True, ) if proc.wait(): print(f"{cmd} {proc.wait()}") raise Exception(proc.stdout.read()) return proc.stdout.read() ################################################################################ unnormed_diff = "-u" in sys.argv verbose = "-v" in sys.argv or unnormed_diff if "-h" in sys.argv or "--help" in sys.argv: sys.exit( "\nCOMPARES OUTPUT OF SINGLE VS SUBPROCESS MODE OF RUN_TESTS.PY\n\n" "-v, to output diffs even on success\n" "-u, to output diffs of unnormalized tests\n\n" "Each line of a Differ delta begins with a two-letter code:\n\n" " '- ' line unique to sequence 1\n" " '+ ' line unique to sequence 2\n" " ' ' line common to both sequences\n" " '? ' line not present in either input sequence\n" ) main_dir = os.path.split(os.path.abspath(sys.argv[0]))[0] trunk_dir = os.path.normpath(os.path.join(main_dir, "../../")) test_suite_dirs = [ x for x in os.listdir(main_dir) if os.path.isdir(os.path.join(main_dir, x)) and x not in IGNORE ] ################################################################################ def assert_on_results(suite, single, sub): test = globals().get(f"{suite}_test") if hasattr(test, "__call_"): test(suite, single, sub) print(f"assertions on {suite} OK") # Don't modify tests in suites below. These assertions are in place to make sure # that tests are actually being ran def all_ok_test(suite, *args): for results in args: assert "Ran 36 tests" in results # some tests are running assert "OK" in results # OK def failures1_test(suite, *args): for results in args: assert "FAILED (failures=2)" in results assert "Ran 18 tests" in results ################################################################################ # Test that output is the same in single process and subprocess modes # base_cmd = [sys.executable, "run_tests.py", "-i"] cmd = base_cmd + ["-n", "-f"] sub_cmd = base_cmd + ["-f"] time_out_cmd = base_cmd + ["-t", "4", "-f", "infinite_loop"] passes = 0 failed = False for suite in test_suite_dirs: single = call_proc(cmd + [suite], trunk_dir) subs = call_proc(sub_cmd + [suite], trunk_dir) normed_single, normed_subs = map(norm_result, (single, subs)) failed = normed_single != normed_subs if failed: print(f"{suite} suite comparison FAILED\n") else: passes += 1 print(f"{suite} suite comparison OK") assert_on_results(suite, single, subs) if verbose or failed: print("difflib.Differ().compare(single, suprocessed):\n") print( "".join( list( difflib.Differ().compare( (unnormed_diff and single or normed_single).splitlines(1), (unnormed_diff and subs or normed_subs).splitlines(1), ) ) ) ) sys.stdout.write("infinite_loop suite (subprocess mode timeout) ") loop_test = call_proc(time_out_cmd, trunk_dir) assert "successfully terminated" in loop_test passes += 1 print("OK") print(f"\n{passes}/{len(test_suite_dirs) + 1} suites pass") print("\n-h for help") ################################################################################ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0711257 pygame-2.6.1/test/run_tests__tests/timeout/0000755000175100001770000000000014676242436020501 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/timeout/__init__.py0000644000175100001770000000001014676242340022573 0ustar00runnerdocker# empty ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/timeout/fake_2_test.py0000644000175100001770000000160314676242340023233 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest class KeyModuleTest(unittest.TestCase): def test_get_focused(self): self.assertTrue(True) def test_get_mods(self): self.assertTrue(True) def test_get_pressed(self): self.assertTrue(True) def test_name(self): self.assertTrue(True) def test_set_mods(self): self.assertTrue(True) def test_set_repeat(self): self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/run_tests__tests/timeout/sleep_test.py0000644000175100001770000000131414676242340023213 0ustar00runnerdockerif __name__ == "__main__": import sys import os pkg_dir = os.path.split( os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] )[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import unittest import time class KeyModuleTest(unittest.TestCase): def test_get_focused(self): stop_time = time.time() + 10.0 while time.time() < stop_time: time.sleep(1) self.assertTrue(True) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/rwobject_test.py0000644000175100001770000001034314676242340016627 0ustar00runnerdockerimport pathlib import unittest from pygame import encode_string, encode_file_path class RWopsEncodeStringTest(unittest.TestCase): global getrefcount def test_obj_None(self): encoded_string = encode_string(None) self.assertIsNone(encoded_string) def test_returns_bytes(self): u = "Hello" encoded_string = encode_string(u) self.assertIsInstance(encoded_string, bytes) def test_obj_bytes(self): b = b"encyclop\xE6dia" encoded_string = encode_string(b, "ascii", "strict") self.assertIs(encoded_string, b) def test_encode_unicode(self): u = "\u00DEe Olde Komp\u00FCter Shoppe" b = u.encode("utf-8") self.assertEqual(encode_string(u, "utf-8"), b) def test_error_fowarding(self): self.assertRaises(SyntaxError, encode_string) def test_errors(self): u = "abc\u0109defg\u011Dh\u0125ij\u0135klmnoprs\u015Dtu\u016Dvz" b = u.encode("ascii", "ignore") self.assertEqual(encode_string(u, "ascii", "ignore"), b) def test_encoding_error(self): u = "a\x80b" encoded_string = encode_string(u, "ascii", "strict") self.assertIsNone(encoded_string) def test_check_defaults(self): u = "a\u01F7b" b = u.encode("unicode_escape", "backslashreplace") encoded_string = encode_string(u) self.assertEqual(encoded_string, b) def test_etype(self): u = "a\x80b" self.assertRaises(SyntaxError, encode_string, u, "ascii", "strict", SyntaxError) def test_etype__invalid(self): """Ensures invalid etypes are properly handled.""" for etype in ("SyntaxError", self): self.assertRaises(TypeError, encode_string, "test", etype=etype) def test_string_with_null_bytes(self): b = b"a\x00b\x00c" encoded_string = encode_string(b, etype=SyntaxError) encoded_decode_string = encode_string(b.decode(), "ascii", "strict") self.assertIs(encoded_string, b) self.assertEqual(encoded_decode_string, b) try: from sys import getrefcount as _g getrefcount = _g # This nonsense is for Python 3.x except ImportError: pass else: def test_refcount(self): bpath = b" This is a string that is not cached."[1:] upath = bpath.decode("ascii") before = getrefcount(bpath) bpath = encode_string(bpath) self.assertEqual(getrefcount(bpath), before) bpath = encode_string(upath) self.assertEqual(getrefcount(bpath), before) def test_smp(self): utf_8 = b"a\xF0\x93\x82\xA7b" u = "a\U000130A7b" b = encode_string(u, "utf-8", "strict", AssertionError) self.assertEqual(b, utf_8) def test_pathlib_obj(self): """Test loading string representation of pathlib object""" """ We do this because pygame functions internally use pg_EncodeString to decode the filenames passed to them. So if we test that here, we can safely assume that all those functions do not have any issues with pathlib objects """ encoded = encode_string(pathlib.PurePath("foo"), "utf-8") self.assertEqual(encoded, b"foo") encoded = encode_string(pathlib.Path("baz")) self.assertEqual(encoded, b"baz") class RWopsEncodeFilePathTest(unittest.TestCase): # Most tests can be skipped since RWopsEncodeFilePath wraps # RWopsEncodeString def test_encoding(self): u = "Hello" encoded_file_path = encode_file_path(u) self.assertIsInstance(encoded_file_path, bytes) def test_error_fowarding(self): self.assertRaises(SyntaxError, encode_file_path) def test_path_with_null_bytes(self): b = b"a\x00b\x00c" encoded_file_path = encode_file_path(b) self.assertIsNone(encoded_file_path) def test_etype(self): b = b"a\x00b\x00c" self.assertRaises(TypeError, encode_file_path, b, TypeError) def test_etype__invalid(self): """Ensures invalid etypes are properly handled.""" for etype in ("SyntaxError", self): self.assertRaises(TypeError, encode_file_path, "test", etype) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/scrap_tags.py0000644000175100001770000000123714676242340016101 0ustar00runnerdocker__tags__ = ["ignore", "subprocess_ignore"] # TODO: make scrap_test.py work # This test used to work only on linux and windows. # Currently it only work in windows, and in linux it throws: # `pygame.error: content could not be placed in clipboard.` # The old test and tags kept here for reference when fixing. # import sys # # exclude = False # # if sys.platform == "win32" or sys.platform.startswith("linux"): # try: # import pygame # # pygame.scrap._NOT_IMPLEMENTED_ # except AttributeError: # pass # else: # exclude = True # else: # exclude = True # # if exclude: # __tags__.extend(["ignore", "subprocess_ignore"]) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/scrap_test.py0000644000175100001770000002171014676242340016120 0ustar00runnerdockerimport os import sys if os.environ.get("SDL_VIDEODRIVER") == "dummy": __tags__ = ("ignore", "subprocess_ignore") import unittest from pygame.tests.test_utils import trunk_relative_path import pygame from pygame import scrap class ScrapModuleTest(unittest.TestCase): @classmethod def setUpClass(cls): pygame.display.init() pygame.display.set_mode((1, 1)) scrap.init() @classmethod def tearDownClass(cls): # scrap.quit() # Does not exist! pygame.display.quit() def test_init(self): """Ensures scrap module still initialized after multiple init calls.""" scrap.init() scrap.init() self.assertTrue(scrap.get_init()) def test_init__reinit(self): """Ensures reinitializing the scrap module doesn't clear its data.""" data_type = pygame.SCRAP_TEXT expected_data = b"test_init__reinit" scrap.put(data_type, expected_data) scrap.init() self.assertEqual(scrap.get(data_type), expected_data) def test_get_init(self): """Ensures get_init gets the init state.""" self.assertTrue(scrap.get_init()) def todo_test_contains(self): """Ensures contains works as expected.""" self.fail() def todo_test_get(self): """Ensures get works as expected.""" self.fail() def test_get__owned_empty_type(self): """Ensures get works when there is no data of the requested type in the clipboard and the clipboard is owned by the pygame application. """ # Use a unique data type identifier to ensure there is no preexisting # data. DATA_TYPE = "test_get__owned_empty_type" if scrap.lost(): # Try to acquire the clipboard. scrap.put(pygame.SCRAP_TEXT, b"text to clipboard") if scrap.lost(): self.skipTest("requires the pygame application to own the clipboard") data = scrap.get(DATA_TYPE) self.assertIsNone(data) def todo_test_get_types(self): """Ensures get_types works as expected.""" self.fail() def todo_test_lost(self): """Ensures lost works as expected.""" self.fail() def test_set_mode(self): """Ensures set_mode works as expected.""" scrap.set_mode(pygame.SCRAP_SELECTION) scrap.set_mode(pygame.SCRAP_CLIPBOARD) self.assertRaises(ValueError, scrap.set_mode, 1099) def test_put__text(self): """Ensures put can place text into the clipboard.""" scrap.put(pygame.SCRAP_TEXT, b"Hello world") self.assertEqual(scrap.get(pygame.SCRAP_TEXT), b"Hello world") scrap.put(pygame.SCRAP_TEXT, b"Another String") self.assertEqual(scrap.get(pygame.SCRAP_TEXT), b"Another String") @unittest.skipIf("pygame.image" not in sys.modules, "requires pygame.image module") def test_put__bmp_image(self): """Ensures put can place a BMP image into the clipboard.""" sf = pygame.image.load(trunk_relative_path("examples/data/asprite.bmp")) expected_string = pygame.image.tostring(sf, "RGBA") scrap.put(pygame.SCRAP_BMP, expected_string) self.assertEqual(scrap.get(pygame.SCRAP_BMP), expected_string) def test_put(self): """Ensures put can place data into the clipboard when using a user defined type identifier. """ DATA_TYPE = "arbitrary buffer" scrap.put(DATA_TYPE, b"buf") r = scrap.get(DATA_TYPE) self.assertEqual(r, b"buf") class ScrapModuleClipboardNotOwnedTest(unittest.TestCase): """Test the scrap module's functionality when the pygame application is not the current owner of the clipboard. A separate class is used to prevent tests that acquire the clipboard from interfering with these tests. """ @classmethod def setUpClass(cls): pygame.display.init() pygame.display.set_mode((1, 1)) scrap.init() @classmethod def tearDownClass(cls): # scrap.quit() # Does not exist! pygame.quit() pygame.display.quit() def _skip_if_clipboard_owned(self): # Skip test if the pygame application owns the clipboard. Currently, # there is no way to give up ownership. if not scrap.lost(): self.skipTest("requires the pygame application to not own the clipboard") def test_get__not_owned(self): """Ensures get works when there is no data of the requested type in the clipboard and the clipboard is not owned by the pygame application. """ self._skip_if_clipboard_owned() # Use a unique data type identifier to ensure there is no preexisting # data. DATA_TYPE = "test_get__not_owned" data = scrap.get(DATA_TYPE) self.assertIsNone(data) def test_get_types__not_owned(self): """Ensures get_types works when the clipboard is not owned by the pygame application. """ self._skip_if_clipboard_owned() data_types = scrap.get_types() self.assertIsInstance(data_types, list) def test_contains__not_owned(self): """Ensures contains works when the clipboard is not owned by the pygame application. """ self._skip_if_clipboard_owned() # Use a unique data type identifier to ensure there is no preexisting # data. DATA_TYPE = "test_contains__not_owned" contains = scrap.contains(DATA_TYPE) self.assertFalse(contains) def test_lost__not_owned(self): """Ensures lost works when the clipboard is not owned by the pygame application. """ self._skip_if_clipboard_owned() lost = scrap.lost() self.assertTrue(lost) class X11InteractiveTest(unittest.TestCase): __tags__ = ["ignore", "subprocess_ignore"] try: pygame.display.init() except Exception: pass else: if pygame.display.get_driver() == "x11": __tags__ = ["interactive"] pygame.display.quit() def test_issue_208(self): """PATCH: pygame.scrap on X11, fix copying into PRIMARY selection Copying into theX11 PRIMARY selection (mouse copy/paste) would not work due to a confusion between content type and clipboard type. """ from pygame import display, event, freetype from pygame.locals import SCRAP_SELECTION, SCRAP_TEXT from pygame.locals import KEYDOWN, K_y, QUIT success = False freetype.init() font = freetype.Font(None, 24) display.init() display.set_caption("Interactive X11 Paste Test") screen = display.set_mode((600, 200)) screen.fill(pygame.Color("white")) text = "Scrap put() succeeded." msg = ( "Some text has been placed into the X11 clipboard." " Please click the center mouse button in an open" " text window to retrieve it." '\n\nDid you get "{}"? (y/n)' ).format(text) word_wrap(screen, msg, font, 6) display.flip() event.pump() scrap.init() scrap.set_mode(SCRAP_SELECTION) scrap.put(SCRAP_TEXT, text.encode("UTF-8")) while True: e = event.wait() if e.type == QUIT: break if e.type == KEYDOWN: success = e.key == K_y break pygame.display.quit() self.assertTrue(success) def word_wrap(surf, text, font, margin=0, color=(0, 0, 0)): font.origin = True surf_width, surf_height = surf.get_size() width = surf_width - 2 * margin height = surf_height - 2 * margin line_spacing = int(1.25 * font.get_sized_height()) x, y = margin, margin + line_spacing space = font.get_rect(" ") for word in iwords(text): if word == "\n": x, y = margin, y + line_spacing else: bounds = font.get_rect(word) if x + bounds.width + bounds.x >= width: x, y = margin, y + line_spacing if x + bounds.width + bounds.x >= width: raise ValueError("word too wide for the surface") if y + bounds.height - bounds.y >= height: raise ValueError("text to long for the surface") font.render_to(surf, (x, y), None, color) x += bounds.width + space.width return x, y def iwords(text): # r"\n|[^ ]+" # head = 0 tail = head end = len(text) while head < end: if text[head] == " ": head += 1 tail = head + 1 elif text[head] == "\n": head += 1 yield "\n" tail = head + 1 elif tail == end: yield text[head:] head = end elif text[tail] == "\n": yield text[head:tail] head = tail elif text[tail] == " ": yield text[head:tail] head = tail else: tail += 1 if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/sndarray_tags.py0000644000175100001770000000027614676242340016616 0ustar00runnerdocker__tags__ = ["array"] exclude = False try: import pygame.mixer import numpy except ImportError: exclude = True if exclude: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/sndarray_test.py0000644000175100001770000001422214676242340016633 0ustar00runnerdockerimport unittest from numpy import int8, int16, uint8, uint16, float32, array, all as alltrue import pygame import pygame.sndarray class SndarrayTest(unittest.TestCase): array_dtypes = {8: uint8, -8: int8, 16: uint16, -16: int16, 32: float32} def _assert_compatible(self, arr, size): dtype = self.array_dtypes[size] self.assertEqual(arr.dtype, dtype) def test_array(self): def check_array(size, channels, test_data): try: pygame.mixer.init(22050, size, channels, allowedchanges=0) except pygame.error: # Not all sizes are supported on all systems. return try: __, sz, __ = pygame.mixer.get_init() if sz == size: srcarr = array(test_data, self.array_dtypes[size]) snd = pygame.sndarray.make_sound(srcarr) arr = pygame.sndarray.array(snd) self._assert_compatible(arr, size) self.assertTrue( alltrue(arr == srcarr), "size: %i\n%s\n%s" % (size, arr, test_data), ) finally: pygame.mixer.quit() check_array(8, 1, [0, 0x0F, 0xF0, 0xFF]) check_array(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [0xFF, 0x40]]) check_array(16, 1, [0, 0x00FF, 0xFF00, 0xFFFF]) check_array( 16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]] ) check_array(-8, 1, [0, -0x80, 0x7F, 0x64]) check_array(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]]) check_array(-16, 1, [0, 0x7FFF, -0x7FFF, -1]) check_array(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]]) def test_get_arraytype(self): array_type = pygame.sndarray.get_arraytype() self.assertEqual(array_type, "numpy", f"unknown array type {array_type}") def test_get_arraytypes(self): arraytypes = pygame.sndarray.get_arraytypes() self.assertIn("numpy", arraytypes) for atype in arraytypes: self.assertEqual(atype, "numpy", f"unknown array type {atype}") def test_make_sound(self): def check_sound(size, channels, test_data): try: pygame.mixer.init(22050, size, channels, allowedchanges=0) except pygame.error: # Not all sizes are supported on all systems. return try: __, sz, __ = pygame.mixer.get_init() if sz == size: srcarr = array(test_data, self.array_dtypes[size]) snd = pygame.sndarray.make_sound(srcarr) arr = pygame.sndarray.samples(snd) self.assertTrue( alltrue(arr == srcarr), "size: %i\n%s\n%s" % (size, arr, test_data), ) finally: pygame.mixer.quit() check_sound(8, 1, [0, 0x0F, 0xF0, 0xFF]) check_sound(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [125, 0x40]]) check_sound(16, 1, [0, 0x00FF, 0xFF00, 0xFFFF]) check_sound( 16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]] ) check_sound(-8, 1, [0, -0x80, 0x7F, 0x64]) check_sound(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]]) check_sound(-16, 1, [0, 0x7FFF, -0x7FFF, -1]) check_sound(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]]) check_sound(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]]) def test_samples(self): null_byte = b"\x00" def check_sample(size, channels, test_data): try: pygame.mixer.init(22050, size, channels, allowedchanges=0) except pygame.error: # Not all sizes are supported on all systems. return try: __, sz, __ = pygame.mixer.get_init() if sz == size: zeroed = null_byte * ((abs(size) // 8) * len(test_data) * channels) snd = pygame.mixer.Sound(buffer=zeroed) samples = pygame.sndarray.samples(snd) self._assert_compatible(samples, size) ##print('X %s' % (samples.shape,)) ##print('Y %s' % (test_data,)) samples[...] = test_data arr = pygame.sndarray.array(snd) self.assertTrue( alltrue(samples == arr), "size: %i\n%s\n%s" % (size, arr, test_data), ) finally: pygame.mixer.quit() check_sample(8, 1, [0, 0x0F, 0xF0, 0xFF]) check_sample(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [0xFF, 0x40]]) check_sample(16, 1, [0, 0x00FF, 0xFF00, 0xFFFF]) check_sample( 16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]] ) check_sample(-8, 1, [0, -0x80, 0x7F, 0x64]) check_sample(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]]) check_sample(-16, 1, [0, 0x7FFF, -0x7FFF, -1]) check_sample(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]]) check_sample(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]]) def test_use_arraytype(self): def do_use_arraytype(atype): pygame.sndarray.use_arraytype(atype) pygame.sndarray.use_arraytype("numpy") self.assertEqual(pygame.sndarray.get_arraytype(), "numpy") self.assertRaises(ValueError, do_use_arraytype, "not an option") def test_float32(self): """sized arrays work with Sounds and 32bit float arrays.""" try: pygame.mixer.init(22050, 32, 2, allowedchanges=0) except pygame.error: # Not all sizes are supported on all systems. self.skipTest("unsupported mixer configuration") arr = array([[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]], float32) newsound = pygame.mixer.Sound(array=arr) pygame.mixer.quit() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0291119 pygame-2.6.1/test/sprite_test.py0000644000175100001770000013415214676242340016323 0ustar00runnerdocker#################################### IMPORTS ################################### import unittest import pygame from pygame import sprite ################################# MODULE LEVEL ################################# class SpriteModuleTest(unittest.TestCase): pass ######################### SPRITECOLLIDE FUNCTIONS TEST ######################### class SpriteCollideTest(unittest.TestCase): def setUp(self): self.ag = sprite.AbstractGroup() self.ag2 = sprite.AbstractGroup() self.s1 = sprite.Sprite(self.ag) self.s2 = sprite.Sprite(self.ag2) self.s3 = sprite.Sprite(self.ag2) self.s1.image = pygame.Surface((50, 10), pygame.SRCALPHA, 32) self.s2.image = pygame.Surface((10, 10), pygame.SRCALPHA, 32) self.s3.image = pygame.Surface((10, 10), pygame.SRCALPHA, 32) self.s1.rect = self.s1.image.get_rect() self.s2.rect = self.s2.image.get_rect() self.s3.rect = self.s3.image.get_rect() self.s2.rect.move_ip(40, 0) self.s3.rect.move_ip(100, 100) def test_spritecollide__works_if_collided_cb_is_None(self): # Test that sprites collide without collided function. self.assertEqual( sprite.spritecollide(self.s1, self.ag2, dokill=False, collided=None), [self.s2], ) def test_spritecollide__works_if_collided_cb_not_passed(self): # Should also work when collided function isn't passed at all. self.assertEqual( sprite.spritecollide(self.s1, self.ag2, dokill=False), [self.s2] ) def test_spritecollide__collided_must_be_a_callable(self): # Need to pass a callable. self.assertRaises( TypeError, sprite.spritecollide, self.s1, self.ag2, dokill=False, collided=1 ) def test_spritecollide__collided_defaults_to_collide_rect(self): # collide_rect should behave the same as default. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_rect ), [self.s2], ) def test_collide_rect_ratio__ratio_of_one_like_default(self): # collide_rect_ratio should behave the same as default at a 1.0 ratio. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_rect_ratio(1.0) ), [self.s2], ) def test_collide_rect_ratio__collides_all_at_ratio_of_twenty(self): # collide_rect_ratio should collide all at a 20.0 ratio. collided_func = sprite.collide_rect_ratio(20.0) expected_sprites = sorted(self.ag2.sprites(), key=id) collided_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) self.assertListEqual(collided_sprites, expected_sprites) def test_collide_circle__no_radius_set(self): # collide_circle with no radius set. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_circle ), [self.s2], ) def test_collide_circle_ratio__no_radius_and_ratio_of_one(self): # collide_circle_ratio with no radius set, at a 1.0 ratio. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_circle_ratio(1.0), ), [self.s2], ) def test_collide_circle_ratio__no_radius_and_ratio_of_twenty(self): # collide_circle_ratio with no radius set, at a 20.0 ratio. collided_func = sprite.collide_circle_ratio(20.0) expected_sprites = sorted(self.ag2.sprites(), key=id) collided_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) self.assertListEqual(expected_sprites, collided_sprites) def test_collide_circle__radius_set_by_collide_circle_ratio(self): # Call collide_circle_ratio with no radius set, at a 20.0 ratio. # That should return group ag2 AND set the radius attribute of the # sprites in such a way that collide_circle would give same result as # if it had been called without the radius being set. collided_func = sprite.collide_circle_ratio(20.0) sprite.spritecollide(self.s1, self.ag2, dokill=False, collided=collided_func) self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_circle ), [self.s2], ) def test_collide_circle_ratio__no_radius_and_ratio_of_two_twice(self): # collide_circle_ratio with no radius set, at a 2.0 ratio, # called twice to check if the bug where the calculated radius # is not stored correctly in the radius attribute of each sprite. collided_func = sprite.collide_circle_ratio(2.0) # Calling collide_circle_ratio will set the radius attribute of the # sprites. If an incorrect value is stored then we will not get the # same result next time it is called: expected_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) collided_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) self.assertListEqual(expected_sprites, collided_sprites) def test_collide_circle__with_radii_set(self): # collide_circle with a radius set. self.s1.radius = 50 self.s2.radius = 10 self.s3.radius = 400 collided_func = sprite.collide_circle expected_sprites = sorted(self.ag2.sprites(), key=id) collided_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) self.assertListEqual(expected_sprites, collided_sprites) def test_collide_circle_ratio__with_radii_set(self): # collide_circle_ratio with a radius set. self.s1.radius = 50 self.s2.radius = 10 self.s3.radius = 400 collided_func = sprite.collide_circle_ratio(0.5) expected_sprites = sorted(self.ag2.sprites(), key=id) collided_sprites = sorted( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=collided_func ), key=id, ) self.assertListEqual(expected_sprites, collided_sprites) def test_collide_mask__opaque(self): # make some fully opaque sprites that will collide with masks. self.s1.image.fill((255, 255, 255, 255)) self.s2.image.fill((255, 255, 255, 255)) self.s3.image.fill((255, 255, 255, 255)) # masks should be autogenerated from image if they don't exist. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_mask ), [self.s2], ) self.s1.mask = pygame.mask.from_surface(self.s1.image) self.s2.mask = pygame.mask.from_surface(self.s2.image) self.s3.mask = pygame.mask.from_surface(self.s3.image) # with set masks. self.assertEqual( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_mask ), [self.s2], ) def test_collide_mask__transparent(self): # make some sprites that are fully transparent, so they won't collide. self.s1.image.fill((255, 255, 255, 0)) self.s2.image.fill((255, 255, 255, 0)) self.s3.image.fill((255, 255, 255, 0)) self.s1.mask = pygame.mask.from_surface(self.s1.image, 255) self.s2.mask = pygame.mask.from_surface(self.s2.image, 255) self.s3.mask = pygame.mask.from_surface(self.s3.image, 255) self.assertFalse( sprite.spritecollide( self.s1, self.ag2, dokill=False, collided=sprite.collide_mask ) ) def test_spritecollideany__without_collided_callback(self): # pygame.sprite.spritecollideany(sprite, group) -> sprite # finds any sprites that collide # if collided is not passed, all # sprites must have a "rect" value, which is a # rectangle of the sprite area, which will be used # to calculate the collision. # s2 in, s3 out expected_sprite = self.s2 collided_sprite = sprite.spritecollideany(self.s1, self.ag2) self.assertEqual(collided_sprite, expected_sprite) # s2 and s3 out self.s2.rect.move_ip(0, 10) collided_sprite = sprite.spritecollideany(self.s1, self.ag2) self.assertIsNone(collided_sprite) # s2 out, s3 in self.s3.rect.move_ip(-105, -105) expected_sprite = self.s3 collided_sprite = sprite.spritecollideany(self.s1, self.ag2) self.assertEqual(collided_sprite, expected_sprite) # s2 and s3 in self.s2.rect.move_ip(0, -10) expected_sprite_choices = self.ag2.sprites() collided_sprite = sprite.spritecollideany(self.s1, self.ag2) self.assertIn(collided_sprite, expected_sprite_choices) def test_spritecollideany__with_collided_callback(self): # pygame.sprite.spritecollideany(sprite, group) -> sprite # finds any sprites that collide # collided is a callback function used to calculate if # two sprites are colliding. it should take two sprites # as values, and return a bool value indicating if # they are colliding. # This collision test can be faster than pygame.sprite.spritecollide() # since it has less work to do. arg_dict_a = {} arg_dict_b = {} return_container = [True] # This function is configurable using the mutable default arguments! def collided_callback( spr_a, spr_b, arg_dict_a=arg_dict_a, arg_dict_b=arg_dict_b, return_container=return_container, ): count = arg_dict_a.get(spr_a, 0) arg_dict_a[spr_a] = 1 + count count = arg_dict_b.get(spr_b, 0) arg_dict_b[spr_b] = 1 + count return return_container[0] # This should return a sprite from self.ag2 because the callback # function (collided_callback()) currently returns True. expected_sprite_choices = self.ag2.sprites() collided_sprite = sprite.spritecollideany(self.s1, self.ag2, collided_callback) self.assertIn(collided_sprite, expected_sprite_choices) # The callback function should have been called only once, so self.s1 # should have only been passed as an argument once self.assertEqual(len(arg_dict_a), 1) self.assertEqual(arg_dict_a[self.s1], 1) # The callback function should have been called only once, so self.s2 # exclusive-or self.s3 should have only been passed as an argument # once self.assertEqual(len(arg_dict_b), 1) self.assertEqual(list(arg_dict_b.values())[0], 1) self.assertTrue(self.s2 in arg_dict_b or self.s3 in arg_dict_b) arg_dict_a.clear() arg_dict_b.clear() return_container[0] = False # This should return None because the callback function # (collided_callback()) currently returns False. collided_sprite = sprite.spritecollideany(self.s1, self.ag2, collided_callback) self.assertIsNone(collided_sprite) # The callback function should have been called as many times as # there are sprites in self.ag2 self.assertEqual(len(arg_dict_a), 1) self.assertEqual(arg_dict_a[self.s1], len(self.ag2)) self.assertEqual(len(arg_dict_b), len(self.ag2)) # Each sprite in self.ag2 should be called once. for s in self.ag2: self.assertEqual(arg_dict_b[s], 1) def test_groupcollide__without_collided_callback(self): # pygame.sprite.groupcollide(groupa, groupb, dokilla, dokillb) -> dict # collision detection between group and group # test no kill expected_dict = {self.s1: [self.s2]} crashed = pygame.sprite.groupcollide(self.ag, self.ag2, False, False) self.assertDictEqual(expected_dict, crashed) crashed = pygame.sprite.groupcollide(self.ag, self.ag2, False, False) self.assertDictEqual(expected_dict, crashed) # Test dokill2=True (kill colliding sprites in second group). crashed = pygame.sprite.groupcollide(self.ag, self.ag2, False, True) self.assertDictEqual(expected_dict, crashed) expected_dict = {} crashed = pygame.sprite.groupcollide(self.ag, self.ag2, False, False) self.assertDictEqual(expected_dict, crashed) # Test dokill1=True (kill colliding sprites in first group). self.s3.rect.move_ip(-100, -100) expected_dict = {self.s1: [self.s3]} crashed = pygame.sprite.groupcollide(self.ag, self.ag2, True, False) self.assertDictEqual(expected_dict, crashed) expected_dict = {} crashed = pygame.sprite.groupcollide(self.ag, self.ag2, False, False) self.assertDictEqual(expected_dict, crashed) def test_groupcollide__with_collided_callback(self): collided_callback_true = lambda spr_a, spr_b: True collided_callback_false = lambda spr_a, spr_b: False # test no kill expected_dict = {} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, False, collided_callback_false ) self.assertDictEqual(expected_dict, crashed) expected_dict = {self.s1: sorted(self.ag2.sprites(), key=id)} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, False, collided_callback_true ) for value in crashed.values(): value.sort(key=id) self.assertDictEqual(expected_dict, crashed) # expected_dict is the same again for this collide crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, False, collided_callback_true ) for value in crashed.values(): value.sort(key=id) self.assertDictEqual(expected_dict, crashed) # Test dokill2=True (kill colliding sprites in second group). expected_dict = {} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, True, collided_callback_false ) self.assertDictEqual(expected_dict, crashed) expected_dict = {self.s1: sorted(self.ag2.sprites(), key=id)} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, True, collided_callback_true ) for value in crashed.values(): value.sort(key=id) self.assertDictEqual(expected_dict, crashed) expected_dict = {} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, False, True, collided_callback_true ) self.assertDictEqual(expected_dict, crashed) # Test dokill1=True (kill colliding sprites in first group). self.ag.add(self.s2) self.ag2.add(self.s3) expected_dict = {} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, True, False, collided_callback_false ) self.assertDictEqual(expected_dict, crashed) expected_dict = {self.s1: [self.s3], self.s2: [self.s3]} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, True, False, collided_callback_true ) self.assertDictEqual(expected_dict, crashed) expected_dict = {} crashed = pygame.sprite.groupcollide( self.ag, self.ag2, True, False, collided_callback_true ) self.assertDictEqual(expected_dict, crashed) def test_collide_rect(self): # Test colliding - some edges touching self.assertTrue(pygame.sprite.collide_rect(self.s1, self.s2)) self.assertTrue(pygame.sprite.collide_rect(self.s2, self.s1)) # Test colliding - all edges touching self.s2.rect.center = self.s3.rect.center self.assertTrue(pygame.sprite.collide_rect(self.s2, self.s3)) self.assertTrue(pygame.sprite.collide_rect(self.s3, self.s2)) # Test colliding - no edges touching self.s2.rect.inflate_ip(10, 10) self.assertTrue(pygame.sprite.collide_rect(self.s2, self.s3)) self.assertTrue(pygame.sprite.collide_rect(self.s3, self.s2)) # Test colliding - some edges intersecting self.s2.rect.center = (self.s1.rect.right, self.s1.rect.bottom) self.assertTrue(pygame.sprite.collide_rect(self.s1, self.s2)) self.assertTrue(pygame.sprite.collide_rect(self.s2, self.s1)) # Test not colliding self.assertFalse(pygame.sprite.collide_rect(self.s1, self.s3)) self.assertFalse(pygame.sprite.collide_rect(self.s3, self.s1)) ################################################################################ class AbstractGroupTypeTest(unittest.TestCase): def setUp(self): self.ag = sprite.AbstractGroup() self.ag2 = sprite.AbstractGroup() self.s1 = sprite.Sprite(self.ag) self.s2 = sprite.Sprite(self.ag) self.s3 = sprite.Sprite(self.ag2) self.s4 = sprite.Sprite(self.ag2) self.s1.image = pygame.Surface((10, 10)) self.s1.image.fill(pygame.Color("red")) self.s1.rect = self.s1.image.get_rect() self.s2.image = pygame.Surface((10, 10)) self.s2.image.fill(pygame.Color("green")) self.s2.rect = self.s2.image.get_rect() self.s2.rect.left = 10 self.s3.image = pygame.Surface((10, 10)) self.s3.image.fill(pygame.Color("blue")) self.s3.rect = self.s3.image.get_rect() self.s3.rect.top = 10 self.s4.image = pygame.Surface((10, 10)) self.s4.image.fill(pygame.Color("white")) self.s4.rect = self.s4.image.get_rect() self.s4.rect.left = 10 self.s4.rect.top = 10 self.bg = pygame.Surface((20, 20)) self.scr = pygame.Surface((20, 20)) self.scr.fill(pygame.Color("grey")) def test_has(self): "See if AbstractGroup.has() works as expected." self.assertEqual(True, self.s1 in self.ag) self.assertEqual(True, self.ag.has(self.s1)) self.assertEqual(True, self.ag.has([self.s1, self.s2])) # see if one of them not being in there. self.assertNotEqual(True, self.ag.has([self.s1, self.s2, self.s3])) self.assertNotEqual(True, self.ag.has(self.s1, self.s2, self.s3)) self.assertNotEqual(True, self.ag.has(self.s1, sprite.Group(self.s2, self.s3))) self.assertNotEqual(True, self.ag.has(self.s1, [self.s2, self.s3])) # test empty list processing self.assertFalse(self.ag.has(*[])) self.assertFalse(self.ag.has([])) self.assertFalse(self.ag.has([[]])) # see if a second AbstractGroup works. self.assertEqual(True, self.ag2.has(self.s3)) def test_add(self): ag3 = sprite.AbstractGroup() sprites = (self.s1, self.s2, self.s3, self.s4) for s in sprites: self.assertNotIn(s, ag3) ag3.add(self.s1, [self.s2], self.ag2) for s in sprites: self.assertIn(s, ag3) def test_add_internal(self): self.assertNotIn(self.s1, self.ag2) self.ag2.add_internal(self.s1) self.assertIn(self.s1, self.ag2) def test_clear(self): self.ag.draw(self.scr) self.ag.clear(self.scr, self.bg) self.assertEqual((0, 0, 0, 255), self.scr.get_at((5, 5))) self.assertEqual((0, 0, 0, 255), self.scr.get_at((15, 5))) def test_draw(self): self.ag.draw(self.scr) self.assertEqual((255, 0, 0, 255), self.scr.get_at((5, 5))) self.assertEqual((0, 255, 0, 255), self.scr.get_at((15, 5))) self.assertEqual(self.ag.spritedict[self.s1], pygame.Rect(0, 0, 10, 10)) self.assertEqual(self.ag.spritedict[self.s2], pygame.Rect(10, 0, 10, 10)) def test_empty(self): self.ag.empty() self.assertFalse(self.s1 in self.ag) self.assertFalse(self.s2 in self.ag) def test_has_internal(self): self.assertTrue(self.ag.has_internal(self.s1)) self.assertFalse(self.ag.has_internal(self.s3)) def test_remove(self): # Test removal of 1 sprite self.ag.remove(self.s1) self.assertFalse(self.ag in self.s1.groups()) self.assertFalse(self.ag.has(self.s1)) # Test removal of 2 sprites as 2 arguments self.ag2.remove(self.s3, self.s4) self.assertFalse(self.ag2 in self.s3.groups()) self.assertFalse(self.ag2 in self.s4.groups()) self.assertFalse(self.ag2.has(self.s3, self.s4)) # Test removal of 4 sprites as a list containing a sprite and a group # containing a sprite and another group containing 2 sprites. self.ag.add(self.s1, self.s3, self.s4) self.ag2.add(self.s3, self.s4) g = sprite.Group(self.s2) self.ag.remove([self.s1, g], self.ag2) self.assertFalse(self.ag in self.s1.groups()) self.assertFalse(self.ag in self.s2.groups()) self.assertFalse(self.ag in self.s3.groups()) self.assertFalse(self.ag in self.s4.groups()) self.assertFalse(self.ag.has(self.s1, self.s2, self.s3, self.s4)) def test_remove_internal(self): self.ag.remove_internal(self.s1) self.assertFalse(self.ag.has_internal(self.s1)) def test_sprites(self): expected_sprites = sorted((self.s1, self.s2), key=id) sprite_list = sorted(self.ag.sprites(), key=id) self.assertListEqual(sprite_list, expected_sprites) def test_update(self): class test_sprite(pygame.sprite.Sprite): sink = [] def __init__(self, *groups): pygame.sprite.Sprite.__init__(self, *groups) def update(self, *args): self.sink += args s = test_sprite(self.ag) self.ag.update(1, 2, 3) self.assertEqual(test_sprite.sink, [1, 2, 3]) def test_update_with_kwargs(self): class test_sprite(pygame.sprite.Sprite): sink = [] sink_kwargs = {} def __init__(self, *groups): pygame.sprite.Sprite.__init__(self, *groups) def update(self, *args, **kwargs): self.sink += args self.sink_kwargs.update(kwargs) s = test_sprite(self.ag) self.ag.update(1, 2, 3, foo=4, bar=5) self.assertEqual(test_sprite.sink, [1, 2, 3]) self.assertEqual(test_sprite.sink_kwargs, {"foo": 4, "bar": 5}) ################################################################################ # A base class to share tests between similar classes class LayeredGroupBase: def test_get_layer_of_sprite(self): expected_layer = 666 spr = self.sprite() self.LG.add(spr, layer=expected_layer) layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(len(self.LG._spritelist), 1) self.assertEqual(layer, self.LG.get_layer_of_sprite(spr)) self.assertEqual(layer, expected_layer) self.assertEqual(layer, self.LG._spritelayers[spr]) def test_add(self): expected_layer = self.LG._default_layer spr = self.sprite() self.LG.add(spr) layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(len(self.LG._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__sprite_with_layer_attribute(self): expected_layer = 100 spr = self.sprite() spr._layer = expected_layer self.LG.add(spr) layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(len(self.LG._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__passing_layer_keyword(self): expected_layer = 100 spr = self.sprite() self.LG.add(spr, layer=expected_layer) layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(len(self.LG._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__overriding_sprite_layer_attr(self): expected_layer = 200 spr = self.sprite() spr._layer = 100 self.LG.add(spr, layer=expected_layer) layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(len(self.LG._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__adding_sprite_on_init(self): spr = self.sprite() lrg2 = sprite.LayeredUpdates(spr) expected_layer = lrg2._default_layer layer = lrg2._spritelayers[spr] self.assertEqual(len(lrg2._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__sprite_init_layer_attr(self): expected_layer = 20 spr = self.sprite() spr._layer = expected_layer lrg2 = sprite.LayeredUpdates(spr) layer = lrg2._spritelayers[spr] self.assertEqual(len(lrg2._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__sprite_init_passing_layer(self): expected_layer = 33 spr = self.sprite() lrg2 = sprite.LayeredUpdates(spr, layer=expected_layer) layer = lrg2._spritelayers[spr] self.assertEqual(len(lrg2._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__sprite_init_overiding_layer(self): expected_layer = 33 spr = self.sprite() spr._layer = 55 lrg2 = sprite.LayeredUpdates(spr, layer=expected_layer) layer = lrg2._spritelayers[spr] self.assertEqual(len(lrg2._spritelist), 1) self.assertEqual(layer, expected_layer) def test_add__spritelist(self): expected_layer = self.LG._default_layer sprite_count = 10 sprites = [self.sprite() for _ in range(sprite_count)] self.LG.add(sprites) self.assertEqual(len(self.LG._spritelist), sprite_count) for i in range(sprite_count): layer = self.LG.get_layer_of_sprite(sprites[i]) self.assertEqual(layer, expected_layer) def test_add__spritelist_with_layer_attr(self): sprites = [] sprite_and_layer_count = 10 for i in range(sprite_and_layer_count): sprites.append(self.sprite()) sprites[-1]._layer = i self.LG.add(sprites) self.assertEqual(len(self.LG._spritelist), sprite_and_layer_count) for i in range(sprite_and_layer_count): layer = self.LG.get_layer_of_sprite(sprites[i]) self.assertEqual(layer, i) def test_add__spritelist_passing_layer(self): expected_layer = 33 sprite_count = 10 sprites = [self.sprite() for _ in range(sprite_count)] self.LG.add(sprites, layer=expected_layer) self.assertEqual(len(self.LG._spritelist), sprite_count) for i in range(sprite_count): layer = self.LG.get_layer_of_sprite(sprites[i]) self.assertEqual(layer, expected_layer) def test_add__spritelist_overriding_layer(self): expected_layer = 33 sprites = [] sprite_and_layer_count = 10 for i in range(sprite_and_layer_count): sprites.append(self.sprite()) sprites[-1].layer = i self.LG.add(sprites, layer=expected_layer) self.assertEqual(len(self.LG._spritelist), sprite_and_layer_count) for i in range(sprite_and_layer_count): layer = self.LG.get_layer_of_sprite(sprites[i]) self.assertEqual(layer, expected_layer) def test_add__spritelist_init(self): sprite_count = 10 sprites = [self.sprite() for _ in range(sprite_count)] lrg2 = sprite.LayeredUpdates(sprites) expected_layer = lrg2._default_layer self.assertEqual(len(lrg2._spritelist), sprite_count) for i in range(sprite_count): layer = lrg2.get_layer_of_sprite(sprites[i]) self.assertEqual(layer, expected_layer) def test_remove__sprite(self): sprites = [] sprite_count = 10 for i in range(sprite_count): sprites.append(self.sprite()) sprites[-1].rect = pygame.Rect((0, 0, 0, 0)) self.LG.add(sprites) self.assertEqual(len(self.LG._spritelist), sprite_count) for i in range(sprite_count): self.LG.remove(sprites[i]) self.assertEqual(len(self.LG._spritelist), 0) def test_sprites(self): sprites = [] sprite_and_layer_count = 10 for i in range(sprite_and_layer_count, 0, -1): sprites.append(self.sprite()) sprites[-1]._layer = i self.LG.add(sprites) self.assertEqual(len(self.LG._spritelist), sprite_and_layer_count) # Sprites should be ordered based on their layer (bottom to top), # which is the reverse order of the sprites list. expected_sprites = list(reversed(sprites)) actual_sprites = self.LG.sprites() self.assertListEqual(actual_sprites, expected_sprites) def test_layers(self): sprites = [] expected_layers = [] layer_count = 10 for i in range(layer_count): expected_layers.append(i) for j in range(5): sprites.append(self.sprite()) sprites[-1]._layer = i self.LG.add(sprites) layers = self.LG.layers() self.assertListEqual(layers, expected_layers) def test_add__layers_are_correct(self): layers = [1, 4, 6, 8, 3, 6, 2, 6, 4, 5, 6, 1, 0, 9, 7, 6, 54, 8, 2, 43, 6, 1] for lay in layers: self.LG.add(self.sprite(), layer=lay) layers.sort() for idx, spr in enumerate(self.LG.sprites()): layer = self.LG.get_layer_of_sprite(spr) self.assertEqual(layer, layers[idx]) def test_change_layer(self): expected_layer = 99 spr = self.sprite() self.LG.add(spr, layer=expected_layer) self.assertEqual(self.LG._spritelayers[spr], expected_layer) expected_layer = 44 self.LG.change_layer(spr, expected_layer) self.assertEqual(self.LG._spritelayers[spr], expected_layer) expected_layer = 77 spr2 = self.sprite() spr2.layer = 55 self.LG.add(spr2) self.LG.change_layer(spr2, expected_layer) self.assertEqual(spr2.layer, expected_layer) def test_get_sprites_at(self): sprites = [] expected_sprites = [] for i in range(3): spr = self.sprite() spr.rect = pygame.Rect(i * 50, i * 50, 100, 100) sprites.append(spr) if i < 2: expected_sprites.append(spr) self.LG.add(sprites) result = self.LG.get_sprites_at((50, 50)) self.assertEqual(result, expected_sprites) def test_get_top_layer(self): layers = [1, 5, 2, 8, 4, 5, 3, 88, 23, 0] for i in layers: self.LG.add(self.sprite(), layer=i) top_layer = self.LG.get_top_layer() self.assertEqual(top_layer, self.LG.get_top_layer()) self.assertEqual(top_layer, max(layers)) self.assertEqual(top_layer, max(self.LG._spritelayers.values())) self.assertEqual(top_layer, self.LG._spritelayers[self.LG._spritelist[-1]]) def test_get_bottom_layer(self): layers = [1, 5, 2, 8, 4, 5, 3, 88, 23, 0] for i in layers: self.LG.add(self.sprite(), layer=i) bottom_layer = self.LG.get_bottom_layer() self.assertEqual(bottom_layer, self.LG.get_bottom_layer()) self.assertEqual(bottom_layer, min(layers)) self.assertEqual(bottom_layer, min(self.LG._spritelayers.values())) self.assertEqual(bottom_layer, self.LG._spritelayers[self.LG._spritelist[0]]) def test_move_to_front(self): layers = [1, 5, 2, 8, 4, 5, 3, 88, 23, 0] for i in layers: self.LG.add(self.sprite(), layer=i) spr = self.sprite() self.LG.add(spr, layer=3) self.assertNotEqual(spr, self.LG._spritelist[-1]) self.LG.move_to_front(spr) self.assertEqual(spr, self.LG._spritelist[-1]) def test_move_to_back(self): layers = [1, 5, 2, 8, 4, 5, 3, 88, 23, 0] for i in layers: self.LG.add(self.sprite(), layer=i) spr = self.sprite() self.LG.add(spr, layer=55) self.assertNotEqual(spr, self.LG._spritelist[0]) self.LG.move_to_back(spr) self.assertEqual(spr, self.LG._spritelist[0]) def test_get_top_sprite(self): layers = [1, 5, 2, 8, 4, 5, 3, 88, 23, 0] for i in layers: self.LG.add(self.sprite(), layer=i) expected_layer = self.LG.get_top_layer() layer = self.LG.get_layer_of_sprite(self.LG.get_top_sprite()) self.assertEqual(layer, expected_layer) def test_get_sprites_from_layer(self): sprites = {} layers = [ 1, 4, 5, 6, 3, 7, 8, 2, 1, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 6, 5, 4, 3, 2, ] for lay in layers: spr = self.sprite() spr._layer = lay self.LG.add(spr) if lay not in sprites: sprites[lay] = [] sprites[lay].append(spr) for lay in self.LG.layers(): for spr in self.LG.get_sprites_from_layer(lay): self.assertIn(spr, sprites[lay]) sprites[lay].remove(spr) if len(sprites[lay]) == 0: del sprites[lay] self.assertEqual(len(sprites.values()), 0) def test_switch_layer(self): sprites1 = [] sprites2 = [] layers = [3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3] for lay in layers: spr = self.sprite() spr._layer = lay self.LG.add(spr) if lay == 2: sprites1.append(spr) else: sprites2.append(spr) sprites1.sort(key=id) sprites2.sort(key=id) layer2_sprites = sorted(self.LG.get_sprites_from_layer(2), key=id) layer3_sprites = sorted(self.LG.get_sprites_from_layer(3), key=id) self.assertListEqual(sprites1, layer2_sprites) self.assertListEqual(sprites2, layer3_sprites) self.assertEqual(len(self.LG), len(sprites1) + len(sprites2)) self.LG.switch_layer(2, 3) layer2_sprites = sorted(self.LG.get_sprites_from_layer(2), key=id) layer3_sprites = sorted(self.LG.get_sprites_from_layer(3), key=id) self.assertListEqual(sprites1, layer3_sprites) self.assertListEqual(sprites2, layer2_sprites) self.assertEqual(len(self.LG), len(sprites1) + len(sprites2)) def test_copy(self): self.LG.add(self.sprite()) spr = self.LG.sprites()[0] lg_copy = self.LG.copy() self.assertIsInstance(lg_copy, type(self.LG)) self.assertIn(spr, lg_copy) self.assertIn(lg_copy, spr.groups()) ########################## LAYERED RENDER GROUP TESTS ########################## class LayeredUpdatesTypeTest__SpriteTest(LayeredGroupBase, unittest.TestCase): sprite = sprite.Sprite def setUp(self): self.LG = sprite.LayeredUpdates() class LayeredUpdatesTypeTest__DirtySprite(LayeredGroupBase, unittest.TestCase): sprite = sprite.DirtySprite def setUp(self): self.LG = sprite.LayeredUpdates() class LayeredDirtyTypeTest__DirtySprite(LayeredGroupBase, unittest.TestCase): sprite = sprite.DirtySprite def setUp(self): self.LG = sprite.LayeredDirty() def test_repaint_rect(self): group = self.LG surface = pygame.Surface((100, 100)) group.repaint_rect(pygame.Rect(0, 0, 100, 100)) group.draw(surface) def test_repaint_rect_with_clip(self): group = self.LG surface = pygame.Surface((100, 100)) group.set_clip(pygame.Rect(0, 0, 100, 100)) group.repaint_rect(pygame.Rect(0, 0, 100, 100)) group.draw(surface) def _nondirty_intersections_redrawn(self, use_source_rect=False): # Helper method to ensure non-dirty sprites are redrawn correctly. # # Parameters: # use_source_rect - allows non-dirty sprites to be tested # with (True) and without (False) a source_rect # # This test was written to reproduce the behavior seen in issue #898. # A non-dirty sprite (using source_rect) was being redrawn incorrectly # after a dirty sprite intersected with it. # # This test does the following. # 1. Creates a surface filled with white. Also creates an image_source # with a default fill color of yellow and adds 2 images to it # (red and blue rectangles). # 2. Creates 2 DirtySprites (red_sprite and blue_sprite) using the # image_source and adds them to a LayeredDirty group. # 3. Moves the red_sprite and calls LayeredDirty.draw(surface) a few # times. # 4. Checks to make sure the sprites were redrawn correctly. RED = pygame.Color("red") BLUE = pygame.Color("blue") WHITE = pygame.Color("white") YELLOW = pygame.Color("yellow") surface = pygame.Surface((60, 80)) surface.fill(WHITE) start_pos = (10, 10) # These rects define each sprite's image area in the image_source. red_sprite_source = pygame.Rect((45, 0), (5, 4)) blue_sprite_source = pygame.Rect((0, 40), (20, 10)) # Create a source image/surface. image_source = pygame.Surface((50, 50)) image_source.fill(YELLOW) image_source.fill(RED, red_sprite_source) image_source.fill(BLUE, blue_sprite_source) # The blue_sprite is stationary and will not reset its dirty flag. It # will be the non-dirty sprite in this test. Its values are dependent # on the use_source_rect flag. blue_sprite = pygame.sprite.DirtySprite(self.LG) if use_source_rect: blue_sprite.image = image_source # The rect is a bit smaller than the source_rect to make sure # LayeredDirty.draw() is using the correct dimensions. blue_sprite.rect = pygame.Rect( start_pos, (blue_sprite_source.w - 7, blue_sprite_source.h - 7) ) blue_sprite.source_rect = blue_sprite_source start_x, start_y = blue_sprite.rect.topleft end_x = start_x + blue_sprite.source_rect.w end_y = start_y + blue_sprite.source_rect.h else: blue_sprite.image = image_source.subsurface(blue_sprite_source) blue_sprite.rect = pygame.Rect(start_pos, blue_sprite_source.size) start_x, start_y = blue_sprite.rect.topleft end_x, end_y = blue_sprite.rect.bottomright # The red_sprite is moving and will always be dirty. red_sprite = pygame.sprite.DirtySprite(self.LG) red_sprite.image = image_source red_sprite.rect = pygame.Rect(start_pos, red_sprite_source.size) red_sprite.source_rect = red_sprite_source red_sprite.dirty = 2 # Draw the red_sprite as it moves a few steps. for _ in range(4): red_sprite.rect.move_ip(2, 1) # This is the method being tested. self.LG.draw(surface) # Check colors where the blue_sprite is drawn. We expect red where the # red_sprite is drawn over the blue_sprite, but the rest should be # blue. surface.lock() # Lock surface for possible speed up. try: for y in range(start_y, end_y): for x in range(start_x, end_x): if red_sprite.rect.collidepoint(x, y): expected_color = RED else: expected_color = BLUE color = surface.get_at((x, y)) self.assertEqual(color, expected_color, f"pos=({x}, {y})") finally: surface.unlock() def test_nondirty_intersections_redrawn(self): """Ensure non-dirty sprites are correctly redrawn when dirty sprites intersect with them. """ self._nondirty_intersections_redrawn() def test_nondirty_intersections_redrawn__with_source_rect(self): """Ensure non-dirty sprites using source_rects are correctly redrawn when dirty sprites intersect with them. Related to issue #898. """ self._nondirty_intersections_redrawn(True) ############################### SPRITE BASE CLASS ############################## # # tests common between sprite classes class SpriteBase: def setUp(self): self.groups = [] for Group in self.Groups: self.groups.append(Group()) self.sprite = self.Sprite() def test_add_internal(self): for g in self.groups: self.sprite.add_internal(g) for g in self.groups: self.assertIn(g, self.sprite.groups()) def test_remove_internal(self): for g in self.groups: self.sprite.add_internal(g) for g in self.groups: self.sprite.remove_internal(g) for g in self.groups: self.assertFalse(g in self.sprite.groups()) def test_update(self): # What does this and the next test actually test? class test_sprite(pygame.sprite.Sprite): sink = [] def __init__(self, *groups): pygame.sprite.Sprite.__init__(self, *groups) def update(self, *args): self.sink += args s = test_sprite() s.update(1, 2, 3) self.assertEqual(test_sprite.sink, [1, 2, 3]) def test_update_with_kwargs(self): class test_sprite(pygame.sprite.Sprite): sink = [] sink_dict = {} def __init__(self, *groups): pygame.sprite.Sprite.__init__(self, *groups) def update(self, *args, **kwargs): self.sink += args self.sink_dict.update(kwargs) s = test_sprite() s.update(1, 2, 3, foo=4, bar=5) self.assertEqual(test_sprite.sink, [1, 2, 3]) self.assertEqual(test_sprite.sink_dict, {"foo": 4, "bar": 5}) def test___init____added_to_groups_passed(self): expected_groups = sorted(self.groups, key=id) sprite = self.Sprite(self.groups) groups = sorted(sprite.groups(), key=id) self.assertListEqual(groups, expected_groups) def test_add(self): expected_groups = sorted(self.groups, key=id) self.sprite.add(self.groups) groups = sorted(self.sprite.groups(), key=id) self.assertListEqual(groups, expected_groups) def test_alive(self): self.assertFalse( self.sprite.alive(), "Sprite should not be alive if in no groups" ) self.sprite.add(self.groups) self.assertTrue(self.sprite.alive()) def test_groups(self): for i, g in enumerate(self.groups): expected_groups = sorted(self.groups[: i + 1], key=id) self.sprite.add(g) groups = sorted(self.sprite.groups(), key=id) self.assertListEqual(groups, expected_groups) def test_kill(self): self.sprite.add(self.groups) self.assertTrue(self.sprite.alive()) self.sprite.kill() self.assertListEqual(self.sprite.groups(), []) self.assertFalse(self.sprite.alive()) def test_remove(self): self.sprite.add(self.groups) self.sprite.remove(self.groups) self.assertListEqual(self.sprite.groups(), []) ############################## SPRITE CLASS TESTS ############################## class SpriteTypeTest(SpriteBase, unittest.TestCase): Sprite = sprite.Sprite Groups = [ sprite.Group, sprite.LayeredUpdates, sprite.RenderUpdates, sprite.OrderedUpdates, ] class DirtySpriteTypeTest(SpriteBase, unittest.TestCase): Sprite = sprite.DirtySprite Groups = [ sprite.Group, sprite.LayeredUpdates, sprite.RenderUpdates, sprite.OrderedUpdates, sprite.LayeredDirty, ] class WeakSpriteTypeTest(SpriteTypeTest): Sprite = sprite.WeakSprite def test_weak_group_ref(self): """ We create a list of groups, add them to the sprite. When we then delete the groups, the sprite should be "dead" """ import gc groups = [Group() for Group in self.Groups] self.sprite.add(groups) del groups gc.collect() self.assertFalse(self.sprite.alive()) class DirtyWeakSpriteTypeTest(DirtySpriteTypeTest, WeakSpriteTypeTest): Sprite = sprite.WeakDirtySprite ############################## BUG TESTS ####################################### class SingleGroupBugsTest(unittest.TestCase): def test_memoryleak_bug(self): # For memoryleak bug posted to mailing list by Tobias Steinrücken on 16/11/10. # Fixed in revision 2953. import weakref import gc class MySprite(sprite.Sprite): def __init__(self, *args, **kwargs): sprite.Sprite.__init__(self, *args, **kwargs) self.image = pygame.Surface((2, 4), 0, 24) self.rect = self.image.get_rect() g = sprite.GroupSingle() screen = pygame.Surface((4, 8), 0, 24) s = MySprite() r = weakref.ref(s) g.sprite = s del s gc.collect() self.assertIsNotNone(r()) g.update() g.draw(screen) g.sprite = MySprite() gc.collect() self.assertIsNone(r()) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/surface_test.py0000644000175100001770000050332114676242340016443 0ustar00runnerdockerimport os import unittest from pygame.tests import test_utils from pygame.tests.test_utils import ( example_path, SurfaceSubclass, ) try: from pygame.tests.test_utils.arrinter import * except (ImportError, NameError): pass import pygame from pygame.locals import * from pygame.bufferproxy import BufferProxy import platform import gc import weakref import ctypes IS_PYPY = "PyPy" == platform.python_implementation() class SurfaceTypeTest(unittest.TestCase): def test_surface__pixel_format_as_surface_subclass(self): """Ensure a subclassed surface can be used for pixel format when creating a new surface.""" expected_depth = 16 expected_flags = SRCALPHA expected_size = (13, 37) depth_surface = SurfaceSubclass((11, 21), expected_flags, expected_depth) surface = pygame.Surface(expected_size, expected_flags, depth_surface) self.assertIsNot(surface, depth_surface) self.assertIsInstance(surface, pygame.Surface) self.assertNotIsInstance(surface, SurfaceSubclass) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_flags(), expected_flags) self.assertEqual(surface.get_bitsize(), expected_depth) def test_surface_created_opaque_black(self): surf = pygame.Surface((20, 20)) self.assertEqual(surf.get_at((0, 0)), (0, 0, 0, 255)) # See https://github.com/pygame/pygame/issues/1395 pygame.display.set_mode((500, 500)) surf = pygame.Surface((20, 20)) self.assertEqual(surf.get_at((0, 0)), (0, 0, 0, 255)) def test_set_clip(self): """see if surface.set_clip(None) works correctly.""" s = pygame.Surface((800, 600)) r = pygame.Rect(10, 10, 10, 10) s.set_clip(r) r.move_ip(10, 0) s.set_clip(None) res = s.get_clip() # this was garbled before. self.assertEqual(res[0], 0) self.assertEqual(res[2], 800) def test_print(self): surf = pygame.Surface((70, 70), 0, 32) self.assertEqual(repr(surf), "") def test_keyword_arguments(self): surf = pygame.Surface((70, 70), flags=SRCALPHA, depth=32) self.assertEqual(surf.get_flags() & SRCALPHA, SRCALPHA) self.assertEqual(surf.get_bitsize(), 32) # sanity check to make sure the check below is valid surf_16 = pygame.Surface((70, 70), 0, 16) self.assertEqual(surf_16.get_bytesize(), 2) # try again with an argument list surf_16 = pygame.Surface((70, 70), depth=16) self.assertEqual(surf_16.get_bytesize(), 2) def test_set_at(self): # 24bit surfaces s = pygame.Surface((100, 100), 0, 24) s.fill((0, 0, 0)) # set it with a tuple. s.set_at((0, 0), (10, 10, 10, 255)) r = s.get_at((0, 0)) self.assertIsInstance(r, pygame.Color) self.assertEqual(r, (10, 10, 10, 255)) # try setting a color with a single integer. s.fill((0, 0, 0, 255)) s.set_at((10, 1), 0x0000FF) r = s.get_at((10, 1)) self.assertEqual(r, (0, 0, 255, 255)) def test_set_at__big_endian(self): """png files are loaded in big endian format (BGR rather than RGB)""" pygame.display.init() try: image = pygame.image.load(example_path(os.path.join("data", "BGR.png"))) # Check they start red, green and blue self.assertEqual(image.get_at((10, 10)), pygame.Color(255, 0, 0)) self.assertEqual(image.get_at((10, 20)), pygame.Color(0, 255, 0)) self.assertEqual(image.get_at((10, 40)), pygame.Color(0, 0, 255)) # Set three pixels that are already red, green, blue # to red, green and, blue with set_at: image.set_at((10, 10), pygame.Color(255, 0, 0)) image.set_at((10, 20), pygame.Color(0, 255, 0)) image.set_at((10, 40), pygame.Color(0, 0, 255)) # Check they still are self.assertEqual(image.get_at((10, 10)), pygame.Color(255, 0, 0)) self.assertEqual(image.get_at((10, 20)), pygame.Color(0, 255, 0)) self.assertEqual(image.get_at((10, 40)), pygame.Color(0, 0, 255)) finally: pygame.display.quit() def test_SRCALPHA(self): # has the flag been passed in ok? surf = pygame.Surface((70, 70), SRCALPHA, 32) self.assertEqual(surf.get_flags() & SRCALPHA, SRCALPHA) # 24bit surfaces can not have SRCALPHA. self.assertRaises(ValueError, pygame.Surface, (100, 100), pygame.SRCALPHA, 24) # if we have a 32 bit surface, the SRCALPHA should have worked too. surf2 = pygame.Surface((70, 70), SRCALPHA) if surf2.get_bitsize() == 32: self.assertEqual(surf2.get_flags() & SRCALPHA, SRCALPHA) def test_flags_default0_nodisplay(self): """is set to zero, and SRCALPHA is not set by default with no display initialized.""" pygame.display.quit() surf = pygame.Surface((70, 70)) self.assertEqual(surf.get_flags() & SRCALPHA, 0) def test_flags_default0_display(self): """is set to zero, and SRCALPH is not set by default even when the display is initialized.""" pygame.display.set_mode((320, 200)) try: surf = pygame.Surface((70, 70)) self.assertEqual(surf.get_flags() & SRCALPHA, 0) finally: pygame.display.quit() def test_masks(self): def make_surf(bpp, flags, masks): pygame.Surface((10, 10), flags, bpp, masks) # With some masks SDL_CreateRGBSurface does not work properly. masks = (0xFF000000, 0xFF0000, 0xFF00, 0) self.assertEqual(make_surf(32, 0, masks), None) # For 24 and 32 bit surfaces Pygame assumes no losses. masks = (0x7F0000, 0xFF00, 0xFF, 0) self.assertRaises(ValueError, make_surf, 24, 0, masks) self.assertRaises(ValueError, make_surf, 32, 0, masks) # What contiguous bits in a mask. masks = (0x6F0000, 0xFF00, 0xFF, 0) self.assertRaises(ValueError, make_surf, 32, 0, masks) def test_get_bounding_rect(self): surf = pygame.Surface((70, 70), SRCALPHA, 32) surf.fill((0, 0, 0, 0)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.width, 0) self.assertEqual(bound_rect.height, 0) surf.set_at((30, 30), (255, 255, 255, 1)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.left, 30) self.assertEqual(bound_rect.top, 30) self.assertEqual(bound_rect.width, 1) self.assertEqual(bound_rect.height, 1) surf.set_at((29, 29), (255, 255, 255, 1)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.left, 29) self.assertEqual(bound_rect.top, 29) self.assertEqual(bound_rect.width, 2) self.assertEqual(bound_rect.height, 2) surf = pygame.Surface((70, 70), 0, 24) surf.fill((0, 0, 0)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.width, surf.get_width()) self.assertEqual(bound_rect.height, surf.get_height()) surf.set_colorkey((0, 0, 0)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.width, 0) self.assertEqual(bound_rect.height, 0) surf.set_at((30, 30), (255, 255, 255)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.left, 30) self.assertEqual(bound_rect.top, 30) self.assertEqual(bound_rect.width, 1) self.assertEqual(bound_rect.height, 1) surf.set_at((60, 60), (255, 255, 255)) bound_rect = surf.get_bounding_rect() self.assertEqual(bound_rect.left, 30) self.assertEqual(bound_rect.top, 30) self.assertEqual(bound_rect.width, 31) self.assertEqual(bound_rect.height, 31) # Issue #180 pygame.display.init() try: surf = pygame.Surface((4, 1), 0, 8) surf.fill((255, 255, 255)) surf.get_bounding_rect() # Segfault. finally: pygame.display.quit() def test_copy(self): """Ensure a surface can be copied.""" color = (25, 25, 25, 25) s1 = pygame.Surface((32, 32), pygame.SRCALPHA, 32) s1.fill(color) s2 = s1.copy() s1rect = s1.get_rect() s2rect = s2.get_rect() self.assertEqual(s1rect.size, s2rect.size) self.assertEqual(s2.get_at((10, 10)), color) def test_fill(self): """Ensure a surface can be filled.""" color = (25, 25, 25, 25) fill_rect = pygame.Rect(0, 0, 16, 16) s1 = pygame.Surface((32, 32), pygame.SRCALPHA, 32) s1.fill(color, fill_rect) for pt in test_utils.rect_area_pts(fill_rect): self.assertEqual(s1.get_at(pt), color) for pt in test_utils.rect_outer_bounds(fill_rect): self.assertNotEqual(s1.get_at(pt), color) def test_fill_rle(self): """Test RLEACCEL flag with fill()""" color = (250, 25, 25, 255) surf = pygame.Surface((32, 32)) blit_surf = pygame.Surface((32, 32)) blit_surf.set_colorkey((255, 0, 255), pygame.RLEACCEL) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCELOK) surf.blit(blit_surf, (0, 0)) blit_surf.fill(color) self.assertEqual( blit_surf.mustlock(), (blit_surf.get_flags() & pygame.RLEACCEL) != 0 ) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCEL) def test_mustlock_rle(self): """Test RLEACCEL flag with mustlock()""" surf = pygame.Surface((100, 100)) blit_surf = pygame.Surface((100, 100)) blit_surf.set_colorkey((0, 0, 255), pygame.RLEACCEL) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCELOK) surf.blit(blit_surf, (0, 0)) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCEL) self.assertTrue(blit_surf.mustlock()) def test_mustlock_surf_alpha_rle(self): """Test RLEACCEL flag with mustlock() on a surface with per pixel alpha - new feature in SDL2""" surf = pygame.Surface((100, 100)) blit_surf = pygame.Surface((100, 100), depth=32, flags=pygame.SRCALPHA) blit_surf.set_colorkey((192, 191, 192, 255), pygame.RLEACCEL) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCELOK) surf.blit(blit_surf, (0, 0)) self.assertTrue(blit_surf.get_flags() & pygame.RLEACCEL) self.assertTrue(blit_surf.get_flags() & pygame.SRCALPHA) self.assertTrue(blit_surf.mustlock()) def test_copy_rle(self): """Test copying a surface set to use run length encoding""" s1 = pygame.Surface((32, 32), 24) s1.set_colorkey((255, 0, 255), pygame.RLEACCEL) self.assertTrue(s1.get_flags() & pygame.RLEACCELOK) newsurf = s1.copy() self.assertTrue(s1.get_flags() & pygame.RLEACCELOK) self.assertTrue(newsurf.get_flags() & pygame.RLEACCELOK) def test_subsurface_rle(self): """Ensure an RLE sub-surface works independently of its parent.""" color = (250, 25, 25, 255) color2 = (200, 200, 250, 255) sub_rect = pygame.Rect(16, 16, 16, 16) s0 = pygame.Surface((32, 32), 24) s1 = pygame.Surface((32, 32), 24) s1.set_colorkey((255, 0, 255), pygame.RLEACCEL) s1.fill(color) s2 = s1.subsurface(sub_rect) s2.fill(color2) s0.blit(s1, (0, 0)) self.assertTrue(s1.get_flags() & pygame.RLEACCEL) self.assertTrue(not s2.get_flags() & pygame.RLEACCEL) def test_subsurface_rle2(self): """Ensure an RLE sub-surface works independently of its parent.""" color = (250, 25, 25, 255) color2 = (200, 200, 250, 255) sub_rect = pygame.Rect(16, 16, 16, 16) s0 = pygame.Surface((32, 32), 24) s1 = pygame.Surface((32, 32), 24) s1.set_colorkey((255, 0, 255), pygame.RLEACCEL) s1.fill(color) s2 = s1.subsurface(sub_rect) s2.fill(color2) s0.blit(s2, (0, 0)) self.assertTrue(s1.get_flags() & pygame.RLEACCELOK) self.assertTrue(not s2.get_flags() & pygame.RLEACCELOK) def test_solarwolf_rle_usage(self): """Test for error/crash when calling set_colorkey() followed by convert twice in succession. Code originally taken from solarwolf.""" def optimize(img): clear = img.get_colorkey() img.set_colorkey(clear, RLEACCEL) self.assertEqual(img.get_colorkey(), clear) return img.convert() pygame.display.init() try: pygame.display.set_mode((640, 480)) image = pygame.image.load(example_path(os.path.join("data", "alien1.png"))) image = image.convert() orig_colorkey = image.get_colorkey() image = optimize(image) image = optimize(image) self.assertTrue(image.get_flags() & pygame.RLEACCELOK) self.assertTrue(not image.get_flags() & pygame.RLEACCEL) self.assertEqual(image.get_colorkey(), orig_colorkey) self.assertTrue(isinstance(image, pygame.Surface)) finally: pygame.display.quit() def test_solarwolf_rle_usage_2(self): """Test for RLE status after setting alpha""" pygame.display.init() try: pygame.display.set_mode((640, 480), depth=32) blit_to_surf = pygame.Surface((100, 100)) image = pygame.image.load(example_path(os.path.join("data", "alien1.png"))) image = image.convert() orig_colorkey = image.get_colorkey() # set the colorkey with RLEACCEL, should add the RLEACCELOK flag image.set_colorkey(orig_colorkey, RLEACCEL) self.assertTrue(image.get_flags() & pygame.RLEACCELOK) self.assertTrue(not image.get_flags() & pygame.RLEACCEL) # now blit the surface - should add the RLEACCEL flag blit_to_surf.blit(image, (0, 0)) self.assertTrue(image.get_flags() & pygame.RLEACCELOK) self.assertTrue(image.get_flags() & pygame.RLEACCEL) # Now set the alpha, without RLE acceleration - should strip all # RLE flags image.set_alpha(90) self.assertTrue(not image.get_flags() & pygame.RLEACCELOK) self.assertTrue(not image.get_flags() & pygame.RLEACCEL) finally: pygame.display.quit() def test_set_alpha__set_colorkey_rle(self): pygame.display.init() try: pygame.display.set_mode((640, 480)) blit_to_surf = pygame.Surface((80, 71)) blit_to_surf.fill((255, 255, 255)) image = pygame.image.load(example_path(os.path.join("data", "alien1.png"))) image = image.convert() orig_colorkey = image.get_colorkey() # Add the RLE flag while setting alpha for the whole surface image.set_alpha(90, RLEACCEL) blit_to_surf.blit(image, (0, 0)) sample_pixel_rle = blit_to_surf.get_at((50, 50)) # Now reset the colorkey to the original value with RLE self.assertEqual(image.get_colorkey(), orig_colorkey) image.set_colorkey(orig_colorkey, RLEACCEL) blit_to_surf.fill((255, 255, 255)) blit_to_surf.blit(image, (0, 0)) sample_pixel_no_rle = blit_to_surf.get_at((50, 50)) self.assertAlmostEqual(sample_pixel_rle.r, sample_pixel_no_rle.r, delta=2) self.assertAlmostEqual(sample_pixel_rle.g, sample_pixel_no_rle.g, delta=2) self.assertAlmostEqual(sample_pixel_rle.b, sample_pixel_no_rle.b, delta=2) finally: pygame.display.quit() def test_fill_negative_coordinates(self): # negative coordinates should be clipped by fill, and not draw outside the surface. color = (25, 25, 25, 25) color2 = (20, 20, 20, 25) fill_rect = pygame.Rect(-10, -10, 16, 16) s1 = pygame.Surface((32, 32), pygame.SRCALPHA, 32) r1 = s1.fill(color, fill_rect) c = s1.get_at((0, 0)) self.assertEqual(c, color) # make subsurface in the middle to test it doesn't over write. s2 = s1.subsurface((5, 5, 5, 5)) r2 = s2.fill(color2, (-3, -3, 5, 5)) c2 = s1.get_at((4, 4)) self.assertEqual(c, color) # rect returns the area we actually fill. r3 = s2.fill(color2, (-30, -30, 5, 5)) # since we are using negative coords, it should be an zero sized rect. self.assertEqual(tuple(r3), (0, 0, 0, 0)) def test_fill_keyword_args(self): """Ensure fill() accepts keyword arguments.""" color = (1, 2, 3, 255) area = (1, 1, 2, 2) s1 = pygame.Surface((4, 4), 0, 32) s1.fill(special_flags=pygame.BLEND_ADD, color=color, rect=area) self.assertEqual(s1.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(s1.get_at((1, 1)), color) ######################################################################## def test_get_alpha(self): """Ensure a surface's alpha value can be retrieved.""" s1 = pygame.Surface((32, 32), pygame.SRCALPHA, 32) self.assertEqual(s1.get_alpha(), 255) for alpha in (0, 32, 127, 255): s1.set_alpha(alpha) for t in range(4): s1.set_alpha(s1.get_alpha()) self.assertEqual(s1.get_alpha(), alpha) ######################################################################## def test_get_bytesize(self): """Ensure a surface's bit and byte sizes can be retrieved.""" pygame.display.init() try: depth = 32 depth_bytes = 4 s1 = pygame.Surface((32, 32), pygame.SRCALPHA, depth) self.assertEqual(s1.get_bytesize(), depth_bytes) self.assertEqual(s1.get_bitsize(), depth) depth = 15 depth_bytes = 2 s1 = pygame.Surface((32, 32), 0, depth) self.assertEqual(s1.get_bytesize(), depth_bytes) self.assertEqual(s1.get_bitsize(), depth) depth = 12 depth_bytes = 2 s1 = pygame.Surface((32, 32), 0, depth) self.assertEqual(s1.get_bytesize(), depth_bytes) self.assertEqual(s1.get_bitsize(), depth) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_bytesize() finally: pygame.display.quit() ######################################################################## def test_get_flags(self): """Ensure a surface's flags can be retrieved.""" s1 = pygame.Surface((32, 32), pygame.SRCALPHA, 32) self.assertEqual(s1.get_flags(), pygame.SRCALPHA) @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'requires a non-"dummy" SDL_VIDEODRIVER', ) def test_get_flags__display_surf(self): pygame.display.init() try: # FULLSCREEN screen_surf = pygame.display.set_mode((600, 400), flags=0) self.assertFalse(screen_surf.get_flags() & pygame.FULLSCREEN) screen_surf = pygame.display.set_mode((600, 400), flags=pygame.FULLSCREEN) self.assertTrue(screen_surf.get_flags() & pygame.FULLSCREEN) # NOFRAME screen_surf = pygame.display.set_mode((600, 400), flags=0) self.assertFalse(screen_surf.get_flags() & pygame.NOFRAME) screen_surf = pygame.display.set_mode((600, 400), flags=pygame.NOFRAME) self.assertTrue(screen_surf.get_flags() & pygame.NOFRAME) # RESIZABLE screen_surf = pygame.display.set_mode((600, 400), flags=0) self.assertFalse(screen_surf.get_flags() & pygame.RESIZABLE) screen_surf = pygame.display.set_mode((600, 400), flags=pygame.RESIZABLE) self.assertTrue(screen_surf.get_flags() & pygame.RESIZABLE) # OPENGL screen_surf = pygame.display.set_mode((600, 400), flags=0) # it can have an OPENGL flag by default on Macos? if not (screen_surf.get_flags() & pygame.OPENGL): self.assertFalse(screen_surf.get_flags() & pygame.OPENGL) try: pygame.display.set_mode((200, 200), pygame.OPENGL, 32) except pygame.error: pass # If we can't create OPENGL surface don't try this test else: self.assertTrue(screen_surf.get_flags() & pygame.OPENGL) finally: pygame.display.quit() ######################################################################## def test_get_parent(self): """Ensure a surface's parent can be retrieved.""" pygame.display.init() try: parent = pygame.Surface((16, 16)) child = parent.subsurface((0, 0, 5, 5)) self.assertIs(child.get_parent(), parent) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_parent() finally: pygame.display.quit() ######################################################################## def test_get_rect(self): """Ensure a surface's rect can be retrieved.""" size = (16, 16) surf = pygame.Surface(size) rect = surf.get_rect() self.assertEqual(rect.size, size) ######################################################################## def test_get_width__size_and_height(self): """Ensure a surface's size, width and height can be retrieved.""" for w in range(0, 255, 32): for h in range(0, 127, 15): s = pygame.Surface((w, h)) self.assertEqual(s.get_width(), w) self.assertEqual(s.get_height(), h) self.assertEqual(s.get_size(), (w, h)) def test_get_view(self): """Ensure a buffer view of the surface's pixels can be retrieved.""" # Check that BufferProxys are returned when array depth is supported, # ValueErrors returned otherwise. Error = ValueError s = pygame.Surface((5, 7), 0, 8) v2 = s.get_view("2") self.assertRaises(Error, s.get_view, "0") self.assertRaises(Error, s.get_view, "1") self.assertIsInstance(v2, BufferProxy) self.assertRaises(Error, s.get_view, "3") s = pygame.Surface((8, 7), 0, 8) length = s.get_bytesize() * s.get_width() * s.get_height() v0 = s.get_view("0") v1 = s.get_view("1") self.assertIsInstance(v0, BufferProxy) self.assertEqual(v0.length, length) self.assertIsInstance(v1, BufferProxy) self.assertEqual(v1.length, length) s = pygame.Surface((5, 7), 0, 16) v2 = s.get_view("2") self.assertRaises(Error, s.get_view, "0") self.assertRaises(Error, s.get_view, "1") self.assertIsInstance(v2, BufferProxy) self.assertRaises(Error, s.get_view, "3") s = pygame.Surface((8, 7), 0, 16) length = s.get_bytesize() * s.get_width() * s.get_height() v0 = s.get_view("0") v1 = s.get_view("1") self.assertIsInstance(v0, BufferProxy) self.assertEqual(v0.length, length) self.assertIsInstance(v1, BufferProxy) self.assertEqual(v1.length, length) s = pygame.Surface((5, 7), pygame.SRCALPHA, 16) v2 = s.get_view("2") self.assertIsInstance(v2, BufferProxy) self.assertRaises(Error, s.get_view, "3") s = pygame.Surface((5, 7), 0, 24) v2 = s.get_view("2") v3 = s.get_view("3") self.assertRaises(Error, s.get_view, "0") self.assertRaises(Error, s.get_view, "1") self.assertIsInstance(v2, BufferProxy) self.assertIsInstance(v3, BufferProxy) s = pygame.Surface((8, 7), 0, 24) length = s.get_bytesize() * s.get_width() * s.get_height() v0 = s.get_view("0") v1 = s.get_view("1") self.assertIsInstance(v0, BufferProxy) self.assertEqual(v0.length, length) self.assertIsInstance(v1, BufferProxy) self.assertEqual(v1.length, length) s = pygame.Surface((5, 7), 0, 32) length = s.get_bytesize() * s.get_width() * s.get_height() v0 = s.get_view("0") v1 = s.get_view("1") v2 = s.get_view("2") v3 = s.get_view("3") self.assertIsInstance(v0, BufferProxy) self.assertEqual(v0.length, length) self.assertIsInstance(v1, BufferProxy) self.assertEqual(v1.length, length) self.assertIsInstance(v2, BufferProxy) self.assertIsInstance(v3, BufferProxy) s2 = s.subsurface((0, 0, 4, 7)) self.assertRaises(Error, s2.get_view, "0") self.assertRaises(Error, s2.get_view, "1") s2 = None s = pygame.Surface((5, 7), pygame.SRCALPHA, 32) for kind in ("2", "3", "a", "A", "r", "R", "g", "G", "b", "B"): self.assertIsInstance(s.get_view(kind), BufferProxy) # Check default argument value: '2' s = pygame.Surface((2, 4), 0, 32) v = s.get_view() if not IS_PYPY: ai = ArrayInterface(v) self.assertEqual(ai.nd, 2) # Check locking. s = pygame.Surface((2, 4), 0, 32) self.assertFalse(s.get_locked()) v = s.get_view("2") self.assertFalse(s.get_locked()) c = v.__array_interface__ self.assertTrue(s.get_locked()) c = None gc.collect() self.assertTrue(s.get_locked()) v = None gc.collect() self.assertFalse(s.get_locked()) # Check invalid view kind values. s = pygame.Surface((2, 4), pygame.SRCALPHA, 32) self.assertRaises(TypeError, s.get_view, "") self.assertRaises(TypeError, s.get_view, "9") self.assertRaises(TypeError, s.get_view, "RGBA") self.assertRaises(TypeError, s.get_view, 2) # Both unicode and bytes strings are allowed for kind. s = pygame.Surface((2, 4), 0, 32) s.get_view("2") s.get_view(b"2") # Garbage collection s = pygame.Surface((2, 4), 0, 32) weak_s = weakref.ref(s) v = s.get_view("3") weak_v = weakref.ref(v) gc.collect() self.assertTrue(weak_s() is s) self.assertTrue(weak_v() is v) del v gc.collect() self.assertTrue(weak_s() is s) self.assertTrue(weak_v() is None) del s gc.collect() self.assertTrue(weak_s() is None) def test_get_buffer(self): # Check that get_buffer works for all pixel sizes and for a subsurface. # Check for all pixel sizes for bitsize in [8, 16, 24, 32]: s = pygame.Surface((5, 7), 0, bitsize) length = s.get_pitch() * s.get_height() v = s.get_buffer() self.assertIsInstance(v, BufferProxy) self.assertEqual(v.length, length) self.assertEqual(repr(v), f"") # Check for a subsurface (not contiguous) s = pygame.Surface((7, 10), 0, 32) s2 = s.subsurface((1, 2, 5, 7)) length = s2.get_pitch() * s2.get_height() v = s2.get_buffer() self.assertIsInstance(v, BufferProxy) self.assertEqual(v.length, length) # Check locking. s = pygame.Surface((2, 4), 0, 32) v = s.get_buffer() self.assertTrue(s.get_locked()) v = None gc.collect() self.assertFalse(s.get_locked()) OLDBUF = hasattr(pygame.bufferproxy, "get_segcount") @unittest.skipIf(not OLDBUF, "old buffer not available") def test_get_buffer_oldbuf(self): from pygame.bufferproxy import get_segcount, get_write_buffer s = pygame.Surface((2, 4), pygame.SRCALPHA, 32) v = s.get_buffer() segcount, buflen = get_segcount(v) self.assertEqual(segcount, 1) self.assertEqual(buflen, s.get_pitch() * s.get_height()) seglen, segaddr = get_write_buffer(v, 0) self.assertEqual(segaddr, s._pixels_address) self.assertEqual(seglen, buflen) @unittest.skipIf(not OLDBUF, "old buffer not available") def test_get_view_oldbuf(self): from pygame.bufferproxy import get_segcount, get_write_buffer s = pygame.Surface((2, 4), pygame.SRCALPHA, 32) v = s.get_view("1") segcount, buflen = get_segcount(v) self.assertEqual(segcount, 8) self.assertEqual(buflen, s.get_pitch() * s.get_height()) seglen, segaddr = get_write_buffer(v, 7) self.assertEqual(segaddr, s._pixels_address + s.get_bytesize() * 7) self.assertEqual(seglen, s.get_bytesize()) def test_set_colorkey(self): # __doc__ (as of 2008-06-25) for pygame.surface.Surface.set_colorkey: # Surface.set_colorkey(Color, flags=0): return None # Surface.set_colorkey(None): return None # Set the transparent colorkey s = pygame.Surface((16, 16), pygame.SRCALPHA, 32) colorkeys = ((20, 189, 20, 255), (128, 50, 50, 255), (23, 21, 255, 255)) for colorkey in colorkeys: s.set_colorkey(colorkey) for t in range(4): s.set_colorkey(s.get_colorkey()) self.assertEqual(s.get_colorkey(), colorkey) def test_set_masks(self): s = pygame.Surface((32, 32)) r, g, b, a = s.get_masks() self.assertRaises(TypeError, s.set_masks, (b, g, r, a)) def test_set_shifts(self): s = pygame.Surface((32, 32)) r, g, b, a = s.get_shifts() self.assertRaises(TypeError, s.set_shifts, (b, g, r, a)) def test_blit_keyword_args(self): color = (1, 2, 3, 255) s1 = pygame.Surface((4, 4), 0, 32) s2 = pygame.Surface((2, 2), 0, 32) s2.fill((1, 2, 3)) s1.blit(special_flags=BLEND_ADD, source=s2, dest=(1, 1), area=s2.get_rect()) self.assertEqual(s1.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(s1.get_at((1, 1)), color) def test_blit_big_rects(self): """SDL2 can have more than 16 bits for x, y, width, height.""" big_surf = pygame.Surface((100, 68000), 0, 32) big_surf_color = (255, 0, 0) big_surf.fill(big_surf_color) background = pygame.Surface((500, 500), 0, 32) background_color = (0, 255, 0) background.fill(background_color) # copy parts of the big_surf using more than 16bit parts. background.blit(big_surf, (100, 100), area=(0, 16000, 100, 100)) background.blit(big_surf, (200, 200), area=(0, 32000, 100, 100)) background.blit(big_surf, (300, 300), area=(0, 66000, 100, 100)) # check that all three areas are drawn. self.assertEqual(background.get_at((101, 101)), big_surf_color) self.assertEqual(background.get_at((201, 201)), big_surf_color) self.assertEqual(background.get_at((301, 301)), big_surf_color) # areas outside the 3 blitted areas not covered by those blits. self.assertEqual(background.get_at((400, 301)), background_color) self.assertEqual(background.get_at((400, 201)), background_color) self.assertEqual(background.get_at((100, 201)), background_color) self.assertEqual(background.get_at((99, 99)), background_color) self.assertEqual(background.get_at((450, 450)), background_color) class TestSurfaceBlit(unittest.TestCase): """Tests basic blitting functionality and options.""" # __doc__ (as of 2008-08-02) for pygame.surface.Surface.blit: # Surface.blit(source, dest, area=None, special_flags = 0): return Rect # draw one image onto another # # Draws a source Surface onto this Surface. The draw can be positioned # with the dest argument. Dest can either be pair of coordinates # representing the upper left corner of the source. A Rect can also be # passed as the destination and the topleft corner of the rectangle # will be used as the position for the blit. The size of the # destination rectangle does not effect the blit. # # An optional area rectangle can be passed as well. This represents a # smaller portion of the source Surface to draw. # # An optional special flags is for passing in new in 1.8.0: BLEND_ADD, # BLEND_SUB, BLEND_MULT, BLEND_MIN, BLEND_MAX new in 1.8.1: # BLEND_RGBA_ADD, BLEND_RGBA_SUB, BLEND_RGBA_MULT, BLEND_RGBA_MIN, # BLEND_RGBA_MAX BLEND_RGB_ADD, BLEND_RGB_SUB, BLEND_RGB_MULT, # BLEND_RGB_MIN, BLEND_RGB_MAX With other special blitting flags # perhaps added in the future. # # The return rectangle is the area of the affected pixels, excluding # any pixels outside the destination Surface, or outside the clipping # area. # # Pixel alphas will be ignored when blitting to an 8 bit Surface. # special_flags new in pygame 1.8. def setUp(self): """Resets starting surfaces.""" self.src_surface = pygame.Surface((256, 256), 32) self.src_surface.fill(pygame.Color(255, 255, 255)) self.dst_surface = pygame.Surface((64, 64), 32) self.dst_surface.fill(pygame.Color(0, 0, 0)) def test_blit_overflow_coord(self): """Full coverage w/ overflow, specified with Coordinate""" result = self.dst_surface.blit(self.src_surface, (0, 0)) self.assertIsInstance(result, pygame.Rect) self.assertEqual(result.size, (64, 64)) for k in [(x, x) for x in range(64)]: self.assertEqual(self.dst_surface.get_at(k), (255, 255, 255)) def test_blit_overflow_rect(self): """Full coverage w/ overflow, specified with a Rect""" result = self.dst_surface.blit(self.src_surface, pygame.Rect(-1, -1, 300, 300)) self.assertIsInstance(result, pygame.Rect) self.assertEqual(result.size, (64, 64)) for k in [(x, x) for x in range(64)]: self.assertEqual(self.dst_surface.get_at(k), (255, 255, 255)) def test_blit_overflow_nonorigin(self): """Test Rectangle Dest, with overflow but with starting rect with top-left at (1,1)""" result = self.dst_surface.blit(self.src_surface, dest=pygame.Rect((1, 1, 1, 1))) self.assertIsInstance(result, pygame.Rect) self.assertEqual(result.size, (63, 63)) self.assertEqual(self.dst_surface.get_at((0, 0)), (0, 0, 0)) self.assertEqual(self.dst_surface.get_at((63, 0)), (0, 0, 0)) self.assertEqual(self.dst_surface.get_at((0, 63)), (0, 0, 0)) self.assertEqual(self.dst_surface.get_at((1, 1)), (255, 255, 255)) self.assertEqual(self.dst_surface.get_at((63, 63)), (255, 255, 255)) def test_blit_area_contraint(self): """Testing area constraint""" result = self.dst_surface.blit( self.src_surface, dest=pygame.Rect((1, 1, 1, 1)), area=pygame.Rect((2, 2, 2, 2)), ) self.assertIsInstance(result, pygame.Rect) self.assertEqual(result.size, (2, 2)) self.assertEqual(self.dst_surface.get_at((0, 0)), (0, 0, 0)) # Corners self.assertEqual(self.dst_surface.get_at((63, 0)), (0, 0, 0)) self.assertEqual(self.dst_surface.get_at((0, 63)), (0, 0, 0)) self.assertEqual(self.dst_surface.get_at((63, 63)), (0, 0, 0)) self.assertEqual( self.dst_surface.get_at((1, 1)), (255, 255, 255) ) # Blitted Area self.assertEqual(self.dst_surface.get_at((2, 2)), (255, 255, 255)) self.assertEqual(self.dst_surface.get_at((3, 3)), (0, 0, 0)) # Should stop short of filling in (3,3) def test_blit_zero_overlap(self): """Testing zero-overlap condition.""" result = self.dst_surface.blit( self.src_surface, dest=pygame.Rect((-256, -256, 1, 1)), area=pygame.Rect((2, 2, 256, 256)), ) self.assertIsInstance(result, pygame.Rect) self.assertEqual(result.size, (0, 0)) # No blitting expected for k in [(x, x) for x in range(64)]: self.assertEqual(self.dst_surface.get_at(k), (0, 0, 0)) # Diagonal self.assertEqual( self.dst_surface.get_at((63, 0)), (0, 0, 0) ) # Remaining corners self.assertEqual(self.dst_surface.get_at((0, 63)), (0, 0, 0)) def test_blit__SRCALPHA_opaque_source(self): src = pygame.Surface((256, 256), SRCALPHA, 32) dst = src.copy() for i, j in test_utils.rect_area_pts(src.get_rect()): dst.set_at((i, j), (i, 0, 0, j)) src.set_at((i, j), (0, i, 0, 255)) dst.blit(src, (0, 0)) for pt in test_utils.rect_area_pts(src.get_rect()): self.assertEqual(dst.get_at(pt)[1], src.get_at(pt)[1]) def test_blit__blit_to_self(self): """Test that blit operation works on self, alpha value is correct, and that no RGB distortion occurs.""" test_surface = pygame.Surface((128, 128), SRCALPHA, 32) area = test_surface.get_rect() for pt, test_color in test_utils.gradient(area.width, area.height): test_surface.set_at(pt, test_color) reference_surface = test_surface.copy() test_surface.blit(test_surface, (0, 0)) for x in range(area.width): for y in range(area.height): (r, g, b, a) = reference_color = reference_surface.get_at((x, y)) expected_color = (r, g, b, (a + (a * ((256 - a) // 256)))) self.assertEqual(reference_color, expected_color) self.assertEqual(reference_surface.get_rect(), test_surface.get_rect()) def test_blit__SRCALPHA_to_SRCALPHA_non_zero(self): """Tests blitting a nonzero alpha surface to another nonzero alpha surface both straight alpha compositing method. Test is fuzzy (+/- 1/256) to account for different implementations in SDL1 and SDL2. """ size = (32, 32) def check_color_diff(color1, color2): """Returns True if two colors are within (1, 1, 1, 1) of each other.""" for val in color1 - color2: if abs(val) > 1: return False return True def high_a_onto_low(high, low): """Tests straight alpha case. Source is low alpha, destination is high alpha""" high_alpha_surface = pygame.Surface(size, pygame.SRCALPHA, 32) low_alpha_surface = high_alpha_surface.copy() high_alpha_color = Color( (high, high, low, high) ) # Injecting some RGB variance. low_alpha_color = Color((high, low, low, low)) high_alpha_surface.fill(high_alpha_color) low_alpha_surface.fill(low_alpha_color) high_alpha_surface.blit(low_alpha_surface, (0, 0)) expected_color = low_alpha_color + Color( tuple( ((x * (255 - low_alpha_color.a)) // 255) for x in high_alpha_color ) ) self.assertTrue( check_color_diff(high_alpha_surface.get_at((0, 0)), expected_color) ) def low_a_onto_high(high, low): """Tests straight alpha case. Source is high alpha, destination is low alpha""" high_alpha_surface = pygame.Surface(size, pygame.SRCALPHA, 32) low_alpha_surface = high_alpha_surface.copy() high_alpha_color = Color( (high, high, low, high) ) # Injecting some RGB variance. low_alpha_color = Color((high, low, low, low)) high_alpha_surface.fill(high_alpha_color) low_alpha_surface.fill(low_alpha_color) low_alpha_surface.blit(high_alpha_surface, (0, 0)) expected_color = high_alpha_color + Color( tuple( ((x * (255 - high_alpha_color.a)) // 255) for x in low_alpha_color ) ) self.assertTrue( check_color_diff(low_alpha_surface.get_at((0, 0)), expected_color) ) for low_a in range(0, 128): for high_a in range(128, 256): high_a_onto_low(high_a, low_a) low_a_onto_high(high_a, low_a) def test_blit__SRCALPHA32_to_8(self): # Bug: fatal # SDL_DisplayConvert segfaults when video is uninitialized. target = pygame.Surface((11, 8), 0, 8) test_color = target.get_palette_at(2) source = pygame.Surface((1, 1), pygame.SRCALPHA, 32) source.set_at((0, 0), test_color) target.blit(source, (0, 0)) class GeneralSurfaceTests(unittest.TestCase): @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'requires a non-"dummy" SDL_VIDEODRIVER', ) def test_image_convert_bug_131(self): # bug #131: Unable to Surface.convert(32) some 1-bit images. # https://github.com/pygame/pygame/issues/131 pygame.display.init() try: pygame.display.set_mode((640, 480)) im = pygame.image.load(example_path(os.path.join("data", "city.png"))) im2 = pygame.image.load(example_path(os.path.join("data", "brick.png"))) self.assertEqual(im.get_palette(), ((0, 0, 0, 255), (255, 255, 255, 255))) self.assertEqual(im2.get_palette(), ((0, 0, 0, 255), (0, 0, 0, 255))) self.assertEqual(repr(im.convert(32)), "") self.assertEqual(repr(im2.convert(32)), "") # Ensure a palette format to palette format works. im3 = im.convert(8) self.assertEqual(repr(im3), "") self.assertEqual(im3.get_palette(), im.get_palette()) finally: pygame.display.quit() @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'requires a non-"dummy" SDL_VIDEODRIVER', ) def test_convert_init(self): """Ensure initialization exceptions are raised for surf.convert().""" pygame.display.quit() surf = pygame.Surface((1, 1)) self.assertRaisesRegex(pygame.error, "display initialized", surf.convert) pygame.display.init() try: try: surf.convert(32) surf.convert(pygame.Surface((1, 1))) except pygame.error: self.fail("convert() should not raise an exception here.") self.assertRaisesRegex(pygame.error, "No video mode", surf.convert) pygame.display.set_mode((640, 480)) try: surf.convert() except pygame.error: self.fail("convert() should not raise an exception here.") finally: pygame.display.quit() @unittest.skipIf( os.environ.get("SDL_VIDEODRIVER") == "dummy", 'requires a non-"dummy" SDL_VIDEODRIVER', ) def test_convert_alpha_init(self): """Ensure initialization exceptions are raised for surf.convert_alpha().""" pygame.display.quit() surf = pygame.Surface((1, 1)) self.assertRaisesRegex(pygame.error, "display initialized", surf.convert_alpha) pygame.display.init() try: self.assertRaisesRegex(pygame.error, "No video mode", surf.convert_alpha) pygame.display.set_mode((640, 480)) try: surf.convert_alpha() except pygame.error: self.fail("convert_alpha() should not raise an exception here.") finally: pygame.display.quit() def test_convert_alpha_SRCALPHA(self): """Ensure that the surface returned by surf.convert_alpha() has alpha blending enabled""" pygame.display.init() try: pygame.display.set_mode((640, 480)) s1 = pygame.Surface((100, 100), 0, 32) # s2=pygame.Surface((100,100), pygame.SRCALPHA, 32) s1_alpha = s1.convert_alpha() self.assertEqual(s1_alpha.get_flags() & SRCALPHA, SRCALPHA) self.assertEqual(s1_alpha.get_alpha(), 255) finally: pygame.display.quit() def test_src_alpha_issue_1289(self): """blit should be white.""" surf1 = pygame.Surface((1, 1), pygame.SRCALPHA, 32) surf1.fill((255, 255, 255, 100)) surf2 = pygame.Surface((1, 1), pygame.SRCALPHA, 32) self.assertEqual(surf2.get_at((0, 0)), (0, 0, 0, 0)) surf2.blit(surf1, (0, 0)) self.assertEqual(surf1.get_at((0, 0)), (255, 255, 255, 100)) self.assertEqual(surf2.get_at((0, 0)), (255, 255, 255, 100)) def test_src_alpha_compatible(self): """ "What pygame 1.9.x did". Is the alpha blitter as before?""" # The table below was generated with the SDL1 blit. # def print_table(): # nums = [0, 1, 65, 126, 127, 199, 254, 255] # results = {} # for dest_r, dest_b, dest_a in zip(nums, reversed(nums), reversed(nums)): # for src_r, src_b, src_a in zip(nums, reversed(nums), nums): # src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) # src_surf.fill((src_r, 255, src_b, src_a)) # dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) # dest_surf.fill((dest_r, 255, dest_b, dest_a)) # dest_surf.blit(src_surf, (0, 0)) # key = ((dest_r, dest_b, dest_a), (src_r, src_b, src_a)) # results[key] = dest_surf.get_at((65, 33)) # print("(dest_r, dest_b, dest_a), (src_r, src_b, src_a): color") # pprint(results) results_expected = { ((0, 255, 255), (0, 255, 0)): (0, 255, 255, 255), ((0, 255, 255), (1, 254, 1)): (0, 255, 255, 255), ((0, 255, 255), (65, 199, 65)): (16, 255, 241, 255), ((0, 255, 255), (126, 127, 126)): (62, 255, 192, 255), ((0, 255, 255), (127, 126, 127)): (63, 255, 191, 255), ((0, 255, 255), (199, 65, 199)): (155, 255, 107, 255), ((0, 255, 255), (254, 1, 254)): (253, 255, 2, 255), ((0, 255, 255), (255, 0, 255)): (255, 255, 0, 255), ((1, 254, 254), (0, 255, 0)): (1, 255, 254, 254), ((1, 254, 254), (1, 254, 1)): (1, 255, 254, 255), ((1, 254, 254), (65, 199, 65)): (17, 255, 240, 255), ((1, 254, 254), (126, 127, 126)): (63, 255, 191, 255), ((1, 254, 254), (127, 126, 127)): (64, 255, 190, 255), ((1, 254, 254), (199, 65, 199)): (155, 255, 107, 255), ((1, 254, 254), (254, 1, 254)): (253, 255, 2, 255), ((1, 254, 254), (255, 0, 255)): (255, 255, 0, 255), ((65, 199, 199), (0, 255, 0)): (65, 255, 199, 199), ((65, 199, 199), (1, 254, 1)): (64, 255, 200, 200), ((65, 199, 199), (65, 199, 65)): (65, 255, 199, 214), ((65, 199, 199), (126, 127, 126)): (95, 255, 164, 227), ((65, 199, 199), (127, 126, 127)): (96, 255, 163, 227), ((65, 199, 199), (199, 65, 199)): (169, 255, 95, 243), ((65, 199, 199), (254, 1, 254)): (253, 255, 2, 255), ((65, 199, 199), (255, 0, 255)): (255, 255, 0, 255), ((126, 127, 127), (0, 255, 0)): (126, 255, 127, 127), ((126, 127, 127), (1, 254, 1)): (125, 255, 128, 128), ((126, 127, 127), (65, 199, 65)): (110, 255, 146, 160), ((126, 127, 127), (126, 127, 126)): (126, 255, 127, 191), ((126, 127, 127), (127, 126, 127)): (126, 255, 126, 191), ((126, 127, 127), (199, 65, 199)): (183, 255, 79, 227), ((126, 127, 127), (254, 1, 254)): (253, 255, 1, 255), ((126, 127, 127), (255, 0, 255)): (255, 255, 0, 255), ((127, 126, 126), (0, 255, 0)): (127, 255, 126, 126), ((127, 126, 126), (1, 254, 1)): (126, 255, 127, 127), ((127, 126, 126), (65, 199, 65)): (111, 255, 145, 159), ((127, 126, 126), (126, 127, 126)): (127, 255, 126, 190), ((127, 126, 126), (127, 126, 127)): (127, 255, 126, 191), ((127, 126, 126), (199, 65, 199)): (183, 255, 78, 227), ((127, 126, 126), (254, 1, 254)): (254, 255, 1, 255), ((127, 126, 126), (255, 0, 255)): (255, 255, 0, 255), ((199, 65, 65), (0, 255, 0)): (199, 255, 65, 65), ((199, 65, 65), (1, 254, 1)): (198, 255, 66, 66), ((199, 65, 65), (65, 199, 65)): (165, 255, 99, 114), ((199, 65, 65), (126, 127, 126)): (163, 255, 96, 159), ((199, 65, 65), (127, 126, 127)): (163, 255, 95, 160), ((199, 65, 65), (199, 65, 199)): (199, 255, 65, 214), ((199, 65, 65), (254, 1, 254)): (254, 255, 1, 255), ((199, 65, 65), (255, 0, 255)): (255, 255, 0, 255), ((254, 1, 1), (0, 255, 0)): (254, 255, 1, 1), ((254, 1, 1), (1, 254, 1)): (253, 255, 2, 2), ((254, 1, 1), (65, 199, 65)): (206, 255, 52, 66), ((254, 1, 1), (126, 127, 126)): (191, 255, 63, 127), ((254, 1, 1), (127, 126, 127)): (191, 255, 63, 128), ((254, 1, 1), (199, 65, 199)): (212, 255, 51, 200), ((254, 1, 1), (254, 1, 254)): (254, 255, 1, 255), ((254, 1, 1), (255, 0, 255)): (255, 255, 0, 255), ((255, 0, 0), (0, 255, 0)): (0, 255, 255, 0), ((255, 0, 0), (1, 254, 1)): (1, 255, 254, 1), ((255, 0, 0), (65, 199, 65)): (65, 255, 199, 65), ((255, 0, 0), (126, 127, 126)): (126, 255, 127, 126), ((255, 0, 0), (127, 126, 127)): (127, 255, 126, 127), ((255, 0, 0), (199, 65, 199)): (199, 255, 65, 199), ((255, 0, 0), (254, 1, 254)): (254, 255, 1, 254), ((255, 0, 0), (255, 0, 255)): (255, 255, 0, 255), } # chosen because they contain edge cases. nums = [0, 1, 65, 126, 127, 199, 254, 255] results = {} for dst_r, dst_b, dst_a in zip(nums, reversed(nums), reversed(nums)): for src_r, src_b, src_a in zip(nums, reversed(nums), nums): with self.subTest( src_r=src_r, src_b=src_b, src_a=src_a, dest_r=dst_r, dest_b=dst_b, dest_a=dst_a, ): src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) src_surf.fill((src_r, 255, src_b, src_a)) dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) dest_surf.fill((dst_r, 255, dst_b, dst_a)) dest_surf.blit(src_surf, (0, 0)) key = ((dst_r, dst_b, dst_a), (src_r, src_b, src_a)) results[key] = dest_surf.get_at((65, 33)) self.assertEqual(results[key], results_expected[key]) self.assertEqual(results, results_expected) def test_src_alpha_compatible_16bit(self): """ "What pygame 1.9.x did". Is the alpha blitter as before?""" # The table below was generated with the SDL1 blit. # def print_table(): # nums = [0, 1, 65, 126, 127, 199, 254, 255] # results = {} # for dest_r, dest_b, dest_a in zip(nums, reversed(nums), reversed(nums)): # for src_r, src_b, src_a in zip(nums, reversed(nums), nums): # src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 16) # src_surf.fill((src_r, 255, src_b, src_a)) # dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 16) # dest_surf.fill((dest_r, 255, dest_b, dest_a)) # dest_surf.blit(src_surf, (0, 0)) # key = ((dest_r, dest_b, dest_a), (src_r, src_b, src_a)) # results[key] = dest_surf.get_at((65, 33)) # print("(dest_r, dest_b, dest_a), (src_r, src_b, src_a): color") # pprint(results) results_expected = { ((0, 255, 255), (0, 255, 0)): (0, 255, 255, 255), ((0, 255, 255), (1, 254, 1)): (0, 255, 255, 255), ((0, 255, 255), (65, 199, 65)): (17, 255, 255, 255), ((0, 255, 255), (126, 127, 126)): (51, 255, 204, 255), ((0, 255, 255), (127, 126, 127)): (51, 255, 204, 255), ((0, 255, 255), (199, 65, 199)): (170, 255, 102, 255), ((0, 255, 255), (254, 1, 254)): (255, 255, 0, 255), ((0, 255, 255), (255, 0, 255)): (255, 255, 0, 255), ((1, 254, 254), (0, 255, 0)): (0, 255, 255, 255), ((1, 254, 254), (1, 254, 1)): (0, 255, 255, 255), ((1, 254, 254), (65, 199, 65)): (17, 255, 255, 255), ((1, 254, 254), (126, 127, 126)): (51, 255, 204, 255), ((1, 254, 254), (127, 126, 127)): (51, 255, 204, 255), ((1, 254, 254), (199, 65, 199)): (170, 255, 102, 255), ((1, 254, 254), (254, 1, 254)): (255, 255, 0, 255), ((1, 254, 254), (255, 0, 255)): (255, 255, 0, 255), ((65, 199, 199), (0, 255, 0)): (68, 255, 204, 204), ((65, 199, 199), (1, 254, 1)): (68, 255, 204, 204), ((65, 199, 199), (65, 199, 65)): (68, 255, 204, 221), ((65, 199, 199), (126, 127, 126)): (85, 255, 170, 238), ((65, 199, 199), (127, 126, 127)): (85, 255, 170, 238), ((65, 199, 199), (199, 65, 199)): (187, 255, 85, 255), ((65, 199, 199), (254, 1, 254)): (255, 255, 0, 255), ((65, 199, 199), (255, 0, 255)): (255, 255, 0, 255), ((126, 127, 127), (0, 255, 0)): (119, 255, 119, 119), ((126, 127, 127), (1, 254, 1)): (119, 255, 119, 119), ((126, 127, 127), (65, 199, 65)): (102, 255, 136, 153), ((126, 127, 127), (126, 127, 126)): (119, 255, 119, 187), ((126, 127, 127), (127, 126, 127)): (119, 255, 119, 187), ((126, 127, 127), (199, 65, 199)): (187, 255, 68, 238), ((126, 127, 127), (254, 1, 254)): (255, 255, 0, 255), ((126, 127, 127), (255, 0, 255)): (255, 255, 0, 255), ((127, 126, 126), (0, 255, 0)): (119, 255, 119, 119), ((127, 126, 126), (1, 254, 1)): (119, 255, 119, 119), ((127, 126, 126), (65, 199, 65)): (102, 255, 136, 153), ((127, 126, 126), (126, 127, 126)): (119, 255, 119, 187), ((127, 126, 126), (127, 126, 127)): (119, 255, 119, 187), ((127, 126, 126), (199, 65, 199)): (187, 255, 68, 238), ((127, 126, 126), (254, 1, 254)): (255, 255, 0, 255), ((127, 126, 126), (255, 0, 255)): (255, 255, 0, 255), ((199, 65, 65), (0, 255, 0)): (204, 255, 68, 68), ((199, 65, 65), (1, 254, 1)): (204, 255, 68, 68), ((199, 65, 65), (65, 199, 65)): (170, 255, 102, 119), ((199, 65, 65), (126, 127, 126)): (170, 255, 85, 153), ((199, 65, 65), (127, 126, 127)): (170, 255, 85, 153), ((199, 65, 65), (199, 65, 199)): (204, 255, 68, 221), ((199, 65, 65), (254, 1, 254)): (255, 255, 0, 255), ((199, 65, 65), (255, 0, 255)): (255, 255, 0, 255), ((254, 1, 1), (0, 255, 0)): (0, 255, 255, 0), ((254, 1, 1), (1, 254, 1)): (0, 255, 255, 0), ((254, 1, 1), (65, 199, 65)): (68, 255, 204, 68), ((254, 1, 1), (126, 127, 126)): (119, 255, 119, 119), ((254, 1, 1), (127, 126, 127)): (119, 255, 119, 119), ((254, 1, 1), (199, 65, 199)): (204, 255, 68, 204), ((254, 1, 1), (254, 1, 254)): (255, 255, 0, 255), ((254, 1, 1), (255, 0, 255)): (255, 255, 0, 255), ((255, 0, 0), (0, 255, 0)): (0, 255, 255, 0), ((255, 0, 0), (1, 254, 1)): (0, 255, 255, 0), ((255, 0, 0), (65, 199, 65)): (68, 255, 204, 68), ((255, 0, 0), (126, 127, 126)): (119, 255, 119, 119), ((255, 0, 0), (127, 126, 127)): (119, 255, 119, 119), ((255, 0, 0), (199, 65, 199)): (204, 255, 68, 204), ((255, 0, 0), (254, 1, 254)): (255, 255, 0, 255), ((255, 0, 0), (255, 0, 255)): (255, 255, 0, 255), } # chosen because they contain edge cases. nums = [0, 1, 65, 126, 127, 199, 254, 255] results = {} for dst_r, dst_b, dst_a in zip(nums, reversed(nums), reversed(nums)): for src_r, src_b, src_a in zip(nums, reversed(nums), nums): with self.subTest( src_r=src_r, src_b=src_b, src_a=src_a, dest_r=dst_r, dest_b=dst_b, dest_a=dst_a, ): src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 16) src_surf.fill((src_r, 255, src_b, src_a)) dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 16) dest_surf.fill((dst_r, 255, dst_b, dst_a)) dest_surf.blit(src_surf, (0, 0)) key = ((dst_r, dst_b, dst_a), (src_r, src_b, src_a)) results[key] = dest_surf.get_at((65, 33)) self.assertEqual(results[key], results_expected[key]) self.assertEqual(results, results_expected) def test_sdl1_mimic_blitter_with_set_alpha(self): """does the SDL 1 style blitter in pygame 2 work with set_alpha(), this feature only exists in pygame 2/SDL2 SDL1 did not support combining surface and pixel alpha""" results_expected = { ((0, 255, 255), (0, 255, 0)): (0, 255, 255, 255), ((0, 255, 255), (1, 254, 1)): (0, 255, 255, 255), ((0, 255, 255), (65, 199, 65)): (16, 255, 241, 255), ((0, 255, 255), (126, 127, 126)): (62, 255, 192, 255), ((0, 255, 255), (127, 126, 127)): (63, 255, 191, 255), ((0, 255, 255), (199, 65, 199)): (155, 255, 107, 255), ((0, 255, 255), (254, 1, 254)): (253, 255, 2, 255), ((0, 255, 255), (255, 0, 255)): (255, 255, 0, 255), ((1, 254, 254), (0, 255, 0)): (1, 255, 254, 254), ((1, 254, 254), (1, 254, 1)): (1, 255, 254, 255), ((1, 254, 254), (65, 199, 65)): (17, 255, 240, 255), ((1, 254, 254), (126, 127, 126)): (63, 255, 191, 255), ((1, 254, 254), (127, 126, 127)): (64, 255, 190, 255), ((1, 254, 254), (199, 65, 199)): (155, 255, 107, 255), ((1, 254, 254), (254, 1, 254)): (253, 255, 2, 255), ((1, 254, 254), (255, 0, 255)): (255, 255, 0, 255), ((65, 199, 199), (0, 255, 0)): (65, 255, 199, 199), ((65, 199, 199), (1, 254, 1)): (64, 255, 200, 200), ((65, 199, 199), (65, 199, 65)): (65, 255, 199, 214), ((65, 199, 199), (126, 127, 126)): (95, 255, 164, 227), ((65, 199, 199), (127, 126, 127)): (96, 255, 163, 227), ((65, 199, 199), (199, 65, 199)): (169, 255, 95, 243), ((65, 199, 199), (254, 1, 254)): (253, 255, 2, 255), ((65, 199, 199), (255, 0, 255)): (255, 255, 0, 255), ((126, 127, 127), (0, 255, 0)): (126, 255, 127, 127), ((126, 127, 127), (1, 254, 1)): (125, 255, 128, 128), ((126, 127, 127), (65, 199, 65)): (110, 255, 146, 160), ((126, 127, 127), (126, 127, 126)): (126, 255, 127, 191), ((126, 127, 127), (127, 126, 127)): (126, 255, 126, 191), ((126, 127, 127), (199, 65, 199)): (183, 255, 79, 227), ((126, 127, 127), (254, 1, 254)): (253, 255, 1, 255), ((126, 127, 127), (255, 0, 255)): (255, 255, 0, 255), ((127, 126, 126), (0, 255, 0)): (127, 255, 126, 126), ((127, 126, 126), (1, 254, 1)): (126, 255, 127, 127), ((127, 126, 126), (65, 199, 65)): (111, 255, 145, 159), ((127, 126, 126), (126, 127, 126)): (127, 255, 126, 190), ((127, 126, 126), (127, 126, 127)): (127, 255, 126, 191), ((127, 126, 126), (199, 65, 199)): (183, 255, 78, 227), ((127, 126, 126), (254, 1, 254)): (254, 255, 1, 255), ((127, 126, 126), (255, 0, 255)): (255, 255, 0, 255), ((199, 65, 65), (0, 255, 0)): (199, 255, 65, 65), ((199, 65, 65), (1, 254, 1)): (198, 255, 66, 66), ((199, 65, 65), (65, 199, 65)): (165, 255, 99, 114), ((199, 65, 65), (126, 127, 126)): (163, 255, 96, 159), ((199, 65, 65), (127, 126, 127)): (163, 255, 95, 160), ((199, 65, 65), (199, 65, 199)): (199, 255, 65, 214), ((199, 65, 65), (254, 1, 254)): (254, 255, 1, 255), ((199, 65, 65), (255, 0, 255)): (255, 255, 0, 255), ((254, 1, 1), (0, 255, 0)): (254, 255, 1, 1), ((254, 1, 1), (1, 254, 1)): (253, 255, 2, 2), ((254, 1, 1), (65, 199, 65)): (206, 255, 52, 66), ((254, 1, 1), (126, 127, 126)): (191, 255, 63, 127), ((254, 1, 1), (127, 126, 127)): (191, 255, 63, 128), ((254, 1, 1), (199, 65, 199)): (212, 255, 51, 200), ((254, 1, 1), (254, 1, 254)): (254, 255, 1, 255), ((254, 1, 1), (255, 0, 255)): (255, 255, 0, 255), ((255, 0, 0), (0, 255, 0)): (0, 255, 255, 0), ((255, 0, 0), (1, 254, 1)): (1, 255, 254, 1), ((255, 0, 0), (65, 199, 65)): (65, 255, 199, 65), ((255, 0, 0), (126, 127, 126)): (126, 255, 127, 126), ((255, 0, 0), (127, 126, 127)): (127, 255, 126, 127), ((255, 0, 0), (199, 65, 199)): (199, 255, 65, 199), ((255, 0, 0), (254, 1, 254)): (254, 255, 1, 254), ((255, 0, 0), (255, 0, 255)): (255, 255, 0, 255), } # chosen because they contain edge cases. nums = [0, 1, 65, 126, 127, 199, 254, 255] results = {} for dst_r, dst_b, dst_a in zip(nums, reversed(nums), reversed(nums)): for src_r, src_b, src_a in zip(nums, reversed(nums), nums): with self.subTest( src_r=src_r, src_b=src_b, src_a=src_a, dest_r=dst_r, dest_b=dst_b, dest_a=dst_a, ): src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) src_surf.fill((src_r, 255, src_b, 255)) src_surf.set_alpha(src_a) dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) dest_surf.fill((dst_r, 255, dst_b, dst_a)) dest_surf.blit(src_surf, (0, 0)) key = ((dst_r, dst_b, dst_a), (src_r, src_b, src_a)) results[key] = dest_surf.get_at((65, 33)) self.assertEqual(results[key], results_expected[key]) self.assertEqual(results, results_expected) @unittest.skipIf( "arm" in platform.machine() or "aarch64" in platform.machine(), "sdl2 blitter produces different results on arm", ) def test_src_alpha_sdl2_blitter(self): """Checking that the BLEND_ALPHA_SDL2 flag works - this feature only exists when using SDL2""" results_expected = { ((0, 255, 255), (0, 255, 0)): (0, 255, 255, 255), ((0, 255, 255), (1, 254, 1)): (0, 253, 253, 253), ((0, 255, 255), (65, 199, 65)): (16, 253, 239, 253), ((0, 255, 255), (126, 127, 126)): (62, 253, 190, 253), ((0, 255, 255), (127, 126, 127)): (63, 253, 189, 253), ((0, 255, 255), (199, 65, 199)): (154, 253, 105, 253), ((0, 255, 255), (254, 1, 254)): (252, 253, 0, 253), ((0, 255, 255), (255, 0, 255)): (255, 255, 0, 255), ((1, 254, 254), (0, 255, 0)): (1, 255, 254, 254), ((1, 254, 254), (1, 254, 1)): (0, 253, 252, 252), ((1, 254, 254), (65, 199, 65)): (16, 253, 238, 252), ((1, 254, 254), (126, 127, 126)): (62, 253, 189, 252), ((1, 254, 254), (127, 126, 127)): (63, 253, 189, 253), ((1, 254, 254), (199, 65, 199)): (154, 253, 105, 253), ((1, 254, 254), (254, 1, 254)): (252, 253, 0, 253), ((1, 254, 254), (255, 0, 255)): (255, 255, 0, 255), ((65, 199, 199), (0, 255, 0)): (65, 255, 199, 199), ((65, 199, 199), (1, 254, 1)): (64, 253, 197, 197), ((65, 199, 199), (65, 199, 65)): (64, 253, 197, 211), ((65, 199, 199), (126, 127, 126)): (94, 253, 162, 225), ((65, 199, 199), (127, 126, 127)): (95, 253, 161, 225), ((65, 199, 199), (199, 65, 199)): (168, 253, 93, 241), ((65, 199, 199), (254, 1, 254)): (252, 253, 0, 253), ((65, 199, 199), (255, 0, 255)): (255, 255, 0, 255), ((126, 127, 127), (0, 255, 0)): (126, 255, 127, 127), ((126, 127, 127), (1, 254, 1)): (125, 253, 126, 126), ((126, 127, 127), (65, 199, 65)): (109, 253, 144, 158), ((126, 127, 127), (126, 127, 126)): (125, 253, 125, 188), ((126, 127, 127), (127, 126, 127)): (126, 253, 125, 189), ((126, 127, 127), (199, 65, 199)): (181, 253, 77, 225), ((126, 127, 127), (254, 1, 254)): (252, 253, 0, 253), ((126, 127, 127), (255, 0, 255)): (255, 255, 0, 255), ((127, 126, 126), (0, 255, 0)): (127, 255, 126, 126), ((127, 126, 126), (1, 254, 1)): (126, 253, 125, 125), ((127, 126, 126), (65, 199, 65)): (110, 253, 143, 157), ((127, 126, 126), (126, 127, 126)): (125, 253, 125, 188), ((127, 126, 126), (127, 126, 127)): (126, 253, 125, 189), ((127, 126, 126), (199, 65, 199)): (181, 253, 77, 225), ((127, 126, 126), (254, 1, 254)): (252, 253, 0, 253), ((127, 126, 126), (255, 0, 255)): (255, 255, 0, 255), ((199, 65, 65), (0, 255, 0)): (199, 255, 65, 65), ((199, 65, 65), (1, 254, 1)): (197, 253, 64, 64), ((199, 65, 65), (65, 199, 65)): (163, 253, 98, 112), ((199, 65, 65), (126, 127, 126)): (162, 253, 94, 157), ((199, 65, 65), (127, 126, 127)): (162, 253, 94, 158), ((199, 65, 65), (199, 65, 199)): (197, 253, 64, 212), ((199, 65, 65), (254, 1, 254)): (252, 253, 0, 253), ((199, 65, 65), (255, 0, 255)): (255, 255, 0, 255), ((254, 1, 1), (0, 255, 0)): (254, 255, 1, 1), ((254, 1, 1), (1, 254, 1)): (252, 253, 0, 0), ((254, 1, 1), (65, 199, 65)): (204, 253, 50, 64), ((254, 1, 1), (126, 127, 126)): (189, 253, 62, 125), ((254, 1, 1), (127, 126, 127)): (190, 253, 62, 126), ((254, 1, 1), (199, 65, 199)): (209, 253, 50, 198), ((254, 1, 1), (254, 1, 254)): (252, 253, 0, 253), ((254, 1, 1), (255, 0, 255)): (255, 255, 0, 255), ((255, 0, 0), (0, 255, 0)): (255, 255, 0, 0), ((255, 0, 0), (1, 254, 1)): (253, 253, 0, 0), ((255, 0, 0), (65, 199, 65)): (205, 253, 50, 64), ((255, 0, 0), (126, 127, 126)): (190, 253, 62, 125), ((255, 0, 0), (127, 126, 127)): (190, 253, 62, 126), ((255, 0, 0), (199, 65, 199)): (209, 253, 50, 198), ((255, 0, 0), (254, 1, 254)): (252, 253, 0, 253), ((255, 0, 0), (255, 0, 255)): (255, 255, 0, 255), } # chosen because they contain edge cases. nums = [0, 1, 65, 126, 127, 199, 254, 255] results = {} for dst_r, dst_b, dst_a in zip(nums, reversed(nums), reversed(nums)): for src_r, src_b, src_a in zip(nums, reversed(nums), nums): with self.subTest( src_r=src_r, src_b=src_b, src_a=src_a, dest_r=dst_r, dest_b=dst_b, dest_a=dst_a, ): src_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) src_surf.fill((src_r, 255, src_b, src_a)) dest_surf = pygame.Surface((66, 66), pygame.SRCALPHA, 32) dest_surf.fill((dst_r, 255, dst_b, dst_a)) dest_surf.blit( src_surf, (0, 0), special_flags=pygame.BLEND_ALPHA_SDL2 ) key = ((dst_r, dst_b, dst_a), (src_r, src_b, src_a)) results[key] = tuple(dest_surf.get_at((65, 33))) for i in range(4): self.assertAlmostEqual( results[key][i], results_expected[key][i], delta=4 ) # print("(dest_r, dest_b, dest_a), (src_r, src_b, src_a): color") # pprint(results) def test_opaque_destination_blit_with_set_alpha(self): # no set_alpha() src_surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) src_surf.fill((255, 255, 255, 200)) dest_surf = pygame.Surface((32, 32)) dest_surf.fill((100, 100, 100)) dest_surf.blit(src_surf, (0, 0)) no_surf_alpha_col = dest_surf.get_at((0, 0)) dest_surf.fill((100, 100, 100)) dest_surf.set_alpha(200) dest_surf.blit(src_surf, (0, 0)) surf_alpha_col = dest_surf.get_at((0, 0)) self.assertEqual(no_surf_alpha_col, surf_alpha_col) def todo_test_convert(self): self.fail() # Below should not use a display Surface, but create one and check it is converted # to the depth of the display surface. # def test_convert(self): # """Ensure to creates a new copy of the Surface with the pixel format changed""" # width = 23 # height = 17 # size = (width, height) # flags = 0 # depth = 32 # pygame.display.init() # try: # convert_surface = pygame.display.set_mode(size) # surface = pygame.surface.Surface.convert(convert_surface) # self.assertIsNot(surface, convert_surface) # self.assertNotEqual(surface.get_size(), size) # depth_surface = pygame.display.set_mode(size, flags, depth) # surface2 = pygame.surface.Surface.convert(depth_surface) # self.assertIsNot(surface2, depth_surface) # self.assertEqual(surface2.get_size(), size) # finally: # pygame.display.quit() def test_convert__pixel_format_as_surface_subclass(self): """Ensure convert accepts a Surface subclass argument.""" expected_size = (23, 17) convert_surface = SurfaceSubclass(expected_size, 0, 32) depth_surface = SurfaceSubclass((31, 61), 0, 32) pygame.display.init() try: surface = convert_surface.convert(depth_surface) self.assertIsNot(surface, depth_surface) self.assertIsNot(surface, convert_surface) self.assertIsInstance(surface, pygame.Surface) self.assertIsInstance(surface, SurfaceSubclass) self.assertEqual(surface.get_size(), expected_size) finally: pygame.display.quit() def test_convert_alpha(self): """Ensure the surface returned by surf.convert_alpha has alpha values added""" pygame.display.init() try: pygame.display.set_mode((640, 480)) s1 = pygame.Surface((100, 100), 0, 32) s1_alpha = pygame.Surface.convert_alpha(s1) s2 = pygame.Surface((100, 100), 0, 32) s2_alpha = s2.convert_alpha() s3 = pygame.Surface((100, 100), 0, 8) s3_alpha = s3.convert_alpha() s4 = pygame.Surface((100, 100), 0, 12) s4_alpha = s4.convert_alpha() s5 = pygame.Surface((100, 100), 0, 15) s5_alpha = s5.convert_alpha() s6 = pygame.Surface((100, 100), 0, 16) s6_alpha = s6.convert_alpha() s7 = pygame.Surface((100, 100), 0, 24) s7_alpha = s7.convert_alpha() self.assertEqual(s1_alpha.get_alpha(), 255) self.assertEqual(s2_alpha.get_alpha(), 255) self.assertEqual(s3_alpha.get_alpha(), 255) self.assertEqual(s4_alpha.get_alpha(), 255) self.assertEqual(s5_alpha.get_alpha(), 255) self.assertEqual(s6_alpha.get_alpha(), 255) self.assertEqual(s7_alpha.get_alpha(), 255) self.assertEqual(s1_alpha.get_bitsize(), 32) self.assertEqual(s2_alpha.get_bitsize(), 32) self.assertEqual(s3_alpha.get_bitsize(), 32) self.assertEqual(s4_alpha.get_bitsize(), 32) self.assertEqual(s5_alpha.get_bitsize(), 32) self.assertEqual(s6_alpha.get_bitsize(), 32) self.assertEqual(s6_alpha.get_bitsize(), 32) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.convert_alpha() finally: pygame.display.quit() def test_convert_alpha__pixel_format_as_surface_subclass(self): """Ensure convert_alpha accepts a Surface subclass argument.""" expected_size = (23, 17) convert_surface = SurfaceSubclass(expected_size, SRCALPHA, 32) depth_surface = SurfaceSubclass((31, 57), SRCALPHA, 32) pygame.display.init() try: pygame.display.set_mode((60, 60)) # This is accepted as an argument, but its values are ignored. # See issue #599. surface = convert_surface.convert_alpha(depth_surface) self.assertIsNot(surface, depth_surface) self.assertIsNot(surface, convert_surface) self.assertIsInstance(surface, pygame.Surface) self.assertIsInstance(surface, SurfaceSubclass) self.assertEqual(surface.get_size(), expected_size) finally: pygame.display.quit() def test_get_abs_offset(self): pygame.display.init() try: parent = pygame.Surface((64, 64), SRCALPHA, 32) # Stack bunch of subsurfaces sub_level_1 = parent.subsurface((2, 2), (34, 37)) sub_level_2 = sub_level_1.subsurface((0, 0), (30, 29)) sub_level_3 = sub_level_2.subsurface((3, 7), (20, 21)) sub_level_4 = sub_level_3.subsurface((6, 1), (14, 14)) sub_level_5 = sub_level_4.subsurface((5, 6), (3, 4)) # Parent is always (0, 0) self.assertEqual(parent.get_abs_offset(), (0, 0)) # Total offset: (0+2, 0+2) = (2, 2) self.assertEqual(sub_level_1.get_abs_offset(), (2, 2)) # Total offset: (0+2+0, 0+2+0) = (2, 2) self.assertEqual(sub_level_2.get_abs_offset(), (2, 2)) # Total offset: (0+2+0+3, 0+2+0+7) = (5, 9) self.assertEqual(sub_level_3.get_abs_offset(), (5, 9)) # Total offset: (0+2+0+3+6, 0+2+0+7+1) = (11, 10) self.assertEqual(sub_level_4.get_abs_offset(), (11, 10)) # Total offset: (0+2+0+3+6+5, 0+2+0+7+1+6) = (16, 16) self.assertEqual(sub_level_5.get_abs_offset(), (16, 16)) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_abs_offset() finally: pygame.display.quit() def test_get_abs_parent(self): pygame.display.init() try: parent = pygame.Surface((32, 32), SRCALPHA, 32) # Stack bunch of subsurfaces sub_level_1 = parent.subsurface((1, 1), (15, 15)) sub_level_2 = sub_level_1.subsurface((1, 1), (12, 12)) sub_level_3 = sub_level_2.subsurface((1, 1), (9, 9)) sub_level_4 = sub_level_3.subsurface((1, 1), (8, 8)) sub_level_5 = sub_level_4.subsurface((2, 2), (3, 4)) sub_level_6 = sub_level_5.subsurface((0, 0), (2, 1)) # Can't have subsurfaces bigger than parents self.assertRaises(ValueError, parent.subsurface, (5, 5), (100, 100)) self.assertRaises(ValueError, sub_level_3.subsurface, (0, 0), (11, 5)) self.assertRaises(ValueError, sub_level_6.subsurface, (0, 0), (5, 5)) # Calling get_abs_parent on parent should return itself self.assertEqual(parent.get_abs_parent(), parent) # On subclass "depth" of 1, get_abs_parent and get_parent should return the same self.assertEqual(sub_level_1.get_abs_parent(), sub_level_1.get_parent()) self.assertEqual(sub_level_2.get_abs_parent(), parent) self.assertEqual(sub_level_3.get_abs_parent(), parent) self.assertEqual(sub_level_4.get_abs_parent(), parent) self.assertEqual(sub_level_5.get_abs_parent(), parent) self.assertEqual( sub_level_6.get_abs_parent(), sub_level_6.get_parent().get_abs_parent() ) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_abs_parent() finally: pygame.display.quit() def test_get_at(self): surf = pygame.Surface((2, 2), 0, 24) c00 = pygame.Color(1, 2, 3) c01 = pygame.Color(5, 10, 15) c10 = pygame.Color(100, 50, 0) c11 = pygame.Color(4, 5, 6) surf.set_at((0, 0), c00) surf.set_at((0, 1), c01) surf.set_at((1, 0), c10) surf.set_at((1, 1), c11) c = surf.get_at((0, 0)) self.assertIsInstance(c, pygame.Color) self.assertEqual(c, c00) self.assertEqual(surf.get_at((0, 1)), c01) self.assertEqual(surf.get_at((1, 0)), c10) self.assertEqual(surf.get_at((1, 1)), c11) for p in [(-1, 0), (0, -1), (2, 0), (0, 2)]: self.assertRaises(IndexError, surf.get_at, p) def test_get_at_mapped(self): color = pygame.Color(10, 20, 30) for bitsize in [8, 16, 24, 32]: surf = pygame.Surface((2, 2), 0, bitsize) surf.fill(color) pixel = surf.get_at_mapped((0, 0)) self.assertEqual( pixel, surf.map_rgb(color), "%i != %i, bitsize: %i" % (pixel, surf.map_rgb(color), bitsize), ) def test_get_bitsize(self): pygame.display.init() try: expected_size = (11, 21) # Check that get_bitsize returns passed depth expected_depth = 32 surface = pygame.Surface(expected_size, pygame.SRCALPHA, expected_depth) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_bitsize(), expected_depth) expected_depth = 16 surface = pygame.Surface(expected_size, pygame.SRCALPHA, expected_depth) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_bitsize(), expected_depth) expected_depth = 15 surface = pygame.Surface(expected_size, 0, expected_depth) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_bitsize(), expected_depth) # Check for invalid depths expected_depth = -1 self.assertRaises( ValueError, pygame.Surface, expected_size, 0, expected_depth ) expected_depth = 11 self.assertRaises( ValueError, pygame.Surface, expected_size, 0, expected_depth ) expected_depth = 1024 self.assertRaises( ValueError, pygame.Surface, expected_size, 0, expected_depth ) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_bitsize() finally: pygame.display.quit() def test_get_clip(self): s = pygame.Surface((800, 600)) rectangle = s.get_clip() self.assertEqual(rectangle, (0, 0, 800, 600)) def test_get_colorkey(self): pygame.display.init() try: # if set_colorkey is not used s = pygame.Surface((800, 600), 0, 32) self.assertIsNone(s.get_colorkey()) # if set_colorkey is used s.set_colorkey(None) self.assertIsNone(s.get_colorkey()) # setting up remainder of tests... r, g, b, a = 20, 40, 60, 12 colorkey = pygame.Color(r, g, b) s.set_colorkey(colorkey) # test for ideal case self.assertEqual(s.get_colorkey(), (r, g, b, 255)) # test for if the color_key is set using pygame.RLEACCEL s.set_colorkey(colorkey, pygame.RLEACCEL) self.assertEqual(s.get_colorkey(), (r, g, b, 255)) # test for if the color key is not what's expected s.set_colorkey(pygame.Color(r + 1, g + 1, b + 1)) self.assertNotEqual(s.get_colorkey(), (r, g, b, 255)) s.set_colorkey(pygame.Color(r, g, b, a)) # regardless of whether alpha is not 255 # colorkey returned from surface is always 255 self.assertEqual(s.get_colorkey(), (r, g, b, 255)) finally: # test for using method after display.quit() is called... s = pygame.display.set_mode((200, 200), 0, 32) pygame.display.quit() with self.assertRaises(pygame.error): s.get_colorkey() def test_get_height(self): sizes = ((1, 1), (119, 10), (10, 119), (1, 1000), (1000, 1), (1000, 1000)) for width, height in sizes: surf = pygame.Surface((width, height)) found_height = surf.get_height() self.assertEqual(height, found_height) def test_get_locked(self): def blit_locked_test(surface): newSurf = pygame.Surface((10, 10)) try: newSurf.blit(surface, (0, 0)) except pygame.error: return True else: return False surf = pygame.Surface((100, 100)) self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Unlocked # Surface should lock surf.lock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Locked # Surface should unlock surf.unlock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Unlocked # Check multiple locks surf = pygame.Surface((100, 100)) surf.lock() surf.lock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Locked surf.unlock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Locked surf.unlock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Unlocked # Check many locks surf = pygame.Surface((100, 100)) for i in range(1000): surf.lock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Locked for i in range(1000): surf.unlock() self.assertFalse(surf.get_locked()) # Unlocked # Unlocking an unlocked surface surf = pygame.Surface((100, 100)) surf.unlock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Unlocked surf.unlock() self.assertIs(surf.get_locked(), blit_locked_test(surf)) # Unlocked def test_get_locks(self): # __doc__ (as of 2008-08-02) for pygame.surface.Surface.get_locks: # Surface.get_locks(): return tuple # Gets the locks for the Surface # # Returns the currently existing locks for the Surface. # test on a surface that is not initially locked surface = pygame.Surface((100, 100)) self.assertEqual(surface.get_locks(), ()) # test on the same surface after it has been locked surface.lock() self.assertEqual(surface.get_locks(), (surface,)) # test on the same surface after it has been unlocked surface.unlock() self.assertEqual(surface.get_locks(), ()) # test with PixelArray initialization: locks surface pxarray = pygame.PixelArray(surface) self.assertNotEqual(surface.get_locks(), ()) # closing the PixelArray releases the surface lock pxarray.close() self.assertEqual(surface.get_locks(), ()) # AttributeError raised when called on invalid object type (i.e. not a pygame.Surface object) with self.assertRaises(AttributeError): "DUMMY".get_locks() # test multiple locks and unlocks on the same surface surface.lock() surface.lock() surface.lock() self.assertEqual(surface.get_locks(), (surface, surface, surface)) surface.unlock() surface.unlock() self.assertEqual(surface.get_locks(), (surface,)) surface.unlock() self.assertEqual(surface.get_locks(), ()) def test_get_losses(self): """Ensure a surface's losses can be retrieved""" pygame.display.init() try: # Masks for different color component configurations mask8 = (224, 28, 3, 0) mask15 = (31744, 992, 31, 0) mask16 = (63488, 2016, 31, 0) mask24 = (16711680, 65280, 255, 0) mask32 = (4278190080, 16711680, 65280, 255) # Surfaces with standard depths and masks display_surf = pygame.display.set_mode((100, 100)) surf = pygame.Surface((100, 100)) surf_8bit = pygame.Surface((100, 100), depth=8, masks=mask8) surf_15bit = pygame.Surface((100, 100), depth=15, masks=mask15) surf_16bit = pygame.Surface((100, 100), depth=16, masks=mask16) surf_24bit = pygame.Surface((100, 100), depth=24, masks=mask24) surf_32bit = pygame.Surface((100, 100), depth=32, masks=mask32) # Test output is correct type, length, and value range losses = surf.get_losses() self.assertIsInstance(losses, tuple) self.assertEqual(len(losses), 4) for loss in losses: self.assertIsInstance(loss, int) self.assertGreaterEqual(loss, 0) self.assertLessEqual(loss, 8) # Test each surface for correct losses # Display surface losses gives idea of default surface losses if display_surf.get_losses() == (0, 0, 0, 8): self.assertEqual(losses, (0, 0, 0, 8)) elif display_surf.get_losses() == (8, 8, 8, 8): self.assertEqual(losses, (8, 8, 8, 8)) self.assertEqual(surf_8bit.get_losses(), (5, 5, 6, 8)) self.assertEqual(surf_15bit.get_losses(), (3, 3, 3, 8)) self.assertEqual(surf_16bit.get_losses(), (3, 2, 3, 8)) self.assertEqual(surf_24bit.get_losses(), (0, 0, 0, 8)) self.assertEqual(surf_32bit.get_losses(), (0, 0, 0, 0)) # Method should fail when display is not initialized with self.assertRaises(pygame.error): surface = pygame.display.set_mode((100, 100)) pygame.display.quit() surface.get_losses() finally: pygame.display.quit() def test_get_masks__rgba(self): """ Ensure that get_mask can return RGBA mask. """ masks = [ (0x0F00, 0x00F0, 0x000F, 0xF000), (0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000), ] depths = [16, 32] for expected, depth in list(zip(masks, depths)): surface = pygame.Surface((10, 10), pygame.SRCALPHA, depth) self.assertEqual(expected, surface.get_masks()) def test_get_masks__rgb(self): """ Ensure that get_mask can return RGB mask. """ masks = [ (0x60, 0x1C, 0x03, 0x00), (0xF00, 0x0F0, 0x00F, 0x000), (0x7C00, 0x03E0, 0x001F, 0x0000), (0xF800, 0x07E0, 0x001F, 0x0000), (0xFF0000, 0x00FF00, 0x0000FF, 0x000000), (0xFF0000, 0x00FF00, 0x0000FF, 0x000000), ] depths = [8, 12, 15, 16, 24, 32] for expected, depth in list(zip(masks, depths)): surface = pygame.Surface((10, 10), 0, depth) if depth == 8: expected = (0x00, 0x00, 0x00, 0x00) self.assertEqual(expected, surface.get_masks()) def test_get_masks__no_surface(self): """ Ensure that after display.quit, calling get_masks raises pygame.error. """ with self.assertRaises(pygame.error): surface = pygame.display.set_mode((10, 10)) pygame.display.quit() surface.get_masks() def test_get_offset(self): """get_offset returns the (0,0) if surface is not a child returns the position of child subsurface inside of parent """ pygame.display.init() try: surf = pygame.Surface((100, 100)) self.assertEqual(surf.get_offset(), (0, 0)) # subsurface offset test subsurf = surf.subsurface(1, 1, 10, 10) self.assertEqual(subsurf.get_offset(), (1, 1)) with self.assertRaises(pygame.error): surface = pygame.display.set_mode() pygame.display.quit() surface.get_offset() finally: pygame.display.quit() def test_get_palette(self): palette = [Color(i, i, i) for i in range(256)] surf = pygame.Surface((2, 2), 0, 8) surf.set_palette(palette) palette2 = surf.get_palette() self.assertEqual(len(palette2), len(palette)) for c2, c in zip(palette2, palette): self.assertEqual(c2, c) for c in palette2: self.assertIsInstance(c, pygame.Color) def test_get_palette_at(self): # See also test_get_palette surf = pygame.Surface((2, 2), 0, 8) color = pygame.Color(1, 2, 3, 255) surf.set_palette_at(0, color) color2 = surf.get_palette_at(0) self.assertIsInstance(color2, pygame.Color) self.assertEqual(color2, color) self.assertRaises(IndexError, surf.get_palette_at, -1) self.assertRaises(IndexError, surf.get_palette_at, 256) def test_get_pitch(self): # Test get_pitch() on several surfaces of varying size/depth sizes = ((2, 2), (7, 33), (33, 7), (2, 734), (734, 2), (734, 734)) depths = [8, 24, 32] for width, height in sizes: for depth in depths: # Test get_pitch() on parent surface surf = pygame.Surface((width, height), depth=depth) buff = surf.get_buffer() pitch = buff.length / surf.get_height() test_pitch = surf.get_pitch() self.assertEqual(pitch, test_pitch) # Test get_pitch() on subsurface with same rect as parent rect1 = surf.get_rect() subsurf1 = surf.subsurface(rect1) sub_buff1 = subsurf1.get_buffer() sub_pitch1 = sub_buff1.length / subsurf1.get_height() test_sub_pitch1 = subsurf1.get_pitch() self.assertEqual(sub_pitch1, test_sub_pitch1) # Test get_pitch on subsurface with modified rect rect2 = rect1.inflate(-width / 2, -height / 2) subsurf2 = surf.subsurface(rect2) sub_buff2 = subsurf2.get_buffer() sub_pitch2 = sub_buff2.length / float(subsurf2.get_height()) test_sub_pitch2 = subsurf2.get_pitch() self.assertEqual(sub_pitch2, test_sub_pitch2) def test_get_shifts(self): """ Tests whether Surface.get_shifts returns proper RGBA shifts under various conditions. """ # __doc__ (as of 2008-08-02) for pygame.surface.Surface.get_shifts: # Surface.get_shifts(): return (R, G, B, A) # the bit shifts needed to convert between color and mapped integer. # Returns the pixel shifts need to convert between each color and a # mapped integer. # This value is not needed for normal Pygame usage. # Test for SDL2 on surfaces with various depths and alpha on/off depths = [8, 24, 32] alpha = 128 off = None for bit_depth in depths: surface = pygame.Surface((32, 32), depth=bit_depth) surface.set_alpha(alpha) r1, g1, b1, a1 = surface.get_shifts() surface.set_alpha(off) r2, g2, b2, a2 = surface.get_shifts() self.assertEqual((r1, g1, b1, a1), (r2, g2, b2, a2)) def test_get_size(self): sizes = ((1, 1), (119, 10), (1000, 1000), (1, 5000), (1221, 1), (99, 999)) for width, height in sizes: surf = pygame.Surface((width, height)) found_size = surf.get_size() self.assertEqual((width, height), found_size) def test_lock(self): # __doc__ (as of 2008-08-02) for pygame.surface.Surface.lock: # Surface.lock(): return None # lock the Surface memory for pixel access # # Lock the pixel data of a Surface for access. On accelerated # Surfaces, the pixel data may be stored in volatile video memory or # nonlinear compressed forms. When a Surface is locked the pixel # memory becomes available to access by regular software. Code that # reads or writes pixel values will need the Surface to be locked. # # Surfaces should not remain locked for more than necessary. A locked # Surface can often not be displayed or managed by Pygame. # # Not all Surfaces require locking. The Surface.mustlock() method can # determine if it is actually required. There is no performance # penalty for locking and unlocking a Surface that does not need it. # # All pygame functions will automatically lock and unlock the Surface # data as needed. If a section of code is going to make calls that # will repeatedly lock and unlock the Surface many times, it can be # helpful to wrap the block inside a lock and unlock pair. # # It is safe to nest locking and unlocking calls. The surface will # only be unlocked after the final lock is released. # # Basic surf = pygame.Surface((100, 100)) surf.lock() self.assertTrue(surf.get_locked()) # Nested surf = pygame.Surface((100, 100)) surf.lock() surf.lock() surf.unlock() self.assertTrue(surf.get_locked()) surf.unlock() surf.lock() surf.lock() self.assertTrue(surf.get_locked()) surf.unlock() self.assertTrue(surf.get_locked()) surf.unlock() self.assertFalse(surf.get_locked()) # Already Locked surf = pygame.Surface((100, 100)) surf.lock() surf.lock() self.assertTrue(surf.get_locked()) surf.unlock() self.assertTrue(surf.get_locked()) surf.unlock() self.assertFalse(surf.get_locked()) def test_map_rgb(self): color = Color(0, 128, 255, 64) surf = pygame.Surface((5, 5), SRCALPHA, 32) c = surf.map_rgb(color) self.assertEqual(surf.unmap_rgb(c), color) self.assertEqual(surf.get_at((0, 0)), (0, 0, 0, 0)) surf.fill(c) self.assertEqual(surf.get_at((0, 0)), color) surf.fill((0, 0, 0, 0)) self.assertEqual(surf.get_at((0, 0)), (0, 0, 0, 0)) surf.set_at((0, 0), c) self.assertEqual(surf.get_at((0, 0)), color) def test_mustlock(self): # Test that subsurfaces mustlock surf = pygame.Surface((1024, 1024)) subsurf = surf.subsurface((0, 0, 1024, 1024)) self.assertTrue(subsurf.mustlock()) self.assertFalse(surf.mustlock()) # Tests nested subsurfaces rects = ((0, 0, 512, 512), (0, 0, 256, 256), (0, 0, 128, 128)) surf_stack = [] surf_stack.append(surf) surf_stack.append(subsurf) for rect in rects: surf_stack.append(surf_stack[-1].subsurface(rect)) self.assertTrue(surf_stack[-1].mustlock()) self.assertTrue(surf_stack[-2].mustlock()) def test_set_alpha_none(self): """surf.set_alpha(None) disables blending""" s = pygame.Surface((1, 1), SRCALPHA, 32) s.fill((0, 255, 0, 128)) s.set_alpha(None) self.assertEqual(None, s.get_alpha()) s2 = pygame.Surface((1, 1), SRCALPHA, 32) s2.fill((255, 0, 0, 255)) s2.blit(s, (0, 0)) self.assertEqual(s2.get_at((0, 0))[0], 0, "the red component should be 0") def test_set_alpha_value(self): """surf.set_alpha(x), where x != None, enables blending""" s = pygame.Surface((1, 1), SRCALPHA, 32) s.fill((0, 255, 0, 128)) s.set_alpha(255) s2 = pygame.Surface((1, 1), SRCALPHA, 32) s2.fill((255, 0, 0, 255)) s2.blit(s, (0, 0)) self.assertGreater( s2.get_at((0, 0))[0], 0, "the red component should be above 0" ) def test_palette_colorkey(self): """test bug discovered by robertpfeiffer https://github.com/pygame/pygame/issues/721 """ surf = pygame.image.load(example_path(os.path.join("data", "alien2.png"))) key = surf.get_colorkey() self.assertEqual(surf.get_palette()[surf.map_rgb(key)], key) def test_palette_colorkey_set_px(self): surf = pygame.image.load(example_path(os.path.join("data", "alien2.png"))) key = surf.get_colorkey() surf.set_at((0, 0), key) self.assertEqual(surf.get_at((0, 0)), key) def test_palette_colorkey_fill(self): surf = pygame.image.load(example_path(os.path.join("data", "alien2.png"))) key = surf.get_colorkey() surf.fill(key) self.assertEqual(surf.get_at((0, 0)), key) def test_set_palette(self): palette = [pygame.Color(i, i, i) for i in range(256)] palette[10] = tuple(palette[10]) # 4 element tuple palette[11] = tuple(palette[11])[0:3] # 3 element tuple surf = pygame.Surface((2, 2), 0, 8) surf.set_palette(palette) for i in range(256): self.assertEqual(surf.map_rgb(palette[i]), i, "palette color %i" % (i,)) c = palette[i] surf.fill(c) self.assertEqual(surf.get_at((0, 0)), c, "palette color %i" % (i,)) for i in range(10): palette[i] = pygame.Color(255 - i, 0, 0) surf.set_palette(palette[0:10]) for i in range(256): self.assertEqual(surf.map_rgb(palette[i]), i, "palette color %i" % (i,)) c = palette[i] surf.fill(c) self.assertEqual(surf.get_at((0, 0)), c, "palette color %i" % (i,)) self.assertRaises(ValueError, surf.set_palette, [Color(1, 2, 3, 254)]) self.assertRaises(ValueError, surf.set_palette, (1, 2, 3, 254)) def test_set_palette__fail(self): palette = 256 * [(10, 20, 30)] surf = pygame.Surface((2, 2), 0, 32) self.assertRaises(pygame.error, surf.set_palette, palette) def test_set_palette__set_at(self): surf = pygame.Surface((2, 2), depth=8) palette = 256 * [(10, 20, 30)] palette[1] = (50, 40, 30) surf.set_palette(palette) # calling set_at on a palettized surface should set the pixel to # the closest color in the palette. surf.set_at((0, 0), (60, 50, 40)) self.assertEqual(surf.get_at((0, 0)), (50, 40, 30, 255)) self.assertEqual(surf.get_at((1, 0)), (10, 20, 30, 255)) def test_set_palette_at(self): surf = pygame.Surface((2, 2), 0, 8) original = surf.get_palette_at(10) replacement = Color(1, 1, 1, 255) if replacement == original: replacement = Color(2, 2, 2, 255) surf.set_palette_at(10, replacement) self.assertEqual(surf.get_palette_at(10), replacement) next = tuple(original) surf.set_palette_at(10, next) self.assertEqual(surf.get_palette_at(10), next) next = tuple(original)[0:3] surf.set_palette_at(10, next) self.assertEqual(surf.get_palette_at(10), next) self.assertRaises(IndexError, surf.set_palette_at, 256, replacement) self.assertRaises(IndexError, surf.set_palette_at, -1, replacement) def test_subsurface(self): # __doc__ (as of 2008-08-02) for pygame.surface.Surface.subsurface: # Surface.subsurface(Rect): return Surface # create a new surface that references its parent # # Returns a new Surface that shares its pixels with its new parent. # The new Surface is considered a child of the original. Modifications # to either Surface pixels will effect each other. Surface information # like clipping area and color keys are unique to each Surface. # # The new Surface will inherit the palette, color key, and alpha # settings from its parent. # # It is possible to have any number of subsurfaces and subsubsurfaces # on the parent. It is also possible to subsurface the display Surface # if the display mode is not hardware accelerated. # # See the Surface.get_offset(), Surface.get_parent() to learn more # about the state of a subsurface. # surf = pygame.Surface((16, 16)) s = surf.subsurface(0, 0, 1, 1) s = surf.subsurface((0, 0, 1, 1)) # s = surf.subsurface((0,0,1,1), 1) # This form is not acceptable. # s = surf.subsurface(0,0,10,10, 1) self.assertRaises(ValueError, surf.subsurface, (0, 0, 1, 1, 666)) self.assertEqual(s.get_shifts(), surf.get_shifts()) self.assertEqual(s.get_masks(), surf.get_masks()) self.assertEqual(s.get_losses(), surf.get_losses()) # Issue https://github.com/pygame/pygame/issues/2 surf = pygame.Surface.__new__(pygame.Surface) self.assertRaises(pygame.error, surf.subsurface, (0, 0, 0, 0)) def test_unlock(self): # Basic surf = pygame.Surface((100, 100)) surf.lock() surf.unlock() self.assertFalse(surf.get_locked()) # Nested surf = pygame.Surface((100, 100)) surf.lock() surf.lock() surf.unlock() self.assertTrue(surf.get_locked()) surf.unlock() self.assertFalse(surf.get_locked()) # Already Unlocked surf = pygame.Surface((100, 100)) surf.unlock() self.assertFalse(surf.get_locked()) surf.unlock() self.assertFalse(surf.get_locked()) # Surface can be relocked surf = pygame.Surface((100, 100)) surf.lock() surf.unlock() self.assertFalse(surf.get_locked()) surf.lock() surf.unlock() self.assertFalse(surf.get_locked()) def test_unmap_rgb(self): # Special case, 8 bit-per-pixel surface (has a palette). surf = pygame.Surface((2, 2), 0, 8) c = (1, 1, 1) # Unlikely to be in a default palette. i = 67 surf.set_palette_at(i, c) unmapped_c = surf.unmap_rgb(i) self.assertEqual(unmapped_c, c) # Confirm it is a Color instance self.assertIsInstance(unmapped_c, pygame.Color) # Remaining, non-pallete, cases. c = (128, 64, 12, 255) formats = [(0, 16), (0, 24), (0, 32), (SRCALPHA, 16), (SRCALPHA, 32)] for flags, bitsize in formats: surf = pygame.Surface((2, 2), flags, bitsize) unmapped_c = surf.unmap_rgb(surf.map_rgb(c)) surf.fill(c) comparison_c = surf.get_at((0, 0)) self.assertEqual( unmapped_c, comparison_c, "%s != %s, flags: %i, bitsize: %i" % (unmapped_c, comparison_c, flags, bitsize), ) # Confirm it is a Color instance self.assertIsInstance(unmapped_c, pygame.Color) def test_scroll(self): scrolls = [ (8, 2, 3), (16, 2, 3), (24, 2, 3), (32, 2, 3), (32, -1, -3), (32, 0, 0), (32, 11, 0), (32, 0, 11), (32, -11, 0), (32, 0, -11), (32, -11, 2), (32, 2, -11), ] for bitsize, dx, dy in scrolls: surf = pygame.Surface((10, 10), 0, bitsize) surf.fill((255, 0, 0)) surf.fill((0, 255, 0), (2, 2, 2, 2)) comp = surf.copy() comp.blit(surf, (dx, dy)) surf.scroll(dx, dy) w, h = surf.get_size() for x in range(w): for y in range(h): with self.subTest(x=x, y=y): self.assertEqual( surf.get_at((x, y)), comp.get_at((x, y)), "%s != %s, bpp:, %i, x: %i, y: %i" % ( surf.get_at((x, y)), comp.get_at((x, y)), bitsize, dx, dy, ), ) # Confirm clip rect containment surf = pygame.Surface((20, 13), 0, 32) surf.fill((255, 0, 0)) surf.fill((0, 255, 0), (7, 1, 6, 6)) comp = surf.copy() clip = Rect(3, 1, 8, 14) surf.set_clip(clip) comp.set_clip(clip) comp.blit(surf, (clip.x + 2, clip.y + 3), surf.get_clip()) surf.scroll(2, 3) w, h = surf.get_size() for x in range(w): for y in range(h): self.assertEqual(surf.get_at((x, y)), comp.get_at((x, y))) # Confirm keyword arguments and per-pixel alpha spot_color = (0, 255, 0, 128) surf = pygame.Surface((4, 4), pygame.SRCALPHA, 32) surf.fill((255, 0, 0, 255)) surf.set_at((1, 1), spot_color) surf.scroll(dx=1) self.assertEqual(surf.get_at((2, 1)), spot_color) surf.scroll(dy=1) self.assertEqual(surf.get_at((2, 2)), spot_color) surf.scroll(dy=1, dx=1) self.assertEqual(surf.get_at((3, 3)), spot_color) surf.scroll(dx=-3, dy=-3) self.assertEqual(surf.get_at((0, 0)), spot_color) class SurfaceSubtypeTest(unittest.TestCase): """Issue #280: Methods that return a new Surface preserve subclasses""" def setUp(self): pygame.display.init() def tearDown(self): pygame.display.quit() def test_copy(self): """Ensure method copy() preserves the surface's class When Surface is subclassed, the inherited copy() method will return instances of the subclass. Non Surface fields are uncopied, however. This includes instance attributes. """ expected_size = (32, 32) ms1 = SurfaceSubclass(expected_size, SRCALPHA, 32) ms2 = ms1.copy() self.assertIsNot(ms1, ms2) self.assertIsInstance(ms1, pygame.Surface) self.assertIsInstance(ms2, pygame.Surface) self.assertIsInstance(ms1, SurfaceSubclass) self.assertIsInstance(ms2, SurfaceSubclass) self.assertTrue(ms1.test_attribute) self.assertRaises(AttributeError, getattr, ms2, "test_attribute") self.assertEqual(ms2.get_size(), expected_size) def test_convert(self): """Ensure method convert() preserves the surface's class When Surface is subclassed, the inherited convert() method will return instances of the subclass. Non Surface fields are omitted, however. This includes instance attributes. """ expected_size = (32, 32) ms1 = SurfaceSubclass(expected_size, 0, 24) ms2 = ms1.convert(24) self.assertIsNot(ms1, ms2) self.assertIsInstance(ms1, pygame.Surface) self.assertIsInstance(ms2, pygame.Surface) self.assertIsInstance(ms1, SurfaceSubclass) self.assertIsInstance(ms2, SurfaceSubclass) self.assertTrue(ms1.test_attribute) self.assertRaises(AttributeError, getattr, ms2, "test_attribute") self.assertEqual(ms2.get_size(), expected_size) def test_convert_alpha(self): """Ensure method convert_alpha() preserves the surface's class When Surface is subclassed, the inherited convert_alpha() method will return instances of the subclass. Non Surface fields are omitted, however. This includes instance attributes. """ pygame.display.set_mode((40, 40)) expected_size = (32, 32) s = pygame.Surface(expected_size, SRCALPHA, 16) ms1 = SurfaceSubclass(expected_size, SRCALPHA, 32) ms2 = ms1.convert_alpha(s) self.assertIsNot(ms1, ms2) self.assertIsInstance(ms1, pygame.Surface) self.assertIsInstance(ms2, pygame.Surface) self.assertIsInstance(ms1, SurfaceSubclass) self.assertIsInstance(ms2, SurfaceSubclass) self.assertTrue(ms1.test_attribute) self.assertRaises(AttributeError, getattr, ms2, "test_attribute") self.assertEqual(ms2.get_size(), expected_size) def test_subsurface(self): """Ensure method subsurface() preserves the surface's class When Surface is subclassed, the inherited subsurface() method will return instances of the subclass. Non Surface fields are uncopied, however. This includes instance attributes. """ expected_size = (10, 12) ms1 = SurfaceSubclass((32, 32), SRCALPHA, 32) ms2 = ms1.subsurface((4, 5), expected_size) self.assertIsNot(ms1, ms2) self.assertIsInstance(ms1, pygame.Surface) self.assertIsInstance(ms2, pygame.Surface) self.assertIsInstance(ms1, SurfaceSubclass) self.assertIsInstance(ms2, SurfaceSubclass) self.assertTrue(ms1.test_attribute) self.assertRaises(AttributeError, getattr, ms2, "test_attribute") self.assertEqual(ms2.get_size(), expected_size) class SurfaceGetBufferTest(unittest.TestCase): # These tests requires ctypes. They are disabled if ctypes # is not installed. try: ArrayInterface except NameError: __tags__ = ("ignore", "subprocess_ignore") lilendian = pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN def _check_interface_2D(self, s): s_w, s_h = s.get_size() s_bytesize = s.get_bytesize() s_pitch = s.get_pitch() s_pixels = s._pixels_address # check the array interface structure fields. v = s.get_view("2") if not IS_PYPY: flags = PAI_ALIGNED | PAI_NOTSWAPPED | PAI_WRITEABLE if s.get_pitch() == s_w * s_bytesize: flags |= PAI_FORTRAN inter = ArrayInterface(v) self.assertEqual(inter.two, 2) self.assertEqual(inter.nd, 2) self.assertEqual(inter.typekind, "u") self.assertEqual(inter.itemsize, s_bytesize) self.assertEqual(inter.shape[0], s_w) self.assertEqual(inter.shape[1], s_h) self.assertEqual(inter.strides[0], s_bytesize) self.assertEqual(inter.strides[1], s_pitch) self.assertEqual(inter.flags, flags) self.assertEqual(inter.data, s_pixels) def _check_interface_3D(self, s): s_w, s_h = s.get_size() s_bytesize = s.get_bytesize() s_pitch = s.get_pitch() s_pixels = s._pixels_address s_shifts = list(s.get_shifts()) # Check for RGB or BGR surface. if s_shifts[0:3] == [0, 8, 16]: if self.lilendian: # RGB offset = 0 step = 1 else: # BGR offset = s_bytesize - 1 step = -1 elif s_shifts[0:3] == [8, 16, 24]: if self.lilendian: # xRGB offset = 1 step = 1 else: # BGRx offset = s_bytesize - 2 step = -1 elif s_shifts[0:3] == [16, 8, 0]: if self.lilendian: # BGR offset = 2 step = -1 else: # RGB offset = s_bytesize - 3 step = 1 elif s_shifts[0:3] == [24, 16, 8]: if self.lilendian: # BGRx offset = 2 step = -1 else: # RGBx offset = s_bytesize - 4 step = -1 else: return # check the array interface structure fields. v = s.get_view("3") if not IS_PYPY: inter = ArrayInterface(v) flags = PAI_ALIGNED | PAI_NOTSWAPPED | PAI_WRITEABLE self.assertEqual(inter.two, 2) self.assertEqual(inter.nd, 3) self.assertEqual(inter.typekind, "u") self.assertEqual(inter.itemsize, 1) self.assertEqual(inter.shape[0], s_w) self.assertEqual(inter.shape[1], s_h) self.assertEqual(inter.shape[2], 3) self.assertEqual(inter.strides[0], s_bytesize) self.assertEqual(inter.strides[1], s_pitch) self.assertEqual(inter.strides[2], step) self.assertEqual(inter.flags, flags) self.assertEqual(inter.data, s_pixels + offset) def _check_interface_rgba(self, s, plane): s_w, s_h = s.get_size() s_bytesize = s.get_bytesize() s_pitch = s.get_pitch() s_pixels = s._pixels_address s_shifts = s.get_shifts() s_masks = s.get_masks() # Find the color plane position within the pixel. if not s_masks[plane]: return alpha_shift = s_shifts[plane] offset = alpha_shift // 8 if not self.lilendian: offset = s_bytesize - offset - 1 # check the array interface structure fields. v = s.get_view("rgba"[plane]) if not IS_PYPY: inter = ArrayInterface(v) flags = PAI_ALIGNED | PAI_NOTSWAPPED | PAI_WRITEABLE self.assertEqual(inter.two, 2) self.assertEqual(inter.nd, 2) self.assertEqual(inter.typekind, "u") self.assertEqual(inter.itemsize, 1) self.assertEqual(inter.shape[0], s_w) self.assertEqual(inter.shape[1], s_h) self.assertEqual(inter.strides[0], s_bytesize) self.assertEqual(inter.strides[1], s_pitch) self.assertEqual(inter.flags, flags) self.assertEqual(inter.data, s_pixels + offset) def test_array_interface(self): self._check_interface_2D(pygame.Surface((5, 7), 0, 8)) self._check_interface_2D(pygame.Surface((5, 7), 0, 16)) self._check_interface_2D(pygame.Surface((5, 7), pygame.SRCALPHA, 16)) self._check_interface_3D(pygame.Surface((5, 7), 0, 24)) self._check_interface_3D(pygame.Surface((8, 4), 0, 24)) # No gaps self._check_interface_2D(pygame.Surface((5, 7), 0, 32)) self._check_interface_3D(pygame.Surface((5, 7), 0, 32)) self._check_interface_2D(pygame.Surface((5, 7), pygame.SRCALPHA, 32)) self._check_interface_3D(pygame.Surface((5, 7), pygame.SRCALPHA, 32)) def test_array_interface_masks(self): """Test non-default color byte orders on 3D views""" sz = (5, 7) # Reversed RGB byte order s = pygame.Surface(sz, 0, 32) s_masks = list(s.get_masks()) masks = [0xFF, 0xFF00, 0xFF0000] if s_masks[0:3] == masks or s_masks[0:3] == masks[::-1]: masks = s_masks[2::-1] + s_masks[3:4] self._check_interface_3D(pygame.Surface(sz, 0, 32, masks)) s = pygame.Surface(sz, 0, 24) s_masks = list(s.get_masks()) masks = [0xFF, 0xFF00, 0xFF0000] if s_masks[0:3] == masks or s_masks[0:3] == masks[::-1]: masks = s_masks[2::-1] + s_masks[3:4] self._check_interface_3D(pygame.Surface(sz, 0, 24, masks)) masks = [0xFF00, 0xFF0000, 0xFF000000, 0] self._check_interface_3D(pygame.Surface(sz, 0, 32, masks)) def test_array_interface_alpha(self): for shifts in [[0, 8, 16, 24], [8, 16, 24, 0], [24, 16, 8, 0], [16, 8, 0, 24]]: masks = [0xFF << s for s in shifts] s = pygame.Surface((4, 2), pygame.SRCALPHA, 32, masks) self._check_interface_rgba(s, 3) def test_array_interface_rgb(self): for shifts in [[0, 8, 16, 24], [8, 16, 24, 0], [24, 16, 8, 0], [16, 8, 0, 24]]: masks = [0xFF << s for s in shifts] masks[3] = 0 for plane in range(3): s = pygame.Surface((4, 2), 0, 24) self._check_interface_rgba(s, plane) s = pygame.Surface((4, 2), 0, 32) self._check_interface_rgba(s, plane) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_bytes(self): from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((10, 6), 0, 32) a = s.get_buffer() b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) b = Importer(a, buftools.PyBUF_WRITABLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertFalse(b.readonly) b = Importer(a, buftools.PyBUF_FORMAT) self.assertEqual(b.ndim, 0) self.assertEqual(b.format, "B") b = Importer(a, buftools.PyBUF_ND) self.assertEqual(b.ndim, 1) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertEqual(b.shape, (a.length,)) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, 1) self.assertTrue(b.format is None) self.assertEqual(b.strides, (1,)) s2 = s.subsurface((1, 1, 7, 4)) # Not contiguous a = s2.get_buffer() b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s2._pixels_address) b = Importer(a, buftools.PyBUF_C_CONTIGUOUS) self.assertEqual(b.ndim, 1) self.assertEqual(b.strides, (1,)) b = Importer(a, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(b.ndim, 1) self.assertEqual(b.strides, (1,)) b = Importer(a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(b.ndim, 1) self.assertEqual(b.strides, (1,)) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_0D(self): # This is the same handler as used by get_buffer(), so just # confirm that it succeeds for one case. from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((10, 6), 0, 32) a = s.get_view("0") b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_1D(self): from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((10, 6), 0, 32) a = s.get_view("1") b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, s.get_bytesize()) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) b = Importer(a, buftools.PyBUF_WRITABLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertFalse(b.readonly) b = Importer(a, buftools.PyBUF_FORMAT) self.assertEqual(b.ndim, 0) self.assertEqual(b.format, "=I") b = Importer(a, buftools.PyBUF_ND) self.assertEqual(b.ndim, 1) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, s.get_bytesize()) self.assertEqual(b.shape, (s.get_width() * s.get_height(),)) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, 1) self.assertTrue(b.format is None) self.assertEqual(b.strides, (s.get_bytesize(),)) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_2D(self): from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((10, 6), 0, 32) a = s.get_view("2") # Non dimensional requests, no PyDEF_ND, are handled by the # 1D surface buffer code, so only need to confirm a success. b = Importer(a, buftools.PyBUF_SIMPLE) self.assertEqual(b.ndim, 0) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, s.get_bytesize()) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) # Uniquely 2D b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, 2) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, s.get_bytesize()) self.assertEqual(b.shape, s.get_size()) self.assertEqual(b.strides, (s.get_bytesize(), s.get_pitch())) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address) b = Importer(a, buftools.PyBUF_RECORDS_RO) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "=I") self.assertEqual(b.strides, (s.get_bytesize(), s.get_pitch())) b = Importer(a, buftools.PyBUF_RECORDS) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "=I") self.assertEqual(b.strides, (s.get_bytesize(), s.get_pitch())) b = Importer(a, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, None) self.assertEqual(b.strides, (s.get_bytesize(), s.get_pitch())) b = Importer(a, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, None) self.assertEqual(b.strides, (s.get_bytesize(), s.get_pitch())) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) s2 = s.subsurface((1, 1, 7, 4)) # Not contiguous a = s2.get_view("2") b = Importer(a, buftools.PyBUF_STRIDES) self.assertEqual(b.ndim, 2) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, s2.get_bytesize()) self.assertEqual(b.shape, s2.get_size()) self.assertEqual(b.strides, (s2.get_bytesize(), s.get_pitch())) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s2._pixels_address) b = Importer(a, buftools.PyBUF_RECORDS) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "=I") self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_FORMAT) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_3D(self): from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((12, 6), 0, 24) rmask, gmask, bmask, amask = s.get_masks() if self.lilendian: if rmask == 0x0000FF: color_step = 1 addr_offset = 0 else: color_step = -1 addr_offset = 2 else: if rmask == 0xFF0000: color_step = 1 addr_offset = 0 else: color_step = -1 addr_offset = 2 a = s.get_view("3") b = Importer(a, buftools.PyBUF_STRIDES) w, h = s.get_size() shape = w, h, 3 strides = 3, s.get_pitch(), color_step self.assertEqual(b.ndim, 3) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertEqual(b.shape, shape) self.assertEqual(b.strides, strides) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address + addr_offset) b = Importer(a, buftools.PyBUF_RECORDS_RO) self.assertEqual(b.ndim, 3) self.assertEqual(b.format, "B") self.assertEqual(b.strides, strides) b = Importer(a, buftools.PyBUF_RECORDS) self.assertEqual(b.ndim, 3) self.assertEqual(b.format, "B") self.assertEqual(b.strides, strides) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_FORMAT) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) @unittest.skipIf(not pygame.HAVE_NEWBUF, "newbuf not implemented") def test_newbuf_PyBUF_flags_rgba(self): # All color plane views are handled by the same routine, # so only one plane need be checked. from pygame.tests.test_utils import buftools Importer = buftools.Importer s = pygame.Surface((12, 6), 0, 24) rmask, gmask, bmask, amask = s.get_masks() if self.lilendian: if rmask == 0x0000FF: addr_offset = 0 else: addr_offset = 2 else: if rmask == 0xFF0000: addr_offset = 0 else: addr_offset = 2 a = s.get_view("R") b = Importer(a, buftools.PyBUF_STRIDES) w, h = s.get_size() shape = w, h strides = s.get_bytesize(), s.get_pitch() self.assertEqual(b.ndim, 2) self.assertTrue(b.format is None) self.assertEqual(b.len, a.length) self.assertEqual(b.itemsize, 1) self.assertEqual(b.shape, shape) self.assertEqual(b.strides, strides) self.assertTrue(b.suboffsets is None) self.assertFalse(b.readonly) self.assertEqual(b.buf, s._pixels_address + addr_offset) b = Importer(a, buftools.PyBUF_RECORDS_RO) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "B") self.assertEqual(b.strides, strides) b = Importer(a, buftools.PyBUF_RECORDS) self.assertEqual(b.ndim, 2) self.assertEqual(b.format, "B") self.assertEqual(b.strides, strides) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_FORMAT) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ND) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, buftools.PyBUF_ANY_CONTIGUOUS) class SurfaceBlendTest(unittest.TestCase): def setUp(self): # Needed for 8 bits-per-pixel color palette surface tests. pygame.display.init() def tearDown(self): pygame.display.quit() _test_palette = [ (0, 0, 0, 255), (10, 30, 60, 0), (25, 75, 100, 128), (200, 150, 100, 200), (0, 100, 200, 255), ] surf_size = (10, 12) _test_points = [ ((0, 0), 1), ((4, 5), 1), ((9, 0), 2), ((5, 5), 2), ((0, 11), 3), ((4, 6), 3), ((9, 11), 4), ((5, 6), 4), ] def _make_surface(self, bitsize, srcalpha=False, palette=None): if palette is None: palette = self._test_palette flags = 0 if srcalpha: flags |= SRCALPHA surf = pygame.Surface(self.surf_size, flags, bitsize) if bitsize == 8: surf.set_palette([c[:3] for c in palette]) return surf def _fill_surface(self, surf, palette=None): if palette is None: palette = self._test_palette surf.fill(palette[1], (0, 0, 5, 6)) surf.fill(palette[2], (5, 0, 5, 6)) surf.fill(palette[3], (0, 6, 5, 6)) surf.fill(palette[4], (5, 6, 5, 6)) def _make_src_surface(self, bitsize, srcalpha=False, palette=None): surf = self._make_surface(bitsize, srcalpha, palette) self._fill_surface(surf, palette) return surf def _assert_surface(self, surf, palette=None, msg=""): if palette is None: palette = self._test_palette if surf.get_bitsize() == 16: palette = [surf.unmap_rgb(surf.map_rgb(c)) for c in palette] for posn, i in self._test_points: self.assertEqual( surf.get_at(posn), palette[i], "%s != %s: flags: %i, bpp: %i, posn: %s%s" % ( surf.get_at(posn), palette[i], surf.get_flags(), surf.get_bitsize(), posn, msg, ), ) def test_blit_blend(self): sources = [ self._make_src_surface(8), self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] destinations = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] blend = [ ("BLEND_ADD", (0, 25, 100, 255), lambda a, b: min(a + b, 255)), ("BLEND_SUB", (100, 25, 0, 100), lambda a, b: max(a - b, 0)), ("BLEND_MULT", (100, 200, 0, 0), lambda a, b: ((a * b) + 255) >> 8), ("BLEND_MIN", (255, 0, 0, 255), min), ("BLEND_MAX", (0, 255, 0, 255), max), ] for src in sources: src_palette = [src.unmap_rgb(src.map_rgb(c)) for c in self._test_palette] for dst in destinations: for blend_name, dst_color, op in blend: dc = dst.unmap_rgb(dst.map_rgb(dst_color)) p = [] for sc in src_palette: c = [op(dc[i], sc[i]) for i in range(3)] if dst.get_masks()[3]: c.append(dc[3]) else: c.append(255) c = dst.unmap_rgb(dst.map_rgb(c)) p.append(c) dst.fill(dst_color) dst.blit(src, (0, 0), special_flags=getattr(pygame, blend_name)) self._assert_surface( dst, p, ( ", op: %s, src bpp: %i" ", src flags: %i" % (blend_name, src.get_bitsize(), src.get_flags()) ), ) src = self._make_src_surface(32) masks = src.get_masks() dst = pygame.Surface( src.get_size(), 0, 32, [masks[2], masks[1], masks[0], masks[3]] ) for blend_name, dst_color, op in blend: p = [] for src_color in self._test_palette: c = [op(dst_color[i], src_color[i]) for i in range(3)] c.append(255) p.append(tuple(c)) dst.fill(dst_color) dst.blit(src, (0, 0), special_flags=getattr(pygame, blend_name)) self._assert_surface(dst, p, f", {blend_name}") # Blend blits are special cased for 32 to 32 bit surfaces. # # Confirm that it works when the rgb bytes are not the # least significant bytes. pat = self._make_src_surface(32) masks = pat.get_masks() if min(masks) == 0xFF000000: masks = [m >> 8 for m in masks] else: masks = [m << 8 for m in masks] src = pygame.Surface(pat.get_size(), 0, 32, masks) self._fill_surface(src) dst = pygame.Surface(src.get_size(), 0, 32, masks) for blend_name, dst_color, op in blend: p = [] for src_color in self._test_palette: c = [op(dst_color[i], src_color[i]) for i in range(3)] c.append(255) p.append(tuple(c)) dst.fill(dst_color) dst.blit(src, (0, 0), special_flags=getattr(pygame, blend_name)) self._assert_surface(dst, p, f", {blend_name}") def test_blit_blend_rgba(self): sources = [ self._make_src_surface(8), self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] destinations = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] blend = [ ("BLEND_RGBA_ADD", (0, 25, 100, 255), lambda a, b: min(a + b, 255)), ("BLEND_RGBA_SUB", (0, 25, 100, 255), lambda a, b: max(a - b, 0)), ("BLEND_RGBA_MULT", (0, 7, 100, 255), lambda a, b: ((a * b) + 255) >> 8), ("BLEND_RGBA_MIN", (0, 255, 0, 255), min), ("BLEND_RGBA_MAX", (0, 255, 0, 255), max), ] for src in sources: src_palette = [src.unmap_rgb(src.map_rgb(c)) for c in self._test_palette] for dst in destinations: for blend_name, dst_color, op in blend: dc = dst.unmap_rgb(dst.map_rgb(dst_color)) p = [] for sc in src_palette: c = [op(dc[i], sc[i]) for i in range(4)] if not dst.get_masks()[3]: c[3] = 255 c = dst.unmap_rgb(dst.map_rgb(c)) p.append(c) dst.fill(dst_color) dst.blit(src, (0, 0), special_flags=getattr(pygame, blend_name)) self._assert_surface( dst, p, ( ", op: %s, src bpp: %i" ", src flags: %i" % (blend_name, src.get_bitsize(), src.get_flags()) ), ) # Blend blits are special cased for 32 to 32 bit surfaces # with per-pixel alpha. # # Confirm the general case is used instead when the formats differ. src = self._make_src_surface(32, srcalpha=True) masks = src.get_masks() dst = pygame.Surface( src.get_size(), SRCALPHA, 32, (masks[2], masks[1], masks[0], masks[3]) ) for blend_name, dst_color, op in blend: p = [ tuple(op(dst_color[i], src_color[i]) for i in range(4)) for src_color in self._test_palette ] dst.fill(dst_color) dst.blit(src, (0, 0), special_flags=getattr(pygame, blend_name)) self._assert_surface(dst, p, f", {blend_name}") # Confirm this special case handles subsurfaces. src = pygame.Surface((8, 10), SRCALPHA, 32) dst = pygame.Surface((8, 10), SRCALPHA, 32) tst = pygame.Surface((8, 10), SRCALPHA, 32) src.fill((1, 2, 3, 4)) dst.fill((40, 30, 20, 10)) subsrc = src.subsurface((2, 3, 4, 4)) subdst = dst.subsurface((2, 3, 4, 4)) subdst.blit(subsrc, (0, 0), special_flags=BLEND_RGBA_ADD) tst.fill((40, 30, 20, 10)) tst.fill((41, 32, 23, 14), (2, 3, 4, 4)) for x in range(8): for y in range(10): self.assertEqual( dst.get_at((x, y)), tst.get_at((x, y)), "%s != %s at (%i, %i)" % (dst.get_at((x, y)), tst.get_at((x, y)), x, y), ) def test_blit_blend_premultiplied(self): def test_premul_surf( src_col, dst_col, src_size=(16, 16), dst_size=(16, 16), src_bit_depth=32, dst_bit_depth=32, src_has_alpha=True, dst_has_alpha=True, ): if src_bit_depth == 8: src = pygame.Surface(src_size, 0, src_bit_depth) palette = [src_col, dst_col] src.set_palette(palette) src.fill(palette[0]) elif src_has_alpha: src = pygame.Surface(src_size, SRCALPHA, src_bit_depth) src.fill(src_col) else: src = pygame.Surface(src_size, 0, src_bit_depth) src.fill(src_col) if dst_bit_depth == 8: dst = pygame.Surface(dst_size, 0, dst_bit_depth) palette = [src_col, dst_col] dst.set_palette(palette) dst.fill(palette[1]) elif dst_has_alpha: dst = pygame.Surface(dst_size, SRCALPHA, dst_bit_depth) dst.fill(dst_col) else: dst = pygame.Surface(dst_size, 0, dst_bit_depth) dst.fill(dst_col) dst.blit(src, (0, 0), special_flags=BLEND_PREMULTIPLIED) actual_col = dst.get_at( (int(float(src_size[0] / 2.0)), int(float(src_size[0] / 2.0))) ) # This is the blend pre-multiplied formula if src_col.a == 0: expected_col = dst_col elif src_col.a == 255: expected_col = src_col else: # sC + dC - (((dC + 1) * sA >> 8) expected_col = pygame.Color( (src_col.r + dst_col.r - ((dst_col.r + 1) * src_col.a >> 8)), (src_col.g + dst_col.g - ((dst_col.g + 1) * src_col.a >> 8)), (src_col.b + dst_col.b - ((dst_col.b + 1) * src_col.a >> 8)), (src_col.a + dst_col.a - ((dst_col.a + 1) * src_col.a >> 8)), ) if not dst_has_alpha: expected_col.a = 255 return (expected_col, actual_col) # # Colour Tests self.assertEqual( *test_premul_surf(pygame.Color(40, 20, 0, 51), pygame.Color(40, 20, 0, 51)) ) self.assertEqual( *test_premul_surf(pygame.Color(0, 0, 0, 0), pygame.Color(40, 20, 0, 51)) ) self.assertEqual( *test_premul_surf(pygame.Color(40, 20, 0, 51), pygame.Color(0, 0, 0, 0)) ) self.assertEqual( *test_premul_surf(pygame.Color(0, 0, 0, 0), pygame.Color(0, 0, 0, 0)) ) self.assertEqual( *test_premul_surf(pygame.Color(2, 2, 2, 2), pygame.Color(40, 20, 0, 51)) ) self.assertEqual( *test_premul_surf(pygame.Color(40, 20, 0, 51), pygame.Color(2, 2, 2, 2)) ) self.assertEqual( *test_premul_surf(pygame.Color(2, 2, 2, 2), pygame.Color(2, 2, 2, 2)) ) self.assertEqual( *test_premul_surf(pygame.Color(9, 9, 9, 9), pygame.Color(40, 20, 0, 51)) ) self.assertEqual( *test_premul_surf(pygame.Color(40, 20, 0, 51), pygame.Color(9, 9, 9, 9)) ) self.assertEqual( *test_premul_surf(pygame.Color(9, 9, 9, 9), pygame.Color(9, 9, 9, 9)) ) self.assertEqual( *test_premul_surf( pygame.Color(127, 127, 127, 127), pygame.Color(40, 20, 0, 51) ) ) self.assertEqual( *test_premul_surf( pygame.Color(40, 20, 0, 51), pygame.Color(127, 127, 127, 127) ) ) self.assertEqual( *test_premul_surf( pygame.Color(127, 127, 127, 127), pygame.Color(127, 127, 127, 127) ) ) self.assertEqual( *test_premul_surf( pygame.Color(200, 200, 200, 200), pygame.Color(40, 20, 0, 51) ) ) self.assertEqual( *test_premul_surf( pygame.Color(40, 20, 0, 51), pygame.Color(200, 200, 200, 200) ) ) self.assertEqual( *test_premul_surf( pygame.Color(200, 200, 200, 200), pygame.Color(200, 200, 200, 200) ) ) self.assertEqual( *test_premul_surf( pygame.Color(255, 255, 255, 255), pygame.Color(40, 20, 0, 51) ) ) self.assertEqual( *test_premul_surf( pygame.Color(40, 20, 0, 51), pygame.Color(255, 255, 255, 255) ) ) self.assertEqual( *test_premul_surf( pygame.Color(255, 255, 255, 255), pygame.Color(255, 255, 255, 255) ) ) # Surface format tests self.assertRaises( IndexError, test_premul_surf, pygame.Color(255, 255, 255, 255), pygame.Color(255, 255, 255, 255), src_size=(0, 0), dst_size=(0, 0), ) self.assertEqual( *test_premul_surf( pygame.Color(40, 20, 0, 51), pygame.Color(30, 20, 0, 51), src_size=(4, 4), dst_size=(9, 9), ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 51), pygame.Color(40, 20, 0, 51), src_size=(17, 67), dst_size=(69, 69), ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 51), src_size=(17, 67), dst_size=(69, 69), src_has_alpha=True, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 51), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), dst_has_alpha=False, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), src_has_alpha=False, dst_has_alpha=False, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), dst_bit_depth=24, src_has_alpha=True, dst_has_alpha=False, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), src_bit_depth=24, src_has_alpha=False, dst_has_alpha=True, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), src_bit_depth=24, dst_bit_depth=24, src_has_alpha=False, dst_has_alpha=False, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), src_bit_depth=8, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), dst_bit_depth=8, ) ) self.assertEqual( *test_premul_surf( pygame.Color(30, 20, 0, 255), pygame.Color(40, 20, 0, 255), src_size=(17, 67), dst_size=(69, 69), src_bit_depth=8, dst_bit_depth=8, ) ) def test_blit_blend_big_rect(self): """test that an oversized rect works ok.""" color = (1, 2, 3, 255) area = (1, 1, 30, 30) s1 = pygame.Surface((4, 4), 0, 32) r = s1.fill(special_flags=pygame.BLEND_ADD, color=color, rect=area) self.assertEqual(pygame.Rect((1, 1, 3, 3)), r) self.assertEqual(s1.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(s1.get_at((1, 1)), color) black = pygame.Color("black") red = pygame.Color("red") self.assertNotEqual(black, red) surf = pygame.Surface((10, 10), 0, 32) surf.fill(black) subsurf = surf.subsurface(pygame.Rect(0, 1, 10, 8)) self.assertEqual(surf.get_at((0, 0)), black) self.assertEqual(surf.get_at((0, 9)), black) subsurf.fill(red, (0, -1, 10, 1), pygame.BLEND_RGB_ADD) self.assertEqual(surf.get_at((0, 0)), black) self.assertEqual(surf.get_at((0, 9)), black) subsurf.fill(red, (0, 8, 10, 1), pygame.BLEND_RGB_ADD) self.assertEqual(surf.get_at((0, 0)), black) self.assertEqual(surf.get_at((0, 9)), black) def test_GET_PIXELVALS(self): # surface.h GET_PIXELVALS bug regarding whether of not # a surface has per-pixel alpha. Looking at the Amask # is not enough. The surface's SRCALPHA flag must also # be considered. Fix rev. 1923. src = self._make_surface(32, srcalpha=True) src.fill((0, 0, 0, 128)) src.set_alpha(None) # Clear SRCALPHA flag. dst = self._make_surface(32, srcalpha=True) dst.blit(src, (0, 0), special_flags=BLEND_RGBA_ADD) self.assertEqual(dst.get_at((0, 0)), (0, 0, 0, 255)) def test_fill_blend(self): destinations = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] blend = [ ("BLEND_ADD", (0, 25, 100, 255), lambda a, b: min(a + b, 255)), ("BLEND_SUB", (0, 25, 100, 255), lambda a, b: max(a - b, 0)), ("BLEND_MULT", (0, 7, 100, 255), lambda a, b: ((a * b) + 255) >> 8), ("BLEND_MIN", (0, 255, 0, 255), min), ("BLEND_MAX", (0, 255, 0, 255), max), ] for dst in destinations: dst_palette = [dst.unmap_rgb(dst.map_rgb(c)) for c in self._test_palette] for blend_name, fill_color, op in blend: fc = dst.unmap_rgb(dst.map_rgb(fill_color)) self._fill_surface(dst) p = [] for dc in dst_palette: c = [op(dc[i], fc[i]) for i in range(3)] if dst.get_masks()[3]: c.append(dc[3]) else: c.append(255) c = dst.unmap_rgb(dst.map_rgb(c)) p.append(c) dst.fill(fill_color, special_flags=getattr(pygame, blend_name)) self._assert_surface(dst, p, f", {blend_name}") def test_fill_blend_rgba(self): destinations = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] blend = [ ("BLEND_RGBA_ADD", (0, 25, 100, 255), lambda a, b: min(a + b, 255)), ("BLEND_RGBA_SUB", (0, 25, 100, 255), lambda a, b: max(a - b, 0)), ("BLEND_RGBA_MULT", (0, 7, 100, 255), lambda a, b: ((a * b) + 255) >> 8), ("BLEND_RGBA_MIN", (0, 255, 0, 255), min), ("BLEND_RGBA_MAX", (0, 255, 0, 255), max), ] for dst in destinations: dst_palette = [dst.unmap_rgb(dst.map_rgb(c)) for c in self._test_palette] for blend_name, fill_color, op in blend: fc = dst.unmap_rgb(dst.map_rgb(fill_color)) self._fill_surface(dst) p = [] for dc in dst_palette: c = [op(dc[i], fc[i]) for i in range(4)] if not dst.get_masks()[3]: c[3] = 255 c = dst.unmap_rgb(dst.map_rgb(c)) p.append(c) dst.fill(fill_color, special_flags=getattr(pygame, blend_name)) self._assert_surface(dst, p, f", {blend_name}") def test_surface_premul_alpha(self): """Ensure that .premul_alpha() works correctly""" # basic functionality at valid bit depths - 32, 16 & 8 s1 = pygame.Surface((100, 100), pygame.SRCALPHA, 32) s1.fill(pygame.Color(255, 255, 255, 100)) s1_alpha = s1.premul_alpha() self.assertEqual(s1_alpha.get_at((50, 50)), pygame.Color(100, 100, 100, 100)) # 16 bit colour has less precision s2 = pygame.Surface((100, 100), pygame.SRCALPHA, 16) s2.fill(pygame.Color(255, 255, 255, 170)) s2_alpha = s2.premul_alpha() self.assertEqual(s2_alpha.get_at((50, 50)), pygame.Color(170, 170, 170, 170)) # invalid surface - we need alpha to pre-multiply invalid_surf = pygame.Surface((100, 100), 0, 32) invalid_surf.fill(pygame.Color(255, 255, 255, 100)) with self.assertRaises(ValueError): invalid_surf.premul_alpha() # churn a bunch of values test_colors = [ (200, 30, 74), (76, 83, 24), (184, 21, 6), (74, 4, 74), (76, 83, 24), (184, 21, 234), (160, 30, 74), (96, 147, 204), (198, 201, 60), (132, 89, 74), (245, 9, 224), (184, 112, 6), ] for r, g, b in test_colors: for a in range(255): with self.subTest(r=r, g=g, b=b, a=a): surf = pygame.Surface((10, 10), pygame.SRCALPHA, 32) surf.fill(pygame.Color(r, g, b, a)) surf = surf.premul_alpha() self.assertEqual( surf.get_at((5, 5)), Color( ((r + 1) * a) >> 8, ((g + 1) * a) >> 8, ((b + 1) * a) >> 8, a, ), ) class SurfaceSelfBlitTest(unittest.TestCase): """Blit to self tests. This test case is in response to https://github.com/pygame/pygame/issues/19 """ def setUp(self): # Needed for 8 bits-per-pixel color palette surface tests. pygame.display.init() def tearDown(self): pygame.display.quit() _test_palette = [(0, 0, 0, 255), (255, 0, 0, 0), (0, 255, 0, 255)] surf_size = (9, 6) def _fill_surface(self, surf, palette=None): if palette is None: palette = self._test_palette surf.fill(palette[1]) surf.fill(palette[2], (1, 2, 1, 2)) def _make_surface(self, bitsize, srcalpha=False, palette=None): if palette is None: palette = self._test_palette flags = 0 if srcalpha: flags |= SRCALPHA surf = pygame.Surface(self.surf_size, flags, bitsize) if bitsize == 8: surf.set_palette([c[:3] for c in palette]) self._fill_surface(surf, palette) return surf def _assert_same(self, a, b): w, h = a.get_size() for x in range(w): for y in range(h): self.assertEqual( a.get_at((x, y)), b.get_at((x, y)), ( "%s != %s, bpp: %i" % (a.get_at((x, y)), b.get_at((x, y)), a.get_bitsize()) ), ) def test_overlap_check(self): # Ensure overlapping blits are properly detected. There are two # places where this is done, within SoftBlitPyGame() in alphablit.c # and PySurface_Blit() in surface.c. SoftBlitPyGame should catch the # per-pixel alpha surface, PySurface_Blit the colorkey and blanket # alpha surface. per-pixel alpha and blanket alpha self blits are # not properly handled by SDL 1.2.13, so Pygame does them. bgc = (0, 0, 0, 255) rectc_left = (128, 64, 32, 255) rectc_right = (255, 255, 255, 255) colors = [(255, 255, 255, 255), (128, 64, 32, 255)] overlaps = [ (0, 0, 1, 0, (50, 0)), (0, 0, 49, 1, (98, 2)), (0, 0, 49, 49, (98, 98)), (49, 0, 0, 1, (0, 2)), (49, 0, 0, 49, (0, 98)), ] surfs = [pygame.Surface((100, 100), SRCALPHA, 32)] surf = pygame.Surface((100, 100), 0, 32) surf.set_alpha(255) surfs.append(surf) surf = pygame.Surface((100, 100), 0, 32) surf.set_colorkey((0, 1, 0)) surfs.append(surf) for surf in surfs: for s_x, s_y, d_x, d_y, test_posn in overlaps: surf.fill(bgc) surf.fill(rectc_right, (25, 0, 25, 50)) surf.fill(rectc_left, (0, 0, 25, 50)) surf.blit(surf, (d_x, d_y), (s_x, s_y, 50, 50)) self.assertEqual(surf.get_at(test_posn), rectc_right) # https://github.com/pygame/pygame/issues/370#issuecomment-364625291 @unittest.skipIf("ppc64le" in platform.uname(), "known ppc64le issue") def test_colorkey(self): # Check a workaround for an SDL 1.2.13 surface self-blit problem # https://github.com/pygame/pygame/issues/19 pygame.display.set_mode((100, 50)) # Needed for 8bit surface bitsizes = [8, 16, 24, 32] for bitsize in bitsizes: surf = self._make_surface(bitsize) surf.set_colorkey(self._test_palette[1]) surf.blit(surf, (3, 0)) p = [] for c in self._test_palette: c = surf.unmap_rgb(surf.map_rgb(c)) p.append(c) p[1] = (p[1][0], p[1][1], p[1][2], 0) tmp = self._make_surface(32, srcalpha=True, palette=p) tmp.blit(tmp, (3, 0)) tmp.set_alpha(None) comp = self._make_surface(bitsize) comp.blit(tmp, (0, 0)) self._assert_same(surf, comp) # https://github.com/pygame/pygame/issues/370#issuecomment-364625291 @unittest.skipIf("ppc64le" in platform.uname(), "known ppc64le issue") def test_blanket_alpha(self): # Check a workaround for an SDL 1.2.13 surface self-blit problem # https://github.com/pygame/pygame/issues/19 pygame.display.set_mode((100, 50)) # Needed for 8bit surface bitsizes = [8, 16, 24, 32] for bitsize in bitsizes: surf = self._make_surface(bitsize) surf.set_alpha(128) surf.blit(surf, (3, 0)) p = [] for c in self._test_palette: c = surf.unmap_rgb(surf.map_rgb(c)) p.append((c[0], c[1], c[2], 128)) tmp = self._make_surface(32, srcalpha=True, palette=p) tmp.blit(tmp, (3, 0)) tmp.set_alpha(None) comp = self._make_surface(bitsize) comp.blit(tmp, (0, 0)) self._assert_same(surf, comp) def test_pixel_alpha(self): bitsizes = [16, 32] for bitsize in bitsizes: surf = self._make_surface(bitsize, srcalpha=True) comp = self._make_surface(bitsize, srcalpha=True) comp.blit(surf, (3, 0)) surf.blit(surf, (3, 0)) self._assert_same(surf, comp) def test_blend(self): bitsizes = [8, 16, 24, 32] blends = ["BLEND_ADD", "BLEND_SUB", "BLEND_MULT", "BLEND_MIN", "BLEND_MAX"] for bitsize in bitsizes: surf = self._make_surface(bitsize) comp = self._make_surface(bitsize) for blend in blends: self._fill_surface(surf) self._fill_surface(comp) comp.blit(surf, (3, 0), special_flags=getattr(pygame, blend)) surf.blit(surf, (3, 0), special_flags=getattr(pygame, blend)) self._assert_same(surf, comp) def test_blend_rgba(self): bitsizes = [16, 32] blends = [ "BLEND_RGBA_ADD", "BLEND_RGBA_SUB", "BLEND_RGBA_MULT", "BLEND_RGBA_MIN", "BLEND_RGBA_MAX", ] for bitsize in bitsizes: surf = self._make_surface(bitsize, srcalpha=True) comp = self._make_surface(bitsize, srcalpha=True) for blend in blends: self._fill_surface(surf) self._fill_surface(comp) comp.blit(surf, (3, 0), special_flags=getattr(pygame, blend)) surf.blit(surf, (3, 0), special_flags=getattr(pygame, blend)) self._assert_same(surf, comp) def test_subsurface(self): # Blitting a surface to its subsurface is allowed. surf = self._make_surface(32, srcalpha=True) comp = surf.copy() comp.blit(surf, (3, 0)) sub = surf.subsurface((3, 0, 6, 6)) sub.blit(surf, (0, 0)) del sub self._assert_same(surf, comp) # Blitting a subsurface to its owner is forbidden because of # lock conflicts. This limitation allows the overlap check # in PySurface_Blit of alphablit.c to be simplified. def do_blit(d, s): d.blit(s, (0, 0)) sub = surf.subsurface((1, 1, 2, 2)) self.assertRaises(pygame.error, do_blit, surf, sub) def test_copy_alpha(self): """issue 581: alpha of surface copy with SRCALPHA is set to 0.""" surf = pygame.Surface((16, 16), pygame.SRCALPHA, 32) self.assertEqual(surf.get_alpha(), 255) surf2 = surf.copy() self.assertEqual(surf2.get_alpha(), 255) class SurfaceFillTest(unittest.TestCase): def setUp(self): pygame.display.init() def tearDown(self): pygame.display.quit() def test_fill(self): screen = pygame.display.set_mode((640, 480)) # Green and blue test pattern screen.fill((0, 255, 0), (0, 0, 320, 240)) screen.fill((0, 255, 0), (320, 240, 320, 240)) screen.fill((0, 0, 255), (320, 0, 320, 240)) screen.fill((0, 0, 255), (0, 240, 320, 240)) # Now apply a clip rect, such that only the left side of the # screen should be effected by blit operations. screen.set_clip((0, 0, 320, 480)) # Test fills with each special flag, and additionally without any. screen.fill((255, 0, 0, 127), (160, 0, 320, 30), 0) screen.fill((255, 0, 0, 127), (160, 30, 320, 30), pygame.BLEND_ADD) screen.fill((0, 127, 127, 127), (160, 60, 320, 30), pygame.BLEND_SUB) screen.fill((0, 63, 63, 127), (160, 90, 320, 30), pygame.BLEND_MULT) screen.fill((0, 127, 127, 127), (160, 120, 320, 30), pygame.BLEND_MIN) screen.fill((127, 0, 0, 127), (160, 150, 320, 30), pygame.BLEND_MAX) screen.fill((255, 0, 0, 127), (160, 180, 320, 30), pygame.BLEND_RGBA_ADD) screen.fill((0, 127, 127, 127), (160, 210, 320, 30), pygame.BLEND_RGBA_SUB) screen.fill((0, 63, 63, 127), (160, 240, 320, 30), pygame.BLEND_RGBA_MULT) screen.fill((0, 127, 127, 127), (160, 270, 320, 30), pygame.BLEND_RGBA_MIN) screen.fill((127, 0, 0, 127), (160, 300, 320, 30), pygame.BLEND_RGBA_MAX) screen.fill((255, 0, 0, 127), (160, 330, 320, 30), pygame.BLEND_RGB_ADD) screen.fill((0, 127, 127, 127), (160, 360, 320, 30), pygame.BLEND_RGB_SUB) screen.fill((0, 63, 63, 127), (160, 390, 320, 30), pygame.BLEND_RGB_MULT) screen.fill((0, 127, 127, 127), (160, 420, 320, 30), pygame.BLEND_RGB_MIN) screen.fill((255, 0, 0, 127), (160, 450, 320, 30), pygame.BLEND_RGB_MAX) # Update the display so we can see the results pygame.display.flip() # Compare colors on both sides of window for y in range(5, 480, 10): self.assertEqual(screen.get_at((10, y)), screen.get_at((330, 480 - y))) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/surfarray_tags.py0000644000175100001770000000040414676242340017002 0ustar00runnerdocker__tags__ = ["array"] exclude = False try: import numpy except ImportError: exclude = True else: try: import pygame.pixelcopy except ImportError: exclude = True if exclude: __tags__.extend(("ignore", "subprocess_ignore")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/surfarray_test.py0000644000175100001770000006232414676242340017034 0ustar00runnerdockerimport unittest import platform from numpy import ( uint8, uint16, uint32, uint64, zeros, float32, float64, all as alltrue, rint, arange, ) import pygame from pygame.locals import * import pygame.surfarray IS_PYPY = "PyPy" == platform.python_implementation() @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class SurfarrayModuleTest(unittest.TestCase): pixels2d = {8: True, 16: True, 24: False, 32: True} pixels3d = {8: False, 16: False, 24: True, 32: True} array2d = {8: True, 16: True, 24: True, 32: True} array3d = {8: False, 16: False, 24: True, 32: True} test_palette = [ (0, 0, 0, 255), (10, 30, 60, 255), (25, 75, 100, 255), (100, 150, 200, 255), (0, 100, 200, 255), ] surf_size = (10, 12) test_points = [ ((0, 0), 1), ((4, 5), 1), ((9, 0), 2), ((5, 5), 2), ((0, 11), 3), ((4, 6), 3), ((9, 11), 4), ((5, 6), 4), ] @classmethod def setUpClass(cls): # Needed for 8 bits-per-pixel color palette surface tests. pygame.init() @classmethod def tearDownClass(cls): pygame.quit() def setUp(cls): # This makes sure pygame is always initialized before each test (in # case a test calls pygame.quit()). if not pygame.get_init(): pygame.init() def _make_surface(self, bitsize, srcalpha=False, palette=None): if palette is None: palette = self.test_palette flags = 0 if srcalpha: flags |= SRCALPHA surf = pygame.Surface(self.surf_size, flags, bitsize) if bitsize == 8: surf.set_palette([c[:3] for c in palette]) return surf def _fill_surface(self, surf, palette=None): if palette is None: palette = self.test_palette surf.fill(palette[1], (0, 0, 5, 6)) surf.fill(palette[2], (5, 0, 5, 6)) surf.fill(palette[3], (0, 6, 5, 6)) surf.fill(palette[4], (5, 6, 5, 6)) def _make_src_surface(self, bitsize, srcalpha=False, palette=None): surf = self._make_surface(bitsize, srcalpha, palette) self._fill_surface(surf, palette) return surf def _assert_surface(self, surf, palette=None, msg=""): if palette is None: palette = self.test_palette if surf.get_bitsize() == 16: palette = [surf.unmap_rgb(surf.map_rgb(c)) for c in palette] for posn, i in self.test_points: self.assertEqual( surf.get_at(posn), palette[i], "%s != %s: flags: %i, bpp: %i, posn: %s%s" % ( surf.get_at(posn), palette[i], surf.get_flags(), surf.get_bitsize(), posn, msg, ), ) def _make_array3d(self, dtype): return zeros((self.surf_size[0], self.surf_size[1], 3), dtype) def _fill_array2d(self, arr, surf): palette = self.test_palette arr[:5, :6] = surf.map_rgb(palette[1]) & 0xFFFFFFFF arr[5:, :6] = surf.map_rgb(palette[2]) & 0xFFFFFFFF arr[:5, 6:] = surf.map_rgb(palette[3]) & 0xFFFFFFFF arr[5:, 6:] = surf.map_rgb(palette[4]) & 0xFFFFFFFF def _fill_array3d(self, arr): palette = self.test_palette arr[:5, :6] = palette[1][:3] arr[5:, :6] = palette[2][:3] arr[:5, 6:] = palette[3][:3] arr[5:, 6:] = palette[4][:3] def _make_src_array3d(self, dtype): arr = self._make_array3d(dtype) self._fill_array3d(arr) return arr def _make_array2d(self, dtype): return zeros(self.surf_size, dtype) def test_array2d(self): sources = [ self._make_src_surface(8), self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] palette = self.test_palette alpha_color = (0, 0, 0, 128) for surf in sources: arr = pygame.surfarray.array2d(surf) for posn, i in self.test_points: self.assertEqual( arr[posn], surf.get_at_mapped(posn), "%s != %s: flags: %i, bpp: %i, posn: %s" % ( arr[posn], surf.get_at_mapped(posn), surf.get_flags(), surf.get_bitsize(), posn, ), ) if surf.get_masks()[3]: surf.fill(alpha_color) arr = pygame.surfarray.array2d(surf) posn = (0, 0) self.assertEqual( arr[posn], surf.get_at_mapped(posn), "%s != %s: bpp: %i" % (arr[posn], surf.get_at_mapped(posn), surf.get_bitsize()), ) def test_array3d(self): sources = [ self._make_src_surface(16), self._make_src_surface(16, srcalpha=True), self._make_src_surface(24), self._make_src_surface(32), self._make_src_surface(32, srcalpha=True), ] palette = self.test_palette for surf in sources: arr = pygame.surfarray.array3d(surf) def same_color(ac, sc): return ac[0] == sc[0] and ac[1] == sc[1] and ac[2] == sc[2] for posn, i in self.test_points: self.assertTrue( same_color(arr[posn], surf.get_at(posn)), "%s != %s: flags: %i, bpp: %i, posn: %s" % ( tuple(arr[posn]), surf.get_at(posn), surf.get_flags(), surf.get_bitsize(), posn, ), ) def test_array_alpha(self): palette = [ (0, 0, 0, 0), (10, 50, 100, 255), (60, 120, 240, 130), (64, 128, 255, 0), (255, 128, 0, 65), ] targets = [ self._make_src_surface(8, palette=palette), self._make_src_surface(16, palette=palette), self._make_src_surface(16, palette=palette, srcalpha=True), self._make_src_surface(24, palette=palette), self._make_src_surface(32, palette=palette), self._make_src_surface(32, palette=palette, srcalpha=True), ] for surf in targets: p = palette if surf.get_bitsize() == 16: p = [surf.unmap_rgb(surf.map_rgb(c)) for c in p] arr = pygame.surfarray.array_alpha(surf) if surf.get_masks()[3]: for (x, y), i in self.test_points: self.assertEqual( arr[x, y], p[i][3], ( "%i != %i, posn: (%i, %i), " "bitsize: %i" % (arr[x, y], p[i][3], x, y, surf.get_bitsize()) ), ) else: self.assertTrue(alltrue(arr == 255)) # No per-pixel alpha when blanket alpha is None. for surf in targets: blanket_alpha = surf.get_alpha() surf.set_alpha(None) arr = pygame.surfarray.array_alpha(surf) self.assertTrue( alltrue(arr == 255), "All alpha values should be 255 when" " surf.set_alpha(None) has been set." " bitsize: %i, flags: %i" % (surf.get_bitsize(), surf.get_flags()), ) surf.set_alpha(blanket_alpha) # Bug for per-pixel alpha surface when blanket alpha 0. for surf in targets: blanket_alpha = surf.get_alpha() surf.set_alpha(0) arr = pygame.surfarray.array_alpha(surf) if surf.get_masks()[3]: self.assertFalse( alltrue(arr == 255), "bitsize: %i, flags: %i" % (surf.get_bitsize(), surf.get_flags()), ) else: self.assertTrue( alltrue(arr == 255), "bitsize: %i, flags: %i" % (surf.get_bitsize(), surf.get_flags()), ) surf.set_alpha(blanket_alpha) def test_array_colorkey(self): palette = [ (0, 0, 0, 0), (10, 50, 100, 255), (60, 120, 240, 130), (64, 128, 255, 0), (255, 128, 0, 65), ] targets = [ self._make_src_surface(8, palette=palette), self._make_src_surface(16, palette=palette), self._make_src_surface(16, palette=palette, srcalpha=True), self._make_src_surface(24, palette=palette), self._make_src_surface(32, palette=palette), self._make_src_surface(32, palette=palette, srcalpha=True), ] for surf in targets: p = palette if surf.get_bitsize() == 16: p = [surf.unmap_rgb(surf.map_rgb(c)) for c in p] surf.set_colorkey(None) arr = pygame.surfarray.array_colorkey(surf) self.assertTrue(alltrue(arr == 255)) for i in range(1, len(palette)): surf.set_colorkey(p[i]) alphas = [255] * len(p) alphas[i] = 0 arr = pygame.surfarray.array_colorkey(surf) for (x, y), j in self.test_points: self.assertEqual( arr[x, y], alphas[j], ( "%i != %i, posn: (%i, %i), " "bitsize: %i" % (arr[x, y], alphas[j], x, y, surf.get_bitsize()) ), ) def test_array_red(self): self._test_array_rgb("red", 0) def test_array_green(self): self._test_array_rgb("green", 1) def test_array_blue(self): self._test_array_rgb("blue", 2) def _test_array_rgb(self, operation, mask_posn): method_name = "array_" + operation array_rgb = getattr(pygame.surfarray, method_name) palette = [ (0, 0, 0, 255), (5, 13, 23, 255), (29, 31, 37, 255), (131, 157, 167, 255), (179, 191, 251, 255), ] plane = [c[mask_posn] for c in palette] targets = [ self._make_src_surface(24, palette=palette), self._make_src_surface(32, palette=palette), self._make_src_surface(32, palette=palette, srcalpha=True), ] for surf in targets: self.assertFalse(surf.get_locked()) for (x, y), i in self.test_points: surf.fill(palette[i]) arr = array_rgb(surf) self.assertEqual(arr[x, y], plane[i]) surf.fill((100, 100, 100, 250)) self.assertEqual(arr[x, y], plane[i]) self.assertFalse(surf.get_locked()) del arr def test_blit_array(self): s = pygame.Surface((10, 10), 0, 24) a = pygame.surfarray.array3d(s) pygame.surfarray.blit_array(s, a) # target surfaces targets = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] # source arrays arrays3d = [] dtypes = [(8, uint8), (16, uint16), (32, uint32)] try: dtypes.append((64, uint64)) except NameError: pass arrays3d = [(self._make_src_array3d(dtype), None) for __, dtype in dtypes] for bitsize in [8, 16, 24, 32]: palette = None if bitsize == 16: s = pygame.Surface((1, 1), 0, 16) palette = [s.unmap_rgb(s.map_rgb(c)) for c in self.test_palette] if self.pixels3d[bitsize]: surf = self._make_src_surface(bitsize) arr = pygame.surfarray.pixels3d(surf) arrays3d.append((arr, palette)) if self.array3d[bitsize]: surf = self._make_src_surface(bitsize) arr = pygame.surfarray.array3d(surf) arrays3d.append((arr, palette)) for sz, dtype in dtypes: arrays3d.append((arr.astype(dtype), palette)) # tests on arrays def do_blit(surf, arr): pygame.surfarray.blit_array(surf, arr) for surf in targets: bitsize = surf.get_bitsize() for arr, palette in arrays3d: surf.fill((0, 0, 0, 0)) if bitsize == 8: self.assertRaises(ValueError, do_blit, surf, arr) else: pygame.surfarray.blit_array(surf, arr) self._assert_surface(surf, palette) if self.pixels2d[bitsize]: surf.fill((0, 0, 0, 0)) s = self._make_src_surface(bitsize, surf.get_flags() & SRCALPHA) arr = pygame.surfarray.pixels2d(s) pygame.surfarray.blit_array(surf, arr) self._assert_surface(surf) if self.array2d[bitsize]: s = self._make_src_surface(bitsize, surf.get_flags() & SRCALPHA) arr = pygame.surfarray.array2d(s) for sz, dtype in dtypes: surf.fill((0, 0, 0, 0)) if sz >= bitsize: pygame.surfarray.blit_array(surf, arr.astype(dtype)) self._assert_surface(surf) else: self.assertRaises( ValueError, do_blit, surf, self._make_array2d(dtype) ) # Check alpha for 2D arrays surf = self._make_surface(16, srcalpha=True) arr = zeros(surf.get_size(), uint16) arr[...] = surf.map_rgb((0, 128, 255, 64)) color = surf.unmap_rgb(arr[0, 0]) pygame.surfarray.blit_array(surf, arr) self.assertEqual(surf.get_at((5, 5)), color) surf = self._make_surface(32, srcalpha=True) arr = zeros(surf.get_size(), uint32) color = (0, 111, 255, 63) arr[...] = surf.map_rgb(color) pygame.surfarray.blit_array(surf, arr) self.assertEqual(surf.get_at((5, 5)), color) # Check shifts arr3d = self._make_src_array3d(uint8) shift_tests = [ (16, [12, 0, 8, 4], [0xF000, 0xF, 0xF00, 0xF0]), (24, [16, 0, 8, 0], [0xFF0000, 0xFF, 0xFF00, 0]), (32, [0, 16, 24, 8], [0xFF, 0xFF0000, 0xFF000000, 0xFF00]), ] for bitsize, shifts, masks in shift_tests: surf = self._make_surface(bitsize, srcalpha=(shifts[3] != 0)) palette = None if bitsize == 16: palette = [surf.unmap_rgb(surf.map_rgb(c)) for c in self.test_palette] self.assertRaises(TypeError, surf.set_shifts, shifts) self.assertRaises(TypeError, surf.set_masks, masks) # Invalid arrays surf = pygame.Surface((1, 1), 0, 32) t = "abcd" self.assertRaises(ValueError, do_blit, surf, t) surf_size = self.surf_size surf = pygame.Surface(surf_size, 0, 32) arr = zeros([surf_size[0], surf_size[1] + 1, 3], uint32) self.assertRaises(ValueError, do_blit, surf, arr) arr = zeros([surf_size[0] + 1, surf_size[1], 3], uint32) self.assertRaises(ValueError, do_blit, surf, arr) surf = pygame.Surface((1, 4), 0, 32) arr = zeros((4,), uint32) self.assertRaises(ValueError, do_blit, surf, arr) arr.shape = (1, 1, 1, 4) self.assertRaises(ValueError, do_blit, surf, arr) # Issue #81: round from float to int try: rint except NameError: pass else: surf = pygame.Surface((10, 10), pygame.SRCALPHA, 32) w, h = surf.get_size() length = w * h for dtype in [float32, float64]: surf.fill((255, 255, 255, 0)) farr = arange(0, length, dtype=dtype) farr.shape = w, h pygame.surfarray.blit_array(surf, farr) for x in range(w): for y in range(h): self.assertEqual( surf.get_at_mapped((x, y)), int(rint(farr[x, y])) ) # this test should be removed soon, when the function is deleted def test_get_arraytype(self): array_type = pygame.surfarray.get_arraytype() self.assertEqual(array_type, "numpy", f"unknown array type {array_type}") # this test should be removed soon, when the function is deleted def test_get_arraytypes(self): arraytypes = pygame.surfarray.get_arraytypes() self.assertIn("numpy", arraytypes) for atype in arraytypes: self.assertEqual(atype, "numpy", f"unknown array type {atype}") def test_make_surface(self): # How does one properly test this with 2d arrays. It makes no sense # since the pixel format is not entirely dependent on element size. # Just make sure the surface pixel size is at least as large as the # array element size I guess. # for bitsize, dtype in [(8, uint8), (16, uint16), (24, uint32)]: ## Even this simple assertion fails for 2d arrays. Where's the problem? ## surf = pygame.surfarray.make_surface(self._make_array2d(dtype)) ## self.assertGreaterEqual(surf.get_bitsize(), bitsize, ## "not %i >= %i)" % (surf.get_bitsize(), bitsize)) ## surf = pygame.surfarray.make_surface(self._make_src_array3d(dtype)) self._assert_surface(surf) # Issue #81: round from float to int try: rint except NameError: pass else: w = 9 h = 11 length = w * h for dtype in [float32, float64]: farr = arange(0, length, dtype=dtype) farr.shape = w, h surf = pygame.surfarray.make_surface(farr) for x in range(w): for y in range(h): self.assertEqual( surf.get_at_mapped((x, y)), int(rint(farr[x, y])) ) def test_map_array(self): arr3d = self._make_src_array3d(uint8) targets = [ self._make_surface(8), self._make_surface(16), self._make_surface(16, srcalpha=True), self._make_surface(24), self._make_surface(32), self._make_surface(32, srcalpha=True), ] palette = self.test_palette for surf in targets: arr2d = pygame.surfarray.map_array(surf, arr3d) for posn, i in self.test_points: self.assertEqual( arr2d[posn], surf.map_rgb(palette[i]), "%i != %i, bitsize: %i, flags: %i" % ( arr2d[posn], surf.map_rgb(palette[i]), surf.get_bitsize(), surf.get_flags(), ), ) # Exception checks self.assertRaises( ValueError, pygame.surfarray.map_array, self._make_surface(32), self._make_array2d(uint8), ) def test_pixels2d(self): sources = [ self._make_surface(8), self._make_surface(16, srcalpha=True), self._make_surface(32, srcalpha=True), ] for surf in sources: self.assertFalse(surf.get_locked()) arr = pygame.surfarray.pixels2d(surf) self.assertTrue(surf.get_locked()) self._fill_array2d(arr, surf) surf.unlock() self.assertTrue(surf.get_locked()) del arr self.assertFalse(surf.get_locked()) self.assertEqual(surf.get_locks(), ()) self._assert_surface(surf) # Error checks self.assertRaises(ValueError, pygame.surfarray.pixels2d, self._make_surface(24)) def test_pixels3d(self): sources = [self._make_surface(24), self._make_surface(32)] for surf in sources: self.assertFalse(surf.get_locked()) arr = pygame.surfarray.pixels3d(surf) self.assertTrue(surf.get_locked()) self._fill_array3d(arr) surf.unlock() self.assertTrue(surf.get_locked()) del arr self.assertFalse(surf.get_locked()) self.assertEqual(surf.get_locks(), ()) self._assert_surface(surf) # Alpha check color = (1, 2, 3, 0) surf = self._make_surface(32, srcalpha=True) arr = pygame.surfarray.pixels3d(surf) arr[0, 0] = color[:3] self.assertEqual(surf.get_at((0, 0)), color) # Error checks def do_pixels3d(surf): pygame.surfarray.pixels3d(surf) self.assertRaises(ValueError, do_pixels3d, self._make_surface(8)) self.assertRaises(ValueError, do_pixels3d, self._make_surface(16)) def test_pixels_alpha(self): palette = [ (0, 0, 0, 0), (127, 127, 127, 0), (127, 127, 127, 85), (127, 127, 127, 170), (127, 127, 127, 255), ] alphas = [0, 45, 86, 99, 180] surf = self._make_src_surface(32, srcalpha=True, palette=palette) self.assertFalse(surf.get_locked()) arr = pygame.surfarray.pixels_alpha(surf) self.assertTrue(surf.get_locked()) surf.unlock() self.assertTrue(surf.get_locked()) for (x, y), i in self.test_points: self.assertEqual(arr[x, y], palette[i][3]) for (x, y), i in self.test_points: alpha = alphas[i] arr[x, y] = alpha color = (127, 127, 127, alpha) self.assertEqual(surf.get_at((x, y)), color, "posn: (%i, %i)" % (x, y)) del arr self.assertFalse(surf.get_locked()) self.assertEqual(surf.get_locks(), ()) # Check exceptions. def do_pixels_alpha(surf): pygame.surfarray.pixels_alpha(surf) targets = [(8, False), (16, False), (16, True), (24, False), (32, False)] for bitsize, srcalpha in targets: self.assertRaises( ValueError, do_pixels_alpha, self._make_surface(bitsize, srcalpha) ) def test_pixels_red(self): self._test_pixels_rgb("red", 0) def test_pixels_green(self): self._test_pixels_rgb("green", 1) def test_pixels_blue(self): self._test_pixels_rgb("blue", 2) def _test_pixels_rgb(self, operation, mask_posn): method_name = "pixels_" + operation pixels_rgb = getattr(pygame.surfarray, method_name) palette = [ (0, 0, 0, 255), (5, 13, 23, 255), (29, 31, 37, 255), (131, 157, 167, 255), (179, 191, 251, 255), ] plane = [c[mask_posn] for c in palette] surf24 = self._make_src_surface(24, srcalpha=False, palette=palette) surf32 = self._make_src_surface(32, srcalpha=False, palette=palette) surf32a = self._make_src_surface(32, srcalpha=True, palette=palette) for surf in [surf24, surf32, surf32a]: self.assertFalse(surf.get_locked()) arr = pixels_rgb(surf) self.assertTrue(surf.get_locked()) surf.unlock() self.assertTrue(surf.get_locked()) for (x, y), i in self.test_points: self.assertEqual(arr[x, y], plane[i]) del arr self.assertFalse(surf.get_locked()) self.assertEqual(surf.get_locks(), ()) # Check exceptions. targets = [(8, False), (16, False), (16, True)] for bitsize, srcalpha in targets: self.assertRaises( ValueError, pixels_rgb, self._make_surface(bitsize, srcalpha) ) def test_use_arraytype(self): def do_use_arraytype(atype): pygame.surfarray.use_arraytype(atype) pygame.surfarray.use_arraytype("numpy") self.assertEqual(pygame.surfarray.get_arraytype(), "numpy") self.assertRaises(ValueError, do_use_arraytype, "not an option") def test_surf_lock(self): sf = pygame.Surface((5, 5), 0, 32) for atype in pygame.surfarray.get_arraytypes(): pygame.surfarray.use_arraytype(atype) ar = pygame.surfarray.pixels2d(sf) self.assertTrue(sf.get_locked()) sf.unlock() self.assertTrue(sf.get_locked()) del ar self.assertFalse(sf.get_locked()) self.assertEqual(sf.get_locks(), ()) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/surflock_test.py0000644000175100001770000001117014676242340016637 0ustar00runnerdockerimport unittest import sys import platform import pygame IS_PYPY = "PyPy" == platform.python_implementation() @unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO class SurfaceLockTest(unittest.TestCase): def test_lock(self): sf = pygame.Surface((5, 5)) sf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (sf,)) sf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (sf, sf)) sf.unlock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (sf,)) sf.unlock() self.assertEqual(sf.get_locked(), False) self.assertEqual(sf.get_locks(), ()) def test_subsurface_lock(self): sf = pygame.Surface((5, 5)) subsf = sf.subsurface((1, 1, 2, 2)) sf2 = pygame.Surface((5, 5)) # Simple blits, nothing should happen here. sf2.blit(subsf, (0, 0)) sf2.blit(sf, (0, 0)) # Test blitting on self: self.assertRaises(pygame.error, sf.blit, subsf, (0, 0)) # self.assertRaises(pygame.error, subsf.blit, sf, (0, 0)) # ^ Fails although it should not in my opinion. If I cannot # blit the subsurface to the surface, it should not be allowed # the other way around as well. # Test additional locks. sf.lock() sf2.blit(subsf, (0, 0)) self.assertRaises(pygame.error, sf2.blit, sf, (0, 0)) subsf.lock() self.assertRaises(pygame.error, sf2.blit, subsf, (0, 0)) self.assertRaises(pygame.error, sf2.blit, sf, (0, 0)) # sf and subsf are now explicitly locked. Unlock sf, so we can # (assume) to blit it. # It will fail though as the subsurface still has a lock around, # which is okay and correct behaviour. sf.unlock() self.assertRaises(pygame.error, sf2.blit, subsf, (0, 0)) self.assertRaises(pygame.error, sf2.blit, sf, (0, 0)) # Run a second unlock on the surface. This should ideally have # no effect as the subsurface is the locking reason! sf.unlock() self.assertRaises(pygame.error, sf2.blit, sf, (0, 0)) self.assertRaises(pygame.error, sf2.blit, subsf, (0, 0)) subsf.unlock() sf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (sf,)) self.assertEqual(subsf.get_locked(), False) self.assertEqual(subsf.get_locks(), ()) subsf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (sf, subsf)) self.assertEqual(subsf.get_locked(), True) self.assertEqual(subsf.get_locks(), (subsf,)) sf.unlock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (subsf,)) self.assertEqual(subsf.get_locked(), True) self.assertEqual(subsf.get_locks(), (subsf,)) subsf.unlock() self.assertEqual(sf.get_locked(), False) self.assertEqual(sf.get_locks(), ()) self.assertEqual(subsf.get_locked(), False) self.assertEqual(subsf.get_locks(), ()) subsf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (subsf,)) self.assertEqual(subsf.get_locked(), True) self.assertEqual(subsf.get_locks(), (subsf,)) subsf.lock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (subsf, subsf)) self.assertEqual(subsf.get_locked(), True) self.assertEqual(subsf.get_locks(), (subsf, subsf)) def test_pxarray_ref(self): sf = pygame.Surface((5, 5)) ar = pygame.PixelArray(sf) ar2 = pygame.PixelArray(sf) self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (ar, ar2)) del ar self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (ar2,)) ar = ar2[:] self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (ar2,)) del ar self.assertEqual(sf.get_locked(), True) self.assertEqual(len(sf.get_locks()), 1) def test_buffer(self): sf = pygame.Surface((5, 5)) buf = sf.get_buffer() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (buf,)) sf.unlock() self.assertEqual(sf.get_locked(), True) self.assertEqual(sf.get_locks(), (buf,)) del buf self.assertEqual(sf.get_locked(), False) self.assertEqual(sf.get_locks(), ()) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/sysfont_test.py0000644000175100001770000000266714676242340016527 0ustar00runnerdockerimport unittest import platform class SysfontModuleTest(unittest.TestCase): def test_create_aliases(self): import pygame.sysfont pygame.sysfont.initsysfonts() pygame.sysfont.create_aliases() self.assertTrue(len(pygame.sysfont.Sysalias) > 0) def test_initsysfonts(self): import pygame.sysfont pygame.sysfont.initsysfonts() self.assertTrue(len(pygame.sysfont.get_fonts()) > 0) @unittest.skipIf("Darwin" not in platform.platform(), "Not mac we skip.") def test_initsysfonts_darwin(self): import pygame.sysfont self.assertTrue(len(pygame.sysfont.get_fonts()) > 10) def test_sysfont(self): import pygame.font pygame.font.init() arial = pygame.font.SysFont("Arial", 40) self.assertTrue(isinstance(arial, pygame.font.Font)) @unittest.skipIf( ("Darwin" in platform.platform() or "Windows" in platform.platform()), "Not unix we skip.", ) def test_initsysfonts_unix(self): import pygame.sysfont self.assertTrue(len(pygame.sysfont.get_fonts()) > 0) @unittest.skipIf("Windows" not in platform.platform(), "Not windows we skip.") def test_initsysfonts_win32(self): import pygame.sysfont self.assertTrue(len(pygame.sysfont.get_fonts()) > 10) ############################################################################### if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0711257 pygame-2.6.1/test/test_utils/0000755000175100001770000000000014676242436015603 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/test_utils/__init__.py0000644000175100001770000001051514676242340017710 0ustar00runnerdockerimport os import pygame import sys import tempfile import time is_pygame_pkg = __name__.startswith("pygame.tests.") ############################################################################### def tostring(row): """Convert row of bytes to string. Expects `row` to be an ``array``. """ return row.tobytes() def geterror(): return sys.exc_info()[1] ############################################################################### this_dir = os.path.dirname(os.path.abspath(__file__)) trunk_dir = os.path.split(os.path.split(this_dir)[0])[0] if is_pygame_pkg: test_module = "tests" else: test_module = "test" def trunk_relative_path(relative): return os.path.normpath(os.path.join(trunk_dir, relative)) def fixture_path(path): return trunk_relative_path(os.path.join(test_module, "fixtures", path)) def example_path(path): return trunk_relative_path(os.path.join("examples", path)) sys.path.insert(0, trunk_relative_path(".")) ################################## TEMP FILES ################################# def get_tmp_dir(): return tempfile.mkdtemp() ############################################################################### def question(q): return input(f"\n{q.rstrip(' ')} (y/n): ").lower().strip() == "y" def prompt(p): return input(f"\n{p.rstrip(' ')} (press enter to continue): ") #################################### HELPERS ################################## def rgba_between(value, minimum=0, maximum=255): if value < minimum: return minimum elif value > maximum: return maximum else: return value def combinations(seqs): """ Recipe 496807 from ActiveState Python CookBook Non recursive technique for getting all possible combinations of a sequence of sequences. """ r = [[]] for x in seqs: r = [i + [y] for y in x for i in r] return r def gradient(width, height): """ Yields a pt and corresponding RGBA tuple, for every (width, height) combo. Useful for generating gradients. Actual gradient may be changed, no tests rely on specific values. Used in transform.rotate lossless tests to generate a fixture. """ for l in range(width): for t in range(height): yield (l, t), tuple(map(rgba_between, (l, t, l, l + t))) def rect_area_pts(rect): for l in range(rect.left, rect.right): for t in range(rect.top, rect.bottom): yield l, t def rect_perimeter_pts(rect): """ Returns pts ((L, T) tuples) encompassing the perimeter of a rect. The order is clockwise: topleft to topright topright to bottomright bottomright to bottomleft bottomleft to topleft Duplicate pts are not returned """ clock_wise_from_top_left = ( [(l, rect.top) for l in range(rect.left, rect.right)], [(rect.right - 1, t) for t in range(rect.top + 1, rect.bottom)], [(l, rect.bottom - 1) for l in range(rect.right - 2, rect.left - 1, -1)], [(rect.left, t) for t in range(rect.bottom - 2, rect.top, -1)], ) for line in clock_wise_from_top_left: yield from line def rect_outer_bounds(rect): """ Returns topleft outerbound if possible and then the other pts, that are "exclusive" bounds of the rect ?------O |RECT| ?|0)uterbound |----| O O """ return ([(rect.left - 1, rect.top)] if rect.left else []) + [ rect.topright, rect.bottomleft, rect.bottomright, ] def import_submodule(module): m = __import__(module) for n in module.split(".")[1:]: m = getattr(m, n) return m class SurfaceSubclass(pygame.Surface): """A subclassed Surface to test inheritance.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_attribute = True def test(): """ Lightweight test for helpers """ r = pygame.Rect(0, 0, 10, 10) assert rect_outer_bounds(r) == [(10, 0), (0, 10), (10, 10)] # tr # bl # br assert len(list(rect_area_pts(r))) == 100 r = pygame.Rect(0, 0, 3, 3) assert list(rect_perimeter_pts(r)) == [ (0, 0), (1, 0), (2, 0), # tl -> tr (2, 1), (2, 2), # tr -> br (1, 2), (0, 2), # br -> bl (0, 1), # bl -> tl ] print("Tests: OK") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/test_utils/arrinter.py0000644000175100001770000003455214676242340020006 0ustar00runnerdockerimport sys import ctypes from ctypes import * import unittest __all__ = [ "PAI_CONTIGUOUS", "PAI_FORTRAN", "PAI_ALIGNED", "PAI_NOTSWAPPED", "PAI_WRITEABLE", "PAI_ARR_HAS_DESCR", "ArrayInterface", ] if sizeof(c_uint) == sizeof(c_void_p): c_size_t = c_uint c_ssize_t = c_int elif sizeof(c_ulong) == sizeof(c_void_p): c_size_t = c_ulong c_ssize_t = c_long elif sizeof(c_ulonglong) == sizeof(c_void_p): c_size_t = c_ulonglong c_ssize_t = c_longlong SIZEOF_VOID_P = sizeof(c_void_p) if SIZEOF_VOID_P <= sizeof(c_int): Py_intptr_t = c_int elif SIZEOF_VOID_P <= sizeof(c_long): Py_intptr_t = c_long elif "c_longlong" in globals() and SIZEOF_VOID_P <= sizeof(c_longlong): Py_intptr_t = c_longlong else: raise RuntimeError("Unrecognized pointer size %i" % (SIZEOF_VOID_P,)) class PyArrayInterface(Structure): _fields_ = [ ("two", c_int), ("nd", c_int), ("typekind", c_char), ("itemsize", c_int), ("flags", c_int), ("shape", POINTER(Py_intptr_t)), ("strides", POINTER(Py_intptr_t)), ("data", c_void_p), ("descr", py_object), ] PAI_Ptr = POINTER(PyArrayInterface) try: PyCObject_AsVoidPtr = pythonapi.PyCObject_AsVoidPtr except AttributeError: def PyCObject_AsVoidPtr(o): raise TypeError("Not available") else: PyCObject_AsVoidPtr.restype = c_void_p PyCObject_AsVoidPtr.argtypes = [py_object] PyCObject_GetDesc = pythonapi.PyCObject_GetDesc PyCObject_GetDesc.restype = c_void_p PyCObject_GetDesc.argtypes = [py_object] try: PyCapsule_IsValid = pythonapi.PyCapsule_IsValid except AttributeError: def PyCapsule_IsValid(capsule, name): return 0 else: PyCapsule_IsValid.restype = c_int PyCapsule_IsValid.argtypes = [py_object, c_char_p] PyCapsule_GetPointer = pythonapi.PyCapsule_GetPointer PyCapsule_GetPointer.restype = c_void_p PyCapsule_GetPointer.argtypes = [py_object, c_char_p] PyCapsule_GetContext = pythonapi.PyCapsule_GetContext PyCapsule_GetContext.restype = c_void_p PyCapsule_GetContext.argtypes = [py_object] PyCapsule_Destructor = CFUNCTYPE(None, py_object) PyCapsule_New = pythonapi.PyCapsule_New PyCapsule_New.restype = py_object PyCapsule_New.argtypes = [c_void_p, c_char_p, POINTER(PyCapsule_Destructor)] def capsule_new(p): return PyCapsule_New(addressof(p), None, None) PAI_CONTIGUOUS = 0x01 PAI_FORTRAN = 0x02 PAI_ALIGNED = 0x100 PAI_NOTSWAPPED = 0x200 PAI_WRITEABLE = 0x400 PAI_ARR_HAS_DESCR = 0x800 class ArrayInterface: def __init__(self, arr): try: self._cobj = arr.__array_struct__ except AttributeError: raise TypeError("The array object lacks an array structure") if not self._cobj: raise TypeError("The array object has a NULL array structure value") try: vp = PyCObject_AsVoidPtr(self._cobj) except TypeError: if PyCapsule_IsValid(self._cobj, None): vp = PyCapsule_GetPointer(self._cobj, None) else: raise TypeError("The array object has an invalid array structure") self.desc = PyCapsule_GetContext(self._cobj) else: self.desc = PyCObject_GetDesc(self._cobj) self._inter = cast(vp, PAI_Ptr)[0] def __getattr__(self, name): if name == "typekind": return self._inter.typekind.decode("latin-1") return getattr(self._inter, name) def __str__(self): if isinstance(self.desc, tuple): ver = self.desc[0] else: ver = "N/A" return ( "nd: %i\n" "typekind: %s\n" "itemsize: %i\n" "flags: %s\n" "shape: %s\n" "strides: %s\n" "ver: %s\n" % ( self.nd, self.typekind, self.itemsize, format_flags(self.flags), format_shape(self.nd, self.shape), format_strides(self.nd, self.strides), ver, ) ) def format_flags(flags): names = [] for flag, name in [ (PAI_CONTIGUOUS, "CONTIGUOUS"), (PAI_FORTRAN, "FORTRAN"), (PAI_ALIGNED, "ALIGNED"), (PAI_NOTSWAPPED, "NOTSWAPPED"), (PAI_WRITEABLE, "WRITEABLE"), (PAI_ARR_HAS_DESCR, "ARR_HAS_DESCR"), ]: if flag & flags: names.append(name) return ", ".join(names) def format_shape(nd, shape): return ", ".join([str(shape[i]) for i in range(nd)]) def format_strides(nd, strides): return ", ".join([str(strides[i]) for i in range(nd)]) class Exporter: def __init__( self, shape, typekind=None, itemsize=None, strides=None, descr=None, flags=None ): if typekind is None: typekind = "u" if itemsize is None: itemsize = 1 if flags is None: flags = PAI_WRITEABLE | PAI_ALIGNED | PAI_NOTSWAPPED if descr is not None: flags |= PAI_ARR_HAS_DESCR if len(typekind) != 1: raise ValueError("Argument 'typekind' must be length 1 string") nd = len(shape) self.typekind = typekind self.itemsize = itemsize self.nd = nd self.shape = tuple(shape) self._shape = (c_ssize_t * self.nd)(*self.shape) if strides is None: self._strides = (c_ssize_t * self.nd)() self._strides[self.nd - 1] = self.itemsize for i in range(self.nd - 1, 0, -1): self._strides[i - 1] = self.shape[i] * self._strides[i] strides = tuple(self._strides) self.strides = strides elif len(strides) == nd: self.strides = tuple(strides) self._strides = (c_ssize_t * self.nd)(*self.strides) else: raise ValueError("Mismatch in length of strides and shape") self.descr = descr if self.is_contiguous("C"): flags |= PAI_CONTIGUOUS if self.is_contiguous("F"): flags |= PAI_FORTRAN self.flags = flags sz = max(shape[i] * strides[i] for i in range(nd)) self._data = (c_ubyte * sz)() self.data = addressof(self._data) self._inter = PyArrayInterface( 2, nd, typekind.encode("latin_1"), itemsize, flags, self._shape, self._strides, self.data, descr, ) self.len = itemsize for i in range(nd): self.len *= self.shape[i] __array_struct__ = property(lambda self: capsule_new(self._inter)) def is_contiguous(self, fortran): if fortran in "CA": if self.strides[-1] == self.itemsize: for i in range(self.nd - 1, 0, -1): if self.strides[i - 1] != self.shape[i] * self.strides[i]: break else: return True if fortran in "FA": if self.strides[0] == self.itemsize: for i in range(0, self.nd - 1): if self.strides[i + 1] != self.shape[i] * self.strides[i]: break else: return True return False class Array(Exporter): _ctypes = { ("u", 1): c_uint8, ("u", 2): c_uint16, ("u", 4): c_uint32, ("u", 8): c_uint64, ("i", 1): c_int8, ("i", 2): c_int16, ("i", 4): c_int32, ("i", 8): c_int64, } def __init__(self, *args, **kwds): super().__init__(*args, **kwds) try: if self.flags & PAI_NOTSWAPPED: ct = self._ctypes[self.typekind, self.itemsize] elif c_int.__ctype_le__ is c_int: ct = self._ctypes[self.typekind, self.itemsize].__ctype_be__ else: ct = self._ctypes[self.typekind, self.itemsize].__ctype_le__ except KeyError: ct = c_uint8 * self.itemsize self._ctype = ct self._ctype_p = POINTER(ct) def __getitem__(self, key): return cast(self._addr_at(key), self._ctype_p)[0] def __setitem__(self, key, value): cast(self._addr_at(key), self._ctype_p)[0] = value def _addr_at(self, key): if not isinstance(key, tuple): key = (key,) if len(key) != self.nd: raise ValueError("wrong number of indexes") for i in range(self.nd): if not (0 <= key[i] < self.shape[i]): raise IndexError(f"index {i} out of range") return self.data + sum(i * s for i, s in zip(key, self.strides)) class ExporterTest(unittest.TestCase): def test_strides(self): self.check_args(0, (10,), "u", (2,), 20, 20, 2) self.check_args(0, (5, 3), "u", (6, 2), 30, 30, 2) self.check_args(0, (7, 3, 5), "u", (30, 10, 2), 210, 210, 2) self.check_args(0, (13, 5, 11, 3), "u", (330, 66, 6, 2), 4290, 4290, 2) self.check_args(3, (7, 3, 5), "i", (2, 14, 42), 210, 210, 2) self.check_args(3, (7, 3, 5), "x", (2, 16, 48), 210, 240, 2) self.check_args(3, (13, 5, 11, 3), "%", (440, 88, 8, 2), 4290, 5720, 2) self.check_args(3, (7, 5), "-", (15, 3), 105, 105, 3) self.check_args(3, (7, 5), "*", (3, 21), 105, 105, 3) self.check_args(3, (7, 5), " ", (3, 24), 105, 120, 3) def test_is_contiguous(self): a = Exporter((10,), itemsize=2) self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) a = Exporter((10, 4), itemsize=2) self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("F")) a = Exporter((13, 5, 11, 3), itemsize=2, strides=(330, 66, 6, 2)) self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("F")) a = Exporter((10, 4), itemsize=2, strides=(2, 20)) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("C")) a = Exporter((13, 5, 11, 3), itemsize=2, strides=(2, 26, 130, 1430)) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("C")) a = Exporter((2, 11, 6, 4), itemsize=2, strides=(576, 48, 8, 2)) self.assertFalse(a.is_contiguous("A")) a = Exporter((2, 11, 6, 4), itemsize=2, strides=(2, 4, 48, 288)) self.assertFalse(a.is_contiguous("A")) a = Exporter((3, 2, 2), itemsize=2, strides=(16, 8, 4)) self.assertFalse(a.is_contiguous("A")) a = Exporter((3, 2, 2), itemsize=2, strides=(4, 12, 24)) self.assertFalse(a.is_contiguous("A")) def check_args( self, call_flags, shape, typekind, strides, length, bufsize, itemsize, offset=0 ): if call_flags & 1: typekind_arg = typekind else: typekind_arg = None if call_flags & 2: strides_arg = strides else: strides_arg = None a = Exporter(shape, itemsize=itemsize, strides=strides_arg) self.assertEqual(sizeof(a._data), bufsize) self.assertEqual(a.data, ctypes.addressof(a._data) + offset) m = ArrayInterface(a) self.assertEqual(m.data, a.data) self.assertEqual(m.itemsize, itemsize) self.assertEqual(tuple(m.shape[0 : m.nd]), shape) self.assertEqual(tuple(m.strides[0 : m.nd]), strides) class ArrayTest(unittest.TestCase): def __init__(self, *args, **kwds): unittest.TestCase.__init__(self, *args, **kwds) self.a = Array((20, 15), "i", 4) def setUp(self): # Every test starts with a zeroed array. memset(self.a.data, 0, sizeof(self.a._data)) def test__addr_at(self): a = self.a self.assertEqual(a._addr_at((0, 0)), a.data) self.assertEqual(a._addr_at((0, 1)), a.data + 4) self.assertEqual(a._addr_at((1, 0)), a.data + 60) self.assertEqual(a._addr_at((1, 1)), a.data + 64) def test_indices(self): a = self.a self.assertEqual(a[0, 0], 0) self.assertEqual(a[19, 0], 0) self.assertEqual(a[0, 14], 0) self.assertEqual(a[19, 14], 0) self.assertEqual(a[5, 8], 0) a[0, 0] = 12 a[5, 8] = 99 self.assertEqual(a[0, 0], 12) self.assertEqual(a[5, 8], 99) self.assertRaises(IndexError, a.__getitem__, (-1, 0)) self.assertRaises(IndexError, a.__getitem__, (0, -1)) self.assertRaises(IndexError, a.__getitem__, (20, 0)) self.assertRaises(IndexError, a.__getitem__, (0, 15)) self.assertRaises(ValueError, a.__getitem__, 0) self.assertRaises(ValueError, a.__getitem__, (0, 0, 0)) a = Array((3,), "i", 4) a[1] = 333 self.assertEqual(a[1], 333) def test_typekind(self): a = Array((1,), "i", 4) self.assertTrue(a._ctype is c_int32) self.assertTrue(a._ctype_p is POINTER(c_int32)) a = Array((1,), "u", 4) self.assertTrue(a._ctype is c_uint32) self.assertTrue(a._ctype_p is POINTER(c_uint32)) a = Array((1,), "f", 4) # float types unsupported: size system dependent ct = a._ctype self.assertTrue(issubclass(ct, ctypes.Array)) self.assertEqual(sizeof(ct), 4) def test_itemsize(self): for size in [1, 2, 4, 8]: a = Array((1,), "i", size) ct = a._ctype self.assertTrue(issubclass(ct, ctypes._SimpleCData)) self.assertEqual(sizeof(ct), size) def test_oddball_itemsize(self): for size in [3, 5, 6, 7, 9]: a = Array((1,), "i", size) ct = a._ctype self.assertTrue(issubclass(ct, ctypes.Array)) self.assertEqual(sizeof(ct), size) def test_byteswapped(self): a = Array((1,), "u", 4, flags=(PAI_ALIGNED | PAI_WRITEABLE)) ct = a._ctype self.assertTrue(ct is not c_uint32) if sys.byteorder == "little": self.assertTrue(ct is c_uint32.__ctype_be__) else: self.assertTrue(ct is c_uint32.__ctype_le__) i = 0xA0B0C0D n = c_uint32(i) a[0] = i self.assertEqual(a[0], i) self.assertEqual(a._data[0:4], cast(addressof(n), POINTER(c_uint8))[3:-1:-1]) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/test_utils/async_sub.py0000644000175100001770000002165014676242340020141 0ustar00runnerdocker################################################################################ """ Modification of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 """ #################################### IMPORTS ################################### import os import platform import subprocess import errno import time import sys import unittest import tempfile def geterror(): return sys.exc_info()[1] null_byte = "\x00".encode("ascii") if platform.system() == "Windows": def encode(s): return s.encode("ascii") def decode(b): return b.decode("ascii") try: import ctypes from ctypes.wintypes import DWORD kernel32 = ctypes.windll.kernel32 TerminateProcess = ctypes.windll.kernel32.TerminateProcess def WriteFile(handle, data, ol=None): c_written = DWORD() success = ctypes.windll.kernel32.WriteFile( handle, ctypes.create_string_buffer(encode(data)), len(data), ctypes.byref(c_written), ol, ) return ctypes.windll.kernel32.GetLastError(), c_written.value def ReadFile(handle, desired_bytes, ol=None): c_read = DWORD() buffer = ctypes.create_string_buffer(desired_bytes + 1) success = ctypes.windll.kernel32.ReadFile( handle, buffer, desired_bytes, ctypes.byref(c_read), ol ) buffer[c_read.value] = null_byte return ctypes.windll.kernel32.GetLastError(), decode(buffer.value) def PeekNamedPipe(handle, desired_bytes): c_avail = DWORD() c_message = DWORD() if desired_bytes > 0: c_read = DWORD() buffer = ctypes.create_string_buffer(desired_bytes + 1) success = ctypes.windll.kernel32.PeekNamedPipe( handle, buffer, desired_bytes, ctypes.byref(c_read), ctypes.byref(c_avail), ctypes.byref(c_message), ) buffer[c_read.value] = null_byte return decode(buffer.value), c_avail.value, c_message.value else: success = ctypes.windll.kernel32.PeekNamedPipe( handle, None, desired_bytes, None, ctypes.byref(c_avail), ctypes.byref(c_message), ) return "", c_avail.value, c_message.value except ImportError: from win32file import ReadFile, WriteFile from win32pipe import PeekNamedPipe from win32api import TerminateProcess import msvcrt else: from signal import SIGINT, SIGTERM, SIGKILL import select import fcntl ################################### CONSTANTS ################################## PIPE = subprocess.PIPE ################################################################################ class Popen(subprocess.Popen): def recv(self, maxsize=None): return self._recv("stdout", maxsize) def recv_err(self, maxsize=None): return self._recv("stderr", maxsize) def send_recv(self, input="", maxsize=None): return self.send(input), self.recv(maxsize), self.recv_err(maxsize) def read_async(self, wait=0.1, e=1, tr=5, stderr=0): if tr < 1: tr = 1 x = time.time() + wait y = [] r = "" pr = self.recv if stderr: pr = self.recv_err while time.time() < x or r: r = pr() if r is None: if e: raise Exception("Other end disconnected!") else: break elif r: y.append(r) else: time.sleep(max((x - time.time()) / tr, 0)) return "".join(y) def send_all(self, data): while len(data): sent = self.send(data) if sent is None: raise Exception("Other end disconnected!") data = memoryview(data, sent) def get_conn_maxsize(self, which, maxsize): if maxsize is None: maxsize = 1024 elif maxsize < 1: maxsize = 1 return getattr(self, which), maxsize def _close(self, which): getattr(self, which).close() setattr(self, which, None) if platform.system() == "Windows": def kill(self): # Recipes # http://me.in-berlin.de/doc/python/faq/windows.html#how-do-i-emulate-os-kill-in-windows # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347462 """kill function for Win32""" TerminateProcess(int(self._handle), 0) # returns None def send(self, input): if not self.stdin: return None try: x = msvcrt.get_osfhandle(self.stdin.fileno()) (errCode, written) = WriteFile(x, input) except ValueError: return self._close("stdin") except (subprocess.pywintypes.error, Exception): if geterror()[0] in (109, errno.ESHUTDOWN): return self._close("stdin") raise return written def _recv(self, which, maxsize): conn, maxsize = self.get_conn_maxsize(which, maxsize) if conn is None: return None try: x = msvcrt.get_osfhandle(conn.fileno()) (read, nAvail, nMessage) = PeekNamedPipe(x, 0) if maxsize < nAvail: nAvail = maxsize if nAvail > 0: (errCode, read) = ReadFile(x, nAvail, None) except ValueError: return self._close(which) except (subprocess.pywintypes.error, Exception): if geterror()[0] in (109, errno.ESHUTDOWN): return self._close(which) raise if self.universal_newlines: # Translate newlines. For Python 3.x assume read is text. # If bytes then another solution is needed. read = read.replace("\r\n", "\n").replace("\r", "\n") return read else: def kill(self): for i, sig in enumerate([SIGTERM, SIGKILL] * 2): if i % 2 == 0: os.kill(self.pid, sig) time.sleep((i * (i % 2) / 5.0) + 0.01) killed_pid, stat = os.waitpid(self.pid, os.WNOHANG) if killed_pid != 0: return def send(self, input): if not self.stdin: return None if not select.select([], [self.stdin], [], 0)[1]: return 0 try: written = os.write(self.stdin.fileno(), input) except OSError: if geterror()[0] == errno.EPIPE: # broken pipe return self._close("stdin") raise return written def _recv(self, which, maxsize): conn, maxsize = self.get_conn_maxsize(which, maxsize) if conn is None: return None if not select.select([conn], [], [], 0)[0]: return "" r = conn.read(maxsize) if not r: return self._close(which) if self.universal_newlines: r = r.replace("\r\n", "\n").replace("\r", "\n") return r ################################################################################ def proc_in_time_or_kill(cmd, time_out, wd=None, env=None): proc = Popen( cmd, cwd=wd, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=1, ) ret_code = None response = [] t = time.time() while ret_code is None and ((time.time() - t) < time_out): ret_code = proc.poll() response += [proc.read_async(wait=0.1, e=0)] if ret_code is None: ret_code = f'"Process timed out (time_out = {time_out} secs) ' try: proc.kill() ret_code += 'and was successfully terminated"' except Exception: ret_code += f'and termination failed (exception: {geterror()})"' return ret_code, "".join(response) ################################################################################ class AsyncTest(unittest.TestCase): def test_proc_in_time_or_kill(self): ret_code, response = proc_in_time_or_kill( [sys.executable, "-c", "while True: pass"], time_out=1 ) self.assertIn("rocess timed out", ret_code) self.assertIn("successfully terminated", ret_code) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0301118 pygame-2.6.1/test/test_utils/buftools.py0000644000175100001770000005613114676242340020012 0ustar00runnerdocker"""Module pygame.tests.test_utils.array Export the Exporter and Importer classes. Class Exporter has configurable shape and strides. Exporter objects provide a convenient target for unit tests on Pygame objects and functions that import a new buffer interface. Class Importer imports a buffer interface with the given PyBUF_* flags. It returns NULL Py_buffer fields as None. The shape, strides, and suboffsets arrays are returned as tuples of ints. All Py_buffer field properties are read-only. This class is useful in comparing exported buffer interfaces with the actual request. The simular Python builtin memoryview currently does not support configurable PyBUF_* flags. This module contains its own unit tests. When Pygame is installed, these tests can be run with the following command line statement: python -m pygame.tests.test_utils.array """ import pygame if not pygame.HAVE_NEWBUF: emsg = "This Pygame build does not support the new buffer protocol" raise ImportError(emsg) import pygame.newbuffer from pygame.newbuffer import ( PyBUF_SIMPLE, PyBUF_FORMAT, PyBUF_ND, PyBUF_WRITABLE, PyBUF_STRIDES, PyBUF_C_CONTIGUOUS, PyBUF_F_CONTIGUOUS, PyBUF_ANY_CONTIGUOUS, PyBUF_INDIRECT, PyBUF_STRIDED, PyBUF_STRIDED_RO, PyBUF_RECORDS, PyBUF_RECORDS_RO, PyBUF_FULL, PyBUF_FULL_RO, PyBUF_CONTIG, PyBUF_CONTIG_RO, ) import unittest import ctypes import operator from functools import reduce __all__ = ["Exporter", "Importer"] try: ctypes.c_ssize_t except AttributeError: void_p_sz = ctypes.sizeof(ctypes.c_void_p) if ctypes.sizeof(ctypes.c_short) == void_p_sz: ctypes.c_ssize_t = ctypes.c_short elif ctypes.sizeof(ctypes.c_int) == void_p_sz: ctypes.c_ssize_t = ctypes.c_int elif ctypes.sizeof(ctypes.c_long) == void_p_sz: ctypes.c_ssize_t = ctypes.c_long elif ctypes.sizeof(ctypes.c_longlong) == void_p_sz: ctypes.c_ssize_t = ctypes.c_longlong else: raise RuntimeError("Cannot set c_ssize_t: sizeof(void *) is %i" % void_p_sz) def _prop_get(fn): return property(fn) class Exporter(pygame.newbuffer.BufferMixin): """An object that exports a multi-dimension new buffer interface The only array operation this type supports is to export a buffer. """ prefixes = { "@": "", "=": "=", "<": "=", ">": "=", "!": "=", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", } types = { "c": ctypes.c_char, "b": ctypes.c_byte, "B": ctypes.c_ubyte, "=c": ctypes.c_int8, "=b": ctypes.c_int8, "=B": ctypes.c_uint8, "?": ctypes.c_bool, "=?": ctypes.c_int8, "h": ctypes.c_short, "H": ctypes.c_ushort, "=h": ctypes.c_int16, "=H": ctypes.c_uint16, "i": ctypes.c_int, "I": ctypes.c_uint, "=i": ctypes.c_int32, "=I": ctypes.c_uint32, "l": ctypes.c_long, "L": ctypes.c_ulong, "=l": ctypes.c_int32, "=L": ctypes.c_uint32, "q": ctypes.c_longlong, "Q": ctypes.c_ulonglong, "=q": ctypes.c_int64, "=Q": ctypes.c_uint64, "f": ctypes.c_float, "d": ctypes.c_double, "P": ctypes.c_void_p, "x": ctypes.c_ubyte * 1, "2x": ctypes.c_ubyte * 2, "3x": ctypes.c_ubyte * 3, "4x": ctypes.c_ubyte * 4, "5x": ctypes.c_ubyte * 5, "6x": ctypes.c_ubyte * 6, "7x": ctypes.c_ubyte * 7, "8x": ctypes.c_ubyte * 8, "9x": ctypes.c_ubyte * 9, } def __init__(self, shape, format=None, strides=None, readonly=None, itemsize=None): if format is None: format = "B" if readonly is None: readonly = False prefix = "" typecode = "" i = 0 if i < len(format): try: prefix = self.prefixes[format[i]] i += 1 except LookupError: pass if i < len(format) and format[i] == "1": i += 1 if i == len(format) - 1: typecode = format[i] if itemsize is None: try: itemsize = ctypes.sizeof(self.types[prefix + typecode]) except KeyError: raise ValueError("Unknown item format '" + format + "'") self.readonly = bool(readonly) self.format = format self._format = ctypes.create_string_buffer(format.encode("latin_1")) self.ndim = len(shape) self.itemsize = itemsize self.len = reduce(operator.mul, shape, 1) * self.itemsize self.shape = tuple(shape) self._shape = (ctypes.c_ssize_t * self.ndim)(*self.shape) if strides is None: self._strides = (ctypes.c_ssize_t * self.ndim)() self._strides[self.ndim - 1] = itemsize for i in range(self.ndim - 1, 0, -1): self._strides[i - 1] = self.shape[i] * self._strides[i] self.strides = tuple(self._strides) elif len(strides) == self.ndim: self.strides = tuple(strides) self._strides = (ctypes.c_ssize_t * self.ndim)(*self.strides) else: raise ValueError("Mismatch in length of strides and shape") buflen = max(d * abs(s) for d, s in zip(self.shape, self.strides)) self.buflen = buflen self._buf = (ctypes.c_ubyte * buflen)() offset = sum( (d - 1) * abs(s) for d, s in zip(self.shape, self.strides) if s < 0 ) self.buf = ctypes.addressof(self._buf) + offset def buffer_info(self): return (ctypes.addressof(self.buffer), self.shape[0]) def tobytes(self): return ctypes.cast(self.buffer, ctypes.POINTER(ctypes.c_char))[0 : self._len] def __len__(self): return self.shape[0] def _get_buffer(self, view, flags): from ctypes import addressof if (flags & PyBUF_WRITABLE) == PyBUF_WRITABLE and self.readonly: raise BufferError("buffer is read-only") if ( flags & PyBUF_C_CONTIGUOUS ) == PyBUF_C_CONTIGUOUS and not self.is_contiguous("C"): raise BufferError("data is not C contiguous") if ( flags & PyBUF_F_CONTIGUOUS ) == PyBUF_F_CONTIGUOUS and not self.is_contiguous("F"): raise BufferError("data is not F contiguous") if ( flags & PyBUF_ANY_CONTIGUOUS ) == PyBUF_ANY_CONTIGUOUS and not self.is_contiguous("A"): raise BufferError("data is not contiguous") view.buf = self.buf view.readonly = self.readonly view.len = self.len if flags | PyBUF_WRITABLE == PyBUF_WRITABLE: view.ndim = 0 else: view.ndim = self.ndim view.itemsize = self.itemsize if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = addressof(self._format) else: view.format = None if (flags & PyBUF_ND) == PyBUF_ND: view.shape = addressof(self._shape) elif self.is_contiguous("C"): view.shape = None else: raise BufferError(f"shape required for {self.ndim} dimensional data") if (flags & PyBUF_STRIDES) == PyBUF_STRIDES: view.strides = ctypes.addressof(self._strides) elif view.shape is None or self.is_contiguous("C"): view.strides = None else: raise BufferError("strides required for none C contiguous data") view.suboffsets = None view.internal = None view.obj = self def is_contiguous(self, fortran): if fortran in "CA": if self.strides[-1] == self.itemsize: for i in range(self.ndim - 1, 0, -1): if self.strides[i - 1] != self.shape[i] * self.strides[i]: break else: return True if fortran in "FA": if self.strides[0] == self.itemsize: for i in range(0, self.ndim - 1): if self.strides[i + 1] != self.shape[i] * self.strides[i]: break else: return True return False class Importer: """An object that imports a new buffer interface The fields of the Py_buffer C struct are exposed by identically named Importer read-only properties. """ def __init__(self, obj, flags): self._view = pygame.newbuffer.Py_buffer() self._view.get_buffer(obj, flags) @property def obj(self): """return object or None for NULL field""" return self._view.obj @property def buf(self): """return int or None for NULL field""" return self._view.buf @property def len(self): """return int""" return self._view.len @property def readonly(self): """return bool""" return self._view.readonly @property def format(self): """return bytes or None for NULL field""" format_addr = self._view.format if format_addr is None: return None return ctypes.cast(format_addr, ctypes.c_char_p).value.decode("ascii") @property def itemsize(self): """return int""" return self._view.itemsize @property def ndim(self): """return int""" return self._view.ndim @property def shape(self): """return int tuple or None for NULL field""" return self._to_ssize_tuple(self._view.shape) @property def strides(self): """return int tuple or None for NULL field""" return self._to_ssize_tuple(self._view.strides) @property def suboffsets(self): """return int tuple or None for NULL field""" return self._to_ssize_tuple(self._view.suboffsets) @property def internal(self): """return int or None for NULL field""" return self._view.internal def _to_ssize_tuple(self, addr): from ctypes import cast, POINTER, c_ssize_t if addr is None: return None return tuple(cast(addr, POINTER(c_ssize_t))[0 : self._view.ndim]) class ExporterTest(unittest.TestCase): """Class Exporter unit tests""" def test_formats(self): char_sz = ctypes.sizeof(ctypes.c_char) short_sz = ctypes.sizeof(ctypes.c_short) int_sz = ctypes.sizeof(ctypes.c_int) long_sz = ctypes.sizeof(ctypes.c_long) longlong_sz = ctypes.sizeof(ctypes.c_longlong) float_sz = ctypes.sizeof(ctypes.c_float) double_sz = ctypes.sizeof(ctypes.c_double) voidp_sz = ctypes.sizeof(ctypes.c_void_p) bool_sz = ctypes.sizeof(ctypes.c_bool) self.check_args(0, (1,), "B", (1,), 1, 1, 1) self.check_args(1, (1,), "b", (1,), 1, 1, 1) self.check_args(1, (1,), "B", (1,), 1, 1, 1) self.check_args(1, (1,), "c", (char_sz,), char_sz, char_sz, char_sz) self.check_args(1, (1,), "h", (short_sz,), short_sz, short_sz, short_sz) self.check_args(1, (1,), "H", (short_sz,), short_sz, short_sz, short_sz) self.check_args(1, (1,), "i", (int_sz,), int_sz, int_sz, int_sz) self.check_args(1, (1,), "I", (int_sz,), int_sz, int_sz, int_sz) self.check_args(1, (1,), "l", (long_sz,), long_sz, long_sz, long_sz) self.check_args(1, (1,), "L", (long_sz,), long_sz, long_sz, long_sz) self.check_args( 1, (1,), "q", (longlong_sz,), longlong_sz, longlong_sz, longlong_sz ) self.check_args( 1, (1,), "Q", (longlong_sz,), longlong_sz, longlong_sz, longlong_sz ) self.check_args(1, (1,), "f", (float_sz,), float_sz, float_sz, float_sz) self.check_args(1, (1,), "d", (double_sz,), double_sz, double_sz, double_sz) self.check_args(1, (1,), "x", (1,), 1, 1, 1) self.check_args(1, (1,), "P", (voidp_sz,), voidp_sz, voidp_sz, voidp_sz) self.check_args(1, (1,), "?", (bool_sz,), bool_sz, bool_sz, bool_sz) self.check_args(1, (1,), "@b", (1,), 1, 1, 1) self.check_args(1, (1,), "@B", (1,), 1, 1, 1) self.check_args(1, (1,), "@c", (char_sz,), char_sz, char_sz, char_sz) self.check_args(1, (1,), "@h", (short_sz,), short_sz, short_sz, short_sz) self.check_args(1, (1,), "@H", (short_sz,), short_sz, short_sz, short_sz) self.check_args(1, (1,), "@i", (int_sz,), int_sz, int_sz, int_sz) self.check_args(1, (1,), "@I", (int_sz,), int_sz, int_sz, int_sz) self.check_args(1, (1,), "@l", (long_sz,), long_sz, long_sz, long_sz) self.check_args(1, (1,), "@L", (long_sz,), long_sz, long_sz, long_sz) self.check_args( 1, (1,), "@q", (longlong_sz,), longlong_sz, longlong_sz, longlong_sz ) self.check_args( 1, (1,), "@Q", (longlong_sz,), longlong_sz, longlong_sz, longlong_sz ) self.check_args(1, (1,), "@f", (float_sz,), float_sz, float_sz, float_sz) self.check_args(1, (1,), "@d", (double_sz,), double_sz, double_sz, double_sz) self.check_args(1, (1,), "@?", (bool_sz,), bool_sz, bool_sz, bool_sz) self.check_args(1, (1,), "=b", (1,), 1, 1, 1) self.check_args(1, (1,), "=B", (1,), 1, 1, 1) self.check_args(1, (1,), "=c", (1,), 1, 1, 1) self.check_args(1, (1,), "=h", (2,), 2, 2, 2) self.check_args(1, (1,), "=H", (2,), 2, 2, 2) self.check_args(1, (1,), "=i", (4,), 4, 4, 4) self.check_args(1, (1,), "=I", (4,), 4, 4, 4) self.check_args(1, (1,), "=l", (4,), 4, 4, 4) self.check_args(1, (1,), "=L", (4,), 4, 4, 4) self.check_args(1, (1,), "=q", (8,), 8, 8, 8) self.check_args(1, (1,), "=Q", (8,), 8, 8, 8) self.check_args(1, (1,), "=?", (1,), 1, 1, 1) self.check_args(1, (1,), "h", (2,), 2, 2, 2) self.check_args(1, (1,), "!h", (2,), 2, 2, 2) self.check_args(1, (1,), "q", (8,), 8, 8, 8) self.check_args(1, (1,), "!q", (8,), 8, 8, 8) self.check_args(1, (1,), "1x", (1,), 1, 1, 1) self.check_args(1, (1,), "2x", (2,), 2, 2, 2) self.check_args(1, (1,), "3x", (3,), 3, 3, 3) self.check_args(1, (1,), "4x", (4,), 4, 4, 4) self.check_args(1, (1,), "5x", (5,), 5, 5, 5) self.check_args(1, (1,), "6x", (6,), 6, 6, 6) self.check_args(1, (1,), "7x", (7,), 7, 7, 7) self.check_args(1, (1,), "8x", (8,), 8, 8, 8) self.check_args(1, (1,), "9x", (9,), 9, 9, 9) self.check_args(1, (1,), "1h", (2,), 2, 2, 2) self.check_args(1, (1,), "=1h", (2,), 2, 2, 2) self.assertRaises(ValueError, Exporter, (2, 1), "") self.assertRaises(ValueError, Exporter, (2, 1), "W") self.assertRaises(ValueError, Exporter, (2, 1), "^Q") self.assertRaises(ValueError, Exporter, (2, 1), "=W") self.assertRaises(ValueError, Exporter, (2, 1), "=f") self.assertRaises(ValueError, Exporter, (2, 1), "=d") self.assertRaises(ValueError, Exporter, (2, 1), "f") self.assertRaises(ValueError, Exporter, (2, 1), ">d") self.assertRaises(ValueError, Exporter, (2, 1), "!f") self.assertRaises(ValueError, Exporter, (2, 1), "!d") self.assertRaises(ValueError, Exporter, (2, 1), "0x") self.assertRaises(ValueError, Exporter, (2, 1), "11x") self.assertRaises(ValueError, Exporter, (2, 1), "BB") def test_strides(self): self.check_args(1, (10,), "=h", (2,), 20, 20, 2) self.check_args(1, (5, 3), "=h", (6, 2), 30, 30, 2) self.check_args(1, (7, 3, 5), "=h", (30, 10, 2), 210, 210, 2) self.check_args(1, (13, 5, 11, 3), "=h", (330, 66, 6, 2), 4290, 4290, 2) self.check_args(3, (7, 3, 5), "=h", (2, 14, 42), 210, 210, 2) self.check_args(3, (7, 3, 5), "=h", (2, 16, 48), 210, 240, 2) self.check_args(3, (13, 5, 11, 3), "=h", (440, 88, 8, 2), 4290, 5720, 2) self.check_args(3, (7, 5), "3x", (15, 3), 105, 105, 3) self.check_args(3, (7, 5), "3x", (3, 21), 105, 105, 3) self.check_args(3, (7, 5), "3x", (3, 24), 105, 120, 3) def test_readonly(self): a = Exporter((2,), "h", readonly=True) self.assertTrue(a.readonly) b = Importer(a, PyBUF_STRIDED_RO) self.assertRaises(BufferError, Importer, a, PyBUF_STRIDED) b = Importer(a, PyBUF_STRIDED_RO) def test_is_contiguous(self): a = Exporter((10,), "=h") self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) a = Exporter((10, 4), "=h") self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("F")) a = Exporter((13, 5, 11, 3), "=h", (330, 66, 6, 2)) self.assertTrue(a.is_contiguous("C")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("F")) a = Exporter((10, 4), "=h", (2, 20)) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("C")) a = Exporter((13, 5, 11, 3), "=h", (2, 26, 130, 1430)) self.assertTrue(a.is_contiguous("F")) self.assertTrue(a.is_contiguous("A")) self.assertFalse(a.is_contiguous("C")) a = Exporter((2, 11, 6, 4), "=h", (576, 48, 8, 2)) self.assertFalse(a.is_contiguous("A")) a = Exporter((2, 11, 6, 4), "=h", (2, 4, 48, 288)) self.assertFalse(a.is_contiguous("A")) a = Exporter((3, 2, 2), "=h", (16, 8, 4)) self.assertFalse(a.is_contiguous("A")) a = Exporter((3, 2, 2), "=h", (4, 12, 24)) self.assertFalse(a.is_contiguous("A")) def test_PyBUF_flags(self): a = Exporter((10, 2), "d") b = Importer(a, PyBUF_SIMPLE) self.assertTrue(b.obj is a) self.assertTrue(b.format is None) self.assertEqual(b.len, a.len) self.assertEqual(b.itemsize, a.itemsize) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertTrue(b.internal is None) self.assertFalse(b.readonly) b = Importer(a, PyBUF_WRITABLE) self.assertTrue(b.obj is a) self.assertTrue(b.format is None) self.assertEqual(b.len, a.len) self.assertEqual(b.itemsize, a.itemsize) self.assertTrue(b.shape is None) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertTrue(b.internal is None) self.assertFalse(b.readonly) b = Importer(a, PyBUF_ND) self.assertTrue(b.obj is a) self.assertTrue(b.format is None) self.assertEqual(b.len, a.len) self.assertEqual(b.itemsize, a.itemsize) self.assertEqual(b.shape, a.shape) self.assertTrue(b.strides is None) self.assertTrue(b.suboffsets is None) self.assertTrue(b.internal is None) self.assertFalse(b.readonly) a = Exporter((5, 10), "=h", (24, 2)) b = Importer(a, PyBUF_STRIDES) self.assertTrue(b.obj is a) self.assertTrue(b.format is None) self.assertEqual(b.len, a.len) self.assertEqual(b.itemsize, a.itemsize) self.assertEqual(b.shape, a.shape) self.assertEqual(b.strides, a.strides) self.assertTrue(b.suboffsets is None) self.assertTrue(b.internal is None) self.assertFalse(b.readonly) b = Importer(a, PyBUF_FULL) self.assertTrue(b.obj is a) self.assertEqual(b.format, "=h") self.assertEqual(b.len, a.len) self.assertEqual(b.itemsize, a.itemsize) self.assertEqual(b.shape, a.shape) self.assertEqual(b.strides, a.strides) self.assertTrue(b.suboffsets is None) self.assertTrue(b.internal is None) self.assertFalse(b.readonly) self.assertRaises(BufferError, Importer, a, PyBUF_SIMPLE) self.assertRaises(BufferError, Importer, a, PyBUF_WRITABLE) self.assertRaises(BufferError, Importer, a, PyBUF_ND) self.assertRaises(BufferError, Importer, a, PyBUF_C_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, PyBUF_F_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, PyBUF_ANY_CONTIGUOUS) self.assertRaises(BufferError, Importer, a, PyBUF_CONTIG) def test_negative_strides(self): self.check_args(3, (3, 5, 4), "B", (20, 4, -1), 60, 60, 1, 3) self.check_args(3, (3, 5, 3), "B", (20, 4, -1), 45, 60, 1, 2) self.check_args(3, (3, 5, 4), "B", (20, -4, 1), 60, 60, 1, 16) self.check_args(3, (3, 5, 4), "B", (-20, -4, -1), 60, 60, 1, 59) self.check_args(3, (3, 5, 3), "B", (-20, -4, -1), 45, 60, 1, 58) def test_attributes(self): a = Exporter((13, 5, 11, 3), "=h", (440, 88, 8, 2)) self.assertEqual(a.ndim, 4) self.assertEqual(a.itemsize, 2) self.assertFalse(a.readonly) self.assertEqual(a.shape, (13, 5, 11, 3)) self.assertEqual(a.format, "=h") self.assertEqual(a.strides, (440, 88, 8, 2)) self.assertEqual(a.len, 4290) self.assertEqual(a.buflen, 5720) self.assertEqual(a.buf, ctypes.addressof(a._buf)) a = Exporter((8,)) self.assertEqual(a.ndim, 1) self.assertEqual(a.itemsize, 1) self.assertFalse(a.readonly) self.assertEqual(a.shape, (8,)) self.assertEqual(a.format, "B") self.assertTrue(isinstance(a.strides, tuple)) self.assertEqual(a.strides, (1,)) self.assertEqual(a.len, 8) self.assertEqual(a.buflen, 8) a = Exporter([13, 5, 11, 3], "=h", [440, 88, 8, 2]) self.assertTrue(isinstance(a.shape, tuple)) self.assertTrue(isinstance(a.strides, tuple)) self.assertEqual(a.shape, (13, 5, 11, 3)) self.assertEqual(a.strides, (440, 88, 8, 2)) def test_itemsize(self): exp = Exporter((4, 5), format="B", itemsize=8) imp = Importer(exp, PyBUF_RECORDS) self.assertEqual(imp.itemsize, 8) self.assertEqual(imp.format, "B") self.assertEqual(imp.strides, (40, 8)) exp = Exporter((4, 5), format="weird", itemsize=5) imp = Importer(exp, PyBUF_RECORDS) self.assertEqual(imp.itemsize, 5) self.assertEqual(imp.format, "weird") self.assertEqual(imp.strides, (25, 5)) def check_args( self, call_flags, shape, format, strides, length, bufsize, itemsize, offset=0 ): format_arg = format if call_flags & 1 else None strides_arg = strides if call_flags & 2 else None a = Exporter(shape, format_arg, strides_arg) self.assertEqual(a.buflen, bufsize) self.assertEqual(a.buf, ctypes.addressof(a._buf) + offset) m = Importer(a, PyBUF_RECORDS_RO) self.assertEqual(m.buf, a.buf) self.assertEqual(m.len, length) self.assertEqual(m.format, format) self.assertEqual(m.itemsize, itemsize) self.assertEqual(m.shape, shape) self.assertEqual(m.strides, strides) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/test_utils/endian.py0000644000175100001770000000075714676242340017416 0ustar00runnerdocker# Module pygame.tests.test_utils.endian # # Machine independent conversion to little-endian and big-endian Python # integer values. import struct def little_endian_uint32(i): """Return the 32 bit unsigned integer little-endian representation of i""" s = struct.pack("I", i) return struct.unpack("=I", s)[0] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/test_utils/png.py0000644000175100001770000045140014676242340016737 0ustar00runnerdocker#!/usr/bin/env python # $URL: http://pypng.googlecode.com/svn/trunk/code/png.py $ # $Rev: 228 $ # png.py - PNG encoder/decoder in pure Python # # Modified for Pygame in Oct., 2012 to work with Python 3.x. # # Copyright (C) 2006 Johann C. Rocholl # Portions Copyright (C) 2009 David Jones # And probably portions Copyright (C) 2006 Nicko van Someren # # Original concept by Johann C. Rocholl. # # LICENSE (The MIT License) # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # # Changelog (recent first): # 2009-03-11 David: interlaced bit depth < 8 (writing). # 2009-03-10 David: interlaced bit depth < 8 (reading). # 2009-03-04 David: Flat and Boxed pixel formats. # 2009-02-26 David: Palette support (writing). # 2009-02-23 David: Bit-depths < 8; better PNM support. # 2006-06-17 Nicko: Reworked into a class, faster interlacing. # 2006-06-17 Johann: Very simple prototype PNG decoder. # 2006-06-17 Nicko: Test suite with various image generators. # 2006-06-17 Nicko: Alpha-channel, grey-scale, 16-bit/plane support. # 2006-06-15 Johann: Scanline iterator interface for large input files. # 2006-06-09 Johann: Very simple prototype PNG encoder. # Incorporated into Bangai-O Development Tools by drj on 2009-02-11 from # http://trac.browsershots.org/browser/trunk/pypng/lib/png.py?rev=2885 # Incorporated into pypng by drj on 2009-03-12 from # //depot/prj/bangaio/master/code/png.py#67 """ Pure Python PNG Reader/Writer This Python module implements support for PNG images (see PNG specification at http://www.w3.org/TR/2003/REC-PNG-20031110/ ). It reads and writes PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA, LA (greyscale with alpha) with 8/16 bits per channel; colour mapped images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing. A number of optional chunks can be specified (when writing) and understood (when reading): ``tRNS``, ``bKGD``, ``gAMA``. For help, type ``import png; help(png)`` in your python interpreter. A good place to start is the :class:`Reader` and :class:`Writer` classes. This file can also be used as a command-line utility to convert `Netpbm `_ PNM files to PNG, and the reverse conversion from PNG to PNM. The interface is similar to that of the ``pnmtopng`` program from Netpbm. Type ``python png.py --help`` at the shell prompt for usage and a list of options. A note on spelling and terminology ---------------------------------- Generally British English spelling is used in the documentation. So that's "greyscale" and "colour". This not only matches the author's native language, it's also used by the PNG specification. The major colour models supported by PNG (and hence by PyPNG) are: greyscale, RGB, greyscale--alpha, RGB--alpha. These are sometimes referred to using the abbreviations: L, RGB, LA, RGBA. In this case each letter abbreviates a single channel: *L* is for Luminance or Luma or Lightness which is the channel used in greyscale images; *R*, *G*, *B* stand for Red, Green, Blue, the components of a colour image; *A* stands for Alpha, the opacity channel (used for transparency effects, but higher values are more opaque, so it makes sense to call it opacity). A note on formats ----------------- When getting pixel data out of this module (reading) and presenting data to this module (writing) there are a number of ways the data could be represented as a Python value. Generally this module uses one of three formats called "flat row flat pixel", "boxed row flat pixel", and "boxed row boxed pixel". Basically the concern is whether each pixel and each row comes in its own little tuple (box), or not. Consider an image that is 3 pixels wide by 2 pixels high, and each pixel has RGB components: Boxed row flat pixel:: list([R,G,B, R,G,B, R,G,B], [R,G,B, R,G,B, R,G,B]) Each row appears as its own list, but the pixels are flattened so that three values for one pixel simply follow the three values for the previous pixel. This is the most common format used, because it provides a good compromise between space and convenience. PyPNG regards itself as at liberty to replace any sequence type with any sufficiently compatible other sequence type; in practice each row is an array (from the array module), and the outer list is sometimes an iterator rather than an explicit list (so that streaming is possible). Flat row flat pixel:: [R,G,B, R,G,B, R,G,B, R,G,B, R,G,B, R,G,B] The entire image is one single giant sequence of colour values. Generally an array will be used (to save space), not a list. Boxed row boxed pixel:: list([ (R,G,B), (R,G,B), (R,G,B) ], [ (R,G,B), (R,G,B), (R,G,B) ]) Each row appears in its own list, but each pixel also appears in its own tuple. A serious memory burn in Python. In all cases the top row comes first, and for each row the pixels are ordered from left-to-right. Within a pixel the values appear in the order, R-G-B-A (or L-A for greyscale--alpha). There is a fourth format, mentioned because it is used internally, is close to what lies inside a PNG file itself, and has some support from the public API. This format is called packed. When packed, each row is a sequence of bytes (integers from 0 to 255), just as it is before PNG scanline filtering is applied. When the bit depth is 8 this is essentially the same as boxed row flat pixel; when the bit depth is less than 8, several pixels are packed into each byte; when the bit depth is 16 (the only value more than 8 that is supported by the PNG image format) each pixel value is decomposed into 2 bytes (and `packed` is a misnomer). This format is used by the :meth:`Writer.write_packed` method. It isn't usually a convenient format, but may be just right if the source data for the PNG image comes from something that uses a similar format (for example, 1-bit BMPs, or another PNG file). And now, my famous members -------------------------- """ __version__ = "$URL: http://pypng.googlecode.com/svn/trunk/code/png.py $ $Rev: 228 $" import io import itertools import math import operator import struct import sys import zlib import warnings from array import array from functools import reduce from pygame.tests.test_utils import tostring __all__ = ["Image", "Reader", "Writer", "write_chunks", "from_array"] # The PNG signature. # http://www.w3.org/TR/PNG/#5PNG-file-signature _signature = struct.pack("8B", 137, 80, 78, 71, 13, 10, 26, 10) _adam7 = ( (0, 0, 8, 8), (4, 0, 8, 8), (0, 4, 4, 8), (2, 0, 4, 4), (0, 2, 2, 4), (1, 0, 2, 2), (0, 1, 1, 2), ) def group(s, n): # See # http://www.python.org/doc/2.6/library/functions.html#zip return zip(*[iter(s)] * n) def isarray(x): """Same as ``isinstance(x, array)``.""" return isinstance(x, array) # Conditionally convert to bytes. Works on Python 2 and Python 3. try: bytes("", "ascii") def strtobytes(x): return bytes(x, "iso8859-1") def bytestostr(x): return str(x, "iso8859-1") except: strtobytes = str bytestostr = str def interleave_planes(ipixels, apixels, ipsize, apsize): """ Interleave (colour) planes, e.g. RGB + A = RGBA. Return an array of pixels consisting of the `ipsize` elements of data from each pixel in `ipixels` followed by the `apsize` elements of data from each pixel in `apixels`. Conventionally `ipixels` and `apixels` are byte arrays so the sizes are bytes, but it actually works with any arrays of the same type. The returned array is the same type as the input arrays which should be the same type as each other. """ itotal = len(ipixels) atotal = len(apixels) newtotal = itotal + atotal newpsize = ipsize + apsize # Set up the output buffer # See http://www.python.org/doc/2.4.4/lib/module-array.html#l2h-1356 out = array(ipixels.typecode) # It's annoying that there is no cheap way to set the array size :-( out.extend(ipixels) out.extend(apixels) # Interleave in the pixel data for i in range(ipsize): out[i:newtotal:newpsize] = ipixels[i:itotal:ipsize] for i in range(apsize): out[i + ipsize : newtotal : newpsize] = apixels[i:atotal:apsize] return out def check_palette(palette): """Check a palette argument (to the :class:`Writer` class) for validity. Returns the palette as a list if okay; raises an exception otherwise. """ # None is the default and is allowed. if palette is None: return None p = list(palette) if not (0 < len(p) <= 256): raise ValueError("a palette must have between 1 and 256 entries") seen_triple = False for i, t in enumerate(p): if len(t) not in (3, 4): raise ValueError("palette entry %d: entries must be 3- or 4-tuples." % i) if len(t) == 3: seen_triple = True if seen_triple and len(t) == 4: raise ValueError( "palette entry %d: all 4-tuples must precede all 3-tuples" % i ) for x in t: if int(x) != x or not (0 <= x <= 255): raise ValueError( "palette entry %d: values must be integer: 0 <= x <= 255" % i ) return p class Error(Exception): prefix = "Error" def __str__(self): return f'{self.prefix}: {" ".join(self.args)}' class FormatError(Error): """Problem with input file format. In other words, PNG file does not conform to the specification in some way and is invalid. """ prefix = "FormatError" class ChunkError(FormatError): prefix = "ChunkError" class Writer: """ PNG encoder in pure Python. """ def __init__( self, width=None, height=None, size=None, greyscale=False, alpha=False, bitdepth=8, palette=None, transparent=None, background=None, gamma=None, compression=None, interlace=False, bytes_per_sample=None, # deprecated planes=None, colormap=None, maxval=None, chunk_limit=2**20, ): """ Create a PNG encoder object. Arguments: width, height Image size in pixels, as two separate arguments. size Image size (w,h) in pixels, as single argument. greyscale Input data is greyscale, not RGB. alpha Input data has alpha channel (RGBA or LA). bitdepth Bit depth: from 1 to 16. palette Create a palette for a colour mapped image (colour type 3). transparent Specify a transparent colour (create a ``tRNS`` chunk). background Specify a default background colour (create a ``bKGD`` chunk). gamma Specify a gamma value (create a ``gAMA`` chunk). compression zlib compression level (1-9). interlace Create an interlaced image. chunk_limit Write multiple ``IDAT`` chunks to save memory. The image size (in pixels) can be specified either by using the `width` and `height` arguments, or with the single `size` argument. If `size` is used it should be a pair (*width*, *height*). `greyscale` and `alpha` are booleans that specify whether an image is greyscale (or colour), and whether it has an alpha channel (or not). `bitdepth` specifies the bit depth of the source pixel values. Each source pixel value must be an integer between 0 and ``2**bitdepth-1``. For example, 8-bit images have values between 0 and 255. PNG only stores images with bit depths of 1,2,4,8, or 16. When `bitdepth` is not one of these values, the next highest valid bit depth is selected, and an ``sBIT`` (significant bits) chunk is generated that specifies the original precision of the source image. In this case the supplied pixel values will be rescaled to fit the range of the selected bit depth. The details of which bit depth / colour model combinations the PNG file format supports directly, are somewhat arcane (refer to the PNG specification for full details). Briefly: "small" bit depths (1,2,4) are only allowed with greyscale and colour mapped images; colour mapped images cannot have bit depth 16. For colour mapped images (in other words, when the `palette` argument is specified) the `bitdepth` argument must match one of the valid PNG bit depths: 1, 2, 4, or 8. (It is valid to have a PNG image with a palette and an ``sBIT`` chunk, but the meaning is slightly different; it would be awkward to press the `bitdepth` argument into service for this.) The `palette` option, when specified, causes a colour mapped image to be created: the PNG colour type is set to 3; greyscale must not be set; alpha must not be set; transparent must not be set; the bit depth must be 1,2,4, or 8. When a colour mapped image is created, the pixel values are palette indexes and the `bitdepth` argument specifies the size of these indexes (not the size of the colour values in the palette). The palette argument value should be a sequence of 3- or 4-tuples. 3-tuples specify RGB palette entries; 4-tuples specify RGBA palette entries. If both 4-tuples and 3-tuples appear in the sequence then all the 4-tuples must come before all the 3-tuples. A ``PLTE`` chunk is created; if there are 4-tuples then a ``tRNS`` chunk is created as well. The ``PLTE`` chunk will contain all the RGB triples in the same sequence; the ``tRNS`` chunk will contain the alpha channel for all the 4-tuples, in the same sequence. Palette entries are always 8-bit. If specified, the `transparent` and `background` parameters must be a tuple with three integer values for red, green, blue, or a simple integer (or singleton tuple) for a greyscale image. If specified, the `gamma` parameter must be a positive number (generally, a float). A ``gAMA`` chunk will be created. Note that this will not change the values of the pixels as they appear in the PNG file, they are assumed to have already been converted appropriately for the gamma specified. The `compression` argument specifies the compression level to be used by the ``zlib`` module. Higher values are likely to compress better, but will be slower to compress. The default for this argument is ``None``; this does not mean no compression, rather it means that the default from the ``zlib`` module is used (which is generally acceptable). If `interlace` is true then an interlaced image is created (using PNG's so far only interlace method, *Adam7*). This does not affect how the pixels should be presented to the encoder, rather it changes how they are arranged into the PNG file. On slow connexions interlaced images can be partially decoded by the browser to give a rough view of the image that is successively refined as more image data appears. .. note :: Enabling the `interlace` option requires the entire image to be processed in working memory. `chunk_limit` is used to limit the amount of memory used whilst compressing the image. In order to avoid using large amounts of memory, multiple ``IDAT`` chunks may be created. """ # At the moment the `planes` argument is ignored; # its purpose is to act as a dummy so that # ``Writer(x, y, **info)`` works, where `info` is a dictionary # returned by Reader.read and friends. # Ditto for `colormap`. # A couple of helper functions come first. Best skipped if you # are reading through. def isinteger(x): try: return int(x) == x except: return False def check_color(c, which): """Checks that a colour argument for transparent or background options is the right form. Also "corrects" bare integers to 1-tuples. """ if c is None: return c if greyscale: try: l = len(c) except TypeError: c = (c,) if len(c) != 1: raise ValueError(f"{which} for greyscale must be 1-tuple") if not isinteger(c[0]): raise ValueError(f"{which} colour for greyscale must be integer") else: if not ( len(c) == 3 and isinteger(c[0]) and isinteger(c[1]) and isinteger(c[2]) ): raise ValueError(f"{which} colour must be a triple of integers") return c if size: if len(size) != 2: raise ValueError("size argument should be a pair (width, height)") if width is not None and width != size[0]: raise ValueError( "size[0] (%r) and width (%r) should match when both are used." % (size[0], width) ) if height is not None and height != size[1]: raise ValueError( "size[1] (%r) and height (%r) should match when both are used." % (size[1], height) ) width, height = size del size if width <= 0 or height <= 0: raise ValueError("width and height must be greater than zero") if not isinteger(width) or not isinteger(height): raise ValueError("width and height must be integers") # http://www.w3.org/TR/PNG/#7Integers-and-byte-order if width > 2**32 - 1 or height > 2**32 - 1: raise ValueError("width and height cannot exceed 2**32-1") if alpha and transparent is not None: raise ValueError("transparent colour not allowed with alpha channel") if bytes_per_sample is not None: warnings.warn( "please use bitdepth instead of bytes_per_sample", DeprecationWarning ) if bytes_per_sample not in (0.125, 0.25, 0.5, 1, 2): raise ValueError("bytes per sample must be .125, .25, .5, 1, or 2") bitdepth = int(8 * bytes_per_sample) del bytes_per_sample if not isinteger(bitdepth) or bitdepth < 1 or 16 < bitdepth: raise ValueError( f"bitdepth ({bitdepth!r}) must be a positive integer <= 16" ) self.rescale = None if palette: if bitdepth not in (1, 2, 4, 8): raise ValueError("with palette, bitdepth must be 1, 2, 4, or 8") if transparent is not None: raise ValueError("transparent and palette not compatible") if alpha: raise ValueError("alpha and palette not compatible") if greyscale: raise ValueError("greyscale and palette not compatible") else: # No palette, check for sBIT chunk generation. if alpha or not greyscale: if bitdepth not in (8, 16): targetbitdepth = (8, 16)[bitdepth > 8] self.rescale = (bitdepth, targetbitdepth) bitdepth = targetbitdepth del targetbitdepth else: assert greyscale assert not alpha if bitdepth not in (1, 2, 4, 8, 16): if bitdepth > 8: targetbitdepth = 16 elif bitdepth == 3: targetbitdepth = 4 else: assert bitdepth in (5, 6, 7) targetbitdepth = 8 self.rescale = (bitdepth, targetbitdepth) bitdepth = targetbitdepth del targetbitdepth if bitdepth < 8 and (alpha or not greyscale and not palette): raise ValueError("bitdepth < 8 only permitted with greyscale or palette") if bitdepth > 8 and palette: raise ValueError("bit depth must be 8 or less for images with palette") transparent = check_color(transparent, "transparent") background = check_color(background, "background") # It's important that the true boolean values (greyscale, alpha, # colormap, interlace) are converted to bool because Iverson's # convention is relied upon later on. self.width = width self.height = height self.transparent = transparent self.background = background self.gamma = gamma self.greyscale = bool(greyscale) self.alpha = bool(alpha) self.colormap = bool(palette) self.bitdepth = int(bitdepth) self.compression = compression self.chunk_limit = chunk_limit self.interlace = bool(interlace) self.palette = check_palette(palette) self.color_type = 4 * self.alpha + 2 * (not greyscale) + 1 * self.colormap assert self.color_type in (0, 2, 3, 4, 6) self.color_planes = (3, 1)[self.greyscale or self.colormap] self.planes = self.color_planes + self.alpha # :todo: fix for bitdepth < 8 self.psize = (self.bitdepth / 8) * self.planes def make_palette(self): """Create the byte sequences for a ``PLTE`` and if necessary a ``tRNS`` chunk. Returned as a pair (*p*, *t*). *t* will be ``None`` if no ``tRNS`` chunk is necessary. """ p = array("B") t = array("B") for x in self.palette: p.extend(x[0:3]) if len(x) > 3: t.append(x[3]) p = tostring(p) t = tostring(t) if t: return p, t return p, None def write(self, outfile, rows): """Write a PNG image to the output file. `rows` should be an iterable that yields each row in boxed row flat pixel format. The rows should be the rows of the original image, so there should be ``self.height`` rows of ``self.width * self.planes`` values. If `interlace` is specified (when creating the instance), then an interlaced PNG file will be written. Supply the rows in the normal image order; the interlacing is carried out internally. .. note :: Interlacing will require the entire image to be in working memory. """ if self.interlace: fmt = "BH"[self.bitdepth > 8] a = array(fmt, itertools.chain(*rows)) return self.write_array(outfile, a) else: nrows = self.write_passes(outfile, rows) if nrows != self.height: raise ValueError( "rows supplied (%d) does not match height (%d)" % (nrows, self.height) ) def write_passes(self, outfile, rows, packed=False): """ Write a PNG image to the output file. Most users are expected to find the :meth:`write` or :meth:`write_array` method more convenient. The rows should be given to this method in the order that they appear in the output file. For straightlaced images, this is the usual top to bottom ordering, but for interlaced images the rows should have already been interlaced before passing them to this function. `rows` should be an iterable that yields each row. When `packed` is ``False`` the rows should be in boxed row flat pixel format; when `packed` is ``True`` each row should be a packed sequence of bytes. """ # http://www.w3.org/TR/PNG/#5PNG-file-signature outfile.write(_signature) # http://www.w3.org/TR/PNG/#11IHDR write_chunk( outfile, "IHDR", struct.pack( "!2I5B", self.width, self.height, self.bitdepth, self.color_type, 0, 0, self.interlace, ), ) # See :chunk:order # http://www.w3.org/TR/PNG/#11gAMA if self.gamma is not None: write_chunk( outfile, "gAMA", struct.pack("!L", int(round(self.gamma * 1e5))) ) # See :chunk:order # http://www.w3.org/TR/PNG/#11sBIT if self.rescale: write_chunk( outfile, "sBIT", struct.pack("%dB" % self.planes, *[self.rescale[0]] * self.planes), ) # :chunk:order: Without a palette (PLTE chunk), ordering is # relatively relaxed. With one, gAMA chunk must precede PLTE # chunk which must precede tRNS and bKGD. # See http://www.w3.org/TR/PNG/#5ChunkOrdering if self.palette: p, t = self.make_palette() write_chunk(outfile, "PLTE", p) if t: # tRNS chunk is optional. Only needed if palette entries # have alpha. write_chunk(outfile, "tRNS", t) # http://www.w3.org/TR/PNG/#11tRNS if self.transparent is not None: if self.greyscale: write_chunk(outfile, "tRNS", struct.pack("!1H", *self.transparent)) else: write_chunk(outfile, "tRNS", struct.pack("!3H", *self.transparent)) # http://www.w3.org/TR/PNG/#11bKGD if self.background is not None: if self.greyscale: write_chunk(outfile, "bKGD", struct.pack("!1H", *self.background)) else: write_chunk(outfile, "bKGD", struct.pack("!3H", *self.background)) # http://www.w3.org/TR/PNG/#11IDAT if self.compression is not None: compressor = zlib.compressobj(self.compression) else: compressor = zlib.compressobj() # Choose an extend function based on the bitdepth. The extend # function packs/decomposes the pixel values into bytes and # stuffs them onto the data array. data = array("B") if self.bitdepth == 8 or packed: extend = data.extend elif self.bitdepth == 16: # Decompose into bytes def extend(sl): fmt = f"!{len(sl)}H" data.extend(array("B", struct.pack(fmt, *sl))) else: # Pack into bytes assert self.bitdepth < 8 # samples per byte spb = int(8 / self.bitdepth) def extend(sl): a = array("B", sl) # Adding padding bytes so we can group into a whole # number of spb-tuples. l = float(len(a)) extra = math.ceil(l / float(spb)) * spb - l a.extend([0] * int(extra)) # Pack into bytes l = group(a, spb) l = (reduce(lambda x, y: (x << self.bitdepth) + y, e) for e in l) data.extend(l) if self.rescale: oldextend = extend factor = float(2 ** self.rescale[1] - 1) / float(2 ** self.rescale[0] - 1) def extend(sl): oldextend((int(round(factor * x)) for x in sl)) # Build the first row, testing mostly to see if we need to # changed the extend function to cope with NumPy integer types # (they cause our ordinary definition of extend to fail, so we # wrap it). See # http://code.google.com/p/pypng/issues/detail?id=44 enumrows = enumerate(rows) del rows # First row's filter type. data.append(0) # :todo: Certain exceptions in the call to ``.next()`` or the # following try would indicate no row data supplied. # Should catch. i, row = next(enumrows) try: # If this fails... extend(row) except: # ... try a version that converts the values to int first. # Not only does this work for the (slightly broken) NumPy # types, there are probably lots of other, unknown, "nearly" # int types it works for. def wrapmapint(f): return lambda sl: f(map(int, sl)) extend = wrapmapint(extend) del wrapmapint extend(row) for i, row in enumrows: # Add "None" filter type. Currently, it's essential that # this filter type be used for every scanline as we do not # mark the first row of a reduced pass image; that means we # could accidentally compute the wrong filtered scanline if # we used "up", "average", or "paeth" on such a line. data.append(0) extend(row) if len(data) > self.chunk_limit: compressed = compressor.compress(tostring(data)) if len(compressed): # print(len(data), len(compressed), file= >> sys.stderr) write_chunk(outfile, "IDAT", compressed) # Because of our very witty definition of ``extend``, # above, we must reuse the same ``data`` object. Hence # we use ``del`` to empty this one, rather than create a # fresh one (which would be my natural FP instinct). del data[:] if len(data): compressed = compressor.compress(tostring(data)) else: compressed = "" flushed = compressor.flush() if len(compressed) or len(flushed): # print(len(data), len(compressed), len(flushed), file=sys.stderr) write_chunk(outfile, "IDAT", compressed + flushed) # http://www.w3.org/TR/PNG/#11IEND write_chunk(outfile, "IEND") return i + 1 def write_array(self, outfile, pixels): """ Write an array in flat row flat pixel format as a PNG file on the output file. See also :meth:`write` method. """ if self.interlace: self.write_passes(outfile, self.array_scanlines_interlace(pixels)) else: self.write_passes(outfile, self.array_scanlines(pixels)) def write_packed(self, outfile, rows): """ Write PNG file to `outfile`. The pixel data comes from `rows` which should be in boxed row packed format. Each row should be a sequence of packed bytes. Technically, this method does work for interlaced images but it is best avoided. For interlaced images, the rows should be presented in the order that they appear in the file. This method should not be used when the source image bit depth is not one naturally supported by PNG; the bit depth should be 1, 2, 4, 8, or 16. """ if self.rescale: raise Error( "write_packed method not suitable for bit depth %d" % self.rescale[0] ) return self.write_passes(outfile, rows, packed=True) def convert_pnm(self, infile, outfile): """ Convert a PNM file containing raw pixel data into a PNG file with the parameters set in the writer object. Works for (binary) PGM, PPM, and PAM formats. """ if self.interlace: pixels = array("B") pixels.fromfile( infile, (self.bitdepth / 8) * self.color_planes * self.width * self.height, ) self.write_passes(outfile, self.array_scanlines_interlace(pixels)) else: self.write_passes(outfile, self.file_scanlines(infile)) def convert_ppm_and_pgm(self, ppmfile, pgmfile, outfile): """ Convert a PPM and PGM file containing raw pixel data into a PNG outfile with the parameters set in the writer object. """ pixels = array("B") pixels.fromfile( ppmfile, (self.bitdepth / 8) * self.color_planes * self.width * self.height ) apixels = array("B") apixels.fromfile(pgmfile, (self.bitdepth / 8) * self.width * self.height) pixels = interleave_planes( pixels, apixels, (self.bitdepth / 8) * self.color_planes, (self.bitdepth / 8), ) if self.interlace: self.write_passes(outfile, self.array_scanlines_interlace(pixels)) else: self.write_passes(outfile, self.array_scanlines(pixels)) def file_scanlines(self, infile): """ Generates boxed rows in flat pixel format, from the input file `infile`. It assumes that the input file is in a "Netpbm-like" binary format, and is positioned at the beginning of the first pixel. The number of pixels to read is taken from the image dimensions (`width`, `height`, `planes`) and the number of bytes per value is implied by the image `bitdepth`. """ # Values per row vpr = self.width * self.planes row_bytes = vpr if self.bitdepth > 8: assert self.bitdepth == 16 row_bytes *= 2 fmt = ">%dH" % vpr def line(): return array("H", struct.unpack(fmt, infile.read(row_bytes))) else: def line(): scanline = array("B", infile.read(row_bytes)) return scanline for y in range(self.height): yield line() def array_scanlines(self, pixels): """ Generates boxed rows (flat pixels) from flat rows (flat pixels) in an array. """ # Values per row vpr = self.width * self.planes stop = 0 for y in range(self.height): start = stop stop = start + vpr yield pixels[start:stop] def array_scanlines_interlace(self, pixels): """ Generator for interlaced scanlines from an array. `pixels` is the full source image in flat row flat pixel format. The generator yields each scanline of the reduced passes in turn, in boxed row flat pixel format. """ # http://www.w3.org/TR/PNG/#8InterlaceMethods # Array type. fmt = "BH"[self.bitdepth > 8] # Value per row vpr = self.width * self.planes for xstart, ystart, xstep, ystep in _adam7: if xstart >= self.width: continue # Pixels per row (of reduced image) ppr = int(math.ceil((self.width - xstart) / float(xstep))) # number of values in reduced image row. row_len = ppr * self.planes for y in range(ystart, self.height, ystep): if xstep == 1: offset = y * vpr yield pixels[offset : offset + vpr] else: row = array(fmt) # There's no easier way to set the length of an array row.extend(pixels[0:row_len]) offset = y * vpr + xstart * self.planes end_offset = (y + 1) * vpr skip = self.planes * xstep for i in range(self.planes): row[i :: self.planes] = pixels[offset + i : end_offset : skip] yield row def write_chunk(outfile, tag, data=strtobytes("")): """ Write a PNG chunk to the output file, including length and checksum. """ # http://www.w3.org/TR/PNG/#5Chunk-layout outfile.write(struct.pack("!I", len(data))) tag = strtobytes(tag) outfile.write(tag) outfile.write(data) checksum = zlib.crc32(tag) checksum = zlib.crc32(data, checksum) checksum &= 2**32 - 1 outfile.write(struct.pack("!I", checksum)) def write_chunks(out, chunks): """Create a PNG file by writing out the chunks.""" out.write(_signature) for chunk in chunks: write_chunk(out, *chunk) def filter_scanline(type, line, fo, prev=None): """Apply a scanline filter to a scanline. `type` specifies the filter type (0 to 4); `line` specifies the current (unfiltered) scanline as a sequence of bytes; `prev` specifies the previous (unfiltered) scanline as a sequence of bytes. `fo` specifies the filter offset; normally this is size of a pixel in bytes (the number of bytes per sample times the number of channels), but when this is < 1 (for bit depths < 8) then the filter offset is 1. """ assert 0 <= type < 5 # The output array. Which, pathetically, we extend one-byte at a # time (fortunately this is linear). out = array("B", [type]) def sub(): ai = -fo for x in line: if ai >= 0: x = (x - line[ai]) & 0xFF out.append(x) ai += 1 def up(): for i, x in enumerate(line): x = (x - prev[i]) & 0xFF out.append(x) def average(): ai = -fo for i, x in enumerate(line): if ai >= 0: x = (x - ((line[ai] + prev[i]) >> 1)) & 0xFF else: x = (x - (prev[i] >> 1)) & 0xFF out.append(x) ai += 1 def paeth(): # http://www.w3.org/TR/PNG/#9Filter-type-4-Paeth ai = -fo # also used for ci for i, x in enumerate(line): a = 0 b = prev[i] c = 0 if ai >= 0: a = line[ai] c = prev[ai] p = a + b - c pa = abs(p - a) pb = abs(p - b) pc = abs(p - c) if pa <= pb and pa <= pc: Pr = a elif pb <= pc: Pr = b else: Pr = c x = (x - Pr) & 0xFF out.append(x) ai += 1 if not prev: # We're on the first line. Some of the filters can be reduced # to simpler cases which makes handling the line "off the top" # of the image simpler. "up" becomes "none"; "paeth" becomes # "left" (non-trivial, but true). "average" needs to be handled # specially. if type == 2: # "up" return line # type = 0 elif type == 3: prev = [0] * len(line) elif type == 4: # "paeth" type = 1 if type == 0: out.extend(line) elif type == 1: sub() elif type == 2: up() elif type == 3: average() else: # type == 4 paeth() return out def from_array(a, mode=None, info={}): """Create a PNG :class:`Image` object from a 2- or 3-dimensional array. One application of this function is easy PIL-style saving: ``png.from_array(pixels, 'L').save('foo.png')``. .. note : The use of the term *3-dimensional* is for marketing purposes only. It doesn't actually work. Please bear with us. Meanwhile enjoy the complimentary snacks (on request) and please use a 2-dimensional array. Unless they are specified using the *info* parameter, the PNG's height and width are taken from the array size. For a 3 dimensional array the first axis is the height; the second axis is the width; and the third axis is the channel number. Thus an RGB image that is 16 pixels high and 8 wide will use an array that is 16x8x3. For 2 dimensional arrays the first axis is the height, but the second axis is ``width*channels``, so an RGB image that is 16 pixels high and 8 wide will use a 2-dimensional array that is 16x24 (each row will be 8*3==24 sample values). *mode* is a string that specifies the image colour format in a PIL-style mode. It can be: ``'L'`` greyscale (1 channel) ``'LA'`` greyscale with alpha (2 channel) ``'RGB'`` colour image (3 channel) ``'RGBA'`` colour image with alpha (4 channel) The mode string can also specify the bit depth (overriding how this function normally derives the bit depth, see below). Appending ``';16'`` to the mode will cause the PNG to be 16 bits per channel; any decimal from 1 to 16 can be used to specify the bit depth. When a 2-dimensional array is used *mode* determines how many channels the image has, and so allows the width to be derived from the second array dimension. The array is expected to be a ``numpy`` array, but it can be any suitable Python sequence. For example, a list of lists can be used: ``png.from_array([[0, 255, 0], [255, 0, 255]], 'L')``. The exact rules are: ``len(a)`` gives the first dimension, height; ``len(a[0])`` gives the second dimension; ``len(a[0][0])`` gives the third dimension, unless an exception is raised in which case a 2-dimensional array is assumed. It's slightly more complicated than that because an iterator of rows can be used, and it all still works. Using an iterator allows data to be streamed efficiently. The bit depth of the PNG is normally taken from the array element's datatype (but if *mode* specifies a bitdepth then that is used instead). The array element's datatype is determined in a way which is supposed to work both for ``numpy`` arrays and for Python ``array.array`` objects. A 1 byte datatype will give a bit depth of 8, a 2 byte datatype will give a bit depth of 16. If the datatype does not have an implicit size, for example it is a plain Python list of lists, as above, then a default of 8 is used. The *info* parameter is a dictionary that can be used to specify metadata (in the same style as the arguments to the :class:``png.Writer`` class). For this function the keys that are useful are: height overrides the height derived from the array dimensions and allows *a* to be an iterable. width overrides the width derived from the array dimensions. bitdepth overrides the bit depth derived from the element datatype (but must match *mode* if that also specifies a bit depth). Generally anything specified in the *info* dictionary will override any implicit choices that this function would otherwise make, but must match any explicit ones. For example, if the *info* dictionary has a ``greyscale`` key then this must be true when mode is ``'L'`` or ``'LA'`` and false when mode is ``'RGB'`` or ``'RGBA'``. """ # We abuse the *info* parameter by modifying it. Take a copy here. # (Also typechecks *info* to some extent). info = dict(info) # Syntax check mode string. bitdepth = None try: mode = mode.split(";") if len(mode) not in (1, 2): raise Error() if mode[0] not in ("L", "LA", "RGB", "RGBA"): raise Error() if len(mode) == 2: try: bitdepth = int(mode[1]) except: raise Error() except Error: raise Error("mode string should be 'RGB' or 'L;16' or similar.") mode = mode[0] # Get bitdepth from *mode* if possible. if bitdepth: if info.get("bitdepth") and bitdepth != info["bitdepth"]: raise Error( "mode bitdepth (%d) should match info bitdepth (%d)." % (bitdepth, info["bitdepth"]) ) info["bitdepth"] = bitdepth # Fill in and/or check entries in *info*. # Dimensions. if "size" in info: # Check width, height, size all match where used. for dimension, axis in [("width", 0), ("height", 1)]: if dimension in info: if info[dimension] != info["size"][axis]: raise Error( f"info[{dimension!r}] should match info['size'][{axis!r}]." ) info["width"], info["height"] = info["size"] if "height" not in info: try: l = len(a) except: raise Error("len(a) does not work, supply info['height'] instead.") info["height"] = l # Colour format. if "greyscale" in info: if bool(info["greyscale"]) != ("L" in mode): raise Error("info['greyscale'] should match mode.") info["greyscale"] = "L" in mode if "alpha" in info: if bool(info["alpha"]) != ("A" in mode): raise Error("info['alpha'] should match mode.") info["alpha"] = "A" in mode planes = len(mode) if "planes" in info: if info["planes"] != planes: raise Error("info['planes'] should match mode.") # In order to work out whether we the array is 2D or 3D we need its # first row, which requires that we take a copy of its iterator. # We may also need the first row to derive width and bitdepth. a, t = itertools.tee(a) row = next(t) del t try: row[0][0] threed = True testelement = row[0] except: threed = False testelement = row if "width" not in info: if threed: width = len(row) else: width = len(row) // planes info["width"] = width # Not implemented yet assert not threed if "bitdepth" not in info: try: dtype = testelement.dtype # goto the "else:" clause. Sorry. except: try: # Try a Python array.array. bitdepth = 8 * testelement.itemsize except: # We can't determine it from the array element's # datatype, use a default of 8. bitdepth = 8 else: # If we got here without exception, we now assume that # the array is a numpy array. if dtype.kind == "b": bitdepth = 1 else: bitdepth = 8 * dtype.itemsize info["bitdepth"] = bitdepth for thing in "width height bitdepth greyscale alpha".split(): assert thing in info return Image(a, info) # So that refugee's from PIL feel more at home. Not documented. fromarray = from_array class Image: """A PNG image. You can create an :class:`Image` object from an array of pixels by calling :meth:`png.from_array`. It can be saved to disk with the :meth:`save` method.""" def __init__(self, rows, info): """ .. note :: The constructor is not public. Please do not call it. """ self.rows = rows self.info = info def save(self, file): """Save the image to *file*. If *file* looks like an open file descriptor then it is used, otherwise it is treated as a filename and a fresh file is opened. In general, you can only call this method once; after it has been called the first time and the PNG image has been saved, the source data will have been streamed, and cannot be streamed again. """ w = Writer(**self.info) try: file.write def close(): pass except: file = open(file, "wb") def close(): file.close() try: w.write(file, self.rows) finally: close() class _readable: """ A simple file-like interface for strings and arrays. """ def __init__(self, buf): self.buf = buf self.offset = 0 def read(self, n): r = self.buf[self.offset : self.offset + n] if isarray(r): r = tostring(r) self.offset += n return r class Reader: """ PNG decoder in pure Python. """ def __init__(self, _guess=None, **kw): """ Create a PNG decoder object. The constructor expects exactly one keyword argument. If you supply a positional argument instead, it will guess the input type. You can choose among the following keyword arguments: filename Name of input file (a PNG file). file A file-like object (object with a read() method). bytes ``array`` or ``string`` with PNG data. """ if (_guess is not None and len(kw) != 0) or (_guess is None and len(kw) != 1): raise TypeError("Reader() takes exactly 1 argument") # Will be the first 8 bytes, later on. See validate_signature. self.signature = None self.transparent = None # A pair of (len,type) if a chunk has been read but its data and # checksum have not (in other words the file position is just # past the 4 bytes that specify the chunk type). See preamble # method for how this is used. self.atchunk = None if _guess is not None: if isarray(_guess): kw["bytes"] = _guess elif isinstance(_guess, str): kw["filename"] = _guess elif isinstance(_guess, io.IOBase): kw["file"] = _guess if "filename" in kw: self.file = open(kw["filename"], "rb") elif "file" in kw: self.file = kw["file"] elif "bytes" in kw: self.file = _readable(kw["bytes"]) else: raise TypeError("expecting filename, file or bytes array") def chunk(self, seek=None): """ Read the next PNG chunk from the input file; returns a (*type*,*data*) tuple. *type* is the chunk's type as a string (all PNG chunk types are 4 characters long). *data* is the chunk's data content, as a string. If the optional `seek` argument is specified then it will keep reading chunks until it either runs out of file or finds the type specified by the argument. Note that in general the order of chunks in PNGs is unspecified, so using `seek` can cause you to miss chunks. """ self.validate_signature() while True: # http://www.w3.org/TR/PNG/#5Chunk-layout if not self.atchunk: self.atchunk = self.chunklentype() length, type = self.atchunk self.atchunk = None data = self.file.read(length) if len(data) != length: raise ChunkError( "Chunk %s too short for required %i octets." % (type, length) ) checksum = self.file.read(4) if len(checksum) != 4: raise ValueError("Chunk %s too short for checksum.", checksum) if seek and type != seek: continue verify = zlib.crc32(strtobytes(type)) verify = zlib.crc32(data, verify) # Whether the output from zlib.crc32 is signed or not varies # according to hideous implementation details, see # http://bugs.python.org/issue1202 . # We coerce it to be positive here (in a way which works on # Python 2.3 and older). verify &= 2**32 - 1 verify = struct.pack("!I", verify) if checksum != verify: # print(repr(checksum)) (a,) = struct.unpack("!I", checksum) (b,) = struct.unpack("!I", verify) raise ChunkError( f"Checksum error in {type} chunk: 0x{a:08X} != 0x{b:08X}." ) return type, data def chunks(self): """Return an iterator that will yield each chunk as a (*chunktype*, *content*) pair. """ while True: t, v = self.chunk() yield t, v if t == "IEND": break def undo_filter(self, filter_type, scanline, previous): """Undo the filter for a scanline. `scanline` is a sequence of bytes that does not include the initial filter type byte. `previous` is decoded previous scanline (for straightlaced images this is the previous pixel row, but for interlaced images, it is the previous scanline in the reduced image, which in general is not the previous pixel row in the final image). When there is no previous scanline (the first row of a straightlaced image, or the first row in one of the passes in an interlaced image), then this argument should be ``None``. The scanline will have the effects of filtering removed, and the result will be returned as a fresh sequence of bytes. """ # :todo: Would it be better to update scanline in place? # Create the result byte array. It seems that the best way to # create the array to be the right size is to copy from an # existing sequence. *sigh* # If we fill the result with scanline, then this allows a # micro-optimisation in the "null" and "sub" cases. result = array("B", scanline) if filter_type == 0: # And here, we _rely_ on filling the result with scanline, # above. return result if filter_type not in (1, 2, 3, 4): raise FormatError( "Invalid PNG Filter Type." " See http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ." ) # Filter unit. The stride from one pixel to the corresponding # byte from the previous previous. Normally this is the pixel # size in bytes, but when this is smaller than 1, the previous # byte is used instead. fu = max(1, self.psize) # For the first line of a pass, synthesize a dummy previous # line. An alternative approach would be to observe that on the # first line 'up' is the same as 'null', 'paeth' is the same # as 'sub', with only 'average' requiring any special case. if not previous: previous = array("B", [0] * len(scanline)) def sub(): """Undo sub filter.""" ai = 0 # Loops starts at index fu. Observe that the initial part # of the result is already filled in correctly with # scanline. for i in range(fu, len(result)): x = scanline[i] a = result[ai] result[i] = (x + a) & 0xFF ai += 1 def up(): """Undo up filter.""" for i in range(len(result)): # pylint: disable=consider-using-enumerate x = scanline[i] b = previous[i] result[i] = (x + b) & 0xFF def average(): """Undo average filter.""" ai = -fu for i in range(len(result)): # pylint: disable=consider-using-enumerate x = scanline[i] if ai < 0: a = 0 else: a = result[ai] b = previous[i] result[i] = (x + ((a + b) >> 1)) & 0xFF ai += 1 def paeth(): """Undo Paeth filter.""" # Also used for ci. ai = -fu for i in range(len(result)): # pylint: disable=consider-using-enumerate x = scanline[i] if ai < 0: a = c = 0 else: a = result[ai] c = previous[ai] b = previous[i] p = a + b - c pa = abs(p - a) pb = abs(p - b) pc = abs(p - c) if pa <= pb and pa <= pc: pr = a elif pb <= pc: pr = b else: pr = c result[i] = (x + pr) & 0xFF ai += 1 # Call appropriate filter algorithm. Note that 0 has already # been dealt with. (None, sub, up, average, paeth)[filter_type]() return result def deinterlace(self, raw): """ Read raw pixel data, undo filters, deinterlace, and flatten. Return in flat row flat pixel format. """ # print("Reading interlaced, w=%s, r=%s, planes=%s, bpp=%s" # % (self.width, self.height, self.planes, self.bps, file=sys.stderr)) # Values per row (of the target image) vpr = self.width * self.planes # Make a result array, and make it big enough. Interleaving # writes to the output array randomly (well, not quite), so the # entire output array must be in memory. fmt = "BH"[self.bitdepth > 8] a = array(fmt, [0] * vpr * self.height) source_offset = 0 for xstart, ystart, xstep, ystep in _adam7: # print("Adam7: start=%s,%s step=%s,%s" % ( # xstart, ystart, xstep, ystep, file=sys.stderr)) if xstart >= self.width: continue # The previous (reconstructed) scanline. None at the # beginning of a pass to indicate that there is no previous # line. recon = None # Pixels per row (reduced pass image) ppr = int(math.ceil((self.width - xstart) / float(xstep))) # Row size in bytes for this pass. row_size = int(math.ceil(self.psize * ppr)) for y in range(ystart, self.height, ystep): filter_type = raw[source_offset] source_offset += 1 scanline = raw[source_offset : source_offset + row_size] source_offset += row_size recon = self.undo_filter(filter_type, scanline, recon) # Convert so that there is one element per pixel value flat = self.serialtoflat(recon, ppr) if xstep == 1: assert xstart == 0 offset = y * vpr a[offset : offset + vpr] = flat else: offset = y * vpr + xstart * self.planes end_offset = (y + 1) * vpr skip = self.planes * xstep for i in range(self.planes): a[offset + i : end_offset : skip] = flat[i :: self.planes] return a def iterboxed(self, rows): """Iterator that yields each scanline in boxed row flat pixel format. `rows` should be an iterator that yields the bytes of each row in turn. """ def asvalues(raw): """Convert a row of raw bytes into a flat row. Result may or may not share with argument""" if self.bitdepth == 8: return raw if self.bitdepth == 16: raw = tostring(raw) return array("H", struct.unpack("!%dH" % (len(raw) // 2), raw)) assert self.bitdepth < 8 width = self.width # Samples per byte spb = 8 // self.bitdepth out = array("B") mask = 2**self.bitdepth - 1 shifts = map(self.bitdepth.__mul__, reversed(range(spb))) for o in raw: out.extend((mask & (o >> i) for i in shifts)) return out[:width] return map(asvalues, rows) def serialtoflat(self, bytes, width=None): """Convert serial format (byte stream) pixel data to flat row flat pixel. """ if self.bitdepth == 8: return bytes if self.bitdepth == 16: bytes = tostring(bytes) return array("H", struct.unpack("!%dH" % (len(bytes) // 2), bytes)) assert self.bitdepth < 8 if width is None: width = self.width # Samples per byte spb = 8 // self.bitdepth out = array("B") mask = 2**self.bitdepth - 1 shifts = map(self.bitdepth.__mul__, reversed(range(spb))) l = width for o in bytes: out.extend([(mask & (o >> s)) for s in shifts][:l]) l -= spb if l <= 0: l = width return out def iterstraight(self, raw): """Iterator that undoes the effect of filtering, and yields each row in serialised format (as a sequence of bytes). Assumes input is straightlaced. `raw` should be an iterable that yields the raw bytes in chunks of arbitrary size.""" # length of row, in bytes rb = self.row_bytes a = array("B") # The previous (reconstructed) scanline. None indicates first # line of image. recon = None for some in raw: a.extend(some) while len(a) >= rb + 1: filter_type = a[0] scanline = a[1 : rb + 1] del a[: rb + 1] recon = self.undo_filter(filter_type, scanline, recon) yield recon if len(a) != 0: # :file:format We get here with a file format error: when the # available bytes (after decompressing) do not pack into exact # rows. raise FormatError("Wrong size for decompressed IDAT chunk.") assert len(a) == 0 def validate_signature(self): """If signature (header) has not been read then read and validate it; otherwise do nothing. """ if self.signature: return self.signature = self.file.read(8) if self.signature != _signature: raise FormatError("PNG file has invalid signature.") def preamble(self): """ Extract the image metadata by reading the initial part of the PNG file up to the start of the ``IDAT`` chunk. All the chunks that precede the ``IDAT`` chunk are read and either processed for metadata or discarded. """ self.validate_signature() while True: if not self.atchunk: self.atchunk = self.chunklentype() if self.atchunk is None: raise FormatError("This PNG file has no IDAT chunks.") if self.atchunk[1] == "IDAT": return self.process_chunk() def chunklentype(self): """Reads just enough of the input to determine the next chunk's length and type, returned as a (*length*, *type*) pair where *type* is a string. If there are no more chunks, ``None`` is returned. """ x = self.file.read(8) if not x: return None if len(x) != 8: raise FormatError("End of file whilst reading chunk length and type.") length, type = struct.unpack("!I4s", x) type = bytestostr(type) if length > 2**31 - 1: raise FormatError("Chunk %s is too large: %d." % (type, length)) return length, type def process_chunk(self): """Process the next chunk and its data. This only processes the following chunk types, all others are ignored: ``IHDR``, ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``. """ type, data = self.chunk() if type == "IHDR": # http://www.w3.org/TR/PNG/#11IHDR if len(data) != 13: raise FormatError("IHDR chunk has incorrect length.") ( self.width, self.height, self.bitdepth, self.color_type, self.compression, self.filter, self.interlace, ) = struct.unpack("!2I5B", data) # Check that the header specifies only valid combinations. if self.bitdepth not in (1, 2, 4, 8, 16): raise Error("invalid bit depth %d" % self.bitdepth) if self.color_type not in (0, 2, 3, 4, 6): raise Error("invalid colour type %d" % self.color_type) # Check indexed (palettized) images have 8 or fewer bits # per pixel; check only indexed or greyscale images have # fewer than 8 bits per pixel. if (self.color_type & 1 and self.bitdepth > 8) or ( self.bitdepth < 8 and self.color_type not in (0, 3) ): raise FormatError( "Illegal combination of bit depth (%d)" " and colour type (%d)." " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." % (self.bitdepth, self.color_type) ) if self.compression != 0: raise Error("unknown compression method %d" % self.compression) if self.filter != 0: raise FormatError( "Unknown filter method %d," " see http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ." % self.filter ) if self.interlace not in (0, 1): raise FormatError( "Unknown interlace method %d," " see http://www.w3.org/TR/2003/REC-PNG-20031110/#8InterlaceMethods ." % self.interlace ) # Derived values # http://www.w3.org/TR/PNG/#6Colour-values colormap = bool(self.color_type & 1) greyscale = not (self.color_type & 2) alpha = bool(self.color_type & 4) color_planes = (3, 1)[greyscale or colormap] planes = color_planes + alpha self.colormap = colormap self.greyscale = greyscale self.alpha = alpha self.color_planes = color_planes self.planes = planes self.psize = float(self.bitdepth) / float(8) * planes if int(self.psize) == self.psize: self.psize = int(self.psize) self.row_bytes = int(math.ceil(self.width * self.psize)) # Stores PLTE chunk if present, and is used to check # chunk ordering constraints. self.plte = None # Stores tRNS chunk if present, and is used to check chunk # ordering constraints. self.trns = None # Stores sbit chunk if present. self.sbit = None elif type == "PLTE": # http://www.w3.org/TR/PNG/#11PLTE if self.plte: warnings.warn("Multiple PLTE chunks present.") self.plte = data if len(data) % 3 != 0: raise FormatError("PLTE chunk's length should be a multiple of 3.") if len(data) > (2**self.bitdepth) * 3: raise FormatError("PLTE chunk is too long.") if len(data) == 0: raise FormatError("Empty PLTE is not allowed.") elif type == "bKGD": try: if self.colormap: if not self.plte: warnings.warn("PLTE chunk is required before bKGD chunk.") self.background = struct.unpack("B", data) else: self.background = struct.unpack("!%dH" % self.color_planes, data) except struct.error: raise FormatError("bKGD chunk has incorrect length.") elif type == "tRNS": # http://www.w3.org/TR/PNG/#11tRNS self.trns = data if self.colormap: if not self.plte: warnings.warn("PLTE chunk is required before tRNS chunk.") else: if len(data) > len(self.plte) / 3: # Was warning, but promoted to Error as it # would otherwise cause pain later on. raise FormatError("tRNS chunk is too long.") else: if self.alpha: raise FormatError( "tRNS chunk is not valid with colour type %d." % self.color_type ) try: self.transparent = struct.unpack("!%dH" % self.color_planes, data) except struct.error: raise FormatError("tRNS chunk has incorrect length.") elif type == "gAMA": try: self.gamma = struct.unpack("!L", data)[0] / 100000.0 except struct.error: raise FormatError("gAMA chunk has incorrect length.") elif type == "sBIT": self.sbit = data if ( self.colormap and len(data) != 3 or not self.colormap and len(data) != self.planes ): raise FormatError("sBIT chunk has incorrect length.") def read(self): """ Read the PNG file and decode it. Returns (`width`, `height`, `pixels`, `metadata`). May use excessive memory. `pixels` are returned in boxed row flat pixel format. """ def iteridat(): """Iterator that yields all the ``IDAT`` chunks as strings.""" while True: try: type, data = self.chunk() except ValueError as e: raise ChunkError(e.args[0]) if type == "IEND": # http://www.w3.org/TR/PNG/#11IEND break if type != "IDAT": continue # type == 'IDAT' # http://www.w3.org/TR/PNG/#11IDAT if self.colormap and not self.plte: warnings.warn("PLTE chunk is required before IDAT chunk") yield data def iterdecomp(idat): """Iterator that yields decompressed strings. `idat` should be an iterator that yields the ``IDAT`` chunk data. """ # Currently, with no max_length parameter to decompress, this # routine will do one yield per IDAT chunk. So not very # incremental. d = zlib.decompressobj() # Each IDAT chunk is passed to the decompressor, then any # remaining state is decompressed out. for data in idat: # :todo: add a max_length argument here to limit output # size. yield array("B", d.decompress(data)) yield array("B", d.flush()) self.preamble() raw = iterdecomp(iteridat()) if self.interlace: raw = array("B", itertools.chain(*raw)) arraycode = "BH"[self.bitdepth > 8] # Like :meth:`group` but producing an array.array object for # each row. pixels = map( lambda *row: array(arraycode, row), *[iter(self.deinterlace(raw))] * self.width * self.planes, ) else: pixels = self.iterboxed(self.iterstraight(raw)) meta = {} for attr in "greyscale alpha planes bitdepth interlace".split(): meta[attr] = getattr(self, attr) meta["size"] = (self.width, self.height) for attr in "gamma transparent background".split(): a = getattr(self, attr, None) if a is not None: meta[attr] = a return self.width, self.height, pixels, meta def read_flat(self): """ Read a PNG file and decode it into flat row flat pixel format. Returns (*width*, *height*, *pixels*, *metadata*). May use excessive memory. `pixels` are returned in flat row flat pixel format. See also the :meth:`read` method which returns pixels in the more stream-friendly boxed row flat pixel format. """ x, y, pixel, meta = self.read() arraycode = "BH"[meta["bitdepth"] > 8] pixel = array(arraycode, itertools.chain(*pixel)) return x, y, pixel, meta def palette(self, alpha="natural"): """Returns a palette that is a sequence of 3-tuples or 4-tuples, synthesizing it from the ``PLTE`` and ``tRNS`` chunks. These chunks should have already been processed (for example, by calling the :meth:`preamble` method). All the tuples are the same size: 3-tuples if there is no ``tRNS`` chunk, 4-tuples when there is a ``tRNS`` chunk. Assumes that the image is colour type 3 and therefore a ``PLTE`` chunk is required. If the `alpha` argument is ``'force'`` then an alpha channel is always added, forcing the result to be a sequence of 4-tuples. """ if not self.plte: raise FormatError("Required PLTE chunk is missing in colour type 3 image.") plte = group(array("B", self.plte), 3) if self.trns or alpha == "force": trns = array("B", self.trns or "") trns.extend([255] * (len(plte) - len(trns))) plte = map(operator.add, plte, group(trns, 1)) return plte def asDirect(self): """Returns the image data as a direct representation of an ``x * y * planes`` array. This method is intended to remove the need for callers to deal with palettes and transparency themselves. Images with a palette (colour type 3) are converted to RGB or RGBA; images with transparency (a ``tRNS`` chunk) are converted to LA or RGBA as appropriate. When returned in this format the pixel values represent the colour value directly without needing to refer to palettes or transparency information. Like the :meth:`read` method this method returns a 4-tuple: (*width*, *height*, *pixels*, *meta*) This method normally returns pixel values with the bit depth they have in the source image, but when the source PNG has an ``sBIT`` chunk it is inspected and can reduce the bit depth of the result pixels; pixel values will be reduced according to the bit depth specified in the ``sBIT`` chunk (PNG nerds should note a single result bit depth is used for all channels; the maximum of the ones specified in the ``sBIT`` chunk. An RGB565 image will be rescaled to 6-bit RGB666). The *meta* dictionary that is returned reflects the `direct` format and not the original source image. For example, an RGB source image with a ``tRNS`` chunk to represent a transparent colour, will have ``planes=3`` and ``alpha=False`` for the source image, but the *meta* dictionary returned by this method will have ``planes=4`` and ``alpha=True`` because an alpha channel is synthesized and added. *pixels* is the pixel data in boxed row flat pixel format (just like the :meth:`read` method). All the other aspects of the image data are not changed. """ self.preamble() # Simple case, no conversion necessary. if not self.colormap and not self.trns and not self.sbit: return self.read() x, y, pixels, meta = self.read() if self.colormap: meta["colormap"] = False meta["alpha"] = bool(self.trns) meta["bitdepth"] = 8 meta["planes"] = 3 + bool(self.trns) plte = list(self.palette()) def iterpal(pixels): for row in pixels: row = map(plte.__getitem__, row) yield array("B", itertools.chain(*row)) pixels = iterpal(pixels) elif self.trns: # It would be nice if there was some reasonable way of doing # this without generating a whole load of intermediate tuples. # But tuples does seem like the easiest way, with no other way # clearly much simpler or much faster. (Actually, the L to LA # conversion could perhaps go faster (all those 1-tuples!), but # I still wonder whether the code proliferation is worth it) it = self.transparent maxval = 2 ** meta["bitdepth"] - 1 planes = meta["planes"] meta["alpha"] = True meta["planes"] += 1 typecode = "BH"[meta["bitdepth"] > 8] def itertrns(pixels): for row in pixels: # For each row we group it into pixels, then form a # characterisation vector that says whether each pixel # is opaque or not. Then we convert True/False to # 0/maxval (by multiplication), and add it as the extra # channel. row = group(row, planes) opa = map(it.__ne__, row) opa = map(maxval.__mul__, opa) opa = zip(opa) # convert to 1-tuples yield array(typecode, itertools.chain(*map(operator.add, row, opa))) pixels = itertrns(pixels) targetbitdepth = None if self.sbit: sbit = struct.unpack(f"{len(self.sbit)}B", self.sbit) targetbitdepth = max(sbit) if targetbitdepth > meta["bitdepth"]: raise Error("sBIT chunk %r exceeds bitdepth %d" % (sbit, self.bitdepth)) if min(sbit) <= 0: raise Error(f"sBIT chunk {sbit!r} has a 0-entry") if targetbitdepth == meta["bitdepth"]: targetbitdepth = None if targetbitdepth: shift = meta["bitdepth"] - targetbitdepth meta["bitdepth"] = targetbitdepth def itershift(pixels): for row in pixels: yield map(shift.__rrshift__, row) pixels = itershift(pixels) return x, y, pixels, meta def asFloat(self, maxval=1.0): """Return image pixels as per :meth:`asDirect` method, but scale all pixel values to be floating point values between 0.0 and *maxval*. """ x, y, pixels, info = self.asDirect() sourcemaxval = 2 ** info["bitdepth"] - 1 del info["bitdepth"] info["maxval"] = float(maxval) factor = float(maxval) / float(sourcemaxval) def iterfloat(): for row in pixels: yield map(factor.__mul__, row) return x, y, iterfloat(), info def _as_rescale(self, get, targetbitdepth): """Helper used by :meth:`asRGB8` and :meth:`asRGBA8`.""" width, height, pixels, meta = get() maxval = 2 ** meta["bitdepth"] - 1 targetmaxval = 2**targetbitdepth - 1 factor = float(targetmaxval) / float(maxval) meta["bitdepth"] = targetbitdepth def iterscale(): for row in pixels: yield (int(round(x * factor)) for x in row) return width, height, iterscale(), meta def asRGB8(self): """Return the image data as an RGB pixels with 8-bits per sample. This is like the :meth:`asRGB` method except that this method additionally rescales the values so that they are all between 0 and 255 (8-bit). In the case where the source image has a bit depth < 8 the transformation preserves all the information; where the source image has bit depth > 8, then rescaling to 8-bit values loses precision. No dithering is performed. Like :meth:`asRGB`, an alpha channel in the source image will raise an exception. This function returns a 4-tuple: (*width*, *height*, *pixels*, *metadata*). *width*, *height*, *metadata* are as per the :meth:`read` method. *pixels* is the pixel data in boxed row flat pixel format. """ return self._as_rescale(self.asRGB, 8) def asRGBA8(self): """Return the image data as RGBA pixels with 8-bits per sample. This method is similar to :meth:`asRGB8` and :meth:`asRGBA`: The result pixels have an alpha channel, *and* values are rescaled to the range 0 to 255. The alpha channel is synthesized if necessary (with a small speed penalty). """ return self._as_rescale(self.asRGBA, 8) def asRGB(self): """Return image as RGB pixels. RGB colour images are passed through unchanged; greyscales are expanded into RGB triplets (there is a small speed overhead for doing this). An alpha channel in the source image will raise an exception. The return values are as for the :meth:`read` method except that the *metadata* reflect the returned pixels, not the source image. In particular, for this method ``metadata['greyscale']`` will be ``False``. """ width, height, pixels, meta = self.asDirect() if meta["alpha"]: raise Error("will not convert image with alpha channel to RGB") if not meta["greyscale"]: return width, height, pixels, meta meta["greyscale"] = False typecode = "BH"[meta["bitdepth"] > 8] def iterrgb(): for row in pixels: a = array(typecode, [0]) * 3 * width for i in range(3): a[i::3] = row yield a return width, height, iterrgb(), meta def asRGBA(self): """Return image as RGBA pixels. Greyscales are expanded into RGB triplets; an alpha channel is synthesized if necessary. The return values are as for the :meth:`read` method except that the *metadata* reflect the returned pixels, not the source image. In particular, for this method ``metadata['greyscale']`` will be ``False``, and ``metadata['alpha']`` will be ``True``. """ width, height, pixels, meta = self.asDirect() if meta["alpha"] and not meta["greyscale"]: return width, height, pixels, meta typecode = "BH"[meta["bitdepth"] > 8] maxval = 2 ** meta["bitdepth"] - 1 def newarray(): return array(typecode, [0]) * 4 * width if meta["alpha"] and meta["greyscale"]: # LA to RGBA def convert(): for row in pixels: # Create a fresh target row, then copy L channel # into first three target channels, and A channel # into fourth channel. a = newarray() for i in range(3): a[i::4] = row[0::2] a[3::4] = row[1::2] yield a elif meta["greyscale"]: # L to RGBA def convert(): for row in pixels: a = newarray() for i in range(3): a[i::4] = row a[3::4] = array(typecode, [maxval]) * width yield a else: assert not meta["alpha"] and not meta["greyscale"] # RGB to RGBA def convert(): for row in pixels: a = newarray() for i in range(3): a[i::4] = row[i::3] a[3::4] = array(typecode, [maxval]) * width yield a meta["alpha"] = True meta["greyscale"] = False return width, height, convert(), meta # === Internal Test Support === # This section comprises the tests that are internally validated (as # opposed to tests which produce output files that are externally # validated). Primarily they are unittests. # Note that it is difficult to internally validate the results of # writing a PNG file. The only thing we can do is read it back in # again, which merely checks consistency, not that the PNG file we # produce is valid. # Run the tests from the command line: # python -c 'import png;png.test()' # (For an in-memory binary file IO object) We use BytesIO where # available, otherwise we use StringIO, but name it BytesIO. try: from io import BytesIO except: from StringIO import StringIO as BytesIO import tempfile import unittest def test(): unittest.main(__name__) def topngbytes(name, rows, x, y, **k): """Convenience function for creating a PNG file "in memory" as a string. Creates a :class:`Writer` instance using the keyword arguments, then passes `rows` to its :meth:`Writer.write` method. The resulting PNG file is returned as a string. `name` is used to identify the file for debugging. """ import os print(name) f = BytesIO() w = Writer(x, y, **k) w.write(f, rows) if os.environ.get("PYPNG_TEST_TMP"): w = open(name, "wb") w.write(f.getvalue()) w.close() return f.getvalue() def testWithIO(inp, out, f): """Calls the function `f` with ``sys.stdin`` changed to `inp` and ``sys.stdout`` changed to `out`. They are restored when `f` returns. This function returns whatever `f` returns. """ import os try: oldin, sys.stdin = sys.stdin, inp oldout, sys.stdout = sys.stdout, out x = f() finally: sys.stdin = oldin sys.stdout = oldout if os.environ.get("PYPNG_TEST_TMP") and hasattr(out, "getvalue"): name = mycallersname() if name: w = open(name + ".png", "wb") w.write(out.getvalue()) w.close() return x def mycallersname(): """Returns the name of the caller of the caller of this function (hence the name of the caller of the function in which "mycallersname()" textually appears). Returns None if this cannot be determined.""" # http://docs.python.org/library/inspect.html#the-interpreter-stack import inspect frame = inspect.currentframe() if not frame: return None frame_, filename_, lineno_, funname, linelist_, listi_ = inspect.getouterframes( frame )[2] return funname def seqtobytes(s): """Convert a sequence of integers to a *bytes* instance. Good for plastering over Python 2 / Python 3 cracks. """ return strtobytes("".join(chr(x) for x in s)) class Test(unittest.TestCase): # This member is used by the superclass. If we don't define a new # class here then when we use self.assertRaises() and the PyPNG code # raises an assertion then we get no proper traceback. I can't work # out why, but defining a new class here means we get a proper # traceback. class failureException(Exception): pass def helperLN(self, n): mask = (1 << n) - 1 # Use small chunk_limit so that multiple chunk writing is # tested. Making it a test for Issue 20. w = Writer(15, 17, greyscale=True, bitdepth=n, chunk_limit=99) f = BytesIO() w.write_array(f, array("B", map(mask.__and__, range(1, 256)))) r = Reader(bytes=f.getvalue()) x, y, pixels, meta = r.read() self.assertEqual(x, 15) self.assertEqual(y, 17) self.assertEqual( list(itertools.chain(*pixels)), map(mask.__and__, range(1, 256)) ) def testL8(self): return self.helperLN(8) def testL4(self): return self.helperLN(4) def testL2(self): "Also tests asRGB8." w = Writer(1, 4, greyscale=True, bitdepth=2) f = BytesIO() w.write_array(f, array("B", range(4))) r = Reader(bytes=f.getvalue()) x, y, pixels, meta = r.asRGB8() self.assertEqual(x, 1) self.assertEqual(y, 4) for i, row in enumerate(pixels): self.assertEqual(len(row), 3) self.assertEqual(list(row), [0x55 * i] * 3) def testP2(self): "2-bit palette." a = (255, 255, 255) b = (200, 120, 120) c = (50, 99, 50) w = Writer(1, 4, bitdepth=2, palette=[a, b, c]) f = BytesIO() w.write_array(f, array("B", (0, 1, 1, 2))) r = Reader(bytes=f.getvalue()) x, y, pixels, meta = r.asRGB8() self.assertEqual(x, 1) self.assertEqual(y, 4) self.assertEqual(list(pixels), map(list, [a, b, b, c])) def testPtrns(self): "Test colour type 3 and tRNS chunk (and 4-bit palette)." a = (50, 99, 50, 50) b = (200, 120, 120, 80) c = (255, 255, 255) d = (200, 120, 120) e = (50, 99, 50) w = Writer(3, 3, bitdepth=4, palette=[a, b, c, d, e]) f = BytesIO() w.write_array(f, array("B", (4, 3, 2, 3, 2, 0, 2, 0, 1))) r = Reader(bytes=f.getvalue()) x, y, pixels, meta = r.asRGBA8() self.assertEqual(x, 3) self.assertEqual(y, 3) c = c + (255,) d = d + (255,) e = e + (255,) boxed = [(e, d, c), (d, c, a), (c, a, b)] flat = (itertools.chain(*row) for row in boxed) self.assertEqual(map(list, pixels), map(list, flat)) def testRGBtoRGBA(self): "asRGBA8() on colour type 2 source." "" # Test for Issue 26 r = Reader(bytes=_pngsuite["basn2c08"]) x, y, pixels, meta = r.asRGBA8() # Test the pixels at row 9 columns 0 and 1. row9 = list(pixels)[9] self.assertEqual(row9[0:8], [0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDE, 0xFF, 0xFF]) def testLtoRGBA(self): "asRGBA() on grey source." "" # Test for Issue 60 r = Reader(bytes=_pngsuite["basi0g08"]) x, y, pixels, meta = r.asRGBA() row9 = list(list(pixels)[9]) self.assertEqual(row9[0:8], [222, 222, 222, 255, 221, 221, 221, 255]) def testCtrns(self): "Test colour type 2 and tRNS chunk." # Test for Issue 25 r = Reader(bytes=_pngsuite["tbrn2c08"]) x, y, pixels, meta = r.asRGBA8() # I just happen to know that the first pixel is transparent. # In particular it should be #7f7f7f00 row0 = list(pixels)[0] self.assertEqual(tuple(row0[0:4]), (0x7F, 0x7F, 0x7F, 0x00)) def testAdam7read(self): """Adam7 interlace reading. Specifically, test that for images in the PngSuite that have both an interlaced and straightlaced pair that both images from the pair produce the same array of pixels.""" for candidate in _pngsuite: if not candidate.startswith("basn"): continue candi = candidate.replace("n", "i") if candi not in _pngsuite: continue print(f"adam7 read {candidate}") straight = Reader(bytes=_pngsuite[candidate]) adam7 = Reader(bytes=_pngsuite[candi]) # Just compare the pixels. Ignore x,y (because they're # likely to be correct?); metadata is ignored because the # "interlace" member differs. Lame. straight = straight.read()[2] adam7 = adam7.read()[2] self.assertEqual(map(list, straight), map(list, adam7)) def testAdam7write(self): """Adam7 interlace writing. For each test image in the PngSuite, write an interlaced and a straightlaced version. Decode both, and compare results. """ # Not such a great test, because the only way we can check what # we have written is to read it back again. for name, bytes in _pngsuite.items(): # Only certain colour types supported for this test. if name[3:5] not in ["n0", "n2", "n4", "n6"]: continue it = Reader(bytes=bytes) x, y, pixels, meta = it.read() pngi = topngbytes( f"adam7wn{name}.png", pixels, x=x, y=y, bitdepth=it.bitdepth, greyscale=it.greyscale, alpha=it.alpha, transparent=it.transparent, interlace=False, ) x, y, ps, meta = Reader(bytes=pngi).read() it = Reader(bytes=bytes) x, y, pixels, meta = it.read() pngs = topngbytes( f"adam7wi{name}.png", pixels, x=x, y=y, bitdepth=it.bitdepth, greyscale=it.greyscale, alpha=it.alpha, transparent=it.transparent, interlace=True, ) x, y, pi, meta = Reader(bytes=pngs).read() self.assertEqual(map(list, ps), map(list, pi)) def testPGMin(self): """Test that the command line tool can read PGM files.""" def do(): return _main(["testPGMin"]) s = BytesIO() s.write(strtobytes("P5 2 2 3\n")) s.write(strtobytes("\x00\x01\x02\x03")) s.flush() s.seek(0) o = BytesIO() testWithIO(s, o, do) r = Reader(bytes=o.getvalue()) x, y, pixels, meta = r.read() self.assertTrue(r.greyscale) self.assertEqual(r.bitdepth, 2) def testPAMin(self): """Test that the command line tool can read PAM file.""" def do(): return _main(["testPAMin"]) s = BytesIO() s.write( strtobytes( "P7\nWIDTH 3\nHEIGHT 1\nDEPTH 4\nMAXVAL 255\n" "TUPLTYPE RGB_ALPHA\nENDHDR\n" ) ) # The pixels in flat row flat pixel format flat = [255, 0, 0, 255, 0, 255, 0, 120, 0, 0, 255, 30] asbytes = seqtobytes(flat) s.write(asbytes) s.flush() s.seek(0) o = BytesIO() testWithIO(s, o, do) r = Reader(bytes=o.getvalue()) x, y, pixels, meta = r.read() self.assertTrue(r.alpha) self.assertTrue(not r.greyscale) self.assertEqual(list(itertools.chain(*pixels)), flat) def testLA4(self): """Create an LA image with bitdepth 4.""" bytes = topngbytes( "la4.png", [[5, 12]], 1, 1, greyscale=True, alpha=True, bitdepth=4 ) sbit = Reader(bytes=bytes).chunk("sBIT")[1] self.assertEqual(sbit, strtobytes("\x04\x04")) def testPNMsbit(self): """Test that PNM files can generates sBIT chunk.""" def do(): return _main(["testPNMsbit"]) s = BytesIO() s.write(strtobytes("P6 8 1 1\n")) for pixel in range(8): s.write(struct.pack(" 255: a = array("H") else: a = array("B") fw = float(width) fh = float(height) pfun = test_patterns[pattern] for y in range(height): fy = float(y) / fh for x in range(width): a.append(int(round(pfun(float(x) / fw, fy) * maxval))) return a def test_rgba(size=256, bitdepth=8, red="GTB", green="GLR", blue="RTL", alpha=None): """ Create a test image. Each channel is generated from the specified pattern; any channel apart from red can be set to None, which will cause it not to be in the image. It is possible to create all PNG channel types (L, RGB, LA, RGBA), as well as non PNG channel types (RGA, and so on). """ i = test_pattern(size, size, bitdepth, red) psize = 1 for channel in (green, blue, alpha): if channel: c = test_pattern(size, size, bitdepth, channel) i = interleave_planes(i, c, psize, 1) psize += 1 return i def pngsuite_image(name): """ Create a test image by reading an internal copy of the files from the PngSuite. Returned in flat row flat pixel format. """ if name not in _pngsuite: raise NotImplementedError( f"cannot find PngSuite file {name} (use -L for a list)" ) r = Reader(bytes=_pngsuite[name]) w, h, pixels, meta = r.asDirect() assert w == h # LAn for n < 8 is a special case for which we need to rescale # the data. if meta["greyscale"] and meta["alpha"] and meta["bitdepth"] < 8: factor = 255 // (2 ** meta["bitdepth"] - 1) def rescale(data): for row in data: yield map(factor.__mul__, row) pixels = rescale(pixels) meta["bitdepth"] = 8 arraycode = "BH"[meta["bitdepth"] > 8] return w, array(arraycode, itertools.chain(*pixels)), meta # The body of test_suite() size = 256 if options.test_size: size = options.test_size options.bitdepth = options.test_depth options.greyscale = bool(options.test_black) kwargs = {} if options.test_red: kwargs["red"] = options.test_red if options.test_green: kwargs["green"] = options.test_green if options.test_blue: kwargs["blue"] = options.test_blue if options.test_alpha: kwargs["alpha"] = options.test_alpha if options.greyscale: if options.test_red or options.test_green or options.test_blue: raise ValueError( "cannot specify colours (R, G, B) when greyscale image (black channel, K) is specified" ) kwargs["red"] = options.test_black kwargs["green"] = None kwargs["blue"] = None options.alpha = bool(options.test_alpha) if not args: pixels = test_rgba(size, options.bitdepth, **kwargs) else: size, pixels, meta = pngsuite_image(args[0]) for k in ["bitdepth", "alpha", "greyscale"]: setattr(options, k, meta[k]) writer = Writer( size, size, bitdepth=options.bitdepth, transparent=options.transparent, background=options.background, gamma=options.gamma, greyscale=options.greyscale, alpha=options.alpha, compression=options.compression, interlace=options.interlace, ) writer.write_array(sys.stdout, pixels) def read_pam_header(infile): """ Read (the rest of a) PAM header. `infile` should be positioned immediately after the initial 'P7' line (at the beginning of the second line). Returns are as for `read_pnm_header`. """ # Unlike PBM, PGM, and PPM, we can read the header a line at a time. header = {} while True: l = infile.readline().strip() if l == strtobytes("ENDHDR"): break if not l: raise EOFError("PAM ended prematurely") if l[0] == strtobytes("#"): continue l = l.split(None, 1) if l[0] not in header: header[l[0]] = l[1] else: header[l[0]] += strtobytes(" ") + l[1] required = ["WIDTH", "HEIGHT", "DEPTH", "MAXVAL"] required = [strtobytes(x) for x in required] WIDTH, HEIGHT, DEPTH, MAXVAL = required present = [x for x in required if x in header] if len(present) != len(required): raise Error("PAM file must specify WIDTH, HEIGHT, DEPTH, and MAXVAL") width = int(header[WIDTH]) height = int(header[HEIGHT]) depth = int(header[DEPTH]) maxval = int(header[MAXVAL]) if width <= 0 or height <= 0 or depth <= 0 or maxval <= 0: raise Error("WIDTH, HEIGHT, DEPTH, MAXVAL must all be positive integers") return "P7", width, height, depth, maxval def read_pnm_header(infile, supported=("P5", "P6")): """ Read a PNM header, returning (format,width,height,depth,maxval). `width` and `height` are in pixels. `depth` is the number of channels in the image; for PBM and PGM it is synthesized as 1, for PPM as 3; for PAM images it is read from the header. `maxval` is synthesized (as 1) for PBM images. """ # Generally, see http://netpbm.sourceforge.net/doc/ppm.html # and http://netpbm.sourceforge.net/doc/pam.html supported = [strtobytes(x) for x in supported] # Technically 'P7' must be followed by a newline, so by using # rstrip() we are being liberal in what we accept. I think this # is acceptable. type = infile.read(3).rstrip() if type not in supported: raise NotImplementedError(f"file format {type} not supported") if type == strtobytes("P7"): # PAM header parsing is completely different. return read_pam_header(infile) # Expected number of tokens in header (3 for P4, 4 for P6) expected = 4 pbm = ("P1", "P4") if type in pbm: expected = 3 header = [type] # We have to read the rest of the header byte by byte because the # final whitespace character (immediately following the MAXVAL in # the case of P6) may not be a newline. Of course all PNM files in # the wild use a newline at this point, so it's tempting to use # readline; but it would be wrong. def getc(): c = infile.read(1) if not c: raise Error("premature EOF reading PNM header") return c c = getc() while True: # Skip whitespace that precedes a token. while c.isspace(): c = getc() # Skip comments. while c == "#": while c not in "\n\r": c = getc() if not c.isdigit(): raise Error(f"unexpected character {c} found in header") # According to the specification it is legal to have comments # that appear in the middle of a token. # This is bonkers; I've never seen it; and it's a bit awkward to # code good lexers in Python (no goto). So we break on such # cases. token = strtobytes("") while c.isdigit(): token += c c = getc() # Slight hack. All "tokens" are decimal integers, so convert # them here. header.append(int(token)) if len(header) == expected: break # Skip comments (again) while c == "#": while c not in "\n\r": c = getc() if not c.isspace(): raise Error(f"expected header to end with whitespace, not {c}") if type in pbm: # synthesize a MAXVAL header.append(1) depth = (1, 3)[type == strtobytes("P6")] return header[0], header[1], header[2], depth, header[3] def write_pnm(file, width, height, pixels, meta): """Write a Netpbm PNM/PAM file.""" bitdepth = meta["bitdepth"] maxval = 2**bitdepth - 1 # Rudely, the number of image planes can be used to determine # whether we are L (PGM), LA (PAM), RGB (PPM), or RGBA (PAM). planes = meta["planes"] # Can be an assert as long as we assume that pixels and meta came # from a PNG file. assert planes in (1, 2, 3, 4) if planes in (1, 3): if 1 == planes: # PGM # Could generate PBM if maxval is 1, but we don't (for one # thing, we'd have to convert the data, not just blat it # out). fmt = "P5" else: # PPM fmt = "P6" file.write("%s %d %d %d\n" % (fmt, width, height, maxval)) if planes in (2, 4): # PAM # See http://netpbm.sourceforge.net/doc/pam.html if 2 == planes: tupltype = "GRAYSCALE_ALPHA" else: tupltype = "RGB_ALPHA" file.write( "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\n" "TUPLTYPE %s\nENDHDR\n" % (width, height, planes, maxval, tupltype) ) # Values per row vpr = planes * width # struct format fmt = ">%d" % vpr if maxval > 0xFF: fmt = fmt + "H" else: fmt = fmt + "B" for row in pixels: file.write(struct.pack(fmt, *row)) file.flush() def color_triple(color): """ Convert a command line colour value to a RGB triple of integers. FIXME: Somewhere we need support for greyscale backgrounds etc. """ if color.startswith("#") and len(color) == 4: return (int(color[1], 16), int(color[2], 16), int(color[3], 16)) if color.startswith("#") and len(color) == 7: return (int(color[1:3], 16), int(color[3:5], 16), int(color[5:7], 16)) elif color.startswith("#") and len(color) == 13: return (int(color[1:5], 16), int(color[5:9], 16), int(color[9:13], 16)) def _main(argv): """ Run the PNG encoder with options from the command line. """ # Parse command line arguments from optparse import OptionParser import re version = "%prog " + re.sub(r"( ?\$|URL: |Rev:)", "", __version__) parser = OptionParser(version=version) parser.set_usage("%prog [options] [imagefile]") parser.add_option( "-r", "--read-png", default=False, action="store_true", help="Read PNG, write PNM", ) parser.add_option( "-i", "--interlace", default=False, action="store_true", help="create an interlaced PNG file (Adam7)", ) parser.add_option( "-t", "--transparent", action="store", type="string", metavar="color", help="mark the specified colour (#RRGGBB) as transparent", ) parser.add_option( "-b", "--background", action="store", type="string", metavar="color", help="save the specified background colour", ) parser.add_option( "-a", "--alpha", action="store", type="string", metavar="pgmfile", help="alpha channel transparency (RGBA)", ) parser.add_option( "-g", "--gamma", action="store", type="float", metavar="value", help="save the specified gamma value", ) parser.add_option( "-c", "--compression", action="store", type="int", metavar="level", help="zlib compression level (0-9)", ) parser.add_option( "-T", "--test", default=False, action="store_true", help="create a test image (a named PngSuite image if an argument is supplied)", ) parser.add_option( "-L", "--list", default=False, action="store_true", help="print list of named test images", ) parser.add_option( "-R", "--test-red", action="store", type="string", metavar="pattern", help="test pattern for the red image layer", ) parser.add_option( "-G", "--test-green", action="store", type="string", metavar="pattern", help="test pattern for the green image layer", ) parser.add_option( "-B", "--test-blue", action="store", type="string", metavar="pattern", help="test pattern for the blue image layer", ) parser.add_option( "-A", "--test-alpha", action="store", type="string", metavar="pattern", help="test pattern for the alpha image layer", ) parser.add_option( "-K", "--test-black", action="store", type="string", metavar="pattern", help="test pattern for greyscale image", ) parser.add_option( "-d", "--test-depth", default=8, action="store", type="int", metavar="NBITS", help="create test PNGs that are NBITS bits per channel", ) parser.add_option( "-S", "--test-size", action="store", type="int", metavar="size", help="width and height of the test image", ) (options, args) = parser.parse_args(args=argv[1:]) # Convert options if options.transparent is not None: options.transparent = color_triple(options.transparent) if options.background is not None: options.background = color_triple(options.background) if options.list: names = list(_pngsuite) names.sort() for name in names: print(name) return # Run regression tests if options.test: return test_suite(options, args) # Prepare input and output files if len(args) == 0: infilename = "-" infile = sys.stdin elif len(args) == 1: infilename = args[0] infile = open(infilename, "rb") else: parser.error("more than one input file") outfile = sys.stdout if options.read_png: # Encode PNG to PPM png = Reader(file=infile) width, height, pixels, meta = png.asDirect() write_pnm(outfile, width, height, pixels, meta) else: # Encode PNM to PNG format, width, height, depth, maxval = read_pnm_header( infile, ("P5", "P6", "P7") ) # When it comes to the variety of input formats, we do something # rather rude. Observe that L, LA, RGB, RGBA are the 4 colour # types supported by PNG and that they correspond to 1, 2, 3, 4 # channels respectively. So we use the number of channels in # the source image to determine which one we have. We do not # care about TUPLTYPE. greyscale = depth <= 2 pamalpha = depth in (2, 4) supported = (2**x - 1 for x in range(1, 17)) try: mi = supported.index(maxval) except ValueError: raise NotImplementedError( f"your maxval ({maxval}) not in supported list {str(supported)}" ) bitdepth = mi + 1 writer = Writer( width, height, greyscale=greyscale, bitdepth=bitdepth, interlace=options.interlace, transparent=options.transparent, background=options.background, alpha=bool(pamalpha or options.alpha), gamma=options.gamma, compression=options.compression, ) if options.alpha: pgmfile = open(options.alpha, "rb") format, awidth, aheight, adepth, amaxval = read_pnm_header(pgmfile, "P5") if amaxval != "255": raise NotImplementedError( f"maxval {amaxval} not supported for alpha channel" ) if (awidth, aheight) != (width, height): raise ValueError( "alpha channel image size mismatch" " (%s has %sx%s but %s has %sx%s)" % (infilename, width, height, options.alpha, awidth, aheight) ) writer.convert_ppm_and_pgm(infile, pgmfile, outfile) else: writer.convert_pnm(infile, outfile) if __name__ == "__main__": try: _main(sys.argv) except Error as e: sys.stderr.write(f"{e}\n") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/test_utils/run_tests.py0000644000175100001770000002740714676242340020207 0ustar00runnerdockerimport sys if __name__ == "__main__": raise RuntimeError("This module is for import only") test_pkg_name = ".".join(__name__.split(".")[0:-2]) is_pygame_pkg = test_pkg_name == "pygame.tests" test_runner_mod = test_pkg_name + ".test_utils.test_runner" if is_pygame_pkg: from pygame.tests.test_utils import import_submodule from pygame.tests.test_utils.test_runner import ( prepare_test_env, run_test, combine_results, get_test_results, TEST_RESULTS_START, ) else: from test.test_utils import import_submodule from test.test_utils.test_runner import ( prepare_test_env, run_test, combine_results, get_test_results, TEST_RESULTS_START, ) import pygame import pygame.threads import os import re import shutil import tempfile import time import random from pprint import pformat was_run = False def run(*args, **kwds): """Run the Pygame unit test suite and return (total tests run, fails dict) Positional arguments (optional): The names of tests to include. If omitted then all tests are run. Test names need not include the trailing '_test'. Keyword arguments: incomplete - fail incomplete tests (default False) usesubprocess - run all test suites in the current process (default False, use separate subprocesses) dump - dump failures/errors as dict ready to eval (default False) file - if provided, the name of a file into which to dump failures/errors timings - if provided, the number of times to run each individual test to get an average run time (default is run each test once) exclude - A list of TAG names to exclude from the run. The items may be comma or space separated. show_output - show silenced stderr/stdout on errors (default False) all - dump all results, not just errors (default False) randomize - randomize order of tests (default False) seed - if provided, a seed randomizer integer multi_thread - if provided, the number of THREADS in which to run subprocessed tests time_out - if subprocess is True then the time limit in seconds before killing a test (default 30) fake - if provided, the name of the fake tests package in the run_tests__tests subpackage to run instead of the normal Pygame tests python - the path to a python executable to run subprocessed tests (default sys.executable) interactive - allow tests tagged 'interactive'. Return value: A tuple of total number of tests run, dictionary of error information. The dictionary is empty if no errors were recorded. By default individual test modules are run in separate subprocesses. This recreates normal Pygame usage where pygame.init() and pygame.quit() are called only once per program execution, and avoids unfortunate interactions between test modules. Also, a time limit is placed on test execution, so frozen tests are killed when there time allotment expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode. Tests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used. Individual test modules may have a corresponding *_tags.py module, defining a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only the 'interactive', 'ignore', and 'subprocess_ignore' tags are ignored. 'interactive' is for modules that take user input, like cdrom_test.py. 'ignore' and 'subprocess_ignore' for for disabling modules for foreground and subprocess modes respectively. These are for disabling tests on optional modules or for experimental modules with known problems. These modules can be run from the console as a Python program. This function can only be called once per Python session. It is not reentrant. """ global was_run if was_run: raise RuntimeError("run() was already called this session") was_run = True options = kwds.copy() option_usesubprocess = options.get("usesubprocess", False) option_dump = options.pop("dump", False) option_file = options.pop("file", None) option_randomize = options.get("randomize", False) option_seed = options.get("seed", None) option_multi_thread = options.pop("multi_thread", 1) option_time_out = options.pop("time_out", 120) option_fake = options.pop("fake", None) option_python = options.pop("python", sys.executable) option_exclude = options.pop("exclude", ()) option_interactive = options.pop("interactive", False) if not option_interactive and "interactive" not in option_exclude: option_exclude += ("interactive",) if option_usesubprocess and "subprocess_ignore" not in option_exclude: option_exclude += ("subprocess_ignore",) elif "ignore" not in option_exclude: option_exclude += ("ignore",) option_exclude += ("python3_ignore",) option_exclude += ("SDL2_ignore",) main_dir, test_subdir, fake_test_subdir = prepare_test_env() ########################################################################### # Compile a list of test modules. If fake, then compile list of fake # xxxx_test.py from run_tests__tests TEST_MODULE_RE = re.compile(r"^(.+_test)\.py$") test_mods_pkg_name = test_pkg_name working_dir_temp = tempfile.mkdtemp() if option_fake is not None: test_mods_pkg_name = ".".join( [test_mods_pkg_name, "run_tests__tests", option_fake] ) test_subdir = os.path.join(fake_test_subdir, option_fake) working_dir = test_subdir else: working_dir = working_dir_temp # Added in because some machines will need os.environ else there will be # false failures in subprocess mode. Same issue as python2.6. Needs some # env vars. test_env = os.environ fmt1 = "%s.%%s" % test_mods_pkg_name fmt2 = "%s.%%s_test" % test_mods_pkg_name if args: test_modules = [m.endswith("_test") and (fmt1 % m) or (fmt2 % m) for m in args] else: test_modules = [] for f in sorted(os.listdir(test_subdir)): for match in TEST_MODULE_RE.findall(f): test_modules.append(fmt1 % (match,)) ########################################################################### # Remove modules to be excluded. tmp = test_modules test_modules = [] for name in tmp: tag_module_name = f"{name[0:-5]}_tags" try: tag_module = import_submodule(tag_module_name) except ImportError: test_modules.append(name) else: try: tags = tag_module.__tags__ except AttributeError: print(f"{tag_module_name} has no tags: ignoring") test_modules.append(name) else: for tag in tags: if tag in option_exclude: print(f"skipping {name} (tag '{tag}')") break else: test_modules.append(name) del tmp, tag_module_name, name ########################################################################### # Meta results results = {} meta_results = {"__meta__": {}} meta = meta_results["__meta__"] ########################################################################### # Randomization if option_randomize or option_seed is not None: if option_seed is None: option_seed = time.time() meta["random_seed"] = option_seed print(f"\nRANDOM SEED USED: {option_seed}\n") random.seed(option_seed) random.shuffle(test_modules) ########################################################################### # Single process mode if not option_usesubprocess: options["exclude"] = option_exclude t = time.time() for module in test_modules: results.update(run_test(module, **options)) t = time.time() - t ########################################################################### # Subprocess mode # else: if is_pygame_pkg: from pygame.tests.test_utils.async_sub import proc_in_time_or_kill else: from test.test_utils.async_sub import proc_in_time_or_kill pass_on_args = ["--exclude", ",".join(option_exclude)] + [ "--" + field for field in ("randomize", "incomplete", "unbuffered", "verbosity") if kwds.get(field) ] def sub_test(module): print(f"loading {module}") cmd = [option_python, "-m", test_runner_mod, module] + pass_on_args return ( module, (cmd, test_env, working_dir), proc_in_time_or_kill( cmd, option_time_out, env=test_env, wd=working_dir ), ) if option_multi_thread > 1: def tmap(f, args): return pygame.threads.tmap( f, args, stop_on_error=False, num_workers=option_multi_thread ) else: tmap = map t = time.time() for module, cmd, (return_code, raw_return) in tmap(sub_test, test_modules): test_file = f"{os.path.join(test_subdir, module)}.py" cmd, test_env, working_dir = cmd test_results = get_test_results(raw_return) if test_results: results.update(test_results) else: results[module] = {} results[module].update( { "return_code": return_code, "raw_return": raw_return, "cmd": cmd, "test_file": test_file, "test_env": test_env, "working_dir": working_dir, "module": module, } ) t = time.time() - t ########################################################################### # Output Results # untrusty_total, combined = combine_results(results, t) total, n_errors, n_failures = count_results(results) meta["total_tests"] = total meta["combined"] = combined meta["total_errors"] = n_errors meta["total_failures"] = n_failures results.update(meta_results) if not option_usesubprocess and total != untrusty_total: raise AssertionError( "Something went wrong in the Test Machinery:\n" "total: %d != untrusty_total: %d" % (total, untrusty_total) ) if not option_dump: print(combined) else: print(TEST_RESULTS_START) print(pformat(results)) if option_file is not None: results_file = open(option_file, "w") try: results_file.write(pformat(results)) finally: results_file.close() shutil.rmtree(working_dir_temp) return total, n_errors + n_failures def count_results(results): total = errors = failures = 0 for result in results.values(): if result.get("return_code", 0): total += 1 errors += 1 else: total += result["num_tests"] errors += result["num_errors"] failures += result["num_failures"] return total, errors, failures def run_and_exit(*args, **kwargs): """Run the tests, and if there are failures, exit with a return code of 1. This is needed for various buildbots to recognise that the tests have failed. """ total, fails = run(*args, **kwargs) if fails: sys.exit(1) sys.exit(0) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/test_utils/test_machinery.py0000644000175100001770000000457514676242340021200 0ustar00runnerdockerimport inspect import random import re import unittest try: from StringIO import StringIO except ImportError: from io import StringIO from . import import_submodule class PygameTestLoader(unittest.TestLoader): def __init__( self, randomize_tests=False, include_incomplete=False, exclude=("interactive",) ): super().__init__() self.randomize_tests = randomize_tests if exclude is None: self.exclude = set() else: self.exclude = set(exclude) if include_incomplete: self.testMethodPrefix = ("test", "todo_") def getTestCaseNames(self, testCaseClass): res = [] for name in super().getTestCaseNames(testCaseClass): tags = get_tags(testCaseClass, getattr(testCaseClass, name)) if self.exclude.isdisjoint(tags): res.append(name) if self.randomize_tests: random.shuffle(res) return res # Exclude by tags: TAGS_RE = re.compile(r"\|[tT]ags:(-?[ a-zA-Z,0-9_\n]+)\|", re.M) class TestTags: def __init__(self): self.memoized = {} self.parent_modules = {} def get_parent_module(self, class_): if class_ not in self.parent_modules: self.parent_modules[class_] = import_submodule(class_.__module__) return self.parent_modules[class_] def __call__(self, parent_class, meth): key = (parent_class, meth.__name__) if key not in self.memoized: parent_module = self.get_parent_module(parent_class) module_tags = getattr(parent_module, "__tags__", []) class_tags = getattr(parent_class, "__tags__", []) tags = TAGS_RE.search(inspect.getdoc(meth) or "") if tags: test_tags = [t.strip() for t in tags.group(1).split(",")] else: test_tags = [] combined = set() for tags in (module_tags, class_tags, test_tags): if not tags: continue add = {t for t in tags if not t.startswith("-")} remove = {t[1:] for t in tags if t not in add} if add: combined.update(add) if remove: combined.difference_update(remove) self.memoized[key] = combined return self.memoized[key] get_tags = TestTags() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/test_utils/test_runner.py0000644000175100001770000002216014676242340020520 0ustar00runnerdockerimport sys import os if __name__ == "__main__": pkg_dir = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = pkg_name == "tests" and os.path.split(parent_dir)[1] == "pygame" if not is_pygame_pkg: sys.path.insert(0, parent_dir) else: is_pygame_pkg = __name__.startswith("pygame.tests.") import io import optparse import re import unittest from pprint import pformat from .test_machinery import PygameTestLoader def prepare_test_env(): test_subdir = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] main_dir = os.path.split(test_subdir)[0] sys.path.insert(0, test_subdir) fake_test_subdir = os.path.join(test_subdir, "run_tests__tests") return main_dir, test_subdir, fake_test_subdir main_dir, test_subdir, fake_test_subdir = prepare_test_env() ################################################################################ # Set the command line options # # options are shared with run_tests.py so make sure not to conflict # in time more will be added here TAG_PAT = r"-?[a-zA-Z0-9_]+" TAG_RE = re.compile(TAG_PAT) EXCLUDE_RE = re.compile(rf"({TAG_PAT},?\s*)+$") def exclude_callback(option, opt, value, parser): if EXCLUDE_RE.match(value) is None: raise optparse.OptionValueError(f"{opt} argument has invalid value") parser.values.exclude = TAG_RE.findall(value) opt_parser = optparse.OptionParser() opt_parser.add_option( "-i", "--incomplete", action="store_true", help="fail incomplete tests" ) opt_parser.add_option( "-s", "--usesubprocess", action="store_true", help="run everything in a single process " " (default: use no subprocesses)", ) opt_parser.add_option( "-e", "--exclude", action="callback", type="string", help="exclude tests containing any of TAGS", callback=exclude_callback, ) opt_parser.add_option( "-u", "--unbuffered", action="store_true", help="Show stdout/stderr as tests run, rather than storing it and showing on failures", ) opt_parser.add_option( "-v", "--verbose", dest="verbosity", action="store_const", const=2, help="Verbose output", ) opt_parser.add_option( "-q", "--quiet", dest="verbosity", action="store_const", const=0, help="Quiet output", ) opt_parser.add_option( "-r", "--randomize", action="store_true", help="randomize order of tests" ) ################################################################################ # If an xxxx_test.py takes longer than TIME_OUT seconds it will be killed # This is only the default, can be over-ridden on command line TIME_OUT = 30 # DEFAULTS ################################################################################ # Human readable output # COMPLETE_FAILURE_TEMPLATE = """ ====================================================================== ERROR: all_tests_for (%(module)s.AllTestCases) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/%(module)s.py", line 1, in all_tests_for subprocess completely failed with return code of %(return_code)s cmd: %(cmd)s test_env: %(test_env)s working_dir: %(working_dir)s return (first 10 and last 10 lines): %(raw_return)s """ # Leave that last empty line else build page regex won't match # Text also needs to be vertically compressed RAN_TESTS_DIV = (70 * "-") + "\nRan" DOTS = re.compile("^([FE.sux]*)$", re.MULTILINE) def extract_tracebacks(output): """from test runner output return the tracebacks.""" verbose_mode = " ..." in output if verbose_mode: if "ERROR" in output or "FAILURE" in output: return "\n\n==".join(output.split("\n\n==")[1:]) else: dots = DOTS.search(output).group(1) if "E" in dots or "F" in dots: return output[len(dots) + 1 :].split(RAN_TESTS_DIV)[0] return "" def output_into_dots(output): """convert the test runner output into dots.""" # verbose_mode = ") ..." in output verbose_mode = " ..." in output if verbose_mode: # a map from the verbose output to the dots output. reasons = { "... ERROR": "E", "... unexpected success": "u", "... skipped": "s", "... expected failure": "x", "... ok": ".", "... FAIL": "F", } results = output.split("\n\n==")[0] lines = [l for l in results.split("\n") if l and "..." in l] dotlist = [] for l in lines: found = False for reason in reasons: if reason in l: dotlist.append(reasons[reason]) found = True break if not found: raise ValueError(f"Not sure what this is. Add to reasons. :{l}") return "".join(dotlist) dots = DOTS.search(output).group(1) return dots def combine_results(all_results, t): """ Return pieced together results in a form fit for human consumption. Don't rely on results if piecing together subprocessed results (single process mode is fine). Was originally meant for that purpose but was found to be unreliable. See the dump option for reliable results. """ all_dots = "" failures = [] for module, results in sorted(all_results.items()): output, return_code, raw_return = map( results.get, ("output", "return_code", "raw_return") ) if not output or (return_code and RAN_TESTS_DIV not in output): # would this effect the original dict? TODO output_lines = raw_return.splitlines() if len(output_lines) > 20: results["raw_return"] = "\n".join( output_lines[:10] + ["..."] + output_lines[-10:] ) failures.append(COMPLETE_FAILURE_TEMPLATE % results) all_dots += "E" continue dots = output_into_dots(output) all_dots += dots tracebacks = extract_tracebacks(output) if tracebacks: failures.append(tracebacks) total_fails, total_errors = map(all_dots.count, "FE") total_tests = len(all_dots) combined = [all_dots] if failures: combined += ["".join(failures).lstrip("\n")[:-1]] combined += [f"{RAN_TESTS_DIV} {total_tests} tests in {t:.3f}s\n"] if failures: infos = ([f"failures={total_fails}"] if total_fails else []) + ( [f"errors={total_errors}"] if total_errors else [] ) combined += [f"FAILED ({', '.join(infos)})\n"] else: combined += ["OK\n"] return total_tests, "\n".join(combined) ################################################################################ TEST_RESULTS_START = "<--!! TEST RESULTS START HERE !!-->" TEST_RESULTS_END = "<--!! TEST RESULTS END HERE !!-->" _test_re_str = f"{TEST_RESULTS_START}\n(.*){TEST_RESULTS_END}" TEST_RESULTS_RE = re.compile(_test_re_str, re.DOTALL | re.M) def get_test_results(raw_return): test_results = TEST_RESULTS_RE.search(raw_return) if test_results: try: return eval(test_results.group(1)) except: print(f"BUGGY TEST RESULTS EVAL:\n {test_results.group(1)}") raise ################################################################################ def run_test( module, incomplete=False, usesubprocess=True, randomize=False, exclude=("interactive",), buffer=True, unbuffered=None, verbosity=1, ): """Run a unit test module""" suite = unittest.TestSuite() if verbosity is None: verbosity = 1 if verbosity: print(f"loading {module}") loader = PygameTestLoader( randomize_tests=randomize, include_incomplete=incomplete, exclude=exclude ) suite.addTest(loader.loadTestsFromName(module)) output = io.StringIO() runner = unittest.TextTestRunner(stream=output, buffer=buffer, verbosity=verbosity) results = runner.run(suite) if verbosity == 2: output.seek(0) print(output.read()) output.seek(0) results = { module: { "output": output.getvalue(), "num_tests": results.testsRun, "num_errors": len(results.errors), "num_failures": len(results.failures), } } if usesubprocess: print(TEST_RESULTS_START) print(pformat(results)) print(TEST_RESULTS_END) else: return results ################################################################################ if __name__ == "__main__": options, args = opt_parser.parse_args() if not args: if is_pygame_pkg: run_from = "pygame.tests.go" else: run_from = os.path.join(main_dir, "run_tests.py") sys.exit(f"No test module provided; consider using {run_from} instead") run_test( args[0], incomplete=options.incomplete, usesubprocess=options.usesubprocess, randomize=options.randomize, exclude=options.exclude, buffer=(not options.unbuffered), ) ################################################################################ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612128.0311117 pygame-2.6.1/test/threads_test.py0000644000175100001770000001723114676242340016445 0ustar00runnerdockerimport unittest from pygame.threads import FuncResult, tmap, WorkerQueue, Empty, STOP from pygame import threads, Surface, transform import time class WorkerQueueTypeTest(unittest.TestCase): def test_usage_with_different_functions(self): def f(x): return x + 1 def f2(x): return x + 2 wq = WorkerQueue() fr = FuncResult(f) fr2 = FuncResult(f2) wq.do(fr, 1) wq.do(fr2, 1) wq.wait() wq.stop() self.assertEqual(fr.result, 2) self.assertEqual(fr2.result, 3) def test_do(self): """Tests function placement on queue and execution after blocking function completion.""" # __doc__ (as of 2008-06-28) for pygame.threads.WorkerQueue.do: # puts a function on a queue for running _later_. # TODO: This tests needs refactoring to avoid sleep. # sleep is slow and unreliable (especially on VMs). # def sleep_test(): # time.sleep(0.5) # def calc_test(x): # return x + 1 # worker_queue = WorkerQueue(num_workers=1) # sleep_return = FuncResult(sleep_test) # calc_return = FuncResult(calc_test) # init_time = time.time() # worker_queue.do(sleep_return) # worker_queue.do(calc_return, 1) # worker_queue.wait() # worker_queue.stop() # time_diff = time.time() - init_time # self.assertEqual(sleep_return.result, None) # self.assertEqual(calc_return.result, 2) # self.assertGreaterEqual(time_diff, 0.5) def test_stop(self): """Ensure stop() stops the worker queue""" wq = WorkerQueue() self.assertGreater(len(wq.pool), 0) for t in wq.pool: self.assertTrue(t.is_alive()) for i in range(200): wq.do(lambda x: x + 1, i) wq.stop() for t in wq.pool: self.assertFalse(t.is_alive()) self.assertIs(wq.queue.get(), STOP) def test_threadloop(self): # __doc__ (as of 2008-06-28) for pygame.threads.WorkerQueue.threadloop: # Loops until all of the tasks are finished. # Make a worker queue with only one thread wq = WorkerQueue(1) # Ocuppy the one worker with the threadloop # wq threads are just threadloop, so this makes an embedded threadloop wq.do(wq.threadloop) # Make sure wq can still do work # If wq can still do work, threadloop works l = [] wq.do(l.append, 1) # Wait won't work because the primary thread is in an infinite loop time.sleep(0.5) self.assertEqual(l[0], 1) # Kill the embedded threadloop by sending stop onto the stack # Threadloop puts STOP back onto the queue when it STOPs so this kills both loops wq.stop() # Make sure wq has stopped self.assertFalse(wq.pool[0].is_alive()) def test_wait(self): # __doc__ (as of 2008-06-28) for pygame.threads.WorkerQueue.wait: # waits until all tasks are complete. wq = WorkerQueue() for i in range(2000): wq.do(lambda x: x + 1, i) wq.wait() self.assertRaises(Empty, wq.queue.get_nowait) wq.stop() class ThreadsModuleTest(unittest.TestCase): def test_benchmark_workers(self): """Ensure benchmark_workers performance measure functions properly with both default and specified inputs""" "tags:long_running" # __doc__ (as of 2008-06-28) for pygame.threads.benchmark_workers: # does a little test to see if workers are at all faster. # Returns the number of workers which works best. # Takes a little bit of time to run, so you should only really call # it once. # You can pass in benchmark data, and functions if you want. # a_bench_func - f(data) # the_data - data to work on. optimal_workers = threads.benchmark_workers() self.assertIsInstance(optimal_workers, int) self.assertTrue(0 <= optimal_workers < 64) # Test passing benchmark data and function explicitly def smooth_scale_bench(data): transform.smoothscale(data, (128, 128)) surf_data = [Surface((x, x), 0, 32) for x in range(12, 64, 12)] best_num_workers = threads.benchmark_workers(smooth_scale_bench, surf_data) self.assertIsInstance(best_num_workers, int) def test_init(self): """Ensure init() sets up the worker queue""" threads.init(8) self.assertIsInstance(threads._wq, WorkerQueue) threads.quit() def test_quit(self): """Ensure quit() cleans up the worker queue""" threads.init(8) threads.quit() self.assertIsNone(threads._wq) def test_tmap(self): # __doc__ (as of 2008-06-28) for pygame.threads.tmap: # like map, but uses a thread pool to execute. # num_workers - the number of worker threads that will be used. If pool # is passed in, then the num_workers arg is ignored. # worker_queue - you can optionally pass in an existing WorkerQueue. # wait - True means that the results are returned when everything is finished. # False means that we return the [worker_queue, results] right away instead. # results, is returned as a list of FuncResult instances. # stop_on_error - ## test that the outcomes of map and tmap are the same func, data = lambda x: x + 1, range(100) tmapped = list(tmap(func, data)) mapped = list(map(func, data)) self.assertEqual(tmapped, mapped) ## Test that setting tmap to not stop on errors produces the expected result data2 = range(100) always_excepts = lambda x: 1 / 0 tmapped2 = list(tmap(always_excepts, data2, stop_on_error=False)) # Use list comprehension to check all entries are None as all function # calls made by tmap will have thrown an exception (ZeroDivisionError) # Condense to single bool with `all`, which will return true if all # entries are true self.assertTrue(all(x is None for x in tmapped2)) def todo_test_tmap__None_func_and_multiple_sequences(self): """Using a None as func and multiple sequences""" self.fail() res = tmap(None, [1, 2, 3, 4]) res2 = tmap(None, [1, 2, 3, 4], [22, 33, 44, 55]) res3 = tmap(None, [1, 2, 3, 4], [22, 33, 44, 55, 66]) res4 = tmap(None, [1, 2, 3, 4, 5], [22, 33, 44, 55]) self.assertEqual([1, 2, 3, 4], res) self.assertEqual([(1, 22), (2, 33), (3, 44), (4, 55)], res2) self.assertEqual([(1, 22), (2, 33), (3, 44), (4, 55), (None, 66)], res3) self.assertEqual([(1, 22), (2, 33), (3, 44), (4, 55), (5, None)], res4) def test_tmap__wait(self): r = range(1000) wq, results = tmap(lambda x: x, r, num_workers=5, wait=False) wq.wait() r2 = (x.result for x in results) self.assertEqual(list(r), list(r2)) def test_FuncResult(self): """Ensure FuncResult sets its result and exception attributes""" # Results are stored in result attribute fr = FuncResult(lambda x: x + 1) fr(2) self.assertEqual(fr.result, 3) # Exceptions are store in exception attribute self.assertIsNone(fr.exception, "no exception should be raised") exception = ValueError("rast") def x(sdf): raise exception fr = FuncResult(x) fr(None) self.assertIs(fr.exception, exception) ################################################################################ if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.032112 pygame-2.6.1/test/time_test.py0000644000175100001770000003730114676242340015751 0ustar00runnerdockerimport os import platform import unittest import pygame import time Clock = pygame.time.Clock class ClockTypeTest(unittest.TestCase): __tags__ = ["timing"] def test_construction(self): """Ensure a Clock object can be created""" c = Clock() self.assertTrue(c, "Clock cannot be constructed") def test_get_fps(self): """test_get_fps tests pygame.time.get_fps()""" # Initialization check, first call should return 0 fps c = Clock() self.assertEqual(c.get_fps(), 0) # Type check get_fps should return float self.assertTrue(type(c.get_fps()) == float) # Allowable margin of error in percentage delta = 0.30 # Test fps correctness for 100, 60 and 30 fps self._fps_test(c, 100, delta) self._fps_test(c, 60, delta) self._fps_test(c, 30, delta) def _fps_test(self, clock, fps, delta): """ticks fps times each second, hence get_fps() should return fps""" delay_per_frame = 1.0 / fps for f in range(fps): # For one second tick and sleep clock.tick() time.sleep(delay_per_frame) # We should get around fps (+- fps*delta -- delta % of fps) self.assertAlmostEqual(clock.get_fps(), fps, delta=fps * delta) def test_get_rawtime(self): iterations = 10 delay = 0.1 delay_miliseconds = delay * (10**3) # actual time difference between ticks framerate_limit = 5 delta = 50 # allowable error in milliseconds # Testing Clock Initialization c = Clock() self.assertEqual(c.get_rawtime(), 0) # Testing Raw Time with Frame Delay for f in range(iterations): time.sleep(delay) c.tick(framerate_limit) c1 = c.get_rawtime() self.assertAlmostEqual(delay_miliseconds, c1, delta=delta) # Testing get_rawtime() = get_time() for f in range(iterations): time.sleep(delay) c.tick() c1 = c.get_rawtime() c2 = c.get_time() self.assertAlmostEqual(c1, c2, delta=delta) @unittest.skipIf(platform.machine() == "s390x", "Fails on s390x") @unittest.skipIf( os.environ.get("CI", None), "CI can have variable time slices, slow." ) def test_get_time(self): # Testing parameters delay = 0.1 # seconds delay_miliseconds = delay * (10**3) iterations = 10 delta = 50 # milliseconds # Testing Clock Initialization c = Clock() self.assertEqual(c.get_time(), 0) # Testing within delay parameter range for i in range(iterations): time.sleep(delay) c.tick() c1 = c.get_time() self.assertAlmostEqual(delay_miliseconds, c1, delta=delta) # Comparing get_time() results with the 'time' module for i in range(iterations): t0 = time.time() time.sleep(delay) c.tick() t1 = time.time() c1 = c.get_time() # elapsed time in milliseconds d0 = (t1 - t0) * ( 10**3 ) #'time' module elapsed time converted to milliseconds self.assertAlmostEqual(d0, c1, delta=delta) @unittest.skipIf(platform.machine() == "s390x", "Fails on s390x") @unittest.skipIf( os.environ.get("CI", None), "CI can have variable time slices, slow." ) def test_tick(self): """Tests time.Clock.tick()""" """ Loops with a set delay a few times then checks what tick reports to verify its accuracy. Then calls tick with a desired frame-rate and verifies it is not faster than the desired frame-rate nor is it taking a dramatically long time to complete """ # Adjust this value to increase the acceptable sleep jitter epsilon = 5 # 1.5 # Adjust this value to increase the acceptable locked frame-rate jitter epsilon2 = 0.3 # adjust this value to increase the acceptable frame-rate margin epsilon3 = 20 testing_framerate = 60 milliseconds = 5.0 collection = [] c = Clock() # verify time.Clock.tick() will measure the time correctly c.tick() for i in range(100): time.sleep(milliseconds / 1000) # convert to seconds collection.append(c.tick()) # removes the first highest and lowest value for outlier in [min(collection), max(collection)]: if outlier != milliseconds: collection.remove(outlier) average_time = float(sum(collection)) / len(collection) # assert the deviation from the intended frame-rate is within the # acceptable amount (the delay is not taking a dramatically long time) self.assertAlmostEqual(average_time, milliseconds, delta=epsilon) # verify tick will control the frame-rate c = Clock() collection = [] start = time.time() for i in range(testing_framerate): collection.append(c.tick(testing_framerate)) # remove the highest and lowest outliers for outlier in [min(collection), max(collection)]: if outlier != round(1000 / testing_framerate): collection.remove(outlier) end = time.time() # Since calling tick with a desired fps will prevent the program from # running at greater than the given fps, 100 iterations at 100 fps # should last no less than 1 second self.assertAlmostEqual(end - start, 1, delta=epsilon2) average_tick_time = float(sum(collection)) / len(collection) self.assertAlmostEqual( 1000 / average_tick_time, testing_framerate, delta=epsilon3 ) def test_tick_busy_loop(self): """Test tick_busy_loop""" c = Clock() # Test whether the return value of tick_busy_loop is equal to # (FPS is accurate) or greater than (slower than the set FPS) # with a small margin for error based on differences in how this # test runs in practise - it either sometimes runs slightly fast # or seems to based on a rounding error. second_length = 1000 shortfall_tolerance = 1 # (ms) The amount of time a tick is allowed to run short of, to account for underlying rounding errors sample_fps = 40 self.assertGreaterEqual( c.tick_busy_loop(sample_fps), (second_length / sample_fps) - shortfall_tolerance, ) pygame.time.wait(10) # incur delay between ticks that's faster than sample_fps self.assertGreaterEqual( c.tick_busy_loop(sample_fps), (second_length / sample_fps) - shortfall_tolerance, ) pygame.time.wait(200) # incur delay between ticks that's slower than sample_fps self.assertGreaterEqual( c.tick_busy_loop(sample_fps), (second_length / sample_fps) - shortfall_tolerance, ) high_fps = 500 self.assertGreaterEqual( c.tick_busy_loop(high_fps), (second_length / high_fps) - shortfall_tolerance ) low_fps = 1 self.assertGreaterEqual( c.tick_busy_loop(low_fps), (second_length / low_fps) - shortfall_tolerance ) low_non_factor_fps = 35 # 1000/35 makes 28.5714285714 frame_length_without_decimal_places = int( second_length / low_non_factor_fps ) # Same result as math.floor self.assertGreaterEqual( c.tick_busy_loop(low_non_factor_fps), frame_length_without_decimal_places - shortfall_tolerance, ) high_non_factor_fps = 750 # 1000/750 makes 1.3333... frame_length_without_decimal_places_2 = int( second_length / high_non_factor_fps ) # Same result as math.floor self.assertGreaterEqual( c.tick_busy_loop(high_non_factor_fps), frame_length_without_decimal_places_2 - shortfall_tolerance, ) zero_fps = 0 self.assertEqual(c.tick_busy_loop(zero_fps), 0) # Check behaviour of unexpected values negative_fps = -1 self.assertEqual(c.tick_busy_loop(negative_fps), 0) fractional_fps = 32.75 frame_length_without_decimal_places_3 = int(second_length / fractional_fps) self.assertGreaterEqual( c.tick_busy_loop(fractional_fps), frame_length_without_decimal_places_3 - shortfall_tolerance, ) bool_fps = True self.assertGreaterEqual( c.tick_busy_loop(bool_fps), (second_length / bool_fps) - shortfall_tolerance ) class TimeModuleTest(unittest.TestCase): __tags__ = ["timing"] @unittest.skipIf(platform.machine() == "s390x", "Fails on s390x") @unittest.skipIf( os.environ.get("CI", None), "CI can have variable time slices, slow." ) def test_delay(self): """Tests time.delay() function.""" millis = 50 # millisecond to wait on each iteration iterations = 20 # number of iterations delta = 150 # Represents acceptable margin of error for wait in ms # Call checking function self._wait_delay_check(pygame.time.delay, millis, iterations, delta) # After timing behaviour, check argument type exceptions self._type_error_checks(pygame.time.delay) def test_get_ticks(self): """Tests time.get_ticks()""" """ Iterates and delays for arbitrary amount of time for each iteration, check get_ticks to equal correct gap time """ iterations = 20 millis = 50 delta = 15 # Acceptable margin of error in ms # Assert return type to be int self.assertTrue(type(pygame.time.get_ticks()) == int) for i in range(iterations): curr_ticks = pygame.time.get_ticks() # Save current tick count curr_time = time.time() # Save current time pygame.time.delay(millis) # Delay for millis # Time and Ticks difference from start of the iteration time_diff = round((time.time() - curr_time) * 1000) ticks_diff = pygame.time.get_ticks() - curr_ticks # Assert almost equality of the ticking time and time difference self.assertAlmostEqual(ticks_diff, time_diff, delta=delta) @unittest.skipIf(platform.machine() == "s390x", "Fails on s390x") @unittest.skipIf( os.environ.get("CI", None), "CI can have variable time slices, slow." ) def test_set_timer(self): """Tests time.set_timer()""" """ Tests if a timer will post the correct amount of eventid events in the specified delay. Test is posting event objects work. Also tests if setting milliseconds to 0 stops the timer and if the once argument and repeat arguments work. """ pygame.init() TIMER_EVENT_TYPE = pygame.event.custom_type() timer_event = pygame.event.Event(TIMER_EVENT_TYPE) delta = 50 timer_delay = 100 test_number = 8 # Number of events to read for the test events = 0 # Events read pygame.event.clear() pygame.time.set_timer(TIMER_EVENT_TYPE, timer_delay) # Test that 'test_number' events are posted in the right amount of time t1 = pygame.time.get_ticks() max_test_time = t1 + timer_delay * test_number + delta while events < test_number: for event in pygame.event.get(): if event == timer_event: events += 1 # The test takes too much time if pygame.time.get_ticks() > max_test_time: break pygame.time.set_timer(TIMER_EVENT_TYPE, 0) t2 = pygame.time.get_ticks() # Is the number ef events and the timing right? self.assertEqual(events, test_number) self.assertAlmostEqual(timer_delay * test_number, t2 - t1, delta=delta) # Test that the timer stopped when set with 0ms delay. pygame.time.delay(200) self.assertNotIn(timer_event, pygame.event.get()) # Test that the old timer for an event is deleted when a new timer is set pygame.time.set_timer(TIMER_EVENT_TYPE, timer_delay) pygame.time.delay(int(timer_delay * 3.5)) self.assertEqual(pygame.event.get().count(timer_event), 3) pygame.time.set_timer(TIMER_EVENT_TYPE, timer_delay * 10) # long wait time pygame.time.delay(timer_delay * 5) self.assertNotIn(timer_event, pygame.event.get()) pygame.time.set_timer(TIMER_EVENT_TYPE, timer_delay * 3) pygame.time.delay(timer_delay * 7) self.assertEqual(pygame.event.get().count(timer_event), 2) pygame.time.set_timer(TIMER_EVENT_TYPE, timer_delay) pygame.time.delay(int(timer_delay * 5.5)) self.assertEqual(pygame.event.get().count(timer_event), 5) # Test that the loops=True works pygame.time.set_timer(TIMER_EVENT_TYPE, 10, True) pygame.time.delay(40) self.assertEqual(pygame.event.get().count(timer_event), 1) # Test a variety of event objects, test loops argument events_to_test = [ pygame.event.Event(TIMER_EVENT_TYPE), pygame.event.Event( TIMER_EVENT_TYPE, foo="9gwz5", baz=12, lol=[124, (34, "")] ), pygame.event.Event(pygame.KEYDOWN, key=pygame.K_a, unicode="a"), ] repeat = 3 millis = 50 for e in events_to_test: pygame.time.set_timer(e, millis, loops=repeat) pygame.time.delay(2 * millis * repeat) self.assertEqual(pygame.event.get().count(e), repeat) pygame.quit() def test_wait(self): """Tests time.wait() function.""" millis = 100 # millisecond to wait on each iteration iterations = 10 # number of iterations delta = 50 # Represents acceptable margin of error for wait in ms # Call checking function self._wait_delay_check(pygame.time.wait, millis, iterations, delta) # After timing behaviour, check argument type exceptions self._type_error_checks(pygame.time.wait) def _wait_delay_check(self, func_to_check, millis, iterations, delta): """ " call func_to_check(millis) "iterations" times and check each time if function "waited" for given millisecond (+- delta). At the end, take average time for each call (whole_duration/iterations), which should be equal to millis (+- delta - acceptable margin of error). *Created to avoid code duplication during delay and wait tests """ # take starting time for duration calculation start_time = time.time() for i in range(iterations): wait_time = func_to_check(millis) # Check equality of wait_time and millis with margin of error delta self.assertAlmostEqual(wait_time, millis, delta=delta) stop_time = time.time() # Cycle duration in millisecond duration = round((stop_time - start_time) * 1000) # Duration/Iterations should be (almost) equal to predefined millis self.assertAlmostEqual(duration / iterations, millis, delta=delta) def _type_error_checks(self, func_to_check): """Checks 3 TypeError (float, tuple, string) for the func_to_check""" """Intended for time.delay and time.wait functions""" # Those methods throw no exceptions on negative integers self.assertRaises(TypeError, func_to_check, 0.1) # check float self.assertRaises(TypeError, pygame.time.delay, (0, 1)) # check tuple self.assertRaises(TypeError, pygame.time.delay, "10") # check string ############################################################################### if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.032112 pygame-2.6.1/test/touch_test.py0000644000175100001770000000622014676242340016131 0ustar00runnerdockerimport unittest import os import pygame from pygame._sdl2 import touch from pygame.tests.test_utils import question has_touchdevice = touch.get_num_devices() > 0 class TouchTest(unittest.TestCase): @classmethod def setUpClass(cls): pygame.display.init() @classmethod def tearDownClass(cls): pygame.display.quit() def test_num_devices(self): touch.get_num_devices() @unittest.skipIf(not has_touchdevice, "no touch devices found") def test_get_device(self): touch.get_device(0) def test_get_device__invalid(self): self.assertRaises(pygame.error, touch.get_device, -1234) self.assertRaises(TypeError, touch.get_device, "test") @unittest.skipIf(not has_touchdevice, "no touch devices found") def test_num_fingers(self): touch.get_num_fingers(touch.get_device(0)) def test_num_fingers__invalid(self): self.assertRaises(TypeError, touch.get_num_fingers, "test") self.assertRaises(pygame.error, touch.get_num_fingers, -1234) class TouchInteractiveTest(unittest.TestCase): __tags__ = ["interactive"] @unittest.skipIf(not has_touchdevice, "no touch devices found") def test_get_finger(self): """ask for touch input and check the dict""" pygame.display.init() pygame.font.init() os.environ["SDL_VIDEO_WINDOW_POS"] = "50,50" screen = pygame.display.set_mode((800, 600)) screen.fill((255, 255, 255)) font = pygame.font.Font(None, 32) instructions_str_1 = "Please place some fingers on your touch device" instructions_str_2 = ( "Close the window when finished, " "and answer the question" ) inst_1_render = font.render(instructions_str_1, True, pygame.Color("#000000")) inst_2_render = font.render(instructions_str_2, True, pygame.Color("#000000")) running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False finger_data_renders = [] num_devices = pygame._sdl2.touch.get_num_devices() if num_devices > 0: first_device = pygame._sdl2.touch.get_device(0) num_fingers = pygame._sdl2.touch.get_num_fingers(first_device) if num_fingers > 0: for finger_index in range(0, num_fingers): data = pygame._sdl2.touch.get_finger(first_device, finger_index) render = font.render( f"finger - {data}", True, pygame.Color("#000000") ) finger_data_renders.append(render) screen.fill((255, 255, 255)) screen.blit(inst_1_render, (5, 5)) screen.blit(inst_2_render, (5, 40)) for index, finger in enumerate(finger_data_renders): screen.blit(finger, (5, 80 + (index * 40))) pygame.display.update() response = question("Does the finger data seem correct?") self.assertTrue(response) pygame.display.quit() if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.032112 pygame-2.6.1/test/transform_test.py0000644000175100001770000015012014676242340017021 0ustar00runnerdockerimport unittest import os import platform from pygame.tests import test_utils from pygame.tests.test_utils import example_path import pygame import pygame.transform from pygame.locals import * def show_image(s, images=[]): # pygame.display.init() size = s.get_rect()[2:] screen = pygame.display.set_mode(size) screen.blit(s, (0, 0)) pygame.display.flip() pygame.event.pump() going = True idx = 0 while going: events = pygame.event.get() for e in events: if e.type == QUIT: going = False if e.type == KEYDOWN: if e.key in [K_s, K_a]: if e.key == K_s: idx += 1 if e.key == K_a: idx -= 1 s = images[idx] screen.blit(s, (0, 0)) pygame.display.flip() pygame.event.pump() elif e.key in [K_ESCAPE]: going = False pygame.display.quit() pygame.display.init() def threshold( return_surf, surf, color, threshold=(0, 0, 0), diff_color=(0, 0, 0), change_return=True, ): """given the color it makes return_surf only have areas with the given colour.""" width, height = surf.get_width(), surf.get_height() if change_return: return_surf.fill(diff_color) try: r, g, b = color except ValueError: r, g, b, a = color try: tr, tg, tb = color except ValueError: tr, tg, tb, ta = color similar = 0 for y in range(height): for x in range(width): c1 = surf.get_at((x, y)) if (abs(c1[0] - r) < tr) & (abs(c1[1] - g) < tg) & (abs(c1[2] - b) < tb): # this pixel is within the threshold. if change_return: return_surf.set_at((x, y), c1) similar += 1 # else: # print(c1, c2) return similar class TransformModuleTest(unittest.TestCase): def test_scale__alpha(self): """see if set_alpha information is kept.""" s = pygame.Surface((32, 32)) s.set_alpha(55) self.assertEqual(s.get_alpha(), 55) s = pygame.Surface((32, 32)) s.set_alpha(55) s2 = pygame.transform.scale(s, (64, 64)) s3 = s.copy() self.assertEqual(s.get_alpha(), s3.get_alpha()) self.assertEqual(s.get_alpha(), s2.get_alpha()) def test_scale__destination(self): """see if the destination surface can be passed in to use.""" s = pygame.Surface((32, 32)) s2 = pygame.transform.scale(s, (64, 64)) s3 = s2.copy() # Also validate keyword arguments s3 = pygame.transform.scale(surface=s, size=(64, 64), dest_surface=s3) pygame.transform.scale(s, (64, 64), s2) # the wrong size surface is past in. Should raise an error. self.assertRaises(ValueError, pygame.transform.scale, s, (33, 64), s3) s = pygame.Surface((32, 32)) s2 = pygame.transform.smoothscale(s, (64, 64)) s3 = s2.copy() # Also validate keyword arguments s3 = pygame.transform.smoothscale(surface=s, size=(64, 64), dest_surface=s3) # the wrong size surface is past in. Should raise an error. self.assertRaises(ValueError, pygame.transform.smoothscale, s, (33, 64), s3) def test_scale__vector2(self): s = pygame.Surface((32, 32)) s2 = pygame.transform.scale(s, pygame.Vector2(64, 64)) s3 = pygame.transform.smoothscale(s, pygame.Vector2(64, 64)) self.assertEqual((64, 64), s2.get_size()) self.assertEqual((64, 64), s3.get_size()) def test_scale__zero_surface_transform(self): tmp_surface = pygame.transform.scale(pygame.Surface((128, 128)), (0, 0)) self.assertEqual(tmp_surface.get_size(), (0, 0)) tmp_surface = pygame.transform.scale(tmp_surface, (128, 128)) self.assertEqual(tmp_surface.get_size(), (128, 128)) def test_scale_by(self): s = pygame.Surface((32, 32)) s2 = pygame.transform.scale_by(s, 2) self.assertEqual((64, 64), s2.get_size()) s2 = pygame.transform.scale_by(s, factor=(2.0, 1.5)) self.assertEqual((64, 48), s2.get_size()) dest = pygame.Surface((64, 48)) pygame.transform.scale_by(s, (2.0, 1.5), dest_surface=dest) def test_smoothscale_by(self): s = pygame.Surface((32, 32)) s2 = pygame.transform.smoothscale_by(s, 2) self.assertEqual((64, 64), s2.get_size()) s2 = pygame.transform.smoothscale_by(s, factor=(2.0, 1.5)) self.assertEqual((64, 48), s2.get_size()) dest = pygame.Surface((64, 48)) pygame.transform.smoothscale_by(s, (2.0, 1.5), dest_surface=dest) def test_grayscale(self): s = pygame.Surface((32, 32)) s.fill((255, 0, 0)) s2 = pygame.transform.grayscale(s) self.assertEqual(pygame.transform.average_color(s2)[0], 76) self.assertEqual(pygame.transform.average_color(s2)[1], 76) self.assertEqual(pygame.transform.average_color(s2)[2], 76) dest = pygame.Surface((32, 32), depth=32) pygame.transform.grayscale(s, dest) self.assertEqual(pygame.transform.average_color(dest)[0], 76) self.assertEqual(pygame.transform.average_color(dest)[1], 76) self.assertEqual(pygame.transform.average_color(dest)[2], 76) dest = pygame.Surface((32, 32), depth=32) s.fill((34, 12, 65)) pygame.transform.grayscale(s, dest) self.assertEqual(pygame.transform.average_color(dest)[0], 24) self.assertEqual(pygame.transform.average_color(dest)[1], 24) self.assertEqual(pygame.transform.average_color(dest)[2], 24) dest = pygame.Surface((32, 32), depth=32) s.fill((123, 123, 123)) pygame.transform.grayscale(s, dest) self.assertIn(pygame.transform.average_color(dest)[0], [123, 122]) self.assertIn(pygame.transform.average_color(dest)[1], [123, 122]) self.assertIn(pygame.transform.average_color(dest)[2], [123, 122]) s = pygame.Surface((32, 32), depth=24) s.fill((255, 0, 0)) dest = pygame.Surface((32, 32), depth=24) pygame.transform.grayscale(s, dest) self.assertEqual(pygame.transform.average_color(dest)[0], 76) self.assertEqual(pygame.transform.average_color(dest)[1], 76) self.assertEqual(pygame.transform.average_color(dest)[2], 76) s = pygame.Surface((32, 32), depth=16) s.fill((255, 0, 0)) dest = pygame.Surface((32, 32), depth=16) pygame.transform.grayscale(s, dest) self.assertEqual(pygame.transform.average_color(dest)[0], 72) self.assertEqual(pygame.transform.average_color(dest)[1], 76) self.assertEqual(pygame.transform.average_color(dest)[2], 72) def test_threshold__honors_third_surface(self): # __doc__ for threshold as of Tue 07/15/2008 # pygame.transform.threshold(DestSurface, Surface, color, threshold = # (0,0,0,0), diff_color = (0,0,0,0), change_return = True, Surface = # None): return num_threshold_pixels # When given the optional third # surface, it would use the colors in that rather than the "color" # specified in the function to check against. # New in pygame 1.8 ################################################################ # Sizes (w, h) = size = (32, 32) # the original_color is within the threshold of the threshold_color threshold = (20, 20, 20, 20) original_color = (25, 25, 25, 25) threshold_color = (10, 10, 10, 10) # Surfaces original_surface = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surface = pygame.Surface(size, pygame.SRCALPHA, 32) # Third surface is used in lieu of 3rd position arg color third_surface = pygame.Surface(size, pygame.SRCALPHA, 32) # Color filling original_surface.fill(original_color) third_surface.fill(threshold_color) ################################################################ # All pixels for color should be within threshold # pixels_within_threshold = pygame.transform.threshold( dest_surface=None, surface=original_surface, search_color=threshold_color, threshold=threshold, set_color=None, set_behavior=0, ) self.assertEqual(w * h, pixels_within_threshold) ################################################################ # This should respect third_surface colors in place of 3rd arg # color Should be the same as: surface.fill(threshold_color) # all within threshold pixels_within_threshold = pygame.transform.threshold( dest_surface=None, surface=original_surface, search_color=None, threshold=threshold, set_color=None, set_behavior=0, search_surf=third_surface, ) self.assertEqual(w * h, pixels_within_threshold) def test_threshold_dest_surf_not_change(self): """the pixels within the threshold. All pixels not within threshold are changed to set_color. So there should be none changed in this test. """ (w, h) = size = (32, 32) threshold = (20, 20, 20, 20) original_color = (25, 25, 25, 25) original_dest_color = (65, 65, 65, 55) threshold_color = (10, 10, 10, 10) set_color = (255, 10, 10, 10) surf = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surf = pygame.Surface(size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(size, pygame.SRCALPHA, 32) surf.fill(original_color) search_surf.fill(threshold_color) dest_surf.fill(original_dest_color) # set_behavior=1, set dest_surface from set_color. # all within threshold of third_surface, so no color is set. THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 pixels_within_threshold = pygame.transform.threshold( dest_surface=dest_surf, surface=surf, search_color=None, threshold=threshold, set_color=set_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, search_surf=search_surf, ) # # Return, of pixels within threshold is correct self.assertEqual(w * h, pixels_within_threshold) # # Size of dest surface is correct dest_rect = dest_surf.get_rect() dest_size = dest_rect.size self.assertEqual(size, dest_size) # The color is not the change_color specified for every pixel As all # pixels are within threshold for pt in test_utils.rect_area_pts(dest_rect): self.assertNotEqual(dest_surf.get_at(pt), set_color) self.assertEqual(dest_surf.get_at(pt), original_dest_color) def test_threshold_dest_surf_all_changed(self): """Lowering the threshold, expecting changed surface""" (w, h) = size = (32, 32) threshold = (20, 20, 20, 20) original_color = (25, 25, 25, 25) original_dest_color = (65, 65, 65, 55) threshold_color = (10, 10, 10, 10) set_color = (255, 10, 10, 10) surf = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surf = pygame.Surface(size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(size, pygame.SRCALPHA, 32) surf.fill(original_color) search_surf.fill(threshold_color) dest_surf.fill(original_dest_color) THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 pixels_within_threshold = pygame.transform.threshold( dest_surf, surf, search_color=None, set_color=set_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, search_surf=search_surf, ) self.assertEqual(0, pixels_within_threshold) dest_rect = dest_surf.get_rect() dest_size = dest_rect.size self.assertEqual(size, dest_size) # The color is the set_color specified for every pixel As all # pixels are not within threshold for pt in test_utils.rect_area_pts(dest_rect): self.assertEqual(dest_surf.get_at(pt), set_color) def test_threshold_count(self): """counts the colors, and not changes them.""" surf_size = (32, 32) surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) search_color = (55, 55, 55, 255) original_color = (10, 10, 10, 255) surf.fill(original_color) # set 2 pixels to the color we are searching for. surf.set_at((0, 0), search_color) surf.set_at((12, 5), search_color) # There is no destination surface, but we ask to change it. # This should be an error. self.assertRaises( TypeError, pygame.transform.threshold, None, surf, search_color ) # from pygame.transform import THRESHOLD_BEHAVIOR_COUNT THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF = 2 self.assertRaises( TypeError, pygame.transform.threshold, None, surf, search_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, ) THRESHOLD_BEHAVIOR_COUNT = 0 num_threshold_pixels = pygame.transform.threshold( dest_surface=None, surface=surf, search_color=search_color, set_behavior=THRESHOLD_BEHAVIOR_COUNT, ) self.assertEqual(num_threshold_pixels, 2) def test_threshold_search_surf(self): surf_size = (32, 32) surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) search_surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) dest_surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) original_color = (10, 10, 10, 255) search_color = (55, 55, 55, 255) surf.fill(original_color) dest_surf.fill(original_color) # set 2 pixels to the color we are searching for. surf.set_at((0, 0), search_color) surf.set_at((12, 5), search_color) search_surf.fill(search_color) # We look in the other surface for matching colors. # Change it in dest_surf THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF = 2 # TypeError: if search_surf is used, search_color should be None self.assertRaises( TypeError, pygame.transform.threshold, dest_surf, surf, search_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, search_surf=search_surf, ) # surf, dest_surf, and search_surf should all be the same size. # Check surface sizes are the same size. different_sized_surf = pygame.Surface((22, 33), pygame.SRCALPHA, 32) self.assertRaises( TypeError, pygame.transform.threshold, different_sized_surf, surf, search_color=None, set_color=None, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, search_surf=search_surf, ) self.assertRaises( TypeError, pygame.transform.threshold, dest_surf, surf, search_color=None, set_color=None, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, search_surf=different_sized_surf, ) # We look to see if colors in search_surf are in surf. num_threshold_pixels = pygame.transform.threshold( dest_surface=dest_surf, surface=surf, search_color=None, set_color=None, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, search_surf=search_surf, ) num_pixels_within = 2 self.assertEqual(num_threshold_pixels, num_pixels_within) dest_surf.fill(original_color) num_threshold_pixels = pygame.transform.threshold( dest_surf, surf, search_color=None, set_color=None, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, search_surf=search_surf, inverse_set=True, ) self.assertEqual(num_threshold_pixels, 2) def test_threshold_inverse_set(self): """changes the pixels within the threshold, and not outside.""" surf_size = (32, 32) _dest_surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) _surf = pygame.Surface(surf_size, pygame.SRCALPHA, 32) dest_surf = _dest_surf # surface we are changing. surf = _surf # surface we are looking at search_color = (55, 55, 55, 255) # color we are searching for. threshold = (0, 0, 0, 0) # within this distance from search_color. set_color = (245, 245, 245, 255) # color we set. inverse_set = 1 # pixels within threshold are changed to 'set_color' original_color = (10, 10, 10, 255) surf.fill(original_color) # set 2 pixels to the color we are searching for. surf.set_at((0, 0), search_color) surf.set_at((12, 5), search_color) dest_surf.fill(original_color) # set 2 pixels to the color we are searching for. dest_surf.set_at((0, 0), search_color) dest_surf.set_at((12, 5), search_color) THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 num_threshold_pixels = pygame.transform.threshold( dest_surf, surf, search_color=search_color, threshold=threshold, set_color=set_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, inverse_set=1, ) self.assertEqual(num_threshold_pixels, 2) # only two pixels changed to diff_color. self.assertEqual(dest_surf.get_at((0, 0)), set_color) self.assertEqual(dest_surf.get_at((12, 5)), set_color) # other pixels should be the same as they were before. # We just check one other pixel, not all of them. self.assertEqual(dest_surf.get_at((2, 2)), original_color) # XXX def test_threshold_non_src_alpha(self): result = pygame.Surface((10, 10)) s1 = pygame.Surface((10, 10)) s2 = pygame.Surface((10, 10)) s3 = pygame.Surface((10, 10)) s4 = pygame.Surface((10, 10)) x = s1.fill((0, 0, 0)) s1.set_at((0, 0), (32, 20, 0)) x = s2.fill((0, 20, 0)) x = s3.fill((0, 0, 0)) x = s4.fill((0, 0, 0)) s2.set_at((0, 0), (33, 21, 0)) s2.set_at((3, 0), (63, 61, 0)) s3.set_at((0, 0), (112, 31, 0)) s4.set_at((0, 0), (11, 31, 0)) s4.set_at((1, 1), (12, 31, 0)) self.assertEqual(s1.get_at((0, 0)), (32, 20, 0, 255)) self.assertEqual(s2.get_at((0, 0)), (33, 21, 0, 255)) self.assertEqual((0, 0), (s1.get_flags(), s2.get_flags())) similar_color = (255, 255, 255, 255) diff_color = (222, 0, 0, 255) threshold_color = (20, 20, 20, 255) THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR = 1 num_threshold_pixels = pygame.transform.threshold( dest_surface=result, surface=s1, search_color=similar_color, threshold=threshold_color, set_color=diff_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, ) self.assertEqual(num_threshold_pixels, 0) num_threshold_pixels = pygame.transform.threshold( dest_surface=result, surface=s1, search_color=(40, 40, 0), threshold=threshold_color, set_color=diff_color, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_COLOR, ) self.assertEqual(num_threshold_pixels, 1) self.assertEqual(result.get_at((0, 0)), diff_color) def test_threshold__uneven_colors(self): (w, h) = size = (16, 16) original_surface = pygame.Surface(size, pygame.SRCALPHA, 32) dest_surface = pygame.Surface(size, pygame.SRCALPHA, 32) original_surface.fill(0) threshold_color_template = [5, 5, 5, 5] threshold_template = [6, 6, 6, 6] ################################################################ for pos in range(len("rgb")): threshold_color = threshold_color_template[:] threshold = threshold_template[:] threshold_color[pos] = 45 threshold[pos] = 50 pixels_within_threshold = pygame.transform.threshold( None, original_surface, threshold_color, threshold, set_color=None, set_behavior=0, ) self.assertEqual(w * h, pixels_within_threshold) ################################################################ def test_threshold_set_behavior2(self): """raises an error when set_behavior=2 and set_color is not None.""" from pygame.transform import threshold s1 = pygame.Surface((32, 32), SRCALPHA, 32) s2 = pygame.Surface((32, 32), SRCALPHA, 32) THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF = 2 self.assertRaises( TypeError, threshold, dest_surface=s2, surface=s1, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=(255, 0, 0), set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, ) def test_threshold_set_behavior0(self): """raises an error when set_behavior=1 and set_color is not None, and dest_surf is not None. """ from pygame.transform import threshold s1 = pygame.Surface((32, 32), SRCALPHA, 32) s2 = pygame.Surface((32, 32), SRCALPHA, 32) THRESHOLD_BEHAVIOR_COUNT = 0 self.assertRaises( TypeError, threshold, dest_surface=None, surface=s2, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=(0, 0, 0), set_behavior=THRESHOLD_BEHAVIOR_COUNT, ) self.assertRaises( TypeError, threshold, dest_surface=s1, surface=s2, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=None, set_behavior=THRESHOLD_BEHAVIOR_COUNT, ) threshold( dest_surface=None, surface=s2, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=None, set_behavior=THRESHOLD_BEHAVIOR_COUNT, ) def test_threshold_from_surface(self): """Set similar pixels in 'dest_surf' to color in the 'surf'.""" from pygame.transform import threshold surf = pygame.Surface((32, 32), SRCALPHA, 32) dest_surf = pygame.Surface((32, 32), SRCALPHA, 32) surf_color = (40, 40, 40, 255) dest_color = (255, 255, 255) surf.fill(surf_color) dest_surf.fill(dest_color) THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF = 2 num_threshold_pixels = threshold( dest_surface=dest_surf, surface=surf, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=None, set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF, inverse_set=1, ) self.assertEqual( num_threshold_pixels, dest_surf.get_height() * dest_surf.get_width() ) self.assertEqual(dest_surf.get_at((0, 0)), surf_color) def test_threshold__surface(self): """ """ from pygame.transform import threshold s1 = pygame.Surface((32, 32), SRCALPHA, 32) s2 = pygame.Surface((32, 32), SRCALPHA, 32) s3 = pygame.Surface((1, 1), SRCALPHA, 32) THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF = 2 # # only one pixel should not be changed. # s1.fill((40,40,40)) # s2.fill((255,255,255)) # s1.set_at( (0,0), (170, 170, 170) ) # # set the similar pixels in destination surface to the color # # in the first surface. # num_threshold_pixels = threshold( # dest_surface=s2, # surface=s1, # search_color=(30,30,30), # threshold=(11,11,11), # set_color=None, # set_behavior=THRESHOLD_BEHAVIOR_FROM_SEARCH_SURF) # #num_threshold_pixels = threshold(s2, s1, (30,30,30)) # self.assertEqual(num_threshold_pixels, (s1.get_height() * s1.get_width()) -1) # self.assertEqual(s2.get_at((0,0)), (0,0,0, 255)) # self.assertEqual(s2.get_at((0,1)), (40, 40, 40, 255)) # self.assertEqual(s2.get_at((17,1)), (40, 40, 40, 255)) # # abs(40 - 255) < 100 # #(abs(c1[0] - r) < tr) # s1.fill((160,160,160)) # s2.fill((255,255,255)) # num_threshold_pixels = threshold(s2, s1, (255,255,255), (100,100,100), (0,0,0), True) # self.assertEqual(num_threshold_pixels, (s1.get_height() * s1.get_width())) # only one pixel should not be changed. s1.fill((40, 40, 40)) s1.set_at((0, 0), (170, 170, 170)) THRESHOLD_BEHAVIOR_COUNT = 0 num_threshold_pixels = threshold( dest_surface=None, surface=s1, search_color=(30, 30, 30), threshold=(11, 11, 11), set_color=None, set_behavior=THRESHOLD_BEHAVIOR_COUNT, ) # num_threshold_pixels = threshold(s2, s1, (30,30,30)) self.assertEqual(num_threshold_pixels, (s1.get_height() * s1.get_width()) - 1) # test end markers. 0, and 255 # the pixels are different by 1. s1.fill((254, 254, 254)) s2.fill((255, 255, 255)) s3.fill((255, 255, 255)) s1.set_at((0, 0), (170, 170, 170)) num_threshold_pixels = threshold( None, s1, (254, 254, 254), (1, 1, 1), None, THRESHOLD_BEHAVIOR_COUNT ) self.assertEqual(num_threshold_pixels, (s1.get_height() * s1.get_width()) - 1) # compare the two surfaces. Should be all but one matching. num_threshold_pixels = threshold( None, s1, None, (1, 1, 1), None, THRESHOLD_BEHAVIOR_COUNT, s2 ) self.assertEqual(num_threshold_pixels, (s1.get_height() * s1.get_width()) - 1) # within (0,0,0) threshold? Should match no pixels. num_threshold_pixels = threshold( None, s1, (253, 253, 253), (0, 0, 0), None, THRESHOLD_BEHAVIOR_COUNT ) self.assertEqual(num_threshold_pixels, 0) # other surface within (0,0,0) threshold? Should match no pixels. num_threshold_pixels = threshold( None, s1, None, (0, 0, 0), None, THRESHOLD_BEHAVIOR_COUNT, s2 ) self.assertEqual(num_threshold_pixels, 0) def test_threshold__subclassed_surface(self): """Ensure threshold accepts subclassed surfaces.""" expected_size = (13, 11) expected_flags = 0 expected_depth = 32 expected_color = (90, 80, 70, 255) expected_count = 0 surface = test_utils.SurfaceSubclass( expected_size, expected_flags, expected_depth ) dest_surface = test_utils.SurfaceSubclass( expected_size, expected_flags, expected_depth ) search_surface = test_utils.SurfaceSubclass( expected_size, expected_flags, expected_depth ) surface.fill((10, 10, 10)) dest_surface.fill((255, 255, 255)) search_surface.fill((20, 20, 20)) count = pygame.transform.threshold( dest_surface=dest_surface, surface=surface, threshold=(1, 1, 1), set_color=expected_color, search_color=None, search_surf=search_surface, ) self.assertIsInstance(dest_surface, pygame.Surface) self.assertIsInstance(dest_surface, test_utils.SurfaceSubclass) self.assertEqual(count, expected_count) self.assertEqual(dest_surface.get_at((0, 0)), expected_color) self.assertEqual(dest_surface.get_bitsize(), expected_depth) self.assertEqual(dest_surface.get_size(), expected_size) self.assertEqual(dest_surface.get_flags(), expected_flags) def test_laplacian(self): """ """ SIZE = 32 s1 = pygame.Surface((SIZE, SIZE)) s2 = pygame.Surface((SIZE, SIZE)) s1.fill((10, 10, 70)) pygame.draw.line(s1, (255, 0, 0), (3, 10), (20, 20)) # a line at the last row of the image. pygame.draw.line(s1, (255, 0, 0), (0, 31), (31, 31)) pygame.transform.laplacian(s1, s2) # show_image(s1) # show_image(s2) self.assertEqual(s2.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(s2.get_at((3, 10)), (255, 0, 0, 255)) self.assertEqual(s2.get_at((0, 31)), (255, 0, 0, 255)) self.assertEqual(s2.get_at((31, 31)), (255, 0, 0, 255)) # here we create the return surface. s2 = pygame.transform.laplacian(s1) self.assertEqual(s2.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(s2.get_at((3, 10)), (255, 0, 0, 255)) self.assertEqual(s2.get_at((0, 31)), (255, 0, 0, 255)) self.assertEqual(s2.get_at((31, 31)), (255, 0, 0, 255)) def test_laplacian__24_big_endian(self): """ """ pygame.display.init() try: surf_1 = pygame.image.load( example_path(os.path.join("data", "laplacian.png")) ) SIZE = 32 surf_2 = pygame.Surface((SIZE, SIZE), 0, 24) # s1.fill((10, 10, 70)) # pygame.draw.line(s1, (255, 0, 0), (3, 10), (20, 20)) # a line at the last row of the image. # pygame.draw.line(s1, (255, 0, 0), (0, 31), (31, 31)) # Also validate keyword arguments pygame.transform.laplacian(surface=surf_1, dest_surface=surf_2) # show_image(s1) # show_image(s2) self.assertEqual(surf_2.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(surf_2.get_at((3, 10)), (255, 0, 0, 255)) self.assertEqual(surf_2.get_at((0, 31)), (255, 0, 0, 255)) self.assertEqual(surf_2.get_at((31, 31)), (255, 0, 0, 255)) # here we create the return surface. surf_2 = pygame.transform.laplacian(surf_1) self.assertEqual(surf_2.get_at((0, 0)), (0, 0, 0, 255)) self.assertEqual(surf_2.get_at((3, 10)), (255, 0, 0, 255)) self.assertEqual(surf_2.get_at((0, 31)), (255, 0, 0, 255)) self.assertEqual(surf_2.get_at((31, 31)), (255, 0, 0, 255)) finally: pygame.display.quit() def test_average_surfaces(self): """ """ SIZE = 32 s1 = pygame.Surface((SIZE, SIZE)) s2 = pygame.Surface((SIZE, SIZE)) s3 = pygame.Surface((SIZE, SIZE)) s1.fill((10, 10, 70)) s2.fill((10, 20, 70)) s3.fill((10, 130, 10)) surfaces = [s1, s2, s3] surfaces = [s1, s2] sr = pygame.transform.average_surfaces(surfaces) self.assertEqual(sr.get_at((0, 0)), (10, 15, 70, 255)) self.assertRaises(TypeError, pygame.transform.average_surfaces, 1) self.assertRaises(TypeError, pygame.transform.average_surfaces, []) self.assertRaises(TypeError, pygame.transform.average_surfaces, [1]) self.assertRaises(TypeError, pygame.transform.average_surfaces, [s1, 1]) self.assertRaises(TypeError, pygame.transform.average_surfaces, [1, s1]) self.assertRaises(TypeError, pygame.transform.average_surfaces, [s1, s2, 1]) self.assertRaises( TypeError, pygame.transform.average_surfaces, (s for s in [s1, s2, s3]) ) def test_average_surfaces__24(self): SIZE = 32 depth = 24 s1 = pygame.Surface((SIZE, SIZE), 0, depth) s2 = pygame.Surface((SIZE, SIZE), 0, depth) s3 = pygame.Surface((SIZE, SIZE), 0, depth) s1.fill((10, 10, 70, 255)) s2.fill((10, 20, 70, 255)) s3.fill((10, 130, 10, 255)) surfaces = [s1, s2, s3] sr = pygame.transform.average_surfaces(surfaces) self.assertEqual(sr.get_masks(), s1.get_masks()) self.assertEqual(sr.get_flags(), s1.get_flags()) self.assertEqual(sr.get_losses(), s1.get_losses()) if 0: print(sr, s1) print(sr.get_masks(), s1.get_masks()) print(sr.get_flags(), s1.get_flags()) print(sr.get_losses(), s1.get_losses()) print(sr.get_shifts(), s1.get_shifts()) self.assertEqual(sr.get_at((0, 0)), (10, 53, 50, 255)) def test_average_surfaces__24_big_endian(self): pygame.display.init() try: surf_1 = pygame.image.load(example_path(os.path.join("data", "BGR.png"))) surf_2 = surf_1.copy() surfaces = [surf_1, surf_2] self.assertEqual(surf_1.get_at((0, 0)), (255, 0, 0, 255)) self.assertEqual(surf_2.get_at((0, 0)), (255, 0, 0, 255)) surf_av = pygame.transform.average_surfaces(surfaces) self.assertEqual(surf_av.get_masks(), surf_1.get_masks()) self.assertEqual(surf_av.get_flags(), surf_1.get_flags()) self.assertEqual(surf_av.get_losses(), surf_1.get_losses()) self.assertEqual(surf_av.get_at((0, 0)), (255, 0, 0, 255)) finally: pygame.display.quit() def test_average_surfaces__subclassed_surfaces(self): """Ensure average_surfaces accepts subclassed surfaces.""" expected_size = (23, 17) expected_flags = 0 expected_depth = 32 expected_color = (50, 50, 50, 255) surfaces = [] for color in ((40, 60, 40), (60, 40, 60)): s = test_utils.SurfaceSubclass( expected_size, expected_flags, expected_depth ) s.fill(color) surfaces.append(s) surface = pygame.transform.average_surfaces(surfaces) self.assertIsInstance(surface, pygame.Surface) self.assertNotIsInstance(surface, test_utils.SurfaceSubclass) self.assertEqual(surface.get_at((0, 0)), expected_color) self.assertEqual(surface.get_bitsize(), expected_depth) self.assertEqual(surface.get_size(), expected_size) self.assertEqual(surface.get_flags(), expected_flags) def test_average_surfaces__subclassed_destination_surface(self): """Ensure average_surfaces accepts a destination subclassed surface.""" expected_size = (13, 27) expected_flags = 0 expected_depth = 32 expected_color = (15, 15, 15, 255) surfaces = [] for color in ((10, 10, 20), (20, 20, 10), (30, 30, 30)): s = test_utils.SurfaceSubclass( expected_size, expected_flags, expected_depth ) s.fill(color) surfaces.append(s) expected_dest_surface = surfaces.pop() # Also validate keyword arguments dest_surface = pygame.transform.average_surfaces( surfaces=surfaces, dest_surface=expected_dest_surface ) self.assertIsInstance(dest_surface, pygame.Surface) self.assertIsInstance(dest_surface, test_utils.SurfaceSubclass) self.assertIs(dest_surface, expected_dest_surface) self.assertEqual(dest_surface.get_at((0, 0)), expected_color) self.assertEqual(dest_surface.get_bitsize(), expected_depth) self.assertEqual(dest_surface.get_size(), expected_size) self.assertEqual(dest_surface.get_flags(), expected_flags) def test_average_color(self): """ """ for i in (24, 32): with self.subTest(f"Testing {i}-bit surface"): s = pygame.Surface((32, 32), 0, i) s.fill((0, 100, 200)) s.fill((10, 50, 100), (0, 0, 16, 32)) self.assertEqual(pygame.transform.average_color(s), (5, 75, 150, 0)) # Also validate keyword arguments avg_color = pygame.transform.average_color( surface=s, rect=(16, 0, 16, 32) ) self.assertEqual(avg_color, (0, 100, 200, 0)) def test_average_color_considering_alpha_all_pixels_opaque(self): """ """ s = pygame.Surface((32, 32), pygame.SRCALPHA, 32) s.fill((0, 100, 200, 255)) s.fill((10, 50, 100, 255), (0, 0, 16, 32)) self.assertEqual( pygame.transform.average_color(s, consider_alpha=True), (5, 75, 150, 255) ) # Also validate keyword arguments avg_color = pygame.transform.average_color( surface=s, rect=(16, 0, 16, 32), consider_alpha=True ) self.assertEqual(avg_color, (0, 100, 200, 255)) def test_average_color_considering_alpha(self): """ """ s = pygame.Surface((32, 32), pygame.SRCALPHA, 32) s.fill((0, 100, 200, 255)) s.fill((10, 50, 100, 128), (0, 0, 16, 32)) # formula for this example of half filled square # n = number of pixels, e.g. 32 * 32 # rgb = (n/2 * ( a_left * rgb_left) + n/2 (a_right * rgb_right) ) / (n/2 * a_left + n/2 * a_right) # a = (n/2 * a_left + n/2 * a_right) / n self.assertEqual( pygame.transform.average_color(s, consider_alpha=True), (3, 83, 166, 191) ) # Also validate keyword arguments avg_color = pygame.transform.average_color( surface=s, rect=(0, 0, 16, 32), consider_alpha=True ) self.assertEqual(avg_color, (10, 50, 100, 128)) def test_rotate(self): # setting colors and canvas blue = (0, 0, 255, 255) red = (255, 0, 0, 255) black = (0, 0, 0) canvas = pygame.Surface((3, 3)) rotation = 0 canvas.set_at((2, 0), blue) canvas.set_at((0, 2), red) self.assertEqual(canvas.get_at((0, 0)), black) self.assertEqual(canvas.get_at((2, 0)), blue) self.assertEqual(canvas.get_at((0, 2)), red) for i in range(0, 4): if i % 2 == 0: self.assertEqual(canvas.get_at((0, 0)), black) elif i == 1: self.assertEqual(canvas.get_at((0, 0)), blue) elif i == 3: self.assertEqual(canvas.get_at((0, 0)), red) rotation += 90 # Also validate keyword arguments canvas = pygame.transform.rotate(surface=canvas, angle=90) self.assertEqual(canvas.get_at((0, 0)), black) def test_rotate_of_0_sized_surface(self): # This function just tests possible Segmentation Fault canvas1 = pygame.Surface((0, 1)) canvas2 = pygame.Surface((1, 0)) pygame.transform.rotate(canvas1, 42) pygame.transform.rotate(canvas2, 42) def test_rotate__lossless_at_90_degrees(self): w, h = 32, 32 s = pygame.Surface((w, h), pygame.SRCALPHA) gradient = list(test_utils.gradient(w, h)) for pt, color in gradient: s.set_at(pt, color) for rotation in (90, -90): s = pygame.transform.rotate(s, rotation) for pt, color in gradient: self.assertTrue(s.get_at(pt) == color) def test_scale2x(self): # __doc__ (as of 2008-06-25) for pygame.transform.scale2x: # pygame.transform.scale2x(Surface, DestSurface = None): Surface # specialized image doubler w, h = 32, 32 s = pygame.Surface((w, h), pygame.SRCALPHA, 32) # s.set_at((0,0), (20, 20, 20, 255)) s1 = pygame.transform.scale2x(s) # Also validate keyword arguments s2 = pygame.transform.scale2x(surface=s) self.assertEqual(s1.get_rect().size, (64, 64)) self.assertEqual(s2.get_rect().size, (64, 64)) def test_scale2xraw(self): w, h = 32, 32 s = pygame.Surface((w, h), pygame.SRCALPHA, 32) s.fill((0, 0, 0)) pygame.draw.circle(s, (255, 0, 0), (w // 2, h // 2), (w // 3)) s2 = pygame.transform.scale(s, (w * 2, h * 2)) s2_2 = pygame.transform.scale(s2, (w * 4, h * 4)) s4 = pygame.transform.scale(s, (w * 4, h * 4)) self.assertEqual(s2_2.get_rect().size, (128, 128)) for pt in test_utils.rect_area_pts(s2_2.get_rect()): self.assertEqual(s2_2.get_at(pt), s4.get_at(pt)) def test_get_smoothscale_backend(self): filter_type = pygame.transform.get_smoothscale_backend() self.assertTrue(filter_type in ["GENERIC", "MMX", "SSE"]) # It would be nice to test if a non-generic type corresponds to an x86 # processor. But there is no simple test for this. platform.machine() # returns process version specific information, like 'i686'. def test_set_smoothscale_backend(self): # All machines should allow 'GENERIC'. original_type = pygame.transform.get_smoothscale_backend() pygame.transform.set_smoothscale_backend("GENERIC") filter_type = pygame.transform.get_smoothscale_backend() self.assertEqual(filter_type, "GENERIC") # All machines should allow returning to original value. # Also check that keyword argument works. pygame.transform.set_smoothscale_backend(backend=original_type) # Something invalid. def change(): pygame.transform.set_smoothscale_backend("mmx") self.assertRaises(ValueError, change) # Invalid argument keyword. def change(): pygame.transform.set_smoothscale_backend(t="GENERIC") self.assertRaises(TypeError, change) # Invalid argument type. def change(): pygame.transform.set_smoothscale_backend(1) self.assertRaises(TypeError, change) # Unsupported type, if possible. if original_type != "SSE": def change(): pygame.transform.set_smoothscale_backend("SSE") self.assertRaises(ValueError, change) # Should be back where we started. filter_type = pygame.transform.get_smoothscale_backend() self.assertEqual(filter_type, original_type) def test_chop(self): original_surface = pygame.Surface((20, 20)) pygame.draw.rect(original_surface, (255, 0, 0), (0, 0, 10, 10)) pygame.draw.rect(original_surface, (0, 255, 0), (0, 10, 10, 10)) pygame.draw.rect(original_surface, (0, 0, 255), (10, 0, 10, 10)) pygame.draw.rect(original_surface, (255, 255, 0), (10, 10, 10, 10)) # Test chopping the corner of image rect = pygame.Rect(0, 0, 5, 15) test_surface = pygame.transform.chop(original_surface, rect) # Check the size of chopped image self.assertEqual(test_surface.get_size(), (15, 5)) # Check if the colors of the chopped image are correct for x in range(15): for y in range(5): if x < 5: self.assertEqual(test_surface.get_at((x, y)), (0, 255, 0)) else: self.assertEqual(test_surface.get_at((x, y)), (255, 255, 0)) # Check if the original image stayed the same self.assertEqual(original_surface.get_size(), (20, 20)) for x in range(20): for y in range(20): if x < 10 and y < 10: self.assertEqual(original_surface.get_at((x, y)), (255, 0, 0)) if x < 10 < y: self.assertEqual(original_surface.get_at((x, y)), (0, 255, 0)) if x > 10 > y: self.assertEqual(original_surface.get_at((x, y)), (0, 0, 255)) if x > 10 and y > 10: self.assertEqual(original_surface.get_at((x, y)), (255, 255, 0)) # Test chopping the center of the surface: rect = pygame.Rect(0, 0, 10, 10) rect.center = original_surface.get_rect().center # Also validate keyword arguments test_surface = pygame.transform.chop(surface=original_surface, rect=rect) self.assertEqual(test_surface.get_size(), (10, 10)) for x in range(10): for y in range(10): if x < 5 and y < 5: self.assertEqual(test_surface.get_at((x, y)), (255, 0, 0)) if x < 5 < y: self.assertEqual(test_surface.get_at((x, y)), (0, 255, 0)) if x > 5 > y: self.assertEqual(test_surface.get_at((x, y)), (0, 0, 255)) if x > 5 and y > 5: self.assertEqual(test_surface.get_at((x, y)), (255, 255, 0)) # Test chopping with the empty rect rect = pygame.Rect(10, 10, 0, 0) test_surface = pygame.transform.chop(original_surface, rect) self.assertEqual(test_surface.get_size(), (20, 20)) # Test chopping the entire surface rect = pygame.Rect(0, 0, 20, 20) test_surface = pygame.transform.chop(original_surface, rect) self.assertEqual(test_surface.get_size(), (0, 0)) # Test chopping outside of surface rect = pygame.Rect(5, 15, 20, 20) test_surface = pygame.transform.chop(original_surface, rect) self.assertEqual(test_surface.get_size(), (5, 15)) rect = pygame.Rect(400, 400, 10, 10) test_surface = pygame.transform.chop(original_surface, rect) self.assertEqual(test_surface.get_size(), (20, 20)) def test_rotozoom(self): # __doc__ (as of 2008-08-02) for pygame.transform.rotozoom: # pygame.transform.rotozoom(Surface, angle, scale): return Surface # filtered scale and rotation # # This is a combined scale and rotation transform. The resulting # Surface will be a filtered 32-bit Surface. The scale argument is a # floating point value that will be multiplied by the current # resolution. The angle argument is a floating point value that # represents the counterclockwise degrees to rotate. A negative # rotation angle will rotate clockwise. s = pygame.Surface((10, 0)) pygame.transform.scale(s, (10, 2)) s1 = pygame.transform.rotozoom(s, 30, 1) # Also validate keyword arguments s2 = pygame.transform.rotozoom(surface=s, angle=30, scale=1) self.assertEqual(s1.get_rect(), pygame.Rect(0, 0, 0, 0)) self.assertEqual(s2.get_rect(), pygame.Rect(0, 0, 0, 0)) def test_smoothscale(self): """Tests the stated boundaries, sizing, and color blending of smoothscale function""" # __doc__ (as of 2008-08-02) for pygame.transform.smoothscale: # pygame.transform.smoothscale(Surface, (width, height), DestSurface = # None): return Surface # # scale a surface to an arbitrary size smoothly # # Uses one of two different algorithms for scaling each dimension of # the input surface as required. For shrinkage, the output pixels are # area averages of the colors they cover. For expansion, a bilinear # filter is used. For the amd64 and i686 architectures, optimized MMX # routines are included and will run much faster than other machine # types. The size is a 2 number sequence for (width, height). This # function only works for 24-bit or 32-bit surfaces. An exception # will be thrown if the input surface bit depth is less than 24. # # New in pygame 1.8 # check stated exceptions def smoothscale_low_bpp(): starting_surface = pygame.Surface((20, 20), depth=12) smoothscaled_surface = pygame.transform.smoothscale( starting_surface, (10, 10) ) self.assertRaises(ValueError, smoothscale_low_bpp) def smoothscale_high_bpp(): starting_surface = pygame.Surface((20, 20), depth=48) smoothscaled_surface = pygame.transform.smoothscale( starting_surface, (10, 10) ) self.assertRaises(ValueError, smoothscale_high_bpp) def smoothscale_invalid_scale(): starting_surface = pygame.Surface((20, 20), depth=32) smoothscaled_surface = pygame.transform.smoothscale( starting_surface, (-1, -1) ) self.assertRaises(ValueError, smoothscale_invalid_scale) # Test Color Blending Scaling-Up two_pixel_surface = pygame.Surface((2, 1), depth=32) two_pixel_surface.fill(pygame.Color(0, 0, 0), pygame.Rect(0, 0, 1, 1)) two_pixel_surface.fill(pygame.Color(255, 255, 255), pygame.Rect(1, 0, 1, 1)) for k in [2**x for x in range(5, 8)]: # Enlarge to targets 32, 64...256 bigger_surface = pygame.transform.smoothscale(two_pixel_surface, (k, 1)) self.assertEqual( bigger_surface.get_at((k // 2, 0)), pygame.Color(127, 127, 127) ) self.assertEqual(bigger_surface.get_size(), (k, 1)) # Test Color Blending Scaling-Down two_five_six_surf = pygame.Surface((256, 1), depth=32) two_five_six_surf.fill(pygame.Color(0, 0, 0), pygame.Rect(0, 0, 128, 1)) two_five_six_surf.fill(pygame.Color(255, 255, 255), pygame.Rect(128, 0, 128, 1)) for k in range(3, 11, 2): # Shrink to targets 3, 5...11 pixels wide smaller_surface = pygame.transform.smoothscale(two_five_six_surf, (k, 1)) self.assertEqual( smaller_surface.get_at(((k // 2), 0)), pygame.Color(127, 127, 127) ) self.assertEqual(smaller_surface.get_size(), (k, 1)) class TransformDisplayModuleTest(unittest.TestCase): def setUp(self): pygame.display.init() pygame.display.set_mode((320, 200)) def tearDown(self): pygame.display.quit() def test_flip(self): """honors the set_color key on the returned surface from flip.""" image_loaded = pygame.image.load(example_path("data/chimp.png")) image = pygame.Surface(image_loaded.get_size(), 0, 32) image.blit(image_loaded, (0, 0)) image_converted = image_loaded.convert() self.assertFalse(image.get_flags() & pygame.SRCALPHA) self.assertFalse(image_converted.get_flags() & pygame.SRCALPHA) surf = pygame.Surface(image.get_size(), 0, 32) surf2 = pygame.Surface(image.get_size(), 0, 32) surf.fill((255, 255, 255)) surf2.fill((255, 255, 255)) colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, RLEACCEL) timage = pygame.transform.flip(image, 1, 0) colorkey = image_converted.get_at((0, 0)) image_converted.set_colorkey(colorkey, RLEACCEL) # Also validate keyword arguments timage_converted = pygame.transform.flip( surface=image_converted, flip_x=1, flip_y=0 ) # blit the flipped surface, and non flipped surface. surf.blit(timage, (0, 0)) surf2.blit(image, (0, 0)) # the results should be the same. self.assertEqual(surf.get_at((0, 0)), surf2.get_at((0, 0))) self.assertEqual(surf2.get_at((0, 0)), (255, 255, 255, 255)) # now we test the convert() ed image also works. surf.fill((255, 255, 255)) surf2.fill((255, 255, 255)) surf.blit(timage_converted, (0, 0)) surf2.blit(image_converted, (0, 0)) self.assertEqual(surf.get_at((0, 0)), surf2.get_at((0, 0))) def test_flip_alpha(self): """returns a surface with the same properties as the input.""" image_loaded = pygame.image.load(example_path("data/chimp.png")) image_alpha = pygame.Surface(image_loaded.get_size(), pygame.SRCALPHA, 32) image_alpha.blit(image_loaded, (0, 0)) surf = pygame.Surface(image_loaded.get_size(), 0, 32) surf2 = pygame.Surface(image_loaded.get_size(), 0, 32) colorkey = image_alpha.get_at((0, 0)) image_alpha.set_colorkey(colorkey, RLEACCEL) timage_alpha = pygame.transform.flip(image_alpha, 1, 0) self.assertTrue(image_alpha.get_flags() & pygame.SRCALPHA) self.assertTrue(timage_alpha.get_flags() & pygame.SRCALPHA) # now we test the alpha image works. surf.fill((255, 255, 255)) surf2.fill((255, 255, 255)) surf.blit(timage_alpha, (0, 0)) surf2.blit(image_alpha, (0, 0)) self.assertEqual(surf.get_at((0, 0)), surf2.get_at((0, 0))) self.assertEqual(surf2.get_at((0, 0)), (255, 0, 0, 255)) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.032112 pygame-2.6.1/test/version_test.py0000644000175100001770000000300014676242340016465 0ustar00runnerdockerimport os import unittest pg_header = os.path.join("src_c", "include", "_pygame.h") class VersionTest(unittest.TestCase): @unittest.skipIf( not os.path.isfile(pg_header), "Skipping because we cannot find _pygame.h" ) def test_pg_version_consistency(self): from pygame import version pgh_major = -1 pgh_minor = -1 pgh_patch = -1 import re major_exp_search = re.compile(r"define\s+PG_MAJOR_VERSION\s+([0-9]+)").search minor_exp_search = re.compile(r"define\s+PG_MINOR_VERSION\s+([0-9]+)").search patch_exp_search = re.compile(r"define\s+PG_PATCH_VERSION\s+([0-9]+)").search with open(pg_header) as f: for line in f: if pgh_major == -1: m = major_exp_search(line) if m: pgh_major = int(m.group(1)) if pgh_minor == -1: m = minor_exp_search(line) if m: pgh_minor = int(m.group(1)) if pgh_patch == -1: m = patch_exp_search(line) if m: pgh_patch = int(m.group(1)) self.assertEqual(pgh_major, version.vernum[0]) self.assertEqual(pgh_minor, version.vernum[1]) self.assertEqual(pgh_patch, version.vernum[2]) def test_sdl_version(self): from pygame import version self.assertEqual(len(version.SDL), 3) if __name__ == "__main__": unittest.main() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612128.032112 pygame-2.6.1/test/video_test.py0000644000175100001770000000126614676242340016122 0ustar00runnerdockerimport unittest import sys import pygame from pygame._sdl2 import video class VideoModuleTest(unittest.TestCase): default_caption = "pygame window" @unittest.skipIf( not (sys.maxsize > 2**32), "32 bit SDL 2.0.16 has an issue.", ) def test_renderer_set_viewport(self): """works.""" window = video.Window(title=self.default_caption, size=(800, 600)) renderer = video.Renderer(window=window) renderer.logical_size = (1920, 1080) rect = pygame.Rect(0, 0, 1920, 1080) renderer.set_viewport(rect) self.assertEqual(renderer.get_viewport(), (0, 0, 1920, 1080)) if __name__ == "__main__": unittest.main()

A+}Fc}Kq o[wbz{_H]wD'cbRc x$L9:R2Xy2H/!r4h5Uu-&}$x4J%vX\wH6L0 eXLO%7rg}D,ܯ{c)+&SȖvzJm֡ Xچ"A`24 y٤5Gq?58upsu8?^+&|'%y/ތu7IS w'ckYܺc"uF|E6-vx{VVv#6i|}rt5 do9H_ lFбT7VP8&(qp&1o*N`xU^VUNGZ ױ 38L{6Cjq8g0j>}>/ uq8'`T⃉G}٬rkF:t_l)<>&M='N}" C.:Hjˎ *8Nw]QJ+'WviƏSGyiĖ]F:n |[R:BHc]˅`4l_Q԰r}B+lo0sR8Ξ(T00{]"cCXtUp%{}IKb1Lp@HsVs8סs2pB:7 2IzI-%/⇫oPF˱tS4;Z}"SpRpsJV(tX&ނL{؄݇L87 Tڔtc%F4*Rw2!yPI!Z~ߜCJR`B%9$ܫOx1B%!iu9 4<3:KJ66cMq8}C`\;9wRepǣP$ Q})w-=' (J-!]ðh F#qb5f $H^])s>`f`[+OW?m /v` B\.(jV<,8CI@?<dAk%:l{Rjq8W04q%'`C"f2pzs߁0Uh(\!ð+}(FkRs@"nn'+ݞgm)@rbh BX>_ċk#'+PC);Sx])Qb 2OgkљmJRr,s8`hG\)ґ@@bHJTX8ɋo <\4*#۴`aR,r88]ʸIƄ{hN2I΍&#.6pb-RCJr֧"h$Rq5 R-,pW>u 5uYJOMA0;5aﻵR+VHfu`ha']aՉP''ںK`hRiD.߯͹' 6|\dIzNJ"'oI afmVvUNW'W2p8Na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@O'J› y$G26ތثXp$."8ms/v8xW3OsƠI"ƂƆa6V^8<_v6P3Hl_aqHEPҋ.+I|sAG`Utq9Ei;0ۂ~$={-H ~ $?XE\H2OVh%$:#_H]HgՄKI>')'1D6ɻ$=Q6̲Akg[gٳWt%Lxd}皣9S.:"Ig8KgW\Se|>$o&36)#?9Dz|8̷d5{$דB ~ 71ENbIugd.?6+r/5 'flV ton&d?"#>%B}1@\vvD<'I $C?|DZۄ$CA0`A5챐jw#|>{]I2D x3\p}}DK4i:B "9DFXN)8R !8a$qOnɲ"$n{I_7jƂ[󆛜s _H&rƁ.ɥX x#K88>gR"pI1o` uOAmMYϗCH*'vpOEc 51Л"m2 rK>m8rHs#I?kVn&FrIs5\Zf$ju:L"mJv&_ГsAI8l򆾁;7[BT~AlpeC/<7!yd!x6]ONdOIv.p g {oX:d0[ z#pb'. aG6tbIDAT*xƤ`¾q ?FƦrӯIxh~$B𚱂5Ka)#\FD쁛Er ;<4^um56vxtaw d96ÆHI2D"0Gr8g7<7^v6 xe%SG<hR_4; Gsa6m]b5׶VVch[T[UN2;Đ< H:9fr`y:mK3۳wbv,"$n\xw8B˼SeI  a k@~2&am%3.cR \e0I fk+)$F)I['BjQ9lHz9 ׹M&HqNCl$[/βa: u/$ܫk5Կ{$bu,$\eI86N"=¼v8~VEそ Ik+Kq'AAcetL p%cD܁I1V!lQ[|(6r}N6C;ա^A>gǵ:XX'؀ "H|~pk>s3\BթPo  BG"nRGptYxCiv K‡5nޑ0AlQ|nu8u@à5Bkg+G^ A ra|Jou$[eAAad R{]8,|>6ro;~?.Ӱjme5JD  {әu϶·b'D ^>m .  2d[$2gA*\i結  B{:sBpVUs&]njqn^eڊޞk#9AAAU&QvIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/es/_static/pygame_logo.svg0000644000175100001770000016357614676242340022407 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/es/_static/pygame_powered.png0000644000175100001770000053730714676242340023076 0ustar00runnerdockerPNG  IHDRQ ^{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace DIDATx^xoa6eL6effffefff& fٖ3 4V=3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""a=$y*Z1FE:VԴKXEPQ$ $N<*"QX"( xFE Y=ҝ!ɕ7Tb O}\"""""""""mWWHoF scHƌG7rhh.ڶQo>X?s1Q2ZOU IH"(1BDDDDDDDDD?嫸[Łzb#0vITH6$0zٝ vg'v6l^N<,^o?^ϕ;**zW]GxS&wND(=5{(P!*ĕ(DDDDDDDDDD}~*^Voy^ clFđDO T]}RCN[ڀ*S?l*b*d^ٴ Ac*X]3=&QmT|!nN@T6fs].)?fۀ=Y=ڍ*.Wђ]cC<4BDB*HB*sTȊ)&F1$ QQ7I'<4;9WEڐ܇NZ/k'mG[M7U ILV*U|+Qa짰1BDDDDDDDDD78U|blo Kd3,6IiCc=?>wԡ!Yƌpa<~LH͈Wθ {9NH2%)"?ڮa⓯eANGT3;I"""""""""/e s|0Cu=~'kL W*m.Lx yݭTzҝwީ{5;,qeA$Rڒf5/c ._U]@U_?vCcN )tbG(#Te;2]OXhNU9hy'ιz{R8K=pa(~TL N'U#Iyb 8[_}J\}*k 8spm&{C=SN9}90vD0ؒ0{I,Ft?{3^ViB%&k*i]b>1x_o 0LŏKT <0f$S#sOыX~Vz s{m16YO P_ X]qݙli ⛟ju?i@7>9(ON[yT͖-^7)]RjK9)[;,Y@)6';q1|_zk2L?zka(>R igR\kc<.sPYeT[qq<96[$FBY/p!9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^Z@H ,T y8 pJYVzNðE2K @P8 6sP _a!M SYBB迃0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_static/pygame_powered.svg0000644000175100001770000031064314676242340023101 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_static/pygame_powered_lowres.png0000644000175100001770000053730714676242340024471 0ustar00runnerdockerPNG  IHDRe(4} pHYs.#.#x?vIIDATh[[h\EfIf5mMe[RPQЇ(X/Rԇo/mQJQTФ^bm^6p?;g̹593\& pαa~HW&v6}Kf󣌟o$Oa(py 1.WJc0qq+7 Zq_ÚB13!3f/'*4kƘr=q55*%ՇųYhXwI(.mԹnʵ}7ϗtb+\ۇٙ_1% U/a{0f.4mc/W>`<2ٍE޴C(Yzx3Q3yP2,,ٗM;sQydE[doqaC.@qV 8 d@N8]wu%n`8I9[1VYnˍgQλ|cטz «ǘKe;BMU~%2]xt>;4-=^L !#I(TGf7@Dud)1_B_O[0G.okO?gk%~Mag4Qv\EzDGkA=n,jh3!܌SǀwWCl?* %%4m P&k P"2Z eːu!ee |bhhJ)lQ١WԱ3P&M8GZXv;=$A\qy?3 89EpJ_ ebIP;/#>CGIY܄mh?!e}N-6?x[b]f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x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_static/pygame_tiny.png0000644000175100001770000003571614676242340022411 0ustar00runnerdockerPNG  IHDR<BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs.!.![NiTXtXML:com.adobe.xmp Pygame Logo Trace {A4IDATx^|TU>ܹ{!@BRHQTPQDֲv׮ꢋETl(*""H*IHH/L=w& <={F45w\y>5YE8tmY`ghD#BELi\%$r_:^q8OtTnoe ,sF]KԖH&:S\5{fQny$* l*q)5H O3wKC%Ek9ZذJ.$р\ﵝ}Vۭ98F`5 xT;hcZ]y.6Cɱq@E{ pe+@ΊIsaB3 7{_hEmшt tfl],i{E]N4h>]|kG|Egш?(:Sw+nqJNѣň4̗80{`5 iyʀNM%8sb̙7o{9̞1¥1k,7G|ᶟ|u4 QV HpA3֪k׮5jsFej~a!\o8fֹsth̤Včâ/OxxΐkhKNbl[`М@x &jS`!Tv9v3`-[>r&B3 B?'X &^6iGiWR]_O-[(0[nk{,_ rM-2^EVTF&,9א-Q_[d0HM69.;_YHɸtWL  PNeba2Hƚt-$֊up@ L9J! azW(7@O2I7ݔKensIDPzYlޜ_.|$r4iXr/gH6c)(·CkΫh cA2" zt8"s8{6-2mT`>tny9h}p5&럊4à bע*1JOix΢ &ܱ6B|7c$pdlZ ~A3!χZ<^h'ۉk4 AՅ8KYٸU><m8F &jAD)Jko¤/D˚ U1RC':u }W, 2AOʉ681wpR>[feY 3e9kLL r0o<zhYkP\7 ť붹=|*gߒG{ )>2(65-3w??),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XEQ8mP6v+z)vbcY-~]jRnA^Q;|%ErSrOt%&0F1! {`p`=. Vz0%gx+jtVA)d<\0*/8:օmS3ʉ)MyP3z!GEy`*4-7  "bPѾwMyi@=KT~VJ`޻j} `Fg)eX9[!üBV|0^`l|G+w?a5_|./'٫Kﵻ p<D1d͵}[*ֿ p;3DZ$7סЖXV'ew:%éH nYZ$m]ŝ^;W=N z1@Gv ֑'4ӆ+5ߦ}y4Ƀ'@^؍w/"Cqcn'sp>OWmLG ׅy1GO;ɒڻ.JbMBb)Ym^=&1d #V-s:8&drAP E_F1)s<5&_oL Ǣ#e>1 2ؠ@5m &W%zd5)efp`m!8Շ#H!\>ݧ *q 0]رƊP݄c!~Ԟ4 U&-dsbe1xQGqub=_zŋ]k8]"#J?'` gsX#YUZ~)v`ߺQ|7F?)vm gwf$ʹB:-q -i}ǀ= hEBYQh:^mPA vvذ:l '@/fu73Zw%!(:DxRj3.@y i *Rjܮbr]/#ipI]v>' Eȏ3*~^ۙ\BnKQBy{)ԕuEzT#XCz;= 6 A:$E`ϳdQ?J惷ѭ e\Mm"Jje }U7+0|3A}r`0,TT"k12\?;o%&"}K(U Ψ!BG⩂ lU?8?x/TL0*Jj#.*=ڄP//J_>mZsAAyRgA(9ʂu@=:ֈQpb"yi3x7U?7<4-al{jf>;0%.F,X@U1DD+yw?/S.ݫ{P F|_ͯX &?{,ei8*EC=@yn(OL2a4=` Z~1P#rixj(~L>!/C@ɯDxɪo|S M -|B̹ZI57WԥGC!~# [_4u '?wO7'@Ļ#Ǽ4cqG/3.8*0oiHK>Iui".c}떸7syҗ'!ߚ'm/ (| GX+&_ս1?%ړ_,}}D!9vCϙR>_p?KLjަZy[ݼ { const [docname, title, anchor, descr, score, filename] = result return score }, */ // query matches the full name of an object objNameMatch: 11, // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object objPrio: { 0: 15, // used to be importantResults 1: 5, // used to be objectResults 2: -5, // used to be unimportantResults }, // Used when the priority is not in the mapping. objPrioDefault: 0, // query found in title title: 15, partialTitle: 7, // query found in terms term: 5, partialTerm: 2, }; } const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; /** * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping */ const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { // dirhtml builder let dirname = docName + "/"; if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; // highlight search terms in the description if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { if (data) listItem.appendChild( Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; const _finishSearch = (resultCount) => { Search.stopPulse(); Search.title.innerText = _("Search Results"); if (!resultCount) Search.status.innerText = Documentation.gettext( "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else Search.status.innerText = _( "Search finished, found ${resultCount} page(s) matching the search query." ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, resultCount, searchTerms, highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } // search finished, update title and status message else _finishSearch(resultCount); }; // Helper function used by query() to order search results. // Each input is an array of [docname, title, anchor, descr, score, filename]. // Order the results by score (in opposite order of appearance, since the // `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. const _orderResultsByScoreThenName = (a, b) => { const leftScore = a[4]; const rightScore = b[4]; if (leftScore === rightScore) { // same score: sort alphabetically const leftTitle = a[1].toLowerCase(); const rightTitle = b[1].toLowerCase(); if (leftTitle === rightTitle) return 0; return leftTitle > rightTitle ? -1 : 1; // inverted is intentional } return leftScore > rightScore ? 1 : -1; }; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a * custom function per language. * * The regular expression works by splitting the string on consecutive characters * that are not Unicode letters, numbers, underscores, or emoji characters. * This is the same as ``\W+`` in Python, preserving the surrogate pair area. */ if (typeof splitQuery === "undefined") { var splitQuery = (query) => query .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) .filter(term => term) // remove remaining empty strings } /** * Search Module */ const Search = { _index: null, _queued_query: null, _pulse_status: -1, htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); for (const removalQuery of [".headerlink", "script", "style"]) { htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); } if (anchor) { const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); if (anchorContent) return anchorContent.textContent; console.warn( `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` ); } // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); if (docContent) return docContent.textContent; console.warn( "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, init: () => { const query = new URLSearchParams(window.location.search).get("q"); document .querySelectorAll('input[name="q"]') .forEach((el) => (el.value = query)); if (query) Search.performSearch(query); }, loadIndex: (url) => (document.body.appendChild(document.createElement("script")).src = url), setIndex: (index) => { Search._index = index; if (Search._queued_query !== null) { const query = Search._queued_query; Search._queued_query = null; Search.query(query); } }, hasIndex: () => Search._index !== null, deferQuery: (query) => (Search._queued_query = query), stopPulse: () => (Search._pulse_status = -1), startPulse: () => { if (Search._pulse_status >= 0) return; const pulse = () => { Search._pulse_status = (Search._pulse_status + 1) % 4; Search.dots.innerText = ".".repeat(Search._pulse_status); if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); }; pulse(); }, /** * perform a search for something (or wait until index is loaded) */ performSearch: (query) => { // create the required interface elements const searchText = document.createElement("h2"); searchText.textContent = _("Searching"); const searchSummary = document.createElement("p"); searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); searchList.classList.add("search"); const out = document.getElementById("search-results"); Search.title = out.appendChild(searchText); Search.dots = Search.title.appendChild(document.createElement("span")); Search.status = out.appendChild(searchSummary); Search.output = out.appendChild(searchList); const searchProgress = document.getElementById("search-progress"); // Some themes don't use the search progress node if (searchProgress) { searchProgress.innerText = _("Preparing search..."); } Search.startPulse(); // index already loaded, the browser was quick! if (Search.hasIndex()) Search.query(query); else Search.deferQuery(query); }, _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); const excludedTerms = new Set(); const highlightTerms = new Set(); const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); splitQuery(query.trim()).forEach((queryTerm) => { const queryTermLower = queryTerm.toLowerCase(); // maybe skip this "word" // stopwords array is from language_data.js if ( stopwords.indexOf(queryTermLower) !== -1 || queryTerm.match(/^\d+$/) ) return; // stem the word let word = stemmer.stemWord(queryTermLower); // select the correct list if (word[0] === "-") excludedTerms.add(word.substr(1)); else { searchTerms.add(word); highlightTerms.add(queryTermLower); } }); if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) } // console.debug("SEARCH: searching for:"); // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; }, /** * execute search (requires search index to be loaded) */ _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { const filenames = Search._index.filenames; const docNames = Search._index.docnames; const titles = Search._index.titles; const allTitles = Search._index.alltitles; const indexEntries = Search._index.indexentries; // Collect multiple result groups to be sorted separately and then ordered. // Each is an array of [docname, title, anchor, descr, score, filename]. const normalResults = []; const nonMainIndexResults = []; _removeChildren(document.getElementById("search-progress")); const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { const score = Math.round(Scorer.title * queryLower.length / title.length); const boost = titles[file] === title ? 1 : 0; // add a boost for document titles normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, score + boost, filenames[file], ]); } } } // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { for (const [file, id, isMain] of foundEntries) { const score = Math.round(100 * queryLower.length / entry.length); const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], ]; if (isMain) { normalResults.push(result); } else { nonMainIndexResults.push(result); } } } } // lookup as object objectTerms.forEach((term) => normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function if (Scorer.score) { normalResults.forEach((item) => (item[4] = Scorer.score(item))); nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); } // Sort each group of results by score and then alphabetically by name. normalResults.sort(_orderResultsByScoreThenName); nonMainIndexResults.sort(_orderResultsByScoreThenName); // Combine the result groups in (reverse) order. // Non-main index entries are typically arbitrary cross-references, // so display them after other results. let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept let seen = new Set(); results = results.reverse().reduce((acc, result) => { let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); if (!seen.has(resultStr)) { acc.push(result); seen.add(resultStr); } return acc; }, []); return results.reverse(); }, query: (query) => { const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy // console.info("search results:", Search.lastresults); // print the results _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** * search for object names */ performObjectSearch: (object, objectTerms) => { const filenames = Search._index.filenames; const docNames = Search._index.docnames; const objects = Search._index.objects; const objNames = Search._index.objnames; const titles = Search._index.titles; const results = []; const objectSearchCallback = (prefix, match) => { const name = match[4] const fullname = (prefix ? prefix + "." : "") + name; const fullnameLower = fullname.toLowerCase(); if (fullnameLower.indexOf(object) < 0) return; let score = 0; const parts = fullnameLower.split("."); // check for different match types: exact matches of full name or // "last name" (i.e. last dotted part) if (fullnameLower === object || parts.slice(-1)[0] === object) score += Scorer.objNameMatch; else if (parts.slice(-1)[0].indexOf(object) > -1) score += Scorer.objPartialMatch; // matches in last name const objName = objNames[match[1]][2]; const title = titles[match[0]]; // If more than one term searched for, we require other words to be // found in the name/title/description const otherTerms = new Set(objectTerms); otherTerms.delete(object); if (otherTerms.size > 0) { const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); if ( [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) ) return; } let anchor = match[3]; if (anchor === "") anchor = fullname; else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; const descr = objName + _(", in ") + title; // add custom score for some objects according to scorer if (Scorer.objPrio.hasOwnProperty(match[2])) score += Scorer.objPrio[match[2]]; else score += Scorer.objPrioDefault; results.push([ docNames[match[0]], fullname, "#" + anchor, descr, score, filenames[match[0]], ]); }; Object.keys(objects).forEach((prefix) => objects[prefix].forEach((array) => objectSearchCallback(prefix, array) ) ); return results; }, /** * search for full-text terms in the index */ performTermsSearch: (searchTerms, excludedTerms) => { // prepare search const terms = Search._index.terms; const titleTerms = Search._index.titleterms; const filenames = Search._index.filenames; const docNames = Search._index.docnames; const titles = Search._index.titles; const scoreMap = new Map(); const fileMap = new Map(); // perform the search on the required terms searchTerms.forEach((word) => { const files = []; const arr = [ { files: terms[word], score: Scorer.term }, { files: titleTerms[word], score: Scorer.title }, ]; // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); if (!terms.hasOwnProperty(word)) { Object.keys(terms).forEach((term) => { if (term.match(escapedWord)) arr.push({ files: terms[term], score: Scorer.partialTerm }); }); } if (!titleTerms.hasOwnProperty(word)) { Object.keys(titleTerms).forEach((term) => { if (term.match(escapedWord)) arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); }); } } // no match but word was a required one if (arr.every((record) => record.files === undefined)) return; // found search word in contents arr.forEach((record) => { if (record.files === undefined) return; let recordFiles = record.files; if (recordFiles.length === undefined) recordFiles = [recordFiles]; files.push(...recordFiles); // set score for the word in each file recordFiles.forEach((file) => { if (!scoreMap.has(file)) scoreMap.set(file, {}); scoreMap.get(file)[word] = record.score; }); }); // create the mapping files.forEach((file) => { if (!fileMap.has(file)) fileMap.set(file, [word]); else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); // now check if the files don't contain excluded terms const results = []; for (const [file, wordList] of fileMap) { // check if all requirements are matched // as search terms with length < 3 are discarded const filteredTermCount = [...searchTerms].filter( (term) => term.length > 2 ).length; if ( wordList.length !== searchTerms.size && wordList.length !== filteredTermCount ) continue; // ensure that none of the excluded terms is in the search result if ( [...excludedTerms].some( (term) => terms[term] === file || titleTerms[term] === file || (terms[term] || []).includes(file) || (titleTerms[term] || []).includes(file) ) ) break; // select one (max) score for the file. const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); // add result to the result list results.push([ docNames[file], titles[file], "", null, score, filenames[file], ]); } return results; }, /** * helper function to return a node containing the * search summary for a given text. keywords is a list * of stemmed words. */ makeSearchSummary: (htmlText, keywords, anchor) => { const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); const actualStartPosition = [...keywords] .map((k) => textLower.indexOf(k.toLowerCase())) .filter((i) => i > -1) .slice(-1)[0]; const startWithContext = Math.max(actualStartPosition - 120, 0); const top = startWithContext === 0 ? "" : "..."; const tail = startWithContext + 240 < text.length ? "..." : ""; let summary = document.createElement("p"); summary.classList.add("context"); summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; return summary; }, }; _ready(Search.init); ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612170.008142 pygame-2.6.1/docs/generated/es/_static/spanish-stemmer.js0000644000175100001770000006756614676242412023043 0ustar00runnerdocker// Generated by Snowball 2.1.0 - https://snowballstem.org/ /**@constructor*/ SpanishStemmer = function() { var base = new BaseStemmer(); /** @const */ var a_0 = [ ["", -1, 6], ["\u00E1", 0, 1], ["\u00E9", 0, 2], ["\u00ED", 0, 3], ["\u00F3", 0, 4], ["\u00FA", 0, 5] ]; /** @const */ var a_1 = [ ["la", -1, -1], ["sela", 0, -1], ["le", -1, -1], ["me", -1, -1], ["se", -1, -1], ["lo", -1, -1], ["selo", 5, -1], ["las", -1, -1], ["selas", 7, -1], ["les", -1, -1], ["los", -1, -1], ["selos", 10, -1], ["nos", -1, -1] ]; /** @const */ var a_2 = [ ["ando", -1, 6], ["iendo", -1, 6], ["yendo", -1, 7], ["\u00E1ndo", -1, 2], ["i\u00E9ndo", -1, 1], ["ar", -1, 6], ["er", -1, 6], ["ir", -1, 6], ["\u00E1r", -1, 3], ["\u00E9r", -1, 4], ["\u00EDr", -1, 5] ]; /** @const */ var a_3 = [ ["ic", -1, -1], ["ad", -1, -1], ["os", -1, -1], ["iv", -1, 1] ]; /** @const */ var a_4 = [ ["able", -1, 1], ["ible", -1, 1], ["ante", -1, 1] ]; /** @const */ var a_5 = [ ["ic", -1, 1], ["abil", -1, 1], ["iv", -1, 1] ]; /** @const */ var a_6 = [ ["ica", -1, 1], ["ancia", -1, 2], ["encia", -1, 5], ["adora", -1, 2], ["osa", -1, 1], ["ista", -1, 1], ["iva", -1, 9], ["anza", -1, 1], ["log\u00EDa", -1, 3], ["idad", -1, 8], ["able", -1, 1], ["ible", -1, 1], ["ante", -1, 2], ["mente", -1, 7], ["amente", 13, 6], ["aci\u00F3n", -1, 2], ["uci\u00F3n", -1, 4], ["ico", -1, 1], ["ismo", -1, 1], ["oso", -1, 1], ["amiento", -1, 1], ["imiento", -1, 1], ["ivo", -1, 9], ["ador", -1, 2], ["icas", -1, 1], ["ancias", -1, 2], ["encias", -1, 5], ["adoras", -1, 2], ["osas", -1, 1], ["istas", -1, 1], ["ivas", -1, 9], ["anzas", -1, 1], ["log\u00EDas", -1, 3], ["idades", -1, 8], ["ables", -1, 1], ["ibles", -1, 1], ["aciones", -1, 2], ["uciones", -1, 4], ["adores", -1, 2], ["antes", -1, 2], ["icos", -1, 1], ["ismos", -1, 1], ["osos", -1, 1], ["amientos", -1, 1], ["imientos", -1, 1], ["ivos", -1, 9] ]; /** @const */ var a_7 = [ ["ya", -1, 1], ["ye", -1, 1], ["yan", -1, 1], ["yen", -1, 1], ["yeron", -1, 1], ["yendo", -1, 1], ["yo", -1, 1], ["yas", -1, 1], ["yes", -1, 1], ["yais", -1, 1], ["yamos", -1, 1], ["y\u00F3", -1, 1] ]; /** @const */ var a_8 = [ ["aba", -1, 2], ["ada", -1, 2], ["ida", -1, 2], ["ara", -1, 2], ["iera", -1, 2], ["\u00EDa", -1, 2], ["ar\u00EDa", 5, 2], ["er\u00EDa", 5, 2], ["ir\u00EDa", 5, 2], ["ad", -1, 2], ["ed", -1, 2], ["id", -1, 2], ["ase", -1, 2], ["iese", -1, 2], ["aste", -1, 2], ["iste", -1, 2], ["an", -1, 2], ["aban", 16, 2], ["aran", 16, 2], ["ieran", 16, 2], ["\u00EDan", 16, 2], ["ar\u00EDan", 20, 2], ["er\u00EDan", 20, 2], ["ir\u00EDan", 20, 2], ["en", -1, 1], ["asen", 24, 2], ["iesen", 24, 2], ["aron", -1, 2], ["ieron", -1, 2], ["ar\u00E1n", -1, 2], ["er\u00E1n", -1, 2], ["ir\u00E1n", -1, 2], ["ado", -1, 2], ["ido", -1, 2], ["ando", -1, 2], ["iendo", -1, 2], ["ar", -1, 2], ["er", -1, 2], ["ir", -1, 2], ["as", -1, 2], ["abas", 39, 2], ["adas", 39, 2], ["idas", 39, 2], ["aras", 39, 2], ["ieras", 39, 2], ["\u00EDas", 39, 2], ["ar\u00EDas", 45, 2], ["er\u00EDas", 45, 2], ["ir\u00EDas", 45, 2], ["es", -1, 1], ["ases", 49, 2], ["ieses", 49, 2], ["abais", -1, 2], ["arais", -1, 2], ["ierais", -1, 2], ["\u00EDais", -1, 2], ["ar\u00EDais", 55, 2], ["er\u00EDais", 55, 2], ["ir\u00EDais", 55, 2], ["aseis", -1, 2], ["ieseis", -1, 2], ["asteis", -1, 2], ["isteis", -1, 2], ["\u00E1is", -1, 2], ["\u00E9is", -1, 1], ["ar\u00E9is", 64, 2], ["er\u00E9is", 64, 2], ["ir\u00E9is", 64, 2], ["ados", -1, 2], ["idos", -1, 2], ["amos", -1, 2], ["\u00E1bamos", 70, 2], ["\u00E1ramos", 70, 2], ["i\u00E9ramos", 70, 2], ["\u00EDamos", 70, 2], ["ar\u00EDamos", 74, 2], ["er\u00EDamos", 74, 2], ["ir\u00EDamos", 74, 2], ["emos", -1, 1], ["aremos", 78, 2], ["eremos", 78, 2], ["iremos", 78, 2], ["\u00E1semos", 78, 2], ["i\u00E9semos", 78, 2], ["imos", -1, 2], ["ar\u00E1s", -1, 2], ["er\u00E1s", -1, 2], ["ir\u00E1s", -1, 2], ["\u00EDs", -1, 2], ["ar\u00E1", -1, 2], ["er\u00E1", -1, 2], ["ir\u00E1", -1, 2], ["ar\u00E9", -1, 2], ["er\u00E9", -1, 2], ["ir\u00E9", -1, 2], ["i\u00F3", -1, 2] ]; /** @const */ var a_9 = [ ["a", -1, 1], ["e", -1, 2], ["o", -1, 1], ["os", -1, 1], ["\u00E1", -1, 1], ["\u00E9", -1, 2], ["\u00ED", -1, 1], ["\u00F3", -1, 1] ]; /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10]; var /** number */ I_p2 = 0; var /** number */ I_p1 = 0; var /** number */ I_pV = 0; /** @return {boolean} */ function r_mark_regions() { I_pV = base.limit; I_p1 = base.limit; I_p2 = base.limit; var /** number */ v_1 = base.cursor; lab0: { lab1: { var /** number */ v_2 = base.cursor; lab2: { if (!(base.in_grouping(g_v, 97, 252))) { break lab2; } lab3: { var /** number */ v_3 = base.cursor; lab4: { if (!(base.out_grouping(g_v, 97, 252))) { break lab4; } golab5: while(true) { lab6: { if (!(base.in_grouping(g_v, 97, 252))) { break lab6; } break golab5; } if (base.cursor >= base.limit) { break lab4; } base.cursor++; } break lab3; } base.cursor = v_3; if (!(base.in_grouping(g_v, 97, 252))) { break lab2; } golab7: while(true) { lab8: { if (!(base.out_grouping(g_v, 97, 252))) { break lab8; } break golab7; } if (base.cursor >= base.limit) { break lab2; } base.cursor++; } } break lab1; } base.cursor = v_2; if (!(base.out_grouping(g_v, 97, 252))) { break lab0; } lab9: { var /** number */ v_6 = base.cursor; lab10: { if (!(base.out_grouping(g_v, 97, 252))) { break lab10; } golab11: while(true) { lab12: { if (!(base.in_grouping(g_v, 97, 252))) { break lab12; } break golab11; } if (base.cursor >= base.limit) { break lab10; } base.cursor++; } break lab9; } base.cursor = v_6; if (!(base.in_grouping(g_v, 97, 252))) { break lab0; } if (base.cursor >= base.limit) { break lab0; } base.cursor++; } } I_pV = base.cursor; } base.cursor = v_1; var /** number */ v_8 = base.cursor; lab13: { golab14: while(true) { lab15: { if (!(base.in_grouping(g_v, 97, 252))) { break lab15; } break golab14; } if (base.cursor >= base.limit) { break lab13; } base.cursor++; } golab16: while(true) { lab17: { if (!(base.out_grouping(g_v, 97, 252))) { break lab17; } break golab16; } if (base.cursor >= base.limit) { break lab13; } base.cursor++; } I_p1 = base.cursor; golab18: while(true) { lab19: { if (!(base.in_grouping(g_v, 97, 252))) { break lab19; } break golab18; } if (base.cursor >= base.limit) { break lab13; } base.cursor++; } golab20: while(true) { lab21: { if (!(base.out_grouping(g_v, 97, 252))) { break lab21; } break golab20; } if (base.cursor >= base.limit) { break lab13; } base.cursor++; } I_p2 = base.cursor; } base.cursor = v_8; return true; }; /** @return {boolean} */ function r_postlude() { var /** number */ among_var; while(true) { var /** number */ v_1 = base.cursor; lab0: { base.bra = base.cursor; among_var = base.find_among(a_0); if (among_var == 0) { break lab0; } base.ket = base.cursor; switch (among_var) { case 1: if (!base.slice_from("a")) { return false; } break; case 2: if (!base.slice_from("e")) { return false; } break; case 3: if (!base.slice_from("i")) { return false; } break; case 4: if (!base.slice_from("o")) { return false; } break; case 5: if (!base.slice_from("u")) { return false; } break; case 6: if (base.cursor >= base.limit) { break lab0; } base.cursor++; break; } continue; } base.cursor = v_1; break; } return true; }; /** @return {boolean} */ function r_RV() { if (!(I_pV <= base.cursor)) { return false; } return true; }; /** @return {boolean} */ function r_R1() { if (!(I_p1 <= base.cursor)) { return false; } return true; }; /** @return {boolean} */ function r_R2() { if (!(I_p2 <= base.cursor)) { return false; } return true; }; /** @return {boolean} */ function r_attached_pronoun() { var /** number */ among_var; base.ket = base.cursor; if (base.find_among_b(a_1) == 0) { return false; } base.bra = base.cursor; among_var = base.find_among_b(a_2); if (among_var == 0) { return false; } if (!r_RV()) { return false; } switch (among_var) { case 1: base.bra = base.cursor; if (!base.slice_from("iendo")) { return false; } break; case 2: base.bra = base.cursor; if (!base.slice_from("ando")) { return false; } break; case 3: base.bra = base.cursor; if (!base.slice_from("ar")) { return false; } break; case 4: base.bra = base.cursor; if (!base.slice_from("er")) { return false; } break; case 5: base.bra = base.cursor; if (!base.slice_from("ir")) { return false; } break; case 6: if (!base.slice_del()) { return false; } break; case 7: if (!(base.eq_s_b("u"))) { return false; } if (!base.slice_del()) { return false; } break; } return true; }; /** @return {boolean} */ function r_standard_suffix() { var /** number */ among_var; base.ket = base.cursor; among_var = base.find_among_b(a_6); if (among_var == 0) { return false; } base.bra = base.cursor; switch (among_var) { case 1: if (!r_R2()) { return false; } if (!base.slice_del()) { return false; } break; case 2: if (!r_R2()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_1 = base.limit - base.cursor; lab0: { base.ket = base.cursor; if (!(base.eq_s_b("ic"))) { base.cursor = base.limit - v_1; break lab0; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_1; break lab0; } if (!base.slice_del()) { return false; } } break; case 3: if (!r_R2()) { return false; } if (!base.slice_from("log")) { return false; } break; case 4: if (!r_R2()) { return false; } if (!base.slice_from("u")) { return false; } break; case 5: if (!r_R2()) { return false; } if (!base.slice_from("ente")) { return false; } break; case 6: if (!r_R1()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_2 = base.limit - base.cursor; lab1: { base.ket = base.cursor; among_var = base.find_among_b(a_3); if (among_var == 0) { base.cursor = base.limit - v_2; break lab1; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_2; break lab1; } if (!base.slice_del()) { return false; } switch (among_var) { case 1: base.ket = base.cursor; if (!(base.eq_s_b("at"))) { base.cursor = base.limit - v_2; break lab1; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_2; break lab1; } if (!base.slice_del()) { return false; } break; } } break; case 7: if (!r_R2()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_3 = base.limit - base.cursor; lab2: { base.ket = base.cursor; if (base.find_among_b(a_4) == 0) { base.cursor = base.limit - v_3; break lab2; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_3; break lab2; } if (!base.slice_del()) { return false; } } break; case 8: if (!r_R2()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_4 = base.limit - base.cursor; lab3: { base.ket = base.cursor; if (base.find_among_b(a_5) == 0) { base.cursor = base.limit - v_4; break lab3; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_4; break lab3; } if (!base.slice_del()) { return false; } } break; case 9: if (!r_R2()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_5 = base.limit - base.cursor; lab4: { base.ket = base.cursor; if (!(base.eq_s_b("at"))) { base.cursor = base.limit - v_5; break lab4; } base.bra = base.cursor; if (!r_R2()) { base.cursor = base.limit - v_5; break lab4; } if (!base.slice_del()) { return false; } } break; } return true; }; /** @return {boolean} */ function r_y_verb_suffix() { if (base.cursor < I_pV) { return false; } var /** number */ v_2 = base.limit_backward; base.limit_backward = I_pV; base.ket = base.cursor; if (base.find_among_b(a_7) == 0) { base.limit_backward = v_2; return false; } base.bra = base.cursor; base.limit_backward = v_2; if (!(base.eq_s_b("u"))) { return false; } if (!base.slice_del()) { return false; } return true; }; /** @return {boolean} */ function r_verb_suffix() { var /** number */ among_var; if (base.cursor < I_pV) { return false; } var /** number */ v_2 = base.limit_backward; base.limit_backward = I_pV; base.ket = base.cursor; among_var = base.find_among_b(a_8); if (among_var == 0) { base.limit_backward = v_2; return false; } base.bra = base.cursor; base.limit_backward = v_2; switch (among_var) { case 1: var /** number */ v_3 = base.limit - base.cursor; lab0: { if (!(base.eq_s_b("u"))) { base.cursor = base.limit - v_3; break lab0; } var /** number */ v_4 = base.limit - base.cursor; if (!(base.eq_s_b("g"))) { base.cursor = base.limit - v_3; break lab0; } base.cursor = base.limit - v_4; } base.bra = base.cursor; if (!base.slice_del()) { return false; } break; case 2: if (!base.slice_del()) { return false; } break; } return true; }; /** @return {boolean} */ function r_residual_suffix() { var /** number */ among_var; base.ket = base.cursor; among_var = base.find_among_b(a_9); if (among_var == 0) { return false; } base.bra = base.cursor; switch (among_var) { case 1: if (!r_RV()) { return false; } if (!base.slice_del()) { return false; } break; case 2: if (!r_RV()) { return false; } if (!base.slice_del()) { return false; } var /** number */ v_1 = base.limit - base.cursor; lab0: { base.ket = base.cursor; if (!(base.eq_s_b("u"))) { base.cursor = base.limit - v_1; break lab0; } base.bra = base.cursor; var /** number */ v_2 = base.limit - base.cursor; if (!(base.eq_s_b("g"))) { base.cursor = base.limit - v_1; break lab0; } base.cursor = base.limit - v_2; if (!r_RV()) { base.cursor = base.limit - v_1; break lab0; } if (!base.slice_del()) { return false; } } break; } return true; }; this.stem = /** @return {boolean} */ function() { r_mark_regions(); base.limit_backward = base.cursor; base.cursor = base.limit; var /** number */ v_2 = base.limit - base.cursor; r_attached_pronoun(); base.cursor = base.limit - v_2; var /** number */ v_3 = base.limit - base.cursor; lab0: { lab1: { var /** number */ v_4 = base.limit - base.cursor; lab2: { if (!r_standard_suffix()) { break lab2; } break lab1; } base.cursor = base.limit - v_4; lab3: { if (!r_y_verb_suffix()) { break lab3; } break lab1; } base.cursor = base.limit - v_4; if (!r_verb_suffix()) { break lab0; } } } base.cursor = base.limit - v_3; var /** number */ v_5 = base.limit - base.cursor; r_residual_suffix(); base.cursor = base.limit - v_5; base.cursor = base.limit_backward; var /** number */ v_6 = base.cursor; r_postlude(); base.cursor = v_6; return true; }; /**@return{string}*/ this['stemWord'] = function(/**string*/word) { base.setCurrent(word); this.stem(); return base.getCurrent(); }; }; ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/es/_static/sphinx_highlight.js0000644000175100001770000001200314676242412023234 0ustar00runnerdocker/* Highlighting utilities for Sphinx HTML documentation. */ "use strict"; const SPHINX_HIGHLIGHT_ENABLED = true /** * highlight a given string on a node by wrapping it in * span elements with the given class name. */ const _highlight = (node, addItems, text, className) => { if (node.nodeType === Node.TEXT_NODE) { const val = node.nodeValue; const parent = node.parentNode; const pos = val.toLowerCase().indexOf(text); if ( pos >= 0 && !parent.classList.contains(className) && !parent.classList.contains("nohighlight") ) { let span; const closestNode = parent.closest("body, svg, foreignObject"); const isInSVG = closestNode && closestNode.matches("svg"); if (isInSVG) { span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); } else { span = document.createElement("span"); span.classList.add(className); } span.appendChild(document.createTextNode(val.substr(pos, text.length))); const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); /* There may be more occurrences of search term in this node. So call this * function recursively on the remaining fragment. */ _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( "http://www.w3.org/2000/svg", "rect" ); const bbox = parent.getBBox(); rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute("class", className); addItems.push({ parent: parent, target: rect }); } } } else if (node.matches && !node.matches("button, select, textarea")) { node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); } }; const _highlightText = (thisNode, text, className) => { let addItems = []; _highlight(thisNode, addItems, text, className); addItems.forEach((obj) => obj.parent.insertAdjacentElement("beforebegin", obj.target) ); }; /** * Small JavaScript module for the documentation. */ const SphinxHighlight = { /** * highlight the search words provided in localstorage in the text */ highlightSearchWords: () => { if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight // get and clear terms from localstorage const url = new URL(window.location); const highlight = localStorage.getItem("sphinx_highlight_terms") || url.searchParams.get("highlight") || ""; localStorage.removeItem("sphinx_highlight_terms") url.searchParams.delete("highlight"); window.history.replaceState({}, "", url); // get individual terms from highlight string const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); if (terms.length === 0) return; // nothing to do // There should never be more than one element matching "div.body" const divBody = document.querySelectorAll("div.body"); const body = divBody.length ? divBody[0] : document.querySelector("body"); window.setTimeout(() => { terms.forEach((term) => _highlightText(body, term, "highlighted")); }, 10); const searchBox = document.getElementById("searchbox"); if (searchBox === null) return; searchBox.appendChild( document .createRange() .createContextualFragment( '

A+}Fc}Kq o[wbz{_H]wD'cbRc x$L9:R2Xy2H/!r4h5Uu-&}$x4J%vX\wH6L0 eXLO%7rg}D,ܯ{c)+&SȖvzJm֡ Xچ"A`24 y٤5Gq?58upsu8?^+&|'%y/ތu7IS w'ckYܺc"uF|E6-vx{VVv#6i|}rt5 do9H_ lFбT7VP8&(qp&1o*N`xU^VUNGZ ױ 38L{6Cjq8g0j>}>/ uq8'`T⃉G}٬rkF:t_l)<>&M='N}" C.:Hjˎ *8Nw]QJ+'WviƏSGyiĖ]F:n |[R:BHc]˅`4l_Q԰r}B+lo0sR8Ξ(T00{]"cCXtUp%{}IKb1Lp@HsVs8סs2pB:7 2IzI-%/⇫oPF˱tS4;Z}"SpRpsJV(tX&ނL{؄݇L87 Tڔtc%F4*Rw2!yPI!Z~ߜCJR`B%9$ܫOx1B%!iu9 4<3:KJ66cMq8}C`\;9wRepǣP$ Q})w-=' (J-!]ðh F#qb5f $H^])s>`f`[+OW?m /v` B\.(jV<,8CI@?<dAk%:l{Rjq8W04q%'`C"f2pzs߁0Uh(\!ð+}(FkRs@"nn'+ݞgm)@rbh BX>_ċk#'+PC);Sx])Qb 2OgkљmJRr,s8`hG\)ґ@@bHJTX8ɋo <\4*#۴`aR,r88]ʸIƄ{hN2I΍&#.6pb-RCJr֧"h$Rq5 R-,pW>u 5uYJOMA0;5aﻵR+VHfu`ha']aՉP''ںK`hRiD.߯͹' 6|\dIzNJ"'oI afmVvUNW'W2p8NaҙQk JoG'*xRhGB[mD>|Pn9^6 54qcCW22J7Ǜ!߀MvؤM~ 8'8:k.-WyC_'Id4BnFTDGo|n䡒\  R8&7֙t@{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$?XE\H2OVh%$:#_H]HgՄKI>')'1D6ɻ$=Q6̲Akg[gٳWt%Lxd}皣9S.:"Ig8KgW\Se|>$o&36)#?9Dz|8̷d5{$דB ~ 71ENbIugd.?6+r/5 'flV ton&d?"#>%B}1@\vvD<'I $C?|DZۄ$CA0`A5챐jw#|>{]I2D x3\p}}DK4i:B "9DFXN)8R !8a$qOnɲ"$n{I_7jƂ[󆛜s _H&rƁ.ɥX x#K88>gR"pI1o` uOAmMYϗCH*'vpOEc 51Л"m2 rK>m8rHs#I?kVn&FrIs5\Zf$ju:L"mJv&_ГsAI8l򆾁;7[BT~AlpeC/<7!yd!x6]ONdOIv.p g {oX:d0[ z#pb'. aG6tbIDAT*xƤ`¾q ?FƦrӯIxh~$B𚱂5Ka)#\FD쁛Er ;<4^um56vxtaw d96ÆHI2D"0Gr8g7<7^v6 xe%SG<hR_4; Gsa6m]b5׶VVch[T[UN2;Đ< H:9fr`y:mK3۳wbv,"$n\xw8B˼SeI  a k@~2&am%3.cR \e0I fk+)$F)I['BjQ9lHz9 ׹M&HqNCl$[/βa: u/$ܫk5Կ{$bu,$\eI86N"=¼v8~VEそ Ik+Kq'AAcetL p%cD܁I1V!lQ[|(6r}N6C;ա^A>gǵ:XX'؀ "H|~pk>s3\BթPo  BG"nRGptYxCiv K‡5nޑ0AlQ|nu8u@à5Bkg+G^ A ra|Jou$[eAAad R{]8,|>6ro;~?.Ӱjme5JD  {әu϶·b'D ^>m .  2d[$2gA*\i結  B{:sBpVUs&]njqn^eڊޞk#9AAAU&QvIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/es/_images/pygame_powered.png0000644000175100001770000053730714676242340023054 0ustar00runnerdockerPNG  IHDRQ ^{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace DIDATx^xoa6eL6effffefff& fٖ3 4V=3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""a=$y*Z1FE:VԴKXEPQ$ $N<*"QX"( xFE Y=ҝ!ɕ7Tb O}\"""""""""mWWHoF scHƌG7rhh.ڶQo>X?s1Q2ZOU IH"(1BDDDDDDDDD?嫸[Łzb#0vITH6$0zٝ vg'v6l^N<,^o?^ϕ;**zW]GxS&wND(=5{(P!*ĕ(DDDDDDDDDD}~*^Voy^ clFđDO T]}RCN[ڀ*S?l*b*d^ٴ Ac*X]3=&QmT|!nN@T6fs].)?fۀ=Y=ڍ*.Wђ]cC<4BDB*HB*sTȊ)&F1$ QQ7I'<4;9WEڐ܇NZ/k'mG[M7U ILV*U|+Qa짰1BDDDDDDDDD78U|blo Kd3,6IiCc=?>wԡ!Yƌpa<~LH͈Wθ {9NH2%)"?ڮa⓯eANGT3;I"""""""""/e s|0Cu=~'kL W*m.Lx yݭTzҝwީ{5;,qeA$Rڒf5/c ._U]@U_?vCcN )tbG(#Te;2]OXhNU9hy'ιz{R8K=pa(~TL N'U#Iyb 8[_}J\}*k 8spm&{C=SN9}90vD0ؒ0{I,Ft?{3^ViB%&k*i]b>1x_o 0LŏKT <0f$S#sOыX~Vz s{m16YO P_ X]qݙli ⛟ju?i@7>9(ON[yT͖-^7)]RjK9)[;,Y@)6';q1|_zk2L?zka(>R igR\kc<.sPYeT[qq<96[$FBY/p!9a$/E}u=gJFBrhc*n/e±΄l?գ*ӷLFK$Ls:&ROvX|K 56L{`"XOE)(DDDDDDDDDD*v4/vz씬@qS!-j+{D 뮻.-2Wuu<6[;c俫{ʅ6V[[ѱٜHL꓿g7CA8>OGGq+ NS,Ů1~&vRPz8ȏwU%-TjI"""""""""7M2HH00\$ۻ^p{>\ H#c]g^п6n8HM5,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Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_images/pygame_powered_lowres.png0000644000175100001770000053730714676242340024447 0ustar00runnerdockerPNG  IHDRe(4} pHYs.#.#x?vIIDATh[[h\EfIf5mMe[RPQЇ(X/Rԇo/mQJQTФ^bm^6p?;g̹593\& pαa~HW&v6}Kf󣌟o$Oa(py 1.WJc0qq+7 Zq_ÚB13!3f/'*4kƘr=q55*%ՇųYhXwI(.mԹnʵ}7ϗtb+\ۇٙ_1% U/a{0f.4mc/W>`<2ٍE޴C(Yzx3Q3yP2,,ٗM;sQydE[doqaC.@qV 8 d@N8]wu%n`8I9[1VYnˍgQλ|cטz «ǘKe;BMU~%2]xt>;4-=^L !#I(TGf7@Dud)1_B_O[0G.okO?gk%~Mag4Qv\EzDGkA=n,jh3!܌SǀwWCl?* %%4m P&k P"2Z eːu!ee |bhhJ)lQ١WԱ3P&M8GZXv;=$A\qy?3 89EpJ_ ebIP;/#>CGIY܄mh?!e}N-6?x[b]f &5AʾZm|kE^W<*)0^I|~|1-!H$2qKB/P\^lsȞ>8V>voO>%hji4=izFs^λ-uH骦Z=>6GD&]#%H2}>cc6 sCUxGTsCdUJfN6!NLŘ|`ݵQo.p)T(bi2y`@p;%/**;v9lNIxZu`@"ghʨa*щAqJ2+m /<¬Uve2+pdGʷVjT{TGT|q ?U {YAOSx3 qUl7t s{ܦ-7:n¯W3\g 8mT `+]/u iVRܔZe?p;>/:-үn'}O]sԲ_-~`Yob+ƹ\%Ҕ]ฦ>q@nLtʍ9åyp~G!T#r!*ӕe"X vg'v6l^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,@I{" }uq{ +пGa͂{ sXXp0 F@OdM}ړ5Rcki,AAAJ +RXOY5*106͌ͭ@C$C-,D<2Zm5Bl:K ,hc],>kcv εH vgAw#8QO X(>װFAA!,*X&mB[XT)4U tÚɊwЀ"q+D!,Pg@M$ G(p3>(zB@G&k$ 8EgeE Y>X!$eIY >^SAA  qL:MFcY8\9 庤FnpHAi@R=-cMbYd> YEPʲ (#F Kr$j"Vk55wˌyq?aIVJ^F,3*GAAPhCeY+2V(ib%oX>H4Ћ׎Հcz0"}eDsYiϠ$V3+﷊`FF3| EzdWdkOG  +V i,i Kþ-@Y}|ʋC4F@_$/YV/Y>hdBHRX@׮*g҃X"Z0OY@WjXz+\-g   ƒd  @ZX m@C$Іx.XF;ogv,:1S},dZ5PM|BD/ OJYVXA;X  pe#g,Apݠv踋F&)`ى#Ybh '3*HP&u Y VCg静62=3bG= =DeYpa }D eRNAAfƂc Ʊ3=Vc/ _(ݢwhcV%_u.fY5\+Xf~x3g208oF[S7e7u +wuˮa[,AAA*GMP.Rn8ǰd92e^Z@H ,T y8 pJYVzNðE2K @P8 6sP _a!M SYBB迃0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/es/_images/pygame_tiny.png0000644000175100001770000003571614676242340022367 0ustar00runnerdockerP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*u׽-ض~<iJ)$`0TPhJ4pSL0i<ϳ|@P4g \ǝk=q]l:̆ȅX4R}޹wΝۗ^|ڵ4"RMV.x3+4Cd2A8RyF&ksd[8><<̓4XVB, F3OCb,jn1*z'~'m3rNiH+,kڮr]F4G&RJiǩe]U}45@QN,O1(b0Af"XUrٗ ~qrqkWF+IbIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/es/_images/surfarray_redimg.png0000644000175100001770000005562314676242340023406 0ustar00runnerdockerPNG  IHDR1 IDATxYeu;YY4,a  a U4m؇y0EPC [Ї;p `6t}g_߄ mL.{\ SS kcpKPAjX5X!C |}5eO=x':ϗaZ8m a<{܇ya 'kaٛaz0>܃=hA'`O`ϕ]EX.v`h`LX2kЇgY o4p0Czaz k.܀؆!w -_#A:copt]hЁp˻40 І6TKk 65P tX,–1t 5`ڰ<l;/CaV}6]lA 0Hzx9l6AFP0` Fp 6tafaa> -؀P 9Xu؁]B#ggMx_`JRI _+Z}8O`N Y؄_pqXKYN* Kp aaUAHf`O8 Pl .\gaV]x{І;pZkaC؆eXs48鋗:euPuڇ6܃L 29-mߝM栫fi;;Coс>-vy9UY8 ' \/i8 Կ65alD頋߁|>-7ǹQ,,,Ie8wྋw Ѕ>L; C~>.+p\Q`0 ЁPA_S#8=: gaaYSІ.,AG?8 dGa; pQA [:]U?yYz0_<۰2 Ü_Y]`-م]؃9Xc L똺]"[fJ\rQ+PX?tN5_2M\G,Qk2,úҳZ\)@4zvd1-W sjg!l> Z6` >A 9ٓ]5;`SagԠ+"%xLl;J"Pi 5}i?~5G߂/3\Ŷ3ʺ?xU"M9X؀'ҧz"M+0pL Pg9#Y%sU'$І%!<-x̪[0 ?ξTT58 `dfT¾)3.R #x 0vtI]n2a)%p~z['2B1K0/*kO%4R+ ^hdv"40 ;7n%3ZOQeUUa^oA8F񯴑w #&ߗVY]Q0oh( |L/ 8ڎ+[-X+Ua_kEI-@hzZ%|IR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(^'G ]vׯYz MgM(#@ˆ&3CVO4OωZڻgC{G4})IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/es/_images/surfarray_scaledown.png0000644000175100001770000003540514676242340024112 0ustar00runnerdockerPNG  IHDRd@cE# IDATxDWy.|?kަkF4꒛{mlSCO$81! &mqlY-Y}﷮ 8<"`{cCQy X uOMgK?T3#gN^rCλǿ쭟!W,sk܊$k< X&Q;T?w7|?r,IOX[}wS?n7W[VI>N%eEQfıGz:&fà93?ŸEଡv`榖\bY#33TOOG.WjA-E&:L|V ڍҜ`s;XmyI~G 7)+,[|nj~uëP5?h pϽӥBK P* |_jMy텻_xđdE_oըGڱ4[C뺓߈_˫səI nL1 &tyֳ;3{+)1*YgR=~L"g| Sw&ٶc(;2=]v^9S-`l+4Hh=ftޫ5ZHk]rYooFu~˦Jcdtqu-, f[bRk-+W+v% z${/nm.8C!ĘadEZ5MeS/{Q(;f~u3dUPGMޓOѧ=w/utQ:"pܤ>=42~v~n ʉS"ߗ1ʉV2 $1ΔM5Z-2Eip̉uk{{ 2LEѹw+YC-CYFv|aq:Y&g'':r A3m'VC.X=7?ŔvNp"ƈ(ZW2^mNn1Dh7r S--~ŴP򭳧DvtjZw /\ =:^&4:\n`Ѳz}j!Yذ}N$` 詑F:,OICqMϞo~nZ۩QkZݛSSB9cf\0^k/)V#t+es+-ŗ8JV>=9ZLT6\j8 2ndM2nD~lk/=hU8gnad4gqF#^m'fTۻ#:X{~ +) FG\좋Ƽy/0aL@AynVfI +iJHz`L1&`붬Rt6ϯ/&݌XRo'Rwڭj~pxG̻I\&{-K~-뺙Ċo|ڕuf*a;`qOƳ3MVL]mz[`[ FV*85"-Y9reeo|;(z\P(MטfffԎKf @,@<ܻ`S*zQEox:4پ rdV)vNkߏhbbNK4sc]}oh/N%uI-sbkt\6S`h+$q\3޵젼u 2q;KpA~+cuߙuP i`ê 2|vo6WU*Oϧ,OO=lJۀtVI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="i=Z8HrIayb=]]WݱjTRpE%}=066o~[giHhW<v|5S(/ɳm&fm}Ocg'F~ '*U1\_J/IR~ B0YʟiUeM:%uRe2[ڊZ#dKVCLfRkzn~U33gg6_e;=hbQQ& jo.yUWw3*YS'WK^3~ᑥG^ye& pXc?Up*ݚ؇>pHUwôO4ơ0_!c <`Af\'m[ѳVwͶ)O5᫊ ]I%|/RLj!ppa-$::nmdU;[nwͼV;cFb]bS !$!AB6#"b%0kou!jO%tέR}Gg[Ivw/}%+[o@!&pZ]6|C#Ljr-ԞlygrD\rFd(6~v:XXֻa{Pw9ayg{ONpy,siH[dZEdojz|v}Ϗ9'm!=8_`ўE-_ ^5Lr;vt|z6$Plma9??lh|U Eږb3A/,l0Z5:}|T^ŶUEqdRpXA[&eq״3sTuY}Y\{&G;ϯ|{8s0;_χiյvOڝP(L$秓9-liX \騸"nP*tιx=Y]1m>~OvFIlD-9&-Jn\!_pZ׏(vU2^_}Iң'6F@UOeL8CL~'\JEჟp5?[3Xύ9Tɀx4RuW3gW7az=rlA[w;s૬vQe^\+Ky4 ,ppZQ^'OWE ,[1`X8#fY g?&WS3?jpx|?$)?81ԐIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/es/_images/surfarray_scaleup.png0000644000175100001770000020425714676242340023572 0ustar00runnerdockerPNG  IHDR IDATx%_,w7ڷ^9$CJ3̈cmKMAd`0 }2l2 [`dYZ<,J"3l&=76xodm !+Y7"n=<牚mwʯ*/~O |x*u^"hI eSX78Oq~1  S|?/Od~]d+Lޟcf' EQ *4 :ue,7l2I8:í{1;Yaq/%ۻx;='?ß{.·O,*$u(D2x0D2_"WD"WG5st{>bkwηpW[ܹo|_"7=A>_bg{ryQJ].e%n~:M~Ifko_w;?|o|۸8:j9E7pp7n '5^ rJG8:|~ygIGx'K?}d=}pɠPnnrtcbJMhMb0t:C3@5:xz 2CK%pcgz7mz( N2p*!a0a``{S<|{Xs Tp1=k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Eʱ~έ-|&c/>>E|̵,fgOgϿܕmLg9Ăc#;cH2E0[Lr{.KRLU: !E1tC\JTUUvnlPS~rvv]N*&:&O =!CGJ fIpI5>[%v_ o'38J_\zvD%{TB/\CLئscvzMV IΦƞ=!23!!&'1CfGMٴ0-ˋɽ-;TP\:nRׯ>j֛'­+l&'8MCt^_ռ]iΒ$qlp>f, )^{q:2)H9ǬQ*'fWu ɡs@L΍WD?܇dV!Ki@ ZօZFTF4QvH*[.jfd6CPZs=H j63B`HD`@AP8`7tIsUe_ 'nc p HH$M1KVQɪVս/%d:qb7[QmLr 9UsfD0LXR =rS]_t*l9!9Ou~WgӢ՝wP)ٹ(Ʒ71Wd6w!=9꺘ܯa}X}O?EsQPD0 28*"̞, GSq !hd'530 ɡ91fα#dfgvLHr7U$gBrγ#"TcH\M8ID "CLMsb%'&bi35UC P "&!PA\N8)vx( ǃ qNחQN=8 |7x J FSmD-:sk9&>D?waҍyQO9I0R: JH?A 3F# ; #D>H#AnCQ:V9I죵"Cp0ԍV[?:ϩ|쌝%lG{ć_7[aGF@Ot?l\!XQS`? D3!-ipF:~4gx;TzGvQ_##FR| '/Zvh4g{i4Ɏ|S蔓8w qruwn8IʿMC'/|uf<]W3W+.~z߇%'׿9M; (R@132WvѕG" p< >cgNL;]}<XzI8)-xhS8&a>Hz;gi\{zypq>GO}k[ز\!f#խ8múp\&p~W<m t4 @0nYIKUu4'Mu}p7XW-zeGAh&qɏyH=j>VOw; l72Mmzk=@9=xίxأo>YpOb#0x|vc2}L#[4ǙОc?O 6'wi>i-4pM@@/0\cIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/es/_images/surfarray_striped.png0000644000175100001770000000061014676242340023573 0ustar00runnerdockerPNG  IHDRL\OIDATxԱ 1;1T8~7%*AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV^* IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/es/_images/surfarray_xfade.png0000644000175100001770000012155214676242340023221 0ustar00runnerdockerPNG  IHDR1 IDATxTْ%ɑ%vT7̬Dhts'R>a#B4zQhTBVKDtG$+!!"jG9z3 mů>*ۧ/s\Dxwث+%a'i%qTEKimJ.uU7ާiH 5D//./w^|Ͱ"p.%EMӄZE...TkIE8u?No=:8cLV7!y#&͜\qn S6M|b?fS ͉M"!4cΙz^i23CD>c;5#a`Xx$vM2Gb"\9D1M#1BUUZ*,siws6dsAPk:{0ܭ_N?Oq{B] &fݙXH8imf> q:dDgS/>/d^`PU3DxD |rNޯӳplMg?J""lf"~r.]gfPW ̔pKġoooN'4FLDg@DD`M9 :''g\8<ƩSsrPm<;`)8i֩63V-L]Q0\DkLcn6&c YHnp0œDU\qYD+(nܽZJUf%Vz:;8~w?|'uisVm"hR@nI2?{wׯ6_=Taǜs%@8%2yj=NV`:p{nY?_ 7׻ݭ ´ub)EndN a'9Ū[<^߼ݿJ9۞"ZKVkB8R* )|ozz?\dC,":&NĒS"23/?{81GyKMjy‚p"^n79wTp8:9rf J`z?b ~@}3T%,bMy{r:hj>27 +psK,涼souW+ՁڬU3Э[j\:㬯^9:N6d:"A{x)081%$^GjZUC3mڈݒPNLN &QR2RE +$ "ݳ+R8F 'ϩ??;3t}w+}?d!ԚzA,F}?0R"8G6e}z-%>7慼N,4$RkMdIlV'Lr{sZ;Bzs"$"qJp "HH`24ۑтRDUN©d玅e3HD͎7j&∽{,i.z'iٚ1r2MuSe"e/K$w=(K8K_o¹˹0iL,^֫5)܉"y鋪ǣթZt~z>Y#SEm s!fĔnݥiAE7mM[Ng5Bs!Bk %M wxC3s䒫*CrJ" ;f.lNVAܳ@)$ a!sڴ#;D" "@D"SQCFxT$̮ffnmVk%l7שYk%&Z $ Vզʉۓ0݈HcgG8"iu67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lsWFs9 ; yFCfZa3X+2"!Y+dLH<BÓ٫~|e6:􅙃[Jʌѹf |eQ Y py+$苟 Jzf}ATZ^'%b<Lc[/%IhɄxqhdq<~ ;;NZp,?x.r]iRY$0U*2_UWZR8Rݟ Ǧ|32E.$pu?G6F' +lL|evB%=QiDI9q.c|ϻ0ҽo8n,jOA9?/&rimߋ5lIwef1[RCJ9b2Jg2]s[-o^L_lD)R\>f3γV$Lt"tK'EK[ Z;mwqQYɤm}?s2Spt֟wѷRġ bH̛)/-y sw! zYRȤ6Ҹꓒw ҕng,4wm(,W-,]jNN}¬XB(gsQY@J7w[nl pnt|=ɗ:N8rĹsD6חCQZBKN" V ;fB`!5-޻/=bB`AZ`4CXvaAt׎DьXGUUvz @׾iȆ ̞par=P1pɆ&: nkT*th%9 9T-He Y_:,³mmsKA3C|oGTȇtߗ偑a 38'kr>sx,r,*<:cp3=W#_J@K}tW,Nkyslĩ3|qsؽ3sq$/:$ɂ$Rj͚}V!Q鱵ilf;]X o@b;/{*+%祝yr^^Kce:Yjٖ=LtNH@io,c>ā4\3naRf}ޘ~eb+C4*,Q&k2ǥ*$'P `t!A6^ cLéл08*Uhq6'pFh@r,) COyC]bDJsupVSHqxf9UN~u|XUլu|Fڕ-:>XhkFx=.k 9FeWyB6uQPܾe˷$VM\ oN-f_kZHx_Eٽu"ˇkbcois#o]/?Sk1of[mR&پoy _4w&YNeMP|&5k!b~~~~~>7PfVzT jd-6nNזSe֨"d+V}~w6ٲ;nGVO{1#-_]/{jlk)\)ܤvWQts:y[x$nכ_O<u}k uUM9{L ?xags\:^.\)k[]{el!ш7O{J˶W3d=~4^˶l?#+_XYQ=x;>>6~}AVQ6QQ6Qz|%ֱZE}Z_kkm_kZZD=&VQz|Ekm_kDQ?MTe9J$$u&J~:j qQCв-a^*\2Q OIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/es/_images/tom_formulae.png0000644000175100001770000001515314676242340022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8PU &>aK.]ti^^N˗WX!޽{֭[KJJpA WTTtppxw E@޲۷o1\^Νkll{IXX؉';IӦMSWWw7NCCpWWWN/2e"]\\\]] 芭aÆaǽʈ#K(/ݻ8sNtt&ꖟϽU~-**j…hn[$!!a„ |rdYHwN7L8?}0S 0ٳ&1빹UUUׯ_۷oB9޺u Gv8OBߋ 555\b>>>ݻwڵlB מ8$D uҶ_}h$֭[BEJJ NQLϸREqlO!?...˗/j/{Qqqqr x"|Νri)%;vRgן(e˄/EP6xujىmabbiii(࿞&:2^9^Pkaƍwtdd$\rEkkkB֭[ǎ#GboD>}:=8CZEEeŊ fffVVVO<3gr_ =z45~Ν;=(BE۱"i&455%DDDȸQĨ:TҖljjrttTVV%uFgB2bΝ?/(($=== 222xBf͚D7! Q#@ InZf ;x <.ؼ=(rRYYl,#++ݝrëY:666۳,X[j`ƪU:**jظhJhkkSѣ;ZQ=' Kq|ӕإ/&&cѥȈ&:j&ځL8DW477qPFKIIq TRRAFxxxV-NVUUO^+FA&M}W"!nٲ0y ХK`ݺuٳg`OK׊Bj= "G_8ie˖\ LMMǎKd̘1c׮]{ ,--Gedd⒗fRuvvB&ƣ3{S<۶mAάr@ի׮]w/BhXݻ[L0}222p)U6|>G]kL8ޙ].>|]0B/^練lٲ\Ǐw'--ӧBf$55ٳgt (WSS!p+x1*++999јyCaaM(55my:q$Zf=zu;MJtσ\o@O CIA˗i!]P(ѣGk '6e\$W#z3g:uzРAs:t(! 68@Ή0`c@@ 7fll?:::^^^LOO755Ev[ƪU83z1c3f̘1ѧO1b_N999555566*))#sgDEERG+HHHǏ9BLgBCC줥}}}P^ %%E]]][[455qٳguрGڼx֭ۻw/yy ??B\`ee ̄ }F/x}ZTFFF^^LfEp<֋k׮;1tUU>odx(++SSS... !!A띜lcc#& f`RP___WW7dzii骪*<̗KeeDkkxK`0`0ff0~  Oa`0)L@3 F? sIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.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"l2;lf&zl?[+ 9ZsmhH4πYfů56'׈)""moC# 0p~o+3Tvn_HX3?QiYå(j: 2]` J^xχHO7|+ހPl¹ն*McY|%rTkkҽ60i';78:n8RGJ>$CRÃ-N܀P/H Zd"4 r,VI悝ЋwFE,"҉h_ͤBP(; k*:pEDb,> zT/ ed_`=Hڙt1['sTr$ q$Q]HtzqÑ>P"Kq1I&C}%qPNuAƈVD Ax~5"Ly bK=^f>I낶HK^:T/Ԋ Cd`d]IH:2n8R78r,RNU %"Yʶ: }N>O;2N6'b1ZlL'""=/gk_/_:[_`tA 5"P 6; ؁twՉIUΙ.u6< 92?HZ+a?;%Bw,$_o١`2Л` UDD>Kz6ϒP5{ZIs@zf2C6{' ;Kx3*D(vf]t;Ƃ=Yf0MHP>mD_=vmdV0 QDp:dqÑ25]""nUҫO=Ĭv2ؼL2"ʍ XDD+N5"R"/M`?65 }}]fctLJZ? 61 N=CgGf(:ۄs1ؼk[n*-("\ N.CbB8#ҩ"N $CiS&07J1)k`& oSe_|l<t2P̠:؇Paz7H*]ػdhviSI'CKE3)4iI{r`O*;-("TDJԈ:ȱtt]RA#jn( "fٝt{6l%B3p=$&Y?vq\[.ڝhH&B##FN.%&miDHB""|xp jVJc$mj`'iUTS"XWn JDD,ҋ/W;H(6kuVؓJ1- έA8%B}s(0t3(i_c0c’j^l{ JDD:tCe _NDw?ɶ8j{""do wDu&KmoqHCگJ*[ Vh-)""6]W6`q]2RyZ75|ņ"""A?+t]qhFJctM ,1.Fҵ9`qQ2Z4r,y#""mcR"""mg1hʯV]8fzc` ?4Hd &BoM|h+|6 3;M4QfnB!R6_']ӀDD$G5lJ*T>zPj"aeWJ8{ 3wDs,x_Jz; ,!Az|\6OʙHωxS% !*ϥ \DD:5 =)%0O .aliceblue {background-color: #f0f8ff; color: #f0f8ff;} .antiquewhite {background-color: #faebd7; color: #faebd7;} .antiquewhite1 {background-color: #ffefdb; color: #ffefdb;} .antiquewhite2 {background-color: #eedfcc; color: #eedfcc;} .antiquewhite3 {background-color: #cdc0b0; color: #cdc0b0;} .antiquewhite4 {background-color: #8b8378; color: #8b8378;} .aqua {background-color: #00ffff; color: #00ffff;} .aquamarine {background-color: #7fffd4; color: #7fffd4;} .aquamarine1 {background-color: #7fffd4; color: #7fffd4;} .aquamarine2 {background-color: #76eec6; color: #76eec6;} .aquamarine3 {background-color: #66cdaa; color: #66cdaa;} .aquamarine4 {background-color: #458b74; color: #458b74;} .azure {background-color: #f0ffff; color: #f0ffff;} .azure1 {background-color: #f0ffff; color: #f0ffff;} .azure3 {background-color: #c1cdcd; color: #c1cdcd;} .azure2 {background-color: #e0eeee; color: #e0eeee;} .azure4 {background-color: #838b8b; color: #838b8b;} .beige {background-color: #f5f5dc; color: #f5f5dc;} .bisque {background-color: #ffe4c4; color: #ffe4c4;} .bisque1 {background-color: #ffe4c4; color: #ffe4c4;} .bisque2 {background-color: #eed5b7; color: #eed5b7;} .bisque3 {background-color: #cdb79e; color: #cdb79e;} .bisque4 {background-color: #8b7d6b; color: #8b7d6b;} .black {background-color: #000000; color: #000000;} .blanchedalmond {background-color: #ffebcd; color: #ffebcd;} .blue {background-color: #0000ff; color: #0000ff;} .blue1 {background-color: #0000ff; color: #0000ff;} .blue2 {background-color: #0000ee; color: #0000ee;} .blue3 {background-color: #0000cd; color: #0000cd;} .blue4 {background-color: #00008b; color: #00008b;} .blueviolet {background-color: #8a2be2; color: #8a2be2;} .brown {background-color: #a52a2a; color: #a52a2a;} .brown1 {background-color: #ff4040; color: #ff4040;} .brown2 {background-color: #ee3b3b; color: #ee3b3b;} .brown3 {background-color: #cd3333; color: #cd3333;} .brown4 {background-color: #8b2323; color: #8b2323;} .burlywood {background-color: #deb887; color: #deb887;} .burlywood1 {background-color: #ffd39b; color: #ffd39b;} .burlywood2 {background-color: #eec591; color: #eec591;} .burlywood3 {background-color: #cdaa7d; color: #cdaa7d;} .burlywood4 {background-color: #8b7355; color: #8b7355;} .cadetblue {background-color: #5f9ea0; color: #5f9ea0;} .cadetblue1 {background-color: #98f5ff; color: #98f5ff;} .cadetblue2 {background-color: #8ee5ee; color: #8ee5ee;} .cadetblue3 {background-color: #7ac5cd; color: #7ac5cd;} .cadetblue4 {background-color: #53868b; color: #53868b;} .chartreuse {background-color: #7fff00; color: #7fff00;} .chartreuse1 {background-color: #7fff00; color: #7fff00;} .chartreuse2 {background-color: #76ee00; color: #76ee00;} .chartreuse3 {background-color: #66cd00; color: #66cd00;} .chartreuse4 {background-color: #458b00; color: #458b00;} .chocolate {background-color: #d2691e; color: #d2691e;} .chocolate1 {background-color: #ff7f24; color: #ff7f24;} .chocolate2 {background-color: #ee7621; color: #ee7621;} .chocolate3 {background-color: #cd661d; color: #cd661d;} .chocolate4 {background-color: #8b4513; color: #8b4513;} .coral {background-color: #ff7f50; color: #ff7f50;} .coral1 {background-color: #ff7256; color: #ff7256;} .coral2 {background-color: #ee6a50; color: #ee6a50;} .coral3 {background-color: #cd5b45; color: #cd5b45;} .coral4 {background-color: #8b3e2f; color: #8b3e2f;} .cornflowerblue {background-color: #6495ed; color: #6495ed;} .cornsilk {background-color: #fff8dc; color: #fff8dc;} .cornsilk1 {background-color: #fff8dc; color: #fff8dc;} .cornsilk2 {background-color: #eee8cd; color: #eee8cd;} .cornsilk3 {background-color: #cdc8b1; color: #cdc8b1;} .cornsilk4 {background-color: #8b8878; color: #8b8878;} .crimson {background-color: #dc143c; color: #dc143c;} .cyan {background-color: #00ffff; color: #00ffff;} .cyan1 {background-color: #00ffff; color: #00ffff;} .cyan2 {background-color: #00eeee; color: #00eeee;} .cyan3 {background-color: #00cdcd; color: #00cdcd;} .cyan4 {background-color: #008b8b; color: #008b8b;} .darkblue {background-color: #00008b; color: #00008b;} .darkcyan {background-color: #008b8b; color: #008b8b;} .darkgoldenrod {background-color: #b8860b; color: #b8860b;} .darkgoldenrod1 {background-color: #ffb90f; color: #ffb90f;} .darkgoldenrod2 {background-color: #eead0e; color: #eead0e;} .darkgoldenrod3 {background-color: #cd950c; color: #cd950c;} .darkgoldenrod4 {background-color: #8b6508; color: #8b6508;} .darkgray {background-color: #a9a9a9; color: #a9a9a9;} .darkgreen {background-color: #006400; color: #006400;} .darkgrey {background-color: #a9a9a9; color: #a9a9a9;} .darkkhaki {background-color: #bdb76b; color: #bdb76b;} .darkmagenta {background-color: #8b008b; color: #8b008b;} .darkolivegreen {background-color: #556b2f; color: #556b2f;} .darkolivegreen1 {background-color: #caff70; color: #caff70;} .darkolivegreen2 {background-color: #bcee68; color: #bcee68;} .darkolivegreen3 {background-color: #a2cd5a; color: #a2cd5a;} .darkolivegreen4 {background-color: #6e8b3d; color: #6e8b3d;} .darkorange {background-color: #ff8c00; color: #ff8c00;} .darkorange1 {background-color: #ff7f00; color: #ff7f00;} .darkorange2 {background-color: #ee7600; color: #ee7600;} .darkorange3 {background-color: #cd6600; color: #cd6600;} .darkorange4 {background-color: #8b4500; color: #8b4500;} .darkorchid {background-color: #9932cc; color: #9932cc;} .darkorchid1 {background-color: #bf3eff; color: #bf3eff;} .darkorchid2 {background-color: #b23aee; color: #b23aee;} .darkorchid3 {background-color: #9a32cd; color: #9a32cd;} .darkorchid4 {background-color: #68228b; color: #68228b;} .darkred {background-color: #8b0000; color: #8b0000;} .darksalmon {background-color: #e9967a; color: #e9967a;} .darkseagreen {background-color: #8fbc8f; color: #8fbc8f;} .darkseagreen1 {background-color: #c1ffc1; color: #c1ffc1;} .darkseagreen2 {background-color: #b4eeb4; color: #b4eeb4;} .darkseagreen3 {background-color: #9bcd9b; color: #9bcd9b;} .darkseagreen4 {background-color: #698b69; color: #698b69;} .darkslateblue {background-color: #483d8b; color: #483d8b;} .darkslategray {background-color: #2f4f4f; color: #2f4f4f;} .darkslategray1 {background-color: #97ffff; color: #97ffff;} .darkslategray2 {background-color: #8deeee; color: #8deeee;} .darkslategray3 {background-color: #79cdcd; color: #79cdcd;} .darkslategray4 {background-color: #528b8b; color: #528b8b;} .darkslategrey {background-color: #2f4f4f; color: #2f4f4f;} .darkturquoise {background-color: #00ced1; color: #00ced1;} .darkviolet {background-color: #9400d3; color: #9400d3;} .deeppink {background-color: #ff1493; color: #ff1493;} .deeppink1 {background-color: #ff1493; color: #ff1493;} .deeppink2 {background-color: #ee1289; color: #ee1289;} .deeppink3 {background-color: #cd1076; color: #cd1076;} .deeppink4 {background-color: #8b0a50; color: #8b0a50;} .deepskyblue {background-color: #00bfff; color: #00bfff;} .deepskyblue1 {background-color: #00bfff; color: #00bfff;} .deepskyblue2 {background-color: #00b2ee; color: #00b2ee;} .deepskyblue3 {background-color: #009acd; color: #009acd;} .deepskyblue4 {background-color: #00688b; color: #00688b;} .dimgray {background-color: #696969; color: #696969;} .dimgrey {background-color: #696969; color: #696969;} .dodgerblue {background-color: #1e90ff; color: #1e90ff;} .dodgerblue1 {background-color: #1e90ff; color: #1e90ff;} .dodgerblue2 {background-color: #1c86ee; color: #1c86ee;} .dodgerblue3 {background-color: #1874cd; color: #1874cd;} .dodgerblue4 {background-color: #104e8b; color: #104e8b;} .firebrick {background-color: #b22222; color: #b22222;} .firebrick1 {background-color: #ff3030; color: #ff3030;} .firebrick2 {background-color: #ee2c2c; color: #ee2c2c;} .firebrick3 {background-color: #cd2626; color: #cd2626;} .firebrick4 {background-color: #8b1a1a; color: #8b1a1a;} .floralwhite {background-color: #fffaf0; color: #fffaf0;} .forestgreen {background-color: #228b22; color: #228b22;} .fuchsia {background-color: #ff00ff; color: #ff00ff;} .gainsboro {background-color: #dcdcdc; color: #dcdcdc;} .ghostwhite {background-color: #f8f8ff; color: #f8f8ff;} .gold {background-color: #ffd700; color: #ffd700;} .gold1 {background-color: #ffd700; color: #ffd700;} .gold2 {background-color: #eec900; color: #eec900;} .gold3 {background-color: #cdad00; color: #cdad00;} .gold4 {background-color: #8b7500; color: #8b7500;} .goldenrod {background-color: #daa520; color: #daa520;} .goldenrod1 {background-color: #ffc125; color: #ffc125;} .goldenrod2 {background-color: #eeb422; color: #eeb422;} .goldenrod3 {background-color: #cd9b1d; color: #cd9b1d;} .goldenrod4 {background-color: #8b6914; color: #8b6914;} .gray {background-color: #bebebe; color: #bebebe;} .gray0 {background-color: #000000; color: #000000;} .gray1 {background-color: #030303; color: #030303;} .gray2 {background-color: #050505; color: #050505;} .gray3 {background-color: #080808; color: #080808;} .gray4 {background-color: #0a0a0a; color: #0a0a0a;} .gray5 {background-color: #0d0d0d; color: #0d0d0d;} .gray6 {background-color: #0f0f0f; color: #0f0f0f;} .gray7 {background-color: #121212; color: #121212;} .gray8 {background-color: #141414; color: #141414;} .gray9 {background-color: #171717; color: #171717;} .gray10 {background-color: #1a1a1a; color: #1a1a1a;} .gray11 {background-color: #1c1c1c; color: #1c1c1c;} .gray12 {background-color: #1f1f1f; color: #1f1f1f;} .gray13 {background-color: #212121; color: #212121;} .gray14 {background-color: #242424; color: #242424;} .gray15 {background-color: #262626; color: #262626;} .gray16 {background-color: #292929; color: #292929;} .gray17 {background-color: #2b2b2b; color: #2b2b2b;} .gray18 {background-color: #2e2e2e; color: #2e2e2e;} .gray19 {background-color: #303030; color: #303030;} .gray20 {background-color: #333333; color: #333333;} .gray21 {background-color: #363636; color: #363636;} .gray22 {background-color: #383838; color: #383838;} .gray23 {background-color: #3b3b3b; color: #3b3b3b;} .gray24 {background-color: #3d3d3d; color: #3d3d3d;} .gray25 {background-color: #404040; color: #404040;} .gray26 {background-color: #424242; color: #424242;} .gray27 {background-color: #454545; color: #454545;} .gray28 {background-color: #474747; color: #474747;} .gray29 {background-color: #4a4a4a; color: #4a4a4a;} .gray30 {background-color: #4d4d4d; color: #4d4d4d;} .gray31 {background-color: #4f4f4f; color: #4f4f4f;} .gray32 {background-color: #525252; color: #525252;} .gray33 {background-color: #545454; color: #545454;} .gray34 {background-color: #575757; color: #575757;} .gray35 {background-color: #595959; color: #595959;} .gray36 {background-color: #5c5c5c; color: #5c5c5c;} .gray37 {background-color: #5e5e5e; color: #5e5e5e;} .gray38 {background-color: #616161; color: #616161;} .gray39 {background-color: #636363; color: #636363;} .gray40 {background-color: #666666; color: #666666;} .gray41 {background-color: #696969; color: #696969;} .gray42 {background-color: #6b6b6b; color: #6b6b6b;} .gray43 {background-color: #6e6e6e; color: #6e6e6e;} .gray44 {background-color: #707070; color: #707070;} .gray45 {background-color: #737373; color: #737373;} .gray46 {background-color: #757575; color: #757575;} .gray47 {background-color: #787878; color: #787878;} .gray48 {background-color: #7a7a7a; color: #7a7a7a;} .gray49 {background-color: #7d7d7d; color: #7d7d7d;} .gray50 {background-color: #7f7f7f; color: #7f7f7f;} .gray51 {background-color: #828282; color: #828282;} .gray52 {background-color: #858585; color: #858585;} .gray53 {background-color: #878787; color: #878787;} .gray54 {background-color: #8a8a8a; color: #8a8a8a;} .gray55 {background-color: #8c8c8c; color: #8c8c8c;} .gray56 {background-color: #8f8f8f; color: #8f8f8f;} .gray57 {background-color: #919191; color: #919191;} .gray58 {background-color: #949494; color: #949494;} .gray59 {background-color: #969696; color: #969696;} .gray60 {background-color: #999999; color: #999999;} .gray61 {background-color: #9c9c9c; color: #9c9c9c;} .gray62 {background-color: #9e9e9e; color: #9e9e9e;} .gray63 {background-color: #a1a1a1; color: #a1a1a1;} .gray64 {background-color: #a3a3a3; color: #a3a3a3;} .gray65 {background-color: #a6a6a6; color: #a6a6a6;} .gray66 {background-color: #a8a8a8; color: #a8a8a8;} .gray67 {background-color: #ababab; color: #ababab;} .gray68 {background-color: #adadad; color: #adadad;} .gray69 {background-color: #b0b0b0; color: #b0b0b0;} .gray70 {background-color: #b3b3b3; color: #b3b3b3;} .gray71 {background-color: #b5b5b5; color: #b5b5b5;} .gray72 {background-color: #b8b8b8; color: #b8b8b8;} .gray73 {background-color: #bababa; color: #bababa;} .gray74 {background-color: #bdbdbd; color: #bdbdbd;} .gray75 {background-color: #bfbfbf; color: #bfbfbf;} .gray76 {background-color: #c2c2c2; color: #c2c2c2;} .gray77 {background-color: #c4c4c4; color: #c4c4c4;} .gray78 {background-color: #c7c7c7; color: #c7c7c7;} .gray79 {background-color: #c9c9c9; color: #c9c9c9;} .gray80 {background-color: #cccccc; color: #cccccc;} .gray81 {background-color: #cfcfcf; color: #cfcfcf;} .gray82 {background-color: #d1d1d1; color: #d1d1d1;} .gray83 {background-color: #d4d4d4; color: #d4d4d4;} .gray84 {background-color: #d6d6d6; color: #d6d6d6;} .gray85 {background-color: #d9d9d9; color: #d9d9d9;} .gray86 {background-color: #dbdbdb; color: #dbdbdb;} .gray87 {background-color: #dedede; color: #dedede;} .gray88 {background-color: #e0e0e0; color: #e0e0e0;} .gray89 {background-color: #e3e3e3; color: #e3e3e3;} .gray90 {background-color: #e5e5e5; color: #e5e5e5;} .gray91 {background-color: #e8e8e8; color: #e8e8e8;} .gray92 {background-color: #ebebeb; color: #ebebeb;} .gray93 {background-color: #ededed; color: #ededed;} .gray94 {background-color: #f0f0f0; color: #f0f0f0;} .gray95 {background-color: #f2f2f2; color: #f2f2f2;} .gray96 {background-color: #f5f5f5; color: #f5f5f5;} .gray97 {background-color: #f7f7f7; color: #f7f7f7;} .gray98 {background-color: #fafafa; color: #fafafa;} .gray99 {background-color: #fcfcfc; color: #fcfcfc;} .gray100 {background-color: #ffffff; color: #ffffff;} .green {background-color: #00ff00; color: #00ff00;} .green1 {background-color: #00ff00; color: #00ff00;} .green2 {background-color: #00ee00; color: #00ee00;} .green3 {background-color: #00cd00; color: #00cd00;} .green4 {background-color: #008b00; color: #008b00;} .greenyellow {background-color: #adff2f; color: #adff2f;} .grey {background-color: #bebebe; color: #bebebe;} .grey0 {background-color: #000000; color: #000000;} .grey1 {background-color: #030303; color: #030303;} .grey2 {background-color: #050505; color: #050505;} .grey3 {background-color: #080808; color: #080808;} .grey4 {background-color: #0a0a0a; color: #0a0a0a;} .grey5 {background-color: #0d0d0d; color: #0d0d0d;} .grey6 {background-color: #0f0f0f; color: #0f0f0f;} .grey7 {background-color: #121212; color: #121212;} .grey8 {background-color: #141414; color: #141414;} .grey9 {background-color: #171717; color: #171717;} .grey10 {background-color: #1a1a1a; color: #1a1a1a;} .grey11 {background-color: #1c1c1c; color: #1c1c1c;} .grey12 {background-color: #1f1f1f; color: #1f1f1f;} .grey13 {background-color: #212121; color: #212121;} .grey14 {background-color: #242424; color: #242424;} .grey15 {background-color: #262626; color: #262626;} .grey16 {background-color: #292929; color: #292929;} .grey17 {background-color: #2b2b2b; color: #2b2b2b;} .grey18 {background-color: #2e2e2e; color: #2e2e2e;} .grey19 {background-color: #303030; color: #303030;} .grey20 {background-color: #333333; color: #333333;} .grey21 {background-color: #363636; color: #363636;} .grey22 {background-color: #383838; color: #383838;} .grey23 {background-color: #3b3b3b; color: #3b3b3b;} .grey24 {background-color: #3d3d3d; color: #3d3d3d;} .grey25 {background-color: #404040; color: #404040;} .grey26 {background-color: #424242; color: #424242;} .grey27 {background-color: #454545; color: #454545;} .grey28 {background-color: #474747; color: #474747;} .grey29 {background-color: #4a4a4a; color: #4a4a4a;} .grey30 {background-color: #4d4d4d; color: #4d4d4d;} .grey31 {background-color: #4f4f4f; color: #4f4f4f;} .grey32 {background-color: #525252; color: #525252;} .grey33 {background-color: #545454; color: #545454;} .grey34 {background-color: #575757; color: #575757;} .grey35 {background-color: #595959; color: #595959;} .grey36 {background-color: #5c5c5c; color: #5c5c5c;} .grey37 {background-color: #5e5e5e; color: #5e5e5e;} .grey38 {background-color: #616161; color: #616161;} .grey39 {background-color: #636363; color: #636363;} .grey40 {background-color: #666666; color: #666666;} .grey41 {background-color: #696969; color: #696969;} .grey42 {background-color: #6b6b6b; color: #6b6b6b;} .grey43 {background-color: #6e6e6e; color: #6e6e6e;} .grey44 {background-color: #707070; color: #707070;} .grey45 {background-color: #737373; color: #737373;} .grey46 {background-color: #757575; color: #757575;} .grey47 {background-color: #787878; color: #787878;} .grey48 {background-color: #7a7a7a; color: #7a7a7a;} .grey49 {background-color: #7d7d7d; color: #7d7d7d;} .grey50 {background-color: #7f7f7f; color: #7f7f7f;} .grey51 {background-color: #828282; color: #828282;} .grey52 {background-color: #858585; color: #858585;} .grey53 {background-color: #878787; color: #878787;} .grey54 {background-color: #8a8a8a; color: #8a8a8a;} .grey55 {background-color: #8c8c8c; color: #8c8c8c;} .grey56 {background-color: #8f8f8f; color: #8f8f8f;} .grey57 {background-color: #919191; color: #919191;} .grey58 {background-color: #949494; color: #949494;} .grey59 {background-color: #969696; color: #969696;} .grey60 {background-color: #999999; color: #999999;} .grey61 {background-color: #9c9c9c; color: #9c9c9c;} .grey62 {background-color: #9e9e9e; color: #9e9e9e;} .grey63 {background-color: #a1a1a1; color: #a1a1a1;} .grey64 {background-color: #a3a3a3; color: #a3a3a3;} .grey65 {background-color: #a6a6a6; color: #a6a6a6;} .grey66 {background-color: #a8a8a8; color: #a8a8a8;} .grey67 {background-color: #ababab; color: #ababab;} .grey68 {background-color: #adadad; color: #adadad;} .grey69 {background-color: #b0b0b0; color: #b0b0b0;} .grey70 {background-color: #b3b3b3; color: #b3b3b3;} .grey71 {background-color: #b5b5b5; color: #b5b5b5;} .grey72 {background-color: #b8b8b8; color: #b8b8b8;} .grey73 {background-color: #bababa; color: #bababa;} .grey74 {background-color: #bdbdbd; color: #bdbdbd;} .grey75 {background-color: #bfbfbf; color: #bfbfbf;} .grey76 {background-color: #c2c2c2; color: #c2c2c2;} .grey77 {background-color: #c4c4c4; color: #c4c4c4;} .grey78 {background-color: #c7c7c7; color: #c7c7c7;} .grey79 {background-color: #c9c9c9; color: #c9c9c9;} .grey80 {background-color: #cccccc; color: #cccccc;} .grey81 {background-color: #cfcfcf; color: #cfcfcf;} .grey82 {background-color: #d1d1d1; color: #d1d1d1;} .grey83 {background-color: #d4d4d4; color: #d4d4d4;} .grey84 {background-color: #d6d6d6; color: #d6d6d6;} .grey85 {background-color: #d9d9d9; color: #d9d9d9;} .grey86 {background-color: #dbdbdb; color: #dbdbdb;} .grey87 {background-color: #dedede; color: #dedede;} .grey88 {background-color: #e0e0e0; color: #e0e0e0;} .grey89 {background-color: #e3e3e3; color: #e3e3e3;} .grey90 {background-color: #e5e5e5; color: #e5e5e5;} .grey91 {background-color: #e8e8e8; color: #e8e8e8;} .grey92 {background-color: #ebebeb; color: #ebebeb;} .grey93 {background-color: #ededed; color: #ededed;} .grey94 {background-color: #f0f0f0; color: #f0f0f0;} .grey95 {background-color: #f2f2f2; color: #f2f2f2;} .grey96 {background-color: #f5f5f5; color: #f5f5f5;} .grey97 {background-color: #f7f7f7; color: #f7f7f7;} .grey98 {background-color: #fafafa; color: #fafafa;} .grey99 {background-color: #fcfcfc; color: #fcfcfc;} .grey100 {background-color: #ffffff; color: #ffffff;} .honeydew {background-color: #f0fff0; color: #f0fff0;} .honeydew1 {background-color: #f0fff0; color: #f0fff0;} .honeydew2 {background-color: #e0eee0; color: #e0eee0;} .honeydew3 {background-color: #c1cdc1; color: #c1cdc1;} .honeydew4 {background-color: #838b83; color: #838b83;} .hotpink {background-color: #ff69b4; color: #ff69b4;} .hotpink1 {background-color: #ff6eb4; color: #ff6eb4;} .hotpink2 {background-color: #ee6aa7; color: #ee6aa7;} .hotpink3 {background-color: #cd6090; color: #cd6090;} .hotpink4 {background-color: #8b3a62; color: #8b3a62;} .indianred {background-color: #cd5c5c; color: #cd5c5c;} .indianred1 {background-color: #ff6a6a; color: #ff6a6a;} .indianred2 {background-color: #ee6363; color: #ee6363;} .indianred3 {background-color: #cd5555; color: #cd5555;} .indianred4 {background-color: #8b3a3a; color: #8b3a3a;} .indigo {background-color: #4b0082; color: #4b0082;} .ivory {background-color: #fffff0; color: #fffff0;} .ivory1 {background-color: #fffff0; color: #fffff0;} .ivory2 {background-color: #eeeee0; color: #eeeee0;} .ivory3 {background-color: #cdcdc1; color: #cdcdc1;} .ivory4 {background-color: #8b8b83; color: #8b8b83;} .khaki {background-color: #f0e68c; color: #f0e68c;} .khaki1 {background-color: #fff68f; color: #fff68f;} .khaki2 {background-color: #eee685; color: #eee685;} .khaki3 {background-color: #cdc673; color: #cdc673;} .khaki4 {background-color: #8b864e; color: #8b864e;} .lavender {background-color: #e6e6fa; color: #e6e6fa;} .lavenderblush {background-color: #fff0f5; color: #fff0f5;} .lavenderblush1 {background-color: #fff0f5; color: #fff0f5;} .lavenderblush2 {background-color: #eee0e5; color: #eee0e5;} .lavenderblush3 {background-color: #cdc1c5; color: #cdc1c5;} .lavenderblush4 {background-color: #8b8386; color: #8b8386;} .lawngreen {background-color: #7cfc00; color: #7cfc00;} .lemonchiffon {background-color: #fffacd; color: #fffacd;} .lemonchiffon1 {background-color: #fffacd; color: #fffacd;} .lemonchiffon2 {background-color: #eee9bf; color: #eee9bf;} .lemonchiffon3 {background-color: #cdc9a5; color: #cdc9a5;} .lemonchiffon4 {background-color: #8b8970; color: #8b8970;} .lightblue {background-color: #add8e6; color: #add8e6;} .lightblue1 {background-color: #bfefff; color: #bfefff;} .lightblue2 {background-color: #b2dfee; color: #b2dfee;} .lightblue3 {background-color: #9ac0cd; color: #9ac0cd;} .lightblue4 {background-color: #68838b; color: #68838b;} .lightcoral {background-color: #f08080; color: #f08080;} .lightcyan {background-color: #e0ffff; color: #e0ffff;} .lightcyan1 {background-color: #e0ffff; color: #e0ffff;} .lightcyan2 {background-color: #d1eeee; color: #d1eeee;} .lightcyan3 {background-color: #b4cdcd; color: #b4cdcd;} .lightcyan4 {background-color: #7a8b8b; color: #7a8b8b;} .lightgoldenrod {background-color: #eedd82; color: #eedd82;} .lightgoldenrod1 {background-color: #ffec8b; color: #ffec8b;} .lightgoldenrod2 {background-color: #eedc82; color: #eedc82;} .lightgoldenrod3 {background-color: #cdbe70; color: #cdbe70;} .lightgoldenrod4 {background-color: #8b814c; color: #8b814c;} .lightgoldenrodyellow {background-color: #fafad2; color: #fafad2;} .lightgray {background-color: #d3d3d3; color: #d3d3d3;} .lightgreen {background-color: #90ee90; color: #90ee90;} .lightgrey {background-color: #d3d3d3; color: #d3d3d3;} .lightpink {background-color: #ffb6c1; color: #ffb6c1;} .lightpink1 {background-color: #ffaeb9; color: #ffaeb9;} .lightpink2 {background-color: #eea2ad; color: #eea2ad;} .lightpink3 {background-color: #cd8c95; color: #cd8c95;} .lightpink4 {background-color: #8b5f65; color: #8b5f65;} .lightsalmon {background-color: #ffa07a; color: #ffa07a;} .lightsalmon1 {background-color: #ffa07a; color: #ffa07a;} .lightsalmon2 {background-color: #ee9572; color: #ee9572;} .lightsalmon3 {background-color: #cd8162; color: #cd8162;} .lightsalmon4 {background-color: #8b5742; color: #8b5742;} .lightseagreen {background-color: #20b2aa; color: #20b2aa;} .lightskyblue {background-color: #87cefa; color: #87cefa;} .lightskyblue1 {background-color: #b0e2ff; color: #b0e2ff;} .lightskyblue2 {background-color: #a4d3ee; color: #a4d3ee;} .lightskyblue3 {background-color: #8db6cd; color: #8db6cd;} .lightskyblue4 {background-color: #607b8b; color: #607b8b;} .lightslateblue {background-color: #8470ff; color: #8470ff;} .lightslategray {background-color: #778899; color: #778899;} .lightslategrey {background-color: #778899; color: #778899;} .lightsteelblue {background-color: #b0c4de; color: #b0c4de;} .lightsteelblue1 {background-color: #cae1ff; color: #cae1ff;} .lightsteelblue2 {background-color: #bcd2ee; color: #bcd2ee;} .lightsteelblue3 {background-color: #a2b5cd; color: #a2b5cd;} .lightsteelblue4 {background-color: #6e7b8b; color: #6e7b8b;} .lightyellow {background-color: #ffffe0; color: #ffffe0;} .lightyellow1 {background-color: #ffffe0; color: #ffffe0;} .lightyellow2 {background-color: #eeeed1; color: #eeeed1;} .lightyellow3 {background-color: #cdcdb4; color: #cdcdb4;} .lightyellow4 {background-color: #8b8b7a; color: #8b8b7a;} .linen {background-color: #faf0e6; color: #faf0e6;} .limegreen {background-color: #32cd32; color: #32cd32;} .lime {background-color: #00ff00; color: #00ff00;} .magenta {background-color: #ff00ff; color: #ff00ff;} .magenta1 {background-color: #ff00ff; color: #ff00ff;} .magenta2 {background-color: #ee00ee; color: #ee00ee;} .magenta3 {background-color: #cd00cd; color: #cd00cd;} .magenta4 {background-color: #8b008b; color: #8b008b;} .maroon {background-color: #b03060; color: #b03060;} .maroon1 {background-color: #ff34b3; color: #ff34b3;} .maroon2 {background-color: #ee30a7; color: #ee30a7;} .maroon3 {background-color: #cd2990; color: #cd2990;} .maroon4 {background-color: #8b1c62; color: #8b1c62;} .mediumaquamarine {background-color: #66cdaa; color: #66cdaa;} .mediumblue {background-color: #0000cd; color: #0000cd;} .mediumorchid {background-color: #ba55d3; color: #ba55d3;} .mediumorchid1 {background-color: #e066ff; color: #e066ff;} .mediumorchid2 {background-color: #d15fee; color: #d15fee;} .mediumorchid3 {background-color: #b452cd; color: #b452cd;} .mediumorchid4 {background-color: #7a378b; color: #7a378b;} .mediumpurple {background-color: #9370db; color: #9370db;} .mediumpurple1 {background-color: #ab82ff; color: #ab82ff;} .mediumpurple2 {background-color: #9f79ee; color: #9f79ee;} .mediumpurple3 {background-color: #8968cd; color: #8968cd;} .mediumpurple4 {background-color: #5d478b; color: #5d478b;} .mediumseagreen {background-color: #3cb371; color: #3cb371;} .mediumslateblue {background-color: #7b68ee; color: #7b68ee;} .mediumspringgreen {background-color: #00fa9a; color: #00fa9a;} .mediumturquoise {background-color: #48d1cc; color: #48d1cc;} .mediumvioletred {background-color: #c71585; color: #c71585;} .midnightblue {background-color: #191970; color: #191970;} .mintcream {background-color: #f5fffa; color: #f5fffa;} .mistyrose {background-color: #ffe4e1; color: #ffe4e1;} .mistyrose1 {background-color: #ffe4e1; color: #ffe4e1;} .mistyrose2 {background-color: #eed5d2; color: #eed5d2;} .mistyrose3 {background-color: #cdb7b5; color: #cdb7b5;} .mistyrose4 {background-color: #8b7d7b; color: #8b7d7b;} .moccasin {background-color: #ffe4b5; color: #ffe4b5;} .navajowhite {background-color: #ffdead; color: #ffdead;} .navajowhite1 {background-color: #ffdead; color: #ffdead;} .navajowhite2 {background-color: #eecfa1; color: #eecfa1;} .navajowhite3 {background-color: #cdb38b; color: #cdb38b;} .navajowhite4 {background-color: #8b795e; color: #8b795e;} .navy {background-color: #000080; color: #000080;} .navyblue {background-color: #000080; color: #000080;} .oldlace {background-color: #fdf5e6; color: #fdf5e6;} .olive {background-color: #808000; color: #808000;} .olivedrab {background-color: #6b8e23; color: #6b8e23;} .olivedrab1 {background-color: #c0ff3e; color: #c0ff3e;} .olivedrab2 {background-color: #b3ee3a; color: #b3ee3a;} .olivedrab3 {background-color: #9acd32; color: #9acd32;} .olivedrab4 {background-color: #698b22; color: #698b22;} .orange {background-color: #ffa500; color: #ffa500;} .orange1 {background-color: #ffa500; color: #ffa500;} .orange2 {background-color: #ee9a00; color: #ee9a00;} .orange3 {background-color: #cd8500; color: #cd8500;} .orange4 {background-color: #8b5a00; color: #8b5a00;} .orangered {background-color: #ff4500; color: #ff4500;} .orangered1 {background-color: #ff4500; color: #ff4500;} .orangered2 {background-color: #ee4000; color: #ee4000;} .orangered3 {background-color: #cd3700; color: #cd3700;} .orangered4 {background-color: #8b2500; color: #8b2500;} .orchid {background-color: #da70d6; color: #da70d6;} .orchid1 {background-color: #ff83fa; color: #ff83fa;} .orchid2 {background-color: #ee7ae9; color: #ee7ae9;} .orchid3 {background-color: #cd69c9; color: #cd69c9;} .orchid4 {background-color: #8b4789; color: #8b4789;} .palegreen {background-color: #98fb98; color: #98fb98;} .palegreen1 {background-color: #9aff9a; color: #9aff9a;} .palegreen2 {background-color: #90ee90; color: #90ee90;} .palegreen3 {background-color: #7ccd7c; color: #7ccd7c;} .palegreen4 {background-color: #548b54; color: #548b54;} .palegoldenrod {background-color: #eee8aa; color: #eee8aa;} .paleturquoise {background-color: #afeeee; color: #afeeee;} .paleturquoise1 {background-color: #bbffff; color: #bbffff;} .paleturquoise2 {background-color: #aeeeee; color: #aeeeee;} .paleturquoise3 {background-color: #96cdcd; color: #96cdcd;} .paleturquoise4 {background-color: #668b8b; color: #668b8b;} .palevioletred {background-color: #db7093; color: #db7093;} .palevioletred1 {background-color: #ff82ab; color: #ff82ab;} .palevioletred2 {background-color: #ee799f; color: #ee799f;} .palevioletred3 {background-color: #cd6889; color: #cd6889;} .palevioletred4 {background-color: #8b475d; color: #8b475d;} .papayawhip {background-color: #ffefd5; color: #ffefd5;} .peachpuff {background-color: #ffdab9; color: #ffdab9;} .peachpuff1 {background-color: #ffdab9; color: #ffdab9;} .peachpuff2 {background-color: #eecbad; color: #eecbad;} .peachpuff3 {background-color: #cdaf95; color: #cdaf95;} .peachpuff4 {background-color: #8b7765; color: #8b7765;} .peru {background-color: #cd853f; color: #cd853f;} .pink {background-color: #ffc0cb; color: #ffc0cb;} .pink1 {background-color: #ffb5c5; color: #ffb5c5;} .pink2 {background-color: #eea9b8; color: #eea9b8;} .pink3 {background-color: #cd919e; color: #cd919e;} .pink4 {background-color: #8b636c; color: #8b636c;} .plum {background-color: #dda0dd; color: #dda0dd;} .plum1 {background-color: #ffbbff; color: #ffbbff;} .plum2 {background-color: #eeaeee; color: #eeaeee;} .plum3 {background-color: #cd96cd; color: #cd96cd;} .plum4 {background-color: #8b668b; color: #8b668b;} .powderblue {background-color: #b0e0e6; color: #b0e0e6;} .purple {background-color: #a020f0; color: #a020f0;} .purple1 {background-color: #9b30ff; color: #9b30ff;} .purple2 {background-color: #912cee; color: #912cee;} .purple3 {background-color: #7d26cd; color: #7d26cd;} .purple4 {background-color: #551a8b; color: #551a8b;} .red {background-color: #ff0000; color: #ff0000;} .red1 {background-color: #ff0000; color: #ff0000;} .red2 {background-color: #ee0000; color: #ee0000;} .red3 {background-color: #cd0000; color: #cd0000;} .red4 {background-color: #8b0000; color: #8b0000;} .rosybrown {background-color: #bc8f8f; color: #bc8f8f;} .rosybrown1 {background-color: #ffc1c1; color: #ffc1c1;} .rosybrown2 {background-color: #eeb4b4; color: #eeb4b4;} .rosybrown3 {background-color: #cd9b9b; color: #cd9b9b;} .rosybrown4 {background-color: #8b6969; color: #8b6969;} .royalblue {background-color: #4169e1; color: #4169e1;} .royalblue1 {background-color: #4876ff; color: #4876ff;} .royalblue2 {background-color: #436eee; color: #436eee;} .royalblue3 {background-color: #3a5fcd; color: #3a5fcd;} .royalblue4 {background-color: #27408b; color: #27408b;} .salmon {background-color: #fa8072; color: #fa8072;} .salmon1 {background-color: #ff8c69; color: #ff8c69;} .salmon2 {background-color: #ee8262; color: #ee8262;} .salmon3 {background-color: #cd7054; color: #cd7054;} .salmon4 {background-color: #8b4c39; color: #8b4c39;} .saddlebrown {background-color: #8b4513; color: #8b4513;} .sandybrown {background-color: #f4a460; color: #f4a460;} .seagreen {background-color: #2e8b57; color: #2e8b57;} .seagreen1 {background-color: #54ff9f; color: #54ff9f;} .seagreen2 {background-color: #4eee94; color: #4eee94;} .seagreen3 {background-color: #43cd80; color: #43cd80;} .seagreen4 {background-color: #2e8b57; color: #2e8b57;} .seashell {background-color: #fff5ee; color: #fff5ee;} .seashell1 {background-color: #fff5ee; color: #fff5ee;} .seashell2 {background-color: #eee5de; color: #eee5de;} .seashell3 {background-color: #cdc5bf; color: #cdc5bf;} .seashell4 {background-color: #8b8682; color: #8b8682;} .sienna {background-color: #a0522d; color: #a0522d;} .sienna1 {background-color: #ff8247; color: #ff8247;} .sienna2 {background-color: #ee7942; color: #ee7942;} .sienna3 {background-color: #cd6839; color: #cd6839;} .sienna4 {background-color: #8b4726; color: #8b4726;} .silver {background-color: #c0c0c0; color: #c0c0c0;} .skyblue {background-color: #87ceeb; color: #87ceeb;} .skyblue1 {background-color: #87ceff; color: #87ceff;} .skyblue2 {background-color: #7ec0ee; color: #7ec0ee;} .skyblue3 {background-color: #6ca6cd; color: #6ca6cd;} .skyblue4 {background-color: #4a708b; color: #4a708b;} .slateblue {background-color: #6a5acd; color: #6a5acd;} .slateblue1 {background-color: #836fff; color: #836fff;} .slateblue2 {background-color: #7a67ee; color: #7a67ee;} .slateblue3 {background-color: #6959cd; color: #6959cd;} .slateblue4 {background-color: #473c8b; color: #473c8b;} .slategray {background-color: #708090; color: #708090;} .slategray1 {background-color: #c6e2ff; color: #c6e2ff;} .slategray2 {background-color: #b9d3ee; color: #b9d3ee;} .slategray3 {background-color: #9fb6cd; color: #9fb6cd;} .slategray4 {background-color: #6c7b8b; color: #6c7b8b;} .slategrey {background-color: #708090; color: #708090;} .snow {background-color: #fffafa; color: #fffafa;} .snow1 {background-color: #fffafa; color: #fffafa;} .snow2 {background-color: #eee9e9; color: #eee9e9;} .snow3 {background-color: #cdc9c9; color: #cdc9c9;} .snow4 {background-color: #8b8989; color: #8b8989;} .springgreen {background-color: #00ff7f; color: #00ff7f;} .springgreen1 {background-color: #00ff7f; color: #00ff7f;} .springgreen2 {background-color: #00ee76; color: #00ee76;} .springgreen3 {background-color: #00cd66; color: #00cd66;} .springgreen4 {background-color: #008b45; color: #008b45;} .steelblue {background-color: #4682b4; color: #4682b4;} .steelblue1 {background-color: #63b8ff; color: #63b8ff;} .steelblue2 {background-color: #5cacee; color: #5cacee;} .steelblue3 {background-color: #4f94cd; color: #4f94cd;} .steelblue4 {background-color: #36648b; color: #36648b;} .tan {background-color: #d2b48c; color: #d2b48c;} .tan1 {background-color: #ffa54f; color: #ffa54f;} .tan2 {background-color: #ee9a49; color: #ee9a49;} .tan3 {background-color: #cd853f; color: #cd853f;} .tan4 {background-color: #8b5a2b; color: #8b5a2b;} .teal {background-color: #008080; color: #008080;} .thistle {background-color: #d8bfd8; color: #d8bfd8;} .thistle1 {background-color: #ffe1ff; color: #ffe1ff;} .thistle2 {background-color: #eed2ee; color: #eed2ee;} .thistle3 {background-color: #cdb5cd; color: #cdb5cd;} .thistle4 {background-color: #8b7b8b; color: #8b7b8b;} .tomato {background-color: #ff6347; color: #ff6347;} .tomato1 {background-color: #ff6347; color: #ff6347;} .tomato2 {background-color: #ee5c42; color: #ee5c42;} .tomato3 {background-color: #cd4f39; color: #cd4f39;} .tomato4 {background-color: #8b3626; color: #8b3626;} .turquoise {background-color: #40e0d0; color: #40e0d0;} .turquoise1 {background-color: #00f5ff; color: #00f5ff;} .turquoise2 {background-color: #00e5ee; color: #00e5ee;} .turquoise3 {background-color: #00c5cd; color: #00c5cd;} .turquoise4 {background-color: #00868b; color: #00868b;} .violet {background-color: #ee82ee; color: #ee82ee;} .violetred {background-color: #d02090; color: #d02090;} .violetred1 {background-color: #ff3e96; color: #ff3e96;} .violetred2 {background-color: #ee3a8c; color: #ee3a8c;} .violetred3 {background-color: #cd3278; color: #cd3278;} .violetred4 {background-color: #8b2252; color: #8b2252;} .wheat {background-color: #f5deb3; color: #f5deb3;} .wheat1 {background-color: #ffe7ba; color: #ffe7ba;} .wheat2 {background-color: #eed8ae; color: #eed8ae;} .wheat3 {background-color: #cdba96; color: #cdba96;} .wheat4 {background-color: #8b7e66; color: #8b7e66;} .white {background-color: #ffffff; color: #ffffff;} .whitesmoke {background-color: #f5f5f5; color: #f5f5f5;} .yellow {background-color: #ffff00; color: #ffff00;} .yellow1 {background-color: #ffff00; color: #ffff00;} .yellow2 {background-color: #eeee00; color: #eeee00;} .yellow3 {background-color: #cdcd00; color: #cdcd00;} .yellow4 {background-color: #8b8b00; color: #8b8b00;} .yellowgreen {background-color: #9acd32; color: #9acd32;} :doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_). .. role:: aliceblue .. role:: antiquewhite .. role:: antiquewhite1 .. role:: antiquewhite2 .. role:: antiquewhite3 .. role:: antiquewhite4 .. role:: aqua .. role:: aquamarine .. role:: aquamarine1 .. role:: aquamarine2 .. role:: aquamarine3 .. role:: aquamarine4 .. role:: azure .. role:: azure1 .. role:: azure2 .. role:: azure3 .. role:: azure4 .. role:: beige .. role:: bisque .. role:: bisque1 .. role:: bisque2 .. role:: bisque3 .. role:: bisque4 .. role:: black .. role:: blanchedalmond .. role:: blue .. role:: blue1 .. role:: blue2 .. role:: blue3 .. role:: blue4 .. role:: blueviolet .. role:: brown .. role:: brown1 .. role:: brown2 .. role:: brown3 .. role:: brown4 .. role:: burlywood .. role:: burlywood1 .. role:: burlywood2 .. role:: burlywood3 .. role:: burlywood4 .. role:: cadetblue .. role:: cadetblue1 .. role:: cadetblue2 .. role:: cadetblue3 .. role:: cadetblue4 .. role:: chartreuse .. role:: chartreuse1 .. role:: chartreuse2 .. role:: chartreuse3 .. role:: chartreuse4 .. role:: chocolate .. role:: chocolate1 .. role:: chocolate2 .. role:: chocolate3 .. role:: chocolate4 .. role:: coral .. role:: coral1 .. role:: coral2 .. role:: coral3 .. role:: coral4 .. role:: cornflowerblue .. role:: cornsilk .. role:: cornsilk1 .. role:: cornsilk2 .. role:: cornsilk3 .. role:: cornsilk4 .. role:: crimson .. role:: cyan .. role:: cyan1 .. role:: cyan2 .. role:: cyan3 .. role:: cyan4 .. role:: darkblue .. role:: darkcyan .. role:: darkgoldenrod .. role:: darkgoldenrod1 .. role:: darkgoldenrod2 .. role:: darkgoldenrod3 .. role:: darkgoldenrod4 .. role:: darkgray .. role:: darkgreen .. role:: darkgrey .. role:: darkkhaki .. role:: darkmagenta .. role:: darkolivegreen .. role:: darkolivegreen1 .. role:: darkolivegreen2 .. role:: darkolivegreen3 .. role:: darkolivegreen4 .. role:: darkorange .. role:: darkorange1 .. role:: darkorange2 .. role:: darkorange3 .. role:: darkorange4 .. role:: darkorchid .. role:: darkorchid1 .. role:: darkorchid2 .. role:: darkorchid3 .. role:: darkorchid4 .. role:: darkred .. role:: darksalmon .. role:: darkseagreen .. role:: darkseagreen1 .. role:: darkseagreen2 .. role:: darkseagreen3 .. role:: darkseagreen4 .. role:: darkslateblue .. role:: darkslategray .. role:: darkslategray1 .. role:: darkslategray2 .. role:: darkslategray3 .. role:: darkslategray4 .. role:: darkslategrey .. role:: darkturquoise .. role:: darkviolet .. role:: deeppink .. role:: deeppink1 .. role:: deeppink2 .. role:: deeppink3 .. role:: deeppink4 .. role:: deepskyblue .. role:: deepskyblue1 .. role:: deepskyblue2 .. role:: deepskyblue3 .. role:: deepskyblue4 .. role:: dimgray .. role:: dimgrey .. role:: dodgerblue .. role:: dodgerblue1 .. role:: dodgerblue2 .. role:: dodgerblue3 .. role:: dodgerblue4 .. role:: firebrick .. role:: firebrick1 .. role:: firebrick2 .. role:: firebrick3 .. role:: firebrick4 .. role:: floralwhite .. role:: forestgreen .. role:: fuchsia .. role:: gainsboro .. role:: ghostwhite .. role:: gold .. role:: gold1 .. role:: gold2 .. role:: gold3 .. role:: gold4 .. role:: goldenrod .. role:: goldenrod1 .. role:: goldenrod2 .. role:: goldenrod3 .. role:: goldenrod4 .. role:: gray .. role:: gray0 .. role:: gray1 .. role:: gray2 .. role:: gray3 .. role:: gray4 .. role:: gray5 .. role:: gray6 .. role:: gray7 .. role:: gray8 .. role:: gray9 .. role:: gray10 .. role:: gray11 .. role:: gray12 .. role:: gray13 .. role:: gray14 .. role:: gray15 .. role:: gray16 .. role:: gray17 .. role:: gray18 .. role:: gray19 .. role:: gray20 .. role:: gray21 .. role:: gray22 .. role:: gray23 .. role:: gray24 .. role:: gray25 .. role:: gray26 .. role:: gray27 .. role:: gray28 .. role:: gray29 .. role:: gray30 .. role:: gray31 .. role:: gray32 .. role:: gray33 .. role:: gray34 .. role:: gray35 .. role:: gray36 .. role:: gray37 .. role:: gray38 .. role:: gray39 .. role:: gray40 .. role:: gray41 .. role:: gray42 .. role:: gray43 .. role:: gray44 .. role:: gray45 .. role:: gray46 .. role:: gray47 .. role:: gray48 .. role:: gray49 .. role:: gray50 .. role:: gray51 .. role:: gray52 .. role:: gray53 .. role:: gray54 .. role:: gray55 .. role:: gray56 .. role:: gray57 .. role:: gray58 .. role:: gray59 .. role:: gray60 .. role:: gray61 .. role:: gray62 .. role:: gray63 .. role:: gray64 .. role:: gray65 .. role:: gray66 .. role:: gray67 .. role:: gray68 .. role:: gray69 .. role:: gray70 .. role:: gray71 .. role:: gray72 .. role:: gray73 .. role:: gray74 .. role:: gray75 .. role:: gray76 .. role:: gray77 .. role:: gray78 .. role:: gray79 .. role:: gray80 .. role:: gray81 .. role:: gray82 .. role:: gray83 .. role:: gray84 .. role:: gray85 .. role:: gray86 .. role:: gray87 .. role:: gray88 .. role:: gray89 .. role:: gray90 .. role:: gray91 .. role:: gray92 .. role:: gray93 .. role:: gray94 .. role:: gray95 .. role:: gray96 .. role:: gray97 .. role:: gray98 .. role:: gray99 .. role:: gray100 .. role:: green .. role:: green1 .. role:: green2 .. role:: green3 .. role:: green4 .. role:: greenyellow .. role:: grey .. role:: grey0 .. role:: grey1 .. role:: grey2 .. role:: grey3 .. role:: grey4 .. role:: grey5 .. role:: grey6 .. role:: grey7 .. role:: grey8 .. role:: grey9 .. role:: grey10 .. role:: grey11 .. role:: grey12 .. role:: grey13 .. role:: grey14 .. role:: grey15 .. role:: grey16 .. role:: grey17 .. role:: grey18 .. role:: grey19 .. role:: grey20 .. role:: grey21 .. role:: grey22 .. role:: grey23 .. role:: grey24 .. role:: grey25 .. role:: grey26 .. role:: grey27 .. role:: grey28 .. role:: grey29 .. role:: grey30 .. role:: grey31 .. role:: grey32 .. role:: grey33 .. role:: grey34 .. role:: grey35 .. role:: grey36 .. role:: grey37 .. role:: grey38 .. role:: grey39 .. role:: grey40 .. role:: grey41 .. role:: grey42 .. role:: grey43 .. role:: grey44 .. role:: grey45 .. role:: grey46 .. role:: grey47 .. role:: grey48 .. role:: grey49 .. role:: grey50 .. role:: grey51 .. role:: grey52 .. role:: grey53 .. role:: grey54 .. role:: grey55 .. role:: grey56 .. role:: grey57 .. role:: grey58 .. role:: grey59 .. role:: grey60 .. role:: grey61 .. role:: grey62 .. role:: grey63 .. role:: grey64 .. role:: grey65 .. role:: grey66 .. role:: grey67 .. role:: grey68 .. role:: grey69 .. role:: grey70 .. role:: grey71 .. role:: grey72 .. role:: grey73 .. role:: grey74 .. role:: grey75 .. role:: grey76 .. role:: grey77 .. role:: grey78 .. role:: grey79 .. role:: grey80 .. role:: grey81 .. role:: grey82 .. role:: grey83 .. role:: grey84 .. role:: grey85 .. role:: grey86 .. role:: grey87 .. role:: grey88 .. role:: grey89 .. role:: grey90 .. role:: grey91 .. role:: grey92 .. role:: grey93 .. role:: grey94 .. role:: grey95 .. role:: grey96 .. role:: grey97 .. role:: grey98 .. role:: grey99 .. role:: grey100 .. role:: honeydew .. role:: honeydew1 .. role:: honeydew2 .. role:: honeydew3 .. role:: honeydew4 .. role:: hotpink .. role:: hotpink1 .. role:: hotpink2 .. role:: hotpink3 .. role:: hotpink4 .. role:: indianred .. role:: indianred1 .. role:: indianred2 .. role:: indianred3 .. role:: indianred4 .. role:: indigo .. role:: ivory .. role:: ivory1 .. role:: ivory2 .. role:: ivory3 .. role:: ivory4 .. role:: khaki .. role:: khaki1 .. role:: khaki2 .. role:: khaki3 .. role:: khaki4 .. role:: lavender .. role:: lavenderblush .. role:: lavenderblush1 .. role:: lavenderblush2 .. role:: lavenderblush3 .. role:: lavenderblush4 .. role:: lawngreen .. role:: lemonchiffon .. role:: lemonchiffon1 .. role:: lemonchiffon2 .. role:: lemonchiffon3 .. role:: lemonchiffon4 .. role:: lightblue .. role:: lightblue1 .. role:: lightblue2 .. role:: lightblue3 .. role:: lightblue4 .. role:: lightcoral .. role:: lightcyan .. role:: lightcyan1 .. role:: lightcyan2 .. role:: lightcyan3 .. role:: lightcyan4 .. role:: lightgoldenrod .. role:: lightgoldenrod1 .. role:: lightgoldenrod2 .. role:: lightgoldenrod3 .. role:: lightgoldenrod4 .. role:: lightgoldenrodyellow .. role:: lightgray .. role:: lightgreen .. role:: lightgrey .. role:: lightpink .. role:: lightpink1 .. role:: lightpink2 .. role:: lightpink3 .. role:: lightpink4 .. role:: lightsalmon .. role:: lightsalmon1 .. role:: lightsalmon2 .. role:: lightsalmon3 .. role:: lightsalmon4 .. role:: lightseagreen .. role:: lightskyblue .. role:: lightskyblue1 .. role:: lightskyblue2 .. role:: lightskyblue3 .. role:: lightskyblue4 .. role:: lightslateblue .. role:: lightslategray .. role:: lightslategrey .. role:: lightsteelblue .. role:: lightsteelblue1 .. role:: lightsteelblue2 .. role:: lightsteelblue3 .. role:: lightsteelblue4 .. role:: lightyellow .. role:: lightyellow1 .. role:: lightyellow2 .. role:: lightyellow3 .. role:: lightyellow4 .. role:: limegreen .. role:: lime .. role:: linen .. role:: magenta .. role:: magenta1 .. role:: magenta2 .. role:: magenta3 .. role:: magenta4 .. role:: maroon .. role:: maroon1 .. role:: maroon2 .. role:: maroon3 .. role:: maroon4 .. role:: mediumaquamarine .. role:: mediumblue .. role:: mediumorchid .. role:: mediumorchid1 .. role:: mediumorchid2 .. role:: mediumorchid3 .. role:: mediumorchid4 .. role:: mediumpurple .. role:: mediumpurple1 .. role:: mediumpurple2 .. role:: mediumpurple3 .. role:: mediumpurple4 .. role:: mediumseagreen .. role:: mediumslateblue .. role:: mediumspringgreen .. role:: mediumturquoise .. role:: mediumvioletred .. role:: midnightblue .. role:: mintcream .. role:: mistyrose .. role:: mistyrose1 .. role:: mistyrose2 .. role:: mistyrose3 .. role:: mistyrose4 .. role:: moccasin .. role:: navajowhite .. role:: navajowhite1 .. role:: navajowhite2 .. role:: navajowhite3 .. role:: navajowhite4 .. role:: navy .. role:: navyblue .. role:: oldlace .. role:: olive .. role:: olivedrab .. role:: olivedrab1 .. role:: olivedrab2 .. role:: olivedrab3 .. role:: olivedrab4 .. role:: orange .. role:: orange1 .. role:: orange2 .. role:: orange3 .. role:: orange4 .. role:: orangered .. role:: orangered1 .. role:: orangered2 .. role:: orangered3 .. role:: orangered4 .. role:: orchid .. role:: orchid1 .. role:: orchid2 .. role:: orchid3 .. role:: orchid4 .. role:: palegoldenrod .. role:: palegreen .. role:: palegreen1 .. role:: palegreen2 .. role:: palegreen3 .. role:: palegreen4 .. role:: paleturquoise .. role:: paleturquoise1 .. role:: paleturquoise2 .. role:: paleturquoise3 .. role:: paleturquoise4 .. role:: palevioletred .. role:: palevioletred1 .. role:: palevioletred2 .. role:: palevioletred3 .. role:: palevioletred4 .. role:: papayawhip .. role:: peachpuff .. role:: peachpuff1 .. role:: peachpuff2 .. role:: peachpuff3 .. role:: peachpuff4 .. role:: peru .. role:: pink .. role:: pink1 .. role:: pink2 .. role:: pink3 .. role:: pink4 .. role:: plum .. role:: plum1 .. role:: plum2 .. role:: plum3 .. role:: plum4 .. role:: powderblue .. role:: purple .. role:: purple1 .. role:: purple2 .. role:: purple3 .. role:: purple4 .. role:: red .. role:: red1 .. role:: red2 .. role:: red3 .. role:: red4 .. role:: rosybrown .. role:: rosybrown1 .. role:: rosybrown2 .. role:: rosybrown3 .. role:: rosybrown4 .. role:: royalblue .. role:: royalblue1 .. role:: royalblue2 .. role:: royalblue3 .. role:: royalblue4 .. role:: saddlebrown .. role:: salmon .. role:: salmon1 .. role:: salmon2 .. role:: salmon3 .. role:: salmon4 .. role:: sandybrown .. role:: seagreen .. role:: seagreen1 .. role:: seagreen2 .. role:: seagreen3 .. role:: seagreen4 .. role:: seashell .. role:: seashell1 .. role:: seashell2 .. role:: seashell3 .. role:: seashell4 .. role:: sienna .. role:: sienna1 .. role:: sienna2 .. role:: sienna3 .. role:: sienna4 .. role:: silver .. role:: skyblue .. role:: skyblue1 .. role:: skyblue2 .. role:: skyblue3 .. role:: skyblue4 .. role:: slateblue .. role:: slateblue1 .. role:: slateblue2 .. role:: slateblue3 .. role:: slateblue4 .. role:: slategray .. role:: slategray1 .. role:: slategray2 .. role:: slategray3 .. role:: slategray4 .. role:: slategrey .. role:: snow .. role:: snow1 .. role:: snow2 .. role:: snow3 .. role:: snow4 .. role:: springgreen .. role:: springgreen1 .. role:: springgreen2 .. role:: springgreen3 .. role:: springgreen4 .. role:: steelblue .. role:: steelblue1 .. role:: steelblue2 .. role:: steelblue3 .. role:: steelblue4 .. role:: tan .. role:: tan1 .. role:: tan2 .. role:: tan3 .. role:: tan4 .. role:: teal .. role:: thistle .. role:: thistle1 .. role:: thistle2 .. role:: thistle3 .. role:: thistle4 .. role:: tomato .. role:: tomato1 .. role:: tomato2 .. role:: tomato3 .. role:: tomato4 .. role:: turquoise .. role:: turquoise1 .. role:: turquoise2 .. role:: turquoise3 .. role:: turquoise4 .. role:: violet .. role:: violetred .. role:: violetred1 .. role:: violetred2 .. role:: violetred3 .. role:: violetred4 .. role:: wheat .. role:: wheat1 .. role:: wheat2 .. role:: wheat3 .. role:: wheat4 .. role:: white .. role:: whitesmoke .. role:: yellow .. role:: yellow1 .. role:: yellow2 .. role:: yellow3 .. role:: yellow4 .. role:: yellowgreen ========================== ====================================================================================================== Name Color ========================== ====================================================================================================== ``aliceblue`` :aliceblue:`████████` ``antiquewhite`` :antiquewhite:`████████` ``antiquewhite1`` :antiquewhite1:`████████` ``antiquewhite2`` :antiquewhite2:`████████` ``antiquewhite3`` :antiquewhite3:`████████` ``antiquewhite4`` :antiquewhite4:`████████` ``aqua`` :aqua:`████████` ``aquamarine`` :aquamarine:`████████` ``aquamarine1`` :aquamarine1:`████████` ``aquamarine2`` :aquamarine2:`████████` ``aquamarine3`` :aquamarine3:`████████` ``aquamarine4`` :aquamarine4:`████████` ``azure`` :azure:`████████` ``azure1`` :azure1:`████████` ``azure2`` :azure2:`████████` ``azure3`` :azure3:`████████` ``azure4`` :azure4:`████████` ``beige`` :beige:`████████` ``bisque`` :bisque:`████████` ``bisque1`` :bisque1:`████████` ``bisque2`` :bisque2:`████████` ``bisque3`` :bisque3:`████████` ``bisque4`` :bisque4:`████████` ``black`` :black:`████████` ``blanchedalmond`` :blanchedalmond:`████████` ``blue`` :blue:`████████` ``blue1`` :blue1:`████████` ``blue2`` :blue2:`████████` ``blue3`` :blue3:`████████` ``blue4`` :blue4:`████████` ``blueviolet`` :blueviolet:`████████` ``brown`` :brown:`████████` ``brown1`` :brown1:`████████` ``brown2`` :brown2:`████████` ``brown3`` :brown3:`████████` ``brown4`` :brown4:`████████` ``burlywood`` :burlywood:`████████` ``burlywood1`` :burlywood1:`████████` ``burlywood2`` :burlywood2:`████████` ``burlywood3`` :burlywood3:`████████` ``burlywood4`` :burlywood4:`████████` ``cadetblue`` :cadetblue:`████████` ``cadetblue1`` :cadetblue1:`████████` ``cadetblue2`` :cadetblue2:`████████` ``cadetblue3`` :cadetblue3:`████████` ``cadetblue4`` :cadetblue4:`████████` ``chartreuse`` :chartreuse:`████████` ``chartreuse1`` :chartreuse1:`████████` ``chartreuse2`` :chartreuse2:`████████` ``chartreuse3`` :chartreuse3:`████████` ``chartreuse4`` :chartreuse4:`████████` ``chocolate`` :chocolate:`████████` ``chocolate1`` :chocolate1:`████████` ``chocolate2`` :chocolate2:`████████` ``chocolate3`` :chocolate3:`████████` ``chocolate4`` :chocolate4:`████████` ``coral`` :coral:`████████` ``coral1`` :coral1:`████████` ``coral2`` :coral2:`████████` ``coral3`` :coral3:`████████` ``coral4`` :coral4:`████████` ``cornflowerblue`` :cornflowerblue:`████████` ``cornsilk`` :cornsilk:`████████` ``cornsilk1`` :cornsilk1:`████████` ``cornsilk2`` :cornsilk2:`████████` ``cornsilk3`` :cornsilk3:`████████` ``cornsilk4`` :cornsilk4:`████████` ``crimson`` :crimson:`████████` ``cyan`` :cyan:`████████` ``cyan1`` :cyan1:`████████` ``cyan2`` :cyan2:`████████` ``cyan3`` :cyan3:`████████` ``cyan4`` :cyan4:`████████` ``darkblue`` :darkblue:`████████` ``darkcyan`` :darkcyan:`████████` ``darkgoldenrod`` :darkgoldenrod:`████████` ``darkgoldenrod1`` :darkgoldenrod1:`████████` ``darkgoldenrod2`` :darkgoldenrod2:`████████` ``darkgoldenrod3`` :darkgoldenrod3:`████████` ``darkgoldenrod4`` :darkgoldenrod4:`████████` ``darkgray`` :darkgray:`████████` ``darkgreen`` :darkgreen:`████████` ``darkgrey`` :darkgrey:`████████` ``darkkhaki`` :darkkhaki:`████████` ``darkmagenta`` :darkmagenta:`████████` ``darkolivegreen`` :darkolivegreen:`████████` ``darkolivegreen1`` :darkolivegreen1:`████████` ``darkolivegreen2`` :darkolivegreen2:`████████` ``darkolivegreen3`` :darkolivegreen3:`████████` ``darkolivegreen4`` :darkolivegreen4:`████████` ``darkorange`` :darkorange:`████████` ``darkorange1`` :darkorange1:`████████` ``darkorange2`` :darkorange2:`████████` ``darkorange3`` :darkorange3:`████████` ``darkorange4`` :darkorange4:`████████` ``darkorchid`` :darkorchid:`████████` ``darkorchid1`` :darkorchid1:`████████` ``darkorchid2`` :darkorchid2:`████████` ``darkorchid3`` :darkorchid3:`████████` ``darkorchid4`` :darkorchid4:`████████` ``darkred`` :darkred:`████████` ``darksalmon`` :darksalmon:`████████` ``darkseagreen`` :darkseagreen:`████████` ``darkseagreen1`` :darkseagreen1:`████████` ``darkseagreen2`` :darkseagreen2:`████████` ``darkseagreen3`` :darkseagreen3:`████████` ``darkseagreen4`` :darkseagreen4:`████████` ``darkslateblue`` :darkslateblue:`████████` ``darkslategray`` :darkslategray:`████████` ``darkslategray1`` :darkslategray1:`████████` ``darkslategray2`` :darkslategray2:`████████` ``darkslategray3`` :darkslategray3:`████████` ``darkslategray4`` :darkslategray4:`████████` ``darkslategrey`` :darkslategrey:`████████` ``darkturquoise`` :darkturquoise:`████████` ``darkviolet`` :darkviolet:`████████` ``deeppink`` :deeppink:`████████` ``deeppink1`` :deeppink1:`████████` ``deeppink2`` :deeppink2:`████████` ``deeppink3`` :deeppink3:`████████` ``deeppink4`` :deeppink4:`████████` ``deepskyblue`` :deepskyblue:`████████` ``deepskyblue1`` :deepskyblue1:`████████` ``deepskyblue2`` :deepskyblue2:`████████` ``deepskyblue3`` :deepskyblue3:`████████` ``deepskyblue4`` :deepskyblue4:`████████` ``dimgray`` :dimgray:`████████` ``dimgrey`` :dimgrey:`████████` ``dodgerblue`` :dodgerblue:`████████` ``dodgerblue1`` :dodgerblue1:`████████` ``dodgerblue2`` :dodgerblue2:`████████` ``dodgerblue3`` :dodgerblue3:`████████` ``dodgerblue4`` :dodgerblue4:`████████` ``firebrick`` :firebrick:`████████` ``firebrick1`` :firebrick1:`████████` ``firebrick2`` :firebrick2:`████████` ``firebrick3`` :firebrick3:`████████` ``firebrick4`` :firebrick4:`████████` ``floralwhite`` :floralwhite:`████████` ``forestgreen`` :forestgreen:`████████` ``fuchsia`` :fuchsia:`████████` ``gainsboro`` :gainsboro:`████████` ``ghostwhite`` :ghostwhite:`████████` ``gold`` :gold:`████████` ``gold1`` :gold1:`████████` ``gold2`` :gold2:`████████` ``gold3`` :gold3:`████████` ``gold4`` :gold4:`████████` ``goldenrod`` :goldenrod:`████████` ``goldenrod1`` :goldenrod1:`████████` ``goldenrod2`` :goldenrod2:`████████` ``goldenrod3`` :goldenrod3:`████████` ``goldenrod4`` :goldenrod4:`████████` ``gray`` :gray:`████████` ``gray0`` :gray0:`████████` ``gray1`` :gray1:`████████` ``gray2`` :gray2:`████████` ``gray3`` :gray3:`████████` ``gray4`` :gray4:`████████` ``gray5`` :gray5:`████████` ``gray6`` :gray6:`████████` ``gray7`` :gray7:`████████` ``gray8`` :gray8:`████████` ``gray9`` :gray9:`████████` ``gray10`` :gray10:`████████` ``gray11`` :gray11:`████████` ``gray12`` :gray12:`████████` ``gray13`` :gray13:`████████` ``gray14`` :gray14:`████████` ``gray15`` :gray15:`████████` ``gray16`` :gray16:`████████` ``gray17`` :gray17:`████████` ``gray18`` :gray18:`████████` ``gray19`` :gray19:`████████` ``gray20`` :gray20:`████████` ``gray21`` :gray21:`████████` ``gray22`` :gray22:`████████` ``gray23`` :gray23:`████████` ``gray24`` :gray24:`████████` ``gray25`` :gray25:`████████` ``gray26`` :gray26:`████████` ``gray27`` :gray27:`████████` ``gray28`` :gray28:`████████` ``gray29`` :gray29:`████████` ``gray30`` :gray30:`████████` ``gray31`` :gray31:`████████` ``gray32`` :gray32:`████████` ``gray33`` :gray33:`████████` ``gray34`` :gray34:`████████` ``gray35`` :gray35:`████████` ``gray36`` :gray36:`████████` ``gray37`` :gray37:`████████` ``gray38`` :gray38:`████████` ``gray39`` :gray39:`████████` ``gray40`` :gray40:`████████` ``gray41`` :gray41:`████████` ``gray42`` :gray42:`████████` ``gray43`` :gray43:`████████` ``gray44`` :gray44:`████████` ``gray45`` :gray45:`████████` ``gray46`` :gray46:`████████` ``gray47`` :gray47:`████████` ``gray48`` :gray48:`████████` ``gray49`` :gray49:`████████` ``gray50`` :gray50:`████████` ``gray51`` :gray51:`████████` ``gray52`` :gray52:`████████` ``gray53`` :gray53:`████████` ``gray54`` :gray54:`████████` ``gray55`` :gray55:`████████` ``gray56`` :gray56:`████████` ``gray57`` :gray57:`████████` ``gray58`` :gray58:`████████` ``gray59`` :gray59:`████████` ``gray60`` :gray60:`████████` ``gray61`` :gray61:`████████` ``gray62`` :gray62:`████████` ``gray63`` :gray63:`████████` ``gray64`` :gray64:`████████` ``gray65`` :gray65:`████████` ``gray66`` :gray66:`████████` ``gray67`` :gray67:`████████` ``gray68`` :gray68:`████████` ``gray69`` :gray69:`████████` ``gray70`` :gray70:`████████` ``gray71`` :gray71:`████████` ``gray72`` :gray72:`████████` ``gray73`` :gray73:`████████` ``gray74`` :gray74:`████████` ``gray75`` :gray75:`████████` ``gray76`` :gray76:`████████` ``gray77`` :gray77:`████████` ``gray78`` :gray78:`████████` ``gray79`` :gray79:`████████` ``gray80`` :gray80:`████████` ``gray81`` :gray81:`████████` ``gray82`` :gray82:`████████` ``gray83`` :gray83:`████████` ``gray84`` :gray84:`████████` ``gray85`` :gray85:`████████` ``gray86`` :gray86:`████████` ``gray87`` :gray87:`████████` ``gray88`` :gray88:`████████` ``gray89`` :gray89:`████████` ``gray90`` :gray90:`████████` ``gray91`` :gray91:`████████` ``gray92`` :gray92:`████████` ``gray93`` :gray93:`████████` ``gray94`` :gray94:`████████` ``gray95`` :gray95:`████████` ``gray96`` :gray96:`████████` ``gray97`` :gray97:`████████` ``gray98`` :gray98:`████████` ``gray99`` :gray99:`████████` ``gray100`` :gray100:`████████` ``green`` :green:`████████` ``green1`` :green1:`████████` ``green2`` :green2:`████████` ``green3`` :green3:`████████` ``green4`` :green4:`████████` ``greenyellow`` :greenyellow:`████████` ``grey`` :grey:`████████` ``grey0`` :grey0:`████████` ``grey1`` :grey1:`████████` ``grey2`` :grey2:`████████` ``grey3`` :grey3:`████████` ``grey4`` :grey4:`████████` ``grey5`` :grey5:`████████` ``grey6`` :grey6:`████████` ``grey7`` :grey7:`████████` ``grey8`` :grey8:`████████` ``grey9`` :grey9:`████████` ``grey10`` :grey10:`████████` ``grey11`` :grey11:`████████` ``grey12`` :grey12:`████████` ``grey13`` :grey13:`████████` ``grey14`` :grey14:`████████` ``grey15`` :grey15:`████████` ``grey16`` :grey16:`████████` ``grey17`` :grey17:`████████` ``grey18`` :grey18:`████████` ``grey19`` :grey19:`████████` ``grey20`` :grey20:`████████` ``grey21`` :grey21:`████████` ``grey22`` :grey22:`████████` ``grey23`` :grey23:`████████` ``grey24`` :grey24:`████████` ``grey25`` :grey25:`████████` ``grey26`` :grey26:`████████` ``grey27`` :grey27:`████████` ``grey28`` :grey28:`████████` ``grey29`` :grey29:`████████` ``grey30`` :grey30:`████████` ``grey31`` :grey31:`████████` ``grey32`` :grey32:`████████` ``grey33`` :grey33:`████████` ``grey34`` :grey34:`████████` ``grey35`` :grey35:`████████` ``grey36`` :grey36:`████████` ``grey37`` :grey37:`████████` ``grey38`` :grey38:`████████` ``grey39`` :grey39:`████████` ``grey40`` :grey40:`████████` ``grey41`` :grey41:`████████` ``grey42`` :grey42:`████████` ``grey43`` :grey43:`████████` ``grey44`` :grey44:`████████` ``grey45`` :grey45:`████████` ``grey46`` :grey46:`████████` ``grey47`` :grey47:`████████` ``grey48`` :grey48:`████████` ``grey49`` :grey49:`████████` ``grey50`` :grey50:`████████` ``grey51`` :grey51:`████████` ``grey52`` :grey52:`████████` ``grey53`` :grey53:`████████` ``grey54`` :grey54:`████████` ``grey55`` :grey55:`████████` ``grey56`` :grey56:`████████` ``grey57`` :grey57:`████████` ``grey58`` :grey58:`████████` ``grey59`` :grey59:`████████` ``grey60`` :grey60:`████████` ``grey61`` :grey61:`████████` ``grey62`` :grey62:`████████` ``grey63`` :grey63:`████████` ``grey64`` :grey64:`████████` ``grey65`` :grey65:`████████` ``grey66`` :grey66:`████████` ``grey67`` :grey67:`████████` ``grey68`` :grey68:`████████` ``grey69`` :grey69:`████████` ``grey70`` :grey70:`████████` ``grey71`` :grey71:`████████` ``grey72`` :grey72:`████████` ``grey73`` :grey73:`████████` ``grey74`` :grey74:`████████` ``grey75`` :grey75:`████████` ``grey76`` :grey76:`████████` ``grey77`` :grey77:`████████` ``grey78`` :grey78:`████████` ``grey79`` :grey79:`████████` ``grey80`` :grey80:`████████` ``grey81`` :grey81:`████████` ``grey82`` :grey82:`████████` ``grey83`` :grey83:`████████` ``grey84`` :grey84:`████████` ``grey85`` :grey85:`████████` ``grey86`` :grey86:`████████` ``grey87`` :grey87:`████████` ``grey88`` :grey88:`████████` ``grey89`` :grey89:`████████` ``grey90`` :grey90:`████████` ``grey91`` :grey91:`████████` ``grey92`` :grey92:`████████` ``grey93`` :grey93:`████████` ``grey94`` :grey94:`████████` ``grey95`` :grey95:`████████` ``grey96`` :grey96:`████████` ``grey97`` :grey97:`████████` ``grey98`` :grey98:`████████` ``grey99`` :grey99:`████████` ``grey100`` :grey100:`████████` ``honeydew`` :honeydew:`████████` ``honeydew1`` :honeydew1:`████████` ``honeydew2`` :honeydew2:`████████` ``honeydew3`` :honeydew3:`████████` ``honeydew4`` :honeydew4:`████████` ``hotpink`` :hotpink:`████████` ``hotpink1`` :hotpink1:`████████` ``hotpink2`` :hotpink2:`████████` ``hotpink3`` :hotpink3:`████████` ``hotpink4`` :hotpink4:`████████` ``indianred`` :indianred:`████████` ``indianred1`` :indianred1:`████████` ``indianred2`` :indianred2:`████████` ``indianred3`` :indianred3:`████████` ``indianred4`` :indianred4:`████████` ``indigo`` :indigo:`████████` ``ivory`` :ivory:`████████` ``ivory1`` :ivory1:`████████` ``ivory2`` :ivory2:`████████` ``ivory3`` :ivory3:`████████` ``ivory4`` :ivory4:`████████` ``khaki`` :khaki:`████████` ``khaki1`` :khaki1:`████████` ``khaki2`` :khaki2:`████████` ``khaki3`` :khaki3:`████████` ``khaki4`` :khaki4:`████████` ``lavender`` :lavender:`████████` ``lavenderblush`` :lavenderblush:`████████` ``lavenderblush1`` :lavenderblush1:`████████` ``lavenderblush2`` :lavenderblush2:`████████` ``lavenderblush3`` :lavenderblush3:`████████` ``lavenderblush4`` :lavenderblush4:`████████` ``lawngreen`` :lawngreen:`████████` ``lemonchiffon`` :lemonchiffon:`████████` ``lemonchiffon1`` :lemonchiffon1:`████████` ``lemonchiffon2`` :lemonchiffon2:`████████` ``lemonchiffon3`` :lemonchiffon3:`████████` ``lemonchiffon4`` :lemonchiffon4:`████████` ``lightblue`` :lightblue:`████████` ``lightblue1`` :lightblue1:`████████` ``lightblue2`` :lightblue2:`████████` ``lightblue3`` :lightblue3:`████████` ``lightblue4`` :lightblue4:`████████` ``lightcoral`` :lightcoral:`████████` ``lightcyan`` :lightcyan:`████████` ``lightcyan1`` :lightcyan1:`████████` ``lightcyan2`` :lightcyan2:`████████` ``lightcyan3`` :lightcyan3:`████████` ``lightcyan4`` :lightcyan4:`████████` ``lightgoldenrod`` :lightgoldenrod:`████████` ``lightgoldenrod1`` :lightgoldenrod1:`████████` ``lightgoldenrod2`` :lightgoldenrod2:`████████` ``lightgoldenrod3`` :lightgoldenrod3:`████████` ``lightgoldenrod4`` :lightgoldenrod4:`████████` ``lightgoldenrodyellow`` :lightgoldenrodyellow:`████████` ``lightgray`` :lightgray:`████████` ``lightgreen`` :lightgreen:`████████` ``lightgrey`` :lightgrey:`████████` ``lightpink`` :lightpink:`████████` ``lightpink1`` :lightpink1:`████████` ``lightpink2`` :lightpink2:`████████` ``lightpink3`` :lightpink3:`████████` ``lightpink4`` :lightpink4:`████████` ``lightsalmon`` :lightsalmon:`████████` ``lightsalmon1`` :lightsalmon1:`████████` ``lightsalmon2`` :lightsalmon2:`████████` ``lightsalmon3`` :lightsalmon3:`████████` ``lightsalmon4`` :lightsalmon4:`████████` ``lightseagreen`` :lightseagreen:`████████` ``lightskyblue`` :lightskyblue:`████████` ``lightskyblue1`` :lightskyblue1:`████████` ``lightskyblue2`` :lightskyblue2:`████████` ``lightskyblue3`` :lightskyblue3:`████████` ``lightskyblue4`` :lightskyblue4:`████████` ``lightslateblue`` :lightslateblue:`████████` ``lightslategray`` :lightslategray:`████████` ``lightslategrey`` :lightslategrey:`████████` ``lightsteelblue`` :lightsteelblue:`████████` ``lightsteelblue1`` :lightsteelblue1:`████████` ``lightsteelblue2`` :lightsteelblue2:`████████` ``lightsteelblue3`` :lightsteelblue3:`████████` ``lightsteelblue4`` :lightsteelblue4:`████████` ``lightyellow`` :lightyellow:`████████` ``lightyellow1`` :lightyellow1:`████████` ``lightyellow2`` :lightyellow2:`████████` ``lightyellow3`` :lightyellow3:`████████` ``lightyellow4`` :lightyellow4:`████████` ``lime`` :lime:`████████` ``limegreen`` :limegreen:`████████` ``linen`` :linen:`████████` ``magenta`` :magenta:`████████` ``magenta1`` :magenta1:`████████` ``magenta2`` :magenta2:`████████` ``magenta3`` :magenta3:`████████` ``magenta4`` :magenta4:`████████` ``maroon`` :maroon:`████████` ``maroon1`` :maroon1:`████████` ``maroon2`` :maroon2:`████████` ``maroon3`` :maroon3:`████████` ``maroon4`` :maroon4:`████████` ``mediumaquamarine`` :mediumaquamarine:`████████` ``mediumblue`` :mediumblue:`████████` ``mediumorchid`` :mediumorchid:`████████` ``mediumorchid1`` :mediumorchid1:`████████` ``mediumorchid2`` :mediumorchid2:`████████` ``mediumorchid3`` :mediumorchid3:`████████` ``mediumorchid4`` :mediumorchid4:`████████` ``mediumpurple`` :mediumpurple:`████████` ``mediumpurple1`` :mediumpurple1:`████████` ``mediumpurple2`` :mediumpurple2:`████████` ``mediumpurple3`` :mediumpurple3:`████████` ``mediumpurple4`` :mediumpurple4:`████████` ``mediumseagreen`` :mediumseagreen:`████████` ``mediumslateblue`` :mediumslateblue:`████████` ``mediumspringgreen`` :mediumspringgreen:`████████` ``mediumturquoise`` :mediumturquoise:`████████` ``mediumvioletred`` :mediumvioletred:`████████` ``midnightblue`` :midnightblue:`████████` ``mintcream`` :mintcream:`████████` ``mistyrose`` :mistyrose:`████████` ``mistyrose1`` :mistyrose1:`████████` ``mistyrose2`` :mistyrose2:`████████` ``mistyrose3`` :mistyrose3:`████████` ``mistyrose4`` :mistyrose4:`████████` ``moccasin`` :moccasin:`████████` ``navajowhite`` :navajowhite:`████████` ``navajowhite1`` :navajowhite1:`████████` ``navajowhite2`` :navajowhite2:`████████` ``navajowhite3`` :navajowhite3:`████████` ``navajowhite4`` :navajowhite4:`████████` ``navy`` :navy:`████████` ``navyblue`` :navyblue:`████████` ``oldlace`` :oldlace:`████████` ``olive`` :olive:`████████` ``olivedrab`` :olivedrab:`████████` ``olivedrab1`` :olivedrab1:`████████` ``olivedrab2`` :olivedrab2:`████████` ``olivedrab3`` :olivedrab3:`████████` ``olivedrab4`` :olivedrab4:`████████` ``orange`` :orange:`████████` ``orange1`` :orange1:`████████` ``orange2`` :orange2:`████████` ``orange3`` :orange3:`████████` ``orange4`` :orange4:`████████` ``orangered`` :orangered:`████████` ``orangered1`` :orangered1:`████████` ``orangered2`` :orangered2:`████████` ``orangered3`` :orangered3:`████████` ``orangered4`` :orangered4:`████████` ``orchid`` :orchid:`████████` ``orchid1`` :orchid1:`████████` ``orchid2`` :orchid2:`████████` ``orchid3`` :orchid3:`████████` ``orchid4`` :orchid4:`████████` ``palegoldenrod`` :palegoldenrod:`████████` ``palegreen`` :palegreen:`████████` ``palegreen1`` :palegreen1:`████████` ``palegreen2`` :palegreen2:`████████` ``palegreen3`` :palegreen3:`████████` ``palegreen4`` :palegreen4:`████████` ``paleturquoise`` :paleturquoise:`████████` ``paleturquoise1`` :paleturquoise1:`████████` ``paleturquoise2`` :paleturquoise2:`████████` ``paleturquoise3`` :paleturquoise3:`████████` ``paleturquoise4`` :paleturquoise4:`████████` ``palevioletred`` :palevioletred:`████████` ``palevioletred1`` :palevioletred1:`████████` ``palevioletred2`` :palevioletred2:`████████` ``palevioletred3`` :palevioletred3:`████████` ``palevioletred4`` :palevioletred4:`████████` ``papayawhip`` :papayawhip:`████████` ``peachpuff`` :peachpuff:`████████` ``peachpuff1`` :peachpuff1:`████████` ``peachpuff2`` :peachpuff2:`████████` ``peachpuff3`` :peachpuff3:`████████` ``peachpuff4`` :peachpuff4:`████████` ``peru`` :peru:`████████` ``pink`` :pink:`████████` ``pink1`` :pink1:`████████` ``pink2`` :pink2:`████████` ``pink3`` :pink3:`████████` ``pink4`` :pink4:`████████` ``plum`` :plum:`████████` ``plum1`` :plum1:`████████` ``plum2`` :plum2:`████████` ``plum3`` :plum3:`████████` ``plum4`` :plum4:`████████` ``powderblue`` :powderblue:`████████` ``purple`` :purple:`████████` ``purple1`` :purple1:`████████` ``purple2`` :purple2:`████████` ``purple3`` :purple3:`████████` ``purple4`` :purple4:`████████` ``red`` :red:`████████` ``red1`` :red1:`████████` ``red2`` :red2:`████████` ``red3`` :red3:`████████` ``red4`` :red4:`████████` ``rosybrown`` :rosybrown:`████████` ``rosybrown1`` :rosybrown1:`████████` ``rosybrown2`` :rosybrown2:`████████` ``rosybrown3`` :rosybrown3:`████████` ``rosybrown4`` :rosybrown4:`████████` ``royalblue`` :royalblue:`████████` ``royalblue1`` :royalblue1:`████████` ``royalblue2`` :royalblue2:`████████` ``royalblue3`` :royalblue3:`████████` ``royalblue4`` :royalblue4:`████████` ``saddlebrown`` :saddlebrown:`████████` ``salmon`` :salmon:`████████` ``salmon1`` :salmon1:`████████` ``salmon2`` :salmon2:`████████` ``salmon3`` :salmon3:`████████` ``salmon4`` :salmon4:`████████` ``sandybrown`` :sandybrown:`████████` ``seagreen`` :seagreen:`████████` ``seagreen1`` :seagreen1:`████████` ``seagreen2`` :seagreen2:`████████` ``seagreen3`` :seagreen3:`████████` ``seagreen4`` :seagreen4:`████████` ``seashell`` :seashell:`████████` ``seashell1`` :seashell1:`████████` ``seashell2`` :seashell2:`████████` ``seashell3`` :seashell3:`████████` ``seashell4`` :seashell4:`████████` ``sienna`` :sienna:`████████` ``sienna1`` :sienna1:`████████` ``sienna2`` :sienna2:`████████` ``sienna3`` :sienna3:`████████` ``sienna4`` :sienna4:`████████` ``silver`` :silver:`████████` ``skyblue`` :skyblue:`████████` ``skyblue1`` :skyblue1:`████████` ``skyblue2`` :skyblue2:`████████` ``skyblue3`` :skyblue3:`████████` ``skyblue4`` :skyblue4:`████████` ``slateblue`` :slateblue:`████████` ``slateblue1`` :slateblue1:`████████` ``slateblue2`` :slateblue2:`████████` ``slateblue3`` :slateblue3:`████████` ``slateblue4`` :slateblue4:`████████` ``slategray`` :slategray:`████████` ``slategray1`` :slategray1:`████████` ``slategray2`` :slategray2:`████████` ``slategray3`` :slategray3:`████████` ``slategray4`` :slategray4:`████████` ``slategrey`` :slategrey:`████████` ``snow`` :snow:`████████` ``snow1`` :snow1:`████████` ``snow2`` :snow2:`████████` ``snow3`` :snow3:`████████` ``snow4`` :snow4:`████████` ``springgreen`` :springgreen:`████████` ``springgreen1`` :springgreen1:`████████` ``springgreen2`` :springgreen2:`████████` ``springgreen3`` :springgreen3:`████████` ``springgreen4`` :springgreen4:`████████` ``steelblue`` :steelblue:`████████` ``steelblue1`` :steelblue1:`████████` ``steelblue2`` :steelblue2:`████████` ``steelblue3`` :steelblue3:`████████` ``steelblue4`` :steelblue4:`████████` ``tan`` :tan:`████████` ``tan1`` :tan1:`████████` ``tan2`` :tan2:`████████` ``tan3`` :tan3:`████████` ``tan4`` :tan4:`████████` ``teal`` :teal:`████████` ``thistle`` :thistle:`████████` ``thistle1`` :thistle1:`████████` ``thistle2`` :thistle2:`████████` ``thistle3`` :thistle3:`████████` ``thistle4`` :thistle4:`████████` ``tomato`` :tomato:`████████` ``tomato1`` :tomato1:`████████` ``tomato2`` :tomato2:`████████` ``tomato3`` :tomato3:`████████` ``tomato4`` :tomato4:`████████` ``turquoise`` :turquoise:`████████` ``turquoise1`` :turquoise1:`████████` ``turquoise2`` :turquoise2:`████████` ``turquoise3`` :turquoise3:`████████` ``turquoise4`` :turquoise4:`████████` ``violet`` :violet:`████████` ``violetred`` :violetred:`████████` ``violetred1`` :violetred1:`████████` ``violetred2`` :violetred2:`████████` ``violetred3`` :violetred3:`████████` ``violetred4`` :violetred4:`████████` ``wheat`` :wheat:`████████` ``wheat1`` :wheat1:`████████` ``wheat2`` :wheat2:`████████` ``wheat3`` :wheat3:`████████` ``wheat4`` :wheat4:`████████` ``white`` :white:`████████` ``whitesmoke`` :whitesmoke:`████████` ``yellow`` :yellow:`████████` ``yellow1`` :yellow1:`████████` ``yellow2`` :yellow2:`████████` ``yellow3`` :yellow3:`████████` ``yellow4`` :yellow4:`████████` ``yellowgreen`` :yellowgreen:`████████` ========================== ====================================================================================================== ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/index.rst.txt0000644000175100001770000001450514676242340022222 0ustar00runnerdockerPágina Principal de Pygame ========================== .. toctree:: :maxdepth: 2 :glob: :hidden: referencias/* tutorials/* logos Documentos ---------- `Readme`_ Información básica acerca de pygame: qué es, quién está involucrado, y dónde encontrarlo. `Install`_ Pasos necesarios para compilar pygame en varias plataformas. También ayuda a encontrar e instalar binarios preconstruidos para tu sistema. `File Path Function Arguments`_ Cómo maneja Pygame las rutas del sistema de archivos. `Pygame Logos`_ Los logotipos de Pygame en diferentes resoluciones. `LGPL License`_ Esta es la licencia bajo la cual se distribuye pygame. Permite que pygame se distribuya como software de código abierto y comercial. En general, si pygame no se cambia, se puede utilizar con cualquier programa. Tutoriales ---------- .. :doc:`Introducción a Pygame ` .. Una introducción a los conceptos básicos de Pygame. .. Esto está escrito por usuarios de Python y aparece en el volúmen dos de la revista Py. :doc:`Importación e Inicialización ` Los pasos principales para importar e inicializar pygame. El paquete pygame está compuesto por varios módulos. Algunos de los módulos no están incluidos en todas las plataformas. :doc:`¿Cómo muevo una imagen? ` Un tutorial básico que cubre los conceptos detrás de la animación 2D en computadoras. Información acerca de dibujar y borrar objetos para que parezcan animados. :doc:`Tutorial del Chimpancé, Linea por Linea ` Los ejemplos de pygame inlcuyen un simple programa con un puño interactivo y un chimpancé. Esto fue inspirado por un molesto banner flash de principios de los años 2000. Este tutorial examina cada línea del código usada en el ejemplo. :doc:`Introducción al Módulo de Sprites ` Pygame incluye un módulo de spirtes de nivel superior para ayudar a organizar juegos. El módulo de sprites incluye varias clases que ayudan a administrar detalles encontrados en casi todos los tipos de juegos. Las clases de Sprites son un poco más avanzadas que los módulos regulares de pygame, y necesitan de mayor comprensión para ser usados correctamente. :doc:`Introducción a Surfarray ` Pygame utiliza el módulo NumPy de Python para permitir efectos eficientes por píxel en imágenes. El uso de arrays de superficie (surface) es una función avanzada que permite efectos y filtros personalizados. Esto también examina algunos de los efectos simples del ejemplo de pygame, arraydemo.py. :doc:`Introducción al Módulo de Cámara ` Pygame, desde la versión 1.9, tiene un módulo de camara que te permite capturar imágenes, mirar transmiciones en vivo y hacer algo básico de visión de computadora. Este tutorial cubre esos usos. :doc:`Guía Newbie ` Una lista de trece útiles tips para que las personas se sientas cómodas usando pygame. :doc:`Tutorial para Crear Juegos ` Un largo tutorial que cubre los grandes temas necesarios para crear un juego completo. :doc:`Modos de Visualización ` Obteniendo una superficie de visualización para la pantalla. Referencias ----------- :ref:`genindex` Una lista de todas las funciones, clases, y métodos en el paquete de pygame. :doc:`referencias/bufferproxy` Una vista del protocolo de arrays de píxeles de superficie. :doc:`referencias/color` Representación de color :doc:`referencias/cursors` Carga y compilación de imágenes de cursores. .. :doc:`referencias/display` .. Configuración de la visualización de surface (superficie). .. :doc:`referencias/draw` .. Dibujo de formas simples como líneas y elipses en la surface (superficie). .. :doc:`referencias/event` .. Administración de eventos entrantes de varios dispositivos de entrada y de la plataforma de ventanas. .. :doc:`referencias/examples` .. Varios programas demostrando la utilización de módulos individuales de pygame. .. :doc:`referencias/font` .. Carga y representación de fuentes (letras) TrueType. .. :doc:`referencias/freetype` .. Módulo de Pygame mejorado para cargar y representar tipos de letras. .. :doc:`referencias/gfxdraw` .. Funciones de dibujo con suavizado de bordes (anti-aliasing). .. :doc:`referencias/image` .. Carga, guardado y transferencia de superficies (surfaces). .. :doc:`referencias/joystick` .. Administración de dispositivos joystick. .. :doc:`referencias/key` .. Administración de dispositivos de teclado. .. :doc:`referencias/locals` .. Constantes de Pygame. .. :doc:`referencias/mixer` .. Carga y reproducción de sonidos. .. :doc:`referencias/mouse` .. Administración del dispositivo de mouse y visualización. .. :doc:`referencias/music` .. Reproducción de pistas de sonido. .. :doc:`referencias/pygame` .. Funciones de nivel superior para manejar pygame. .. :doc:`referencias/pixelarray` .. Manipulación de datos de píxeles de imagen. .. :doc:`referencias/rect` .. Contenedor flexible para un rectángulo. .. :doc:`referencias/scrap` .. Acceso nativo al portapapeles. .. :doc:`referencias/sndarray` .. Manipulación de datos de muestra de sonidos. .. :doc:`referencias/sprite` .. Objetos de nivel superior para representar imágenes de juegos. .. :doc:`referencias/surface` .. Objetos para imagenes y la pantalla. .. :doc:`referencias/surfarray` .. Manipulación de datos de píxeles de imágenes. .. :doc:`referencias/tests` .. Testeo de pygame. .. :doc:`referencias/time` .. Administración del tiempo y la frecuencia de cuadros (framerate). .. :doc:`referencias/transform` .. Redminesionar y mover imágenes. .. :doc:`pygame C API ` .. La API de C compartida entre los módulos de extensión de Pygame. :ref:`search` Búsqueda de documentos de Pygame por palabra clave. .. _Readme: ../../wiki/about .. _Install: ../../wiki/GettingStarted#Pygame%20Installation .. _File Path Function Arguments: ../filepaths.html .. _LGPL License: ../LGPL.txt .. _Pygame Logos: logos.html././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/logos.rst.txt0000644000175100001770000000301014676242340022223 0ustar00runnerdocker************************************************* Página de Logotipos de Pygame ************************************************* Logotipos de Pygame =================== Estos logotipos están disponibles para su uso en tus propios proyectos. Por favor, colocarlos donde creas conveniente. El logotipo fue creado por TheCorruptor el 29 de julio de 2001 y fue ampliado por Mega_JC el 29 de Agosto de 2021. .. container:: fullwidth .. image:: ../reST/_static/pygame_logo.png | `pygame_logo.svg <../_static/pygame_logo.svg>`_ | `pygame_logo.png <../_static/pygame_logo.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_lofi.png | `pygame_lofi.svg <../_static/pygame_lofi.svg>`_ | `pygame_lofi.png <../_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: ../reST/_static/pygame_powered.png | `pygame_powered.svg <../_static/pygame_powered.svg>`_ | `pygame_powered.png <../_static/pygame_powered.png>`_ - 1617 x 640 .. image:: ../reST/_static/pygame_tiny.png | `pygame_tiny.png <../_static/pygame_tiny.png>`_ - 214 x 60 .. image:: ../reST/_static/pygame_powered_lowres.png | `pygame_powered_lowres.png <../_static/pygame_powered_lowres.png>`_ - 101 x 40 Existe una imagen de Photoshop con capas de mayor resolución dispnible `aquí `_. *(1.3 MB)* Logotipos legendarios --------------------- .. container:: fullwidth `legacy_logos.zip <../_static/legacy_logos.zip>`_ - 50.1 KB././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0191257 pygame-2.6.1/docs/generated/es/_sources/referencias/0000755000175100001770000000000014676242436022032 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/referencias/bufferproxy.rst.txt0000644000175100001770000001262314676242340025753 0ustar00runnerdocker.. include:: ../../reST/common.txt .. default-domain:: py :class:`pygame.BufferProxy` =========================== .. currentmodule:: pygame .. class:: BufferProxy | :sl:`pygame object to export a surface buffer through an array protocol` | :sg:`BufferProxy() -> BufferProxy` :class:`BufferProxy` es un tipo de soporte de pygame, diseñado como el valor de retorno de los métodos :meth:`Surface.get_buffer` y :meth:`Surface.get_view`. Para todas las versiones de Python, un objeto :class:`BufferProxy` exporta una estructura C y un array de interface a nivel de Python en nombre del búfer del objeto principal. También se exporta una nueva interfaz de búfer. En pygame, :class:`BufferProxy` es clave para implementar el módulo :mod:`pygame.surfarray`. Las instancias :class:`BufferProxy` pueden ser creadas directamente desde el código de Python, ya sea para un buffer superior que exporta una interfaz o a partir de un ``dict`` de Python que describe el diseño del búfer de un objeto. Las entradas del dict se basan en el mapeo de la interfaz de matriz a nivel de Python. Se reconocen las siguientes claves: ``"shape"`` : tupla La longitud de cada elemento del array como una tupla de enteros. La longitud de la tupla es el número de dimensiones en el array. ``"typestr"`` : string El tipo de elemento del array como una cadena de longitud 3. El primer carácter indica el orden de bytes, '<' para para formato little-endian, ">" para formato big-endian, y '\|' si no es aplicable. El segundo carácter es el tipo de elemento, 'i' para los enteros con signo, 'u' para los enteros sin signo, 'f' para números de puntos flotantes, y 'V' para los conjuntos de bytes. El tercer carácter indica el tamaño en bytes del elemento, desde '1' a '9' bytes. Por ejemplo, " Surface` | :sg:`parent -> ` La clase :class:`Surface` que devolvió el objeto de clase :class:`BufferProxy` o el objeto pasado a una llamada de :class:`BufferProxy`. .. attribute:: length | :sl:`The size, in bytes, of the exported buffer.` | :sg:`length -> int` El número de bytes validos de datos exportados. Para datos discotinuous, es decir, datos que no forman un solo bloque de memoria, los bytes dentro de los espacios vacios se excluyen del conteo. Esta propiedad es equivalente al campo "len" de la estructura C ``Py_buffer``. .. attribute:: raw | :sl:`A copy of the exported buffer as a single block of bytes.` | :sg:`raw -> bytes` Los datos del búfer como un objeto ``str``/``bytes``. Cualquier espacio vacío en los datos exportados se elimina. .. method:: write | :sl:`Write raw bytes to object buffer.` | :sg:`write(buffer, offset=0)` Sobreescribe bytes en el objeto superior (o antecesor). Los datos deben ser contiguos en C o F, de lo contrario se genera un ValueError. El argumento `buffer` es un objeto ``str``/``bytes``. Un desplazamiento opcional proporciona una posición de inicio, en bytes, dentro del búfer donde comienza la sobreescritura. Si el desplazamiento es negativo o mayor o igual que el valor :attr:`length` del proxy, se genera un excepción ``IndexException``. Si ``len(buffer) > proxy.length + offset``, se genera un ``ValueError``. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/referencias/camera.rst.txt0000644000175100001770000002455614676242340024640 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.camera` ==================== .. module:: pygame.camera :synopsis: módulo de pygame para el uso de la cámara | :sl:`pygame module for camera use` Actualmente, Pygame soporta cámaras nativas de Linux (V4L2) y Windows (MSMF), con un soporte de plataforma más amplio disponible a través de un backend (controlador) integrado en OpenCV. .. versionadded:: 2.0.2 Windows native camera support .. versionadded:: 2.0.3 New OpenCV backends ¡EXPERIMENTAL!: Este API puede cambiar o desaparecer en lanzamientos posteriores de pygame. Si lo utilizas, es muy probable que tu código se rompa en la próxima versión de pygame. La función de Bayer a ``RGB`` se basa en: :: Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Nuevo en pygame 1.9.0. .. function:: init | :sl:`Module init` | :sg:`init(backend = None) -> None` Esta función inicia el módulo de la cámara, seleccionando el mejor controlador (backend) de la cámara web que pueda encontrar en tu sistema. No se garantiza que tenga éxito e incluso puede intentar importar módulos de teceros, como `OpenCV`. Si deseas anular la elección de controlador (backend), podés hacer un llamado para pasar el nombre del controlador que deseas a esta función. Podés obtener más información sobre los controladores (backends) en la función :func:`get_backends()`. .. versionchanged:: 2.0.3 Option to explicitly select backend .. ## pygame.camera.init ## .. function:: get_backends | :sl:`Get the backends supported on this system` | :sg:`get_backends() -> [str]` Este función devuelve cada controlador (backend) que considera que tienen posibilidad de funcionar en tu sistema, en orden de prioridad. pygame.camera Backends: :: Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future Hay dos diferencias princiales entre los controladores (backends). Los controladores (backends) _camera están integrados en el mismo pygame y no requieren importaciones de terceros. Todos los demás controlaores sí lo requieren. Para los controladores OpenCV y VideoCapture, esos módulos deben estar instalados en tu sistema. La otra gran diferencia es "enumeración de cámaras". Algunos constroladores no tienen una forma de enumerar los nombres de las cámaras o incluso la cantidad de cámaras en el sistema. En estos casos, la función :func:`list_cameras()` devolverá algo como ``[0]``. Si sabés que tenés varias cámaras en el sistema, estos puertos de controladores pasarán un "número de índice de cámara" si lo utilizas como el parámetro ``device``. .. versionadded:: 2.0.3 .. ## pygame.camera.get_backends ## .. function:: colorspace | :sl:`Surface colorspace conversion` | :sg:`colorspace(Surface, format, DestSurface = None) -> Surface` Permite la conversión "RGB" a un espacio de color destino de "HSV" o "YUV". Las surfaces (superficies) de origen y destino deben tener el mismo tamaño y profundidad de píxel. Esto es útil para la visión por computadora de dispositivos con capacidad de procesamiento limitada. Captura una imagen lo más pequeña posible, la redimensiona con ``transform.scale()`` haciendola aún más pequeña, y luego convierte el espacio de color a "YUV" o "HSV" antes de realizar cualquier procesamiento en ella. .. ## pygame.camera.colorspace ## .. function:: list_cameras | :sl:`returns a list of available cameras` | :sg:`list_cameras() -> [cameras]` Verifica la disponibilidad de cámaras y devuelve una lista de cadenas de nombres de cámaras, listas para ser utilizados por :class:`pygame.camera.Camera`. Si el controlador (backend) de la cámara no soporta la enuemración de webcams, esto devolverá algo como ``[0]``. Ver :func:`get_backends()` para obtener mucha más información. .. ## pygame.camera.list_cameras ## .. class:: Camera | :sl:`load a camera` | :sg:`Camera(device, (width, height), format) -> Camera` Carga una cámara. En Linux, el dispositivo suele ser algo como "/dev/video0". El ancho y alto predeterminados son 640x480. El formato es el espacio de color deseado para la salida. Esto es útil para fines de visión por computadora. El valor predeterminado es ``RGB``. Los siguientes formatos son compatibles: * ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value .. method:: start | :sl:`opens, initializes, and starts capturing` | :sg:`start() -> None` Abre el dispositivo de la cámara, intenta inicializarlo y comienza a grabar imágenes en un búfer. La cámara debe estar iniciada antes de que se puedan utilizar las siguientes funciones. .. ## Camera.start ## .. method:: stop | :sl:`stops, uninitializes, and closes the camera` | :sg:`stop() -> None` Detiene la grabación, desinicializa la cámara y la cierra. Una vez que la cámara se detiene, las funciones siguientes no se pueden utilizar hasta que se inicie nuevamente. .. ## Camera.stop ## .. method:: get_controls | :sl:`gets current values of user controls` | :sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)` Si la cámara lo admite, get_controls devolverá la configuración actual para el volteo horizontal y vertical de la imagen como booleanos y el brillo como un número entero. Si no es compatible, devolverá los valores predeterminados (0, 0, 0). Hay que tener en cuenta que los valores de retorno acá pueden ser diferentes a los devueltos por set_controls, aunque es más probable que sean correctos. .. ## Camera.get_controls ## .. method:: set_controls | :sl:`changes camera settings if supported by the camera` | :sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)` Te permite cambiar la configuración de la cámara si la cámara lo admite. Los valores devueltos serán los valores de la entrada si la cámara afirma que tuvo éxito, o si no, los valores previamente utilizados. Cada argumento es opcional y se puede elegir el deseado mediante el suministro de una palabra clave, como hflip. Hay que tener en cuenta que la configuración real siendo utilizada por la cámara puede no ser la misma que la devuelta por set_controls. En Windows :code:`hflip` y :code:`vflip` están implementados por pygame, no por la cámara, por lo que siempre deberían funcionar, pero el brillo :code:`brightness` no está soportado. .. ## Camera.set_controls ## .. method:: get_size | :sl:`returns the dimensions of the images being recorded` | :sg:`get_size() -> (width, height)` Devuelve las dimensiones actuales de las imágenes capturadas por la cámara. Esto devolverá el tamaño real, que puede ser diferente al especificado durante la inicialización si la cámara no admite ese tamaño. .. ## Camera.get_size ## .. method:: query_image | :sl:`checks if a frame is ready` | :sg:`query_image() -> bool` Si una imagen está lista, devuelve TRUE (verdadero). De lo contrario, devuelve FALSE (falso). Hay que tener en cuenta que algunas webcams siempre devolverán falso y solo pondrán en cola un cuadro cuando se les llame con una función de bloqueo como :func:`get_image()`. En Windows (MSMF), y en los backends de OpenCV, la función :func:`query_image()` debería ser confiable. Esto es útil para separar la frecuencia de cuadros del juego de la velocidad de la cámara sin tener que usar subprocesos. .. ## Camera.query_image ## .. method:: get_image | :sl:`captures an image as a Surface` | :sg:`get_image(Surface = None) -> Surface` Extrae una imagen del búfer como una superficie ``RGB``. Opcionalmente, se puede reutilizar una superficie existente para ahorrar tiempo. La profundidad de bits de la superficie es de 24 bits en Linux, 32 bits en Windows, o la misma que la superficie suministrada opcionalmente. .. ## Camera.get_image ## .. method:: get_raw | :sl:`returns an unmodified image as bytes` | :sg:`get_raw() -> bytes` Obtiene una imagen de la cámara como una cadena en el formato de píxel nativo de la cámara. Útil para la integración con las otras bibliotecas. Esto devuelve un objeto de bytes. .. ## Camera.get_raw ## .. ## pygame.camera.Camera ## .. ## pygame.camera ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/referencias/cdrom.rst.txt0000644000175100001770000002340414676242340024503 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.cdrom` =================== .. module:: pygame.cdrom :synopsis: módulo de pygame para el control de CD de audio. | :sl:`pygame module for audio cdrom control` .. warning:: Este módulo no es funcional en pygame 2.0 y versiones superiores, a menos que hayas compilado manualmente pygame con SDL1. Este módulo no estará soportado en el futuro. Una alternativa para la funcionalidad de cdrom de Python es `pycdio `_. El módulo cdrom administra las unidades de ``CD`` y ``DVD`` en la computadora. También puede controlar la reproducción de CD de audio. Este módulo debe inicializarse antes de poder hacer algo. Cada objeto ``CD``que crees representa una unidad de cdrom y también debe inicializarse individualmente antes de poder realizar la mayoría de las acciones. .. function:: init | :sl:`initialize the cdrom module` | :sg:`init() -> None` Inicializa el módulo de cdrom. Esto escaneará el sistema en busca de todos los dispositivos ``CD``. El módulo debe inicializarse antes de que funcionen cualquier otra función. Esto ocurre automáticamente cuando llamas ``pygame.init()``. Es seguro llamar a este función más de una vez. .. ## pygame.cdrom.init ## .. function:: quit | :sl:`uninitialize the cdrom module` | :sg:`quit() -> None` Decinicializa el módulo cdrom. Después de llamar a esta función, cualquier objeto ``CD`` existente dejará de funcionar. Es seguro llamar a esta función más de una vez. .. ## pygame.cdrom.quit ## .. function:: get_init | :sl:`true if the cdrom module is initialized` | :sg:`get_init() -> bool` Comprueba si el módulo cdrom está inicializado o no. Esto es diferente de ``CD.init()`` ya que cada unidad también debe inicializarse individualmente. .. ## pygame.cdrom.get_init ## .. function:: get_count | :sl:`number of cd drives on the system` | :sg:`get_count() -> count` Devuelve el número de unidades de CD en el sistema. Cuando creas objetos ``CD``, debes pasar un ID entero que debe ser menor que este recuento. El recuento será 0 si no hay unidades en el sistema. .. ## pygame.cdrom.get_count ## .. class:: CD | :sl:`class to manage a cdrom drive` | :sg:`CD(id) -> CD` Podés crear un objeto ``CD`` para cada unidad de CD en el sistema. Usa ``pygame.cdrom.get_count()`` para determinar cuántas unidades existen realmente. El argumento 'id' es un número entero que representa la unidad, comenzando en cero. El objeto ``CD`` no está inicializado, solo podés llamar ``CD.get_id()` y ``CD.get_name()`` en una unidad no inicializada. Es seguro crear múltiples objetos ``CD``para la misma unidad, todos cooperarán normalmente. .. method:: init | :sl:`initialize a cdrom drive for use` | :sg:`init() -> None` Inicializa la unidad de CD para ser utilizada. El debe estar inicializada para que la mayoría de los métodos ``CD`` funcionen. Incluso si el resto de pygame está inicializado. Puede haber una breve pausa mientras la unidad se inicializa. Evitá utilizar ``CD.init()`` si el programa no debe detenerse durante uno o dos segundos. .. ## CD.init ## .. method:: quit | :sl:`uninitialize a cdrom drive for use` | :sg:`quit() -> None` Desinicializa una unidad para su uso. Hacé un llamado a esto cuando tu programa no vaya a acceder a la unidad durante un tiempo. .. ## CD.quit ## .. method:: get_init | :sl:`true if this cd device initialized` | :sg:`get_init() -> bool` Comprueba si este dispositivo ``CDROM`` está inicializado. Esto es diferente de ``pygame.cdrom.init()`` ya que cada unidad también debe inicializarse individualmente. .. ## CD.get_init ## .. method:: play | :sl:`start playing audio` | :sg:`play(track, start=None, end=None) -> None` Reproduce audio desde un CD de audio en la unidad. Además del argumento del número de pista, también podés introducir un tiempo de inicio y fin para la reproducción. El tiempo de inicio y fin está en segundos y puede limintar la selección de una pista de audio reproducida. Si introducir un tiempo de inicio pero no de fin, el audio se reproducirá hasta el final de la pista. Si introducis un tiempo de inicio y 'None' para el tiempo final, el audio se reproducirá hasta el final de todo el disco. Véase ``CD.get_numtracks()`` y ``CD.get_track_audio()`` para encontrar las pistas que se van a reproducir. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en 0. .. ## CD.play ## .. method:: stop | :sl:`stop audio playback` | :sg:`stop() -> None` Detiene la reproducción del audio desde el CD-ROM. También se perderá la posición actual de reproducción. Este método no hace nada si la unidad no está reproduciendo audio. .. ## CD.stop ## .. method:: pause | :sl:`temporarily stop audio playback` | :sg:`pause() -> None` Detiene temporalmente la reproducción del audio en el ``CD``. La reproducción puede reanudarse en el mismo punto con el método ``CD.resume()``. Si el ``CD`` no está reproduciendo, este método no hace nada. Nota: la pista 0 es la primera en el ``CD``. Los números de pista comienzan en cero. .. ## CD.pause ## .. method:: resume | :sl:`unpause audio playback` | :sg:`resume() -> None` Reanuda la reproducción de un ``CD``. Si el ``CD`` no está en pausa o ya se está reproduciendo, este método no hace nada. .. ## CD.resume ## .. method:: eject | :sl:`eject or open the cdrom drive` | :sg:`eject() -> None` Esto abrirá la unidad de CD y expulsará el CD-ROM. Si la unidad está reproduciendo o en pausa, se detendrá. .. ## CD.eject ## .. method:: get_id | :sl:`the index of the cdrom drive` | :sg:`get_id() -> id` Devuelve el ID entero que se utilizó para crear la instancia de ``CD``. Este método puede funcionar en un ``CD`` no inicializado. .. ## CD.get_id ## .. method:: get_name | :sl:`the system name of the cdrom drive` | :sg:`get_name() -> name` Devuelve el nombre de la unidad en forma de cadena. Este es el nombre de sitema utilizado para representar la unidad, a menudo es la letra de la unidad o el nombre del dispositivo. Este método puede funcionar en un ``CD`` no inicializado. .. ## CD.get_name ## .. method:: get_busy | :sl:`true if the drive is playing audio` | :sg:`get_busy() -> bool` Devuelve True (verdadero) si la unidad está ocupada reproduciendo audio. .. ## CD.get_busy ## .. method:: get_paused | :sl:`true if the drive is paused` | :sg:`get_paused() -> bool` Devuelve True (verdadero) si la unidad está actualmente en pausa. .. ## CD.get_paused ## .. method:: get_current | :sl:`the current audio playback position` | :sg:`get_current() -> track, seconds` Devuelve tanto la pista actual como el tiempo de esa pista. Este método funciona cuando la unidad está reproduciendo o en pausa. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pista comienzan en cero. .. ## CD.get_current ## .. method:: get_empty | :sl:`False if a cdrom is in the drive` | :sg:`get_empty() -> bool` Devuelve False (falso) si hay un CD-ROM en la unidad actualmente. Si la unidad está vacía devolverá True (verdadero). .. ## CD.get_empty ## .. method:: get_numtracks | :sl:`the number of tracks on the cdrom` | :sg:`get_numtracks() -> count` Devuelve el número de pistas en el CD-ROM de la unidad. Esto devolverá cero si la unidad está vacía o no tiene pistas. .. ## CD.get_numtracks ## .. method:: get_track_audio | :sl:`true if the cdrom track has audio data` | :sg:`get_track_audio(track) -> bool` Determina si una pista en un CD-ROM contiene datos de audio. También podés llamar a ``CD.num_tracks()`` y ``CD.get_all()`` para obtener más información sobre el CD-ROM. Nota: la pista 0 es la primera pista en el ``CD``. Los números de pistas comienzan en cero. .. ## CD.get_track_audio ## .. method:: get_all | :sl:`get all track information` | :sg:`get_all() -> [(audio, start, end, length), ...]` Devuelve una lista con información para cada pista en el CD-ROM. La información consiste en una tupla con cuatro valores. El valor "audio" es True (verdadero) si la pista contiene data de audio. Los valores de inicio, fin y longitud son números de puntos flotantes en segundos. "Start" (inicio) y "end" (fin) representan tiempos absolutos en todo el disco. .. ## CD.get_all ## .. method:: get_track_start | :sl:`start time of a cdrom track` | :sg:`get_track_start(track) -> seconds` Devuelve el tiempo absoluto en segundos al inicio de la pista del CD-ROM. Nota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero. .. ## CD.get_track_start ## .. method:: get_track_length | :sl:`length of a cdrom track` | :sg:`get_track_length(track) -> seconds` Devuelve un valor de punto flotante en segundos de la duración de la pista del CD-ROM. Nota: la pista 0 es la primera pista del ``CD``. Los números de pista comienzan en cero. .. ## CD.get_track_length ## .. ## pygame.cdrom.CD ## .. ## pygame.cdrom ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/referencias/color.rst.txt0000644000175100001770000002667514676242340024532 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.Color` =================== .. currentmodule:: pygame .. class:: Color | :sl:`pygame object for color representations` | :sg:`Color(r, g, b) -> Color` | :sg:`Color(r, g, b, a=255) -> Color` | :sg:`Color(color_value) -> Color` La clase ``Color`` representa valores de color ``RGBA`` utilizando un rango de valores de 0 a 255 inclusive. Permite realizar operaciones aritméticas básicas, como operaciones binarias ``+``, ``-``, ``*``, ``//``, ``%``, y unaria ``~`` para crear nuevos colores. Admite conversiones a otros espacios de colores como ``HSV`` o ``HSL``, y te permite ajustar canales individuales de color. El valor alfa se establece en 255 (completamente opaco) de forma predeterminada si no se proporciona. Las operaciones aritméticas y método ``correct_gamma()`` conservan las subclases. Para los operadores binarios, la clase de color devuelto es la del objeto de color de la parte izquierda del operador. Los objetos de color admiten comparación de igualdad con otros objetos de color y tuplas de 3 o 4 elementos de enteros. Hubo un error en pygame 1.8.1 donde el valor alfa predeterminado era 0, no 255 como antes. Los objetos de color exportan la interfaz de array a nivel C. La interfaz exporta un array de bytes no firmados unidimensional de solo lectura con la misma longitud asignada que el color. También se exporta la nueva interfaz del búfer, con la mismas características que la interfaz del array. Los operadores de división entera, ``//``, y módulo, ``%``, no generan una excepción por división por cero. En su lugar, si un canal de color, o alfa, en el color de la parte derecha es 0, entonces el resultado es 1. Por ejemplo: :: # Estas expresiones son True (verdaderas) Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0) Usa ``int(color)`` para obtener el valor entero inmutable del color, que se puede utilizar como clave en un diccionario. Este valor entero difiere de los valores de píxeles mapeados de los métodos :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` y :meth:`pygame.Surface.unmap_rgb`. Se puede pasar como argumento ``color_value`` a :class:`Color` (útil con conjuntos). Ver :doc:`color_list` para ejemplos de nombres de colores disponibles. :param int r: el valor rojo en el rango de 0 a 255 inclusive :param int g: el valor verde en el rango de 0 a 255 inclusive :param int b: el color azul en el rango de 0 a 255 inclusive :param int a: (opcional) valor alfa en el rango de 0 a 255 inclusive, predeterminado es 255 :param color_value: valor del color (ver nota abajo para los formatos admitidos) .. note:: Formatos de ``color_value`` admitidos: | - **Objeto Color:** clona el objeto de clase :class:`Color` | - **Nombre de color: str:** nombre del color a utilizar, por ejemplo ``'red'`` (todos los nombres admitidos se pueden encontrar en :doc:`color_list`, con muestras de ejemplo) | - **Formato de color HTML str:** ``'#rrggbbaa'`` o ``'#rrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0 a 0xFF inclusive, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona | - **Número hexadecimal str:** ``'0xrrggbbaa'`` o ``'0xrrggbb'``, donde rr, gg, bb, y aa son números hexadecimales de 2 digitos en el rango de 0x00 a 0xFF inclsuvie, el valor aa (alfa) se establece en 0xFF de forma predeterminada si no se proporciona. | - **int:** valor entero del color a utilizar, usar números hexadecimales pueden hacer que este parámetro sea más legible, por ejemplo, ``0xrrggbbaa``, donde rr, gg, bb, y aa son números hexadecimales de dos dígitos en el rango de 0x00 a 0xFF inclusive, notese que el valor aa (alfa) no es opcional para el formato int y debe ser proporcionado. | - **tupla/lista de valores enteros de color:** ``(R, G, B, A)`` o ``(R, G, B)``, donde R, G, B, y A son valores enteros en el rango de 0 a 255 inclusive, el valor A (alfa) se establece en 255 de forma predeterminada si no se proporciona. :type color_value: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) :returns: a newly created :class:`Color` object :rtype: Color .. versionchanged:: 2.0.0 Soporte para tuplas, listas y objetos :class:`Color` al crear objetos :class:`Color`. .. versionchanged:: 1.9.2 Color objects export the C level array interface. .. versionchanged:: 1.9.0 Color objects support 4-element tuples of integers. .. versionchanged:: 1.8.1 New implementation of the class. .. attribute:: r | :sl:`Gets or sets the red value of the Color.` | :sg:`r -> int` El valor rojo del color. .. ## Color.r ## .. attribute:: g | :sl:`Gets or sets the green value of the Color.` | :sg:`g -> int` El valor verde del color. .. ## Color.g ## .. attribute:: b | :sl:`Gets or sets the blue value of the Color.` | :sg:`b -> int` El valor azul del color. .. ## Color.b ## .. attribute:: a | :sl:`Gets or sets the alpha value of the Color.` | :sg:`a -> int` El valor alfa del color. .. ## Color.a ## .. attribute:: cmy | :sl:`Gets or sets the CMY representation of the Color.` | :sg:`cmy -> tuple` La representación ``CMY`` del color. Los componentes ``CMY`` están en los rangos ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Tené en cuenta que estos no devolverá los valores ``CMY`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``CMY``de 0-1, los errores de redondeo pueden hacer que los valores ``CMY`` difieran ligeramente de lo que podrías esperar. .. ## Color.cmy ## .. attribute:: hsva | :sl:`Gets or sets the HSVA representation of the Color.` | :sg:`hsva -> tuple` La representación ``HSVA`` del color. Los componentes ``HSVA`` están en los rangos ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Tené en cuenta que esto devolverá los valores ``HSV`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSV`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSV`` difieran ligeramente de lo que podrías esperar. .. ## Color.hsva ## .. attribute:: hsla | :sl:`Gets or sets the HSLA representation of the Color.` | :sg:`hsla -> tuple` La representación ``HSLA`` del color. Los componentes ``HSLA`` están en rangos ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Tené en cuenta que esto no devolverá los valores ``HSL`` exactos para los valores ``RGB`` establecidos en todos los casos. Debido a la asignación de ``RGB`` de 0-255 y la asignación de ``HSL`` de 0-100 y 0-360, los errores de redondeo pueden hacer que los valores ``HSL`` difieran ligeramente de lo que podrías esperar. .. ## Color.hsla ## .. attribute:: i1i2i3 | :sl:`Gets or sets the I1I2I3 representation of the Color.` | :sg:`i1i2i3 -> tuple` La representación ``I1I2I3`` del color. Los componentes ``I1I2I3`` están en los rangos ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Tené en cuenta que esto no devolverá los valores ``I1I2I3`` exactos para los valores ``RGB`` establecidos en todos los cosas. Debido a la asignación de ``RGB`` de 0-255 y la asignación ``I1I2I3`` de 0-1, los errores de redondeo pueden hacer que los valores ``I1I2I3``difieran ligeramente de lo que podrías esperar. .. ## Color.i1i2i3 ## .. method:: normalize | :sl:`Returns the normalized RGBA values of the Color.` | :sg:`normalize() -> tuple` Devuelve los valores ``RGBA`` del color como valores de punto flotante. .. ## Color.normalize ## .. method:: correct_gamma | :sl:`Applies a certain gamma value to the Color.` | :sg:`correct_gamma (gamma) -> Color` Aplica un cierto valor de gamma al color y devuelve un nuevo color con los valores ``RGBA`` ajustados. .. ## Color.correct_gamma ## .. method:: set_length | :sl:`Set the number of elements in the Color to 1,2,3, or 4.` | :sg:`set_length(len) -> None` DEPRECATED: Puedes desempaquetar los valores que necesitas de la siguiente manera: ``r, g, b, _ = pygame.Color(100, 100, 100)`` si solo deseas r, g and b o ``r, g, *_ = pygame.Color(100, 100, 100)`` si solo deseas r y g La longitud predeterminada de un color es 4. Los colores pueden tener longitudes 1, 2, 3 o 4. Esto es útil si querés desempaquetar a r,g,b,a. Si querés obtener la longitud de un color, usa ``len(acolor)``. .. deprecated:: 2.1.3 .. versionadded:: 1.9.0 .. ## Color.set_length ## .. method:: grayscale | :sl:`returns the grayscale of a Color` | :sg:`grayscale() -> Color` Devuelve un color que representa la versión en escala de grises de sí mismo utilizando la fórmula de luminosidad que pondera el rojo, verde y azul según sus longitudes de onda. .. ## Color.grayscale ## .. method:: lerp | :sl:`returns a linear interpolation to the given Color.` | :sg:`lerp(Color, float) -> Color` Devuelve un color que es una interpolación entre sí mismo y el color dado en el espacio RGBA. El segundo parámetro determina qué tan lejos estará el resultado entre sí mismo y el otro color. Debe ser un valor entre 0 y 1, donde 0 significa que devolverá el color inicial, el de sí mismo, y 1 significa que devolverá otro color. .. versionadded:: 2.0.1 .. ## Color.lerp ## .. method:: premul_alpha | :sl:`returns a Color where the r,g,b components have been multiplied by the alpha.` | :sg:`premul_alpha() -> Color` Devuelve un nuevo color en el que cada uno de los canales de rojo, verde y azul ha sido multiplicado por el canal alfa del color original. El canal alfa permanece sin cambios. Esto es útil cuando se traba con la bandera de modo ``BLEND_PREMULTIPLIED`` de mezcla para :meth:`pygame.Surface.blit()`, que asume que todas las superficies que lo utilizan están utilizando colores con alfa pre-multiplicado. .. versionadded:: 2.0.0 .. ## Color.premul_alpha ## .. method:: update | :sl:`Sets the elements of the color` | :sg:`update(r, g, b) -> None` | :sg:`update(r, g, b, a=255) -> None` | :sg:`update(color_value) -> None` Establece los elementos del color. Consulta los parámetros de :meth:`pygame.Color` para los parámetros de esta función. Si el valor alfa no se estableció, no cambiará. .. versionadded:: 2.0.1 .. ## Color.update ## .. ## pygame.Color ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/referencias/cursors.rst.txt0000644000175100001770000002477214676242340025110 0ustar00runnerdocker.. include:: ../../reST/common.txt :mod:`pygame.cursors` ===================== .. module:: pygame.cursors :synopsis: módulo de pygame para recursos de cursor | :sl:`pygame module for cursor resources` Pygame ofrece control sobre el cursor del hardware del sistema. Pygame admite cursores en blanco y negro (cursores de mapa de bits), así como cursores variantes del sistema y cursores de color. Podés controlar el cursor utilizando funciones dentro del módulo :mod:`pygame.mouse`. Este módulo de cursores contiene funciones para cargar y decodificar varios formatos de cursores. Estas te permiten almacenar fácilmente tus cursores en archivos externos o directamente como cadenas de caracteres codificadas en Python. El módulo incluye varios cursores estándar. La función :func:`pygame.mouse.set_cursor()` toma varios argumentos. Todos estos argumentos se han almacenado en una única tupla que puedes llamar de la siguiente manera: :: >>> pygame.mouse.set_cursor(*pygame.cursors.arrow) Las siguientes variables pueden ser pasadas a ``pygame.mouse.set_cursor`` function: * ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` Este módulo también contiene algunos cursores como cadenas de caracters formateadas. Será necesario pasarlos a la función ``pygame.cursors.compile()`` antes de poder utilizarlos. El ejemplo de llamada se vería así: :: >>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor) Las siguientes cadenas de caracteres se pueden convertir en mapas de bits de cursor con ``pygame.cursors.compile()`` : * ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` .. function:: compile | :sl:`create binary cursor data from simple strings` | :sg:`compile(strings, black='X', white='.', xor='o') -> data, mask` Se puede utilizar una secuencia de cadenas para crear datos binarios de cursor para el cursor del sistema. Esto devuelve los datos binarios en forma de dos tuplas. Estas se pueden pasar como tercer y cuarto argumento, respectivamente, de la función :func:`pygame.mouse.set_cursor()`. Si estás creando tus propias cadenas de caracteres, podés usar cualquier valor para representar los píxeles blanco y negro. Algunos sistemas permiten establecer un color especial de alternancia para el color del sistema, también llamado color xor. Si el sistema no admite cursores xor, ese color será simplemente negro. La altura debe ser divisible por 8. el ancho de las cadenas debe ser igual y divisible por 8. Si estas dos condiciones no se cumplen, se generará un ``ValueError``. Un ejemplo de conjunto de cadenas de caracteres de cursor se ve así: :: thickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ") .. ## pygame.cursors.compile ## .. function:: load_xbm | :sl:`load cursor data from an XBM file` | :sg:`load_xbm(cursorfile) -> cursor_args` | :sg:`load_xbm(cursorfile, maskfile) -> cursor_args` Esto carga cursores para un subconjunto simple de archivos ``XBM`` . Los archivos ``XBM`` son tradicionalmente utilizados para almacenar cursores en sistemas UNIX, son un formato ASCII utilizado para representar imágenes simples. A veces, los valores de color blanco y negro se dividen en dos archivos ``XBM`` separados. Podés pasar un segundo argumento de archivo de máscara (maskfile) para cargar las dos imágenes en un solo cursor. Los argumentos 'cursorfile' y 'maskfile' pueden ser nombres de archivos u objetos similares a archivos con el método 'readlines' El valor de retorno 'cursor_args' puede ser pasado directamente a la función ``pygame.mouse.set_cursor()``. .. ## pygame.cursors.load_xbm ## .. class:: Cursor | :sl:`pygame object representing a cursor` | :sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor` | :sg:`Cursor(hotspot, surface) -> Cursor` | :sg:`Cursor(constant) -> Cursor` | :sg:`Cursor(Cursor) -> Cursor` | :sg:`Cursor() -> Cursor` En pygame 2, hay 3 tipos de cursores que podés crear para darle un poco de brillo adicional a tu juego. Existen cursores de tipo **bitmap**, que ya existían en Pygame 1.x, y se compilan a partir de una cadena de caracteres o se cargan desde un archivo xbm. Luego, están los cursores de tipo **system**, donde eliges un conjunto predefinido que transmitirá el mismo significado pero se verá nativo en diferentes sistemas operativos. Por último puedes crear un cursor de tipo **color**, que muestra una superficie de Pygame como el cursor. **Creando un cursor del sistema** Elegí una constante de esta lista, pasala a ``pygame.cursors.Cursor(constant)``, ¡y listo! Tené en cuenta que no todos los sistemas admiten todos los cursores del sistema y es posible que obtengas una sustitución en su lugar. Por ejemplo, en MacOS, WAIT/WAITARROW debería mostrarse como una flecha y SIZENWSE/SIZENESW/SIZEALL debería mostrarse como una mano cerrada. Y en Wayland, cada cursor SIZE debería aparecer como una mano. debería mostrarse como una mano cerrada. :: Pygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow (flecha) pygame.SYSTEM_CURSOR_IBEAM i-beam (viga en i, o viga de doble t) pygame.SYSTEM_CURSOR_WAIT wait (espera) pygame.SYSTEM_CURSOR_CROSSHAIR crosshair (cruz de mira) pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (pequeño cursor de espera) (or wait if not available) (o si no está disponible, espera) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing (doble flecha apuntando al noroeste y sudeste) northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing (doble flecha apuntando al noreste y sudoeste) northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing (doble flecha apuntando al oeste y al este) west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing (doble flecha apuntando al norte y sur) north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing (flecha de cuatro puntas apuntando al norte, sur, este y oeste) north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones (círculo tachado o calaveras cruzadas) pygame.SYSTEM_CURSOR_HAND hand (mano) **Creando un cursor sin pasar argumentos** Además de las constantes del cursor disponibles y descritas anteriormente, también podés llamar a ``pygame.cursors.Cursor()``, y tu cursor está listo (hacer esto es lo mismo que llamar a ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``) Haciendo una de estas llamadas lo que en realidad se crea es un cursor del sistema utilizando la imagen nativa predeterminada. **Creando un curosr de color** Para crear un cursor de color, hay que crear un objeto ``Cursor`` a partir de un ``hotspot`` y una ``surface``. Un ``hotspot`` es una coordenada (x,y) que determina donde en el cursor está el punto exacto. La posición debe estar dentro de los límites de la ``surface``. **Creando un cursor de mapa de bits (bitmap)** Cuando el cursor del mouse está visible, se mostrará como un mapa de bits en blanco y negro utilizando los arrays de máscaras (bitmask) dadas. El ``size`` (tamaño) es una secuencia que contiene el ancho y alto del cursor. El ``hotspot``es una secuencia que contiene la posición del hotspot del cursor. Un cursor tiene un ancho y alto, pero la posición del mouse está representada mediante un conjunto de coordenadas de punto. Por lo tanto, el valor pasado al ``hotspot`` del cursor ayuda a pygame a determinar exactamente en qué punto se encuentra el cursor. ``xormasks``es una secuencia de bytes que contiene las máscaras de datos del cursor. Por último, ``andmasks`` es una secuencia de bytes que contiene los datos de máscara de bits del cursor. Para crear estas variable podemos utilizar la función :func:`pygame.cursors.compile()`. Ancho y alto deben ser múltiplos de 8, y las arrays de máscara (mask arrays) deben tener el tamaño correcto para el ancho y el alto dados. De lo contrario, se generará una excepción. .. method:: copy | :sl:`copy the current cursor` | :sg:`copy() -> Cursor` Devuelve un nuevo objeto Cursor con los mismos datos y hotspots que el original. .. ## pygame.cursors.Cursor.copy ## .. attribute:: type | :sl:`Gets the cursor type` | :sg:`type -> string` El tipo será ``"system"``, ``"bitmap"``, o ``"color"``. .. ## pygame.cursors.Cursor.type ## .. attribute:: data | :sl:`Gets the cursor data` | :sg:`data -> tuple` Devuelve los datos que se utilizaron para crear este objeto de cursor, envuelto en una tupla. .. ## pygame.cursors.Cursor.data ## .. versionadded:: 2.0.1 .. ## pygame.cursors.Cursor ## .. ## pygame.cursors ## Código de ejemplo para crear y establecer cursores. (Click en el mouse para cambiar el cursor) .. literalinclude:: ../../reST/ref/code_examples/cursors_module_example.py ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0201256 pygame-2.6.1/docs/generated/es/_sources/tutorials/0000755000175100001770000000000014676242436021572 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.971112 pygame-2.6.1/docs/generated/es/_sources/tutorials/CamaraIntro.rst.txt0000644000175100001770000002647614676242340025353 0ustar00runnerdocker.. TUTORIAL: Introducción al Módulo de Cámara .. include:: ../../reST/common.txt ****************************************************** Tutoriales Pygame - Introducción al Módulo de Cámara ****************************************************** Introducción al Módulo de Cámara ================================ .. rst-class:: docinfo :Autor: Nirav Patel :Contacto: nrp@eclecti.cc :Traducción al español: Estefanía Pivaral Serrano Pygame 1.9 viene con soporte para cámaras interconectadas, lo que nos permite capturar imagenes quietas, ver transmiciones en vivo y hacer visión computarizada. Este tutorial cubrirá todos estos casos de uso, proporcionando ejemplos de código que pueden usar para basar sus propias apps o juegos. Pueden consultar la documentación de referencia por una API completa: :mod:`reference documentation ` .. note:: A partir de Pygame 1.9 el módulo de cámara ofrece soporte nativo para cámaras que usan v4l2 en Linux. Existe soporte para otras plataformas via Videocapture o OpenCV, pero esta guía se enfocará en en módulo nativo. La mayor parte del código será válido para otras plataformas, pero ciertas cosas como los controles no funcionarán. El módulo está también marcado como **EXPERIMENTAL**, lo que significa que la API podría cambiar las versiones posteriores. Importación e Inicialización ---------------------------- :: import pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init() Dado que el módulo de cámara es opcional, necesita ser importado e inicializado manualmente como se muestra arriba. Captura de una sola imagen -------------------------- Ahora repasaremos el caso más simple en el que abrimos una cámara y capturamos un cuadro como Surface. En el siguiente ejemplo, asumimos que hay una cámara en /dev/video0 en la computadora, y la inicializamos con un tamaño de 640 por 480. La Surface llamada 'image' es lo que sea que la cámara estaba viendo cuando get_image() fue llamada. :: cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() Listado de Cámaras Conectadas ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Puede que se estén preguntando, ¿y si no sabemos la ruta exacta de la cámara? Podemos pedirle al módulo que nos proporcione la lista de cámaras conectadas a la computadora y que inicialice la primera cámara en la lista. :: camlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480)) Uso los Controles de la Cámara ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ La mayoría de las cámaras admiten controles como voltear la imagen y cambiar el brillo. set_controls() y get_controls() pueden ser usados en cualquier momento después de usar start(). :: cam.set_controls(hflip = True, vflip = False) print camera.get_controls() Captura de una Transmisión en Vivo ---------------------------------- El resto de este tutorial se basará en capturar un flujo en vivo de imagenes. Para ello usaremos la clase que se muestra a continuación. Como se describe, simplemente mostrará (blit) en la pantalla una corriente constante de cuadros a la pantalla, mostrando efecivamente un video en vivo. Básicamente es lo que se espera, hacer un bucle con get_image(), se aplica a la pantalla de Surface, y lo voltea. Por razones de rendimiento, suministraremos a la cámara la misma Surface para utilizar en cada ocasión. :: class Capture: def __init__(self): self.size = (640,480) # crear una visualización de surface. cosas estándar de pygame self.display = pygame.display.set_mode(self.size, 0) # esto es lo mismo que vimos antes self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no se detectaron cámaras.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # crear una surface para capturar, con fines de rendimiento # profundidad de bit es la misma que la de la Surface de visualización. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # si no querés vincular la velocidad de cuadros a la cámara, podés verificar # si la cámara tiene una imagen lista. Tené en cuenta que mientras esto funciona # en la mayoría de las cámaras, algunas nunca van a devolver un 'true'. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # pasalo (blit) a la Surface de visualización. ¡Simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # cerrar la cámara de forma segura self.cam.stop() going = False self.get_and_flip() Dado que get_image() es una llamada de bloqueo que podría tomar bastante tiempo en una cámara lenta, este ejemplo usa query_image() para ver si la cámara está lista. Esto permite separar la velocidad de fotogramas de tu juego de la de tu cámara. También es posible hacer que la cámara capture imágenes en un subproceso separado obteniendo aproximadamente la misma ganancia de rendimiento, si encontrás que tu cámara no es compatible con la función query_image(). Visión Básica por Computadora ----------------------------- Al usar los módulos de la cámara, transormación y máscara, pygame puede hacer algo de visión por computadora básica. Modelos de Color ^^^^^^^^^^^^^^^^^ When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial. :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB") .. image:: ../../reST/tut/camera_rgb.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV") .. image:: ../../reST/tut/camera_yuv.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV") .. image:: ../../reST/tut/camera_hsv.jpg :class: trailing Thresholding (Umbralización) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Usando la función threshold() del módulo de transformación, uno puede hacer simple efectos del estilo de pantalla verde o asilar objetos de colores especificos en una escena. En el siguiente ejemplo, usamos umbralización para separar el árbol verde y hacemos que el resto de la imagen sea negra. Consultá la documentación de referencia para más detalles de la función: :func:`threshold function `\ . :: self.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2) .. image:: ../../reST/tut/camera_thresholded.jpg :class: trailing Por supuesto, esto solo es útil si ya conocés el color exacto del objeto que estás buscando. Para evitar esto y hacer la umbralización utilizable en el mundo real, necesitamos agregar una etapa de calibración en la que identifiquemos el color de un objeto y usarlo para umbralizarlo. Nosotros usaremos la función average_color() del módulo de transformación para hacer esto. A continuación, se muestra un ejemplo de la función calibración que se podría repetir hasta que se produzca un evento como apretar una tecla y [obtener] una imagen de cómo se vería. El color adentro del cuadro será el que se use para la umbralización. Hay que tener en cuenta que estamos usando el modelo de color HSV en las imágenes a continuación. :: def calibrate(self): # capturar la imagen self.snapshot = self.cam.get_image(self.snapshot) # aplicarlo a la Surface de visualización self.display.blit(self.snapshot, (0,0)) # crear un rectángulo (rect) en el medio de la pantalla crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # obtener el color promedio del área dentro del rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # rellenar la esquina superior izquierda con ese color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip() .. image:: ../../reST/tut/camera_average.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2) .. image:: ../../reST/tut/camera_thresh.jpg :class: trailing Pueden usar la misma idea para hacer una simple pantalla verde/azul, al obtener primero una imagen del fondo y después umbralizar contrastando con ella. El ejemplo a continuación solo tiene la cámara apuntando a una pared blanca en modelo de color HSV. :: def calibrate(self): # captura un montón de imagenes de fondo. bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # promedia el color de las imágenes para llegar a uno solo y deshacerse de posibles perturbaciones pygame.transform.average_surfaces(bg,self.background) # aplicarlo a la Surface de visualización self.display.blit(self.background, (0,0)) pygame.display.flip() .. image:: ../../reST/tut/camera_background.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background) .. image:: ../../reST/tut/camera_green.jpg :class: trailing Uso del Módulo de Máscara ^^^^^^^^^^^^^^^^^^^^^^^^^ Lo anterior es genial si solo querés mostrar imágenes, pero con el módulo :mod:`mask module `, también podés usar la cámara como dispositivo de entrada para un juego. Por ejemplo, volviendo al ejemplo de la umbralización de un objeto específico, podemos encontrar la posición de ese objeto y usarlo para controlar un objeto en la pantalla. :: def get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # umbralizar contra el color que obtuvimos antes mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # mantener solo el manchón más grande de ese color connected = mask.connected_component() # asegurarse que el manchón sea lo suficientemente grande, que no sea solo perturbaciones if mask.count() > 100: # encontrar el centro del manchónfind the center of the blob coord = mask.centroid() # dibujar un círculo con un tamaño variable en el tamaño del manchón pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip() .. image:: ../../reST/tut/camera_mask.jpg :class: trailing Este es solo el ejemplo más básico. Podés rastrear múltiples manchas de diferentes colores, encontrar los contornos de los objetos, tener detección de colisiones entre objetos de la vida real y del juego, obtener el ángulo de un objetos para permitir su control, y más. ¡A divertirse! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/ChimpanceLineaporLinea.rst.txt0000644000175100001770000006066414676242340027502 0ustar00runnerdocker.. TUTORIAL:Descripciones línea por línea del ejemplo del chimpancé .. include:: common.txt *************************************************************** Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea *************************************************************** Chimpancé, Línea Por Línea ========================== .. rst-class:: docinfo :Autor: Pete Shinners. Traducción al español: Estefania Pivaral Serrano :Contacto: pete@shinners.org .. toctree:: :hidden: chimpance.py Introducción ------------ Entre los ejemplos de *pygame* hay un ejemplo simple llamado "chimp" (chimpancé). Este ejemplo simula un mono golpeable que se mueve alrededor de la pantalla con promesas de riquezas y recomepensas. El ejemplo en sí es muy simple y acarrea poco código de comprobación de error. Como modelo de programa, Chimp demuestra muchas de las bondades de pygame, como por ejemplo crear una ventana, cargar imágenes y sonidos, representar texto, y manejo de eventos básicos y del mouse. El programa y las imagenes se pueden encontrar dentro de la fuente estándar de distribución de pygame. Se puede ejecutar al correr `python -m pygame.examples.chimp` en la terminal. Este tutorial atravesará el código bloque a bloque, explicando cómo funciona el mismo. Además, se hará mención de cómo se puede mejorar el código y qué errores de comprobación podrían ser de ayuda. Este tutorial es excelente para aquellas personas que están buscando una primera aproximación a códigos de *pygame*. Una vez que *pygame* esté completamente instalado, podrás encontrar y ejecutar la demostración del chimpancé para ti mismo en el directorio de ejemplos. .. container:: fullwidth leading trailing .. rst-class:: small-heading (no, este no es un anuncio, es una captura de pantalla) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source ` Importación de Módulos ---------------------- Este es el código que importa todos los módulos necesarios del programa. Este código también comprueba la disponibilidad de algunos de los módulos opcionales de pygame. :: # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") Primero, se importa el módulo estándar de python "os" (sistema operativo). Esto permite hacer cosas como crear rutas de archivos independientes de la platforma. En la sigueinte línea, se importa el paquete de pygame. En nuestro caso, importamos pygame como ``pg``, para que todas las funciones de pygame puedan ser referenciadas desde el espacio de nombres ``pg``. Algunos de los módulos de pygame son opcionales, y si no fueran encontrados, la evaluación será ``False``. Es por eso que decidimos mostrar (print) un agradable mensaje de advertencia si los módulos :mod:`font` o :mod:`mixer ` no están disponibles. (Aunque estos solo podrían no estar disponibles en situaciones poco comunes). Finalmente, se preparan dos rutas que serán usadas para el resto del código. Una de ellas es ``main_dir``, que usa el módulo `os.path` y la variable `__file__` asignada por Python para localizar el archivo de juegos de python, y extraer la carpeta desde esa ruta. Luego, ésta prepara la ruta ``data_dir`` para indicarle a las funciones de carga exactamente dónde buscar. Carga de Recursos ----------------- A continuación, se presentan dos funciones que se pueden usar para cargar imágenes y sonidos. En esta sección examinaremos cada función individualmente. :: def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() Esta función toma el nombre de la imagen a cargar. Opcionalmente, también toma un argumento que puede usar para definir la clave de color (colorkey) de la imagen, y un argumento para determinar la escala de la imagen. La clave de color se usa en la gráfica para representar un color en la imagen que es transparente. Lo que esta función hace en primera instancia es crearle al archivo un nombre de ruta completo. En este ejemplo, todos los recursos están en el subdirectorio "data". Al usar la función `os.path.join`, se creará el nombre de ruta para cualquier plataforma en que se ejecute el juego. El paso siguiente es cargar la imagen usando la función :func:`pygame.image.load`. Luego de que la imagen se cargue, llamamos a la función `convert()`. Al hacer esto se crea una nueva copia del Surface y convierte su formato de color y la profundidad, de tal forma que coincida con el mostrado. Esto significa que el dibujo (blitting) de la imagen a la pantalla sucederá lo más rápido posible. Luego, usando la función :func:`pygame.transform.scale` se definirá el tamaño de la imagen. Esta función toma una Surface y el tamaño al cual se debería adecuar. Para darle tamaño con números escalares, se puede tomar la medida y determinar las dimensiones *x* e *y* con número escalar. Finalmente, definimos la clave de color para la imagen. Si el usuario suministró un valor para el parametro de la clave de color, usamos ese valor como la clave de color de la imagen. Usualmente, éste sería un valor de color RGB (red-green-blue = rojo-verde-azul), como (255, 255, 255) para el color blanco. También es posible pasar el valor -1 como la clave de color. En este caso, la función buscará el color en el píxel de arriba a la izquierda de la imagen, y lo usará para la clave de color. :: def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound La anterior, es la función para cargar un archivo de sonido. Lo primero que hace esta función es verificar si el módulo :mod:`pygame.mixer` se importó correctamente. En caso de no ser así, la función va a devolver una instancia de reproducción de un sonido de error. Esto obrará como un objeto de Sonido normal para que el juego se ejecute sin ningún error de comprobación extra. Esta funcion es similar a la función de carga de imagen, pero maneja diferentes problemas. Primero, creamos una ruta completa al sonido de la imagen y cargamos el archivo de sonido. Luego, simplemente devolvemos el objeto de Sonido cargado. Clases de Objetos para Juegos ----------------------------- En este caso creamos dos clases (classes) que representan los objetos en nuestro juego. Casi toda la logica del juego se organiza en estas dos clases. A continuación las revisaremos de a una. :: class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False En este caso, creamos una clase (class) que representa el puño del jugador. Esta se deriva de la clase `Sprite` incluida en el módulo :mod:`pygame.sprite`. La función `__init__` es llamada cuando se crean nuevas instancias de este clase. Esto le permite a la función `__init__` del Sprite preparar nuestro objeto para ser usado como una imagen (sprite). Este juego usa uno de los dibujos de sprite de la clase de Grupo. Estas clases pueden dibujar sprites que tienen un atributo "imagen" y uno "rect". Al cambiar simplemente estos dos atributos, el compilador (renderer) dibujará la imagen actual en la posición actual. Todos los sprites tienen un método `update()`. Esta función es tipicamente llamada una vez por cuadro. Es en esta función donde se debería colocar el código que mueva y actualice las variables para el sprite. El método de `update()` para el movimiento del puño, mueve el puño al lugar donde se encuentre el puntero del mouse. Asímismo, compensa sutilmente la posición del puño sobre el objeto, si el puño está en condición de golpear. Las siguientes dos funciones `punch()` y `unpunch()` cambian la condición de golpeado del puño. El método `punch()` también devuelve un valor verdadero si el puño está chocando con el sprite objetivo. :: class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite intializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image Si bien la clase (class) `Chimp` está haciendo un poco más de trabajo que el puño, no resulta mucho más complejo. Esta clase moverá al chimpancé hacia adelante y hacia atrás, por la pantalla. Cuando el mono es golpeado, él girará con un efecto de emoción. Esta clase también es derivada de la base de clases :class:`Sprite ` y es iniciada de igual manera que el puño. Mientras se inicia, la clase también establece el atributo "area" para que sea del tamaño de la pantalla de visualización. La función `update` para el chimpancé simplemente se fija en el estado actual del mono. Esta puede ser "dizzy" (mareado), la cual sería verdadera si el mono está girando a causa del golpe. La función llama al método `_spin` o `_walk`. Estas funciones son prefijadas con un guión bajo, lo cual en el idioma estándar de python sugiere que estos métodos deberían ser solo usados por la clase `Chimp`. Podríamos incluso hasta escribirlas con un doble guión bajo, lo cual indicaría a python que realmente intente hacerlas un método privado, pero no necesitamos tal protección. :) El método `_walk` crea una nueva posición para el mono al mover el 'rect' actual al centro del puño. Si la nueva posición se cruza hacia afuera del área de visualización de la pantalla, el movimiento del puño da marcha atrás. También imita la imagen usando la función :func:`pygame.transform.flip`. Este es un efecto crudo que hace que el mono se vea como si estuviera cambiando de dirección. El método `_spin` es llamado cuando el mono está actualmente en estado "dizzy" (mareado). El atributo 'dizzy' es usado para guardar el monto de rotación. Cuando el mono ha rotado por completo en su eje (360 grados) se resetea la imagen a la versión original no rotada. Antes de llamar a la función :func:`pygame.transform.rotate`, verás que el código hace una referencia local a la función simplemente llamanda "rotate". No hay ncesidad de hacer eso en este ejemplo, aquí fue realizada para mantener la siguiente línea un poco más corta. Notese que al llamar a la función `rotate`, se está siempre rotando la imagen original del mono. Cuando rotamos, hay un pequeña pérdida de calidad. Rotar repetidamente la misma imagen genera que la calidad se deteriore cada vez más. Esto se debe a que las esquinas de la imagen van a haber sido rotadas de más, causando que la imagen se haga más grande. Nos aseguramos que la nueva imagen coincida con el centro de la vieja imagen, para que de esta forma se rote sin moverse. El último método es `punched()` el cual indica al sprite que entre en un estado de mareo. Esto causará que la imagen empice a girar. Además, también crea una copia de la actual imagen llamada "original". Inicializar Todo ---------------- Antes de poder hacer algo con pygame, necesitamos asegurarnos que los módulos estén inicializados. En este caso, vamos a abrir también una simple ventana de gráficos. Ahora estamos en la función `main()` del programa, la cual ejecuta todo. :: pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) La primera línea para inicializar *pygame* realiza algo de trabajo por nosotros. Verifica a través del módulo importado *pygame* e intenta inicializar cada uno de ellos. Es posible volver y verificar que los módulos que fallaron al iniciar, pero no vamos a molestarnos acá con eso. También es posible tomar mucho más control e inicializar cada módulo en especifico, uno a uno. Ese tipo de control no es necesario generalmente, pero está disponible en caso de ser deseado. Luego, se configura el modo de visualización de gráficos. Notse que el módulo :mod:`pygame.display` es usado para controlar todas las configuraciones de visualización. En este caso nosotros estamos buscando una ventana 1280x480, con ``SCALED``, que es la señal de visualización (display flag) Esto aumenta proporcionalmente la ventana de visualización (display) más grande que la ventana. (window) Por último, establecemos el título de la ventana y apagamos el cursor del mouse para nuestra ventana. Es una acción básica y ahora tenemos una pequeña ventana negra que está lista para nuestras instrucciones (bidding) u ofertas. Generalmente, el cursor se mantiene visible por default, asi que no hay mucha necesidad de realmente establecer este estado a menos que querramos esconderlo. Crear el Fondo -------------- Nuestro programa va a tener un mensaje de texto en el fondo. Sería bueno crear un único surface que represente el fondo y lo use repetidas veces. El primer paso es crear el Surface. :: background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) Esto crea el nuevo surface, que en nuestro caso, es del mismo tamaño que la ventana de visualización. Notese el llamado extra a `convert()` luego de crear la Surface. La función `convert()` sin argumentos es para asegurarnos que nuestro fondo sea del mismo formato que la ventana de visualización, lo cual nos va a brindar resultados más rápidos. Lo que nosotros hicimos también, fue rellenar el fondo con un color verduzco. La función `fill()` suele tomar como argumento tres instancias de colores RGB, pero soporta muchos formatos de entrada. Para ver todos los formatos de color veasé :mod:`pygame.Color`. Centrar Texto en el Fondo ------------------------- Ahora que tenemos el surface del fondo, vamos a representar el texto en él. Nosotros solo haremos esto si vemos que el módulo :mod:`pygame.font` se importó correctamente. De no ser así, hay que saltear esta sección. :: if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) Tal como pueden ver, hay un par de pasos para realizar esto. Primero, debemos crear la fuente del objeto y renderizarlo (representarlo) en una nueva Surface. Luego, buscamos el centro de esa nueva surface y lo pegamos (blit) al fondo. La fuente es creada con el constructor `Font()` del módulo `font`. Generalmente, uno va a poner el nombre de la fuente TrueType en esta función, pero también se puede poner `None`, como hicimos en este caso, y entonces se usará la fuente por predeterminada. El constructor `Font` también necesita la información del tamaño de la fuente que se quiere crear. Luego vamos a represetar (renderizar) la fuente en la nueva surface. La función `render` crea una nueva surface que es del tamaño apropiado para nuestro texto. En este caso, también le estamos pidiendo al render que cree un texto suavizado (para un lindo efecto de suavidad en la apariencia) y que use un color gris oscuro. Lo siguiente que necesitamos es encontrar la posición la posición central, para colocar el texto en el centro de la pantalla. Creamos un objeto "Rect" de las dimensiones del texto, lo cual nos permite asignarlo fácilmente al centro de la pantalla. Finalmente, blitteamos (pegamos o copiamos) el texto en la imagen de fondo. Mostrar el Fondo mientras Termina el Setup ------------------------------------------ Todavía tenemos una ventana negra en la pantalla. Mostremos el fondo mientras esperamos que se carguen los otros recursos. :: screen.blit(background, (0, 0)) pygame.display.flip() Esto va a blittear (pegar o copiar) nuestro fondo en la ventana de visualización. El blit se explica por sí mismo, pero ¿qué está haciendo esa rutina flip? En pygame, los cambios en la surface de visualización (display) no se hacen visibles inmediatamente. Normalmente, la pantalla debe ser actualizacada para que el usuario pueda ver los cambios realizados. En este caso la función `flip()` es perfecta para eso porque se encarga de toda el área de la pantalla. Preparar Objetos del Juego -------------------------- En este caso crearemos todos los objetos que el juego va a necesitar. :: whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() Primero cargamos dos efectos de sonido usando la función `load_sound`, que se encuentra definida en código arriba. Luego, creamos una instancia para cada uno de los sprites de la clase. Por último, creamos el sprite :class:`Group ` que va a contener todos nuestros sprites. En realidad, nosotros usamos un grupo especial de sprites llamado :class:`RenderPlain`. Este grupo de sprites puede dibujar en la pantalla todos los sprites que contiene. Es llamado `RenderPlain` porque en realidad hay grupos Render más avanzados, pero para nuestro juego nosotros solo necesitamos un dibujo simple. Nosotros creamos el grupo llamado "allsprites" al pasar una lista con todos los sprites que deberían pertenecer al grupo. Exise la posibilidad, si más adelante quisieramos, de agregar o sacar sprites de este grupo, pero para este juego no sería necesario. El objeto `clock` que creamos será usado para ayudar a controlar la frequencia de cuadros de nuestro juego. Vamos a usarlo en el bucle (loop) principal de nuestro juego para asegurarnos que no se ejecute demasiado rápido. Bucle principal (Main Loop) --------------------------- No hay mucho por acá, solo un loop infinito. :: going = True while going: clock.tick(60) Todos los juegos se ejecutan sobre una especie de loop. El orden usual de las cosas es verificar el estado de la computadora y la entrada de usuario, mover y actualizar el estado de todos los objetos, y luego dibujarlos en la pantalla. Verás que este ejemplo no es diferente. También haremos un llamado a nuestro objeto `clock`, que asegurará que nuestro juego no se ejecute pasando los 60 cuadros por segundo. Manejar los Eventos de Entrada ------------------------------ Este es un caso extremandamente simple para trabajar la cola de eventos. :: for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() Primero obtenemos todos los Eventos (events) disponibles en pygame y los recorremos en loop. Las primeras dos pruebas es para ver si el usuario dejó nuestro juego, o si presionó la tecla de escape. En estos casos, configuramos ``going`` en ``False``, permitiendonos salir del loop infinito. A continuación, verificamos si se presionó o si se soltó el botón del mouse. En el caso de que el botón se haya presionado, preguntamos al primer objeto si chocó con el mono. Se reproduce el sonido apropiado, y si el mono fue golpeado, le decimos que empiece a girar (al hacer un llamado a su método `punched()` ) Actualizar los Sprites ---------------------- :: allsprites.update() Los grupos de Sprite tienen un método `update()`, que simplemente llama al método de actualización para todos los sprites que contiene. Cada uno de los objetos se va a mover, dependiendo de cuál sea el estado en el que estén. Acá es donde el mono se va a mover de un lado a otro, o va a girar un poco más lejos si fue recientemente golpeado. Dibujar la Escena Completa -------------------------- Ahora que todos los objetos están en el lugar indicado, es el momento para dibujarlos. :: screen.blit(background, (0, 0)) allsprites.draw(screen) pygame.display.flip() La primera llamada de blit dibujará el fondo en toda la pantalla. Esto borra todo lo que vimos en el cuadro anterior (ligeramente ineficiente, pero suficientemnte bueno para este juego). A continuación, llamamos al método `draw()` del contenedor de sprites. Ya que este contenedor de sprites es en realidad una instancia del grupo de sprites "DrawPlain", sabe como dibujar nuestros sprites. Por último, usamos el método `flip()` para voltear los contenidos del software de pygame. Se realiza el flip a través del cargado de la imagen en segundo plano. Esto hace que todo lo que dibujamos luego se visibilice de una vez. Fin del Juego ------------- El usuario ha salido del juego, hora de limpiar (clean up) :: pg.quit() Hacer la limpieza, el cleanup, de la ejecución del juego en *pygame* es extremandamente simple. Ya que todas las variables son automáticamente destruidas, nosotros no tenemos que hacer realmnete nada, únicamente llamar a `pg.quit()` que explicitamente hace la limpieza de las partes internas del pygame.././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/CrearJuegos.rst.txt0000644000175100001770000001544114676242340025352 0ustar00runnerdocker.. TUTORIAL:Tom Chance's Making Games Tutorial .. include:: ../../reST/common.txt **************************** Crear Juegos con Pygame **************************** Crear Juegos con Pygame ======================== .. rst-class:: docinfo :Traducción al español: Estefanía Pivaral Serrano .. .. toctree:: .. :hidden: .. :glob: .. tom_games2 .. tom_games3 .. tom_games4 .. tom_games5 .. tom_games6 Tabla de Contenido ------------------- \1. :ref:`Introducción ` \1.1. :ref:`A note on coding styles ` .. \2. :ref:`Revisión: Fundamentos de Pygame ` .. \2.1. :ref:`El juego básico de pygame ` .. \2.2. :ref:`Objetos básicos de pygame ` .. \2.3. :ref:`Blitting ` .. \2.4. :ref:`El evento en loop (búcle de evento) ` .. \2.5. :ref:`Ta-ra! ` .. \3. :ref:`Dandole inicio ` .. \3.1. :ref:`Las primeras líneas y carga de módulos ` .. \3.2. :ref:`Funciones de manejo de recursos ` .. \4. :ref:`Clases de objeto de juego ` .. \4.1. :ref:`Una clase de pelota sencilla ` .. \4.1.1. :ref:`Desvío 1: Sprites ` .. \4.1.2. :ref:`Desvío 2: Física vectorial ` .. \5. :ref:`Objetos controlable por el usuario ` .. \5.1. :ref:`Una clase de bate sencillo ` .. \5.1.1. :ref:`Desvío 3: Eventos de Pygame ` .. \6. :ref:`Ensamblando los elementos ` .. \6.1. :ref:`Deja que la pelota golpée los lados ` .. \6.2. :ref:`Deja que la pelota golpée el bate ` .. \6.3. :ref:`El producto final ` .. _crearjuegos-1: 1. Introducción --------------- Antes que nada, asumo que han leído el tutorial :doc:`Chimpancé línea por línea `, que presenta lo básico de Python y pygame. Denle una leida antes de leer este tutorial, ya que no voy a repetir lo que ese tutorial dice (o al menos no en tanto detalle.) Este tutorial apunta a aquellos que entienden cómo hacer un "juego" ridiculamente simple, y a quien le gustaría hacer un juego relativamente sencillo como Pong. Les presenta algunos conceptos de diseño de juegos, algunas nociones matemáticas sencillas para trabajar con la física de la pelota, y algunas formas de mantener el juego fácil de mantener y expandir. Todo el código en este tutorial sirve para implementar `TomPong `_, un juego que yo he escrito. Hacia el fin del tutorial, no solo deberías tener una idea más firme de pygame, sino que también deberías poder entender como funciona TomPong y cómo hacer tu propia versión. Ahora, un breve resumen de los conceptos básicos de pygame. Un método común para organizar el código de un juego es dividirlo en las siguientes seis secciones: - **Carga de módulos** que son requeridos por el juego. Cosas estándar, excepto que deberías recordar importar nombres locales de pygame, así como el propio módulo de pygame. - **Funciones de manejo de recursos**; define algunas clases para el manejo de los recursos más básicos, que estará cargando imágenes y sonidos, como también conectandose y desconectandose de y hacia redes, cargando partidas guardadas y cualquier otro recurso que puedas tener. - **Clases de objeto de juego**; define las clases de los objetos del juego. En el ejemplo de Pong, estos serían uno para el bate del jugador (que podrás inicializar varias veces, uno para cada jugador en el juego) y otro para la pelota (que también podrá tener múltiples instancias). Si vas a tener un buen menú en el juego, también es una buena idea hacer una clase del menú. - **Cualquier otra función del juego**; define otras funciones necesarias, como marcadores, manejo de menú, etc. Cualquier código que se podría poner en la lógica principal del juego, pero que dificultaría la comprensión de dicha lógica, deberá tener su propia función. Algo como trazar un marcador no es lógica del juego, entonces deberá moverse a una función. - **Inicializar el juego**, incluyendo los propios objetos de pygame, el fondo, los objetos del juego (inicializando instancias de las clases) y cualquier otro pequeño fragmento de código que desee agregar. - **El loop (búcle) principal**, en el cual se puede poner cualquier manejo de entrada (es decir, pendiente de usuarios presionando teclas/botones), el código para actualizar los objetos del juego y finalmente para actualizar la pantalla. Cada juego que hagas tendrá alguna o todas estas secciones, posiblemente con más de las propias. Para los propósitos de este tutorial, voy a escribir sobre como TomPong está planteado y las ideas sobre las que escribo pueden transferirse a casi cualquier tipo de juego que puedas crear. También voy a asumir que deseas mantener todo el código en un único archivo, pero si estás creando un juego razonablemente grande, suele ser una buena idea incluir ciertas secciones en los archivos de módulos. Poner las clases de objeto en un archivo llamado ``objects.py``, por ejemplo, puede ayudarte a mantener la lógica del juego separada de los objetos del juego. Si tenés mucho código de manejo de recursos, también puede ser útil poner eso en ``resources.py`` Luego podés usar :code:`from objects,resources import *` para importar todas las clases y funciones. .. _crearjuegos-1-1: 1.1. Una nota sobre estilos de codificación ------------------------------------------- Lo primero a tener en cuenta cuando abordamos cualquier proyecto de programación es el decidir el estilo de codificación, y mantenerse consistente. Python resuelve mucho de los problemas debido a su estricta interpretación de los espacios en blanco y la sangría, pero aún así se puede elegir el tamaño de sus sangrías, si coloca cada importación de módulo en una nueva línea, cómo comentas el código, etc. Verás cómo hago todas estas cosas en los ejemplos del código; no es necesario que se use mi estilo, pero cualquiera sea el estilo que adoptes, usalo en todo el programa. Tratá también de documentar todas tus clases y comentá en cada fragmento de código que parezca oscuro, sin caer en comentar lo obvio. He visto mucho gente que hace lo siguiente: : player1.score += scoreup # Add scoreup to player1 score (Agrega scoreup al score de player 1) El peor código está mal diseñado, con cambios en el estilo que aparentan ser aleatorios y documentación deficiente. El código deficiente no solo es molesto para otras personas, pero también hace que sea difícil de mantener para uno mismo. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/GuiaNewbie.rst.txt0000644000175100001770000006115614676242340025164 0ustar00runnerdocker.. TUTORIAL: David Clark's Newbie Guide To Pygame .. include:: ../../reST/common.txt *********************************** Guía de Pygame para Principiantes *********************************** .. title:: Guía de Pygame para Newbies .. rst-class:: docinfo :Traducción al español: Estefanía Pivaral Serrano Guía de Pygame para Principiantes ================================= o **Cosas que aprendí mediante prueba y error para que vos no tengas que pasar por eso** o **Cómo aprendí a dejar de preocuparme y amar el blit.** Pygame_ es un contenedor de Python para SDL_, escrito por Pete Shinners. Lo cual significa que al usar pygame, podés escribir juegos u otras aplicaciones multimedia en Python que se ejecutarán sin alteraciones en cualquier plataforma compatible con SDL (Windows, Unix, Mac, BeOS y otras). Pygame puede ser fácil de aprender, pero el mundo de la programación de gráficos pueden ser bastante confusos para el recién llegado. Escribí esto para tratar de destilar el conocimiento práctico que obtuve durante el último año trabajando con pygame y su predecesor, PySDL. He tratado de clasificar las sugerencias en orden de importancia, pero cuán relevante es cada consejo dependerá de tu propio antecedente y los detalles de tu proyecto. Ponte cómodo trabajando con Python ---------------------------------- Lo más importante es sentirse confiado usando python. Aprender algo tan potencialmente complicado como programación de gráficos será un verdadero fastidio si tampoco se está familiarizado con el lenguaje que se está usando. Escrí una cantidad de programas considerables en Python -- analizá (parse) algunos archivos de texto, escribí un juego de adivinanzas o un programa de entradas de diario, o algo. Ponte cómodo con las secuencias de caracteres que representan textos (strings) y la manipulación de listas. Sepa cómo funciona ``import`` (importar) -- intenta escribir un programa que se extienda a varios archivos fuente. Escribe tus propias funciones, y practica manipular números y caracteres; sepa cómo convertir de una a otra. Llega al punto en que la sintaxis para usar listas y diccionarios es algo instintivo-- no querés tener que ejecutar la documentación cada vez que necesitas dividir una lista u ordernar un juego de llaves. Resiste la tentación de correr a una lista de emails, comp.lang.python, o IRC cuando te encuentres en un problema. En lugar de eso, enciende el interperte y juega con el problema por unas horas. Imprime el `Python 2.0 Quick Reference`_ y conservalo junto a la computadora. Esto puede sonar increiblemente aburrido, pero la confianza que vas a ganar al familiarizarte con python hará maravillas cuando se trate de escribir tu propio juego. El tiempo que dediques a escribir código python de forma instintiva no será nada en comparación con el tiempo que ahorrarás al escribir código real. Reconoce qué partes de pygame necesitás realmente. -------------------------------------------------- Ver el revoltijo de clases en la parte superior de la documentación del índice de documentación de pygame puede ser confuso. Lo más importante es darse cuenta de que se puede hacer mucho con tan solo un pequeño subconjunto de funciones. Existen muchas clases que probablemente nunca uses -- en un año, yo no he tocado las funciones ``Channel``, ``Joystick``, ``cursors``, ``Userrect``, ``surfarray`` o ``version``. Sepa qué es una Surface (superficie) ------------------------------------ La parte más importante de pygame es la Surface (superficie). La Surface puede pensarse como una hoja de papel en blanco. Se pueden hacer muchas cosas con la Surface -- se pueden dibujar líneas, colorear partes de ella con colores, copiar imágenes hacia y desde ella, y establecer o leer píxeles indivduales de colores en ella. Una Surface puede ser de cualquier tamaño (dentro de lo lógico) y puede haber tantas como quieras (de nuevo, dentro de lo razonable). Una Surface es especial -- la que vayas a crear con ``pygame.display.set_mode()``. Esta 'display surface' (surface de visualización) representa la pantalla; lo que sea que hagas en ella aparecerá en la pantalla del usuario. Solo puedes tener una de esas -- esa es una limitación de SDL, no de pygame. Entonces, ¿cómo crear Surfaces? Como mencioné arriba, la Surface especial se crea con ``pygame.display.set_mode()``. Se puede crear una surface que contenga una imagen usando ``image.load()``, o podés crear una surface que contenga texto con ``font.render()``. Incluso se puede crear una surface que no contenga nada en absoluto con ``Surface()``. La mayoría de las funciones de Surface no son críticas. Sólo es necesario aprender ``blit()``, ``fill()``, ``set_at()`` y ``get_at()``, y vas a estar bien. Usa surface.convert(). ---------------------- Cuando yo leí por primera vez la documentación para ``surface.convert()``, no pensé que fuera algo de lo que tuviera que preocuparme. 'Sólo voy a usar PNGs, por lo tanto todo o que haga será en ese formato. Entonces no necesito ``convert()``';. Resultó ser que estaba muy, muy equivocado. El 'format' (formato) al que ``convert()`` se refiere no es el formato del archivo (por ejemplo, PNG, JPEG, GIF), es lo que se llama el 'píxel format' (formato pixel). Esto se refiere a la forma particular en la que una Surface registra colores individuales en un píxel especifico. Si el formato de la Surface (Surface format) no es el mismo que el formato de visualización (display format), SDL tendrá que convertirlo sobre la marcha para cada blit -- un proceso que consume bastante tiempo. No te preocupes demasiado por la explicación; solo ten en cuenta que ``convert()`` es necesario si querés que haya velocidad en tus blits. ¿Cómo se usa convert? Sólo hay que hacer una call (llamada) creando la Surface con la función ``image.load()``. En vez de hacer únicamente:: surface = pygame.image.load('foo.png') Haz:: surface = pygame.image.load('foo.png').convert() Es así de fácil. Lo único que se necesita es hacer una de esas calls (llamadas) por Surface, cuando cargues una imagen del disco. It's that easy. You just need to call it once per surface, when you load an image off the disk. Estará satisfecho con los resultados; veo al rededor de un 6x aumento de la velocidad de blitting llamando (haciendo la call) ``convert()``. La única vez que no vas a querer usar ``convert()`` es cuando realmente necesitas tener el control absoluto sobre al formato interno de una imagen -- digamos que estás escribiendo un programa de conversión de imagen o algo así, y necesitás asegurarte que el archivo de salida tenga el mismo formato píxeles que el archivo de entrada. Si estás escribiendo un juego, necesitás velocidad. Usa ``convert()``. Animación rect "sucia". ----------------------- La causa más común de frecuencias de cuadros inadecuadas en los programas Pygame resulta de malinterpretar la función ``pygame.display.update()``. Con pygame, con simplemente dibujar algo en la Surface de visualización no hace que aparezca en la pantalla -- necesitas hacer un llamado a ``pygame.display.update()``. Hay tres formas de llamar a esta función: * ``pygame.display.update()`` -- Esto actualiza toda la ventana (o toda la pantalla para visualizaciones en pantalla completa). * ``pygame.display.flip()`` -- Esto hace lo mismo, y también hará lo correcto si estás usando ``double-buffered`` aceleración de hardware, que no es así, entonces sigamos ... * ``pygame.display.update(a rectangle or some list of rectangles)`` -- Esto actualiza solo las áreas rectangulares de la pantalla que especifiques. La mayoría de la gente nueva en programación gráfica usa la primera opción -- ellos actualizan la pantalla completa en cada cuadro. El problema es que esto es inaceptablemente lento para la mayoría de la gente. Hacer una call a ``update()`` toma 35 milisegundos en mi máquina, lo cual no parece mucho, hasta que te das cuenta que 1000 / 35 = 28 cuadros por segundo *máximo*. Y eso es sin la lóagica del juego, sin blits, sin entrada (input) , sin IA, nada. Estoy aquí sentado actualizando la pantalla, y 28 fps (frames per second - cuadros por segundo) es mi máximo de cuadros por segundo. Ugh. La solucion es llamada 'dirty rect animation' o 'animación de rect sucia'. En vez de actualizar la pantalla completa en cada cuadro, solo se actualizan las partes que cambiaron desde el último cuadros. Yo hago esto al hacer un seeguimiento de esos rectángulos en una lista, luego llamando a ``update(the_dirty_rectangles)`` al final del cuadro. En detalle para un sprite en movimiento, yo: * Blit una parte del fondo sobre la ubicación actual del sprite, borrándolo. * Añado el rectángulo de la ubicación actual a la lista llamada dirty_rects. * Muevo el sprite. * Dibujo (Draw) el sprite en su nueva ubicación. * Agrego la nueva ubicación del sprite a mi lista de dirty_rects. * Llamo a ``display.update(dirty_rects)`` La diferenci aen velocidad es asombrosa. Tengan en consideración que SolarWolf_ tiene docenas de sprites en constante movimiento que se actualizan sin problemas, y aún así le queda suficiente tiempo para mostrar un campo estelar de paralaje en el fondo, y también actualizarlo. Hay dos casos en que esta técnica no funciona. El primero es cuando toda la ventana o la pantalla es siendo actualizada realmente en cada cuadro -- pensá en un motor de desplazamiento como un juego de estrategia en tiempo real o un desplazamiento lateral. Entonces, ¿qué hacés en ese caso? Bueno, la respuesta corta es -- no escribas este tipo de juegos en pygame. La respuesta larga es desplazarse en pasos de varios píxeles a la vez; no intentes hacer del desplazamiento algo perfectamente suave. El jugador apreciará un juego que se desplaza rápidamente y no notará demasiado el fondo saltando. Una nota final -- no todo juego requeire altas frecuencias de cuadros. Un juego de guerra estratégico podría funcionar fácilmente con solo unas pocas actualizaciones por segundo -- en este caso, la complejidad agregada de la animación de rect sucio (dirty rect animation) puede no ser necesaria. NO hay regla seis. ------------------ Los surfaces de hardware son más problemáticos de lo que valen. --------------------------------------------------------------- **Especialmente en pygame 2, porque HWSURFACE ahora no hace nada** Si estuviste mirando las distintas flags (banderas) que se pueden usar con ``pygame.display.set_mode()``, puede que hayas pensado lo siguiente: `Hey, HWSURFACE! Bueno, quiero eso -- a quién no le gusta la acelación de hardware. Ooo... DOUBLEBUF; bueno, eso suena rápido, ¡supongo que yo también quiero eso!`. No es tu culpa; hemos sido entrenados por años en juegos 3D como para creer que la aceleración de hardware es buena, y el rendering (representación) del software es lento. Desafortunadamente, el rendering de hardware viene con una larga lista de inconvenientes: * Solo funciona en algunas plataformas. Las máquinas con Windows generalmente pueden obtener surfaces (superficies) si se les solicita. La mayoría de otras plataformas no pueden. Linux, por ejemplo, puede proporcionar una surface de hardware si X4 está isntalado, si DGA2 está funcionando correctamente, y si las lunas están alineadas correctamente. Si la surface de hardware no está disponible, SDL va a proporcionar silenciosamente una surface de software en su lugar. * Solo funciona en pantalla completa. * Complica el acceso por píxel. Si tenés una surface de hardware, necesitas bloquear la superficie antes de escribir o leer valores de píxel en ella. Si no lo haces, Cosas Malas Suceden. Luego vas a necesitar desbloquear rápidamente la superficie nuevamente antes de que el SO se confunda y comience a entrar en pánico. La mayor parte de los procesos en pygame están automatizados, pero es algo más a tener en cuenta. * Pierdes el puntero del mouse. Si especificás ``HWSURFACE`` (y de hecho lo obtienes) tu puntero, por lo general, simplemente desaparecerá (o peor, se quedará en un estado parpadeante por ahí). Deberás crear un sprite para que actúe como puntero manual, y deberás preocuparte por la aceleración y la sensibilidad del puntero. ¡Qué molestia! * Podría ser más lento de todos modos. Muchos controladores no están acelerados para los tipos de dibujos que hacemos, y dado que todo tiene que ser blitteado por el bus de video (a menos que también puedas meter la la surface de origen en la memoria de video), puede que termine siendo más lento que el acceso al software de todos modos. El rendering (representación) de hardware tiene su lugar. Funciona de manera bastante confiable en Windows, por lo que si no estás interesado en el rendimiento de multiplataformas, puede proporcionarte un aumento sustancial de la velocidad. Sin embargo, tiene un costo -- mayor dolor de cabeza y complejidad. Es mejor apegarse al viejo y confiable ``SWSURFACE`` hasta que estés seguro de lo que estás haciendo. No te distraigas con problemas secundarios. ------------------------------------------- A veces, los nuevos programadores dedican mucho tiempo preocupandose sobre problemas que no son realmente críticos para el éxito de su juego. El deseo de arreglar los problemas secundarios es entendible, pero al principio en el proceso de creación de un juego, ni siquiera puedes saber cuáles son las preguntas importantes, mucho menos qué respuestas deberías elegir. El resultado puede ser un montón de prevariaciones innecesarias. Por ejemplo, consideren la pregunta de cómo organizar los archivos gráficos. ¿Debería cada cuadro tener su propio archivo gráfico, o cada sprite? ¿Quizás todos los gráficos se deberían comprimir en un archivo? Se ha perdido una gran cantidad de tiempo en muchos proyectos, preguntándose estas preguntas en lista de correo, debatiendo las respuestas, haciendo perfiles, etc, etc. Este es un tema secundario; cualquier cantidad de tiempo invertido en discutir eso, debería haber sido usado en escribir el código del juego real. El idea es que es mucho mejor tener una solución 'bastante buena' que haya sido implementada, que una solucion perfecta que nunca se haya llegado a escribir. Los rects son tus amigos. ------------------------- El envoltorio de Pete Shinners puede tener efectos alfa geniales y velocidades rápidas de blitting, pero tengo que admitir que mi parte favorita de pygame es la humilde clase ``Rect``. Un rect es simplemente un rectángulo -- definido solo por la posición de su esquina superior izquierda, su ancho y su altura. Muchas funciones de pygame toman rects como argumentos, y ellas solo hacen 'rectstyles', una secuencia que tiene los mismos valores que un rect. Entonces si necesito un rectángulo que defina el área entre 10, 20 y 40, 50, puedo hacer cualquier de las siguientes:: rect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30)) Sin embargo, si usas cualquiera de las primeras tres versiones, obtendrás accesso a las funciones de utilidad del rect. Estas incluyen funciones para mover, encoger e inflar los rects, encontrar la union de dos rects, y una variedad de funciones de detección de colisión. Por ejemplo, supongamos que yo quiero obtener una lista de todos los sprites que contiene un punto (x,y) -- quizás el jugador clickeó ahí, o quizás esa es la ubicación actual de una bala. Es simple si cada sprite tiene un miembro .rect -- solo hay que hacer: sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)] Los rects no tienen otra relación con los surfaces o con las funciones gráficas, aparte del hecho de que puedes usarlos como argumentos. También se pueden usar en lugares que no tienen nada que ver con gráficos, pero aún así deben ser definidos como rectángulos. En cada proyecto descrubro algunos lugares nuevos donde usar rects donde nunca pensé que los necesitaría. No te molestes con la detección de colisión de píxel perfecto. -------------------------------------------------------------- Así que, tenés tus sprites moviendose y necesitás saber si se están chocando entre sí. Es tentador escribir algo como lo siguiente:ite something like the following: * Checkear si los rects están en colisión. Si no lo están, ignorarlos. * Para cada píxel en el área de superposición, ver si los píxeles correspondientes de ambos sprites son opacos. Si es así, hay una colisión. Hay otras formas de hacer esto, con ???????? coordinando máscaras de sprite y así sucesivamente, pero de cualquier forma en que se haga en pygame, probablemente sea demasiado lento. Para la mayoría de los juego probablemente sea mejor hacer solo un "sub-rect de colisión" -- esto es, crear un rect por cada sprite que es un poco más pequeño que la imagen real, y usar eso para colisiones. Esto va a resultar más rápido y, en la mayoría de los casos, el jugador no va a notar la imprecisión. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision. Gestión del subsistema de eventos. ---------------------------------- El sistema de eventos de Pygame es un poco truculento. Hay en realidad dos formas diferntes de saber qué está haciendo un dispositivo de entrada (teclado, mouse, o joystick). La primera es directamente comprobar el estado del dispositivo. Esto se hace mediante la llamada, digamos, ``pygame.mouse.get_pos()`` o ``pygame.key.get_pressed()``. Esto te indicará el estado de tu dispositivo *en el momento en que llames a la función* El segundo método usa la cola de eventos de SDL. Esta cola es una lista de eventos -- eventos se agregan a la lista al ser detectados, y se eliminan de la cola mientras se leen. Hay ventajas y desventajas para cada sistema. Comprobación de estado (sistema 1) (state-checking) aporta precisión -- sabés exactamente cuándo se realizó la entrada -- si ``mouse.get_pressed([0])`` (mouse fue presionado) es 1, eso significa que el botón izquierdo del mpuse está abajo *justo en este momento*. La cola de eventos meramente reporta que el mouse estuvo abajo en algún momento del pasado; si revisas la cola con bastante frecuencia, eso puede estar bien, pero si te demorás en verificarlo con otro código, latencia de entrada puede incrementar. Otra ventaja del sistema de comprobación de estado es que detecta "acordes" fácilmente; es decir, varios estados al mismo tiempo. Si querés saber si las teclas ``t`` y la ``f`` están ambas presionadas al mismo tiempo, sólo hay que checkear:: if (key.get_pressed[K_t] and key.get_pressed[K_f]): print("Sip!") Sin embargo, en el sistema de colas, cada pulsación de tecla llega a la cola como un evento completamente separado, entonces será necesario recordar que la tecla ``t`` estuvo presionada y que aún no había sido soltada mientras la tecla ``f`` fue presionada. Un poco más complicado. Sin embargo, el sistema de estados tiene una gran desventaja. Solo informa el estado del dispositivo al momento en que es llamado; si el usuario clickea el botón del mouse y lo suelta justo antes del llamado a ``mouse.get_pressed()``, el botón del mouse va a devolver un 0 -- ``get_pressed()`` falló completamente en detectar la pulsación del botón del mouse. Dos events, ``MOUSEBUTTONDOWN`` y ``MOUSEBUTTONUP``, seguirán esperando en la cola de eventos a ser recuperados y procesados. La lección es la siguiente: elegí el sistema que cumpla con tus requisitos. Si no hay mucho sucediendo en tu loop -- supongamos, estás sentado en un bucle de ``while True``, esperando una entrada, usa ``get_pressed()`` u otra función de estado; la latencia será menor. Por otro lado, si cada pulsación de tecla es crucial, pero la latencia no es tan importante -- por ejemplo, el usuario está escribiendo algo en un cuadro de edición, usá la cola de eventos. Algunas pulsaciones de tecla pueden retrasarse un poco, pero al menos van a aparecer todas. Una nota sobre ``event.poll()`` vs. ``wait()`` -- ``poll()`` puede parecer mejor ya que no impide al programa de hacer otra cosa mientras está esperando la entrada -- ``wait()`` suspende el programa hasta que reciba el evento. Sin embargo, ``poll()`` consumirá el 100% del tiempo disponible del CPU mientras se esté ejecutando y llenará la cola de eventos con ``NOEVENTS``. Para seleccionar solo los tipo de eventos que resultan de interés usa ``set_blocked()``, la cola será mucho más manejable. Colorkey vs. Alpha. ------------------- Hay mucha confusión en torno a estas dos técnicas, y gran parte de esto proviene de la terminología usada. 'Colorkey blitting' (blitting de la clave de color) implica decirle a pygame que todos lso píxeles de cierto color de una determinada imagen son transparentes en vez del color que realmente sean. Estos píxeles transparentes no son blitteados cuando el resto de la imagen es blitteada y entonces no oscurecen el fondo. Así es como hacemos los sprites que no son de forma rectangular. Simplemente llamamos a ``surface.set_colorkey(color)``, donde el color es una tupla RGB, supongamos (0,0,0). Esto haría que cada píxel en la imagen de origen transparente en vez de negro. 'Alpha' es diferente, y como en dos sabores. 'Image alpha' (imagen alfa) que aplica a la imagen completa, y es probablemente lo que quieras. Propiamente conocido como 'translucidez', alpha causa que cada píxel en la imagen de origen sea solo *parcialmente* opaco. Por ejemplo, si configuras el alfa de una surface en 192 y después lo blitteas (convertis) en un fondo, 3/4 del color de cada píxel provendrá de la imagen de origan, y 1/4 del fondo. Alfa se mide de 255 a 0, donde 0 es completamente transparente, y 255 es completamente opaco. Nótese que el blitting con colorkey y alfa (colorkey and alfa blitting) pueden combinarse -- esto produce una imagen completamente transparete en algunos lugares y semi-transparente en otros. 'Per-pixel alpha' ('Alfa por pixel') es el otro tipo de alfa, y es más complicado Básicamente, cada píxel de la imagen de origen tiene su propio valor alfa, de 0 a 1. Cada píxel, por lo tanto, puede tener una opacidad diferente cuando se blittea (proyecta) sobre el fondo. Este tipo de alfa no se puede mezclar con la proyección (el blitting) de la clave de color, y anula el 'per-image' alfa. El alfa por píxel (per-pixel alfa) es raramente usado en juego, y para usarlo tenes que guardar la imagen de origen en un editor gráfico con un *canal alpha* especial. Es complicado -- no lo usen todavía. Haz cosas a la manera de pythony. --------------------------------- Una nota final (no es la menos importante, simplemente viene al final) Pygame es un envoltorio bastante liviano alrededor de SDL, que a su vez es un ligero envoltorio alrededor de las calls (llamadas) de gráficos del sistema operativo nativo. Las posibilidades son muy buenas de que si tu código sigue lento, habiendo seguido las indicaciones que mencioné arriba, entonces el problema yace en la forma en que estás direccionando tus datos en python. Algunos modismos simplemente van a ser lentos en python sin importar lo que hagas. Afortunadamente, python es un lenguaje muy claro -- si un fragmento del código se ve extraño o difícil de manejar, es probable que su velocidad también se pueda mejorar. Lée `Python Performance Tips`_ para obtener excelentes consejos sobre cómo puede mejorar la velocidad del código. Dicho esto, la optimización prematura es la razí de todos los males; si simplemente no es lo suficientemente rápido no tortures el código intentando hacerlo más rápido. Algunas cosas simplemente no están destinadas a ser. :) ¡Ya está! Ahora sabés prácticamente todo lo que yo sé sobre el uso de pygame. Ahora, ¡ve a escribir ese juego! ---- *David Clark es un ávido usuario de pygame y es editor de Pygame Code Repository, una vidriera del códigos de juegos en python suministrado por la comunidad. Él es también el autor de Twitch, un juego de arcade completamente promedio de pygame.* .. _Pygame: https://www.pygame.org/ .. _SDL: http://libsdl.org .. _Python 2.0 Quick Reference: http://www.brunningonline.net/simon/python/quick-ref2_0.html .. _SolarWolf: https://www.pygame.org/shredwheat/solarwolf/index.shtml .. _Python Performance Tips: http://www-rohan.sdsu.edu/~gawron/compling/course_core/python_intro/intro_lecture_files/fastpython.html ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/IniciarImportar.rst.txt0000644000175100001770000000664414676242340026242 0ustar00runnerdocker.. TUTORIAL:Import and Initialize .. include:: ../../reST/common.txt *********************************************** Tutoriales de Pygame - Importar e Inicializar *********************************************** Importar e Inicializar ====================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Importar e inicializar pygame es un proceso muy simple. También es lo suficientemente flexible para que el usuario tenga el control sobre lo que está sucediendo. Pygame es una colección de diferentes módulos en un mismo paquete de python. Algunos de los módulos están escritos en C, y algunos otros están escritos en python. Algunos módulos también son opcionales y es posible que no estén presentes. Esto es solo una breve introducción sobre lo que sucede cuando se importa pygame. Para una explicación más clara, definitivamente recomiendo que vean los ejemplos de pygame. Importar -------- Primero debemos importar el paquete de pygame. Desde la versión 1.4 de pygame este ha sido actualizado para ser mucho más fácil. La mayoría de los juegos importarán todo pygame de esta manera.:: import pygame from pygame.locals import * La primera línea aquí es la única necesaria. Esta línea importa todos los módulos de pygame disponibles en el paquete de pygame. La segunda línea es opcional y plantea un conjunto de funciones limitadas en el 'espacio global de nombres' (global namespace) de la secuencia de comandos. Una cosa importante a tener en cuenta es que muchos de los módulos de pygame son opcionales. Por ejemplo, uno de estos es el módulo de fuentes. Cuando se importa pygame (import pygame), pygame comprobará si el módulo de fuentes está disponible. Si el módulo de fuentes está disponible se importará como "pygame.font". Si el módulo no está disponible, "pygame.font" se establecera como 'None' (ninguno). Esto hace que sea bastante fácil probar más adelante si el módulo de fuentes está disponible. Inicializar ----------- Antes de que pueda hacerse mucho con pygame, será necesario inicializarlo. La manera más común es hacerlo mediante una 'llamada' (call).:: pygame.init() Esto intentará inicializar todos los módulos de pygame automáticamente. No todos los módulos necesitan ser inicializados, pero esto inicializará automaticamente los que sí son necesarios. Se puede también inicializar fácilmente cada módulo de pygame de forma manual. Por ejemplo para inicializar únicamente el módulo de fuentes simplemente habría que hacer el siguiente 'llamado'. :: pygame.font.init() Tengan en cuenta que si hay un error cuando se inicialzia con "pygame.init()", fallará silenciosamente. Al inicializar manualmente módulos como éste, cualquier error generará una excepción. Cualquier módulo que deba ser inicializado también tiene una función "get_init()", que devolverá Verdadero (true) si el módulo ha sido inicializado. Es seguro llamar a la función init() para cualquier módulo más de una vez. Cerrar (Quit) ------------- Los módulos que son inicializados por lo general tienen una función quit() (abandonar) que dejará la configuración de los recursos como se encontraba antes. Las variables utilizadas son destruidas. No hay necesidad de hacer un llamado explicitamente, ya que *pygame* cerrará limpiamente todos los módulos inicializados, una vez que python finaliza. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/ModosVisualizacion.rst.txt0000644000175100001770000002321014676242340026754 0ustar00runnerdocker.. TUTORIAL: Choosing and Configuring Display Modes .. include:: ../../reST/common.txt ******************************************************************** Tutoriales de Pygame - Configuración de los Modos de Visualización ******************************************************************** Configuración de los Modos de Visualización =========================================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Introducción ------------ Configurar el modo de visualización en *pygame* crea una imagen de *Surface* visible en el monitor. Esta *Surface* puede o cubrir la pantalla completa, o si se está usando una plataforma que soporta la gestión de ventanas, la imagen puede usarse en ventana. La *Surface* de visualización no es más que un objeto de *Surface* estándar de *pygame*. Hay funciones especiales necesarias en el módulo :mod:`pygame.display` para mantener los contenidos de la imagen de *Surface* actualizada en el monitor. Configurar el modo de visualización en *pygame* es una tarea más fácil que con la mayoría de las bibliotecas gráficas. La ventaja es que si el modo de visualización no está disponible, *pygame* va a emular el modo de visualización que fue pedido. *Pygame* seleccionará la resolución de la visualización y la profundidad del color de la visualización que mejor coincida con la configuración solicitada, luego permitirá tener acceso al formato de visualización requerido. En realidad, ya que el módulo :mod:`pygame.display` está enlazado con la librería SDL, es SDL quién realmente hace todo este trabajo. Esta forma de configurar el modo de visualización presenta ventajas y desventajas. La ventaja es que si tu juego requiere un modo de visualización específico, el juego va a poder ejecutarse aún en plataformas que no soporten los requerimientos. Esto también va a simplificarles la vida cuando estén comenzando con algo, ya que siempre es fácil volver luego y hacer la selección de modo un poco más específicos. La desventaja es que lo que soliciten no es siempre lo que van a obtener. Hay un castigo o multa en el rendimineto cuando el modo de visualización debe ser emulado. Este tutorial les ayudará a entender los métodos diferentes para consultar (querying) las capacidades de visualización de las plataformas, y configurar el modo de visualización para tu juego. Configuración básica -------------------- Lo primero a aprender es cómo configurar realmente el modo de visualización actual. El modo de visualización se puede establecer en cualquier momento luego de haber inicializado el módulo :mod:`pygame.display` Si ya estableciste previamente el modo de visualización, configurarlo nuevamente va a cambiar el actual modo. La configuración del modo de visualización se maneja con la función :func: `pygame.display.set_mode((width, height), flags, depth) `. El único argumento requerido en esta función es la secuencia que contiene el ancho (width) y el alto (height) del nuevo modo de visualización. La bandera de profundidad (depth flag) es los bits por píxel solicitados para la *Surface*. Si la profundidad dada es 8, *pygame* va a crear la asignación de colores de la *Surface*. En el caso que se le otorgue una mayor profundida de bits, *pygame* usará el modo de color empaquetado. Podrán encontrar mucha más información acerca de profundidades y modo de color en la documentación sobre los módulos de visualización y *Surface*. El valor por default para la profundidad es 0. Cuando a un argumento se le asigna 0, *pygame* va a seleccionar el mejor bit de profunidad para usar, generalmente es el mismo bit de profundidad que el sistema actual. El argumento de banderas permite controlar características extras para el modo de visualización. Nuevamente, en caso de querer más información acerca del tema, se puede encontrar en los documentos de referencia de *pygame*. Cómo decidir ------------ Entonces, ¿cómo seleccionar el modo de visualización que va a funcionar mejor con los recursos gráficos y en la plataforma en la que está corriendo el juego? Hay varios métodos diferentes para reunir la información sobre la visualización del dispositivo. Todos estos métodos deben ser 'llamados' (called) luego de que se haya inicializado el módulo de visualización, pero es probable que quieran llamarlos antes de configurar el modo de visualización. Primero, :func:`pygame.display.Info() ` va a devolver un tipo de objeto VidInfo especial, que les dirá mucho acerca de las capacidades del controlador gráfico. La función :func:`pygame.display.list_modes(depth, flags) ` puede ser usada para encontrar los modos gráficos respaldados por el sistema. :func: `pygame.display.mode_ok((width, height), flags, depth) ` toma el mismo argumento que :func:`set_mode() `, pero devuelve la coincidencia más próxima al bit de profundidad solicitado. Por último, :func:`pygame.display.get_driver() ` devuelve el nombre del controlador gráfico seleccionado por *pygame* Solo hay que recordar la regla de oro: *Pygame* va a trabajar con practicamente cualquier modo de visualización solicitado. A algunos modos de visualización va a ser necesario emularlos, lo cual va lentificar el juego, ya que *pygame* va a necesitar convertir cada actualziación que se haga, al modo de visualización "real". La mejor apuesta es siempre dejar que *pygame* elija la mejor profundidad de bit, y que convierta todos los recursos gráficos a ese formato cuando se carguen. Al 'llamar' (call) a la función :func:`set_mode() ` sin ningún argumento o con profundidad 0 dejamos que *pygame* elija por sí mismo la profundidad de bit. O sino se puede llamar a :func:`mode_ok() ` para encontrar la coincidencia más cercana a la profundidad de bit necesaria. Cuando el modo de visualización es en una ventana, lo que generalmente se debe hacer es hacer coincidir el bit de profundidad con el del escritorio. Cuando se está usando pantalla completa, algunas plataformas pueden cambiar a cualquier bit de profundidad que mejor se adecue a las necesidades del usuario. Pueden encontrar la profundidad del escritorio actual si obtienen un *objeto VidInfo* antes de configurar el modo de visualización. Luego de establecer el modo de visualización, pueden descubrir información acerca de su configuración al obtener el objeto VidInfo, o al llamar cualquiera de los métodos Surface.get* en la superficie de visualización. Funciones --------- Estas son las rutinas que se pueden usar para determinar el modo de visualización más apropiado. Pueden encontrar más información acerca de estas funciones en la documentación del modo de visualización. :func:`pygame.display.mode_ok(size, flags, depth) ` Esta función toma exactamente el mismo argumento que pygame.display.set_mode(). Y devuelve el mejor bit de profundidad disponible para el modo que hayan descripto. Si lo que devuelve es cero, entonces el modo de visualización deseado no está disponible sin emulación. :func:`pygame.display.list_modes(depth, flags) ` Deveuelve una lista de modos de visualización respaldados con la profundidad y banderas solicitadas. Cuando no hay modos van a obtener como devolución una lista vacía. El argumento de las banderas por defecto es :any:`FULLSCREEN `\ . Si especifican sus propias banderas sin :any:`FULLSCREEN `\ , probablemente obtengan una devolución con valor -1. Esto significa que cualquier tamaño de visualización está bien, ya que la visualización va a ser en ventana. Tengan en cuenta que los modos listados están ordenados de mayor a menor. :func:`pygame.display.Info() ` Esta función devuelve un objeto con muchos miembros que describen el dispositivo de visualización. Mostrar (printing) el objeto VidInfo mostrará rápidamente todos los miembros y valores para ese objeto. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) Pueden probar todas estas banderas (flags) simplemente como miembros del objeto VidInfo. Ejemplos -------- Acá hay algunos ejemplos de diferentes métodos para iniciar la visualización gráfica. Estos deberían ayudar a dar una idea de cómo configurar su modo de visualizción :: >>> #dame la mejor profundidad con una visualización de ventana en 640 x 480 >>> pygame.display.set_mode((640, 480)) >>> #dame la mayor visualización disponible en 16-bit >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit no está soportado') ... else: ... print('Resolución encontrada:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> #es necesario una surface de 8-bit, nada más va a funcionar >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Solo puede funcionar con una visualización de 8-bit, lo lamento') ... else: ... pygame.display.set_mode((800, 600), 0, 8) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/MoverImagen.rst.txt0000644000175100001770000005307714676242340025361 0ustar00runnerdocker.. TUTORIAL:¡Ayuda! ¿Cómo Muevo Una Imagen? .. include:: ../../reST/common.txt ********************************************************* Tutoriales de Pygame - ¡Ayuda! ¿Cómo Muevo Una Imagen? ********************************************************* ¡Ayuda! ¿Cómo Muevo Una Imagen? =============================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Muchas personas nueva en programación y gráficos tienen dificultades para descubrir cómo hacer que una imagen se mueva por la pantalla. Sin entender todos los conceptos puede resultar muy confuso. No sos la primera persona atrapada ahí, haré todo lo posible para que vayamos paso por paso. Incluso, intentaremos terminar con métodos para mantener la eficiencia de tus animaciones. Tengan en cuenta que en este articulo no vamos a enseñar cómo programar en python, solo presentaremos algunos conceptos básicos de pygame. Solo Píxeles en la Pantalla --------------------------- Pygame tiene una Surface de visualización. Básicamente, esto es una imagen que está visible en la pantalla y la imagen está compuesta por píxeles. La forma principal de cambiar estos píxeles es llamando a la función blit(). Esto copia los píxeles de una imagen a otra. Esto es lo primero que hay que entender. Cuando proyectás (blit) una imagen en la pantalla, lo que estás haciendo es simplemente cambiar el color de los píxeles. Los píxeles no se agregan ni se mueven, simplemente cambiamos el color de los píxeles que ya se encuentran en la pantalla. Las imágenes que uno proyecta (blit) a la pantalla son también surfaces (superficies) en pygame pero no están conectadas de ninguna manera a la Surface de visualización. Cuando se proyectan en la pantalla, se copian en la visualización, pero aún mantenes una copia única del original. Luego de esta breve descripción, quizás ya puedas entender lo que se necesita para "mover" una imagen. En realidad, no movemos nada en absoluto. Lo que hacemos es simplemente proyectar (blit) la imagen en una nueva posición, pero antes de dibujar la imagen en la nueva posición, necesitamos "borrar" la anterior. De lo contrario, la imagen será visible en dos lugares de la pantalla. Al borrar rápidamente la imagen y volverla a dibujar en un nuevo lugar en la pantalla, logramos la "ilusión" de movimiento. A lo largo del tutorial, vamos a dividir este proceso en pasos más simples. Incluso explicaremos la mejor manera de tener múltiples imagenes moviendose por la pantalla. Probablemente ya tengas preguntas; por ejemplo, ¿cómo "borramos" la imagen antes de dibujarla en una nueva posición? Quizás todavía estás completamente perdido. Bueno, espero que el resto de este tutorial pueda aclarar las cosas. Damos Un Paso Hacia Atrás ------------------------- Es posible que el concepto de píxeles e imagenes sea aún un poco extraño. ¡Buenas noticias! En las próximas secciones vamos a usar código que hace todo lo que queremos, solo que no usa píxeles. Vamos a crear una pequeña lista de python de 6 números, y vamos a imaginar que representa unos gráficos fantásticos que podemos ver en la pantalla. Podría ser de hecho sorprendente lo cerca que esto representa lo que haremos después con gráficos reales. Entonces, comencemos creando nuestra lista de pantalla y completandola con un paisaje hermoso de 1s y 2s. :: >>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1] Ahora hemos creado nuestro fondo. No va a ser muy emocionante a menos que también dibujemos un jugador en la pantalla. Vamos a crear un héroe poderoso que se parezca al número 8. Vamos a ponerlo cerca de la mitad del mapa y veamos cómo se ve. :: >>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Puede que esto haya sido tan lejos como hayas llegado si saltaste a hacer algo de programación gráfica con pygame. Tenés algunas cosas bonitas en la pantalla, pero no pueden moverse a ningun lado. Quizás ahora que nuestra pantalla es una lista de números, es más fácil ver cómo moverlo. Hacer Mover al Héroe -------------------- Antes de empezar a mover el personaje, necesitamos hacer el seguimiento de algún tipo de posición para él. En la última sección, cuando lo dibujamos, simplemente elegimos una posición al arbitraria. Esta vez hagámoslo de forma más oficial. :: >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Ahora es bastante fácil moverlo en una nueva posición. Podemos simplemente cambiar el valor de playerpos (posición del player) y dibujarlo en la pantalla nuevamente. :: >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1] Whoops. Ahora podemos ver dos héroes. Uno en la vieja posición, y otro en la nueva posición. Esta es exactamente la razón por la que necesitamos "borrar" al héroe en la posición anterior antes de dibujarlo en la nueva posición. Para borrarlo, necesitamos cambiar ese valor en la lista de nuevo al valor que tenía antes de que el héroe lo reemplazara. Eso significa que debemos hacer un seguimiento de los valores en la pantalla antes que el héroe estuviera allí. Hay varias formas de hacerlo, pero la más fácil suele ser mantener una copia separada del fondo de la pantalla. Esto significa que tenemos que hacer cambios en nuestro pequeño juego. Crear un Mapa ------------- Lo que queremos hacer es crear una lista separada que llamaremos nuestro fondo (background). Vamos a crear el fondo para que se vea como lo hacía nuestra pantalla original, con 1s y 2s. Luego, vamos a copiar cada item del fondo a la pantalla. Después de eso, podemos finalmente dibujar nuestro héroe en la pantalla. :: >>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #una nueva pantalla en blanco >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Puede parecer mucho trabajo extra. No estamos muy lejos de donde estabamos la última vez que tratamos de hacer que se moviera. Pero esta vez tenemos la información extra que necesitamos para moverlo correctamente. Hacer Mover al Héroe (Toma 2) ----------------------------- Esta vez va a ser fácil mover al héroe. Primero borramos el héroe de su antigua posición. Esto lo podemos hacer copiando el valor correcto del fondo a la pantalla. Luego, dibujamos el personaje en la nueva posición en la pantalla. >>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1] Ahí está. El héroe se ha movido un lugar hacia la izquierda. Podemos usar este mismo código para moverlo una vez más hacia la izqueirda. :: >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1] Excelente! Esto no es exactamente lo que llamarías una animación fluida, pero con unos pequeños cambios, haremos que esto funcione directamente con gráficos en la pantalla. Definición: "blit" ------------------ En las próximas secciónes transformaremos nuestro programa, de usar listas pasará a usar gráficos reales en la pantalla. Al mostrar los gráficos vamos a usar el término **blit** frecuentemente. Si sos nuevo en el trabajo gráfico, probablemente no estés familiarizado con este término común. BLIT: Basicamente, blit significa copiar gráficos de una imagen a otra. Una definición más formal es copiar una matriz de datos a un mapa de bits. 'Blit' se puede pensar como *asignar* píxeles. Es similar a establecer valores en nuestra lista de pantalla más arriba, blitear asigna el color de los píxeles en nuestra imagen. Otras bibliotecas gráficas usarán la palabra *bitblt*, o solo *blt*, pero están hablando de lo mismo. Es básicamente copiar memoria de un lugar a otro. En realidad, es un poco más avanzado que simpleente copiar la memoria, ya que necesita manejar cosas como formatos de píxeles, recortes y separaciones de líneas de exploración. Los mezcladores (blitters) avanzados también pueden manejar cosas como la transparecia y otros efectos especiales. Pasar de la Lista a la Pantalla ------------------------------- Tomar el código que vemos en los ejemplos anteriores y hacerlo funcionar con pygame es muy sencillo. Simulemos que tenemos cargados algunos gráficos bonitos y los llamamos "terrain1", "terrain2" y "hero". Donde antes asignamos números a una lista, ahora mostramos (blit) gráficos en la pantalla. Otro gran cambio, en vez de usar posiciones como un solo índice (0 through 5), ahora necesitamos una coordenada bidimensional. Fingiremos que uno de los gráficos de nuestro juego tiene 10 píxeles de ancho. :: >>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0)) Hmm, ese código debería parecerte muy familiar, y con suerte, más importante; el código anterior debería tener un poco de sentido. Con suerte, mi ilustración de configurar valores simples en una lista muestra la similitud de establecer píxeles en la pantalla (con blit). La única parte que es realmente trabajo extra es convertir la posición del jugador en coordenadas en la pantalla. Por ahora, solo usamos un :code:`(playerpos*10, 0)` crudo, pero ciertamente podemos hacer algo mejor que eso. Ahora, movamos la imagen del jugador sobre un espacio. Este código no debería tener sorpresas. :: >>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0)) Ahí está. Con este código, hemos mostrado cómo visualizar un fondo simple con la imagen de un héroe. Luego, hemos movido correctamente a ese héroe un espacio hacia la izquierda. Entonces, ¿dónde vamos desde aquí? Bueno, para empezar, el código es todavía un poco extraño. Lo primero que queremos hacer es encontrar una forma más límpia de representar el fondo y la posición del jugador. Luego, quizás una animación un poco más real y fluida. Coordenadas de Pantalla ----------------------- Para posicionar un objeto en la pantalla, necesitamos decirle a la función blit () dónde poner la imagen. En pygame siempre pasamos las posiciones como una coordenada (X,Y). Esto reprenseta el número de píxeles a la derecha y el número de pixeles hacia abajo, para colocar la imagen. La esquina superior izquierda de la Surface es la coordenada (0,0). Moverse un poco hacia la derecha sería (10, 0), y luego moverse hacia abajo en la misma proporción sería (10,10). Al hacer blit, el argumento de posición representa dónde se debe colocar la esquina superior izquierda de la fuente en el destino. Pygame viene con un conveniente container para estas coordenadas, este es un Rect. El Rect básicamente representa un área rectangular en estas coordenadas. Tiene una esquina superior izquierda y un tamaño. El Rect viene con muchos métodos convenientes que ayudan a moverlo y posicionarlo. En nuestros próximos ejemplos representaremos las posiciones de nuestros objetos con Rects. También, hay que tener en cuenta que muchas funciones en pygame esperan argumentos Rect. Todas estas funciones pueden también aceptar una simple tupla de 4 elementos (izquierda, arriba, ancho, alto). No siempre es necesario usar estos objetos Rect, pero mayormente querrás hacerlo. Además la función blit () puede aceptar un Rect como su argumento de posición, simplemente usa la esquina superior izquierda del Rect como su posición real. Cambiando el Fondo ------------------ En todas nuestras secciones anteriores, hemos estado almacenando el fondo como una lista de diferentes tipos de terrenos. Esa es una buena forma de crear un juego basado en mosaicos, pero queremos un desplazamiento fluido. Para hacerlo un poco más fácil, vamos a cambiar el fondo a una imagen única que cubra toda la pantalla. De esta forma, cuando queremos "borrar" nuestros objetos (antes de volver a dibujarlos) solo necesitamos blitear la sección del fondo borrado en la pantalla. Al pasar a blit un tercer argumento Rect de manera opcional, le decimos que use esa subsección de la imagen de origen. Lo verás en uso a continuación mientras borramos la imagen del jugador. Nótese que ahora, cuando terminamos de dibujar en la pantalla, llamamos pygame.display.update() que mostrará todo lo que hemos dibujado en la pantalla. Movimiento Fluido ----------------- Para hacer que algo parezca moverse suavemente, vamos a querer moverlo únicamente un par de píxeles a la vez. Acá está el código para hacer que un objeto se mueva suavemente a través de la pantalla. Según lo que ya sabemos, esto debería parecer bastante simple. :: >>> screen = create_screen() >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #dibujar el fondo >>> position = player.get_rect() >>> screen.blit(player, position) #dibujar el jugador >>> pygame.display.update() #y mostrarlo todo >>> for x in range(100): #animar 100 cuadros ... screen.blit(background, position, position) #borrar ... position = position.move(2, 0) #mover el jugador ... screen.blit(player, position) #dibujar nuevo jugador ... pygame.display.update() #y mostrarlo todo ... pygame.time.delay(100) #detener el programa por 1/10 segundos Ahí está. Este es todo el código que es necesario para animar suavemente un objeto a través de la pantalla. Incluso podemos usar un bonito paisaje de fondo. Otro beneficio de hacer el fondo de esta manera es que la imagen para el jugador puede tener transaprencias o secciones recortadas y aún así se dibujará de correctamente sobre el fondo (un bonus gratis). También hicimos una llamada a pygame.time.delay() al final de nuestro bucle (loop) anterior. Esto ralentiza un poco nuestro programa; de lo contrario, podría ejecutarse tan rápido que sería posible no verlo. Entonces, ¿Qué Sigue? --------------------- Bueno, aquí lo tenemos. Esperemos que este artículo haya cumplido con lo prometido. Aún así, en este punto, el código no está realmente listo para ser el próximo juego más vendido. ¿Cómo hacer para tener múltiples objetos moviendose fácilmente? ¿Qué son exactamente esas misteriosas funciones como load_player_image()? También necesitamos una forma de obtener una entrada simple de usuario y un bucle de más de 100 cuadros. Tomaremos el ejemplo que tenemos acá, y lo convertiremos en una creación orientada a objetos que podría enorgullecería a mamá. Primero, Funciones Misteriosas ------------------------------ Se puede encontrar información completa de este tipo de funciones en otros tutoriales y referencia. El módulo pygame.image tiene una función load() que hará lo que queramos. Las líneas para cargar las imágenes deberían llegar a ser así. :: >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert() Podemos ver que es bastante simple, la función load() solo toma un nombre de archivo y devuelve una nueva Surface con la imagen cargada. Después de cargar, hacemos una llamada al método de Surface, conver(). 'Convert' nos devuelve una nueva Surface de la imagen, pero ahora convertida al mismo formato de píxel que nuestra pantalla. Dado que las imagenes serán del mismo formato que la pantalla, van a blittear muy rápidamente. Si no usaramos 'convert', la función blit() es más lenta, ya que tiene que convertir de un tipo de píxel a otro a medida que avanza. Es posible que hayas notado que ambas load() y convert() devuelven una nueva Surface. Esto significa que estamos realmente creando dos Surfaces en cada una de estas líneas. En otros lenguajes de programación, esto da como resultado una fuga de memoria (no es algo bueno). Afortunadamente, Python es lo suficientemente inteligente como manejar esto, y pygame limpiará adecuadamente la Surface que terminamos sin usar. La otra función misteriosa que vimos en el ejemplo anterior fue create_screen(). En pygame es simple de crear una nueva ventana para gráficos. El código para crear una surface de 640x480 está a continuación. Al no pasar otros argumentos, pygame solo eligirá la mejor profundidad de color y formato de píxel para nosotros. :: >>> screen = pygame.display.set_mode((640, 480)) Manejo de Algunas Entradas -------------------------- Necesitamos desesperadamente cambiar el bucle principal para que buscar cualquier entrada de usuario (como cuando el usuario cierra la ventana). Necesitamos agregar "manejo de eventos" a nuestro programa. Todos los programas gráficos usan este diseño basado en eventos. El programa obtiene eventos como "tecla presionada" o "mouse movido" de la computadora. Entonces el programa responde a los diferentes eventos. Así es como debería ser el código. En lugar de un bucle de 100 cuadros, seguiremos en el bucle hasta que el usuario nos pida que nos detengamos.:: >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... move_and_draw_all_game_objects() Lo que simplemente hace este código es, en primer lugar ejecuta el bucle para siempre, luego verifica si hay algún evento del usuario. Salimos del programa si el usuario presiona el teclado o el botón de cerrar en la ventana. Después de revisar todos los eventos, movemos y dibujamos nuestros objetos del juego. (También los borraremos antes de moverlos.) Mover Imágenes Múltiples ------------------------ Esta es la parte en que realmente vamos a cambiar las cosas. Digamos que queremos 10 imágenes diferentes moviéndose en la pantalla. Una buena forma de manejar esto es usando las CLASES de python. Crearemos una CLASE que represente nuestro objeto de juego. Este objeto tendrá una función para moverse solo y luego podemos crear tantos como queramos. Las funciones para dibujar y mover el objeto necesitan funcionar de una manera en que muevan solo un cuadro (o un paso) a la vez. Acá está el código de python para crear nuestra clase. :: >>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(0, self.speed) ... if self.pos.right > 600: ... self.pos.left = 0 Entonces, tenemos dos funciones en nuestra clase. La función init (inicializar) construye nuestro objeto, posiciona el objeto y establece su velocidad. El método move (mover) mueve el objeto un paso. Si se va demasiado lejos, mueve el objeto de nuevo hacia la izquierda. Ensamblando Todo ---------------- Ahora con nuestra nueva clase objeto, podemos montar el juego completo. Así es como se verá la función principal para nuestro programa. :: >>> screen = pygame.display.set_mode((640, 480)) >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #crear 10 objetos ... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type in (QUIT, KEYDOWN): ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... pygame.time.delay(100) Y ahí está. Este es el código que necesitamos para animar 10 objetos en la pantalla. El único punto que podría necesitar explicación son los dos bucles (loops) que usamos para borrar todos los objetos y dibujar todos los objetos. Para hacer las cosas correctamente, necestamos borrar todos los objetos antes de dibujar alguno de ellos. En nuestro ejemplo puede que no importe pero cuando los objetos se superponen, el uso de dos bucles (loops) como estos se vuelve muy importante. De Ahora En Más, Estás Por Tu Cuenta ------------------------------------ Entonces, ¿qué será lo siguiente en tu camino de aprendizaje? Bueno, primero jugar un poco con este ejemplo. La versión ejecutable completa de este ejemplo está disponible en los directorios de ejemplos de pygame. Está en el ejemplo llamado :func:`moveit.py ` . Dale una mirada al código y jugá con él, correlo, aprendelo. Algunas cosas en las que quizás quieras trabajar es en tener más de un tipo de objeto. Encontrar una manera de "eliminar" objetos limpiamente cuando ya no quieras mostrarlos. También, actualizar el llamado (call) display.update() para pasar una lista de las áreas en pantalla que han cambiado. En pygame hay otros tutoriales y ejemplos que cubren estos temas. Así que cuando estés listo para seguir aprendiendo, seguí leyendo. :-) Por último, podés unirte a la lista de correos de pygame o al chatroom con total libertad para consultar dudas al respecto. Siempre hay personas disponibles que están dispuestas a ayudar con estos temas. Finalmente, divertite, para eso son los juegos! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/SpriteIntro.rst.txt0000644000175100001770000005752014676242340025427 0ustar00runnerdocker.. TUTORIAL: Sprite Module Introduction .. include:: ../../reST/common.txt ******************************************************** Tutoriales de Pygame - Introducción al Módulo de Sprites ******************************************************** Introducción al Módulo de Sprites ================================= .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Comentario: una forma simple de entender los Sprites, es pensarlos como elementos visuales utilizados para representar objetos y personajes en juegos, y se pueden crear y manipular utilizando la biblioteca de Pygame. Si bien se podría traducir el término "sprite" por "imagen en movimiento" o "personaje animado", en el contexto de programación se ha adoptado ampliamente y es comúnmente utilizado en español, sin traducción. La versión de pygame 1.3 viene con un nuevo módulo, ``pygame.sprite``. Este módulo está escrito en Python e incluye algunas clases de nivel superior para administrar los objetos del juego. Al usar este módulo en todo su potencial, se puede fácilmente administrar y dibujar los objetos del juego. Las clases de sprites están muy optimizadas, por lo que es probable que tu juego funcione más rápido con el módulo de sprites que sin él. El módulo de sprites también pretende ser genérico, resulta que lo podés usar con casi cualquier tipo de juego. Toda esta flexibilidad viene con una pequeña penalización, es necesario entenderlo para usarlo correctamente. El :mod:`reference documentation ` para el módulo de sprites puede mantenerte andando, pero probablemente necesites un poco más de explicaicón sobre cómo usar ``pygame.sprite`` en tu propio juego. Varios de los ejemplos de pygame (como "chimp" y "aliens") han sido actualizados para usar el módulo de sprites. Es posible que quieras verificarlos para ver de qué se trata este módulo de sprites. El módulo de chimp incluso tiene su propio tutorial línea por línea, que puede ayudar a comprender mejor la programación con python y pygame. Tengan en cuenta que esta introducción asumirá que tienen un poco de experiencia programando con python y que están familiarizados con diferentes partes de la creación de un simple juego. En este tutorial la palabra "referencia" es usada ocasionalmente. Esta representa una variable de python. Las variables en python son referencias, por lo que pueden haber varias variables apuntando al mismo objeto. Lección de Historia ------------------- El término "sprite" es un vestigio de las computadoras y máquinas de juego más antiguas. Estas cajas antiguas no eran capaces de dibujar y borrar gráficos normales lo suficientemente rápido como para que funcionara como juego. Estas máquinas tenían un hardware especial para manejar juegos como objetos que necesitaban animarse rápidamente. Estos objetos eran llamados "sprites" y tenían limitaciones especiales, pero podían dibujarse y actualizarse muy rápido. Por lo general, existían en buffers especiales superpuestos en el video. Hoy en día las computadores se han vuelto lo suficientemente rápidas para manejar objetos similares a sprites sin un hardware dedicado. El término sprite es todavía usado para representar casi cualquier cosa en un juego 2D animado. Las Clases ---------- El módulo de sprites viene con dos clases principales. La primera es :class:`Sprite `, que debe usarse como clse base para todos los objetos de tu juego. Esta clase realmente no hace nada por sí sola, sólo incluye varias funciones para ayudar a administrar el objeto del juego. El otro tipo de clase es :class:`Group `. La clase ``Group`` es un contenedor para diferentes objetos ``Sprite``. De hecho, hay varios tipos diferentes de clases de Group. Algunos de los ``Groups`` pueden dibujar todos los elementos que contienen, por ejemplo. Esto es todo lo que hay, realmente. Comenzaremos con una descriçión de lo que hace cada tipo de clase y luego discutiremos las formas adecuadas de usar las dos clases. La Clase Sprite --------------- Como se mencionó anteriormente, la clase Sprite está diseñada para ser una clase base para todos los objetos del juego. Realmente no podés usarla por sí sola, ya que sólo tiene varios métodos para ayudarlo a trabajar con diferentes clases ``Grupo``. El sprite realiza un seguimiento de a qué grupo pertenece. El constructor de clases (método ``__init__``) toma un argumento de un ``Grupo`` (o listas de ``Grupos``) al que debería pertencer la instancia ``Sprite``. También se puede cambiar la pertenencia del ``Sprite`` con los métodos :meth:`add() ` y :meth:`remove() `. Hay también un método :meth:`groups() `, que devuelve una lista de los grupos actuales que contiene el sprite. Cuando se usen las clases de Sprite, es mejor pensarlas como "válidas" o "vivas", cuando pertenecen a uno o más ``Grupos``. Cuando se eliminen las instancias de todos los grupos, pygame limpiará el objeto. (A menos que tengas tus propias referencias a la instancia en otro lugar.) El método :meth:`kill() ` elimina los sprites de todos los grupos a los que pertenece. Esto eliminará limpiamente el objeto sprite. Si ya has armado algún juego, sabés que a veces eliminar limpiamente un objeto del juego puede ser complicado. El sprite también viene con un método :meth:`alive() ` que devuelve "true" (verdadero) si todavía es miembro de algún grupo. La Clase Grupo -------------- La clase ``Group`` es solo un simple contenedor. Similar a un sprite, tiene un método :meth:`add() ` y otro método :meth:`remove()` que puede cambiar qué sprites pertenecen a el grupo. También podés pasar un sprite o una lista de sprites al constructor (``__init__()`` method) para crear una instancia ``Group`` que contiene algunos sprites iniciales. El ``Group`` tiene algunos otros métodos como :meth:`empty()` para eliminar todos los sprites de el grupo y :meth:`copy() ` que devolverá una copia del grupo con todos los mismos miembros. Además, el método :meth:`has() ` verificará rápidamente si el ``Group`` contiene un sprite o lista de sprites. La otra función que usarás frecuentemente es el método :meth:`sprites()`. Esto devuelve un objeto que se puede enlazar para acceder a todos los sprites que contiene el grupo. Actualmente, esta es solo una lista de sprites, pero en una versión posterior de python es probable que use iteradores para un mejor rendimiento. Como atajo, el ``Group`` también tiene un método :meth:`update()`, que llamará a un método ``update()`` para cada sprite en el grupo, pasando los argumentos a cada uno. Generalmente, en un juego se necesita alguna función que actualice el estado de los objetos del juego. Es muy fácil llamar a tu propio método usando el método ``Group.sprites()``, pero este es un atajo que se usa lo suficiente como para ser incluido. También, tengan en cuenta que la clase base ``Sprite`` tiene un método ficticio, tipo "dummy", ``update()`` que toma cualquier tipo de argumento y no hace nada. Por último, el Group tiene un par de otros métodos que permiten usarlo como funición interna ``len()``, obteniendo el número de sprites que contiene, y el operador "truth" (verdad), que te permite hacer "if mygroup:" para verificar si el grupo tiene sprites. Mezclándolos Juntos ------------------- A esta altura, las dos clases parecen bastante básicas. No hacen mucho más de lo que podés hacer con una simple lista y tu propia clase de objetos de juego. Pero hay algunas ventajas grandes al usar ``Sprite`` y ``Group`` juntos. Un sprite puede pertenecer a tantos grupos como quieras, recordá que tan pronto como pertenezca a ningún grupo, generalmente se borrará (a menos que tengas otra referencia "no-grupales" para ese objeto) Lo primero es una forma rápida y sencilla de categorizar sprites. Por ejemplo, digamos que tenemos un juego tipo Pacman. Podríamos hacer grupos separados por diferentes tipos de objetos en el juego. Fantasmas, Pac y Pellets (pastilla de poder). Cuando Pac come una pastilla de poder, podemos cambiar el estado de todos los objetos fantasma afectando a todo el grupo Fantasma. Esta manera es más rápida y sencilla que recorrer en loop la lista de todos los objetos del juego y comrpobar cuáles son fantasmas. Agregar y eliminar grupos y sprites entre sí es una operación muy rápida, más rápida que usar listas para almacenar todo. Por lo tanto, podés cambiar de manera muy eficiente la pertenencia de los grupos. Los grupos se pueden usar para funcionar como atributos simples para cada objeto del juego. En lugar de rastrear algún atributo como "close_to_player" para un montón de objetos enemigos, podrías agregarlos a un grupo separado. Luego, cuando necesites acceder a todos los enemigos que están cerca del jugador, ya tenés una lista de ellos, en vez de examinar una lista de todos los enemigos, buscando el indicador "close_to_player". Más adelante, tu juego podría agregar múltiples jugadores, y en lugar de agregar más atributos "close_to_player2", "close_to_player3", podés fácilmente agregarlos a diferentes grupos o a cada jugador. Otro beneficio importante de usar ``Sprites`` y ``Groups`` es que los grupos manejan limpiamente el borrado (o eliminación) de los objetos del juego. En un juego en el que muchos objetos hacen referencia a otros objetos, a veces eliminar un objeto puede ser la parte más difícil, ya que no puede desaparecer hasta que nadie haga referencia a él. Digamos que tenemos un objeto que está "persiguiendo" a otro objeto. El perseguidor puede mantener un Group simple que hace referencia al objeto (u objetos) que está persiguiendo. Si el objeto perseguido es destruido, no necesitamos preocuparnos por notificar al perseguidor que deje de perseguir. El perseguidor puede verlo por sí mismo que su grupo está ahora vacío y quizás encuentre un nuevo objetivo. Una vez más, lo que hay que recordar es que agregar y eliminar sprites de grupos es una operación muy barata/rápida. Puede que te vaya mejor agregando muchos grupos para contener y organizar los objetos de tu juego. Algunos podrían incluso estar vacíos durante gran parte del juego, no hay penalizaciones por administrar tu juego de esta manera. Los Muchos Tipos de Grupos -------------------------- Los ejemplos anteriores y las razones para usar ``Sprites`` y ``Groups`` son solo la punta del iceberg. Otra ventaja es que el módulo viene con varios tipos diferentes de ``Groups``. Todos estos grupos funcionan como un ``Group`` normal y corrientes, pero también tienen funcionalidades añadidas (o ligeramente diferentes). Acá hay una lista de las clases ``Group`` incluidas con el módulo de sprites. :class:`Group ` Este es el grupo estándar, "sin lujos", explicado principalmente anteriormente. La mayoría de los otros ``Groups`` se derivan de este, pero no todos. :class:`GroupSingle ` Esto funciona exactamente como la clase regular ``Group``, pero solo contiene el sprite agregado más recientemente. Por lo tanto, cuando agregues un sprite a este grupo, se "olvida" de los sprites que tenía anteriormente. Por lo tanto, siempre contiene solo uno o cero sprites. :class:`RenderPlain ` Este es un grupo estándar derivado de ``Group``. Tiene un método draw() que dibuja en la pantalla (o en cualquier ``Surface``) todos los sprites que contiene. Para que esto funcione, requiere que todos los sprites contenidos tengan los atributos "imagen" y "rect". Estos son utilizados para saber qué blittear y donde blittear. :class:`RenderClear ` Esto se deriva del grupo ``RenderPlain`` y agrega además un método llamado ``clear()``. Esto borrará las posiciónes previas de todos los sprites dibujados. Utiliza la imagen de fondo para rellenar las áreas donde estaban los sprites. Es lo suficientemente inteligente como para manejar los sprites eliminados y borrarlos adecuadamente de la pantalla cuando se llama al método ``clear()``. :class:`RenderUpdates ` Este es el Cádilac de renderizado de ``Groups``. Es heredado de ``RenderClear``, pero cambia el método ``draw()`` para también devolver una lista de ``Rects`` de pygame, que representan todas las áreas de la pantalla que han sido modificadas. Esa es la lista de los diferentes grupos disponibles. Hablaremos más acerca de estos grupos de rendering en la próxima sección. No hay nada que te impida crear tus propias clases de grupos tampoco. Son solo código de python, asi que podés heredar de uno de estos y agregar/cambiar lo que quieras. En el futuro, espero que podamos agregar un par más de ``Groups`` a la lista. Un ``GroupMulti`` que es como el ``GroupSingle``, pero que puede contener hasta un número determinado de sprites (¿en algún tipo de búfer circular?). También un grupo súper renderizador que puede borrar la posición de los sprites sin necesitar una imagen de fondo para hacerlo (al tomar una copia de la pantalla antes de blittear). Quién sabe realmente, pero en el futuro podemos agregar más clases útiles a esta lista. Nota de traducción: "rendering" se puede entender como el proceso de producir una imagen o animación a partir de datos digitales utilizando software de gráficos. La traducción puede ser "renderizado" o "procesamiento de imágenes". Los Grupos de Renderizado ------------------------- De lo analizado anteriormente, podemos ver que hay tres grupos diferentes de renderizado. Con ``RenderUpdates`` podríamos salirnos con la nuestra, pero agrega una sobrecarga que no es realmente necesaria para algo como un juego de desplazamiento. Así que acá tenemos un par de herramientas, elegí la adecuada para cada trabajo. Para un juego del tipo de desplazamiento, donde el fondo cambia completamente en cada cuadro, obviamente necesitamos no necesitamos preocuparnos por los rectángulos de actualización de python en la llamada ``display.update()``. Definitvamente deberías ir con el grupo ``RenderPlain`` para administrar tu renderizado. Para juegos donde el fondo es más estático, definitivamente no vas a querer que Pygame actualice la pantalla completa (ya que no es necesario). Este tipo de juegos generalmente implica borrar la posición anterior de cada objeto y luego dibujarlo en el lugar nuevo de cada cuadro. De esta manera solo estamos cambiando lo necesario. La mayoría de las veces solo querrás usar la clase ``RenderUpdates`` acá. Dado que también querrás pasar la lista de cambios a la función ``display.update()``. La clase ``RenderUpdates`` también hace un buen trabajo al minimizar las áreas superpuestas en la lista de rectángulos actualizados. Si la posición anterior y la actual de un objeto se superponen, las fusionará en un solo rectángulo. Combinado con el hecho de que maneja los objetos eliminados, esta es una poderosa clase ``Group``. Si has escrito un juego que administra los rectángulos modificados para los objetos en el juego, sabés que ésta es la causa de la gran cantidad de código desordenado en el juego. Especialmente, una vez que empiezas a agregar objetos que puedan ser eliminados en cualquier momento. Todo este trabajo se reduce a los monstruosos métodos ``clear()`` y ``draw()``. Además, con la verificación de superposición, es probable que sea más rápido que cuando lo hacías manualmente. También hay que tener en cuenta que no hay nada que impida mezclar y combinar estos grupos de renderizado en tu juego. Definitivamente deberías usar múltiples grupos de renderizado cuando quieras hacer capas con tus sprites. Además, si la pantalla se divide en varias secciones, ¿quizás cada sección de la pantalla debería usar un grupo de representación adecuado? Detección de Colisiones ----------------------- El módulo de sprites también viene con dos funciones de detección de colisiones muy genéricas. Para juegos más complejos, estos realmente no funcionarán adecuadamente, pero fácilmente se puede obtener el código fuente y modificarlos según sea necesario. Acá hay un resumen de lo que son y lo que hacen. :func:`spritecollide(sprite, group, dokill) -> list ` Esto verifica las colisiones entre un solo sprite y los sprites en un grupo. Requiere un atributo "rect" para todos los sprites usados. Devuelve una lista de todos los sprites que se superponen con el primer sprite. El argumento "dokill" es un argumento booleano. Si es verdadero, la funcion llamará al método ``kill()`` para todos los sprites. Esto significa que la última referencia para cada sprite esté probablemente en la lista devuelta. Una vez que la lista desaparece, también lo hacen los sprites. Un ejemplo rápido del uso de este bucle :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) Esto encuentra todos los sprites en el grupo "bomb" que chocan con el jugador. Debido al argumento "dokill", elimina todas las bombas estrelladas. Por cada bomba que chocó, se reproduce el sonido "boom" y crea un nuevo ``Explosion`` donde estaba la bomba. (Tengan en cuenta que la clase ``Explosion`` acá sabe agregar cada instancia de la clase apropiada, por lo que no necesitamos almacenarla en una variable, esa última línea puede sonar un poco rara para los programadores python.) :func:`groupcollide(group1, group2, dokill1, dokill2) -> dictionary ` Esto es similar a la función ``spritecollide``, pero un poco más compleja. Comprueba las colisiones de todos los sprites de un grupo con los sprites de otro grupo. Hay un argumento ``dokill`` para los sprites en cada lista. Cuando ``dokill1`` es verdadero, los sprites que colisionan en ``group1`` serán ``kill()`` (matados). Cuando ``dokill2`` es verdaero, vamos a tener el mismo resultado para el ``group2``. El diccionario que devuelve funciona así; cada clave (keys) en el diccionario es un sprite de ``group1`` que tuvo una colisión. El valor de esa clave es una lista de los sprites con los que chocó. Quizás otra muestra de código lo explique mejor. :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys() ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 Este código comprueba las colisiones entre las balas de los jugadores y todos los aliens con los que podrían cruzarse. En este caso, solo iteramos las claves (keys) del diccionario, pero podríamos recorrer también los ``values()`` o ``items()`` si quisiéramos hacer algo con los disparos específicos que chocaron con extraterrestres. Si recorrieramos ``values()`` estaríamos iterando listas que contienen sprites. El mismo sprite podría aparecer más de una vez en estas iteraciones diferentes, ya que el mismo 'disparo' pudo haber chocado con múltiples aliens. Estas son las funciones básicas de colisión que vienen con pygame. Debería ser fácil crear uno propio que quizás use algo diferente al atributo "rect". ¿O tal vez intentar ajustar un poco más tu código afectando directamente el objeto de colisión en lugar de construir una lista de colisiones? El código en las funciones de colisión de sprites está muy optimizado, pero podrías acelerarlo ligeramente eliminando algunas funcionalidaded que no necesitas. Problemas Comunes ----------------- Actualmente hay un problema principal que atrapa a los nuevos usuarios. Cuando derivas tus nueva clase de sprites con la base de Sprite, TENÉS que llamar al método ``Sprite._init_()`` desde el método ``_init_()`` de tu propia clase. Si te olvidás de llamar al método ``Sprite.__init__()``, vas a obtener un error críptico, como este :: AttributeError: 'mysprite' instance has no attribute '_Sprite__g' Extendiendo tus Propias Clases *(Avanzado)* ------------------------------------------- Debido a problemas de velocidad, las clases de ``Group`` actuales intentan solo hacer exactamente lo que necesitan, y no manejar muchas situaciones generales. Si decidís que necesitás funciones adicionales, es posible que desees crear tu propia clase ``Group``. Las clases ``Sprite`` y ``Gorup`` fueron diseñadas para ser extendidas, así que sentite libre de crear tus propias clases ``Group`` para hacer cosas especializadas. El mejor lugar para empezar es probablemente el código fuente real de python para el módulo de sprite. Mirar el actual grupo ``Sprite`` debería ser ejemplo suficiente de cómo crear el tuyo propio. Por ejemplo, aquí está el código fuente para un ``Group`` de renderización que llama a un método ``render()`` para cada sprite, en lugar de simplemente blittear una variable de "imagen" de él. Como queremos que también maneje áreas actualizadas, empezaremos con una copia del grupo ``RenderUpdates`` original, acá está el código :: class RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty A continuación hay más información acerca de cómo podés crear tus propios objetos ``Sprite`` y ``Group`` de cero. Los objetos ``Sprite`` solo "requieren" dos métodos: "add_internal()" y "remove_internal()". Estos son llamados por la clase ``Group`` cuando están eliminando un sprite de sí mismos. Los métodos ``add_internal()`` y ``remove_internal()`` tienen un único argumento que es un grupo. Tu ``Sprite`` necesitará alguna forma de realizar un seguimiento de los ``Groups`` a los que pertenece. Es probable que quieras intentar hacer coincidir los otros métodos y argumentos con la clase real de ``Sprites``, pero si no vas a usar esos métodos, seguro que no los necesitás. Son casi los mismos requerimientos para crear tu propio ``Group``. De hecho, si observas la fuente, verás que el ``GroupSingle`` no está derivado de la clase ``Group``, simplemente implementa los mismos métodos, por lo que realmente no se puede notar la diferencia. De nuevo, necesitás un método "add_internal()" y "remove_internal()" para que los sprites llamen cuando quieren pertenecer o eliminarse a sí mismos del grupo. Tanto ``add_internal()`` como ``remove_internal()`` tienen un único argumento que es un sprite. El único requisito adicional para las clases ``Group`` es que tengan un atributo ficticio llamado "_spritegroup". No importa cuál sea el valor, en tanto el atributo esté presente. Las clases Sprite pueden buscar este atributo para determinar la diferencia entre un "grupo" y cualquier contenedor ordinario de python. (Esto es importante porque varios métodos de sprites pueden tomar un argumento de un solo grupo o una secuencia de grupos. Dado que ambos se ven similares, esta es la forma más flexible de "ver" la diferencia.) Deberías pasar por el código para el módulo de sprite. Si bien el código está un poco "afinado", tiene suficientes comentarios para ayudarte a seguirlo. Hay incluso una sección de tareas para hacer en la fuente si tenés ganas de contribuir. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/SurfarrayIntro.rst.txt0000644000175100001770000005761514676242340026144 0ustar00runnerdocker.. TUTORIAL:Introduction to the surfarray module .. include:: ../../reST/common.txt ************************************************* Tutoriales de Pygame - Introducción a Surfarray ************************************************* .. currentmodule:: surfarray Introducción a Surfarray ======================== .. rst-class:: docinfo :Autor: Pete Shinners :Contacto: pete@shinners.org :Traducción al español: Estefanía Pivaral Serrano Introducción ------------ Este tutorial intentará presentar tanto Numpy como el módulo de surfarray de pygame a los usuarios. Para principiantes, el código que utiliza surfarray puede ser bastante intimidante. Pero en realidad, hay sólo unos pocos conceptos que entender y estarás listo para empezar. Con el uso del módulo de surfarray es posible realizar operaciones a nivel de píxeles desde el código Python sencillo. El rendimiento puede llegar a ser bastante cercano al nivel de hacer el código en C. Puede que solo desees ir directamente a la sección *"Examples"* para tener una idea de lo que es posible con este módulo, y luego comenzar desde el principio aquí para ir avanzando. Ahora bien, no voy a engañarte para que pienses que todo va a ser muy sencillo. Lograr efectos avanzados modificando los valores de píxeles puede ser complicado. Solo dominar NumPy requiere aprendizaje. En este tutorial me centraré en lo básico y utilizaré muchos ejemplos en un intento de sembrar las semillas de la sabiduría. Después de haber terminado el tutorial, deberías tener una comprensión básica de cómo funciona el surfarray. NumPy ----- Si no tenés instalado el paquete NumPy de python, necesitarás hacerlo. Podés descargar el paquete dede la página de descargas de NumPy en `NumPy Downloads Page `_ Para asegurarte que Numpy esté funcionando correctamente, deberías obtener algo como esto desde prompt (inteprete) interactivo de Python.:: >>> from numpy import * #importar numeric >>> a = array((1,2,3,4,5)) #crear un array >>> a #mostrar array array([1, 2, 3, 4, 5]) >>> a[2] #index al array 3 >>> a*2 #nuevo array con valores dobles array([ 2, 4, 6, 8, 10]) Como se puede ver, el módulo NumPy nos proporciona un nuevo tipo de data, el *array*. Este objeto mantiene un array de tamaño fijo, y todos los valores que contiene en su interior son del mismo tipo. Los arrays (matrices) también pueden ser multidimensionales, que es como las usaremos con imágenes. Hay un poco más de información, pero es suficiente para empezar. Si mirás al último comando de arriba, verás que las operaciones matemáticas en los array de NumPy se aplican para todos los valores del array. Esto se llama "element-wise operations" (operaciones elemento a elemento). Estos arrays también pueden dividirse en listas normales. La sintaxis de la división es la misma que se usa en objetos Python estándar. *(así que estudia si es necesario)*. Aquí hay algunos ejemplos más de arrays que funcionan. :: >>> len(a) #obtener el tamaño del array 5 >>> a[2:] #elementos a partir del 2 array([3, 4, 5]) >>> a[:-2] #todos excepto los últimos 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #agregar el primero y último array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #agregar arrays de tamaños incorrectos Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,) Obtenemos un error con el último comando, porque intentamos sumar dos arrays que tienen tamaños diferentes. Para que dos arrays operen entre sí, incluyendo operaciones comparaciones y asignaciones, deben tener las mismas dismensiones. Es muy importante saber que los nuevos arrays creados a partir de cortar el original hacen referencia a los mismos valores. Por lo tanto, cambiar los valores en una porción de la división también cambia los valores originales. Es importante cómo se hace esto. :: >>> a #mostrar nuestro array inicial array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #dividir al medio 2 elementos >>> aa #mostrar la división array([2, 3]) >>> aa[1] = 13 #cambiar el valor en la división >>> a #mostrar cambio en el original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #copiar el array >>> aaa #mostrar copia array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #configurar los valores medios a 0 >>> aaa #mostrar copia array([1, 0, 0, 0, 5]) >>> a #mostrar nuevamente el original array([ 1, 2, 13, 4, 5]) Ahora vamos a ver pequeños arrays con dos dimensiones. No te preocupes demasiado, comenzar es lo mismo que tener una tupla de dos dimensiones *(una tupla dentro de otra tupla)*. Empecemos con los arrays de dos dimensiones. :: >>> row1 = (1,2,3) #crear una tupla de valores >>> row2 = (3,4,5) #otra tupla >>> (row1,row2) #mostrar como una tupla de dos dimensiones ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #crear un array en 2D >>> b #mostrar el array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #mostrar el nuevo array en 2D array([[1, 2], [3, 4], [5, 6]]) Ahora, con estos arrays bidimensionales *(de ahora en más "2D")* podemos indexar valores específicos y hacer cortes ambas dimensiones. Simplemente usando una coma para separar los índices, nos permite buscar/cortar en múltiple dimensiones. Simplemente usando "``:``" como un índex *(o no proporcionando suficiente índices)* nos devuelve todos los valores en esa dimensión. Veamos cómo funciona esto. :: >>> b #mostrar nuestro array desde arriba array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #indexar un único valor 2 >>> b[1,:] #dividir la segunda fila array([3, 4, 5]) >>> b[1] #dividir la segunda fila (igual que arriba) array([3, 4, 5]) >>> b[:,2] #dividir la última columna array([3, 5]) >>> b[:,:2] #dividir en un array de 2x2 array([[1, 2], [3, 4]]) De acuerdo, mantente conmigo acá, esto es lo más díficil que puede ponerse. Al usar NumPy hay una característica más para la división. La división de arrays también permite especificar un *incremento de divsión*. La sintaxis para una división con incremento es ``start_index : end_index : increment``. :: >>> c = arange(10) #como el rango, pero crea un array >>> c #muestra el array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #divide valores impares desde el 1 al 6 array([1, 3, 5]) >>> c[4::4] #divide cada 4to valor, empezando por el 4 array([4, 8]) >>> c[8:1:-1] #divide 1 al 8, de atrás para adelante /// invertido array([8, 7, 6, 5, 4, 3, 2]) Bien, eso es todo. Hay suficiente información acá para que puedas empezar a usar Numpy con el módulo surfarray. Ciertamente hay mucho más en NumPy, pero esto es solo una introducción. Además, ¿queremos pasar a cosas divertidas, no? Importar Surfarray ------------------ Para usar el módulo surfarray necesitamos importarlo. Dado que ambos, tanto surfarray y NumPy, son componentes opcionales para pygame es bueno asegurarse de que se importen correctamente antes de usarlos. En estos ejemplos voy a importar NumPy en una variable llamada *N*. Esto permitirá saber qué funciones estoy usando son del paquete de NumPy. *(y es mucho más corto que escribir NumPy antes de cada función)* :: probá: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required." Introducción a Surfarray ------------------------ Hay dos tipos principales de funciones en surfarray. Un conjunto de funciones para crear un array que es una copia de los datos de píxeles de la superficie (surface). Las otras funciones crean una copia referenciada de los datos de píxeles del array, de modo que los cambios en el array afectan directamente a la surface original. Hay otras funciones que permiten acceder a cualquier valor alfa por pixel, como arrays junto con algunas otras funciones útiles. Veremos estas otras funciones más adelante. Al trabajar con estos arrays de surface, existen dos formas de representar los valores de píxeles. En primar lugar, pueden representarse como enteros mapeados. Este tipo de array es un array simple en 2D con un solo entero que representa el valor de color mapeado de la superficie. Este tipo de array es últil para mover partes de una imagen al rededor de la pantalla. El otro tipo de array utiliza tres valores RGB para representar el color de cada píxel. Este tipo de array hace que sea extremadamente sencillo realizar efectos que cambian el color de cada píxel. Este tipo de array es también un poco más complicado de manejar, ya que es esencialmente un array numérico 3D. Aún así, una vez que ajustas tu mente en el modo adecuado, no es mucho más difícil que usar un array 2D normal. El módulo NumPy utiliza los tipos de números naturales de la máquina para representar los valores de los datos, por lo que un array de NumPy puede consistir de enteros de 8-bits, 16-bits y 32-bits. *(los array también pueden usar otro tipos como flotantes y dobles, pero para la manipulación de imágenes principalmente necesitamos preocuparnos por los tipos de enteros)*. Debido a esta limitación de tamaños de los enteros, debes tener un poco más de cuidado para asegurarte de que el tipo de arrays que hacen referencia a los datos de píxeles se pueda mapear correctamente con un tipo adecuado de datos. Las funciones que crean estos arrays a partir de las superficies son: .. function:: pixels2d(surface) :noindex: Crea una matriz 2D *(valores de píxeles enteros)* que hace referencia a los datos originales de la superficie. Esto funcionará para todos los formatos de surface excepto el de 24-bit. .. function:: array2d(surface) :noindex: Crea un array 2D *(valores de píxeles enteros)* que es copiada desde cualquier tipo de superficie. .. function:: pixels3d(surface) :noindex: Crea un array 3D *(valores de píxeles RGB)* que hacen referencia a los datos originales de la superficie. Esto solo funcionará en superficies de 24-bit y 32-bit que tengan el formato RGB o BGR. .. function:: array3d(surface) :noindex: Crea un array 3D *(valores de píxeles RGB)* que se copia desde cualquier tipo de surface. Aquí hay una pequeña tabla que podría ilustrar mejor qué tipos de funciones se deben usar en cada surface. Como se puede observar, ambas funciones de array funcionarán con cualquier tipo de surface. .. csv-table:: :class: matrix :header: , "32-bit", "24-bit", "16-bit", "8-bit(c-map)" :widths: 15, 15, 15, 15, 15 :stub-columns: 1 "pixel2d", "yes", , "yes", "yes" "array2d", "yes", "yes", "yes", "yes" "pixel3d", "yes", "yes", , "array3d", "yes", "yes", "yes", "yes" Ejemplos -------- Con esta información, estamos preparados para comenzar a probar cosas con los arrays de surface. A continuación encontrarán pequeñas demostraciones que crean un array de NumPy y los muestran en pygame. Estas diferentes pruebas se encuentran en el ejemplo arraydemo.py. Hay una función simple llamada *surfdemo_show* que muestra un array en la pantalla. .. container:: examples .. container:: example .. image:: ../../reST/tut/surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Nuestro primer ejemplo crea un array completamente negro. Siempre que se necesite crear una nueva matriz numérica de un tamaño específico, es mejor usar la función ``zeros``. Aquí creamos un array 2D de todos ceros y lo mostramos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Aquí estamos tratando con un array 3D. Empezamos creando una imagen completamente roja. Luego cortamos cada tercera fila y le asignamos a un color azul/verde. Como pueden ver, podemos tratar los arrays 3D casi exactamente de la misma manera que los arrays 2D, solo asegúrense de asignarles 3 valores en lugar de un único entero mapeado. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Aquí cargamos una imagen con el módulo de imagen, luego lo convertimos en un array 3D de elementos de color RGB enteros. Una copia RGB de una surface siempre tiene los colores dispuestos como a[r,c,0] para el componente rojo, a[r,c,1] para el componente verde, y a[r,c,2] para el azul. Esto se puede usar sin importar cómo se configuren los píxeles del surface original, a diferencia de un array 2D que es una copia de los píxeles de la surface :meth:`mapped ` (raw). Usaremos esta imagen en el resto de los ejemplos. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Aquí volteamos la imagen verticalmente. Todo lo que necesitamos para esto es tomar el array de la imagen original y cortarlo usando un incremento negativo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Basado en el último ejemplo, reducir una imagen escalar es bastante lógico. Simplemente cortamos todos los píxeles usando un incremento de 2 vertical y horizontalmente. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Aumentar la escala de la imagen requiere un poco más de trabajo, pero es similar al escalado previo hacia abajo, lo hacemos todo con cortes. Primero, creamos un array que tiene el doble del tamaño de nuestro original. Primero copiamos el array original en cada otro píxel del nuevo array. Luego lo hacemos de nuevo para cada otro píxel, haciendo las columnas impares. En este punto, tenemos la imagen escalada correctamente en sentido horizontal, pero las otras filas son negras, por lo que simplemente debemos copiar cada fila a la que está debajo. Entonces tenemos una imagen duplicada en tamaño. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Ahora estamos usando arrays 3D para cambiar los colores. Acá establecemos todos los valores en verde y azul en cero. Esto nos deja solo con el canal rojo. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Aquí realizamos un filtro de convulción 3x3 que suavizará nuestra imagen. Parece que hay muchos pasos aquí, pero lo que estamos haciendo es desplazar la imagen 1 píxel en cada dirección y sumarlos todos juntos (con algunas multiplicaciones por ponderación). Luego se promedian todos los valores. No es Gaussiano, pero es rápido. Un punto con los arrays NumPy, la precisión de las operaciones aritméticas está determinada por el array con el tipo de datos más grande. Entonces, si el factor no se declarara como un array de 1 elemento de tipo numpy.int32, las multiplicaciones se realizarían utilizando numpy.int8, el entero de 8 bits de cada elemento rgbarray. Esto causará una truncación de valores. El array de suavizado también debe declararse con un tamaño de entero más grande que rgbarray para evitar la truncación. .. container:: break .. .. container:: example .. image:: ../../reST/tut/surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Por último, estamos realizando una transición gradual entre la imagen original y una imagen de color azul sólido. No es emocionante, pero la imagen de destino podría ser cualquier cosa, y cambiar el multiplicador 0.50 permitirá elegir cualquier paso en una transición lineal entre dos imágenes. .. container:: break .. Con suerte, a estas alturas estás empezando a ver cómo surfarray puede ser utilizado para realizar efectos especiales y transformaciones que sólo son posibles a nivel de píxeles. Como mínimo, se puede utilizar surfarray para realizar muchas operaciones del tipo Surface.set_at() y Surface.set_at() rápidamente. Pero no creas que esto ha terminado, todavía queda mucho por aprender. Bloqueo de Superficie (Surface) ------------------------------- Al igual que el resto de pygame, surfarray bloqueará cualquier Surface que necesite para acceder a los datos de píxeles. Sin embargo, hay un elemento más a tener en cuenta; al crear los array de *pixeles*, la surface original quedará bloqueada durante la vida útil de ese array de píxeles. Es importante recordarlo. Asegurate de *"eliminar"* el array de píxeles o de dejarlo fuera del alcance *(es decir, cuando la funcion vuelve, etc.)*. También hay que tener en cuenta que realmente no querés hacer muchos *(si es que alguno)* accesos directos a píxeles en la surface del hardware *(HWSURFACE)*. Esto se debe a que los datos de la surface se encuentra en la tarjeta gráfica, y transferir cambios de píxeles a través del bus PCI/AGP no es rápido. Transparencia ------------- El módulo surfarray tiene varios métodos para acceder a los valores alpha/colorclave de una Surface. Ninguna de las funciones alpha se ve afectada por la transparencia general de una Surface, solo por los vaores de los píxeles. Aquí está la lista de esas funciones. .. function:: pixels_alpha(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que hace referencia a los datos alpha de la surface original. Esto solo funcionará en imágenes de 32-bit con un componente alfa de 8-bit. .. function:: array_alpha(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que se copia desde cualquier tipo de surface. Si la surface no tiene valores alfa, el array tendrá valores completamten opacos *(255)*. .. function:: array_colorkey(surface) :noindex: Crea un array 2D *(valores enteros de píxeles)* que está establecida como transparente *(0)* donde el color de ese píxel coincide con el color clave de la Surface. Otras Funciones de Surfarray ---------------------------- Solo hay algunas otras funciones disponibles en surfarray. Podés obtener una lista mejor con mayor documentación en :mod:`surfarray reference page `. Sin embargo, hay una función muy útil. .. function:: surfarray.blit_array(surface, array) :noindex: Esto transferirá cualquier tipo de array de surface 2D o 3D a una Surface con las mismas dimensiones. Este blit de surfarray generalmente será más rápido que asignar un array a la de pixeles referenciado. Sin embargo, no debería ser tan rápido como el blitting normal de surface, ya que esos están muy optimizados. NumPy más Avanzado ------------------ Hay un par más de cosas que deberías saber sobre los arrays Numpy. Cuando se trata de arrays muy grandes, como los que son de 640x480, hay algunas cosas adicionales sobre las que debes tener cuidado. Principalmente, mientras que usar los operadores como + y * en los arrays los hace fáciles de usar, también es muy costoso en arrays grandes. Estos operadores deben hacer nuevas copias temporales del array, que luego generalmente se copian en otro array. Esto puede requerir mucho tiempo. Afortunadamente, todos los operadores de Numpy vienen con funciones especiales que pueden realizar la operación *"in place*" (en su lugar). Por ejemplo, en lugar de usar ``screen[:] = screen + brightmap`` podrías querer usar ``add(screen, brightmap, screen)`` que es más rápido. De todos modos, debes leer la documentación UFunc de Numpy para obtener más información sobre esto. Es importante cuando se trata de los arrays. Otra cosa a tener en cuenta al trabajar con arrays NumPy es el tipo de datos del array. Algunos de los arrays (especialmente el tipo de píxeles mapeado) a menudo devuelven arrays con un valor sin signo en 8-bits. Estos arrays se desbordarán fácilmente si no tienes cuidado. NumPy usará la misma coerción que se encuentra en los programas en C, por lo que mezclar una operación con números de 8 bits y 32 bits dará como resultado números de 32 bits. Puedes convertir el tipo de datos del array, pero definitivamente debes ser consciente de qué tipos de arrays tienes, si NumPy se encuentra en una situación en la que se arruinaría la precisión, lanzará una excepción. Por último, debes tenér en cuenta que al asignar valores en los arrays 3D, estos deben estar entre 0 y 255, de lo contrario se producirá alguna truncación indefinida. Graduación ---------- Bueno, ahí está. Mi breve introducción a NumPy y surfarray. Espero que ahora veas lo que es posible, y aunque nunca los uses por ti mismo, no tengas miedo cuando veas código que los use. Echale un vistazo al ejemplo vgrade para ver más sobre los arrays numéricos. También, hay algunos demos *"flame"* que usan surfarray para crear un efectp de fuego en tiempo real. Lo mejor que podés hacer es probar alguna cosas por tu cuenta. Ve despacio al principio y ve construyendo poco a poco, ya he visto algunas cosas geniales con surfarray, como gradientes radiales y más. Buena suerte. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/chimpance.py.rst.txt0000644000175100001770000000026314676242340025513 0ustar00runnerdocker.. include:: common.txt **************************** pygame/examples/chimp.py **************************** .. literalinclude:: ../../../examples/chimp.py :language: python ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.972112 pygame-2.6.1/docs/generated/es/_sources/tutorials/tom_juegos2.rst.txt0000644000175100001770000001614714676242340025402 0ustar00runnerdocker.. include:: ../../reST/common.txt ********************************* Revisión: Fundamentos de Pygame ********************************* .. role:: firstterm(emphasis) .. _hacerjuegos-2: 2. Revisión: Fundamentos de Pygame ================================== .. _hacerjuegos-2-1: 2.1. El juego básico de Pygame ------------------------------ Por el bien de la revisión, y para asegurarme de que estés familiarizado/a con la estrucutra de un programa básico de Pygame, voy a ejecutar brevemente un programa básico de Pygame, que mostrará no más que una ventana con un poco de texto en ella. Al final, debería verse algo así (aunque claro que la decoración de la ventana será probablemente diferente en tu sistema): .. image:: ../../reST/tut/tom_basic.png El código completo para este ejemplo se ve así:: #!/usr/bin/python import pygame from pygame.locals import * def main(): # Inicializar pantalla pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Mostrar texto font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blittear todo a la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Bucle de eventos (event loop) while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main() .. _hacerjuegos-2-2: 2.2. Objetos Pygame Básicos --------------------------- Como pueden ver, el código consiste de tres objetos proncipales: la pantalla, el fondo y el texto. Cada uno de estos objetos está creado primero llamando a una instancia de objeto integrado de Pygame, y luego modificándolo para adaptarse a nuestras necesidades. La pantalla es un caso levemente especial, porque todavía modificamos la pantalla a través de llamadas de Pygame, en lugar de llamar los métodos pertenecientes al objeto de pantalla. Pero para los demás objetos de Pygame, primero creamos el objeto como una copia de un objeto de Pygame, dándole algunos atributos, y construimos nuestro objeto a partir de ellos. Con el fondo, primero creamos un objeto Surface de Pygame y le damos el tamaño de la pantalla. Luego realizamos la operación convert() para convertir la Surface a un formato de un solo píxel. Esto es obviamente necesario cuando tenemos varias imágenes y superficies, todas con diferentes formatos de píxeles, lo cual hace que su renderización sea bastante lenta. Al convertir todas las superficies (surfaces), podemos acelerar drásticamente los tiempos de renderizado. Finalmente, llenamos la superficie de fondo con color blanco (255, 255, 255). Estos valores son :firstterm:`RGB` (Red Green Blue), y se pueden obtener desde cualquier buen programa de dibujo. Con el texto, requerimos más de un objeto. Primero, creamos un objeto de fuente (font object), que define qué fuente usar y qué tamaño va a tener. Luego, creamos un objeto texto (text object) usando el método ``render`` que pertenece a nuestro objeto de fuente, suministrando tres argumentos: el texto que se va a renderizar, si debe tener anti-aliasing (1=yes, 0=no), y el color para el texto (otra vez en formato RGB). A continuación, creamos un tercer objeto de texto, que obtiene un rectangulo para el texto. La forma más fácil de entender esto es imaginando dibujar un rectángulo que rodeará todo el texto; luego se puede usar este rectángulo para obtener/establecer la posición del texto en la pantalla. En este ejemplo, obtenemos el rectángulo y establecemos su atributo ``centerx`` para que sea el atributo ``centerx`` del fondo (así el centro del texto será el mismo que el centro del fondo, es decir el texto estará centrado en la pantalla en el eje x). También podríamos establecer la coordenada y, pero no es diferente, así que dejé el texto en la parte superior de la pantalla. Como la pantalla es pequeña de todas formas, no parecía necesario. .. _hacerjuegos-2-3: 2.3. Blitting ------------- Ahora que hemos creado nuestros objetos de juego, necesitamos renderizarlos. Si no lo hiciéramos, y ejecutáramos el programa, solo veríamos una pantalla en blanco y los objetos permanecerían invisibles. El término usado para renderizar objetos es :firstterm:`blitting`, que es donde se copian los píxeles pertenecientes a dicho objeto en el objeto de destino. Entonecs, para renderizar el objeto de fondo, lo blitteamos en la pantalla. En este ejemplo, para simplificar las cosas, blitteamos el texto en el fondo (para que el fondo tenga una copia del texto en él) y luego blitteamos el fondo en la pantalla. Blitting es uno de las operaciones más lentas de cualquier juego, por lo que debes tener cuidado de no blittear demasiado en la pantalla en cada cuadro. Si tienes una imagen de fondo y una pelota volando por la pantalla, podrías blittear el fondo y luego la pelota en cada cuadro, lo que cubriría la posición anterior de la pelota y renderizaría la nueva pelota, pero esto sería bastante lento. Una mejor solución es blittear el fondo en el área que la pelota ocupó previamente, lo que se puede encontrar en el rectángulo anterior de la pelota, y luego blittear la pelota, para que solo estés blitteando dos áreas pequeñas. .. _hacerjuegos-2-4: 2.4. Evento en Bucle -------------------- Una vez que ya hayas configurado el juego, necesitás ponerlo en un bucle para que se ejecute cotninuamente hasta que el usuario señale que quiere salir. Asi que comenzás un bucle abierto ``while``, y luego por cada iteración del bucle, que será cada cuadro del juego, actualizas el juego. Lo primero es verificar cualquier evento de Pygame, que será el usuario presionando el teclado, clickeando el botón del mouse, moviendo un joystick, redimensionando la ventana, o tratando de cerrarla. En este caso, simplemente queremos estar atentos a que el usuario intente salir del juego cerrando la ventana, en cuyo caso el juego debería ``return``, que terminará el bucle ``while``. Luego, simplemente necesitamos volver a dibujar (re-blit) el fondo, y actualizar la pantalla para que todo se dibuje. Okay, como nada se mueve o sucede, en este ejemplo, estrictamente hablando no necesitamos volver a dibujar el fondo en cada iteración, pero lo incluí porque cuando las cosas se mueven en la pantalla, necesitarás hacer todo tu dibujado (blitting) aquí. .. _hacerjuegos-2-5: 2.5. Ta-da! ----------- ¡Y eso es todo - tu más básico juego de Pygame! Todos los juegos tomarán una forma similar a esta, pero con mucho más código para las funciones del juego real en sí, que tienen más que ver con la programación y menos estructurados por el funcionamiento de Pygame. Esto es realmente de lo que trata este tutorial y seguiremos adelante con ello. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/generated/es/_sources/tutorials/tom_juegos3.rst.txt0000644000175100001770000001322214676242340025372 0ustar00runnerdocker.. include:: ../../reST/common.txt **************** Dando Inicio **************** .. role:: citetitle(emphasis) .. _hacerjuegos-3: 1. Dando Inicio ================ Las primeras secciones de código son relativamente simples y, una vez escritas, pueden usualmente ser pueden reutilizar en todos los juegos que posteriormente hagas. Realizarán todas las tareas aburridas y genéricas como cargar módulos, cargar imágenes, abrir conexiones de red, reproducir música y así sucesivamente. También incluirán una gestión de errores simple pero efectiva, y cualquier personalización que desees proporcionar además de las funciones proporcionadas por los módulos como ``sys`` y ``pygame``. .. _hacerjuegos-3-1: 3.1. Primeras líneas y carga de módulos --------------------------------------- En primer lugar, necesitás iniciar tu juego y cargar tus módulos. Siempre es una buena idea establecer algunas cosas al principio del archivo fuente principal, como el nombre del archivo, qué contiene, bajo qué licencia se encuentra, y cualquier otra información útil que desees proporcionar a quienes que lo van a estar viendo. Luego puedes cargar módulos, con algunas verificaciones de errores para que Python no imprima una traza desagradable que los no programadores no entenderán. El código es bastante simple, por lo que no me molestaré en explicarlo.:: #!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) .. _hacerjuegos-3-2: 3.2. Funciones de manejo de recursos ------------------------------------ En el ejemplo :doc:`Chimpancé, Línea Por Línea `, el primer código que se escribió fue para cargar imagenes y sonidos. Como estos eran totalmente independiente de cualquier lógica de juego u objetos del juego, se los escribió como funciones separadas y se escribieron primero para que el código posterior pudiera hacer uso de ellas. Generalmente, coloco todo mi código de esta naturaleza primero, en sus propias funciones sin clase; estas serán, en términos generales, funciones de manejo de recursos. Por supuesto, también podés crear clases para estas funciones, para que puedas agruparlas y tal vez tener un objeto con el que puedas controlar todos los recursos. Como con cualquier buen entorno de programación, depende de vos desarrollar tu propia práctica y estilo óptimo. Siempre es una buena idea escribir tus propias funciones de manejo de recursos, porque aunque Pygame tiene métodos para abrir imágenes y sonidos, y otros módulos tendrán sus métodos para abrir otros recursos, esos métodos pueden ocupar más de una línea, pueden requerir una modificación constante de tu parte y a menudo no proporcionan un manejo de errores satisfactorios. Escribir funciones de manejo de recursos te da código sofisticado y reutilizable, y te da mayor control sobre tus recursos. Tomá este ejemplo de una función de carga de imágenes:: def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() Acá creamos una función de carga de imagen más sofisticada que la proporcionada por :func:`pygame.image.load`. Observen que la primera línea de la función es una cadena de documentación describiendo qué hace cada función, y qué objeto(s) devuelve. La función asume que todas tus imágenes están en el directorio llamado "data", por lo que toma el nombre del archivo y crea la ruta completa, por ejemplo ``data/ball.png``, usando el módulo :citetitle:`os` para asegurar la compatibilidad entre plataformas. Luego intenta cargar la imagen y convertir cualquier región alfa para que puedas lograr la transparencia, y devuelve un mensaje de error más legible si hay algún problema. Finalmente, devuelve el objeto de imagen y su clase :class:`rect `. Podés crear funciones similares para cargar cualquier otro recurso, como cargar sonidos. También podés crear clases de manejo de recursos para darte más flexibilidad con recursos más complejos. Por ejemplo, podrías crear una clase de música, con una función ``__init__`` que carga la música (quizás tomando prestada de la función ``load_sound()``), una función para pausar la música y otra para reiniciarla. Otra clase útil de manejo de recursos es para conexiones de red. Funciones para abrir sockets, pasar datos con seguridad y verificación de errores adecuados, cerrar sockets, buscar direcciones, y otras tareas de red, pueden hacer que escribir un juego con capacidades de red sea relativamente indoloro. Recordá que la tarea principal de estas funciones/clases es asegurarse de que para cuando llegues a escribir las clases de objetos de juego y el bucle principal, casi no haya nada más que hacer. La herencia de clases puede hacer que estas clases básicas sean especialmente útiles. Pero no te excedas, las funciones que solo serán utilizadas por una clase deben ser escritas como parte de esa clase, no como una función global. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/generated/es/_sources/tutorials/tom_juegos4.rst.txt0000644000175100001770000001761614676242340025406 0ustar00runnerdocker.. include:: ../../reST/common.txt ************************** Clases de objetos de juego ************************** .. role:: firstterm(emphasis) .. _hacerjuegos-4: 4. Clases de objetos de juego ============================= Una vez que hayas cargado tus módulos y escrito tus funciones de manejo de recursos, querrás pasar a escribir algunos objetos de juego. La forma en que esto se realiza es bastante simple, sin embargo puede parecer complejo al principio. Escribirás una clase para cada tipo de objeto en el juego y después crearás una instancia de esas clases para los objetos. Luego podés usar los métodos de esas clases para manipular los objetos, dándoles algún tipo de movimiento y capacidades interactivas. Entonces tu juego, en pseudo-código, se verá así:: #!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update() Por supuesto, esto es un ejemplo muy simple, y tendrías que agregar todo el código en lugar de esos pequeños comentarios entre corchetes. Pero deberías entender la idea básica. Creás una clase, en la cual colocás todas las funciones de la pelota, incluyendo ``__init__``,que crearía todos los atributos de la pelota, y ``update``, que movería la pelota a su nueva posición antes de blittearla en la pantalla en esta posición. Luego podés crear más clases para todos tus otros objetos de juego, y luego crear instancias de los mismos para que puedas manejarlos fácilmente en la función ``main`` y en el bucle principal del programa. En contraste con iniciar la pelota en la función ``main``, y luego tener muchas funciones sin clase para manipular un objeto de pelota establecido, y espero que puedas ver por qué usar clases es una ventaja: te permite poner todo el código perteneciente a cada objeto en un único lugar; hace que sea más fácil usar objetos; hace que agregar nuevos objetos y manipularlos sea más flexible. En lugar de agregar más código para cada nuevo objeto de pelota, podés simplemente crear instancias de la clase ``Ball`` para cada nuevo objeto de pelota. ¡Mágia! .. _hacerjuegos-4-1: 4.1. Una clase simple de pelota ------------------------------- Aquí hay una clase simple con el código necesario para crear un objeto pelota que se moverá a través de la pantalla, si la función ``update`` esa llamada en el bucleo principal:: class Ball(pygame.sprite.Sprite): """A ball that will move across the screen (Una peleota se moverá a través de la pantalla) Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) Aquí tenemos la clase ``Ball`` con una función ``__init__`` que configura la pelota, una función ``update`` que cambia el rectángulo de la pelota para que esté en la nueva posición, y una función ``calcnewpos`` para calcular la nueva posición de la pelota basada en su posición actual, y el vector por el cual se está moviendo. Explicaré la física en un momento. Lo único más a destacar es la cadena de documentación, que es un poco más larga esta vez, y explica los conceptos básicos del la clase. Estas cadenas son útiles no solo para ti mismo y otros programadores que revisen el código, sino también para las herramientas que analicen y documenten tu código. No harán mucha diferencia en programas pequeños, pero en los grandes son invaluables, así que es una buena costumbre de adquirir. .. _hacerjuegos-4-1-1: 4.1.1. Digresión 1: Sprites ~~~~~~~~~~~~~~~~~~~~~~~~~~~ La otra razón por la cual crear una clase por cada objeto son los sprites. Cada imagen que se renderiza en tu juego será un objeto, por lo que en principio, la clase de cada objeto debería heredar la clase :class:`Sprite `. Esta es una característica muy útil de Python: la herencia de clases. Ahora, la clase ``Ball`` tiene todas las funciones que vienen con la clase ``Sprite``, y cualquier instancia del objeto de la clase ``Ball`` será registrada por Pygame como un sprite. Mientras que con el texto y el fondo, que no se mueven, está bien hacer un blit del objeto sobre el fondo, Pygame maneja los objetos sprites de manera diferente, lo cual verás cuando miremos el código completo del programa. Básicamente, creas tanto un objeto pelota y un objeto sprite para la pelota, y luego llamás a la función update de la pelota en el objeto de sprite, actualizando así el sprite. Los sprites también te dan formas sofisticadas de determinar si dos objetos han colisionado. Normalmente, podrías simplemente comprobar en el bucle principal para ver si sus rectángulos se superponen, pero eso implicaría mucho código, lo cual sería una pérdida de tiempo porque la clase ``Sprite`` proporciona dos funciones (``spritecollide`` y ``groupcollide``) para hacer esto por vos. .. _hacerjuegos-4-1-2: 4.1.2. Digresión 2: Física de vectores ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Aparte de la estructura de la clase ``Ball``, lo notable de este código es la física de vectores utilizada para calcular el movimiento de la pelota. En cualquier juego que involucre movimiento angular, no se llegará muy lejos a menos que se esté cómodo con la trigonometría, así que simplemente introduciré los conceptos básicos que necesitás saber para entender la función ``calcnewpos``. Para empezar, notarás que la pelota tiene un atributo llamado ``vector``, que está compuesto por ``angle`` y ``z``. El ángulo estpa medido en radianes y dará la dirección en la que la pelota se mueve. Z es la velocidad a la que se mueve la pelota. Entonces, usando este vector, podemos determinar la dirección y velocidad de la pelota, y por lo tanto, cuánto se moverá en los ejes x e y: .. image:: ../../reST/tut/tom_radians.png El diagrama anterior ilustra las matemáticas básicas detrás de los vectores. En el diagrama de la izquierda, se puede ver el movimiento proyectado de la pelota representado por una línea azul. La longitud de esa línea (z) representa su velocidad, y el ángulo es la dirección en la que se moverá. El ángulo para el movimiento de la pelota siempre se tomará desde el eje x a la derecha, y se mide en sentido horario desde esa línea, como se muestra en el diagrama. A partir del ángulo y la velocidad de la pelota, podemos lograr calcular cuánto se ha movido a lo largo de los ejes x e y. Necesitamos hacer esto porque Pygame en sí no admite vectores, y solo podemos mover la pelota moviendo su rectángulo a lo largo de los dos ejes. Por lo tanto, necesitamos :firstterm:`resolve` (resolver) el ángulo y la velocidad en su movimiento en el eje x (dx) y en el eje y (dy). Esto es un asunto sencillo de trigonometría y se puede hacer con las fórmulas que se muestran en el diagrama. Si has estudiado trigonometría elemental antes, nada de esto debería ser nuevo para vos. Pero en caso que seas olvidadizo, acá hay algunas fórmulas útiles para recordar, que te ayudarán a visualizar los ángulos (a mi me resulta más fácil visualizar los ángulos en grados que en radianes. .. image:: ../../reST/tut/tom_formulae.png ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/generated/es/_sources/tutorials/tom_juegos5.rst.txt0000644000175100001770000001622514676242340025402 0ustar00runnerdocker.. include:: ../../reST/common.txt ************************************* Objetos controlables por los usuarios ************************************* .. _hacerjuegos-5: 5. Objetos controlables por los usuarios ======================================== Hasta ahora puodés crear una ventana de Pygame y renderizar una pelota que volará por la pantalla. El siguiente paso es crear algunos bates que el usuario pueda controlar. Esto es potencialmente más simple que la pelota, porque no requiere física (a menos que el objeto controlado por el usuario se mueva de manera más compleja que hacia arriba y abajo, por ejemplo, un personaje de plataforma como Mario, en cuyo caso necesitarás más física) Los objetos controlados por el usuario son bastante fácil de crear, gracias al sistema de cola de Pygame, como ya verás. .. _hacerjuegos-5-1: 5.1. Una clase simple de bate ----------------------------- El principio detrás de la clase de bate es similar al de la clase de pelota. Necesitás una función ``__init__`` para inicializar el bate (para que puedas crear instancias de objeto para cada bat), una función ``update`` para realizar cambios por cuadro en el bate antes de que sea blitteado en la pantalla, y las funciones que definirán lo que esta clase realmente hará. Aquí tenés un ejemplo de código:: class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" Como puedes ver, esta clase es muy similar en estructura a la clase de la pelota, pero hay diferencias en lo que hace cada función. En primer lugar, hay una función "reinit", que es utilizada cuando una ronda finaliza y el bate debe volver a su lugar de inicio con cualquier atributo establecido de vuelta a sus valores necesarios. A continuación, la forma en que se mueve el bate es un poco más compleja que con la pelota, porque acá su movimiento es simple (arriba/abajo), pero depende de que el usuario le diga que se mueva, a diferencia de la pelota que simplemente sigue moviéndose en cada cuadro. Para entender cómo se mueve el bate, es útil mirar brevemente un diagrama para mostrar la secuencia de eventos:: .. image:: tom_event-flowchart.png Lo que sucede aquí es que la persona controlando el bate presional la tecla que mueve el bate hacia arriba. Para cada interación de el bucle principal del juego (para cada cuadro), si la tecla sigue presionada, entonces el atributo ``state`` de ese objeto de bate se establecerá en "moviendose" y se llamará a la función ``moveup``, lo que hará que la posición 'y' de la pelota se reduzca por el valor de atributo ``speed`` (en este ejemplo, 10). En otras palabras, mientras la tecla se mantenga presionada, el bate se moverá hacia arriba de la pantalla en 10 píxeles por cuadro. El atributo ``state`` no se utiliza aquí, pero es útil saberlo si estás tratando con giros o si deseas obtener alguna salida de depuración útil. Tan pronto como el jugador suelte la tecla, se invoca el segundo conjunto de cajas y el atributo ``state`` del objeto de bate se establecerá de nuevo en "still" y el atributo ``movepos`` volverá a establecerse en [0,0], lo que significa que cuando se llame a la función ``update``, ya no movera el bate. Así que cuando el jugador suelta la tecla, el bate se detiene. ¡Simple! .. _hacerjuegos-5-1-1: 5.1.1. Digresión 3: Eventos de Pygame ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Entonces, ¿cómo sabemos cuándo el jugador está presionando teclas y luego las suelta? ¡Con el sistema de cola de eventos de Pygame, tontuelo! Es un sistema realmente fácil de usar y entender, así que esto no debería llevar mucho tiempo :) Ya has visto la cola de eventos en acción en el programa básico de Pygame, donde se usó para verificar si el usuario estaba cerrando la aplicación. El código para mover el bate es tan simple como eso:: for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still" Aquí se asume que ya has creado una instancia de un bate y has llamado al objeto ``player``. Podés ver el familiar diseño de la estrictura ``for``, que itera a través de cada evento encontrado en la cola de eventos de Pygame, que se recupera con la función :mod:`event.get() `. A medida que el usuario presiona teclas, pulsa botones del ratón y mueve el joystick, esas acciones se bombean en la cola de eventos de Pygame, y se dejan allí hasta que se traten. Así que en cada iteración del bucle principal del juego, se pasa por estos eventos, comprobando si son los que se desean tratar, y luego tratándolos adecuadamente. La función :func:`event.pump() ` que estaba en la función ``Bat.update`` se llama entonces en cada iteración para eliminar los eventos antiguos y mantener la cola actual. Primero verificamos si el usuario está saliendo del programa, y lo cerramos si es así. Luego verificamos si se está presionando alguna tecla, y si lo están, verificamos si son las teclas designadas para mover la paleta hacia arriba y hacia abajo. Si lo son, llamamos a la función de movimiento correspondiente y establecemos el estado del jugador adecuadamente (aunque los estados moveup (moverarriba) y movedown (moverabajo) se cambian en las funciones ``moveup()`` y ``movedown()``, lo que hace que el código sea más ordenado y no rompe la *encapsulación*, lo que significa que se asignan atributos al objeto en sí, sin referirse al nombre de la instancia de ese objeto). Aquí notamos que tenemos tres estados: still (quieto), moveup (moverarriba), movedown (moverabajo). De nuevo, estos son útiles si se quiere depurar o calular giros, efectos de rotación. También verificamos si alguna tecla ha sido "soltada" (es decir, que ya no está siendo presionada), y nuevamente, si son las teclas correctas, detenemos el movimiento del bate. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.973112 pygame-2.6.1/docs/generated/es/_sources/tutorials/tom_juegos6.rst.txt0000644000175100001770000003466714676242340025415 0ustar00runnerdocker.. include:: ../../reST/common.txt ******************** Juntando Todo ******************** .. _hacerjuegos-6: 1. Juntando todo ================ Hasta ahora has aprendido todo lo básico necesario para construir un juego simple. Estás en condiciones de entender cómo crear objetos de Pygame, cómo Pygame muestra objetos, cómo maneja eventos y cómo pódes usar física para introducir algo de movimiento en tu juego. Ahora simplemente te mostraré cómo podés tomar todas esas partes de código y juntarlas en un juego funcional. Lo que necesitamos primero es permitir que la pelota golpee los lados de la pantalla, y que la paleta pueda golpear la pelota, de lo contrario no habrá mucho juego involucrado. Hacemos esto utilizando los métodos de colisión de Pygame: :meth:`collision `. .. _hacerjuegos-6-1: 6.1. Dejá que la pelota golpee los lados ---------------------------------------- El principio básico para hacer que rebote en los lados es fácil de comprender. Se obtienen las coordenadas de las cuatro esquinas de la pelota y se comprueba si corresponden con la coordenada x o y del borde de la pantalla. Por lo tanto, si la esquina superior derecha e izquierda tienen una coordenada 'y' de cero, sabés que la pelota está actualmente en el borde superior de la pantalla. Se hace todo esto en la función ``update``, despue´s de haber calculado la nueva posición de la pelota. :: if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z) Aquí comprobamos si el ``area`` contiene la nueva posición de la bola (lo que siempre debería ser así, por lo que no necesitamos una cláusula ``else``, aunque en otras circunstancias podríamos considerarla). Luego verificamos si las coordenadas de las cuatro esquinas están *colisionando* con los bordes del área, y creamos objetos para cada resultado. Si lo están, los objetos tendrán un valor de 1 o ``True``. Si no, el valor será ``None`` o ``False``. Luego verificamos si ha chocado con la parte superior o inferior, y si lo ha hecho, cambiamos la dirección de la pelota. Afortunadamente, usando radianes podemos hacer esto simplemente invirtiendo su valor positivo/negativo. También comprobamos si la bola se ha salido de los lados, y si lo ha hecho, llamamos a la función ``offcourt``. En mi juego, esto reinicia la bola, agrega 1 punto al puntaje del jugador especificado al llamar la función y muestra el nuevo puntaje. Finalmente, recompilamos el vector en función del nuevo ángulo. Y eso es todo. La pelota ahora rebotará felizmente en las paredes y saldrá de la cancha con gracia. .. _hacerjuegos-6-2: 6.2. Let the ball hit bats -------------------------- Hacer que la pelota golpee los bates es muy similar a hacer que golpee los lados de la pantalla. Todavía usamos el método de colisión. Todavía usamos el método de colisión, pero esta vez comprobamos si los rectángulos de la pelota y cualquiera de los bates colisionan. En este código también he agregado código adicional para evitar errores. Descubrirás que tendrás que poner todo tipo de código adicional para evitar errores y problemas, así que es bueno acostumbrarse a verlo. :: else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) Comenzamos esta sección con una declaración ``else``, porque esto continúa desde el fragmento de código anterior, para comprobar si la pelota golpea los lados. Tiene sentido que si no golpea los lados, podría golpear el bate, por lo que continuamos con la declaración condicional. El primer error a corregir es reducir el tamaño de los rectángulos de los jugadores en 3 píxeles en ambas dimensiones, para evitar que el bate atrape una pelota que pasa detrás de ellos (si imaginás que simplemente mueve el bate para que la pelota viaje detrás de él, los rectángulos se superponen, y normalmente la pelota habría sido "golepada" - esto lo evita) A continuación, comprobamos si los rectángulos colisionan, con una corrección adicional de errores. Observá que he comentado sobre estas partes extrañas del código: siempre es bueno explicar las partes del código que son anormales, tanto para otros que miran tu código, como para que lo entiendas cuando regreses a él. Sin la corrección, la pelota podría golpear una esquina del bate, cambiar la dirección, y un cuadro después, aún encontrarse dentro del bate. Luego, volvería a pensar que ha sido golpeada, y cambiaría su dirección. Esto puede suceder varias veces, haciendo que el movimiento de la pelota sea completamente irreal. Por lo tanto, tenemos una variable, ``self.hit``, que la establecemos en ``True`` cuando ha sido golpeada y ``False`` un cuadro después. Cuando comprobamos si los rectángulos han colisionado, también verificamos si ``self.hit`` es ``True``/``False``, para evitar rebotes internos. El código importante aquí es bastante fácil de entender. Todos los rectángulos tienen una función :meth:`colliderect `, en la que alimentas el rectángulo de otro objeto y devuelve ``True`` si los rectángulos se superpone, y ``False`` si no lo hacen. Si se superponen, podemos cambiar la dirección restando el ángulo actual de ``pi`` (de nuevo, un truco útil que podés hacer con radianes, que ajustará el ángulo en 90 grados y lo enviará en la dirección correcta; podrías encontrar en este punto que es necesario una comprensión detallada de radianes.) Solo para terminar la comprobación de errores, cambiamos ``self.hit`` de vuelta a ``False`` si es el cuadro por le cual fueron golpeados. También volvemos a compilar el vector. Por supuesto, querrás eliminar la misma línea en el fragmento de código anterior, para que solo lo hagas una vez después de la declaración condicional ``if-else``. ¡Y eso es todo! El código combinado ahora permitirá que la pelota golpee los lados y los bates. .. _hacerjuegos-6-3: 6.3. El producto final ---------------------- El producto final, con todos los fragmentos de código unidos, así como algunos otros fragmentos de código pegados juntos, se verá así:: # # Tom's Pong # A simple pong game with realistic physics and AI # http://www.tomchance.uklinux.net/projects/pong.shtml # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Desinflar los rectángulos para que no quede la pelota detrás del bate player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # ¿Colisionan la pelota y el bate? # Nota: He establecido una regla extraña que establece self.hit en 1 cuando colisionan, y lo desactiva en la siguiente # iteración. Esto es para evitar un comportamiento extraño de la pelota donde encuentra una colisión *dentro* del # bate, la pelota se invierte, y aún está dentro del bate, por lo que rebota dentro de él. # De esta manera, la pelota siempre puede escapar y rebotar limpiamente. if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initializar pantalla pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Llenar fondo background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initializar jugadores global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initializar pelota speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initializar sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blittear todo en la pantalla screen.blit(background, (0, 0)) pygame.display.flip() # Initializar reloj clock = pygame.time.Clock() # Bucle de eventos while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main() Además de mostrar el producto final, señalaré de vuelta a TomPong, en el cual se basa todo esto. Descargalo, échale un vistazo al código fuente y verás una implementación de pong utilizando todo el código que has visto en este tutorial, así como también un montón de otros códigos que he agregado en varias versiones, como física adicional para girar y varias otras correcciones de errores y fallas. Ah, TomPong se encuentra en http://www.tomchance.uklinux.net/projects/pong.shtml. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0221257 pygame-2.6.1/docs/generated/es/_static/0000755000175100001770000000000014676242436017350 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612170.005142 pygame-2.6.1/docs/generated/es/_static/base-stemmer.js0000644000175100001770000001770514676242412022276 0ustar00runnerdocker/**@constructor*/ BaseStemmer = function() { this.setCurrent = function(value) { this.current = value; this.cursor = 0; this.limit = this.current.length; this.limit_backward = 0; this.bra = this.cursor; this.ket = this.limit; }; this.getCurrent = function() { return this.current; }; this.copy_from = function(other) { this.current = other.current; this.cursor = other.cursor; this.limit = other.limit; this.limit_backward = other.limit_backward; this.bra = other.bra; this.ket = other.ket; }; this.in_grouping = function(s, min, max) { if (this.cursor >= this.limit) return false; var ch = this.current.charCodeAt(this.cursor); if (ch > max || ch < min) return false; ch -= min; if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; this.cursor++; return true; }; this.in_grouping_b = function(s, min, max) { if (this.cursor <= this.limit_backward) return false; var ch = this.current.charCodeAt(this.cursor - 1); if (ch > max || ch < min) return false; ch -= min; if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; this.cursor--; return true; }; this.out_grouping = function(s, min, max) { if (this.cursor >= this.limit) return false; var ch = this.current.charCodeAt(this.cursor); if (ch > max || ch < min) { this.cursor++; return true; } ch -= min; if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) { this.cursor++; return true; } return false; }; this.out_grouping_b = function(s, min, max) { if (this.cursor <= this.limit_backward) return false; var ch = this.current.charCodeAt(this.cursor - 1); if (ch > max || ch < min) { this.cursor--; return true; } ch -= min; if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) { this.cursor--; return true; } return false; }; this.eq_s = function(s) { if (this.limit - this.cursor < s.length) return false; if (this.current.slice(this.cursor, this.cursor + s.length) != s) { return false; } this.cursor += s.length; return true; }; this.eq_s_b = function(s) { if (this.cursor - this.limit_backward < s.length) return false; if (this.current.slice(this.cursor - s.length, this.cursor) != s) { return false; } this.cursor -= s.length; return true; }; /** @return {number} */ this.find_among = function(v) { var i = 0; var j = v.length; var c = this.cursor; var l = this.limit; var common_i = 0; var common_j = 0; var first_key_inspected = false; while (true) { var k = i + ((j - i) >>> 1); var diff = 0; var common = common_i < common_j ? common_i : common_j; // smaller // w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional) var w = v[k]; var i2; for (i2 = common; i2 < w[0].length; i2++) { if (c + common == l) { diff = -1; break; } diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2); if (diff != 0) break; common++; } if (diff < 0) { j = k; common_j = common; } else { i = k; common_i = common; } if (j - i <= 1) { if (i > 0) break; // v->s has been inspected if (j == i) break; // only one item in v // - but now we need to go round once more to get // v->s inspected. This looks messy, but is actually // the optimal approach. if (first_key_inspected) break; first_key_inspected = true; } } do { var w = v[i]; if (common_i >= w[0].length) { this.cursor = c + w[0].length; if (w.length < 4) return w[2]; var res = w[3](this); this.cursor = c + w[0].length; if (res) return w[2]; } i = w[1]; } while (i >= 0); return 0; }; // find_among_b is for backwards processing. Same comments apply this.find_among_b = function(v) { var i = 0; var j = v.length var c = this.cursor; var lb = this.limit_backward; var common_i = 0; var common_j = 0; var first_key_inspected = false; while (true) { var k = i + ((j - i) >> 1); var diff = 0; var common = common_i < common_j ? common_i : common_j; var w = v[k]; var i2; for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) { if (c - common == lb) { diff = -1; break; } diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2); if (diff != 0) break; common++; } if (diff < 0) { j = k; common_j = common; } else { i = k; common_i = common; } if (j - i <= 1) { if (i > 0) break; if (j == i) break; if (first_key_inspected) break; first_key_inspected = true; } } do { var w = v[i]; if (common_i >= w[0].length) { this.cursor = c - w[0].length; if (w.length < 4) return w[2]; var res = w[3](this); this.cursor = c - w[0].length; if (res) return w[2]; } i = w[1]; } while (i >= 0); return 0; }; /* to replace chars between c_bra and c_ket in this.current by the * chars in s. */ this.replace_s = function(c_bra, c_ket, s) { var adjustment = s.length - (c_ket - c_bra); this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); this.limit += adjustment; if (this.cursor >= c_ket) this.cursor += adjustment; else if (this.cursor > c_bra) this.cursor = c_bra; return adjustment; }; this.slice_check = function() { if (this.bra < 0 || this.bra > this.ket || this.ket > this.limit || this.limit > this.current.length) { return false; } return true; }; this.slice_from = function(s) { var result = false; if (this.slice_check()) { this.replace_s(this.bra, this.ket, s); result = true; } return result; }; this.slice_del = function() { return this.slice_from(""); }; this.insert = function(c_bra, c_ket, s) { var adjustment = this.replace_s(c_bra, c_ket, s); if (c_bra <= this.bra) this.bra += adjustment; if (c_bra <= this.ket) this.ket += adjustment; }; this.slice_to = function() { var result = ''; if (this.slice_check()) { result = this.current.slice(this.bra, this.ket); } return result; }; this.assign_to = function() { return this.current.slice(0, this.limit); }; }; ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.4131317 pygame-2.6.1/docs/generated/es/_static/basic.css0000644000175100001770000003536614676242430021152 0ustar00runnerdocker/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } div.section::after { display: block; content: ''; clear: left; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; word-wrap: break-word; overflow-wrap : break-word; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox form.search { overflow: hidden; } div.sphinxsidebar #searchbox input[type="text"] { float: left; width: 80%; padding: 0.25em; box-sizing: border-box; } div.sphinxsidebar #searchbox input[type="submit"] { float: left; width: 20%; border-left: none; padding: 0.25em; box-sizing: border-box; } img { border: 0; max-width: 100%; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li p.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; margin-left: auto; margin-right: auto; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- general body styles --------------------------------------------------- */ div.body { min-width: 360px; max-width: 800px; } div.body p, div.body dd, div.body li, div.body blockquote { -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } a.headerlink { visibility: hidden; } a:visited { color: #551A8B; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, figure.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, figure.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, figure.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } img.align-default, figure.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-default { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar, aside.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px; background-color: #ffe; width: 40%; float: right; clear: right; overflow-x: auto; } p.sidebar-title { font-weight: bold; } nav.contents, aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ nav.contents, aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- content of sidebars/topics/admonitions -------------------------------- */ div.sidebar > :last-child, aside.sidebar > :last-child, nav.contents > :last-child, aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } div.sidebar::after, aside.sidebar::after, nav.contents::after, aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { display: block; content: ''; clear: both; } /* -- tables ---------------------------------------------------------------- */ table.docutils { margin-top: 10px; margin-bottom: 10px; border: 0; border-collapse: collapse; } table.align-center { margin-left: auto; margin-right: auto; } table.align-default { margin-left: auto; margin-right: auto; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } th > :first-child, td > :first-child { margin-top: 0px; } th > :last-child, td > :last-child { margin-bottom: 0px; } /* -- figures --------------------------------------------------------------- */ div.figure, figure { margin: 0.5em; padding: 0.5em; } div.figure p.caption, figcaption { padding: 0.3em; } div.figure p.caption span.caption-number, figcaption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text, figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ table.field-list td, table.field-list th { border: 0 !important; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .field-name { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } /* -- hlist styles ---------------------------------------------------------- */ table.hlist { margin: 1em 0; } table.hlist td { vertical-align: top; } /* -- object description styles --------------------------------------------- */ .sig { font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; } .sig-name, code.descname { background-color: transparent; font-weight: bold; } .sig-name { font-size: 1.1em; } code.descname { font-size: 1.2em; } .sig-prename, code.descclassname { background-color: transparent; } .optional { font-size: 1.3em; } .sig-paren { font-size: larger; } .sig-param.n { font-style: italic; } /* C++ specific styling */ .sig-inline.c-texpr, .sig-inline.cpp-texpr { font-family: unset; } .sig.c .k, .sig.c .kt, .sig.cpp .k, .sig.cpp .kt { color: #0033B3; } .sig.c .m, .sig.cpp .m { color: #1750EB; } .sig.c .s, .sig.c .sc, .sig.cpp .s, .sig.cpp .sc { color: #067D17; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } :not(li) > ol > li:first-child > :first-child, :not(li) > ul > li:first-child > :first-child { margin-top: 0px; } :not(li) > ol > li:last-child > :last-child, :not(li) > ul > li:last-child > :last-child { margin-bottom: 0px; } ol.simple ol p, ol.simple ul p, ul.simple ol p, ul.simple ul p { margin-top: 0; } ol.simple > li:not(:first-child) > p, ul.simple > li:not(:first-child) > p { margin-top: 0; } ol.simple p, ul.simple p { margin-bottom: 0; } aside.footnote > span, div.citation > span { float: left; } aside.footnote > span:last-of-type, div.citation > span:last-of-type { padding-right: 0.5em; } aside.footnote > p { margin-left: 2em; } div.citation > p { margin-left: 4em; } aside.footnote > p:last-of-type, div.citation > p:last-of-type { margin-bottom: 0em; } aside.footnote > p:last-of-type:after, div.citation > p:last-of-type:after { content: ""; clear: both; } dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; } dl.field-list > dt { font-weight: bold; word-break: break-word; padding-left: 0.5em; padding-right: 5px; } dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; margin-left: 0em; margin-bottom: 0em; } dl { margin-bottom: 15px; } dd > :first-child { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } .sig dd { margin-top: 0px; margin-bottom: 0px; } .sig dl { margin-top: 0px; margin-bottom: 0px; } dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; } dt:target, span.highlighted { background-color: #fbe54e; } rect.highlighted { fill: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } .classifier:before { font-style: normal; margin: 0 0.5em; content: ":"; display: inline-block; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } .translated { background-color: rgba(207, 255, 207, 0.2) } .untranslated { background-color: rgba(255, 207, 207, 0.2) } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } pre, div[class*="highlight-"] { clear: both; } span.pre { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; white-space: nowrap; } div[class*="highlight-"] { margin: 1em 0; } td.linenos pre { border: 0; background-color: transparent; color: #aaa; } table.highlighttable { display: block; } table.highlighttable tbody { display: block; } table.highlighttable tr { display: flex; } table.highlighttable td { margin: 0; padding: 0; } table.highlighttable td.linenos { padding-right: 0.5em; } table.highlighttable td.code { flex: 1; overflow: hidden; } .highlight .hll { display: block; } div.highlight pre, table.highlighttable pre { margin: 0; } div.code-block-caption + div { margin-top: 0; } div.code-block-caption { margin-top: 1em; padding: 2px 5px; font-size: small; } div.code-block-caption code { background-color: transparent; } table.highlighttable td.linenos, span.linenos, div.highlight span.gp { /* gp: Generic.Prompt */ user-select: none; -webkit-user-select: text; /* Safari fallback only */ -webkit-user-select: none; /* Chrome/Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE10+ */ } div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.code-block-caption span.caption-text { } div.literal-block-wrapper { margin: 1em 0; } code.xref, a code { background-color: transparent; font-weight: bold; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } span.eqno a.headerlink { position: absolute; z-index: 1; } div.math:hover a.headerlink { visibility: visible; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0231419 pygame-2.6.1/docs/generated/es/_static/doctools.js0000644000175100001770000001057014676242412021531 0ustar00runnerdocker/* * doctools.js * ~~~~~~~~~~~ * * Base JavaScript utilities for all Sphinx HTML documentation. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ "use strict"; const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ "TEXTAREA", "INPUT", "SELECT", "BUTTON", ]); const _ready = (callback) => { if (document.readyState !== "loading") { callback(); } else { document.addEventListener("DOMContentLoaded", callback); } }; /** * Small JavaScript module for the documentation. */ const Documentation = { init: () => { Documentation.initDomainIndexTable(); Documentation.initOnKeyListeners(); }, /** * i18n support */ TRANSLATIONS: {}, PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), LOCALE: "unknown", // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext: (string) => { const translated = Documentation.TRANSLATIONS[string]; switch (typeof translated) { case "undefined": return string; // no translation case "string": return translated; // translation exists default: return translated[0]; // (singular, plural) translation tuple exists } }, ngettext: (singular, plural, n) => { const translated = Documentation.TRANSLATIONS[singular]; if (typeof translated !== "undefined") return translated[Documentation.PLURAL_EXPR(n)]; return n === 1 ? singular : plural; }, addTranslations: (catalog) => { Object.assign(Documentation.TRANSLATIONS, catalog.messages); Documentation.PLURAL_EXPR = new Function( "n", `return (${catalog.plural_expr})` ); Documentation.LOCALE = catalog.locale; }, /** * helper function to focus on search bar */ focusSearchBar: () => { document.querySelectorAll("input[name=q]")[0]?.focus(); }, /** * Initialise the domain index toggle buttons */ initDomainIndexTable: () => { const toggler = (el) => { const idNumber = el.id.substr(7); const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); if (el.src.substr(-9) === "minus.png") { el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; toggledRows.forEach((el) => (el.style.display = "none")); } else { el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; toggledRows.forEach((el) => (el.style.display = "")); } }; const togglerElements = document.querySelectorAll("img.toggler"); togglerElements.forEach((el) => el.addEventListener("click", (event) => toggler(event.currentTarget)) ); togglerElements.forEach((el) => (el.style.display = "")); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); }, initOnKeyListeners: () => { // only install a listener if it is really needed if ( !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS ) return; document.addEventListener("keydown", (event) => { // bail for input elements if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; // bail with special keys if (event.altKey || event.ctrlKey || event.metaKey) return; if (!event.shiftKey) { switch (event.key) { case "ArrowLeft": if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; const prevLink = document.querySelector('link[rel="prev"]'); if (prevLink && prevLink.href) { window.location.href = prevLink.href; event.preventDefault(); } break; case "ArrowRight": if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; const nextLink = document.querySelector('link[rel="next"]'); if (nextLink && nextLink.href) { window.location.href = nextLink.href; event.preventDefault(); } break; } } // some keyboard layouts may need Shift to get / switch (event.key) { case "/": if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; Documentation.focusSearchBar(); event.preventDefault(); } }); }, }; // quick alias for translations const _ = Documentation.gettext; _ready(Documentation.init); ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.4101317 pygame-2.6.1/docs/generated/es/_static/documentation_options.js0000644000175100001770000000051014676242430024320 0ustar00runnerdockerconst DOCUMENTATION_OPTIONS = { VERSION: '2.6.1', LANGUAGE: 'es', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, ENABLE_SEARCH_SHORTCUTS: true, };././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0231419 pygame-2.6.1/docs/generated/es/_static/file.png0000644000175100001770000000043614676242412020772 0ustar00runnerdockerPNG  IHDRaIDATxR){l ۶f=@ :3~箄rX$AX-D ~ lj(P%8<<9:: PO&$ l~X&EW^4wQ}^ͣ i0/H/@F)Dzq+j[SU5h/oY G&Lfs|{3%U+S`AFIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612184.407132 pygame-2.6.1/docs/generated/es/_static/language_data.js0000644000175100001770000004022414676242430022456 0ustar00runnerdocker/* * language_data.js * ~~~~~~~~~~~~~~~~ * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ var stopwords = ["a", "al", "algo", "algunas", "algunos", "ante", "antes", "como", "con", "contra", "cual", "cuando", "de", "del", "desde", "donde", "durante", "e", "el", "ella", "ellas", "ellos", "en", "entre", "era", "erais", "eran", "eras", "eres", "es", "esa", "esas", "ese", "eso", "esos", "esta", "estaba", "estabais", "estaban", "estabas", "estad", "estada", "estadas", "estado", "estados", "estamos", "estando", "estar", "estaremos", "estar\u00e1", "estar\u00e1n", "estar\u00e1s", "estar\u00e9", "estar\u00e9is", "estar\u00eda", "estar\u00edais", "estar\u00edamos", "estar\u00edan", "estar\u00edas", "estas", "este", "estemos", "esto", "estos", "estoy", "estuve", "estuviera", "estuvierais", "estuvieran", "estuvieras", "estuvieron", "estuviese", "estuvieseis", "estuviesen", "estuvieses", "estuvimos", "estuviste", "estuvisteis", "estuvi\u00e9ramos", "estuvi\u00e9semos", "estuvo", "est\u00e1", "est\u00e1bamos", "est\u00e1is", "est\u00e1n", "est\u00e1s", "est\u00e9", "est\u00e9is", "est\u00e9n", "est\u00e9s", "fue", "fuera", "fuerais", "fueran", "fueras", "fueron", "fuese", "fueseis", "fuesen", "fueses", "fui", "fuimos", "fuiste", "fuisteis", "fu\u00e9ramos", "fu\u00e9semos", "ha", "habida", "habidas", "habido", "habidos", "habiendo", "habremos", "habr\u00e1", "habr\u00e1n", "habr\u00e1s", "habr\u00e9", "habr\u00e9is", "habr\u00eda", "habr\u00edais", "habr\u00edamos", "habr\u00edan", "habr\u00edas", "hab\u00e9is", "hab\u00eda", "hab\u00edais", "hab\u00edamos", "hab\u00edan", "hab\u00edas", "han", "has", "hasta", "hay", "haya", "hayamos", "hayan", "hayas", "hay\u00e1is", "he", "hemos", "hube", "hubiera", "hubierais", "hubieran", "hubieras", "hubieron", "hubiese", "hubieseis", "hubiesen", "hubieses", "hubimos", "hubiste", "hubisteis", "hubi\u00e9ramos", "hubi\u00e9semos", "hubo", "la", "las", "le", "les", "lo", "los", "me", "mi", "mis", "mucho", "muchos", "muy", "m\u00e1s", "m\u00ed", "m\u00eda", "m\u00edas", "m\u00edo", "m\u00edos", "nada", "ni", "no", "nos", "nosotras", "nosotros", "nuestra", "nuestras", "nuestro", "nuestros", "o", "os", "otra", "otras", "otro", "otros", "para", "pero", "poco", "por", "porque", "que", "quien", "quienes", "qu\u00e9", "se", "sea", "seamos", "sean", "seas", "seremos", "ser\u00e1", "ser\u00e1n", "ser\u00e1s", "ser\u00e9", "ser\u00e9is", "ser\u00eda", "ser\u00edais", "ser\u00edamos", "ser\u00edan", "ser\u00edas", "se\u00e1is", "sido", "siendo", "sin", "sobre", "sois", "somos", "son", "soy", "su", "sus", "suya", "suyas", "suyo", "suyos", "s\u00ed", "tambi\u00e9n", "tanto", "te", "tendremos", "tendr\u00e1", "tendr\u00e1n", "tendr\u00e1s", "tendr\u00e9", "tendr\u00e9is", "tendr\u00eda", "tendr\u00edais", "tendr\u00edamos", "tendr\u00edan", "tendr\u00edas", "tened", "tenemos", "tenga", "tengamos", "tengan", "tengas", "tengo", "teng\u00e1is", "tenida", "tenidas", "tenido", "tenidos", "teniendo", "ten\u00e9is", "ten\u00eda", "ten\u00edais", "ten\u00edamos", "ten\u00edan", "ten\u00edas", "ti", "tiene", "tienen", "tienes", "todo", "todos", "tu", "tus", "tuve", "tuviera", "tuvierais", "tuvieran", "tuvieras", "tuvieron", "tuviese", "tuvieseis", "tuviesen", "tuvieses", "tuvimos", "tuviste", "tuvisteis", "tuvi\u00e9ramos", "tuvi\u00e9semos", "tuvo", "tuya", "tuyas", "tuyo", "tuyos", "t\u00fa", "un", "una", "uno", "unos", "vosotras", "vosotros", "vuestra", "vuestras", "vuestro", "vuestros", "y", "ya", "yo", "\u00e9l", "\u00e9ramos"]; /* Non-minified version is copied as a separate JS file, if available */ BaseStemmer=function(){this.setCurrent=function(r){this.current=r;this.cursor=0;this.limit=this.current.length;this.limit_backward=0;this.bra=this.cursor;this.ket=this.limit};this.getCurrent=function(){return this.current};this.copy_from=function(r){this.current=r.current;this.cursor=r.cursor;this.limit=r.limit;this.limit_backward=r.limit_backward;this.bra=r.bra;this.ket=r.ket};this.in_grouping=function(r,t,i){if(this.cursor>=this.limit)return false;var s=this.current.charCodeAt(this.cursor);if(s>i||s>>3]&1<<(s&7))==0)return false;this.cursor++;return true};this.in_grouping_b=function(r,t,i){if(this.cursor<=this.limit_backward)return false;var s=this.current.charCodeAt(this.cursor-1);if(s>i||s>>3]&1<<(s&7))==0)return false;this.cursor--;return true};this.out_grouping=function(r,t,i){if(this.cursor>=this.limit)return false;var s=this.current.charCodeAt(this.cursor);if(s>i||s>>3]&1<<(s&7))==0){this.cursor++;return true}return false};this.out_grouping_b=function(r,t,i){if(this.cursor<=this.limit_backward)return false;var s=this.current.charCodeAt(this.cursor-1);if(s>i||s>>3]&1<<(s&7))==0){this.cursor--;return true}return false};this.eq_s=function(r){if(this.limit-this.cursor>>1);var a=0;var f=h0)break;if(i==t)break;if(n)break;n=true}}do{var l=r[t];if(h>=l[0].length){this.cursor=s+l[0].length;if(l.length<4)return l[2];var v=l[3](this);this.cursor=s+l[0].length;if(v)return l[2]}t=l[1]}while(t>=0);return 0};this.find_among_b=function(r){var t=0;var i=r.length;var s=this.cursor;var e=this.limit_backward;var h=0;var u=0;var n=false;while(true){var c=t+(i-t>>1);var a=0;var f=h=0;o--){if(s-f==e){a=-1;break}a=this.current.charCodeAt(s-1-f)-l[0].charCodeAt(o);if(a!=0)break;f++}if(a<0){i=c;u=f}else{t=c;h=f}if(i-t<=1){if(t>0)break;if(i==t)break;if(n)break;n=true}}do{var l=r[t];if(h>=l[0].length){this.cursor=s-l[0].length;if(l.length<4)return l[2];var v=l[3](this);this.cursor=s-l[0].length;if(v)return l[2]}t=l[1]}while(t>=0);return 0};this.replace_s=function(r,t,i){var s=i.length-(t-r);this.current=this.current.slice(0,r)+i+this.current.slice(t);this.limit+=s;if(this.cursor>=t)this.cursor+=s;else if(this.cursor>r)this.cursor=r;return s};this.slice_check=function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>this.current.length){return false}return true};this.slice_from=function(r){var t=false;if(this.slice_check()){this.replace_s(this.bra,this.ket,r);t=true}return t};this.slice_del=function(){return this.slice_from("")};this.insert=function(r,t,i){var s=this.replace_s(r,t,i);if(r<=this.bra)this.bra+=s;if(r<=this.ket)this.ket+=s};this.slice_to=function(){var r="";if(this.slice_check()){r=this.current.slice(this.bra,this.ket)}return r};this.assign_to=function(){return this.current.slice(0,this.limit)}}; SpanishStemmer=function(){var r=new BaseStemmer;var e=[["",-1,6],["á",0,1],["é",0,2],["í",0,3],["ó",0,4],["ú",0,5]];var i=[["la",-1,-1],["sela",0,-1],["le",-1,-1],["me",-1,-1],["se",-1,-1],["lo",-1,-1],["selo",5,-1],["las",-1,-1],["selas",7,-1],["les",-1,-1],["los",-1,-1],["selos",10,-1],["nos",-1,-1]];var a=[["ando",-1,6],["iendo",-1,6],["yendo",-1,7],["ándo",-1,2],["iéndo",-1,1],["ar",-1,6],["er",-1,6],["ir",-1,6],["ár",-1,3],["ér",-1,4],["ír",-1,5]];var s=[["ic",-1,-1],["ad",-1,-1],["os",-1,-1],["iv",-1,1]];var u=[["able",-1,1],["ible",-1,1],["ante",-1,1]];var o=[["ic",-1,1],["abil",-1,1],["iv",-1,1]];var t=[["ica",-1,1],["ancia",-1,2],["encia",-1,5],["adora",-1,2],["osa",-1,1],["ista",-1,1],["iva",-1,9],["anza",-1,1],["logía",-1,3],["idad",-1,8],["able",-1,1],["ible",-1,1],["ante",-1,2],["mente",-1,7],["amente",13,6],["ación",-1,2],["ución",-1,4],["ico",-1,1],["ismo",-1,1],["oso",-1,1],["amiento",-1,1],["imiento",-1,1],["ivo",-1,9],["ador",-1,2],["icas",-1,1],["ancias",-1,2],["encias",-1,5],["adoras",-1,2],["osas",-1,1],["istas",-1,1],["ivas",-1,9],["anzas",-1,1],["logías",-1,3],["idades",-1,8],["ables",-1,1],["ibles",-1,1],["aciones",-1,2],["uciones",-1,4],["adores",-1,2],["antes",-1,2],["icos",-1,1],["ismos",-1,1],["osos",-1,1],["amientos",-1,1],["imientos",-1,1],["ivos",-1,9]];var c=[["ya",-1,1],["ye",-1,1],["yan",-1,1],["yen",-1,1],["yeron",-1,1],["yendo",-1,1],["yo",-1,1],["yas",-1,1],["yes",-1,1],["yais",-1,1],["yamos",-1,1],["yó",-1,1]];var l=[["aba",-1,2],["ada",-1,2],["ida",-1,2],["ara",-1,2],["iera",-1,2],["ía",-1,2],["aría",5,2],["ería",5,2],["iría",5,2],["ad",-1,2],["ed",-1,2],["id",-1,2],["ase",-1,2],["iese",-1,2],["aste",-1,2],["iste",-1,2],["an",-1,2],["aban",16,2],["aran",16,2],["ieran",16,2],["ían",16,2],["arían",20,2],["erían",20,2],["irían",20,2],["en",-1,1],["asen",24,2],["iesen",24,2],["aron",-1,2],["ieron",-1,2],["arán",-1,2],["erán",-1,2],["irán",-1,2],["ado",-1,2],["ido",-1,2],["ando",-1,2],["iendo",-1,2],["ar",-1,2],["er",-1,2],["ir",-1,2],["as",-1,2],["abas",39,2],["adas",39,2],["idas",39,2],["aras",39,2],["ieras",39,2],["ías",39,2],["arías",45,2],["erías",45,2],["irías",45,2],["es",-1,1],["ases",49,2],["ieses",49,2],["abais",-1,2],["arais",-1,2],["ierais",-1,2],["íais",-1,2],["aríais",55,2],["eríais",55,2],["iríais",55,2],["aseis",-1,2],["ieseis",-1,2],["asteis",-1,2],["isteis",-1,2],["áis",-1,2],["éis",-1,1],["aréis",64,2],["eréis",64,2],["iréis",64,2],["ados",-1,2],["idos",-1,2],["amos",-1,2],["ábamos",70,2],["áramos",70,2],["iéramos",70,2],["íamos",70,2],["aríamos",74,2],["eríamos",74,2],["iríamos",74,2],["emos",-1,1],["aremos",78,2],["eremos",78,2],["iremos",78,2],["ásemos",78,2],["iésemos",78,2],["imos",-1,2],["arás",-1,2],["erás",-1,2],["irás",-1,2],["ís",-1,2],["ará",-1,2],["erá",-1,2],["irá",-1,2],["aré",-1,2],["eré",-1,2],["iré",-1,2],["ió",-1,2]];var f=[["a",-1,1],["e",-1,2],["o",-1,1],["os",-1,1],["á",-1,1],["é",-1,2],["í",-1,1],["ó",-1,1]];var n=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,4,10];var b=0;var m=0;var k=0;function _(){k=r.limit;m=r.limit;b=r.limit;var e=r.cursor;r:{e:{var i=r.cursor;i:{if(!r.in_grouping(n,97,252)){break i}a:{var a=r.cursor;s:{if(!r.out_grouping(n,97,252)){break s}u:while(true){o:{if(!r.in_grouping(n,97,252)){break o}break u}if(r.cursor>=r.limit){break s}r.cursor++}break a}r.cursor=a;if(!r.in_grouping(n,97,252)){break i}s:while(true){u:{if(!r.out_grouping(n,97,252)){break u}break s}if(r.cursor>=r.limit){break i}r.cursor++}}break e}r.cursor=i;if(!r.out_grouping(n,97,252)){break r}i:{var s=r.cursor;a:{if(!r.out_grouping(n,97,252)){break a}s:while(true){u:{if(!r.in_grouping(n,97,252)){break u}break s}if(r.cursor>=r.limit){break a}r.cursor++}break i}r.cursor=s;if(!r.in_grouping(n,97,252)){break r}if(r.cursor>=r.limit){break r}r.cursor++}}k=r.cursor}r.cursor=e;var u=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}m=r.cursor;e:while(true){i:{if(!r.in_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}b=r.cursor}r.cursor=u;return true}function d(){var i;while(true){var a=r.cursor;r:{r.bra=r.cursor;i=r.find_among(e);if(i==0){break r}r.ket=r.cursor;switch(i){case 1:if(!r.slice_from("a")){return false}break;case 2:if(!r.slice_from("e")){return false}break;case 3:if(!r.slice_from("i")){return false}break;case 4:if(!r.slice_from("o")){return false}break;case 5:if(!r.slice_from("u")){return false}break;case 6:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=a;break}return true}function v(){if(!(k<=r.cursor)){return false}return true}function g(){if(!(m<=r.cursor)){return false}return true}function w(){if(!(b<=r.cursor)){return false}return true}function h(){var e;r.ket=r.cursor;if(r.find_among_b(i)==0){return false}r.bra=r.cursor;e=r.find_among_b(a);if(e==0){return false}if(!v()){return false}switch(e){case 1:r.bra=r.cursor;if(!r.slice_from("iendo")){return false}break;case 2:r.bra=r.cursor;if(!r.slice_from("ando")){return false}break;case 3:r.bra=r.cursor;if(!r.slice_from("ar")){return false}break;case 4:r.bra=r.cursor;if(!r.slice_from("er")){return false}break;case 5:r.bra=r.cursor;if(!r.slice_from("ir")){return false}break;case 6:if(!r.slice_del()){return false}break;case 7:if(!r.eq_s_b("u")){return false}if(!r.slice_del()){return false}break}return true}function p(){var e;r.ket=r.cursor;e=r.find_among_b(t);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!w()){return false}if(!r.slice_del()){return false}break;case 2:if(!w()){return false}if(!r.slice_del()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-i;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-i;break r}if(!r.slice_del()){return false}}break;case 3:if(!w()){return false}if(!r.slice_from("log")){return false}break;case 4:if(!w()){return false}if(!r.slice_from("u")){return false}break;case 5:if(!w()){return false}if(!r.slice_from("ente")){return false}break;case 6:if(!g()){return false}if(!r.slice_del()){return false}var a=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}switch(e){case 1:r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}break}}break;case 7:if(!w()){return false}if(!r.slice_del()){return false}var c=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(u)==0){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}}break;case 8:if(!w()){return false}if(!r.slice_del()){return false}var l=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(o)==0){r.cursor=r.limit-l;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-l;break r}if(!r.slice_del()){return false}}break;case 9:if(!w()){return false}if(!r.slice_del()){return false}var f=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-f;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-f;break r}if(!r.slice_del()){return false}}break}return true}function y(){if(r.cursor&6wrPo\kI~w[)/VoXn\Wh$}qk$ "uHg745#-)7/NVfQaqNN^n^AafqIqaEeieYiu;z 2:KP{[-M:--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R=kᵪ~WmDaǖI),)G`I=%$ ͖+,Rz mH $jؽbg:UK$a>yLP=4%:ӦdwԗiݏuR@>!ܾ G( _{y= }T {o<)&euU kC~g ']o:PBAw> DM05" T!Ri{4*@ sE3#5Doy%e{HW o!btWFh5c""L&U}՜,<T6adh:~~쿛"0M8BrD5fgV/cٺ؀ [z2ξ8XwAYq/d0g("6_D 5I/5[Py0$I~سB Y֨ŧ 0,(j;/I{f{O׃e`už_0ܩz;bWH+Qg)-o)}-T6@aK)Uq {yRL}FZ[⿋&(qݘ v ]2뵜; yR85Wfkӕ:r{D^$ȿ PK[(S`ab legacy_logos/pygame_logo.gifPK[(S1&X'' blegacy_logos/pygame_powered.gifPK[(Ss!'.( legacy_logos/pygame_small.gifPK[(S%ύ7m legacy_logos/pygame_tiny.gifPK,1././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/es/_static/minus.png0000644000175100001770000000013214676242412021177 0ustar00runnerdockerPNG  IHDR (!IDATxc8 g>@;(!&]f2nNIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/es/_static/plus.png0000644000175100001770000000013214676242412021027 0ustar00runnerdockerPNG  IHDR (!IDATxc8 g>@;([[U @l-!a@IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612184.4201317 pygame-2.6.1/docs/generated/es/_static/pygame.css0000644000175100001770000002733114676242430021344 0ustar00runnerdocker/** * Pygame stylesheet -- original theme * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @import url("reset.css"); @import url("tooltip.css"); @import url("basic.css"); /* -- index page ------------------------------------------------------------ */ #pygame-front-page h2 { margin-top: 2em; } #pygame-front-page dt { padding-top: 1em; } #pygame-front-page dl { padding-left: 1em; } /* -- tutorial page --------------------------------------------------------- */ div.body table.docinfo { font-size: 0.9em; margin-left: 3em; } div.body table.docinfo th { text-align: left; font-weight: bolder; } div.body table.docinfo td { padding-left: 1em; } div.body table.matrix th, div.body table.matrix td { border-right: 0.1em solid black; } div.body table.matrix th:last-child, div.body table.matrix td:last-child { border-right-style: none; } div.body table.matrix th { font-weight: bolder; } div.body table.matrix th.head { text-align: center; border-bottom: 0.2em double black; } div.body table.matrix td { text-align: center; } div.body table.matrix th.stub { text-align: left; } /* Let a float element be beside a code block */ div.highlight-python.notranslate { display: inline-block; } /* -- page layout ----------------------------------------------------------- */ body { font-family: sans-serif; color: #000000; font-style: normal; text-decoration: none; text-align: left; border-style: none; } div.header { padding: 0.5em; line-height: 1.2em; } div.header > div { border: 3px solid black; border-collapse: collapse; background-color: #6aee28; } div.header .logo { background-color: #c2fc20; padding: 0.3em; border-right: 3px solid black; display: flex; align-items: center; justify-content: center; flex-direction: column; } div.header .logo img { min-width: 200px; min-height: 60px; border-style: none; } div.header .pagelinks { padding: 0.3em; text-align: center; vertical-align: middle; flex-grow: 1; } div.header p.top { margin-top: 0; margin-bottom: 1em; } div.header p.bottom { margin-bottom: 0; text-align: left; } div.header .pagelinks a { text-decoration: underline; } div.header .pagelinks a:hover { text-decoration: none; } div.document { background-color: #aaeebb; } .flex-container { display: flex; flex-direction: row; } @media only screen and (max-width: 680px) { .flex-container { flex-direction: column; } div.header .logo { border-right: none; border-bottom: 3px solid black; } } /* on wide screens center text, and max width for readable area. */ @media only screen and (min-width: 680px) { div.documentwrapper { float: initial; width: 100%; max-width: 700px; margin: 0 auto; } } .toc td { display:block; width: min(200%, 100vw - 132px); } .toc td:last-child { padding-bottom: 20px; } table.toc td:nth-child(2) { display: none; } div.bodywrapper { margin: 0 0 0 230px; } div.body { min-width: auto; padding: 0.5em; } div.heading { padding: 0 0 0 0.5em; } div.footer { display: none; color: #000000; width: 100%; padding: 9px 0; text-align: center; font-size: 75%; } div.footer a { background-color: #11303d; color: #000000; text-decoration: underline; } div.related { background-color: #6aee28; line-height: 30px; color: #000000; border-top: 3px solid black; border-bottom: 3px solid black; } div.related a { color: #000000; } div.sphinxsidebar { } div.sphinxsidebar h3 { font-family: sans-serif; color: #ffffff; font-size: 1.4em; font-weight: normal; margin: 0; padding: 0; } div.sphinxsidebar h3 a { color: #ffffff; } div.sphinxsidebar h4 { font-family: sans-serif; color: #ffffff; font-size: 1.3em; font-weight: normal; margin: 5px 0 0 0; padding: 0; } div.sphinxsidebar p { color: #ffffff; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; padding: 0; color: #ffffff; } div.sphinxsidebar a { color: #98dbcc; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: #000000; background-color: transparent; text-decoration: underline; } a:hover { color: #000000; background-color: transparent; text-decoration: none; } p { margin: 0.5em 0; } strong { font-weight: bold; } em { font-style: italic; } dl.definition { padding-top: 0.7em; padding-bottom: 0.7em; } dt.title { font-family: monospace; } dt tt { font-weight: bold; font-size: 1.1em; } dt.module { margin-bottom: 1em; } table.toc { margin-left: 2em; margin-bottom: 0.5em; } table.toc td { border-style: none; padding-right: 10px; } span.summaryline { font-style: italic; } span.signature { font-family: monospace; margin-bottom: 0.5em; } span.pre { font-family: monospace; } code.download span.pre { font-family: inherit; font-weight: normal; } table.docutils td.toc { border-style: none; } div.body p, div.body dd, div.body li { text-align: left; line-height: 130%; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: sans-serif; font-weight: bold; margin: 1em 0 0.5em; text-align: left; } div.body h6 { font-weight: normal; font-style: italic; margin: 0; padding: 0; line-height: 130%; } div.body h1 { font-size: 1.5em; } div.body h2 { font-size: 1.4em; } div.body h3 { font-size: 1.3em; } div.body h4 { font-size: 1.2em; } div.body h5 { font-size: 1.1em; } div.body h6 { font-size: 1.0em; } a.headerlink { color: #68698b; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } a.headerlink:hover { background-color: #68698b; color: white; } blockquote { margin-left: 2em; } div.admonition p.admonition-title + p { display: inline; } div.admonition p, div.admonition pre, div.admonition ul, div.admonition ol { margin-bottom: 5px; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } dl.definition div.note, dl.definition div.seealso { background: none; border: none; } dl.definition div.admonition { margin-bottom: 0.5em; } dl.definition .admonition-title { font-weight: bold; } div.note { background-color: #eeeeee; border: 1px solid #ccc; } .note tt { background: #d6d6d6; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } div.caution { background-color: #eeffcc; border: 1px solid #aabb88; } div.warning { background-color: #ffe4e4; border: 1px solid #f66; } .warning tt { background: #efc2c2; } p.linklist { text-align: center; } .section:target > h2, .section:target > h3, .section:target > h4, dt:target, span.highlighted { background-color: #c7c695; } pre { background-color: #eeffcc; border: 1px solid #ac9; border-left: none; border-right: none; color: #333333; display: block; font-family: monospace; line-height: 120%; margin-bottom: 1em; padding: 5px 5px 5px 15px; text-align: justify; } div.highlight pre { border: none; } ul.simple { list-style-type: circle; margin-bottom: 1em; } code.descclassname, code.descname { font-size: 1.3em; font-weight: bold; } /* Top level section title format section tag has been introduced in docutils 0.17 as a replacement for div.section Both rule variations are kept to support old versions of docutils */ div.body > section > dl > dt.title, div.body > div.section > dl > dt.title { font-size: 120%; font-weight: bold; margin-bottom: 1em; } /* Visually separate an element from previous content in a section */ div.body .leading { margin-top: 0.5em; } /* Visually separate an element from following content in a section */ div.body .trailing { margin-bottom: 0.75em; } /* An element that spans the width of its section */ div.body div.fullwidth div, div.body div.fullwidth img { display: block; margin-left: auto; margin-right: auto; } div.body div.fullwidth p { text-align: center; } /* A two column table with link, description pairs. */ table.more-to-explore, table.more-to-explore th, table.more-to-explore td { border: 0.2em double black; border-collapse: collapse; background-color: inherit; } table.more-to-explore caption { text-align: left; font-size: larger; background-color: inherit; } table.more-to-explore th, table.more-to-explore td { padding: 0.2em 2em 0.3em 0.5em; } div.body p.small-heading { margin-bottom: 0.2em; font-size: small; } /* Inlined element float right */ div.body div.inlined, div.body img.inlined-right { float: right; margin: 1em 0; } div.body .inset { margin-left: 2em; } /* Code line reference text style */ div.body span.codelineref { text-decoration: underline; } /* Highlight Code types and functions. */ .py-class .pre, .reference.internal em { font-weight: bold; background-color: #90ee90; } span.linenos { margin-right: 15px; } /* Examples section: contains one or more example subsections */ div.examples > div.example { clear: both; margin-top: 0.2em; border: 0.1em solid teal; padding: 0.2em; } div.example img { float: left; padding-right: 0.3em; padding-bottom: 0.1em; } div.example p, div.example pre { margin-top: 0; margin-bottom: 0.4em; } div.example div.break { clear: both; height: 0; } /* -- tooltip style --------------------------------------------------------- */ a.tooltip { text-decoration: underline; } a.tooltip:hover { text-decoration: none; } .tooltip-content { width: 250px; background-color: #c2fc20; border: 1px solid #ace01C; padding: 3px; border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); } /* -- comments style --------------------------------------------------------- */ form.addcomment { display:inline; } .addcomment input, a.commentButton { background-color: #6aee28; border: 1px solid #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; padding: 6px; margin-right: 4px; } article.commentsArticle { background: none repeat scroll 0 0 #FEF790; border: 1px solid black; margin-bottom: 12px; margin-top: 12px; padding: 4px; } article.hidden { display:none; } header.commentHeading { background: none repeat scroll 0 0 #FDE42D; text-align: center; } pre.commentContent { overflow: auto; max-width: 800px; margin-left:0; border: 0; white-space: pre-wrap; } /* -- logos page ---------------------------------------------------------------- */ .fullwidth .line-block { text-align: center; } /* -- responsive design --------------------------------------------------------- */ @media only screen and (max-width: 680px) { /* Make tables be responsive-ish. */ table, thead, tbody, th, td, tr { display: block; } div.body img.inlined-right { float: none; display: block; margin: auto } span.linenos { margin-right: 10px; } .addcomment input, a.commentButton { font-size: 10px; } pre { white-space: pre-wrap; word-wrap: break-word; } .toc td { width: 100%; } }././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/generated/es/_static/pygame.ico0000644000175100001770000000206614676242340021324 0ustar00runnerdocker &(( @33333;033333333;38xww8wwwwwxwwpwpwwxwwwxx;3xp30;0;03;3;;33;;33x338p0?px;0;?;0;?;??3󻳳; 8x;03;30?(  wp   0 0 ;  c././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/es/_static/pygame_lofi.png0000644000175100001770000040614214676242340022352 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace -N''IDATx^|Wg+NX  hNK݅-P!Hq;ş? -ݙ{=5FNTn**rUXǶWj*$Q I*W[ErXB/L>5UܠBV x dT\b YAT%d """""""""jRTܥb}V,гkPѫ=еa@~YvyByƺMEwu!]S=F{T|5(RA1@DDDDDDDDD԰ȸ*S(J .a@VTH%jd """""""""jfxAES S6 3NDwnݞL7]_HǢL8|+5+L2/F-zOcqYW  Gd|'6u$p Jdyȑ<0@DDDDDDDDDTdi*N{ʤ1v8C0VEdl{YGBCV7*TK|&P%*_Rd """""""""ҟQsx684xJ#"ίHJJ:ğq5,"Tnm7dSq)*ڨ pXA?VL2վa*?Svn%.a <%\ɲcůᓯɗXP3 {{/Q9$aO:lU6-.ǫBEo97@N.f ;!.Naf8Џ{Qٹde{'Ӎm;Jے|,]Uk3]]&aTHAoVѠ0@DDDDDDDDDTT,VAv&D(R߂ٝለmCJA돿R} ﯰ0 Sg% 9aN =8x &GտhgTE;9PQa2>GB8\p:1{[t eVo(ƯKsϾEvn*Ukd """""""""=v8Rv:sOV$}$RtT-,gww"'w2aW^iii믿t p8$8BGݒZqEdCWqZ -.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ton&d?"#>%B}1@\vvD<'I $C?|DZۄ$CA0`A5챐jw#|>{]I2D x3\p}}DK4i:B "9DFXN)8R !8a$qOnɲ"$n{I_7jƂ[󆛜s _H&rƁ.ɥX x#K88>gR"pI1o` uOAmMYϗCH*'vpOEc 51Л"m2 rK>m8rHs#I?kVn&FrIs5\Zf$ju:L"mJv&_ГsAI8l򆾁;7[BT~AlpeC/<7!yd!x6]ONdOIv.p g {oX:d0[ z#pb'. aG6tbIDAT*xƤ`¾q ?FƦrӯIxh~$B𚱂5Ka)#\FD쁛Er ;<4^um56vxtaw d96ÆHI2D"0Gr8g7<7^v6 xe%SG<hR_4; Gsa6m]b5׶VVch[T[UN2;Đ< H:9fr`y:mK3۳wbv,"$n\xw8B˼SeI  a k@~2&am%3.cR \e0I fk+)$F)I['BjQ9lHz9 ׹M&HqNCl$[/βa: u/$ܫk5Կ{$bu,$\eI86N"=¼v8~VEそ Ik+Kq'AAcetL p%cD܁I1V!lQ[|(6r}N6C;ա^A>gǵ:XX'؀ "H|~pk>s3\BթPo  BG"nRGptYxCiv K‡5nޑ0AlQ|nu8u@à5Bkg+G^ A ra|Jou$[eAAad R{]8,|>6ro;~?.Ӱjme5JD  {әu϶·b'D ^>m .  2d[$2gA*\i結  B{:sBpVUs&]njqn^eڊޞk#9AAAU&QvIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.976112 pygame-2.6.1/docs/generated/_images/pygame_powered.png0000644000175100001770000053730714676242340022445 0ustar00runnerdockerPNG  IHDRQ ^{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace DIDATx^xoa6eL6effffefff& fٖ3 4V=3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/_images/pygame_powered_lowres.png0000644000175100001770000053730714676242340024040 0ustar00runnerdockerPNG  IHDRe(4} pHYs.#.#x?vIIDATh[[h\EfIf5mMe[RPQЇ(X/Rԇo/mQJQTФ^bm^6p?;g̹593\& pαa~HW&v6}Kf󣌟o$Oa(py 1.WJc0qq+7 Zq_ÚB13!3f/'*4kƘr=q55*%ՇųYhXwI(.mԹnʵ}7ϗtb+\ۇٙ_1% U/a{0f.4mc/W>`<2ٍE޴C(Yzx3Q3yP2,,ٗM;sQydE[doqaC.@qV 8 d@N8]wu%n`8I9[1VYnˍgQλ|cטz «ǘKe;BMU~%2]xt>;4-=^L !#I(TGf7@Dud)1_B_O[0G.okO?gk%~Mag4Qv\EzDGkA=n,jh3!܌SǀwWCl?* %%4m P&k P"2Z eːu!ee |bhhJ)lQ١WԱ3P&M8GZXv;=$A\qy?3 89EpJ_ ebIP;/#>CGIY܄mh?!e}N-6?x[b]f &5AʾZm|kE^W<*)0^I|~|1-!H$2qKB/P\^lsȞ>8V>voO>%hji4=izFs^λ-uH骦Z=>6GD&]#%H2}>cc6 sCUxGTsCdUJfN6!NLŘ|`ݵQo.p)T(bi2y`@p;%/**;v9lNIxZu`@"ghʨa*щAqJ2+m /<¬Uve2+pdGʷVjT{TGT|q ?U {YAOSx3 qUl7t s{ܦ-7:n¯W3\g 8mT `+]/u iVRܔZe?p;>/:-үn'}O]sԲ_-~`Yob+ƹ\%Ҕ]ฦ>q@nLtʍ9åyp~G!T#r!*ӕe"X vg'v6l^N<,^o?^ϕ;**zW]GxS&wND(=5{(P!*ĕ(DDDDDDDDDD}~*^Voy^ clFđDO T]}RCN[ڀ*S?l*b*d^ٴ Ac*X]3=&QmT|!nN@T6fs].)?fۀ=Y=ڍ*.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Ѐ"q+D!,Pg@M$ G(p3>(zB@G&k$ 8EgeE Y>X!$eIY >^SAA  qL:MFcY8\9 庤FnpHAi@R=-cMbYd> YEPʲ (#F Kr$j"Vk55wˌyq?aIVJ^F,3*GAAPhCeY+2V(ib%oX>H4Ћ׎Հcz0"}eDsYiϠ$V3+﷊`FF3| EzdWdkOG  +V i,i Kþ-@Y}|ʋC4F@_$/YV/Y>hdBHRX@׮*g҃X"Z0OY@WjXz+\-g   ƒd  @ZX m@C$Іx.XF;ogv,:1S},dZ5PM|BD/ OJYVXA;X  pe#g,Apݠv踋F&)`ى#Ybh '3*HP&u Y VCg静62=3bG= =DeYpa }D eRNAAfƂc Ʊ3=Vc/ _(ݢwhcV%_u.fY5\+Xf~x3g208oF[S7e7u +wuˮa[,AAA*GMP.Rn8ǰd92e^Z@H ,T y8 pJYVzNðE2K @P8 6sP _a!M SYBB迃0u6O C5,8b 3݀U#7db1k ZG<` g7pQo| o( le7 "mg=pސ̰1T:pT8:lmAE!8'P9BDl oAO  a@D: ޑ0zA6:(wg 8UccT`I*)*0 #p9,8#-) g 9`(uA0;ʢmCv8:  v7wA!' Bx C@,41I>J 'D[!m^aFD,'ha(x~Ćco`;> e,kW 8Vf"],1 }/BYA,C "4 8[SMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?OMv.IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.977112 pygame-2.6.1/docs/generated/_images/pygame_tiny.png0000644000175100001770000003571614676242340021760 0ustar00runnerdockerPNG  IHDR<BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs.!.![NiTXtXML:com.adobe.xmp Pygame Logo Trace {A4IDATx^|TU>ܹ{!@BRHQTPQDֲ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H+,kڮr]F4G&RJiǩe]U}45@QN,O1(b0Af"XUrٗ ~qrqkWF+IbIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_images/surfarray_redimg.png0000644000175100001770000005562314676242340022777 0ustar00runnerdockerPNG  IHDR1 IDATxYeu;YY4,a  a U4m؇y0EPC [Ї;p `6t}g_߄ mL.{\ SS kcpKPAjX5X!C |}5eO=x':ϗaZ8m a<{܇ya 'kaٛaz0>܃=hA'`O`ϕ]EX.v`h`LX2kЇgY o4p0Czaz k.܀؆!w -_#A:copt]hЁp˻40 І6TKk 65P tX,–1t 5`ڰ<l;/CaV}6]lA 0Hzx9l6AFP0` Fp 6tafaa> -؀P 9Xu؁]B#ggMx_`JRI _+Z}8O`N Y؄_pqXKYN* Kp aaUAHf`O8 Pl .\gaV]x{І;pZkaC؆eXs48鋗:euPuڇ6܃L 29-mߝM栫fi;;Coс>-vy9UY8 ' \/i8 Կ65alD頋߁|>-7ǹQ,,,Ie8wྋw Ѕ>L; C~>.+p\Q`0 ЁPA_S#8=: gaaYSІ.,AG?8 dGa; pQA [:]U?yYz0_<۰2 Ü_Y]`-م]؃9Xc L똺]"[fJ\rQ+PX?tN5_2M\G,Qk2,úҳZ\)@4zvd1-W sjg!l> Z6` >A 9ٓ]5;`SagԠ+"%xLl;J"Pi 5}i?~5G߂/3\Ŷ3ʺ?xU"M9X؀'ҧz"M+0pL Pg9#Y%sU'$І%!<-x̪[0 ?ξTT58 `dfT¾)3.R #x 0vtI]n2a)%p~z['2B1K0/*kO%4R+ ^hdv"40 ;7n%3ZOQeUUa^oA8F񯴑w #&ߗVY]Q0oh( |L/ 8ڎ+[-X+Ua_kEI-@hzZ%|IR#0VkR-{yb w JrꉄQڞbi gDAmUYG䄡ÜήRp c؂.r?l4xX8-@ H/c9NС s ΫEUzt8#5yœoe6[&~JNT!X}1^c'w[i<5)Uk%PT9xI”smSQӰp'Y-X%e{pR\iFba-ZN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+JI{0lݐ~$ݑ~-}<.]vɗ)@=|Oc əT27[S7R@~ *Q)'925?%#W&ȕI}Ѡ3+hҶGB>%:s- iMAu] ֈTvcߴj!qp5RɘwEyNm3?$ %kgGLz~  {3=#8ND&1[3ޔ٤3'BV ĽGĩ'ۉtsJ٘H6fC4guLEdCP7#N0&h:v #H Kˤ1`ՌW՘(ҧ[€an{F6Na]h& &oNKω#" ~&>8>1H.[+$$ҧ..ia8^WC* /Ȁ1 $]!b=u2#M*0Cˁc}(MeJ[Jk`枈 ݟ` WQ0z #'ȇȲ/HWHRiD@5m*3}6]:W܂:Hոc%(4; {QjȔγ'qn/ h*vΚYmΤ=aJpOƿ#jc#9QH/.r@G-m+DU.mC rbs,sc 0C4);Gࢴ͂ g}[4B7CH!bLTpƅHu7qb&m}Nja,:ȯ+30De%iɬ.ԃS{s,S 8||G֜E0YymyǙv85A-3S} 2lRHgƋAX2r˷tf`p1y}Rfo黩 jV;lD(Ob&LF5^eMJҦ,pP LuvKCY*DxȭRWqG J0sA(@XjC|SLR &hGM1-0wKJJ; :*jfC-|O%-\@ͥ)d5=,ٺ:ib͚@1[:udT2[ ܫ3 FW +3sCg_n"?%#l7e^4*(lXY^w[of(N?''YM  *<%nIfԮ#rZcDU-k}?97Bm,jvOp\T|WxJN>irc3CMՈV?{eh 6(MnN\̧[ϸMƭ0E?} M ؠB-.`y7n2\냟Ncf&j^cnSS 9ZZom3a-}n6I7HQi:I/u{/;Nv O?UM׼5|=J5V[e^5jJZR˲\هyU7u ͡u\6WC,]X/7$ nhZʶUl,O[5˷[W+j/BU(?՟jRۓz0o־*svYkC8SuX!J{^(rLp)OH&'dIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_images/surfarray_rgbarray.png0000644000175100001770000014332114676242340023332 0ustar00runnerdockerPNG  IHDR1 IDATxDmq'VUkO ߍ}of7E)R$Ҕ(*Ca420 ۘ1 'H43EQ")s|+Uڿ]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ESmmׯ,4RLL""Q=%)JU3N6FqV>uX:kE$ϝh+,lBA@3:#j-}S53O>+-$]A0=N:c !c<Mۺkc= maĶT$CT $̔@4Dar Z˪6ַJ^m}x|.)H&8k2g2Ƕ%qeAâNK e9oY()s1t0(] RliQ;oU.ptrR#eX/?e!om0\Nab܈$Crb13g{5nwMэ˗7קÃhiU6 ?ͮᖰX@ P PHAHzse DEDjTq]lLJV+g= @J! "QB&I#3TB(cd$ILU{xW2ʠ"a!H`f$=<I )TI)Y#9*F0d,, GA%Rت$frJl9 , Uұ592J0 ܓPIDATw *KlR2Ƶ"J)bPz<ܚ! F4DmAё(:EJJ"Գ#7F#W ,%ީ *5pb 6I(+iM}0T @Xb,§X*}1LF su2PS7R{<@Ԯr"9 YB|O>C-ʥ}Jl*}OTh6J`!rI RJ&ҳ`IG#[y0 J_m) CaBÜn8:}{, "wN-mb=둫 si 8EпkFPTRZaNCUa Qxc%fmi9H ഺ9>i`'ϋE U )υxYVU^V)+;U@UHqyi8m&)+Sp* 0=CJ>m ~é{꫞ -YAJ;•|\]DXoQ:}y[/z'j }tОs*PZz$<^>Gjxi[\|~ST@>:_:mo^Oy&>}%s IlV"&a ݪ- mZJ`@oLh9fũSu^]UW> ݫO*kѳjID&Uԯ箾=əU@jxR@tDWc?'*(>Q9u=yE"XB* =u@+-yҢsӇs_SK>JΩV}a}f)WM-tzЧ ) 1 ]Y_?I珳+w¾̞qsT^Oku;ajgSJz\sNa3X"rۆ@?>;>xviu/qpz1itSQG@\qBrtyQX1j(@)d_4D۞y:g7r0|B1Ozj"|Jq^znl|g,i[sU8wau] zr ~k؟;ENKWΓ|N>U'[QB  (EE/םyVs?ad46ITI2=}תy%P]9ǫE!;}YgzpOOVKp[<ߜq]bΛ(^'G ]vׯYz MgM(#@ˆ&3CVO4OωZڻgC{G4})IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_images/surfarray_scaledown.png0000644000175100001770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K^3~ᑥG^ye& pXc?Up*ݚ؇>pHUwôO4ơ0_!c <`Af\'m[ѳVwͶ)O5᫊ ]I%|/RLj!ppa-$::nmdU;[nwͼV;cFb]bS !$!AB6#"b%0kou!jO%tέR}Gg[Ivw/}%+[o@!&pZ]6|C#Ljr-ԞlygrD\rFd(6~v:XXֻa{Pw9ayg{ONpy,siH[dZEdojz|v}Ϗ9'm!=8_`ўE-_ ^5Lr;vt|z6$Plma9??lh|U Eږb3A/,l0Z5:}|T^ŶUEqdRpXA[&eq״3sTuY}Y\{&G;ϯ|{8s0;_χiյvOڝP(L$秓9-liX \騸"nP*tιx=Y]1m>~OvFIlD-9&-Jn\!_pZ׏(vU2^_}Iң'6F@UOeL8CL~'\JEჟp5?[3Xύ9Tɀx4RuW3gW7az=rlA[w;s૬vQe^\+Ky4 ,ppZQ^'OWE ,[1`X8#fY g?&WS3?jpx|?$)?81ԐIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_images/surfarray_scaleup.png0000644000175100001770000020425714676242340023163 0ustar00runnerdockerPNG  IHDR IDATx%_,w7ڷ^9$CJ3̈cmKMAd`0 }2l2 [`dYZ<,J"3l&=76xodm !+Y7"n=<牚mwʯ*/~O |x*u^"hI eSX78Oq~1  S|?/Od~]d+Lޟcf' EQ *4 :ue,7l2I8:í{1;Yaq/%ۻx;='?ß{.·O,*$u(D2x0D2_"WD"WG5st{>bkwηpW[ܹo|_"7=A>_bg{ryQJ].e%n~:M~Ifko_w;?|o|۸8:j9E7pp7n '5^ rJG8:|~ygIGx'K?}d=}pɠPnnrtcbJMhMb0t:C3@5:xz 2CK%pcgz7mz( N2p*!a0a``{S<|{Xs Tp1=k뺮Ty~E巛F'I| oO~o]S4?Ɲ}$QxC]ȳH>hb,V{l^{ Y6h0F7a:{c4Mrx-c5ϑ߹hNq~6brBQՈ(8Ѳ]aϗW_wś{ OW{N0?)Q&Qa]@@Q)ѮFweX V9zQ{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&'1CfGMٴ0-ˋɽ-;TP\:nRׯ>j֛'­+l&'8MCt^_ռ]iΒ$qlp>f, )^{q:2)H9ǬQ*'fWu ɡs@L΍WD?܇dV!Ki@ ZօZFTF4QvH*[.jfd6CPZs=H j63B`HD`@AP8`7tIsUe_ 'nc p HH$M1KVQɪVս/%d:qb7[QmLr 9UsfD0LXR =rS]_t*l9!9Ou~WgӢ՝wP)ٹ(Ʒ71Wd6w!=9꺘ܯa}X}O?EsQPD0 28*"̞, GSq !hd'530 ɡ91fα#dfgvLHr7U$gBrγ#"TcH\M8ID "CLMsb%'&bi35UC P "&!PA\N8)vx( ǃ qNחQN=8 |7x J FSmD-:sk9&>D?waҍyQO9I0R: JH?A 3F# ; #D>H#AnCQ:V9I죵"Cp0ԍV[?:ϩ|쌝%lG{ć_7[aGF@Ot?l\!XQS`? D3!-ipF:~4gx;TzGvQ_##FR| '/Zvh4g{i4Ɏ|S蔓8w qruwn8IʿMC'/|uf<]W3W+.~z߇%'׿9M; (R@132WvѕG" p< >cgNL;]}<XzI8)-xhS8&a>Hz;gi\{zypq>GO}k[ز\!f#խ8múp\&p~W<m t4 @0nYIKUu4'Mu}p7XW-zeGAh&qɏyH=j>VOw; l72Mmzk=@9=xίxأo>YpOb#0x|vc2}L#[4ǙОc?O 6'wi>i-4pM@@/0\cIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_images/surfarray_striped.png0000644000175100001770000000061014676242340023164 0ustar00runnerdockerPNG  IHDRL\OIDATxԱ 1;1T8~7%*AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV a%+AX JV^* IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_images/surfarray_xfade.png0000644000175100001770000012155214676242340022612 0ustar00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_~l #஥a7c 3JEr.vQbG.ZɼP16}5wL$h 51Ei*q9Quqɋϟ%iH;b۷@EƬ3'V7n t:Aɼn$0iJ0qrn 8R=lnΦEAWbn kYOj'fn'BqD>]-0UY4?~聛@NsJBީ7U%irӷoCUܕaҢpm`اĝD.:PQcD-]tQͦRʥ޼{x tB' !؝⪐`caJȍ9< CI\ vafiG"97AraڔU<)v!v"T UTs 5rL"5w"]N8C`SQ8Mwn=qGn4}ƟG{ %\&U͹tm6(N>1k?7.-"lA(:ɍۥׄ#D֮- gE՝(q^~k ռANW倠7@G'{hvEe  V.\AV3LNӹygTJ 9FoB]o#C݅y3 [2OOn(bn 1T܄nS`qVaNPL0Hv*NuDnR!X3XM'5o9NdPtjfوMhst"p-v?Xw]ɚjAgi%gٍ_>C;a3+ Lm\@Ď50$[h:|Jx̎ c1C=8mdk`^q˻klj5|ypeVAόbT> n5zf qwc#d]0IYff~Zl羟kASgެa3TtճY>c{~\2tQv5eΠiŎ4IDATlo]Imۖ<]qչ> |2 \ˇcWЫ*lɢٲLJaR<g+4PQ<K3O_vu-" go*]Ћ[̥ Ю̾ʵnǙ֐,Bu.(5Ee? ևe®:Xud`&gUeVmYOyaO~Pcz J&ujK dmve]|U_=BIgropS \2jY\ m9u[4:ԕv\ڿ6zq=Q.dbݪ,[kE׵MWg_Γ.N1&/yY/T<_훿٥^0y $.ۋpT,D>_k.^ ԮK=+|u}t^kzdrgKaI0oo ͷz5sR|uZ/迤/8//#|^K RE_YG`}\Īr\ts[d M:@VCiQ-Mz^]h̯MEWf]K"^*̪-/]ެ53'ߜK_)|k_8WF>l]xQz$k}lIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_images/tom_basic.png0000644000175100001770000001202314676242340021355 0ustar00runnerdockerPNG  IHDRS EIDATx]oluo+PƭC\G| *8E6A +F"A"j9PAPHFJ 4gD*A&nʁ`~(z?̛yglG5[>qS  ˂6)s{!J(#)r6G6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u?G6F' +lL|evB%=QiDI9q.c|ϻ0ҽo8n,jOA9?/&rimߋ5lIwef1[RCJ9b2Jg2]s[-o^L_lD)R\>f3γV$Lt"tK'EK[ Z;mwqQYɤm}?s2Spt֟wѷRġ bH̛)/-y sw! zYRȤ6Ҹꓒw ҕng,4wm(,W-,]jNN}¬XB(gsQY@J7w[nl pnt|=ɗ:N8rĹsD6חCQZBKN" V ;fB`!5-޻/=bB`AZ`4CXvaAt׎DьXGUUvz @׾iȆ ̞par=P1pɆ&: nkT*th%9 9T-He Y_:,³mmsKA3C|oGTȇtߗ偑a 38'kr>sx,r,*<:cp3=W#_J@K}tW,Nkyslĩ3|qsؽ3sq$/:$ɂ$Rj͚}V!Q鱵ilf;]X o@b;/{*+%祝yr^^Kce:Yjٖ=LtNH@io,c>ā4\3naRf}ޘ~eb+C4*,Q&k2ǥ*$'P `t!A6^ cLéл08*Uhq6'pFh@r,) COyC]bDJsupVSHqxf9UN~u|XUլu|Fڕ-:>XhkFx=.k 9FeWyB6uQPܾe˷$VM\ oN-f_kZHx_Eٽu"ˇkbcois#o]/?Sk1of[mR&پoy _4w&YNeMP|&5k!b~~~~~>7PfVzT jd-6nNזSe֨"d+V}~w6ٲ;nGVO{1#-_]/{jlk)\)ܤvWQts:y[x$nכ_O<u}k uUM9{L ?xags\:^.\)k[]{el!ш7O{J˶W3d=~4^˶l?#+_XYQ=x;>>6~}AVQ6QQ6Qz|%ֱZE}Z_kkm_kZZD=&VQz|Ekm_kDQ?MTe9J$$u&J~:j qQCв-a^*\2Q OIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_images/tom_event-flowchart.png0000644000175100001770000001263014676242340023410 0ustar00runnerdockerPNG  IHDR%vjsBIT|dtEXtTitleMade with Sodipodi/'tEXtAuthorUnknown! zTXtDescriptionxKT(L.)-J_~ ,IDATx{U}?7 yBx%@(ՀW"AHP("U ZQ,B,Dj @  A1Р<B1 3wf眙su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1ѧO1b_N999555566*))#sgDEERG+HHHǏ9BLgBCC줥}}}P^ %%E]]][[455qٳguрGڼx֭ۻw/yy ??B\`ee ̄ }F/x}ZTFFF^^LfEp<֋k׮;1tUU>odx(++SSS... !!A띜lcc#& f`RP___WW7dzii骪*<̗KeeDkkxK`0`0ff0~  Oa`0)L@3 F? sIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.995112 pygame-2.6.1/docs/generated/_images/tom_radians.png0000644000175100001770000004200114676242340021714 0ustar00runnerdockerPNG  IHDRB8:sBIT|dtEXtTitleMade with Sodipodi/'tEXtAuthorUnknown! zTXtDescriptionxKT(L.)-J_~ , IDATxw\UϤ@ PB HiAzQҥ"H&;"t 0i=?Ͻwgwfggܙ_ye3{wٽg>ss:`۹c_DDDDbQ"$d Ѣ)R"$"""K4zDD$WHR"$ͤ!%B"""ұI,I3YCDDDGĢ!n@m ͟zkM-0)ыHGҧr4R 0qmi:!A=hsHS"$%#H';++!ĀIׯ%4? YSxҳX3sJVv,$ ӒԱ x mHΰ)%K0"=UmOpP]rqpIKT3ڣIZ ܅'F/gEDͨX= 6"$>P\C!) x}Ù^^E݋7񄨔Mk"""p{OnӀ4wD T8{zp17hb >x-^#Cp$p=>=w_&LDDDǧwwX0J]@7qC?>lx,p ^t*p%ωH,ߍRP A~W"5 hޅ'֯k SDD >\ OY65f@ҸTe |w=EGDDD_'{t_`Oa9_&aFk$""">p yhLD貸l^p~ 0j"p80_EDDZfmNkQV]}O'BI 3ẫzZӌ3m)?||vbI&BGF˲]䷈]DD)_*WsDڏMJG[+n? -:O8X.Zt P `|ے9dDDD'@zcE|~+",:J'o -NDDDʦ}oi:1*)[d d4LDDOvdSC{\9kB4.b\"""5|@;w:%Bi[d뀥#%""+S~&J&mK^'T8ZDD$.0Pةx}[Lŀ;H_LBC#NFגn JDDZ /"wɑԗ)G:$ϋbcEc>EYCaEciWH'CWc%""7BwUF5P߀c%""q^VQg؍7cX]?\?B""I45Y5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ʯV]8fzc` ?4Hd &BoM|h+|6 3;M4QfnB!R6_']ӀDD$G5lJ*T>zPj"aeWJ8{ 3wDs,x_Jz; ,!Az|\6OʙHωxS% !*ϥ \DD:5 =)%0O`_), or reference the API documentation by module. Documents --------- `Readme`_ Basic information about pygame: what it is, who is involved, and where to find it. `Install`_ Steps needed to compile pygame on several platforms. Also help on finding and installing prebuilt binaries for your system. :doc:`filepaths` How pygame handles file system paths. :doc:`Pygame Logos ` The logos of Pygame in different resolutions. `LGPL License`_ This is the license pygame is distributed under. It provides for pygame to be distributed with open source and commercial software. Generally, if pygame is not changed, it can be used with any type of program. .. _tutorials-reference-label: Tutorials --------- :doc:`Introduction to Pygame ` An introduction to the basics of pygame. This is written for users of Python and appeared in volume two of the Py magazine. :doc:`Import and Initialize ` The beginning steps on importing and initializing pygame. The pygame package is made of several modules. Some modules are not included on all platforms. :doc:`How do I move an Image? ` A basic tutorial that covers the concepts behind 2D computer animation. Information about drawing and clearing objects to make them appear animated. :doc:`Chimp Tutorial, Line by Line ` The pygame examples include a simple program with an interactive fist and a chimpanzee. This was inspired by the annoying flash banner of the early 2000s. This tutorial examines every line of code used in the example. :doc:`Sprite Module Introduction ` Pygame includes a higher level sprite module to help organize games. The sprite module includes several classes that help manage details found in almost all games types. The Sprite classes are a bit more advanced than the regular pygame modules, and need more understanding to be properly used. :doc:`Surfarray Introduction ` Pygame used the NumPy python module to allow efficient per pixel effects on images. Using the surface arrays is an advanced feature that allows custom effects and filters. This also examines some of the simple effects from the pygame example, arraydemo.py. :doc:`Camera Module Introduction ` Pygame, as of 1.9, has a camera module that allows you to capture images, watch live streams, and do some basic computer vision. This tutorial covers those use cases. :doc:`Newbie Guide ` A list of thirteen helpful tips for people to get comfortable using pygame. :doc:`Making Games Tutorial ` A large tutorial that covers the bigger topics needed to create an entire game. :doc:`Display Modes ` Getting a display surface for the screen. :doc:`한국어 튜토리얼 (Korean Tutorial) ` 빨간블록 검은블록 Reference --------- :ref:`genindex` A list of all functions, classes, and methods in the pygame package. :doc:`ref/bufferproxy` An array protocol view of surface pixels :doc:`ref/color` Color representation. :doc:`ref/cursors` Loading and compiling cursor images. :doc:`ref/display` Configure the display surface. :doc:`ref/draw` Drawing simple shapes like lines and ellipses to surfaces. :doc:`ref/event` Manage the incoming events from various input devices and the windowing platform. :doc:`ref/examples` Various programs demonstrating the use of individual pygame modules. :doc:`ref/font` Loading and rendering TrueType fonts. :doc:`ref/freetype` Enhanced pygame module for loading and rendering font faces. :doc:`ref/gfxdraw` Anti-aliasing draw functions. :doc:`ref/image` Loading, saving, and transferring of surfaces. :doc:`ref/joystick` Manage the joystick devices. :doc:`ref/key` Manage the keyboard device. :doc:`ref/locals` Pygame constants. :doc:`ref/mixer` Load and play sounds :doc:`ref/mouse` Manage the mouse device and display. :doc:`ref/music` Play streaming music tracks. :doc:`ref/pygame` Top level functions to manage pygame. :doc:`ref/pixelarray` Manipulate image pixel data. :doc:`ref/rect` Flexible container for a rectangle. :doc:`ref/scrap` Native clipboard access. :doc:`ref/sndarray` Manipulate sound sample data. :doc:`ref/sprite` Higher level objects to represent game images. :doc:`ref/surface` Objects for images and the screen. :doc:`ref/surfarray` Manipulate image pixel data. :doc:`ref/tests` Test pygame. :doc:`ref/time` Manage timing and framerate. :doc:`ref/transform` Resize and move images. :doc:`pygame C API ` The C api shared amongst pygame extension modules. :ref:`search` Search pygame documents by keyword. .. _Readme: ../wiki/about .. _Install: ../wiki/GettingStarted#Pygame%20Installation .. _LGPL License: LGPL.txt ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_sources/logos.rst.txt0000644000175100001770000000247114676242340021626 0ustar00runnerdocker************************************************* Pygame Logos Page ************************************************* Pygame Logos ============ These logos are available for use in your own game projects. Please put them up wherever you see fit. The logo was created by TheCorruptor on July 29, 2001 and upscaled by Mega_JC on August 29, 2021. .. container:: fullwidth .. image:: _static/pygame_logo.png | `pygame_logo.svg <_static/pygame_logo.svg>`_ | `pygame_logo.png <_static/pygame_logo.png>`_ - 1561 x 438 .. image:: _static/pygame_lofi.png | `pygame_lofi.svg <_static/pygame_lofi.svg>`_ | `pygame_lofi.png <_static/pygame_lofi.png>`_ - 1561 x 438 .. image:: _static/pygame_powered.png | `pygame_powered.svg <_static/pygame_powered.svg>`_ | `pygame_powered.png <_static/pygame_powered.png>`_ - 1617 x 640 .. image:: _static/pygame_tiny.png | `pygame_tiny.png <_static/pygame_tiny.png>`_ - 214 x 60 .. image:: _static/pygame_powered_lowres.png | `pygame_powered_lowres.png <_static/pygame_powered_lowres.png>`_ - 101 x 40 There is a higher resolution layered photoshop image available `here `_. *(1.3 MB)* Legacy logos ------------ .. container:: fullwidth `legacy_logos.zip <_static/legacy_logos.zip>`_ - 50.1 KB././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0051258 pygame-2.6.1/docs/generated/_sources/ref/0000755000175100001770000000000014676242436017711 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_sources/ref/bufferproxy.rst.txt0000644000175100001770000001114414676242340023627 0ustar00runnerdocker.. include:: common.txt .. default-domain:: py :class:`pygame.BufferProxy` =========================== .. currentmodule:: pygame .. class:: BufferProxy | :sl:`pygame object to export a surface buffer through an array protocol` | :sg:`BufferProxy() -> BufferProxy` :class:`BufferProxy` is a pygame support type, designed as the return value of the :meth:`Surface.get_buffer` and :meth:`Surface.get_view` methods. For all Python versions a :class:`BufferProxy` object exports a C struct and Python level array interface on behalf of its parent object's buffer. A new buffer interface is also exported. In pygame, :class:`BufferProxy` is key to implementing the :mod:`pygame.surfarray` module. :class:`BufferProxy` instances can be created directly from Python code, either for a parent that exports an interface, or from a Python ``dict`` describing an object's buffer layout. The dict entries are based on the Python level array interface mapping. The following keys are recognized: ``"shape"`` : tuple The length of each array dimension as a tuple of integers. The length of the tuple is the number of dimensions in the array. ``"typestr"`` : string The array element type as a length 3 string. The first character gives byteorder, '<' for little-endian, '>' for big-endian, and '\|' for not applicable. The second character is the element type, 'i' for signed integer, 'u' for unsigned integer, 'f' for floating point, and 'V' for an chunk of bytes. The third character gives the bytesize of the element, from '1' to '9' bytes. So, for example, " Surface` | :sg:`parent -> ` The :class:`Surface` which returned the :class:`BufferProxy` object or the object passed to a :class:`BufferProxy` call. .. attribute:: length | :sl:`The size, in bytes, of the exported buffer.` | :sg:`length -> int` The number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the ``Py_buffer`` C struct ``len`` field. .. attribute:: raw | :sl:`A copy of the exported buffer as a single block of bytes.` | :sg:`raw -> bytes` The buffer data as a ``str``/``bytes`` object. Any gaps in the exported data are removed. .. method:: write | :sl:`Write raw bytes to object buffer.` | :sg:`write(buffer, offset=0)` Overwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument `buffer` is a ``str``/``bytes`` object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's :attr:`length` value, an ``IndexException`` is raised. If ``len(buffer) > proxy.length + offset``, a ``ValueError`` is raised. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_sources/ref/camera.rst.txt0000644000175100001770000002263414676242340022512 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.camera` ==================== .. module:: pygame.camera :synopsis: pygame module for camera use | :sl:`pygame module for camera use` .. note:: Use import pygame.camera before using this module. Pygame currently supports Linux (V4L2) and Windows (MSMF) cameras natively, with wider platform support available via an integrated OpenCV backend. .. versionadded:: 2.0.2 Windows native camera support .. versionadded:: 2.0.3 New OpenCV backends EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code will very likely break with the next pygame release. The Bayer to ``RGB`` function is based on: :: Sonix SN9C101 based webcam basic I/F routines Copyright (C) 2004 Takafumi Mizuno Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. New in pygame 1.9.0. .. function:: init | :sl:`Module init` | :sg:`init(backend = None) -> None` This function starts up the camera module, choosing the best webcam backend it can find for your system. This is not guaranteed to succeed, and may even attempt to import third party modules, like `OpenCV`. If you want to override its backend choice, you can call pass the name of the backend you want into this function. More about backends in :func:`get_backends()`. .. versionchanged:: 2.0.3 Option to explicitly select backend .. ## pygame.camera.init ## .. function:: get_backends | :sl:`Get the backends supported on this system` | :sg:`get_backends() -> [str]` This function returns every backend it thinks has a possibility of working on your system, in order of priority. pygame.camera Backends: :: Backend OS Description --------------------------------------------------------------------------------- _camera (MSMF) Windows Builtin, works on Windows 8+ Python3 _camera (V4L2) Linux Builtin OpenCV Any Uses `opencv-python` module, can't enumerate cameras OpenCV-Mac Mac Same as OpenCV, but has camera enumeration VideoCapture Windows Uses abandoned `VideoCapture` module, can't enumerate cameras, may be removed in the future There are two main differences among backends. The _camera backends are built in to pygame itself, and require no third party imports. All the other backends do. For the OpenCV and VideoCapture backends, those modules need to be installed on your system. The other big difference is "camera enumeration." Some backends don't have a way to list out camera names, or even the number of cameras on the system. In these cases, :func:`list_cameras()` will return something like ``[0]``. If you know you have multiple cameras on the system, these backend ports will pass through a "camera index number" through if you use that as the ``device`` parameter. .. versionadded:: 2.0.3 .. ## pygame.camera.get_backends ## .. function:: colorspace | :sl:`Surface colorspace conversion` | :sg:`colorspace(Surface, format, DestSurface = None) -> Surface` Allows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, ``transform.scale()`` it even smaller, and then convert the colorspace to ``YUV`` or ``HSV`` before doing any processing on it. .. ## pygame.camera.colorspace ## .. function:: list_cameras | :sl:`returns a list of available cameras` | :sg:`list_cameras() -> [cameras]` Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into :class:`pygame.camera.Camera`. If the camera backend doesn't support webcam enumeration, this will return something like ``[0]``. See :func:`get_backends()` for much more information. .. ## pygame.camera.list_cameras ## .. class:: Camera | :sl:`load a camera` | :sg:`Camera(device, (width, height), format) -> Camera` Loads a camera. On Linux, the device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is ``RGB``. The following are supported: * ``RGB`` - Red, Green, Blue * ``YUV`` - Luma, Blue Chrominance, Red Chrominance * ``HSV`` - Hue, Saturation, Value .. method:: start | :sl:`opens, initializes, and starts capturing` | :sg:`start() -> None` Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used. .. ## Camera.start ## .. method:: stop | :sl:`stops, uninitializes, and closes the camera` | :sg:`stop() -> None` Stops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again. .. ## Camera.stop ## .. method:: get_controls | :sl:`gets current values of user controls` | :sg:`get_controls() -> (hflip = bool, vflip = bool, brightness)` If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. .. ## Camera.get_controls ## .. method:: set_controls | :sl:`changes camera settings if supported by the camera` | :sg:`set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)` Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. On Windows, :code:`hflip` and :code:`vflip` are implemented by pygame, not by the Camera, so they should always work, but :code:`brightness` is unsupported. .. ## Camera.set_controls ## .. method:: get_size | :sl:`returns the dimensions of the images being recorded` | :sg:`get_size() -> (width, height)` Returns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size. .. ## Camera.get_size ## .. method:: query_image | :sl:`checks if a frame is ready` | :sg:`query_image() -> bool` If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like :func:`get_image()`. On Windows (MSMF), and the OpenCV backends, :func:`query_image()` should be reliable, though. This is useful to separate the framerate of the game from that of the camera without having to use threading. .. ## Camera.query_image ## .. method:: get_image | :sl:`captures an image as a Surface` | :sg:`get_image(Surface = None) -> Surface` Pulls an image off of the buffer as an ``RGB`` Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is 24 bits on Linux, 32 bits on Windows, or the same as the optionally supplied Surface. .. ## Camera.get_image ## .. method:: get_raw | :sl:`returns an unmodified image as bytes` | :sg:`get_raw() -> bytes` Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. This returns a bytes object .. ## Camera.get_raw ## .. ## pygame.camera.Camera ## .. ## pygame.camera ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_sources/ref/cdrom.rst.txt0000644000175100001770000002155414676242340022366 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.cdrom` =================== .. module:: pygame.cdrom :synopsis: pygame module for audio cdrom control | :sl:`pygame module for audio cdrom control` .. warning:: This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. One alternative for python cdrom functionality is `pycdio `_. The cdrom module manages the ``CD`` and ``DVD`` drives on a computer. It can also control the playback of audio CDs. This module needs to be initialized before it can do anything. Each ``CD`` object you create represents a cdrom drive and must also be initialized individually before it can do most things. .. function:: init | :sl:`initialize the cdrom module` | :sg:`init() -> None` Initialize the cdrom module. This will scan the system for all ``CD`` devices. The module must be initialized before any other functions will work. This automatically happens when you call ``pygame.init()``. It is safe to call this function more than once. .. ## pygame.cdrom.init ## .. function:: quit | :sl:`uninitialize the cdrom module` | :sg:`quit() -> None` Uninitialize the cdrom module. After you call this any existing ``CD`` objects will no longer work. It is safe to call this function more than once. .. ## pygame.cdrom.quit ## .. function:: get_init | :sl:`true if the cdrom module is initialized` | :sg:`get_init() -> bool` Test if the cdrom module is initialized or not. This is different than the ``CD.init()`` since each drive must also be initialized individually. .. ## pygame.cdrom.get_init ## .. function:: get_count | :sl:`number of cd drives on the system` | :sg:`get_count() -> count` Return the number of cd drives on the system. When you create ``CD`` objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system. .. ## pygame.cdrom.get_count ## .. class:: CD | :sl:`class to manage a cdrom drive` | :sg:`CD(id) -> CD` You can create a ``CD`` object for each cdrom on the system. Use ``pygame.cdrom.get_count()`` to determine how many drives actually exist. The id argument is an integer of the drive, starting at zero. The ``CD`` object is not initialized, you can only call ``CD.get_id()`` and ``CD.get_name()`` on an uninitialized drive. It is safe to create multiple ``CD`` objects for the same drive, they will all cooperate normally. .. method:: init | :sl:`initialize a cdrom drive for use` | :sg:`init() -> None` Initialize the cdrom drive for use. The drive must be initialized for most ``CD`` methods to work. Even if the rest of pygame has been initialized. There may be a brief pause while the drive is initialized. Avoid ``CD.init()`` if the program should not stop for a second or two. .. ## CD.init ## .. method:: quit | :sl:`uninitialize a cdrom drive for use` | :sg:`quit() -> None` Uninitialize a drive for use. Call this when your program will not be accessing the drive for awhile. .. ## CD.quit ## .. method:: get_init | :sl:`true if this cd device initialized` | :sg:`get_init() -> bool` Test if this ``CDROM`` device is initialized. This is different than the ``pygame.cdrom.init()`` since each drive must also be initialized individually. .. ## CD.get_init ## .. method:: play | :sl:`start playing audio` | :sg:`play(track, start=None, end=None) -> None` Playback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played. If you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc. See the ``CD.get_numtracks()`` and ``CD.get_track_audio()`` to find tracks to playback. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.play ## .. method:: stop | :sl:`stop audio playback` | :sg:`stop() -> None` Stops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio. .. ## CD.stop ## .. method:: pause | :sl:`temporarily stop audio playback` | :sg:`pause() -> None` Temporarily stop audio playback on the ``CD``. The playback can be resumed at the same point with the ``CD.resume()`` method. If the ``CD`` is not playing this method does nothing. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.pause ## .. method:: resume | :sl:`unpause audio playback` | :sg:`resume() -> None` Unpause a paused ``CD``. If the ``CD`` is not paused or already playing, this method does nothing. .. ## CD.resume ## .. method:: eject | :sl:`eject or open the cdrom drive` | :sg:`eject() -> None` This will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped. .. ## CD.eject ## .. method:: get_id | :sl:`the index of the cdrom drive` | :sg:`get_id() -> id` Returns the integer id that was used to create the ``CD`` instance. This method can work on an uninitialized ``CD``. .. ## CD.get_id ## .. method:: get_name | :sl:`the system name of the cdrom drive` | :sg:`get_name() -> name` Return the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized ``CD``. .. ## CD.get_name ## .. method:: get_busy | :sl:`true if the drive is playing audio` | :sg:`get_busy() -> bool` Returns True if the drive busy playing back audio. .. ## CD.get_busy ## .. method:: get_paused | :sl:`true if the drive is paused` | :sg:`get_paused() -> bool` Returns True if the drive is currently paused. .. ## CD.get_paused ## .. method:: get_current | :sl:`the current audio playback position` | :sg:`get_current() -> track, seconds` Returns both the current track and time of that track. This method works when the drive is either playing or paused. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_current ## .. method:: get_empty | :sl:`False if a cdrom is in the drive` | :sg:`get_empty() -> bool` Return False if there is a cdrom currently in the drive. If the drive is empty this will return True. .. ## CD.get_empty ## .. method:: get_numtracks | :sl:`the number of tracks on the cdrom` | :sg:`get_numtracks() -> count` Return the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks. .. ## CD.get_numtracks ## .. method:: get_track_audio | :sl:`true if the cdrom track has audio data` | :sg:`get_track_audio(track) -> bool` Determine if a track on a cdrom contains audio data. You can also call ``CD.num_tracks()`` and ``CD.get_all()`` to determine more information about the cdrom. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_audio ## .. method:: get_all | :sl:`get all track information` | :sg:`get_all() -> [(audio, start, end, length), ...]` Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc. .. ## CD.get_all ## .. method:: get_track_start | :sl:`start time of a cdrom track` | :sg:`get_track_start(track) -> seconds` Return the absolute time in seconds where at start of the cdrom track. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_start ## .. method:: get_track_length | :sl:`length of a cdrom track` | :sg:`get_track_length(track) -> seconds` Return a floating point value in seconds of the length of the cdrom track. Note, track 0 is the first track on the ``CD``. Track numbers start at zero. .. ## CD.get_track_length ## .. ## pygame.cdrom.CD ## .. ## pygame.cdrom ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_sources/ref/color.rst.txt0000644000175100001770000002505614676242340022401 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Color` =================== .. currentmodule:: pygame .. class:: Color | :sl:`pygame object for color representations` | :sg:`Color(r, g, b) -> Color` | :sg:`Color(r, g, b, a=255) -> Color` | :sg:`Color(color_value) -> Color` The ``Color`` class represents ``RGBA`` color values using a value range of 0 to 255 inclusive. It allows basic arithmetic operations — binary operations ``+``, ``-``, ``*``, ``//``, ``%``, and unary operation ``~`` — to create new colors, supports conversions to other color spaces such as ``HSV`` or ``HSL`` and lets you adjust single color channels. Alpha defaults to 255 (fully opaque) when not given. The arithmetic operations and ``correct_gamma()`` method preserve subclasses. For the binary operators, the class of the returned color is that of the left hand color object of the operator. Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers. There was a bug in pygame 1.8.1 where the default alpha was 0, not 255 like previously. Color objects export the C level array interface. The interface exports a read-only one dimensional unsigned byte array of the same assigned length as the color. The new buffer interface is also exported, with the same characteristics as the array interface. The floor division, ``//``, and modulus, ``%``, operators do not raise an exception for division by zero. Instead, if a color, or alpha, channel in the right hand color is 0, then the result is 0. For example: :: # These expressions are True Color(255, 255, 255, 255) // Color(0, 64, 64, 64) == Color(0, 3, 3, 3) Color(255, 255, 255, 255) % Color(64, 64, 64, 0) == Color(63, 63, 63, 0) Use ``int(color)`` to return the immutable integer value of the color, usable as a ``dict`` key. This integer value differs from the mapped pixel values of :meth:`pygame.Surface.get_at_mapped`, :meth:`pygame.Surface.map_rgb` and :meth:`pygame.Surface.unmap_rgb`. It can be passed as a ``color_value`` argument to :class:`Color` (useful with sets). See :doc:`color_list` for samples of the available named colors. :param int r: red value in the range of 0 to 255 inclusive :param int g: green value in the range of 0 to 255 inclusive :param int b: blue value in the range of 0 to 255 inclusive :param int a: (optional) alpha value in the range of 0 to 255 inclusive, default is 255 :param color_value: color value (see note below for the supported formats) .. note:: Supported ``color_value`` formats: | - **Color object:** clones the given :class:`Color` object | - **Color name: str:** name of the color to use, e.g. ``'red'`` (all the supported name strings can be found in the :doc:`color_list`, with sample swatches) | - **HTML color format str:** ``'#rrggbbaa'`` or ``'#rrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **hex number str:** ``'0xrrggbbaa'`` or ``'0xrrggbb'``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, the aa (alpha) value defaults to 0xFF if not provided | - **int:** int value of the color to use, using hex numbers can make this parameter more readable, e.g. ``0xrrggbbaa``, where rr, gg, bb, and aa are 2-digit hex numbers in the range of 0x00 to 0xFF inclusive, note that the aa (alpha) value is not optional for the int format and must be provided | - **tuple/list of int color values:** ``(R, G, B, A)`` or ``(R, G, B)``, where R, G, B, and A are int values in the range of 0 to 255 inclusive, the A (alpha) value defaults to 255 if not provided :type color_value: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) :returns: a newly created :class:`Color` object :rtype: Color .. versionchanged:: 2.0.0 Support for tuples, lists, and :class:`Color` objects when creating :class:`Color` objects. .. versionchanged:: 1.9.2 Color objects export the C level array interface. .. versionchanged:: 1.9.0 Color objects support 4-element tuples of integers. .. versionchanged:: 1.8.1 New implementation of the class. .. attribute:: r | :sl:`Gets or sets the red value of the Color.` | :sg:`r -> int` The red value of the Color. .. ## Color.r ## .. attribute:: g | :sl:`Gets or sets the green value of the Color.` | :sg:`g -> int` The green value of the Color. .. ## Color.g ## .. attribute:: b | :sl:`Gets or sets the blue value of the Color.` | :sg:`b -> int` The blue value of the Color. .. ## Color.b ## .. attribute:: a | :sl:`Gets or sets the alpha value of the Color.` | :sg:`a -> int` The alpha value of the Color. .. ## Color.a ## .. attribute:: cmy | :sl:`Gets or sets the CMY representation of the Color.` | :sg:`cmy -> tuple` The ``CMY`` representation of the Color. The ``CMY`` components are in the ranges ``C`` = [0, 1], ``M`` = [0, 1], ``Y`` = [0, 1]. Note that this will not return the absolutely exact ``CMY`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``CMY`` mapping from 0-1 rounding errors may cause the ``CMY`` values to differ slightly from what you might expect. .. ## Color.cmy ## .. attribute:: hsva | :sl:`Gets or sets the HSVA representation of the Color.` | :sg:`hsva -> tuple` The ``HSVA`` representation of the Color. The ``HSVA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``V`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSV`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSV`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSV`` values to differ slightly from what you might expect. .. ## Color.hsva ## .. attribute:: hsla | :sl:`Gets or sets the HSLA representation of the Color.` | :sg:`hsla -> tuple` The ``HSLA`` representation of the Color. The ``HSLA`` components are in the ranges ``H`` = [0, 360], ``S`` = [0, 100], ``L`` = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact ``HSL`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``HSL`` mapping from 0-100 and 0-360 rounding errors may cause the ``HSL`` values to differ slightly from what you might expect. .. ## Color.hsla ## .. attribute:: i1i2i3 | :sl:`Gets or sets the I1I2I3 representation of the Color.` | :sg:`i1i2i3 -> tuple` The ``I1I2I3`` representation of the Color. The ``I1I2I3`` components are in the ranges ``I1`` = [0, 1], ``I2`` = [-0.5, 0.5], ``I3`` = [-0.5, 0.5]. Note that this will not return the absolutely exact ``I1I2I3`` values for the set ``RGB`` values in all cases. Due to the ``RGB`` mapping from 0-255 and the ``I1I2I3`` mapping from 0-1 rounding errors may cause the ``I1I2I3`` values to differ slightly from what you might expect. .. ## Color.i1i2i3 ## .. method:: normalize | :sl:`Returns the normalized RGBA values of the Color.` | :sg:`normalize() -> tuple` Returns the normalized ``RGBA`` values of the Color as floating point values. .. ## Color.normalize ## .. method:: correct_gamma | :sl:`Applies a certain gamma value to the Color.` | :sg:`correct_gamma (gamma) -> Color` Applies a certain gamma value to the Color and returns a new Color with the adjusted ``RGBA`` values. .. ## Color.correct_gamma ## .. method:: set_length | :sl:`Set the number of elements in the Color to 1,2,3, or 4.` | :sg:`set_length(len) -> None` DEPRECATED: You may unpack the values you need like so, ``r, g, b, _ = pygame.Color(100, 100, 100)`` If you only want r, g and b Or ``r, g, *_ = pygame.Color(100, 100, 100)`` if you only want r and g The default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do ``len(acolor)``. .. deprecated:: 2.1.3 .. versionadded:: 1.9.0 .. ## Color.set_length ## .. method:: grayscale | :sl:`returns the grayscale of a Color` | :sg:`grayscale() -> Color` Returns a Color which represents the grayscaled version of self using the luminosity formula which weights red, green and blue according to their wavelengths.. .. ## Color.grayscale ## .. method:: lerp | :sl:`returns a linear interpolation to the given Color.` | :sg:`lerp(Color, float) -> Color` Returns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned. .. versionadded:: 2.0.1 .. ## Color.lerp ## .. method:: premul_alpha | :sl:`returns a Color where the r,g,b components have been multiplied by the alpha.` | :sg:`premul_alpha() -> Color` Returns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged. This is useful when working with the ``BLEND_PREMULTIPLIED`` blending mode flag for :meth:`pygame.Surface.blit()`, which assumes that all surfaces using it are using pre-multiplied alpha colors. .. versionadded:: 2.0.0 .. ## Color.premul_alpha ## .. method:: update | :sl:`Sets the elements of the color` | :sg:`update(r, g, b) -> None` | :sg:`update(r, g, b, a=255) -> None` | :sg:`update(color_value) -> None` Sets the elements of the color. See parameters for :meth:`pygame.Color` for the parameters of this function. If the alpha value was not set it will not change. .. versionadded:: 2.0.1 .. ## Color.update ## .. ## pygame.Color ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/color_list.rst.txt0000644000175100001770000027414114676242340023435 0ustar00runnerdocker.. include:: common.txt Named Colors ============ .. raw:: html :doc:`color` lets you specify any of these named colors when creating a new ``pygame.Color`` (taken from the `colordict module `_). .. role:: aliceblue .. role:: antiquewhite .. role:: antiquewhite1 .. role:: antiquewhite2 .. role:: antiquewhite3 .. role:: antiquewhite4 .. role:: aqua .. role:: aquamarine .. role:: aquamarine1 .. role:: aquamarine2 .. role:: aquamarine3 .. role:: aquamarine4 .. role:: azure .. role:: azure1 .. role:: azure2 .. role:: azure3 .. role:: azure4 .. role:: beige .. role:: bisque .. role:: bisque1 .. role:: bisque2 .. role:: bisque3 .. role:: bisque4 .. role:: black .. role:: blanchedalmond .. role:: blue .. role:: blue1 .. role:: blue2 .. role:: blue3 .. role:: blue4 .. role:: blueviolet .. role:: brown .. role:: brown1 .. role:: brown2 .. role:: brown3 .. role:: brown4 .. role:: burlywood .. role:: burlywood1 .. role:: burlywood2 .. role:: burlywood3 .. role:: burlywood4 .. role:: cadetblue .. role:: cadetblue1 .. role:: cadetblue2 .. role:: cadetblue3 .. role:: cadetblue4 .. role:: chartreuse .. role:: chartreuse1 .. role:: chartreuse2 .. role:: chartreuse3 .. role:: chartreuse4 .. role:: chocolate .. role:: chocolate1 .. role:: chocolate2 .. role:: chocolate3 .. role:: chocolate4 .. role:: coral .. role:: coral1 .. role:: coral2 .. role:: coral3 .. role:: coral4 .. role:: cornflowerblue .. role:: cornsilk .. role:: cornsilk1 .. role:: cornsilk2 .. role:: cornsilk3 .. role:: cornsilk4 .. role:: crimson .. role:: cyan .. role:: cyan1 .. role:: cyan2 .. role:: cyan3 .. role:: cyan4 .. role:: darkblue .. role:: darkcyan .. role:: darkgoldenrod .. role:: darkgoldenrod1 .. role:: darkgoldenrod2 .. role:: darkgoldenrod3 .. role:: darkgoldenrod4 .. role:: darkgray .. role:: darkgreen .. role:: darkgrey .. role:: darkkhaki .. role:: darkmagenta .. role:: darkolivegreen .. role:: darkolivegreen1 .. role:: darkolivegreen2 .. role:: darkolivegreen3 .. role:: darkolivegreen4 .. role:: darkorange .. role:: darkorange1 .. role:: darkorange2 .. role:: darkorange3 .. role:: darkorange4 .. role:: darkorchid .. role:: darkorchid1 .. role:: darkorchid2 .. role:: darkorchid3 .. role:: darkorchid4 .. role:: darkred .. role:: darksalmon .. role:: darkseagreen .. role:: darkseagreen1 .. role:: darkseagreen2 .. role:: darkseagreen3 .. role:: darkseagreen4 .. role:: darkslateblue .. role:: darkslategray .. role:: darkslategray1 .. role:: darkslategray2 .. role:: darkslategray3 .. role:: darkslategray4 .. role:: darkslategrey .. role:: darkturquoise .. role:: darkviolet .. role:: deeppink .. role:: deeppink1 .. role:: deeppink2 .. role:: deeppink3 .. role:: deeppink4 .. role:: deepskyblue .. role:: deepskyblue1 .. role:: deepskyblue2 .. role:: deepskyblue3 .. role:: deepskyblue4 .. role:: dimgray .. role:: dimgrey .. role:: dodgerblue .. role:: dodgerblue1 .. role:: dodgerblue2 .. role:: dodgerblue3 .. role:: dodgerblue4 .. role:: firebrick .. role:: firebrick1 .. role:: firebrick2 .. role:: firebrick3 .. role:: firebrick4 .. role:: floralwhite .. role:: forestgreen .. role:: fuchsia .. role:: gainsboro .. role:: ghostwhite .. role:: gold .. role:: gold1 .. role:: gold2 .. role:: gold3 .. role:: gold4 .. role:: goldenrod .. role:: goldenrod1 .. role:: goldenrod2 .. role:: goldenrod3 .. role:: goldenrod4 .. role:: gray .. role:: gray0 .. role:: gray1 .. role:: gray2 .. role:: gray3 .. role:: gray4 .. role:: gray5 .. role:: gray6 .. role:: gray7 .. role:: gray8 .. role:: gray9 .. role:: gray10 .. role:: gray11 .. role:: gray12 .. role:: gray13 .. role:: gray14 .. role:: gray15 .. role:: gray16 .. role:: gray17 .. role:: gray18 .. role:: gray19 .. role:: gray20 .. role:: gray21 .. role:: gray22 .. role:: gray23 .. role:: gray24 .. role:: gray25 .. role:: gray26 .. role:: gray27 .. role:: gray28 .. role:: gray29 .. role:: gray30 .. role:: gray31 .. role:: gray32 .. role:: gray33 .. role:: gray34 .. role:: gray35 .. role:: gray36 .. role:: gray37 .. role:: gray38 .. role:: gray39 .. role:: gray40 .. role:: gray41 .. role:: gray42 .. role:: gray43 .. role:: gray44 .. role:: gray45 .. role:: gray46 .. role:: gray47 .. role:: gray48 .. role:: gray49 .. role:: gray50 .. role:: gray51 .. role:: gray52 .. role:: gray53 .. role:: gray54 .. role:: gray55 .. role:: gray56 .. role:: gray57 .. role:: gray58 .. role:: gray59 .. role:: gray60 .. role:: gray61 .. role:: gray62 .. role:: gray63 .. role:: gray64 .. role:: gray65 .. role:: gray66 .. role:: gray67 .. role:: gray68 .. role:: gray69 .. role:: gray70 .. role:: gray71 .. role:: gray72 .. role:: gray73 .. role:: gray74 .. role:: gray75 .. role:: gray76 .. role:: gray77 .. role:: gray78 .. role:: gray79 .. role:: gray80 .. role:: gray81 .. role:: gray82 .. role:: gray83 .. role:: gray84 .. role:: gray85 .. role:: gray86 .. role:: gray87 .. role:: gray88 .. role:: gray89 .. role:: gray90 .. role:: gray91 .. role:: gray92 .. role:: gray93 .. role:: gray94 .. role:: gray95 .. role:: gray96 .. role:: gray97 .. role:: gray98 .. role:: gray99 .. role:: gray100 .. role:: green .. role:: green1 .. role:: green2 .. role:: green3 .. role:: green4 .. role:: greenyellow .. role:: grey .. role:: grey0 .. role:: grey1 .. role:: grey2 .. role:: grey3 .. role:: grey4 .. role:: grey5 .. role:: grey6 .. role:: grey7 .. role:: grey8 .. role:: grey9 .. role:: grey10 .. role:: grey11 .. role:: grey12 .. role:: grey13 .. role:: grey14 .. role:: grey15 .. role:: grey16 .. role:: grey17 .. role:: grey18 .. role:: grey19 .. role:: grey20 .. role:: grey21 .. role:: grey22 .. role:: grey23 .. role:: grey24 .. role:: grey25 .. role:: grey26 .. role:: grey27 .. role:: grey28 .. role:: grey29 .. role:: grey30 .. role:: grey31 .. role:: grey32 .. role:: grey33 .. role:: grey34 .. role:: grey35 .. role:: grey36 .. role:: grey37 .. role:: grey38 .. role:: grey39 .. role:: grey40 .. role:: grey41 .. role:: grey42 .. role:: grey43 .. role:: grey44 .. role:: grey45 .. role:: grey46 .. role:: grey47 .. role:: grey48 .. role:: grey49 .. role:: grey50 .. role:: grey51 .. role:: grey52 .. role:: grey53 .. role:: grey54 .. role:: grey55 .. role:: grey56 .. role:: grey57 .. role:: grey58 .. role:: grey59 .. role:: grey60 .. role:: grey61 .. role:: grey62 .. role:: grey63 .. role:: grey64 .. role:: grey65 .. role:: grey66 .. role:: grey67 .. role:: grey68 .. role:: grey69 .. role:: grey70 .. role:: grey71 .. role:: grey72 .. role:: grey73 .. role:: grey74 .. role:: grey75 .. role:: grey76 .. role:: grey77 .. role:: grey78 .. role:: grey79 .. role:: grey80 .. role:: grey81 .. role:: grey82 .. role:: grey83 .. role:: grey84 .. role:: grey85 .. role:: grey86 .. role:: grey87 .. role:: grey88 .. role:: grey89 .. role:: grey90 .. role:: grey91 .. role:: grey92 .. role:: grey93 .. role:: grey94 .. role:: grey95 .. role:: grey96 .. role:: grey97 .. role:: grey98 .. role:: grey99 .. role:: grey100 .. role:: honeydew .. role:: honeydew1 .. role:: honeydew2 .. role:: honeydew3 .. role:: honeydew4 .. role:: hotpink .. role:: hotpink1 .. role:: hotpink2 .. role:: hotpink3 .. role:: hotpink4 .. role:: indianred .. role:: indianred1 .. role:: indianred2 .. role:: indianred3 .. role:: indianred4 .. role:: indigo .. role:: ivory .. role:: ivory1 .. role:: ivory2 .. role:: ivory3 .. role:: ivory4 .. role:: khaki .. role:: khaki1 .. role:: khaki2 .. role:: khaki3 .. role:: khaki4 .. role:: lavender .. role:: lavenderblush .. role:: lavenderblush1 .. role:: lavenderblush2 .. role:: lavenderblush3 .. role:: lavenderblush4 .. role:: lawngreen .. role:: lemonchiffon .. role:: lemonchiffon1 .. role:: lemonchiffon2 .. role:: lemonchiffon3 .. role:: lemonchiffon4 .. role:: lightblue .. role:: lightblue1 .. role:: lightblue2 .. role:: lightblue3 .. role:: lightblue4 .. role:: lightcoral .. role:: lightcyan .. role:: lightcyan1 .. role:: lightcyan2 .. role:: lightcyan3 .. role:: lightcyan4 .. role:: lightgoldenrod .. role:: lightgoldenrod1 .. role:: lightgoldenrod2 .. role:: lightgoldenrod3 .. role:: lightgoldenrod4 .. role:: lightgoldenrodyellow .. role:: lightgray .. role:: lightgreen .. role:: lightgrey .. role:: lightpink .. role:: lightpink1 .. role:: lightpink2 .. role:: lightpink3 .. role:: lightpink4 .. role:: lightsalmon .. role:: lightsalmon1 .. role:: lightsalmon2 .. role:: lightsalmon3 .. role:: lightsalmon4 .. role:: lightseagreen .. role:: lightskyblue .. role:: lightskyblue1 .. role:: lightskyblue2 .. role:: lightskyblue3 .. role:: lightskyblue4 .. role:: lightslateblue .. role:: lightslategray .. role:: lightslategrey .. role:: lightsteelblue .. role:: lightsteelblue1 .. role:: lightsteelblue2 .. role:: lightsteelblue3 .. role:: lightsteelblue4 .. role:: lightyellow .. role:: lightyellow1 .. role:: lightyellow2 .. role:: lightyellow3 .. role:: lightyellow4 .. role:: limegreen .. role:: lime .. role:: linen .. role:: magenta .. role:: magenta1 .. role:: magenta2 .. role:: magenta3 .. role:: magenta4 .. role:: maroon .. role:: maroon1 .. role:: maroon2 .. role:: maroon3 .. role:: maroon4 .. role:: mediumaquamarine .. role:: mediumblue .. role:: mediumorchid .. role:: mediumorchid1 .. role:: mediumorchid2 .. role:: mediumorchid3 .. role:: mediumorchid4 .. role:: mediumpurple .. role:: mediumpurple1 .. role:: mediumpurple2 .. role:: mediumpurple3 .. role:: mediumpurple4 .. role:: mediumseagreen .. role:: mediumslateblue .. role:: mediumspringgreen .. role:: mediumturquoise .. role:: mediumvioletred .. role:: midnightblue .. role:: mintcream .. role:: mistyrose .. role:: mistyrose1 .. role:: mistyrose2 .. role:: mistyrose3 .. role:: mistyrose4 .. role:: moccasin .. role:: navajowhite .. role:: navajowhite1 .. role:: navajowhite2 .. role:: navajowhite3 .. role:: navajowhite4 .. role:: navy .. role:: navyblue .. role:: oldlace .. role:: olive .. role:: olivedrab .. role:: olivedrab1 .. role:: olivedrab2 .. role:: olivedrab3 .. role:: olivedrab4 .. role:: orange .. role:: orange1 .. role:: orange2 .. role:: orange3 .. role:: orange4 .. role:: orangered .. role:: orangered1 .. role:: orangered2 .. role:: orangered3 .. role:: orangered4 .. role:: orchid .. role:: orchid1 .. role:: orchid2 .. role:: orchid3 .. role:: orchid4 .. role:: palegoldenrod .. role:: palegreen .. role:: palegreen1 .. role:: palegreen2 .. role:: palegreen3 .. role:: palegreen4 .. role:: paleturquoise .. role:: paleturquoise1 .. role:: paleturquoise2 .. role:: paleturquoise3 .. role:: paleturquoise4 .. role:: palevioletred .. role:: palevioletred1 .. role:: palevioletred2 .. role:: palevioletred3 .. role:: palevioletred4 .. role:: papayawhip .. role:: peachpuff .. role:: peachpuff1 .. role:: peachpuff2 .. role:: peachpuff3 .. role:: peachpuff4 .. role:: peru .. role:: pink .. role:: pink1 .. role:: pink2 .. role:: pink3 .. role:: pink4 .. role:: plum .. role:: plum1 .. role:: plum2 .. role:: plum3 .. role:: plum4 .. role:: powderblue .. role:: purple .. role:: purple1 .. role:: purple2 .. role:: purple3 .. role:: purple4 .. role:: red .. role:: red1 .. role:: red2 .. role:: red3 .. role:: red4 .. role:: rosybrown .. role:: rosybrown1 .. role:: rosybrown2 .. role:: rosybrown3 .. role:: rosybrown4 .. role:: royalblue .. role:: royalblue1 .. role:: royalblue2 .. role:: royalblue3 .. role:: royalblue4 .. role:: saddlebrown .. role:: salmon .. role:: salmon1 .. role:: salmon2 .. role:: salmon3 .. role:: salmon4 .. role:: sandybrown .. role:: seagreen .. role:: seagreen1 .. role:: seagreen2 .. role:: seagreen3 .. role:: seagreen4 .. role:: seashell .. role:: seashell1 .. role:: seashell2 .. role:: seashell3 .. role:: seashell4 .. role:: sienna .. role:: sienna1 .. role:: sienna2 .. role:: sienna3 .. role:: sienna4 .. role:: silver .. role:: skyblue .. role:: skyblue1 .. role:: skyblue2 .. role:: skyblue3 .. role:: skyblue4 .. role:: slateblue .. role:: slateblue1 .. role:: slateblue2 .. role:: slateblue3 .. role:: slateblue4 .. role:: slategray .. role:: slategray1 .. role:: slategray2 .. role:: slategray3 .. role:: slategray4 .. role:: slategrey .. role:: snow .. role:: snow1 .. role:: snow2 .. role:: snow3 .. role:: snow4 .. role:: springgreen .. role:: springgreen1 .. role:: springgreen2 .. role:: springgreen3 .. role:: springgreen4 .. role:: steelblue .. role:: steelblue1 .. role:: steelblue2 .. role:: steelblue3 .. role:: steelblue4 .. role:: tan .. role:: tan1 .. role:: tan2 .. role:: tan3 .. role:: tan4 .. role:: teal .. role:: thistle .. role:: thistle1 .. role:: thistle2 .. role:: thistle3 .. role:: thistle4 .. role:: tomato .. role:: tomato1 .. role:: tomato2 .. role:: tomato3 .. role:: tomato4 .. role:: turquoise .. role:: turquoise1 .. role:: turquoise2 .. role:: turquoise3 .. role:: turquoise4 .. role:: violet .. role:: violetred .. role:: violetred1 .. role:: violetred2 .. role:: violetred3 .. role:: violetred4 .. role:: wheat .. role:: wheat1 .. role:: wheat2 .. role:: wheat3 .. role:: wheat4 .. role:: white .. role:: whitesmoke .. role:: yellow .. role:: yellow1 .. role:: yellow2 .. role:: yellow3 .. role:: yellow4 .. role:: yellowgreen ========================== ====================================================================================================== Name Color ========================== ====================================================================================================== ``aliceblue`` :aliceblue:`████████` ``antiquewhite`` :antiquewhite:`████████` ``antiquewhite1`` :antiquewhite1:`████████` ``antiquewhite2`` :antiquewhite2:`████████` ``antiquewhite3`` :antiquewhite3:`████████` ``antiquewhite4`` :antiquewhite4:`████████` ``aqua`` :aqua:`████████` ``aquamarine`` :aquamarine:`████████` ``aquamarine1`` :aquamarine1:`████████` ``aquamarine2`` :aquamarine2:`████████` ``aquamarine3`` :aquamarine3:`████████` ``aquamarine4`` :aquamarine4:`████████` ``azure`` :azure:`████████` ``azure1`` :azure1:`████████` ``azure2`` :azure2:`████████` ``azure3`` :azure3:`████████` ``azure4`` :azure4:`████████` ``beige`` :beige:`████████` ``bisque`` :bisque:`████████` ``bisque1`` :bisque1:`████████` ``bisque2`` :bisque2:`████████` ``bisque3`` :bisque3:`████████` ``bisque4`` :bisque4:`████████` ``black`` :black:`████████` ``blanchedalmond`` :blanchedalmond:`████████` ``blue`` :blue:`████████` ``blue1`` :blue1:`████████` ``blue2`` :blue2:`████████` ``blue3`` :blue3:`████████` ``blue4`` :blue4:`████████` ``blueviolet`` :blueviolet:`████████` ``brown`` :brown:`████████` ``brown1`` :brown1:`████████` ``brown2`` :brown2:`████████` ``brown3`` :brown3:`████████` ``brown4`` :brown4:`████████` ``burlywood`` :burlywood:`████████` ``burlywood1`` :burlywood1:`████████` ``burlywood2`` :burlywood2:`████████` ``burlywood3`` :burlywood3:`████████` ``burlywood4`` :burlywood4:`████████` ``cadetblue`` :cadetblue:`████████` ``cadetblue1`` :cadetblue1:`████████` ``cadetblue2`` :cadetblue2:`████████` ``cadetblue3`` :cadetblue3:`████████` ``cadetblue4`` :cadetblue4:`████████` ``chartreuse`` :chartreuse:`████████` ``chartreuse1`` :chartreuse1:`████████` ``chartreuse2`` :chartreuse2:`████████` ``chartreuse3`` :chartreuse3:`████████` ``chartreuse4`` :chartreuse4:`████████` ``chocolate`` :chocolate:`████████` ``chocolate1`` :chocolate1:`████████` ``chocolate2`` :chocolate2:`████████` ``chocolate3`` :chocolate3:`████████` ``chocolate4`` :chocolate4:`████████` ``coral`` :coral:`████████` ``coral1`` :coral1:`████████` ``coral2`` :coral2:`████████` ``coral3`` :coral3:`████████` ``coral4`` :coral4:`████████` ``cornflowerblue`` :cornflowerblue:`████████` ``cornsilk`` :cornsilk:`████████` ``cornsilk1`` :cornsilk1:`████████` ``cornsilk2`` :cornsilk2:`████████` ``cornsilk3`` :cornsilk3:`████████` ``cornsilk4`` :cornsilk4:`████████` ``crimson`` :crimson:`████████` ``cyan`` :cyan:`████████` ``cyan1`` :cyan1:`████████` ``cyan2`` :cyan2:`████████` ``cyan3`` :cyan3:`████████` ``cyan4`` :cyan4:`████████` ``darkblue`` :darkblue:`████████` ``darkcyan`` :darkcyan:`████████` ``darkgoldenrod`` :darkgoldenrod:`████████` ``darkgoldenrod1`` :darkgoldenrod1:`████████` ``darkgoldenrod2`` :darkgoldenrod2:`████████` ``darkgoldenrod3`` :darkgoldenrod3:`████████` ``darkgoldenrod4`` :darkgoldenrod4:`████████` ``darkgray`` :darkgray:`████████` ``darkgreen`` :darkgreen:`████████` ``darkgrey`` :darkgrey:`████████` ``darkkhaki`` :darkkhaki:`████████` ``darkmagenta`` :darkmagenta:`████████` ``darkolivegreen`` :darkolivegreen:`████████` ``darkolivegreen1`` :darkolivegreen1:`████████` ``darkolivegreen2`` :darkolivegreen2:`████████` ``darkolivegreen3`` :darkolivegreen3:`████████` ``darkolivegreen4`` :darkolivegreen4:`████████` ``darkorange`` :darkorange:`████████` ``darkorange1`` :darkorange1:`████████` ``darkorange2`` :darkorange2:`████████` ``darkorange3`` :darkorange3:`████████` ``darkorange4`` :darkorange4:`████████` ``darkorchid`` :darkorchid:`████████` ``darkorchid1`` :darkorchid1:`████████` ``darkorchid2`` :darkorchid2:`████████` ``darkorchid3`` :darkorchid3:`████████` ``darkorchid4`` :darkorchid4:`████████` ``darkred`` :darkred:`████████` ``darksalmon`` :darksalmon:`████████` ``darkseagreen`` :darkseagreen:`████████` ``darkseagreen1`` :darkseagreen1:`████████` ``darkseagreen2`` :darkseagreen2:`████████` ``darkseagreen3`` :darkseagreen3:`████████` ``darkseagreen4`` :darkseagreen4:`████████` ``darkslateblue`` :darkslateblue:`████████` ``darkslategray`` :darkslategray:`████████` ``darkslategray1`` :darkslategray1:`████████` ``darkslategray2`` :darkslategray2:`████████` ``darkslategray3`` :darkslategray3:`████████` ``darkslategray4`` :darkslategray4:`████████` ``darkslategrey`` :darkslategrey:`████████` ``darkturquoise`` :darkturquoise:`████████` ``darkviolet`` :darkviolet:`████████` ``deeppink`` :deeppink:`████████` ``deeppink1`` :deeppink1:`████████` ``deeppink2`` :deeppink2:`████████` ``deeppink3`` :deeppink3:`████████` ``deeppink4`` :deeppink4:`████████` ``deepskyblue`` :deepskyblue:`████████` ``deepskyblue1`` :deepskyblue1:`████████` ``deepskyblue2`` :deepskyblue2:`████████` ``deepskyblue3`` :deepskyblue3:`████████` ``deepskyblue4`` :deepskyblue4:`████████` ``dimgray`` :dimgray:`████████` ``dimgrey`` :dimgrey:`████████` ``dodgerblue`` :dodgerblue:`████████` ``dodgerblue1`` :dodgerblue1:`████████` ``dodgerblue2`` :dodgerblue2:`████████` ``dodgerblue3`` :dodgerblue3:`████████` ``dodgerblue4`` :dodgerblue4:`████████` ``firebrick`` :firebrick:`████████` ``firebrick1`` :firebrick1:`████████` ``firebrick2`` :firebrick2:`████████` ``firebrick3`` :firebrick3:`████████` ``firebrick4`` :firebrick4:`████████` ``floralwhite`` :floralwhite:`████████` ``forestgreen`` :forestgreen:`████████` ``fuchsia`` :fuchsia:`████████` ``gainsboro`` :gainsboro:`████████` ``ghostwhite`` :ghostwhite:`████████` ``gold`` :gold:`████████` ``gold1`` :gold1:`████████` ``gold2`` :gold2:`████████` ``gold3`` :gold3:`████████` ``gold4`` :gold4:`████████` ``goldenrod`` :goldenrod:`████████` ``goldenrod1`` :goldenrod1:`████████` ``goldenrod2`` :goldenrod2:`████████` ``goldenrod3`` :goldenrod3:`████████` ``goldenrod4`` :goldenrod4:`████████` ``gray`` :gray:`████████` ``gray0`` :gray0:`████████` ``gray1`` :gray1:`████████` ``gray2`` :gray2:`████████` ``gray3`` :gray3:`████████` ``gray4`` :gray4:`████████` ``gray5`` :gray5:`████████` ``gray6`` :gray6:`████████` ``gray7`` :gray7:`████████` ``gray8`` :gray8:`████████` ``gray9`` :gray9:`████████` ``gray10`` :gray10:`████████` ``gray11`` :gray11:`████████` ``gray12`` :gray12:`████████` ``gray13`` :gray13:`████████` ``gray14`` :gray14:`████████` ``gray15`` :gray15:`████████` ``gray16`` :gray16:`████████` ``gray17`` :gray17:`████████` ``gray18`` :gray18:`████████` ``gray19`` :gray19:`████████` ``gray20`` :gray20:`████████` ``gray21`` :gray21:`████████` ``gray22`` :gray22:`████████` ``gray23`` :gray23:`████████` ``gray24`` :gray24:`████████` ``gray25`` :gray25:`████████` ``gray26`` :gray26:`████████` ``gray27`` :gray27:`████████` ``gray28`` :gray28:`████████` ``gray29`` :gray29:`████████` ``gray30`` :gray30:`████████` ``gray31`` :gray31:`████████` ``gray32`` :gray32:`████████` ``gray33`` :gray33:`████████` ``gray34`` :gray34:`████████` ``gray35`` :gray35:`████████` ``gray36`` :gray36:`████████` ``gray37`` :gray37:`████████` ``gray38`` :gray38:`████████` ``gray39`` :gray39:`████████` ``gray40`` :gray40:`████████` ``gray41`` :gray41:`████████` ``gray42`` :gray42:`████████` ``gray43`` :gray43:`████████` ``gray44`` :gray44:`████████` ``gray45`` :gray45:`████████` ``gray46`` :gray46:`████████` ``gray47`` :gray47:`████████` ``gray48`` :gray48:`████████` ``gray49`` :gray49:`████████` ``gray50`` :gray50:`████████` ``gray51`` :gray51:`████████` ``gray52`` :gray52:`████████` ``gray53`` :gray53:`████████` ``gray54`` :gray54:`████████` ``gray55`` :gray55:`████████` ``gray56`` :gray56:`████████` ``gray57`` :gray57:`████████` ``gray58`` :gray58:`████████` ``gray59`` :gray59:`████████` ``gray60`` :gray60:`████████` ``gray61`` :gray61:`████████` ``gray62`` :gray62:`████████` ``gray63`` :gray63:`████████` ``gray64`` :gray64:`████████` ``gray65`` :gray65:`████████` ``gray66`` :gray66:`████████` ``gray67`` :gray67:`████████` ``gray68`` :gray68:`████████` ``gray69`` :gray69:`████████` ``gray70`` :gray70:`████████` ``gray71`` :gray71:`████████` ``gray72`` :gray72:`████████` ``gray73`` :gray73:`████████` ``gray74`` :gray74:`████████` ``gray75`` :gray75:`████████` ``gray76`` :gray76:`████████` ``gray77`` :gray77:`████████` ``gray78`` :gray78:`████████` ``gray79`` :gray79:`████████` ``gray80`` :gray80:`████████` ``gray81`` :gray81:`████████` ``gray82`` :gray82:`████████` ``gray83`` :gray83:`████████` ``gray84`` :gray84:`████████` ``gray85`` :gray85:`████████` ``gray86`` :gray86:`████████` ``gray87`` :gray87:`████████` ``gray88`` :gray88:`████████` ``gray89`` :gray89:`████████` ``gray90`` :gray90:`████████` ``gray91`` :gray91:`████████` ``gray92`` :gray92:`████████` ``gray93`` :gray93:`████████` ``gray94`` :gray94:`████████` ``gray95`` :gray95:`████████` ``gray96`` :gray96:`████████` ``gray97`` :gray97:`████████` ``gray98`` :gray98:`████████` ``gray99`` :gray99:`████████` ``gray100`` :gray100:`████████` ``green`` :green:`████████` ``green1`` :green1:`████████` ``green2`` :green2:`████████` ``green3`` :green3:`████████` ``green4`` :green4:`████████` ``greenyellow`` :greenyellow:`████████` ``grey`` :grey:`████████` ``grey0`` :grey0:`████████` ``grey1`` :grey1:`████████` ``grey2`` :grey2:`████████` ``grey3`` :grey3:`████████` ``grey4`` :grey4:`████████` ``grey5`` :grey5:`████████` ``grey6`` :grey6:`████████` ``grey7`` :grey7:`████████` ``grey8`` :grey8:`████████` ``grey9`` :grey9:`████████` ``grey10`` :grey10:`████████` ``grey11`` :grey11:`████████` ``grey12`` :grey12:`████████` ``grey13`` :grey13:`████████` ``grey14`` :grey14:`████████` ``grey15`` :grey15:`████████` ``grey16`` :grey16:`████████` ``grey17`` :grey17:`████████` ``grey18`` :grey18:`████████` ``grey19`` :grey19:`████████` ``grey20`` :grey20:`████████` ``grey21`` :grey21:`████████` ``grey22`` :grey22:`████████` ``grey23`` :grey23:`████████` ``grey24`` :grey24:`████████` ``grey25`` :grey25:`████████` ``grey26`` :grey26:`████████` ``grey27`` :grey27:`████████` ``grey28`` :grey28:`████████` ``grey29`` :grey29:`████████` ``grey30`` :grey30:`████████` ``grey31`` :grey31:`████████` ``grey32`` :grey32:`████████` ``grey33`` :grey33:`████████` ``grey34`` :grey34:`████████` ``grey35`` :grey35:`████████` ``grey36`` :grey36:`████████` ``grey37`` :grey37:`████████` ``grey38`` :grey38:`████████` ``grey39`` :grey39:`████████` ``grey40`` :grey40:`████████` ``grey41`` :grey41:`████████` ``grey42`` :grey42:`████████` ``grey43`` :grey43:`████████` ``grey44`` :grey44:`████████` ``grey45`` :grey45:`████████` ``grey46`` :grey46:`████████` ``grey47`` :grey47:`████████` ``grey48`` :grey48:`████████` ``grey49`` :grey49:`████████` ``grey50`` :grey50:`████████` ``grey51`` :grey51:`████████` ``grey52`` :grey52:`████████` ``grey53`` :grey53:`████████` ``grey54`` :grey54:`████████` ``grey55`` :grey55:`████████` ``grey56`` :grey56:`████████` ``grey57`` :grey57:`████████` ``grey58`` :grey58:`████████` ``grey59`` :grey59:`████████` ``grey60`` :grey60:`████████` ``grey61`` :grey61:`████████` ``grey62`` :grey62:`████████` ``grey63`` :grey63:`████████` ``grey64`` :grey64:`████████` ``grey65`` :grey65:`████████` ``grey66`` :grey66:`████████` ``grey67`` :grey67:`████████` ``grey68`` :grey68:`████████` ``grey69`` :grey69:`████████` ``grey70`` :grey70:`████████` ``grey71`` :grey71:`████████` ``grey72`` :grey72:`████████` ``grey73`` :grey73:`████████` ``grey74`` :grey74:`████████` ``grey75`` :grey75:`████████` ``grey76`` :grey76:`████████` ``grey77`` :grey77:`████████` ``grey78`` :grey78:`████████` ``grey79`` :grey79:`████████` ``grey80`` :grey80:`████████` ``grey81`` :grey81:`████████` ``grey82`` :grey82:`████████` ``grey83`` :grey83:`████████` ``grey84`` :grey84:`████████` ``grey85`` :grey85:`████████` ``grey86`` :grey86:`████████` ``grey87`` :grey87:`████████` ``grey88`` :grey88:`████████` ``grey89`` :grey89:`████████` ``grey90`` :grey90:`████████` ``grey91`` :grey91:`████████` ``grey92`` :grey92:`████████` ``grey93`` :grey93:`████████` ``grey94`` :grey94:`████████` ``grey95`` :grey95:`████████` ``grey96`` :grey96:`████████` ``grey97`` :grey97:`████████` ``grey98`` :grey98:`████████` ``grey99`` :grey99:`████████` ``grey100`` :grey100:`████████` ``honeydew`` :honeydew:`████████` ``honeydew1`` :honeydew1:`████████` ``honeydew2`` :honeydew2:`████████` ``honeydew3`` :honeydew3:`████████` ``honeydew4`` :honeydew4:`████████` ``hotpink`` :hotpink:`████████` ``hotpink1`` :hotpink1:`████████` ``hotpink2`` :hotpink2:`████████` ``hotpink3`` :hotpink3:`████████` ``hotpink4`` :hotpink4:`████████` ``indianred`` :indianred:`████████` ``indianred1`` :indianred1:`████████` ``indianred2`` :indianred2:`████████` ``indianred3`` :indianred3:`████████` ``indianred4`` :indianred4:`████████` ``indigo`` :indigo:`████████` ``ivory`` :ivory:`████████` ``ivory1`` :ivory1:`████████` ``ivory2`` :ivory2:`████████` ``ivory3`` :ivory3:`████████` ``ivory4`` :ivory4:`████████` ``khaki`` :khaki:`████████` ``khaki1`` :khaki1:`████████` ``khaki2`` :khaki2:`████████` ``khaki3`` :khaki3:`████████` ``khaki4`` :khaki4:`████████` ``lavender`` :lavender:`████████` ``lavenderblush`` :lavenderblush:`████████` ``lavenderblush1`` :lavenderblush1:`████████` ``lavenderblush2`` :lavenderblush2:`████████` ``lavenderblush3`` :lavenderblush3:`████████` ``lavenderblush4`` :lavenderblush4:`████████` ``lawngreen`` :lawngreen:`████████` ``lemonchiffon`` :lemonchiffon:`████████` ``lemonchiffon1`` :lemonchiffon1:`████████` ``lemonchiffon2`` :lemonchiffon2:`████████` ``lemonchiffon3`` :lemonchiffon3:`████████` ``lemonchiffon4`` :lemonchiffon4:`████████` ``lightblue`` :lightblue:`████████` ``lightblue1`` :lightblue1:`████████` ``lightblue2`` :lightblue2:`████████` ``lightblue3`` :lightblue3:`████████` ``lightblue4`` :lightblue4:`████████` ``lightcoral`` :lightcoral:`████████` ``lightcyan`` :lightcyan:`████████` ``lightcyan1`` :lightcyan1:`████████` ``lightcyan2`` :lightcyan2:`████████` ``lightcyan3`` :lightcyan3:`████████` ``lightcyan4`` :lightcyan4:`████████` ``lightgoldenrod`` :lightgoldenrod:`████████` ``lightgoldenrod1`` :lightgoldenrod1:`████████` ``lightgoldenrod2`` :lightgoldenrod2:`████████` ``lightgoldenrod3`` :lightgoldenrod3:`████████` ``lightgoldenrod4`` :lightgoldenrod4:`████████` ``lightgoldenrodyellow`` :lightgoldenrodyellow:`████████` ``lightgray`` :lightgray:`████████` ``lightgreen`` :lightgreen:`████████` ``lightgrey`` :lightgrey:`████████` ``lightpink`` :lightpink:`████████` ``lightpink1`` :lightpink1:`████████` ``lightpink2`` :lightpink2:`████████` ``lightpink3`` :lightpink3:`████████` ``lightpink4`` :lightpink4:`████████` ``lightsalmon`` :lightsalmon:`████████` ``lightsalmon1`` :lightsalmon1:`████████` ``lightsalmon2`` :lightsalmon2:`████████` ``lightsalmon3`` :lightsalmon3:`████████` ``lightsalmon4`` :lightsalmon4:`████████` ``lightseagreen`` :lightseagreen:`████████` ``lightskyblue`` :lightskyblue:`████████` ``lightskyblue1`` :lightskyblue1:`████████` ``lightskyblue2`` :lightskyblue2:`████████` ``lightskyblue3`` :lightskyblue3:`████████` ``lightskyblue4`` :lightskyblue4:`████████` ``lightslateblue`` :lightslateblue:`████████` ``lightslategray`` :lightslategray:`████████` ``lightslategrey`` :lightslategrey:`████████` ``lightsteelblue`` :lightsteelblue:`████████` ``lightsteelblue1`` :lightsteelblue1:`████████` ``lightsteelblue2`` :lightsteelblue2:`████████` ``lightsteelblue3`` :lightsteelblue3:`████████` ``lightsteelblue4`` :lightsteelblue4:`████████` ``lightyellow`` :lightyellow:`████████` ``lightyellow1`` :lightyellow1:`████████` ``lightyellow2`` :lightyellow2:`████████` ``lightyellow3`` :lightyellow3:`████████` ``lightyellow4`` :lightyellow4:`████████` ``lime`` :lime:`████████` ``limegreen`` :limegreen:`████████` ``linen`` :linen:`████████` ``magenta`` :magenta:`████████` ``magenta1`` :magenta1:`████████` ``magenta2`` :magenta2:`████████` ``magenta3`` :magenta3:`████████` ``magenta4`` :magenta4:`████████` ``maroon`` :maroon:`████████` ``maroon1`` :maroon1:`████████` ``maroon2`` :maroon2:`████████` ``maroon3`` :maroon3:`████████` ``maroon4`` :maroon4:`████████` ``mediumaquamarine`` :mediumaquamarine:`████████` ``mediumblue`` :mediumblue:`████████` ``mediumorchid`` :mediumorchid:`████████` ``mediumorchid1`` :mediumorchid1:`████████` ``mediumorchid2`` :mediumorchid2:`████████` ``mediumorchid3`` :mediumorchid3:`████████` ``mediumorchid4`` :mediumorchid4:`████████` ``mediumpurple`` :mediumpurple:`████████` ``mediumpurple1`` :mediumpurple1:`████████` ``mediumpurple2`` :mediumpurple2:`████████` ``mediumpurple3`` :mediumpurple3:`████████` ``mediumpurple4`` :mediumpurple4:`████████` ``mediumseagreen`` :mediumseagreen:`████████` ``mediumslateblue`` :mediumslateblue:`████████` ``mediumspringgreen`` :mediumspringgreen:`████████` ``mediumturquoise`` :mediumturquoise:`████████` ``mediumvioletred`` :mediumvioletred:`████████` ``midnightblue`` :midnightblue:`████████` ``mintcream`` :mintcream:`████████` ``mistyrose`` :mistyrose:`████████` ``mistyrose1`` :mistyrose1:`████████` ``mistyrose2`` :mistyrose2:`████████` ``mistyrose3`` :mistyrose3:`████████` ``mistyrose4`` :mistyrose4:`████████` ``moccasin`` :moccasin:`████████` ``navajowhite`` :navajowhite:`████████` ``navajowhite1`` :navajowhite1:`████████` ``navajowhite2`` :navajowhite2:`████████` ``navajowhite3`` :navajowhite3:`████████` ``navajowhite4`` :navajowhite4:`████████` ``navy`` :navy:`████████` ``navyblue`` :navyblue:`████████` ``oldlace`` :oldlace:`████████` ``olive`` :olive:`████████` ``olivedrab`` :olivedrab:`████████` ``olivedrab1`` :olivedrab1:`████████` ``olivedrab2`` :olivedrab2:`████████` ``olivedrab3`` :olivedrab3:`████████` ``olivedrab4`` :olivedrab4:`████████` ``orange`` :orange:`████████` ``orange1`` :orange1:`████████` ``orange2`` :orange2:`████████` ``orange3`` :orange3:`████████` ``orange4`` :orange4:`████████` ``orangered`` :orangered:`████████` ``orangered1`` :orangered1:`████████` ``orangered2`` :orangered2:`████████` ``orangered3`` :orangered3:`████████` ``orangered4`` :orangered4:`████████` ``orchid`` :orchid:`████████` ``orchid1`` :orchid1:`████████` ``orchid2`` :orchid2:`████████` ``orchid3`` :orchid3:`████████` ``orchid4`` :orchid4:`████████` ``palegoldenrod`` :palegoldenrod:`████████` ``palegreen`` :palegreen:`████████` ``palegreen1`` :palegreen1:`████████` ``palegreen2`` :palegreen2:`████████` ``palegreen3`` :palegreen3:`████████` ``palegreen4`` :palegreen4:`████████` ``paleturquoise`` :paleturquoise:`████████` ``paleturquoise1`` :paleturquoise1:`████████` ``paleturquoise2`` :paleturquoise2:`████████` ``paleturquoise3`` :paleturquoise3:`████████` ``paleturquoise4`` :paleturquoise4:`████████` ``palevioletred`` :palevioletred:`████████` ``palevioletred1`` :palevioletred1:`████████` ``palevioletred2`` :palevioletred2:`████████` ``palevioletred3`` :palevioletred3:`████████` ``palevioletred4`` :palevioletred4:`████████` ``papayawhip`` :papayawhip:`████████` ``peachpuff`` :peachpuff:`████████` ``peachpuff1`` :peachpuff1:`████████` ``peachpuff2`` :peachpuff2:`████████` ``peachpuff3`` :peachpuff3:`████████` ``peachpuff4`` :peachpuff4:`████████` ``peru`` :peru:`████████` ``pink`` :pink:`████████` ``pink1`` :pink1:`████████` ``pink2`` :pink2:`████████` ``pink3`` :pink3:`████████` ``pink4`` :pink4:`████████` ``plum`` :plum:`████████` ``plum1`` :plum1:`████████` ``plum2`` :plum2:`████████` ``plum3`` :plum3:`████████` ``plum4`` :plum4:`████████` ``powderblue`` :powderblue:`████████` ``purple`` :purple:`████████` ``purple1`` :purple1:`████████` ``purple2`` :purple2:`████████` ``purple3`` :purple3:`████████` ``purple4`` :purple4:`████████` ``red`` :red:`████████` ``red1`` :red1:`████████` ``red2`` :red2:`████████` ``red3`` :red3:`████████` ``red4`` :red4:`████████` ``rosybrown`` :rosybrown:`████████` ``rosybrown1`` :rosybrown1:`████████` ``rosybrown2`` :rosybrown2:`████████` ``rosybrown3`` :rosybrown3:`████████` ``rosybrown4`` :rosybrown4:`████████` ``royalblue`` :royalblue:`████████` ``royalblue1`` :royalblue1:`████████` ``royalblue2`` :royalblue2:`████████` ``royalblue3`` :royalblue3:`████████` ``royalblue4`` :royalblue4:`████████` ``saddlebrown`` :saddlebrown:`████████` ``salmon`` :salmon:`████████` ``salmon1`` :salmon1:`████████` ``salmon2`` :salmon2:`████████` ``salmon3`` :salmon3:`████████` ``salmon4`` :salmon4:`████████` ``sandybrown`` :sandybrown:`████████` ``seagreen`` :seagreen:`████████` ``seagreen1`` :seagreen1:`████████` ``seagreen2`` :seagreen2:`████████` ``seagreen3`` :seagreen3:`████████` ``seagreen4`` :seagreen4:`████████` ``seashell`` :seashell:`████████` ``seashell1`` :seashell1:`████████` ``seashell2`` :seashell2:`████████` ``seashell3`` :seashell3:`████████` ``seashell4`` :seashell4:`████████` ``sienna`` :sienna:`████████` ``sienna1`` :sienna1:`████████` ``sienna2`` :sienna2:`████████` ``sienna3`` :sienna3:`████████` ``sienna4`` :sienna4:`████████` ``silver`` :silver:`████████` ``skyblue`` :skyblue:`████████` ``skyblue1`` :skyblue1:`████████` ``skyblue2`` :skyblue2:`████████` ``skyblue3`` :skyblue3:`████████` ``skyblue4`` :skyblue4:`████████` ``slateblue`` :slateblue:`████████` ``slateblue1`` :slateblue1:`████████` ``slateblue2`` :slateblue2:`████████` ``slateblue3`` :slateblue3:`████████` ``slateblue4`` :slateblue4:`████████` ``slategray`` :slategray:`████████` ``slategray1`` :slategray1:`████████` ``slategray2`` :slategray2:`████████` ``slategray3`` :slategray3:`████████` ``slategray4`` :slategray4:`████████` ``slategrey`` :slategrey:`████████` ``snow`` :snow:`████████` ``snow1`` :snow1:`████████` ``snow2`` :snow2:`████████` ``snow3`` :snow3:`████████` ``snow4`` :snow4:`████████` ``springgreen`` :springgreen:`████████` ``springgreen1`` :springgreen1:`████████` ``springgreen2`` :springgreen2:`████████` ``springgreen3`` :springgreen3:`████████` ``springgreen4`` :springgreen4:`████████` ``steelblue`` :steelblue:`████████` ``steelblue1`` :steelblue1:`████████` ``steelblue2`` :steelblue2:`████████` ``steelblue3`` :steelblue3:`████████` ``steelblue4`` :steelblue4:`████████` ``tan`` :tan:`████████` ``tan1`` :tan1:`████████` ``tan2`` :tan2:`████████` ``tan3`` :tan3:`████████` ``tan4`` :tan4:`████████` ``teal`` :teal:`████████` ``thistle`` :thistle:`████████` ``thistle1`` :thistle1:`████████` ``thistle2`` :thistle2:`████████` ``thistle3`` :thistle3:`████████` ``thistle4`` :thistle4:`████████` ``tomato`` :tomato:`████████` ``tomato1`` :tomato1:`████████` ``tomato2`` :tomato2:`████████` ``tomato3`` :tomato3:`████████` ``tomato4`` :tomato4:`████████` ``turquoise`` :turquoise:`████████` ``turquoise1`` :turquoise1:`████████` ``turquoise2`` :turquoise2:`████████` ``turquoise3`` :turquoise3:`████████` ``turquoise4`` :turquoise4:`████████` ``violet`` :violet:`████████` ``violetred`` :violetred:`████████` ``violetred1`` :violetred1:`████████` ``violetred2`` :violetred2:`████████` ``violetred3`` :violetred3:`████████` ``violetred4`` :violetred4:`████████` ``wheat`` :wheat:`████████` ``wheat1`` :wheat1:`████████` ``wheat2`` :wheat2:`████████` ``wheat3`` :wheat3:`████████` ``wheat4`` :wheat4:`████████` ``white`` :white:`████████` ``whitesmoke`` :whitesmoke:`████████` ``yellow`` :yellow:`████████` ``yellow1`` :yellow1:`████████` ``yellow2`` :yellow2:`████████` ``yellow3`` :yellow3:`████████` ``yellow4`` :yellow4:`████████` ``yellowgreen`` :yellowgreen:`████████` ========================== ====================================================================================================== ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/cursors.rst.txt0000644000175100001770000002230714676242340022757 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.cursors` ===================== .. module:: pygame.cursors :synopsis: pygame module for cursor resources | :sl:`pygame module for cursor resources` Pygame offers control over the system hardware cursor. Pygame supports black and white cursors (bitmap cursors), as well as system variant cursors and color cursors. You control the cursor with functions inside :mod:`pygame.mouse`. This cursors module contains functions for loading and decoding various cursor formats. These allow you to easily store your cursors in external files or directly as encoded python strings. The module includes several standard cursors. The :func:`pygame.mouse.set_cursor()` function takes several arguments. All those arguments have been stored in a single tuple you can call like this: :: >>> pygame.mouse.set_cursor(*pygame.cursors.arrow) The following variables can be passed to ``pygame.mouse.set_cursor`` function: * ``pygame.cursors.arrow`` * ``pygame.cursors.diamond`` * ``pygame.cursors.broken_x`` * ``pygame.cursors.tri_left`` * ``pygame.cursors.tri_right`` This module also contains a few cursors as formatted strings. You'll need to pass these to ``pygame.cursors.compile()`` function before you can use them. The example call would look like this: :: >>> cursor = pygame.cursors.compile(pygame.cursors.textmarker_strings) >>> pygame.mouse.set_cursor((8, 16), (0, 0), *cursor) The following strings can be converted into cursor bitmaps with ``pygame.cursors.compile()`` : * ``pygame.cursors.thickarrow_strings`` * ``pygame.cursors.sizer_x_strings`` * ``pygame.cursors.sizer_y_strings`` * ``pygame.cursors.sizer_xy_strings`` * ``pygame.cursor.textmarker_strings`` .. function:: compile | :sl:`create binary cursor data from simple strings` | :sg:`compile(strings, black='X', white='.', xor='o') -> data, mask` A sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the :func:`pygame.mouse.set_cursor()` function. If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black. The height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, ``ValueError`` is raised. An example set of cursor strings looks like this :: thickarrow_strings = ( #sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ") .. ## pygame.cursors.compile ## .. function:: load_xbm | :sl:`load cursor data from an XBM file` | :sg:`load_xbm(cursorfile) -> cursor_args` | :sg:`load_xbm(cursorfile, maskfile) -> cursor_args` This loads cursors for a simple subset of ``XBM`` files. ``XBM`` files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images. Sometimes the black and white color values will be split into two separate ``XBM`` files. You can pass a second maskfile argument to load the two images into a single cursor. The cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method. The return value cursor_args can be passed directly to the ``pygame.mouse.set_cursor()`` function. .. ## pygame.cursors.load_xbm ## .. class:: Cursor | :sl:`pygame object representing a cursor` | :sg:`Cursor(size, hotspot, xormasks, andmasks) -> Cursor` | :sg:`Cursor(hotspot, surface) -> Cursor` | :sg:`Cursor(constant) -> Cursor` | :sg:`Cursor(Cursor) -> Cursor` | :sg:`Cursor() -> Cursor` In pygame 2, there are 3 types of cursors you can create to give your game that little bit of extra polish. There's **bitmap** type cursors, which existed in pygame 1.x, and are compiled from a string or load from an xbm file. Then there are **system** type cursors, where you choose a preset that will convey the same meaning but look native across different operating systems. Finally you can create a **color** cursor, which displays a pygame surface as the cursor. **Creating a system cursor** Choose a constant from this list, pass it into ``pygame.cursors.Cursor(constant)``, and you're good to go. Be advised that not all systems support every system cursor, and you may get a substitution instead. For example, on MacOS, WAIT/WAITARROW should show up as an arrow, and SIZENWSE/SIZENESW/SIZEALL should show up as a closed hand. And on Wayland, every SIZE cursor should show up as a hand. :: Pygame Cursor Constant Description -------------------------------------------- pygame.SYSTEM_CURSOR_ARROW arrow pygame.SYSTEM_CURSOR_IBEAM i-beam pygame.SYSTEM_CURSOR_WAIT wait pygame.SYSTEM_CURSOR_CROSSHAIR crosshair pygame.SYSTEM_CURSOR_WAITARROW small wait cursor (or wait if not available) pygame.SYSTEM_CURSOR_SIZENWSE double arrow pointing northwest and southeast pygame.SYSTEM_CURSOR_SIZENESW double arrow pointing northeast and southwest pygame.SYSTEM_CURSOR_SIZEWE double arrow pointing west and east pygame.SYSTEM_CURSOR_SIZENS double arrow pointing north and south pygame.SYSTEM_CURSOR_SIZEALL four pointed arrow pointing north, south, east, and west pygame.SYSTEM_CURSOR_NO slashed circle or crossbones pygame.SYSTEM_CURSOR_HAND hand **Creating a cursor without passing arguments** In addition to the cursor constants available and described above, you can also call ``pygame.cursors.Cursor()``, and your cursor is ready (doing that is the same as calling ``pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)``. Doing one of those calls actually creates a system cursor using the default native image. **Creating a color cursor** To create a color cursor, create a ``Cursor`` from a ``hotspot`` and a ``surface``. ``hotspot`` is an (x,y) coordinate that determines where in the cursor the exact point is. The hotspot position must be within the bounds of the ``surface``. **Creating a bitmap cursor** When the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The ``size`` is a sequence containing the cursor width and height. ``hotspot`` is a sequence containing the cursor hotspot position. A cursor has a width and height, but a mouse position is represented by a set of point coordinates. So the value passed into the cursor ``hotspot`` variable helps pygame to actually determine at what exact point the cursor is at. ``xormasks`` is a sequence of bytes containing the cursor xor data masks. Lastly ``andmasks``, a sequence of bytes containing the cursor bitmask data. To create these variables, we can make use of the :func:`pygame.cursors.compile()` function. Width and height must be a multiple of 8, and the mask arrays must be the correct size for the given width and height. Otherwise an exception is raised. .. method:: copy | :sl:`copy the current cursor` | :sg:`copy() -> Cursor` Returns a new Cursor object with the same data and hotspot as the original. .. ## pygame.cursors.Cursor.copy ## .. attribute:: type | :sl:`Gets the cursor type` | :sg:`type -> string` The type will be ``"system"``, ``"bitmap"``, or ``"color"``. .. ## pygame.cursors.Cursor.type ## .. attribute:: data | :sl:`Gets the cursor data` | :sg:`data -> tuple` Returns the data that was used to create this cursor object, wrapped up in a tuple. .. ## pygame.cursors.Cursor.data ## .. versionadded:: 2.0.1 .. ## pygame.cursors.Cursor ## .. ## pygame.cursors ## Example code for creating and settings cursors. (Click the mouse to switch cursor) .. literalinclude:: code_examples/cursors_module_example.py ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/display.rst.txt0000644000175100001770000007100614676242340022724 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.display` ===================== .. module:: pygame.display :synopsis: pygame module to control the display window and screen | :sl:`pygame module to control the display window and screen` This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs full screen. Once you create the display you treat it as a regular Surface. Changes are not immediately visible onscreen; you must choose one of the two flipping functions to update the actual display. The origin of the display, where x = 0 and y = 0, is the top left of the screen. Both axes increase positively towards the bottom right of the screen. The pygame display can actually be initialized in one of several modes. By default, the display is a basic software driven framebuffer. You can request special modules like automatic scaling or OpenGL support. These are controlled by flags passed to ``pygame.display.set_mode()``. Pygame can only have a single display active at any time. Creating a new one with ``pygame.display.set_mode()`` will close the previous display. To detect the number and size of attached screens, you can use ``pygame.display.get_desktop_sizes`` and then select appropriate window size and display index to pass to ``pygame.display.set_mode()``. For backward compatibility ``pygame.display`` allows precise control over the pixel format or display resolutions. This used to be necessary with old graphics cards and CRT screens, but is usually not needed any more. Use the functions ``pygame.display.mode_ok()``, ``pygame.display.list_modes()``, and ``pygame.display.Info()`` to query detailed information about the display. Once the display Surface is created, the functions from this module affect the single existing display. The Surface becomes invalid if the module is uninitialized. If a new display mode is set, the existing Surface will automatically switch to operate on the new display. When the display mode is set, several events are placed on the pygame event queue. ``pygame.QUIT`` is sent when the user has requested the program to shut down. The window will receive ``pygame.ACTIVEEVENT`` events as the display gains and loses input focus. If the display is set with the ``pygame.RESIZABLE`` flag, ``pygame.VIDEORESIZE`` events will be sent when the user adjusts the window dimensions. Hardware displays that draw direct to the screen will get ``pygame.VIDEOEXPOSE`` events when portions of the window must be redrawn. A new windowevent API was introduced in pygame 2.0.1. Check event module docs for more information on that Some display environments have an option for automatically stretching all windows. When this option is enabled, this automatic stretching distorts the appearance of the pygame window. In the pygame examples directory, there is example code (prevent_display_stretching.py) which shows how to disable this automatic stretching of the pygame display on Microsoft Windows (Vista or newer required). .. function:: init | :sl:`Initialize the display module` | :sg:`init() -> None` Initializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level ``pygame.init()``. Pygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable ``SDL_VIDEODRIVER`` can be set to control which backend is used. The systems with multiple choices are listed here. :: Windows : windib, directx Unix : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib On some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable ``SDL_WINDOWID`` must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display. It is harmless to call this more than once, repeated calls have no effect. .. ## pygame.display.init ## .. function:: quit | :sl:`Uninitialize the display module` | :sg:`quit() -> None` This will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits. It is harmless to call this more than once, repeated calls have no effect. .. ## pygame.display.quit ## .. function:: get_init | :sl:`Returns True if the display module has been initialized` | :sg:`get_init() -> bool` Returns True if the :mod:`pygame.display` module is currently initialized. .. ## pygame.display.get_init ## .. function:: set_mode | :sl:`Initialize a window or screen for display` | :sg:`set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface` This function will create a display Surface. The arguments passed in are requests for a display type. The actual created display will be the best possible match supported by the system. Note that calling this function implicitly initializes ``pygame.display``, if it was not initialized before. The size argument is a pair of numbers representing the width and height. The flags argument is a collection of additional options. The depth argument represents the number of bits to use for color. The Surface that gets returned can be drawn to like a regular Surface but changes will eventually be seen on the monitor. If no size is passed or is set to ``(0, 0)`` and pygame uses ``SDL`` version 1.2.10 or above, the created Surface will have the same size as the current screen resolution. If only the width or height are set to ``0``, the Surface will have the same width or height as the screen resolution. Using a ``SDL`` version prior to 1.2.10 will raise an exception. It is usually best to not pass the depth argument. It will default to the best and fastest color depth for the system. If your game requires a specific color format you can control the depth with this argument. Pygame will emulate an unavailable color depth which can be slow. When requesting fullscreen display modes, sometimes an exact match for the requested size cannot be made. In these situations pygame will select the closest compatible match. The returned surface will still always match the requested size. On high resolution displays(4k, 1080p) and tiny graphics games (640x480) show up very small so that they are unplayable. SCALED scales up the window for you. The game thinks it's a 640x480 window, but really it can be bigger. Mouse events are scaled for you, so your game doesn't need to do it. Note that SCALED is considered an experimental API and may change in future releases. The flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). Here are the display flags you will want to choose from: :: pygame.FULLSCREEN create a fullscreen display pygame.DOUBLEBUF only applicable with OPENGL pygame.HWSURFACE (obsolete in pygame 2) hardware accelerated, only in FULLSCREEN pygame.OPENGL create an OpenGL-renderable display pygame.RESIZABLE display window should be resizeable pygame.NOFRAME display window will have no border or controls pygame.SCALED resolution depends on desktop size and scale graphics pygame.SHOWN window is opened in visible mode (default) pygame.HIDDEN window is opened in hidden mode .. versionadded:: 2.0.0 ``SCALED``, ``SHOWN`` and ``HIDDEN`` By setting the ``vsync`` parameter to ``1``, it is possible to get a display with vertical sync, but you are not guaranteed to get one. The request only works at all for calls to ``set_mode()`` with the ``pygame.OPENGL`` or ``pygame.SCALED`` flags set, and is still not guaranteed even with one of those set. What you get depends on the hardware and driver configuration of the system pygame is running on. Here is an example usage of a call to ``set_mode()`` that may give you a display with vsync: :: flags = pygame.OPENGL | pygame.FULLSCREEN window_surface = pygame.display.set_mode((1920, 1080), flags, vsync=1) Vsync behaviour is considered experimental, and may change in future releases. .. versionadded:: 2.0.0 ``vsync`` Basic example: :: # Open a window on the screen screen_width=700 screen_height=400 screen=pygame.display.set_mode([screen_width, screen_height]) The display index ``0`` means the default display is used. If no display index argument is provided, the default display can be overridden with an environment variable. .. versionchanged:: 1.9.5 ``display`` argument added .. versionchanged:: 2.1.3 pygame now ensures that subsequent calls to this function clears the window to black. On older versions, this was an implementation detail on the major platforms this function was tested with. .. ## pygame.display.set_mode ## .. function:: get_surface | :sl:`Get a reference to the currently set display surface` | :sg:`get_surface() -> Surface` Return a reference to the currently set display Surface. If no display mode has been set this will return None. .. ## pygame.display.get_surface ## .. function:: flip | :sl:`Update the full display Surface to the screen` | :sg:`flip() -> None` This will update the contents of the entire display. If your display mode is using the flags ``pygame.HWSURFACE`` and ``pygame.DOUBLEBUF`` on pygame 1, this will wait for a vertical retrace and swap the surfaces. When using an ``pygame.OPENGL`` display mode this will perform a gl buffer swap. .. ## pygame.display.flip ## .. function:: update | :sl:`Update portions of the screen for software displays` | :sg:`update(rectangle=None) -> None` | :sg:`update(rectangle_list) -> None` This function is like an optimized version of ``pygame.display.flip()`` for software displays. It allows only a portion of the screen to be updated, instead of the entire area. If no argument is passed it updates the entire Surface area like ``pygame.display.flip()``. Note that calling ``display.update(None)`` means no part of the window is updated. Whereas ``display.update()`` means the whole window is updated. You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped. This call cannot be used on ``pygame.OPENGL`` displays and will generate an exception. .. ## pygame.display.update ## .. function:: get_driver | :sl:`Get the name of the pygame display backend` | :sg:`get_driver() -> name` Pygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the ``SDL_VIDEODRIVER`` flags in ``pygame.display.set_mode()`` to see some of the common options. .. ## pygame.display.get_driver ## .. function:: Info | :sl:`Create a video display information object` | :sg:`Info() -> VideoInfo` Creates a simple object containing several attributes to describe the current graphics environment. If this is called before ``pygame.display.set_mode()`` some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes: :: hw: 1 if the display is hardware accelerated wm: 1 if windowed display modes can be used video_mem: The megabytes of video memory on the display. This is 0 if unknown bitsize: Number of bits used to store each pixel bytesize: Number of bytes used to store each pixel masks: Four values used to pack RGBA values into pixels shifts: Four values used to pack RGBA values into pixels losses: Four values used to pack RGBA values into pixels blit_hw: 1 if hardware Surface blitting is accelerated blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated blit_hw_A: 1 if hardware Surface pixel alpha blitting is accelerated blit_sw: 1 if software Surface blitting is accelerated blit_sw_CC: 1 if software Surface colorkey blitting is accelerated blit_sw_A: 1 if software Surface pixel alpha blitting is accelerated current_h, current_w: Height and width of the current video mode, or of the desktop mode if called before the display.set_mode is called. (current_h, current_w are available since SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if an old SDL is being used. .. ## pygame.display.Info ## .. function:: get_wm_info | :sl:`Get information about the current windowing system` | :sg:`get_wm_info() -> dict` Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display. .. versionadded:: 1.7.1 .. ## pygame.display.get_wm_info ## .. function:: get_desktop_sizes | :sl:`Get sizes of active desktops` | :sg:`get_desktop_sizes() -> list` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers. The length of the list is not the same as the number of attached monitors, as a desktop can be mirrored across multiple monitors. The desktop sizes do not indicate the maximum monitor resolutions supported by the hardware, but the desktop size configured in the operating system. In order to fit windows into the desktop as it is currently configured, and to respect the resolution configured by the operating system in fullscreen mode, this function *should* be used to replace many use cases of ``pygame.display.list_modes()`` whenever applicable. .. versionadded:: 2.0.0 .. function:: list_modes | :sl:`Get list of available fullscreen modes` | :sg:`list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list` This function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of ``-1`` means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest. If depth is ``0``, the current/best color depth for the display is used. The flags defaults to ``pygame.FULLSCREEN``, but you may need to add additional flags for specific fullscreen modes. The display index ``0`` means the default display is used. Since pygame 2.0, ``pygame.display.get_desktop_sizes()`` has taken over some use cases from ``pygame.display.list_modes()``: To find a suitable size for non-fullscreen windows, it is preferable to use ``pygame.display.get_desktop_sizes()`` to get the size of the *current* desktop, and to then choose a smaller window size. This way, the window is guaranteed to fit, even when the monitor is configured to a lower resolution than the maximum supported by the hardware. To avoid changing the physical monitor resolution, it is also preferable to use ``pygame.display.get_desktop_sizes()`` to determine the fullscreen resolution. Developers are strongly advised to default to the current physical monitor resolution unless the user explicitly requests a different one (e.g. in an options menu or configuration file). .. versionchanged:: 1.9.5 ``display`` argument added .. ## pygame.display.list_modes ## .. function:: mode_ok | :sl:`Pick the best color depth for a display mode` | :sg:`mode_ok(size, flags=0, depth=0, display=0) -> depth` This function uses the same arguments as ``pygame.display.set_mode()``. It is used to determine if a requested display mode is available. It will return ``0`` if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for. Usually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match. The function will return ``0`` if the passed display flags cannot be set. The display index ``0`` means the default display is used. .. versionchanged:: 1.9.5 ``display`` argument added .. ## pygame.display.mode_ok ## .. function:: gl_get_attribute | :sl:`Get the value for an OpenGL flag for the current display` | :sg:`gl_get_attribute(flag) -> value` After calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, it is a good idea to check the value of any requested OpenGL attributes. See ``pygame.display.gl_set_attribute()`` for a list of valid flags. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.gl_get_attribute ## .. function:: gl_set_attribute | :sl:`Request an OpenGL display attribute for the display mode` | :sg:`gl_set_attribute(flag, value) -> None` When calling ``pygame.display.set_mode()`` with the ``pygame.OPENGL`` flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before ``pygame.display.set_mode()``. Many settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested. The ``OPENGL`` flags are: :: GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO :const:`GL_MULTISAMPLEBUFFERS` Whether to enable multisampling anti-aliasing. Defaults to 0 (disabled). Set ``GL_MULTISAMPLESAMPLES`` to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3. :const:`GL_STENCIL_SIZE` Minimum bit size of the stencil buffer. Defaults to 0. :const:`GL_DEPTH_SIZE` Minimum bit size of the depth buffer. Defaults to 16. :const:`GL_STEREO` 1 enables stereo 3D. Defaults to 0. :const:`GL_BUFFER_SIZE` Minimum bit size of the frame buffer. Defaults to 0. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. versionadded:: 2.0.0 Additional attributes: :: GL_ACCELERATED_VISUAL, GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION, GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK, GL_SHARE_WITH_CURRENT_CONTEXT, GL_CONTEXT_RELEASE_BEHAVIOR, GL_FRAMEBUFFER_SRGB_CAPABLE :const:`GL_CONTEXT_PROFILE_MASK` Sets the OpenGL profile to one of these values: :: GL_CONTEXT_PROFILE_CORE disable deprecated features GL_CONTEXT_PROFILE_COMPATIBILITY allow deprecated features GL_CONTEXT_PROFILE_ES allow only the ES feature subset of OpenGL :const:`GL_ACCELERATED_VISUAL` Set to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed. .. ## pygame.display.gl_set_attribute ## .. function:: get_active | :sl:`Returns True when the display is active on the screen` | :sg:`get_active() -> bool` Returns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after ``pygame.display.set_mode()``. This method may return True even if the application is fully hidden behind another application window. This will return False if the display Surface has been iconified or minimized (either via ``pygame.display.iconify()`` or via an OS specific method such as the minimize-icon available on most desktops). The method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop. .. note:: This function returning True is unrelated to whether the application has input focus. Please see ``pygame.key.get_focused()`` and ``pygame.mouse.get_focused()`` for APIs related to input focus. .. ## pygame.display.get_active ## .. function:: iconify | :sl:`Iconify the display surface` | :sg:`iconify() -> bool` Request the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful. When the display is iconified ``pygame.display.get_active()`` will return ``False``. The event queue should receive an ``ACTIVEEVENT`` event when the window has been iconified. Additionally, the event queue also receives a ``WINDOWEVENT_MINIMIZED`` event when the window has been iconified on pygame 2. .. ## pygame.display.iconify ## .. function:: toggle_fullscreen | :sl:`Switch between fullscreen and windowed displays` | :sg:`toggle_fullscreen() -> int` Switches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen. Supported display drivers in pygame 1: * x11 (Linux/Unix) * wayland (Linux/Unix) Supported display drivers in pygame 2: * windows (Windows) * x11 (Linux/Unix) * wayland (Linux/Unix) * cocoa (OSX/Mac) .. Note:: :func:`toggle_fullscreen` doesn't work on Windows unless the window size is in :func:`pygame.display.list_modes()` or the window is created with the flag ``pygame.SCALED``. See `issue #2380 `_. .. ## pygame.display.toggle_fullscreen ## .. function:: set_gamma | :sl:`Change the hardware gamma ramps` | :sg:`set_gamma(red, green=None, blue=None) -> bool` DEPRECATED: This functionality will go away in SDL3. Set the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``. A gamma value of ``1.0`` creates a linear color table. Lower values will darken the display and higher values will brighten. .. deprecated:: 2.2.0 .. ## pygame.display.set_gamma ## .. function:: set_gamma_ramp | :sl:`Change the hardware gamma ramps with a custom lookup` | :sg:`set_gamma_ramp(red, green, blue) -> bool` DEPRECATED: This functionality will go away in SDL3. Set the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between ``0`` and ``0xffff``. Not all systems and hardware support gamma ramps, if the function succeeds it will return ``True``. .. deprecated:: 2.2.0 .. ## pygame.display.set_gamma_ramp ## .. function:: set_icon | :sl:`Change the system image for the display window` | :sg:`set_icon(Surface) -> None` Sets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon. Note that calling this function implicitly initializes ``pygame.display``, if it was not initialized before. You can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system. Some systems do not allow the window icon to change after it has been shown. This function can be called before ``pygame.display.set_mode()`` to create the icon before the display mode is set. .. ## pygame.display.set_icon ## .. function:: set_caption | :sl:`Set the current window caption` | :sg:`set_caption(title, icontitle=None) -> None` If the display has a window title, this function will change the name on the window. In pygame 1.x, some systems supported an alternate shorter title to be used for minimized displays, but in pygame 2 ``icontitle`` does nothing. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.set_caption ## .. function:: get_caption | :sl:`Get the current window caption` | :sg:`get_caption() -> (title, icontitle)` Returns the title and icontitle for the display window. In pygame 2.x these will always be the same value. .. ## pygame.display.get_caption ## .. function:: set_palette | :sl:`Set the display color palette for indexed displays` | :sg:`set_palette(palette=None) -> None` This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of ``RGB`` triplets. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.display.set_palette ## .. function:: get_num_displays | :sl:`Return the number of displays` | :sg:`get_num_displays() -> int` Returns the number of available displays. This is always 1 if :func:`pygame.get_sdl_version()` returns a major version number below 2. .. versionadded:: 1.9.5 .. ## pygame.display.get_num_displays ## .. function:: get_window_size | :sl:`Return the size of the window or screen` | :sg:`get_window_size() -> tuple` Returns the size of the window initialized with :func:`pygame.display.set_mode()`. This may differ from the size of the display surface if ``SCALED`` is used. .. versionadded:: 2.0.0 .. ## pygame.display.get_window_size ## .. function:: get_allow_screensaver | :sl:`Return whether the screensaver is allowed to run.` | :sg:`get_allow_screensaver() -> bool` Return whether screensaver is allowed to run whilst the app is running. Default is ``False``. By default pygame does not allow the screensaver during game play. .. note:: Some platforms do not have a screensaver or support disabling the screensaver. Please see :func:`pygame.display.set_allow_screensaver()` for caveats with screensaver support. .. versionadded:: 2.0.0 .. ## pygame.display.get_allow_screensaver ## .. function:: set_allow_screensaver | :sl:`Set whether the screensaver may run` | :sg:`set_allow_screensaver(bool) -> None` Change whether screensavers should be allowed whilst the app is running. The default value of the argument to the function is True. By default pygame does not allow the screensaver during game play. If the screensaver has been disallowed due to this function, it will automatically be allowed to run when :func:`pygame.quit()` is called. It is possible to influence the default value via the environment variable ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER``, which can be set to either ``0`` (disable) or ``1`` (enable). .. note:: Disabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. ``SDL_HINT_VIDEO_ALLOW_SCREENSAVER`` is available in SDL 2.0.2 or later. SDL1.2 does not implement this. .. versionadded:: 2.0.0 .. ## pygame.display.set_allow_screensaver ## .. ## pygame.display ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/draw.rst.txt0000644000175100001770000006012114676242340022210 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.draw` ================== .. module:: pygame.draw :synopsis: pygame module for drawing shapes | :sl:`pygame module for drawing shapes` Draw several simple shapes to a surface. These functions will work for rendering to any format of surface. Most of the functions take a width argument to represent the size of stroke (thickness) around the edge of the shape. If a width of 0 is passed the shape will be filled (solid). All the drawing functions respect the clip area for the surface and will be constrained to that area. The functions return a rectangle representing the bounding area of changed pixels. This bounding rectangle is the 'minimum' bounding box that encloses the affected area. All the drawing functions accept a color argument that can be one of the following formats: - a :mod:`pygame.Color` object - an ``(RGB)`` triplet (tuple/list) - an ``(RGBA)`` quadruplet (tuple/list) - an integer value that has been mapped to the surface's pixel format (see :func:`pygame.Surface.map_rgb` and :func:`pygame.Surface.unmap_rgb`) A color's alpha value will be written directly into the surface (if the surface contains pixel alphas), but the draw function will not draw transparently. These functions temporarily lock the surface they are operating on. Many sequential drawing calls can be sped up by locking and unlocking the surface object around the draw calls (see :func:`pygame.Surface.lock` and :func:`pygame.Surface.unlock`). .. note :: See the :mod:`pygame.gfxdraw` module for alternative draw methods. .. function:: rect | :sl:`draw a rectangle` | :sg:`rect(surface, color, rect) -> Rect` | :sg:`rect(surface, color, rect, width=0, border_radius=0, border_top_left_radius=-1, border_top_right_radius=-1, border_bottom_left_radius=-1, border_bottom_right_radius=-1) -> Rect` Draws a rectangle on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to draw, position and dimensions :param int width: (optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, (default) fill the rectangle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. versionchanged:: 2.1.1 Drawing rects with width now draws the width correctly inside the rect's area, rather than using an internal call to draw.lines(), which had half the width spill outside the rect area. :param int border_radius: (optional) used for drawing rectangle with rounded corners. The supported range is [0, min(height, width) / 2], with 0 representing a rectangle without rounded corners. :param int border_top_left_radius: (optional) used for setting the value of top left border. If you don't set this value, it will use the border_radius value. :param int border_top_right_radius: (optional) used for setting the value of top right border. If you don't set this value, it will use the border_radius value. :param int border_bottom_left_radius: (optional) used for setting the value of bottom left border. If you don't set this value, it will use the border_radius value. :param int border_bottom_right_radius: (optional) used for setting the value of bottom right border. If you don't set this value, it will use the border_radius value. | if ``border_radius < 1`` it will draw rectangle without rounded corners | if any of border radii has the value ``< 0`` it will use value of the border_radius | If sum of radii on the same side of the rectangle is greater than the rect size the radii | will get scaled :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. note:: The :func:`pygame.Surface.fill()` method works just as well for drawing filled rectangles and can be hardware accelerated on some platforms. .. versionchanged:: 2.0.0 Added support for keyword arguments. .. versionchanged:: 2.0.0.dev8 Added support for border radius. .. ## pygame.draw.rect ## .. function:: polygon | :sl:`draw a polygon` | :sg:`polygon(surface, color, points) -> Rect` | :sg:`polygon(surface, color, points, width=0) -> Rect` Draws a polygon on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param points: a sequence of 3 or more (x, y) coordinates that make up the vertices of the polygon, each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats, e.g. ``[(x1, y1), (x2, y2), (x3, y3)]`` :type points: tuple(coordinate) or list(coordinate) :param int width: (optional) used for line thickness or to indicate that the polygon is to be filled | if width == 0, (default) fill the polygon | if width > 0, used for line thickness | if width < 0, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will grow outside the original boundary of the polygon. For more details on how the thickness for edge lines grow, refer to the ``width`` notes of the :func:`pygame.draw.line` function. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. note:: For an aapolygon, use :func:`aalines()` with ``closed=True``. .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.polygon ## .. function:: circle | :sl:`draw a circle` | :sg:`circle(surface, color, center, radius) -> Rect` | :sg:`circle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect` Draws a circle on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param center: center point of the circle as a sequence of 2 ints/floats, e.g. ``(x, y)`` :type center: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param radius: radius of the circle, measured from the ``center`` parameter, nothing will be drawn if the ``radius`` is less than 1 :type radius: int or float :param int width: (optional) used for line thickness or to indicate that the circle is to be filled | if ``width == 0``, (default) fill the circle | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward. :param bool draw_top_right: (optional) if this is set to True then the top right corner of the circle will be drawn :param bool draw_top_left: (optional) if this is set to True then the top left corner of the circle will be drawn :param bool draw_bottom_left: (optional) if this is set to True then the bottom left corner of the circle will be drawn :param bool draw_bottom_right: (optional) if this is set to True then the bottom right corner of the circle will be drawn | if any of the draw_circle_part is True then it will draw all circle parts that have the True | value, otherwise it will draw the entire circle. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``center`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``center`` is not a sequence of two numbers :raises TypeError: if ``radius`` is not a number .. versionchanged:: 2.0.0 Added support for keyword arguments. Nothing is drawn when the radius is 0 (a pixel at the ``center`` coordinates used to be drawn when the radius equaled 0). Floats, and Vector2 are accepted for the ``center`` param. The drawing algorithm was improved to look more like a circle. .. versionchanged:: 2.0.0.dev8 Added support for drawing circle quadrants. .. ## pygame.draw.circle ## .. function:: ellipse | :sl:`draw an ellipse` | :sg:`ellipse(surface, color, rect) -> Rect` | :sg:`ellipse(surface, color, rect, width=0) -> Rect` Draws an ellipse on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to indicate the position and dimensions of the ellipse, the ellipse will be centered inside the rectangle and bounded by it :param int width: (optional) used for line thickness or to indicate that the ellipse is to be filled (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, (default) fill the ellipse | if ``width > 0``, used for line thickness | if ``width < 0``, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.ellipse ## .. function:: arc | :sl:`draw an elliptical arc` | :sg:`arc(surface, color, rect, start_angle, stop_angle) -> Rect` | :sg:`arc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect` Draws an elliptical arc on the given surface. The two angle arguments are given in radians and indicate the start and stop positions of the arc. The arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle``. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param Rect rect: rectangle to indicate the position and dimensions of the ellipse which the arc will be based on, the ellipse will be centered inside the rectangle :param float start_angle: start angle of the arc in radians :param float stop_angle: stop angle of the arc in radians | if ``start_angle < stop_angle``, the arc is drawn in a counterclockwise direction from the ``start_angle`` to the ``stop_angle`` | if ``start_angle > stop_angle``, tau (tau == 2 * pi) will be added to the ``stop_angle``, if the resulting stop angle value is greater than the ``start_angle`` the above ``start_angle < stop_angle`` case applies, otherwise nothing will be drawn | if ``start_angle == stop_angle``, nothing will be drawn | :param int width: (optional) used for line thickness (not to be confused with the width value of the ``rect`` parameter) | if ``width == 0``, nothing will be drawn | if ``width > 0``, (default is 1) used for line thickness | if ``width < 0``, same as ``width == 0`` .. note:: When using ``width`` values ``> 1``, the edge lines will only grow inward from the original boundary of the ``rect`` parameter. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the given ``rect`` parameter and its width and height will be 0 :rtype: Rect .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.arc ## .. function:: line | :sl:`draw a straight line` | :sg:`line(surface, color, start_pos, end_pos) -> Rect` | :sg:`line(surface, color, start_pos, end_pos, width=1) -> Rect` Draws a straight line on the given surface. There are no endcaps. For thick lines the ends are squared off. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param start_pos: start position of the line, (x, y) :type start_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param end_pos: end position of the line, (x, y) :type end_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param int width: (optional) used for line thickness | if width >= 1, used for line thickness (default is 1) | if width < 1, nothing will be drawn | .. note:: When using ``width`` values ``> 1``, lines will grow as follows. For odd ``width`` values, the thickness of each line grows with the original line being in the center. For even ``width`` values, the thickness of each line grows with the original line being offset from the center (as there is no exact center line drawn). As a result, lines with a slope < 1 (horizontal-ish) will have 1 more pixel of thickness below the original line (in the y direction). Lines with a slope >= 1 (vertical-ish) will have 1 more pixel of thickness to the right of the original line (in the x direction). :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``start_pos`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``start_pos`` or ``end_pos`` is not a sequence of two numbers .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.line ## .. function:: lines | :sl:`draw multiple contiguous straight line segments` | :sg:`lines(surface, color, closed, points) -> Rect` | :sg:`lines(surface, color, closed, points, width=1) -> Rect` Draws a sequence of contiguous straight lines on the given surface. There are no endcaps or miter joints. For thick lines the ends are squared off. Drawing thick lines with sharp corners can have undesired looking results. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param bool closed: if ``True`` an additional line segment is drawn between the first and last points in the ``points`` sequence :param points: a sequence of 2 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)`` and from ``(x2, y2)`` to ``(x3, y3)``, additionally if the ``closed`` parameter is ``True`` another line segment will be drawn from ``(x3, y3)`` to ``(x1, y1)`` :type points: tuple(coordinate) or list(coordinate) :param int width: (optional) used for line thickness | if width >= 1, used for line thickness (default is 1) | if width < 1, nothing will be drawn | .. note:: When using ``width`` values ``> 1`` refer to the ``width`` notes of :func:`line` for details on how thick lines grow. :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 2`` (must have at least 2 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.lines ## .. function:: aaline | :sl:`draw a straight antialiased line` | :sg:`aaline(surface, color, start_pos, end_pos) -> Rect` | :sg:`aaline(surface, color, start_pos, end_pos, blend=1) -> Rect` Draws a straight antialiased line on the given surface. The line has a thickness of one pixel and the endpoints have a height and width of one pixel each. The way a line and its endpoints are drawn: If both endpoints are equal, only a single pixel is drawn (after rounding floats to nearest integer). Otherwise if the line is not steep (i.e. if the length along the x-axis is greater than the height along the y-axis): For each endpoint: If ``x``, the endpoint's x-coordinate, is a whole number find which pixels would be covered by it and draw them. Otherwise: Calculate the position of the nearest point with a whole number for its x-coordinate, when extending the line past the endpoint. Find which pixels would be covered and how much by that point. If the endpoint is the left one, multiply the coverage by (1 - the decimal part of ``x``). Otherwise multiply the coverage by the decimal part of ``x``. Then draw those pixels. *e.g.:* | The left endpoint of the line ``((1, 1.3), (5, 3))`` would cover 70% of the pixel ``(1, 1)`` and 30% of the pixel ``(1, 2)`` while the right one would cover 100% of the pixel ``(5, 3)``. | The left endpoint of the line ``((1.2, 1.4), (4.6, 3.1))`` would cover 56% *(i.e. 0.8 * 70%)* of the pixel ``(1, 1)`` and 24% *(i.e. 0.8 * 30%)* of the pixel ``(1, 2)`` while the right one would cover 42% *(i.e. 0.6 * 70%)* of the pixel ``(5, 3)`` and 18% *(i.e. 0.6 * 30%)* of the pixel ``(5, 4)`` while the right Then for each point between the endpoints, along the line, whose x-coordinate is a whole number: Find which pixels would be covered and how much by that point and draw them. *e.g.:* | The points along the line ``((1, 1), (4, 2.5))`` would be ``(2, 1.5)`` and ``(3, 2)`` and would cover 50% of the pixel ``(2, 1)``, 50% of the pixel ``(2, 2)`` and 100% of the pixel ``(3, 2)``. | The points along the line ``((1.2, 1.4), (4.6, 3.1))`` would be ``(2, 1.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``), ``(3, 2.3)`` (covering 70% of the pixel ``(3, 2)`` and 30% of the pixel ``(3, 3)``) and ``(4, 2.8)`` (covering 20% of the pixel ``(2, 1)`` and 80% of the pixel ``(2, 2)``) Otherwise do the same for steep lines as for non-steep lines except along the y-axis instead of the x-axis (using ``y`` instead of ``x``, top instead of left and bottom instead of right). .. note:: Regarding float values for coordinates, a point with coordinate consisting of two whole numbers is considered being right in the center of said pixel (and having a height and width of 1 pixel would therefore completely cover it), while a point with coordinate where one (or both) of the numbers have non-zero decimal parts would be partially covering two (or four if both numbers have decimal parts) adjacent pixels, *e.g.* the point ``(1.4, 2)`` covers 60% of the pixel ``(1, 2)`` and 40% of the pixel ``(2,2)``. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param start_pos: start position of the line, (x, y) :type start_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param end_pos: end position of the line, (x, y) :type end_pos: tuple(int or float, int or float) or list(int or float, int or float) or Vector2(int or float, int or float) :param int blend: (optional) (deprecated) if non-zero (default) the line will be blended with the surface's existing pixel shades, otherwise it will overwrite them :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the ``start_pos`` parameter value (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises TypeError: if ``start_pos`` or ``end_pos`` is not a sequence of two numbers .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.aaline ## .. function:: aalines | :sl:`draw multiple contiguous straight antialiased line segments` | :sg:`aalines(surface, color, closed, points) -> Rect` | :sg:`aalines(surface, color, closed, points, blend=1) -> Rect` Draws a sequence of contiguous straight antialiased lines on the given surface. :param Surface surface: surface to draw on :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or int or tuple(int, int, int, [int]) :param bool closed: if ``True`` an additional line segment is drawn between the first and last points in the ``points`` sequence :param points: a sequence of 2 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)`` and from ``(x2, y2)`` to ``(x3, y3)``, additionally if the ``closed`` parameter is ``True`` another line segment will be drawn from ``(x3, y3)`` to ``(x1, y1)`` :type points: tuple(coordinate) or list(coordinate) :param int blend: (optional) (deprecated) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwritten :returns: a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the ``points`` parameter (float values will be truncated) and its width and height will be 0 :rtype: Rect :raises ValueError: if ``len(points) < 2`` (must have at least 2 points) :raises TypeError: if ``points`` is not a sequence or ``points`` does not contain number pairs .. versionchanged:: 2.0.0 Added support for keyword arguments. .. ## pygame.draw.aalines ## .. ## pygame.draw ## .. figure:: code_examples/draw_module_example.png :alt: draw module example Example code for draw module. .. literalinclude:: code_examples/draw_module_example.py ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/event.rst.txt0000644000175100001770000005330314676242340022400 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.event` =================== .. module:: pygame.event :synopsis: pygame module for interacting with events and queues | :sl:`pygame module for interacting with events and queues` Pygame handles all its event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the :mod:`pygame.display` module. If the display has not been initialized and a video mode not set, the event queue may not work properly. The event queue has an upper limit on the number of events it can hold. When the queue becomes full new events are quietly dropped. To prevent lost events, especially input events which signal a quit command, your program must handle events every frame (with ``pygame.event.get()``, ``pygame.event.pump()``, ``pygame.event.wait()``, ``pygame.event.peek()`` or ``pygame.event.clear()``) and process them. Not handling events may cause your system to decide your program has locked up. To speed up queue processing use :func:`pygame.event.set_blocked()` to limit which events get queued. To get the state of various input devices, you can forego the event queue and access the input devices directly with their appropriate modules: :mod:`pygame.mouse`, :mod:`pygame.key`, and :mod:`pygame.joystick`. If you use this method, remember that pygame requires some form of communication with the system window manager and other parts of the platform. To keep pygame in sync with the system, you will need to call :func:`pygame.event.pump()` to keep everything current. Usually, this should be called once per game loop. Note: Joysticks will not send any events until the device has been initialized. The event queue contains :class:`pygame.event.Event` event objects. There are a variety of ways to access the queued events, from simply checking for the existence of events, to grabbing them directly off the stack. The event queue also offers some simple filtering which can slightly help performance by blocking certain event types from the queue. Use :func:`pygame.event.set_allowed()` and :func:`pygame.event.set_blocked()` to change this filtering. By default, all event types can be placed on the queue. All :class:`pygame.event.Event` instances contain an event type identifier and attributes specific to that event type. The event type identifier is accessible as the :attr:`pygame.event.Event.type` property. Any of the event specific attributes can be accessed through the :attr:`pygame.event.Event.__dict__` attribute or directly as an attribute of the event object (as member lookups are passed through to the object's dictionary values). The event object has no method functions. Users can create their own new events with the :func:`pygame.event.Event()` function. The event type identifier is in between the values of ``NOEVENT`` and ``NUMEVENTS``. User defined events should have a value in the inclusive range of ``USEREVENT`` to ``NUMEVENTS - 1``. User defined events can get a custom event number with :func:`pygame.event.custom_type()`. It is recommended all user events follow this system. Events support equality and inequality comparisons. Two events are equal if they are the same type and have identical attribute values. While debugging and experimenting, you can print an event object for a quick display of its type and members. The function :func:`pygame.event.event_name()` can be used to get a string representing the name of the event type. Events that come from the system will have a guaranteed set of member attributes based on the type. The following is a list of event types with their specific attributes. :: QUIT none ACTIVEEVENT gain, state KEYDOWN key, mod, unicode, scancode KEYUP key, mod, unicode, scancode MOUSEMOTION pos, rel, buttons, touch MOUSEBUTTONUP pos, button, touch MOUSEBUTTONDOWN pos, button, touch JOYAXISMOTION joy (deprecated), instance_id, axis, value JOYBALLMOTION joy (deprecated), instance_id, ball, rel JOYHATMOTION joy (deprecated), instance_id, hat, value JOYBUTTONUP joy (deprecated), instance_id, button JOYBUTTONDOWN joy (deprecated), instance_id, button VIDEORESIZE size, w, h VIDEOEXPOSE none USEREVENT code .. versionchanged:: 2.0.0 The ``joy`` attribute was deprecated, ``instance_id`` was added. .. versionchanged:: 2.0.1 The ``unicode`` attribute was added to ``KEYUP`` event. Note that ``ACTIVEEVENT``, ``VIDEORESIZE`` and ``VIDEOEXPOSE`` are considered as "legacy" events, the use of pygame2 ``WINDOWEVENT`` API is recommended over the use of this older API. You can also find a list of constants for keyboard keys :ref:`here `. A keyboard event occurs when a key is pressed (``KEYDOWN``) and when a key is released (``KEYUP``) The ``key`` attribute of keyboard events contains the value of what key was pressed or released. The ``mod`` attribute contains information about the state of keyboard modifiers (SHIFT, CTRL, ALT, etc.). The ``unicode`` attribute stores the 16-bit unicode value of the key that was pressed or released. The ``scancode`` attribute represents the physical location of a key on the keyboard. The ``ACTIVEEVENT`` contains information about the application gaining or losing focus. The ``gain`` attribute will be 1 if the mouse enters the window, otherwise ``gain`` will be 0. The ``state`` attribute will have a value of ``SDL_APPMOUSEFOCUS`` if mouse focus was gained/lost, ``SDL_APPINPUTFOCUS`` if the application loses or gains keyboard focus, or ``SDL_APPACTIVE`` if the application is minimized (``gain`` will be 0) or restored. | When compiled with SDL2, pygame has these additional events and their attributes. :: AUDIODEVICEADDED which, iscapture (SDL backend >= 2.0.4) AUDIODEVICEREMOVED which, iscapture (SDL backend >= 2.0.4) FINGERMOTION touch_id, finger_id, x, y, dx, dy FINGERDOWN touch_id, finger_id, x, y, dx, dy FINGERUP touch_id, finger_id, x, y, dx, dy MOUSEWHEEL which, flipped, x, y, touch, precise_x, precise_y MULTIGESTURE touch_id, x, y, pinched, rotated, num_fingers TEXTEDITING text, start, length TEXTINPUT text .. versionadded:: 1.9.5 .. versionchanged:: 2.0.2 Fixed amount horizontal scroll (x, positive to the right and negative to the left). .. versionchanged:: 2.0.2 The ``touch`` attribute was added to all the ``MOUSE`` events. The ``touch`` attribute of ``MOUSE`` events indicates whether or not the events were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles ``FINGERMOTION``, ``FINGERDOWN`` and ``FINGERUP`` events. .. versionadded:: 2.1.3 Added ``precise_x`` and ``precise_y`` to ``MOUSEWHEEL`` events ``MOUSEWHEEL`` event occurs whenever the mouse wheel is moved. The ``which`` attribute determines if the event was generated from a touch input device vs an actual mousewheel. The ``preciseX`` attribute contains a float with the amount scrolled horizontally (positive to the right, negative to the left). The ``preciseY`` attribute contains a float with the amount scrolled vertically (positive away from user, negative towards user). The ``flipped`` attribute determines if the values in x and y will be opposite or not. If ``SDL_MOUSEWHEEL_FLIPPED`` is defined, the direction of x and y will be opposite. ``TEXTEDITING`` event is triggered when a user activates an input method via hotkey or selecting an input method in a GUI and starts typing The ``which`` attribute for ``AUDIODEVICE*`` events is an integer representing the index for new audio devices that are added. ``AUDIODEVICE*`` events are used to update audio settings or device list. | Many new events were introduced in pygame 2. pygame can recognize text or files dropped in its window. If a file is dropped, ``DROPFILE`` event will be sent, ``file`` will be its path. The ``DROPTEXT`` event is only supported on X11. ``MIDIIN`` and ``MIDIOUT`` are events reserved for :mod:`pygame.midi` use. ``MIDI*`` events differ from ``AUDIODEVICE*`` events in that AUDIODEVICE events are triggered when there is a state change related to an audio input/output device. pygame 2 also supports controller hot-plugging :: Event name Attributes and notes DROPFILE file DROPBEGIN (SDL backend >= 2.0.5) DROPCOMPLETE (SDL backend >= 2.0.5) DROPTEXT text (SDL backend >= 2.0.5) MIDIIN MIDIOUT CONTROLLERDEVICEADDED device_index JOYDEVICEADDED device_index CONTROLLERDEVICEREMOVED instance_id JOYDEVICEREMOVED instance_id CONTROLLERDEVICEREMAPPED instance_id KEYMAPCHANGED (SDL backend >= 2.0.4) CLIPBOARDUPDATE RENDER_TARGETS_RESET (SDL backend >= 2.0.2) RENDER_DEVICE_RESET (SDL backend >= 2.0.4) LOCALECHANGED (SDL backend >= 2.0.14) Also in this version, ``instance_id`` attributes were added to joystick events, and the ``joy`` attribute was deprecated. ``KEYMAPCHANGED`` is a type of an event sent when keymap changes due to a system event such as an input language or keyboard layout change. ``CLIPBOARDUPDATE`` is an event sent when clipboard changes. This can still be considered as an experimental feature, some kinds of clipboard changes might not trigger this event. ``LOCALECHANGED`` is an event sent when user locale changes .. versionadded:: 2.0.0 .. versionadded:: 2.1.3 ``KEYMAPCHANGED``, ``CLIPBOARDUPDATE``, ``RENDER_TARGETS_RESET``, ``RENDER_DEVICE_RESET`` and ``LOCALECHANGED`` | Since pygame 2.0.1, there are a new set of events, called window events. Here is a list of all window events, along with a short description :: Event type Short description WINDOWSHOWN Window became shown WINDOWHIDDEN Window became hidden WINDOWEXPOSED Window got updated by some external event WINDOWMOVED Window got moved WINDOWRESIZED Window got resized WINDOWSIZECHANGED Window changed its size WINDOWMINIMIZED Window was minimized WINDOWMAXIMIZED Window was maximized WINDOWRESTORED Window was restored WINDOWENTER Mouse entered the window WINDOWLEAVE Mouse left the window WINDOWFOCUSGAINED Window gained focus WINDOWFOCUSLOST Window lost focus WINDOWCLOSE Window was closed WINDOWTAKEFOCUS Window was offered focus (SDL backend >= 2.0.5) WINDOWHITTEST Window has a special hit test (SDL backend >= 2.0.5) WINDOWICCPROFCHANGED Window ICC profile changed (SDL backend >= 2.0.18) WINDOWDISPLAYCHANGED Window moved on a new display (SDL backend >= 2.0.18) ``WINDOWMOVED``, ``WINDOWRESIZED`` and ``WINDOWSIZECHANGED`` have ``x`` and ``y`` attributes, ``WINDOWDISPLAYCHANGED`` has a ``display_index`` attribute. All windowevents have a ``window`` attribute. .. versionadded:: 2.0.1 .. versionadded:: 2.1.3 ``WINDOWICCPROFCHANGED`` and ``WINDOWDISPLAYCHANGED`` | On Android, the following events can be generated :: Event type Short description APP_TERMINATING OS is terminating the application APP_LOWMEMORY OS is low on memory, try to free memory if possible APP_WILLENTERBACKGROUND Application is entering background APP_DIDENTERBACKGROUND Application entered background APP_WILLENTERFOREGROUND Application is entering foreground APP_DIDENTERFOREGROUND Application entered foreground .. versionadded:: 2.1.3 | .. function:: pump | :sl:`internally process pygame event handlers` | :sg:`pump() -> None` For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call ``pygame.event.pump()`` to allow pygame to handle internal actions. This function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.event` functions. There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up. .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.pump ## .. function:: get | :sl:`get events from the queue` | :sg:`get(eventtype=None) -> Eventlist` | :sg:`get(eventtype=None, pump=True) -> Eventlist` | :sg:`get(eventtype=None, pump=True, exclude=None) -> Eventlist` This will get all the messages and remove them from the queue. If a type or sequence of types is given only those messages will be removed from the queue and returned. If a type or sequence of types is passed in the ``exclude`` argument instead, then all only *other* messages will be removed from the queue. If an ``exclude`` parameter is passed, the ``eventtype`` parameter *must* be None. If you are only taking specific events from the queue, be aware that the queue could eventually fill up with the events you are not interested. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. versionchanged:: 2.0.2 Added ``exclude`` argument .. ## pygame.event.get ## .. function:: poll | :sl:`get a single event from the queue` | :sg:`poll() -> Event instance` Returns a single event from the queue. If the event queue is empty an event of type ``pygame.NOEVENT`` will be returned immediately. The returned event is removed from the queue. .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.poll ## .. function:: wait | :sl:`wait for a single event from the queue` | :sg:`wait() -> Event instance` | :sg:`wait(timeout) -> Event instance` Returns a single event from the queue. If the queue is empty this function will wait until one is created. From pygame 2.0.0, if a ``timeout`` argument is given, the function will return an event of type ``pygame.NOEVENT`` if no events enter the queue in ``timeout`` milliseconds. The event is removed from the queue once it has been returned. While the program is waiting it will sleep in an idle state. This is important for programs that want to share the system with other applications. .. versionchanged:: 2.0.0.dev13 Added ``timeout`` argument .. caution:: This function should only be called in the thread that initialized :mod:`pygame.display`. .. ## pygame.event.wait ## .. function:: peek | :sl:`test if event types are waiting on the queue` | :sg:`peek(eventtype=None) -> bool` | :sg:`peek(eventtype=None, pump=True) -> bool` Returns ``True`` if there are any events of the given type waiting on the queue. If a sequence of event types is passed, this will return ``True`` if any of those events are on the queue. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. ## pygame.event.peek ## .. function:: clear | :sl:`remove all events from the queue` | :sg:`clear(eventtype=None) -> None` | :sg:`clear(eventtype=None, pump=True) -> None` Removes all events from the queue. If ``eventtype`` is given, removes the given event or sequence of events. This has the same effect as :func:`pygame.event.get()` except ``None`` is returned. It can be slightly more efficient when clearing a full event queue. If ``pump`` is ``True`` (the default), then :func:`pygame.event.pump()` will be called. .. versionchanged:: 1.9.5 Added ``pump`` argument .. ## pygame.event.clear ## .. function:: event_name | :sl:`get the string name from an event id` | :sg:`event_name(type) -> string` Returns a string representing the name (in CapWords style) of the given event type. "UserEvent" is returned for all values in the user event id range. "Unknown" is returned when the event type does not exist. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## pygame.event.event_name ## .. function:: set_blocked | :sl:`control which events are allowed on the queue` | :sg:`set_blocked(type) -> None` | :sg:`set_blocked(typelist) -> None` | :sg:`set_blocked(None) -> None` The given event types are not allowed to appear on the event queue. By default all events can be placed on the queue. It is safe to disable an event type multiple times. If ``None`` is passed as the argument, ALL of the event types are blocked from being placed on the queue. .. ## pygame.event.set_blocked ## .. function:: set_allowed | :sl:`control which events are allowed on the queue` | :sg:`set_allowed(type) -> None` | :sg:`set_allowed(typelist) -> None` | :sg:`set_allowed(None) -> None` The given event types are allowed to appear on the event queue. By default, all event types can be placed on the queue. It is safe to enable an event type multiple times. If ``None`` is passed as the argument, ALL of the event types are allowed to be placed on the queue. .. ## pygame.event.set_allowed ## .. function:: get_blocked | :sl:`test if a type of event is blocked from the queue` | :sg:`get_blocked(type) -> bool` | :sg:`get_blocked(typelist) -> bool` Returns ``True`` if the given event type is blocked from the queue. If a sequence of event types is passed, this will return ``True`` if any of those event types are blocked. .. ## pygame.event.get_blocked ## .. function:: set_grab | :sl:`control the sharing of input devices with other applications` | :sg:`set_grab(bool) -> None` When your program runs in a windowed environment, it will share the mouse and keyboard devices with other applications that have focus. If your program sets the event grab to ``True``, it will lock all input into your program. It is best to not always grab the input, since it prevents the user from doing other things on their system. .. ## pygame.event.set_grab ## .. function:: get_grab | :sl:`test if the program is sharing input devices` | :sg:`get_grab() -> bool` Returns ``True`` when the input events are grabbed for this application. .. ## pygame.event.get_grab ## .. function:: set_keyboard_grab | :sl:`grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key.` | :sg:`set_keyboard_grab(bool) -> None` Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows). This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab. .. versionadded:: 2.5.0 .. ## pygame.event.set_keyboard_grab ## .. function:: get_keyboard_grab | :sl:`get the current keyboard grab state` | :sg:`get_keyboard_grab() -> bool` Returns ``True`` when keyboard grab is enabled. .. versionadded:: 2.5.0 .. ## pygame.event.get_keyboard_grab ## .. function:: post | :sl:`place a new event on the queue` | :sg:`post(Event) -> bool` Places the given event at the end of the event queue. This is usually used for placing custom events on the event queue. Any type of event can be posted, and the events posted can have any attributes. This returns a boolean on whether the event was posted or not. Blocked events cannot be posted, and this function returns ``False`` if you try to post them. .. versionchanged:: 2.0.1 returns a boolean, previously returned ``None`` .. ## pygame.event.post ## .. function:: custom_type | :sl:`make custom user event type` | :sg:`custom_type() -> int` Reserves a ``pygame.USEREVENT`` for a custom use. If too many events are made a :exc:`pygame.error` is raised. .. versionadded:: 2.0.0.dev3 .. ## pygame.event.custom_type ## .. class:: Event | :sl:`pygame object for representing events` | :sg:`Event(type, dict) -> Event` | :sg:`Event(type, \**attributes) -> Event` A pygame object used for representing an event. ``Event`` instances support attribute assignment and deletion. When creating the object, the attributes may come from a dictionary argument with string keys or from keyword arguments. .. note:: From version 2.1.3 ``EventType`` is an alias for ``Event``. Beforehand, ``Event`` was a function that returned ``EventType`` instances. Use of ``Event`` is preferred over ``EventType`` wherever it is possible, as the latter could be deprecated in a future version. .. attribute:: type | :sl:`event type identifier.` | :sg:`type -> int` Read-only. The event type identifier. For user created event objects, this is the ``type`` argument passed to :func:`pygame.event.Event()`. For example, some predefined event identifiers are ``QUIT`` and ``MOUSEMOTION``. .. ## pygame.event.Event.type ## .. attribute:: __dict__ | :sl:`event attribute dictionary` | :sg:`__dict__ -> dict` Read-only. The event type specific attributes of an event. The ``dict`` attribute is a synonym for backward compatibility. For example, the attributes of a ``KEYDOWN`` event would be ``unicode``, ``key``, and ``mod`` .. ## pygame.event.Event.__dict__ ## .. versionadded:: 1.9.2 Mutable attributes. .. ## pygame.event.Event ## .. ## pygame.event ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/examples.rst.txt0000644000175100001770000003341714676242340023101 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.examples` ====================== .. module:: pygame.examples :synopsis: module of example programs | :sl:`module of example programs` These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. There are several ways to run the examples. First they can be run as stand-alone programs. Second they can be imported and their ``main()`` methods called (see below). Finally, the easiest way is to use the python -m option: :: python -m pygame.examples. eg: :: python -m pygame.examples.scaletest someimage.png Resources such as images and sounds for the examples are found in the pygame/examples/data subdirectory. You can find where the example files are installed by using the following commands inside the python interpreter. :: >>> import pygame.examples.scaletest >>> pygame.examples.scaletest.__file__ '/usr/lib/python2.6/site-packages/pygame/examples/scaletest.py' On each OS and version of Python the location will be slightly different. For example on Windows it might be in 'C:/Python26/Lib/site-packages/pygame/examples/' On Mac OS X it might be in '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/examples/' You can also run the examples in the python interpreter by calling each modules main() function. :: >>> import pygame.examples.scaletest >>> pygame.examples.scaletest.main() We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. examples as a package is new to pygame 1.9.0. But most of the examples came with pygame much earlier. .. function:: aliens.main | :sl:`play the full aliens example` | :sg:`aliens.main() -> None` This started off as a port of the ``SDL`` demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. (PS, my high score is 117! goodluck) .. ## pygame.examples.aliens.main ## .. function:: stars.main | :sl:`run a simple starfield example` | :sg:`stars.main() -> None` A simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. .. ## pygame.examples.stars.main ## .. function:: chimp.main | :sl:`hit the moving chimp` | :sg:`chimp.main() -> None` This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. .. ## pygame.examples.chimp.main ## .. function:: moveit.main | :sl:`display animated objects on the screen` | :sg:`moveit.main() -> None` This is the full and final example from the Pygame Tutorial, "How Do I Make It Move". It creates 10 objects and animates them on the screen. Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. .. ## pygame.examples.moveit.main ## .. function:: fonty.main | :sl:`run a font rendering example` | :sg:`fonty.main() -> None` Super quick, super simple application demonstrating the different ways to render fonts with the font module .. ## pygame.examples.fonty.main ## .. function:: freetype_misc.main | :sl:`run a FreeType rendering example` | :sg:`freetype_misc.main() -> None` A showcase of rendering features the :class:`pygame.freetype.Font` class provides in addition to those available with :class:`pygame.font.Font`. It is a demonstration of direct to surface rendering, with vertical text and rotated text, opaque text and semi transparent text, horizontally stretched text and vertically stretched text. .. ## pygame.examples.fonty.main ## .. function:: vgrade.main | :sl:`display a vertical gradient` | :sg:`vgrade.main() -> None` Demonstrates creating a vertical gradient with pixelcopy and NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :] .. ## pygame.examples.vgrade.main ## .. function:: eventlist.main | :sl:`display pygame events` | :sg:`eventlist.main() -> None` Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control. .. ## pygame.examples.eventlist.main ## .. function:: arraydemo.main | :sl:`show various surfarray effects` | :sg:`arraydemo.main(arraytype=None) -> None` Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray The ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError. .. ## pygame.examples.arraydemo.main ## .. function:: sound.main | :sl:`load and play a sound` | :sg:`sound.main(file_path=None) -> None` Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. If provided, use the audio file 'file_path', otherwise use a default file. ``sound.py`` optional command line argument: an audio file .. ## pygame.examples.sound.main ## .. function:: sound_array_demos.main | :sl:`play various sndarray effects` | :sg:`sound_array_demos.main(arraytype=None) -> None` Uses sndarray and NumPy to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echoes and the delay. Easy for you to recreate as needed. The ``arraytype`` parameter is deprecated; passing any value besides 'numpy' will raise ValueError. .. ## pygame.examples.sound_array_demos.main ## .. function:: liquid.main | :sl:`display an animated liquid effect` | :sg:`liquid.main() -> None` This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). .. ## pygame.examples.liquid.main ## .. function:: glcube.main | :sl:`display an animated 3D cube using OpenGL` | :sg:`glcube.main() -> None` Using PyOpenGL and pygame, this creates a spinning 3D multicolored cube. .. ## pygame.examples.glcube.main ## .. function:: scrap_clipboard.main | :sl:`access the clipboard` | :sg:`scrap_clipboard.main() -> None` A simple demonstration example for the clipboard support. .. ## pygame.examples.scrap_clipboard.main ## .. function:: mask.main | :sl:`display multiple images bounce off each other using collision detection` | :sg:`mask.main(*args) -> None` Positional arguments: :: one or more image file names. This ``pygame.masks`` demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. If run as a program then ``mask.py`` takes one or more image files as command line arguments. .. ## pygame.examples.mask.main ## .. function:: testsprite.main | :sl:`show lots of sprites moving around` | :sg:`testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0) -> None` Optional keyword arguments: :: update_rects - use the RenderUpdate sprite group class use_static - include non-moving images use_FastRenderGroup - Use the FastRenderGroup sprite group screen_dims - pygame window dimensions use_alpha - use alpha blending flags - additional display mode flags Like the ``testsprite.c`` that comes with SDL, this pygame version shows lots of sprites moving around. If run as a stand-alone program then no command line arguments are taken. .. ## pygame.examples.testsprite.main ## .. function:: headless_no_windows_needed.main | :sl:`write an image file that is smoothscaled copy of an input file` | :sg:`headless_no_windows_needed.main(fin, fout, w, h) -> None` arguments: :: fin - name of an input image file fout - name of the output file to create/overwrite w, h - size of the rescaled image, as integer width and height How to use pygame with no windowing system, like on headless servers. Thumbnail generation with scaling is an example of what you can do with pygame. ``NOTE``: the pygame scale function uses MMX/SSE if available, and can be run in multiple threads. If ``headless_no_windows_needed.py`` is run as a program it takes the following command line arguments: :: -scale inputimage outputimage new_width new_height eg. -scale in.png outpng 50 50 .. ## pygame.examples.headless_no_windows_needed.main ## .. function:: joystick.main | :sl:`demonstrate joystick functionality` | :sg:`joystick.main() -> None` A demo showing full joystick support. .. versionadded:: 2.0.2 .. ## pygame.examples.joystick.main ## .. function:: blend_fill.main | :sl:`demonstrate the various surface.fill method blend options` | :sg:`blend_fill.main() -> None` A interactive demo that lets one choose which BLEND_xxx option to apply to a surface. .. ## pygame.examples.blend_fill.main ## .. function:: blit_blends.main | :sl:`uses alternative additive fill to that of surface.fill` | :sg:`blit_blends.main() -> None` Fake additive blending. Using NumPy. it doesn't clamp. Press r,g,b Somewhat like blend_fill. .. ## pygame.examples.blit_blends.main ## .. function:: cursors.main | :sl:`display two different custom cursors` | :sg:`cursors.main() -> None` Display an arrow or circle with crossbar cursor. .. ## pygame.examples.cursors.main ## .. function:: pixelarray.main | :sl:`display various pixelarray generated effects` | :sg:`pixelarray.main() -> None` Display various pixelarray generated effects. .. ## pygame.examples.pixelarray.main ## .. function:: scaletest.main | :sl:`interactively scale an image using smoothscale` | :sg:`scaletest.main(imagefile, convert_alpha=False, run_speed_test=True) -> None` arguments: :: imagefile - file name of source image (required) convert_alpha - use convert_alpha() on the surf (default False) run_speed_test - (default False) A smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. If ``scaletest.py`` is run as a program then the command line options are: :: ImageFile [-t] [-convert_alpha] [-t] = Run Speed Test [-convert_alpha] = Use convert_alpha() on the surf. .. ## pygame.examples.scaletest.main ## .. function:: midi.main | :sl:`run a midi example` | :sg:`midi.main(mode='output', device_id=None) -> None` Arguments: :: mode - if 'output' run a midi keyboard output example 'input' run a midi event logger input example 'list' list available midi devices (default 'output') device_id - midi device number; if None then use the default midi input or output device for the system The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. The input example shows how to translate midi input to pygame events. With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. new to pygame 1.9.0 .. ## pygame.examples.midi.main ## .. function:: scroll.main | :sl:`run a Surface.scroll example that shows a magnified image` | :sg:`scroll.main(image_file=None) -> None` This example shows a scrollable image that has a zoom factor of eight. It uses the :meth:`Surface.scroll() ` function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used. When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press ``ESC`` to quit. .. ## pygame.examples.scroll.main ## .. function:: camera.main | :sl:`display video captured live from an attached camera` | :sg:`camera.main() -> None` A simple live video player, it uses the first available camera it finds on the system. .. ## pygame.examples.camera.main ## .. function:: playmus.main | :sl:`play an audio file` | :sg:`playmus.main(file_path) -> None` A simple music player with window and keyboard playback control. Playback can be paused and rewound to the beginning. .. ## pygame.examples.playmus.main ## .. ## pygame.examples ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/fastevent.rst.txt0000644000175100001770000000673114676242340023261 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.fastevent` ======================= .. module:: pygame.fastevent :synopsis: pygame module for interacting with events and queues from multiple threads. | :sl:`pygame module for interacting with events and queues` IMPORTANT NOTE: THIS MODULE IS DEPRECATED IN PYGAME 2.2 In older pygame versions before pygame 2, :mod:`pygame.event` was not well suited for posting events from different threads. This module served as a replacement (with less features) for multithreaded use. Now, the usage of this module is highly discouraged in favour of use of the main :mod:`pygame.event` module. This module will be removed in a future pygame version. Below, the legacy docs of the module is provided .. function:: init | :sl:`initialize pygame.fastevent` | :sg:`init() -> None` Initialize the pygame.fastevent module. .. ## pygame.fastevent.init ## .. function:: get_init | :sl:`returns True if the fastevent module is currently initialized` | :sg:`get_init() -> bool` Returns True if the pygame.fastevent module is currently initialized. .. ## pygame.fastevent.get_init ## .. function:: pump | :sl:`internally process pygame event handlers` | :sg:`pump() -> None` For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. This function is not necessary if your program is consistently processing events on the queue through the other :mod:`pygame.fastevent` functions. There are important things that must be dealt with internally in the event queue. The main window may need to be repainted or respond to the system. If you fail to make a call to the event queue for too long, the system may decide your program has locked up. .. ## pygame.fastevent.pump ## .. function:: wait | :sl:`wait for an event` | :sg:`wait() -> Event` Returns the current event on the queue. If there are no messages waiting on the queue, this will not return until one is available. Sometimes it is important to use this wait to get events from the queue, it will allow your application to idle when the user isn't doing anything with it. .. ## pygame.fastevent.wait ## .. function:: poll | :sl:`get an available event` | :sg:`poll() -> Event` Returns next event on queue. If there is no event waiting on the queue, this will return an event with type NOEVENT. .. ## pygame.fastevent.poll ## .. function:: get | :sl:`get all events from the queue` | :sg:`get() -> list of Events` This will get all the messages and remove them from the queue. .. ## pygame.fastevent.get ## .. function:: post | :sl:`place an event on the queue` | :sg:`post(Event) -> None` This will post your own event objects onto the event queue. You can post any event type you want, but some care must be taken. For example, if you post a MOUSEBUTTONDOWN event to the queue, it is likely any code receiving the event will expect the standard MOUSEBUTTONDOWN attributes to be available, like 'pos' and 'button'. Because pygame.fastevent.post() may have to wait for the queue to empty, you can get into a dead lock if you try to append an event on to a full queue from the thread that processes events. For that reason I do not recommend using this function in the main thread of an SDL program. .. ## pygame.fastevent.post ## .. ## pygame.fastevent ##././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.980112 pygame-2.6.1/docs/generated/_sources/ref/font.rst.txt0000644000175100001770000004345114676242340022230 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.font` ================== .. module:: pygame.font :synopsis: pygame module for loading and rendering fonts | :sl:`pygame module for loading and rendering fonts` The font module allows for rendering TrueType fonts into Surface objects. This module is built on top of the SDL_ttf library, which comes with all normal pygame installations. Most of the work done with fonts are done by using the actual Font objects. The module by itself only has routines to support the creation of Font objects with :func:`pygame.font.Font`. You can load fonts from the system by using the :func:`pygame.font.SysFont` function. There are a few other functions to help look up the system fonts. Pygame comes with a builtin default font, freesansbold. This can always be accessed by passing ``None`` as the font name. Before pygame 2.0.3, pygame.font accepts any UCS-2 / UTF-16 character ('\\u0001' to '\\uFFFF'). After 2.0.3, pygame.font built with SDL_ttf 2.0.15 accepts any valid UCS-4 / UTF-32 character (like emojis, if the font has them) ('\\U00000001' to '\\U0010FFFF')). More about this in :func:`Font.render`. Before pygame 2.0.3, this character space restriction can be avoided by using the :mod:`pygame.freetype` based ``pygame.ftfont`` to emulate the Font module. This can be used by defining the environment variable PYGAME_FREETYPE before the first import of :mod:`pygame`. Since the problem ``pygame.ftfont`` solves no longer exists, it will likely be removed in the future. .. function:: init | :sl:`initialize the font module` | :sg:`init() -> None` This method is called automatically by ``pygame.init()``. It initializes the font module. The module must be initialized before any other functions will work. It is safe to call this function more than once. .. ## pygame.font.init ## .. function:: quit | :sl:`uninitialize the font module` | :sg:`quit() -> None` Manually uninitialize SDL_ttf's font system. This is called automatically by ``pygame.quit()``. It is safe to call this function even if font is currently not initialized. .. ## pygame.font.quit ## .. function:: get_init | :sl:`true if the font module is initialized` | :sg:`get_init() -> bool` Test if the font module is initialized or not. .. ## pygame.font.get_init ## .. function:: get_default_font | :sl:`get the filename of the default font` | :sg:`get_default_font() -> string` Return the filename of the system font. This is not the full path to the file. This file can usually be found in the same directory as the font module, but it can also be bundled in separate archives. .. ## pygame.font.get_default_font ## .. function:: get_sdl_ttf_version | :sl:`gets SDL_ttf version` | :sg:`get_sdl_ttf_version(linked=True) -> (major, minor, patch)` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave get_sdl_ttf_version feedback with authors `_ Returns a tuple of integers that identify SDL_ttf's version. SDL_ttf is the underlying font rendering library, written in C, on which pygame's font module depends. If 'linked' is True (the default), the function returns the version of the linked TTF library. Otherwise this function returns the version of TTF pygame was compiled with .. versionadded:: 2.1.3 .. ## pygame.font.get_sdl_ttf_version ## .. function:: get_fonts | :sl:`get all available fonts` | :sg:`get_fonts() -> list of strings` Returns a list of all the fonts available on the system. The names of the fonts will be set to lowercase with all spaces and punctuation removed. This works on most systems, but some will return an empty list if they cannot find fonts. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. .. ## pygame.font.get_fonts ## .. function:: match_font | :sl:`find a specific font on the system` | :sg:`match_font(name, bold=False, italic=False) -> path` Returns the full path to a font file on the system. If bold or italic are set to true, this will attempt to find the correct family of font. The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. If none of the given names are found, None is returned. .. versionadded:: 2.0.1 Accept an iterable of font names. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. Example: :: print pygame.font.match_font('bitstreamverasans') # output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf # (but only if you have Vera on your system) .. ## pygame.font.match_font ## .. function:: SysFont | :sl:`create a Font object from the system fonts` | :sg:`SysFont(name, size, bold=False, italic=False) -> Font` Return a new Font object that is loaded from the system fonts. The font will match the requested bold and italic flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font. The font name can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. .. versionadded:: 2.0.1 Accept an iterable of font names. .. versionchanged:: 2.1.3 Checks through user fonts instead of just global fonts for Windows. .. ## pygame.font.SysFont ## .. class:: Font | :sl:`create a new Font object from a file` | :sg:`Font(file_path=None, size=12) -> Font` | :sg:`Font(file_path, size) -> Font` | :sg:`Font(pathlib.Path, size) -> Font` | :sg:`Font(object, size) -> Font` Load a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is ``None`` the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. If no arguments are given then the default font will be used and a font size of 12 is used. Font objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs. .. attribute:: bold | :sl:`Gets or sets whether the font should be rendered in (faked) bold.` | :sg:`bold -> bool` Whether the font should be rendered in bold. When set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.bold ## .. attribute:: italic | :sl:`Gets or sets whether the font should be rendered in (faked) italics.` | :sg:`italic -> bool` Whether the font should be rendered in italic. When set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.italic ## .. attribute:: underline | :sl:`Gets or sets whether the font should be rendered with an underline.` | :sg:`underline -> bool` Whether the font should be rendered in underline. When set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes. .. versionadded:: 2.0.0 .. ## Font.underline ## .. attribute:: strikethrough | :sl:`Gets or sets whether the font should be rendered with a strikethrough.` | :sg:`strikethrough -> bool` Whether the font should be rendered with a strikethrough. When set to True, all rendered fonts will include an strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes. .. versionadded:: 2.1.3 .. ## Font.strikethrough ## .. method:: render | :sl:`draw text on a new Surface` | :sg:`render(text, antialias, color, background=None) -> Surface` This creates a new Surface with the specified text rendered on it. :mod:`pygame.font` provides no way to directly draw text on an existing Surface: instead you must use :func:`Font.render` to create an image (Surface) of the text, then blit this image onto another Surface. The text can only be a single line: newline characters are not rendered. Null characters ('\x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('\\u0001' to '\\uFFFF') were previously supported and any greater unicode codepoint would raise a UnicodeError. Now, characters in the UCS-4 range are supported. For char strings a ``LATIN1`` encoding is assumed. The antialias argument is a boolean: if True the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent. The Surface returned will be of the dimensions required to hold the text. (the same as those returned by :func:`Font.size`). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font. Depending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit ``RGB`` images. If the background is transparent a pixel alpha will be included. Optimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values. If you render '\\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle newlines yourself. Font rendering is not thread safe: only a single thread can render text at any time. .. versionchanged:: 2.0.3 Rendering UCS4 unicode works and does not raise an exception. Use `if hasattr(pygame.font, "UCS4"):` to see if pygame supports rendering UCS4 unicode including more languages and emoji. .. ## Font.render ## .. method:: size | :sl:`determine the amount of space needed to render text` | :sg:`size(text) -> (width, height)` Returns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for word wrapping and other layout effects. Be aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e". .. ## Font.size ## .. method:: set_underline | :sl:`control if text is rendered with an underline` | :sg:`set_underline(bool) -> None` When enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and strikethrough modes. .. note:: This is the same as the :attr:`underline` attribute. .. ## Font.set_underline ## .. method:: get_underline | :sl:`check if text will be rendered with an underline` | :sg:`get_underline() -> bool` Return True when the font underline is enabled. .. note:: This is the same as the :attr:`underline` attribute. .. ## Font.get_underline ## .. method:: set_strikethrough | :sl:`control if text is rendered with a strikethrough` | :sg:`set_strikethrough(bool) -> None` When enabled, all rendered fonts will include a strikethrough. The strikethrough is always one pixel thick, regardless of font size. This can be mixed with the bold, italic and underline modes. .. note:: This is the same as the :attr:`strikethrough` attribute. .. versionadded:: 2.1.3 .. ## Font.set_strikethrough ## .. method:: get_strikethrough | :sl:`check if text will be rendered with a strikethrough` | :sg:`get_strikethrough() -> bool` Return True when the font strikethrough is enabled. .. note:: This is the same as the :attr:`strikethrough` attribute. .. versionadded:: 2.1.3 .. ## Font.get_strikethrough ## .. method:: set_bold | :sl:`enable fake rendering of bold text` | :sg:`set_bold(bool) -> None` Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic, underline and strikethrough modes. .. note:: This is the same as the :attr:`bold` attribute. .. ## Font.set_bold ## .. method:: get_bold | :sl:`check if text will be rendered bold` | :sg:`get_bold() -> bool` Return True when the font bold rendering mode is enabled. .. note:: This is the same as the :attr:`bold` attribute. .. ## Font.get_bold ## .. method:: set_italic | :sl:`enable fake rendering of italic text` | :sg:`set_italic(bool) -> None` Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold, underline and strikethrough modes. .. note:: This is the same as the :attr:`italic` attribute. .. ## Font.set_italic ## .. method:: metrics | :sl:`gets the metrics for each character in the passed string` | :sg:`metrics(text) -> list` The list contains tuples for each character, which contain the minimum ``X`` offset, the maximum ``X`` offset, the minimum ``Y`` offset, the maximum ``Y`` offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character. .. ## Font.metrics ## .. method:: get_italic | :sl:`check if the text will be rendered italic` | :sg:`get_italic() -> bool` Return True when the font italic rendering mode is enabled. .. note:: This is the same as the :attr:`italic` attribute. .. ## Font.get_italic ## .. method:: get_linesize | :sl:`get the line space of the font text` | :sg:`get_linesize() -> int` Return the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines. .. ## Font.get_linesize ## .. method:: get_height | :sl:`get the height of the font` | :sg:`get_height() -> int` Return the height in pixels of the actual rendered text. This is the average size for each glyph in the font. .. ## Font.get_height ## .. method:: get_ascent | :sl:`get the ascent of the font` | :sg:`get_ascent() -> int` Return the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font. .. ## Font.get_ascent ## .. method:: get_descent | :sl:`get the descent of the font` | :sg:`get_descent() -> int` Return the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font. .. ## Font.get_descent ## .. method:: set_script | :sl:`set the script code for text shaping` | :sg:`set_script(str) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave feedback with authors `_ Sets the script used by harfbuzz text shaping, taking a 4 character script code as input. For example, Hindi is written in the Devanagari script, for which the script code is `"Deva"`. See the full list of script codes in `ISO 15924 `_. This method requires pygame built with SDL_ttf 2.20.0 or above. Otherwise the method will raise a pygame.error. .. versionadded:: 2.2.0 .. ## Font.set_script ## .. ## pygame.font.Font ## .. ## pygame.font ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/freetype.rst.txt0000644000175100001770000007523214676242340023107 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.freetype` ====================== .. module:: pygame.freetype :synopsis: Enhanced pygame module for loading and rendering computer fonts | :sl:`Enhanced pygame module for loading and rendering computer fonts` The ``pygame.freetype`` module is a replacement for :mod:`pygame.font`. It has all of the functionality of the original, plus many new features. Yet is has absolutely no dependencies on the SDL_ttf library. It is implemented directly on the FreeType 2 library. The ``pygame.freetype`` module is not itself backward compatible with :mod:`pygame.font`. Instead, use the ``pygame.ftfont`` module as a drop-in replacement for :mod:`pygame.font`. All font file formats supported by FreeType can be rendered by ``pygame.freetype``, namely ``TTF``, Type1, ``CFF``, OpenType, ``SFNT``, ``PCF``, ``FNT``, ``BDF``, ``PFR`` and Type42 fonts. All glyphs having UTF-32 code points are accessible (see :attr:`Font.ucs4`). Most work on fonts is done using :class:`Font` instances. The module itself only has routines for initialization and creation of :class:`Font` objects. You can load fonts from the system using the :func:`SysFont` function. Extra support of bitmap fonts is available. Available bitmap sizes can be listed (see :meth:`Font.get_sizes`). For bitmap only fonts :class:`Font` can set the size for you (see the :attr:`Font.size` property). For now undefined character codes are replaced with the ``.notdef`` (not defined) character. How undefined codes are handled may become configurable in a future release. Pygame comes with a built-in default font. This can always be accessed by passing None as the font name to the :class:`Font` constructor. Extra rendering features available to :class:`pygame.freetype.Font` are direct to surface rendering (see :meth:`Font.render_to`), character kerning (see :attr:`Font.kerning`), vertical layout (see :attr:`Font.vertical`), rotation of rendered text (see :attr:`Font.rotation`), and the strong style (see :attr:`Font.strong`). Some properties are configurable, such as strong style strength (see :attr:`Font.strength`) and underline positioning (see :attr:`Font.underline_adjustment`). Text can be positioned by the upper right corner of the text box or by the text baseline (see :attr:`Font.origin`). Finally, a font's vertical and horizontal size can be adjusted separately (see :attr:`Font.size`). The :any:`pygame.examples.freetype_misc ` example shows these features in use. The pygame package does not import ``freetype`` automatically when loaded. This module must be imported explicitly to be used. :: import pygame import pygame.freetype .. versionadded:: 1.9.2 :mod:`freetype` .. function:: get_error | :sl:`Return the latest FreeType error` | :sg:`get_error() -> str` | :sg:`get_error() -> None` Return a description of the last error which occurred in the FreeType2 library, or ``None`` if no errors have occurred. .. function:: get_version | :sl:`Return the FreeType version` | :sg:`get_version(linked=True) -> (int, int, int)` Returns the version of the FreeType library in use by this module. ``linked=True`` is the default behavior and returns the linked version of FreeType and ``linked=False`` returns the compiled version of FreeType. Note that the ``freetype`` module depends on the FreeType 2 library. It will not compile with the original FreeType 1.0. Hence, the first element of the tuple will always be "2". .. versionchanged:: 2.2.0 ``linked`` keyword argument added and default behavior changed from returning compiled version to returning linked version .. function:: init | :sl:`Initialize the underlying FreeType library.` | :sg:`init(cache_size=64, resolution=72) -> None` This function initializes the underlying FreeType library and must be called before trying to use any of the functionality of the ``freetype`` module. However, :func:`pygame.init()` will automatically call this function if the ``freetype`` module is already imported. It is safe to call this function more than once. Optionally, you may specify a default *cache_size* for the Glyph cache: the maximum number of glyphs that will be cached at any given time by the module. Exceedingly small values will be automatically tuned for performance. Also a default pixel *resolution*, in dots per inch, can be given to adjust font scaling. .. function:: quit | :sl:`Shut down the underlying FreeType library.` | :sg:`quit() -> None` This function closes the ``freetype`` module. After calling this function, you should not invoke any class, method or function related to the ``freetype`` module as they are likely to fail or might give unpredictable results. It is safe to call this function even if the module hasn't been initialized yet. .. function:: get_init | :sl:`Returns True if the FreeType module is currently initialized.` | :sg:`get_init() -> bool` Returns ``True`` if the ``pygame.freetype`` module is currently initialized. .. versionadded:: 1.9.5 .. function:: was_init | :sl:`DEPRECATED: Use get_init() instead.` | :sg:`was_init() -> bool` DEPRECATED: Returns ``True`` if the ``pygame.freetype`` module is currently initialized. Use ``get_init()`` instead. .. function:: get_cache_size | :sl:`Return the glyph case size` | :sg:`get_cache_size() -> long` See :func:`pygame.freetype.init()`. .. function:: get_default_resolution | :sl:`Return the default pixel size in dots per inch` | :sg:`get_default_resolution() -> long` Returns the default pixel size, in dots per inch, for the module. The default is 72 DPI. .. function:: set_default_resolution | :sl:`Set the default pixel size in dots per inch for the module` | :sg:`set_default_resolution([resolution])` Set the default pixel size, in dots per inch, for the module. If the optional argument is omitted or zero the resolution is reset to 72 DPI. .. function:: SysFont | :sl:`create a Font object from the system fonts` | :sg:`SysFont(name, size, bold=False, italic=False) -> Font` Return a new Font object that is loaded from the system fonts. The font will match the requested *bold* and *italic* flags. Pygame uses a small set of common font aliases. If the specific font you ask for is not available, a reasonable alternative may be used. If a suitable system font is not found this will fall back on loading the default pygame font. The font *name* can also be an iterable of font names, a string of comma-separated font names, or a bytes of comma-separated font names, in which case the set of names will be searched in order. .. versionadded:: 2.0.1 Accept an iterable of font names. .. function:: get_default_font | :sl:`Get the filename of the default font` | :sg:`get_default_font() -> string` Return the filename of the default pygame font. This is not the full path to the file. The file is usually in the same directory as the font module, but can also be bundled in a separate archive. .. class:: Font | :sl:`Create a new Font instance from a supported font file.` | :sg:`Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font` | :sg:`Font(pathlib.Path) -> Font` Argument *file* can be either a string representing the font's filename, a file-like object containing the font, or None; if None, a default, Pygame, font is used. .. _freetype-font-size-argument: Optionally, a *size* argument may be specified to set the default size in points, which determines the size of the rendered characters. The size can also be passed explicitly to each method call. Because of the way the caching system works, specifying a default size on the constructor doesn't imply a performance gain over manually passing the size on each function call. If the font is bitmap and no *size* is given, the default size is set to the first available size for the font. If the font file has more than one font, the font to load can be chosen with the *index* argument. An exception is raised for an out-of-range font index value. The optional *resolution* argument sets the pixel size, in dots per inch, for use in scaling glyphs for this Font instance. If 0 then the default module value, set by :func:`init`, is used. The Font object's resolution can only be changed by re-initializing the Font instance. The optional *ucs4* argument, an integer, sets the default text translation mode: 0 (False) recognize UTF-16 surrogate pairs, any other value (True), to treat Unicode text as UCS-4, with no surrogate pairs. See :attr:`Font.ucs4`. .. attribute:: name | :sl:`Proper font name.` | :sg:`name -> string` Read only. Returns the real (long) name of the font, as recorded in the font file. .. attribute:: path | :sl:`Font file path` | :sg:`path -> unicode` Read only. Returns the path of the loaded font file .. attribute:: size | :sl:`The default point size used in rendering` | :sg:`size -> float` | :sg:`size -> (float, float)` Get or set the default size for text metrics and rendering. It can be a single point size, given as a Python ``int`` or ``float``, or a font ppem (width, height) ``tuple``. Size values are non-negative. A zero size or width represents an undefined size. In this case the size must be given as a method argument, or an exception is raised. A zero width but non-zero height is a ValueError. For a scalable font, a single number value is equivalent to a tuple with width equal height. A font can be stretched vertically with height set greater than width, or horizontally with width set greater than height. For embedded bitmaps, as listed by :meth:`get_sizes`, use the nominal width and height to select an available size. Font size differs for a non-scalable, bitmap, font. During a method call it must match one of the available sizes returned by method :meth:`get_sizes`. If not, an exception is raised. If the size is a single number, the size is first matched against the point size value. If no match, then the available size with the same nominal width and height is chosen. .. method:: get_rect | :sl:`Return the size and offset of rendered text` | :sg:`get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect` Gets the final dimensions and origin, in pixels, of *text* using the optional *size* in points, *style*, and *rotation*. For other relevant render properties, and for any optional argument not given, the default values set for the :class:`Font` instance are used. Returns a :class:`Rect ` instance containing the width and height of the text's bounding box and the position of the text's origin. The origin is useful in aligning separately rendered pieces of text. It gives the baseline position and bearing at the start of the text. See the :meth:`render_to` method for an example. If *text* is a char (byte) string, its encoding is assumed to be ``LATIN1``. Optionally, *text* can be ``None``, which will return the bounding rectangle for the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for more details. .. method:: get_metrics | :sl:`Return the glyph metrics for the given text` | :sg:`get_metrics(text, size=0) -> [(...), ...]` Returns the glyph metrics for each character in *text*. The glyph metrics are returned as a list of tuples. Each tuple gives metrics of a single character glyph. The glyph metrics are: :: (min_x, max_x, min_y, max_y, horizontal_advance_x, horizontal_advance_y) The bounding box min_x, max_x, min_y, and max_y values are returned as grid-fitted pixel coordinates of type int. The advance values are float values. The calculations are done using the font's default size in points. Optionally you may specify another point size with the *size* argument. The metrics are adjusted for the current rotation, strong, and oblique settings. If text is a char (byte) string, then its encoding is assumed to be ``LATIN1``. .. attribute:: height | :sl:`The unscaled height of the font in font units` | :sg:`height -> int` Read only. Gets the height of the font. This is the average value of all glyphs in the font. .. attribute:: ascender | :sl:`The unscaled ascent of the font in font units` | :sg:`ascender -> int` Read only. Return the number of units from the font's baseline to the top of the bounding box. .. attribute:: descender | :sl:`The unscaled descent of the font in font units` | :sg:`descender -> int` Read only. Return the height in font units for the font descent. The descent is the number of units from the font's baseline to the bottom of the bounding box. .. method:: get_sized_ascender | :sl:`The scaled ascent of the font in pixels` | :sg:`get_sized_ascender(=0) -> int` Return the number of units from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation. .. method:: get_sized_descender | :sl:`The scaled descent of the font in pixels` | :sg:`get_sized_descender(=0) -> int` Return the number of pixels from the font's baseline to the top of the bounding box. It is not adjusted for strong or rotation. .. method:: get_sized_height | :sl:`The scaled height of the font in pixels` | :sg:`get_sized_height(=0) -> int` Returns the height of the font. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation. .. method:: get_sized_glyph_height | :sl:`The scaled bounding box height of the font in pixels` | :sg:`get_sized_glyph_height(=0) -> int` Return the glyph bounding box height of the font in pixels. This is the average value of all glyphs in the font. It is not adjusted for strong or rotation. .. method:: get_sizes | :sl:`return the available sizes of embedded bitmaps` | :sg:`get_sizes() -> [(int, int, int, float, float), ...]` | :sg:`get_sizes() -> []` Returns a list of tuple records, one for each point size supported. Each tuple containing the point size, the height in pixels, width in pixels, horizontal ppem (nominal width) in fractional pixels, and vertical ppem (nominal height) in fractional pixels. .. method:: render | :sl:`Return rendered text as a surface` | :sg:`render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)` Returns a new :class:`Surface `, with the text rendered to it in the color given by 'fgcolor'. If no foreground color is given, the default foreground color, :attr:`fgcolor ` is used. If ``bgcolor`` is given, the surface will be filled with this color. When no background color is given, the surface background is transparent, zero alpha. Normally the returned surface has a 32 bit pixel size. However, if ``bgcolor`` is ``None`` and anti-aliasing is disabled a monochrome 8 bit colorkey surface, with colorkey set for the background color, is returned. The return value is a tuple: the new surface and the bounding rectangle giving the size and origin of the rendered text. If an empty string is passed for text then the returned Rect is zero width and the height of the font. Optional *fgcolor*, *style*, *rotation*, and *size* arguments override the default values set for the :class:`Font` instance. If *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``. Optionally, *text* can be ``None``, which will render the text passed to a previous :meth:`get_rect`, :meth:`render`, :meth:`render_to`, :meth:`render_raw`, or :meth:`render_raw_to` call. See :meth:`render_to` for details. .. method:: render_to | :sl:`Render text onto an existing surface` | :sg:`render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect` Renders the string *text* to the :mod:`pygame.Surface` *surf*, at position *dest*, a (x, y) surface coordinate pair. If either x or y is not an integer it is converted to one if possible. Any sequence where the first two items are x and y positional elements is accepted, including a :class:`Rect ` instance. As with :meth:`render`, optional *fgcolor*, *style*, *rotation*, and *size* argument are available. If a background color *bgcolor* is given, the text bounding box is first filled with that color. The text is blitted next. Both the background fill and text rendering involve full alpha blits. That is, the alpha values of the foreground, background, and destination target surface all affect the blit. The return value is a rectangle giving the size and position of the rendered text within the surface. If an empty string is passed for text then the returned :class:`Rect ` is zero width and the height of the font. The rect will test False. Optionally, *text* can be set ``None``, which will re-render text passed to a previous :meth:`render_to`, :meth:`get_rect`, :meth:`render`, :meth:`render_raw`, or :meth:`render_raw_to` call. Primarily, this feature is an aid to using :meth:`render_to` in combination with :meth:`get_rect`. An example: :: def word_wrap(surf, text, font, color=(0, 0, 0)): font.origin = True words = text.split(' ') width, height = surf.get_size() line_spacing = font.get_sized_height() + 2 x, y = 0, line_spacing space = font.get_rect(' ') for word in words: bounds = font.get_rect(word) if x + bounds.width + bounds.x >= width: x, y = 0, y + line_spacing if x + bounds.width + bounds.x >= width: raise ValueError("word too wide for the surface") if y + bounds.height - bounds.y >= height: raise ValueError("text to long for the surface") font.render_to(surf, (x, y), None, color) x += bounds.width + space.width return x, y When :meth:`render_to` is called with the same font properties ― :attr:`size`, :attr:`style`, :attr:`strength`, :attr:`wide`, :attr:`antialiased`, :attr:`vertical`, :attr:`rotation`, :attr:`kerning`, and :attr:`use_bitmap_strikes` ― as :meth:`get_rect`, :meth:`render_to` will use the layout calculated by :meth:`get_rect`. Otherwise, :meth:`render_to` will recalculate the layout if called with a text string or one of the above properties has changed after the :meth:`get_rect` call. If *text* is a char (byte) string, then its encoding is assumed to be ``LATIN1``. .. method:: render_raw | :sl:`Return rendered text as a string of bytes` | :sg:`render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))` Like :meth:`render` but with the pixels returned as a byte string of 8-bit gray-scale values. The foreground color is 255, the background 0, useful as an alpha mask for a foreground pattern. .. method:: render_raw_to | :sl:`Render text into an array of ints` | :sg:`render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect` Render to an array object exposing an array struct interface. The array must be two dimensional with integer items. The default *dest* value, ``None``, is equivalent to position (0, 0). See :meth:`render_to`. As with the other render methods, *text* can be ``None`` to render a text string passed previously to another method. The return value is a :func:`pygame.Rect` giving the size and position of the rendered text. .. attribute:: style | :sl:`The font's style flags` | :sg:`style -> int` Gets or sets the default style of the Font. This default style will be used for all text rendering and size calculations unless overridden specifically a render or :meth:`get_rect` call. The style value may be a bit-wise OR of one or more of the following constants: :: STYLE_NORMAL STYLE_UNDERLINE STYLE_OBLIQUE STYLE_STRONG STYLE_WIDE STYLE_DEFAULT These constants may be found on the FreeType constants module. Optionally, the default style can be modified or obtained accessing the individual style attributes (underline, oblique, strong). The ``STYLE_OBLIQUE`` and ``STYLE_STRONG`` styles are for scalable fonts only. An attempt to set either for a bitmap font raises an AttributeError. An attempt to set either for an inactive font, as returned by ``Font.__new__()``, raises a RuntimeError. Assigning ``STYLE_DEFAULT`` to the :attr:`style` property leaves the property unchanged, as this property defines the default. The :attr:`style` property will never return ``STYLE_DEFAULT``. .. attribute:: underline | :sl:`The state of the font's underline style flag` | :sg:`underline -> bool` Gets or sets whether the font will be underlined when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter. .. attribute:: strong | :sl:`The state of the font's strong style flag` | :sg:`strong -> bool` Gets or sets whether the font will be bold when drawing text. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the 'style' parameter. .. attribute:: oblique | :sl:`The state of the font's oblique style flag` | :sg:`oblique -> bool` Gets or sets whether the font will be rendered as oblique. This default style value will be used for all text rendering and size calculations unless overridden specifically in a render or :meth:`get_rect` call, via the *style* parameter. The oblique style is only supported for scalable (outline) fonts. An attempt to set this style on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, setting this property raises a RuntimeError. .. attribute:: wide | :sl:`The state of the font's wide style flag` | :sg:`wide -> bool` Gets or sets whether the font will be stretched horizontally when drawing text. It produces a result similar to :class:`pygame.font.Font`'s bold. This style not available for rotated text. .. attribute:: strength | :sl:`The strength associated with the strong or wide font styles` | :sg:`strength -> float` The amount by which a font glyph's size is enlarged for the strong or wide transformations, as a fraction of the untransformed size. For the wide style only the horizontal dimension is increased. For strong text both the horizontal and vertical dimensions are enlarged. A wide style of strength 0.08333 ( 1/12 ) is equivalent to the :class:`pygame.font.Font` bold style. The default is 0.02778 ( 1/36 ). The strength style is only supported for scalable (outline) fonts. An attempt to set this property on a bitmap font will raise an AttributeError. If the font object is inactive, as returned by ``Font.__new__()``, assignment to this property raises a RuntimeError. .. attribute:: underline_adjustment | :sl:`Adjustment factor for the underline position` | :sg:`underline_adjustment -> float` Gets or sets a factor which, when positive, is multiplied with the font's underline offset to adjust the underline position. A negative value turns an underline into a strike-through or overline. It is multiplied with the ascender. Accepted values range between -2.0 and 2.0 inclusive. A value of 0.5 closely matches Tango underlining. A value of 1.0 mimics :class:`pygame.font.Font` underlining. .. attribute:: fixed_width | :sl:`Gets whether the font is fixed-width` | :sg:`fixed_width -> bool` Read only. Returns ``True`` if the font contains fixed-width characters (for example Courier, Bitstream Vera Sans Mono, Andale Mono). .. attribute:: fixed_sizes | :sl:`the number of available bitmap sizes for the font` | :sg:`fixed_sizes -> int` Read only. Returns the number of point sizes for which the font contains bitmap character images. If zero then the font is not a bitmap font. A scalable font may contain pre-rendered point sizes as strikes. .. attribute:: scalable | :sl:`Gets whether the font is scalable` | :sg:`scalable -> bool` Read only. Returns ``True`` if the font contains outline glyphs. If so, the point size is not limited to available bitmap sizes. .. attribute:: use_bitmap_strikes | :sl:`allow the use of embedded bitmaps in an outline font file` | :sg:`use_bitmap_strikes -> bool` Some scalable fonts include embedded bitmaps for particular point sizes. This property controls whether or not those bitmap strikes are used. Set it ``False`` to disable the loading of any bitmap strike. Set it ``True``, the default, to permit bitmap strikes for a non-rotated render with no style other than :attr:`wide` or :attr:`underline`. This property is ignored for bitmap fonts. See also :attr:`fixed_sizes` and :meth:`get_sizes`. .. attribute:: antialiased | :sl:`Font anti-aliasing mode` | :sg:`antialiased -> bool` Gets or sets the font's anti-aliasing mode. This defaults to ``True`` on all fonts, which are rendered with full 8 bit blending. Set to ``False`` to do monochrome rendering. This should provide a small speed gain and reduce cache memory size. .. attribute:: kerning | :sl:`Character kerning mode` | :sg:`kerning -> bool` Gets or sets the font's kerning mode. This defaults to ``False`` on all fonts, which will be rendered without kerning. Set to ``True`` to add kerning between character pairs, if supported by the font, when positioning glyphs. .. attribute:: vertical | :sl:`Font vertical mode` | :sg:`vertical -> bool` Gets or sets whether the characters are laid out vertically rather than horizontally. May be useful when rendering Kanji or some other vertical script. Set to ``True`` to switch to a vertical text layout. The default is ``False``, place horizontally. Note that the :class:`Font` class does not automatically determine script orientation. Vertical layout must be selected explicitly. Also note that several font formats (especially bitmap based ones) don't contain the necessary metrics to draw glyphs vertically, so drawing in those cases will give unspecified results. .. attribute:: rotation | :sl:`text rotation in degrees counterclockwise` | :sg:`rotation -> int` Gets or sets the baseline angle of the rendered text. The angle is represented as integer degrees. The default angle is 0, with horizontal text rendered along the X-axis, and vertical text along the Y-axis. A positive value rotates these axes counterclockwise that many degrees. A negative angle corresponds to a clockwise rotation. The rotation value is normalized to a value within the range 0 to 359 inclusive (eg. 390 -> 390 - 360 -> 30, -45 -> 360 + -45 -> 315, 720 -> 720 - (2 * 360) -> 0). Only scalable (outline) fonts can be rotated. An attempt to change the rotation of a bitmap font raises an AttributeError. An attempt to change the rotation of an inactive font instance, as returned by ``Font.__new__()``, raises a RuntimeError. .. attribute:: fgcolor | :sl:`default foreground color` | :sg:`fgcolor -> Color` Gets or sets the default glyph rendering color. It is initially opaque black ― (0, 0, 0, 255). Applies to :meth:`render` and :meth:`render_to`. .. attribute:: bgcolor | :sl:`default background color` | :sg:`bgcolor -> Color` Gets or sets the default background rendering color. Initially it is unset and text will render with a transparent background by default. Applies to :meth:`render` and :meth:`render_to`. .. versionadded:: 2.0.0 .. attribute:: origin | :sl:`Font render to text origin mode` | :sg:`origin -> bool` If set ``True``, :meth:`render_to` and :meth:`render_raw_to` will take the *dest* position to be that of the text origin, as opposed to the top-left corner of the bounding box. See :meth:`get_rect` for details. .. attribute:: pad | :sl:`padded boundary mode` | :sg:`pad -> bool` If set ``True``, then the text boundary rectangle will be inflated to match that of :class:`font.Font `. Otherwise, the boundary rectangle is just large enough for the text. .. attribute:: ucs4 | :sl:`Enable UCS-4 mode` | :sg:`ucs4 -> bool` Gets or sets the decoding of Unicode text. By default, the freetype module performs UTF-16 surrogate pair decoding on Unicode text. This allows 32-bit escape sequences ('\Uxxxxxxxx') between 0x10000 and 0x10FFFF to represent their corresponding UTF-32 code points on Python interpreters built with a UCS-2 Unicode type (on Windows, for instance). It also means character values within the UTF-16 surrogate area (0xD800 to 0xDFFF) are considered part of a surrogate pair. A malformed surrogate pair will raise a UnicodeEncodeError. Setting ucs4 ``True`` turns surrogate pair decoding off, allowing access the full UCS-4 character range to a Python interpreter built with four-byte Unicode character support. .. attribute:: resolution | :sl:`Pixel resolution in dots per inch` | :sg:`resolution -> int` Read only. Gets pixel size used in scaling font glyphs for this :class:`Font` instance. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/gfxdraw.rst.txt0000644000175100001770000005252214676242340022723 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.gfxdraw` ===================== .. module:: pygame.gfxdraw :synopsis: pygame module for drawing shapes | :sl:`pygame module for drawing shapes` **EXPERIMENTAL!**: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release. The pygame package does not import gfxdraw automatically when loaded, so it must imported explicitly to be used. :: import pygame import pygame.gfxdraw For all functions the arguments are strictly positional and integers are accepted for coordinates and radii. The ``color`` argument can be one of the following formats: - a :mod:`pygame.Color` object - an ``(RGB)`` triplet (tuple/list) - an ``(RGBA)`` quadruplet (tuple/list) The functions :meth:`rectangle` and :meth:`box` will accept any ``(x, y, w, h)`` sequence for their ``rect`` argument, though :mod:`pygame.Rect` instances are preferred. To draw a filled antialiased shape, first use the antialiased (aa*) version of the function, and then use the filled (filled_*) version. For example: :: col = (255, 0, 0) surf.fill((255, 255, 255)) pygame.gfxdraw.aacircle(surf, x, y, 30, col) pygame.gfxdraw.filled_circle(surf, x, y, 30, col) .. note:: For threading, each of the functions releases the GIL during the C part of the call. .. note:: See the :mod:`pygame.draw` module for alternative draw methods. The ``pygame.gfxdraw`` module differs from the :mod:`pygame.draw` module in the API it uses and the different draw functions available. ``pygame.gfxdraw`` wraps the primitives from the library called SDL_gfx, rather than using modified versions. .. versionadded:: 1.9.0 .. function:: pixel | :sl:`draw a pixel` | :sg:`pixel(surface, x, y, color) -> None` Draws a single pixel, at position (x ,y), on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the pixel :param int y: y coordinate of the pixel :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.pixel ## .. function:: hline | :sl:`draw a horizontal line` | :sg:`hline(surface, x1, x2, y, color) -> None` Draws a straight horizontal line (``(x1, y)`` to ``(x2, y)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x1: x coordinate of one end of the line :param int x2: x coordinate of the other end of the line :param int y: y coordinate of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.hline ## .. function:: vline | :sl:`draw a vertical line` | :sg:`vline(surface, x, y1, y2, color) -> None` Draws a straight vertical line (``(x, y1)`` to ``(x, y2)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x: x coordinate of the line :param int y1: y coordinate of one end of the line :param int y2: y coordinate of the other end of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.vline ## .. function:: line | :sl:`draw a line` | :sg:`line(surface, x1, y1, x2, y2, color) -> None` Draws a straight line (``(x1, y1)`` to ``(x2, y2)``) on the given surface. There are no endcaps. :param Surface surface: surface to draw on :param int x1: x coordinate of one end of the line :param int y1: y coordinate of one end of the line :param int x2: x coordinate of the other end of the line :param int y2: y coordinate of the other end of the line :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.line ## .. function:: rectangle | :sl:`draw a rectangle` | :sg:`rectangle(surface, rect, color) -> None` Draws an unfilled rectangle on the given surface. For a filled rectangle use :meth:`box`. :param Surface surface: surface to draw on :param Rect rect: rectangle to draw, position and dimensions :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing. .. ## pygame.gfxdraw.rectangle ## .. function:: box | :sl:`draw a filled rectangle` | :sg:`box(surface, rect, color) -> None` Draws a filled rectangle on the given surface. For an unfilled rectangle use :meth:`rectangle`. :param Surface surface: surface to draw on :param Rect rect: rectangle to draw, position and dimensions :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. Therefore, these values will not be included as part of the drawing. .. note:: The :func:`pygame.Surface.fill` method works just as well for drawing filled rectangles. In fact :func:`pygame.Surface.fill` can be hardware accelerated on some platforms with both software and hardware display modes. .. ## pygame.gfxdraw.box ## .. function:: circle | :sl:`draw a circle` | :sg:`circle(surface, x, y, r, color) -> None` Draws an unfilled circle on the given surface. For a filled circle use :meth:`filled_circle`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.circle ## .. function:: aacircle | :sl:`draw an antialiased circle` | :sg:`aacircle(surface, x, y, r, color) -> None` Draws an unfilled antialiased circle on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aacircle ## .. function:: filled_circle | :sl:`draw a filled circle` | :sg:`filled_circle(surface, x, y, r, color) -> None` Draws a filled circle on the given surface. For an unfilled circle use :meth:`circle`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the circle :param int y: y coordinate of the center of the circle :param int r: radius of the circle :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_circle ## .. function:: ellipse | :sl:`draw an ellipse` | :sg:`ellipse(surface, x, y, rx, ry, color) -> None` Draws an unfilled ellipse on the given surface. For a filled ellipse use :meth:`filled_ellipse`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.ellipse ## .. function:: aaellipse | :sl:`draw an antialiased ellipse` | :sg:`aaellipse(surface, x, y, rx, ry, color) -> None` Draws an unfilled antialiased ellipse on the given surface. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aaellipse ## .. function:: filled_ellipse | :sl:`draw a filled ellipse` | :sg:`filled_ellipse(surface, x, y, rx, ry, color) -> None` Draws a filled ellipse on the given surface. For an unfilled ellipse use :meth:`ellipse`. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the ellipse :param int y: y coordinate of the center of the ellipse :param int rx: horizontal radius of the ellipse :param int ry: vertical radius of the ellipse :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_ellipse ## .. function:: arc | :sl:`draw an arc` | :sg:`arc(surface, x, y, r, start_angle, stop_angle, color) -> None` Draws an arc on the given surface. For an arc with its endpoints connected to its center use :meth:`pie`. The two angle arguments are given in degrees and indicate the start and stop positions of the arc. The arc is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, nothing will be drawn :param Surface surface: surface to draw on :param int x: x coordinate of the center of the arc :param int y: y coordinate of the center of the arc :param int r: radius of the arc :param int start_angle: start angle in degrees :param int stop_angle: stop angle in degrees :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. note:: This function uses *degrees* while the :func:`pygame.draw.arc` function uses *radians*. .. ## pygame.gfxdraw.arc ## .. function:: pie | :sl:`draw a pie` | :sg:`pie(surface, x, y, r, start_angle, stop_angle, color) -> None` Draws an unfilled pie on the given surface. A pie is an :meth:`arc` with its endpoints connected to its center. The two angle arguments are given in degrees and indicate the start and stop positions of the pie. The pie is drawn in a clockwise direction from the ``start_angle`` to the ``stop_angle``. If ``start_angle == stop_angle``, a straight line will be drawn from the center position at the given angle, to a length of the radius. :param Surface surface: surface to draw on :param int x: x coordinate of the center of the pie :param int y: y coordinate of the center of the pie :param int r: radius of the pie :param int start_angle: start angle in degrees :param int stop_angle: stop angle in degrees :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.pie ## .. function:: trigon | :sl:`draw a trigon/triangle` | :sg:`trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws an unfilled trigon (triangle) on the given surface. For a filled trigon use :meth:`filled_trigon`. A trigon can also be drawn using :meth:`polygon` e.g. ``polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.trigon ## .. function:: aatrigon | :sl:`draw an antialiased trigon/triangle` | :sg:`aatrigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws an unfilled antialiased trigon (triangle) on the given surface. An aatrigon can also be drawn using :meth:`aapolygon` e.g. ``aapolygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.aatrigon ## .. function:: filled_trigon | :sl:`draw a filled trigon/triangle` | :sg:`filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) -> None` Draws a filled trigon (triangle) on the given surface. For an unfilled trigon use :meth:`trigon`. A filled_trigon can also be drawn using :meth:`filled_polygon` e.g. ``filled_polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)`` :param Surface surface: surface to draw on :param int x1: x coordinate of the first corner of the trigon :param int y1: y coordinate of the first corner of the trigon :param int x2: x coordinate of the second corner of the trigon :param int y2: y coordinate of the second corner of the trigon :param int x3: x coordinate of the third corner of the trigon :param int y3: y coordinate of the third corner of the trigon :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType .. ## pygame.gfxdraw.filled_trigon ## .. function:: polygon | :sl:`draw a polygon` | :sg:`polygon(surface, points, color) -> None` Draws an unfilled polygon on the given surface. For a filled polygon use :meth:`filled_polygon`. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.polygon ## .. function:: aapolygon | :sl:`draw an antialiased polygon` | :sg:`aapolygon(surface, points, color) -> None` Draws an unfilled antialiased polygon on the given surface. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.aapolygon ## .. function:: filled_polygon | :sl:`draw a filled polygon` | :sg:`filled_polygon(surface, points, color) -> None` Draws a filled polygon on the given surface. For an unfilled polygon use :meth:`polygon`. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated)` :type points: tuple(coordinate) or list(coordinate) :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.filled_polygon ## .. function:: textured_polygon | :sl:`draw a textured polygon` | :sg:`textured_polygon(surface, points, texture, tx, ty) -> None` Draws a textured polygon on the given surface. For better performance, the surface and the texture should have the same format. A per-pixel alpha texture blit to a per-pixel alpha surface will differ from a :func:`pygame.Surface.blit` blit. Also, a per-pixel alpha texture cannot be used with an 8-bit per pixel destination. The adjacent coordinates in the ``points`` argument, as well as the first and last points, will be connected by line segments. e.g. For the points ``[(x1, y1), (x2, y2), (x3, y3)]`` a line segment will be drawn from ``(x1, y1)`` to ``(x2, y2)``, from ``(x2, y2)`` to ``(x3, y3)``, and from ``(x3, y3)`` to ``(x1, y1)``. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param Surface texture: texture to draw on the polygon :param int tx: x offset of the texture :param int ty: y offset of the texture :returns: ``None`` :rtype: NoneType :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.textured_polygon ## .. function:: bezier | :sl:`draw a Bezier curve` | :sg:`bezier(surface, points, steps, color) -> None` Draws a Bézier curve on the given surface. :param Surface surface: surface to draw on :param points: a sequence of 3 or more (x, y) coordinates used to form a curve, where each *coordinate* in the sequence must be a tuple/list/:class:`pygame.math.Vector2` of 2 ints/floats (float values will be truncated) :type points: tuple(coordinate) or list(coordinate) :param int steps: number of steps for the interpolation, the minimum is 2 :param color: color to draw with, the alpha value is optional if using a tuple ``(RGB[A])`` :type color: Color or tuple(int, int, int, [int]) :returns: ``None`` :rtype: NoneType :raises ValueError: if ``steps < 2`` :raises ValueError: if ``len(points) < 3`` (must have at least 3 points) :raises IndexError: if ``len(coordinate) < 2`` (each coordinate must have at least 2 items) .. ## pygame.gfxdraw.bezier ## .. ## pygame.gfxdraw ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/image.rst.txt0000644000175100001770000003212314676242340022336 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.image` =================== .. module:: pygame.image :synopsis: pygame module for loading and saving images | :sl:`pygame module for image transfer` The image module contains functions for loading and saving pictures, as well as transferring Surfaces to formats usable by other packages. Note that there is no Image class; an image is loaded as a Surface object. The Surface class allows manipulation (drawing lines, setting pixels, capturing regions, etc.). In the vast majority of installations, pygame is built to support extended formats, using the SDL_Image library behind the scenes. However, some installations may only support uncompressed ``BMP`` images. With full image support, the :func:`pygame.image.load()` function can load the following formats. * ``BMP`` * ``GIF`` (non-animated) * ``JPEG`` * ``LBM`` (and ``PBM``, ``PGM``, ``PPM``) * ``PCX`` * ``PNG`` * ``PNM`` * ``SVG`` (limited support, using Nano SVG) * ``TGA`` (uncompressed) * ``TIFF`` * ``WEBP`` * ``XPM`` .. versionadded:: 2.0 Loading SVG, WebP, PNM Saving images only supports a limited set of formats. You can save to the following formats. * ``BMP`` * ``JPEG`` * ``PNG`` * ``TGA`` ``JPEG`` and ``JPG``, as well as ``TIF`` and ``TIFF`` refer to the same file format .. versionadded:: 1.8 Saving PNG and JPEG files. .. function:: load | :sl:`load new image from a file (or file-like object)` | :sg:`load(filename) -> Surface` | :sg:`load(fileobj, namehint="") -> Surface` Load an image from a file source. You can pass either a filename, a Python file-like object, or a pathlib.Path. Pygame will automatically determine the image type (e.g., ``GIF`` or bitmap) and create a new Surface object from the data. In some cases it will need to know the file extension (e.g., ``GIF`` images should end in ".gif"). If you pass a raw file-like object, you may also want to pass the original filename as the namehint argument. The returned Surface will contain the same color format, colorkey and alpha transparency as the file it came from. You will often want to call :func:`pygame.Surface.convert()` with no arguments, to create a copy that will draw more quickly on the screen. For alpha transparency, like in .png images, use the :func:`pygame.Surface.convert_alpha()` method after loading so that the image has per pixel transparency. Pygame may not always be built to support all image formats. At minimum it will support uncompressed ``BMP``. If :func:`pygame.image.get_extended()` returns ``True``, you should be able to load most images (including PNG, JPG and GIF). You should use :func:`os.path.join()` for compatibility. :: eg. asurf = pygame.image.load(os.path.join('data', 'bla.png')) .. ## pygame.image.load ## .. function:: save | :sl:`save an image to file (or file-like object)` | :sg:`save(Surface, filename) -> None` | :sg:`save(Surface, fileobj, namehint="") -> None` This will save your Surface as either a ``BMP``, ``TGA``, ``PNG``, or ``JPEG`` image. If the filename extension is unrecognized it will default to ``TGA``. Both ``TGA``, and ``BMP`` file formats create uncompressed files. You can pass a filename, a pathlib.Path or a Python file-like object. For file-like object, the image is saved to ``TGA`` format unless a namehint with a recognizable extension is passed in. .. note:: When saving to a file-like object, it seems that for most formats, the object needs to be flushed after saving to it to make loading from it possible. .. versionchanged:: 1.8 Saving PNG and JPEG files. .. versionchanged:: 2.0.0 The ``namehint`` parameter was added to make it possible to save other formats than ``TGA`` to a file-like object. Saving to a file-like object with JPEG is possible. .. ## pygame.image.save ## .. function:: get_sdl_image_version | :sl:`get version number of the SDL_Image library being used` | :sg:`get_sdl_image_version(linked=True) -> None` | :sg:`get_sdl_image_version(linked=True) -> (major, minor, patch)` If pygame is built with extended image formats, then this function will return the SDL_Image library's version number as a tuple of 3 integers ``(major, minor, patch)``. If not, then it will return ``None``. ``linked=True`` is the default behavior and the function will return the version of the library that Pygame is linked against, while ``linked=False`` will return the version of the library that Pygame is compiled against. .. versionadded:: 2.0.0 .. versionchanged:: 2.2.0 ``linked`` keyword argument added and default behavior changed from returning compiled version to returning linked version .. ## pygame.image.get_sdl_image_version ## .. function:: get_extended | :sl:`test if extended image formats can be loaded` | :sg:`get_extended() -> bool` If pygame is built with extended image formats this function will return True. It is still not possible to determine which formats will be available, but generally you will be able to load them all. .. ## pygame.image.get_extended ## .. function:: tostring | :sl:`transfer image to byte buffer` | :sg:`tostring(Surface, format, flipped=False) -> bytes` Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped. The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame. * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first .. note:: it is preferred to use :func:`tobytes` as of pygame 2.1.3 .. versionadded:: 2.1.3 BGRA format .. ## pygame.image.tostring ## .. function:: tobytes | :sl:`transfer image to byte buffer` | :sg:`tobytes(Surface, format, flipped=False) -> bytes` Creates a string of bytes that can be transferred with the ``fromstring`` or ``frombytes`` methods in other Python imaging packages. Some Python image packages prefer their images in bottom-to-top format (PyOpenGL for example). If you pass ``True`` for the flipped argument, the byte buffer will be vertically flipped. The format argument is a string of one of the following values. Note that only 8-bit Surfaces can use the "P" format. The other formats will work for any Surface. Also note that other Python image packages support more formats than pygame. * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped * ``RGBA_PREMULT``, 32-bit image with colors scaled by alpha channel * ``ARGB_PREMULT``, 32-bit image with colors scaled by alpha channel, alpha channel first .. note:: this function is an alias for :func:`tostring`. The use of this function is recommended over :func:`tostring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations. .. versionadded:: 2.1.3 .. ## pygame.image.tobytes ## .. function:: fromstring | :sl:`create new Surface from a byte buffer` | :sg:`fromstring(bytes, size, format, flipped=False) -> Surface` This function takes arguments similar to :func:`pygame.image.tostring()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in. The bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised. See the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame. .. note:: it is preferred to use :func:`frombytes` as of pygame 2.1.3 .. ## pygame.image.fromstring ## .. function:: frombytes | :sl:`create new Surface from a byte buffer` | :sg:`frombytes(bytes, size, format, flipped=False) -> Surface` This function takes arguments similar to :func:`pygame.image.tobytes()`. The size argument is a pair of numbers representing the width and height. Once the new Surface is created it is independent from the memory of the bytes passed in. The bytes and format passed must compute to the exact size of image specified. Otherwise a ``ValueError`` will be raised. See the :func:`pygame.image.frombuffer()` method for a potentially faster way to transfer images into pygame. .. note:: this function is an alias for :func:`fromstring`. The use of this function is recommended over :func:`fromstring` as of pygame 2.1.3. This function was introduced so it matches nicely with other libraries (PIL, numpy, etc), and with people's expectations. .. versionadded:: 2.1.3 .. ## pygame.image.frombytes ## .. function:: frombuffer | :sl:`create a new Surface that shares data inside a bytes buffer` | :sg:`frombuffer(buffer, size, format) -> Surface` Create a new Surface that shares pixel data directly from a buffer. This buffer can be bytes, a bytearray, a memoryview, a :class:`pygame.BufferProxy`, or any object that supports the buffer protocol. This method takes similar arguments to :func:`pygame.image.fromstring()`, but is unable to vertically flip the source data. This will run much faster than :func:`pygame.image.fromstring`, since no pixel data must be allocated and copied. It accepts the following 'format' arguments: * ``P``, 8-bit palettized Surfaces * ``RGB``, 24-bit image * ``BGR``, 24-bit image, red and blue channels swapped. * ``RGBX``, 32-bit image with unused space * ``RGBA``, 32-bit image with an alpha channel * ``ARGB``, 32-bit image with alpha channel first * ``BGRA``, 32-bit image with alpha channel, red and blue channels swapped .. versionadded:: 2.1.3 BGRA format .. ## pygame.image.frombuffer ## .. function:: load_basic | :sl:`load new BMP image from a file (or file-like object)` | :sg:`load_basic(file) -> Surface` Load an image from a file source. You can pass either a filename or a Python file-like object, or a pathlib.Path. This function only supports loading "basic" image format, ie ``BMP`` format. This function is always available, no matter how pygame was built. .. ## pygame.image.load_basic ## .. function:: load_extended | :sl:`load an image from a file (or file-like object)` | :sg:`load_extended(filename) -> Surface` | :sg:`load_extended(fileobj, namehint="") -> Surface` This function is similar to :func:`pygame.image.load()`, except that this function can only be used if pygame was built with extended image format support. .. versionchanged:: 2.0.1 This function is always available, but raises an ``NotImplementedError`` if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support. .. ## pygame.image.load_extended ## .. function:: save_extended | :sl:`save a png/jpg image to file (or file-like object)` | :sg:`save_extended(Surface, filename) -> None` | :sg:`save_extended(Surface, fileobj, namehint="") -> None` This will save your Surface as either a ``PNG`` or ``JPEG`` image. In case the image is being saved to a file-like object, this function uses the namehint argument to determine the format of the file being saved. Saves to ``JPEG`` in case the namehint was not specified while saving to a file-like object. .. versionchanged:: 2.0.1 This function is always available, but raises an ``NotImplementedError`` if extended image formats are not supported. Previously, this function may or may not be available, depending on the state of extended image format support. .. ## pygame.image.save_extended ## .. ## pygame.image ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/joystick.rst.txt0000644000175100001770000004567514676242340023133 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.joystick` ====================== .. module:: pygame.joystick :synopsis: Pygame module for interacting with joysticks, gamepads, and trackballs. | :sl:`Pygame module for interacting with joysticks, gamepads, and trackballs.` The joystick module manages the joystick devices on a computer. Joystick devices include trackballs and video-game-style gamepads, and the module allows the use of multiple buttons and "hats". Computers may manage multiple joysticks at a time. Each instance of the Joystick class represents one gaming device plugged into the computer. If a gaming pad has multiple joysticks on it, then the joystick object can actually represent multiple joysticks on that single game device. For a quick way to initialise the joystick module and get a list of Joystick instances use the following code:: pygame.joystick.init() joysticks = [pygame.joystick.Joystick(x) for x in range(pygame.joystick.get_count())] The following event types will be generated by the joysticks :: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION And in pygame 2, which supports hotplugging:: JOYDEVICEADDED JOYDEVICEREMOVED Note that in pygame 2, joysticks events use a unique "instance ID". The device index passed in the constructor to a Joystick object is not unique after devices have been added and removed. You must call :meth:`Joystick.get_instance_id()` to find the instance ID that was assigned to a Joystick on opening. The event queue needs to be pumped frequently for some of the methods to work. So call one of pygame.event.get, pygame.event.wait, or pygame.event.pump regularly. To be able to get joystick events and update the joystick objects while the window is not in focus, you may set the ``SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS`` environment variable. See :ref:`environment variables ` for more details. .. function:: init | :sl:`Initialize the joystick module.` | :sg:`init() -> None` This function is called automatically by ``pygame.init()``. It initializes the joystick module. The module must be initialized before any other functions will work. It is safe to call this function more than once. .. ## pygame.joystick.init ## .. function:: quit | :sl:`Uninitialize the joystick module.` | :sg:`quit() -> None` Uninitialize the joystick module. After you call this any existing joystick objects will no longer work. It is safe to call this function more than once. .. ## pygame.joystick.quit ## .. function:: get_init | :sl:`Returns True if the joystick module is initialized.` | :sg:`get_init() -> bool` Test if the ``pygame.joystick.init()`` function has been called. .. ## pygame.joystick.get_init ## .. function:: get_count | :sl:`Returns the number of joysticks.` | :sg:`get_count() -> count` Return the number of joystick devices on the system. The count will be ``0`` if there are no joysticks on the system. When you create Joystick objects using ``Joystick(id)``, you pass an integer that must be lower than this count. .. ## pygame.joystick.get_count ## .. class:: Joystick | :sl:`Create a new Joystick object.` | :sg:`Joystick(id) -> Joystick` Create a new joystick to access a physical device. The id argument must be a value from ``0`` to ``pygame.joystick.get_count() - 1``. Joysticks are initialised on creation and are shut down when deallocated. Once the device is initialized the pygame event queue will start receiving events about its input. .. versionchanged:: 2.0.0 Joystick objects are now opened immediately on creation. .. method:: init | :sl:`initialize the Joystick` | :sg:`init() -> None` Initialize the joystick, if it has been closed. It is safe to call this even if the joystick is already initialized. .. deprecated:: 2.0.0 In future it will not be possible to reinitialise a closed Joystick object. Will be removed in Pygame 2.1. .. ## Joystick.init ## .. method:: quit | :sl:`uninitialize the Joystick` | :sg:`quit() -> None` Close a Joystick object. After this the pygame event queue will no longer receive events from the device. It is safe to call this more than once. .. ## Joystick.quit ## .. method:: get_init | :sl:`check if the Joystick is initialized` | :sg:`get_init() -> bool` Return True if the Joystick object is currently initialised. .. ## Joystick.get_init ## .. method:: get_id | :sl:`get the device index (deprecated)` | :sg:`get_id() -> int` Returns the original device index for this device. This is the same value that was passed to the ``Joystick()`` constructor. This method can safely be called while the Joystick is not initialized. .. deprecated:: 2.0.0 The original device index is not useful in pygame 2. Use :meth:`.get_instance_id` instead. Will be removed in Pygame 2.1. .. method:: get_instance_id() -> int | :sl:`get the joystick instance id` | :sg:`get_instance_id() -> int` Get the joystick instance ID. This matches the ``instance_id`` field that is given in joystick events. .. versionadded:: 2.0.0dev11 .. method:: get_guid() -> str | :sl:`get the joystick GUID` | :sg:`get_guid() -> str` Get the GUID string. This identifies the exact hardware of the joystick device. .. versionadded:: 2.0.0dev11 .. method:: get_power_level() -> str | :sl:`get the approximate power status of the device` | :sg:`get_power_level() -> str` Get a string giving the power status of the device. One of: ``empty``, ``low``, ``medium``, ``full``, ``wired``, ``max``, or ``unknown``. .. versionadded:: 2.0.0dev11 .. ## Joystick.get_id ## .. method:: get_name | :sl:`get the Joystick system name` | :sg:`get_name() -> string` Returns the system name for this joystick device. It is unknown what name the system will give to the Joystick, but it should be a unique name that identifies the device. This method can safely be called while the Joystick is not initialized. .. ## Joystick.get_name ## .. method:: get_numaxes | :sl:`get the number of axes on a Joystick` | :sg:`get_numaxes() -> int` Returns the number of input axes are on a Joystick. There will usually be two for the position. Controls like rudders and throttles are treated as additional axes. The ``pygame.JOYAXISMOTION`` events will be in the range from ``-1.0`` to ``1.0``. A value of ``0.0`` means the axis is centered. Gamepad devices will usually be ``-1``, ``0``, or ``1`` with no values in between. Older analog joystick axes will not always use the full ``-1`` to ``1`` range, and the centered value will be some area around ``0``. Analog joysticks usually have a bit of noise in their axis, which will generate a lot of rapid small motion events. .. ## Joystick.get_numaxes ## .. method:: get_axis | :sl:`get the current position of an axis` | :sg:`get_axis(axis_number) -> float` Returns the current position of a joystick axis. The value will range from ``-1`` to ``1`` with a value of ``0`` being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at ``0`` or using the full range of position values. The axis number must be an integer from ``0`` to ``get_numaxes() - 1``. When using gamepads both the control sticks and the analog triggers are usually reported as axes. .. ## Joystick.get_axis ## .. method:: get_numballs | :sl:`get the number of trackballs on a Joystick` | :sg:`get_numballs() -> int` Returns the number of trackball devices on a Joystick. These devices work similar to a mouse but they have no absolute position; they only have relative amounts of movement. The ``pygame.JOYBALLMOTION`` event will be sent when the trackball is rolled. It will report the amount of movement on the trackball. .. ## Joystick.get_numballs ## .. method:: get_ball | :sl:`get the relative position of a trackball` | :sg:`get_ball(ball_number) -> x, y` Returns the relative movement of a joystick button. The value is a ``x, y`` pair holding the relative movement since the last call to get_ball. The ball number must be an integer from ``0`` to ``get_numballs() - 1``. .. ## Joystick.get_ball ## .. method:: get_numbuttons | :sl:`get the number of buttons on a Joystick` | :sg:`get_numbuttons() -> int` Returns the number of pushable buttons on the joystick. These buttons have a boolean (on or off) state. Buttons generate a ``pygame.JOYBUTTONDOWN`` and ``pygame.JOYBUTTONUP`` event when they are pressed and released. .. ## Joystick.get_numbuttons ## .. method:: get_button | :sl:`get the current button state` | :sg:`get_button(button) -> bool` Returns the current state of a joystick button. .. ## Joystick.get_button ## .. method:: get_numhats | :sl:`get the number of hat controls on a Joystick` | :sg:`get_numhats() -> int` Returns the number of joystick hats on a Joystick. Hat devices are like miniature digital joysticks on a joystick. Each hat has two axes of input. The ``pygame.JOYHATMOTION`` event is generated when the hat changes position. The ``position`` attribute for the event contains a pair of values that are either ``-1``, ``0``, or ``1``. A position of ``(0, 0)`` means the hat is centered. .. ## Joystick.get_numhats ## .. method:: get_hat | :sl:`get the position of a joystick hat` | :sg:`get_hat(hat_number) -> x, y` Returns the current position of a position hat. The position is given as two values representing the ``x`` and ``y`` position for the hat. ``(0, 0)`` means centered. A value of ``-1`` means left/down and a value of ``1`` means right/up: so ``(-1, 0)`` means left; ``(1, 0)`` means right; ``(0, 1)`` means up; ``(1, 1)`` means upper-right; etc. This value is digital, ``i.e.``, each coordinate can be ``-1``, ``0`` or ``1`` but never in-between. The hat number must be between ``0`` and ``get_numhats() - 1``. .. ## Joystick.get_hat ## .. method:: rumble | :sl:`Start a rumbling effect` | :sg:`rumble(low_frequency, high_frequency, duration) -> bool` Start a rumble effect on the joystick, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Joystick.stop_rumble` is called. If an effect is already playing, then it will be overwritten. Returns True if the rumble was played successfully or False if the joystick does not support it or :meth:`pygame.version.SDL` is below 2.0.9. .. versionadded:: 2.0.2 .. ## Joystick.rumble ## .. method:: stop_rumble | :sl:`Stop any rumble effect playing` | :sg:`stop_rumble() -> None` Stops any rumble effect playing on the joystick. See :meth:`Joystick.rumble` for more information. .. versionadded:: 2.0.2 .. ## Joystick.stop_rumble ## .. ## pygame.joystick.Joystick ## .. ## pygame.joystick ## .. figure:: code_examples/joystick_calls.png :scale: 100 % :alt: joystick module example Example code for joystick module. .. literalinclude:: ../../../examples/joystick.py .. _controller-mappings: Common Controller Axis Mappings =============================== Controller mappings are drawn from the underlying SDL library which pygame uses and they differ between pygame 1 and pygame 2. Below are a couple of mappings for three popular controllers. Axis and hat mappings are listed from -1 to +1. Nintendo Switch Left Joy-Con (pygame 2.x) ***************************************** The Nintendo Switch Left Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad" * **Buttons**:: D-pad Up - Button 0 D-pad Down - Button 1 D-pad Left - Button 2 D-pad Right - Button 3 SL - Button 4 SR - Button 5 - - Button 8 Stick In - Button 10 Capture - Button 13 L - Button 14 ZL - Button 15 * **Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis Nintendo Switch Right Joy-Con (pygame 2.x) ****************************************** The Nintendo Switch Right Joy-Con has 4 axes, 11 buttons, and 0 hats. The values for the 4 axes never change. The controller is recognized as "Wireless Gamepad" * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 SL - Button 4 SR - Button 5 + - Button 9 Stick In - Button 11 Home - Button 12 R - Button 14 ZR - Button 15 * **Hat/JoyStick**:: Down -> Up - Y Axis Left -> Right - X Axis Nintendo Switch Pro Controller (pygame 2.x) ******************************************* The Nintendo Switch Pro Controller has 6 axes, 16 buttons, and 0 hats. The controller is recognized as "Nintendo Switch Pro Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 4 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 - Button - Button 4 Home Button - Button 5 + Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Capture Button - Button 15 XBox 360 Controller (pygame 2.x) ******************************** The Xbox 360 controller mapping has 6 axes, 11 buttons and 1 hat. The controller is recognized as "Xbox 360 Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 * **Left Trigger**:: Out -> In - Axis 2 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 Guide Button - Button 10 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis Playstation 4 Controller (pygame 2.x) ************************************* The PlayStation 4 controller mapping has 6 axes and 16 buttons. The controller is recognized as "PS4 Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 4 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Share Button - Button 4 PS Button - Button 5 Options Button - Button 6 L. Stick In - Button 7 R. Stick In - Button 8 Left Bumper - Button 9 Right Bumper - Button 10 D-pad Up - Button 11 D-pad Down - Button 12 D-pad Left - Button 13 D-pad Right - Button 14 Touch Pad Click - Button 15 Playstation 5 Controller (pygame 2.x) ************************************* The PlayStation 5 controller mapping has 6 axes, 13 buttons, and 1 hat. The controller is recognized as "Sony Interactive Entertainment Wireless Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 3 Up -> Down - Axis 4 * **Left Trigger**:: Out -> In - Axis 2 * **Right Trigger**:: Out -> In - Axis 5 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Left Trigger - Button 6 Right Trigger - Button 7 Share Button - Button 8 Options Button - Button 9 PS Button - Button 10 Left Stick in - Button 11 Right Stick in - Button 12 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis XBox 360 Controller (pygame 1.x) ******************************** The Xbox 360 controller mapping has 5 axes, 10 buttons, and 1 hat. The controller is recognized as "Controller (XBOX 360 For Windows)". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 4 Up -> Down - Axis 3 * **Left Trigger & Right Trigger**:: RT -> LT - Axis 2 * **Buttons**:: A Button - Button 0 B Button - Button 1 X Button - Button 2 Y Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 Back Button - Button 6 Start Button - Button 7 L. Stick In - Button 8 R. Stick In - Button 9 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis Playstation 4 Controller (pygame 1.x) ************************************* The PlayStation 4 controller mapping has 6 axes, 14 buttons, and 1 hat. The controller is recognized as "Wireless Controller". * **Left Stick**:: Left -> Right - Axis 0 Up -> Down - Axis 1 * **Right Stick**:: Left -> Right - Axis 2 Up -> Down - Axis 3 * **Left Trigger**:: Out -> In - Axis 5 * **Right Trigger**:: Out -> In - Axis 4 * **Buttons**:: Cross Button - Button 0 Circle Button - Button 1 Square Button - Button 2 Triangle Button - Button 3 Left Bumper - Button 4 Right Bumper - Button 5 L. Trigger(Full)- Button 6 R. Trigger(Full)- Button 7 Share Button - Button 8 Options Button - Button 9 L. Stick In - Button 10 R. Stick In - Button 11 PS Button - Button 12 Touch Pad Click - Button 13 * **Hat/D-pad**:: Down -> Up - Y Axis Left -> Right - X Axis ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/key.rst.txt0000644000175100001770000003770714676242340022061 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.key` ================= .. module:: pygame.key :synopsis: pygame module to work with the keyboard | :sl:`pygame module to work with the keyboard` This module contains functions for dealing with the keyboard. The :mod:`pygame.event` queue gets ``pygame.KEYDOWN`` and ``pygame.KEYUP`` events when the keyboard buttons are pressed and released. Both events have ``key`` and ``mod`` attributes. * ``key``: an :ref:`integer ID ` representing every key on the keyboard * ``mod``: a bitmask of all the :ref:`modifier keys ` that were in a pressed state when the event occurred The ``pygame.KEYDOWN`` event has the additional attributes ``unicode`` and ``scancode``. * ``unicode``: a single character string that is the fully translated character entered, this takes into account the shift and composition keys * ``scancode``: the platform-specific key code, which could be different from keyboard to keyboard, but is useful for key selection of weird keys like the multimedia keys .. versionadded:: 2.0.0 The ``pygame.TEXTINPUT`` event is preferred to the ``unicode`` attribute of ``pygame.KEYDOWN``. The attribute ``text`` contains the input. .. _key-constants-label: The following is a list of all the constants (from :mod:`pygame.locals`) used to represent keyboard keys. Portability note: The integers for key constants differ between pygame 1 and 2. Always use key constants (``K_a``) rather than integers directly (``97``) so that your key handling code works well on both pygame 1 and pygame 2. :: pygame Constant ASCII Description --------------------------------- K_BACKSPACE \b backspace K_TAB \t tab K_CLEAR clear K_RETURN \r return K_PAUSE pause K_ESCAPE ^[ escape K_SPACE space K_EXCLAIM ! exclaim K_QUOTEDBL " quotedbl K_HASH # hash K_DOLLAR $ dollar K_AMPERSAND & ampersand K_QUOTE quote K_LEFTPAREN ( left parenthesis K_RIGHTPAREN ) right parenthesis K_ASTERISK * asterisk K_PLUS + plus sign K_COMMA , comma K_MINUS - minus sign K_PERIOD . period K_SLASH / forward slash K_0 0 0 K_1 1 1 K_2 2 2 K_3 3 3 K_4 4 4 K_5 5 5 K_6 6 6 K_7 7 7 K_8 8 8 K_9 9 9 K_COLON : colon K_SEMICOLON ; semicolon K_LESS < less-than sign K_EQUALS = equals sign K_GREATER > greater-than sign K_QUESTION ? question mark K_AT @ at K_LEFTBRACKET [ left bracket K_BACKSLASH \ backslash K_RIGHTBRACKET ] right bracket K_CARET ^ caret K_UNDERSCORE _ underscore K_BACKQUOTE ` grave K_a a a K_b b b K_c c c K_d d d K_e e e K_f f f K_g g g K_h h h K_i i i K_j j j K_k k k K_l l l K_m m m K_n n n K_o o o K_p p p K_q q q K_r r r K_s s s K_t t t K_u u u K_v v v K_w w w K_x x x K_y y y K_z z z K_DELETE delete K_KP0 keypad 0 K_KP1 keypad 1 K_KP2 keypad 2 K_KP3 keypad 3 K_KP4 keypad 4 K_KP5 keypad 5 K_KP6 keypad 6 K_KP7 keypad 7 K_KP8 keypad 8 K_KP9 keypad 9 K_KP_PERIOD . keypad period K_KP_DIVIDE / keypad divide K_KP_MULTIPLY * keypad multiply K_KP_MINUS - keypad minus K_KP_PLUS + keypad plus K_KP_ENTER \r keypad enter K_KP_EQUALS = keypad equals K_UP up arrow K_DOWN down arrow K_RIGHT right arrow K_LEFT left arrow K_INSERT insert K_HOME home K_END end K_PAGEUP page up K_PAGEDOWN page down K_F1 F1 K_F2 F2 K_F3 F3 K_F4 F4 K_F5 F5 K_F6 F6 K_F7 F7 K_F8 F8 K_F9 F9 K_F10 F10 K_F11 F11 K_F12 F12 K_F13 F13 K_F14 F14 K_F15 F15 K_NUMLOCK numlock K_CAPSLOCK capslock K_SCROLLOCK scrollock K_RSHIFT right shift K_LSHIFT left shift K_RCTRL right control K_LCTRL left control K_RALT right alt K_LALT left alt K_RMETA right meta K_LMETA left meta K_LSUPER left Windows key K_RSUPER right Windows key K_MODE mode shift K_HELP help K_PRINT print screen K_SYSREQ sysrq K_BREAK break K_MENU menu K_POWER power K_EURO Euro K_AC_BACK Android back button .. _key-modifiers-label: The keyboard also has a list of modifier states (from :mod:`pygame.locals`) that can be assembled by bitwise-ORing them together. :: pygame Constant Description ------------------------- KMOD_NONE no modifier keys pressed KMOD_LSHIFT left shift KMOD_RSHIFT right shift KMOD_SHIFT left shift or right shift or both KMOD_LCTRL left control KMOD_RCTRL right control KMOD_CTRL left control or right control or both KMOD_LALT left alt KMOD_RALT right alt KMOD_ALT left alt or right alt or both KMOD_LMETA left meta KMOD_RMETA right meta KMOD_META left meta or right meta or both KMOD_CAPS caps lock KMOD_NUM num lock KMOD_MODE AltGr The modifier information is contained in the ``mod`` attribute of the ``pygame.KEYDOWN`` and ``pygame.KEYUP`` events. The ``mod`` attribute is a bitmask of all the modifier keys that were in a pressed state when the event occurred. The modifier information can be decoded using a bitwise AND (except for ``KMOD_NONE``, which should be compared using equals ``==``). For example: :: for event in pygame.event.get(): if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP: if event.mod == pygame.KMOD_NONE: print('No modifier keys were in a pressed state when this ' 'event occurred.') else: if event.mod & pygame.KMOD_LSHIFT: print('Left shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_RSHIFT: print('Right shift was in a pressed state when this event ' 'occurred.') if event.mod & pygame.KMOD_SHIFT: print('Left shift or right shift or both were in a ' 'pressed state when this event occurred.') .. function:: get_focused | :sl:`true if the display is receiving keyboard input from the system` | :sg:`get_focused() -> bool` Returns ``True`` when the display window has keyboard focus from the system. If the display needs to ensure it does not lose keyboard focus, it can use :func:`pygame.event.set_grab()` to grab all input. .. ## pygame.key.get_focused ## .. function:: get_pressed | :sl:`get the state of all keyboard buttons` | :sg:`get_pressed() -> bools` Returns a sequence of boolean values representing the state of every key on the keyboard. Use the key constant values to index the array. A ``True`` value means that the button is pressed. .. note:: Getting the list of pushed buttons with this function is not the proper way to handle text entry from the user. There is no way to know the order of keys pressed, and rapidly pushed keys can be completely unnoticed between two calls to ``pygame.key.get_pressed()``. There is also no way to translate these pushed keys into a fully translated character value. See the ``pygame.KEYDOWN`` events on the :mod:`pygame.event` queue for this functionality. .. versionadded:: 2.2.0 The collection of bools returned by ``get_pressed`` can not be iterated over because the indexes of the internal tuple does not correspond to the keycodes. .. versionadded:: 2.5.0 Iteration over the collection of bools returned by ``get_pressed`` is now restored. However it still does not make sense to iterate over it. Currently. .. ## pygame.key.get_pressed ## .. function:: get_mods | :sl:`determine which modifier keys are being held` | :sg:`get_mods() -> int` Returns a single integer representing a bitmask of all the modifier keys being held. Using bitwise operators you can test if specific :ref:`modifier keys ` are pressed. .. ## pygame.key.get_mods ## .. function:: set_mods | :sl:`temporarily set which modifier keys are pressed` | :sg:`set_mods(int) -> None` Create a bitmask of the :ref:`modifier key constants ` you want to impose on your program. .. ## pygame.key.set_mods ## .. function:: set_repeat | :sl:`control how held keys are repeated` | :sg:`set_repeat() -> None` | :sg:`set_repeat(delay) -> None` | :sg:`set_repeat(delay, interval) -> None` When the keyboard repeat is enabled, keys that are held down will generate multiple ``pygame.KEYDOWN`` events. The ``delay`` parameter is the number of milliseconds before the first repeated ``pygame.KEYDOWN`` event will be sent. After that, another ``pygame.KEYDOWN`` event will be sent every ``interval`` milliseconds. If a ``delay`` value is provided and an ``interval`` value is not provided or is 0, then the ``interval`` will be set to the same value as ``delay``. To disable key repeat call this function with no arguments or with ``delay`` set to 0. When pygame is initialized the key repeat is disabled. :raises ValueError: if ``delay`` or ``interval`` is < 0 .. versionchanged:: 2.0.0 A ``ValueError`` is now raised (instead of a ``pygame.error``) if ``delay`` or ``interval`` is < 0. .. ## pygame.key.set_repeat ## .. function:: get_repeat | :sl:`see how held keys are repeated` | :sg:`get_repeat() -> (delay, interval)` Get the ``delay`` and ``interval`` keyboard repeat values. Refer to :func:`pygame.key.set_repeat()` for a description of these values. .. versionadded:: 1.8 .. ## pygame.key.get_repeat ## .. function:: name | :sl:`get the name of a key identifier` | :sg:`name(key, use_compat=True) -> str` Get the descriptive name of the button from a keyboard button id constant. Returns an empty string (``""``) if the key is not found. If ``use_compat`` argument is ``True`` (which is the default), this function returns the legacy name of a key where applicable. The return value is expected to be the same across different pygame versions (provided the corresponding key constant exists and is unique). If the return value is passed to the ``key_code`` function, the original constant will be returned. **Experimental:** ``use_compat`` parameter still in development for testing and feedback. It may change. `Please leave use_compat feedback with authors `_ If this argument is ``False``, the returned name may be prettier to display and may cover a wider range of keys than with ``use_compat``, but there are no guarantees that this name will be the same across different pygame versions. If the name returned is passed to the ``key_code`` function, the original constant is returned back (this is an implementation detail which may change later, do not rely on this) .. versionchanged:: 2.1.3 Added ``use_compat`` argument and guaranteed API stability for it .. ## pygame.key.name ## .. function:: key_code | :sl:`get the key identifier from a key name` | :sg:`key_code(name=string) -> int` Get the key identifier code from the descriptive name of the key. This returns an integer matching one of the K_* keycodes. For example: :: >>> pygame.key.key_code("return") == pygame.K_RETURN True >>> pygame.key.key_code("0") == pygame.K_0 True >>> pygame.key.key_code("space") == pygame.K_SPACE True :raises ValueError: if the key name is not known. .. versionadded:: 2.0.0 .. ## pygame.key.key_code ## .. function:: start_text_input | :sl:`start handling Unicode text input events` | :sg:`start_text_input() -> None` Start receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If applicable, show the on-screen keyboard or IME editor. For many languages, key presses will automatically generate a corresponding ``pygame.TEXTINPUT`` event. Special keys like escape or function keys, and certain key combinations will not generate ``pygame.TEXTINPUT`` events. In other languages, entering a single symbol may require multiple key presses, or a language-specific user interface. In this case, ``pygame.TEXTINPUT`` events are preferable to ``pygame.KEYDOWN`` events for text input. A ``pygame.TEXTEDITING`` event is received when an IME composition is started or changed. It contains the composition ``text``, ``length``, and editing ``start`` position within the composition (attributes ``text``, ``length``, and ``start``, respectively). When the composition is committed (or non-IME input is received), a ``pygame.TEXTINPUT`` event is generated. Text input events handling is on by default. .. versionadded:: 2.0.0 .. ## pygame.key.start_text_input ## .. function:: stop_text_input | :sl:`stop handling Unicode text input events` | :sg:`stop_text_input() -> None` Stop receiving ``pygame.TEXTEDITING`` and ``pygame.TEXTINPUT`` events. If an on-screen keyboard or IME editor was shown with ``pygame.key.start_text_input()``, hide it again. Text input events handling is on by default. To avoid triggering the IME editor or the on-screen keyboard when the user is holding down a key during gameplay, text input should be disabled once text entry is finished, or when the user clicks outside of a text box. .. versionadded:: 2.0.0 .. ## pygame.key.stop_text_input ## .. function:: set_text_input_rect | :sl:`controls the position of the candidate list` | :sg:`set_text_input_rect(Rect) -> None` This sets the rectangle used for typing with an IME. It controls where the candidate list will open, if supported. .. versionadded:: 2.0.0 .. ## pygame.key.set_text_input_rect ## .. ## pygame.key ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/locals.rst.txt0000644000175100001770000000177614676242340022543 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.locals` ==================== .. module:: pygame.locals :synopsis: pygame constants | :sl:`pygame constants` This module contains various constants used by pygame. Its contents are automatically placed in the pygame module namespace. However, an application can use ``pygame.locals`` to include only the pygame constants with a ``from pygame.locals import *``. Detailed descriptions of the various constants can be found throughout the pygame documentation. Here are the locations of some of them. - The :mod:`pygame.display` module contains flags like ``FULLSCREEN`` used by :func:`pygame.display.set_mode`. - The :mod:`pygame.event` module contains the various event types. - The :mod:`pygame.key` module lists the keyboard constants and modifiers (``K_``\* and ``MOD_``\*) relating to the ``key`` and ``mod`` attributes of the ``KEYDOWN`` and ``KEYUP`` events. - The :mod:`pygame.time` module defines ``TIMER_RESOLUTION``. .. ## pygame.locals ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/mask.rst.txt0000644000175100001770000005723414676242340022221 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mask` ================== .. module:: pygame.mask :synopsis: pygame module for image masks. | :sl:`pygame module for image masks.` Useful for fast pixel perfect collision detection. A mask uses 1 bit per-pixel to store which parts collide. .. versionadded:: 1.8 .. versionchanged:: 2.0.2 Mask functions now support keyword arguments. .. versionchanged:: 2.0.2 Mask functions that take positions or offsets now support :class:`pygame.math.Vector2` arguments. .. function:: from_surface | :sl:`Creates a Mask from the given surface` | :sg:`from_surface(surface) -> Mask` | :sg:`from_surface(surface, threshold=127) -> Mask` Creates a :class:`Mask` object from the given surface by setting all the opaque pixels and not setting the transparent pixels. If the surface uses a color-key, then it is used to decide which bits in the resulting mask are set. All the pixels that are **not** equal to the color-key are **set** and the pixels equal to the color-key are not set. If a color-key is not used, then the alpha value of each pixel is used to decide which bits in the resulting mask are set. All the pixels that have an alpha value **greater than** the ``threshold`` parameter are **set** and the pixels with an alpha value less than or equal to the ``threshold`` are not set. :param Surface surface: the surface to create the mask from :param int threshold: (optional) the alpha threshold (default is 127) to compare with each surface pixel's alpha value, if the ``surface`` is color-keyed this parameter is ignored :returns: a newly created :class:`Mask` object from the given surface :rtype: Mask .. note:: This function is used to create the masks for :func:`pygame.sprite.collide_mask`. .. ## pygame.mask.from_surface ## .. function:: from_threshold | :sl:`Creates a mask by thresholding Surfaces` | :sg:`from_threshold(surface, color) -> Mask` | :sg:`from_threshold(surface, color, threshold=(0, 0, 0, 255), othersurface=None, palette_colors=1) -> Mask` This is a more featureful method of getting a :class:`Mask` from a surface. If the optional ``othersurface`` is not used, all the pixels **within** the ``threshold`` of the ``color`` parameter are **set** in the resulting mask. If the optional ``othersurface`` is used, every pixel in the first surface that is **within** the ``threshold`` of the corresponding pixel in ``othersurface`` is **set** in the resulting mask. :param Surface surface: the surface to create the mask from :param color: color used to check if the surface's pixels are within the given ``threshold`` range, this parameter is ignored if the optional ``othersurface`` parameter is supplied :type color: Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]] :param threshold: (optional) the threshold range used to check the difference between two colors (default is ``(0, 0, 0, 255)``) :type threshold: Color or int or tuple(int, int, int, [int]) or list[int, int, int, [int]] :param Surface othersurface: (optional) used to check whether the pixels of the first surface are within the given ``threshold`` range of the pixels from this surface (default is ``None``) :param int palette_colors: (optional) indicates whether to use the palette colors or not, a nonzero value causes the palette colors to be used and a 0 causes them not to be used (default is 1) :returns: a newly created :class:`Mask` object from the given surface :rtype: Mask .. ## pygame.mask.from_threshold ## .. class:: Mask | :sl:`pygame object for representing 2D bitmasks` | :sg:`Mask(size=(width, height)) -> Mask` | :sg:`Mask(size=(width, height), fill=False) -> Mask` A ``Mask`` object is used to represent a 2D bitmask. Each bit in the mask represents a pixel. 1 is used to indicate a set bit and 0 is used to indicate an unset bit. Set bits in a mask can be used to detect collisions with other masks and their set bits. A filled mask has all of its bits set to 1, conversely an unfilled/cleared/empty mask has all of its bits set to 0. Masks can be created unfilled (default) or filled by using the ``fill`` parameter. Masks can also be cleared or filled using the :func:`pygame.mask.Mask.clear()` and :func:`pygame.mask.Mask.fill()` methods respectively. A mask's coordinates start in the top left corner at ``(0, 0)`` just like :mod:`pygame.Surface`. Individual bits can be accessed using the :func:`pygame.mask.Mask.get_at()` and :func:`pygame.mask.Mask.set_at()` methods. .. _mask-offset-label: The methods :meth:`overlap`, :meth:`overlap_area`, :meth:`overlap_mask`, :meth:`draw`, :meth:`erase`, and :meth:`convolve` use an offset parameter to indicate the offset of another mask's top left corner from the calling mask's top left corner. The calling mask's top left corner is considered to be the origin ``(0, 0)``. Offsets are a sequence of two values ``(x_offset, y_offset)``. Positive and negative offset values are supported. :: 0 to x (x_offset) : : 0 ..... +----:---------+ to | : | y .......... +-----------+ (y_offset) | | othermask | | +-----------+ | calling_mask | +--------------+ :param size: the dimensions of the mask (width and height) :param bool fill: (optional) create an unfilled mask (default: ``False``) or filled mask (``True``) :returns: a newly created :class:`Mask` object :rtype: Mask .. versionchanged:: 2.0.0 Shallow copy support added. The :class:`Mask` class supports the special method ``__copy__()`` and shallow copying via ``copy.copy(mask)``. .. versionchanged:: 2.0.0 Subclassing support added. The :class:`Mask` class can be used as a base class. .. versionchanged:: 1.9.5 Added support for keyword arguments. .. versionchanged:: 1.9.5 Added the optional keyword parameter ``fill``. .. versionchanged:: 1.9.5 Added support for masks with a width and/or a height of 0. .. method:: copy | :sl:`Returns a new copy of the mask` | :sg:`copy() -> Mask` :returns: a new copy of this mask, the new mask will have the same width, height, and set/unset bits as the original :rtype: Mask .. note:: If a mask subclass needs to copy any instance specific attributes then it should override the ``__copy__()`` method. The overridden ``__copy__()`` method needs to call ``super().__copy__()`` and then copy the required data as in the following example code. :: class SubMask(pygame.mask.Mask): def __copy__(self): new_mask = super().__copy__() # Do any SubMask attribute copying here. return new_mask .. versionadded:: 2.0.0 .. ## Mask.copy ## .. method:: get_size | :sl:`Returns the size of the mask` | :sg:`get_size() -> (width, height)` :returns: the size of the mask, (width, height) :rtype: tuple(int, int) .. ## Mask.get_size ## .. method:: get_rect | :sl:`Returns a Rect based on the size of the mask` | :sg:`get_rect(\**kwargs) -> Rect` Returns a new :func:`pygame.Rect` object based on the size of this mask. The rect's default position will be ``(0, 0)`` and its default width and height will be the same as this mask's. The rect's attributes can be altered via :func:`pygame.Rect` attribute keyword arguments/values passed into this method. As an example, ``a_mask.get_rect(center=(10, 5))`` would create a :func:`pygame.Rect` based on the mask's size centered at the given position. :param dict kwargs: :func:`pygame.Rect` attribute keyword arguments/values that will be applied to the rect :returns: a new :func:`pygame.Rect` object based on the size of this mask with any :func:`pygame.Rect` attribute keyword arguments/values applied to it :rtype: Rect .. versionadded:: 2.0.0 .. ## Mask.get_rect ## .. method:: get_at | :sl:`Gets the bit at the given position` | :sg:`get_at(pos) -> int` :param pos: the position of the bit to get (x, y) :returns: 1 if the bit is set, 0 if the bit is not set :rtype: int :raises IndexError: if the position is outside of the mask's bounds .. ## Mask.get_at ## .. method:: set_at | :sl:`Sets the bit at the given position` | :sg:`set_at(pos) -> None` | :sg:`set_at(pos, value=1) -> None` :param pos: the position of the bit to set (x, y) :param int value: any nonzero int will set the bit to 1, 0 will set the bit to 0 (default is 1) :returns: ``None`` :rtype: NoneType :raises IndexError: if the position is outside of the mask's bounds .. ## Mask.set_at ## .. method:: overlap | :sl:`Returns the point of intersection` | :sg:`overlap(other, offset) -> (x, y)` | :sg:`overlap(other, offset) -> None` Returns the first point of intersection encountered between this mask and ``other``. A point of intersection is 2 overlapping set bits. The current algorithm searches the overlapping area in ``sizeof(unsigned long int) * CHAR_BIT`` bit wide column blocks (the value of ``sizeof(unsigned long int) * CHAR_BIT`` is platform dependent, for clarity it will be referred to as ``W``). Starting at the top left corner it checks bits 0 to ``W - 1`` of the first row (``(0, 0)`` to ``(W - 1, 0)``) then continues to the next row (``(0, 1)`` to ``(W - 1, 1)``). Once this entire column block is checked, it continues to the next one (``W`` to ``2 * W - 1``). This is repeated until it finds a point of intersection or the entire overlapping area is checked. :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: point of intersection or ``None`` if no intersection :rtype: tuple(int, int) or NoneType .. ## Mask.overlap ## .. method:: overlap_area | :sl:`Returns the number of overlapping set bits` | :sg:`overlap_area(other, offset) -> numbits` Returns the number of overlapping set bits between between this mask and ``other``. This can be useful for collision detection. An approximate collision normal can be found by calculating the gradient of the overlapping area through the finite difference. :: dx = mask.overlap_area(other, (x + 1, y)) - mask.overlap_area(other, (x - 1, y)) dy = mask.overlap_area(other, (x, y + 1)) - mask.overlap_area(other, (x, y - 1)) :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: the number of overlapping set bits :rtype: int .. ## Mask.overlap_area ## .. method:: overlap_mask | :sl:`Returns a mask of the overlapping set bits` | :sg:`overlap_mask(other, offset) -> Mask` Returns a :class:`Mask`, the same size as this mask, containing the overlapping set bits between this mask and ``other``. :param Mask other: the other mask to overlap with this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: a newly created :class:`Mask` with the overlapping bits set :rtype: Mask .. ## Mask.overlap_mask ## .. method:: fill | :sl:`Sets all bits to 1` | :sg:`fill() -> None` Sets all bits in the mask to 1. :returns: ``None`` :rtype: NoneType .. ## Mask.fill ## .. method:: clear | :sl:`Sets all bits to 0` | :sg:`clear() -> None` Sets all bits in the mask to 0. :returns: ``None`` :rtype: NoneType .. ## Mask.clear ## .. method:: invert | :sl:`Flips all the bits` | :sg:`invert() -> None` Flips all of the bits in the mask. All the set bits are cleared to 0 and all the unset bits are set to 1. :returns: ``None`` :rtype: NoneType .. ## Mask.invert ## .. method:: scale | :sl:`Resizes a mask` | :sg:`scale((width, height)) -> Mask` Creates a new :class:`Mask` of the requested size with its bits scaled from this mask. :param size: the width and height (size) of the mask to create :returns: a new :class:`Mask` object with its bits scaled from this mask :rtype: Mask :raises ValueError: if ``width < 0`` or ``height < 0`` .. ## Mask.scale ## .. method:: draw | :sl:`Draws a mask onto another` | :sg:`draw(other, offset) -> None` Performs a bitwise OR, drawing ``othermask`` onto this mask. :param Mask other: the mask to draw onto this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: ``None`` :rtype: NoneType .. ## Mask.draw ## .. method:: erase | :sl:`Erases a mask from another` | :sg:`erase(other, offset) -> None` Erases (clears) all bits set in ``other`` from this mask. :param Mask other: the mask to erase from this mask :param offset: the offset of ``other`` from this mask, for more details refer to the :ref:`Mask offset notes ` :returns: ``None`` :rtype: NoneType .. ## Mask.erase ## .. method:: count | :sl:`Returns the number of set bits` | :sg:`count() -> bits` :returns: the number of set bits in the mask :rtype: int .. ## Mask.count ## .. method:: centroid | :sl:`Returns the centroid of the set bits` | :sg:`centroid() -> (x, y)` Finds the centroid (the center mass of the set bits) for this mask. :returns: a coordinate tuple indicating the centroid of the mask, it will return ``(0, 0)`` if the mask has no bits set :rtype: tuple(int, int) .. ## Mask.centroid ## .. method:: angle | :sl:`Returns the orientation of the set bits` | :sg:`angle() -> theta` Finds the approximate orientation (from -90 to 90 degrees) of the set bits in the mask. This works best if performed on a mask with only one connected component. :returns: the orientation of the set bits in the mask, it will return ``0.0`` if the mask has no bits set :rtype: float .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.angle ## .. method:: outline | :sl:`Returns a list of points outlining an object` | :sg:`outline() -> [(x, y), ...]` | :sg:`outline(every=1) -> [(x, y), ...]` Returns a list of points of the outline of the first connected component encountered in the mask. To find a connected component, the mask is searched per row (left to right) starting in the top left corner. The ``every`` optional parameter skips set bits in the outline. For example, setting it to 10 would return a list of every 10th set bit in the outline. :param int every: (optional) indicates the number of bits to skip over in the outline (default is 1) :returns: a list of points outlining the first connected component encountered, an empty list is returned if the mask has no bits set :rtype: list[tuple(int, int)] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.outline ## .. method:: convolve | :sl:`Returns the convolution of this mask with another mask` | :sg:`convolve(other) -> Mask` | :sg:`convolve(other, output=None, offset=(0, 0)) -> Mask` Convolve this mask with the given ``other`` Mask. :param Mask other: mask to convolve this mask with :param output: (optional) mask for output (default is ``None``) :type output: Mask or NoneType :param offset: the offset of ``other`` from this mask, (default is ``(0, 0)``) :returns: a :class:`Mask` with the ``(i - offset[0], j - offset[1])`` bit set, if shifting ``other`` (such that its bottom right corner is at ``(i, j)``) causes it to overlap with this mask If an ``output`` Mask is specified, the output is drawn onto it and it is returned. Otherwise a mask of size ``(MAX(0, width + other mask's width - 1), MAX(0, height + other mask's height - 1))`` is created and returned. :rtype: Mask .. ## Mask.convolve ## .. method:: connected_component | :sl:`Returns a mask containing a connected component` | :sg:`connected_component() -> Mask` | :sg:`connected_component(pos) -> Mask` A connected component is a group (1 or more) of connected set bits (orthogonally and diagonally). The SAUF algorithm, which checks 8 point connectivity, is used to find a connected component in the mask. By default this method will return a :class:`Mask` containing the largest connected component in the mask. Optionally, a bit coordinate can be specified and the connected component containing it will be returned. If the bit at the given location is not set, the returned :class:`Mask` will be empty (no bits set). :param pos: (optional) selects the connected component that contains the bit at this position :returns: a :class:`Mask` object (same size as this mask) with the largest connected component from this mask, if this mask has no bits set then an empty mask will be returned If the ``pos`` parameter is provided then the mask returned will have the connected component that contains this position. An empty mask will be returned if the ``pos`` parameter selects an unset bit. :rtype: Mask :raises IndexError: if the optional ``pos`` parameter is outside of the mask's bounds .. ## Mask.connected_component ## .. method:: connected_components | :sl:`Returns a list of masks of connected components` | :sg:`connected_components() -> [Mask, ...]` | :sg:`connected_components(minimum=0) -> [Mask, ...]` Provides a list containing a :class:`Mask` object for each connected component. :param int minimum: (optional) indicates the minimum number of bits (to filter out noise) per connected component (default is 0, which equates to no minimum and is equivalent to setting it to 1, as a connected component must have at least 1 bit set) :returns: a list containing a :class:`Mask` object for each connected component, an empty list is returned if the mask has no bits set :rtype: list[Mask] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.connected_components ## .. method:: get_bounding_rects | :sl:`Returns a list of bounding rects of connected components` | :sg:`get_bounding_rects() -> [Rect, ...]` Provides a list containing a bounding rect for each connected component. :returns: a list containing a bounding rect for each connected component, an empty list is returned if the mask has no bits set :rtype: list[Rect] .. note:: See :meth:`connected_component` for details on how a connected component is calculated. .. ## Mask.get_bounding_rects ## .. method:: to_surface | :sl:`Returns a surface with the mask drawn on it` | :sg:`to_surface() -> Surface` | :sg:`to_surface(surface=None, setsurface=None, unsetsurface=None, setcolor=(255, 255, 255, 255), unsetcolor=(0, 0, 0, 255), dest=(0, 0)) -> Surface` Draws this mask on the given surface. Set bits (bits set to 1) and unset bits (bits set to 0) can be drawn onto a surface. :param surface: (optional) Surface to draw mask onto, if no surface is provided one will be created (default is ``None``, which will cause a surface with the parameters ``Surface(size=mask.get_size(), flags=SRCALPHA, depth=32)`` to be created, drawn on, and returned) :type surface: Surface or None :param setsurface: (optional) use this surface's color values to draw set bits (default is ``None``), if this surface is smaller than the mask any bits outside its bounds will use the ``setcolor`` value :type setsurface: Surface or None :param unsetsurface: (optional) use this surface's color values to draw unset bits (default is ``None``), if this surface is smaller than the mask any bits outside its bounds will use the ``unsetcolor`` value :type unsetsurface: Surface or None :param setcolor: (optional) color to draw set bits (default is ``(255, 255, 255, 255)``, white), use ``None`` to skip drawing the set bits, the ``setsurface`` parameter (if set) will takes precedence over this parameter :type setcolor: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None :param unsetcolor: (optional) color to draw unset bits (default is ``(0, 0, 0, 255)``, black), use ``None`` to skip drawing the unset bits, the ``unsetsurface`` parameter (if set) will takes precedence over this parameter :type unsetcolor: Color or str or int or tuple(int, int, int, [int]) or list(int, int, int, [int]) or None :param dest: (optional) surface destination of where to position the topleft corner of the mask being drawn (default is ``(0, 0)``), if a Rect is used as the ``dest`` parameter, its ``x`` and ``y`` attributes will be used as the destination, **NOTE1:** rects with a negative width or height value will not be normalized before using their ``x`` and ``y`` values, **NOTE2:** this destination value is only used to position the mask on the surface, it does not offset the ``setsurface`` and ``unsetsurface`` from the mask, they are always aligned with the mask (i.e. position ``(0, 0)`` on the mask always corresponds to position ``(0, 0)`` on the ``setsurface`` and ``unsetsurface``) :type dest: Rect or tuple(int, int) or list(int, int) or Vector2(int, int) :returns: the ``surface`` parameter (or a newly created surface if no ``surface`` parameter was provided) with this mask drawn on it :rtype: Surface :raises ValueError: if the ``setsurface`` parameter or ``unsetsurface`` parameter does not have the same format (bytesize/bitsize/alpha) as the ``surface`` parameter .. note :: To skip drawing the set bits, both ``setsurface`` and ``setcolor`` must be ``None``. The ``setsurface`` parameter defaults to ``None``, but ``setcolor`` defaults to a color value and therefore must be set to ``None``. .. note :: To skip drawing the unset bits, both ``unsetsurface`` and ``unsetcolor`` must be ``None``. The ``unsetsurface`` parameter defaults to ``None``, but ``unsetcolor`` defaults to a color value and therefore must be set to ``None``. .. versionadded:: 2.0.0 .. ## Mask.to_surface ## .. ## pygame.mask.Mask ## .. ## pygame.mask ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/math.rst.txt0000644000175100001770000011276014676242340022213 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.math` ================== .. module:: pygame.math :synopsis: pygame module for vector classes | :sl:`pygame module for vector classes` The pygame math module currently provides Vector classes in two and three dimensions, ``Vector2`` and ``Vector3`` respectively. They support the following numerical operations: ``vec + vec``, ``vec - vec``, ``vec * number``, ``number * vec``, ``vec / number``, ``vec // number``, ``vec += vec``, ``vec -= vec``, ``vec *= number``, ``vec /= number``, ``vec //= number``, ``round(vec, ndigits=0)``. All these operations will be performed elementwise. In addition ``vec * vec`` will perform a scalar-product (a.k.a. dot-product). If you want to multiply every element from vector v with every element from vector w you can use the elementwise method: ``v.elementwise() * w`` The coordinates of a vector can be retrieved or set using attributes or subscripts :: v = pygame.Vector3() v.x = 5 v[1] = 2 * v.x print(v[1]) # 10 v.x == v[0] v.y == v[1] v.z == v[2] Multiple coordinates can be set using slices or swizzling :: v = pygame.Vector2() v.xy = 1, 2 v[:] = 1, 2 .. versionadded:: 1.9.2pre .. versionchanged:: 1.9.4 Removed experimental notice. .. versionchanged:: 1.9.4 Allow scalar construction like GLSL Vector2(2) == Vector2(2.0, 2.0) .. versionchanged:: 1.9.4 :mod:`pygame.math` import not required. More convenient ``pygame.Vector2`` and ``pygame.Vector3``. .. versionchanged:: 2.2.0 `round` returns a new vector with components rounded to the specified digits. .. function:: clamp | :sl:`returns value clamped to min and max.` | :sg:`clamp(value, min, max) -> float` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp feedback with authors `_ Clamps a numeric ``value`` so that it's no lower than ``min``, and no higher than ``max``. .. versionadded:: 2.1.3 .. ## math.clamp ## .. function:: lerp | :sl:`interpolates between two values by a weight.` | :sg:`lerp(a, b, weight) -> float` Linearly interpolates between ``a`` and ``b`` by ``weight`` using the formula ``a + (b-a) * weight``. If ``weight`` is ``0.5``, ``lerp`` will return the value half-way between ``a`` and ``b``. When ``a = 10`` and ``b = 20``, ``lerp(a, b, 0.5)`` will return ``15``. You can think of weight as the percentage of interpolation from ``a`` to ``b``, ``0.0`` being 0% and ``1.0`` being 100%. ``lerp`` can be used for many things. You could rotate a sprite by a weight with ``angle = lerp(0, 360, weight)``. You could even scale an enemy's attack value based on the level you're playing: :: FINAL_LEVEL = 10 current_level = 2 attack = lerp(10, 50, current_level/MAX_LEVEL) # 18 If you're on level 0, ``attack`` will be ``10``, if you're on level 10, ``attack`` will be ``50``. If you're on level 5, the result of ``current_level/MAX_LEVEL`` will be ``0.5`` which represents 50%, therefore ``attack`` will be ``30``, which is the midpoint of ``10`` and ``50``. Raises a ValueError if ``weight`` is outside the range of ``[0, 1]``. .. versionadded:: 2.1.3 .. ## math.lerp ## .. class:: Vector2 | :sl:`a 2-Dimensional Vector` | :sg:`Vector2() -> Vector2(0, 0)` | :sg:`Vector2(int) -> Vector2` | :sg:`Vector2(float) -> Vector2` | :sg:`Vector2(Vector2) -> Vector2` | :sg:`Vector2(x, y) -> Vector2` | :sg:`Vector2((x, y)) -> Vector2` Some general information about the ``Vector2`` class. .. versionchanged:: 2.1.3 Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass .. method:: dot | :sl:`calculates the dot- or scalar-product with the other vector` | :sg:`dot(Vector2) -> float` .. ## Vector2.dot ## .. method:: cross | :sl:`calculates the cross- or vector-product` | :sg:`cross(Vector2) -> float` calculates the third component of the cross-product. .. ## Vector2.cross ## .. method:: magnitude | :sl:`returns the Euclidean magnitude of the vector.` | :sg:`magnitude() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2)`` .. ## Vector2.magnitude ## .. method:: magnitude_squared | :sl:`returns the squared magnitude of the vector.` | :sg:`magnitude_squared() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.magnitude()`` because it avoids the square root. .. ## Vector2.magnitude_squared ## .. method:: length | :sl:`returns the Euclidean length of the vector.` | :sg:`length() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2)`` .. ## Vector2.length ## .. method:: length_squared | :sl:`returns the squared Euclidean length of the vector.` | :sg:`length_squared() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2``. This is faster than ``vec.length()`` because it avoids the square root. .. ## Vector2.length_squared ## .. method:: normalize | :sl:`returns a vector with the same direction but length 1.` | :sg:`normalize() -> Vector2` Returns a new vector that has ``length`` equal to ``1`` and the same direction as self. .. ## Vector2.normalize ## .. method:: normalize_ip | :sl:`normalizes the vector in place so that its length is 1.` | :sg:`normalize_ip() -> None` Normalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed. .. ## Vector2.normalize_ip ## .. method:: is_normalized | :sl:`tests if the vector is normalized i.e. has length == 1.` | :sg:`is_normalized() -> Bool` Returns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``. .. ## Vector2.is_normalized ## .. method:: scale_to_length | :sl:`scales the vector to a given length.` | :sg:`scale_to_length(float) -> None` Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised. .. ## Vector2.scale_to_length ## .. method:: reflect | :sl:`returns a vector reflected of a given normal.` | :sg:`reflect(Vector2) -> Vector2` Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. .. ## Vector2.reflect ## .. method:: reflect_ip | :sl:`reflect the vector of a given normal in place.` | :sg:`reflect_ip(Vector2) -> None` Changes the direction of self as if it would have been reflected of a surface with the given surface normal. .. ## Vector2.reflect_ip ## .. method:: distance_to | :sl:`calculates the Euclidean distance to a given vector.` | :sg:`distance_to(Vector2) -> float` .. ## Vector2.distance_to ## .. method:: distance_squared_to | :sl:`calculates the squared Euclidean distance to a given vector.` | :sg:`distance_squared_to(Vector2) -> float` .. ## Vector2.distance_squared_to ## .. method:: move_towards | :sl:`returns a vector moved toward the target by a given distance.` | :sg:`move_towards(Vector2, float) -> Vector2` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_ Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector2.move_towards ## .. method:: move_towards_ip | :sl:`moves the vector toward its target at a given distance.` | :sg:`move_towards_ip(Vector2, float) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_ Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector2.move_towards_ip ## .. method:: lerp | :sl:`returns a linear interpolation to the given vector.` | :sg:`lerp(Vector2, float) -> Vector2` Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self and other the result is going to be. It must be a value between ``0`` and ``1`` where ``0`` means self and ``1`` means other will be returned. .. ## Vector2.lerp ## .. method:: slerp | :sl:`returns a spherical interpolation to the given vector.` | :sg:`slerp(Vector2, float) -> Vector2` Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path. .. ## Vector2.slerp ## .. method:: elementwise | :sl:`The next operation will be performed elementwise.` | :sg:`elementwise() -> VectorElementwiseProxy` Applies the following operation to each element of the vector. .. ## Vector2.elementwise ## .. method:: rotate | :sl:`rotates a vector by a given angle in degrees.` | :sg:`rotate(angle) -> Vector2` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector2.rotate ## .. method:: rotate_rad | :sl:`rotates a vector by a given angle in radians.` | :sg:`rotate_rad(angle) -> Vector2` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector2.rotate_rad ## .. method:: rotate_ip | :sl:`rotates the vector by a given angle in degrees in place.` | :sg:`rotate_ip(angle) -> None` Rotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector2.rotate_ip ## .. method:: rotate_ip_rad | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_ip_rad(angle) -> None` DEPRECATED: Use rotate_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector2.rotate_rad_ip ## .. method:: rotate_rad_ip | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_rad_ip(angle) -> None` Rotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector2.rotate_rad_ip ## .. method:: angle_to | :sl:`calculates the angle to a given vector in degrees.` | :sg:`angle_to(Vector2) -> float` Returns the angle from self to the passed ``Vector2`` that would rotate self to be aligned with the passed ``Vector2`` without crossing over the negative x-axis. .. figure:: code_examples/angle_to.png :alt: angle_to image Example demonstrating the angle returned .. ## Vector2.angle_to ## .. method:: as_polar | :sl:`returns a tuple with radial distance and azimuthal angle.` | :sg:`as_polar() -> (r, phi)` Returns a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle. .. ## Vector2.as_polar ## .. method:: from_polar | :sl:`Creates a Vector2(x, y) or sets x and y from a polar coordinates tuple.` | :sg:`Vector2.from_polar((r, phi)) -> Vector2` | :sg:`Vector2().from_polar((r, phi)) -> None` If used from the class creates a Vector2(x,y), else sets x and y. The values of x and y are defined from a tuple ``(r, phi)`` where r is the radial distance, and phi is the azimuthal angle. .. ## Vector2.from_polar ## .. method:: project | :sl:`projects a vector onto another.` | :sg:`project(Vector2) -> Vector2` Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_. .. versionadded:: 2.0.2 .. ## Vector2.project ## .. method:: copy | :sl:`Returns a copy of itself.` | :sg:`copy() -> Vector2` Returns a new Vector2 having the same dimensions. .. versionadded:: 2.1.1 .. ## Vector2.copy ## .. method:: clamp_magnitude | :sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.` | :sg:`clamp_magnitude(max_length) -> Vector2` | :sg:`clamp_magnitude(min_length, max_length) -> Vector2` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_ Returns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector2.clamp_magnitude ## .. method:: clamp_magnitude_ip | :sl:`Clamps the vector's magnitude between max_length and min_length` | :sg:`clamp_magnitude_ip(max_length) -> None` | :sg:`clamp_magnitude_ip(min_length, max_length) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_ Clamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector2.clamp_magnitude_ip ## .. method:: update | :sl:`Sets the coordinates of the vector.` | :sg:`update() -> None` | :sg:`update(int) -> None` | :sg:`update(float) -> None` | :sg:`update(Vector2) -> None` | :sg:`update(x, y) -> None` | :sg:`update((x, y)) -> None` Sets coordinates x and y in place. .. versionadded:: 1.9.5 .. ## Vector2.update ## .. attribute:: epsilon | :sl:`Determines the tolerance of vector calculations.` Both Vector classes have a value named ``epsilon`` that defaults to ``1e-6``. This value acts as a numerical margin in various methods to account for floating point arithmetic errors. Specifically, ``epsilon`` is used in the following places: * comparing Vectors (``==`` and ``!=``) * the ``is_normalized`` method (if the square of the length is within ``epsilon`` of 1, it's normalized) * slerping (a Vector with a length of ``> True print(v == u) # >> False You'll probably never have to change ``epsilon`` from the default value, but in rare situations you might find that either the margin is too large or too small, in which case changing ``epsilon`` slightly might help you out. .. ## pygame.math.Vector2 ## .. class:: Vector3 | :sl:`a 3-Dimensional Vector` | :sg:`Vector3() -> Vector3(0, 0, 0)` | :sg:`Vector3(int) -> Vector3` | :sg:`Vector3(float) -> Vector3` | :sg:`Vector3(Vector3) -> Vector3` | :sg:`Vector3(x, y, z) -> Vector3` | :sg:`Vector3((x, y, z)) -> Vector3` Some general information about the Vector3 class. .. versionchanged:: 2.1.3 Inherited methods of vector subclasses now correctly return an instance of the subclass instead of the superclass .. method:: dot | :sl:`calculates the dot- or scalar-product with the other vector` | :sg:`dot(Vector3) -> float` .. ## Vector3.dot ## .. method:: cross | :sl:`calculates the cross- or vector-product` | :sg:`cross(Vector3) -> Vector3` calculates the cross-product. .. ## Vector3.cross ## .. method:: magnitude | :sl:`returns the Euclidean magnitude of the vector.` | :sg:`magnitude() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)`` .. ## Vector3.magnitude ## .. method:: magnitude_squared | :sl:`returns the squared Euclidean magnitude of the vector.` | :sg:`magnitude_squared() -> float` calculates the magnitude of the vector which follows from the theorem: ``vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.magnitude()`` because it avoids the square root. .. ## Vector3.magnitude_squared ## .. method:: length | :sl:`returns the Euclidean length of the vector.` | :sg:`length() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2)`` .. ## Vector3.length ## .. method:: length_squared | :sl:`returns the squared Euclidean length of the vector.` | :sg:`length_squared() -> float` calculates the Euclidean length of the vector which follows from the Pythagorean theorem: ``vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2``. This is faster than ``vec.length()`` because it avoids the square root. .. ## Vector3.length_squared ## .. method:: normalize | :sl:`returns a vector with the same direction but length 1.` | :sg:`normalize() -> Vector3` Returns a new vector that has ``length`` equal to ``1`` and the same direction as self. .. ## Vector3.normalize ## .. method:: normalize_ip | :sl:`normalizes the vector in place so that its length is 1.` | :sg:`normalize_ip() -> None` Normalizes the vector so that it has ``length`` equal to ``1``. The direction of the vector is not changed. .. ## Vector3.normalize_ip ## .. method:: is_normalized | :sl:`tests if the vector is normalized i.e. has length == 1.` | :sg:`is_normalized() -> Bool` Returns True if the vector has ``length`` equal to ``1``. Otherwise it returns ``False``. .. ## Vector3.is_normalized ## .. method:: scale_to_length | :sl:`scales the vector to a given length.` | :sg:`scale_to_length(float) -> None` Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length ``0``. If the vector is the zero vector (i.e. has length ``0`` thus no direction) a ``ValueError`` is raised. .. ## Vector3.scale_to_length ## .. method:: reflect | :sl:`returns a vector reflected of a given normal.` | :sg:`reflect(Vector3) -> Vector3` Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. .. ## Vector3.reflect ## .. method:: reflect_ip | :sl:`reflect the vector of a given normal in place.` | :sg:`reflect_ip(Vector3) -> None` Changes the direction of self as if it would have been reflected of a surface with the given surface normal. .. ## Vector3.reflect_ip ## .. method:: distance_to | :sl:`calculates the Euclidean distance to a given vector.` | :sg:`distance_to(Vector3) -> float` .. ## Vector3.distance_to ## .. method:: distance_squared_to | :sl:`calculates the squared Euclidean distance to a given vector.` | :sg:`distance_squared_to(Vector3) -> float` .. ## Vector3.distance_squared_to ## .. method:: move_towards | :sl:`returns a vector moved toward the target by a given distance.` | :sg:`move_towards(Vector3, float) -> Vector3` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards feedback with authors `_ Returns a Vector which is moved towards the given Vector by a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector3.move_towards ## .. method:: move_towards_ip | :sl:`moves the vector toward its target at a given distance.` | :sg:`move_towards_ip(Vector3, float) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave move_towards_ip feedback with authors `_ Moves itself toward the given Vector at a given distance and does not overshoot past its target Vector. The first parameter determines the target Vector, while the second parameter determines the delta distance. If the distance is in the negatives, then it will move away from the target Vector. .. versionadded:: 2.1.3 .. ## Vector3.move_towards_ip ## .. method:: lerp | :sl:`returns a linear interpolation to the given vector.` | :sg:`lerp(Vector3, float) -> Vector3` Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between ``0`` and ``1``, where ``0`` means self and ``1`` means other will be returned. .. ## Vector3.lerp ## .. method:: slerp | :sl:`returns a spherical interpolation to the given vector.` | :sg:`slerp(Vector3, float) -> Vector3` Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range ``[-1, 1]``. It parametrizes where - in between the two vectors - the result should be. If a negative value is given the interpolation will not take the complement of the shortest path. .. ## Vector3.slerp ## .. method:: elementwise | :sl:`The next operation will be performed elementwise.` | :sg:`elementwise() -> VectorElementwiseProxy` Applies the following operation to each element of the vector. .. ## Vector3.elementwise ## .. method:: rotate | :sl:`rotates a vector by a given angle in degrees.` | :sg:`rotate(angle, Vector3) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate ## .. method:: rotate_rad | :sl:`rotates a vector by a given angle in radians.` | :sg:`rotate_rad(angle, Vector3) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_rad ## .. method:: rotate_ip | :sl:`rotates the vector by a given angle in degrees in place.` | :sg:`rotate_ip(angle, Vector3) -> None` Rotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_ip ## .. method:: rotate_ip_rad | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_ip_rad(angle, Vector3) -> None` DEPRECATED: Use rotate_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_ip_rad ## .. method:: rotate_rad_ip | :sl:`rotates the vector by a given angle in radians in place.` | :sg:`rotate_rad_ip(angle, Vector3) -> None` Rotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_rad_ip ## .. method:: rotate_x | :sl:`rotates a vector around the x-axis by the angle in degrees.` | :sg:`rotate_x(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_x ## .. method:: rotate_x_rad | :sl:`rotates a vector around the x-axis by the angle in radians.` | :sg:`rotate_x_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_x_rad ## .. method:: rotate_x_ip | :sl:`rotates the vector around the x-axis by the angle in degrees in place.` | :sg:`rotate_x_ip(angle) -> None` Rotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_x_ip ## .. method:: rotate_x_ip_rad | :sl:`rotates the vector around the x-axis by the angle in radians in place.` | :sg:`rotate_x_ip_rad(angle) -> None` DEPRECATED: Use rotate_x_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_x_ip_rad ## .. method:: rotate_x_rad_ip | :sl:`rotates the vector around the x-axis by the angle in radians in place.` | :sg:`rotate_x_rad_ip(angle) -> None` Rotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_x_rad_ip ## .. method:: rotate_y | :sl:`rotates a vector around the y-axis by the angle in degrees.` | :sg:`rotate_y(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_y ## .. method:: rotate_y_rad | :sl:`rotates a vector around the y-axis by the angle in radians.` | :sg:`rotate_y_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_y_rad ## .. method:: rotate_y_ip | :sl:`rotates the vector around the y-axis by the angle in degrees in place.` | :sg:`rotate_y_ip(angle) -> None` Rotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_y_ip ## .. method:: rotate_y_ip_rad | :sl:`rotates the vector around the y-axis by the angle in radians in place.` | :sg:`rotate_y_ip_rad(angle) -> None` DEPRECATED: Use rotate_y_rad_ip() instead. .. versionadded:: 2.0.0 .. deprecated:: 2.1.1 .. ## Vector3.rotate_y_ip_rad ## .. method:: rotate_y_rad_ip | :sl:`rotates the vector around the y-axis by the angle in radians in place.` | :sg:`rotate_y_rad_ip(angle) -> None` Rotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_y_rad_ip ## .. method:: rotate_z | :sl:`rotates a vector around the z-axis by the angle in degrees.` | :sg:`rotate_z(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_z ## .. method:: rotate_z_rad | :sl:`rotates a vector around the z-axis by the angle in radians.` | :sg:`rotate_z_rad(angle) -> Vector3` Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.0.0 .. ## Vector3.rotate_z_rad ## .. method:: rotate_z_ip | :sl:`rotates the vector around the z-axis by the angle in degrees in place.` | :sg:`rotate_z_ip(angle) -> None` Rotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. ## Vector3.rotate_z_ip ## .. method:: rotate_z_ip_rad | :sl:`rotates the vector around the z-axis by the angle in radians in place.` | :sg:`rotate_z_ip_rad(angle) -> None` DEPRECATED: Use rotate_z_rad_ip() instead. .. deprecated:: 2.1.1 .. ## Vector3.rotate_z_ip_rad ## .. method:: rotate_z_rad_ip | :sl:`rotates the vector around the z-axis by the angle in radians in place.` | :sg:`rotate_z_rad_ip(angle) -> None` Rotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. (Note that due to pygame's inverted y coordinate system, the rotation will look clockwise if displayed). .. versionadded:: 2.1.1 .. ## Vector3.rotate_z_rad_ip ## .. method:: angle_to | :sl:`calculates the angle to a given vector in degrees.` | :sg:`angle_to(Vector3) -> float` Returns the angle between self and the given vector. .. ## Vector3.angle_to ## .. method:: as_spherical | :sl:`returns a tuple with radial distance, inclination and azimuthal angle.` | :sg:`as_spherical() -> (r, theta, phi)` Returns a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. .. ## Vector3.as_spherical ## .. method:: from_spherical | :sl:`Creates a Vector3(x, y, z) or sets x, y and z from a spherical coordinates 3-tuple.` | :sg:`Vector3.from_spherical((r, theta, phi)) -> Vector3` | :sg:`Vector3().from_spherical((r, theta, phi)) -> None` If used from the class creates a Vector3(x, y, z), else sets x, y, and z. The values of x, y, and z are from a tuple ``(r, theta, phi)`` where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. .. ## Vector3.from_spherical ## .. method:: project | :sl:`projects a vector onto another.` | :sg:`project(Vector3) -> Vector3` Returns the projected vector. This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see `Wikipedia `_. .. versionadded:: 2.0.2 .. ## Vector3.project ## .. method:: copy | :sl:`Returns a copy of itself.` | :sg:`copy() -> Vector3` Returns a new Vector3 having the same dimensions. .. versionadded:: 2.1.1 .. ## Vector3.copy ## .. method:: clamp_magnitude | :sl:`Returns a copy of a vector with the magnitude clamped between max_length and min_length.` | :sg:`clamp_magnitude(max_length) -> Vector3` | :sg:`clamp_magnitude(min_length, max_length) -> Vector3` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude feedback with authors `_ Returns a new copy of a vector with the magnitude clamped between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector3.clamp_magnitude ## .. method:: clamp_magnitude_ip | :sl:`Clamps the vector's magnitude between max_length and min_length` | :sg:`clamp_magnitude_ip(max_length) -> None` | :sg:`clamp_magnitude_ip(min_length, max_length) -> None` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave clamp_magnitude_ip feedback with authors `_ Clamps the vector's magnitude between ``max_length`` and ``min_length``. If only one argument is passed, it is taken to be the ``max_length`` This function raises ``ValueError`` if ``min_length`` is greater than ``max_length``, or if either of these values are negative. .. versionadded:: 2.1.3 .. ## Vector3.clamp_magnitude_ip ## .. method:: update | :sl:`Sets the coordinates of the vector.` | :sg:`update() -> None` | :sg:`update(int) -> None` | :sg:`update(float) -> None` | :sg:`update(Vector3) -> None` | :sg:`update(x, y, z) -> None` | :sg:`update((x, y, z)) -> None` Sets coordinates x, y, and z in place. .. versionadded:: 1.9.5 .. ## Vector3.update ## .. attribute:: epsilon | :sl:`Determines the tolerance of vector calculations.` With lengths within this number, vectors are considered equal. For more information see :attr:`pygame.math.Vector2.epsilon` .. ## ## .. ## pygame.math.Vector3 ## .. ## pygame.math ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/midi.rst.txt0000644000175100001770000003402614676242340022202 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.midi` ================== .. module:: pygame.midi :synopsis: pygame module for interacting with midi input and output. | :sl:`pygame module for interacting with midi input and output.` .. versionadded:: 1.9.0 The midi module can send output to midi devices and get input from midi devices. It can also list midi devices on the system. The midi module supports real and virtual midi devices. It uses the portmidi library. Is portable to which ever platforms portmidi supports (currently Windows, Mac OS X, and Linux). This uses pyportmidi for now, but may use its own bindings at some point in the future. The pyportmidi bindings are included with pygame. | .. versionadded:: 2.0.0 These are pygame events (:mod:`pygame.event`) reserved for midi use. The ``MIDIIN`` event is used by :func:`pygame.midi.midis2events` when converting midi events to pygame events. :: MIDIIN MIDIOUT | .. function:: init | :sl:`initialize the midi module` | :sg:`init() -> None` Initializes the :mod:`pygame.midi` module. Must be called before using the :mod:`pygame.midi` module. It is safe to call this more than once. .. ## pygame.midi.init ## .. function:: quit | :sl:`uninitialize the midi module` | :sg:`quit() -> None` Uninitializes the :mod:`pygame.midi` module. If :func:`pygame.midi.init` was called to initialize the :mod:`pygame.midi` module, then this function will be called automatically when your program exits. It is safe to call this function more than once. .. ## pygame.midi.quit ## .. function:: get_init | :sl:`returns True if the midi module is currently initialized` | :sg:`get_init() -> bool` Gets the initialization state of the :mod:`pygame.midi` module. :returns: ``True`` if the :mod:`pygame.midi` module is currently initialized. :rtype: bool .. versionadded:: 1.9.5 .. ## pygame.midi.get_init ## .. class:: Input | :sl:`Input is used to get midi input from midi devices.` | :sg:`Input(device_id) -> None` | :sg:`Input(device_id, buffer_size) -> None` :param int device_id: midi device id :param int buffer_size: (optional) the number of input events to be buffered .. method:: close | :sl:`closes a midi stream, flushing any pending buffers.` | :sg:`close() -> None` PortMidi attempts to close open streams when the application exits. .. note:: This is particularly difficult under Windows. .. ## Input.close ## .. method:: poll | :sl:`returns True if there's data, or False if not.` | :sg:`poll() -> bool` Used to indicate if any data exists. :returns: ``True`` if there is data, ``False`` otherwise :rtype: bool :raises MidiException: on error .. ## Input.poll ## .. method:: read | :sl:`reads num_events midi events from the buffer.` | :sg:`read(num_events) -> midi_event_list` Reads from the input buffer and gives back midi events. :param int num_events: number of input events to read :returns: the format for midi_event_list is ``[[[status, data1, data2, data3], timestamp], ...]`` :rtype: list .. ## Input.read ## .. ## pygame.midi.Input ## .. class:: Output | :sl:`Output is used to send midi to an output device` | :sg:`Output(device_id) -> None` | :sg:`Output(device_id, latency=0) -> None` | :sg:`Output(device_id, buffer_size=256) -> None` | :sg:`Output(device_id, latency, buffer_size) -> None` The ``buffer_size`` specifies the number of output events to be buffered waiting for output. In some cases (see below) PortMidi does not buffer output at all and merely passes data to a lower-level API, in which case buffersize is ignored. ``latency`` is the delay in milliseconds applied to timestamps to determine when the output should actually occur. If ``latency`` is <<0, 0 is assumed. If ``latency`` is zero, timestamps are ignored and all output is delivered immediately. If ``latency`` is greater than zero, output is delayed until the message timestamp plus the ``latency``. In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency. .. note:: Time is measured relative to the time source indicated by time_proc. Timestamps are absolute, not relative delays or offsets. .. method:: abort | :sl:`terminates outgoing messages immediately` | :sg:`abort() -> None` The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. .. ## Output.abort ## .. method:: close | :sl:`closes a midi stream, flushing any pending buffers.` | :sg:`close() -> None` PortMidi attempts to close open streams when the application exits. .. note:: This is particularly difficult under Windows. .. ## Output.close ## .. method:: note_off | :sl:`turns a midi note off (note must be on)` | :sg:`note_off(note, velocity=None, channel=0) -> None` Turn a note off in the output stream. The note must already be on for this to work correctly. .. ## Output.note_off ## .. method:: note_on | :sl:`turns a midi note on (note must be off)` | :sg:`note_on(note, velocity=None, channel=0) -> None` Turn a note on in the output stream. The note must already be off for this to work correctly. .. ## Output.note_on ## .. method:: set_instrument | :sl:`select an instrument, with a value between 0 and 127` | :sg:`set_instrument(instrument_id, channel=0) -> None` Select an instrument. .. ## Output.set_instrument ## .. method:: pitch_bend | :sl:`modify the pitch of a channel.` | :sg:`set_instrument(value=0, channel=0) -> None` Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to the pitch bend range can also be changed in some synthesizers). If no value is given, the pitch bend is returned to "no change". .. versionadded:: 1.9.4 .. method:: write | :sl:`writes a list of midi data to the Output` | :sg:`write(data) -> None` Writes series of MIDI information in the form of a list. :param list data: data to write, the expected format is ``[[[status, data1=0, data2=0, ...], timestamp], ...]`` with the ``data#`` fields being optional :raises IndexError: if more than 1024 elements in the data list Example: :: # Program change at time 20000 and 500ms later send note 65 with # velocity 100. write([[[0xc0, 0, 0], 20000], [[0x90, 60, 100], 20500]]) .. note:: - Timestamps will be ignored if latency = 0 - To get a note to play immediately, send MIDI info with timestamp read from function Time - Optional data fields: ``write([[[0xc0, 0, 0], 20000]])`` is equivalent to ``write([[[0xc0], 20000]])`` .. ## Output.write ## .. method:: write_short | :sl:`writes up to 3 bytes of midi data to the Output` | :sg:`write_short(status) -> None` | :sg:`write_short(status, data1=0, data2=0) -> None` Output MIDI information of 3 bytes or less. The ``data`` fields are optional and assumed to be 0 if omitted. Examples of status byte values: :: 0xc0 # program change 0x90 # note on # etc. Example: :: # note 65 on with velocity 100 write_short(0x90, 65, 100) .. ## Output.write_short ## .. method:: write_sys_ex | :sl:`writes a timestamped system-exclusive midi message.` | :sg:`write_sys_ex(when, msg) -> None` Writes a timestamped system-exclusive midi message. :param msg: midi message :type msg: list[int] or str :param when: timestamp in milliseconds Example: :: midi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7') # is equivalent to midi_output.write_sys_ex(pygame.midi.time(), [0xF0, 0x7D, 0x10, 0x11, 0x12, 0x13, 0xF7]) .. ## Output.write_sys_ex ## .. ## pygame.midi.Output ## .. function:: get_count | :sl:`gets the number of devices.` | :sg:`get_count() -> num_devices` Device ids range from 0 to ``get_count() - 1`` .. ## pygame.midi.get_count ## .. function:: get_default_input_id | :sl:`gets default input device number` | :sg:`get_default_input_id() -> default_id` The following describes the usage details for this function and the :func:`get_default_output_id` function. Return the default device ID or ``-1`` if there are no devices. The result can be passed to the :class:`Input`/:class:`Output` class. On a PC the user can specify a default device by setting an environment variable. To use device #1, for example: :: set PM_RECOMMENDED_INPUT_DEVICE=1 or set PM_RECOMMENDED_OUTPUT_DEVICE=1 The user should first determine the available device ID by using the supplied application "testin" or "testout". In general, the registry is a better place for this kind of info. With USB devices that can come and go, using integers is not very reliable for device identification. Under Windows, if ``PM_RECOMMENDED_INPUT_DEVICE`` (or ``PM_RECOMMENDED_OUTPUT_DEVICE``) is NOT found in the environment, then the default device is obtained by looking for a string in the registry under: :: HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Input_Device or HKEY_LOCAL_MACHINE/SOFTWARE/PortMidi/Recommended_Output_Device The number of the first device with a substring that matches the string exactly is returned. For example, if the string in the registry is "USB" and device 1 is named "In USB MidiSport 1x1", then that will be the default input because it contains the string "USB". In addition to the name, :func:`get_device_info()` returns "interf", which is the interface name. The "interface" is the underlying software system or API used by PortMidi to access devices. Supported interfaces: :: MMSystem # the only Win32 interface currently supported ALSA # the only Linux interface currently supported CoreMIDI # the only Mac OS X interface currently supported # DirectX - not implemented # OSS - not implemented To specify both the interface and the device name in the registry, separate the two with a comma and a space. The string before the comma must be a substring of the "interf" string and the string after the space must be a substring of the "name" name string in order to match the device. e.g.: :: MMSystem, In USB MidiSport 1x1 .. note:: In the current release, the default is simply the first device (the input or output device with the lowest PmDeviceID). .. ## pygame.midi.get_default_input_id ## .. function:: get_default_output_id | :sl:`gets default output device number` | :sg:`get_default_output_id() -> default_id` See :func:`get_default_input_id` for usage details. .. ## pygame.midi.get_default_output_id ## .. function:: get_device_info | :sl:`returns information about a midi device` | :sg:`get_device_info(an_id) -> (interf, name, input, output, opened)` | :sg:`get_device_info(an_id) -> None` Gets the device info for a given id. :param int an_id: id of the midi device being queried :returns: if the id is out of range ``None`` is returned, otherwise a tuple of (interf, name, input, output, opened) is returned. - interf: string describing the device interface (e.g. 'ALSA') - name: string name of the device (e.g. 'Midi Through Port-0') - input: 1 if the device is an input device, otherwise 0 - output: 1 if the device is an output device, otherwise 0 - opened: 1 if the device is opened, otherwise 0 :rtype: tuple or None .. ## pygame.midi.get_device_info ## .. function:: midis2events | :sl:`converts midi events to pygame events` | :sg:`midis2events(midi_events, device_id) -> [Event, ...]` Takes a sequence of midi events and returns list of pygame events. The ``midi_events`` data is expected to be a sequence of ``((status, data1, data2, data3), timestamp)`` midi events (all values required). :returns: a list of pygame events of event type ``MIDIIN`` :rtype: list .. ## pygame.midi.midis2events ## .. function:: time | :sl:`returns the current time in ms of the PortMidi timer` | :sg:`time() -> time` The time is reset to 0 when the :mod:`pygame.midi` module is initialized. .. ## pygame.midi.time ## .. function:: frequency_to_midi | :sl:`Converts a frequency into a MIDI note. Rounds to the closest midi note.` | :sg:`frequency_to_midi(midi_note) -> midi_note` example: :: frequency_to_midi(27.5) == 21 .. versionadded:: 1.9.5 .. ## pygame.midi.frequency_to_midi ## .. function:: midi_to_frequency | :sl:`Converts a midi note to a frequency.` | :sg:`midi_to_frequency(midi_note) -> frequency` example: :: midi_to_frequency(21) == 27.5 .. versionadded:: 1.9.5 .. ## pygame.midi.midi_to_frequency ## .. function:: midi_to_ansi_note | :sl:`Returns the Ansi Note name for a midi number.` | :sg:`midi_to_ansi_note(midi_note) -> ansi_note` example: :: midi_to_ansi_note(21) == 'A0' .. versionadded:: 1.9.5 .. ## pygame.midi.midi_to_ansi_note ## .. exception:: MidiException | :sl:`exception that pygame.midi functions and classes can raise` | :sg:`MidiException(errno) -> None` .. ## pygame.midi.MidiException ## .. ## pygame.midi ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/mixer.rst.txt0000644000175100001770000005367314676242340022415 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mixer` =================== .. module:: pygame.mixer :synopsis: pygame module for loading and playing sounds | :sl:`pygame module for loading and playing sounds` This module contains classes for loading Sound objects and controlling playback. The mixer module is optional and depends on SDL_mixer. Your program should test that :mod:`pygame.mixer` is available and initialized before using it. The mixer module has a limited number of channels for playback of sounds. Usually programs tell pygame to start playing audio and it selects an available channel automatically. The default is 8 simultaneous channels, but complex programs can get more precise control over the number of channels and their use. All sound playback is mixed in background threads. When you begin to play a Sound object, it will return immediately while the sound continues to play. A single Sound object can also be actively played back multiple times. The mixer also has a special streaming channel. This is for music playback and is accessed through the :mod:`pygame.mixer.music` module. Consider using this module for playing long running music. Unlike mixer module, the music module streams the music from the files without loading music at once into memory. The mixer module must be initialized like other pygame modules, but it has some extra conditions. The ``pygame.mixer.init()`` function takes several optional arguments to control the playback rate and sample size. Pygame will default to reasonable values, but pygame cannot perform Sound resampling, so the mixer should be initialized to match the values of your audio resources. ``NOTE``: For less laggy sound use a smaller buffer size. The default is set to reduce the chance of scratchy sounds on some computers. You can change the default buffer by calling :func:`pygame.mixer.pre_init` before :func:`pygame.mixer.init` or :func:`pygame.init` is called. For example: ``pygame.mixer.pre_init(44100,-16,2, 1024)`` .. function:: init | :sl:`initialize the mixer module` | :sg:`init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None` Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used. (startup defaults may be changed by a :func:`pre_init` call). The size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception. The channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo. The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger values to ensure playback never skips, but it will impose latency on sound playback. The buffer size must be a power of two (if not it is rounded up to the next nearest power of 2). Some platforms require the :mod:`pygame.mixer` module to be initialized after the display modules have initialized. The top level ``pygame.init()`` takes care of this automatically, but cannot pass any arguments to the mixer init. To solve this, mixer has a function ``pygame.mixer.pre_init()`` to set the proper defaults before the toplevel init is used. When using allowedchanges=0 it will convert the samples at runtime to match what the hardware supports. For example a sound card may not support 16bit sound samples, so instead it will use 8bit samples internally. If AUDIO_ALLOW_FORMAT_CHANGE is supplied, then the requested format will change to the closest that SDL2 supports. Apart from 0, allowedchanged accepts the following constants ORed together: - AUDIO_ALLOW_FREQUENCY_CHANGE - AUDIO_ALLOW_FORMAT_CHANGE - AUDIO_ALLOW_CHANNELS_CHANGE - AUDIO_ALLOW_ANY_CHANGE It is safe to call this more than once, but after the mixer is initialized you cannot change the playback arguments without first calling ``pygame.mixer.quit()``. .. versionchanged:: 1.8 The default ``buffersize`` changed from 1024 to 3072. .. versionchanged:: 1.9.1 The default ``buffersize`` changed from 3072 to 4096. .. versionchanged:: 2.0.0 The default ``buffersize`` changed from 4096 to 512. .. versionchanged:: 2.0.0 The default ``frequency`` changed from 22050 to 44100. .. versionchanged:: 2.0.0 ``size`` can be 32 (32-bit floats). .. versionchanged:: 2.0.0 ``channels`` can also be 4 or 6. .. versionadded:: 2.0.0 ``allowedchanges``, ``devicename`` arguments added .. ## pygame.mixer.init ## .. function:: pre_init | :sl:`preset the mixer init arguments` | :sg:`pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None` Call pre_init to change the defaults used when the real ``pygame.mixer.init()`` is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call ``pygame.mixer.pre_init()`` before calling the top level ``pygame.init()``. For backwards compatibility, argument values of 0 are replaced with the startup defaults, except for ``allowedchanges``, where -1 is used. .. versionchanged:: 1.8 The default ``buffersize`` changed from 1024 to 3072. .. versionchanged:: 1.9.1 The default ``buffersize`` changed from 3072 to 4096. .. versionchanged:: 2.0.0 The default ``buffersize`` changed from 4096 to 512. .. versionchanged:: 2.0.0 The default ``frequency`` changed from 22050 to 44100. .. versionadded:: 2.0.0 ``allowedchanges``, ``devicename`` arguments added .. ## pygame.mixer.pre_init ## .. function:: quit | :sl:`uninitialize the mixer` | :sg:`quit() -> None` This will uninitialize :mod:`pygame.mixer`. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later. .. ## pygame.mixer.quit ## .. function:: get_init | :sl:`test if the mixer is initialized` | :sg:`get_init() -> (frequency, format, channels)` If the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns ``None``. .. ## pygame.mixer.get_init ## .. function:: stop | :sl:`stop playback of all sound channels` | :sg:`stop() -> None` This will stop all playback of all active mixer channels. .. ## pygame.mixer.stop ## .. function:: pause | :sl:`temporarily stop playback of all sound channels` | :sg:`pause() -> None` This will temporarily stop all playback on the active mixer channels. The playback can later be resumed with ``pygame.mixer.unpause()`` .. ## pygame.mixer.pause ## .. function:: unpause | :sl:`resume paused playback of sound channels` | :sg:`unpause() -> None` This will resume all active sound channels after they have been paused. .. ## pygame.mixer.unpause ## .. function:: fadeout | :sl:`fade out the volume on all sounds before stopping` | :sg:`fadeout(time) -> None` This will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop. .. ## pygame.mixer.fadeout ## .. function:: set_num_channels | :sl:`set the total number of playback channels` | :sg:`set_num_channels(count) -> None` Sets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped. .. ## pygame.mixer.set_num_channels ## .. function:: get_num_channels | :sl:`get the total number of playback channels` | :sg:`get_num_channels() -> count` Returns the number of currently active playback channels. .. ## pygame.mixer.get_num_channels ## .. function:: set_reserved | :sl:`reserve channels from being automatically used` | :sg:`set_reserved(count) -> count` The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. This means that whenever you play a Sound without specifying a channel, a reserved channel will never be used. If sounds are currently playing on the reserved channels they will not be stopped. This allows the application to reserve a specific number of channels for important sounds that must not be dropped or have a guaranteed channel to play on. Will return number of channels actually reserved, this may be less than requested depending on the number of channels previously allocated. .. ## pygame.mixer.set_reserved ## .. function:: find_channel | :sl:`find an unused channel` | :sg:`find_channel(force=False) -> Channel` This will find and return an inactive Channel object. If there are no inactive Channels this function will return ``None``. If there are no inactive channels and the force argument is ``True``, this will find the Channel with the longest running Sound and return it. .. ## pygame.mixer.find_channel ## .. function:: get_busy | :sl:`test if any sound is being mixed` | :sg:`get_busy() -> bool` Returns ``True`` if the mixer is busy mixing any channels. If the mixer is idle then this return ``False``. .. ## pygame.mixer.get_busy ## .. function:: get_sdl_mixer_version | :sl:`get the mixer's SDL version` | :sg:`get_sdl_mixer_version() -> (major, minor, patch)` | :sg:`get_sdl_mixer_version(linked=True) -> (major, minor, patch)` :param bool linked: if ``True`` (default) the linked version number is returned, otherwise the compiled version number is returned :returns: the mixer's SDL library version number (linked or compiled depending on the ``linked`` parameter) as a tuple of 3 integers ``(major, minor, patch)`` :rtype: tuple .. note:: The linked and compile version numbers should be the same. .. versionadded:: 2.0.0 .. ## pygame.mixer.get_sdl_mixer_version ## .. class:: Sound | :sl:`Create a new Sound object from a file or buffer object` | :sg:`Sound(filename) -> Sound` | :sg:`Sound(file=filename) -> Sound` | :sg:`Sound(file=pathlib_path) -> Sound` | :sg:`Sound(buffer) -> Sound` | :sg:`Sound(buffer=buffer) -> Sound` | :sg:`Sound(object) -> Sound` | :sg:`Sound(file=object) -> Sound` | :sg:`Sound(array=object) -> Sound` Load a new sound buffer from a filename, a python file object or a readable buffer object. Limited resampling will be performed to help the sample match the initialize arguments for the mixer. A Unicode string can only be a file pathname. A bytes object can be either a pathname or a buffer object. Use the 'file' or 'buffer' keywords to avoid ambiguity; otherwise Sound may guess wrong. If the array keyword is used, the object is expected to export a new buffer interface (The object is checked for a buffer interface first.) The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback. A Sound object also exports a new buffer interface. The Sound can be loaded from an ``OGG`` audio file or from an uncompressed ``WAV``. Note: The buffer will be copied internally, no data will be shared between it and the Sound object. For now buffer and array support is consistent with ``sndarray.make_sound`` for NumPy arrays, in that sample sign and byte order are ignored. This will change, either by correctly handling sign and byte order, or by raising an exception when different. Also, source samples are truncated to fit the audio sample size. This will not change. .. versionadded:: 1.8 ``pygame.mixer.Sound(buffer)`` .. versionadded:: 1.9.2 :class:`pygame.mixer.Sound` keyword arguments and array interface support .. versionadded:: 2.0.1 pathlib.Path support on Python 3. .. method:: play | :sl:`begin sound playback` | :sg:`play(loops=0, maxtime=0, fade_ms=0) -> Channel` Begin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary. The loops argument controls how many times the sample will be repeated after being played the first time. A value of 5 means that the sound will be played once, then repeated five times, and so is played a total of six times. The default value (zero) means the Sound is not repeated, and so is only played once. If loops is set to -1 the Sound will loop indefinitely (though you can still call ``stop()`` to stop it). The maxtime argument can be used to stop playback after a given number of milliseconds. The fade_ms argument will make the sound start playing at 0 volume and fade up to full volume over the time given. The sample may end before the fade-in is complete. This returns the Channel object for the channel that was selected. .. ## Sound.play ## .. method:: stop | :sl:`stop sound playback` | :sg:`stop() -> None` This will stop the playback of this Sound on any active Channels. .. ## Sound.stop ## .. method:: fadeout | :sl:`stop sound playback after fading out` | :sg:`fadeout(time) -> None` This will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels. .. ## Sound.fadeout ## .. method:: set_volume | :sl:`set the playback volume for this Sound` | :sg:`set_volume(value) -> None` This will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound. :param float value: volume in the range of 0.0 to 1.0 (inclusive) | If value < 0.0, the volume will not be changed | If value > 1.0, the volume will be set to 1.0 .. ## Sound.set_volume ## .. method:: get_volume | :sl:`get the playback volume` | :sg:`get_volume() -> value` Return a value from 0.0 to 1.0 representing the volume for this Sound. .. ## Sound.get_volume ## .. method:: get_num_channels | :sl:`count how many times this Sound is playing` | :sg:`get_num_channels() -> count` Return the number of active channels this sound is playing on. .. ## Sound.get_num_channels ## .. method:: get_length | :sl:`get the length of the Sound` | :sg:`get_length() -> seconds` Return the length of this Sound in seconds. .. ## Sound.get_length ## .. method:: get_raw | :sl:`return a bytestring copy of the Sound samples.` | :sg:`get_raw() -> bytes` Return a copy of the Sound object buffer as a bytes. .. versionadded:: 1.9.2 .. ## Sound.get_raw ## .. ## pygame.mixer.Sound ## .. class:: Channel | :sl:`Create a Channel object for controlling playback` | :sg:`Channel(id) -> Channel` Return a Channel object for one of the current channels. The id must be a value from 0 to the value of ``pygame.mixer.get_num_channels()``. The Channel object can be used to get fine control over the playback of Sounds. A channel can only playback a single Sound at time. Using channels is entirely optional since pygame can manage them by default. .. method:: play | :sl:`play a Sound on a specific Channel` | :sg:`play(Sound, loops=0, maxtime=0, fade_ms=0) -> None` This will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped. The loops argument has the same meaning as in ``Sound.play()``: it is the number of times to repeat the sound after the first time. If it is 3, the sound will be played 4 times (the first time, then three more). If loops is -1 then the playback will repeat indefinitely. As in ``Sound.play()``, the maxtime argument can be used to stop playback of the Sound after a given number of milliseconds. As in ``Sound.play()``, the fade_ms argument can be used fade in the sound. .. ## Channel.play ## .. method:: stop | :sl:`stop playback on a Channel` | :sg:`stop() -> None` Stop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it. .. ## Channel.stop ## .. method:: pause | :sl:`temporarily stop playback of a channel` | :sg:`pause() -> None` Temporarily stop the playback of sound on a channel. It can be resumed at a later time with ``Channel.unpause()`` .. ## Channel.pause ## .. method:: unpause | :sl:`resume pause playback of a channel` | :sg:`unpause() -> None` Resume the playback on a paused channel. .. ## Channel.unpause ## .. method:: fadeout | :sl:`stop playback after fading channel out` | :sg:`fadeout(time) -> None` Stop playback of a channel after fading out the sound over the given time argument in milliseconds. .. ## Channel.fadeout ## .. method:: set_volume | :sl:`set the volume of a playing channel` | :sg:`set_volume(value) -> None` | :sg:`set_volume(left, right) -> None` Set the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0. If one argument is passed, it will be the volume of both speakers. If two arguments are passed and the mixer is in stereo mode, the first argument will be the volume of the left speaker and the second will be the volume of the right speaker. (If the second argument is ``None``, the first argument will be the volume of both speakers.) If the channel is playing a Sound on which ``set_volume()`` has also been called, both calls are taken into account. For example: :: sound = pygame.mixer.Sound("s.wav") channel = s.play() # Sound plays at full volume by default sound.set_volume(0.9) # Now plays at 90% of full volume. sound.set_volume(0.6) # Now plays at 60% (previous value replaced). channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5). .. ## Channel.set_volume ## .. method:: get_volume | :sl:`get the volume of the playing channel` | :sg:`get_volume() -> value` Return the volume of the channel for the current playing sound. This does not take into account stereo separation used by :meth:`Channel.set_volume`. The Sound object also has its own volume which is mixed with the channel. .. ## Channel.get_volume ## .. method:: get_busy | :sl:`check if the channel is active` | :sg:`get_busy() -> bool` Returns ``True`` if the channel is actively mixing sound. If the channel is idle this returns ``False``. .. ## Channel.get_busy ## .. method:: get_sound | :sl:`get the currently playing Sound` | :sg:`get_sound() -> Sound` Return the actual Sound object currently playing on this channel. If the channel is idle ``None`` is returned. .. ## Channel.get_sound ## .. method:: queue | :sl:`queue a Sound object to follow the current` | :sg:`queue(Sound) -> None` When a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automatically. It is cleared on any other call to ``Channel.stop()`` or ``Channel.play()``. If there is no sound actively playing on the Channel then the Sound will begin playing immediately. .. ## Channel.queue ## .. method:: get_queue | :sl:`return any Sound that is queued` | :sg:`get_queue() -> Sound` If a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue. .. ## Channel.get_queue ## .. method:: set_endevent | :sl:`have the channel send an event when playback stops` | :sg:`set_endevent() -> None` | :sg:`set_endevent(type) -> None` When an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use ``pygame.event.get()`` to retrieve the endevent once it's sent. Note that if you called ``Sound.play(n)`` or ``Channel.play(sound,n)``, the end event is sent only once: after the sound has been played "n+1" times (see the documentation of Sound.play). If ``Channel.stop()`` or ``Channel.play()`` is called while the sound was still playing, the event will be posted immediately. The type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between ``pygame.locals.USEREVENT`` and ``pygame.locals.NUMEVENTS``. If no type argument is given then the Channel will stop sending endevents. .. ## Channel.set_endevent ## .. method:: get_endevent | :sl:`get the event a channel sends when playback stops` | :sg:`get_endevent() -> type` Returns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns ``pygame.NOEVENT``. .. ## Channel.get_endevent ## .. ## pygame.mixer.Channel ## .. ## pygame.mixer ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.981112 pygame-2.6.1/docs/generated/_sources/ref/mouse.rst.txt0000644000175100001770000001770114676242340022411 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mouse` =================== .. module:: pygame.mouse :synopsis: pygame module to work with the mouse | :sl:`pygame module to work with the mouse` The mouse functions can be used to get the current state of the mouse device. These functions can also alter the system cursor for the mouse. When the display mode is set, the event queue will start receiving mouse events. The mouse buttons generate ``pygame.MOUSEBUTTONDOWN`` and ``pygame.MOUSEBUTTONUP`` events when they are pressed and released. These events contain a button attribute representing which button was pressed. The mouse wheel will generate ``pygame.MOUSEBUTTONDOWN`` and ``pygame.MOUSEBUTTONUP`` events when rolled. The button will be set to 4 when the wheel is rolled up, and to button 5 when the wheel is rolled down. Whenever the mouse is moved it generates a ``pygame.MOUSEMOTION`` event. The mouse movement is broken into small and accurate motion events. As the mouse is moving many motion events will be placed on the queue. Mouse motion events that are not properly cleaned from the event queue are the primary reason the event queue fills up. If the mouse cursor is hidden, and input is grabbed to the current display the mouse will enter a virtual input mode, where the relative movements of the mouse will never be stopped by the borders of the screen. See the functions ``pygame.mouse.set_visible()`` and ``pygame.event.set_grab()`` to get this configured. **Mouse Wheel Behavior in pygame 2** There is proper functionality for mouse wheel behaviour with pygame 2 supporting ``pygame.MOUSEWHEEL`` events. The new events support horizontal and vertical scroll movements, with signed integer values representing the amount scrolled (``x`` and ``y``), as well as ``flipped`` direction (the set positive and negative values for each axis is flipped). Read more about SDL2 input-related changes here ``_ In pygame 2, the mouse wheel functionality can be used by listening for the ``pygame.MOUSEWHEEL`` type of an event (Bear in mind they still emit ``pygame.MOUSEBUTTONDOWN`` events like in pygame 1.x, as well). When this event is triggered, a developer can access the appropriate ``Event`` object with ``pygame.event.get()``. The object can be used to access data about the mouse scroll, such as ``which`` (it will tell you what exact mouse device trigger the event). .. code-block:: python :caption: Code example of mouse scroll (tested on 2.0.0.dev7) :name: test.py # Taken from husano896's PR thread (slightly modified) import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() def main(): while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() return elif event.type == MOUSEWHEEL: print(event) print(event.x, event.y) print(event.flipped) print(event.which) # can access properties with # proper notation(ex: event.y) clock.tick(60) # Execute game: main() .. function:: get_pressed | :sl:`get the state of the mouse buttons` | :sg:`get_pressed(num_buttons=3) -> (button1, button2, button3)` | :sg:`get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5)` Returns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently being pressed at the time of the call. Note, to get all of the mouse events it is better to use either ``pygame.event.wait()`` or ``pygame.event.get()`` and check all of those events to see if they are ``MOUSEBUTTONDOWN``, ``MOUSEBUTTONUP``, or ``MOUSEMOTION``. Note, that on ``X11`` some X servers use middle button emulation. When you click both buttons ``1`` and ``3`` at the same time a ``2`` button event can be emitted. Note, remember to call ``pygame.event.get()`` before this function. Otherwise it will not work as expected. To support five button mice, an optional parameter ``num_buttons`` has been added in pygame 2. When this is set to ``5``, ``button4`` and ``button5`` are added to the returned tuple. Only ``3`` and ``5`` are valid values for this parameter. .. versionchanged:: 2.0.0 ``num_buttons`` argument added .. ## pygame.mouse.get_pressed ## .. function:: get_pos | :sl:`get the mouse cursor position` | :sg:`get_pos() -> (x, y)` Returns the ``x`` and ``y`` position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen. .. ## pygame.mouse.get_pos ## .. function:: get_rel | :sl:`get the amount of mouse movement` | :sg:`get_rel() -> (x, y)` Returns the amount of movement in ``x`` and ``y`` since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual input mode is described at the top of the page. .. ## pygame.mouse.get_rel ## .. function:: set_pos | :sl:`set the mouse cursor position` | :sg:`set_pos([x, y]) -> None` Set the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new ``pygame.MOUSEMOTION`` event. .. ## pygame.mouse.set_pos ## .. function:: set_visible | :sl:`hide or show the mouse cursor` | :sg:`set_visible(bool) -> bool` If the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor. .. ## pygame.mouse.set_visible ## .. function:: get_visible | :sl:`get the current visibility state of the mouse cursor` | :sg:`get_visible() -> bool` Get the current visibility state of the mouse cursor. ``True`` if the mouse is visible, ``False`` otherwise. .. versionadded:: 2.0.0 .. ## pygame.mouse.get_visible ## .. function:: get_focused | :sl:`check if the display is receiving mouse input` | :sg:`get_focused() -> bool` Returns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus"). This method is most useful when working in a window. By contrast, in full-screen mode, this method always returns true. Note: under ``MS`` Windows, the window that has the mouse focus also has the keyboard focus. But under X-Windows, one window can receive mouse events and another receive keyboard events. ``pygame.mouse.get_focused()`` indicates whether the pygame window receives mouse events. .. ## pygame.mouse.get_focused ## .. function:: set_cursor | :sl:`set the mouse cursor to a new cursor` | :sg:`set_cursor(pygame.cursors.Cursor) -> None` | :sg:`set_cursor(size, hotspot, xormasks, andmasks) -> None` | :sg:`set_cursor(hotspot, surface) -> None` | :sg:`set_cursor(constant) -> None` Set the mouse cursor to something new. This function accepts either an explicit ``Cursor`` object or arguments to create a ``Cursor`` object. See :class:`pygame.cursors.Cursor` for help creating cursors and for examples. .. versionchanged:: 2.0.1 .. ## pygame.mouse.set_cursor ## .. function:: get_cursor | :sl:`get the current mouse cursor` | :sg:`get_cursor() -> pygame.cursors.Cursor` Get the information about the mouse system cursor. The return value contains the same data as the arguments passed into :func:`pygame.mouse.set_cursor()`. .. note:: Code that unpacked a get_cursor() call into ``size, hotspot, xormasks, andmasks`` will still work, assuming the call returns an old school type cursor. .. versionchanged:: 2.0.1 .. ## pygame.mouse.get_cursor ## .. ## pygame.mouse ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/music.rst.txt0000644000175100001770000002247314676242340022403 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.mixer.music` ========================= .. module:: pygame.mixer.music :synopsis: pygame module for controlling streamed audio | :sl:`pygame module for controlling streamed audio` The music module is closely tied to :mod:`pygame.mixer`. Use the music module to control the playback of music in the sound mixer. The difference between the music playback and regular Sound playback is that the music is streamed, and never actually loaded all at once. The mixer system only supports a single music stream at once. On older pygame versions, ``MP3`` support was limited under Mac and Linux. This changed in pygame ``v2.0.2`` which got improved MP3 support. Consider using ``OGG`` file format for music as that can give slightly better compression than MP3 in most cases. .. function:: load | :sl:`Load a music file for playback` | :sg:`load(filename) -> None` | :sg:`load(fileobj, namehint="") -> None` This will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing. If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`load(fileobj, "ogg")`. .. versionchanged:: 2.0.2 Added optional ``namehint`` argument .. ## pygame.mixer.music.load ## .. function:: unload | :sl:`Unload the currently loaded music to free up resources` | :sg:`unload() -> None` This closes resources like files for any music that may be loaded. .. versionadded:: 2.0.0 .. ## pygame.mixer.music.load ## .. function:: play | :sl:`Start the playback of the music stream` | :sg:`play(loops=0, start=0.0, fade_ms=0) -> None` This will play the loaded music stream. If the music is already playing it will be restarted. ``loops`` is an optional integer argument, which is ``0`` by default, which indicates how many times to repeat the music. The music repeats indefinitely if this argument is set to ``-1``. ``start`` is an optional float argument, which is ``0.0`` by default, which denotes the position in time from which the music starts playing. The starting position depends on the format of the music played. ``MP3`` and ``OGG`` use the position as time in seconds. For ``MP3`` files the start time position selected may not be accurate as things like variable bit rate encoding and ID3 tags can throw off the timing calculations. For ``MOD`` music it is the pattern order number. Passing a start position will raise a NotImplementedError if the start position cannot be set. ``fade_ms`` is an optional integer argument, which is ``0`` by default, which denotes the period of time (in milliseconds) over which the music will fade up from volume level ``0.0`` to full volume (or the volume level previously set by :func:`set_volume`). The sample may end before the fade-in is complete. If the music is already streaming ``fade_ms`` is ignored. .. versionchanged:: 2.0.0 Added optional ``fade_ms`` argument .. ## pygame.mixer.music.play ## .. function:: rewind | :sl:`restart music` | :sg:`rewind() -> None` Resets playback of the current music to the beginning. If :func:`pause` has previously been used to pause the music, the music will remain paused. .. note:: :func:`rewind` supports a limited number of file types and notably ``WAV`` files are NOT supported. For unsupported file types use :func:`play` which will restart the music that's already playing (note that this will start the music playing again even if previously paused). .. ## pygame.mixer.music.rewind ## .. function:: stop | :sl:`stop the music playback` | :sg:`stop() -> None` Stops the music playback if it is currently playing. endevent will be triggered, if set. It won't unload the music. .. ## pygame.mixer.music.stop ## .. function:: pause | :sl:`temporarily stop music playback` | :sg:`pause() -> None` Temporarily stop playback of the music stream. It can be resumed with the :func:`unpause` function. .. ## pygame.mixer.music.pause ## .. function:: unpause | :sl:`resume paused music` | :sg:`unpause() -> None` This will resume the playback of a music stream after it has been paused. .. ## pygame.mixer.music.unpause ## .. function:: fadeout | :sl:`stop music playback after fading out` | :sg:`fadeout(time) -> None` Fade out and stop the currently playing music. The ``time`` argument denotes the integer milliseconds for which the fading effect is generated. Note, that this function blocks until the music has faded out. Calls to :func:`fadeout` and :func:`set_volume` will have no effect during this time. If an event was set using :func:`set_endevent` it will be called after the music has faded. .. ## pygame.mixer.music.fadeout ## .. function:: set_volume | :sl:`set the music volume` | :sg:`set_volume(volume) -> None` Set the volume of the music playback. The ``volume`` argument is a float between ``0.0`` and ``1.0`` that sets the volume level. When new music is loaded the volume is reset to full volume. If ``volume`` is a negative value it will be ignored and the volume will remain set at the current level. If the ``volume`` argument is greater than ``1.0``, the volume will be set to ``1.0``. .. ## pygame.mixer.music.set_volume ## .. function:: get_volume | :sl:`get the music volume` | :sg:`get_volume() -> value` Returns the current volume for the mixer. The value will be between ``0.0`` and ``1.0``. .. ## pygame.mixer.music.get_volume ## .. function:: get_busy | :sl:`check if the music stream is playing` | :sg:`get_busy() -> bool` Returns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused. .. versionchanged:: 2.0.1 Returns False when music paused. .. ## pygame.mixer.music.get_busy ## .. function:: set_pos | :sl:`set position to play from` | :sg:`set_pos(pos) -> None` This sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format. For ``MOD`` files, pos is the integer pattern number in the module. For ``OGG`` it is the absolute position, in seconds, from the beginning of the sound. For ``MP3`` files, it is the relative position, in seconds, from the current position. For absolute positioning in an ``MP3`` file, first call :func:`rewind`. Other file formats are unsupported. Newer versions of SDL_mixer have better positioning support than earlier ones. An SDLError is raised if a particular format does not support positioning. Function :func:`set_pos` calls underlining SDL_mixer function ``Mix_SetMusicPosition``. .. versionadded:: 1.9.2 .. ## pygame.mixer.music.set_pos ## .. function:: get_pos | :sl:`get the music play time` | :sg:`get_pos() -> time` This gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets. .. ## pygame.mixer.music.get_pos ## .. function:: queue | :sl:`queue a sound file to follow the current` | :sg:`queue(filename) -> None` | :sg:`queue(fileobj, namehint="", loops=0) -> None` This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in the new sound becoming the queued sound. Also, if the current sound is ever stopped or changed, the queued sound will be lost. If you are loading from a file object, the namehint parameter can be used to specify the type of music data in the object. For example: :code:`queue(fileobj, "ogg")`. The following example will play music by Bach six times, then play music by Mozart once: :: pygame.mixer.music.load('bach.ogg') pygame.mixer.music.play(5) # Plays six times, not five! pygame.mixer.music.queue('mozart.ogg') .. versionchanged:: 2.0.2 Added optional ``namehint`` argument .. ## pygame.mixer.music.queue ## .. function:: set_endevent | :sl:`have the music send an event when playback stops` | :sg:`set_endevent() -> None` | :sg:`set_endevent(type) -> None` This causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued. The event will be queued every time the music finishes, not just the first time. To stop the event from being queued, call this method with no argument. .. ## pygame.mixer.music.set_endevent ## .. function:: get_endevent | :sl:`get the event a channel sends when playback stops` | :sg:`get_endevent() -> type` Returns the event type to be sent every time the music finishes playback. If there is no endevent the function returns ``pygame.NOEVENT``. .. ## pygame.mixer.music.get_endevent ## .. ## pygame.mixer.music ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/overlay.rst.txt0000644000175100001770000000514314676242340022737 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Overlay` ===================== .. currentmodule:: pygame .. warning:: This module is non functional in pygame 2.0 and above, unless you have manually compiled pygame with SDL1. This module will not be supported in the future. .. class:: Overlay | :sl:`pygame object for video overlay graphics` | :sg:`Overlay(format, (width, height)) -> Overlay` The Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard ``RGB`` pixel formats, and can use multiple resolutions of data to create a single image. The Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays. The Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types: :: YV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAY The width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay. The overlay objects are always visible, and always show above the regular display contents. .. method:: display | :sl:`set the overlay pixel data` | :sg:`display((y, u, v)) -> None` | :sg:`display() -> None` Display the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay. If no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated. The strings are not validated, and improperly sized strings could crash the program. .. ## Overlay.display ## .. method:: set_location | :sl:`control where the overlay is displayed` | :sg:`set_location(rect) -> None` Set the location for the overlay. The overlay will always be shown relative to the main display Surface. This does not actually redraw the overlay, it will be updated on the next call to ``Overlay.display()``. .. ## Overlay.set_location ## .. method:: get_hardware | :sl:`test if the Overlay is hardware accelerated` | :sg:`get_hardware(rect) -> int` Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used. .. ## Overlay.get_hardware ## .. ## pygame.Overlay ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/pixelarray.rst.txt0000644000175100001770000002373414676242340023444 0ustar00runnerdocker.. include:: common.txt :class:`pygame.PixelArray` ========================== .. currentmodule:: pygame .. class:: PixelArray | :sl:`pygame object for direct pixel access of surfaces` | :sg:`PixelArray(Surface) -> PixelArray` The PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays support slicing, both for returning a subarray or for assignment. A pixel array sliced on a single column or row returns a one dimensional pixel array. Arithmetic and other operations are not supported. A pixel array can be safely assigned to itself. Finally, pixel arrays export an array struct interface, allowing them to interact with :mod:`pygame.pixelcopy` methods and NumPy arrays. A PixelArray pixel item can be assigned a raw integer values, a :class:`pygame.Color` instance, or a (r, g, b[, a]) tuple. :: pxarray[x, y] = 0xFF00FF pxarray[x, y] = pygame.Color(255, 0, 255) pxarray[x, y] = (255, 0, 255) However, only a pixel's integer value is returned. So, to compare a pixel to a particular color the color needs to be first mapped using the :meth:`Surface.map_rgb()` method of the Surface object for which the PixelArray was created. :: pxarray = pygame.PixelArray(surface) # Check, if the first pixel at the topleft corner is blue if pxarray[0, 0] == surface.map_rgb((0, 0, 255)): ... When assigning to a range of of pixels, a non tuple sequence of colors or a PixelArray can be used as the value. For a sequence, the length must match the PixelArray width. :: pxarray[a:b] = 0xFF00FF # set all pixels to 0xFF00FF pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF, # second pixel = 0xAACCEE, ... pxarray[a:b] = [(255, 0, 255), (170, 204, 238), ...] # same as above pxarray[a:b] = [(255, 0, 255), 0xAACCEE, ...] # same as above pxarray[a:b] = otherarray[x:y] # slice sizes must match For PixelArray assignment, if the right hand side array has a row length of 1, then the column is broadcast over the target array's rows. An array of height 1 is broadcast over the target's columns, and is equivalent to assigning a 1D PixelArray. Subscript slices can also be used to assign to a rectangular subview of the target PixelArray. :: # Create some new PixelArray objects providing a different view # of the original array/surface. newarray = pxarray[2:4, 3:5] otherarray = pxarray[::2, ::2] Subscript slices can also be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis. The :: pxarray[::2, :] = (0, 0, 0) # Make even columns black. pxarray[::2] = (0, 0, 0) # Same as [::2, :] During its lifetime, the PixelArray locks the surface, thus you explicitly have to close() it once its not used any more and the surface should perform operations in the same scope. It is best to use it as a context manager using the with PixelArray(surf) as pixel_array: style. So it works on pypy too. A simple ``:`` slice index for the column can be omitted. :: pxarray[::2, ...] = (0, 0, 0) # Same as pxarray[::2, :] pxarray[...] = (255, 0, 0) # Same as pxarray[:] A note about PixelArray to PixelArray assignment, for arrays with an item size of 3 (created from 24 bit surfaces) pixel values are translated from the source to the destinations format. The red, green, and blue color elements of each pixel are shifted to match the format of the target surface. For all other pixel sizes no such remapping occurs. This should change in later pygame releases, where format conversions are performed for all pixel sizes. To avoid code breakage when full mapped copying is implemented it is suggested PixelArray to PixelArray copies be only between surfaces of identical format. .. versionadded:: 1.9.4 - close() method was added. For explicitly cleaning up. - being able to use PixelArray as a context manager for cleanup. - both of these are useful for when working without reference counting (pypy). .. versionadded:: 1.9.2 - array struct interface - transpose method - broadcasting for a length 1 dimension .. versionchanged:: 1.9.2 - A 2D PixelArray can have a length 1 dimension. Only an integer index on a 2D PixelArray returns a 1D array. - For assignment, a tuple can only be a color. Any other sequence type is a sequence of colors. .. versionadded: 1.8.0 Subscript support .. versionadded: 1.8.1 Methods :meth:`make_surface`, :meth:`replace`, :meth:`extract`, and :meth:`compare` .. versionadded: 1.9.2 Properties :attr:`itemsize`, :attr:`ndim`, :attr:`shape`, and :attr:`strides` .. versionadded: 1.9.2 Array struct interface .. versionadded: 1.9.4 Methods :meth:`close` .. attribute:: surface | :sl:`Gets the Surface the PixelArray uses.` | :sg:`surface -> Surface` The Surface the PixelArray was created for. .. ## PixelArray.surface ## .. attribute:: itemsize | :sl:`Returns the byte size of a pixel array item` | :sg:`itemsize -> int` This is the same as :meth:`Surface.get_bytesize` for the pixel array's surface. .. versionadded:: 1.9.2 .. attribute:: ndim | :sl:`Returns the number of dimensions.` | :sg:`ndim -> int` A pixel array can be 1 or 2 dimensional. .. versionadded:: 1.9.2 .. attribute:: shape | :sl:`Returns the array size.` | :sg:`shape -> tuple of int's` A tuple or length :attr:`ndim` giving the length of each dimension. Analogous to :meth:`Surface.get_size`. .. versionadded:: 1.9.2 .. attribute:: strides | :sl:`Returns byte offsets for each array dimension.` | :sg:`strides -> tuple of int's` A tuple or length :attr:`ndim` byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step). .. versionadded:: 1.9.2 .. method:: make_surface | :sl:`Creates a new Surface from the current PixelArray.` | :sg:`make_surface() -> Surface` Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface. :: # Create a new surface flipped around the vertical axis. sf = pxarray[:,::-1].make_surface () .. versionadded:: 1.8.1 .. ## PixelArray.make_surface ## .. method:: replace | :sl:`Replaces the passed color in the PixelArray with another one.` | :sg:`replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None` Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well. This is an in place operation that directly affects the pixels of the PixelArray. .. versionadded:: 1.8.1 .. ## PixelArray.replace ## .. method:: extract | :sl:`Extracts the passed color from the PixelArray.` | :sg:`extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray` Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well. .. versionadded:: 1.8.1 .. ## PixelArray.extract ## .. method:: compare | :sl:`Compares the PixelArray with another one.` | :sg:`compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray` Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays. Both PixelArray objects must have identical bit depths and dimensions. It uses a simple weighted Euclidean distance formula to calculate the distance between the colors. The distance space ranges from 0.0 to 1.0 and is used as a threshold for the color detection. This causes the comparison to mark pixels with a similar, but not exactly identical color, as white. .. versionadded:: 1.8.1 .. ## PixelArray.compare ## .. method:: transpose | :sl:`Exchanges the x and y axis.` | :sg:`transpose() -> PixelArray` This method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array. .. versionadded:: 1.9.2 .. ## PixelArray.transpose ## .. method:: close | :sl:`Closes the PixelArray, and releases Surface lock.` | :sg:`close() -> PixelArray` This method is for explicitly closing the PixelArray, and releasing a lock on the Surface. .. versionadded:: 1.9.4 .. ## PixelArray.close ## .. ## pygame.PixelArray ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/pixelcopy.rst.txt0000644000175100001770000001066314676242340023275 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.pixelcopy` ======================= .. module:: pygame.pixelcopy :synopsis: pygame module for general pixel array copying | :sl:`pygame module for general pixel array copying` The ``pygame.pixelcopy`` module contains functions for copying between surfaces and objects exporting an array structure interface. It is a backend for :mod:`pygame.surfarray`, adding NumPy support. But pixelcopy is more general, and intended for direct use. The array struct interface exposes an array's data in a standard way. It was introduced in NumPy. In Python 2.7 and above it is replaced by the new buffer protocol, though the buffer protocol is still a work in progress. The array struct interface, on the other hand, is stable and works with earlier Python versions. So for now the array struct interface is the predominate way pygame handles array introspection. For 2d arrays of integer pixel values, the values are mapped to the pixel format of the related surface. To get the actual color of a pixel value use :meth:`pygame.Surface.unmap_rgb`. 2d arrays can only be used directly between surfaces having the same pixel layout. New in pygame 1.9.2. .. function:: surface_to_array | :sl:`copy surface pixels to an array object` | :sg:`surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None` The surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument ``kind`` and the target array dimension, a copy may be raw pixel value, RGB, a color component slice, or colorkey alpha transparency value. Recognized ``kind`` values are the single character codes 'P', 'R', 'G', 'B', 'A', and 'C'. Kind codes are case insensitive, so 'p' is equivalent to 'P'. The first two dimensions of the target must be the surface size (w, h). The default 'P' kind code does a direct raw integer pixel (mapped) value copy to a 2D array and a 'RGB' pixel component (unmapped) copy to a 3D array having shape (w, h, 3). For an 8 bit colormap surface this means the table index is copied to a 2D array, not the table value itself. A 2D array's item size must be at least as large as the surface's pixel byte size. The item size of a 3D array must be at least one byte. For the 'R', 'G', 'B', and 'A' copy kinds a single color component of the unmapped surface pixels are copied to the target 2D array. For kind 'A' and surfaces with source alpha (the surface was created with the SRCALPHA flag), has a colorkey (set with :meth:`Surface.set_colorkey() `), or has a blanket alpha (set with :meth:`Surface.set_alpha() `) then the alpha values are those expected for a SDL surface. If a surface has no explicit alpha value, then the target array is filled with the value of the optional ``opaque`` surface_to_array argument (default 255: not transparent). Copy kind 'C' is a special case for alpha copy of a source surface with colorkey. Unlike the 'A' color component copy, the ``clear`` argument value is used for colorkey matches, ``opaque`` otherwise. By default, a match has alpha 0 (totally transparent), while everything else is alpha 255 (totally opaque). It is a more general implementation of :meth:`pygame.surfarray.array_colorkey`. Specific to surface_to_array, a ValueError is raised for target arrays with incorrect shape or item size. A TypeError is raised for an incorrect kind code. Surface specific problems, such as locking, raise a pygame.error. .. ## pygame.pixelcopy.surface_to_array ## .. function:: array_to_surface | :sl:`copy an array object to a surface` | :sg:`array_to_surface(, ) -> None` See :func:`pygame.surfarray.blit_array`. .. ## pygame.pixelcopy.array_to_surface ## .. function:: map_array | :sl:`copy an array to another array, using surface format` | :sg:`map_array(, , ) -> None` Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of . .. ## pygame.pixelcopy.map_array ## .. function:: make_surface | :sl:`Copy an array to a new surface` | :sg:`pygame.pixelcopy.make_surface(array) -> Surface` Create a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values. .. ## pygame.pixelcopy.make_surface ## .. ## pygame.pixelcopy ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/pygame.rst.txt0000644000175100001770000003543114676242340022543 0ustar00runnerdocker.. include:: common.txt :mod:`pygame` ============= .. module:: pygame :synopsis: the top level pygame package | :sl:`the top level pygame package` The pygame package represents the top-level package for others to use. Pygame itself is broken into many submodules, but this does not affect programs that use pygame. As a convenience, most of the top-level variables in pygame have been placed inside a module named :mod:`pygame.locals`. This is meant to be used with ``from pygame.locals import *``, in addition to ``import pygame``. When you ``import pygame`` all available pygame submodules are automatically imported. Be aware that some of the pygame modules are considered *optional*, and may not be available. In that case, pygame will provide a placeholder object instead of the module, which can be used to test for availability. .. function:: init | :sl:`initialize all imported pygame modules` | :sg:`init() -> (numpass, numfail)` Initialize all imported pygame modules. No exceptions will be raised if a module fails, but the total number if successful and failed inits will be returned as a tuple. You can always initialize individual modules manually, but :func:`pygame.init` is a convenient way to get everything started. The ``init()`` functions for individual modules will raise exceptions when they fail. You may want to initialize the different modules separately to speed up your program or remove the modules your game does not require. It is safe to call this ``init()`` more than once as repeated calls will have no effect. This is true even if you have ``pygame.quit()`` all the modules. .. ## pygame.init ## .. function:: quit | :sl:`uninitialize all pygame modules` | :sg:`quit() -> None` Uninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is safe to call this function more than once as repeated calls have no effect. .. note:: Calling :func:`pygame.quit` will not exit your program. Consider letting your program end in the same way a normal Python program will end. .. ## pygame.quit ## .. function:: get_init | :sl:`returns True if pygame is currently initialized` | :sg:`get_init() -> bool` Returns ``True`` if pygame is currently initialized. .. versionadded:: 1.9.5 .. ## pygame.get_init ## .. exception:: error | :sl:`standard pygame exception` | :sg:`raise pygame.error(message)` This exception is raised whenever a pygame or SDL operation fails. You can catch any anticipated problems and deal with the error. The exception is always raised with a descriptive message about the problem. Derived from the ``RuntimeError`` exception, which can also be used to catch these raised errors. .. ## pygame.error ## .. function:: get_error | :sl:`get the current error message` | :sg:`get_error() -> errorstr` SDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed. .. ## pygame.get_error ## .. function:: set_error | :sl:`set the current error message` | :sg:`set_error(error_msg) -> None` SDL maintains an internal error message. This message will usually be given to you when :func:`pygame.error` is raised, so this function will rarely be needed. .. ## pygame.set_error ## .. function:: get_sdl_version | :sl:`get the version number of SDL` | :sg:`get_sdl_version(linked=True) -> major, minor, patch` Returns the three version numbers of the SDL library. ``linked=True`` will cause the function to return the version of the library that pygame is linked against while ``linked=False`` will cause the function to return the version of the library that pygame is compiled against. It can be used to detect which features may or may not be available through pygame. .. versionadded:: 1.7.0 .. versionchanged:: 2.2.0 ``linked`` keyword argument added .. ## pygame.get_sdl_version ## .. function:: get_sdl_byteorder | :sl:`get the byte order of SDL` | :sg:`get_sdl_byteorder() -> int` Returns the byte order of the SDL library. It returns ``1234`` for little endian byte order and ``4321`` for big endian byte order. .. versionadded:: 1.8 .. ## pygame.get_sdl_byteorder ## .. function:: register_quit | :sl:`register a function to be called when pygame quits` | :sg:`register_quit(callable) -> None` When :func:`pygame.quit` is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed. .. ## pygame.register_quit ## .. function:: encode_string | :sl:`Encode a Unicode or bytes object` | :sg:`encode_string([obj [, encoding [, errors [, etype]]]]) -> bytes or None` obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``. encoding (string): If present, encoding to use. The default is ``'unicode_escape'``. errors (string): If given, how to handle unencodable characters. The default is ``'backslashreplace'``. etype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``. For the default encoding and errors values there should be no encoding errors. This function is used in encoding file paths. Keyword arguments are supported. .. versionadded:: 1.9.2 (primarily for use in unit tests) .. ## pygame.encode_string ## .. function:: encode_file_path | :sl:`Encode a Unicode or bytes object as a file system path` | :sg:`encode_file_path([obj [, etype]]) -> bytes or None` obj: If Unicode, encode; if bytes, return unaltered; if anything else, return ``None``; if not given, raise ``SyntaxError``. etype (exception type): If given, the exception type to raise for an encoding error. The default is ``UnicodeEncodeError``, as returned by ``PyUnicode_AsEncodedString()``. This function is used to encode file paths in pygame. Encoding is to the codec as returned by ``sys.getfilesystemencoding()``. Keyword arguments are supported. .. versionadded:: 1.9.2 (primarily for use in unit tests) .. ## pygame.encode_file_path ## :mod:`pygame.version` ===================== .. module:: pygame.version :synopsis: small module containing version information | :sl:`small module containing version information` This module is automatically imported into the pygame package and can be used to check which version of pygame has been imported. .. data:: ver | :sl:`version number as a string` | :sg:`ver = '1.2'` This is the version represented as a string. It can contain a micro release number as well, e.g. ``'1.5.2'`` .. ## pygame.version.ver ## .. data:: vernum | :sl:`tupled integers of the version` | :sg:`vernum = (1, 5, 3)` This version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this: :: if pygame.version.vernum < (1, 5): print('Warning, older version of pygame (%s)' % pygame.version.ver) disable_advanced_features = True .. versionadded:: 1.9.6 Attributes ``major``, ``minor``, and ``patch``. :: vernum.major == vernum[0] vernum.minor == vernum[1] vernum.patch == vernum[2] .. versionchanged:: 1.9.6 ``str(pygame.version.vernum)`` returns a string like ``"2.0.0"`` instead of ``"(2, 0, 0)"``. .. versionchanged:: 1.9.6 ``repr(pygame.version.vernum)`` returns a string like ``"PygameVersion(major=2, minor=0, patch=0)"`` instead of ``"(2, 0, 0)"``. .. ## pygame.version.vernum ## .. data:: rev | :sl:`repository revision of the build` | :sg:`rev = 'a6f89747b551+'` The Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds. Important note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string ``""``. It has always been returning an empty string since ``v1.9.5``. .. versionchanged:: 1.9.5 Always returns an empty string ``""``. .. ## pygame.version.rev ## .. data:: SDL | :sl:`tupled integers of the SDL library version` | :sg:`SDL = '(2, 0, 12)'` This is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this: :: >>> pygame.version.SDL.major 2 printing the whole thing returns a string like this: :: >>> pygame.version.SDL SDLVersion(major=2, minor=0, patch=12) .. versionadded:: 2.0.0 .. ## pygame.version.SDL ## .. ## pygame.version ## .. ## pygame ## .. _environment-variables: **Setting Environment Variables** Some aspects of pygame's behaviour can be controlled by setting environment variables, they cover a wide range of the library's functionality. Some of the variables are from pygame itself, while others come from the underlying C SDL library that pygame uses. In python, environment variables are usually set in code like this:: import os os.environ['NAME_OF_ENVIRONMENT_VARIABLE'] = 'value_to_set' Or to preserve users ability to override the variable:: import os os.environ['ENV_VAR'] = os.environ.get('ENV_VAR', 'value') If the variable is more useful for users of an app to set than the developer then they can set it like this: **Windows**:: set NAME_OF_ENVIRONMENT_VARIABLE=value_to_set python my_application.py **Linux/Mac**:: ENV_VAR=value python my_application.py For some variables they need to be set before initialising pygame, some must be set before even importing pygame, and others can simply be set right before the area of code they control is run. Below is a list of environment variables, their settable values, and a brief description of what they do. | **Pygame Environment Variables** These variables are defined by pygame itself. | :: PYGAME_DISPLAY - Experimental (subject to change) Set index of the display to use, "0" is the default. This sets the display where pygame will open its window or screen. The value set here will be used if set before calling :func:`pygame.display.set_mode()`, and as long as no 'display' parameter is passed into :func:`pygame.display.set_mode()`. | :: PYGAME_FORCE_SCALE - Set to "photo" or "default". This forces set_mode() to use the SCALED display mode and, if "photo" is set, makes the scaling use the slowest, but highest quality anisotropic scaling algorithm, if it is available. Must be set before calling :func:`pygame.display.set_mode()`. | :: PYGAME_BLEND_ALPHA_SDL2 - New in pygame 2.0.0 Set to "1" to enable the SDL2 blitter. This makes pygame use the SDL2 blitter for all alpha blending. The SDL2 blitter is sometimes faster than the default blitter but uses a different formula so the final colours may differ. Must be set before :func:`pygame.init()` is called. | :: PYGAME_HIDE_SUPPORT_PROMPT - Set to "1" to hide the prompt. This stops the welcome message popping up in the console that tells you which version of python, pygame & SDL you are using. Must be set before importing pygame. | :: PYGAME_FREETYPE - Set to "1" to enable. This switches the pygame.font module to a pure freetype implementation that bypasses SDL_ttf. See the font module for why you might want to do this. Must be set before importing pygame. | :: PYGAME_CAMERA - Set to "opencv" or "vidcapture" Forces the library backend used in the camera module, overriding the platform defaults. Must be set before calling :func:`pygame.camera.init()`. In pygame 2.0.3, backends can be set programmatically instead, and the old OpenCV backend has been replaced with one on top of "opencv-python," rather than the old "highgui" OpenCV port. Also, there is a new native Windows backend available. | | **SDL Environment Variables** These variables are defined by SDL. For documentation on the environment variables available in pygame 1 try `here `__. For Pygame 2, some selected environment variables are listed below. | :: SDL_VIDEO_CENTERED - Set to "1" to enable centering the window. This will make the pygame window open in the centre of the display. Must be set before calling :func:`pygame.display.set_mode()`. | :: SDL_VIDEO_WINDOW_POS - Set to "x,y" to position the top left corner of the window. This allows control over the placement of the pygame window within the display. Must be set before calling :func:`pygame.display.set_mode()`. | :: SDL_VIDEODRIVER - Set to "drivername" to change the video driver used. On some platforms there are multiple video drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.display.init()`. | :: SDL_AUDIODRIVER - Set to "drivername" to change the audio driver used. On some platforms there are multiple audio drivers available and this allows users to pick between them. More information is available `here `__. Must be set before calling :func:`pygame.init()` or :func:`pygame.mixer.init()`. | :: SDL_VIDEO_ALLOW_SCREENSAVER Set to "1" to allow screensavers while pygame apps are running. By default pygame apps disable screensavers while they are running. Setting this environment variable allows users or developers to change that and make screensavers run again. | :: SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR Set to "0" to re-enable the compositor. By default SDL tries to disable the X11 compositor for all pygame apps. This is usually a good thing as it's faster, however if you have an app which *doesn't* update every frame and are using linux you may want to disable this bypass. The bypass has reported problems on KDE linux. This variable is only used on x11/linux platforms. | :: SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS Set to "1" to allow joysticks to be updated even when the window is out of focus By default, when the window is not in focus, input devices do not get updated. However, using this environment variable it is possible to get joystick updates even when the window is in the background. Must be set before calling :func:`pygame.init()` or :func:`pygame.joystick.init()`. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/rect.rst.txt0000644000175100001770000005123314676242340022214 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Rect` ================== .. currentmodule:: pygame .. class:: Rect | :sl:`pygame object for storing rectangular coordinates` | :sg:`Rect(left, top, width, height) -> Rect` | :sg:`Rect((left, top), (width, height)) -> Rect` | :sg:`Rect(object) -> Rect` Pygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. Rects can also be created from Python objects that are already a Rect or have an attribute named "rect". Any Pygame function that requires a Rect argument also accepts any of these values to construct a Rect. This makes it easier to create Rects on the fly as arguments for functions. The Rect functions that change the position or size of a Rect return a new copy of the Rect with the affected changes. The original Rect is not modified. Some methods have an alternate "in-place" version that returns None but affects the original Rect. These "in-place" methods are denoted with the "ip" suffix. The Rect object has several virtual attributes which can be used to move and align the Rect: :: x,y top, left, bottom, right topleft, bottomleft, topright, bottomright midtop, midleft, midbottom, midright center, centerx, centery size, width, height w,h All of these attributes can be assigned to: :: rect1.right = 10 rect2.center = (20,30) Assigning to size, width or height changes the dimensions of the rectangle; all other assignments move the rectangle without resizing it. Notice that some attributes are integers and others are pairs of integers. If a Rect has a nonzero width or height, it will return ``True`` for a nonzero test. Some methods return a Rect with 0 size to represent an invalid rectangle. A Rect with a 0 size will not collide when using collision detection methods (e.g. :meth:`collidepoint`, :meth:`colliderect`, etc.). The coordinates for Rect objects are all integers. The size values can be programmed to have negative values, but these are considered illegal Rects for most operations. There are several collision tests between other rectangles. Most python containers can be searched for collisions against a single Rect. The area covered by a Rect does not include the right- and bottom-most edge of pixels. If one Rect's bottom border is another Rect's top border (i.e., rect1.bottom=rect2.top), the two meet exactly on the screen but do not overlap, and ``rect1.colliderect(rect2)`` returns false. The Rect object is also iterable: :: r = Rect(0, 1, 2, 3) x, y, w, h = r .. versionadded:: 1.9.2 The Rect class can be subclassed. Methods such as ``copy()`` and ``move()`` will recognize this and return instances of the subclass. However, the subclass's ``__init__()`` method is not called, and ``__new__()`` is assumed to take no arguments. So these methods should be overridden if any extra attributes need to be copied. .. method:: copy | :sl:`copy the rectangle` | :sg:`copy() -> Rect` Returns a new rectangle having the same position and size as the original. New in pygame 1.9 .. ## Rect.copy ## .. method:: move | :sl:`moves the rectangle` | :sg:`move(x, y) -> Rect` Returns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative. .. ## Rect.move ## .. method:: move_ip | :sl:`moves the rectangle, in place` | :sg:`move_ip(x, y) -> None` Same as the ``Rect.move()`` method, but operates in place. .. ## Rect.move_ip ## .. method:: inflate | :sl:`grow or shrink the rectangle size` | :sg:`inflate(x, y) -> Rect` Returns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off. .. ## Rect.inflate ## .. method:: inflate_ip | :sl:`grow or shrink the rectangle size, in place` | :sg:`inflate_ip(x, y) -> None` Same as the ``Rect.inflate()`` method, but operates in place. .. ## Rect.inflate_ip ## .. method:: scale_by | :sl:`scale the rectangle by given a multiplier` | :sg:`scale_by(scalar) -> Rect` | :sg:`scale_by(scalex, scaley) -> Rect` Returns a new rectangle with the size scaled by the given multipliers. The rectangle remains centered around its current center. A single scalar or separate width and height scalars are allowed. Values above one will increase the size of the rectangle, whereas values between zero and one will decrease the size of the rectangle. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.scale_by ## .. method:: scale_by_ip | :sl:`grow or shrink the rectangle size, in place` | :sg:`scale_by_ip(scalar) -> None` | :sg:`scale_by_ip(scalex, scaley) -> None` Same as the ``Rect.scale_by()`` method, but operates in place. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.scale_by_ip ## .. method:: update | :sl:`sets the position and size of the rectangle` | :sg:`update(left, top, width, height) -> None` | :sg:`update((left, top), (width, height)) -> None` | :sg:`update(object) -> None` Sets the position and size of the rectangle, in place. See parameters for :meth:`pygame.Rect` for the parameters of this function. .. versionadded:: 2.0.1 .. ## Rect.update ## .. method:: clamp | :sl:`moves the rectangle inside another` | :sg:`clamp(Rect) -> Rect` Returns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed. .. ## Rect.clamp ## .. method:: clamp_ip | :sl:`moves the rectangle inside another, in place` | :sg:`clamp_ip(Rect) -> None` Same as the ``Rect.clamp()`` method, but operates in place. .. ## Rect.clamp_ip ## .. method:: clip | :sl:`crops a rectangle inside another` | :sg:`clip(Rect) -> Rect` Returns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned. .. ## Rect.clip ## .. method:: clipline | :sl:`crops a line inside a rectangle` | :sg:`clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline(x1, y1, x2, y2) -> ()` | :sg:`clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline((x1, y1), (x2, y2)) -> ()` | :sg:`clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline((x1, y1, x2, y2)) -> ()` | :sg:`clipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))` | :sg:`clipline(((x1, y1), (x2, y2))) -> ()` Returns the coordinates of a line that is cropped to be completely inside the rectangle. If the line does not overlap the rectangle, then an empty tuple is returned. The line to crop can be any of the following formats (floats can be used in place of ints, but they will be truncated): - four ints - 2 lists/tuples/Vector2s of 2 ints - a list/tuple of four ints - a list/tuple of 2 lists/tuples/Vector2s of 2 ints :returns: a tuple with the coordinates of the given line cropped to be completely inside the rectangle is returned, if the given line does not overlap the rectangle, an empty tuple is returned :rtype: tuple(tuple(int, int), tuple(int, int)) or () :raises TypeError: if the line coordinates are not given as one of the above described line formats .. note :: This method can be used for collision detection between a rect and a line. See example code below. .. note :: The ``rect.bottom`` and ``rect.right`` attributes of a :mod:`pygame.Rect` always lie one pixel outside of its actual border. :: # Example using clipline(). clipped_line = rect.clipline(line) if clipped_line: # If clipped_line is not an empty tuple then the line # collides/overlaps with the rect. The returned value contains # the endpoints of the clipped line. start, end = clipped_line x1, y1 = start x2, y2 = end else: print("No clipping. The line is fully outside the rect.") .. versionchanged:: 2.5.0 Added support for keyword arguments. .. versionadded:: 2.0.0 .. ## Rect.clipline ## .. method:: union | :sl:`joins two rectangles into one` | :sg:`union(Rect) -> Rect` Returns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals. .. ## Rect.union ## .. method:: union_ip | :sl:`joins two rectangles into one, in place` | :sg:`union_ip(Rect) -> None` Same as the ``Rect.union()`` method, but operates in place. .. ## Rect.union_ip ## .. method:: unionall | :sl:`the union of many rectangles` | :sg:`unionall(Rect_sequence) -> Rect` Returns the union of one rectangle with a sequence of many rectangles. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.unionall ## .. method:: unionall_ip | :sl:`the union of many rectangles, in place` | :sg:`unionall_ip(Rect_sequence) -> None` The same as the ``Rect.unionall()`` method, but operates in place. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.unionall_ip ## .. method:: fit | :sl:`resize and move a rectangle with aspect ratio` | :sg:`fit(Rect) -> Rect` Returns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height. .. ## Rect.fit ## .. method:: normalize | :sl:`correct negative sizes` | :sg:`normalize() -> None` This will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped. .. ## Rect.normalize ## .. method:: contains | :sl:`test if one rectangle is inside another` | :sg:`contains(Rect) -> bool` Returns true when the argument is completely inside the Rect. .. ## Rect.contains ## .. method:: collidepoint | :sl:`test if a point is inside a rectangle` | :sg:`collidepoint(x, y) -> bool` | :sg:`collidepoint((x,y)) -> bool` Returns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle. .. note :: For collision detection between a rect and a line the :meth:`clipline` method can be used. .. ## Rect.collidepoint ## .. method:: colliderect | :sl:`test if two rectangles overlap` | :sg:`colliderect(Rect) -> bool` Returns true if any portion of either rectangle overlap (except the top+bottom or left+right edges). .. note :: For collision detection between a rect and a line the :meth:`clipline` method can be used. .. ## Rect.colliderect ## .. method:: collidelist | :sl:`test if one rectangle in a list intersects` | :sg:`collidelist(list) -> index` Test whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned. .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidelist ## .. method:: collidelistall | :sl:`test if all rectangles in a list intersect` | :sg:`collidelistall(list) -> indices` Returns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned. Not only Rects are valid arguments, but these are all valid calls: .. code-block:: python Rect = pygame.Rect r = Rect(0, 0, 10, 10) list_of_rects = [Rect(1, 1, 1, 1), Rect(2, 2, 2, 2)] indices0 = r.collidelistall(list_of_rects) list_of_lists = [[1, 1, 1, 1], [2, 2, 2, 2]] indices1 = r.collidelistall(list_of_lists) list_of_tuples = [(1, 1, 1, 1), (2, 2, 2, 2)] indices2 = r.collidelistall(list_of_tuples) list_of_double_tuples = [((1, 1), (1, 1)), ((2, 2), (2, 2))] indices3 = r.collidelistall(list_of_double_tuples) class ObjectWithRectAttribute(object): def __init__(self, r): self.rect = r list_of_object_with_rect_attribute = [ ObjectWithRectAttribute(Rect(1, 1, 1, 1)), ObjectWithRectAttribute(Rect(2, 2, 2, 2)), ] indices4 = r.collidelistall(list_of_object_with_rect_attribute) class ObjectWithCallableRectAttribute(object): def __init__(self, r): self._rect = r def rect(self): return self._rect list_of_object_with_callable_rect = [ ObjectWithCallableRectAttribute(Rect(1, 1, 1, 1)), ObjectWithCallableRectAttribute(Rect(2, 2, 2, 2)), ] indices5 = r.collidelistall(list_of_object_with_callable_rect) .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidelistall ## .. method:: collideobjects | :sl:`test if any object in a list intersects` | :sg:`collideobjects(rect_list) -> object` | :sg:`collideobjects(obj_list, key=func) -> object` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjects feedback with authors `_ Test whether the rectangle collides with any object in the sequence. The object of the first collision found is returned. If no collisions are found then ``None`` is returned If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them. .. code-block:: python r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjects(rects) # -> print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ObjectWithSomRectAttribute("B", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("C", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ] # collision = r.collideobjects(objects) # this does not work because the items in the list are no Rect like object collision = r.collideobjects( objects, key=lambda o: o.collision_box ) # -> print(collision) screen_rect = r.collideobjects(objects, key=lambda o: o.draw_rect) # -> None print(screen_rect) .. versionadded:: 2.1.3 .. ## Rect.collideobjects ## .. method:: collideobjectsall | :sl:`test if all objects in a list intersect` | :sg:`collideobjectsall(rect_list) -> objects` | :sg:`collideobjectsall(obj_list, key=func) -> objects` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave collideobjectsall feedback with authors `_ Returns a list of all the objects that contain rectangles that collide with the Rect. If no intersecting objects are found, an empty list is returned. If key is given, then it should be a method taking an object from the list as input and returning a rect like object e.g. ``lambda obj: obj.rectangle``. If an object has multiple attributes of type Rect then key could return one of them. .. code-block:: python r = Rect(1, 1, 10, 10) rects = [ Rect(1, 1, 10, 10), Rect(5, 5, 10, 10), Rect(15, 15, 1, 1), Rect(2, 2, 1, 1), ] result = r.collideobjectsall( rects ) # -> [, , ] print(result) class ObjectWithSomRectAttribute: def __init__(self, name, collision_box, draw_rect): self.name = name self.draw_rect = draw_rect self.collision_box = collision_box def __repr__(self): return f'<{self.__class__.__name__}("{self.name}", {list(self.collision_box)}, {list(self.draw_rect)})>' objects = [ ObjectWithSomRectAttribute("A", Rect(1, 1, 10, 10), Rect(300, 300, 50, 50)), ObjectWithSomRectAttribute("B", Rect(5, 5, 10, 10), Rect(200, 500, 50, 50)), ObjectWithSomRectAttribute("C", Rect(15, 15, 1, 1), Rect(150, 150, 50, 50)), ] # collisions = r.collideobjectsall(objects) # this does not work because ObjectWithSomRectAttribute is not a Rect like object collisions = r.collideobjectsall( objects, key=lambda o: o.collision_box ) # -> [, ] print(collisions) screen_rects = r.collideobjectsall(objects, key=lambda o: o.draw_rect) # -> [] print(screen_rects) .. versionadded:: 2.1.3 .. ## Rect.collideobjectsall ## .. method:: collidedict | :sl:`test if one rectangle in a dictionary intersects` | :sg:`collidedict(dict) -> (key, value)` | :sg:`collidedict(dict) -> None` | :sg:`collidedict(dict, use_values=0) -> (key, value)` | :sg:`collidedict(dict, use_values=0) -> None` Returns the first key and value pair that intersects with the calling Rect object. If no collisions are found, ``None`` is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used. .. note :: Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedict({tuple(key_rect) : value})`` .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidedict ## .. method:: collidedictall | :sl:`test if all rectangles in a dictionary intersect` | :sg:`collidedictall(dict) -> [(key, value), ...]` | :sg:`collidedictall(dict, use_values=0) -> [(key, value), ...]` Returns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If ``use_values`` is 0 (default) then the dict's keys will be used in the collision detection, otherwise the dict's values will be used. .. note :: Rect objects cannot be used as keys in a dictionary (they are not hashable), so they must be converted to a tuple. e.g. ``rect.collidedictall({tuple(key_rect) : value})`` .. versionchanged:: 2.5.0 Added support for keyword arguments. .. ## Rect.collidedictall ## .. ## pygame.Rect ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/scrap.rst.txt0000644000175100001770000001746414676242340022377 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.scrap` =================== .. module:: pygame.scrap :synopsis: pygame module for clipboard support. | :sl:`pygame module for clipboard support.` **EXPERIMENTAL!**: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release. The scrap module is for transferring data to/from the clipboard. This allows for cutting and pasting data between pygame and other applications. Some basic data (MIME) types are defined and registered: :: pygame string constant value description -------------------------------------------------- SCRAP_TEXT "text/plain" plain text SCRAP_BMP "image/bmp" BMP encoded image data SCRAP_PBM "image/pbm" PBM encoded image data SCRAP_PPM "image/ppm" PPM encoded image data ``pygame.SCRAP_PPM``, ``pygame.SCRAP_PBM`` and ``pygame.SCRAP_BMP`` are suitable for surface buffers to be shared with other applications. ``pygame.SCRAP_TEXT`` is an alias for the plain text clipboard type. Depending on the platform, additional types are automatically registered when data is placed into the clipboard to guarantee a consistent sharing behaviour with other applications. The following listed types can be used as strings to be passed to the respective :mod:`pygame.scrap` module functions. For **Windows** platforms, these additional types are supported automatically and resolve to their internal definitions: :: "text/plain;charset=utf-8" UTF-8 encoded text "audio/wav" WAV encoded audio "image/tiff" TIFF encoded image data For **X11** platforms, these additional types are supported automatically and resolve to their internal definitions: :: "text/plain;charset=utf-8" UTF-8 encoded text "UTF8_STRING" UTF-8 encoded text "COMPOUND_TEXT" COMPOUND text User defined types can be used, but the data might not be accessible by other applications unless they know what data type to look for. Example: Data placed into the clipboard by ``pygame.scrap.put("my_data_type", byte_data)`` can only be accessed by applications which query the clipboard for the ``"my_data_type"`` data type. For an example of how the scrap module works refer to the examples page (:func:`pygame.examples.scrap_clipboard.main`) or the code directly in GitHub (`pygame/examples/scrap_clipboard.py `_). .. versionadded:: 1.8 .. note:: The scrap module is currently only supported for Windows, X11 and Mac OS X. On Mac OS X only text works at the moment - other types may be supported in future releases. .. function:: init | :sl:`Initializes the scrap module.` | :sg:`init() -> None` Initialize the scrap module. :raises pygame.error: if unable to initialize scrap module .. note:: The scrap module requires :func:`pygame.display.set_mode()` be called before being initialized. .. ## pygame.scrap.init ## .. function:: get_init | :sl:`Returns True if the scrap module is currently initialized.` | :sg:`get_init() -> bool` Gets the scrap module's initialization state. :returns: ``True`` if the :mod:`pygame.scrap` module is currently initialized, ``False`` otherwise :rtype: bool .. versionadded:: 1.9.5 .. ## pygame.scrap.get_init ## .. function:: get | :sl:`Gets the data for the specified type from the clipboard.` | :sg:`get(type) -> bytes | None` Retrieves the data for the specified type from the clipboard. The data is returned as a byte string and might need further processing (such as decoding to Unicode). :param string type: data type to retrieve from the clipboard :returns: data (bytes object) for the given type identifier or ``None`` if no data for the given type is available :rtype: bytes | None :: text = pygame.scrap.get(pygame.SCRAP_TEXT) if text: print("There is text in the clipboard.") else: print("There does not seem to be text in the clipboard.") .. ## pygame.scrap.get ## .. function:: get_types | :sl:`Gets a list of the available clipboard types.` | :sg:`get_types() -> list` Gets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the :func:`pygame.scrap.get()` method to get the clipboard content of the specific type. :returns: list of strings of the available clipboard data types, if there is no data in the clipboard an empty list is returned :rtype: list :: for t in pygame.scrap.get_types(): if "text" in t: # There is some content with the word "text" in its type string. print(pygame.scrap.get(t)) .. ## pygame.scrap.get_types ## .. function:: put | :sl:`Places data into the clipboard.` | :sg:`put(type, data) -> None` Places data for a given clipboard type into the clipboard. The data must be a string buffer. The type is a string identifying the type of data to be placed into the clipboard. This can be one of the predefined ``pygame.SCRAP_PBM``, ``pygame.SCRAP_PPM``, ``pygame.SCRAP_BMP`` or ``pygame.SCRAP_TEXT`` values or a user defined string identifier. :param string type: type identifier of the data to be placed into the clipboard :param data: data to be place into the clipboard, a bytes object :type data: bytes :raises pygame.error: if unable to put the data into the clipboard :: with open("example.bmp", "rb") as fp: pygame.scrap.put(pygame.SCRAP_BMP, fp.read()) # The image data is now on the clipboard for other applications to access # it. pygame.scrap.put(pygame.SCRAP_TEXT, b"A text to copy") pygame.scrap.put("Plain text", b"Data for user defined type 'Plain text'") .. ## pygame.scrap.put ## .. function:: contains | :sl:`Checks whether data for a given type is available in the clipboard.` | :sg:`contains(type) -> bool` Checks whether data for the given type is currently available in the clipboard. :param string type: data type to check availability of :returns: ``True`` if data for the passed type is available in the clipboard, ``False`` otherwise :rtype: bool :: if pygame.scrap.contains(pygame.SCRAP_TEXT): print("There is text in the clipboard.") if pygame.scrap.contains("own_data_type"): print("There is stuff in the clipboard.") .. ## pygame.scrap.contains ## .. function:: lost | :sl:`Indicates if the clipboard ownership has been lost by the pygame application.` | :sg:`lost() -> bool` Indicates if the clipboard ownership has been lost by the pygame application. :returns: ``True``, if the clipboard ownership has been lost by the pygame application, ``False`` if the pygame application still owns the clipboard :rtype: bool :: if pygame.scrap.lost(): print("The clipboard is in use by another application.") .. ## pygame.scrap.lost ## .. function:: set_mode | :sl:`Sets the clipboard access mode.` | :sg:`set_mode(mode) -> None` Sets the access mode for the clipboard. This is only of interest for X11 environments where clipboard modes ``pygame.SCRAP_SELECTION`` (for mouse selections) and ``pygame.SCRAP_CLIPBOARD`` (for the clipboard) are available. Setting the mode to ``pygame.SCRAP_SELECTION`` in other environments will not change the mode from ``pygame.SCRAP_CLIPBOARD``. :param mode: access mode, supported values are ``pygame.SCRAP_CLIPBOARD`` and ``pygame.SCRAP_SELECTION`` (``pygame.SCRAP_SELECTION`` only has an effect when used on X11 platforms) :raises ValueError: if the ``mode`` parameter is not ``pygame.SCRAP_CLIPBOARD`` or ``pygame.SCRAP_SELECTION`` .. ## pygame.scrap.set_mode ## .. ## pygame.scrap ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/sdl2_controller.rst.txt0000644000175100001770000002227114676242340024366 0ustar00runnerdocker.. include:: common.txt :mod:`pygame._sdl2.controller` ============================== .. module:: pygame._sdl2.controller :synopsis: pygame module to work with controllers | :sl:`Pygame module to work with controllers.` .. note:: Use import pygame._sdl2.controller before using this module. This module offers control over common controller types like the dualshock 4 or the xbox 360 controllers: They have two analog sticks, two triggers, two shoulder buttons, a dpad, 4 buttons on the side, 2 (or 3) buttons in the middle. Pygame uses xbox controllers naming conventions (like a, b, x, y for buttons) but they always refer to the same buttons. For example ``CONTROLLER_BUTTON_X`` is always the leftmost button of the 4 buttons on the right. Controllers can generate the following events:: CONTROLLERAXISMOTION, CONTROLLERBUTTONDOWN, CONTROLLERBUTTONUP, CONTROLLERDEVICEREMAPPED, CONTROLLERDEVICEADDED, CONTROLLERDEVICEREMOVED Additionally if pygame is built with SDL 2.0.14 or higher the following events can also be generated (to get the version of sdl pygame is built with use :meth:`pygame.version.SDL`):: CONTROLLERTOUCHPADDOWN, CONTROLLERTOUCHPADMOTION, CONTROLLERTOUCHPADUP These events can be enabled/disabled by :meth:`pygame._sdl2.controller.set_eventstate` Note that controllers can generate joystick events as well. This function only toggles events related to controllers. .. note:: See the :mod:`pygame.joystick` for a more versatile but more advanced api. .. versionadded:: 2 This module requires SDL2. .. function:: init | :sl:`initialize the controller module` | :sg:`init() -> None` Initialize the controller module. .. ## pygame._sdl2.controller.init ## .. function:: quit | :sl:`Uninitialize the controller module.` | :sg:`quit() -> None` Uninitialize the controller module. .. ## pygame._sdl2.controller.quit ## .. function:: get_init | :sl:`Returns True if the controller module is initialized.` | :sg:`get_init() -> bool` Test if ``pygame._sdl2.controller.init()`` was called. .. ## pygame._sdl2.controller.get_init ## .. function:: set_eventstate | :sl:`Sets the current state of events related to controllers` | :sg:`set_eventstate(state) -> None` Enable or disable events connected to controllers. .. note:: Controllers can still generate joystick events, which will not be toggled by this function. .. versionchanged:: 2.0.2: Changed return type from int to None .. ## pygame._sdl2.controller.set_eventstate ## .. function:: get_eventstate | :sl:`Gets the current state of events related to controllers` | :sg:`get_eventstate() -> bool` Returns the current state of events related to controllers, True meaning events will be posted. .. versionadded:: 2.0.2 .. ## pygame._sdl2.controller.get_eventstate ## .. function:: get_count | :sl:`Get the number of joysticks connected` | :sg:`get_count() -> int` Get the number of joysticks connected. .. ## pygame._sdl2.controller.get_count ## .. function:: is_controller | :sl:`Check if the given joystick is supported by the game controller interface` | :sg:`is_controller(index) -> bool` Returns True if the index given can be used to create a controller object. .. ## pygame._sdl2.controller.is_controller ## .. function:: name_forindex | :sl:`Get the name of the controller` | :sg:`name_forindex(index) -> name or None` Returns the name of controller, or None if there's no name or the index is invalid. .. ## pygame._sdl2.controller.name_forindex ## .. class:: Controller | :sl:`Create a new Controller object.` | :sg:`Controller(index) -> Controller` Create a new Controller object. Index should be integer between 0 and ``pygame._sdl2.controller.get_count()``. Controllers also can be created from a ``pygame.joystick.Joystick`` using ``pygame._sdl2.controller.from_joystick``. Controllers are initialized on creation. .. method:: quit | :sl:`uninitialize the Controller` | :sg:`quit() -> None` Close a Controller object. After this the pygame event queue will no longer receive events from the device. It is safe to call this more than once. .. ## Controller.quit ## .. method:: get_init | :sl:`check if the Controller is initialized` | :sg:`get_init() -> bool` Returns True if the Controller object is currently initialised. .. ## Controller.get_init ## .. staticmethod:: from_joystick | :sl:`Create a Controller from a pygame.joystick.Joystick object` | :sg:`from_joystick(joystick) -> Controller` Create a Controller object from a ``pygame.joystick.Joystick`` object .. ## Controller.from_joystick ## .. method:: attached | :sl:`Check if the Controller has been opened and is currently connected.` | :sg:`attached() -> bool` Returns True if the Controller object is opened and connected. .. ## Controller.attached ## .. method:: as_joystick | :sl:`Returns a pygame.joystick.Joystick() object` | :sg:`as_joystick() -> Joystick object` Returns a pygame.joystick.Joystick() object created from this controller's index .. ## Controller.as_joystick ## .. method:: get_axis | :sl:`Get the current state of a joystick axis` | :sg:`get_axis(axis) -> int` Get the current state of a trigger or joystick axis. The axis argument must be one of the following constants:: CONTROLLER_AXIS_LEFTX, CONTROLLER_AXIS_LEFTY, CONTROLLER_AXIS_RIGHTX, CONTROLLER_AXIS_RIGHTY, CONTROLLER_AXIS_TRIGGERLEFT, CONTROLLER_AXIS_TRIGGERRIGHT Joysticks can return a value between -32768 and 32767. Triggers however can only return a value between 0 and 32768. .. ## Controller.get_axis ## .. method:: get_button | :sl:`Get the current state of a button` | :sg:`get_button(button) -> bool` Get the current state of a button, True meaning it is pressed down. The button argument must be one of the following constants:: CONTROLLER_BUTTON_A, CONTROLLER_BUTTON_B, CONTROLLER_BUTTON_X, CONTROLLER_BUTTON_Y CONTROLLER_BUTTON_DPAD_UP, CONTROLLER_BUTTON_DPAD_DOWN, CONTROLLER_BUTTON_DPAD_LEFT, CONTROLLER_BUTTON_DPAD_RIGHT, CONTROLLER_BUTTON_LEFTSHOULDER, CONTROLLER_BUTTON_RIGHTSHOULDER, CONTROLLER_BUTTON_LEFTSTICK, CONTROLLER_BUTTON_RIGHTSTICK, CONTROLLER_BUTTON_BACK, CONTROLLER_BUTTON_GUIDE, CONTROLLER_BUTTON_START .. ## Controller.get_button ## .. method:: get_mapping | :sl:`Get the mapping assigned to the controller` | :sg:`get_mapping() -> mapping` Returns a dict containing the mapping of the Controller. For more information see :meth:`Controller.set_mapping()` .. versionchanged:: 2.0.2: Return type changed from ``str`` to ``dict`` .. ## Controller.get_mapping ## .. method:: set_mapping | :sl:`Assign a mapping to the controller` | :sg:`set_mapping(mapping) -> int` Rebind buttons, axes, triggers and dpads. The mapping should be a dict containing all buttons, hats and axes. The easiest way to get this is to use the dict returned by :meth:`Controller.get_mapping`. To edit this mapping assign a value to the original button. The value of the dictionary must be a button, hat or axis represented in the following way: * For a button use: bX where X is the index of the button. * For a hat use: hX.Y where X is the index and the Y is the direction (up: 1, right: 2, down: 3, left: 4). * For an axis use: aX where x is the index of the axis. An example of mapping:: mapping = controller.get_mapping() # Get current mapping mapping["a"] = "b3" # Remap button a to y mapping["y"] = "b0" # Remap button y to a controller.set_mapping(mapping) # Set the mapping The function will return 1 if a new mapping is added or 0 if an existing one is updated. .. versionchanged:: 2.0.2: Renamed from ``add_mapping`` to ``set_mapping`` .. versionchanged:: 2.0.2: Argument type changed from ``str`` to ``dict`` .. ## Controller.set_mapping ## .. method:: rumble | :sl:`Start a rumbling effect` | :sg:`rumble(low_frequency, high_frequency, duration) -> bool` Start a rumble effect on the controller, with the specified strength ranging from 0 to 1. Duration is length of the effect, in ms. Setting the duration to 0 will play the effect until another one overwrites it or :meth:`Controller.stop_rumble` is called. If an effect is already playing, then it will be overwritten. Returns True if the rumble was played successfully or False if the controller does not support it or :meth:`pygame.version.SDL` is below 2.0.9. .. versionadded:: 2.0.2 .. ## Controller.rumble ## .. method:: stop_rumble | :sl:`Stop any rumble effect playing` | :sg:`stop_rumble() -> None` Stops any rumble effect playing on the controller. See :meth:`Controller.rumble` for more information. .. versionadded:: 2.0.2 .. ## Controller.stop_rumble ## .. ## pygame._sdl2.controller ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/sdl2_video.rst.txt0000644000175100001770000002163514676242340023314 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sdl2_video` ======================== .. module:: pygame._sdl2.video :synopsis: Experimental pygame module for porting new SDL video systems .. warning:: This module isn't ready for prime time yet, it's still in development. These docs are primarily meant to help the pygame developers and super-early adopters who are in communication with the developers. This API will change. | :sl:`Experimental pygame module for porting new SDL video systems` .. class:: Window | :sl:`pygame object that represents a window` | :sg:`Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window` .. classmethod:: from_display_module | :sl:`Creates window using window created by pygame.display.set_mode().` | :sg:`from_display_module() -> Window` .. classmethod:: from_window | :sl:`Create Window from another window. Could be from another UI toolkit.` | :sg:`from_window(other) -> Window` .. attribute:: grab | :sl:`Gets or sets whether the mouse is confined to the window.` | :sg:`grab -> bool` .. attribute:: relative_mouse | :sl:`Gets or sets the window's relative mouse motion state.` | :sg:`relative_mouse -> bool` .. method:: set_windowed | :sl:`Enable windowed mode (exit fullscreen).` | :sg:`set_windowed() -> None` .. method:: set_fullscreen | :sl:`Enter fullscreen.` | :sg:`set_fullscreen(desktop=False) -> None` .. attribute:: title | :sl:`Gets or sets whether the window title.` | :sg:`title -> string` .. method:: destroy | :sl:`Destroys the window.` | :sg:`destroy() -> None` .. method:: hide | :sl:`Hide the window.` | :sg:`hide() -> None` .. method:: show | :sl:`Show the window.` | :sg:`show() -> None` .. method:: focus | :sl:`Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.` | :sg:`focus(input_only=False) -> None` .. method:: restore | :sl:`Restore the size and position of a minimized or maximized window.` | :sg:`restore() -> None` .. method:: maximize | :sl:`Maximize the window.` | :sg:`maximize() -> None` .. method:: minimize | :sl:`Minimize the window.` | :sg:`maximize() -> None` .. attribute:: resizable | :sl:`Gets and sets whether the window is resizable.` | :sg:`resizable -> bool` .. attribute:: borderless | :sl:`Add or remove the border from the window.` | :sg:`borderless -> bool` .. method:: set_icon | :sl:`Set the icon for the window.` | :sg:`set_icon(surface) -> None` .. attribute:: id | :sl:`Get the unique window ID. *Read-only*` | :sg:`id -> int` .. attribute:: size | :sl:`Gets and sets the window size.` | :sg:`size -> (int, int)` .. attribute:: position | :sl:`Gets and sets the window position.` | :sg:`position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED` .. attribute:: opacity | :sl:`Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).` | :sg:`opacity -> float` .. attribute:: display_index | :sl:`Get the index of the display that owns the window. *Read-only*` | :sg:`display_index -> int` .. method:: set_modal_for | :sl:`Set the window as a modal for a parent window. This function is only supported on X11.` | :sg:`set_modal_for(Window) -> None` .. class:: Texture | :sl:`pygame object that representing a Texture.` | :sg:`Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture` .. staticmethod:: from_surface | :sl:`Create a texture from an existing surface.` | :sg:`from_surface(renderer, surface) -> Texture` .. attribute:: renderer | :sl:`Gets the renderer associated with the Texture. *Read-only*` | :sg:`renderer -> Renderer` .. attribute:: width | :sl:`Gets the width of the Texture. *Read-only*` | :sg:`width -> int` .. attribute:: height | :sl:`Gets the height of the Texture. *Read-only*` | :sg:`height -> int` .. attribute:: alpha | :sl:`Gets and sets an additional alpha value multiplied into render copy operations.` | :sg:`alpha -> int` .. attribute:: blend_mode | :sl:`Gets and sets the blend mode for the Texture.` | :sg:`blend_mode -> int` .. attribute:: color | :sl:`Gets and sets an additional color value multiplied into render copy operations.` | :sg:`color -> color` .. method:: get_rect | :sl:`Get the rectangular area of the texture.` | :sg:`get_rect(**kwargs) -> Rect` .. method:: draw | :sl:`Copy a portion of the texture to the rendering target.` | :sg:`draw(srcrect=None, dstrect=None, angle=0, origin=None, flip_x=False, flip_y=False) -> None` .. method:: update | :sl:`Update the texture with a Surface. WARNING: Slow operation, use sparingly.` | :sg:`update(surface, area=None) -> None` .. class:: Image | :sl:`Easy way to use a portion of a Texture without worrying about srcrect all the time.` | :sg:`Image(textureOrImage, srcrect=None) -> Image` .. method:: get_rect | :sl:`Get the rectangular area of the Image.` | :sg:`get_rect() -> Rect` .. method:: draw | :sl:`Copy a portion of the Image to the rendering target.` | :sg:`draw(srcrect=None, dstrect=None) -> None` .. attribute:: angle | :sl:`Gets and sets the angle the Image draws itself with.` | :sg:`angle -> float` .. attribute:: origin | :sl:`Gets and sets the origin. Origin=None means the Image will be rotated around its center.` | :sg:`origin -> (float, float) or None.` .. attribute:: flip_x | :sl:`Gets and sets whether the Image is flipped on the x axis.` | :sg:`flip_x -> bool` .. attribute:: flip_y | :sl:`Gets and sets whether the Image is flipped on the y axis.` | :sg:`flip_y -> bool` .. attribute:: color | :sl:`Gets and sets the Image color modifier.` | :sg:`color -> Color` .. attribute:: alpha | :sl:`Gets and sets the Image alpha modifier.` | :sg:`alpha -> float` .. attribute:: blend_mode | :sl:`Gets and sets the blend mode for the Image.` | :sg:`blend_mode -> int` .. attribute:: texture | :sl:`Gets and sets the Texture the Image is based on.` | :sg:`texture -> Texture` .. attribute:: srcrect | :sl:`Gets and sets the Rect the Image is based on.` | :sg:`srcrect -> Rect` .. class:: Renderer | :sl:`Create a 2D rendering context for a window.` | :sg:`Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer` .. classmethod:: from_window | :sl:`Easy way to create a Renderer.` | :sg:`from_window(window) -> Renderer` .. attribute:: draw_blend_mode | :sl:`Gets and sets the blend mode used by the drawing functions.` | :sg:`draw_blend_mode -> int` .. attribute:: draw_color | :sl:`Gets and sets the color used by the drawing functions.` | :sg:`draw_color -> Color` .. method:: clear | :sl:`Clear the current rendering target with the drawing color.` | :sg:`clear() -> None` .. method:: present | :sl:`Updates the screen with any new rendering since previous call.` | :sg:`present() -> None` .. method:: get_viewport | :sl:`Returns the drawing area on the target.` | :sg:`get_viewport() -> Rect` .. method:: set_viewport | :sl:`Set the drawing area on the target. If area is None, the entire target will be used.` | :sg:`set_viewport(area) -> None` .. attribute:: logical_size | :sl:`Gets and sets the logical size.` | :sg:`logical_size -> (int width, int height)` .. attribute:: scale | :sl:`Gets and sets the scale.` | :sg:`scale -> (float x_scale, float y_scale)` .. attribute:: target | :sl:`Gets and sets the render target. None represents the default target (the renderer).` | :sg:`target -> Texture or None` .. method:: blit | :sl:`For compatibility purposes. Textures created by different Renderers cannot be shared!` | :sg:`blit(source, dest, area=None, special_flags=0)-> Rect` .. method:: draw_line | :sl:`Draws a line.` | :sg:`draw_line(p1, p2) -> None` .. method:: draw_point | :sl:`Draws a point.` | :sg:`draw_point(point) -> None` .. method:: draw_rect | :sl:`Draws a rectangle.` | :sg:`draw_rect(rect)-> None` .. method:: fill_rect | :sl:`Fills a rectangle.` | :sg:`fill_rect(rect)-> None` .. method:: to_surface | :sl:`Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.` | :sg:`to_surface(surface=None, area=None)-> Surface`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/sndarray.rst.txt0000644000175100001770000000627414676242340023107 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sndarray` ====================== .. module:: pygame.sndarray :synopsis: pygame module for accessing sound sample data | :sl:`pygame module for accessing sound sample data` Functions to convert between NumPy arrays and Sound objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, ``surfarray`` becomes a ``MissingModule`` object. Sound data is made of thousands of samples per second, and each sample is the amplitude of the wave at a particular moment in time. For example, in 22-kHz format, element number 5 of the array is the amplitude of the wave after 5/22000 seconds. The arrays are indexed by the ``X`` axis first, followed by the ``Y`` axis. Each sample is an 8-bit or 16-bit integer, depending on the data format. A stereo sound file has two values per sample, while a mono sound file only has one. .. function:: array | :sl:`copy Sound samples into an array` | :sg:`array(Sound) -> array` Creates a new array for the sound data and copies the samples. The array will always be in the format returned from ``pygame.mixer.get_init()``. .. ## pygame.sndarray.array ## .. function:: samples | :sl:`reference Sound samples into an array` | :sg:`samples(Sound) -> array` Creates a new array that directly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from ``pygame.mixer.get_init()``. .. ## pygame.sndarray.samples ## .. function:: make_sound | :sl:`convert an array into a Sound object` | :sg:`make_sound(array) -> Sound` Create a new playable Sound object from an array. The mixer module must be initialized and the array format must be similar to the mixer audio format. .. ## pygame.sndarray.make_sound ## .. function:: use_arraytype | :sl:`Sets the array system to be used for sound arrays` | :sg:`use_arraytype (arraytype) -> None` DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is ``'numpy'``. Other values will raise ValueError. Using this function will raise a ``DeprecationWarning``. .. ## pygame.sndarray.use_arraytype ## .. function:: get_arraytype | :sl:`Gets the currently active array type.` | :sg:`get_arraytype () -> str` DEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.sndarray.get_arraytype ## .. function:: get_arraytypes | :sl:`Gets the array system types currently supported.` | :sg:`get_arraytypes () -> tuple` DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.sndarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.sndarray.get_arraytypes ## .. ## pygame.sndarray ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/sprite.rst.txt0000644000175100001770000007356214676242340022576 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.sprite` ==================== .. module:: pygame.sprite :synopsis: pygame module with basic game object classes | :sl:`pygame module with basic game object classes` This module contains several simple classes to be used within games. There is the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games. The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain. The basic Group class can draw the Sprites it contains to a Surface. The ``Group.draw()`` method requires that each Sprite have a ``Surface.image`` attribute and a ``Surface.rect``. The ``Group.clear()`` method requires these same attributes, and can be used to erase all the Sprites with background. There are also more advanced Groups: ``pygame.sprite.RenderUpdates()`` and ``pygame.sprite.OrderedUpdates()``. Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a ``Surface.rect`` attribute assigned. The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game. Sprites and Groups manage their relationships with the ``add()`` and ``remove()`` methods. These methods can accept a single or multiple targets for membership. The default initializers for these classes also takes a single or list of targets for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group. While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you add a Sprite or Group class. Sprites are not thread safe. So lock them yourself if using threads. .. class:: Sprite | :sl:`Simple base class for visible game objects.` | :sg:`Sprite(*groups) -> Sprite` The base class for visible game objects. Derived classes will want to override the ``Sprite.update()`` and assign a ``Sprite.image`` and ``Sprite.rect`` attributes. The initializer can accept any number of Group instances to be added to. When subclassing the Sprite, be sure to call the base initializer before adding the Sprite to Groups. For example: .. code-block:: python class Block(pygame.sprite.Sprite): # Constructor. Pass in the color of the block, # and its x and y position def __init__(self, color, width, height): # Call the parent class (Sprite) constructor pygame.sprite.Sprite.__init__(self) # Create an image of the block, and fill it with a color. # This could also be an image loaded from the disk. self.image = pygame.Surface([width, height]) self.image.fill(color) # Fetch the rectangle object that has the dimensions of the image # Update the position of this object by setting the values of rect.x and rect.y self.rect = self.image.get_rect() .. method:: update | :sl:`method to control sprite behavior` | :sg:`update(*args, **kwargs) -> None` The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by ``Group.update()`` with whatever arguments you give it. It is not necessary to use this method if not using the convenience method by the same name in the Group class. .. ## Sprite.update ## .. method:: add | :sl:`add the sprite to groups` | :sg:`add(*groups) -> None` Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of. .. ## Sprite.add ## .. method:: remove | :sl:`remove the sprite from groups` | :sg:`remove(*groups) -> None` Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of. .. ## Sprite.remove ## .. method:: kill | :sl:`remove the Sprite from all Groups` | :sg:`kill() -> None` The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups. .. ## Sprite.kill ## .. method:: alive | :sl:`does the sprite belong to any groups` | :sg:`alive() -> bool` Returns True when the Sprite belongs to one or more Groups. .. ## Sprite.alive ## .. method:: groups | :sl:`list of Groups that contain this Sprite` | :sg:`groups() -> group_list` Return a list of all the Groups that contain this Sprite. .. ## Sprite.groups ## .. ## pygame.sprite.Sprite ## .. class:: WeakSprite | :sl:`A subclass of Sprite that references its Groups weakly. This means that any group this belongs to that is not referenced anywhere else is garbage collected automatically.` | :sg:`WeakSprite(*groups) -> WeakSprite` .. class:: DirtySprite | :sl:`A subclass of Sprite with more attributes and features.` | :sg:`DirtySprite(*groups) -> DirtySprite` Extra DirtySprite attributes with their default values: dirty = 1 :: if set to 1, it is repainted and then set to 0 again if set to 2 then it is always dirty ( repainted each frame, flag is not reset) 0 means that it is not dirty and therefore not repainted again blendmode = 0 :: its the special_flags argument of blit, blendmodes source_rect = None :: source rect to use, remember that it is relative to topleft (0,0) of self.image visible = 1 :: normally 1, if set to 0 it will not be repainted (you must set it dirty too to be erased from screen) layer = 0 :: (READONLY value, it is read when adding it to the LayeredDirty, for details see doc of LayeredDirty) .. ## ## .. ## pygame.sprite.DirtySprite ## .. class:: Group | :sl:`A container class to hold and manage multiple Sprite objects.` | :sg:`Group(*sprites) -> Group` A simple container for Sprite objects. This class can be inherited to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations: :: in test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites The Sprites in the Group are ordered only on python 3.6 and higher. Below python 3.6 drawing and iterating over the Sprites is in no particular order. .. method:: sprites | :sl:`list of the Sprites this Group contains` | :sg:`sprites() -> sprite_list` Return a list of all the Sprites this group contains. You can also get an iterator from the group, but you cannot iterate over a Group while modifying it. .. ## Group.sprites ## .. method:: copy | :sl:`duplicate the Group` | :sg:`copy() -> Group` Creates a new Group with all the same Sprites as the original. If you have subclassed Group, the new object will have the same (sub-)class as the original. This only works if the derived class's constructor takes the same arguments as the Group class's. .. ## Group.copy ## .. method:: add | :sl:`add Sprites to this Group` | :sg:`add(*sprites) -> None` Add any number of Sprites to this Group. This will only add Sprites that are not already members of the Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.add ## .. method:: remove | :sl:`remove Sprites from the Group` | :sg:`remove(*sprites) -> None` Remove any number of Sprites from the Group. This will only remove Sprites that are already members of the Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.remove ## .. method:: has | :sl:`test if a Group contains Sprites` | :sg:`has(*sprites) -> bool` Return True if the Group contains all of the given sprites. This is similar to using the "in" operator on the Group ("if sprite in group: ..."), which tests if a single Sprite belongs to a Group. Each sprite argument can also be a iterator containing Sprites. .. ## Group.has ## .. method:: update | :sl:`call the update method on contained Sprites` | :sg:`update(*args, **kwargs) -> None` Calls the ``update()`` method on all Sprites in the Group. The base Sprite class has an update method that takes any number of arguments and does nothing. The arguments passed to ``Group.update()`` will be passed to each Sprite. There is no way to get the return value from the ``Sprite.update()`` methods. .. ## Group.update ## .. method:: draw | :sl:`blit the Sprite images` | :sg:`draw(Surface, bgsurf=None, special_flags=0) -> List[Rect]` Draws the contained Sprites to the Surface argument. This uses the ``Sprite.image`` attribute for the source surface, and ``Sprite.rect`` for the position. ``special_flags`` is passed to ``Surface.blit()``. ``bgsurf`` is unused in this method but ``LayeredDirty.draw()`` uses it. The Group does not keep sprites in any order, so the draw order is arbitrary. .. ## Group.draw ## .. method:: clear | :sl:`draw a background over the Sprites` | :sg:`clear(Surface_dest, background) -> None` Erases the Sprites used in the last ``Group.draw()`` call. The destination Surface is cleared by filling the drawn Sprite positions with the background. The background is usually a Surface image the same dimensions as the destination Surface. However, it can also be a callback function that takes two arguments; the destination Surface and an area to clear. The background callback function will be called several times each clear. Here is an example callback that will clear the Sprites with solid red: :: def clear_callback(surf, rect): color = 255, 0, 0 surf.fill(color, rect) .. ## Group.clear ## .. method:: empty | :sl:`remove all Sprites` | :sg:`empty() -> None` Removes all Sprites from this Group. .. ## Group.empty ## .. ## pygame.sprite.Group ## .. class:: WeakDirtySprite | :sl:`A subclass of WeakSprite and DirtySprite that combines the benefits of both classes.` | :sg:`WeakDirtySprite(*groups) -> WeakDirtySprite` .. class:: RenderPlain | :sl:`Same as pygame.sprite.Group` This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality. .. ## pygame.sprite.RenderClear ## .. class:: RenderClear | :sl:`Same as pygame.sprite.Group` This class is an alias to ``pygame.sprite.Group()``. It has no additional functionality. .. ## pygame.sprite.RenderClear ## .. class:: RenderUpdates | :sl:`Group sub-class that tracks dirty updates.` | :sg:`RenderUpdates(*sprites) -> RenderUpdates` This class is derived from ``pygame.sprite.Group()``. It has an extended ``draw()`` method that tracks the changed areas of the screen. .. method:: draw | :sl:`blit the Sprite images and track changed areas` | :sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list` Draws all the Sprites to the surface, the same as ``Group.draw()``. This method also returns a list of Rectangular areas on the screen that have been changed. The returned changes include areas of the screen that have been affected by previous ``Group.clear()`` calls. ``special_flags`` is passed to ``Surface.blit()``. The returned Rect list should be passed to ``pygame.display.update()``. This will help performance on software driven display modes. This type of updating is usually only helpful on destinations with non-animating backgrounds. .. ## RenderUpdates.draw ## .. ## pygame.sprite.RenderUpdates ## .. function:: OrderedUpdates | :sl:`RenderUpdates sub-class that draws Sprites in order of addition.` | :sg:`OrderedUpdates(*sprites) -> OrderedUpdates` This class derives from ``pygame.sprite.RenderUpdates()``. It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups. .. ## pygame.sprite.OrderedUpdates ## .. class:: LayeredUpdates | :sl:`LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates.` | :sg:`LayeredUpdates(*sprites, **kwargs) -> LayeredUpdates` This group is fully compatible with :class:`pygame.sprite.Sprite`. You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0. If the sprite you add has an attribute _layer then that layer will be used. If the \**kwarg contains 'layer' then the sprites passed will be added to that layer (overriding the ``sprite.layer`` attribute). If neither sprite has attribute layer nor \**kwarg then the default layer is used to add the sprites. .. versionadded:: 1.8 .. method:: add | :sl:`add a sprite or sequence of sprites to a group` | :sg:`add(*sprites, **kwargs) -> None` If the ``sprite(s)`` have an attribute layer then that is used for the layer. If \**kwargs contains 'layer' then the ``sprite(s)`` will be added to that argument (overriding the sprite layer attribute). If neither is passed then the ``sprite(s)`` will be added to the default layer. .. ## LayeredUpdates.add ## .. method:: sprites | :sl:`returns a ordered list of sprites (first back, last top).` | :sg:`sprites() -> sprites` .. ## LayeredUpdates.sprites ## .. method:: draw | :sl:`draw all sprites in the right order onto the passed surface.` | :sg:`draw(surface, bgsurf=None, special_flags=0) -> Rect_list` .. ## LayeredUpdates.draw ## .. method:: get_sprites_at | :sl:`returns a list with all sprites at that position.` | :sg:`get_sprites_at(pos) -> colliding_sprites` Bottom sprites first, top last. .. ## LayeredUpdates.get_sprites_at ## .. method:: get_sprite | :sl:`returns the sprite at the index idx from the groups sprites` | :sg:`get_sprite(idx) -> sprite` Raises IndexOutOfBounds if the idx is not within range. .. ## LayeredUpdates.get_sprite ## .. method:: remove_sprites_of_layer | :sl:`removes all sprites from a layer and returns them as a list.` | :sg:`remove_sprites_of_layer(layer_nr) -> sprites` .. ## LayeredUpdates.remove_sprites_of_layer ## .. method:: layers | :sl:`returns a list of layers defined (unique), sorted from bottom up.` | :sg:`layers() -> layers` .. ## LayeredUpdates.layers ## .. method:: change_layer | :sl:`changes the layer of the sprite` | :sg:`change_layer(sprite, new_layer) -> None` sprite must have been added to the renderer. It is not checked. .. ## LayeredUpdates.change_layer ## .. method:: get_layer_of_sprite | :sl:`returns the layer that sprite is currently in.` | :sg:`get_layer_of_sprite(sprite) -> layer` If the sprite is not found then it will return the default layer. .. ## LayeredUpdates.get_layer_of_sprite ## .. method:: get_top_layer | :sl:`returns the top layer` | :sg:`get_top_layer() -> layer` .. ## LayeredUpdates.get_top_layer ## .. method:: get_bottom_layer | :sl:`returns the bottom layer` | :sg:`get_bottom_layer() -> layer` .. ## LayeredUpdates.get_bottom_layer ## .. method:: move_to_front | :sl:`brings the sprite to front layer` | :sg:`move_to_front(sprite) -> None` Brings the sprite to front, changing sprite layer to topmost layer (added at the end of that layer). .. ## LayeredUpdates.move_to_front ## .. method:: move_to_back | :sl:`moves the sprite to the bottom layer` | :sg:`move_to_back(sprite) -> None` Moves the sprite to the bottom layer, moving it behind all other layers and adding one additional layer. .. ## LayeredUpdates.move_to_back ## .. method:: get_top_sprite | :sl:`returns the topmost sprite` | :sg:`get_top_sprite() -> Sprite` .. ## LayeredUpdates.get_top_sprite ## .. method:: get_sprites_from_layer | :sl:`returns all sprites from a layer, ordered by how they where added` | :sg:`get_sprites_from_layer(layer) -> sprites` Returns all sprites from a layer, ordered by how they where added. It uses linear search and the sprites are not removed from layer. .. ## LayeredUpdates.get_sprites_from_layer ## .. method:: switch_layer | :sl:`switches the sprites from layer1 to layer2` | :sg:`switch_layer(layer1_nr, layer2_nr) -> None` The layers number must exist, it is not checked. .. ## LayeredUpdates.switch_layer ## .. ## pygame.sprite.LayeredUpdates ## .. class:: LayeredDirty | :sl:`LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates.` | :sg:`LayeredDirty(*sprites, **kwargs) -> LayeredDirty` This group requires :class:`pygame.sprite.DirtySprite` or any sprite that has the following attributes: :: image, rect, dirty, visible, blendmode (see doc of DirtySprite). It uses the dirty flag technique and is therefore faster than the :class:`pygame.sprite.RenderUpdates` if you have many static sprites. It also switches automatically between dirty rect update and full screen drawing, so you do not have to worry what would be faster. Same as for the :class:`pygame.sprite.Group`. You can specify some additional attributes through kwargs: :: _use_update: True/False default is False _default_layer: default layer where sprites without a layer are added. _time_threshold: threshold time for switching between dirty rect mode and fullscreen mode, defaults to 1000./80 == 1000./fps .. versionadded:: 1.8 .. method:: draw | :sl:`draw all sprites in the right order onto the passed surface.` | :sg:`draw(surface, bgsurf=None, special_flags=None) -> Rect_list` You can pass the background too. If a background is already set, then the bgsurf argument has no effect. If present, the ``special_flags`` argument is always passed to ``Surface.blit()``, overriding ``DirtySprite.blendmode``. If ``special_flags`` is not present, ``DirtySprite.blendmode`` is passed to the ``Surface.blit()`` instead. .. ## LayeredDirty.draw ## .. method:: clear | :sl:`used to set background` | :sg:`clear(surface, bgd) -> None` .. ## LayeredDirty.clear ## .. method:: repaint_rect | :sl:`repaints the given area` | :sg:`repaint_rect(screen_rect) -> None` screen_rect is in screen coordinates. .. ## LayeredDirty.repaint_rect ## .. method:: set_clip | :sl:`clip the area where to draw. Just pass None (default) to reset the clip` | :sg:`set_clip(screen_rect=None) -> None` .. ## LayeredDirty.set_clip ## .. method:: get_clip | :sl:`clip the area where to draw. Just pass None (default) to reset the clip` | :sg:`get_clip() -> Rect` .. ## LayeredDirty.get_clip ## .. method:: change_layer | :sl:`changes the layer of the sprite` | :sg:`change_layer(sprite, new_layer) -> None` sprite must have been added to the renderer. It is not checked. .. ## LayeredDirty.change_layer ## .. method:: set_timing_treshold | :sl:`sets the threshold in milliseconds` | :sg:`set_timing_treshold(time_ms) -> None` DEPRECATED: Use set_timing_threshold() instead. .. deprecated:: 2.1.1 .. ## LayeredDirty.set_timing_treshold ## .. method:: set_timing_threshold | :sl:`sets the threshold in milliseconds` | :sg:`set_timing_threshold(time_ms) -> None` Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. .. versionadded:: 2.1.1 :raises TypeError: if ``time_ms`` is not int or float .. ## LayeredDirty.set_timing_threshold ## .. ## pygame.sprite.LayeredDirty ## .. function:: GroupSingle | :sl:`Group container that holds a single sprite.` | :sg:`GroupSingle(sprite=None) -> GroupSingle` The GroupSingle container only holds a single Sprite. When a new Sprite is added, the old one is removed. There is a special property, ``GroupSingle.sprite``, that accesses the Sprite that this Group contains. It can be None when the Group is empty. The property can also be assigned to add a Sprite into the GroupSingle container. .. ## pygame.sprite.GroupSingle ## .. function:: spritecollide | :sl:`Find sprites in a group that intersect another sprite.` | :sg:`spritecollide(sprite, group, dokill, collided = None) -> Sprite_list` Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the ``Sprite.rect`` attribute of each Sprite. The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group. The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. collided callables: :: collide_rect, collide_rect_ratio, collide_circle, collide_circle_ratio, collide_mask Example: .. code-block:: python # See if the Sprite block has collided with anything in the Group block_list # The True flag will remove the sprite in block_list blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True) # Check the list of colliding sprites, and add one to the score for each one for block in blocks_hit_list: score +=1 .. ## pygame.sprite.spritecollide ## .. function:: collide_rect | :sl:`Collision detection between two sprites, using rects.` | :sg:`collide_rect(left, right) -> bool` Tests for collision between two sprites. Uses the pygame rect colliderect function to calculate the collision. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" attributes. .. versionadded:: 1.8 .. ## pygame.sprite.collide_rect ## .. function:: collide_rect_ratio | :sl:`Collision detection between two sprites, using rects scaled to a ratio.` | :sg:`collide_rect_ratio(ratio) -> collided_callable` A callable class that checks for collisions between two sprites, using a scaled version of the sprites rects. Is created with a ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions. A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_rect_ratio ## .. function:: collide_circle | :sl:`Collision detection between two sprites, using circles.` | :sg:`collide_circle(left, right) -> bool` Tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_circle ## .. function:: collide_circle_ratio | :sl:`Collision detection between two sprites, using circles scaled to a ratio.` | :sg:`collide_circle_ratio(ratio) -> collided_callable` A callable class that checks for collisions between two sprites, using a scaled version of the sprites radius. Is created with a floating point ratio, the instance is then intended to be passed as a collided callback function to the \*collide functions. A ratio is a floating point number - 1.0 is the same size, 2.0 is twice as big, and 0.5 is half the size. The created callable tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap, after scaling the circles radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the \*collide functions. Sprites must have a "rect" and an optional "radius" attribute. .. versionadded:: 1.8.1 .. ## pygame.sprite.collide_circle_ratio ## .. function:: collide_mask | :sl:`Collision detection between two sprites, using masks.` | :sg:`collide_mask(sprite1, sprite2) -> (int, int)` | :sg:`collide_mask(sprite1, sprite2) -> None` Tests for collision between two sprites, by testing if their bitmasks overlap (uses :func:`pygame.mask.Mask.overlap`). If the sprites have a ``mask`` attribute, it is used as the mask, otherwise a mask is created from the sprite's ``image`` (uses :func:`pygame.mask.from_surface`). Sprites must have a ``rect`` attribute; the ``mask`` attribute is optional. The first point of collision between the masks is returned. The collision point is offset from ``sprite1``'s mask's topleft corner (which is always (0, 0)). The collision point is a position within the mask and is not related to the actual screen position of ``sprite1``. This function is intended to be passed as a ``collided`` callback function to the group collide functions (see :meth:`spritecollide`, :meth:`groupcollide`, :meth:`spritecollideany`). .. note:: To increase performance, create and set a ``mask`` attribute for all sprites that will use this function to check for collisions. Otherwise, each time this function is called it will create new masks. .. note:: A new mask needs to be recreated each time a sprite's image is changed (e.g. if a new image is used or the existing image is rotated). :: # Example of mask creation for a sprite. sprite.mask = pygame.mask.from_surface(sprite.image) :returns: first point of collision between the masks or ``None`` if no collision :rtype: tuple(int, int) or NoneType .. versionadded:: 1.8.0 .. ## pygame.sprite.collide_mask ## .. function:: groupcollide | :sl:`Find all sprites that collide between two groups.` | :sg:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict` This will find collisions between all the Sprites in two groups. Collision is determined by comparing the ``Sprite.rect`` attribute of each Sprite or by using the collided function if it is not None. Every Sprite inside group1 is added to the return dictionary. The value for each item is the list of Sprites in group2 that intersect. If either dokill argument is True, the colliding Sprites will be removed from their respective Group. The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. .. ## pygame.sprite.groupcollide ## .. function:: spritecollideany | :sl:`Simple test if a sprite intersects anything in a group.` | :sg:`spritecollideany(sprite, group, collided = None) -> Sprite` Collision with the returned sprite. | :sg:`spritecollideany(sprite, group, collided = None) -> None` No collision If the sprite collides with any single sprite in the group, a single sprite from the group is returned. On no collision None is returned. If you don't need all the features of the ``pygame.sprite.spritecollide()`` function, this function will be a bit quicker. The collided argument is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. .. ## pygame.sprite.spritecollideany ## .. ## ## .. ## pygame.sprite ## ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.982112 pygame-2.6.1/docs/generated/_sources/ref/surface.rst.txt0000644000175100001770000010777314676242340022722 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.Surface` ===================== .. currentmodule:: pygame .. class:: Surface | :sl:`pygame object for representing images` | :sg:`Surface((width, height), flags=0, depth=0, masks=None) -> Surface` | :sg:`Surface((width, height), flags=0, Surface) -> Surface` A pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color. Call :meth:`pygame.Surface()` to create a new image object. The Surface will be cleared to all black. The only required arguments are the sizes. With no additional arguments, the Surface will be created in a format that best matches the display Surface. The pixel format can be controlled by passing the bit depth or an existing Surface. The flags argument is a bitmask of additional features for the surface. You can pass any combination of these flags: :: HWSURFACE (obsolete in pygame 2) creates the image in video memory SRCALPHA the pixel format will include a per-pixel alpha Both flags are only a request, and may not be possible for all displays and formats. Advance users can combine a set of bitmasks with a depth value. The masks are a set of 4 integers representing which bits in a pixel will represent each color. Normal Surfaces should not require the masks argument. Surfaces can have many extra attributes like alpha planes, colorkeys, source rectangle clipping. These functions mainly effect how the Surface is blitted to other Surfaces. The blit routines will attempt to use hardware acceleration when possible, otherwise they will use highly optimized software blitting methods. There are three types of transparency supported in pygame: colorkeys, surface alphas, and pixel alphas. Surface alphas can be mixed with colorkeys, but an image with per pixel alphas cannot use the other modes. Colorkey transparency makes a single color value transparent. Any pixels matching the colorkey will not be drawn. The surface alpha value is a single value that changes the transparency for the entire image. A surface alpha of 255 is opaque, and a value of 0 is completely transparent. Per pixel alphas are different because they store a transparency value for every pixel. This allows for the most precise transparency effects, but it also the slowest. Per pixel alphas cannot be mixed with surface alpha and colorkeys. There is support for pixel access for the Surfaces. Pixel access on hardware surfaces is slow and not recommended. Pixels can be accessed using the :meth:`get_at()` and :meth:`set_at()` functions. These methods are fine for simple access, but will be considerably slow when doing of pixel work with them. If you plan on doing a lot of pixel level work, it is recommended to use a :class:`pygame.PixelArray`, which gives an array like view of the surface. For involved mathematical manipulations try the :mod:`pygame.surfarray` module (It's quite quick, but requires NumPy.) Any functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can :meth:`lock()` and :meth:`unlock()` the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs. Remember to leave the Surface locked only while necessary. Surface pixels are stored internally as a single number that has all the colors encoded into it. Use the :meth:`map_rgb()` and :meth:`unmap_rgb()` to convert between individual red, green, and blue values into a packed integer for that Surface. Surfaces can also reference sections of other Surfaces. These are created with the :meth:`subsurface()` method. Any change to either Surface will effect the other. Each Surface contains a clipping area. By default the clip area covers the entire Surface. If it is changed, all drawing operations will only effect the smaller area. .. method:: blit | :sl:`draw one image onto another` | :sg:`blit(source, dest, area=None, special_flags=0) -> Rect` Draws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit. An optional area rectangle can be passed as well. This represents a smaller portion of the source Surface to draw. .. versionadded:: 1.8 Optional ``special_flags``: ``BLEND_ADD``, ``BLEND_SUB``, ``BLEND_MULT``, ``BLEND_MIN``, ``BLEND_MAX``. .. versionadded:: 1.8.1 Optional ``special_flags``: ``BLEND_RGBA_ADD``, ``BLEND_RGBA_SUB``, ``BLEND_RGBA_MULT``, ``BLEND_RGBA_MIN``, ``BLEND_RGBA_MAX`` ``BLEND_RGB_ADD``, ``BLEND_RGB_SUB``, ``BLEND_RGB_MULT``, ``BLEND_RGB_MIN``, ``BLEND_RGB_MAX``. .. versionadded:: 1.9.2 Optional ``special_flags``: ``BLEND_PREMULTIPLIED`` .. versionadded:: 2.0.0 Optional ``special_flags``: ``BLEND_ALPHA_SDL2`` - Uses the SDL2 blitter for alpha blending, this gives different results than the default blitter, which is modelled after SDL1, due to different approximations used for the alpha blending formula. The SDL2 blitter also supports RLE on alpha blended surfaces which the pygame one does not. The return rectangle is the area of the affected pixels, excluding any pixels outside the destination Surface, or outside the clipping area. Pixel alphas will be ignored when blitting to an 8 bit Surface. For a surface with colorkey or blanket alpha, a blit to self may give slightly different colors than a non self-blit. .. ## Surface.blit ## .. method:: blits | :sl:`draw many images onto another` | :sg:`blits(blit_sequence=((source, dest), ...), doreturn=1) -> [Rect, ...] or None` | :sg:`blits(((source, dest, area), ...)) -> [Rect, ...]` | :sg:`blits(((source, dest, area, special_flags), ...)) -> [Rect, ...]` Draws many surfaces onto this Surface. It takes a sequence as input, with each of the elements corresponding to the ones of :meth:`blit()`. It needs at minimum a sequence of (source, dest). :param blit_sequence: a sequence of surfaces and arguments to blit them, they correspond to the :meth:`blit()` arguments :param doreturn: if ``True``, return a list of rects of the areas changed, otherwise return ``None`` :returns: a list of rects of the areas changed if ``doreturn`` is ``True``, otherwise ``None`` :rtype: list or None New in pygame 1.9.4. .. ## Surface.blits ## .. method:: convert | :sl:`change the pixel format of an image` | :sg:`convert(Surface=None) -> Surface` | :sg:`convert(depth, flags=0) -> Surface` | :sg:`convert(masks, flags=0) -> Surface` Creates a new copy of the Surface with the pixel format changed. The new pixel format can be determined from another existing Surface. Otherwise depth, flags, and masks arguments can be used, similar to the :meth:`pygame.Surface()` call. If no arguments are passed the new Surface will have the same pixel format as the display Surface. This is always the fastest format for blitting. It is a good idea to convert all Surfaces before they are blitted many times. The converted Surface will have no pixel alphas. They will be stripped if the original had them. See :meth:`convert_alpha()` for preserving or creating per-pixel alphas. The new copy will have the same class as the copied surface. This lets as Surface subclass inherit this method without the need to override, unless subclass specific instance attributes also need copying. .. ## Surface.convert ## .. method:: convert_alpha | :sl:`change the pixel format of an image including per pixel alphas` | :sg:`convert_alpha(Surface) -> Surface` | :sg:`convert_alpha() -> Surface` Creates a new copy of the surface with the desired pixel format. The new surface will be in a format suited for quick blitting to the given format with per pixel alpha. If no surface is given, the new surface will be optimized for blitting to the current display. Unlike the :meth:`convert()` method, the pixel format for the new image will not be exactly the same as the requested source, but it will be optimized for fast alpha blitting to the destination. As with :meth:`convert()` the returned surface has the same class as the converted surface. .. ## Surface.convert_alpha ## .. method:: copy | :sl:`create a new copy of a Surface` | :sg:`copy() -> Surface` Makes a duplicate copy of a Surface. The new surface will have the same pixel formats, color palettes, transparency settings, and class as the original. If a Surface subclass also needs to copy any instance specific attributes then it should override ``copy()``. .. ## Surface.copy ## .. method:: fill | :sl:`fill Surface with a solid color` | :sg:`fill(color, rect=None, special_flags=0) -> Rect` Fill the Surface with a solid color. If no rect argument is given the entire Surface will be filled. The rect argument will limit the fill to a specific area. The fill will also be contained by the Surface clip area. The color argument can be either a ``RGB`` sequence, a ``RGBA`` sequence or a mapped color index. If using ``RGBA``, the Alpha (A part of ``RGBA``) is ignored unless the surface uses per pixel alpha (Surface has the ``SRCALPHA`` flag). .. versionadded:: 1.8 Optional ``special_flags``: ``BLEND_ADD``, ``BLEND_SUB``, ``BLEND_MULT``, ``BLEND_MIN``, ``BLEND_MAX``. .. versionadded:: 1.8.1 Optional ``special_flags``: ``BLEND_RGBA_ADD``, ``BLEND_RGBA_SUB``, ``BLEND_RGBA_MULT``, ``BLEND_RGBA_MIN``, ``BLEND_RGBA_MAX`` ``BLEND_RGB_ADD``, ``BLEND_RGB_SUB``, ``BLEND_RGB_MULT``, ``BLEND_RGB_MIN``, ``BLEND_RGB_MAX``. This will return the affected Surface area. .. ## Surface.fill ## .. method:: scroll | :sl:`Shift the surface image in place` | :sg:`scroll(dx=0, dy=0) -> None` Move the image by dx pixels right and dy pixels down. dx and dy may be negative for left and up scrolls respectively. Areas of the surface that are not overwritten retain their original pixel values. Scrolling is contained by the Surface clip area. It is safe to have dx and dy values that exceed the surface size. .. versionadded:: 1.9 .. ## Surface.scroll ## .. method:: set_colorkey | :sl:`Set the transparent colorkey` | :sg:`set_colorkey(Color, flags=0) -> None` | :sg:`set_colorkey(None) -> None` Set the current color key for the Surface. When blitting this Surface onto a destination, any pixels that have the same color as the colorkey will be transparent. The color can be an ``RGB`` color or a mapped color integer. If ``None`` is passed, the colorkey will be unset. The colorkey will be ignored if the Surface is formatted to use per pixel alpha values. The colorkey can be mixed with the full Surface alpha value. The optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source. .. ## Surface.set_colorkey ## .. method:: get_colorkey | :sl:`Get the current transparent colorkey` | :sg:`get_colorkey() -> RGB or None` Return the current colorkey value for the Surface. If the colorkey is not set then ``None`` is returned. .. ## Surface.get_colorkey ## .. method:: set_alpha | :sl:`set the alpha value for the full Surface image` | :sg:`set_alpha(value, flags=0) -> None` | :sg:`set_alpha(None) -> None` Set the current alpha value for the Surface. When blitting this Surface onto a destination, the pixels will be drawn slightly transparent. The alpha value is an integer from 0 to 255, 0 is fully transparent and 255 is fully opaque. If ``None`` is passed for the alpha value, then alpha blending will be disabled, including per-pixel alpha. This value is different than the per pixel Surface alpha. For a surface with per pixel alpha, blanket alpha is ignored and ``None`` is returned. .. versionchanged:: 2.0 per-surface alpha can be combined with per-pixel alpha. The optional flags argument can be set to ``pygame.RLEACCEL`` to provide better performance on non accelerated displays. An ``RLEACCEL`` Surface will be slower to modify, but quicker to blit as a source. .. ## Surface.set_alpha ## .. method:: get_alpha | :sl:`get the current Surface transparency value` | :sg:`get_alpha() -> int_value` Return the current alpha value for the Surface. .. ## Surface.get_alpha ## .. method:: lock | :sl:`lock the Surface memory for pixel access` | :sg:`lock() -> None` Lock the pixel data of a Surface for access. On accelerated Surfaces, the pixel data may be stored in volatile video memory or nonlinear compressed forms. When a Surface is locked the pixel memory becomes available to access by regular software. Code that reads or writes pixel values will need the Surface to be locked. Surfaces should not remain locked for more than necessary. A locked Surface can often not be displayed or managed by pygame. Not all Surfaces require locking. The :meth:`mustlock()` method can determine if it is actually required. There is no performance penalty for locking and unlocking a Surface that does not need it. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released. .. ## Surface.lock ## .. method:: unlock | :sl:`unlock the Surface memory from pixel access` | :sg:`unlock() -> None` Unlock the Surface pixel data after it has been locked. The unlocked Surface can once again be drawn and managed by pygame. See the :meth:`lock()` documentation for more details. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. It is safe to nest locking and unlocking calls. The surface will only be unlocked after the final lock is released. .. ## Surface.unlock ## .. method:: mustlock | :sl:`test if the Surface requires locking` | :sg:`mustlock() -> bool` Returns ``True`` if the Surface is required to be locked to access pixel data. Usually pure software Surfaces do not require locking. This method is rarely needed, since it is safe and quickest to just lock all Surfaces as needed. All pygame functions will automatically lock and unlock the Surface data as needed. If a section of code is going to make calls that will repeatedly lock and unlock the Surface many times, it can be helpful to wrap the block inside a lock and unlock pair. .. ## Surface.mustlock ## .. method:: get_locked | :sl:`test if the Surface is current locked` | :sg:`get_locked() -> bool` Returns ``True`` when the Surface is locked. It doesn't matter how many times the Surface is locked. .. ## Surface.get_locked ## .. method:: get_locks | :sl:`Gets the locks for the Surface` | :sg:`get_locks() -> tuple` Returns the currently existing locks for the Surface. .. ## Surface.get_locks ## .. method:: get_at | :sl:`get the color value at a single pixel` | :sg:`get_at((x, y)) -> Color` Return a copy of the ``RGBA`` Color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised. Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using :mod:`pygame.surfarray`/:mod:`pygame.PixelArray`. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.9 Returning a Color instead of tuple. Use ``tuple(surf.get_at((x,y)))`` if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict. .. ## Surface.get_at ## .. method:: set_at | :sl:`set the color value for a single pixel` | :sg:`set_at((x, y), Color) -> None` Set the ``RGBA`` or mapped integer color value for a single pixel. If the Surface does not have per pixel alphas, the alpha value is ignored. Setting pixels outside the Surface area or outside the Surface clipping will have no effect. Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. This function will temporarily lock and unlock the Surface as needed. .. note:: If the surface is palettized, the pixel color will be set to the most similar color in the palette. .. ## Surface.set_at ## .. method:: get_at_mapped | :sl:`get the mapped color value at a single pixel` | :sg:`get_at_mapped((x, y)) -> Color` Return the integer value of the given pixel. If the pixel position is outside the area of the Surface an ``IndexError`` exception will be raised. This method is intended for pygame unit testing. It unlikely has any use in an application. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.9.2 .. ## Surface.get_at_mapped ## .. method:: get_palette | :sl:`get the color index palette for an 8-bit Surface` | :sg:`get_palette() -> [RGB, RGB, RGB, ...]` Return a list of up to 256 color elements that represent the indexed colors used in an 8-bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface. Returning a list of ``Color(with length 3)`` instances instead of tuples. .. versionadded:: 1.9 .. ## Surface.get_palette ## .. method:: get_palette_at | :sl:`get the color for a single entry in a palette` | :sg:`get_palette_at(index) -> RGB` Returns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255. .. versionadded:: 1.9 Returning ``Color(with length 3)`` instance instead of a tuple. .. ## Surface.get_palette_at ## .. method:: set_palette | :sl:`set the color palette for an 8-bit Surface` | :sg:`set_palette([RGB, RGB, RGB, ...]) -> None` Set the full palette for an 8-bit Surface. This will replace the colors in the existing palette. A partial palette can be passed and only the first colors in the original palette will be changed. This function has no effect on a Surface with more than 8-bits per pixel. .. ## Surface.set_palette ## .. method:: set_palette_at | :sl:`set the color for a single index in an 8-bit Surface palette` | :sg:`set_palette_at(index, RGB) -> None` Set the palette value for a single entry in a Surface palette. The index should be a value from 0 to 255. This function has no effect on a Surface with more than 8-bits per pixel. .. ## Surface.set_palette_at ## .. method:: map_rgb | :sl:`convert a color into a mapped color value` | :sg:`map_rgb(Color) -> mapped_int` Convert an ``RGBA`` color into the mapped integer value for this Surface. The returned integer will contain no more bits than the bit depth of the Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color. See the Surface object documentation for more information about colors and pixel formats. .. ## Surface.map_rgb ## .. method:: unmap_rgb | :sl:`convert a mapped integer color value into a Color` | :sg:`unmap_rgb(mapped_int) -> Color` Convert an mapped integer color into the ``RGB`` color components for this Surface. Mapped color values are not often used inside pygame, but can be passed to most functions that require a Surface and a color. See the Surface object documentation for more information about colors and pixel formats. .. ## Surface.unmap_rgb ## .. method:: set_clip | :sl:`set the current clipping area of the Surface` | :sg:`set_clip(rect) -> None` | :sg:`set_clip(None) -> None` Each Surface has an active clipping area. This is a rectangle that represents the only pixels on the Surface that can be modified. If ``None`` is passed for the rectangle the full Surface will be available for changes. The clipping area is always restricted to the area of the Surface itself. If the clip rectangle is too large it will be shrunk to fit inside the Surface. .. ## Surface.set_clip ## .. method:: get_clip | :sl:`get the current clipping area of the Surface` | :sg:`get_clip() -> Rect` Return a rectangle of the current clipping area. The Surface will always return a valid rectangle that will never be outside the bounds of the image. If the Surface has had ``None`` set for the clipping area, the Surface will return a rectangle with the full area of the Surface. .. ## Surface.get_clip ## .. method:: subsurface | :sl:`create a new surface that references its parent` | :sg:`subsurface(Rect) -> Surface` Returns a new Surface that shares its pixels with its new parent. The new Surface is considered a child of the original. Modifications to either Surface pixels will effect each other. Surface information like clipping area and color keys are unique to each Surface. The new Surface will inherit the palette, color key, and alpha settings from its parent. It is possible to have any number of subsurfaces and subsubsurfaces on the parent. It is also possible to subsurface the display Surface if the display mode is not hardware accelerated. See :meth:`get_offset()` and :meth:`get_parent()` to learn more about the state of a subsurface. A subsurface will have the same class as the parent surface. .. ## Surface.subsurface ## .. method:: get_parent | :sl:`find the parent of a subsurface` | :sg:`get_parent() -> Surface` Returns the parent Surface of a subsurface. If this is not a subsurface then ``None`` will be returned. .. ## Surface.get_parent ## .. method:: get_abs_parent | :sl:`find the top level parent of a subsurface` | :sg:`get_abs_parent() -> Surface` Returns the parent Surface of a subsurface. If this is not a subsurface then this surface will be returned. .. ## Surface.get_abs_parent ## .. method:: get_offset | :sl:`find the position of a child subsurface inside a parent` | :sg:`get_offset() -> (x, y)` Get the offset position of a child subsurface inside of a parent. If the Surface is not a subsurface this will return (0, 0). .. ## Surface.get_offset ## .. method:: get_abs_offset | :sl:`find the absolute position of a child subsurface inside its top level parent` | :sg:`get_abs_offset() -> (x, y)` Get the offset position of a child subsurface inside of its top level parent Surface. If the Surface is not a subsurface this will return (0, 0). .. ## Surface.get_abs_offset ## .. method:: get_size | :sl:`get the dimensions of the Surface` | :sg:`get_size() -> (width, height)` Return the width and height of the Surface in pixels. .. ## Surface.get_size ## .. method:: get_width | :sl:`get the width of the Surface` | :sg:`get_width() -> width` Return the width of the Surface in pixels. .. ## Surface.get_width ## .. method:: get_height | :sl:`get the height of the Surface` | :sg:`get_height() -> height` Return the height of the Surface in pixels. .. ## Surface.get_height ## .. method:: get_rect | :sl:`get the rectangular area of the Surface` | :sg:`get_rect(\**kwargs) -> Rect` Returns a new rectangle covering the entire surface. This rectangle will always start at (0, 0) with a width and height the same size as the image. You can pass keyword argument values to this function. These named values will be applied to the attributes of the Rect before it is returned. An example would be ``mysurf.get_rect(center=(100, 100))`` to create a rectangle for the Surface centered at a given position. .. ## Surface.get_rect ## .. method:: get_bitsize | :sl:`get the bit depth of the Surface pixel format` | :sg:`get_bitsize() -> int` Returns the number of bits used to represent each pixel. This value may not exactly fill the number of bytes used per pixel. For example a 15 bit Surface still requires a full 2 bytes. .. ## Surface.get_bitsize ## .. method:: get_bytesize | :sl:`get the bytes used per Surface pixel` | :sg:`get_bytesize() -> int` Return the number of bytes used per pixel. .. ## Surface.get_bytesize ## .. method:: get_flags | :sl:`get the additional flags used for the Surface` | :sg:`get_flags() -> int` Returns a set of current Surface features. Each feature is a bit in the flags bitmask. Typical flags are ``RLEACCEL``, ``SRCALPHA``, and ``SRCCOLORKEY``. Here is a more complete list of flags. A full list can be found in ``SDL_video.h`` :: SWSURFACE 0x00000000 # Surface is in system memory HWSURFACE 0x00000001 # (obsolete in pygame 2) Surface is in video memory ASYNCBLIT 0x00000004 # (obsolete in pygame 2) Use asynchronous blits if possible See :func:`pygame.display.set_mode()` for flags exclusive to the display surface. Used internally (read-only) :: HWACCEL 0x00000100 # Blit uses hardware acceleration SRCCOLORKEY 0x00001000 # Blit uses a source color key RLEACCELOK 0x00002000 # Private flag RLEACCEL 0x00004000 # Surface is RLE encoded SRCALPHA 0x00010000 # Blit uses source alpha blending PREALLOC 0x01000000 # Surface uses preallocated memory .. ## Surface.get_flags ## .. method:: get_pitch | :sl:`get the number of bytes used per Surface row` | :sg:`get_pitch() -> int` Return the number of bytes separating each row in the Surface. Surfaces in video memory are not always linearly packed. Subsurfaces will also have a larger pitch than their real width. This value is not needed for normal pygame usage. .. ## Surface.get_pitch ## .. method:: get_masks | :sl:`the bitmasks needed to convert between a color and a mapped integer` | :sg:`get_masks() -> (R, G, B, A)` Returns the bitmasks used to isolate each color in a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_masks ## .. method:: set_masks | :sl:`set the bitmasks needed to convert between a color and a mapped integer` | :sg:`set_masks((r,g,b,a)) -> None` This is not needed for normal pygame usage. .. note:: Starting in pygame 2.0, the masks are read-only and accordingly this method will raise a TypeError if called. .. deprecated:: 2.0.0 .. versionadded:: 1.8.1 .. ## Surface.set_masks ## .. method:: get_shifts | :sl:`the bit shifts needed to convert between a color and a mapped integer` | :sg:`get_shifts() -> (R, G, B, A)` Returns the pixel shifts need to convert between each color and a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_shifts ## .. method:: set_shifts | :sl:`sets the bit shifts needed to convert between a color and a mapped integer` | :sg:`set_shifts((r,g,b,a)) -> None` This is not needed for normal pygame usage. .. note:: Starting in pygame 2.0, the shifts are read-only and accordingly this method will raise a TypeError if called. .. deprecated:: 2.0.0 .. versionadded:: 1.8.1 .. ## Surface.set_shifts ## .. method:: get_losses | :sl:`the significant bits used to convert between a color and a mapped integer` | :sg:`get_losses() -> (R, G, B, A)` Return the least significant number of bits stripped from each color in a mapped integer. This value is not needed for normal pygame usage. .. ## Surface.get_losses ## .. method:: get_bounding_rect | :sl:`find the smallest rect containing data` | :sg:`get_bounding_rect(min_alpha = 1) -> Rect` Returns the smallest rectangular region that contains all the pixels in the surface that have an alpha value greater than or equal to the minimum alpha value. This function will temporarily lock and unlock the Surface as needed. .. versionadded:: 1.8 .. ## Surface.get_bounding_rect ## .. method:: get_view | :sl:`return a buffer view of the Surface's pixels.` | :sg:`get_view(='2') -> BufferProxy` Return an object which exports a surface's internal pixel buffer as a C level array struct, Python level array interface or a C level buffer interface. The new buffer protocol is supported. The kind argument is the length 1 string '0', '1', '2', '3', 'r', 'g', 'b', or 'a'. The letters are case insensitive; 'A' will work as well. The argument can be either a Unicode or byte (char) string. The default is '2'. '0' returns a contiguous unstructured bytes view. No surface shape information is given. A ``ValueError`` is raised if the surface's pixels are discontinuous. '1' returns a (surface-width * surface-height) array of continuous pixels. A ``ValueError`` is raised if the surface pixels are discontinuous. '2' returns a (surface-width, surface-height) array of raw pixels. The pixels are surface-bytesize-d unsigned integers. The pixel format is surface specific. The 3 byte unsigned integers of 24 bit surfaces are unlikely accepted by anything other than other pygame functions. '3' returns a (surface-width, surface-height, 3) array of ``RGB`` color components. Each of the red, green, and blue components are unsigned bytes. Only 24-bit and 32-bit surfaces are supported. The color components must be in either ``RGB`` or ``BGR`` order within the pixel. 'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a (surface-width, surface-height) view of a single color component within a surface: a color plane. Color components are unsigned bytes. Both 24-bit and 32-bit surfaces support 'r', 'g', and 'b'. Only 32-bit surfaces with ``SRCALPHA`` support 'a'. The surface is locked only when an exposed interface is accessed. For new buffer interface accesses, the surface is unlocked once the last buffer view is released. For array interface and old buffer interface accesses, the surface remains locked until the BufferProxy object is released. .. versionadded:: 1.9.2 .. method:: get_buffer | :sl:`acquires a buffer object for the pixels of the Surface.` | :sg:`get_buffer() -> BufferProxy` Return a buffer object for the pixels of the Surface. The buffer can be used for direct pixel access and manipulation. Surface pixel data is represented as an unstructured block of memory, with a start address and length in bytes. The data need not be contiguous. Any gaps are included in the length, but otherwise ignored. This method implicitly locks the Surface. The lock will be released when the returned :mod:`pygame.BufferProxy` object is garbage collected. .. versionadded:: 1.8 .. ## Surface.get_buffer ## .. attribute:: _pixels_address | :sl:`pixel buffer address` | :sg:`_pixels_address -> int` The starting address of the surface's raw pixel bytes. .. versionadded:: 1.9.2 .. method:: premul_alpha | :sl:`returns a copy of the surface with the RGB channels pre-multiplied by the alpha channel.` | :sg:`premul_alpha() -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave premul_alpha feedback with authors `_ Returns a copy of the initial surface with the red, green and blue color channels multiplied by the alpha channel. This is intended to make it easier to work with the BLEND_PREMULTIPLED blend mode flag of the blit() method. Surfaces which have called this method will only look correct after blitting if the BLEND_PREMULTIPLED special flag is used. It is worth noting that after calling this method, methods that return the colour of a pixel such as get_at() will return the alpha multiplied colour values. It is not possible to fully reverse an alpha multiplication of the colours in a surface as integer colour channel data is generally reduced by the operation (e.g. 255 x 0 = 0, from there it is not possible to reconstruct the original 255 from just the two remaining zeros in the colour and alpha channels). If you call this method, and then call it again, it will multiply the colour channels by the alpha channel twice. There are many possible ways to obtain a surface with the colour channels pre-multiplied by the alpha channel in pygame, and it is not possible to tell the difference just from the information in the pixels. It is completely possible to have two identical surfaces - one intended for pre-multiplied alpha blending and one intended for normal blending. For this reason we do not store state on surfaces intended for pre-multiplied alpha blending. Surfaces without an alpha channel cannot use this method and will return an error if you use it on them. It is best used on 32 bit surfaces (the default on most platforms) as the blitting on these surfaces can be accelerated by SIMD versions of the pre-multiplied blitter. In general pre-multiplied alpha blitting is faster then 'straight alpha' blitting and produces superior results when blitting an alpha surface onto another surface with alpha - assuming both surfaces contain pre-multiplied alpha colours. .. versionadded:: 2.2.0 .. ## Surface.premul_alpha ## .. ## pygame.Surface ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/ref/surfarray.rst.txt0000644000175100001770000002773314676242340023305 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.surfarray` ======================= .. module:: pygame.surfarray :synopsis: pygame module for accessing surface pixel data using array interfaces | :sl:`pygame module for accessing surface pixel data using array interfaces` Functions to convert between NumPy arrays and Surface objects. This module will only be functional when pygame can use the external NumPy package. If NumPy can't be imported, ``surfarray`` becomes a ``MissingModule`` object. Every pixel is stored as a single integer value to represent the red, green, and blue colors. The 8-bit images use a value that looks into a colormap. Pixels with higher depth use a bit packing process to place three or four values into a single number. The arrays are indexed by the ``X`` axis first, followed by the ``Y`` axis. Arrays that treat the pixels as a single integer are referred to as 2D arrays. This module can also separate the red, green, and blue color values into separate indices. These types of arrays are referred to as 3D arrays, and the last index is 0 for red, 1 for green, and 2 for blue. The pixels of a 2D array as returned by :func:`array2d` and :func:`pixels2d` are mapped to the specific surface. Use :meth:`pygame.Surface.unmap_rgb` to convert to a color, and :meth:`pygame.Surface.map_rgb` to get the surface specific pixel value of a color. Integer pixel values can only be used directly between surfaces with matching pixel layouts (see :class:`pygame.Surface`). All functions that refer to "array" will copy the surface information to a new numpy array. All functions that refer to "pixels" will directly reference the pixels from the surface and any changes performed to the array will make changes in the surface. As this last functions share memory with the surface, this one will be locked during the lifetime of the array. .. function:: array2d | :sl:`Copy pixels into a 2d array` | :sg:`array2d(Surface) -> array` Copy the :meth:`mapped ` (raw) pixels from a Surface into a 2D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array2d ## .. function:: pixels2d | :sl:`Reference pixels into a 2d array` | :sg:`pixels2d(Surface) -> array` Create a new 2D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. Pixels from a 24-bit Surface cannot be referenced, but all other Surface bit depths can. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels2d ## .. function:: array3d | :sl:`Copy pixels into a 3d array` | :sg:`array3d(Surface) -> array` Copy the pixels from a Surface into a 3D array. The bit depth of the surface will control the size of the integer values, and will work for any type of pixel format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array3d ## .. function:: pixels3d | :sl:`Reference pixels into a 3d array` | :sg:`pixels3d(Surface) -> array` Create a new 3D array that directly references the pixel values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This will only work on Surfaces that have 24-bit or 32-bit formats. Lower pixel formats cannot be referenced. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels3d ## .. function:: array_alpha | :sl:`Copy pixel alphas into a 2d array` | :sg:`array_alpha(Surface) -> array` Copy the pixel alpha values (degree of transparency) from a Surface into a 2D array. This will work for any type of Surface format. Surfaces without a pixel alpha will return an array with all opaque values. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. ## pygame.surfarray.array_alpha ## .. function:: pixels_alpha | :sl:`Reference pixel alphas into a 2d array` | :sg:`pixels_alpha(Surface) -> array` Create a new 2D array that directly references the alpha values (degree of transparency) in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 32-bit Surfaces with a per-pixel alpha value. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_alpha ## .. function:: array_red | :sl:`Copy red pixels into a 2d array` | :sg:`array_red(Surface) -> array` Copy the pixel red values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_red ## .. function:: pixels_red | :sl:`Reference pixel red into a 2d array.` | :sg:`pixels_red (Surface) -> array` Create a new 2D array that directly references the red values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_red ## .. function:: array_green | :sl:`Copy green pixels into a 2d array` | :sg:`array_green(Surface) -> array` Copy the pixel green values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_green ## .. function:: pixels_green | :sl:`Reference pixel green into a 2d array.` | :sg:`pixels_green (Surface) -> array` Create a new 2D array that directly references the green values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_green ## .. function:: array_blue | :sl:`Copy blue pixels into a 2d array` | :sg:`array_blue(Surface) -> array` Copy the pixel blue values from a Surface into a 2D array. This will work for any type of Surface format. This function will temporarily lock the Surface as pixels are copied (see the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method). .. versionadded:: 2.0.2 .. ## pygame.surfarray.array_blue ## .. function:: pixels_blue | :sl:`Reference pixel blue into a 2d array.` | :sg:`pixels_blue (Surface) -> array` Create a new 2D array that directly references the blue values in a Surface. Any changes to the array will affect the pixels in the Surface. This is a fast operation since no data is copied. This can only work on 24-bit or 32-bit Surfaces. The Surface this references will remain locked for the lifetime of the array, since the array generated by this function shares memory with the surface. See the :meth:`pygame.Surface.lock` - lock the Surface memory for pixel access method. .. ## pygame.surfarray.pixels_blue ## .. function:: array_colorkey | :sl:`Copy the colorkey values into a 2d array` | :sg:`array_colorkey(Surface) -> array` Create a new array with the colorkey transparency value from each pixel. If the pixel matches the colorkey it will be fully transparent; otherwise it will be fully opaque. This will work on any type of Surface format. If the image has no colorkey a solid opaque array will be returned. This function will temporarily lock the Surface as pixels are copied. .. ## pygame.surfarray.array_colorkey ## .. function:: make_surface | :sl:`Copy an array to a new surface` | :sg:`make_surface(array) -> Surface` Create a new Surface that best resembles the data and format on the array. The array can be 2D or 3D with any sized integer values. Function make_surface uses the array struct interface to acquire array properties, so is not limited to just NumPy arrays. See :mod:`pygame.pixelcopy`. New in pygame 1.9.2: array struct interface support. .. ## pygame.surfarray.make_surface ## .. function:: blit_array | :sl:`Blit directly from a array values` | :sg:`blit_array(Surface, array) -> None` Directly copy values from an array into a Surface. This is faster than converting the array into a Surface and blitting. The array must be the same dimensions as the Surface and will completely replace all pixel values. Only integer, ASCII character and record arrays are accepted. This function will temporarily lock the Surface as the new values are copied. .. ## pygame.surfarray.blit_array ## .. function:: map_array | :sl:`Map a 3d array into a 2d array` | :sg:`map_array(Surface, array3d) -> array2d` Convert a 3D array into a 2D array. This will use the given Surface format to control the conversion. Palette surface formats are supported for NumPy arrays. .. ## pygame.surfarray.map_array ## .. function:: use_arraytype | :sl:`Sets the array system to be used for surface arrays` | :sg:`use_arraytype (arraytype) -> None` DEPRECATED: Uses the requested array type for the module functions. The only supported arraytype is ``'numpy'``. Other values will raise ValueError. Using this function will raise a ``DeprecationWarning``. .. ## pygame.surfarray.use_arraytype ## .. function:: get_arraytype | :sl:`Gets the currently active array type.` | :sg:`get_arraytype () -> str` DEPRECATED: Returns the currently active array type. This will be a value of the ``get_arraytypes()`` tuple and indicates which type of array module is used for the array creation. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.surfarray.get_arraytype ## .. function:: get_arraytypes | :sl:`Gets the array system types currently supported.` | :sg:`get_arraytypes () -> tuple` DEPRECATED: Checks, which array systems are available and returns them as a tuple of strings. The values of the tuple can be used directly in the :func:`pygame.surfarray.use_arraytype` () method. If no supported array system could be found, None will be returned. Using this function will raise a ``DeprecationWarning``. .. versionadded:: 1.8 .. ## pygame.surfarray.get_arraytypes ## .. ## pygame.surfarray ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/ref/tests.rst.txt0000644000175100001770000001103414676242340022414 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.tests` =================== .. module:: pygame.tests :synopsis: Pygame unit test suite package | :sl:`Pygame unit test suite package` A quick way to run the test suite package from the command line is to import the go submodule with the Python -m option: :: python -m pygame.tests [] Command line option --help displays a usage message. Available options correspond to the :func:`pygame.tests.run` arguments. The xxxx_test submodules of the tests package are unit test suites for individual parts of pygame. Each can also be run as a main program. This is useful if the test, such as cdrom_test, is interactive. For pygame development the test suite can be run from a pygame distribution root directory. Program ``run_tests.py`` is provided for convenience, though test/go.py can be run directly. Module level tags control which modules are included in a unit test run. Tags are assigned to a unit test module with a corresponding _tags.py module. The tags module has the global __tags__, a list of tag names. For example, ``cdrom_test.py`` has a tag file ``cdrom_tags.py`` containing a tags list that has the 'interactive' string. The 'interactive' tag indicates ``cdrom_test.py`` expects user input. It is excluded from a ``run_tests.py`` or ``pygame.tests.go`` run. Two other tags that are excluded are 'ignore' and 'subprocess_ignore'. These two tags indicate unit tests that will not run on a particular platform, or for which no corresponding pygame module is available. The test runner will list each excluded module along with the tag responsible. .. function:: run | :sl:`Run the pygame unit test suite` | :sg:`run(*args, **kwds) -> tuple` Positional arguments (optional): :: The names of tests to include. If omitted then all tests are run. Test names need not include the trailing '_test'. Keyword arguments: :: incomplete - fail incomplete tests (default False) nosubprocess - run all test suites in the current process (default False, use separate subprocesses) dump - dump failures/errors as dict ready to eval (default False) file - if provided, the name of a file into which to dump failures/errors timings - if provided, the number of times to run each individual test to get an average run time (default is run each test once) exclude - A list of TAG names to exclude from the run show_output - show silenced stderr/stdout on errors (default False) all - dump all results, not just errors (default False) randomize - randomize order of tests (default False) seed - if provided, a seed randomizer integer multi_thread - if provided, the number of THREADS in which to run subprocessed tests time_out - if subprocess is True then the time limit in seconds before killing a test (default 30) fake - if provided, the name of the fake tests package in the run_tests__tests subpackage to run instead of the normal pygame tests python - the path to a python executable to run subprocessed tests (default sys.executable) Return value: :: A tuple of total number of tests run, dictionary of error information. The dictionary is empty if no errors were recorded. By default individual test modules are run in separate subprocesses. This recreates normal pygame usage where ``pygame.init()`` and ``pygame.quit()`` are called only once per program execution, and avoids unfortunate interactions between test modules. A time limit is placed on test execution ensuring that any frozen tests processes are killed when their time allotment is expired. Use the single process option if threading is not working properly or if tests are taking too long. It is not guaranteed that all tests will pass in single process mode. Tests are run in a randomized order if the randomize argument is True or a seed argument is provided. If no seed integer is provided then the system time is used for the randomization seed value. Individual test modules may have a __tags__ attribute, a list of tag strings used to selectively omit modules from a run. By default only 'interactive' modules such as cdrom_test are ignored. An interactive module must be run from the console as a Python program. This function can only be called once per Python session. It is not reentrant. .. ## pygame.tests.run ## .. ## pygame.tests ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/ref/time.rst.txt0000644000175100001770000001277014676242340022220 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.time` ================== .. module:: pygame.time :synopsis: pygame module for monitoring time | :sl:`pygame module for monitoring time` Times in pygame are represented in milliseconds (1/1000 seconds). Most platforms have a limited time resolution of around 10 milliseconds. This resolution, in milliseconds, is given in the ``TIMER_RESOLUTION`` constant. .. function:: get_ticks | :sl:`get the time in milliseconds` | :sg:`get_ticks() -> milliseconds` Return the number of milliseconds since ``pygame.init()`` was called. Before pygame is initialized this will always be 0. .. ## pygame.time.get_ticks ## .. function:: wait | :sl:`pause the program for an amount of time` | :sg:`wait(milliseconds) -> time` Will pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the ``pygame.time.delay()`` function. This returns the actual number of milliseconds used. .. ## pygame.time.wait ## .. function:: delay | :sl:`pause the program for an amount of time` | :sg:`delay(milliseconds) -> time` Will pause for a given number of milliseconds. This function will use the processor (rather than sleeping) in order to make the delay more accurate than ``pygame.time.wait()``. This returns the actual number of milliseconds used. .. ## pygame.time.delay ## .. function:: set_timer | :sl:`repeatedly create an event on the event queue` | :sg:`set_timer(event, millis) -> None` | :sg:`set_timer(event, millis, loops=0) -> None` Set an event to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed. The ``event`` attribute can be a ``pygame.event.Event`` object or an integer type that denotes an event. ``loops`` is an integer that denotes the number of events posted. If 0 (default) then the events will keep getting posted, unless explicitly stopped. To disable the timer for such an event, call the function again with the same event argument with ``millis`` argument set to 0. It is also worth mentioning that a particular event type can only be put on a timer once. In other words, there cannot be two timers for the same event type. Setting an event timer for a particular event discards the old one for that event type. ``loops`` replaces the ``once`` argument, and this does not break backward compatibility .. versionadded:: 2.0.0.dev3 once argument added. .. versionchanged:: 2.0.1 event argument supports ``pygame.event.Event`` object .. versionadded:: 2.0.1 added loops argument to replace once argument .. ## pygame.time.set_timer ## .. class:: Clock | :sl:`create an object to help track time` | :sg:`Clock() -> Clock` Creates a new Clock object that can be used to track an amount of time. The clock also provides several functions to help control a game's framerate. .. method:: tick | :sl:`update the clock` | :sg:`tick(framerate=0) -> milliseconds` This method should be called once per frame. It will compute how many milliseconds have passed since the previous call. If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick(40)`` once per frame, the program will never run at more than 40 frames per second. Note that this function uses SDL_Delay function which is not accurate on every platform, but does not use much CPU. Use tick_busy_loop if you want an accurate timer, and don't mind chewing CPU. .. ## Clock.tick ## .. method:: tick_busy_loop | :sl:`update the clock` | :sg:`tick_busy_loop(framerate=0) -> milliseconds` This method should be called once per frame. It will compute how many milliseconds have passed since the previous call. If you pass the optional framerate argument the function will delay to keep the game running slower than the given ticks per second. This can be used to help limit the runtime speed of a game. By calling ``Clock.tick_busy_loop(40)`` once per frame, the program will never run at more than 40 frames per second. Note that this function uses :func:`pygame.time.delay`, which uses lots of CPU in a busy loop to make sure that timing is more accurate. .. versionadded:: 1.8 .. ## Clock.tick_busy_loop ## .. method:: get_time | :sl:`time used in the previous tick` | :sg:`get_time() -> milliseconds` The number of milliseconds that passed between the previous two calls to ``Clock.tick()``. .. ## Clock.get_time ## .. method:: get_rawtime | :sl:`actual time used in the previous tick` | :sg:`get_rawtime() -> milliseconds` Similar to ``Clock.get_time()``, but does not include any time used while ``Clock.tick()`` was delaying to limit the framerate. .. ## Clock.get_rawtime ## .. method:: get_fps | :sl:`compute the clock framerate` | :sg:`get_fps() -> float` Compute your game's framerate (in frames per second). It is computed by averaging the last ten calls to ``Clock.tick()``. .. ## Clock.get_fps ## .. ## pygame.time.Clock ## .. ## pygame.time ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/ref/touch.rst.txt0000644000175100001770000000364514676242340022405 0ustar00runnerdocker.. include:: common.txt :mod:`pygame._sdl2.touch` ========================= .. module:: pygame._sdl2.touch :synopsis: pygame module to work with touch input | :sl:`pygame module to work with touch input` .. versionadded:: 2 This module requires SDL2. .. function:: get_num_devices | :sl:`get the number of touch devices` | :sg:`get_num_devices() -> int` Return the number of available touch devices. .. ## pygame._sdl2.touch.get_num_devices ## .. function:: get_device | :sl:`get the a touch device id for a given index` | :sg:`get_device(index) -> touchid` :param int index: This number is at least 0 and less than the :func:`number of devices `. Return an integer id associated with the given ``index``. .. ## pygame._sdl2.touch.get_device ## .. function:: get_num_fingers | :sl:`the number of active fingers for a given touch device` | :sg:`get_num_fingers(touchid) -> int` Return the number of fingers active for the touch device whose id is `touchid`. .. ## pygame._sdl2.touch.get_num_fingers ## .. function:: get_finger | :sl:`get information about an active finger` | :sg:`get_finger(touchid, index) -> int` :param int touchid: The touch device id. :param int index: The index of the finger to return information about, between 0 and the :func:`number of active fingers `. Return a dict for the finger ``index`` active on ``touchid``. The dict contains these keys: :: id the id of the finger (an integer). x the normalized x position of the finger, between 0 and 1. y the normalized y position of the finger, between 0 and 1. pressure the amount of pressure applied by the finger, between 0 and 1. .. ## pygame._sdl2.touch.get_finger ## .. ## pygame._sdl2.touch ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/ref/transform.rst.txt0000644000175100001770000003137714676242340023301 0ustar00runnerdocker.. include:: common.txt :mod:`pygame.transform` ======================= .. module:: pygame.transform :synopsis: pygame module to transform surfaces | :sl:`pygame module to transform surfaces` A Surface transform is an operation that moves or resizes the pixels. All these functions take a Surface to operate on and return a new Surface with the results. Some of the transforms are considered destructive. These means every time they are performed they lose pixel data. Common examples of this are resizing and rotating. For this reason, it is better to re-transform the original surface than to keep transforming an image multiple times. (For example, suppose you are animating a bouncing spring which expands and contracts. If you applied the size changes incrementally to the previous images, you would lose detail. Instead, always begin with the original image and scale to the desired size.) .. versionchanged:: 2.0.2 transform functions now support keyword arguments. .. function:: flip | :sl:`flip vertically and horizontally` | :sg:`flip(surface, flip_x, flip_y) -> Surface` This can flip a Surface either vertically, horizontally, or both. The arguments ``flip_x`` and ``flip_y`` are booleans that control whether to flip each axis. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions. .. ## pygame.transform.flip ## .. function:: scale | :sl:`resize to new resolution` | :sg:`scale(surface, size, dest_surface=None) -> Surface` Resizes the Surface to a new size, given as (width, height). This is a fast scale operation that does not sample the results. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the size (width, height) passed in. Also the destination surface must be the same format. .. ## pygame.transform.scale ## .. function:: scale_by | :sl:`resize to new resolution, using scalar(s)` | :sg:`scale_by(surface, factor, dest_surface=None) -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave scale_by feedback with authors `_ Same as :func:`scale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.scale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.scale_by(surf, (2, 1))` doubles the image width but keeps the height the same. .. versionadded:: 2.1.3 .. ## pygame.transform.scale_by ## .. function:: rotate | :sl:`rotate an image` | :sg:`rotate(surface, angle) -> Surface` Unfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise. Unless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value. .. ## pygame.transform.rotate ## .. function:: rotozoom | :sl:`filtered scale and rotation` | :sg:`rotozoom(surface, angle, scale) -> Surface` This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise. .. ## pygame.transform.rotozoom ## .. function:: scale2x | :sl:`specialized image doubler` | :sg:`scale2x(surface, dest_surface=None) -> Surface` This will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics. This really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format. .. ## pygame.transform.scale2x ## .. function:: smoothscale | :sl:`scale a surface to an arbitrary size smoothly` | :sg:`smoothscale(surface, size, dest_surface=None) -> Surface` Uses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized ``MMX`` routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24. .. versionadded:: 1.8 .. ## pygame.transform.smoothscale ## .. function:: smoothscale_by | :sl:`resize to new resolution, using scalar(s)` | :sg:`smoothscale_by(surface, factor, dest_surface=None) -> Surface` **Experimental:** feature still in development available for testing and feedback. It may change. `Please leave smoothscale_by feedback with authors `_ Same as :func:`smoothscale()`, but scales by some factor, rather than taking the new size explicitly. For example, :code:`transform.smoothscale_by(surf, 3)` will triple the size of the surface in both dimensions. Optionally, the scale factor can be a sequence of two numbers, controlling x and y scaling separately. For example, :code:`transform.smoothscale_by(surf, (2, 1))` doubles the image width but keeps the height the same. .. versionadded:: 2.1.3 .. ## pygame.transform.smoothscale_by ## .. function:: get_smoothscale_backend | :sl:`return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'` | :sg:`get_smoothscale_backend() -> string` Shows whether or not smoothscale is using ``MMX`` or ``SSE`` acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime. This function is provided for pygame testing and debugging. .. ## pygame.transform.get_smoothscale_backend ## .. function:: set_smoothscale_backend | :sl:`set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'` | :sg:`set_smoothscale_backend(backend) -> None` Sets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses ``MMX`` instructions only. 'SSE' allows ``SSE`` extensions as well. A value error is raised if type is not recognized or not supported by the current processor. This function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only. .. ## pygame.transform.set_smoothscale_backend ## .. function:: chop | :sl:`gets a copy of an image with an interior area removed` | :sg:`chop(surface, rect) -> Surface` Extracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.) ``NOTE``: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface. .. ## pygame.transform.chop ## .. function:: laplacian | :sl:`find edges in a surface` | :sg:`laplacian(surface, dest_surface=None) -> Surface` Finds the edges in a surface using the laplacian algorithm. .. versionadded:: 1.8 .. ## pygame.transform.laplacian ## .. function:: average_surfaces | :sl:`find the average surface from many surfaces.` | :sg:`average_surfaces(surfaces, dest_surface=None, palette_colors=1) -> Surface` Takes a sequence of surfaces and returns a surface with average colors from each of the surfaces. palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. Note, this function currently does not handle palette using surfaces correctly. .. versionadded:: 1.8 .. versionadded:: 1.9 ``palette_colors`` argument .. ## pygame.transform.average_surfaces ## .. function:: average_color | :sl:`finds the average color of a surface` | :sg:`average_color(surface, rect=None, consider_alpha=False) -> Color` Finds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color. If consider_alpha is set to True, then alpha is taken into account (removing the black artifacts). .. versionadded:: 2.1.2 ``consider_alpha`` argument .. ## pygame.transform.average_color ## .. function:: grayscale | :sl:`grayscale a surface` | :sg:`grayscale(surface, dest_surface=None) -> Surface` Returns a grayscaled version of the original surface using the luminosity formula which weights red, green and blue according to their wavelengths. An optional destination surface can be passed which is faster than creating a new Surface. This destination surface must have the same dimensions (width, height) and depth as the source Surface. .. ## pygame.transform.grayscale ## .. function:: threshold | :sl:`finds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'.` | :sg:`threshold(dest_surface, surface, search_color, threshold=(0,0,0,0), set_color=(0,0,0,0), set_behavior=1, search_surf=None, inverse_set=False) -> num_threshold_pixels` This versatile function can be used for find colors in a 'surf' close to a 'search_color' or close to colors in a separate 'search_surf'. It can also be used to transfer pixels into a 'dest_surf' that match or don't match. By default it sets pixels in the 'dest_surf' where all of the pixels NOT within the threshold are changed to set_color. If inverse_set is optionally set to True, the pixels that ARE within the threshold are changed to set_color. If the optional 'search_surf' surface is given, it is used to threshold against rather than the specified 'set_color'. That is, it will find each pixel in the 'surf' that is within the 'threshold' of the pixel at the same coordinates of the 'search_surf'. :param dest_surf: Surface we are changing. See 'set_behavior'. Should be None if counting (set_behavior is 0). :type dest_surf: pygame.Surface or None :param pygame.Surface surf: Surface we are looking at. :param pygame.Color search_color: Color we are searching for. :param pygame.Color threshold: Within this distance from search_color (or search_surf). You can use a threshold of (r,g,b,a) where the r,g,b can have different thresholds. So you could use an r threshold of 40 and a blue threshold of 2 if you like. :param set_color: Color we set in dest_surf. :type set_color: pygame.Color or None :param int set_behavior: - set_behavior=1 (default). Pixels in dest_surface will be changed to 'set_color'. - set_behavior=0 we do not change 'dest_surf', just count. Make dest_surf=None. - set_behavior=2 pixels set in 'dest_surf' will be from 'surf'. :param search_surf: - search_surf=None (default). Search against 'search_color' instead. - search_surf=Surface. Look at the color in 'search_surf' rather than using 'search_color'. :type search_surf: pygame.Surface or None :param bool inverse_set: - False, default. Pixels outside of threshold are changed. - True, Pixels within threshold are changed. :rtype: int :returns: The number of pixels that are within the 'threshold' in 'surf' compared to either 'search_color' or `search_surf`. :Examples: See the threshold tests for a full of examples: https://github.com/pygame/pygame/blob/main/test/transform_test.py .. literalinclude:: ../../../test/transform_test.py :pyobject: TransformModuleTest.test_threshold_dest_surf_not_change .. versionadded:: 1.8 .. versionchanged:: 1.9.4 Fixed a lot of bugs and added keyword arguments. Test your code. .. ## pygame.transform.threshold ## .. ## pygame.transform ## ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/0000755000175100001770000000000014676242436017751 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/tut/CameraIntro.rst.txt0000644000175100001770000002370614676242340023527 0ustar00runnerdocker.. TUTORIAL:Camera Module Introduction .. include:: common.txt ************************************************* Pygame Tutorials - Camera Module Introduction ************************************************* Camera Module Introduction ========================== .. rst-class:: docinfo :Author: by Nirav Patel :Contact: nrp@eclecti.cc Pygame 1.9 comes with support for interfacing cameras, allowing you to capture still images, watch live streams, and do some simple computer vision. This tutorial will cover all of those use cases, providing code samples you can base your app or game on. You can refer to the :mod:`reference documentation ` for the full API. .. note:: As of Pygame 1.9, the camera module offers native support for cameras that use v4l2 on Linux. There is support for other platforms via Videocapture or OpenCV, but this guide will focus on the native module. Most of the code will be valid for other platforms, but certain things like controls will not work. The module is also marked as **EXPERIMENTAL**, meaning the API could change in subsequent versions. Import and Init --------------- :: import pygame import pygame.camera from pygame.locals import * pygame.init() pygame.camera.init() As the camera module is optional, it needs to be imported and initialized manually as shown above. Capturing a Single Image ------------------------ Now we will go over the simplest case of opening a camera and capturing a frame as a surface. In the below example, we assume that there is a camera at /dev/video0 on the computer, and initialize it with a size of 640 by 480. The surface called image is whatever the camera was seeing when get_image() was called. :: cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() Listing Connected Cameras ^^^^^^^^^^^^^^^^^^^^^^^^^ You may be wondering, what if we don't know the exact path of the camera? We can ask the module to provide a list of cameras attached to the computer and initialize the first camera in the list. :: camlist = pygame.camera.list_cameras() if camlist: cam = pygame.camera.Camera(camlist[0],(640,480)) Using Camera Controls ^^^^^^^^^^^^^^^^^^^^^ Most cameras support controls like flipping the image and changing brightness. set_controls() and get_controls() can be used at any point after using start(). :: cam.set_controls(hflip = True, vflip = False) print camera.get_controls() Capturing a Live Stream ----------------------- The rest of this tutorial will be based around capturing a live stream of images. For this, we will be using the class below. As described, it will simply blit a constant stream of camera frames to the screen, effectively showing live video. It is basically what you would expect, looping get_image(), blitting to the display surface, and flipping it. For performance reasons, we will be supplying the camera with the same surface to use each time. :: class Capture: def __init__(self): self.size = (640,480) # create a display surface. standard pygame stuff self.display = pygame.display.set_mode(self.size, 0) # this is the same as what we saw before self.clist = pygame.camera.list_cameras() if not self.clist: raise ValueError("Sorry, no cameras detected.") self.cam = pygame.camera.Camera(self.clist[0], self.size) self.cam.start() # create a surface to capture to. for performance purposes # bit depth is the same as that of the display surface. self.snapshot = pygame.surface.Surface(self.size, 0, self.display) def get_and_flip(self): # if you don't want to tie the framerate to the camera, you can check # if the camera has an image ready. note that while this works # on most cameras, some will never return true. if self.cam.query_image(): self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface. simple! self.display.blit(self.snapshot, (0,0)) pygame.display.flip() def main(self): going = True while going: events = pygame.event.get() for e in events: if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): # close the camera safely self.cam.stop() going = False self.get_and_flip() Since get_image() is a blocking call that could take quite a bit of time on a slow camera, this example uses query_image() to see if the camera is ready. This allows you to separate the framerate of your game from that of your camera. It is also possible to have the camera capturing images in a separate thread, for approximately the same performance gain, if you find that your camera does not support the query_image() function correctly. Basic Computer Vision --------------------- By using the camera, transform, and mask modules, pygame can do some basic computer vision. Colorspaces ^^^^^^^^^^^ When initializing a camera, colorspace is an optional parameter, with 'RGB', 'YUV', and 'HSV' as the possible choices. YUV and HSV are both generally more useful for computer vision than RGB, and allow you to more easily threshold by color, something we will look at later in the tutorial. :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "RGB") .. image:: camera_rgb.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "YUV") .. image:: camera_yuv.jpg :class: trailing :: self.cam = pygame.camera.Camera(self.clist[0], self.size, "HSV") .. image:: camera_hsv.jpg :class: trailing Thresholding ^^^^^^^^^^^^ Using the threshold() function from the transform module, one can do simple green screen like effects, or isolate specifically colored objects in a scene. In the below example, we threshold out just the green tree and make the rest of the image black. Check the reference documentation for details on the :func:`threshold function `\ . :: self.thresholded = pygame.surface.Surface(self.size, 0, self.display) self.snapshot = self.cam.get_image(self.snapshot) pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(90,170,170),(0,0,0),2) .. image:: camera_thresholded.jpg :class: trailing Of course, this is only useful if you already know the exact color of the object you are looking for. To get around this and make thresholding usable in the real world, we need to add a calibration stage where we identify the color of an object and use it to threshold against. We will be using the average_color() function of the transform module to do this. Below is an example calibration function that you could loop until an event like a key press, and an image of what it would look like. The color inside the box will be the one that is used for the threshold. Note that we are using the HSV colorspace in the below images. :: def calibrate(self): # capture the image self.snapshot = self.cam.get_image(self.snapshot) # blit it to the display surface self.display.blit(self.snapshot, (0,0)) # make a rect in the middle of the screen crect = pygame.draw.rect(self.display, (255,0,0), (145,105,30,30), 4) # get the average color of the area inside the rect self.ccolor = pygame.transform.average_color(self.snapshot, crect) # fill the upper left corner with that color self.display.fill(self.ccolor, (0,0,50,50)) pygame.display.flip() .. image:: camera_average.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,self.ccolor,(30,30,30),(0,0,0),2) .. image:: camera_thresh.jpg :class: trailing You can use the same idea to do a simple green screen/blue screen, by first getting a background image and then thresholding against it. The below example just has the camera pointed at a blank white wall in HSV colorspace. :: def calibrate(self): # capture a bunch of background images bg = [] for i in range(0,5): bg.append(self.cam.get_image(self.background)) # average them down to one to get rid of some noise pygame.transform.average_surfaces(bg,self.background) # blit it to the display surface self.display.blit(self.background, (0,0)) pygame.display.flip() .. image:: camera_background.jpg :class: trailing :: pygame.transform.threshold(self.thresholded,self.snapshot,(0,255,0),(30,30,30),(0,0,0),1,self.background) .. image:: camera_green.jpg :class: trailing Using the Mask Module ^^^^^^^^^^^^^^^^^^^^^ The stuff above is great if you just want to display images, but with the :mod:`mask module `, you can also use a camera as an input device for a game. For example, going back to the example of thresholding out a specific object, we can find the position of that object and use it to control an on screen object. :: def get_and_flip(self): self.snapshot = self.cam.get_image(self.snapshot) # threshold against the color we got before mask = pygame.mask.from_threshold(self.snapshot, self.ccolor, (30, 30, 30)) self.display.blit(self.snapshot,(0,0)) # keep only the largest blob of that color connected = mask.connected_component() # make sure the blob is big enough that it isn't just noise if mask.count() > 100: # find the center of the blob coord = mask.centroid() # draw a circle with size variable on the size of the blob pygame.draw.circle(self.display, (0,255,0), coord, max(min(50,mask.count()/400),5)) pygame.display.flip() .. image:: camera_mask.jpg :class: trailing This is just the most basic example. You can track multiple different colored blobs, find the outlines of objects, have collision detection between real life and in game objects, get the angle of an object to allow for even finer control, and more. Have fun! ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/tut/ChimpLineByLine.rst.txt0000644000175100001770000005175214676242340024300 0ustar00runnerdocker.. TUTORIAL:Line by Line Descriptions of the Chimp Example .. include:: common.txt ************************************************* Pygame Tutorials - Line By Line Chimp Example ************************************************* Line By Line Chimp ================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org .. toctree:: :hidden: chimp.py Introduction ------------ In the *pygame* examples there is a simple example named "chimp". This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame's abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling. The program and images can be found inside the standard source distribution of pygame. You can run it by running `python -m pygame.examples.chimp` in your terminal. This tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out. This is an excellent tutorial for people getting their first look at the *pygame* code. Once *pygame* is fully installed, you can find and run the chimp demo for yourself in the examples directory. .. container:: fullwidth leading trailing .. rst-class:: small-heading (no, this is not a banner ad, it's the screenshot) .. image:: chimpshot.gif :alt: chimp game banner :doc:`Full Source ` Import Modules -------------- This is the code that imports all the needed modules into your program. It also checks for the availability of some of the optional pygame modules. :: # Import Modules import os import pygame as pg if not pg.font: print("Warning, fonts disabled") if not pg.mixer: print("Warning, sound disabled") main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, "data") First, we import the standard "os" python module. This allow us to do things like create platform independent file paths. In the next line, we import the pygame package. In our case, we import pygame as ``pg``, so that all of the functionality of pygame is able to be referenced from the namespace ``pg``. Some pygame modules are optional, and if they aren't found, they evaluate to ``False``. Because of that, we decide to print a nice warning message if the :mod:`font` or :mod:`mixer ` modules in pygame are not available. (Although they will only be unavailable in very uncommon situations). Lastly, we prepare two paths for the rest of the code to use. ``main_dir`` uses the `os.path` module and the `__file__` variable provided by Python to locate the game's python file, and extract the folder from that path. It then prepares the variable ``data_dir`` to tell the loading functions exactly where to look. Loading Resources ----------------- Here we have two functions we can use to load images and sounds. We will look at each function individually in this section. :: def load_image(name, colorkey=None, scale=1): fullname = os.path.join(data_dir, name) image = pg.image.load(fullname) size = image.get_size() size = (size[0] * scale, size[1] * scale) image = pg.transform.scale(image, size) image = image.convert() if colorkey is not None: if colorkey == -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, pg.RLEACCEL) return image, image.get_rect() This function takes the name of an image to load. It also optionally takes an argument it can use to set a colorkey for the image, and an argument to scale the image. A colorkey is used in graphics to represent a color of the image that is transparent. The first thing this function does is create a full pathname to the file. In this example all the resources are in a "data" subdirectory. By using the `os.path.join` function, a pathname will be created that works for whatever platform the game is running on. Next we load the image using the :func:`pygame.image.load` function. After the image is loaded, we make an important call to the `convert()` function. This makes a new copy of a Surface and converts its color format and depth to match the display. This means blitting the image to the screen will happen as quickly as possible. We then scale the image, using the :func:`pygame.transform.scale` function. This function takes a Surface and the size it should be scaled to. To scale by a scalar, we can get the size and scale the x and y by the scalar. Last, we set the colorkey for the image. If the user supplied an argument for the colorkey argument we use that value as the colorkey for the image. This would usually just be a color RGB value, like (255, 255, 255) for white. You can also pass a value of -1 as the colorkey. In this case the function will lookup the color at the topleft pixel of the image, and use that color for the colorkey. :: def load_sound(name): class NoneSound: def play(self): pass if not pg.mixer or not pg.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) sound = pg.mixer.Sound(fullname) return sound Next is the function to load a sound file. The first thing this function does is check to see if the :mod:`pygame.mixer` module was imported correctly. If not, it returns a small class instance that has a dummy play method. This will act enough like a normal Sound object for this game to run without any extra error checking. This function is similar to the image loading function, but handles some different problems. First we create a full path to the sound image, and load the sound file. Then we simply return the loaded Sound object. Game Object Classes ------------------- Here we create two classes to represent the objects in our game. Almost all the logic for the game goes into these two classes. We will look over them one at a time here. :: class Fist(pg.sprite.Sprite): """moves a clenched fist on the screen, following the mouse""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("fist.png", -1) self.fist_offset = (-235, -80) self.punching = False def update(self): """move the fist based on the mouse position""" pos = pg.mouse.get_pos() self.rect.topleft = pos self.rect.move_ip(self.fist_offset) if self.punching: self.rect.move_ip(15, 25) def punch(self, target): """returns true if the fist collides with the target""" if not self.punching: self.punching = True hitbox = self.rect.inflate(-5, -5) return hitbox.colliderect(target.rect) def unpunch(self): """called to pull the fist back""" self.punching = False Here we create a class to represent the players fist. It is derived from the `Sprite` class included in the :mod:`pygame.sprite` module. The `__init__` function is called when new instances of this class are created. The first thing we do is be sure to call the `__init__` function for our base class. This allows the Sprite's `__init__` function to prepare our object for use as a sprite. This game uses one of the sprite drawing Group classes. These classes can draw sprites that have an "image" and "rect" attribute. By simply changing these two attributes, the renderer will draw the current image at the current position. All sprites have an `update()` method. This function is typically called once per frame. It is where you should put code that moves and updates the variables for the sprite. The `update()` method for the fist moves the fist to the location of the mouse pointer. It also offsets the fist position slightly if the fist is in the "punching" state. The following two functions `punch()` and `unpunch()` change the punching state for the fist. The `punch()` method also returns a true value if the fist is colliding with the given target sprite. :: class Chimp(pg.sprite.Sprite): """moves a monkey critter across the screen. it can spin the monkey when it is punched.""" def __init__(self): pg.sprite.Sprite.__init__(self) # call Sprite initializer self.image, self.rect = load_image("chimp.png", -1, 4) screen = pg.display.get_surface() self.area = screen.get_rect() self.rect.topleft = 10, 90 self.move = 18 self.dizzy = False def update(self): """walk or spin, depending on the monkeys state""" if self.dizzy: self._spin() else: self._walk() def _walk(self): """move the monkey across the screen, and turn at the ends""" newpos = self.rect.move((self.move, 0)) if not self.area.contains(newpos): if self.rect.left < self.area.left or self.rect.right > self.area.right: self.move = -self.move newpos = self.rect.move((self.move, 0)) self.image = pg.transform.flip(self.image, True, False) self.rect = newpos def _spin(self): """spin the monkey image""" center = self.rect.center self.dizzy = self.dizzy + 12 if self.dizzy >= 360: self.dizzy = False self.image = self.original else: rotate = pg.transform.rotate self.image = rotate(self.original, self.dizzy) self.rect = self.image.get_rect(center=center) def punched(self): """this will cause the monkey to start spinning""" if not self.dizzy: self.dizzy = True self.original = self.image The `Chimp` class is doing a little more work than the fist, but nothing more complex. This class will move the chimp back and forth across the screen. When the monkey is punched, he will spin around to exciting effect. This class is also derived from the base :class:`Sprite ` class, and is initialized the same as the fist. While initializing, the class also sets the attribute "area" to be the size of the display screen. The `update` function for the chimp simply looks at the current "dizzy" state, which is true when the monkey is spinning from a punch. It calls either the `_spin` or `_walk` method. These functions are prefixed with an underscore. This is just a standard python idiom which suggests these methods should only be used by the `Chimp` class. We could go so far as to give them a double underscore, which would tell python to really try to make them private methods, but we don't need such protection. :) The `_walk` method creates a new position for the monkey by moving the current rect by a given offset. If this new position crosses outside the display area of the screen, it reverses the movement offset. It also mirrors the image using the :func:`pygame.transform.flip` function. This is a crude effect that makes the monkey look like he's turning the direction he is moving. The `_spin` method is called when the monkey is currently "dizzy". The dizzy attribute is used to store the current amount of rotation. When the monkey has rotated all the way around (360 degrees) it resets the monkey image back to the original, non-rotated version. Before calling the :func:`pygame.transform.rotate` function, you'll see the code makes a local reference to the function simply named "rotate". There is no need to do that for this example, it is just done here to keep the following line's length a little shorter. Note that when calling the `rotate` function, we are always rotating from the original monkey image. When rotating, there is a slight loss of quality. Repeatedly rotating the same image and the quality would get worse each time. Also, when rotating an image, the size of the image will actually change. This is because the corners of the image will be rotated out, making the image bigger. We make sure the center of the new image matches the center of the old image, so it rotates without moving. The last method is `punched()` which tells the sprite to enter its dizzy state. This will cause the image to start spinning. It also makes a copy of the current image named "original". Initialize Everything --------------------- Before we can do much with pygame, we need to make sure its modules are initialized. In this case we will also open a simple graphics window. Now we are in the `main()` function of the program, which actually runs everything. :: pg.init() screen = pg.display.set_mode((1280, 480), pg.SCALED) pg.display.set_caption("Monkey Fever") pg.mouse.set_visible(False) The first line to initialize *pygame* takes care of a bit of work for us. It checks through the imported *pygame* modules and attempts to initialize each one of them. It is possible to go back and check if modules failed to initialize, but we won't bother here. It is also possible to take a lot more control and initialize each specific module by hand. That type of control is generally not needed, but is available if you desire. Next we set up the display graphics mode. Note that the :mod:`pygame.display` module is used to control all the display settings. In this case we are asking for a 1280 by 480 window, with the ``SCALED`` display flag. This automatically scales up the window for displays much larger than the window. Last we set the window title and turn off the mouse cursor for our window. Very basic to do, and now we have a small black window ready to do our bidding. Usually the cursor defaults to visible, so there is no need to really set the state unless we want to hide it. Create The Background --------------------- Our program is going to have text message in the background. It would be nice for us to create a single surface to represent the background and repeatedly use that. The first step is to create the surface. :: background = pg.Surface(screen.get_size()) background = background.convert() background.fill((170, 238, 187)) This creates a new surface for us that is the same size as the display window. Note the extra call to `convert()` after creating the Surface. The convert with no arguments will make sure our background is the same format as the display window, which will give us the fastest results. We also fill the entire background with a certain green color. The fill() function usually takes an RGB triplet as arguments, but supports many input formats. See the :mod:`pygame.Color` for all the color formats. Put Text On The Background, Centered ------------------------------------ Now that we have a background surface, lets get the text rendered to it. We only do this if we see the :mod:`pygame.font` module has imported properly. If not, we just skip this section. :: if pg.font: font = pg.font.Font(None, 64) text = font.render("Pummel The Chimp, And Win $$$", True, (10, 10, 10)) textpos = text.get_rect(centerx=background.get_width() / 2, y=10) background.blit(text, textpos) As you see, there are a couple steps to getting this done. First we must create the font object and render it into a new surface. We then find the center of that new surface and blit (paste) it onto the background. The font is created with the `font` module's `Font()` constructor. Usually you will pass the name of a TrueType font file to this function, but we can also pass `None`, which will use a default font. The `Font` constructor also needs to know the size of font we want to create. We then render that font into a new surface. The `render` function creates a new surface that is the appropriate size for our text. In this case we are also telling render to create antialiased text (for a nice smooth look) and to use a dark grey color. Next we need to find the centered position of the text on our display. We create a "Rect" object from the text dimensions, which allows us to easily assign it to the screen center. Finally we blit (blit is like a copy or paste) the text onto the background image. Display The Background While Setup Finishes ------------------------------------------- We still have a black window on the screen. Lets show our background while we wait for the other resources to load. :: screen.blit(background, (0, 0)) pg.display.flip() This will blit our entire background onto the display window. The blit is self explanatory, but what about this flip routine? In pygame, changes to the display surface are not immediately visible. Normally, a display must be updated in areas that have changed for them to be visible to the user. In this case the `flip()` function works nicely because it simply handles the entire window area. Prepare Game Object ------------------- Here we create all the objects that the game is going to need. :: whiff_sound = load_sound("whiff.wav") punch_sound = load_sound("punch.wav") chimp = Chimp() fist = Fist() allsprites = pg.sprite.RenderPlain((chimp, fist)) clock = pg.time.Clock() First we load two sound effects using the `load_sound` function we defined above. Then we create an instance of each of our sprite classes. And lastly we create a sprite :class:`Group ` which will contain all our sprites. We actually use a special sprite group named :class:`RenderPlain `. This sprite group can draw all the sprites it contains to the screen. It is called `RenderPlain` because there are actually more advanced Render groups. But for our game, we just need simple drawing. We create the group named "allsprites" by passing a list with all the sprites that should belong in the group. We could later on add or remove sprites from this group, but in this game we won't need to. The `clock` object we create will be used to help control our game's framerate. we will use it in the main loop of our game to make sure it doesn't run too fast. Main Loop --------- Nothing much here, just an infinite loop. :: going = True while going: clock.tick(60) All games run in some sort of loop. The usual order of things is to check on the state of the computer and user input, move and update the state of all the objects, and then draw them to the screen. You'll see that this example is no different. We also make a call to our `clock` object, which will make sure our game doesn't run faster than 60 frames per second. Handle All Input Events ----------------------- This is an extremely simple case of working the event queue. :: for event in pg.event.get(): if event.type == pg.QUIT: going = False elif event.type == pg.KEYDOWN and event.key == pg.K_ESCAPE: going = False elif event.type == pg.MOUSEBUTTONDOWN: if fist.punch(chimp): punch_sound.play() # punch chimp.punched() else: whiff_sound.play() # miss elif event.type == pg.MOUSEBUTTONUP: fist.unpunch() First we get all the available Events from pygame and loop through each of them. The first two tests see if the user has quit our game, or pressed the escape key. In these cases we just set ``going`` to ``False``, allowing us out of the infinite loop. Next we just check to see if the mouse button was pressed or released. If the button was pressed, we ask the fist object if it has collided with the chimp. We play the appropriate sound effect, and if the monkey was hit, we tell him to start spinning (by calling his `punched()` method). Update the Sprites ------------------ :: allsprites.update() Sprite groups have an `update()` method, which simply calls the update method for all the sprites it contains. Each of the objects will move around, depending on which state they are in. This is where the chimp will move one step side to side, or spin a little farther if he was recently punched. Draw The Entire Scene --------------------- Now that all the objects are in the right place, time to draw them. :: screen.blit(background, (0, 0)) allsprites.draw(screen) pg.display.flip() The first blit call will draw the background onto the entire screen. This erases everything we saw from the previous frame (slightly inefficient, but good enough for this game). Next we call the `draw()` method of the sprite container. Since this sprite container is really an instance of the "RenderPlain" sprite group, it knows how to draw our sprites. Lastly, we `flip()` the contents of pygame's software double buffer to the screen. This makes everything we've drawn visible all at once. Game Over --------- User has quit, time to clean up. :: pg.quit() Cleaning up the running game in *pygame* is extremely simple. Since all variables are automatically destructed, we don't really have to do anything, but calling `pg.quit()` explicitly cleans up pygame's internals. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/tut/DisplayModes.rst.txt0000644000175100001770000002122014676242340023705 0ustar00runnerdocker.. TUTORIAL: Choosing and Configuring Display Modes .. include:: common.txt ******************************************** Pygame Tutorials - Setting Display Modes ******************************************** Setting Display Modes ===================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Introduction ------------ Setting the display mode in *pygame* creates a visible image surface on the monitor. This surface can either cover the full screen, or be windowed on platforms that support a window manager. The display surface is nothing more than a standard *pygame* surface object. There are special functions needed in the :mod:`pygame.display` module to keep the image surface contents updated on the monitor. Setting the display mode in *pygame* is an easier task than with most graphic libraries. The advantage is if your display mode is not available, *pygame* will emulate the display mode that you asked for. *Pygame* will select a display resolution and color depth that best matches the settings you have requested, then allow you to access the display with the format you have requested. In reality, since the :mod:`pygame.display` module is a binding around the SDL library, SDL is really doing all this work. There are advantages and disadvantages to setting the display mode in this manner. The advantage is that if your game requires a specific display mode, your game will run on platforms that do not support your requirements. It also makes life easier when you're getting something started, it is always easy to go back later and make the mode selection a little more particular. The disadvantage is that what you request is not always what you will get. There is also a performance penalty when the display mode must be emulated. This tutorial will help you understand the different methods for querying the platforms display capabilities, and setting the display mode for your game. Setting Basics -------------- The first thing to learn about is how to actually set the current display mode. The display mode may be set at any time after the :mod:`pygame.display` module has been initialized. If you have previously set the display mode, setting it again will change the current mode. Setting the display mode is handled with the function :func:`pygame.display.set_mode((width, height), flags, depth) `. If the width and height of the new display mode is not passed, the created surface will have the same size as the current screen resolution. If only the width or height is set to 0, the surface will have the same respective width or height as the screen resolution. Note that in older versions of Pygame using a SDL version prior to 1.2.10, not passing in the width and height will raise an exception. The depth flag is the requested bits per pixel for the surface. If the given depth is 8, *pygame* will create a color-mapped surface. When given a higher bit depth, *pygame* will use a packed color mode. Much more information about depths and color modes can be found in the documentation for the display and surface modules. The default value for depth is 0. When given an argument of 0, *pygame* will select the best bit depth to use, usually the same as the system's current bit depth. The flags argument lets you control extra features for the display mode. Again, more information about this is found in the *pygame* reference documents. How to Decide ------------- So how do you select a display mode that is going to work best with your graphic resources and the platform your game is running on? There are several methods for gathering information about the display device. All of these methods must be called after the display module has been initialized, but you likely want to call them before setting the display mode. First, :func:`pygame.display.Info() ` will return a special object type of VidInfo, which can tell you a lot about the graphics driver capabilities. The function :func:`pygame.display.list_modes(depth, flags, display) ` can be used to find the supported graphic modes by the system. :func:`pygame.display.mode_ok((width, height), flags, depth, display) ` takes the same arguments as :func:`set_mode() `, but returns the closest matching bit depth to the one you request. Lastly, :func:`pygame.display.get_driver() ` will return the name of the graphics driver selected by *pygame*. Just remember the golden rule. *Pygame* will work with pretty much any display mode you request. Some display modes will need to be emulated, which will slow your game down, since *pygame* will need to convert every update you make to the "real" display mode. The best bet is to always let *pygame* choose the best bit depth, and convert all your graphic resources to that format when they are loaded. You let *pygame* choose its bit depth by calling :func:`set_mode() ` with no depth argument or a depth of 0, or you can call :func:`mode_ok() ` to find a closest matching bit depth to what you need. When your display mode is windowed, you usually must match the same bit depth as the desktop. When you are fullscreen, some platforms can switch to any bit depth that best suits your needs. You can find the depth of the current desktop if you get a VidInfo object before ever setting your display mode. After setting the display mode, you can find out information about its settings by getting a VidInfo object, or by calling any of the Surface.get* methods on the display surface. Functions --------- These are the routines you can use to determine the most appropriate display mode. You can find more information about these functions in the display module documentation. :func:`pygame.display.mode_ok(size, flags, depth, display) ` This function takes the same arguments as pygame.display.set_mode() with the exclusion of vsync. It returns the best available bit depth for the mode you have described. If this returns zero, then the desired display mode is not available without emulation. :func:`pygame.display.list_modes(depth, flags, display) ` Returns a list of supported display modes with the requested depth, flags, and display. An empty list is returned when there are no modes. The flags argument defaults to :any:`FULLSCREEN `\ . If you specify your own flags without :any:`FULLSCREEN `\ , you will likely get a return value of -1. This means that any display size is fine, since the display will be windowed. Note that the listed modes are sorted largest to smallest. The display index 0 means the default display is used. :func:`pygame.display.get_desktop_sizes() ` This function returns the sizes of the currently configured virtual desktops as a list of (x, y) tuples of integers and should be used to replace many use cases of pygame.display.list_modes() whenever applicable. :func:`pygame.display.Info() ` This function returns an object with many members describing the display device. Printing the VidInfo object will quickly show you all the members and values for this object. :: >>> import pygame.display >>> pygame.display.init() >>> info = pygame.display.Info() >>> print(info) You can test all these flags as simply members of the VidInfo object. Examples -------- Here are some examples of different methods to init the graphics display. They should help you get an idea of how to go about setting your display mode. :: >>> # give me the best depth with a 640 x 480 windowed display >>> pygame.display.set_mode((640, 480)) >>> # give me the biggest 16-bit display available >>> modes = pygame.display.list_modes(16) >>> if not modes: ... print('16-bit not supported') ... else: ... print('Found Resolution:', modes[0]) ... pygame.display.set_mode(modes[0], FULLSCREEN, 16) >>> # need an 8-bit surface, nothing else will do >>> if pygame.display.mode_ok((800, 600), 0, 8) != 8: ... print('Can only work with an 8-bit display, sorry') ... else: ... pygame.display.set_mode((800, 600), 0, 8) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/tut/ImportInit.rst.txt0000644000175100001770000000530714676242340023416 0ustar00runnerdocker.. TUTORIAL:Import and Initialize .. include:: common.txt ******************************************** Pygame Tutorials - Import and Initialize ******************************************** Import and Initialize ===================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Getting pygame imported and initialized is a very simple process. It is also flexible enough to give you control over what is happening. Pygame is a collection of different modules in a single python package. Some of the modules are written in C, and some are written in python. Some modules are also optional, and might not always be present. This is just a quick introduction on what is going on when you import pygame. For a clearer explanation definitely see the pygame examples. Import ------ First we must import the pygame package. Since pygame version 1.4 this has been updated to be much easier. Most games will import all of pygame like this. :: import pygame from pygame.locals import * The first line here is the only necessary one. It imports all the available pygame modules into the pygame package. The second line is optional, and puts a limited set of constants and functions into the global namespace of your script. An important thing to keep in mind is that several pygame modules are optional. For example, one of these is the font module. When you "import pygame", pygame will check to see if the font module is available. If the font module is available it will be imported as "pygame.font". If the module is not available, "pygame.font" will be set to None. This makes it fairly easy to later on test if the font module is available. Init ---- Before you can do much with pygame, you will need to initialize it. The most common way to do this is just make one call. :: pygame.init() This will attempt to initialize all the pygame modules for you. Not all pygame modules need to be initialized, but this will automatically initialize the ones that do. You can also easily initialize each pygame module by hand. For example to only initialize the font module you would just call. :: pygame.font.init() Note that if there is an error when you initialize with "pygame.init()", it will silently fail. When hand initializing modules like this, any errors will raise an exception. Any modules that must be initialized also have a "get_init()" function, which will return true if the module has been initialized. It is safe to call the init() function for any module more than once. Quit ---- Modules that are initialized also usually have a quit() function that will clean up. There is no need to explicitly call these, as pygame will cleanly quit all the initialized modules when python finishes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9831119 pygame-2.6.1/docs/generated/_sources/tut/MakeGames.rst.txt0000644000175100001770000001357414676242340023157 0ustar00runnerdocker.. TUTORIAL:Tom Chance's Making Games Tutorial .. include:: common.txt **************************** Making Games With Pygame **************************** Making Games With Pygame ======================== .. toctree:: :hidden: :glob: tom_games2 tom_games3 tom_games4 tom_games5 tom_games6 Table of Contents ----------------- \1. :ref:`Introduction ` \1.1. :ref:`A note on coding styles ` \2. :ref:`Revision: Pygame fundamentals ` \2.1. :ref:`The basic pygame game ` \2.2. :ref:`Basic pygame objects ` \2.3. :ref:`Blitting ` \2.4. :ref:`The event loop ` \2.5. :ref:`Ta-da! ` \3. :ref:`Kicking things off ` \3.1. :ref:`The first lines, and loading modules ` \3.2. :ref:`Resource handling functions ` \4. :ref:`Game object classes ` \4.1. :ref:`A simple ball class ` \4.1.1. :ref:`Diversion 1: Sprites ` \4.1.2. :ref:`Diversion 2: Vector physics ` \5. :ref:`User-controllable objects ` \5.1. :ref:`A simple bat class ` \5.1.1. :ref:`Diversion 3: Pygame events ` \6. :ref:`Putting it all together ` \6.1. :ref:`Let the ball hit sides ` \6.2. :ref:`Let the ball hit bats ` \6.3. :ref:`The Finished product ` .. _makegames-1: 1. Introduction --------------- First of all, I will assume you have read the :doc:`Line By Line Chimp ` tutorial, which introduces the basics of Python and pygame. Give it a read before reading this tutorial, as I won't bother repeating what that tutorial says (or at least not in as much detail). This tutorial is aimed at those who understand how to make a ridiculously simple little "game", and who would like to make a relatively simple game like Pong. It introduces you to some concepts of game design, some simple mathematics to work out ball physics, and some ways to keep your game easy to maintain and expand. All the code in this tutorial works toward implementing `TomPong `_, a game I've written. By the end of the tutorial, you should not only have a firmer grasp of pygame, but you should also understand how TomPong works, and how to make your own version. Now, for a brief recap of the basics of pygame. A common method of organising the code for a game is to divide it into the following six sections: - **Load modules** which are required in the game. Standard stuff, except that you should remember to import the pygame local names as well as the pygame module itself - **Resource handling classes**; define some classes to handle your most basic resources, which will be loading images and sounds, as well as connecting and disconnecting to and from networks, loading save game files, and any other resources you might have. - **Game object classes**; define the classes for your game object. In the pong example, these will be one for the player's bat (which you can initialise multiple times, one for each player in the game), and one for the ball (which can again have multiple instances). If you're going to have a nice in-game menu, it's also a good idea to make a menu class. - **Any other game functions**; define other necessary functions, such as scoreboards, menu handling, etc. Any code that you could put into the main game logic, but that would make understanding said logic harder, should be put into its own function. So as plotting a scoreboard isn't game logic, it should be moved into a function. - **Initialise the game**, including the pygame objects themselves, the background, the game objects (initialising instances of the classes) and any other little bits of code you might want to add in. - **The main loop**, into which you put any input handling (i.e. watching for users hitting keys/mouse buttons), the code for updating the game objects, and finally for updating the screen. Every game you make will have some or all of those sections, possibly with more of your own. For the purposes of this tutorial, I will write about how TomPong is laid out, and the ideas I write about can be transferred to almost any kind of game you might make. I will also assume that you want to keep all of the code in a single file, but if you're making a reasonably large game, it's often a good idea to source certain sections into module files. Putting the game object classes into a file called ``objects.py``, for example, can help you keep game logic separate from game objects. If you have a lot of resource handling code, it can also be handy to put that into ``resources.py``. You can then :code:`from objects,resources import *` to import all of the classes and functions. .. _makegames-1-1: 1.1. A note on coding styles ---------------------------- The first thing to remember when approaching any programming project is to decide on a coding style, and stay consistent. Python solves a lot of the problems because of its strict interpretation of whitespace and indentation, but you can still choose the size of your indentations, whether you put each module import on a new line, how you comment code, etc. You'll see how I do all of this in the code examples; you needn't use my style, but whatever style you adopt, use it all the way through the program code. Also try to document all of your classes, and comment on any bits of code that seem obscure, though don't start commenting the obvious. I've seen plenty of people do the following:: player1.score += scoreup # Add scoreup to player1 score The worst code is poorly laid out, with seemingly random changes in style, and poor documentation. Poor code is not only annoying for other people, but it also makes it difficult for you to maintain. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_sources/tut/MoveIt.rst.txt0000644000175100001770000006125114676242340022523 0ustar00runnerdocker.. TUTORIAL:Help! How Do I Move An Image? .. include:: common.txt **************************************************** Pygame Tutorials - Help! How Do I Move An Image? **************************************************** Help! How Do I Move An Image? ============================= .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Many people new to programming and graphics have a hard time figuring out how to make an image move around the screen. Without understanding all the concepts, it can be very confusing. You're not the first person to be stuck here, I'll do my best to take things step by step. We'll even try to end with methods of keeping your animations efficient. Note that we won't be teaching you to program with python in this article, just introduce you to some of the basics with pygame. Just Pixels On The Screen ------------------------- Pygame has a display Surface. This is basically an image that is visible on the screen, and the image is made up of pixels. The main way you change these pixels is by calling the blit() function. This copies the pixels from one image onto another. This is the first thing to understand. When you blit an image onto the screen, you are simply changing the color of the pixels on the screen. Pixels aren't added or moved, we just change the colors of the pixels already on the screen. These images you blit to the screen are also Surfaces in pygame, but they are in no way connected to the display Surface. When they are blitted to the screen they are copied into the display, but you still have a unique copy of the original. With this brief description. Perhaps you can already understand what is needed to "move" an image. We don't actually move anything at all. We simply blit the image in a new position. But before we draw the image in the new position, we'll need to "erase" the old one. Otherwise the image will be visible in two places on the screen. By rapidly erasing the image and redrawing it in a new place, we achieve the "illusion" of movement. Through the rest of this tutorial we will break this process down into simpler steps. Even explaining the best ways to have multiple images moving around the screen. You probably already have questions. Like, how do we "erase" the image before drawing it in a new position? Perhaps you're still totally lost? Well hopefully the rest of this tutorial can straighten things out for you. Let's Go Back A Step -------------------- Perhaps the concept of pixels and images is still a little foreign to you? Well good news, for the next few sections we are going to use code that does everything we want, it just doesn't use pixels. We're going to create a small python list of 6 numbers, and imagine it represents some fantastic graphics we could see on the screen. It might actually be surprising how closely this represents exactly what we'll later be doing with real graphics. So let's begin by creating our screen list and fill it with a beautiful landscape of 1s and 2s. :: >>> screen = [1, 1, 2, 2, 2, 1] >>> print(screen) [1, 1, 2, 2, 2, 1] Now we've created our background. It's not going to be very exciting unless we also draw a player on the screen. We'll create a mighty hero that looks like the number 8. Let's stick him near the middle of the map and see what it looks like. :: >>> screen[3] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] This might have been as far as you've gotten if you jumped right in doing some graphics programming with pygame. You've got some nice looking stuff on the screen, but it cannot move anywhere. Perhaps now that our screen is just a list of numbers, it's easier to see how to move him? Making The Hero Move -------------------- Before we can start moving the character. We need to keep track of some sort of position for him. In the last section when we drew him, we just picked an arbitrary position. Let's do it a little more officially this time. :: >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] Now it is pretty easy to move him to a new position. We simply change the value of playerpos, and draw him on the screen again. :: >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 8, 2, 1] Whoops. Now we can see two heroes. One in the old position, and one in his new position. This is exactly the reason we need to "erase" the hero in his old position before we draw him in the new position. To erase him, we need to change that value in the list back to what it was before the hero was there. That means we need to keep track of the values on the screen before the hero replaced them. There's several ways you could do this, but the easiest is usually to keep a separate copy of the screen background. This means we need to make some changes to our little game. Creating A Map -------------- What we want to do is create a separate list we will call our background. We will create the background so it looks like our original screen did, with 1s and 2s. Then we will copy each item from the background to the screen. After that we can finally draw our hero back onto the screen. :: >>> background = [1, 1, 2, 2, 2, 1] >>> screen = [0]*6 #a new blank screen >>> for i in range(6): ... screen[i] = background[i] >>> print(screen) [1, 1, 2, 2, 2, 1] >>> playerpos = 3 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 2, 8, 2, 1] It may seem like a lot of extra work. We're no farther off than we were before the last time we tried to make him move. But this time we have the extra information we need to move him properly. Making The Hero Move (Take 2) ----------------------------- This time it will be easy to move the hero around. First we will erase the hero from his old position. We do this by copying the correct value from the background onto the screen. Then we will draw the character in his new position on the screen >>> print(screen) [1, 1, 2, 8, 2, 1] >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 1, 8, 2, 2, 1] There it is. The hero has moved one space to the left. We can use this same code to move him to the left again. :: >>> screen[playerpos] = background[playerpos] >>> playerpos = playerpos - 1 >>> screen[playerpos] = 8 >>> print(screen) [1, 8, 2, 2, 2, 1] Excellent! This isn't exactly what you'd call smooth animation. But with a couple small changes, we'll make this work directly with graphics on the screen. Definition: "blit" ------------------ In the next sections we will transform our program from using lists to using real graphics on the screen. When displaying the graphics we will use the term **blit** frequently. If you are new to doing graphics work, you are probably unfamiliar with this common term. BLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just *"assigning"* pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image. Other graphics libraries will use the word *bitblt*, or just *blt*, but they are talking about the same thing. It is basically copying memory from one place to another. Actually, it is a bit more advanced than straight copying of memory, since it needs to handle things like pixel formats, clipping, and scanline pitches. Advanced blitters can also handle things like transparency and other special effects. Going From The List To The Screen --------------------------------- To take the code we see in the above to examples and make them work with pygame is very straightforward. We'll pretend we have loaded some pretty graphics and named them "terrain1", "terrain2", and "hero". Where before we assigned numbers to a list, we now blit graphics to the screen. Another big change, instead of using positions as a single index (0 through 5), we now need a two dimensional coordinate. We'll pretend each of the graphics in our game is 10 pixels wide. :: >>> background = [terrain1, terrain1, terrain2, terrain2, terrain2, terrain1] >>> screen = create_graphics_screen() >>> for i in range(6): ... screen.blit(background[i], (i*10, 0)) >>> playerpos = 3 >>> screen.blit(playerimage, (playerpos*10, 0)) Hmm, that code should seem very familiar, and hopefully more importantly; the code above should make a little sense. Hopefully my illustration of setting simple values in a list shows the similarity of setting pixels on the screen (with blit). The only part that's really extra work is converting the player position into coordinates on the screen. For now we just use a crude :code:`(playerpos*10, 0)` , but we can certainly do better than that. Now let's move the player image over a space. This code should have no surprises. :: >>> screen.blit(background[playerpos], (playerpos*10, 0)) >>> playerpos = playerpos - 1 >>> screen.blit(playerimage, (playerpos*10, 0)) There you have it. With this code we've shown how to display a simple background with a hero's image on it. Then we've properly moved that hero one space to the left. So where do we go from here? Well for one the code is still a little awkward. First thing we'll want to do is find a cleaner way to represent the background and player position. Then perhaps a bit of smoother, real animation. Screen Coordinates ------------------ To position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination. Pygame comes with a convenient container for these coordinates, it is a Rect. The Rect basically represents a rectangular area in these coordinates. It has topleft corner and a size. The Rect comes with a lot of convenient methods which help you move and position them. In our next examples we will represent the positions of our objects with the Rects. Also know that many functions in pygame expect Rect arguments. All of these functions can also accept a simple tuple of 4 elements (left, top, width, height). You aren't always required to use these Rect objects, but you will mainly want to. Also, the blit() function can accept a Rect as its position argument, it simply uses the topleft corner of the Rect as the real position. Changing The Background ----------------------- In all our previous sections, we've been storing the background as a list of different types of ground. That is a good way to create a tile-based game, but we want smooth scrolling. To make that a little easier, we're going to change the background into a single image that covers the whole screen. This way, when we want to "erase" our objects (before redrawing them) we only need to blit the section of the erased background onto the screen. By passing an optional third Rect argument to blit, we tell blit to only use that subsection of the source image. You'll see that in use below as we erase the player image. Also note, now when we finish drawing to the screen, we call pygame.display.update() which will show everything we've drawn onto the screen. Smooth Movement --------------- To make something appear to move smoothly, we only want to move it a couple pixels at a time. Here is the code to make an object move smoothly across the screen. Based on what we already now know, this should look pretty simple. :: >>> screen = create_screen() >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = load_player_image() >>> background = load_background_image() >>> screen.blit(background, (0, 0)) #draw the background >>> position = player.get_rect() >>> screen.blit(player, position) #draw the player >>> pygame.display.update() #and show it all >>> for x in range(100): #animate 100 frames ... screen.blit(background, position, position) #erase ... position = position.move(2, 0) #move player ... screen.blit(player, position) #draw new player ... pygame.display.update() #and show it all ... clock.tick(60) #update 60 times per second There you have it. This is all the code that is needed to smoothly animate an object across the screen. We can even use a pretty background character. Another benefit of doing the background this way, the image for the player can have transparency or cutout sections and it will still draw correctly over the background (a free bonus). We also throw in a call to pygame.time.Clock() to grab the clock element. With it, we can call clock.tick() to set the framerate in frames per second. This slows down our program a little, otherwise it might run so fast you might not see it. So, What Next? -------------- Well there we have it. Hopefully this article has done everything it promised to do. But, at this point the code really isn't ready for the next best-selling game. How do we easily have multiple moving objects? What exactly are those mysterious functions like load_player_image()? We also need a way to get simple user input, and loop for more than 100 frames. We'll take the example we have here, and turn it into an object oriented creation that would make momma proud. First, The Mystery Functions ---------------------------- Full information on these types of functions can be found in other tutorials and reference. The pygame.image module has a load() function which will do what we want. The lines to load the images should become this. :: >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('liquid.bmp').convert() We can see that's pretty simple, the load function just takes a filename and returns a new Surface with the loaded image. After loading we make a call to the Surface method, convert(). Convert returns us a new Surface of the image, but now converted to the same pixel format as our display. Since the images will be the same format at the screen, they will blit very quickly. If we did not convert, the blit() function is slower, since it has to convert from one type of pixel to another as it goes. You may also have noticed that both the load() and convert() return new Surfaces. This means we're really creating two Surfaces on each of these lines. In other programming languages, this results in a memory leak (not a good thing). Fortunately Python is smart enough to handle this, and pygame will properly clean up the Surface we end up not using. The other mystery function we saw in the above example was create_screen(). In pygame it is simple to create a new window for graphics. The code to create a 640x480 surface is below. By passing no other arguments, pygame will just pick the best color depth and pixel format for us. :: >>> screen = pygame.display.set_mode((640, 480)) Handling Some Input ------------------- We desperately need to change the main loop to look for any user input, (like when the user closes the window). We need to add "event handling" to our program. All graphical programs use this Event Based design. The program gets events like "keyboard pressed" or "mouse moved" from the computer. Then the program responds to the different events. Here's what the code should look like. Instead of looping for 100 frames, we'll keep looping until the user asks us to stop. :: >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... move_and_draw_all_game_objects() What this code simply does is, first loop forever, then check if there are any events from the user. We exit the program if the user presses the close button on the window. After we've checked all the events we move and draw our game objects. (We'll also erase them before they move, too) Moving Multiple Images ---------------------- Here's the part where we're really going to change things around. Let's say we want 10 different images moving around on the screen. A good way to handle this is to use python's classes. We'll create a class that represents our game object. This object will have a function to move itself, and then we can create as many as we like. The functions to draw and move the object need to work in a way where they only move one frame (or one step) at a time. Here's the python code to create our class. :: >>> class GameObject: ... def __init__(self, image, height, speed): ... self.speed = speed ... self.image = image ... self.pos = image.get_rect().move(0, height) ... def move(self): ... self.pos = self.pos.move(self.speed, 0) ... if self.pos.right > 600: ... self.pos.left = 0 So we have two functions in our class. The init function constructs our object. It positions the object and sets its speed. The move method moves the object one step. If it's gone too far, it moves the object back to the left. Putting It All Together ----------------------- Now with our new object class, we can put together the entire game. Here is what the main function for our program will look like. :: >>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> for x in range(10): #create 10 objects ... o = GameObject(player, x*40, x) ... objects.append(o) >>> while True: ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60) And there it is. This is the code we need to animate 10 objects on the screen. The only point that might need explaining is the two loops we use to clear all the objects and draw all the objects. In order to do things properly, we need to erase all the objects before drawing any of them. In our sample here it may not matter, but when objects are overlapping, using two loops like this becomes important. Preparing for Improved User Input --------------------------------- With all keyboard input terminating the program, that's not very interactive. Let's add some extra user input! First we should create a unique character that the player will control. We can do that in much the same way we created the other movable entities. Let's call the player object p. We can already move any object, but, a player should have more input than simply moving right. To accommodate this, let's revamp our move function under our GameObject class. :: >>> def move(self, up=False, down=False, left=False, right=False): ... if right: ... self.pos.right += self.speed ... if left: ... self.pos.right -= self.speed ... if down: ... self.pos.top += self.speed ... if up: ... self.pos.top -= self.speed ... if self.pos.right > WIDTH: ... self.pos.left = 0 ... if self.pos.top > HEIGHT-SPRITE_HEIGHT: ... self.pos.top = 0 ... if self.pos.right < SPRITE_WIDTH: ... self.pos.right = WIDTH ... if self.pos.top < 0: ... self.pos.top = HEIGHT-SPRITE_HEIGHT There's certainly a lot more going on here, so let's take it one step at a time. First, we've added some default values into the move function, declared as up, down, left, and right. These booleans will allow us to specifically select a direction that the object is moving in. The first part, where we go through and check True for each variable, is where we will add to the position of the object, much like before. Right controls horizontal, and top controls vertical positions. Additionally, we've removed the magic number present previously, and replaced it with the constants WIDTH, HEIGHT, SPRITE_WIDTH, and SPRITE_HEIGHT. These values represent the screen width and height, along with the width and height of the object displayed on the screen. The second part, where the position is being checked, ensures that the position is within the confines of our screen. With this in place, we need to make sure that when one of our other objects calls move, we set right to true. Adding the User Input --------------------- We've already seen that pygame has event handling, and we know that KEYDOWN is an event in this loop. We could, under KEYDOWN, assert the key press matches an arrow key, where we would then call move. However, this movement will only occur once every time a key is pressed, and it therefore will be extremely choppy and unpleasant. For this, we can use pygame.key.get_pressed(), which returns a list of all keys, and whether or not they are currently pressed. Since we want these key presses to be maintained whether an event is currently happening or not, we should put it outside of the main event handling loop, but still within our game loop. Our functionality will look like this. :: >>> keys = pygame.key.get_pressed() >>> if keys[pygame.K_UP]: ... p.move(up=True) >>> if keys[pygame.K_DOWN]: ... p.move(down=True) >>> if keys[pygame.K_LEFT]: ... p.move(left=True) >>> if keys[pygame.K_RIGHT]: ... p.move(right=True) We simply get our list of keys pressed, called keys. We can then check the index at the key code position to see if it is held down. For more key codes, I recommend checking out the documentation on pygame.key. When up is held, we move our object, p, up. When down is held, we move down. Rinse and repeat for all cases, and we're good to go! Putting it all Together One More time ------------------------------------- Now that we're finished with the player functionality, let's take one last look to make sure we understand everything. :: >>> screen = pygame.display.set_mode((640, 480)) >>> clock = pygame.time.Clock() #get a pygame clock object >>> player = pygame.image.load('player.bmp').convert() >>> entity = pygame.image.load('alien1.bmp').convert() >>> background = pygame.image.load('background.bmp').convert() >>> screen.blit(background, (0, 0)) >>> objects = [] >>> p = GameObject(player, 10, 3) #create the player object >>> for x in range(10): #create 10 objects ... o = GameObject(entity, x*40, x) ... objects.append(o) >>> while True: ... screen.blit(background, p.pos, p.pos) ... for o in objects: ... screen.blit(background, o.pos, o.pos) ... keys = pygame.key.get_pressed() ... if keys[pygame.K_UP]: ... p.move(up=True) ... if keys[pygame.K_DOWN]: ... p.move(down=True) ... if keys[pygame.K_LEFT]: ... p.move(left=True) ... if keys[pygame.K_RIGHT]: ... p.move(right=True) ... for event in pygame.event.get(): ... if event.type == pygame.QUIT: ... sys.exit() ... screen.blit(p.image, p.pos) ... for o in objects: ... o.move() ... screen.blit(o.image, o.pos) ... pygame.display.update() ... clock.tick(60) A few things not mentioned earlier: we load in a second image and call it entity, and we use that for all objects that aren't the player, which uses the player image defined earlier. And that's all there is to it! Now we have a fully functional player object that is controlled using the arrow keys! You Are On Your Own From Here ----------------------------- So what would be next on your road to learning? Well first playing around with this example a bit. The full running version of this example is available in the pygame examples directory. It is the example named :func:`moveit.py ` . Take a look at the code and play with it, run it, learn it. Things you may want to work on is maybe having more than one type of object. Finding a way to cleanly "delete" objects when you don't want to show them any more. Also updating the display.update() call to pass a list of the areas on-screen that have changed. There are also other tutorials and examples in pygame that cover these issues. So when you're ready to keep learning, keep on reading. :-) Lastly, you can feel free to come to the pygame mailing list or chatroom with any questions on this stuff. There's always folks on hand who can help you out with this sort of business. Lastly, have fun, that's what games are for! ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_sources/tut/PygameIntro.rst.txt0000644000175100001770000003167014676242340023560 0ustar00runnerdocker.. TUTORIAL:Pygame Python Introduction .. include:: common.txt **************** Pygame Intro **************** Python Pygame Introduction ========================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org This article is an introduction to the `pygame library `_ for `Python programmers `_. The original version appeared in the `PyZine volume 1 issue 3 `_. This version contains minor revisions, to create an all-around better article. Pygame is a Python extension library that wraps the `SDL `_ library and its helpers. HISTORY ------- Pygame started in the summer of 2000. Being a C programmer of many years, I discovered both Python and SDL at about the same time. You are already familiar with Python, which was at version 1.5.2. You may need an introduction to SDL, which is the Simple DirectMedia Layer. Created by Sam Lantinga, SDL is a cross-platform C library for controlling multimedia, comparable to DirectX. It has been used for hundreds of commercial and open source games. I was impressed at how clean and straightforward both projects were and it wasn't long before I realized mixing Python and SDL was an interesting proposal. I discovered a small project already under-way with exactly the same idea, PySDL. Created by Mark Baker, PySDL was a straightforward implementation of SDL as a Python extension. The interface was cleaner than a generic SWIG wrapping, but I felt it forced a "C style" of code. The sudden death of PySDL prompted me to take on a new project of my own. I wanted to put together a project that really took advantage of Python. My goal was to make it easy to do the simple things, and straightforward to do the difficult things. Pygame was started in October, 2000. Six months later pygame version 1.0 was released. TASTE ----- I find the best way to understand a new library is to jump straight into an example. In the early days of pygame, I created a bouncing ball animation with 7 lines of code. Let's take a look at a friendlier version of that same thing. This should be simple enough to follow along, and a complete breakdown follows. .. image:: intro_ball.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("intro_ball.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill("black") screen.blit(ball, ballrect) pygame.display.flip() This is as simple as you can get for a bouncing animation. First we see importing and initializing pygame is nothing noteworthy. The ``import pygame`` imports the package with all the available pygame modules. The call to ``pygame.init()`` initializes each of these modules. Make sure the gif file of the bouncing ball is in the same folder as the code block. On :clr:`line 4` we set the size of the display window, for best results you can change these numbers to match your own monitor's resolution. On :clr:`line 8` we create a graphical window with the call to ``pygame.display.set_mode()``. Pygame and SDL make this easy by defaulting to the best graphics modes for the graphics hardware. You can override the mode and SDL will compensate for anything the hardware cannot do. Pygame represents images as *Surface* objects. The ``display.set_mode()`` function creates a new *Surface* object that represents the actual displayed graphics. Any drawing you do to this Surface will become visible on the monitor. At :clr:`line 10` we load our ball image. Pygame supports a variety of image formats through the SDL_image library, including BMP, JPG, PNG, TGA, and GIF. The ``pygame.image.load()`` function returns us a Surface with the ball data. The Surface will keep any colorkey or alpha transparency from the file. After loading the ball image we create a variable named ballrect. Pygame comes with a convenient utility object type named :class:`Rect `, which represents a rectangular area. Later, in the animation part of the code, we will see what the *Rect* objects can do. At this point, :clr:`line 13`, our program is initialized and ready to run. Inside an infinite loop we check for user input, move the ball, and then draw the ball. If you are familiar with GUI programming, you have had experience with events and event loops. In pygame this is no different, we check if a *QUIT* event has happened. If so we simply exit the program, pygame will ensure everything is cleanly shutdown. It is time to update our position for the ball. :clr:`Lines 17` moves the ballrect variable by the current speed. :clr:`Lines 18 thru 21` reverse the speed if the ball has moved outside the screen. Not exactly Newtonian physics, but it is all we need. On :clr:`line 23` we erase the screen by filling it with a black RGB color. If you have never worked with animations this may seem strange. You may be asking "Why do we need to erase anything, why don't we just move the ball on the screen?" That is not quite the way computer animation works. Animation is nothing more than a series of single images, which when displayed in sequence do a very good job of fooling the human eye into seeing motion. The screen is just a single image that the user sees. If we did not take the time to erase the ball from the screen, we would actually see a "trail" of the ball as we continuously draw the ball in its new positions. On :clr:`line 24` we draw the ball image onto the screen. Drawing of images is handled by the :meth:`Surface.blit() ` method. A blit basically means copying pixel colors from one image to another. We pass the blit method a source :class:`Surface ` to copy from, and a position to place the source onto the destination. The last thing we need to do is actually update the visible display. Pygame manages the display with a double buffer. When we are finished drawing we call the :func:`pygame.display.flip()` method. This makes everything we have drawn on the screen Surface become visible. This buffering makes sure we only see completely drawn frames on the screen. Without it, the user would see the half completed parts of the screen as they are being created. That concludes this short introduction to pygame. Pygame also has modules to do things like input handling for the keyboard, mouse, and joystick. It can mix audio and decode streaming music. With the *Surfaces* you can draw simple shapes, rotate and scale the picture, and even manipulate the pixels of an image in realtime as numpy arrays. Pygame also has the ability to act as a cross platform display layer for PyOpenGL. Most of the pygame modules are written in C, few are actually done in Python. The pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting. PYTHON AND GAMING ----------------- "Is Python suitable for gaming?" The answer is, "It depends on the game." Python is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer. .. image:: intro_blade.jpg :class: inlined-right Over the past several years there has been an interesting trend in game development, the move towards higher level languages. Usually a game is split into two major parts. The game engine, which must be as fast as possible, and the game logic, which makes the engine actually do something. It wasn't long ago when the engine of a game was written in assembly, with portions written in C. Nowadays, C has moved to the game engine, while often the game itself is written in higher level scripting languages. Games like Quake3 and Unreal run these scripts as portable bytecode. In early 2001, developer Rebel Act Studios finished their game, Severance: Blade of Darkness. Using their own custom 3D engine, the rest of the game is written with Python. The game is a bloody action 3rd person perspective fighter. You control medieval warriors into intricate decapitating combination attacks while exploring dungeons and castles. You can download third party add-ons for this game, and find they are nothing more than Python source files. More recently, Python has been used in a variety of games like Freedom Force, and Humungous' Backyard Sports Series. .. image:: intro_freedom.jpg :class: inlined-right Pygame and SDL serve as an excellent C engine for 2D games. Games will still find the largest part of their runtime is spent inside SDL handling the graphics. SDL can take advantage of graphics hardware acceleration. Enabling this can change a game from running around 40 frames per second to over 200 frames per second. When you see your Python game running at 200 frames per second, you realize that Python and games can work together. It is impressive how well both Python and SDL work on multiple platforms. For example, in May of 2001 I released my own full pygame project, SolarWolf, an arcade style action game. One thing that has surprised me is that one year later there has been no need for any patches, bug fixes, or updates. The game was developed entirely on windows, but runs on Linux, Mac OSX, and many Unixes without any extra work on my end. Still, there are very clear limitations. The best way to manage hardware accelerated graphics is not always the way to get fastest results from software rendering. Hardware support is not available on all platforms. When a game gets more complex, it often must commit to one or the other. SDL has some other design limitations, things like full screen scrolling graphics can quickly bring your game down to unplayable speeds. While SDL is not suitable for all types of games, remember companies like Loki have used SDL to run a wide variety of retail quality titles. Pygame is fairly low-level when it comes to writing games. You'll quickly find yourself needing to wrap common functions into your own game environment. The great thing about this is there is nothing inside pygame to get in your way. Your program is in full control of everything. The side effect of that is you will find yourself borrowing a lot of code to get a more advanced framework put together. You'll need a better understanding of what you are doing. CLOSING ------- Developing games is very rewarding, there is something exciting about being able to see and interact with the code you've written. Pygame currently has almost 30 other projects using it. Several of them are ready to play now. You may be surprised to visit the pygame website, and see what other users have been able to do with Python. One thing that has caught my attention is the amount of people coming to Python for the first time to try game development. I can see why games are a draw for new programmers, but it can be difficult since creating games requires a firmer understanding of the language. I've tried to support this group of users by writing many examples and pygame tutorials for people new to these concepts. In the end, my advice is to keep it simple. I cannot stress this enough. If you are planning to create your first game, there is a lot to learn. Even a simpler game will challenge your designs, and complex games don't necessarily mean fun games. When you understand Python, you can use pygame to create a simple game in only one or two weeks. From there you'll need a surprising amount of time to add the polish to make that into a full presentable game. Pygame Modules Overview ^^^^^^^^^^^^^^^^^^^^^^^ .. csv-table:: :class: more-to-explore :widths: 20, 50 :mod:`cdrom `, "playback" :mod:`cursors `, "load cursor images, includes standard cursors" :mod:`display `, "control the display window or screen" :mod:`draw `, "draw simple shapes onto a Surface" :mod:`event `, "manage events and the event queue" :mod:`font `, "create and render TrueType fonts" :mod:`image `, "save and load images" :mod:`joystick `, "manage joystick devices" :mod:`key `, "manage the keyboard" :mod:`mouse `, "manage the mouse" :mod:`sndarray `, "manipulate sounds with numpy" :mod:`surfarray `, "manipulate images with numpy" :mod:`time `, "control timing" :mod:`transform `, "scale, rotate, and flip images" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_sources/tut/SpriteIntro.rst.txt0000644000175100001770000005166714676242340023614 0ustar00runnerdocker.. TUTORIAL: Sprite Module Introduction .. include:: common.txt ************************************************* Pygame Tutorials - Sprite Module Introduction ************************************************* Sprite Module Introduction ========================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Pygame version 1.3 comes with a new module, ``pygame.sprite``. This module is written in Python and includes some higher-level classes to manage your game objects. By using this module to its full potential, you can easily manage and draw your game objects. The sprite classes are very optimized, so it's likely your game will run faster with the sprite module than without. The sprite module is also meant to be very generic. It turns out you can use it with nearly any type of gameplay. All this flexibility comes with a slight penalty, it needs a little understanding to properly use it. The :mod:`reference documentation ` for the sprite module can keep you running, but you'll probably need a bit more explanation of how to use ``pygame.sprite`` in your own game. Several of the pygame examples (like "chimp" and "aliens") have been updated to use the sprite module. You may want to look into those first to see what this sprite module is all about. The chimp module even has its own line-by-line tutorial, which may help get more understanding of programming with python and pygame. Note that this introduction will assume you have a bit of experience programming with python, and are somewhat familiar with the different parts of creating a simple game. In this tutorial the word "reference" is occasionally used. This represents a python variable. Variables in python are references, so you can have several variables all pointing to the same object. History Lesson -------------- The term "sprite" is a holdover from older computer and game machines. These older boxes were unable to draw and erase normal graphics fast enough for them to work as games. These machines had special hardware to handle game like objects that needed to animate very quickly. These objects were called "sprites" and had special limitations, but could be drawn and updated very fast. They usually existed in special overlay buffers in the video. These days computers have become generally fast enough to handle sprite like objects without dedicated hardware. The term sprite is still used to represent just about anything in a 2D game that is animated. The Classes ----------- The sprite module comes with two main classes. The first is :class:`Sprite `, which should be used as a base class for all your game objects. This class doesn't really do anything on its own, it just includes several functions to help manage the game object. The other type of class is :class:`Group `. The ``Group`` class is a container for different ``Sprite`` objects. There are actually several different types of group classes. Some of the ``Groups`` can draw all the elements they contain, for example. This is all there really is to it. We'll start with a description of what each type of class does, and then discuss the proper ways to use these two classes. The Sprite Class ---------------- As mentioned before, the Sprite class is designed to be a base class for all your game objects. You cannot really use it on its own, as it only has several methods to help it work with the different ``Group`` classes. The sprite keeps track of which groups it belongs to. The class constructor (``__init__`` method) takes an argument of a ``Group`` (or list of ``Groups``) the ``Sprite`` instance should belong to. You can also change the ``Group`` membership for the ``Sprite`` with the :meth:`add() ` and :meth:`remove() ` methods. There is also a :meth:`groups() ` method, which returns a list of the current groups containing the sprite. When using your Sprite classes it's best to think of them as "valid" or "alive" when they are belonging to one or more ``Groups``. When you remove the instance from all groups pygame will clean up the object. (Unless you have your own references to the instance somewhere else.) The :meth:`kill() ` method removes the sprite from all groups it belongs to. This will cleanly delete the sprite object. If you've put some little games together, you'll know sometimes cleanly deleting a game object can be tricky. The sprite also comes with an :meth:`alive() ` method, which returns true if it is still a member of any groups. The Group Class --------------- The ``Group`` class is just a simple container. Similar to the sprite, it has an :meth:`add() ` and :meth:`remove() ` method which can change which sprites belong to the group. You also can pass a sprite or list of sprites to the constructor (``__init__()`` method) to create a ``Group`` instance that contains some initial sprites. The ``Group`` has a few other methods like :meth:`empty() ` to remove all sprites from the group and :meth:`copy() ` which will return a copy of the group with all the same members. Also the :meth:`has() ` method will quickly check if the ``Group`` contains a sprite or list of sprites. The other function you will use frequently is the :meth:`sprites() ` method. This returns an object that can be looped on to access every sprite the group contains. Currently this is just a list of the sprites, but in later version of python this will likely use iterators for better performance. As a shortcut, the ``Group`` also has an :meth:`update() ` method, which will call an ``update()`` method on every sprite in the group. Passing the same arguments to each one. Usually in a game you need some function that updates the state of a game object. It's very easy to call your own methods using the ``Group.sprites()`` method, but this is a shortcut that's used enough to be included. Also note that the base ``Sprite`` class has a "dummy" ``update()`` method that takes any sort of arguments and does nothing. Lastly, the Group has a couple other methods that allow you to use it with the builtin ``len()`` function, getting the number of sprites it contains, and the "truth" operator, which allows you to do "if mygroup:" to check if the group has any sprites. Mixing Them Together -------------------- At this point the two classes seem pretty basic. Not doing a lot more than you can do with a simple list and your own class of game objects. But there are some big advantages to using the ``Sprite`` and ``Group`` together. A sprite can belong to as many groups as you want. Remember as soon as it belongs to no groups, it will usually be cleared up (unless you have other "non-group" references to that object). The first big thing is a fast simple way to categorize sprites. For example, say we had a Pacman-like game. We could make separate groups for the different types of objects in the game. Ghosts, Pac, and Pellets. When Pac eats a power pellet, we can change the state for all ghost objects by effecting everything in the Ghost group. This is quicker and simpler than looping through a list of all the game objects and checking which ones are ghosts. Adding and removing groups and sprites from each other is a very fast operation, quicker than using lists to store everything. Therefore you can very efficiently change group memberships. Groups can be used to work like simple attributes for each game object. Instead of tracking some attribute like "close_to_player" for a bunch of enemy objects, you could add them to a separate group. Then when you need to access all the enemies that are near the player, you already have a list of them, instead of going through a list of all the enemies, checking for the "close_to_player" flag. Later on your game could add multiple players, and instead of adding more "close_to_player2", "close_to_player3" attributes, you can easily add them to different groups for each player. Another important benefit of using the ``Sprites`` and ``Groups`` is that the groups cleanly handle the deleting (or killing) of game objects. In a game where many objects are referencing other objects, sometimes deleting an object can be the hardest part, since it can't go away until it is not referenced by anyone. Say we have an object that is "chasing" another object. The chaser can keep a simple Group that references the object (or objects) it is chasing. If the object being chased happens to be destroyed, we don't need to worry about notifying the chaser to stop chasing. The chaser can see for itself that its group is now empty, and perhaps find a new target. Again, the thing to remember is that adding and removing sprites from groups is a very cheap/fast operation. You may be best off by adding many groups to contain and organize your game objects. Some could even be empty for large portions of the game, there isn't any penalties for managing your game like this. The Many Group Types -------------------- The above examples and reasons to use ``Sprites`` and ``Groups`` are only a tip of the iceberg. Another advantage is that the sprite module comes with several different types of ``Groups``. These groups all work just like a regular old ``Group``, but they also have added functionality (or slightly different functionality). Here's a list of the ``Group`` classes included with the sprite module. :class:`Group ` This is the standard "no frills" group mainly explained above. Most of the other ``Groups`` are derived from this one, but not all. :class:`GroupSingle ` This works exactly like the regular ``Group`` class, but it only contains the most recently added sprite. Therefore when you add a sprite to this group, it "forgets" about any previous sprites it had. Therefore it always contains only one or zero sprites. :class:`RenderPlain ` This is a standard group derived from ``Group``. It has a draw() method that draws all the sprites it contains to the screen (or any ``Surface``). For this to work, it requires all sprites it contains to have a "image" and "rect" attributes. It uses these to know what to blit, and where to blit it. :class:`RenderClear ` This is derived from the ``RenderPlain`` group, and adds a method named ``clear()``. This will erase the previous position of all drawn sprites. It uses a background image to fill in the areas where the sprite were. It is smart enough to handle deleted sprites and properly clear them from the screen when the ``clear()`` method is called. :class:`RenderUpdates ` This is the Cadillac of rendering ``Groups``. It is inherited from ``RenderClear``, but changes the ``draw()`` method to also return a list of pygame ``Rects``, which represent all the areas on screen that have been changed. That is the list of different groups available We'll discuss more about these rendering groups in the next section. There's nothing stopping you from creating your own Group classes as well. They are just python code, so you can inherit from one of these and add/change whatever you want. In the future I hope we can add a couple more ``Groups`` to this list. A ``GroupMulti`` which is like the ``GroupSingle``, but can hold up to a given number of sprites (in some sort of circular buffer?). Also a super-render group that can clear the position of the old sprites without needing a background image to do it (by grabbing a copy of the screen before blitting). Who knows really, but in the future we can add more useful classes to this list. The Rendering Groups -------------------- From above we can see there are three different rendering groups. We could probably just get away with the ``RenderUpdates`` one, but it adds overhead not really needed for something like a scrolling game. So we have a couple tools here, pick the right one for the right job. For a scrolling type game, where the background completely changes every frame, we obviously don't need to worry about python's update rectangles in the call to ``display.update()``. You should definitely go with the ``RenderPlain`` group here to manage your rendering. For games where the background is more stationary, you definitely don't want pygame updating the entire screen (since it doesn't need to). This type of game usually involves erasing the old position of each object, then drawing it in a new place for each frame. This way we are only changing what is necessary. Most of the time you will just want to use the ``RenderUpdates`` class here. Since you will also want to pass this list of changes to the ``display.update()`` function. The ``RenderUpdates`` class also does a good job at minimizing overlapping areas in the list of updated rectangles. If the previous position and current position of an object overlap, it will merge them into a single rectangle. Combined with the fact that it properly handles deleted objects, this is one powerful ``Group`` class. If you've written a game that manages the changed rectangles for the objects in a game, you know this is the cause for a lot of messy code in your game. Especially once you start to throw in objects that can be deleted at any time. All this work is reduced to a ``clear()`` and ``draw()`` method with this monster class. Plus with the overlap checking, it is likely faster than when you did it manually. Also note that there's nothing stopping you from mixing and matching these render groups in your game. You should definitely use multiple rendering groups when you want to do layering with your sprites. Also if the screen is split into multiple sections, perhaps each section of the screen should use an appropriate render group? Collision Detection ------------------- The sprite module also comes with two very generic collision detection functions. For more complex games, these really won't work for you, but you can easily grab the source code for them, and modify them as needed. Here's a summary of what they are, and what they do. :func:`spritecollide(sprite, group, dokill, collided = None) -> list ` This checks for collisions between a single sprite and the sprites in a group. It requires a "rect" attribute for all the sprites used. It returns a list of all the sprites that overlap with the first sprite. The "dokill" argument is a boolean argument. If it is true, the function will call the ``kill()`` method on all the sprites. This means the last reference to each sprite is probably in the returned list. Once the list goes away so do the sprites. A quick example of using this in a loop :: >>> for bomb in sprite.spritecollide(player, bombs, 1): ... boom_sound.play() ... Explosion(bomb, 0) This finds all the sprites in the "bomb" group that collide with the player. Because of the "dokill" argument it deletes all the crashed bombs. For each bomb that did collide, it plays a "boom" sound effect, and creates a new ``Explosion`` where the bomb was. (Note, the ``Explosion`` class here knows to add each instance to the appropriate class, so we don't need to store it in a variable, that last line might feel a little "funny" to you python programmers.) :func:`groupcollide(group1, group2, dokill1, dokill2, collided = None) -> dictionary ` This is similar to the ``spritecollide`` function, but a little more complex. It checks for collisions for all the sprites in one group, to the sprites in another. There is a ``dokill`` argument for the sprites in each list. When ``dokill1`` is true, the colliding sprites in ``group1`` will be ``kill()``ed. When ``dokill2`` is true, we get the same results for ``group2``. The dictionary it returns works like this; each key in the dictionary is a sprite from ``group1`` that had a collision. The value for that key is a list of the sprites that it collided with. Perhaps another quick code sample explains it best :: >>> for alien in sprite.groupcollide(aliens, shots, 1, 1).keys(): ... boom_sound.play() ... Explosion(alien, 0) ... kills += 1 This code checks for the collisions between player bullets and all the aliens they might intersect. In this case we only loop over the dictionary keys, but we could loop over the ``values()`` or ``items()`` if we wanted to do something to the specific shots that collided with aliens. If we did loop over the ``values()`` we would be looping through lists that contain sprites. The same sprite may even appear more than once in these different loops, since the same "shot" could have collided against multiple "aliens". Those are the basic collision functions that come with pygame. It should be easy to roll your own that perhaps use something different than the "rect" attribute. Or maybe try to fine-tweak your code a little more by directly effecting the collision object, instead of building a list of the collision? The code in the sprite collision functions is very optimized, but you could speed it up slightly by taking out some functionality you don't need. Common Problems --------------- Currently there is one main problem that catches new users. When you derive your new sprite class with the Sprite base, you **must** call the ``Sprite.__init__()`` method from your own class ``__init__()`` method. If you forget to call the ``Sprite.__init__()`` method, you get a cryptic error, like this :: AttributeError: 'mysprite' instance has no attribute '_Sprite__g' Extending Your Own Classes *(Advanced)* --------------------------------------- Because of speed concerns, the current ``Group`` classes try to only do exactly what they need, and not handle a lot of general situations. If you decide you need extra features, you may want to create your own ``Group`` class. The ``Sprite`` and ``Group`` classes were designed to be extended, so feel free to create your own ``Group`` classes to do specialized things. The best place to start is probably the actual python source code for the sprite module. Looking at the current ``Sprite`` groups should be enough example on how to create your own. For example, here is the source code for a rendering ``Group`` that calls a ``render()`` method for each sprite, instead of just blitting an "image" variable from it. Since we want it to also handle updated areas, we will start with a copy of the original ``RenderUpdates`` group, here is the code:: class RenderUpdatesDraw(RenderClear): """call sprite.draw(screen) to render sprites""" def draw(self, surface): dirty = self.lostsprites self.lostsprites = [] for s, r in self.spritedict.items(): newrect = s.draw(screen) #Here's the big change if r is 0: dirty.append(newrect) else: dirty.append(newrect.union(r)) self.spritedict[s] = newrect return dirty Following is more information on how you could create your own ``Sprite`` and ``Group`` objects from scratch. The ``Sprite`` objects only "require" two methods. "add_internal()" and "remove_internal()". These are called by the ``Group`` classes when they are removing a sprite from themselves. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a group. Your ``Sprite`` will need some way to also keep track of the ``Groups`` it belongs to. You will likely want to try to match the other methods and arguments to the real ``Sprite`` class, but if you're not going to use those methods, you sure don't need them. It is almost the same requirements for creating your own ``Group``. In fact, if you look at the source you'll see the ``GroupSingle`` isn't derived from the ``Group`` class, it just implements the same methods so you can't really tell the difference. Again you need an "add_internal()" and "remove_internal()" method that the sprites call when they want to belong or remove themselves from the group. The ``add_internal()`` and ``remove_internal()`` have a single argument which is a sprite. The only other requirement for the ``Group`` classes is they have a dummy attribute named "_spritegroup". It doesn't matter what the value is, as long as the attribute is present. The Sprite classes can look for this attribute to determine the difference between a "group" and any ordinary python container. (This is important, because several sprite methods can take an argument of a single group, or a sequence of groups. Since they both look similar, this is the most flexible way to "see" the difference.) You should go through the code for the sprite module. While the code is a bit "tuned", it's got enough comments to help you follow along. There's even a TODO section in the source if you feel like contributing. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_sources/tut/SurfarrayIntro.rst.txt0000644000175100001770000005244414676242340024316 0ustar00runnerdocker.. TUTORIAL:Introduction to the surfarray module .. include:: common.txt ********************************************* Pygame Tutorials - Surfarray Introduction ********************************************* .. currentmodule:: surfarray Surfarray Introduction ====================== .. rst-class:: docinfo :Author: Pete Shinners :Contact: pete@shinners.org Introduction ------------ This tutorial will attempt to introduce users to both NumPy and the pygame surfarray module. To beginners, the code that uses surfarray can be quite intimidating. But actually there are only a few concepts to understand and you will be up and running. Using the surfarray module, it becomes possible to perform pixel level operations from straight python code. The performance can become quite close to the level of doing the code in C. You may just want to jump down to the *"Examples"* section to get an idea of what is possible with this module, then start at the beginning here to work your way up. Now I won't try to fool you into thinking everything is very easy. To get more advanced effects by modifying pixel values is very tricky. Just mastering NumPy takes a lot of learning. In this tutorial I'll be sticking with the basics and using a lot of examples in an attempt to plant seeds of wisdom. After finishing the tutorial you should have a basic handle on how the surfarray works. NumPy -------------- If you do not have the python NumPy package installed, you will need to do that now, by following the `NumPy Installation Guide `_. To make sure NumPy is working for you, you should get something like this from the interactive python prompt. :: >>> from numpy import * #import numeric >>> a = array((1,2,3,4,5)) #create an array >>> a #display the array array([1, 2, 3, 4, 5]) >>> a[2] #index into the array 3 >>> a*2 #new array with twiced values array([ 2, 4, 6, 8, 10]) As you can see, the NumPy module gives us a new data type, the *array*. This object holds an array of fixed size, and all values inside are of the same type. The arrays can also be multidimensional, which is how we will use them with images. There's a bit more to it than this, but it is enough to get us started. If you look at the last command above, you'll see that mathematical operations on NumPy arrays apply to all values in the array. This is called "element-wise operations". These arrays can also be sliced like normal lists. The slicing syntax is the same as used on standard python objects. *(so study up if you need to :] )*. Here are some more examples of working with arrays. :: >>> len(a) #get array size 5 >>> a[2:] #elements 2 and up array([3, 4, 5]) >>> a[:-2] #all except last 2 array([1, 2, 3]) >>> a[2:] + a[:-2] #add first and last array([4, 6, 8]) >>> array((1,2,3)) + array((3,4)) #add arrays of wrong sizes Traceback (most recent call last): File "", line 1, in ValueError: operands could not be broadcast together with shapes (3,) (2,) We get an error on the last command, because we try add together two arrays that are different sizes. In order for two arrays two operate with each other, including comparisons and assignment, they must have the same dimensions. It is very important to know that the new arrays created from slicing the original all reference the same values. So changing the values in a slice also changes the original values. It is important how this is done. :: >>> a #show our starting array array([1, 2, 3, 4, 5]) >>> aa = a[1:3] #slice middle 2 elements >>> aa #show the slice array([2, 3]) >>> aa[1] = 13 #chance value in slice >>> a #show change in original array([ 1, 2, 13, 4, 5]) >>> aaa = array(a) #make copy of array >>> aaa #show copy array([ 1, 2, 13, 4, 5]) >>> aaa[1:4] = 0 #set middle values to 0 >>> aaa #show copy array([1, 0, 0, 0, 5]) >>> a #show original again array([ 1, 2, 13, 4, 5]) Now we will look at small arrays with two dimensions. Don't be too worried, getting started it is the same as having a two dimensional tuple *(a tuple inside a tuple)*. Let's get started with two dimensional arrays. :: >>> row1 = (1,2,3) #create a tuple of vals >>> row2 = (3,4,5) #another tuple >>> (row1,row2) #show as a 2D tuple ((1, 2, 3), (3, 4, 5)) >>> b = array((row1, row2)) #create a 2D array >>> b #show the array array([[1, 2, 3], [3, 4, 5]]) >>> array(((1,2),(3,4),(5,6))) #show a new 2D array array([[1, 2], [3, 4], [5, 6]]) Now with this two dimensional array *(from now on as "2D")* we can index specific values and do slicing on both dimensions. Simply using a comma to separate the indices allows us to lookup/slice in multiple dimensions. Just using "``:``" as an index *(or not supplying enough indices)* gives us all the values in that dimension. Let's see how this works. :: >>> b #show our array from above array([[1, 2, 3], [3, 4, 5]]) >>> b[0,1] #index a single value 2 >>> b[1,:] #slice second row array([3, 4, 5]) >>> b[1] #slice second row (same as above) array([3, 4, 5]) >>> b[:,2] #slice last column array([3, 5]) >>> b[:,:2] #slice into a 2x2 array array([[1, 2], [3, 4]]) Ok, stay with me here, this is about as hard as it gets. When using NumPy there is one more feature to slicing. Slicing arrays also allow you to specify a *slice increment*. The syntax for a slice with increment is ``start_index : end_index : increment``. :: >>> c = arange(10) #like range, but makes an array >>> c #show the array array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> c[1:6:2] #slice odd values from 1 to 6 array([1, 3, 5]) >>> c[4::4] #slice every 4th val starting at 4 array([4, 8]) >>> c[8:1:-1] #slice 1 to 8, reversed array([8, 7, 6, 5, 4, 3, 2]) Well that is it. There's enough information there to get you started using NumPy with the surfarray module. There's certainly a lot more to NumPy, but this is only an introduction. Besides, we want to get on to the fun stuff, correct? Import Surfarray ---------------- In order to use the surfarray module we need to import it. Since both surfarray and NumPy are optional components for pygame, it is nice to make sure they import correctly before using them. In these examples I'm going to import NumPy into a variable named *N*. This will let you know which functions I'm using are from the NumPy package. *(and is a lot shorter than typing NumPy before each function)* :: try: import numpy as N import pygame.surfarray as surfarray except ImportError: raise ImportError, "NumPy and Surfarray are required." Surfarray Introduction ---------------------- There are two main types of functions in surfarray. One set of functions for creating an array that is a copy of a surface pixel data. The other functions create a referenced copy of the array pixel data, so that changes to the array directly affect the original surface. There are other functions that allow you to access any per-pixel alpha values as arrays along with a few other helpful functions. We will look at these other functions later on. When working with these surface arrays, there are two ways of representing the pixel values. First, they can be represented as mapped integers. This type of array is a simple 2D array with a single integer representing the surface's mapped color value. This type of array is good for moving parts of an image around. The other type of array uses three RGB values to represent each pixel color. This type of array makes it extremely simple to do types of effects that change the color of each pixel. This type of array is also a little trickier to deal with, since it is essentially a 3D numeric array. Still, once you get your mind into the right mode, it is not much harder than using the normal 2D arrays. The NumPy module uses a machine's natural number types to represent the data values, so a NumPy array can consist of integers that are 8-bits, 16-bits, and 32-bits. *(the arrays can also use other types like floats and doubles, but for our image manipulation we mainly need to worry about the integer types)*. Because of this limitation of integer sizes, you must take a little extra care that the type of arrays that reference pixel data can be properly mapped to a proper type of data. The functions create these arrays from surfaces are: .. function:: pixels2d(surface) :noindex: Creates a 2D array *(integer pixel values)* that reference the original surface data. This will work for all surface formats except 24-bit. .. function:: array2d(surface) :noindex: Creates a 2D array *(integer pixel values)* that is copied from any type of surface. .. function:: pixels3d(surface) :noindex: Creates a 3D array *(RGB pixel values)* that reference the original surface data. This will only work on 24-bit and 32-bit surfaces that have RGB or BGR formatting. .. function:: array3d(surface) :noindex: Creates a 3D array *(RGB pixel values)* that is copied from any type of surface. Here is a small chart that might better illustrate what types of functions should be used on which surfaces. As you can see, both the arrayXD functions will work with any type of surface. .. csv-table:: :class: matrix :header: , "32-bit", "24-bit", "16-bit", "8-bit(c-map)" :widths: 15, 15, 15, 15, 15 :stub-columns: 1 "pixel2d", "yes", , "yes", "yes" "array2d", "yes", "yes", "yes", "yes" "pixel3d", "yes", "yes", , "array3d", "yes", "yes", "yes", "yes" Examples -------- With this information, we are equipped to start trying things with surface arrays. The following are short little demonstrations that create a NumPy array and display them in pygame. These different tests are found in the *arraydemo.py* example. There is a simple function named *surfdemo_show* that displays an array on the screen. .. container:: examples .. container:: example .. image:: surfarray_allblack.png :alt: allblack :: allblack = N.zeros((128, 128)) surfdemo_show(allblack, 'allblack') Our first example creates an all black array. Whenever you need to create a new numeric array of a specific size, it is best to use the ``zeros`` function. Here we create a 2D array of all zeros and display it. .. container:: break .. .. container:: example .. image:: surfarray_striped.png :alt: striped :: striped = N.zeros((128, 128, 3)) striped[:] = (255, 0, 0) striped[:,::3] = (0, 255, 255) surfdemo_show(striped, 'striped') Here we are dealing with a 3D array. We start by creating an all red image. Then we slice out every third row and assign it to a blue/green color. As you can see, we can treat the 3D arrays almost exactly the same as 2D arrays, just be sure to assign them 3 values instead of a single mapped integer. .. container:: break .. .. container:: example .. image:: surfarray_rgbarray.png :alt: rgbarray :: imgsurface = pygame.image.load('surfarray.png') rgbarray = surfarray.array3d(imgsurface) surfdemo_show(rgbarray, 'rgbarray') Here we load an image with the image module, then convert it to a 3D array of integer RGB color elements. An RGB copy of a surface always has the colors arranged as a[r,c,0] for the red component, a[r,c,1] for the green component, and a[r,c,2] for blue. This can then be used without caring how the pixels of the actual surface are configured, unlike a 2D array which is a copy of the :meth:`mapped ` (raw) surface pixels. We will use this image in the rest of the samples. .. container:: break .. .. container:: example .. image:: surfarray_flipped.png :alt: flipped :: flipped = rgbarray[:,::-1] surfdemo_show(flipped, 'flipped') Here we flip the image vertically. All we need to do is take the original image array and slice it using a negative increment. .. container:: break .. .. container:: example .. image:: surfarray_scaledown.png :alt: scaledown :: scaledown = rgbarray[::2,::2] surfdemo_show(scaledown, 'scaledown') Based on the last example, scaling an image down is pretty logical. We just slice out all the pixels using an increment of 2 vertically and horizontally. .. container:: break .. .. container:: example .. image:: surfarray_scaleup.png :alt: scaleup :: shape = rgbarray.shape scaleup = N.zeros((shape[0]*2, shape[1]*2, shape[2])) scaleup[::2,::2,:] = rgbarray scaleup[1::2,::2,:] = rgbarray scaleup[:,1::2] = scaleup[:,::2] surfdemo_show(scaleup, 'scaleup') Scaling the image up is a little more work, but is similar to the previous scaling down, we do it all with slicing. First we create an array that is double the size of our original. First we copy the original array into every other pixel of the new array. Then we do it again for every other pixel doing the odd columns. At this point we have the image scaled properly going across, but every other row is black, so we simply need to copy each row to the one underneath it. Then we have an image doubled in size. .. container:: break .. .. container:: example .. image:: surfarray_redimg.png :alt: redimg :: redimg = N.array(rgbarray) redimg[:,:,1:] = 0 surfdemo_show(redimg, 'redimg') Now we are using 3D arrays to change the colors. Here we set all the values in green and blue to zero. This leaves us with just the red channel. .. container:: break .. .. container:: example .. image:: surfarray_soften.png :alt: soften :: factor = N.array((8,), N.int32) soften = N.array(rgbarray, N.int32) soften[1:,:] += rgbarray[:-1,:] * factor soften[:-1,:] += rgbarray[1:,:] * factor soften[:,1:] += rgbarray[:,:-1] * factor soften[:,:-1] += rgbarray[:,1:] * factor soften //= 33 surfdemo_show(soften, 'soften') Here we perform a 3x3 convolution filter that will soften our image. It looks like a lot of steps here, but what we are doing is shifting the image 1 pixel in each direction and adding them all together (with some multiplication for weighting). Then average all the values. It's no Gaussian, but it's fast. One point with NumPy arrays, the precision of arithmetic operations is determined by the array with the largest data type. So if factor was not declared as a 1 element array of type numpy.int32, the multiplications would be performed using numpy.int8, the 8 bit integer type of each rgbarray element. This will cause value truncation. The soften array must also be declared to have a larger integer size than rgbarray to avoid truncation. .. container:: break .. .. container:: example .. image:: surfarray_xfade.png :alt: xfade :: src = N.array(rgbarray) dest = N.zeros(rgbarray.shape) dest[:] = 20, 50, 100 diff = (dest - src) * 0.50 xfade = src + diff.astype(N.uint) surfdemo_show(xfade, 'xfade') Lastly, we are cross fading between the original image and a solid bluish image. Not exciting, but the dest image could be anything, and changing the 0.50 multiplier will let you choose any step in a linear crossfade between two images. .. container:: break .. Hopefully by this point you are starting to see how surfarray can be used to perform special effects and transformations that are only possible at the pixel level. At the very least, you can use the surfarray to do a lot of Surface.set_at() Surface.get_at() type operations very quickly. But don't think you are finished yet, there is still much to learn. Surface Locking --------------- Like the rest of pygame, surfarray will lock any Surfaces it needs to automatically when accessing pixel data. There is one extra thing to be aware of though. When creating the *pixel* arrays, the original surface will be locked during the lifetime of that pixel array. This is important to remember. Be sure to *"del"* the pixel array or let it go out of scope *(ie, when the function returns, etc)*. Also be aware that you really don't want to be doing much *(if any)* direct pixel access on hardware surfaces *(HWSURFACE)*. This is because the actual surface data lives on the graphics card, and transferring pixel changes over the PCI/AGP bus is not fast. Transparency ------------ The surfarray module has several methods for accessing a Surface's alpha/colorkey values. None of the alpha functions are affected by overall transparency of a Surface, just the pixel alpha values. Here's the list of those functions. .. function:: pixels_alpha(surface) :noindex: Creates a 2D array *(integer pixel values)* that references the original surface alpha data. This will only work on 32-bit images with an 8-bit alpha component. .. function:: array_alpha(surface) :noindex: Creates a 2D array *(integer pixel values)* that is copied from any type of surface. If the surface has no alpha values, the array will be fully opaque values *(255)*. .. function:: array_colorkey(surface) :noindex: Creates a 2D array *(integer pixel values)* that is set to transparent *(0)* wherever that pixel color matches the Surface colorkey. Other Surfarray Functions ------------------------- There are only a few other functions available in surfarray. You can get a better list with more documentation on the :mod:`surfarray reference page `. There is one very useful function though. .. function:: surfarray.blit_array(surface, array) :noindex: This will transfer any type of 2D or 3D surface array onto a Surface of the same dimensions. This surfarray blit will generally be faster than assigning an array to a referenced pixel array. Still, it should not be as fast as normal Surface blitting, since those are very optimized. More Advanced NumPy ------------------- There's a couple last things you should know about NumPy arrays. When dealing with very large arrays, like the kind that are 640x480 big, there are some extra things you should be careful about. Mainly, while using the operators like + and * on the arrays makes them easy to use, it is also very expensive on big arrays. These operators must make new temporary copies of the array, that are then usually copied into another array. This can get very time consuming. Fortunately, all the NumPy operators come with special functions that can perform the operation *"in place"*. For example, you would want to replace ``screen[:] = screen + brightmap`` with the much faster ``add(screen, brightmap, screen)``. Anyway, you'll want to read up on the NumPy UFunc documentation for more about this. It is important when dealing with the arrays. Another thing to be aware of when working with NumPy arrays is the datatype of the array. Some of the arrays (especially the mapped pixel type) often return arrays with an unsigned 8-bit value. These arrays will easily overflow if you are not careful. NumPy will use the same coercion that you find in C programs, so mixing an operation with 8-bit numbers and 32-bit numbers will give a result as 32-bit numbers. You can convert the datatype of an array, but definitely be aware of what types of arrays you have, if NumPy gets in a situation where precision would be ruined, it will raise an exception. Lastly, be aware that when assigning values into the 3D arrays, they must be between 0 and 255, or you will get some undefined truncating. Graduation ---------- Well there you have it. My quick primer on NumPy and surfarray. Hopefully now you see what is possible, and even if you never use them for yourself, you do not have to be afraid when you see code that does. Look into the vgrade example for more numeric array action. There are also some *"flame"* demos floating around that use surfarray to create a realtime fire effect. Best of all, try some things on your own. Take it slow at first and build up, I've seen some great things with surfarray already like radial gradients and more. Good Luck. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_sources/tut/chimp.py.rst.txt0000644000175100001770000000026314676242340023043 0ustar00runnerdocker.. include:: common.txt **************************** pygame/examples/chimp.py **************************** .. literalinclude:: ../../../examples/chimp.py :language: python ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9721258 pygame-2.6.1/docs/generated/_sources/tut/en/0000755000175100001770000000000014676242436020353 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9731257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/0000755000175100001770000000000014676242436022661 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/1.Prolog/0000755000175100001770000000000014676242436024262 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/1.Prolog/introduction.rst.txt0000644000175100001770000000572114676242340030352 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Prolog? Why Pygame? ==================================== As we know, every kind of game has 3 sections (Because game is a subgroup of program): **input**, **process** and **output**. If you want to make a game in C **console environment** (Write C source code then execute that on the console) simply, all you have to do is just using lots of scanf(or unnormalized getch function) functions and procedural complex algorithm followed by printf(with blinking clear function) functions with ASCII arts! However, when you get bored of making outdated, graphic-less CUI, discontinuous game, now it’s time to learn GUI based game making tool. You can directly enter into Unity **game engine** or Unreal game engine. However, there are too much barrier to overcome. Quaternion for 3D collision, Mechanim/Legacy animation compatibility, Larger memory/Faster CPU for simulate in high-graphic mod, and etc! So, there is a dilemma between console environment and game engine. Can this dilemma to be solved? .. image:: introduction-PuyoPuyo.png Example of C console game - PuyoPuyo .. image:: introduction-TPS.png Example of Unity Engine game - TPS Yes. Pygame can solve that. Pygame is an external library of **Python** which enables you to make a **game**. Pygame has advantages of console environment. For example, single pygame project nearly equals single source code, so we have to focus on writing source code only. (with some sound file or some image file in the same directory). Because Pygame is not a tool but a library, single command “import pygame” makes current source code to use pygame’s everything. That is, Pygame is simple to access. Pygame has advantages of game engine, too. For example, Pygame provide input functions (which check every possible state of keyboard, mouse and even files) and output functions (drawing geometry, fill certain colors or set display) to user. That is, user can run the program on the GUI environment if it based on Pygame. Because Pygame is based on Python, functions in Pygame project can be executed selectively, even almost simultaneously. That is, Pygame is event-driven. .. image:: introduction-Battleship.png Example of Pygame - Battleship So, Pygame has both good point of console environment (example of low-level game maker) and game engine (example of high-level game maker). Pygame is good **intersection** between console environment to game engine. That’s enough to use Pygame. No need to master it (if your dream is one-man game developer in advanced game engine, start to learn about that game engine right now!), but at least, try Pygame. (if you are interested in any kind of unique program including game maker or if you want to code any game on advanced environment aside from console environment) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/2.Print_text/0000755000175100001770000000000014676242436025161 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021500000000000010213 xustar00113 path=pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.rst.txt 28 mtime=1727612127.9861119 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/2.Print_text/Basic TEMPLATE and OUTPUT.rst.0000644000175100001770000001666514676242340031762 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Basic TEMPLATE and OUTPUT ==================================== ==================================== –Into Event-driven and GUI ==================================== As I said, Pygame is based on GUI environment. Furthermore, Pygame is good for making 2D game because of its input/output format. So, you have to say good-bye for print or input standard function of Python (Because they work only on CUI environment). Then, what functions in Pygame replace these functions? First, we have to go back to friendly “Hello World!” project, which is learning about basic template and output. **(Requiring any font file(.ttf) in the same project directory)** .. image:: Basic-ouput-sourcecode.png .. image:: Bagic-ouput-result-screen.png Source Code for Hello World Project and its result screen Wow, it’s complicated in compare to python’s print(“Hello World”) (Just a single line command). It’s because text in GUI environment has 5 components: text contents, font, size, color and location. If you want to print any text into screen, you have to set other 4 components, not only string (unless when it is in GUI environment). Only ``pygame.display.set_caption(“Hello World Project”)`` function in #7 do the same function as python’s print(“Hello World Project”). The only difference is that output string is always on window caption (title of current program) First, look at the template of source code before understanding how to output something, source code can be dived into 4 sections: Header(#1-#2), Initial statement(#3-#12), Always statement(#13-#20) and Event statement(#16-#19). In **Header**, importing modules will be executed. ``import pygame, sys`` is always needed. Needless to say, because this is pygame project and game has to be terminated when player want to exit(``sys.exit()`` at #19). ``from pygame.locals import*`` is also necessary to use useful constants just like ``QUIT`` at #17. In **Initial statement** (commands before infinite loop), some global values will be initialized and some functions will be called for one time. Global values just like colors has to be initialized here in order to increase readability. Remember, this is GUI which is colorful. Color has three components: red, green and blue. So, color value has to be initialized just like ``red = (255, 0, 0)``. Function named ``pygame.init()`` must be called preceding to other pygame functions. Then other pygame functions can be executed. (Other pygame functions will be explained later.) In **Always statement** (commands within infinite loop), some global values will be updated routinely and some functions will be called routinely unless they are enclosed into conditional statement. Function named ``pygame.display.update()`` should be called after every processes are done. Because this function is printing the results of processes onto screen(=monitor). If this function is not executed in the last part of Always statement, there will be a probability that current screen and internal data does not match. (Other pygame functions will be explained later.) In **Event statement** (commands within loop which check every possible events), there will be suitable conditional statements when certain event is triggered. ``pygame.event.get()`` function returns a list of events occurred by processes in Always statement. And this list is automatically arranged by time (oldest to newest). So, using for-in statement, every triggered event caused by Always statement can be resolved procedurally. (Remind that this is the trait of event-driven.) For example, commands in #17-#19 will deal with QUIT event. In this case, pygame will be terminated then system will be terminated because system must be terminated after pygame is terminated! (Other events will be explained later.) Regarding this template is fixed, then we can add special functions in correct place to print “Hello World!”. First, we need to set **font** and **size**. ``pygame.font.Font(“HoonWhiteCatR,ttf”, 32)`` function at #9 will set not only font by ttf file but also size (32). Return value of this function need to be stored into object(= myTextFont). Then member function of myTextFont named ``render(“Hello World!”, True, red, green)`` at #10 will return a value(= myText). render function can set **text contents** and **color**(red is color of text, green is color of area outside of text). Then member function of myText named ``get_rect()`` at #11 will return a value(= myTextArea). myTextArea means the area allocated for printing text. When get_rect() is called, a rectangle area is returned corresponding to text’s length and font size. Now, all we have to do is locating this area somewhere. If we change member value of myTextArea named ``center`` at #12 into center of screen, then the text’s center **location** will be center of the screen. But how to determine where is the center of screen? First, we have to decide the range of screen, by using ``pygame.display.set_mode((640,480))`` in #8, canvas(where all values which has size, color, position will be drawn when display.update is called) will be generated and its size becomes 640 x 480. Then, its center is exactly (320,240). If the total size is given, we can decide any position even accounting some margin with little calculation (Remind that in 2D GUI, everything has x and y which has to be printed) (Just like turtle graphic, if it goes **right, x increases**, if it goes **down**, **y increase**. Don’t confused!). And we know that all functions I mentioned will be putted into Initial statement, because this information are fixed while the program go on. Although everything is fixed, we have to design that fill and blit functions to be putted into Always statement, because of these functions’ trait. ``fill(white)`` function in #14 means filling canvas by single color(white). ``blit(myText, myTextArea)`` function in #15 means drawing specific object(= myText) on specific location(= myTextArea) of canvas. Notice that drawing(blit) has to be done after filling(fill). When everything is drawn on canvas, result of canvas will be display onto window when display.update is executed. That was the explanation of the entire source code, which has 20 lines. It seems it takes too much time to understand source code with only 20 lines. However, adding or changing from this source code is not that hard because we understand the template of this source code and step of printing. What about adding process logic in this source code? That will be next project. :: import pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/3.Move_text/0000755000175100001770000000000014676242436024774 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/3.Move_text/Basic PROCESS.rst.txt0000644000175100001770000001150414676242340030457 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Basic PROCESS ==================================== ==================================== -Setting for Animation ==================================== Previous project looks like a single image instead of game. Because there is no input neither process to control output. Of course, clicking exit button on window is not counted because it is just shutting down the entire program. First, we will let text “Hello World!” to move automatically (and now project will be looks like an animation rather than single image), which means adding first processing logic on this project. How to move text? We know that location of text is initialized in Initial statement. So, location of text should be updated in Always statement, with adding some variable to process something. .. image:: Bagic-PROCESS-sourcecode.png .. image:: Bagic-PROCESS-resultscreen.png (Source Code for Moving World Project and its result screen) (Not the entire source code of Moving World Project, but part) (Moving World! moves automatically just like Arkanoid ball or DVD screensaver.) New line #1 - #5 were appended at the end of Initial statement. Also, multiple if-else phases (#6 - #9) were inserted at the beginning of Always statement, with line #11 at the end of always statements. We can understand what commands of #2 - #10 do. They just change variables for position of “Moving World” when Always statement being started. But there is a problem. How fast is “Moving World?” It is sure that displacement of “Moving World” is sqrt(2) (simple Pythagorean equation). But how often displacement of “Moving World” is changed? It can’t be determined without calculating time complexity of Always statement! (Because it depends on how often Always statement being started) And time complex will be differ to computer to computer, so can’t be fixed. We need to add the conception of **fixed speed** into this project. How? Look at #1 and #11. There is ``pygame.time.Clock()`` on Initial statement and ``tick(60)`` on Always statement. 60 means FPS (frame rate per second). We know that FPS means how often display is changed in 1 second. What function means change (= update) display in pygame? That’s right. Pygame.display.update() function. So, FPS means how often Always statement being executed in 1 second. Because there is 1 Pygame.display.update() function in 1 always statements. (So, FPS means **selective delay** according to current program’s process speed, **not selective acceleration**, so FPS cannot work if FPS is too high.) If we let fps(= **time**) to be fixed in this project, we can change **velocity** of certain game object by finding appropriate value for **displacement**. pygame.time.Clock() is needed to fix the speed of project before game started. Notice that tick function has to be called when Pygame.display.update() is called. Because tick counts the number of update function. It is one of the exception of function that can be executed after Pygame.display.update(). Okay, we learn that “Fixing time” is needed when screen is updated. Every screen of dynamic game is frequently changed unless it is static game. So, we have to know that. However, this project isn’t look like a game because its result can be anticipated easily (there is no input to change result) Now, input logic will be inserted. :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/4.Control_text/0000755000175100001770000000000014676242436025507 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.987112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/4.Control_text/Basic INPUT.rst.txt0000644000175100001770000001203214676242340030750 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Basic INPUT ==================================== ==================================== -New Input is new Event ==================================== Usually, we learn how to output something first (Think about Hello World!), learning how to input something is always second. Why? Because input is not the requirement for some program in contrast to output is the requirement for every program. (That’s definition of program. more than or same as 0 input, more than or same as 1 output.) However, every game needs input. That’s why we said “I like playing games”. Playing means moving your part of body (maybe your finger). Anyway, let’s add input logic to make this project into real game. .. image:: Bagic-INPUT-sourcecode.png .. image:: Bagic-INPUT-resultscreen.png (Source Code for Controlling World Project and its result screen) (Not the entire source code of Controlling World Project, but part) (Controlling World! moves when player press one of four direction arrow of keyboard) There are 2 big difference in comparison to before project. First big difference is line #5, which adds checking ``KEYDOWN`` **event** is triggered or not. Other lines are just changing previous algorithm to act differently. We know that same command can make big difference in entire program when it is executed before Event statement of after Event statement. Pay attention that process about changing location appear after Event statement. (**Update after set**. That is second big difference). Variable ``event.key`` means latest pressed key on keyboard. Look at the specific key name. K_UP, K_LEFT, K_DOWN, K_RIGHT. Very intuitive **K_ series**. (Given by pygame.locals which we added at the Header) Furthermore, there are other key named K_8, K_a, K_L, K_LCTRL, K_DELETE, or K_F4. We can understand meaning of these keys without extra explanation. Full key list can be found in `https://www.pygame.org/docs/ref/key.html#pygame.key.name.` Notice that KEYDOWN means “this key was not pressed before, but **now is pressed**” and meaning of **“hold” is not included** here. In the case of hold, new event-handling about checking ``KEYUP`` (it means “this key was pressed before, but now is not pressed”) is needed with some processing (which needs extra variable and algorithm). This will be mentioned at advanced part. Adding input was easy because it’s just adding if phase with certain event parameter. Now game project is done because project has output, process and input step-by-step! Really? No. This project can’t be called as a game because there is no **interaction** between at least two **game objects**, no **rule** for playing this (neither constrains (ex. HP, time) nor score). Mostly, not **enjoyable** (no motivation, no variety of input and output, no attractive contents) Firstly, we have to learn more advanced input (for example, handling for mouse status), process (for example, idea for functionalization) and output (for example, printing image/sound or visualizing internal data) to flourish game interface/system. Don’t stay in the level of printing const text or inputting single pressed key. Of course, experiences of this level are surely helpful for advanced level. So, let’s go to advanced level! :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/5.HP_bar/0000755000175100001770000000000014676242436024157 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022400000000000010213 xustar00121 path=pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROCESS.rst.txt 27 mtime=1727612127.987112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/5.HP_bar/Advanced OUTPUT with Advanced PROC0000644000175100001770000001023014676242340031764 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ========================================= with Advanced PROCESS - Functionalization ========================================= First, Let’s print visualized geometry, not text. How about HP bar? If max HP of game is fixed and current HP of game can vary from 0 to max HP, what will be simplest way to print both two data? .. image:: AdvancedOutputProcess1.gif .. image:: AdvancedOutputProcess2.gif .. image:: AdvancedOutputProcess3.gif Yeah, just re-rendering text when certain variable is changed. How to change variable? That logic is inside of Event statement. (Pressing up or down to adjust HP.) Same method as before. But they are still text, which means they are not visualized enough. How to visualize these two data more detail (max HP, current HP)? We can use idea of magazine (gun’s magazine). HP is integer value, which is discrete. So, it can be printed as below: .. image:: AdvancedOutputProcess4.gif .. image:: AdvancedOutputProcess5.gif .. image:: AdvancedOutputProcess6.gif Much better, isn’t it? Drawing logic is inside of #6. Logic is simple, first, draw a **big rectangular** which color is black. Then, check whether draw a **smaller rectangular** which color is red or not depending on current HP. Finally, draw **margin** of current small rectangular. Margin of color is white. We can find there are 4 parameters for location data in ``pygame.draw.rect`` (I mean, third data. First data is canvas data, second data is color data and fourth data is width.) The easiest way to understand 4 parameters is change them. Change one value into 10 or 30 while others are 20! Then it can be understood. Needless to explain. Furthermore, now it’s time to functionalize specifically. I push Always statement and Event statement into main function. (#7 is needed to find main function and execute it.) And made new function for drawHP. Functionalization idea for game is not far away from that of normal GUI program. For example, it is better to make **single print function for every single value** which has to be displayed. Of course, setting location for each value has to be done while you are designing the screen. :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0061257 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/6.Buttons/0000755000175100001770000000000014676242436024463 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022300000000000010212 xustar00120 path=pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTPUT.rst.txt 27 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/6.Buttons/Advanced INPUT with Advanced OUTP0000644000175100001770000001164014676242340032161 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== with Advanced OUTPUT – Buttons ==================================== Even if KEYDOWN event is used, it seems like this is not entirely GUI game because GUI of this game is only used for output(=print), not input. Input for GUI means caring mouse event for specific location. How about making two buttons to increase or decrease HP? .. image:: AdvancedInputOutput1.gif .. image:: AdvancedInputOutput2.gif Okay, making two buttons is simple. Look at the button, they have unique visual shape. How can it be? Simple as previous idea: First, draw **big square**. Second, draw **smaller square** which has small width (this square doesn’t have inner color so color of big square can be displayed) so inner square and outer square seems like separated. But these buttons are still for output only. We need to make click area for this. .. image:: AdvancedInputOutput3.gif .. image:: AdvancedInputOutput4.gif .. image:: AdvancedInputOutput5.gif Now new event ``MOUSEBUTTONUP`` is added at Event statement. Notice that up of mouse is same as down of key. If MOUSEBUTTONUP is activated, ``event.pos`` will be recorded as x and y. Which means, clicked point. So, determining clicked point is whether inside of certain Rect area or not is needed by checking ``collidepoint``. If inside, it means “**user clicked some point which is part of certain area**” then, adequate process (updating value) is needed. Notice that there are two area for input: **(270, 425, 45, 45)** and **(325, 425, 45, 45)** at Event Statement. Notice that also there are two area for output. **(margin, height - r -10 , r, r)** and **(margin + r + r_margin, height - r - 10, r, r)** at drawButtons. In the case of button, input and output area for button must be **identical**. (Otherwise, this button will be deceptive!) It will be best idea to set this data as same value without calculating exact location of function (for output) into constant (for input). There is no specific function to tie this area, so you have to care about this. :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/7.Game_board/0000755000175100001770000000000014676242436025046 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022100000000000010210 xustar00118 path=pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha.rst.txt 27 mtime=1727612127.988112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/7.Game_board/Advanced OUTPUT and plus alpha0000644000175100001770000001522114676242340032247 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== and plus alpha ==================================== Actually, everything doesn’t seem like a game. Now, we will insert a rule into this program. Then. It will become game. Rule is simple: counting red or black from 5x5 2D array and choose the color which has much more number! If correct, HP++, otherwise, HP--. Then new array will be set for next quiz! too simple but game which can be made in this tutorial. First, we need to generate 2D array and print it. How? We learned how to print integer data (which equals single data (0D array)) and two buttons (which equals single array (1D array). Case of 2D array just needs one-more step. .. image:: AdvancedOutputAlpha1.gif .. image:: AdvancedOutputAlpha2.gif .. image:: AdvancedOutputAlpha3.gif generateboard function returns randomly generated 2D board with the number of red block and black block. Needless to explain. Also, printboard function prints 2D board by same method as 1D array. Output color will be changed by data of board[i][j] is 1 or not. This board is for output only. Processing about margin seems to be annoying because we have to know exact location by calculating. Remember prolog. Output (executing result) of Pygame is GUI but input(coding) of Pygame is CUI. That is Pygame. Actually, there are a lot of idea for improving this game. How about changing button into image file? How about adding sound effect when previous chose was correct or not? How about setting time limit? How about adding visual effect when player win(maxHP) or not(minHP)? How about make the board bigger with another colors? How about implement Flood-it game by given interface? There are still lots of selection because this game is simple. :: import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/8.Epilog/0000755000175100001770000000000014676242436024246 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_sources/tut/en/Red_or_Black/8.Epilog/Epilog.rst.txt0000644000175100001770000000325014676242340027027 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== Epilog ==================================== However, this is end of tutorial. This tutorial covers only a few of Pygame. But don’t worry. Programming is the most creative activity human can do. Immanuel Kant said “Genius is the innate mental aptitude through which nature gives the rule to art”. Programming is making a rule and give it to computer. If rule is made, computer can do anything within rule. So, number of cases incredibly increase. What is conclusion? **Output is greater than input**. We can implement much more program within our knowledge. Or, we can learn new knowledge easily by connecting it to old knowledge. That’s trait of programming. And so is game. “Radom” is the key concept for every game. (including simple game made on this tutorial!) number of cases is much greater when random variable is concerned. If random variable starts to affect another random variable and so on, output will be greater like Avalanche. That’s why game is interesting. Concept of “Random” is the only unique characteristic for game in comparison to novel, music or movie. Think about Tetris. How much effort Alexey Leonidovich Pajitnov spent? Do you think it is greater than sum of Tetris player’s playing time above the world, along 35 years? That’s ultimate example of both power of programming and game. So, game makers are Avalanche makers. Now it’s time to create any game! Learn! Utilize! Go through trial and errors! ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612189.9731257 pygame-2.6.1/docs/generated/_sources/tut/ko/0000755000175100001770000000000014676242436020362 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000015300000000000010214 xustar0079 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/0000755000175100001770000000000014676242436021471 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000017200000000000010215 xustar0094 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/1.프롤로그/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/1.????/0000755000175100001770000000000014676242436022303 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021100000000000010207 xustar00109 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/1.프롤로그/소개.rst.txt 28 mtime=1727612127.9901118 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/1.????/??.rst.txt0000644000175100001770000001373414676242340024132 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 프롤로그 ==================================== ==================================== – 왜 하필 파이게임? ==================================== 게임도 프로그램의 일부이기 때문에, 게임은 입력, 처리 그리고 출력으로 구성된다. C 콘솔 환경에서 게임을 만든다고 가정해 보자(C로 소스코드를 작성한 후 콘솔에서 실행하는 방식). 그러면 입력은 수많은 scanf(또는 엔터 입력 필요 없는 비표준 getch) 함수로, 처리는 항상 절차적으로 실행되는 복잡한 알고리즘으로, 출력은 아스키아트를 이용한 printf(그리고 화면을 지우는 깜빡거리는 clear)함수로 구성할 수 있다. 하지만 이렇게 만든 게임은 구식이고, 그래픽 없는 CUI고, 끉겨 보인다는 단점이 있다. 이런 식의 게임을 만드는 것이 질린다면, 보통 Unity 게임엔진이나 Unreal 게임엔진 등 게임 엔진에도 손을 대보게 된다. 하지만, 게임 엔진은 입문장벽이 높다는 단점이 있다. 복소수좌표를 활용한 공간상에서의 충돌, Mechanin/Legacy 애니메이션 호환성, 더 좋은 그래픽을 위한 더 큰 메모리/더 빠른 CPU… 아무래도 콘솔 환경과 게임 엔진 사이에는 딜레마가 있는 것 같다. 이 딜레마를 해결할 수 있을까? .. image:: introduction-PuyoPuyo.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-PuyoPuyo.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (C 콘솔 환경 게임의 예시 - 뿌요뿌요) .. image:: introduction-TPS.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-TPS.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (유니티 게임 엔진 게임의 예시- TPS) 다행히 파이게임은 그 딜레마를 해결할 수 있다. 파이게임 이란 프로그래머가 게임을 만들 수 있게 해 주는 파이썬의 외부 라이브러리이다. 파이게임은 콘솔 환경에서의 장점을 가지고 있다. 그 첫째 장점은 하나의 파이게임 프로젝트은 하나의 소스코드와 거의 동치관계라는 것이다. (외부 소리 파일이나 외부 사진 파일을 제외화면) 그래서 프로그래머는 소스 코드를 작성하는 것에만 집중하면 된다. 그리고 둘째 장점은 파이게임은 툴이 아닌 라이브러리이기 때문에, 소스파일에 “import pygame”만 있으면 그 소스파일은 파이게임의 모든 것에 접근할 수 있게 된다. 접근성이 좋다는 것이다. 파이게임은 게임 엔진의 장점도 가지고 있다. 그 첫째 장점은 파이게임이 키보드, 마우스, 파일 등의 상태를 확인하는 입력 관련 함수들과, 도형 그리기, 색 칠하기, 디스플레이 설정 등의 출력 관련 함수들을 제공하기 때문에, CUI가 아닌 GUI 환경에서 실행된다는 것이다. 그리고 둘째 장점은 파이게임이 파이썬에 기반하였기 때문에, 파이게임의 함수들은 절차적이 아닌 이벤트적(여러 함수들이 선택적으로 실행되거나 거의 동시에 실행됨)으로 실행된다는 것이다. .. image:: introduction-Battleship.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("introduction-Battleship.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (파이게임 게임의 예시- 배틀십) 요약하자면, 파이게임은 저급 수준(콘솔 환경은 예시 중 하나)의 게임 제작 프로그램과 고급 수준(게임 엔진은 예시 중 하나)의 게임 제작 프로그램의 장점을 모두 가진다는 것이다. 파이게임은 이 둘 사이의 좋은 연결점이 된다. 이것이 파이게임을 쓸 이유이다. 더 복잡한 게임 엔진을 최대한 활용해 게임을 만드는 1인 개발자가 목표가 아닌 이상 (빨리 그 게임 엔진을 배우는 것이 낫다!), 콘솔 환경용 게임이 아닌 더 발전된 환경에서 게임을 한번쯤은 코딩해 보고 싶다면 (물론, 푹 빠지면 계속 코딩하게 될 것이다!), 한번쯤은 파이게임을 시도해 볼만 하다. ././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/2.텍스트 출력/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/2.??? ??/0000755000175100001770000000000014676242436022443 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024100000000000010212 xustar00133 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/2.텍스트 출력/기초 템플릿과 출력.rst.txt 28 mtime=1727612127.9901118 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/2.??? ??/?? ???? ??.rst.txt0000644000175100001770000002342414676242340025161 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 기본 형식과 기초 출력 ==================================== ==================================== –이벤트 기반과 GUI 기반으로의 입문 ==================================== 앞서 말했듯, 파이게임은 GUI를 기반으로 한다. 정확히는, 파이게임은 2D용 입력, 출력 함수를 사용하여 2D GUI를 기반으로 한다. 어찌됐든, CUI환경에서만 먹히는 파이썬의 print함수나 input함수와는 이별을 해야 한다. 그렇다면, 파이게임의 어떤 함수가 print/input함수를 대체하는가? 우선, 프로그래밍 언어의 기본 형식과 출력을 배우는 친숙한 예제인 “Hello World!”프로젝트로 되돌아가야 한다. (이 프로젝트는 같은 디렉토리에 .ttf확장자를 가지는 폰트 파일을 필요로 한다.) .. image:: Basic-ouput-sourcecode.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Basic-ouput-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-ouput-result-screen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-ouput-result-screen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Hello World 프로젝트의 소스 코드와 실행 결과) 1줄짜리 print(“Hello World!”)에 비하면 소스 코드가 꽤 복잡하다. 이것은 GUI환경에서 텍스트는 최소 5개의 구성 성분(텍스트 내용, 폰트, 크기, 색상, 좌표)를 가지기 때문이다. GUI환경에서 텍스트는 1개의 구성 성분(텍스트 내용)만을 가지므로, 4개의 구성 성분이 추가된 셈이다. 예외적으로, #7의 pygame.display.set_caption(“Hello World Project”)함수는 print(“Hello World Project”)함수와 동일한 기능을 한다. 하지만, 이 함수 속 문자열은 프로그램의 윈도우 캡션에 고정된 문자열이다. 우선, 무언가를 출력하기 위해선 소스코드가 어떻게 작성되어야 하는지 그 형식을 살펴보자. 소스코드는 4개의 부분으로 나눠질 수 있다. Header(#1-#2), Initial문(#3-#12), Always문(#13-#20), Event문(#16-#19)가 그것이다. Header에선, 모듈들을 import하는 작업이 실행된다. 여기에 import pygame, sys는 항상 필요하다. 이 프로젝트가 파이게임 프로젝트이며, 사용자가 프로그램을 종료하고 싶을 때 종료되어야 하기 때문에(실제로 #19에서 sys.exit()가 실행된다) 추가적인 설명이 필요 없는 당연한 문구이다. from pygame.locals import*는 #17에서의 QUIT같은 유용한 상수들을 선언 없이 사용하기 위해 거의 반필수적으로 필요하다. Initial문(무한 반복문 이전의 문장들)에선, 전역 변수가 한번만 초기화되거나 몇몇 함수가 한번만 호출된다. 주로 색상과 같은 전역 변수들이 가독성을 높이기 위해 초기화된다. 파이게임은 여러가지 색상을 사용하는 화려한 GUI임을 까먹어선 안된다. (게임이므로) 하나의 색상은 R값, G값, B값 3개의 구성 요소를 가진다. 그래서 색상 변수는 red = (255, 0, 0)와 같이 선언되어야 한다. pygame.init()과 같은 함수는 나중에 사용할 함수를 위해선 가장 앞서서 호출되어야 한다. (이 외의 함수들은 나중에 언급하겠다.) Always문(무한 반복문)에선, 전역 변수가 계속 업데이트되거나 몇몇 함수가 계속 호출된다. (물론, 조건문이 있는 경우 조건이 맞을 때만) pygame.display.update() 라는 함수는 일반적으로 다른 변수/함수의 처리가 끝난 이후에 호출되는데, 이 함수는 처리의 결과물들을 스크린(= 모니터)에 출력하는 함수이기 때문이다. 이 함수가 Always문 마지막에 실행되지 않으면, 출력되는 화면과 게임 내부 데이터가 서로 일치하지 않는 문제가 생길 수 있다. (이 외의 함수들은 나중에 언급하겠다.) Event문(모든 이벤트를 체크하는 반복문)에선, 특정 이벤트가 발생하면 이에 대한 처리가 이루어진다. pygame.event.get() 함수는 Always문에서 발생한 이벤트들의 배열을 반환한다. 그리고 이 이벤트들은 자동적으로 발생 시간순으로 정렬된다. 그러므로, for-in문을 쓰면, Always문에서 발생한 모든 이벤트들을 순차적으로 처리할 수 있다 (이벤트 기반). 예를 들어서, #17-#19는 QUIT라는 이벤트를 처리하고 있다. 이 이벤트가 트리거되면, 파이게임이 종료된 이후 시스템이 종료되게 된다. (이 외의 함수들은 나중에 언급하겠다.) 기본 형식이 고정되어 있다고 가정하면, 이 형식에 일부 함수들을 적절히 삽입하면 “Hello World!”가 출력되게 할 수 있다. 첫째로, 텍스트의 폰트와 크기가 정해져야 한다. pygame.font.Font(“HoonWhiteCatR,ttf”, 32) 라는 #9의 함수는 주어진 이름의 ttf파일로 폰트를 정하고 크기 (이 경우 32)도 정한다. 이 함수의 반환 값은 myTextFont라는 객체에 저장해 두었다. 그리고 myTextFont객체의 render(“Hello World!”, True, red, green)라는 #10의 함수의 반환 값을 myText라는 객체에 저장해 두었다. render 함수는 텍스트 내용과 색상을 정할 수 있다. 이 경우, 텍스트의 색상은 빨간 색, 텍스트가 아닌 구역의 색상은 초록 색이 된다. myText객체의 get_rect() 라는 #11의 함수의 반환 값을 myTextArea라는 객체에 저장해 두는데, myTextArea는 텍스트를 출력하기 위해 할당된 구역을 의미한다. get_rect()라는 함수는 텍스트의 폰트 크기와 텍스트의 길이를 고려하여 적절한 직사각형 공간을 반환한다. 만약 myTextArea라는 객체의 center라는 멤버 변수를 텍스트가 화면 정중앙에 오게끔 수정한다면, (#12) 텍스트의 위치를 화면 정중앙으로 오게 알 수 있다. 하지만 화면 정중앙을 어떻게 알아낼 수 있을까? 우선, 화면의 전체 크기를 정해야 한다. #8의 pygame.display.set_mode((640,480)) 함수는 캔버스 (크기, 색상, 위치 정보를 가지는 변수들이 display.update함수가 호출되면 그려지는 공간)를 생성하고 그 크기를 640 x 480으로 고정시킨다. 그렇다면, 화면의 정중앙은 (320, 240)이다. 화면의 전체 크기가 확정된다면, 약간의 계산만 하면 모든 종류의 위치를 결정할 수 있게 된다. (2D GUI이므로 출력되는 모든 것은 x, y성분을 가진다) (오른쪽이 x좌표가 크고, 아래쪽이 y좌표가 큼을 헷갈리면 안된다. 앞서서 말한 함수들은 모두 Initial문에 실행되어야 하는 것들이다, 왜나하면 이 정보들은 프로그램 도중 업데이트가 필요 없기 때문이다. 물론, fill함수나 blit함수는 함수의 특성 때문에 Always문에 실행된다. #14의 fill(white) 함수는 캔버스를 단색(하얀색)으로 채우는 기능을 수행한다. #15의 blit(myText, myTextArea)는 특정 객체(myText)를 특정 위치(myTextArea)에 그리는 기능을 수행한다. blit이 fill 이후에 수행되어야 한다. 모든 것이 캔버스에 그려지고 나면, 캔버스의 결과물은 display.update함수가 실행되면 출력되게 된다. 이것이 20줄짜리 소스코드를 위한 설명이었다. 20줄짜리 소스코드 치곤 작동 원리를 이해하는 데 시간이 오래 걸리는 것 같다. 하지만, 이 소스코드에 무언가를 추가하거나 수정하는 것은 그다지 어렵지 않을 것이다. 이 소스코드의 기본 형식과 출력을 위한 기본 단계를 이해했다면 말이다. 여기에 처리 로직을 추가하는 것은 어떨까? 다음 프로젝트에서 진행될 것이다. <참고 코드> :: import pygame, sys #1 from pygame.locals import* #2 white = (255,255,255) #3 red = (255,0,0) #4 green = (0,255,0) #5 pygame.init() #6 pygame.display.set_caption("Hello World Project") #7 myScreen = pygame.display.set_mode((640, 480)) #8 myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) #9 myText = myTextFont.render("Hello World!", True, red, green) #10 myTextArea = myText.get_rect() #11 myTextArea.center = (320, 240) #12 while True: #13 myScreen.fill(white) #14 myScreen.blit(myText, myTextArea) #15 for event in pygame.event.get(): #16 if event.type == QUIT: #17 pygame.quit() #18 sys.exit() #19 pygame.display.update() #20 ././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/3.텍스트 이동/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/3.??? ??/0000755000175100001770000000000014676242436022444 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022300000000000010212 xustar00120 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/3.텍스트 이동/기초 처리.rst.txt 27 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/3.??? ??/?? ??.rst.txt0000644000175100001770000001531614676242340024527 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 기초 처리 ==================================== ==================================== -화면이 움직이기 위한 조건 ==================================== 이전 프로젝트는 게임이 아니라 이미지 한 장 같아 보인다. 출력을 바꾸는 입력이나 처리가 없기 때문이다. 물론, 윈도우의 종료 버튼을 누르는 것은 고려되지 않는다 (프로그램을 종료하는 것에 불과하므로). 우선, 우리는 “Hello World!”가 자동적으로 움직이게 할 것이다. 그러면 이제 프로젝트는 이미지 한 장이 아닌 애니메이션 같아 보일 것이다. 어떻게 텍스트를 움직일까? 우리는 텍스트의 위치가 Initial statement에서 초기화됨을 알고 있다. 그렇다면, 이 위치가 Always statement에서 업데이트되게 하면 된다. 물론, 추가적인 변수가 필요할 것이다. .. image:: Bagic-PROCESS-sourcecode.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-PROCESS-resultscreen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-PROCESS-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Moving World 프로젝트의 소스 코드 일부 와 실행 결과) (Moving World가 알카노이드의 공이나 DVD 화면보호기처럼 움직인다.) #1 - #5가 Initial문의 뒷부분에 추가되었다. 또한, 다중 if-else문은 Always문의 앞부분에 추가되었고, #11이 Always문의 뒷부분에 추가되었다. #2 - #10이 무엇을 처리하는지는 쉽다. Always문이 시작될 때 Moving World의 좌표에 해당되는 변수를 바꾸고 있다. 하지만 문제가 있다. Moving World는 얼마나 빠를까? Moving World의 변위는 루트2 임은 확실하다. (피타고라스 정리를 이용하면) 하지만 얼마나 자주 Moving World의 변위가 바뀌는가? 이것은 Always문의 시간 복잡도를 분석하지 않는 이상 알아낼 수 없다. (이것은 Always문이 시작하는 빈도에 따라 달라지므로) 그리고 시간 복잡도는 컴퓨터마다 다르다. 그래서 이 시간은 고정될 수 없다. 우리는 이 프로젝트에 고정 속도라는 개념을 추가해야 한다. 어떻게? #1과 #11을 보면, Initial statement에 pygame.time.Clock()함수가, Always문에 tick(60)함수가 있음을 확인할 수 있다. 60이라는 수는 여기서 FPS(Frame Per Second)를 의미한다. FPS가 1초에 화면이 얼마나 자주 바뀌는지를 의미한다. 화면을 바꾸는(업데이트하는) 파이게임의 함수는 무엇인가? 바로 Pygame.display.update() 함수이다. 그러므로, FPS는 1초에 Always문이 실행되는 횟수를 의미하게 된다. 이는 Always문 속에는 단 하나의 Pygame.display.update() 함수가 존재하기 때문이다. FPS는 일종의 선택적인 딜레이 함수와 같은 기능(프로그램 처리 속도에 따라)을 한다, 선택적인 가속 함수가 아니므로, FPS값이 너무 크면 FPS대로 작동하지 않을 수 있다. 우리가 프로젝트 내에서 시간(FPS)을 고정시켜 두면, 특정 게임 오브젝트의 적절한 변위만 찾아내면 그 오브젝트의 속도를 정할 수 있다. pygame.time.Clock()은 게임이 시작되기 이전 속도를 고정시키는 기능을 한다. tick함수는 Pygame.display.update()보다 나중에 와야 한다. 왜냐하면 tick함수는 화면이 몇 번 업데이트되었는지를 계산하기 때문이다. Pygame.display.update() 함수보다 나중에 실행되야 하는 몇 안되는 함수 중 하나이다. 화면이 업데이트 될 때, 시간을 고정하는 방법을 알았다. 정지된 화면보다는 정신없이 움직이는 화면이 게임에선 많으므로, 이를 반드시 알고 있어야 한다. 그러나, 이 프로젝트는 결과가 너무 쉽게 예측되기 때문에 게임이 아닌 것처럼 보인다는 단점은 아직도 있다. (결과를 바꿀 입력이 없으므로) 이젠, 입력 로직이 추가 되어야만 한다. <참고 코드> :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Moving World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Moving World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() #1 x = 0 #2 y = 0 #3 moveRight = 1 #4 moveUp= 1 #5 while True: if (moveRight == 1): #6 x = x + 1 if (x >= 320 - 75): moveRight = 0 elif (moveRight == 0): #7 x = x - 1 if (x <= -320 + 75): moveRight = 1 if (moveUp == 1): #8 y = y + 1 if (y >= 240 - 15): moveUp = 0 elif (moveUp == 0): #9 y = y - 1 if (y <= -240 + 15): moveUp = 1 myTextArea.center = (320 + x, 240 + y) #10 myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(60) #11 ././@PaxHeader0000000000000000000000000000017600000000000010221 xustar0098 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/4.텍스트 조종/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/4.??? ??/0000755000175100001770000000000014676242436022445 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000022300000000000010212 xustar00120 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/4.텍스트 조종/기초 입력.rst.txt 27 mtime=1727612127.991112 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/4.??? ??/?? ??.rst.txt0000644000175100001770000001525314676242340024530 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 기초 입력 ==================================== ==================================== -새로운 입력은 새로운 이벤트 ==================================== 생각해보면, 우리는 무언가를 출력하는 방법을 먼저 배우고(“Hello World”를 생각해봐라) 무언가를 입력하는 방법은 나중에 배운다. 왜 그런가? 왜냐면 입력은 몇몇 프로그램에선 필수조건이 아니지만, 출력은 모든 프로그램에선 항상 필수조건이기 때문이다. (프로그램의 정의: 0개 이상의 입력, 1개 이상의 출력) 그러나, 모든 게임은 입력이 필요하다. 그것이 우리는 “나는 게임을 Play한다”라고 말하는 이유이다. Play라는 단어는 몸의 일부분(아마도 손가락)을 움직인다는 뜻이다. 어쨌든, 이 프로젝트가 진짜 게임이 되기 위해 입력 로직을 추가해보자. .. image:: Bagic-INPUT-sourcecode.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-sourcecode.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: Bagic-INPUT-resultscreen.png :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 220, 140 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("Bagic-INPUT-resultscreen.png") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() (Controlling World 프로젝트의 소스 코드 일부 와 실행 결과) (Controlling World가 키보드 방향키를 누르면 해당 방향으로 움직인다.) 이전 프로젝트와 비교하여 2개의 큰 차이점이 생겼다. 첫째는 #5에 KEYDOWN 이벤트가 트리거 되었는지 아닌지를 판단하는 것이다. 다른 줄들은 이전의 알고리즘의 약간 다르게 동작하도록 바꾼 것에 불과하다. 똑같은 명령어가 Event문 앞에 있느냐 뒤에 있느냐 결과는 완전히 달라질 수 있음을 우리는 알고 있다. 좌표를 업데이트하는 경우, Event문이 종료되고 이루어짐에 주목해라. (세팅 된 후 업데이트된다. 그것이 두번째 차이점이다.) 객체 event.key는 키보드에 마지막으로 눌린 키를 의미한다. 구체적인 키의 이름을 보아라. K_UP, K_LEFT, K_DOWN, K_RIGHT. 매우 직관적인 K_시리즈이다. (Header의 pygame.locals로부터 이용할 수 있다.) 다른 키의 이름으로는 K_8, K_a, K_L, K_LCTRL, K_DELETE, L_F4등이 있다. 이런 키들도 추가적인 도움 없이 직관적으로 이해할 수 있다. 모든 키 이름 목록은 https://www.pygame.org/docs/ref/key.html#pygame.key.name 에서 확인할 수 있다. KEYDOWN은 “이 키는 이전에는 눌리지 않았지만, 지금은 눌렸다.”를 의미하고, “이전부터 지금까지 계속 눌린 채로 있다.”를 의미하지는 않는다. 눌려있는 경우를 다루기 위해서는, KEYUP이라는 이벤트를 추가적으로 확인해야 한다. (변수와 알고리즘이 더 추가된다) 이는 심화 부분에서 다루겠다. 입력을 추가하는 것은 단순히 이벤트 인자를 추가하는 것이기 때문에 쉽다. 이제 게임 프로젝트는 완성되었다. 왜냐하면 프로젝트가 출력, 처리, 입력을 가지고 있기 때문이다. 맞는가? 아니다. 이 프로젝트는 게임 오브젝트간 상호작용이 전혀 없고, 플레이 규칙(제약조건(HP, 시간 등)도 없고 점수도 없다)이 없고, 즐길 것(동기부여 요소, 입력 출력의 다양성, 컨텐츠)이 없기 때문에 게임이라고 불릴 수 없다. 우선, 게임의 인터페이스/시스템을 풍성하게 하기 위해 우리는 심화된 입력(마우스 상태 반영), 처리(적절한 함수화), 출력(이미지, 소리 및 내부 데이터 시각화 방법)을 알아야 한다. 물론, 기초 단계에서의 경험이 반드시 도움이 된다. 심화 단계로 가보자! <참고 코드> :: import pygame, sys from pygame.locals import* white = (255,255,255) red = (255,0,0) green = (0,255,0) pygame.init() pygame.display.set_caption("Controlling World Project") myScreen = pygame.display.set_mode((640, 480)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render("Controlling World!", True, red, green) myTextArea = myText.get_rect() myTextArea.center = (320, 240) fpsClock = pygame.time.Clock() x = 0 y = 0 moveRight = 0 #1 moveDown = 0 #2 while True: moveRight = 0 #3 moveDown = 0 #4 myTextArea.center = (320 + x, 240 + y) myScreen.fill(white) myScreen.blit(myText, myTextArea) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: #5 if event.key == K_UP: moveDown = -1 moveRight = 0 elif event.key == K_LEFT: moveDown = 0 moveRight = -1 elif event.key == K_DOWN: moveDown = 1 moveRight = 0 elif event.key == K_RIGHT: moveDown = 0 moveRight = 1 if(moveRight == 1): #6 x = x + 10 elif(moveRight == -1): #7 x = x - 10 if(moveDown == 1): #8 y = y + 10 elif(moveDown == -1): #9 y = y - 10 pygame.display.update() ././@PaxHeader0000000000000000000000000000016300000000000010215 xustar0087 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/5.HP바/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/5.HP?/0000755000175100001770000000000014676242436022242 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024000000000000010211 xustar00133 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/5.HP바/심화 출력 그리고 심화 처리.rst.txt 27 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/5.HP?/?? ?? ??? ?? ??.rst.txt0000644000175100001770000002145714676242340025361 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 그리고 심화 처리 - 함수화 ==================================== 우선, 텍스트가 아닌, 도형을 시각화 하겠다. HP 바는 어떤가? 만약 HP의 최대값이 고정되어 있고 오직 현재 HP 값만이 변한다면, 이 두 데이터를 출력하는 가장 쉬운 방법은 무엇인가? .. image:: AdvancedOutputProcess1.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 변수의 값이 변할 때마다 텍스트를 다시 렌더링 하기만 하면 된다. 변수의 값은 어떻게 바꾸는가? 그것은 Event문에서 이루어진다. (키보드 위 또는 아래를 눌러 HP를 조절하게 하였다.) 이전과 동일한 방법이다. 하지만, 이것들은 여전히 텍스트이다. 아직 충분히 시각화 되지 않는다. 이 데이터들을 어떻게 더 상세하게 시각화 할까? 총 탄창에서 아이디어를 따올 수 있다. HP는 정수 값이고, 불연속적 값을 가지므로, 아래와 같이 출력될 수 있다. .. image:: AdvancedOutputProcess4.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess5.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputProcess6.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputProcess6.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 훨씬 나아졌다. 그리는 로직은 #6을 확인하면 된다. 로직은 단순하다. 먼저, 큰 검은 색 직사각형을 그린다. 그 다음, 현재 HP을 따져서 작은 빨간 색 직사각형들을 0개 또는 최대 개수만큼 그린다. 마지막으로, 작은 직사각형들에 하얀 테두리를 그린다. pygame.draw.rect 함수에선 위치 변수로 4개의 매개 변수가 사용된 것을 확인할 수 있는데 (첫번째 변수는 캔버스 변수이고, 두번째 변수는 색상 변수, 네번째 변수는 두께 변수이다.) 이 4개의 매개 변수의 용도가 무엇인지는 직접 설명하는 것보다, 직접 값을 변경하면서 확인하는 것이 가장 쉽게 이해할 수 있다. 3개의 값이 20일 때 하나의 값 만을 10또는 30으로 바꿔 보아라! 그리고, 이제는 본격적으로 함수화를 해야 한다. Always문과 Event문을 main함수에 담았는데, 이 경우 main함수를 프로그램이 찾을 수 있도록 #7에서 추가적인 처리를 해야 한다. 그 다음 drawHP라는 새로운 함수를 만들었다. 게임에서의 함수화 아이디어는 GUI 프로그램을 만들 때의 함수화 아이디어와 크게 다르지 않다. 예를 들면, 하나의 변수를 출력하는 하나의 출력 함수를 각각 만들어 두는 것이 좋을 것이다. 물론, 각각의 변수가 출력 될 좌표를 정하는 것은 화면 전체를 디자인할 때 선행되어야 할 것이다. <참고 코드> :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("HP bar Project") width = 640 #1 height = 480 #2 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) #3 fpsClock = pygame.time.Clock() def main(): #4 HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) #5 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): #6 r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return if __name__ == '__main__': #7 main() ././@PaxHeader0000000000000000000000000000016700000000000010221 xustar0091 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/6.버튼들/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/6.???/0000755000175100001770000000000014676242436022211 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024400000000000010215 xustar00137 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/6.버튼들/심화 입력 그리고 심화 출력.rst.txt 27 mtime=1727612127.992112 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/6.???/?? ?? ??? ?? ??.rst.txt0000644000175100001770000002132614676242340025323 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 그리고 심화 출력 – 버튼 ==================================== KEYDOWN이 사용되었지만, 아직도 이 게임이 완전한 GUI가 아닌 것처럼 보이는 이유는 GUI가 입력은 없고 오직 출력(프린트)하는 데에만 사용되었기 때문이다. GUI에서의 입력이란 특정한 위치에서의 마우스 이벤트를 처리하는 것이다. HP를 증가시키거나 감소시키는 버튼 2개를 만드는 것은 어떨까? .. image:: AdvancedInputOutput1.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 버튼 2개를 만드는 것은 쉽다. 버튼을 보면, 뭔가 특이한 효과가 적용되어 있음을 알 수 있다. 어떻게 한 것인가? 이전의 아이디어처럼 단순하다. 첫째, 큰 정사각형을 그린다. 둘째, 내용은 없고 두께만 있는 작은 정사각형을 그린다. 하지만 이 버튼들은 아직 출력용이다. 이 버튼들을 위한 클릭 가능 공간을 만들어야 한다. .. image:: AdvancedInputOutput3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput4.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput4.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedInputOutput5.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedInputOutput5.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() 이제 Event문에 MOUSEBUTTONUP이 추가되었다. 마우스가 UP 된 것은 키보드가 DOWN된 것과 동일한 의미를 가진다. 만약 MOUSEBUTTONUP이 활성화되면, event.pos는 x값과 y값을 기록해야 하는데, 이 것은 클릭 지점을 나타낸다. 그러므로, 클릭이 특정 정사각형 내부에서 일어났는지 아닌 지는 collidepoint를 확인하면 된다. 만약 내부였다면, “사용자가 특정 영역 내부를 클릭했다”를 의미하게 된다. 그 다음, 변수를 업데이트하는 적절한 처리만이 필요하게 된다. 입력을 위한 두 변수가 존재하고, (Event문에 있음) (270, 425, 45, 45)와 (325, 425, 45, 45). 출력을 위한 두 변수도 존재함을 확인하라. (drawButtons에 있음) (margin, height - r -10 , r, r)과 (margin + r + r_margin, height - r - 10, r, r). 버튼의 경우, 입력 영역과 출력 영역이 동일해야 한다. 그렇지 않다면, 버튼의 판정 범위는 오해의 소지가 될 수 있다! 변수(출력 용)들을 구체적인 계산을 통해 상수(입력 용) 값을 알아내기 싫다면, 이 변수들을 동일한 변수로 두는 것이 좋은 생각일 것이다. 두 영역을 하나로 묶을 수 있는 함수는 없으므로, 이 점은 항상 신경 써야 한다. <참고 코드> :: import pygame, sys from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Array buttons Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: #1 x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): if HP != 10: HP = HP + 1 elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): if HP != 0: HP = HP - 1 pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, black, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, red, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000016700000000000010221 xustar0091 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/7.게임판/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/7.???/0000755000175100001770000000000014676242436022212 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000024200000000000010213 xustar00134 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/7.게임판/심화 출력 그리고 조금 더.rst.txt 28 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/7.???/?? ?? ??? ?? ?.rst.txt0000644000175100001770000002206214676242340025223 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 그리고 조금 더! ==================================== 사실, 모든 것들이 게임 같아 보이진 않는다. 이제, 이 프로그램에 규칙을 추가하려 한다. 그러면, 이 프로그램은 게임이 된다. 규칙은 간단하다: 5x5 2차원 배열에서 빨간 블록, 검은 블록의 수를 세고, 더 많은 색상의 블록을 고르는 것이다! 정답이라면 HP는 증가하고 오답이라면, HP는 감소한다. 그 다음, 다음 문제를 위한 새로운 2차원 배열이 그려진다! 대단히 단순하지만 이 튜토리얼 내에서 만들어 질 수 있는 게임이다. 우선, 2차원 배열을 만들고 출력해야 한다. 어떻게? 우리는 정수 데이터(0차원 배열과 같음)나 두 버튼(1차원 배열과 같음)을 출력하는 법을 알 고 있다. 2차원 배열은 요소 하나만 더 추가되면 된다. .. image:: AdvancedOutputAlpha1.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha1.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputAlpha2.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha2.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() .. image:: AdvancedOutputAlpha3.gif :class: inlined-right .. code-block:: python import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("AdvancedOutputAlpha3.gif") ballrect = ball.get_rect() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() generateboard 함수는 무작위로 만들어진 2차원 배열과 빨간 블록, 검은 블록의 개수를 반환한다. 더 설명할 필요도 없다. 또한, printboard 함수는 1차원 배열처럼 2차원 배열을 출력한다. 출력 색상은 board[i][j]가 1인지 아닌 지에 따라 달라진다. 이 게임판은 단순히 출력 용이다. 테두리를 처리하려면 부분의 크기를 가지고 전체 크기를 계산해야 해서 짜증날 수 있다. 이것은 프롤로그에서 언급한 대로, 파이게임 갖는 특성 (실행 결과는 GUI이지만 코드 작성은 CUI) 때문이다. 사실, 이 구현한 게임은 개선의 여지가 많다. 버튼을 이미지 파일로 바꾸면? 정답이거나 오답일 때 효과음을 넣으면? 시간 제한을 넣으면? 정답이거나 오답일 때 시각적 효과를 넣으면? 게임판을 더 크게 하고 색상을 더 다양히 넣는다면? 이 인터페이스를 가지고 Flood-it을 구현한다면? 구현한 게임이 단순하기 때문에 선택지는 많다. <참고 코드> :: import pygame, sys, random from pygame.locals import* maxHP = 10 white = (255,255,255) gray = (127,127,127) black = (0,0,0) red = (255,0,0) green = (0,255,0) blue = (0,0,255) pygame.init() pygame.display.set_caption("Red or Black Project") width = 640 height = 480 myScreen = pygame.display.set_mode((width, height)) myTextFont = pygame.font.Font("HoonWhitecatR.ttf", 32) myText = myTextFont.render((str(maxHP) + "/" + str(maxHP)), True, red, gray) myTextArea = myText.get_rect() myTextArea.center = (width/2, height/2) fpsClock = pygame.time.Clock() def main(): HP = 5 board, b_red, b_black = generateBoard(5,5) #1 while True: myText = myTextFont.render((str(HP) + "/" + str(maxHP)), True, red, gray) myScreen.fill(gray) myScreen.blit(myText, myTextArea) drawHP(HP) drawButtons() drawBoard(board) #2 for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN: if event.key == K_UP: if HP != 10: HP = HP + 1 elif event.key == K_DOWN: if HP != 0: HP = HP - 1 elif event.type == MOUSEBUTTONUP: x, y = event.pos if pygame.Rect(270, 425, 45, 45).collidepoint(x, y): #3 if b_red >= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red < b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) elif pygame.Rect(325, 425, 45, 45).collidepoint(x, y): #4 if b_red <= b_black: if HP != 10: HP = HP + 1 board, b_red, b_black = generateBoard(5,5) elif b_red > b_black: if HP != 0: HP = HP - 1 board, b_red, b_black = generateBoard(5,5) pygame.display.update() fpsClock.tick(60) def drawHP(HP): r = int((height - 40) / maxHP) pygame.draw.rect(myScreen, gray, (20, 20, 20, 20 + ((maxHP - 0.5) * r))) for i in range(maxHP): if HP >= (maxHP - i): pygame.draw.rect(myScreen, blue, (20, 20 + (i * r), 20, r)) pygame.draw.rect(myScreen, white, (20, 20 + (i * r), 20, r), 1) return def drawButtons(): r = 45 r_margin = 10 colors = [red, black] num = 2 margin = int((width - ((r * num) + (r_margin * (num - 1)))) / 2) for i in range(0, num): left = margin + (i * r) + (i * r_margin) up = height - r - 10 pygame.draw.rect(myScreen, colors[i], (left, up, r, r)) pygame.draw.rect(myScreen, gray, (left + 2, up + 2, r - 4, r - 4), 2) def generateBoard(width, height): #5 board = [] b_red = 0 b_black = 0 for x in range(width): column = [] for y in range(height): column.append(random.randint(0, 1)) board.append(column) for x in range(width): for y in range(height): if(board[x][y] == 1): b_red = b_red + 1 elif(board[x][y] == 0): b_black = b_black + 1 return board, b_red, b_black def drawBoard(board): #6 r = 50 b_width = 5 b_height = 5 l_margin = int((width - (b_width * r)) / 2) u_margin = int((height - (b_height * r)) / 2) for x in range(5): for y in range(5): left = x * r + l_margin up = y * r + u_margin if board[x][y] == 1: color = red; elif board[x][y] == 0: color = black pygame.draw.rect(myScreen, color, (left, up, r, r)) left = l_margin up = u_margin pygame.draw.rect(myScreen, white, (left-1, up-1, r * 5 + 1, r * b_height + 1), 1) if __name__ == '__main__': main() ././@PaxHeader0000000000000000000000000000017200000000000010215 xustar0094 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/8.에필로그/ 28 mtime=1727612190.0071256 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/8.????/0000755000175100001770000000000014676242436022312 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000021700000000000010215 xustar00115 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/8.에필로그/에필로그.rst.txt 28 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/8.????/????.rst.txt0000644000175100001770000000423314676242340024331 0ustar00runnerdocker==================================== Author: Youngwook Kim (Korean) ==================================== ==================================== Contact: rumia0601@gmail.com ==================================== ==================================== 에필로그 ==================================== 그러나, 튜토리얼은 여기에서 끝이 난다. 이 튜토리얼은 파이게임의 극소수만을 다뤘다. 하지만 걱정하지 마라. 프로그램은 사람이 할 수 있는 가장 창의적인 활동이다. 임마누엘 칸트는 “천재성이란 어떤 대상에 규칙을 부여할 수 있는 능력이다”라고 말했다. 프로그래밍은 규칙을 만들어서 컴퓨터에게 입력시키는 것이다. 규칙이 만들어진다면, 컴퓨터는 규칙 내에서 무엇이든지 할 수 있다. 그러므로, 경우의 수가 매우 커지게 된다. 결론이 무엇인가? 출력이 입력보다 크다는 것이다. 우리는 우리의 지식만으로 지식보다 더 폭넓은 프로그램을 구현할 수 있다. 또는 우리는 새로운 지식을 기존의 지식에 연결시키면서 습득할 수도 있다. 그것이 프로그래밍의 특성이다. 게임도 마찬가지이다. “난수”라는 개념은 모든 게임(이미 구현한 게임도 포함!)에서 대단히 중요한 개념이다. 난수까지 고려되었을 때 경우의 수는 매우 커지게 된다. 만약 하나의 난수가 다른 난수까지 영향을 미치게 된다면, “눈사태”와 같은 효과가 나게 된다. 그것이 게임이 흥미로운 이유이다. “난수”라는 개념은 소설, 음악, 영화 등은 가질 수 없는 게임만의 특성이다. 테트리스를 생각해 보아라. 알렉세이 파지트노프가 테트리스를 위해 얼만큼의 시간을 투자했을까? 이 시간이 35년 넘게 전세계 사람들이 플레이 한 시간보다 클까? 이것이 바로 프로그래밍과 게임이 갖는 두 특성이 완벽히 발휘된 예시이다. 그러므로, 게임을 만드는 것은 눈사태를 일으키는 것과 같다. 이제 아무 게임이나 만들 시간이다! 배우고, 활용하고, 시행 착오를 겪어 보자! ././@PaxHeader0000000000000000000000000000017100000000000010214 xustar0093 path=pygame-2.6.1/docs/generated/_sources/tut/ko/빨간블록 검은블록/개요.rst.txt 28 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_sources/tut/ko/???? ????/??.rst.txt0000644000175100001770000000123314676242340023307 0ustar00runnerdocker한국어 튜토리얼 ============================= 한국어 튜토리얼 ----------------------------- | :doc:`1 부 <1.프롤로그/소개>` 프롤로그/소개 :doc:`2 부 <2.텍스트 출력/기초 템플릿과 출력>` 텍스트 출력 :doc:`3 부 <3.텍스트 이동/기초 처리>` 텍스트 이동 :doc:`4 부 <4.텍스트 조종/기초 입력>` 텍스트 조종 :doc:`5 부 <5.HP바/심화 출력 그리고 심화 처리>` HP바 :doc:`6 부 <6.버튼들/심화 입력 그리고 심화 출력>` 버튼들 :doc:`7 부 <7.게임판/심화 출력 그리고 조금 더>` 게임판 :doc:`8 부 <8.에필로그/에필로그>` 에필로그././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9931118 pygame-2.6.1/docs/generated/_sources/tut/newbieguide.rst.txt0000644000175100001770000006020014676242340023600 0ustar00runnerdocker.. TUTORIAL: David Clark's Newbie Guide To Pygame .. include:: common.txt ************************** Newbie Guide to Pygame ************************** .. title:: A Newbie Guide to pygame A Newbie Guide to pygame ======================== or **Things I learned by trial and error so you don't have to,** or **How I learned to stop worrying and love the blit.** Pygame_ is a python wrapper for SDL_, written by Pete Shinners. What this means is that, using pygame, you can write games or other multimedia applications in Python that will run unaltered on any of SDL's supported platforms (Windows, Linux, Mac, and others). Pygame may be easy to learn, but the world of graphics programming can be pretty confusing to the newcomer. I wrote this to try to distill the practical knowledge I've gained over the past year or so of working with pygame, and its predecessor, PySDL. I've tried to rank these suggestions in order of importance, but how relevant any particular hint is will depend on your own background and the details of your project. Get comfortable working in Python. ---------------------------------- The most important thing is to feel confident using python. Learning something as potentially complicated as graphics programming will be a real chore if you're also unfamiliar with the language you're using. Write a few sizable non-graphical programs in python -- parse some text files, write a guessing game or a journal-entry program or something. Get comfortable with string and list manipulation -- know how to split, slice and combine strings and lists. Know how ``import`` works -- try writing a program that is spread across several source files. Write your own functions, and practice manipulating numbers and characters; know how to convert between the two. Get to the point where the syntax for using lists and dictionaries is second-nature -- you don't want to have to run to the documentation every time you need to slice a list or sort a set of keys. Get comfortable using file paths -- this will come in handy later when you start loading assets and creating save files. Resist the temptation to ask for direct help online when you run into trouble. Instead, fire up the interpreter and play with the problem for a few hours, or use print statements and debugging tools to find out what's going wrong in your code. Get into the habit of looking things up in the official `Python documentation`_, and Googling error messages to figure out what they mean. This may sound incredibly dull, but the confidence you'll gain through your familiarity with python will work wonders when it comes time to write your game. The time you spend making python code second-nature will be nothing compared to the time you'll save when you're writing real code. Recognize which parts of pygame you really need. ------------------------------------------------ Looking at the jumble of classes at the top of the pygame documentation index may be confusing. The important thing is to realize that you can do a great deal with only a tiny subset of functions. Many classes you'll probably never use -- in a year, I haven't touched the ``Channel``, ``Joystick``, ``cursors``, ``surfarray`` or ``version`` functions. Know what a surface is. ----------------------- The most important part of pygame is the surface. Just think of a surface as a blank piece of paper. You can do a lot of things with a surface -- you can draw lines on it, fill parts of it with color, copy images to and from it, and set or read individual pixel colors on it. A surface can be any size (within reason) and you can have as many of them as you like (again, within reason). One surface is special -- the one you create with :func:`pygame.display.set_mode()`. This 'display surface' represents the screen; whatever you do to it will appear on the user's screen. So how do you create surfaces? As mentioned above, you create the special 'display surface' with ``pygame.display.set_mode()``. You can create a surface that contains an image by using :func:`pygame.image.load()`, or you can make a surface that contains text with :func:`pygame.font.Font.render()`. You can even create a surface that contains nothing at all with :func:`pygame.Surface()`. Most of the surface functions are not critical. Just learn :meth:`.Surface.blit()`, :meth:`.Surface.fill()`, :meth:`.Surface.set_at()` and :meth:`.Surface.get_at()`, and you'll be fine. Use Surface.convert(). ---------------------- When I first read the documentation for :meth:`.Surface.convert()`, I didn't think it was something I had to worry about. 'I only use PNGs, therefore everything I do will be in the same format. So I don't need ``convert()``';. It turns out I was very, very wrong. The 'format' that ``convert()`` refers to isn't the *file* format (i.e. PNG, JPEG, GIF), it's what's called the 'pixel format'. This refers to the particular way that a surface records individual colors in a specific pixel. If the surface format isn't the same as the display format, SDL will have to convert it on-the-fly for every blit -- a fairly time-consuming process. Don't worry too much about the explanation; just note that ``convert()`` is necessary if you want to get any kind of speed out of your blits. How do you use convert? Just call it after creating a surface with the :func:`.image.load()` function. Instead of just doing:: surface = pygame.image.load('foo.png') Do:: surface = pygame.image.load('foo.png').convert() It's that easy. You just need to call it once per surface, when you load an image off the disk. You'll be pleased with the results; I see about a 6x increase in blitting speed by calling ``convert()``. The only times you don't want to use ``convert()`` is when you really need to have absolute control over an image's internal format -- say you were writing an image conversion program or something, and you needed to ensure that the output file had the same pixel format as the input file. If you're writing a game, you need speed. Use ``convert()``. Be wary of outdated, obsolete, and optional advice. --------------------------------------------------- Pygame has been around since the early 2000s, and a lot has changed since then -- both within the framework itself and within the broader computing landscape as a whole. Make sure to check the dates on materials you read (including this guide!), and take older advice with a grain of salt. Here are some common things that stick out to me: **Dirty Rects & performance 'tricks'** When you read older bits of pygame documentation or guides online, you may see some emphasis on only updating portions of the screen that are dirty, for the sake of performance (in this context, "dirty" means the region has changed since the previous frame was drawn). Generally this entails calling :func:`pygame.display.update()` (with a list of rects) instead of :func:`pygame.display.flip()`, not having scrolling backgrounds, or even not filling the screen with a background color every frame because pygame supposedly can't handle it. Some of pygame's API is designed to support this paradigm as well (e.g. :func:`pygame.sprite.RenderUpdates`), which made a lot of sense in the early years of pygame. In the present day (2022) though, most modest desktop computers are powerful enough to refresh the entire display once per frame at 60 FPS and beyond. You can have a moving camera, or dynamic backgrounds and your game should run totally fine at 60 FPS. CPUs are more powerful nowadays, and you can use ``display.flip()`` without fear. That being said there are still some times when this old technique is still useful for squeezing out a few extra FPS. For example, with a single screen game like an Asteroids or Space Invaders. Here is the rough process for how it works: Instead of updating the whole screen every frame, only the parts that changed since the last frame are updated. You do this by keeping track of those rectangles in a list, then calling ``update(the_dirty_rectangles)`` at the end of the frame. In detail for a moving sprite: * Blit a piece of the background over the sprite's current location, erasing it. * Append the sprite's current location rectangle to a list called dirty_rects. * Move the sprite. * Draw the sprite at its new location. * Append the sprite's new location to my dirty_rects list. * Call ``display.update(dirty_rects)`` Even though this technique is not required for making performant 2D games with modern CPUs, it is still useful to be aware of. There are also still plenty of other ways to accidentally tank your game's performance with poorly optimized rendering logic. For example, even on modern hardware it's probably too slow to call ``set_at`` once per pixel on the display surface. Being mindful of performance is still something you'll have to do. There just aren't that many 'one neat trick to fix your code performance' tips. Every game is different and there are different problems and different algorithms to solve them efficiently in each type of game. Pretty much every time your 2D game code is failing to hit a reasonable frame rate the underlying cause turns out to be bad algorithm or a misunderstanding of fundamental game design patterns. If you are having performance problems, first make sure you aren't loading files repeatedly in your game loop, then use one of the many options for profiling your code to find out what is taking up the most time. Once you are armed with at least some knowledge on why your game is slow, try asking the internet (via google), or the pygame community if they've got some better algorithms to help you out. **HWSURFACE and DOUBLEBUF** The HWSURFACE :func:`.display.set_mode()` flag does nothing in pygame versions 2.0.0 and later (you can check the docs if you don't believe me)! There's no reason to use it anymore. Even in pygame 1, its effect is pretty nuanced and generally misunderstood by most pygame users. It was never a magic speed-up flag, unfortunately. DOUBLEBUF still has some use, but is also not a magic speed up flag. **The Sprite class** You don't need to use the built-in :class:`.Sprite` or :class:`.Group` classes if you don't want to. In a lot of tutorials, it may seem like ``Sprite`` is the fundamental "GameObject" of pygame, from which all other objects must derive, but in reality it's pretty much just a wrapper around a ``Rect`` and a ``Surface``, with some additional convenience methods. You may find it more intuitive (and fun) to write your game's core logic and classes from scratch. There is NO rule six. --------------------- Don't get distracted by side issues. ------------------------------------ Sometimes, new game programmers spend too much time worrying about issues that aren't really critical to their game's success. The desire to get secondary issues 'right' is understandable, but early in the process of creating a game, you cannot even know what the important questions are, let alone what answers you should choose. The result can be a lot of needless prevarication. For example, consider the question of how to organize your graphics files. Should each frame have its own graphics file, or each sprite? Perhaps all the graphics should be zipped up into one archive? A great deal of time has been wasted on a lot of projects, asking these questions on mailing lists, debating the answers, profiling, etc, etc. This is a secondary issue; any time spent discussing it should have been spent coding the actual game. The insight here is that it is far better to have a 'pretty good' solution that was actually implemented, than a perfect solution that you never got around to writing. Rects are your friends. ----------------------- Pete Shinners' wrapper may have cool alpha effects and fast blitting speeds, but I have to admit my favorite part of pygame is the lowly :class:`.Rect` class. A rect is simply a rectangle -- defined only by the position of its top left corner, its width, and its height. Many pygame functions take rects as arguments, and they also take 'rectstyles', a sequence that has the same values as a rect. So if I need a rectangle that defines the area between 10, 20 and 40, 50, I can do any of the following:: rect = pygame.Rect(10, 20, 30, 30) rect = pygame.Rect((10, 20, 30, 30)) rect = pygame.Rect((10, 20), (30, 30)) rect = (10, 20, 30, 30) rect = ((10, 20, 30, 30)) If you use any of the first three versions, however, you get access to Rect's utility functions. These include functions to move, shrink and inflate rects, find the union of two rects, and a variety of collision-detection functions. For example, suppose I'd like to get a list of all the sprites that contain a point (x, y) -- maybe the player clicked there, or maybe that's the current location of a bullet. It's simple if each sprite has a .rect member -- I just do:: sprites_clicked = [sprite for sprite in all_my_sprites_list if sprite.rect.collidepoint(x, y)] Rects have no other relation to surfaces or graphics functions, other than the fact that you can use them as arguments. You can also use them in places that have nothing to do with graphics, but still need to be defined as rectangles. Every project I discover a few new places to use rects where I never thought I'd need them. Don't bother with pixel-perfect collision detection. ---------------------------------------------------- So you've got your sprites moving around, and you need to know whether or not they're bumping into one another. It's tempting to write something like the following: * Check to see if the rects are in collision. If they aren't, ignore them. * For each pixel in the overlapping area, see if the corresponding pixels from both sprites are opaque. If so, there's a collision. There are other ways to do this, with ANDing sprite masks and so on, but any way you do it in pygame, it's probably going to be too slow. For most games, it's probably better just to do 'sub-rect collision' -- create a rect for each sprite that's a little smaller than the actual image, and use that for collisions instead. It will be much faster, and in most cases the player won't notice the imprecision. Managing the event subsystem. ----------------------------- Pygame's event system is kind of tricky. There are actually two different ways to find out what an input device (keyboard, mouse or joystick) is doing. The first is by directly checking the state of the device. You do this by calling, say, :func:`pygame.mouse.get_pos()` or :func:`pygame.key.get_pressed()`. This will tell you the state of that device *at the moment you call the function.* The second method uses the SDL event queue. This queue is a list of events -- events are added to the list as they're detected, and they're deleted from the queue as they're read off. There are advantages and disadvantages to each system. State-checking (system 1) gives you precision -- you know exactly when a given input was made -- if ``mouse.get_pressed([0])`` is 1, that means that the left mouse button is down *right at this moment*. The event queue merely reports that the mouse was down at some time in the past; if you check the queue fairly often, that can be ok, but if you're delayed from checking it by other code, input latency can grow. Another advantage of the state-checking system is that it detects "chording" easily; that is, several states at the same time. If you want to know whether the ``t`` and ``f`` keys are down at the same time, just check:: if key.get_pressed[K_t] and key.get_pressed[K_f]: print("Yup!") In the queue system, however, each keypress arrives in the queue as a completely separate event, so you'd need to remember that the ``t`` key was down, and hadn't come up yet, while checking for the ``f`` key. A little more complicated. The state system has one great weakness, however. It only reports what the state of the device is at the moment it's called; if the user hits a mouse button then releases it just before a call to ``mouse.get_pressed()``, the mouse button will return 0 -- ``get_pressed()`` missed the mouse button press completely. The two events, ``MOUSEBUTTONDOWN`` and ``MOUSEBUTTONUP``, will still be sitting in the event queue, however, waiting to be retrieved and processed. The lesson is: choose the system that meets your requirements. If you don't have much going on in your loop -- say you're just sitting in a ``while True`` loop, waiting for input, use ``get_pressed()`` or another state function; the latency will be lower. On the other hand, if every keypress is crucial, but latency isn't as important -- say your user is typing something in an editbox, use the event queue. Some key presses may be slightly late, but at least you'll get them all. A note about ``event.poll()`` vs. ``wait()`` -- ``poll()`` may seem better, since it doesn't block your program from doing anything while it's waiting for input -- ``wait()`` suspends the program until an event is received. However, ``poll()`` will consume 100% of available CPU time while it runs, and it will fill the event queue with ``NOEVENTS``. Use ``set_blocked()`` to select just those event types you're interested in -- your queue will be much more manageable. Another note about the event queue -- even if you don't want to use it, you must still clear it periodically because it's still going to be filling up with events in the background as the user presses keys and mouses over the window. On Windows, if your game goes too long without clearing the queue, the operating system will think it has frozen and show a "The application is not responding" message. Iterating over ``event.get()`` or simply calling ``event.clear()`` once per frame will avoid this. Colorkey vs. Alpha. ------------------- There's a lot of confusion around these two techniques, and much of it comes from the terminology used. 'Colorkey blitting' involves telling pygame that all pixels of a certain color in a certain image are transparent instead of whatever color they happen to be. These transparent pixels are not blitted when the rest of the image is blitted, and so don't obscure the background. This is how we make sprites that aren't rectangular in shape. Simply call :meth:`.Surface.set_colorkey()`, and pass in an RGB tuple -- say (0,0,0). This would make every pixel in the source image transparent instead of black. 'Alpha' is different, and it comes in two flavors. 'Image alpha' applies to the whole image, and is probably what you want. Properly known as 'translucency', alpha causes each pixel in the source image to be only *partially* opaque. For example, if you set a surface's alpha to 192 and then blitted it onto a background, 3/4 of each pixel's color would come from the source image, and 1/4 from the background. Alpha is measured from 255 to 0, where 0 is completely transparent, and 255 is completely opaque. Note that colorkey and alpha blitting can be combined -- this produces an image that is fully transparent in some spots, and semi-transparent in others. 'Per-pixel alpha' is the other flavor of alpha, and it's more complicated. Basically, each pixel in the source image has its own alpha value, from 0 to 255. Each pixel, therefore, can have a different opacity when blitted onto a background. This type of alpha can't be mixed with colorkey blitting, and it overrides per-image alpha. Per-pixel alpha is rarely used in games, and to use it you have to save your source image in a graphic editor with a special *alpha channel*. It's complicated -- don't use it yet. Software architecture, design patterns, and games. -------------------------------------------------- You may reach a point where you're comfortable writing code, you're able to solve complex problems without assistance, you understand how to use most of pygame's modules, and yet, as you work on larger projects they always seem to get messier and harder to maintain as time goes on. This can manifest in many ways -- for example, fixing bugs in one place might always seem to create new bugs elsewhere, figuring out *where* code should go might become a challenge, adding new things might frequently require you to rewrite many other things, and so on. Finally, you decide to cut your losses and start fresh on something new. This is a common issue and it can be frustrating -- on the one hand, your programming skills are improving, and yet you aren't able to finish the games you start due to somewhat nebulous organizational problems. This brings us to the concept of software architecture and design patterns. You may be familiar with pygame's "standard" base template (there are many equivalent variations of this, so don't stress about the small details too much):: import pygame pygame.init() screen = pygame.display.set_mode((1280,720)) clock = pygame.time.Clock() while True: # Process player inputs. for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() raise SystemExit # Do logical updates here. # ... screen.fill("purple") # Fill the display with a solid color # Render the graphics here. # ... pygame.display.flip() # Refresh on-screen display clock.tick(60) # wait until next frame (at 60 FPS) It does some initial setup, starts a loop, and then proceeds to repeatedly collect input, handle the game's logic, and draw the current frame forever until the program ends. The update, render, wait loop shown here is actually a design pattern that serves as the skeleton of most games -- it's prolific because it's clean, it's organized, and it works. (There's also an important but easy-to-miss design feature here in the form of a strict division between the game's logic and rendering routines. This decision alone prevents a whole category of potential bugs related to objects updating and rendering concurrently, which is nice). It turns out that there are many design patterns like this that are used frequently in games and in software development at large. For a great resource on this specifically for games, I highly recommend `Game Programming Patterns`_, a short free, e-book on the topic. It covers a bunch of useful patterns and concrete situations where you might want to employ them. It won't instantly make you a better coder, but learning some theory about software architecture can go a long way towards helping you escape plateaus and tackle larger projects more confidently. Do things the pythony way. -------------------------- A final note (this isn't the least important one; it just comes at the end). Pygame is a pretty lightweight wrapper around SDL, which is in turn a pretty lightweight wrapper around your native OS graphics calls. Chances are pretty good that if your code is still slow, and you've done the things I've mentioned above, then the problem lies in the way you're addressing your data in python. Certain idioms are just going to be slow in python no matter what you do. Luckily, python is a very clear language -- if a piece of code looks awkward or unwieldy, chances are its speed can be improved, too. Read over `Why Pygame is Slow`_ for some deeper insight into why pygame might be considered slower than other frameworks/engines, and what that actually means in practice. And if you're truly stumped by performance problems, profilers like cProfile_ (or SnakeViz_, a visualizer for cProfile) can help identify bottlenecks (they'll tell you which parts of the code are taking the longest to execute). That said, premature optimisation is the root of all evil; if it's already fast enough, don't torture the code trying to make it faster. If it's fast enough, let it be :) There you go. Now you know practically everything I know about using pygame. Now, go write that game! ---- *David Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game.* *This guide was substantially updated in 2022.* .. _Pygame: https://www.pygame.org/ .. _SDL: http://libsdl.org .. _Python documentation: https://docs.python.org/3/ .. _Game Programming Patterns: https://gameprogrammingpatterns.com/contents.html .. _Why Pygame is Slow: https://blubberquark.tumblr.com/post/630054903238262784/why-pygame-is-slow .. _cProfile: https://docs.python.org/3/library/profile.html .. _SnakeViz: https://jiffyclub.github.io/snakeviz/././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_sources/tut/tom_games2.rst.txt0000644000175100001770000001500214676242340023346 0ustar00runnerdocker.. include:: common.txt ********************************* Revision: Pygame fundamentals ********************************* .. role:: firstterm(emphasis) .. _makegames-2: 2. Revision: Pygame fundamentals ================================ .. _makegames-2-1: 2.1. The basic Pygame game -------------------------- For the sake of revision, and to ensure that you are familiar with the basic structure of a Pygame program, I'll briefly run through a basic Pygame program, which will display no more than a window with some text in it, that should, by the end, look something like this (though of course the window decoration will probably be different on your system): .. image:: tom_basic.png The full code for this example looks like this:: #!/usr/bin/python import pygame from pygame.locals import * def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((150, 50)) pygame.display.set_caption('Basic Pygame program') # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((250, 250, 250)) # Display some text font = pygame.font.Font(None, 36) text = font.render("Hello There", 1, (10, 10, 10)) textpos = text.get_rect() textpos.centerx = background.get_rect().centerx background.blit(text, textpos) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Event loop while True: for event in pygame.event.get(): if event.type == QUIT: return screen.blit(background, (0, 0)) pygame.display.flip() if __name__ == '__main__': main() .. _makegames-2-2: 2.2. Basic Pygame objects ------------------------- As you can see, the code consists of three main objects: the screen, the background, and the text. Each of these objects is created by first calling an instance of an in-built Pygame object, and then modifying it to fit our needs. The screen is a slightly special case, because we still modify the display through Pygame calls, rather than calling methods belonging to the screen object. But for all other Pygame objects, we first create the object as a copy of a Pygame object, giving it some attributes, and build our game objects from them. With the background, we first create a Pygame Surface object, and make it the size of the screen. We then perform the convert() operation to convert the Surface to a single pixel format. This is more obviously necessary when we have several images and surfaces, all of different pixel formats, which makes rendering them quite slow. By converting all the surfaces, we can drastically speed up rendering times. Finally, we fill the background surface with white (255, 255, 255). These values are :firstterm:`RGB` (Red Green Blue), and can be worked out from any good paint program. With the text, we require more than one object. First, we create a font object, which defines which font to use, and the size of the font. Then we create a text object, by using the ``render`` method that belongs to our font object, supplying three arguments: the text to be rendered, whether or not it should be anti-aliased (1=yes, 0=no), and the color of the text (again in RGB format). Next we create a third text object, which gets the rectangle for the text. The easiest way to understand this is to imagine drawing a rectangle that will surround all of the text; you can then use this rectangle to get/set the position of the text on the screen. So in this example we get the rectangle, set its ``centerx`` attribute to be the ``centerx`` attribute of the background (so the text's center will be the same as the background's center, i.e. the text will be centered on the screen on the x axis). We could also set the y coordinate, but it's not any different so I left the text at the top of the screen. As the screen is small anyway, it didn't seem necessary. .. _makegames-2-3: 2.3. Blitting ------------- Now we have created our game objects, we need to actually render them. If we didn't and we ran the program, we'd just see a blank window, and the objects would remain invisible. The term used for rendering objects is :firstterm:`blitting`, which is where you copy the pixels belonging to said object onto the destination object. So to render the background object, you blit it onto the screen. In this example, to make things simple, we blit the text onto the background (so the background will now have a copy of the text on it), and then blit the background onto the screen. Blitting is one of the slowest operations in any game, so you need to be careful not to blit too much onto the screen in every frame. If you have a background image, and a ball flying around the screen, then you could blit the background and then the ball in every frame, which would cover up the ball's previous position and render the new ball, but this would be pretty slow. A better solution is to blit the background onto the area that the ball previously occupied, which can be found by the ball's previous rectangle, and then blitting the ball, so that you are only blitting two small areas. .. _makegames-2-4: 2.4. The event loop ------------------- Once you've set the game up, you need to put it into a loop so that it will continuously run until the user signals that he/she wants to exit. So you start an open ``while`` loop, and then for each iteration of the loop, which will be each frame of the game, update the game. The first thing is to check for any Pygame events, which will be the user hitting the keyboard, clicking a mouse button, moving a joystick, resizing the window, or trying to close it. In this case, we simply want to watch out for for user trying to quit the game by closing the window, in which case the game should ``return``, which will end the ``while`` loop. Then we simply need to re-blit the background, and flip (update) the display to have everything drawn. OK, as nothing moves or happens in this example, we don't strictly speaking need to re-blit the background in every iteration, but I put it in because when things are moving around on the screen, you will need to do all your blitting here. .. _makegames-2-5: 2.5. Ta-da! ----------- And that's it - your most basic Pygame game! All games will take a form similar to this, but with lots more code for the actual game functions themselves, which are more to do your with programming, and less guided in structure by the workings of Pygame. This is what this tutorial is really about, and will now go onto. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_sources/tut/tom_games3.rst.txt0000644000175100001770000001231214676242340023350 0ustar00runnerdocker.. include:: common.txt ********************** Kicking things off ********************** .. role:: citetitle(emphasis) .. _makegames-3: 3. Kicking things off ===================== The first sections of code are relatively simple, and, once written, can usually be reused in every game you consequently make. They will do all of the boring, generic tasks like loading modules, loading images, opening networking connections, playing music, and so on. They will also include some simple but effective error handling, and any customisation you wish to provide on top of functions provided by modules like ``sys`` and ``pygame``. .. _makegames-3-1: 3.1. The first lines, and loading modules ----------------------------------------- First off, you need to start off your game and load up your modules. It's always a good idea to set a few things straight at the top of the main source file, such as the name of the file, what it contains, the license it is under, and any other helpful info you might want to give those who will be looking at it. Then you can load modules, with some error checking so that Python doesn't print out a nasty traceback, which non-programmers won't understand. The code is fairly simple, so I won't bother explaining any of it:: #!/usr/bin/env python # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError as err: print(f"couldn't load module. {err}") sys.exit(2) .. _makegames-3-2: 3.2. Resource handling functions -------------------------------- In the :doc:`Line By Line Chimp ` example, the first code to be written was for loading images and sounds. As these were totally independent of any game logic or game objects, they were written as separate functions, and were written first so that later code could make use of them. I generally put all my code of this nature first, in their own, classless functions; these will, generally speaking, be resource handling functions. You can of course create classes for these, so that you can group them together, and maybe have an object with which you can control all of your resources. As with any good programming environment, it's up to you to develop your own best practice and style. It's always a good idea to write your own resource handling functions, because although Pygame has methods for opening images and sounds, and other modules will have their methods of opening other resources, those methods can take up more than one line, they can require consistent modification by yourself, and they often don't provide satisfactory error handling. Writing resource handling functions gives you sophisticated, reusable code, and gives you more control over your resources. Take this example of an image loading function:: def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha() is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() Here we make a more sophisticated image loading function than the one provided by :func:`pygame.image.load`. Note that the first line of the function is a documentation string describing what the function does, and what object(s) it returns. The function assumes that all of your images are in a directory called data, and so it takes the filename and creates the full pathname, for example ``data/ball.png``, using the :citetitle:`os` module to ensure cross-platform compatibility. Then it tries to load the image, and convert any alpha regions so you can achieve transparency, and it returns a more human-readable error if there's a problem. Finally it returns the image object, and its :class:`rect `. You can make similar functions for loading any other resources, such as loading sounds. You can also make resource handling classes, to give you more flexibility with more complex resources. For example, you could make a music class, with an ``__init__`` function that loads the sound (perhaps borrowing from a ``load_sound()`` function), a function to pause the music, and a function to restart. Another handy resource handling class is for network connections. Functions to open sockets, pass data with suitable security and error checking, close sockets, finger addresses, and other network tasks, can make writing a game with network capabilities relatively painless. Remember the chief task of these functions/classes is to ensure that by the time you get around to writing game object classes, and the main loop, there's almost nothing left to do. Class inheritance can make these basic classes especially handy. Don't go overboard though; functions which will only be used by one class should be written as part of that class, not as a global function. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_sources/tut/tom_games4.rst.txt0000644000175100001770000001626214676242340023361 0ustar00runnerdocker.. include:: common.txt *********************** Game object classes *********************** .. role:: firstterm(emphasis) .. _makegames-4: 4. Game object classes ====================== Once you've loaded your modules, and written your resource handling functions, you'll want to get on to writing some game objects. The way this is done is fairly simple, though it can seem complex at first. You write a class for each type of object in the game, and then create an instance of those classes for the objects. You can then use those classes' methods to manipulate the objects, giving objects some motion and interactive capabilities. So your game, in pseudo-code, will look like this:: #!/usr/bin/python # [load modules here] # [resource handling functions here] class Ball: # [ball functions (methods) here] # [e.g. a function to calculate new position] # [and a function to check if it hits the side] def main: # [initiate game environment here] # [create new object as instance of ball class] ball = Ball() while True: # [check for user input] # [call ball's update function] ball.update() This is, of course, a very simple example, and you'd need to put in all the code, instead of those little bracketed comments. But you should get the basic idea. You create a class, into which you put all the functions for a ball, including ``__init__``, which would create all the ball's attributes, and ``update``, which would move the ball to its new position, before blitting it onto the screen in this position. You can then create more classes for all of your other game objects, and then create instances of them so that you can handle them easily in the ``main`` function and the main program loop. Contrast this with initiating the ball in the ``main`` function, and then having lots of classless functions to manipulate a set ball object, and you'll hopefully see why using classes is an advantage: It allows you to put all of the code for each object in one place; it makes using objects easier; it makes adding new objects, and manipulating them, more flexible. Rather than adding more code for each new ball object, you could simply create new instances of the ``Ball`` class for each new ball object. Magic! .. _makegames-4-1: 4.1. A simple ball class ------------------------ Here is a simple class with the functions necessary for creating a ball object that will, if the ``update`` function is called in the main loop, move across the screen:: class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png('ball.png') screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) Here we have the ``Ball`` class, with an ``__init__`` function that sets the ball up, an ``update`` function that changes the ball's rectangle to be in the new position, and a ``calcnewpos`` function to calculate the ball's new position based on its current position, and the vector by which it is moving. I'll explain the physics in a moment. The one other thing to note is the documentation string, which is a little bit longer this time, and explains the basics of the class. These strings are handy not only to yourself and other programmers looking at the code, but also for tools to parse your code and document it. They won't make much of a difference in small programs, but with large ones they're invaluable, so it's a good habit to get into. .. _makegames-4-1-1: 4.1.1. Diversion 1: Sprites ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The other reason for creating a class for each object is sprites. Each image you render in your game will be a sprite object, and so to begin with, the class for each object should inherit the :class:`Sprite ` class. This is a really nice feature of Python - class inheritance. Now the ``Ball`` class has all of the functions that come with the ``Sprite`` class, and any object instances of the ``Ball`` class will be registered by Pygame as sprites. Whereas with text and the background, which don't move, it's OK to blit the object onto the background, Pygame handles sprite objects in a different manner, which you'll see when we look at the whole program's code. Basically, you create both a ball object, and a sprite object for that ball, and you then call the ball's update function on the sprite object, thus updating the sprite. Sprites also give you sophisticated ways of determining if two objects have collided. Normally you might just check in the main loop to see if their rectangles overlap, but that would involve a lot of code, which would be a waste because the ``Sprite`` class provides two functions (``spritecollide`` and ``groupcollide``) to do this for you. .. _makegames-4-1-2: 4.1.2. Diversion 2: Vector physics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Other than the structure of the ``Ball`` class, the notable thing about this code is the vector physics, used to calculate the ball's movement. With any game involving angular movement, you won't get very far unless you're comfortable with trigonometry, so I'll just introduce the basics you need to know to make sense of the ``calcnewpos`` function. To begin with, you'll notice that the ball has an attribute ``vector``, which is made up of ``angle`` and ``z``. The angle is measured in radians, and will give you the direction in which the ball is moving. Z is the speed at which the ball moves. So by using this vector, we can determine the direction and speed of the ball, and therefore how much it will move on the x and y axes: .. image:: tom_radians.png The diagram above illustrates the basic maths behind vectors. In the left hand diagram, you can see the ball's projected movement represented by the blue line. The length of that line (z) represents its speed, and the angle is the direction in which it will move. The angle for the ball's movement will always be taken from the x axis on the right, and it is measured clockwise from that line, as shown in the diagram. From the angle and speed of the ball, we can then work out how much it has moved along the x and y axes. We need to do this because Pygame doesn't support vectors itself, and we can only move the ball by moving its rectangle along the two axes. So we need to :firstterm:`resolve` the angle and speed into its movement on the x axis (dx) and on the y axis (dy). This is a simple matter of trigonometry, and can be done with the formulae shown in the diagram. If you've studied elementary trigonometry before, none of this should be news to you. But just in case you're forgetful, here are some useful formulae to remember, that will help you visualise the angles (I find it easier to visualise angles in degrees than in radians!) .. image:: tom_formulae.png ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_sources/tut/tom_games5.rst.txt0000644000175100001770000001503514676242340023357 0ustar00runnerdocker.. include:: common.txt ***************************** User-controllable objects ***************************** .. _makegames-5: 5. User-controllable objects ============================ So far you can create a Pygame window, and render a ball that will fly across the screen. The next step is to make some bats which the user can control. This is potentially far more simple than the ball, because it requires no physics (unless your user-controlled object will move in ways more complex than up and down, e.g. a platform character like Mario, in which case you'll need more physics). User-controllable objects are pretty easy to create, thanks to Pygame's event queue system, as you'll see. .. _makegames-5-1: 5.1. A simple bat class ----------------------- The principle behind the bat class is similar to that of the ball class. You need an ``__init__`` function to initialise the ball (so you can create object instances for each bat), an ``update`` function to perform per-frame changes on the bat before it is blitted the bat to the screen, and the functions that will define what this class will actually do. Here's some sample code:: class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" As you can see, this class is very similar to the ball class in its structure. But there are differences in what each function does. First of all, there is a reinit function, which is used when a round ends, and the bat needs to be set back in its starting place, with any attributes set back to their necessary values. Next, the way in which the bat is moved is a little more complex than with the ball, because here its movement is simple (up/down), but it relies on the user telling it to move, unlike the ball which just keeps moving in every frame. To make sense of how the bat moves, it is helpful to look at a quick diagram to show the sequence of events: .. image:: tom_event-flowchart.png What happens here is that the person controlling the bat pushes down on the key that moves the bat up. For each iteration of the main game loop (for every frame), if the key is still held down, then the ``state`` attribute of that bat object will be set to "moving", and the ``moveup`` function will be called, causing the ball's y position to be reduced by the value of the ``speed`` attribute (in this example, 10). In other words, so long as the key is held down, the bat will move up the screen by 10 pixels per frame. The ``state`` attribute isn't used here yet, but it's useful to know if you're dealing with spin, or would like some useful debugging output. As soon as the player lets go of that key, the second set of boxes is invoked, and the ``state`` attribute of the bat object will be set back to "still", and the ``movepos`` attribute will be set back to [0,0], meaning that when the ``update`` function is called, it won't move the bat any more. So when the player lets go of the key, the bat stops moving. Simple! .. _makegames-5-1-1: 5.1.1. Diversion 3: Pygame events ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So how do we know when the player is pushing keys down, and then releasing them? With the Pygame event queue system, dummy! It's a really easy system to use and understand, so this shouldn't take long :) You've already seen the event queue in action in the basic Pygame program, where it was used to check if the user was quitting the application. The code for moving the bat is about as simple as that:: for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_UP: player.moveup() if event.key == K_DOWN: player.movedown() elif event.type == KEYUP: if event.key == K_UP or event.key == K_DOWN: player.movepos = [0,0] player.state = "still" Here assume that you've already created an instance of a bat, and called the object ``player``. You can see the familiar layout of the ``for`` structure, which iterates through each event found in the Pygame event queue, which is retrieved with the :mod:`event.get() ` function. As the user hits keys, pushes mouse buttons and moves the joystick about, those actions are pumped into the Pygame event queue, and left there until dealt with. So in each iteration of the main game loop, you go through these events, checking if they're ones you want to deal with, and then dealing with them appropriately. The :func:`event.pump() ` function that was in the ``Bat.update`` function is then called in every iteration to pump out old events, and keep the queue current. First we check if the user is quitting the program, and quit it if they are. Then we check if any keys are being pushed down, and if they are, we check if they're the designated keys for moving the bat up and down. If they are, then we call the appropriate moving function, and set the player state appropriately (though the states moveup and movedown and changed in the ``moveup()`` and ``movedown()`` functions, which makes for neater code, and doesn't break *encapsulation*, which means that you assign attributes to the object itself, without referring to the name of the instance of that object). Notice here we have three states: still, moveup, and movedown. Again, these come in handy if you want to debug or calculate spin. We also check if any keys have been "let go" (i.e. are no longer being held down), and again if they're the right keys, we stop the bat from moving. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.994112 pygame-2.6.1/docs/generated/_sources/tut/tom_games6.rst.txt0000644000175100001770000003307114676242340023360 0ustar00runnerdocker.. include:: common.txt *************************** Putting it all together *************************** .. _makegames-6: 6. Putting it all together ============================ So far you've learnt all the basics necessary to build a simple game. You should understand how to create Pygame objects, how Pygame displays objects, how it handles events, and how you can use physics to introduce some motion into your game. Now I'll just show how you can take all those chunks of code and put them together into a working game. What we need first is to let the ball hit the sides of the screen, and for the bat to be able to hit the ball, otherwise there's not going to be much gameplay involved. We do this using Pygame's :meth:`collision ` methods. .. _makegames-6-1: 6.1. Let the ball hit sides --------------------------- The basic principle behind making it bounce of the sides is easy to grasp. You grab the coordinates of the four corners of the ball, and check to see if they correspond with the x or y coordinate of the edge of the screen. So if the top right and top left corners both have a y coordinate of zero, you know that the ball is currently on the top edge of the screen. We do all this in the ``update`` function, after we've worked out the new position of the ball. :: if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: self.offcourt(player=2) if tr and br: self.offcourt(player=1) self.vector = (angle,z) Here we check to see if the ``area`` contains the new position of the ball (it always should, so we needn't have an ``else`` clause, though in other circumstances you might want to consider it). We then check if the coordinates for the four corners are *colliding* with the area's edges, and create objects for each result. If they are, the objects will have a value of 1, or ``True``. If they don't, then the value will be ``None``, or ``False``. We then see if it has hit the top or bottom, and if it has we change the ball's direction. Handily, using radians we can do this by simply reversing its positive/negative value. We also check to see if the ball has gone off the sides, and if it has we call the ``offcourt`` function. This, in my game, resets the ball, adds 1 point to the score of the player specified when calling the function, and displays the new score. Finally, we recompile the vector based on the new angle. And that is it. The ball will now merrily bounce off the walls and go offcourt with good grace. .. _makegames-6-2: 6.2. Let the ball hit bats -------------------------- Making the ball hit the bats is very similar to making it hit the sides of the screen. We still use the collide method, but this time we check to see if the rectangles for the ball and either bat collide. In this code I've also put in some extra code to avoid various glitches. You'll find that you'll have to put all sorts of extra code in to avoid glitches and bugs, so it's good to get used to seeing it. :: else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) We start this section with an ``else`` statement, because this carries on from the previous chunk of code to check if the ball hits the sides. It makes sense that if it doesn't hit the sides, it might hit a bat, so we carry on the conditional statement. The first glitch to fix is to shrink the players' rectangles by 3 pixels in both dimensions, to stop the bat catching a ball that goes behind them (if you imagine you just move the bat so that as the ball travels behind it, the rectangles overlap, and so normally the ball would then have been "hit" - this prevents that). Next we check if the rectangles collide, with one more glitch fix. Notice that I've commented on these odd bits of code - it's always good to explain bits of code that are abnormal, both for others who look at your code, and so you understand it when you come back to it. The without the fix, the ball might hit a corner of the bat, change direction, and one frame later still find itself inside the bat. Then it would again think it has been hit, and change its direction. This can happen several times, making the ball's motion completely unrealistic. So we have a variable, ``self.hit``, which we set to ``True`` when it has been hit, and ``False`` one frame later. When we check if the rectangles have collided, we also check if ``self.hit`` is ``True``/``False``, to stop internal bouncing. The important code here is pretty easy to understand. All rectangles have a :meth:`colliderect ` function, into which you feed the rectangle of another object, which returns ``True`` if the rectangles do overlap, and ``False`` if not. If they do, we can change the direction by subtracting the current angle from ``pi`` (again, a handy trick you can do with radians, which will adjust the angle by 90 degrees and send it off in the right direction; you might find at this point that a thorough understanding of radians is in order!). Just to finish the glitch checking, we switch ``self.hit`` back to ``False`` if it's the frame after they were hit. We also then recompile the vector. You would of course want to remove the same line in the previous chunk of code, so that you only do this once after the ``if-else`` conditional statement. And that's it! The combined code will now allow the ball to hit sides and bats. .. _makegames-6-3: 6.3. The Finished product ------------------------- The final product, with all the bits of code thrown together, as well as some other bits ofcode to glue it all together, will look like this:: # # Tom's Pong # A simple pong game with realistic physics and AI # http://tomchance.org.uk/projects/pong # # Released under the GNU General Public License VERSION = "0.4" try: import sys import random import math import os import getopt import pygame from socket import * from pygame.locals import * except ImportError, err: print(f"couldn't load module. {err}") sys.exit(2) def load_png(name): """ Load image and return image object""" fullname = os.path.join("data", name) try: image = pygame.image.load(fullname) if image.get_alpha is None: image = image.convert() else: image = image.convert_alpha() except FileNotFoundError: print(f"Cannot load image: {fullname}") raise SystemExit return image, image.get_rect() class Ball(pygame.sprite.Sprite): """A ball that will move across the screen Returns: ball object Functions: update, calcnewpos Attributes: area, vector""" def __init__(self, (xy), vector): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("ball.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.vector = vector self.hit = 0 def update(self): newpos = self.calcnewpos(self.rect,self.vector) self.rect = newpos (angle,z) = self.vector if not self.area.contains(newpos): tl = not self.area.collidepoint(newpos.topleft) tr = not self.area.collidepoint(newpos.topright) bl = not self.area.collidepoint(newpos.bottomleft) br = not self.area.collidepoint(newpos.bottomright) if tr and tl or (br and bl): angle = -angle if tl and bl: #self.offcourt() angle = math.pi - angle if tr and br: angle = math.pi - angle #self.offcourt() else: # Deflate the rectangles so you can't catch a ball behind the bat player1.rect.inflate(-3, -3) player2.rect.inflate(-3, -3) # Do ball and bat collide? # Note I put in an odd rule that sets self.hit to 1 when they collide, and unsets it in the next # iteration. this is to stop odd ball behaviour where it finds a collision *inside* the # bat, the ball reverses, and is still inside the bat, so bounces around inside. # This way, the ball can always escape and bounce away cleanly if self.rect.colliderect(player1.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.rect.colliderect(player2.rect) == 1 and not self.hit: angle = math.pi - angle self.hit = not self.hit elif self.hit: self.hit = not self.hit self.vector = (angle,z) def calcnewpos(self,rect,vector): (angle,z) = vector (dx,dy) = (z*math.cos(angle),z*math.sin(angle)) return rect.move(dx,dy) class Bat(pygame.sprite.Sprite): """Movable tennis 'bat' with which one hits the ball Returns: bat object Functions: reinit, update, moveup, movedown Attributes: which, speed""" def __init__(self, side): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_png("bat.png") screen = pygame.display.get_surface() self.area = screen.get_rect() self.side = side self.speed = 10 self.state = "still" self.reinit() def reinit(self): self.state = "still" self.movepos = [0,0] if self.side == "left": self.rect.midleft = self.area.midleft elif self.side == "right": self.rect.midright = self.area.midright def update(self): newpos = self.rect.move(self.movepos) if self.area.contains(newpos): self.rect = newpos pygame.event.pump() def moveup(self): self.movepos[1] = self.movepos[1] - (self.speed) self.state = "moveup" def movedown(self): self.movepos[1] = self.movepos[1] + (self.speed) self.state = "movedown" def main(): # Initialise screen pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Basic Pong") # Fill background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((0, 0, 0)) # Initialise players global player1 global player2 player1 = Bat("left") player2 = Bat("right") # Initialise ball speed = 13 rand = ((0.1 * (random.randint(5,8)))) ball = Ball((0,0),(0.47,speed)) # Initialise sprites playersprites = pygame.sprite.RenderPlain((player1, player2)) ballsprite = pygame.sprite.RenderPlain(ball) # Blit everything to the screen screen.blit(background, (0, 0)) pygame.display.flip() # Initialise clock clock = pygame.time.Clock() # Event loop while True: # Make sure game doesn't run at more than 60 frames per second clock.tick(60) for event in pygame.event.get(): if event.type == QUIT: return elif event.type == KEYDOWN: if event.key == K_a: player1.moveup() if event.key == K_z: player1.movedown() if event.key == K_UP: player2.moveup() if event.key == K_DOWN: player2.movedown() elif event.type == KEYUP: if event.key == K_a or event.key == K_z: player1.movepos = [0,0] player1.state = "still" if event.key == K_UP or event.key == K_DOWN: player2.movepos = [0,0] player2.state = "still" screen.blit(background, ball.rect, ball.rect) screen.blit(background, player1.rect, player1.rect) screen.blit(background, player2.rect, player2.rect) ballsprite.update() playersprites.update() ballsprite.draw(screen) playersprites.draw(screen) pygame.display.flip() if __name__ == "__main__": main() As well as showing you the final product, I'll point you back to TomPong, upon which all of this is based. Download it, have a look at the source code, and you'll see a full implementation of pong using all of the code you've seen in this tutorial, as well as lots of other code I've added in various versions, such as some extra physics for spinning, and various other bug and glitch fixes. Oh, find TomPong at http://tomchance.org.uk/projects/pong. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612190.0091257 pygame-2.6.1/docs/generated/_static/0000755000175100001770000000000014676242436016741 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7921405 pygame-2.6.1/docs/generated/_static/basic.css0000644000175100001770000003536614676242422020544 0ustar00runnerdocker/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } div.section::after { display: block; content: ''; clear: left; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; word-wrap: break-word; overflow-wrap : break-word; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox form.search { overflow: hidden; } div.sphinxsidebar #searchbox input[type="text"] { float: left; width: 80%; padding: 0.25em; box-sizing: border-box; } div.sphinxsidebar #searchbox input[type="submit"] { float: left; width: 20%; border-left: none; padding: 0.25em; box-sizing: border-box; } img { border: 0; max-width: 100%; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li p.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; margin-left: auto; margin-right: auto; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- general body styles --------------------------------------------------- */ div.body { min-width: 360px; max-width: 800px; } div.body p, div.body dd, div.body li, div.body blockquote { -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } a.headerlink { visibility: hidden; } a:visited { color: #551A8B; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, figure.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, figure.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, figure.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } img.align-default, figure.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-default { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar, aside.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px; background-color: #ffe; width: 40%; float: right; clear: right; overflow-x: auto; } p.sidebar-title { font-weight: bold; } nav.contents, aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ nav.contents, aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- content of sidebars/topics/admonitions -------------------------------- */ div.sidebar > :last-child, aside.sidebar > :last-child, nav.contents > :last-child, aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } div.sidebar::after, aside.sidebar::after, nav.contents::after, aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { display: block; content: ''; clear: both; } /* -- tables ---------------------------------------------------------------- */ table.docutils { margin-top: 10px; margin-bottom: 10px; border: 0; border-collapse: collapse; } table.align-center { margin-left: auto; margin-right: auto; } table.align-default { margin-left: auto; margin-right: auto; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } th > :first-child, td > :first-child { margin-top: 0px; } th > :last-child, td > :last-child { margin-bottom: 0px; } /* -- figures --------------------------------------------------------------- */ div.figure, figure { margin: 0.5em; padding: 0.5em; } div.figure p.caption, figcaption { padding: 0.3em; } div.figure p.caption span.caption-number, figcaption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text, figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ table.field-list td, table.field-list th { border: 0 !important; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .field-name { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } /* -- hlist styles ---------------------------------------------------------- */ table.hlist { margin: 1em 0; } table.hlist td { vertical-align: top; } /* -- object description styles --------------------------------------------- */ .sig { font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; } .sig-name, code.descname { background-color: transparent; font-weight: bold; } .sig-name { font-size: 1.1em; } code.descname { font-size: 1.2em; } .sig-prename, code.descclassname { background-color: transparent; } .optional { font-size: 1.3em; } .sig-paren { font-size: larger; } .sig-param.n { font-style: italic; } /* C++ specific styling */ .sig-inline.c-texpr, .sig-inline.cpp-texpr { font-family: unset; } .sig.c .k, .sig.c .kt, .sig.cpp .k, .sig.cpp .kt { color: #0033B3; } .sig.c .m, .sig.cpp .m { color: #1750EB; } .sig.c .s, .sig.c .sc, .sig.cpp .s, .sig.cpp .sc { color: #067D17; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } :not(li) > ol > li:first-child > :first-child, :not(li) > ul > li:first-child > :first-child { margin-top: 0px; } :not(li) > ol > li:last-child > :last-child, :not(li) > ul > li:last-child > :last-child { margin-bottom: 0px; } ol.simple ol p, ol.simple ul p, ul.simple ol p, ul.simple ul p { margin-top: 0; } ol.simple > li:not(:first-child) > p, ul.simple > li:not(:first-child) > p { margin-top: 0; } ol.simple p, ul.simple p { margin-bottom: 0; } aside.footnote > span, div.citation > span { float: left; } aside.footnote > span:last-of-type, div.citation > span:last-of-type { padding-right: 0.5em; } aside.footnote > p { margin-left: 2em; } div.citation > p { margin-left: 4em; } aside.footnote > p:last-of-type, div.citation > p:last-of-type { margin-bottom: 0em; } aside.footnote > p:last-of-type:after, div.citation > p:last-of-type:after { content: ""; clear: both; } dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; } dl.field-list > dt { font-weight: bold; word-break: break-word; padding-left: 0.5em; padding-right: 5px; } dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; margin-left: 0em; margin-bottom: 0em; } dl { margin-bottom: 15px; } dd > :first-child { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } .sig dd { margin-top: 0px; margin-bottom: 0px; } .sig dl { margin-top: 0px; margin-bottom: 0px; } dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; } dt:target, span.highlighted { background-color: #fbe54e; } rect.highlighted { fill: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } .classifier:before { font-style: normal; margin: 0 0.5em; content: ":"; display: inline-block; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } .translated { background-color: rgba(207, 255, 207, 0.2) } .untranslated { background-color: rgba(255, 207, 207, 0.2) } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } pre, div[class*="highlight-"] { clear: both; } span.pre { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; white-space: nowrap; } div[class*="highlight-"] { margin: 1em 0; } td.linenos pre { border: 0; background-color: transparent; color: #aaa; } table.highlighttable { display: block; } table.highlighttable tbody { display: block; } table.highlighttable tr { display: flex; } table.highlighttable td { margin: 0; padding: 0; } table.highlighttable td.linenos { padding-right: 0.5em; } table.highlighttable td.code { flex: 1; overflow: hidden; } .highlight .hll { display: block; } div.highlight pre, table.highlighttable pre { margin: 0; } div.code-block-caption + div { margin-top: 0; } div.code-block-caption { margin-top: 1em; padding: 2px 5px; font-size: small; } div.code-block-caption code { background-color: transparent; } table.highlighttable td.linenos, span.linenos, div.highlight span.gp { /* gp: Generic.Prompt */ user-select: none; -webkit-user-select: text; /* Safari fallback only */ -webkit-user-select: none; /* Chrome/Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE10+ */ } div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.code-block-caption span.caption-text { } div.literal-block-wrapper { margin: 1em 0; } code.xref, a code { background-color: transparent; font-weight: bold; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } span.eqno a.headerlink { position: absolute; z-index: 1; } div.math:hover a.headerlink { visibility: visible; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0231419 pygame-2.6.1/docs/generated/_static/doctools.js0000644000175100001770000001057014676242412021122 0ustar00runnerdocker/* * doctools.js * ~~~~~~~~~~~ * * Base JavaScript utilities for all Sphinx HTML documentation. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ "use strict"; const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ "TEXTAREA", "INPUT", "SELECT", "BUTTON", ]); const _ready = (callback) => { if (document.readyState !== "loading") { callback(); } else { document.addEventListener("DOMContentLoaded", callback); } }; /** * Small JavaScript module for the documentation. */ const Documentation = { init: () => { Documentation.initDomainIndexTable(); Documentation.initOnKeyListeners(); }, /** * i18n support */ TRANSLATIONS: {}, PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), LOCALE: "unknown", // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext: (string) => { const translated = Documentation.TRANSLATIONS[string]; switch (typeof translated) { case "undefined": return string; // no translation case "string": return translated; // translation exists default: return translated[0]; // (singular, plural) translation tuple exists } }, ngettext: (singular, plural, n) => { const translated = Documentation.TRANSLATIONS[singular]; if (typeof translated !== "undefined") return translated[Documentation.PLURAL_EXPR(n)]; return n === 1 ? singular : plural; }, addTranslations: (catalog) => { Object.assign(Documentation.TRANSLATIONS, catalog.messages); Documentation.PLURAL_EXPR = new Function( "n", `return (${catalog.plural_expr})` ); Documentation.LOCALE = catalog.locale; }, /** * helper function to focus on search bar */ focusSearchBar: () => { document.querySelectorAll("input[name=q]")[0]?.focus(); }, /** * Initialise the domain index toggle buttons */ initDomainIndexTable: () => { const toggler = (el) => { const idNumber = el.id.substr(7); const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); if (el.src.substr(-9) === "minus.png") { el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; toggledRows.forEach((el) => (el.style.display = "none")); } else { el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; toggledRows.forEach((el) => (el.style.display = "")); } }; const togglerElements = document.querySelectorAll("img.toggler"); togglerElements.forEach((el) => el.addEventListener("click", (event) => toggler(event.currentTarget)) ); togglerElements.forEach((el) => (el.style.display = "")); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); }, initOnKeyListeners: () => { // only install a listener if it is really needed if ( !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS ) return; document.addEventListener("keydown", (event) => { // bail for input elements if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; // bail with special keys if (event.altKey || event.ctrlKey || event.metaKey) return; if (!event.shiftKey) { switch (event.key) { case "ArrowLeft": if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; const prevLink = document.querySelector('link[rel="prev"]'); if (prevLink && prevLink.href) { window.location.href = prevLink.href; event.preventDefault(); } break; case "ArrowRight": if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; const nextLink = document.querySelector('link[rel="next"]'); if (nextLink && nextLink.href) { window.location.href = nextLink.href; event.preventDefault(); } break; } } // some keyboard layouts may need Shift to get / switch (event.key) { case "/": if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; Documentation.focusSearchBar(); event.preventDefault(); } }); }, }; // quick alias for translations const _ = Documentation.gettext; _ready(Documentation.init); ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7891405 pygame-2.6.1/docs/generated/_static/documentation_options.js0000644000175100001770000000051014676242422023712 0ustar00runnerdockerconst DOCUMENTATION_OPTIONS = { VERSION: '2.6.1', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, ENABLE_SEARCH_SHORTCUTS: true, };././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0231419 pygame-2.6.1/docs/generated/_static/file.png0000644000175100001770000000043614676242412020363 0ustar00runnerdockerPNG  IHDRaIDATxR){l ۶f=@ :3~箄rX$AX-D ~ lj(P%8<<9:: PO&$ l~X&EW^4wQ}^ͣ i0/H/@F)Dzq+j[SU5h/oY G&Lfs|{3%U+S`AFIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7641404 pygame-2.6.1/docs/generated/_static/language_data.js0000644000175100001770000001122614676242422022050 0ustar00runnerdocker/* * language_data.js * ~~~~~~~~~~~~~~~~ * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; /* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer */ var Stemmer = function() { var step2list = { ational: 'ate', tional: 'tion', enci: 'ence', anci: 'ance', izer: 'ize', bli: 'ble', alli: 'al', entli: 'ent', eli: 'e', ousli: 'ous', ization: 'ize', ation: 'ate', ator: 'ate', alism: 'al', iveness: 'ive', fulness: 'ful', ousness: 'ous', aliti: 'al', iviti: 'ive', biliti: 'ble', logi: 'log' }; var step3list = { icate: 'ic', ative: '', alize: 'al', iciti: 'ic', ical: 'ic', ful: '', ness: '' }; var c = "[^aeiou]"; // consonant var v = "[aeiouy]"; // vowel var C = c + "[^aeiouy]*"; // consonant sequence var V = v + "[aeiou]*"; // vowel sequence var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 var s_v = "^(" + C + ")?" + v; // vowel in stem this.stemWord = function (w) { var stem; var suffix; var firstch; var origword = w; if (w.length < 3) return w; var re; var re2; var re3; var re4; firstch = w.substr(0,1); if (firstch == "y") w = firstch.toUpperCase() + w.substr(1); // Step 1a re = /^(.+?)(ss|i)es$/; re2 = /^(.+?)([^s])s$/; if (re.test(w)) w = w.replace(re,"$1$2"); else if (re2.test(w)) w = w.replace(re2,"$1$2"); // Step 1b re = /^(.+?)eed$/; re2 = /^(.+?)(ed|ing)$/; if (re.test(w)) { var fp = re.exec(w); re = new RegExp(mgr0); if (re.test(fp[1])) { re = /.$/; w = w.replace(re,""); } } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1]; re2 = new RegExp(s_v); if (re2.test(stem)) { w = stem; re2 = /(at|bl|iz)$/; re3 = new RegExp("([^aeiouylsz])\\1$"); re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re2.test(w)) w = w + "e"; else if (re3.test(w)) { re = /.$/; w = w.replace(re,""); } else if (re4.test(w)) w = w + "e"; } } // Step 1c re = /^(.+?)y$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(s_v); if (re.test(stem)) w = stem + "i"; } // Step 2 re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step2list[suffix]; } // Step 3 re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step3list[suffix]; } // Step 4 re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; re2 = /^(.+?)(s|t)(ion)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); if (re.test(stem)) w = stem; } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1] + fp[2]; re2 = new RegExp(mgr1); if (re2.test(stem)) w = stem; } // Step 5 re = /^(.+?)e$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); re2 = new RegExp(meq1); re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) w = stem; } re = /ll$/; re2 = new RegExp(mgr1); if (re.test(w) && re2.test(w)) { re = /.$/; w = w.replace(re,""); } // and turn initial Y back to y if (firstch == "y") w = firstch.toLowerCase() + w.substr(1); return w; } } ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/generated/_static/legacy_logos.zip0000644000175100001770000014416314676242340022137 0ustar00runnerdockerPK[(S`ablegacy_logos/pygame_logo.gifWw<ԏ6gee[g8DOCF 9d"TH e4$$׿^|^/ :^o b@0 Acy&6wrPo\kI~w[)/VoXn\Wh$}qk$ "uHg745#-)7/NVfQaqNN^n^AafqIqaEeieYiu;z 2:KP{[-M:--}Z`鱧ӳ/i.j_oF ={>888jzbfjbv~fŕOKKV?9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g:UK$a>yLP=4%:ӦdwԗiݏuR@>!ܾ G( _{y= }T {o<)&euU kC~g ']o:PBAw> DM05" T!Ri{4*@ sE3#5Doy%e{HW o!btWFh5c""L&U}՜,<T6adh:~~쿛"0M8BrD5fgV/cٺ؀ [z2ξ8XwAYq/d0g("6_D 5I/5[Py0$I~سB Y֨ŧ 0,(j;/I{f{O׃e`už_0ܩz;bWH+Qg)-o)}-T6@aK)Uq {yRL}FZ[⿋&(qݘ v ]2뵜; yR85Wfkӕ:r{D^$ȿ PK[(S`ab legacy_logos/pygame_logo.gifPK[(S1&X'' blegacy_logos/pygame_powered.gifPK[(Ss!'.( legacy_logos/pygame_small.gifPK[(S%ύ7m legacy_logos/pygame_tiny.gifPK,1././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/_static/minus.png0000644000175100001770000000013214676242412020570 0ustar00runnerdockerPNG  IHDR (!IDATxc8 g>@;(!&]f2nNIENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612170.0241418 pygame-2.6.1/docs/generated/_static/plus.png0000644000175100001770000000013214676242412020420 0ustar00runnerdockerPNG  IHDR (!IDATxc8 g>@;([[U @l-!a@IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612177.7991405 pygame-2.6.1/docs/generated/_static/pygame.css0000644000175100001770000002733114676242422020736 0ustar00runnerdocker/** * Pygame stylesheet -- original theme * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @import url("reset.css"); @import url("tooltip.css"); @import url("basic.css"); /* -- index page ------------------------------------------------------------ */ #pygame-front-page h2 { margin-top: 2em; } #pygame-front-page dt { padding-top: 1em; } #pygame-front-page dl { padding-left: 1em; } /* -- tutorial page --------------------------------------------------------- */ div.body table.docinfo { font-size: 0.9em; margin-left: 3em; } div.body table.docinfo th { text-align: left; font-weight: bolder; } div.body table.docinfo td { padding-left: 1em; } div.body table.matrix th, div.body table.matrix td { border-right: 0.1em solid black; } div.body table.matrix th:last-child, div.body table.matrix td:last-child { border-right-style: none; } div.body table.matrix th { font-weight: bolder; } div.body table.matrix th.head { text-align: center; border-bottom: 0.2em double black; } div.body table.matrix td { text-align: center; } div.body table.matrix th.stub { text-align: left; } /* Let a float element be beside a code block */ div.highlight-python.notranslate { display: inline-block; } /* -- page layout ----------------------------------------------------------- */ body { font-family: sans-serif; color: #000000; font-style: normal; text-decoration: none; text-align: left; border-style: none; } div.header { padding: 0.5em; line-height: 1.2em; } div.header > div { border: 3px solid black; border-collapse: collapse; background-color: #6aee28; } div.header .logo { background-color: #c2fc20; padding: 0.3em; border-right: 3px solid black; display: flex; align-items: center; justify-content: center; flex-direction: column; } div.header .logo img { min-width: 200px; min-height: 60px; border-style: none; } div.header .pagelinks { padding: 0.3em; text-align: center; vertical-align: middle; flex-grow: 1; } div.header p.top { margin-top: 0; margin-bottom: 1em; } div.header p.bottom { margin-bottom: 0; text-align: left; } div.header .pagelinks a { text-decoration: underline; } div.header .pagelinks a:hover { text-decoration: none; } div.document { background-color: #aaeebb; } .flex-container { display: flex; flex-direction: row; } @media only screen and (max-width: 680px) { .flex-container { flex-direction: column; } div.header .logo { border-right: none; border-bottom: 3px solid black; } } /* on wide screens center text, and max width for readable area. */ @media only screen and (min-width: 680px) { div.documentwrapper { float: initial; width: 100%; max-width: 700px; margin: 0 auto; } } .toc td { display:block; width: min(200%, 100vw - 132px); } .toc td:last-child { padding-bottom: 20px; } table.toc td:nth-child(2) { display: none; } div.bodywrapper { margin: 0 0 0 230px; } div.body { min-width: auto; padding: 0.5em; } div.heading { padding: 0 0 0 0.5em; } div.footer { display: none; color: #000000; width: 100%; padding: 9px 0; text-align: center; font-size: 75%; } div.footer a { background-color: #11303d; color: #000000; text-decoration: underline; } div.related { background-color: #6aee28; line-height: 30px; color: #000000; border-top: 3px solid black; border-bottom: 3px solid black; } div.related a { color: #000000; } div.sphinxsidebar { } div.sphinxsidebar h3 { font-family: sans-serif; color: #ffffff; font-size: 1.4em; font-weight: normal; margin: 0; padding: 0; } div.sphinxsidebar h3 a { color: #ffffff; } div.sphinxsidebar h4 { font-family: sans-serif; color: #ffffff; font-size: 1.3em; font-weight: normal; margin: 5px 0 0 0; padding: 0; } div.sphinxsidebar p { color: #ffffff; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; padding: 0; color: #ffffff; } div.sphinxsidebar a { color: #98dbcc; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: #000000; background-color: transparent; text-decoration: underline; } a:hover { color: #000000; background-color: transparent; text-decoration: none; } p { margin: 0.5em 0; } strong { font-weight: bold; } em { font-style: italic; } dl.definition { padding-top: 0.7em; padding-bottom: 0.7em; } dt.title { font-family: monospace; } dt tt { font-weight: bold; font-size: 1.1em; } dt.module { margin-bottom: 1em; } table.toc { margin-left: 2em; margin-bottom: 0.5em; } table.toc td { border-style: none; padding-right: 10px; } span.summaryline { font-style: italic; } span.signature { font-family: monospace; margin-bottom: 0.5em; } span.pre { font-family: monospace; } code.download span.pre { font-family: inherit; font-weight: normal; } table.docutils td.toc { border-style: none; } div.body p, div.body dd, div.body li { text-align: left; line-height: 130%; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: sans-serif; font-weight: bold; margin: 1em 0 0.5em; text-align: left; } div.body h6 { font-weight: normal; font-style: italic; margin: 0; padding: 0; line-height: 130%; } div.body h1 { font-size: 1.5em; } div.body h2 { font-size: 1.4em; } div.body h3 { font-size: 1.3em; } div.body h4 { font-size: 1.2em; } div.body h5 { font-size: 1.1em; } div.body h6 { font-size: 1.0em; } a.headerlink { color: #68698b; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } a.headerlink:hover { background-color: #68698b; color: white; } blockquote { margin-left: 2em; } div.admonition p.admonition-title + p { display: inline; } div.admonition p, div.admonition pre, div.admonition ul, div.admonition ol { margin-bottom: 5px; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } dl.definition div.note, dl.definition div.seealso { background: none; border: none; } dl.definition div.admonition { margin-bottom: 0.5em; } dl.definition .admonition-title { font-weight: bold; } div.note { background-color: #eeeeee; border: 1px solid #ccc; } .note tt { background: #d6d6d6; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } div.caution { background-color: #eeffcc; border: 1px solid #aabb88; } div.warning { background-color: #ffe4e4; border: 1px solid #f66; } .warning tt { background: #efc2c2; } p.linklist { text-align: center; } .section:target > h2, .section:target > h3, .section:target > h4, dt:target, span.highlighted { background-color: #c7c695; } pre { background-color: #eeffcc; border: 1px solid #ac9; border-left: none; border-right: none; color: #333333; display: block; font-family: monospace; line-height: 120%; margin-bottom: 1em; padding: 5px 5px 5px 15px; text-align: justify; } div.highlight pre { border: none; } ul.simple { list-style-type: circle; margin-bottom: 1em; } code.descclassname, code.descname { font-size: 1.3em; font-weight: bold; } /* Top level section title format section tag has been introduced in docutils 0.17 as a replacement for div.section Both rule variations are kept to support old versions of docutils */ div.body > section > dl > dt.title, div.body > div.section > dl > dt.title { font-size: 120%; font-weight: bold; margin-bottom: 1em; } /* Visually separate an element from previous content in a section */ div.body .leading { margin-top: 0.5em; } /* Visually separate an element from following content in a section */ div.body .trailing { margin-bottom: 0.75em; } /* An element that spans the width of its section */ div.body div.fullwidth div, div.body div.fullwidth img { display: block; margin-left: auto; margin-right: auto; } div.body div.fullwidth p { text-align: center; } /* A two column table with link, description pairs. */ table.more-to-explore, table.more-to-explore th, table.more-to-explore td { border: 0.2em double black; border-collapse: collapse; background-color: inherit; } table.more-to-explore caption { text-align: left; font-size: larger; background-color: inherit; } table.more-to-explore th, table.more-to-explore td { padding: 0.2em 2em 0.3em 0.5em; } div.body p.small-heading { margin-bottom: 0.2em; font-size: small; } /* Inlined element float right */ div.body div.inlined, div.body img.inlined-right { float: right; margin: 1em 0; } div.body .inset { margin-left: 2em; } /* Code line reference text style */ div.body span.codelineref { text-decoration: underline; } /* Highlight Code types and functions. */ .py-class .pre, .reference.internal em { font-weight: bold; background-color: #90ee90; } span.linenos { margin-right: 15px; } /* Examples section: contains one or more example subsections */ div.examples > div.example { clear: both; margin-top: 0.2em; border: 0.1em solid teal; padding: 0.2em; } div.example img { float: left; padding-right: 0.3em; padding-bottom: 0.1em; } div.example p, div.example pre { margin-top: 0; margin-bottom: 0.4em; } div.example div.break { clear: both; height: 0; } /* -- tooltip style --------------------------------------------------------- */ a.tooltip { text-decoration: underline; } a.tooltip:hover { text-decoration: none; } .tooltip-content { width: 250px; background-color: #c2fc20; border: 1px solid #ace01C; padding: 3px; border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); } /* -- comments style --------------------------------------------------------- */ form.addcomment { display:inline; } .addcomment input, a.commentButton { background-color: #6aee28; border: 1px solid #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold; padding: 6px; margin-right: 4px; } article.commentsArticle { background: none repeat scroll 0 0 #FEF790; border: 1px solid black; margin-bottom: 12px; margin-top: 12px; padding: 4px; } article.hidden { display:none; } header.commentHeading { background: none repeat scroll 0 0 #FDE42D; text-align: center; } pre.commentContent { overflow: auto; max-width: 800px; margin-left:0; border: 0; white-space: pre-wrap; } /* -- logos page ---------------------------------------------------------------- */ .fullwidth .line-block { text-align: center; } /* -- responsive design --------------------------------------------------------- */ @media only screen and (max-width: 680px) { /* Make tables be responsive-ish. */ table, thead, tbody, th, td, tr { display: block; } div.body img.inlined-right { float: none; display: block; margin: auto } span.linenos { margin-right: 10px; } .addcomment input, a.commentButton { font-size: 10px; } pre { white-space: pre-wrap; word-wrap: break-word; } .toc td { width: 100%; } }././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.974112 pygame-2.6.1/docs/generated/_static/pygame.ico0000644000175100001770000000206614676242340020715 0ustar00runnerdocker &(( @33333;033333333;38xww8wwwwwxwwpwpwwxwwwxx;3xp30;0;03;3;;33;;33x338p0?px;0;?;0;?;??3󻳳; 8x;03;30?(  wp   0 0 ;  c././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/_static/pygame_lofi.png0000644000175100001770000040614214676242340021743 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕKA$E,,U!hc "`&< m@AU_`-"`hr!AH,;owYJFsC&>BxD:q(:QoYK,+`iST-/<%^h{ж- guFȏdiM$Z~Kst5Kم~߶ qgq pHYs."."ݒNiTXtXML:com.adobe.xmp Pygame Logo Trace -N''IDATx^|Wg+NX  hNK݅-P!Hq;ş? -ݙ{=5FNTn**rUXǶWj*$Q I*W[ErXB/L>5UܠBV x dT\b YAT%d """""""""jRTܥb}V,гkPѫ=еa@~YvyByƺMEwu!]S=F{T|5(RA1@DDDDDDDDD԰ȸ*S(J .a@VTH%jd """""""""jfxAES S6 3NDwnݞL7]_HǢL8|+5+L2/F-zOcqYW  Gd|'6u$p Jdyȑ<0@DDDDDDDDDTdi*N{ʤ1v8C0VEdl{YGBCV7*TK|&P%*_Rd """""""""ҟQsx684xJ#"ίHJJ:ğq5,"Tnm7dSq)*ڨ pXA?VL2վa*?Svn%.a <%\ɲcůᓯɗXP3 {{/Q9$aO:lU6-.ǫBEo97@N.f ;!.Naf8Џ{Qٹde{'Ӎm;Jے|,]Uk3]]&aTHAoVѠ0@DDDDDDDDDTT,VAv&D(R߂ٝለmCJA돿R} ﯰ0 Sg% 9aN =8x &GտhgTE;9PQa2>GB8\p:1{[t eVo(ƯKsϾEvn*Ukd """""""""=v8Rv:sOV$}$RtT-,gww"'w2aW^iii믿t p8$8BGݒZqEdCWqZ -.Tq9P}'.8- NA|d][c(}C7V/W9ذeBJO{I"""""""""seCaGtn^o l0D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^( .4TçE1`dȌ

^wM`\`RvJFn>.K{T_XIcӜCJjWM+ZFlhVQE~qiyy$1;@ @ <`A[piU?omXTI6N'o\™L-͡.$;#+W9:]]I$1SE7$CH}+泜Gқ\.O:]rqOBM/PLB$n1o#<=G;:.Z@C$a W1ְto۔TM(kpQp#zWI<s68PIPXFOOZ嬨UnMNw1MGwk[/˽RK"? ݌*ij JʲFnqӏƲ_SQ-EdeW%g[>8y9+,'R{-Dޛ`*Tkm,į%ߟ=ۂv839m%:wvd* ;68޸~!˪Opmci9A21W׹K&խs4Z3l6ɴ?P}+rW8^׷cЭb0t-,shLsC##pn5iWNhlaYħozU3Ŀƕ9$CӟAҫkvhV,rW8^˲eT4Ҋ#_pn.r!{I7o+k+KK,:%5qjtzz3<1X&y37HD"`MqZQJiѲMw<;5\d2zҧ}-Ź#80sׯa9YuƥG RTZR8M?Q6{^'`?ji.Nw)*׮O zi4+c+{θ'sߵB)n'JF=f'G^R?}%3iog''K?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.984112 pygame-2.6.1/docs/generated/_images/camera_mask.jpg0000644000175100001770000004453314676242340021667 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?}iea9w&d'uwYAGS+|:-LQn0:j$X9GKES: JGr> ӭ$ Yߧ}Gly\co.ync=+8^mϑz7[ӐE韙J+Xt7w dWϦ>PG&'[I6Fq}58c_Z/]/QNOͳ\z׿cVͳxsU?[y{?C^r;Fۑޣ:WW;31<;N_4ptg6ۈ^/'a}M?.@sGZ)711֟chtS^Z?p#ˎuR7S؟,xjY Yǡ}+=xN/X;"5ŹHH/J@?uƤ*.h;"U(*5RGZdHT=3O')}9Ea"-qGST:`ǵHG+ |J k>n|'YzUMͤ( r?kx7¬T$ԭ~bX1\qUW'*z teɕMQ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gqz8'TMY"HRU;ju $nlm.3^IRvw}x(|QSo_Kt쭮 I;o\{R_\nx3Հ5wdǴ_EK<[í5UɧoS?)MMI%F+ 9$ `2UzTEopK%[$gxAhnWWj?wz~}aқҚ c$?*-n.pX#Sa_-|cnOfEKm6Vizz֙F4kFb3Ko$|?Z2G'ۭEfvۘ?֬»P{F"z;'-QJ9P<QmgwA%M򫚵vr~aߧWy2;SKޤ}B-wp'5 C.%S[ F"Gshjͬ-vBe:s 4yV ' my 5 M$I}03[Īv$`~dTrZ=r6ccU`C4<\Uԋ ȋN`e#]$*H G8eE<,$ q+P٥Y)G(s{ֿ-uKadUAwΖb U ,*vM2H0'JhBZlm&`1IXSWgʩ1"bϯZ{,@c\.zuU (Uky^dRqU=K-Fݲ2DOھd{[$Q#a&x)~OlkOHk^y=Ͻ]ǸsGMUt$\f~ckyTH#d{psOmNG9Ү8)ֺ++*n<ՃM9\ȸI,B2qRi~}t@=3޺hmV"v84PGb}2EtR{R0pѐ[ڄ>#Z*mǾ4Fp?:p1K Cϔ܉#fг9n>* FS^sf A]nX α5[/ 5/m%e}qxsH]۫OpG+vFi;a5|h@BfSß|&wZ~'././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/camera_rgb.jpg0000644000175100001770000007735014676242340021511 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?__ ZeYiȤN__igɻ]o ȸ =+ny3чnSgI$Z͢m{N;}K9܆p~P0G?&[\Ԇ'=C/֢k !irжzA8(od /S(-ݥȉY-x=韄:>%Hfh]# [+_85n˷''t? \lЀG9 TIFxrgX]nᵙA.dTc%18lP yM'8*93y)+/]UiAmmH#QAt CYn+YpGRqZB.Y/̯s5TI+Qzgv H ѕPqO5Mm,%U+0qПJ7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9I3\_|+ . m#JxDiXIEx 4jBʔt_ՄE/wk1--tPoltlqR]YZv g&LԾ0O&hqPGo/AԞ?zzE]ȳ{F8 I?t>]: yF;9&G7^8y5fM %&Wno< 7*y_ō BƥVWmxIozR0Mw8!~皧qjZ}@^qqڙCE̓ _;qMN3V9@iIRݻS]Rz{Ϲ-ҮWEԿgxy ǩ5V<"Dj$g"QKc쐳@åa;ZV85D+=ϵsnKe߅z;A֢i4O9]b| }FW >WY~xq΁$4k5goʣk1=@<=[ G 4k3ꨰlc~lWcz莿g}QWwtn|Rӎ >ϨŻ:pARvS9[۾ofVZ+esوgI =p9%%\[ d Na}A89⾀Ծ-.M.[l g;35ZςX=ͮp d$a# nTPjn"tw*obF_FkZ=6\nI#GSs{h1j CY-!W،#_h#././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/camera_thresh.jpg0000644000175100001770000001037214676242340022223 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ʊ(((((((((((((((((((((((((((((((((((((((((((((((((*}K_4oϻʋzXmB4HFnYc̖ Sr9aA%|RFte$D*Fj (,(((((((((((((((((+뿁 oa=j?nwIba}y֐];es#Y7#( X;I Tӊ\/tv#K?Fem\B*999IS! 0zf# W8M'ƛwfk%)*#ďΙ,7GoP0eՓ'`}O*ŦoyfN`qx;Wѯu9(Š(((((((((((((((/éUX Ϛ%2") ]Fcߥ`|>&bmo4~BU^o^4-:;=6<"p$׵e^ҢW1SD[\??4=qԘ⾞Lb{lSY~TX2"sT|Ki^"fOϷM*Ajۜp),1Sљ>,+|uq{n_˼@YTrkk-"rG"d`pAAQהvQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@_4G^աҴOˏzX^PKK Y$ȡN +_~#:~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QEQEQEQEQEQEQE././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/camera_thresholded.jpg0000644000175100001770000005617614676242340023247 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?L +X.dI_p]Xrx5_^Im{ ~fMLAp~R#FX%C|`N4)(FdYr#8GOÌhQEQEQEQEQExh5M*3m#M>T+ (pϥrkL/t˵e̍2Oa5tz1k60{;WDeь˱A +ϓ RKCt#mp䜎8QՖ'3Zn)]zإPd 5u]ҍm\RyD\JvF"f`l7`<13] c:b;8>?ZcKdX4V=A\g~;sR4dXLH¬>[@,@99{ˍ1Ǵ~nJ?7~GN1KHJ1F&O;p٦#Ē&7'kzp}4\\\G<1/}pijq= |n9e,NPF $ą̈̄eR @<HϨlI+Fv 98>(g1آSHn\G>)bjK(储<簨i.>f5a"`%qyus{r7\$]$xRZȑHYx(: AL-̱yvA0>awgr(".T198( ( ( ( ( )ƱbKd~B@Cʈ,jv4(((((({k$/ɱ 88 -m'fD9S0y=H9ȵ^[C^,v`#0U<$ygqc#ٔވHulsq:A}V\Ӎ\+X4u+z),Vlm [q+2$g LLb NrA#``w#l SEJ)0f P*'fLA"慥 VYcl5 >18㎾ÛL|@H,/m2aNn4աUYK JހS2/̧ X+c޳nٴL@IGLDvy⹪U&fS$k]n9F,m;pUݰܭeڬ&4RI ʤ##eV$C&'Û&lXk3$F??͵ۗc4'żwpCeo5g>RϖT!6잕q#Rg~&xI(}d^\Au#Wx r3ׄ~bL$I#BJ''ܓWwA,r90cA 8']{)Y]X1 .pH<UGv@d°ƬYPH(T6≋F.ݘ .8$9'5]0=KE :e+|t`Rbe{Rk;h,UxɨCMҮu "9nvN`3?'hl K2WlN0cv>2Uf[*(Š(+cA+a^^olri X 788'v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{I'IF&Tl\/7$IYBpo>GY{ m49>o Fw0dO{M"bPJ4*#F2*iI'Ams-Rܒp0-Uvl(;(((((7 EUjHyExuzf\xfD;'/cKsfGiڽ8ũ8{׏2IQ7H@@=rB܁X^,xFEI2';n)yX KqgY2 -H.JKdO Zm[T&oy 3rWxf*]8{Z}7Ut$\aX^XJc\E{jDH \Mk>(_,\Ǖ8䑊ƌ 2pI +%մ+uc7*"pˀrs8 )U׉;%s^ܰ OM½hmNuyq)m!PK)J [ dS隊ThxةdbpGn$bQ< r#tj:Բ 08준ylEZVV5Ѝf#CvԜwLhsZ]nH2Ek#t;Bi^Z㳶6fTRq}MMJˁ-0,nb݋V 66 ܌Y𥦁F+ZB]Xbx!˸8+K#+K+YKԓ94kw&5șSmP1<@㡨5Z:z K"Q[QEQEQEQEQE\M%+<I",YqWI[DE4YFrr mVu#̉='bt 9mR+\F˰nUNvwGP}چ22\yva͸dT 'ުI\gr o*)s6Q/5d5p$ q87X'dJsAf yWa-QNXx u oKk$1`q*q\xI'wW/rULB%03K นdb@G.:$>wy8nrBm\p =:E0]PF*@rzjajyjOCiASNmXDJ'AU`~88#X6֡Ӂ^^r^çG{eM*mp(Ey8X]mol,9D> s;g ȫWRۭP~fm&t-\D1 Px!I! Yծt&+7ٻC+mq8l"Aq&wFG90O+Ղt*(E+K#%X0#=CEP././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/camera_yuv.jpg0000644000175100001770000004721114676242340021553 0ustar00runnerdockerJFIFC  !"$"$C@" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?ԟ2qH3 yiZ$z+6A{q%<\({$M>nhy6[ce$z{Մ-oşIs^ 4aۯs$ 61Dq*m?)?LyԮk:q}_O?$D26=[,tc+oOç\Аnn6vmoAy=}G E'V=L&7~ב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V?ңivڙP{(X61PqIvE5޸52¯j'rح&?4"\_˭Jf~Ly~T杼T 3~rDk Pk+?=_zviqf#SGd皷_%w/S Z'@633zy.]9Fy9([qh΀:隵> D?7N:QSݓ}n.:<n)V;fV집ӨCOPC知S TykF8jN1r]]bzr!(":n5d9?ʕFROZ( hcwrzL gޏ^w$2#ޭ!y68OU}b2YTRڕzcx={yP>LCҭY^̄T2Lt; R28$ k!mҰ>.*TQgUW쐷ڲ}:޴f6QM92Gt-ۢ6vo #}Assǧ,ݹN+m3*ެI|ę' =ԗZOMSgIV4oNZ3N|cVXUְQ[[KK=Hƪg1sBujkh/hm ƺvq#` jZ(LuOyX/G9`ߺ?7:v]npZw1cSd֦Eev*Th ȍL>m-_d^J_$NϸƝ"9sQORO${™g!QjVW℺(dkrz9NPNmPpP# x5{:5OpZ t!=iqsJFIsސ h{lJy'l6$3S].z0mtȍTI,eb O\c?Җ/-#qӰP|*' ?ZWg^j̈ aߊ'ML(wG.'eWVm|Au ̑`Ƣxj#Wyn^h$!%B$xv|OݏS~Ra΅l?6@b#]|D1gv?././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/chimpshot.gif0000644000175100001770000013167214676242340021410 0ustar00runnerdockerGIF89a(&p,(&Ɉ{V˩P+õOǴ+ćnƸ1#Ե˦­#fѽ+uwyjfffې::f::!ɾa/:::Y.ff:fffF۶ff::ې:ffې::w{vʴf::::ۧ||.˺0mkM:f::f:W\VJMFG}rZGfkjzVSHC::ff::f:f~_dcx_\:fnhX9{uWwĚLhSPmWlvy 2Z|cGaNbkPPP~svuflqdjr|}awYil}bgtw|z}žjKmRlmRd{rS|\{[Ǩ|hVsL~]\äЮtTZ;jI˫Ȭ]Bx^AeGͳm[HӷvX8|dF|bDlMmK1ֽlt\$s§sJ,^:!ιqNZ7R.˱c=Ƥ|ԲŲЫ}̱nza=^׼p?ѶuiT,myS.m{NeDb<^l>ZOѰz]^J!H*\ȰÇ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z[_`R!&TZu#c1Xed6UDd(MY0wP+k|GPf^˘30B- *%!EFzO(oːm(@L7#n2E#F!=/kCFmSfa*Fl=Bd]UNקEH6Sc:љd/WlX{Xs=QwqLԈ #!wS$5)a=>7ga~xр4HE(\lE0Q|BFm&."铧Tsjr* %8 9z'\%}*ÌG44#XF3ffЂ: U< S\#xJ:[hs5i41#i Eq|b$T>JԢ᧗9KbEcL:,Bϐ~Apl CZSTEDBHG)hA rxuRTRPEBSA UG4q*P.0Il#stE:dZͬf7z hGKҚMjWֺlgKͭnw pKMr:ЍtKZͮvz xKMz|Kͯ~LN;'L [ΰ7T{ GL(NW0gL8αw@L"HN&;PL*[Xβ .{G;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.979112 pygame-2.6.1/docs/generated/_images/draw_module_example.png0000644000175100001770000001451414676242340023441 0ustar00runnerdockerPNG  IHDRJxsRGBgAMA a pHYs(JIDATx^}\]Mi )Lh %#ZDGkpdqFN/UTi;iG8v0B2SU:%i$*% 4s={9y=/ln.3=   @4hSǾ.{^ÿy72^v!Vk׮?~=_{jš6~K_{Oz>rك3?kO?2g~ïX̓_{?]HpjB̺׿x?w湟<|Əˇڹsgv%\roffGf W\[', }܉ǿdn39{[#G^Z|]7;g^7׺}{Z_;f7Fզ&4Ti_L.}C5;ͧ4!Xga޽O_\\9zo>?Ooǖ_;jƽ&}wJζk6:;e=up"}&mbVGϞ?%Kx;NXzi+W7 giً]PTlVZƷWr'e{Q_-:{ϟ-wVwsd継f@w?de(a^UnVHQ=g^uX^lU/ݻ3^ŮEN8ك'_ kTM2;{Sm79?[o?~|k.=v[G7`&=&_wUw30i+4GuՃJ{ujs{^`"VڰMuyˏCâ'8{? 3=/>מG}T\`1hk޹ػ{aݟ]uEL|]SR\m+.=3N%^?Ⓩo9pP{Xv][7@!7^1 kՊ7 ;ol}oʛh٧?xךwU̺qCoiJYh NS[XPvTڑ5_MvMΙ--y0ќAӾ\X+!2>t?}㇏/:_~y?{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F}b2"TBa3h缝Իl5f&a5AjY#Uv̗ISOڐ ̰PO  ,?bz`%rkֿuԊ#̰&ɖr1 f{Q5߳}j֊;gXɜ)gJMjKB`2VJV/0FvUVL\s2Ê1R,j%a!fTQ+mx (Q?Ua{5R,U0 +Ȑ߬' ?"y"kuCN! qPZy#XBg7U`3[TMw!WW#{U(^PYfEDUU@EaW!7e+TZif9od)>d Z~#p 3Y15I6*{y&2؂4+cW\E\4Y $Oi\iN,D*. Dokh, XAD`   @$zeȄIENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/intro_ball.gif0000644000175100001770000001162714676242340021534 0ustar00runnerdockerGIF89aoocsZsZcRkZ{cssZZJュcRcJksc{Ƶ{ƽޜs罵)9΄scRޭs޵RBֵR{֔9罄{JJ)ƽƵέBƽ眵9Δ!Z޵ƭ֔Zk罔֭kBJRΌ{RRkJslJֵޔJƽΔBέƥ{ΌJƌ9ƜkcZΔR9{9sJks9kBk9{{{{kc9{ZksssR{{{sZνkƥޥZ޵{Υεޥcέ{֜Rޭ{{{c! ,oo H*\ȰÇ#JHEhQŏ + 0@(S4cȗ0Y܉2Ahę3 (4ejMu&7| A;\3<vA]RI`-\1 ҥiN: QL >جx1&lDH4Np֮]CQ#5PH 4'< 4dF(o oP}ss `(s $ _}&uk !ps+(`@zF!|'v ̅_g 쇜T $ )UU݂P(*@ p`(@A75Xmv=H~õY'l 8BEy0"|pbFf |@l@X[x[ T `[rZe6|&}ciY\|V"L#V$Y6'qp_nۥ{ZiFN`,BzTY A k 9j4̾믵ATH$:lv`Pͦ +_*dB] tʹ?o?&۠ )Cb ~d "-)\gv:n#n nEb|E&f  ) E$m28cE0S\}`ޙ*D`Ce/Od b5+Tzi 0:,6C3kFc]F-%RІPwݕzKȆLLgQjDo;=+`v[a9~撼nx骗CÎB #/tm*^,$;OE$׋Doo*WYUuc 'o~V"lyBwA jP L*g ׳k:h3:5o  A!osA C@n)`x'A 2! `toDLb`cZDfmx]XduMC"Ȅ$b Q5Q I h@+9,d%b }*ZWPI(!1֏ H`#5AD:26׾cX]J'I86\ nKY7(fcQbd`/ f VJ n`> K~b $U@fd"íˏ  (yt,*Yώ&!H qz/3 +bB6ow+`3-}NtD AϦF Qc^4_W\E&X *z=X]e  `3v9v#+`ł^Y=ۛo lT܇݁(A`02-m;c׀|2075,̓[4|tajGj(nрxW9B)Y/76(,G|LDj+XFw3+J"R*57aC!(xVgCxͶtgKȄ{R+S3')#roDEVV~Exf꧄mtK;P a2J(S1}S-,|]NPeՇV'Ą +)]a3]24<~ VhK|~ZPI~2Њ%PPbmTp|exX$q#ʸp0"}S]D?τ(aۈxgLHIBK2b蘎b AR' Pdue 剼hH/9"at% "y>hHwP\=VgȄ<`+b] $_=󁃔 {n9R;y1z0r0g[t^9jfl 1G#qu1  !p16R)a2ɏ8P11!\"y4&bYEYx8ŠtiW/5@iAc8Rmvi虒D!鑎@ԕ+p? KKFY?Ʋ*1Fڱ!z!YB?(ۭr| .[DŽ#Iz'P/s;zZYz1a{W @ty$jRh?b`pvi[I;s @z1, kDn{[zV{Xg;i+7+@ \wYGxń(5#Q 0:S)+u !BZL3Q;&ؠɻü^pY"cW $yڱ 6+w qP^ҋ1fw>:{; b$Ĺ n`H% cFq]WK7g8#B@K@HR=I5?!DD`Y-B0fX sśkDQ 3CDRPlB+w %փMp mAVlHsX 1%c;+l F'RZPK0{>˰b m<Tp:l 1 VLL`H60#6kHdHdHp dʦ =:|qɌ  <\Y;././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/intro_blade.jpg0000644000175100001770000000510714676242340021700 0ustar00runnerdockerJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222": !1AQa"2q#BR$4br+1!q23A"#BQ ?SQ¡'Md8zy0)dQk{f7_#xrVOHԪRoy2~^(wYx"%rF-/M9'.cRCө?zьu:8EnO"?3`Nsko)MjFR\n"::y3ˬw=^K,|~"€@0 HH(:XaNKcL^t¯Vs5ۭo!К:9PRTĢteshEJ'N՗BT@0CHt:CHbHШDP*DB@4:t\QZ+uۦ0y TӣCQ3 ;VDQT( ttP) Ht (@Z@4KF&3hZ%T[B"6Hv_;9m 5MZ1z~2-]ho"XoHz(Uv$c%+mwjmVAB* *>}[6gphԢQSAEP ti*(I !RA * hTh-DiBh+&F TiBh =%rH4Q4EBtPT\#Q// 5K3.EE$VI!T4&E$4@Z@ѫMѭ d4lK vhШ҃h1rI%mƔt%Ԭ<7R{Uz.Jͭ2Z,:o3M `ln5i=5>n*_~+_.[Zڗ>*ֱ5vGEQžLܲYs.cǦ|<q|CP,:/e>,c6/^+bxIXVo:tE/h"RE$RD@mDkBm6mШė.W[EFEAvj8tX%%SY(kQ/X)JjxSo;NIi}G=9OiUb7RQK*Scϊ2P޾7Wt+I; wiZ9xN(䃆I\_ʎiqVb3 imɞѦSltij BMFh@ 6e'$>.u|7 uy2-)㶾NLf!8L.!(dJ2]-;>süQO&=Ten}}OK>,CጥVZ1&m+I/z-m[N>mc8,=7uR߶n)J0D rp_)jbi|x Ùbpnj)Ԓi}KY͟K]R>!]x\>KgQIW3x,QOx%Tq:g'̸8=p RM6[nQ_[\i Rtǟz}Ƕ}<6HN& CiliV/s]>gŷYKK)+ԗ׺3yX3 jE|>--6<~G#O8'Ze>u'zۗO?_0Dw@NxiNH̗(j :P((-Qi2xA$I%$bm/hYepɚw<<KzO<9VzxM_˩d?Zbb8DRfrZ=J"и$>zO^/] :6(t././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/intro_freedom.jpg0000644000175100001770000001561214676242340022254 0ustar00runnerdockerJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"9!1AQa"q2#RbB$r3-!1A"Q2aq$ ?Luޝ0+2vqMd;޽Xl+`e[mJQ s۟B*`v*m>M(+1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ܻ2^*HN\ʛs ^Fx r{v}.]J--" w}j;*j IǔFN:QU^TW۶PF~!s>sϭ,z |~UP }~IW8YVbIDcWeKI؆d@Sڕ*7n:[؋XE?*-AK!u! dΕ*KeH'sNX.thĒr!9)Rg(; sJZ ۷OZTvŜ$f*W{ BB QT 8^~uk vM^^iwRqyr *U q&V&%4\ Wۥjȶu&R3a<9!uKS""GyoBM*Uۯ&ņ Vַ/yAE<ˌg'Uo *UB0U$`mlkkۛCLɞi/CJbFW;HzRHbą0W9JjTP././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.985112 pygame-2.6.1/docs/generated/_images/introduction-Battleship.png0000644000175100001770000050332214676242340024242 0ustar00runnerdockerPNG  IHDR#غIDATx ]e}>~s:3J$@HHH}D7\Тj֭OZTmU*E+l laMd33w?9w&~t#̝{^,gzL=S3/|uzfl-8ݻgz7߀K-_WëV)\8]zgy1K_}7a롤y;=y/ƆS3L=yt]w5$I&ך}={ԯjݻwK_ˎs'j ʅA'Kr-)*i䏎DdbeϬ]/nZFwe 0\h號z` FQi&nOBם5O>tTzys=Ϭ][ǟs84C~|뉧xY_d87_nھygo;ODbXizg3M$QjW`+fәtf|ٯ|ᇖ/[޷jo~?WbQk>~_ok=>fS<7~nxɲlxK~vco9_y勴xɇ6t /6yͫ| ֝T_`%y4]gz^O%KlG'xbxxxMޱϡ ^r7?`k\|`Z7woY寒k~4bްr[>xu[GC,;#}Oߙ{ВJ{no<%{~qz竿oWv iY_qkqyz3L=/DzrT\k[vo g}V=;}|?v}ԙkoyO~.s+psGGwnZa+> OOlXp+g6po.;~޸08L=S vLy&h5~[j[oݰaËbK=;̴҃>~l#kc;i\i`^)M/YyԦghY60w4Xbu<4c0{s7;oo%ٹăS~wOg=? )0kw}œ9s6lܘ)~m7n[_8PM]SK} Z'hT-Hu0 -Ks4iY%I+9"7;='߿rgM=S  zrle75L=Sy L=S3)lzg?[,$z_Wf_e-njӸ9xc.\}\|x-:+MՋwz}oϾ?N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ۅc@ۂЮ Jʼn<) np$΅l^ޟW0wfh46#9D:ZRLQ/-mwm )M۪H9"rU'~|d0Utp:|)SIv=.6<8vSێ  n6cak )Ʒlhr>UNqR@Z[#&dɲ6j*05@L Ⱳh&'Rb2ddmrE)_ a֜62cH*nU#$;DÅ=z=tکa )!`ÁmcL,4bC-7}F* YLj5܊ `͢-Zkí  $"kgB)|QBTAcփqg@?,Rv{NJY P+E @`lH0sNeIғb5!e"1YS㶬'0qVg+Hl@hq" /)=IN0`&Qe V7Z#N>ӄEW1i`V{*WzQR;n-\ڙas1:m-Xqe%~Q:+԰+ =kqh+O萃JPm*& ޣpi43u<5t2-$(@;gX[;^ fNnZVl:Q"M G}vDOv֎&^-N |5tv3uB+;X =ОŤ>Ag&)HK3q%peر .8_L^^Kr&u,:VlZʨ9u+JUca"n Db cP#d$FEBi*W䫻0B )B8Cb{ld0(`_ "0JGiO z+HEE@qo14\jgJtCƶa(94gje1h;Q 7!:";o $GK)N8:cjd2G2X͍#R*]k&@vMF9iga_ 5V+W3 (/5r=fPVKkCd=RPɁ,﬉*U,Jo|\lē(!m规<=9Fh L!6T rJq٬ b0B˱=x_Uò=.'P)FCpCv y~#:n\UJ^994$& 3M6>$*ZL[Fr_廬[- xlF+6DئZC9UlTe_\nU*k  R3bOVS;QWX@ gq`}6iW bWɹ_C {/5>>>:6&i)RfVx J$c%N? tlij9eh 57c|bQ29TL~ `lLjvp="Ҹ"PR#s Rp*ٌ"t2r<6:m" :)Q= ZwHQъ|.*XLuLqkf:/*M%~m<W^O6Fhm:~K^m'" drb4̪$S`-\ Db|W@REjue+b:߆kptpunF"賐=a1P s9[dp ,Uwmhjђ #6haVib Ei>IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.989112 pygame-2.6.1/docs/generated/_images/introduction-Battleship1.png0000644000175100001770000050332214676242340024323 0ustar00runnerdockerPNG  IHDR#غIDATx ]e}>~s:3J$@HHH}D7\Тj֭OZTmU*E+l laMd33w?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"n Db cP#d$FEBi*W䫻0B )B8Cb{ld0(`_ "0JGiO z+HEE@qo14\jgJtCƶa(94gje1h;Q 7!:";o $GK)N8:cjd2G2X͍#R*]k&@vMF9iga_ 5V+W3 (/5r=fPVKkCd=RPɁ,﬉*U,Jo|\lē(!m规<=9Fh L!6T rJq٬ b0B˱=x_Uò=.'P)FCpCv y~#:n\UJ^994$& 3M6>$*ZL[Fr_廬[- xlF+6DئZC9UlTe_\nU*k  R3bOVS;QWX@ gq`}6iW bWɹ_C {/5>>>:6&i)RfVx J$c%N? tlij9eh 57c|bQ29TL~ `lLjvp="Ҹ"PR#s Rp*ٌ"t2r<6:m" :)Q= ZwHQъ|.*XLuLqkf:/*M%~m<W^O6Fhm:~K^m'" drb4̪$S`-\ Db|W@REjue+b:߆kptpunF"賐=a1P s9[dp ,Uwmhjђ #6haVib Ei>IENDB`././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1727612127.9861119 pygame-2.6.1/docs/generated/_images/introduction-PuyoPuyo.png0000644000175100001770000007523414676242340023762 0ustar00runnerdockerPNG  IHDR'dSzcIDATx\TgYz"EA@DEb[5j,؍]TbCTP{F&|_~ֽs޽yι3g 5ھ _HsAs4ѱ_*YEe%S^^p =|盷nnlԮLXP$GWO';+TRE[:/)D8;%YQM-=>i,_UXQےQTWeY:FfIRfj}\F ^# TRUJdIedZF+Q0;=#gXUk^://0UDk;yViYq]^߼I;9R Â߭bb?ޡKQM|rDRI/ FJsr%d3Rc+bfq\9 hgf6kd^A]Jtr {YH(*kWV(*(%hY5J yYӗ,IH-l 2}21|p֮Z2EҥS][HJHNK#WK,d2tÇunQƞ8sKke3}Icj9Y=M՞}WUصtI|y^c=zXQu[Ѻc]>s>-yGS;w|靮_ NIٵrWKzPlSz6t'd-6.=)i9s޼v)hpKG(wZևͭYVEKAO%eJ'5oČ+}wԜn~7]P.)'kfdRYZĽS[n[ջ|gk۝޲VGݎp5\"W %[yjHyFųW-SJy{?fx/G͛beI:iIȫgF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jn9aZl"$ưKlˋޜHU!*{Ymu5,yɶ !J d[k ;ɶ !D2HǞuV ;ۘ)Fy ɶJUb8ѣI{XRͪUڶ /6nh,Ϸ2xgsO=6W(6m鵶e~Z[Y`kk׮anYf%C-u\Q'a͚BHU!I=,˶EO6F|xWaɶ !D:j lSeVƟLbCѥ|ҥ ɶ !D 5jT`*_B1Sk{GsP׶߯-C :+#x/KPT<1+ÚYn߲e>_~yciժUfx(3w5%0~0zqaΜ95#F5"}XTN*YmZp3fEF<0BB>$*Bɶ !)C]$ɰ !D4agjcQGsBM;JxS*D:`VҪ V!Gxd2cAz{MIgZkj6-%V!GEu/Xcwyg{%J]u7$J1{)Tq~օM9գ$6q9ؙƴ2^\OQvq-L0au3>ERy\'4d.r dsqZсc=ֹ V!(5'{キ%4hP.I`0l[`rE{챢@]BIdڶm[)WuX6 Ջ#5 .IM׮]su.\nMIBwuWxڸ$2%\k}$q Փ BlzEuϘ1üYR⅖<]NAw=tr+5O n4^Zl֤Ib@k p7^OcZ ]UWYcgF#H~`HU!CEv`n2VX;BeԩS]Ԩ#'-Z$l18 Qrȵ@S֭[gB5~5h}ɰ !D|*ΰ(LV.9|R1$ΘKj lIrȵ xr³K̳{ E2B30rH0.QJc-|AÝ5kVn|rK:&C|[ K>$a׬Ycq Bħ*UItUH)`h"6f\VM^j~l/o߾6Lq#vZ3SNmB8*u;FC}~W!C4!#e+lܸٳg>h"Pӽ}ѦF wN?lyXa+4va?bBTS傽*߲Sh`4X+Op=xQF) [\k]\3AwD8c1̥d BCB!DJlB2d؅B!.Bv!"EȰ !)B]!H2B!DaB!R B"d؅B!.Bv!"EȰ !)B]!H2B!DaB!R B"d؅B!.Bv!"EȰ !)B]!H2B!DaB!R B"d؅By2i9IENDB`././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1727612127.975112 pygame-2.6.1/docs/generated/_images/pygame_lofi.png0000644000175100001770000040614214676242340021721 0ustar00runnerdockerPNG  IHDRba{iCCPICC Profile(ϕ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